Write a recursive decent parser in Java for the following grammar:
expr -> term + expr | term - expr | term * expr | term / expr | term
The name of the .java file with the main method must be P04.
The lexical analyzer must read from the command line. For instance, the program will be tested by executing
against text files like the following:
c:\>java P04 < in.txt
where in.txt is a text file that contains legal or illegal sentances in the grammar.