Mercurial > repo
comparison interps/c-intercal/parser.c @ 996:859f9b4339e6
<Gregor> tar xf egobot.tar.xz
author | HackBot |
---|---|
date | Sun, 09 Dec 2012 19:30:08 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
995:6883f5911eb7 | 996:859f9b4339e6 |
---|---|
1 /* A Bison parser, made by GNU Bison 2.5. */ | |
2 | |
3 /* Bison implementation for Yacc-like parsers in C | |
4 | |
5 Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc. | |
6 | |
7 This program is free software: you can redistribute it and/or modify | |
8 it under the terms of the GNU General Public License as published by | |
9 the Free Software Foundation, either version 3 of the License, or | |
10 (at your option) any later version. | |
11 | |
12 This program is distributed in the hope that it will be useful, | |
13 but WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
15 GNU General Public License for more details. | |
16 | |
17 You should have received a copy of the GNU General Public License | |
18 along with this program. If not, see <http://www.gnu.org/licenses/>. */ | |
19 | |
20 /* As a special exception, you may create a larger work that contains | |
21 part or all of the Bison parser skeleton and distribute that work | |
22 under terms of your choice, so long as that work isn't itself a | |
23 parser generator using the skeleton or a modified version thereof | |
24 as a parser skeleton. Alternatively, if you modify or redistribute | |
25 the parser skeleton itself, you may (at your option) remove this | |
26 special exception, which will cause the skeleton and the resulting | |
27 Bison output files to be licensed under the GNU General Public | |
28 License without this special exception. | |
29 | |
30 This special exception was added by the Free Software Foundation in | |
31 version 2.2 of Bison. */ | |
32 | |
33 /* C LALR(1) parser skeleton written by Richard Stallman, by | |
34 simplifying the original so-called "semantic" parser. */ | |
35 | |
36 /* All symbols defined below should begin with yy or YY, to avoid | |
37 infringing on user name space. This should be done even for local | |
38 variables, as they might otherwise be expanded by user macros. | |
39 There are some unavoidable exceptions within include files to | |
40 define necessary library symbols; they are noted "INFRINGES ON | |
41 USER NAME SPACE" below. */ | |
42 | |
43 /* Identify Bison output. */ | |
44 #define YYBISON 1 | |
45 | |
46 /* Bison version. */ | |
47 #define YYBISON_VERSION "2.5" | |
48 | |
49 /* Skeleton name. */ | |
50 #define YYSKELETON_NAME "yacc.c" | |
51 | |
52 /* Pure parsers. */ | |
53 #define YYPURE 0 | |
54 | |
55 /* Push parsers. */ | |
56 #define YYPUSH 0 | |
57 | |
58 /* Pull parsers. */ | |
59 #define YYPULL 1 | |
60 | |
61 /* Using locations. */ | |
62 #define YYLSP_NEEDED 0 | |
63 | |
64 | |
65 | |
66 /* Copy the first part of user declarations. */ | |
67 | |
68 /* Line 268 of yacc.c */ | |
69 #line 30 "parser.y" | |
70 | |
71 #include "config.h" | |
72 #include <stdio.h> | |
73 #include <stdlib.h> | |
74 #include "sizes.h" | |
75 #include "ick.h" | |
76 #include "feh.h" | |
77 #include "ick_lose.h" | |
78 | |
79 extern int yyerror(const char*); | |
80 | |
81 /* Intervene our ick_first-stage lexer. */ | |
82 extern int lexer(void); | |
83 #define yylex() lexer() | |
84 | |
85 static node *rlist; /* pointer to current right-hand node list */ | |
86 /*static node *llist;*/ /* pointer to current left-hand node list */ | |
87 static node *np; /* variable for building node lists */ | |
88 | |
89 extern int stbeginline; /* line number of last seen preamble */ | |
90 static int thisline; /* line number of beginning of current statement */ | |
91 | |
92 extern int mark112; /* AIS: Mark the tuple for W112 when it's created. */ | |
93 static int lineuid=65537; /* AIS: a line number not used anywhere else */ | |
94 static int cacsofar=0; /* AIS: Number of args in a CREATE statement */ | |
95 | |
96 static tuple *splat(int); | |
97 | |
98 static tuple *prevtuple = NULL; | |
99 | |
100 #define GETLINENO \ | |
101 {if (stbeginline < 0) thisline = -stbeginline; \ | |
102 else {thisline = stbeginline; stbeginline = 0;}} | |
103 | |
104 #define ACTION(x, nt, nn) \ | |
105 {x = newtuple(); x->type = nt; x->ick_lineno = thisline; x->u.node = nn;} | |
106 #define TARGET(x, nt, nn) \ | |
107 {x = newtuple(); x->type = nt; x->ick_lineno = thisline; x->u.target = nn;} | |
108 #define ACTARGET(x, nt, nn, nn2)\ | |
109 {x = newtuple(); x->type = nt; x->ick_lineno = thisline;\ | |
110 x->u.node = nn; x->u.target = nn2;} | |
111 /* AIS : The macro above was added for ABSTAIN expr FROM. */ | |
112 #define NEWFANGLED mark112 = 1; /* AIS: Added the mention of mark112 */ \ | |
113 if (ick_traditional) ick_lose(IE111,iyylineno,(char*)NULL); else | |
114 | |
115 #define DESTACKSE1 sparkearsstack[sparkearslev--/32] >>= 1 | |
116 #define DESTACKSPARKEARS DESTACKSE1; DESTACKSE1 | |
117 | |
118 | |
119 | |
120 /* Line 268 of yacc.c */ | |
121 #line 122 "parser.c" | |
122 | |
123 /* Enabling traces. */ | |
124 #ifndef YYDEBUG | |
125 # define YYDEBUG 0 | |
126 #endif | |
127 | |
128 /* Enabling verbose error messages. */ | |
129 #ifdef YYERROR_VERBOSE | |
130 # undef YYERROR_VERBOSE | |
131 # define YYERROR_VERBOSE 1 | |
132 #else | |
133 # define YYERROR_VERBOSE 0 | |
134 #endif | |
135 | |
136 /* Enabling the token table. */ | |
137 #ifndef YYTOKEN_TABLE | |
138 # define YYTOKEN_TABLE 0 | |
139 #endif | |
140 | |
141 | |
142 /* Tokens. */ | |
143 #ifndef YYTOKENTYPE | |
144 # define YYTOKENTYPE | |
145 /* Put the tokens into the symbol table, so that GDB and other debuggers | |
146 know about them. */ | |
147 enum yytokentype { | |
148 UNKNOWN = 258, | |
149 GETS = 259, | |
150 RESIZE = 260, | |
151 NEXT = 261, | |
152 GO_AHEAD = 262, | |
153 GO_BACK = 263, | |
154 FORGET = 264, | |
155 RESUME = 265, | |
156 STASH = 266, | |
157 RETRIEVE = 267, | |
158 IGNORE = 268, | |
159 REMEMBER = 269, | |
160 ABSTAIN = 270, | |
161 REINSTATE = 271, | |
162 DISABLE = 272, | |
163 ENABLE = 273, | |
164 MANYFROM = 274, | |
165 GIVE_UP = 275, | |
166 READ_OUT = 276, | |
167 WRITE_IN = 277, | |
168 PIN = 278, | |
169 COME_FROM = 279, | |
170 NEXTFROMLABEL = 280, | |
171 NEXTFROMEXPR = 281, | |
172 NEXTFROMGERUND = 282, | |
173 COMPUCOME = 283, | |
174 GERUCOME = 284, | |
175 PREPROC = 285, | |
176 WHILE = 286, | |
177 TRY_AGAIN = 287, | |
178 CREATE = 288, | |
179 COMPUCREATE = 289, | |
180 FROM = 290, | |
181 MAYBE = 291, | |
182 DO = 292, | |
183 PLEASE = 293, | |
184 NOT = 294, | |
185 ONCE = 295, | |
186 AGAIN = 296, | |
187 MESH = 297, | |
188 NOSPOT = 298, | |
189 ick_ONESPOT = 299, | |
190 ick_TWOSPOT = 300, | |
191 ick_TAIL = 301, | |
192 ick_HYBRID = 302, | |
193 MINGLE = 303, | |
194 SELECT = 304, | |
195 UNKNOWNOP = 305, | |
196 SUB = 306, | |
197 BY = 307, | |
198 SLAT = 308, | |
199 BACKSLAT = 309, | |
200 NUMBER = 310, | |
201 UNARY = 311, | |
202 OHOHSEVEN = 312, | |
203 GERUND = 313, | |
204 LABEL = 314, | |
205 BADCHAR = 315, | |
206 INTERSECTION = 316, | |
207 SPLATTERED = 317, | |
208 MESH32 = 318, | |
209 C_AND = 319, | |
210 C_OR = 320, | |
211 C_XOR = 321, | |
212 C_NOT = 322, | |
213 C_LOGICALNOT = 323, | |
214 C_LSHIFTBY = 324, | |
215 C_RSHIFTBY = 325, | |
216 C_NOTEQUAL = 326, | |
217 C_A = 327, | |
218 C_PLUS = 328, | |
219 C_MINUS = 329, | |
220 C_TIMES = 330, | |
221 C_DIVIDEBY = 331, | |
222 C_MODULUS = 332, | |
223 C_GREATER = 333, | |
224 C_LESS = 334, | |
225 C_ISEQUAL = 335, | |
226 C_LOGICALAND = 336, | |
227 C_LOGICALOR = 337, | |
228 AND = 338, | |
229 OR = 339, | |
230 XOR = 340, | |
231 FIN = 341, | |
232 WHIRL = 342, | |
233 WHIRL2 = 343, | |
234 WHIRL3 = 344, | |
235 WHIRL4 = 345, | |
236 WHIRL5 = 346, | |
237 REV_AND = 347, | |
238 REV_OR = 348, | |
239 REV_XOR = 349, | |
240 REV_FIN = 350, | |
241 REV_WHIRL = 351, | |
242 REV_WHIRL2 = 352, | |
243 REV_WHIRL3 = 353, | |
244 REV_WHIRL4 = 354, | |
245 REV_WHIRL5 = 355, | |
246 UNKNOWNID = 356, | |
247 US_ID = 357, | |
248 US_SCALAR = 358, | |
249 US_ARRVAR = 359, | |
250 US_ELEM = 360, | |
251 US_EXPR = 361, | |
252 CLOSESPARK = 362, | |
253 CLOSEEARS = 363, | |
254 OPENSPARK = 364, | |
255 OPENEARS = 365, | |
256 HIGHPREC = 366, | |
257 UNARYPREC = 367, | |
258 LOWPREC = 368 | |
259 }; | |
260 #endif | |
261 /* Tokens. */ | |
262 #define UNKNOWN 258 | |
263 #define GETS 259 | |
264 #define RESIZE 260 | |
265 #define NEXT 261 | |
266 #define GO_AHEAD 262 | |
267 #define GO_BACK 263 | |
268 #define FORGET 264 | |
269 #define RESUME 265 | |
270 #define STASH 266 | |
271 #define RETRIEVE 267 | |
272 #define IGNORE 268 | |
273 #define REMEMBER 269 | |
274 #define ABSTAIN 270 | |
275 #define REINSTATE 271 | |
276 #define DISABLE 272 | |
277 #define ENABLE 273 | |
278 #define MANYFROM 274 | |
279 #define GIVE_UP 275 | |
280 #define READ_OUT 276 | |
281 #define WRITE_IN 277 | |
282 #define PIN 278 | |
283 #define COME_FROM 279 | |
284 #define NEXTFROMLABEL 280 | |
285 #define NEXTFROMEXPR 281 | |
286 #define NEXTFROMGERUND 282 | |
287 #define COMPUCOME 283 | |
288 #define GERUCOME 284 | |
289 #define PREPROC 285 | |
290 #define WHILE 286 | |
291 #define TRY_AGAIN 287 | |
292 #define CREATE 288 | |
293 #define COMPUCREATE 289 | |
294 #define FROM 290 | |
295 #define MAYBE 291 | |
296 #define DO 292 | |
297 #define PLEASE 293 | |
298 #define NOT 294 | |
299 #define ONCE 295 | |
300 #define AGAIN 296 | |
301 #define MESH 297 | |
302 #define NOSPOT 298 | |
303 #define ick_ONESPOT 299 | |
304 #define ick_TWOSPOT 300 | |
305 #define ick_TAIL 301 | |
306 #define ick_HYBRID 302 | |
307 #define MINGLE 303 | |
308 #define SELECT 304 | |
309 #define UNKNOWNOP 305 | |
310 #define SUB 306 | |
311 #define BY 307 | |
312 #define SLAT 308 | |
313 #define BACKSLAT 309 | |
314 #define NUMBER 310 | |
315 #define UNARY 311 | |
316 #define OHOHSEVEN 312 | |
317 #define GERUND 313 | |
318 #define LABEL 314 | |
319 #define BADCHAR 315 | |
320 #define INTERSECTION 316 | |
321 #define SPLATTERED 317 | |
322 #define MESH32 318 | |
323 #define C_AND 319 | |
324 #define C_OR 320 | |
325 #define C_XOR 321 | |
326 #define C_NOT 322 | |
327 #define C_LOGICALNOT 323 | |
328 #define C_LSHIFTBY 324 | |
329 #define C_RSHIFTBY 325 | |
330 #define C_NOTEQUAL 326 | |
331 #define C_A 327 | |
332 #define C_PLUS 328 | |
333 #define C_MINUS 329 | |
334 #define C_TIMES 330 | |
335 #define C_DIVIDEBY 331 | |
336 #define C_MODULUS 332 | |
337 #define C_GREATER 333 | |
338 #define C_LESS 334 | |
339 #define C_ISEQUAL 335 | |
340 #define C_LOGICALAND 336 | |
341 #define C_LOGICALOR 337 | |
342 #define AND 338 | |
343 #define OR 339 | |
344 #define XOR 340 | |
345 #define FIN 341 | |
346 #define WHIRL 342 | |
347 #define WHIRL2 343 | |
348 #define WHIRL3 344 | |
349 #define WHIRL4 345 | |
350 #define WHIRL5 346 | |
351 #define REV_AND 347 | |
352 #define REV_OR 348 | |
353 #define REV_XOR 349 | |
354 #define REV_FIN 350 | |
355 #define REV_WHIRL 351 | |
356 #define REV_WHIRL2 352 | |
357 #define REV_WHIRL3 353 | |
358 #define REV_WHIRL4 354 | |
359 #define REV_WHIRL5 355 | |
360 #define UNKNOWNID 356 | |
361 #define US_ID 357 | |
362 #define US_SCALAR 358 | |
363 #define US_ARRVAR 359 | |
364 #define US_ELEM 360 | |
365 #define US_EXPR 361 | |
366 #define CLOSESPARK 362 | |
367 #define CLOSEEARS 363 | |
368 #define OPENSPARK 364 | |
369 #define OPENEARS 365 | |
370 #define HIGHPREC 366 | |
371 #define UNARYPREC 367 | |
372 #define LOWPREC 368 | |
373 | |
374 | |
375 | |
376 | |
377 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED | |
378 typedef union YYSTYPE | |
379 { | |
380 | |
381 /* Line 293 of yacc.c */ | |
382 #line 83 "parser.y" | |
383 | |
384 int numval; /* a numeric value */ | |
385 tuple *tuple; /* a code tuple */ | |
386 node *node; /* an expression-tree node */ | |
387 | |
388 | |
389 | |
390 /* Line 293 of yacc.c */ | |
391 #line 392 "parser.c" | |
392 } YYSTYPE; | |
393 # define YYSTYPE_IS_TRIVIAL 1 | |
394 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ | |
395 # define YYSTYPE_IS_DECLARED 1 | |
396 #endif | |
397 | |
398 | |
399 /* Copy the second part of user declarations. */ | |
400 | |
401 | |
402 /* Line 343 of yacc.c */ | |
403 #line 404 "parser.c" | |
404 | |
405 #ifdef short | |
406 # undef short | |
407 #endif | |
408 | |
409 #ifdef YYTYPE_UINT8 | |
410 typedef YYTYPE_UINT8 yytype_uint8; | |
411 #else | |
412 typedef unsigned char yytype_uint8; | |
413 #endif | |
414 | |
415 #ifdef YYTYPE_INT8 | |
416 typedef YYTYPE_INT8 yytype_int8; | |
417 #elif (defined __STDC__ || defined __C99__FUNC__ \ | |
418 || defined __cplusplus || defined _MSC_VER) | |
419 typedef signed char yytype_int8; | |
420 #else | |
421 typedef short int yytype_int8; | |
422 #endif | |
423 | |
424 #ifdef YYTYPE_UINT16 | |
425 typedef YYTYPE_UINT16 yytype_uint16; | |
426 #else | |
427 typedef unsigned short int yytype_uint16; | |
428 #endif | |
429 | |
430 #ifdef YYTYPE_INT16 | |
431 typedef YYTYPE_INT16 yytype_int16; | |
432 #else | |
433 typedef short int yytype_int16; | |
434 #endif | |
435 | |
436 #ifndef YYSIZE_T | |
437 # ifdef __SIZE_TYPE__ | |
438 # define YYSIZE_T __SIZE_TYPE__ | |
439 # elif defined size_t | |
440 # define YYSIZE_T size_t | |
441 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ | |
442 || defined __cplusplus || defined _MSC_VER) | |
443 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */ | |
444 # define YYSIZE_T size_t | |
445 # else | |
446 # define YYSIZE_T unsigned int | |
447 # endif | |
448 #endif | |
449 | |
450 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1) | |
451 | |
452 #ifndef YY_ | |
453 # if defined YYENABLE_NLS && YYENABLE_NLS | |
454 # if ENABLE_NLS | |
455 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */ | |
456 # define YY_(msgid) dgettext ("bison-runtime", msgid) | |
457 # endif | |
458 # endif | |
459 # ifndef YY_ | |
460 # define YY_(msgid) msgid | |
461 # endif | |
462 #endif | |
463 | |
464 /* Suppress unused-variable warnings by "using" E. */ | |
465 #if ! defined lint || defined __GNUC__ | |
466 # define YYUSE(e) ((void) (e)) | |
467 #else | |
468 # define YYUSE(e) /* empty */ | |
469 #endif | |
470 | |
471 /* Identity function, used to suppress warnings about constant conditions. */ | |
472 #ifndef lint | |
473 # define YYID(n) (n) | |
474 #else | |
475 #if (defined __STDC__ || defined __C99__FUNC__ \ | |
476 || defined __cplusplus || defined _MSC_VER) | |
477 static int | |
478 YYID (int yyi) | |
479 #else | |
480 static int | |
481 YYID (yyi) | |
482 int yyi; | |
483 #endif | |
484 { | |
485 return yyi; | |
486 } | |
487 #endif | |
488 | |
489 #if ! defined yyoverflow || YYERROR_VERBOSE | |
490 | |
491 /* The parser invokes alloca or malloc; define the necessary symbols. */ | |
492 | |
493 # ifdef YYSTACK_USE_ALLOCA | |
494 # if YYSTACK_USE_ALLOCA | |
495 # ifdef __GNUC__ | |
496 # define YYSTACK_ALLOC __builtin_alloca | |
497 # elif defined __BUILTIN_VA_ARG_INCR | |
498 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */ | |
499 # elif defined _AIX | |
500 # define YYSTACK_ALLOC __alloca | |
501 # elif defined _MSC_VER | |
502 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */ | |
503 # define alloca _alloca | |
504 # else | |
505 # define YYSTACK_ALLOC alloca | |
506 # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ | |
507 || defined __cplusplus || defined _MSC_VER) | |
508 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ | |
509 # ifndef EXIT_SUCCESS | |
510 # define EXIT_SUCCESS 0 | |
511 # endif | |
512 # endif | |
513 # endif | |
514 # endif | |
515 # endif | |
516 | |
517 # ifdef YYSTACK_ALLOC | |
518 /* Pacify GCC's `empty if-body' warning. */ | |
519 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) | |
520 # ifndef YYSTACK_ALLOC_MAXIMUM | |
521 /* The OS might guarantee only one guard page at the bottom of the stack, | |
522 and a page size can be as small as 4096 bytes. So we cannot safely | |
523 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number | |
524 to allow for a few compiler-allocated temporary stack slots. */ | |
525 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ | |
526 # endif | |
527 # else | |
528 # define YYSTACK_ALLOC YYMALLOC | |
529 # define YYSTACK_FREE YYFREE | |
530 # ifndef YYSTACK_ALLOC_MAXIMUM | |
531 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM | |
532 # endif | |
533 # if (defined __cplusplus && ! defined EXIT_SUCCESS \ | |
534 && ! ((defined YYMALLOC || defined malloc) \ | |
535 && (defined YYFREE || defined free))) | |
536 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ | |
537 # ifndef EXIT_SUCCESS | |
538 # define EXIT_SUCCESS 0 | |
539 # endif | |
540 # endif | |
541 # ifndef YYMALLOC | |
542 # define YYMALLOC malloc | |
543 # if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ | |
544 || defined __cplusplus || defined _MSC_VER) | |
545 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ | |
546 # endif | |
547 # endif | |
548 # ifndef YYFREE | |
549 # define YYFREE free | |
550 # if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ | |
551 || defined __cplusplus || defined _MSC_VER) | |
552 void free (void *); /* INFRINGES ON USER NAME SPACE */ | |
553 # endif | |
554 # endif | |
555 # endif | |
556 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */ | |
557 | |
558 | |
559 #if (! defined yyoverflow \ | |
560 && (! defined __cplusplus \ | |
561 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) | |
562 | |
563 /* A type that is properly aligned for any stack member. */ | |
564 union yyalloc | |
565 { | |
566 yytype_int16 yyss_alloc; | |
567 YYSTYPE yyvs_alloc; | |
568 }; | |
569 | |
570 /* The size of the maximum gap between one aligned stack and the next. */ | |
571 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) | |
572 | |
573 /* The size of an array large to enough to hold all stacks, each with | |
574 N elements. */ | |
575 # define YYSTACK_BYTES(N) \ | |
576 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ | |
577 + YYSTACK_GAP_MAXIMUM) | |
578 | |
579 # define YYCOPY_NEEDED 1 | |
580 | |
581 /* Relocate STACK from its old location to the new one. The | |
582 local variables YYSIZE and YYSTACKSIZE give the old and new number of | |
583 elements in the stack, and YYPTR gives the new location of the | |
584 stack. Advance YYPTR to a properly aligned location for the next | |
585 stack. */ | |
586 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \ | |
587 do \ | |
588 { \ | |
589 YYSIZE_T yynewbytes; \ | |
590 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ | |
591 Stack = &yyptr->Stack_alloc; \ | |
592 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ | |
593 yyptr += yynewbytes / sizeof (*yyptr); \ | |
594 } \ | |
595 while (YYID (0)) | |
596 | |
597 #endif | |
598 | |
599 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED | |
600 /* Copy COUNT objects from FROM to TO. The source and destination do | |
601 not overlap. */ | |
602 # ifndef YYCOPY | |
603 # if defined __GNUC__ && 1 < __GNUC__ | |
604 # define YYCOPY(To, From, Count) \ | |
605 __builtin_memcpy (To, From, (Count) * sizeof (*(From))) | |
606 # else | |
607 # define YYCOPY(To, From, Count) \ | |
608 do \ | |
609 { \ | |
610 YYSIZE_T yyi; \ | |
611 for (yyi = 0; yyi < (Count); yyi++) \ | |
612 (To)[yyi] = (From)[yyi]; \ | |
613 } \ | |
614 while (YYID (0)) | |
615 # endif | |
616 # endif | |
617 #endif /* !YYCOPY_NEEDED */ | |
618 | |
619 /* YYFINAL -- State number of the termination state. */ | |
620 #define YYFINAL 2 | |
621 /* YYLAST -- Last index in YYTABLE. */ | |
622 #define YYLAST 670 | |
623 | |
624 /* YYNTOKENS -- Number of terminals. */ | |
625 #define YYNTOKENS 114 | |
626 /* YYNNTS -- Number of nonterminals. */ | |
627 #define YYNNTS 43 | |
628 /* YYNRULES -- Number of rules. */ | |
629 #define YYNRULES 145 | |
630 /* YYNRULES -- Number of states. */ | |
631 #define YYNSTATES 230 | |
632 | |
633 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ | |
634 #define YYUNDEFTOK 2 | |
635 #define YYMAXUTOK 368 | |
636 | |
637 #define YYTRANSLATE(YYX) \ | |
638 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) | |
639 | |
640 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ | |
641 static const yytype_uint8 yytranslate[] = | |
642 { | |
643 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
644 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
645 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
646 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
647 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
648 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
649 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
650 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
651 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
652 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
653 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
654 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
655 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
656 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
657 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
658 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
659 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
660 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
661 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
662 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
663 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
664 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
665 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
666 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
667 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
668 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, | |
669 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, | |
670 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, | |
671 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, | |
672 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, | |
673 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, | |
674 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, | |
675 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, | |
676 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, | |
677 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, | |
678 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, | |
679 105, 106, 107, 108, 109, 110, 111, 112, 113 | |
680 }; | |
681 | |
682 #if YYDEBUG | |
683 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in | |
684 YYRHS. */ | |
685 static const yytype_uint16 yyprhs[] = | |
686 { | |
687 0, 0, 3, 4, 7, 10, 14, 18, 23, 25, | |
688 27, 30, 33, 35, 39, 41, 44, 46, 49, 53, | |
689 57, 61, 64, 67, 70, 73, 76, 79, 82, 86, | |
690 90, 95, 100, 103, 106, 109, 112, 115, 117, 119, | |
691 121, 123, 125, 128, 131, 133, 136, 139, 142, 146, | |
692 149, 153, 155, 157, 159, 161, 164, 166, 168, 171, | |
693 173, 176, 178, 180, 182, 184, 186, 188, 192, 194, | |
694 196, 198, 200, 203, 206, 209, 212, 215, 219, 223, | |
695 226, 228, 232, 234, 236, 238, 242, 244, 246, 248, | |
696 250, 252, 256, 258, 262, 264, 266, 270, 274, 277, | |
697 280, 282, 284, 286, 288, 292, 296, 298, 300, 304, | |
698 308, 312, 316, 318, 320, 322, 324, 328, 332, 336, | |
699 340, 342, 346, 350, 354, 358, 360, 362, 364, 366, | |
700 368, 370, 374, 379, 384, 388, 392, 394, 396, 398, | |
701 401, 403, 406, 408, 410, 412 | |
702 }; | |
703 | |
704 /* YYRHS -- A `-1'-separated list of the rules' RHS. */ | |
705 static const yytype_int16 yyrhs[] = | |
706 { | |
707 115, 0, -1, -1, 115, 116, -1, 119, 117, -1, | |
708 119, 57, 117, -1, 59, 119, 117, -1, 59, 119, | |
709 57, 117, -1, 1, -1, 118, -1, 118, 40, -1, | |
710 118, 41, -1, 120, -1, 120, 31, 120, -1, 37, | |
711 -1, 37, 39, -1, 36, -1, 36, 39, -1, 128, | |
712 4, 147, -1, 131, 4, 139, -1, 148, 4, 147, | |
713 -1, 59, 6, -1, 9, 147, -1, 10, 147, -1, | |
714 11, 134, -1, 12, 134, -1, 13, 134, -1, 14, | |
715 134, -1, 15, 35, 59, -1, 15, 35, 126, -1, | |
716 15, 147, 35, 59, -1, 15, 147, 35, 126, -1, | |
717 16, 59, -1, 16, 126, -1, 22, 136, -1, 21, | |
718 138, -1, 23, 129, -1, 20, -1, 7, -1, 8, | |
719 -1, 32, -1, 24, -1, 28, 126, -1, 28, 147, | |
720 -1, 25, -1, 26, 126, -1, 26, 147, -1, 33, | |
721 121, -1, 34, 147, 122, -1, 33, 146, -1, 34, | |
722 154, 146, -1, 121, -1, 60, -1, 1, -1, 124, | |
723 -1, 123, 124, -1, 123, -1, 125, -1, 125, 121, | |
724 -1, 125, -1, 121, 125, -1, 140, -1, 130, -1, | |
725 148, -1, 131, -1, 101, -1, 58, -1, 126, 61, | |
726 58, -1, 130, -1, 131, -1, 130, -1, 140, -1, | |
727 45, 55, -1, 44, 55, -1, 45, 55, -1, 46, | |
728 55, -1, 47, 55, -1, 46, 56, 55, -1, 47, | |
729 56, 55, -1, 42, 55, -1, 127, -1, 134, 61, | |
730 127, -1, 130, -1, 140, -1, 131, -1, 135, 61, | |
731 136, -1, 135, -1, 130, -1, 140, -1, 133, -1, | |
732 131, -1, 137, 61, 138, -1, 137, -1, 147, 52, | |
733 139, -1, 147, -1, 141, -1, 131, 51, 142, -1, | |
734 131, 51, 143, -1, 154, 142, -1, 154, 143, -1, | |
735 141, -1, 145, -1, 154, -1, 145, -1, 132, 51, | |
736 142, -1, 132, 51, 143, -1, 60, -1, 154, -1, | |
737 154, 49, 147, -1, 154, 48, 147, -1, 154, 146, | |
738 147, -1, 130, 53, 147, -1, 140, -1, 144, -1, | |
739 153, -1, 144, -1, 154, 49, 147, -1, 154, 48, | |
740 147, -1, 154, 146, 147, -1, 130, 53, 147, -1, | |
741 152, -1, 152, 49, 147, -1, 152, 48, 147, -1, | |
742 152, 146, 147, -1, 130, 53, 147, -1, 140, -1, | |
743 144, -1, 42, -1, 44, -1, 45, -1, 133, -1, | |
744 150, 56, 55, -1, 155, 56, 147, 107, -1, 156, | |
745 56, 147, 108, -1, 155, 149, 107, -1, 156, 149, | |
746 108, -1, 151, -1, 130, -1, 151, -1, 56, 154, | |
747 -1, 152, -1, 56, 154, -1, 109, -1, 107, -1, | |
748 110, -1, 108, -1 | |
749 }; | |
750 | |
751 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ | |
752 static const yytype_uint16 yyrline[] = | |
753 { | |
754 0, 168, 168, 169, 181, 183, 185, 187, 189, 204, | |
755 206, 209, 226, 227, 266, 267, 268, 269, 273, 274, | |
756 275, 279, 280, 281, 282, 283, 284, 285, 286, 287, | |
757 288, 289, 291, 292, 293, 294, 295, 296, 297, 298, | |
758 299, 300, 301, 304, 307, 309, 312, 315, 316, 319, | |
759 321, 325, 327, 328, 333, 334, 336, 339, 340, 342, | |
760 343, 348, 355, 362, 369, 372, 376, 378, 387, 387, | |
761 389, 389, 391, 397, 403, 411, 417, 427, 435, 446, | |
762 461, 462, 468, 468, 468, 469, 470, 475, 475, 475, | |
763 475, 476, 477, 483, 484, 488, 489, 491, 493, 494, | |
764 496, 497, 498, 502, 503, 506, 511, 516, 519, 520, | |
765 521, 532, 537, 538, 542, 543, 544, 545, 546, 556, | |
766 564, 565, 566, 567, 577, 582, 583, 587, 587, 587, | |
767 592, 594, 616, 623, 632, 633, 636, 637, 640, 641, | |
768 651, 652, 656, 657, 660, 661 | |
769 }; | |
770 #endif | |
771 | |
772 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE | |
773 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. | |
774 First, the terminals, then, starting at YYNTOKENS, nonterminals. */ | |
775 static const char *const yytname[] = | |
776 { | |
777 "$end", "error", "$undefined", "UNKNOWN", "GETS", "RESIZE", "NEXT", | |
778 "GO_AHEAD", "GO_BACK", "FORGET", "RESUME", "STASH", "RETRIEVE", "IGNORE", | |
779 "REMEMBER", "ABSTAIN", "REINSTATE", "DISABLE", "ENABLE", "MANYFROM", | |
780 "GIVE_UP", "READ_OUT", "WRITE_IN", "PIN", "COME_FROM", "NEXTFROMLABEL", | |
781 "NEXTFROMEXPR", "NEXTFROMGERUND", "COMPUCOME", "GERUCOME", "PREPROC", | |
782 "WHILE", "TRY_AGAIN", "CREATE", "COMPUCREATE", "FROM", "MAYBE", "DO", | |
783 "PLEASE", "NOT", "ONCE", "AGAIN", "MESH", "NOSPOT", "ick_ONESPOT", | |
784 "ick_TWOSPOT", "ick_TAIL", "ick_HYBRID", "MINGLE", "SELECT", "UNKNOWNOP", | |
785 "SUB", "BY", "SLAT", "BACKSLAT", "NUMBER", "UNARY", "OHOHSEVEN", | |
786 "GERUND", "LABEL", "BADCHAR", "INTERSECTION", "SPLATTERED", "MESH32", | |
787 "C_AND", "C_OR", "C_XOR", "C_NOT", "C_LOGICALNOT", "C_LSHIFTBY", | |
788 "C_RSHIFTBY", "C_NOTEQUAL", "C_A", "C_PLUS", "C_MINUS", "C_TIMES", | |
789 "C_DIVIDEBY", "C_MODULUS", "C_GREATER", "C_LESS", "C_ISEQUAL", | |
790 "C_LOGICALAND", "C_LOGICALOR", "AND", "OR", "XOR", "FIN", "WHIRL", | |
791 "WHIRL2", "WHIRL3", "WHIRL4", "WHIRL5", "REV_AND", "REV_OR", "REV_XOR", | |
792 "REV_FIN", "REV_WHIRL", "REV_WHIRL2", "REV_WHIRL3", "REV_WHIRL4", | |
793 "REV_WHIRL5", "UNKNOWNID", "US_ID", "US_SCALAR", "US_ARRVAR", "US_ELEM", | |
794 "US_EXPR", "CLOSESPARK", "CLOSEEARS", "OPENSPARK", "OPENEARS", | |
795 "HIGHPREC", "UNARYPREC", "LOWPREC", "$accept", "program", "command", | |
796 "mtperform", "preproc", "please", "perform", "unknownstatement", | |
797 "unknownsif", "unknownsin", "unknownatom", "unknownaid", "gerunds", | |
798 "variable", "lvalue", "scalar2s", "scalar", "ick_array", "oparray", | |
799 "constant", "varlist", "initem", "inlist", "outitem", "outlist", | |
800 "byexpr", "subscr", "subscr1", "sublist", "sublist1", "osubscr", | |
801 "osubscr1", "unop", "expr", "notanlvalue", "limexpr", "preftype", | |
802 "lunambig", "limunambig", "nlunambig", "unambig", "eitherspark", | |
803 "eitherears", 0 | |
804 }; | |
805 #endif | |
806 | |
807 # ifdef YYPRINT | |
808 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to | |
809 token YYLEX-NUM. */ | |
810 static const yytype_uint16 yytoknum[] = | |
811 { | |
812 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, | |
813 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, | |
814 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, | |
815 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, | |
816 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, | |
817 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, | |
818 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, | |
819 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, | |
820 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, | |
821 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, | |
822 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, | |
823 365, 366, 367, 368 | |
824 }; | |
825 # endif | |
826 | |
827 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ | |
828 static const yytype_uint8 yyr1[] = | |
829 { | |
830 0, 114, 115, 115, 116, 116, 116, 116, 116, 117, | |
831 117, 117, 118, 118, 119, 119, 119, 119, 120, 120, | |
832 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, | |
833 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, | |
834 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, | |
835 120, 120, 120, 120, 121, 121, 121, 122, 122, 123, | |
836 123, 124, 124, 124, 124, 125, 126, 126, 127, 127, | |
837 128, 128, 129, 130, 130, 131, 131, 132, 132, 133, | |
838 134, 134, 135, 135, 135, 136, 136, 137, 137, 137, | |
839 137, 138, 138, 139, 139, 140, 140, 141, 142, 142, | |
840 143, 143, 143, 144, 144, 145, 146, 147, 147, 147, | |
841 147, 147, 147, 147, 148, 148, 148, 148, 148, 148, | |
842 149, 149, 149, 149, 149, 149, 149, 150, 150, 150, | |
843 151, 151, 151, 151, 151, 151, 152, 152, 153, 153, | |
844 154, 154, 155, 155, 156, 156 | |
845 }; | |
846 | |
847 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ | |
848 static const yytype_uint8 yyr2[] = | |
849 { | |
850 0, 2, 0, 2, 2, 3, 3, 4, 1, 1, | |
851 2, 2, 1, 3, 1, 2, 1, 2, 3, 3, | |
852 3, 2, 2, 2, 2, 2, 2, 2, 3, 3, | |
853 4, 4, 2, 2, 2, 2, 2, 1, 1, 1, | |
854 1, 1, 2, 2, 1, 2, 2, 2, 3, 2, | |
855 3, 1, 1, 1, 1, 2, 1, 1, 2, 1, | |
856 2, 1, 1, 1, 1, 1, 1, 3, 1, 1, | |
857 1, 1, 2, 2, 2, 2, 2, 3, 3, 2, | |
858 1, 3, 1, 1, 1, 3, 1, 1, 1, 1, | |
859 1, 3, 1, 3, 1, 1, 3, 3, 2, 2, | |
860 1, 1, 1, 1, 3, 3, 1, 1, 3, 3, | |
861 3, 3, 1, 1, 1, 1, 3, 3, 3, 3, | |
862 1, 3, 3, 3, 3, 1, 1, 1, 1, 1, | |
863 1, 3, 4, 4, 3, 3, 1, 1, 1, 2, | |
864 1, 2, 1, 1, 1, 1 | |
865 }; | |
866 | |
867 /* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM. | |
868 Performed when YYTABLE doesn't specify something else to do. Zero | |
869 means the default is an error. */ | |
870 static const yytype_uint8 yydefact[] = | |
871 { | |
872 2, 0, 1, 8, 16, 14, 0, 3, 0, 17, | |
873 15, 0, 53, 38, 39, 0, 0, 0, 0, 0, | |
874 0, 0, 0, 37, 0, 0, 0, 41, 44, 0, | |
875 0, 40, 0, 0, 127, 128, 129, 0, 0, 0, | |
876 0, 0, 52, 65, 143, 145, 142, 144, 4, 9, | |
877 12, 51, 56, 54, 59, 0, 62, 64, 0, 130, | |
878 61, 95, 115, 103, 63, 0, 138, 140, 114, 0, | |
879 0, 0, 0, 6, 0, 137, 0, 112, 113, 22, | |
880 136, 107, 23, 0, 0, 0, 0, 80, 68, 69, | |
881 24, 25, 26, 27, 0, 0, 66, 32, 33, 0, | |
882 87, 90, 89, 92, 35, 88, 82, 84, 86, 34, | |
883 83, 0, 36, 45, 46, 42, 43, 106, 47, 62, | |
884 64, 61, 49, 63, 0, 107, 79, 73, 74, 75, | |
885 0, 76, 0, 137, 139, 5, 21, 10, 11, 0, | |
886 60, 55, 0, 0, 0, 0, 0, 0, 0, 0, | |
887 0, 0, 0, 137, 125, 126, 0, 120, 0, 0, | |
888 7, 141, 0, 0, 0, 0, 0, 28, 29, 0, | |
889 0, 0, 0, 72, 48, 57, 50, 77, 78, 13, | |
890 18, 119, 19, 94, 0, 0, 100, 96, 97, 101, | |
891 102, 104, 105, 20, 131, 117, 116, 118, 0, 0, | |
892 134, 0, 0, 0, 0, 135, 111, 109, 108, 110, | |
893 81, 30, 31, 67, 91, 85, 58, 0, 0, 0, | |
894 98, 99, 132, 124, 122, 121, 123, 133, 93, 102 | |
895 }; | |
896 | |
897 /* YYDEFGOTO[NTERM-NUM]. */ | |
898 static const yytype_int16 yydefgoto[] = | |
899 { | |
900 -1, 1, 7, 48, 49, 8, 50, 51, 174, 52, | |
901 53, 54, 98, 87, 55, 112, 75, 76, 58, 59, | |
902 90, 108, 109, 103, 104, 182, 77, 61, 187, 188, | |
903 78, 63, 122, 183, 64, 156, 65, 80, 67, 68, | |
904 81, 70, 71 | |
905 }; | |
906 | |
907 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing | |
908 STATE-NUM. */ | |
909 #define YYPACT_NINF -140 | |
910 static const yytype_int16 yypact[] = | |
911 { | |
912 -140, 129, -140, -140, -31, -25, 6, -140, 290, -140, | |
913 -140, 362, -140, -140, -140, 438, 438, 248, 248, 248, | |
914 248, 152, 102, -140, 207, 248, -27, -140, -140, 457, | |
915 457, -140, 451, 438, -34, -32, -29, 84, 128, -17, | |
916 432, 24, -140, -140, -140, -140, -140, -140, -140, 149, | |
917 5, -51, 478, -140, -140, 48, 165, 9, 14, -140, | |
918 66, -140, -140, -140, 69, 33, 8, -140, -140, 74, | |
919 547, 553, 432, -140, -17, 41, 49, -140, -140, -140, | |
920 -140, 94, -140, -32, -29, 43, 53, -140, -140, -140, | |
921 52, 52, 52, 52, 162, 83, -140, -140, 55, -34, | |
922 -140, 49, -140, 59, -140, -140, -140, 49, 67, -140, | |
923 -140, 77, -140, 55, -140, 55, -140, -140, -51, -15, | |
924 49, -140, -140, -140, -51, 94, -140, -140, -140, -140, | |
925 89, -140, 91, -140, 157, -140, -140, -140, -140, 432, | |
926 -140, -140, 438, 438, 438, 438, 438, 438, 95, 438, | |
927 438, 438, 438, 71, -140, -140, 45, 167, 438, 28, | |
928 -140, -140, 438, 438, 438, 438, 248, -140, 55, 176, | |
929 99, 207, 248, -140, -140, 472, 438, -140, -140, -140, | |
930 -140, -140, -140, 110, 125, 130, -140, -140, -140, -140, | |
931 560, -140, -140, -140, -140, -140, -140, -140, 78, 438, | |
932 -140, 438, 438, 438, 104, -140, -140, -140, -140, -140, | |
933 -140, -140, 55, -140, -140, -140, -51, 438, 438, 438, | |
934 -140, -140, -140, -140, -140, -140, -140, -140, -140, -140 | |
935 }; | |
936 | |
937 /* YYPGOTO[NTERM-NUM]. */ | |
938 static const yytype_int16 yypgoto[] = | |
939 { | |
940 -140, -140, -140, -5, -140, 185, 64, -28, -140, -140, | |
941 155, -46, -10, 70, -140, -140, -8, 29, -63, -23, | |
942 57, -140, 37, -140, 85, 38, 101, -41, -139, -131, | |
943 218, -39, -40, 81, -30, 192, -140, 63, 171, -140, | |
944 47, -140, -140 | |
945 }; | |
946 | |
947 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If | |
948 positive, shift that token. If negative, reduce the rule which | |
949 number is the opposite. If YYTABLE_NINF, syntax error. */ | |
950 #define YYTABLE_NINF -142 | |
951 static const yytype_int16 yytable[] = | |
952 { | |
953 56, 102, 123, 56, 118, 140, 73, 191, 9, 88, | |
954 88, 88, 88, 144, 10, 192, 100, 106, 111, 113, | |
955 115, 126, 123, 127, 119, 34, 128, 35, 36, 151, | |
956 136, 133, 56, -137, -137, 135, 139, 57, 143, 74, | |
957 57, 165, 4, 5, 119, -137, 89, 89, 89, 89, | |
958 43, 220, 142, 101, 107, 69, -136, -136, 69, 221, | |
959 145, 120, 153, 153, 56, 146, 133, 160, -136, 57, | |
960 -71, 66, 140, 147, 66, 91, 92, 93, 175, 69, | |
961 125, 120, 185, 185, 168, 176, 134, 69, 192, 148, | |
962 44, 45, 46, 47, 162, 66, 79, 82, 129, 69, | |
963 145, 57, 95, 66, 186, 186, 189, 189, 131, 60, | |
964 114, 116, 60, 166, 124, 66, 170, 203, 169, 69, | |
965 171, 161, 149, 150, 199, 105, 110, 185, 172, 2, | |
966 3, 56, 173, 121, 117, 66, 205, 133, 133, 129, | |
967 130, 60, 163, 164, 177, 123, 178, 216, 102, 186, | |
968 194, 189, 200, 121, 117, 185, 185, 213, 88, 212, | |
969 96, 97, 217, 100, 106, 4, 5, 119, 57, -70, | |
970 140, 154, 154, 60, 184, 184, 218, 186, 186, 189, | |
971 189, 219, 133, 131, 132, 222, 69, 94, 6, 137, | |
972 138, 11, 190, 190, 34, 89, 35, 36, 37, 38, | |
973 101, 107, 66, 179, 120, -141, -141, 141, 74, 215, | |
974 133, 133, 227, -137, -137, 201, 202, -141, 143, 184, | |
975 96, 167, 69, 180, 181, -137, 62, 117, 193, 62, | |
976 195, 196, 197, 198, 96, 211, 210, 190, 66, 204, | |
977 60, 157, 157, 206, 207, 208, 209, 184, 184, 99, | |
978 62, 83, 84, 85, 86, 228, 214, 209, 62, 44, | |
979 45, 46, 47, 159, 0, 229, 229, 0, 0, 0, | |
980 62, 0, 105, 110, 0, 0, 121, 0, 0, 0, | |
981 223, 0, 224, 225, 226, 0, 0, 0, 155, 155, | |
982 62, 12, 83, 84, 85, 86, 0, 13, 14, 15, | |
983 16, 17, 18, 19, 20, 21, 22, 0, 0, 0, | |
984 23, 24, 25, 26, 27, 28, 29, 0, 30, 0, | |
985 0, 0, 31, 32, 33, 0, 0, 0, 0, 0, | |
986 0, 0, 34, 0, 35, 36, 37, 38, 0, 0, | |
987 0, 0, 0, 0, 0, 0, 39, 40, 0, 41, | |
988 42, 0, 0, 0, 0, 0, 0, 62, 0, 0, | |
989 0, 0, 0, 12, 0, 0, 0, 0, 0, 13, | |
990 14, 15, 16, 17, 18, 19, 20, 21, 22, 0, | |
991 0, 0, 23, 24, 25, 26, 27, 28, 29, 0, | |
992 30, 43, 0, 62, 31, 32, 33, 44, 45, 46, | |
993 47, 0, 0, 0, 34, 0, 35, 36, 37, 38, | |
994 0, 0, 0, 0, 0, 0, 0, 0, 39, 72, | |
995 0, 41, 42, 0, 0, 0, 0, 0, 0, 0, | |
996 0, 0, 0, 12, 0, 0, 0, 0, 0, 13, | |
997 14, 15, 16, 17, 18, 19, 20, 21, 22, 0, | |
998 0, 0, 23, 24, 25, 26, 27, 28, 29, 0, | |
999 30, 0, 0, 43, 31, 32, 33, 0, 0, 44, | |
1000 45, 46, 47, 0, 34, 0, 35, 36, 37, 38, | |
1001 34, 0, 35, 36, 37, 38, 0, 0, 39, 0, | |
1002 0, 41, 42, 34, 74, 35, 36, 37, 38, 34, | |
1003 0, 35, 36, 37, 38, 0, 0, 39, 0, 0, | |
1004 0, 117, 0, 74, 34, 96, 35, 36, 37, 38, | |
1005 34, 0, 35, 36, 37, 38, 0, 0, 39, 0, | |
1006 0, 0, 0, 43, 39, 0, 0, 0, 0, 44, | |
1007 45, 46, 47, 0, 0, 44, 45, 46, 47, 0, | |
1008 0, 0, 43, 0, 0, 0, 0, 0, 44, 45, | |
1009 46, 47, 0, 0, 44, 45, 46, 47, 0, 0, | |
1010 0, 0, 0, 43, 0, 0, 0, 0, 0, 44, | |
1011 45, 46, 47, 0, 0, 44, 45, 46, 47, 34, | |
1012 0, 35, 36, 37, 38, 34, 0, 35, 36, 37, | |
1013 38, 0, 34, 152, 35, 36, 37, 38, 0, 158, | |
1014 0, 0, 0, 0, 0, 0, 74, 0, 0, 0, | |
1015 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | |
1016 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | |
1017 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | |
1018 0, 0, 0, 0, 44, 45, 46, 47, 0, 0, | |
1019 44, 45, 46, 47, 0, 0, 0, 0, 0, 46, | |
1020 47 | |
1021 }; | |
1022 | |
1023 #define yypact_value_is_default(yystate) \ | |
1024 ((yystate) == (-140)) | |
1025 | |
1026 #define yytable_value_is_error(yytable_value) \ | |
1027 YYID (0) | |
1028 | |
1029 static const yytype_int16 yycheck[] = | |
1030 { | |
1031 8, 24, 32, 11, 32, 51, 11, 146, 39, 17, | |
1032 18, 19, 20, 4, 39, 146, 24, 25, 45, 29, | |
1033 30, 55, 52, 55, 32, 42, 55, 44, 45, 69, | |
1034 6, 39, 40, 48, 49, 40, 31, 8, 53, 56, | |
1035 11, 81, 36, 37, 52, 60, 17, 18, 19, 20, | |
1036 101, 190, 4, 24, 25, 8, 48, 49, 11, 190, | |
1037 51, 32, 70, 71, 72, 51, 74, 72, 60, 40, | |
1038 4, 8, 118, 4, 11, 18, 19, 20, 124, 32, | |
1039 33, 52, 145, 146, 94, 125, 39, 40, 219, 56, | |
1040 107, 108, 109, 110, 53, 32, 15, 16, 55, 52, | |
1041 51, 72, 21, 40, 145, 146, 145, 146, 55, 8, | |
1042 29, 30, 11, 61, 33, 52, 61, 157, 35, 72, | |
1043 61, 74, 48, 49, 53, 24, 25, 190, 61, 0, | |
1044 1, 139, 55, 32, 60, 72, 108, 145, 146, 55, | |
1045 56, 40, 48, 49, 55, 175, 55, 175, 171, 190, | |
1046 55, 190, 107, 52, 60, 218, 219, 58, 166, 169, | |
1047 58, 59, 52, 171, 172, 36, 37, 175, 139, 4, | |
1048 216, 70, 71, 72, 145, 146, 51, 218, 219, 218, | |
1049 219, 51, 190, 55, 56, 107, 139, 35, 59, 40, | |
1050 41, 6, 145, 146, 42, 166, 44, 45, 46, 47, | |
1051 171, 172, 139, 139, 175, 48, 49, 52, 56, 172, | |
1052 218, 219, 108, 48, 49, 48, 49, 60, 53, 190, | |
1053 58, 59, 175, 142, 143, 60, 8, 60, 147, 11, | |
1054 149, 150, 151, 152, 58, 59, 166, 190, 175, 158, | |
1055 139, 70, 71, 162, 163, 164, 165, 218, 219, 42, | |
1056 32, 44, 45, 46, 47, 217, 171, 176, 40, 107, | |
1057 108, 109, 110, 71, -1, 218, 219, -1, -1, -1, | |
1058 52, -1, 171, 172, -1, -1, 175, -1, -1, -1, | |
1059 199, -1, 201, 202, 203, -1, -1, -1, 70, 71, | |
1060 72, 1, 44, 45, 46, 47, -1, 7, 8, 9, | |
1061 10, 11, 12, 13, 14, 15, 16, -1, -1, -1, | |
1062 20, 21, 22, 23, 24, 25, 26, -1, 28, -1, | |
1063 -1, -1, 32, 33, 34, -1, -1, -1, -1, -1, | |
1064 -1, -1, 42, -1, 44, 45, 46, 47, -1, -1, | |
1065 -1, -1, -1, -1, -1, -1, 56, 57, -1, 59, | |
1066 60, -1, -1, -1, -1, -1, -1, 139, -1, -1, | |
1067 -1, -1, -1, 1, -1, -1, -1, -1, -1, 7, | |
1068 8, 9, 10, 11, 12, 13, 14, 15, 16, -1, | |
1069 -1, -1, 20, 21, 22, 23, 24, 25, 26, -1, | |
1070 28, 101, -1, 175, 32, 33, 34, 107, 108, 109, | |
1071 110, -1, -1, -1, 42, -1, 44, 45, 46, 47, | |
1072 -1, -1, -1, -1, -1, -1, -1, -1, 56, 57, | |
1073 -1, 59, 60, -1, -1, -1, -1, -1, -1, -1, | |
1074 -1, -1, -1, 1, -1, -1, -1, -1, -1, 7, | |
1075 8, 9, 10, 11, 12, 13, 14, 15, 16, -1, | |
1076 -1, -1, 20, 21, 22, 23, 24, 25, 26, -1, | |
1077 28, -1, -1, 101, 32, 33, 34, -1, -1, 107, | |
1078 108, 109, 110, -1, 42, -1, 44, 45, 46, 47, | |
1079 42, -1, 44, 45, 46, 47, -1, -1, 56, -1, | |
1080 -1, 59, 60, 42, 56, 44, 45, 46, 47, 42, | |
1081 -1, 44, 45, 46, 47, -1, -1, 56, -1, -1, | |
1082 -1, 60, -1, 56, 42, 58, 44, 45, 46, 47, | |
1083 42, -1, 44, 45, 46, 47, -1, -1, 56, -1, | |
1084 -1, -1, -1, 101, 56, -1, -1, -1, -1, 107, | |
1085 108, 109, 110, -1, -1, 107, 108, 109, 110, -1, | |
1086 -1, -1, 101, -1, -1, -1, -1, -1, 107, 108, | |
1087 109, 110, -1, -1, 107, 108, 109, 110, -1, -1, | |
1088 -1, -1, -1, 101, -1, -1, -1, -1, -1, 107, | |
1089 108, 109, 110, -1, -1, 107, 108, 109, 110, 42, | |
1090 -1, 44, 45, 46, 47, 42, -1, 44, 45, 46, | |
1091 47, -1, 42, 56, 44, 45, 46, 47, -1, 56, | |
1092 -1, -1, -1, -1, -1, -1, 56, -1, -1, -1, | |
1093 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, | |
1094 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, | |
1095 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, | |
1096 -1, -1, -1, -1, 107, 108, 109, 110, -1, -1, | |
1097 107, 108, 109, 110, -1, -1, -1, -1, -1, 109, | |
1098 110 | |
1099 }; | |
1100 | |
1101 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing | |
1102 symbol of state STATE-NUM. */ | |
1103 static const yytype_uint8 yystos[] = | |
1104 { | |
1105 0, 115, 0, 1, 36, 37, 59, 116, 119, 39, | |
1106 39, 119, 1, 7, 8, 9, 10, 11, 12, 13, | |
1107 14, 15, 16, 20, 21, 22, 23, 24, 25, 26, | |
1108 28, 32, 33, 34, 42, 44, 45, 46, 47, 56, | |
1109 57, 59, 60, 101, 107, 108, 109, 110, 117, 118, | |
1110 120, 121, 123, 124, 125, 128, 130, 131, 132, 133, | |
1111 140, 141, 144, 145, 148, 150, 151, 152, 153, 154, | |
1112 155, 156, 57, 117, 56, 130, 131, 140, 144, 147, | |
1113 151, 154, 147, 44, 45, 46, 47, 127, 130, 131, | |
1114 134, 134, 134, 134, 35, 147, 58, 59, 126, 42, | |
1115 130, 131, 133, 137, 138, 140, 130, 131, 135, 136, | |
1116 140, 45, 129, 126, 147, 126, 147, 60, 121, 130, | |
1117 131, 140, 146, 148, 147, 154, 55, 55, 55, 55, | |
1118 56, 55, 56, 130, 154, 117, 6, 40, 41, 31, | |
1119 125, 124, 4, 53, 4, 51, 51, 4, 56, 48, | |
1120 49, 146, 56, 130, 140, 144, 149, 152, 56, 149, | |
1121 117, 154, 53, 48, 49, 146, 61, 59, 126, 35, | |
1122 61, 61, 61, 55, 122, 125, 146, 55, 55, 120, | |
1123 147, 147, 139, 147, 131, 132, 141, 142, 143, 145, | |
1124 154, 142, 143, 147, 55, 147, 147, 147, 147, 53, | |
1125 107, 48, 49, 146, 147, 108, 147, 147, 147, 147, | |
1126 127, 59, 126, 58, 138, 136, 121, 52, 51, 51, | |
1127 142, 143, 107, 147, 147, 147, 147, 108, 139, 154 | |
1128 }; | |
1129 | |
1130 #define yyerrok (yyerrstatus = 0) | |
1131 #define yyclearin (yychar = YYEMPTY) | |
1132 #define YYEMPTY (-2) | |
1133 #define YYEOF 0 | |
1134 | |
1135 #define YYACCEPT goto yyacceptlab | |
1136 #define YYABORT goto yyabortlab | |
1137 #define YYERROR goto yyerrorlab | |
1138 | |
1139 | |
1140 /* Like YYERROR except do call yyerror. This remains here temporarily | |
1141 to ease the transition to the new meaning of YYERROR, for GCC. | |
1142 Once GCC version 2 has supplanted version 1, this can go. However, | |
1143 YYFAIL appears to be in use. Nevertheless, it is formally deprecated | |
1144 in Bison 2.4.2's NEWS entry, where a plan to phase it out is | |
1145 discussed. */ | |
1146 | |
1147 #define YYFAIL goto yyerrlab | |
1148 #if defined YYFAIL | |
1149 /* This is here to suppress warnings from the GCC cpp's | |
1150 -Wunused-macros. Normally we don't worry about that warning, but | |
1151 some users do, and we want to make it easy for users to remove | |
1152 YYFAIL uses, which will produce warnings from Bison 2.5. */ | |
1153 #endif | |
1154 | |
1155 #define YYRECOVERING() (!!yyerrstatus) | |
1156 | |
1157 #define YYBACKUP(Token, Value) \ | |
1158 do \ | |
1159 if (yychar == YYEMPTY && yylen == 1) \ | |
1160 { \ | |
1161 yychar = (Token); \ | |
1162 yylval = (Value); \ | |
1163 YYPOPSTACK (1); \ | |
1164 goto yybackup; \ | |
1165 } \ | |
1166 else \ | |
1167 { \ | |
1168 yyerror (YY_("syntax error: cannot back up")); \ | |
1169 YYERROR; \ | |
1170 } \ | |
1171 while (YYID (0)) | |
1172 | |
1173 | |
1174 #define YYTERROR 1 | |
1175 #define YYERRCODE 256 | |
1176 | |
1177 | |
1178 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. | |
1179 If N is 0, then set CURRENT to the empty location which ends | |
1180 the previous symbol: RHS[0] (always defined). */ | |
1181 | |
1182 #define YYRHSLOC(Rhs, K) ((Rhs)[K]) | |
1183 #ifndef YYLLOC_DEFAULT | |
1184 # define YYLLOC_DEFAULT(Current, Rhs, N) \ | |
1185 do \ | |
1186 if (YYID (N)) \ | |
1187 { \ | |
1188 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ | |
1189 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ | |
1190 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ | |
1191 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ | |
1192 } \ | |
1193 else \ | |
1194 { \ | |
1195 (Current).first_line = (Current).last_line = \ | |
1196 YYRHSLOC (Rhs, 0).last_line; \ | |
1197 (Current).first_column = (Current).last_column = \ | |
1198 YYRHSLOC (Rhs, 0).last_column; \ | |
1199 } \ | |
1200 while (YYID (0)) | |
1201 #endif | |
1202 | |
1203 | |
1204 /* This macro is provided for backward compatibility. */ | |
1205 | |
1206 #ifndef YY_LOCATION_PRINT | |
1207 # define YY_LOCATION_PRINT(File, Loc) ((void) 0) | |
1208 #endif | |
1209 | |
1210 | |
1211 /* YYLEX -- calling `yylex' with the right arguments. */ | |
1212 | |
1213 #ifdef YYLEX_PARAM | |
1214 # define YYLEX yylex (YYLEX_PARAM) | |
1215 #else | |
1216 # define YYLEX yylex () | |
1217 #endif | |
1218 | |
1219 /* Enable debugging if requested. */ | |
1220 #if YYDEBUG | |
1221 | |
1222 # ifndef YYFPRINTF | |
1223 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */ | |
1224 # define YYFPRINTF fprintf | |
1225 # endif | |
1226 | |
1227 # define YYDPRINTF(Args) \ | |
1228 do { \ | |
1229 if (yydebug) \ | |
1230 YYFPRINTF Args; \ | |
1231 } while (YYID (0)) | |
1232 | |
1233 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ | |
1234 do { \ | |
1235 if (yydebug) \ | |
1236 { \ | |
1237 YYFPRINTF (stderr, "%s ", Title); \ | |
1238 yy_symbol_print (stderr, \ | |
1239 Type, Value); \ | |
1240 YYFPRINTF (stderr, "\n"); \ | |
1241 } \ | |
1242 } while (YYID (0)) | |
1243 | |
1244 | |
1245 /*--------------------------------. | |
1246 | Print this symbol on YYOUTPUT. | | |
1247 `--------------------------------*/ | |
1248 | |
1249 /*ARGSUSED*/ | |
1250 #if (defined __STDC__ || defined __C99__FUNC__ \ | |
1251 || defined __cplusplus || defined _MSC_VER) | |
1252 static void | |
1253 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) | |
1254 #else | |
1255 static void | |
1256 yy_symbol_value_print (yyoutput, yytype, yyvaluep) | |
1257 FILE *yyoutput; | |
1258 int yytype; | |
1259 YYSTYPE const * const yyvaluep; | |
1260 #endif | |
1261 { | |
1262 if (!yyvaluep) | |
1263 return; | |
1264 # ifdef YYPRINT | |
1265 if (yytype < YYNTOKENS) | |
1266 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); | |
1267 # else | |
1268 YYUSE (yyoutput); | |
1269 # endif | |
1270 switch (yytype) | |
1271 { | |
1272 default: | |
1273 break; | |
1274 } | |
1275 } | |
1276 | |
1277 | |
1278 /*--------------------------------. | |
1279 | Print this symbol on YYOUTPUT. | | |
1280 `--------------------------------*/ | |
1281 | |
1282 #if (defined __STDC__ || defined __C99__FUNC__ \ | |
1283 || defined __cplusplus || defined _MSC_VER) | |
1284 static void | |
1285 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) | |
1286 #else | |
1287 static void | |
1288 yy_symbol_print (yyoutput, yytype, yyvaluep) | |
1289 FILE *yyoutput; | |
1290 int yytype; | |
1291 YYSTYPE const * const yyvaluep; | |
1292 #endif | |
1293 { | |
1294 if (yytype < YYNTOKENS) | |
1295 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); | |
1296 else | |
1297 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); | |
1298 | |
1299 yy_symbol_value_print (yyoutput, yytype, yyvaluep); | |
1300 YYFPRINTF (yyoutput, ")"); | |
1301 } | |
1302 | |
1303 /*------------------------------------------------------------------. | |
1304 | yy_stack_print -- Print the state stack from its BOTTOM up to its | | |
1305 | TOP (included). | | |
1306 `------------------------------------------------------------------*/ | |
1307 | |
1308 #if (defined __STDC__ || defined __C99__FUNC__ \ | |
1309 || defined __cplusplus || defined _MSC_VER) | |
1310 static void | |
1311 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) | |
1312 #else | |
1313 static void | |
1314 yy_stack_print (yybottom, yytop) | |
1315 yytype_int16 *yybottom; | |
1316 yytype_int16 *yytop; | |
1317 #endif | |
1318 { | |
1319 YYFPRINTF (stderr, "Stack now"); | |
1320 for (; yybottom <= yytop; yybottom++) | |
1321 { | |
1322 int yybot = *yybottom; | |
1323 YYFPRINTF (stderr, " %d", yybot); | |
1324 } | |
1325 YYFPRINTF (stderr, "\n"); | |
1326 } | |
1327 | |
1328 # define YY_STACK_PRINT(Bottom, Top) \ | |
1329 do { \ | |
1330 if (yydebug) \ | |
1331 yy_stack_print ((Bottom), (Top)); \ | |
1332 } while (YYID (0)) | |
1333 | |
1334 | |
1335 /*------------------------------------------------. | |
1336 | Report that the YYRULE is going to be reduced. | | |
1337 `------------------------------------------------*/ | |
1338 | |
1339 #if (defined __STDC__ || defined __C99__FUNC__ \ | |
1340 || defined __cplusplus || defined _MSC_VER) | |
1341 static void | |
1342 yy_reduce_print (YYSTYPE *yyvsp, int yyrule) | |
1343 #else | |
1344 static void | |
1345 yy_reduce_print (yyvsp, yyrule) | |
1346 YYSTYPE *yyvsp; | |
1347 int yyrule; | |
1348 #endif | |
1349 { | |
1350 int yynrhs = yyr2[yyrule]; | |
1351 int yyi; | |
1352 unsigned long int yylno = yyrline[yyrule]; | |
1353 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", | |
1354 yyrule - 1, yylno); | |
1355 /* The symbols being reduced. */ | |
1356 for (yyi = 0; yyi < yynrhs; yyi++) | |
1357 { | |
1358 YYFPRINTF (stderr, " $%d = ", yyi + 1); | |
1359 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], | |
1360 &(yyvsp[(yyi + 1) - (yynrhs)]) | |
1361 ); | |
1362 YYFPRINTF (stderr, "\n"); | |
1363 } | |
1364 } | |
1365 | |
1366 # define YY_REDUCE_PRINT(Rule) \ | |
1367 do { \ | |
1368 if (yydebug) \ | |
1369 yy_reduce_print (yyvsp, Rule); \ | |
1370 } while (YYID (0)) | |
1371 | |
1372 /* Nonzero means print parse trace. It is left uninitialized so that | |
1373 multiple parsers can coexist. */ | |
1374 int yydebug; | |
1375 #else /* !YYDEBUG */ | |
1376 # define YYDPRINTF(Args) | |
1377 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) | |
1378 # define YY_STACK_PRINT(Bottom, Top) | |
1379 # define YY_REDUCE_PRINT(Rule) | |
1380 #endif /* !YYDEBUG */ | |
1381 | |
1382 | |
1383 /* YYINITDEPTH -- initial size of the parser's stacks. */ | |
1384 #ifndef YYINITDEPTH | |
1385 # define YYINITDEPTH 200 | |
1386 #endif | |
1387 | |
1388 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only | |
1389 if the built-in stack extension method is used). | |
1390 | |
1391 Do not make this value too large; the results are undefined if | |
1392 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) | |
1393 evaluated with infinite-precision integer arithmetic. */ | |
1394 | |
1395 #ifndef YYMAXDEPTH | |
1396 # define YYMAXDEPTH 10000 | |
1397 #endif | |
1398 | |
1399 | |
1400 #if YYERROR_VERBOSE | |
1401 | |
1402 # ifndef yystrlen | |
1403 # if defined __GLIBC__ && defined _STRING_H | |
1404 # define yystrlen strlen | |
1405 # else | |
1406 /* Return the length of YYSTR. */ | |
1407 #if (defined __STDC__ || defined __C99__FUNC__ \ | |
1408 || defined __cplusplus || defined _MSC_VER) | |
1409 static YYSIZE_T | |
1410 yystrlen (const char *yystr) | |
1411 #else | |
1412 static YYSIZE_T | |
1413 yystrlen (yystr) | |
1414 const char *yystr; | |
1415 #endif | |
1416 { | |
1417 YYSIZE_T yylen; | |
1418 for (yylen = 0; yystr[yylen]; yylen++) | |
1419 continue; | |
1420 return yylen; | |
1421 } | |
1422 # endif | |
1423 # endif | |
1424 | |
1425 # ifndef yystpcpy | |
1426 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE | |
1427 # define yystpcpy stpcpy | |
1428 # else | |
1429 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in | |
1430 YYDEST. */ | |
1431 #if (defined __STDC__ || defined __C99__FUNC__ \ | |
1432 || defined __cplusplus || defined _MSC_VER) | |
1433 static char * | |
1434 yystpcpy (char *yydest, const char *yysrc) | |
1435 #else | |
1436 static char * | |
1437 yystpcpy (yydest, yysrc) | |
1438 char *yydest; | |
1439 const char *yysrc; | |
1440 #endif | |
1441 { | |
1442 char *yyd = yydest; | |
1443 const char *yys = yysrc; | |
1444 | |
1445 while ((*yyd++ = *yys++) != '\0') | |
1446 continue; | |
1447 | |
1448 return yyd - 1; | |
1449 } | |
1450 # endif | |
1451 # endif | |
1452 | |
1453 # ifndef yytnamerr | |
1454 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary | |
1455 quotes and backslashes, so that it's suitable for yyerror. The | |
1456 heuristic is that double-quoting is unnecessary unless the string | |
1457 contains an apostrophe, a comma, or backslash (other than | |
1458 backslash-backslash). YYSTR is taken from yytname. If YYRES is | |
1459 null, do not copy; instead, return the length of what the result | |
1460 would have been. */ | |
1461 static YYSIZE_T | |
1462 yytnamerr (char *yyres, const char *yystr) | |
1463 { | |
1464 if (*yystr == '"') | |
1465 { | |
1466 YYSIZE_T yyn = 0; | |
1467 char const *yyp = yystr; | |
1468 | |
1469 for (;;) | |
1470 switch (*++yyp) | |
1471 { | |
1472 case '\'': | |
1473 case ',': | |
1474 goto do_not_strip_quotes; | |
1475 | |
1476 case '\\': | |
1477 if (*++yyp != '\\') | |
1478 goto do_not_strip_quotes; | |
1479 /* Fall through. */ | |
1480 default: | |
1481 if (yyres) | |
1482 yyres[yyn] = *yyp; | |
1483 yyn++; | |
1484 break; | |
1485 | |
1486 case '"': | |
1487 if (yyres) | |
1488 yyres[yyn] = '\0'; | |
1489 return yyn; | |
1490 } | |
1491 do_not_strip_quotes: ; | |
1492 } | |
1493 | |
1494 if (! yyres) | |
1495 return yystrlen (yystr); | |
1496 | |
1497 return yystpcpy (yyres, yystr) - yyres; | |
1498 } | |
1499 # endif | |
1500 | |
1501 /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message | |
1502 about the unexpected token YYTOKEN for the state stack whose top is | |
1503 YYSSP. | |
1504 | |
1505 Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is | |
1506 not large enough to hold the message. In that case, also set | |
1507 *YYMSG_ALLOC to the required number of bytes. Return 2 if the | |
1508 required number of bytes is too large to store. */ | |
1509 static int | |
1510 yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, | |
1511 yytype_int16 *yyssp, int yytoken) | |
1512 { | |
1513 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytoken]); | |
1514 YYSIZE_T yysize = yysize0; | |
1515 YYSIZE_T yysize1; | |
1516 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; | |
1517 /* Internationalized format string. */ | |
1518 const char *yyformat = 0; | |
1519 /* Arguments of yyformat. */ | |
1520 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; | |
1521 /* Number of reported tokens (one for the "unexpected", one per | |
1522 "expected"). */ | |
1523 int yycount = 0; | |
1524 | |
1525 /* There are many possibilities here to consider: | |
1526 - Assume YYFAIL is not used. It's too flawed to consider. See | |
1527 <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html> | |
1528 for details. YYERROR is fine as it does not invoke this | |
1529 function. | |
1530 - If this state is a consistent state with a default action, then | |
1531 the only way this function was invoked is if the default action | |
1532 is an error action. In that case, don't check for expected | |
1533 tokens because there are none. | |
1534 - The only way there can be no lookahead present (in yychar) is if | |
1535 this state is a consistent state with a default action. Thus, | |
1536 detecting the absence of a lookahead is sufficient to determine | |
1537 that there is no unexpected or expected token to report. In that | |
1538 case, just report a simple "syntax error". | |
1539 - Don't assume there isn't a lookahead just because this state is a | |
1540 consistent state with a default action. There might have been a | |
1541 previous inconsistent state, consistent state with a non-default | |
1542 action, or user semantic action that manipulated yychar. | |
1543 - Of course, the expected token list depends on states to have | |
1544 correct lookahead information, and it depends on the parser not | |
1545 to perform extra reductions after fetching a lookahead from the | |
1546 scanner and before detecting a syntax error. Thus, state merging | |
1547 (from LALR or IELR) and default reductions corrupt the expected | |
1548 token list. However, the list is correct for canonical LR with | |
1549 one exception: it will still contain any token that will not be | |
1550 accepted due to an error action in a later state. | |
1551 */ | |
1552 if (yytoken != YYEMPTY) | |
1553 { | |
1554 int yyn = yypact[*yyssp]; | |
1555 yyarg[yycount++] = yytname[yytoken]; | |
1556 if (!yypact_value_is_default (yyn)) | |
1557 { | |
1558 /* Start YYX at -YYN if negative to avoid negative indexes in | |
1559 YYCHECK. In other words, skip the first -YYN actions for | |
1560 this state because they are default actions. */ | |
1561 int yyxbegin = yyn < 0 ? -yyn : 0; | |
1562 /* Stay within bounds of both yycheck and yytname. */ | |
1563 int yychecklim = YYLAST - yyn + 1; | |
1564 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; | |
1565 int yyx; | |
1566 | |
1567 for (yyx = yyxbegin; yyx < yyxend; ++yyx) | |
1568 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR | |
1569 && !yytable_value_is_error (yytable[yyx + yyn])) | |
1570 { | |
1571 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) | |
1572 { | |
1573 yycount = 1; | |
1574 yysize = yysize0; | |
1575 break; | |
1576 } | |
1577 yyarg[yycount++] = yytname[yyx]; | |
1578 yysize1 = yysize + yytnamerr (0, yytname[yyx]); | |
1579 if (! (yysize <= yysize1 | |
1580 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) | |
1581 return 2; | |
1582 yysize = yysize1; | |
1583 } | |
1584 } | |
1585 } | |
1586 | |
1587 switch (yycount) | |
1588 { | |
1589 # define YYCASE_(N, S) \ | |
1590 case N: \ | |
1591 yyformat = S; \ | |
1592 break | |
1593 YYCASE_(0, YY_("syntax error")); | |
1594 YYCASE_(1, YY_("syntax error, unexpected %s")); | |
1595 YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); | |
1596 YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); | |
1597 YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); | |
1598 YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); | |
1599 # undef YYCASE_ | |
1600 } | |
1601 | |
1602 yysize1 = yysize + yystrlen (yyformat); | |
1603 if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) | |
1604 return 2; | |
1605 yysize = yysize1; | |
1606 | |
1607 if (*yymsg_alloc < yysize) | |
1608 { | |
1609 *yymsg_alloc = 2 * yysize; | |
1610 if (! (yysize <= *yymsg_alloc | |
1611 && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) | |
1612 *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; | |
1613 return 1; | |
1614 } | |
1615 | |
1616 /* Avoid sprintf, as that infringes on the user's name space. | |
1617 Don't have undefined behavior even if the translation | |
1618 produced a string with the wrong number of "%s"s. */ | |
1619 { | |
1620 char *yyp = *yymsg; | |
1621 int yyi = 0; | |
1622 while ((*yyp = *yyformat) != '\0') | |
1623 if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) | |
1624 { | |
1625 yyp += yytnamerr (yyp, yyarg[yyi++]); | |
1626 yyformat += 2; | |
1627 } | |
1628 else | |
1629 { | |
1630 yyp++; | |
1631 yyformat++; | |
1632 } | |
1633 } | |
1634 return 0; | |
1635 } | |
1636 #endif /* YYERROR_VERBOSE */ | |
1637 | |
1638 /*-----------------------------------------------. | |
1639 | Release the memory associated to this symbol. | | |
1640 `-----------------------------------------------*/ | |
1641 | |
1642 /*ARGSUSED*/ | |
1643 #if (defined __STDC__ || defined __C99__FUNC__ \ | |
1644 || defined __cplusplus || defined _MSC_VER) | |
1645 static void | |
1646 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) | |
1647 #else | |
1648 static void | |
1649 yydestruct (yymsg, yytype, yyvaluep) | |
1650 const char *yymsg; | |
1651 int yytype; | |
1652 YYSTYPE *yyvaluep; | |
1653 #endif | |
1654 { | |
1655 YYUSE (yyvaluep); | |
1656 | |
1657 if (!yymsg) | |
1658 yymsg = "Deleting"; | |
1659 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); | |
1660 | |
1661 switch (yytype) | |
1662 { | |
1663 | |
1664 default: | |
1665 break; | |
1666 } | |
1667 } | |
1668 | |
1669 | |
1670 /* Prevent warnings from -Wmissing-prototypes. */ | |
1671 #ifdef YYPARSE_PARAM | |
1672 #if defined __STDC__ || defined __cplusplus | |
1673 int yyparse (void *YYPARSE_PARAM); | |
1674 #else | |
1675 int yyparse (); | |
1676 #endif | |
1677 #else /* ! YYPARSE_PARAM */ | |
1678 #if defined __STDC__ || defined __cplusplus | |
1679 int yyparse (void); | |
1680 #else | |
1681 int yyparse (); | |
1682 #endif | |
1683 #endif /* ! YYPARSE_PARAM */ | |
1684 | |
1685 | |
1686 /* The lookahead symbol. */ | |
1687 int yychar; | |
1688 | |
1689 /* The semantic value of the lookahead symbol. */ | |
1690 YYSTYPE yylval; | |
1691 | |
1692 /* Number of syntax errors so far. */ | |
1693 int yynerrs; | |
1694 | |
1695 | |
1696 /*----------. | |
1697 | yyparse. | | |
1698 `----------*/ | |
1699 | |
1700 #ifdef YYPARSE_PARAM | |
1701 #if (defined __STDC__ || defined __C99__FUNC__ \ | |
1702 || defined __cplusplus || defined _MSC_VER) | |
1703 int | |
1704 yyparse (void *YYPARSE_PARAM) | |
1705 #else | |
1706 int | |
1707 yyparse (YYPARSE_PARAM) | |
1708 void *YYPARSE_PARAM; | |
1709 #endif | |
1710 #else /* ! YYPARSE_PARAM */ | |
1711 #if (defined __STDC__ || defined __C99__FUNC__ \ | |
1712 || defined __cplusplus || defined _MSC_VER) | |
1713 int | |
1714 yyparse (void) | |
1715 #else | |
1716 int | |
1717 yyparse () | |
1718 | |
1719 #endif | |
1720 #endif | |
1721 { | |
1722 int yystate; | |
1723 /* Number of tokens to shift before error messages enabled. */ | |
1724 int yyerrstatus; | |
1725 | |
1726 /* The stacks and their tools: | |
1727 `yyss': related to states. | |
1728 `yyvs': related to semantic values. | |
1729 | |
1730 Refer to the stacks thru separate pointers, to allow yyoverflow | |
1731 to reallocate them elsewhere. */ | |
1732 | |
1733 /* The state stack. */ | |
1734 yytype_int16 yyssa[YYINITDEPTH]; | |
1735 yytype_int16 *yyss; | |
1736 yytype_int16 *yyssp; | |
1737 | |
1738 /* The semantic value stack. */ | |
1739 YYSTYPE yyvsa[YYINITDEPTH]; | |
1740 YYSTYPE *yyvs; | |
1741 YYSTYPE *yyvsp; | |
1742 | |
1743 YYSIZE_T yystacksize; | |
1744 | |
1745 int yyn; | |
1746 int yyresult; | |
1747 /* Lookahead token as an internal (translated) token number. */ | |
1748 int yytoken; | |
1749 /* The variables used to return semantic value and location from the | |
1750 action routines. */ | |
1751 YYSTYPE yyval; | |
1752 | |
1753 #if YYERROR_VERBOSE | |
1754 /* Buffer for error messages, and its allocated size. */ | |
1755 char yymsgbuf[128]; | |
1756 char *yymsg = yymsgbuf; | |
1757 YYSIZE_T yymsg_alloc = sizeof yymsgbuf; | |
1758 #endif | |
1759 | |
1760 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) | |
1761 | |
1762 /* The number of symbols on the RHS of the reduced rule. | |
1763 Keep to zero when no symbol should be popped. */ | |
1764 int yylen = 0; | |
1765 | |
1766 yytoken = 0; | |
1767 yyss = yyssa; | |
1768 yyvs = yyvsa; | |
1769 yystacksize = YYINITDEPTH; | |
1770 | |
1771 YYDPRINTF ((stderr, "Starting parse\n")); | |
1772 | |
1773 yystate = 0; | |
1774 yyerrstatus = 0; | |
1775 yynerrs = 0; | |
1776 yychar = YYEMPTY; /* Cause a token to be read. */ | |
1777 | |
1778 /* Initialize stack pointers. | |
1779 Waste one element of value and location stack | |
1780 so that they stay on the same level as the state stack. | |
1781 The wasted elements are never initialized. */ | |
1782 yyssp = yyss; | |
1783 yyvsp = yyvs; | |
1784 | |
1785 goto yysetstate; | |
1786 | |
1787 /*------------------------------------------------------------. | |
1788 | yynewstate -- Push a new state, which is found in yystate. | | |
1789 `------------------------------------------------------------*/ | |
1790 yynewstate: | |
1791 /* In all cases, when you get here, the value and location stacks | |
1792 have just been pushed. So pushing a state here evens the stacks. */ | |
1793 yyssp++; | |
1794 | |
1795 yysetstate: | |
1796 *yyssp = yystate; | |
1797 | |
1798 if (yyss + yystacksize - 1 <= yyssp) | |
1799 { | |
1800 /* Get the current used size of the three stacks, in elements. */ | |
1801 YYSIZE_T yysize = yyssp - yyss + 1; | |
1802 | |
1803 #ifdef yyoverflow | |
1804 { | |
1805 /* Give user a chance to reallocate the stack. Use copies of | |
1806 these so that the &'s don't force the real ones into | |
1807 memory. */ | |
1808 YYSTYPE *yyvs1 = yyvs; | |
1809 yytype_int16 *yyss1 = yyss; | |
1810 | |
1811 /* Each stack pointer address is followed by the size of the | |
1812 data in use in that stack, in bytes. This used to be a | |
1813 conditional around just the two extra args, but that might | |
1814 be undefined if yyoverflow is a macro. */ | |
1815 yyoverflow (YY_("memory exhausted"), | |
1816 &yyss1, yysize * sizeof (*yyssp), | |
1817 &yyvs1, yysize * sizeof (*yyvsp), | |
1818 &yystacksize); | |
1819 | |
1820 yyss = yyss1; | |
1821 yyvs = yyvs1; | |
1822 } | |
1823 #else /* no yyoverflow */ | |
1824 # ifndef YYSTACK_RELOCATE | |
1825 goto yyexhaustedlab; | |
1826 # else | |
1827 /* Extend the stack our own way. */ | |
1828 if (YYMAXDEPTH <= yystacksize) | |
1829 goto yyexhaustedlab; | |
1830 yystacksize *= 2; | |
1831 if (YYMAXDEPTH < yystacksize) | |
1832 yystacksize = YYMAXDEPTH; | |
1833 | |
1834 { | |
1835 yytype_int16 *yyss1 = yyss; | |
1836 union yyalloc *yyptr = | |
1837 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); | |
1838 if (! yyptr) | |
1839 goto yyexhaustedlab; | |
1840 YYSTACK_RELOCATE (yyss_alloc, yyss); | |
1841 YYSTACK_RELOCATE (yyvs_alloc, yyvs); | |
1842 # undef YYSTACK_RELOCATE | |
1843 if (yyss1 != yyssa) | |
1844 YYSTACK_FREE (yyss1); | |
1845 } | |
1846 # endif | |
1847 #endif /* no yyoverflow */ | |
1848 | |
1849 yyssp = yyss + yysize - 1; | |
1850 yyvsp = yyvs + yysize - 1; | |
1851 | |
1852 YYDPRINTF ((stderr, "Stack size increased to %lu\n", | |
1853 (unsigned long int) yystacksize)); | |
1854 | |
1855 if (yyss + yystacksize - 1 <= yyssp) | |
1856 YYABORT; | |
1857 } | |
1858 | |
1859 YYDPRINTF ((stderr, "Entering state %d\n", yystate)); | |
1860 | |
1861 if (yystate == YYFINAL) | |
1862 YYACCEPT; | |
1863 | |
1864 goto yybackup; | |
1865 | |
1866 /*-----------. | |
1867 | yybackup. | | |
1868 `-----------*/ | |
1869 yybackup: | |
1870 | |
1871 /* Do appropriate processing given the current state. Read a | |
1872 lookahead token if we need one and don't already have one. */ | |
1873 | |
1874 /* First try to decide what to do without reference to lookahead token. */ | |
1875 yyn = yypact[yystate]; | |
1876 if (yypact_value_is_default (yyn)) | |
1877 goto yydefault; | |
1878 | |
1879 /* Not known => get a lookahead token if don't already have one. */ | |
1880 | |
1881 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ | |
1882 if (yychar == YYEMPTY) | |
1883 { | |
1884 YYDPRINTF ((stderr, "Reading a token: ")); | |
1885 yychar = YYLEX; | |
1886 } | |
1887 | |
1888 if (yychar <= YYEOF) | |
1889 { | |
1890 yychar = yytoken = YYEOF; | |
1891 YYDPRINTF ((stderr, "Now at end of input.\n")); | |
1892 } | |
1893 else | |
1894 { | |
1895 yytoken = YYTRANSLATE (yychar); | |
1896 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); | |
1897 } | |
1898 | |
1899 /* If the proper action on seeing token YYTOKEN is to reduce or to | |
1900 detect an error, take that action. */ | |
1901 yyn += yytoken; | |
1902 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | |
1903 goto yydefault; | |
1904 yyn = yytable[yyn]; | |
1905 if (yyn <= 0) | |
1906 { | |
1907 if (yytable_value_is_error (yyn)) | |
1908 goto yyerrlab; | |
1909 yyn = -yyn; | |
1910 goto yyreduce; | |
1911 } | |
1912 | |
1913 /* Count tokens shifted since error; after three, turn off error | |
1914 status. */ | |
1915 if (yyerrstatus) | |
1916 yyerrstatus--; | |
1917 | |
1918 /* Shift the lookahead token. */ | |
1919 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); | |
1920 | |
1921 /* Discard the shifted token. */ | |
1922 yychar = YYEMPTY; | |
1923 | |
1924 yystate = yyn; | |
1925 *++yyvsp = yylval; | |
1926 | |
1927 goto yynewstate; | |
1928 | |
1929 | |
1930 /*-----------------------------------------------------------. | |
1931 | yydefault -- do the default action for the current state. | | |
1932 `-----------------------------------------------------------*/ | |
1933 yydefault: | |
1934 yyn = yydefact[yystate]; | |
1935 if (yyn == 0) | |
1936 goto yyerrlab; | |
1937 goto yyreduce; | |
1938 | |
1939 | |
1940 /*-----------------------------. | |
1941 | yyreduce -- Do a reduction. | | |
1942 `-----------------------------*/ | |
1943 yyreduce: | |
1944 /* yyn is the number of a rule to reduce with. */ | |
1945 yylen = yyr2[yyn]; | |
1946 | |
1947 /* If YYLEN is nonzero, implement the default value of the action: | |
1948 `$$ = $1'. | |
1949 | |
1950 Otherwise, the following line sets YYVAL to garbage. | |
1951 This behavior is undocumented and Bison | |
1952 users should not rely upon it. Assigning to YYVAL | |
1953 unconditionally makes the parser a bit smaller, and it avoids a | |
1954 GCC warning that YYVAL may be used uninitialized. */ | |
1955 yyval = yyvsp[1-yylen]; | |
1956 | |
1957 | |
1958 YY_REDUCE_PRINT (yyn); | |
1959 switch (yyn) | |
1960 { | |
1961 case 4: | |
1962 | |
1963 /* Line 1806 of yacc.c */ | |
1964 #line 182 "parser.y" | |
1965 {(yyvsp[(2) - (2)].tuple)->label = 0; (yyvsp[(2) - (2)].tuple)->exechance = (yyvsp[(1) - (2)].numval) * 100;} | |
1966 break; | |
1967 | |
1968 case 5: | |
1969 | |
1970 /* Line 1806 of yacc.c */ | |
1971 #line 184 "parser.y" | |
1972 {(yyvsp[(3) - (3)].tuple)->label = 0; (yyvsp[(3) - (3)].tuple)->exechance = (yyvsp[(1) - (3)].numval) * (yyvsp[(2) - (3)].numval);} | |
1973 break; | |
1974 | |
1975 case 6: | |
1976 | |
1977 /* Line 1806 of yacc.c */ | |
1978 #line 186 "parser.y" | |
1979 {checklabel((yyvsp[(1) - (3)].numval)); (yyvsp[(3) - (3)].tuple)->label = (yyvsp[(1) - (3)].numval); (yyvsp[(3) - (3)].tuple)->exechance = (yyvsp[(2) - (3)].numval) * 100;} | |
1980 break; | |
1981 | |
1982 case 7: | |
1983 | |
1984 /* Line 1806 of yacc.c */ | |
1985 #line 188 "parser.y" | |
1986 {checklabel((yyvsp[(1) - (4)].numval)); (yyvsp[(4) - (4)].tuple)->label = (yyvsp[(1) - (4)].numval); (yyvsp[(4) - (4)].tuple)->exechance = (yyvsp[(2) - (4)].numval) * (yyvsp[(3) - (4)].numval);} | |
1987 break; | |
1988 | |
1989 case 8: | |
1990 | |
1991 /* Line 1806 of yacc.c */ | |
1992 #line 190 "parser.y" | |
1993 {/* AIS: catch errors which occur after the end of a statement | |
1994 (highly likely when comments are being written, as the | |
1995 start of them will be parsed as an UNKNOWN) */ | |
1996 yyerrok; yyclearin; cacsofar=0; | |
1997 if(prevtuple) {prevtuple->type=SPLATTERED; splat(0);} | |
1998 else splat(1); /* this is the first statement */ | |
1999 } | |
2000 break; | |
2001 | |
2002 case 9: | |
2003 | |
2004 /* Line 1806 of yacc.c */ | |
2005 #line 205 "parser.y" | |
2006 {(yyvsp[(1) - (1)].tuple)->onceagainflag = onceagain_NORMAL; prevtuple = (yyval.tuple) = (yyvsp[(1) - (1)].tuple);} | |
2007 break; | |
2008 | |
2009 case 10: | |
2010 | |
2011 /* Line 1806 of yacc.c */ | |
2012 #line 207 "parser.y" | |
2013 {NEWFANGLED {(yyvsp[(1) - (2)].tuple)->onceagainflag = onceagain_ONCE; | |
2014 prevtuple = (yyval.tuple) = (yyvsp[(1) - (2)].tuple);}} | |
2015 break; | |
2016 | |
2017 case 11: | |
2018 | |
2019 /* Line 1806 of yacc.c */ | |
2020 #line 210 "parser.y" | |
2021 {NEWFANGLED {(yyvsp[(1) - (2)].tuple)->onceagainflag = onceagain_AGAIN; | |
2022 prevtuple = (yyval.tuple) = (yyvsp[(1) - (2)].tuple);}} | |
2023 break; | |
2024 | |
2025 case 12: | |
2026 | |
2027 /* Line 1806 of yacc.c */ | |
2028 #line 226 "parser.y" | |
2029 {(yyval.tuple) = (yyvsp[(1) - (1)].tuple);} | |
2030 break; | |
2031 | |
2032 case 13: | |
2033 | |
2034 /* Line 1806 of yacc.c */ | |
2035 #line 228 "parser.y" | |
2036 { | |
2037 if(!multithread) ick_lose(IE405, iyylineno, (char*)NULL); | |
2038 NEWFANGLED{ | |
2039 /* (x) DO a WHILE b | |
2040 is equivalent to | |
2041 #11 (l0) DO REINSTATE (l3) <weave on> | |
2042 #10 (l1) DO COME FROM (l2) AGAIN | |
2043 #9 DO b | |
2044 #8 DO COME FROM (l0) | |
2045 #7 DO NOTHING | |
2046 #6 DO NOTHING | |
2047 #5 (l2) DO NOTHING | |
2048 #4 DO GIVE UP | |
2049 #3 DO COME FROM (l0) | |
2050 #2 (x) DO a | |
2051 #1 (l3) DON'T ABSTAIN FROM (l1) AGAIN <weave off> */ | |
2052 tuple* temptuple; | |
2053 TARGET(temptuple, COME_FROM, lineuid+2); | |
2054 temptuple->label=lineuid+1; temptuple->preproc=1; /* #10 */ | |
2055 TARGET(temptuple, COME_FROM, lineuid+0); temptuple->preproc=1; /* #8 */ | |
2056 ACTION(temptuple, PREPROC, 0); temptuple->preproc=1; /* #7 */ | |
2057 ACTION(temptuple, PREPROC, 0); temptuple->preproc=1; /* #6 */ | |
2058 ACTION(temptuple, PREPROC, 0); | |
2059 temptuple->label=lineuid+2; temptuple->preproc=1; /* #5 */ | |
2060 ACTION(temptuple, GIVE_UP, 0); temptuple->preproc=1; /* #4 */ | |
2061 TARGET(temptuple, COME_FROM, lineuid+0); temptuple->preproc=1; /* #3 */ | |
2062 TARGET(temptuple, REINSTATE, lineuid+3); temptuple->setweave=1; | |
2063 temptuple->label=lineuid+0; temptuple->preproc=1; /* #11 */ | |
2064 TARGET(temptuple, ABSTAIN, lineuid+1); temptuple->label=lineuid+3; /* #1 */ | |
2065 temptuple->preproc=1; temptuple->setweave=-1; temptuple->exechance=-100; | |
2066 politesse += 3; /* Keep the politeness checker happy */ | |
2067 ppinit(11); tupleswap(10,9); tupleswap(11,2); lineuid+=4; /* #2, #9 */ | |
2068 tuples[ick_lineno-10].onceagainflag=onceagain_AGAIN; | |
2069 tuples[ick_lineno-1].onceagainflag=onceagain_AGAIN; | |
2070 (yyval.tuple)=&(tuples[ick_lineno-2]); | |
2071 }} | |
2072 break; | |
2073 | |
2074 case 14: | |
2075 | |
2076 /* Line 1806 of yacc.c */ | |
2077 #line 266 "parser.y" | |
2078 {GETLINENO; (yyval.numval) = 1;} | |
2079 break; | |
2080 | |
2081 case 15: | |
2082 | |
2083 /* Line 1806 of yacc.c */ | |
2084 #line 267 "parser.y" | |
2085 {GETLINENO; (yyval.numval) = -1;} | |
2086 break; | |
2087 | |
2088 case 16: | |
2089 | |
2090 /* Line 1806 of yacc.c */ | |
2091 #line 268 "parser.y" | |
2092 {NEWFANGLED {GETLINENO; (yyval.numval) = 101;}} | |
2093 break; | |
2094 | |
2095 case 17: | |
2096 | |
2097 /* Line 1806 of yacc.c */ | |
2098 #line 269 "parser.y" | |
2099 {NEWFANGLED {GETLINENO; (yyval.numval) = -101;}} | |
2100 break; | |
2101 | |
2102 case 18: | |
2103 | |
2104 /* Line 1806 of yacc.c */ | |
2105 #line 273 "parser.y" | |
2106 {ACTION((yyval.tuple), GETS, cons(GETS,(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node)));} | |
2107 break; | |
2108 | |
2109 case 19: | |
2110 | |
2111 /* Line 1806 of yacc.c */ | |
2112 #line 274 "parser.y" | |
2113 {ACTION((yyval.tuple), RESIZE, cons(RESIZE,(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node)));} | |
2114 break; | |
2115 | |
2116 case 20: | |
2117 | |
2118 /* Line 1806 of yacc.c */ | |
2119 #line 276 "parser.y" | |
2120 {/* AIS: This is for variableconstants, and an error otherwise.*/ | |
2121 if(variableconstants) ACTION((yyval.tuple), GETS, cons(GETS,(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node))) | |
2122 else {yyerrok; yyclearin; (yyval.tuple)=splat(1);}} | |
2123 break; | |
2124 | |
2125 case 21: | |
2126 | |
2127 /* Line 1806 of yacc.c */ | |
2128 #line 279 "parser.y" | |
2129 {TARGET((yyval.tuple), NEXT, (yyvsp[(1) - (2)].numval));} | |
2130 break; | |
2131 | |
2132 case 22: | |
2133 | |
2134 /* Line 1806 of yacc.c */ | |
2135 #line 280 "parser.y" | |
2136 {ACTION((yyval.tuple), FORGET, (yyvsp[(2) - (2)].node));} | |
2137 break; | |
2138 | |
2139 case 23: | |
2140 | |
2141 /* Line 1806 of yacc.c */ | |
2142 #line 281 "parser.y" | |
2143 {ACTION((yyval.tuple), RESUME, (yyvsp[(2) - (2)].node));} | |
2144 break; | |
2145 | |
2146 case 24: | |
2147 | |
2148 /* Line 1806 of yacc.c */ | |
2149 #line 282 "parser.y" | |
2150 {ACTION((yyval.tuple), STASH, rlist);} | |
2151 break; | |
2152 | |
2153 case 25: | |
2154 | |
2155 /* Line 1806 of yacc.c */ | |
2156 #line 283 "parser.y" | |
2157 {ACTION((yyval.tuple), RETRIEVE, rlist);} | |
2158 break; | |
2159 | |
2160 case 26: | |
2161 | |
2162 /* Line 1806 of yacc.c */ | |
2163 #line 284 "parser.y" | |
2164 {ACTION((yyval.tuple), IGNORE, rlist);} | |
2165 break; | |
2166 | |
2167 case 27: | |
2168 | |
2169 /* Line 1806 of yacc.c */ | |
2170 #line 285 "parser.y" | |
2171 {ACTION((yyval.tuple), REMEMBER, rlist);} | |
2172 break; | |
2173 | |
2174 case 28: | |
2175 | |
2176 /* Line 1806 of yacc.c */ | |
2177 #line 286 "parser.y" | |
2178 {stbeginline=0; TARGET((yyval.tuple), ABSTAIN, (yyvsp[(3) - (3)].numval));} | |
2179 break; | |
2180 | |
2181 case 29: | |
2182 | |
2183 /* Line 1806 of yacc.c */ | |
2184 #line 287 "parser.y" | |
2185 {ACTION((yyval.tuple), DISABLE, rlist);} | |
2186 break; | |
2187 | |
2188 case 30: | |
2189 | |
2190 /* Line 1806 of yacc.c */ | |
2191 #line 288 "parser.y" | |
2192 {/* AIS */ NEWFANGLED {stbeginline=0; ACTARGET((yyval.tuple), FROM, (yyvsp[(2) - (4)].node), (yyvsp[(4) - (4)].numval));}} | |
2193 break; | |
2194 | |
2195 case 31: | |
2196 | |
2197 /* Line 1806 of yacc.c */ | |
2198 #line 289 "parser.y" | |
2199 {/* AIS */ NEWFANGLED {(yyval.tuple) = newtuple(); (yyval.tuple)->type = MANYFROM; (yyval.tuple)->ick_lineno = thisline; \ | |
2200 {node* tempnode=newnode(); (yyval.tuple)->u.node = tempnode; tempnode->lval=(yyvsp[(2) - (4)].node); tempnode->rval=rlist; tempnode->opcode=MANYFROM;}}} | |
2201 break; | |
2202 | |
2203 case 32: | |
2204 | |
2205 /* Line 1806 of yacc.c */ | |
2206 #line 291 "parser.y" | |
2207 {stbeginline=0; TARGET((yyval.tuple), REINSTATE, (yyvsp[(2) - (2)].numval));} | |
2208 break; | |
2209 | |
2210 case 33: | |
2211 | |
2212 /* Line 1806 of yacc.c */ | |
2213 #line 292 "parser.y" | |
2214 {ACTION((yyval.tuple), ENABLE, rlist);} | |
2215 break; | |
2216 | |
2217 case 34: | |
2218 | |
2219 /* Line 1806 of yacc.c */ | |
2220 #line 293 "parser.y" | |
2221 {ACTION((yyval.tuple), WRITE_IN, (yyvsp[(2) - (2)].node));} | |
2222 break; | |
2223 | |
2224 case 35: | |
2225 | |
2226 /* Line 1806 of yacc.c */ | |
2227 #line 294 "parser.y" | |
2228 {ACTION((yyval.tuple), READ_OUT, (yyvsp[(2) - (2)].node));} | |
2229 break; | |
2230 | |
2231 case 36: | |
2232 | |
2233 /* Line 1806 of yacc.c */ | |
2234 #line 295 "parser.y" | |
2235 {ACTION((yyval.tuple), PIN, (yyvsp[(2) - (2)].node));} | |
2236 break; | |
2237 | |
2238 case 37: | |
2239 | |
2240 /* Line 1806 of yacc.c */ | |
2241 #line 296 "parser.y" | |
2242 {ACTION((yyval.tuple), GIVE_UP, 0);} | |
2243 break; | |
2244 | |
2245 case 38: | |
2246 | |
2247 /* Line 1806 of yacc.c */ | |
2248 #line 297 "parser.y" | |
2249 {/* AIS */ NEWFANGLED {ACTION((yyval.tuple), GO_AHEAD, 0);}} | |
2250 break; | |
2251 | |
2252 case 39: | |
2253 | |
2254 /* Line 1806 of yacc.c */ | |
2255 #line 298 "parser.y" | |
2256 {/* AIS */ NEWFANGLED {ACTION((yyval.tuple), GO_BACK, 0);}} | |
2257 break; | |
2258 | |
2259 case 40: | |
2260 | |
2261 /* Line 1806 of yacc.c */ | |
2262 #line 299 "parser.y" | |
2263 {/* AIS */ NEWFANGLED {ACTION((yyval.tuple),TRY_AGAIN,0);}} | |
2264 break; | |
2265 | |
2266 case 41: | |
2267 | |
2268 /* Line 1806 of yacc.c */ | |
2269 #line 300 "parser.y" | |
2270 {/* AIS: Modified */ NEWFANGLED {TARGET((yyval.tuple),COME_FROM,(yyvsp[(1) - (1)].numval));}} | |
2271 break; | |
2272 | |
2273 case 42: | |
2274 | |
2275 /* Line 1806 of yacc.c */ | |
2276 #line 301 "parser.y" | |
2277 {/* AIS: COME FROM gerund */ | |
2278 NEWFANGLED{ACTION((yyval.tuple),GERUCOME,rlist); | |
2279 compucomesused=1; gerucomesused=1;}} | |
2280 break; | |
2281 | |
2282 case 43: | |
2283 | |
2284 /* Line 1806 of yacc.c */ | |
2285 #line 304 "parser.y" | |
2286 {/* AIS */NEWFANGLED {ACTION((yyval.tuple),COMPUCOME,(yyvsp[(2) - (2)].node)); | |
2287 compucomesused=1;}} | |
2288 break; | |
2289 | |
2290 case 44: | |
2291 | |
2292 /* Line 1806 of yacc.c */ | |
2293 #line 307 "parser.y" | |
2294 {NEWFANGLED {TARGET((yyval.tuple),NEXTFROMLABEL,(yyvsp[(1) - (1)].numval));} | |
2295 nextfromsused=1;} | |
2296 break; | |
2297 | |
2298 case 45: | |
2299 | |
2300 /* Line 1806 of yacc.c */ | |
2301 #line 309 "parser.y" | |
2302 {NEWFANGLED{ACTION((yyval.tuple),NEXTFROMGERUND,rlist); | |
2303 compucomesused=1; gerucomesused=1;} | |
2304 nextfromsused=1;} | |
2305 break; | |
2306 | |
2307 case 46: | |
2308 | |
2309 /* Line 1806 of yacc.c */ | |
2310 #line 312 "parser.y" | |
2311 {NEWFANGLED {ACTION((yyval.tuple),NEXTFROMEXPR,(yyvsp[(2) - (2)].node)); | |
2312 compucomesused=1; nextfromsused=1;}} | |
2313 break; | |
2314 | |
2315 case 47: | |
2316 | |
2317 /* Line 1806 of yacc.c */ | |
2318 #line 315 "parser.y" | |
2319 {NEWFANGLED{ACTARGET((yyval.tuple),CREATE,(yyvsp[(2) - (2)].node),(yyvsp[(1) - (2)].numval)); cacsofar=0;}} | |
2320 break; | |
2321 | |
2322 case 48: | |
2323 | |
2324 /* Line 1806 of yacc.c */ | |
2325 #line 316 "parser.y" | |
2326 {NEWFANGLED{ACTION((yyval.tuple),COMPUCREATE, | |
2327 cons(INTERSECTION,(yyvsp[(2) - (3)].node),(yyvsp[(3) - (3)].node))); cacsofar=0;}} | |
2328 break; | |
2329 | |
2330 case 49: | |
2331 | |
2332 /* Line 1806 of yacc.c */ | |
2333 #line 319 "parser.y" | |
2334 {NEWFANGLED{ACTARGET((yyval.tuple),CREATE,(yyvsp[(2) - (2)].node),(yyvsp[(1) - (2)].numval)); | |
2335 cacsofar=0;}} | |
2336 break; | |
2337 | |
2338 case 50: | |
2339 | |
2340 /* Line 1806 of yacc.c */ | |
2341 #line 322 "parser.y" | |
2342 {NEWFANGLED{ACTION((yyval.tuple),COMPUCREATE, | |
2343 cons(INTERSECTION,(yyvsp[(2) - (3)].node),(yyvsp[(3) - (3)].node))); cacsofar=0;}} | |
2344 break; | |
2345 | |
2346 case 51: | |
2347 | |
2348 /* Line 1806 of yacc.c */ | |
2349 #line 325 "parser.y" | |
2350 {NEWFANGLED {ACTION((yyval.tuple),UNKNOWN,(yyvsp[(1) - (1)].node)); cacsofar=0;}} | |
2351 break; | |
2352 | |
2353 case 52: | |
2354 | |
2355 /* Line 1806 of yacc.c */ | |
2356 #line 327 "parser.y" | |
2357 {yyclearin; yyerrok; (yyval.tuple) = splat(1); cacsofar=0;} | |
2358 break; | |
2359 | |
2360 case 53: | |
2361 | |
2362 /* Line 1806 of yacc.c */ | |
2363 #line 328 "parser.y" | |
2364 {yyclearin; yyerrok; (yyval.tuple) = splat(1); cacsofar=0;} | |
2365 break; | |
2366 | |
2367 case 54: | |
2368 | |
2369 /* Line 1806 of yacc.c */ | |
2370 #line 333 "parser.y" | |
2371 {(yyval.node) = (yyvsp[(1) - (1)].node); intern(ick_TWOSPOT,cacsofar+++1601);} | |
2372 break; | |
2373 | |
2374 case 55: | |
2375 | |
2376 /* Line 1806 of yacc.c */ | |
2377 #line 334 "parser.y" | |
2378 {(yyval.node)=cons(INTERSECTION,(yyvsp[(1) - (2)].node),(yyvsp[(2) - (2)].node)); | |
2379 intern(ick_TWOSPOT,cacsofar+++1601);} | |
2380 break; | |
2381 | |
2382 case 56: | |
2383 | |
2384 /* Line 1806 of yacc.c */ | |
2385 #line 336 "parser.y" | |
2386 {(yyval.node) = (yyvsp[(1) - (1)].node);} | |
2387 break; | |
2388 | |
2389 case 57: | |
2390 | |
2391 /* Line 1806 of yacc.c */ | |
2392 #line 339 "parser.y" | |
2393 {(yyval.node) = (yyvsp[(1) - (1)].node);} | |
2394 break; | |
2395 | |
2396 case 58: | |
2397 | |
2398 /* Line 1806 of yacc.c */ | |
2399 #line 340 "parser.y" | |
2400 {(yyval.node)=cons(INTERSECTION,(yyvsp[(1) - (2)].node),(yyvsp[(2) - (2)].node));} | |
2401 break; | |
2402 | |
2403 case 59: | |
2404 | |
2405 /* Line 1806 of yacc.c */ | |
2406 #line 342 "parser.y" | |
2407 {(yyval.node) = (yyvsp[(1) - (1)].node);} | |
2408 break; | |
2409 | |
2410 case 60: | |
2411 | |
2412 /* Line 1806 of yacc.c */ | |
2413 #line 343 "parser.y" | |
2414 {(yyval.node)=cons(INTERSECTION,(yyvsp[(1) - (2)].node),(yyvsp[(2) - (2)].node));} | |
2415 break; | |
2416 | |
2417 case 61: | |
2418 | |
2419 /* Line 1806 of yacc.c */ | |
2420 #line 348 "parser.y" | |
2421 {(yyval.node)=cons(US_ELEM,0,(yyvsp[(1) - (1)].node)); | |
2422 if(createsused){ | |
2423 opoverused=1; if(!firstslat) | |
2424 firstslat=(yyvsp[(1) - (1)].node); else | |
2425 prevslat->nextslat=(yyvsp[(1) - (1)].node); | |
2426 prevslat=(yyvsp[(1) - (1)].node); | |
2427 (yyvsp[(1) - (1)].node)->nextslat=0;}} | |
2428 break; | |
2429 | |
2430 case 62: | |
2431 | |
2432 /* Line 1806 of yacc.c */ | |
2433 #line 355 "parser.y" | |
2434 {(yyval.node)=cons(US_SCALAR,0,(yyvsp[(1) - (1)].node)); | |
2435 if(createsused){ | |
2436 opoverused=1; if(!firstslat) | |
2437 firstslat=(yyvsp[(1) - (1)].node); else | |
2438 prevslat->nextslat=(yyvsp[(1) - (1)].node); | |
2439 prevslat=(yyvsp[(1) - (1)].node); | |
2440 (yyvsp[(1) - (1)].node)->nextslat=0;}} | |
2441 break; | |
2442 | |
2443 case 63: | |
2444 | |
2445 /* Line 1806 of yacc.c */ | |
2446 #line 362 "parser.y" | |
2447 {(yyval.node)=cons(US_EXPR,0,(yyvsp[(1) - (1)].node)); | |
2448 if(createsused){ | |
2449 opoverused=1; if(!firstslat) | |
2450 firstslat=(yyvsp[(1) - (1)].node); else | |
2451 prevslat->nextslat=(yyvsp[(1) - (1)].node); | |
2452 prevslat=(yyvsp[(1) - (1)].node); | |
2453 (yyvsp[(1) - (1)].node)->nextslat=0;}} | |
2454 break; | |
2455 | |
2456 case 64: | |
2457 | |
2458 /* Line 1806 of yacc.c */ | |
2459 #line 369 "parser.y" | |
2460 {(yyval.node)=cons(US_ARRVAR,0,(yyvsp[(1) - (1)].node));} | |
2461 break; | |
2462 | |
2463 case 65: | |
2464 | |
2465 /* Line 1806 of yacc.c */ | |
2466 #line 372 "parser.y" | |
2467 {(yyval.node)=newnode(); (yyval.node)->opcode=US_ID; (yyval.node)->constant=(yyvsp[(1) - (1)].numval);} | |
2468 break; | |
2469 | |
2470 case 66: | |
2471 | |
2472 /* Line 1806 of yacc.c */ | |
2473 #line 377 "parser.y" | |
2474 {rlist = np = newnode(); np->constant = (yyvsp[(1) - (1)].numval);} | |
2475 break; | |
2476 | |
2477 case 67: | |
2478 | |
2479 /* Line 1806 of yacc.c */ | |
2480 #line 379 "parser.y" | |
2481 { | |
2482 np->rval = newnode(); | |
2483 np = np->rval; | |
2484 np->constant = (yyvsp[(3) - (3)].numval); | |
2485 } | |
2486 break; | |
2487 | |
2488 case 72: | |
2489 | |
2490 /* Line 1806 of yacc.c */ | |
2491 #line 392 "parser.y" | |
2492 { | |
2493 (yyval.node) = newnode(); | |
2494 (yyval.node)->opcode = ick_TWOSPOT; | |
2495 (yyval.node)->constant = intern(ick_TWOSPOT, (yyvsp[(2) - (2)].numval)); | |
2496 } | |
2497 break; | |
2498 | |
2499 case 73: | |
2500 | |
2501 /* Line 1806 of yacc.c */ | |
2502 #line 398 "parser.y" | |
2503 { | |
2504 (yyval.node) = newnode(); | |
2505 (yyval.node)->opcode = ick_ONESPOT; | |
2506 (yyval.node)->constant = intern(ick_ONESPOT, (yyvsp[(2) - (2)].numval)); | |
2507 } | |
2508 break; | |
2509 | |
2510 case 74: | |
2511 | |
2512 /* Line 1806 of yacc.c */ | |
2513 #line 404 "parser.y" | |
2514 { | |
2515 (yyval.node) = newnode(); | |
2516 (yyval.node)->opcode = ick_TWOSPOT; | |
2517 (yyval.node)->constant = intern(ick_TWOSPOT, (yyvsp[(2) - (2)].numval)); | |
2518 } | |
2519 break; | |
2520 | |
2521 case 75: | |
2522 | |
2523 /* Line 1806 of yacc.c */ | |
2524 #line 412 "parser.y" | |
2525 { | |
2526 (yyval.node) = newnode(); | |
2527 (yyval.node)->opcode = ick_TAIL; | |
2528 (yyval.node)->constant = intern(ick_TAIL, (yyvsp[(2) - (2)].numval)); | |
2529 } | |
2530 break; | |
2531 | |
2532 case 76: | |
2533 | |
2534 /* Line 1806 of yacc.c */ | |
2535 #line 418 "parser.y" | |
2536 { | |
2537 (yyval.node) = newnode(); | |
2538 (yyval.node)->opcode = ick_HYBRID; | |
2539 (yyval.node)->constant = intern(ick_HYBRID, (yyvsp[(2) - (2)].numval)); | |
2540 } | |
2541 break; | |
2542 | |
2543 case 77: | |
2544 | |
2545 /* Line 1806 of yacc.c */ | |
2546 #line 428 "parser.y" | |
2547 { | |
2548 (yyval.node) = newnode(); | |
2549 (yyval.node)->opcode = (yyvsp[(2) - (3)].numval); | |
2550 (yyval.node)->rval = newnode(); | |
2551 (yyval.node)->rval->opcode = ick_TAIL; | |
2552 (yyval.node)->rval->constant = intern(ick_TAIL, (yyvsp[(3) - (3)].numval)); | |
2553 } | |
2554 break; | |
2555 | |
2556 case 78: | |
2557 | |
2558 /* Line 1806 of yacc.c */ | |
2559 #line 436 "parser.y" | |
2560 { | |
2561 (yyval.node) = newnode(); | |
2562 (yyval.node)->opcode = (yyvsp[(2) - (3)].numval); | |
2563 (yyval.node)->rval = newnode(); | |
2564 (yyval.node)->rval->opcode = ick_HYBRID; | |
2565 (yyval.node)->rval->constant = intern(ick_HYBRID, (yyvsp[(3) - (3)].numval)); | |
2566 } | |
2567 break; | |
2568 | |
2569 case 79: | |
2570 | |
2571 /* Line 1806 of yacc.c */ | |
2572 #line 447 "parser.y" | |
2573 { | |
2574 /* enforce the 16-bit constant constraint */ | |
2575 if ((unsigned int)(yyvsp[(2) - (2)].numval) > ick_Max_small) | |
2576 ick_lose(IE017, iyylineno, (char *)NULL); | |
2577 (yyval.node) = newnode(); | |
2578 (yyval.node)->opcode = MESH; | |
2579 if(variableconstants) /* AIS */ | |
2580 (yyval.node)->constant = intern(MESH, (yyvsp[(2) - (2)].numval)); | |
2581 else | |
2582 (yyval.node)->constant = (yyvsp[(2) - (2)].numval); | |
2583 } | |
2584 break; | |
2585 | |
2586 case 80: | |
2587 | |
2588 /* Line 1806 of yacc.c */ | |
2589 #line 461 "parser.y" | |
2590 {rlist = np = (yyvsp[(1) - (1)].node);} | |
2591 break; | |
2592 | |
2593 case 81: | |
2594 | |
2595 /* Line 1806 of yacc.c */ | |
2596 #line 462 "parser.y" | |
2597 {np = np->rval = (yyvsp[(3) - (3)].node); | |
2598 /* newnode(); */ } | |
2599 break; | |
2600 | |
2601 case 85: | |
2602 | |
2603 /* Line 1806 of yacc.c */ | |
2604 #line 469 "parser.y" | |
2605 {(yyval.node)=cons(INTERSECTION,(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node));} | |
2606 break; | |
2607 | |
2608 case 86: | |
2609 | |
2610 /* Line 1806 of yacc.c */ | |
2611 #line 470 "parser.y" | |
2612 {(yyval.node)=cons(INTERSECTION,(yyvsp[(1) - (1)].node),0);} | |
2613 break; | |
2614 | |
2615 case 91: | |
2616 | |
2617 /* Line 1806 of yacc.c */ | |
2618 #line 476 "parser.y" | |
2619 {(yyval.node)=cons(INTERSECTION,(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node));} | |
2620 break; | |
2621 | |
2622 case 92: | |
2623 | |
2624 /* Line 1806 of yacc.c */ | |
2625 #line 477 "parser.y" | |
2626 {(yyval.node)=cons(INTERSECTION,(yyvsp[(1) - (1)].node),0);} | |
2627 break; | |
2628 | |
2629 case 93: | |
2630 | |
2631 /* Line 1806 of yacc.c */ | |
2632 #line 483 "parser.y" | |
2633 {(yyval.node) = cons(BY, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));} | |
2634 break; | |
2635 | |
2636 case 94: | |
2637 | |
2638 /* Line 1806 of yacc.c */ | |
2639 #line 484 "parser.y" | |
2640 {(yyval.node) = cons(BY, (yyvsp[(1) - (1)].node), 0);} | |
2641 break; | |
2642 | |
2643 case 95: | |
2644 | |
2645 /* Line 1806 of yacc.c */ | |
2646 #line 488 "parser.y" | |
2647 {(yyval.node) = (yyvsp[(1) - (1)].node);} | |
2648 break; | |
2649 | |
2650 case 96: | |
2651 | |
2652 /* Line 1806 of yacc.c */ | |
2653 #line 489 "parser.y" | |
2654 {(yyval.node) = cons(SUB, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));} | |
2655 break; | |
2656 | |
2657 case 97: | |
2658 | |
2659 /* Line 1806 of yacc.c */ | |
2660 #line 491 "parser.y" | |
2661 {(yyval.node) = cons(SUB, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));} | |
2662 break; | |
2663 | |
2664 case 98: | |
2665 | |
2666 /* Line 1806 of yacc.c */ | |
2667 #line 493 "parser.y" | |
2668 {(yyval.node) = cons(INTERSECTION, (yyvsp[(1) - (2)].node), (yyvsp[(2) - (2)].node));} | |
2669 break; | |
2670 | |
2671 case 99: | |
2672 | |
2673 /* Line 1806 of yacc.c */ | |
2674 #line 494 "parser.y" | |
2675 {(yyval.node) = cons(INTERSECTION, (yyvsp[(1) - (2)].node), (yyvsp[(2) - (2)].node));} | |
2676 break; | |
2677 | |
2678 case 100: | |
2679 | |
2680 /* Line 1806 of yacc.c */ | |
2681 #line 496 "parser.y" | |
2682 {(yyval.node) = cons(INTERSECTION, (yyvsp[(1) - (1)].node), 0);} | |
2683 break; | |
2684 | |
2685 case 101: | |
2686 | |
2687 /* Line 1806 of yacc.c */ | |
2688 #line 497 "parser.y" | |
2689 {(yyval.node) = cons(INTERSECTION, (yyvsp[(1) - (1)].node), 0);} | |
2690 break; | |
2691 | |
2692 case 102: | |
2693 | |
2694 /* Line 1806 of yacc.c */ | |
2695 #line 498 "parser.y" | |
2696 {(yyval.node) = cons(INTERSECTION, (yyvsp[(1) - (1)].node), 0);} | |
2697 break; | |
2698 | |
2699 case 103: | |
2700 | |
2701 /* Line 1806 of yacc.c */ | |
2702 #line 502 "parser.y" | |
2703 {(yyval.node) = (yyvsp[(1) - (1)].node);} | |
2704 break; | |
2705 | |
2706 case 104: | |
2707 | |
2708 /* Line 1806 of yacc.c */ | |
2709 #line 504 "parser.y" | |
2710 {(yyval.node) = (yyvsp[(1) - (3)].node); (yyval.node)->rval = cons(SUB, (yyval.node)->rval, (yyvsp[(3) - (3)].node));} | |
2711 break; | |
2712 | |
2713 case 105: | |
2714 | |
2715 /* Line 1806 of yacc.c */ | |
2716 #line 507 "parser.y" | |
2717 {(yyval.node) = (yyvsp[(1) - (3)].node); (yyval.node)->rval = cons(SUB, (yyval.node)->rval, (yyvsp[(3) - (3)].node));} | |
2718 break; | |
2719 | |
2720 case 106: | |
2721 | |
2722 /* Line 1806 of yacc.c */ | |
2723 #line 511 "parser.y" | |
2724 {(yyval.node) = newnode(); (yyval.node)->opcode = BADCHAR; | |
2725 (yyval.node)->constant = (yyvsp[(1) - (1)].numval);} | |
2726 break; | |
2727 | |
2728 case 107: | |
2729 | |
2730 /* Line 1806 of yacc.c */ | |
2731 #line 516 "parser.y" | |
2732 {(yyval.node) = (yyvsp[(1) - (1)].node);} | |
2733 break; | |
2734 | |
2735 case 108: | |
2736 | |
2737 /* Line 1806 of yacc.c */ | |
2738 #line 519 "parser.y" | |
2739 {(yyval.node) = cons(SELECT, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));} | |
2740 break; | |
2741 | |
2742 case 109: | |
2743 | |
2744 /* Line 1806 of yacc.c */ | |
2745 #line 520 "parser.y" | |
2746 {(yyval.node) = cons(MINGLE, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));} | |
2747 break; | |
2748 | |
2749 case 110: | |
2750 | |
2751 /* Line 1806 of yacc.c */ | |
2752 #line 521 "parser.y" | |
2753 {(yyval.node) = cons(UNKNOWNOP, (yyvsp[(2) - (3)].node), | |
2754 cons(INTERSECTION, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node))); | |
2755 if(useickec && createsused) { | |
2756 if(!firstslat) firstslat=(yyvsp[(1) - (3)].node); | |
2757 else prevslat->nextslat=(yyvsp[(1) - (3)].node); | |
2758 (yyvsp[(1) - (3)].node)->nextslat=(yyvsp[(3) - (3)].node); prevslat=(yyvsp[(3) - (3)].node); | |
2759 (yyvsp[(3) - (3)].node)->nextslat=0; opoverused=1; | |
2760 intern(ick_TWOSPOT, 1601); | |
2761 intern(ick_TWOSPOT, 1602); | |
2762 intern(ick_TWOSPOT, 1603);}} | |
2763 break; | |
2764 | |
2765 case 111: | |
2766 | |
2767 /* Line 1806 of yacc.c */ | |
2768 #line 532 "parser.y" | |
2769 {NEWFANGLED{(yyval.node) = cons(SLAT, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); | |
2770 opoverused=1; if(!firstslat) | |
2771 firstslat=(yyvsp[(3) - (3)].node); else | |
2772 prevslat->nextslat=(yyvsp[(3) - (3)].node); prevslat=(yyvsp[(3) - (3)].node); | |
2773 (yyvsp[(3) - (3)].node)->nextslat=0;}} | |
2774 break; | |
2775 | |
2776 case 112: | |
2777 | |
2778 /* Line 1806 of yacc.c */ | |
2779 #line 537 "parser.y" | |
2780 {(yyval.node) = (yyvsp[(1) - (1)].node);} | |
2781 break; | |
2782 | |
2783 case 113: | |
2784 | |
2785 /* Line 1806 of yacc.c */ | |
2786 #line 538 "parser.y" | |
2787 {(yyval.node) = (yyvsp[(1) - (1)].node);} | |
2788 break; | |
2789 | |
2790 case 114: | |
2791 | |
2792 /* Line 1806 of yacc.c */ | |
2793 #line 542 "parser.y" | |
2794 {(yyval.node) = (yyvsp[(1) - (1)].node);} | |
2795 break; | |
2796 | |
2797 case 115: | |
2798 | |
2799 /* Line 1806 of yacc.c */ | |
2800 #line 543 "parser.y" | |
2801 {(yyval.node) = (yyvsp[(1) - (1)].node);} | |
2802 break; | |
2803 | |
2804 case 116: | |
2805 | |
2806 /* Line 1806 of yacc.c */ | |
2807 #line 544 "parser.y" | |
2808 {(yyval.node) = cons(SELECT, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));} | |
2809 break; | |
2810 | |
2811 case 117: | |
2812 | |
2813 /* Line 1806 of yacc.c */ | |
2814 #line 545 "parser.y" | |
2815 {(yyval.node) = cons(MINGLE, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));} | |
2816 break; | |
2817 | |
2818 case 118: | |
2819 | |
2820 /* Line 1806 of yacc.c */ | |
2821 #line 546 "parser.y" | |
2822 {(yyval.node) = cons(UNKNOWNOP, (yyvsp[(2) - (3)].node), | |
2823 cons(INTERSECTION, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node))); | |
2824 if(useickec && createsused) { | |
2825 if(!firstslat) firstslat=(yyvsp[(1) - (3)].node); | |
2826 else prevslat->nextslat=(yyvsp[(1) - (3)].node); | |
2827 (yyvsp[(1) - (3)].node)->nextslat=(yyvsp[(3) - (3)].node); prevslat=(yyvsp[(3) - (3)].node); | |
2828 (yyvsp[(3) - (3)].node)->nextslat=0; opoverused=1; | |
2829 intern(ick_TWOSPOT, 1601); | |
2830 intern(ick_TWOSPOT, 1602); | |
2831 intern(ick_TWOSPOT, 1603);}} | |
2832 break; | |
2833 | |
2834 case 119: | |
2835 | |
2836 /* Line 1806 of yacc.c */ | |
2837 #line 556 "parser.y" | |
2838 {NEWFANGLED{(yyval.node) = cons(SLAT, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); | |
2839 opoverused=1; if(!firstslat) | |
2840 firstslat=(yyvsp[(3) - (3)].node); else | |
2841 prevslat->nextslat=(yyvsp[(3) - (3)].node); prevslat=(yyvsp[(3) - (3)].node); | |
2842 (yyvsp[(3) - (3)].node)->nextslat=0;}} | |
2843 break; | |
2844 | |
2845 case 120: | |
2846 | |
2847 /* Line 1806 of yacc.c */ | |
2848 #line 564 "parser.y" | |
2849 {(yyval.node) = (yyvsp[(1) - (1)].node);} | |
2850 break; | |
2851 | |
2852 case 121: | |
2853 | |
2854 /* Line 1806 of yacc.c */ | |
2855 #line 565 "parser.y" | |
2856 {(yyval.node) = cons(SELECT, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));} | |
2857 break; | |
2858 | |
2859 case 122: | |
2860 | |
2861 /* Line 1806 of yacc.c */ | |
2862 #line 566 "parser.y" | |
2863 {(yyval.node) = cons(MINGLE, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));} | |
2864 break; | |
2865 | |
2866 case 123: | |
2867 | |
2868 /* Line 1806 of yacc.c */ | |
2869 #line 567 "parser.y" | |
2870 {(yyval.node) = cons(UNKNOWNOP, (yyvsp[(2) - (3)].node), | |
2871 cons(INTERSECTION, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node))); | |
2872 if(useickec && createsused) { | |
2873 if(!firstslat) firstslat=(yyvsp[(1) - (3)].node); | |
2874 else prevslat->nextslat=(yyvsp[(1) - (3)].node); | |
2875 (yyvsp[(1) - (3)].node)->nextslat=(yyvsp[(3) - (3)].node); prevslat=(yyvsp[(3) - (3)].node); | |
2876 (yyvsp[(3) - (3)].node)->nextslat=0; opoverused=1; | |
2877 intern(ick_TWOSPOT, 1601); | |
2878 intern(ick_TWOSPOT, 1602); | |
2879 intern(ick_TWOSPOT, 1603);}} | |
2880 break; | |
2881 | |
2882 case 124: | |
2883 | |
2884 /* Line 1806 of yacc.c */ | |
2885 #line 577 "parser.y" | |
2886 {NEWFANGLED{(yyval.node) = cons(SLAT, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); | |
2887 opoverused=1; if(!firstslat) | |
2888 firstslat=(yyvsp[(3) - (3)].node); else | |
2889 prevslat->nextslat=(yyvsp[(3) - (3)].node); prevslat=(yyvsp[(3) - (3)].node); | |
2890 (yyvsp[(3) - (3)].node)->nextslat=0;}} | |
2891 break; | |
2892 | |
2893 case 125: | |
2894 | |
2895 /* Line 1806 of yacc.c */ | |
2896 #line 582 "parser.y" | |
2897 {(yyval.node) = (yyvsp[(1) - (1)].node);} | |
2898 break; | |
2899 | |
2900 case 126: | |
2901 | |
2902 /* Line 1806 of yacc.c */ | |
2903 #line 583 "parser.y" | |
2904 {(yyval.node) = (yyvsp[(1) - (1)].node);} | |
2905 break; | |
2906 | |
2907 case 127: | |
2908 | |
2909 /* Line 1806 of yacc.c */ | |
2910 #line 587 "parser.y" | |
2911 {(yyval.numval)=MESH; } | |
2912 break; | |
2913 | |
2914 case 128: | |
2915 | |
2916 /* Line 1806 of yacc.c */ | |
2917 #line 587 "parser.y" | |
2918 {(yyval.numval)=ick_ONESPOT;} | |
2919 break; | |
2920 | |
2921 case 129: | |
2922 | |
2923 /* Line 1806 of yacc.c */ | |
2924 #line 587 "parser.y" | |
2925 {(yyval.numval)=ick_TWOSPOT;} | |
2926 break; | |
2927 | |
2928 case 130: | |
2929 | |
2930 /* Line 1806 of yacc.c */ | |
2931 #line 592 "parser.y" | |
2932 {(yyval.node) = (yyvsp[(1) - (1)].node);} | |
2933 break; | |
2934 | |
2935 case 131: | |
2936 | |
2937 /* Line 1806 of yacc.c */ | |
2938 #line 595 "parser.y" | |
2939 { | |
2940 (yyval.node) = newnode(); | |
2941 (yyval.node)->opcode = (yyvsp[(2) - (3)].numval); | |
2942 (yyval.node)->rval = newnode(); | |
2943 (yyval.node)->rval->opcode = (yyvsp[(1) - (3)].numval); | |
2944 if((yyvsp[(1) - (3)].numval) == MESH) { | |
2945 /* enforce the 16-bit constant constraint */ | |
2946 if ((unsigned int)(yyvsp[(3) - (3)].numval) > ick_Max_small) | |
2947 ick_lose(IE017, iyylineno, (char *)NULL); | |
2948 if(variableconstants) /* AIS, patched by JH */ | |
2949 (yyval.node)->rval->constant = intern(MESH, (yyvsp[(3) - (3)].numval)); | |
2950 else | |
2951 (yyval.node)->rval->constant = (yyvsp[(3) - (3)].numval); | |
2952 } | |
2953 else { | |
2954 (yyval.node)->rval->constant = intern((yyvsp[(1) - (3)].numval), (yyvsp[(3) - (3)].numval)); | |
2955 } | |
2956 } | |
2957 break; | |
2958 | |
2959 case 132: | |
2960 | |
2961 /* Line 1806 of yacc.c */ | |
2962 #line 617 "parser.y" | |
2963 { | |
2964 (yyval.node) = newnode(); | |
2965 (yyval.node)->opcode = (yyvsp[(2) - (4)].numval); | |
2966 (yyval.node)->rval = (yyvsp[(3) - (4)].node); | |
2967 DESTACKSPARKEARS; | |
2968 } | |
2969 break; | |
2970 | |
2971 case 133: | |
2972 | |
2973 /* Line 1806 of yacc.c */ | |
2974 #line 624 "parser.y" | |
2975 { | |
2976 (yyval.node) = newnode(); | |
2977 (yyval.node)->opcode = (yyvsp[(2) - (4)].numval); | |
2978 (yyval.node)->rval = (yyvsp[(3) - (4)].node); | |
2979 DESTACKSPARKEARS; | |
2980 } | |
2981 break; | |
2982 | |
2983 case 134: | |
2984 | |
2985 /* Line 1806 of yacc.c */ | |
2986 #line 632 "parser.y" | |
2987 {(yyval.node) = (yyvsp[(2) - (3)].node); DESTACKSPARKEARS;} | |
2988 break; | |
2989 | |
2990 case 135: | |
2991 | |
2992 /* Line 1806 of yacc.c */ | |
2993 #line 633 "parser.y" | |
2994 {(yyval.node) = (yyvsp[(2) - (3)].node); DESTACKSPARKEARS;} | |
2995 break; | |
2996 | |
2997 case 136: | |
2998 | |
2999 /* Line 1806 of yacc.c */ | |
3000 #line 636 "parser.y" | |
3001 {(yyval.node) = (yyvsp[(1) - (1)].node);} | |
3002 break; | |
3003 | |
3004 case 137: | |
3005 | |
3006 /* Line 1806 of yacc.c */ | |
3007 #line 637 "parser.y" | |
3008 {(yyval.node) = (yyvsp[(1) - (1)].node);} | |
3009 break; | |
3010 | |
3011 case 138: | |
3012 | |
3013 /* Line 1806 of yacc.c */ | |
3014 #line 640 "parser.y" | |
3015 {(yyval.node) = (yyvsp[(1) - (1)].node);} | |
3016 break; | |
3017 | |
3018 case 139: | |
3019 | |
3020 /* Line 1806 of yacc.c */ | |
3021 #line 642 "parser.y" | |
3022 {(yyval.node)=newnode(); (yyval.node)->opcode = (yyvsp[(1) - (2)].numval); (yyval.node)->rval = (yyvsp[(2) - (2)].node);} | |
3023 break; | |
3024 | |
3025 case 140: | |
3026 | |
3027 /* Line 1806 of yacc.c */ | |
3028 #line 651 "parser.y" | |
3029 {(yyval.node) = (yyvsp[(1) - (1)].node);} | |
3030 break; | |
3031 | |
3032 case 141: | |
3033 | |
3034 /* Line 1806 of yacc.c */ | |
3035 #line 653 "parser.y" | |
3036 {(yyval.node)=newnode(); (yyval.node)->opcode = (yyvsp[(1) - (2)].numval); (yyval.node)->rval = (yyvsp[(2) - (2)].node);} | |
3037 break; | |
3038 | |
3039 | |
3040 | |
3041 /* Line 1806 of yacc.c */ | |
3042 #line 3043 "parser.c" | |
3043 default: break; | |
3044 } | |
3045 /* User semantic actions sometimes alter yychar, and that requires | |
3046 that yytoken be updated with the new translation. We take the | |
3047 approach of translating immediately before every use of yytoken. | |
3048 One alternative is translating here after every semantic action, | |
3049 but that translation would be missed if the semantic action invokes | |
3050 YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or | |
3051 if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an | |
3052 incorrect destructor might then be invoked immediately. In the | |
3053 case of YYERROR or YYBACKUP, subsequent parser actions might lead | |
3054 to an incorrect destructor call or verbose syntax error message | |
3055 before the lookahead is translated. */ | |
3056 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); | |
3057 | |
3058 YYPOPSTACK (yylen); | |
3059 yylen = 0; | |
3060 YY_STACK_PRINT (yyss, yyssp); | |
3061 | |
3062 *++yyvsp = yyval; | |
3063 | |
3064 /* Now `shift' the result of the reduction. Determine what state | |
3065 that goes to, based on the state we popped back to and the rule | |
3066 number reduced by. */ | |
3067 | |
3068 yyn = yyr1[yyn]; | |
3069 | |
3070 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; | |
3071 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) | |
3072 yystate = yytable[yystate]; | |
3073 else | |
3074 yystate = yydefgoto[yyn - YYNTOKENS]; | |
3075 | |
3076 goto yynewstate; | |
3077 | |
3078 | |
3079 /*------------------------------------. | |
3080 | yyerrlab -- here on detecting error | | |
3081 `------------------------------------*/ | |
3082 yyerrlab: | |
3083 /* Make sure we have latest lookahead translation. See comments at | |
3084 user semantic actions for why this is necessary. */ | |
3085 yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); | |
3086 | |
3087 /* If not already recovering from an error, report this error. */ | |
3088 if (!yyerrstatus) | |
3089 { | |
3090 ++yynerrs; | |
3091 #if ! YYERROR_VERBOSE | |
3092 yyerror (YY_("syntax error")); | |
3093 #else | |
3094 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ | |
3095 yyssp, yytoken) | |
3096 { | |
3097 char const *yymsgp = YY_("syntax error"); | |
3098 int yysyntax_error_status; | |
3099 yysyntax_error_status = YYSYNTAX_ERROR; | |
3100 if (yysyntax_error_status == 0) | |
3101 yymsgp = yymsg; | |
3102 else if (yysyntax_error_status == 1) | |
3103 { | |
3104 if (yymsg != yymsgbuf) | |
3105 YYSTACK_FREE (yymsg); | |
3106 yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); | |
3107 if (!yymsg) | |
3108 { | |
3109 yymsg = yymsgbuf; | |
3110 yymsg_alloc = sizeof yymsgbuf; | |
3111 yysyntax_error_status = 2; | |
3112 } | |
3113 else | |
3114 { | |
3115 yysyntax_error_status = YYSYNTAX_ERROR; | |
3116 yymsgp = yymsg; | |
3117 } | |
3118 } | |
3119 yyerror (yymsgp); | |
3120 if (yysyntax_error_status == 2) | |
3121 goto yyexhaustedlab; | |
3122 } | |
3123 # undef YYSYNTAX_ERROR | |
3124 #endif | |
3125 } | |
3126 | |
3127 | |
3128 | |
3129 if (yyerrstatus == 3) | |
3130 { | |
3131 /* If just tried and failed to reuse lookahead token after an | |
3132 error, discard it. */ | |
3133 | |
3134 if (yychar <= YYEOF) | |
3135 { | |
3136 /* Return failure if at end of input. */ | |
3137 if (yychar == YYEOF) | |
3138 YYABORT; | |
3139 } | |
3140 else | |
3141 { | |
3142 yydestruct ("Error: discarding", | |
3143 yytoken, &yylval); | |
3144 yychar = YYEMPTY; | |
3145 } | |
3146 } | |
3147 | |
3148 /* Else will try to reuse lookahead token after shifting the error | |
3149 token. */ | |
3150 goto yyerrlab1; | |
3151 | |
3152 | |
3153 /*---------------------------------------------------. | |
3154 | yyerrorlab -- error raised explicitly by YYERROR. | | |
3155 `---------------------------------------------------*/ | |
3156 yyerrorlab: | |
3157 | |
3158 /* Pacify compilers like GCC when the user code never invokes | |
3159 YYERROR and the label yyerrorlab therefore never appears in user | |
3160 code. */ | |
3161 if (/*CONSTCOND*/ 0) | |
3162 goto yyerrorlab; | |
3163 | |
3164 /* Do not reclaim the symbols of the rule which action triggered | |
3165 this YYERROR. */ | |
3166 YYPOPSTACK (yylen); | |
3167 yylen = 0; | |
3168 YY_STACK_PRINT (yyss, yyssp); | |
3169 yystate = *yyssp; | |
3170 goto yyerrlab1; | |
3171 | |
3172 | |
3173 /*-------------------------------------------------------------. | |
3174 | yyerrlab1 -- common code for both syntax error and YYERROR. | | |
3175 `-------------------------------------------------------------*/ | |
3176 yyerrlab1: | |
3177 yyerrstatus = 3; /* Each real token shifted decrements this. */ | |
3178 | |
3179 for (;;) | |
3180 { | |
3181 yyn = yypact[yystate]; | |
3182 if (!yypact_value_is_default (yyn)) | |
3183 { | |
3184 yyn += YYTERROR; | |
3185 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) | |
3186 { | |
3187 yyn = yytable[yyn]; | |
3188 if (0 < yyn) | |
3189 break; | |
3190 } | |
3191 } | |
3192 | |
3193 /* Pop the current state because it cannot handle the error token. */ | |
3194 if (yyssp == yyss) | |
3195 YYABORT; | |
3196 | |
3197 | |
3198 yydestruct ("Error: popping", | |
3199 yystos[yystate], yyvsp); | |
3200 YYPOPSTACK (1); | |
3201 yystate = *yyssp; | |
3202 YY_STACK_PRINT (yyss, yyssp); | |
3203 } | |
3204 | |
3205 *++yyvsp = yylval; | |
3206 | |
3207 | |
3208 /* Shift the error token. */ | |
3209 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); | |
3210 | |
3211 yystate = yyn; | |
3212 goto yynewstate; | |
3213 | |
3214 | |
3215 /*-------------------------------------. | |
3216 | yyacceptlab -- YYACCEPT comes here. | | |
3217 `-------------------------------------*/ | |
3218 yyacceptlab: | |
3219 yyresult = 0; | |
3220 goto yyreturn; | |
3221 | |
3222 /*-----------------------------------. | |
3223 | yyabortlab -- YYABORT comes here. | | |
3224 `-----------------------------------*/ | |
3225 yyabortlab: | |
3226 yyresult = 1; | |
3227 goto yyreturn; | |
3228 | |
3229 #if !defined(yyoverflow) || YYERROR_VERBOSE | |
3230 /*-------------------------------------------------. | |
3231 | yyexhaustedlab -- memory exhaustion comes here. | | |
3232 `-------------------------------------------------*/ | |
3233 yyexhaustedlab: | |
3234 yyerror (YY_("memory exhausted")); | |
3235 yyresult = 2; | |
3236 /* Fall through. */ | |
3237 #endif | |
3238 | |
3239 yyreturn: | |
3240 if (yychar != YYEMPTY) | |
3241 { | |
3242 /* Make sure we have latest lookahead translation. See comments at | |
3243 user semantic actions for why this is necessary. */ | |
3244 yytoken = YYTRANSLATE (yychar); | |
3245 yydestruct ("Cleanup: discarding lookahead", | |
3246 yytoken, &yylval); | |
3247 } | |
3248 /* Do not reclaim the symbols of the rule which action triggered | |
3249 this YYABORT or YYACCEPT. */ | |
3250 YYPOPSTACK (yylen); | |
3251 YY_STACK_PRINT (yyss, yyssp); | |
3252 while (yyssp != yyss) | |
3253 { | |
3254 yydestruct ("Cleanup: popping", | |
3255 yystos[*yyssp], yyvsp); | |
3256 YYPOPSTACK (1); | |
3257 } | |
3258 #ifndef yyoverflow | |
3259 if (yyss != yyssa) | |
3260 YYSTACK_FREE (yyss); | |
3261 #endif | |
3262 #if YYERROR_VERBOSE | |
3263 if (yymsg != yymsgbuf) | |
3264 YYSTACK_FREE (yymsg); | |
3265 #endif | |
3266 /* Make sure YYID is used. */ | |
3267 return YYID (yyresult); | |
3268 } | |
3269 | |
3270 | |
3271 | |
3272 /* Line 2067 of yacc.c */ | |
3273 #line 664 "parser.y" | |
3274 | |
3275 | |
3276 static tuple *splat(int gentuple) | |
3277 /* try to recover from an invalid statement. */ | |
3278 { | |
3279 tuple *sp; | |
3280 int tok, i; | |
3281 extern ick_bool re_send_token; | |
3282 | |
3283 /* | |
3284 * The idea | |
3285 * here is to skip to the ick_next DO, PLEASE or label, then unget that token. | |
3286 * which we can do with a tricky flag on the lexer (re_send_token). | |
3287 */ | |
3288 | |
3289 if(re_send_token == ick_TRUE) /* By AIS */ | |
3290 { | |
3291 /* We're still cleaning up from the previous error. */ | |
3292 return prevtuple; | |
3293 } | |
3294 | |
3295 /* fprintf(stderr,"attempting to splat at line %d....\n",iyylineno); */ | |
3296 /* AIS: Set the flag to true the first time round, false for subsequent | |
3297 iterations. That way, if the error was triggered on a DO or label, | |
3298 we use that token as the start of the next statement. */ | |
3299 for(i = 0,re_send_token = ick_TRUE;;i++,re_send_token = ick_FALSE) { | |
3300 tok = lexer(); | |
3301 if (!tok) | |
3302 { | |
3303 re_send_token = ick_TRUE; | |
3304 tok = ' '; /* scanner must not see a NUL */ | |
3305 break; | |
3306 } | |
3307 else if (tok == DO || tok == PLEASE || tok == LABEL | |
3308 /* AIS */ || tok == MAYBE) { | |
3309 re_send_token = ick_TRUE; | |
3310 break; | |
3311 } | |
3312 } | |
3313 /* | |
3314 fprintf(stderr,"found %d on line %d after %d other tokens.\n", | |
3315 tok,iyylineno,i); | |
3316 */ | |
3317 | |
3318 /* generate a placeholder tuple for the text line */ | |
3319 if(gentuple /* AIS */) {TARGET(sp, SPLATTERED, 0); prevtuple=sp;} | |
3320 else sp=NULL; | |
3321 | |
3322 return(sp); | |
3323 } | |
3324 | |
3325 /* parser.y ends here */ | |
3326 |