Previous: Indications, Up: PreDefOps
An operator is represented by a unique definition table key. Properties of the operator are stored as properties of that key. Operators are related to operator indications.
PreDefOpr(`ind',`opr',`sig') specifies an operator
and relates it to an operator indication.
That operator indication might or might not be associated with a literal
terminal symbol of the source grammar:
Two PreDefOpr invocations with the same `opr' values are not
allowed.
Associating several operators with the same indication is legal
(see Overloaded Indications and Procedures).
Here is a specification for Mystery:
PreDefOpr(PlusInd, iAddOp, (intType,intType): intType)
PreDefOpr(GrtrInd, iGtrOp, (intType,intType): boolType)
PreDefOpr(AndInd, bAndOp, (boolType,boolType):boolType)
iAddOp, iGtrOp, and bAndOp are automatically defined
as known keys by the module.
No further specification is necessary.