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