next up previous
Next: MethodCall was superfluous Up: Avoiding conflicts in the parser Previous: Rules of the form A

The attrib statement

The word attrib is a keyword. Indeed, we want to make sure that the programmer starts the implementation of a domain by defining the representation of the elements of this domain. This is why we have a rule:
AttribStatement $ \longmapsto$ attrib ( FormalParameterSequence )
We also want attrib to be a reserved word, with its own token. Therefore, it is convenient to have a rule for an attrib call, that is when we create an element of the actual class.
ElementCreation $ \longmapsto$ attrib ( ActualParameterSequence )
In addition, we need to say that an ElementCreation is a statement:
Statement $ \longmapsto$ ElementCreation


next up previous
Next: MethodCall was superfluous Up: Avoiding conflicts in the parser Previous: Rules of the form A
Marc Moreno Maza
2004-12-01