1) Rewrite the grammar to eliminate any ambiguity and make sure that the associativity of the operations + , – , *, and /are left to right.
2) Write a parser of the rewritten grammar using BYACC/J. Once you have built your parser, you should be able to process programs written in the language described above. When BYACC finds input that doesn't match the grammar, it automatically terminates with the message 'Syntax error'. You will need to write an error routine (yyerror) that also prints out the line number before this termination, and a main method that read a program from a file.
Hi,
I am interested in the details of the project. I am major in computer science and studied compiler not only the design, but also writing code. I have completed a R parser with yacc before. Feel free to contact me.