1: /* ldefs.c 4.1 83/08/11 */
2:
3: # include <stdio.h>
4: # define PP 1
5: # ifdef unix
6:
7: # define CWIDTH 7
8: # define CMASK 0177
9: # define ASCII 1
10: # endif
11:
12: # ifdef gcos
13: # define CWIDTH 9
14: # define CMASK 0777
15: # define ASCII 1
16: # endif
17:
18: # ifdef ibm
19: # define CWIDTH 8
20: # define CMASK 0377
21: # define EBCDIC 1
22: # endif
23:
24: # ifdef ASCII
25: # define NCH 128
26: # endif
27:
28: # ifdef EBCDIC
29: # define NCH 256
30: # endif
31:
32:
33: # define TOKENSIZE 1000
34: # define DEFSIZE 40
35: # define DEFCHAR 1000
36: # define STARTCHAR 100
37: # define STARTSIZE 256
38: # define CCLSIZE 1000
39: # ifdef SMALL
40: # define TREESIZE 600
41: # define NTRANS 1500
42: # define NSTATES 300
43: # define MAXPOS 1500
44: # define NOUTPUT 1500
45: # endif
46:
47: # ifndef SMALL
48: # define TREESIZE 1000
49: # define NSTATES 500
50: # define MAXPOS 2500
51: # define NTRANS 2000
52: # define NOUTPUT 3000
53: # endif
54: # define NACTIONS 100
55: # define 30
56:
57: # define RCCL NCH+90
58: # define RNCCL NCH+91
59: # define RSTR NCH+92
60: # define RSCON NCH+93
61: # define RNEWE NCH+94
62: # define FINAL NCH+95
63: # define RNULLS NCH+96
64: # define RCAT NCH+97
65: # define STAR NCH+98
66: # define PLUS NCH+99
67: # define QUEST NCH+100
68: # define DIV NCH+101
69: # define BAR NCH+102
70: # define CARAT NCH+103
71: # define S1FINAL NCH+104
72: # define S2FINAL NCH+105
73:
74: # define DEFSECTION 1
75: # define RULESECTION 2
76: # define ENDSECTION 5
77: # define TRUE 1
78: # define FALSE 0
79:
80: # define PC 1
81: # define PS 1
82:
83: # ifdef DEBUG
84: # define LINESIZE 110
85: extern int yydebug;
86: extern int debug; /* 1 = on */
87: extern int charc;
88: # endif
89:
90: # ifndef DEBUG
91: # define freturn(s) s
92: # endif
93:
94: extern int sargc;
95: extern char **sargv;
96: extern char buf[520];
97: extern int ratfor; /* 1 = ratfor, 0 = C */
98: extern int yyline; /* line number of file */
99: extern int sect;
100: extern int eof;
101: extern int lgatflg;
102: extern int divflg;
103: extern int funcflag;
104: extern int pflag;
105: extern int casecount;
106: extern int chset; /* 1 = char set modified */
107: extern FILE *fin, *fout, *fother, *errorf;
108: extern int fptr;
109: extern char *ratname, *cname;
110: extern int prev; /* previous input character */
111: extern int pres; /* present input character */
112: extern int peek; /* next input character */
113: extern int *name;
114: extern int *left;
115: extern int *right;
116: extern int *parent;
117: extern char *nullstr;
118: extern int tptr;
119: extern char pushc[TOKENSIZE];
120: extern char *pushptr;
121: extern char slist[STARTSIZE];
122: extern char *slptr;
123: extern char **def, **subs, *dchar;
124: extern char **sname, *schar;
125: extern char *ccl;
126: extern char *ccptr;
127: extern char *dp, *sp;
128: extern int dptr, sptr;
129: extern char *bptr; /* store input position */
130: extern char *tmpstat;
131: extern int count;
132: extern int **foll;
133: extern int *nxtpos;
134: extern int *positions;
135: extern int *gotof;
136: extern int *nexts;
137: extern char *nchar;
138: extern int **state;
139: extern int *sfall; /* fallback state num */
140: extern char *cpackflg; /* true if state has been character packed */
141: extern int *atable, aptr;
142: extern int nptr;
143: extern char symbol[NCH];
144: extern char cindex[NCH];
145: extern int xstate;
146: extern int stnum;
147: extern int ctable[];
148: extern int ZCH;
149: extern int ccount;
150: extern char match[NCH];
151: extern char extra[NACTIONS];
152: extern char *pcptr, *pchar;
153: extern int pchlen;
154: extern int nstates, maxpos;
155: extern int yytop;
156: extern int report;
157: extern int ntrans, treesize, outsize;
158: extern long rcount;
159: extern int optim;
160: extern int *verify, *advance, *stoff;
161: extern int scon;
162: extern char *psave;
163: extern char *calloc(), *myalloc();
164: extern int buserr(), segviol();
Defined macros
defined in line
55; used 1 times
ASCII
defined in line
15; used 3 times
BAR
defined in line
69; used 2 times
CARAT
defined in line
70; used 1 times
CMASK
defined in line
20;
never used
DIV
defined in line
68; used 2 times
FALSE
defined in line
78; used 15 times
FINAL
defined in line
62; used 2 times
NCH
defined in line
29; used 77 times
- in line 57-72(16),
143-144(2),
150
- in /usr/src/usr.bin/lex/header.c line
11
- in /usr/src/usr.bin/lex/lmain.c line
103
- in /usr/src/usr.bin/lex/parser.y line
111,
306-307(3),
333-338(3),
596,
626,
696
- in /usr/src/usr.bin/lex/sub1.c line
194-212(6),
225-229(2),
482,
522,
605,
628
- in /usr/src/usr.bin/lex/sub2.c line
12,
27,
33,
158,
202-203(2),
236-240(2),
246,
271,
283,
327,
381-388(5),
394,
408-412(2),
419,
449,
458,
665,
677,
690-697(3),
794-799(2),
841,
855-860(2),
868
PC
defined in line
80; used 1 times
PLUS
defined in line
66; used 3 times
PP
defined in line
4; used 3 times
PS
defined in line
81; used 2 times
QUEST
defined in line
67; used 1 times
RCAT
defined in line
64; used 11 times
RCCL
defined in line
57; used 6 times
RNCCL
defined in line
58; used 3 times
RNEWE
defined in line
61; used 1 times
RSCON
defined in line
60; used 1 times
RSTR
defined in line
59; used 3 times
STAR
defined in line
65; used 2 times
TRUE
defined in line
77; used 34 times
- in /usr/src/usr.bin/lex/lmain.c line
28-31(2)
- in /usr/src/usr.bin/lex/parser.y line
35,
79,
148,
208,
241,
308,
365,
432,
438,
446,
482,
501,
675
- in /usr/src/usr.bin/lex/sub1.c line
281,
288,
395,
416-421(2),
448-452(2),
461,
483,
603
- in /usr/src/usr.bin/lex/sub2.c line
106,
125,
163,
240-253(4),
429,
568
Usage of this include