Created
October 7, 2014 19:45
-
-
Save alexandervasyuk/e237f7a26486b948c321 to your computer and use it in GitHub Desktop.
parentheses conditions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if the token is a left parenthesis, then push it onto the stack. | |
If the token is a right parenthesis: | |
Until the token at the top of the stack is a left parenthesis, pop operators off the stack onto the output stack. | |
Pop the left parenthesis from the stack, but not onto the output queue. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment