|
|
1.1 root 1: /*
2: * external variables for YACC
3: */
4: #include "yacc.h"
5:
6: struct resv restab[] =
7: {
8: "start", START,
9: "left", LEFT,
10: "right", RIGHT,
11: "prec", PREC,
12: "nonassoc", NONASSOC,
13: "union", UNION,
14: "token", TOKEN,
15: "type", TYPE,
16: NULL
17: };
18: struct genre gtab[MAXT] =
19: {
20: 0, MAXTERM, 0, &trmptr, "terminals",
21: 0, MAXNTERM, NTBASE, &ntrmptr, "non-terminals",
22: 0, MAXTYPE, 0, &typeptr, "types"
23: };
24:
25: struct sym **symtab;
26: struct sym **ntrmptr;
27: struct sym **trmptr;
28: struct sym **typeptr;
29: struct state *states;
30: struct prod **prdptr;
31: struct sitem **items;
32: int yyline = 1;
33: int nerrors = 0;
34: int yydebug = 0;
35: int verbose = 0;
36: int pstat = 0;
37: FILE *defin, *tabout, *actout, *listout, *optout, *fhdr;
38: int tno = 256;
39: int maxitem = MAXITEM;
40: int maxprodl = MAXPRODL;
41: int maxprod = MAXPROD;
42: int maxstates = MAXSTATE;
43: int maxreds = MAXREDS;
44:
45: int nprod;
46: int nstates;
47: int startsym = NTBASE+1;
48: int predlev;
49: char *gramy = NULL;
50: #ifdef MSDOS
51: char * ytabc = "y_tab.c";
52: char *youtput = "y.output";
53: char *ytabh = "y_tab.h";
54: char *parser = "yyparse.c";
55:
56: #else
57: char *ytabc = "y.tab.c";
58: char *youtput = "y.output";
59: char *ytabh = "y.tab.h";
60: char *parser = "/lib/yyparse.c";
61: #endif
62: #ifdef MSDOS
63: char acttmp[] = "yaXXXXXX";
64: char opttmp[] = "yoXXXXXX";
65: #else
66: char acttmp[] = "/tmp/yaXXXXXX";
67: char opttmp[] = "/tmp/yoXXXXXX";
68: #endif
69: char bounderr[] = "too many %s, actual limit %d";
70: struct sitem *nititem;
71: struct prod *nitprod;
72: int nrrconf, nsrconf;
73: int ndupgos, ndupacts;
74: int yyredns;
75: int yygodef;
76: int yypact;
77: int yydefact;
78:
79: char bcount[256] =
80: {
81: 0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 2, 0, 1, 0,
105: 6, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0,
106: 4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0,
107: 5, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0,
108: 4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0,
109: 7, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0,
110: 4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0,
111: 5, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0,
112: 4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0,
113: 6, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0,
114: 4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0,
115: 5, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0,
116: 4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0
117: };
118:
119:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.