SaffronCG2Impl.mesa
Copyright Ó 1987 by Xerox Corporation. All rights reserved.
Generated by BJackson.pa at April 27, 1987 10:56:53 pm PDT
using ThreeCasabaFour [1.1] of April 14, 1987 6:34:07 pm PDT
DIRECTORY
SaffronAG2Def,
SaffronAG8Def,
SaffronAG1Def,
SaffronAG7Def,
SaffronAG3Def,
SaffronAG6Def,
ThreeC4Support,
SaffronCG2Def USING[],
SaffronATDef;
SaffronCG2Impl: CEDAR PROGRAM IMPORTS SaffronAG2Def, SaffronAG8Def, SaffronAG1Def, SaffronAG7Def, SaffronAG3Def, SaffronAG6Def EXPORTS SaffronCG2Def=
BEGIN
OPEN SaffronAG2Def, SaffronAG8Def, SaffronAG1Def, SaffronAG7Def, SaffronAG3Def, SaffronAG6Def, ThreeC4Support, SaffronATDef;
SaffronCG2LinkProc: PUBLIC PROC[prodLinkArray: SeeProdLinkArray, tknLinkArray: TokenLinkArray] =
BEGIN
prodLinkArray[51] ← Seebounds;
prodLinkArray[52] ← Seecheckedempty;
prodLinkArray[53] ← Seecheckedchecked;
prodLinkArray[54] ← Seecheckedtrusted;
prodLinkArray[55] ← Seecheckedunchecked;
prodLinkArray[56] ← Seedefaulta;
prodLinkArray[57] ← Seedefaultempty;
prodLinkArray[58] ← SeepositionP;
prodLinkArray[59] ← Seeoptbitspresent;
prodLinkArray[60] ← Seeoptbitsabsent;
prodLinkArray[61] ← Seesumsum;
prodLinkArray[62] ← Seesumproduct;
prodLinkArray[63] ← Seeproductproduct;
prodLinkArray[64] ← Seeproductfactor;
prodLinkArray[65] ← Seemultoptimes;
prodLinkArray[66] ← Seemultopdivide;
prodLinkArray[67] ← Seemultopmod;
prodLinkArray[68] ← Seefactorunarysum;
prodLinkArray[69] ← Seefactorprimary;
prodLinkArray[70] ← Seeaddopplus;
prodLinkArray[71] ← Seeaddopminus;
prodLinkArray[72] ← Seereadonlyyes;
prodLinkArray[73] ← Seereadonlyno;
prodLinkArray[74] ← Seecatchany;
prodLinkArray[75] ← Seeintervalcc;
prodLinkArray[76] ← Seeintervaloc;
prodLinkArray[77] ← Seeintervalco;
prodLinkArray[78] ← Seeintervaloo;
prodLinkArray[79] ← Seeexpifthenelse;
prodLinkArray[80] ← Seeexpselect;
prodLinkArray[81] ← Seeexpassign;
prodLinkArray[82] ← Seeexpmultiassign;
prodLinkArray[83] ← Seeexperror;
prodLinkArray[84] ← Seeexptransfer;
prodLinkArray[85] ← Seeexpdisjunct;
prodLinkArray[86] ← Seecaseexplistempty;
prodLinkArray[87] ← Seecaseexplistb;
prodLinkArray[88] ← Seecaseexplistc;
prodLinkArray[89] ← SeecaseexplistPa;
prodLinkArray[90] ← SeecaseexplistPb;
prodLinkArray[91] ← Seecaseexpitem;
END;
Seebounds: PROC[nodes: LIST OF REF ANY, position: INT, length: INT]
RETURNS[LIST OF REF ANY] =
BEGIN
stack: LIST OF REF ANY ← nodes;
explower: ExpNode;
expupper: ExpNode;
expupper ← NARROW[stack.first];
stack ← stack.rest;
explower ← NARROW[stack.first];
stack ← stack.rest;
stack ← CONS[BuildBoundsProdNode[position, length, BuildBoundProdNode[explower.position, explower.length, explower], BuildBoundProdNode[expupper.position, expupper.length, expupper]], stack];
RETURN[stack]
END;
Seecheckedempty: PROC[nodes: LIST OF REF ANY, position: INT, length: INT]
RETURNS[LIST OF REF ANY] =
BEGIN
stack: LIST OF REF ANY ← nodes;
stack ← CONS[BuildCheckedemptyProdNode[position, length], stack];
RETURN[stack]
END;
Seecheckedchecked: PROC[nodes: LIST OF REF ANY, position: INT, length: INT]
RETURNS[LIST OF REF ANY] =
BEGIN
stack: LIST OF REF ANY ← nodes;
stack ← CONS[BuildCheckedcheckedProdNode[position, length], stack];
RETURN[stack]
END;
Seecheckedtrusted: PROC[nodes: LIST OF REF ANY, position: INT, length: INT]
RETURNS[LIST OF REF ANY] =
BEGIN
stack: LIST OF REF ANY ← nodes;
stack ← CONS[BuildCheckedtrustedProdNode[position, length], stack];
RETURN[stack]
END;
Seecheckedunchecked: PROC[nodes: LIST OF REF ANY, position: INT, length: INT]
RETURNS[LIST OF REF ANY] =
BEGIN
stack: LIST OF REF ANY ← nodes;
stack ← CONS[BuildCheckeduncheckedProdNode[position, length], stack];
RETURN[stack]
END;
Seedefaulta: PROC[nodes: LIST OF REF ANY, position: INT, length: INT]
RETURNS[LIST OF REF ANY] =
BEGIN
stack: LIST OF REF ANY ← nodes;
defaultopt: DefaultNode;
defaultopt ← NARROW[stack.first];
stack ← stack.rest;
stack ← CONS[defaultopt, stack];
RETURN[stack]
END;
Seedefaultempty: PROC[nodes: LIST OF REF ANY, position: INT, length: INT]
RETURNS[LIST OF REF ANY] =
BEGIN
stack: LIST OF REF ANY ← nodes;
stack ← CONS[BuildDefaultemptyProdNode[position, length], stack];
RETURN[stack]
END;
SeepositionP: PROC[nodes: LIST OF REF ANY, position: INT, length: INT]
RETURNS[LIST OF REF ANY] =
BEGIN
stack: LIST OF REF ANY ← nodes;
exp: ExpNode;
optbits: OptBitsNode;
optbits ← NARROW[stack.first];
stack ← stack.rest;
exp ← NARROW[stack.first];
stack ← stack.rest;
stack ← CONS[BuildPositionProdNode[position, length, exp, optbits], stack];
RETURN[stack]
END;
Seeoptbitspresent: PROC[nodes: LIST OF REF ANY, position: INT, length: INT]
RETURNS[LIST OF REF ANY] =
BEGIN
stack: LIST OF REF ANY ← nodes;
bounds: BoundsNode;
bounds ← NARROW[stack.first];
stack ← stack.rest;
stack ← CONS[BuildOptBitspresentProdNode[position, length, bounds], stack];
RETURN[stack]
END;
Seeoptbitsabsent: PROC[nodes: LIST OF REF ANY, position: INT, length: INT]
RETURNS[LIST OF REF ANY] =
BEGIN
stack: LIST OF REF ANY ← nodes;
stack ← CONS[BuildOptBitsabsentProdNode[position, length], stack];
RETURN[stack]
END;
Seesumsum: PROC[nodes: LIST OF REF ANY, position: INT, length: INT]
RETURNS[LIST OF REF ANY] =
BEGIN
stack: LIST OF REF ANY ← nodes;
sum: ExpNode;
addop: AddOpNode;
product: ExpNode;
product ← NARROW[stack.first];
stack ← stack.rest;
addop ← NARROW[stack.first];
stack ← stack.rest;
sum ← NARROW[stack.first];
stack ← stack.rest;
stack ← CONS[BuildExpsumProdNode[position, length, sum, addop, product], stack];
RETURN[stack]
END;
Seesumproduct: PROC[nodes: LIST OF REF ANY, position: INT, length: INT]
RETURNS[LIST OF REF ANY] =
BEGIN
stack: LIST OF REF ANY ← nodes;
product: ExpNode;
product ← NARROW[stack.first];
stack ← stack.rest;
stack ← CONS[product, stack];
RETURN[stack]
END;
Seeproductproduct: PROC[nodes: LIST OF REF ANY, position: INT, length: INT]
RETURNS[LIST OF REF ANY] =
BEGIN
stack: LIST OF REF ANY ← nodes;
product: ExpNode;
multop: MultOpNode;
factor: ExpNode;
factor ← NARROW[stack.first];
stack ← stack.rest;
multop ← NARROW[stack.first];
stack ← stack.rest;
product ← NARROW[stack.first];
stack ← stack.rest;
stack ← CONS[BuildExpproductProdNode[position, length, product, multop, factor], stack];
RETURN[stack]
END;
Seeproductfactor: PROC[nodes: LIST OF REF ANY, position: INT, length: INT]
RETURNS[LIST OF REF ANY] =
BEGIN
stack: LIST OF REF ANY ← nodes;
factor: ExpNode;
factor ← NARROW[stack.first];
stack ← stack.rest;
stack ← CONS[factor, stack];
RETURN[stack]
END;
Seemultoptimes: PROC[nodes: LIST OF REF ANY, position: INT, length: INT]
RETURNS[LIST OF REF ANY] =
BEGIN
stack: LIST OF REF ANY ← nodes;
stack ← CONS[BuildMultOptimesProdNode[position, length], stack];
RETURN[stack]
END;
Seemultopdivide: PROC[nodes: LIST OF REF ANY, position: INT, length: INT]
RETURNS[LIST OF REF ANY] =
BEGIN
stack: LIST OF REF ANY ← nodes;
stack ← CONS[BuildMultOpdivideProdNode[position, length], stack];
RETURN[stack]
END;
Seemultopmod: PROC[nodes: LIST OF REF ANY, position: INT, length: INT]
RETURNS[LIST OF REF ANY] =
BEGIN
stack: LIST OF REF ANY ← nodes;
stack ← CONS[BuildMultOpmodProdNode[position, length], stack];
RETURN[stack]
END;
Seefactorunarysum: PROC[nodes: LIST OF REF ANY, position: INT, length: INT]
RETURNS[LIST OF REF ANY] =
BEGIN
stack: LIST OF REF ANY ← nodes;
addop: AddOpNode;
primary: ExpNode;
primary ← NARROW[stack.first];
stack ← stack.rest;
addop ← NARROW[stack.first];
stack ← stack.rest;
stack ← CONS[BuildExpunarysumProdNode[position, length, addop, primary], stack];
RETURN[stack]
END;
Seefactorprimary: PROC[nodes: LIST OF REF ANY, position: INT, length: INT]
RETURNS[LIST OF REF ANY] =
BEGIN
stack: LIST OF REF ANY ← nodes;
primary: ExpNode;
primary ← NARROW[stack.first];
stack ← stack.rest;
stack ← CONS[primary, stack];
RETURN[stack]
END;
Seeaddopplus: PROC[nodes: LIST OF REF ANY, position: INT, length: INT]
RETURNS[LIST OF REF ANY] =
BEGIN
stack: LIST OF REF ANY ← nodes;
stack ← CONS[BuildAddOpplusProdNode[position, length], stack];
RETURN[stack]
END;
Seeaddopminus: PROC[nodes: LIST OF REF ANY, position: INT, length: INT]
RETURNS[LIST OF REF ANY] =
BEGIN
stack: LIST OF REF ANY ← nodes;
stack ← CONS[BuildAddOpminusProdNode[position, length], stack];
RETURN[stack]
END;
Seereadonlyyes: PROC[nodes: LIST OF REF ANY, position: INT, length: INT]
RETURNS[LIST OF REF ANY] =
BEGIN
stack: LIST OF REF ANY ← nodes;
stack ← CONS[BuildReadOnlyyesProdNode[position, length], stack];
RETURN[stack]
END;
Seereadonlyno: PROC[nodes: LIST OF REF ANY, position: INT, length: INT]
RETURNS[LIST OF REF ANY] =
BEGIN
stack: LIST OF REF ANY ← nodes;
stack ← CONS[BuildReadOnlynoProdNode[position, length], stack];
RETURN[stack]
END;
Seecatchany: PROC[nodes: LIST OF REF ANY, position: INT, length: INT]
RETURNS[LIST OF REF ANY] =
BEGIN
stack: LIST OF REF ANY ← nodes;
statement: StatementNode;
statement ← NARROW[stack.first];
stack ← stack.rest;
stack ← CONS[BuildCatchAnypresentProdNode[position, length, statement], stack];
RETURN[stack]
END;
Seeintervalcc: PROC[nodes: LIST OF REF ANY, position: INT, length: INT]
RETURNS[LIST OF REF ANY] =
BEGIN
stack: LIST OF REF ANY ← nodes;
bounds: BoundsNode;
bounds ← NARROW[stack.first];
stack ← stack.rest;
stack ← CONS[BuildIntervalccProdNode[position, length, bounds], stack];
RETURN[stack]
END;
Seeintervaloc: PROC[nodes: LIST OF REF ANY, position: INT, length: INT]
RETURNS[LIST OF REF ANY] =
BEGIN
stack: LIST OF REF ANY ← nodes;
bounds: BoundsNode;
bounds ← NARROW[stack.first];
stack ← stack.rest;
stack ← CONS[BuildIntervalocProdNode[position, length, bounds], stack];
RETURN[stack]
END;
Seeintervalco: PROC[nodes: LIST OF REF ANY, position: INT, length: INT]
RETURNS[LIST OF REF ANY] =
BEGIN
stack: LIST OF REF ANY ← nodes;
bounds: BoundsNode;
bounds ← NARROW[stack.first];
stack ← stack.rest;
stack ← CONS[BuildIntervalcoProdNode[position, length, bounds], stack];
RETURN[stack]
END;
Seeintervaloo: PROC[nodes: LIST OF REF ANY, position: INT, length: INT]
RETURNS[LIST OF REF ANY] =
BEGIN
stack: LIST OF REF ANY ← nodes;
bounds: BoundsNode;
bounds ← NARROW[stack.first];
stack ← stack.rest;
stack ← CONS[BuildIntervalooProdNode[position, length, bounds], stack];
RETURN[stack]
END;
Seeexpifthenelse: PROC[nodes: LIST OF REF ANY, position: INT, length: INT]
RETURNS[LIST OF REF ANY] =
BEGIN
stack: LIST OF REF ANY ← nodes;
expcond: ExpNode;
expthenpart: ExpNode;
expelsepart: ExpNode;
expelsepart ← NARROW[stack.first];
stack ← stack.rest;
expthenpart ← NARROW[stack.first];
stack ← stack.rest;
expcond ← NARROW[stack.first];
stack ← stack.rest;
stack ← CONS[BuildExpifthenelseProdNode[position, length, expcond, expthenpart, expelsepart], stack];
RETURN[stack]
END;
Seeexpselect: PROC[nodes: LIST OF REF ANY, position: INT, length: INT]
RETURNS[LIST OF REF ANY] =
BEGIN
stack: LIST OF REF ANY ← nodes;
casehead: SelectHeadNode;
caseexplist: SelectExpListNode;
exp: ExpNode;
exp ← NARROW[stack.first];
stack ← stack.rest;
caseexplist ← NARROW[stack.first];
stack ← stack.rest;
casehead ← NARROW[stack.first];
stack ← stack.rest;
stack ← CONS[BuildExpselectProdNode[position, length, casehead, caseexplist, exp], stack];
RETURN[stack]
END;
Seeexpassign: PROC[nodes: LIST OF REF ANY, position: INT, length: INT]
RETURNS[LIST OF REF ANY] =
BEGIN
stack: LIST OF REF ANY ← nodes;
lhs: ExpNode;
exp: ExpNode;
exp ← NARROW[stack.first];
stack ← stack.rest;
lhs ← NARROW[stack.first];
stack ← stack.rest;
stack ← CONS[BuildExpassignProdNode[position, length, lhs, exp], stack];
RETURN[stack]
END;
Seeexpmultiassign: PROC[nodes: LIST OF REF ANY, position: INT, length: INT]
RETURNS[LIST OF REF ANY] =
BEGIN
stack: LIST OF REF ANY ← nodes;
explist: ExpListNode;
exp: ExpNode;
exp ← NARROW[stack.first];
stack ← stack.rest;
explist ← NARROW[stack.first];
stack ← stack.rest;
stack ← CONS[BuildExpmultiassignProdNode[position, length, explist, exp], stack];
RETURN[stack]
END;
Seeexperror: PROC[nodes: LIST OF REF ANY, position: INT, length: INT]
RETURNS[LIST OF REF ANY] =
BEGIN
stack: LIST OF REF ANY ← nodes;
stack ← CONS[BuildExperrorProdNode[position, length], stack];
RETURN[stack]
END;
Seeexptransfer: PROC[nodes: LIST OF REF ANY, position: INT, length: INT]
RETURNS[LIST OF REF ANY] =
BEGIN
stack: LIST OF REF ANY ← nodes;
transferop: TransferOpNode;
lhs: ExpNode;
lhs ← NARROW[stack.first];
stack ← stack.rest;
transferop ← NARROW[stack.first];
stack ← stack.rest;
stack ← CONS[BuildExptransferProdNode[position, length, transferop, lhs], stack];
RETURN[stack]
END;
Seeexpdisjunct: PROC[nodes: LIST OF REF ANY, position: INT, length: INT]
RETURNS[LIST OF REF ANY] =
BEGIN
stack: LIST OF REF ANY ← nodes;
disjunct: ExpNode;
disjunct ← NARROW[stack.first];
stack ← stack.rest;
stack ← CONS[disjunct, stack];
RETURN[stack]
END;
Seecaseexplistempty: PROC[nodes: LIST OF REF ANY, position: INT, length: INT]
RETURNS[LIST OF REF ANY] =
BEGIN
stack: LIST OF REF ANY ← nodes;
stack ← CONS[BuildSelectExpListemptyProdNode[position, length], stack];
RETURN[stack]
END;
Seecaseexplistb: PROC[nodes: LIST OF REF ANY, position: INT, length: INT]
RETURNS[LIST OF REF ANY] =
BEGIN
stack: LIST OF REF ANY ← nodes;
caseexplistP: SelectExpListNode;
caseexplistP ← NARROW[stack.first];
stack ← stack.rest;
stack ← CONS[caseexplistP, stack];
RETURN[stack]
END;
Seecaseexplistc: PROC[nodes: LIST OF REF ANY, position: INT, length: INT]
RETURNS[LIST OF REF ANY] =
BEGIN
stack: LIST OF REF ANY ← nodes;
caseexplistP: SelectExpListNode;
caseexplistP ← NARROW[stack.first];
stack ← stack.rest;
stack ← CONS[caseexplistP, stack];
RETURN[stack]
END;
SeecaseexplistPa: PROC[nodes: LIST OF REF ANY, position: INT, length: INT]
RETURNS[LIST OF REF ANY] =
BEGIN
stack: LIST OF REF ANY ← nodes;
caseexpitem: SelectExpItemNode;
caseexpitem ← NARROW[stack.first];
stack ← stack.rest;
stack ← CONS[BuildSelectExpListmoreProdNode[position, length, BuildSelectExpListemptyProdNode[caseexpitem.position, caseexpitem.position - caseexpitem.length], caseexpitem], stack];
RETURN[stack]
END;
SeecaseexplistPb: PROC[nodes: LIST OF REF ANY, position: INT, length: INT]
RETURNS[LIST OF REF ANY] =
BEGIN
stack: LIST OF REF ANY ← nodes;
caseexplistP: SelectExpListNode;
caseexpitem: SelectExpItemNode;
caseexpitem ← NARROW[stack.first];
stack ← stack.rest;
caseexplistP ← NARROW[stack.first];
stack ← stack.rest;
stack ← CONS[BuildSelectExpListmoreProdNode[position, length, caseexplistP, caseexpitem], stack];
RETURN[stack]
END;
Seecaseexpitem: PROC[nodes: LIST OF REF ANY, position: INT, length: INT]
RETURNS[LIST OF REF ANY] =
BEGIN
stack: LIST OF REF ANY ← nodes;
caselabel: SelectLabelNode;
exp: ExpNode;
exp ← NARROW[stack.first];
stack ← stack.rest;
caselabel ← NARROW[stack.first];
stack ← stack.rest;
stack ← CONS[BuildSelectExpItemProdNode[position, length, caselabel, exp], stack];
RETURN[stack]
END;
END..