Skip to content

A simple program that checks for errors in expressions containing braces

Notifications You must be signed in to change notification settings

ProfessorMB21/simple_expression_parser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The Simple Brace Expression Parser task


Requirements
  • Make a stack data structure
  • Let the user input a string of different types of parentheses
  • Iterate across the string and perform the operations as follows:
  • Push to the stack a character of the supplied string iff it is an opening parenthesis
  • If a character is a closing parenthesis, perform the following:
  • Check if the stack is not empty and the opening parenthesis on top of the stack is corresponding to the closing parenthesis
  • If yes, then pop the parenthesis on top of the stack
  • Keep on printing the pushed parentheses on the stack as well as the popped

About

A simple program that checks for errors in expressions containing braces

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published