JunoParseTable.mesa (was ParseTable.mesa)
Coded September 6, 1982 12:25 am
Last Edited by: Gnelson, August 24, 1983 10:30 pm
Last Edited by: Stolfi March 13, 1984 3:19:36 am PST

DIRECTORY Atom;

ParseTable: DEFINITIONS

=

BEGIN

Handle: TYPE = REF HandleRep;

HandleRep: TYPE = RECORD [foo: INT ← 0];

NewHandle: PROC RETURNS [Handle];

Enter: PROC [h: Handle, p: Properties];
sets h(p.name) := p; h(p.alias) := p; these fields must be ATOMs

Search: PROC[h: Handle, a: REF ANY, default: Properties] RETURNS [Properties];
returns h(a), unless this is undefined, in which case returns default
-- typically called with default = NIL.

Properties: TYPE = REF PRec;

PRec: TYPE = RECORD
[name: ATOM,
alias: REF ANYNIL, -- should be an ATOM or NIL.
closer: Properties ← NIL,
infix: BOOLFALSE,
prefix: BOOLFALSE,
postfix: BOOLFALSE,
matchfix: BOOLFALSE,
subfix: BOOLFALSE,
busfix: BOOLFALSE,
closefix: BOOLFALSE,
bindingPower: INT ← 0,
identifier: BOOLFALSE,
unparserType: INT ← 0];
The name should be the atom whose pname is the preferred representation for the operator; it will be used by the unparser. The alias field should be nil or else an atom whose pname is an alternate way of typing the operator; this is to allow typing english names for operators that have no keys, such as "forall" or "and". The unparserType is explained in JunoUnparserImpl.mesa

END.