1 /* A Bison parser, made by GNU Bison 2.0. */
3 /* Skeleton parser for Yacc-like parsing with Bison,
4 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2, or (at your option)
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 59 Temple Place - Suite 330,
19 Boston, MA 02111-1307, USA. */
21 /* As a special exception, when this file is copied by Bison into a
22 Bison output file, you may use that output file without restriction.
23 This special exception was added by the Free Software Foundation
24 in version 1.24 of Bison. */
26 /* Written by Richard Stallman by simplifying the original so called
27 ``semantic'' parser. */
29 /* All symbols defined below should begin with yy or YY, to avoid
30 infringing on user name space. This should be done even for local
31 variables, as they might otherwise be expanded by user macros.
32 There are some unavoidable exceptions within include files to
33 define necessary library symbols; they are noted "INFRINGES ON
34 USER NAME SPACE" below. */
36 /* Identify Bison output. */
40 #define YYSKELETON_NAME "yacc.c"
45 /* Using locations. */
46 #define YYLSP_NEEDED 1
53 /* Put the tokens into the symbol table, so that GDB and other debuggers
56 INTEGER_LITERAL
= 258,
62 BACKWARD_BRANCH
= 264,
123 #define INTEGER_LITERAL 258
124 #define STRING_LITERAL 259
125 #define FILE_PATH 260
126 #define IDENTIFIER 261
128 #define FORWARD_BRANCH 263
129 #define BACKWARD_BRANCH 264
131 #define LOCAL_LABEL 266
192 /* Copy the first part of user declarations. */
196 * $Id: parser.y,v 1.14 2007/11/11 22:35:51 khansen Exp $
198 * Revision 1.14 2007/11/11 22:35:51 khansen
201 * Revision 1.13 2007/08/19 11:19:47 khansen
202 * --case-insensitive option
204 * Revision 1.12 2007/08/12 18:59:00 khansen
205 * ability to generate pure 6502 binary
207 * Revision 1.11 2007/08/11 01:25:50 khansen
208 * includepaths support (-I option)
210 * Revision 1.10 2007/07/22 13:34:38 khansen
211 * convert tabs to whitespaces
213 * Revision 1.9 2005/01/05 02:28:40 kenth
214 * anonymous union parsing
216 * Revision 1.8 2004/12/29 21:45:26 kenth
220 * Revision 1.7 2004/12/19 19:59:14 kenth
223 * Revision 1.6 2004/12/16 13:22:27 kenth
226 * Revision 1.5 2004/12/14 01:50:42 kenth
229 * Revision 1.4 2004/12/11 02:12:41 kenth
232 * Revision 1.3 2004/12/09 11:17:15 kenth
233 * added: warning_statement, error_statement
235 * Revision 1.2 2004/12/06 05:06:21 kenth
238 * Revision 1.1 2004/06/30 07:57:03 kenth
250 void yyerror(const char *); /* In lexer */
251 int yylex(void); /* In lexer */
252 int yypushandrestart(const char *, int); /* In lexer */
253 void __yy_memcpy(char *, char *, int);
254 extern char *yytext
; /* In lexer */
255 extern YYLTYPE yylloc
; /* In lexer */
256 char *scan_include(int); /* In lexer */
257 extern astnode
*root_node
; /* Root of the generated parse tree */
258 void handle_incsrc(astnode
*); /* See below */
259 void handle_incbin(astnode
*); /* See below */
262 /* Enabling traces. */
267 /* Enabling verbose error messages. */
268 #ifdef YYERROR_VERBOSE
269 # undef YYERROR_VERBOSE
270 # define YYERROR_VERBOSE 1
272 # define YYERROR_VERBOSE 1
275 #if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
277 typedef union YYSTYPE
{
285 /* Line 185 of yacc.c. */
287 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
288 # define YYSTYPE_IS_DECLARED 1
289 # define YYSTYPE_IS_TRIVIAL 1
292 #if ! defined (YYLTYPE) && ! defined (YYLTYPE_IS_DECLARED)
293 typedef struct YYLTYPE
300 # define yyltype YYLTYPE /* obsolescent; will be withdrawn */
301 # define YYLTYPE_IS_DECLARED 1
302 # define YYLTYPE_IS_TRIVIAL 1
306 /* Copy the second part of user declarations. */
309 /* Line 213 of yacc.c. */
312 #if ! defined (yyoverflow) || YYERROR_VERBOSE
318 # define YYMALLOC malloc
321 /* The parser invokes alloca or malloc; define the necessary symbols. */
323 # ifdef YYSTACK_USE_ALLOCA
324 # if YYSTACK_USE_ALLOCA
326 # define YYSTACK_ALLOC __builtin_alloca
328 # define YYSTACK_ALLOC alloca
333 # ifdef YYSTACK_ALLOC
334 /* Pacify GCC's `empty if-body' warning. */
335 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
337 # if defined (__STDC__) || defined (__cplusplus)
338 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
339 # define YYSIZE_T size_t
341 # define YYSTACK_ALLOC YYMALLOC
342 # define YYSTACK_FREE YYFREE
344 #endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */
347 #if (! defined (yyoverflow) \
348 && (! defined (__cplusplus) \
349 || (defined (YYLTYPE_IS_TRIVIAL) && YYLTYPE_IS_TRIVIAL \
350 && defined (YYSTYPE_IS_TRIVIAL) && YYSTYPE_IS_TRIVIAL)))
352 /* A type that is properly aligned for any stack member. */
360 /* The size of the maximum gap between one aligned stack and the next. */
361 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
363 /* The size of an array large to enough to hold all stacks, each with
365 # define YYSTACK_BYTES(N) \
366 ((N) * (sizeof (short int) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
367 + 2 * YYSTACK_GAP_MAXIMUM)
369 /* Copy COUNT objects from FROM to TO. The source and destination do
372 # if defined (__GNUC__) && 1 < __GNUC__
373 # define YYCOPY(To, From, Count) \
374 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
376 # define YYCOPY(To, From, Count) \
379 register YYSIZE_T yyi; \
380 for (yyi = 0; yyi < (Count); yyi++) \
381 (To)[yyi] = (From)[yyi]; \
387 /* Relocate STACK from its old location to the new one. The
388 local variables YYSIZE and YYSTACKSIZE give the old and new number of
389 elements in the stack, and YYPTR gives the new location of the
390 stack. Advance YYPTR to a properly aligned location for the next
392 # define YYSTACK_RELOCATE(Stack) \
395 YYSIZE_T yynewbytes; \
396 YYCOPY (&yyptr->Stack, Stack, yysize); \
397 Stack = &yyptr->Stack; \
398 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
399 yyptr += yynewbytes / sizeof (*yyptr); \
405 #if defined (__STDC__) || defined (__cplusplus)
406 typedef signed char yysigned_char
;
408 typedef short int yysigned_char
;
411 /* YYFINAL -- State number of the termination state. */
413 /* YYLAST -- Last index in YYTABLE. */
416 /* YYNTOKENS -- Number of terminals. */
418 /* YYNNTS -- Number of nonterminals. */
420 /* YYNRULES -- Number of rules. */
422 /* YYNRULES -- Number of states. */
423 #define YYNSTATES 380
425 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
427 #define YYMAXUTOK 322
429 #define YYTRANSLATE(YYX) \
430 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
432 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
433 static const unsigned char yytranslate
[] =
435 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
436 58, 2, 2, 2, 2, 2, 2, 2, 2, 2,
437 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
438 2, 2, 2, 93, 2, 73, 66, 92, 78, 2,
439 95, 96, 90, 87, 71, 88, 72, 91, 2, 2,
440 2, 2, 2, 2, 2, 2, 2, 2, 59, 2,
441 82, 65, 81, 2, 60, 62, 2, 2, 2, 2,
442 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
443 2, 2, 2, 2, 2, 2, 2, 2, 63, 64,
444 2, 69, 2, 70, 77, 2, 2, 2, 2, 2,
445 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
446 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
447 2, 2, 2, 67, 76, 68, 94, 2, 2, 2,
448 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
449 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
450 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
451 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
452 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
453 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
454 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
455 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
456 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
457 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
458 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
459 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
460 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
461 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
462 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
463 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
464 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
465 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
466 55, 56, 57, 61, 74, 75, 79, 80, 83, 84,
471 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
473 static const unsigned short int yyprhs
[] =
475 0, 0, 3, 6, 9, 10, 12, 15, 18, 20,
476 22, 24, 26, 28, 30, 32, 34, 36, 38, 40,
477 42, 44, 46, 48, 50, 52, 54, 56, 58, 60,
478 62, 64, 66, 68, 70, 72, 74, 76, 78, 80,
479 82, 84, 87, 91, 96, 100, 104, 108, 114, 117,
480 118, 121, 122, 129, 136, 143, 150, 157, 164, 166,
481 169, 171, 174, 179, 181, 185, 189, 193, 196, 200,
482 203, 205, 207, 209, 211, 213, 216, 218, 221, 225,
483 228, 233, 238, 245, 252, 257, 259, 262, 264, 266,
484 268, 270, 272, 274, 276, 280, 282, 284, 286, 288,
485 291, 293, 298, 303, 305, 307, 309, 311, 313, 314,
486 318, 322, 326, 330, 332, 333, 335, 339, 341, 342,
487 344, 348, 352, 356, 360, 364, 368, 372, 376, 380,
488 384, 387, 390, 393, 396, 399, 402, 406, 410, 414,
489 418, 422, 426, 428, 430, 432, 434, 436, 438, 440,
490 442, 443, 445, 447, 456, 458, 459, 461, 464, 469,
491 473, 474, 482, 490, 493, 496, 499, 503, 507, 512,
492 517, 520, 522, 527, 529, 531, 533, 535, 538, 541,
493 543, 547, 551, 555, 557, 559, 567, 569, 570, 574,
494 576, 577, 579, 583, 588, 593, 597, 602, 606, 613,
495 616, 617, 619, 621, 623, 625, 627, 629, 632, 636,
496 640, 645, 650, 654, 656, 658
499 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
500 static const short int yyrhs
[] =
502 98, 0, -1, 100, 99, -1, 38, 127, -1, -1,
503 101, -1, 100, 101, -1, 126, 102, -1, 102, -1,
504 149, -1, 154, -1, 155, -1, 164, -1, 166, -1,
505 161, -1, 162, -1, 169, -1, 170, -1, 172, -1,
506 173, -1, 129, -1, 156, -1, 176, -1, 123, -1,
507 124, -1, 122, -1, 114, -1, 115, -1, 116, -1,
508 119, -1, 113, -1, 112, -1, 111, -1, 108, -1,
509 107, -1, 105, -1, 106, -1, 171, -1, 104, -1,
510 103, -1, 125, -1, 1, 127, -1, 57, 131, 127,
511 -1, 35, 168, 131, 127, -1, 54, 131, 127, -1,
512 55, 131, 127, -1, 53, 131, 127, -1, 13, 146,
513 109, 110, 127, -1, 65, 131, -1, -1, 59, 175,
514 -1, -1, 33, 131, 127, 100, 34, 127, -1, 32,
515 131, 127, 100, 34, 127, -1, 48, 146, 127, 100,
516 49, 127, -1, 42, 146, 127, 100, 44, 127, -1,
517 43, 147, 127, 100, 44, 127, -1, 46, 146, 127,
518 117, 47, 127, -1, 118, -1, 117, 118, -1, 170,
519 -1, 146, 127, -1, 45, 146, 120, 127, -1, 121,
520 -1, 120, 71, 121, -1, 146, 59, 131, -1, 41,
521 163, 127, -1, 21, 127, -1, 21, 56, 127, -1,
522 22, 127, -1, 127, -1, 145, -1, 128, -1, 59,
523 -1, 58, -1, 130, 127, -1, 12, -1, 12, 62,
524 -1, 12, 73, 131, -1, 12, 131, -1, 12, 131,
525 71, 63, -1, 12, 131, 71, 64, -1, 12, 69,
526 131, 71, 63, 70, -1, 12, 69, 131, 70, 71,
527 64, -1, 12, 69, 131, 70, -1, 132, -1, 50,
528 134, -1, 136, -1, 137, -1, 142, -1, 148, -1,
529 66, -1, 143, -1, 144, -1, 95, 131, 96, -1,
530 87, -1, 88, -1, 8, -1, 9, -1, 51, 136,
531 -1, 146, -1, 146, 69, 131, 70, -1, 146, 95,
532 131, 96, -1, 131, -1, 138, -1, 146, -1, 159,
533 -1, 131, -1, -1, 146, 61, 146, -1, 132, 72,
534 137, -1, 132, 72, 132, -1, 67, 139, 68, -1,
535 140, -1, -1, 141, -1, 140, 71, 141, -1, 133,
536 -1, -1, 7, -1, 131, 87, 131, -1, 131, 88,
537 131, -1, 131, 90, 131, -1, 131, 91, 131, -1,
538 131, 92, 131, -1, 131, 78, 131, -1, 131, 76,
539 131, -1, 131, 77, 131, -1, 131, 86, 131, -1,
540 131, 85, 131, -1, 94, 131, -1, 93, 131, -1,
541 77, 146, -1, 82, 131, -1, 81, 131, -1, 88,
542 131, -1, 131, 80, 131, -1, 131, 79, 131, -1,
543 131, 81, 131, -1, 131, 82, 131, -1, 131, 83,
544 131, -1, 131, 84, 131, -1, 10, -1, 11, -1,
545 87, -1, 88, -1, 8, -1, 9, -1, 6, -1,
546 146, -1, -1, 3, -1, 4, -1, 23, 131, 127,
547 100, 150, 153, 28, 127, -1, 151, -1, -1, 152,
548 -1, 151, 152, -1, 27, 131, 127, 100, -1, 26,
549 127, 100, -1, -1, 24, 146, 127, 100, 153, 28,
550 127, -1, 25, 146, 127, 100, 153, 28, 127, -1,
551 157, 127, -1, 158, 127, -1, 146, 158, -1, 56,
552 146, 158, -1, 39, 146, 158, -1, 56, 39, 146,
553 158, -1, 39, 56, 146, 158, -1, 159, 160, -1,
554 159, -1, 159, 69, 131, 70, -1, 14, -1, 15,
555 -1, 16, -1, 17, -1, 52, 146, -1, 72, 146,
556 -1, 133, -1, 160, 71, 133, -1, 29, 163, 127,
557 -1, 30, 163, 127, -1, 4, -1, 82, -1, 31,
558 146, 165, 127, 100, 34, 127, -1, 168, -1, -1,
559 146, 167, 127, -1, 160, -1, -1, 146, -1, 168,
560 71, 146, -1, 146, 36, 133, 127, -1, 146, 65,
561 133, 127, -1, 37, 146, 127, -1, 37, 146, 133,
562 127, -1, 39, 168, 127, -1, 40, 168, 59, 175,
563 174, 127, -1, 60, 146, -1, -1, 159, -1, 146,
564 -1, 48, -1, 13, -1, 177, -1, 178, -1, 146,
565 178, -1, 56, 146, 178, -1, 39, 146, 178, -1,
566 56, 39, 146, 178, -1, 39, 56, 146, 178, -1,
567 179, 135, 127, -1, 18, -1, 19, -1, 20, -1
570 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
571 static const unsigned short int yyrline
[] =
573 0, 123, 123, 127, 128, 132, 133, 140, 141, 145,
574 146, 147, 148, 149, 150, 151, 152, 153, 154, 155,
575 156, 157, 158, 159, 160, 161, 162, 163, 164, 165,
576 166, 167, 168, 169, 170, 171, 172, 173, 174, 175,
577 176, 177, 181, 185, 189, 193, 197, 201, 205, 206,
578 210, 211, 215, 219, 223, 227, 231, 235, 239, 240,
579 244, 245, 249, 253, 254, 258, 262, 266, 267, 270,
580 274, 278, 282, 283, 287, 291, 295, 296, 297, 298,
581 299, 300, 301, 302, 303, 307, 308, 309, 310, 311,
582 312, 313, 314, 315, 316, 317, 318, 319, 320, 321,
583 325, 326, 327, 331, 332, 336, 337, 341, 342, 346,
584 350, 351, 355, 359, 360, 364, 365, 369, 370, 374,
585 378, 379, 380, 381, 382, 383, 384, 385, 386, 387,
586 388, 389, 390, 391, 392, 393, 397, 398, 399, 400,
587 401, 402, 406, 407, 408, 409, 410, 411, 415, 419,
588 420, 424, 425, 429, 433, 434, 438, 439, 443, 447,
589 448, 452, 456, 460, 461, 465, 466, 467, 468, 469,
590 473, 474, 475, 479, 480, 481, 482, 483, 484, 488,
591 489, 493, 497, 501, 502, 506, 510, 511, 515, 519,
592 520, 524, 525, 529, 533, 537, 538, 542, 546, 550,
593 551, 555, 556, 557, 558, 562, 563, 567, 568, 569,
594 570, 571, 575, 579, 580, 581
598 #if YYDEBUG || YYERROR_VERBOSE
599 /* YYTNME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
600 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
601 static const char *const yytname
[] =
603 "$end", "error", "$undefined", "INTEGER_LITERAL", "STRING_LITERAL",
604 "FILE_PATH", "IDENTIFIER", "LOCAL_ID", "FORWARD_BRANCH",
605 "BACKWARD_BRANCH", "LABEL", "LOCAL_LABEL", "MNEMONIC", "_LABEL_", "BYTE",
606 "CHAR", "WORD", "DWORD", "DSB", "DSW", "DSD", "DATASEG", "CODESEG", "IF",
607 "IFDEF", "IFNDEF", "ELSE", "ELIF", "ENDIF", "INCSRC", "INCBIN", "MACRO",
608 "REPT", "WHILE", "ENDM", "ALIGN", "EQU", "DEFINE", "END", "PUBLIC",
609 "EXTRN", "CHARMAP", "STRUC", "UNION", "ENDS", "RECORD", "ENUM", "ENDE",
610 "PROC", "ENDP", "SIZEOF", "MASK", "TAG", "MESSAGE", "WARNING", "ERROR",
611 "ZEROPAGE", "ORG", "'\\n'", "':'", "'@'", "SCOPE_OP", "'A'", "'X'",
612 "'Y'", "'='", "'$'", "'{'", "'}'", "'['", "']'", "','", "'.'", "'#'",
613 "HI_OP", "LO_OP", "'|'", "'^'", "'&'", "NE_OP", "EQ_OP", "'>'", "'<'",
614 "GE_OP", "LE_OP", "SHR_OP", "SHL_OP", "'+'", "'-'", "UMINUS", "'*'",
615 "'/'", "'%'", "'!'", "'~'", "'('", "')'", "$accept", "assembly_unit",
616 "end_opt", "statement_list", "labelable_statement", "statement",
617 "org_statement", "align_statement", "warning_statement",
618 "error_statement", "message_statement", "label_statement",
619 "label_addr_part_opt", "label_type_part_opt", "while_statement",
620 "rept_statement", "proc_statement", "struc_decl_statement",
621 "union_decl_statement", "enum_decl_statement", "enum_item_list",
622 "enum_item", "record_decl_statement", "record_field_list",
623 "record_field", "charmap_statement", "dataseg_statement",
624 "codeseg_statement", "null_statement", "label_decl", "line_tail",
625 "newline", "instruction_statement", "instruction", "expression",
626 "indexed_identifier", "extended_expression", "sizeof_arg",
627 "expression_opt", "scope_access", "struc_access", "struc_initializer",
628 "field_initializer_list_opt", "field_initializer_list",
629 "field_initializer", "local_id", "arithmetic_expression",
630 "comparison_expression", "label", "identifier", "identifier_opt",
631 "literal", "if_statement", "elif_statement_list_opt",
632 "elif_statement_list", "elif_statement", "else_part_opt",
633 "ifdef_statement", "ifndef_statement", "data_statement",
634 "named_data_statement", "unnamed_data_statement", "datatype",
635 "expression_list", "incsrc_statement", "incbin_statement",
636 "file_specifier", "macro_decl_statement", "param_list_opt",
637 "macro_statement", "arg_list_opt", "identifier_list", "equ_statement",
638 "assign_statement", "define_statement", "public_statement",
639 "extrn_statement", "from_part_opt", "symbol_type", "storage_statement",
640 "named_storage_statement", "unnamed_storage_statement", "storage", 0
645 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
647 static const unsigned short int yytoknum
[] =
649 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
650 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
651 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
652 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
653 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
654 305, 306, 307, 308, 309, 310, 311, 312, 10, 58,
655 64, 313, 65, 88, 89, 61, 36, 123, 125, 91,
656 93, 44, 46, 35, 314, 315, 124, 94, 38, 316,
657 317, 62, 60, 318, 319, 320, 321, 43, 45, 322,
658 42, 47, 37, 33, 126, 40, 41
662 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
663 static const unsigned char yyr1
[] =
665 0, 97, 98, 99, 99, 100, 100, 101, 101, 102,
666 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
667 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
668 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
669 102, 102, 103, 104, 105, 106, 107, 108, 109, 109,
670 110, 110, 111, 112, 113, 114, 115, 116, 117, 117,
671 118, 118, 119, 120, 120, 121, 122, 123, 123, 124,
672 125, 126, 127, 127, 128, 129, 130, 130, 130, 130,
673 130, 130, 130, 130, 130, 131, 131, 131, 131, 131,
674 131, 131, 131, 131, 131, 131, 131, 131, 131, 131,
675 132, 132, 132, 133, 133, 134, 134, 135, 135, 136,
676 137, 137, 138, 139, 139, 140, 140, 141, 141, 142,
677 143, 143, 143, 143, 143, 143, 143, 143, 143, 143,
678 143, 143, 143, 143, 143, 143, 144, 144, 144, 144,
679 144, 144, 145, 145, 145, 145, 145, 145, 146, 147,
680 147, 148, 148, 149, 150, 150, 151, 151, 152, 153,
681 153, 154, 155, 156, 156, 157, 157, 157, 157, 157,
682 158, 158, 158, 159, 159, 159, 159, 159, 159, 160,
683 160, 161, 162, 163, 163, 164, 165, 165, 166, 167,
684 167, 168, 168, 169, 170, 171, 171, 172, 173, 174,
685 174, 175, 175, 175, 175, 176, 176, 177, 177, 177,
686 177, 177, 178, 179, 179, 179
689 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
690 static const unsigned char yyr2
[] =
692 0, 2, 2, 2, 0, 1, 2, 2, 1, 1,
693 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
694 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
695 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
696 1, 2, 3, 4, 3, 3, 3, 5, 2, 0,
697 2, 0, 6, 6, 6, 6, 6, 6, 1, 2,
698 1, 2, 4, 1, 3, 3, 3, 2, 3, 2,
699 1, 1, 1, 1, 1, 2, 1, 2, 3, 2,
700 4, 4, 6, 6, 4, 1, 2, 1, 1, 1,
701 1, 1, 1, 1, 3, 1, 1, 1, 1, 2,
702 1, 4, 4, 1, 1, 1, 1, 1, 0, 3,
703 3, 3, 3, 1, 0, 1, 3, 1, 0, 1,
704 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
705 2, 2, 2, 2, 2, 2, 3, 3, 3, 3,
706 3, 3, 1, 1, 1, 1, 1, 1, 1, 1,
707 0, 1, 1, 8, 1, 0, 1, 2, 4, 3,
708 0, 7, 7, 2, 2, 2, 3, 3, 4, 4,
709 2, 1, 4, 1, 1, 1, 1, 2, 2, 1,
710 3, 3, 3, 1, 1, 7, 1, 0, 3, 1,
711 0, 1, 3, 4, 4, 3, 4, 3, 6, 2,
712 0, 1, 1, 1, 1, 1, 1, 2, 3, 3,
716 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
717 STATE-NUM when YYTABLE doesn't specify something else to do. Zero
718 means the default is an error. */
719 static const unsigned char yydefact
[] =
721 0, 0, 148, 146, 147, 142, 143, 76, 0, 173,
722 174, 175, 176, 213, 214, 215, 0, 0, 0, 0,
723 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
724 0, 0, 150, 0, 0, 0, 0, 0, 0, 0,
725 0, 0, 74, 73, 0, 144, 145, 0, 0, 5,
726 8, 39, 38, 35, 36, 34, 33, 32, 31, 30,
727 26, 27, 28, 29, 25, 23, 24, 40, 0, 70,
728 72, 20, 0, 71, 190, 9, 10, 11, 21, 0,
729 0, 171, 14, 15, 12, 13, 16, 17, 37, 18,
730 19, 22, 205, 206, 108, 41, 151, 152, 119, 97,
731 98, 0, 0, 77, 91, 0, 0, 0, 0, 0,
732 95, 96, 0, 0, 0, 79, 85, 87, 88, 89,
733 92, 93, 100, 90, 49, 0, 67, 69, 0, 0,
734 0, 183, 184, 0, 0, 187, 0, 0, 191, 0,
735 0, 0, 191, 0, 0, 0, 0, 149, 0, 0,
736 0, 0, 177, 0, 0, 0, 0, 0, 0, 178,
737 1, 0, 2, 6, 7, 75, 0, 0, 114, 103,
738 179, 104, 165, 189, 0, 207, 163, 164, 0, 170,
739 107, 0, 86, 105, 106, 99, 0, 0, 78, 132,
740 134, 133, 135, 131, 130, 0, 0, 0, 0, 0,
741 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
742 0, 0, 0, 0, 0, 0, 0, 0, 51, 68,
743 0, 0, 0, 181, 182, 0, 186, 0, 0, 0,
744 0, 195, 0, 0, 167, 209, 197, 0, 66, 0,
745 0, 0, 63, 0, 0, 0, 46, 44, 45, 0,
746 166, 208, 42, 3, 0, 0, 117, 0, 113, 115,
747 0, 188, 0, 212, 84, 0, 94, 80, 81, 126,
748 127, 125, 137, 136, 138, 139, 140, 141, 129, 128,
749 120, 121, 122, 123, 124, 111, 110, 100, 109, 0,
750 0, 48, 0, 0, 0, 0, 0, 0, 0, 0,
751 192, 43, 196, 169, 211, 204, 203, 202, 201, 200,
752 0, 0, 0, 62, 0, 0, 58, 0, 60, 0,
753 168, 210, 193, 194, 112, 118, 180, 172, 0, 0,
754 101, 102, 50, 47, 0, 160, 154, 156, 0, 0,
755 0, 0, 0, 0, 0, 0, 0, 0, 64, 65,
756 0, 59, 61, 0, 116, 83, 82, 0, 0, 157,
757 0, 0, 0, 0, 53, 52, 199, 198, 55, 56,
758 57, 54, 0, 0, 0, 161, 162, 185, 0, 153
761 /* YYDEFGOTO[NTERM-NUM]. */
762 static const short int yydefgoto
[] =
764 -1, 47, 162, 48, 49, 50, 51, 52, 53, 54,
765 55, 56, 218, 293, 57, 58, 59, 60, 61, 62,
766 315, 316, 63, 241, 242, 64, 65, 66, 67, 68,
767 69, 70, 71, 72, 169, 116, 170, 182, 181, 117,
768 118, 171, 257, 258, 259, 119, 120, 121, 73, 122,
769 148, 123, 75, 335, 336, 337, 339, 76, 77, 78,
770 79, 80, 81, 173, 82, 83, 133, 84, 225, 85,
771 174, 139, 86, 87, 88, 89, 90, 345, 309, 91,
775 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
777 #define YYPACT_NINF -287
778 static const short int yypact
[] =
780 1808, -37, -287, -287, -287, -287, -287, 410, 19, -287,
781 -287, -287, -287, -287, -287, -287, 38, -37, 805, 19,
782 19, 5, 5, 19, 805, 805, 19, 19, 7, 19,
783 5, 19, 19, 19, 19, 19, 19, 805, 805, 805,
784 6, 805, -287, -287, 19, -287, -287, 46, 895, -287,
785 -287, -287, -287, -287, -287, -287, -287, -287, -287, -287,
786 -287, -287, -287, -287, -287, -287, -287, -287, 1869, -287,
787 -287, -287, -37, -287, 547, -287, -287, -287, -287, -37,
788 -37, 651, -287, -287, -287, -287, -287, -287, -287, -287,
789 -287, -287, -287, -287, 805, -287, -287, -287, -287, -287,
790 -287, 37, 19, -287, -287, 805, 805, 19, 805, 805,
791 -287, 53, 805, 805, 805, 1903, -14, -287, -287, -287,
792 -287, -287, 13, -287, -18, -37, -287, -287, 435, -37,
793 -37, -287, -287, -37, -37, 19, 435, 435, -287, 703,
794 586, 19, 268, 12, -29, -37, -37, -287, -37, 19,
795 -37, -37, -287, 435, 435, 435, 19, 268, 435, -287,
796 -287, -37, -287, -287, -287, -287, 796, 796, 684, 494,
797 -287, -287, -287, -7, -37, -287, -287, -287, 805, -7,
798 494, -37, -287, -287, -287, -287, 11, 745, 494, -287,
799 494, 494, 34, -287, -287, 1920, -46, 805, 805, 805,
800 805, 805, 805, 805, 805, 805, 805, 805, 805, 805,
801 805, 805, 805, 19, 19, 805, 805, 805, 16, -287,
802 1808, 1808, 1808, -287, -287, -37, -4, 1808, 1808, 19,
803 435, -287, -37, 268, -287, -287, -287, 153, -287, 1808,
804 1808, 20, -287, 17, 19, 1808, -287, -287, -287, 268,
805 -287, -287, -287, -287, -37, -37, -287, 22, 9, -287,
806 796, -287, 1866, -287, 10, 30, -287, -287, -287, 244,
807 878, 961, 298, 298, 174, 174, 174, 174, 24, 24,
808 34, 34, -287, -287, -287, -14, -287, -54, -287, 1885,
809 1941, 494, 153, -37, 978, 1144, 1144, 1808, 1227, 1310,
810 -287, -287, -287, -287, -287, -287, -287, -287, -287, 35,
811 1393, 1476, 19, -287, 805, 8, -287, 27, -287, 1559,
812 -287, -287, -287, -287, -287, 796, -287, -287, 56, 43,
813 -287, -287, -287, -287, 805, 96, 100, -287, -37, 102,
814 104, 1642, -37, -37, 19, -37, -37, -37, -287, 494,
815 -37, -287, -287, -37, -287, -287, -287, 435, 105, -287,
816 1808, -37, -37, -37, -287, -287, -287, -287, -287, -287,
817 -287, -287, 1808, -37, 1725, -287, -287, -287, 1061, -287
820 /* YYPGOTO[NTERM-NUM]. */
821 static const short int yypgoto
[] =
823 -287, -287, -287, -122, -41, 66, -287, -287, -287, -287,
824 -287, -287, -287, -287, -287, -287, -287, -287, -287, -287,
825 -287, -179, -287, -287, -175, -287, -287, -287, -287, -287,
826 49, -287, -287, -287, 332, -74, -129, -287, -287, 40,
827 -70, -287, -287, -287, -185, -287, -287, -287, -287, 0,
828 -287, -287, -287, -287, -287, -192, -286, -287, -287, -287,
829 -287, -73, -99, 64, -287, -287, -6, -287, -287, -287,
830 -287, -25, -287, -238, -287, -287, -287, -287, -142, -287,
834 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
835 positive, shift that token. If negative, reduce the rule which
836 number is the opposite. If zero, do what YYDEFACT says.
837 If YYTABLE_NINF, syntax error. */
838 #define YYTABLE_NINF -161
839 static const short int yytable
[] =
841 74, 172, 184, 143, 144, 175, 318, 163, 124, 131,
842 340, 232, 2, 2, 2, 215, 134, 267, 268, 129,
843 130, 42, 43, 135, 145, 2, 138, 140, 142, 138,
844 237, 146, 147, 149, 150, 151, 152, 254, 255, 256,
845 157, 216, 229, 2, 159, 156, 160, 217, 74, 358,
846 95, 9, 10, 11, 12, 350, 96, 97, 213, 2,
847 98, 99, 100, 141, 260, 126, 127, 229, 74, 234,
848 42, 43, 214, 235, 214, 292, 314, 318, 42, 43,
849 325, 328, 215, 229, 250, 42, 43, 132, 251, 36,
850 324, 312, 167, 329, 125, 344, 42, 43, 294, 295,
851 296, 183, 186, 101, 102, 298, 299, 189, 216, 44,
852 226, 208, 209, 356, 210, 211, 212, 310, 311, 104,
853 355, 165, 338, 319, 210, 211, 212, 334, 176, 177,
854 361, 326, 362, 373, 164, 138, 351, 348, 308, 285,
855 354, 233, 185, 286, 359, 179, 112, 113, 114, 243,
856 332, 0, 0, 0, 0, 0, 249, 0, 0, 2,
857 303, 0, 0, 0, 304, 0, 305, 9, 10, 11,
858 12, 0, 0, 0, 219, 341, 320, 220, 221, 222,
859 321, 0, 223, 224, 0, 227, 228, 0, 0, 231,
860 0, 0, 236, 308, 238, 239, 256, 240, 0, 244,
861 245, 306, 246, 247, 248, 36, 0, 252, 0, 0,
862 253, 0, 0, 287, 288, 0, 0, 0, 0, 0,
863 74, 74, 74, 261, 0, 44, 0, 74, 74, 300,
864 263, 0, 0, 0, 0, 0, 0, 307, 374, 74,
865 74, 0, 0, 0, 317, 74, 0, 0, 0, 0,
866 378, 0, 0, 163, 163, 163, 0, 163, 163, 206,
867 207, 208, 209, 0, 210, 211, 212, 0, 0, 163,
868 163, 0, 0, 0, 297, 0, 0, 0, 163, 301,
869 0, 302, 9, 10, 11, 12, 13, 14, 15, 0,
870 313, 0, 307, 0, 74, 74, 74, 74, 74, 74,
871 163, 0, 0, 322, 323, 0, 0, 0, 0, 0,
872 74, 74, 243, 0, 0, 317, 0, 0, 0, 74,
873 36, 198, 199, 200, 201, 202, 203, 204, 205, 206,
874 207, 208, 209, 163, 210, 211, 212, 163, 0, 115,
875 44, 74, 333, 0, 366, 0, 0, 0, 0, 0,
876 128, 0, 0, 0, 0, 0, 136, 137, 0, 0,
877 74, 0, 0, 0, 0, 0, 352, 0, 0, 153,
878 154, 155, 74, 158, 74, 0, 0, 0, 74, 202,
879 203, 204, 205, 206, 207, 208, 209, 360, 210, 211,
880 212, 364, 365, 0, 367, 368, 369, 0, 0, 370,
881 0, 0, 371, 0, 0, 0, 372, 0, 0, 0,
882 375, 376, 377, 96, 97, 0, 2, 98, 99, 100,
883 0, 0, 379, 0, 0, 0, 180, 0, 0, 0,
884 0, 0, 0, 0, 0, 0, 0, 187, 188, 0,
885 190, 191, 0, 192, 193, 194, 195, 0, 0, 0,
886 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
887 101, 102, 0, 0, 0, 0, 0, 0, 0, 0,
888 0, 230, 103, 0, 0, 0, 104, 0, 0, 105,
889 0, 0, 0, 106, 0, 0, 0, 107, 0, 0,
890 0, 108, 109, 42, 43, 0, 0, 110, 111, 0,
891 0, 0, 0, 112, 113, 114, 0, 0, 0, 0,
892 262, 197, 198, 199, 200, 201, 202, 203, 204, 205,
893 206, 207, 208, 209, 0, 210, 211, 212, 0, 269,
894 270, 271, 272, 273, 274, 275, 276, 277, 278, 279,
895 280, 281, 282, 283, 284, 0, 0, 289, 290, 291,
896 96, 97, 0, 2, 98, 99, 100, 0, 0, 0,
897 0, 9, 10, 11, 12, 13, 14, 15, 0, 0,
898 197, 198, 199, 200, 201, 202, 203, 204, 205, 206,
899 207, 208, 209, 166, 210, 211, 212, 0, 0, 96,
900 97, 0, 2, 98, 99, 100, 0, 101, 102, 36,
901 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
902 0, 0, 167, 104, 168, 0, 0, 0, 0, 44,
903 0, 0, 0, 0, 107, 0, 0, 0, 108, 109,
904 0, 0, 0, 0, 110, 111, 101, 102, 0, 0,
905 112, 113, 114, 0, 42, 43, 349, 0, 0, 0,
906 0, 0, 104, 168, 96, 97, 0, 2, 98, 99,
907 100, 0, 0, 107, 0, 0, 357, 108, 109, 0,
908 0, 0, 0, 110, 111, 0, 0, 0, 0, 112,
909 113, 114, 0, 0, 0, 0, 0, 96, 97, 0,
910 2, 98, 99, 100, 0, 0, 0, 0, 0, 0,
911 0, 101, 102, 0, 0, 0, 96, 97, 0, 2,
912 98, 99, 100, 0, 0, 0, 0, 104, 168, 0,
913 178, 0, 0, 0, 0, 0, 0, 0, 107, 0,
914 0, 0, 108, 109, 101, 102, 0, 0, 110, 111,
915 0, 0, 0, 0, 112, 113, 114, 0, 0, 0,
916 104, 168, 0, 101, 102, -118, 0, 0, 0, 0,
917 0, 107, 0, 0, 0, 108, 109, 0, 0, 104,
918 0, 110, 111, 0, 229, 0, 0, 112, 113, 114,
919 107, 0, 0, 0, 108, 109, 0, 0, 0, 0,
920 110, 111, 0, 0, 0, 0, 112, 113, 114, 96,
921 97, 0, 2, 98, 99, 100, 0, 0, 96, 97,
922 0, 2, 98, 99, 100, 264, 265, 0, 0, 0,
923 0, 197, 198, 199, 200, 201, 202, 203, 204, 205,
924 206, 207, 208, 209, 0, 210, 211, 212, 0, 0,
925 0, 0, 0, 0, 0, 0, 101, 102, 0, 0,
926 0, 0, 0, 0, 0, 101, 102, 0, 0, 0,
927 0, 0, 104, 168, 0, 0, 0, 0, 0, 0,
928 0, 104, 0, 107, 0, 0, 0, 108, 109, 0,
929 0, 0, 107, 110, 111, 0, 108, 109, 0, 112,
930 113, 114, 110, 111, 0, -4, 1, 0, 112, 113,
931 114, 2, 0, 3, 4, 5, 6, 7, 8, 9,
932 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
933 20, 0, 0, 0, 21, 22, 23, 24, 25, 0,
934 26, 0, 27, 161, 28, 29, 30, 31, 32, 0,
935 33, 34, 0, 35, 0, 0, 0, 36, 37, 38,
936 39, 40, 41, 42, 43, 0, 199, 200, 201, 202,
937 203, 204, 205, 206, 207, 208, 209, 44, 210, 211,
938 212, 0, 0, 0, 0, 0, 0, 0, 0, 1,
939 0, 0, 45, 46, 2, 0, 3, 4, 5, 6,
940 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
941 17, 18, 19, 20, -155, 334, -155, 21, 22, 23,
942 24, 25, 0, 26, 0, 27, 0, 28, 29, 30,
943 31, 32, 0, 33, 34, 0, 35, 0, 0, 0,
944 36, 37, 38, 39, 40, 41, 42, 43, 0, 0,
945 200, 201, 202, 203, 204, 205, 206, 207, 208, 209,
946 44, 210, 211, 212, 0, 0, 0, 0, 0, 0,
947 0, 0, 1, 0, 0, 45, 46, 2, 0, 3,
948 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
949 14, 15, 16, 17, 18, 19, 20, -158, -158, -158,
950 21, 22, 23, 24, 25, 0, 26, 0, 27, 0,
951 28, 29, 30, 31, 32, 0, 33, 34, 0, 35,
952 0, 0, 0, 36, 37, 38, 39, 40, 41, 42,
953 43, 0, 0, 0, 0, 0, 0, 0, 0, 0,
954 0, 0, 0, 44, 0, 0, 0, 0, 0, 0,
955 0, 0, 0, 0, 0, 1, 0, 0, 45, 46,
956 2, 0, 3, 4, 5, 6, 7, 8, 9, 10,
957 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
958 338, 0, -160, 21, 22, 23, 24, 25, 0, 26,
959 0, 27, 0, 28, 29, 30, 31, 32, 0, 33,
960 34, 0, 35, 0, 0, 0, 36, 37, 38, 39,
961 40, 41, 42, 43, 0, 0, 0, 0, 0, 0,
962 0, 0, 0, 0, 0, 0, 44, 0, 0, 0,
963 0, 0, 0, 0, 0, 0, 0, 0, 1, 0,
964 0, 45, 46, 2, 0, 3, 4, 5, 6, 7,
965 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
966 18, 19, 20, 0, 0, 0, 21, 22, 23, 24,
967 25, 342, 26, 0, 27, 0, 28, 29, 30, 31,
968 32, 0, 33, 34, 0, 35, 0, 0, 0, 36,
969 37, 38, 39, 40, 41, 42, 43, 0, 0, 0,
970 0, 0, 0, 0, 0, 0, 0, 0, 0, 44,
971 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
972 0, 1, 0, 0, 45, 46, 2, 0, 3, 4,
973 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
974 15, 16, 17, 18, 19, 20, 0, 0, 0, 21,
975 22, 23, 24, 25, 343, 26, 0, 27, 0, 28,
976 29, 30, 31, 32, 0, 33, 34, 0, 35, 0,
977 0, 0, 36, 37, 38, 39, 40, 41, 42, 43,
978 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
979 0, 0, 44, 0, 0, 0, 0, 0, 0, 0,
980 0, 0, 0, 0, 1, 0, 0, 45, 46, 2,
981 0, 3, 4, 5, 6, 7, 8, 9, 10, 11,
982 12, 13, 14, 15, 16, 17, 18, 19, 20, 0,
983 0, 0, 21, 22, 23, 24, 25, 0, 26, 0,
984 27, 0, 28, 29, 30, 31, 32, 346, 33, 34,
985 0, 35, 0, 0, 0, 36, 37, 38, 39, 40,
986 41, 42, 43, 0, 0, 0, 0, 0, 0, 0,
987 0, 0, 0, 0, 0, 44, 0, 0, 0, 0,
988 0, 0, 0, 0, 0, 0, 0, 1, 0, 0,
989 45, 46, 2, 0, 3, 4, 5, 6, 7, 8,
990 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
991 19, 20, 0, 0, 0, 21, 22, 23, 24, 25,
992 0, 26, 0, 27, 0, 28, 29, 30, 31, 32,
993 347, 33, 34, 0, 35, 0, 0, 0, 36, 37,
994 38, 39, 40, 41, 42, 43, 0, 0, 0, 0,
995 0, 0, 0, 0, 0, 0, 0, 0, 44, 0,
996 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
997 1, 0, 0, 45, 46, 2, 0, 3, 4, 5,
998 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
999 16, 17, 18, 19, 20, 0, 0, 0, 21, 22,
1000 23, 24, 25, 0, 26, 0, 27, 0, 28, 29,
1001 30, 31, 32, 0, 33, 34, 0, 35, 353, 0,
1002 0, 36, 37, 38, 39, 40, 41, 42, 43, 0,
1003 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1004 0, 44, 0, 0, 0, 0, 0, 0, 0, 0,
1005 0, 0, 0, 1, 0, 0, 45, 46, 2, 0,
1006 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
1007 13, 14, 15, 16, 17, 18, 19, 20, 0, 0,
1008 0, 21, 22, 23, 24, 25, 363, 26, 0, 27,
1009 0, 28, 29, 30, 31, 32, 0, 33, 34, 0,
1010 35, 0, 0, 0, 36, 37, 38, 39, 40, 41,
1011 42, 43, 0, 0, 0, 0, 0, 0, 0, 0,
1012 0, 0, 0, 0, 44, 0, 0, 0, 0, 0,
1013 0, 0, 0, 0, 0, 0, 1, 0, 0, 45,
1014 46, 2, 0, 3, 4, 5, 6, 7, 8, 9,
1015 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
1016 20, 0, 0, -159, 21, 22, 23, 24, 25, 0,
1017 26, 0, 27, 0, 28, 29, 30, 31, 32, 0,
1018 33, 34, 0, 35, 0, 0, 0, 36, 37, 38,
1019 39, 40, 41, 42, 43, 0, 0, 0, 0, 0,
1020 0, 0, 0, 0, 0, 0, 0, 44, 0, 0,
1021 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
1022 0, 0, 45, 46, 2, 0, 3, 4, 5, 6,
1023 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
1024 17, 18, 19, 20, 0, 0, 0, 21, 22, 23,
1025 24, 25, 0, 26, 0, 27, 0, 28, 29, 30,
1026 31, 32, 0, 33, 34, 0, 35, 0, 0, 0,
1027 36, 37, 38, 39, 40, 41, 42, 43, 0, 0,
1028 1, 0, 0, 0, 0, 2, 0, 0, 0, 0,
1029 44, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1030 16, 17, 18, 19, 20, 45, 46, 0, 21, 22,
1031 23, 24, 25, 0, 26, 0, 27, 0, 28, 29,
1032 30, 31, 32, 0, 33, 34, 0, 35, 0, 0,
1033 0, 36, 37, 38, 39, 40, 41, 42, 43, 0,
1034 0, 0, 0, 0, 0, 0, 327, 0, 0, 0,
1035 0, 44, 197, 198, 199, 200, 201, 202, 203, 204,
1036 205, 206, 207, 208, 209, 330, 210, 211, 212, 0,
1037 0, 197, 198, 199, 200, 201, 202, 203, 204, 205,
1038 206, 207, 208, 209, 196, 210, 211, 212, 0, 197,
1039 198, 199, 200, 201, 202, 203, 204, 205, 206, 207,
1040 208, 209, 0, 210, 211, 212, 197, 198, 199, 200,
1041 201, 202, 203, 204, 205, 206, 207, 208, 209, 0,
1042 210, 211, 212, 0, 0, 0, 266, 197, 198, 199,
1043 200, 201, 202, 203, 204, 205, 206, 207, 208, 209,
1044 0, 210, 211, 212, 0, 0, 0, 331
1047 static const short int yycheck
[] =
1049 0, 74, 101, 28, 29, 74, 244, 48, 8, 4,
1050 296, 140, 6, 6, 6, 69, 22, 63, 64, 19,
1051 20, 58, 59, 23, 30, 6, 26, 27, 28, 29,
1052 59, 31, 32, 33, 34, 35, 36, 166, 167, 168,
1053 40, 95, 71, 6, 44, 39, 0, 65, 48, 335,
1054 1, 14, 15, 16, 17, 47, 3, 4, 72, 6,
1055 7, 8, 9, 56, 71, 16, 17, 71, 68, 142,
1056 58, 59, 61, 142, 61, 59, 59, 315, 58, 59,
1057 71, 71, 69, 71, 157, 58, 59, 82, 157, 52,
1058 68, 71, 65, 63, 56, 60, 58, 59, 220, 221,
1059 222, 101, 102, 50, 51, 227, 228, 107, 95, 72,
1060 135, 87, 88, 70, 90, 91, 92, 239, 240, 66,
1061 64, 72, 26, 245, 90, 91, 92, 27, 79, 80,
1062 28, 260, 28, 28, 68, 135, 315, 312, 237, 213,
1063 325, 141, 102, 213, 336, 81, 93, 94, 95, 149,
1064 292, -1, -1, -1, -1, -1, 156, -1, -1, 6,
1065 233, -1, -1, -1, 233, -1, 13, 14, 15, 16,
1066 17, -1, -1, -1, 125, 297, 249, 128, 129, 130,
1067 249, -1, 133, 134, -1, 136, 137, -1, -1, 140,
1068 -1, -1, 143, 292, 145, 146, 325, 148, -1, 150,
1069 151, 48, 153, 154, 155, 52, -1, 158, -1, -1,
1070 161, -1, -1, 213, 214, -1, -1, -1, -1, -1,
1071 220, 221, 222, 174, -1, 72, -1, 227, 228, 229,
1072 181, -1, -1, -1, -1, -1, -1, 237, 360, 239,
1073 240, -1, -1, -1, 244, 245, -1, -1, -1, -1,
1074 372, -1, -1, 294, 295, 296, -1, 298, 299, 85,
1075 86, 87, 88, -1, 90, 91, 92, -1, -1, 310,
1076 311, -1, -1, -1, 225, -1, -1, -1, 319, 230,
1077 -1, 232, 14, 15, 16, 17, 18, 19, 20, -1,
1078 241, -1, 292, -1, 294, 295, 296, 297, 298, 299,
1079 341, -1, -1, 254, 255, -1, -1, -1, -1, -1,
1080 310, 311, 312, -1, -1, 315, -1, -1, -1, 319,
1081 52, 77, 78, 79, 80, 81, 82, 83, 84, 85,
1082 86, 87, 88, 374, 90, 91, 92, 378, -1, 7,
1083 72, 341, 293, -1, 344, -1, -1, -1, -1, -1,
1084 18, -1, -1, -1, -1, -1, 24, 25, -1, -1,
1085 360, -1, -1, -1, -1, -1, 317, -1, -1, 37,
1086 38, 39, 372, 41, 374, -1, -1, -1, 378, 81,
1087 82, 83, 84, 85, 86, 87, 88, 338, 90, 91,
1088 92, 342, 343, -1, 345, 346, 347, -1, -1, 350,
1089 -1, -1, 353, -1, -1, -1, 357, -1, -1, -1,
1090 361, 362, 363, 3, 4, -1, 6, 7, 8, 9,
1091 -1, -1, 373, -1, -1, -1, 94, -1, -1, -1,
1092 -1, -1, -1, -1, -1, -1, -1, 105, 106, -1,
1093 108, 109, -1, 111, 112, 113, 114, -1, -1, -1,
1094 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1095 50, 51, -1, -1, -1, -1, -1, -1, -1, -1,
1096 -1, 139, 62, -1, -1, -1, 66, -1, -1, 69,
1097 -1, -1, -1, 73, -1, -1, -1, 77, -1, -1,
1098 -1, 81, 82, 58, 59, -1, -1, 87, 88, -1,
1099 -1, -1, -1, 93, 94, 95, -1, -1, -1, -1,
1100 178, 76, 77, 78, 79, 80, 81, 82, 83, 84,
1101 85, 86, 87, 88, -1, 90, 91, 92, -1, 197,
1102 198, 199, 200, 201, 202, 203, 204, 205, 206, 207,
1103 208, 209, 210, 211, 212, -1, -1, 215, 216, 217,
1104 3, 4, -1, 6, 7, 8, 9, -1, -1, -1,
1105 -1, 14, 15, 16, 17, 18, 19, 20, -1, -1,
1106 76, 77, 78, 79, 80, 81, 82, 83, 84, 85,
1107 86, 87, 88, 36, 90, 91, 92, -1, -1, 3,
1108 4, -1, 6, 7, 8, 9, -1, 50, 51, 52,
1109 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1110 -1, -1, 65, 66, 67, -1, -1, -1, -1, 72,
1111 -1, -1, -1, -1, 77, -1, -1, -1, 81, 82,
1112 -1, -1, -1, -1, 87, 88, 50, 51, -1, -1,
1113 93, 94, 95, -1, 58, 59, 314, -1, -1, -1,
1114 -1, -1, 66, 67, 3, 4, -1, 6, 7, 8,
1115 9, -1, -1, 77, -1, -1, 334, 81, 82, -1,
1116 -1, -1, -1, 87, 88, -1, -1, -1, -1, 93,
1117 94, 95, -1, -1, -1, -1, -1, 3, 4, -1,
1118 6, 7, 8, 9, -1, -1, -1, -1, -1, -1,
1119 -1, 50, 51, -1, -1, -1, 3, 4, -1, 6,
1120 7, 8, 9, -1, -1, -1, -1, 66, 67, -1,
1121 69, -1, -1, -1, -1, -1, -1, -1, 77, -1,
1122 -1, -1, 81, 82, 50, 51, -1, -1, 87, 88,
1123 -1, -1, -1, -1, 93, 94, 95, -1, -1, -1,
1124 66, 67, -1, 50, 51, 71, -1, -1, -1, -1,
1125 -1, 77, -1, -1, -1, 81, 82, -1, -1, 66,
1126 -1, 87, 88, -1, 71, -1, -1, 93, 94, 95,
1127 77, -1, -1, -1, 81, 82, -1, -1, -1, -1,
1128 87, 88, -1, -1, -1, -1, 93, 94, 95, 3,
1129 4, -1, 6, 7, 8, 9, -1, -1, 3, 4,
1130 -1, 6, 7, 8, 9, 70, 71, -1, -1, -1,
1131 -1, 76, 77, 78, 79, 80, 81, 82, 83, 84,
1132 85, 86, 87, 88, -1, 90, 91, 92, -1, -1,
1133 -1, -1, -1, -1, -1, -1, 50, 51, -1, -1,
1134 -1, -1, -1, -1, -1, 50, 51, -1, -1, -1,
1135 -1, -1, 66, 67, -1, -1, -1, -1, -1, -1,
1136 -1, 66, -1, 77, -1, -1, -1, 81, 82, -1,
1137 -1, -1, 77, 87, 88, -1, 81, 82, -1, 93,
1138 94, 95, 87, 88, -1, 0, 1, -1, 93, 94,
1139 95, 6, -1, 8, 9, 10, 11, 12, 13, 14,
1140 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
1141 25, -1, -1, -1, 29, 30, 31, 32, 33, -1,
1142 35, -1, 37, 38, 39, 40, 41, 42, 43, -1,
1143 45, 46, -1, 48, -1, -1, -1, 52, 53, 54,
1144 55, 56, 57, 58, 59, -1, 78, 79, 80, 81,
1145 82, 83, 84, 85, 86, 87, 88, 72, 90, 91,
1146 92, -1, -1, -1, -1, -1, -1, -1, -1, 1,
1147 -1, -1, 87, 88, 6, -1, 8, 9, 10, 11,
1148 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
1149 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1150 32, 33, -1, 35, -1, 37, -1, 39, 40, 41,
1151 42, 43, -1, 45, 46, -1, 48, -1, -1, -1,
1152 52, 53, 54, 55, 56, 57, 58, 59, -1, -1,
1153 79, 80, 81, 82, 83, 84, 85, 86, 87, 88,
1154 72, 90, 91, 92, -1, -1, -1, -1, -1, -1,
1155 -1, -1, 1, -1, -1, 87, 88, 6, -1, 8,
1156 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
1157 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
1158 29, 30, 31, 32, 33, -1, 35, -1, 37, -1,
1159 39, 40, 41, 42, 43, -1, 45, 46, -1, 48,
1160 -1, -1, -1, 52, 53, 54, 55, 56, 57, 58,
1161 59, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1162 -1, -1, -1, 72, -1, -1, -1, -1, -1, -1,
1163 -1, -1, -1, -1, -1, 1, -1, -1, 87, 88,
1164 6, -1, 8, 9, 10, 11, 12, 13, 14, 15,
1165 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
1166 26, -1, 28, 29, 30, 31, 32, 33, -1, 35,
1167 -1, 37, -1, 39, 40, 41, 42, 43, -1, 45,
1168 46, -1, 48, -1, -1, -1, 52, 53, 54, 55,
1169 56, 57, 58, 59, -1, -1, -1, -1, -1, -1,
1170 -1, -1, -1, -1, -1, -1, 72, -1, -1, -1,
1171 -1, -1, -1, -1, -1, -1, -1, -1, 1, -1,
1172 -1, 87, 88, 6, -1, 8, 9, 10, 11, 12,
1173 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
1174 23, 24, 25, -1, -1, -1, 29, 30, 31, 32,
1175 33, 34, 35, -1, 37, -1, 39, 40, 41, 42,
1176 43, -1, 45, 46, -1, 48, -1, -1, -1, 52,
1177 53, 54, 55, 56, 57, 58, 59, -1, -1, -1,
1178 -1, -1, -1, -1, -1, -1, -1, -1, -1, 72,
1179 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1180 -1, 1, -1, -1, 87, 88, 6, -1, 8, 9,
1181 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
1182 20, 21, 22, 23, 24, 25, -1, -1, -1, 29,
1183 30, 31, 32, 33, 34, 35, -1, 37, -1, 39,
1184 40, 41, 42, 43, -1, 45, 46, -1, 48, -1,
1185 -1, -1, 52, 53, 54, 55, 56, 57, 58, 59,
1186 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1187 -1, -1, 72, -1, -1, -1, -1, -1, -1, -1,
1188 -1, -1, -1, -1, 1, -1, -1, 87, 88, 6,
1189 -1, 8, 9, 10, 11, 12, 13, 14, 15, 16,
1190 17, 18, 19, 20, 21, 22, 23, 24, 25, -1,
1191 -1, -1, 29, 30, 31, 32, 33, -1, 35, -1,
1192 37, -1, 39, 40, 41, 42, 43, 44, 45, 46,
1193 -1, 48, -1, -1, -1, 52, 53, 54, 55, 56,
1194 57, 58, 59, -1, -1, -1, -1, -1, -1, -1,
1195 -1, -1, -1, -1, -1, 72, -1, -1, -1, -1,
1196 -1, -1, -1, -1, -1, -1, -1, 1, -1, -1,
1197 87, 88, 6, -1, 8, 9, 10, 11, 12, 13,
1198 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
1199 24, 25, -1, -1, -1, 29, 30, 31, 32, 33,
1200 -1, 35, -1, 37, -1, 39, 40, 41, 42, 43,
1201 44, 45, 46, -1, 48, -1, -1, -1, 52, 53,
1202 54, 55, 56, 57, 58, 59, -1, -1, -1, -1,
1203 -1, -1, -1, -1, -1, -1, -1, -1, 72, -1,
1204 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1205 1, -1, -1, 87, 88, 6, -1, 8, 9, 10,
1206 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
1207 21, 22, 23, 24, 25, -1, -1, -1, 29, 30,
1208 31, 32, 33, -1, 35, -1, 37, -1, 39, 40,
1209 41, 42, 43, -1, 45, 46, -1, 48, 49, -1,
1210 -1, 52, 53, 54, 55, 56, 57, 58, 59, -1,
1211 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1212 -1, 72, -1, -1, -1, -1, -1, -1, -1, -1,
1213 -1, -1, -1, 1, -1, -1, 87, 88, 6, -1,
1214 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
1215 18, 19, 20, 21, 22, 23, 24, 25, -1, -1,
1216 -1, 29, 30, 31, 32, 33, 34, 35, -1, 37,
1217 -1, 39, 40, 41, 42, 43, -1, 45, 46, -1,
1218 48, -1, -1, -1, 52, 53, 54, 55, 56, 57,
1219 58, 59, -1, -1, -1, -1, -1, -1, -1, -1,
1220 -1, -1, -1, -1, 72, -1, -1, -1, -1, -1,
1221 -1, -1, -1, -1, -1, -1, 1, -1, -1, 87,
1222 88, 6, -1, 8, 9, 10, 11, 12, 13, 14,
1223 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
1224 25, -1, -1, 28, 29, 30, 31, 32, 33, -1,
1225 35, -1, 37, -1, 39, 40, 41, 42, 43, -1,
1226 45, 46, -1, 48, -1, -1, -1, 52, 53, 54,
1227 55, 56, 57, 58, 59, -1, -1, -1, -1, -1,
1228 -1, -1, -1, -1, -1, -1, -1, 72, -1, -1,
1229 -1, -1, -1, -1, -1, -1, -1, -1, -1, 1,
1230 -1, -1, 87, 88, 6, -1, 8, 9, 10, 11,
1231 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
1232 22, 23, 24, 25, -1, -1, -1, 29, 30, 31,
1233 32, 33, -1, 35, -1, 37, -1, 39, 40, 41,
1234 42, 43, -1, 45, 46, -1, 48, -1, -1, -1,
1235 52, 53, 54, 55, 56, 57, 58, 59, -1, -1,
1236 1, -1, -1, -1, -1, 6, -1, -1, -1, -1,
1237 72, 12, 13, 14, 15, 16, 17, 18, 19, 20,
1238 21, 22, 23, 24, 25, 87, 88, -1, 29, 30,
1239 31, 32, 33, -1, 35, -1, 37, -1, 39, 40,
1240 41, 42, 43, -1, 45, 46, -1, 48, -1, -1,
1241 -1, 52, 53, 54, 55, 56, 57, 58, 59, -1,
1242 -1, -1, -1, -1, -1, -1, 70, -1, -1, -1,
1243 -1, 72, 76, 77, 78, 79, 80, 81, 82, 83,
1244 84, 85, 86, 87, 88, 70, 90, 91, 92, -1,
1245 -1, 76, 77, 78, 79, 80, 81, 82, 83, 84,
1246 85, 86, 87, 88, 71, 90, 91, 92, -1, 76,
1247 77, 78, 79, 80, 81, 82, 83, 84, 85, 86,
1248 87, 88, -1, 90, 91, 92, 76, 77, 78, 79,
1249 80, 81, 82, 83, 84, 85, 86, 87, 88, -1,
1250 90, 91, 92, -1, -1, -1, 96, 76, 77, 78,
1251 79, 80, 81, 82, 83, 84, 85, 86, 87, 88,
1252 -1, 90, 91, 92, -1, -1, -1, 96
1255 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
1256 symbol of state STATE-NUM. */
1257 static const unsigned char yystos
[] =
1259 0, 1, 6, 8, 9, 10, 11, 12, 13, 14,
1260 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
1261 25, 29, 30, 31, 32, 33, 35, 37, 39, 40,
1262 41, 42, 43, 45, 46, 48, 52, 53, 54, 55,
1263 56, 57, 58, 59, 72, 87, 88, 98, 100, 101,
1264 102, 103, 104, 105, 106, 107, 108, 111, 112, 113,
1265 114, 115, 116, 119, 122, 123, 124, 125, 126, 127,
1266 128, 129, 130, 145, 146, 149, 154, 155, 156, 157,
1267 158, 159, 161, 162, 164, 166, 169, 170, 171, 172,
1268 173, 176, 177, 178, 179, 127, 3, 4, 7, 8,
1269 9, 50, 51, 62, 66, 69, 73, 77, 81, 82,
1270 87, 88, 93, 94, 95, 131, 132, 136, 137, 142,
1271 143, 144, 146, 148, 146, 56, 127, 127, 131, 146,
1272 146, 4, 82, 163, 163, 146, 131, 131, 146, 168,
1273 146, 56, 146, 168, 168, 163, 146, 146, 147, 146,
1274 146, 146, 146, 131, 131, 131, 39, 146, 131, 146,
1275 0, 38, 99, 101, 102, 127, 36, 65, 67, 131,
1276 133, 138, 158, 160, 167, 178, 127, 127, 69, 160,
1277 131, 135, 134, 146, 159, 136, 146, 131, 131, 146,
1278 131, 131, 131, 131, 131, 131, 71, 76, 77, 78,
1279 79, 80, 81, 82, 83, 84, 85, 86, 87, 88,
1280 90, 91, 92, 72, 61, 69, 95, 65, 109, 127,
1281 127, 127, 127, 127, 127, 165, 168, 127, 127, 71,
1282 131, 127, 133, 146, 158, 178, 127, 59, 127, 127,
1283 127, 120, 121, 146, 127, 127, 127, 127, 127, 146,
1284 158, 178, 127, 127, 133, 133, 133, 139, 140, 141,
1285 71, 127, 131, 127, 70, 71, 96, 63, 64, 131,
1286 131, 131, 131, 131, 131, 131, 131, 131, 131, 131,
1287 131, 131, 131, 131, 131, 132, 137, 146, 146, 131,
1288 131, 131, 59, 110, 100, 100, 100, 127, 100, 100,
1289 146, 127, 127, 158, 178, 13, 48, 146, 159, 175,
1290 100, 100, 71, 127, 59, 117, 118, 146, 170, 100,
1291 158, 178, 127, 127, 68, 71, 133, 70, 71, 63,
1292 70, 96, 175, 127, 27, 150, 151, 152, 26, 153,
1293 153, 100, 34, 34, 60, 174, 44, 44, 121, 131,
1294 47, 118, 127, 49, 141, 64, 70, 131, 153, 152,
1295 127, 28, 28, 34, 127, 127, 146, 127, 127, 127,
1296 127, 127, 127, 28, 100, 127, 127, 127, 100, 127
1299 #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
1300 # define YYSIZE_T __SIZE_TYPE__
1302 #if ! defined (YYSIZE_T) && defined (size_t)
1303 # define YYSIZE_T size_t
1305 #if ! defined (YYSIZE_T)
1306 # if defined (__STDC__) || defined (__cplusplus)
1307 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
1308 # define YYSIZE_T size_t
1311 #if ! defined (YYSIZE_T)
1312 # define YYSIZE_T unsigned int
1315 #define yyerrok (yyerrstatus = 0)
1316 #define yyclearin (yychar = YYEMPTY)
1317 #define YYEMPTY (-2)
1320 #define YYACCEPT goto yyacceptlab
1321 #define YYABORT goto yyabortlab
1322 #define YYERROR goto yyerrorlab
1325 /* Like YYERROR except do call yyerror. This remains here temporarily
1326 to ease the transition to the new meaning of YYERROR, for GCC.
1327 Once GCC version 2 has supplanted version 1, this can go. */
1329 #define YYFAIL goto yyerrlab
1331 #define YYRECOVERING() (!!yyerrstatus)
1333 #define YYBACKUP(Token, Value) \
1335 if (yychar == YYEMPTY && yylen == 1) \
1339 yytoken = YYTRANSLATE (yychar); \
1345 yyerror ("syntax error: cannot back up");\
1352 #define YYERRCODE 256
1355 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
1356 If N is 0, then set CURRENT to the empty location which ends
1357 the previous symbol: RHS[0] (always defined). */
1359 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
1360 #ifndef YYLLOC_DEFAULT
1361 # define YYLLOC_DEFAULT(Current, Rhs, N) \
1365 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
1366 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
1367 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
1368 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
1372 (Current).first_line = (Current).last_line = \
1373 YYRHSLOC (Rhs, 0).last_line; \
1374 (Current).first_column = (Current).last_column = \
1375 YYRHSLOC (Rhs, 0).last_column; \
1381 /* YY_LOCATION_PRINT -- Print the location on the stream.
1382 This macro was not mandated originally: define only if we know
1383 we won't break user code: when these are the locations we know. */
1385 #ifndef YY_LOCATION_PRINT
1386 # if YYLTYPE_IS_TRIVIAL
1387 # define YY_LOCATION_PRINT(File, Loc) \
1388 fprintf (File, "%d.%d-%d.%d", \
1389 (Loc).first_line, (Loc).first_column, \
1390 (Loc).last_line, (Loc).last_column)
1392 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
1397 /* YYLEX -- calling `yylex' with the right arguments. */
1400 # define YYLEX yylex (YYLEX_PARAM)
1402 # define YYLEX yylex ()
1405 /* Enable debugging if requested. */
1409 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
1410 # define YYFPRINTF fprintf
1413 # define YYDPRINTF(Args) \
1419 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
1423 YYFPRINTF (stderr, "%s ", Title); \
1424 yysymprint (stderr, \
1425 Type, Value, Location); \
1426 YYFPRINTF (stderr, "\n"); \
1430 /*------------------------------------------------------------------.
1431 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
1433 `------------------------------------------------------------------*/
1435 #if defined (__STDC__) || defined (__cplusplus)
1437 yy_stack_print (short int *bottom
, short int *top
)
1440 yy_stack_print (bottom
, top
)
1445 YYFPRINTF (stderr
, "Stack now");
1446 for (/* Nothing. */; bottom
<= top
; ++bottom
)
1447 YYFPRINTF (stderr
, " %d", *bottom
);
1448 YYFPRINTF (stderr
, "\n");
1451 # define YY_STACK_PRINT(Bottom, Top) \
1454 yy_stack_print ((Bottom), (Top)); \
1458 /*------------------------------------------------.
1459 | Report that the YYRULE is going to be reduced. |
1460 `------------------------------------------------*/
1462 #if defined (__STDC__) || defined (__cplusplus)
1464 yy_reduce_print (int yyrule
)
1467 yy_reduce_print (yyrule
)
1472 unsigned int yylno
= yyrline
[yyrule
];
1473 YYFPRINTF (stderr
, "Reducing stack by rule %d (line %u), ",
1475 /* Print the symbols being reduced, and their result. */
1476 for (yyi
= yyprhs
[yyrule
]; 0 <= yyrhs
[yyi
]; yyi
++)
1477 YYFPRINTF (stderr
, "%s ", yytname
[yyrhs
[yyi
]]);
1478 YYFPRINTF (stderr
, "-> %s\n", yytname
[yyr1
[yyrule
]]);
1481 # define YY_REDUCE_PRINT(Rule) \
1484 yy_reduce_print (Rule); \
1487 /* Nonzero means print parse trace. It is left uninitialized so that
1488 multiple parsers can coexist. */
1490 #else /* !YYDEBUG */
1491 # define YYDPRINTF(Args)
1492 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
1493 # define YY_STACK_PRINT(Bottom, Top)
1494 # define YY_REDUCE_PRINT(Rule)
1495 #endif /* !YYDEBUG */
1498 /* YYINITDEPTH -- initial size of the parser's stacks. */
1500 # define YYINITDEPTH 200
1503 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1504 if the built-in stack extension method is used).
1506 Do not make this value too large; the results are undefined if
1507 SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH)
1508 evaluated with infinite-precision integer arithmetic. */
1511 # define YYMAXDEPTH 10000
1519 # if defined (__GLIBC__) && defined (_STRING_H)
1520 # define yystrlen strlen
1522 /* Return the length of YYSTR. */
1524 # if defined (__STDC__) || defined (__cplusplus)
1525 yystrlen (const char *yystr
)
1531 register const char *yys
= yystr
;
1533 while (*yys
++ != '\0')
1536 return yys
- yystr
- 1;
1542 # if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
1543 # define yystpcpy stpcpy
1545 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1548 # if defined (__STDC__) || defined (__cplusplus)
1549 yystpcpy (char *yydest
, const char *yysrc
)
1551 yystpcpy (yydest
, yysrc
)
1556 register char *yyd
= yydest
;
1557 register const char *yys
= yysrc
;
1559 while ((*yyd
++ = *yys
++) != '\0')
1567 #endif /* !YYERROR_VERBOSE */
1572 /*--------------------------------.
1573 | Print this symbol on YYOUTPUT. |
1574 `--------------------------------*/
1576 #if defined (__STDC__) || defined (__cplusplus)
1578 yysymprint (FILE *yyoutput
, int yytype
, YYSTYPE
*yyvaluep
, YYLTYPE
*yylocationp
)
1581 yysymprint (yyoutput
, yytype
, yyvaluep
, yylocationp
)
1585 YYLTYPE
*yylocationp
;
1588 /* Pacify ``unused variable'' warnings. */
1592 if (yytype
< YYNTOKENS
)
1593 YYFPRINTF (yyoutput
, "token %s (", yytname
[yytype
]);
1595 YYFPRINTF (yyoutput
, "nterm %s (", yytname
[yytype
]);
1597 YY_LOCATION_PRINT (yyoutput
, *yylocationp
);
1598 fprintf (yyoutput
, ": ");
1601 if (yytype
< YYNTOKENS
)
1602 YYPRINT (yyoutput
, yytoknum
[yytype
], *yyvaluep
);
1609 YYFPRINTF (yyoutput
, ")");
1612 #endif /* ! YYDEBUG */
1613 /*-----------------------------------------------.
1614 | Release the memory associated to this symbol. |
1615 `-----------------------------------------------*/
1617 #if defined (__STDC__) || defined (__cplusplus)
1619 yydestruct (const char *yymsg
, int yytype
, YYSTYPE
*yyvaluep
, YYLTYPE
*yylocationp
)
1622 yydestruct (yymsg
, yytype
, yyvaluep
, yylocationp
)
1626 YYLTYPE
*yylocationp
;
1629 /* Pacify ``unused variable'' warnings. */
1635 YY_SYMBOL_PRINT (yymsg
, yytype
, yyvaluep
, yylocationp
);
1646 /* Prevent warnings from -Wmissing-prototypes. */
1648 #ifdef YYPARSE_PARAM
1649 # if defined (__STDC__) || defined (__cplusplus)
1650 int yyparse (void *YYPARSE_PARAM
);
1654 #else /* ! YYPARSE_PARAM */
1655 #if defined (__STDC__) || defined (__cplusplus)
1660 #endif /* ! YYPARSE_PARAM */
1664 /* The look-ahead symbol. */
1667 /* The semantic value of the look-ahead symbol. */
1670 /* Number of syntax errors so far. */
1672 /* Location data for the look-ahead symbol. */
1681 #ifdef YYPARSE_PARAM
1682 # if defined (__STDC__) || defined (__cplusplus)
1683 int yyparse (void *YYPARSE_PARAM
)
1685 int yyparse (YYPARSE_PARAM
)
1686 void *YYPARSE_PARAM
;
1688 #else /* ! YYPARSE_PARAM */
1689 #if defined (__STDC__) || defined (__cplusplus)
1700 register int yystate
;
1703 /* Number of tokens to shift before error messages enabled. */
1705 /* Look-ahead token as an internal (translated) token number. */
1708 /* Three stacks and their tools:
1709 `yyss': related to states,
1710 `yyvs': related to semantic values,
1711 `yyls': related to locations.
1713 Refer to the stacks thru separate pointers, to allow yyoverflow
1714 to reallocate them elsewhere. */
1716 /* The state stack. */
1717 short int yyssa
[YYINITDEPTH
];
1718 short int *yyss
= yyssa
;
1719 register short int *yyssp
;
1721 /* The semantic value stack. */
1722 YYSTYPE yyvsa
[YYINITDEPTH
];
1723 YYSTYPE
*yyvs
= yyvsa
;
1724 register YYSTYPE
*yyvsp
;
1726 /* The location stack. */
1727 YYLTYPE yylsa
[YYINITDEPTH
];
1728 YYLTYPE
*yyls
= yylsa
;
1730 /* The locations where the error started and ended. */
1731 YYLTYPE yyerror_range
[2];
1733 #define YYPOPSTACK (yyvsp--, yyssp--, yylsp--)
1735 YYSIZE_T yystacksize
= YYINITDEPTH
;
1737 /* The variables used to return semantic value and location from the
1742 /* When reducing, the number of symbols on the RHS of the reduced
1746 YYDPRINTF ((stderr
, "Starting parse\n"));
1751 yychar
= YYEMPTY
; /* Cause a token to be read. */
1753 /* Initialize stack pointers.
1754 Waste one element of value and location stack
1755 so that they stay on the same level as the state stack.
1756 The wasted elements are never initialized. */
1761 #if YYLTYPE_IS_TRIVIAL
1762 /* Initialize the default location before parsing starts. */
1763 yylloc
.first_line
= yylloc
.last_line
= 1;
1764 yylloc
.first_column
= yylloc
.last_column
= 0;
1773 /*------------------------------------------------------------.
1774 | yynewstate -- Push a new state, which is found in yystate. |
1775 `------------------------------------------------------------*/
1777 /* In all cases, when you get here, the value and location stacks
1778 have just been pushed. so pushing a state here evens the stacks.
1785 if (yyss
+ yystacksize
- 1 <= yyssp
)
1787 /* Get the current used size of the three stacks, in elements. */
1788 YYSIZE_T yysize
= yyssp
- yyss
+ 1;
1792 /* Give user a chance to reallocate the stack. Use copies of
1793 these so that the &'s don't force the real ones into
1795 YYSTYPE
*yyvs1
= yyvs
;
1796 short int *yyss1
= yyss
;
1797 YYLTYPE
*yyls1
= yyls
;
1799 /* Each stack pointer address is followed by the size of the
1800 data in use in that stack, in bytes. This used to be a
1801 conditional around just the two extra args, but that might
1802 be undefined if yyoverflow is a macro. */
1803 yyoverflow ("parser stack overflow",
1804 &yyss1
, yysize
* sizeof (*yyssp
),
1805 &yyvs1
, yysize
* sizeof (*yyvsp
),
1806 &yyls1
, yysize
* sizeof (*yylsp
),
1812 #else /* no yyoverflow */
1813 # ifndef YYSTACK_RELOCATE
1816 /* Extend the stack our own way. */
1817 if (YYMAXDEPTH
<= yystacksize
)
1820 if (YYMAXDEPTH
< yystacksize
)
1821 yystacksize
= YYMAXDEPTH
;
1824 short int *yyss1
= yyss
;
1825 union yyalloc
*yyptr
=
1826 (union yyalloc
*) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize
));
1829 YYSTACK_RELOCATE (yyss
);
1830 YYSTACK_RELOCATE (yyvs
);
1831 YYSTACK_RELOCATE (yyls
);
1832 # undef YYSTACK_RELOCATE
1834 YYSTACK_FREE (yyss1
);
1837 #endif /* no yyoverflow */
1839 yyssp
= yyss
+ yysize
- 1;
1840 yyvsp
= yyvs
+ yysize
- 1;
1841 yylsp
= yyls
+ yysize
- 1;
1843 YYDPRINTF ((stderr
, "Stack size increased to %lu\n",
1844 (unsigned long int) yystacksize
));
1846 if (yyss
+ yystacksize
- 1 <= yyssp
)
1850 YYDPRINTF ((stderr
, "Entering state %d\n", yystate
));
1859 /* Do appropriate processing given the current state. */
1860 /* Read a look-ahead token if we need one and don't already have one. */
1863 /* First try to decide what to do without reference to look-ahead token. */
1865 yyn
= yypact
[yystate
];
1866 if (yyn
== YYPACT_NINF
)
1869 /* Not known => get a look-ahead token if don't already have one. */
1871 /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */
1872 if (yychar
== YYEMPTY
)
1874 YYDPRINTF ((stderr
, "Reading a token: "));
1878 if (yychar
<= YYEOF
)
1880 yychar
= yytoken
= YYEOF
;
1881 YYDPRINTF ((stderr
, "Now at end of input.\n"));
1885 yytoken
= YYTRANSLATE (yychar
);
1886 YY_SYMBOL_PRINT ("Next token is", yytoken
, &yylval
, &yylloc
);
1889 /* If the proper action on seeing token YYTOKEN is to reduce or to
1890 detect an error, take that action. */
1892 if (yyn
< 0 || YYLAST
< yyn
|| yycheck
[yyn
] != yytoken
)
1897 if (yyn
== 0 || yyn
== YYTABLE_NINF
)
1906 /* Shift the look-ahead token. */
1907 YY_SYMBOL_PRINT ("Shifting", yytoken
, &yylval
, &yylloc
);
1909 /* Discard the token being shifted unless it is eof. */
1910 if (yychar
!= YYEOF
)
1916 /* Count tokens shifted since error; after three, turn off error
1925 /*-----------------------------------------------------------.
1926 | yydefault -- do the default action for the current state. |
1927 `-----------------------------------------------------------*/
1929 yyn
= yydefact
[yystate
];
1935 /*-----------------------------.
1936 | yyreduce -- Do a reduction. |
1937 `-----------------------------*/
1939 /* yyn is the number of a rule to reduce with. */
1942 /* If YYLEN is nonzero, implement the default value of the action:
1945 Otherwise, the following line sets YYVAL to garbage.
1946 This behavior is undocumented and Bison
1947 users should not rely upon it. Assigning to YYVAL
1948 unconditionally makes the parser a bit smaller, and it avoids a
1949 GCC warning that YYVAL may be used uninitialized. */
1950 yyval
= yyvsp
[1-yylen
];
1952 /* Default location. */
1953 YYLLOC_DEFAULT (yyloc
, yylsp
- yylen
, yylen
);
1954 YY_REDUCE_PRINT (yyn
);
1958 #line 123 "parser.y"
1959 { root_node
= astnode_create_list((yyvsp
[-1].node
)); }
1963 #line 127 "parser.y"
1968 #line 132 "parser.y"
1969 { (yyval
.node
) = (yyvsp
[0].node
); }
1973 #line 133 "parser.y"
1975 if ((yyvsp
[-1].node
) != NULL
) { (yyval
.node
) = (yyvsp
[-1].node
); astnode_add_sibling((yyval
.node
), (yyvsp
[0].node
)); }
1976 else { (yyval
.node
) = (yyvsp
[0].node
); }
1981 #line 140 "parser.y"
1982 { (yyval
.node
) = (yyvsp
[-1].node
); astnode_add_sibling((yyval
.node
), (yyvsp
[0].node
)); }
1986 #line 141 "parser.y"
1987 { (yyval
.node
) = (yyvsp
[0].node
); }
1991 #line 145 "parser.y"
1992 { (yyval
.node
) = (yyvsp
[0].node
); }
1996 #line 146 "parser.y"
1997 { (yyval
.node
) = (yyvsp
[0].node
); }
2001 #line 147 "parser.y"
2002 { (yyval
.node
) = (yyvsp
[0].node
); }
2006 #line 148 "parser.y"
2007 { (yyval
.node
) = (yyvsp
[0].node
); }
2011 #line 149 "parser.y"
2012 { (yyval
.node
) = (yyvsp
[0].node
); }
2016 #line 150 "parser.y"
2017 { (yyval
.node
) = (yyvsp
[0].node
); }
2021 #line 151 "parser.y"
2022 { (yyval
.node
) = (yyvsp
[0].node
); }
2026 #line 152 "parser.y"
2027 { (yyval
.node
) = (yyvsp
[0].node
); }
2031 #line 153 "parser.y"
2032 { (yyval
.node
) = (yyvsp
[0].node
); }
2036 #line 154 "parser.y"
2037 { (yyval
.node
) = (yyvsp
[0].node
); }
2041 #line 155 "parser.y"
2042 { (yyval
.node
) = (yyvsp
[0].node
); }
2046 #line 156 "parser.y"
2047 { (yyval
.node
) = (yyvsp
[0].node
); }
2051 #line 157 "parser.y"
2052 { (yyval
.node
) = (yyvsp
[0].node
); }
2056 #line 158 "parser.y"
2057 { (yyval
.node
) = (yyvsp
[0].node
); }
2061 #line 159 "parser.y"
2062 { (yyval
.node
) = (yyvsp
[0].node
); }
2066 #line 160 "parser.y"
2067 { (yyval
.node
) = (yyvsp
[0].node
); }
2071 #line 161 "parser.y"
2072 { (yyval
.node
) = (yyvsp
[0].node
); }
2076 #line 162 "parser.y"
2077 { (yyval
.node
) = (yyvsp
[0].node
); }
2081 #line 163 "parser.y"
2082 { (yyval
.node
) = (yyvsp
[0].node
); }
2086 #line 164 "parser.y"
2087 { (yyval
.node
) = (yyvsp
[0].node
); }
2091 #line 165 "parser.y"
2092 { (yyval
.node
) = (yyvsp
[0].node
); }
2096 #line 166 "parser.y"
2097 { (yyval
.node
) = (yyvsp
[0].node
); }
2101 #line 167 "parser.y"
2102 { (yyval
.node
) = (yyvsp
[0].node
); }
2106 #line 168 "parser.y"
2107 { (yyval
.node
) = (yyvsp
[0].node
); }
2111 #line 169 "parser.y"
2112 { (yyval
.node
) = (yyvsp
[0].node
); }
2116 #line 170 "parser.y"
2117 { (yyval
.node
) = (yyvsp
[0].node
); }
2121 #line 171 "parser.y"
2122 { (yyval
.node
) = (yyvsp
[0].node
); }
2126 #line 172 "parser.y"
2127 { (yyval
.node
) = (yyvsp
[0].node
); }
2131 #line 173 "parser.y"
2132 { (yyval
.node
) = (yyvsp
[0].node
); }
2136 #line 174 "parser.y"
2137 { (yyval
.node
) = (yyvsp
[0].node
); }
2141 #line 175 "parser.y"
2142 { (yyval
.node
) = (yyvsp
[0].node
); }
2146 #line 176 "parser.y"
2147 { (yyval
.node
) = (yyvsp
[0].node
); }
2151 #line 177 "parser.y"
2152 { (yyval
.node
) = NULL
; }
2156 #line 181 "parser.y"
2157 { (yyval
.node
) = astnode_create_org((yyvsp
[-1].node
), (yyloc
)); }
2161 #line 185 "parser.y"
2162 { (yyval
.node
) = astnode_create_align((yyvsp
[-2].node
), (yyvsp
[-1].node
), (yyloc
)); }
2166 #line 189 "parser.y"
2167 { (yyval
.node
) = astnode_create_warning((yyvsp
[-1].node
), (yyloc
)); }
2171 #line 193 "parser.y"
2172 { (yyval
.node
) = astnode_create_error((yyvsp
[-1].node
), (yyloc
)); }
2176 #line 197 "parser.y"
2177 { (yyval
.node
) = astnode_create_message((yyvsp
[-1].node
), (yyloc
)); }
2181 #line 201 "parser.y"
2182 { (yyval
.node
) = astnode_create_label((yyvsp
[-3].node
)->label
, (yyvsp
[-2].node
), (yyvsp
[-1].node
), (yyloc
)); astnode_finalize((yyvsp
[-3].node
)); }
2186 #line 205 "parser.y"
2187 { (yyval
.node
) = (yyvsp
[0].node
); }
2191 #line 206 "parser.y"
2192 { (yyval
.node
) = NULL
; }
2196 #line 210 "parser.y"
2197 { (yyval
.node
) = (yyvsp
[0].node
); }
2201 #line 211 "parser.y"
2202 { (yyval
.node
) = NULL
; }
2206 #line 215 "parser.y"
2207 { (yyval
.node
) = astnode_create_while((yyvsp
[-4].node
), (yyvsp
[-2].node
), (yyloc
)); }
2211 #line 219 "parser.y"
2212 { (yyval
.node
) = astnode_create_rept((yyvsp
[-4].node
), (yyvsp
[-2].node
), (yyloc
)); }
2216 #line 223 "parser.y"
2217 { (yyval
.node
) = astnode_create_proc((yyvsp
[-4].node
), (yyvsp
[-2].node
), (yyloc
)); }
2221 #line 227 "parser.y"
2222 { (yyval
.node
) = astnode_create_struc_decl((yyvsp
[-4].node
), (yyvsp
[-2].node
), (yyloc
)); }
2226 #line 231 "parser.y"
2227 { (yyval
.node
) = astnode_create_union_decl((yyvsp
[-4].node
), (yyvsp
[-2].node
), (yyloc
)); }
2231 #line 235 "parser.y"
2232 { (yyval
.node
) = astnode_create_enum_decl((yyvsp
[-4].node
), (yyvsp
[-2].node
), (yyloc
)); }
2236 #line 239 "parser.y"
2237 { (yyval
.node
) = (yyvsp
[0].node
); }
2241 #line 240 "parser.y"
2242 { (yyval
.node
) = (yyvsp
[-1].node
); astnode_add_sibling((yyval
.node
), (yyvsp
[0].node
)); }
2246 #line 244 "parser.y"
2247 { (yyval
.node
) = (yyvsp
[0].node
); }
2251 #line 245 "parser.y"
2252 { (yyval
.node
) = (yyvsp
[-1].node
); }
2256 #line 249 "parser.y"
2257 { (yyval
.node
) = astnode_create_record_decl((yyvsp
[-2].node
), (yyvsp
[-1].node
), (yyloc
)); }
2261 #line 253 "parser.y"
2262 { (yyval
.node
) = (yyvsp
[0].node
); }
2266 #line 254 "parser.y"
2267 { (yyval
.node
) = (yyvsp
[-2].node
); astnode_add_sibling((yyval
.node
), (yyvsp
[0].node
)); }
2271 #line 258 "parser.y"
2272 { (yyval
.node
) = astnode_create_bitfield_decl((yyvsp
[-2].node
), (yyvsp
[0].node
), (yyloc
)); }
2276 #line 262 "parser.y"
2277 { (yyval
.node
) = astnode_create_charmap((yyvsp
[-1].node
), (yyloc
)); }
2281 #line 266 "parser.y"
2282 { (yyval
.node
) = astnode_create_dataseg(0, (yyloc
)); }
2286 #line 267 "parser.y"
2287 { (yyval
.node
) = astnode_create_dataseg(ZEROPAGE_FLAG
, (yyloc
)); }
2291 #line 270 "parser.y"
2292 { (yyval
.node
) = astnode_create_codeseg((yyloc
)); }
2296 #line 274 "parser.y"
2297 { (yyval
.node
) = NULL
; }
2301 #line 278 "parser.y"
2302 { (yyval
.node
) = (yyvsp
[0].node
); }
2306 #line 282 "parser.y"
2311 #line 283 "parser.y"
2316 #line 287 "parser.y"
2321 #line 291 "parser.y"
2322 { (yyval
.node
) = (yyvsp
[-1].node
); }
2326 #line 295 "parser.y"
2327 { (yyval
.node
) = astnode_create_instruction((yyvsp
[0].mnemonic
), IMPLIED_MODE
, NULL
, (yyloc
)); }
2331 #line 296 "parser.y"
2332 { (yyval
.node
) = astnode_create_instruction((yyvsp
[-1].mnemonic
), ACCUMULATOR_MODE
, NULL
, (yyloc
)); }
2336 #line 297 "parser.y"
2337 { (yyval
.node
) = astnode_create_instruction((yyvsp
[-2].mnemonic
), IMMEDIATE_MODE
, (yyvsp
[0].node
), (yyloc
)); }
2341 #line 298 "parser.y"
2342 { (yyval
.node
) = astnode_create_instruction((yyvsp
[-1].mnemonic
), ABSOLUTE_MODE
, (yyvsp
[0].node
), (yyloc
)); }
2346 #line 299 "parser.y"
2347 { (yyval
.node
) = astnode_create_instruction((yyvsp
[-3].mnemonic
), ABSOLUTE_X_MODE
, (yyvsp
[-2].node
), (yyloc
)); }
2351 #line 300 "parser.y"
2352 { (yyval
.node
) = astnode_create_instruction((yyvsp
[-3].mnemonic
), ABSOLUTE_Y_MODE
, (yyvsp
[-2].node
), (yyloc
)); }
2356 #line 301 "parser.y"
2357 { (yyval
.node
) = astnode_create_instruction((yyvsp
[-5].mnemonic
), PREINDEXED_INDIRECT_MODE
, (yyvsp
[-3].node
), (yyloc
)); }
2361 #line 302 "parser.y"
2362 { (yyval
.node
) = astnode_create_instruction((yyvsp
[-5].mnemonic
), POSTINDEXED_INDIRECT_MODE
, (yyvsp
[-3].node
), (yyloc
)); }
2366 #line 303 "parser.y"
2367 { (yyval
.node
) = astnode_create_instruction((yyvsp
[-3].mnemonic
), INDIRECT_MODE
, (yyvsp
[-1].node
), (yyloc
)); }
2371 #line 307 "parser.y"
2372 { (yyval
.node
) = (yyvsp
[0].node
); }
2376 #line 308 "parser.y"
2377 { (yyval
.node
) = astnode_create_sizeof((yyvsp
[0].node
), (yyloc
)); }
2381 #line 309 "parser.y"
2382 { (yyval
.node
) = (yyvsp
[0].node
); }
2386 #line 310 "parser.y"
2387 { (yyval
.node
) = (yyvsp
[0].node
); }
2391 #line 311 "parser.y"
2392 { (yyval
.node
) = (yyvsp
[0].node
); }
2396 #line 312 "parser.y"
2397 { (yyval
.node
) = (yyvsp
[0].node
); }
2401 #line 313 "parser.y"
2402 { (yyval
.node
) = astnode_create_pc((yyloc
)); }
2406 #line 314 "parser.y"
2407 { (yyval
.node
) = (yyvsp
[0].node
); }
2411 #line 315 "parser.y"
2412 { (yyval
.node
) = (yyvsp
[0].node
); }
2416 #line 316 "parser.y"
2417 { (yyval
.node
) = (yyvsp
[-1].node
); }
2421 #line 317 "parser.y"
2422 { (yyval
.node
) = astnode_create_forward_branch("+", (yyloc
)); }
2426 #line 318 "parser.y"
2427 { (yyval
.node
) = astnode_create_backward_branch("-", (yyloc
)); }
2431 #line 319 "parser.y"
2432 { (yyval
.node
) = astnode_create_forward_branch((yyvsp
[0].ident
), (yyloc
)); }
2436 #line 320 "parser.y"
2437 { (yyval
.node
) = astnode_create_backward_branch((yyvsp
[0].ident
), (yyloc
)); }
2441 #line 321 "parser.y"
2442 { (yyval
.node
) = astnode_create_mask((yyvsp
[0].node
), (yyloc
)); }
2446 #line 325 "parser.y"
2447 { (yyval
.node
) = (yyvsp
[0].node
); }
2451 #line 326 "parser.y"
2452 { (yyval
.node
) = astnode_create_index((yyvsp
[-3].node
), (yyvsp
[-1].node
), (yyloc
)); }
2456 #line 327 "parser.y"
2457 { (yyval
.node
) = astnode_create_index((yyvsp
[-3].node
), (yyvsp
[-1].node
), (yyloc
)); }
2461 #line 331 "parser.y"
2462 { (yyval
.node
) = (yyvsp
[0].node
); }
2466 #line 332 "parser.y"
2467 { (yyval
.node
) = (yyvsp
[0].node
); }
2471 #line 336 "parser.y"
2472 { (yyval
.node
) = (yyvsp
[0].node
); }
2476 #line 337 "parser.y"
2477 { (yyval
.node
) = (yyvsp
[0].node
); }
2481 #line 341 "parser.y"
2482 { (yyval
.node
) = (yyvsp
[0].node
); }
2486 #line 342 "parser.y"
2487 { (yyval
.node
) = NULL
; }
2491 #line 346 "parser.y"
2492 { (yyval
.node
) = astnode_create_scope((yyvsp
[-2].node
), (yyvsp
[0].node
), (yyloc
)); }
2496 #line 350 "parser.y"
2497 { (yyval
.node
) = astnode_create_dot((yyvsp
[-2].node
), (yyvsp
[0].node
), (yyloc
)); }
2501 #line 351 "parser.y"
2502 { (yyval
.node
) = astnode_create_dot((yyvsp
[-2].node
), (yyvsp
[0].node
), (yyloc
)); }
2506 #line 355 "parser.y"
2507 { (yyval
.node
) = astnode_create_struc((yyvsp
[-1].node
), (yyloc
)); }
2511 #line 359 "parser.y"
2512 { (yyval
.node
) = (yyvsp
[0].node
); }
2516 #line 360 "parser.y"
2517 { (yyval
.node
) = NULL
; }
2521 #line 364 "parser.y"
2522 { (yyval
.node
) = (yyvsp
[0].node
); }
2526 #line 365 "parser.y"
2527 { (yyval
.node
) = (yyvsp
[-2].node
); astnode_add_sibling((yyval
.node
), (yyvsp
[0].node
)); }
2531 #line 369 "parser.y"
2532 { (yyval
.node
) = (yyvsp
[0].node
); }
2536 #line 370 "parser.y"
2537 { (yyval
.node
) = astnode_create_null((yyloc
)); }
2541 #line 374 "parser.y"
2542 { (yyval
.node
) = astnode_create_local_id((yyvsp
[0].ident
), (yyloc
)); }
2546 #line 378 "parser.y"
2547 { (yyval
.node
) = astnode_create_arithmetic(PLUS_OPERATOR
, (yyvsp
[-2].node
), (yyvsp
[0].node
), (yyloc
)); }
2551 #line 379 "parser.y"
2552 { (yyval
.node
) = astnode_create_arithmetic(MINUS_OPERATOR
, (yyvsp
[-2].node
), (yyvsp
[0].node
), (yyloc
)); }
2556 #line 380 "parser.y"
2557 { (yyval
.node
) = astnode_create_arithmetic(MUL_OPERATOR
, (yyvsp
[-2].node
), (yyvsp
[0].node
), (yyloc
)); }
2561 #line 381 "parser.y"
2562 { (yyval
.node
) = astnode_create_arithmetic(DIV_OPERATOR
, (yyvsp
[-2].node
), (yyvsp
[0].node
), (yyloc
)); }
2566 #line 382 "parser.y"
2567 { (yyval
.node
) = astnode_create_arithmetic(MOD_OPERATOR
, (yyvsp
[-2].node
), (yyvsp
[0].node
), (yyloc
)); }
2571 #line 383 "parser.y"
2572 { (yyval
.node
) = astnode_create_arithmetic(AND_OPERATOR
, (yyvsp
[-2].node
), (yyvsp
[0].node
), (yyloc
)); }
2576 #line 384 "parser.y"
2577 { (yyval
.node
) = astnode_create_arithmetic(OR_OPERATOR
, (yyvsp
[-2].node
), (yyvsp
[0].node
), (yyloc
)); }
2581 #line 385 "parser.y"
2582 { (yyval
.node
) = astnode_create_arithmetic(XOR_OPERATOR
, (yyvsp
[-2].node
), (yyvsp
[0].node
), (yyloc
)); }
2586 #line 386 "parser.y"
2587 { (yyval
.node
) = astnode_create_arithmetic(SHL_OPERATOR
, (yyvsp
[-2].node
), (yyvsp
[0].node
), (yyloc
)); }
2591 #line 387 "parser.y"
2592 { (yyval
.node
) = astnode_create_arithmetic(SHR_OPERATOR
, (yyvsp
[-2].node
), (yyvsp
[0].node
), (yyloc
)); }
2596 #line 388 "parser.y"
2597 { (yyval
.node
) = astnode_create_arithmetic(NEG_OPERATOR
, (yyvsp
[0].node
), NULL
, (yyloc
)); }
2601 #line 389 "parser.y"
2602 { (yyval
.node
) = astnode_create_arithmetic(NOT_OPERATOR
, (yyvsp
[0].node
), NULL
, (yyloc
)); }
2606 #line 390 "parser.y"
2607 { (yyval
.node
) = astnode_create_arithmetic(BANK_OPERATOR
, (yyvsp
[0].node
), NULL
, (yyloc
)); }
2611 #line 391 "parser.y"
2612 { (yyval
.node
) = astnode_create_arithmetic(LO_OPERATOR
, (yyvsp
[0].node
), NULL
, (yyloc
)); }
2616 #line 392 "parser.y"
2617 { (yyval
.node
) = astnode_create_arithmetic(HI_OPERATOR
, (yyvsp
[0].node
), NULL
, (yyloc
)); }
2621 #line 393 "parser.y"
2622 { (yyval
.node
) = astnode_create_arithmetic(UMINUS_OPERATOR
, (yyvsp
[0].node
), NULL
, (yyloc
)); }
2626 #line 397 "parser.y"
2627 { (yyval
.node
) = astnode_create_arithmetic(EQ_OPERATOR
, (yyvsp
[-2].node
), (yyvsp
[0].node
), (yyloc
)); }
2631 #line 398 "parser.y"
2632 { (yyval
.node
) = astnode_create_arithmetic(NE_OPERATOR
, (yyvsp
[-2].node
), (yyvsp
[0].node
), (yyloc
)); }
2636 #line 399 "parser.y"
2637 { (yyval
.node
) = astnode_create_arithmetic(GT_OPERATOR
, (yyvsp
[-2].node
), (yyvsp
[0].node
), (yyloc
)); }
2641 #line 400 "parser.y"
2642 { (yyval
.node
) = astnode_create_arithmetic(LT_OPERATOR
, (yyvsp
[-2].node
), (yyvsp
[0].node
), (yyloc
)); }
2646 #line 401 "parser.y"
2647 { (yyval
.node
) = astnode_create_arithmetic(GE_OPERATOR
, (yyvsp
[-2].node
), (yyvsp
[0].node
), (yyloc
)); }
2651 #line 402 "parser.y"
2652 { (yyval
.node
) = astnode_create_arithmetic(LE_OPERATOR
, (yyvsp
[-2].node
), (yyvsp
[0].node
), (yyloc
)); }
2656 #line 406 "parser.y"
2657 { (yyval
.node
) = astnode_create_label((yyvsp
[0].label
), NULL
, NULL
, (yyloc
)); }
2661 #line 407 "parser.y"
2662 { (yyval
.node
) = astnode_create_local_label((yyvsp
[0].label
), (yyloc
)); }
2666 #line 408 "parser.y"
2667 { (yyval
.node
) = astnode_create_forward_branch_decl("+", (yyloc
)); }
2671 #line 409 "parser.y"
2672 { (yyval
.node
) = astnode_create_backward_branch_decl("-", (yyloc
)); }
2676 #line 410 "parser.y"
2677 { (yyval
.node
) = astnode_create_forward_branch_decl((yyvsp
[0].ident
), (yyloc
)); }
2681 #line 411 "parser.y"
2682 { (yyval
.node
) = astnode_create_backward_branch_decl((yyvsp
[0].ident
), (yyloc
)); }
2686 #line 415 "parser.y"
2687 { (yyval
.node
) = astnode_create_identifier((yyvsp
[0].ident
), (yyloc
)); }
2691 #line 419 "parser.y"
2692 { (yyval
.node
) = (yyvsp
[0].node
); }
2696 #line 420 "parser.y"
2697 { (yyval
.node
) = astnode_create_null((yyloc
)); }
2701 #line 424 "parser.y"
2702 { (yyval
.node
) = astnode_create_integer((yyvsp
[0].integer
), (yyloc
)); }
2706 #line 425 "parser.y"
2707 { (yyval
.node
) = astnode_create_string((yyvsp
[0].string
), (yyloc
)); }
2711 #line 429 "parser.y"
2712 { (yyval
.node
) = astnode_create_if((yyvsp
[-6].node
), (yyvsp
[-4].node
), (yyvsp
[-3].node
), (yyvsp
[-2].node
), (yyloc
)); }
2716 #line 433 "parser.y"
2717 { (yyval
.node
) = (yyvsp
[0].node
); }
2721 #line 434 "parser.y"
2722 { (yyval
.node
) = NULL
; }
2726 #line 438 "parser.y"
2727 { (yyval
.node
) = (yyvsp
[0].node
); }
2731 #line 439 "parser.y"
2732 { (yyval
.node
) = (yyvsp
[-1].node
); astnode_add_sibling((yyval
.node
), (yyvsp
[0].node
)); }
2736 #line 443 "parser.y"
2737 { (yyval
.node
) = astnode_create_case((yyvsp
[-2].node
), (yyvsp
[0].node
), (yyloc
)); }
2741 #line 447 "parser.y"
2742 { (yyval
.node
) = (yyvsp
[0].node
); }
2746 #line 448 "parser.y"
2747 { (yyval
.node
) = NULL
; }
2751 #line 452 "parser.y"
2752 { (yyval
.node
) = astnode_create_ifdef((yyvsp
[-5].node
), (yyvsp
[-3].node
), (yyvsp
[-2].node
), (yyloc
)); }
2756 #line 456 "parser.y"
2757 { (yyval
.node
) = astnode_create_ifndef((yyvsp
[-5].node
), (yyvsp
[-3].node
), (yyvsp
[-2].node
), (yyloc
)); }
2761 #line 460 "parser.y"
2762 { (yyval
.node
) = (yyvsp
[-1].node
); }
2766 #line 461 "parser.y"
2767 { (yyval
.node
) = (yyvsp
[-1].node
); }
2771 #line 465 "parser.y"
2772 { (yyval
.node
) = astnode_create_var_decl(0, (yyvsp
[-1].node
), (yyvsp
[0].node
), (yyloc
)); }
2776 #line 466 "parser.y"
2777 { (yyval
.node
) = astnode_create_var_decl(ZEROPAGE_FLAG
, (yyvsp
[-1].node
), (yyvsp
[0].node
), (yyloc
)); }
2781 #line 467 "parser.y"
2782 { (yyval
.node
) = astnode_create_var_decl(PUBLIC_FLAG
, (yyvsp
[-1].node
), (yyvsp
[0].node
), (yyloc
)); }
2786 #line 468 "parser.y"
2787 { (yyval
.node
) = astnode_create_var_decl(ZEROPAGE_FLAG
| PUBLIC_FLAG
, (yyvsp
[-1].node
), (yyvsp
[0].node
), (yyloc
)); }
2791 #line 469 "parser.y"
2792 { (yyval
.node
) = astnode_create_var_decl(PUBLIC_FLAG
| ZEROPAGE_FLAG
, (yyvsp
[-1].node
), (yyvsp
[0].node
), (yyloc
)); }
2796 #line 473 "parser.y"
2797 { (yyval
.node
) = astnode_create_data((yyvsp
[-1].node
), (yyvsp
[0].node
), (yyloc
)); }
2801 #line 474 "parser.y"
2802 { (yyval
.node
) = astnode_create_storage((yyvsp
[0].node
), NULL
, (yyloc
)); }
2806 #line 475 "parser.y"
2807 { (yyval
.node
) = astnode_create_storage((yyvsp
[-3].node
), (yyvsp
[-1].node
), (yyloc
)); }
2811 #line 479 "parser.y"
2812 { (yyval
.node
) = astnode_create_datatype(BYTE_DATATYPE
, NULL
, (yyloc
)); }
2816 #line 480 "parser.y"
2817 { (yyval
.node
) = astnode_create_datatype(CHAR_DATATYPE
, NULL
, (yyloc
)); }
2821 #line 481 "parser.y"
2822 { (yyval
.node
) = astnode_create_datatype(WORD_DATATYPE
, NULL
, (yyloc
)); }
2826 #line 482 "parser.y"
2827 { (yyval
.node
) = astnode_create_datatype(DWORD_DATATYPE
, NULL
, (yyloc
)); }
2831 #line 483 "parser.y"
2832 { (yyval
.node
) = astnode_create_datatype(USER_DATATYPE
, (yyvsp
[0].node
), (yyloc
)); }
2836 #line 484 "parser.y"
2837 { (yyval
.node
) = astnode_create_datatype(USER_DATATYPE
, (yyvsp
[0].node
), (yyloc
)); }
2841 #line 488 "parser.y"
2842 { (yyval
.node
) = (yyvsp
[0].node
); }
2846 #line 489 "parser.y"
2847 { (yyval
.node
) = (yyvsp
[-2].node
); astnode_add_sibling((yyval
.node
), (yyvsp
[0].node
)); }
2851 #line 493 "parser.y"
2852 { (yyval
.node
) = astnode_create_incsrc((yyvsp
[-1].node
), (yyloc
)); handle_incsrc((yyval
.node
)); }
2856 #line 497 "parser.y"
2857 { (yyval
.node
) = astnode_create_incbin((yyvsp
[-1].node
), (yyloc
)); handle_incbin((yyval
.node
)); }
2861 #line 501 "parser.y"
2862 { (yyval
.node
) = astnode_create_string((yyvsp
[0].string
), (yyloc
)); }
2866 #line 502 "parser.y"
2867 { (yyval
.node
) = astnode_create_file_path(scan_include('>'), (yyloc
)); }
2871 #line 506 "parser.y"
2872 { (yyval
.node
) = astnode_create_macro_decl((yyvsp
[-5].node
), (yyvsp
[-4].node
), (yyvsp
[-2].node
), (yyloc
)); }
2876 #line 510 "parser.y"
2877 { (yyval
.node
) = (yyvsp
[0].node
); }
2881 #line 511 "parser.y"
2882 { (yyval
.node
) = NULL
; }
2886 #line 515 "parser.y"
2887 { (yyval
.node
) = astnode_create_macro((yyvsp
[-2].node
), (yyvsp
[-1].node
), (yyloc
)); }
2891 #line 519 "parser.y"
2892 { (yyval
.node
) = (yyvsp
[0].node
); }
2896 #line 520 "parser.y"
2897 { (yyval
.node
) = NULL
; }
2901 #line 524 "parser.y"
2902 { (yyval
.node
) = (yyvsp
[0].node
); }
2906 #line 525 "parser.y"
2907 { (yyval
.node
) = (yyvsp
[-2].node
); astnode_add_sibling((yyval
.node
), (yyvsp
[0].node
)); }
2911 #line 529 "parser.y"
2912 { (yyval
.node
) = astnode_create_equ((yyvsp
[-3].node
), (yyvsp
[-1].node
), (yyloc
)); }
2916 #line 533 "parser.y"
2917 { (yyval
.node
) = astnode_create_assign((yyvsp
[-3].node
), (yyvsp
[-1].node
), (yyloc
)); }
2921 #line 537 "parser.y"
2922 { (yyval
.node
) = astnode_create_equ((yyvsp
[-1].node
), astnode_create_integer(0, (yyloc
)), (yyloc
)); }
2926 #line 538 "parser.y"
2927 { (yyval
.node
) = astnode_create_equ((yyvsp
[-2].node
), (yyvsp
[-1].node
), (yyloc
)); }
2931 #line 542 "parser.y"
2932 { (yyval
.node
) = astnode_create_public((yyvsp
[-1].node
), (yyloc
)); }
2936 #line 546 "parser.y"
2937 { (yyval
.node
) = astnode_create_extrn((yyvsp
[-4].node
), (yyvsp
[-2].node
), (yyvsp
[-1].node
), (yyloc
)); }
2941 #line 550 "parser.y"
2942 { (yyval
.node
) = (yyvsp
[0].node
); }
2946 #line 551 "parser.y"
2947 { (yyval
.node
) = NULL
; }
2951 #line 555 "parser.y"
2952 { (yyval
.node
) = (yyvsp
[0].node
); }
2956 #line 556 "parser.y"
2957 { (yyval
.node
) = astnode_create_datatype(USER_DATATYPE
, (yyvsp
[0].node
), (yyloc
)); }
2961 #line 557 "parser.y"
2962 { (yyval
.node
) = astnode_create_integer(PROC_SYMBOL
, (yyloc
)); }
2966 #line 558 "parser.y"
2967 { (yyval
.node
) = astnode_create_integer(LABEL_SYMBOL
, (yyloc
)); }
2971 #line 562 "parser.y"
2972 { (yyval
.node
) = (yyvsp
[0].node
); }
2976 #line 563 "parser.y"
2977 { (yyval
.node
) = (yyvsp
[0].node
); }
2981 #line 567 "parser.y"
2982 { (yyval
.node
) = astnode_create_var_decl(0, (yyvsp
[-1].node
), (yyvsp
[0].node
), (yyloc
)); }
2986 #line 568 "parser.y"
2987 { (yyval
.node
) = astnode_create_var_decl(ZEROPAGE_FLAG
, (yyvsp
[-1].node
), (yyvsp
[0].node
), (yyloc
)); }
2991 #line 569 "parser.y"
2992 { (yyval
.node
) = astnode_create_var_decl(PUBLIC_FLAG
, (yyvsp
[-1].node
), (yyvsp
[0].node
), (yyloc
)); }
2996 #line 570 "parser.y"
2997 { (yyval
.node
) = astnode_create_var_decl(ZEROPAGE_FLAG
| PUBLIC_FLAG
, (yyvsp
[-1].node
), (yyvsp
[0].node
), (yyloc
)); }
3001 #line 571 "parser.y"
3002 { (yyval
.node
) = astnode_create_var_decl(PUBLIC_FLAG
| ZEROPAGE_FLAG
, (yyvsp
[-1].node
), (yyvsp
[0].node
), (yyloc
)); }
3006 #line 575 "parser.y"
3007 { (yyval
.node
) = astnode_create_storage((yyvsp
[-2].node
), (yyvsp
[-1].node
), (yyloc
)); }
3011 #line 579 "parser.y"
3012 { (yyval
.node
) = astnode_create_datatype(BYTE_DATATYPE
, NULL
, (yyloc
)); }
3016 #line 580 "parser.y"
3017 { (yyval
.node
) = astnode_create_datatype(WORD_DATATYPE
, NULL
, (yyloc
)); }
3021 #line 581 "parser.y"
3022 { (yyval
.node
) = astnode_create_datatype(DWORD_DATATYPE
, NULL
, (yyloc
)); }
3028 /* Line 1037 of yacc.c. */
3029 #line 3030 "parser.c"
3035 YY_STACK_PRINT (yyss
, yyssp
);
3040 /* Now `shift' the result of the reduction. Determine what state
3041 that goes to, based on the state we popped back to and the rule
3042 number reduced by. */
3046 yystate
= yypgoto
[yyn
- YYNTOKENS
] + *yyssp
;
3047 if (0 <= yystate
&& yystate
<= YYLAST
&& yycheck
[yystate
] == *yyssp
)
3048 yystate
= yytable
[yystate
];
3050 yystate
= yydefgoto
[yyn
- YYNTOKENS
];
3055 /*------------------------------------.
3056 | yyerrlab -- here on detecting error |
3057 `------------------------------------*/
3059 /* If not already recovering from an error, report this error. */
3064 yyn
= yypact
[yystate
];
3066 if (YYPACT_NINF
< yyn
&& yyn
< YYLAST
)
3068 YYSIZE_T yysize
= 0;
3069 int yytype
= YYTRANSLATE (yychar
);
3070 const char* yyprefix
;
3074 /* Start YYX at -YYN if negative to avoid negative indexes in
3076 int yyxbegin
= yyn
< 0 ? -yyn
: 0;
3078 /* Stay within bounds of both yycheck and yytname. */
3079 int yychecklim
= YYLAST
- yyn
;
3080 int yyxend
= yychecklim
< YYNTOKENS
? yychecklim
: YYNTOKENS
;
3083 yyprefix
= ", expecting ";
3084 for (yyx
= yyxbegin
; yyx
< yyxend
; ++yyx
)
3085 if (yycheck
[yyx
+ yyn
] == yyx
&& yyx
!= YYTERROR
)
3087 yysize
+= yystrlen (yyprefix
) + yystrlen (yytname
[yyx
]);
3095 yysize
+= (sizeof ("syntax error, unexpected ")
3096 + yystrlen (yytname
[yytype
]));
3097 yymsg
= (char *) YYSTACK_ALLOC (yysize
);
3100 char *yyp
= yystpcpy (yymsg
, "syntax error, unexpected ");
3101 yyp
= yystpcpy (yyp
, yytname
[yytype
]);
3105 yyprefix
= ", expecting ";
3106 for (yyx
= yyxbegin
; yyx
< yyxend
; ++yyx
)
3107 if (yycheck
[yyx
+ yyn
] == yyx
&& yyx
!= YYTERROR
)
3109 yyp
= yystpcpy (yyp
, yyprefix
);
3110 yyp
= yystpcpy (yyp
, yytname
[yyx
]);
3115 YYSTACK_FREE (yymsg
);
3118 yyerror ("syntax error; also virtual memory exhausted");
3121 #endif /* YYERROR_VERBOSE */
3122 yyerror ("syntax error");
3125 yyerror_range
[0] = yylloc
;
3127 if (yyerrstatus
== 3)
3129 /* If just tried and failed to reuse look-ahead token after an
3130 error, discard it. */
3132 if (yychar
<= YYEOF
)
3134 /* If at end of input, pop the error token,
3135 then the rest of the stack, then return failure. */
3136 if (yychar
== YYEOF
)
3139 yyerror_range
[0] = *yylsp
;
3143 yydestruct ("Error: popping",
3144 yystos
[*yyssp
], yyvsp
, yylsp
);
3149 yydestruct ("Error: discarding", yytoken
, &yylval
, &yylloc
);
3154 /* Else will try to reuse look-ahead token after shifting the error
3159 /*---------------------------------------------------.
3160 | yyerrorlab -- error raised explicitly by YYERROR. |
3161 `---------------------------------------------------*/
3165 /* Pacify GCC when the user code never invokes YYERROR and the label
3166 yyerrorlab therefore never appears in user code. */
3171 yyerror_range
[0] = yylsp
[1-yylen
];
3179 /*-------------------------------------------------------------.
3180 | yyerrlab1 -- common code for both syntax error and YYERROR. |
3181 `-------------------------------------------------------------*/
3183 yyerrstatus
= 3; /* Each real token shifted decrements this. */
3187 yyn
= yypact
[yystate
];
3188 if (yyn
!= YYPACT_NINF
)
3191 if (0 <= yyn
&& yyn
<= YYLAST
&& yycheck
[yyn
] == YYTERROR
)
3199 /* Pop the current state because it cannot handle the error token. */
3203 yyerror_range
[0] = *yylsp
;
3204 yydestruct ("Error: popping", yystos
[yystate
], yyvsp
, yylsp
);
3207 YY_STACK_PRINT (yyss
, yyssp
);
3215 yyerror_range
[1] = yylloc
;
3216 /* Using YYLLOC is tempting, but would change the location of
3217 the look-ahead. YYLOC is available though. */
3218 YYLLOC_DEFAULT (yyloc
, yyerror_range
- 1, 2);
3221 /* Shift the error token. */
3222 YY_SYMBOL_PRINT ("Shifting", yystos
[yyn
], yyvsp
, yylsp
);
3228 /*-------------------------------------.
3229 | yyacceptlab -- YYACCEPT comes here. |
3230 `-------------------------------------*/
3235 /*-----------------------------------.
3236 | yyabortlab -- YYABORT comes here. |
3237 `-----------------------------------*/
3239 yydestruct ("Error: discarding lookahead",
3240 yytoken
, &yylval
, &yylloc
);
3246 /*----------------------------------------------.
3247 | yyoverflowlab -- parser overflow comes here. |
3248 `----------------------------------------------*/
3250 yyerror ("parser stack overflow");
3258 YYSTACK_FREE (yyss
);
3264 #line 583 "parser.y"
3267 * Takes care of switching to a new scanner input stream when a "incsrc" statement
3268 * has been encountered.
3269 * The current stream is pushed on a stack, and will be popped when EOF is reached
3270 * in the new stream.
3271 * @param n A node of type INCSRC_NODE
3273 void handle_incsrc(astnode
*n
)
3276 /* Get the node which describes the file to include */
3277 astnode
*file
= astnode_get_child(n
, 0);
3278 int quoted_form
= (astnode_get_type(file
) == STRING_NODE
) ? 1 : 0;
3279 switch (yypushandrestart(file
->string
, quoted_form
)) {
3284 /* Failed to open file */
3285 sprintf(errs
, "could not open '%s' for reading", file
->string
);
3289 /* Stack overflow */
3290 yyerror("Maximum include nesting level reached");
3295 // TODO: This shouldn't be done here but rather in astproc module.
3297 FILE *open_included_file(const char *, int, char **);
3300 * Takes care of including the binary contents of the file specified by a parsed
3301 * "incbin" statement.
3302 * Calls yyerror() if the file can't be included for some reason.
3303 * @param n A node of type INCBIN_NODE
3305 void handle_incbin(astnode
*n
)
3308 unsigned char *data
;
3311 /* Get the node which describes the file to include */
3312 astnode
*file
= astnode_get_child(n
, 0);
3313 const char *filename
= file
->string
;
3314 int quoted_form
= (astnode_get_type(file
) == STRING_NODE
) ? 1 : 0;
3315 /* Try to open it */
3316 fp
= open_included_file(filename
, quoted_form
, NULL
);
3319 fseek(fp
, 0, SEEK_END
);
3323 /* Allocate buffer to hold file contents */
3324 data
= (unsigned char *)malloc(size
);
3325 /* Read file contents into buffer */
3326 fread(data
, 1, size
, fp
);
3327 /* Insert binary node */
3328 astnode_add_sibling(n
, astnode_create_binary(data
, size
, n
->loc
) );
3333 /* Couldn't open file */
3334 sprintf(errs
, "could not open '%s' for reading", file
->string
);