Commit 2a6a08ca authored by Grant Likely's avatar Grant Likely

dtc: Update generated files to output from Bison 2.5

This patch merely updates the generated dtc parser and lexer files to
the output generated by Bison 2.5. The previous versions were generated
from version 2.4.1. The only reason for this commit is to minimize the
diff on the next commit which fixes a bug in the DTC #line directive
parsing. Otherwise the Bison changes would be intermingled with the
functional changes.
Signed-off-by: default avatarGrant Likely <grant.likely@secretlab.ca>
parent d25d8694
/* A Bison parser, made by GNU Bison 2.5. */
/* A Bison parser, made by GNU Bison 2.4.1. */ /* Bison implementation for Yacc-like parsers in C
/* Skeleton implementation for Bison's Yacc-like parsers in C
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc.
Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by
...@@ -46,7 +44,7 @@ ...@@ -46,7 +44,7 @@
#define YYBISON 1 #define YYBISON 1
/* Bison version. */ /* Bison version. */
#define YYBISON_VERSION "2.4.1" #define YYBISON_VERSION "2.5"
/* Skeleton name. */ /* Skeleton name. */
#define YYSKELETON_NAME "yacc.c" #define YYSKELETON_NAME "yacc.c"
...@@ -67,7 +65,7 @@ ...@@ -67,7 +65,7 @@
/* Copy the first part of user declarations. */ /* Copy the first part of user declarations. */
/* Line 189 of yacc.c */ /* Line 268 of yacc.c */
#line 21 "dtc-parser.y" #line 21 "dtc-parser.y"
#include <stdio.h> #include <stdio.h>
...@@ -88,8 +86,8 @@ static unsigned long long eval_literal(const char *s, int base, int bits); ...@@ -88,8 +86,8 @@ static unsigned long long eval_literal(const char *s, int base, int bits);
static unsigned char eval_char_literal(const char *s); static unsigned char eval_char_literal(const char *s);
/* Line 189 of yacc.c */ /* Line 268 of yacc.c */
#line 93 "dtc-parser.tab.c" #line 91 "dtc-parser.tab.c"
/* Enabling traces. */ /* Enabling traces. */
#ifndef YYDEBUG #ifndef YYDEBUG
...@@ -147,7 +145,7 @@ static unsigned char eval_char_literal(const char *s); ...@@ -147,7 +145,7 @@ static unsigned char eval_char_literal(const char *s);
typedef union YYSTYPE typedef union YYSTYPE
{ {
/* Line 214 of yacc.c */ /* Line 293 of yacc.c */
#line 40 "dtc-parser.y" #line 40 "dtc-parser.y"
char *propnodename; char *propnodename;
...@@ -171,8 +169,8 @@ typedef union YYSTYPE ...@@ -171,8 +169,8 @@ typedef union YYSTYPE
/* Line 214 of yacc.c */ /* Line 293 of yacc.c */
#line 176 "dtc-parser.tab.c" #line 174 "dtc-parser.tab.c"
} YYSTYPE; } YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1 # define YYSTYPE_IS_TRIVIAL 1
# define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define yystype YYSTYPE /* obsolescent; will be withdrawn */
...@@ -183,8 +181,8 @@ typedef union YYSTYPE ...@@ -183,8 +181,8 @@ typedef union YYSTYPE
/* Copy the second part of user declarations. */ /* Copy the second part of user declarations. */
/* Line 264 of yacc.c */ /* Line 343 of yacc.c */
#line 188 "dtc-parser.tab.c" #line 186 "dtc-parser.tab.c"
#ifdef short #ifdef short
# undef short # undef short
...@@ -234,7 +232,7 @@ typedef short int yytype_int16; ...@@ -234,7 +232,7 @@ typedef short int yytype_int16;
#define YYSIZE_MAXIMUM ((YYSIZE_T) -1) #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
#ifndef YY_ #ifndef YY_
# if YYENABLE_NLS # if defined YYENABLE_NLS && YYENABLE_NLS
# if ENABLE_NLS # if ENABLE_NLS
# include <libintl.h> /* INFRINGES ON USER NAME SPACE */ # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
# define YY_(msgid) dgettext ("bison-runtime", msgid) # define YY_(msgid) dgettext ("bison-runtime", msgid)
...@@ -287,11 +285,11 @@ YYID (yyi) ...@@ -287,11 +285,11 @@ YYID (yyi)
# define alloca _alloca # define alloca _alloca
# else # else
# define YYSTACK_ALLOC alloca # define YYSTACK_ALLOC alloca
# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER) || defined __cplusplus || defined _MSC_VER)
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
# ifndef _STDLIB_H # ifndef EXIT_SUCCESS
# define _STDLIB_H 1 # define EXIT_SUCCESS 0
# endif # endif
# endif # endif
# endif # endif
...@@ -314,24 +312,24 @@ YYID (yyi) ...@@ -314,24 +312,24 @@ YYID (yyi)
# ifndef YYSTACK_ALLOC_MAXIMUM # ifndef YYSTACK_ALLOC_MAXIMUM
# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
# endif # endif
# if (defined __cplusplus && ! defined _STDLIB_H \ # if (defined __cplusplus && ! defined EXIT_SUCCESS \
&& ! ((defined YYMALLOC || defined malloc) \ && ! ((defined YYMALLOC || defined malloc) \
&& (defined YYFREE || defined free))) && (defined YYFREE || defined free)))
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
# ifndef _STDLIB_H # ifndef EXIT_SUCCESS
# define _STDLIB_H 1 # define EXIT_SUCCESS 0
# endif # endif
# endif # endif
# ifndef YYMALLOC # ifndef YYMALLOC
# define YYMALLOC malloc # define YYMALLOC malloc
# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ # if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER) || defined __cplusplus || defined _MSC_VER)
void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
# endif # endif
# endif # endif
# ifndef YYFREE # ifndef YYFREE
# define YYFREE free # define YYFREE free
# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ # if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER) || defined __cplusplus || defined _MSC_VER)
void free (void *); /* INFRINGES ON USER NAME SPACE */ void free (void *); /* INFRINGES ON USER NAME SPACE */
# endif # endif
...@@ -360,23 +358,7 @@ union yyalloc ...@@ -360,23 +358,7 @@ union yyalloc
((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
+ YYSTACK_GAP_MAXIMUM) + YYSTACK_GAP_MAXIMUM)
/* Copy COUNT objects from FROM to TO. The source and destination do # define YYCOPY_NEEDED 1
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 (YYID (0))
# endif
# endif
/* Relocate STACK from its old location to the new one. The /* Relocate STACK from its old location to the new one. The
local variables YYSIZE and YYSTACKSIZE give the old and new number of local variables YYSIZE and YYSTACKSIZE give the old and new number of
...@@ -396,6 +378,26 @@ union yyalloc ...@@ -396,6 +378,26 @@ union yyalloc
#endif #endif
#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
/* 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 (YYID (0))
# endif
# endif
#endif /* !YYCOPY_NEEDED */
/* YYFINAL -- State number of the termination state. */ /* YYFINAL -- State number of the termination state. */
#define YYFINAL 4 #define YYFINAL 4
/* YYLAST -- Last index in YYTABLE. */ /* YYLAST -- Last index in YYTABLE. */
...@@ -571,8 +573,8 @@ static const yytype_uint8 yyr2[] = ...@@ -571,8 +573,8 @@ static const yytype_uint8 yyr2[] =
2, 0, 2, 2, 0, 2, 2, 2, 3, 2 2, 0, 2, 2, 0, 2, 2, 2, 3, 2
}; };
/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state /* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM.
STATE-NUM when YYTABLE doesn't specify something else to do. Zero Performed when YYTABLE doesn't specify something else to do. Zero
means the default is an error. */ means the default is an error. */
static const yytype_uint8 yydefact[] = static const yytype_uint8 yydefact[] =
{ {
...@@ -633,8 +635,7 @@ static const yytype_int8 yypgoto[] = ...@@ -633,8 +635,7 @@ static const yytype_int8 yypgoto[] =
/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
positive, shift that token. If negative, reduce the rule which positive, shift that token. If negative, reduce the rule which
number is the opposite. If zero, do what YYDEFACT says. number is the opposite. If YYTABLE_NINF, syntax error. */
If YYTABLE_NINF, syntax error. */
#define YYTABLE_NINF -1 #define YYTABLE_NINF -1
static const yytype_uint8 yytable[] = static const yytype_uint8 yytable[] =
{ {
...@@ -654,6 +655,12 @@ static const yytype_uint8 yytable[] = ...@@ -654,6 +655,12 @@ static const yytype_uint8 yytable[] =
137, 0, 73, 139 137, 0, 73, 139
}; };
#define yypact_value_is_default(yystate) \
((yystate) == (-78))
#define yytable_value_is_error(yytable_value) \
YYID (0)
static const yytype_int16 yycheck[] = static const yytype_int16 yycheck[] =
{ {
5, 38, 39, 17, 18, 19, 12, 12, 17, 18, 5, 38, 39, 17, 18, 19, 12, 12, 17, 18,
...@@ -705,9 +712,18 @@ static const yytype_uint8 yystos[] = ...@@ -705,9 +712,18 @@ static const yytype_uint8 yystos[] =
/* Like YYERROR except do call yyerror. This remains here temporarily /* Like YYERROR except do call yyerror. This remains here temporarily
to ease the transition to the new meaning of YYERROR, for GCC. to ease the transition to the new meaning of YYERROR, for GCC.
Once GCC version 2 has supplanted version 1, this can go. */ Once GCC version 2 has supplanted version 1, this can go. However,
YYFAIL appears to be in use. Nevertheless, it is formally deprecated
in Bison 2.4.2's NEWS entry, where a plan to phase it out is
discussed. */
#define YYFAIL goto yyerrlab #define YYFAIL goto yyerrlab
#if defined YYFAIL
/* This is here to suppress warnings from the GCC cpp's
-Wunused-macros. Normally we don't worry about that warning, but
some users do, and we want to make it easy for users to remove
YYFAIL uses, which will produce warnings from Bison 2.5. */
#endif
#define YYRECOVERING() (!!yyerrstatus) #define YYRECOVERING() (!!yyerrstatus)
...@@ -717,7 +733,6 @@ do \ ...@@ -717,7 +733,6 @@ do \
{ \ { \
yychar = (Token); \ yychar = (Token); \
yylval = (Value); \ yylval = (Value); \
yytoken = YYTRANSLATE (yychar); \
YYPOPSTACK (1); \ YYPOPSTACK (1); \
goto yybackup; \ goto yybackup; \
} \ } \
...@@ -759,19 +774,10 @@ while (YYID (0)) ...@@ -759,19 +774,10 @@ while (YYID (0))
#endif #endif
/* YY_LOCATION_PRINT -- Print the location on the stream. /* This macro is provided for backward compatibility. */
This macro was not mandated originally: define only if we know
we won't break user code: when these are the locations we know. */
#ifndef YY_LOCATION_PRINT #ifndef YY_LOCATION_PRINT
# if YYLTYPE_IS_TRIVIAL # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
# define YY_LOCATION_PRINT(File, Loc) \
fprintf (File, "%d.%d-%d.%d", \
(Loc).first_line, (Loc).first_column, \
(Loc).last_line, (Loc).last_column)
# else
# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
# endif
#endif #endif
...@@ -963,7 +969,6 @@ int yydebug; ...@@ -963,7 +969,6 @@ int yydebug;
# define YYMAXDEPTH 10000 # define YYMAXDEPTH 10000
#endif #endif
#if YYERROR_VERBOSE #if YYERROR_VERBOSE
...@@ -1066,115 +1071,142 @@ yytnamerr (char *yyres, const char *yystr) ...@@ -1066,115 +1071,142 @@ yytnamerr (char *yyres, const char *yystr)
} }
# endif # endif
/* Copy into YYRESULT an error message about the unexpected token /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
YYCHAR while in state YYSTATE. Return the number of bytes copied, about the unexpected token YYTOKEN for the state stack whose top is
including the terminating null byte. If YYRESULT is null, do not YYSSP.
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)
{
int yyn = yypact[yystate];
if (! (YYPACT_NINF < yyn && yyn <= YYLAST)) Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
return 0; not large enough to hold the message. In that case, also set
else *YYMSG_ALLOC to the required number of bytes. Return 2 if the
required number of bytes is too large to store. */
static int
yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
yytype_int16 *yyssp, int yytoken)
{
YYSIZE_T yysize0 = yytnamerr (0, yytname[yytoken]);
YYSIZE_T yysize = yysize0;
YYSIZE_T yysize1;
enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
/* Internationalized format string. */
const char *yyformat = 0;
/* Arguments of yyformat. */
char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
/* Number of reported tokens (one for the "unexpected", one per
"expected"). */
int yycount = 0;
/* There are many possibilities here to consider:
- Assume YYFAIL is not used. It's too flawed to consider. See
<http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html>
for details. YYERROR is fine as it does not invoke this
function.
- If this state is a consistent state with a default action, then
the only way this function was invoked is if the default action
is an error action. In that case, don't check for expected
tokens because there are none.
- The only way there can be no lookahead present (in yychar) is if
this state is a consistent state with a default action. Thus,
detecting the absence of a lookahead is sufficient to determine
that there is no unexpected or expected token to report. In that
case, just report a simple "syntax error".
- Don't assume there isn't a lookahead just because this state is a
consistent state with a default action. There might have been a
previous inconsistent state, consistent state with a non-default
action, or user semantic action that manipulated yychar.
- Of course, the expected token list depends on states to have
correct lookahead information, and it depends on the parser not
to perform extra reductions after fetching a lookahead from the
scanner and before detecting a syntax error. Thus, state merging
(from LALR or IELR) and default reductions corrupt the expected
token list. However, the list is correct for canonical LR with
one exception: it will still contain any token that will not be
accepted due to an error action in a later state.
*/
if (yytoken != YYEMPTY)
{ {
int yytype = YYTRANSLATE (yychar); int yyn = yypact[*yyssp];
YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]); yyarg[yycount++] = yytname[yytoken];
YYSIZE_T yysize = yysize0; if (!yypact_value_is_default (yyn))
YYSIZE_T yysize1; {
int yysize_overflow = 0; /* Start YYX at -YYN if negative to avoid negative indexes in
enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; YYCHECK. In other words, skip the first -YYN actions for
char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; this state because they are default actions. */
int yyx; int yyxbegin = yyn < 0 ? -yyn : 0;
/* Stay within bounds of both yycheck and yytname. */
# if 0 int yychecklim = YYLAST - yyn + 1;
/* This is so xgettext sees the translatable formats that are int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
constructed on the fly. */ int yyx;
YY_("syntax error, unexpected %s");
YY_("syntax error, unexpected %s, expecting %s"); for (yyx = yyxbegin; yyx < yyxend; ++yyx)
YY_("syntax error, unexpected %s, expecting %s or %s"); if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
YY_("syntax error, unexpected %s, expecting %s or %s or %s"); && !yytable_value_is_error (yytable[yyx + yyn]))
YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"); {
# endif if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
char *yyfmt; {
char const *yyf; yycount = 1;
static char const yyunexpected[] = "syntax error, unexpected %s"; yysize = yysize0;
static char const yyexpecting[] = ", expecting %s"; break;
static char const yyor[] = " or %s"; }
char yyformat[sizeof yyunexpected yyarg[yycount++] = yytname[yyx];
+ sizeof yyexpecting - 1 yysize1 = yysize + yytnamerr (0, yytname[yyx]);
+ ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) if (! (yysize <= yysize1
* (sizeof yyor - 1))]; && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
char const *yyprefix = yyexpecting; return 2;
yysize = yysize1;
/* 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;
}
yyf = YY_(yyformat); switch (yycount)
yysize1 = yysize + yystrlen (yyf); {
yysize_overflow |= (yysize1 < yysize); # define YYCASE_(N, S) \
yysize = yysize1; case N: \
yyformat = S; \
break
YYCASE_(0, YY_("syntax error"));
YYCASE_(1, YY_("syntax error, unexpected %s"));
YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
# undef YYCASE_
}
if (yysize_overflow) yysize1 = yysize + yystrlen (yyformat);
return YYSIZE_MAXIMUM; if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
return 2;
yysize = yysize1;
if (yyresult) if (*yymsg_alloc < yysize)
{ {
/* Avoid sprintf, as that infringes on the user's name space. *yymsg_alloc = 2 * yysize;
Don't have undefined behavior even if the translation if (! (yysize <= *yymsg_alloc
produced a string with the wrong number of "%s"s. */ && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
char *yyp = yyresult; *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
int yyi = 0; return 1;
while ((*yyp = *yyf) != '\0')
{
if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
{
yyp += yytnamerr (yyp, yyarg[yyi++]);
yyf += 2;
}
else
{
yyp++;
yyf++;
}
}
}
return yysize;
} }
/* 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 = *yyformat) != '\0')
if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
{
yyp += yytnamerr (yyp, yyarg[yyi++]);
yyformat += 2;
}
else
{
yyp++;
yyformat++;
}
}
return 0;
} }
#endif /* YYERROR_VERBOSE */ #endif /* YYERROR_VERBOSE */
/*-----------------------------------------------. /*-----------------------------------------------.
| Release the memory associated to this symbol. | | Release the memory associated to this symbol. |
...@@ -1207,6 +1239,7 @@ yydestruct (yymsg, yytype, yyvaluep) ...@@ -1207,6 +1239,7 @@ yydestruct (yymsg, yytype, yyvaluep)
} }
} }
/* Prevent warnings from -Wmissing-prototypes. */ /* Prevent warnings from -Wmissing-prototypes. */
#ifdef YYPARSE_PARAM #ifdef YYPARSE_PARAM
#if defined __STDC__ || defined __cplusplus #if defined __STDC__ || defined __cplusplus
...@@ -1233,10 +1266,9 @@ YYSTYPE yylval; ...@@ -1233,10 +1266,9 @@ YYSTYPE yylval;
int yynerrs; int yynerrs;
/*----------.
/*-------------------------. | yyparse. |
| yyparse or yypush_parse. | `----------*/
`-------------------------*/
#ifdef YYPARSE_PARAM #ifdef YYPARSE_PARAM
#if (defined __STDC__ || defined __C99__FUNC__ \ #if (defined __STDC__ || defined __C99__FUNC__ \
...@@ -1260,8 +1292,6 @@ yyparse () ...@@ -1260,8 +1292,6 @@ yyparse ()
#endif #endif
#endif #endif
{ {
int yystate; int yystate;
/* Number of tokens to shift before error messages enabled. */ /* Number of tokens to shift before error messages enabled. */
int yyerrstatus; int yyerrstatus;
...@@ -1416,7 +1446,7 @@ yybackup: ...@@ -1416,7 +1446,7 @@ yybackup:
/* First try to decide what to do without reference to lookahead token. */ /* First try to decide what to do without reference to lookahead token. */
yyn = yypact[yystate]; yyn = yypact[yystate];
if (yyn == YYPACT_NINF) if (yypact_value_is_default (yyn))
goto yydefault; goto yydefault;
/* Not known => get a lookahead token if don't already have one. */ /* Not known => get a lookahead token if don't already have one. */
...@@ -1447,8 +1477,8 @@ yybackup: ...@@ -1447,8 +1477,8 @@ yybackup:
yyn = yytable[yyn]; yyn = yytable[yyn];
if (yyn <= 0) if (yyn <= 0)
{ {
if (yyn == 0 || yyn == YYTABLE_NINF) if (yytable_value_is_error (yyn))
goto yyerrlab; goto yyerrlab;
yyn = -yyn; yyn = -yyn;
goto yyreduce; goto yyreduce;
} }
...@@ -1503,72 +1533,72 @@ yyreduce: ...@@ -1503,72 +1533,72 @@ yyreduce:
{ {
case 2: case 2:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 110 "dtc-parser.y" #line 110 "dtc-parser.y"
{ {
the_boot_info = build_boot_info((yyvsp[(3) - (4)].re), (yyvsp[(4) - (4)].node), the_boot_info = build_boot_info((yyvsp[(3) - (4)].re), (yyvsp[(4) - (4)].node),
guess_boot_cpuid((yyvsp[(4) - (4)].node))); guess_boot_cpuid((yyvsp[(4) - (4)].node)));
;} }
break; break;
case 3: case 3:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 118 "dtc-parser.y" #line 118 "dtc-parser.y"
{ {
(yyval.re) = NULL; (yyval.re) = NULL;
;} }
break; break;
case 4: case 4:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 122 "dtc-parser.y" #line 122 "dtc-parser.y"
{ {
(yyval.re) = chain_reserve_entry((yyvsp[(1) - (2)].re), (yyvsp[(2) - (2)].re)); (yyval.re) = chain_reserve_entry((yyvsp[(1) - (2)].re), (yyvsp[(2) - (2)].re));
;} }
break; break;
case 5: case 5:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 129 "dtc-parser.y" #line 129 "dtc-parser.y"
{ {
(yyval.re) = build_reserve_entry((yyvsp[(2) - (4)].integer), (yyvsp[(3) - (4)].integer)); (yyval.re) = build_reserve_entry((yyvsp[(2) - (4)].integer), (yyvsp[(3) - (4)].integer));
;} }
break; break;
case 6: case 6:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 133 "dtc-parser.y" #line 133 "dtc-parser.y"
{ {
add_label(&(yyvsp[(2) - (2)].re)->labels, (yyvsp[(1) - (2)].labelref)); add_label(&(yyvsp[(2) - (2)].re)->labels, (yyvsp[(1) - (2)].labelref));
(yyval.re) = (yyvsp[(2) - (2)].re); (yyval.re) = (yyvsp[(2) - (2)].re);
;} }
break; break;
case 7: case 7:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 141 "dtc-parser.y" #line 141 "dtc-parser.y"
{ {
(yyval.node) = name_node((yyvsp[(2) - (2)].node), ""); (yyval.node) = name_node((yyvsp[(2) - (2)].node), "");
;} }
break; break;
case 8: case 8:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 145 "dtc-parser.y" #line 145 "dtc-parser.y"
{ {
(yyval.node) = merge_nodes((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); (yyval.node) = merge_nodes((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
;} }
break; break;
case 9: case 9:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 149 "dtc-parser.y" #line 149 "dtc-parser.y"
{ {
struct node *target = get_node_by_ref((yyvsp[(1) - (3)].node), (yyvsp[(2) - (3)].labelref)); struct node *target = get_node_by_ref((yyvsp[(1) - (3)].node), (yyvsp[(2) - (3)].labelref));
...@@ -1578,12 +1608,12 @@ yyreduce: ...@@ -1578,12 +1608,12 @@ yyreduce:
else else
print_error("label or path, '%s', not found", (yyvsp[(2) - (3)].labelref)); print_error("label or path, '%s', not found", (yyvsp[(2) - (3)].labelref));
(yyval.node) = (yyvsp[(1) - (3)].node); (yyval.node) = (yyvsp[(1) - (3)].node);
;} }
break; break;
case 10: case 10:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 159 "dtc-parser.y" #line 159 "dtc-parser.y"
{ {
struct node *target = get_node_by_ref((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].labelref)); struct node *target = get_node_by_ref((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].labelref));
...@@ -1594,112 +1624,112 @@ yyreduce: ...@@ -1594,112 +1624,112 @@ yyreduce:
delete_node(target); delete_node(target);
(yyval.node) = (yyvsp[(1) - (4)].node); (yyval.node) = (yyvsp[(1) - (4)].node);
;} }
break; break;
case 11: case 11:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 173 "dtc-parser.y" #line 173 "dtc-parser.y"
{ {
(yyval.node) = build_node((yyvsp[(2) - (5)].proplist), (yyvsp[(3) - (5)].nodelist)); (yyval.node) = build_node((yyvsp[(2) - (5)].proplist), (yyvsp[(3) - (5)].nodelist));
;} }
break; break;
case 12: case 12:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 180 "dtc-parser.y" #line 180 "dtc-parser.y"
{ {
(yyval.proplist) = NULL; (yyval.proplist) = NULL;
;} }
break; break;
case 13: case 13:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 184 "dtc-parser.y" #line 184 "dtc-parser.y"
{ {
(yyval.proplist) = chain_property((yyvsp[(2) - (2)].prop), (yyvsp[(1) - (2)].proplist)); (yyval.proplist) = chain_property((yyvsp[(2) - (2)].prop), (yyvsp[(1) - (2)].proplist));
;} }
break; break;
case 14: case 14:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 191 "dtc-parser.y" #line 191 "dtc-parser.y"
{ {
(yyval.prop) = build_property((yyvsp[(1) - (4)].propnodename), (yyvsp[(3) - (4)].data)); (yyval.prop) = build_property((yyvsp[(1) - (4)].propnodename), (yyvsp[(3) - (4)].data));
;} }
break; break;
case 15: case 15:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 195 "dtc-parser.y" #line 195 "dtc-parser.y"
{ {
(yyval.prop) = build_property((yyvsp[(1) - (2)].propnodename), empty_data); (yyval.prop) = build_property((yyvsp[(1) - (2)].propnodename), empty_data);
;} }
break; break;
case 16: case 16:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 199 "dtc-parser.y" #line 199 "dtc-parser.y"
{ {
(yyval.prop) = build_property_delete((yyvsp[(2) - (3)].propnodename)); (yyval.prop) = build_property_delete((yyvsp[(2) - (3)].propnodename));
;} }
break; break;
case 17: case 17:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 203 "dtc-parser.y" #line 203 "dtc-parser.y"
{ {
add_label(&(yyvsp[(2) - (2)].prop)->labels, (yyvsp[(1) - (2)].labelref)); add_label(&(yyvsp[(2) - (2)].prop)->labels, (yyvsp[(1) - (2)].labelref));
(yyval.prop) = (yyvsp[(2) - (2)].prop); (yyval.prop) = (yyvsp[(2) - (2)].prop);
;} }
break; break;
case 18: case 18:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 211 "dtc-parser.y" #line 211 "dtc-parser.y"
{ {
(yyval.data) = data_merge((yyvsp[(1) - (2)].data), (yyvsp[(2) - (2)].data)); (yyval.data) = data_merge((yyvsp[(1) - (2)].data), (yyvsp[(2) - (2)].data));
;} }
break; break;
case 19: case 19:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 215 "dtc-parser.y" #line 215 "dtc-parser.y"
{ {
(yyval.data) = data_merge((yyvsp[(1) - (3)].data), (yyvsp[(2) - (3)].array).data); (yyval.data) = data_merge((yyvsp[(1) - (3)].data), (yyvsp[(2) - (3)].array).data);
;} }
break; break;
case 20: case 20:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 219 "dtc-parser.y" #line 219 "dtc-parser.y"
{ {
(yyval.data) = data_merge((yyvsp[(1) - (4)].data), (yyvsp[(3) - (4)].data)); (yyval.data) = data_merge((yyvsp[(1) - (4)].data), (yyvsp[(3) - (4)].data));
;} }
break; break;
case 21: case 21:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 223 "dtc-parser.y" #line 223 "dtc-parser.y"
{ {
(yyval.data) = data_add_marker((yyvsp[(1) - (2)].data), REF_PATH, (yyvsp[(2) - (2)].labelref)); (yyval.data) = data_add_marker((yyvsp[(1) - (2)].data), REF_PATH, (yyvsp[(2) - (2)].labelref));
;} }
break; break;
case 22: case 22:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 227 "dtc-parser.y" #line 227 "dtc-parser.y"
{ {
FILE *f = srcfile_relative_open((yyvsp[(4) - (9)].data).val, NULL); FILE *f = srcfile_relative_open((yyvsp[(4) - (9)].data).val, NULL);
...@@ -1716,12 +1746,12 @@ yyreduce: ...@@ -1716,12 +1746,12 @@ yyreduce:
(yyval.data) = data_merge((yyvsp[(1) - (9)].data), d); (yyval.data) = data_merge((yyvsp[(1) - (9)].data), d);
fclose(f); fclose(f);
;} }
break; break;
case 23: case 23:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 244 "dtc-parser.y" #line 244 "dtc-parser.y"
{ {
FILE *f = srcfile_relative_open((yyvsp[(4) - (5)].data).val, NULL); FILE *f = srcfile_relative_open((yyvsp[(4) - (5)].data).val, NULL);
...@@ -1731,48 +1761,48 @@ yyreduce: ...@@ -1731,48 +1761,48 @@ yyreduce:
(yyval.data) = data_merge((yyvsp[(1) - (5)].data), d); (yyval.data) = data_merge((yyvsp[(1) - (5)].data), d);
fclose(f); fclose(f);
;} }
break; break;
case 24: case 24:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 254 "dtc-parser.y" #line 254 "dtc-parser.y"
{ {
(yyval.data) = data_add_marker((yyvsp[(1) - (2)].data), LABEL, (yyvsp[(2) - (2)].labelref)); (yyval.data) = data_add_marker((yyvsp[(1) - (2)].data), LABEL, (yyvsp[(2) - (2)].labelref));
;} }
break; break;
case 25: case 25:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 261 "dtc-parser.y" #line 261 "dtc-parser.y"
{ {
(yyval.data) = empty_data; (yyval.data) = empty_data;
;} }
break; break;
case 26: case 26:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 265 "dtc-parser.y" #line 265 "dtc-parser.y"
{ {
(yyval.data) = (yyvsp[(1) - (2)].data); (yyval.data) = (yyvsp[(1) - (2)].data);
;} }
break; break;
case 27: case 27:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 269 "dtc-parser.y" #line 269 "dtc-parser.y"
{ {
(yyval.data) = data_add_marker((yyvsp[(1) - (2)].data), LABEL, (yyvsp[(2) - (2)].labelref)); (yyval.data) = data_add_marker((yyvsp[(1) - (2)].data), LABEL, (yyvsp[(2) - (2)].labelref));
;} }
break; break;
case 28: case 28:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 276 "dtc-parser.y" #line 276 "dtc-parser.y"
{ {
(yyval.array).data = empty_data; (yyval.array).data = empty_data;
...@@ -1787,22 +1817,22 @@ yyreduce: ...@@ -1787,22 +1817,22 @@ yyreduce:
" are currently supported"); " are currently supported");
(yyval.array).bits = 32; (yyval.array).bits = 32;
} }
;} }
break; break;
case 29: case 29:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 291 "dtc-parser.y" #line 291 "dtc-parser.y"
{ {
(yyval.array).data = empty_data; (yyval.array).data = empty_data;
(yyval.array).bits = 32; (yyval.array).bits = 32;
;} }
break; break;
case 30: case 30:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 296 "dtc-parser.y" #line 296 "dtc-parser.y"
{ {
if ((yyvsp[(1) - (2)].array).bits < 64) { if ((yyvsp[(1) - (2)].array).bits < 64) {
...@@ -1822,12 +1852,12 @@ yyreduce: ...@@ -1822,12 +1852,12 @@ yyreduce:
} }
(yyval.array).data = data_append_integer((yyvsp[(1) - (2)].array).data, (yyvsp[(2) - (2)].integer), (yyvsp[(1) - (2)].array).bits); (yyval.array).data = data_append_integer((yyvsp[(1) - (2)].array).data, (yyvsp[(2) - (2)].integer), (yyvsp[(1) - (2)].array).bits);
;} }
break; break;
case 31: case 31:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 316 "dtc-parser.y" #line 316 "dtc-parser.y"
{ {
uint64_t val = ~0ULL >> (64 - (yyvsp[(1) - (2)].array).bits); uint64_t val = ~0ULL >> (64 - (yyvsp[(1) - (2)].array).bits);
...@@ -1841,288 +1871,299 @@ yyreduce: ...@@ -1841,288 +1871,299 @@ yyreduce:
"arrays with 32-bit elements."); "arrays with 32-bit elements.");
(yyval.array).data = data_append_integer((yyvsp[(1) - (2)].array).data, val, (yyvsp[(1) - (2)].array).bits); (yyval.array).data = data_append_integer((yyvsp[(1) - (2)].array).data, val, (yyvsp[(1) - (2)].array).bits);
;} }
break; break;
case 32: case 32:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 330 "dtc-parser.y" #line 330 "dtc-parser.y"
{ {
(yyval.array).data = data_add_marker((yyvsp[(1) - (2)].array).data, LABEL, (yyvsp[(2) - (2)].labelref)); (yyval.array).data = data_add_marker((yyvsp[(1) - (2)].array).data, LABEL, (yyvsp[(2) - (2)].labelref));
;} }
break; break;
case 33: case 33:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 337 "dtc-parser.y" #line 337 "dtc-parser.y"
{ {
(yyval.integer) = eval_literal((yyvsp[(1) - (1)].literal), 0, 64); (yyval.integer) = eval_literal((yyvsp[(1) - (1)].literal), 0, 64);
;} }
break; break;
case 34: case 34:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 341 "dtc-parser.y" #line 341 "dtc-parser.y"
{ {
(yyval.integer) = eval_char_literal((yyvsp[(1) - (1)].literal)); (yyval.integer) = eval_char_literal((yyvsp[(1) - (1)].literal));
;} }
break; break;
case 35: case 35:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 345 "dtc-parser.y" #line 345 "dtc-parser.y"
{ {
(yyval.integer) = (yyvsp[(2) - (3)].integer); (yyval.integer) = (yyvsp[(2) - (3)].integer);
;} }
break; break;
case 38: case 38:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 356 "dtc-parser.y" #line 356 "dtc-parser.y"
{ (yyval.integer) = (yyvsp[(1) - (5)].integer) ? (yyvsp[(3) - (5)].integer) : (yyvsp[(5) - (5)].integer); ;} { (yyval.integer) = (yyvsp[(1) - (5)].integer) ? (yyvsp[(3) - (5)].integer) : (yyvsp[(5) - (5)].integer); }
break; break;
case 40: case 40:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 361 "dtc-parser.y" #line 361 "dtc-parser.y"
{ (yyval.integer) = (yyvsp[(1) - (3)].integer) || (yyvsp[(3) - (3)].integer); ;} { (yyval.integer) = (yyvsp[(1) - (3)].integer) || (yyvsp[(3) - (3)].integer); }
break; break;
case 42: case 42:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 366 "dtc-parser.y" #line 366 "dtc-parser.y"
{ (yyval.integer) = (yyvsp[(1) - (3)].integer) && (yyvsp[(3) - (3)].integer); ;} { (yyval.integer) = (yyvsp[(1) - (3)].integer) && (yyvsp[(3) - (3)].integer); }
break; break;
case 44: case 44:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 371 "dtc-parser.y" #line 371 "dtc-parser.y"
{ (yyval.integer) = (yyvsp[(1) - (3)].integer) | (yyvsp[(3) - (3)].integer); ;} { (yyval.integer) = (yyvsp[(1) - (3)].integer) | (yyvsp[(3) - (3)].integer); }
break; break;
case 46: case 46:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 376 "dtc-parser.y" #line 376 "dtc-parser.y"
{ (yyval.integer) = (yyvsp[(1) - (3)].integer) ^ (yyvsp[(3) - (3)].integer); ;} { (yyval.integer) = (yyvsp[(1) - (3)].integer) ^ (yyvsp[(3) - (3)].integer); }
break; break;
case 48: case 48:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 381 "dtc-parser.y" #line 381 "dtc-parser.y"
{ (yyval.integer) = (yyvsp[(1) - (3)].integer) & (yyvsp[(3) - (3)].integer); ;} { (yyval.integer) = (yyvsp[(1) - (3)].integer) & (yyvsp[(3) - (3)].integer); }
break; break;
case 50: case 50:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 386 "dtc-parser.y" #line 386 "dtc-parser.y"
{ (yyval.integer) = (yyvsp[(1) - (3)].integer) == (yyvsp[(3) - (3)].integer); ;} { (yyval.integer) = (yyvsp[(1) - (3)].integer) == (yyvsp[(3) - (3)].integer); }
break; break;
case 51: case 51:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 387 "dtc-parser.y" #line 387 "dtc-parser.y"
{ (yyval.integer) = (yyvsp[(1) - (3)].integer) != (yyvsp[(3) - (3)].integer); ;} { (yyval.integer) = (yyvsp[(1) - (3)].integer) != (yyvsp[(3) - (3)].integer); }
break; break;
case 53: case 53:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 392 "dtc-parser.y" #line 392 "dtc-parser.y"
{ (yyval.integer) = (yyvsp[(1) - (3)].integer) < (yyvsp[(3) - (3)].integer); ;} { (yyval.integer) = (yyvsp[(1) - (3)].integer) < (yyvsp[(3) - (3)].integer); }
break; break;
case 54: case 54:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 393 "dtc-parser.y" #line 393 "dtc-parser.y"
{ (yyval.integer) = (yyvsp[(1) - (3)].integer) > (yyvsp[(3) - (3)].integer); ;} { (yyval.integer) = (yyvsp[(1) - (3)].integer) > (yyvsp[(3) - (3)].integer); }
break; break;
case 55: case 55:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 394 "dtc-parser.y" #line 394 "dtc-parser.y"
{ (yyval.integer) = (yyvsp[(1) - (3)].integer) <= (yyvsp[(3) - (3)].integer); ;} { (yyval.integer) = (yyvsp[(1) - (3)].integer) <= (yyvsp[(3) - (3)].integer); }
break; break;
case 56: case 56:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 395 "dtc-parser.y" #line 395 "dtc-parser.y"
{ (yyval.integer) = (yyvsp[(1) - (3)].integer) >= (yyvsp[(3) - (3)].integer); ;} { (yyval.integer) = (yyvsp[(1) - (3)].integer) >= (yyvsp[(3) - (3)].integer); }
break; break;
case 57: case 57:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 399 "dtc-parser.y" #line 399 "dtc-parser.y"
{ (yyval.integer) = (yyvsp[(1) - (3)].integer) << (yyvsp[(3) - (3)].integer); ;} { (yyval.integer) = (yyvsp[(1) - (3)].integer) << (yyvsp[(3) - (3)].integer); }
break; break;
case 58: case 58:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 400 "dtc-parser.y" #line 400 "dtc-parser.y"
{ (yyval.integer) = (yyvsp[(1) - (3)].integer) >> (yyvsp[(3) - (3)].integer); ;} { (yyval.integer) = (yyvsp[(1) - (3)].integer) >> (yyvsp[(3) - (3)].integer); }
break; break;
case 60: case 60:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 405 "dtc-parser.y" #line 405 "dtc-parser.y"
{ (yyval.integer) = (yyvsp[(1) - (3)].integer) + (yyvsp[(3) - (3)].integer); ;} { (yyval.integer) = (yyvsp[(1) - (3)].integer) + (yyvsp[(3) - (3)].integer); }
break; break;
case 61: case 61:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 406 "dtc-parser.y" #line 406 "dtc-parser.y"
{ (yyval.integer) = (yyvsp[(1) - (3)].integer) - (yyvsp[(3) - (3)].integer); ;} { (yyval.integer) = (yyvsp[(1) - (3)].integer) - (yyvsp[(3) - (3)].integer); }
break; break;
case 63: case 63:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 411 "dtc-parser.y" #line 411 "dtc-parser.y"
{ (yyval.integer) = (yyvsp[(1) - (3)].integer) * (yyvsp[(3) - (3)].integer); ;} { (yyval.integer) = (yyvsp[(1) - (3)].integer) * (yyvsp[(3) - (3)].integer); }
break; break;
case 64: case 64:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 412 "dtc-parser.y" #line 412 "dtc-parser.y"
{ (yyval.integer) = (yyvsp[(1) - (3)].integer) / (yyvsp[(3) - (3)].integer); ;} { (yyval.integer) = (yyvsp[(1) - (3)].integer) / (yyvsp[(3) - (3)].integer); }
break; break;
case 65: case 65:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 413 "dtc-parser.y" #line 413 "dtc-parser.y"
{ (yyval.integer) = (yyvsp[(1) - (3)].integer) % (yyvsp[(3) - (3)].integer); ;} { (yyval.integer) = (yyvsp[(1) - (3)].integer) % (yyvsp[(3) - (3)].integer); }
break; break;
case 68: case 68:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 419 "dtc-parser.y" #line 419 "dtc-parser.y"
{ (yyval.integer) = -(yyvsp[(2) - (2)].integer); ;} { (yyval.integer) = -(yyvsp[(2) - (2)].integer); }
break; break;
case 69: case 69:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 420 "dtc-parser.y" #line 420 "dtc-parser.y"
{ (yyval.integer) = ~(yyvsp[(2) - (2)].integer); ;} { (yyval.integer) = ~(yyvsp[(2) - (2)].integer); }
break; break;
case 70: case 70:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 421 "dtc-parser.y" #line 421 "dtc-parser.y"
{ (yyval.integer) = !(yyvsp[(2) - (2)].integer); ;} { (yyval.integer) = !(yyvsp[(2) - (2)].integer); }
break; break;
case 71: case 71:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 426 "dtc-parser.y" #line 426 "dtc-parser.y"
{ {
(yyval.data) = empty_data; (yyval.data) = empty_data;
;} }
break; break;
case 72: case 72:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 430 "dtc-parser.y" #line 430 "dtc-parser.y"
{ {
(yyval.data) = data_append_byte((yyvsp[(1) - (2)].data), (yyvsp[(2) - (2)].byte)); (yyval.data) = data_append_byte((yyvsp[(1) - (2)].data), (yyvsp[(2) - (2)].byte));
;} }
break; break;
case 73: case 73:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 434 "dtc-parser.y" #line 434 "dtc-parser.y"
{ {
(yyval.data) = data_add_marker((yyvsp[(1) - (2)].data), LABEL, (yyvsp[(2) - (2)].labelref)); (yyval.data) = data_add_marker((yyvsp[(1) - (2)].data), LABEL, (yyvsp[(2) - (2)].labelref));
;} }
break; break;
case 74: case 74:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 441 "dtc-parser.y" #line 441 "dtc-parser.y"
{ {
(yyval.nodelist) = NULL; (yyval.nodelist) = NULL;
;} }
break; break;
case 75: case 75:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 445 "dtc-parser.y" #line 445 "dtc-parser.y"
{ {
(yyval.nodelist) = chain_node((yyvsp[(1) - (2)].node), (yyvsp[(2) - (2)].nodelist)); (yyval.nodelist) = chain_node((yyvsp[(1) - (2)].node), (yyvsp[(2) - (2)].nodelist));
;} }
break; break;
case 76: case 76:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 449 "dtc-parser.y" #line 449 "dtc-parser.y"
{ {
print_error("syntax error: properties must precede subnodes"); print_error("syntax error: properties must precede subnodes");
YYERROR; YYERROR;
;} }
break; break;
case 77: case 77:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 457 "dtc-parser.y" #line 457 "dtc-parser.y"
{ {
(yyval.node) = name_node((yyvsp[(2) - (2)].node), (yyvsp[(1) - (2)].propnodename)); (yyval.node) = name_node((yyvsp[(2) - (2)].node), (yyvsp[(1) - (2)].propnodename));
;} }
break; break;
case 78: case 78:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 461 "dtc-parser.y" #line 461 "dtc-parser.y"
{ {
(yyval.node) = name_node(build_node_delete(), (yyvsp[(2) - (3)].propnodename)); (yyval.node) = name_node(build_node_delete(), (yyvsp[(2) - (3)].propnodename));
;} }
break; break;
case 79: case 79:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 465 "dtc-parser.y" #line 465 "dtc-parser.y"
{ {
add_label(&(yyvsp[(2) - (2)].node)->labels, (yyvsp[(1) - (2)].labelref)); add_label(&(yyvsp[(2) - (2)].node)->labels, (yyvsp[(1) - (2)].labelref));
(yyval.node) = (yyvsp[(2) - (2)].node); (yyval.node) = (yyvsp[(2) - (2)].node);
;} }
break; break;
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 2124 "dtc-parser.tab.c" #line 2154 "dtc-parser.tab.c"
default: break; default: break;
} }
/* User semantic actions sometimes alter yychar, and that requires
that yytoken be updated with the new translation. We take the
approach of translating immediately before every use of yytoken.
One alternative is translating here after every semantic action,
but that translation would be missed if the semantic action invokes
YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
incorrect destructor might then be invoked immediately. In the
case of YYERROR or YYBACKUP, subsequent parser actions might lead
to an incorrect destructor call or verbose syntax error message
before the lookahead is translated. */
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
YYPOPSTACK (yylen); YYPOPSTACK (yylen);
...@@ -2150,6 +2191,10 @@ yyreduce: ...@@ -2150,6 +2191,10 @@ yyreduce:
| yyerrlab -- here on detecting error | | yyerrlab -- here on detecting error |
`------------------------------------*/ `------------------------------------*/
yyerrlab: yyerrlab:
/* Make sure we have latest lookahead translation. See comments at
user semantic actions for why this is necessary. */
yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
/* If not already recovering from an error, report this error. */ /* If not already recovering from an error, report this error. */
if (!yyerrstatus) if (!yyerrstatus)
{ {
...@@ -2157,37 +2202,36 @@ yyerrlab: ...@@ -2157,37 +2202,36 @@ yyerrlab:
#if ! YYERROR_VERBOSE #if ! YYERROR_VERBOSE
yyerror (YY_("syntax error")); yyerror (YY_("syntax error"));
#else #else
# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
yyssp, yytoken)
{ {
YYSIZE_T yysize = yysyntax_error (0, yystate, yychar); char const *yymsgp = YY_("syntax error");
if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM) int yysyntax_error_status;
{ yysyntax_error_status = YYSYNTAX_ERROR;
YYSIZE_T yyalloc = 2 * yysize; if (yysyntax_error_status == 0)
if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM)) yymsgp = yymsg;
yyalloc = YYSTACK_ALLOC_MAXIMUM; else if (yysyntax_error_status == 1)
if (yymsg != yymsgbuf) {
YYSTACK_FREE (yymsg); if (yymsg != yymsgbuf)
yymsg = (char *) YYSTACK_ALLOC (yyalloc); YYSTACK_FREE (yymsg);
if (yymsg) yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
yymsg_alloc = yyalloc; if (!yymsg)
else {
{ yymsg = yymsgbuf;
yymsg = yymsgbuf; yymsg_alloc = sizeof yymsgbuf;
yymsg_alloc = sizeof yymsgbuf; yysyntax_error_status = 2;
} }
} else
{
if (0 < yysize && yysize <= yymsg_alloc) yysyntax_error_status = YYSYNTAX_ERROR;
{ yymsgp = yymsg;
(void) yysyntax_error (yymsg, yystate, yychar); }
yyerror (yymsg); }
} yyerror (yymsgp);
else if (yysyntax_error_status == 2)
{ goto yyexhaustedlab;
yyerror (YY_("syntax error"));
if (yysize != 0)
goto yyexhaustedlab;
}
} }
# undef YYSYNTAX_ERROR
#endif #endif
} }
...@@ -2246,7 +2290,7 @@ yyerrlab1: ...@@ -2246,7 +2290,7 @@ yyerrlab1:
for (;;) for (;;)
{ {
yyn = yypact[yystate]; yyn = yypact[yystate];
if (yyn != YYPACT_NINF) if (!yypact_value_is_default (yyn))
{ {
yyn += YYTERROR; yyn += YYTERROR;
if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
...@@ -2305,8 +2349,13 @@ yyexhaustedlab: ...@@ -2305,8 +2349,13 @@ yyexhaustedlab:
yyreturn: yyreturn:
if (yychar != YYEMPTY) if (yychar != YYEMPTY)
yydestruct ("Cleanup: discarding lookahead", {
yytoken, &yylval); /* Make sure we have latest lookahead translation. See comments at
user semantic actions for why this is necessary. */
yytoken = YYTRANSLATE (yychar);
yydestruct ("Cleanup: discarding lookahead",
yytoken, &yylval);
}
/* Do not reclaim the symbols of the rule which action triggered /* Do not reclaim the symbols of the rule which action triggered
this YYABORT or YYACCEPT. */ this YYABORT or YYACCEPT. */
YYPOPSTACK (yylen); YYPOPSTACK (yylen);
...@@ -2331,7 +2380,7 @@ yyreturn: ...@@ -2331,7 +2380,7 @@ yyreturn:
/* Line 1675 of yacc.c */ /* Line 2067 of yacc.c */
#line 471 "dtc-parser.y" #line 471 "dtc-parser.y"
......
/* A Bison parser, made by GNU Bison 2.5. */
/* A Bison parser, made by GNU Bison 2.4.1. */ /* Bison interface for Yacc-like parsers in C
/* Skeleton interface for Bison's Yacc-like parsers in C
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc.
Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by
...@@ -70,7 +68,7 @@ ...@@ -70,7 +68,7 @@
typedef union YYSTYPE typedef union YYSTYPE
{ {
/* Line 1676 of yacc.c */ /* Line 2068 of yacc.c */
#line 40 "dtc-parser.y" #line 40 "dtc-parser.y"
char *propnodename; char *propnodename;
...@@ -94,8 +92,8 @@ typedef union YYSTYPE ...@@ -94,8 +92,8 @@ typedef union YYSTYPE
/* Line 1676 of yacc.c */ /* Line 2068 of yacc.c */
#line 99 "dtc-parser.tab.h" #line 97 "dtc-parser.tab.h"
} YYSTYPE; } YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1 # define YYSTYPE_IS_TRIVIAL 1
# define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define yystype YYSTYPE /* obsolescent; will be withdrawn */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment