head     56.3;
access   paws bayes jws quist brad dew jwh;
symbols  ;
locks    ; strict;
comment  @# @;


56.3
date     93.01.27.13.33.02;  author jwh;  state Exp;
branches ;
next     56.2;

56.2
date     93.01.27.12.09.36;  author jwh;  state Exp;
branches ;
next     56.1;

56.1
date     91.11.05.09.30.53;  author jwh;  state Exp;
branches ;
next     55.2;

55.2
date     91.09.26.12.10.48;  author jwh;  state Exp;
branches ;
next     55.1;

55.1
date     91.08.25.10.08.54;  author jwh;  state Exp;
branches ;
next     54.1;

54.1
date     91.03.18.15.16.50;  author jwh;  state Exp;
branches ;
next     53.1;

53.1
date     91.03.11.19.17.26;  author jwh;  state Exp;
branches ;
next     52.1;

52.1
date     91.02.19.09.02.37;  author jwh;  state Exp;
branches ;
next     51.1;

51.1
date     91.01.30.16.01.46;  author jwh;  state Exp;
branches ;
next     50.1;

50.1
date     90.10.29.16.15.22;  author jwh;  state Exp;
branches ;
next     49.1;

49.1
date     90.08.14.14.03.41;  author jwh;  state Exp;
branches ;
next     48.1;

48.1
date     90.07.26.11.09.28;  author jwh;  state Exp;
branches ;
next     47.1;

47.1
date     90.05.14.10.47.08;  author dew;  state Exp;
branches ;
next     46.1;

46.1
date     90.05.07.08.35.18;  author jwh;  state Exp;
branches ;
next     45.1;

45.1
date     90.04.19.15.42.12;  author jwh;  state Exp;
branches ;
next     44.1;

44.1
date     90.04.01.22.00.05;  author jwh;  state Exp;
branches ;
next     43.1;

43.1
date     90.03.20.13.49.57;  author jwh;  state Exp;
branches ;
next     42.1;

42.1
date     90.01.23.17.35.22;  author jwh;  state Exp;
branches ;
next     41.1;

41.1
date     89.12.22.11.17.40;  author jwh;  state Exp;
branches ;
next     40.2;

40.2
date     89.12.11.08.33.37;  author jwh;  state Exp;
branches ;
next     40.1;

40.1
date     89.09.29.11.40.36;  author jwh;  state Exp;
branches ;
next     39.1;

39.1
date     89.09.26.16.25.56;  author dew;  state Exp;
branches ;
next     38.1;

38.1
date     89.08.29.11.16.23;  author jwh;  state Exp;
branches ;
next     37.1;

37.1
date     89.05.12.11.29.33;  author dew;  state Exp;
branches ;
next     36.1;

36.1
date     89.02.06.10.08.37;  author dew;  state Exp;
branches ;
next     35.1;

35.1
date     89.02.02.13.20.05;  author dew;  state Exp;
branches ;
next     34.1;

34.1
date     89.01.23.15.55.23;  author jwh;  state Exp;
branches ;
next     33.1;

33.1
date     89.01.16.11.30.37;  author dew;  state Exp;
branches ;
next     32.1;

32.1
date     89.01.10.11.36.44;  author bayes;  state Exp;
branches ;
next     31.1;

31.1
date     88.12.14.17.57.37;  author bayes;  state Exp;
branches ;
next     30.1;

30.1
date     88.12.09.13.35.52;  author dew;  state Exp;
branches ;
next     29.1;

29.1
date     88.10.31.15.19.59;  author bayes;  state Exp;
branches ;
next     28.1;

28.1
date     88.10.06.10.49.25;  author dew;  state Exp;
branches ;
next     27.1;

27.1
date     88.09.29.11.15.04;  author bayes;  state Exp;
branches ;
next     26.1;

26.1
date     88.09.28.12.31.00;  author bayes;  state Exp;
branches ;
next     25.1;

25.1
date     88.03.02.09.09.22;  author bayes;  state Exp;
branches ;
next     24.1;

24.1
date     87.08.31.09.18.43;  author jws;  state Exp;
branches ;
next     23.1;

23.1
date     87.08.26.09.55.29;  author bayes;  state Exp;
branches ;
next     22.1;

22.1
date     87.08.17.10.35.41;  author bayes;  state Exp;
branches ;
next     21.1;

21.1
date     87.08.12.13.23.32;  author bayes;  state Exp;
branches ;
next     20.1;

20.1
date     87.07.30.10.33.47;  author bayes;  state Exp;
branches ;
next     19.1;

19.1
date     87.06.01.07.52.13;  author jws;  state Exp;
branches ;
next     18.1;

18.1
date     87.05.20.14.46.49;  author bayes;  state Exp;
branches ;
next     17.1;

17.1
date     87.04.30.10.04.31;  author jws;  state Exp;
branches ;
next     16.1;

16.1
date     87.04.26.15.18.58;  author jws;  state Exp;
branches ;
next     15.1;

15.1
date     87.04.13.08.44.17;  author jws;  state Exp;
branches ;
next     14.1;

14.1
date     87.04.01.14.40.09;  author jws;  state Exp;
branches ;
next     13.1;

13.1
date     87.02.28.18.07.09;  author jws;  state Exp;
branches ;
next     12.1;

12.1
date     87.02.02.12.53.25;  author jws;  state Exp;
branches ;
next     11.1;

11.1
date     87.01.19.09.20.16;  author jws;  state Exp;
branches ;
next     10.1;

10.1
date     86.12.24.10.26.26;  author jws;  state Exp;
branches ;
next     9.1;

9.1
date     86.12.12.13.48.45;  author bayes;  state Exp;
branches ;
next     8.1;

8.1
date     86.11.27.11.23.57;  author jws;  state Exp;
branches ;
next     7.1;

7.1
date     86.11.20.13.10.12;  author hal;  state Exp;
branches ;
next     6.1;

6.1
date     86.11.04.17.12.03;  author paws;  state Exp;
branches ;
next     5.1;

5.1
date     86.10.28.16.00.57;  author hal;  state Exp;
branches ;
next     4.1;

4.1
date     86.09.30.19.13.50;  author hal;  state Exp;
branches ;
next     3.1;

3.1
date     86.09.01.11.25.56;  author hal;  state Exp;
branches ;
next     2.1;

2.1
date     86.07.30.14.17.04;  author hal;  state Exp;
branches ;
next     1.1;

1.1
date     86.06.30.13.38.46;  author danm;  state tmp;
branches ;
next     ;


desc
@Base file for PWS 3.2 release.

@


56.3
log
@
pws2rcs automatic delta on Wed Jan 27 13:14:25 MST 1993
@
text
@			{file GLOBALS}

			       (*BASIC SYMBOLS*)

SYMBOLS = (IDENT,COMMA,COLON,SEMICOLON,LPARENT,
	  RPARENT,DOSY,TOSY,DOWNTOSY,ENDSY,
	  UNTILSY,OFSY,THENSY,ELSESY,BECOMES,
	  LBRACK,RBRACK,ARROW,PERIOD,BEGINSY,
	  IFSY,CASESY,REPEATSY,WHILESY,FORSY,
	  WITHSY,GOTOSY,LABELSY,CONSTSY,TYPESY,
	  VARSY,PROCSY,FUNCSY,PROGSY,INTCONST,
	  REALCONST,STRINGCONST,NOTSY,MULOP,
	  ADDOP,RELOP,SETSY,PACKEDSY,ARRAYSY,
	  RECORDSY,FILESY,modulesy,importsy,
	  exportsy,implmtsy,othrwisesy,rangesy,
	  dollarsy,OTHERSY,
	  {*****  MODCAL SYMBOLS  *****}
	  FORWARDSY,externlsy,trysy,recoversy,
	  anyvarsy);

OPERATOR = (MUL,RDIV,ANDOP,IDIV,IMOD,PLUS,MINUS,
	    OROP,LTOP,LEOP,GEOP,GTOP,NEOP,EQOP,
	    INOP,NOOP);

SETOFSYS = SET OF SYMBOLS;

optionlist = (emptyop,aliasop,allowpacked,ansiop,callabsop,
	      ccifop,ccendop,codeop,copyrightop,
	      debugop,defop,floatop,heapdisposeop,
	      inclop,iochkop,linesop,listop,
	      numop,modcalop,overlayop,
	      overlaysizeop,ovlfchkop,pageop,
	      pagewidthop,partevalop,PCop,
	      rangeop,refop,saveop,searchsizeop,
	      searchop,stackchkop,strposop,
	      sysprogop,tablesop,ucsdop,warnop,illegal);

optionarraytype =
	   array[optionlist] of string[optnsize];

listswitch = (listnone,listerronly,listfull);
termtype = (normal,abort);

infolist = (predeclared,mustinitialize,
	    cantassign,nonstandard,
	    modcalreq,sysprogreq,ucsdreq);

infobits = set of infolist;

CURSRANGE = 0..MAXCURSOR;
SYMBUFARRAY = PACKED ARRAY [CURSRANGE] OF CHAR;

			    (*DATA STRUCTURES*)

BITRANGE = 0..BITSPERWORD;
LEVRANGE = 0..MAXPLEVEL; DISPRANGE = 0..DISPLIMIT;

dope = record
	 loboundid,hiboundid: ctp;
       end;

dopeptr = ^dope;

STRUCTFORM = (SCALAR,SUBRANGE,reals,POINTER,
	      prok,funk,POWER,cnfarrays,ARRAYS,substring,
	      RECORDS,FILES,TAGFLD,VARIANT);

varlab = record
	   lo,hi: integer;
	 end;

DECLKIND = (STANDARD,DECLARED,SPECIAL);

STRUCTURE =
   RECORD
     unpacksize: addrrange;
     align: shortint;
     sizeoflo: boolean;
     ispackable: boolean;
     bitsize: bitrange;
     signbit: boolean;
     info: infobits;     {Modcal characteristics}
     CASE FORM: STRUCTFORM OF
       SCALAR:
	(CASE SCALKIND: DECLKIND OF
	   DECLARED:
	     (FCONST: CTP;
	      enumlbl: reflistptr;
	      next: stp) );
       SUBRANGE: (RANGETYPE: STP; MIN,MAX: integer);
       prok,funk:(params: ctp; parmlc: addrrange);
       POINTER:  (ELTYPE: STP);
       POWER:    (ELSET: STP;
$if bigsets$
				setmin, setmax : integer
$end$
$if not bigsets$
			 setmin,setmax: shortint
$end$
							);

       cnfarrays,
       ARRAYS:   (AELTYPE,INXTYPE: STP;
		  cnf_index : dopeptr;             { only used for cnfarrays }
		  case AISPACKD: BOOLEAN of
		    false: (AELSIZE: addrrange;
			    strucwaspackd: boolean);
		    true:  (AELBITSIZE: bitrange;
		      CASE AISSTRNG: BOOLEAN OF
			TRUE: (MAXLENG: 0..STRGLGTH)));
       substring: ();
       RECORDS:  (FSTFLD: CTP; RECVAR: STP);
       FILES:    (FILTYPE: STP);
       TAGFLD:   (TAGFIELDP: CTP; FSTVAR: STP;
		  hasfixedpart: boolean);
       VARIANT:  (NXTVAR,SUBVAR: STP; VARVAL: varlab; vflds: ctp);
     END;

	(*Predeclared procedures and functions*)

spkeys =
 (spabs,spsqr,spchr,spodd,spord,spround,sptrunc,
  splength,spstrlen,spstrmax,sppred,spsucc,
  sphex,spoctal,spbinary,spnew,spdispose,
  spaddr,spsizeof,spcall,spclose,spwrite,
  spwriteln,spread,spreadln,spreaddir,
  spwritedir,spstrwrite,spstrread,spreset,
  sprewrite,spopen,spappend,spseek,spposition,
  spmaxpos,splinepos,sppage,spprompt,spoverprint,
  speoln,speof,sppack,spunpack,sphalt,
  spunitread,spunitwrite,spblockread,
  spblockwrite,spsetstrlen,spconcat,
  spstrmove,spmoveleft,spmoveright,spscan,
  spgotoxy,spfillchar,
   {Preceding are SPECIAL, rest are STANDARD}
  spmark,sprelease,spescape,spesccode,
  spget,spput,spsin,spcos,spexp,
  spln,spsqrt,sparctan,spmemavail,spnewwords,
  spdelete,spinsert,spcopy,sppos,
  spltrim,sprtrim,spstrrpt,
 {**** the following HP 'clone' string routines
      must be grouped together with current
     'first' and 'last' for analysis and codegen}
   spstrdelete,spstrinsert,spstr,spstrpos,
   spstrappend,
 {****}
  spunitclear,spunitbusy,spunitwait);

			   (*NAMES (reprise) *)

IDCLASS = (TYPES,KONST,VARS,FIELD,PROX,FUNC,ROUTINEPARM);
SETOFIDS = SET OF IDCLASS;
vartype = (shortvar,longvar,relvar,localvar,
	   valparm,cvalparm,refparm,anyvarparm,
	   strparm,procparm,funcparm,boundparm,dopeparm);

IDENTIFIER =
   RECORD
     namep: alphaptr; LLINK, RLINK: CTP;
     IDTYPE: STP; NEXT: CTP;
     info: infobits;
     CASE KLASS: IDCLASS OF
       KONST:
	 (VALUES: valu);
       ROUTINEPARM,
       VARS:
	 (VLEV: LEVRANGE; VADDR: ADDRRANGE;
	  globalptr: alphaptr;
	  case VTYPE: vartype of
	    cvalparm: (VPTRADDR: ADDRRANGE);
	    shortvar,longvar,relvar:
	      (absaddr: valu);
	    procparm,funcparm: (proktype: stp);
	    dopeparm: (firstparm: ctp));
       FIELD:
	 (FLDADDR: ADDRRANGE;
	  CASE FISPACKD: BOOLEAN OF
	    TRUE: (FLDFBIT: BITRANGE);
	    false: (strucwaspackd: boolean) );
       PROX,
       FUNC:
	 (CASE PFDECKIND: DECLKIND OF
	     SPECIAL,STANDARD:
	       (SPKEY: spkeys);
	     DECLARED:
	       (PFLEV: LEVRANGE;
		alias: boolean;
		othername: alphaptr;
		paramlc: ADDRRANGE;
		FORWDECL,extdecl,isrefed,
		isexported,isdumped,inscope: BOOLEAN;
		location : addrrange; {rel addr}
		exit_location: addrrange;
		forwid: shortint; { used to make a forward proc unique }
		case idclass of
		  prox: (ismodulebody: boolean);
		  func: (pfaddr: addrrange;
			  assignedto: boolean)
		)
	 )
     END;

DISPLAYSCOPE =
  (RECORDscope,MODULEscope,BLOCKscope,WITHscope);


			   (*LABELS*)
LABELP = ^ USERLABEL;
USERLABEL =
  RECORD
    LABVAL: shortint;  {user's label number}
    NEXTLAB: LABELP;   {link to next label in block}
    defined: boolean;  {label has been seen on a stmt}
    isrefed: boolean;  {label has been used}
    labrefs: reflistptr; {refs to this label}
    nonlocalref: boolean; {target of a nonlocal goto}
    staticlevel: levrange;
    location: addrrange;  {relative location in the codefile}
    isnlrefed: boolean; {a nonlocal ref has been seen (in code gen)}
    uniquelabid: shortint; {used in conjunction with isnlrefed}
    try_level : integer;  { JWH 9/26/91 }
    END;

			      (* Modules *)

modstateptr = ^modulestaterec;
modinfoptr = ^moduleinforec;

modulestaterec = record        {Describes one instance of a module}
	modinfo: modinfoptr;   {link to module's inforec}
	defineids: ctp;        {tree of IDs defined in this instance}
	nextmodule,            {link in list containing this state}
	defmodule,             {list of modules in my define section}
	contmodule:            {previous instance of this module}
	  modstateptr;
	end;

moduleinforec = record         {Describes a module}
	modinitbody: ctp;
	laststate: modstateptr;{last instance}
	needscall,             {module body called?}
	isimplemented: boolean;{concrete def'n seen?}
	impmodule,
	usemodule: modstateptr;{modules USEd by me}
	modulefwptr,           {used to implement dangling pointers}
	useids: ctp;           {IDs USEd by me}
	curindefine: boolean;  {within my define section?}
	{ ** Housekeeping info ** }
	{these fields save global variables between instances}
	{of a module; they are NOT valid within it.}
	svffile: ctp;
	svLC: addrrange;
	end;

			    (* Expressions *)

exptr = ^expr;
stptr = ^stmt;
elistptr = ^explist;

explist = record
	    nextptr: elistptr;
	    case (* <set element> *) boolean of
	      false: (expptr: exptr);
	      true:  (lowptr,hiptr: exptr)
	    end;

exprkind = (cnst,vrbl,xpr);

exprs =
  (eqnode,nenode,ltnode,lenode,gtnode,
   genode,innode,subsetnode,supersetnode,unionnode,
   diffnode,intersectnode,addnode,subnode,mulnode,
   divnode,modnode,shftnode,ornode,andnode,
   negnode,notnode,floatnode,derfnode,bufnode,
   absnode,chrnode,oddnode,ordnode,succnode,
   prednode,strlennode,strmaxnode,roundnode,sqrnode,
   truncnode,idnode,subscrnode,concatnode,substrnode,
   selnnode,unqualfldnode,litnode,fcallnode,setdenonode);

expr = record
  ekind: exprkind;
  etyptr: stp;
  $IF FULLDUMP$
  echain: exptr;
  enum: shortint;            (* for printing tree *)
  $END$
  attr: attrptr;
  num_ops: shortint;   { Number of operands below this point in the tree }
  case eclass: exprs of
    eqnode,nenode,ltnode,lenode,gtnode,
    genode,innode,subsetnode,supersetnode,
    unionnode,diffnode,intersectnode,
    concatnode,addnode,subnode,mulnode,
    divnode,modnode,shftnode,ornode,andnode:
      (opnd1,opnd2: exptr);
    negnode,notnode,floatnode,derfnode,bufnode,
    absnode,chrnode,oddnode,ordnode,succnode,
    prednode,strlennode,strmaxnode,roundnode,
    sqrnode,truncnode:
      (opnd: exptr);
    idnode:
      (symptr: ctp);
    subscrnode,substrnode:
      (arayp,indxp: exptr;
       case exprs of
	 substrnode: (lengthp: exptr) );
    selnnode:
      (recptr: exptr; fieldptr: ctp);
    unqualfldnode:
      (withstptr: stptr; fieldref: ctp);
    litnode:
      (litval: valu);
    fcallnode:
      (fptr: ctp; actualp: elistptr);
    setdenonode:
      (setcstpart: valu; setvarpart: elistptr);
  end (*expr*);

			     (* Statements *)

clabptr = ^clabrec;                {CASE statement labels}
clabrec = record
	    temptr,                {links labels of same stmt}
	    clabp: clabptr;        {links all labels in CASE, in order}
	    cstmt: stptr;          {stmt labelled by this label}
	    lowval,hival: integer; {label value(s)}
	    end;

stmts = (becomest,pcallst,casest,compndst,forst,
	 gotost,ifst,repst,tryst,whilest,
	 withst,emptyst,endofbodyst);

stmt  = record
	  next: stptr;
	  lineno: integer;
	  sflags: packed record
		    rangecheck,shortcircuit,
		      iocheck,ovflcheck: boolean;
		    callmode: callmodetype;
		    end;
	  $IF FULLDUMP$
	  snum: shortint;           (* for printing tree *)
	  $END$
	  labp: labelp;             (* user label for stmt *)
	  tablelist: reflistptr;    (* used only if member of a CASE *)
	  refcount: shortint;       (* used only if member of a CASE *)
	  case sclass: stmts of
	    becomest: (lhs,rhs: exptr);
	    pcallst:  (psymptr: ctp;
		       actualp: elistptr);
	    casest:   (selecter: exptr;
		       maxlab,minlab: clabptr;
		       firstmt, otherwyse: stptr;
		       nrlabs, nrstmts: shortint);
	    compndst: (cbody: stptr);
	    forst:    (ctrl,init,limit: exptr;
		       incr: shortint; fbody: stptr);
	    gotost:   (target: labelp);
	    ifst:     (ifcond: exptr;
		       tru,fals: stptr);
	    repst,
	    whilest:  (rcond: exptr;
		       rbody: stptr);
	    tryst:    (tbody,recov: stptr);
	    withst:   (wbody: stptr; refexpr: exptr; refbit: addrrange);
	    emptyst,
	    endofbodyst:()
	  end (*stmt*);

DISPLAYFRAME = RECORD
	  FNAME: CTP;
	  CASE OCCUR: DISPLAYscope OF
	    BLOCKscope,MODULEscope:
		       (FFILE: CTP;
			FLABEL: LABELP;
			FMODULE,
			available_module: MODSTATEPTR);
	    WITHscope: (wnodeptr: stptr);
	    END;

structnodeptr = ^structnodetype;
structnodetype = record
		   sp: stp;
		   val: valu;
		   next: structnodeptr;
		 end;

floatoptype = (flt_on, flt_off, flt_test);

fkind = (norml,specil);

searchlisttype = array[1..maxint] of fid;

string10 = string[10];
string15 = string[15];

overlaylisttype = array[1..maxint] of string15;

sourceinfotype = array[1..maxinfiles] of
  record
    oldsymblk,oldfilepos,oldrelinum: integer;
    oldsymcursor,oldlinestart: cursrange;
    filename: fid;
    oldftype: fkind;
  end;

  { declarations for module header }
const
  fixedpart = 142; { bytes }
type
  module_directory = packed record
    date:      daterec;        {date of creation}
    revision:  daterec;        {producer's revision date number}
    producer:  char;           {C = compiler}
    system_id: 0..255;         {not used}
    notice: string[80];        {whatever comments may be desired}
    directory_size: integer;   {size of module directory,in bytes}
    module_size: integer;      {total size of module, in bytes}
    executable:       boolean; {module is executable,
				       has start address}
    relocatable_size: integer; {relocatable bytes requested}
    relocatable_base: integer; {current origin relocatable code}
    global_size:      integer; {number of global bytes requested}
    global_base:      integer; {A5 relative origin of global area}

    ext_block,            {module relative block of EXT table}
    ext_size,             {size of EXT table, in bytes}
    def_block,            {module relative block of DEF table}
    def_size,             {size of DEF table, in bytes}
    source_block,         {module relative block of DEFINE SOURCE}
    source_size,          {size of source, in bytes}

    text_records:     integer;  {number of TEXT records}
    morebytes:        packed array[0..(255-fixedpart)] of byt;
  end;

(*--------------------------------------------------------------------*)

VAR
						(* Scanner *)

				    (* These 4 vars MUST be in this order *)
				    (* for IDSEARCH !! *)
    SYMCURSOR: CURSRANGE;           (*CURRENT SCANNING INDEX IN SYMBUF*)
    SY: SYMBOLS;                    (*SYMBOL FOUND BY INSYMBOL*)
    OP: OPERATOR;                   (*CLASSIFICATION OF LAST OPERATOR SYMBOL*)
    ID: ALPHA;                      (*LAST IDENTIFIER FOUND*)

    symbuf: symbufarray;
    symblk: integer;                (* LAST BLOCK READ *)
    filepos: INTEGER;                   (* Next block in source file*)
    LINESTART: CURSRANGE;               (* Index into SYMBUF*)
    ftype: fkind;
    srcindex: 1..maxinfiles;            (* Top of SOURCEINFO stack*)
    sourceinfoptr: ^sourceinfotype;


    VAL: valu;                      (*VALUE OF LAST CONSTANT*)
    LGTH: INTEGER;                  (*LENGTH OF LAST STRING CONSTANT*)
    uminus: boolean;                (*if previous symbol was unary minus*)

					       (* Compiler-OS interface *)

    systemglobals: alpha;
    sysglobalptr: alphaptr;

		       (* Allocation control *)

    LC,LCMAX:ADDRRANGE;             (* LOCATION COUNTER *)

				    (*SWITCHES*)

    PRTERR,GRANGECHECK,gshortcircuit,DEBUGGING,
    UCSD,MODCAL,stdpasc,sysprog,aliasok,
    GIOCHECK,govflcheck,switch_strpos,
    gstackcheck,BPTONLINE,tables,putcode,
    saveconst,DP,oldDP,syntxerr,warn,
    listabort,list_option_L,
    beforefirsttoken,listPC,heapdispose,
    sawkeyboard,sawlisting,strpos_warn,
    sawinput,sawoutput: BOOLEAN;
    allow_packed : boolean;
    temp_put : boolean;

    float: floatoptype;

    gcopyright: string[80];

    timestring: string[8];

    float_flag: string[8];

    refilesize,defilesize: integer;
    refvolname,defvolname: string[vidleng+1];  { allow for ':' }

    gcallmode: callmodetype;
    aliasptr: alphaptr;

    initial_heap: anyptr;

    inbody,                         (*Parsing in executable code *)
    indefinesection: boolean;       (*Parsing in define section of a module *)

    INTPTR,shortintptr,REALPTR,     (*Pointers to standard type nodes*)
    CHAR_PTR,BOOLPTR,anyptrptr,cant_deref,
    anyfileptr,TEXTPTR,STRGPTR: STP;

    ioresultptr,
    keyboardptr,listingptr,
    inputptr,outputptr: CTP;        (*Pointers to standard variable nodes*)

						(* Trees *)

    curexp: exptr;                  (*points to current expression*)
    $IF FULLDUMP$
    firstexp,lastexp: exptr;        (*'echain' list of expressions*)
    sctr,ectr: shortint;            (* for tree printout *)
    $END$

						(* Symbol table *)

    LEVEL,levelatstart: LEVRANGE;   (*CURRENT STATIC LEVEL*)
    display_ok_to_import,
    TOP: DISPRANGE;                 (*TOP OF DISPLAY*)

    disdef: record {describes type id being defined}
	      level: -1..displimit;
	      id: alphaptr;
	      end;

    DISX: -1..displimit;            (*LEVEL OF LAST ID FOUND BY SEARCHID*)
    gstate,gcurstate: modstateptr;  (*MODULE of last id found by SEARCHID*)
    sysinfo: infobits;              (*info for structures and identifiers*)

    DISPLAY: ARRAY [DISPRANGE] OF DISPLAYFRAME;

    structconstlist: structnodeptr;

    UTYPPTR,UCSTPTR,UVARPTR,
    UFLDPTR,UPRCPTR,UFCTPTR: CTP;   (*POINTERS TO UNDECLARED IDS*)

    OUTERBLOCK,                     (*PROCEDURE RECORD FOR OUTER BLOCK*)
    FWPTR: CTP;                     (*LIST OF FORWARD REFERENCED TYPE IDS*)

						(* Listing *)

    LIST,initlistmode,gtemplist: listswitch;
    gtemplinenumber,linenumber,     (* line no for listing/breakpoints *)
    totalwarnings,
    totalerrors,
    relinum,                        (* relative line no in current input file *)
    lasterrln,
    SCREENDOTS,                     (* number of lines seen so far *)
    STARTDOTS: INTEGER;
    todaysdate: string[9];          (* date in form dd-mmm-yy *)
    linelevel,linlevatstart: shortint;

    maxoverlays,maxsearchfiles,
    searchfilestop,overlaytop: shortint;
    overlaylistptr: ^overlaylisttype;
    searchlistptr: ^searchlisttype;
    modulectp: ctp;

    globaldate: daterec;
    globaltime: timerec;
    curglobalname,gnamep,currentglobal: alphaptr;
    importexportext,idinimport: boolean;
    symbolstart: cursrange;

    CONSTBEGSYS,SIMPTYPEBEGSYS,TYPEBEGSYS,
    BLOCKBEGSYS,modulebegsys,SELECTSYS,
    FACBEGSYS,STATBEGSYS,TYPEDELS: SETOFSYS;

    power_table: array[0..bitsperword-2] of integer;

    uniquenum: shortint;

    save_escape: integer;
    save_ioresult: shortint;
    gen_error: boolean;

    body_try_level : integer;     { JWH 9/26/91 }
    parsing_try_level : integer;  { JWH 9/26/91 }
(*--------------------------------------------------------------------*)

CONST

  optionarray = optionarraytype
    ['','ALIAS','ALLOW_PACKED','ANSI','CALLABS','IF','END',
     'CODE','COPYRIGHT','DEBUG','DEF','FLOAT_HDW',
     'HEAP_DISPOSE','INCLUDE','IOCHECK','LINES',
     'LIST','LINENUM','MODCAL','OVERLAY',
     'OVERLAY_SIZE','OVFLCHECK','PAGE',
     'PAGEWIDTH','PARTIAL_EVAL','CODE_OFFSETS',
     'RANGE','REF','SAVE_CONST','SEARCH_SIZE',
     'SEARCH','STACKCHECK','SWITCH_STRPOS',
     'SYSPROG','TABLES','UCSD','WARN',''];

@


56.2
log
@
pws2rcs automatic delta on Wed Jan 27 11:57:27 MST 1993
@
text
@d1 599
@


56.1
log
@Automatic bump of revision number for PWS version 3.25
@
text
@a0 599
			{file GLOBALS}

			       (*BASIC SYMBOLS*)

SYMBOLS = (IDENT,COMMA,COLON,SEMICOLON,LPARENT,
	  RPARENT,DOSY,TOSY,DOWNTOSY,ENDSY,
	  UNTILSY,OFSY,THENSY,ELSESY,BECOMES,
	  LBRACK,RBRACK,ARROW,PERIOD,BEGINSY,
	  IFSY,CASESY,REPEATSY,WHILESY,FORSY,
	  WITHSY,GOTOSY,LABELSY,CONSTSY,TYPESY,
	  VARSY,PROCSY,FUNCSY,PROGSY,INTCONST,
	  REALCONST,STRINGCONST,NOTSY,MULOP,
	  ADDOP,RELOP,SETSY,PACKEDSY,ARRAYSY,
	  RECORDSY,FILESY,modulesy,importsy,
	  exportsy,implmtsy,othrwisesy,rangesy,
	  dollarsy,OTHERSY,
	  {*****  MODCAL SYMBOLS  *****}
	  FORWARDSY,externlsy,trysy,recoversy,
	  anyvarsy);

OPERATOR = (MUL,RDIV,ANDOP,IDIV,IMOD,PLUS,MINUS,
	    OROP,LTOP,LEOP,GEOP,GTOP,NEOP,EQOP,
	    INOP,NOOP);

SETOFSYS = SET OF SYMBOLS;

optionlist = (emptyop,aliasop,allowpacked,ansiop,callabsop,
	      ccifop,ccendop,codeop,copyrightop,
	      debugop,defop,floatop,heapdisposeop,
	      inclop,iochkop,linesop,listop,
	      numop,modcalop,overlayop,
	      overlaysizeop,ovlfchkop,pageop,
	      pagewidthop,partevalop,PCop,
	      rangeop,refop,saveop,searchsizeop,
	      searchop,stackchkop,strposop,
	      sysprogop,tablesop,ucsdop,warnop,illegal);

optionarraytype =
	   array[optionlist] of string[optnsize];

listswitch = (listnone,listerronly,listfull);
termtype = (normal,abort);

infolist = (predeclared,mustinitialize,
	    cantassign,nonstandard,
	    modcalreq,sysprogreq,ucsdreq);

infobits = set of infolist;

CURSRANGE = 0..MAXCURSOR;
SYMBUFARRAY = PACKED ARRAY [CURSRANGE] OF CHAR;

			    (*DATA STRUCTURES*)

BITRANGE = 0..BITSPERWORD;
LEVRANGE = 0..MAXPLEVEL; DISPRANGE = 0..DISPLIMIT;

dope = record
	 loboundid,hiboundid: ctp;
       end;

dopeptr = ^dope;

STRUCTFORM = (SCALAR,SUBRANGE,reals,POINTER,
	      prok,funk,POWER,cnfarrays,ARRAYS,substring,
	      RECORDS,FILES,TAGFLD,VARIANT);

varlab = record
	   lo,hi: integer;
	 end;

DECLKIND = (STANDARD,DECLARED,SPECIAL);

STRUCTURE =
   RECORD
     unpacksize: addrrange;
     align: shortint;
     sizeoflo: boolean;
     ispackable: boolean;
     bitsize: bitrange;
     signbit: boolean;
     info: infobits;     {Modcal characteristics}
     CASE FORM: STRUCTFORM OF
       SCALAR:
	(CASE SCALKIND: DECLKIND OF
	   DECLARED:
	     (FCONST: CTP;
	      enumlbl: reflistptr;
	      next: stp) );
       SUBRANGE: (RANGETYPE: STP; MIN,MAX: integer);
       prok,funk:(params: ctp; parmlc: addrrange);
       POINTER:  (ELTYPE: STP);
       POWER:    (ELSET: STP;
$if bigsets$
				setmin, setmax : integer
$end$
$if not bigsets$
			 setmin,setmax: shortint
$end$
							);

       cnfarrays,
       ARRAYS:   (AELTYPE,INXTYPE: STP;
		  cnf_index : dopeptr;             { only used for cnfarrays }
		  case AISPACKD: BOOLEAN of
		    false: (AELSIZE: addrrange;
			    strucwaspackd: boolean);
		    true:  (AELBITSIZE: bitrange;
		      CASE AISSTRNG: BOOLEAN OF
			TRUE: (MAXLENG: 0..STRGLGTH)));
       substring: ();
       RECORDS:  (FSTFLD: CTP; RECVAR: STP);
       FILES:    (FILTYPE: STP);
       TAGFLD:   (TAGFIELDP: CTP; FSTVAR: STP;
		  hasfixedpart: boolean);
       VARIANT:  (NXTVAR,SUBVAR: STP; VARVAL: varlab; vflds: ctp);
     END;

	(*Predeclared procedures and functions*)

spkeys =
 (spabs,spsqr,spchr,spodd,spord,spround,sptrunc,
  splength,spstrlen,spstrmax,sppred,spsucc,
  sphex,spoctal,spbinary,spnew,spdispose,
  spaddr,spsizeof,spcall,spclose,spwrite,
  spwriteln,spread,spreadln,spreaddir,
  spwritedir,spstrwrite,spstrread,spreset,
  sprewrite,spopen,spappend,spseek,spposition,
  spmaxpos,splinepos,sppage,spprompt,spoverprint,
  speoln,speof,sppack,spunpack,sphalt,
  spunitread,spunitwrite,spblockread,
  spblockwrite,spsetstrlen,spconcat,
  spstrmove,spmoveleft,spmoveright,spscan,
  spgotoxy,spfillchar,
   {Preceding are SPECIAL, rest are STANDARD}
  spmark,sprelease,spescape,spesccode,
  spget,spput,spsin,spcos,spexp,
  spln,spsqrt,sparctan,spmemavail,spnewwords,
  spdelete,spinsert,spcopy,sppos,
  spltrim,sprtrim,spstrrpt,
 {**** the following HP 'clone' string routines
      must be grouped together with current
     'first' and 'last' for analysis and codegen}
   spstrdelete,spstrinsert,spstr,spstrpos,
   spstrappend,
 {****}
  spunitclear,spunitbusy,spunitwait);

			   (*NAMES (reprise) *)

IDCLASS = (TYPES,KONST,VARS,FIELD,PROX,FUNC,ROUTINEPARM);
SETOFIDS = SET OF IDCLASS;
vartype = (shortvar,longvar,relvar,localvar,
	   valparm,cvalparm,refparm,anyvarparm,
	   strparm,procparm,funcparm,boundparm,dopeparm);

IDENTIFIER =
   RECORD
     namep: alphaptr; LLINK, RLINK: CTP;
     IDTYPE: STP; NEXT: CTP;
     info: infobits;
     CASE KLASS: IDCLASS OF
       KONST:
	 (VALUES: valu);
       ROUTINEPARM,
       VARS:
	 (VLEV: LEVRANGE; VADDR: ADDRRANGE;
	  globalptr: alphaptr;
	  case VTYPE: vartype of
	    cvalparm: (VPTRADDR: ADDRRANGE);
	    shortvar,longvar,relvar:
	      (absaddr: valu);
	    procparm,funcparm: (proktype: stp);
	    dopeparm: (firstparm: ctp));
       FIELD:
	 (FLDADDR: ADDRRANGE;
	  CASE FISPACKD: BOOLEAN OF
	    TRUE: (FLDFBIT: BITRANGE);
	    false: (strucwaspackd: boolean) );
       PROX,
       FUNC:
	 (CASE PFDECKIND: DECLKIND OF
	     SPECIAL,STANDARD:
	       (SPKEY: spkeys);
	     DECLARED:
	       (PFLEV: LEVRANGE;
		alias: boolean;
		othername: alphaptr;
		paramlc: ADDRRANGE;
		FORWDECL,extdecl,isrefed,
		isexported,isdumped,inscope: BOOLEAN;
		location : addrrange; {rel addr}
		exit_location: addrrange;
		forwid: shortint; { used to make a forward proc unique }
		case idclass of
		  prox: (ismodulebody: boolean);
		  func: (pfaddr: addrrange;
			  assignedto: boolean)
		)
	 )
     END;

DISPLAYSCOPE =
  (RECORDscope,MODULEscope,BLOCKscope,WITHscope);


			   (*LABELS*)
LABELP = ^ USERLABEL;
USERLABEL =
  RECORD
    LABVAL: shortint;  {user's label number}
    NEXTLAB: LABELP;   {link to next label in block}
    defined: boolean;  {label has been seen on a stmt}
    isrefed: boolean;  {label has been used}
    labrefs: reflistptr; {refs to this label}
    nonlocalref: boolean; {target of a nonlocal goto}
    staticlevel: levrange;
    location: addrrange;  {relative location in the codefile}
    isnlrefed: boolean; {a nonlocal ref has been seen (in code gen)}
    uniquelabid: shortint; {used in conjunction with isnlrefed}
    try_level : integer;  { JWH 9/26/91 }
    END;

			      (* Modules *)

modstateptr = ^modulestaterec;
modinfoptr = ^moduleinforec;

modulestaterec = record        {Describes one instance of a module}
	modinfo: modinfoptr;   {link to module's inforec}
	defineids: ctp;        {tree of IDs defined in this instance}
	nextmodule,            {link in list containing this state}
	defmodule,             {list of modules in my define section}
	contmodule:            {previous instance of this module}
	  modstateptr;
	end;

moduleinforec = record         {Describes a module}
	modinitbody: ctp;
	laststate: modstateptr;{last instance}
	needscall,             {module body called?}
	isimplemented: boolean;{concrete def'n seen?}
	impmodule,
	usemodule: modstateptr;{modules USEd by me}
	modulefwptr,           {used to implement dangling pointers}
	useids: ctp;           {IDs USEd by me}
	curindefine: boolean;  {within my define section?}
	{ ** Housekeeping info ** }
	{these fields save global variables between instances}
	{of a module; they are NOT valid within it.}
	svffile: ctp;
	svLC: addrrange;
	end;

			    (* Expressions *)

exptr = ^expr;
stptr = ^stmt;
elistptr = ^explist;

explist = record
	    nextptr: elistptr;
	    case (* <set element> *) boolean of
	      false: (expptr: exptr);
	      true:  (lowptr,hiptr: exptr)
	    end;

exprkind = (cnst,vrbl,xpr);

exprs =
  (eqnode,nenode,ltnode,lenode,gtnode,
   genode,innode,subsetnode,supersetnode,unionnode,
   diffnode,intersectnode,addnode,subnode,mulnode,
   divnode,modnode,shftnode,ornode,andnode,
   negnode,notnode,floatnode,derfnode,bufnode,
   absnode,chrnode,oddnode,ordnode,succnode,
   prednode,strlennode,strmaxnode,roundnode,sqrnode,
   truncnode,idnode,subscrnode,concatnode,substrnode,
   selnnode,unqualfldnode,litnode,fcallnode,setdenonode);

expr = record
  ekind: exprkind;
  etyptr: stp;
  $IF FULLDUMP$
  echain: exptr;
  enum: shortint;            (* for printing tree *)
  $END$
  attr: attrptr;
  num_ops: shortint;   { Number of operands below this point in the tree }
  case eclass: exprs of
    eqnode,nenode,ltnode,lenode,gtnode,
    genode,innode,subsetnode,supersetnode,
    unionnode,diffnode,intersectnode,
    concatnode,addnode,subnode,mulnode,
    divnode,modnode,shftnode,ornode,andnode:
      (opnd1,opnd2: exptr);
    negnode,notnode,floatnode,derfnode,bufnode,
    absnode,chrnode,oddnode,ordnode,succnode,
    prednode,strlennode,strmaxnode,roundnode,
    sqrnode,truncnode:
      (opnd: exptr);
    idnode:
      (symptr: ctp);
    subscrnode,substrnode:
      (arayp,indxp: exptr;
       case exprs of
	 substrnode: (lengthp: exptr) );
    selnnode:
      (recptr: exptr; fieldptr: ctp);
    unqualfldnode:
      (withstptr: stptr; fieldref: ctp);
    litnode:
      (litval: valu);
    fcallnode:
      (fptr: ctp; actualp: elistptr);
    setdenonode:
      (setcstpart: valu; setvarpart: elistptr);
  end (*expr*);

			     (* Statements *)

clabptr = ^clabrec;                {CASE statement labels}
clabrec = record
	    temptr,                {links labels of same stmt}
	    clabp: clabptr;        {links all labels in CASE, in order}
	    cstmt: stptr;          {stmt labelled by this label}
	    lowval,hival: integer; {label value(s)}
	    end;

stmts = (becomest,pcallst,casest,compndst,forst,
	 gotost,ifst,repst,tryst,whilest,
	 withst,emptyst,endofbodyst);

stmt  = record
	  next: stptr;
	  lineno: integer;
	  sflags: packed record
		    rangecheck,shortcircuit,
		      iocheck,ovflcheck: boolean;
		    callmode: callmodetype;
		    end;
	  $IF FULLDUMP$
	  snum: shortint;           (* for printing tree *)
	  $END$
	  labp: labelp;             (* user label for stmt *)
	  tablelist: reflistptr;    (* used only if member of a CASE *)
	  refcount: shortint;       (* used only if member of a CASE *)
	  case sclass: stmts of
	    becomest: (lhs,rhs: exptr);
	    pcallst:  (psymptr: ctp;
		       actualp: elistptr);
	    casest:   (selecter: exptr;
		       maxlab,minlab: clabptr;
		       firstmt, otherwyse: stptr;
		       nrlabs, nrstmts: shortint);
	    compndst: (cbody: stptr);
	    forst:    (ctrl,init,limit: exptr;
		       incr: shortint; fbody: stptr);
	    gotost:   (target: labelp);
	    ifst:     (ifcond: exptr;
		       tru,fals: stptr);
	    repst,
	    whilest:  (rcond: exptr;
		       rbody: stptr);
	    tryst:    (tbody,recov: stptr);
	    withst:   (wbody: stptr; refexpr: exptr; refbit: addrrange);
	    emptyst,
	    endofbodyst:()
	  end (*stmt*);

DISPLAYFRAME = RECORD
	  FNAME: CTP;
	  CASE OCCUR: DISPLAYscope OF
	    BLOCKscope,MODULEscope:
		       (FFILE: CTP;
			FLABEL: LABELP;
			FMODULE,
			available_module: MODSTATEPTR);
	    WITHscope: (wnodeptr: stptr);
	    END;

structnodeptr = ^structnodetype;
structnodetype = record
		   sp: stp;
		   val: valu;
		   next: structnodeptr;
		 end;

floatoptype = (flt_on, flt_off, flt_test);

fkind = (norml,specil);

searchlisttype = array[1..maxint] of fid;

string10 = string[10];
string15 = string[15];

overlaylisttype = array[1..maxint] of string15;

sourceinfotype = array[1..maxinfiles] of
  record
    oldsymblk,oldfilepos,oldrelinum: integer;
    oldsymcursor,oldlinestart: cursrange;
    filename: fid;
    oldftype: fkind;
  end;

  { declarations for module header }
const
  fixedpart = 142; { bytes }
type
  module_directory = packed record
    date:      daterec;        {date of creation}
    revision:  daterec;        {producer's revision date number}
    producer:  char;           {C = compiler}
    system_id: 0..255;         {not used}
    notice: string[80];        {whatever comments may be desired}
    directory_size: integer;   {size of module directory,in bytes}
    module_size: integer;      {total size of module, in bytes}
    executable:       boolean; {module is executable,
				       has start address}
    relocatable_size: integer; {relocatable bytes requested}
    relocatable_base: integer; {current origin relocatable code}
    global_size:      integer; {number of global bytes requested}
    global_base:      integer; {A5 relative origin of global area}

    ext_block,            {module relative block of EXT table}
    ext_size,             {size of EXT table, in bytes}
    def_block,            {module relative block of DEF table}
    def_size,             {size of DEF table, in bytes}
    source_block,         {module relative block of DEFINE SOURCE}
    source_size,          {size of source, in bytes}

    text_records:     integer;  {number of TEXT records}
    morebytes:        packed array[0..(255-fixedpart)] of byt;
  end;

(*--------------------------------------------------------------------*)

VAR
						(* Scanner *)

				    (* These 4 vars MUST be in this order *)
				    (* for IDSEARCH !! *)
    SYMCURSOR: CURSRANGE;           (*CURRENT SCANNING INDEX IN SYMBUF*)
    SY: SYMBOLS;                    (*SYMBOL FOUND BY INSYMBOL*)
    OP: OPERATOR;                   (*CLASSIFICATION OF LAST OPERATOR SYMBOL*)
    ID: ALPHA;                      (*LAST IDENTIFIER FOUND*)

    symbuf: symbufarray;
    symblk: integer;                (* LAST BLOCK READ *)
    filepos: INTEGER;                   (* Next block in source file*)
    LINESTART: CURSRANGE;               (* Index into SYMBUF*)
    ftype: fkind;
    srcindex: 1..maxinfiles;            (* Top of SOURCEINFO stack*)
    sourceinfoptr: ^sourceinfotype;


    VAL: valu;                      (*VALUE OF LAST CONSTANT*)
    LGTH: INTEGER;                  (*LENGTH OF LAST STRING CONSTANT*)
    uminus: boolean;                (*if previous symbol was unary minus*)

					       (* Compiler-OS interface *)

    systemglobals: alpha;
    sysglobalptr: alphaptr;

		       (* Allocation control *)

    LC,LCMAX:ADDRRANGE;             (* LOCATION COUNTER *)

				    (*SWITCHES*)

    PRTERR,GRANGECHECK,gshortcircuit,DEBUGGING,
    UCSD,MODCAL,stdpasc,sysprog,aliasok,
    GIOCHECK,govflcheck,switch_strpos,
    gstackcheck,BPTONLINE,tables,putcode,
    saveconst,DP,oldDP,syntxerr,warn,
    listabort,list_option_L,
    beforefirsttoken,listPC,heapdispose,
    sawkeyboard,sawlisting,strpos_warn,
    sawinput,sawoutput: BOOLEAN;
    allow_packed : boolean;
    temp_put : boolean;

    float: floatoptype;

    gcopyright: string[80];

    timestring: string[8];

    float_flag: string[8];

    refilesize,defilesize: integer;
    refvolname,defvolname: string[vidleng+1];  { allow for ':' }

    gcallmode: callmodetype;
    aliasptr: alphaptr;

    initial_heap: anyptr;

    inbody,                         (*Parsing in executable code *)
    indefinesection: boolean;       (*Parsing in define section of a module *)

    INTPTR,shortintptr,REALPTR,     (*Pointers to standard type nodes*)
    CHAR_PTR,BOOLPTR,anyptrptr,cant_deref,
    anyfileptr,TEXTPTR,STRGPTR: STP;

    ioresultptr,
    keyboardptr,listingptr,
    inputptr,outputptr: CTP;        (*Pointers to standard variable nodes*)

						(* Trees *)

    curexp: exptr;                  (*points to current expression*)
    $IF FULLDUMP$
    firstexp,lastexp: exptr;        (*'echain' list of expressions*)
    sctr,ectr: shortint;            (* for tree printout *)
    $END$

						(* Symbol table *)

    LEVEL,levelatstart: LEVRANGE;   (*CURRENT STATIC LEVEL*)
    display_ok_to_import,
    TOP: DISPRANGE;                 (*TOP OF DISPLAY*)

    disdef: record {describes type id being defined}
	      level: -1..displimit;
	      id: alphaptr;
	      end;

    DISX: -1..displimit;            (*LEVEL OF LAST ID FOUND BY SEARCHID*)
    gstate,gcurstate: modstateptr;  (*MODULE of last id found by SEARCHID*)
    sysinfo: infobits;              (*info for structures and identifiers*)

    DISPLAY: ARRAY [DISPRANGE] OF DISPLAYFRAME;

    structconstlist: structnodeptr;

    UTYPPTR,UCSTPTR,UVARPTR,
    UFLDPTR,UPRCPTR,UFCTPTR: CTP;   (*POINTERS TO UNDECLARED IDS*)

    OUTERBLOCK,                     (*PROCEDURE RECORD FOR OUTER BLOCK*)
    FWPTR: CTP;                     (*LIST OF FORWARD REFERENCED TYPE IDS*)

						(* Listing *)

    LIST,initlistmode,gtemplist: listswitch;
    gtemplinenumber,linenumber,     (* line no for listing/breakpoints *)
    totalwarnings,
    totalerrors,
    relinum,                        (* relative line no in current input file *)
    lasterrln,
    SCREENDOTS,                     (* number of lines seen so far *)
    STARTDOTS: INTEGER;
    todaysdate: string[9];          (* date in form dd-mmm-yy *)
    linelevel,linlevatstart: shortint;

    maxoverlays,maxsearchfiles,
    searchfilestop,overlaytop: shortint;
    overlaylistptr: ^overlaylisttype;
    searchlistptr: ^searchlisttype;
    modulectp: ctp;

    globaldate: daterec;
    globaltime: timerec;
    curglobalname,gnamep,currentglobal: alphaptr;
    importexportext,idinimport: boolean;
    symbolstart: cursrange;

    CONSTBEGSYS,SIMPTYPEBEGSYS,TYPEBEGSYS,
    BLOCKBEGSYS,modulebegsys,SELECTSYS,
    FACBEGSYS,STATBEGSYS,TYPEDELS: SETOFSYS;

    power_table: array[0..bitsperword-2] of integer;

    uniquenum: shortint;

    save_escape: integer;
    save_ioresult: shortint;
    gen_error: boolean;

    body_try_level : integer;     { JWH 9/26/91 }
    parsing_try_level : integer;  { JWH 9/26/91 }
(*--------------------------------------------------------------------*)

CONST

  optionarray = optionarraytype
    ['','ALIAS','ALLOW_PACKED','ANSI','CALLABS','IF','END',
     'CODE','COPYRIGHT','DEBUG','DEF','FLOAT_HDW',
     'HEAP_DISPOSE','INCLUDE','IOCHECK','LINES',
     'LIST','LINENUM','MODCAL','OVERLAY',
     'OVERLAY_SIZE','OVFLCHECK','PAGE',
     'PAGEWIDTH','PARTIAL_EVAL','CODE_OFFSETS',
     'RANGE','REF','SAVE_CONST','SEARCH_SIZE',
     'SEARCH','STACKCHECK','SWITCH_STRPOS',
     'SYSPROG','TABLES','UCSD','WARN',''];

@


55.2
log
@Changes to fix defect FSDdt07193.
@
text
@@


55.1
log
@Automatic bump of revision number for PWS version 3.25A
@
text
@d221 1
d583 2
@


54.1
log
@Automatic bump of revision number for PWS version 3.24
@
text
@@


53.1
log
@Automatic bump of revision number for PWS version 3.24B
@
text
@@


52.1
log
@Automatic bump of revision number for PWS version 3.24A
@
text
@@


51.1
log
@Automatic bump of revision number for PWS version 3.24d
@
text
@@


50.1
log
@Automatic bump of revision number for PWS version 3.23c
@
text
@@


49.1
log
@Automatic bump of revision number for PWS version 3.24b
@
text
@@


48.1
log
@Automatic bump of revision number for PWS version 3.24a
@
text
@@


47.1
log
@Automatic bump of revision number for PWS version 3.23
@
text
@@


46.1
log
@Automatic bump of revision number for PWS version 3.23
@
text
@@


45.1
log
@Automatic bump of revision number for PWS version 3.23C
@
text
@@


44.1
log
@Automatic bump of revision number for PWS version 3.23B
@
text
@@


43.1
log
@Automatic bump of revision number for PWS version 3.23aA
@
text
@@


42.1
log
@Automatic bump of revision number for PWS version 3.23e
@
text
@@


41.1
log
@Automatic bump of revision number for PWS version 3.23d
@
text
@@


40.2
log
@

          Added global boolean variable temp_put. Initialized to
      false in INIT, used in SCANNER and BLOCK. For help in repair
      of FSDdt04001.
@
text
@@


40.1
log
@Automatic bump of revision number for PWS version 3.23c
@
text
@d483 1
@


39.1
log
@Automatic bump of revision number for PWS version 3.23b
@
text
@@


38.1
log
@Automatic bump of revision number for PWS version 3.23a
@
text
@@


37.1
log
@Automatic bump of revision number for PWS version 3.3a
@
text
@@


36.1
log
@Automatic bump of revision number for PWS version 3.22
@
text
@@


35.1
log
@Automatic bump of revision number for PWS version 3.22
@
text
@@


34.1
log
@Automatic bump of revision number for PWS version 3.22
@
text
@@


33.1
log
@Automatic bump of revision number for PWS version 3.22D
@
text
@@


32.1
log
@Automatic bump of revision number for PWS version 3.22C
@
text
@@


31.1
log
@Automatic bump of revision number for PWS version 3.22B
@
text
@@


30.1
log
@Automatic bump of revision number for PWS version 3.22A
@
text
@@


29.1
log
@Automatic bump of revision number for PWS version 3.22b
@
text
@@


28.1
log
@Automatic bump of revision number for PWS version 3.3b
@
text
@@


27.1
log
@Automatic bump of revision number for PWS version 3.3a
@
text
@@


26.1
log
@Automatic bump of revision number for PWS version 3.3 Synch
@
text
@@


25.1
log
@Automatic bump of revision number for PWS version 3.2Y
@
text
@@


24.1
log
@Automatic bump of revision number for PWS version 3.2
@
text
@@


23.1
log
@Automatic bump of revision number for PWS version 3.2P
@
text
@@


22.1
log
@Automatic bump of revision number for PWS version 3.2N
@
text
@@


21.1
log
@Automatic bump of revision number for PWS version 3.2M
@
text
@@


20.1
log
@Automatic bump of revision number for PWS version 3.2L
@
text
@@


19.1
log
@Automatic bump of revision number for PWS version 3.2K
@
text
@@


18.1
log
@Automatic bump of revision number for PWS version 3.2J
@
text
@@


17.1
log
@Automatic bump of revision number for PWS version 3.2I+
@
text
@@


16.1
log
@Automatic bump of revision number for PWS version 3.2I
@
text
@@


15.1
log
@Automatic bump of revision number for PWS version 3.2H
@
text
@@


14.1
log
@Automatic bump of revision number for PWS version 3.2G
@
text
@@


13.1
log
@Automatic bump of revision number for PWS version 3.2F
@
text
@@


12.1
log
@Automatic bump of revision number for PWS version 3.2E
@
text
@@


11.1
log
@Automatic bump of revision number for PWS version 3.2D
@
text
@@


10.1
log
@Automatic bump of revision number for PWS version 3.2C
@
text
@@


9.1
log
@Automatic bump of revision number for PWS version 3.2B
@
text
@@


8.1
log
@Automatic bump of revision number for PWS version 3.2A
@
text
@@


7.1
log
@Automatic bump of revision number for PWS version 3.2l
@
text
@@


6.1
log
@Automatic bump of revision number for PWS version 3.2k
@
text
@@


5.1
log
@Automatic bump of revision number for PWS version 3.2j
@
text
@@


4.1
log
@Automatic bump of revision number for PWS version 3.2i
@
text
@@


3.1
log
@Automatic bump of revision number for PWS version 3.2h
@
text
@@


2.1
log
@Auto bump rev number to 2.1 for sys 3.2e.
@
text
@@


1.1
log
@Initial revision
@
text
@@
