|
|
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 maxprod = MAXPROD; ! 40: int maxstates = MAXSTATE; ! 41: int nprod; ! 42: int nstates; ! 43: int startsym = NTBASE+1; ! 44: int predlev; ! 45: char *gramy = NULL; ! 46: #ifdef MSDOS ! 47: char * ytabc = "y_tab.c"; ! 48: char *youtput = "y.output"; ! 49: char *ytabh = "y_tab.h"; ! 50: char *parser = "yyparse.c"; ! 51: ! 52: #else ! 53: char *ytabc = "y.tab.c"; ! 54: char *youtput = "y.output"; ! 55: char *ytabh = "y.tab.h"; ! 56: char *parser = "/lib/yyparse.c"; ! 57: #endif ! 58: #ifdef MSDOS ! 59: char acttmp[] = "yaXXXXXX"; ! 60: char opttmp[] = "yoXXXXXX"; ! 61: #else ! 62: char acttmp[] = "/tmp/yaXXXXXX"; ! 63: char opttmp[] = "/tmp/yoXXXXXX"; ! 64: #endif ! 65: char bounderr[] = "too many %s, actual limit %d"; ! 66: struct sitem *nititem; ! 67: struct prod *nitprod; ! 68: int nrrconf, nsrconf; ! 69: int ndupgos, ndupacts; ! 70: int yyredns; ! 71: int yygodef; ! 72: int yypact; ! 73: int yydefact; ! 74: ! 75: char bcount[256] = ! 76: { ! 77: 0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4, ! 78: 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, ! 79: 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, ! 80: 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, ! 81: 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, ! 82: 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, ! 83: 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, ! 84: 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, ! 85: 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, ! 86: 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, ! 87: 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, ! 88: 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, ! 89: 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, ! 90: 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, ! 91: 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, ! 92: 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8 ! 93: }; ! 94: ! 95: char ltab[256] = ! 96: { ! 97: -1, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, ! 98: 4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, ! 99: 5, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, ! 100: 4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, ! 101: 6, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, ! 102: 4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, ! 103: 5, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, ! 104: 4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, ! 105: 7, 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: 6, 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: }; ! 114: ! 115:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.