Next: The attrib statement
Up: Avoiding conflicts in the parser
Previous: Avoiding conflicts in the parser
A simple statement like
x := a
could be generated before by several different syntax trees.
Indeed the sentential form a could be produced by
RightValue |
|
id |
or by
RightValue |
|
ArithmeticExpression |
ArithmeticExpression |
|
E |
E |
|
T |
T |
|
F |
F |
|
id |
This ambiguity has been suppressed by forbidding the first case.
See how
RightValue is defined now.
Similarly, the following rule has been removed
ActualParameter |
|
id |
since we have also
ActualParameter |
|
ArithmeticExpression |
which covers the case where an actual parameter is a variable.
Next: The attrib statement
Up: Avoiding conflicts in the parser
Previous: Avoiding conflicts in the parser
Marc Moreno Maza
2004-12-01