M
Matthew Bowman
I'm in need of some assistance in converting an LL(2) grammar to an
LL(1) grammar. I'm having difficulties with this. Note: this is for
a school project and the grammar is not my choice. Thanks in advance
for any help. The grammar follows:
<program> ::= <explist>
<explist> ::= <exp> <explist> | E
<idlist> ::= ID <idlist> | E
<exp> ::= '(' ')'
| ID
| NUM
| '(' LAMBDA '(' <idlist> ')' <exp> ')'
| '(' DEFINE '(' ID <idlist> ')' <exp> ')'
| '(' IF <exp> <exp> <exp> ')'
| '(' <exp> <explist> ')'
note: E <=> epsilon
thanks in advance!!!
LL(1) grammar. I'm having difficulties with this. Note: this is for
a school project and the grammar is not my choice. Thanks in advance
for any help. The grammar follows:
<program> ::= <explist>
<explist> ::= <exp> <explist> | E
<idlist> ::= ID <idlist> | E
<exp> ::= '(' ')'
| ID
| NUM
| '(' LAMBDA '(' <idlist> ')' <exp> ')'
| '(' DEFINE '(' ID <idlist> ')' <exp> ')'
| '(' IF <exp> <exp> <exp> ')'
| '(' <exp> <explist> ')'
note: E <=> epsilon
thanks in advance!!!