LL Grammars with e-rules: Introduction
Simplification of this part:
A
X1
X2
Xn
…
Rule r:
A ® X1X2...Xn
a
x
S
y
Why e-rules?
•elimination of the
left recursion introduces e-rule
•e-rules often make
the language specification clearer
Assume
that every input string of tokens ends with $.
Note: $
acts as an end marker.
Main problem with e-rules:
e
e
…
e
Maybe: a Ï First(A):
14/57
Note:
We must define other sets: Empty, Follow and Predict.