1 /* A Bison parser, made by GNU Bison 2.1. */
3 /* Skeleton parser for Yacc-like parsing with Bison,
4 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005 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., 51 Franklin Street, Fifth Floor,
19 Boston, MA 02110-1301, 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 YYBISON_VERSION "2.1"
43 #define YYSKELETON_NAME "yacc.c"
48 /* Using locations. */
49 #define YYLSP_NEEDED 1
56 /* Put the tokens into the symbol table, so that GDB and other debuggers
60 TOK_STRING_LITERAL = 259,
61 TOK_INT_LITERAL = 260,
62 TOK_SECTION_NAME = 261,
63 TOK_SOURCE_NAME = 262,
102 #define TOK_IDENT 258
103 #define TOK_STRING_LITERAL 259
104 #define TOK_INT_LITERAL 260
105 #define TOK_SECTION_NAME 261
106 #define TOK_SOURCE_NAME 262
108 #define TOK_DOT_DOT 264
115 #define TOK_POWER 271
116 #define TOK_LSHIFT 272
117 #define TOK_RSHIFT 273
118 #define TOK_INT_SIZE 274
119 #define TOK_OPTIONS 275
120 #define TOK_CONSTANTS 276
121 #define TOK_SOURCES 277
122 #define TOK_FILTERS 278
123 #define TOK_SECTION 279
124 #define TOK_EXTERN 280
133 #define TOK_DEFINED 289
135 #define TOK_WARNING 291
136 #define TOK_ERROR 292
137 #define TOK_SIZEOF 293
146 /* Copy the first part of user declarations. */
147 #line 14 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
149 #include "ElftosbLexer.h"
150 #include "ElftosbAST.h"
153 #include "format_string.h"
155 #include "ConversionController.h"
157 using namespace elftosb;
159 //! Our special location type.
160 #define YYLTYPE token_loc_t
162 // this indicates that we're using our own type. it should be unset automatically
163 // but that's not working for some reason with the .hpp file.
164 #if defined(YYLTYPE_IS_TRIVIAL)
165 #undef YYLTYPE_IS_TRIVIAL
166 #define YYLTYPE_IS_TRIVIAL 0
169 //! Default location action
170 #define YYLLOC_DEFAULT(Current, Rhs, N) \
174 (Current).m_firstLine = YYRHSLOC(Rhs, 1).m_firstLine; \
175 (Current).m_lastLine = YYRHSLOC(Rhs, N).m_lastLine; \
179 (Current).m_firstLine = (Current).m_lastLine = YYRHSLOC(Rhs, 0).m_lastLine; \
183 //! Forward declaration of yylex().
184 static int yylex(YYSTYPE * lvalp, YYLTYPE * yylloc, ElftosbLexer * lexer);
186 // Forward declaration of error handling function.
187 static void yyerror(YYLTYPE * yylloc, ElftosbLexer * lexer, CommandFileASTNode ** resultAST, const char * error);
191 /* Enabling traces. */
196 /* Enabling verbose error messages. */
197 #ifdef YYERROR_VERBOSE
198 # undef YYERROR_VERBOSE
199 # define YYERROR_VERBOSE 1
201 # define YYERROR_VERBOSE 1
204 /* Enabling the token table. */
205 #ifndef YYTOKEN_TABLE
206 # define YYTOKEN_TABLE 0
209 #if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
210 #line 58 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
211 typedef union YYSTYPE {
213 elftosb::SizedIntegerValue * m_int;
216 elftosb::ASTNode * m_ast; // must use full name here because this is put into *.tab.hpp
218 /* Line 196 of yacc.c. */
219 #line 220 "/Users/creed/projects/fsl/fromsvr/elftosb/build/elftosb.build/Debug/elftosb.build/DerivedSources/elftosb_parser.tab.cpp"
220 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
221 # define YYSTYPE_IS_DECLARED 1
222 # define YYSTYPE_IS_TRIVIAL 1
225 #if ! defined (YYLTYPE) && ! defined (YYLTYPE_IS_DECLARED)
226 typedef struct YYLTYPE
233 # define yyltype YYLTYPE /* obsolescent; will be withdrawn */
234 # define YYLTYPE_IS_DECLARED 1
235 # define YYLTYPE_IS_TRIVIAL 1
239 /* Copy the second part of user declarations. */
242 /* Line 219 of yacc.c. */
243 #line 244 "/Users/creed/projects/fsl/fromsvr/elftosb/build/elftosb.build/Debug/elftosb.build/DerivedSources/elftosb_parser.tab.cpp"
245 #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
246 # define YYSIZE_T __SIZE_TYPE__
248 #if ! defined (YYSIZE_T) && defined (size_t)
249 # define YYSIZE_T size_t
251 #if ! defined (YYSIZE_T) && (defined (__STDC__) || defined (__cplusplus))
252 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
253 # define YYSIZE_T size_t
255 #if ! defined (YYSIZE_T)
256 # define YYSIZE_T unsigned int
262 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
263 # define YY_(msgid) dgettext ("bison-runtime", msgid)
267 # define YY_(msgid) msgid
271 #if ! defined (yyoverflow) || YYERROR_VERBOSE
273 /* The parser invokes alloca or malloc; define the necessary symbols. */
275 # ifdef YYSTACK_USE_ALLOCA
276 # if YYSTACK_USE_ALLOCA
278 # define YYSTACK_ALLOC __builtin_alloca
280 # define YYSTACK_ALLOC alloca
281 # if defined (__STDC__) || defined (__cplusplus)
282 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
283 # define YYINCLUDED_STDLIB_H
289 # ifdef YYSTACK_ALLOC
290 /* Pacify GCC's `empty if-body' warning. */
291 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
292 # ifndef YYSTACK_ALLOC_MAXIMUM
293 /* The OS might guarantee only one guard page at the bottom of the stack,
294 and a page size can be as small as 4096 bytes. So we cannot safely
295 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
296 to allow for a few compiler-allocated temporary stack slots. */
297 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2005 */
300 # define YYSTACK_ALLOC YYMALLOC
301 # define YYSTACK_FREE YYFREE
302 # ifndef YYSTACK_ALLOC_MAXIMUM
303 # define YYSTACK_ALLOC_MAXIMUM ((YYSIZE_T) -1)
309 # define YYMALLOC malloc
310 # if (! defined (malloc) && ! defined (YYINCLUDED_STDLIB_H) \
311 && (defined (__STDC__) || defined (__cplusplus)))
312 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
317 # if (! defined (free) && ! defined (YYINCLUDED_STDLIB_H) \
318 && (defined (__STDC__) || defined (__cplusplus)))
319 void free (void *); /* INFRINGES ON USER NAME SPACE */
326 #endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */
329 #if (! defined (yyoverflow) \
330 && (! defined (__cplusplus) \
331 || (defined (YYLTYPE_IS_TRIVIAL) && YYLTYPE_IS_TRIVIAL \
332 && defined (YYSTYPE_IS_TRIVIAL) && YYSTYPE_IS_TRIVIAL)))
334 /* A type that is properly aligned for any stack member. */
342 /* The size of the maximum gap between one aligned stack and the next. */
343 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
345 /* The size of an array large to enough to hold all stacks, each with
347 # define YYSTACK_BYTES(N) \
348 ((N) * (sizeof (short int) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
349 + 2 * YYSTACK_GAP_MAXIMUM)
351 /* Copy COUNT objects from FROM to TO. The source and destination do
354 # if defined (__GNUC__) && 1 < __GNUC__
355 # define YYCOPY(To, From, Count) \
356 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
358 # define YYCOPY(To, From, Count) \
362 for (yyi = 0; yyi < (Count); yyi++) \
363 (To)[yyi] = (From)[yyi]; \
369 /* Relocate STACK from its old location to the new one. The
370 local variables YYSIZE and YYSTACKSIZE give the old and new number of
371 elements in the stack, and YYPTR gives the new location of the
372 stack. Advance YYPTR to a properly aligned location for the next
374 # define YYSTACK_RELOCATE(Stack) \
377 YYSIZE_T yynewbytes; \
378 YYCOPY (&yyptr->Stack, Stack, yysize); \
379 Stack = &yyptr->Stack; \
380 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
381 yyptr += yynewbytes / sizeof (*yyptr); \
387 #if defined (__STDC__) || defined (__cplusplus)
388 typedef signed char yysigned_char;
390 typedef short int yysigned_char;
393 /* YYFINAL -- State number of the termination state. */
395 /* YYLAST -- Last index in YYTABLE. */
398 /* YYNTOKENS -- Number of terminals. */
400 /* YYNNTS -- Number of nonterminals. */
402 /* YYNRULES -- Number of rules. */
404 /* YYNRULES -- Number of states. */
405 #define YYNSTATES 238
407 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
409 #define YYMAXUTOK 297
411 #define YYTRANSLATE(YYX) \
412 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
414 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
415 static const unsigned char yytranslate[] =
417 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
418 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
419 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
420 2, 2, 2, 26, 2, 2, 2, 64, 23, 2,
421 9, 10, 62, 60, 16, 61, 20, 63, 2, 2,
422 2, 2, 2, 2, 2, 2, 2, 2, 18, 17,
423 25, 15, 19, 2, 2, 2, 2, 2, 2, 2,
424 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
425 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
426 2, 13, 2, 14, 59, 2, 2, 2, 2, 2,
427 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
428 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
429 2, 2, 2, 11, 24, 12, 22, 2, 2, 2,
430 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
431 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
432 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
433 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
434 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
435 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
436 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
437 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
438 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
439 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
440 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
441 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
442 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
443 5, 6, 7, 8, 21, 27, 28, 29, 30, 31,
444 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
445 42, 43, 44, 45, 46, 47, 48, 49, 50, 51,
446 52, 53, 54, 55, 56, 57, 58, 65
450 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
452 static const unsigned short int yyprhs[] =
454 0, 0, 3, 6, 8, 11, 13, 15, 17, 22,
455 27, 29, 32, 35, 36, 40, 45, 47, 50, 54,
456 55, 59, 66, 70, 71, 73, 77, 81, 83, 86,
457 93, 96, 97, 99, 100, 104, 108, 110, 113, 116,
458 118, 120, 121, 123, 126, 129, 131, 132, 134, 136,
459 138, 140, 145, 147, 148, 150, 152, 154, 156, 160,
460 165, 167, 169, 171, 175, 177, 180, 183, 184, 186,
461 188, 193, 195, 196, 200, 205, 207, 209, 211, 213,
462 217, 220, 221, 227, 230, 233, 236, 239, 246, 251,
463 254, 255, 257, 261, 263, 265, 267, 271, 275, 279,
464 283, 287, 291, 295, 299, 302, 307, 311, 316, 318,
465 322, 325, 327, 329, 331, 335, 339, 343, 347, 351,
466 355, 359, 363, 367, 371, 375, 377, 381, 385, 390,
470 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
471 static const yysigned_char yyrhs[] =
473 67, 0, -1, 68, 82, -1, 69, -1, 68, 69,
474 -1, 70, -1, 71, -1, 75, -1, 37, 11, 72,
475 12, -1, 38, 11, 72, 12, -1, 73, -1, 72,
476 73, -1, 74, 17, -1, -1, 3, 15, 111, -1,
477 39, 11, 76, 12, -1, 77, -1, 76, 77, -1,
478 78, 79, 17, -1, -1, 3, 15, 4, -1, 3,
479 15, 42, 9, 113, 10, -1, 9, 80, 10, -1,
480 -1, 81, -1, 80, 16, 81, -1, 3, 15, 111,
481 -1, 83, -1, 82, 83, -1, 41, 9, 113, 84,
482 10, 86, -1, 17, 85, -1, -1, 80, -1, -1,
483 30, 94, 17, -1, 11, 87, 12, -1, 88, -1,
484 87, 88, -1, 91, 17, -1, 105, -1, 108, -1,
485 -1, 90, -1, 89, 90, -1, 91, 17, -1, 108,
486 -1, -1, 92, -1, 101, -1, 106, -1, 107, -1,
487 45, 93, 94, 97, -1, 56, -1, -1, 113, -1,
488 4, -1, 7, -1, 95, -1, 95, 43, 7, -1,
489 7, 13, 95, 14, -1, 8, -1, 99, -1, 96,
490 -1, 95, 16, 96, -1, 6, -1, 22, 6, -1,
491 19, 98, -1, -1, 20, -1, 110, -1, 58, 9,
492 100, 10, -1, 80, -1, -1, 102, 103, 104, -1,
493 57, 102, 110, 104, -1, 47, -1, 46, -1, 7,
494 -1, 113, -1, 9, 113, 10, -1, 9, 10, -1,
495 -1, 43, 7, 11, 89, 12, -1, 48, 113, -1,
496 52, 4, -1, 53, 4, -1, 54, 4, -1, 49,
497 112, 11, 87, 12, 109, -1, 50, 11, 87, 12,
498 -1, 50, 108, -1, -1, 113, -1, 113, 21, 113,
499 -1, 112, -1, 4, -1, 113, -1, 112, 25, 112,
500 -1, 112, 19, 112, -1, 112, 29, 112, -1, 112,
501 30, 112, -1, 112, 31, 112, -1, 112, 32, 112,
502 -1, 112, 27, 112, -1, 112, 28, 112, -1, 26,
503 112, -1, 3, 9, 7, 10, -1, 9, 112, 10,
504 -1, 51, 9, 3, 10, -1, 115, -1, 7, 18,
505 3, -1, 18, 3, -1, 117, -1, 3, -1, 114,
506 -1, 115, 60, 115, -1, 115, 61, 115, -1, 115,
507 62, 115, -1, 115, 63, 115, -1, 115, 64, 115,
508 -1, 115, 33, 115, -1, 115, 23, 115, -1, 115,
509 24, 115, -1, 115, 59, 115, -1, 115, 34, 115,
510 -1, 115, 35, 115, -1, 116, -1, 115, 20, 36,
511 -1, 9, 115, 10, -1, 55, 9, 114, 10, -1,
512 55, 9, 3, 10, -1, 55, 9, 7, 10, -1,
513 60, 115, -1, 61, 115, -1, 5, -1
516 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
517 static const unsigned short int yyrline[] =
519 0, 162, 162, 172, 178, 186, 187, 188, 191, 197,
520 203, 209, 216, 217, 220, 227, 233, 239, 247, 259,
521 262, 267, 275, 276, 280, 286, 294, 301, 307, 314,
522 329, 334, 340, 345, 351, 357, 365, 371, 379, 380,
523 381, 382, 385, 391, 399, 400, 401, 404, 405, 406,
524 407, 410, 433, 443, 445, 449, 454, 459, 464, 469,
525 474, 479, 484, 490, 498, 503, 510, 515, 521, 526,
526 532, 544, 545, 548, 577, 614, 615, 618, 623, 630,
527 631, 632, 635, 642, 649, 654, 659, 666, 677, 681,
528 688, 691, 696, 703, 707, 714, 718, 725, 732, 739,
529 746, 753, 760, 767, 774, 779, 784, 789, 796, 799,
530 804, 812, 816, 821, 832, 839, 846, 853, 860, 867,
531 874, 881, 888, 895, 902, 909, 913, 918, 923, 928,
536 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
537 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
538 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
539 static const char *const yytname[] =
541 "$end", "error", "$undefined", "\"identifier\"", "\"string\"",
542 "\"integer\"", "\"section name\"", "\"source name\"",
543 "\"binary object\"", "'('", "')'", "'{'", "'}'", "'['", "']'", "'='",
544 "','", "';'", "':'", "'>'", "'.'", "\"..\"", "'~'", "'&'", "'|'", "'<'",
545 "'!'", "\"&&\"", "\"||\"", "\">=\"", "\"<=\"", "\"==\"", "\"!=\"",
546 "\"**\"", "\"<<\"", "\">>\"", "\"integer size\"", "\"options\"",
547 "\"constants\"", "\"sources\"", "\"filters\"", "\"section\"",
548 "\"extern\"", "\"from\"", "\"raw\"", "\"load\"", "\"jump\"", "\"call\"",
549 "\"mode\"", "\"if\"", "\"else\"", "\"defined\"", "\"info\"",
550 "\"warning\"", "\"error\"", "\"sizeof\"", "\"dcd\"", "\"hab\"",
551 "\"ivt\"", "'^'", "'+'", "'-'", "'*'", "'/'", "'%'", "UNARY_OP",
552 "$accept", "command_file", "blocks_list", "pre_section_block",
553 "options_block", "constants_block", "const_def_list",
554 "const_def_list_elem", "const_def", "sources_block", "source_def_list",
555 "source_def_list_elem", "source_def", "source_attrs_opt",
556 "source_attr_list", "source_attr_list_elem", "section_defs",
557 "section_def", "section_options_opt", "source_attr_list_opt",
558 "section_contents", "full_stmt_list", "full_stmt_list_elem",
559 "basic_stmt_list", "basic_stmt_list_elem", "basic_stmt", "load_stmt",
560 "dcd_opt", "load_data", "section_list", "section_list_elem",
561 "load_target_opt", "load_target", "ivt_def", "assignment_list_opt",
562 "call_stmt", "call_or_jump", "call_target", "call_arg_opt", "from_stmt",
563 "mode_stmt", "message_stmt", "if_stmt", "else_opt", "address_or_range",
564 "const_expr", "bool_expr", "int_const_expr", "symbol_ref", "expr",
565 "unary_expr", "int_value", 0
570 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
572 static const unsigned short int yytoknum[] =
574 0, 256, 257, 258, 259, 260, 261, 262, 263, 40,
575 41, 123, 125, 91, 93, 61, 44, 59, 58, 62,
576 46, 264, 126, 38, 124, 60, 33, 265, 266, 267,
577 268, 269, 270, 271, 272, 273, 274, 275, 276, 277,
578 278, 279, 280, 281, 282, 283, 284, 285, 286, 287,
579 288, 289, 290, 291, 292, 293, 294, 295, 296, 94,
580 43, 45, 42, 47, 37, 297
584 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
585 static const unsigned char yyr1[] =
587 0, 66, 67, 68, 68, 69, 69, 69, 70, 71,
588 72, 72, 73, 73, 74, 75, 76, 76, 77, 77,
589 78, 78, 79, 79, 80, 80, 81, 82, 82, 83,
590 84, 84, 85, 85, 86, 86, 87, 87, 88, 88,
591 88, 88, 89, 89, 90, 90, 90, 91, 91, 91,
592 91, 92, 93, 93, 94, 94, 94, 94, 94, 94,
593 94, 94, 95, 95, 96, 96, 97, 97, 98, 98,
594 99, 100, 100, 101, 101, 102, 102, 103, 103, 104,
595 104, 104, 105, 106, 107, 107, 107, 108, 109, 109,
596 109, 110, 110, 111, 111, 112, 112, 112, 112, 112,
597 112, 112, 112, 112, 112, 112, 112, 112, 113, 114,
598 114, 115, 115, 115, 115, 115, 115, 115, 115, 115,
599 115, 115, 115, 115, 115, 115, 115, 115, 115, 115,
603 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
604 static const unsigned char yyr2[] =
606 0, 2, 2, 1, 2, 1, 1, 1, 4, 4,
607 1, 2, 2, 0, 3, 4, 1, 2, 3, 0,
608 3, 6, 3, 0, 1, 3, 3, 1, 2, 6,
609 2, 0, 1, 0, 3, 3, 1, 2, 2, 1,
610 1, 0, 1, 2, 2, 1, 0, 1, 1, 1,
611 1, 4, 1, 0, 1, 1, 1, 1, 3, 4,
612 1, 1, 1, 3, 1, 2, 2, 0, 1, 1,
613 4, 1, 0, 3, 4, 1, 1, 1, 1, 3,
614 2, 0, 5, 2, 2, 2, 2, 6, 4, 2,
615 0, 1, 3, 1, 1, 1, 3, 3, 3, 3,
616 3, 3, 3, 3, 2, 4, 3, 4, 1, 3,
617 2, 1, 1, 1, 3, 3, 3, 3, 3, 3,
618 3, 3, 3, 3, 3, 1, 3, 3, 4, 4,
622 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
623 STATE-NUM when YYTABLE doesn't specify something else to do. Zero
624 means the default is an error. */
625 static const unsigned char yydefact[] =
627 0, 0, 0, 0, 0, 0, 3, 5, 6, 7,
628 13, 13, 19, 1, 0, 4, 2, 27, 0, 0,
629 10, 0, 0, 0, 0, 16, 23, 0, 28, 0,
630 8, 11, 12, 9, 0, 15, 17, 0, 0, 112,
631 133, 0, 0, 0, 0, 0, 0, 31, 113, 108,
632 125, 111, 112, 94, 0, 0, 0, 14, 93, 95,
633 20, 0, 0, 0, 24, 18, 0, 0, 110, 0,
634 131, 132, 33, 0, 0, 0, 0, 0, 0, 0,
635 0, 0, 0, 0, 0, 0, 0, 0, 108, 104,
636 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
637 0, 22, 0, 109, 127, 0, 0, 0, 32, 30,
638 0, 126, 120, 121, 119, 123, 124, 122, 114, 115,
639 116, 117, 118, 0, 106, 0, 97, 96, 102, 103,
640 98, 99, 100, 101, 0, 26, 25, 129, 130, 128,
641 41, 0, 29, 105, 107, 21, 0, 53, 76, 75,
642 0, 0, 0, 0, 0, 0, 0, 36, 0, 47,
643 48, 0, 39, 49, 50, 40, 55, 64, 56, 60,
644 0, 0, 0, 57, 62, 61, 54, 0, 52, 0,
645 83, 0, 84, 85, 86, 0, 35, 37, 38, 77,
646 81, 78, 0, 65, 72, 34, 0, 0, 46, 67,
647 41, 81, 91, 0, 73, 0, 71, 0, 63, 58,
648 0, 42, 0, 45, 0, 51, 0, 74, 0, 80,
649 0, 59, 70, 82, 43, 44, 68, 66, 69, 90,
650 92, 79, 0, 87, 41, 89, 0, 88
653 /* YYDEFGOTO[NTERM-NUM]. */
654 static const short int yydefgoto[] =
656 -1, 4, 5, 6, 7, 8, 19, 20, 21, 9,
657 24, 25, 26, 38, 63, 64, 16, 17, 73, 109,
658 142, 156, 157, 210, 211, 158, 159, 179, 172, 173,
659 174, 215, 227, 175, 207, 160, 161, 190, 204, 162,
660 163, 164, 165, 233, 201, 57, 58, 59, 48, 49,
664 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
666 #define YYPACT_NINF -181
667 static const short int yypact[] =
669 128, 17, 25, 48, 69, 123, -181, -181, -181, -181,
670 96, 96, 101, -181, 80, -181, 68, -181, 112, 85,
671 -181, 115, 89, 114, 91, -181, 124, 30, -181, 47,
672 -181, -181, -181, -181, 11, -181, -181, 134, 125, -181,
673 -181, 133, 30, 140, 144, 30, 30, 153, -181, 225,
674 -181, -181, 148, -181, 61, 61, 162, -181, 359, -181,
675 -181, 164, 159, 22, -181, -181, 172, 121, -181, 9,
676 -181, -181, 134, 168, 143, 30, 30, 30, 30, 30,
677 30, 30, 30, 30, 30, 30, 179, 303, 121, -181,
678 194, 61, 61, 61, 61, 61, 61, 61, 61, 30,
679 47, -181, 134, -181, -181, 188, 4, 200, 199, -181,
680 56, -181, 241, 231, 236, 86, 86, 247, 76, 76,
681 196, 196, 196, 208, -181, 210, -181, -181, 373, 373,
682 -181, -181, -181, -181, 216, -181, -181, -181, -181, -181,
683 314, 2, -181, -181, -181, -181, 220, 175, -181, -181,
684 30, 61, 228, 230, 237, 28, 147, -181, 223, -181,
685 -181, 108, -181, -181, -181, -181, -181, -181, 92, -181,
686 240, 243, 233, 15, -181, -181, -181, 242, -181, 2,
687 -181, 345, -181, -181, -181, 30, -181, -181, -181, 133,
688 246, -181, 7, -181, 134, -181, 7, 250, 361, 244,
689 314, 246, 248, 16, -181, 104, 199, 252, -181, -181,
690 190, -181, 251, -181, 75, -181, 160, -181, 30, -181,
691 261, -181, -181, -181, -181, -181, -181, -181, -181, 222,
692 -181, -181, 6, -181, 314, -181, 176, -181
695 /* YYPGOTO[NTERM-NUM]. */
696 static const short int yypgoto[] =
698 -181, -181, -181, 268, -181, -181, 266, 106, -181, -181,
699 -181, 254, -181, -181, -70, 177, -181, 267, -181, -181,
700 -181, -151, -155, -181, 107, -180, -181, -181, 127, 122,
701 129, -181, -181, -181, -181, -181, 163, -181, 118, -181,
702 -181, -181, -21, -181, 109, 221, -51, -27, 257, 270,
706 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
707 positive, shift that token. If negative, reduce the rule which
708 number is the opposite. If zero, do what YYDEFACT says.
709 If YYTABLE_NINF, syntax error. */
710 #define YYTABLE_NINF -1
711 static const unsigned char yytable[] =
713 47, 187, 108, 87, 89, 39, 166, 40, 167, 168,
714 169, 42, 105, 167, 138, 60, 106, 234, 212, 39,
715 43, 40, 66, 41, 170, 42, 219, 43, 10, 170,
716 212, 196, 101, 39, 43, 40, 11, 41, 102, 42,
717 126, 127, 128, 129, 130, 131, 132, 133, 43, 216,
718 52, 53, 40, 61, 41, 151, 54, 44, 197, 12,
719 171, 187, 45, 46, 52, 43, 40, 140, 41, 13,
720 54, 44, 134, 55, 148, 149, 45, 46, 39, 43,
721 40, 187, 41, 236, 42, 44, 141, 55, 18, 27,
722 45, 46, 18, 43, 23, 226, 74, 30, 56, 18,
723 181, 33, 44, 35, 23, 192, 74, 45, 46, 14,
724 66, 39, 56, 40, 176, 189, 44, 42, 221, 77,
725 196, 45, 46, 180, 206, 31, 43, 29, 31, 34,
726 44, 104, 32, 37, 191, 45, 46, 62, 83, 84,
727 85, 74, 65, 68, 75, 76, 81, 82, 83, 84,
728 85, 66, 176, 69, 77, 78, 79, 86, 202, 186,
729 1, 2, 3, 44, 14, 1, 2, 3, 45, 46,
730 72, 90, 229, 99, 100, 103, 220, 213, 110, 111,
731 80, 81, 82, 83, 84, 85, 123, 202, 237, 213,
732 146, 230, 147, 148, 149, 150, 151, 125, 137, 152,
733 153, 154, 223, 146, 155, 147, 148, 149, 150, 151,
734 139, 235, 152, 153, 154, 102, 74, 155, 143, 146,
735 144, 147, 148, 149, 150, 151, 145, 177, 152, 153,
736 154, 178, 182, 155, 183, 147, 148, 149, 150, 151,
737 188, 184, 152, 153, 154, 74, 193, 155, 75, 76,
738 195, 74, 194, 198, 75, 203, 74, 209, 77, 78,
739 79, 74, 222, 214, 77, 78, 79, 74, 225, 218,
740 75, 231, 232, 15, 77, 78, 79, 22, 36, 136,
741 77, 78, 79, 28, 80, 81, 82, 83, 84, 85,
742 80, 81, 82, 83, 84, 85, 81, 82, 83, 84,
743 85, 81, 82, 83, 84, 85, 199, 81, 82, 83,
744 84, 85, 67, 124, 205, 70, 71, 224, 185, 217,
745 0, 135, 91, 228, 88, 208, 107, 0, 92, 0,
746 93, 94, 95, 96, 97, 98, 0, 0, 0, 0,
747 0, 0, 0, 0, 0, 112, 113, 114, 115, 116,
748 117, 118, 119, 120, 121, 122, 200, 146, 0, 147,
749 148, 149, 150, 151, 91, 0, 152, 153, 154, 0,
750 92, 155, 93, 94, 95, 96, 97, 98, 91, 0,
751 0, 0, 0, 0, 92, 0, 93, 94, 95, 96,
752 97, 98, 91, 0, 0, 0, 0, 0, 92, 0,
753 0, 0, 95, 96, 97, 98, 147, 148, 149, 150,
754 151, 0, 0, 152, 153, 154, 0, 0, 155
757 static const short int yycheck[] =
759 27, 156, 72, 54, 55, 3, 4, 5, 6, 7,
760 8, 9, 3, 6, 10, 4, 7, 11, 198, 3,
761 18, 5, 18, 7, 22, 9, 10, 18, 11, 22,
762 210, 16, 10, 3, 18, 5, 11, 7, 16, 9,
763 91, 92, 93, 94, 95, 96, 97, 98, 18, 200,
764 3, 4, 5, 42, 7, 49, 9, 55, 43, 11,
765 58, 216, 60, 61, 3, 18, 5, 11, 7, 0,
766 9, 55, 99, 26, 46, 47, 60, 61, 3, 18,
767 5, 236, 7, 234, 9, 55, 30, 26, 3, 9,
768 60, 61, 3, 18, 3, 20, 20, 12, 51, 3,
769 151, 12, 55, 12, 3, 13, 20, 60, 61, 41,
770 18, 3, 51, 5, 141, 7, 55, 9, 14, 33,
771 16, 60, 61, 150, 194, 19, 18, 15, 22, 15,
772 55, 10, 17, 9, 161, 60, 61, 3, 62, 63,
773 64, 20, 17, 3, 23, 24, 60, 61, 62, 63,
774 64, 18, 179, 9, 33, 34, 35, 9, 185, 12,
775 37, 38, 39, 55, 41, 37, 38, 39, 60, 61,
776 17, 9, 12, 9, 15, 3, 203, 198, 10, 36,
777 59, 60, 61, 62, 63, 64, 7, 214, 12, 210,
778 43, 218, 45, 46, 47, 48, 49, 3, 10, 52,
779 53, 54, 12, 43, 57, 45, 46, 47, 48, 49,
780 10, 232, 52, 53, 54, 16, 20, 57, 10, 43,
781 10, 45, 46, 47, 48, 49, 10, 7, 52, 53,
782 54, 56, 4, 57, 4, 45, 46, 47, 48, 49,
783 17, 4, 52, 53, 54, 20, 6, 57, 23, 24,
784 17, 20, 9, 11, 23, 9, 20, 7, 33, 34,
785 35, 20, 10, 19, 33, 34, 35, 20, 17, 21,
786 23, 10, 50, 5, 33, 34, 35, 11, 24, 102,
787 33, 34, 35, 16, 59, 60, 61, 62, 63, 64,
788 59, 60, 61, 62, 63, 64, 60, 61, 62, 63,
789 64, 60, 61, 62, 63, 64, 179, 60, 61, 62,
790 63, 64, 42, 10, 192, 45, 46, 210, 155, 201,
791 -1, 100, 19, 214, 54, 196, 69, -1, 25, -1,
792 27, 28, 29, 30, 31, 32, -1, -1, -1, -1,
793 -1, -1, -1, -1, -1, 75, 76, 77, 78, 79,
794 80, 81, 82, 83, 84, 85, 11, 43, -1, 45,
795 46, 47, 48, 49, 19, -1, 52, 53, 54, -1,
796 25, 57, 27, 28, 29, 30, 31, 32, 19, -1,
797 -1, -1, -1, -1, 25, -1, 27, 28, 29, 30,
798 31, 32, 19, -1, -1, -1, -1, -1, 25, -1,
799 -1, -1, 29, 30, 31, 32, 45, 46, 47, 48,
800 49, -1, -1, 52, 53, 54, -1, -1, 57
803 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
804 symbol of state STATE-NUM. */
805 static const unsigned char yystos[] =
807 0, 37, 38, 39, 67, 68, 69, 70, 71, 75,
808 11, 11, 11, 0, 41, 69, 82, 83, 3, 72,
809 73, 74, 72, 3, 76, 77, 78, 9, 83, 15,
810 12, 73, 17, 12, 15, 12, 77, 9, 79, 3,
811 5, 7, 9, 18, 55, 60, 61, 113, 114, 115,
812 116, 117, 3, 4, 9, 26, 51, 111, 112, 113,
813 4, 42, 3, 80, 81, 17, 18, 115, 3, 9,
814 115, 115, 17, 84, 20, 23, 24, 33, 34, 35,
815 59, 60, 61, 62, 63, 64, 9, 112, 115, 112,
816 9, 19, 25, 27, 28, 29, 30, 31, 32, 9,
817 15, 10, 16, 3, 10, 3, 7, 114, 80, 85,
818 10, 36, 115, 115, 115, 115, 115, 115, 115, 115,
819 115, 115, 115, 7, 10, 3, 112, 112, 112, 112,
820 112, 112, 112, 112, 113, 111, 81, 10, 10, 10,
821 11, 30, 86, 10, 10, 10, 43, 45, 46, 47,
822 48, 49, 52, 53, 54, 57, 87, 88, 91, 92,
823 101, 102, 105, 106, 107, 108, 4, 6, 7, 8,
824 22, 58, 94, 95, 96, 99, 113, 7, 56, 93,
825 113, 112, 4, 4, 4, 102, 12, 88, 17, 7,
826 103, 113, 13, 6, 9, 17, 16, 43, 11, 94,
827 11, 110, 113, 9, 104, 95, 80, 100, 96, 7,
828 89, 90, 91, 108, 19, 97, 87, 104, 21, 10,
829 113, 14, 10, 12, 90, 17, 20, 98, 110, 12,
830 113, 10, 50, 109, 11, 108, 87, 12
833 #define yyerrok (yyerrstatus = 0)
834 #define yyclearin (yychar = YYEMPTY)
838 #define YYACCEPT goto yyacceptlab
839 #define YYABORT goto yyabortlab
840 #define YYERROR goto yyerrorlab
843 /* Like YYERROR except do call yyerror. This remains here temporarily
844 to ease the transition to the new meaning of YYERROR, for GCC.
845 Once GCC version 2 has supplanted version 1, this can go. */
847 #define YYFAIL goto yyerrlab
849 #define YYRECOVERING() (!!yyerrstatus)
851 #define YYBACKUP(Token, Value) \
853 if (yychar == YYEMPTY && yylen == 1) \
857 yytoken = YYTRANSLATE (yychar); \
863 yyerror (&yylloc, lexer, resultAST, YY_("syntax error: cannot back up")); \
870 #define YYERRCODE 256
873 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
874 If N is 0, then set CURRENT to the empty location which ends
875 the previous symbol: RHS[0] (always defined). */
877 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
878 #ifndef YYLLOC_DEFAULT
879 # define YYLLOC_DEFAULT(Current, Rhs, N) \
883 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
884 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
885 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
886 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
890 (Current).first_line = (Current).last_line = \
891 YYRHSLOC (Rhs, 0).last_line; \
892 (Current).first_column = (Current).last_column = \
893 YYRHSLOC (Rhs, 0).last_column; \
899 /* YY_LOCATION_PRINT -- Print the location on the stream.
900 This macro was not mandated originally: define only if we know
901 we won't break user code: when these are the locations we know. */
903 #ifndef YY_LOCATION_PRINT
904 # if YYLTYPE_IS_TRIVIAL
905 # define YY_LOCATION_PRINT(File, Loc) \
906 fprintf (File, "%d.%d-%d.%d", \
907 (Loc).first_line, (Loc).first_column, \
908 (Loc).last_line, (Loc).last_column)
910 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
915 /* YYLEX -- calling `yylex' with the right arguments. */
918 # define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM)
920 # define YYLEX yylex (&yylval, &yylloc, lexer)
923 /* Enable debugging if requested. */
927 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
928 # define YYFPRINTF fprintf
931 # define YYDPRINTF(Args) \
937 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
941 YYFPRINTF (stderr, "%s ", Title); \
942 yysymprint (stderr, \
943 Type, Value, Location); \
944 YYFPRINTF (stderr, "\n"); \
948 /*------------------------------------------------------------------.
949 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
951 `------------------------------------------------------------------*/
953 #if defined (__STDC__) || defined (__cplusplus)
955 yy_stack_print (short int *bottom, short int *top)
958 yy_stack_print (bottom, top)
963 YYFPRINTF (stderr, "Stack now");
964 for (/* Nothing. */; bottom <= top; ++bottom)
965 YYFPRINTF (stderr, " %d", *bottom);
966 YYFPRINTF (stderr, "\n");
969 # define YY_STACK_PRINT(Bottom, Top) \
972 yy_stack_print ((Bottom), (Top)); \
976 /*------------------------------------------------.
977 | Report that the YYRULE is going to be reduced. |
978 `------------------------------------------------*/
980 #if defined (__STDC__) || defined (__cplusplus)
982 yy_reduce_print (int yyrule)
985 yy_reduce_print (yyrule)
990 unsigned long int yylno = yyrline[yyrule];
991 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu), ",
993 /* Print the symbols being reduced, and their result. */
994 for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++)
995 YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]);
996 YYFPRINTF (stderr, "-> %s\n", yytname[yyr1[yyrule]]);
999 # define YY_REDUCE_PRINT(Rule) \
1002 yy_reduce_print (Rule); \
1005 /* Nonzero means print parse trace. It is left uninitialized so that
1006 multiple parsers can coexist. */
1008 #else /* !YYDEBUG */
1009 # define YYDPRINTF(Args)
1010 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
1011 # define YY_STACK_PRINT(Bottom, Top)
1012 # define YY_REDUCE_PRINT(Rule)
1013 #endif /* !YYDEBUG */
1016 /* YYINITDEPTH -- initial size of the parser's stacks. */
1018 # define YYINITDEPTH 200
1021 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1022 if the built-in stack extension method is used).
1024 Do not make this value too large; the results are undefined if
1025 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
1026 evaluated with infinite-precision integer arithmetic. */
1029 # define YYMAXDEPTH 10000
1037 # if defined (__GLIBC__) && defined (_STRING_H)
1038 # define yystrlen strlen
1040 /* Return the length of YYSTR. */
1042 # if defined (__STDC__) || defined (__cplusplus)
1043 yystrlen (const char *yystr)
1049 const char *yys = yystr;
1051 while (*yys++ != '\0')
1054 return yys - yystr - 1;
1060 # if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
1061 # define yystpcpy stpcpy
1063 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1066 # if defined (__STDC__) || defined (__cplusplus)
1067 yystpcpy (char *yydest, const char *yysrc)
1069 yystpcpy (yydest, yysrc)
1075 const char *yys = yysrc;
1077 while ((*yyd++ = *yys++) != '\0')
1086 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1087 quotes and backslashes, so that it's suitable for yyerror. The
1088 heuristic is that double-quoting is unnecessary unless the string
1089 contains an apostrophe, a comma, or backslash (other than
1090 backslash-backslash). YYSTR is taken from yytname. If YYRES is
1091 null, do not copy; instead, return the length of what the result
1094 yytnamerr (char *yyres, const char *yystr)
1099 char const *yyp = yystr;
1106 goto do_not_strip_quotes;
1110 goto do_not_strip_quotes;
1123 do_not_strip_quotes: ;
1127 return yystrlen (yystr);
1129 return yystpcpy (yyres, yystr) - yyres;
1133 #endif /* YYERROR_VERBOSE */
1138 /*--------------------------------.
1139 | Print this symbol on YYOUTPUT. |
1140 `--------------------------------*/
1142 #if defined (__STDC__) || defined (__cplusplus)
1144 yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp)
1147 yysymprint (yyoutput, yytype, yyvaluep, yylocationp)
1151 YYLTYPE *yylocationp;
1154 /* Pacify ``unused variable'' warnings. */
1158 if (yytype < YYNTOKENS)
1159 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
1161 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
1163 YY_LOCATION_PRINT (yyoutput, *yylocationp);
1164 YYFPRINTF (yyoutput, ": ");
1167 if (yytype < YYNTOKENS)
1168 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
1175 YYFPRINTF (yyoutput, ")");
1178 #endif /* ! YYDEBUG */
1179 /*-----------------------------------------------.
1180 | Release the memory associated to this symbol. |
1181 `-----------------------------------------------*/
1183 #if defined (__STDC__) || defined (__cplusplus)
1185 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp)
1188 yydestruct (yymsg, yytype, yyvaluep, yylocationp)
1192 YYLTYPE *yylocationp;
1195 /* Pacify ``unused variable'' warnings. */
1201 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1205 case 3: /* "\"identifier\"" */
1206 #line 158 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
1207 { delete (yyvaluep->m_str); };
1208 #line 1209 "/Users/creed/projects/fsl/fromsvr/elftosb/build/elftosb.build/Debug/elftosb.build/DerivedSources/elftosb_parser.tab.cpp"
1210 case 4: /* "\"string\"" */
1211 #line 158 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
1212 { delete (yyvaluep->m_str); };
1213 #line 1214 "/Users/creed/projects/fsl/fromsvr/elftosb/build/elftosb.build/Debug/elftosb.build/DerivedSources/elftosb_parser.tab.cpp"
1215 case 5: /* "\"integer\"" */
1216 #line 158 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
1217 { delete (yyvaluep->m_int); };
1218 #line 1219 "/Users/creed/projects/fsl/fromsvr/elftosb/build/elftosb.build/Debug/elftosb.build/DerivedSources/elftosb_parser.tab.cpp"
1220 case 6: /* "\"section name\"" */
1221 #line 158 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
1222 { delete (yyvaluep->m_str); };
1223 #line 1224 "/Users/creed/projects/fsl/fromsvr/elftosb/build/elftosb.build/Debug/elftosb.build/DerivedSources/elftosb_parser.tab.cpp"
1225 case 7: /* "\"source name\"" */
1226 #line 158 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
1227 { delete (yyvaluep->m_str); };
1228 #line 1229 "/Users/creed/projects/fsl/fromsvr/elftosb/build/elftosb.build/Debug/elftosb.build/DerivedSources/elftosb_parser.tab.cpp"
1230 case 8: /* "\"binary object\"" */
1231 #line 158 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
1232 { delete (yyvaluep->m_blob); };
1233 #line 1234 "/Users/creed/projects/fsl/fromsvr/elftosb/build/elftosb.build/Debug/elftosb.build/DerivedSources/elftosb_parser.tab.cpp"
1235 case 36: /* "\"integer size\"" */
1236 #line 158 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
1237 { delete (yyvaluep->m_int); };
1238 #line 1239 "/Users/creed/projects/fsl/fromsvr/elftosb/build/elftosb.build/Debug/elftosb.build/DerivedSources/elftosb_parser.tab.cpp"
1247 /* Prevent warnings from -Wmissing-prototypes. */
1249 #ifdef YYPARSE_PARAM
1250 # if defined (__STDC__) || defined (__cplusplus)
1251 int yyparse (void *YYPARSE_PARAM);
1255 #else /* ! YYPARSE_PARAM */
1256 #if defined (__STDC__) || defined (__cplusplus)
1257 int yyparse (ElftosbLexer * lexer, CommandFileASTNode ** resultAST);
1261 #endif /* ! YYPARSE_PARAM */
1272 #ifdef YYPARSE_PARAM
1273 # if defined (__STDC__) || defined (__cplusplus)
1274 int yyparse (void *YYPARSE_PARAM)
1276 int yyparse (YYPARSE_PARAM)
1277 void *YYPARSE_PARAM;
1279 #else /* ! YYPARSE_PARAM */
1280 #if defined (__STDC__) || defined (__cplusplus)
1282 yyparse (ElftosbLexer * lexer, CommandFileASTNode ** resultAST)
1285 yyparse (lexer, resultAST)
1286 ElftosbLexer * lexer;
1287 CommandFileASTNode ** resultAST;
1291 /* The look-ahead symbol. */
1294 /* The semantic value of the look-ahead symbol. */
1297 /* Number of syntax errors so far. */
1299 /* Location data for the look-ahead symbol. */
1305 /* Number of tokens to shift before error messages enabled. */
1307 /* Look-ahead token as an internal (translated) token number. */
1310 /* Three stacks and their tools:
1311 `yyss': related to states,
1312 `yyvs': related to semantic values,
1313 `yyls': related to locations.
1315 Refer to the stacks thru separate pointers, to allow yyoverflow
1316 to reallocate them elsewhere. */
1318 /* The state stack. */
1319 short int yyssa[YYINITDEPTH];
1320 short int *yyss = yyssa;
1323 /* The semantic value stack. */
1324 YYSTYPE yyvsa[YYINITDEPTH];
1325 YYSTYPE *yyvs = yyvsa;
1328 /* The location stack. */
1329 YYLTYPE yylsa[YYINITDEPTH];
1330 YYLTYPE *yyls = yylsa;
1332 /* The locations where the error started and ended. */
1333 YYLTYPE yyerror_range[2];
1335 #define YYPOPSTACK (yyvsp--, yyssp--, yylsp--)
1337 YYSIZE_T yystacksize = YYINITDEPTH;
1339 /* The variables used to return semantic value and location from the
1344 /* When reducing, the number of symbols on the RHS of the reduced
1348 YYDPRINTF ((stderr, "Starting parse\n"));
1353 yychar = YYEMPTY; /* Cause a token to be read. */
1355 /* Initialize stack pointers.
1356 Waste one element of value and location stack
1357 so that they stay on the same level as the state stack.
1358 The wasted elements are never initialized. */
1363 #if YYLTYPE_IS_TRIVIAL
1364 /* Initialize the default location before parsing starts. */
1365 yylloc.first_line = yylloc.last_line = 1;
1366 yylloc.first_column = yylloc.last_column = 0;
1371 /*------------------------------------------------------------.
1372 | yynewstate -- Push a new state, which is found in yystate. |
1373 `------------------------------------------------------------*/
1375 /* In all cases, when you get here, the value and location stacks
1376 have just been pushed. so pushing a state here evens the stacks.
1383 if (yyss + yystacksize - 1 <= yyssp)
1385 /* Get the current used size of the three stacks, in elements. */
1386 YYSIZE_T yysize = yyssp - yyss + 1;
1390 /* Give user a chance to reallocate the stack. Use copies of
1391 these so that the &'s don't force the real ones into
1393 YYSTYPE *yyvs1 = yyvs;
1394 short int *yyss1 = yyss;
1395 YYLTYPE *yyls1 = yyls;
1397 /* Each stack pointer address is followed by the size of the
1398 data in use in that stack, in bytes. This used to be a
1399 conditional around just the two extra args, but that might
1400 be undefined if yyoverflow is a macro. */
1401 yyoverflow (YY_("memory exhausted"),
1402 &yyss1, yysize * sizeof (*yyssp),
1403 &yyvs1, yysize * sizeof (*yyvsp),
1404 &yyls1, yysize * sizeof (*yylsp),
1410 #else /* no yyoverflow */
1411 # ifndef YYSTACK_RELOCATE
1412 goto yyexhaustedlab;
1414 /* Extend the stack our own way. */
1415 if (YYMAXDEPTH <= yystacksize)
1416 goto yyexhaustedlab;
1418 if (YYMAXDEPTH < yystacksize)
1419 yystacksize = YYMAXDEPTH;
1422 short int *yyss1 = yyss;
1423 union yyalloc *yyptr =
1424 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1426 goto yyexhaustedlab;
1427 YYSTACK_RELOCATE (yyss);
1428 YYSTACK_RELOCATE (yyvs);
1429 YYSTACK_RELOCATE (yyls);
1430 # undef YYSTACK_RELOCATE
1432 YYSTACK_FREE (yyss1);
1435 #endif /* no yyoverflow */
1437 yyssp = yyss + yysize - 1;
1438 yyvsp = yyvs + yysize - 1;
1439 yylsp = yyls + yysize - 1;
1441 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1442 (unsigned long int) yystacksize));
1444 if (yyss + yystacksize - 1 <= yyssp)
1448 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1457 /* Do appropriate processing given the current state. */
1458 /* Read a look-ahead token if we need one and don't already have one. */
1461 /* First try to decide what to do without reference to look-ahead token. */
1463 yyn = yypact[yystate];
1464 if (yyn == YYPACT_NINF)
1467 /* Not known => get a look-ahead token if don't already have one. */
1469 /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */
1470 if (yychar == YYEMPTY)
1472 YYDPRINTF ((stderr, "Reading a token: "));
1476 if (yychar <= YYEOF)
1478 yychar = yytoken = YYEOF;
1479 YYDPRINTF ((stderr, "Now at end of input.\n"));
1483 yytoken = YYTRANSLATE (yychar);
1484 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
1487 /* If the proper action on seeing token YYTOKEN is to reduce or to
1488 detect an error, take that action. */
1490 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1495 if (yyn == 0 || yyn == YYTABLE_NINF)
1504 /* Shift the look-ahead token. */
1505 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
1507 /* Discard the token being shifted unless it is eof. */
1508 if (yychar != YYEOF)
1514 /* Count tokens shifted since error; after three, turn off error
1523 /*-----------------------------------------------------------.
1524 | yydefault -- do the default action for the current state. |
1525 `-----------------------------------------------------------*/
1527 yyn = yydefact[yystate];
1533 /*-----------------------------.
1534 | yyreduce -- Do a reduction. |
1535 `-----------------------------*/
1537 /* yyn is the number of a rule to reduce with. */
1540 /* If YYLEN is nonzero, implement the default value of the action:
1543 Otherwise, the following line sets YYVAL to garbage.
1544 This behavior is undocumented and Bison
1545 users should not rely upon it. Assigning to YYVAL
1546 unconditionally makes the parser a bit smaller, and it avoids a
1547 GCC warning that YYVAL may be used uninitialized. */
1548 yyval = yyvsp[1-yylen];
1550 /* Default location. */
1551 YYLLOC_DEFAULT (yyloc, yylsp - yylen, yylen);
1552 YY_REDUCE_PRINT (yyn);
1556 #line 163 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
1558 CommandFileASTNode * commandFile = new CommandFileASTNode();
1559 commandFile->setBlocks(dynamic_cast<ListASTNode*>((yyvsp[-1].m_ast)));
1560 commandFile->setSections(dynamic_cast<ListASTNode*>((yyvsp[0].m_ast)));
1561 commandFile->setLocation((yylsp[-1]), (yylsp[0]));
1562 *resultAST = commandFile;
1567 #line 173 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
1569 ListASTNode * list = new ListASTNode();
1570 list->appendNode((yyvsp[0].m_ast));
1571 (yyval.m_ast) = list;
1576 #line 179 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
1578 dynamic_cast<ListASTNode*>((yyvsp[-1].m_ast))->appendNode((yyvsp[0].m_ast));
1579 (yyval.m_ast) = (yyvsp[-1].m_ast);
1584 #line 186 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
1585 { (yyval.m_ast) = (yyvsp[0].m_ast); ;}
1589 #line 187 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
1590 { (yyval.m_ast) = (yyvsp[0].m_ast); ;}
1594 #line 188 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
1595 { (yyval.m_ast) = (yyvsp[0].m_ast); ;}
1599 #line 192 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
1601 (yyval.m_ast) = new OptionsBlockASTNode(dynamic_cast<ListASTNode *>((yyvsp[-1].m_ast)));
1606 #line 198 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
1608 (yyval.m_ast) = new ConstantsBlockASTNode(dynamic_cast<ListASTNode *>((yyvsp[-1].m_ast)));
1613 #line 204 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
1615 ListASTNode * list = new ListASTNode();
1616 list->appendNode((yyvsp[0].m_ast));
1617 (yyval.m_ast) = list;
1622 #line 210 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
1624 dynamic_cast<ListASTNode*>((yyvsp[-1].m_ast))->appendNode((yyvsp[0].m_ast));
1625 (yyval.m_ast) = (yyvsp[-1].m_ast);
1630 #line 216 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
1631 { (yyval.m_ast) = (yyvsp[-1].m_ast); ;}
1635 #line 217 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
1636 { (yyval.m_ast) = NULL; ;}
1640 #line 221 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
1642 (yyval.m_ast) = new AssignmentASTNode((yyvsp[-2].m_str), (yyvsp[0].m_ast));
1643 (yyval.m_ast)->setLocation((yylsp[-2]), (yylsp[0]));
1648 #line 228 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
1650 (yyval.m_ast) = new SourcesBlockASTNode(dynamic_cast<ListASTNode *>((yyvsp[-1].m_ast)));
1655 #line 234 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
1657 ListASTNode * list = new ListASTNode();
1658 list->appendNode((yyvsp[0].m_ast));
1659 (yyval.m_ast) = list;
1664 #line 240 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
1666 dynamic_cast<ListASTNode*>((yyvsp[-1].m_ast))->appendNode((yyvsp[0].m_ast));
1667 (yyval.m_ast) = (yyvsp[-1].m_ast);
1672 #line 248 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
1674 // tell the lexer that this is the name of a source file
1675 SourceDefASTNode * node = dynamic_cast<SourceDefASTNode*>((yyvsp[-2].m_ast));
1676 if ((yyvsp[-1].m_ast))
1678 node->setAttributes(dynamic_cast<ListASTNode*>((yyvsp[-1].m_ast)));
1680 node->setLocation(node->getLocation(), (yylsp[0]));
1681 lexer->addSourceName(node->getName());
1682 (yyval.m_ast) = (yyvsp[-2].m_ast);
1687 #line 259 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
1688 { (yyval.m_ast) = NULL; ;}
1692 #line 263 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
1694 (yyval.m_ast) = new PathSourceDefASTNode((yyvsp[-2].m_str), (yyvsp[0].m_str));
1695 (yyval.m_ast)->setLocation((yylsp[-2]), (yylsp[0]));
1700 #line 268 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
1702 (yyval.m_ast) = new ExternSourceDefASTNode((yyvsp[-5].m_str), dynamic_cast<ExprASTNode*>((yyvsp[-1].m_ast)));
1703 (yyval.m_ast)->setLocation((yylsp[-5]), (yylsp[0]));
1708 #line 275 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
1709 { (yyval.m_ast) = (yyvsp[-1].m_ast); ;}
1713 #line 276 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
1714 { (yyval.m_ast) = NULL; ;}
1718 #line 281 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
1720 ListASTNode * list = new ListASTNode();
1721 list->appendNode((yyvsp[0].m_ast));
1722 (yyval.m_ast) = list;
1727 #line 287 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
1729 dynamic_cast<ListASTNode*>((yyvsp[-2].m_ast))->appendNode((yyvsp[0].m_ast));
1730 (yyval.m_ast) = (yyvsp[-2].m_ast);
1735 #line 295 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
1737 (yyval.m_ast) = new AssignmentASTNode((yyvsp[-2].m_str), (yyvsp[0].m_ast));
1738 (yyval.m_ast)->setLocation((yylsp[-2]), (yylsp[0]));
1743 #line 302 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
1745 ListASTNode * list = new ListASTNode();
1746 list->appendNode((yyvsp[0].m_ast));
1747 (yyval.m_ast) = list;
1752 #line 308 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
1754 dynamic_cast<ListASTNode*>((yyvsp[-1].m_ast))->appendNode((yyvsp[0].m_ast));
1755 (yyval.m_ast) = (yyvsp[-1].m_ast);
1760 #line 315 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
1762 SectionContentsASTNode * sectionNode = dynamic_cast<SectionContentsASTNode*>((yyvsp[0].m_ast));
1765 ExprASTNode * exprNode = dynamic_cast<ExprASTNode*>((yyvsp[-3].m_ast));
1766 sectionNode->setSectionNumberExpr(exprNode);
1767 sectionNode->setOptions(dynamic_cast<ListASTNode*>((yyvsp[-2].m_ast)));
1768 sectionNode->setLocation((yylsp[-5]), sectionNode->getLocation());
1770 (yyval.m_ast) = (yyvsp[0].m_ast);
1775 #line 330 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
1777 (yyval.m_ast) = (yyvsp[0].m_ast);
1782 #line 334 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
1784 (yyval.m_ast) = NULL;
1789 #line 341 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
1791 (yyval.m_ast) = (yyvsp[0].m_ast);
1796 #line 345 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
1798 (yyval.m_ast) = NULL;
1803 #line 352 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
1805 DataSectionContentsASTNode * dataSection = new DataSectionContentsASTNode((yyvsp[-1].m_ast));
1806 dataSection->setLocation((yylsp[-2]), (yylsp[0]));
1807 (yyval.m_ast) = dataSection;
1812 #line 358 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
1814 ListASTNode * listNode = dynamic_cast<ListASTNode*>((yyvsp[-1].m_ast));
1815 (yyval.m_ast) = new BootableSectionContentsASTNode(listNode);
1816 (yyval.m_ast)->setLocation((yylsp[-2]), (yylsp[0]));
1821 #line 366 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
1823 ListASTNode * list = new ListASTNode();
1824 list->appendNode((yyvsp[0].m_ast));
1825 (yyval.m_ast) = list;
1830 #line 372 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
1832 dynamic_cast<ListASTNode*>((yyvsp[-1].m_ast))->appendNode((yyvsp[0].m_ast));
1833 (yyval.m_ast) = (yyvsp[-1].m_ast);
1838 #line 379 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
1839 { (yyval.m_ast) = (yyvsp[-1].m_ast); ;}
1843 #line 380 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
1844 { (yyval.m_ast) = (yyvsp[0].m_ast); ;}
1848 #line 381 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
1849 { (yyval.m_ast) = (yyvsp[0].m_ast); ;}
1853 #line 382 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
1854 { (yyval.m_ast) = NULL; ;}
1858 #line 386 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
1860 ListASTNode * list = new ListASTNode();
1861 list->appendNode((yyvsp[0].m_ast));
1862 (yyval.m_ast) = list;
1867 #line 392 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
1869 dynamic_cast<ListASTNode*>((yyvsp[-1].m_ast))->appendNode((yyvsp[0].m_ast));
1870 (yyval.m_ast) = (yyvsp[-1].m_ast);
1875 #line 399 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
1876 { (yyval.m_ast) = (yyvsp[-1].m_ast); ;}
1880 #line 400 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
1881 { (yyval.m_ast) = (yyvsp[0].m_ast); ;}
1885 #line 401 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
1886 { (yyval.m_ast) = NULL; ;}
1890 #line 404 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
1891 { (yyval.m_ast) = (yyvsp[0].m_ast); ;}
1895 #line 405 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
1896 { (yyval.m_ast) = (yyvsp[0].m_ast); ;}
1900 #line 406 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
1901 { (yyval.m_ast) = (yyvsp[0].m_ast); ;}
1905 #line 407 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
1906 { (yyval.m_ast) = (yyvsp[0].m_ast); ;}
1910 #line 411 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
1912 LoadStatementASTNode * stmt = new LoadStatementASTNode();
1913 stmt->setData((yyvsp[-1].m_ast));
1914 stmt->setTarget((yyvsp[0].m_ast));
1915 // set dcd load flag if the "dcd" keyword was present.
1916 if ((yyvsp[-2].m_num))
1918 stmt->setDCDLoad(true);
1920 // set char locations for the statement
1921 if ((yyvsp[0].m_ast))
1923 stmt->setLocation((yylsp[-3]), (yylsp[0]));
1927 stmt->setLocation((yylsp[-3]), (yylsp[-1]));
1929 (yyval.m_ast) = stmt;
1934 #line 434 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
1936 if (!elftosb::g_enableHABSupport)
1938 yyerror(&yylloc, lexer, resultAST, "HAB features not supported with the selected family");
1947 #line 443 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
1948 { (yyval.m_num) = 0; ;}
1952 #line 446 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
1954 (yyval.m_ast) = (yyvsp[0].m_ast);
1959 #line 450 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
1961 (yyval.m_ast) = new StringConstASTNode((yyvsp[0].m_str));
1962 (yyval.m_ast)->setLocation((yylsp[0]));
1967 #line 455 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
1969 (yyval.m_ast) = new SourceASTNode((yyvsp[0].m_str));
1970 (yyval.m_ast)->setLocation((yylsp[0]));
1975 #line 460 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
1977 (yyval.m_ast) = new SectionMatchListASTNode(dynamic_cast<ListASTNode*>((yyvsp[0].m_ast)));
1978 (yyval.m_ast)->setLocation((yylsp[0]));
1983 #line 465 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
1985 (yyval.m_ast) = new SectionMatchListASTNode(dynamic_cast<ListASTNode*>((yyvsp[-2].m_ast)), (yyvsp[0].m_str));
1986 (yyval.m_ast)->setLocation((yylsp[-2]), (yylsp[0]));
1991 #line 470 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
1993 (yyval.m_ast) = new SectionMatchListASTNode(dynamic_cast<ListASTNode*>((yyvsp[-1].m_ast)), (yyvsp[-3].m_str));
1994 (yyval.m_ast)->setLocation((yylsp[-3]), (yylsp[0]));
1999 #line 475 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
2001 (yyval.m_ast) = new BlobConstASTNode((yyvsp[0].m_blob));
2002 (yyval.m_ast)->setLocation((yylsp[0]));
2007 #line 480 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
2013 #line 485 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
2015 ListASTNode * list = new ListASTNode();
2016 list->appendNode((yyvsp[0].m_ast));
2017 (yyval.m_ast) = list;
2022 #line 491 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
2024 dynamic_cast<ListASTNode*>((yyvsp[-2].m_ast))->appendNode((yyvsp[0].m_ast));
2025 (yyval.m_ast) = (yyvsp[-2].m_ast);
2030 #line 499 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
2032 (yyval.m_ast) = new SectionASTNode((yyvsp[0].m_str), SectionASTNode::kInclude);
2033 (yyval.m_ast)->setLocation((yylsp[0]));
2038 #line 504 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
2040 (yyval.m_ast) = new SectionASTNode((yyvsp[0].m_str), SectionASTNode::kExclude);
2041 (yyval.m_ast)->setLocation((yylsp[-1]), (yylsp[0]));
2046 #line 511 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
2048 (yyval.m_ast) = (yyvsp[0].m_ast);
2053 #line 515 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
2055 (yyval.m_ast) = new NaturalLocationASTNode();
2056 // $$->setLocation();
2061 #line 522 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
2063 (yyval.m_ast) = new NaturalLocationASTNode();
2064 (yyval.m_ast)->setLocation((yylsp[0]));
2069 #line 527 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
2071 (yyval.m_ast) = (yyvsp[0].m_ast);
2076 #line 533 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
2078 IVTConstASTNode * ivt = new IVTConstASTNode();
2079 if ((yyvsp[-1].m_ast))
2081 ivt->setFieldAssignments(dynamic_cast<ListASTNode*>((yyvsp[-1].m_ast)));
2083 ivt->setLocation((yylsp[-3]), (yylsp[0]));
2084 (yyval.m_ast) = ivt;
2089 #line 544 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
2090 { (yyval.m_ast) = (yyvsp[0].m_ast); ;}
2094 #line 545 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
2095 { (yyval.m_ast) = NULL; ;}
2099 #line 549 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
2101 CallStatementASTNode * stmt = new CallStatementASTNode();
2102 switch ((yyvsp[-2].m_num))
2105 stmt->setCallType(CallStatementASTNode::kCallType);
2108 stmt->setCallType(CallStatementASTNode::kJumpType);
2111 yyerror(&yylloc, lexer, resultAST, "invalid call_or_jump value");
2115 stmt->setTarget((yyvsp[-1].m_ast));
2116 stmt->setArgument((yyvsp[0].m_ast));
2117 stmt->setIsHAB(false);
2118 if ((yyvsp[0].m_ast))
2120 stmt->setLocation((yylsp[-2]), (yylsp[0]));
2124 stmt->setLocation((yylsp[-2]), (yylsp[-1]));
2126 (yyval.m_ast) = stmt;
2131 #line 578 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
2133 if (!elftosb::g_enableHABSupport)
2135 yyerror(&yylloc, lexer, resultAST, "HAB features not supported with the selected family");
2139 CallStatementASTNode * stmt = new CallStatementASTNode();
2140 switch ((yyvsp[-2].m_num))
2143 stmt->setCallType(CallStatementASTNode::kCallType);
2146 stmt->setCallType(CallStatementASTNode::kJumpType);
2149 yyerror(&yylloc, lexer, resultAST, "invalid call_or_jump value");
2153 stmt->setTarget((yyvsp[-1].m_ast));
2154 stmt->setArgument((yyvsp[0].m_ast));
2155 stmt->setIsHAB(true);
2156 if ((yyvsp[0].m_ast))
2158 stmt->setLocation((yylsp[-3]), (yylsp[0]));
2162 stmt->setLocation((yylsp[-3]), (yylsp[-1]));
2164 (yyval.m_ast) = stmt;
2169 #line 614 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
2170 { (yyval.m_num) = 1; ;}
2174 #line 615 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
2175 { (yyval.m_num) = 2; ;}
2179 #line 619 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
2181 (yyval.m_ast) = new SymbolASTNode(NULL, (yyvsp[0].m_str));
2182 (yyval.m_ast)->setLocation((yylsp[0]));
2187 #line 624 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
2189 (yyval.m_ast) = new AddressRangeASTNode((yyvsp[0].m_ast), NULL);
2190 (yyval.m_ast)->setLocation((yyvsp[0].m_ast));
2195 #line 630 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
2196 { (yyval.m_ast) = (yyvsp[-1].m_ast); ;}
2200 #line 631 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
2201 { (yyval.m_ast) = NULL; ;}
2205 #line 632 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
2206 { (yyval.m_ast) = NULL; ;}
2210 #line 636 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
2212 (yyval.m_ast) = new FromStatementASTNode((yyvsp[-3].m_str), dynamic_cast<ListASTNode*>((yyvsp[-1].m_ast)));
2213 (yyval.m_ast)->setLocation((yylsp[-4]), (yylsp[0]));
2218 #line 643 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
2220 (yyval.m_ast) = new ModeStatementASTNode(dynamic_cast<ExprASTNode*>((yyvsp[0].m_ast)));
2221 (yyval.m_ast)->setLocation((yylsp[-1]), (yylsp[0]));
2226 #line 650 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
2228 (yyval.m_ast) = new MessageStatementASTNode(MessageStatementASTNode::kInfo, (yyvsp[0].m_str));
2229 (yyval.m_ast)->setLocation((yylsp[-1]), (yylsp[0]));
2234 #line 655 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
2236 (yyval.m_ast) = new MessageStatementASTNode(MessageStatementASTNode::kWarning, (yyvsp[0].m_str));
2237 (yyval.m_ast)->setLocation((yylsp[-1]), (yylsp[0]));
2242 #line 660 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
2244 (yyval.m_ast) = new MessageStatementASTNode(MessageStatementASTNode::kError, (yyvsp[0].m_str));
2245 (yyval.m_ast)->setLocation((yylsp[-1]), (yylsp[0]));
2250 #line 667 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
2252 IfStatementASTNode * ifStmt = new IfStatementASTNode();
2253 ifStmt->setConditionExpr(dynamic_cast<ExprASTNode*>((yyvsp[-4].m_ast)));
2254 ifStmt->setIfStatements(dynamic_cast<ListASTNode*>((yyvsp[-2].m_ast)));
2255 ifStmt->setElseStatements(dynamic_cast<ListASTNode*>((yyvsp[0].m_ast)));
2256 ifStmt->setLocation((yylsp[-5]), (yylsp[0]));
2257 (yyval.m_ast) = ifStmt;
2262 #line 678 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
2264 (yyval.m_ast) = (yyvsp[-1].m_ast);
2269 #line 682 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
2271 ListASTNode * list = new ListASTNode();
2272 list->appendNode((yyvsp[0].m_ast));
2273 (yyval.m_ast) = list;
2274 (yyval.m_ast)->setLocation((yylsp[-1]), (yylsp[0]));
2279 #line 688 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
2280 { (yyval.m_ast) = NULL; ;}
2284 #line 692 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
2286 (yyval.m_ast) = new AddressRangeASTNode((yyvsp[0].m_ast), NULL);
2287 (yyval.m_ast)->setLocation((yyvsp[0].m_ast));
2292 #line 697 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
2294 (yyval.m_ast) = new AddressRangeASTNode((yyvsp[-2].m_ast), (yyvsp[0].m_ast));
2295 (yyval.m_ast)->setLocation((yylsp[-2]), (yylsp[0]));
2300 #line 704 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
2302 (yyval.m_ast) = (yyvsp[0].m_ast);
2307 #line 708 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
2309 (yyval.m_ast) = new StringConstASTNode((yyvsp[0].m_str));
2310 (yyval.m_ast)->setLocation((yylsp[0]));
2315 #line 715 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
2317 (yyval.m_ast) = (yyvsp[0].m_ast);
2322 #line 719 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
2324 ExprASTNode * left = dynamic_cast<ExprASTNode*>((yyvsp[-2].m_ast));
2325 ExprASTNode * right = dynamic_cast<ExprASTNode*>((yyvsp[0].m_ast));
2326 (yyval.m_ast) = new BinaryOpExprASTNode(left, BinaryOpExprASTNode::kLessThan, right);
2327 (yyval.m_ast)->setLocation((yylsp[-2]), (yylsp[0]));
2332 #line 726 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
2334 ExprASTNode * left = dynamic_cast<ExprASTNode*>((yyvsp[-2].m_ast));
2335 ExprASTNode * right = dynamic_cast<ExprASTNode*>((yyvsp[0].m_ast));
2336 (yyval.m_ast) = new BinaryOpExprASTNode(left, BinaryOpExprASTNode::kGreaterThan, right);
2337 (yyval.m_ast)->setLocation((yylsp[-2]), (yylsp[0]));
2342 #line 733 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
2344 ExprASTNode * left = dynamic_cast<ExprASTNode*>((yyvsp[-2].m_ast));
2345 ExprASTNode * right = dynamic_cast<ExprASTNode*>((yyvsp[0].m_ast));
2346 (yyval.m_ast) = new BinaryOpExprASTNode(left, BinaryOpExprASTNode::kGreaterThanEqual, right);
2347 (yyval.m_ast)->setLocation((yylsp[-2]), (yylsp[0]));
2352 #line 740 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
2354 ExprASTNode * left = dynamic_cast<ExprASTNode*>((yyvsp[-2].m_ast));
2355 ExprASTNode * right = dynamic_cast<ExprASTNode*>((yyvsp[0].m_ast));
2356 (yyval.m_ast) = new BinaryOpExprASTNode(left, BinaryOpExprASTNode::kLessThanEqual, right);
2357 (yyval.m_ast)->setLocation((yylsp[-2]), (yylsp[0]));
2362 #line 747 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
2364 ExprASTNode * left = dynamic_cast<ExprASTNode*>((yyvsp[-2].m_ast));
2365 ExprASTNode * right = dynamic_cast<ExprASTNode*>((yyvsp[0].m_ast));
2366 (yyval.m_ast) = new BinaryOpExprASTNode(left, BinaryOpExprASTNode::kEqual, right);
2367 (yyval.m_ast)->setLocation((yylsp[-2]), (yylsp[0]));
2372 #line 754 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
2374 ExprASTNode * left = dynamic_cast<ExprASTNode*>((yyvsp[-2].m_ast));
2375 ExprASTNode * right = dynamic_cast<ExprASTNode*>((yyvsp[0].m_ast));
2376 (yyval.m_ast) = new BinaryOpExprASTNode(left, BinaryOpExprASTNode::kNotEqual, right);
2377 (yyval.m_ast)->setLocation((yylsp[-2]), (yylsp[0]));
2382 #line 761 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
2384 ExprASTNode * left = dynamic_cast<ExprASTNode*>((yyvsp[-2].m_ast));
2385 ExprASTNode * right = dynamic_cast<ExprASTNode*>((yyvsp[0].m_ast));
2386 (yyval.m_ast) = new BinaryOpExprASTNode(left, BinaryOpExprASTNode::kBooleanAnd, right);
2387 (yyval.m_ast)->setLocation((yylsp[-2]), (yylsp[0]));
2392 #line 768 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
2394 ExprASTNode * left = dynamic_cast<ExprASTNode*>((yyvsp[-2].m_ast));
2395 ExprASTNode * right = dynamic_cast<ExprASTNode*>((yyvsp[0].m_ast));
2396 (yyval.m_ast) = new BinaryOpExprASTNode(left, BinaryOpExprASTNode::kBooleanOr, right);
2397 (yyval.m_ast)->setLocation((yylsp[-2]), (yylsp[0]));
2402 #line 775 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
2404 (yyval.m_ast) = new BooleanNotExprASTNode(dynamic_cast<ExprASTNode*>((yyvsp[0].m_ast)));
2405 (yyval.m_ast)->setLocation((yylsp[-1]), (yylsp[0]));
2410 #line 780 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
2412 (yyval.m_ast) = new SourceFileFunctionASTNode((yyvsp[-3].m_str), (yyvsp[-1].m_str));
2413 (yyval.m_ast)->setLocation((yylsp[-3]), (yylsp[0]));
2418 #line 785 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
2420 (yyval.m_ast) = (yyvsp[-1].m_ast);
2421 (yyval.m_ast)->setLocation((yylsp[-2]), (yylsp[0]));
2426 #line 790 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
2428 (yyval.m_ast) = new DefinedOperatorASTNode((yyvsp[-1].m_str));
2429 (yyval.m_ast)->setLocation((yylsp[-3]), (yylsp[0]));
2434 #line 796 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
2435 { (yyval.m_ast) = (yyvsp[0].m_ast); ;}
2439 #line 800 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
2441 (yyval.m_ast) = new SymbolASTNode((yyvsp[0].m_str), (yyvsp[-2].m_str));
2442 (yyval.m_ast)->setLocation((yylsp[-2]), (yylsp[0]));
2447 #line 805 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
2449 (yyval.m_ast) = new SymbolASTNode((yyvsp[0].m_str));
2450 (yyval.m_ast)->setLocation((yylsp[-1]), (yylsp[0]));
2455 #line 813 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
2457 (yyval.m_ast) = (yyvsp[0].m_ast);
2462 #line 817 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
2464 (yyval.m_ast) = new VariableExprASTNode((yyvsp[0].m_str));
2465 (yyval.m_ast)->setLocation((yylsp[0]));
2470 #line 822 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
2472 (yyval.m_ast) = new SymbolRefExprASTNode(dynamic_cast<SymbolASTNode*>((yyvsp[0].m_ast)));
2473 (yyval.m_ast)->setLocation((yylsp[0]));
2478 #line 833 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
2480 ExprASTNode * left = dynamic_cast<ExprASTNode*>((yyvsp[-2].m_ast));
2481 ExprASTNode * right = dynamic_cast<ExprASTNode*>((yyvsp[0].m_ast));
2482 (yyval.m_ast) = new BinaryOpExprASTNode(left, BinaryOpExprASTNode::kAdd, right);
2483 (yyval.m_ast)->setLocation((yylsp[-2]), (yylsp[0]));
2488 #line 840 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
2490 ExprASTNode * left = dynamic_cast<ExprASTNode*>((yyvsp[-2].m_ast));
2491 ExprASTNode * right = dynamic_cast<ExprASTNode*>((yyvsp[0].m_ast));
2492 (yyval.m_ast) = new BinaryOpExprASTNode(left, BinaryOpExprASTNode::kSubtract, right);
2493 (yyval.m_ast)->setLocation((yylsp[-2]), (yylsp[0]));
2498 #line 847 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
2500 ExprASTNode * left = dynamic_cast<ExprASTNode*>((yyvsp[-2].m_ast));
2501 ExprASTNode * right = dynamic_cast<ExprASTNode*>((yyvsp[0].m_ast));
2502 (yyval.m_ast) = new BinaryOpExprASTNode(left, BinaryOpExprASTNode::kMultiply, right);
2503 (yyval.m_ast)->setLocation((yylsp[-2]), (yylsp[0]));
2508 #line 854 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
2510 ExprASTNode * left = dynamic_cast<ExprASTNode*>((yyvsp[-2].m_ast));
2511 ExprASTNode * right = dynamic_cast<ExprASTNode*>((yyvsp[0].m_ast));
2512 (yyval.m_ast) = new BinaryOpExprASTNode(left, BinaryOpExprASTNode::kDivide, right);
2513 (yyval.m_ast)->setLocation((yylsp[-2]), (yylsp[0]));
2518 #line 861 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
2520 ExprASTNode * left = dynamic_cast<ExprASTNode*>((yyvsp[-2].m_ast));
2521 ExprASTNode * right = dynamic_cast<ExprASTNode*>((yyvsp[0].m_ast));
2522 (yyval.m_ast) = new BinaryOpExprASTNode(left, BinaryOpExprASTNode::kModulus, right);
2523 (yyval.m_ast)->setLocation((yylsp[-2]), (yylsp[0]));
2528 #line 868 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
2530 ExprASTNode * left = dynamic_cast<ExprASTNode*>((yyvsp[-2].m_ast));
2531 ExprASTNode * right = dynamic_cast<ExprASTNode*>((yyvsp[0].m_ast));
2532 (yyval.m_ast) = new BinaryOpExprASTNode(left, BinaryOpExprASTNode::kPower, right);
2533 (yyval.m_ast)->setLocation((yylsp[-2]), (yylsp[0]));
2538 #line 875 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
2540 ExprASTNode * left = dynamic_cast<ExprASTNode*>((yyvsp[-2].m_ast));
2541 ExprASTNode * right = dynamic_cast<ExprASTNode*>((yyvsp[0].m_ast));
2542 (yyval.m_ast) = new BinaryOpExprASTNode(left, BinaryOpExprASTNode::kBitwiseAnd, right);
2543 (yyval.m_ast)->setLocation((yylsp[-2]), (yylsp[0]));
2548 #line 882 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
2550 ExprASTNode * left = dynamic_cast<ExprASTNode*>((yyvsp[-2].m_ast));
2551 ExprASTNode * right = dynamic_cast<ExprASTNode*>((yyvsp[0].m_ast));
2552 (yyval.m_ast) = new BinaryOpExprASTNode(left, BinaryOpExprASTNode::kBitwiseOr, right);
2553 (yyval.m_ast)->setLocation((yylsp[-2]), (yylsp[0]));
2558 #line 889 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
2560 ExprASTNode * left = dynamic_cast<ExprASTNode*>((yyvsp[-2].m_ast));
2561 ExprASTNode * right = dynamic_cast<ExprASTNode*>((yyvsp[0].m_ast));
2562 (yyval.m_ast) = new BinaryOpExprASTNode(left, BinaryOpExprASTNode::kBitwiseXor, right);
2563 (yyval.m_ast)->setLocation((yylsp[-2]), (yylsp[0]));
2568 #line 896 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
2570 ExprASTNode * left = dynamic_cast<ExprASTNode*>((yyvsp[-2].m_ast));
2571 ExprASTNode * right = dynamic_cast<ExprASTNode*>((yyvsp[0].m_ast));
2572 (yyval.m_ast) = new BinaryOpExprASTNode(left, BinaryOpExprASTNode::kShiftLeft, right);
2573 (yyval.m_ast)->setLocation((yylsp[-2]), (yylsp[0]));
2578 #line 903 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
2580 ExprASTNode * left = dynamic_cast<ExprASTNode*>((yyvsp[-2].m_ast));
2581 ExprASTNode * right = dynamic_cast<ExprASTNode*>((yyvsp[0].m_ast));
2582 (yyval.m_ast) = new BinaryOpExprASTNode(left, BinaryOpExprASTNode::kShiftRight, right);
2583 (yyval.m_ast)->setLocation((yylsp[-2]), (yylsp[0]));
2588 #line 910 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
2590 (yyval.m_ast) = (yyvsp[0].m_ast);
2595 #line 914 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
2597 (yyval.m_ast) = new IntSizeExprASTNode(dynamic_cast<ExprASTNode*>((yyvsp[-2].m_ast)), (yyvsp[0].m_int)->getWordSize());
2598 (yyval.m_ast)->setLocation((yylsp[-2]), (yylsp[0]));
2603 #line 919 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
2605 (yyval.m_ast) = (yyvsp[-1].m_ast);
2606 (yyval.m_ast)->setLocation((yylsp[-2]), (yylsp[0]));
2611 #line 924 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
2613 (yyval.m_ast) = new SizeofOperatorASTNode(dynamic_cast<SymbolASTNode*>((yyvsp[-1].m_ast)));
2614 (yyval.m_ast)->setLocation((yylsp[-3]), (yylsp[0]));
2619 #line 929 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
2621 (yyval.m_ast) = new SizeofOperatorASTNode((yyvsp[-1].m_str));
2622 (yyval.m_ast)->setLocation((yylsp[-3]), (yylsp[0]));
2627 #line 934 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
2629 (yyval.m_ast) = new SizeofOperatorASTNode((yyvsp[-1].m_str));
2630 (yyval.m_ast)->setLocation((yylsp[-3]), (yylsp[0]));
2635 #line 941 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
2637 (yyval.m_ast) = (yyvsp[0].m_ast);
2642 #line 945 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
2644 (yyval.m_ast) = new NegativeExprASTNode(dynamic_cast<ExprASTNode*>((yyvsp[0].m_ast)));
2645 (yyval.m_ast)->setLocation((yylsp[-1]), (yylsp[0]));
2650 #line 952 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
2652 (yyval.m_ast) = new IntConstExprASTNode((yyvsp[0].m_int)->getValue(), (yyvsp[0].m_int)->getWordSize());
2653 (yyval.m_ast)->setLocation((yylsp[0]));
2661 /* Line 1126 of yacc.c. */
2662 #line 2663 "/Users/creed/projects/fsl/fromsvr/elftosb/build/elftosb.build/Debug/elftosb.build/DerivedSources/elftosb_parser.tab.cpp"
2668 YY_STACK_PRINT (yyss, yyssp);
2673 /* Now `shift' the result of the reduction. Determine what state
2674 that goes to, based on the state we popped back to and the rule
2675 number reduced by. */
2679 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
2680 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
2681 yystate = yytable[yystate];
2683 yystate = yydefgoto[yyn - YYNTOKENS];
2688 /*------------------------------------.
2689 | yyerrlab -- here on detecting error |
2690 `------------------------------------*/
2692 /* If not already recovering from an error, report this error. */
2697 yyn = yypact[yystate];
2699 if (YYPACT_NINF < yyn && yyn < YYLAST)
2701 int yytype = YYTRANSLATE (yychar);
2702 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
2703 YYSIZE_T yysize = yysize0;
2705 int yysize_overflow = 0;
2707 # define YYERROR_VERBOSE_ARGS_MAXIMUM 5
2708 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
2712 /* This is so xgettext sees the translatable formats that are
2713 constructed on the fly. */
2714 YY_("syntax error, unexpected %s");
2715 YY_("syntax error, unexpected %s, expecting %s");
2716 YY_("syntax error, unexpected %s, expecting %s or %s");
2717 YY_("syntax error, unexpected %s, expecting %s or %s or %s");
2718 YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
2722 static char const yyunexpected[] = "syntax error, unexpected %s";
2723 static char const yyexpecting[] = ", expecting %s";
2724 static char const yyor[] = " or %s";
2725 char yyformat[sizeof yyunexpected
2726 + sizeof yyexpecting - 1
2727 + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
2728 * (sizeof yyor - 1))];
2729 char const *yyprefix = yyexpecting;
2731 /* Start YYX at -YYN if negative to avoid negative indexes in
2733 int yyxbegin = yyn < 0 ? -yyn : 0;
2735 /* Stay within bounds of both yycheck and yytname. */
2736 int yychecklim = YYLAST - yyn;
2737 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
2740 yyarg[0] = yytname[yytype];
2741 yyfmt = yystpcpy (yyformat, yyunexpected);
2743 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
2744 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
2746 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
2750 yyformat[sizeof yyunexpected - 1] = '\0';
2753 yyarg[yycount++] = yytname[yyx];
2754 yysize1 = yysize + yytnamerr (0, yytname[yyx]);
2755 yysize_overflow |= yysize1 < yysize;
2757 yyfmt = yystpcpy (yyfmt, yyprefix);
2761 yyf = YY_(yyformat);
2762 yysize1 = yysize + yystrlen (yyf);
2763 yysize_overflow |= yysize1 < yysize;
2766 if (!yysize_overflow && yysize <= YYSTACK_ALLOC_MAXIMUM)
2767 yymsg = (char *) YYSTACK_ALLOC (yysize);
2770 /* Avoid sprintf, as that infringes on the user's name space.
2771 Don't have undefined behavior even if the translation
2772 produced a string with the wrong number of "%s"s. */
2775 while ((*yyp = *yyf))
2777 if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
2779 yyp += yytnamerr (yyp, yyarg[yyi++]);
2788 yyerror (&yylloc, lexer, resultAST, yymsg);
2789 YYSTACK_FREE (yymsg);
2793 yyerror (&yylloc, lexer, resultAST, YY_("syntax error"));
2794 goto yyexhaustedlab;
2798 #endif /* YYERROR_VERBOSE */
2799 yyerror (&yylloc, lexer, resultAST, YY_("syntax error"));
2802 yyerror_range[0] = yylloc;
2804 if (yyerrstatus == 3)
2806 /* If just tried and failed to reuse look-ahead token after an
2807 error, discard it. */
2809 if (yychar <= YYEOF)
2811 /* Return failure if at end of input. */
2812 if (yychar == YYEOF)
2817 yydestruct ("Error: discarding", yytoken, &yylval, &yylloc);
2822 /* Else will try to reuse look-ahead token after shifting the error
2827 /*---------------------------------------------------.
2828 | yyerrorlab -- error raised explicitly by YYERROR. |
2829 `---------------------------------------------------*/
2832 /* Pacify compilers like GCC when the user code never invokes
2833 YYERROR and the label yyerrorlab therefore never appears in user
2838 yyerror_range[0] = yylsp[1-yylen];
2846 /*-------------------------------------------------------------.
2847 | yyerrlab1 -- common code for both syntax error and YYERROR. |
2848 `-------------------------------------------------------------*/
2850 yyerrstatus = 3; /* Each real token shifted decrements this. */
2854 yyn = yypact[yystate];
2855 if (yyn != YYPACT_NINF)
2858 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
2866 /* Pop the current state because it cannot handle the error token. */
2870 yyerror_range[0] = *yylsp;
2871 yydestruct ("Error: popping", yystos[yystate], yyvsp, yylsp);
2874 YY_STACK_PRINT (yyss, yyssp);
2882 yyerror_range[1] = yylloc;
2883 /* Using YYLLOC is tempting, but would change the location of
2884 the look-ahead. YYLOC is available though. */
2885 YYLLOC_DEFAULT (yyloc, yyerror_range - 1, 2);
2888 /* Shift the error token. */
2889 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
2895 /*-------------------------------------.
2896 | yyacceptlab -- YYACCEPT comes here. |
2897 `-------------------------------------*/
2902 /*-----------------------------------.
2903 | yyabortlab -- YYABORT comes here. |
2904 `-----------------------------------*/
2910 /*-------------------------------------------------.
2911 | yyexhaustedlab -- memory exhaustion comes here. |
2912 `-------------------------------------------------*/
2914 yyerror (&yylloc, lexer, resultAST, YY_("memory exhausted"));
2920 if (yychar != YYEOF && yychar != YYEMPTY)
2921 yydestruct ("Cleanup: discarding lookahead",
2922 yytoken, &yylval, &yylloc);
2923 while (yyssp != yyss)
2925 yydestruct ("Cleanup: popping",
2926 yystos[*yyssp], yyvsp, yylsp);
2931 YYSTACK_FREE (yyss);
2937 #line 958 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
2940 /* code goes here */
2942 static int yylex(YYSTYPE * lvalp, YYLTYPE * yylloc, ElftosbLexer * lexer)
2944 int token = lexer->yylex();
2945 *yylloc = lexer->getLocation();
2946 lexer->getSymbolValue(lvalp);
2950 static void yyerror(YYLTYPE * yylloc, ElftosbLexer * lexer, CommandFileASTNode ** resultAST, const char * error)
2952 throw syntax_error(format_string("line %d: %s\n", yylloc->m_firstLine, error));