diff options
Diffstat (limited to 'scripts/dtc/dtc-parser.tab.c_shipped')
-rw-r--r-- | scripts/dtc/dtc-parser.tab.c_shipped | 715 |
1 files changed, 382 insertions, 333 deletions
diff --git a/scripts/dtc/dtc-parser.tab.c_shipped b/scripts/dtc/dtc-parser.tab.c_shipped index 4af55900a15b..ee1d8c3042fb 100644 --- a/scripts/dtc/dtc-parser.tab.c_shipped +++ b/scripts/dtc/dtc-parser.tab.c_shipped | |||
@@ -1,10 +1,8 @@ | |||
1 | /* A Bison parser, made by GNU Bison 2.5. */ | ||
1 | 2 | ||
2 | /* A Bison parser, made by GNU Bison 2.4.1. */ | 3 | /* Bison implementation for Yacc-like parsers in C |
3 | |||
4 | /* Skeleton implementation for Bison's Yacc-like parsers in C | ||
5 | 4 | ||
6 | Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 | 5 | Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc. |
7 | Free Software Foundation, Inc. | ||
8 | 6 | ||
9 | This program is free software: you can redistribute it and/or modify | 7 | This program is free software: you can redistribute it and/or modify |
10 | it under the terms of the GNU General Public License as published by | 8 | it under the terms of the GNU General Public License as published by |
@@ -46,7 +44,7 @@ | |||
46 | #define YYBISON 1 | 44 | #define YYBISON 1 |
47 | 45 | ||
48 | /* Bison version. */ | 46 | /* Bison version. */ |
49 | #define YYBISON_VERSION "2.4.1" | 47 | #define YYBISON_VERSION "2.5" |
50 | 48 | ||
51 | /* Skeleton name. */ | 49 | /* Skeleton name. */ |
52 | #define YYSKELETON_NAME "yacc.c" | 50 | #define YYSKELETON_NAME "yacc.c" |
@@ -67,7 +65,7 @@ | |||
67 | 65 | ||
68 | /* Copy the first part of user declarations. */ | 66 | /* Copy the first part of user declarations. */ |
69 | 67 | ||
70 | /* Line 189 of yacc.c */ | 68 | /* Line 268 of yacc.c */ |
71 | #line 21 "dtc-parser.y" | 69 | #line 21 "dtc-parser.y" |
72 | 70 | ||
73 | #include <stdio.h> | 71 | #include <stdio.h> |
@@ -88,8 +86,8 @@ static unsigned long long eval_literal(const char *s, int base, int bits); | |||
88 | static unsigned char eval_char_literal(const char *s); | 86 | static unsigned char eval_char_literal(const char *s); |
89 | 87 | ||
90 | 88 | ||
91 | /* Line 189 of yacc.c */ | 89 | /* Line 268 of yacc.c */ |
92 | #line 93 "dtc-parser.tab.c" | 90 | #line 91 "dtc-parser.tab.c" |
93 | 91 | ||
94 | /* Enabling traces. */ | 92 | /* Enabling traces. */ |
95 | #ifndef YYDEBUG | 93 | #ifndef YYDEBUG |
@@ -147,7 +145,7 @@ static unsigned char eval_char_literal(const char *s); | |||
147 | typedef union YYSTYPE | 145 | typedef union YYSTYPE |
148 | { | 146 | { |
149 | 147 | ||
150 | /* Line 214 of yacc.c */ | 148 | /* Line 293 of yacc.c */ |
151 | #line 40 "dtc-parser.y" | 149 | #line 40 "dtc-parser.y" |
152 | 150 | ||
153 | char *propnodename; | 151 | char *propnodename; |
@@ -171,8 +169,8 @@ typedef union YYSTYPE | |||
171 | 169 | ||
172 | 170 | ||
173 | 171 | ||
174 | /* Line 214 of yacc.c */ | 172 | /* Line 293 of yacc.c */ |
175 | #line 176 "dtc-parser.tab.c" | 173 | #line 174 "dtc-parser.tab.c" |
176 | } YYSTYPE; | 174 | } YYSTYPE; |
177 | # define YYSTYPE_IS_TRIVIAL 1 | 175 | # define YYSTYPE_IS_TRIVIAL 1 |
178 | # define yystype YYSTYPE /* obsolescent; will be withdrawn */ | 176 | # define yystype YYSTYPE /* obsolescent; will be withdrawn */ |
@@ -183,8 +181,8 @@ typedef union YYSTYPE | |||
183 | /* Copy the second part of user declarations. */ | 181 | /* Copy the second part of user declarations. */ |
184 | 182 | ||
185 | 183 | ||
186 | /* Line 264 of yacc.c */ | 184 | /* Line 343 of yacc.c */ |
187 | #line 188 "dtc-parser.tab.c" | 185 | #line 186 "dtc-parser.tab.c" |
188 | 186 | ||
189 | #ifdef short | 187 | #ifdef short |
190 | # undef short | 188 | # undef short |
@@ -234,7 +232,7 @@ typedef short int yytype_int16; | |||
234 | #define YYSIZE_MAXIMUM ((YYSIZE_T) -1) | 232 | #define YYSIZE_MAXIMUM ((YYSIZE_T) -1) |
235 | 233 | ||
236 | #ifndef YY_ | 234 | #ifndef YY_ |
237 | # if YYENABLE_NLS | 235 | # if defined YYENABLE_NLS && YYENABLE_NLS |
238 | # if ENABLE_NLS | 236 | # if ENABLE_NLS |
239 | # include <libintl.h> /* INFRINGES ON USER NAME SPACE */ | 237 | # include <libintl.h> /* INFRINGES ON USER NAME SPACE */ |
240 | # define YY_(msgid) dgettext ("bison-runtime", msgid) | 238 | # define YY_(msgid) dgettext ("bison-runtime", msgid) |
@@ -287,11 +285,11 @@ YYID (yyi) | |||
287 | # define alloca _alloca | 285 | # define alloca _alloca |
288 | # else | 286 | # else |
289 | # define YYSTACK_ALLOC alloca | 287 | # define YYSTACK_ALLOC alloca |
290 | # if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ | 288 | # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ |
291 | || defined __cplusplus || defined _MSC_VER) | 289 | || defined __cplusplus || defined _MSC_VER) |
292 | # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ | 290 | # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ |
293 | # ifndef _STDLIB_H | 291 | # ifndef EXIT_SUCCESS |
294 | # define _STDLIB_H 1 | 292 | # define EXIT_SUCCESS 0 |
295 | # endif | 293 | # endif |
296 | # endif | 294 | # endif |
297 | # endif | 295 | # endif |
@@ -314,24 +312,24 @@ YYID (yyi) | |||
314 | # ifndef YYSTACK_ALLOC_MAXIMUM | 312 | # ifndef YYSTACK_ALLOC_MAXIMUM |
315 | # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM | 313 | # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM |
316 | # endif | 314 | # endif |
317 | # if (defined __cplusplus && ! defined _STDLIB_H \ | 315 | # if (defined __cplusplus && ! defined EXIT_SUCCESS \ |
318 | && ! ((defined YYMALLOC || defined malloc) \ | 316 | && ! ((defined YYMALLOC || defined malloc) \ |
319 | && (defined YYFREE || defined free))) | 317 | && (defined YYFREE || defined free))) |
320 | # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ | 318 | # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ |
321 | # ifndef _STDLIB_H | 319 | # ifndef EXIT_SUCCESS |
322 | # define _STDLIB_H 1 | 320 | # define EXIT_SUCCESS 0 |
323 | # endif | 321 | # endif |
324 | # endif | 322 | # endif |
325 | # ifndef YYMALLOC | 323 | # ifndef YYMALLOC |
326 | # define YYMALLOC malloc | 324 | # define YYMALLOC malloc |
327 | # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ | 325 | # if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ |
328 | || defined __cplusplus || defined _MSC_VER) | 326 | || defined __cplusplus || defined _MSC_VER) |
329 | void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ | 327 | void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ |
330 | # endif | 328 | # endif |
331 | # endif | 329 | # endif |
332 | # ifndef YYFREE | 330 | # ifndef YYFREE |
333 | # define YYFREE free | 331 | # define YYFREE free |
334 | # if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ | 332 | # if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ |
335 | || defined __cplusplus || defined _MSC_VER) | 333 | || defined __cplusplus || defined _MSC_VER) |
336 | void free (void *); /* INFRINGES ON USER NAME SPACE */ | 334 | void free (void *); /* INFRINGES ON USER NAME SPACE */ |
337 | # endif | 335 | # endif |
@@ -360,23 +358,7 @@ union yyalloc | |||
360 | ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ | 358 | ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ |
361 | + YYSTACK_GAP_MAXIMUM) | 359 | + YYSTACK_GAP_MAXIMUM) |
362 | 360 | ||
363 | /* Copy COUNT objects from FROM to TO. The source and destination do | 361 | # define YYCOPY_NEEDED 1 |
364 | not overlap. */ | ||
365 | # ifndef YYCOPY | ||
366 | # if defined __GNUC__ && 1 < __GNUC__ | ||
367 | # define YYCOPY(To, From, Count) \ | ||
368 | __builtin_memcpy (To, From, (Count) * sizeof (*(From))) | ||
369 | # else | ||
370 | # define YYCOPY(To, From, Count) \ | ||
371 | do \ | ||
372 | { \ | ||
373 | YYSIZE_T yyi; \ | ||
374 | for (yyi = 0; yyi < (Count); yyi++) \ | ||
375 | (To)[yyi] = (From)[yyi]; \ | ||
376 | } \ | ||
377 | while (YYID (0)) | ||
378 | # endif | ||
379 | # endif | ||
380 | 362 | ||
381 | /* Relocate STACK from its old location to the new one. The | 363 | /* Relocate STACK from its old location to the new one. The |
382 | local variables YYSIZE and YYSTACKSIZE give the old and new number of | 364 | local variables YYSIZE and YYSTACKSIZE give the old and new number of |
@@ -396,6 +378,26 @@ union yyalloc | |||
396 | 378 | ||
397 | #endif | 379 | #endif |
398 | 380 | ||
381 | #if defined YYCOPY_NEEDED && YYCOPY_NEEDED | ||
382 | /* Copy COUNT objects from FROM to TO. The source and destination do | ||
383 | not overlap. */ | ||
384 | # ifndef YYCOPY | ||
385 | # if defined __GNUC__ && 1 < __GNUC__ | ||
386 | # define YYCOPY(To, From, Count) \ | ||
387 | __builtin_memcpy (To, From, (Count) * sizeof (*(From))) | ||
388 | # else | ||
389 | # define YYCOPY(To, From, Count) \ | ||
390 | do \ | ||
391 | { \ | ||
392 | YYSIZE_T yyi; \ | ||
393 | for (yyi = 0; yyi < (Count); yyi++) \ | ||
394 | (To)[yyi] = (From)[yyi]; \ | ||
395 | } \ | ||
396 | while (YYID (0)) | ||
397 | # endif | ||
398 | # endif | ||
399 | #endif /* !YYCOPY_NEEDED */ | ||
400 | |||
399 | /* YYFINAL -- State number of the termination state. */ | 401 | /* YYFINAL -- State number of the termination state. */ |
400 | #define YYFINAL 4 | 402 | #define YYFINAL 4 |
401 | /* YYLAST -- Last index in YYTABLE. */ | 403 | /* YYLAST -- Last index in YYTABLE. */ |
@@ -571,8 +573,8 @@ static const yytype_uint8 yyr2[] = | |||
571 | 2, 0, 2, 2, 0, 2, 2, 2, 3, 2 | 573 | 2, 0, 2, 2, 0, 2, 2, 2, 3, 2 |
572 | }; | 574 | }; |
573 | 575 | ||
574 | /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state | 576 | /* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM. |
575 | STATE-NUM when YYTABLE doesn't specify something else to do. Zero | 577 | Performed when YYTABLE doesn't specify something else to do. Zero |
576 | means the default is an error. */ | 578 | means the default is an error. */ |
577 | static const yytype_uint8 yydefact[] = | 579 | static const yytype_uint8 yydefact[] = |
578 | { | 580 | { |
@@ -633,8 +635,7 @@ static const yytype_int8 yypgoto[] = | |||
633 | 635 | ||
634 | /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If | 636 | /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If |
635 | positive, shift that token. If negative, reduce the rule which | 637 | positive, shift that token. If negative, reduce the rule which |
636 | number is the opposite. If zero, do what YYDEFACT says. | 638 | number is the opposite. If YYTABLE_NINF, syntax error. */ |
637 | If YYTABLE_NINF, syntax error. */ | ||
638 | #define YYTABLE_NINF -1 | 639 | #define YYTABLE_NINF -1 |
639 | static const yytype_uint8 yytable[] = | 640 | static const yytype_uint8 yytable[] = |
640 | { | 641 | { |
@@ -654,6 +655,12 @@ static const yytype_uint8 yytable[] = | |||
654 | 137, 0, 73, 139 | 655 | 137, 0, 73, 139 |
655 | }; | 656 | }; |
656 | 657 | ||
658 | #define yypact_value_is_default(yystate) \ | ||
659 | ((yystate) == (-78)) | ||
660 | |||
661 | #define yytable_value_is_error(yytable_value) \ | ||
662 | YYID (0) | ||
663 | |||
657 | static const yytype_int16 yycheck[] = | 664 | static const yytype_int16 yycheck[] = |
658 | { | 665 | { |
659 | 5, 38, 39, 17, 18, 19, 12, 12, 17, 18, | 666 | 5, 38, 39, 17, 18, 19, 12, 12, 17, 18, |
@@ -705,9 +712,18 @@ static const yytype_uint8 yystos[] = | |||
705 | 712 | ||
706 | /* Like YYERROR except do call yyerror. This remains here temporarily | 713 | /* Like YYERROR except do call yyerror. This remains here temporarily |
707 | to ease the transition to the new meaning of YYERROR, for GCC. | 714 | to ease the transition to the new meaning of YYERROR, for GCC. |
708 | Once GCC version 2 has supplanted version 1, this can go. */ | 715 | Once GCC version 2 has supplanted version 1, this can go. However, |
716 | YYFAIL appears to be in use. Nevertheless, it is formally deprecated | ||
717 | in Bison 2.4.2's NEWS entry, where a plan to phase it out is | ||
718 | discussed. */ | ||
709 | 719 | ||
710 | #define YYFAIL goto yyerrlab | 720 | #define YYFAIL goto yyerrlab |
721 | #if defined YYFAIL | ||
722 | /* This is here to suppress warnings from the GCC cpp's | ||
723 | -Wunused-macros. Normally we don't worry about that warning, but | ||
724 | some users do, and we want to make it easy for users to remove | ||
725 | YYFAIL uses, which will produce warnings from Bison 2.5. */ | ||
726 | #endif | ||
711 | 727 | ||
712 | #define YYRECOVERING() (!!yyerrstatus) | 728 | #define YYRECOVERING() (!!yyerrstatus) |
713 | 729 | ||
@@ -717,7 +733,6 @@ do \ | |||
717 | { \ | 733 | { \ |
718 | yychar = (Token); \ | 734 | yychar = (Token); \ |
719 | yylval = (Value); \ | 735 | yylval = (Value); \ |
720 | yytoken = YYTRANSLATE (yychar); \ | ||
721 | YYPOPSTACK (1); \ | 736 | YYPOPSTACK (1); \ |
722 | goto yybackup; \ | 737 | goto yybackup; \ |
723 | } \ | 738 | } \ |
@@ -759,19 +774,10 @@ while (YYID (0)) | |||
759 | #endif | 774 | #endif |
760 | 775 | ||
761 | 776 | ||
762 | /* YY_LOCATION_PRINT -- Print the location on the stream. | 777 | /* This macro is provided for backward compatibility. */ |
763 | This macro was not mandated originally: define only if we know | ||
764 | we won't break user code: when these are the locations we know. */ | ||
765 | 778 | ||
766 | #ifndef YY_LOCATION_PRINT | 779 | #ifndef YY_LOCATION_PRINT |
767 | # if YYLTYPE_IS_TRIVIAL | 780 | # define YY_LOCATION_PRINT(File, Loc) ((void) 0) |
768 | # define YY_LOCATION_PRINT(File, Loc) \ | ||
769 | fprintf (File, "%d.%d-%d.%d", \ | ||
770 | (Loc).first_line, (Loc).first_column, \ | ||
771 | (Loc).last_line, (Loc).last_column) | ||
772 | # else | ||
773 | # define YY_LOCATION_PRINT(File, Loc) ((void) 0) | ||
774 | # endif | ||
775 | #endif | 781 | #endif |
776 | 782 | ||
777 | 783 | ||
@@ -963,7 +969,6 @@ int yydebug; | |||
963 | # define YYMAXDEPTH 10000 | 969 | # define YYMAXDEPTH 10000 |
964 | #endif | 970 | #endif |
965 | 971 | ||
966 | |||
967 | 972 | ||
968 | #if YYERROR_VERBOSE | 973 | #if YYERROR_VERBOSE |
969 | 974 | ||
@@ -1066,115 +1071,142 @@ yytnamerr (char *yyres, const char *yystr) | |||
1066 | } | 1071 | } |
1067 | # endif | 1072 | # endif |
1068 | 1073 | ||
1069 | /* Copy into YYRESULT an error message about the unexpected token | 1074 | /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message |
1070 | YYCHAR while in state YYSTATE. Return the number of bytes copied, | 1075 | about the unexpected token YYTOKEN for the state stack whose top is |
1071 | including the terminating null byte. If YYRESULT is null, do not | 1076 | YYSSP. |
1072 | copy anything; just return the number of bytes that would be | ||
1073 | copied. As a special case, return 0 if an ordinary "syntax error" | ||
1074 | message will do. Return YYSIZE_MAXIMUM if overflow occurs during | ||
1075 | size calculation. */ | ||
1076 | static YYSIZE_T | ||
1077 | yysyntax_error (char *yyresult, int yystate, int yychar) | ||
1078 | { | ||
1079 | int yyn = yypact[yystate]; | ||
1080 | 1077 | ||
1081 | if (! (YYPACT_NINF < yyn && yyn <= YYLAST)) | 1078 | Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is |
1082 | return 0; | 1079 | not large enough to hold the message. In that case, also set |
1083 | else | 1080 | *YYMSG_ALLOC to the required number of bytes. Return 2 if the |
1081 | required number of bytes is too large to store. */ | ||
1082 | static int | ||
1083 | yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, | ||
1084 | yytype_int16 *yyssp, int yytoken) | ||
1085 | { | ||
1086 | YYSIZE_T yysize0 = yytnamerr (0, yytname[yytoken]); | ||
1087 | YYSIZE_T yysize = yysize0; | ||
1088 | YYSIZE_T yysize1; | ||
1089 | enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; | ||
1090 | /* Internationalized format string. */ | ||
1091 | const char *yyformat = 0; | ||
1092 | /* Arguments of yyformat. */ | ||
1093 | char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; | ||
1094 | /* Number of reported tokens (one for the "unexpected", one per | ||
1095 | "expected"). */ | ||
1096 | int yycount = 0; | ||
1097 | |||
1098 | /* There are many possibilities here to consider: | ||
1099 | - Assume YYFAIL is not used. It's too flawed to consider. See | ||
1100 | <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html> | ||
1101 | for details. YYERROR is fine as it does not invoke this | ||
1102 | function. | ||
1103 | - If this state is a consistent state with a default action, then | ||
1104 | the only way this function was invoked is if the default action | ||
1105 | is an error action. In that case, don't check for expected | ||
1106 | tokens because there are none. | ||
1107 | - The only way there can be no lookahead present (in yychar) is if | ||
1108 | this state is a consistent state with a default action. Thus, | ||
1109 | detecting the absence of a lookahead is sufficient to determine | ||
1110 | that there is no unexpected or expected token to report. In that | ||
1111 | case, just report a simple "syntax error". | ||
1112 | - Don't assume there isn't a lookahead just because this state is a | ||
1113 | consistent state with a default action. There might have been a | ||
1114 | previous inconsistent state, consistent state with a non-default | ||
1115 | action, or user semantic action that manipulated yychar. | ||
1116 | - Of course, the expected token list depends on states to have | ||
1117 | correct lookahead information, and it depends on the parser not | ||
1118 | to perform extra reductions after fetching a lookahead from the | ||
1119 | scanner and before detecting a syntax error. Thus, state merging | ||
1120 | (from LALR or IELR) and default reductions corrupt the expected | ||
1121 | token list. However, the list is correct for canonical LR with | ||
1122 | one exception: it will still contain any token that will not be | ||
1123 | accepted due to an error action in a later state. | ||
1124 | */ | ||
1125 | if (yytoken != YYEMPTY) | ||
1084 | { | 1126 | { |
1085 | int yytype = YYTRANSLATE (yychar); | 1127 | int yyn = yypact[*yyssp]; |
1086 | YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]); | 1128 | yyarg[yycount++] = yytname[yytoken]; |
1087 | YYSIZE_T yysize = yysize0; | 1129 | if (!yypact_value_is_default (yyn)) |
1088 | YYSIZE_T yysize1; | 1130 | { |
1089 | int yysize_overflow = 0; | 1131 | /* Start YYX at -YYN if negative to avoid negative indexes in |
1090 | enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; | 1132 | YYCHECK. In other words, skip the first -YYN actions for |
1091 | char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; | 1133 | this state because they are default actions. */ |
1092 | int yyx; | 1134 | int yyxbegin = yyn < 0 ? -yyn : 0; |
1093 | 1135 | /* Stay within bounds of both yycheck and yytname. */ | |
1094 | # if 0 | 1136 | int yychecklim = YYLAST - yyn + 1; |
1095 | /* This is so xgettext sees the translatable formats that are | 1137 | int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; |
1096 | constructed on the fly. */ | 1138 | int yyx; |
1097 | YY_("syntax error, unexpected %s"); | 1139 | |
1098 | YY_("syntax error, unexpected %s, expecting %s"); | 1140 | for (yyx = yyxbegin; yyx < yyxend; ++yyx) |
1099 | YY_("syntax error, unexpected %s, expecting %s or %s"); | 1141 | if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR |
1100 | YY_("syntax error, unexpected %s, expecting %s or %s or %s"); | 1142 | && !yytable_value_is_error (yytable[yyx + yyn])) |
1101 | YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"); | 1143 | { |
1102 | # endif | 1144 | if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) |
1103 | char *yyfmt; | 1145 | { |
1104 | char const *yyf; | 1146 | yycount = 1; |
1105 | static char const yyunexpected[] = "syntax error, unexpected %s"; | 1147 | yysize = yysize0; |
1106 | static char const yyexpecting[] = ", expecting %s"; | 1148 | break; |
1107 | static char const yyor[] = " or %s"; | 1149 | } |
1108 | char yyformat[sizeof yyunexpected | 1150 | yyarg[yycount++] = yytname[yyx]; |
1109 | + sizeof yyexpecting - 1 | 1151 | yysize1 = yysize + yytnamerr (0, yytname[yyx]); |
1110 | + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) | 1152 | if (! (yysize <= yysize1 |
1111 | * (sizeof yyor - 1))]; | 1153 | && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) |
1112 | char const *yyprefix = yyexpecting; | 1154 | return 2; |
1113 | 1155 | yysize = yysize1; | |
1114 | /* Start YYX at -YYN if negative to avoid negative indexes in | 1156 | } |
1115 | YYCHECK. */ | 1157 | } |
1116 | int yyxbegin = yyn < 0 ? -yyn : 0; | 1158 | } |
1117 | |||
1118 | /* Stay within bounds of both yycheck and yytname. */ | ||
1119 | int yychecklim = YYLAST - yyn + 1; | ||
1120 | int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; | ||
1121 | int yycount = 1; | ||
1122 | |||
1123 | yyarg[0] = yytname[yytype]; | ||
1124 | yyfmt = yystpcpy (yyformat, yyunexpected); | ||
1125 | |||
1126 | for (yyx = yyxbegin; yyx < yyxend; ++yyx) | ||
1127 | if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) | ||
1128 | { | ||
1129 | if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) | ||
1130 | { | ||
1131 | yycount = 1; | ||
1132 | yysize = yysize0; | ||
1133 | yyformat[sizeof yyunexpected - 1] = '\0'; | ||
1134 | break; | ||
1135 | } | ||
1136 | yyarg[yycount++] = yytname[yyx]; | ||
1137 | yysize1 = yysize + yytnamerr (0, yytname[yyx]); | ||
1138 | yysize_overflow |= (yysize1 < yysize); | ||
1139 | yysize = yysize1; | ||
1140 | yyfmt = yystpcpy (yyfmt, yyprefix); | ||
1141 | yyprefix = yyor; | ||
1142 | } | ||
1143 | 1159 | ||
1144 | yyf = YY_(yyformat); | 1160 | switch (yycount) |
1145 | yysize1 = yysize + yystrlen (yyf); | 1161 | { |
1146 | yysize_overflow |= (yysize1 < yysize); | 1162 | # define YYCASE_(N, S) \ |
1147 | yysize = yysize1; | 1163 | case N: \ |
1164 | yyformat = S; \ | ||
1165 | break | ||
1166 | YYCASE_(0, YY_("syntax error")); | ||
1167 | YYCASE_(1, YY_("syntax error, unexpected %s")); | ||
1168 | YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); | ||
1169 | YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); | ||
1170 | YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); | ||
1171 | YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); | ||
1172 | # undef YYCASE_ | ||
1173 | } | ||
1148 | 1174 | ||
1149 | if (yysize_overflow) | 1175 | yysize1 = yysize + yystrlen (yyformat); |
1150 | return YYSIZE_MAXIMUM; | 1176 | if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) |
1177 | return 2; | ||
1178 | yysize = yysize1; | ||
1151 | 1179 | ||
1152 | if (yyresult) | 1180 | if (*yymsg_alloc < yysize) |
1153 | { | 1181 | { |
1154 | /* Avoid sprintf, as that infringes on the user's name space. | 1182 | *yymsg_alloc = 2 * yysize; |
1155 | Don't have undefined behavior even if the translation | 1183 | if (! (yysize <= *yymsg_alloc |
1156 | produced a string with the wrong number of "%s"s. */ | 1184 | && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) |
1157 | char *yyp = yyresult; | 1185 | *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; |
1158 | int yyi = 0; | 1186 | return 1; |
1159 | while ((*yyp = *yyf) != '\0') | ||
1160 | { | ||
1161 | if (*yyp == '%' && yyf[1] == 's' && yyi < yycount) | ||
1162 | { | ||
1163 | yyp += yytnamerr (yyp, yyarg[yyi++]); | ||
1164 | yyf += 2; | ||
1165 | } | ||
1166 | else | ||
1167 | { | ||
1168 | yyp++; | ||
1169 | yyf++; | ||
1170 | } | ||
1171 | } | ||
1172 | } | ||
1173 | return yysize; | ||
1174 | } | 1187 | } |
1188 | |||
1189 | /* Avoid sprintf, as that infringes on the user's name space. | ||
1190 | Don't have undefined behavior even if the translation | ||
1191 | produced a string with the wrong number of "%s"s. */ | ||
1192 | { | ||
1193 | char *yyp = *yymsg; | ||
1194 | int yyi = 0; | ||
1195 | while ((*yyp = *yyformat) != '\0') | ||
1196 | if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) | ||
1197 | { | ||
1198 | yyp += yytnamerr (yyp, yyarg[yyi++]); | ||
1199 | yyformat += 2; | ||
1200 | } | ||
1201 | else | ||
1202 | { | ||
1203 | yyp++; | ||
1204 | yyformat++; | ||
1205 | } | ||
1206 | } | ||
1207 | return 0; | ||
1175 | } | 1208 | } |
1176 | #endif /* YYERROR_VERBOSE */ | 1209 | #endif /* YYERROR_VERBOSE */ |
1177 | |||
1178 | 1210 | ||
1179 | /*-----------------------------------------------. | 1211 | /*-----------------------------------------------. |
1180 | | Release the memory associated to this symbol. | | 1212 | | Release the memory associated to this symbol. | |
@@ -1207,6 +1239,7 @@ yydestruct (yymsg, yytype, yyvaluep) | |||
1207 | } | 1239 | } |
1208 | } | 1240 | } |
1209 | 1241 | ||
1242 | |||
1210 | /* Prevent warnings from -Wmissing-prototypes. */ | 1243 | /* Prevent warnings from -Wmissing-prototypes. */ |
1211 | #ifdef YYPARSE_PARAM | 1244 | #ifdef YYPARSE_PARAM |
1212 | #if defined __STDC__ || defined __cplusplus | 1245 | #if defined __STDC__ || defined __cplusplus |
@@ -1233,10 +1266,9 @@ YYSTYPE yylval; | |||
1233 | int yynerrs; | 1266 | int yynerrs; |
1234 | 1267 | ||
1235 | 1268 | ||
1236 | 1269 | /*----------. | |
1237 | /*-------------------------. | 1270 | | yyparse. | |
1238 | | yyparse or yypush_parse. | | 1271 | `----------*/ |
1239 | `-------------------------*/ | ||
1240 | 1272 | ||
1241 | #ifdef YYPARSE_PARAM | 1273 | #ifdef YYPARSE_PARAM |
1242 | #if (defined __STDC__ || defined __C99__FUNC__ \ | 1274 | #if (defined __STDC__ || defined __C99__FUNC__ \ |
@@ -1260,8 +1292,6 @@ yyparse () | |||
1260 | #endif | 1292 | #endif |
1261 | #endif | 1293 | #endif |
1262 | { | 1294 | { |
1263 | |||
1264 | |||
1265 | int yystate; | 1295 | int yystate; |
1266 | /* Number of tokens to shift before error messages enabled. */ | 1296 | /* Number of tokens to shift before error messages enabled. */ |
1267 | int yyerrstatus; | 1297 | int yyerrstatus; |
@@ -1416,7 +1446,7 @@ yybackup: | |||
1416 | 1446 | ||
1417 | /* First try to decide what to do without reference to lookahead token. */ | 1447 | /* First try to decide what to do without reference to lookahead token. */ |
1418 | yyn = yypact[yystate]; | 1448 | yyn = yypact[yystate]; |
1419 | if (yyn == YYPACT_NINF) | 1449 | if (yypact_value_is_default (yyn)) |
1420 | goto yydefault; | 1450 | goto yydefault; |
1421 | 1451 | ||
1422 | /* Not known => get a lookahead token if don't already have one. */ | 1452 | /* Not known => get a lookahead token if don't already have one. */ |
@@ -1447,8 +1477,8 @@ yybackup: | |||
1447 | yyn = yytable[yyn]; | 1477 | yyn = yytable[yyn]; |
1448 | if (yyn <= 0) | 1478 | if (yyn <= 0) |
1449 | { | 1479 | { |
1450 | if (yyn == 0 || yyn == YYTABLE_NINF) | 1480 | if (yytable_value_is_error (yyn)) |
1451 | goto yyerrlab; | 1481 | goto yyerrlab; |
1452 | yyn = -yyn; | 1482 | yyn = -yyn; |
1453 | goto yyreduce; | 1483 | goto yyreduce; |
1454 | } | 1484 | } |
@@ -1503,72 +1533,72 @@ yyreduce: | |||
1503 | { | 1533 | { |
1504 | case 2: | 1534 | case 2: |
1505 | 1535 | ||
1506 | /* Line 1455 of yacc.c */ | 1536 | /* Line 1806 of yacc.c */ |
1507 | #line 110 "dtc-parser.y" | 1537 | #line 110 "dtc-parser.y" |
1508 | { | 1538 | { |
1509 | the_boot_info = build_boot_info((yyvsp[(3) - (4)].re), (yyvsp[(4) - (4)].node), | 1539 | the_boot_info = build_boot_info((yyvsp[(3) - (4)].re), (yyvsp[(4) - (4)].node), |
1510 | guess_boot_cpuid((yyvsp[(4) - (4)].node))); | 1540 | guess_boot_cpuid((yyvsp[(4) - (4)].node))); |
1511 | ;} | 1541 | } |
1512 | break; | 1542 | break; |
1513 | 1543 | ||
1514 | case 3: | 1544 | case 3: |
1515 | 1545 | ||
1516 | /* Line 1455 of yacc.c */ | 1546 | /* Line 1806 of yacc.c */ |
1517 | #line 118 "dtc-parser.y" | 1547 | #line 118 "dtc-parser.y" |
1518 | { | 1548 | { |
1519 | (yyval.re) = NULL; | 1549 | (yyval.re) = NULL; |
1520 | ;} | 1550 | } |
1521 | break; | 1551 | break; |
1522 | 1552 | ||
1523 | case 4: | 1553 | case 4: |
1524 | 1554 | ||
1525 | /* Line 1455 of yacc.c */ | 1555 | /* Line 1806 of yacc.c */ |
1526 | #line 122 "dtc-parser.y" | 1556 | #line 122 "dtc-parser.y" |
1527 | { | 1557 | { |
1528 | (yyval.re) = chain_reserve_entry((yyvsp[(1) - (2)].re), (yyvsp[(2) - (2)].re)); | 1558 | (yyval.re) = chain_reserve_entry((yyvsp[(1) - (2)].re), (yyvsp[(2) - (2)].re)); |
1529 | ;} | 1559 | } |
1530 | break; | 1560 | break; |
1531 | 1561 | ||
1532 | case 5: | 1562 | case 5: |
1533 | 1563 | ||
1534 | /* Line 1455 of yacc.c */ | 1564 | /* Line 1806 of yacc.c */ |
1535 | #line 129 "dtc-parser.y" | 1565 | #line 129 "dtc-parser.y" |
1536 | { | 1566 | { |
1537 | (yyval.re) = build_reserve_entry((yyvsp[(2) - (4)].integer), (yyvsp[(3) - (4)].integer)); | 1567 | (yyval.re) = build_reserve_entry((yyvsp[(2) - (4)].integer), (yyvsp[(3) - (4)].integer)); |
1538 | ;} | 1568 | } |
1539 | break; | 1569 | break; |
1540 | 1570 | ||
1541 | case 6: | 1571 | case 6: |
1542 | 1572 | ||
1543 | /* Line 1455 of yacc.c */ | 1573 | /* Line 1806 of yacc.c */ |
1544 | #line 133 "dtc-parser.y" | 1574 | #line 133 "dtc-parser.y" |
1545 | { | 1575 | { |
1546 | add_label(&(yyvsp[(2) - (2)].re)->labels, (yyvsp[(1) - (2)].labelref)); | 1576 | add_label(&(yyvsp[(2) - (2)].re)->labels, (yyvsp[(1) - (2)].labelref)); |
1547 | (yyval.re) = (yyvsp[(2) - (2)].re); | 1577 | (yyval.re) = (yyvsp[(2) - (2)].re); |
1548 | ;} | 1578 | } |
1549 | break; | 1579 | break; |
1550 | 1580 | ||
1551 | case 7: | 1581 | case 7: |
1552 | 1582 | ||
1553 | /* Line 1455 of yacc.c */ | 1583 | /* Line 1806 of yacc.c */ |
1554 | #line 141 "dtc-parser.y" | 1584 | #line 141 "dtc-parser.y" |
1555 | { | 1585 | { |
1556 | (yyval.node) = name_node((yyvsp[(2) - (2)].node), ""); | 1586 | (yyval.node) = name_node((yyvsp[(2) - (2)].node), ""); |
1557 | ;} | 1587 | } |
1558 | break; | 1588 | break; |
1559 | 1589 | ||
1560 | case 8: | 1590 | case 8: |
1561 | 1591 | ||
1562 | /* Line 1455 of yacc.c */ | 1592 | /* Line 1806 of yacc.c */ |
1563 | #line 145 "dtc-parser.y" | 1593 | #line 145 "dtc-parser.y" |
1564 | { | 1594 | { |
1565 | (yyval.node) = merge_nodes((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); | 1595 | (yyval.node) = merge_nodes((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); |
1566 | ;} | 1596 | } |
1567 | break; | 1597 | break; |
1568 | 1598 | ||
1569 | case 9: | 1599 | case 9: |
1570 | 1600 | ||
1571 | /* Line 1455 of yacc.c */ | 1601 | /* Line 1806 of yacc.c */ |
1572 | #line 149 "dtc-parser.y" | 1602 | #line 149 "dtc-parser.y" |
1573 | { | 1603 | { |
1574 | struct node *target = get_node_by_ref((yyvsp[(1) - (3)].node), (yyvsp[(2) - (3)].labelref)); | 1604 | struct node *target = get_node_by_ref((yyvsp[(1) - (3)].node), (yyvsp[(2) - (3)].labelref)); |
@@ -1578,12 +1608,12 @@ yyreduce: | |||
1578 | else | 1608 | else |
1579 | print_error("label or path, '%s', not found", (yyvsp[(2) - (3)].labelref)); | 1609 | print_error("label or path, '%s', not found", (yyvsp[(2) - (3)].labelref)); |
1580 | (yyval.node) = (yyvsp[(1) - (3)].node); | 1610 | (yyval.node) = (yyvsp[(1) - (3)].node); |
1581 | ;} | 1611 | } |
1582 | break; | 1612 | break; |
1583 | 1613 | ||
1584 | case 10: | 1614 | case 10: |
1585 | 1615 | ||
1586 | /* Line 1455 of yacc.c */ | 1616 | /* Line 1806 of yacc.c */ |
1587 | #line 159 "dtc-parser.y" | 1617 | #line 159 "dtc-parser.y" |
1588 | { | 1618 | { |
1589 | struct node *target = get_node_by_ref((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].labelref)); | 1619 | struct node *target = get_node_by_ref((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].labelref)); |
@@ -1594,112 +1624,112 @@ yyreduce: | |||
1594 | delete_node(target); | 1624 | delete_node(target); |
1595 | 1625 | ||
1596 | (yyval.node) = (yyvsp[(1) - (4)].node); | 1626 | (yyval.node) = (yyvsp[(1) - (4)].node); |
1597 | ;} | 1627 | } |
1598 | break; | 1628 | break; |
1599 | 1629 | ||
1600 | case 11: | 1630 | case 11: |
1601 | 1631 | ||
1602 | /* Line 1455 of yacc.c */ | 1632 | /* Line 1806 of yacc.c */ |
1603 | #line 173 "dtc-parser.y" | 1633 | #line 173 "dtc-parser.y" |
1604 | { | 1634 | { |
1605 | (yyval.node) = build_node((yyvsp[(2) - (5)].proplist), (yyvsp[(3) - (5)].nodelist)); | 1635 | (yyval.node) = build_node((yyvsp[(2) - (5)].proplist), (yyvsp[(3) - (5)].nodelist)); |
1606 | ;} | 1636 | } |
1607 | break; | 1637 | break; |
1608 | 1638 | ||
1609 | case 12: | 1639 | case 12: |
1610 | 1640 | ||
1611 | /* Line 1455 of yacc.c */ | 1641 | /* Line 1806 of yacc.c */ |
1612 | #line 180 "dtc-parser.y" | 1642 | #line 180 "dtc-parser.y" |
1613 | { | 1643 | { |
1614 | (yyval.proplist) = NULL; | 1644 | (yyval.proplist) = NULL; |
1615 | ;} | 1645 | } |
1616 | break; | 1646 | break; |
1617 | 1647 | ||
1618 | case 13: | 1648 | case 13: |
1619 | 1649 | ||
1620 | /* Line 1455 of yacc.c */ | 1650 | /* Line 1806 of yacc.c */ |
1621 | #line 184 "dtc-parser.y" | 1651 | #line 184 "dtc-parser.y" |
1622 | { | 1652 | { |
1623 | (yyval.proplist) = chain_property((yyvsp[(2) - (2)].prop), (yyvsp[(1) - (2)].proplist)); | 1653 | (yyval.proplist) = chain_property((yyvsp[(2) - (2)].prop), (yyvsp[(1) - (2)].proplist)); |
1624 | ;} | 1654 | } |
1625 | break; | 1655 | break; |
1626 | 1656 | ||
1627 | case 14: | 1657 | case 14: |
1628 | 1658 | ||
1629 | /* Line 1455 of yacc.c */ | 1659 | /* Line 1806 of yacc.c */ |
1630 | #line 191 "dtc-parser.y" | 1660 | #line 191 "dtc-parser.y" |
1631 | { | 1661 | { |
1632 | (yyval.prop) = build_property((yyvsp[(1) - (4)].propnodename), (yyvsp[(3) - (4)].data)); | 1662 | (yyval.prop) = build_property((yyvsp[(1) - (4)].propnodename), (yyvsp[(3) - (4)].data)); |
1633 | ;} | 1663 | } |
1634 | break; | 1664 | break; |
1635 | 1665 | ||
1636 | case 15: | 1666 | case 15: |
1637 | 1667 | ||
1638 | /* Line 1455 of yacc.c */ | 1668 | /* Line 1806 of yacc.c */ |
1639 | #line 195 "dtc-parser.y" | 1669 | #line 195 "dtc-parser.y" |
1640 | { | 1670 | { |
1641 | (yyval.prop) = build_property((yyvsp[(1) - (2)].propnodename), empty_data); | 1671 | (yyval.prop) = build_property((yyvsp[(1) - (2)].propnodename), empty_data); |
1642 | ;} | 1672 | } |
1643 | break; | 1673 | break; |
1644 | 1674 | ||
1645 | case 16: | 1675 | case 16: |
1646 | 1676 | ||
1647 | /* Line 1455 of yacc.c */ | 1677 | /* Line 1806 of yacc.c */ |
1648 | #line 199 "dtc-parser.y" | 1678 | #line 199 "dtc-parser.y" |
1649 | { | 1679 | { |
1650 | (yyval.prop) = build_property_delete((yyvsp[(2) - (3)].propnodename)); | 1680 | (yyval.prop) = build_property_delete((yyvsp[(2) - (3)].propnodename)); |
1651 | ;} | 1681 | } |
1652 | break; | 1682 | break; |
1653 | 1683 | ||
1654 | case 17: | 1684 | case 17: |
1655 | 1685 | ||
1656 | /* Line 1455 of yacc.c */ | 1686 | /* Line 1806 of yacc.c */ |
1657 | #line 203 "dtc-parser.y" | 1687 | #line 203 "dtc-parser.y" |
1658 | { | 1688 | { |
1659 | add_label(&(yyvsp[(2) - (2)].prop)->labels, (yyvsp[(1) - (2)].labelref)); | 1689 | add_label(&(yyvsp[(2) - (2)].prop)->labels, (yyvsp[(1) - (2)].labelref)); |
1660 | (yyval.prop) = (yyvsp[(2) - (2)].prop); | 1690 | (yyval.prop) = (yyvsp[(2) - (2)].prop); |
1661 | ;} | 1691 | } |
1662 | break; | 1692 | break; |
1663 | 1693 | ||
1664 | case 18: | 1694 | case 18: |
1665 | 1695 | ||
1666 | /* Line 1455 of yacc.c */ | 1696 | /* Line 1806 of yacc.c */ |
1667 | #line 211 "dtc-parser.y" | 1697 | #line 211 "dtc-parser.y" |
1668 | { | 1698 | { |
1669 | (yyval.data) = data_merge((yyvsp[(1) - (2)].data), (yyvsp[(2) - (2)].data)); | 1699 | (yyval.data) = data_merge((yyvsp[(1) - (2)].data), (yyvsp[(2) - (2)].data)); |
1670 | ;} | 1700 | } |
1671 | break; | 1701 | break; |
1672 | 1702 | ||
1673 | case 19: | 1703 | case 19: |
1674 | 1704 | ||
1675 | /* Line 1455 of yacc.c */ | 1705 | /* Line 1806 of yacc.c */ |
1676 | #line 215 "dtc-parser.y" | 1706 | #line 215 "dtc-parser.y" |
1677 | { | 1707 | { |
1678 | (yyval.data) = data_merge((yyvsp[(1) - (3)].data), (yyvsp[(2) - (3)].array).data); | 1708 | (yyval.data) = data_merge((yyvsp[(1) - (3)].data), (yyvsp[(2) - (3)].array).data); |
1679 | ;} | 1709 | } |
1680 | break; | 1710 | break; |
1681 | 1711 | ||
1682 | case 20: | 1712 | case 20: |
1683 | 1713 | ||
1684 | /* Line 1455 of yacc.c */ | 1714 | /* Line 1806 of yacc.c */ |
1685 | #line 219 "dtc-parser.y" | 1715 | #line 219 "dtc-parser.y" |
1686 | { | 1716 | { |
1687 | (yyval.data) = data_merge((yyvsp[(1) - (4)].data), (yyvsp[(3) - (4)].data)); | 1717 | (yyval.data) = data_merge((yyvsp[(1) - (4)].data), (yyvsp[(3) - (4)].data)); |
1688 | ;} | 1718 | } |
1689 | break; | 1719 | break; |
1690 | 1720 | ||
1691 | case 21: | 1721 | case 21: |
1692 | 1722 | ||
1693 | /* Line 1455 of yacc.c */ | 1723 | /* Line 1806 of yacc.c */ |
1694 | #line 223 "dtc-parser.y" | 1724 | #line 223 "dtc-parser.y" |
1695 | { | 1725 | { |
1696 | (yyval.data) = data_add_marker((yyvsp[(1) - (2)].data), REF_PATH, (yyvsp[(2) - (2)].labelref)); | 1726 | (yyval.data) = data_add_marker((yyvsp[(1) - (2)].data), REF_PATH, (yyvsp[(2) - (2)].labelref)); |
1697 | ;} | 1727 | } |
1698 | break; | 1728 | break; |
1699 | 1729 | ||
1700 | case 22: | 1730 | case 22: |
1701 | 1731 | ||
1702 | /* Line 1455 of yacc.c */ | 1732 | /* Line 1806 of yacc.c */ |
1703 | #line 227 "dtc-parser.y" | 1733 | #line 227 "dtc-parser.y" |
1704 | { | 1734 | { |
1705 | FILE *f = srcfile_relative_open((yyvsp[(4) - (9)].data).val, NULL); | 1735 | FILE *f = srcfile_relative_open((yyvsp[(4) - (9)].data).val, NULL); |
@@ -1716,12 +1746,12 @@ yyreduce: | |||
1716 | 1746 | ||
1717 | (yyval.data) = data_merge((yyvsp[(1) - (9)].data), d); | 1747 | (yyval.data) = data_merge((yyvsp[(1) - (9)].data), d); |
1718 | fclose(f); | 1748 | fclose(f); |
1719 | ;} | 1749 | } |
1720 | break; | 1750 | break; |
1721 | 1751 | ||
1722 | case 23: | 1752 | case 23: |
1723 | 1753 | ||
1724 | /* Line 1455 of yacc.c */ | 1754 | /* Line 1806 of yacc.c */ |
1725 | #line 244 "dtc-parser.y" | 1755 | #line 244 "dtc-parser.y" |
1726 | { | 1756 | { |
1727 | FILE *f = srcfile_relative_open((yyvsp[(4) - (5)].data).val, NULL); | 1757 | FILE *f = srcfile_relative_open((yyvsp[(4) - (5)].data).val, NULL); |
@@ -1731,48 +1761,48 @@ yyreduce: | |||
1731 | 1761 | ||
1732 | (yyval.data) = data_merge((yyvsp[(1) - (5)].data), d); | 1762 | (yyval.data) = data_merge((yyvsp[(1) - (5)].data), d); |
1733 | fclose(f); | 1763 | fclose(f); |
1734 | ;} | 1764 | } |
1735 | break; | 1765 | break; |
1736 | 1766 | ||
1737 | case 24: | 1767 | case 24: |
1738 | 1768 | ||
1739 | /* Line 1455 of yacc.c */ | 1769 | /* Line 1806 of yacc.c */ |
1740 | #line 254 "dtc-parser.y" | 1770 | #line 254 "dtc-parser.y" |
1741 | { | 1771 | { |
1742 | (yyval.data) = data_add_marker((yyvsp[(1) - (2)].data), LABEL, (yyvsp[(2) - (2)].labelref)); | 1772 | (yyval.data) = data_add_marker((yyvsp[(1) - (2)].data), LABEL, (yyvsp[(2) - (2)].labelref)); |
1743 | ;} | 1773 | } |
1744 | break; | 1774 | break; |
1745 | 1775 | ||
1746 | case 25: | 1776 | case 25: |
1747 | 1777 | ||
1748 | /* Line 1455 of yacc.c */ | 1778 | /* Line 1806 of yacc.c */ |
1749 | #line 261 "dtc-parser.y" | 1779 | #line 261 "dtc-parser.y" |
1750 | { | 1780 | { |
1751 | (yyval.data) = empty_data; | 1781 | (yyval.data) = empty_data; |
1752 | ;} | 1782 | } |
1753 | break; | 1783 | break; |
1754 | 1784 | ||
1755 | case 26: | 1785 | case 26: |
1756 | 1786 | ||
1757 | /* Line 1455 of yacc.c */ | 1787 | /* Line 1806 of yacc.c */ |
1758 | #line 265 "dtc-parser.y" | 1788 | #line 265 "dtc-parser.y" |
1759 | { | 1789 | { |
1760 | (yyval.data) = (yyvsp[(1) - (2)].data); | 1790 | (yyval.data) = (yyvsp[(1) - (2)].data); |
1761 | ;} | 1791 | } |
1762 | break; | 1792 | break; |
1763 | 1793 | ||
1764 | case 27: | 1794 | case 27: |
1765 | 1795 | ||
1766 | /* Line 1455 of yacc.c */ | 1796 | /* Line 1806 of yacc.c */ |
1767 | #line 269 "dtc-parser.y" | 1797 | #line 269 "dtc-parser.y" |
1768 | { | 1798 | { |
1769 | (yyval.data) = data_add_marker((yyvsp[(1) - (2)].data), LABEL, (yyvsp[(2) - (2)].labelref)); | 1799 | (yyval.data) = data_add_marker((yyvsp[(1) - (2)].data), LABEL, (yyvsp[(2) - (2)].labelref)); |
1770 | ;} | 1800 | } |
1771 | break; | 1801 | break; |
1772 | 1802 | ||
1773 | case 28: | 1803 | case 28: |
1774 | 1804 | ||
1775 | /* Line 1455 of yacc.c */ | 1805 | /* Line 1806 of yacc.c */ |
1776 | #line 276 "dtc-parser.y" | 1806 | #line 276 "dtc-parser.y" |
1777 | { | 1807 | { |
1778 | (yyval.array).data = empty_data; | 1808 | (yyval.array).data = empty_data; |
@@ -1787,22 +1817,22 @@ yyreduce: | |||
1787 | " are currently supported"); | 1817 | " are currently supported"); |
1788 | (yyval.array).bits = 32; | 1818 | (yyval.array).bits = 32; |
1789 | } | 1819 | } |
1790 | ;} | 1820 | } |
1791 | break; | 1821 | break; |
1792 | 1822 | ||
1793 | case 29: | 1823 | case 29: |
1794 | 1824 | ||
1795 | /* Line 1455 of yacc.c */ | 1825 | /* Line 1806 of yacc.c */ |
1796 | #line 291 "dtc-parser.y" | 1826 | #line 291 "dtc-parser.y" |
1797 | { | 1827 | { |
1798 | (yyval.array).data = empty_data; | 1828 | (yyval.array).data = empty_data; |
1799 | (yyval.array).bits = 32; | 1829 | (yyval.array).bits = 32; |
1800 | ;} | 1830 | } |
1801 | break; | 1831 | break; |
1802 | 1832 | ||
1803 | case 30: | 1833 | case 30: |
1804 | 1834 | ||
1805 | /* Line 1455 of yacc.c */ | 1835 | /* Line 1806 of yacc.c */ |
1806 | #line 296 "dtc-parser.y" | 1836 | #line 296 "dtc-parser.y" |
1807 | { | 1837 | { |
1808 | if ((yyvsp[(1) - (2)].array).bits < 64) { | 1838 | if ((yyvsp[(1) - (2)].array).bits < 64) { |
@@ -1822,12 +1852,12 @@ yyreduce: | |||
1822 | } | 1852 | } |
1823 | 1853 | ||
1824 | (yyval.array).data = data_append_integer((yyvsp[(1) - (2)].array).data, (yyvsp[(2) - (2)].integer), (yyvsp[(1) - (2)].array).bits); | 1854 | (yyval.array).data = data_append_integer((yyvsp[(1) - (2)].array).data, (yyvsp[(2) - (2)].integer), (yyvsp[(1) - (2)].array).bits); |
1825 | ;} | 1855 | } |
1826 | break; | 1856 | break; |
1827 | 1857 | ||
1828 | case 31: | 1858 | case 31: |
1829 | 1859 | ||
1830 | /* Line 1455 of yacc.c */ | 1860 | /* Line 1806 of yacc.c */ |
1831 | #line 316 "dtc-parser.y" | 1861 | #line 316 "dtc-parser.y" |
1832 | { | 1862 | { |
1833 | uint64_t val = ~0ULL >> (64 - (yyvsp[(1) - (2)].array).bits); | 1863 | uint64_t val = ~0ULL >> (64 - (yyvsp[(1) - (2)].array).bits); |
@@ -1841,288 +1871,299 @@ yyreduce: | |||
1841 | "arrays with 32-bit elements."); | 1871 | "arrays with 32-bit elements."); |
1842 | 1872 | ||
1843 | (yyval.array).data = data_append_integer((yyvsp[(1) - (2)].array).data, val, (yyvsp[(1) - (2)].array).bits); | 1873 | (yyval.array).data = data_append_integer((yyvsp[(1) - (2)].array).data, val, (yyvsp[(1) - (2)].array).bits); |
1844 | ;} | 1874 | } |
1845 | break; | 1875 | break; |
1846 | 1876 | ||
1847 | case 32: | 1877 | case 32: |
1848 | 1878 | ||
1849 | /* Line 1455 of yacc.c */ | 1879 | /* Line 1806 of yacc.c */ |
1850 | #line 330 "dtc-parser.y" | 1880 | #line 330 "dtc-parser.y" |
1851 | { | 1881 | { |
1852 | (yyval.array).data = data_add_marker((yyvsp[(1) - (2)].array).data, LABEL, (yyvsp[(2) - (2)].labelref)); | 1882 | (yyval.array).data = data_add_marker((yyvsp[(1) - (2)].array).data, LABEL, (yyvsp[(2) - (2)].labelref)); |
1853 | ;} | 1883 | } |
1854 | break; | 1884 | break; |
1855 | 1885 | ||
1856 | case 33: | 1886 | case 33: |
1857 | 1887 | ||
1858 | /* Line 1455 of yacc.c */ | 1888 | /* Line 1806 of yacc.c */ |
1859 | #line 337 "dtc-parser.y" | 1889 | #line 337 "dtc-parser.y" |
1860 | { | 1890 | { |
1861 | (yyval.integer) = eval_literal((yyvsp[(1) - (1)].literal), 0, 64); | 1891 | (yyval.integer) = eval_literal((yyvsp[(1) - (1)].literal), 0, 64); |
1862 | ;} | 1892 | } |
1863 | break; | 1893 | break; |
1864 | 1894 | ||
1865 | case 34: | 1895 | case 34: |
1866 | 1896 | ||
1867 | /* Line 1455 of yacc.c */ | 1897 | /* Line 1806 of yacc.c */ |
1868 | #line 341 "dtc-parser.y" | 1898 | #line 341 "dtc-parser.y" |
1869 | { | 1899 | { |
1870 | (yyval.integer) = eval_char_literal((yyvsp[(1) - (1)].literal)); | 1900 | (yyval.integer) = eval_char_literal((yyvsp[(1) - (1)].literal)); |
1871 | ;} | 1901 | } |
1872 | break; | 1902 | break; |
1873 | 1903 | ||
1874 | case 35: | 1904 | case 35: |
1875 | 1905 | ||
1876 | /* Line 1455 of yacc.c */ | 1906 | /* Line 1806 of yacc.c */ |
1877 | #line 345 "dtc-parser.y" | 1907 | #line 345 "dtc-parser.y" |
1878 | { | 1908 | { |
1879 | (yyval.integer) = (yyvsp[(2) - (3)].integer); | 1909 | (yyval.integer) = (yyvsp[(2) - (3)].integer); |
1880 | ;} | 1910 | } |
1881 | break; | 1911 | break; |
1882 | 1912 | ||
1883 | case 38: | 1913 | case 38: |
1884 | 1914 | ||
1885 | /* Line 1455 of yacc.c */ | 1915 | /* Line 1806 of yacc.c */ |
1886 | #line 356 "dtc-parser.y" | 1916 | #line 356 "dtc-parser.y" |
1887 | { (yyval.integer) = (yyvsp[(1) - (5)].integer) ? (yyvsp[(3) - (5)].integer) : (yyvsp[(5) - (5)].integer); ;} | 1917 | { (yyval.integer) = (yyvsp[(1) - (5)].integer) ? (yyvsp[(3) - (5)].integer) : (yyvsp[(5) - (5)].integer); } |
1888 | break; | 1918 | break; |
1889 | 1919 | ||
1890 | case 40: | 1920 | case 40: |
1891 | 1921 | ||
1892 | /* Line 1455 of yacc.c */ | 1922 | /* Line 1806 of yacc.c */ |
1893 | #line 361 "dtc-parser.y" | 1923 | #line 361 "dtc-parser.y" |
1894 | { (yyval.integer) = (yyvsp[(1) - (3)].integer) || (yyvsp[(3) - (3)].integer); ;} | 1924 | { (yyval.integer) = (yyvsp[(1) - (3)].integer) || (yyvsp[(3) - (3)].integer); } |
1895 | break; | 1925 | break; |
1896 | 1926 | ||
1897 | case 42: | 1927 | case 42: |
1898 | 1928 | ||
1899 | /* Line 1455 of yacc.c */ | 1929 | /* Line 1806 of yacc.c */ |
1900 | #line 366 "dtc-parser.y" | 1930 | #line 366 "dtc-parser.y" |
1901 | { (yyval.integer) = (yyvsp[(1) - (3)].integer) && (yyvsp[(3) - (3)].integer); ;} | 1931 | { (yyval.integer) = (yyvsp[(1) - (3)].integer) && (yyvsp[(3) - (3)].integer); } |
1902 | break; | 1932 | break; |
1903 | 1933 | ||
1904 | case 44: | 1934 | case 44: |
1905 | 1935 | ||
1906 | /* Line 1455 of yacc.c */ | 1936 | /* Line 1806 of yacc.c */ |
1907 | #line 371 "dtc-parser.y" | 1937 | #line 371 "dtc-parser.y" |
1908 | { (yyval.integer) = (yyvsp[(1) - (3)].integer) | (yyvsp[(3) - (3)].integer); ;} | 1938 | { (yyval.integer) = (yyvsp[(1) - (3)].integer) | (yyvsp[(3) - (3)].integer); } |
1909 | break; | 1939 | break; |
1910 | 1940 | ||
1911 | case 46: | 1941 | case 46: |
1912 | 1942 | ||
1913 | /* Line 1455 of yacc.c */ | 1943 | /* Line 1806 of yacc.c */ |
1914 | #line 376 "dtc-parser.y" | 1944 | #line 376 "dtc-parser.y" |
1915 | { (yyval.integer) = (yyvsp[(1) - (3)].integer) ^ (yyvsp[(3) - (3)].integer); ;} | 1945 | { (yyval.integer) = (yyvsp[(1) - (3)].integer) ^ (yyvsp[(3) - (3)].integer); } |
1916 | break; | 1946 | break; |
1917 | 1947 | ||
1918 | case 48: | 1948 | case 48: |
1919 | 1949 | ||
1920 | /* Line 1455 of yacc.c */ | 1950 | /* Line 1806 of yacc.c */ |
1921 | #line 381 "dtc-parser.y" | 1951 | #line 381 "dtc-parser.y" |
1922 | { (yyval.integer) = (yyvsp[(1) - (3)].integer) & (yyvsp[(3) - (3)].integer); ;} | 1952 | { (yyval.integer) = (yyvsp[(1) - (3)].integer) & (yyvsp[(3) - (3)].integer); } |
1923 | break; | 1953 | break; |
1924 | 1954 | ||
1925 | case 50: | 1955 | case 50: |
1926 | 1956 | ||
1927 | /* Line 1455 of yacc.c */ | 1957 | /* Line 1806 of yacc.c */ |
1928 | #line 386 "dtc-parser.y" | 1958 | #line 386 "dtc-parser.y" |
1929 | { (yyval.integer) = (yyvsp[(1) - (3)].integer) == (yyvsp[(3) - (3)].integer); ;} | 1959 | { (yyval.integer) = (yyvsp[(1) - (3)].integer) == (yyvsp[(3) - (3)].integer); } |
1930 | break; | 1960 | break; |
1931 | 1961 | ||
1932 | case 51: | 1962 | case 51: |
1933 | 1963 | ||
1934 | /* Line 1455 of yacc.c */ | 1964 | /* Line 1806 of yacc.c */ |
1935 | #line 387 "dtc-parser.y" | 1965 | #line 387 "dtc-parser.y" |
1936 | { (yyval.integer) = (yyvsp[(1) - (3)].integer) != (yyvsp[(3) - (3)].integer); ;} | 1966 | { (yyval.integer) = (yyvsp[(1) - (3)].integer) != (yyvsp[(3) - (3)].integer); } |
1937 | break; | 1967 | break; |
1938 | 1968 | ||
1939 | case 53: | 1969 | case 53: |
1940 | 1970 | ||
1941 | /* Line 1455 of yacc.c */ | 1971 | /* Line 1806 of yacc.c */ |
1942 | #line 392 "dtc-parser.y" | 1972 | #line 392 "dtc-parser.y" |
1943 | { (yyval.integer) = (yyvsp[(1) - (3)].integer) < (yyvsp[(3) - (3)].integer); ;} | 1973 | { (yyval.integer) = (yyvsp[(1) - (3)].integer) < (yyvsp[(3) - (3)].integer); } |
1944 | break; | 1974 | break; |
1945 | 1975 | ||
1946 | case 54: | 1976 | case 54: |
1947 | 1977 | ||
1948 | /* Line 1455 of yacc.c */ | 1978 | /* Line 1806 of yacc.c */ |
1949 | #line 393 "dtc-parser.y" | 1979 | #line 393 "dtc-parser.y" |
1950 | { (yyval.integer) = (yyvsp[(1) - (3)].integer) > (yyvsp[(3) - (3)].integer); ;} | 1980 | { (yyval.integer) = (yyvsp[(1) - (3)].integer) > (yyvsp[(3) - (3)].integer); } |
1951 | break; | 1981 | break; |
1952 | 1982 | ||
1953 | case 55: | 1983 | case 55: |
1954 | 1984 | ||
1955 | /* Line 1455 of yacc.c */ | 1985 | /* Line 1806 of yacc.c */ |
1956 | #line 394 "dtc-parser.y" | 1986 | #line 394 "dtc-parser.y" |
1957 | { (yyval.integer) = (yyvsp[(1) - (3)].integer) <= (yyvsp[(3) - (3)].integer); ;} | 1987 | { (yyval.integer) = (yyvsp[(1) - (3)].integer) <= (yyvsp[(3) - (3)].integer); } |
1958 | break; | 1988 | break; |
1959 | 1989 | ||
1960 | case 56: | 1990 | case 56: |
1961 | 1991 | ||
1962 | /* Line 1455 of yacc.c */ | 1992 | /* Line 1806 of yacc.c */ |
1963 | #line 395 "dtc-parser.y" | 1993 | #line 395 "dtc-parser.y" |
1964 | { (yyval.integer) = (yyvsp[(1) - (3)].integer) >= (yyvsp[(3) - (3)].integer); ;} | 1994 | { (yyval.integer) = (yyvsp[(1) - (3)].integer) >= (yyvsp[(3) - (3)].integer); } |
1965 | break; | 1995 | break; |
1966 | 1996 | ||
1967 | case 57: | 1997 | case 57: |
1968 | 1998 | ||
1969 | /* Line 1455 of yacc.c */ | 1999 | /* Line 1806 of yacc.c */ |
1970 | #line 399 "dtc-parser.y" | 2000 | #line 399 "dtc-parser.y" |
1971 | { (yyval.integer) = (yyvsp[(1) - (3)].integer) << (yyvsp[(3) - (3)].integer); ;} | 2001 | { (yyval.integer) = (yyvsp[(1) - (3)].integer) << (yyvsp[(3) - (3)].integer); } |
1972 | break; | 2002 | break; |
1973 | 2003 | ||
1974 | case 58: | 2004 | case 58: |
1975 | 2005 | ||
1976 | /* Line 1455 of yacc.c */ | 2006 | /* Line 1806 of yacc.c */ |
1977 | #line 400 "dtc-parser.y" | 2007 | #line 400 "dtc-parser.y" |
1978 | { (yyval.integer) = (yyvsp[(1) - (3)].integer) >> (yyvsp[(3) - (3)].integer); ;} | 2008 | { (yyval.integer) = (yyvsp[(1) - (3)].integer) >> (yyvsp[(3) - (3)].integer); } |
1979 | break; | 2009 | break; |
1980 | 2010 | ||
1981 | case 60: | 2011 | case 60: |
1982 | 2012 | ||
1983 | /* Line 1455 of yacc.c */ | 2013 | /* Line 1806 of yacc.c */ |
1984 | #line 405 "dtc-parser.y" | 2014 | #line 405 "dtc-parser.y" |
1985 | { (yyval.integer) = (yyvsp[(1) - (3)].integer) + (yyvsp[(3) - (3)].integer); ;} | 2015 | { (yyval.integer) = (yyvsp[(1) - (3)].integer) + (yyvsp[(3) - (3)].integer); } |
1986 | break; | 2016 | break; |
1987 | 2017 | ||
1988 | case 61: | 2018 | case 61: |
1989 | 2019 | ||
1990 | /* Line 1455 of yacc.c */ | 2020 | /* Line 1806 of yacc.c */ |
1991 | #line 406 "dtc-parser.y" | 2021 | #line 406 "dtc-parser.y" |
1992 | { (yyval.integer) = (yyvsp[(1) - (3)].integer) - (yyvsp[(3) - (3)].integer); ;} | 2022 | { (yyval.integer) = (yyvsp[(1) - (3)].integer) - (yyvsp[(3) - (3)].integer); } |
1993 | break; | 2023 | break; |
1994 | 2024 | ||
1995 | case 63: | 2025 | case 63: |
1996 | 2026 | ||
1997 | /* Line 1455 of yacc.c */ | 2027 | /* Line 1806 of yacc.c */ |
1998 | #line 411 "dtc-parser.y" | 2028 | #line 411 "dtc-parser.y" |
1999 | { (yyval.integer) = (yyvsp[(1) - (3)].integer) * (yyvsp[(3) - (3)].integer); ;} | 2029 | { (yyval.integer) = (yyvsp[(1) - (3)].integer) * (yyvsp[(3) - (3)].integer); } |
2000 | break; | 2030 | break; |
2001 | 2031 | ||
2002 | case 64: | 2032 | case 64: |
2003 | 2033 | ||
2004 | /* Line 1455 of yacc.c */ | 2034 | /* Line 1806 of yacc.c */ |
2005 | #line 412 "dtc-parser.y" | 2035 | #line 412 "dtc-parser.y" |
2006 | { (yyval.integer) = (yyvsp[(1) - (3)].integer) / (yyvsp[(3) - (3)].integer); ;} | 2036 | { (yyval.integer) = (yyvsp[(1) - (3)].integer) / (yyvsp[(3) - (3)].integer); } |
2007 | break; | 2037 | break; |
2008 | 2038 | ||
2009 | case 65: | 2039 | case 65: |
2010 | 2040 | ||
2011 | /* Line 1455 of yacc.c */ | 2041 | /* Line 1806 of yacc.c */ |
2012 | #line 413 "dtc-parser.y" | 2042 | #line 413 "dtc-parser.y" |
2013 | { (yyval.integer) = (yyvsp[(1) - (3)].integer) % (yyvsp[(3) - (3)].integer); ;} | 2043 | { (yyval.integer) = (yyvsp[(1) - (3)].integer) % (yyvsp[(3) - (3)].integer); } |
2014 | break; | 2044 | break; |
2015 | 2045 | ||
2016 | case 68: | 2046 | case 68: |
2017 | 2047 | ||
2018 | /* Line 1455 of yacc.c */ | 2048 | /* Line 1806 of yacc.c */ |
2019 | #line 419 "dtc-parser.y" | 2049 | #line 419 "dtc-parser.y" |
2020 | { (yyval.integer) = -(yyvsp[(2) - (2)].integer); ;} | 2050 | { (yyval.integer) = -(yyvsp[(2) - (2)].integer); } |
2021 | break; | 2051 | break; |
2022 | 2052 | ||
2023 | case 69: | 2053 | case 69: |
2024 | 2054 | ||
2025 | /* Line 1455 of yacc.c */ | 2055 | /* Line 1806 of yacc.c */ |
2026 | #line 420 "dtc-parser.y" | 2056 | #line 420 "dtc-parser.y" |
2027 | { (yyval.integer) = ~(yyvsp[(2) - (2)].integer); ;} | 2057 | { (yyval.integer) = ~(yyvsp[(2) - (2)].integer); } |
2028 | break; | 2058 | break; |
2029 | 2059 | ||
2030 | case 70: | 2060 | case 70: |
2031 | 2061 | ||
2032 | /* Line 1455 of yacc.c */ | 2062 | /* Line 1806 of yacc.c */ |
2033 | #line 421 "dtc-parser.y" | 2063 | #line 421 "dtc-parser.y" |
2034 | { (yyval.integer) = !(yyvsp[(2) - (2)].integer); ;} | 2064 | { (yyval.integer) = !(yyvsp[(2) - (2)].integer); } |
2035 | break; | 2065 | break; |
2036 | 2066 | ||
2037 | case 71: | 2067 | case 71: |
2038 | 2068 | ||
2039 | /* Line 1455 of yacc.c */ | 2069 | /* Line 1806 of yacc.c */ |
2040 | #line 426 "dtc-parser.y" | 2070 | #line 426 "dtc-parser.y" |
2041 | { | 2071 | { |
2042 | (yyval.data) = empty_data; | 2072 | (yyval.data) = empty_data; |
2043 | ;} | 2073 | } |
2044 | break; | 2074 | break; |
2045 | 2075 | ||
2046 | case 72: | 2076 | case 72: |
2047 | 2077 | ||
2048 | /* Line 1455 of yacc.c */ | 2078 | /* Line 1806 of yacc.c */ |
2049 | #line 430 "dtc-parser.y" | 2079 | #line 430 "dtc-parser.y" |
2050 | { | 2080 | { |
2051 | (yyval.data) = data_append_byte((yyvsp[(1) - (2)].data), (yyvsp[(2) - (2)].byte)); | 2081 | (yyval.data) = data_append_byte((yyvsp[(1) - (2)].data), (yyvsp[(2) - (2)].byte)); |
2052 | ;} | 2082 | } |
2053 | break; | 2083 | break; |
2054 | 2084 | ||
2055 | case 73: | 2085 | case 73: |
2056 | 2086 | ||
2057 | /* Line 1455 of yacc.c */ | 2087 | /* Line 1806 of yacc.c */ |
2058 | #line 434 "dtc-parser.y" | 2088 | #line 434 "dtc-parser.y" |
2059 | { | 2089 | { |
2060 | (yyval.data) = data_add_marker((yyvsp[(1) - (2)].data), LABEL, (yyvsp[(2) - (2)].labelref)); | 2090 | (yyval.data) = data_add_marker((yyvsp[(1) - (2)].data), LABEL, (yyvsp[(2) - (2)].labelref)); |
2061 | ;} | 2091 | } |
2062 | break; | 2092 | break; |
2063 | 2093 | ||
2064 | case 74: | 2094 | case 74: |
2065 | 2095 | ||
2066 | /* Line 1455 of yacc.c */ | 2096 | /* Line 1806 of yacc.c */ |
2067 | #line 441 "dtc-parser.y" | 2097 | #line 441 "dtc-parser.y" |
2068 | { | 2098 | { |
2069 | (yyval.nodelist) = NULL; | 2099 | (yyval.nodelist) = NULL; |
2070 | ;} | 2100 | } |
2071 | break; | 2101 | break; |
2072 | 2102 | ||
2073 | case 75: | 2103 | case 75: |
2074 | 2104 | ||
2075 | /* Line 1455 of yacc.c */ | 2105 | /* Line 1806 of yacc.c */ |
2076 | #line 445 "dtc-parser.y" | 2106 | #line 445 "dtc-parser.y" |
2077 | { | 2107 | { |
2078 | (yyval.nodelist) = chain_node((yyvsp[(1) - (2)].node), (yyvsp[(2) - (2)].nodelist)); | 2108 | (yyval.nodelist) = chain_node((yyvsp[(1) - (2)].node), (yyvsp[(2) - (2)].nodelist)); |
2079 | ;} | 2109 | } |
2080 | break; | 2110 | break; |
2081 | 2111 | ||
2082 | case 76: | 2112 | case 76: |
2083 | 2113 | ||
2084 | /* Line 1455 of yacc.c */ | 2114 | /* Line 1806 of yacc.c */ |
2085 | #line 449 "dtc-parser.y" | 2115 | #line 449 "dtc-parser.y" |
2086 | { | 2116 | { |
2087 | print_error("syntax error: properties must precede subnodes"); | 2117 | print_error("syntax error: properties must precede subnodes"); |
2088 | YYERROR; | 2118 | YYERROR; |
2089 | ;} | 2119 | } |
2090 | break; | 2120 | break; |
2091 | 2121 | ||
2092 | case 77: | 2122 | case 77: |
2093 | 2123 | ||
2094 | /* Line 1455 of yacc.c */ | 2124 | /* Line 1806 of yacc.c */ |
2095 | #line 457 "dtc-parser.y" | 2125 | #line 457 "dtc-parser.y" |
2096 | { | 2126 | { |
2097 | (yyval.node) = name_node((yyvsp[(2) - (2)].node), (yyvsp[(1) - (2)].propnodename)); | 2127 | (yyval.node) = name_node((yyvsp[(2) - (2)].node), (yyvsp[(1) - (2)].propnodename)); |
2098 | ;} | 2128 | } |
2099 | break; | 2129 | break; |
2100 | 2130 | ||
2101 | case 78: | 2131 | case 78: |
2102 | 2132 | ||
2103 | /* Line 1455 of yacc.c */ | 2133 | /* Line 1806 of yacc.c */ |
2104 | #line 461 "dtc-parser.y" | 2134 | #line 461 "dtc-parser.y" |
2105 | { | 2135 | { |
2106 | (yyval.node) = name_node(build_node_delete(), (yyvsp[(2) - (3)].propnodename)); | 2136 | (yyval.node) = name_node(build_node_delete(), (yyvsp[(2) - (3)].propnodename)); |
2107 | ;} | 2137 | } |
2108 | break; | 2138 | break; |
2109 | 2139 | ||
2110 | case 79: | 2140 | case 79: |
2111 | 2141 | ||
2112 | /* Line 1455 of yacc.c */ | 2142 | /* Line 1806 of yacc.c */ |
2113 | #line 465 "dtc-parser.y" | 2143 | #line 465 "dtc-parser.y" |
2114 | { | 2144 | { |
2115 | add_label(&(yyvsp[(2) - (2)].node)->labels, (yyvsp[(1) - (2)].labelref)); | 2145 | add_label(&(yyvsp[(2) - (2)].node)->labels, (yyvsp[(1) - (2)].labelref)); |
2116 | (yyval.node) = (yyvsp[(2) - (2)].node); | 2146 | (yyval.node) = (yyvsp[(2) - (2)].node); |
2117 | ;} | 2147 | } |
2118 | break; | 2148 | break; |
2119 | 2149 | ||
2120 | 2150 | ||
2121 | 2151 | ||
2122 | /* Line 1455 of yacc.c */ | 2152 | /* Line 1806 of yacc.c */ |
2123 | #line 2124 "dtc-parser.tab.c" | 2153 | #line 2154 "dtc-parser.tab.c" |
2124 | default: break; | 2154 | default: break; |
2125 | } | 2155 | } |
2156 | /* User semantic actions sometimes alter yychar, and that requires | ||
2157 | that yytoken be updated with the new translation. We take the | ||
2158 | approach of translating immediately before every use of yytoken. | ||
2159 | One alternative is translating here after every semantic action, | ||
2160 | but that translation would be missed if the semantic action invokes | ||
2161 | YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or | ||
2162 | if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an | ||
2163 | incorrect destructor might then be invoked immediately. In the | ||
2164 | case of YYERROR or YYBACKUP, subsequent parser actions might lead | ||
2165 | to an incorrect destructor call or verbose syntax error message | ||
2166 | before the lookahead is translated. */ | ||
2126 | YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); | 2167 | YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); |
2127 | 2168 | ||
2128 | YYPOPSTACK (yylen); | 2169 | YYPOPSTACK (yylen); |
@@ -2150,6 +2191,10 @@ yyreduce: | |||
2150 | | yyerrlab -- here on detecting error | | 2191 | | yyerrlab -- here on detecting error | |
2151 | `------------------------------------*/ | 2192 | `------------------------------------*/ |
2152 | yyerrlab: | 2193 | yyerrlab: |
2194 | /* Make sure we have latest lookahead translation. See comments at | ||
2195 | user semantic actions for why this is necessary. */ | ||
2196 | yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); | ||
2197 | |||
2153 | /* If not already recovering from an error, report this error. */ | 2198 | /* If not already recovering from an error, report this error. */ |
2154 | if (!yyerrstatus) | 2199 | if (!yyerrstatus) |
2155 | { | 2200 | { |
@@ -2157,37 +2202,36 @@ yyerrlab: | |||
2157 | #if ! YYERROR_VERBOSE | 2202 | #if ! YYERROR_VERBOSE |
2158 | yyerror (YY_("syntax error")); | 2203 | yyerror (YY_("syntax error")); |
2159 | #else | 2204 | #else |
2205 | # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ | ||
2206 | yyssp, yytoken) | ||
2160 | { | 2207 | { |
2161 | YYSIZE_T yysize = yysyntax_error (0, yystate, yychar); | 2208 | char const *yymsgp = YY_("syntax error"); |
2162 | if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM) | 2209 | int yysyntax_error_status; |
2163 | { | 2210 | yysyntax_error_status = YYSYNTAX_ERROR; |
2164 | YYSIZE_T yyalloc = 2 * yysize; | 2211 | if (yysyntax_error_status == 0) |
2165 | if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM)) | 2212 | yymsgp = yymsg; |
2166 | yyalloc = YYSTACK_ALLOC_MAXIMUM; | 2213 | else if (yysyntax_error_status == 1) |
2167 | if (yymsg != yymsgbuf) | 2214 | { |
2168 | YYSTACK_FREE (yymsg); | 2215 | if (yymsg != yymsgbuf) |
2169 | yymsg = (char *) YYSTACK_ALLOC (yyalloc); | 2216 | YYSTACK_FREE (yymsg); |
2170 | if (yymsg) | 2217 | yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); |
2171 | yymsg_alloc = yyalloc; | 2218 | if (!yymsg) |
2172 | else | 2219 | { |
2173 | { | 2220 | yymsg = yymsgbuf; |
2174 | yymsg = yymsgbuf; | 2221 | yymsg_alloc = sizeof yymsgbuf; |
2175 | yymsg_alloc = sizeof yymsgbuf; | 2222 | yysyntax_error_status = 2; |
2176 | } | 2223 | } |
2177 | } | 2224 | else |
2178 | 2225 | { | |
2179 | if (0 < yysize && yysize <= yymsg_alloc) | 2226 | yysyntax_error_status = YYSYNTAX_ERROR; |
2180 | { | 2227 | yymsgp = yymsg; |
2181 | (void) yysyntax_error (yymsg, yystate, yychar); | 2228 | } |
2182 | yyerror (yymsg); | 2229 | } |
2183 | } | 2230 | yyerror (yymsgp); |
2184 | else | 2231 | if (yysyntax_error_status == 2) |
2185 | { | 2232 | goto yyexhaustedlab; |
2186 | yyerror (YY_("syntax error")); | ||
2187 | if (yysize != 0) | ||
2188 | goto yyexhaustedlab; | ||
2189 | } | ||
2190 | } | 2233 | } |
2234 | # undef YYSYNTAX_ERROR | ||
2191 | #endif | 2235 | #endif |
2192 | } | 2236 | } |
2193 | 2237 | ||
@@ -2246,7 +2290,7 @@ yyerrlab1: | |||
2246 | for (;;) | 2290 | for (;;) |
2247 | { | 2291 | { |
2248 | yyn = yypact[yystate]; | 2292 | yyn = yypact[yystate]; |
2249 | if (yyn != YYPACT_NINF) | 2293 | if (!yypact_value_is_default (yyn)) |
2250 | { | 2294 | { |
2251 | yyn += YYTERROR; | 2295 | yyn += YYTERROR; |
2252 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) | 2296 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) |
@@ -2305,8 +2349,13 @@ yyexhaustedlab: | |||
2305 | 2349 | ||
2306 | yyreturn: | 2350 | yyreturn: |
2307 | if (yychar != YYEMPTY) | 2351 | if (yychar != YYEMPTY) |
2308 | yydestruct ("Cleanup: discarding lookahead", | 2352 | { |
2309 | yytoken, &yylval); | 2353 | /* Make sure we have latest lookahead translation. See comments at |
2354 | user semantic actions for why this is necessary. */ | ||
2355 | yytoken = YYTRANSLATE (yychar); | ||
2356 | yydestruct ("Cleanup: discarding lookahead", | ||
2357 | yytoken, &yylval); | ||
2358 | } | ||
2310 | /* Do not reclaim the symbols of the rule which action triggered | 2359 | /* Do not reclaim the symbols of the rule which action triggered |
2311 | this YYABORT or YYACCEPT. */ | 2360 | this YYABORT or YYACCEPT. */ |
2312 | YYPOPSTACK (yylen); | 2361 | YYPOPSTACK (yylen); |
@@ -2331,7 +2380,7 @@ yyreturn: | |||
2331 | 2380 | ||
2332 | 2381 | ||
2333 | 2382 | ||
2334 | /* Line 1675 of yacc.c */ | 2383 | /* Line 2067 of yacc.c */ |
2335 | #line 471 "dtc-parser.y" | 2384 | #line 471 "dtc-parser.y" |
2336 | 2385 | ||
2337 | 2386 | ||