i need you to check my code and figure out why is it not compiling.
Rewrite the grammar to eliminate any ambiguity and make sure that the associativity of the operations + ,–, *, and /are left to right. 2)Writea parserof the rewritten grammarusing BYACC/J. Once you have built your parser, you should be able to process programswritten 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.