Contents | Prev | Next | Index
The syntax of expressions specifies operator precedences according to four classes of operators. The not-operator ~ or NOT has the highest binding strength, followed by multiplication operators, addition operators, and finally relations. Operators of the same binding strength associate from left to right. For example, x-y-z stands for (x-y)-z. Some of the operators are only available when the language extensions are enabled via a compiler switch or directive. They are shown in red in the following grammar description.
expr ::= simple_expr relation
simple_expr ::= simple_expr simple_expr ::= simple_expr add_operator term ::= term ::= unary term term ::= term mul_operator factor ::= factor factor ::= <character> ::= <integer> ::= <real> ::= <string> ::= set ::= designator ::= func_designator actual_parameters ::= ( expr ) ::= not factor set ::= set_specifier { elem_list } ::= set_specifier { } set_specifier ::= qualident ::= <empty> elem_list ::= elem_list , elem ::= elem elem ::= elem_expr .. elem_expr ::= elem_expr elem_expr ::= expr func_designator ::= designator
relation ::= =
add_operator ::= +
mul_operator ::= *
unary ::= +
not ::= NOT |
Contents | Prev | Next | Index
Canterbury Modula-2 for Java (Last documentation update
Feb 8, 2000)
Copyright © 1998 Mill Hill &
Canterbury Corporation, Ltd. All rights reserved
Please send any comments or corrections to
mhc@webcom.com