Introduction - If you have any usage issues, please Google them yourself
1 gives grammar as follows: E [E] E-> T | E+ T T-> F | T* F F-> i (E) the corresponding inverse Polish into semantic action as follows:
E-> E (1) op E (2) {E.CODE: = E (1) .CODE || E (2) .CODE || op}
E-> (E (1)) {E.CODE: = E (1) .CODE}
E-> id {E.CODE: = id}
2, the use of experimental 5 operator priority analysis algorithms, combined with semantic actions given above structure to achieve reverse Polish notation
3, the use of the stack, calculates the resulting Reverse Polish Notation, as follows:
1) infix expression, read a text file, each line deposited an expression, in order to reduce the difficulty of using a constant expression expression
2) the use of binding syntax directed translation of operator priority analysis, structural inverse Polish
3) Using the calculated postfix stack of results and outputs