/* Skeleton parser for Yacc-like parsing with Bison,
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005 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.
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. */
/* All symbols defined below should begin with yy or YY, to avoid
infringing on user name space. This should be done even for local
variables, as they might otherwise be expanded by user macros.
There are some unavoidable exceptions within include files to
define necessary library symbols; they are noted "INFRINGES ON
USER NAME SPACE" below. */
//! 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
#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
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
} YYSTYPE;
/* Line 196 of yacc.c. */
# 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)
typedef struct YYLTYPE
{
int first_line;
int first_column;
int last_line;
int last_column;
} YYLTYPE;
# define yyltype YYLTYPE /* obsolescent; will be withdrawn */
# define YYLTYPE_IS_DECLARED 1
# define YYLTYPE_IS_TRIVIAL 1
#endif
/* Copy the second part of user declarations. */
/* Line 219 of yacc.c. */
#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
# define YYSIZE_T __SIZE_TYPE__
#endif
#if ! defined (YYSIZE_T) && defined (size_t)
# define YYSIZE_T size_t
#endif
#if ! defined (YYSIZE_T) && (defined (__STDC__) || defined (__cplusplus))
# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
# define YYSIZE_T size_t
#endif
#if ! defined (YYSIZE_T)
# define YYSIZE_T unsigned int
#endif
#ifndef YY_
# if YYENABLE_NLS
# if ENABLE_NLS
# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
# define YY_(msgid) dgettext ("bison-runtime", msgid)
# endif
# endif
# ifndef YY_
# define YY_(msgid) msgid
# endif
#endif
#if ! defined (yyoverflow) || YYERROR_VERBOSE
/* The parser invokes alloca or malloc; define the necessary symbols. */
# ifdef YYSTACK_USE_ALLOCA
# if YYSTACK_USE_ALLOCA
# ifdef __GNUC__
# define YYSTACK_ALLOC __builtin_alloca
# else
# define YYSTACK_ALLOC alloca
# if defined (__STDC__) || defined (__cplusplus)
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
# define YYINCLUDED_STDLIB_H
# endif
# endif
# endif
# endif
# ifdef YYSTACK_ALLOC
/* Pacify GCC's `empty if-body' warning. */
# define YYSTACK_FREE(Ptr) do { /* empty */; } while (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 */
# endif
# else
# define YYSTACK_ALLOC YYMALLOC
# define YYSTACK_FREE YYFREE
# ifndef YYSTACK_ALLOC_MAXIMUM
# define YYSTACK_ALLOC_MAXIMUM ((YYSIZE_T) -1)
# endif
# ifdef __cplusplus
extern "C" {
# endif
# ifndef YYMALLOC
# define YYMALLOC malloc
# if (! defined (malloc) && ! defined (YYINCLUDED_STDLIB_H) \
&& (defined (__STDC__) || defined (__cplusplus)))
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)))
void free (void *); /* INFRINGES ON USER NAME SPACE */
# endif
# endif
# ifdef __cplusplus
}
# endif
# endif
#endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */
#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;
};
/* The size of the maximum gap between one aligned stack and the next. */
# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
/* 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)) \
+ 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__
# define YYCOPY(To, From, Count) \
__builtin_memcpy (To, From, (Count) * sizeof (*(From)))
# else
# define YYCOPY(To, From, Count) \
do \
{ \
YYSIZE_T yyi; \
for (yyi = 0; yyi < (Count); yyi++) \
(To)[yyi] = (From)[yyi]; \
} \
while (0)
# endif
# endif
/* Relocate STACK from its old location to the new one. The
local variables YYSIZE and YYSTACKSIZE give the old and new number of
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) \
do \
{ \
YYSIZE_T yynewbytes; \
YYCOPY (&yyptr->Stack, Stack, yysize); \
Stack = &yyptr->Stack; \
yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
yyptr += yynewbytes / sizeof (*yyptr); \
} \
while (0)
#endif
#if defined (__STDC__) || defined (__cplusplus)
typedef signed char yysigned_char;
#else
typedef short int yysigned_char;
#endif
/* YYFINAL -- State number of the termination state. */
#define YYFINAL 13
/* YYLAST -- Last index in YYTABLE. */
#define YYLAST 418
/* YYNTOKENS -- Number of terminals. */
#define YYNTOKENS 66
/* YYNNTS -- Number of nonterminals. */
#define YYNNTS 52
/* YYNRULES -- Number of rules. */
#define YYNRULES 133
/* YYNRULES -- Number of states. */
#define YYNSTATES 238
/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
#define YYUNDEFTOK 2
#define YYMAXUTOK 297
/* Like YYERROR except do call yyerror. This remains here temporarily
to ease the transition to the new meaning of YYERROR, for GCC.
Once GCC version 2 has supplanted version 1, this can go. */
/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
If N is 0, then set CURRENT to the empty location which ends
the previous symbol: RHS[0] (always defined). */
/* YY_LOCATION_PRINT -- Print the location on the stream.
This macro was not mandated originally: define only if we know
we won't break user code: when these are the locations we know. */
/*------------------------------------------------------------------.
| yy_stack_print -- Print the state stack from its BOTTOM up to its |
| TOP (included). |
`------------------------------------------------------------------*/
#if defined (__STDC__) || defined (__cplusplus)
static void
yy_stack_print (short int *bottom, short int *top)
#else
static void
yy_stack_print (bottom, top)
short int *bottom;
short int *top;
#endif
{
YYFPRINTF (stderr, "Stack now");
for (/* Nothing. */; bottom <= top; ++bottom)
YYFPRINTF (stderr, " %d", *bottom);
YYFPRINTF (stderr, "\n");
}
# define YY_STACK_PRINT(Bottom, Top) \
do { \
if (yydebug) \
yy_stack_print ((Bottom), (Top)); \
} while (0)
/*------------------------------------------------.
| Report that the YYRULE is going to be reduced. |
`------------------------------------------------*/
#if defined (__STDC__) || defined (__cplusplus)
static void
yy_reduce_print (int yyrule)
#else
static void
yy_reduce_print (yyrule)
int yyrule;
#endif
{
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]]);
}
# define YY_REDUCE_PRINT(Rule) \
do { \
if (yydebug) \
yy_reduce_print (Rule); \
} while (0)
/* Nonzero means print parse trace. It is left uninitialized so that
multiple parsers can coexist. */
int yydebug;
#else /* !YYDEBUG */
# define YYDPRINTF(Args)
# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
# define YY_STACK_PRINT(Bottom, Top)
# define YY_REDUCE_PRINT(Rule)
#endif /* !YYDEBUG */
/* YYINITDEPTH -- initial size of the parser's stacks. */
#ifndef YYINITDEPTH
# define YYINITDEPTH 200
#endif
/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
if the built-in stack extension method is used).
Do not make this value too large; the results are undefined if
YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
evaluated with infinite-precision integer arithmetic. */
# ifndef yystrlen
# if defined (__GLIBC__) && defined (_STRING_H)
# define yystrlen strlen
# else
/* Return the length of YYSTR. */
static YYSIZE_T
# if defined (__STDC__) || defined (__cplusplus)
yystrlen (const char *yystr)
# else
yystrlen (yystr)
const char *yystr;
# endif
{
const char *yys = yystr;
while (*yys++ != '\0')
continue;
return yys - yystr - 1;
}
# endif
# endif
# ifndef yystpcpy
# 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. */
static char *
# if defined (__STDC__) || defined (__cplusplus)
yystpcpy (char *yydest, const char *yysrc)
# else
yystpcpy (yydest, yysrc)
char *yydest;
const char *yysrc;
# endif
{
char *yyd = yydest;
const char *yys = yysrc;
while ((*yyd++ = *yys++) != '\0')
continue;
return yyd - 1;
}
# endif
# endif
# ifndef yytnamerr
/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
quotes and backslashes, so that it's suitable for yyerror. The
heuristic is that double-quoting is unnecessary unless the string
contains an apostrophe, a comma, or backslash (other than
backslash-backslash). YYSTR is taken from yytname. If YYRES is
null, do not copy; instead, return the length of what the result
would have been. */
static YYSIZE_T
yytnamerr (char *yyres, const char *yystr)
{
if (*yystr == '"')
{
size_t yyn = 0;
char const *yyp = yystr;
for (;;)
switch (*++yyp)
{
case '\'':
case ',':
goto do_not_strip_quotes;
case '\\':
if (*++yyp != '\\')
goto do_not_strip_quotes;
/* Fall through. */
default:
if (yyres)
yyres[yyn] = *yyp;
yyn++;
break;
case '"':
if (yyres)
yyres[yyn] = '\0';
return yyn;
}
do_not_strip_quotes: ;
}
if (! yyres)
return yystrlen (yystr);
return yystpcpy (yyres, yystr) - yyres;
}
# endif
#endif /* YYERROR_VERBOSE */
#if YYDEBUG
/*--------------------------------.
| Print this symbol on YYOUTPUT. |
`--------------------------------*/
#ifdef YYPARSE_PARAM
# if defined (__STDC__) || defined (__cplusplus)
int yyparse (void *YYPARSE_PARAM);
# else
int yyparse ();
# endif
#else /* ! YYPARSE_PARAM */
#if defined (__STDC__) || defined (__cplusplus)
int yyparse (ElftosbLexer * lexer, CommandFileASTNode ** resultAST);
#else
int yyparse ();
#endif
#endif /* ! YYPARSE_PARAM */
/*----------.
| yyparse. |
`----------*/
#ifdef YYPARSE_PARAM
# if defined (__STDC__) || defined (__cplusplus)
int yyparse (void *YYPARSE_PARAM)
# else
int yyparse (YYPARSE_PARAM)
void *YYPARSE_PARAM;
# endif
#else /* ! YYPARSE_PARAM */
#if defined (__STDC__) || defined (__cplusplus)
int
yyparse (ElftosbLexer * lexer, CommandFileASTNode ** resultAST)
#else
int
yyparse (lexer, resultAST)
ElftosbLexer * lexer;
CommandFileASTNode ** resultAST;
#endif
#endif
{
/* The look-ahead symbol. */
int yychar;
/* The semantic value of the look-ahead symbol. */
YYSTYPE yylval;
/* Number of syntax errors so far. */
int yynerrs;
/* Location data for the look-ahead 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;
/* Three stacks and their tools:
`yyss': related to states,
`yyvs': related to semantic values,
`yyls': related to locations.
Refer to the stacks thru separate pointers, to allow yyoverflow
to reallocate them elsewhere. */
/* The state stack. */
short int yyssa[YYINITDEPTH];
short int *yyss = yyssa;
short int *yyssp;
/* The semantic value stack. */
YYSTYPE yyvsa[YYINITDEPTH];
YYSTYPE *yyvs = yyvsa;
YYSTYPE *yyvsp;
/* The location stack. */
YYLTYPE yylsa[YYINITDEPTH];
YYLTYPE *yyls = yylsa;
YYLTYPE *yylsp;
/* The locations where the error started and ended. */
YYLTYPE yyerror_range[2];
#define YYPOPSTACK (yyvsp--, yyssp--, yylsp--)
YYSIZE_T yystacksize = YYINITDEPTH;
/* 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;
YYDPRINTF ((stderr, "Starting parse\n"));
yystate = 0;
yyerrstatus = 0;
yynerrs = 0;
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. */
/*------------------------------------------------------------.
| yynewstate -- Push a new state, which is found in yystate. |
`------------------------------------------------------------*/
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.
*/
yyssp++;
yysetstate:
*yyssp = yystate;
if (yyss + yystacksize - 1 <= yyssp)
{
/* Get the current used size of the three stacks, in elements. */
YYSIZE_T yysize = yyssp - yyss + 1;
#ifdef yyoverflow
{
/* 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;
YYLTYPE *yyls1 = yyls;
/* Each stack pointer address is followed by the size of the
data in use in that stack, in bytes. This used to be a
conditional around just the two extra args, but that might
be undefined if yyoverflow is a macro. */
yyoverflow (YY_("memory exhausted"),
&yyss1, yysize * sizeof (*yyssp),
&yyvs1, yysize * sizeof (*yyvsp),
&yyls1, yysize * sizeof (*yylsp),
&yystacksize);
yyls = yyls1;
yyss = yyss1;
yyvs = yyvs1;
}
#else /* no yyoverflow */
# ifndef YYSTACK_RELOCATE
goto yyexhaustedlab;
# else
/* Extend the stack our own way. */
if (YYMAXDEPTH <= yystacksize)
goto yyexhaustedlab;
yystacksize *= 2;
if (YYMAXDEPTH < yystacksize)
yystacksize = YYMAXDEPTH;
{
short int *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);
# undef YYSTACK_RELOCATE
if (yyss1 != yyssa)
YYSTACK_FREE (yyss1);
}
# endif
#endif /* no yyoverflow */
/* 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. */
yyn = yypact[yystate];
if (yyn == YYPACT_NINF)
goto yydefault;
/* Not known => get a look-ahead token if don't already have one. */
/* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */
if (yychar == YYEMPTY)
{
YYDPRINTF ((stderr, "Reading a token: "));
yychar = YYLEX;
}
if (yychar <= YYEOF)
{
yychar = yytoken = YYEOF;
YYDPRINTF ((stderr, "Now at end of input.\n"));
}
else
{
yytoken = YYTRANSLATE (yychar);
YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
}
/* If the proper action on seeing token YYTOKEN is to reduce or to
detect an error, take that action. */
yyn += yytoken;
if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
goto yydefault;
yyn = yytable[yyn];
if (yyn <= 0)
{
if (yyn == 0 || yyn == YYTABLE_NINF)
goto yyerrlab;
yyn = -yyn;
goto yyreduce;
}
/* 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--;
yystate = yyn;
goto yynewstate;
/*-----------------------------------------------------------.
| yydefault -- do the default action for the current state. |
`-----------------------------------------------------------*/
yydefault:
yyn = yydefact[yystate];
if (yyn == 0)
goto yyerrlab;
goto yyreduce;
/*-----------------------------.
| yyreduce -- Do a reduction. |
`-----------------------------*/
yyreduce:
/* yyn is the number of a rule to reduce with. */
yylen = yyr2[yyn];
/* If YYLEN is nonzero, implement the default value of the action:
`$$ = $1'.
Otherwise, the following line sets YYVAL to garbage.
This behavior is undocumented and Bison
users should not rely upon it. Assigning to YYVAL
unconditionally makes the parser a bit smaller, and it avoids a
GCC warning that YYVAL may be used uninitialized. */
yyval = yyvsp[1-yylen];
case 3:
{
ListASTNode * list = new ListASTNode();
list->appendNode((yyvsp[0].m_ast));
(yyval.m_ast) = list;
;}
break;
case 4:
{
dynamic_cast<ListASTNode*>((yyvsp[-1].m_ast))->appendNode((yyvsp[0].m_ast));
(yyval.m_ast) = (yyvsp[-1].m_ast);
;}
break;
case 5:
{ (yyval.m_ast) = (yyvsp[0].m_ast); ;}
break;
case 6:
{ (yyval.m_ast) = (yyvsp[0].m_ast); ;}
break;
case 7:
{ (yyval.m_ast) = (yyvsp[0].m_ast); ;}
break;
case 8:
{
(yyval.m_ast) = new OptionsBlockASTNode(dynamic_cast<ListASTNode *>((yyvsp[-1].m_ast)));
;}
break;
case 9:
{
(yyval.m_ast) = new ConstantsBlockASTNode(dynamic_cast<ListASTNode *>((yyvsp[-1].m_ast)));
;}
break;
case 10:
{
ListASTNode * list = new ListASTNode();
list->appendNode((yyvsp[0].m_ast));
(yyval.m_ast) = list;
;}
break;
case 11:
{
dynamic_cast<ListASTNode*>((yyvsp[-1].m_ast))->appendNode((yyvsp[0].m_ast));
(yyval.m_ast) = (yyvsp[-1].m_ast);
;}
break;
case 12:
{ (yyval.m_ast) = (yyvsp[-1].m_ast); ;}
break;
case 13:
{ (yyval.m_ast) = NULL; ;}
break;
case 14:
{
(yyval.m_ast) = new AssignmentASTNode((yyvsp[-2].m_str), (yyvsp[0].m_ast));
(yyval.m_ast)->setLocation((yylsp[-2]), (yylsp[0]));
;}
break;
case 15:
{
(yyval.m_ast) = new SourcesBlockASTNode(dynamic_cast<ListASTNode *>((yyvsp[-1].m_ast)));
;}
break;
case 16:
{
ListASTNode * list = new ListASTNode();
list->appendNode((yyvsp[0].m_ast));
(yyval.m_ast) = list;
;}
break;
case 17:
{
dynamic_cast<ListASTNode*>((yyvsp[-1].m_ast))->appendNode((yyvsp[0].m_ast));
(yyval.m_ast) = (yyvsp[-1].m_ast);
;}
break;
case 18:
{
// 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))
{
node->setAttributes(dynamic_cast<ListASTNode*>((yyvsp[-1].m_ast)));
}
node->setLocation(node->getLocation(), (yylsp[0]));
lexer->addSourceName(node->getName());
(yyval.m_ast) = (yyvsp[-2].m_ast);
;}
break;
case 19:
{ (yyval.m_ast) = NULL; ;}
break;
case 20:
{
(yyval.m_ast) = new PathSourceDefASTNode((yyvsp[-2].m_str), (yyvsp[0].m_str));
(yyval.m_ast)->setLocation((yylsp[-2]), (yylsp[0]));
;}
break;
case 21:
{
(yyval.m_ast) = new ExternSourceDefASTNode((yyvsp[-5].m_str), dynamic_cast<ExprASTNode*>((yyvsp[-1].m_ast)));
(yyval.m_ast)->setLocation((yylsp[-5]), (yylsp[0]));
;}
break;
case 22:
{ (yyval.m_ast) = (yyvsp[-1].m_ast); ;}
break;
case 23:
{ (yyval.m_ast) = NULL; ;}
break;
case 24:
{
ListASTNode * list = new ListASTNode();
list->appendNode((yyvsp[0].m_ast));
(yyval.m_ast) = list;
;}
break;
case 25:
{
dynamic_cast<ListASTNode*>((yyvsp[-2].m_ast))->appendNode((yyvsp[0].m_ast));
(yyval.m_ast) = (yyvsp[-2].m_ast);
;}
break;
case 26:
{
(yyval.m_ast) = new AssignmentASTNode((yyvsp[-2].m_str), (yyvsp[0].m_ast));
(yyval.m_ast)->setLocation((yylsp[-2]), (yylsp[0]));
;}
break;
case 27:
{
ListASTNode * list = new ListASTNode();
list->appendNode((yyvsp[0].m_ast));
(yyval.m_ast) = list;
;}
break;
case 28:
{
dynamic_cast<ListASTNode*>((yyvsp[-1].m_ast))->appendNode((yyvsp[0].m_ast));
(yyval.m_ast) = (yyvsp[-1].m_ast);
;}
break;
case 30:
{
(yyval.m_ast) = (yyvsp[0].m_ast);
;}
break;
case 31:
{
(yyval.m_ast) = NULL;
;}
break;
case 32:
{
(yyval.m_ast) = (yyvsp[0].m_ast);
;}
break;
case 33:
{
(yyval.m_ast) = NULL;
;}
break;
case 34:
{
DataSectionContentsASTNode * dataSection = new DataSectionContentsASTNode((yyvsp[-1].m_ast));
dataSection->setLocation((yylsp[-2]), (yylsp[0]));
(yyval.m_ast) = dataSection;
;}
break;
case 35:
{
ListASTNode * listNode = dynamic_cast<ListASTNode*>((yyvsp[-1].m_ast));
(yyval.m_ast) = new BootableSectionContentsASTNode(listNode);
(yyval.m_ast)->setLocation((yylsp[-2]), (yylsp[0]));
;}
break;
case 36:
{
ListASTNode * list = new ListASTNode();
list->appendNode((yyvsp[0].m_ast));
(yyval.m_ast) = list;
;}
break;
case 37:
{
dynamic_cast<ListASTNode*>((yyvsp[-1].m_ast))->appendNode((yyvsp[0].m_ast));
(yyval.m_ast) = (yyvsp[-1].m_ast);
;}
break;
case 38:
{ (yyval.m_ast) = (yyvsp[-1].m_ast); ;}
break;
case 39:
{ (yyval.m_ast) = (yyvsp[0].m_ast); ;}
break;
case 40:
{ (yyval.m_ast) = (yyvsp[0].m_ast); ;}
break;
case 41:
{ (yyval.m_ast) = NULL; ;}
break;
case 42:
{
ListASTNode * list = new ListASTNode();
list->appendNode((yyvsp[0].m_ast));
(yyval.m_ast) = list;
;}
break;
case 43:
{
dynamic_cast<ListASTNode*>((yyvsp[-1].m_ast))->appendNode((yyvsp[0].m_ast));
(yyval.m_ast) = (yyvsp[-1].m_ast);
;}
break;
case 44:
{ (yyval.m_ast) = (yyvsp[-1].m_ast); ;}
break;
case 45:
{ (yyval.m_ast) = (yyvsp[0].m_ast); ;}
break;
case 46:
{ (yyval.m_ast) = NULL; ;}
break;
case 47:
{ (yyval.m_ast) = (yyvsp[0].m_ast); ;}
break;
case 48:
{ (yyval.m_ast) = (yyvsp[0].m_ast); ;}
break;
case 49:
{ (yyval.m_ast) = (yyvsp[0].m_ast); ;}
break;
case 50:
{ (yyval.m_ast) = (yyvsp[0].m_ast); ;}
break;
case 51:
{
LoadStatementASTNode * stmt = new LoadStatementASTNode();
stmt->setData((yyvsp[-1].m_ast));
stmt->setTarget((yyvsp[0].m_ast));
// set dcd load flag if the "dcd" keyword was present.
if ((yyvsp[-2].m_num))
{
stmt->setDCDLoad(true);
}
// set char locations for the statement
if ((yyvsp[0].m_ast))
{
stmt->setLocation((yylsp[-3]), (yylsp[0]));
}
else
{
stmt->setLocation((yylsp[-3]), (yylsp[-1]));
}
(yyval.m_ast) = stmt;
;}
break;
case 52:
{
if (!elftosb::g_enableHABSupport)
{
yyerror(&yylloc, lexer, resultAST, "HAB features not supported with the selected family");
YYABORT;
}
(yyval.m_num) = 1;
;}
break;
case 53:
{ (yyval.m_num) = 0; ;}
break;
case 54:
{
(yyval.m_ast) = (yyvsp[0].m_ast);
;}
break;
case 55:
{
(yyval.m_ast) = new StringConstASTNode((yyvsp[0].m_str));
(yyval.m_ast)->setLocation((yylsp[0]));
;}
break;
case 56:
{
(yyval.m_ast) = new SourceASTNode((yyvsp[0].m_str));
(yyval.m_ast)->setLocation((yylsp[0]));
;}
break;
case 57:
{
(yyval.m_ast) = new SectionMatchListASTNode(dynamic_cast<ListASTNode*>((yyvsp[0].m_ast)));
(yyval.m_ast)->setLocation((yylsp[0]));
;}
break;
case 58:
{
(yyval.m_ast) = new SectionMatchListASTNode(dynamic_cast<ListASTNode*>((yyvsp[-2].m_ast)), (yyvsp[0].m_str));
(yyval.m_ast)->setLocation((yylsp[-2]), (yylsp[0]));
;}
break;
case 59:
{
(yyval.m_ast) = new SectionMatchListASTNode(dynamic_cast<ListASTNode*>((yyvsp[-1].m_ast)), (yyvsp[-3].m_str));
(yyval.m_ast)->setLocation((yylsp[-3]), (yylsp[0]));
;}
break;
case 60:
{
(yyval.m_ast) = new BlobConstASTNode((yyvsp[0].m_blob));
(yyval.m_ast)->setLocation((yylsp[0]));
;}
break;
case 61:
{
;}
break;
case 62:
{
ListASTNode * list = new ListASTNode();
list->appendNode((yyvsp[0].m_ast));
(yyval.m_ast) = list;
;}
break;
case 63:
{
dynamic_cast<ListASTNode*>((yyvsp[-2].m_ast))->appendNode((yyvsp[0].m_ast));
(yyval.m_ast) = (yyvsp[-2].m_ast);
;}
break;
case 64:
{
(yyval.m_ast) = new SectionASTNode((yyvsp[0].m_str), SectionASTNode::kInclude);
(yyval.m_ast)->setLocation((yylsp[0]));
;}
break;
case 65:
{
(yyval.m_ast) = new SectionASTNode((yyvsp[0].m_str), SectionASTNode::kExclude);
(yyval.m_ast)->setLocation((yylsp[-1]), (yylsp[0]));
;}
break;
case 66:
{
(yyval.m_ast) = (yyvsp[0].m_ast);
;}
break;
case 67:
{
(yyval.m_ast) = new NaturalLocationASTNode();
// $$->setLocation();
;}
break;
case 68:
{
(yyval.m_ast) = new NaturalLocationASTNode();
(yyval.m_ast)->setLocation((yylsp[0]));
;}
break;
case 69:
{
(yyval.m_ast) = (yyvsp[0].m_ast);
;}
break;
case 70:
{
IVTConstASTNode * ivt = new IVTConstASTNode();
if ((yyvsp[-1].m_ast))
{
ivt->setFieldAssignments(dynamic_cast<ListASTNode*>((yyvsp[-1].m_ast)));
}
ivt->setLocation((yylsp[-3]), (yylsp[0]));
(yyval.m_ast) = ivt;
;}
break;
case 71:
{ (yyval.m_ast) = (yyvsp[0].m_ast); ;}
break;
case 72:
{ (yyval.m_ast) = NULL; ;}
break;
case 73:
{
CallStatementASTNode * stmt = new CallStatementASTNode();
switch ((yyvsp[-2].m_num))
{
case 1:
stmt->setCallType(CallStatementASTNode::kCallType);
break;
case 2:
stmt->setCallType(CallStatementASTNode::kJumpType);
break;
default:
yyerror(&yylloc, lexer, resultAST, "invalid call_or_jump value");
YYABORT;
break;
}
stmt->setTarget((yyvsp[-1].m_ast));
stmt->setArgument((yyvsp[0].m_ast));
stmt->setIsHAB(false);
if ((yyvsp[0].m_ast))
{
stmt->setLocation((yylsp[-2]), (yylsp[0]));
}
else
{
stmt->setLocation((yylsp[-2]), (yylsp[-1]));
}
(yyval.m_ast) = stmt;
;}
break;
case 74:
{
if (!elftosb::g_enableHABSupport)
{
yyerror(&yylloc, lexer, resultAST, "HAB features not supported with the selected family");
YYABORT;
}
case 77:
{
(yyval.m_ast) = new SymbolASTNode(NULL, (yyvsp[0].m_str));
(yyval.m_ast)->setLocation((yylsp[0]));
;}
break;
case 78:
{
(yyval.m_ast) = new AddressRangeASTNode((yyvsp[0].m_ast), NULL);
(yyval.m_ast)->setLocation((yyvsp[0].m_ast));
;}
break;
case 79:
{ (yyval.m_ast) = (yyvsp[-1].m_ast); ;}
break;
case 80:
{ (yyval.m_ast) = NULL; ;}
break;
case 81:
{ (yyval.m_ast) = NULL; ;}
break;
case 82:
{
(yyval.m_ast) = new FromStatementASTNode((yyvsp[-3].m_str), dynamic_cast<ListASTNode*>((yyvsp[-1].m_ast)));
(yyval.m_ast)->setLocation((yylsp[-4]), (yylsp[0]));
;}
break;
case 83:
{
(yyval.m_ast) = new ModeStatementASTNode(dynamic_cast<ExprASTNode*>((yyvsp[0].m_ast)));
(yyval.m_ast)->setLocation((yylsp[-1]), (yylsp[0]));
;}
break;
case 84:
{
(yyval.m_ast) = new MessageStatementASTNode(MessageStatementASTNode::kInfo, (yyvsp[0].m_str));
(yyval.m_ast)->setLocation((yylsp[-1]), (yylsp[0]));
;}
break;
case 85:
{
(yyval.m_ast) = new MessageStatementASTNode(MessageStatementASTNode::kWarning, (yyvsp[0].m_str));
(yyval.m_ast)->setLocation((yylsp[-1]), (yylsp[0]));
;}
break;
case 86:
{
(yyval.m_ast) = new MessageStatementASTNode(MessageStatementASTNode::kError, (yyvsp[0].m_str));
(yyval.m_ast)->setLocation((yylsp[-1]), (yylsp[0]));
;}
break;
case 87:
{
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]));
(yyval.m_ast) = ifStmt;
;}
break;
case 88:
{
(yyval.m_ast) = (yyvsp[-1].m_ast);
;}
break;
case 89:
{
ListASTNode * list = new ListASTNode();
list->appendNode((yyvsp[0].m_ast));
(yyval.m_ast) = list;
(yyval.m_ast)->setLocation((yylsp[-1]), (yylsp[0]));
;}
break;
case 90:
{ (yyval.m_ast) = NULL; ;}
break;
case 91:
{
(yyval.m_ast) = new AddressRangeASTNode((yyvsp[0].m_ast), NULL);
(yyval.m_ast)->setLocation((yyvsp[0].m_ast));
;}
break;
case 92:
{
(yyval.m_ast) = new AddressRangeASTNode((yyvsp[-2].m_ast), (yyvsp[0].m_ast));
(yyval.m_ast)->setLocation((yylsp[-2]), (yylsp[0]));
;}
break;
case 93:
{
(yyval.m_ast) = (yyvsp[0].m_ast);
;}
break;
case 94:
{
(yyval.m_ast) = new StringConstASTNode((yyvsp[0].m_str));
(yyval.m_ast)->setLocation((yylsp[0]));
;}
break;
case 95:
{
(yyval.m_ast) = (yyvsp[0].m_ast);
;}
break;
case 96:
{
ExprASTNode * left = dynamic_cast<ExprASTNode*>((yyvsp[-2].m_ast));
ExprASTNode * right = dynamic_cast<ExprASTNode*>((yyvsp[0].m_ast));
(yyval.m_ast) = new BinaryOpExprASTNode(left, BinaryOpExprASTNode::kLessThan, right);
(yyval.m_ast)->setLocation((yylsp[-2]), (yylsp[0]));
;}
break;
case 97:
{
ExprASTNode * left = dynamic_cast<ExprASTNode*>((yyvsp[-2].m_ast));
ExprASTNode * right = dynamic_cast<ExprASTNode*>((yyvsp[0].m_ast));
(yyval.m_ast) = new BinaryOpExprASTNode(left, BinaryOpExprASTNode::kGreaterThan, right);
(yyval.m_ast)->setLocation((yylsp[-2]), (yylsp[0]));
;}
break;
case 98:
{
ExprASTNode * left = dynamic_cast<ExprASTNode*>((yyvsp[-2].m_ast));
ExprASTNode * right = dynamic_cast<ExprASTNode*>((yyvsp[0].m_ast));
(yyval.m_ast) = new BinaryOpExprASTNode(left, BinaryOpExprASTNode::kGreaterThanEqual, right);
(yyval.m_ast)->setLocation((yylsp[-2]), (yylsp[0]));
;}
break;
case 99:
{
ExprASTNode * left = dynamic_cast<ExprASTNode*>((yyvsp[-2].m_ast));
ExprASTNode * right = dynamic_cast<ExprASTNode*>((yyvsp[0].m_ast));
(yyval.m_ast) = new BinaryOpExprASTNode(left, BinaryOpExprASTNode::kLessThanEqual, right);
(yyval.m_ast)->setLocation((yylsp[-2]), (yylsp[0]));
;}
break;
case 100:
{
ExprASTNode * left = dynamic_cast<ExprASTNode*>((yyvsp[-2].m_ast));
ExprASTNode * right = dynamic_cast<ExprASTNode*>((yyvsp[0].m_ast));
(yyval.m_ast) = new BinaryOpExprASTNode(left, BinaryOpExprASTNode::kEqual, right);
(yyval.m_ast)->setLocation((yylsp[-2]), (yylsp[0]));
;}
break;
case 101:
{
ExprASTNode * left = dynamic_cast<ExprASTNode*>((yyvsp[-2].m_ast));
ExprASTNode * right = dynamic_cast<ExprASTNode*>((yyvsp[0].m_ast));
(yyval.m_ast) = new BinaryOpExprASTNode(left, BinaryOpExprASTNode::kNotEqual, right);
(yyval.m_ast)->setLocation((yylsp[-2]), (yylsp[0]));
;}
break;
case 102:
{
ExprASTNode * left = dynamic_cast<ExprASTNode*>((yyvsp[-2].m_ast));
ExprASTNode * right = dynamic_cast<ExprASTNode*>((yyvsp[0].m_ast));
(yyval.m_ast) = new BinaryOpExprASTNode(left, BinaryOpExprASTNode::kBooleanAnd, right);
(yyval.m_ast)->setLocation((yylsp[-2]), (yylsp[0]));
;}
break;
case 103:
{
ExprASTNode * left = dynamic_cast<ExprASTNode*>((yyvsp[-2].m_ast));
ExprASTNode * right = dynamic_cast<ExprASTNode*>((yyvsp[0].m_ast));
(yyval.m_ast) = new BinaryOpExprASTNode(left, BinaryOpExprASTNode::kBooleanOr, right);
(yyval.m_ast)->setLocation((yylsp[-2]), (yylsp[0]));
;}
break;
case 104:
{
(yyval.m_ast) = new BooleanNotExprASTNode(dynamic_cast<ExprASTNode*>((yyvsp[0].m_ast)));
(yyval.m_ast)->setLocation((yylsp[-1]), (yylsp[0]));
;}
break;
case 105:
{
(yyval.m_ast) = new SourceFileFunctionASTNode((yyvsp[-3].m_str), (yyvsp[-1].m_str));
(yyval.m_ast)->setLocation((yylsp[-3]), (yylsp[0]));
;}
break;
case 106:
{
(yyval.m_ast) = (yyvsp[-1].m_ast);
(yyval.m_ast)->setLocation((yylsp[-2]), (yylsp[0]));
;}
break;
case 107:
{
(yyval.m_ast) = new DefinedOperatorASTNode((yyvsp[-1].m_str));
(yyval.m_ast)->setLocation((yylsp[-3]), (yylsp[0]));
;}
break;
case 108:
{ (yyval.m_ast) = (yyvsp[0].m_ast); ;}
break;
case 109:
{
(yyval.m_ast) = new SymbolASTNode((yyvsp[0].m_str), (yyvsp[-2].m_str));
(yyval.m_ast)->setLocation((yylsp[-2]), (yylsp[0]));
;}
break;
case 110:
{
(yyval.m_ast) = new SymbolASTNode((yyvsp[0].m_str));
(yyval.m_ast)->setLocation((yylsp[-1]), (yylsp[0]));
;}
break;
case 111:
{
(yyval.m_ast) = (yyvsp[0].m_ast);
;}
break;
case 112:
{
(yyval.m_ast) = new VariableExprASTNode((yyvsp[0].m_str));
(yyval.m_ast)->setLocation((yylsp[0]));
;}
break;
case 113:
{
(yyval.m_ast) = new SymbolRefExprASTNode(dynamic_cast<SymbolASTNode*>((yyvsp[0].m_ast)));
(yyval.m_ast)->setLocation((yylsp[0]));
;}
break;
case 114:
{
ExprASTNode * left = dynamic_cast<ExprASTNode*>((yyvsp[-2].m_ast));
ExprASTNode * right = dynamic_cast<ExprASTNode*>((yyvsp[0].m_ast));
(yyval.m_ast) = new BinaryOpExprASTNode(left, BinaryOpExprASTNode::kAdd, right);
(yyval.m_ast)->setLocation((yylsp[-2]), (yylsp[0]));
;}
break;
case 115:
{
ExprASTNode * left = dynamic_cast<ExprASTNode*>((yyvsp[-2].m_ast));
ExprASTNode * right = dynamic_cast<ExprASTNode*>((yyvsp[0].m_ast));
(yyval.m_ast) = new BinaryOpExprASTNode(left, BinaryOpExprASTNode::kSubtract, right);
(yyval.m_ast)->setLocation((yylsp[-2]), (yylsp[0]));
;}
break;
case 116:
{
ExprASTNode * left = dynamic_cast<ExprASTNode*>((yyvsp[-2].m_ast));
ExprASTNode * right = dynamic_cast<ExprASTNode*>((yyvsp[0].m_ast));
(yyval.m_ast) = new BinaryOpExprASTNode(left, BinaryOpExprASTNode::kMultiply, right);
(yyval.m_ast)->setLocation((yylsp[-2]), (yylsp[0]));
;}
break;
case 117:
{
ExprASTNode * left = dynamic_cast<ExprASTNode*>((yyvsp[-2].m_ast));
ExprASTNode * right = dynamic_cast<ExprASTNode*>((yyvsp[0].m_ast));
(yyval.m_ast) = new BinaryOpExprASTNode(left, BinaryOpExprASTNode::kDivide, right);
(yyval.m_ast)->setLocation((yylsp[-2]), (yylsp[0]));
;}
break;
case 118:
{
ExprASTNode * left = dynamic_cast<ExprASTNode*>((yyvsp[-2].m_ast));
ExprASTNode * right = dynamic_cast<ExprASTNode*>((yyvsp[0].m_ast));
(yyval.m_ast) = new BinaryOpExprASTNode(left, BinaryOpExprASTNode::kModulus, right);
(yyval.m_ast)->setLocation((yylsp[-2]), (yylsp[0]));
;}
break;
case 119:
{
ExprASTNode * left = dynamic_cast<ExprASTNode*>((yyvsp[-2].m_ast));
ExprASTNode * right = dynamic_cast<ExprASTNode*>((yyvsp[0].m_ast));
(yyval.m_ast) = new BinaryOpExprASTNode(left, BinaryOpExprASTNode::kPower, right);
(yyval.m_ast)->setLocation((yylsp[-2]), (yylsp[0]));
;}
break;
case 120:
{
ExprASTNode * left = dynamic_cast<ExprASTNode*>((yyvsp[-2].m_ast));
ExprASTNode * right = dynamic_cast<ExprASTNode*>((yyvsp[0].m_ast));
(yyval.m_ast) = new BinaryOpExprASTNode(left, BinaryOpExprASTNode::kBitwiseAnd, right);
(yyval.m_ast)->setLocation((yylsp[-2]), (yylsp[0]));
;}
break;
case 121:
{
ExprASTNode * left = dynamic_cast<ExprASTNode*>((yyvsp[-2].m_ast));
ExprASTNode * right = dynamic_cast<ExprASTNode*>((yyvsp[0].m_ast));
(yyval.m_ast) = new BinaryOpExprASTNode(left, BinaryOpExprASTNode::kBitwiseOr, right);
(yyval.m_ast)->setLocation((yylsp[-2]), (yylsp[0]));
;}
break;
case 122:
{
ExprASTNode * left = dynamic_cast<ExprASTNode*>((yyvsp[-2].m_ast));
ExprASTNode * right = dynamic_cast<ExprASTNode*>((yyvsp[0].m_ast));
(yyval.m_ast) = new BinaryOpExprASTNode(left, BinaryOpExprASTNode::kBitwiseXor, right);
(yyval.m_ast)->setLocation((yylsp[-2]), (yylsp[0]));
;}
break;
case 123:
{
ExprASTNode * left = dynamic_cast<ExprASTNode*>((yyvsp[-2].m_ast));
ExprASTNode * right = dynamic_cast<ExprASTNode*>((yyvsp[0].m_ast));
(yyval.m_ast) = new BinaryOpExprASTNode(left, BinaryOpExprASTNode::kShiftLeft, right);
(yyval.m_ast)->setLocation((yylsp[-2]), (yylsp[0]));
;}
break;
case 124:
{
ExprASTNode * left = dynamic_cast<ExprASTNode*>((yyvsp[-2].m_ast));
ExprASTNode * right = dynamic_cast<ExprASTNode*>((yyvsp[0].m_ast));
(yyval.m_ast) = new BinaryOpExprASTNode(left, BinaryOpExprASTNode::kShiftRight, right);
(yyval.m_ast)->setLocation((yylsp[-2]), (yylsp[0]));
;}
break;
case 125:
{
(yyval.m_ast) = (yyvsp[0].m_ast);
;}
break;
case 126:
{
(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]));
;}
break;
case 127:
{
(yyval.m_ast) = (yyvsp[-1].m_ast);
(yyval.m_ast)->setLocation((yylsp[-2]), (yylsp[0]));
;}
break;
case 128:
{
(yyval.m_ast) = new SizeofOperatorASTNode(dynamic_cast<SymbolASTNode*>((yyvsp[-1].m_ast)));
(yyval.m_ast)->setLocation((yylsp[-3]), (yylsp[0]));
;}
break;
case 129:
{
(yyval.m_ast) = new SizeofOperatorASTNode((yyvsp[-1].m_str));
(yyval.m_ast)->setLocation((yylsp[-3]), (yylsp[0]));
;}
break;
case 130:
{
(yyval.m_ast) = new SizeofOperatorASTNode((yyvsp[-1].m_str));
(yyval.m_ast)->setLocation((yylsp[-3]), (yylsp[0]));
;}
break;
case 131:
{
(yyval.m_ast) = (yyvsp[0].m_ast);
;}
break;
case 132:
{
(yyval.m_ast) = new NegativeExprASTNode(dynamic_cast<ExprASTNode*>((yyvsp[0].m_ast)));
(yyval.m_ast)->setLocation((yylsp[-1]), (yylsp[0]));
;}
break;
case 133:
{
(yyval.m_ast) = new IntConstExprASTNode((yyvsp[0].m_int)->getValue(), (yyvsp[0].m_int)->getWordSize());
(yyval.m_ast)->setLocation((yylsp[0]));
;}
break;
default: break;
}
/* Line 1126 of yacc.c. */
yyvsp -= yylen;
yyssp -= yylen;
yylsp -= yylen;
YY_STACK_PRINT (yyss, yyssp);
*++yyvsp = yyval;
*++yylsp = yyloc;
/* Now `shift' the result of the reduction. Determine what state
that goes to, based on the state we popped back to and the rule
number reduced by. */
/*------------------------------------.
| yyerrlab -- here on detecting error |
`------------------------------------*/
yyerrlab:
/* If not already recovering from an error, report this error. */
if (!yyerrstatus)
{
++yynerrs;
#if YYERROR_VERBOSE
yyn = yypact[yystate];
#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;
/* Pacify compilers like GCC when the user code never invokes
YYERROR and the label yyerrorlab therefore never appears in user
code. */
if (0)
goto yyerrorlab;
/*-------------------------------------------------------------.
| yyerrlab1 -- common code for both syntax error and YYERROR. |
`-------------------------------------------------------------*/
yyerrlab1:
yyerrstatus = 3; /* Each real token shifted decrements this. */
for (;;)
{
yyn = yypact[yystate];
if (yyn != YYPACT_NINF)
{
yyn += YYTERROR;
if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
{
yyn = yytable[yyn];
if (0 < yyn)
break;
}
}
/* Pop the current state because it cannot handle the error token. */
if (yyssp == yyss)
YYABORT;
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);
*++yylsp = yyloc;