1: #
   2: /*
   3: 
   4: 	C compiler-- pass 1 header
   5: 
   6: 
   7: */
   8: 
   9: /*
  10:   parameters
  11: */
  12: 
  13: #define ncps    8
  14: #define hshsiz  200
  15: #define cmsiz   40
  16: #define swsiz   200
  17: #define OSSIZ   500
  18: #define dimsiz  100
  19: #define NBPW    16
  20: #define NBPC    8
  21: #define NCPW    2
  22: #define STRSIZ  256
  23: 
  24: struct tnode {
  25:     int op;
  26:     int type;
  27:     int dimp;
  28:     struct  tnode *tr1, *tr2;
  29: };
  30: 
  31: struct {
  32:     int op;
  33:     int type;
  34:     char    ssp;        /* subscript list */
  35:     char    lenp;       /* structure length */
  36: };
  37: 
  38: struct tname {
  39:     int op;
  40:     int type;
  41:     int dimp;
  42:     int class;
  43:     int offset;
  44:     int nloc;
  45: };
  46: 
  47: struct txname {
  48:     int op;
  49:     int type;
  50:     int dimp;
  51:     int class;
  52:     int offset;
  53:     char    nname[ncps];
  54: };
  55: 
  56: struct tconst {
  57:     int op;
  58:     int type;
  59:     int dimp;
  60:     int value;
  61: };
  62: 
  63: struct hshtab {
  64:     char    hclass;
  65:     char    hflag;
  66:     int htype;
  67:     int hdimp;
  68:     int hoffset;
  69:     char    name[ncps];
  70: };
  71: 
  72: struct {
  73:     char    hclass;
  74:     char    hflag;
  75:     int htype;
  76:     char    flen;       /* Field length */
  77:     char    bitoffs;    /* Offset of field */
  78: };
  79: 
  80: struct swtab {
  81:     int swlab;
  82:     int swval;
  83: };
  84: 
  85: struct  bnode {
  86:     int bop;
  87:     struct  tnode *btree;
  88:     int lbl;
  89:     int cond;
  90: };
  91: 
  92: char    cvtab[4][4];
  93: char    savstr[STRSIZ];
  94: char    *strptr;
  95: int opdope[];
  96: char    ctab[];
  97: char    symbuf[ncps+2];
  98: int hshused;
  99: struct  hshtab  hshtab[hshsiz];
 100: int *space;
 101: int *cp;
 102: int cmst[cmsiz];
 103: int isn;
 104: struct  swtab   swtab[swsiz];
 105: struct  swtab   *swp;
 106: int contlab;
 107: int brklab;
 108: int retlab;
 109: int deflab;
 110: int nauto;
 111: int autolen;
 112: int peeksym;
 113: int peekc;
 114: int eof;
 115: int line;
 116: int osspace[OSSIZ];
 117: int *treespace;
 118: struct  hshtab  *defsym;
 119: struct  hshtab  *funcsym;
 120: int xdflg;
 121: int proflg;
 122: int stflg;
 123: struct  hshtab  *csym;
 124: int cval;
 125: double  fcval;
 126: int nchstr;
 127: int nerror;
 128: struct  hshtab  *paraml;
 129: struct  hshtab  *parame;
 130: int strflg;
 131: int mosflg;
 132: int initflg;
 133: int inhdr;
 134: int dimtab[dimsiz];
 135: char    obuf[518];
 136: char    sbuf[518];
 137: int dimp;
 138: int regvar;
 139: int bitoffs;
 140: struct  tname   funcblk;
 141: 
 142: /*
 143:   operators
 144: */
 145: #define EOF 0
 146: #define SEMI    1
 147: #define LBRACE  2
 148: #define RBRACE  3
 149: #define LBRACK  4
 150: #define RBRACK  5
 151: #define LPARN   6
 152: #define RPARN   7
 153: #define COLON   8
 154: #define COMMA   9
 155: #define FSEL    10
 156: 
 157: #define KEYW    19
 158: #define NAME    20
 159: #define CON 21
 160: #define STRING  22
 161: #define FCON    23
 162: #define SFCON   24
 163: 
 164: #define SIZEOF  91
 165: #define INCBEF  30
 166: #define DECBEF  31
 167: #define INCAFT  32
 168: #define DECAFT  33
 169: #define EXCLA   34
 170: #define AMPER   35
 171: #define STAR    36
 172: #define NEG 37
 173: #define COMPL   38
 174: 
 175: #define DOT 39
 176: #define PLUS    40
 177: #define MINUS   41
 178: #define TIMES   42
 179: #define DIVIDE  43
 180: #define MOD 44
 181: #define RSHIFT  45
 182: #define LSHIFT  46
 183: #define AND 47
 184: #define OR  48
 185: #define EXOR    49
 186: #define ARROW   50
 187: #define ITOF    51
 188: #define FTOI    52
 189: #define LOGAND  53
 190: #define LOGOR   54
 191: #define FTOL    56
 192: #define LTOF    57
 193: #define ITOL    58
 194: #define LTOI    59
 195: 
 196: #define EQUAL   60
 197: #define NEQUAL  61
 198: #define LESSEQ  62
 199: #define LESS    63
 200: #define GREATEQ 64
 201: #define GREAT   65
 202: #define LESSEQP 66
 203: #define LESSP   67
 204: #define GREATQP 68
 205: #define GREATP  69
 206: 
 207: #define ASPLUS  70
 208: #define ASMINUS 71
 209: #define ASTIMES 72
 210: #define ASDIV   73
 211: #define ASMOD   74
 212: #define ASRSH   75
 213: #define ASLSH   76
 214: #define ASSAND  77
 215: #define ASOR    78
 216: #define ASXOR   79
 217: #define ASSIGN  80
 218: 
 219: #define QUEST   90
 220: #define CALL    100
 221: #define MCALL   101
 222: #define JUMP    102
 223: #define CBRANCH 103
 224: #define INIT    104
 225: #define SETREG  105
 226: #define RFORCE  110
 227: #define BRANCH  111
 228: #define LABEL   112
 229: #define NLABEL  113
 230: #define RLABEL  114
 231: 
 232: /*
 233:   types
 234: */
 235: #define INT 0
 236: #define CHAR    1
 237: #define FLOAT   2
 238: #define DOUBLE  3
 239: #define STRUCT  4
 240: #define RSTRUCT 5
 241: #define LONG    6
 242: #define NOTYPE  7   /* used internally */
 243: 
 244: #define ALIGN   01
 245: #define TYPE    07
 246: #define TYLEN   2
 247: #define XTYPE   (03<<3)
 248: #define PTR 010
 249: #define FUNC    020
 250: #define ARRAY   030
 251: 
 252: /*
 253:   storage classes
 254: */
 255: #define KEYWC   1
 256: #define MOS 10
 257: #define AUTO    11
 258: #define EXTERN  12
 259: #define STATIC  13
 260: #define REG 14
 261: #define STRTAG  15
 262: #define ARG 16
 263: #define ARG1    17
 264: #define FMOS    18
 265: 
 266: /*
 267:   keywords
 268: */
 269: #define GOTO    20
 270: #define RETURN  21
 271: #define IF  22
 272: #define WHILE   23
 273: #define ELSE    24
 274: #define SWITCH  25
 275: #define CASE    26
 276: #define BREAK   27
 277: #define CONTIN  28
 278: #define DO  29
 279: #define DEFAULT 30
 280: #define FOR 31
 281: 
 282: /*
 283:   characters
 284: */
 285: #define INSERT  119
 286: #define PERIOD  120
 287: #define SQUOTE  121
 288: #define DQUOTE  122
 289: #define LETTER  123
 290: #define DIGIT   124
 291: #define NEWLN   125
 292: #define SPACE   126
 293: #define UNKN    127
 294: 
 295: /*
 296:  * Special operators in intermediate code
 297:  */
 298: #define BDATA   200
 299: #define WDATA   201
 300: #define PROG    202
 301: #define DATA    203
 302: #define BSS 204
 303: #define CSPACE  205
 304: #define SSPACE  206
 305: #define SYMDEF  207
 306: #define SAVE    208
 307: #define RETRN   209
 308: #define EVEN    210
 309: #define PROFIL  212
 310: #define SWIT    213
 311: #define EXPR    214
 312: #define SNAME   215
 313: #define RNAME   216
 314: #define ANAME   217
 315: #define NULL    218
 316: 
 317: /*
 318:   Flag bits
 319: */
 320: 
 321: #define BINARY  01
 322: #define LVALUE  02
 323: #define RELAT   04
 324: #define ASSGOP  010
 325: #define LWORD   020
 326: #define RWORD   040
 327: #define COMMUTE 0100
 328: #define RASSOC  0200
 329: #define LEAF    0400
 330: 
 331: /*
 332:  * Conversion codes
 333:  */
 334: #define ITF 1
 335: #define ITL 2
 336: #define LTF 3
 337: #define ITP 4
 338: #define PTI 5
 339: #define FTI 6
 340: #define LTI 7
 341: #define FTL 8
 342: #define XX  15
 343: 
 344: /*
 345:  * symbol table flags
 346:  */
 347: 
 348: #define FNDEL   01
 349: #define FNUND   02
 350: #define FKEYW   04
 351: #define FFIELD  020

Defined variables

autolen defined in line 111; used 4 times
bitoffs defined in line 139; used 18 times
brklab defined in line 107; used 22 times
cmst defined in line 102; used 2 times
contlab defined in line 106; used 19 times
cp defined in line 101; used 38 times
csym defined in line 123; used 7 times
ctab defined in line 96; used 4 times
cval defined in line 124; used 33 times
cvtab defined in line 92; used 1 times
deflab defined in line 109; used 7 times
defsym defined in line 118; used 9 times
dimp defined in line 137; used 30 times
dimtab defined in line 134; used 14 times
eof defined in line 114; used 5 times
fcval defined in line 125; used 10 times
funcblk defined in line 140; used 2 times
funcsym defined in line 119; used 1 times
hshtab defined in line 99; used 8 times
hshused defined in line 98; used 2 times
inhdr defined in line 133; used 8 times
initflg defined in line 132; used 7 times
isn defined in line 103; used 26 times
line defined in line 115; used 10 times
mosflg defined in line 131; used 10 times
nauto defined in line 110; never used
nchstr defined in line 126; used 6 times
nerror defined in line 127; used 3 times
obuf defined in line 135; used 3 times
opdope defined in line 95; used 4 times
osspace defined in line 116; used 2 times
parame defined in line 129; used 3 times
paraml defined in line 128; used 6 times
peekc defined in line 113; used 14 times
peeksym defined in line 112; used 43 times
proflg defined in line 121; used 2 times
regvar defined in line 138; used 4 times
retlab defined in line 108; used 4 times
savstr defined in line 93; used 4 times
sbuf defined in line 136; used 3 times
space defined in line 100; used 5 times
stflg defined in line 122; used 1 times
strflg defined in line 130; used 6 times
strptr defined in line 94; used 2 times
swp defined in line 105; used 10 times
swtab defined in line 104; used 2 times
symbuf defined in line 97; used 10 times
treespace defined in line 117; used 5 times
xdflg defined in line 120; used 6 times

Defined struct's

bnode defined in line 85; never used
hshtab defined in line 63; used 42 times
swtab defined in line 80; used 6 times
tconst defined in line 56; never used
tname defined in line 38; used 10 times
tnode defined in line 24; used 60 times
txname defined in line 47; never used

Defined macros

ALIGN defined in line 244; used 7 times
AMPER defined in line 170; used 6 times
ANAME defined in line 314; used 1 times
AND defined in line 183; used 4 times
ARG defined in line 262; used 3 times
ARG1 defined in line 263; used 4 times
ARRAY defined in line 250; used 16 times
ARROW defined in line 186; used 1 times
ASDIV defined in line 210; never used
ASLSH defined in line 213; never used
ASMINUS defined in line 208; never used
ASMOD defined in line 211; never used
ASOR defined in line 215; never used
ASPLUS defined in line 207; used 1 times
ASRSH defined in line 212; never used
ASSAND defined in line 214; never used
ASSGOP defined in line 324; used 1 times
ASSIGN defined in line 217; used 6 times
ASTIMES defined in line 209; never used
ASXOR defined in line 216; never used
AUTO defined in line 257; used 5 times
BDATA defined in line 298; used 3 times
BINARY defined in line 321; used 3 times
BRANCH defined in line 227; used 1 times
BREAK defined in line 276; used 1 times
BSS defined in line 302; used 1 times
CALL defined in line 220; used 4 times
CASE defined in line 275; used 1 times
CBRANCH defined in line 223; used 2 times
CHAR defined in line 236; used 9 times
COLON defined in line 153; used 8 times
COMMA defined in line 154; used 6 times
COMMUTE defined in line 327; never used
COMPL defined in line 173; used 1 times
CON defined in line 159; used 11 times
CONTIN defined in line 277; used 1 times
CSPACE defined in line 303; used 1 times
DATA defined in line 301; used 2 times
DECAFT defined in line 168; never used
DECBEF defined in line 166; used 1 times
DEFAULT defined in line 279; used 1 times
DIGIT defined in line 290; used 11 times
DIVIDE defined in line 179; used 3 times
DO defined in line 278; used 1 times
DOT defined in line 175; never used
DOUBLE defined in line 238; used 5 times
DQUOTE defined in line 288; used 1 times
ELSE defined in line 273; used 3 times
EOF defined in line 145; used 6 times
EQUAL defined in line 196; used 1 times
EVEN defined in line 308; used 1 times
EXCLA defined in line 169; used 2 times
EXOR defined in line 185; used 2 times
EXPR defined in line 311; used 1 times
EXTERN defined in line 258; used 11 times
FCON defined in line 161; used 4 times
FFIELD defined in line 351; used 3 times
FKEYW defined in line 350; used 2 times
FLOAT defined in line 237; used 3 times
FMOS defined in line 264; used 3 times
FNDEL defined in line 348; used 3 times
FNUND defined in line 349; used 3 times
FOR defined in line 280; used 1 times
FSEL defined in line 155; used 1 times
FTI defined in line 339; used 1 times
FTL defined in line 341; used 1 times
FTOI defined in line 188; used 2 times
FTOL defined in line 191; used 1 times
FUNC defined in line 249; used 8 times
GOTO defined in line 269; used 1 times
GREAT defined in line 201; used 2 times
GREATEQ defined in line 200; used 1 times
GREATP defined in line 205; never used
GREATQP defined in line 204; never used
IF defined in line 271; used 1 times
INCAFT defined in line 167; never used
INCBEF defined in line 165; used 1 times
INIT defined in line 224; used 1 times
INSERT defined in line 285; used 1 times
INT defined in line 235; used 16 times
ITF defined in line 334; used 2 times
ITL defined in line 335; used 2 times
ITOF defined in line 187; used 2 times
ITOL defined in line 193; used 1 times
ITP defined in line 337; used 4 times
JUMP defined in line 222; used 1 times
KEYW defined in line 157; used 8 times
KEYWC defined in line 255; used 1 times
LABEL defined in line 228; used 5 times
LBRACE defined in line 147; used 5 times
LBRACK defined in line 149; used 3 times
LEAF defined in line 329; never used
LESS defined in line 199; used 2 times
LESSEQ defined in line 198; used 3 times
LESSEQP defined in line 202; used 1 times
LESSP defined in line 203; never used
LETTER defined in line 289; used 54 times
LOGAND defined in line 189; used 1 times
LOGOR defined in line 190; used 1 times
LONG defined in line 241; used 4 times
LPARN defined in line 151; used 3 times
LSHIFT defined in line 182; used 1 times
LTF defined in line 336; used 2 times
LTI defined in line 340; used 1 times
LTOF defined in line 192; used 1 times
LTOI defined in line 194; used 1 times
LVALUE defined in line 322; used 1 times
LWORD defined in line 325; used 1 times
MCALL defined in line 221; used 1 times
MINUS defined in line 177; used 4 times
MOD defined in line 180; used 1 times
MOS defined in line 256; used 9 times
NAME defined in line 158; used 14 times
NBPC defined in line 20; used 2 times
NBPW defined in line 19; used 2 times
NCPW defined in line 21; used 7 times
NEG defined in line 172; used 1 times
NEQUAL defined in line 197; used 1 times
NEWLN defined in line 291; used 1 times
NLABEL defined in line 229; used 1 times
NOTYPE defined in line 242; used 2 times
NULL defined in line 315; used 1 times
OR defined in line 184; used 2 times
OSSIZ defined in line 17; used 2 times
PERIOD defined in line 286; used 1 times
PLUS defined in line 176; used 6 times
PROFIL defined in line 309; used 1 times
PROG defined in line 300; used 3 times
PTI defined in line 338; used 7 times
PTR defined in line 248; used 12 times
QUEST defined in line 219; used 1 times
RASSOC defined in line 328; used 1 times
RBRACE defined in line 148; used 7 times
RBRACK defined in line 150; used 4 times
REG defined in line 260; used 3 times
RELAT defined in line 323; used 2 times
RETRN defined in line 307; used 1 times
RETURN defined in line 270; used 1 times
RFORCE defined in line 226; used 2 times
RLABEL defined in line 230; used 1 times
RNAME defined in line 313; used 1 times
RPARN defined in line 152; used 11 times
RSHIFT defined in line 181; used 1 times
RSTRUCT defined in line 240; used 3 times
RWORD defined in line 326; used 1 times
SAVE defined in line 306; used 1 times
SEMI defined in line 146; used 12 times
SETREG defined in line 225; used 1 times
SFCON defined in line 162; used 3 times
SIZEOF defined in line 164; used 4 times
SNAME defined in line 312; used 1 times
SPACE defined in line 292; used 2 times
SQUOTE defined in line 287; used 1 times
SSPACE defined in line 304; used 4 times
STAR defined in line 171; used 8 times
STATIC defined in line 259; used 6 times
STRING defined in line 160; used 2 times
STRSIZ defined in line 22; used 2 times
STRTAG defined in line 261; used 4 times
STRUCT defined in line 239; used 11 times
SWIT defined in line 310; used 1 times
SWITCH defined in line 274; used 1 times
SYMDEF defined in line 305; used 1 times
TIMES defined in line 178; used 3 times
TYLEN defined in line 246; used 7 times
TYPE defined in line 245; used 13 times
UNKN defined in line 293; used 34 times
WDATA defined in line 299; used 4 times
WHILE defined in line 272; used 2 times
XTYPE defined in line 247; used 18 times
XX defined in line 342; used 6 times
cmsiz defined in line 15; used 2 times
dimsiz defined in line 18; used 2 times
hshsiz defined in line 14; used 7 times
ncps defined in line 13; used 11 times
swsiz defined in line 16; used 2 times

Usage of this include

Last modified: 1975-07-18
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 2604
Valid CSS Valid XHTML 1.0 Strict