Consider the following grammar:
E -> E or T
E -> T
T -> T and NF
T -> NF
NF -> not NF
NF -> F
F -> ( E )
F -> a
- Transform this grammar into one that does not contain left recursion.
- Write a recursive-descent parser for the defined language in a C, C++, Java, Prolog, or Scheme.
- For each non-terminal X in the transformed grammar, compute FIRST(X) and FOLLOW(X)
- Construct the LL(1) parsing table for the transformed grammar.