next up previous index
Next: IN operator Up: Expressions Previous: Quantifiers

IS operator

IsExpression ::= Expression IS Identifier

The IS operator can be used to test the class membership of a non-terminal value.

For instance,

AnT IS Statement

will yield TRUE if AnT denotes a non-terminal value, of the Statement class or one of its derived-classes. It will return FALSE if AnT denotes a non-terminal value of another class; and will abort the script with an ad hoc error message if it does not denote a non-terminal value.

The SYS environment

provides primitives that can be used to check whether a given value is a non-terminal or not.