next up previous
Next: Arithmetic and boolean expressions Up: The ALLCOT syntax Previous: Defining a domain

Statements

We give now a grammar for generating statements of the ALLCOT language.
AttribStatement $ \longmapsto$ attrib ( FormalParameterSequence )
Statement $ \longmapsto$ Assignment
Statement $ \longmapsto$ Alternative
Statement $ \longmapsto$ WhileLoop
Statement $ \longmapsto$ RightValue
Statement $ \longmapsto$ error
Statement $ \longmapsto$ return RightValue
Statement $ \longmapsto$ ElementCreation
Assignment $ \longmapsto$ LeftValue := RightValue
LeftValue $ \longmapsto$ id
LeftValue $ \longmapsto$ id : Type
LeftValue $ \longmapsto$ AttributeCall
RightValue $ \longmapsto$ FunctionCall
RightValue $ \longmapsto$ ArithmeticExpression
RightValue $ \longmapsto$ BooleanExpression
AttributeCall $ \longmapsto$ id $ \bf\cdot$id
FunctionCall $ \longmapsto$ id ( ActualParameterSequence )
ElementCreation $ \longmapsto$ attrib ( ActualParameterSequence )
ActualParameterSequence $ \longmapsto$ ActualParameter
ActualParameterSequence $ \longmapsto$ $ \varepsilon$
ActualParameterSequence $ \longmapsto$ ActualParameter , MoreParamters
MoreParamters $ \longmapsto$ ActualParameter
MoreParamters $ \longmapsto$ ActualParameter , MoreParamters
ActualParameter $ \longmapsto$ ArithmeticExpression
Alternative $ \longmapsto$ if Test then IfTrue else IfFalse
Alternative $ \longmapsto$ if Test then IfTrue
Test $ \longmapsto$ BooleanExpression
IfTrue $ \longmapsto$ { StatementSequence }
IfFalse $ \longmapsto$ { StatementSequence }
WhileLoop $ \longmapsto$ while Test repeat IfTrue


next up previous
Next: Arithmetic and boolean expressions Up: The ALLCOT syntax Previous: Defining a domain
Marc Moreno Maza
2004-12-01