- - - - - JUNK
LexerRec:
TYPE =
RECORD
[maxAtomLength: INTEGER, -- max length of identifiers. Default is 200
maxStringLength: INTEGER, -- max length of strings. Default is 200
chType: ARRAY CHAR OF CharType, -- described below
twoCharOps: LIST OF TwoCharOp -- list of two-character lexemes
stream: Stream, -- Source of characters to be broken into lexemes.
lex: Lexeme, -- current lexeme, the result of the most recent call to Lex
eof: BOOL, -- set by Lex when lexeme was not found.
buf: ROPE, -- contains the substring that lexed to lex
error: Rope.ROPE -- initially NIL, set to error message on lexical error
];
CharType:
TYPE = {letter, digit, blank, quote, op, invalid, other};
Identifiers must start with letter and continue with letters or digits;
blanks are ignored; quotes delimit strings; ops form one- or two-character
operators; invalids are invalid in any context; others are valid only inside strings.
TwoCharOp: TYPE = RECORD
[chars: RECORD [CHAR, CHAR],
atom: ATOM -- same two characters in atom form
];
Stream: TYPE = RECORD [pos: INT, rope: ROPE, len: INT]; -- fake character stream