next up previous
Next: The attrib statement Up: Avoiding conflicts in the parser Previous: Avoiding conflicts in the parser

Rules of the form A $ \longmapsto$ id

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 $ \longmapsto$ id
or by
RightValue $ \longmapsto$ ArithmeticExpression
ArithmeticExpression $ \longmapsto$ E
E $ \longmapsto$ T
T $ \longmapsto$ F
F $ \longmapsto$ 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 $ \longmapsto$ id
since we have also
ActualParameter $ \longmapsto$ ArithmeticExpression
which covers the case where an actual parameter is a variable.


next up previous
Next: The attrib statement Up: Avoiding conflicts in the parser Previous: Avoiding conflicts in the parser
Marc Moreno Maza
2004-12-01