1 /* A Bison parser, made by GNU Bison 1.875. */
3 /* Skeleton parser for Yacc-like parsing with Bison,
4 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 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 191 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 214 of yacc.c. */
312 #if ! defined (yyoverflow) || YYERROR_VERBOSE
314 /* The parser invokes alloca or malloc; define the necessary symbols. */
316 # if YYSTACK_USE_ALLOCA
317 # define YYSTACK_ALLOC alloca
319 # ifndef YYSTACK_USE_ALLOCA
320 # if defined (alloca) || defined (_ALLOCA_H)
321 # define YYSTACK_ALLOC alloca
324 # define YYSTACK_ALLOC __builtin_alloca
330 # ifdef YYSTACK_ALLOC
331 /* Pacify GCC's `empty if-body' warning. */
332 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
334 # if defined (__STDC__) || defined (__cplusplus)
335 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
336 # define YYSIZE_T size_t
338 # define YYSTACK_ALLOC malloc
339 # define YYSTACK_FREE free
341 #endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */
344 #if (! defined (yyoverflow) \
345 && (! defined (__cplusplus) \
346 || (YYLTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
348 /* A type that is properly aligned for any stack member. */
356 /* The size of the maximum gap between one aligned stack and the next. */
357 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
359 /* The size of an array large to enough to hold all stacks, each with
361 # define YYSTACK_BYTES(N) \
362 ((N) * (sizeof (short) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
363 + 2 * YYSTACK_GAP_MAXIMUM)
365 /* Copy COUNT objects from FROM to TO. The source and destination do
369 # define YYCOPY(To, From, Count) \
370 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
372 # define YYCOPY(To, From, Count) \
375 register YYSIZE_T yyi; \
376 for (yyi = 0; yyi < (Count); yyi++) \
377 (To)[yyi] = (From)[yyi]; \
383 /* Relocate STACK from its old location to the new one. The
384 local variables YYSIZE and YYSTACKSIZE give the old and new number of
385 elements in the stack, and YYPTR gives the new location of the
386 stack. Advance YYPTR to a properly aligned location for the next
388 # define YYSTACK_RELOCATE(Stack) \
391 YYSIZE_T yynewbytes; \
392 YYCOPY (&yyptr->Stack, Stack, yysize); \
393 Stack = &yyptr->Stack; \
394 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
395 yyptr += yynewbytes / sizeof (*yyptr); \
401 #if defined (__STDC__) || defined (__cplusplus)
402 typedef signed char yysigned_char
;
404 typedef short yysigned_char
;
407 /* YYFINAL -- State number of the termination state. */
409 /* YYLAST -- Last index in YYTABLE. */
412 /* YYNTOKENS -- Number of terminals. */
414 /* YYNNTS -- Number of nonterminals. */
416 /* YYNRULES -- Number of rules. */
418 /* YYNRULES -- Number of states. */
419 #define YYNSTATES 380
421 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
423 #define YYMAXUTOK 322
425 #define YYTRANSLATE(YYX) \
426 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
428 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
429 static const unsigned char yytranslate
[] =
431 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
432 58, 2, 2, 2, 2, 2, 2, 2, 2, 2,
433 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
434 2, 2, 2, 93, 2, 73, 66, 92, 78, 2,
435 95, 96, 90, 87, 71, 88, 72, 91, 2, 2,
436 2, 2, 2, 2, 2, 2, 2, 2, 59, 2,
437 82, 65, 81, 2, 60, 62, 2, 2, 2, 2,
438 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
439 2, 2, 2, 2, 2, 2, 2, 2, 63, 64,
440 2, 69, 2, 70, 77, 2, 2, 2, 2, 2,
441 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
442 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
443 2, 2, 2, 67, 76, 68, 94, 2, 2, 2,
444 2, 2, 2, 2, 2, 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, 2, 2, 2, 2, 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, 1, 2, 3, 4,
457 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
458 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
459 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
460 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
461 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
462 55, 56, 57, 61, 74, 75, 79, 80, 83, 84,
467 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
469 static const unsigned short yyprhs
[] =
471 0, 0, 3, 6, 9, 10, 12, 15, 18, 20,
472 22, 24, 26, 28, 30, 32, 34, 36, 38, 40,
473 42, 44, 46, 48, 50, 52, 54, 56, 58, 60,
474 62, 64, 66, 68, 70, 72, 74, 76, 78, 80,
475 82, 84, 87, 91, 96, 100, 104, 108, 114, 117,
476 118, 121, 122, 129, 136, 143, 150, 157, 164, 166,
477 169, 171, 174, 179, 181, 185, 189, 193, 196, 200,
478 203, 205, 207, 209, 211, 213, 216, 218, 221, 225,
479 228, 233, 238, 245, 252, 257, 259, 262, 264, 266,
480 268, 270, 272, 274, 276, 280, 282, 284, 286, 288,
481 291, 293, 298, 303, 305, 307, 309, 311, 313, 314,
482 318, 322, 326, 330, 332, 333, 335, 339, 341, 342,
483 344, 348, 352, 356, 360, 364, 368, 372, 376, 380,
484 384, 387, 390, 393, 396, 399, 402, 406, 410, 414,
485 418, 422, 426, 428, 430, 432, 434, 436, 438, 440,
486 442, 443, 445, 447, 456, 458, 459, 461, 464, 469,
487 473, 474, 482, 490, 493, 496, 499, 503, 507, 512,
488 517, 520, 522, 527, 529, 531, 533, 535, 538, 541,
489 543, 547, 551, 555, 557, 559, 567, 569, 570, 574,
490 576, 577, 579, 583, 588, 593, 597, 602, 606, 613,
491 616, 617, 619, 621, 623, 625, 627, 629, 632, 636,
492 640, 645, 650, 654, 656, 658
495 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
496 static const short yyrhs
[] =
498 98, 0, -1, 100, 99, -1, 38, 127, -1, -1,
499 101, -1, 100, 101, -1, 126, 102, -1, 102, -1,
500 149, -1, 154, -1, 155, -1, 164, -1, 166, -1,
501 161, -1, 162, -1, 169, -1, 170, -1, 172, -1,
502 173, -1, 129, -1, 156, -1, 176, -1, 123, -1,
503 124, -1, 122, -1, 114, -1, 115, -1, 116, -1,
504 119, -1, 113, -1, 112, -1, 111, -1, 108, -1,
505 107, -1, 105, -1, 106, -1, 171, -1, 104, -1,
506 103, -1, 125, -1, 1, 127, -1, 57, 131, 127,
507 -1, 35, 168, 131, 127, -1, 54, 131, 127, -1,
508 55, 131, 127, -1, 53, 131, 127, -1, 13, 146,
509 109, 110, 127, -1, 65, 131, -1, -1, 59, 175,
510 -1, -1, 33, 131, 127, 100, 34, 127, -1, 32,
511 131, 127, 100, 34, 127, -1, 48, 146, 127, 100,
512 49, 127, -1, 42, 146, 127, 100, 44, 127, -1,
513 43, 147, 127, 100, 44, 127, -1, 46, 146, 127,
514 117, 47, 127, -1, 118, -1, 117, 118, -1, 170,
515 -1, 146, 127, -1, 45, 146, 120, 127, -1, 121,
516 -1, 120, 71, 121, -1, 146, 59, 131, -1, 41,
517 163, 127, -1, 21, 127, -1, 21, 56, 127, -1,
518 22, 127, -1, 127, -1, 145, -1, 128, -1, 59,
519 -1, 58, -1, 130, 127, -1, 12, -1, 12, 62,
520 -1, 12, 73, 131, -1, 12, 131, -1, 12, 131,
521 71, 63, -1, 12, 131, 71, 64, -1, 12, 69,
522 131, 71, 63, 70, -1, 12, 69, 131, 70, 71,
523 64, -1, 12, 69, 131, 70, -1, 132, -1, 50,
524 134, -1, 136, -1, 137, -1, 142, -1, 148, -1,
525 66, -1, 143, -1, 144, -1, 95, 131, 96, -1,
526 87, -1, 88, -1, 8, -1, 9, -1, 51, 136,
527 -1, 146, -1, 146, 69, 131, 70, -1, 146, 95,
528 131, 96, -1, 131, -1, 138, -1, 146, -1, 159,
529 -1, 131, -1, -1, 146, 61, 146, -1, 132, 72,
530 137, -1, 132, 72, 132, -1, 67, 139, 68, -1,
531 140, -1, -1, 141, -1, 140, 71, 141, -1, 133,
532 -1, -1, 7, -1, 131, 87, 131, -1, 131, 88,
533 131, -1, 131, 90, 131, -1, 131, 91, 131, -1,
534 131, 92, 131, -1, 131, 78, 131, -1, 131, 76,
535 131, -1, 131, 77, 131, -1, 131, 86, 131, -1,
536 131, 85, 131, -1, 94, 131, -1, 93, 131, -1,
537 77, 146, -1, 82, 131, -1, 81, 131, -1, 88,
538 131, -1, 131, 80, 131, -1, 131, 79, 131, -1,
539 131, 81, 131, -1, 131, 82, 131, -1, 131, 83,
540 131, -1, 131, 84, 131, -1, 10, -1, 11, -1,
541 87, -1, 88, -1, 8, -1, 9, -1, 6, -1,
542 146, -1, -1, 3, -1, 4, -1, 23, 131, 127,
543 100, 150, 153, 28, 127, -1, 151, -1, -1, 152,
544 -1, 151, 152, -1, 27, 131, 127, 100, -1, 26,
545 127, 100, -1, -1, 24, 146, 127, 100, 153, 28,
546 127, -1, 25, 146, 127, 100, 153, 28, 127, -1,
547 157, 127, -1, 158, 127, -1, 146, 158, -1, 56,
548 146, 158, -1, 39, 146, 158, -1, 56, 39, 146,
549 158, -1, 39, 56, 146, 158, -1, 159, 160, -1,
550 159, -1, 159, 69, 131, 70, -1, 14, -1, 15,
551 -1, 16, -1, 17, -1, 52, 146, -1, 72, 146,
552 -1, 133, -1, 160, 71, 133, -1, 29, 163, 127,
553 -1, 30, 163, 127, -1, 4, -1, 82, -1, 31,
554 146, 165, 127, 100, 34, 127, -1, 168, -1, -1,
555 146, 167, 127, -1, 160, -1, -1, 146, -1, 168,
556 71, 146, -1, 146, 36, 133, 127, -1, 146, 65,
557 133, 127, -1, 37, 146, 127, -1, 37, 146, 133,
558 127, -1, 39, 168, 127, -1, 40, 168, 59, 175,
559 174, 127, -1, 60, 146, -1, -1, 159, -1, 146,
560 -1, 48, -1, 13, -1, 177, -1, 178, -1, 146,
561 178, -1, 56, 146, 178, -1, 39, 146, 178, -1,
562 56, 39, 146, 178, -1, 39, 56, 146, 178, -1,
563 179, 135, 127, -1, 18, -1, 19, -1, 20, -1
566 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
567 static const unsigned short yyrline
[] =
569 0, 123, 123, 127, 128, 132, 133, 140, 141, 145,
570 146, 147, 148, 149, 150, 151, 152, 153, 154, 155,
571 156, 157, 158, 159, 160, 161, 162, 163, 164, 165,
572 166, 167, 168, 169, 170, 171, 172, 173, 174, 175,
573 176, 177, 181, 185, 189, 193, 197, 201, 205, 206,
574 210, 211, 215, 219, 223, 227, 231, 235, 239, 240,
575 244, 245, 249, 253, 254, 258, 262, 266, 267, 270,
576 274, 278, 282, 283, 287, 291, 295, 296, 297, 298,
577 299, 300, 301, 302, 303, 307, 308, 309, 310, 311,
578 312, 313, 314, 315, 316, 317, 318, 319, 320, 321,
579 325, 326, 327, 331, 332, 336, 337, 341, 342, 346,
580 350, 351, 355, 359, 360, 364, 365, 369, 370, 374,
581 378, 379, 380, 381, 382, 383, 384, 385, 386, 387,
582 388, 389, 390, 391, 392, 393, 397, 398, 399, 400,
583 401, 402, 406, 407, 408, 409, 410, 411, 415, 419,
584 420, 424, 425, 429, 433, 434, 438, 439, 443, 447,
585 448, 452, 456, 460, 461, 465, 466, 467, 468, 469,
586 473, 474, 475, 479, 480, 481, 482, 483, 484, 488,
587 489, 493, 497, 501, 502, 506, 510, 511, 515, 519,
588 520, 524, 525, 529, 533, 537, 538, 542, 546, 550,
589 551, 555, 556, 557, 558, 562, 563, 567, 568, 569,
590 570, 571, 575, 579, 580, 581
594 #if YYDEBUG || YYERROR_VERBOSE
595 /* YYTNME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
596 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
597 static const char *const yytname
[] =
599 "$end", "error", "$undefined", "INTEGER_LITERAL", "STRING_LITERAL",
600 "FILE_PATH", "IDENTIFIER", "LOCAL_ID", "FORWARD_BRANCH",
601 "BACKWARD_BRANCH", "LABEL", "LOCAL_LABEL", "MNEMONIC", "_LABEL_",
602 "BYTE", "CHAR", "WORD", "DWORD", "DSB", "DSW", "DSD", "DATASEG",
603 "CODESEG", "IF", "IFDEF", "IFNDEF", "ELSE", "ELIF", "ENDIF", "INCSRC",
604 "INCBIN", "MACRO", "REPT", "WHILE", "ENDM", "ALIGN", "EQU", "DEFINE",
605 "END", "PUBLIC", "EXTRN", "CHARMAP", "STRUC", "UNION", "ENDS", "RECORD",
606 "ENUM", "ENDE", "PROC", "ENDP", "SIZEOF", "MASK", "TAG", "MESSAGE",
607 "WARNING", "ERROR", "ZEROPAGE", "ORG", "'\\n'", "':'", "'@'",
608 "SCOPE_OP", "'A'", "'X'", "'Y'", "'='", "'$'", "'{'", "'}'", "'['",
609 "']'", "','", "'.'", "'#'", "HI_OP", "LO_OP", "'|'", "'^'", "'&'",
610 "NE_OP", "EQ_OP", "'>'", "'<'", "GE_OP", "LE_OP", "SHR_OP", "SHL_OP",
611 "'+'", "'-'", "UMINUS", "'*'", "'/'", "'%'", "'!'", "'~'", "'('", "')'",
612 "$accept", "assembly_unit", "end_opt", "statement_list",
613 "labelable_statement", "statement", "org_statement", "align_statement",
614 "warning_statement", "error_statement", "message_statement",
615 "label_statement", "label_addr_part_opt", "label_type_part_opt",
616 "while_statement", "rept_statement", "proc_statement",
617 "struc_decl_statement", "union_decl_statement", "enum_decl_statement",
618 "enum_item_list", "enum_item", "record_decl_statement",
619 "record_field_list", "record_field", "charmap_statement",
620 "dataseg_statement", "codeseg_statement", "null_statement",
621 "label_decl", "line_tail", "newline", "instruction_statement",
622 "instruction", "expression", "indexed_identifier",
623 "extended_expression", "sizeof_arg", "expression_opt", "scope_access",
624 "struc_access", "struc_initializer", "field_initializer_list_opt",
625 "field_initializer_list", "field_initializer", "local_id",
626 "arithmetic_expression", "comparison_expression", "label", "identifier",
627 "identifier_opt", "literal", "if_statement", "elif_statement_list_opt",
628 "elif_statement_list", "elif_statement", "else_part_opt",
629 "ifdef_statement", "ifndef_statement", "data_statement",
630 "named_data_statement", "unnamed_data_statement", "datatype",
631 "expression_list", "incsrc_statement", "incbin_statement",
632 "file_specifier", "macro_decl_statement", "param_list_opt",
633 "macro_statement", "arg_list_opt", "identifier_list", "equ_statement",
634 "assign_statement", "define_statement", "public_statement",
635 "extrn_statement", "from_part_opt", "symbol_type", "storage_statement",
636 "named_storage_statement", "unnamed_storage_statement", "storage", 0
641 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
643 static const unsigned short yytoknum
[] =
645 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
646 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
647 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
648 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
649 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
650 305, 306, 307, 308, 309, 310, 311, 312, 10, 58,
651 64, 313, 65, 88, 89, 61, 36, 123, 125, 91,
652 93, 44, 46, 35, 314, 315, 124, 94, 38, 316,
653 317, 62, 60, 318, 319, 320, 321, 43, 45, 322,
654 42, 47, 37, 33, 126, 40, 41
658 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
659 static const unsigned char yyr1
[] =
661 0, 97, 98, 99, 99, 100, 100, 101, 101, 102,
662 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
663 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
664 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
665 102, 102, 103, 104, 105, 106, 107, 108, 109, 109,
666 110, 110, 111, 112, 113, 114, 115, 116, 117, 117,
667 118, 118, 119, 120, 120, 121, 122, 123, 123, 124,
668 125, 126, 127, 127, 128, 129, 130, 130, 130, 130,
669 130, 130, 130, 130, 130, 131, 131, 131, 131, 131,
670 131, 131, 131, 131, 131, 131, 131, 131, 131, 131,
671 132, 132, 132, 133, 133, 134, 134, 135, 135, 136,
672 137, 137, 138, 139, 139, 140, 140, 141, 141, 142,
673 143, 143, 143, 143, 143, 143, 143, 143, 143, 143,
674 143, 143, 143, 143, 143, 143, 144, 144, 144, 144,
675 144, 144, 145, 145, 145, 145, 145, 145, 146, 147,
676 147, 148, 148, 149, 150, 150, 151, 151, 152, 153,
677 153, 154, 155, 156, 156, 157, 157, 157, 157, 157,
678 158, 158, 158, 159, 159, 159, 159, 159, 159, 160,
679 160, 161, 162, 163, 163, 164, 165, 165, 166, 167,
680 167, 168, 168, 169, 170, 171, 171, 172, 173, 174,
681 174, 175, 175, 175, 175, 176, 176, 177, 177, 177,
682 177, 177, 178, 179, 179, 179
685 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
686 static const unsigned char yyr2
[] =
688 0, 2, 2, 2, 0, 1, 2, 2, 1, 1,
689 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
690 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
691 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
692 1, 2, 3, 4, 3, 3, 3, 5, 2, 0,
693 2, 0, 6, 6, 6, 6, 6, 6, 1, 2,
694 1, 2, 4, 1, 3, 3, 3, 2, 3, 2,
695 1, 1, 1, 1, 1, 2, 1, 2, 3, 2,
696 4, 4, 6, 6, 4, 1, 2, 1, 1, 1,
697 1, 1, 1, 1, 3, 1, 1, 1, 1, 2,
698 1, 4, 4, 1, 1, 1, 1, 1, 0, 3,
699 3, 3, 3, 1, 0, 1, 3, 1, 0, 1,
700 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
701 2, 2, 2, 2, 2, 2, 3, 3, 3, 3,
702 3, 3, 1, 1, 1, 1, 1, 1, 1, 1,
703 0, 1, 1, 8, 1, 0, 1, 2, 4, 3,
704 0, 7, 7, 2, 2, 2, 3, 3, 4, 4,
705 2, 1, 4, 1, 1, 1, 1, 2, 2, 1,
706 3, 3, 3, 1, 1, 7, 1, 0, 3, 1,
707 0, 1, 3, 4, 4, 3, 4, 3, 6, 2,
708 0, 1, 1, 1, 1, 1, 1, 2, 3, 3,
712 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
713 STATE-NUM when YYTABLE doesn't specify something else to do. Zero
714 means the default is an error. */
715 static const unsigned char yydefact
[] =
717 0, 0, 148, 146, 147, 142, 143, 76, 0, 173,
718 174, 175, 176, 213, 214, 215, 0, 0, 0, 0,
719 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
720 0, 0, 150, 0, 0, 0, 0, 0, 0, 0,
721 0, 0, 74, 73, 0, 144, 145, 0, 0, 5,
722 8, 39, 38, 35, 36, 34, 33, 32, 31, 30,
723 26, 27, 28, 29, 25, 23, 24, 40, 0, 70,
724 72, 20, 0, 71, 190, 9, 10, 11, 21, 0,
725 0, 171, 14, 15, 12, 13, 16, 17, 37, 18,
726 19, 22, 205, 206, 108, 41, 151, 152, 119, 97,
727 98, 0, 0, 77, 91, 0, 0, 0, 0, 0,
728 95, 96, 0, 0, 0, 79, 85, 87, 88, 89,
729 92, 93, 100, 90, 49, 0, 67, 69, 0, 0,
730 0, 183, 184, 0, 0, 187, 0, 0, 191, 0,
731 0, 0, 191, 0, 0, 0, 0, 149, 0, 0,
732 0, 0, 177, 0, 0, 0, 0, 0, 0, 178,
733 1, 0, 2, 6, 7, 75, 0, 0, 114, 103,
734 179, 104, 165, 189, 0, 207, 163, 164, 0, 170,
735 107, 0, 86, 105, 106, 99, 0, 0, 78, 132,
736 134, 133, 135, 131, 130, 0, 0, 0, 0, 0,
737 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
738 0, 0, 0, 0, 0, 0, 0, 0, 51, 68,
739 0, 0, 0, 181, 182, 0, 186, 0, 0, 0,
740 0, 195, 0, 0, 167, 209, 197, 0, 66, 0,
741 0, 0, 63, 0, 0, 0, 46, 44, 45, 0,
742 166, 208, 42, 3, 0, 0, 117, 0, 113, 115,
743 0, 188, 0, 212, 84, 0, 94, 80, 81, 126,
744 127, 125, 137, 136, 138, 139, 140, 141, 129, 128,
745 120, 121, 122, 123, 124, 111, 110, 100, 109, 0,
746 0, 48, 0, 0, 0, 0, 0, 0, 0, 0,
747 192, 43, 196, 169, 211, 204, 203, 202, 201, 200,
748 0, 0, 0, 62, 0, 0, 58, 0, 60, 0,
749 168, 210, 193, 194, 112, 118, 180, 172, 0, 0,
750 101, 102, 50, 47, 0, 160, 154, 156, 0, 0,
751 0, 0, 0, 0, 0, 0, 0, 0, 64, 65,
752 0, 59, 61, 0, 116, 83, 82, 0, 0, 157,
753 0, 0, 0, 0, 53, 52, 199, 198, 55, 56,
754 57, 54, 0, 0, 0, 161, 162, 185, 0, 153
757 /* YYDEFGOTO[NTERM-NUM]. */
758 static const short yydefgoto
[] =
760 -1, 47, 162, 48, 49, 50, 51, 52, 53, 54,
761 55, 56, 218, 293, 57, 58, 59, 60, 61, 62,
762 315, 316, 63, 241, 242, 64, 65, 66, 67, 68,
763 69, 70, 71, 72, 169, 116, 170, 182, 181, 117,
764 118, 171, 257, 258, 259, 119, 120, 121, 73, 122,
765 148, 123, 75, 335, 336, 337, 339, 76, 77, 78,
766 79, 80, 81, 173, 82, 83, 133, 84, 225, 85,
767 174, 139, 86, 87, 88, 89, 90, 345, 309, 91,
771 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
773 #define YYPACT_NINF -287
774 static const short yypact
[] =
776 1808, -37, -287, -287, -287, -287, -287, 410, 19, -287,
777 -287, -287, -287, -287, -287, -287, 38, -37, 805, 19,
778 19, 5, 5, 19, 805, 805, 19, 19, 7, 19,
779 5, 19, 19, 19, 19, 19, 19, 805, 805, 805,
780 6, 805, -287, -287, 19, -287, -287, 46, 895, -287,
781 -287, -287, -287, -287, -287, -287, -287, -287, -287, -287,
782 -287, -287, -287, -287, -287, -287, -287, -287, 1869, -287,
783 -287, -287, -37, -287, 547, -287, -287, -287, -287, -37,
784 -37, 651, -287, -287, -287, -287, -287, -287, -287, -287,
785 -287, -287, -287, -287, 805, -287, -287, -287, -287, -287,
786 -287, 37, 19, -287, -287, 805, 805, 19, 805, 805,
787 -287, 53, 805, 805, 805, 1903, -14, -287, -287, -287,
788 -287, -287, 13, -287, -18, -37, -287, -287, 435, -37,
789 -37, -287, -287, -37, -37, 19, 435, 435, -287, 703,
790 586, 19, 268, 12, -29, -37, -37, -287, -37, 19,
791 -37, -37, -287, 435, 435, 435, 19, 268, 435, -287,
792 -287, -37, -287, -287, -287, -287, 796, 796, 684, 494,
793 -287, -287, -287, -7, -37, -287, -287, -287, 805, -7,
794 494, -37, -287, -287, -287, -287, 11, 745, 494, -287,
795 494, 494, 34, -287, -287, 1920, -46, 805, 805, 805,
796 805, 805, 805, 805, 805, 805, 805, 805, 805, 805,
797 805, 805, 805, 19, 19, 805, 805, 805, 16, -287,
798 1808, 1808, 1808, -287, -287, -37, -4, 1808, 1808, 19,
799 435, -287, -37, 268, -287, -287, -287, 153, -287, 1808,
800 1808, 20, -287, 17, 19, 1808, -287, -287, -287, 268,
801 -287, -287, -287, -287, -37, -37, -287, 22, 9, -287,
802 796, -287, 1866, -287, 10, 30, -287, -287, -287, 244,
803 878, 961, 298, 298, 174, 174, 174, 174, 24, 24,
804 34, 34, -287, -287, -287, -14, -287, -54, -287, 1885,
805 1941, 494, 153, -37, 978, 1144, 1144, 1808, 1227, 1310,
806 -287, -287, -287, -287, -287, -287, -287, -287, -287, 35,
807 1393, 1476, 19, -287, 805, 8, -287, 27, -287, 1559,
808 -287, -287, -287, -287, -287, 796, -287, -287, 56, 43,
809 -287, -287, -287, -287, 805, 96, 100, -287, -37, 102,
810 104, 1642, -37, -37, 19, -37, -37, -37, -287, 494,
811 -37, -287, -287, -37, -287, -287, -287, 435, 105, -287,
812 1808, -37, -37, -37, -287, -287, -287, -287, -287, -287,
813 -287, -287, 1808, -37, 1725, -287, -287, -287, 1061, -287
816 /* YYPGOTO[NTERM-NUM]. */
817 static const short yypgoto
[] =
819 -287, -287, -287, -122, -41, 66, -287, -287, -287, -287,
820 -287, -287, -287, -287, -287, -287, -287, -287, -287, -287,
821 -287, -179, -287, -287, -175, -287, -287, -287, -287, -287,
822 49, -287, -287, -287, 332, -74, -129, -287, -287, 40,
823 -70, -287, -287, -287, -185, -287, -287, -287, -287, 0,
824 -287, -287, -287, -287, -287, -192, -286, -287, -287, -287,
825 -287, -73, -99, 64, -287, -287, -6, -287, -287, -287,
826 -287, -25, -287, -238, -287, -287, -287, -287, -142, -287,
830 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
831 positive, shift that token. If negative, reduce the rule which
832 number is the opposite. If zero, do what YYDEFACT says.
833 If YYTABLE_NINF, syntax error. */
834 #define YYTABLE_NINF -161
835 static const short yytable
[] =
837 74, 172, 184, 143, 144, 175, 318, 163, 124, 131,
838 340, 232, 2, 2, 2, 215, 134, 267, 268, 129,
839 130, 42, 43, 135, 145, 2, 138, 140, 142, 138,
840 237, 146, 147, 149, 150, 151, 152, 254, 255, 256,
841 157, 216, 229, 2, 159, 156, 160, 217, 74, 358,
842 95, 9, 10, 11, 12, 350, 96, 97, 213, 2,
843 98, 99, 100, 141, 260, 126, 127, 229, 74, 234,
844 42, 43, 214, 235, 214, 292, 314, 318, 42, 43,
845 325, 328, 215, 229, 250, 42, 43, 132, 251, 36,
846 324, 312, 167, 329, 125, 344, 42, 43, 294, 295,
847 296, 183, 186, 101, 102, 298, 299, 189, 216, 44,
848 226, 208, 209, 356, 210, 211, 212, 310, 311, 104,
849 355, 165, 338, 319, 210, 211, 212, 334, 176, 177,
850 361, 326, 362, 373, 164, 138, 351, 348, 308, 285,
851 354, 233, 185, 286, 359, 179, 112, 113, 114, 243,
852 332, 0, 0, 0, 0, 0, 249, 0, 0, 2,
853 303, 0, 0, 0, 304, 0, 305, 9, 10, 11,
854 12, 0, 0, 0, 219, 341, 320, 220, 221, 222,
855 321, 0, 223, 224, 0, 227, 228, 0, 0, 231,
856 0, 0, 236, 308, 238, 239, 256, 240, 0, 244,
857 245, 306, 246, 247, 248, 36, 0, 252, 0, 0,
858 253, 0, 0, 287, 288, 0, 0, 0, 0, 0,
859 74, 74, 74, 261, 0, 44, 0, 74, 74, 300,
860 263, 0, 0, 0, 0, 0, 0, 307, 374, 74,
861 74, 0, 0, 0, 317, 74, 0, 0, 0, 0,
862 378, 0, 0, 163, 163, 163, 0, 163, 163, 206,
863 207, 208, 209, 0, 210, 211, 212, 0, 0, 163,
864 163, 0, 0, 0, 297, 0, 0, 0, 163, 301,
865 0, 302, 9, 10, 11, 12, 13, 14, 15, 0,
866 313, 0, 307, 0, 74, 74, 74, 74, 74, 74,
867 163, 0, 0, 322, 323, 0, 0, 0, 0, 0,
868 74, 74, 243, 0, 0, 317, 0, 0, 0, 74,
869 36, 198, 199, 200, 201, 202, 203, 204, 205, 206,
870 207, 208, 209, 163, 210, 211, 212, 163, 0, 115,
871 44, 74, 333, 0, 366, 0, 0, 0, 0, 0,
872 128, 0, 0, 0, 0, 0, 136, 137, 0, 0,
873 74, 0, 0, 0, 0, 0, 352, 0, 0, 153,
874 154, 155, 74, 158, 74, 0, 0, 0, 74, 202,
875 203, 204, 205, 206, 207, 208, 209, 360, 210, 211,
876 212, 364, 365, 0, 367, 368, 369, 0, 0, 370,
877 0, 0, 371, 0, 0, 0, 372, 0, 0, 0,
878 375, 376, 377, 96, 97, 0, 2, 98, 99, 100,
879 0, 0, 379, 0, 0, 0, 180, 0, 0, 0,
880 0, 0, 0, 0, 0, 0, 0, 187, 188, 0,
881 190, 191, 0, 192, 193, 194, 195, 0, 0, 0,
882 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
883 101, 102, 0, 0, 0, 0, 0, 0, 0, 0,
884 0, 230, 103, 0, 0, 0, 104, 0, 0, 105,
885 0, 0, 0, 106, 0, 0, 0, 107, 0, 0,
886 0, 108, 109, 42, 43, 0, 0, 110, 111, 0,
887 0, 0, 0, 112, 113, 114, 0, 0, 0, 0,
888 262, 197, 198, 199, 200, 201, 202, 203, 204, 205,
889 206, 207, 208, 209, 0, 210, 211, 212, 0, 269,
890 270, 271, 272, 273, 274, 275, 276, 277, 278, 279,
891 280, 281, 282, 283, 284, 0, 0, 289, 290, 291,
892 96, 97, 0, 2, 98, 99, 100, 0, 0, 0,
893 0, 9, 10, 11, 12, 13, 14, 15, 0, 0,
894 197, 198, 199, 200, 201, 202, 203, 204, 205, 206,
895 207, 208, 209, 166, 210, 211, 212, 0, 0, 96,
896 97, 0, 2, 98, 99, 100, 0, 101, 102, 36,
897 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
898 0, 0, 167, 104, 168, 0, 0, 0, 0, 44,
899 0, 0, 0, 0, 107, 0, 0, 0, 108, 109,
900 0, 0, 0, 0, 110, 111, 101, 102, 0, 0,
901 112, 113, 114, 0, 42, 43, 349, 0, 0, 0,
902 0, 0, 104, 168, 96, 97, 0, 2, 98, 99,
903 100, 0, 0, 107, 0, 0, 357, 108, 109, 0,
904 0, 0, 0, 110, 111, 0, 0, 0, 0, 112,
905 113, 114, 0, 0, 0, 0, 0, 96, 97, 0,
906 2, 98, 99, 100, 0, 0, 0, 0, 0, 0,
907 0, 101, 102, 0, 0, 0, 96, 97, 0, 2,
908 98, 99, 100, 0, 0, 0, 0, 104, 168, 0,
909 178, 0, 0, 0, 0, 0, 0, 0, 107, 0,
910 0, 0, 108, 109, 101, 102, 0, 0, 110, 111,
911 0, 0, 0, 0, 112, 113, 114, 0, 0, 0,
912 104, 168, 0, 101, 102, -118, 0, 0, 0, 0,
913 0, 107, 0, 0, 0, 108, 109, 0, 0, 104,
914 0, 110, 111, 0, 229, 0, 0, 112, 113, 114,
915 107, 0, 0, 0, 108, 109, 0, 0, 0, 0,
916 110, 111, 0, 0, 0, 0, 112, 113, 114, 96,
917 97, 0, 2, 98, 99, 100, 0, 0, 96, 97,
918 0, 2, 98, 99, 100, 264, 265, 0, 0, 0,
919 0, 197, 198, 199, 200, 201, 202, 203, 204, 205,
920 206, 207, 208, 209, 0, 210, 211, 212, 0, 0,
921 0, 0, 0, 0, 0, 0, 101, 102, 0, 0,
922 0, 0, 0, 0, 0, 101, 102, 0, 0, 0,
923 0, 0, 104, 168, 0, 0, 0, 0, 0, 0,
924 0, 104, 0, 107, 0, 0, 0, 108, 109, 0,
925 0, 0, 107, 110, 111, 0, 108, 109, 0, 112,
926 113, 114, 110, 111, 0, -4, 1, 0, 112, 113,
927 114, 2, 0, 3, 4, 5, 6, 7, 8, 9,
928 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
929 20, 0, 0, 0, 21, 22, 23, 24, 25, 0,
930 26, 0, 27, 161, 28, 29, 30, 31, 32, 0,
931 33, 34, 0, 35, 0, 0, 0, 36, 37, 38,
932 39, 40, 41, 42, 43, 0, 199, 200, 201, 202,
933 203, 204, 205, 206, 207, 208, 209, 44, 210, 211,
934 212, 0, 0, 0, 0, 0, 0, 0, 0, 1,
935 0, 0, 45, 46, 2, 0, 3, 4, 5, 6,
936 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
937 17, 18, 19, 20, -155, 334, -155, 21, 22, 23,
938 24, 25, 0, 26, 0, 27, 0, 28, 29, 30,
939 31, 32, 0, 33, 34, 0, 35, 0, 0, 0,
940 36, 37, 38, 39, 40, 41, 42, 43, 0, 0,
941 200, 201, 202, 203, 204, 205, 206, 207, 208, 209,
942 44, 210, 211, 212, 0, 0, 0, 0, 0, 0,
943 0, 0, 1, 0, 0, 45, 46, 2, 0, 3,
944 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
945 14, 15, 16, 17, 18, 19, 20, -158, -158, -158,
946 21, 22, 23, 24, 25, 0, 26, 0, 27, 0,
947 28, 29, 30, 31, 32, 0, 33, 34, 0, 35,
948 0, 0, 0, 36, 37, 38, 39, 40, 41, 42,
949 43, 0, 0, 0, 0, 0, 0, 0, 0, 0,
950 0, 0, 0, 44, 0, 0, 0, 0, 0, 0,
951 0, 0, 0, 0, 0, 1, 0, 0, 45, 46,
952 2, 0, 3, 4, 5, 6, 7, 8, 9, 10,
953 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
954 338, 0, -160, 21, 22, 23, 24, 25, 0, 26,
955 0, 27, 0, 28, 29, 30, 31, 32, 0, 33,
956 34, 0, 35, 0, 0, 0, 36, 37, 38, 39,
957 40, 41, 42, 43, 0, 0, 0, 0, 0, 0,
958 0, 0, 0, 0, 0, 0, 44, 0, 0, 0,
959 0, 0, 0, 0, 0, 0, 0, 0, 1, 0,
960 0, 45, 46, 2, 0, 3, 4, 5, 6, 7,
961 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
962 18, 19, 20, 0, 0, 0, 21, 22, 23, 24,
963 25, 342, 26, 0, 27, 0, 28, 29, 30, 31,
964 32, 0, 33, 34, 0, 35, 0, 0, 0, 36,
965 37, 38, 39, 40, 41, 42, 43, 0, 0, 0,
966 0, 0, 0, 0, 0, 0, 0, 0, 0, 44,
967 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
968 0, 1, 0, 0, 45, 46, 2, 0, 3, 4,
969 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
970 15, 16, 17, 18, 19, 20, 0, 0, 0, 21,
971 22, 23, 24, 25, 343, 26, 0, 27, 0, 28,
972 29, 30, 31, 32, 0, 33, 34, 0, 35, 0,
973 0, 0, 36, 37, 38, 39, 40, 41, 42, 43,
974 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
975 0, 0, 44, 0, 0, 0, 0, 0, 0, 0,
976 0, 0, 0, 0, 1, 0, 0, 45, 46, 2,
977 0, 3, 4, 5, 6, 7, 8, 9, 10, 11,
978 12, 13, 14, 15, 16, 17, 18, 19, 20, 0,
979 0, 0, 21, 22, 23, 24, 25, 0, 26, 0,
980 27, 0, 28, 29, 30, 31, 32, 346, 33, 34,
981 0, 35, 0, 0, 0, 36, 37, 38, 39, 40,
982 41, 42, 43, 0, 0, 0, 0, 0, 0, 0,
983 0, 0, 0, 0, 0, 44, 0, 0, 0, 0,
984 0, 0, 0, 0, 0, 0, 0, 1, 0, 0,
985 45, 46, 2, 0, 3, 4, 5, 6, 7, 8,
986 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
987 19, 20, 0, 0, 0, 21, 22, 23, 24, 25,
988 0, 26, 0, 27, 0, 28, 29, 30, 31, 32,
989 347, 33, 34, 0, 35, 0, 0, 0, 36, 37,
990 38, 39, 40, 41, 42, 43, 0, 0, 0, 0,
991 0, 0, 0, 0, 0, 0, 0, 0, 44, 0,
992 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
993 1, 0, 0, 45, 46, 2, 0, 3, 4, 5,
994 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
995 16, 17, 18, 19, 20, 0, 0, 0, 21, 22,
996 23, 24, 25, 0, 26, 0, 27, 0, 28, 29,
997 30, 31, 32, 0, 33, 34, 0, 35, 353, 0,
998 0, 36, 37, 38, 39, 40, 41, 42, 43, 0,
999 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1000 0, 44, 0, 0, 0, 0, 0, 0, 0, 0,
1001 0, 0, 0, 1, 0, 0, 45, 46, 2, 0,
1002 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
1003 13, 14, 15, 16, 17, 18, 19, 20, 0, 0,
1004 0, 21, 22, 23, 24, 25, 363, 26, 0, 27,
1005 0, 28, 29, 30, 31, 32, 0, 33, 34, 0,
1006 35, 0, 0, 0, 36, 37, 38, 39, 40, 41,
1007 42, 43, 0, 0, 0, 0, 0, 0, 0, 0,
1008 0, 0, 0, 0, 44, 0, 0, 0, 0, 0,
1009 0, 0, 0, 0, 0, 0, 1, 0, 0, 45,
1010 46, 2, 0, 3, 4, 5, 6, 7, 8, 9,
1011 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
1012 20, 0, 0, -159, 21, 22, 23, 24, 25, 0,
1013 26, 0, 27, 0, 28, 29, 30, 31, 32, 0,
1014 33, 34, 0, 35, 0, 0, 0, 36, 37, 38,
1015 39, 40, 41, 42, 43, 0, 0, 0, 0, 0,
1016 0, 0, 0, 0, 0, 0, 0, 44, 0, 0,
1017 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
1018 0, 0, 45, 46, 2, 0, 3, 4, 5, 6,
1019 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
1020 17, 18, 19, 20, 0, 0, 0, 21, 22, 23,
1021 24, 25, 0, 26, 0, 27, 0, 28, 29, 30,
1022 31, 32, 0, 33, 34, 0, 35, 0, 0, 0,
1023 36, 37, 38, 39, 40, 41, 42, 43, 0, 0,
1024 1, 0, 0, 0, 0, 2, 0, 0, 0, 0,
1025 44, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1026 16, 17, 18, 19, 20, 45, 46, 0, 21, 22,
1027 23, 24, 25, 0, 26, 0, 27, 0, 28, 29,
1028 30, 31, 32, 0, 33, 34, 0, 35, 0, 0,
1029 0, 36, 37, 38, 39, 40, 41, 42, 43, 0,
1030 0, 0, 0, 0, 0, 0, 327, 0, 0, 0,
1031 0, 44, 197, 198, 199, 200, 201, 202, 203, 204,
1032 205, 206, 207, 208, 209, 330, 210, 211, 212, 0,
1033 0, 197, 198, 199, 200, 201, 202, 203, 204, 205,
1034 206, 207, 208, 209, 196, 210, 211, 212, 0, 197,
1035 198, 199, 200, 201, 202, 203, 204, 205, 206, 207,
1036 208, 209, 0, 210, 211, 212, 197, 198, 199, 200,
1037 201, 202, 203, 204, 205, 206, 207, 208, 209, 0,
1038 210, 211, 212, 0, 0, 0, 266, 197, 198, 199,
1039 200, 201, 202, 203, 204, 205, 206, 207, 208, 209,
1040 0, 210, 211, 212, 0, 0, 0, 331
1043 static const short yycheck
[] =
1045 0, 74, 101, 28, 29, 74, 244, 48, 8, 4,
1046 296, 140, 6, 6, 6, 69, 22, 63, 64, 19,
1047 20, 58, 59, 23, 30, 6, 26, 27, 28, 29,
1048 59, 31, 32, 33, 34, 35, 36, 166, 167, 168,
1049 40, 95, 71, 6, 44, 39, 0, 65, 48, 335,
1050 1, 14, 15, 16, 17, 47, 3, 4, 72, 6,
1051 7, 8, 9, 56, 71, 16, 17, 71, 68, 142,
1052 58, 59, 61, 142, 61, 59, 59, 315, 58, 59,
1053 71, 71, 69, 71, 157, 58, 59, 82, 157, 52,
1054 68, 71, 65, 63, 56, 60, 58, 59, 220, 221,
1055 222, 101, 102, 50, 51, 227, 228, 107, 95, 72,
1056 135, 87, 88, 70, 90, 91, 92, 239, 240, 66,
1057 64, 72, 26, 245, 90, 91, 92, 27, 79, 80,
1058 28, 260, 28, 28, 68, 135, 315, 312, 237, 213,
1059 325, 141, 102, 213, 336, 81, 93, 94, 95, 149,
1060 292, -1, -1, -1, -1, -1, 156, -1, -1, 6,
1061 233, -1, -1, -1, 233, -1, 13, 14, 15, 16,
1062 17, -1, -1, -1, 125, 297, 249, 128, 129, 130,
1063 249, -1, 133, 134, -1, 136, 137, -1, -1, 140,
1064 -1, -1, 143, 292, 145, 146, 325, 148, -1, 150,
1065 151, 48, 153, 154, 155, 52, -1, 158, -1, -1,
1066 161, -1, -1, 213, 214, -1, -1, -1, -1, -1,
1067 220, 221, 222, 174, -1, 72, -1, 227, 228, 229,
1068 181, -1, -1, -1, -1, -1, -1, 237, 360, 239,
1069 240, -1, -1, -1, 244, 245, -1, -1, -1, -1,
1070 372, -1, -1, 294, 295, 296, -1, 298, 299, 85,
1071 86, 87, 88, -1, 90, 91, 92, -1, -1, 310,
1072 311, -1, -1, -1, 225, -1, -1, -1, 319, 230,
1073 -1, 232, 14, 15, 16, 17, 18, 19, 20, -1,
1074 241, -1, 292, -1, 294, 295, 296, 297, 298, 299,
1075 341, -1, -1, 254, 255, -1, -1, -1, -1, -1,
1076 310, 311, 312, -1, -1, 315, -1, -1, -1, 319,
1077 52, 77, 78, 79, 80, 81, 82, 83, 84, 85,
1078 86, 87, 88, 374, 90, 91, 92, 378, -1, 7,
1079 72, 341, 293, -1, 344, -1, -1, -1, -1, -1,
1080 18, -1, -1, -1, -1, -1, 24, 25, -1, -1,
1081 360, -1, -1, -1, -1, -1, 317, -1, -1, 37,
1082 38, 39, 372, 41, 374, -1, -1, -1, 378, 81,
1083 82, 83, 84, 85, 86, 87, 88, 338, 90, 91,
1084 92, 342, 343, -1, 345, 346, 347, -1, -1, 350,
1085 -1, -1, 353, -1, -1, -1, 357, -1, -1, -1,
1086 361, 362, 363, 3, 4, -1, 6, 7, 8, 9,
1087 -1, -1, 373, -1, -1, -1, 94, -1, -1, -1,
1088 -1, -1, -1, -1, -1, -1, -1, 105, 106, -1,
1089 108, 109, -1, 111, 112, 113, 114, -1, -1, -1,
1090 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1091 50, 51, -1, -1, -1, -1, -1, -1, -1, -1,
1092 -1, 139, 62, -1, -1, -1, 66, -1, -1, 69,
1093 -1, -1, -1, 73, -1, -1, -1, 77, -1, -1,
1094 -1, 81, 82, 58, 59, -1, -1, 87, 88, -1,
1095 -1, -1, -1, 93, 94, 95, -1, -1, -1, -1,
1096 178, 76, 77, 78, 79, 80, 81, 82, 83, 84,
1097 85, 86, 87, 88, -1, 90, 91, 92, -1, 197,
1098 198, 199, 200, 201, 202, 203, 204, 205, 206, 207,
1099 208, 209, 210, 211, 212, -1, -1, 215, 216, 217,
1100 3, 4, -1, 6, 7, 8, 9, -1, -1, -1,
1101 -1, 14, 15, 16, 17, 18, 19, 20, -1, -1,
1102 76, 77, 78, 79, 80, 81, 82, 83, 84, 85,
1103 86, 87, 88, 36, 90, 91, 92, -1, -1, 3,
1104 4, -1, 6, 7, 8, 9, -1, 50, 51, 52,
1105 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1106 -1, -1, 65, 66, 67, -1, -1, -1, -1, 72,
1107 -1, -1, -1, -1, 77, -1, -1, -1, 81, 82,
1108 -1, -1, -1, -1, 87, 88, 50, 51, -1, -1,
1109 93, 94, 95, -1, 58, 59, 314, -1, -1, -1,
1110 -1, -1, 66, 67, 3, 4, -1, 6, 7, 8,
1111 9, -1, -1, 77, -1, -1, 334, 81, 82, -1,
1112 -1, -1, -1, 87, 88, -1, -1, -1, -1, 93,
1113 94, 95, -1, -1, -1, -1, -1, 3, 4, -1,
1114 6, 7, 8, 9, -1, -1, -1, -1, -1, -1,
1115 -1, 50, 51, -1, -1, -1, 3, 4, -1, 6,
1116 7, 8, 9, -1, -1, -1, -1, 66, 67, -1,
1117 69, -1, -1, -1, -1, -1, -1, -1, 77, -1,
1118 -1, -1, 81, 82, 50, 51, -1, -1, 87, 88,
1119 -1, -1, -1, -1, 93, 94, 95, -1, -1, -1,
1120 66, 67, -1, 50, 51, 71, -1, -1, -1, -1,
1121 -1, 77, -1, -1, -1, 81, 82, -1, -1, 66,
1122 -1, 87, 88, -1, 71, -1, -1, 93, 94, 95,
1123 77, -1, -1, -1, 81, 82, -1, -1, -1, -1,
1124 87, 88, -1, -1, -1, -1, 93, 94, 95, 3,
1125 4, -1, 6, 7, 8, 9, -1, -1, 3, 4,
1126 -1, 6, 7, 8, 9, 70, 71, -1, -1, -1,
1127 -1, 76, 77, 78, 79, 80, 81, 82, 83, 84,
1128 85, 86, 87, 88, -1, 90, 91, 92, -1, -1,
1129 -1, -1, -1, -1, -1, -1, 50, 51, -1, -1,
1130 -1, -1, -1, -1, -1, 50, 51, -1, -1, -1,
1131 -1, -1, 66, 67, -1, -1, -1, -1, -1, -1,
1132 -1, 66, -1, 77, -1, -1, -1, 81, 82, -1,
1133 -1, -1, 77, 87, 88, -1, 81, 82, -1, 93,
1134 94, 95, 87, 88, -1, 0, 1, -1, 93, 94,
1135 95, 6, -1, 8, 9, 10, 11, 12, 13, 14,
1136 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
1137 25, -1, -1, -1, 29, 30, 31, 32, 33, -1,
1138 35, -1, 37, 38, 39, 40, 41, 42, 43, -1,
1139 45, 46, -1, 48, -1, -1, -1, 52, 53, 54,
1140 55, 56, 57, 58, 59, -1, 78, 79, 80, 81,
1141 82, 83, 84, 85, 86, 87, 88, 72, 90, 91,
1142 92, -1, -1, -1, -1, -1, -1, -1, -1, 1,
1143 -1, -1, 87, 88, 6, -1, 8, 9, 10, 11,
1144 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
1145 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1146 32, 33, -1, 35, -1, 37, -1, 39, 40, 41,
1147 42, 43, -1, 45, 46, -1, 48, -1, -1, -1,
1148 52, 53, 54, 55, 56, 57, 58, 59, -1, -1,
1149 79, 80, 81, 82, 83, 84, 85, 86, 87, 88,
1150 72, 90, 91, 92, -1, -1, -1, -1, -1, -1,
1151 -1, -1, 1, -1, -1, 87, 88, 6, -1, 8,
1152 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
1153 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
1154 29, 30, 31, 32, 33, -1, 35, -1, 37, -1,
1155 39, 40, 41, 42, 43, -1, 45, 46, -1, 48,
1156 -1, -1, -1, 52, 53, 54, 55, 56, 57, 58,
1157 59, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1158 -1, -1, -1, 72, -1, -1, -1, -1, -1, -1,
1159 -1, -1, -1, -1, -1, 1, -1, -1, 87, 88,
1160 6, -1, 8, 9, 10, 11, 12, 13, 14, 15,
1161 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
1162 26, -1, 28, 29, 30, 31, 32, 33, -1, 35,
1163 -1, 37, -1, 39, 40, 41, 42, 43, -1, 45,
1164 46, -1, 48, -1, -1, -1, 52, 53, 54, 55,
1165 56, 57, 58, 59, -1, -1, -1, -1, -1, -1,
1166 -1, -1, -1, -1, -1, -1, 72, -1, -1, -1,
1167 -1, -1, -1, -1, -1, -1, -1, -1, 1, -1,
1168 -1, 87, 88, 6, -1, 8, 9, 10, 11, 12,
1169 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
1170 23, 24, 25, -1, -1, -1, 29, 30, 31, 32,
1171 33, 34, 35, -1, 37, -1, 39, 40, 41, 42,
1172 43, -1, 45, 46, -1, 48, -1, -1, -1, 52,
1173 53, 54, 55, 56, 57, 58, 59, -1, -1, -1,
1174 -1, -1, -1, -1, -1, -1, -1, -1, -1, 72,
1175 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1176 -1, 1, -1, -1, 87, 88, 6, -1, 8, 9,
1177 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
1178 20, 21, 22, 23, 24, 25, -1, -1, -1, 29,
1179 30, 31, 32, 33, 34, 35, -1, 37, -1, 39,
1180 40, 41, 42, 43, -1, 45, 46, -1, 48, -1,
1181 -1, -1, 52, 53, 54, 55, 56, 57, 58, 59,
1182 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1183 -1, -1, 72, -1, -1, -1, -1, -1, -1, -1,
1184 -1, -1, -1, -1, 1, -1, -1, 87, 88, 6,
1185 -1, 8, 9, 10, 11, 12, 13, 14, 15, 16,
1186 17, 18, 19, 20, 21, 22, 23, 24, 25, -1,
1187 -1, -1, 29, 30, 31, 32, 33, -1, 35, -1,
1188 37, -1, 39, 40, 41, 42, 43, 44, 45, 46,
1189 -1, 48, -1, -1, -1, 52, 53, 54, 55, 56,
1190 57, 58, 59, -1, -1, -1, -1, -1, -1, -1,
1191 -1, -1, -1, -1, -1, 72, -1, -1, -1, -1,
1192 -1, -1, -1, -1, -1, -1, -1, 1, -1, -1,
1193 87, 88, 6, -1, 8, 9, 10, 11, 12, 13,
1194 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
1195 24, 25, -1, -1, -1, 29, 30, 31, 32, 33,
1196 -1, 35, -1, 37, -1, 39, 40, 41, 42, 43,
1197 44, 45, 46, -1, 48, -1, -1, -1, 52, 53,
1198 54, 55, 56, 57, 58, 59, -1, -1, -1, -1,
1199 -1, -1, -1, -1, -1, -1, -1, -1, 72, -1,
1200 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1201 1, -1, -1, 87, 88, 6, -1, 8, 9, 10,
1202 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
1203 21, 22, 23, 24, 25, -1, -1, -1, 29, 30,
1204 31, 32, 33, -1, 35, -1, 37, -1, 39, 40,
1205 41, 42, 43, -1, 45, 46, -1, 48, 49, -1,
1206 -1, 52, 53, 54, 55, 56, 57, 58, 59, -1,
1207 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1208 -1, 72, -1, -1, -1, -1, -1, -1, -1, -1,
1209 -1, -1, -1, 1, -1, -1, 87, 88, 6, -1,
1210 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
1211 18, 19, 20, 21, 22, 23, 24, 25, -1, -1,
1212 -1, 29, 30, 31, 32, 33, 34, 35, -1, 37,
1213 -1, 39, 40, 41, 42, 43, -1, 45, 46, -1,
1214 48, -1, -1, -1, 52, 53, 54, 55, 56, 57,
1215 58, 59, -1, -1, -1, -1, -1, -1, -1, -1,
1216 -1, -1, -1, -1, 72, -1, -1, -1, -1, -1,
1217 -1, -1, -1, -1, -1, -1, 1, -1, -1, 87,
1218 88, 6, -1, 8, 9, 10, 11, 12, 13, 14,
1219 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
1220 25, -1, -1, 28, 29, 30, 31, 32, 33, -1,
1221 35, -1, 37, -1, 39, 40, 41, 42, 43, -1,
1222 45, 46, -1, 48, -1, -1, -1, 52, 53, 54,
1223 55, 56, 57, 58, 59, -1, -1, -1, -1, -1,
1224 -1, -1, -1, -1, -1, -1, -1, 72, -1, -1,
1225 -1, -1, -1, -1, -1, -1, -1, -1, -1, 1,
1226 -1, -1, 87, 88, 6, -1, 8, 9, 10, 11,
1227 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
1228 22, 23, 24, 25, -1, -1, -1, 29, 30, 31,
1229 32, 33, -1, 35, -1, 37, -1, 39, 40, 41,
1230 42, 43, -1, 45, 46, -1, 48, -1, -1, -1,
1231 52, 53, 54, 55, 56, 57, 58, 59, -1, -1,
1232 1, -1, -1, -1, -1, 6, -1, -1, -1, -1,
1233 72, 12, 13, 14, 15, 16, 17, 18, 19, 20,
1234 21, 22, 23, 24, 25, 87, 88, -1, 29, 30,
1235 31, 32, 33, -1, 35, -1, 37, -1, 39, 40,
1236 41, 42, 43, -1, 45, 46, -1, 48, -1, -1,
1237 -1, 52, 53, 54, 55, 56, 57, 58, 59, -1,
1238 -1, -1, -1, -1, -1, -1, 70, -1, -1, -1,
1239 -1, 72, 76, 77, 78, 79, 80, 81, 82, 83,
1240 84, 85, 86, 87, 88, 70, 90, 91, 92, -1,
1241 -1, 76, 77, 78, 79, 80, 81, 82, 83, 84,
1242 85, 86, 87, 88, 71, 90, 91, 92, -1, 76,
1243 77, 78, 79, 80, 81, 82, 83, 84, 85, 86,
1244 87, 88, -1, 90, 91, 92, 76, 77, 78, 79,
1245 80, 81, 82, 83, 84, 85, 86, 87, 88, -1,
1246 90, 91, 92, -1, -1, -1, 96, 76, 77, 78,
1247 79, 80, 81, 82, 83, 84, 85, 86, 87, 88,
1248 -1, 90, 91, 92, -1, -1, -1, 96
1251 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
1252 symbol of state STATE-NUM. */
1253 static const unsigned char yystos
[] =
1255 0, 1, 6, 8, 9, 10, 11, 12, 13, 14,
1256 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
1257 25, 29, 30, 31, 32, 33, 35, 37, 39, 40,
1258 41, 42, 43, 45, 46, 48, 52, 53, 54, 55,
1259 56, 57, 58, 59, 72, 87, 88, 98, 100, 101,
1260 102, 103, 104, 105, 106, 107, 108, 111, 112, 113,
1261 114, 115, 116, 119, 122, 123, 124, 125, 126, 127,
1262 128, 129, 130, 145, 146, 149, 154, 155, 156, 157,
1263 158, 159, 161, 162, 164, 166, 169, 170, 171, 172,
1264 173, 176, 177, 178, 179, 127, 3, 4, 7, 8,
1265 9, 50, 51, 62, 66, 69, 73, 77, 81, 82,
1266 87, 88, 93, 94, 95, 131, 132, 136, 137, 142,
1267 143, 144, 146, 148, 146, 56, 127, 127, 131, 146,
1268 146, 4, 82, 163, 163, 146, 131, 131, 146, 168,
1269 146, 56, 146, 168, 168, 163, 146, 146, 147, 146,
1270 146, 146, 146, 131, 131, 131, 39, 146, 131, 146,
1271 0, 38, 99, 101, 102, 127, 36, 65, 67, 131,
1272 133, 138, 158, 160, 167, 178, 127, 127, 69, 160,
1273 131, 135, 134, 146, 159, 136, 146, 131, 131, 146,
1274 131, 131, 131, 131, 131, 131, 71, 76, 77, 78,
1275 79, 80, 81, 82, 83, 84, 85, 86, 87, 88,
1276 90, 91, 92, 72, 61, 69, 95, 65, 109, 127,
1277 127, 127, 127, 127, 127, 165, 168, 127, 127, 71,
1278 131, 127, 133, 146, 158, 178, 127, 59, 127, 127,
1279 127, 120, 121, 146, 127, 127, 127, 127, 127, 146,
1280 158, 178, 127, 127, 133, 133, 133, 139, 140, 141,
1281 71, 127, 131, 127, 70, 71, 96, 63, 64, 131,
1282 131, 131, 131, 131, 131, 131, 131, 131, 131, 131,
1283 131, 131, 131, 131, 131, 132, 137, 146, 146, 131,
1284 131, 131, 59, 110, 100, 100, 100, 127, 100, 100,
1285 146, 127, 127, 158, 178, 13, 48, 146, 159, 175,
1286 100, 100, 71, 127, 59, 117, 118, 146, 170, 100,
1287 158, 178, 127, 127, 68, 71, 133, 70, 71, 63,
1288 70, 96, 175, 127, 27, 150, 151, 152, 26, 153,
1289 153, 100, 34, 34, 60, 174, 44, 44, 121, 131,
1290 47, 118, 127, 49, 141, 64, 70, 131, 153, 152,
1291 127, 28, 28, 34, 127, 127, 146, 127, 127, 127,
1292 127, 127, 127, 28, 100, 127, 127, 127, 100, 127
1295 #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
1296 # define YYSIZE_T __SIZE_TYPE__
1298 #if ! defined (YYSIZE_T) && defined (size_t)
1299 # define YYSIZE_T size_t
1301 #if ! defined (YYSIZE_T)
1302 # if defined (__STDC__) || defined (__cplusplus)
1303 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
1304 # define YYSIZE_T size_t
1307 #if ! defined (YYSIZE_T)
1308 # define YYSIZE_T unsigned int
1311 #define yyerrok (yyerrstatus = 0)
1312 #define yyclearin (yychar = YYEMPTY)
1313 #define YYEMPTY (-2)
1316 #define YYACCEPT goto yyacceptlab
1317 #define YYABORT goto yyabortlab
1318 #define YYERROR goto yyerrlab1
1320 /* Like YYERROR except do call yyerror. This remains here temporarily
1321 to ease the transition to the new meaning of YYERROR, for GCC.
1322 Once GCC version 2 has supplanted version 1, this can go. */
1324 #define YYFAIL goto yyerrlab
1326 #define YYRECOVERING() (!!yyerrstatus)
1328 #define YYBACKUP(Token, Value) \
1330 if (yychar == YYEMPTY && yylen == 1) \
1334 yytoken = YYTRANSLATE (yychar); \
1340 yyerror ("syntax error: cannot back up");\
1346 #define YYERRCODE 256
1348 /* YYLLOC_DEFAULT -- Compute the default location (before the actions
1351 #ifndef YYLLOC_DEFAULT
1352 # define YYLLOC_DEFAULT(Current, Rhs, N) \
1353 Current.first_line = Rhs[1].first_line; \
1354 Current.first_column = Rhs[1].first_column; \
1355 Current.last_line = Rhs[N].last_line; \
1356 Current.last_column = Rhs[N].last_column;
1359 /* YYLEX -- calling `yylex' with the right arguments. */
1362 # define YYLEX yylex (YYLEX_PARAM)
1364 # define YYLEX yylex ()
1367 /* Enable debugging if requested. */
1371 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
1372 # define YYFPRINTF fprintf
1375 # define YYDPRINTF(Args) \
1381 # define YYDSYMPRINT(Args) \
1387 # define YYDSYMPRINTF(Title, Token, Value, Location) \
1391 YYFPRINTF (stderr, "%s ", Title); \
1392 yysymprint (stderr, \
1393 Token, Value, Location); \
1394 YYFPRINTF (stderr, "\n"); \
1398 /*------------------------------------------------------------------.
1399 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
1401 `------------------------------------------------------------------*/
1403 #if defined (__STDC__) || defined (__cplusplus)
1405 yy_stack_print (short *bottom
, short *top
)
1408 yy_stack_print (bottom
, top
)
1413 YYFPRINTF (stderr
, "Stack now");
1414 for (/* Nothing. */; bottom
<= top
; ++bottom
)
1415 YYFPRINTF (stderr
, " %d", *bottom
);
1416 YYFPRINTF (stderr
, "\n");
1419 # define YY_STACK_PRINT(Bottom, Top) \
1422 yy_stack_print ((Bottom), (Top)); \
1426 /*------------------------------------------------.
1427 | Report that the YYRULE is going to be reduced. |
1428 `------------------------------------------------*/
1430 #if defined (__STDC__) || defined (__cplusplus)
1432 yy_reduce_print (int yyrule
)
1435 yy_reduce_print (yyrule
)
1440 unsigned int yylineno
= yyrline
[yyrule
];
1441 YYFPRINTF (stderr
, "Reducing stack by rule %d (line %u), ",
1442 yyrule
- 1, yylineno
);
1443 /* Print the symbols being reduced, and their result. */
1444 for (yyi
= yyprhs
[yyrule
]; 0 <= yyrhs
[yyi
]; yyi
++)
1445 YYFPRINTF (stderr
, "%s ", yytname
[yyrhs
[yyi
]]);
1446 YYFPRINTF (stderr
, "-> %s\n", yytname
[yyr1
[yyrule
]]);
1449 # define YY_REDUCE_PRINT(Rule) \
1452 yy_reduce_print (Rule); \
1455 /* Nonzero means print parse trace. It is left uninitialized so that
1456 multiple parsers can coexist. */
1458 #else /* !YYDEBUG */
1459 # define YYDPRINTF(Args)
1460 # define YYDSYMPRINT(Args)
1461 # define YYDSYMPRINTF(Title, Token, Value, Location)
1462 # define YY_STACK_PRINT(Bottom, Top)
1463 # define YY_REDUCE_PRINT(Rule)
1464 #endif /* !YYDEBUG */
1467 /* YYINITDEPTH -- initial size of the parser's stacks. */
1469 # define YYINITDEPTH 200
1472 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1473 if the built-in stack extension method is used).
1475 Do not make this value too large; the results are undefined if
1476 SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH)
1477 evaluated with infinite-precision integer arithmetic. */
1484 # define YYMAXDEPTH 10000
1492 # if defined (__GLIBC__) && defined (_STRING_H)
1493 # define yystrlen strlen
1495 /* Return the length of YYSTR. */
1497 # if defined (__STDC__) || defined (__cplusplus)
1498 yystrlen (const char *yystr
)
1504 register const char *yys
= yystr
;
1506 while (*yys
++ != '\0')
1509 return yys
- yystr
- 1;
1515 # if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
1516 # define yystpcpy stpcpy
1518 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1521 # if defined (__STDC__) || defined (__cplusplus)
1522 yystpcpy (char *yydest
, const char *yysrc
)
1524 yystpcpy (yydest
, yysrc
)
1529 register char *yyd
= yydest
;
1530 register const char *yys
= yysrc
;
1532 while ((*yyd
++ = *yys
++) != '\0')
1540 #endif /* !YYERROR_VERBOSE */
1545 /*--------------------------------.
1546 | Print this symbol on YYOUTPUT. |
1547 `--------------------------------*/
1549 #if defined (__STDC__) || defined (__cplusplus)
1551 yysymprint (FILE *yyoutput
, int yytype
, YYSTYPE
*yyvaluep
, YYLTYPE
*yylocationp
)
1554 yysymprint (yyoutput
, yytype
, yyvaluep
, yylocationp
)
1558 YYLTYPE
*yylocationp
;
1561 /* Pacify ``unused variable'' warnings. */
1565 if (yytype
< YYNTOKENS
)
1567 YYFPRINTF (yyoutput
, "token %s (", yytname
[yytype
]);
1569 YYPRINT (yyoutput
, yytoknum
[yytype
], *yyvaluep
);
1573 YYFPRINTF (yyoutput
, "nterm %s (", yytname
[yytype
]);
1580 YYFPRINTF (yyoutput
, ")");
1583 #endif /* ! YYDEBUG */
1584 /*-----------------------------------------------.
1585 | Release the memory associated to this symbol. |
1586 `-----------------------------------------------*/
1588 #if defined (__STDC__) || defined (__cplusplus)
1590 yydestruct (int yytype
, YYSTYPE
*yyvaluep
, YYLTYPE
*yylocationp
)
1593 yydestruct (yytype
, yyvaluep
, yylocationp
)
1596 YYLTYPE
*yylocationp
;
1599 /* Pacify ``unused variable'' warnings. */
1612 /* Prevent warnings from -Wmissing-prototypes. */
1614 #ifdef YYPARSE_PARAM
1615 # if defined (__STDC__) || defined (__cplusplus)
1616 int yyparse (void *YYPARSE_PARAM
);
1620 #else /* ! YYPARSE_PARAM */
1621 #if defined (__STDC__) || defined (__cplusplus)
1626 #endif /* ! YYPARSE_PARAM */
1630 /* The lookahead symbol. */
1633 /* The semantic value of the lookahead symbol. */
1636 /* Number of syntax errors so far. */
1638 /* Location data for the lookahead symbol. */
1647 #ifdef YYPARSE_PARAM
1648 # if defined (__STDC__) || defined (__cplusplus)
1649 int yyparse (void *YYPARSE_PARAM
)
1651 int yyparse (YYPARSE_PARAM
)
1652 void *YYPARSE_PARAM
;
1654 #else /* ! YYPARSE_PARAM */
1655 #if defined (__STDC__) || defined (__cplusplus)
1666 register int yystate
;
1669 /* Number of tokens to shift before error messages enabled. */
1671 /* Lookahead token as an internal (translated) token number. */
1674 /* Three stacks and their tools:
1675 `yyss': related to states,
1676 `yyvs': related to semantic values,
1677 `yyls': related to locations.
1679 Refer to the stacks thru separate pointers, to allow yyoverflow
1680 to reallocate them elsewhere. */
1682 /* The state stack. */
1683 short yyssa
[YYINITDEPTH
];
1684 short *yyss
= yyssa
;
1685 register short *yyssp
;
1687 /* The semantic value stack. */
1688 YYSTYPE yyvsa
[YYINITDEPTH
];
1689 YYSTYPE
*yyvs
= yyvsa
;
1690 register YYSTYPE
*yyvsp
;
1692 /* The location stack. */
1693 YYLTYPE yylsa
[YYINITDEPTH
];
1694 YYLTYPE
*yyls
= yylsa
;
1698 #define YYPOPSTACK (yyvsp--, yyssp--, yylsp--)
1700 YYSIZE_T yystacksize
= YYINITDEPTH
;
1702 /* The variables used to return semantic value and location from the
1707 /* When reducing, the number of symbols on the RHS of the reduced
1711 YYDPRINTF ((stderr
, "Starting parse\n"));
1716 yychar
= YYEMPTY
; /* Cause a token to be read. */
1718 /* Initialize stack pointers.
1719 Waste one element of value and location stack
1720 so that they stay on the same level as the state stack.
1721 The wasted elements are never initialized. */
1728 /*------------------------------------------------------------.
1729 | yynewstate -- Push a new state, which is found in yystate. |
1730 `------------------------------------------------------------*/
1732 /* In all cases, when you get here, the value and location stacks
1733 have just been pushed. so pushing a state here evens the stacks.
1740 if (yyss
+ yystacksize
- 1 <= yyssp
)
1742 /* Get the current used size of the three stacks, in elements. */
1743 YYSIZE_T yysize
= yyssp
- yyss
+ 1;
1747 /* Give user a chance to reallocate the stack. Use copies of
1748 these so that the &'s don't force the real ones into
1750 YYSTYPE
*yyvs1
= yyvs
;
1751 short *yyss1
= yyss
;
1752 YYLTYPE
*yyls1
= yyls
;
1754 /* Each stack pointer address is followed by the size of the
1755 data in use in that stack, in bytes. This used to be a
1756 conditional around just the two extra args, but that might
1757 be undefined if yyoverflow is a macro. */
1758 yyoverflow ("parser stack overflow",
1759 &yyss1
, yysize
* sizeof (*yyssp
),
1760 &yyvs1
, yysize
* sizeof (*yyvsp
),
1761 &yyls1
, yysize
* sizeof (*yylsp
),
1767 #else /* no yyoverflow */
1768 # ifndef YYSTACK_RELOCATE
1771 /* Extend the stack our own way. */
1772 if (YYMAXDEPTH
<= yystacksize
)
1775 if (YYMAXDEPTH
< yystacksize
)
1776 yystacksize
= YYMAXDEPTH
;
1779 short *yyss1
= yyss
;
1780 union yyalloc
*yyptr
=
1781 (union yyalloc
*) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize
));
1784 YYSTACK_RELOCATE (yyss
);
1785 YYSTACK_RELOCATE (yyvs
);
1786 YYSTACK_RELOCATE (yyls
);
1787 # undef YYSTACK_RELOCATE
1789 YYSTACK_FREE (yyss1
);
1792 #endif /* no yyoverflow */
1794 yyssp
= yyss
+ yysize
- 1;
1795 yyvsp
= yyvs
+ yysize
- 1;
1796 yylsp
= yyls
+ yysize
- 1;
1798 YYDPRINTF ((stderr
, "Stack size increased to %lu\n",
1799 (unsigned long int) yystacksize
));
1801 if (yyss
+ yystacksize
- 1 <= yyssp
)
1805 YYDPRINTF ((stderr
, "Entering state %d\n", yystate
));
1814 /* Do appropriate processing given the current state. */
1815 /* Read a lookahead token if we need one and don't already have one. */
1818 /* First try to decide what to do without reference to lookahead token. */
1820 yyn
= yypact
[yystate
];
1821 if (yyn
== YYPACT_NINF
)
1824 /* Not known => get a lookahead token if don't already have one. */
1826 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
1827 if (yychar
== YYEMPTY
)
1829 YYDPRINTF ((stderr
, "Reading a token: "));
1833 if (yychar
<= YYEOF
)
1835 yychar
= yytoken
= YYEOF
;
1836 YYDPRINTF ((stderr
, "Now at end of input.\n"));
1840 yytoken
= YYTRANSLATE (yychar
);
1841 YYDSYMPRINTF ("Next token is", yytoken
, &yylval
, &yylloc
);
1844 /* If the proper action on seeing token YYTOKEN is to reduce or to
1845 detect an error, take that action. */
1847 if (yyn
< 0 || YYLAST
< yyn
|| yycheck
[yyn
] != yytoken
)
1852 if (yyn
== 0 || yyn
== YYTABLE_NINF
)
1861 /* Shift the lookahead token. */
1862 YYDPRINTF ((stderr
, "Shifting token %s, ", yytname
[yytoken
]));
1864 /* Discard the token being shifted unless it is eof. */
1865 if (yychar
!= YYEOF
)
1871 /* Count tokens shifted since error; after three, turn off error
1880 /*-----------------------------------------------------------.
1881 | yydefault -- do the default action for the current state. |
1882 `-----------------------------------------------------------*/
1884 yyn
= yydefact
[yystate
];
1890 /*-----------------------------.
1891 | yyreduce -- Do a reduction. |
1892 `-----------------------------*/
1894 /* yyn is the number of a rule to reduce with. */
1897 /* If YYLEN is nonzero, implement the default value of the action:
1900 Otherwise, the following line sets YYVAL to garbage.
1901 This behavior is undocumented and Bison
1902 users should not rely upon it. Assigning to YYVAL
1903 unconditionally makes the parser a bit smaller, and it avoids a
1904 GCC warning that YYVAL may be used uninitialized. */
1905 yyval
= yyvsp
[1-yylen
];
1907 /* Default location. */
1908 YYLLOC_DEFAULT (yyloc
, (yylsp
- yylen
), yylen
);
1909 YY_REDUCE_PRINT (yyn
);
1913 #line 123 "parser.y"
1914 { root_node
= astnode_create_list(yyvsp
[-1].node
); }
1918 #line 127 "parser.y"
1923 #line 132 "parser.y"
1924 { yyval
.node
= yyvsp
[0].node
; }
1928 #line 133 "parser.y"
1930 if (yyvsp
[-1].node
!= NULL
) { yyval
.node
= yyvsp
[-1].node
; astnode_add_sibling(yyval
.node
, yyvsp
[0].node
); }
1931 else { yyval
.node
= yyvsp
[0].node
; }
1936 #line 140 "parser.y"
1937 { yyval
.node
= yyvsp
[-1].node
; astnode_add_sibling(yyval
.node
, yyvsp
[0].node
); }
1941 #line 141 "parser.y"
1942 { yyval
.node
= yyvsp
[0].node
; }
1946 #line 145 "parser.y"
1947 { yyval
.node
= yyvsp
[0].node
; }
1951 #line 146 "parser.y"
1952 { yyval
.node
= yyvsp
[0].node
; }
1956 #line 147 "parser.y"
1957 { yyval
.node
= yyvsp
[0].node
; }
1961 #line 148 "parser.y"
1962 { yyval
.node
= yyvsp
[0].node
; }
1966 #line 149 "parser.y"
1967 { yyval
.node
= yyvsp
[0].node
; }
1971 #line 150 "parser.y"
1972 { yyval
.node
= yyvsp
[0].node
; }
1976 #line 151 "parser.y"
1977 { yyval
.node
= yyvsp
[0].node
; }
1981 #line 152 "parser.y"
1982 { yyval
.node
= yyvsp
[0].node
; }
1986 #line 153 "parser.y"
1987 { yyval
.node
= yyvsp
[0].node
; }
1991 #line 154 "parser.y"
1992 { yyval
.node
= yyvsp
[0].node
; }
1996 #line 155 "parser.y"
1997 { yyval
.node
= yyvsp
[0].node
; }
2001 #line 156 "parser.y"
2002 { yyval
.node
= yyvsp
[0].node
; }
2006 #line 157 "parser.y"
2007 { yyval
.node
= yyvsp
[0].node
; }
2011 #line 158 "parser.y"
2012 { yyval
.node
= yyvsp
[0].node
; }
2016 #line 159 "parser.y"
2017 { yyval
.node
= yyvsp
[0].node
; }
2021 #line 160 "parser.y"
2022 { yyval
.node
= yyvsp
[0].node
; }
2026 #line 161 "parser.y"
2027 { yyval
.node
= yyvsp
[0].node
; }
2031 #line 162 "parser.y"
2032 { yyval
.node
= yyvsp
[0].node
; }
2036 #line 163 "parser.y"
2037 { yyval
.node
= yyvsp
[0].node
; }
2041 #line 164 "parser.y"
2042 { yyval
.node
= yyvsp
[0].node
; }
2046 #line 165 "parser.y"
2047 { yyval
.node
= yyvsp
[0].node
; }
2051 #line 166 "parser.y"
2052 { yyval
.node
= yyvsp
[0].node
; }
2056 #line 167 "parser.y"
2057 { yyval
.node
= yyvsp
[0].node
; }
2061 #line 168 "parser.y"
2062 { yyval
.node
= yyvsp
[0].node
; }
2066 #line 169 "parser.y"
2067 { yyval
.node
= yyvsp
[0].node
; }
2071 #line 170 "parser.y"
2072 { yyval
.node
= yyvsp
[0].node
; }
2076 #line 171 "parser.y"
2077 { yyval
.node
= yyvsp
[0].node
; }
2081 #line 172 "parser.y"
2082 { yyval
.node
= yyvsp
[0].node
; }
2086 #line 173 "parser.y"
2087 { yyval
.node
= yyvsp
[0].node
; }
2091 #line 174 "parser.y"
2092 { yyval
.node
= yyvsp
[0].node
; }
2096 #line 175 "parser.y"
2097 { yyval
.node
= yyvsp
[0].node
; }
2101 #line 176 "parser.y"
2102 { yyval
.node
= yyvsp
[0].node
; }
2106 #line 177 "parser.y"
2107 { yyval
.node
= NULL
; }
2111 #line 181 "parser.y"
2112 { yyval
.node
= astnode_create_org(yyvsp
[-1].node
, yyloc
); }
2116 #line 185 "parser.y"
2117 { yyval
.node
= astnode_create_align(yyvsp
[-2].node
, yyvsp
[-1].node
, yyloc
); }
2121 #line 189 "parser.y"
2122 { yyval
.node
= astnode_create_warning(yyvsp
[-1].node
, yyloc
); }
2126 #line 193 "parser.y"
2127 { yyval
.node
= astnode_create_error(yyvsp
[-1].node
, yyloc
); }
2131 #line 197 "parser.y"
2132 { yyval
.node
= astnode_create_message(yyvsp
[-1].node
, yyloc
); }
2136 #line 201 "parser.y"
2137 { yyval
.node
= astnode_create_label(yyvsp
[-3].node
->label
, yyvsp
[-2].node
, yyvsp
[-1].node
, yyloc
); }
2141 #line 205 "parser.y"
2142 { yyval
.node
= yyvsp
[0].node
; }
2146 #line 206 "parser.y"
2147 { yyval
.node
= NULL
; }
2151 #line 210 "parser.y"
2152 { yyval
.node
= yyvsp
[0].node
; }
2156 #line 211 "parser.y"
2157 { yyval
.node
= NULL
; }
2161 #line 215 "parser.y"
2162 { yyval
.node
= astnode_create_while(yyvsp
[-4].node
, yyvsp
[-2].node
, yyloc
); }
2166 #line 219 "parser.y"
2167 { yyval
.node
= astnode_create_rept(yyvsp
[-4].node
, yyvsp
[-2].node
, yyloc
); }
2171 #line 223 "parser.y"
2172 { yyval
.node
= astnode_create_proc(yyvsp
[-4].node
, yyvsp
[-2].node
, yyloc
); }
2176 #line 227 "parser.y"
2177 { yyval
.node
= astnode_create_struc_decl(yyvsp
[-4].node
, yyvsp
[-2].node
, yyloc
); }
2181 #line 231 "parser.y"
2182 { yyval
.node
= astnode_create_union_decl(yyvsp
[-4].node
, yyvsp
[-2].node
, yyloc
); }
2186 #line 235 "parser.y"
2187 { yyval
.node
= astnode_create_enum_decl(yyvsp
[-4].node
, yyvsp
[-2].node
, yyloc
); }
2191 #line 239 "parser.y"
2192 { yyval
.node
= yyvsp
[0].node
; }
2196 #line 240 "parser.y"
2197 { yyval
.node
= yyvsp
[-1].node
; astnode_add_sibling(yyval
.node
, yyvsp
[0].node
); }
2201 #line 244 "parser.y"
2202 { yyval
.node
= yyvsp
[0].node
; }
2206 #line 245 "parser.y"
2207 { yyval
.node
= yyvsp
[-1].node
; }
2211 #line 249 "parser.y"
2212 { yyval
.node
= astnode_create_record_decl(yyvsp
[-2].node
, yyvsp
[-1].node
, yyloc
); }
2216 #line 253 "parser.y"
2217 { yyval
.node
= yyvsp
[0].node
; }
2221 #line 254 "parser.y"
2222 { yyval
.node
= yyvsp
[-2].node
; astnode_add_sibling(yyval
.node
, yyvsp
[0].node
); }
2226 #line 258 "parser.y"
2227 { yyval
.node
= astnode_create_bitfield_decl(yyvsp
[-2].node
, yyvsp
[0].node
, yyloc
); }
2231 #line 262 "parser.y"
2232 { yyval
.node
= astnode_create_charmap(yyvsp
[-1].node
, yyloc
); }
2236 #line 266 "parser.y"
2237 { yyval
.node
= astnode_create_dataseg(0, yyloc
); }
2241 #line 267 "parser.y"
2242 { yyval
.node
= astnode_create_dataseg(ZEROPAGE_FLAG
, yyloc
); }
2246 #line 270 "parser.y"
2247 { yyval
.node
= astnode_create_codeseg(yyloc
); }
2251 #line 274 "parser.y"
2252 { yyval
.node
= NULL
; }
2256 #line 278 "parser.y"
2257 { yyval
.node
= yyvsp
[0].node
; }
2261 #line 282 "parser.y"
2266 #line 283 "parser.y"
2271 #line 287 "parser.y"
2276 #line 291 "parser.y"
2277 { yyval
.node
= yyvsp
[-1].node
; }
2281 #line 295 "parser.y"
2282 { yyval
.node
= astnode_create_instruction(yyvsp
[0].mnemonic
, IMPLIED_MODE
, NULL
, yyloc
); }
2286 #line 296 "parser.y"
2287 { yyval
.node
= astnode_create_instruction(yyvsp
[-1].mnemonic
, ACCUMULATOR_MODE
, NULL
, yyloc
); }
2291 #line 297 "parser.y"
2292 { yyval
.node
= astnode_create_instruction(yyvsp
[-2].mnemonic
, IMMEDIATE_MODE
, yyvsp
[0].node
, yyloc
); }
2296 #line 298 "parser.y"
2297 { yyval
.node
= astnode_create_instruction(yyvsp
[-1].mnemonic
, ABSOLUTE_MODE
, yyvsp
[0].node
, yyloc
); }
2301 #line 299 "parser.y"
2302 { yyval
.node
= astnode_create_instruction(yyvsp
[-3].mnemonic
, ABSOLUTE_X_MODE
, yyvsp
[-2].node
, yyloc
); }
2306 #line 300 "parser.y"
2307 { yyval
.node
= astnode_create_instruction(yyvsp
[-3].mnemonic
, ABSOLUTE_Y_MODE
, yyvsp
[-2].node
, yyloc
); }
2311 #line 301 "parser.y"
2312 { yyval
.node
= astnode_create_instruction(yyvsp
[-5].mnemonic
, PREINDEXED_INDIRECT_MODE
, yyvsp
[-3].node
, yyloc
); }
2316 #line 302 "parser.y"
2317 { yyval
.node
= astnode_create_instruction(yyvsp
[-5].mnemonic
, POSTINDEXED_INDIRECT_MODE
, yyvsp
[-3].node
, yyloc
); }
2321 #line 303 "parser.y"
2322 { yyval
.node
= astnode_create_instruction(yyvsp
[-3].mnemonic
, INDIRECT_MODE
, yyvsp
[-1].node
, yyloc
); }
2326 #line 307 "parser.y"
2327 { yyval
.node
= yyvsp
[0].node
; }
2331 #line 308 "parser.y"
2332 { yyval
.node
= astnode_create_sizeof(yyvsp
[0].node
, yyloc
); }
2336 #line 309 "parser.y"
2337 { yyval
.node
= yyvsp
[0].node
; }
2341 #line 310 "parser.y"
2342 { yyval
.node
= yyvsp
[0].node
; }
2346 #line 311 "parser.y"
2347 { yyval
.node
= yyvsp
[0].node
; }
2351 #line 312 "parser.y"
2352 { yyval
.node
= yyvsp
[0].node
; }
2356 #line 313 "parser.y"
2357 { yyval
.node
= astnode_create_pc(yyloc
); }
2361 #line 314 "parser.y"
2362 { yyval
.node
= yyvsp
[0].node
; }
2366 #line 315 "parser.y"
2367 { yyval
.node
= yyvsp
[0].node
; }
2371 #line 316 "parser.y"
2372 { yyval
.node
= yyvsp
[-1].node
; }
2376 #line 317 "parser.y"
2377 { yyval
.node
= astnode_create_forward_branch("+", yyloc
); }
2381 #line 318 "parser.y"
2382 { yyval
.node
= astnode_create_backward_branch("-", yyloc
); }
2386 #line 319 "parser.y"
2387 { yyval
.node
= astnode_create_forward_branch(yyvsp
[0].ident
, yyloc
); }
2391 #line 320 "parser.y"
2392 { yyval
.node
= astnode_create_backward_branch(yyvsp
[0].ident
, yyloc
); }
2396 #line 321 "parser.y"
2397 { yyval
.node
= astnode_create_mask(yyvsp
[0].node
, yyloc
); }
2401 #line 325 "parser.y"
2402 { yyval
.node
= yyvsp
[0].node
; }
2406 #line 326 "parser.y"
2407 { yyval
.node
= astnode_create_index(yyvsp
[-3].node
, yyvsp
[-1].node
, yyloc
); }
2411 #line 327 "parser.y"
2412 { yyval
.node
= astnode_create_index(yyvsp
[-3].node
, yyvsp
[-1].node
, yyloc
); }
2416 #line 331 "parser.y"
2417 { yyval
.node
= yyvsp
[0].node
; }
2421 #line 332 "parser.y"
2422 { yyval
.node
= yyvsp
[0].node
; }
2426 #line 336 "parser.y"
2427 { yyval
.node
= yyvsp
[0].node
; }
2431 #line 337 "parser.y"
2432 { yyval
.node
= yyvsp
[0].node
; }
2436 #line 341 "parser.y"
2437 { yyval
.node
= yyvsp
[0].node
; }
2441 #line 342 "parser.y"
2442 { yyval
.node
= NULL
; }
2446 #line 346 "parser.y"
2447 { yyval
.node
= astnode_create_scope(yyvsp
[-2].node
, yyvsp
[0].node
, yyloc
); }
2451 #line 350 "parser.y"
2452 { yyval
.node
= astnode_create_dot(yyvsp
[-2].node
, yyvsp
[0].node
, yyloc
); }
2456 #line 351 "parser.y"
2457 { yyval
.node
= astnode_create_dot(yyvsp
[-2].node
, yyvsp
[0].node
, yyloc
); }
2461 #line 355 "parser.y"
2462 { yyval
.node
= astnode_create_struc(yyvsp
[-1].node
, yyloc
); }
2466 #line 359 "parser.y"
2467 { yyval
.node
= yyvsp
[0].node
; }
2471 #line 360 "parser.y"
2472 { yyval
.node
= NULL
; }
2476 #line 364 "parser.y"
2477 { yyval
.node
= yyvsp
[0].node
; }
2481 #line 365 "parser.y"
2482 { yyval
.node
= yyvsp
[-2].node
; astnode_add_sibling(yyval
.node
, yyvsp
[0].node
); }
2486 #line 369 "parser.y"
2487 { yyval
.node
= yyvsp
[0].node
; }
2491 #line 370 "parser.y"
2492 { yyval
.node
= astnode_create_null(yyloc
); }
2496 #line 374 "parser.y"
2497 { yyval
.node
= astnode_create_local_id(yyvsp
[0].ident
, yyloc
); }
2501 #line 378 "parser.y"
2502 { yyval
.node
= astnode_create_arithmetic(PLUS_OPERATOR
, yyvsp
[-2].node
, yyvsp
[0].node
, yyloc
); }
2506 #line 379 "parser.y"
2507 { yyval
.node
= astnode_create_arithmetic(MINUS_OPERATOR
, yyvsp
[-2].node
, yyvsp
[0].node
, yyloc
); }
2511 #line 380 "parser.y"
2512 { yyval
.node
= astnode_create_arithmetic(MUL_OPERATOR
, yyvsp
[-2].node
, yyvsp
[0].node
, yyloc
); }
2516 #line 381 "parser.y"
2517 { yyval
.node
= astnode_create_arithmetic(DIV_OPERATOR
, yyvsp
[-2].node
, yyvsp
[0].node
, yyloc
); }
2521 #line 382 "parser.y"
2522 { yyval
.node
= astnode_create_arithmetic(MOD_OPERATOR
, yyvsp
[-2].node
, yyvsp
[0].node
, yyloc
); }
2526 #line 383 "parser.y"
2527 { yyval
.node
= astnode_create_arithmetic(AND_OPERATOR
, yyvsp
[-2].node
, yyvsp
[0].node
, yyloc
); }
2531 #line 384 "parser.y"
2532 { yyval
.node
= astnode_create_arithmetic(OR_OPERATOR
, yyvsp
[-2].node
, yyvsp
[0].node
, yyloc
); }
2536 #line 385 "parser.y"
2537 { yyval
.node
= astnode_create_arithmetic(XOR_OPERATOR
, yyvsp
[-2].node
, yyvsp
[0].node
, yyloc
); }
2541 #line 386 "parser.y"
2542 { yyval
.node
= astnode_create_arithmetic(SHL_OPERATOR
, yyvsp
[-2].node
, yyvsp
[0].node
, yyloc
); }
2546 #line 387 "parser.y"
2547 { yyval
.node
= astnode_create_arithmetic(SHR_OPERATOR
, yyvsp
[-2].node
, yyvsp
[0].node
, yyloc
); }
2551 #line 388 "parser.y"
2552 { yyval
.node
= astnode_create_arithmetic(NEG_OPERATOR
, yyvsp
[0].node
, NULL
, yyloc
); }
2556 #line 389 "parser.y"
2557 { yyval
.node
= astnode_create_arithmetic(NOT_OPERATOR
, yyvsp
[0].node
, NULL
, yyloc
); }
2561 #line 390 "parser.y"
2562 { yyval
.node
= astnode_create_arithmetic(BANK_OPERATOR
, yyvsp
[0].node
, NULL
, yyloc
); }
2566 #line 391 "parser.y"
2567 { yyval
.node
= astnode_create_arithmetic(LO_OPERATOR
, yyvsp
[0].node
, NULL
, yyloc
); }
2571 #line 392 "parser.y"
2572 { yyval
.node
= astnode_create_arithmetic(HI_OPERATOR
, yyvsp
[0].node
, NULL
, yyloc
); }
2576 #line 393 "parser.y"
2577 { yyval
.node
= astnode_create_arithmetic(UMINUS_OPERATOR
, yyvsp
[0].node
, NULL
, yyloc
); }
2581 #line 397 "parser.y"
2582 { yyval
.node
= astnode_create_arithmetic(EQ_OPERATOR
, yyvsp
[-2].node
, yyvsp
[0].node
, yyloc
); }
2586 #line 398 "parser.y"
2587 { yyval
.node
= astnode_create_arithmetic(NE_OPERATOR
, yyvsp
[-2].node
, yyvsp
[0].node
, yyloc
); }
2591 #line 399 "parser.y"
2592 { yyval
.node
= astnode_create_arithmetic(GT_OPERATOR
, yyvsp
[-2].node
, yyvsp
[0].node
, yyloc
); }
2596 #line 400 "parser.y"
2597 { yyval
.node
= astnode_create_arithmetic(LT_OPERATOR
, yyvsp
[-2].node
, yyvsp
[0].node
, yyloc
); }
2601 #line 401 "parser.y"
2602 { yyval
.node
= astnode_create_arithmetic(GE_OPERATOR
, yyvsp
[-2].node
, yyvsp
[0].node
, yyloc
); }
2606 #line 402 "parser.y"
2607 { yyval
.node
= astnode_create_arithmetic(LE_OPERATOR
, yyvsp
[-2].node
, yyvsp
[0].node
, yyloc
); }
2611 #line 406 "parser.y"
2612 { yyval
.node
= astnode_create_label(yyvsp
[0].label
, NULL
, NULL
, yyloc
); }
2616 #line 407 "parser.y"
2617 { yyval
.node
= astnode_create_local_label(yyvsp
[0].label
, yyloc
); }
2621 #line 408 "parser.y"
2622 { yyval
.node
= astnode_create_forward_branch_decl("+", yyloc
); }
2626 #line 409 "parser.y"
2627 { yyval
.node
= astnode_create_backward_branch_decl("-", yyloc
); }
2631 #line 410 "parser.y"
2632 { yyval
.node
= astnode_create_forward_branch_decl(yyvsp
[0].ident
, yyloc
); }
2636 #line 411 "parser.y"
2637 { yyval
.node
= astnode_create_backward_branch_decl(yyvsp
[0].ident
, yyloc
); }
2641 #line 415 "parser.y"
2642 { yyval
.node
= astnode_create_identifier(yyvsp
[0].ident
, yyloc
); }
2646 #line 419 "parser.y"
2647 { yyval
.node
= yyvsp
[0].node
; }
2651 #line 420 "parser.y"
2652 { yyval
.node
= astnode_create_null(yyloc
); }
2656 #line 424 "parser.y"
2657 { yyval
.node
= astnode_create_integer(yyvsp
[0].integer
, yyloc
); }
2661 #line 425 "parser.y"
2662 { yyval
.node
= astnode_create_string(yyvsp
[0].string
, yyloc
); }
2666 #line 429 "parser.y"
2667 { yyval
.node
= astnode_create_if(yyvsp
[-6].node
, yyvsp
[-4].node
, yyvsp
[-3].node
, yyvsp
[-2].node
, yyloc
); }
2671 #line 433 "parser.y"
2672 { yyval
.node
= yyvsp
[0].node
; }
2676 #line 434 "parser.y"
2677 { yyval
.node
= NULL
; }
2681 #line 438 "parser.y"
2682 { yyval
.node
= yyvsp
[0].node
; }
2686 #line 439 "parser.y"
2687 { yyval
.node
= yyvsp
[-1].node
; astnode_add_sibling(yyval
.node
, yyvsp
[0].node
); }
2691 #line 443 "parser.y"
2692 { yyval
.node
= astnode_create_case(yyvsp
[-2].node
, yyvsp
[0].node
, yyloc
); }
2696 #line 447 "parser.y"
2697 { yyval
.node
= yyvsp
[0].node
; }
2701 #line 448 "parser.y"
2702 { yyval
.node
= NULL
; }
2706 #line 452 "parser.y"
2707 { yyval
.node
= astnode_create_ifdef(yyvsp
[-5].node
, yyvsp
[-3].node
, yyvsp
[-2].node
, yyloc
); }
2711 #line 456 "parser.y"
2712 { yyval
.node
= astnode_create_ifndef(yyvsp
[-5].node
, yyvsp
[-3].node
, yyvsp
[-2].node
, yyloc
); }
2716 #line 460 "parser.y"
2717 { yyval
.node
= yyvsp
[-1].node
; }
2721 #line 461 "parser.y"
2722 { yyval
.node
= yyvsp
[-1].node
; }
2726 #line 465 "parser.y"
2727 { yyval
.node
= astnode_create_var_decl(0, yyvsp
[-1].node
, yyvsp
[0].node
, yyloc
); }
2731 #line 466 "parser.y"
2732 { yyval
.node
= astnode_create_var_decl(ZEROPAGE_FLAG
, yyvsp
[-1].node
, yyvsp
[0].node
, yyloc
); }
2736 #line 467 "parser.y"
2737 { yyval
.node
= astnode_create_var_decl(PUBLIC_FLAG
, yyvsp
[-1].node
, yyvsp
[0].node
, yyloc
); }
2741 #line 468 "parser.y"
2742 { yyval
.node
= astnode_create_var_decl(ZEROPAGE_FLAG
| PUBLIC_FLAG
, yyvsp
[-1].node
, yyvsp
[0].node
, yyloc
); }
2746 #line 469 "parser.y"
2747 { yyval
.node
= astnode_create_var_decl(PUBLIC_FLAG
| ZEROPAGE_FLAG
, yyvsp
[-1].node
, yyvsp
[0].node
, yyloc
); }
2751 #line 473 "parser.y"
2752 { yyval
.node
= astnode_create_data(yyvsp
[-1].node
, yyvsp
[0].node
, yyloc
); }
2756 #line 474 "parser.y"
2757 { yyval
.node
= astnode_create_storage(yyvsp
[0].node
, NULL
, yyloc
); }
2761 #line 475 "parser.y"
2762 { yyval
.node
= astnode_create_storage(yyvsp
[-3].node
, yyvsp
[-1].node
, yyloc
); }
2766 #line 479 "parser.y"
2767 { yyval
.node
= astnode_create_datatype(BYTE_DATATYPE
, NULL
, yyloc
); }
2771 #line 480 "parser.y"
2772 { yyval
.node
= astnode_create_datatype(CHAR_DATATYPE
, NULL
, yyloc
); }
2776 #line 481 "parser.y"
2777 { yyval
.node
= astnode_create_datatype(WORD_DATATYPE
, NULL
, yyloc
); }
2781 #line 482 "parser.y"
2782 { yyval
.node
= astnode_create_datatype(DWORD_DATATYPE
, NULL
, yyloc
); }
2786 #line 483 "parser.y"
2787 { yyval
.node
= astnode_create_datatype(USER_DATATYPE
, yyvsp
[0].node
, yyloc
); }
2791 #line 484 "parser.y"
2792 { yyval
.node
= astnode_create_datatype(USER_DATATYPE
, yyvsp
[0].node
, yyloc
); }
2796 #line 488 "parser.y"
2797 { yyval
.node
= yyvsp
[0].node
; }
2801 #line 489 "parser.y"
2802 { yyval
.node
= yyvsp
[-2].node
; astnode_add_sibling(yyval
.node
, yyvsp
[0].node
); }
2806 #line 493 "parser.y"
2807 { yyval
.node
= astnode_create_incsrc(yyvsp
[-1].node
, yyloc
); handle_incsrc(yyval
.node
); }
2811 #line 497 "parser.y"
2812 { yyval
.node
= astnode_create_incbin(yyvsp
[-1].node
, yyloc
); handle_incbin(yyval
.node
); }
2816 #line 501 "parser.y"
2817 { yyval
.node
= astnode_create_string(yyvsp
[0].string
, yyloc
); }
2821 #line 502 "parser.y"
2822 { yyval
.node
= astnode_create_file_path(scan_include('>'), yyloc
); }
2826 #line 506 "parser.y"
2827 { yyval
.node
= astnode_create_macro_decl(yyvsp
[-5].node
, yyvsp
[-4].node
, yyvsp
[-2].node
, yyloc
); }
2831 #line 510 "parser.y"
2832 { yyval
.node
= yyvsp
[0].node
; }
2836 #line 511 "parser.y"
2837 { yyval
.node
= NULL
; }
2841 #line 515 "parser.y"
2842 { yyval
.node
= astnode_create_macro(yyvsp
[-2].node
, yyvsp
[-1].node
, yyloc
); }
2846 #line 519 "parser.y"
2847 { yyval
.node
= yyvsp
[0].node
; }
2851 #line 520 "parser.y"
2852 { yyval
.node
= NULL
; }
2856 #line 524 "parser.y"
2857 { yyval
.node
= yyvsp
[0].node
; }
2861 #line 525 "parser.y"
2862 { yyval
.node
= yyvsp
[-2].node
; astnode_add_sibling(yyval
.node
, yyvsp
[0].node
); }
2866 #line 529 "parser.y"
2867 { yyval
.node
= astnode_create_equ(yyvsp
[-3].node
, yyvsp
[-1].node
, yyloc
); }
2871 #line 533 "parser.y"
2872 { yyval
.node
= astnode_create_assign(yyvsp
[-3].node
, yyvsp
[-1].node
, yyloc
); }
2876 #line 537 "parser.y"
2877 { yyval
.node
= astnode_create_equ(yyvsp
[-1].node
, astnode_create_integer(0, yyloc
), yyloc
); }
2881 #line 538 "parser.y"
2882 { yyval
.node
= astnode_create_equ(yyvsp
[-2].node
, yyvsp
[-1].node
, yyloc
); }
2886 #line 542 "parser.y"
2887 { yyval
.node
= astnode_create_public(yyvsp
[-1].node
, yyloc
); }
2891 #line 546 "parser.y"
2892 { yyval
.node
= astnode_create_extrn(yyvsp
[-4].node
, yyvsp
[-2].node
, yyvsp
[-1].node
, yyloc
); }
2896 #line 550 "parser.y"
2897 { yyval
.node
= yyvsp
[0].node
; }
2901 #line 551 "parser.y"
2902 { yyval
.node
= NULL
; }
2906 #line 555 "parser.y"
2907 { yyval
.node
= yyvsp
[0].node
; }
2911 #line 556 "parser.y"
2912 { yyval
.node
= astnode_create_datatype(USER_DATATYPE
, yyvsp
[0].node
, yyloc
); }
2916 #line 557 "parser.y"
2917 { yyval
.node
= astnode_create_integer(PROC_SYMBOL
, yyloc
); }
2921 #line 558 "parser.y"
2922 { yyval
.node
= astnode_create_integer(LABEL_SYMBOL
, yyloc
); }
2926 #line 562 "parser.y"
2927 { yyval
.node
= yyvsp
[0].node
; }
2931 #line 563 "parser.y"
2932 { yyval
.node
= yyvsp
[0].node
; }
2936 #line 567 "parser.y"
2937 { yyval
.node
= astnode_create_var_decl(0, yyvsp
[-1].node
, yyvsp
[0].node
, yyloc
); }
2941 #line 568 "parser.y"
2942 { yyval
.node
= astnode_create_var_decl(ZEROPAGE_FLAG
, yyvsp
[-1].node
, yyvsp
[0].node
, yyloc
); }
2946 #line 569 "parser.y"
2947 { yyval
.node
= astnode_create_var_decl(PUBLIC_FLAG
, yyvsp
[-1].node
, yyvsp
[0].node
, yyloc
); }
2951 #line 570 "parser.y"
2952 { yyval
.node
= astnode_create_var_decl(ZEROPAGE_FLAG
| PUBLIC_FLAG
, yyvsp
[-1].node
, yyvsp
[0].node
, yyloc
); }
2956 #line 571 "parser.y"
2957 { yyval
.node
= astnode_create_var_decl(PUBLIC_FLAG
| ZEROPAGE_FLAG
, yyvsp
[-1].node
, yyvsp
[0].node
, yyloc
); }
2961 #line 575 "parser.y"
2962 { yyval
.node
= astnode_create_storage(yyvsp
[-2].node
, yyvsp
[-1].node
, yyloc
); }
2966 #line 579 "parser.y"
2967 { yyval
.node
= astnode_create_datatype(BYTE_DATATYPE
, NULL
, yyloc
); }
2971 #line 580 "parser.y"
2972 { yyval
.node
= astnode_create_datatype(WORD_DATATYPE
, NULL
, yyloc
); }
2976 #line 581 "parser.y"
2977 { yyval
.node
= astnode_create_datatype(DWORD_DATATYPE
, NULL
, yyloc
); }
2983 /* Line 991 of yacc.c. */
2984 #line 2984 "parser.c"
2990 YY_STACK_PRINT (yyss
, yyssp
);
2995 /* Now `shift' the result of the reduction. Determine what state
2996 that goes to, based on the state we popped back to and the rule
2997 number reduced by. */
3001 yystate
= yypgoto
[yyn
- YYNTOKENS
] + *yyssp
;
3002 if (0 <= yystate
&& yystate
<= YYLAST
&& yycheck
[yystate
] == *yyssp
)
3003 yystate
= yytable
[yystate
];
3005 yystate
= yydefgoto
[yyn
- YYNTOKENS
];
3010 /*------------------------------------.
3011 | yyerrlab -- here on detecting error |
3012 `------------------------------------*/
3014 /* If not already recovering from an error, report this error. */
3019 yyn
= yypact
[yystate
];
3021 if (YYPACT_NINF
< yyn
&& yyn
< YYLAST
)
3023 YYSIZE_T yysize
= 0;
3024 int yytype
= YYTRANSLATE (yychar
);
3029 /* Start YYX at -YYN if negative to avoid negative indexes in
3031 for (yyx
= yyn
< 0 ? -yyn
: 0;
3032 yyx
< (int) (sizeof (yytname
) / sizeof (char *)); yyx
++)
3033 if (yycheck
[yyx
+ yyn
] == yyx
&& yyx
!= YYTERROR
)
3034 yysize
+= yystrlen (yytname
[yyx
]) + 15, yycount
++;
3035 yysize
+= yystrlen ("syntax error, unexpected ") + 1;
3036 yysize
+= yystrlen (yytname
[yytype
]);
3037 yymsg
= (char *) YYSTACK_ALLOC (yysize
);
3040 char *yyp
= yystpcpy (yymsg
, "syntax error, unexpected ");
3041 yyp
= yystpcpy (yyp
, yytname
[yytype
]);
3046 for (yyx
= yyn
< 0 ? -yyn
: 0;
3047 yyx
< (int) (sizeof (yytname
) / sizeof (char *));
3049 if (yycheck
[yyx
+ yyn
] == yyx
&& yyx
!= YYTERROR
)
3051 const char *yyq
= ! yycount
? ", expecting " : " or ";
3052 yyp
= yystpcpy (yyp
, yyq
);
3053 yyp
= yystpcpy (yyp
, yytname
[yyx
]);
3058 YYSTACK_FREE (yymsg
);
3061 yyerror ("syntax error; also virtual memory exhausted");
3064 #endif /* YYERROR_VERBOSE */
3065 yyerror ("syntax error");
3070 if (yyerrstatus
== 3)
3072 /* If just tried and failed to reuse lookahead token after an
3073 error, discard it. */
3075 /* Return failure if at end of input. */
3076 if (yychar
== YYEOF
)
3078 /* Pop the error token. */
3080 /* Pop the rest of the stack. */
3081 while (yyss
< yyssp
)
3083 YYDSYMPRINTF ("Error: popping", yystos
[*yyssp
], yyvsp
, yylsp
);
3084 yydestruct (yystos
[*yyssp
], yyvsp
, yylsp
);
3090 YYDSYMPRINTF ("Error: discarding", yytoken
, &yylval
, &yylloc
);
3091 yydestruct (yytoken
, &yylval
, &yylloc
);
3093 *++yylerrsp
= yylloc
;
3096 /* Else will try to reuse lookahead token after shifting the error
3101 /*----------------------------------------------------.
3102 | yyerrlab1 -- error raised explicitly by an action. |
3103 `----------------------------------------------------*/
3106 /* Suppress GCC warning that yyerrlab1 is unused when no action
3108 #if defined (__GNUC_MINOR__) && 2093 <= (__GNUC__ * 1000 + __GNUC_MINOR__)
3109 __attribute__ ((__unused__
))
3113 *++yylerrsp
= yyloc
;
3117 /*---------------------------------------------------------------.
3118 | yyerrlab2 -- pop states until the error token can be shifted. |
3119 `---------------------------------------------------------------*/
3121 yyerrstatus
= 3; /* Each real token shifted decrements this. */
3125 yyn
= yypact
[yystate
];
3126 if (yyn
!= YYPACT_NINF
)
3129 if (0 <= yyn
&& yyn
<= YYLAST
&& yycheck
[yyn
] == YYTERROR
)
3137 /* Pop the current state because it cannot handle the error token. */
3141 YYDSYMPRINTF ("Error: popping", yystos
[*yyssp
], yyvsp
, yylsp
);
3142 yydestruct (yystos
[yystate
], yyvsp
, yylsp
);
3146 YY_STACK_PRINT (yyss
, yyssp
);
3152 YYDPRINTF ((stderr
, "Shifting error token, "));
3155 YYLLOC_DEFAULT (yyloc
, yylsp
, (yylerrsp
- yylsp
));
3162 /*-------------------------------------.
3163 | yyacceptlab -- YYACCEPT comes here. |
3164 `-------------------------------------*/
3169 /*-----------------------------------.
3170 | yyabortlab -- YYABORT comes here. |
3171 `-----------------------------------*/
3177 /*----------------------------------------------.
3178 | yyoverflowlab -- parser overflow comes here. |
3179 `----------------------------------------------*/
3181 yyerror ("parser stack overflow");
3189 YYSTACK_FREE (yyss
);
3195 #line 581 "parser.y"
3198 * Takes care of switching to a new scanner input stream when a "incsrc" statement
3199 * has been encountered.
3200 * The current stream is pushed on a stack, and will be popped when EOF is reached
3201 * in the new stream.
3202 * @param n A node of type INCSRC_NODE
3204 void handle_incsrc(astnode
*n
)
3207 /* Get the node which describes the file to include */
3208 astnode
*file
= astnode_get_child(n
, 0);
3209 int quoted_form
= (astnode_get_type(file
) == STRING_NODE
) ? 1 : 0;
3210 switch (yypushandrestart(file
->string
, quoted_form
)) {
3215 /* Failed to open file */
3216 sprintf(errs
, "could not open '%s' for reading", file
->string
);
3220 /* Stack overflow */
3221 yyerror("Maximum include nesting level reached");
3226 // TODO: This shouldn't be done here but rather in astproc module.
3228 FILE *open_included_file(const char *, int, char **);
3231 * Takes care of including the binary contents of the file specified by a parsed
3232 * "incbin" statement.
3233 * Calls yyerror() if the file can't be included for some reason.
3234 * @param n A node of type INCBIN_NODE
3236 void handle_incbin(astnode
*n
)
3239 unsigned char *data
;
3242 /* Get the node which describes the file to include */
3243 astnode
*file
= astnode_get_child(n
, 0);
3244 const char *filename
= file
->string
;
3245 int quoted_form
= (astnode_get_type(file
) == STRING_NODE
) ? 1 : 0;
3246 /* Try to open it */
3247 fp
= open_included_file(filename
, quoted_form
, NULL
);
3250 fseek(fp
, 0, SEEK_END
);
3254 /* Allocate buffer to hold file contents */
3255 data
= (unsigned char *)malloc(size
);
3256 /* Read file contents into buffer */
3257 fread(data
, 1, size
, fp
);
3258 /* Insert binary node */
3259 astnode_add_sibling(n
, astnode_create_binary(data
, size
, n
->loc
) );
3264 /* Couldn't open file */
3265 sprintf(errs
, "could not open '%s' for reading", file
->string
);