Annotation of OpenXM_contrib2/asir2000/parse/ytab.c, Revision 1.6
1.5 noro 1: /* A Bison parser, made from parse.y
2: by GNU bison 1.35. */
3:
4: #define YYBISON 1 /* Identify Bison output. */
5:
6: # define STRUCT 257
7: # define POINT 258
8: # define NEWSTRUCT 259
9: # define ANS 260
10: # define FDEF 261
11: # define PFDEF 262
12: # define MODDEF 263
13: # define MODEND 264
14: # define GLOBAL 265
15: # define MGLOBAL 266
16: # define LOCAL 267
17: # define LOCALF 268
18: # define CMP 269
19: # define OR 270
20: # define AND 271
21: # define CAR 272
22: # define CDR 273
23: # define QUOTED 274
24: # define COLONCOLON 275
25: # define DO 276
26: # define WHILE 277
27: # define FOR 278
28: # define IF 279
29: # define ELSE 280
30: # define BREAK 281
31: # define RETURN 282
32: # define CONTINUE 283
33: # define PARIF 284
34: # define MAP 285
35: # define RECMAP 286
36: # define TIMER 287
37: # define GF2NGEN 288
38: # define GFPNGEN 289
39: # define GFSNGEN 290
40: # define GETOPT 291
41: # define FOP_AND 292
42: # define FOP_OR 293
43: # define FOP_IMPL 294
44: # define FOP_REPL 295
45: # define FOP_EQUIV 296
46: # define FOP_NOT 297
47: # define LOP 298
48: # define FORMULA 299
49: # define UCASE 300
50: # define LCASE 301
51: # define STR 302
52: # define SELF 303
53: # define BOPASS 304
54: # define PLUS 305
55: # define MINUS 306
56:
57: #line 50 "parse.y"
58:
1.1 noro 59: #define malloc(x) GC_malloc(x)
60: #define realloc(x,y) GC_realloc(x,y)
61: #define free(x) GC_free(x)
62:
63: #if defined(TOWNS)
64: #include <alloca.h>
65: #endif
66: #include <ctype.h>
67: #include "ca.h"
68: #include <sys/types.h>
69: #include <sys/stat.h>
70: #include "parse.h"
71:
72: #define NOPR (prresult=0)
73:
1.4 noro 74: extern int gdef,mgdef,ldef;
1.1 noro 75: extern SNODE parse_snode;
1.4 noro 76: extern int main_parser, allow_create_var;
1.1 noro 77:
78: int prresult;
79:
80: static int ind;
81: static FNODE t;
82: static NODE a,b;
83: static NODE2 a2;
84: static pointer val;
1.2 noro 85: static QUOTE quote;
1.1 noro 86: extern jmp_buf env;
1.5 noro 87:
1.2 noro 88: #line 83 "parse.y"
1.5 noro 89: #ifndef YYSTYPE
1.1 noro 90: typedef union {
91: FNODE f;
92: SNODE s;
93: NODE n;
94: NODE2 n2;
95: int i;
96: pointer p;
1.5 noro 97: } yystype;
98: # define YYSTYPE yystype
99: # define YYSTYPE_IS_TRIVIAL 1
100: #endif
101: #ifndef YYDEBUG
102: # define YYDEBUG 0
103: #endif
104:
105:
106:
107: #define YYFINAL 274
108: #define YYFLAG -32768
109: #define YYNTBASE 77
110:
111: /* YYTRANSLATE(YYLEX) -- Bison token number corresponding to YYLEX. */
112: #define YYTRANSLATE(x) ((unsigned)(x) <= 306 ? yytranslate[x] : 102)
113:
114: /* YYTRANSLATE[YYLEX] -- Bison token number corresponding to YYLEX. */
115: static const char yytranslate[] =
116: {
117: 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
118: 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
119: 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
120: 2, 2, 2, 64, 2, 2, 70, 56, 61, 2,
121: 67, 68, 53, 51, 71, 52, 2, 54, 2, 2,
122: 2, 2, 2, 2, 2, 2, 2, 2, 59, 69,
123: 75, 57, 76, 58, 2, 2, 2, 2, 2, 2,
124: 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
125: 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
126: 2, 73, 2, 74, 55, 2, 60, 2, 2, 2,
127: 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
128: 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
129: 2, 2, 2, 65, 72, 66, 2, 2, 2, 2,
130: 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
131: 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
132: 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
133: 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
134: 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
135: 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
136: 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
137: 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
138: 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
139: 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
140: 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
141: 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
142: 2, 2, 2, 2, 2, 2, 1, 3, 4, 5,
143: 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
144: 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
145: 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
146: 36, 37, 38, 39, 40, 41, 42, 43, 44, 45,
147: 46, 47, 48, 49, 50, 62, 63
148: };
149:
150: #if YYDEBUG
151: static const short yyprhs[] =
152: {
153: 0, 0, 2, 4, 5, 6, 12, 13, 14, 20,
154: 21, 22, 28, 32, 39, 42, 44, 47, 50, 53,
155: 57, 63, 71, 81, 87, 95, 104, 111, 112, 113,
156: 114, 127, 131, 134, 137, 139, 141, 142, 144, 148,
157: 150, 154, 156, 160, 162, 166, 167, 170, 171, 173,
158: 175, 179, 181, 185, 187, 189, 193, 195, 197, 199,
159: 201, 203, 205, 207, 212, 219, 226, 233, 241, 246,
160: 250, 259, 264, 271, 279, 284, 289, 293, 295, 300,
161: 304, 306, 312, 316, 320, 323, 326, 330, 333, 336,
162: 340, 344, 348, 352, 356, 360, 364, 367, 371, 375,
163: 378, 382, 386, 390, 394, 398, 402, 408, 412, 417,
164: 422
165: };
166: static const short yyrhs[] =
167: {
168: 78, 0, 88, 0, 0, 0, 11, 79, 93, 80,
169: 88, 0, 0, 0, 12, 81, 93, 82, 88, 0,
170: 0, 0, 13, 83, 93, 84, 88, 0, 14, 92,
171: 88, 0, 3, 98, 65, 91, 66, 88, 0, 101,
172: 88, 0, 90, 0, 27, 88, 0, 29, 88, 0,
173: 28, 88, 0, 28, 101, 88, 0, 25, 67, 95,
174: 68, 78, 0, 25, 67, 95, 68, 78, 26, 78,
175: 0, 24, 67, 95, 69, 95, 69, 95, 68, 78,
176: 0, 23, 67, 95, 68, 78, 0, 22, 78, 23,
177: 67, 95, 68, 88, 0, 47, 67, 95, 68, 59,
178: 57, 101, 88, 0, 8, 47, 67, 95, 68, 88,
179: 0, 0, 0, 0, 7, 47, 85, 67, 86, 95,
180: 87, 68, 89, 65, 94, 66, 0, 9, 47, 88,
181: 0, 10, 88, 0, 1, 88, 0, 69, 0, 70,
182: 0, 0, 48, 0, 65, 94, 66, 0, 98, 0,
183: 91, 71, 98, 0, 47, 0, 92, 71, 47, 0,
184: 46, 0, 93, 71, 46, 0, 0, 94, 78, 0,
185: 0, 96, 0, 101, 0, 96, 71, 101, 0, 99,
186: 0, 97, 71, 99, 0, 46, 0, 47, 0, 98,
187: 57, 101, 0, 48, 0, 45, 0, 6, 0, 34,
188: 0, 35, 0, 36, 0, 47, 0, 47, 67, 95,
189: 68, 0, 47, 67, 95, 72, 97, 68, 0, 31,
190: 67, 47, 71, 95, 68, 0, 32, 67, 47, 71,
191: 95, 68, 0, 47, 65, 95, 66, 67, 95, 68,
192: 0, 37, 67, 98, 68, 0, 37, 67, 68, 0,
193: 33, 67, 101, 71, 101, 71, 101, 68, 0, 30,
194: 67, 47, 68, 0, 30, 67, 47, 71, 95, 68,
195: 0, 67, 53, 101, 68, 67, 95, 68, 0, 18,
196: 67, 101, 68, 0, 19, 67, 101, 68, 0, 67,
197: 101, 68, 0, 46, 0, 100, 73, 101, 74, 0,
198: 100, 4, 98, 0, 100, 0, 67, 3, 98, 68,
199: 100, 0, 101, 57, 101, 0, 101, 50, 101, 0,
200: 101, 49, 0, 49, 101, 0, 73, 95, 74, 0,
201: 51, 101, 0, 52, 101, 0, 101, 51, 101, 0,
202: 101, 52, 101, 0, 101, 53, 101, 0, 101, 54,
203: 101, 0, 101, 56, 101, 0, 101, 55, 101, 0,
204: 101, 15, 101, 0, 64, 101, 0, 101, 16, 101,
205: 0, 101, 17, 101, 0, 43, 101, 0, 101, 38,
206: 101, 0, 101, 39, 101, 0, 101, 40, 101, 0,
207: 101, 41, 101, 0, 101, 42, 101, 0, 101, 44,
208: 101, 0, 101, 58, 101, 59, 101, 0, 75, 95,
209: 76, 0, 5, 67, 98, 68, 0, 20, 67, 101,
210: 68, 0, 60, 101, 0
1.1 noro 211: };
1.5 noro 212:
213: #endif
214:
215: #if YYDEBUG
216: /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
217: static const short yyrline[] =
218: {
219: 0, 130, 139, 141, 141, 141, 143, 143, 143, 145,
220: 145, 145, 147, 149, 151, 153, 155, 157, 159, 161,
221: 163, 165, 167, 169, 171, 173, 175, 177, 177, 177,
222: 177, 183, 185, 187, 190, 192, 195, 197, 200, 203,
223: 205, 208, 210, 213, 215, 218, 220, 223, 225, 228,
224: 230, 233, 235, 238, 240, 243, 246, 248, 250, 252,
1.6 ! noro 225: 254, 256, 258, 279, 286, 293, 299, 305, 310, 314,
! 226: 318, 322, 329, 336, 340, 342, 344, 346, 359, 369,
! 227: 372, 374, 376, 378, 380, 382, 384, 386, 388, 390,
! 228: 392, 394, 396, 398, 400, 402, 404, 406, 408, 410,
! 229: 412, 414, 416, 418, 420, 422, 424, 426, 428, 430,
! 230: 432
1.1 noro 231: };
1.5 noro 232: #endif
233:
234:
235: #if (YYDEBUG) || defined YYERROR_VERBOSE
236:
237: /* YYTNAME[TOKEN_NUM] -- String name of the token TOKEN_NUM. */
238: static const char *const yytname[] =
239: {
240: "$", "error", "$undefined.", "STRUCT", "POINT", "NEWSTRUCT", "ANS",
241: "FDEF", "PFDEF", "MODDEF", "MODEND", "GLOBAL", "MGLOBAL", "LOCAL",
242: "LOCALF", "CMP", "OR", "AND", "CAR", "CDR", "QUOTED", "COLONCOLON",
243: "DO", "WHILE", "FOR", "IF", "ELSE", "BREAK", "RETURN", "CONTINUE",
244: "PARIF", "MAP", "RECMAP", "TIMER", "GF2NGEN", "GFPNGEN", "GFSNGEN",
245: "GETOPT", "FOP_AND", "FOP_OR", "FOP_IMPL", "FOP_REPL", "FOP_EQUIV",
246: "FOP_NOT", "LOP", "FORMULA", "UCASE", "LCASE", "STR", "SELF", "BOPASS",
247: "'+'", "'-'", "'*'", "'/'", "'^'", "'%'", "'='", "'?'", "':'", "'`'",
248: "'&'", "PLUS", "MINUS", "'!'", "'{'", "'}'", "'('", "')'", "';'", "'$'",
249: "','", "'|'", "'['", "']'", "'<'", "'>'", "start", "stat", "@1", "@2",
250: "@3", "@4", "@5", "@6", "@7", "@8", "@9", "tail", "desc", "complex",
251: "members", "vars", "pvars", "stats", "node", "_node", "optlist",
252: "rawstr", "opt", "pexpr", "expr", 0
1.1 noro 253: };
1.5 noro 254: #endif
255:
256: /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
257: static const short yyr1[] =
258: {
259: 0, 77, 78, 79, 80, 78, 81, 82, 78, 83,
260: 84, 78, 78, 78, 78, 78, 78, 78, 78, 78,
261: 78, 78, 78, 78, 78, 78, 78, 85, 86, 87,
262: 78, 78, 78, 78, 88, 88, 89, 89, 90, 91,
263: 91, 92, 92, 93, 93, 94, 94, 95, 95, 96,
264: 96, 97, 97, 98, 98, 99, 100, 100, 100, 100,
265: 100, 100, 100, 100, 100, 100, 100, 100, 100, 100,
266: 100, 100, 100, 100, 100, 100, 100, 100, 100, 100,
267: 101, 101, 101, 101, 101, 101, 101, 101, 101, 101,
268: 101, 101, 101, 101, 101, 101, 101, 101, 101, 101,
269: 101, 101, 101, 101, 101, 101, 101, 101, 101, 101,
270: 101
1.1 noro 271: };
1.5 noro 272:
273: /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
274: static const short yyr2[] =
275: {
276: 0, 1, 1, 0, 0, 5, 0, 0, 5, 0,
277: 0, 5, 3, 6, 2, 1, 2, 2, 2, 3,
278: 5, 7, 9, 5, 7, 8, 6, 0, 0, 0,
279: 12, 3, 2, 2, 1, 1, 0, 1, 3, 1,
280: 3, 1, 3, 1, 3, 0, 2, 0, 1, 1,
281: 3, 1, 3, 1, 1, 3, 1, 1, 1, 1,
282: 1, 1, 1, 4, 6, 6, 6, 7, 4, 3,
283: 8, 4, 6, 7, 4, 4, 3, 1, 4, 3,
284: 1, 5, 3, 3, 2, 2, 3, 2, 2, 3,
285: 3, 3, 3, 3, 3, 3, 2, 3, 3, 2,
286: 3, 3, 3, 3, 3, 3, 5, 3, 4, 4,
287: 2
1.1 noro 288: };
1.5 noro 289:
290: /* YYDEFACT[S] -- default rule to reduce with in state S when YYTABLE
291: doesn't specify something else to do. Zero means the default is an
292: error. */
293: static const short yydefact[] =
294: {
295: 0, 0, 0, 0, 58, 0, 0, 0, 0, 3,
296: 6, 9, 0, 0, 0, 0, 0, 0, 0, 0,
297: 0, 0, 0, 0, 0, 0, 0, 59, 60, 61,
298: 0, 0, 57, 77, 62, 56, 0, 0, 0, 0,
299: 0, 45, 0, 34, 35, 47, 47, 1, 2, 15,
300: 80, 0, 33, 53, 54, 0, 0, 27, 0, 0,
301: 32, 0, 0, 0, 41, 0, 0, 0, 0, 0,
302: 47, 47, 47, 16, 62, 18, 0, 17, 0, 0,
303: 0, 0, 0, 99, 47, 47, 85, 87, 88, 110,
304: 96, 0, 0, 0, 0, 0, 48, 49, 0, 0,
305: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
306: 84, 0, 0, 0, 0, 0, 0, 0, 0, 0,
307: 14, 0, 0, 0, 47, 31, 43, 4, 7, 10,
308: 0, 12, 0, 0, 0, 0, 0, 0, 0, 47,
309: 19, 0, 0, 0, 0, 69, 0, 0, 0, 38,
310: 46, 0, 0, 76, 86, 0, 107, 79, 0, 95,
311: 97, 98, 100, 101, 102, 103, 104, 105, 83, 89,
312: 90, 91, 92, 94, 93, 82, 0, 0, 39, 108,
313: 28, 0, 0, 0, 0, 0, 42, 74, 75, 109,
314: 47, 0, 47, 0, 0, 71, 47, 47, 47, 0,
315: 68, 0, 63, 0, 0, 0, 50, 78, 0, 0,
316: 0, 47, 0, 44, 5, 8, 11, 0, 23, 0,
317: 20, 63, 0, 0, 0, 0, 47, 0, 0, 0,
318: 51, 0, 81, 47, 106, 13, 40, 29, 26, 0,
319: 47, 0, 72, 65, 66, 0, 0, 0, 64, 0,
320: 0, 0, 0, 24, 0, 21, 0, 67, 0, 52,
321: 55, 73, 36, 0, 70, 25, 37, 0, 22, 45,
322: 0, 30, 0, 0, 0
1.1 noro 323: };
1.5 noro 324:
325: static const short yydefgoto[] =
326: {
327: 272, 150, 61, 183, 62, 184, 63, 185, 123, 211,
328: 252, 48, 267, 49, 177, 65, 127, 91, 95, 96,
329: 228, 229, 230, 50, 97
1.1 noro 330: };
1.5 noro 331:
332: static const short yypact[] =
333: {
334: 454, -55, -19, -63,-32768, -28, -13, 17, -55,-32768,
335: -32768,-32768, 23, 15, 30, 31, 454, 32, 57, 59,
336: -55, 575, -55, 62, 69, 71, 72,-32768,-32768,-32768,
337: 78, 685,-32768,-32768, -32,-32768, 685, 685, 685, 685,
338: 685,-32768, 525,-32768,-32768, 685, 685,-32768,-32768,-32768,
339: -2, 811,-32768,-32768,-32768, 86, -19,-32768, 92, -55,
340: -32768, 116, 116, 116,-32768, 87, 685, 685, 685, 140,
341: 685, 685, 685,-32768, 12,-32768, 811,-32768, 125, 126,
342: 127, 685, -36, 181, 685, 685, 128, 88, 88, 181,
343: 128, 312, -19, 685, 855, 101, 105, 1071, 102, -19,
344: 685, 685, 685, 685, 685, 685, 685, 685, 685, 685,
345: -32768, 685, 685, 685, 685, 685, 685, 685, 685, 685,
346: -32768, -19, 115, 117, 685,-32768,-32768, 114, 114, 114,
347: 139,-32768, 886, 917, 948, 123, 135, 133, 136, 685,
348: -32768, -65, 124, 138, 723,-32768, 137, 141, 53,-32768,
349: -32768, 142, 979,-32768,-32768, 685,-32768,-32768, 240, 483,
350: 5, 252, 79, 1165, 1146, 1120, 1101, -8, 1071, 88,
351: 88, -26, -26, -26, -26, 1071, 1041, -53,-32768,-32768,
352: -32768, 143, 160, -55, -55, -55,-32768,-32768,-32768,-32768,
353: 685, 454, 685, 454, 82,-32768, 685, 685, 685, 685,
354: -32768, 145, 155, -19, 134, 150, 1071,-32768, 685, -55,
355: -19, 685, -55,-32768,-32768,-32768,-32768, 156,-32768, 149,
356: 200,-32768, 159, 161, 171, 767, 685, 183, -6, 187,
357: -32768, 635, -2, 685, 34,-32768,-32768,-32768,-32768, -55,
358: 685, 454,-32768,-32768,-32768, 685, 178, 685,-32768, -19,
359: 685, 180, 184,-32768, 185,-32768, 1010,-32768, 811,-32768,
360: 1071,-32768, 201, 454,-32768,-32768,-32768, 163,-32768,-32768,
361: 383,-32768, 251, 254,-32768
1.1 noro 362: };
1.5 noro 363:
364: static const short yypgoto[] =
365: {
366: -32768, 1,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
367: -32768, 4,-32768,-32768,-32768,-32768, -10, -11, 76,-32768,
368: -32768, 28, 10, 56, 0
1.1 noro 369: };
1.5 noro 370:
371:
372: #define YYLAST 1221
373:
374:
375: static const short yytable[] =
376: {
377: 51, 47, 99, 195, 56, 52, 196, 101, 102, 103,
378: 53, 54, 60, 209, 43, 44, 51, 69, 210, 57,
379: 101, 76, 103, 110, 73, 75, 77, 53, 54, 116,
380: 55, 83, 145, 84, 58, 85, 86, 87, 88, 89,
381: 90, 110, 94, 112, 113, 114, 115, 116, 117, 101,
382: 102, 103, 128, 129, 110, 120, 112, 113, 114, 115,
383: 116, 117, 248, 125, 59, 249, 132, 133, 134, 131,
384: 64, 100, 104, 105, 106, 107, 108, 84, 109, 139,
385: 140, 144, 66, 110, 122, 112, 113, 114, 115, 116,
386: 117, 51, 119, 152, 101, 102, 103, 67, 68, 70,
387: 158, 159, 160, 161, 162, 163, 164, 165, 166, 167,
388: 146, 168, 169, 170, 171, 172, 173, 174, 175, 176,
389: 151, 202, 98, 109, 71, 203, 72, 157, 110, 78,
390: 112, 113, 114, 115, 116, 117, 79, 110, 80, 81,
391: 4, 114, 115, 116, 117, 82, 136, 137, 138, 178,
392: 221, 121, 13, 14, 203, 206, 43, 44, 130, 124,
393: 147, 148, 126, 135, 23, 24, 25, 26, 27, 28,
394: 29, 30, 141, 142, 143, 154, 155, 110, 156, 32,
395: 33, 74, 35, 179, 180, 182, 186, 214, 215, 216,
396: 190, 51, 218, 51, 220, 197, 101, 102, 103, 225,
397: 181, 231, 192, 191, 193, 200, 213, 201, 234, 198,
398: 204, 212, 226, 235, 227, 194, 238, 233, 240, 104,
399: 105, 106, 107, 108, 239, 109, 241, 242, 269, 243,
400: 110, 94, 112, 113, 114, 115, 116, 117, 236, 244,
401: 247, 51, 255, 253, 250, 256, 257, 258, 261, 266,
402: 260, 273, 262, 263, 274, 101, 102, 103, 270, 259,
403: 232, 0, 265, 51, 268, 0, 217, 101, 219, 0,
404: 51, 0, 222, 223, 224, 0, 0, 0, 104, 105,
405: 106, 107, 108, 0, 109, 0, 0, 237, 0, 110,
406: 111, 112, 113, 114, 115, 116, 117, 118, 119, 0,
407: 0, 110, 246, 112, 113, 114, 115, 116, 117, 251,
408: 0, 0, 0, 1, 207, 2, 254, 3, 4, 5,
409: 6, 7, 8, 9, 10, 11, 12, 0, 0, 0,
410: 13, 14, 15, 0, 16, 17, 18, 19, 0, 20,
411: 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
412: 0, 0, 0, 0, 0, 31, 0, 32, 33, 34,
413: 35, 36, 0, 37, 38, 0, 0, 0, 0, 0,
414: 0, 0, 39, 0, 0, 0, 40, 41, 149, 42,
415: 0, 43, 44, 0, 1, 45, 2, 46, 3, 4,
416: 5, 6, 7, 8, 9, 10, 11, 12, 0, 0,
417: 0, 13, 14, 15, 0, 16, 17, 18, 19, 0,
418: 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
419: 30, 0, 0, 0, 0, 0, 31, 0, 32, 33,
420: 34, 35, 36, 0, 37, 38, 0, 0, 0, 0,
421: 0, 0, 0, 39, 0, 0, 0, 40, 41, 271,
422: 42, 0, 43, 44, 0, 1, 45, 2, 46, 3,
423: 4, 5, 6, 7, 8, 9, 10, 11, 12, 0,
424: 0, 0, 13, 14, 15, 0, 16, 17, 18, 19,
425: 0, 20, 21, 22, 23, 24, 25, 26, 27, 28,
426: 29, 30, 0, 0, 0, 0, 0, 31, 0, 32,
427: 33, 34, 35, 36, 0, 37, 38, 0, 0, 0,
428: 0, 0, 0, 0, 39, 0, 0, 0, 40, 41,
429: 0, 42, 0, 43, 44, 0, 0, 45, 92, 46,
430: 3, 4, 110, 0, 112, 113, 114, 115, 116, 117,
431: 0, 0, 0, 13, 14, 15, 0, 0, 0, 0,
432: 0, 0, 0, 0, 0, 23, 24, 25, 26, 27,
433: 28, 29, 30, 0, 0, 0, 0, 0, 31, 0,
434: 32, 33, 74, 35, 36, 0, 37, 38, 93, 0,
435: 3, 4, 0, 0, 0, 39, 0, 0, 0, 40,
436: 0, 0, 42, 13, 14, 15, 0, 0, 45, 0,
437: 46, 0, 0, 0, 0, 23, 24, 25, 26, 27,
438: 28, 29, 30, 0, 0, 0, 0, 0, 31, 0,
439: 32, 33, 74, 35, 36, 0, 37, 38, 0, 0,
440: 0, 0, 0, 0, 0, 39, 0, 0, 0, 40,
441: 3, 4, 42, 0, 43, 44, 0, 0, 45, 0,
442: 46, 0, 0, 13, 14, 15, 0, 0, 0, 0,
443: 0, 0, 0, 0, 0, 23, 24, 25, 26, 27,
444: 28, 29, 30, 0, 0, 0, 0, 0, 31, 0,
445: 32, 33, 74, 35, 36, 0, 37, 38, 93, 0,
446: 3, 4, 0, 0, 0, 39, 0, 0, 0, 40,
447: 0, 0, 42, 13, 14, 15, 0, 0, 45, 0,
448: 46, 0, 0, 0, 0, 23, 24, 25, 26, 27,
449: 28, 29, 30, 0, 0, 0, 0, 0, 31, 0,
450: 32, 33, 74, 35, 36, 0, 37, 38, 101, 102,
451: 103, 0, 0, 0, 0, 39, 0, 0, 0, 40,
452: 0, 0, 42, 0, 0, 0, 0, 0, 45, 0,
453: 46, 104, 105, 106, 107, 108, 0, 109, 0, 0,
454: 0, 0, 110, 111, 112, 113, 114, 115, 116, 117,
455: 118, 119, 101, 102, 103, 0, 0, 0, 0, 0,
456: 0, 0, 0, 0, 199, 0, 0, 0, 0, 0,
457: 0, 0, 0, 0, 0, 104, 105, 106, 107, 108,
458: 0, 109, 0, 0, 0, 0, 110, 111, 112, 113,
459: 114, 115, 116, 117, 118, 119, 101, 102, 103, 0,
460: 0, 0, 0, 0, 0, 0, 0, 0, 245, 0,
461: 0, 0, 0, 0, 0, 0, 0, 0, 0, 104,
462: 105, 106, 107, 108, 0, 109, 0, 0, 0, 0,
463: 110, 111, 112, 113, 114, 115, 116, 117, 118, 119,
464: 101, 102, 103, 0, 0, 0, 0, 0, 0, 0,
465: 43, 44, 0, 0, 0, 0, 0, 0, 0, 0,
466: 0, 0, 0, 104, 105, 106, 107, 108, 0, 109,
467: 0, 101, 102, 103, 110, 111, 112, 113, 114, 115,
468: 116, 117, 118, 119, 0, 0, 0, 0, 0, 0,
469: 0, 0, 0, 153, 104, 105, 106, 107, 108, 0,
470: 109, 0, 101, 102, 103, 110, 111, 112, 113, 114,
471: 115, 116, 117, 118, 119, 0, 0, 0, 0, 0,
472: 0, 0, 0, 0, 187, 104, 105, 106, 107, 108,
473: 0, 109, 0, 101, 102, 103, 110, 111, 112, 113,
474: 114, 115, 116, 117, 118, 119, 0, 0, 0, 0,
475: 0, 0, 0, 0, 0, 188, 104, 105, 106, 107,
476: 108, 0, 109, 0, 101, 102, 103, 110, 111, 112,
477: 113, 114, 115, 116, 117, 118, 119, 0, 0, 0,
478: 0, 0, 0, 0, 0, 0, 189, 104, 105, 106,
479: 107, 108, 0, 109, 0, 101, 102, 103, 110, 111,
480: 112, 113, 114, 115, 116, 117, 118, 119, 0, 0,
481: 0, 0, 0, 0, 0, 0, 0, 205, 104, 105,
482: 106, 107, 108, 0, 109, 0, 101, 102, 103, 110,
483: 111, 112, 113, 114, 115, 116, 117, 118, 119, 0,
484: 0, 0, 0, 0, 0, 0, 0, 0, 264, 104,
485: 105, 106, 107, 108, 0, 109, 101, 102, 103, 0,
486: 110, 111, 112, 113, 114, 115, 116, 117, 118, 119,
487: 208, 0, 0, 0, 0, 0, 0, 0, 0, 104,
488: 105, 106, 107, 108, 0, 109, 101, 102, 103, 0,
489: 110, 111, 112, 113, 114, 115, 116, 117, 118, 119,
490: 0, 0, 0, 0, 0, 101, 102, 103, 0, 104,
491: 105, 106, 107, 0, 0, 109, 0, 0, 0, 0,
492: 110, 0, 112, 113, 114, 115, 116, 117, 104, 105,
493: 106, 101, 102, 103, 109, 0, 0, 0, 0, 110,
494: 0, 112, 113, 114, 115, 116, 117, 0, 0, 0,
495: 101, 102, 103, 0, 104, 105, 0, 0, 0, 0,
496: 109, 0, 0, 0, 0, 110, 0, 112, 113, 114,
497: 115, 116, 117, 104, 0, 0, 0, 0, 0, 109,
498: 0, 0, 0, 0, 110, 0, 112, 113, 114, 115,
499: 116, 117
500: };
501:
502: static const short yycheck[] =
503: {
504: 0, 0, 4, 68, 67, 1, 71, 15, 16, 17,
505: 46, 47, 8, 66, 69, 70, 16, 16, 71, 47,
506: 15, 21, 17, 49, 20, 21, 22, 46, 47, 55,
507: 2, 31, 68, 65, 47, 67, 36, 37, 38, 39,
508: 40, 49, 42, 51, 52, 53, 54, 55, 56, 15,
509: 16, 17, 62, 63, 49, 51, 51, 52, 53, 54,
510: 55, 56, 68, 59, 47, 71, 66, 67, 68, 65,
511: 47, 73, 38, 39, 40, 41, 42, 65, 44, 67,
512: 76, 81, 67, 49, 56, 51, 52, 53, 54, 55,
513: 56, 91, 58, 93, 15, 16, 17, 67, 67, 67,
514: 100, 101, 102, 103, 104, 105, 106, 107, 108, 109,
515: 82, 111, 112, 113, 114, 115, 116, 117, 118, 119,
516: 92, 68, 46, 44, 67, 72, 67, 99, 49, 67,
517: 51, 52, 53, 54, 55, 56, 67, 49, 67, 67,
518: 6, 53, 54, 55, 56, 67, 70, 71, 72, 121,
519: 68, 65, 18, 19, 72, 155, 69, 70, 71, 67,
520: 84, 85, 46, 23, 30, 31, 32, 33, 34, 35,
521: 36, 37, 47, 47, 47, 74, 71, 49, 76, 45,
522: 46, 47, 48, 68, 67, 71, 47, 183, 184, 185,
523: 67, 191, 191, 193, 193, 71, 15, 16, 17, 199,
524: 124, 67, 69, 68, 68, 68, 46, 66, 208, 71,
525: 68, 68, 67, 209, 59, 139, 212, 67, 69, 38,
526: 39, 40, 41, 42, 68, 44, 26, 68, 65, 68,
527: 49, 231, 51, 52, 53, 54, 55, 56, 210, 68,
528: 57, 241, 241, 239, 57, 245, 68, 247, 68, 48,
529: 250, 0, 68, 68, 0, 15, 16, 17, 269, 249,
530: 204, -1, 258, 263, 263, -1, 190, 15, 192, -1,
531: 270, -1, 196, 197, 198, -1, -1, -1, 38, 39,
532: 40, 41, 42, -1, 44, -1, -1, 211, -1, 49,
533: 50, 51, 52, 53, 54, 55, 56, 57, 58, -1,
534: -1, 49, 226, 51, 52, 53, 54, 55, 56, 233,
535: -1, -1, -1, 1, 74, 3, 240, 5, 6, 7,
536: 8, 9, 10, 11, 12, 13, 14, -1, -1, -1,
537: 18, 19, 20, -1, 22, 23, 24, 25, -1, 27,
538: 28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
539: -1, -1, -1, -1, -1, 43, -1, 45, 46, 47,
540: 48, 49, -1, 51, 52, -1, -1, -1, -1, -1,
541: -1, -1, 60, -1, -1, -1, 64, 65, 66, 67,
542: -1, 69, 70, -1, 1, 73, 3, 75, 5, 6,
543: 7, 8, 9, 10, 11, 12, 13, 14, -1, -1,
544: -1, 18, 19, 20, -1, 22, 23, 24, 25, -1,
545: 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
546: 37, -1, -1, -1, -1, -1, 43, -1, 45, 46,
547: 47, 48, 49, -1, 51, 52, -1, -1, -1, -1,
548: -1, -1, -1, 60, -1, -1, -1, 64, 65, 66,
549: 67, -1, 69, 70, -1, 1, 73, 3, 75, 5,
550: 6, 7, 8, 9, 10, 11, 12, 13, 14, -1,
551: -1, -1, 18, 19, 20, -1, 22, 23, 24, 25,
552: -1, 27, 28, 29, 30, 31, 32, 33, 34, 35,
553: 36, 37, -1, -1, -1, -1, -1, 43, -1, 45,
554: 46, 47, 48, 49, -1, 51, 52, -1, -1, -1,
555: -1, -1, -1, -1, 60, -1, -1, -1, 64, 65,
556: -1, 67, -1, 69, 70, -1, -1, 73, 3, 75,
557: 5, 6, 49, -1, 51, 52, 53, 54, 55, 56,
558: -1, -1, -1, 18, 19, 20, -1, -1, -1, -1,
559: -1, -1, -1, -1, -1, 30, 31, 32, 33, 34,
560: 35, 36, 37, -1, -1, -1, -1, -1, 43, -1,
561: 45, 46, 47, 48, 49, -1, 51, 52, 53, -1,
562: 5, 6, -1, -1, -1, 60, -1, -1, -1, 64,
563: -1, -1, 67, 18, 19, 20, -1, -1, 73, -1,
564: 75, -1, -1, -1, -1, 30, 31, 32, 33, 34,
565: 35, 36, 37, -1, -1, -1, -1, -1, 43, -1,
566: 45, 46, 47, 48, 49, -1, 51, 52, -1, -1,
567: -1, -1, -1, -1, -1, 60, -1, -1, -1, 64,
568: 5, 6, 67, -1, 69, 70, -1, -1, 73, -1,
569: 75, -1, -1, 18, 19, 20, -1, -1, -1, -1,
570: -1, -1, -1, -1, -1, 30, 31, 32, 33, 34,
571: 35, 36, 37, -1, -1, -1, -1, -1, 43, -1,
572: 45, 46, 47, 48, 49, -1, 51, 52, 53, -1,
573: 5, 6, -1, -1, -1, 60, -1, -1, -1, 64,
574: -1, -1, 67, 18, 19, 20, -1, -1, 73, -1,
575: 75, -1, -1, -1, -1, 30, 31, 32, 33, 34,
576: 35, 36, 37, -1, -1, -1, -1, -1, 43, -1,
577: 45, 46, 47, 48, 49, -1, 51, 52, 15, 16,
578: 17, -1, -1, -1, -1, 60, -1, -1, -1, 64,
579: -1, -1, 67, -1, -1, -1, -1, -1, 73, -1,
580: 75, 38, 39, 40, 41, 42, -1, 44, -1, -1,
581: -1, -1, 49, 50, 51, 52, 53, 54, 55, 56,
582: 57, 58, 15, 16, 17, -1, -1, -1, -1, -1,
583: -1, -1, -1, -1, 71, -1, -1, -1, -1, -1,
584: -1, -1, -1, -1, -1, 38, 39, 40, 41, 42,
585: -1, 44, -1, -1, -1, -1, 49, 50, 51, 52,
586: 53, 54, 55, 56, 57, 58, 15, 16, 17, -1,
587: -1, -1, -1, -1, -1, -1, -1, -1, 71, -1,
588: -1, -1, -1, -1, -1, -1, -1, -1, -1, 38,
589: 39, 40, 41, 42, -1, 44, -1, -1, -1, -1,
590: 49, 50, 51, 52, 53, 54, 55, 56, 57, 58,
591: 15, 16, 17, -1, -1, -1, -1, -1, -1, -1,
592: 69, 70, -1, -1, -1, -1, -1, -1, -1, -1,
593: -1, -1, -1, 38, 39, 40, 41, 42, -1, 44,
594: -1, 15, 16, 17, 49, 50, 51, 52, 53, 54,
595: 55, 56, 57, 58, -1, -1, -1, -1, -1, -1,
596: -1, -1, -1, 68, 38, 39, 40, 41, 42, -1,
597: 44, -1, 15, 16, 17, 49, 50, 51, 52, 53,
598: 54, 55, 56, 57, 58, -1, -1, -1, -1, -1,
599: -1, -1, -1, -1, 68, 38, 39, 40, 41, 42,
600: -1, 44, -1, 15, 16, 17, 49, 50, 51, 52,
601: 53, 54, 55, 56, 57, 58, -1, -1, -1, -1,
602: -1, -1, -1, -1, -1, 68, 38, 39, 40, 41,
603: 42, -1, 44, -1, 15, 16, 17, 49, 50, 51,
604: 52, 53, 54, 55, 56, 57, 58, -1, -1, -1,
605: -1, -1, -1, -1, -1, -1, 68, 38, 39, 40,
606: 41, 42, -1, 44, -1, 15, 16, 17, 49, 50,
607: 51, 52, 53, 54, 55, 56, 57, 58, -1, -1,
608: -1, -1, -1, -1, -1, -1, -1, 68, 38, 39,
609: 40, 41, 42, -1, 44, -1, 15, 16, 17, 49,
610: 50, 51, 52, 53, 54, 55, 56, 57, 58, -1,
611: -1, -1, -1, -1, -1, -1, -1, -1, 68, 38,
612: 39, 40, 41, 42, -1, 44, 15, 16, 17, -1,
613: 49, 50, 51, 52, 53, 54, 55, 56, 57, 58,
614: 59, -1, -1, -1, -1, -1, -1, -1, -1, 38,
615: 39, 40, 41, 42, -1, 44, 15, 16, 17, -1,
616: 49, 50, 51, 52, 53, 54, 55, 56, 57, 58,
617: -1, -1, -1, -1, -1, 15, 16, 17, -1, 38,
618: 39, 40, 41, -1, -1, 44, -1, -1, -1, -1,
619: 49, -1, 51, 52, 53, 54, 55, 56, 38, 39,
620: 40, 15, 16, 17, 44, -1, -1, -1, -1, 49,
621: -1, 51, 52, 53, 54, 55, 56, -1, -1, -1,
622: 15, 16, 17, -1, 38, 39, -1, -1, -1, -1,
623: 44, -1, -1, -1, -1, 49, -1, 51, 52, 53,
624: 54, 55, 56, 38, -1, -1, -1, -1, -1, 44,
625: -1, -1, -1, -1, 49, -1, 51, 52, 53, 54,
626: 55, 56
1.1 noro 627: };
1.5 noro 628: /* -*-C-*- Note some compilers choke on comments on `#line' lines. */
629: #line 3 "/usr/share/bison/bison.simple"
630:
631: /* Skeleton output parser for bison,
632:
633: Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software
634: Foundation, Inc.
635:
636: This program is free software; you can redistribute it and/or modify
637: it under the terms of the GNU General Public License as published by
638: the Free Software Foundation; either version 2, or (at your option)
639: any later version.
640:
641: This program is distributed in the hope that it will be useful,
642: but WITHOUT ANY WARRANTY; without even the implied warranty of
643: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
644: GNU General Public License for more details.
645:
646: You should have received a copy of the GNU General Public License
647: along with this program; if not, write to the Free Software
648: Foundation, Inc., 59 Temple Place - Suite 330,
649: Boston, MA 02111-1307, USA. */
650:
651: /* As a special exception, when this file is copied by Bison into a
652: Bison output file, you may use that output file without restriction.
653: This special exception was added by the Free Software Foundation
654: in version 1.24 of Bison. */
655:
656: /* This is the parser code that is written into each bison parser when
657: the %semantic_parser declaration is not specified in the grammar.
658: It was written by Richard Stallman by simplifying the hairy parser
659: used when %semantic_parser is specified. */
660:
661: /* All symbols defined below should begin with yy or YY, to avoid
662: infringing on user name space. This should be done even for local
663: variables, as they might otherwise be expanded by user macros.
664: There are some unavoidable exceptions within include files to
665: define necessary library symbols; they are noted "INFRINGES ON
666: USER NAME SPACE" below. */
667:
668: #if ! defined (yyoverflow) || defined (YYERROR_VERBOSE)
669:
670: /* The parser invokes alloca or malloc; define the necessary symbols. */
671:
672: # if YYSTACK_USE_ALLOCA
673: # define YYSTACK_ALLOC alloca
674: # else
675: # ifndef YYSTACK_USE_ALLOCA
676: # if defined (alloca) || defined (_ALLOCA_H)
677: # define YYSTACK_ALLOC alloca
678: # else
679: # ifdef __GNUC__
680: # define YYSTACK_ALLOC __builtin_alloca
681: # endif
682: # endif
683: # endif
684: # endif
685:
686: # ifdef YYSTACK_ALLOC
687: /* Pacify GCC's `empty if-body' warning. */
688: # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
689: # else
690: # if defined (__STDC__) || defined (__cplusplus)
691: # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
692: # define YYSIZE_T size_t
693: # endif
694: # define YYSTACK_ALLOC malloc
695: # define YYSTACK_FREE free
696: # endif
697: #endif /* ! defined (yyoverflow) || defined (YYERROR_VERBOSE) */
698:
699:
700: #if (! defined (yyoverflow) \
701: && (! defined (__cplusplus) \
702: || (YYLTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
703:
704: /* A type that is properly aligned for any stack member. */
705: union yyalloc
706: {
707: short yyss;
708: YYSTYPE yyvs;
709: # if YYLSP_NEEDED
710: YYLTYPE yyls;
711: # endif
1.1 noro 712: };
1.5 noro 713:
714: /* The size of the maximum gap between one aligned stack and the next. */
715: # define YYSTACK_GAP_MAX (sizeof (union yyalloc) - 1)
716:
717: /* The size of an array large to enough to hold all stacks, each with
718: N elements. */
719: # if YYLSP_NEEDED
720: # define YYSTACK_BYTES(N) \
721: ((N) * (sizeof (short) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
722: + 2 * YYSTACK_GAP_MAX)
723: # else
724: # define YYSTACK_BYTES(N) \
725: ((N) * (sizeof (short) + sizeof (YYSTYPE)) \
726: + YYSTACK_GAP_MAX)
727: # endif
728:
729: /* Copy COUNT objects from FROM to TO. The source and destination do
730: not overlap. */
731: # ifndef YYCOPY
732: # if 1 < __GNUC__
733: # define YYCOPY(To, From, Count) \
734: __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
735: # else
736: # define YYCOPY(To, From, Count) \
737: do \
738: { \
739: register YYSIZE_T yyi; \
740: for (yyi = 0; yyi < (Count); yyi++) \
741: (To)[yyi] = (From)[yyi]; \
742: } \
743: while (0)
744: # endif
745: # endif
746:
747: /* Relocate STACK from its old location to the new one. The
748: local variables YYSIZE and YYSTACKSIZE give the old and new number of
749: elements in the stack, and YYPTR gives the new location of the
750: stack. Advance YYPTR to a properly aligned location for the next
751: stack. */
752: # define YYSTACK_RELOCATE(Stack) \
753: do \
754: { \
755: YYSIZE_T yynewbytes; \
756: YYCOPY (&yyptr->Stack, Stack, yysize); \
757: Stack = &yyptr->Stack; \
758: yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAX; \
759: yyptr += yynewbytes / sizeof (*yyptr); \
760: } \
761: while (0)
762:
763: #endif
764:
765:
766: #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
767: # define YYSIZE_T __SIZE_TYPE__
768: #endif
769: #if ! defined (YYSIZE_T) && defined (size_t)
770: # define YYSIZE_T size_t
1.1 noro 771: #endif
1.5 noro 772: #if ! defined (YYSIZE_T)
773: # if defined (__STDC__) || defined (__cplusplus)
774: # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
775: # define YYSIZE_T size_t
776: # endif
777: #endif
778: #if ! defined (YYSIZE_T)
779: # define YYSIZE_T unsigned int
780: #endif
781:
782: #define yyerrok (yyerrstatus = 0)
783: #define yyclearin (yychar = YYEMPTY)
784: #define YYEMPTY -2
785: #define YYEOF 0
786: #define YYACCEPT goto yyacceptlab
787: #define YYABORT goto yyabortlab
788: #define YYERROR goto yyerrlab1
789: /* Like YYERROR except do call yyerror. This remains here temporarily
790: to ease the transition to the new meaning of YYERROR, for GCC.
791: Once GCC version 2 has supplanted version 1, this can go. */
792: #define YYFAIL goto yyerrlab
793: #define YYRECOVERING() (!!yyerrstatus)
794: #define YYBACKUP(Token, Value) \
795: do \
796: if (yychar == YYEMPTY && yylen == 1) \
797: { \
798: yychar = (Token); \
799: yylval = (Value); \
800: yychar1 = YYTRANSLATE (yychar); \
801: YYPOPSTACK; \
802: goto yybackup; \
803: } \
804: else \
805: { \
806: yyerror ("syntax error: cannot back up"); \
807: YYERROR; \
808: } \
809: while (0)
810:
811: #define YYTERROR 1
812: #define YYERRCODE 256
813:
814:
815: /* YYLLOC_DEFAULT -- Compute the default location (before the actions
816: are run).
817:
818: When YYLLOC_DEFAULT is run, CURRENT is set the location of the
819: first token. By default, to implement support for ranges, extend
820: its range to the last symbol. */
821:
822: #ifndef YYLLOC_DEFAULT
823: # define YYLLOC_DEFAULT(Current, Rhs, N) \
824: Current.last_line = Rhs[N].last_line; \
825: Current.last_column = Rhs[N].last_column;
826: #endif
827:
828:
829: /* YYLEX -- calling `yylex' with the right arguments. */
830:
831: #if YYPURE
832: # if YYLSP_NEEDED
833: # ifdef YYLEX_PARAM
834: # define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM)
835: # else
836: # define YYLEX yylex (&yylval, &yylloc)
837: # endif
838: # else /* !YYLSP_NEEDED */
839: # ifdef YYLEX_PARAM
840: # define YYLEX yylex (&yylval, YYLEX_PARAM)
841: # else
842: # define YYLEX yylex (&yylval)
843: # endif
844: # endif /* !YYLSP_NEEDED */
845: #else /* !YYPURE */
846: # define YYLEX yylex ()
847: #endif /* !YYPURE */
848:
849:
850: /* Enable debugging if requested. */
1.1 noro 851: #if YYDEBUG
1.5 noro 852:
853: # ifndef YYFPRINTF
854: # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
855: # define YYFPRINTF fprintf
856: # endif
857:
858: # define YYDPRINTF(Args) \
859: do { \
860: if (yydebug) \
861: YYFPRINTF Args; \
862: } while (0)
863: /* Nonzero means print parse trace. It is left uninitialized so that
864: multiple parsers can coexist. */
865: int yydebug;
866: #else /* !YYDEBUG */
867: # define YYDPRINTF(Args)
868: #endif /* !YYDEBUG */
869:
870: /* YYINITDEPTH -- initial size of the parser's stacks. */
871: #ifndef YYINITDEPTH
872: # define YYINITDEPTH 200
873: #endif
874:
875: /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
876: if the built-in stack extension method is used).
877:
878: Do not make this value too large; the results are undefined if
879: SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH)
880: evaluated with infinite-precision integer arithmetic. */
881:
882: #if YYMAXDEPTH == 0
883: # undef YYMAXDEPTH
884: #endif
885:
886: #ifndef YYMAXDEPTH
887: # define YYMAXDEPTH 10000
1.1 noro 888: #endif
1.5 noro 889:
890: #ifdef YYERROR_VERBOSE
891:
892: # ifndef yystrlen
893: # if defined (__GLIBC__) && defined (_STRING_H)
894: # define yystrlen strlen
895: # else
896: /* Return the length of YYSTR. */
897: static YYSIZE_T
898: # if defined (__STDC__) || defined (__cplusplus)
899: yystrlen (const char *yystr)
900: # else
901: yystrlen (yystr)
902: const char *yystr;
903: # endif
904: {
905: register const char *yys = yystr;
906:
907: while (*yys++ != '\0')
908: continue;
909:
910: return yys - yystr - 1;
911: }
912: # endif
913: # endif
914:
915: # ifndef yystpcpy
916: # if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
917: # define yystpcpy stpcpy
918: # else
919: /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
920: YYDEST. */
921: static char *
922: # if defined (__STDC__) || defined (__cplusplus)
923: yystpcpy (char *yydest, const char *yysrc)
924: # else
925: yystpcpy (yydest, yysrc)
926: char *yydest;
927: const char *yysrc;
928: # endif
929: {
930: register char *yyd = yydest;
931: register const char *yys = yysrc;
932:
933: while ((*yyd++ = *yys++) != '\0')
934: continue;
935:
936: return yyd - 1;
937: }
938: # endif
939: # endif
1.1 noro 940: #endif
1.5 noro 941:
942: #line 315 "/usr/share/bison/bison.simple"
943:
944:
945: /* The user can define YYPARSE_PARAM as the name of an argument to be passed
946: into yyparse. The argument should have type void *.
947: It should actually point to an object.
948: Grammar actions can access the variable by casting it
949: to the proper pointer type. */
950:
951: #ifdef YYPARSE_PARAM
952: # if defined (__STDC__) || defined (__cplusplus)
953: # define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
954: # define YYPARSE_PARAM_DECL
955: # else
956: # define YYPARSE_PARAM_ARG YYPARSE_PARAM
957: # define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
958: # endif
959: #else /* !YYPARSE_PARAM */
960: # define YYPARSE_PARAM_ARG
961: # define YYPARSE_PARAM_DECL
962: #endif /* !YYPARSE_PARAM */
963:
964: /* Prevent warning if -Wstrict-prototypes. */
965: #ifdef __GNUC__
966: # ifdef YYPARSE_PARAM
967: int yyparse (void *);
968: # else
969: int yyparse (void);
970: # endif
1.1 noro 971: #endif
1.5 noro 972:
973: /* YY_DECL_VARIABLES -- depending whether we use a pure parser,
974: variables are global, or local to YYPARSE. */
975:
976: #define YY_DECL_NON_LSP_VARIABLES \
977: /* The lookahead symbol. */ \
978: int yychar; \
979: \
980: /* The semantic value of the lookahead symbol. */ \
981: YYSTYPE yylval; \
982: \
983: /* Number of parse errors so far. */ \
1.1 noro 984: int yynerrs;
985:
1.5 noro 986: #if YYLSP_NEEDED
987: # define YY_DECL_VARIABLES \
988: YY_DECL_NON_LSP_VARIABLES \
989: \
990: /* Location data for the lookahead symbol. */ \
991: YYLTYPE yylloc;
992: #else
993: # define YY_DECL_VARIABLES \
994: YY_DECL_NON_LSP_VARIABLES
995: #endif
996:
997:
998: /* If nonreentrant, generate the variables here. */
999:
1000: #if !YYPURE
1001: YY_DECL_VARIABLES
1002: #endif /* !YYPURE */
1.1 noro 1003:
1004: int
1005: yyparse (YYPARSE_PARAM_ARG)
1.5 noro 1006: YYPARSE_PARAM_DECL
1.1 noro 1007: {
1.5 noro 1008: /* If reentrant, generate the variables here. */
1009: #if YYPURE
1010: YY_DECL_VARIABLES
1011: #endif /* !YYPURE */
1012:
1013: register int yystate;
1014: register int yyn;
1015: int yyresult;
1016: /* Number of tokens to shift before error messages enabled. */
1017: int yyerrstatus;
1018: /* Lookahead token as an internal (translated) token number. */
1019: int yychar1 = 0;
1020:
1021: /* Three stacks and their tools:
1022: `yyss': related to states,
1023: `yyvs': related to semantic values,
1024: `yyls': related to locations.
1025:
1026: Refer to the stacks thru separate pointers, to allow yyoverflow
1027: to reallocate them elsewhere. */
1028:
1029: /* The state stack. */
1030: short yyssa[YYINITDEPTH];
1031: short *yyss = yyssa;
1032: register short *yyssp;
1033:
1034: /* The semantic value stack. */
1035: YYSTYPE yyvsa[YYINITDEPTH];
1036: YYSTYPE *yyvs = yyvsa;
1037: register YYSTYPE *yyvsp;
1038:
1039: #if YYLSP_NEEDED
1040: /* The location stack. */
1041: YYLTYPE yylsa[YYINITDEPTH];
1042: YYLTYPE *yyls = yylsa;
1043: YYLTYPE *yylsp;
1044: #endif
1045:
1046: #if YYLSP_NEEDED
1047: # define YYPOPSTACK (yyvsp--, yyssp--, yylsp--)
1048: #else
1049: # define YYPOPSTACK (yyvsp--, yyssp--)
1050: #endif
1051:
1052: YYSIZE_T yystacksize = YYINITDEPTH;
1053:
1054:
1055: /* The variables used to return semantic value and location from the
1056: action routines. */
1057: YYSTYPE yyval;
1058: #if YYLSP_NEEDED
1059: YYLTYPE yyloc;
1060: #endif
1061:
1062: /* When reducing, the number of symbols on the RHS of the reduced
1063: rule. */
1064: int yylen;
1065:
1066: YYDPRINTF ((stderr, "Starting parse\n"));
1067:
1068: yystate = 0;
1069: yyerrstatus = 0;
1070: yynerrs = 0;
1071: yychar = YYEMPTY; /* Cause a token to be read. */
1072:
1073: /* Initialize stack pointers.
1074: Waste one element of value and location stack
1075: so that they stay on the same level as the state stack.
1076: The wasted elements are never initialized. */
1.1 noro 1077:
1.5 noro 1078: yyssp = yyss;
1079: yyvsp = yyvs;
1080: #if YYLSP_NEEDED
1081: yylsp = yyls;
1.1 noro 1082: #endif
1.5 noro 1083: goto yysetstate;
1084:
1085: /*------------------------------------------------------------.
1086: | yynewstate -- Push a new state, which is found in yystate. |
1087: `------------------------------------------------------------*/
1088: yynewstate:
1089: /* In all cases, when you get here, the value and location stacks
1090: have just been pushed. so pushing a state here evens the stacks.
1091: */
1092: yyssp++;
1.1 noro 1093:
1.5 noro 1094: yysetstate:
1095: *yyssp = yystate;
1096:
1097: if (yyssp >= yyss + yystacksize - 1)
1.1 noro 1098: {
1.5 noro 1099: /* Get the current used size of the three stacks, in elements. */
1100: YYSIZE_T yysize = yyssp - yyss + 1;
1101:
1102: #ifdef yyoverflow
1103: {
1104: /* Give user a chance to reallocate the stack. Use copies of
1105: these so that the &'s don't force the real ones into
1106: memory. */
1107: YYSTYPE *yyvs1 = yyvs;
1108: short *yyss1 = yyss;
1109:
1110: /* Each stack pointer address is followed by the size of the
1111: data in use in that stack, in bytes. */
1112: # if YYLSP_NEEDED
1113: YYLTYPE *yyls1 = yyls;
1114: /* This used to be a conditional around just the two extra args,
1115: but that might be undefined if yyoverflow is a macro. */
1116: yyoverflow ("parser stack overflow",
1117: &yyss1, yysize * sizeof (*yyssp),
1118: &yyvs1, yysize * sizeof (*yyvsp),
1119: &yyls1, yysize * sizeof (*yylsp),
1120: &yystacksize);
1121: yyls = yyls1;
1122: # else
1123: yyoverflow ("parser stack overflow",
1124: &yyss1, yysize * sizeof (*yyssp),
1125: &yyvs1, yysize * sizeof (*yyvsp),
1126: &yystacksize);
1127: # endif
1128: yyss = yyss1;
1129: yyvs = yyvs1;
1130: }
1131: #else /* no yyoverflow */
1132: # ifndef YYSTACK_RELOCATE
1133: goto yyoverflowlab;
1134: # else
1135: /* Extend the stack our own way. */
1136: if (yystacksize >= YYMAXDEPTH)
1137: goto yyoverflowlab;
1138: yystacksize *= 2;
1139: if (yystacksize > YYMAXDEPTH)
1140: yystacksize = YYMAXDEPTH;
1141:
1142: {
1143: short *yyss1 = yyss;
1144: union yyalloc *yyptr =
1145: (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1146: if (! yyptr)
1147: goto yyoverflowlab;
1148: YYSTACK_RELOCATE (yyss);
1149: YYSTACK_RELOCATE (yyvs);
1150: # if YYLSP_NEEDED
1151: YYSTACK_RELOCATE (yyls);
1152: # endif
1153: # undef YYSTACK_RELOCATE
1154: if (yyss1 != yyssa)
1155: YYSTACK_FREE (yyss1);
1156: }
1157: # endif
1158: #endif /* no yyoverflow */
1159:
1160: yyssp = yyss + yysize - 1;
1161: yyvsp = yyvs + yysize - 1;
1162: #if YYLSP_NEEDED
1163: yylsp = yyls + yysize - 1;
1.1 noro 1164: #endif
1.5 noro 1165:
1166: YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1167: (unsigned long int) yystacksize));
1168:
1169: if (yyssp >= yyss + yystacksize - 1)
1170: YYABORT;
1.1 noro 1171: }
1.5 noro 1172:
1173: YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1174:
1175: goto yybackup;
1176:
1177:
1178: /*-----------.
1179: | yybackup. |
1180: `-----------*/
1181: yybackup:
1182:
1183: /* Do appropriate processing given the current state. */
1184: /* Read a lookahead token if we need one and don't already have one. */
1185: /* yyresume: */
1186:
1187: /* First try to decide what to do without reference to lookahead token. */
1188:
1189: yyn = yypact[yystate];
1190: if (yyn == YYFLAG)
1191: goto yydefault;
1192:
1193: /* Not known => get a lookahead token if don't already have one. */
1194:
1195: /* yychar is either YYEMPTY or YYEOF
1196: or a valid token in external form. */
1197:
1198: if (yychar == YYEMPTY)
1.1 noro 1199: {
1.5 noro 1200: YYDPRINTF ((stderr, "Reading a token: "));
1201: yychar = YYLEX;
1.1 noro 1202: }
1.5 noro 1203:
1204: /* Convert token to internal form (in yychar1) for indexing tables with */
1205:
1206: if (yychar <= 0) /* This means end of input. */
1.1 noro 1207: {
1.5 noro 1208: yychar1 = 0;
1209: yychar = YYEOF; /* Don't call YYLEX any more */
1210:
1211: YYDPRINTF ((stderr, "Now at end of input.\n"));
1.1 noro 1212: }
1.5 noro 1213: else
1.1 noro 1214: {
1.5 noro 1215: yychar1 = YYTRANSLATE (yychar);
1216:
1.1 noro 1217: #if YYDEBUG
1.5 noro 1218: /* We have to keep this `#if YYDEBUG', since we use variables
1219: which are defined only if `YYDEBUG' is set. */
1220: if (yydebug)
1221: {
1222: YYFPRINTF (stderr, "Next token is %d (%s",
1223: yychar, yytname[yychar1]);
1224: /* Give the individual parser a way to print the precise
1225: meaning of a token, for further debugging info. */
1226: # ifdef YYPRINT
1227: YYPRINT (stderr, yychar, yylval);
1228: # endif
1229: YYFPRINTF (stderr, ")\n");
1230: }
1231: #endif
1.1 noro 1232: }
1.5 noro 1233:
1234: yyn += yychar1;
1235: if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
1236: goto yydefault;
1237:
1238: yyn = yytable[yyn];
1239:
1240: /* yyn is what to do for this token type in this state.
1241: Negative => reduce, -yyn is rule number.
1242: Positive => shift, yyn is new state.
1243: New state is final state => don't bother to shift,
1244: just return success.
1245: 0, or most negative number => error. */
1246:
1247: if (yyn < 0)
1.1 noro 1248: {
1.5 noro 1249: if (yyn == YYFLAG)
1250: goto yyerrlab;
1251: yyn = -yyn;
1252: goto yyreduce;
1253: }
1254: else if (yyn == 0)
1255: goto yyerrlab;
1256:
1257: if (yyn == YYFINAL)
1258: YYACCEPT;
1259:
1260: /* Shift the lookahead token. */
1261: YYDPRINTF ((stderr, "Shifting token %d (%s), ",
1262: yychar, yytname[yychar1]));
1263:
1264: /* Discard the token being shifted unless it is eof. */
1265: if (yychar != YYEOF)
1266: yychar = YYEMPTY;
1267:
1268: *++yyvsp = yylval;
1269: #if YYLSP_NEEDED
1270: *++yylsp = yylloc;
1.1 noro 1271: #endif
1.5 noro 1272:
1273: /* Count tokens shifted since error; after three, turn off error
1274: status. */
1275: if (yyerrstatus)
1276: yyerrstatus--;
1277:
1278: yystate = yyn;
1279: goto yynewstate;
1280:
1281:
1282: /*-----------------------------------------------------------.
1283: | yydefault -- do the default action for the current state. |
1284: `-----------------------------------------------------------*/
1285: yydefault:
1286: yyn = yydefact[yystate];
1287: if (yyn == 0)
1288: goto yyerrlab;
1289: goto yyreduce;
1290:
1291:
1292: /*-----------------------------.
1293: | yyreduce -- Do a reduction. |
1294: `-----------------------------*/
1.1 noro 1295: yyreduce:
1.5 noro 1296: /* yyn is the number of a rule to reduce with. */
1297: yylen = yyr2[yyn];
1298:
1299: /* If YYLEN is nonzero, implement the default value of the action:
1300: `$$ = $1'.
1301:
1302: Otherwise, the following line sets YYVAL to the semantic value of
1303: the lookahead token. This behavior is undocumented and Bison
1304: users should not rely upon it. Assigning to YYVAL
1305: unconditionally makes the parser a bit smaller, and it avoids a
1306: GCC warning that YYVAL may be used uninitialized. */
1307: yyval = yyvsp[1-yylen];
1308:
1309: #if YYLSP_NEEDED
1310: /* Similarly for the default location. Let the user run additional
1311: commands if for instance locations are ranges. */
1312: yyloc = yylsp[1-yylen];
1313: YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
1314: #endif
1315:
1.1 noro 1316: #if YYDEBUG
1.5 noro 1317: /* We have to keep this `#if YYDEBUG', since we use variables which
1318: are defined only if `YYDEBUG' is set. */
1319: if (yydebug)
1.1 noro 1320: {
1.5 noro 1321: int yyi;
1322:
1323: YYFPRINTF (stderr, "Reducing via rule %d (line %d), ",
1324: yyn, yyrline[yyn]);
1325:
1326: /* Print the symbols being reduced, and their result. */
1327: for (yyi = yyprhs[yyn]; yyrhs[yyi] > 0; yyi++)
1328: YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]);
1329: YYFPRINTF (stderr, " -> %s\n", yytname[yyr1[yyn]]);
1330: }
1331: #endif
1332:
1333: switch (yyn) {
1334:
1.1 noro 1335: case 1:
1.4 noro 1336: #line 131 "parse.y"
1.5 noro 1337: {
1338: parse_snode = yyvsp[0].s;
1339: if ( yychar >= 0 )
1340: fprintf(stderr,
1341: "Warning: a token was wasted after an 'if' statement without 'else'.\n");
1342: YYACCEPT;
1343: }
1344: break;
1.1 noro 1345: case 2:
1.5 noro 1346: #line 140 "parse.y"
1.1 noro 1347: { yyval.s = 0; }
1.5 noro 1348: break;
1.1 noro 1349: case 3:
1.5 noro 1350: #line 141 "parse.y"
1.1 noro 1351: { gdef=1; }
1.5 noro 1352: break;
1.1 noro 1353: case 4:
1.5 noro 1354: #line 141 "parse.y"
1.1 noro 1355: { gdef=0; }
1.5 noro 1356: break;
1.1 noro 1357: case 5:
1.5 noro 1358: #line 142 "parse.y"
1.4 noro 1359: { yyval.s = 0; NOPR; }
1.5 noro 1360: break;
1.1 noro 1361: case 6:
1.5 noro 1362: #line 143 "parse.y"
1.4 noro 1363: { mgdef=1; }
1.5 noro 1364: break;
1.1 noro 1365: case 7:
1.5 noro 1366: #line 143 "parse.y"
1.4 noro 1367: { mgdef=0; }
1.5 noro 1368: break;
1.1 noro 1369: case 8:
1.5 noro 1370: #line 144 "parse.y"
1.4 noro 1371: { yyval.s = 0; NOPR; }
1.5 noro 1372: break;
1.1 noro 1373: case 9:
1.5 noro 1374: #line 145 "parse.y"
1.4 noro 1375: { ldef=1; }
1.5 noro 1376: break;
1.1 noro 1377: case 10:
1.5 noro 1378: #line 145 "parse.y"
1.4 noro 1379: { ldef=0; }
1.5 noro 1380: break;
1.1 noro 1381: case 11:
1.5 noro 1382: #line 146 "parse.y"
1.4 noro 1383: { yyval.s = 0; NOPR; }
1.5 noro 1384: break;
1.1 noro 1385: case 12:
1.5 noro 1386: #line 148 "parse.y"
1.4 noro 1387: { appenduflist(yyvsp[-1].n); yyval.s = 0; NOPR; }
1.5 noro 1388: break;
1.1 noro 1389: case 13:
1.5 noro 1390: #line 150 "parse.y"
1.4 noro 1391: { structdef(yyvsp[-4].p,yyvsp[-2].n); yyval.s = 0; NOPR; }
1.5 noro 1392: break;
1.1 noro 1393: case 14:
1.5 noro 1394: #line 152 "parse.y"
1.4 noro 1395: { yyval.s = mksnode(1,S_SINGLE,yyvsp[-1].f); }
1.5 noro 1396: break;
1.1 noro 1397: case 15:
1.5 noro 1398: #line 154 "parse.y"
1.4 noro 1399: { yyval.s = yyvsp[0].s; }
1.5 noro 1400: break;
1.1 noro 1401: case 16:
1.5 noro 1402: #line 156 "parse.y"
1.4 noro 1403: { yyval.s = mksnode(0,S_BREAK); }
1.5 noro 1404: break;
1.1 noro 1405: case 17:
1.5 noro 1406: #line 158 "parse.y"
1.4 noro 1407: { yyval.s = mksnode(0,S_CONTINUE); }
1.5 noro 1408: break;
1.1 noro 1409: case 18:
1.5 noro 1410: #line 160 "parse.y"
1.4 noro 1411: { yyval.s = mksnode(1,S_RETURN,0); }
1.5 noro 1412: break;
1.1 noro 1413: case 19:
1.5 noro 1414: #line 162 "parse.y"
1.4 noro 1415: { yyval.s = mksnode(1,S_RETURN,yyvsp[-1].f); }
1.5 noro 1416: break;
1.1 noro 1417: case 20:
1.5 noro 1418: #line 164 "parse.y"
1.4 noro 1419: { yyval.s = mksnode(4,S_IFELSE,yyvsp[-4].i,yyvsp[-2].n,yyvsp[0].s,0); yyvsp[0].s?yyval.s->ln=yyvsp[0].s->ln:0; NOPR; }
1.5 noro 1420: break;
1.1 noro 1421: case 21:
1.5 noro 1422: #line 166 "parse.y"
1.4 noro 1423: { yyval.s = mksnode(4,S_IFELSE,yyvsp[-6].i,yyvsp[-4].n,yyvsp[-2].s,yyvsp[0].s); yyvsp[0].s?yyval.s->ln=yyvsp[0].s->ln:0; NOPR; }
1.5 noro 1424: break;
1.4 noro 1425: case 22:
1.5 noro 1426: #line 168 "parse.y"
1.4 noro 1427: { yyval.s = mksnode(5,S_FOR,yyvsp[-8].i,yyvsp[-6].n,yyvsp[-4].n?yyvsp[-4].n:ONENODE,yyvsp[-2].n,yyvsp[0].s); yyvsp[0].s?yyval.s->ln=yyvsp[0].s->ln:0; NOPR; }
1.5 noro 1428: break;
1.4 noro 1429: case 23:
1.5 noro 1430: #line 170 "parse.y"
1.4 noro 1431: { yyval.s = mksnode(5,S_FOR,yyvsp[-4].i,0,yyvsp[-2].n,0,yyvsp[0].s); yyvsp[0].s?yyval.s->ln=yyvsp[0].s->ln:0; NOPR; }
1.5 noro 1432: break;
1.4 noro 1433: case 24:
1.5 noro 1434: #line 172 "parse.y"
1.4 noro 1435: { yyval.s = mksnode(3,S_DO,yyvsp[-6].i,yyvsp[-5].s,yyvsp[-2].n); }
1.5 noro 1436: break;
1.4 noro 1437: case 25:
1.5 noro 1438: #line 174 "parse.y"
1.4 noro 1439: { yyval.s = mksnode(3,S_PFDEF,yyvsp[-7].p,yyvsp[-5].n,yyvsp[-1].f); NOPR; }
1.5 noro 1440: break;
1.4 noro 1441: case 26:
1.5 noro 1442: #line 176 "parse.y"
1.4 noro 1443: { yyval.s = mksnode(3,S_PFDEF,yyvsp[-4].p,yyvsp[-2].n,0); NOPR; }
1.5 noro 1444: break;
1.4 noro 1445: case 27:
1.5 noro 1446: #line 177 "parse.y"
1.4 noro 1447: { mkpvs(yyvsp[0].p); }
1.5 noro 1448: break;
1.4 noro 1449: case 28:
1.5 noro 1450: #line 177 "parse.y"
1.4 noro 1451: { ldef = 1; }
1.5 noro 1452: break;
1.4 noro 1453: case 29:
1.5 noro 1454: #line 177 "parse.y"
1.4 noro 1455: { ldef = -1; }
1.5 noro 1456: break;
1.4 noro 1457: case 30:
1.5 noro 1458: #line 178 "parse.y"
1.1 noro 1459: {
1.4 noro 1460: mkuf(yyvsp[-10].p,asir_infile->name,yyvsp[-6].n,
1461: mksnode(1,S_CPLX,yyvsp[-1].n),yyvsp[-11].i,asir_infile->ln,yyvsp[-3].p,CUR_MODULE);
1.1 noro 1462: yyval.s = 0; NOPR;
1463: }
1.5 noro 1464: break;
1.4 noro 1465: case 31:
1.5 noro 1466: #line 184 "parse.y"
1.4 noro 1467: { CUR_MODULE = mkmodule(yyvsp[-1].p); MPVS = CUR_MODULE->pvs; yyval.s = 0; NOPR; }
1.5 noro 1468: break;
1.4 noro 1469: case 32:
1.5 noro 1470: #line 186 "parse.y"
1.4 noro 1471: { CUR_MODULE = 0; MPVS = 0; yyval.s = 0; NOPR; }
1.5 noro 1472: break;
1.4 noro 1473: case 33:
1.5 noro 1474: #line 188 "parse.y"
1.1 noro 1475: { yyerrok; yyval.s = 0; }
1.5 noro 1476: break;
1.4 noro 1477: case 34:
1.5 noro 1478: #line 191 "parse.y"
1.1 noro 1479: { if ( main_parser ) prresult = 1; }
1.5 noro 1480: break;
1.4 noro 1481: case 35:
1.5 noro 1482: #line 193 "parse.y"
1.1 noro 1483: { if ( main_parser ) prresult = 0; }
1.5 noro 1484: break;
1.4 noro 1485: case 36:
1.5 noro 1486: #line 196 "parse.y"
1.1 noro 1487: { yyval.p = 0; }
1.5 noro 1488: break;
1.4 noro 1489: case 37:
1.5 noro 1490: #line 198 "parse.y"
1.1 noro 1491: { yyval.p = yyvsp[0].p; }
1.5 noro 1492: break;
1.4 noro 1493: case 38:
1.5 noro 1494: #line 201 "parse.y"
1.1 noro 1495: { yyval.s = mksnode(1,S_CPLX,yyvsp[-1].n); }
1.5 noro 1496: break;
1.4 noro 1497: case 39:
1.5 noro 1498: #line 204 "parse.y"
1.4 noro 1499: { MKNODE(yyval.n,yyvsp[0].p,0); }
1.5 noro 1500: break;
1.4 noro 1501: case 40:
1.5 noro 1502: #line 206 "parse.y"
1.4 noro 1503: { appendtonode(yyvsp[-2].n,yyvsp[0].p,&yyval.n); }
1.5 noro 1504: break;
1.4 noro 1505: case 41:
1.5 noro 1506: #line 209 "parse.y"
1.1 noro 1507: { MKNODE(yyval.n,yyvsp[0].p,0); }
1.5 noro 1508: break;
1.4 noro 1509: case 42:
1.5 noro 1510: #line 211 "parse.y"
1.1 noro 1511: { appendtonode(yyvsp[-2].n,yyvsp[0].p,&yyval.n); }
1.5 noro 1512: break;
1.4 noro 1513: case 43:
1.5 noro 1514: #line 214 "parse.y"
1.1 noro 1515: { val = (pointer)makepvar(yyvsp[0].p); MKNODE(yyval.n,val,0); }
1.5 noro 1516: break;
1.4 noro 1517: case 44:
1.5 noro 1518: #line 216 "parse.y"
1.1 noro 1519: { appendtonode(yyvsp[-2].n,(pointer)makepvar(yyvsp[0].p),&yyval.n); }
1.5 noro 1520: break;
1.4 noro 1521: case 45:
1.5 noro 1522: #line 219 "parse.y"
1.1 noro 1523: { yyval.n = 0; }
1.5 noro 1524: break;
1.4 noro 1525: case 46:
1.5 noro 1526: #line 221 "parse.y"
1.1 noro 1527: { appendtonode(yyvsp[-1].n,(pointer)yyvsp[0].s,&yyval.n); }
1.5 noro 1528: break;
1.4 noro 1529: case 47:
1.5 noro 1530: #line 224 "parse.y"
1.1 noro 1531: { yyval.n = 0; }
1.5 noro 1532: break;
1.4 noro 1533: case 48:
1.5 noro 1534: #line 226 "parse.y"
1.1 noro 1535: { yyval.n = yyvsp[0].n; }
1.5 noro 1536: break;
1.4 noro 1537: case 49:
1.5 noro 1538: #line 229 "parse.y"
1.1 noro 1539: { MKNODE(yyval.n,yyvsp[0].f,0); }
1.5 noro 1540: break;
1.4 noro 1541: case 50:
1.5 noro 1542: #line 231 "parse.y"
1.1 noro 1543: { appendtonode(yyvsp[-2].n,(pointer)yyvsp[0].f,&yyval.n); }
1.5 noro 1544: break;
1.4 noro 1545: case 51:
1.5 noro 1546: #line 234 "parse.y"
1.1 noro 1547: { MKNODE(yyval.n,yyvsp[0].f,0); }
1.5 noro 1548: break;
1.4 noro 1549: case 52:
1.5 noro 1550: #line 236 "parse.y"
1.1 noro 1551: { appendtonode(yyvsp[-2].n,(pointer)yyvsp[0].f,&yyval.n); }
1.5 noro 1552: break;
1.4 noro 1553: case 53:
1.5 noro 1554: #line 239 "parse.y"
1.1 noro 1555: { yyval.p = yyvsp[0].p; }
1.5 noro 1556: break;
1.4 noro 1557: case 54:
1.5 noro 1558: #line 241 "parse.y"
1.1 noro 1559: { yyval.p = yyvsp[0].p; }
1.5 noro 1560: break;
1.4 noro 1561: case 55:
1.5 noro 1562: #line 244 "parse.y"
1.1 noro 1563: { yyval.f = mkfnode(2,I_OPT,yyvsp[-2].p,yyvsp[0].f); }
1.5 noro 1564: break;
1.4 noro 1565: case 56:
1.5 noro 1566: #line 247 "parse.y"
1.1 noro 1567: { yyval.f = mkfnode(1,I_STR,yyvsp[0].p); }
1.5 noro 1568: break;
1.4 noro 1569: case 57:
1.5 noro 1570: #line 249 "parse.y"
1.1 noro 1571: { yyval.f = mkfnode(1,I_FORMULA,yyvsp[0].p); }
1.5 noro 1572: break;
1.4 noro 1573: case 58:
1.5 noro 1574: #line 251 "parse.y"
1.1 noro 1575: { yyval.f = mkfnode(1,I_ANS,yyvsp[0].i); }
1.5 noro 1576: break;
1.4 noro 1577: case 59:
1.5 noro 1578: #line 253 "parse.y"
1.1 noro 1579: { yyval.f = mkfnode(0,I_GF2NGEN); }
1.5 noro 1580: break;
1.4 noro 1581: case 60:
1.5 noro 1582: #line 255 "parse.y"
1.1 noro 1583: { yyval.f = mkfnode(0,I_GFPNGEN); }
1.5 noro 1584: break;
1.4 noro 1585: case 61:
1.5 noro 1586: #line 257 "parse.y"
1.3 noro 1587: { yyval.f = mkfnode(0,I_GFSNGEN); }
1.5 noro 1588: break;
1.4 noro 1589: case 62:
1.5 noro 1590: #line 259 "parse.y"
1.1 noro 1591: {
1592: FUNC f;
1593:
1594: searchf(noargsysf,yyvsp[0].p,&f);
1595: if ( f )
1596: yyval.f = mkfnode(2,I_FUNC,f,0);
1597: else {
1598: searchc(yyvsp[0].p,&f);
1599: if ( f )
1600: yyval.f = mkfnode(2,I_FUNC,f,mkfnode(1,I_LIST,0));
1601: else {
1.6 ! noro 1602: gen_searchf(yyvsp[0].p,(FUNC *)&f);
1.1 noro 1603: if ( f )
1604: makesrvar(f,(P *)&val);
1605: else
1606: makevar(yyvsp[0].p,(P *)&val);
1607: yyval.f = mkfnode(1,I_FORMULA,val);
1608: }
1609: }
1610: }
1.5 noro 1611: break;
1.4 noro 1612: case 63:
1.6 ! noro 1613: #line 280 "parse.y"
1.1 noro 1614: {
1.3 noro 1615: gen_searchf(yyvsp[-3].p,(FUNC *)&val);
1.4 noro 1616: print_crossref(val);
1.1 noro 1617: yyval.f = mkfnode(2,I_FUNC,val,mkfnode(1,I_LIST,yyvsp[-1].n));
1618: }
1.5 noro 1619: break;
1.4 noro 1620: case 64:
1.6 ! noro 1621: #line 287 "parse.y"
1.1 noro 1622: {
1.3 noro 1623: gen_searchf(yyvsp[-5].p,(FUNC *)&val);
1.4 noro 1624: print_crossref(val);
1.1 noro 1625: yyval.f = mkfnode(3,I_FUNC_OPT,val,
1626: mkfnode(1,I_LIST,yyvsp[-3].n),mkfnode(1,I_LIST,yyvsp[-1].n));
1627: }
1.5 noro 1628: break;
1.4 noro 1629: case 65:
1.6 ! noro 1630: #line 294 "parse.y"
1.3 noro 1631: {
1632: gen_searchf(yyvsp[-3].p,(FUNC *)&val);
1.4 noro 1633: print_crossref(val);
1.3 noro 1634: yyval.f = mkfnode(2,I_MAP,val,mkfnode(1,I_LIST,yyvsp[-1].n));
1635: }
1.5 noro 1636: break;
1.4 noro 1637: case 66:
1.6 ! noro 1638: #line 300 "parse.y"
1.3 noro 1639: {
1640: gen_searchf(yyvsp[-3].p,(FUNC *)&val);
1.4 noro 1641: print_crossref(val);
1.3 noro 1642: yyval.f = mkfnode(2,I_RECMAP,val,mkfnode(1,I_LIST,yyvsp[-1].n));
1643: }
1.5 noro 1644: break;
1.4 noro 1645: case 67:
1.6 ! noro 1646: #line 306 "parse.y"
1.1 noro 1647: {
1648: searchpf(yyvsp[-6].p,(FUNC *)&val);
1649: yyval.f = mkfnode(2,I_PFDERIV,val,mkfnode(1,I_LIST,yyvsp[-1].n),mkfnode(1,I_LIST,yyvsp[-4].n));
1650: }
1.5 noro 1651: break;
1.4 noro 1652: case 68:
1.6 ! noro 1653: #line 311 "parse.y"
1.3 noro 1654: {
1655: yyval.f = mkfnode(2,I_GETOPT,yyvsp[-1].p);
1656: }
1.5 noro 1657: break;
1.4 noro 1658: case 69:
1.6 ! noro 1659: #line 315 "parse.y"
1.1 noro 1660: {
1.3 noro 1661: yyval.f = mkfnode(2,I_GETOPT,0);
1.1 noro 1662: }
1.5 noro 1663: break;
1.4 noro 1664: case 70:
1.6 ! noro 1665: #line 319 "parse.y"
1.1 noro 1666: {
1.3 noro 1667: yyval.f = mkfnode(3,I_TIMER,yyvsp[-5].f,yyvsp[-3].f,yyvsp[-1].f);
1.1 noro 1668: }
1.5 noro 1669: break;
1.4 noro 1670: case 71:
1.6 ! noro 1671: #line 323 "parse.y"
1.1 noro 1672: {
1.3 noro 1673: searchf(parif,yyvsp[-1].p,(FUNC *)&val);
1674: if ( !val )
1675: mkparif(yyvsp[-1].p,(FUNC *)&val);
1676: yyval.f = mkfnode(2,I_FUNC,val,0);
1.1 noro 1677: }
1.5 noro 1678: break;
1.4 noro 1679: case 72:
1.6 ! noro 1680: #line 330 "parse.y"
1.1 noro 1681: {
1682: searchf(parif,yyvsp[-3].p,(FUNC *)&val);
1683: if ( !val )
1684: mkparif(yyvsp[-3].p,(FUNC *)&val);
1685: yyval.f = mkfnode(2,I_FUNC,val,mkfnode(1,I_LIST,yyvsp[-1].n));
1686: }
1.5 noro 1687: break;
1.4 noro 1688: case 73:
1.6 ! noro 1689: #line 337 "parse.y"
1.1 noro 1690: {
1691: yyval.f = mkfnode(2,I_IFUNC,yyvsp[-4].f,mkfnode(1,I_LIST,yyvsp[-1].n));
1692: }
1.5 noro 1693: break;
1.4 noro 1694: case 74:
1.6 ! noro 1695: #line 341 "parse.y"
1.1 noro 1696: { yyval.f = mkfnode(1,I_CAR,yyvsp[-1].f); }
1.5 noro 1697: break;
1.4 noro 1698: case 75:
1.6 ! noro 1699: #line 343 "parse.y"
1.1 noro 1700: { yyval.f = mkfnode(1,I_CDR,yyvsp[-1].f); }
1.5 noro 1701: break;
1.4 noro 1702: case 76:
1.6 ! noro 1703: #line 345 "parse.y"
1.3 noro 1704: { yyval.f = mkfnode(1,I_PAREN,yyvsp[-1].f); }
1.5 noro 1705: break;
1.4 noro 1706: case 77:
1.6 ! noro 1707: #line 347 "parse.y"
1.1 noro 1708: {
1.4 noro 1709: if ( main_parser || allow_create_var )
1.1 noro 1710: yyval.f = mkfnode(2,I_PVAR,makepvar(yyvsp[0].p),0);
1711: else {
1712: ind = searchpvar(yyvsp[0].p);
1713: if ( ind == -1 ) {
1714: fprintf(stderr,"%s : no such variable.\n",yyvsp[0].p);
1715: YYABORT;
1716: } else
1717: yyval.f = mkfnode(2,I_PVAR,ind,0);
1718: }
1719: }
1.5 noro 1720: break;
1.4 noro 1721: case 78:
1.6 ! noro 1722: #line 360 "parse.y"
1.1 noro 1723: {
1724: if ( yyvsp[-3].f->id == I_PVAR || yyvsp[-3].f->id == I_INDEX ) {
1725: appendtonode((NODE)yyvsp[-3].f->arg[1],(pointer)yyvsp[-1].f,&a);
1726: yyvsp[-3].f->arg[1] = (pointer)a; yyval.f = yyvsp[-3].f;
1727: } else {
1728: MKNODE(a,yyvsp[-1].f,0);
1729: yyval.f = mkfnode(2,I_INDEX,(pointer)yyvsp[-3].f,a);
1730: }
1731: }
1.5 noro 1732: break;
1.4 noro 1733: case 79:
1.6 ! noro 1734: #line 370 "parse.y"
1.1 noro 1735: { yyval.f = mkfnode(2,I_POINT,yyvsp[-2].f,yyvsp[0].p); }
1.5 noro 1736: break;
1.4 noro 1737: case 80:
1.6 ! noro 1738: #line 373 "parse.y"
1.3 noro 1739: { yyval.f = yyvsp[0].f; }
1.5 noro 1740: break;
1.4 noro 1741: case 81:
1.6 ! noro 1742: #line 375 "parse.y"
1.3 noro 1743: { yyval.f = mkfnode(3,I_CAST,structtoindex(yyvsp[-2].p),yyvsp[0].f,0); }
1.5 noro 1744: break;
1.4 noro 1745: case 82:
1.6 ! noro 1746: #line 377 "parse.y"
1.3 noro 1747: { yyval.f = mkfnode(2,I_ASSPVAR,yyvsp[-2].f,yyvsp[0].f); }
1.5 noro 1748: break;
1.4 noro 1749: case 83:
1.6 ! noro 1750: #line 379 "parse.y"
1.3 noro 1751: { yyval.f = mkfnode(2,I_ASSPVAR,yyvsp[-2].f,mkfnode(3,I_BOP,yyvsp[-1].p,yyvsp[-2].f,yyvsp[0].f)); }
1.5 noro 1752: break;
1.4 noro 1753: case 84:
1.6 ! noro 1754: #line 381 "parse.y"
1.3 noro 1755: { yyval.f = mkfnode(2,I_POSTSELF,yyvsp[0].p,yyvsp[-1].f); }
1.5 noro 1756: break;
1.4 noro 1757: case 85:
1.6 ! noro 1758: #line 383 "parse.y"
1.3 noro 1759: { yyval.f = mkfnode(2,I_PRESELF,yyvsp[-1].p,yyvsp[0].f); }
1.5 noro 1760: break;
1.4 noro 1761: case 86:
1.6 ! noro 1762: #line 385 "parse.y"
1.3 noro 1763: { yyval.f = mkfnode(1,I_LIST,yyvsp[-1].n); }
1.5 noro 1764: break;
1.4 noro 1765: case 87:
1.6 ! noro 1766: #line 387 "parse.y"
1.3 noro 1767: { yyval.f = yyvsp[0].f; }
1.5 noro 1768: break;
1.4 noro 1769: case 88:
1.6 ! noro 1770: #line 389 "parse.y"
1.3 noro 1771: { yyval.f = mkfnode(1,I_MINUS,yyvsp[0].f); }
1.5 noro 1772: break;
1.4 noro 1773: case 89:
1.6 ! noro 1774: #line 391 "parse.y"
1.3 noro 1775: { yyval.f = mkfnode(3,I_BOP,yyvsp[-1].p,yyvsp[-2].f,yyvsp[0].f); }
1.5 noro 1776: break;
1.4 noro 1777: case 90:
1.6 ! noro 1778: #line 393 "parse.y"
1.3 noro 1779: { yyval.f = mkfnode(3,I_BOP,yyvsp[-1].p,yyvsp[-2].f,yyvsp[0].f); }
1.5 noro 1780: break;
1.4 noro 1781: case 91:
1.6 ! noro 1782: #line 395 "parse.y"
1.3 noro 1783: { yyval.f = mkfnode(3,I_BOP,yyvsp[-1].p,yyvsp[-2].f,yyvsp[0].f); }
1.5 noro 1784: break;
1.4 noro 1785: case 92:
1.6 ! noro 1786: #line 397 "parse.y"
1.1 noro 1787: { yyval.f = mkfnode(3,I_BOP,yyvsp[-1].p,yyvsp[-2].f,yyvsp[0].f); }
1.5 noro 1788: break;
1.4 noro 1789: case 93:
1.6 ! noro 1790: #line 399 "parse.y"
1.1 noro 1791: { yyval.f = mkfnode(3,I_BOP,yyvsp[-1].p,yyvsp[-2].f,yyvsp[0].f); }
1.5 noro 1792: break;
1.4 noro 1793: case 94:
1.6 ! noro 1794: #line 401 "parse.y"
1.1 noro 1795: { yyval.f = mkfnode(3,I_BOP,yyvsp[-1].p,yyvsp[-2].f,yyvsp[0].f); }
1.5 noro 1796: break;
1.4 noro 1797: case 95:
1.6 ! noro 1798: #line 403 "parse.y"
1.3 noro 1799: { yyval.f = mkfnode(3,I_COP,yyvsp[-1].i,yyvsp[-2].f,yyvsp[0].f); }
1.5 noro 1800: break;
1.4 noro 1801: case 96:
1.6 ! noro 1802: #line 405 "parse.y"
1.3 noro 1803: { yyval.f = mkfnode(1,I_NOT,yyvsp[0].f); }
1.5 noro 1804: break;
1.4 noro 1805: case 97:
1.6 ! noro 1806: #line 407 "parse.y"
1.3 noro 1807: { yyval.f = mkfnode(2,I_OR,yyvsp[-2].f,yyvsp[0].f); }
1.5 noro 1808: break;
1.4 noro 1809: case 98:
1.6 ! noro 1810: #line 409 "parse.y"
1.3 noro 1811: { yyval.f = mkfnode(2,I_AND,yyvsp[-2].f,yyvsp[0].f); }
1.5 noro 1812: break;
1.4 noro 1813: case 99:
1.6 ! noro 1814: #line 411 "parse.y"
1.3 noro 1815: { yyval.f = mkfnode(3,I_LOP,yyvsp[-1].i,yyvsp[0].f,0); }
1.5 noro 1816: break;
1.4 noro 1817: case 100:
1.6 ! noro 1818: #line 413 "parse.y"
1.3 noro 1819: { yyval.f = mkfnode(3,I_LOP,yyvsp[-1].i,yyvsp[-2].f,yyvsp[0].f); }
1.5 noro 1820: break;
1.4 noro 1821: case 101:
1.6 ! noro 1822: #line 415 "parse.y"
1.3 noro 1823: { yyval.f = mkfnode(3,I_LOP,yyvsp[-1].i,yyvsp[-2].f,yyvsp[0].f); }
1.5 noro 1824: break;
1.4 noro 1825: case 102:
1.6 ! noro 1826: #line 417 "parse.y"
1.3 noro 1827: { yyval.f = mkfnode(3,I_LOP,yyvsp[-1].i,yyvsp[-2].f,yyvsp[0].f); }
1.5 noro 1828: break;
1.4 noro 1829: case 103:
1.6 ! noro 1830: #line 419 "parse.y"
1.1 noro 1831: { yyval.f = mkfnode(3,I_LOP,yyvsp[-1].i,yyvsp[-2].f,yyvsp[0].f); }
1.5 noro 1832: break;
1.4 noro 1833: case 104:
1.6 ! noro 1834: #line 421 "parse.y"
1.1 noro 1835: { yyval.f = mkfnode(3,I_LOP,yyvsp[-1].i,yyvsp[-2].f,yyvsp[0].f); }
1.5 noro 1836: break;
1.4 noro 1837: case 105:
1.6 ! noro 1838: #line 423 "parse.y"
1.1 noro 1839: { yyval.f = mkfnode(3,I_LOP,yyvsp[-1].i,yyvsp[-2].f,yyvsp[0].f); }
1.5 noro 1840: break;
1.4 noro 1841: case 106:
1.6 ! noro 1842: #line 425 "parse.y"
1.3 noro 1843: { yyval.f = mkfnode(3,I_CE,yyvsp[-4].f,yyvsp[-2].f,yyvsp[0].f); }
1.5 noro 1844: break;
1.4 noro 1845: case 107:
1.6 ! noro 1846: #line 427 "parse.y"
1.3 noro 1847: { yyval.f = mkfnode(1,I_EV,yyvsp[-1].n); }
1.5 noro 1848: break;
1.4 noro 1849: case 108:
1.6 ! noro 1850: #line 429 "parse.y"
1.3 noro 1851: { yyval.f = mkfnode(1,I_NEWCOMP,(int)structtoindex(yyvsp[-1].p)); }
1.5 noro 1852: break;
1.4 noro 1853: case 109:
1.6 ! noro 1854: #line 431 "parse.y"
1.2 noro 1855: { MKQUOTE(quote,yyvsp[-1].f); yyval.f = mkfnode(1,I_FORMULA,(pointer)quote); }
1.5 noro 1856: break;
1.4 noro 1857: case 110:
1.6 ! noro 1858: #line 433 "parse.y"
1.4 noro 1859: { MKQUOTE(quote,yyvsp[0].f); yyval.f = mkfnode(1,I_FORMULA,(pointer)quote); }
1.5 noro 1860: break;
1861: }
1862:
1863: #line 705 "/usr/share/bison/bison.simple"
1864:
1865:
1866: yyvsp -= yylen;
1867: yyssp -= yylen;
1868: #if YYLSP_NEEDED
1869: yylsp -= yylen;
1870: #endif
1871:
1872: #if YYDEBUG
1873: if (yydebug)
1874: {
1875: short *yyssp1 = yyss - 1;
1876: YYFPRINTF (stderr, "state stack now");
1877: while (yyssp1 != yyssp)
1878: YYFPRINTF (stderr, " %d", *++yyssp1);
1879: YYFPRINTF (stderr, "\n");
1.1 noro 1880: }
1.5 noro 1881: #endif
1882:
1883: *++yyvsp = yyval;
1884: #if YYLSP_NEEDED
1885: *++yylsp = yyloc;
1886: #endif
1887:
1888: /* Now `shift' the result of the reduction. Determine what state
1889: that goes to, based on the state we popped back to and the rule
1890: number reduced by. */
1891:
1892: yyn = yyr1[yyn];
1893:
1894: yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
1895: if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
1896: yystate = yytable[yystate];
1897: else
1898: yystate = yydefgoto[yyn - YYNTBASE];
1899:
1900: goto yynewstate;
1901:
1902:
1903: /*------------------------------------.
1904: | yyerrlab -- here on detecting error |
1905: `------------------------------------*/
1906: yyerrlab:
1907: /* If not already recovering from an error, report this error. */
1908: if (!yyerrstatus)
1909: {
1910: ++yynerrs;
1911:
1912: #ifdef YYERROR_VERBOSE
1913: yyn = yypact[yystate];
1914:
1915: if (yyn > YYFLAG && yyn < YYLAST)
1916: {
1917: YYSIZE_T yysize = 0;
1918: char *yymsg;
1919: int yyx, yycount;
1920:
1921: yycount = 0;
1922: /* Start YYX at -YYN if negative to avoid negative indexes in
1923: YYCHECK. */
1924: for (yyx = yyn < 0 ? -yyn : 0;
1925: yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++)
1926: if (yycheck[yyx + yyn] == yyx)
1927: yysize += yystrlen (yytname[yyx]) + 15, yycount++;
1928: yysize += yystrlen ("parse error, unexpected ") + 1;
1929: yysize += yystrlen (yytname[YYTRANSLATE (yychar)]);
1930: yymsg = (char *) YYSTACK_ALLOC (yysize);
1931: if (yymsg != 0)
1932: {
1933: char *yyp = yystpcpy (yymsg, "parse error, unexpected ");
1934: yyp = yystpcpy (yyp, yytname[YYTRANSLATE (yychar)]);
1935:
1936: if (yycount < 5)
1937: {
1938: yycount = 0;
1939: for (yyx = yyn < 0 ? -yyn : 0;
1940: yyx < (int) (sizeof (yytname) / sizeof (char *));
1941: yyx++)
1942: if (yycheck[yyx + yyn] == yyx)
1943: {
1944: const char *yyq = ! yycount ? ", expecting " : " or ";
1945: yyp = yystpcpy (yyp, yyq);
1946: yyp = yystpcpy (yyp, yytname[yyx]);
1947: yycount++;
1948: }
1949: }
1950: yyerror (yymsg);
1951: YYSTACK_FREE (yymsg);
1952: }
1953: else
1954: yyerror ("parse error; also virtual memory exhausted");
1955: }
1956: else
1957: #endif /* defined (YYERROR_VERBOSE) */
1958: yyerror ("parse error");
1959: }
1960: goto yyerrlab1;
1961:
1962:
1963: /*--------------------------------------------------.
1964: | yyerrlab1 -- error raised explicitly by an action |
1965: `--------------------------------------------------*/
1966: yyerrlab1:
1967: if (yyerrstatus == 3)
1.1 noro 1968: {
1.5 noro 1969: /* If just tried and failed to reuse lookahead token after an
1970: error, discard it. */
1971:
1972: /* return failure if at end of input */
1973: if (yychar == YYEOF)
1974: YYABORT;
1975: YYDPRINTF ((stderr, "Discarding token %d (%s).\n",
1976: yychar, yytname[yychar1]));
1977: yychar = YYEMPTY;
1978: }
1979:
1980: /* Else will try to reuse lookahead token after shifting the error
1981: token. */
1982:
1983: yyerrstatus = 3; /* Each real token shifted decrements this */
1984:
1985: goto yyerrhandle;
1986:
1987:
1988: /*-------------------------------------------------------------------.
1989: | yyerrdefault -- current state does not do anything special for the |
1990: | error token. |
1991: `-------------------------------------------------------------------*/
1992: yyerrdefault:
1993: #if 0
1994: /* This is wrong; only states that explicitly want error tokens
1995: should shift them. */
1996:
1997: /* If its default is to accept any token, ok. Otherwise pop it. */
1998: yyn = yydefact[yystate];
1999: if (yyn)
2000: goto yydefault;
2001: #endif
2002:
2003:
2004: /*---------------------------------------------------------------.
2005: | yyerrpop -- pop the current state because it cannot handle the |
2006: | error token |
2007: `---------------------------------------------------------------*/
2008: yyerrpop:
2009: if (yyssp == yyss)
2010: YYABORT;
2011: yyvsp--;
2012: yystate = *--yyssp;
2013: #if YYLSP_NEEDED
2014: yylsp--;
2015: #endif
2016:
1.1 noro 2017: #if YYDEBUG
1.5 noro 2018: if (yydebug)
2019: {
2020: short *yyssp1 = yyss - 1;
2021: YYFPRINTF (stderr, "Error: state stack now");
2022: while (yyssp1 != yyssp)
2023: YYFPRINTF (stderr, " %d", *++yyssp1);
2024: YYFPRINTF (stderr, "\n");
1.1 noro 2025: }
2026: #endif
1.5 noro 2027:
2028: /*--------------.
2029: | yyerrhandle. |
2030: `--------------*/
2031: yyerrhandle:
2032: yyn = yypact[yystate];
2033: if (yyn == YYFLAG)
2034: goto yyerrdefault;
2035:
2036: yyn += YYTERROR;
2037: if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
2038: goto yyerrdefault;
2039:
2040: yyn = yytable[yyn];
2041: if (yyn < 0)
1.1 noro 2042: {
1.5 noro 2043: if (yyn == YYFLAG)
2044: goto yyerrpop;
2045: yyn = -yyn;
2046: goto yyreduce;
1.1 noro 2047: }
1.5 noro 2048: else if (yyn == 0)
2049: goto yyerrpop;
2050:
2051: if (yyn == YYFINAL)
2052: YYACCEPT;
2053:
2054: YYDPRINTF ((stderr, "Shifting error token, "));
2055:
2056: *++yyvsp = yylval;
2057: #if YYLSP_NEEDED
2058: *++yylsp = yylloc;
2059: #endif
2060:
2061: yystate = yyn;
2062: goto yynewstate;
2063:
2064:
2065: /*-------------------------------------.
2066: | yyacceptlab -- YYACCEPT comes here. |
2067: `-------------------------------------*/
2068: yyacceptlab:
2069: yyresult = 0;
2070: goto yyreturn;
2071:
2072: /*-----------------------------------.
2073: | yyabortlab -- YYABORT comes here. |
2074: `-----------------------------------*/
2075: yyabortlab:
2076: yyresult = 1;
2077: goto yyreturn;
2078:
2079: /*---------------------------------------------.
2080: | yyoverflowab -- parser overflow comes here. |
2081: `---------------------------------------------*/
2082: yyoverflowlab:
2083: yyerror ("parser stack overflow");
2084: yyresult = 2;
2085: /* Fall through. */
2086:
2087: yyreturn:
2088: #ifndef yyoverflow
2089: if (yyss != yyssa)
2090: YYSTACK_FREE (yyss);
2091: #endif
2092: return yyresult;
1.1 noro 2093: }
1.6 ! noro 2094: #line 435 "parse.y"
1.5 noro 2095:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>