summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2011-06-24 01:20:01 +0200
committerMichael Olbrich <m.olbrich@pengutronix.de>2011-06-24 14:44:09 +0200
commitac47e1fb96d3f41e29e7c0370ab81a80b7c7fc1a (patch)
tree33b2affab37a00451ecb08322ac115ae5faa8d27
parent2cd6b182814c58090d842d770a88b5f356c8d330 (diff)
regenerate with flex & yacc
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-rw-r--r--elftosb2/elftosb_lexer.cpp217
-rw-r--r--elftosb2/elftosb_parser.tab.cpp2484
-rw-r--r--elftosb2/elftosb_parser.tab.hpp62
3 files changed, 1646 insertions, 1117 deletions
diff --git a/elftosb2/elftosb_lexer.cpp b/elftosb2/elftosb_lexer.cpp
index 3b87842..71005d9 100644
--- a/elftosb2/elftosb_lexer.cpp
+++ b/elftosb2/elftosb_lexer.cpp
@@ -1,6 +1,6 @@
-#line 2 "/Users/creed/projects/fsl/fromsvr/elftosb/build/elftosb.build/Debug/elftosb.build/DerivedSources/elftosb_lexer.cpp"
+#line 2 "elftosb2/elftosb_lexer.cpp"
-#line 4 "/Users/creed/projects/fsl/fromsvr/elftosb/build/elftosb.build/Debug/elftosb.build/DerivedSources/elftosb_lexer.cpp"
+#line 4 "elftosb2/elftosb_lexer.cpp"
#define YY_INT_ALIGNED short int
@@ -58,7 +58,6 @@ typedef int flex_int32_t;
typedef unsigned char flex_uint8_t;
typedef unsigned short int flex_uint16_t;
typedef unsigned int flex_uint32_t;
-#endif /* ! C99 */
/* Limits of integral types. */
#ifndef INT8_MIN
@@ -89,12 +88,15 @@ typedef unsigned int flex_uint32_t;
#define UINT32_MAX (4294967295U)
#endif
+#endif /* ! C99 */
+
#endif /* ! FLEXINT_H */
/* begin standard C++ headers. */
#include <iostream>
#include <errno.h>
#include <cstdlib>
+#include <cstdio>
#include <cstring>
/* end standard C++ headers. */
@@ -152,7 +154,15 @@ typedef unsigned int flex_uint32_t;
/* Size of default input buffer. */
#ifndef YY_BUF_SIZE
+#ifdef __ia64__
+/* On IA-64, the buffer size is 16k, not 8k.
+ * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
+ * Ditto for the __ia64__ case accordingly.
+ */
+#define YY_BUF_SIZE 32768
+#else
#define YY_BUF_SIZE 16384
+#endif /* __ia64__ */
#endif
/* The state buf must be large enough to hold one state per character in the main buffer.
@@ -164,12 +174,7 @@ typedef unsigned int flex_uint32_t;
typedef struct yy_buffer_state *YY_BUFFER_STATE;
#endif
-#ifndef YY_TYPEDEF_YY_SIZE_T
-#define YY_TYPEDEF_YY_SIZE_T
-typedef size_t yy_size_t;
-#endif
-
-extern yy_size_t yyleng;
+extern int yyleng;
#define EOB_ACT_CONTINUE_SCAN 0
#define EOB_ACT_END_OF_FILE 1
@@ -206,6 +211,11 @@ extern yy_size_t yyleng;
#define unput(c) yyunput( c, (yytext_ptr) )
+#ifndef YY_TYPEDEF_YY_SIZE_T
+#define YY_TYPEDEF_YY_SIZE_T
+typedef size_t yy_size_t;
+#endif
+
#ifndef YY_STRUCT_YY_BUFFER_STATE
#define YY_STRUCT_YY_BUFFER_STATE
struct yy_buffer_state
@@ -224,7 +234,7 @@ struct yy_buffer_state
/* Number of characters read into yy_ch_buf, not including EOB
* characters.
*/
- yy_size_t yy_n_chars;
+ int yy_n_chars;
/* Whether we "own" the buffer - i.e., we know we created it,
* and can realloc() it to grow it, and should free() it to
@@ -602,9 +612,13 @@ static yyconst flex_int32_t yy_rule_can_match_eol[75] =
#define yymore() yymore_used_but_not_detected
#define YY_MORE_ADJ 0
#define YY_RESTORE_YY_MORE_OFFSET
-#line 1 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
+#line 1 "elftosb2/elftosb_lexer.l"
+/*
+ * Copyright (c) Freescale Semiconductor, Inc. All rights reserved.
+ * See included license file for license details.
+ */
/* %option prefix="Elftosb" */
-#line 10 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
+#line 14 "elftosb2/elftosb_lexer.l"
#include "ElftosbLexer.h"
#include <stdlib.h>
#include <limits.h>
@@ -624,7 +638,7 @@ using namespace elftosb;
/* start conditions */
-#line 628 "/Users/creed/projects/fsl/fromsvr/elftosb/build/elftosb.build/Debug/elftosb.build/DerivedSources/elftosb_lexer.cpp"
+#line 642 "elftosb2/elftosb_lexer.cpp"
#define INITIAL 0
#define blob 1
@@ -656,7 +670,12 @@ static int yy_flex_strlen (yyconst char * );
/* Amount of stuff to slurp up with each read. */
#ifndef YY_READ_BUF_SIZE
+#ifdef __ia64__
+/* On IA-64, the buffer size is 16k, not 8k */
+#define YY_READ_BUF_SIZE 16384
+#else
#define YY_READ_BUF_SIZE 8192
+#endif /* __ia64__ */
#endif
/* Copy whatever the last rule matched to the standard output. */
@@ -726,10 +745,10 @@ YY_DECL
register char *yy_cp, *yy_bp;
register int yy_act;
-#line 38 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
+#line 42 "elftosb2/elftosb_lexer.l"
-#line 733 "/Users/creed/projects/fsl/fromsvr/elftosb/build/elftosb.build/Debug/elftosb.build/DerivedSources/elftosb_lexer.cpp"
+#line 752 "elftosb2/elftosb_lexer.cpp"
if ( !(yy_init) )
{
@@ -820,112 +839,112 @@ do_action: /* This label is used only to access EOF actions. */
case 1:
YY_RULE_SETUP
-#line 40 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
+#line 44 "elftosb2/elftosb_lexer.l"
{ return TOK_OPTIONS; }
YY_BREAK
case 2:
YY_RULE_SETUP
-#line 41 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
+#line 45 "elftosb2/elftosb_lexer.l"
{ return TOK_CONSTANTS; }
YY_BREAK
case 3:
YY_RULE_SETUP
-#line 42 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
+#line 46 "elftosb2/elftosb_lexer.l"
{ return TOK_SOURCES; }
YY_BREAK
case 4:
YY_RULE_SETUP
-#line 43 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
+#line 47 "elftosb2/elftosb_lexer.l"
{ return TOK_FILTERS; }
YY_BREAK
case 5:
YY_RULE_SETUP
-#line 44 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
+#line 48 "elftosb2/elftosb_lexer.l"
{ return TOK_SECTION; }
YY_BREAK
case 6:
YY_RULE_SETUP
-#line 45 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
+#line 49 "elftosb2/elftosb_lexer.l"
{ return TOK_EXTERN; }
YY_BREAK
case 7:
YY_RULE_SETUP
-#line 46 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
+#line 50 "elftosb2/elftosb_lexer.l"
{ return TOK_FROM; }
YY_BREAK
case 8:
YY_RULE_SETUP
-#line 47 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
+#line 51 "elftosb2/elftosb_lexer.l"
{ return TOK_RAW; }
YY_BREAK
case 9:
YY_RULE_SETUP
-#line 48 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
+#line 52 "elftosb2/elftosb_lexer.l"
{ return TOK_LOAD; }
YY_BREAK
case 10:
YY_RULE_SETUP
-#line 49 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
+#line 53 "elftosb2/elftosb_lexer.l"
{ return TOK_JUMP; }
YY_BREAK
case 11:
YY_RULE_SETUP
-#line 50 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
+#line 54 "elftosb2/elftosb_lexer.l"
{ return TOK_CALL; }
YY_BREAK
case 12:
YY_RULE_SETUP
-#line 51 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
+#line 55 "elftosb2/elftosb_lexer.l"
{ return TOK_MODE; }
YY_BREAK
case 13:
YY_RULE_SETUP
-#line 52 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
+#line 56 "elftosb2/elftosb_lexer.l"
{ return TOK_IF; }
YY_BREAK
case 14:
YY_RULE_SETUP
-#line 53 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
+#line 57 "elftosb2/elftosb_lexer.l"
{ return TOK_ELSE; }
YY_BREAK
case 15:
YY_RULE_SETUP
-#line 54 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
+#line 58 "elftosb2/elftosb_lexer.l"
{ return TOK_DEFINED; }
YY_BREAK
case 16:
YY_RULE_SETUP
-#line 55 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
+#line 59 "elftosb2/elftosb_lexer.l"
{ return TOK_INFO; }
YY_BREAK
case 17:
YY_RULE_SETUP
-#line 56 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
+#line 60 "elftosb2/elftosb_lexer.l"
{ return TOK_WARNING; }
YY_BREAK
case 18:
YY_RULE_SETUP
-#line 57 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
+#line 61 "elftosb2/elftosb_lexer.l"
{ return TOK_ERROR; }
YY_BREAK
case 19:
YY_RULE_SETUP
-#line 58 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
+#line 62 "elftosb2/elftosb_lexer.l"
{ return TOK_SIZEOF; }
YY_BREAK
case 20:
YY_RULE_SETUP
-#line 59 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
+#line 63 "elftosb2/elftosb_lexer.l"
{ return TOK_DCD; }
YY_BREAK
case 21:
YY_RULE_SETUP
-#line 60 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
+#line 64 "elftosb2/elftosb_lexer.l"
{ return TOK_HAB; }
YY_BREAK
case 22:
YY_RULE_SETUP
-#line 61 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
+#line 65 "elftosb2/elftosb_lexer.l"
{ return TOK_IVT; }
YY_BREAK
case 23:
@@ -934,9 +953,9 @@ case 23:
(yy_c_buf_p) = yy_cp = yy_bp + 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
-#line 63 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
+#line 67 "elftosb2/elftosb_lexer.l"
{ // must be followed by any non-ident char
- int_size_t theSize;
+ int_size_t theSize = kWordSize;
switch (yytext[0])
{
case 'w':
@@ -955,7 +974,7 @@ YY_RULE_SETUP
YY_BREAK
case 24:
YY_RULE_SETUP
-#line 81 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
+#line 85 "elftosb2/elftosb_lexer.l"
{
m_symbolValue.m_int = new elftosb::SizedIntegerValue(1, kWordSize);
return TOK_INT_LITERAL;
@@ -963,7 +982,7 @@ YY_RULE_SETUP
YY_BREAK
case 25:
YY_RULE_SETUP
-#line 86 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
+#line 90 "elftosb2/elftosb_lexer.l"
{
m_symbolValue.m_int = new elftosb::SizedIntegerValue(0, kWordSize);
return TOK_INT_LITERAL;
@@ -971,7 +990,7 @@ YY_RULE_SETUP
YY_BREAK
case 26:
YY_RULE_SETUP
-#line 91 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
+#line 95 "elftosb2/elftosb_lexer.l"
{
m_symbolValue.m_str = new std::string(yytext);
if (isSourceName(m_symbolValue.m_str))
@@ -986,7 +1005,7 @@ YY_RULE_SETUP
YY_BREAK
case 27:
YY_RULE_SETUP
-#line 103 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
+#line 107 "elftosb2/elftosb_lexer.l"
{
int base = 0;
uint32_t value;
@@ -1026,7 +1045,7 @@ YY_RULE_SETUP
YY_BREAK
case 28:
YY_RULE_SETUP
-#line 140 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
+#line 144 "elftosb2/elftosb_lexer.l"
{
uint32_t value = 0;
int_size_t theSize;
@@ -1053,7 +1072,7 @@ YY_RULE_SETUP
YY_BREAK
case 29:
YY_RULE_SETUP
-#line 164 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
+#line 168 "elftosb2/elftosb_lexer.l"
{
// remove $ from string
m_symbolValue.m_str = new std::string(&yytext[1]);
@@ -1062,12 +1081,12 @@ YY_RULE_SETUP
YY_BREAK
case 30:
YY_RULE_SETUP
-#line 171 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
+#line 175 "elftosb2/elftosb_lexer.l"
{ BEGIN(mlcmt); }
YY_BREAK
case 31:
YY_RULE_SETUP
-#line 173 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
+#line 177 "elftosb2/elftosb_lexer.l"
{
m_blob = new Blob();
m_blobFirstLine = yylineno;
@@ -1076,173 +1095,173 @@ YY_RULE_SETUP
YY_BREAK
case 32:
YY_RULE_SETUP
-#line 179 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
+#line 183 "elftosb2/elftosb_lexer.l"
{ return '{'; }
YY_BREAK
case 33:
YY_RULE_SETUP
-#line 181 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
+#line 185 "elftosb2/elftosb_lexer.l"
{ return '}'; }
YY_BREAK
case 34:
YY_RULE_SETUP
-#line 183 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
+#line 187 "elftosb2/elftosb_lexer.l"
{ return '('; }
YY_BREAK
case 35:
YY_RULE_SETUP
-#line 185 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
+#line 189 "elftosb2/elftosb_lexer.l"
{ return ')'; }
YY_BREAK
case 36:
YY_RULE_SETUP
-#line 187 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
+#line 191 "elftosb2/elftosb_lexer.l"
{ return '['; }
YY_BREAK
case 37:
YY_RULE_SETUP
-#line 189 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
+#line 193 "elftosb2/elftosb_lexer.l"
{ return ']'; }
YY_BREAK
case 38:
YY_RULE_SETUP
-#line 191 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
+#line 195 "elftosb2/elftosb_lexer.l"
{ return '='; }
YY_BREAK
case 39:
YY_RULE_SETUP
-#line 193 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
+#line 197 "elftosb2/elftosb_lexer.l"
{ return ','; }
YY_BREAK
case 40:
YY_RULE_SETUP
-#line 195 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
+#line 199 "elftosb2/elftosb_lexer.l"
{ return ':'; }
YY_BREAK
case 41:
YY_RULE_SETUP
-#line 197 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
+#line 201 "elftosb2/elftosb_lexer.l"
{ return ';'; }
YY_BREAK
case 42:
YY_RULE_SETUP
-#line 199 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
+#line 203 "elftosb2/elftosb_lexer.l"
{ return '.'; }
YY_BREAK
case 43:
YY_RULE_SETUP
-#line 201 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
+#line 205 "elftosb2/elftosb_lexer.l"
{ return '>'; }
YY_BREAK
case 44:
YY_RULE_SETUP
-#line 203 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
+#line 207 "elftosb2/elftosb_lexer.l"
{ return TOK_DOT_DOT; }
YY_BREAK
case 45:
YY_RULE_SETUP
-#line 205 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
+#line 209 "elftosb2/elftosb_lexer.l"
{ return '+'; }
YY_BREAK
case 46:
YY_RULE_SETUP
-#line 207 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
+#line 211 "elftosb2/elftosb_lexer.l"
{ return '-'; }
YY_BREAK
case 47:
YY_RULE_SETUP
-#line 209 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
+#line 213 "elftosb2/elftosb_lexer.l"
{ return '*'; }
YY_BREAK
case 48:
YY_RULE_SETUP
-#line 211 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
+#line 215 "elftosb2/elftosb_lexer.l"
{ return '/'; }
YY_BREAK
case 49:
YY_RULE_SETUP
-#line 213 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
+#line 217 "elftosb2/elftosb_lexer.l"
{ return '%'; }
YY_BREAK
case 50:
YY_RULE_SETUP
-#line 215 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
+#line 219 "elftosb2/elftosb_lexer.l"
{ return '~'; }
YY_BREAK
case 51:
YY_RULE_SETUP
-#line 217 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
+#line 221 "elftosb2/elftosb_lexer.l"
{ return '^'; }
YY_BREAK
case 52:
YY_RULE_SETUP
-#line 219 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
+#line 223 "elftosb2/elftosb_lexer.l"
{ return TOK_LSHIFT; }
YY_BREAK
case 53:
YY_RULE_SETUP
-#line 221 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
+#line 225 "elftosb2/elftosb_lexer.l"
{ return TOK_RSHIFT; }
YY_BREAK
case 54:
YY_RULE_SETUP
-#line 223 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
+#line 227 "elftosb2/elftosb_lexer.l"
{ return '&'; }
YY_BREAK
case 55:
YY_RULE_SETUP
-#line 225 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
+#line 229 "elftosb2/elftosb_lexer.l"
{ return '|'; }
YY_BREAK
case 56:
YY_RULE_SETUP
-#line 227 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
+#line 231 "elftosb2/elftosb_lexer.l"
{ return TOK_POWER; }
YY_BREAK
case 57:
YY_RULE_SETUP
-#line 229 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
+#line 233 "elftosb2/elftosb_lexer.l"
{ return '<'; }
YY_BREAK
case 58:
YY_RULE_SETUP
-#line 231 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
+#line 235 "elftosb2/elftosb_lexer.l"
{ return TOK_GEQ; }
YY_BREAK
case 59:
YY_RULE_SETUP
-#line 233 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
+#line 237 "elftosb2/elftosb_lexer.l"
{ return TOK_LEQ; }
YY_BREAK
case 60:
YY_RULE_SETUP
-#line 235 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
+#line 239 "elftosb2/elftosb_lexer.l"
{ return TOK_EQ; }
YY_BREAK
case 61:
YY_RULE_SETUP
-#line 237 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
+#line 241 "elftosb2/elftosb_lexer.l"
{ return TOK_NEQ; }
YY_BREAK
case 62:
YY_RULE_SETUP
-#line 239 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
+#line 243 "elftosb2/elftosb_lexer.l"
{ return TOK_AND; }
YY_BREAK
case 63:
YY_RULE_SETUP
-#line 241 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
+#line 245 "elftosb2/elftosb_lexer.l"
{ return TOK_OR; }
YY_BREAK
case 64:
YY_RULE_SETUP
-#line 243 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
+#line 247 "elftosb2/elftosb_lexer.l"
{ return '!'; }
YY_BREAK
case 65:
/* rule 65 can match eol */
YY_RULE_SETUP
-#line 245 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
+#line 249 "elftosb2/elftosb_lexer.l"
{
// get rid of quotes
yytext++;
@@ -1254,7 +1273,7 @@ YY_RULE_SETUP
YY_BREAK
case 66:
YY_RULE_SETUP
-#line 254 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
+#line 258 "elftosb2/elftosb_lexer.l"
{
uint8_t x = (hexCharToInt(yytext[0]) << 4) | hexCharToInt(yytext[1]);
m_blob->append(&x, 1);
@@ -1262,7 +1281,7 @@ YY_RULE_SETUP
YY_BREAK
case 67:
YY_RULE_SETUP
-#line 259 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
+#line 263 "elftosb2/elftosb_lexer.l"
{
BEGIN(INITIAL);
m_symbolValue.m_blob = m_blob;
@@ -1273,7 +1292,7 @@ YY_RULE_SETUP
YY_BREAK
case 68:
YY_RULE_SETUP
-#line 267 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
+#line 271 "elftosb2/elftosb_lexer.l"
{
// end of multi-line comment, return to initial state
BEGIN(INITIAL);
@@ -1284,18 +1303,18 @@ case 69:
(yy_c_buf_p) = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
-#line 273 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
+#line 277 "elftosb2/elftosb_lexer.l"
/* absorb single-line comment */
YY_BREAK
case 70:
YY_RULE_SETUP
-#line 275 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
+#line 279 "elftosb2/elftosb_lexer.l"
/* eat up whitespace in all states */
YY_BREAK
case 71:
/* rule 71 can match eol */
YY_RULE_SETUP
-#line 277 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
+#line 281 "elftosb2/elftosb_lexer.l"
{
/* eat up whitespace and count lines in all states */
m_line++;
@@ -1303,12 +1322,12 @@ YY_RULE_SETUP
YY_BREAK
case 72:
YY_RULE_SETUP
-#line 282 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
+#line 286 "elftosb2/elftosb_lexer.l"
/* ignore all other chars in a multi-line comment */
YY_BREAK
case 73:
YY_RULE_SETUP
-#line 284 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
+#line 288 "elftosb2/elftosb_lexer.l"
{
/* all other chars produce errors */
char msg[50];
@@ -1318,10 +1337,10 @@ YY_RULE_SETUP
YY_BREAK
case 74:
YY_RULE_SETUP
-#line 291 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
+#line 295 "elftosb2/elftosb_lexer.l"
ECHO;
YY_BREAK
-#line 1325 "/Users/creed/projects/fsl/fromsvr/elftosb/build/elftosb.build/Debug/elftosb.build/DerivedSources/elftosb_lexer.cpp"
+#line 1344 "elftosb2/elftosb_lexer.cpp"
case YY_STATE_EOF(INITIAL):
case YY_STATE_EOF(blob):
case YY_STATE_EOF(mlcmt):
@@ -1599,7 +1618,7 @@ int yyFlexLexer::yy_get_next_buffer()
else
{
- yy_size_t num_to_read =
+ int num_to_read =
YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
while ( num_to_read <= 0 )
@@ -1613,7 +1632,7 @@ int yyFlexLexer::yy_get_next_buffer()
if ( b->yy_is_our_buffer )
{
- yy_size_t new_size = b->yy_buf_size * 2;
+ int new_size = b->yy_buf_size * 2;
if ( new_size <= 0 )
b->yy_buf_size += b->yy_buf_size / 8;
@@ -1644,7 +1663,7 @@ int yyFlexLexer::yy_get_next_buffer()
/* Read in more data. */
YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
- (yy_n_chars), num_to_read );
+ (yy_n_chars), (size_t) num_to_read );
YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
}
@@ -1754,7 +1773,7 @@ int yyFlexLexer::yy_get_next_buffer()
if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
{ /* need to shift things up to make room */
/* +2 for EOB chars. */
- register yy_size_t number_to_move = (yy_n_chars) + 2;
+ register int number_to_move = (yy_n_chars) + 2;
register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
register char *source =
@@ -1801,7 +1820,7 @@ int yyFlexLexer::yy_get_next_buffer()
else
{ /* need more input */
- yy_size_t offset = (yy_c_buf_p) - (yytext_ptr);
+ int offset = (yy_c_buf_p) - (yytext_ptr);
++(yy_c_buf_p);
switch ( yy_get_next_buffer( ) )
@@ -1825,7 +1844,7 @@ int yyFlexLexer::yy_get_next_buffer()
case EOB_ACT_END_OF_FILE:
{
if ( yywrap( ) )
- return 0;
+ return EOF;
if ( ! (yy_did_buffer_switch_on_eof) )
YY_NEW_FILE;
@@ -2076,7 +2095,7 @@ void yyFlexLexer::yypop_buffer_state (void)
*/
void yyFlexLexer::yyensure_buffer_stack(void)
{
- yy_size_t num_to_alloc;
+ int num_to_alloc;
if (!(yy_buffer_stack)) {
@@ -2231,7 +2250,7 @@ void yyfree (void * ptr )
#define YYTABLES_NAME "yytables"
-#line 291 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
+#line 295 "elftosb2/elftosb_lexer.l"
diff --git a/elftosb2/elftosb_parser.tab.cpp b/elftosb2/elftosb_parser.tab.cpp
index 731ca45..12f440b 100644
--- a/elftosb2/elftosb_parser.tab.cpp
+++ b/elftosb2/elftosb_parser.tab.cpp
@@ -1,30 +1,39 @@
-/* A Bison parser, made by GNU Bison 2.1. */
-/* Skeleton parser for Yacc-like parsing with Bison,
- Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+/* A Bison parser, made by GNU Bison 2.4.1. */
- This program is free software; you can redistribute it and/or modify
+/* Skeleton implementation for Bison's Yacc-like parsers in C
+
+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+ Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301, USA. */
-
-/* As a special exception, when this file is copied by Bison into a
- Bison output file, you may use that output file without restriction.
- This special exception was added by the Free Software Foundation
- in version 1.24 of Bison. */
-
-/* Written by Richard Stallman by simplifying the original so called
- ``semantic'' parser. */
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* As a special exception, you may create a larger work that contains
+ part or all of the Bison parser skeleton and distribute that work
+ under terms of your choice, so long as that work isn't itself a
+ parser generator using the skeleton or a modified version thereof
+ as a parser skeleton. Alternatively, if you modify or redistribute
+ the parser skeleton itself, you may (at your option) remove this
+ special exception, which will cause the skeleton and the resulting
+ Bison output files to be licensed under the GNU General Public
+ License without this special exception.
+
+ This special exception was added by the Free Software Foundation in
+ version 2.2 of Bison. */
+
+/* C LALR(1) parser skeleton written by Richard Stallman, by
+ simplifying the original so-called "semantic" parser. */
/* All symbols defined below should begin with yy or YY, to avoid
infringing on user name space. This should be done even for local
@@ -37,7 +46,7 @@
#define YYBISON 1
/* Bison version. */
-#define YYBISON_VERSION "2.1"
+#define YYBISON_VERSION "2.4.1"
/* Skeleton name. */
#define YYSKELETON_NAME "yacc.c"
@@ -45,11 +54,86 @@
/* Pure parsers. */
#define YYPURE 1
+/* Push parsers. */
+#define YYPUSH 0
+
+/* Pull parsers. */
+#define YYPULL 1
+
/* Using locations. */
#define YYLSP_NEEDED 1
+/* Copy the first part of user declarations. */
+
+/* Line 189 of yacc.c */
+#line 18 "elftosb2/elftosb_parser.y"
+
+#include "ElftosbLexer.h"
+#include "ElftosbAST.h"
+#include "Logging.h"
+#include "Blob.h"
+#include "format_string.h"
+#include "Value.h"
+#include "ConversionController.h"
+
+using namespace elftosb;
+
+//! Our special location type.
+#define YYLTYPE token_loc_t
+
+// this indicates that we're using our own type. it should be unset automatically
+// but that's not working for some reason with the .hpp file.
+#if defined(YYLTYPE_IS_TRIVIAL)
+ #undef YYLTYPE_IS_TRIVIAL
+ #define YYLTYPE_IS_TRIVIAL 0
+#endif
+
+//! Default location action
+#define YYLLOC_DEFAULT(Current, Rhs, N) \
+ do { \
+ if (N) \
+ { \
+ (Current).m_firstLine = YYRHSLOC(Rhs, 1).m_firstLine; \
+ (Current).m_lastLine = YYRHSLOC(Rhs, N).m_lastLine; \
+ } \
+ else \
+ { \
+ (Current).m_firstLine = (Current).m_lastLine = YYRHSLOC(Rhs, 0).m_lastLine; \
+ } \
+ } while (0)
+
+//! Forward declaration of yylex().
+static int yylex(YYSTYPE * lvalp, YYLTYPE * yylloc, ElftosbLexer * lexer);
+
+// Forward declaration of error handling function.
+static void yyerror(YYLTYPE * yylloc, ElftosbLexer * lexer, CommandFileASTNode ** resultAST, const char * error);
+
+
+
+/* Line 189 of yacc.c */
+#line 117 "elftosb2/elftosb_parser.tab.cpp"
+
+/* Enabling traces. */
+#ifndef YYDEBUG
+# define YYDEBUG 0
+#endif
+
+/* Enabling verbose error messages. */
+#ifdef YYERROR_VERBOSE
+# undef YYERROR_VERBOSE
+# define YYERROR_VERBOSE 1
+#else
+# define YYERROR_VERBOSE 1
+#endif
+
+/* Enabling the token table. */
+#ifndef YYTOKEN_TABLE
+# define YYTOKEN_TABLE 0
+#endif
+
+
/* Tokens. */
#ifndef YYTOKENTYPE
# define YYTOKENTYPE
@@ -143,86 +227,30 @@
-/* Copy the first part of user declarations. */
-#line 14 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
-
-#include "ElftosbLexer.h"
-#include "ElftosbAST.h"
-#include "Logging.h"
-#include "Blob.h"
-#include "format_string.h"
-#include "Value.h"
-#include "ConversionController.h"
-
-using namespace elftosb;
-
-//! Our special location type.
-#define YYLTYPE token_loc_t
-
-// this indicates that we're using our own type. it should be unset automatically
-// but that's not working for some reason with the .hpp file.
-#if defined(YYLTYPE_IS_TRIVIAL)
- #undef YYLTYPE_IS_TRIVIAL
- #define YYLTYPE_IS_TRIVIAL 0
-#endif
-
-//! Default location action
-#define YYLLOC_DEFAULT(Current, Rhs, N) \
- do { \
- if (N) \
- { \
- (Current).m_firstLine = YYRHSLOC(Rhs, 1).m_firstLine; \
- (Current).m_lastLine = YYRHSLOC(Rhs, N).m_lastLine; \
- } \
- else \
- { \
- (Current).m_firstLine = (Current).m_lastLine = YYRHSLOC(Rhs, 0).m_lastLine; \
- } \
- } while (0)
-
-//! Forward declaration of yylex().
-static int yylex(YYSTYPE * lvalp, YYLTYPE * yylloc, ElftosbLexer * lexer);
-
-// Forward declaration of error handling function.
-static void yyerror(YYLTYPE * yylloc, ElftosbLexer * lexer, CommandFileASTNode ** resultAST, const char * error);
-
-
-
-/* Enabling traces. */
-#ifndef YYDEBUG
-# define YYDEBUG 0
-#endif
-
-/* Enabling verbose error messages. */
-#ifdef YYERROR_VERBOSE
-# undef YYERROR_VERBOSE
-# define YYERROR_VERBOSE 1
-#else
-# define YYERROR_VERBOSE 1
-#endif
+#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
+typedef union YYSTYPE
+{
-/* Enabling the token table. */
-#ifndef YYTOKEN_TABLE
-# define YYTOKEN_TABLE 0
-#endif
+/* Line 214 of yacc.c */
+#line 62 "elftosb2/elftosb_parser.y"
-#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
-#line 58 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
-typedef union YYSTYPE {
int m_num;
elftosb::SizedIntegerValue * m_int;
Blob * m_blob;
std::string * m_str;
elftosb::ASTNode * m_ast; // must use full name here because this is put into *.tab.hpp
+
+
+
+/* Line 214 of yacc.c */
+#line 247 "elftosb2/elftosb_parser.tab.cpp"
} YYSTYPE;
-/* Line 196 of yacc.c. */
-#line 220 "/Users/creed/projects/fsl/fromsvr/elftosb/build/elftosb.build/Debug/elftosb.build/DerivedSources/elftosb_parser.tab.cpp"
+# define YYSTYPE_IS_TRIVIAL 1
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
-# define YYSTYPE_IS_TRIVIAL 1
#endif
-#if ! defined (YYLTYPE) && ! defined (YYLTYPE_IS_DECLARED)
+#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
typedef struct YYLTYPE
{
int first_line;
@@ -239,23 +267,56 @@ typedef struct YYLTYPE
/* Copy the second part of user declarations. */
-/* Line 219 of yacc.c. */
-#line 244 "/Users/creed/projects/fsl/fromsvr/elftosb/build/elftosb.build/Debug/elftosb.build/DerivedSources/elftosb_parser.tab.cpp"
+/* Line 264 of yacc.c */
+#line 272 "elftosb2/elftosb_parser.tab.cpp"
-#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
-# define YYSIZE_T __SIZE_TYPE__
+#ifdef short
+# undef short
#endif
-#if ! defined (YYSIZE_T) && defined (size_t)
-# define YYSIZE_T size_t
+
+#ifdef YYTYPE_UINT8
+typedef YYTYPE_UINT8 yytype_uint8;
+#else
+typedef unsigned char yytype_uint8;
+#endif
+
+#ifdef YYTYPE_INT8
+typedef YYTYPE_INT8 yytype_int8;
+#elif (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+typedef signed char yytype_int8;
+#else
+typedef short int yytype_int8;
#endif
-#if ! defined (YYSIZE_T) && (defined (__STDC__) || defined (__cplusplus))
-# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
-# define YYSIZE_T size_t
+
+#ifdef YYTYPE_UINT16
+typedef YYTYPE_UINT16 yytype_uint16;
+#else
+typedef unsigned short int yytype_uint16;
#endif
-#if ! defined (YYSIZE_T)
-# define YYSIZE_T unsigned int
+
+#ifdef YYTYPE_INT16
+typedef YYTYPE_INT16 yytype_int16;
+#else
+typedef short int yytype_int16;
#endif
+#ifndef YYSIZE_T
+# ifdef __SIZE_TYPE__
+# define YYSIZE_T __SIZE_TYPE__
+# elif defined size_t
+# define YYSIZE_T size_t
+# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
+# define YYSIZE_T size_t
+# else
+# define YYSIZE_T unsigned int
+# endif
+#endif
+
+#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
+
#ifndef YY_
# if YYENABLE_NLS
# if ENABLE_NLS
@@ -268,7 +329,32 @@ typedef struct YYLTYPE
# endif
#endif
-#if ! defined (yyoverflow) || YYERROR_VERBOSE
+/* Suppress unused-variable warnings by "using" E. */
+#if ! defined lint || defined __GNUC__
+# define YYUSE(e) ((void) (e))
+#else
+# define YYUSE(e) /* empty */
+#endif
+
+/* Identity function, used to suppress warnings about constant conditions. */
+#ifndef lint
+# define YYID(n) (n)
+#else
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+static int
+YYID (int yyi)
+#else
+static int
+YYID (yyi)
+ int yyi;
+#endif
+{
+ return yyi;
+}
+#endif
+
+#if ! defined yyoverflow || YYERROR_VERBOSE
/* The parser invokes alloca or malloc; define the necessary symbols. */
@@ -276,67 +362,79 @@ typedef struct YYLTYPE
# if YYSTACK_USE_ALLOCA
# ifdef __GNUC__
# define YYSTACK_ALLOC __builtin_alloca
+# elif defined __BUILTIN_VA_ARG_INCR
+# include <alloca.h> /* INFRINGES ON USER NAME SPACE */
+# elif defined _AIX
+# define YYSTACK_ALLOC __alloca
+# elif defined _MSC_VER
+# include <malloc.h> /* INFRINGES ON USER NAME SPACE */
+# define alloca _alloca
# else
# define YYSTACK_ALLOC alloca
-# if defined (__STDC__) || defined (__cplusplus)
+# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
-# define YYINCLUDED_STDLIB_H
+# ifndef _STDLIB_H
+# define _STDLIB_H 1
+# endif
# endif
# endif
# endif
# endif
# ifdef YYSTACK_ALLOC
- /* Pacify GCC's `empty if-body' warning. */
-# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
+ /* Pacify GCC's `empty if-body' warning. */
+# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
# ifndef YYSTACK_ALLOC_MAXIMUM
/* The OS might guarantee only one guard page at the bottom of the stack,
and a page size can be as small as 4096 bytes. So we cannot safely
invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
to allow for a few compiler-allocated temporary stack slots. */
-# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2005 */
+# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
# endif
# else
# define YYSTACK_ALLOC YYMALLOC
# define YYSTACK_FREE YYFREE
# ifndef YYSTACK_ALLOC_MAXIMUM
-# define YYSTACK_ALLOC_MAXIMUM ((YYSIZE_T) -1)
+# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
# endif
-# ifdef __cplusplus
-extern "C" {
+# if (defined __cplusplus && ! defined _STDLIB_H \
+ && ! ((defined YYMALLOC || defined malloc) \
+ && (defined YYFREE || defined free)))
+# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
+# ifndef _STDLIB_H
+# define _STDLIB_H 1
+# endif
# endif
# ifndef YYMALLOC
# define YYMALLOC malloc
-# if (! defined (malloc) && ! defined (YYINCLUDED_STDLIB_H) \
- && (defined (__STDC__) || defined (__cplusplus)))
+# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
# endif
# endif
# ifndef YYFREE
# define YYFREE free
-# if (! defined (free) && ! defined (YYINCLUDED_STDLIB_H) \
- && (defined (__STDC__) || defined (__cplusplus)))
+# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
void free (void *); /* INFRINGES ON USER NAME SPACE */
# endif
# endif
-# ifdef __cplusplus
-}
-# endif
# endif
-#endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */
+#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
-#if (! defined (yyoverflow) \
- && (! defined (__cplusplus) \
- || (defined (YYLTYPE_IS_TRIVIAL) && YYLTYPE_IS_TRIVIAL \
- && defined (YYSTYPE_IS_TRIVIAL) && YYSTYPE_IS_TRIVIAL)))
+#if (! defined yyoverflow \
+ && (! defined __cplusplus \
+ || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \
+ && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
/* A type that is properly aligned for any stack member. */
union yyalloc
{
- short int yyss;
- YYSTYPE yyvs;
- YYLTYPE yyls;
+ yytype_int16 yyss_alloc;
+ YYSTYPE yyvs_alloc;
+ YYLTYPE yyls_alloc;
};
/* The size of the maximum gap between one aligned stack and the next. */
@@ -345,13 +443,13 @@ union yyalloc
/* The size of an array large to enough to hold all stacks, each with
N elements. */
# define YYSTACK_BYTES(N) \
- ((N) * (sizeof (short int) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
+ ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
+ 2 * YYSTACK_GAP_MAXIMUM)
/* Copy COUNT objects from FROM to TO. The source and destination do
not overlap. */
# ifndef YYCOPY
-# if defined (__GNUC__) && 1 < __GNUC__
+# if defined __GNUC__ && 1 < __GNUC__
# define YYCOPY(To, From, Count) \
__builtin_memcpy (To, From, (Count) * sizeof (*(From)))
# else
@@ -362,7 +460,7 @@ union yyalloc
for (yyi = 0; yyi < (Count); yyi++) \
(To)[yyi] = (From)[yyi]; \
} \
- while (0)
+ while (YYID (0))
# endif
# endif
@@ -371,37 +469,31 @@ union yyalloc
elements in the stack, and YYPTR gives the new location of the
stack. Advance YYPTR to a properly aligned location for the next
stack. */
-# define YYSTACK_RELOCATE(Stack) \
+# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
do \
{ \
YYSIZE_T yynewbytes; \
- YYCOPY (&yyptr->Stack, Stack, yysize); \
- Stack = &yyptr->Stack; \
+ YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
+ Stack = &yyptr->Stack_alloc; \
yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
yyptr += yynewbytes / sizeof (*yyptr); \
} \
- while (0)
-
-#endif
+ while (YYID (0))
-#if defined (__STDC__) || defined (__cplusplus)
- typedef signed char yysigned_char;
-#else
- typedef short int yysigned_char;
#endif
-/* YYFINAL -- State number of the termination state. */
+/* YYFINAL -- State number of the termination state. */
#define YYFINAL 13
/* YYLAST -- Last index in YYTABLE. */
#define YYLAST 418
-/* YYNTOKENS -- Number of terminals. */
+/* YYNTOKENS -- Number of terminals. */
#define YYNTOKENS 66
-/* YYNNTS -- Number of nonterminals. */
+/* YYNNTS -- Number of nonterminals. */
#define YYNNTS 52
-/* YYNRULES -- Number of rules. */
+/* YYNRULES -- Number of rules. */
#define YYNRULES 133
-/* YYNRULES -- Number of states. */
+/* YYNRULES -- Number of states. */
#define YYNSTATES 238
/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
@@ -412,7 +504,7 @@ union yyalloc
((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
-static const unsigned char yytranslate[] =
+static const yytype_uint8 yytranslate[] =
{
0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
@@ -449,7 +541,7 @@ static const unsigned char yytranslate[] =
#if YYDEBUG
/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
YYRHS. */
-static const unsigned short int yyprhs[] =
+static const yytype_uint16 yyprhs[] =
{
0, 0, 3, 6, 8, 11, 13, 15, 17, 22,
27, 29, 32, 35, 36, 40, 45, 47, 50, 54,
@@ -467,8 +559,8 @@ static const unsigned short int yyprhs[] =
395, 400, 403, 406
};
-/* YYRHS -- A `-1'-separated list of the rules' RHS. */
-static const yysigned_char yyrhs[] =
+/* YYRHS -- A `-1'-separated list of the rules' RHS. */
+static const yytype_int8 yyrhs[] =
{
67, 0, -1, 68, 82, -1, 69, -1, 68, 69,
-1, 70, -1, 71, -1, 75, -1, 37, 11, 72,
@@ -514,28 +606,28 @@ static const yysigned_char yyrhs[] =
};
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
-static const unsigned short int yyrline[] =
+static const yytype_uint16 yyrline[] =
{
- 0, 162, 162, 172, 178, 186, 187, 188, 191, 197,
- 203, 209, 216, 217, 220, 227, 233, 239, 247, 259,
- 262, 267, 275, 276, 280, 286, 294, 301, 307, 314,
- 329, 334, 340, 345, 351, 357, 365, 371, 379, 380,
- 381, 382, 385, 391, 399, 400, 401, 404, 405, 406,
- 407, 410, 433, 443, 445, 449, 454, 459, 464, 469,
- 474, 479, 484, 490, 498, 503, 510, 515, 521, 526,
- 532, 544, 545, 548, 577, 614, 615, 618, 623, 630,
- 631, 632, 635, 642, 649, 654, 659, 666, 677, 681,
- 688, 691, 696, 703, 707, 714, 718, 725, 732, 739,
- 746, 753, 760, 767, 774, 779, 784, 789, 796, 799,
- 804, 812, 816, 821, 832, 839, 846, 853, 860, 867,
- 874, 881, 888, 895, 902, 909, 913, 918, 923, 928,
- 933, 940, 944, 951
+ 0, 166, 166, 176, 182, 190, 191, 192, 195, 201,
+ 207, 213, 220, 221, 224, 231, 237, 243, 251, 263,
+ 266, 271, 279, 280, 284, 290, 298, 305, 311, 318,
+ 333, 338, 344, 349, 355, 361, 369, 375, 383, 384,
+ 385, 386, 389, 395, 403, 404, 405, 408, 409, 410,
+ 411, 414, 437, 447, 449, 453, 458, 463, 468, 473,
+ 478, 483, 488, 494, 502, 507, 514, 519, 525, 530,
+ 536, 548, 549, 552, 581, 618, 619, 622, 627, 634,
+ 635, 636, 639, 646, 653, 658, 663, 670, 681, 685,
+ 692, 695, 700, 707, 711, 718, 722, 729, 736, 743,
+ 750, 757, 764, 771, 778, 783, 788, 793, 800, 803,
+ 808, 816, 820, 825, 836, 843, 850, 857, 864, 871,
+ 878, 885, 892, 899, 906, 913, 917, 922, 927, 932,
+ 937, 944, 948, 955
};
#endif
#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
- First, the terminals, then, starting at YYNTOKENS, nonterminals. */
+ First, the terminals, then, starting at YYNTOKENS, nonterminals. */
static const char *const yytname[] =
{
"$end", "error", "$undefined", "\"identifier\"", "\"string\"",
@@ -569,7 +661,7 @@ static const char *const yytname[] =
# ifdef YYPRINT
/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
token YYLEX-NUM. */
-static const unsigned short int yytoknum[] =
+static const yytype_uint16 yytoknum[] =
{
0, 256, 257, 258, 259, 260, 261, 262, 263, 40,
41, 123, 125, 91, 93, 61, 44, 59, 58, 62,
@@ -582,7 +674,7 @@ static const unsigned short int yytoknum[] =
# endif
/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
-static const unsigned char yyr1[] =
+static const yytype_uint8 yyr1[] =
{
0, 66, 67, 68, 68, 69, 69, 69, 70, 71,
72, 72, 73, 73, 74, 75, 76, 76, 77, 77,
@@ -601,7 +693,7 @@ static const unsigned char yyr1[] =
};
/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
-static const unsigned char yyr2[] =
+static const yytype_uint8 yyr2[] =
{
0, 2, 2, 1, 2, 1, 1, 1, 4, 4,
1, 2, 2, 0, 3, 4, 1, 2, 3, 0,
@@ -622,7 +714,7 @@ static const unsigned char yyr2[] =
/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
STATE-NUM when YYTABLE doesn't specify something else to do. Zero
means the default is an error. */
-static const unsigned char yydefact[] =
+static const yytype_uint8 yydefact[] =
{
0, 0, 0, 0, 0, 0, 3, 5, 6, 7,
13, 13, 19, 1, 0, 4, 2, 27, 0, 0,
@@ -650,8 +742,8 @@ static const unsigned char yydefact[] =
92, 79, 0, 87, 41, 89, 0, 88
};
-/* YYDEFGOTO[NTERM-NUM]. */
-static const short int yydefgoto[] =
+/* YYDEFGOTO[NTERM-NUM]. */
+static const yytype_int16 yydefgoto[] =
{
-1, 4, 5, 6, 7, 8, 19, 20, 21, 9,
24, 25, 26, 38, 63, 64, 16, 17, 73, 109,
@@ -664,7 +756,7 @@ static const short int yydefgoto[] =
/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
STATE-NUM. */
#define YYPACT_NINF -181
-static const short int yypact[] =
+static const yytype_int16 yypact[] =
{
128, 17, 25, 48, 69, 123, -181, -181, -181, -181,
96, 96, 101, -181, 80, -181, 68, -181, 112, 85,
@@ -693,7 +785,7 @@ static const short int yypact[] =
};
/* YYPGOTO[NTERM-NUM]. */
-static const short int yypgoto[] =
+static const yytype_int16 yypgoto[] =
{
-181, -181, -181, 268, -181, -181, 266, 106, -181, -181,
-181, 254, -181, -181, -70, 177, -181, 267, -181, -181,
@@ -708,7 +800,7 @@ static const short int yypgoto[] =
number is the opposite. If zero, do what YYDEFACT says.
If YYTABLE_NINF, syntax error. */
#define YYTABLE_NINF -1
-static const unsigned char yytable[] =
+static const yytype_uint8 yytable[] =
{
47, 187, 108, 87, 89, 39, 166, 40, 167, 168,
169, 42, 105, 167, 138, 60, 106, 234, 212, 39,
@@ -754,7 +846,7 @@ static const unsigned char yytable[] =
151, 0, 0, 152, 153, 154, 0, 0, 155
};
-static const short int yycheck[] =
+static const yytype_int16 yycheck[] =
{
27, 156, 72, 54, 55, 3, 4, 5, 6, 7,
8, 9, 3, 6, 10, 4, 7, 11, 198, 3,
@@ -802,7 +894,7 @@ static const short int yycheck[] =
/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
symbol of state STATE-NUM. */
-static const unsigned char yystos[] =
+static const yytype_uint8 yystos[] =
{
0, 37, 38, 39, 67, 68, 69, 70, 71, 75,
11, 11, 11, 0, 41, 69, 82, 83, 3, 72,
@@ -855,7 +947,7 @@ do \
yychar = (Token); \
yylval = (Value); \
yytoken = YYTRANSLATE (yychar); \
- YYPOPSTACK; \
+ YYPOPSTACK (1); \
goto yybackup; \
} \
else \
@@ -863,7 +955,7 @@ do \
yyerror (&yylloc, lexer, resultAST, YY_("syntax error: cannot back up")); \
YYERROR; \
} \
-while (0)
+while (YYID (0))
#define YYTERROR 1
@@ -878,7 +970,7 @@ while (0)
#ifndef YYLLOC_DEFAULT
# define YYLLOC_DEFAULT(Current, Rhs, N) \
do \
- if (N) \
+ if (YYID (N)) \
{ \
(Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
(Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
@@ -892,7 +984,7 @@ while (0)
(Current).first_column = (Current).last_column = \
YYRHSLOC (Rhs, 0).last_column; \
} \
- while (0)
+ while (YYID (0))
#endif
@@ -904,8 +996,8 @@ while (0)
# if YYLTYPE_IS_TRIVIAL
# define YY_LOCATION_PRINT(File, Loc) \
fprintf (File, "%d.%d-%d.%d", \
- (Loc).first_line, (Loc).first_column, \
- (Loc).last_line, (Loc).last_column)
+ (Loc).first_line, (Loc).first_column, \
+ (Loc).last_line, (Loc).last_column)
# else
# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
# endif
@@ -932,37 +1024,111 @@ while (0)
do { \
if (yydebug) \
YYFPRINTF Args; \
-} while (0)
+} while (YYID (0))
-# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
-do { \
- if (yydebug) \
- { \
- YYFPRINTF (stderr, "%s ", Title); \
- yysymprint (stderr, \
- Type, Value, Location); \
- YYFPRINTF (stderr, "\n"); \
- } \
-} while (0)
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
+do { \
+ if (yydebug) \
+ { \
+ YYFPRINTF (stderr, "%s ", Title); \
+ yy_symbol_print (stderr, \
+ Type, Value, Location, lexer, resultAST); \
+ YYFPRINTF (stderr, "\n"); \
+ } \
+} while (YYID (0))
+
+
+/*--------------------------------.
+| Print this symbol on YYOUTPUT. |
+`--------------------------------*/
+
+/*ARGSUSED*/
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+static void
+yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, ElftosbLexer * lexer, CommandFileASTNode ** resultAST)
+#else
+static void
+yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, lexer, resultAST)
+ FILE *yyoutput;
+ int yytype;
+ YYSTYPE const * const yyvaluep;
+ YYLTYPE const * const yylocationp;
+ ElftosbLexer * lexer;
+ CommandFileASTNode ** resultAST;
+#endif
+{
+ if (!yyvaluep)
+ return;
+ YYUSE (yylocationp);
+ YYUSE (lexer);
+ YYUSE (resultAST);
+# ifdef YYPRINT
+ if (yytype < YYNTOKENS)
+ YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
+# else
+ YYUSE (yyoutput);
+# endif
+ switch (yytype)
+ {
+ default:
+ break;
+ }
+}
+
+
+/*--------------------------------.
+| Print this symbol on YYOUTPUT. |
+`--------------------------------*/
+
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+static void
+yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, ElftosbLexer * lexer, CommandFileASTNode ** resultAST)
+#else
+static void
+yy_symbol_print (yyoutput, yytype, yyvaluep, yylocationp, lexer, resultAST)
+ FILE *yyoutput;
+ int yytype;
+ YYSTYPE const * const yyvaluep;
+ YYLTYPE const * const yylocationp;
+ ElftosbLexer * lexer;
+ CommandFileASTNode ** resultAST;
+#endif
+{
+ if (yytype < YYNTOKENS)
+ YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
+ else
+ YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
+
+ YY_LOCATION_PRINT (yyoutput, *yylocationp);
+ YYFPRINTF (yyoutput, ": ");
+ yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, lexer, resultAST);
+ YYFPRINTF (yyoutput, ")");
+}
/*------------------------------------------------------------------.
| yy_stack_print -- Print the state stack from its BOTTOM up to its |
| TOP (included). |
`------------------------------------------------------------------*/
-#if defined (__STDC__) || defined (__cplusplus)
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
static void
-yy_stack_print (short int *bottom, short int *top)
+yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
#else
static void
-yy_stack_print (bottom, top)
- short int *bottom;
- short int *top;
+yy_stack_print (yybottom, yytop)
+ yytype_int16 *yybottom;
+ yytype_int16 *yytop;
#endif
{
YYFPRINTF (stderr, "Stack now");
- for (/* Nothing. */; bottom <= top; ++bottom)
- YYFPRINTF (stderr, " %d", *bottom);
+ for (; yybottom <= yytop; yybottom++)
+ {
+ int yybot = *yybottom;
+ YYFPRINTF (stderr, " %d", yybot);
+ }
YYFPRINTF (stderr, "\n");
}
@@ -970,37 +1136,48 @@ yy_stack_print (bottom, top)
do { \
if (yydebug) \
yy_stack_print ((Bottom), (Top)); \
-} while (0)
+} while (YYID (0))
/*------------------------------------------------.
| Report that the YYRULE is going to be reduced. |
`------------------------------------------------*/
-#if defined (__STDC__) || defined (__cplusplus)
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
static void
-yy_reduce_print (int yyrule)
+yy_reduce_print (YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule, ElftosbLexer * lexer, CommandFileASTNode ** resultAST)
#else
static void
-yy_reduce_print (yyrule)
+yy_reduce_print (yyvsp, yylsp, yyrule, lexer, resultAST)
+ YYSTYPE *yyvsp;
+ YYLTYPE *yylsp;
int yyrule;
+ ElftosbLexer * lexer;
+ CommandFileASTNode ** resultAST;
#endif
{
+ int yynrhs = yyr2[yyrule];
int yyi;
unsigned long int yylno = yyrline[yyrule];
- YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu), ",
- yyrule - 1, yylno);
- /* Print the symbols being reduced, and their result. */
- for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++)
- YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]);
- YYFPRINTF (stderr, "-> %s\n", yytname[yyr1[yyrule]]);
+ YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
+ yyrule - 1, yylno);
+ /* The symbols being reduced. */
+ for (yyi = 0; yyi < yynrhs; yyi++)
+ {
+ YYFPRINTF (stderr, " $%d = ", yyi + 1);
+ yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
+ &(yyvsp[(yyi + 1) - (yynrhs)])
+ , &(yylsp[(yyi + 1) - (yynrhs)]) , lexer, resultAST);
+ YYFPRINTF (stderr, "\n");
+ }
}
# define YY_REDUCE_PRINT(Rule) \
do { \
if (yydebug) \
- yy_reduce_print (Rule); \
-} while (0)
+ yy_reduce_print (yyvsp, yylsp, Rule, lexer, resultAST); \
+} while (YYID (0))
/* Nonzero means print parse trace. It is left uninitialized so that
multiple parsers can coexist. */
@@ -1034,42 +1211,44 @@ int yydebug;
#if YYERROR_VERBOSE
# ifndef yystrlen
-# if defined (__GLIBC__) && defined (_STRING_H)
+# if defined __GLIBC__ && defined _STRING_H
# define yystrlen strlen
# else
/* Return the length of YYSTR. */
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
static YYSIZE_T
-# if defined (__STDC__) || defined (__cplusplus)
yystrlen (const char *yystr)
-# else
+#else
+static YYSIZE_T
yystrlen (yystr)
- const char *yystr;
-# endif
+ const char *yystr;
+#endif
{
- const char *yys = yystr;
-
- while (*yys++ != '\0')
+ YYSIZE_T yylen;
+ for (yylen = 0; yystr[yylen]; yylen++)
continue;
-
- return yys - yystr - 1;
+ return yylen;
}
# endif
# endif
# ifndef yystpcpy
-# if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
+# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
# define yystpcpy stpcpy
# else
/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
YYDEST. */
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
static char *
-# if defined (__STDC__) || defined (__cplusplus)
yystpcpy (char *yydest, const char *yysrc)
-# else
+#else
+static char *
yystpcpy (yydest, yysrc)
- char *yydest;
- const char *yysrc;
-# endif
+ char *yydest;
+ const char *yysrc;
+#endif
{
char *yyd = yydest;
const char *yys = yysrc;
@@ -1095,7 +1274,7 @@ yytnamerr (char *yyres, const char *yystr)
{
if (*yystr == '"')
{
- size_t yyn = 0;
+ YYSIZE_T yyn = 0;
char const *yyp = yystr;
for (;;)
@@ -1130,71 +1309,140 @@ yytnamerr (char *yyres, const char *yystr)
}
# endif
-#endif /* YYERROR_VERBOSE */
-
-
-
-#if YYDEBUG
-/*--------------------------------.
-| Print this symbol on YYOUTPUT. |
-`--------------------------------*/
-
-#if defined (__STDC__) || defined (__cplusplus)
-static void
-yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp)
-#else
-static void
-yysymprint (yyoutput, yytype, yyvaluep, yylocationp)
- FILE *yyoutput;
- int yytype;
- YYSTYPE *yyvaluep;
- YYLTYPE *yylocationp;
-#endif
+/* Copy into YYRESULT an error message about the unexpected token
+ YYCHAR while in state YYSTATE. Return the number of bytes copied,
+ including the terminating null byte. If YYRESULT is null, do not
+ copy anything; just return the number of bytes that would be
+ copied. As a special case, return 0 if an ordinary "syntax error"
+ message will do. Return YYSIZE_MAXIMUM if overflow occurs during
+ size calculation. */
+static YYSIZE_T
+yysyntax_error (char *yyresult, int yystate, int yychar)
{
- /* Pacify ``unused variable'' warnings. */
- (void) yyvaluep;
- (void) yylocationp;
+ int yyn = yypact[yystate];
- if (yytype < YYNTOKENS)
- YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
+ if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
+ return 0;
else
- YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
+ {
+ int yytype = YYTRANSLATE (yychar);
+ YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
+ YYSIZE_T yysize = yysize0;
+ YYSIZE_T yysize1;
+ int yysize_overflow = 0;
+ enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
+ char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
+ int yyx;
+
+# if 0
+ /* This is so xgettext sees the translatable formats that are
+ constructed on the fly. */
+ YY_("syntax error, unexpected %s");
+ YY_("syntax error, unexpected %s, expecting %s");
+ YY_("syntax error, unexpected %s, expecting %s or %s");
+ YY_("syntax error, unexpected %s, expecting %s or %s or %s");
+ YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
+# endif
+ char *yyfmt;
+ char const *yyf;
+ static char const yyunexpected[] = "syntax error, unexpected %s";
+ static char const yyexpecting[] = ", expecting %s";
+ static char const yyor[] = " or %s";
+ char yyformat[sizeof yyunexpected
+ + sizeof yyexpecting - 1
+ + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
+ * (sizeof yyor - 1))];
+ char const *yyprefix = yyexpecting;
+
+ /* Start YYX at -YYN if negative to avoid negative indexes in
+ YYCHECK. */
+ int yyxbegin = yyn < 0 ? -yyn : 0;
+
+ /* Stay within bounds of both yycheck and yytname. */
+ int yychecklim = YYLAST - yyn + 1;
+ int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
+ int yycount = 1;
+
+ yyarg[0] = yytname[yytype];
+ yyfmt = yystpcpy (yyformat, yyunexpected);
+
+ for (yyx = yyxbegin; yyx < yyxend; ++yyx)
+ if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
+ {
+ if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
+ {
+ yycount = 1;
+ yysize = yysize0;
+ yyformat[sizeof yyunexpected - 1] = '\0';
+ break;
+ }
+ yyarg[yycount++] = yytname[yyx];
+ yysize1 = yysize + yytnamerr (0, yytname[yyx]);
+ yysize_overflow |= (yysize1 < yysize);
+ yysize = yysize1;
+ yyfmt = yystpcpy (yyfmt, yyprefix);
+ yyprefix = yyor;
+ }
- YY_LOCATION_PRINT (yyoutput, *yylocationp);
- YYFPRINTF (yyoutput, ": ");
+ yyf = YY_(yyformat);
+ yysize1 = yysize + yystrlen (yyf);
+ yysize_overflow |= (yysize1 < yysize);
+ yysize = yysize1;
-# ifdef YYPRINT
- if (yytype < YYNTOKENS)
- YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
-# endif
- switch (yytype)
- {
- default:
- break;
+ if (yysize_overflow)
+ return YYSIZE_MAXIMUM;
+
+ if (yyresult)
+ {
+ /* Avoid sprintf, as that infringes on the user's name space.
+ Don't have undefined behavior even if the translation
+ produced a string with the wrong number of "%s"s. */
+ char *yyp = yyresult;
+ int yyi = 0;
+ while ((*yyp = *yyf) != '\0')
+ {
+ if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
+ {
+ yyp += yytnamerr (yyp, yyarg[yyi++]);
+ yyf += 2;
+ }
+ else
+ {
+ yyp++;
+ yyf++;
+ }
+ }
+ }
+ return yysize;
}
- YYFPRINTF (yyoutput, ")");
}
+#endif /* YYERROR_VERBOSE */
+
-#endif /* ! YYDEBUG */
/*-----------------------------------------------.
| Release the memory associated to this symbol. |
`-----------------------------------------------*/
-#if defined (__STDC__) || defined (__cplusplus)
+/*ARGSUSED*/
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
static void
-yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp)
+yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, ElftosbLexer * lexer, CommandFileASTNode ** resultAST)
#else
static void
-yydestruct (yymsg, yytype, yyvaluep, yylocationp)
+yydestruct (yymsg, yytype, yyvaluep, yylocationp, lexer, resultAST)
const char *yymsg;
int yytype;
YYSTYPE *yyvaluep;
YYLTYPE *yylocationp;
+ ElftosbLexer * lexer;
+ CommandFileASTNode ** resultAST;
#endif
{
- /* Pacify ``unused variable'' warnings. */
- (void) yyvaluep;
- (void) yylocationp;
+ YYUSE (yyvaluep);
+ YYUSE (yylocationp);
+ YYUSE (lexer);
+ YYUSE (resultAST);
if (!yymsg)
yymsg = "Deleting";
@@ -1203,57 +1451,83 @@ yydestruct (yymsg, yytype, yyvaluep, yylocationp)
switch (yytype)
{
case 3: /* "\"identifier\"" */
-#line 158 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
- { delete (yyvaluep->m_str); };
-#line 1209 "/Users/creed/projects/fsl/fromsvr/elftosb/build/elftosb.build/Debug/elftosb.build/DerivedSources/elftosb_parser.tab.cpp"
- break;
+
+/* Line 1000 of yacc.c */
+#line 162 "elftosb2/elftosb_parser.y"
+ { delete (yyvaluep->m_str); };
+
+/* Line 1000 of yacc.c */
+#line 1461 "elftosb2/elftosb_parser.tab.cpp"
+ break;
case 4: /* "\"string\"" */
-#line 158 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
- { delete (yyvaluep->m_str); };
-#line 1214 "/Users/creed/projects/fsl/fromsvr/elftosb/build/elftosb.build/Debug/elftosb.build/DerivedSources/elftosb_parser.tab.cpp"
- break;
+
+/* Line 1000 of yacc.c */
+#line 162 "elftosb2/elftosb_parser.y"
+ { delete (yyvaluep->m_str); };
+
+/* Line 1000 of yacc.c */
+#line 1470 "elftosb2/elftosb_parser.tab.cpp"
+ break;
case 5: /* "\"integer\"" */
-#line 158 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
- { delete (yyvaluep->m_int); };
-#line 1219 "/Users/creed/projects/fsl/fromsvr/elftosb/build/elftosb.build/Debug/elftosb.build/DerivedSources/elftosb_parser.tab.cpp"
- break;
+
+/* Line 1000 of yacc.c */
+#line 162 "elftosb2/elftosb_parser.y"
+ { delete (yyvaluep->m_int); };
+
+/* Line 1000 of yacc.c */
+#line 1479 "elftosb2/elftosb_parser.tab.cpp"
+ break;
case 6: /* "\"section name\"" */
-#line 158 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
- { delete (yyvaluep->m_str); };
-#line 1224 "/Users/creed/projects/fsl/fromsvr/elftosb/build/elftosb.build/Debug/elftosb.build/DerivedSources/elftosb_parser.tab.cpp"
- break;
+
+/* Line 1000 of yacc.c */
+#line 162 "elftosb2/elftosb_parser.y"
+ { delete (yyvaluep->m_str); };
+
+/* Line 1000 of yacc.c */
+#line 1488 "elftosb2/elftosb_parser.tab.cpp"
+ break;
case 7: /* "\"source name\"" */
-#line 158 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
- { delete (yyvaluep->m_str); };
-#line 1229 "/Users/creed/projects/fsl/fromsvr/elftosb/build/elftosb.build/Debug/elftosb.build/DerivedSources/elftosb_parser.tab.cpp"
- break;
+
+/* Line 1000 of yacc.c */
+#line 162 "elftosb2/elftosb_parser.y"
+ { delete (yyvaluep->m_str); };
+
+/* Line 1000 of yacc.c */
+#line 1497 "elftosb2/elftosb_parser.tab.cpp"
+ break;
case 8: /* "\"binary object\"" */
-#line 158 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
- { delete (yyvaluep->m_blob); };
-#line 1234 "/Users/creed/projects/fsl/fromsvr/elftosb/build/elftosb.build/Debug/elftosb.build/DerivedSources/elftosb_parser.tab.cpp"
- break;
+
+/* Line 1000 of yacc.c */
+#line 162 "elftosb2/elftosb_parser.y"
+ { delete (yyvaluep->m_blob); };
+
+/* Line 1000 of yacc.c */
+#line 1506 "elftosb2/elftosb_parser.tab.cpp"
+ break;
case 36: /* "\"integer size\"" */
-#line 158 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
- { delete (yyvaluep->m_int); };
-#line 1239 "/Users/creed/projects/fsl/fromsvr/elftosb/build/elftosb.build/Debug/elftosb.build/DerivedSources/elftosb_parser.tab.cpp"
- break;
+
+/* Line 1000 of yacc.c */
+#line 162 "elftosb2/elftosb_parser.y"
+ { delete (yyvaluep->m_int); };
+
+/* Line 1000 of yacc.c */
+#line 1515 "elftosb2/elftosb_parser.tab.cpp"
+ break;
default:
- break;
+ break;
}
}
-
/* Prevent warnings from -Wmissing-prototypes. */
-
#ifdef YYPARSE_PARAM
-# if defined (__STDC__) || defined (__cplusplus)
+#if defined __STDC__ || defined __cplusplus
int yyparse (void *YYPARSE_PARAM);
-# else
+#else
int yyparse ();
-# endif
+#endif
#else /* ! YYPARSE_PARAM */
-#if defined (__STDC__) || defined (__cplusplus)
+#if defined __STDC__ || defined __cplusplus
int yyparse (ElftosbLexer * lexer, CommandFileASTNode ** resultAST);
#else
int yyparse ();
@@ -1264,20 +1538,23 @@ int yyparse ();
-
-/*----------.
-| yyparse. |
-`----------*/
+/*-------------------------.
+| yyparse or yypush_parse. |
+`-------------------------*/
#ifdef YYPARSE_PARAM
-# if defined (__STDC__) || defined (__cplusplus)
-int yyparse (void *YYPARSE_PARAM)
-# else
-int yyparse (YYPARSE_PARAM)
- void *YYPARSE_PARAM;
-# endif
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+int
+yyparse (void *YYPARSE_PARAM)
+#else
+int
+yyparse (YYPARSE_PARAM)
+ void *YYPARSE_PARAM;
+#endif
#else /* ! YYPARSE_PARAM */
-#if defined (__STDC__) || defined (__cplusplus)
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
int
yyparse (ElftosbLexer * lexer, CommandFileASTNode ** resultAST)
#else
@@ -1288,82 +1565,97 @@ yyparse (lexer, resultAST)
#endif
#endif
{
- /* The look-ahead symbol. */
+/* The lookahead symbol. */
int yychar;
-/* The semantic value of the look-ahead symbol. */
+/* The semantic value of the lookahead symbol. */
YYSTYPE yylval;
-/* Number of syntax errors so far. */
-int yynerrs;
-/* Location data for the look-ahead symbol. */
+/* Location data for the lookahead symbol. */
YYLTYPE yylloc;
- int yystate;
- int yyn;
- int yyresult;
- /* Number of tokens to shift before error messages enabled. */
- int yyerrstatus;
- /* Look-ahead token as an internal (translated) token number. */
- int yytoken = 0;
+ /* Number of syntax errors so far. */
+ int yynerrs;
- /* Three stacks and their tools:
- `yyss': related to states,
- `yyvs': related to semantic values,
- `yyls': related to locations.
+ int yystate;
+ /* Number of tokens to shift before error messages enabled. */
+ int yyerrstatus;
- Refer to the stacks thru separate pointers, to allow yyoverflow
- to reallocate them elsewhere. */
+ /* The stacks and their tools:
+ `yyss': related to states.
+ `yyvs': related to semantic values.
+ `yyls': related to locations.
- /* The state stack. */
- short int yyssa[YYINITDEPTH];
- short int *yyss = yyssa;
- short int *yyssp;
+ Refer to the stacks thru separate pointers, to allow yyoverflow
+ to reallocate them elsewhere. */
- /* The semantic value stack. */
- YYSTYPE yyvsa[YYINITDEPTH];
- YYSTYPE *yyvs = yyvsa;
- YYSTYPE *yyvsp;
+ /* The state stack. */
+ yytype_int16 yyssa[YYINITDEPTH];
+ yytype_int16 *yyss;
+ yytype_int16 *yyssp;
- /* The location stack. */
- YYLTYPE yylsa[YYINITDEPTH];
- YYLTYPE *yyls = yylsa;
- YYLTYPE *yylsp;
- /* The locations where the error started and ended. */
- YYLTYPE yyerror_range[2];
+ /* The semantic value stack. */
+ YYSTYPE yyvsa[YYINITDEPTH];
+ YYSTYPE *yyvs;
+ YYSTYPE *yyvsp;
-#define YYPOPSTACK (yyvsp--, yyssp--, yylsp--)
+ /* The location stack. */
+ YYLTYPE yylsa[YYINITDEPTH];
+ YYLTYPE *yyls;
+ YYLTYPE *yylsp;
- YYSIZE_T yystacksize = YYINITDEPTH;
+ /* The locations where the error started and ended. */
+ YYLTYPE yyerror_range[2];
+ YYSIZE_T yystacksize;
+
+ int yyn;
+ int yyresult;
+ /* Lookahead token as an internal (translated) token number. */
+ int yytoken;
/* The variables used to return semantic value and location from the
action routines. */
YYSTYPE yyval;
YYLTYPE yyloc;
- /* When reducing, the number of symbols on the RHS of the reduced
- rule. */
- int yylen;
+#if YYERROR_VERBOSE
+ /* Buffer for error messages, and its allocated size. */
+ char yymsgbuf[128];
+ char *yymsg = yymsgbuf;
+ YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
+#endif
+
+#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
+
+ /* The number of symbols on the RHS of the reduced rule.
+ Keep to zero when no symbol should be popped. */
+ int yylen = 0;
+
+ yytoken = 0;
+ yyss = yyssa;
+ yyvs = yyvsa;
+ yyls = yylsa;
+ yystacksize = YYINITDEPTH;
YYDPRINTF ((stderr, "Starting parse\n"));
yystate = 0;
yyerrstatus = 0;
yynerrs = 0;
- yychar = YYEMPTY; /* Cause a token to be read. */
+ yychar = YYEMPTY; /* Cause a token to be read. */
/* Initialize stack pointers.
Waste one element of value and location stack
so that they stay on the same level as the state stack.
The wasted elements are never initialized. */
-
yyssp = yyss;
yyvsp = yyvs;
yylsp = yyls;
+
#if YYLTYPE_IS_TRIVIAL
/* Initialize the default location before parsing starts. */
yylloc.first_line = yylloc.last_line = 1;
- yylloc.first_column = yylloc.last_column = 0;
+ yylloc.first_column = yylloc.last_column = 1;
#endif
goto yysetstate;
@@ -1373,8 +1665,7 @@ YYLTYPE yylloc;
`------------------------------------------------------------*/
yynewstate:
/* In all cases, when you get here, the value and location stacks
- have just been pushed. so pushing a state here evens the stacks.
- */
+ have just been pushed. So pushing a state here evens the stacks. */
yyssp++;
yysetstate:
@@ -1387,11 +1678,11 @@ YYLTYPE yylloc;
#ifdef yyoverflow
{
- /* Give user a chance to reallocate the stack. Use copies of
+ /* Give user a chance to reallocate the stack. Use copies of
these so that the &'s don't force the real ones into
memory. */
YYSTYPE *yyvs1 = yyvs;
- short int *yyss1 = yyss;
+ yytype_int16 *yyss1 = yyss;
YYLTYPE *yyls1 = yyls;
/* Each stack pointer address is followed by the size of the
@@ -1403,6 +1694,7 @@ YYLTYPE yylloc;
&yyvs1, yysize * sizeof (*yyvsp),
&yyls1, yysize * sizeof (*yylsp),
&yystacksize);
+
yyls = yyls1;
yyss = yyss1;
yyvs = yyvs1;
@@ -1419,14 +1711,14 @@ YYLTYPE yylloc;
yystacksize = YYMAXDEPTH;
{
- short int *yyss1 = yyss;
+ yytype_int16 *yyss1 = yyss;
union yyalloc *yyptr =
(union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
if (! yyptr)
goto yyexhaustedlab;
- YYSTACK_RELOCATE (yyss);
- YYSTACK_RELOCATE (yyvs);
- YYSTACK_RELOCATE (yyls);
+ YYSTACK_RELOCATE (yyss_alloc, yyss);
+ YYSTACK_RELOCATE (yyvs_alloc, yyvs);
+ YYSTACK_RELOCATE (yyls_alloc, yyls);
# undef YYSTACK_RELOCATE
if (yyss1 != yyssa)
YYSTACK_FREE (yyss1);
@@ -1447,6 +1739,9 @@ YYLTYPE yylloc;
YYDPRINTF ((stderr, "Entering state %d\n", yystate));
+ if (yystate == YYFINAL)
+ YYACCEPT;
+
goto yybackup;
/*-----------.
@@ -1454,19 +1749,17 @@ YYLTYPE yylloc;
`-----------*/
yybackup:
-/* Do appropriate processing given the current state. */
-/* Read a look-ahead token if we need one and don't already have one. */
-/* yyresume: */
-
- /* First try to decide what to do without reference to look-ahead token. */
+ /* Do appropriate processing given the current state. Read a
+ lookahead token if we need one and don't already have one. */
+ /* First try to decide what to do without reference to lookahead token. */
yyn = yypact[yystate];
if (yyn == YYPACT_NINF)
goto yydefault;
- /* Not known => get a look-ahead token if don't already have one. */
+ /* Not known => get a lookahead token if don't already have one. */
- /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */
+ /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
if (yychar == YYEMPTY)
{
YYDPRINTF ((stderr, "Reading a token: "));
@@ -1498,25 +1791,20 @@ yybackup:
goto yyreduce;
}
- if (yyn == YYFINAL)
- YYACCEPT;
-
- /* Shift the look-ahead token. */
- YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
-
- /* Discard the token being shifted unless it is eof. */
- if (yychar != YYEOF)
- yychar = YYEMPTY;
-
- *++yyvsp = yylval;
- *++yylsp = yylloc;
-
/* Count tokens shifted since error; after three, turn off error
status. */
if (yyerrstatus)
yyerrstatus--;
+ /* Shift the lookahead token. */
+ YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
+
+ /* Discard the shifted token. */
+ yychar = YYEMPTY;
+
yystate = yyn;
+ *++yyvsp = yylval;
+ *++yylsp = yylloc;
goto yynewstate;
@@ -1547,391 +1835,493 @@ yyreduce:
GCC warning that YYVAL may be used uninitialized. */
yyval = yyvsp[1-yylen];
- /* Default location. */
- YYLLOC_DEFAULT (yyloc, yylsp - yylen, yylen);
+ /* Default location. */
+ YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
YY_REDUCE_PRINT (yyn);
switch (yyn)
{
case 2:
-#line 163 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
+
+/* Line 1455 of yacc.c */
+#line 167 "elftosb2/elftosb_parser.y"
{
CommandFileASTNode * commandFile = new CommandFileASTNode();
- commandFile->setBlocks(dynamic_cast<ListASTNode*>((yyvsp[-1].m_ast)));
- commandFile->setSections(dynamic_cast<ListASTNode*>((yyvsp[0].m_ast)));
- commandFile->setLocation((yylsp[-1]), (yylsp[0]));
+ commandFile->setBlocks(dynamic_cast<ListASTNode*>((yyvsp[(1) - (2)].m_ast)));
+ commandFile->setSections(dynamic_cast<ListASTNode*>((yyvsp[(2) - (2)].m_ast)));
+ commandFile->setLocation((yylsp[(1) - (2)]), (yylsp[(2) - (2)]));
*resultAST = commandFile;
- ;}
+ }
break;
case 3:
-#line 173 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
+
+/* Line 1455 of yacc.c */
+#line 177 "elftosb2/elftosb_parser.y"
{
ListASTNode * list = new ListASTNode();
- list->appendNode((yyvsp[0].m_ast));
+ list->appendNode((yyvsp[(1) - (1)].m_ast));
(yyval.m_ast) = list;
- ;}
+ }
break;
case 4:
-#line 179 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
+
+/* Line 1455 of yacc.c */
+#line 183 "elftosb2/elftosb_parser.y"
{
- dynamic_cast<ListASTNode*>((yyvsp[-1].m_ast))->appendNode((yyvsp[0].m_ast));
- (yyval.m_ast) = (yyvsp[-1].m_ast);
- ;}
+ dynamic_cast<ListASTNode*>((yyvsp[(1) - (2)].m_ast))->appendNode((yyvsp[(2) - (2)].m_ast));
+ (yyval.m_ast) = (yyvsp[(1) - (2)].m_ast);
+ }
break;
case 5:
-#line 186 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
- { (yyval.m_ast) = (yyvsp[0].m_ast); ;}
+
+/* Line 1455 of yacc.c */
+#line 190 "elftosb2/elftosb_parser.y"
+ { (yyval.m_ast) = (yyvsp[(1) - (1)].m_ast); }
break;
case 6:
-#line 187 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
- { (yyval.m_ast) = (yyvsp[0].m_ast); ;}
+
+/* Line 1455 of yacc.c */
+#line 191 "elftosb2/elftosb_parser.y"
+ { (yyval.m_ast) = (yyvsp[(1) - (1)].m_ast); }
break;
case 7:
-#line 188 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
- { (yyval.m_ast) = (yyvsp[0].m_ast); ;}
+
+/* Line 1455 of yacc.c */
+#line 192 "elftosb2/elftosb_parser.y"
+ { (yyval.m_ast) = (yyvsp[(1) - (1)].m_ast); }
break;
case 8:
-#line 192 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
+
+/* Line 1455 of yacc.c */
+#line 196 "elftosb2/elftosb_parser.y"
{
- (yyval.m_ast) = new OptionsBlockASTNode(dynamic_cast<ListASTNode *>((yyvsp[-1].m_ast)));
- ;}
+ (yyval.m_ast) = new OptionsBlockASTNode(dynamic_cast<ListASTNode *>((yyvsp[(3) - (4)].m_ast)));
+ }
break;
case 9:
-#line 198 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
+
+/* Line 1455 of yacc.c */
+#line 202 "elftosb2/elftosb_parser.y"
{
- (yyval.m_ast) = new ConstantsBlockASTNode(dynamic_cast<ListASTNode *>((yyvsp[-1].m_ast)));
- ;}
+ (yyval.m_ast) = new ConstantsBlockASTNode(dynamic_cast<ListASTNode *>((yyvsp[(3) - (4)].m_ast)));
+ }
break;
case 10:
-#line 204 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
+
+/* Line 1455 of yacc.c */
+#line 208 "elftosb2/elftosb_parser.y"
{
ListASTNode * list = new ListASTNode();
- list->appendNode((yyvsp[0].m_ast));
+ list->appendNode((yyvsp[(1) - (1)].m_ast));
(yyval.m_ast) = list;
- ;}
+ }
break;
case 11:
-#line 210 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
+
+/* Line 1455 of yacc.c */
+#line 214 "elftosb2/elftosb_parser.y"
{
- dynamic_cast<ListASTNode*>((yyvsp[-1].m_ast))->appendNode((yyvsp[0].m_ast));
- (yyval.m_ast) = (yyvsp[-1].m_ast);
- ;}
+ dynamic_cast<ListASTNode*>((yyvsp[(1) - (2)].m_ast))->appendNode((yyvsp[(2) - (2)].m_ast));
+ (yyval.m_ast) = (yyvsp[(1) - (2)].m_ast);
+ }
break;
case 12:
-#line 216 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
- { (yyval.m_ast) = (yyvsp[-1].m_ast); ;}
+
+/* Line 1455 of yacc.c */
+#line 220 "elftosb2/elftosb_parser.y"
+ { (yyval.m_ast) = (yyvsp[(1) - (2)].m_ast); }
break;
case 13:
-#line 217 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
- { (yyval.m_ast) = NULL; ;}
+
+/* Line 1455 of yacc.c */
+#line 221 "elftosb2/elftosb_parser.y"
+ { (yyval.m_ast) = NULL; }
break;
case 14:
-#line 221 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
+
+/* Line 1455 of yacc.c */
+#line 225 "elftosb2/elftosb_parser.y"
{
- (yyval.m_ast) = new AssignmentASTNode((yyvsp[-2].m_str), (yyvsp[0].m_ast));
- (yyval.m_ast)->setLocation((yylsp[-2]), (yylsp[0]));
- ;}
+ (yyval.m_ast) = new AssignmentASTNode((yyvsp[(1) - (3)].m_str), (yyvsp[(3) - (3)].m_ast));
+ (yyval.m_ast)->setLocation((yylsp[(1) - (3)]), (yylsp[(3) - (3)]));
+ }
break;
case 15:
-#line 228 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
+
+/* Line 1455 of yacc.c */
+#line 232 "elftosb2/elftosb_parser.y"
{
- (yyval.m_ast) = new SourcesBlockASTNode(dynamic_cast<ListASTNode *>((yyvsp[-1].m_ast)));
- ;}
+ (yyval.m_ast) = new SourcesBlockASTNode(dynamic_cast<ListASTNode *>((yyvsp[(3) - (4)].m_ast)));
+ }
break;
case 16:
-#line 234 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
+
+/* Line 1455 of yacc.c */
+#line 238 "elftosb2/elftosb_parser.y"
{
ListASTNode * list = new ListASTNode();
- list->appendNode((yyvsp[0].m_ast));
+ list->appendNode((yyvsp[(1) - (1)].m_ast));
(yyval.m_ast) = list;
- ;}
+ }
break;
case 17:
-#line 240 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
+
+/* Line 1455 of yacc.c */
+#line 244 "elftosb2/elftosb_parser.y"
{
- dynamic_cast<ListASTNode*>((yyvsp[-1].m_ast))->appendNode((yyvsp[0].m_ast));
- (yyval.m_ast) = (yyvsp[-1].m_ast);
- ;}
+ dynamic_cast<ListASTNode*>((yyvsp[(1) - (2)].m_ast))->appendNode((yyvsp[(2) - (2)].m_ast));
+ (yyval.m_ast) = (yyvsp[(1) - (2)].m_ast);
+ }
break;
case 18:
-#line 248 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
+
+/* Line 1455 of yacc.c */
+#line 252 "elftosb2/elftosb_parser.y"
{
// tell the lexer that this is the name of a source file
- SourceDefASTNode * node = dynamic_cast<SourceDefASTNode*>((yyvsp[-2].m_ast));
- if ((yyvsp[-1].m_ast))
+ SourceDefASTNode * node = dynamic_cast<SourceDefASTNode*>((yyvsp[(1) - (3)].m_ast));
+ if ((yyvsp[(2) - (3)].m_ast))
{
- node->setAttributes(dynamic_cast<ListASTNode*>((yyvsp[-1].m_ast)));
+ node->setAttributes(dynamic_cast<ListASTNode*>((yyvsp[(2) - (3)].m_ast)));
}
- node->setLocation(node->getLocation(), (yylsp[0]));
+ node->setLocation(node->getLocation(), (yylsp[(3) - (3)]));
lexer->addSourceName(node->getName());
- (yyval.m_ast) = (yyvsp[-2].m_ast);
- ;}
+ (yyval.m_ast) = (yyvsp[(1) - (3)].m_ast);
+ }
break;
case 19:
-#line 259 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
- { (yyval.m_ast) = NULL; ;}
+
+/* Line 1455 of yacc.c */
+#line 263 "elftosb2/elftosb_parser.y"
+ { (yyval.m_ast) = NULL; }
break;
case 20:
-#line 263 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
+
+/* Line 1455 of yacc.c */
+#line 267 "elftosb2/elftosb_parser.y"
{
- (yyval.m_ast) = new PathSourceDefASTNode((yyvsp[-2].m_str), (yyvsp[0].m_str));
- (yyval.m_ast)->setLocation((yylsp[-2]), (yylsp[0]));
- ;}
+ (yyval.m_ast) = new PathSourceDefASTNode((yyvsp[(1) - (3)].m_str), (yyvsp[(3) - (3)].m_str));
+ (yyval.m_ast)->setLocation((yylsp[(1) - (3)]), (yylsp[(3) - (3)]));
+ }
break;
case 21:
-#line 268 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
+
+/* Line 1455 of yacc.c */
+#line 272 "elftosb2/elftosb_parser.y"
{
- (yyval.m_ast) = new ExternSourceDefASTNode((yyvsp[-5].m_str), dynamic_cast<ExprASTNode*>((yyvsp[-1].m_ast)));
- (yyval.m_ast)->setLocation((yylsp[-5]), (yylsp[0]));
- ;}
+ (yyval.m_ast) = new ExternSourceDefASTNode((yyvsp[(1) - (6)].m_str), dynamic_cast<ExprASTNode*>((yyvsp[(5) - (6)].m_ast)));
+ (yyval.m_ast)->setLocation((yylsp[(1) - (6)]), (yylsp[(6) - (6)]));
+ }
break;
case 22:
-#line 275 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
- { (yyval.m_ast) = (yyvsp[-1].m_ast); ;}
+
+/* Line 1455 of yacc.c */
+#line 279 "elftosb2/elftosb_parser.y"
+ { (yyval.m_ast) = (yyvsp[(2) - (3)].m_ast); }
break;
case 23:
-#line 276 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
- { (yyval.m_ast) = NULL; ;}
+
+/* Line 1455 of yacc.c */
+#line 280 "elftosb2/elftosb_parser.y"
+ { (yyval.m_ast) = NULL; }
break;
case 24:
-#line 281 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
+
+/* Line 1455 of yacc.c */
+#line 285 "elftosb2/elftosb_parser.y"
{
ListASTNode * list = new ListASTNode();
- list->appendNode((yyvsp[0].m_ast));
+ list->appendNode((yyvsp[(1) - (1)].m_ast));
(yyval.m_ast) = list;
- ;}
+ }
break;
case 25:
-#line 287 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
+
+/* Line 1455 of yacc.c */
+#line 291 "elftosb2/elftosb_parser.y"
{
- dynamic_cast<ListASTNode*>((yyvsp[-2].m_ast))->appendNode((yyvsp[0].m_ast));
- (yyval.m_ast) = (yyvsp[-2].m_ast);
- ;}
+ dynamic_cast<ListASTNode*>((yyvsp[(1) - (3)].m_ast))->appendNode((yyvsp[(3) - (3)].m_ast));
+ (yyval.m_ast) = (yyvsp[(1) - (3)].m_ast);
+ }
break;
case 26:
-#line 295 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
+
+/* Line 1455 of yacc.c */
+#line 299 "elftosb2/elftosb_parser.y"
{
- (yyval.m_ast) = new AssignmentASTNode((yyvsp[-2].m_str), (yyvsp[0].m_ast));
- (yyval.m_ast)->setLocation((yylsp[-2]), (yylsp[0]));
- ;}
+ (yyval.m_ast) = new AssignmentASTNode((yyvsp[(1) - (3)].m_str), (yyvsp[(3) - (3)].m_ast));
+ (yyval.m_ast)->setLocation((yylsp[(1) - (3)]), (yylsp[(3) - (3)]));
+ }
break;
case 27:
-#line 302 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
+
+/* Line 1455 of yacc.c */
+#line 306 "elftosb2/elftosb_parser.y"
{
ListASTNode * list = new ListASTNode();
- list->appendNode((yyvsp[0].m_ast));
+ list->appendNode((yyvsp[(1) - (1)].m_ast));
(yyval.m_ast) = list;
- ;}
+ }
break;
case 28:
-#line 308 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
+
+/* Line 1455 of yacc.c */
+#line 312 "elftosb2/elftosb_parser.y"
{
- dynamic_cast<ListASTNode*>((yyvsp[-1].m_ast))->appendNode((yyvsp[0].m_ast));
- (yyval.m_ast) = (yyvsp[-1].m_ast);
- ;}
+ dynamic_cast<ListASTNode*>((yyvsp[(1) - (2)].m_ast))->appendNode((yyvsp[(2) - (2)].m_ast));
+ (yyval.m_ast) = (yyvsp[(1) - (2)].m_ast);
+ }
break;
case 29:
-#line 315 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
+
+/* Line 1455 of yacc.c */
+#line 319 "elftosb2/elftosb_parser.y"
{
- SectionContentsASTNode * sectionNode = dynamic_cast<SectionContentsASTNode*>((yyvsp[0].m_ast));
+ SectionContentsASTNode * sectionNode = dynamic_cast<SectionContentsASTNode*>((yyvsp[(6) - (6)].m_ast));
if (sectionNode)
{
- ExprASTNode * exprNode = dynamic_cast<ExprASTNode*>((yyvsp[-3].m_ast));
+ ExprASTNode * exprNode = dynamic_cast<ExprASTNode*>((yyvsp[(3) - (6)].m_ast));
sectionNode->setSectionNumberExpr(exprNode);
- sectionNode->setOptions(dynamic_cast<ListASTNode*>((yyvsp[-2].m_ast)));
- sectionNode->setLocation((yylsp[-5]), sectionNode->getLocation());
+ sectionNode->setOptions(dynamic_cast<ListASTNode*>((yyvsp[(4) - (6)].m_ast)));
+ sectionNode->setLocation((yylsp[(1) - (6)]), sectionNode->getLocation());
}
- (yyval.m_ast) = (yyvsp[0].m_ast);
- ;}
+ (yyval.m_ast) = (yyvsp[(6) - (6)].m_ast);
+ }
break;
case 30:
-#line 330 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
+
+/* Line 1455 of yacc.c */
+#line 334 "elftosb2/elftosb_parser.y"
{
- (yyval.m_ast) = (yyvsp[0].m_ast);
- ;}
+ (yyval.m_ast) = (yyvsp[(2) - (2)].m_ast);
+ }
break;
case 31:
-#line 334 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
+
+/* Line 1455 of yacc.c */
+#line 338 "elftosb2/elftosb_parser.y"
{
(yyval.m_ast) = NULL;
- ;}
+ }
break;
case 32:
-#line 341 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
+
+/* Line 1455 of yacc.c */
+#line 345 "elftosb2/elftosb_parser.y"
{
- (yyval.m_ast) = (yyvsp[0].m_ast);
- ;}
+ (yyval.m_ast) = (yyvsp[(1) - (1)].m_ast);
+ }
break;
case 33:
-#line 345 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
+
+/* Line 1455 of yacc.c */
+#line 349 "elftosb2/elftosb_parser.y"
{
(yyval.m_ast) = NULL;
- ;}
+ }
break;
case 34:
-#line 352 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
+
+/* Line 1455 of yacc.c */
+#line 356 "elftosb2/elftosb_parser.y"
{
- DataSectionContentsASTNode * dataSection = new DataSectionContentsASTNode((yyvsp[-1].m_ast));
- dataSection->setLocation((yylsp[-2]), (yylsp[0]));
+ DataSectionContentsASTNode * dataSection = new DataSectionContentsASTNode((yyvsp[(2) - (3)].m_ast));
+ dataSection->setLocation((yylsp[(1) - (3)]), (yylsp[(3) - (3)]));
(yyval.m_ast) = dataSection;
- ;}
+ }
break;
case 35:
-#line 358 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
+
+/* Line 1455 of yacc.c */
+#line 362 "elftosb2/elftosb_parser.y"
{
- ListASTNode * listNode = dynamic_cast<ListASTNode*>((yyvsp[-1].m_ast));
+ ListASTNode * listNode = dynamic_cast<ListASTNode*>((yyvsp[(2) - (3)].m_ast));
(yyval.m_ast) = new BootableSectionContentsASTNode(listNode);
- (yyval.m_ast)->setLocation((yylsp[-2]), (yylsp[0]));
- ;}
+ (yyval.m_ast)->setLocation((yylsp[(1) - (3)]), (yylsp[(3) - (3)]));
+ }
break;
case 36:
-#line 366 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
+
+/* Line 1455 of yacc.c */
+#line 370 "elftosb2/elftosb_parser.y"
{
ListASTNode * list = new ListASTNode();
- list->appendNode((yyvsp[0].m_ast));
+ list->appendNode((yyvsp[(1) - (1)].m_ast));
(yyval.m_ast) = list;
- ;}
+ }
break;
case 37:
-#line 372 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
+
+/* Line 1455 of yacc.c */
+#line 376 "elftosb2/elftosb_parser.y"
{
- dynamic_cast<ListASTNode*>((yyvsp[-1].m_ast))->appendNode((yyvsp[0].m_ast));
- (yyval.m_ast) = (yyvsp[-1].m_ast);
- ;}
+ dynamic_cast<ListASTNode*>((yyvsp[(1) - (2)].m_ast))->appendNode((yyvsp[(2) - (2)].m_ast));
+ (yyval.m_ast) = (yyvsp[(1) - (2)].m_ast);
+ }
break;
case 38:
-#line 379 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
- { (yyval.m_ast) = (yyvsp[-1].m_ast); ;}
+
+/* Line 1455 of yacc.c */
+#line 383 "elftosb2/elftosb_parser.y"
+ { (yyval.m_ast) = (yyvsp[(1) - (2)].m_ast); }
break;
case 39:
-#line 380 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
- { (yyval.m_ast) = (yyvsp[0].m_ast); ;}
+
+/* Line 1455 of yacc.c */
+#line 384 "elftosb2/elftosb_parser.y"
+ { (yyval.m_ast) = (yyvsp[(1) - (1)].m_ast); }
break;
case 40:
-#line 381 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
- { (yyval.m_ast) = (yyvsp[0].m_ast); ;}
+
+/* Line 1455 of yacc.c */
+#line 385 "elftosb2/elftosb_parser.y"
+ { (yyval.m_ast) = (yyvsp[(1) - (1)].m_ast); }
break;
case 41:
-#line 382 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
- { (yyval.m_ast) = NULL; ;}
+
+/* Line 1455 of yacc.c */
+#line 386 "elftosb2/elftosb_parser.y"
+ { (yyval.m_ast) = NULL; }
break;
case 42:
-#line 386 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
+
+/* Line 1455 of yacc.c */
+#line 390 "elftosb2/elftosb_parser.y"
{
ListASTNode * list = new ListASTNode();
- list->appendNode((yyvsp[0].m_ast));
+ list->appendNode((yyvsp[(1) - (1)].m_ast));
(yyval.m_ast) = list;
- ;}
+ }
break;
case 43:
-#line 392 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
+
+/* Line 1455 of yacc.c */
+#line 396 "elftosb2/elftosb_parser.y"
{
- dynamic_cast<ListASTNode*>((yyvsp[-1].m_ast))->appendNode((yyvsp[0].m_ast));
- (yyval.m_ast) = (yyvsp[-1].m_ast);
- ;}
+ dynamic_cast<ListASTNode*>((yyvsp[(1) - (2)].m_ast))->appendNode((yyvsp[(2) - (2)].m_ast));
+ (yyval.m_ast) = (yyvsp[(1) - (2)].m_ast);
+ }
break;
case 44:
-#line 399 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
- { (yyval.m_ast) = (yyvsp[-1].m_ast); ;}
+
+/* Line 1455 of yacc.c */
+#line 403 "elftosb2/elftosb_parser.y"
+ { (yyval.m_ast) = (yyvsp[(1) - (2)].m_ast); }
break;
case 45:
-#line 400 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
- { (yyval.m_ast) = (yyvsp[0].m_ast); ;}
+
+/* Line 1455 of yacc.c */
+#line 404 "elftosb2/elftosb_parser.y"
+ { (yyval.m_ast) = (yyvsp[(1) - (1)].m_ast); }
break;
case 46:
-#line 401 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
- { (yyval.m_ast) = NULL; ;}
+
+/* Line 1455 of yacc.c */
+#line 405 "elftosb2/elftosb_parser.y"
+ { (yyval.m_ast) = NULL; }
break;
case 47:
-#line 404 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
- { (yyval.m_ast) = (yyvsp[0].m_ast); ;}
+
+/* Line 1455 of yacc.c */
+#line 408 "elftosb2/elftosb_parser.y"
+ { (yyval.m_ast) = (yyvsp[(1) - (1)].m_ast); }
break;
case 48:
-#line 405 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
- { (yyval.m_ast) = (yyvsp[0].m_ast); ;}
+
+/* Line 1455 of yacc.c */
+#line 409 "elftosb2/elftosb_parser.y"
+ { (yyval.m_ast) = (yyvsp[(1) - (1)].m_ast); }
break;
case 49:
-#line 406 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
- { (yyval.m_ast) = (yyvsp[0].m_ast); ;}
+
+/* Line 1455 of yacc.c */
+#line 410 "elftosb2/elftosb_parser.y"
+ { (yyval.m_ast) = (yyvsp[(1) - (1)].m_ast); }
break;
case 50:
-#line 407 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
- { (yyval.m_ast) = (yyvsp[0].m_ast); ;}
+
+/* Line 1455 of yacc.c */
+#line 411 "elftosb2/elftosb_parser.y"
+ { (yyval.m_ast) = (yyvsp[(1) - (1)].m_ast); }
break;
case 51:
-#line 411 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
+
+/* Line 1455 of yacc.c */
+#line 415 "elftosb2/elftosb_parser.y"
{
LoadStatementASTNode * stmt = new LoadStatementASTNode();
- stmt->setData((yyvsp[-1].m_ast));
- stmt->setTarget((yyvsp[0].m_ast));
+ stmt->setData((yyvsp[(3) - (4)].m_ast));
+ stmt->setTarget((yyvsp[(4) - (4)].m_ast));
// set dcd load flag if the "dcd" keyword was present.
- if ((yyvsp[-2].m_num))
+ if ((yyvsp[(2) - (4)].m_num))
{
stmt->setDCDLoad(true);
}
// set char locations for the statement
- if ((yyvsp[0].m_ast))
+ if ((yyvsp[(4) - (4)].m_ast))
{
- stmt->setLocation((yylsp[-3]), (yylsp[0]));
+ stmt->setLocation((yylsp[(1) - (4)]), (yylsp[(4) - (4)]));
}
else
{
- stmt->setLocation((yylsp[-3]), (yylsp[-1]));
+ stmt->setLocation((yylsp[(1) - (4)]), (yylsp[(3) - (4)]));
}
(yyval.m_ast) = stmt;
- ;}
+ }
break;
case 52:
-#line 434 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
+
+/* Line 1455 of yacc.c */
+#line 438 "elftosb2/elftosb_parser.y"
{
if (!elftosb::g_enableHABSupport)
{
@@ -1940,166 +2330,208 @@ yyreduce:
}
(yyval.m_num) = 1;
- ;}
+ }
break;
case 53:
-#line 443 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
- { (yyval.m_num) = 0; ;}
+
+/* Line 1455 of yacc.c */
+#line 447 "elftosb2/elftosb_parser.y"
+ { (yyval.m_num) = 0; }
break;
case 54:
-#line 446 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
+
+/* Line 1455 of yacc.c */
+#line 450 "elftosb2/elftosb_parser.y"
{
- (yyval.m_ast) = (yyvsp[0].m_ast);
- ;}
+ (yyval.m_ast) = (yyvsp[(1) - (1)].m_ast);
+ }
break;
case 55:
-#line 450 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
+
+/* Line 1455 of yacc.c */
+#line 454 "elftosb2/elftosb_parser.y"
{
- (yyval.m_ast) = new StringConstASTNode((yyvsp[0].m_str));
- (yyval.m_ast)->setLocation((yylsp[0]));
- ;}
+ (yyval.m_ast) = new StringConstASTNode((yyvsp[(1) - (1)].m_str));
+ (yyval.m_ast)->setLocation((yylsp[(1) - (1)]));
+ }
break;
case 56:
-#line 455 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
+
+/* Line 1455 of yacc.c */
+#line 459 "elftosb2/elftosb_parser.y"
{
- (yyval.m_ast) = new SourceASTNode((yyvsp[0].m_str));
- (yyval.m_ast)->setLocation((yylsp[0]));
- ;}
+ (yyval.m_ast) = new SourceASTNode((yyvsp[(1) - (1)].m_str));
+ (yyval.m_ast)->setLocation((yylsp[(1) - (1)]));
+ }
break;
case 57:
-#line 460 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
+
+/* Line 1455 of yacc.c */
+#line 464 "elftosb2/elftosb_parser.y"
{
- (yyval.m_ast) = new SectionMatchListASTNode(dynamic_cast<ListASTNode*>((yyvsp[0].m_ast)));
- (yyval.m_ast)->setLocation((yylsp[0]));
- ;}
+ (yyval.m_ast) = new SectionMatchListASTNode(dynamic_cast<ListASTNode*>((yyvsp[(1) - (1)].m_ast)));
+ (yyval.m_ast)->setLocation((yylsp[(1) - (1)]));
+ }
break;
case 58:
-#line 465 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
+
+/* Line 1455 of yacc.c */
+#line 469 "elftosb2/elftosb_parser.y"
{
- (yyval.m_ast) = new SectionMatchListASTNode(dynamic_cast<ListASTNode*>((yyvsp[-2].m_ast)), (yyvsp[0].m_str));
- (yyval.m_ast)->setLocation((yylsp[-2]), (yylsp[0]));
- ;}
+ (yyval.m_ast) = new SectionMatchListASTNode(dynamic_cast<ListASTNode*>((yyvsp[(1) - (3)].m_ast)), (yyvsp[(3) - (3)].m_str));
+ (yyval.m_ast)->setLocation((yylsp[(1) - (3)]), (yylsp[(3) - (3)]));
+ }
break;
case 59:
-#line 470 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
+
+/* Line 1455 of yacc.c */
+#line 474 "elftosb2/elftosb_parser.y"
{
- (yyval.m_ast) = new SectionMatchListASTNode(dynamic_cast<ListASTNode*>((yyvsp[-1].m_ast)), (yyvsp[-3].m_str));
- (yyval.m_ast)->setLocation((yylsp[-3]), (yylsp[0]));
- ;}
+ (yyval.m_ast) = new SectionMatchListASTNode(dynamic_cast<ListASTNode*>((yyvsp[(3) - (4)].m_ast)), (yyvsp[(1) - (4)].m_str));
+ (yyval.m_ast)->setLocation((yylsp[(1) - (4)]), (yylsp[(4) - (4)]));
+ }
break;
case 60:
-#line 475 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
+
+/* Line 1455 of yacc.c */
+#line 479 "elftosb2/elftosb_parser.y"
{
- (yyval.m_ast) = new BlobConstASTNode((yyvsp[0].m_blob));
- (yyval.m_ast)->setLocation((yylsp[0]));
- ;}
+ (yyval.m_ast) = new BlobConstASTNode((yyvsp[(1) - (1)].m_blob));
+ (yyval.m_ast)->setLocation((yylsp[(1) - (1)]));
+ }
break;
case 61:
-#line 480 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
+
+/* Line 1455 of yacc.c */
+#line 484 "elftosb2/elftosb_parser.y"
{
- ;}
+ }
break;
case 62:
-#line 485 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
+
+/* Line 1455 of yacc.c */
+#line 489 "elftosb2/elftosb_parser.y"
{
ListASTNode * list = new ListASTNode();
- list->appendNode((yyvsp[0].m_ast));
+ list->appendNode((yyvsp[(1) - (1)].m_ast));
(yyval.m_ast) = list;
- ;}
+ }
break;
case 63:
-#line 491 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
+
+/* Line 1455 of yacc.c */
+#line 495 "elftosb2/elftosb_parser.y"
{
- dynamic_cast<ListASTNode*>((yyvsp[-2].m_ast))->appendNode((yyvsp[0].m_ast));
- (yyval.m_ast) = (yyvsp[-2].m_ast);
- ;}
+ dynamic_cast<ListASTNode*>((yyvsp[(1) - (3)].m_ast))->appendNode((yyvsp[(3) - (3)].m_ast));
+ (yyval.m_ast) = (yyvsp[(1) - (3)].m_ast);
+ }
break;
case 64:
-#line 499 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
+
+/* Line 1455 of yacc.c */
+#line 503 "elftosb2/elftosb_parser.y"
{
- (yyval.m_ast) = new SectionASTNode((yyvsp[0].m_str), SectionASTNode::kInclude);
- (yyval.m_ast)->setLocation((yylsp[0]));
- ;}
+ (yyval.m_ast) = new SectionASTNode((yyvsp[(1) - (1)].m_str), SectionASTNode::kInclude);
+ (yyval.m_ast)->setLocation((yylsp[(1) - (1)]));
+ }
break;
case 65:
-#line 504 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
+
+/* Line 1455 of yacc.c */
+#line 508 "elftosb2/elftosb_parser.y"
{
- (yyval.m_ast) = new SectionASTNode((yyvsp[0].m_str), SectionASTNode::kExclude);
- (yyval.m_ast)->setLocation((yylsp[-1]), (yylsp[0]));
- ;}
+ (yyval.m_ast) = new SectionASTNode((yyvsp[(2) - (2)].m_str), SectionASTNode::kExclude);
+ (yyval.m_ast)->setLocation((yylsp[(1) - (2)]), (yylsp[(2) - (2)]));
+ }
break;
case 66:
-#line 511 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
+
+/* Line 1455 of yacc.c */
+#line 515 "elftosb2/elftosb_parser.y"
{
- (yyval.m_ast) = (yyvsp[0].m_ast);
- ;}
+ (yyval.m_ast) = (yyvsp[(2) - (2)].m_ast);
+ }
break;
case 67:
-#line 515 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
+
+/* Line 1455 of yacc.c */
+#line 519 "elftosb2/elftosb_parser.y"
{
(yyval.m_ast) = new NaturalLocationASTNode();
// $$->setLocation();
- ;}
+ }
break;
case 68:
-#line 522 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
+
+/* Line 1455 of yacc.c */
+#line 526 "elftosb2/elftosb_parser.y"
{
(yyval.m_ast) = new NaturalLocationASTNode();
- (yyval.m_ast)->setLocation((yylsp[0]));
- ;}
+ (yyval.m_ast)->setLocation((yylsp[(1) - (1)]));
+ }
break;
case 69:
-#line 527 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
+
+/* Line 1455 of yacc.c */
+#line 531 "elftosb2/elftosb_parser.y"
{
- (yyval.m_ast) = (yyvsp[0].m_ast);
- ;}
+ (yyval.m_ast) = (yyvsp[(1) - (1)].m_ast);
+ }
break;
case 70:
-#line 533 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
+
+/* Line 1455 of yacc.c */
+#line 537 "elftosb2/elftosb_parser.y"
{
IVTConstASTNode * ivt = new IVTConstASTNode();
- if ((yyvsp[-1].m_ast))
+ if ((yyvsp[(3) - (4)].m_ast))
{
- ivt->setFieldAssignments(dynamic_cast<ListASTNode*>((yyvsp[-1].m_ast)));
+ ivt->setFieldAssignments(dynamic_cast<ListASTNode*>((yyvsp[(3) - (4)].m_ast)));
}
- ivt->setLocation((yylsp[-3]), (yylsp[0]));
+ ivt->setLocation((yylsp[(1) - (4)]), (yylsp[(4) - (4)]));
(yyval.m_ast) = ivt;
- ;}
+ }
break;
case 71:
-#line 544 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
- { (yyval.m_ast) = (yyvsp[0].m_ast); ;}
+
+/* Line 1455 of yacc.c */
+#line 548 "elftosb2/elftosb_parser.y"
+ { (yyval.m_ast) = (yyvsp[(1) - (1)].m_ast); }
break;
case 72:
-#line 545 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
- { (yyval.m_ast) = NULL; ;}
+
+/* Line 1455 of yacc.c */
+#line 549 "elftosb2/elftosb_parser.y"
+ { (yyval.m_ast) = NULL; }
break;
case 73:
-#line 549 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
+
+/* Line 1455 of yacc.c */
+#line 553 "elftosb2/elftosb_parser.y"
{
CallStatementASTNode * stmt = new CallStatementASTNode();
- switch ((yyvsp[-2].m_num))
+ switch ((yyvsp[(1) - (3)].m_num))
{
case 1:
stmt->setCallType(CallStatementASTNode::kCallType);
@@ -2112,23 +2544,25 @@ yyreduce:
YYABORT;
break;
}
- stmt->setTarget((yyvsp[-1].m_ast));
- stmt->setArgument((yyvsp[0].m_ast));
+ stmt->setTarget((yyvsp[(2) - (3)].m_ast));
+ stmt->setArgument((yyvsp[(3) - (3)].m_ast));
stmt->setIsHAB(false);
- if ((yyvsp[0].m_ast))
+ if ((yyvsp[(3) - (3)].m_ast))
{
- stmt->setLocation((yylsp[-2]), (yylsp[0]));
+ stmt->setLocation((yylsp[(1) - (3)]), (yylsp[(3) - (3)]));
}
else
{
- stmt->setLocation((yylsp[-2]), (yylsp[-1]));
+ stmt->setLocation((yylsp[(1) - (3)]), (yylsp[(2) - (3)]));
}
(yyval.m_ast) = stmt;
- ;}
+ }
break;
case 74:
-#line 578 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
+
+/* Line 1455 of yacc.c */
+#line 582 "elftosb2/elftosb_parser.y"
{
if (!elftosb::g_enableHABSupport)
{
@@ -2137,7 +2571,7 @@ yyreduce:
}
CallStatementASTNode * stmt = new CallStatementASTNode();
- switch ((yyvsp[-2].m_num))
+ switch ((yyvsp[(2) - (4)].m_num))
{
case 1:
stmt->setCallType(CallStatementASTNode::kCallType);
@@ -2150,521 +2584,638 @@ yyreduce:
YYABORT;
break;
}
- stmt->setTarget((yyvsp[-1].m_ast));
- stmt->setArgument((yyvsp[0].m_ast));
+ stmt->setTarget((yyvsp[(3) - (4)].m_ast));
+ stmt->setArgument((yyvsp[(4) - (4)].m_ast));
stmt->setIsHAB(true);
- if ((yyvsp[0].m_ast))
+ if ((yyvsp[(4) - (4)].m_ast))
{
- stmt->setLocation((yylsp[-3]), (yylsp[0]));
+ stmt->setLocation((yylsp[(1) - (4)]), (yylsp[(4) - (4)]));
}
else
{
- stmt->setLocation((yylsp[-3]), (yylsp[-1]));
+ stmt->setLocation((yylsp[(1) - (4)]), (yylsp[(3) - (4)]));
}
(yyval.m_ast) = stmt;
- ;}
+ }
break;
case 75:
-#line 614 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
- { (yyval.m_num) = 1; ;}
+
+/* Line 1455 of yacc.c */
+#line 618 "elftosb2/elftosb_parser.y"
+ { (yyval.m_num) = 1; }
break;
case 76:
-#line 615 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
- { (yyval.m_num) = 2; ;}
+
+/* Line 1455 of yacc.c */
+#line 619 "elftosb2/elftosb_parser.y"
+ { (yyval.m_num) = 2; }
break;
case 77:
-#line 619 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
+
+/* Line 1455 of yacc.c */
+#line 623 "elftosb2/elftosb_parser.y"
{
- (yyval.m_ast) = new SymbolASTNode(NULL, (yyvsp[0].m_str));
- (yyval.m_ast)->setLocation((yylsp[0]));
- ;}
+ (yyval.m_ast) = new SymbolASTNode(NULL, (yyvsp[(1) - (1)].m_str));
+ (yyval.m_ast)->setLocation((yylsp[(1) - (1)]));
+ }
break;
case 78:
-#line 624 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
+
+/* Line 1455 of yacc.c */
+#line 628 "elftosb2/elftosb_parser.y"
{
- (yyval.m_ast) = new AddressRangeASTNode((yyvsp[0].m_ast), NULL);
- (yyval.m_ast)->setLocation((yyvsp[0].m_ast));
- ;}
+ (yyval.m_ast) = new AddressRangeASTNode((yyvsp[(1) - (1)].m_ast), NULL);
+ (yyval.m_ast)->setLocation((yyvsp[(1) - (1)].m_ast));
+ }
break;
case 79:
-#line 630 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
- { (yyval.m_ast) = (yyvsp[-1].m_ast); ;}
+
+/* Line 1455 of yacc.c */
+#line 634 "elftosb2/elftosb_parser.y"
+ { (yyval.m_ast) = (yyvsp[(2) - (3)].m_ast); }
break;
case 80:
-#line 631 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
- { (yyval.m_ast) = NULL; ;}
+
+/* Line 1455 of yacc.c */
+#line 635 "elftosb2/elftosb_parser.y"
+ { (yyval.m_ast) = NULL; }
break;
case 81:
-#line 632 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
- { (yyval.m_ast) = NULL; ;}
+
+/* Line 1455 of yacc.c */
+#line 636 "elftosb2/elftosb_parser.y"
+ { (yyval.m_ast) = NULL; }
break;
case 82:
-#line 636 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
+
+/* Line 1455 of yacc.c */
+#line 640 "elftosb2/elftosb_parser.y"
{
- (yyval.m_ast) = new FromStatementASTNode((yyvsp[-3].m_str), dynamic_cast<ListASTNode*>((yyvsp[-1].m_ast)));
- (yyval.m_ast)->setLocation((yylsp[-4]), (yylsp[0]));
- ;}
+ (yyval.m_ast) = new FromStatementASTNode((yyvsp[(2) - (5)].m_str), dynamic_cast<ListASTNode*>((yyvsp[(4) - (5)].m_ast)));
+ (yyval.m_ast)->setLocation((yylsp[(1) - (5)]), (yylsp[(5) - (5)]));
+ }
break;
case 83:
-#line 643 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
+
+/* Line 1455 of yacc.c */
+#line 647 "elftosb2/elftosb_parser.y"
{
- (yyval.m_ast) = new ModeStatementASTNode(dynamic_cast<ExprASTNode*>((yyvsp[0].m_ast)));
- (yyval.m_ast)->setLocation((yylsp[-1]), (yylsp[0]));
- ;}
+ (yyval.m_ast) = new ModeStatementASTNode(dynamic_cast<ExprASTNode*>((yyvsp[(2) - (2)].m_ast)));
+ (yyval.m_ast)->setLocation((yylsp[(1) - (2)]), (yylsp[(2) - (2)]));
+ }
break;
case 84:
-#line 650 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
+
+/* Line 1455 of yacc.c */
+#line 654 "elftosb2/elftosb_parser.y"
{
- (yyval.m_ast) = new MessageStatementASTNode(MessageStatementASTNode::kInfo, (yyvsp[0].m_str));
- (yyval.m_ast)->setLocation((yylsp[-1]), (yylsp[0]));
- ;}
+ (yyval.m_ast) = new MessageStatementASTNode(MessageStatementASTNode::kInfo, (yyvsp[(2) - (2)].m_str));
+ (yyval.m_ast)->setLocation((yylsp[(1) - (2)]), (yylsp[(2) - (2)]));
+ }
break;
case 85:
-#line 655 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
+
+/* Line 1455 of yacc.c */
+#line 659 "elftosb2/elftosb_parser.y"
{
- (yyval.m_ast) = new MessageStatementASTNode(MessageStatementASTNode::kWarning, (yyvsp[0].m_str));
- (yyval.m_ast)->setLocation((yylsp[-1]), (yylsp[0]));
- ;}
+ (yyval.m_ast) = new MessageStatementASTNode(MessageStatementASTNode::kWarning, (yyvsp[(2) - (2)].m_str));
+ (yyval.m_ast)->setLocation((yylsp[(1) - (2)]), (yylsp[(2) - (2)]));
+ }
break;
case 86:
-#line 660 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
+
+/* Line 1455 of yacc.c */
+#line 664 "elftosb2/elftosb_parser.y"
{
- (yyval.m_ast) = new MessageStatementASTNode(MessageStatementASTNode::kError, (yyvsp[0].m_str));
- (yyval.m_ast)->setLocation((yylsp[-1]), (yylsp[0]));
- ;}
+ (yyval.m_ast) = new MessageStatementASTNode(MessageStatementASTNode::kError, (yyvsp[(2) - (2)].m_str));
+ (yyval.m_ast)->setLocation((yylsp[(1) - (2)]), (yylsp[(2) - (2)]));
+ }
break;
case 87:
-#line 667 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
+
+/* Line 1455 of yacc.c */
+#line 671 "elftosb2/elftosb_parser.y"
{
IfStatementASTNode * ifStmt = new IfStatementASTNode();
- ifStmt->setConditionExpr(dynamic_cast<ExprASTNode*>((yyvsp[-4].m_ast)));
- ifStmt->setIfStatements(dynamic_cast<ListASTNode*>((yyvsp[-2].m_ast)));
- ifStmt->setElseStatements(dynamic_cast<ListASTNode*>((yyvsp[0].m_ast)));
- ifStmt->setLocation((yylsp[-5]), (yylsp[0]));
+ ifStmt->setConditionExpr(dynamic_cast<ExprASTNode*>((yyvsp[(2) - (6)].m_ast)));
+ ifStmt->setIfStatements(dynamic_cast<ListASTNode*>((yyvsp[(4) - (6)].m_ast)));
+ ifStmt->setElseStatements(dynamic_cast<ListASTNode*>((yyvsp[(6) - (6)].m_ast)));
+ ifStmt->setLocation((yylsp[(1) - (6)]), (yylsp[(6) - (6)]));
(yyval.m_ast) = ifStmt;
- ;}
+ }
break;
case 88:
-#line 678 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
+
+/* Line 1455 of yacc.c */
+#line 682 "elftosb2/elftosb_parser.y"
{
- (yyval.m_ast) = (yyvsp[-1].m_ast);
- ;}
+ (yyval.m_ast) = (yyvsp[(3) - (4)].m_ast);
+ }
break;
case 89:
-#line 682 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
+
+/* Line 1455 of yacc.c */
+#line 686 "elftosb2/elftosb_parser.y"
{
ListASTNode * list = new ListASTNode();
- list->appendNode((yyvsp[0].m_ast));
+ list->appendNode((yyvsp[(2) - (2)].m_ast));
(yyval.m_ast) = list;
- (yyval.m_ast)->setLocation((yylsp[-1]), (yylsp[0]));
- ;}
+ (yyval.m_ast)->setLocation((yylsp[(1) - (2)]), (yylsp[(2) - (2)]));
+ }
break;
case 90:
-#line 688 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
- { (yyval.m_ast) = NULL; ;}
+
+/* Line 1455 of yacc.c */
+#line 692 "elftosb2/elftosb_parser.y"
+ { (yyval.m_ast) = NULL; }
break;
case 91:
-#line 692 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
+
+/* Line 1455 of yacc.c */
+#line 696 "elftosb2/elftosb_parser.y"
{
- (yyval.m_ast) = new AddressRangeASTNode((yyvsp[0].m_ast), NULL);
- (yyval.m_ast)->setLocation((yyvsp[0].m_ast));
- ;}
+ (yyval.m_ast) = new AddressRangeASTNode((yyvsp[(1) - (1)].m_ast), NULL);
+ (yyval.m_ast)->setLocation((yyvsp[(1) - (1)].m_ast));
+ }
break;
case 92:
-#line 697 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
+
+/* Line 1455 of yacc.c */
+#line 701 "elftosb2/elftosb_parser.y"
{
- (yyval.m_ast) = new AddressRangeASTNode((yyvsp[-2].m_ast), (yyvsp[0].m_ast));
- (yyval.m_ast)->setLocation((yylsp[-2]), (yylsp[0]));
- ;}
+ (yyval.m_ast) = new AddressRangeASTNode((yyvsp[(1) - (3)].m_ast), (yyvsp[(3) - (3)].m_ast));
+ (yyval.m_ast)->setLocation((yylsp[(1) - (3)]), (yylsp[(3) - (3)]));
+ }
break;
case 93:
-#line 704 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
+
+/* Line 1455 of yacc.c */
+#line 708 "elftosb2/elftosb_parser.y"
{
- (yyval.m_ast) = (yyvsp[0].m_ast);
- ;}
+ (yyval.m_ast) = (yyvsp[(1) - (1)].m_ast);
+ }
break;
case 94:
-#line 708 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
+
+/* Line 1455 of yacc.c */
+#line 712 "elftosb2/elftosb_parser.y"
{
- (yyval.m_ast) = new StringConstASTNode((yyvsp[0].m_str));
- (yyval.m_ast)->setLocation((yylsp[0]));
- ;}
+ (yyval.m_ast) = new StringConstASTNode((yyvsp[(1) - (1)].m_str));
+ (yyval.m_ast)->setLocation((yylsp[(1) - (1)]));
+ }
break;
case 95:
-#line 715 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
+
+/* Line 1455 of yacc.c */
+#line 719 "elftosb2/elftosb_parser.y"
{
- (yyval.m_ast) = (yyvsp[0].m_ast);
- ;}
+ (yyval.m_ast) = (yyvsp[(1) - (1)].m_ast);
+ }
break;
case 96:
-#line 719 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
+
+/* Line 1455 of yacc.c */
+#line 723 "elftosb2/elftosb_parser.y"
{
- ExprASTNode * left = dynamic_cast<ExprASTNode*>((yyvsp[-2].m_ast));
- ExprASTNode * right = dynamic_cast<ExprASTNode*>((yyvsp[0].m_ast));
+ ExprASTNode * left = dynamic_cast<ExprASTNode*>((yyvsp[(1) - (3)].m_ast));
+ ExprASTNode * right = dynamic_cast<ExprASTNode*>((yyvsp[(3) - (3)].m_ast));
(yyval.m_ast) = new BinaryOpExprASTNode(left, BinaryOpExprASTNode::kLessThan, right);
- (yyval.m_ast)->setLocation((yylsp[-2]), (yylsp[0]));
- ;}
+ (yyval.m_ast)->setLocation((yylsp[(1) - (3)]), (yylsp[(3) - (3)]));
+ }
break;
case 97:
-#line 726 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
+
+/* Line 1455 of yacc.c */
+#line 730 "elftosb2/elftosb_parser.y"
{
- ExprASTNode * left = dynamic_cast<ExprASTNode*>((yyvsp[-2].m_ast));
- ExprASTNode * right = dynamic_cast<ExprASTNode*>((yyvsp[0].m_ast));
+ ExprASTNode * left = dynamic_cast<ExprASTNode*>((yyvsp[(1) - (3)].m_ast));
+ ExprASTNode * right = dynamic_cast<ExprASTNode*>((yyvsp[(3) - (3)].m_ast));
(yyval.m_ast) = new BinaryOpExprASTNode(left, BinaryOpExprASTNode::kGreaterThan, right);
- (yyval.m_ast)->setLocation((yylsp[-2]), (yylsp[0]));
- ;}
+ (yyval.m_ast)->setLocation((yylsp[(1) - (3)]), (yylsp[(3) - (3)]));
+ }
break;
case 98:
-#line 733 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
+
+/* Line 1455 of yacc.c */
+#line 737 "elftosb2/elftosb_parser.y"
{
- ExprASTNode * left = dynamic_cast<ExprASTNode*>((yyvsp[-2].m_ast));
- ExprASTNode * right = dynamic_cast<ExprASTNode*>((yyvsp[0].m_ast));
+ ExprASTNode * left = dynamic_cast<ExprASTNode*>((yyvsp[(1) - (3)].m_ast));
+ ExprASTNode * right = dynamic_cast<ExprASTNode*>((yyvsp[(3) - (3)].m_ast));
(yyval.m_ast) = new BinaryOpExprASTNode(left, BinaryOpExprASTNode::kGreaterThanEqual, right);
- (yyval.m_ast)->setLocation((yylsp[-2]), (yylsp[0]));
- ;}
+ (yyval.m_ast)->setLocation((yylsp[(1) - (3)]), (yylsp[(3) - (3)]));
+ }
break;
case 99:
-#line 740 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
+
+/* Line 1455 of yacc.c */
+#line 744 "elftosb2/elftosb_parser.y"
{
- ExprASTNode * left = dynamic_cast<ExprASTNode*>((yyvsp[-2].m_ast));
- ExprASTNode * right = dynamic_cast<ExprASTNode*>((yyvsp[0].m_ast));
+ ExprASTNode * left = dynamic_cast<ExprASTNode*>((yyvsp[(1) - (3)].m_ast));
+ ExprASTNode * right = dynamic_cast<ExprASTNode*>((yyvsp[(3) - (3)].m_ast));
(yyval.m_ast) = new BinaryOpExprASTNode(left, BinaryOpExprASTNode::kLessThanEqual, right);
- (yyval.m_ast)->setLocation((yylsp[-2]), (yylsp[0]));
- ;}
+ (yyval.m_ast)->setLocation((yylsp[(1) - (3)]), (yylsp[(3) - (3)]));
+ }
break;
case 100:
-#line 747 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
+
+/* Line 1455 of yacc.c */
+#line 751 "elftosb2/elftosb_parser.y"
{
- ExprASTNode * left = dynamic_cast<ExprASTNode*>((yyvsp[-2].m_ast));
- ExprASTNode * right = dynamic_cast<ExprASTNode*>((yyvsp[0].m_ast));
+ ExprASTNode * left = dynamic_cast<ExprASTNode*>((yyvsp[(1) - (3)].m_ast));
+ ExprASTNode * right = dynamic_cast<ExprASTNode*>((yyvsp[(3) - (3)].m_ast));
(yyval.m_ast) = new BinaryOpExprASTNode(left, BinaryOpExprASTNode::kEqual, right);
- (yyval.m_ast)->setLocation((yylsp[-2]), (yylsp[0]));
- ;}
+ (yyval.m_ast)->setLocation((yylsp[(1) - (3)]), (yylsp[(3) - (3)]));
+ }
break;
case 101:
-#line 754 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
+
+/* Line 1455 of yacc.c */
+#line 758 "elftosb2/elftosb_parser.y"
{
- ExprASTNode * left = dynamic_cast<ExprASTNode*>((yyvsp[-2].m_ast));
- ExprASTNode * right = dynamic_cast<ExprASTNode*>((yyvsp[0].m_ast));
+ ExprASTNode * left = dynamic_cast<ExprASTNode*>((yyvsp[(1) - (3)].m_ast));
+ ExprASTNode * right = dynamic_cast<ExprASTNode*>((yyvsp[(3) - (3)].m_ast));
(yyval.m_ast) = new BinaryOpExprASTNode(left, BinaryOpExprASTNode::kNotEqual, right);
- (yyval.m_ast)->setLocation((yylsp[-2]), (yylsp[0]));
- ;}
+ (yyval.m_ast)->setLocation((yylsp[(1) - (3)]), (yylsp[(3) - (3)]));
+ }
break;
case 102:
-#line 761 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
+
+/* Line 1455 of yacc.c */
+#line 765 "elftosb2/elftosb_parser.y"
{
- ExprASTNode * left = dynamic_cast<ExprASTNode*>((yyvsp[-2].m_ast));
- ExprASTNode * right = dynamic_cast<ExprASTNode*>((yyvsp[0].m_ast));
+ ExprASTNode * left = dynamic_cast<ExprASTNode*>((yyvsp[(1) - (3)].m_ast));
+ ExprASTNode * right = dynamic_cast<ExprASTNode*>((yyvsp[(3) - (3)].m_ast));
(yyval.m_ast) = new BinaryOpExprASTNode(left, BinaryOpExprASTNode::kBooleanAnd, right);
- (yyval.m_ast)->setLocation((yylsp[-2]), (yylsp[0]));
- ;}
+ (yyval.m_ast)->setLocation((yylsp[(1) - (3)]), (yylsp[(3) - (3)]));
+ }
break;
case 103:
-#line 768 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
+
+/* Line 1455 of yacc.c */
+#line 772 "elftosb2/elftosb_parser.y"
{
- ExprASTNode * left = dynamic_cast<ExprASTNode*>((yyvsp[-2].m_ast));
- ExprASTNode * right = dynamic_cast<ExprASTNode*>((yyvsp[0].m_ast));
+ ExprASTNode * left = dynamic_cast<ExprASTNode*>((yyvsp[(1) - (3)].m_ast));
+ ExprASTNode * right = dynamic_cast<ExprASTNode*>((yyvsp[(3) - (3)].m_ast));
(yyval.m_ast) = new BinaryOpExprASTNode(left, BinaryOpExprASTNode::kBooleanOr, right);
- (yyval.m_ast)->setLocation((yylsp[-2]), (yylsp[0]));
- ;}
+ (yyval.m_ast)->setLocation((yylsp[(1) - (3)]), (yylsp[(3) - (3)]));
+ }
break;
case 104:
-#line 775 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
+
+/* Line 1455 of yacc.c */
+#line 779 "elftosb2/elftosb_parser.y"
{
- (yyval.m_ast) = new BooleanNotExprASTNode(dynamic_cast<ExprASTNode*>((yyvsp[0].m_ast)));
- (yyval.m_ast)->setLocation((yylsp[-1]), (yylsp[0]));
- ;}
+ (yyval.m_ast) = new BooleanNotExprASTNode(dynamic_cast<ExprASTNode*>((yyvsp[(2) - (2)].m_ast)));
+ (yyval.m_ast)->setLocation((yylsp[(1) - (2)]), (yylsp[(2) - (2)]));
+ }
break;
case 105:
-#line 780 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
+
+/* Line 1455 of yacc.c */
+#line 784 "elftosb2/elftosb_parser.y"
{
- (yyval.m_ast) = new SourceFileFunctionASTNode((yyvsp[-3].m_str), (yyvsp[-1].m_str));
- (yyval.m_ast)->setLocation((yylsp[-3]), (yylsp[0]));
- ;}
+ (yyval.m_ast) = new SourceFileFunctionASTNode((yyvsp[(1) - (4)].m_str), (yyvsp[(3) - (4)].m_str));
+ (yyval.m_ast)->setLocation((yylsp[(1) - (4)]), (yylsp[(4) - (4)]));
+ }
break;
case 106:
-#line 785 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
+
+/* Line 1455 of yacc.c */
+#line 789 "elftosb2/elftosb_parser.y"
{
- (yyval.m_ast) = (yyvsp[-1].m_ast);
- (yyval.m_ast)->setLocation((yylsp[-2]), (yylsp[0]));
- ;}
+ (yyval.m_ast) = (yyvsp[(2) - (3)].m_ast);
+ (yyval.m_ast)->setLocation((yylsp[(1) - (3)]), (yylsp[(3) - (3)]));
+ }
break;
case 107:
-#line 790 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
+
+/* Line 1455 of yacc.c */
+#line 794 "elftosb2/elftosb_parser.y"
{
- (yyval.m_ast) = new DefinedOperatorASTNode((yyvsp[-1].m_str));
- (yyval.m_ast)->setLocation((yylsp[-3]), (yylsp[0]));
- ;}
+ (yyval.m_ast) = new DefinedOperatorASTNode((yyvsp[(3) - (4)].m_str));
+ (yyval.m_ast)->setLocation((yylsp[(1) - (4)]), (yylsp[(4) - (4)]));
+ }
break;
case 108:
-#line 796 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
- { (yyval.m_ast) = (yyvsp[0].m_ast); ;}
+
+/* Line 1455 of yacc.c */
+#line 800 "elftosb2/elftosb_parser.y"
+ { (yyval.m_ast) = (yyvsp[(1) - (1)].m_ast); }
break;
case 109:
-#line 800 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
+
+/* Line 1455 of yacc.c */
+#line 804 "elftosb2/elftosb_parser.y"
{
- (yyval.m_ast) = new SymbolASTNode((yyvsp[0].m_str), (yyvsp[-2].m_str));
- (yyval.m_ast)->setLocation((yylsp[-2]), (yylsp[0]));
- ;}
+ (yyval.m_ast) = new SymbolASTNode((yyvsp[(3) - (3)].m_str), (yyvsp[(1) - (3)].m_str));
+ (yyval.m_ast)->setLocation((yylsp[(1) - (3)]), (yylsp[(3) - (3)]));
+ }
break;
case 110:
-#line 805 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
+
+/* Line 1455 of yacc.c */
+#line 809 "elftosb2/elftosb_parser.y"
{
- (yyval.m_ast) = new SymbolASTNode((yyvsp[0].m_str));
- (yyval.m_ast)->setLocation((yylsp[-1]), (yylsp[0]));
- ;}
+ (yyval.m_ast) = new SymbolASTNode((yyvsp[(2) - (2)].m_str));
+ (yyval.m_ast)->setLocation((yylsp[(1) - (2)]), (yylsp[(2) - (2)]));
+ }
break;
case 111:
-#line 813 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
+
+/* Line 1455 of yacc.c */
+#line 817 "elftosb2/elftosb_parser.y"
{
- (yyval.m_ast) = (yyvsp[0].m_ast);
- ;}
+ (yyval.m_ast) = (yyvsp[(1) - (1)].m_ast);
+ }
break;
case 112:
-#line 817 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
+
+/* Line 1455 of yacc.c */
+#line 821 "elftosb2/elftosb_parser.y"
{
- (yyval.m_ast) = new VariableExprASTNode((yyvsp[0].m_str));
- (yyval.m_ast)->setLocation((yylsp[0]));
- ;}
+ (yyval.m_ast) = new VariableExprASTNode((yyvsp[(1) - (1)].m_str));
+ (yyval.m_ast)->setLocation((yylsp[(1) - (1)]));
+ }
break;
case 113:
-#line 822 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
+
+/* Line 1455 of yacc.c */
+#line 826 "elftosb2/elftosb_parser.y"
{
- (yyval.m_ast) = new SymbolRefExprASTNode(dynamic_cast<SymbolASTNode*>((yyvsp[0].m_ast)));
- (yyval.m_ast)->setLocation((yylsp[0]));
- ;}
+ (yyval.m_ast) = new SymbolRefExprASTNode(dynamic_cast<SymbolASTNode*>((yyvsp[(1) - (1)].m_ast)));
+ (yyval.m_ast)->setLocation((yylsp[(1) - (1)]));
+ }
break;
case 114:
-#line 833 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
+
+/* Line 1455 of yacc.c */
+#line 837 "elftosb2/elftosb_parser.y"
{
- ExprASTNode * left = dynamic_cast<ExprASTNode*>((yyvsp[-2].m_ast));
- ExprASTNode * right = dynamic_cast<ExprASTNode*>((yyvsp[0].m_ast));
+ ExprASTNode * left = dynamic_cast<ExprASTNode*>((yyvsp[(1) - (3)].m_ast));
+ ExprASTNode * right = dynamic_cast<ExprASTNode*>((yyvsp[(3) - (3)].m_ast));
(yyval.m_ast) = new BinaryOpExprASTNode(left, BinaryOpExprASTNode::kAdd, right);
- (yyval.m_ast)->setLocation((yylsp[-2]), (yylsp[0]));
- ;}
+ (yyval.m_ast)->setLocation((yylsp[(1) - (3)]), (yylsp[(3) - (3)]));
+ }
break;
case 115:
-#line 840 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
+
+/* Line 1455 of yacc.c */
+#line 844 "elftosb2/elftosb_parser.y"
{
- ExprASTNode * left = dynamic_cast<ExprASTNode*>((yyvsp[-2].m_ast));
- ExprASTNode * right = dynamic_cast<ExprASTNode*>((yyvsp[0].m_ast));
+ ExprASTNode * left = dynamic_cast<ExprASTNode*>((yyvsp[(1) - (3)].m_ast));
+ ExprASTNode * right = dynamic_cast<ExprASTNode*>((yyvsp[(3) - (3)].m_ast));
(yyval.m_ast) = new BinaryOpExprASTNode(left, BinaryOpExprASTNode::kSubtract, right);
- (yyval.m_ast)->setLocation((yylsp[-2]), (yylsp[0]));
- ;}
+ (yyval.m_ast)->setLocation((yylsp[(1) - (3)]), (yylsp[(3) - (3)]));
+ }
break;
case 116:
-#line 847 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
+
+/* Line 1455 of yacc.c */
+#line 851 "elftosb2/elftosb_parser.y"
{
- ExprASTNode * left = dynamic_cast<ExprASTNode*>((yyvsp[-2].m_ast));
- ExprASTNode * right = dynamic_cast<ExprASTNode*>((yyvsp[0].m_ast));
+ ExprASTNode * left = dynamic_cast<ExprASTNode*>((yyvsp[(1) - (3)].m_ast));
+ ExprASTNode * right = dynamic_cast<ExprASTNode*>((yyvsp[(3) - (3)].m_ast));
(yyval.m_ast) = new BinaryOpExprASTNode(left, BinaryOpExprASTNode::kMultiply, right);
- (yyval.m_ast)->setLocation((yylsp[-2]), (yylsp[0]));
- ;}
+ (yyval.m_ast)->setLocation((yylsp[(1) - (3)]), (yylsp[(3) - (3)]));
+ }
break;
case 117:
-#line 854 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
+
+/* Line 1455 of yacc.c */
+#line 858 "elftosb2/elftosb_parser.y"
{
- ExprASTNode * left = dynamic_cast<ExprASTNode*>((yyvsp[-2].m_ast));
- ExprASTNode * right = dynamic_cast<ExprASTNode*>((yyvsp[0].m_ast));
+ ExprASTNode * left = dynamic_cast<ExprASTNode*>((yyvsp[(1) - (3)].m_ast));
+ ExprASTNode * right = dynamic_cast<ExprASTNode*>((yyvsp[(3) - (3)].m_ast));
(yyval.m_ast) = new BinaryOpExprASTNode(left, BinaryOpExprASTNode::kDivide, right);
- (yyval.m_ast)->setLocation((yylsp[-2]), (yylsp[0]));
- ;}
+ (yyval.m_ast)->setLocation((yylsp[(1) - (3)]), (yylsp[(3) - (3)]));
+ }
break;
case 118:
-#line 861 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
+
+/* Line 1455 of yacc.c */
+#line 865 "elftosb2/elftosb_parser.y"
{
- ExprASTNode * left = dynamic_cast<ExprASTNode*>((yyvsp[-2].m_ast));
- ExprASTNode * right = dynamic_cast<ExprASTNode*>((yyvsp[0].m_ast));
+ ExprASTNode * left = dynamic_cast<ExprASTNode*>((yyvsp[(1) - (3)].m_ast));
+ ExprASTNode * right = dynamic_cast<ExprASTNode*>((yyvsp[(3) - (3)].m_ast));
(yyval.m_ast) = new BinaryOpExprASTNode(left, BinaryOpExprASTNode::kModulus, right);
- (yyval.m_ast)->setLocation((yylsp[-2]), (yylsp[0]));
- ;}
+ (yyval.m_ast)->setLocation((yylsp[(1) - (3)]), (yylsp[(3) - (3)]));
+ }
break;
case 119:
-#line 868 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
+
+/* Line 1455 of yacc.c */
+#line 872 "elftosb2/elftosb_parser.y"
{
- ExprASTNode * left = dynamic_cast<ExprASTNode*>((yyvsp[-2].m_ast));
- ExprASTNode * right = dynamic_cast<ExprASTNode*>((yyvsp[0].m_ast));
+ ExprASTNode * left = dynamic_cast<ExprASTNode*>((yyvsp[(1) - (3)].m_ast));
+ ExprASTNode * right = dynamic_cast<ExprASTNode*>((yyvsp[(3) - (3)].m_ast));
(yyval.m_ast) = new BinaryOpExprASTNode(left, BinaryOpExprASTNode::kPower, right);
- (yyval.m_ast)->setLocation((yylsp[-2]), (yylsp[0]));
- ;}
+ (yyval.m_ast)->setLocation((yylsp[(1) - (3)]), (yylsp[(3) - (3)]));
+ }
break;
case 120:
-#line 875 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
+
+/* Line 1455 of yacc.c */
+#line 879 "elftosb2/elftosb_parser.y"
{
- ExprASTNode * left = dynamic_cast<ExprASTNode*>((yyvsp[-2].m_ast));
- ExprASTNode * right = dynamic_cast<ExprASTNode*>((yyvsp[0].m_ast));
+ ExprASTNode * left = dynamic_cast<ExprASTNode*>((yyvsp[(1) - (3)].m_ast));
+ ExprASTNode * right = dynamic_cast<ExprASTNode*>((yyvsp[(3) - (3)].m_ast));
(yyval.m_ast) = new BinaryOpExprASTNode(left, BinaryOpExprASTNode::kBitwiseAnd, right);
- (yyval.m_ast)->setLocation((yylsp[-2]), (yylsp[0]));
- ;}
+ (yyval.m_ast)->setLocation((yylsp[(1) - (3)]), (yylsp[(3) - (3)]));
+ }
break;
case 121:
-#line 882 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
+
+/* Line 1455 of yacc.c */
+#line 886 "elftosb2/elftosb_parser.y"
{
- ExprASTNode * left = dynamic_cast<ExprASTNode*>((yyvsp[-2].m_ast));
- ExprASTNode * right = dynamic_cast<ExprASTNode*>((yyvsp[0].m_ast));
+ ExprASTNode * left = dynamic_cast<ExprASTNode*>((yyvsp[(1) - (3)].m_ast));
+ ExprASTNode * right = dynamic_cast<ExprASTNode*>((yyvsp[(3) - (3)].m_ast));
(yyval.m_ast) = new BinaryOpExprASTNode(left, BinaryOpExprASTNode::kBitwiseOr, right);
- (yyval.m_ast)->setLocation((yylsp[-2]), (yylsp[0]));
- ;}
+ (yyval.m_ast)->setLocation((yylsp[(1) - (3)]), (yylsp[(3) - (3)]));
+ }
break;
case 122:
-#line 889 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
+
+/* Line 1455 of yacc.c */
+#line 893 "elftosb2/elftosb_parser.y"
{
- ExprASTNode * left = dynamic_cast<ExprASTNode*>((yyvsp[-2].m_ast));
- ExprASTNode * right = dynamic_cast<ExprASTNode*>((yyvsp[0].m_ast));
+ ExprASTNode * left = dynamic_cast<ExprASTNode*>((yyvsp[(1) - (3)].m_ast));
+ ExprASTNode * right = dynamic_cast<ExprASTNode*>((yyvsp[(3) - (3)].m_ast));
(yyval.m_ast) = new BinaryOpExprASTNode(left, BinaryOpExprASTNode::kBitwiseXor, right);
- (yyval.m_ast)->setLocation((yylsp[-2]), (yylsp[0]));
- ;}
+ (yyval.m_ast)->setLocation((yylsp[(1) - (3)]), (yylsp[(3) - (3)]));
+ }
break;
case 123:
-#line 896 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
+
+/* Line 1455 of yacc.c */
+#line 900 "elftosb2/elftosb_parser.y"
{
- ExprASTNode * left = dynamic_cast<ExprASTNode*>((yyvsp[-2].m_ast));
- ExprASTNode * right = dynamic_cast<ExprASTNode*>((yyvsp[0].m_ast));
+ ExprASTNode * left = dynamic_cast<ExprASTNode*>((yyvsp[(1) - (3)].m_ast));
+ ExprASTNode * right = dynamic_cast<ExprASTNode*>((yyvsp[(3) - (3)].m_ast));
(yyval.m_ast) = new BinaryOpExprASTNode(left, BinaryOpExprASTNode::kShiftLeft, right);
- (yyval.m_ast)->setLocation((yylsp[-2]), (yylsp[0]));
- ;}
+ (yyval.m_ast)->setLocation((yylsp[(1) - (3)]), (yylsp[(3) - (3)]));
+ }
break;
case 124:
-#line 903 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
+
+/* Line 1455 of yacc.c */
+#line 907 "elftosb2/elftosb_parser.y"
{
- ExprASTNode * left = dynamic_cast<ExprASTNode*>((yyvsp[-2].m_ast));
- ExprASTNode * right = dynamic_cast<ExprASTNode*>((yyvsp[0].m_ast));
+ ExprASTNode * left = dynamic_cast<ExprASTNode*>((yyvsp[(1) - (3)].m_ast));
+ ExprASTNode * right = dynamic_cast<ExprASTNode*>((yyvsp[(3) - (3)].m_ast));
(yyval.m_ast) = new BinaryOpExprASTNode(left, BinaryOpExprASTNode::kShiftRight, right);
- (yyval.m_ast)->setLocation((yylsp[-2]), (yylsp[0]));
- ;}
+ (yyval.m_ast)->setLocation((yylsp[(1) - (3)]), (yylsp[(3) - (3)]));
+ }
break;
case 125:
-#line 910 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
+
+/* Line 1455 of yacc.c */
+#line 914 "elftosb2/elftosb_parser.y"
{
- (yyval.m_ast) = (yyvsp[0].m_ast);
- ;}
+ (yyval.m_ast) = (yyvsp[(1) - (1)].m_ast);
+ }
break;
case 126:
-#line 914 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
+
+/* Line 1455 of yacc.c */
+#line 918 "elftosb2/elftosb_parser.y"
{
- (yyval.m_ast) = new IntSizeExprASTNode(dynamic_cast<ExprASTNode*>((yyvsp[-2].m_ast)), (yyvsp[0].m_int)->getWordSize());
- (yyval.m_ast)->setLocation((yylsp[-2]), (yylsp[0]));
- ;}
+ (yyval.m_ast) = new IntSizeExprASTNode(dynamic_cast<ExprASTNode*>((yyvsp[(1) - (3)].m_ast)), (yyvsp[(3) - (3)].m_int)->getWordSize());
+ (yyval.m_ast)->setLocation((yylsp[(1) - (3)]), (yylsp[(3) - (3)]));
+ }
break;
case 127:
-#line 919 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
+
+/* Line 1455 of yacc.c */
+#line 923 "elftosb2/elftosb_parser.y"
{
- (yyval.m_ast) = (yyvsp[-1].m_ast);
- (yyval.m_ast)->setLocation((yylsp[-2]), (yylsp[0]));
- ;}
+ (yyval.m_ast) = (yyvsp[(2) - (3)].m_ast);
+ (yyval.m_ast)->setLocation((yylsp[(1) - (3)]), (yylsp[(3) - (3)]));
+ }
break;
case 128:
-#line 924 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
+
+/* Line 1455 of yacc.c */
+#line 928 "elftosb2/elftosb_parser.y"
{
- (yyval.m_ast) = new SizeofOperatorASTNode(dynamic_cast<SymbolASTNode*>((yyvsp[-1].m_ast)));
- (yyval.m_ast)->setLocation((yylsp[-3]), (yylsp[0]));
- ;}
+ (yyval.m_ast) = new SizeofOperatorASTNode(dynamic_cast<SymbolASTNode*>((yyvsp[(3) - (4)].m_ast)));
+ (yyval.m_ast)->setLocation((yylsp[(1) - (4)]), (yylsp[(4) - (4)]));
+ }
break;
case 129:
-#line 929 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
+
+/* Line 1455 of yacc.c */
+#line 933 "elftosb2/elftosb_parser.y"
{
- (yyval.m_ast) = new SizeofOperatorASTNode((yyvsp[-1].m_str));
- (yyval.m_ast)->setLocation((yylsp[-3]), (yylsp[0]));
- ;}
+ (yyval.m_ast) = new SizeofOperatorASTNode((yyvsp[(3) - (4)].m_str));
+ (yyval.m_ast)->setLocation((yylsp[(1) - (4)]), (yylsp[(4) - (4)]));
+ }
break;
case 130:
-#line 934 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
+
+/* Line 1455 of yacc.c */
+#line 938 "elftosb2/elftosb_parser.y"
{
- (yyval.m_ast) = new SizeofOperatorASTNode((yyvsp[-1].m_str));
- (yyval.m_ast)->setLocation((yylsp[-3]), (yylsp[0]));
- ;}
+ (yyval.m_ast) = new SizeofOperatorASTNode((yyvsp[(3) - (4)].m_str));
+ (yyval.m_ast)->setLocation((yylsp[(1) - (4)]), (yylsp[(4) - (4)]));
+ }
break;
case 131:
-#line 941 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
+
+/* Line 1455 of yacc.c */
+#line 945 "elftosb2/elftosb_parser.y"
{
- (yyval.m_ast) = (yyvsp[0].m_ast);
- ;}
+ (yyval.m_ast) = (yyvsp[(2) - (2)].m_ast);
+ }
break;
case 132:
-#line 945 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
+
+/* Line 1455 of yacc.c */
+#line 949 "elftosb2/elftosb_parser.y"
{
- (yyval.m_ast) = new NegativeExprASTNode(dynamic_cast<ExprASTNode*>((yyvsp[0].m_ast)));
- (yyval.m_ast)->setLocation((yylsp[-1]), (yylsp[0]));
- ;}
+ (yyval.m_ast) = new NegativeExprASTNode(dynamic_cast<ExprASTNode*>((yyvsp[(2) - (2)].m_ast)));
+ (yyval.m_ast)->setLocation((yylsp[(1) - (2)]), (yylsp[(2) - (2)]));
+ }
break;
case 133:
-#line 952 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
+
+/* Line 1455 of yacc.c */
+#line 956 "elftosb2/elftosb_parser.y"
{
- (yyval.m_ast) = new IntConstExprASTNode((yyvsp[0].m_int)->getValue(), (yyvsp[0].m_int)->getWordSize());
- (yyval.m_ast)->setLocation((yylsp[0]));
- ;}
+ (yyval.m_ast) = new IntConstExprASTNode((yyvsp[(1) - (1)].m_int)->getValue(), (yyvsp[(1) - (1)].m_int)->getWordSize());
+ (yyval.m_ast)->setLocation((yylsp[(1) - (1)]));
+ }
break;
+
+/* Line 1455 of yacc.c */
+#line 3213 "elftosb2/elftosb_parser.tab.cpp"
default: break;
}
+ YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
-/* Line 1126 of yacc.c. */
-#line 2663 "/Users/creed/projects/fsl/fromsvr/elftosb/build/elftosb.build/Debug/elftosb.build/DerivedSources/elftosb_parser.tab.cpp"
-
- yyvsp -= yylen;
- yyssp -= yylen;
- yylsp -= yylen;
-
+ YYPOPSTACK (yylen);
+ yylen = 0;
YY_STACK_PRINT (yyss, yyssp);
*++yyvsp = yyval;
@@ -2693,133 +3244,65 @@ yyerrlab:
if (!yyerrstatus)
{
++yynerrs;
-#if YYERROR_VERBOSE
- yyn = yypact[yystate];
-
- if (YYPACT_NINF < yyn && yyn < YYLAST)
- {
- int yytype = YYTRANSLATE (yychar);
- YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
- YYSIZE_T yysize = yysize0;
- YYSIZE_T yysize1;
- int yysize_overflow = 0;
- char *yymsg = 0;
-# define YYERROR_VERBOSE_ARGS_MAXIMUM 5
- char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
- int yyx;
-
-#if 0
- /* This is so xgettext sees the translatable formats that are
- constructed on the fly. */
- YY_("syntax error, unexpected %s");
- YY_("syntax error, unexpected %s, expecting %s");
- YY_("syntax error, unexpected %s, expecting %s or %s");
- YY_("syntax error, unexpected %s, expecting %s or %s or %s");
- YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
-#endif
- char *yyfmt;
- char const *yyf;
- static char const yyunexpected[] = "syntax error, unexpected %s";
- static char const yyexpecting[] = ", expecting %s";
- static char const yyor[] = " or %s";
- char yyformat[sizeof yyunexpected
- + sizeof yyexpecting - 1
- + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
- * (sizeof yyor - 1))];
- char const *yyprefix = yyexpecting;
-
- /* Start YYX at -YYN if negative to avoid negative indexes in
- YYCHECK. */
- int yyxbegin = yyn < 0 ? -yyn : 0;
-
- /* Stay within bounds of both yycheck and yytname. */
- int yychecklim = YYLAST - yyn;
- int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
- int yycount = 1;
-
- yyarg[0] = yytname[yytype];
- yyfmt = yystpcpy (yyformat, yyunexpected);
-
- for (yyx = yyxbegin; yyx < yyxend; ++yyx)
- if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
+#if ! YYERROR_VERBOSE
+ yyerror (&yylloc, lexer, resultAST, YY_("syntax error"));
+#else
+ {
+ YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
+ if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
+ {
+ YYSIZE_T yyalloc = 2 * yysize;
+ if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
+ yyalloc = YYSTACK_ALLOC_MAXIMUM;
+ if (yymsg != yymsgbuf)
+ YYSTACK_FREE (yymsg);
+ yymsg = (char *) YYSTACK_ALLOC (yyalloc);
+ if (yymsg)
+ yymsg_alloc = yyalloc;
+ else
{
- if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
- {
- yycount = 1;
- yysize = yysize0;
- yyformat[sizeof yyunexpected - 1] = '\0';
- break;
- }
- yyarg[yycount++] = yytname[yyx];
- yysize1 = yysize + yytnamerr (0, yytname[yyx]);
- yysize_overflow |= yysize1 < yysize;
- yysize = yysize1;
- yyfmt = yystpcpy (yyfmt, yyprefix);
- yyprefix = yyor;
+ yymsg = yymsgbuf;
+ yymsg_alloc = sizeof yymsgbuf;
}
+ }
- yyf = YY_(yyformat);
- yysize1 = yysize + yystrlen (yyf);
- yysize_overflow |= yysize1 < yysize;
- yysize = yysize1;
-
- if (!yysize_overflow && yysize <= YYSTACK_ALLOC_MAXIMUM)
- yymsg = (char *) YYSTACK_ALLOC (yysize);
- if (yymsg)
- {
- /* Avoid sprintf, as that infringes on the user's name space.
- Don't have undefined behavior even if the translation
- produced a string with the wrong number of "%s"s. */
- char *yyp = yymsg;
- int yyi = 0;
- while ((*yyp = *yyf))
- {
- if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
- {
- yyp += yytnamerr (yyp, yyarg[yyi++]);
- yyf += 2;
- }
- else
- {
- yyp++;
- yyf++;
- }
- }
- yyerror (&yylloc, lexer, resultAST, yymsg);
- YYSTACK_FREE (yymsg);
- }
- else
- {
- yyerror (&yylloc, lexer, resultAST, YY_("syntax error"));
+ if (0 < yysize && yysize <= yymsg_alloc)
+ {
+ (void) yysyntax_error (yymsg, yystate, yychar);
+ yyerror (&yylloc, lexer, resultAST, yymsg);
+ }
+ else
+ {
+ yyerror (&yylloc, lexer, resultAST, YY_("syntax error"));
+ if (yysize != 0)
goto yyexhaustedlab;
- }
- }
- else
-#endif /* YYERROR_VERBOSE */
- yyerror (&yylloc, lexer, resultAST, YY_("syntax error"));
+ }
+ }
+#endif
}
yyerror_range[0] = yylloc;
if (yyerrstatus == 3)
{
- /* If just tried and failed to reuse look-ahead token after an
+ /* If just tried and failed to reuse lookahead token after an
error, discard it. */
if (yychar <= YYEOF)
- {
+ {
/* Return failure if at end of input. */
if (yychar == YYEOF)
YYABORT;
- }
+ }
else
{
- yydestruct ("Error: discarding", yytoken, &yylval, &yylloc);
+ yydestruct ("Error: discarding",
+ yytoken, &yylval, &yylloc, lexer, resultAST);
yychar = YYEMPTY;
}
}
- /* Else will try to reuse look-ahead token after shifting the error
+ /* Else will try to reuse lookahead token after shifting the error
token. */
goto yyerrlab1;
@@ -2832,13 +3315,15 @@ yyerrorlab:
/* Pacify compilers like GCC when the user code never invokes
YYERROR and the label yyerrorlab therefore never appears in user
code. */
- if (0)
+ if (/*CONSTCOND*/ 0)
goto yyerrorlab;
yyerror_range[0] = yylsp[1-yylen];
- yylsp -= yylen;
- yyvsp -= yylen;
- yyssp -= yylen;
+ /* Do not reclaim the symbols of the rule which action triggered
+ this YYERROR. */
+ YYPOPSTACK (yylen);
+ yylen = 0;
+ YY_STACK_PRINT (yyss, yyssp);
yystate = *yyssp;
goto yyerrlab1;
@@ -2868,24 +3353,22 @@ yyerrlab1:
YYABORT;
yyerror_range[0] = *yylsp;
- yydestruct ("Error: popping", yystos[yystate], yyvsp, yylsp);
- YYPOPSTACK;
+ yydestruct ("Error: popping",
+ yystos[yystate], yyvsp, yylsp, lexer, resultAST);
+ YYPOPSTACK (1);
yystate = *yyssp;
YY_STACK_PRINT (yyss, yyssp);
}
- if (yyn == YYFINAL)
- YYACCEPT;
-
*++yyvsp = yylval;
yyerror_range[1] = yylloc;
/* Using YYLLOC is tempting, but would change the location of
- the look-ahead. YYLOC is available though. */
- YYLLOC_DEFAULT (yyloc, yyerror_range - 1, 2);
+ the lookahead. YYLOC is available though. */
+ YYLLOC_DEFAULT (yyloc, (yyerror_range - 1), 2);
*++yylsp = yyloc;
- /* Shift the error token. */
+ /* Shift the error token. */
YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
yystate = yyn;
@@ -2906,7 +3389,7 @@ yyabortlab:
yyresult = 1;
goto yyreturn;
-#ifndef yyoverflow
+#if !defined(yyoverflow) || YYERROR_VERBOSE
/*-------------------------------------------------.
| yyexhaustedlab -- memory exhaustion comes here. |
`-------------------------------------------------*/
@@ -2917,24 +3400,35 @@ yyexhaustedlab:
#endif
yyreturn:
- if (yychar != YYEOF && yychar != YYEMPTY)
+ if (yychar != YYEMPTY)
yydestruct ("Cleanup: discarding lookahead",
- yytoken, &yylval, &yylloc);
+ yytoken, &yylval, &yylloc, lexer, resultAST);
+ /* Do not reclaim the symbols of the rule which action triggered
+ this YYABORT or YYACCEPT. */
+ YYPOPSTACK (yylen);
+ YY_STACK_PRINT (yyss, yyssp);
while (yyssp != yyss)
{
yydestruct ("Cleanup: popping",
- yystos[*yyssp], yyvsp, yylsp);
- YYPOPSTACK;
+ yystos[*yyssp], yyvsp, yylsp, lexer, resultAST);
+ YYPOPSTACK (1);
}
#ifndef yyoverflow
if (yyss != yyssa)
YYSTACK_FREE (yyss);
#endif
- return yyresult;
+#if YYERROR_VERBOSE
+ if (yymsg != yymsgbuf)
+ YYSTACK_FREE (yymsg);
+#endif
+ /* Make sure YYID is used. */
+ return YYID (yyresult);
}
-#line 958 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
+
+/* Line 1675 of yacc.c */
+#line 962 "elftosb2/elftosb_parser.y"
/* code goes here */
@@ -2947,7 +3441,7 @@ static int yylex(YYSTYPE * lvalp, YYLTYPE * yylloc, ElftosbLexer * lexer)
return token;
}
-static void yyerror(YYLTYPE * yylloc, ElftosbLexer * lexer, CommandFileASTNode ** resultAST, const char * error)
+static void yyerror(YYLTYPE * yylloc, ElftosbLexer * /*lexer*/, CommandFileASTNode ** /*resultAST*/, const char * error)
{
throw syntax_error(format_string("line %d: %s\n", yylloc->m_firstLine, error));
}
diff --git a/elftosb2/elftosb_parser.tab.hpp b/elftosb2/elftosb_parser.tab.hpp
index 4ee45c4..b43274d 100644
--- a/elftosb2/elftosb_parser.tab.hpp
+++ b/elftosb2/elftosb_parser.tab.hpp
@@ -1,27 +1,37 @@
-/* A Bison parser, made by GNU Bison 2.1. */
-/* Skeleton parser for Yacc-like parsing with Bison,
- Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+/* A Bison parser, made by GNU Bison 2.4.1. */
- This program is free software; you can redistribute it and/or modify
+/* Skeleton interface for Bison's Yacc-like parsers in C
+
+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+ Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301, USA. */
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* As a special exception, you may create a larger work that contains
+ part or all of the Bison parser skeleton and distribute that work
+ under terms of your choice, so long as that work isn't itself a
+ parser generator using the skeleton or a modified version thereof
+ as a parser skeleton. Alternatively, if you modify or redistribute
+ the parser skeleton itself, you may (at your option) remove this
+ special exception, which will cause the skeleton and the resulting
+ Bison output files to be licensed under the GNU General Public
+ License without this special exception.
+
+ This special exception was added by the Free Software Foundation in
+ version 2.2 of Bison. */
-/* As a special exception, when this file is copied by Bison into a
- Bison output file, you may use that output file without restriction.
- This special exception was added by the Free Software Foundation
- in version 1.24 of Bison. */
/* Tokens. */
#ifndef YYTOKENTYPE
@@ -116,25 +126,32 @@
-#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
-#line 58 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_parser.y"
-typedef union YYSTYPE {
+#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
+typedef union YYSTYPE
+{
+
+/* Line 1676 of yacc.c */
+#line 62 "elftosb2/elftosb_parser.y"
+
int m_num;
elftosb::SizedIntegerValue * m_int;
Blob * m_blob;
std::string * m_str;
elftosb::ASTNode * m_ast; // must use full name here because this is put into *.tab.hpp
+
+
+
+/* Line 1676 of yacc.c */
+#line 146 "elftosb2/elftosb_parser.tab.hpp"
} YYSTYPE;
-/* Line 1447 of yacc.c. */
-#line 130 "/Users/creed/projects/fsl/fromsvr/elftosb/build/elftosb.build/Debug/elftosb.build/DerivedSources/elftosb_parser.tab.hpp"
+# define YYSTYPE_IS_TRIVIAL 1
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
-# define YYSTYPE_IS_TRIVIAL 1
#endif
-#if ! defined (YYLTYPE) && ! defined (YYLTYPE_IS_DECLARED)
+#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
typedef struct YYLTYPE
{
int first_line;
@@ -149,4 +166,3 @@ typedef struct YYLTYPE
-