-- MobParseTable.mesa
-- Copyright Ó 1991 by Xerox Corporation. All rights reserved.
-- an NPGS production from MobTreeBuild.mesa, May 25, 1990 11:07:59 am PDT
MobParseTable: CEDAR DEFINITIONS = {
Symbol: TYPE = CARDINAL[0..255];
TSymbol: TYPE = Symbol[0..33];
NTSymbol: TYPE = Symbol[0..29];
-- Token indices for the scanner and parser
tokenID: TSymbol = 1;
tokenSTR: TSymbol = 2;
initialSymbol: TSymbol = 13;
defaultMarker: TSymbol = TSymbol.FIRST;
endMarker: TSymbol = TSymbol.LAST;
HashIndex: TYPE = CARDINAL[0..49];
VIndex: TYPE = CARDINAL[0..129];
VocabHashEntry: TYPE = RECORD [
symbol: TSymbol, -- symbol index
link: HashIndex]; -- link to next entry
State: TYPE = CARDINAL[0..78];
NTState: TYPE = State[0..26];
TIndex: TYPE = CARDINAL[0..102];
NTIndex: TYPE = CARDINAL[0..26];
Production: TYPE = CARDINAL[0..59];
Rule: TYPE = CARDINAL[0..38];
ActionTag: TYPE = RECORD [
reduce: BOOL, -- TRUE iff reduce entry
pLength: [0..15]]; -- number of symbols in production rhs
ActionEntry: TYPE = RECORD [
tag: ActionTag, -- [FALSE,0] if a shift entry
transition: [0..2047]]; -- production number / next state
ProductionInfo: TYPE = RECORD [
rule: Rule, -- reduction rule
lhs: NTSymbol]; -- production lhs symbol
ScanTable: TYPE = ARRAY CHAR['\040..'\177] OF TSymbol;
HashTable: TYPE = ARRAY HashIndex OF VocabHashEntry;
IndexTable: TYPE = ARRAY TSymbol OF CARDINAL;
Vocabulary: TYPE = TEXT;
ProdData: TYPE = ARRAY Production OF ProductionInfo;
NStarts: TYPE = ARRAY NTState OF NTIndex;
NLengths: TYPE = ARRAY NTState OF CARDINAL;
NSymbols: TYPE = ARRAY NTIndex OF NTSymbol;
NActions: TYPE = ARRAY NTIndex OF ActionEntry;
NTDefaults: TYPE = ARRAY NTSymbol OF ActionEntry;
TStarts: TYPE = ARRAY State OF TIndex;
TLengths: TYPE = ARRAY State OF CARDINAL;
TSymbols: TYPE = ARRAY TIndex OF TSymbol;
TActions: TYPE = ARRAY TIndex OF ActionEntry;
initialState: State = 1;
finalState: State = 0;
ScanTableRef: TYPE = REF ScanTable;
InitScanTable: PROC RETURNS [ScanTableRef];
HashTableRef: TYPE = REF HashTable;
InitHashTable: PROC RETURNS [HashTableRef];
IndexTableRef: TYPE = REF IndexTable;
InitIndexTable: PROC RETURNS [IndexTableRef];
VocabularyRef: TYPE = REF Vocabulary;
InitVocabulary: PROC RETURNS [VocabularyRef];
ProdDataRef: TYPE = REF ProdData;
InitProdData: PROC RETURNS [ProdDataRef];
NStartsRef: TYPE = REF NStarts;
InitNStarts: PROC RETURNS [NStartsRef];
NLengthsRef: TYPE = REF NLengths;
InitNLengths: PROC RETURNS [NLengthsRef];
NSymbolsRef: TYPE = REF NSymbols;
InitNSymbols: PROC RETURNS [NSymbolsRef];
NActionsRef: TYPE = REF NActions;
InitNActions: PROC RETURNS [NActionsRef];
NTDefaultsRef: TYPE = REF NTDefaults;
InitNTDefaults: PROC RETURNS [NTDefaultsRef];
TStartsRef: TYPE = REF TStarts;
InitTStarts: PROC RETURNS [TStartsRef];
TLengthsRef: TYPE = REF TLengths;
InitTLengths: PROC RETURNS [TLengthsRef];
TSymbolsRef: TYPE = REF TSymbols;
InitTSymbols: PROC RETURNS [TSymbolsRef];
TActionsRef: TYPE = REF TActions;
InitTActions: PROC RETURNS [TActionsRef];
}.