Next: Programs
Up: The ALLCOT syntax
Previous: Statements
Here is a grammar for the arithmetic expressions
and boolean expressions of ALLCOT.
|
ArithmeticExpression |
 |
E |
| E |
 |
E + T |
| E |
 |
E - T |
| E |
 |
T rem T |
| E |
 |
T |
| T |
 |
T * F |
| T |
 |
F |
| F |
 |
( E ) |
| F |
 |
num |
| F |
 |
id |
| F |
 |
AttributeCall |
|
BooleanExpression |
 |
B |
| B |
 |
E = E |
| B |
 |
E
E |
| B |
 |
E E |
| B |
 |
E E |
| B |
 |
B and B |
| B |
 |
B or B |
| B |
 |
( B ) |
| B |
 |
not B |
| B |
 |
AttributeCall |
The meaning of operators +, -, rem, *, =,
,
, and, or and not are as usual.
The operator
stands for the different predicate.
The terminal num stands for integer values.
Next: Programs
Up: The ALLCOT syntax
Previous: Statements
Marc Moreno Maza
2004-12-01