Next: Is the grammar G (or
Up: Elements of Answers for Exercise
Previous: Leftmost derivation and rightmost derivation
Yes, because of the production
E
E
S.
Observe that from G we see that E is a sequence of S's seperated by commas, with
at least one S. So we just need to swap E and S in the last rule
to remove the left recursivity.
S |
 |
 |
S |
 |
L |
L |
 |
() |
L |
 |
(E) |
E |
 |
S |
E |
 |
S , E |
Next: Is the grammar G (or
Up: Elements of Answers for Exercise
Previous: Leftmost derivation and rightmost derivation
Marc Moreno Maza
2004-12-01