In this phase of the project, you are to write a translation system, using flex and bison (or lex and yacc), that translates a list of C expressions from infix to postfix notation. Your translator should read from standard input and write to standard output.
In addition to the grammar rules in K&R that define expressions, you will need to add the rule:
expr-list : expression ; expr-list expression ;
You do not need to translate expressions that use the following rules from K&R:
expression: expression , assignment-expression cast-expression : ( type-name ) cast-expression unary-expression: sizeof ( type-name ) postfix-expression: postfix-expression [ expression ] postfix-expression: postfix-expression ( argument-expression-list ) postfix-expression: postfix-expression ( ) postfix-expression: postfix-expression . identifier postfix-expression: postfix-expression -> identifier primary-expression: string constant: floating-constant constant: enumeration-constantA couple of things that you should think about:
a + b * c ; (a + b) * c ; a ? b : ++c ; '\n'; '\?';