-- MobParseTableImpl.mesa
-- Copyright Ó 1991 by Xerox Corporation. All rights reserved.
-- an NPGS production from MobTreeBuild.mesa, May 25, 1990 11:08:05 am PDT.
DIRECTORY MobParseTable;
MobParseTableImpl: CEDAR PROGRAM
EXPORTS MobParseTable
= { OPEN MobParseTable;
InitScanTable: PUBLIC PROC RETURNS [ScanTableRef] = {
tab: ScanTableRef ¬ NEW[ScanTable ¬ ALL[0]];
-- 94 entries
tab[54C] ¬ 3;
tab[56C] ¬ 13;
tab[72C] ¬ 5;
tab[73C] ¬ 4;
tab[75C] ¬ 7;
tab[133C] ¬ 10;
tab[135C] ¬ 9;
tab[137C] ¬ 6;
tab[173C] ¬ 12;
tab[175C] ¬ 11;
tab[176C] ¬ 8;
RETURN [tab];
};
InitHashTable: PUBLIC PROC RETURNS [HashTableRef] = {
null: VocabHashEntry = [0, 0];
tab: HashTableRef ¬ NEW[HashTable ¬ ALL[null]];
-- 50 entries
tab[1] ¬ [15, 0];
tab[2] ¬ [32, 0];
tab[3] ¬ [27, 0];
tab[4] ¬ [14, 48];
tab[6] ¬ [18, 0];
tab[10] ¬ [1, 0];
tab[11] ¬ [21, 0];
tab[12] ¬ [23, 49];
tab[13] ¬ [17, 0];
tab[16] ¬ [28, 0];
tab[20] ¬ [2, 0];
tab[25] ¬ [24, 0];
tab[27] ¬ [20, 0];
tab[31] ¬ [25, 0];
tab[33] ¬ [22, 0];
tab[34] ¬ [29, 0];
tab[42] ¬ [31, 0];
tab[44] ¬ [16, 0];
tab[45] ¬ [19, 0];
tab[48] ¬ [30, 0];
tab[49] ¬ [26, 0];
RETURN [tab];
};
InitIndexTable: PUBLIC PROC RETURNS [IndexTableRef] = {
tab: IndexTableRef ¬ NEW[IndexTable ¬ [
-- 34 entries
0, 2, 5, 6, 7, 8, 9, 10, 11, 12,
-- 10
13, 14, 15, 16, 25, 29, 33, 46, 52, 59,
-- 20
66, 73, 78, 86, 92, 99, 102, 106, 110, 115,
-- 30
119, 124, 127, 130]];
RETURN [tab];
};
InitVocabulary: PUBLIC PROC RETURNS [VocabularyRef] = {
i: CARDINAL ¬ 0;
appText: PROC [r: REF TEXT] = {
FOR k: NAT IN [0..r.length) DO tab[i+k] ¬ r[k]; ENDLOOP;
i ¬ i + r.length;
};
tab: VocabularyRef ¬ NEW[Vocabulary[130]];
-- 130 chars
-- 0
appText["idstr,;:←=~][}{.DIRECTORYFROMPACKCONFIGURATIONCONF"];
-- 50
appText["IGIMPORTSEXPORTSCONTROLBEGINREQUESTSSTATICDYNAMICE"];
-- 100
appText["NDPLUSTHENLINKSCODEFRAMEALLeof"];
tab.length ¬ i;
RETURN [tab];
};
InitProdData: PUBLIC PROC RETURNS [ProdDataRef] = {
i: CARDINAL ¬ 1;
lag: ProductionInfo ¬ [0, 0];
dup: PROC = {tab[i] ¬ lag; i ¬ i + 1};
appR: PROC [r: CARDINAL] = {lag.rule ¬ r; tab[i] ¬ lag; i ¬ i + 1};
appL: PROC [lhs: CARDINAL] = {lag.lhs ¬ lhs; tab[i] ¬ lag; i ¬ i + 1};
appRL: PROC [r, lhs: CARDINAL] = {tab[i] ¬ lag ¬ [r, lhs]; i ¬ i + 1};
tab: ProdDataRef ¬ NEW[ProdData ¬ ALL[lag]];
-- 60 entries
appL[2]; appRL[1, 3]; appRL[2, 4]; appR[27];
-- 5
appRL[3, 9]; appRL[4, 5]; appR[27]; appRL[5, 10]; appR[6];
-- 10
appRL[7, 6]; appRL[8, 7]; dup[]; appRL[9, 12]; appR[10];
-- 15
appR[11]; appRL[12, 13]; appR[27]; appRL[12, 19]; dup[];
-- 20
appL[22]; appR[26]; appRL[13, 17]; appR[27]; appRL[14, 23];
-- 25
appR[15]; appR[16]; appR[26]; dup[]; appRL[17, 24];
-- 30
appR[18]; appRL[19, 25]; appR[20]; appR[21]; appRL[22, 26];
-- 35
appR[23]; appRL[24, 11]; appR[25]; appRL[24, 27]; appR[25];
-- 40
appRL[26, 18]; dup[]; appL[21]; appR[28]; appR[29];
-- 45
appRL[27, 15]; appR[37]; appRL[27, 16]; appR[38]; appRL[28, 8];
-- 50
appR[29]; appRL[28, 20]; appR[29]; appRL[30, 14]; appR[31];
-- 55
appRL[32, 28]; appRL[33, 29]; appR[34]; appR[35]; appR[36]; RETURN [tab];
};
InitNStarts: PUBLIC PROC RETURNS [NStartsRef] = {
tab: NStartsRef ¬ NEW[NStarts ¬ [
-- 27 entries
0, 0, 26, 25, 24, 22, 21, 20, 18, 17,
-- 10
16, 0, 15, 1, 14, 13, 12, 11, 10, 2,
-- 20
9, 8, 7, 3, 6, 5, 4]];
RETURN [tab];
};
InitNLengths: PUBLIC PROC RETURNS [NLengthsRef] = {
tab: NLengthsRef ¬ NEW[NLengths ¬ [
-- 27 entries
0, 0, 1, 1, 1, 2, 1, 1, 2, 1,
-- 10
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
-- 20
1, 1, 1, 1, 1, 1, 1]];
RETURN [tab];
};
InitNSymbols: PUBLIC PROC RETURNS [NSymbolsRef] = {
tab: NSymbolsRef ¬ NEW[NSymbols ¬ [
-- 27 entries
9, 7, 11, 12, 13, 26, 14, 15, 26, 26,
-- 10
16, 17, 26, 27, 11, 18, 19, 21, 20, 26,
-- 20
12, 23, 24, 26, 11, 12, 12]];
RETURN [tab];
};
InitNActions: PUBLIC PROC RETURNS [NActionsRef] = {
i: CARDINAL ¬ 0;
dup: PROC = {tab[i] ¬ tab[i-1]; i ¬ i + 1};
app0: PROC [transition: CARDINAL] = {
tab[i] ¬ [[FALSE, 0], transition];
i ¬ i + 1;
};
app1: PROC [pLength: CARDINAL, transition: CARDINAL] = {
tab[i] ¬ [[FALSE, pLength], transition];
i ¬ i + 1;
};
app1t: PROC [transition: CARDINAL] = {
tab[i] ¬ [[FALSE, 1], transition];
i ¬ i + 1;
};
app2: PROC [pLength: CARDINAL, transition: CARDINAL] = {
tab[i] ¬ [[TRUE, pLength], transition];
i ¬ i + 1;
};
null: ActionEntry ¬ [[FALSE, 0], 0];
tab: NActionsRef ¬ NEW[NActions ¬ ALL[null]];
-- 27 entries
-- 0
app1[3, 50]; app0[41]; app0[37]; app0[26]; app0[24];
app1t[51]; app0[22]; app0[18]; app1[3, 52]; app1t[56];
app0[17]; app0[12]; app1[3, 58]; app0[54]; app0[55];
app0[57]; app1[11, 12]; app0[65]; app0[67]; app1t[51];
-- 20
app1[2, 26]; app1[3, 44]; app1[3, 24]; app0[73]; app0[75];
app1[4, 29]; app1[5, 30];
RETURN [tab];
};
InitNTDefaults: PUBLIC PROC RETURNS [NTDefaultsRef] = {
i: CARDINAL ¬ 2;
dup: PROC = {tab[i] ¬ tab[i-1]; i ¬ i + 1};
app0: PROC [transition: CARDINAL] = {
tab[i] ¬ [[FALSE, 0], transition];
i ¬ i + 1;
};
app1: PROC [pLength: CARDINAL, transition: CARDINAL] = {
tab[i] ¬ [[FALSE, pLength], transition];
i ¬ i + 1;
};
app1t: PROC [transition: CARDINAL] = {
tab[i] ¬ [[FALSE, 1], transition];
i ¬ i + 1;
};
app2: PROC [pLength: CARDINAL, transition: CARDINAL] = {
tab[i] ¬ [[TRUE, pLength], transition];
i ¬ i + 1;
};
null: ActionEntry ¬ [[FALSE, 0], 0];
tab: NTDefaultsRef ¬ NEW[NTDefaults ¬ ALL[null]];
-- 30 entries
i ¬ i + 1; app1[2, 1]; app0[70];
app0[61]; app0[13]; app1t[28]; app0[68]; app1t[49];
app0[59]; app0[52]; app0[28]; app0[29]; app0[34];
app0[40]; app0[45]; app0[51]; app0[10]; app1[11, 11];
-- 20
app0[32]; app0[62]; app0[63]; app1t[43]; app1t[27];
app0[72]; app0[7]; app0[48]; app0[20]; app0[42];
RETURN [tab];
};
InitTStarts: PUBLIC PROC RETURNS [TStartsRef] = {
tab: TStartsRef ¬ NEW[TStarts ¬ [
-- 79 entries
0, 0, 26, 26, 90, 89, 86, 75, 33, 68,
-- 10
66, 3, 59, 15, 9, 51, 55, 53, 47, 9,
-- 20
44, 33, 41, 26, 34, 33, 29, 31, 29, 34,
-- 30
28, 36, 38, 40, 41, 26, 43, 24, 22, 46,
-- 40
47, 21, 49, 51, 52, 53, 20, 19, 57, 18,
-- 50
16, 59, 13, 61, 62, 64, 12, 66, 68, 11,
-- 60
70, 10, 72, 74, 9, 79, 81, 84, 7, 6,
-- 70
4, 92, 95, 98, 3, 99, 101, 102, 1]];
RETURN [tab];
};
InitTLengths: PUBLIC PROC RETURNS [TLengthsRef] = {
tab: TLengthsRef ¬ NEW[TLengths ¬ [
-- 79 entries
0, 1, 2, 2, 2, 1, 3, 4, 1, 2,
-- 10
2, 1, 2, 1, 1, 1, 2, 2, 2, 1,
-- 20
2, 1, 2, 2, 2, 1, 2, 2, 2, 2,
-- 30
1, 2, 2, 1, 2, 2, 1, 2, 2, 1,
-- 40
2, 1, 2, 1, 1, 2, 1, 1, 2, 1,
-- 50
2, 2, 2, 1, 2, 2, 1, 2, 2, 1,
-- 60
2, 1, 2, 1, 1, 2, 3, 2, 2, 1,
-- 70
2, 3, 3, 1, 1, 2, 1, 1, 2]];
RETURN [tab];
};
InitTSymbols: PUBLIC PROC RETURNS [TSymbolsRef] = {
tab: TSymbolsRef ¬ NEW[TSymbols ¬ [
-- 103 entries
13, 14, 0, 1, 16, 0, 5, 3, 4, 1,
-- 10
0, 4, 15, 3, 0, 1, 16, 0, 2, 1,
-- 20
5, 13, 17, 18, 3, 0, 29, 0, 5, 19,
-- 30
0, 30, 31, 1, 20, 0, 5, 0, 3, 0,
-- 40
0, 24, 0, 1, 1, 32, 23, 25, 0, 3,
-- 50
0, 2, 23, 21, 0, 1, 32, 3, 0, 7,
-- 60
8, 2, 3, 0, 3, 0, 12, 22, 1, 10,
-- 70
5, 0, 4, 11, 6, 6, 10, 29, 0, 4,
-- 80
26, 1, 17, 18, 3, 9, 1, 10, 0, 1,
-- 90
1, 9, 5, 10, 0, 27, 28, 0, 10, 3,
-- 100
9, 1, 1]];
RETURN [tab];
};
InitTActions: PUBLIC PROC RETURNS [TActionsRef] = {
i: CARDINAL ¬ 0;
dup: PROC = {tab[i] ¬ tab[i-1]; i ¬ i + 1};
app0: PROC [transition: CARDINAL] = {
tab[i] ¬ [[FALSE, 0], transition];
i ¬ i + 1;
};
app1: PROC [pLength: CARDINAL, transition: CARDINAL] = {
tab[i] ¬ [[FALSE, pLength], transition];
i ¬ i + 1;
};
app1t: PROC [transition: CARDINAL] = {
tab[i] ¬ [[FALSE, 1], transition];
i ¬ i + 1;
};
app2: PROC [pLength: CARDINAL, transition: CARDINAL] = {
tab[i] ¬ [[TRUE, pLength], transition];
i ¬ i + 1;
};
null: ActionEntry ¬ [[FALSE, 0], 0];
tab: TActionsRef ¬ NEW[TActions ¬ ALL[null]];
-- 103 entries
-- 0
app0[78]; app0[74]; app2[0, 4]; app0[69]; app0[64];
app2[0, 7]; app0[56]; app0[11]; app1[3, 3]; app1t[36];
app2[0, 10]; app0[50]; app0[49]; app0[47]; app2[2, 8];
app0[46]; app0[19]; app2[2, 6]; app1[4, 5]; app1[3, 37];
-- 20
app0[38]; app1[5, 2]; app0[35]; app0[23]; app0[47];
app2[4, 9]; app0[30]; app2[0, 13]; app0[27]; app0[25];
app2[0, 17]; app1[3, 14]; app1[3, 15]; app0[31]; app0[33];
app2[0, 54]; app0[36]; app2[1, 34]; app0[21]; app2[2, 16];
-- 40
app2[0, 55]; app0[39]; app2[0, 45]; app1[3, 35]; app0[31];
app1t[57]; app0[43]; app0[44]; app2[0, 47]; app0[16];
app2[3, 53]; app1t[38]; app0[15]; app0[14]; app2[0, 23];
app0[31]; app1[3, 59]; app0[53]; app2[3, 46]; app1t[41];
-- 60
app1t[40]; app1[3, 39]; app0[53]; app2[3, 48]; app0[47];
app2[2, 22]; app0[58]; app0[9]; app0[60]; app0[8];
app0[66]; app2[1, 34]; app0[6]; app1[3, 19]; app0[5];
app2[1, 21]; app0[4]; app0[30]; app2[0, 13]; app0[6];
-- 80
app1[3, 18]; app1[3, 35]; app0[35]; app0[23]; app0[21];
app1[3, 20]; app0[60]; app0[8]; app2[2, 42]; app0[71];
app1t[36]; app0[3]; app0[36]; app2[1, 34]; app2[1, 31];
app0[76]; app0[77]; app2[3, 25]; app0[4]; app0[47];
-- 100
app0[2]; app1[3, 33]; app1[3, 32];
RETURN [tab];
};
}.