where stmt is the only non-terminal symbol,
stmt is the start symbol,
and
id   (   )   ;   {   }   if   else
is the list of terminal symbols.
The terminal symbol id is defined using the regular expression (letter+)
where letter is an ascii character in the interval a..z .
The grammar generates a subset of the Java statements.
Rewrite the grammar into a grammar which is LL(1), and
use the rewritten grammar as the basis for implementing a recursive descent
parser in Java.
Submit on paper the LL(1) grammar, the FIRST and FOLLOW sets for
each nonterminal symbol, and the predictive parsing table.
Argue that the grammar is LL(1).
Submit electronically your program.
Your main file should be called Parse.java, and if Expression is a file,
possibly containing a Java statement according to the above grammar,
then
java Parse < Expression
outputs
either
"Expression parsed successfully",
or "Parse error in line X"
where X is the linenumber for where the error was found.