]> git.sur5r.net Git - u-boot/blob - scripts/dtc/dtc-parser.tab.c_shipped
scripts/dtc: Update to upstream version v1.4.3
[u-boot] / scripts / dtc / dtc-parser.tab.c_shipped
1 /* A Bison parser, made by GNU Bison 3.0.2.  */
2
3 /* Bison implementation for Yacc-like parsers in C
4
5    Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc.
6
7    This program is free software: you can redistribute it and/or modify
8    it under the terms of the GNU General Public License as published by
9    the Free Software Foundation, either version 3 of the License, or
10    (at your option) any later version.
11
12    This program is distributed in the hope that it will be useful,
13    but WITHOUT ANY WARRANTY; without even the implied warranty of
14    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15    GNU General Public License for more details.
16
17    You should have received a copy of the GNU General Public License
18    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
19
20 /* As a special exception, you may create a larger work that contains
21    part or all of the Bison parser skeleton and distribute that work
22    under terms of your choice, so long as that work isn't itself a
23    parser generator using the skeleton or a modified version thereof
24    as a parser skeleton.  Alternatively, if you modify or redistribute
25    the parser skeleton itself, you may (at your option) remove this
26    special exception, which will cause the skeleton and the resulting
27    Bison output files to be licensed under the GNU General Public
28    License without this special exception.
29
30    This special exception was added by the Free Software Foundation in
31    version 2.2 of Bison.  */
32
33 /* C LALR(1) parser skeleton written by Richard Stallman, by
34    simplifying the original so-called "semantic" parser.  */
35
36 /* All symbols defined below should begin with yy or YY, to avoid
37    infringing on user name space.  This should be done even for local
38    variables, as they might otherwise be expanded by user macros.
39    There are some unavoidable exceptions within include files to
40    define necessary library symbols; they are noted "INFRINGES ON
41    USER NAME SPACE" below.  */
42
43 /* Identify Bison output.  */
44 #define YYBISON 1
45
46 /* Bison version.  */
47 #define YYBISON_VERSION "3.0.2"
48
49 /* Skeleton name.  */
50 #define YYSKELETON_NAME "yacc.c"
51
52 /* Pure parsers.  */
53 #define YYPURE 0
54
55 /* Push parsers.  */
56 #define YYPUSH 0
57
58 /* Pull parsers.  */
59 #define YYPULL 1
60
61
62
63
64 /* Copy the first part of user declarations.  */
65 #line 20 "dtc-parser.y" /* yacc.c:339  */
66
67 #include <stdio.h>
68 #include <inttypes.h>
69
70 #include "dtc.h"
71 #include "srcpos.h"
72
73 extern int yylex(void);
74 extern void yyerror(char const *s);
75 #define ERROR(loc, ...) \
76         do { \
77                 srcpos_error((loc), "Error", __VA_ARGS__); \
78                 treesource_error = true; \
79         } while (0)
80
81 extern struct dt_info *parser_output;
82 extern bool treesource_error;
83
84 #line 85 "dtc-parser.tab.c" /* yacc.c:339  */
85
86 # ifndef YY_NULLPTR
87 #  if defined __cplusplus && 201103L <= __cplusplus
88 #   define YY_NULLPTR nullptr
89 #  else
90 #   define YY_NULLPTR 0
91 #  endif
92 # endif
93
94 /* Enabling verbose error messages.  */
95 #ifdef YYERROR_VERBOSE
96 # undef YYERROR_VERBOSE
97 # define YYERROR_VERBOSE 1
98 #else
99 # define YYERROR_VERBOSE 0
100 #endif
101
102 /* In a future release of Bison, this section will be replaced
103    by #include "dtc-parser.tab.h".  */
104 #ifndef YY_YY_DTC_PARSER_TAB_H_INCLUDED
105 # define YY_YY_DTC_PARSER_TAB_H_INCLUDED
106 /* Debug traces.  */
107 #ifndef YYDEBUG
108 # define YYDEBUG 0
109 #endif
110 #if YYDEBUG
111 extern int yydebug;
112 #endif
113
114 /* Token type.  */
115 #ifndef YYTOKENTYPE
116 # define YYTOKENTYPE
117   enum yytokentype
118   {
119     DT_V1 = 258,
120     DT_PLUGIN = 259,
121     DT_MEMRESERVE = 260,
122     DT_LSHIFT = 261,
123     DT_RSHIFT = 262,
124     DT_LE = 263,
125     DT_GE = 264,
126     DT_EQ = 265,
127     DT_NE = 266,
128     DT_AND = 267,
129     DT_OR = 268,
130     DT_BITS = 269,
131     DT_DEL_PROP = 270,
132     DT_DEL_NODE = 271,
133     DT_PROPNODENAME = 272,
134     DT_LITERAL = 273,
135     DT_CHAR_LITERAL = 274,
136     DT_BYTE = 275,
137     DT_STRING = 276,
138     DT_LABEL = 277,
139     DT_REF = 278,
140     DT_INCBIN = 279
141   };
142 #endif
143
144 /* Value type.  */
145 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
146 typedef union YYSTYPE YYSTYPE;
147 union YYSTYPE
148 {
149 #line 39 "dtc-parser.y" /* yacc.c:355  */
150
151         char *propnodename;
152         char *labelref;
153         uint8_t byte;
154         struct data data;
155
156         struct {
157                 struct data     data;
158                 int             bits;
159         } array;
160
161         struct property *prop;
162         struct property *proplist;
163         struct node *node;
164         struct node *nodelist;
165         struct reserve_info *re;
166         uint64_t integer;
167         unsigned int flags;
168
169 #line 170 "dtc-parser.tab.c" /* yacc.c:355  */
170 };
171 # define YYSTYPE_IS_TRIVIAL 1
172 # define YYSTYPE_IS_DECLARED 1
173 #endif
174
175 /* Location type.  */
176 #if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
177 typedef struct YYLTYPE YYLTYPE;
178 struct YYLTYPE
179 {
180   int first_line;
181   int first_column;
182   int last_line;
183   int last_column;
184 };
185 # define YYLTYPE_IS_DECLARED 1
186 # define YYLTYPE_IS_TRIVIAL 1
187 #endif
188
189
190 extern YYSTYPE yylval;
191 extern YYLTYPE yylloc;
192 int yyparse (void);
193
194 #endif /* !YY_YY_DTC_PARSER_TAB_H_INCLUDED  */
195
196 /* Copy the second part of user declarations.  */
197
198 #line 199 "dtc-parser.tab.c" /* yacc.c:358  */
199
200 #ifdef short
201 # undef short
202 #endif
203
204 #ifdef YYTYPE_UINT8
205 typedef YYTYPE_UINT8 yytype_uint8;
206 #else
207 typedef unsigned char yytype_uint8;
208 #endif
209
210 #ifdef YYTYPE_INT8
211 typedef YYTYPE_INT8 yytype_int8;
212 #else
213 typedef signed char yytype_int8;
214 #endif
215
216 #ifdef YYTYPE_UINT16
217 typedef YYTYPE_UINT16 yytype_uint16;
218 #else
219 typedef unsigned short int yytype_uint16;
220 #endif
221
222 #ifdef YYTYPE_INT16
223 typedef YYTYPE_INT16 yytype_int16;
224 #else
225 typedef short int yytype_int16;
226 #endif
227
228 #ifndef YYSIZE_T
229 # ifdef __SIZE_TYPE__
230 #  define YYSIZE_T __SIZE_TYPE__
231 # elif defined size_t
232 #  define YYSIZE_T size_t
233 # elif ! defined YYSIZE_T
234 #  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
235 #  define YYSIZE_T size_t
236 # else
237 #  define YYSIZE_T unsigned int
238 # endif
239 #endif
240
241 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
242
243 #ifndef YY_
244 # if defined YYENABLE_NLS && YYENABLE_NLS
245 #  if ENABLE_NLS
246 #   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
247 #   define YY_(Msgid) dgettext ("bison-runtime", Msgid)
248 #  endif
249 # endif
250 # ifndef YY_
251 #  define YY_(Msgid) Msgid
252 # endif
253 #endif
254
255 #ifndef YY_ATTRIBUTE
256 # if (defined __GNUC__                                               \
257       && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__)))  \
258      || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C
259 #  define YY_ATTRIBUTE(Spec) __attribute__(Spec)
260 # else
261 #  define YY_ATTRIBUTE(Spec) /* empty */
262 # endif
263 #endif
264
265 #ifndef YY_ATTRIBUTE_PURE
266 # define YY_ATTRIBUTE_PURE   YY_ATTRIBUTE ((__pure__))
267 #endif
268
269 #ifndef YY_ATTRIBUTE_UNUSED
270 # define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
271 #endif
272
273 #if !defined _Noreturn \
274      && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112)
275 # if defined _MSC_VER && 1200 <= _MSC_VER
276 #  define _Noreturn __declspec (noreturn)
277 # else
278 #  define _Noreturn YY_ATTRIBUTE ((__noreturn__))
279 # endif
280 #endif
281
282 /* Suppress unused-variable warnings by "using" E.  */
283 #if ! defined lint || defined __GNUC__
284 # define YYUSE(E) ((void) (E))
285 #else
286 # define YYUSE(E) /* empty */
287 #endif
288
289 #if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
290 /* Suppress an incorrect diagnostic about yylval being uninitialized.  */
291 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
292     _Pragma ("GCC diagnostic push") \
293     _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
294     _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
295 # define YY_IGNORE_MAYBE_UNINITIALIZED_END \
296     _Pragma ("GCC diagnostic pop")
297 #else
298 # define YY_INITIAL_VALUE(Value) Value
299 #endif
300 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
301 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
302 # define YY_IGNORE_MAYBE_UNINITIALIZED_END
303 #endif
304 #ifndef YY_INITIAL_VALUE
305 # define YY_INITIAL_VALUE(Value) /* Nothing. */
306 #endif
307
308
309 #if ! defined yyoverflow || YYERROR_VERBOSE
310
311 /* The parser invokes alloca or malloc; define the necessary symbols.  */
312
313 # ifdef YYSTACK_USE_ALLOCA
314 #  if YYSTACK_USE_ALLOCA
315 #   ifdef __GNUC__
316 #    define YYSTACK_ALLOC __builtin_alloca
317 #   elif defined __BUILTIN_VA_ARG_INCR
318 #    include <alloca.h> /* INFRINGES ON USER NAME SPACE */
319 #   elif defined _AIX
320 #    define YYSTACK_ALLOC __alloca
321 #   elif defined _MSC_VER
322 #    include <malloc.h> /* INFRINGES ON USER NAME SPACE */
323 #    define alloca _alloca
324 #   else
325 #    define YYSTACK_ALLOC alloca
326 #    if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
327 #     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
328       /* Use EXIT_SUCCESS as a witness for stdlib.h.  */
329 #     ifndef EXIT_SUCCESS
330 #      define EXIT_SUCCESS 0
331 #     endif
332 #    endif
333 #   endif
334 #  endif
335 # endif
336
337 # ifdef YYSTACK_ALLOC
338    /* Pacify GCC's 'empty if-body' warning.  */
339 #  define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
340 #  ifndef YYSTACK_ALLOC_MAXIMUM
341     /* The OS might guarantee only one guard page at the bottom of the stack,
342        and a page size can be as small as 4096 bytes.  So we cannot safely
343        invoke alloca (N) if N exceeds 4096.  Use a slightly smaller number
344        to allow for a few compiler-allocated temporary stack slots.  */
345 #   define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
346 #  endif
347 # else
348 #  define YYSTACK_ALLOC YYMALLOC
349 #  define YYSTACK_FREE YYFREE
350 #  ifndef YYSTACK_ALLOC_MAXIMUM
351 #   define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
352 #  endif
353 #  if (defined __cplusplus && ! defined EXIT_SUCCESS \
354        && ! ((defined YYMALLOC || defined malloc) \
355              && (defined YYFREE || defined free)))
356 #   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
357 #   ifndef EXIT_SUCCESS
358 #    define EXIT_SUCCESS 0
359 #   endif
360 #  endif
361 #  ifndef YYMALLOC
362 #   define YYMALLOC malloc
363 #   if ! defined malloc && ! defined EXIT_SUCCESS
364 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
365 #   endif
366 #  endif
367 #  ifndef YYFREE
368 #   define YYFREE free
369 #   if ! defined free && ! defined EXIT_SUCCESS
370 void free (void *); /* INFRINGES ON USER NAME SPACE */
371 #   endif
372 #  endif
373 # endif
374 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
375
376
377 #if (! defined yyoverflow \
378      && (! defined __cplusplus \
379          || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \
380              && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
381
382 /* A type that is properly aligned for any stack member.  */
383 union yyalloc
384 {
385   yytype_int16 yyss_alloc;
386   YYSTYPE yyvs_alloc;
387   YYLTYPE yyls_alloc;
388 };
389
390 /* The size of the maximum gap between one aligned stack and the next.  */
391 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
392
393 /* The size of an array large to enough to hold all stacks, each with
394    N elements.  */
395 # define YYSTACK_BYTES(N) \
396      ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
397       + 2 * YYSTACK_GAP_MAXIMUM)
398
399 # define YYCOPY_NEEDED 1
400
401 /* Relocate STACK from its old location to the new one.  The
402    local variables YYSIZE and YYSTACKSIZE give the old and new number of
403    elements in the stack, and YYPTR gives the new location of the
404    stack.  Advance YYPTR to a properly aligned location for the next
405    stack.  */
406 # define YYSTACK_RELOCATE(Stack_alloc, Stack)                           \
407     do                                                                  \
408       {                                                                 \
409         YYSIZE_T yynewbytes;                                            \
410         YYCOPY (&yyptr->Stack_alloc, Stack, yysize);                    \
411         Stack = &yyptr->Stack_alloc;                                    \
412         yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
413         yyptr += yynewbytes / sizeof (*yyptr);                          \
414       }                                                                 \
415     while (0)
416
417 #endif
418
419 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
420 /* Copy COUNT objects from SRC to DST.  The source and destination do
421    not overlap.  */
422 # ifndef YYCOPY
423 #  if defined __GNUC__ && 1 < __GNUC__
424 #   define YYCOPY(Dst, Src, Count) \
425       __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
426 #  else
427 #   define YYCOPY(Dst, Src, Count)              \
428       do                                        \
429         {                                       \
430           YYSIZE_T yyi;                         \
431           for (yyi = 0; yyi < (Count); yyi++)   \
432             (Dst)[yyi] = (Src)[yyi];            \
433         }                                       \
434       while (0)
435 #  endif
436 # endif
437 #endif /* !YYCOPY_NEEDED */
438
439 /* YYFINAL -- State number of the termination state.  */
440 #define YYFINAL  6
441 /* YYLAST -- Last index in YYTABLE.  */
442 #define YYLAST   138
443
444 /* YYNTOKENS -- Number of terminals.  */
445 #define YYNTOKENS  48
446 /* YYNNTS -- Number of nonterminals.  */
447 #define YYNNTS  30
448 /* YYNRULES -- Number of rules.  */
449 #define YYNRULES  84
450 /* YYNSTATES -- Number of states.  */
451 #define YYNSTATES  149
452
453 /* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned
454    by yylex, with out-of-bounds checking.  */
455 #define YYUNDEFTOK  2
456 #define YYMAXUTOK   279
457
458 #define YYTRANSLATE(YYX)                                                \
459   ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
460
461 /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
462    as returned by yylex, without out-of-bounds checking.  */
463 static const yytype_uint8 yytranslate[] =
464 {
465        0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
466        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
467        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
468        2,     2,     2,    47,     2,     2,     2,    45,    41,     2,
469       33,    35,    44,    42,    34,    43,     2,    26,     2,     2,
470        2,     2,     2,     2,     2,     2,     2,     2,    38,    25,
471       36,    29,    30,    37,     2,     2,     2,     2,     2,     2,
472        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
473        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
474        2,    31,     2,    32,    40,     2,     2,     2,     2,     2,
475        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
476        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
477        2,     2,     2,    27,    39,    28,    46,     2,     2,     2,
478        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
479        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
480        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
481        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
482        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
483        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
484        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
485        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
486        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
487        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
488        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
489        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
490        2,     2,     2,     2,     2,     2,     1,     2,     3,     4,
491        5,     6,     7,     8,     9,    10,    11,    12,    13,    14,
492       15,    16,    17,    18,    19,    20,    21,    22,    23,    24
493 };
494
495 #if YYDEBUG
496   /* YYRLINE[YYN] -- Source line where rule number YYN was defined.  */
497 static const yytype_uint16 yyrline[] =
498 {
499        0,   109,   109,   117,   121,   128,   129,   139,   142,   149,
500      153,   161,   165,   170,   181,   191,   206,   214,   217,   224,
501      228,   232,   236,   244,   248,   252,   256,   260,   276,   286,
502      294,   297,   301,   308,   324,   329,   348,   362,   369,   370,
503      371,   378,   382,   383,   387,   388,   392,   393,   397,   398,
504      402,   403,   407,   408,   412,   413,   414,   418,   419,   420,
505      421,   422,   426,   427,   428,   432,   433,   434,   438,   439,
506      448,   457,   461,   462,   463,   464,   469,   472,   476,   484,
507      487,   491,   499,   503,   507
508 };
509 #endif
510
511 #if YYDEBUG || YYERROR_VERBOSE || 0
512 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
513    First, the terminals, then, starting at YYNTOKENS, nonterminals.  */
514 static const char *const yytname[] =
515 {
516   "$end", "error", "$undefined", "DT_V1", "DT_PLUGIN", "DT_MEMRESERVE",
517   "DT_LSHIFT", "DT_RSHIFT", "DT_LE", "DT_GE", "DT_EQ", "DT_NE", "DT_AND",
518   "DT_OR", "DT_BITS", "DT_DEL_PROP", "DT_DEL_NODE", "DT_PROPNODENAME",
519   "DT_LITERAL", "DT_CHAR_LITERAL", "DT_BYTE", "DT_STRING", "DT_LABEL",
520   "DT_REF", "DT_INCBIN", "';'", "'/'", "'{'", "'}'", "'='", "'>'", "'['",
521   "']'", "'('", "','", "')'", "'<'", "'?'", "':'", "'|'", "'^'", "'&'",
522   "'+'", "'-'", "'*'", "'%'", "'~'", "'!'", "$accept", "sourcefile",
523   "header", "headers", "memreserves", "memreserve", "devicetree",
524   "nodedef", "proplist", "propdef", "propdata", "propdataprefix",
525   "arrayprefix", "integer_prim", "integer_expr", "integer_trinary",
526   "integer_or", "integer_and", "integer_bitor", "integer_bitxor",
527   "integer_bitand", "integer_eq", "integer_rela", "integer_shift",
528   "integer_add", "integer_mul", "integer_unary", "bytestring", "subnodes",
529   "subnode", YY_NULLPTR
530 };
531 #endif
532
533 # ifdef YYPRINT
534 /* YYTOKNUM[NUM] -- (External) token number corresponding to the
535    (internal) symbol number NUM (which must be that of a token).  */
536 static const yytype_uint16 yytoknum[] =
537 {
538        0,   256,   257,   258,   259,   260,   261,   262,   263,   264,
539      265,   266,   267,   268,   269,   270,   271,   272,   273,   274,
540      275,   276,   277,   278,   279,    59,    47,   123,   125,    61,
541       62,    91,    93,    40,    44,    41,    60,    63,    58,   124,
542       94,    38,    43,    45,    42,    37,   126,    33
543 };
544 # endif
545
546 #define YYPACT_NINF -44
547
548 #define yypact_value_is_default(Yystate) \
549   (!!((Yystate) == (-44)))
550
551 #define YYTABLE_NINF -1
552
553 #define yytable_value_is_error(Yytable_value) \
554   0
555
556   /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
557      STATE-NUM.  */
558 static const yytype_int8 yypact[] =
559 {
560       14,    27,    61,    14,     8,    18,   -44,   -44,    37,     8,
561       40,     8,    64,   -44,   -44,   -12,    37,   -44,    50,    52,
562      -44,   -44,   -12,   -12,   -12,   -44,    51,   -44,    -4,    78,
563       53,    54,    55,    17,     2,    30,    38,    -3,   -44,    66,
564      -44,   -44,    70,    72,    50,    50,   -44,   -44,   -44,   -44,
565      -12,   -12,   -12,   -12,   -12,   -12,   -12,   -12,   -12,   -12,
566      -12,   -12,   -12,   -12,   -12,   -12,   -12,   -12,   -12,   -44,
567        3,    73,    50,   -44,   -44,    78,    59,    53,    54,    55,
568       17,     2,     2,    30,    30,    30,    30,    38,    38,    -3,
569       -3,   -44,   -44,   -44,    82,    83,    44,     3,   -44,    74,
570        3,   -44,   -44,   -12,    76,    79,   -44,   -44,   -44,   -44,
571      -44,    80,   -44,   -44,   -44,   -44,   -44,   -10,    36,   -44,
572      -44,   -44,   -44,    85,   -44,   -44,   -44,    75,   -44,   -44,
573       21,    71,    88,    -6,   -44,   -44,   -44,   -44,   -44,    11,
574      -44,   -44,   -44,    37,   -44,    77,    37,    81,   -44
575 };
576
577   /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
578      Performed when YYTABLE does not specify something else to do.  Zero
579      means the default is an error.  */
580 static const yytype_uint8 yydefact[] =
581 {
582        0,     0,     0,     5,     7,     3,     1,     6,     0,     0,
583        0,     7,     0,    38,    39,     0,     0,    10,     0,     2,
584        8,     4,     0,     0,     0,    72,     0,    41,    42,    44,
585       46,    48,    50,    52,    54,    57,    64,    67,    71,     0,
586       17,    11,     0,     0,     0,     0,    73,    74,    75,    40,
587        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
588        0,     0,     0,     0,     0,     0,     0,     0,     0,     9,
589       79,     0,     0,    14,    12,    45,     0,    47,    49,    51,
590       53,    55,    56,    60,    61,    59,    58,    62,    63,    65,
591       66,    69,    68,    70,     0,     0,     0,     0,    18,     0,
592       79,    15,    13,     0,     0,     0,    20,    30,    82,    22,
593       84,     0,    81,    80,    43,    21,    83,     0,     0,    16,
594       29,    19,    31,     0,    23,    32,    26,     0,    76,    34,
595        0,     0,     0,     0,    37,    36,    24,    35,    33,     0,
596       77,    78,    25,     0,    28,     0,     0,     0,    27
597 };
598
599   /* YYPGOTO[NTERM-NUM].  */
600 static const yytype_int8 yypgoto[] =
601 {
602      -44,   -44,   -44,   103,    99,   104,   -44,   -43,   -44,   -21,
603      -44,   -44,   -44,    -8,    63,     9,   -44,    65,    67,    68,
604       69,    62,    26,     4,    22,    23,   -19,   -44,    20,    28
605 };
606
607   /* YYDEFGOTO[NTERM-NUM].  */
608 static const yytype_int16 yydefgoto[] =
609 {
610       -1,     2,     3,     4,    10,    11,    19,    41,    70,    98,
611      117,   118,   130,    25,    26,    27,    28,    29,    30,    31,
612       32,    33,    34,    35,    36,    37,    38,   133,    99,   100
613 };
614
615   /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM.  If
616      positive, shift that token.  If negative, reduce the rule whose
617      number is the opposite.  If YYTABLE_NINF, syntax error.  */
618 static const yytype_uint8 yytable[] =
619 {
620       16,    73,    74,    46,    47,    48,    13,    14,    39,    50,
621       58,    59,   120,     8,   140,   121,   141,     1,    94,    95,
622       96,    15,    12,    66,   122,    97,   142,    56,    57,   102,
623        9,    22,    60,    51,    23,    24,    62,    63,    61,    13,
624       14,    67,    68,   134,   135,   143,   144,    91,    92,    93,
625      123,   136,     5,   108,    15,    13,    14,   124,   125,   126,
626      127,     6,    83,    84,    85,    86,    18,   128,    42,   106,
627       15,    40,   129,   107,    43,    44,   109,    40,    45,   112,
628       64,    65,    81,    82,    87,    88,    49,    89,    90,    21,
629       52,    69,    53,    71,    54,    72,    55,   103,   101,   104,
630      105,   115,   111,   131,   116,   119,     7,   138,   132,   139,
631       20,   146,   114,    17,    76,    75,   148,    80,     0,    77,
632      113,    78,   137,    79,     0,   110,     0,     0,     0,     0,
633        0,     0,     0,     0,     0,   145,     0,     0,   147
634 };
635
636 static const yytype_int16 yycheck[] =
637 {
638        8,    44,    45,    22,    23,    24,    18,    19,    16,    13,
639        8,     9,    22,     5,    20,    25,    22,     3,    15,    16,
640       17,    33,     4,    26,    34,    22,    32,    10,    11,    72,
641       22,    43,    30,    37,    46,    47,     6,     7,    36,    18,
642       19,    44,    45,    22,    23,    34,    35,    66,    67,    68,
643       14,    30,    25,    96,    33,    18,    19,    21,    22,    23,
644       24,     0,    58,    59,    60,    61,    26,    31,    16,    25,
645       33,    27,    36,    29,    22,    23,    97,    27,    26,   100,
646       42,    43,    56,    57,    62,    63,    35,    64,    65,    25,
647       12,    25,    39,    23,    40,    23,    41,    38,    25,    17,
648       17,    25,    28,    18,    25,    25,     3,    36,    33,    21,
649       11,    34,   103,     9,    51,    50,    35,    55,    -1,    52,
650      100,    53,   130,    54,    -1,    97,    -1,    -1,    -1,    -1,
651       -1,    -1,    -1,    -1,    -1,   143,    -1,    -1,   146
652 };
653
654   /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
655      symbol of state STATE-NUM.  */
656 static const yytype_uint8 yystos[] =
657 {
658        0,     3,    49,    50,    51,    25,     0,    51,     5,    22,
659       52,    53,     4,    18,    19,    33,    61,    53,    26,    54,
660       52,    25,    43,    46,    47,    61,    62,    63,    64,    65,
661       66,    67,    68,    69,    70,    71,    72,    73,    74,    61,
662       27,    55,    16,    22,    23,    26,    74,    74,    74,    35,
663       13,    37,    12,    39,    40,    41,    10,    11,     8,     9,
664       30,    36,     6,     7,    42,    43,    26,    44,    45,    25,
665       56,    23,    23,    55,    55,    65,    62,    66,    67,    68,
666       69,    70,    70,    71,    71,    71,    71,    72,    72,    73,
667       73,    74,    74,    74,    15,    16,    17,    22,    57,    76,
668       77,    25,    55,    38,    17,    17,    25,    29,    55,    57,
669       77,    28,    57,    76,    63,    25,    25,    58,    59,    25,
670       22,    25,    34,    14,    21,    22,    23,    24,    31,    36,
671       60,    18,    33,    75,    22,    23,    30,    61,    36,    21,
672       20,    22,    32,    34,    35,    61,    34,    61,    35
673 };
674
675   /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
676 static const yytype_uint8 yyr1[] =
677 {
678        0,    48,    49,    50,    50,    51,    51,    52,    52,    53,
679       53,    54,    54,    54,    54,    54,    55,    56,    56,    57,
680       57,    57,    57,    58,    58,    58,    58,    58,    58,    58,
681       59,    59,    59,    60,    60,    60,    60,    60,    61,    61,
682       61,    62,    63,    63,    64,    64,    65,    65,    66,    66,
683       67,    67,    68,    68,    69,    69,    69,    70,    70,    70,
684       70,    70,    71,    71,    71,    72,    72,    72,    73,    73,
685       73,    73,    74,    74,    74,    74,    75,    75,    75,    76,
686       76,    76,    77,    77,    77
687 };
688
689   /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN.  */
690 static const yytype_uint8 yyr2[] =
691 {
692        0,     2,     3,     2,     4,     1,     2,     0,     2,     4,
693        2,     2,     3,     4,     3,     4,     5,     0,     2,     4,
694        2,     3,     2,     2,     3,     4,     2,     9,     5,     2,
695        0,     2,     2,     3,     1,     2,     2,     2,     1,     1,
696        3,     1,     1,     5,     1,     3,     1,     3,     1,     3,
697        1,     3,     1,     3,     1,     3,     3,     1,     3,     3,
698        3,     3,     3,     3,     1,     3,     3,     1,     3,     3,
699        3,     1,     1,     2,     2,     2,     0,     2,     2,     0,
700        2,     2,     2,     3,     2
701 };
702
703
704 #define yyerrok         (yyerrstatus = 0)
705 #define yyclearin       (yychar = YYEMPTY)
706 #define YYEMPTY         (-2)
707 #define YYEOF           0
708
709 #define YYACCEPT        goto yyacceptlab
710 #define YYABORT         goto yyabortlab
711 #define YYERROR         goto yyerrorlab
712
713
714 #define YYRECOVERING()  (!!yyerrstatus)
715
716 #define YYBACKUP(Token, Value)                                  \
717 do                                                              \
718   if (yychar == YYEMPTY)                                        \
719     {                                                           \
720       yychar = (Token);                                         \
721       yylval = (Value);                                         \
722       YYPOPSTACK (yylen);                                       \
723       yystate = *yyssp;                                         \
724       goto yybackup;                                            \
725     }                                                           \
726   else                                                          \
727     {                                                           \
728       yyerror (YY_("syntax error: cannot back up")); \
729       YYERROR;                                                  \
730     }                                                           \
731 while (0)
732
733 /* Error token number */
734 #define YYTERROR        1
735 #define YYERRCODE       256
736
737
738 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
739    If N is 0, then set CURRENT to the empty location which ends
740    the previous symbol: RHS[0] (always defined).  */
741
742 #ifndef YYLLOC_DEFAULT
743 # define YYLLOC_DEFAULT(Current, Rhs, N)                                \
744     do                                                                  \
745       if (N)                                                            \
746         {                                                               \
747           (Current).first_line   = YYRHSLOC (Rhs, 1).first_line;        \
748           (Current).first_column = YYRHSLOC (Rhs, 1).first_column;      \
749           (Current).last_line    = YYRHSLOC (Rhs, N).last_line;         \
750           (Current).last_column  = YYRHSLOC (Rhs, N).last_column;       \
751         }                                                               \
752       else                                                              \
753         {                                                               \
754           (Current).first_line   = (Current).last_line   =              \
755             YYRHSLOC (Rhs, 0).last_line;                                \
756           (Current).first_column = (Current).last_column =              \
757             YYRHSLOC (Rhs, 0).last_column;                              \
758         }                                                               \
759     while (0)
760 #endif
761
762 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
763
764
765 /* Enable debugging if requested.  */
766 #if YYDEBUG
767
768 # ifndef YYFPRINTF
769 #  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
770 #  define YYFPRINTF fprintf
771 # endif
772
773 # define YYDPRINTF(Args)                        \
774 do {                                            \
775   if (yydebug)                                  \
776     YYFPRINTF Args;                             \
777 } while (0)
778
779
780 /* YY_LOCATION_PRINT -- Print the location on the stream.
781    This macro was not mandated originally: define only if we know
782    we won't break user code: when these are the locations we know.  */
783
784 #ifndef YY_LOCATION_PRINT
785 # if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
786
787 /* Print *YYLOCP on YYO.  Private, do not rely on its existence. */
788
789 YY_ATTRIBUTE_UNUSED
790 static unsigned
791 yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp)
792 {
793   unsigned res = 0;
794   int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0;
795   if (0 <= yylocp->first_line)
796     {
797       res += YYFPRINTF (yyo, "%d", yylocp->first_line);
798       if (0 <= yylocp->first_column)
799         res += YYFPRINTF (yyo, ".%d", yylocp->first_column);
800     }
801   if (0 <= yylocp->last_line)
802     {
803       if (yylocp->first_line < yylocp->last_line)
804         {
805           res += YYFPRINTF (yyo, "-%d", yylocp->last_line);
806           if (0 <= end_col)
807             res += YYFPRINTF (yyo, ".%d", end_col);
808         }
809       else if (0 <= end_col && yylocp->first_column < end_col)
810         res += YYFPRINTF (yyo, "-%d", end_col);
811     }
812   return res;
813  }
814
815 #  define YY_LOCATION_PRINT(File, Loc)          \
816   yy_location_print_ (File, &(Loc))
817
818 # else
819 #  define YY_LOCATION_PRINT(File, Loc) ((void) 0)
820 # endif
821 #endif
822
823
824 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)                    \
825 do {                                                                      \
826   if (yydebug)                                                            \
827     {                                                                     \
828       YYFPRINTF (stderr, "%s ", Title);                                   \
829       yy_symbol_print (stderr,                                            \
830                   Type, Value, Location); \
831       YYFPRINTF (stderr, "\n");                                           \
832     }                                                                     \
833 } while (0)
834
835
836 /*----------------------------------------.
837 | Print this symbol's value on YYOUTPUT.  |
838 `----------------------------------------*/
839
840 static void
841 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp)
842 {
843   FILE *yyo = yyoutput;
844   YYUSE (yyo);
845   YYUSE (yylocationp);
846   if (!yyvaluep)
847     return;
848 # ifdef YYPRINT
849   if (yytype < YYNTOKENS)
850     YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
851 # endif
852   YYUSE (yytype);
853 }
854
855
856 /*--------------------------------.
857 | Print this symbol on YYOUTPUT.  |
858 `--------------------------------*/
859
860 static void
861 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp)
862 {
863   YYFPRINTF (yyoutput, "%s %s (",
864              yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
865
866   YY_LOCATION_PRINT (yyoutput, *yylocationp);
867   YYFPRINTF (yyoutput, ": ");
868   yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp);
869   YYFPRINTF (yyoutput, ")");
870 }
871
872 /*------------------------------------------------------------------.
873 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
874 | TOP (included).                                                   |
875 `------------------------------------------------------------------*/
876
877 static void
878 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
879 {
880   YYFPRINTF (stderr, "Stack now");
881   for (; yybottom <= yytop; yybottom++)
882     {
883       int yybot = *yybottom;
884       YYFPRINTF (stderr, " %d", yybot);
885     }
886   YYFPRINTF (stderr, "\n");
887 }
888
889 # define YY_STACK_PRINT(Bottom, Top)                            \
890 do {                                                            \
891   if (yydebug)                                                  \
892     yy_stack_print ((Bottom), (Top));                           \
893 } while (0)
894
895
896 /*------------------------------------------------.
897 | Report that the YYRULE is going to be reduced.  |
898 `------------------------------------------------*/
899
900 static void
901 yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule)
902 {
903   unsigned long int yylno = yyrline[yyrule];
904   int yynrhs = yyr2[yyrule];
905   int yyi;
906   YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
907              yyrule - 1, yylno);
908   /* The symbols being reduced.  */
909   for (yyi = 0; yyi < yynrhs; yyi++)
910     {
911       YYFPRINTF (stderr, "   $%d = ", yyi + 1);
912       yy_symbol_print (stderr,
913                        yystos[yyssp[yyi + 1 - yynrhs]],
914                        &(yyvsp[(yyi + 1) - (yynrhs)])
915                        , &(yylsp[(yyi + 1) - (yynrhs)])                       );
916       YYFPRINTF (stderr, "\n");
917     }
918 }
919
920 # define YY_REDUCE_PRINT(Rule)          \
921 do {                                    \
922   if (yydebug)                          \
923     yy_reduce_print (yyssp, yyvsp, yylsp, Rule); \
924 } while (0)
925
926 /* Nonzero means print parse trace.  It is left uninitialized so that
927    multiple parsers can coexist.  */
928 int yydebug;
929 #else /* !YYDEBUG */
930 # define YYDPRINTF(Args)
931 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
932 # define YY_STACK_PRINT(Bottom, Top)
933 # define YY_REDUCE_PRINT(Rule)
934 #endif /* !YYDEBUG */
935
936
937 /* YYINITDEPTH -- initial size of the parser's stacks.  */
938 #ifndef YYINITDEPTH
939 # define YYINITDEPTH 200
940 #endif
941
942 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
943    if the built-in stack extension method is used).
944
945    Do not make this value too large; the results are undefined if
946    YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
947    evaluated with infinite-precision integer arithmetic.  */
948
949 #ifndef YYMAXDEPTH
950 # define YYMAXDEPTH 10000
951 #endif
952
953
954 #if YYERROR_VERBOSE
955
956 # ifndef yystrlen
957 #  if defined __GLIBC__ && defined _STRING_H
958 #   define yystrlen strlen
959 #  else
960 /* Return the length of YYSTR.  */
961 static YYSIZE_T
962 yystrlen (const char *yystr)
963 {
964   YYSIZE_T yylen;
965   for (yylen = 0; yystr[yylen]; yylen++)
966     continue;
967   return yylen;
968 }
969 #  endif
970 # endif
971
972 # ifndef yystpcpy
973 #  if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
974 #   define yystpcpy stpcpy
975 #  else
976 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
977    YYDEST.  */
978 static char *
979 yystpcpy (char *yydest, const char *yysrc)
980 {
981   char *yyd = yydest;
982   const char *yys = yysrc;
983
984   while ((*yyd++ = *yys++) != '\0')
985     continue;
986
987   return yyd - 1;
988 }
989 #  endif
990 # endif
991
992 # ifndef yytnamerr
993 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
994    quotes and backslashes, so that it's suitable for yyerror.  The
995    heuristic is that double-quoting is unnecessary unless the string
996    contains an apostrophe, a comma, or backslash (other than
997    backslash-backslash).  YYSTR is taken from yytname.  If YYRES is
998    null, do not copy; instead, return the length of what the result
999    would have been.  */
1000 static YYSIZE_T
1001 yytnamerr (char *yyres, const char *yystr)
1002 {
1003   if (*yystr == '"')
1004     {
1005       YYSIZE_T yyn = 0;
1006       char const *yyp = yystr;
1007
1008       for (;;)
1009         switch (*++yyp)
1010           {
1011           case '\'':
1012           case ',':
1013             goto do_not_strip_quotes;
1014
1015           case '\\':
1016             if (*++yyp != '\\')
1017               goto do_not_strip_quotes;
1018             /* Fall through.  */
1019           default:
1020             if (yyres)
1021               yyres[yyn] = *yyp;
1022             yyn++;
1023             break;
1024
1025           case '"':
1026             if (yyres)
1027               yyres[yyn] = '\0';
1028             return yyn;
1029           }
1030     do_not_strip_quotes: ;
1031     }
1032
1033   if (! yyres)
1034     return yystrlen (yystr);
1035
1036   return yystpcpy (yyres, yystr) - yyres;
1037 }
1038 # endif
1039
1040 /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
1041    about the unexpected token YYTOKEN for the state stack whose top is
1042    YYSSP.
1043
1044    Return 0 if *YYMSG was successfully written.  Return 1 if *YYMSG is
1045    not large enough to hold the message.  In that case, also set
1046    *YYMSG_ALLOC to the required number of bytes.  Return 2 if the
1047    required number of bytes is too large to store.  */
1048 static int
1049 yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
1050                 yytype_int16 *yyssp, int yytoken)
1051 {
1052   YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]);
1053   YYSIZE_T yysize = yysize0;
1054   enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1055   /* Internationalized format string. */
1056   const char *yyformat = YY_NULLPTR;
1057   /* Arguments of yyformat. */
1058   char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1059   /* Number of reported tokens (one for the "unexpected", one per
1060      "expected"). */
1061   int yycount = 0;
1062
1063   /* There are many possibilities here to consider:
1064      - If this state is a consistent state with a default action, then
1065        the only way this function was invoked is if the default action
1066        is an error action.  In that case, don't check for expected
1067        tokens because there are none.
1068      - The only way there can be no lookahead present (in yychar) is if
1069        this state is a consistent state with a default action.  Thus,
1070        detecting the absence of a lookahead is sufficient to determine
1071        that there is no unexpected or expected token to report.  In that
1072        case, just report a simple "syntax error".
1073      - Don't assume there isn't a lookahead just because this state is a
1074        consistent state with a default action.  There might have been a
1075        previous inconsistent state, consistent state with a non-default
1076        action, or user semantic action that manipulated yychar.
1077      - Of course, the expected token list depends on states to have
1078        correct lookahead information, and it depends on the parser not
1079        to perform extra reductions after fetching a lookahead from the
1080        scanner and before detecting a syntax error.  Thus, state merging
1081        (from LALR or IELR) and default reductions corrupt the expected
1082        token list.  However, the list is correct for canonical LR with
1083        one exception: it will still contain any token that will not be
1084        accepted due to an error action in a later state.
1085   */
1086   if (yytoken != YYEMPTY)
1087     {
1088       int yyn = yypact[*yyssp];
1089       yyarg[yycount++] = yytname[yytoken];
1090       if (!yypact_value_is_default (yyn))
1091         {
1092           /* Start YYX at -YYN if negative to avoid negative indexes in
1093              YYCHECK.  In other words, skip the first -YYN actions for
1094              this state because they are default actions.  */
1095           int yyxbegin = yyn < 0 ? -yyn : 0;
1096           /* Stay within bounds of both yycheck and yytname.  */
1097           int yychecklim = YYLAST - yyn + 1;
1098           int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1099           int yyx;
1100
1101           for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1102             if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
1103                 && !yytable_value_is_error (yytable[yyx + yyn]))
1104               {
1105                 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1106                   {
1107                     yycount = 1;
1108                     yysize = yysize0;
1109                     break;
1110                   }
1111                 yyarg[yycount++] = yytname[yyx];
1112                 {
1113                   YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
1114                   if (! (yysize <= yysize1
1115                          && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1116                     return 2;
1117                   yysize = yysize1;
1118                 }
1119               }
1120         }
1121     }
1122
1123   switch (yycount)
1124     {
1125 # define YYCASE_(N, S)                      \
1126       case N:                               \
1127         yyformat = S;                       \
1128       break
1129       YYCASE_(0, YY_("syntax error"));
1130       YYCASE_(1, YY_("syntax error, unexpected %s"));
1131       YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
1132       YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
1133       YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
1134       YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
1135 # undef YYCASE_
1136     }
1137
1138   {
1139     YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
1140     if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1141       return 2;
1142     yysize = yysize1;
1143   }
1144
1145   if (*yymsg_alloc < yysize)
1146     {
1147       *yymsg_alloc = 2 * yysize;
1148       if (! (yysize <= *yymsg_alloc
1149              && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
1150         *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
1151       return 1;
1152     }
1153
1154   /* Avoid sprintf, as that infringes on the user's name space.
1155      Don't have undefined behavior even if the translation
1156      produced a string with the wrong number of "%s"s.  */
1157   {
1158     char *yyp = *yymsg;
1159     int yyi = 0;
1160     while ((*yyp = *yyformat) != '\0')
1161       if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
1162         {
1163           yyp += yytnamerr (yyp, yyarg[yyi++]);
1164           yyformat += 2;
1165         }
1166       else
1167         {
1168           yyp++;
1169           yyformat++;
1170         }
1171   }
1172   return 0;
1173 }
1174 #endif /* YYERROR_VERBOSE */
1175
1176 /*-----------------------------------------------.
1177 | Release the memory associated to this symbol.  |
1178 `-----------------------------------------------*/
1179
1180 static void
1181 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp)
1182 {
1183   YYUSE (yyvaluep);
1184   YYUSE (yylocationp);
1185   if (!yymsg)
1186     yymsg = "Deleting";
1187   YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1188
1189   YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1190   YYUSE (yytype);
1191   YY_IGNORE_MAYBE_UNINITIALIZED_END
1192 }
1193
1194
1195
1196
1197 /* The lookahead symbol.  */
1198 int yychar;
1199
1200 /* The semantic value of the lookahead symbol.  */
1201 YYSTYPE yylval;
1202 /* Location data for the lookahead symbol.  */
1203 YYLTYPE yylloc
1204 # if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
1205   = { 1, 1, 1, 1 }
1206 # endif
1207 ;
1208 /* Number of syntax errors so far.  */
1209 int yynerrs;
1210
1211
1212 /*----------.
1213 | yyparse.  |
1214 `----------*/
1215
1216 int
1217 yyparse (void)
1218 {
1219     int yystate;
1220     /* Number of tokens to shift before error messages enabled.  */
1221     int yyerrstatus;
1222
1223     /* The stacks and their tools:
1224        'yyss': related to states.
1225        'yyvs': related to semantic values.
1226        'yyls': related to locations.
1227
1228        Refer to the stacks through separate pointers, to allow yyoverflow
1229        to reallocate them elsewhere.  */
1230
1231     /* The state stack.  */
1232     yytype_int16 yyssa[YYINITDEPTH];
1233     yytype_int16 *yyss;
1234     yytype_int16 *yyssp;
1235
1236     /* The semantic value stack.  */
1237     YYSTYPE yyvsa[YYINITDEPTH];
1238     YYSTYPE *yyvs;
1239     YYSTYPE *yyvsp;
1240
1241     /* The location stack.  */
1242     YYLTYPE yylsa[YYINITDEPTH];
1243     YYLTYPE *yyls;
1244     YYLTYPE *yylsp;
1245
1246     /* The locations where the error started and ended.  */
1247     YYLTYPE yyerror_range[3];
1248
1249     YYSIZE_T yystacksize;
1250
1251   int yyn;
1252   int yyresult;
1253   /* Lookahead token as an internal (translated) token number.  */
1254   int yytoken = 0;
1255   /* The variables used to return semantic value and location from the
1256      action routines.  */
1257   YYSTYPE yyval;
1258   YYLTYPE yyloc;
1259
1260 #if YYERROR_VERBOSE
1261   /* Buffer for error messages, and its allocated size.  */
1262   char yymsgbuf[128];
1263   char *yymsg = yymsgbuf;
1264   YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
1265 #endif
1266
1267 #define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
1268
1269   /* The number of symbols on the RHS of the reduced rule.
1270      Keep to zero when no symbol should be popped.  */
1271   int yylen = 0;
1272
1273   yyssp = yyss = yyssa;
1274   yyvsp = yyvs = yyvsa;
1275   yylsp = yyls = yylsa;
1276   yystacksize = YYINITDEPTH;
1277
1278   YYDPRINTF ((stderr, "Starting parse\n"));
1279
1280   yystate = 0;
1281   yyerrstatus = 0;
1282   yynerrs = 0;
1283   yychar = YYEMPTY; /* Cause a token to be read.  */
1284   yylsp[0] = yylloc;
1285   goto yysetstate;
1286
1287 /*------------------------------------------------------------.
1288 | yynewstate -- Push a new state, which is found in yystate.  |
1289 `------------------------------------------------------------*/
1290  yynewstate:
1291   /* In all cases, when you get here, the value and location stacks
1292      have just been pushed.  So pushing a state here evens the stacks.  */
1293   yyssp++;
1294
1295  yysetstate:
1296   *yyssp = yystate;
1297
1298   if (yyss + yystacksize - 1 <= yyssp)
1299     {
1300       /* Get the current used size of the three stacks, in elements.  */
1301       YYSIZE_T yysize = yyssp - yyss + 1;
1302
1303 #ifdef yyoverflow
1304       {
1305         /* Give user a chance to reallocate the stack.  Use copies of
1306            these so that the &'s don't force the real ones into
1307            memory.  */
1308         YYSTYPE *yyvs1 = yyvs;
1309         yytype_int16 *yyss1 = yyss;
1310         YYLTYPE *yyls1 = yyls;
1311
1312         /* Each stack pointer address is followed by the size of the
1313            data in use in that stack, in bytes.  This used to be a
1314            conditional around just the two extra args, but that might
1315            be undefined if yyoverflow is a macro.  */
1316         yyoverflow (YY_("memory exhausted"),
1317                     &yyss1, yysize * sizeof (*yyssp),
1318                     &yyvs1, yysize * sizeof (*yyvsp),
1319                     &yyls1, yysize * sizeof (*yylsp),
1320                     &yystacksize);
1321
1322         yyls = yyls1;
1323         yyss = yyss1;
1324         yyvs = yyvs1;
1325       }
1326 #else /* no yyoverflow */
1327 # ifndef YYSTACK_RELOCATE
1328       goto yyexhaustedlab;
1329 # else
1330       /* Extend the stack our own way.  */
1331       if (YYMAXDEPTH <= yystacksize)
1332         goto yyexhaustedlab;
1333       yystacksize *= 2;
1334       if (YYMAXDEPTH < yystacksize)
1335         yystacksize = YYMAXDEPTH;
1336
1337       {
1338         yytype_int16 *yyss1 = yyss;
1339         union yyalloc *yyptr =
1340           (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1341         if (! yyptr)
1342           goto yyexhaustedlab;
1343         YYSTACK_RELOCATE (yyss_alloc, yyss);
1344         YYSTACK_RELOCATE (yyvs_alloc, yyvs);
1345         YYSTACK_RELOCATE (yyls_alloc, yyls);
1346 #  undef YYSTACK_RELOCATE
1347         if (yyss1 != yyssa)
1348           YYSTACK_FREE (yyss1);
1349       }
1350 # endif
1351 #endif /* no yyoverflow */
1352
1353       yyssp = yyss + yysize - 1;
1354       yyvsp = yyvs + yysize - 1;
1355       yylsp = yyls + yysize - 1;
1356
1357       YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1358                   (unsigned long int) yystacksize));
1359
1360       if (yyss + yystacksize - 1 <= yyssp)
1361         YYABORT;
1362     }
1363
1364   YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1365
1366   if (yystate == YYFINAL)
1367     YYACCEPT;
1368
1369   goto yybackup;
1370
1371 /*-----------.
1372 | yybackup.  |
1373 `-----------*/
1374 yybackup:
1375
1376   /* Do appropriate processing given the current state.  Read a
1377      lookahead token if we need one and don't already have one.  */
1378
1379   /* First try to decide what to do without reference to lookahead token.  */
1380   yyn = yypact[yystate];
1381   if (yypact_value_is_default (yyn))
1382     goto yydefault;
1383
1384   /* Not known => get a lookahead token if don't already have one.  */
1385
1386   /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol.  */
1387   if (yychar == YYEMPTY)
1388     {
1389       YYDPRINTF ((stderr, "Reading a token: "));
1390       yychar = yylex ();
1391     }
1392
1393   if (yychar <= YYEOF)
1394     {
1395       yychar = yytoken = YYEOF;
1396       YYDPRINTF ((stderr, "Now at end of input.\n"));
1397     }
1398   else
1399     {
1400       yytoken = YYTRANSLATE (yychar);
1401       YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
1402     }
1403
1404   /* If the proper action on seeing token YYTOKEN is to reduce or to
1405      detect an error, take that action.  */
1406   yyn += yytoken;
1407   if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1408     goto yydefault;
1409   yyn = yytable[yyn];
1410   if (yyn <= 0)
1411     {
1412       if (yytable_value_is_error (yyn))
1413         goto yyerrlab;
1414       yyn = -yyn;
1415       goto yyreduce;
1416     }
1417
1418   /* Count tokens shifted since error; after three, turn off error
1419      status.  */
1420   if (yyerrstatus)
1421     yyerrstatus--;
1422
1423   /* Shift the lookahead token.  */
1424   YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
1425
1426   /* Discard the shifted token.  */
1427   yychar = YYEMPTY;
1428
1429   yystate = yyn;
1430   YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1431   *++yyvsp = yylval;
1432   YY_IGNORE_MAYBE_UNINITIALIZED_END
1433   *++yylsp = yylloc;
1434   goto yynewstate;
1435
1436
1437 /*-----------------------------------------------------------.
1438 | yydefault -- do the default action for the current state.  |
1439 `-----------------------------------------------------------*/
1440 yydefault:
1441   yyn = yydefact[yystate];
1442   if (yyn == 0)
1443     goto yyerrlab;
1444   goto yyreduce;
1445
1446
1447 /*-----------------------------.
1448 | yyreduce -- Do a reduction.  |
1449 `-----------------------------*/
1450 yyreduce:
1451   /* yyn is the number of a rule to reduce with.  */
1452   yylen = yyr2[yyn];
1453
1454   /* If YYLEN is nonzero, implement the default value of the action:
1455      '$$ = $1'.
1456
1457      Otherwise, the following line sets YYVAL to garbage.
1458      This behavior is undocumented and Bison
1459      users should not rely upon it.  Assigning to YYVAL
1460      unconditionally makes the parser a bit smaller, and it avoids a
1461      GCC warning that YYVAL may be used uninitialized.  */
1462   yyval = yyvsp[1-yylen];
1463
1464   /* Default location.  */
1465   YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
1466   YY_REDUCE_PRINT (yyn);
1467   switch (yyn)
1468     {
1469         case 2:
1470 #line 110 "dtc-parser.y" /* yacc.c:1646  */
1471     {
1472                         parser_output = build_dt_info((yyvsp[-2].flags), (yyvsp[-1].re), (yyvsp[0].node),
1473                                                       guess_boot_cpuid((yyvsp[0].node)));
1474                 }
1475 #line 1476 "dtc-parser.tab.c" /* yacc.c:1646  */
1476     break;
1477
1478   case 3:
1479 #line 118 "dtc-parser.y" /* yacc.c:1646  */
1480     {
1481                         (yyval.flags) = DTSF_V1;
1482                 }
1483 #line 1484 "dtc-parser.tab.c" /* yacc.c:1646  */
1484     break;
1485
1486   case 4:
1487 #line 122 "dtc-parser.y" /* yacc.c:1646  */
1488     {
1489                         (yyval.flags) = DTSF_V1 | DTSF_PLUGIN;
1490                 }
1491 #line 1492 "dtc-parser.tab.c" /* yacc.c:1646  */
1492     break;
1493
1494   case 6:
1495 #line 130 "dtc-parser.y" /* yacc.c:1646  */
1496     {
1497                         if ((yyvsp[0].flags) != (yyvsp[-1].flags))
1498                                 ERROR(&(yylsp[0]), "Header flags don't match earlier ones");
1499                         (yyval.flags) = (yyvsp[-1].flags);
1500                 }
1501 #line 1502 "dtc-parser.tab.c" /* yacc.c:1646  */
1502     break;
1503
1504   case 7:
1505 #line 139 "dtc-parser.y" /* yacc.c:1646  */
1506     {
1507                         (yyval.re) = NULL;
1508                 }
1509 #line 1510 "dtc-parser.tab.c" /* yacc.c:1646  */
1510     break;
1511
1512   case 8:
1513 #line 143 "dtc-parser.y" /* yacc.c:1646  */
1514     {
1515                         (yyval.re) = chain_reserve_entry((yyvsp[-1].re), (yyvsp[0].re));
1516                 }
1517 #line 1518 "dtc-parser.tab.c" /* yacc.c:1646  */
1518     break;
1519
1520   case 9:
1521 #line 150 "dtc-parser.y" /* yacc.c:1646  */
1522     {
1523                         (yyval.re) = build_reserve_entry((yyvsp[-2].integer), (yyvsp[-1].integer));
1524                 }
1525 #line 1526 "dtc-parser.tab.c" /* yacc.c:1646  */
1526     break;
1527
1528   case 10:
1529 #line 154 "dtc-parser.y" /* yacc.c:1646  */
1530     {
1531                         add_label(&(yyvsp[0].re)->labels, (yyvsp[-1].labelref));
1532                         (yyval.re) = (yyvsp[0].re);
1533                 }
1534 #line 1535 "dtc-parser.tab.c" /* yacc.c:1646  */
1535     break;
1536
1537   case 11:
1538 #line 162 "dtc-parser.y" /* yacc.c:1646  */
1539     {
1540                         (yyval.node) = name_node((yyvsp[0].node), "");
1541                 }
1542 #line 1543 "dtc-parser.tab.c" /* yacc.c:1646  */
1543     break;
1544
1545   case 12:
1546 #line 166 "dtc-parser.y" /* yacc.c:1646  */
1547     {
1548                         (yyval.node) = merge_nodes((yyvsp[-2].node), (yyvsp[0].node));
1549                 }
1550 #line 1551 "dtc-parser.tab.c" /* yacc.c:1646  */
1551     break;
1552
1553   case 13:
1554 #line 171 "dtc-parser.y" /* yacc.c:1646  */
1555     {
1556                         struct node *target = get_node_by_ref((yyvsp[-3].node), (yyvsp[-1].labelref));
1557
1558                         if (target) {
1559                                 add_label(&target->labels, (yyvsp[-2].labelref));
1560                                 merge_nodes(target, (yyvsp[0].node));
1561                         } else
1562                                 ERROR(&(yylsp[-1]), "Label or path %s not found", (yyvsp[-1].labelref));
1563                         (yyval.node) = (yyvsp[-3].node);
1564                 }
1565 #line 1566 "dtc-parser.tab.c" /* yacc.c:1646  */
1566     break;
1567
1568   case 14:
1569 #line 182 "dtc-parser.y" /* yacc.c:1646  */
1570     {
1571                         struct node *target = get_node_by_ref((yyvsp[-2].node), (yyvsp[-1].labelref));
1572
1573                         if (target)
1574                                 merge_nodes(target, (yyvsp[0].node));
1575                         else
1576                                 ERROR(&(yylsp[-1]), "Label or path %s not found", (yyvsp[-1].labelref));
1577                         (yyval.node) = (yyvsp[-2].node);
1578                 }
1579 #line 1580 "dtc-parser.tab.c" /* yacc.c:1646  */
1580     break;
1581
1582   case 15:
1583 #line 192 "dtc-parser.y" /* yacc.c:1646  */
1584     {
1585                         struct node *target = get_node_by_ref((yyvsp[-3].node), (yyvsp[-1].labelref));
1586
1587                         if (target)
1588                                 delete_node(target);
1589                         else
1590                                 ERROR(&(yylsp[-1]), "Label or path %s not found", (yyvsp[-1].labelref));
1591
1592
1593                         (yyval.node) = (yyvsp[-3].node);
1594                 }
1595 #line 1596 "dtc-parser.tab.c" /* yacc.c:1646  */
1596     break;
1597
1598   case 16:
1599 #line 207 "dtc-parser.y" /* yacc.c:1646  */
1600     {
1601                         (yyval.node) = build_node((yyvsp[-3].proplist), (yyvsp[-2].nodelist));
1602                 }
1603 #line 1604 "dtc-parser.tab.c" /* yacc.c:1646  */
1604     break;
1605
1606   case 17:
1607 #line 214 "dtc-parser.y" /* yacc.c:1646  */
1608     {
1609                         (yyval.proplist) = NULL;
1610                 }
1611 #line 1612 "dtc-parser.tab.c" /* yacc.c:1646  */
1612     break;
1613
1614   case 18:
1615 #line 218 "dtc-parser.y" /* yacc.c:1646  */
1616     {
1617                         (yyval.proplist) = chain_property((yyvsp[0].prop), (yyvsp[-1].proplist));
1618                 }
1619 #line 1620 "dtc-parser.tab.c" /* yacc.c:1646  */
1620     break;
1621
1622   case 19:
1623 #line 225 "dtc-parser.y" /* yacc.c:1646  */
1624     {
1625                         (yyval.prop) = build_property((yyvsp[-3].propnodename), (yyvsp[-1].data));
1626                 }
1627 #line 1628 "dtc-parser.tab.c" /* yacc.c:1646  */
1628     break;
1629
1630   case 20:
1631 #line 229 "dtc-parser.y" /* yacc.c:1646  */
1632     {
1633                         (yyval.prop) = build_property((yyvsp[-1].propnodename), empty_data);
1634                 }
1635 #line 1636 "dtc-parser.tab.c" /* yacc.c:1646  */
1636     break;
1637
1638   case 21:
1639 #line 233 "dtc-parser.y" /* yacc.c:1646  */
1640     {
1641                         (yyval.prop) = build_property_delete((yyvsp[-1].propnodename));
1642                 }
1643 #line 1644 "dtc-parser.tab.c" /* yacc.c:1646  */
1644     break;
1645
1646   case 22:
1647 #line 237 "dtc-parser.y" /* yacc.c:1646  */
1648     {
1649                         add_label(&(yyvsp[0].prop)->labels, (yyvsp[-1].labelref));
1650                         (yyval.prop) = (yyvsp[0].prop);
1651                 }
1652 #line 1653 "dtc-parser.tab.c" /* yacc.c:1646  */
1653     break;
1654
1655   case 23:
1656 #line 245 "dtc-parser.y" /* yacc.c:1646  */
1657     {
1658                         (yyval.data) = data_merge((yyvsp[-1].data), (yyvsp[0].data));
1659                 }
1660 #line 1661 "dtc-parser.tab.c" /* yacc.c:1646  */
1661     break;
1662
1663   case 24:
1664 #line 249 "dtc-parser.y" /* yacc.c:1646  */
1665     {
1666                         (yyval.data) = data_merge((yyvsp[-2].data), (yyvsp[-1].array).data);
1667                 }
1668 #line 1669 "dtc-parser.tab.c" /* yacc.c:1646  */
1669     break;
1670
1671   case 25:
1672 #line 253 "dtc-parser.y" /* yacc.c:1646  */
1673     {
1674                         (yyval.data) = data_merge((yyvsp[-3].data), (yyvsp[-1].data));
1675                 }
1676 #line 1677 "dtc-parser.tab.c" /* yacc.c:1646  */
1677     break;
1678
1679   case 26:
1680 #line 257 "dtc-parser.y" /* yacc.c:1646  */
1681     {
1682                         (yyval.data) = data_add_marker((yyvsp[-1].data), REF_PATH, (yyvsp[0].labelref));
1683                 }
1684 #line 1685 "dtc-parser.tab.c" /* yacc.c:1646  */
1685     break;
1686
1687   case 27:
1688 #line 261 "dtc-parser.y" /* yacc.c:1646  */
1689     {
1690                         FILE *f = srcfile_relative_open((yyvsp[-5].data).val, NULL);
1691                         struct data d;
1692
1693                         if ((yyvsp[-3].integer) != 0)
1694                                 if (fseek(f, (yyvsp[-3].integer), SEEK_SET) != 0)
1695                                         die("Couldn't seek to offset %llu in \"%s\": %s",
1696                                             (unsigned long long)(yyvsp[-3].integer), (yyvsp[-5].data).val,
1697                                             strerror(errno));
1698
1699                         d = data_copy_file(f, (yyvsp[-1].integer));
1700
1701                         (yyval.data) = data_merge((yyvsp[-8].data), d);
1702                         fclose(f);
1703                 }
1704 #line 1705 "dtc-parser.tab.c" /* yacc.c:1646  */
1705     break;
1706
1707   case 28:
1708 #line 277 "dtc-parser.y" /* yacc.c:1646  */
1709     {
1710                         FILE *f = srcfile_relative_open((yyvsp[-1].data).val, NULL);
1711                         struct data d = empty_data;
1712
1713                         d = data_copy_file(f, -1);
1714
1715                         (yyval.data) = data_merge((yyvsp[-4].data), d);
1716                         fclose(f);
1717                 }
1718 #line 1719 "dtc-parser.tab.c" /* yacc.c:1646  */
1719     break;
1720
1721   case 29:
1722 #line 287 "dtc-parser.y" /* yacc.c:1646  */
1723     {
1724                         (yyval.data) = data_add_marker((yyvsp[-1].data), LABEL, (yyvsp[0].labelref));
1725                 }
1726 #line 1727 "dtc-parser.tab.c" /* yacc.c:1646  */
1727     break;
1728
1729   case 30:
1730 #line 294 "dtc-parser.y" /* yacc.c:1646  */
1731     {
1732                         (yyval.data) = empty_data;
1733                 }
1734 #line 1735 "dtc-parser.tab.c" /* yacc.c:1646  */
1735     break;
1736
1737   case 31:
1738 #line 298 "dtc-parser.y" /* yacc.c:1646  */
1739     {
1740                         (yyval.data) = (yyvsp[-1].data);
1741                 }
1742 #line 1743 "dtc-parser.tab.c" /* yacc.c:1646  */
1743     break;
1744
1745   case 32:
1746 #line 302 "dtc-parser.y" /* yacc.c:1646  */
1747     {
1748                         (yyval.data) = data_add_marker((yyvsp[-1].data), LABEL, (yyvsp[0].labelref));
1749                 }
1750 #line 1751 "dtc-parser.tab.c" /* yacc.c:1646  */
1751     break;
1752
1753   case 33:
1754 #line 309 "dtc-parser.y" /* yacc.c:1646  */
1755     {
1756                         unsigned long long bits;
1757
1758                         bits = (yyvsp[-1].integer);
1759
1760                         if ((bits !=  8) && (bits != 16) &&
1761                             (bits != 32) && (bits != 64)) {
1762                                 ERROR(&(yylsp[-1]), "Array elements must be"
1763                                       " 8, 16, 32 or 64-bits");
1764                                 bits = 32;
1765                         }
1766
1767                         (yyval.array).data = empty_data;
1768                         (yyval.array).bits = bits;
1769                 }
1770 #line 1771 "dtc-parser.tab.c" /* yacc.c:1646  */
1771     break;
1772
1773   case 34:
1774 #line 325 "dtc-parser.y" /* yacc.c:1646  */
1775     {
1776                         (yyval.array).data = empty_data;
1777                         (yyval.array).bits = 32;
1778                 }
1779 #line 1780 "dtc-parser.tab.c" /* yacc.c:1646  */
1780     break;
1781
1782   case 35:
1783 #line 330 "dtc-parser.y" /* yacc.c:1646  */
1784     {
1785                         if ((yyvsp[-1].array).bits < 64) {
1786                                 uint64_t mask = (1ULL << (yyvsp[-1].array).bits) - 1;
1787                                 /*
1788                                  * Bits above mask must either be all zero
1789                                  * (positive within range of mask) or all one
1790                                  * (negative and sign-extended). The second
1791                                  * condition is true if when we set all bits
1792                                  * within the mask to one (i.e. | in the
1793                                  * mask), all bits are one.
1794                                  */
1795                                 if (((yyvsp[0].integer) > mask) && (((yyvsp[0].integer) | mask) != -1ULL))
1796                                         ERROR(&(yylsp[0]), "Value out of range for"
1797                                               " %d-bit array element", (yyvsp[-1].array).bits);
1798                         }
1799
1800                         (yyval.array).data = data_append_integer((yyvsp[-1].array).data, (yyvsp[0].integer), (yyvsp[-1].array).bits);
1801                 }
1802 #line 1803 "dtc-parser.tab.c" /* yacc.c:1646  */
1803     break;
1804
1805   case 36:
1806 #line 349 "dtc-parser.y" /* yacc.c:1646  */
1807     {
1808                         uint64_t val = ~0ULL >> (64 - (yyvsp[-1].array).bits);
1809
1810                         if ((yyvsp[-1].array).bits == 32)
1811                                 (yyvsp[-1].array).data = data_add_marker((yyvsp[-1].array).data,
1812                                                           REF_PHANDLE,
1813                                                           (yyvsp[0].labelref));
1814                         else
1815                                 ERROR(&(yylsp[0]), "References are only allowed in "
1816                                             "arrays with 32-bit elements.");
1817
1818                         (yyval.array).data = data_append_integer((yyvsp[-1].array).data, val, (yyvsp[-1].array).bits);
1819                 }
1820 #line 1821 "dtc-parser.tab.c" /* yacc.c:1646  */
1821     break;
1822
1823   case 37:
1824 #line 363 "dtc-parser.y" /* yacc.c:1646  */
1825     {
1826                         (yyval.array).data = data_add_marker((yyvsp[-1].array).data, LABEL, (yyvsp[0].labelref));
1827                 }
1828 #line 1829 "dtc-parser.tab.c" /* yacc.c:1646  */
1829     break;
1830
1831   case 40:
1832 #line 372 "dtc-parser.y" /* yacc.c:1646  */
1833     {
1834                         (yyval.integer) = (yyvsp[-1].integer);
1835                 }
1836 #line 1837 "dtc-parser.tab.c" /* yacc.c:1646  */
1837     break;
1838
1839   case 43:
1840 #line 383 "dtc-parser.y" /* yacc.c:1646  */
1841     { (yyval.integer) = (yyvsp[-4].integer) ? (yyvsp[-2].integer) : (yyvsp[0].integer); }
1842 #line 1843 "dtc-parser.tab.c" /* yacc.c:1646  */
1843     break;
1844
1845   case 45:
1846 #line 388 "dtc-parser.y" /* yacc.c:1646  */
1847     { (yyval.integer) = (yyvsp[-2].integer) || (yyvsp[0].integer); }
1848 #line 1849 "dtc-parser.tab.c" /* yacc.c:1646  */
1849     break;
1850
1851   case 47:
1852 #line 393 "dtc-parser.y" /* yacc.c:1646  */
1853     { (yyval.integer) = (yyvsp[-2].integer) && (yyvsp[0].integer); }
1854 #line 1855 "dtc-parser.tab.c" /* yacc.c:1646  */
1855     break;
1856
1857   case 49:
1858 #line 398 "dtc-parser.y" /* yacc.c:1646  */
1859     { (yyval.integer) = (yyvsp[-2].integer) | (yyvsp[0].integer); }
1860 #line 1861 "dtc-parser.tab.c" /* yacc.c:1646  */
1861     break;
1862
1863   case 51:
1864 #line 403 "dtc-parser.y" /* yacc.c:1646  */
1865     { (yyval.integer) = (yyvsp[-2].integer) ^ (yyvsp[0].integer); }
1866 #line 1867 "dtc-parser.tab.c" /* yacc.c:1646  */
1867     break;
1868
1869   case 53:
1870 #line 408 "dtc-parser.y" /* yacc.c:1646  */
1871     { (yyval.integer) = (yyvsp[-2].integer) & (yyvsp[0].integer); }
1872 #line 1873 "dtc-parser.tab.c" /* yacc.c:1646  */
1873     break;
1874
1875   case 55:
1876 #line 413 "dtc-parser.y" /* yacc.c:1646  */
1877     { (yyval.integer) = (yyvsp[-2].integer) == (yyvsp[0].integer); }
1878 #line 1879 "dtc-parser.tab.c" /* yacc.c:1646  */
1879     break;
1880
1881   case 56:
1882 #line 414 "dtc-parser.y" /* yacc.c:1646  */
1883     { (yyval.integer) = (yyvsp[-2].integer) != (yyvsp[0].integer); }
1884 #line 1885 "dtc-parser.tab.c" /* yacc.c:1646  */
1885     break;
1886
1887   case 58:
1888 #line 419 "dtc-parser.y" /* yacc.c:1646  */
1889     { (yyval.integer) = (yyvsp[-2].integer) < (yyvsp[0].integer); }
1890 #line 1891 "dtc-parser.tab.c" /* yacc.c:1646  */
1891     break;
1892
1893   case 59:
1894 #line 420 "dtc-parser.y" /* yacc.c:1646  */
1895     { (yyval.integer) = (yyvsp[-2].integer) > (yyvsp[0].integer); }
1896 #line 1897 "dtc-parser.tab.c" /* yacc.c:1646  */
1897     break;
1898
1899   case 60:
1900 #line 421 "dtc-parser.y" /* yacc.c:1646  */
1901     { (yyval.integer) = (yyvsp[-2].integer) <= (yyvsp[0].integer); }
1902 #line 1903 "dtc-parser.tab.c" /* yacc.c:1646  */
1903     break;
1904
1905   case 61:
1906 #line 422 "dtc-parser.y" /* yacc.c:1646  */
1907     { (yyval.integer) = (yyvsp[-2].integer) >= (yyvsp[0].integer); }
1908 #line 1909 "dtc-parser.tab.c" /* yacc.c:1646  */
1909     break;
1910
1911   case 62:
1912 #line 426 "dtc-parser.y" /* yacc.c:1646  */
1913     { (yyval.integer) = (yyvsp[-2].integer) << (yyvsp[0].integer); }
1914 #line 1915 "dtc-parser.tab.c" /* yacc.c:1646  */
1915     break;
1916
1917   case 63:
1918 #line 427 "dtc-parser.y" /* yacc.c:1646  */
1919     { (yyval.integer) = (yyvsp[-2].integer) >> (yyvsp[0].integer); }
1920 #line 1921 "dtc-parser.tab.c" /* yacc.c:1646  */
1921     break;
1922
1923   case 65:
1924 #line 432 "dtc-parser.y" /* yacc.c:1646  */
1925     { (yyval.integer) = (yyvsp[-2].integer) + (yyvsp[0].integer); }
1926 #line 1927 "dtc-parser.tab.c" /* yacc.c:1646  */
1927     break;
1928
1929   case 66:
1930 #line 433 "dtc-parser.y" /* yacc.c:1646  */
1931     { (yyval.integer) = (yyvsp[-2].integer) - (yyvsp[0].integer); }
1932 #line 1933 "dtc-parser.tab.c" /* yacc.c:1646  */
1933     break;
1934
1935   case 68:
1936 #line 438 "dtc-parser.y" /* yacc.c:1646  */
1937     { (yyval.integer) = (yyvsp[-2].integer) * (yyvsp[0].integer); }
1938 #line 1939 "dtc-parser.tab.c" /* yacc.c:1646  */
1939     break;
1940
1941   case 69:
1942 #line 440 "dtc-parser.y" /* yacc.c:1646  */
1943     {
1944                         if ((yyvsp[0].integer) != 0) {
1945                                 (yyval.integer) = (yyvsp[-2].integer) / (yyvsp[0].integer);
1946                         } else {
1947                                 ERROR(&(yyloc), "Division by zero");
1948                                 (yyval.integer) = 0;
1949                         }
1950                 }
1951 #line 1952 "dtc-parser.tab.c" /* yacc.c:1646  */
1952     break;
1953
1954   case 70:
1955 #line 449 "dtc-parser.y" /* yacc.c:1646  */
1956     {
1957                         if ((yyvsp[0].integer) != 0) {
1958                                 (yyval.integer) = (yyvsp[-2].integer) % (yyvsp[0].integer);
1959                         } else {
1960                                 ERROR(&(yyloc), "Division by zero");
1961                                 (yyval.integer) = 0;
1962                         }
1963                 }
1964 #line 1965 "dtc-parser.tab.c" /* yacc.c:1646  */
1965     break;
1966
1967   case 73:
1968 #line 462 "dtc-parser.y" /* yacc.c:1646  */
1969     { (yyval.integer) = -(yyvsp[0].integer); }
1970 #line 1971 "dtc-parser.tab.c" /* yacc.c:1646  */
1971     break;
1972
1973   case 74:
1974 #line 463 "dtc-parser.y" /* yacc.c:1646  */
1975     { (yyval.integer) = ~(yyvsp[0].integer); }
1976 #line 1977 "dtc-parser.tab.c" /* yacc.c:1646  */
1977     break;
1978
1979   case 75:
1980 #line 464 "dtc-parser.y" /* yacc.c:1646  */
1981     { (yyval.integer) = !(yyvsp[0].integer); }
1982 #line 1983 "dtc-parser.tab.c" /* yacc.c:1646  */
1983     break;
1984
1985   case 76:
1986 #line 469 "dtc-parser.y" /* yacc.c:1646  */
1987     {
1988                         (yyval.data) = empty_data;
1989                 }
1990 #line 1991 "dtc-parser.tab.c" /* yacc.c:1646  */
1991     break;
1992
1993   case 77:
1994 #line 473 "dtc-parser.y" /* yacc.c:1646  */
1995     {
1996                         (yyval.data) = data_append_byte((yyvsp[-1].data), (yyvsp[0].byte));
1997                 }
1998 #line 1999 "dtc-parser.tab.c" /* yacc.c:1646  */
1999     break;
2000
2001   case 78:
2002 #line 477 "dtc-parser.y" /* yacc.c:1646  */
2003     {
2004                         (yyval.data) = data_add_marker((yyvsp[-1].data), LABEL, (yyvsp[0].labelref));
2005                 }
2006 #line 2007 "dtc-parser.tab.c" /* yacc.c:1646  */
2007     break;
2008
2009   case 79:
2010 #line 484 "dtc-parser.y" /* yacc.c:1646  */
2011     {
2012                         (yyval.nodelist) = NULL;
2013                 }
2014 #line 2015 "dtc-parser.tab.c" /* yacc.c:1646  */
2015     break;
2016
2017   case 80:
2018 #line 488 "dtc-parser.y" /* yacc.c:1646  */
2019     {
2020                         (yyval.nodelist) = chain_node((yyvsp[-1].node), (yyvsp[0].nodelist));
2021                 }
2022 #line 2023 "dtc-parser.tab.c" /* yacc.c:1646  */
2023     break;
2024
2025   case 81:
2026 #line 492 "dtc-parser.y" /* yacc.c:1646  */
2027     {
2028                         ERROR(&(yylsp[0]), "Properties must precede subnodes");
2029                         YYERROR;
2030                 }
2031 #line 2032 "dtc-parser.tab.c" /* yacc.c:1646  */
2032     break;
2033
2034   case 82:
2035 #line 500 "dtc-parser.y" /* yacc.c:1646  */
2036     {
2037                         (yyval.node) = name_node((yyvsp[0].node), (yyvsp[-1].propnodename));
2038                 }
2039 #line 2040 "dtc-parser.tab.c" /* yacc.c:1646  */
2040     break;
2041
2042   case 83:
2043 #line 504 "dtc-parser.y" /* yacc.c:1646  */
2044     {
2045                         (yyval.node) = name_node(build_node_delete(), (yyvsp[-1].propnodename));
2046                 }
2047 #line 2048 "dtc-parser.tab.c" /* yacc.c:1646  */
2048     break;
2049
2050   case 84:
2051 #line 508 "dtc-parser.y" /* yacc.c:1646  */
2052     {
2053                         add_label(&(yyvsp[0].node)->labels, (yyvsp[-1].labelref));
2054                         (yyval.node) = (yyvsp[0].node);
2055                 }
2056 #line 2057 "dtc-parser.tab.c" /* yacc.c:1646  */
2057     break;
2058
2059
2060 #line 2061 "dtc-parser.tab.c" /* yacc.c:1646  */
2061       default: break;
2062     }
2063   /* User semantic actions sometimes alter yychar, and that requires
2064      that yytoken be updated with the new translation.  We take the
2065      approach of translating immediately before every use of yytoken.
2066      One alternative is translating here after every semantic action,
2067      but that translation would be missed if the semantic action invokes
2068      YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
2069      if it invokes YYBACKUP.  In the case of YYABORT or YYACCEPT, an
2070      incorrect destructor might then be invoked immediately.  In the
2071      case of YYERROR or YYBACKUP, subsequent parser actions might lead
2072      to an incorrect destructor call or verbose syntax error message
2073      before the lookahead is translated.  */
2074   YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
2075
2076   YYPOPSTACK (yylen);
2077   yylen = 0;
2078   YY_STACK_PRINT (yyss, yyssp);
2079
2080   *++yyvsp = yyval;
2081   *++yylsp = yyloc;
2082
2083   /* Now 'shift' the result of the reduction.  Determine what state
2084      that goes to, based on the state we popped back to and the rule
2085      number reduced by.  */
2086
2087   yyn = yyr1[yyn];
2088
2089   yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
2090   if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
2091     yystate = yytable[yystate];
2092   else
2093     yystate = yydefgoto[yyn - YYNTOKENS];
2094
2095   goto yynewstate;
2096
2097
2098 /*--------------------------------------.
2099 | yyerrlab -- here on detecting error.  |
2100 `--------------------------------------*/
2101 yyerrlab:
2102   /* Make sure we have latest lookahead translation.  See comments at
2103      user semantic actions for why this is necessary.  */
2104   yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
2105
2106   /* If not already recovering from an error, report this error.  */
2107   if (!yyerrstatus)
2108     {
2109       ++yynerrs;
2110 #if ! YYERROR_VERBOSE
2111       yyerror (YY_("syntax error"));
2112 #else
2113 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
2114                                         yyssp, yytoken)
2115       {
2116         char const *yymsgp = YY_("syntax error");
2117         int yysyntax_error_status;
2118         yysyntax_error_status = YYSYNTAX_ERROR;
2119         if (yysyntax_error_status == 0)
2120           yymsgp = yymsg;
2121         else if (yysyntax_error_status == 1)
2122           {
2123             if (yymsg != yymsgbuf)
2124               YYSTACK_FREE (yymsg);
2125             yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
2126             if (!yymsg)
2127               {
2128                 yymsg = yymsgbuf;
2129                 yymsg_alloc = sizeof yymsgbuf;
2130                 yysyntax_error_status = 2;
2131               }
2132             else
2133               {
2134                 yysyntax_error_status = YYSYNTAX_ERROR;
2135                 yymsgp = yymsg;
2136               }
2137           }
2138         yyerror (yymsgp);
2139         if (yysyntax_error_status == 2)
2140           goto yyexhaustedlab;
2141       }
2142 # undef YYSYNTAX_ERROR
2143 #endif
2144     }
2145
2146   yyerror_range[1] = yylloc;
2147
2148   if (yyerrstatus == 3)
2149     {
2150       /* If just tried and failed to reuse lookahead token after an
2151          error, discard it.  */
2152
2153       if (yychar <= YYEOF)
2154         {
2155           /* Return failure if at end of input.  */
2156           if (yychar == YYEOF)
2157             YYABORT;
2158         }
2159       else
2160         {
2161           yydestruct ("Error: discarding",
2162                       yytoken, &yylval, &yylloc);
2163           yychar = YYEMPTY;
2164         }
2165     }
2166
2167   /* Else will try to reuse lookahead token after shifting the error
2168      token.  */
2169   goto yyerrlab1;
2170
2171
2172 /*---------------------------------------------------.
2173 | yyerrorlab -- error raised explicitly by YYERROR.  |
2174 `---------------------------------------------------*/
2175 yyerrorlab:
2176
2177   /* Pacify compilers like GCC when the user code never invokes
2178      YYERROR and the label yyerrorlab therefore never appears in user
2179      code.  */
2180   if (/*CONSTCOND*/ 0)
2181      goto yyerrorlab;
2182
2183   yyerror_range[1] = yylsp[1-yylen];
2184   /* Do not reclaim the symbols of the rule whose action triggered
2185      this YYERROR.  */
2186   YYPOPSTACK (yylen);
2187   yylen = 0;
2188   YY_STACK_PRINT (yyss, yyssp);
2189   yystate = *yyssp;
2190   goto yyerrlab1;
2191
2192
2193 /*-------------------------------------------------------------.
2194 | yyerrlab1 -- common code for both syntax error and YYERROR.  |
2195 `-------------------------------------------------------------*/
2196 yyerrlab1:
2197   yyerrstatus = 3;      /* Each real token shifted decrements this.  */
2198
2199   for (;;)
2200     {
2201       yyn = yypact[yystate];
2202       if (!yypact_value_is_default (yyn))
2203         {
2204           yyn += YYTERROR;
2205           if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
2206             {
2207               yyn = yytable[yyn];
2208               if (0 < yyn)
2209                 break;
2210             }
2211         }
2212
2213       /* Pop the current state because it cannot handle the error token.  */
2214       if (yyssp == yyss)
2215         YYABORT;
2216
2217       yyerror_range[1] = *yylsp;
2218       yydestruct ("Error: popping",
2219                   yystos[yystate], yyvsp, yylsp);
2220       YYPOPSTACK (1);
2221       yystate = *yyssp;
2222       YY_STACK_PRINT (yyss, yyssp);
2223     }
2224
2225   YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
2226   *++yyvsp = yylval;
2227   YY_IGNORE_MAYBE_UNINITIALIZED_END
2228
2229   yyerror_range[2] = yylloc;
2230   /* Using YYLLOC is tempting, but would change the location of
2231      the lookahead.  YYLOC is available though.  */
2232   YYLLOC_DEFAULT (yyloc, yyerror_range, 2);
2233   *++yylsp = yyloc;
2234
2235   /* Shift the error token.  */
2236   YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
2237
2238   yystate = yyn;
2239   goto yynewstate;
2240
2241
2242 /*-------------------------------------.
2243 | yyacceptlab -- YYACCEPT comes here.  |
2244 `-------------------------------------*/
2245 yyacceptlab:
2246   yyresult = 0;
2247   goto yyreturn;
2248
2249 /*-----------------------------------.
2250 | yyabortlab -- YYABORT comes here.  |
2251 `-----------------------------------*/
2252 yyabortlab:
2253   yyresult = 1;
2254   goto yyreturn;
2255
2256 #if !defined yyoverflow || YYERROR_VERBOSE
2257 /*-------------------------------------------------.
2258 | yyexhaustedlab -- memory exhaustion comes here.  |
2259 `-------------------------------------------------*/
2260 yyexhaustedlab:
2261   yyerror (YY_("memory exhausted"));
2262   yyresult = 2;
2263   /* Fall through.  */
2264 #endif
2265
2266 yyreturn:
2267   if (yychar != YYEMPTY)
2268     {
2269       /* Make sure we have latest lookahead translation.  See comments at
2270          user semantic actions for why this is necessary.  */
2271       yytoken = YYTRANSLATE (yychar);
2272       yydestruct ("Cleanup: discarding lookahead",
2273                   yytoken, &yylval, &yylloc);
2274     }
2275   /* Do not reclaim the symbols of the rule whose action triggered
2276      this YYABORT or YYACCEPT.  */
2277   YYPOPSTACK (yylen);
2278   YY_STACK_PRINT (yyss, yyssp);
2279   while (yyssp != yyss)
2280     {
2281       yydestruct ("Cleanup: popping",
2282                   yystos[*yyssp], yyvsp, yylsp);
2283       YYPOPSTACK (1);
2284     }
2285 #ifndef yyoverflow
2286   if (yyss != yyssa)
2287     YYSTACK_FREE (yyss);
2288 #endif
2289 #if YYERROR_VERBOSE
2290   if (yymsg != yymsgbuf)
2291     YYSTACK_FREE (yymsg);
2292 #endif
2293   return yyresult;
2294 }
2295 #line 514 "dtc-parser.y" /* yacc.c:1906  */
2296
2297
2298 void yyerror(char const *s)
2299 {
2300         ERROR(&yylloc, "%s", s);
2301 }