//File pmglobs.h #ifndef PMGLOBSH #define PMGLOBSH //enum boolean {FALSE,TRUE}; enum bool {false, true}; const STRSIZE=80; const LEVELOADDRSHIFT=2000; //input tokens: reserved words; token values, 0 to 34 enum intconst { BYrw, READrw, BOOLEANrw, PROGRAMrw, REFrw, DOrw, ODDrw, CHARrw, BEGINrw, THENrw, MODrw, ARRAYrw, RESULTrw, ORrw, FORrw, ENDrw, OFrw, ANDrw, NOTrw, TOrw, ELSErw, TRUErw, FALSErw, DECLARErw, FORWARDrw, FUNCTIONrw, WHILErw, CONSTrw, PROCEDURErw, INTEGERrw, ABSrw, IFrw, WRITELNrw, DIVrw, WRITErw, PUTrw, VARrw, idTOK=38, intTOK, endmark, //input tokens: specialsyinbols; 20 + token values, 0 to 16 semicolonTOK=50, periodTOK, commaTOK, lparenTOK, rparenTOK=54, plusTOK, minusTOK, multTOK, divTOK=58, equalTOK, assignTOK, colonTOK, greaterTOK=62, greatereqTOK, lessTOK, lesseqTOK, notequalTOK, andTOK, modTOK, //stack "s" syntactic symbols: nonteminals; 100 + Ist prod program=101, heading=102, progname=103, decs=104, moredeclists=106, declist=108, identlist=109, moreidents=110, type=112, funcs=114, subprogs=115, function=116, funcheading=117, paramlist=118, moreparams=120, body=122, morestmts=123, stmtlist=124, funcbody=125, stmt=130, condition=132, clist=133, expr=135, elist=136, term=139, tlist=140, factor=143, primary=145, funccall=151, arguments=153, relop=157, ident=163, unsignedint=164, //stack "s" syntactic symbols: terminals; 200s bottommark=200, false1, true1, lparen, rparen, assignment, semicolon, colon, then, else1=210, elsepart=211, dopart=212, doSYN, end, period, //stack "s" semantic symbols (along with JSR, PSH, & POP) //which represent quadruple operators; 300s haltop=300, assignop=301, read=302, put=303, write=304, writeln=305, moreargs=306, argument=307, literalstring=308, addop=310, subop=311, mulop=312, divop=313, modop=314, and=315, eqop=320, noteqop=321, lessop=322, greaterop=323, lesseqop=324, greateqop=325, not=326, odd=327, B=330, BF=331, JSR=332, RTN=333, ASP=340, FSP=341, PSH=342, POP=343, //stack "s" semantic symbols representing other actions; 360ff qnum=360, bool2, repair0, repair1, patch=364, adjustasp, integer, booleanSEM, idSEM, intSEM, falseSEM, trueSEM, initdecs, savevarinfo, incvcnt, initfunc, savefuncinfo, formalparam, initpcnt, fcallret, actualparam, saveproginfo, setlevel0, clearlevel1 }; #endif