home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gold Fish 1
/
GoldFishApril1994_CD1.img
/
d1xx
/
d183
/
pcq
/
source
/
pasvar.i
< prev
next >
Wrap
Text File
|
1989-02-25
|
3KB
|
84 lines
{
pasvar.i (of PCQ Pascal)
Copyright (c) 1989 Patrick Quaid.
These are the global variables for the compiler. When this
file is included by the main program, space is allocated for the
variables (over 60k at the moment). The external files, although
they also import this file, just generate external references.
}
{
Eventually this array will go. It is a remnant of the deep
past, when the Small-C roots of the compiler made pointers a
questionable proposition. Now that I'm more confident with
addressing, the next version will just use dynamically allocated
records.
}
idents : array [1..symtablesize] of idrecord;
identptr : integer;
{ Allocate space to hold identifier names. }
spelling : array [1..spellsize] of char;
spellptr : integer;
{ Space for literal strings and arrays in the program text }
litq : array [1..literalsize] of char;
litptr : integer;
{ The reserved words, held here in order to make searching quicker }
reserved : array [1..lastreserved] of string;
{ These four implement the error queue, which prints out the latest
128 chars or two lines, whichever is less, when an error occurs }
errorq : array [1..eqsize] of char;
eqstart : integer;
eqend : integer;
errorptr : integer;
{ Many of these are named similar to the vars in Small-C, but watch
out for different meanings. }
nxtlab : integer; { Just the current label }
litlab : integer; { Label of the literals }
argstk : integer; { Counts local var stack space }
errorcount : integer; { Literally the # of errors }
input : text; { The main program file }
output : text; { The main assembly output }
input2 : text; { If open, the include file }
mainmode : boolean; { Is this a program file? }
fnstart : integer; { The line # of the start of this }
lineno : integer; { Current line number. }
savestart : integer; { These four save the state }
saveline : integer; { of the main file during }
savechar : char; { includes }
currfn : integer; { Index of current proc or func }
savecurr : integer; { Space to save the above }
prevarg : integer; { Used to link params in decl }
blocklevel : integer; { Nesting depth }
badtype : integer; { Universal type index }
inttype : integer; { These are just the indices }
booltype : integer; { of the appropriate types }
realtype : integer;
chartype : integer;
texttype : integer;
stringtype : integer;
shorttype : integer;
bytetype : integer;
literaltype : integer; { Temp type for array lits }
currsym : integer; { Current symbol }
symloc : integer; { Literal integer }
symtext : string; { Holds ident. text }
currentchar : char; { The current char! }
including : boolean; { Taking input from include }
rangecheck : boolean; { Doing rangechecks? }
MainName : string; { Main file name }
IncludeName : string; { Current include file name }