Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
[linux-2.6/libata-dev.git] / scripts / dtc / dtc-parser.tab.c_shipped
blob4af55900a15ba22f1c5b37239038e7d8bb4090ed
2 /* A Bison parser, made by GNU Bison 2.4.1.  */
4 /* Skeleton implementation for Bison's Yacc-like parsers in C
5    
6       Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
7    Free Software Foundation, Inc.
8    
9    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
11    the Free Software Foundation, either version 3 of the License, or
12    (at your option) any later version.
13    
14    This program is distributed in the hope that it will be useful,
15    but WITHOUT ANY WARRANTY; without even the implied warranty of
16    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17    GNU General Public License for more details.
18    
19    You should have received a copy of the GNU General Public License
20    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
22 /* As a special exception, you may create a larger work that contains
23    part or all of the Bison parser skeleton and distribute that work
24    under terms of your choice, so long as that work isn't itself a
25    parser generator using the skeleton or a modified version thereof
26    as a parser skeleton.  Alternatively, if you modify or redistribute
27    the parser skeleton itself, you may (at your option) remove this
28    special exception, which will cause the skeleton and the resulting
29    Bison output files to be licensed under the GNU General Public
30    License without this special exception.
31    
32    This special exception was added by the Free Software Foundation in
33    version 2.2 of Bison.  */
35 /* C LALR(1) parser skeleton written by Richard Stallman, by
36    simplifying the original so-called "semantic" parser.  */
38 /* All symbols defined below should begin with yy or YY, to avoid
39    infringing on user name space.  This should be done even for local
40    variables, as they might otherwise be expanded by user macros.
41    There are some unavoidable exceptions within include files to
42    define necessary library symbols; they are noted "INFRINGES ON
43    USER NAME SPACE" below.  */
45 /* Identify Bison output.  */
46 #define YYBISON 1
48 /* Bison version.  */
49 #define YYBISON_VERSION "2.4.1"
51 /* Skeleton name.  */
52 #define YYSKELETON_NAME "yacc.c"
54 /* Pure parsers.  */
55 #define YYPURE 0
57 /* Push parsers.  */
58 #define YYPUSH 0
60 /* Pull parsers.  */
61 #define YYPULL 1
63 /* Using locations.  */
64 #define YYLSP_NEEDED 0
68 /* Copy the first part of user declarations.  */
70 /* Line 189 of yacc.c  */
71 #line 21 "dtc-parser.y"
73 #include <stdio.h>
75 #include "dtc.h"
76 #include "srcpos.h"
78 YYLTYPE yylloc;
80 extern int yylex(void);
81 extern void print_error(char const *fmt, ...);
82 extern void yyerror(char const *s);
84 extern struct boot_info *the_boot_info;
85 extern int treesource_error;
87 static unsigned long long eval_literal(const char *s, int base, int bits);
88 static unsigned char eval_char_literal(const char *s);
91 /* Line 189 of yacc.c  */
92 #line 93 "dtc-parser.tab.c"
94 /* Enabling traces.  */
95 #ifndef YYDEBUG
96 # define YYDEBUG 0
97 #endif
99 /* Enabling verbose error messages.  */
100 #ifdef YYERROR_VERBOSE
101 # undef YYERROR_VERBOSE
102 # define YYERROR_VERBOSE 1
103 #else
104 # define YYERROR_VERBOSE 0
105 #endif
107 /* Enabling the token table.  */
108 #ifndef YYTOKEN_TABLE
109 # define YYTOKEN_TABLE 0
110 #endif
113 /* Tokens.  */
114 #ifndef YYTOKENTYPE
115 # define YYTOKENTYPE
116    /* Put the tokens into the symbol table, so that GDB and other debuggers
117       know about them.  */
118    enum yytokentype {
119      DT_V1 = 258,
120      DT_MEMRESERVE = 259,
121      DT_LSHIFT = 260,
122      DT_RSHIFT = 261,
123      DT_LE = 262,
124      DT_GE = 263,
125      DT_EQ = 264,
126      DT_NE = 265,
127      DT_AND = 266,
128      DT_OR = 267,
129      DT_BITS = 268,
130      DT_DEL_PROP = 269,
131      DT_DEL_NODE = 270,
132      DT_PROPNODENAME = 271,
133      DT_LITERAL = 272,
134      DT_CHAR_LITERAL = 273,
135      DT_BASE = 274,
136      DT_BYTE = 275,
137      DT_STRING = 276,
138      DT_LABEL = 277,
139      DT_REF = 278,
140      DT_INCBIN = 279
141    };
142 #endif
146 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
147 typedef union YYSTYPE
150 /* Line 214 of yacc.c  */
151 #line 40 "dtc-parser.y"
153         char *propnodename;
154         char *literal;
155         char *labelref;
156         unsigned int cbase;
157         uint8_t byte;
158         struct data data;
160         struct {
161                 struct data     data;
162                 int             bits;
163         } array;
165         struct property *prop;
166         struct property *proplist;
167         struct node *node;
168         struct node *nodelist;
169         struct reserve_info *re;
170         uint64_t integer;
174 /* Line 214 of yacc.c  */
175 #line 176 "dtc-parser.tab.c"
176 } YYSTYPE;
177 # define YYSTYPE_IS_TRIVIAL 1
178 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
179 # define YYSTYPE_IS_DECLARED 1
180 #endif
183 /* Copy the second part of user declarations.  */
186 /* Line 264 of yacc.c  */
187 #line 188 "dtc-parser.tab.c"
189 #ifdef short
190 # undef short
191 #endif
193 #ifdef YYTYPE_UINT8
194 typedef YYTYPE_UINT8 yytype_uint8;
195 #else
196 typedef unsigned char yytype_uint8;
197 #endif
199 #ifdef YYTYPE_INT8
200 typedef YYTYPE_INT8 yytype_int8;
201 #elif (defined __STDC__ || defined __C99__FUNC__ \
202      || defined __cplusplus || defined _MSC_VER)
203 typedef signed char yytype_int8;
204 #else
205 typedef short int yytype_int8;
206 #endif
208 #ifdef YYTYPE_UINT16
209 typedef YYTYPE_UINT16 yytype_uint16;
210 #else
211 typedef unsigned short int yytype_uint16;
212 #endif
214 #ifdef YYTYPE_INT16
215 typedef YYTYPE_INT16 yytype_int16;
216 #else
217 typedef short int yytype_int16;
218 #endif
220 #ifndef YYSIZE_T
221 # ifdef __SIZE_TYPE__
222 #  define YYSIZE_T __SIZE_TYPE__
223 # elif defined size_t
224 #  define YYSIZE_T size_t
225 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
226      || defined __cplusplus || defined _MSC_VER)
227 #  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
228 #  define YYSIZE_T size_t
229 # else
230 #  define YYSIZE_T unsigned int
231 # endif
232 #endif
234 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
236 #ifndef YY_
237 # if YYENABLE_NLS
238 #  if ENABLE_NLS
239 #   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
240 #   define YY_(msgid) dgettext ("bison-runtime", msgid)
241 #  endif
242 # endif
243 # ifndef YY_
244 #  define YY_(msgid) msgid
245 # endif
246 #endif
248 /* Suppress unused-variable warnings by "using" E.  */
249 #if ! defined lint || defined __GNUC__
250 # define YYUSE(e) ((void) (e))
251 #else
252 # define YYUSE(e) /* empty */
253 #endif
255 /* Identity function, used to suppress warnings about constant conditions.  */
256 #ifndef lint
257 # define YYID(n) (n)
258 #else
259 #if (defined __STDC__ || defined __C99__FUNC__ \
260      || defined __cplusplus || defined _MSC_VER)
261 static int
262 YYID (int yyi)
263 #else
264 static int
265 YYID (yyi)
266     int yyi;
267 #endif
269   return yyi;
271 #endif
273 #if ! defined yyoverflow || YYERROR_VERBOSE
275 /* The parser invokes alloca or malloc; define the necessary symbols.  */
277 # ifdef YYSTACK_USE_ALLOCA
278 #  if YYSTACK_USE_ALLOCA
279 #   ifdef __GNUC__
280 #    define YYSTACK_ALLOC __builtin_alloca
281 #   elif defined __BUILTIN_VA_ARG_INCR
282 #    include <alloca.h> /* INFRINGES ON USER NAME SPACE */
283 #   elif defined _AIX
284 #    define YYSTACK_ALLOC __alloca
285 #   elif defined _MSC_VER
286 #    include <malloc.h> /* INFRINGES ON USER NAME SPACE */
287 #    define alloca _alloca
288 #   else
289 #    define YYSTACK_ALLOC alloca
290 #    if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
291      || defined __cplusplus || defined _MSC_VER)
292 #     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
293 #     ifndef _STDLIB_H
294 #      define _STDLIB_H 1
295 #     endif
296 #    endif
297 #   endif
298 #  endif
299 # endif
301 # ifdef YYSTACK_ALLOC
302    /* Pacify GCC's `empty if-body' warning.  */
303 #  define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
304 #  ifndef YYSTACK_ALLOC_MAXIMUM
305     /* The OS might guarantee only one guard page at the bottom of the stack,
306        and a page size can be as small as 4096 bytes.  So we cannot safely
307        invoke alloca (N) if N exceeds 4096.  Use a slightly smaller number
308        to allow for a few compiler-allocated temporary stack slots.  */
309 #   define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
310 #  endif
311 # else
312 #  define YYSTACK_ALLOC YYMALLOC
313 #  define YYSTACK_FREE YYFREE
314 #  ifndef YYSTACK_ALLOC_MAXIMUM
315 #   define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
316 #  endif
317 #  if (defined __cplusplus && ! defined _STDLIB_H \
318        && ! ((defined YYMALLOC || defined malloc) \
319              && (defined YYFREE || defined free)))
320 #   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
321 #   ifndef _STDLIB_H
322 #    define _STDLIB_H 1
323 #   endif
324 #  endif
325 #  ifndef YYMALLOC
326 #   define YYMALLOC malloc
327 #   if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
328      || defined __cplusplus || defined _MSC_VER)
329 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
330 #   endif
331 #  endif
332 #  ifndef YYFREE
333 #   define YYFREE free
334 #   if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
335      || defined __cplusplus || defined _MSC_VER)
336 void free (void *); /* INFRINGES ON USER NAME SPACE */
337 #   endif
338 #  endif
339 # endif
340 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
343 #if (! defined yyoverflow \
344      && (! defined __cplusplus \
345          || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
347 /* A type that is properly aligned for any stack member.  */
348 union yyalloc
350   yytype_int16 yyss_alloc;
351   YYSTYPE yyvs_alloc;
354 /* The size of the maximum gap between one aligned stack and the next.  */
355 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
357 /* The size of an array large to enough to hold all stacks, each with
358    N elements.  */
359 # define YYSTACK_BYTES(N) \
360      ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
361       + YYSTACK_GAP_MAXIMUM)
363 /* Copy COUNT objects from FROM to TO.  The source and destination do
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
381 /* Relocate STACK from its old location to the new one.  The
382    local variables YYSIZE and YYSTACKSIZE give the old and new number of
383    elements in the stack, and YYPTR gives the new location of the
384    stack.  Advance YYPTR to a properly aligned location for the next
385    stack.  */
386 # define YYSTACK_RELOCATE(Stack_alloc, Stack)                           \
387     do                                                                  \
388       {                                                                 \
389         YYSIZE_T yynewbytes;                                            \
390         YYCOPY (&yyptr->Stack_alloc, Stack, yysize);                    \
391         Stack = &yyptr->Stack_alloc;                                    \
392         yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
393         yyptr += yynewbytes / sizeof (*yyptr);                          \
394       }                                                                 \
395     while (YYID (0))
397 #endif
399 /* YYFINAL -- State number of the termination state.  */
400 #define YYFINAL  4
401 /* YYLAST -- Last index in YYTABLE.  */
402 #define YYLAST   133
404 /* YYNTOKENS -- Number of terminals.  */
405 #define YYNTOKENS  48
406 /* YYNNTS -- Number of nonterminals.  */
407 #define YYNNTS  28
408 /* YYNRULES -- Number of rules.  */
409 #define YYNRULES  79
410 /* YYNRULES -- Number of states.  */
411 #define YYNSTATES  141
413 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
414 #define YYUNDEFTOK  2
415 #define YYMAXUTOK   279
417 #define YYTRANSLATE(YYX)                                                \
418   ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
420 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX.  */
421 static const yytype_uint8 yytranslate[] =
423        0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
424        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
425        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
426        2,     2,     2,    47,     2,     2,     2,    45,    41,     2,
427       33,    35,    44,    42,    34,    43,     2,    26,     2,     2,
428        2,     2,     2,     2,     2,     2,     2,     2,    38,    25,
429       36,    29,    30,    37,     2,     2,     2,     2,     2,     2,
430        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
431        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
432        2,    31,     2,    32,    40,     2,     2,     2,     2,     2,
433        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
434        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
435        2,     2,     2,    27,    39,    28,    46,     2,     2,     2,
436        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
437        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
438        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
439        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
440        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
441        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
442        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
443        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
444        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
445        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
446        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
447        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
448        2,     2,     2,     2,     2,     2,     1,     2,     3,     4,
449        5,     6,     7,     8,     9,    10,    11,    12,    13,    14,
450       15,    16,    17,    18,    19,    20,    21,    22,    23,    24
453 #if YYDEBUG
454 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
455    YYRHS.  */
456 static const yytype_uint16 yyprhs[] =
458        0,     0,     3,     8,     9,    12,    17,    20,    23,    27,
459       31,    36,    42,    43,    46,    51,    54,    58,    61,    64,
460       68,    73,    76,    86,    92,    95,    96,    99,   102,   106,
461      108,   111,   114,   117,   119,   121,   125,   127,   129,   135,
462      137,   141,   143,   147,   149,   153,   155,   159,   161,   165,
463      167,   171,   175,   177,   181,   185,   189,   193,   197,   201,
464      203,   207,   211,   213,   217,   221,   225,   227,   229,   232,
465      235,   238,   239,   242,   245,   246,   249,   252,   255,   259
468 /* YYRHS -- A `-1'-separated list of the rules' RHS.  */
469 static const yytype_int8 yyrhs[] =
471       49,     0,    -1,     3,    25,    50,    52,    -1,    -1,    51,
472       50,    -1,     4,    59,    59,    25,    -1,    22,    51,    -1,
473       26,    53,    -1,    52,    26,    53,    -1,    52,    23,    53,
474       -1,    52,    15,    23,    25,    -1,    27,    54,    74,    28,
475       25,    -1,    -1,    54,    55,    -1,    16,    29,    56,    25,
476       -1,    16,    25,    -1,    14,    16,    25,    -1,    22,    55,
477       -1,    57,    21,    -1,    57,    58,    30,    -1,    57,    31,
478       73,    32,    -1,    57,    23,    -1,    57,    24,    33,    21,
479       34,    59,    34,    59,    35,    -1,    57,    24,    33,    21,
480       35,    -1,    56,    22,    -1,    -1,    56,    34,    -1,    57,
481       22,    -1,    13,    17,    36,    -1,    36,    -1,    58,    59,
482       -1,    58,    23,    -1,    58,    22,    -1,    17,    -1,    18,
483       -1,    33,    60,    35,    -1,    61,    -1,    62,    -1,    62,
484       37,    60,    38,    61,    -1,    63,    -1,    62,    12,    63,
485       -1,    64,    -1,    63,    11,    64,    -1,    65,    -1,    64,
486       39,    65,    -1,    66,    -1,    65,    40,    66,    -1,    67,
487       -1,    66,    41,    67,    -1,    68,    -1,    67,     9,    68,
488       -1,    67,    10,    68,    -1,    69,    -1,    68,    36,    69,
489       -1,    68,    30,    69,    -1,    68,     7,    69,    -1,    68,
490        8,    69,    -1,    69,     5,    70,    -1,    69,     6,    70,
491       -1,    70,    -1,    70,    42,    71,    -1,    70,    43,    71,
492       -1,    71,    -1,    71,    44,    72,    -1,    71,    26,    72,
493       -1,    71,    45,    72,    -1,    72,    -1,    59,    -1,    43,
494       72,    -1,    46,    72,    -1,    47,    72,    -1,    -1,    73,
495       20,    -1,    73,    22,    -1,    -1,    75,    74,    -1,    75,
496       55,    -1,    16,    53,    -1,    15,    16,    25,    -1,    22,
497       75,    -1
500 /* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
501 static const yytype_uint16 yyrline[] =
503        0,   109,   109,   118,   121,   128,   132,   140,   144,   148,
504      158,   172,   180,   183,   190,   194,   198,   202,   210,   214,
505      218,   222,   226,   243,   253,   261,   264,   268,   275,   290,
506      295,   315,   329,   336,   340,   344,   351,   355,   356,   360,
507      361,   365,   366,   370,   371,   375,   376,   380,   381,   385,
508      386,   387,   391,   392,   393,   394,   395,   399,   400,   401,
509      405,   406,   407,   411,   412,   413,   414,   418,   419,   420,
510      421,   426,   429,   433,   441,   444,   448,   456,   460,   464
512 #endif
514 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
515 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
516    First, the terminals, then, starting at YYNTOKENS, nonterminals.  */
517 static const char *const yytname[] =
519   "$end", "error", "$undefined", "DT_V1", "DT_MEMRESERVE", "DT_LSHIFT",
520   "DT_RSHIFT", "DT_LE", "DT_GE", "DT_EQ", "DT_NE", "DT_AND", "DT_OR",
521   "DT_BITS", "DT_DEL_PROP", "DT_DEL_NODE", "DT_PROPNODENAME", "DT_LITERAL",
522   "DT_CHAR_LITERAL", "DT_BASE", "DT_BYTE", "DT_STRING", "DT_LABEL",
523   "DT_REF", "DT_INCBIN", "';'", "'/'", "'{'", "'}'", "'='", "'>'", "'['",
524   "']'", "'('", "','", "')'", "'<'", "'?'", "':'", "'|'", "'^'", "'&'",
525   "'+'", "'-'", "'*'", "'%'", "'~'", "'!'", "$accept", "sourcefile",
526   "memreserves", "memreserve", "devicetree", "nodedef", "proplist",
527   "propdef", "propdata", "propdataprefix", "arrayprefix", "integer_prim",
528   "integer_expr", "integer_trinary", "integer_or", "integer_and",
529   "integer_bitor", "integer_bitxor", "integer_bitand", "integer_eq",
530   "integer_rela", "integer_shift", "integer_add", "integer_mul",
531   "integer_unary", "bytestring", "subnodes", "subnode", 0
533 #endif
535 # ifdef YYPRINT
536 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
537    token YYLEX-NUM.  */
538 static const yytype_uint16 yytoknum[] =
540        0,   256,   257,   258,   259,   260,   261,   262,   263,   264,
541      265,   266,   267,   268,   269,   270,   271,   272,   273,   274,
542      275,   276,   277,   278,   279,    59,    47,   123,   125,    61,
543       62,    91,    93,    40,    44,    41,    60,    63,    58,   124,
544       94,    38,    43,    45,    42,    37,   126,    33
546 # endif
548 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
549 static const yytype_uint8 yyr1[] =
551        0,    48,    49,    50,    50,    51,    51,    52,    52,    52,
552       52,    53,    54,    54,    55,    55,    55,    55,    56,    56,
553       56,    56,    56,    56,    56,    57,    57,    57,    58,    58,
554       58,    58,    58,    59,    59,    59,    60,    61,    61,    62,
555       62,    63,    63,    64,    64,    65,    65,    66,    66,    67,
556       67,    67,    68,    68,    68,    68,    68,    69,    69,    69,
557       70,    70,    70,    71,    71,    71,    71,    72,    72,    72,
558       72,    73,    73,    73,    74,    74,    74,    75,    75,    75
561 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
562 static const yytype_uint8 yyr2[] =
564        0,     2,     4,     0,     2,     4,     2,     2,     3,     3,
565        4,     5,     0,     2,     4,     2,     3,     2,     2,     3,
566        4,     2,     9,     5,     2,     0,     2,     2,     3,     1,
567        2,     2,     2,     1,     1,     3,     1,     1,     5,     1,
568        3,     1,     3,     1,     3,     1,     3,     1,     3,     1,
569        3,     3,     1,     3,     3,     3,     3,     3,     3,     1,
570        3,     3,     1,     3,     3,     3,     1,     1,     2,     2,
571        2,     0,     2,     2,     0,     2,     2,     2,     3,     2
574 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
575    STATE-NUM when YYTABLE doesn't specify something else to do.  Zero
576    means the default is an error.  */
577 static const yytype_uint8 yydefact[] =
579        0,     0,     0,     3,     1,     0,     0,     0,     3,    33,
580       34,     0,     0,     6,     0,     2,     4,     0,     0,     0,
581       67,     0,    36,    37,    39,    41,    43,    45,    47,    49,
582       52,    59,    62,    66,     0,    12,     7,     0,     0,     0,
583       68,    69,    70,    35,     0,     0,     0,     0,     0,     0,
584        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
585        0,     0,     0,     5,    74,     0,     9,     8,    40,     0,
586       42,    44,    46,    48,    50,    51,    55,    56,    54,    53,
587       57,    58,    60,    61,    64,    63,    65,     0,     0,     0,
588        0,    13,     0,    74,    10,     0,     0,     0,    15,    25,
589       77,    17,    79,     0,    76,    75,    38,    16,    78,     0,
590        0,    11,    24,    14,    26,     0,    18,    27,    21,     0,
591       71,    29,     0,     0,     0,     0,    32,    31,    19,    30,
592       28,     0,    72,    73,    20,     0,    23,     0,     0,     0,
593       22
596 /* YYDEFGOTO[NTERM-NUM].  */
597 static const yytype_int8 yydefgoto[] =
599       -1,     2,     7,     8,    15,    36,    64,    91,   109,   110,
600      122,    20,    21,    22,    23,    24,    25,    26,    27,    28,
601       29,    30,    31,    32,    33,   125,    92,    93
604 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
605    STATE-NUM.  */
606 #define YYPACT_NINF -78
607 static const yytype_int8 yypact[] =
609       22,    11,    51,    10,   -78,    23,    10,     2,    10,   -78,
610      -78,    -9,    23,   -78,    30,    38,   -78,    -9,    -9,    -9,
611      -78,    35,   -78,    -6,    52,    29,    48,    49,    33,     3,
612       71,    36,     0,   -78,    64,   -78,   -78,    68,    30,    30,
613      -78,   -78,   -78,   -78,    -9,    -9,    -9,    -9,    -9,    -9,
614       -9,    -9,    -9,    -9,    -9,    -9,    -9,    -9,    -9,    -9,
615       -9,    -9,    -9,   -78,    44,    67,   -78,   -78,    52,    55,
616       29,    48,    49,    33,     3,     3,    71,    71,    71,    71,
617       36,    36,     0,     0,   -78,   -78,   -78,    78,    79,    42,
618       44,   -78,    69,    44,   -78,    -9,    73,    74,   -78,   -78,
619      -78,   -78,   -78,    75,   -78,   -78,   -78,   -78,   -78,    -7,
620       -1,   -78,   -78,   -78,   -78,    84,   -78,   -78,   -78,    63,
621      -78,   -78,    32,    66,    82,    -3,   -78,   -78,   -78,   -78,
622      -78,    46,   -78,   -78,   -78,    23,   -78,    70,    23,    72,
623      -78
626 /* YYPGOTO[NTERM-NUM].  */
627 static const yytype_int8 yypgoto[] =
629      -78,   -78,    97,   100,   -78,   -37,   -78,   -77,   -78,   -78,
630      -78,    -5,    65,    13,   -78,    76,    77,    62,    80,    83,
631       34,    20,    26,    28,   -14,   -78,    18,    24
634 /* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If
635    positive, shift that token.  If negative, reduce the rule which
636    number is the opposite.  If zero, do what YYDEFACT says.
637    If YYTABLE_NINF, syntax error.  */
638 #define YYTABLE_NINF -1
639 static const yytype_uint8 yytable[] =
641       12,    66,    67,    40,    41,    42,    44,    34,     9,    10,
642       52,    53,   115,   101,     5,   112,   104,   132,   113,   133,
643      116,   117,   118,   119,    11,     1,    60,   114,    14,   134,
644      120,    45,     6,    54,    17,   121,     3,    18,    19,    55,
645        9,    10,    50,    51,    61,    62,    84,    85,    86,     9,
646       10,     4,   100,    37,   126,   127,    11,    35,    87,    88,
647       89,    38,   128,    46,    39,    11,    90,    98,    47,    35,
648       43,    99,    76,    77,    78,    79,    56,    57,    58,    59,
649      135,   136,    80,    81,    74,    75,    82,    83,    48,    63,
650       49,    65,    94,    95,    96,    97,   124,   103,   107,   108,
651      111,   123,   130,   131,   138,    16,    13,   140,   106,    71,
652       69,   105,     0,     0,   102,     0,     0,   129,     0,     0,
653       68,     0,     0,    70,     0,     0,     0,     0,    72,     0,
654      137,     0,    73,   139
657 static const yytype_int16 yycheck[] =
659        5,    38,    39,    17,    18,    19,    12,    12,    17,    18,
660        7,     8,    13,    90,     4,    22,    93,    20,    25,    22,
661       21,    22,    23,    24,    33,     3,    26,    34,    26,    32,
662       31,    37,    22,    30,    43,    36,    25,    46,    47,    36,
663       17,    18,     9,    10,    44,    45,    60,    61,    62,    17,
664       18,     0,    89,    15,    22,    23,    33,    27,    14,    15,
665       16,    23,    30,    11,    26,    33,    22,    25,    39,    27,
666       35,    29,    52,    53,    54,    55,     5,     6,    42,    43,
667       34,    35,    56,    57,    50,    51,    58,    59,    40,    25,
668       41,    23,    25,    38,    16,    16,    33,    28,    25,    25,
669       25,    17,    36,    21,    34,     8,     6,    35,    95,    47,
670       45,    93,    -1,    -1,    90,    -1,    -1,   122,    -1,    -1,
671       44,    -1,    -1,    46,    -1,    -1,    -1,    -1,    48,    -1,
672      135,    -1,    49,   138
675 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
676    symbol of state STATE-NUM.  */
677 static const yytype_uint8 yystos[] =
679        0,     3,    49,    25,     0,     4,    22,    50,    51,    17,
680       18,    33,    59,    51,    26,    52,    50,    43,    46,    47,
681       59,    60,    61,    62,    63,    64,    65,    66,    67,    68,
682       69,    70,    71,    72,    59,    27,    53,    15,    23,    26,
683       72,    72,    72,    35,    12,    37,    11,    39,    40,    41,
684        9,    10,     7,     8,    30,    36,     5,     6,    42,    43,
685       26,    44,    45,    25,    54,    23,    53,    53,    63,    60,
686       64,    65,    66,    67,    68,    68,    69,    69,    69,    69,
687       70,    70,    71,    71,    72,    72,    72,    14,    15,    16,
688       22,    55,    74,    75,    25,    38,    16,    16,    25,    29,
689       53,    55,    75,    28,    55,    74,    61,    25,    25,    56,
690       57,    25,    22,    25,    34,    13,    21,    22,    23,    24,
691       31,    36,    58,    17,    33,    73,    22,    23,    30,    59,
692       36,    21,    20,    22,    32,    34,    35,    59,    34,    59,
693       35
696 #define yyerrok         (yyerrstatus = 0)
697 #define yyclearin       (yychar = YYEMPTY)
698 #define YYEMPTY         (-2)
699 #define YYEOF           0
701 #define YYACCEPT        goto yyacceptlab
702 #define YYABORT         goto yyabortlab
703 #define YYERROR         goto yyerrorlab
706 /* Like YYERROR except do call yyerror.  This remains here temporarily
707    to ease the transition to the new meaning of YYERROR, for GCC.
708    Once GCC version 2 has supplanted version 1, this can go.  */
710 #define YYFAIL          goto yyerrlab
712 #define YYRECOVERING()  (!!yyerrstatus)
714 #define YYBACKUP(Token, Value)                                  \
715 do                                                              \
716   if (yychar == YYEMPTY && yylen == 1)                          \
717     {                                                           \
718       yychar = (Token);                                         \
719       yylval = (Value);                                         \
720       yytoken = YYTRANSLATE (yychar);                           \
721       YYPOPSTACK (1);                                           \
722       goto yybackup;                                            \
723     }                                                           \
724   else                                                          \
725     {                                                           \
726       yyerror (YY_("syntax error: cannot back up")); \
727       YYERROR;                                                  \
728     }                                                           \
729 while (YYID (0))
732 #define YYTERROR        1
733 #define YYERRCODE       256
736 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
737    If N is 0, then set CURRENT to the empty location which ends
738    the previous symbol: RHS[0] (always defined).  */
740 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
741 #ifndef YYLLOC_DEFAULT
742 # define YYLLOC_DEFAULT(Current, Rhs, N)                                \
743     do                                                                  \
744       if (YYID (N))                                                    \
745         {                                                               \
746           (Current).first_line   = YYRHSLOC (Rhs, 1).first_line;        \
747           (Current).first_column = YYRHSLOC (Rhs, 1).first_column;      \
748           (Current).last_line    = YYRHSLOC (Rhs, N).last_line;         \
749           (Current).last_column  = YYRHSLOC (Rhs, N).last_column;       \
750         }                                                               \
751       else                                                              \
752         {                                                               \
753           (Current).first_line   = (Current).last_line   =              \
754             YYRHSLOC (Rhs, 0).last_line;                                \
755           (Current).first_column = (Current).last_column =              \
756             YYRHSLOC (Rhs, 0).last_column;                              \
757         }                                                               \
758     while (YYID (0))
759 #endif
762 /* YY_LOCATION_PRINT -- Print the location on the stream.
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.  */
766 #ifndef YY_LOCATION_PRINT
767 # if YYLTYPE_IS_TRIVIAL
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
778 /* YYLEX -- calling `yylex' with the right arguments.  */
780 #ifdef YYLEX_PARAM
781 # define YYLEX yylex (YYLEX_PARAM)
782 #else
783 # define YYLEX yylex ()
784 #endif
786 /* Enable debugging if requested.  */
787 #if YYDEBUG
789 # ifndef YYFPRINTF
790 #  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
791 #  define YYFPRINTF fprintf
792 # endif
794 # define YYDPRINTF(Args)                        \
795 do {                                            \
796   if (yydebug)                                  \
797     YYFPRINTF Args;                             \
798 } while (YYID (0))
800 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)                    \
801 do {                                                                      \
802   if (yydebug)                                                            \
803     {                                                                     \
804       YYFPRINTF (stderr, "%s ", Title);                                   \
805       yy_symbol_print (stderr,                                            \
806                   Type, Value); \
807       YYFPRINTF (stderr, "\n");                                           \
808     }                                                                     \
809 } while (YYID (0))
812 /*--------------------------------.
813 | Print this symbol on YYOUTPUT.  |
814 `--------------------------------*/
816 /*ARGSUSED*/
817 #if (defined __STDC__ || defined __C99__FUNC__ \
818      || defined __cplusplus || defined _MSC_VER)
819 static void
820 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
821 #else
822 static void
823 yy_symbol_value_print (yyoutput, yytype, yyvaluep)
824     FILE *yyoutput;
825     int yytype;
826     YYSTYPE const * const yyvaluep;
827 #endif
829   if (!yyvaluep)
830     return;
831 # ifdef YYPRINT
832   if (yytype < YYNTOKENS)
833     YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
834 # else
835   YYUSE (yyoutput);
836 # endif
837   switch (yytype)
838     {
839       default:
840         break;
841     }
845 /*--------------------------------.
846 | Print this symbol on YYOUTPUT.  |
847 `--------------------------------*/
849 #if (defined __STDC__ || defined __C99__FUNC__ \
850      || defined __cplusplus || defined _MSC_VER)
851 static void
852 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
853 #else
854 static void
855 yy_symbol_print (yyoutput, yytype, yyvaluep)
856     FILE *yyoutput;
857     int yytype;
858     YYSTYPE const * const yyvaluep;
859 #endif
861   if (yytype < YYNTOKENS)
862     YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
863   else
864     YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
866   yy_symbol_value_print (yyoutput, yytype, yyvaluep);
867   YYFPRINTF (yyoutput, ")");
870 /*------------------------------------------------------------------.
871 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
872 | TOP (included).                                                   |
873 `------------------------------------------------------------------*/
875 #if (defined __STDC__ || defined __C99__FUNC__ \
876      || defined __cplusplus || defined _MSC_VER)
877 static void
878 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
879 #else
880 static void
881 yy_stack_print (yybottom, yytop)
882     yytype_int16 *yybottom;
883     yytype_int16 *yytop;
884 #endif
886   YYFPRINTF (stderr, "Stack now");
887   for (; yybottom <= yytop; yybottom++)
888     {
889       int yybot = *yybottom;
890       YYFPRINTF (stderr, " %d", yybot);
891     }
892   YYFPRINTF (stderr, "\n");
895 # define YY_STACK_PRINT(Bottom, Top)                            \
896 do {                                                            \
897   if (yydebug)                                                  \
898     yy_stack_print ((Bottom), (Top));                           \
899 } while (YYID (0))
902 /*------------------------------------------------.
903 | Report that the YYRULE is going to be reduced.  |
904 `------------------------------------------------*/
906 #if (defined __STDC__ || defined __C99__FUNC__ \
907      || defined __cplusplus || defined _MSC_VER)
908 static void
909 yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
910 #else
911 static void
912 yy_reduce_print (yyvsp, yyrule)
913     YYSTYPE *yyvsp;
914     int yyrule;
915 #endif
917   int yynrhs = yyr2[yyrule];
918   int yyi;
919   unsigned long int yylno = yyrline[yyrule];
920   YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
921              yyrule - 1, yylno);
922   /* The symbols being reduced.  */
923   for (yyi = 0; yyi < yynrhs; yyi++)
924     {
925       YYFPRINTF (stderr, "   $%d = ", yyi + 1);
926       yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
927                        &(yyvsp[(yyi + 1) - (yynrhs)])
928                                        );
929       YYFPRINTF (stderr, "\n");
930     }
933 # define YY_REDUCE_PRINT(Rule)          \
934 do {                                    \
935   if (yydebug)                          \
936     yy_reduce_print (yyvsp, Rule); \
937 } while (YYID (0))
939 /* Nonzero means print parse trace.  It is left uninitialized so that
940    multiple parsers can coexist.  */
941 int yydebug;
942 #else /* !YYDEBUG */
943 # define YYDPRINTF(Args)
944 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
945 # define YY_STACK_PRINT(Bottom, Top)
946 # define YY_REDUCE_PRINT(Rule)
947 #endif /* !YYDEBUG */
950 /* YYINITDEPTH -- initial size of the parser's stacks.  */
951 #ifndef YYINITDEPTH
952 # define YYINITDEPTH 200
953 #endif
955 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
956    if the built-in stack extension method is used).
958    Do not make this value too large; the results are undefined if
959    YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
960    evaluated with infinite-precision integer arithmetic.  */
962 #ifndef YYMAXDEPTH
963 # define YYMAXDEPTH 10000
964 #endif
968 #if YYERROR_VERBOSE
970 # ifndef yystrlen
971 #  if defined __GLIBC__ && defined _STRING_H
972 #   define yystrlen strlen
973 #  else
974 /* Return the length of YYSTR.  */
975 #if (defined __STDC__ || defined __C99__FUNC__ \
976      || defined __cplusplus || defined _MSC_VER)
977 static YYSIZE_T
978 yystrlen (const char *yystr)
979 #else
980 static YYSIZE_T
981 yystrlen (yystr)
982     const char *yystr;
983 #endif
985   YYSIZE_T yylen;
986   for (yylen = 0; yystr[yylen]; yylen++)
987     continue;
988   return yylen;
990 #  endif
991 # endif
993 # ifndef yystpcpy
994 #  if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
995 #   define yystpcpy stpcpy
996 #  else
997 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
998    YYDEST.  */
999 #if (defined __STDC__ || defined __C99__FUNC__ \
1000      || defined __cplusplus || defined _MSC_VER)
1001 static char *
1002 yystpcpy (char *yydest, const char *yysrc)
1003 #else
1004 static char *
1005 yystpcpy (yydest, yysrc)
1006     char *yydest;
1007     const char *yysrc;
1008 #endif
1010   char *yyd = yydest;
1011   const char *yys = yysrc;
1013   while ((*yyd++ = *yys++) != '\0')
1014     continue;
1016   return yyd - 1;
1018 #  endif
1019 # endif
1021 # ifndef yytnamerr
1022 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1023    quotes and backslashes, so that it's suitable for yyerror.  The
1024    heuristic is that double-quoting is unnecessary unless the string
1025    contains an apostrophe, a comma, or backslash (other than
1026    backslash-backslash).  YYSTR is taken from yytname.  If YYRES is
1027    null, do not copy; instead, return the length of what the result
1028    would have been.  */
1029 static YYSIZE_T
1030 yytnamerr (char *yyres, const char *yystr)
1032   if (*yystr == '"')
1033     {
1034       YYSIZE_T yyn = 0;
1035       char const *yyp = yystr;
1037       for (;;)
1038         switch (*++yyp)
1039           {
1040           case '\'':
1041           case ',':
1042             goto do_not_strip_quotes;
1044           case '\\':
1045             if (*++yyp != '\\')
1046               goto do_not_strip_quotes;
1047             /* Fall through.  */
1048           default:
1049             if (yyres)
1050               yyres[yyn] = *yyp;
1051             yyn++;
1052             break;
1054           case '"':
1055             if (yyres)
1056               yyres[yyn] = '\0';
1057             return yyn;
1058           }
1059     do_not_strip_quotes: ;
1060     }
1062   if (! yyres)
1063     return yystrlen (yystr);
1065   return yystpcpy (yyres, yystr) - yyres;
1067 # endif
1069 /* Copy into YYRESULT an error message about the unexpected token
1070    YYCHAR while in state YYSTATE.  Return the number of bytes copied,
1071    including the terminating null byte.  If YYRESULT is null, do not
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)
1079   int yyn = yypact[yystate];
1081   if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
1082     return 0;
1083   else
1084     {
1085       int yytype = YYTRANSLATE (yychar);
1086       YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
1087       YYSIZE_T yysize = yysize0;
1088       YYSIZE_T yysize1;
1089       int yysize_overflow = 0;
1090       enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1091       char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1092       int yyx;
1094 # if 0
1095       /* This is so xgettext sees the translatable formats that are
1096          constructed on the fly.  */
1097       YY_("syntax error, unexpected %s");
1098       YY_("syntax error, unexpected %s, expecting %s");
1099       YY_("syntax error, unexpected %s, expecting %s or %s");
1100       YY_("syntax error, unexpected %s, expecting %s or %s or %s");
1101       YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
1102 # endif
1103       char *yyfmt;
1104       char const *yyf;
1105       static char const yyunexpected[] = "syntax error, unexpected %s";
1106       static char const yyexpecting[] = ", expecting %s";
1107       static char const yyor[] = " or %s";
1108       char yyformat[sizeof yyunexpected
1109                     + sizeof yyexpecting - 1
1110                     + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
1111                        * (sizeof yyor - 1))];
1112       char const *yyprefix = yyexpecting;
1114       /* Start YYX at -YYN if negative to avoid negative indexes in
1115          YYCHECK.  */
1116       int yyxbegin = yyn < 0 ? -yyn : 0;
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;
1123       yyarg[0] = yytname[yytype];
1124       yyfmt = yystpcpy (yyformat, yyunexpected);
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           }
1144       yyf = YY_(yyformat);
1145       yysize1 = yysize + yystrlen (yyf);
1146       yysize_overflow |= (yysize1 < yysize);
1147       yysize = yysize1;
1149       if (yysize_overflow)
1150         return YYSIZE_MAXIMUM;
1152       if (yyresult)
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           char *yyp = yyresult;
1158           int yyi = 0;
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     }
1176 #endif /* YYERROR_VERBOSE */
1179 /*-----------------------------------------------.
1180 | Release the memory associated to this symbol.  |
1181 `-----------------------------------------------*/
1183 /*ARGSUSED*/
1184 #if (defined __STDC__ || defined __C99__FUNC__ \
1185      || defined __cplusplus || defined _MSC_VER)
1186 static void
1187 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
1188 #else
1189 static void
1190 yydestruct (yymsg, yytype, yyvaluep)
1191     const char *yymsg;
1192     int yytype;
1193     YYSTYPE *yyvaluep;
1194 #endif
1196   YYUSE (yyvaluep);
1198   if (!yymsg)
1199     yymsg = "Deleting";
1200   YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1202   switch (yytype)
1203     {
1205       default:
1206         break;
1207     }
1210 /* Prevent warnings from -Wmissing-prototypes.  */
1211 #ifdef YYPARSE_PARAM
1212 #if defined __STDC__ || defined __cplusplus
1213 int yyparse (void *YYPARSE_PARAM);
1214 #else
1215 int yyparse ();
1216 #endif
1217 #else /* ! YYPARSE_PARAM */
1218 #if defined __STDC__ || defined __cplusplus
1219 int yyparse (void);
1220 #else
1221 int yyparse ();
1222 #endif
1223 #endif /* ! YYPARSE_PARAM */
1226 /* The lookahead symbol.  */
1227 int yychar;
1229 /* The semantic value of the lookahead symbol.  */
1230 YYSTYPE yylval;
1232 /* Number of syntax errors so far.  */
1233 int yynerrs;
1237 /*-------------------------.
1238 | yyparse or yypush_parse.  |
1239 `-------------------------*/
1241 #ifdef YYPARSE_PARAM
1242 #if (defined __STDC__ || defined __C99__FUNC__ \
1243      || defined __cplusplus || defined _MSC_VER)
1245 yyparse (void *YYPARSE_PARAM)
1246 #else
1248 yyparse (YYPARSE_PARAM)
1249     void *YYPARSE_PARAM;
1250 #endif
1251 #else /* ! YYPARSE_PARAM */
1252 #if (defined __STDC__ || defined __C99__FUNC__ \
1253      || defined __cplusplus || defined _MSC_VER)
1255 yyparse (void)
1256 #else
1258 yyparse ()
1260 #endif
1261 #endif
1265     int yystate;
1266     /* Number of tokens to shift before error messages enabled.  */
1267     int yyerrstatus;
1269     /* The stacks and their tools:
1270        `yyss': related to states.
1271        `yyvs': related to semantic values.
1273        Refer to the stacks thru separate pointers, to allow yyoverflow
1274        to reallocate them elsewhere.  */
1276     /* The state stack.  */
1277     yytype_int16 yyssa[YYINITDEPTH];
1278     yytype_int16 *yyss;
1279     yytype_int16 *yyssp;
1281     /* The semantic value stack.  */
1282     YYSTYPE yyvsa[YYINITDEPTH];
1283     YYSTYPE *yyvs;
1284     YYSTYPE *yyvsp;
1286     YYSIZE_T yystacksize;
1288   int yyn;
1289   int yyresult;
1290   /* Lookahead token as an internal (translated) token number.  */
1291   int yytoken;
1292   /* The variables used to return semantic value and location from the
1293      action routines.  */
1294   YYSTYPE yyval;
1296 #if YYERROR_VERBOSE
1297   /* Buffer for error messages, and its allocated size.  */
1298   char yymsgbuf[128];
1299   char *yymsg = yymsgbuf;
1300   YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
1301 #endif
1303 #define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N))
1305   /* The number of symbols on the RHS of the reduced rule.
1306      Keep to zero when no symbol should be popped.  */
1307   int yylen = 0;
1309   yytoken = 0;
1310   yyss = yyssa;
1311   yyvs = yyvsa;
1312   yystacksize = YYINITDEPTH;
1314   YYDPRINTF ((stderr, "Starting parse\n"));
1316   yystate = 0;
1317   yyerrstatus = 0;
1318   yynerrs = 0;
1319   yychar = YYEMPTY; /* Cause a token to be read.  */
1321   /* Initialize stack pointers.
1322      Waste one element of value and location stack
1323      so that they stay on the same level as the state stack.
1324      The wasted elements are never initialized.  */
1325   yyssp = yyss;
1326   yyvsp = yyvs;
1328   goto yysetstate;
1330 /*------------------------------------------------------------.
1331 | yynewstate -- Push a new state, which is found in yystate.  |
1332 `------------------------------------------------------------*/
1333  yynewstate:
1334   /* In all cases, when you get here, the value and location stacks
1335      have just been pushed.  So pushing a state here evens the stacks.  */
1336   yyssp++;
1338  yysetstate:
1339   *yyssp = yystate;
1341   if (yyss + yystacksize - 1 <= yyssp)
1342     {
1343       /* Get the current used size of the three stacks, in elements.  */
1344       YYSIZE_T yysize = yyssp - yyss + 1;
1346 #ifdef yyoverflow
1347       {
1348         /* Give user a chance to reallocate the stack.  Use copies of
1349            these so that the &'s don't force the real ones into
1350            memory.  */
1351         YYSTYPE *yyvs1 = yyvs;
1352         yytype_int16 *yyss1 = yyss;
1354         /* Each stack pointer address is followed by the size of the
1355            data in use in that stack, in bytes.  This used to be a
1356            conditional around just the two extra args, but that might
1357            be undefined if yyoverflow is a macro.  */
1358         yyoverflow (YY_("memory exhausted"),
1359                     &yyss1, yysize * sizeof (*yyssp),
1360                     &yyvs1, yysize * sizeof (*yyvsp),
1361                     &yystacksize);
1363         yyss = yyss1;
1364         yyvs = yyvs1;
1365       }
1366 #else /* no yyoverflow */
1367 # ifndef YYSTACK_RELOCATE
1368       goto yyexhaustedlab;
1369 # else
1370       /* Extend the stack our own way.  */
1371       if (YYMAXDEPTH <= yystacksize)
1372         goto yyexhaustedlab;
1373       yystacksize *= 2;
1374       if (YYMAXDEPTH < yystacksize)
1375         yystacksize = YYMAXDEPTH;
1377       {
1378         yytype_int16 *yyss1 = yyss;
1379         union yyalloc *yyptr =
1380           (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1381         if (! yyptr)
1382           goto yyexhaustedlab;
1383         YYSTACK_RELOCATE (yyss_alloc, yyss);
1384         YYSTACK_RELOCATE (yyvs_alloc, yyvs);
1385 #  undef YYSTACK_RELOCATE
1386         if (yyss1 != yyssa)
1387           YYSTACK_FREE (yyss1);
1388       }
1389 # endif
1390 #endif /* no yyoverflow */
1392       yyssp = yyss + yysize - 1;
1393       yyvsp = yyvs + yysize - 1;
1395       YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1396                   (unsigned long int) yystacksize));
1398       if (yyss + yystacksize - 1 <= yyssp)
1399         YYABORT;
1400     }
1402   YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1404   if (yystate == YYFINAL)
1405     YYACCEPT;
1407   goto yybackup;
1409 /*-----------.
1410 | yybackup.  |
1411 `-----------*/
1412 yybackup:
1414   /* Do appropriate processing given the current state.  Read a
1415      lookahead token if we need one and don't already have one.  */
1417   /* First try to decide what to do without reference to lookahead token.  */
1418   yyn = yypact[yystate];
1419   if (yyn == YYPACT_NINF)
1420     goto yydefault;
1422   /* Not known => get a lookahead token if don't already have one.  */
1424   /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol.  */
1425   if (yychar == YYEMPTY)
1426     {
1427       YYDPRINTF ((stderr, "Reading a token: "));
1428       yychar = YYLEX;
1429     }
1431   if (yychar <= YYEOF)
1432     {
1433       yychar = yytoken = YYEOF;
1434       YYDPRINTF ((stderr, "Now at end of input.\n"));
1435     }
1436   else
1437     {
1438       yytoken = YYTRANSLATE (yychar);
1439       YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
1440     }
1442   /* If the proper action on seeing token YYTOKEN is to reduce or to
1443      detect an error, take that action.  */
1444   yyn += yytoken;
1445   if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1446     goto yydefault;
1447   yyn = yytable[yyn];
1448   if (yyn <= 0)
1449     {
1450       if (yyn == 0 || yyn == YYTABLE_NINF)
1451         goto yyerrlab;
1452       yyn = -yyn;
1453       goto yyreduce;
1454     }
1456   /* Count tokens shifted since error; after three, turn off error
1457      status.  */
1458   if (yyerrstatus)
1459     yyerrstatus--;
1461   /* Shift the lookahead token.  */
1462   YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
1464   /* Discard the shifted token.  */
1465   yychar = YYEMPTY;
1467   yystate = yyn;
1468   *++yyvsp = yylval;
1470   goto yynewstate;
1473 /*-----------------------------------------------------------.
1474 | yydefault -- do the default action for the current state.  |
1475 `-----------------------------------------------------------*/
1476 yydefault:
1477   yyn = yydefact[yystate];
1478   if (yyn == 0)
1479     goto yyerrlab;
1480   goto yyreduce;
1483 /*-----------------------------.
1484 | yyreduce -- Do a reduction.  |
1485 `-----------------------------*/
1486 yyreduce:
1487   /* yyn is the number of a rule to reduce with.  */
1488   yylen = yyr2[yyn];
1490   /* If YYLEN is nonzero, implement the default value of the action:
1491      `$$ = $1'.
1493      Otherwise, the following line sets YYVAL to garbage.
1494      This behavior is undocumented and Bison
1495      users should not rely upon it.  Assigning to YYVAL
1496      unconditionally makes the parser a bit smaller, and it avoids a
1497      GCC warning that YYVAL may be used uninitialized.  */
1498   yyval = yyvsp[1-yylen];
1501   YY_REDUCE_PRINT (yyn);
1502   switch (yyn)
1503     {
1504         case 2:
1506 /* Line 1455 of yacc.c  */
1507 #line 110 "dtc-parser.y"
1508     {
1509                         the_boot_info = build_boot_info((yyvsp[(3) - (4)].re), (yyvsp[(4) - (4)].node),
1510                                                         guess_boot_cpuid((yyvsp[(4) - (4)].node)));
1511                 ;}
1512     break;
1514   case 3:
1516 /* Line 1455 of yacc.c  */
1517 #line 118 "dtc-parser.y"
1518     {
1519                         (yyval.re) = NULL;
1520                 ;}
1521     break;
1523   case 4:
1525 /* Line 1455 of yacc.c  */
1526 #line 122 "dtc-parser.y"
1527     {
1528                         (yyval.re) = chain_reserve_entry((yyvsp[(1) - (2)].re), (yyvsp[(2) - (2)].re));
1529                 ;}
1530     break;
1532   case 5:
1534 /* Line 1455 of yacc.c  */
1535 #line 129 "dtc-parser.y"
1536     {
1537                         (yyval.re) = build_reserve_entry((yyvsp[(2) - (4)].integer), (yyvsp[(3) - (4)].integer));
1538                 ;}
1539     break;
1541   case 6:
1543 /* Line 1455 of yacc.c  */
1544 #line 133 "dtc-parser.y"
1545     {
1546                         add_label(&(yyvsp[(2) - (2)].re)->labels, (yyvsp[(1) - (2)].labelref));
1547                         (yyval.re) = (yyvsp[(2) - (2)].re);
1548                 ;}
1549     break;
1551   case 7:
1553 /* Line 1455 of yacc.c  */
1554 #line 141 "dtc-parser.y"
1555     {
1556                         (yyval.node) = name_node((yyvsp[(2) - (2)].node), "");
1557                 ;}
1558     break;
1560   case 8:
1562 /* Line 1455 of yacc.c  */
1563 #line 145 "dtc-parser.y"
1564     {
1565                         (yyval.node) = merge_nodes((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
1566                 ;}
1567     break;
1569   case 9:
1571 /* Line 1455 of yacc.c  */
1572 #line 149 "dtc-parser.y"
1573     {
1574                         struct node *target = get_node_by_ref((yyvsp[(1) - (3)].node), (yyvsp[(2) - (3)].labelref));
1576                         if (target)
1577                                 merge_nodes(target, (yyvsp[(3) - (3)].node));
1578                         else
1579                                 print_error("label or path, '%s', not found", (yyvsp[(2) - (3)].labelref));
1580                         (yyval.node) = (yyvsp[(1) - (3)].node);
1581                 ;}
1582     break;
1584   case 10:
1586 /* Line 1455 of yacc.c  */
1587 #line 159 "dtc-parser.y"
1588     {
1589                         struct node *target = get_node_by_ref((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].labelref));
1591                         if (!target)
1592                                 print_error("label or path, '%s', not found", (yyvsp[(3) - (4)].labelref));
1593                         else
1594                                 delete_node(target);
1596                         (yyval.node) = (yyvsp[(1) - (4)].node);
1597                 ;}
1598     break;
1600   case 11:
1602 /* Line 1455 of yacc.c  */
1603 #line 173 "dtc-parser.y"
1604     {
1605                         (yyval.node) = build_node((yyvsp[(2) - (5)].proplist), (yyvsp[(3) - (5)].nodelist));
1606                 ;}
1607     break;
1609   case 12:
1611 /* Line 1455 of yacc.c  */
1612 #line 180 "dtc-parser.y"
1613     {
1614                         (yyval.proplist) = NULL;
1615                 ;}
1616     break;
1618   case 13:
1620 /* Line 1455 of yacc.c  */
1621 #line 184 "dtc-parser.y"
1622     {
1623                         (yyval.proplist) = chain_property((yyvsp[(2) - (2)].prop), (yyvsp[(1) - (2)].proplist));
1624                 ;}
1625     break;
1627   case 14:
1629 /* Line 1455 of yacc.c  */
1630 #line 191 "dtc-parser.y"
1631     {
1632                         (yyval.prop) = build_property((yyvsp[(1) - (4)].propnodename), (yyvsp[(3) - (4)].data));
1633                 ;}
1634     break;
1636   case 15:
1638 /* Line 1455 of yacc.c  */
1639 #line 195 "dtc-parser.y"
1640     {
1641                         (yyval.prop) = build_property((yyvsp[(1) - (2)].propnodename), empty_data);
1642                 ;}
1643     break;
1645   case 16:
1647 /* Line 1455 of yacc.c  */
1648 #line 199 "dtc-parser.y"
1649     {
1650                         (yyval.prop) = build_property_delete((yyvsp[(2) - (3)].propnodename));
1651                 ;}
1652     break;
1654   case 17:
1656 /* Line 1455 of yacc.c  */
1657 #line 203 "dtc-parser.y"
1658     {
1659                         add_label(&(yyvsp[(2) - (2)].prop)->labels, (yyvsp[(1) - (2)].labelref));
1660                         (yyval.prop) = (yyvsp[(2) - (2)].prop);
1661                 ;}
1662     break;
1664   case 18:
1666 /* Line 1455 of yacc.c  */
1667 #line 211 "dtc-parser.y"
1668     {
1669                         (yyval.data) = data_merge((yyvsp[(1) - (2)].data), (yyvsp[(2) - (2)].data));
1670                 ;}
1671     break;
1673   case 19:
1675 /* Line 1455 of yacc.c  */
1676 #line 215 "dtc-parser.y"
1677     {
1678                         (yyval.data) = data_merge((yyvsp[(1) - (3)].data), (yyvsp[(2) - (3)].array).data);
1679                 ;}
1680     break;
1682   case 20:
1684 /* Line 1455 of yacc.c  */
1685 #line 219 "dtc-parser.y"
1686     {
1687                         (yyval.data) = data_merge((yyvsp[(1) - (4)].data), (yyvsp[(3) - (4)].data));
1688                 ;}
1689     break;
1691   case 21:
1693 /* Line 1455 of yacc.c  */
1694 #line 223 "dtc-parser.y"
1695     {
1696                         (yyval.data) = data_add_marker((yyvsp[(1) - (2)].data), REF_PATH, (yyvsp[(2) - (2)].labelref));
1697                 ;}
1698     break;
1700   case 22:
1702 /* Line 1455 of yacc.c  */
1703 #line 227 "dtc-parser.y"
1704     {
1705                         FILE *f = srcfile_relative_open((yyvsp[(4) - (9)].data).val, NULL);
1706                         struct data d;
1708                         if ((yyvsp[(6) - (9)].integer) != 0)
1709                                 if (fseek(f, (yyvsp[(6) - (9)].integer), SEEK_SET) != 0)
1710                                         print_error("Couldn't seek to offset %llu in \"%s\": %s",
1711                                                      (unsigned long long)(yyvsp[(6) - (9)].integer),
1712                                                      (yyvsp[(4) - (9)].data).val,
1713                                                      strerror(errno));
1715                         d = data_copy_file(f, (yyvsp[(8) - (9)].integer));
1717                         (yyval.data) = data_merge((yyvsp[(1) - (9)].data), d);
1718                         fclose(f);
1719                 ;}
1720     break;
1722   case 23:
1724 /* Line 1455 of yacc.c  */
1725 #line 244 "dtc-parser.y"
1726     {
1727                         FILE *f = srcfile_relative_open((yyvsp[(4) - (5)].data).val, NULL);
1728                         struct data d = empty_data;
1730                         d = data_copy_file(f, -1);
1732                         (yyval.data) = data_merge((yyvsp[(1) - (5)].data), d);
1733                         fclose(f);
1734                 ;}
1735     break;
1737   case 24:
1739 /* Line 1455 of yacc.c  */
1740 #line 254 "dtc-parser.y"
1741     {
1742                         (yyval.data) = data_add_marker((yyvsp[(1) - (2)].data), LABEL, (yyvsp[(2) - (2)].labelref));
1743                 ;}
1744     break;
1746   case 25:
1748 /* Line 1455 of yacc.c  */
1749 #line 261 "dtc-parser.y"
1750     {
1751                         (yyval.data) = empty_data;
1752                 ;}
1753     break;
1755   case 26:
1757 /* Line 1455 of yacc.c  */
1758 #line 265 "dtc-parser.y"
1759     {
1760                         (yyval.data) = (yyvsp[(1) - (2)].data);
1761                 ;}
1762     break;
1764   case 27:
1766 /* Line 1455 of yacc.c  */
1767 #line 269 "dtc-parser.y"
1768     {
1769                         (yyval.data) = data_add_marker((yyvsp[(1) - (2)].data), LABEL, (yyvsp[(2) - (2)].labelref));
1770                 ;}
1771     break;
1773   case 28:
1775 /* Line 1455 of yacc.c  */
1776 #line 276 "dtc-parser.y"
1777     {
1778                         (yyval.array).data = empty_data;
1779                         (yyval.array).bits = eval_literal((yyvsp[(2) - (3)].literal), 0, 7);
1781                         if (((yyval.array).bits !=  8) &&
1782                             ((yyval.array).bits != 16) &&
1783                             ((yyval.array).bits != 32) &&
1784                             ((yyval.array).bits != 64))
1785                         {
1786                                 print_error("Only 8, 16, 32 and 64-bit elements"
1787                                             " are currently supported");
1788                                 (yyval.array).bits = 32;
1789                         }
1790                 ;}
1791     break;
1793   case 29:
1795 /* Line 1455 of yacc.c  */
1796 #line 291 "dtc-parser.y"
1797     {
1798                         (yyval.array).data = empty_data;
1799                         (yyval.array).bits = 32;
1800                 ;}
1801     break;
1803   case 30:
1805 /* Line 1455 of yacc.c  */
1806 #line 296 "dtc-parser.y"
1807     {
1808                         if ((yyvsp[(1) - (2)].array).bits < 64) {
1809                                 uint64_t mask = (1ULL << (yyvsp[(1) - (2)].array).bits) - 1;
1810                                 /*
1811                                  * Bits above mask must either be all zero
1812                                  * (positive within range of mask) or all one
1813                                  * (negative and sign-extended). The second
1814                                  * condition is true if when we set all bits
1815                                  * within the mask to one (i.e. | in the
1816                                  * mask), all bits are one.
1817                                  */
1818                                 if (((yyvsp[(2) - (2)].integer) > mask) && (((yyvsp[(2) - (2)].integer) | mask) != -1ULL))
1819                                         print_error(
1820                                                 "integer value out of range "
1821                                                 "%016lx (%d bits)", (yyvsp[(1) - (2)].array).bits);
1822                         }
1824                         (yyval.array).data = data_append_integer((yyvsp[(1) - (2)].array).data, (yyvsp[(2) - (2)].integer), (yyvsp[(1) - (2)].array).bits);
1825                 ;}
1826     break;
1828   case 31:
1830 /* Line 1455 of yacc.c  */
1831 #line 316 "dtc-parser.y"
1832     {
1833                         uint64_t val = ~0ULL >> (64 - (yyvsp[(1) - (2)].array).bits);
1835                         if ((yyvsp[(1) - (2)].array).bits == 32)
1836                                 (yyvsp[(1) - (2)].array).data = data_add_marker((yyvsp[(1) - (2)].array).data,
1837                                                           REF_PHANDLE,
1838                                                           (yyvsp[(2) - (2)].labelref));
1839                         else
1840                                 print_error("References are only allowed in "
1841                                             "arrays with 32-bit elements.");
1843                         (yyval.array).data = data_append_integer((yyvsp[(1) - (2)].array).data, val, (yyvsp[(1) - (2)].array).bits);
1844                 ;}
1845     break;
1847   case 32:
1849 /* Line 1455 of yacc.c  */
1850 #line 330 "dtc-parser.y"
1851     {
1852                         (yyval.array).data = data_add_marker((yyvsp[(1) - (2)].array).data, LABEL, (yyvsp[(2) - (2)].labelref));
1853                 ;}
1854     break;
1856   case 33:
1858 /* Line 1455 of yacc.c  */
1859 #line 337 "dtc-parser.y"
1860     {
1861                         (yyval.integer) = eval_literal((yyvsp[(1) - (1)].literal), 0, 64);
1862                 ;}
1863     break;
1865   case 34:
1867 /* Line 1455 of yacc.c  */
1868 #line 341 "dtc-parser.y"
1869     {
1870                         (yyval.integer) = eval_char_literal((yyvsp[(1) - (1)].literal));
1871                 ;}
1872     break;
1874   case 35:
1876 /* Line 1455 of yacc.c  */
1877 #line 345 "dtc-parser.y"
1878     {
1879                         (yyval.integer) = (yyvsp[(2) - (3)].integer);
1880                 ;}
1881     break;
1883   case 38:
1885 /* Line 1455 of yacc.c  */
1886 #line 356 "dtc-parser.y"
1887     { (yyval.integer) = (yyvsp[(1) - (5)].integer) ? (yyvsp[(3) - (5)].integer) : (yyvsp[(5) - (5)].integer); ;}
1888     break;
1890   case 40:
1892 /* Line 1455 of yacc.c  */
1893 #line 361 "dtc-parser.y"
1894     { (yyval.integer) = (yyvsp[(1) - (3)].integer) || (yyvsp[(3) - (3)].integer); ;}
1895     break;
1897   case 42:
1899 /* Line 1455 of yacc.c  */
1900 #line 366 "dtc-parser.y"
1901     { (yyval.integer) = (yyvsp[(1) - (3)].integer) && (yyvsp[(3) - (3)].integer); ;}
1902     break;
1904   case 44:
1906 /* Line 1455 of yacc.c  */
1907 #line 371 "dtc-parser.y"
1908     { (yyval.integer) = (yyvsp[(1) - (3)].integer) | (yyvsp[(3) - (3)].integer); ;}
1909     break;
1911   case 46:
1913 /* Line 1455 of yacc.c  */
1914 #line 376 "dtc-parser.y"
1915     { (yyval.integer) = (yyvsp[(1) - (3)].integer) ^ (yyvsp[(3) - (3)].integer); ;}
1916     break;
1918   case 48:
1920 /* Line 1455 of yacc.c  */
1921 #line 381 "dtc-parser.y"
1922     { (yyval.integer) = (yyvsp[(1) - (3)].integer) & (yyvsp[(3) - (3)].integer); ;}
1923     break;
1925   case 50:
1927 /* Line 1455 of yacc.c  */
1928 #line 386 "dtc-parser.y"
1929     { (yyval.integer) = (yyvsp[(1) - (3)].integer) == (yyvsp[(3) - (3)].integer); ;}
1930     break;
1932   case 51:
1934 /* Line 1455 of yacc.c  */
1935 #line 387 "dtc-parser.y"
1936     { (yyval.integer) = (yyvsp[(1) - (3)].integer) != (yyvsp[(3) - (3)].integer); ;}
1937     break;
1939   case 53:
1941 /* Line 1455 of yacc.c  */
1942 #line 392 "dtc-parser.y"
1943     { (yyval.integer) = (yyvsp[(1) - (3)].integer) < (yyvsp[(3) - (3)].integer); ;}
1944     break;
1946   case 54:
1948 /* Line 1455 of yacc.c  */
1949 #line 393 "dtc-parser.y"
1950     { (yyval.integer) = (yyvsp[(1) - (3)].integer) > (yyvsp[(3) - (3)].integer); ;}
1951     break;
1953   case 55:
1955 /* Line 1455 of yacc.c  */
1956 #line 394 "dtc-parser.y"
1957     { (yyval.integer) = (yyvsp[(1) - (3)].integer) <= (yyvsp[(3) - (3)].integer); ;}
1958     break;
1960   case 56:
1962 /* Line 1455 of yacc.c  */
1963 #line 395 "dtc-parser.y"
1964     { (yyval.integer) = (yyvsp[(1) - (3)].integer) >= (yyvsp[(3) - (3)].integer); ;}
1965     break;
1967   case 57:
1969 /* Line 1455 of yacc.c  */
1970 #line 399 "dtc-parser.y"
1971     { (yyval.integer) = (yyvsp[(1) - (3)].integer) << (yyvsp[(3) - (3)].integer); ;}
1972     break;
1974   case 58:
1976 /* Line 1455 of yacc.c  */
1977 #line 400 "dtc-parser.y"
1978     { (yyval.integer) = (yyvsp[(1) - (3)].integer) >> (yyvsp[(3) - (3)].integer); ;}
1979     break;
1981   case 60:
1983 /* Line 1455 of yacc.c  */
1984 #line 405 "dtc-parser.y"
1985     { (yyval.integer) = (yyvsp[(1) - (3)].integer) + (yyvsp[(3) - (3)].integer); ;}
1986     break;
1988   case 61:
1990 /* Line 1455 of yacc.c  */
1991 #line 406 "dtc-parser.y"
1992     { (yyval.integer) = (yyvsp[(1) - (3)].integer) - (yyvsp[(3) - (3)].integer); ;}
1993     break;
1995   case 63:
1997 /* Line 1455 of yacc.c  */
1998 #line 411 "dtc-parser.y"
1999     { (yyval.integer) = (yyvsp[(1) - (3)].integer) * (yyvsp[(3) - (3)].integer); ;}
2000     break;
2002   case 64:
2004 /* Line 1455 of yacc.c  */
2005 #line 412 "dtc-parser.y"
2006     { (yyval.integer) = (yyvsp[(1) - (3)].integer) / (yyvsp[(3) - (3)].integer); ;}
2007     break;
2009   case 65:
2011 /* Line 1455 of yacc.c  */
2012 #line 413 "dtc-parser.y"
2013     { (yyval.integer) = (yyvsp[(1) - (3)].integer) % (yyvsp[(3) - (3)].integer); ;}
2014     break;
2016   case 68:
2018 /* Line 1455 of yacc.c  */
2019 #line 419 "dtc-parser.y"
2020     { (yyval.integer) = -(yyvsp[(2) - (2)].integer); ;}
2021     break;
2023   case 69:
2025 /* Line 1455 of yacc.c  */
2026 #line 420 "dtc-parser.y"
2027     { (yyval.integer) = ~(yyvsp[(2) - (2)].integer); ;}
2028     break;
2030   case 70:
2032 /* Line 1455 of yacc.c  */
2033 #line 421 "dtc-parser.y"
2034     { (yyval.integer) = !(yyvsp[(2) - (2)].integer); ;}
2035     break;
2037   case 71:
2039 /* Line 1455 of yacc.c  */
2040 #line 426 "dtc-parser.y"
2041     {
2042                         (yyval.data) = empty_data;
2043                 ;}
2044     break;
2046   case 72:
2048 /* Line 1455 of yacc.c  */
2049 #line 430 "dtc-parser.y"
2050     {
2051                         (yyval.data) = data_append_byte((yyvsp[(1) - (2)].data), (yyvsp[(2) - (2)].byte));
2052                 ;}
2053     break;
2055   case 73:
2057 /* Line 1455 of yacc.c  */
2058 #line 434 "dtc-parser.y"
2059     {
2060                         (yyval.data) = data_add_marker((yyvsp[(1) - (2)].data), LABEL, (yyvsp[(2) - (2)].labelref));
2061                 ;}
2062     break;
2064   case 74:
2066 /* Line 1455 of yacc.c  */
2067 #line 441 "dtc-parser.y"
2068     {
2069                         (yyval.nodelist) = NULL;
2070                 ;}
2071     break;
2073   case 75:
2075 /* Line 1455 of yacc.c  */
2076 #line 445 "dtc-parser.y"
2077     {
2078                         (yyval.nodelist) = chain_node((yyvsp[(1) - (2)].node), (yyvsp[(2) - (2)].nodelist));
2079                 ;}
2080     break;
2082   case 76:
2084 /* Line 1455 of yacc.c  */
2085 #line 449 "dtc-parser.y"
2086     {
2087                         print_error("syntax error: properties must precede subnodes");
2088                         YYERROR;
2089                 ;}
2090     break;
2092   case 77:
2094 /* Line 1455 of yacc.c  */
2095 #line 457 "dtc-parser.y"
2096     {
2097                         (yyval.node) = name_node((yyvsp[(2) - (2)].node), (yyvsp[(1) - (2)].propnodename));
2098                 ;}
2099     break;
2101   case 78:
2103 /* Line 1455 of yacc.c  */
2104 #line 461 "dtc-parser.y"
2105     {
2106                         (yyval.node) = name_node(build_node_delete(), (yyvsp[(2) - (3)].propnodename));
2107                 ;}
2108     break;
2110   case 79:
2112 /* Line 1455 of yacc.c  */
2113 #line 465 "dtc-parser.y"
2114     {
2115                         add_label(&(yyvsp[(2) - (2)].node)->labels, (yyvsp[(1) - (2)].labelref));
2116                         (yyval.node) = (yyvsp[(2) - (2)].node);
2117                 ;}
2118     break;
2122 /* Line 1455 of yacc.c  */
2123 #line 2124 "dtc-parser.tab.c"
2124       default: break;
2125     }
2126   YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
2128   YYPOPSTACK (yylen);
2129   yylen = 0;
2130   YY_STACK_PRINT (yyss, yyssp);
2132   *++yyvsp = yyval;
2134   /* Now `shift' the result of the reduction.  Determine what state
2135      that goes to, based on the state we popped back to and the rule
2136      number reduced by.  */
2138   yyn = yyr1[yyn];
2140   yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
2141   if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
2142     yystate = yytable[yystate];
2143   else
2144     yystate = yydefgoto[yyn - YYNTOKENS];
2146   goto yynewstate;
2149 /*------------------------------------.
2150 | yyerrlab -- here on detecting error |
2151 `------------------------------------*/
2152 yyerrlab:
2153   /* If not already recovering from an error, report this error.  */
2154   if (!yyerrstatus)
2155     {
2156       ++yynerrs;
2157 #if ! YYERROR_VERBOSE
2158       yyerror (YY_("syntax error"));
2159 #else
2160       {
2161         YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
2162         if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
2163           {
2164             YYSIZE_T yyalloc = 2 * yysize;
2165             if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
2166               yyalloc = YYSTACK_ALLOC_MAXIMUM;
2167             if (yymsg != yymsgbuf)
2168               YYSTACK_FREE (yymsg);
2169             yymsg = (char *) YYSTACK_ALLOC (yyalloc);
2170             if (yymsg)
2171               yymsg_alloc = yyalloc;
2172             else
2173               {
2174                 yymsg = yymsgbuf;
2175                 yymsg_alloc = sizeof yymsgbuf;
2176               }
2177           }
2179         if (0 < yysize && yysize <= yymsg_alloc)
2180           {
2181             (void) yysyntax_error (yymsg, yystate, yychar);
2182             yyerror (yymsg);
2183           }
2184         else
2185           {
2186             yyerror (YY_("syntax error"));
2187             if (yysize != 0)
2188               goto yyexhaustedlab;
2189           }
2190       }
2191 #endif
2192     }
2196   if (yyerrstatus == 3)
2197     {
2198       /* If just tried and failed to reuse lookahead token after an
2199          error, discard it.  */
2201       if (yychar <= YYEOF)
2202         {
2203           /* Return failure if at end of input.  */
2204           if (yychar == YYEOF)
2205             YYABORT;
2206         }
2207       else
2208         {
2209           yydestruct ("Error: discarding",
2210                       yytoken, &yylval);
2211           yychar = YYEMPTY;
2212         }
2213     }
2215   /* Else will try to reuse lookahead token after shifting the error
2216      token.  */
2217   goto yyerrlab1;
2220 /*---------------------------------------------------.
2221 | yyerrorlab -- error raised explicitly by YYERROR.  |
2222 `---------------------------------------------------*/
2223 yyerrorlab:
2225   /* Pacify compilers like GCC when the user code never invokes
2226      YYERROR and the label yyerrorlab therefore never appears in user
2227      code.  */
2228   if (/*CONSTCOND*/ 0)
2229      goto yyerrorlab;
2231   /* Do not reclaim the symbols of the rule which action triggered
2232      this YYERROR.  */
2233   YYPOPSTACK (yylen);
2234   yylen = 0;
2235   YY_STACK_PRINT (yyss, yyssp);
2236   yystate = *yyssp;
2237   goto yyerrlab1;
2240 /*-------------------------------------------------------------.
2241 | yyerrlab1 -- common code for both syntax error and YYERROR.  |
2242 `-------------------------------------------------------------*/
2243 yyerrlab1:
2244   yyerrstatus = 3;      /* Each real token shifted decrements this.  */
2246   for (;;)
2247     {
2248       yyn = yypact[yystate];
2249       if (yyn != YYPACT_NINF)
2250         {
2251           yyn += YYTERROR;
2252           if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
2253             {
2254               yyn = yytable[yyn];
2255               if (0 < yyn)
2256                 break;
2257             }
2258         }
2260       /* Pop the current state because it cannot handle the error token.  */
2261       if (yyssp == yyss)
2262         YYABORT;
2265       yydestruct ("Error: popping",
2266                   yystos[yystate], yyvsp);
2267       YYPOPSTACK (1);
2268       yystate = *yyssp;
2269       YY_STACK_PRINT (yyss, yyssp);
2270     }
2272   *++yyvsp = yylval;
2275   /* Shift the error token.  */
2276   YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
2278   yystate = yyn;
2279   goto yynewstate;
2282 /*-------------------------------------.
2283 | yyacceptlab -- YYACCEPT comes here.  |
2284 `-------------------------------------*/
2285 yyacceptlab:
2286   yyresult = 0;
2287   goto yyreturn;
2289 /*-----------------------------------.
2290 | yyabortlab -- YYABORT comes here.  |
2291 `-----------------------------------*/
2292 yyabortlab:
2293   yyresult = 1;
2294   goto yyreturn;
2296 #if !defined(yyoverflow) || YYERROR_VERBOSE
2297 /*-------------------------------------------------.
2298 | yyexhaustedlab -- memory exhaustion comes here.  |
2299 `-------------------------------------------------*/
2300 yyexhaustedlab:
2301   yyerror (YY_("memory exhausted"));
2302   yyresult = 2;
2303   /* Fall through.  */
2304 #endif
2306 yyreturn:
2307   if (yychar != YYEMPTY)
2308      yydestruct ("Cleanup: discarding lookahead",
2309                  yytoken, &yylval);
2310   /* Do not reclaim the symbols of the rule which action triggered
2311      this YYABORT or YYACCEPT.  */
2312   YYPOPSTACK (yylen);
2313   YY_STACK_PRINT (yyss, yyssp);
2314   while (yyssp != yyss)
2315     {
2316       yydestruct ("Cleanup: popping",
2317                   yystos[*yyssp], yyvsp);
2318       YYPOPSTACK (1);
2319     }
2320 #ifndef yyoverflow
2321   if (yyss != yyssa)
2322     YYSTACK_FREE (yyss);
2323 #endif
2324 #if YYERROR_VERBOSE
2325   if (yymsg != yymsgbuf)
2326     YYSTACK_FREE (yymsg);
2327 #endif
2328   /* Make sure YYID is used.  */
2329   return YYID (yyresult);
2334 /* Line 1675 of yacc.c  */
2335 #line 471 "dtc-parser.y"
2338 void print_error(char const *fmt, ...)
2340         va_list va;
2342         va_start(va, fmt);
2343         srcpos_verror(&yylloc, fmt, va);
2344         va_end(va);
2346         treesource_error = 1;
2349 void yyerror(char const *s) {
2350         print_error("%s", s);
2353 static unsigned long long eval_literal(const char *s, int base, int bits)
2355         unsigned long long val;
2356         char *e;
2358         errno = 0;
2359         val = strtoull(s, &e, base);
2360         if (*e) {
2361                 size_t uls = strspn(e, "UL");
2362                 if (e[uls])
2363                         print_error("bad characters in literal");
2364         }
2365         if ((errno == ERANGE)
2366                  || ((bits < 64) && (val >= (1ULL << bits))))
2367                 print_error("literal out of range");
2368         else if (errno != 0)
2369                 print_error("bad literal");
2370         return val;
2373 static unsigned char eval_char_literal(const char *s)
2375         int i = 1;
2376         char c = s[0];
2378         if (c == '\0')
2379         {
2380                 print_error("empty character literal");
2381                 return 0;
2382         }
2384         /*
2385          * If the first character in the character literal is a \ then process
2386          * the remaining characters as an escape encoding. If the first
2387          * character is neither an escape or a terminator it should be the only
2388          * character in the literal and will be returned.
2389          */
2390         if (c == '\\')
2391                 c = get_escape_char(s, &i);
2393         if (s[i] != '\0')
2394                 print_error("malformed character literal");
2396         return c;