brcm2708: switch to linux 4.4 and update patches
[openwrt.git] / target / linux / brcm2708 / patches-4.4 / 0083-scripts-dtc-Add-overlay-support.patch
1 From 1f1e162b80815e9cb308c14ad4425a314686a813 Mon Sep 17 00:00:00 2001
2 From: Phil Elwell <phil@raspberrypi.org>
3 Date: Tue, 14 Jul 2015 17:00:18 +0100
4 Subject: [PATCH 083/156] scripts/dtc: Add overlay support
5
6 ---
7  scripts/dtc/checks.c                 |  119 ++-
8  scripts/dtc/dtc-lexer.l              |    5 +
9  scripts/dtc/dtc-lexer.lex.c_shipped  |  490 ++++-----
10  scripts/dtc/dtc-parser.tab.c_shipped | 1896 +++++++++++++++++++---------------
11  scripts/dtc/dtc-parser.tab.h_shipped |  107 +-
12  scripts/dtc/dtc-parser.y             |   23 +-
13  scripts/dtc/dtc.c                    |    9 +-
14  scripts/dtc/dtc.h                    |   38 +
15  scripts/dtc/flattree.c               |  141 ++-
16  scripts/dtc/version_gen.h            |    2 +-
17  10 files changed, 1685 insertions(+), 1145 deletions(-)
18
19 --- a/scripts/dtc/checks.c
20 +++ b/scripts/dtc/checks.c
21 @@ -458,21 +458,91 @@ static void fixup_phandle_references(str
22                                      struct node *node, struct property *prop)
23  {
24         struct marker *m = prop->val.markers;
25 +       struct fixup *f, **fp;
26 +       struct fixup_entry *fe, **fep;
27         struct node *refnode;
28         cell_t phandle;
29 +       int has_phandle_refs;
30 +
31 +       has_phandle_refs = 0;
32 +       for_each_marker_of_type(m, REF_PHANDLE) {
33 +               has_phandle_refs = 1;
34 +               break;
35 +       }
36 +
37 +       if (!has_phandle_refs)
38 +               return;
39  
40         for_each_marker_of_type(m, REF_PHANDLE) {
41                 assert(m->offset + sizeof(cell_t) <= prop->val.len);
42  
43                 refnode = get_node_by_ref(dt, m->ref);
44 -               if (! refnode) {
45 +               if (!refnode && !symbol_fixup_support) {
46                         FAIL(c, "Reference to non-existent node or label \"%s\"\n",
47 -                            m->ref);
48 +                               m->ref);
49                         continue;
50                 }
51  
52 -               phandle = get_node_phandle(dt, refnode);
53 -               *((cell_t *)(prop->val.val + m->offset)) = cpu_to_fdt32(phandle);
54 +               if (!refnode) {
55 +                       /* allocate fixup entry */
56 +                       fe = xmalloc(sizeof(*fe));
57 +
58 +                       fe->node = node;
59 +                       fe->prop = prop;
60 +                       fe->offset = m->offset;
61 +                       fe->next = NULL;
62 +
63 +                       /* search for an already existing fixup */
64 +                       for_each_fixup(dt, f)
65 +                               if (strcmp(f->ref, m->ref) == 0)
66 +                                       break;
67 +
68 +                       /* no fixup found, add new */
69 +                       if (f == NULL) {
70 +                               f = xmalloc(sizeof(*f));
71 +                               f->ref = m->ref;
72 +                               f->entries = NULL;
73 +                               f->next = NULL;
74 +
75 +                               /* add it to the tree */
76 +                               fp = &dt->fixups;
77 +                               while (*fp)
78 +                                       fp = &(*fp)->next;
79 +                               *fp = f;
80 +                       }
81 +
82 +                       /* and now append fixup entry */
83 +                       fep = &f->entries;
84 +                       while (*fep)
85 +                               fep = &(*fep)->next;
86 +                       *fep = fe;
87 +
88 +                       /* mark the entry as unresolved */
89 +                       phandle = 0xdeadbeef;
90 +               } else {
91 +                       phandle = get_node_phandle(dt, refnode);
92 +
93 +                       /* if it's a plugin, we need to record it */
94 +                       if (symbol_fixup_support && dt->is_plugin) {
95 +
96 +                               /* allocate a new local fixup entry */
97 +                               fe = xmalloc(sizeof(*fe));
98 +
99 +                               fe->node = node;
100 +                               fe->prop = prop;
101 +                               fe->offset = m->offset;
102 +                               fe->next = NULL;
103 +
104 +                               /* append it to the local fixups */
105 +                               fep = &dt->local_fixups;
106 +                               while (*fep)
107 +                                       fep = &(*fep)->next;
108 +                               *fep = fe;
109 +                       }
110 +               }
111 +
112 +               *((cell_t *)(prop->val.val + m->offset)) =
113 +                       cpu_to_fdt32(phandle);
114         }
115  }
116  ERROR(phandle_references, NULL, NULL, fixup_phandle_references, NULL,
117 @@ -652,6 +722,45 @@ static void check_obsolete_chosen_interr
118  }
119  TREE_WARNING(obsolete_chosen_interrupt_controller, NULL);
120  
121 +static void check_auto_label_phandles(struct check *c, struct node *dt,
122 +                                      struct node *node)
123 +{
124 +       struct label *l;
125 +       struct symbol *s, **sp;
126 +       int has_label;
127 +
128 +       if (!symbol_fixup_support)
129 +               return;
130 +
131 +       has_label = 0;
132 +       for_each_label(node->labels, l) {
133 +               has_label = 1;
134 +               break;
135 +       }
136 +
137 +       if (!has_label)
138 +               return;
139 +
140 +       /* force allocation of a phandle for this node */
141 +       (void)get_node_phandle(dt, node);
142 +
143 +       /* add the symbol */
144 +       for_each_label(node->labels, l) {
145 +
146 +               s = xmalloc(sizeof(*s));
147 +               s->label = l;
148 +               s->node = node;
149 +               s->next = NULL;
150 +
151 +               /* add it to the symbols list */
152 +               sp = &dt->symbols;
153 +               while (*sp)
154 +                       sp = &((*sp)->next);
155 +               *sp = s;
156 +       }
157 +}
158 +NODE_WARNING(auto_label_phandles, NULL);
159 +
160  static struct check *check_table[] = {
161         &duplicate_node_names, &duplicate_property_names,
162         &node_name_chars, &node_name_format, &property_name_chars,
163 @@ -670,6 +779,8 @@ static struct check *check_table[] = {
164         &avoid_default_addr_size,
165         &obsolete_chosen_interrupt_controller,
166  
167 +       &auto_label_phandles,
168 +
169         &always_fail,
170  };
171  
172 --- a/scripts/dtc/dtc-lexer.l
173 +++ b/scripts/dtc/dtc-lexer.l
174 @@ -113,6 +113,11 @@ static void lexical_error(const char *fm
175                         return DT_V1;
176                 }
177  
178 +<*>"/plugin/"  {
179 +                       DPRINT("Keyword: /plugin/\n");
180 +                       return DT_PLUGIN;
181 +               }
182 +
183  <*>"/memreserve/"      {
184                         DPRINT("Keyword: /memreserve/\n");
185                         BEGIN_DEFAULT();
186 --- a/scripts/dtc/dtc-lexer.lex.c_shipped
187 +++ b/scripts/dtc/dtc-lexer.lex.c_shipped
188 @@ -9,7 +9,7 @@
189  #define FLEX_SCANNER
190  #define YY_FLEX_MAJOR_VERSION 2
191  #define YY_FLEX_MINOR_VERSION 5
192 -#define YY_FLEX_SUBMINOR_VERSION 39
193 +#define YY_FLEX_SUBMINOR_VERSION 35
194  #if YY_FLEX_SUBMINOR_VERSION > 0
195  #define FLEX_BETA
196  #endif
197 @@ -162,12 +162,7 @@ typedef unsigned int flex_uint32_t;
198  typedef struct yy_buffer_state *YY_BUFFER_STATE;
199  #endif
200  
201 -#ifndef YY_TYPEDEF_YY_SIZE_T
202 -#define YY_TYPEDEF_YY_SIZE_T
203 -typedef size_t yy_size_t;
204 -#endif
205 -
206 -extern yy_size_t yyleng;
207 +extern int yyleng;
208  
209  extern FILE *yyin, *yyout;
210  
211 @@ -176,7 +171,6 @@ extern FILE *yyin, *yyout;
212  #define EOB_ACT_LAST_MATCH 2
213  
214      #define YY_LESS_LINENO(n)
215 -    #define YY_LINENO_REWIND_TO(ptr)
216      
217  /* Return all but the first "n" matched characters back to the input stream. */
218  #define yyless(n) \
219 @@ -194,6 +188,11 @@ extern FILE *yyin, *yyout;
220  
221  #define unput(c) yyunput( c, (yytext_ptr)  )
222  
223 +#ifndef YY_TYPEDEF_YY_SIZE_T
224 +#define YY_TYPEDEF_YY_SIZE_T
225 +typedef size_t yy_size_t;
226 +#endif
227 +
228  #ifndef YY_STRUCT_YY_BUFFER_STATE
229  #define YY_STRUCT_YY_BUFFER_STATE
230  struct yy_buffer_state
231 @@ -211,7 +210,7 @@ struct yy_buffer_state
232         /* Number of characters read into yy_ch_buf, not including EOB
233          * characters.
234          */
235 -       yy_size_t yy_n_chars;
236 +       int yy_n_chars;
237  
238         /* Whether we "own" the buffer - i.e., we know we created it,
239          * and can realloc() it to grow it, and should free() it to
240 @@ -281,8 +280,8 @@ static YY_BUFFER_STATE * yy_buffer_stack
241  
242  /* yy_hold_char holds the character lost when yytext is formed. */
243  static char yy_hold_char;
244 -static yy_size_t yy_n_chars;           /* number of characters read into yy_ch_buf */
245 -yy_size_t yyleng;
246 +static int yy_n_chars;         /* number of characters read into yy_ch_buf */
247 +int yyleng;
248  
249  /* Points to current character in buffer. */
250  static char *yy_c_buf_p = (char *) 0;
251 @@ -310,7 +309,7 @@ static void yy_init_buffer (YY_BUFFER_ST
252  
253  YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size  );
254  YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str  );
255 -YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,yy_size_t len  );
256 +YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len  );
257  
258  void *yyalloc (yy_size_t  );
259  void *yyrealloc (void *,yy_size_t  );
260 @@ -342,7 +341,7 @@ void yyfree (void *  );
261  
262  /* Begin user sect3 */
263  
264 -#define yywrap() 1
265 +#define yywrap(n) 1
266  #define YY_SKIP_YYWRAP
267  
268  typedef unsigned char YY_CHAR;
269 @@ -373,8 +372,8 @@ static void yy_fatal_error (yyconst char
270         *yy_cp = '\0'; \
271         (yy_c_buf_p) = yy_cp;
272  
273 -#define YY_NUM_RULES 30
274 -#define YY_END_OF_BUFFER 31
275 +#define YY_NUM_RULES 31
276 +#define YY_END_OF_BUFFER 32
277  /* This struct is not used in this scanner,
278     but its presence is necessary. */
279  struct yy_trans_info
280 @@ -382,25 +381,26 @@ struct yy_trans_info
281         flex_int32_t yy_verify;
282         flex_int32_t yy_nxt;
283         };
284 -static yyconst flex_int16_t yy_accept[159] =
285 +static yyconst flex_int16_t yy_accept[166] =
286      {   0,
287 -        0,    0,    0,    0,    0,    0,    0,    0,   31,   29,
288 -       18,   18,   29,   29,   29,   29,   29,   29,   29,   29,
289 -       29,   29,   29,   29,   29,   29,   15,   16,   16,   29,
290 -       16,   10,   10,   18,   26,    0,    3,    0,   27,   12,
291 -        0,    0,   11,    0,    0,    0,    0,    0,    0,    0,
292 -       21,   23,   25,   24,   22,    0,    9,   28,    0,    0,
293 -        0,   14,   14,   16,   16,   16,   10,   10,   10,    0,
294 -       12,    0,   11,    0,    0,    0,   20,    0,    0,    0,
295 -        0,    0,    0,    0,    0,   16,   10,   10,   10,    0,
296 -       13,   19,    0,    0,    0,    0,    0,    0,    0,    0,
297 -
298 -        0,   16,    0,    0,    0,    0,    0,    0,    0,    0,
299 -        0,   16,    6,    0,    0,    0,    0,    0,    0,    2,
300 -        0,    0,    0,    0,    0,    0,    0,    0,    4,   17,
301 -        0,    0,    2,    0,    0,    0,    0,    0,    0,    0,
302 -        0,    0,    0,    0,    0,    1,    0,    0,    0,    0,
303 -        5,    8,    0,    0,    0,    0,    7,    0
304 +        0,    0,    0,    0,    0,    0,    0,    0,   32,   30,
305 +       19,   19,   30,   30,   30,   30,   30,   30,   30,   30,
306 +       30,   30,   30,   30,   30,   30,   16,   17,   17,   30,
307 +       17,   11,   11,   19,   27,    0,    3,    0,   28,   13,
308 +        0,    0,   12,    0,    0,    0,    0,    0,    0,    0,
309 +        0,   22,   24,   26,   25,   23,    0,   10,   29,    0,
310 +        0,    0,   15,   15,   17,   17,   17,   11,   11,   11,
311 +        0,   13,    0,   12,    0,    0,    0,   21,    0,    0,
312 +        0,    0,    0,    0,    0,    0,    0,   17,   11,   11,
313 +       11,    0,   14,   20,    0,    0,    0,    0,    0,    0,
314 +
315 +        0,    0,    0,    0,   17,    0,    0,    0,    0,    0,
316 +        0,    0,    0,    0,    0,   17,    7,    0,    0,    0,
317 +        0,    0,    0,    0,    2,    0,    0,    0,    0,    0,
318 +        0,    0,    0,    0,    4,   18,    0,    0,    5,    2,
319 +        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
320 +        0,    0,    1,    0,    0,    0,    0,    6,    9,    0,
321 +        0,    0,    0,    8,    0
322      } ;
323  
324  static yyconst flex_int32_t yy_ec[256] =
325 @@ -416,9 +416,9 @@ static yyconst flex_int32_t yy_ec[256] =
326         22,   22,   22,   22,   24,   22,   22,   25,   22,   22,
327          1,   26,   27,    1,   22,    1,   21,   28,   29,   30,
328  
329 -       31,   21,   22,   22,   32,   22,   22,   33,   34,   35,
330 -       36,   37,   22,   38,   39,   40,   41,   42,   22,   25,
331 -       43,   22,   44,   45,   46,    1,    1,    1,    1,    1,
332 +       31,   21,   32,   22,   33,   22,   22,   34,   35,   36,
333 +       37,   38,   22,   39,   40,   41,   42,   43,   22,   25,
334 +       44,   22,   45,   46,   47,    1,    1,    1,    1,    1,
335          1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
336          1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
337          1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
338 @@ -435,163 +435,165 @@ static yyconst flex_int32_t yy_ec[256] =
339          1,    1,    1,    1,    1
340      } ;
341  
342 -static yyconst flex_int32_t yy_meta[47] =
343 +static yyconst flex_int32_t yy_meta[48] =
344      {   0,
345          1,    1,    1,    1,    1,    1,    2,    3,    1,    2,
346          2,    2,    4,    5,    5,    5,    6,    1,    1,    1,
347          7,    8,    8,    8,    8,    1,    1,    7,    7,    7,
348          7,    8,    8,    8,    8,    8,    8,    8,    8,    8,
349 -        8,    8,    8,    3,    1,    4
350 +        8,    8,    8,    8,    3,    1,    4
351      } ;
352  
353 -static yyconst flex_int16_t yy_base[173] =
354 +static yyconst flex_int16_t yy_base[180] =
355      {   0,
356 -        0,  383,   34,  382,   65,  381,   37,  105,  387,  391,
357 -       54,  111,  367,  110,  109,  109,  112,   41,  366,  104,
358 -      367,  338,  124,  117,    0,  144,  391,    0,  121,    0,
359 -      135,  155,  140,  179,  391,  160,  391,  379,  391,    0,
360 -      368,  141,  391,  167,  370,  376,  346,  103,  342,  345,
361 -      391,  391,  391,  391,  391,  358,  391,  391,  175,  342,
362 -      338,  391,  355,    0,  185,  339,  184,  347,  346,    0,
363 -        0,  322,  175,  357,  175,  363,  352,  324,  330,  323,
364 -      332,  326,  201,  324,  329,  322,  391,  333,  181,  309,
365 -      391,  341,  340,  313,  320,  338,  178,  311,  146,  317,
366 -
367 -      314,  315,  335,  331,  303,  300,  309,  299,  308,  188,
368 -      336,  335,  391,  305,  320,  281,  283,  271,  203,  288,
369 -      281,  271,  266,  264,  245,  242,  208,  104,  391,  391,
370 -      244,  218,  204,  219,  206,  224,  201,  212,  204,  229,
371 -      215,  208,  207,  200,  219,  391,  233,  221,  200,  181,
372 -      391,  391,  149,  122,   86,   41,  391,  391,  245,  251,
373 -      259,  263,  267,  273,  280,  284,  292,  300,  304,  310,
374 -      318,  326
375 +        0,  393,   35,  392,   66,  391,   38,  107,  397,  401,
376 +       55,  113,  377,  112,  111,  111,  114,   42,  376,  106,
377 +      377,  347,  126,  120,    0,  147,  401,    0,  124,    0,
378 +      137,  158,  170,  163,  401,  153,  401,  389,  401,    0,
379 +      378,  120,  401,  131,  380,  386,  355,  139,  351,  355,
380 +      351,  401,  401,  401,  401,  401,  367,  401,  401,  185,
381 +      350,  346,  401,  364,    0,  185,  347,  189,  356,  355,
382 +        0,    0,  330,  180,  366,  141,  372,  361,  332,  338,
383 +      331,  341,  334,  326,  205,  331,  337,  329,  401,  341,
384 +      167,  316,  401,  349,  348,  320,  328,  346,  180,  318,
385 +
386 +      324,  209,  324,  320,  322,  342,  338,  309,  306,  315,
387 +      305,  315,  312,  192,  342,  341,  401,  293,  306,  282,
388 +      268,  252,  255,  203,  285,  282,  272,  268,  252,  233,
389 +      232,  239,  208,  107,  401,  401,  238,  211,  401,  211,
390 +      212,  208,  228,  203,  215,  207,  233,  222,  212,  211,
391 +      203,  227,  401,  237,  225,  204,  185,  401,  401,  149,
392 +      128,   88,   42,  401,  401,  253,  259,  267,  271,  275,
393 +      281,  288,  292,  300,  308,  312,  318,  326,  334
394      } ;
395  
396 -static yyconst flex_int16_t yy_def[173] =
397 +static yyconst flex_int16_t yy_def[180] =
398      {   0,
399 -      158,    1,    1,    3,  158,    5,    1,    1,  158,  158,
400 -      158,  158,  158,  159,  160,  161,  158,  158,  158,  158,
401 -      162,  158,  158,  158,  163,  162,  158,  164,  165,  164,
402 -      164,  158,  158,  158,  158,  159,  158,  159,  158,  166,
403 -      158,  161,  158,  161,  167,  168,  158,  158,  158,  158,
404 -      158,  158,  158,  158,  158,  162,  158,  158,  158,  158,
405 -      158,  158,  162,  164,  165,  164,  158,  158,  158,  169,
406 -      166,  170,  161,  167,  167,  168,  158,  158,  158,  158,
407 -      158,  158,  158,  158,  158,  164,  158,  158,  169,  170,
408 -      158,  158,  158,  158,  158,  158,  158,  158,  158,  158,
409 -
410 -      158,  164,  158,  158,  158,  158,  158,  158,  158,  171,
411 -      158,  164,  158,  158,  158,  158,  158,  158,  171,  158,
412 -      171,  158,  158,  158,  158,  158,  158,  158,  158,  158,
413 -      158,  158,  158,  158,  158,  158,  158,  158,  158,  158,
414 -      172,  158,  158,  158,  172,  158,  172,  158,  158,  158,
415 -      158,  158,  158,  158,  158,  158,  158,    0,  158,  158,
416 -      158,  158,  158,  158,  158,  158,  158,  158,  158,  158,
417 -      158,  158
418 +      165,    1,    1,    3,  165,    5,    1,    1,  165,  165,
419 +      165,  165,  165,  166,  167,  168,  165,  165,  165,  165,
420 +      169,  165,  165,  165,  170,  169,  165,  171,  172,  171,
421 +      171,  165,  165,  165,  165,  166,  165,  166,  165,  173,
422 +      165,  168,  165,  168,  174,  175,  165,  165,  165,  165,
423 +      165,  165,  165,  165,  165,  165,  169,  165,  165,  165,
424 +      165,  165,  165,  169,  171,  172,  171,  165,  165,  165,
425 +      176,  173,  177,  168,  174,  174,  175,  165,  165,  165,
426 +      165,  165,  165,  165,  165,  165,  165,  171,  165,  165,
427 +      176,  177,  165,  165,  165,  165,  165,  165,  165,  165,
428 +
429 +      165,  165,  165,  165,  171,  165,  165,  165,  165,  165,
430 +      165,  165,  165,  178,  165,  171,  165,  165,  165,  165,
431 +      165,  165,  165,  178,  165,  178,  165,  165,  165,  165,
432 +      165,  165,  165,  165,  165,  165,  165,  165,  165,  165,
433 +      165,  165,  165,  165,  165,  165,  165,  179,  165,  165,
434 +      165,  179,  165,  179,  165,  165,  165,  165,  165,  165,
435 +      165,  165,  165,  165,    0,  165,  165,  165,  165,  165,
436 +      165,  165,  165,  165,  165,  165,  165,  165,  165
437      } ;
438  
439 -static yyconst flex_int16_t yy_nxt[438] =
440 +static yyconst flex_int16_t yy_nxt[449] =
441      {   0,
442         10,   11,   12,   11,   13,   14,   10,   15,   16,   10,
443         10,   10,   17,   10,   10,   10,   10,   18,   19,   20,
444         21,   21,   21,   21,   21,   10,   10,   21,   21,   21,
445         21,   21,   21,   21,   21,   21,   21,   21,   21,   21,
446 -       21,   21,   21,   10,   22,   10,   24,   25,   25,   25,
447 -       32,   33,   33,  157,   26,   34,   34,   34,   51,   52,
448 -       27,   26,   26,   26,   26,   10,   11,   12,   11,   13,
449 -       14,   28,   15,   16,   28,   28,   28,   24,   28,   28,
450 -       28,   10,   18,   19,   20,   29,   29,   29,   29,   29,
451 -       30,   10,   29,   29,   29,   29,   29,   29,   29,   29,
452 -
453 -       29,   29,   29,   29,   29,   29,   29,   29,   10,   22,
454 -       10,   23,   34,   34,   34,   37,   39,   43,   32,   33,
455 -       33,   45,   54,   55,   46,   59,   45,   64,  156,   46,
456 -       64,   64,   64,   79,   44,   38,   59,   57,  134,   47,
457 -      135,   48,   80,   49,   47,   50,   48,   99,   61,   43,
458 -       50,  110,   41,   67,   67,   67,   60,   63,   63,   63,
459 -       57,  155,   68,   69,   63,   37,   44,   66,   67,   67,
460 -       67,   63,   63,   63,   63,   73,   59,   68,   69,   70,
461 -       34,   34,   34,   43,   75,   38,  154,   92,   83,   83,
462 -       83,   64,   44,  120,   64,   64,   64,   67,   67,   67,
463 -
464 -       44,   57,   99,   68,   69,  107,   68,   69,  120,  127,
465 -      108,  153,  152,  121,   83,   83,   83,  133,  133,  133,
466 -      146,  133,  133,  133,  146,  140,  140,  140,  121,  141,
467 -      140,  140,  140,  151,  141,  158,  150,  149,  148,  144,
468 -      147,  143,  142,  139,  147,   36,   36,   36,   36,   36,
469 -       36,   36,   36,   40,  138,  137,  136,   40,   40,   42,
470 -       42,   42,   42,   42,   42,   42,   42,   56,   56,   56,
471 -       56,   62,  132,   62,   64,  131,  130,   64,  129,   64,
472 -       64,   65,  128,  158,   65,   65,   65,   65,   71,  127,
473 -       71,   71,   74,   74,   74,   74,   74,   74,   74,   74,
474 -
475 -       76,   76,   76,   76,   76,   76,   76,   76,   89,  126,
476 -       89,   90,  125,   90,   90,  124,   90,   90,  119,  119,
477 -      119,  119,  119,  119,  119,  119,  145,  145,  145,  145,
478 -      145,  145,  145,  145,  123,  122,   59,   59,  118,  117,
479 -      116,  115,  114,  113,   45,  112,  108,  111,  109,  106,
480 -      105,  104,   46,  103,   91,   87,  102,  101,  100,   98,
481 -       97,   96,   95,   94,   93,   77,   75,   91,   88,   87,
482 -       86,   57,   85,   84,   57,   82,   81,   78,   77,   75,
483 -       72,  158,   58,   57,   53,   35,  158,   31,   23,   23,
484 -        9,  158,  158,  158,  158,  158,  158,  158,  158,  158,
485 -
486 -      158,  158,  158,  158,  158,  158,  158,  158,  158,  158,
487 -      158,  158,  158,  158,  158,  158,  158,  158,  158,  158,
488 -      158,  158,  158,  158,  158,  158,  158,  158,  158,  158,
489 -      158,  158,  158,  158,  158,  158,  158
490 +       21,   21,   21,   21,   10,   22,   10,   24,   25,   25,
491 +       25,   32,   33,   33,  164,   26,   34,   34,   34,   52,
492 +       53,   27,   26,   26,   26,   26,   10,   11,   12,   11,
493 +       13,   14,   28,   15,   16,   28,   28,   28,   24,   28,
494 +       28,   28,   10,   18,   19,   20,   29,   29,   29,   29,
495 +       29,   30,   10,   29,   29,   29,   29,   29,   29,   29,
496 +
497 +       29,   29,   29,   29,   29,   29,   29,   29,   29,   29,
498 +       10,   22,   10,   23,   34,   34,   34,   37,   39,   43,
499 +       32,   33,   33,   45,   55,   56,   46,   60,   43,   45,
500 +       65,  163,   46,   65,   65,   65,   44,   38,   60,   74,
501 +       58,   47,  141,   48,  142,   44,   49,   47,   50,   48,
502 +       76,   51,   62,   94,   50,   41,   44,   51,   37,   61,
503 +       64,   64,   64,   58,   34,   34,   34,   64,  162,   80,
504 +       67,   68,   68,   68,   64,   64,   64,   64,   38,   81,
505 +       69,   70,   71,   68,   68,   68,   60,  161,   43,   69,
506 +       70,   65,   69,   70,   65,   65,   65,  125,   85,   85,
507 +
508 +       85,   58,   68,   68,   68,   44,  102,  110,  125,  133,
509 +      102,   69,   70,  111,  114,  160,  159,  126,   85,   85,
510 +       85,  140,  140,  140,  140,  140,  140,  153,  126,  147,
511 +      147,  147,  153,  148,  147,  147,  147,  158,  148,  165,
512 +      157,  156,  155,  151,  150,  149,  146,  154,  145,  144,
513 +      143,  139,  154,   36,   36,   36,   36,   36,   36,   36,
514 +       36,   40,  138,  137,  136,   40,   40,   42,   42,   42,
515 +       42,   42,   42,   42,   42,   57,   57,   57,   57,   63,
516 +      135,   63,   65,  134,  165,   65,  133,   65,   65,   66,
517 +      132,  131,   66,   66,   66,   66,   72,  130,   72,   72,
518 +
519 +       75,   75,   75,   75,   75,   75,   75,   75,   77,   77,
520 +       77,   77,   77,   77,   77,   77,   91,  129,   91,   92,
521 +      128,   92,   92,  127,   92,   92,  124,  124,  124,  124,
522 +      124,  124,  124,  124,  152,  152,  152,  152,  152,  152,
523 +      152,  152,   60,   60,  123,  122,  121,  120,  119,  118,
524 +      117,   45,  116,  111,  115,  113,  112,  109,  108,  107,
525 +       46,  106,   93,   89,  105,  104,  103,  101,  100,   99,
526 +       98,   97,   96,   95,   78,   76,   93,   90,   89,   88,
527 +       58,   87,   86,   58,   84,   83,   82,   79,   78,   76,
528 +       73,  165,   59,   58,   54,   35,  165,   31,   23,   23,
529 +
530 +        9,  165,  165,  165,  165,  165,  165,  165,  165,  165,
531 +      165,  165,  165,  165,  165,  165,  165,  165,  165,  165,
532 +      165,  165,  165,  165,  165,  165,  165,  165,  165,  165,
533 +      165,  165,  165,  165,  165,  165,  165,  165,  165,  165,
534 +      165,  165,  165,  165,  165,  165,  165,  165
535      } ;
536  
537 -static yyconst flex_int16_t yy_chk[438] =
538 +static yyconst flex_int16_t yy_chk[449] =
539      {   0,
540          1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
541          1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
542          1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
543          1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
544 -        1,    1,    1,    1,    1,    1,    3,    3,    3,    3,
545 -        7,    7,    7,  156,    3,   11,   11,   11,   18,   18,
546 -        3,    3,    3,    3,    3,    5,    5,    5,    5,    5,
547 +        1,    1,    1,    1,    1,    1,    1,    3,    3,    3,
548 +        3,    7,    7,    7,  163,    3,   11,   11,   11,   18,
549 +       18,    3,    3,    3,    3,    3,    5,    5,    5,    5,
550          5,    5,    5,    5,    5,    5,    5,    5,    5,    5,
551          5,    5,    5,    5,    5,    5,    5,    5,    5,    5,
552          5,    5,    5,    5,    5,    5,    5,    5,    5,    5,
553  
554          5,    5,    5,    5,    5,    5,    5,    5,    5,    5,
555 -        5,    8,   12,   12,   12,   14,   15,   16,    8,    8,
556 -        8,   17,   20,   20,   17,   23,   24,   29,  155,   24,
557 -       29,   29,   29,   48,   16,   14,   31,   29,  128,   17,
558 -      128,   17,   48,   17,   24,   17,   24,   99,   24,   42,
559 -       24,   99,   15,   33,   33,   33,   23,   26,   26,   26,
560 -       26,  154,   33,   33,   26,   36,   42,   31,   32,   32,
561 -       32,   26,   26,   26,   26,   44,   59,   32,   32,   32,
562 -       34,   34,   34,   73,   75,   36,  153,   75,   59,   59,
563 -       59,   65,   44,  110,   65,   65,   65,   67,   67,   67,
564 -
565 -       73,   65,   83,   89,   89,   97,   67,   67,  119,  127,
566 -       97,  150,  149,  110,   83,   83,   83,  133,  133,  133,
567 -      141,  127,  127,  127,  145,  136,  136,  136,  119,  136,
568 -      140,  140,  140,  148,  140,  147,  144,  143,  142,  139,
569 -      141,  138,  137,  135,  145,  159,  159,  159,  159,  159,
570 -      159,  159,  159,  160,  134,  132,  131,  160,  160,  161,
571 -      161,  161,  161,  161,  161,  161,  161,  162,  162,  162,
572 -      162,  163,  126,  163,  164,  125,  124,  164,  123,  164,
573 -      164,  165,  122,  121,  165,  165,  165,  165,  166,  120,
574 -      166,  166,  167,  167,  167,  167,  167,  167,  167,  167,
575 -
576 -      168,  168,  168,  168,  168,  168,  168,  168,  169,  118,
577 -      169,  170,  117,  170,  170,  116,  170,  170,  171,  171,
578 -      171,  171,  171,  171,  171,  171,  172,  172,  172,  172,
579 -      172,  172,  172,  172,  115,  114,  112,  111,  109,  108,
580 -      107,  106,  105,  104,  103,  102,  101,  100,   98,   96,
581 -       95,   94,   93,   92,   90,   88,   86,   85,   84,   82,
582 -       81,   80,   79,   78,   77,   76,   74,   72,   69,   68,
583 -       66,   63,   61,   60,   56,   50,   49,   47,   46,   45,
584 +        5,    5,    5,    8,   12,   12,   12,   14,   15,   16,
585 +        8,    8,    8,   17,   20,   20,   17,   23,   42,   24,
586 +       29,  162,   24,   29,   29,   29,   16,   14,   31,   44,
587 +       29,   17,  134,   17,  134,   42,   17,   24,   17,   24,
588 +       76,   17,   24,   76,   24,   15,   44,   24,   36,   23,
589 +       26,   26,   26,   26,   34,   34,   34,   26,  161,   48,
590 +       31,   32,   32,   32,   26,   26,   26,   26,   36,   48,
591 +       32,   32,   32,   33,   33,   33,   60,  160,   74,   91,
592 +       91,   66,   33,   33,   66,   66,   66,  114,   60,   60,
593 +
594 +       60,   66,   68,   68,   68,   74,   85,   99,  124,  133,
595 +      102,   68,   68,   99,  102,  157,  156,  114,   85,   85,
596 +       85,  133,  133,  133,  140,  140,  140,  148,  124,  143,
597 +      143,  143,  152,  143,  147,  147,  147,  155,  147,  154,
598 +      151,  150,  149,  146,  145,  144,  142,  148,  141,  138,
599 +      137,  132,  152,  166,  166,  166,  166,  166,  166,  166,
600 +      166,  167,  131,  130,  129,  167,  167,  168,  168,  168,
601 +      168,  168,  168,  168,  168,  169,  169,  169,  169,  170,
602 +      128,  170,  171,  127,  126,  171,  125,  171,  171,  172,
603 +      123,  122,  172,  172,  172,  172,  173,  121,  173,  173,
604 +
605 +      174,  174,  174,  174,  174,  174,  174,  174,  175,  175,
606 +      175,  175,  175,  175,  175,  175,  176,  120,  176,  177,
607 +      119,  177,  177,  118,  177,  177,  178,  178,  178,  178,
608 +      178,  178,  178,  178,  179,  179,  179,  179,  179,  179,
609 +      179,  179,  116,  115,  113,  112,  111,  110,  109,  108,
610 +      107,  106,  105,  104,  103,  101,  100,   98,   97,   96,
611 +       95,   94,   92,   90,   88,   87,   86,   84,   83,   82,
612 +       81,   80,   79,   78,   77,   75,   73,   70,   69,   67,
613 +       64,   62,   61,   57,   51,   50,   49,   47,   46,   45,
614         41,   38,   22,   21,   19,   13,    9,    6,    4,    2,
615 -      158,  158,  158,  158,  158,  158,  158,  158,  158,  158,
616  
617 -      158,  158,  158,  158,  158,  158,  158,  158,  158,  158,
618 -      158,  158,  158,  158,  158,  158,  158,  158,  158,  158,
619 -      158,  158,  158,  158,  158,  158,  158,  158,  158,  158,
620 -      158,  158,  158,  158,  158,  158,  158
621 +      165,  165,  165,  165,  165,  165,  165,  165,  165,  165,
622 +      165,  165,  165,  165,  165,  165,  165,  165,  165,  165,
623 +      165,  165,  165,  165,  165,  165,  165,  165,  165,  165,
624 +      165,  165,  165,  165,  165,  165,  165,  165,  165,  165,
625 +      165,  165,  165,  165,  165,  165,  165,  165
626      } ;
627  
628  static yy_state_type yy_last_accepting_state;
629 @@ -662,7 +664,7 @@ static int dts_version = 1;
630  static void push_input_file(const char *filename);
631  static bool pop_input_file(void);
632  static void lexical_error(const char *fmt, ...);
633 -#line 666 "dtc-lexer.lex.c"
634 +#line 668 "dtc-lexer.lex.c"
635  
636  #define INITIAL 0
637  #define BYTESTRING 1
638 @@ -704,7 +706,7 @@ FILE *yyget_out (void );
639  
640  void yyset_out  (FILE * out_str  );
641  
642 -yy_size_t yyget_leng (void );
643 +int yyget_leng (void );
644  
645  char *yyget_text (void );
646  
647 @@ -853,6 +855,10 @@ YY_DECL
648         register char *yy_cp, *yy_bp;
649         register int yy_act;
650      
651 +#line 68 "dtc-lexer.l"
652 +
653 +#line 861 "dtc-lexer.lex.c"
654 +
655         if ( !(yy_init) )
656                 {
657                 (yy_init) = 1;
658 @@ -879,11 +885,6 @@ YY_DECL
659                 yy_load_buffer_state( );
660                 }
661  
662 -       {
663 -#line 68 "dtc-lexer.l"
664 -
665 -#line 886 "dtc-lexer.lex.c"
666 -
667         while ( 1 )             /* loops until end-of-file is reached */
668                 {
669                 yy_cp = (yy_c_buf_p);
670 @@ -901,7 +902,7 @@ YY_DECL
671  yy_match:
672                 do
673                         {
674 -                       register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
675 +                       register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
676                         if ( yy_accept[yy_current_state] )
677                                 {
678                                 (yy_last_accepting_state) = yy_current_state;
679 @@ -910,13 +911,13 @@ yy_match:
680                         while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
681                                 {
682                                 yy_current_state = (int) yy_def[yy_current_state];
683 -                               if ( yy_current_state >= 159 )
684 +                               if ( yy_current_state >= 166 )
685                                         yy_c = yy_meta[(unsigned int) yy_c];
686                                 }
687                         yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
688                         ++yy_cp;
689                         }
690 -               while ( yy_current_state != 158 );
691 +               while ( yy_current_state != 165 );
692                 yy_cp = (yy_last_accepting_cpos);
693                 yy_current_state = (yy_last_accepting_state);
694  
695 @@ -1007,23 +1008,31 @@ case 5:
696  YY_RULE_SETUP
697  #line 116 "dtc-lexer.l"
698  {
699 +                       DPRINT("Keyword: /plugin/\n");
700 +                       return DT_PLUGIN;
701 +               }
702 +       YY_BREAK
703 +case 6:
704 +YY_RULE_SETUP
705 +#line 121 "dtc-lexer.l"
706 +{
707                         DPRINT("Keyword: /memreserve/\n");
708                         BEGIN_DEFAULT();
709                         return DT_MEMRESERVE;
710                 }
711         YY_BREAK
712 -case 6:
713 +case 7:
714  YY_RULE_SETUP
715 -#line 122 "dtc-lexer.l"
716 +#line 127 "dtc-lexer.l"
717  {
718                         DPRINT("Keyword: /bits/\n");
719                         BEGIN_DEFAULT();
720                         return DT_BITS;
721                 }
722         YY_BREAK
723 -case 7:
724 +case 8:
725  YY_RULE_SETUP
726 -#line 128 "dtc-lexer.l"
727 +#line 133 "dtc-lexer.l"
728  {
729                         DPRINT("Keyword: /delete-property/\n");
730                         DPRINT("<PROPNODENAME>\n");
731 @@ -1031,9 +1040,9 @@ YY_RULE_SETUP
732                         return DT_DEL_PROP;
733                 }
734         YY_BREAK
735 -case 8:
736 +case 9:
737  YY_RULE_SETUP
738 -#line 135 "dtc-lexer.l"
739 +#line 140 "dtc-lexer.l"
740  {
741                         DPRINT("Keyword: /delete-node/\n");
742                         DPRINT("<PROPNODENAME>\n");
743 @@ -1041,9 +1050,9 @@ YY_RULE_SETUP
744                         return DT_DEL_NODE;
745                 }
746         YY_BREAK
747 -case 9:
748 +case 10:
749  YY_RULE_SETUP
750 -#line 142 "dtc-lexer.l"
751 +#line 147 "dtc-lexer.l"
752  {
753                         DPRINT("Label: %s\n", yytext);
754                         yylval.labelref = xstrdup(yytext);
755 @@ -1051,9 +1060,9 @@ YY_RULE_SETUP
756                         return DT_LABEL;
757                 }
758         YY_BREAK
759 -case 10:
760 +case 11:
761  YY_RULE_SETUP
762 -#line 149 "dtc-lexer.l"
763 +#line 154 "dtc-lexer.l"
764  {
765                         char *e;
766                         DPRINT("Integer Literal: '%s'\n", yytext);
767 @@ -1073,10 +1082,10 @@ YY_RULE_SETUP
768                         return DT_LITERAL;
769                 }
770         YY_BREAK
771 -case 11:
772 -/* rule 11 can match eol */
773 +case 12:
774 +/* rule 12 can match eol */
775  YY_RULE_SETUP
776 -#line 168 "dtc-lexer.l"
777 +#line 173 "dtc-lexer.l"
778  {
779                         struct data d;
780                         DPRINT("Character literal: %s\n", yytext);
781 @@ -1098,18 +1107,18 @@ YY_RULE_SETUP
782                         return DT_CHAR_LITERAL;
783                 }
784         YY_BREAK
785 -case 12:
786 +case 13:
787  YY_RULE_SETUP
788 -#line 189 "dtc-lexer.l"
789 +#line 194 "dtc-lexer.l"
790  {      /* label reference */
791                         DPRINT("Ref: %s\n", yytext+1);
792                         yylval.labelref = xstrdup(yytext+1);
793                         return DT_REF;
794                 }
795         YY_BREAK
796 -case 13:
797 +case 14:
798  YY_RULE_SETUP
799 -#line 195 "dtc-lexer.l"
800 +#line 200 "dtc-lexer.l"
801  {      /* new-style path reference */
802                         yytext[yyleng-1] = '\0';
803                         DPRINT("Ref: %s\n", yytext+2);
804 @@ -1117,27 +1126,27 @@ YY_RULE_SETUP
805                         return DT_REF;
806                 }
807         YY_BREAK
808 -case 14:
809 +case 15:
810  YY_RULE_SETUP
811 -#line 202 "dtc-lexer.l"
812 +#line 207 "dtc-lexer.l"
813  {
814                         yylval.byte = strtol(yytext, NULL, 16);
815                         DPRINT("Byte: %02x\n", (int)yylval.byte);
816                         return DT_BYTE;
817                 }
818         YY_BREAK
819 -case 15:
820 +case 16:
821  YY_RULE_SETUP
822 -#line 208 "dtc-lexer.l"
823 +#line 213 "dtc-lexer.l"
824  {
825                         DPRINT("/BYTESTRING\n");
826                         BEGIN_DEFAULT();
827                         return ']';
828                 }
829         YY_BREAK
830 -case 16:
831 +case 17:
832  YY_RULE_SETUP
833 -#line 214 "dtc-lexer.l"
834 +#line 219 "dtc-lexer.l"
835  {
836                         DPRINT("PropNodeName: %s\n", yytext);
837                         yylval.propnodename = xstrdup((yytext[0] == '\\') ?
838 @@ -1146,75 +1155,75 @@ YY_RULE_SETUP
839                         return DT_PROPNODENAME;
840                 }
841         YY_BREAK
842 -case 17:
843 +case 18:
844  YY_RULE_SETUP
845 -#line 222 "dtc-lexer.l"
846 +#line 227 "dtc-lexer.l"
847  {
848                         DPRINT("Binary Include\n");
849                         return DT_INCBIN;
850                 }
851         YY_BREAK
852 -case 18:
853 -/* rule 18 can match eol */
854 -YY_RULE_SETUP
855 -#line 227 "dtc-lexer.l"
856 -/* eat whitespace */
857 -       YY_BREAK
858  case 19:
859  /* rule 19 can match eol */
860  YY_RULE_SETUP
861 -#line 228 "dtc-lexer.l"
862 -/* eat C-style comments */
863 +#line 232 "dtc-lexer.l"
864 +/* eat whitespace */
865         YY_BREAK
866  case 20:
867  /* rule 20 can match eol */
868  YY_RULE_SETUP
869 -#line 229 "dtc-lexer.l"
870 -/* eat C++-style comments */
871 +#line 233 "dtc-lexer.l"
872 +/* eat C-style comments */
873         YY_BREAK
874  case 21:
875 +/* rule 21 can match eol */
876  YY_RULE_SETUP
877 -#line 231 "dtc-lexer.l"
878 -{ return DT_LSHIFT; };
879 +#line 234 "dtc-lexer.l"
880 +/* eat C++-style comments */
881         YY_BREAK
882  case 22:
883  YY_RULE_SETUP
884 -#line 232 "dtc-lexer.l"
885 -{ return DT_RSHIFT; };
886 +#line 236 "dtc-lexer.l"
887 +{ return DT_LSHIFT; };
888         YY_BREAK
889  case 23:
890  YY_RULE_SETUP
891 -#line 233 "dtc-lexer.l"
892 -{ return DT_LE; };
893 +#line 237 "dtc-lexer.l"
894 +{ return DT_RSHIFT; };
895         YY_BREAK
896  case 24:
897  YY_RULE_SETUP
898 -#line 234 "dtc-lexer.l"
899 -{ return DT_GE; };
900 +#line 238 "dtc-lexer.l"
901 +{ return DT_LE; };
902         YY_BREAK
903  case 25:
904  YY_RULE_SETUP
905 -#line 235 "dtc-lexer.l"
906 -{ return DT_EQ; };
907 +#line 239 "dtc-lexer.l"
908 +{ return DT_GE; };
909         YY_BREAK
910  case 26:
911  YY_RULE_SETUP
912 -#line 236 "dtc-lexer.l"
913 -{ return DT_NE; };
914 +#line 240 "dtc-lexer.l"
915 +{ return DT_EQ; };
916         YY_BREAK
917  case 27:
918  YY_RULE_SETUP
919 -#line 237 "dtc-lexer.l"
920 -{ return DT_AND; };
921 +#line 241 "dtc-lexer.l"
922 +{ return DT_NE; };
923         YY_BREAK
924  case 28:
925  YY_RULE_SETUP
926 -#line 238 "dtc-lexer.l"
927 -{ return DT_OR; };
928 +#line 242 "dtc-lexer.l"
929 +{ return DT_AND; };
930         YY_BREAK
931  case 29:
932  YY_RULE_SETUP
933 -#line 240 "dtc-lexer.l"
934 +#line 243 "dtc-lexer.l"
935 +{ return DT_OR; };
936 +       YY_BREAK
937 +case 30:
938 +YY_RULE_SETUP
939 +#line 245 "dtc-lexer.l"
940  {
941                         DPRINT("Char: %c (\\x%02x)\n", yytext[0],
942                                 (unsigned)yytext[0]);
943 @@ -1230,12 +1239,12 @@ YY_RULE_SETUP
944                         return yytext[0];
945                 }
946         YY_BREAK
947 -case 30:
948 +case 31:
949  YY_RULE_SETUP
950 -#line 255 "dtc-lexer.l"
951 +#line 260 "dtc-lexer.l"
952  ECHO;
953         YY_BREAK
954 -#line 1239 "dtc-lexer.lex.c"
955 +#line 1248 "dtc-lexer.lex.c"
956  
957         case YY_END_OF_BUFFER:
958                 {
959 @@ -1365,7 +1374,6 @@ ECHO;
960                         "fatal flex scanner internal error--no action found" );
961         } /* end of action switch */
962                 } /* end of scanning one token */
963 -       } /* end of user's declarations */
964  } /* end of yylex */
965  
966  /* yy_get_next_buffer - try to read in a new buffer
967 @@ -1421,21 +1429,21 @@ static int yy_get_next_buffer (void)
968  
969         else
970                 {
971 -                       yy_size_t num_to_read =
972 +                       int num_to_read =
973                         YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
974  
975                 while ( num_to_read <= 0 )
976                         { /* Not enough room in the buffer - grow it. */
977  
978                         /* just a shorter name for the current buffer */
979 -                       YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
980 +                       YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
981  
982                         int yy_c_buf_p_offset =
983                                 (int) ((yy_c_buf_p) - b->yy_ch_buf);
984  
985                         if ( b->yy_is_our_buffer )
986                                 {
987 -                               yy_size_t new_size = b->yy_buf_size * 2;
988 +                               int new_size = b->yy_buf_size * 2;
989  
990                                 if ( new_size <= 0 )
991                                         b->yy_buf_size += b->yy_buf_size / 8;
992 @@ -1466,7 +1474,7 @@ static int yy_get_next_buffer (void)
993  
994                 /* Read in more data. */
995                 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
996 -                       (yy_n_chars), num_to_read );
997 +                       (yy_n_chars), (size_t) num_to_read );
998  
999                 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1000                 }
1001 @@ -1528,7 +1536,7 @@ static int yy_get_next_buffer (void)
1002                 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1003                         {
1004                         yy_current_state = (int) yy_def[yy_current_state];
1005 -                       if ( yy_current_state >= 159 )
1006 +                       if ( yy_current_state >= 166 )
1007                                 yy_c = yy_meta[(unsigned int) yy_c];
1008                         }
1009                 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1010 @@ -1556,13 +1564,13 @@ static int yy_get_next_buffer (void)
1011         while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1012                 {
1013                 yy_current_state = (int) yy_def[yy_current_state];
1014 -               if ( yy_current_state >= 159 )
1015 +               if ( yy_current_state >= 166 )
1016                         yy_c = yy_meta[(unsigned int) yy_c];
1017                 }
1018         yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1019 -       yy_is_jam = (yy_current_state == 158);
1020 +       yy_is_jam = (yy_current_state == 165);
1021  
1022 -               return yy_is_jam ? 0 : yy_current_state;
1023 +       return yy_is_jam ? 0 : yy_current_state;
1024  }
1025  
1026  #ifndef YY_NO_INPUT
1027 @@ -1589,7 +1597,7 @@ static int yy_get_next_buffer (void)
1028  
1029                 else
1030                         { /* need more input */
1031 -                       yy_size_t offset = (yy_c_buf_p) - (yytext_ptr);
1032 +                       int offset = (yy_c_buf_p) - (yytext_ptr);
1033                         ++(yy_c_buf_p);
1034  
1035                         switch ( yy_get_next_buffer(  ) )
1036 @@ -1863,7 +1871,7 @@ void yypop_buffer_state (void)
1037   */
1038  static void yyensure_buffer_stack (void)
1039  {
1040 -       yy_size_t num_to_alloc;
1041 +       int num_to_alloc;
1042      
1043         if (!(yy_buffer_stack)) {
1044  
1045 @@ -1960,12 +1968,12 @@ YY_BUFFER_STATE yy_scan_string (yyconst
1046   * 
1047   * @return the newly allocated buffer state object.
1048   */
1049 -YY_BUFFER_STATE yy_scan_bytes  (yyconst char * yybytes, yy_size_t  _yybytes_len )
1050 +YY_BUFFER_STATE yy_scan_bytes  (yyconst char * yybytes, int  _yybytes_len )
1051  {
1052         YY_BUFFER_STATE b;
1053         char *buf;
1054         yy_size_t n;
1055 -       yy_size_t i;
1056 +       int i;
1057      
1058         /* Get memory for full buffer, including space for trailing EOB's. */
1059         n = _yybytes_len + 2;
1060 @@ -2047,7 +2055,7 @@ FILE *yyget_out  (void)
1061  /** Get the length of the current token.
1062   * 
1063   */
1064 -yy_size_t yyget_leng  (void)
1065 +int yyget_leng  (void)
1066  {
1067          return yyleng;
1068  }
1069 @@ -2195,7 +2203,7 @@ void yyfree (void * ptr )
1070  
1071  #define YYTABLES_NAME "yytables"
1072  
1073 -#line 254 "dtc-lexer.l"
1074 +#line 260 "dtc-lexer.l"
1075  
1076  
1077  
1078 --- a/scripts/dtc/dtc-parser.tab.c_shipped
1079 +++ b/scripts/dtc/dtc-parser.tab.c_shipped
1080 @@ -1,19 +1,19 @@
1081 -/* A Bison parser, made by GNU Bison 3.0.2.  */
1082 +/* A Bison parser, made by GNU Bison 2.5.  */
1083  
1084  /* Bison implementation for Yacc-like parsers in C
1085 -
1086 -   Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc.
1087 -
1088 +   
1089 +      Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc.
1090 +   
1091     This program is free software: you can redistribute it and/or modify
1092     it under the terms of the GNU General Public License as published by
1093     the Free Software Foundation, either version 3 of the License, or
1094     (at your option) any later version.
1095 -
1096 +   
1097     This program is distributed in the hope that it will be useful,
1098     but WITHOUT ANY WARRANTY; without even the implied warranty of
1099     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1100     GNU General Public License for more details.
1101 -
1102 +   
1103     You should have received a copy of the GNU General Public License
1104     along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
1105  
1106 @@ -26,7 +26,7 @@
1107     special exception, which will cause the skeleton and the resulting
1108     Bison output files to be licensed under the GNU General Public
1109     License without this special exception.
1110 -
1111 +   
1112     This special exception was added by the Free Software Foundation in
1113     version 2.2 of Bison.  */
1114  
1115 @@ -44,7 +44,7 @@
1116  #define YYBISON 1
1117  
1118  /* Bison version.  */
1119 -#define YYBISON_VERSION "3.0.2"
1120 +#define YYBISON_VERSION "2.5"
1121  
1122  /* Skeleton name.  */
1123  #define YYSKELETON_NAME "yacc.c"
1124 @@ -58,13 +58,18 @@
1125  /* Pull parsers.  */
1126  #define YYPULL 1
1127  
1128 +/* Using locations.  */
1129 +#define YYLSP_NEEDED 1
1130  
1131  
1132  
1133  /* Copy the first part of user declarations.  */
1134 -#line 20 "dtc-parser.y" /* yacc.c:339  */
1135 +
1136 +/* Line 268 of yacc.c  */
1137 +#line 20 "dtc-parser.y"
1138  
1139  #include <stdio.h>
1140 +#include <inttypes.h>
1141  
1142  #include "dtc.h"
1143  #include "srcpos.h"
1144 @@ -80,15 +85,14 @@ extern void yyerror(char const *s);
1145  extern struct boot_info *the_boot_info;
1146  extern bool treesource_error;
1147  
1148 -#line 84 "dtc-parser.tab.c" /* yacc.c:339  */
1149  
1150 -# ifndef YY_NULLPTR
1151 -#  if defined __cplusplus && 201103L <= __cplusplus
1152 -#   define YY_NULLPTR nullptr
1153 -#  else
1154 -#   define YY_NULLPTR 0
1155 -#  endif
1156 -# endif
1157 +/* Line 268 of yacc.c  */
1158 +#line 91 "dtc-parser.tab.c"
1159 +
1160 +/* Enabling traces.  */
1161 +#ifndef YYDEBUG
1162 +# define YYDEBUG 0
1163 +#endif
1164  
1165  /* Enabling verbose error messages.  */
1166  #ifdef YYERROR_VERBOSE
1167 @@ -98,53 +102,51 @@ extern bool treesource_error;
1168  # define YYERROR_VERBOSE 0
1169  #endif
1170  
1171 -/* In a future release of Bison, this section will be replaced
1172 -   by #include "dtc-parser.tab.h".  */
1173 -#ifndef YY_YY_DTC_PARSER_TAB_H_INCLUDED
1174 -# define YY_YY_DTC_PARSER_TAB_H_INCLUDED
1175 -/* Debug traces.  */
1176 -#ifndef YYDEBUG
1177 -# define YYDEBUG 0
1178 -#endif
1179 -#if YYDEBUG
1180 -extern int yydebug;
1181 +/* Enabling the token table.  */
1182 +#ifndef YYTOKEN_TABLE
1183 +# define YYTOKEN_TABLE 0
1184  #endif
1185  
1186 -/* Token type.  */
1187 +
1188 +/* Tokens.  */
1189  #ifndef YYTOKENTYPE
1190  # define YYTOKENTYPE
1191 -  enum yytokentype
1192 -  {
1193 -    DT_V1 = 258,
1194 -    DT_MEMRESERVE = 259,
1195 -    DT_LSHIFT = 260,
1196 -    DT_RSHIFT = 261,
1197 -    DT_LE = 262,
1198 -    DT_GE = 263,
1199 -    DT_EQ = 264,
1200 -    DT_NE = 265,
1201 -    DT_AND = 266,
1202 -    DT_OR = 267,
1203 -    DT_BITS = 268,
1204 -    DT_DEL_PROP = 269,
1205 -    DT_DEL_NODE = 270,
1206 -    DT_PROPNODENAME = 271,
1207 -    DT_LITERAL = 272,
1208 -    DT_CHAR_LITERAL = 273,
1209 -    DT_BYTE = 274,
1210 -    DT_STRING = 275,
1211 -    DT_LABEL = 276,
1212 -    DT_REF = 277,
1213 -    DT_INCBIN = 278
1214 -  };
1215 +   /* Put the tokens into the symbol table, so that GDB and other debuggers
1216 +      know about them.  */
1217 +   enum yytokentype {
1218 +     DT_V1 = 258,
1219 +     DT_PLUGIN = 259,
1220 +     DT_MEMRESERVE = 260,
1221 +     DT_LSHIFT = 261,
1222 +     DT_RSHIFT = 262,
1223 +     DT_LE = 263,
1224 +     DT_GE = 264,
1225 +     DT_EQ = 265,
1226 +     DT_NE = 266,
1227 +     DT_AND = 267,
1228 +     DT_OR = 268,
1229 +     DT_BITS = 269,
1230 +     DT_DEL_PROP = 270,
1231 +     DT_DEL_NODE = 271,
1232 +     DT_PROPNODENAME = 272,
1233 +     DT_LITERAL = 273,
1234 +     DT_CHAR_LITERAL = 274,
1235 +     DT_BYTE = 275,
1236 +     DT_STRING = 276,
1237 +     DT_LABEL = 277,
1238 +     DT_REF = 278,
1239 +     DT_INCBIN = 279
1240 +   };
1241  #endif
1242  
1243 -/* Value type.  */
1244 +
1245 +
1246  #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
1247 -typedef union YYSTYPE YYSTYPE;
1248 -union YYSTYPE
1249 +typedef union YYSTYPE
1250  {
1251 -#line 38 "dtc-parser.y" /* yacc.c:355  */
1252 +
1253 +/* Line 293 of yacc.c  */
1254 +#line 39 "dtc-parser.y"
1255  
1256         char *propnodename;
1257         char *labelref;
1258 @@ -162,37 +164,37 @@ union YYSTYPE
1259         struct node *nodelist;
1260         struct reserve_info *re;
1261         uint64_t integer;
1262 +       int is_plugin;
1263  
1264 -#line 167 "dtc-parser.tab.c" /* yacc.c:355  */
1265 -};
1266 +
1267 +
1268 +/* Line 293 of yacc.c  */
1269 +#line 173 "dtc-parser.tab.c"
1270 +} YYSTYPE;
1271  # define YYSTYPE_IS_TRIVIAL 1
1272 +# define yystype YYSTYPE /* obsolescent; will be withdrawn */
1273  # define YYSTYPE_IS_DECLARED 1
1274  #endif
1275  
1276 -/* Location type.  */
1277  #if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
1278 -typedef struct YYLTYPE YYLTYPE;
1279 -struct YYLTYPE
1280 +typedef struct YYLTYPE
1281  {
1282    int first_line;
1283    int first_column;
1284    int last_line;
1285    int last_column;
1286 -};
1287 +} YYLTYPE;
1288 +# define yyltype YYLTYPE /* obsolescent; will be withdrawn */
1289  # define YYLTYPE_IS_DECLARED 1
1290  # define YYLTYPE_IS_TRIVIAL 1
1291  #endif
1292  
1293  
1294 -extern YYSTYPE yylval;
1295 -extern YYLTYPE yylloc;
1296 -int yyparse (void);
1297 -
1298 -#endif /* !YY_YY_DTC_PARSER_TAB_H_INCLUDED  */
1299 -
1300  /* Copy the second part of user declarations.  */
1301  
1302 -#line 196 "dtc-parser.tab.c" /* yacc.c:358  */
1303 +
1304 +/* Line 343 of yacc.c  */
1305 +#line 198 "dtc-parser.tab.c"
1306  
1307  #ifdef short
1308  # undef short
1309 @@ -206,8 +208,11 @@ typedef unsigned char yytype_uint8;
1310  
1311  #ifdef YYTYPE_INT8
1312  typedef YYTYPE_INT8 yytype_int8;
1313 -#else
1314 +#elif (defined __STDC__ || defined __C99__FUNC__ \
1315 +     || defined __cplusplus || defined _MSC_VER)
1316  typedef signed char yytype_int8;
1317 +#else
1318 +typedef short int yytype_int8;
1319  #endif
1320  
1321  #ifdef YYTYPE_UINT16
1322 @@ -227,7 +232,8 @@ typedef short int yytype_int16;
1323  #  define YYSIZE_T __SIZE_TYPE__
1324  # elif defined size_t
1325  #  define YYSIZE_T size_t
1326 -# elif ! defined YYSIZE_T
1327 +# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
1328 +     || defined __cplusplus || defined _MSC_VER)
1329  #  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
1330  #  define YYSIZE_T size_t
1331  # else
1332 @@ -241,68 +247,39 @@ typedef short int yytype_int16;
1333  # if defined YYENABLE_NLS && YYENABLE_NLS
1334  #  if ENABLE_NLS
1335  #   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
1336 -#   define YY_(Msgid) dgettext ("bison-runtime", Msgid)
1337 +#   define YY_(msgid) dgettext ("bison-runtime", msgid)
1338  #  endif
1339  # endif
1340  # ifndef YY_
1341 -#  define YY_(Msgid) Msgid
1342 -# endif
1343 -#endif
1344 -
1345 -#ifndef YY_ATTRIBUTE
1346 -# if (defined __GNUC__                                               \
1347 -      && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__)))  \
1348 -     || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C
1349 -#  define YY_ATTRIBUTE(Spec) __attribute__(Spec)
1350 -# else
1351 -#  define YY_ATTRIBUTE(Spec) /* empty */
1352 -# endif
1353 -#endif
1354 -
1355 -#ifndef YY_ATTRIBUTE_PURE
1356 -# define YY_ATTRIBUTE_PURE   YY_ATTRIBUTE ((__pure__))
1357 -#endif
1358 -
1359 -#ifndef YY_ATTRIBUTE_UNUSED
1360 -# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
1361 -#endif
1362 -
1363 -#if !defined _Noreturn \
1364 -     && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112)
1365 -# if defined _MSC_VER && 1200 <= _MSC_VER
1366 -#  define _Noreturn __declspec (noreturn)
1367 -# else
1368 -#  define _Noreturn YY_ATTRIBUTE ((__noreturn__))
1369 +#  define YY_(msgid) msgid
1370  # endif
1371  #endif
1372  
1373  /* Suppress unused-variable warnings by "using" E.  */
1374  #if ! defined lint || defined __GNUC__
1375 -# define YYUSE(E) ((void) (E))
1376 +# define YYUSE(e) ((void) (e))
1377  #else
1378 -# define YYUSE(E) /* empty */
1379 +# define YYUSE(e) /* empty */
1380  #endif
1381  
1382 -#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
1383 -/* Suppress an incorrect diagnostic about yylval being uninitialized.  */
1384 -# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
1385 -    _Pragma ("GCC diagnostic push") \
1386 -    _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
1387 -    _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
1388 -# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
1389 -    _Pragma ("GCC diagnostic pop")
1390 +/* Identity function, used to suppress warnings about constant conditions.  */
1391 +#ifndef lint
1392 +# define YYID(n) (n)
1393  #else
1394 -# define YY_INITIAL_VALUE(Value) Value
1395 -#endif
1396 -#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1397 -# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1398 -# define YY_IGNORE_MAYBE_UNINITIALIZED_END
1399 +#if (defined __STDC__ || defined __C99__FUNC__ \
1400 +     || defined __cplusplus || defined _MSC_VER)
1401 +static int
1402 +YYID (int yyi)
1403 +#else
1404 +static int
1405 +YYID (yyi)
1406 +    int yyi;
1407  #endif
1408 -#ifndef YY_INITIAL_VALUE
1409 -# define YY_INITIAL_VALUE(Value) /* Nothing. */
1410 +{
1411 +  return yyi;
1412 +}
1413  #endif
1414  
1415 -
1416  #if ! defined yyoverflow || YYERROR_VERBOSE
1417  
1418  /* The parser invokes alloca or malloc; define the necessary symbols.  */
1419 @@ -320,9 +297,9 @@ typedef short int yytype_int16;
1420  #    define alloca _alloca
1421  #   else
1422  #    define YYSTACK_ALLOC alloca
1423 -#    if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
1424 +#    if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
1425 +     || defined __cplusplus || defined _MSC_VER)
1426  #     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
1427 -      /* Use EXIT_SUCCESS as a witness for stdlib.h.  */
1428  #     ifndef EXIT_SUCCESS
1429  #      define EXIT_SUCCESS 0
1430  #     endif
1431 @@ -332,8 +309,8 @@ typedef short int yytype_int16;
1432  # endif
1433  
1434  # ifdef YYSTACK_ALLOC
1435 -   /* Pacify GCC's 'empty if-body' warning.  */
1436 -#  define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
1437 +   /* Pacify GCC's `empty if-body' warning.  */
1438 +#  define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
1439  #  ifndef YYSTACK_ALLOC_MAXIMUM
1440      /* The OS might guarantee only one guard page at the bottom of the stack,
1441         and a page size can be as small as 4096 bytes.  So we cannot safely
1442 @@ -349,7 +326,7 @@ typedef short int yytype_int16;
1443  #  endif
1444  #  if (defined __cplusplus && ! defined EXIT_SUCCESS \
1445         && ! ((defined YYMALLOC || defined malloc) \
1446 -             && (defined YYFREE || defined free)))
1447 +            && (defined YYFREE || defined free)))
1448  #   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
1449  #   ifndef EXIT_SUCCESS
1450  #    define EXIT_SUCCESS 0
1451 @@ -357,13 +334,15 @@ typedef short int yytype_int16;
1452  #  endif
1453  #  ifndef YYMALLOC
1454  #   define YYMALLOC malloc
1455 -#   if ! defined malloc && ! defined EXIT_SUCCESS
1456 +#   if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
1457 +     || defined __cplusplus || defined _MSC_VER)
1458  void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
1459  #   endif
1460  #  endif
1461  #  ifndef YYFREE
1462  #   define YYFREE free
1463 -#   if ! defined free && ! defined EXIT_SUCCESS
1464 +#   if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
1465 +     || defined __cplusplus || defined _MSC_VER)
1466  void free (void *); /* INFRINGES ON USER NAME SPACE */
1467  #   endif
1468  #  endif
1469 @@ -373,8 +352,8 @@ void free (void *); /* INFRINGES ON USER
1470  
1471  #if (! defined yyoverflow \
1472       && (! defined __cplusplus \
1473 -         || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \
1474 -             && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
1475 +        || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \
1476 +            && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
1477  
1478  /* A type that is properly aligned for any stack member.  */
1479  union yyalloc
1480 @@ -400,35 +379,35 @@ union yyalloc
1481     elements in the stack, and YYPTR gives the new location of the
1482     stack.  Advance YYPTR to a properly aligned location for the next
1483     stack.  */
1484 -# define YYSTACK_RELOCATE(Stack_alloc, Stack)                           \
1485 -    do                                                                  \
1486 -      {                                                                 \
1487 -        YYSIZE_T yynewbytes;                                            \
1488 -        YYCOPY (&yyptr->Stack_alloc, Stack, yysize);                    \
1489 -        Stack = &yyptr->Stack_alloc;                                    \
1490 -        yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
1491 -        yyptr += yynewbytes / sizeof (*yyptr);                          \
1492 -      }                                                                 \
1493 -    while (0)
1494 +# define YYSTACK_RELOCATE(Stack_alloc, Stack)                          \
1495 +    do                                                                 \
1496 +      {                                                                        \
1497 +       YYSIZE_T yynewbytes;                                            \
1498 +       YYCOPY (&yyptr->Stack_alloc, Stack, yysize);                    \
1499 +       Stack = &yyptr->Stack_alloc;                                    \
1500 +       yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
1501 +       yyptr += yynewbytes / sizeof (*yyptr);                          \
1502 +      }                                                                        \
1503 +    while (YYID (0))
1504  
1505  #endif
1506  
1507  #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
1508 -/* Copy COUNT objects from SRC to DST.  The source and destination do
1509 +/* Copy COUNT objects from FROM to TO.  The source and destination do
1510     not overlap.  */
1511  # ifndef YYCOPY
1512  #  if defined __GNUC__ && 1 < __GNUC__
1513 -#   define YYCOPY(Dst, Src, Count) \
1514 -      __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
1515 +#   define YYCOPY(To, From, Count) \
1516 +      __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
1517  #  else
1518 -#   define YYCOPY(Dst, Src, Count)              \
1519 -      do                                        \
1520 -        {                                       \
1521 -          YYSIZE_T yyi;                         \
1522 -          for (yyi = 0; yyi < (Count); yyi++)   \
1523 -            (Dst)[yyi] = (Src)[yyi];            \
1524 -        }                                       \
1525 -      while (0)
1526 +#   define YYCOPY(To, From, Count)             \
1527 +      do                                       \
1528 +       {                                       \
1529 +         YYSIZE_T yyi;                         \
1530 +         for (yyi = 0; yyi < (Count); yyi++)   \
1531 +           (To)[yyi] = (From)[yyi];            \
1532 +       }                                       \
1533 +      while (YYID (0))
1534  #  endif
1535  # endif
1536  #endif /* !YYCOPY_NEEDED */
1537 @@ -439,39 +418,37 @@ union yyalloc
1538  #define YYLAST   136
1539  
1540  /* YYNTOKENS -- Number of terminals.  */
1541 -#define YYNTOKENS  47
1542 +#define YYNTOKENS  48
1543  /* YYNNTS -- Number of nonterminals.  */
1544 -#define YYNNTS  28
1545 +#define YYNNTS  29
1546  /* YYNRULES -- Number of rules.  */
1547 -#define YYNRULES  80
1548 -/* YYNSTATES -- Number of states.  */
1549 -#define YYNSTATES  144
1550 +#define YYNRULES  82
1551 +/* YYNRULES -- Number of states.  */
1552 +#define YYNSTATES  147
1553  
1554 -/* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned
1555 -   by yylex, with out-of-bounds checking.  */
1556 +/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
1557  #define YYUNDEFTOK  2
1558 -#define YYMAXUTOK   278
1559 +#define YYMAXUTOK   279
1560  
1561 -#define YYTRANSLATE(YYX)                                                \
1562 +#define YYTRANSLATE(YYX)                                               \
1563    ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
1564  
1565 -/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
1566 -   as returned by yylex, without out-of-bounds checking.  */
1567 +/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX.  */
1568  static const yytype_uint8 yytranslate[] =
1569  {
1570         0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
1571         2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
1572         2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
1573 -       2,     2,     2,    46,     2,     2,     2,    44,    40,     2,
1574 -      32,    34,    43,    41,    33,    42,     2,    25,     2,     2,
1575 -       2,     2,     2,     2,     2,     2,     2,     2,    37,    24,
1576 -      35,    28,    29,    36,     2,     2,     2,     2,     2,     2,
1577 +       2,     2,     2,    47,     2,     2,     2,    45,    41,     2,
1578 +      33,    35,    44,    42,    34,    43,     2,    26,     2,     2,
1579 +       2,     2,     2,     2,     2,     2,     2,     2,    38,    25,
1580 +      36,    29,    30,    37,     2,     2,     2,     2,     2,     2,
1581         2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
1582         2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
1583 -       2,    30,     2,    31,    39,     2,     2,     2,     2,     2,
1584 +       2,    31,     2,    32,    40,     2,     2,     2,     2,     2,
1585         2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
1586         2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
1587 -       2,     2,     2,    26,    38,    27,    45,     2,     2,     2,
1588 +       2,     2,     2,    27,    39,    28,    46,     2,     2,     2,
1589         2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
1590         2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
1591         2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
1592 @@ -486,292 +463,335 @@ static const yytype_uint8 yytranslate[]
1593         2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
1594         2,     2,     2,     2,     2,     2,     1,     2,     3,     4,
1595         5,     6,     7,     8,     9,    10,    11,    12,    13,    14,
1596 -      15,    16,    17,    18,    19,    20,    21,    22,    23
1597 +      15,    16,    17,    18,    19,    20,    21,    22,    23,    24
1598  };
1599  
1600  #if YYDEBUG
1601 -  /* YYRLINE[YYN] -- Source line where rule number YYN was defined.  */
1602 +/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
1603 +   YYRHS.  */
1604 +static const yytype_uint16 yyprhs[] =
1605 +{
1606 +       0,     0,     3,     9,    10,    13,    14,    17,    22,    25,
1607 +      28,    32,    37,    41,    46,    52,    53,    56,    61,    64,
1608 +      68,    71,    74,    78,    83,    86,    96,   102,   105,   106,
1609 +     109,   112,   116,   118,   121,   124,   127,   129,   131,   135,
1610 +     137,   139,   145,   147,   151,   153,   157,   159,   163,   165,
1611 +     169,   171,   175,   177,   181,   185,   187,   191,   195,   199,
1612 +     203,   207,   211,   213,   217,   221,   223,   227,   231,   235,
1613 +     237,   239,   242,   245,   248,   249,   252,   255,   256,   259,
1614 +     262,   265,   269
1615 +};
1616 +
1617 +/* YYRHS -- A `-1'-separated list of the rules' RHS.  */
1618 +static const yytype_int8 yyrhs[] =
1619 +{
1620 +      49,     0,    -1,     3,    25,    50,    51,    53,    -1,    -1,
1621 +       4,    25,    -1,    -1,    52,    51,    -1,     5,    60,    60,
1622 +      25,    -1,    22,    52,    -1,    26,    54,    -1,    53,    26,
1623 +      54,    -1,    53,    22,    23,    54,    -1,    53,    23,    54,
1624 +      -1,    53,    16,    23,    25,    -1,    27,    55,    75,    28,
1625 +      25,    -1,    -1,    55,    56,    -1,    17,    29,    57,    25,
1626 +      -1,    17,    25,    -1,    15,    17,    25,    -1,    22,    56,
1627 +      -1,    58,    21,    -1,    58,    59,    30,    -1,    58,    31,
1628 +      74,    32,    -1,    58,    23,    -1,    58,    24,    33,    21,
1629 +      34,    60,    34,    60,    35,    -1,    58,    24,    33,    21,
1630 +      35,    -1,    57,    22,    -1,    -1,    57,    34,    -1,    58,
1631 +      22,    -1,    14,    18,    36,    -1,    36,    -1,    59,    60,
1632 +      -1,    59,    23,    -1,    59,    22,    -1,    18,    -1,    19,
1633 +      -1,    33,    61,    35,    -1,    62,    -1,    63,    -1,    63,
1634 +      37,    61,    38,    62,    -1,    64,    -1,    63,    13,    64,
1635 +      -1,    65,    -1,    64,    12,    65,    -1,    66,    -1,    65,
1636 +      39,    66,    -1,    67,    -1,    66,    40,    67,    -1,    68,
1637 +      -1,    67,    41,    68,    -1,    69,    -1,    68,    10,    69,
1638 +      -1,    68,    11,    69,    -1,    70,    -1,    69,    36,    70,
1639 +      -1,    69,    30,    70,    -1,    69,     8,    70,    -1,    69,
1640 +       9,    70,    -1,    70,     6,    71,    -1,    70,     7,    71,
1641 +      -1,    71,    -1,    71,    42,    72,    -1,    71,    43,    72,
1642 +      -1,    72,    -1,    72,    44,    73,    -1,    72,    26,    73,
1643 +      -1,    72,    45,    73,    -1,    73,    -1,    60,    -1,    43,
1644 +      73,    -1,    46,    73,    -1,    47,    73,    -1,    -1,    74,
1645 +      20,    -1,    74,    22,    -1,    -1,    76,    75,    -1,    76,
1646 +      56,    -1,    17,    54,    -1,    16,    17,    25,    -1,    22,
1647 +      76,    -1
1648 +};
1649 +
1650 +/* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
1651  static const yytype_uint16 yyrline[] =
1652  {
1653 -       0,   104,   104,   113,   116,   123,   127,   135,   139,   144,
1654 -     155,   165,   180,   188,   191,   198,   202,   206,   210,   218,
1655 -     222,   226,   230,   234,   250,   260,   268,   271,   275,   282,
1656 -     298,   303,   322,   336,   343,   344,   345,   352,   356,   357,
1657 -     361,   362,   366,   367,   371,   372,   376,   377,   381,   382,
1658 -     386,   387,   388,   392,   393,   394,   395,   396,   400,   401,
1659 -     402,   406,   407,   408,   412,   413,   414,   415,   419,   420,
1660 -     421,   422,   427,   430,   434,   442,   445,   449,   457,   461,
1661 -     465
1662 +       0,   108,   108,   119,   122,   130,   133,   140,   144,   152,
1663 +     156,   161,   172,   182,   197,   205,   208,   215,   219,   223,
1664 +     227,   235,   239,   243,   247,   251,   267,   277,   285,   288,
1665 +     292,   299,   315,   320,   339,   353,   360,   361,   362,   369,
1666 +     373,   374,   378,   379,   383,   384,   388,   389,   393,   394,
1667 +     398,   399,   403,   404,   405,   409,   410,   411,   412,   413,
1668 +     417,   418,   419,   423,   424,   425,   429,   430,   431,   432,
1669 +     436,   437,   438,   439,   444,   447,   451,   459,   462,   466,
1670 +     474,   478,   482
1671  };
1672  #endif
1673  
1674 -#if YYDEBUG || YYERROR_VERBOSE || 0
1675 +#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
1676  /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
1677     First, the terminals, then, starting at YYNTOKENS, nonterminals.  */
1678  static const char *const yytname[] =
1679  {
1680 -  "$end", "error", "$undefined", "DT_V1", "DT_MEMRESERVE", "DT_LSHIFT",
1681 -  "DT_RSHIFT", "DT_LE", "DT_GE", "DT_EQ", "DT_NE", "DT_AND", "DT_OR",
1682 -  "DT_BITS", "DT_DEL_PROP", "DT_DEL_NODE", "DT_PROPNODENAME", "DT_LITERAL",
1683 -  "DT_CHAR_LITERAL", "DT_BYTE", "DT_STRING", "DT_LABEL", "DT_REF",
1684 -  "DT_INCBIN", "';'", "'/'", "'{'", "'}'", "'='", "'>'", "'['", "']'",
1685 -  "'('", "','", "')'", "'<'", "'?'", "':'", "'|'", "'^'", "'&'", "'+'",
1686 -  "'-'", "'*'", "'%'", "'~'", "'!'", "$accept", "sourcefile",
1687 -  "memreserves", "memreserve", "devicetree", "nodedef", "proplist",
1688 -  "propdef", "propdata", "propdataprefix", "arrayprefix", "integer_prim",
1689 -  "integer_expr", "integer_trinary", "integer_or", "integer_and",
1690 -  "integer_bitor", "integer_bitxor", "integer_bitand", "integer_eq",
1691 -  "integer_rela", "integer_shift", "integer_add", "integer_mul",
1692 -  "integer_unary", "bytestring", "subnodes", "subnode", YY_NULLPTR
1693 +  "$end", "error", "$undefined", "DT_V1", "DT_PLUGIN", "DT_MEMRESERVE",
1694 +  "DT_LSHIFT", "DT_RSHIFT", "DT_LE", "DT_GE", "DT_EQ", "DT_NE", "DT_AND",
1695 +  "DT_OR", "DT_BITS", "DT_DEL_PROP", "DT_DEL_NODE", "DT_PROPNODENAME",
1696 +  "DT_LITERAL", "DT_CHAR_LITERAL", "DT_BYTE", "DT_STRING", "DT_LABEL",
1697 +  "DT_REF", "DT_INCBIN", "';'", "'/'", "'{'", "'}'", "'='", "'>'", "'['",
1698 +  "']'", "'('", "','", "')'", "'<'", "'?'", "':'", "'|'", "'^'", "'&'",
1699 +  "'+'", "'-'", "'*'", "'%'", "'~'", "'!'", "$accept", "sourcefile",
1700 +  "plugindecl", "memreserves", "memreserve", "devicetree", "nodedef",
1701 +  "proplist", "propdef", "propdata", "propdataprefix", "arrayprefix",
1702 +  "integer_prim", "integer_expr", "integer_trinary", "integer_or",
1703 +  "integer_and", "integer_bitor", "integer_bitxor", "integer_bitand",
1704 +  "integer_eq", "integer_rela", "integer_shift", "integer_add",
1705 +  "integer_mul", "integer_unary", "bytestring", "subnodes", "subnode", 0
1706  };
1707  #endif
1708  
1709  # ifdef YYPRINT
1710 -/* YYTOKNUM[NUM] -- (External) token number corresponding to the
1711 -   (internal) symbol number NUM (which must be that of a token).  */
1712 +/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
1713 +   token YYLEX-NUM.  */
1714  static const yytype_uint16 yytoknum[] =
1715  {
1716         0,   256,   257,   258,   259,   260,   261,   262,   263,   264,
1717       265,   266,   267,   268,   269,   270,   271,   272,   273,   274,
1718 -     275,   276,   277,   278,    59,    47,   123,   125,    61,    62,
1719 -      91,    93,    40,    44,    41,    60,    63,    58,   124,    94,
1720 -      38,    43,    45,    42,    37,   126,    33
1721 +     275,   276,   277,   278,   279,    59,    47,   123,   125,    61,
1722 +      62,    91,    93,    40,    44,    41,    60,    63,    58,   124,
1723 +      94,    38,    43,    45,    42,    37,   126,    33
1724  };
1725  # endif
1726  
1727 -#define YYPACT_NINF -81
1728 -
1729 -#define yypact_value_is_default(Yystate) \
1730 -  (!!((Yystate) == (-81)))
1731 -
1732 -#define YYTABLE_NINF -1
1733 -
1734 -#define yytable_value_is_error(Yytable_value) \
1735 -  0
1736 -
1737 -  /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
1738 -     STATE-NUM.  */
1739 -static const yytype_int8 yypact[] =
1740 +/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
1741 +static const yytype_uint8 yyr1[] =
1742  {
1743 -      16,   -11,    21,    10,   -81,    25,    10,    19,    10,   -81,
1744 -     -81,    -9,    25,   -81,     2,    51,   -81,    -9,    -9,    -9,
1745 -     -81,     1,   -81,    -6,    50,    14,    28,    29,    36,     3,
1746 -      58,    44,    -3,   -81,    47,   -81,   -81,    65,    68,     2,
1747 -       2,   -81,   -81,   -81,   -81,    -9,    -9,    -9,    -9,    -9,
1748 -      -9,    -9,    -9,    -9,    -9,    -9,    -9,    -9,    -9,    -9,
1749 -      -9,    -9,    -9,    -9,   -81,    63,    69,     2,   -81,   -81,
1750 -      50,    57,    14,    28,    29,    36,     3,     3,    58,    58,
1751 -      58,    58,    44,    44,    -3,    -3,   -81,   -81,   -81,    79,
1752 -      80,    -8,    63,   -81,    72,    63,   -81,   -81,    -9,    76,
1753 -      77,   -81,   -81,   -81,   -81,   -81,    78,   -81,   -81,   -81,
1754 -     -81,   -81,    35,     4,   -81,   -81,   -81,   -81,    86,   -81,
1755 -     -81,   -81,    73,   -81,   -81,    33,    71,    84,    39,   -81,
1756 -     -81,   -81,   -81,   -81,    41,   -81,   -81,   -81,    25,   -81,
1757 -      74,    25,    75,   -81
1758 +       0,    48,    49,    50,    50,    51,    51,    52,    52,    53,
1759 +      53,    53,    53,    53,    54,    55,    55,    56,    56,    56,
1760 +      56,    57,    57,    57,    57,    57,    57,    57,    58,    58,
1761 +      58,    59,    59,    59,    59,    59,    60,    60,    60,    61,
1762 +      62,    62,    63,    63,    64,    64,    65,    65,    66,    66,
1763 +      67,    67,    68,    68,    68,    69,    69,    69,    69,    69,
1764 +      70,    70,    70,    71,    71,    71,    72,    72,    72,    72,
1765 +      73,    73,    73,    73,    74,    74,    74,    75,    75,    75,
1766 +      76,    76,    76
1767  };
1768  
1769 -  /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
1770 -     Performed when YYTABLE does not specify something else to do.  Zero
1771 -     means the default is an error.  */
1772 -static const yytype_uint8 yydefact[] =
1773 +/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
1774 +static const yytype_uint8 yyr2[] =
1775  {
1776 -       0,     0,     0,     3,     1,     0,     0,     0,     3,    34,
1777 -      35,     0,     0,     6,     0,     2,     4,     0,     0,     0,
1778 -      68,     0,    37,    38,    40,    42,    44,    46,    48,    50,
1779 -      53,    60,    63,    67,     0,    13,     7,     0,     0,     0,
1780 -       0,    69,    70,    71,    36,     0,     0,     0,     0,     0,
1781 -       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1782 -       0,     0,     0,     0,     5,    75,     0,     0,    10,     8,
1783 -      41,     0,    43,    45,    47,    49,    51,    52,    56,    57,
1784 -      55,    54,    58,    59,    61,    62,    65,    64,    66,     0,
1785 -       0,     0,     0,    14,     0,    75,    11,     9,     0,     0,
1786 -       0,    16,    26,    78,    18,    80,     0,    77,    76,    39,
1787 -      17,    79,     0,     0,    12,    25,    15,    27,     0,    19,
1788 -      28,    22,     0,    72,    30,     0,     0,     0,     0,    33,
1789 -      32,    20,    31,    29,     0,    73,    74,    21,     0,    24,
1790 -       0,     0,     0,    23
1791 +       0,     2,     5,     0,     2,     0,     2,     4,     2,     2,
1792 +       3,     4,     3,     4,     5,     0,     2,     4,     2,     3,
1793 +       2,     2,     3,     4,     2,     9,     5,     2,     0,     2,
1794 +       2,     3,     1,     2,     2,     2,     1,     1,     3,     1,
1795 +       1,     5,     1,     3,     1,     3,     1,     3,     1,     3,
1796 +       1,     3,     1,     3,     3,     1,     3,     3,     3,     3,
1797 +       3,     3,     1,     3,     3,     1,     3,     3,     3,     1,
1798 +       1,     2,     2,     2,     0,     2,     2,     0,     2,     2,
1799 +       2,     3,     2
1800  };
1801  
1802 -  /* YYPGOTO[NTERM-NUM].  */
1803 -static const yytype_int8 yypgoto[] =
1804 +/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM.
1805 +   Performed when YYTABLE doesn't specify something else to do.  Zero
1806 +   means the default is an error.  */
1807 +static const yytype_uint8 yydefact[] =
1808  {
1809 -     -81,   -81,   100,   104,   -81,   -38,   -81,   -80,   -81,   -81,
1810 -     -81,    -5,    66,    13,   -81,    70,    67,    81,    64,    82,
1811 -      37,    27,    34,    38,   -14,   -81,    22,    24
1812 +       0,     0,     0,     3,     1,     0,     5,     4,     0,     0,
1813 +       0,     5,    36,    37,     0,     0,     8,     0,     2,     6,
1814 +       0,     0,     0,    70,     0,    39,    40,    42,    44,    46,
1815 +      48,    50,    52,    55,    62,    65,    69,     0,    15,     9,
1816 +       0,     0,     0,     0,    71,    72,    73,    38,     0,     0,
1817 +       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1818 +       0,     0,     0,     0,     0,     0,     0,     7,    77,     0,
1819 +       0,    12,    10,    43,     0,    45,    47,    49,    51,    53,
1820 +      54,    58,    59,    57,    56,    60,    61,    63,    64,    67,
1821 +      66,    68,     0,     0,     0,     0,    16,     0,    77,    13,
1822 +      11,     0,     0,     0,    18,    28,    80,    20,    82,     0,
1823 +      79,    78,    41,    19,    81,     0,     0,    14,    27,    17,
1824 +      29,     0,    21,    30,    24,     0,    74,    32,     0,     0,
1825 +       0,     0,    35,    34,    22,    33,    31,     0,    75,    76,
1826 +      23,     0,    26,     0,     0,     0,    25
1827  };
1828  
1829 -  /* YYDEFGOTO[NTERM-NUM].  */
1830 +/* YYDEFGOTO[NTERM-NUM].  */
1831  static const yytype_int16 yydefgoto[] =
1832  {
1833 -      -1,     2,     7,     8,    15,    36,    65,    93,   112,   113,
1834 -     125,    20,    21,    22,    23,    24,    25,    26,    27,    28,
1835 -      29,    30,    31,    32,    33,   128,    94,    95
1836 +      -1,     2,     6,    10,    11,    18,    39,    68,    96,   115,
1837 +     116,   128,    23,    24,    25,    26,    27,    28,    29,    30,
1838 +      31,    32,    33,    34,    35,    36,   131,    97,    98
1839  };
1840  
1841 -  /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM.  If
1842 -     positive, shift that token.  If negative, reduce the rule whose
1843 -     number is the opposite.  If YYTABLE_NINF, syntax error.  */
1844 -static const yytype_uint8 yytable[] =
1845 +/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
1846 +   STATE-NUM.  */
1847 +#define YYPACT_NINF -84
1848 +static const yytype_int8 yypact[] =
1849  {
1850 -      12,    68,    69,    41,    42,    43,    45,    34,     9,    10,
1851 -      53,    54,   104,     3,     5,   107,   101,   118,    35,     1,
1852 -     102,     4,    61,    11,   119,   120,   121,   122,    35,    97,
1853 -      46,     6,    55,    17,   123,    44,    18,    19,    56,   124,
1854 -      62,    63,     9,    10,    14,    51,    52,    86,    87,    88,
1855 -       9,    10,    48,   103,   129,   130,   115,    11,   135,   116,
1856 -     136,    47,   131,    57,    58,    11,    37,    49,   117,    50,
1857 -     137,    64,    38,    39,   138,   139,    40,    89,    90,    91,
1858 -      78,    79,    80,    81,    92,    59,    60,    66,    76,    77,
1859 -      67,    82,    83,    96,    98,    99,   100,    84,    85,   106,
1860 -     110,   111,   114,   126,   134,   127,   133,   141,    16,   143,
1861 -      13,   109,    71,    74,    72,    70,   105,   108,     0,     0,
1862 -     132,     0,     0,     0,     0,     0,     0,     0,     0,    73,
1863 -       0,     0,    75,   140,     0,     0,   142
1864 +      15,   -12,    35,    42,   -84,    27,     9,   -84,    24,     9,
1865 +      43,     9,   -84,   -84,   -10,    24,   -84,    60,    44,   -84,
1866 +     -10,   -10,   -10,   -84,    55,   -84,    -7,    52,    53,    51,
1867 +      54,    10,     2,    38,    37,    -4,   -84,    68,   -84,   -84,
1868 +      71,    73,    60,    60,   -84,   -84,   -84,   -84,   -10,   -10,
1869 +     -10,   -10,   -10,   -10,   -10,   -10,   -10,   -10,   -10,   -10,
1870 +     -10,   -10,   -10,   -10,   -10,   -10,   -10,   -84,    56,    72,
1871 +      60,   -84,   -84,    52,    61,    53,    51,    54,    10,     2,
1872 +       2,    38,    38,    38,    38,    37,    37,    -4,    -4,   -84,
1873 +     -84,   -84,    81,    83,    34,    56,   -84,    74,    56,   -84,
1874 +     -84,   -10,    76,    78,   -84,   -84,   -84,   -84,   -84,    79,
1875 +     -84,   -84,   -84,   -84,   -84,    -6,     3,   -84,   -84,   -84,
1876 +     -84,    87,   -84,   -84,   -84,    75,   -84,   -84,    32,    70,
1877 +      86,    36,   -84,   -84,   -84,   -84,   -84,    47,   -84,   -84,
1878 +     -84,    24,   -84,    77,    24,    80,   -84
1879  };
1880  
1881 -static const yytype_int16 yycheck[] =
1882 +/* YYPGOTO[NTERM-NUM].  */
1883 +static const yytype_int8 yypgoto[] =
1884  {
1885 -       5,    39,    40,    17,    18,    19,    12,    12,    17,    18,
1886 -       7,     8,    92,    24,     4,    95,    24,    13,    26,     3,
1887 -      28,     0,    25,    32,    20,    21,    22,    23,    26,    67,
1888 -      36,    21,    29,    42,    30,    34,    45,    46,    35,    35,
1889 -      43,    44,    17,    18,    25,     9,    10,    61,    62,    63,
1890 -      17,    18,    38,    91,    21,    22,    21,    32,    19,    24,
1891 -      21,    11,    29,     5,     6,    32,    15,    39,    33,    40,
1892 -      31,    24,    21,    22,    33,    34,    25,    14,    15,    16,
1893 -      53,    54,    55,    56,    21,    41,    42,    22,    51,    52,
1894 -      22,    57,    58,    24,    37,    16,    16,    59,    60,    27,
1895 -      24,    24,    24,    17,    20,    32,    35,    33,     8,    34,
1896 -       6,    98,    46,    49,    47,    45,    92,    95,    -1,    -1,
1897 -     125,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    48,
1898 -      -1,    -1,    50,   138,    -1,    -1,   141
1899 +     -84,   -84,   -84,    98,   101,   -84,   -41,   -84,   -83,   -84,
1900 +     -84,   -84,    -8,    63,    12,   -84,    66,    67,    65,    69,
1901 +      82,    29,    18,    25,    26,   -17,   -84,    20,    28
1902  };
1903  
1904 -  /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
1905 -     symbol of state STATE-NUM.  */
1906 -static const yytype_uint8 yystos[] =
1907 +/* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If
1908 +   positive, shift that token.  If negative, reduce the rule which
1909 +   number is the opposite.  If YYTABLE_NINF, syntax error.  */
1910 +#define YYTABLE_NINF -1
1911 +static const yytype_uint8 yytable[] =
1912  {
1913 -       0,     3,    48,    24,     0,     4,    21,    49,    50,    17,
1914 -      18,    32,    58,    50,    25,    51,    49,    42,    45,    46,
1915 -      58,    59,    60,    61,    62,    63,    64,    65,    66,    67,
1916 -      68,    69,    70,    71,    58,    26,    52,    15,    21,    22,
1917 -      25,    71,    71,    71,    34,    12,    36,    11,    38,    39,
1918 -      40,     9,    10,     7,     8,    29,    35,     5,     6,    41,
1919 -      42,    25,    43,    44,    24,    53,    22,    22,    52,    52,
1920 -      62,    59,    63,    64,    65,    66,    67,    67,    68,    68,
1921 -      68,    68,    69,    69,    70,    70,    71,    71,    71,    14,
1922 -      15,    16,    21,    54,    73,    74,    24,    52,    37,    16,
1923 -      16,    24,    28,    52,    54,    74,    27,    54,    73,    60,
1924 -      24,    24,    55,    56,    24,    21,    24,    33,    13,    20,
1925 -      21,    22,    23,    30,    35,    57,    17,    32,    72,    21,
1926 -      22,    29,    58,    35,    20,    19,    21,    31,    33,    34,
1927 -      58,    33,    58,    34
1928 +      15,    71,    72,    44,    45,    46,    48,    37,    12,    13,
1929 +      56,    57,   107,     3,     8,   110,   118,   121,     1,   119,
1930 +      54,    55,    64,    14,   122,   123,   124,   125,   120,   100,
1931 +      49,     9,    58,    20,   126,     4,    21,    22,    59,   127,
1932 +      65,    66,    12,    13,    60,    61,     5,    89,    90,    91,
1933 +      12,    13,     7,   106,   132,   133,   138,    14,   139,   104,
1934 +      40,    38,   134,   105,    50,    14,    41,    42,   140,    17,
1935 +      43,    92,    93,    94,    81,    82,    83,    84,    95,    62,
1936 +      63,   141,   142,    79,    80,    85,    86,    38,    87,    88,
1937 +      47,    52,    51,    67,    69,    53,    70,    99,   102,   101,
1938 +     103,   113,   109,   114,   117,   129,   136,   137,   130,    19,
1939 +      16,   144,    74,   112,    73,   146,    76,    75,   111,     0,
1940 +     135,    77,     0,   108,     0,     0,     0,     0,     0,     0,
1941 +       0,     0,     0,   143,     0,    78,   145
1942  };
1943  
1944 -  /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
1945 -static const yytype_uint8 yyr1[] =
1946 +#define yypact_value_is_default(yystate) \
1947 +  ((yystate) == (-84))
1948 +
1949 +#define yytable_value_is_error(yytable_value) \
1950 +  YYID (0)
1951 +
1952 +static const yytype_int16 yycheck[] =
1953  {
1954 -       0,    47,    48,    49,    49,    50,    50,    51,    51,    51,
1955 -      51,    51,    52,    53,    53,    54,    54,    54,    54,    55,
1956 -      55,    55,    55,    55,    55,    55,    56,    56,    56,    57,
1957 -      57,    57,    57,    57,    58,    58,    58,    59,    60,    60,
1958 -      61,    61,    62,    62,    63,    63,    64,    64,    65,    65,
1959 -      66,    66,    66,    67,    67,    67,    67,    67,    68,    68,
1960 -      68,    69,    69,    69,    70,    70,    70,    70,    71,    71,
1961 -      71,    71,    72,    72,    72,    73,    73,    73,    74,    74,
1962 -      74
1963 +       8,    42,    43,    20,    21,    22,    13,    15,    18,    19,
1964 +       8,     9,    95,    25,     5,    98,    22,    14,     3,    25,
1965 +      10,    11,    26,    33,    21,    22,    23,    24,    34,    70,
1966 +      37,    22,    30,    43,    31,     0,    46,    47,    36,    36,
1967 +      44,    45,    18,    19,     6,     7,     4,    64,    65,    66,
1968 +      18,    19,    25,    94,    22,    23,    20,    33,    22,    25,
1969 +      16,    27,    30,    29,    12,    33,    22,    23,    32,    26,
1970 +      26,    15,    16,    17,    56,    57,    58,    59,    22,    42,
1971 +      43,    34,    35,    54,    55,    60,    61,    27,    62,    63,
1972 +      35,    40,    39,    25,    23,    41,    23,    25,    17,    38,
1973 +      17,    25,    28,    25,    25,    18,    36,    21,    33,    11,
1974 +       9,    34,    49,   101,    48,    35,    51,    50,    98,    -1,
1975 +     128,    52,    -1,    95,    -1,    -1,    -1,    -1,    -1,    -1,
1976 +      -1,    -1,    -1,   141,    -1,    53,   144
1977  };
1978  
1979 -  /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN.  */
1980 -static const yytype_uint8 yyr2[] =
1981 +/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
1982 +   symbol of state STATE-NUM.  */
1983 +static const yytype_uint8 yystos[] =
1984  {
1985 -       0,     2,     4,     0,     2,     4,     2,     2,     3,     4,
1986 -       3,     4,     5,     0,     2,     4,     2,     3,     2,     2,
1987 -       3,     4,     2,     9,     5,     2,     0,     2,     2,     3,
1988 -       1,     2,     2,     2,     1,     1,     3,     1,     1,     5,
1989 -       1,     3,     1,     3,     1,     3,     1,     3,     1,     3,
1990 -       1,     3,     3,     1,     3,     3,     3,     3,     3,     3,
1991 -       1,     3,     3,     1,     3,     3,     3,     1,     1,     2,
1992 -       2,     2,     0,     2,     2,     0,     2,     2,     2,     3,
1993 -       2
1994 +       0,     3,    49,    25,     0,     4,    50,    25,     5,    22,
1995 +      51,    52,    18,    19,    33,    60,    52,    26,    53,    51,
1996 +      43,    46,    47,    60,    61,    62,    63,    64,    65,    66,
1997 +      67,    68,    69,    70,    71,    72,    73,    60,    27,    54,
1998 +      16,    22,    23,    26,    73,    73,    73,    35,    13,    37,
1999 +      12,    39,    40,    41,    10,    11,     8,     9,    30,    36,
2000 +       6,     7,    42,    43,    26,    44,    45,    25,    55,    23,
2001 +      23,    54,    54,    64,    61,    65,    66,    67,    68,    69,
2002 +      69,    70,    70,    70,    70,    71,    71,    72,    72,    73,
2003 +      73,    73,    15,    16,    17,    22,    56,    75,    76,    25,
2004 +      54,    38,    17,    17,    25,    29,    54,    56,    76,    28,
2005 +      56,    75,    62,    25,    25,    57,    58,    25,    22,    25,
2006 +      34,    14,    21,    22,    23,    24,    31,    36,    59,    18,
2007 +      33,    74,    22,    23,    30,    60,    36,    21,    20,    22,
2008 +      32,    34,    35,    60,    34,    60,    35
2009  };
2010  
2011 -
2012 -#define yyerrok         (yyerrstatus = 0)
2013 -#define yyclearin       (yychar = YYEMPTY)
2014 -#define YYEMPTY         (-2)
2015 -#define YYEOF           0
2016 -
2017 -#define YYACCEPT        goto yyacceptlab
2018 -#define YYABORT         goto yyabortlab
2019 -#define YYERROR         goto yyerrorlab
2020 -
2021 +#define yyerrok                (yyerrstatus = 0)
2022 +#define yyclearin      (yychar = YYEMPTY)
2023 +#define YYEMPTY                (-2)
2024 +#define YYEOF          0
2025 +
2026 +#define YYACCEPT       goto yyacceptlab
2027 +#define YYABORT                goto yyabortlab
2028 +#define YYERROR                goto yyerrorlab
2029 +
2030 +
2031 +/* Like YYERROR except do call yyerror.  This remains here temporarily
2032 +   to ease the transition to the new meaning of YYERROR, for GCC.
2033 +   Once GCC version 2 has supplanted version 1, this can go.  However,
2034 +   YYFAIL appears to be in use.  Nevertheless, it is formally deprecated
2035 +   in Bison 2.4.2's NEWS entry, where a plan to phase it out is
2036 +   discussed.  */
2037 +
2038 +#define YYFAIL         goto yyerrlab
2039 +#if defined YYFAIL
2040 +  /* This is here to suppress warnings from the GCC cpp's
2041 +     -Wunused-macros.  Normally we don't worry about that warning, but
2042 +     some users do, and we want to make it easy for users to remove
2043 +     YYFAIL uses, which will produce warnings from Bison 2.5.  */
2044 +#endif
2045  
2046  #define YYRECOVERING()  (!!yyerrstatus)
2047  
2048 -#define YYBACKUP(Token, Value)                                  \
2049 -do                                                              \
2050 -  if (yychar == YYEMPTY)                                        \
2051 -    {                                                           \
2052 -      yychar = (Token);                                         \
2053 -      yylval = (Value);                                         \
2054 -      YYPOPSTACK (yylen);                                       \
2055 -      yystate = *yyssp;                                         \
2056 -      goto yybackup;                                            \
2057 -    }                                                           \
2058 -  else                                                          \
2059 -    {                                                           \
2060 +#define YYBACKUP(Token, Value)                                 \
2061 +do                                                             \
2062 +  if (yychar == YYEMPTY && yylen == 1)                         \
2063 +    {                                                          \
2064 +      yychar = (Token);                                                \
2065 +      yylval = (Value);                                                \
2066 +      YYPOPSTACK (1);                                          \
2067 +      goto yybackup;                                           \
2068 +    }                                                          \
2069 +  else                                                         \
2070 +    {                                                          \
2071        yyerror (YY_("syntax error: cannot back up")); \
2072 -      YYERROR;                                                  \
2073 -    }                                                           \
2074 -while (0)
2075 -
2076 -/* Error token number */
2077 -#define YYTERROR        1
2078 -#define YYERRCODE       256
2079 +      YYERROR;                                                 \
2080 +    }                                                          \
2081 +while (YYID (0))
2082 +
2083 +
2084 +#define YYTERROR       1
2085 +#define YYERRCODE      256
2086  
2087  
2088  /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
2089     If N is 0, then set CURRENT to the empty location which ends
2090     the previous symbol: RHS[0] (always defined).  */
2091  
2092 +#define YYRHSLOC(Rhs, K) ((Rhs)[K])
2093  #ifndef YYLLOC_DEFAULT
2094 -# define YYLLOC_DEFAULT(Current, Rhs, N)                                \
2095 -    do                                                                  \
2096 -      if (N)                                                            \
2097 -        {                                                               \
2098 -          (Current).first_line   = YYRHSLOC (Rhs, 1).first_line;        \
2099 -          (Current).first_column = YYRHSLOC (Rhs, 1).first_column;      \
2100 -          (Current).last_line    = YYRHSLOC (Rhs, N).last_line;         \
2101 -          (Current).last_column  = YYRHSLOC (Rhs, N).last_column;       \
2102 -        }                                                               \
2103 -      else                                                              \
2104 -        {                                                               \
2105 -          (Current).first_line   = (Current).last_line   =              \
2106 -            YYRHSLOC (Rhs, 0).last_line;                                \
2107 -          (Current).first_column = (Current).last_column =              \
2108 -            YYRHSLOC (Rhs, 0).last_column;                              \
2109 -        }                                                               \
2110 -    while (0)
2111 +# define YYLLOC_DEFAULT(Current, Rhs, N)                               \
2112 +    do                                                                 \
2113 +      if (YYID (N))                                                    \
2114 +       {                                                               \
2115 +         (Current).first_line   = YYRHSLOC (Rhs, 1).first_line;        \
2116 +         (Current).first_column = YYRHSLOC (Rhs, 1).first_column;      \
2117 +         (Current).last_line    = YYRHSLOC (Rhs, N).last_line;         \
2118 +         (Current).last_column  = YYRHSLOC (Rhs, N).last_column;       \
2119 +       }                                                               \
2120 +      else                                                             \
2121 +       {                                                               \
2122 +         (Current).first_line   = (Current).last_line   =              \
2123 +           YYRHSLOC (Rhs, 0).last_line;                                \
2124 +         (Current).first_column = (Current).last_column =              \
2125 +           YYRHSLOC (Rhs, 0).last_column;                              \
2126 +       }                                                               \
2127 +    while (YYID (0))
2128  #endif
2129  
2130 -#define YYRHSLOC(Rhs, K) ((Rhs)[K])
2131 -
2132 -
2133 -/* Enable debugging if requested.  */
2134 -#if YYDEBUG
2135 -
2136 -# ifndef YYFPRINTF
2137 -#  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
2138 -#  define YYFPRINTF fprintf
2139 -# endif
2140 -
2141 -# define YYDPRINTF(Args)                        \
2142 -do {                                            \
2143 -  if (yydebug)                                  \
2144 -    YYFPRINTF Args;                             \
2145 -} while (0)
2146 -
2147  
2148  /* YY_LOCATION_PRINT -- Print the location on the stream.
2149     This macro was not mandated originally: define only if we know
2150 @@ -779,73 +799,82 @@ do {
2151  
2152  #ifndef YY_LOCATION_PRINT
2153  # if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
2154 -
2155 -/* Print *YYLOCP on YYO.  Private, do not rely on its existence. */
2156 -
2157 -YY_ATTRIBUTE_UNUSED
2158 -static unsigned
2159 -yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp)
2160 -{
2161 -  unsigned res = 0;
2162 -  int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0;
2163 -  if (0 <= yylocp->first_line)
2164 -    {
2165 -      res += YYFPRINTF (yyo, "%d", yylocp->first_line);
2166 -      if (0 <= yylocp->first_column)
2167 -        res += YYFPRINTF (yyo, ".%d", yylocp->first_column);
2168 -    }
2169 -  if (0 <= yylocp->last_line)
2170 -    {
2171 -      if (yylocp->first_line < yylocp->last_line)
2172 -        {
2173 -          res += YYFPRINTF (yyo, "-%d", yylocp->last_line);
2174 -          if (0 <= end_col)
2175 -            res += YYFPRINTF (yyo, ".%d", end_col);
2176 -        }
2177 -      else if (0 <= end_col && yylocp->first_column < end_col)
2178 -        res += YYFPRINTF (yyo, "-%d", end_col);
2179 -    }
2180 -  return res;
2181 - }
2182 -
2183 -#  define YY_LOCATION_PRINT(File, Loc)          \
2184 -  yy_location_print_ (File, &(Loc))
2185 -
2186 +#  define YY_LOCATION_PRINT(File, Loc)                 \
2187 +     fprintf (File, "%d.%d-%d.%d",                     \
2188 +             (Loc).first_line, (Loc).first_column,     \
2189 +             (Loc).last_line,  (Loc).last_column)
2190  # else
2191  #  define YY_LOCATION_PRINT(File, Loc) ((void) 0)
2192  # endif
2193  #endif
2194  
2195  
2196 -# define YY_SYMBOL_PRINT(Title, Type, Value, Location)                    \
2197 -do {                                                                      \
2198 -  if (yydebug)                                                            \
2199 -    {                                                                     \
2200 -      YYFPRINTF (stderr, "%s ", Title);                                   \
2201 -      yy_symbol_print (stderr,                                            \
2202 -                  Type, Value, Location); \
2203 -      YYFPRINTF (stderr, "\n");                                           \
2204 -    }                                                                     \
2205 -} while (0)
2206 +/* YYLEX -- calling `yylex' with the right arguments.  */
2207  
2208 +#ifdef YYLEX_PARAM
2209 +# define YYLEX yylex (YYLEX_PARAM)
2210 +#else
2211 +# define YYLEX yylex ()
2212 +#endif
2213  
2214 -/*----------------------------------------.
2215 -| Print this symbol's value on YYOUTPUT.  |
2216 -`----------------------------------------*/
2217 +/* Enable debugging if requested.  */
2218 +#if YYDEBUG
2219  
2220 +# ifndef YYFPRINTF
2221 +#  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
2222 +#  define YYFPRINTF fprintf
2223 +# endif
2224 +
2225 +# define YYDPRINTF(Args)                       \
2226 +do {                                           \
2227 +  if (yydebug)                                 \
2228 +    YYFPRINTF Args;                            \
2229 +} while (YYID (0))
2230 +
2231 +# define YY_SYMBOL_PRINT(Title, Type, Value, Location)                   \
2232 +do {                                                                     \
2233 +  if (yydebug)                                                           \
2234 +    {                                                                    \
2235 +      YYFPRINTF (stderr, "%s ", Title);                                          \
2236 +      yy_symbol_print (stderr,                                           \
2237 +                 Type, Value, Location); \
2238 +      YYFPRINTF (stderr, "\n");                                                  \
2239 +    }                                                                    \
2240 +} while (YYID (0))
2241 +
2242 +
2243 +/*--------------------------------.
2244 +| Print this symbol on YYOUTPUT.  |
2245 +`--------------------------------*/
2246 +
2247 +/*ARGSUSED*/
2248 +#if (defined __STDC__ || defined __C99__FUNC__ \
2249 +     || defined __cplusplus || defined _MSC_VER)
2250  static void
2251  yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp)
2252 +#else
2253 +static void
2254 +yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp)
2255 +    FILE *yyoutput;
2256 +    int yytype;
2257 +    YYSTYPE const * const yyvaluep;
2258 +    YYLTYPE const * const yylocationp;
2259 +#endif
2260  {
2261 -  FILE *yyo = yyoutput;
2262 -  YYUSE (yyo);
2263 -  YYUSE (yylocationp);
2264    if (!yyvaluep)
2265      return;
2266 +  YYUSE (yylocationp);
2267  # ifdef YYPRINT
2268    if (yytype < YYNTOKENS)
2269      YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
2270 +# else
2271 +  YYUSE (yyoutput);
2272  # endif
2273 -  YYUSE (yytype);
2274 +  switch (yytype)
2275 +    {
2276 +      default:
2277 +       break;
2278 +    }
2279  }
2280  
2281  
2282 @@ -853,11 +882,23 @@ yy_symbol_value_print (FILE *yyoutput, i
2283  | Print this symbol on YYOUTPUT.  |
2284  `--------------------------------*/
2285  
2286 +#if (defined __STDC__ || defined __C99__FUNC__ \
2287 +     || defined __cplusplus || defined _MSC_VER)
2288  static void
2289  yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp)
2290 +#else
2291 +static void
2292 +yy_symbol_print (yyoutput, yytype, yyvaluep, yylocationp)
2293 +    FILE *yyoutput;
2294 +    int yytype;
2295 +    YYSTYPE const * const yyvaluep;
2296 +    YYLTYPE const * const yylocationp;
2297 +#endif
2298  {
2299 -  YYFPRINTF (yyoutput, "%s %s (",
2300 -             yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
2301 +  if (yytype < YYNTOKENS)
2302 +    YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
2303 +  else
2304 +    YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
2305  
2306    YY_LOCATION_PRINT (yyoutput, *yylocationp);
2307    YYFPRINTF (yyoutput, ": ");
2308 @@ -870,8 +911,16 @@ yy_symbol_print (FILE *yyoutput, int yyt
2309  | TOP (included).                                                   |
2310  `------------------------------------------------------------------*/
2311  
2312 +#if (defined __STDC__ || defined __C99__FUNC__ \
2313 +     || defined __cplusplus || defined _MSC_VER)
2314  static void
2315  yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
2316 +#else
2317 +static void
2318 +yy_stack_print (yybottom, yytop)
2319 +    yytype_int16 *yybottom;
2320 +    yytype_int16 *yytop;
2321 +#endif
2322  {
2323    YYFPRINTF (stderr, "Stack now");
2324    for (; yybottom <= yytop; yybottom++)
2325 @@ -882,42 +931,50 @@ yy_stack_print (yytype_int16 *yybottom,
2326    YYFPRINTF (stderr, "\n");
2327  }
2328  
2329 -# define YY_STACK_PRINT(Bottom, Top)                            \
2330 -do {                                                            \
2331 -  if (yydebug)                                                  \
2332 -    yy_stack_print ((Bottom), (Top));                           \
2333 -} while (0)
2334 +# define YY_STACK_PRINT(Bottom, Top)                           \
2335 +do {                                                           \
2336 +  if (yydebug)                                                 \
2337 +    yy_stack_print ((Bottom), (Top));                          \
2338 +} while (YYID (0))
2339  
2340  
2341  /*------------------------------------------------.
2342  | Report that the YYRULE is going to be reduced.  |
2343  `------------------------------------------------*/
2344  
2345 +#if (defined __STDC__ || defined __C99__FUNC__ \
2346 +     || defined __cplusplus || defined _MSC_VER)
2347 +static void
2348 +yy_reduce_print (YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule)
2349 +#else
2350  static void
2351 -yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule)
2352 +yy_reduce_print (yyvsp, yylsp, yyrule)
2353 +    YYSTYPE *yyvsp;
2354 +    YYLTYPE *yylsp;
2355 +    int yyrule;
2356 +#endif
2357  {
2358 -  unsigned long int yylno = yyrline[yyrule];
2359    int yynrhs = yyr2[yyrule];
2360    int yyi;
2361 +  unsigned long int yylno = yyrline[yyrule];
2362    YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
2363 -             yyrule - 1, yylno);
2364 +            yyrule - 1, yylno);
2365    /* The symbols being reduced.  */
2366    for (yyi = 0; yyi < yynrhs; yyi++)
2367      {
2368        YYFPRINTF (stderr, "   $%d = ", yyi + 1);
2369 -      yy_symbol_print (stderr,
2370 -                       yystos[yyssp[yyi + 1 - yynrhs]],
2371 -                       &(yyvsp[(yyi + 1) - (yynrhs)])
2372 -                       , &(yylsp[(yyi + 1) - (yynrhs)])                       );
2373 +      yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
2374 +                      &(yyvsp[(yyi + 1) - (yynrhs)])
2375 +                      , &(yylsp[(yyi + 1) - (yynrhs)])                );
2376        YYFPRINTF (stderr, "\n");
2377      }
2378  }
2379  
2380 -# define YY_REDUCE_PRINT(Rule)          \
2381 -do {                                    \
2382 -  if (yydebug)                          \
2383 -    yy_reduce_print (yyssp, yyvsp, yylsp, Rule); \
2384 -} while (0)
2385 +# define YY_REDUCE_PRINT(Rule)         \
2386 +do {                                   \
2387 +  if (yydebug)                         \
2388 +    yy_reduce_print (yyvsp, yylsp, Rule); \
2389 +} while (YYID (0))
2390  
2391  /* Nonzero means print parse trace.  It is left uninitialized so that
2392     multiple parsers can coexist.  */
2393 @@ -931,7 +988,7 @@ int yydebug;
2394  
2395  
2396  /* YYINITDEPTH -- initial size of the parser's stacks.  */
2397 -#ifndef YYINITDEPTH
2398 +#ifndef        YYINITDEPTH
2399  # define YYINITDEPTH 200
2400  #endif
2401  
2402 @@ -954,8 +1011,15 @@ int yydebug;
2403  #   define yystrlen strlen
2404  #  else
2405  /* Return the length of YYSTR.  */
2406 +#if (defined __STDC__ || defined __C99__FUNC__ \
2407 +     || defined __cplusplus || defined _MSC_VER)
2408  static YYSIZE_T
2409  yystrlen (const char *yystr)
2410 +#else
2411 +static YYSIZE_T
2412 +yystrlen (yystr)
2413 +    const char *yystr;
2414 +#endif
2415  {
2416    YYSIZE_T yylen;
2417    for (yylen = 0; yystr[yylen]; yylen++)
2418 @@ -971,8 +1035,16 @@ yystrlen (const char *yystr)
2419  #  else
2420  /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
2421     YYDEST.  */
2422 +#if (defined __STDC__ || defined __C99__FUNC__ \
2423 +     || defined __cplusplus || defined _MSC_VER)
2424  static char *
2425  yystpcpy (char *yydest, const char *yysrc)
2426 +#else
2427 +static char *
2428 +yystpcpy (yydest, yysrc)
2429 +    char *yydest;
2430 +    const char *yysrc;
2431 +#endif
2432  {
2433    char *yyd = yydest;
2434    const char *yys = yysrc;
2435 @@ -1002,27 +1074,27 @@ yytnamerr (char *yyres, const char *yyst
2436        char const *yyp = yystr;
2437  
2438        for (;;)
2439 -        switch (*++yyp)
2440 -          {
2441 -          case '\'':
2442 -          case ',':
2443 -            goto do_not_strip_quotes;
2444 -
2445 -          case '\\':
2446 -            if (*++yyp != '\\')
2447 -              goto do_not_strip_quotes;
2448 -            /* Fall through.  */
2449 -          default:
2450 -            if (yyres)
2451 -              yyres[yyn] = *yyp;
2452 -            yyn++;
2453 -            break;
2454 -
2455 -          case '"':
2456 -            if (yyres)
2457 -              yyres[yyn] = '\0';
2458 -            return yyn;
2459 -          }
2460 +       switch (*++yyp)
2461 +         {
2462 +         case '\'':
2463 +         case ',':
2464 +           goto do_not_strip_quotes;
2465 +
2466 +         case '\\':
2467 +           if (*++yyp != '\\')
2468 +             goto do_not_strip_quotes;
2469 +           /* Fall through.  */
2470 +         default:
2471 +           if (yyres)
2472 +             yyres[yyn] = *yyp;
2473 +           yyn++;
2474 +           break;
2475 +
2476 +         case '"':
2477 +           if (yyres)
2478 +             yyres[yyn] = '\0';
2479 +           return yyn;
2480 +         }
2481      do_not_strip_quotes: ;
2482      }
2483  
2484 @@ -1045,11 +1117,12 @@ static int
2485  yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
2486                  yytype_int16 *yyssp, int yytoken)
2487  {
2488 -  YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]);
2489 +  YYSIZE_T yysize0 = yytnamerr (0, yytname[yytoken]);
2490    YYSIZE_T yysize = yysize0;
2491 +  YYSIZE_T yysize1;
2492    enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
2493    /* Internationalized format string. */
2494 -  const char *yyformat = YY_NULLPTR;
2495 +  const char *yyformat = 0;
2496    /* Arguments of yyformat. */
2497    char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
2498    /* Number of reported tokens (one for the "unexpected", one per
2499 @@ -1057,6 +1130,10 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, c
2500    int yycount = 0;
2501  
2502    /* There are many possibilities here to consider:
2503 +     - Assume YYFAIL is not used.  It's too flawed to consider.  See
2504 +       <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html>
2505 +       for details.  YYERROR is fine as it does not invoke this
2506 +       function.
2507       - If this state is a consistent state with a default action, then
2508         the only way this function was invoked is if the default action
2509         is an error action.  In that case, don't check for expected
2510 @@ -1105,13 +1182,11 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, c
2511                      break;
2512                    }
2513                  yyarg[yycount++] = yytname[yyx];
2514 -                {
2515 -                  YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
2516 -                  if (! (yysize <= yysize1
2517 -                         && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
2518 -                    return 2;
2519 -                  yysize = yysize1;
2520 -                }
2521 +                yysize1 = yysize + yytnamerr (0, yytname[yyx]);
2522 +                if (! (yysize <= yysize1
2523 +                       && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
2524 +                  return 2;
2525 +                yysize = yysize1;
2526                }
2527          }
2528      }
2529 @@ -1131,12 +1206,10 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, c
2530  # undef YYCASE_
2531      }
2532  
2533 -  {
2534 -    YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
2535 -    if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
2536 -      return 2;
2537 -    yysize = yysize1;
2538 -  }
2539 +  yysize1 = yysize + yystrlen (yyformat);
2540 +  if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
2541 +    return 2;
2542 +  yysize = yysize1;
2543  
2544    if (*yymsg_alloc < yysize)
2545      {
2546 @@ -1173,21 +1246,50 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, c
2547  | Release the memory associated to this symbol.  |
2548  `-----------------------------------------------*/
2549  
2550 +/*ARGSUSED*/
2551 +#if (defined __STDC__ || defined __C99__FUNC__ \
2552 +     || defined __cplusplus || defined _MSC_VER)
2553  static void
2554  yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp)
2555 +#else
2556 +static void
2557 +yydestruct (yymsg, yytype, yyvaluep, yylocationp)
2558 +    const char *yymsg;
2559 +    int yytype;
2560 +    YYSTYPE *yyvaluep;
2561 +    YYLTYPE *yylocationp;
2562 +#endif
2563  {
2564    YYUSE (yyvaluep);
2565    YYUSE (yylocationp);
2566 +
2567    if (!yymsg)
2568      yymsg = "Deleting";
2569    YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
2570  
2571 -  YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
2572 -  YYUSE (yytype);
2573 -  YY_IGNORE_MAYBE_UNINITIALIZED_END
2574 +  switch (yytype)
2575 +    {
2576 +
2577 +      default:
2578 +       break;
2579 +    }
2580  }
2581  
2582  
2583 +/* Prevent warnings from -Wmissing-prototypes.  */
2584 +#ifdef YYPARSE_PARAM
2585 +#if defined __STDC__ || defined __cplusplus
2586 +int yyparse (void *YYPARSE_PARAM);
2587 +#else
2588 +int yyparse ();
2589 +#endif
2590 +#else /* ! YYPARSE_PARAM */
2591 +#if defined __STDC__ || defined __cplusplus
2592 +int yyparse (void);
2593 +#else
2594 +int yyparse ();
2595 +#endif
2596 +#endif /* ! YYPARSE_PARAM */
2597  
2598  
2599  /* The lookahead symbol.  */
2600 @@ -1195,12 +1297,10 @@ int yychar;
2601  
2602  /* The semantic value of the lookahead symbol.  */
2603  YYSTYPE yylval;
2604 +
2605  /* Location data for the lookahead symbol.  */
2606 -YYLTYPE yylloc
2607 -# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
2608 -  = { 1, 1, 1, 1 }
2609 -# endif
2610 -;
2611 +YYLTYPE yylloc;
2612 +
2613  /* Number of syntax errors so far.  */
2614  int yynerrs;
2615  
2616 @@ -1209,19 +1309,38 @@ int yynerrs;
2617  | yyparse.  |
2618  `----------*/
2619  
2620 +#ifdef YYPARSE_PARAM
2621 +#if (defined __STDC__ || defined __C99__FUNC__ \
2622 +     || defined __cplusplus || defined _MSC_VER)
2623 +int
2624 +yyparse (void *YYPARSE_PARAM)
2625 +#else
2626 +int
2627 +yyparse (YYPARSE_PARAM)
2628 +    void *YYPARSE_PARAM;
2629 +#endif
2630 +#else /* ! YYPARSE_PARAM */
2631 +#if (defined __STDC__ || defined __C99__FUNC__ \
2632 +     || defined __cplusplus || defined _MSC_VER)
2633  int
2634  yyparse (void)
2635 +#else
2636 +int
2637 +yyparse ()
2638 +
2639 +#endif
2640 +#endif
2641  {
2642      int yystate;
2643      /* Number of tokens to shift before error messages enabled.  */
2644      int yyerrstatus;
2645  
2646      /* The stacks and their tools:
2647 -       'yyss': related to states.
2648 -       'yyvs': related to semantic values.
2649 -       'yyls': related to locations.
2650 +       `yyss': related to states.
2651 +       `yyvs': related to semantic values.
2652 +       `yyls': related to locations.
2653  
2654 -       Refer to the stacks through separate pointers, to allow yyoverflow
2655 +       Refer to the stacks thru separate pointers, to allow yyoverflow
2656         to reallocate them elsewhere.  */
2657  
2658      /* The state stack.  */
2659 @@ -1247,7 +1366,7 @@ yyparse (void)
2660    int yyn;
2661    int yyresult;
2662    /* Lookahead token as an internal (translated) token number.  */
2663 -  int yytoken = 0;
2664 +  int yytoken;
2665    /* The variables used to return semantic value and location from the
2666       action routines.  */
2667    YYSTYPE yyval;
2668 @@ -1266,9 +1385,10 @@ yyparse (void)
2669       Keep to zero when no symbol should be popped.  */
2670    int yylen = 0;
2671  
2672 -  yyssp = yyss = yyssa;
2673 -  yyvsp = yyvs = yyvsa;
2674 -  yylsp = yyls = yylsa;
2675 +  yytoken = 0;
2676 +  yyss = yyssa;
2677 +  yyvs = yyvsa;
2678 +  yyls = yylsa;
2679    yystacksize = YYINITDEPTH;
2680  
2681    YYDPRINTF ((stderr, "Starting parse\n"));
2682 @@ -1277,7 +1397,21 @@ yyparse (void)
2683    yyerrstatus = 0;
2684    yynerrs = 0;
2685    yychar = YYEMPTY; /* Cause a token to be read.  */
2686 -  yylsp[0] = yylloc;
2687 +
2688 +  /* Initialize stack pointers.
2689 +     Waste one element of value and location stack
2690 +     so that they stay on the same level as the state stack.
2691 +     The wasted elements are never initialized.  */
2692 +  yyssp = yyss;
2693 +  yyvsp = yyvs;
2694 +  yylsp = yyls;
2695 +
2696 +#if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
2697 +  /* Initialize the default location before parsing starts.  */
2698 +  yylloc.first_line   = yylloc.last_line   = 1;
2699 +  yylloc.first_column = yylloc.last_column = 1;
2700 +#endif
2701 +
2702    goto yysetstate;
2703  
2704  /*------------------------------------------------------------.
2705 @@ -1298,26 +1432,26 @@ yyparse (void)
2706  
2707  #ifdef yyoverflow
2708        {
2709 -        /* Give user a chance to reallocate the stack.  Use copies of
2710 -           these so that the &'s don't force the real ones into
2711 -           memory.  */
2712 -        YYSTYPE *yyvs1 = yyvs;
2713 -        yytype_int16 *yyss1 = yyss;
2714 -        YYLTYPE *yyls1 = yyls;
2715 -
2716 -        /* Each stack pointer address is followed by the size of the
2717 -           data in use in that stack, in bytes.  This used to be a
2718 -           conditional around just the two extra args, but that might
2719 -           be undefined if yyoverflow is a macro.  */
2720 -        yyoverflow (YY_("memory exhausted"),
2721 -                    &yyss1, yysize * sizeof (*yyssp),
2722 -                    &yyvs1, yysize * sizeof (*yyvsp),
2723 -                    &yyls1, yysize * sizeof (*yylsp),
2724 -                    &yystacksize);
2725 -
2726 -        yyls = yyls1;
2727 -        yyss = yyss1;
2728 -        yyvs = yyvs1;
2729 +       /* Give user a chance to reallocate the stack.  Use copies of
2730 +          these so that the &'s don't force the real ones into
2731 +          memory.  */
2732 +       YYSTYPE *yyvs1 = yyvs;
2733 +       yytype_int16 *yyss1 = yyss;
2734 +       YYLTYPE *yyls1 = yyls;
2735 +
2736 +       /* Each stack pointer address is followed by the size of the
2737 +          data in use in that stack, in bytes.  This used to be a
2738 +          conditional around just the two extra args, but that might
2739 +          be undefined if yyoverflow is a macro.  */
2740 +       yyoverflow (YY_("memory exhausted"),
2741 +                   &yyss1, yysize * sizeof (*yyssp),
2742 +                   &yyvs1, yysize * sizeof (*yyvsp),
2743 +                   &yyls1, yysize * sizeof (*yylsp),
2744 +                   &yystacksize);
2745 +
2746 +       yyls = yyls1;
2747 +       yyss = yyss1;
2748 +       yyvs = yyvs1;
2749        }
2750  #else /* no yyoverflow */
2751  # ifndef YYSTACK_RELOCATE
2752 @@ -1325,23 +1459,23 @@ yyparse (void)
2753  # else
2754        /* Extend the stack our own way.  */
2755        if (YYMAXDEPTH <= yystacksize)
2756 -        goto yyexhaustedlab;
2757 +       goto yyexhaustedlab;
2758        yystacksize *= 2;
2759        if (YYMAXDEPTH < yystacksize)
2760 -        yystacksize = YYMAXDEPTH;
2761 +       yystacksize = YYMAXDEPTH;
2762  
2763        {
2764 -        yytype_int16 *yyss1 = yyss;
2765 -        union yyalloc *yyptr =
2766 -          (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
2767 -        if (! yyptr)
2768 -          goto yyexhaustedlab;
2769 -        YYSTACK_RELOCATE (yyss_alloc, yyss);
2770 -        YYSTACK_RELOCATE (yyvs_alloc, yyvs);
2771 -        YYSTACK_RELOCATE (yyls_alloc, yyls);
2772 +       yytype_int16 *yyss1 = yyss;
2773 +       union yyalloc *yyptr =
2774 +         (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
2775 +       if (! yyptr)
2776 +         goto yyexhaustedlab;
2777 +       YYSTACK_RELOCATE (yyss_alloc, yyss);
2778 +       YYSTACK_RELOCATE (yyvs_alloc, yyvs);
2779 +       YYSTACK_RELOCATE (yyls_alloc, yyls);
2780  #  undef YYSTACK_RELOCATE
2781 -        if (yyss1 != yyssa)
2782 -          YYSTACK_FREE (yyss1);
2783 +       if (yyss1 != yyssa)
2784 +         YYSTACK_FREE (yyss1);
2785        }
2786  # endif
2787  #endif /* no yyoverflow */
2788 @@ -1351,10 +1485,10 @@ yyparse (void)
2789        yylsp = yyls + yysize - 1;
2790  
2791        YYDPRINTF ((stderr, "Stack size increased to %lu\n",
2792 -                  (unsigned long int) yystacksize));
2793 +                 (unsigned long int) yystacksize));
2794  
2795        if (yyss + yystacksize - 1 <= yyssp)
2796 -        YYABORT;
2797 +       YYABORT;
2798      }
2799  
2800    YYDPRINTF ((stderr, "Entering state %d\n", yystate));
2801 @@ -1383,7 +1517,7 @@ yybackup:
2802    if (yychar == YYEMPTY)
2803      {
2804        YYDPRINTF ((stderr, "Reading a token: "));
2805 -      yychar = yylex ();
2806 +      yychar = YYLEX;
2807      }
2808  
2809    if (yychar <= YYEOF)
2810 @@ -1423,9 +1557,7 @@ yybackup:
2811    yychar = YYEMPTY;
2812  
2813    yystate = yyn;
2814 -  YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
2815    *++yyvsp = yylval;
2816 -  YY_IGNORE_MAYBE_UNINITIALIZED_END
2817    *++yylsp = yylloc;
2818    goto yynewstate;
2819  
2820 @@ -1448,7 +1580,7 @@ yyreduce:
2821    yylen = yyr2[yyn];
2822  
2823    /* If YYLEN is nonzero, implement the default value of the action:
2824 -     '$$ = $1'.
2825 +     `$$ = $1'.
2826  
2827       Otherwise, the following line sets YYVAL to garbage.
2828       This behavior is undocumented and Bison
2829 @@ -1463,273 +1595,322 @@ yyreduce:
2830    switch (yyn)
2831      {
2832          case 2:
2833 -#line 105 "dtc-parser.y" /* yacc.c:1646  */
2834 +
2835 +/* Line 1806 of yacc.c  */
2836 +#line 109 "dtc-parser.y"
2837      {
2838 -                       the_boot_info = build_boot_info((yyvsp[-1].re), (yyvsp[0].node),
2839 -                                                       guess_boot_cpuid((yyvsp[0].node)));
2840 +                       (yyvsp[(5) - (5)].node)->is_plugin = (yyvsp[(3) - (5)].is_plugin);
2841 +                       (yyvsp[(5) - (5)].node)->is_root = 1;
2842 +                       the_boot_info = build_boot_info((yyvsp[(4) - (5)].re), (yyvsp[(5) - (5)].node),
2843 +                                                       guess_boot_cpuid((yyvsp[(5) - (5)].node)));
2844                 }
2845 -#line 1472 "dtc-parser.tab.c" /* yacc.c:1646  */
2846      break;
2847  
2848    case 3:
2849 -#line 113 "dtc-parser.y" /* yacc.c:1646  */
2850 +
2851 +/* Line 1806 of yacc.c  */
2852 +#line 119 "dtc-parser.y"
2853      {
2854 -                       (yyval.re) = NULL;
2855 +                       (yyval.is_plugin) = 0;
2856                 }
2857 -#line 1480 "dtc-parser.tab.c" /* yacc.c:1646  */
2858      break;
2859  
2860    case 4:
2861 -#line 117 "dtc-parser.y" /* yacc.c:1646  */
2862 +
2863 +/* Line 1806 of yacc.c  */
2864 +#line 123 "dtc-parser.y"
2865      {
2866 -                       (yyval.re) = chain_reserve_entry((yyvsp[-1].re), (yyvsp[0].re));
2867 +                       (yyval.is_plugin) = 1;
2868                 }
2869 -#line 1488 "dtc-parser.tab.c" /* yacc.c:1646  */
2870      break;
2871  
2872    case 5:
2873 -#line 124 "dtc-parser.y" /* yacc.c:1646  */
2874 +
2875 +/* Line 1806 of yacc.c  */
2876 +#line 130 "dtc-parser.y"
2877      {
2878 -                       (yyval.re) = build_reserve_entry((yyvsp[-2].integer), (yyvsp[-1].integer));
2879 +                       (yyval.re) = NULL;
2880                 }
2881 -#line 1496 "dtc-parser.tab.c" /* yacc.c:1646  */
2882      break;
2883  
2884    case 6:
2885 -#line 128 "dtc-parser.y" /* yacc.c:1646  */
2886 +
2887 +/* Line 1806 of yacc.c  */
2888 +#line 134 "dtc-parser.y"
2889      {
2890 -                       add_label(&(yyvsp[0].re)->labels, (yyvsp[-1].labelref));
2891 -                       (yyval.re) = (yyvsp[0].re);
2892 +                       (yyval.re) = chain_reserve_entry((yyvsp[(1) - (2)].re), (yyvsp[(2) - (2)].re));
2893                 }
2894 -#line 1505 "dtc-parser.tab.c" /* yacc.c:1646  */
2895      break;
2896  
2897    case 7:
2898 -#line 136 "dtc-parser.y" /* yacc.c:1646  */
2899 +
2900 +/* Line 1806 of yacc.c  */
2901 +#line 141 "dtc-parser.y"
2902      {
2903 -                       (yyval.node) = name_node((yyvsp[0].node), "");
2904 +                       (yyval.re) = build_reserve_entry((yyvsp[(2) - (4)].integer), (yyvsp[(3) - (4)].integer));
2905                 }
2906 -#line 1513 "dtc-parser.tab.c" /* yacc.c:1646  */
2907      break;
2908  
2909    case 8:
2910 -#line 140 "dtc-parser.y" /* yacc.c:1646  */
2911 +
2912 +/* Line 1806 of yacc.c  */
2913 +#line 145 "dtc-parser.y"
2914      {
2915 -                       (yyval.node) = merge_nodes((yyvsp[-2].node), (yyvsp[0].node));
2916 +                       add_label(&(yyvsp[(2) - (2)].re)->labels, (yyvsp[(1) - (2)].labelref));
2917 +                       (yyval.re) = (yyvsp[(2) - (2)].re);
2918                 }
2919 -#line 1521 "dtc-parser.tab.c" /* yacc.c:1646  */
2920      break;
2921  
2922    case 9:
2923 -#line 145 "dtc-parser.y" /* yacc.c:1646  */
2924 -    {
2925 -                       struct node *target = get_node_by_ref((yyvsp[-3].node), (yyvsp[-1].labelref));
2926  
2927 -                       add_label(&target->labels, (yyvsp[-2].labelref));
2928 -                       if (target)
2929 -                               merge_nodes(target, (yyvsp[0].node));
2930 -                       else
2931 -                               ERROR(&(yylsp[-1]), "Label or path %s not found", (yyvsp[-1].labelref));
2932 -                       (yyval.node) = (yyvsp[-3].node);
2933 +/* Line 1806 of yacc.c  */
2934 +#line 153 "dtc-parser.y"
2935 +    {
2936 +                       (yyval.node) = name_node((yyvsp[(2) - (2)].node), "");
2937                 }
2938 -#line 1536 "dtc-parser.tab.c" /* yacc.c:1646  */
2939      break;
2940  
2941    case 10:
2942 -#line 156 "dtc-parser.y" /* yacc.c:1646  */
2943 -    {
2944 -                       struct node *target = get_node_by_ref((yyvsp[-2].node), (yyvsp[-1].labelref));
2945  
2946 -                       if (target)
2947 -                               merge_nodes(target, (yyvsp[0].node));
2948 -                       else
2949 -                               ERROR(&(yylsp[-1]), "Label or path %s not found", (yyvsp[-1].labelref));
2950 -                       (yyval.node) = (yyvsp[-2].node);
2951 +/* Line 1806 of yacc.c  */
2952 +#line 157 "dtc-parser.y"
2953 +    {
2954 +                       (yyval.node) = merge_nodes((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
2955                 }
2956 -#line 1550 "dtc-parser.tab.c" /* yacc.c:1646  */
2957      break;
2958  
2959    case 11:
2960 -#line 166 "dtc-parser.y" /* yacc.c:1646  */
2961 +
2962 +/* Line 1806 of yacc.c  */
2963 +#line 162 "dtc-parser.y"
2964      {
2965 -                       struct node *target = get_node_by_ref((yyvsp[-3].node), (yyvsp[-1].labelref));
2966 +                       struct node *target = get_node_by_ref((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].labelref));
2967  
2968 +                       add_label(&target->labels, (yyvsp[(2) - (4)].labelref));
2969                         if (target)
2970 -                               delete_node(target);
2971 +                               merge_nodes(target, (yyvsp[(4) - (4)].node));
2972                         else
2973 -                               ERROR(&(yylsp[-1]), "Label or path %s not found", (yyvsp[-1].labelref));
2974 -
2975 -
2976 -                       (yyval.node) = (yyvsp[-3].node);
2977 +                               ERROR(&(yylsp[(3) - (4)]), "Label or path %s not found", (yyvsp[(3) - (4)].labelref));
2978 +                       (yyval.node) = (yyvsp[(1) - (4)].node);
2979                 }
2980 -#line 1566 "dtc-parser.tab.c" /* yacc.c:1646  */
2981      break;
2982  
2983    case 12:
2984 -#line 181 "dtc-parser.y" /* yacc.c:1646  */
2985 +
2986 +/* Line 1806 of yacc.c  */
2987 +#line 173 "dtc-parser.y"
2988      {
2989 -                       (yyval.node) = build_node((yyvsp[-3].proplist), (yyvsp[-2].nodelist));
2990 +                       struct node *target = get_node_by_ref((yyvsp[(1) - (3)].node), (yyvsp[(2) - (3)].labelref));
2991 +
2992 +                       if (target)
2993 +                               merge_nodes(target, (yyvsp[(3) - (3)].node));
2994 +                       else
2995 +                               ERROR(&(yylsp[(2) - (3)]), "Label or path %s not found", (yyvsp[(2) - (3)].labelref));
2996 +                       (yyval.node) = (yyvsp[(1) - (3)].node);
2997                 }
2998 -#line 1574 "dtc-parser.tab.c" /* yacc.c:1646  */
2999      break;
3000  
3001    case 13:
3002 -#line 188 "dtc-parser.y" /* yacc.c:1646  */
3003 +
3004 +/* Line 1806 of yacc.c  */
3005 +#line 183 "dtc-parser.y"
3006      {
3007 -                       (yyval.proplist) = NULL;
3008 +                       struct node *target = get_node_by_ref((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].labelref));
3009 +
3010 +                       if (target)
3011 +                               delete_node(target);
3012 +                       else
3013 +                               ERROR(&(yylsp[(3) - (4)]), "Label or path %s not found", (yyvsp[(3) - (4)].labelref));
3014 +
3015 +
3016 +                       (yyval.node) = (yyvsp[(1) - (4)].node);
3017                 }
3018 -#line 1582 "dtc-parser.tab.c" /* yacc.c:1646  */
3019      break;
3020  
3021    case 14:
3022 -#line 192 "dtc-parser.y" /* yacc.c:1646  */
3023 +
3024 +/* Line 1806 of yacc.c  */
3025 +#line 198 "dtc-parser.y"
3026      {
3027 -                       (yyval.proplist) = chain_property((yyvsp[0].prop), (yyvsp[-1].proplist));
3028 +                       (yyval.node) = build_node((yyvsp[(2) - (5)].proplist), (yyvsp[(3) - (5)].nodelist));
3029                 }
3030 -#line 1590 "dtc-parser.tab.c" /* yacc.c:1646  */
3031      break;
3032  
3033    case 15:
3034 -#line 199 "dtc-parser.y" /* yacc.c:1646  */
3035 +
3036 +/* Line 1806 of yacc.c  */
3037 +#line 205 "dtc-parser.y"
3038      {
3039 -                       (yyval.prop) = build_property((yyvsp[-3].propnodename), (yyvsp[-1].data));
3040 +                       (yyval.proplist) = NULL;
3041                 }
3042 -#line 1598 "dtc-parser.tab.c" /* yacc.c:1646  */
3043      break;
3044  
3045    case 16:
3046 -#line 203 "dtc-parser.y" /* yacc.c:1646  */
3047 +
3048 +/* Line 1806 of yacc.c  */
3049 +#line 209 "dtc-parser.y"
3050      {
3051 -                       (yyval.prop) = build_property((yyvsp[-1].propnodename), empty_data);
3052 +                       (yyval.proplist) = chain_property((yyvsp[(2) - (2)].prop), (yyvsp[(1) - (2)].proplist));
3053                 }
3054 -#line 1606 "dtc-parser.tab.c" /* yacc.c:1646  */
3055      break;
3056  
3057    case 17:
3058 -#line 207 "dtc-parser.y" /* yacc.c:1646  */
3059 +
3060 +/* Line 1806 of yacc.c  */
3061 +#line 216 "dtc-parser.y"
3062      {
3063 -                       (yyval.prop) = build_property_delete((yyvsp[-1].propnodename));
3064 +                       (yyval.prop) = build_property((yyvsp[(1) - (4)].propnodename), (yyvsp[(3) - (4)].data));
3065                 }
3066 -#line 1614 "dtc-parser.tab.c" /* yacc.c:1646  */
3067      break;
3068  
3069    case 18:
3070 -#line 211 "dtc-parser.y" /* yacc.c:1646  */
3071 +
3072 +/* Line 1806 of yacc.c  */
3073 +#line 220 "dtc-parser.y"
3074      {
3075 -                       add_label(&(yyvsp[0].prop)->labels, (yyvsp[-1].labelref));
3076 -                       (yyval.prop) = (yyvsp[0].prop);
3077 +                       (yyval.prop) = build_property((yyvsp[(1) - (2)].propnodename), empty_data);
3078                 }
3079 -#line 1623 "dtc-parser.tab.c" /* yacc.c:1646  */
3080      break;
3081  
3082    case 19:
3083 -#line 219 "dtc-parser.y" /* yacc.c:1646  */
3084 +
3085 +/* Line 1806 of yacc.c  */
3086 +#line 224 "dtc-parser.y"
3087      {
3088 -                       (yyval.data) = data_merge((yyvsp[-1].data), (yyvsp[0].data));
3089 +                       (yyval.prop) = build_property_delete((yyvsp[(2) - (3)].propnodename));
3090                 }
3091 -#line 1631 "dtc-parser.tab.c" /* yacc.c:1646  */
3092      break;
3093  
3094    case 20:
3095 -#line 223 "dtc-parser.y" /* yacc.c:1646  */
3096 +
3097 +/* Line 1806 of yacc.c  */
3098 +#line 228 "dtc-parser.y"
3099      {
3100 -                       (yyval.data) = data_merge((yyvsp[-2].data), (yyvsp[-1].array).data);
3101 +                       add_label(&(yyvsp[(2) - (2)].prop)->labels, (yyvsp[(1) - (2)].labelref));
3102 +                       (yyval.prop) = (yyvsp[(2) - (2)].prop);
3103                 }
3104 -#line 1639 "dtc-parser.tab.c" /* yacc.c:1646  */
3105      break;
3106  
3107    case 21:
3108 -#line 227 "dtc-parser.y" /* yacc.c:1646  */
3109 +
3110 +/* Line 1806 of yacc.c  */
3111 +#line 236 "dtc-parser.y"
3112      {
3113 -                       (yyval.data) = data_merge((yyvsp[-3].data), (yyvsp[-1].data));
3114 +                       (yyval.data) = data_merge((yyvsp[(1) - (2)].data), (yyvsp[(2) - (2)].data));
3115                 }
3116 -#line 1647 "dtc-parser.tab.c" /* yacc.c:1646  */
3117      break;
3118  
3119    case 22:
3120 -#line 231 "dtc-parser.y" /* yacc.c:1646  */
3121 +
3122 +/* Line 1806 of yacc.c  */
3123 +#line 240 "dtc-parser.y"
3124      {
3125 -                       (yyval.data) = data_add_marker((yyvsp[-1].data), REF_PATH, (yyvsp[0].labelref));
3126 +                       (yyval.data) = data_merge((yyvsp[(1) - (3)].data), (yyvsp[(2) - (3)].array).data);
3127                 }
3128 -#line 1655 "dtc-parser.tab.c" /* yacc.c:1646  */
3129      break;
3130  
3131    case 23:
3132 -#line 235 "dtc-parser.y" /* yacc.c:1646  */
3133 +
3134 +/* Line 1806 of yacc.c  */
3135 +#line 244 "dtc-parser.y"
3136 +    {
3137 +                       (yyval.data) = data_merge((yyvsp[(1) - (4)].data), (yyvsp[(3) - (4)].data));
3138 +               }
3139 +    break;
3140 +
3141 +  case 24:
3142 +
3143 +/* Line 1806 of yacc.c  */
3144 +#line 248 "dtc-parser.y"
3145 +    {
3146 +                       (yyval.data) = data_add_marker((yyvsp[(1) - (2)].data), REF_PATH, (yyvsp[(2) - (2)].labelref));
3147 +               }
3148 +    break;
3149 +
3150 +  case 25:
3151 +
3152 +/* Line 1806 of yacc.c  */
3153 +#line 252 "dtc-parser.y"
3154      {
3155 -                       FILE *f = srcfile_relative_open((yyvsp[-5].data).val, NULL);
3156 +                       FILE *f = srcfile_relative_open((yyvsp[(4) - (9)].data).val, NULL);
3157                         struct data d;
3158  
3159 -                       if ((yyvsp[-3].integer) != 0)
3160 -                               if (fseek(f, (yyvsp[-3].integer), SEEK_SET) != 0)
3161 +                       if ((yyvsp[(6) - (9)].integer) != 0)
3162 +                               if (fseek(f, (yyvsp[(6) - (9)].integer), SEEK_SET) != 0)
3163                                         die("Couldn't seek to offset %llu in \"%s\": %s",
3164 -                                           (unsigned long long)(yyvsp[-3].integer), (yyvsp[-5].data).val,
3165 +                                           (unsigned long long)(yyvsp[(6) - (9)].integer), (yyvsp[(4) - (9)].data).val,
3166                                             strerror(errno));
3167  
3168 -                       d = data_copy_file(f, (yyvsp[-1].integer));
3169 +                       d = data_copy_file(f, (yyvsp[(8) - (9)].integer));
3170  
3171 -                       (yyval.data) = data_merge((yyvsp[-8].data), d);
3172 +                       (yyval.data) = data_merge((yyvsp[(1) - (9)].data), d);
3173                         fclose(f);
3174                 }
3175 -#line 1675 "dtc-parser.tab.c" /* yacc.c:1646  */
3176      break;
3177  
3178 -  case 24:
3179 -#line 251 "dtc-parser.y" /* yacc.c:1646  */
3180 +  case 26:
3181 +
3182 +/* Line 1806 of yacc.c  */
3183 +#line 268 "dtc-parser.y"
3184      {
3185 -                       FILE *f = srcfile_relative_open((yyvsp[-1].data).val, NULL);
3186 +                       FILE *f = srcfile_relative_open((yyvsp[(4) - (5)].data).val, NULL);
3187                         struct data d = empty_data;
3188  
3189                         d = data_copy_file(f, -1);
3190  
3191 -                       (yyval.data) = data_merge((yyvsp[-4].data), d);
3192 +                       (yyval.data) = data_merge((yyvsp[(1) - (5)].data), d);
3193                         fclose(f);
3194                 }
3195 -#line 1689 "dtc-parser.tab.c" /* yacc.c:1646  */
3196      break;
3197  
3198 -  case 25:
3199 -#line 261 "dtc-parser.y" /* yacc.c:1646  */
3200 +  case 27:
3201 +
3202 +/* Line 1806 of yacc.c  */
3203 +#line 278 "dtc-parser.y"
3204      {
3205 -                       (yyval.data) = data_add_marker((yyvsp[-1].data), LABEL, (yyvsp[0].labelref));
3206 +                       (yyval.data) = data_add_marker((yyvsp[(1) - (2)].data), LABEL, (yyvsp[(2) - (2)].labelref));
3207                 }
3208 -#line 1697 "dtc-parser.tab.c" /* yacc.c:1646  */
3209      break;
3210  
3211 -  case 26:
3212 -#line 268 "dtc-parser.y" /* yacc.c:1646  */
3213 +  case 28:
3214 +
3215 +/* Line 1806 of yacc.c  */
3216 +#line 285 "dtc-parser.y"
3217      {
3218                         (yyval.data) = empty_data;
3219                 }
3220 -#line 1705 "dtc-parser.tab.c" /* yacc.c:1646  */
3221      break;
3222  
3223 -  case 27:
3224 -#line 272 "dtc-parser.y" /* yacc.c:1646  */
3225 +  case 29:
3226 +
3227 +/* Line 1806 of yacc.c  */
3228 +#line 289 "dtc-parser.y"
3229      {
3230 -                       (yyval.data) = (yyvsp[-1].data);
3231 +                       (yyval.data) = (yyvsp[(1) - (2)].data);
3232                 }
3233 -#line 1713 "dtc-parser.tab.c" /* yacc.c:1646  */
3234      break;
3235  
3236 -  case 28:
3237 -#line 276 "dtc-parser.y" /* yacc.c:1646  */
3238 +  case 30:
3239 +
3240 +/* Line 1806 of yacc.c  */
3241 +#line 293 "dtc-parser.y"
3242      {
3243 -                       (yyval.data) = data_add_marker((yyvsp[-1].data), LABEL, (yyvsp[0].labelref));
3244 +                       (yyval.data) = data_add_marker((yyvsp[(1) - (2)].data), LABEL, (yyvsp[(2) - (2)].labelref));
3245                 }
3246 -#line 1721 "dtc-parser.tab.c" /* yacc.c:1646  */
3247      break;
3248  
3249 -  case 29:
3250 -#line 283 "dtc-parser.y" /* yacc.c:1646  */
3251 +  case 31:
3252 +
3253 +/* Line 1806 of yacc.c  */
3254 +#line 300 "dtc-parser.y"
3255      {
3256                         unsigned long long bits;
3257  
3258 -                       bits = (yyvsp[-1].integer);
3259 +                       bits = (yyvsp[(2) - (3)].integer);
3260  
3261                         if ((bits !=  8) && (bits != 16) &&
3262                             (bits != 32) && (bits != 64)) {
3263 -                               ERROR(&(yylsp[-1]), "Array elements must be"
3264 +                               ERROR(&(yylsp[(2) - (3)]), "Array elements must be"
3265                                       " 8, 16, 32 or 64-bits");
3266                                 bits = 32;
3267                         }
3268 @@ -1737,23 +1918,25 @@ yyreduce:
3269                         (yyval.array).data = empty_data;
3270                         (yyval.array).bits = bits;
3271                 }
3272 -#line 1741 "dtc-parser.tab.c" /* yacc.c:1646  */
3273      break;
3274  
3275 -  case 30:
3276 -#line 299 "dtc-parser.y" /* yacc.c:1646  */
3277 +  case 32:
3278 +
3279 +/* Line 1806 of yacc.c  */
3280 +#line 316 "dtc-parser.y"
3281      {
3282                         (yyval.array).data = empty_data;
3283                         (yyval.array).bits = 32;
3284                 }
3285 -#line 1750 "dtc-parser.tab.c" /* yacc.c:1646  */
3286      break;
3287  
3288 -  case 31:
3289 -#line 304 "dtc-parser.y" /* yacc.c:1646  */
3290 +  case 33:
3291 +
3292 +/* Line 1806 of yacc.c  */
3293 +#line 321 "dtc-parser.y"
3294      {
3295 -                       if ((yyvsp[-1].array).bits < 64) {
3296 -                               uint64_t mask = (1ULL << (yyvsp[-1].array).bits) - 1;
3297 +                       if ((yyvsp[(1) - (2)].array).bits < 64) {
3298 +                               uint64_t mask = (1ULL << (yyvsp[(1) - (2)].array).bits) - 1;
3299                                 /*
3300                                  * Bits above mask must either be all zero
3301                                  * (positive within range of mask) or all one
3302 @@ -1762,258 +1945,293 @@ yyreduce:
3303                                  * within the mask to one (i.e. | in the
3304                                  * mask), all bits are one.
3305                                  */
3306 -                               if (((yyvsp[0].integer) > mask) && (((yyvsp[0].integer) | mask) != -1ULL))
3307 -                                       ERROR(&(yylsp[0]), "Value out of range for"
3308 -                                             " %d-bit array element", (yyvsp[-1].array).bits);
3309 +                               if (((yyvsp[(2) - (2)].integer) > mask) && (((yyvsp[(2) - (2)].integer) | mask) != -1ULL))
3310 +                                       ERROR(&(yylsp[(2) - (2)]), "Value out of range for"
3311 +                                             " %d-bit array element", (yyvsp[(1) - (2)].array).bits);
3312                         }
3313  
3314 -                       (yyval.array).data = data_append_integer((yyvsp[-1].array).data, (yyvsp[0].integer), (yyvsp[-1].array).bits);
3315 +                       (yyval.array).data = data_append_integer((yyvsp[(1) - (2)].array).data, (yyvsp[(2) - (2)].integer), (yyvsp[(1) - (2)].array).bits);
3316                 }
3317 -#line 1773 "dtc-parser.tab.c" /* yacc.c:1646  */
3318      break;
3319  
3320 -  case 32:
3321 -#line 323 "dtc-parser.y" /* yacc.c:1646  */
3322 +  case 34:
3323 +
3324 +/* Line 1806 of yacc.c  */
3325 +#line 340 "dtc-parser.y"
3326      {
3327 -                       uint64_t val = ~0ULL >> (64 - (yyvsp[-1].array).bits);
3328 +                       uint64_t val = ~0ULL >> (64 - (yyvsp[(1) - (2)].array).bits);
3329  
3330 -                       if ((yyvsp[-1].array).bits == 32)
3331 -                               (yyvsp[-1].array).data = data_add_marker((yyvsp[-1].array).data,
3332 +                       if ((yyvsp[(1) - (2)].array).bits == 32)
3333 +                               (yyvsp[(1) - (2)].array).data = data_add_marker((yyvsp[(1) - (2)].array).data,
3334                                                           REF_PHANDLE,
3335 -                                                         (yyvsp[0].labelref));
3336 +                                                         (yyvsp[(2) - (2)].labelref));
3337                         else
3338 -                               ERROR(&(yylsp[0]), "References are only allowed in "
3339 +                               ERROR(&(yylsp[(2) - (2)]), "References are only allowed in "
3340                                             "arrays with 32-bit elements.");
3341  
3342 -                       (yyval.array).data = data_append_integer((yyvsp[-1].array).data, val, (yyvsp[-1].array).bits);
3343 +                       (yyval.array).data = data_append_integer((yyvsp[(1) - (2)].array).data, val, (yyvsp[(1) - (2)].array).bits);
3344                 }
3345 -#line 1791 "dtc-parser.tab.c" /* yacc.c:1646  */
3346      break;
3347  
3348 -  case 33:
3349 -#line 337 "dtc-parser.y" /* yacc.c:1646  */
3350 +  case 35:
3351 +
3352 +/* Line 1806 of yacc.c  */
3353 +#line 354 "dtc-parser.y"
3354      {
3355 -                       (yyval.array).data = data_add_marker((yyvsp[-1].array).data, LABEL, (yyvsp[0].labelref));
3356 +                       (yyval.array).data = data_add_marker((yyvsp[(1) - (2)].array).data, LABEL, (yyvsp[(2) - (2)].labelref));
3357                 }
3358 -#line 1799 "dtc-parser.tab.c" /* yacc.c:1646  */
3359      break;
3360  
3361 -  case 36:
3362 -#line 346 "dtc-parser.y" /* yacc.c:1646  */
3363 +  case 38:
3364 +
3365 +/* Line 1806 of yacc.c  */
3366 +#line 363 "dtc-parser.y"
3367      {
3368 -                       (yyval.integer) = (yyvsp[-1].integer);
3369 +                       (yyval.integer) = (yyvsp[(2) - (3)].integer);
3370                 }
3371 -#line 1807 "dtc-parser.tab.c" /* yacc.c:1646  */
3372 -    break;
3373 -
3374 -  case 39:
3375 -#line 357 "dtc-parser.y" /* yacc.c:1646  */
3376 -    { (yyval.integer) = (yyvsp[-4].integer) ? (yyvsp[-2].integer) : (yyvsp[0].integer); }
3377 -#line 1813 "dtc-parser.tab.c" /* yacc.c:1646  */
3378      break;
3379  
3380    case 41:
3381 -#line 362 "dtc-parser.y" /* yacc.c:1646  */
3382 -    { (yyval.integer) = (yyvsp[-2].integer) || (yyvsp[0].integer); }
3383 -#line 1819 "dtc-parser.tab.c" /* yacc.c:1646  */
3384 +
3385 +/* Line 1806 of yacc.c  */
3386 +#line 374 "dtc-parser.y"
3387 +    { (yyval.integer) = (yyvsp[(1) - (5)].integer) ? (yyvsp[(3) - (5)].integer) : (yyvsp[(5) - (5)].integer); }
3388      break;
3389  
3390    case 43:
3391 -#line 367 "dtc-parser.y" /* yacc.c:1646  */
3392 -    { (yyval.integer) = (yyvsp[-2].integer) && (yyvsp[0].integer); }
3393 -#line 1825 "dtc-parser.tab.c" /* yacc.c:1646  */
3394 +
3395 +/* Line 1806 of yacc.c  */
3396 +#line 379 "dtc-parser.y"
3397 +    { (yyval.integer) = (yyvsp[(1) - (3)].integer) || (yyvsp[(3) - (3)].integer); }
3398      break;
3399  
3400    case 45:
3401 -#line 372 "dtc-parser.y" /* yacc.c:1646  */
3402 -    { (yyval.integer) = (yyvsp[-2].integer) | (yyvsp[0].integer); }
3403 -#line 1831 "dtc-parser.tab.c" /* yacc.c:1646  */
3404 +
3405 +/* Line 1806 of yacc.c  */
3406 +#line 384 "dtc-parser.y"
3407 +    { (yyval.integer) = (yyvsp[(1) - (3)].integer) && (yyvsp[(3) - (3)].integer); }
3408      break;
3409  
3410    case 47:
3411 -#line 377 "dtc-parser.y" /* yacc.c:1646  */
3412 -    { (yyval.integer) = (yyvsp[-2].integer) ^ (yyvsp[0].integer); }
3413 -#line 1837 "dtc-parser.tab.c" /* yacc.c:1646  */
3414 +
3415 +/* Line 1806 of yacc.c  */
3416 +#line 389 "dtc-parser.y"
3417 +    { (yyval.integer) = (yyvsp[(1) - (3)].integer) | (yyvsp[(3) - (3)].integer); }
3418      break;
3419  
3420    case 49:
3421 -#line 382 "dtc-parser.y" /* yacc.c:1646  */
3422 -    { (yyval.integer) = (yyvsp[-2].integer) & (yyvsp[0].integer); }
3423 -#line 1843 "dtc-parser.tab.c" /* yacc.c:1646  */
3424 +
3425 +/* Line 1806 of yacc.c  */
3426 +#line 394 "dtc-parser.y"
3427 +    { (yyval.integer) = (yyvsp[(1) - (3)].integer) ^ (yyvsp[(3) - (3)].integer); }
3428      break;
3429  
3430    case 51:
3431 -#line 387 "dtc-parser.y" /* yacc.c:1646  */
3432 -    { (yyval.integer) = (yyvsp[-2].integer) == (yyvsp[0].integer); }
3433 -#line 1849 "dtc-parser.tab.c" /* yacc.c:1646  */
3434 +
3435 +/* Line 1806 of yacc.c  */
3436 +#line 399 "dtc-parser.y"
3437 +    { (yyval.integer) = (yyvsp[(1) - (3)].integer) & (yyvsp[(3) - (3)].integer); }
3438      break;
3439  
3440 -  case 52:
3441 -#line 388 "dtc-parser.y" /* yacc.c:1646  */
3442 -    { (yyval.integer) = (yyvsp[-2].integer) != (yyvsp[0].integer); }
3443 -#line 1855 "dtc-parser.tab.c" /* yacc.c:1646  */
3444 +  case 53:
3445 +
3446 +/* Line 1806 of yacc.c  */
3447 +#line 404 "dtc-parser.y"
3448 +    { (yyval.integer) = (yyvsp[(1) - (3)].integer) == (yyvsp[(3) - (3)].integer); }
3449      break;
3450  
3451    case 54:
3452 -#line 393 "dtc-parser.y" /* yacc.c:1646  */
3453 -    { (yyval.integer) = (yyvsp[-2].integer) < (yyvsp[0].integer); }
3454 -#line 1861 "dtc-parser.tab.c" /* yacc.c:1646  */
3455 -    break;
3456  
3457 -  case 55:
3458 -#line 394 "dtc-parser.y" /* yacc.c:1646  */
3459 -    { (yyval.integer) = (yyvsp[-2].integer) > (yyvsp[0].integer); }
3460 -#line 1867 "dtc-parser.tab.c" /* yacc.c:1646  */
3461 +/* Line 1806 of yacc.c  */
3462 +#line 405 "dtc-parser.y"
3463 +    { (yyval.integer) = (yyvsp[(1) - (3)].integer) != (yyvsp[(3) - (3)].integer); }
3464      break;
3465  
3466    case 56:
3467 -#line 395 "dtc-parser.y" /* yacc.c:1646  */
3468 -    { (yyval.integer) = (yyvsp[-2].integer) <= (yyvsp[0].integer); }
3469 -#line 1873 "dtc-parser.tab.c" /* yacc.c:1646  */
3470 +
3471 +/* Line 1806 of yacc.c  */
3472 +#line 410 "dtc-parser.y"
3473 +    { (yyval.integer) = (yyvsp[(1) - (3)].integer) < (yyvsp[(3) - (3)].integer); }
3474      break;
3475  
3476    case 57:
3477 -#line 396 "dtc-parser.y" /* yacc.c:1646  */
3478 -    { (yyval.integer) = (yyvsp[-2].integer) >= (yyvsp[0].integer); }
3479 -#line 1879 "dtc-parser.tab.c" /* yacc.c:1646  */
3480 +
3481 +/* Line 1806 of yacc.c  */
3482 +#line 411 "dtc-parser.y"
3483 +    { (yyval.integer) = (yyvsp[(1) - (3)].integer) > (yyvsp[(3) - (3)].integer); }
3484      break;
3485  
3486    case 58:
3487 -#line 400 "dtc-parser.y" /* yacc.c:1646  */
3488 -    { (yyval.integer) = (yyvsp[-2].integer) << (yyvsp[0].integer); }
3489 -#line 1885 "dtc-parser.tab.c" /* yacc.c:1646  */
3490 +
3491 +/* Line 1806 of yacc.c  */
3492 +#line 412 "dtc-parser.y"
3493 +    { (yyval.integer) = (yyvsp[(1) - (3)].integer) <= (yyvsp[(3) - (3)].integer); }
3494      break;
3495  
3496    case 59:
3497 -#line 401 "dtc-parser.y" /* yacc.c:1646  */
3498 -    { (yyval.integer) = (yyvsp[-2].integer) >> (yyvsp[0].integer); }
3499 -#line 1891 "dtc-parser.tab.c" /* yacc.c:1646  */
3500 +
3501 +/* Line 1806 of yacc.c  */
3502 +#line 413 "dtc-parser.y"
3503 +    { (yyval.integer) = (yyvsp[(1) - (3)].integer) >= (yyvsp[(3) - (3)].integer); }
3504 +    break;
3505 +
3506 +  case 60:
3507 +
3508 +/* Line 1806 of yacc.c  */
3509 +#line 417 "dtc-parser.y"
3510 +    { (yyval.integer) = (yyvsp[(1) - (3)].integer) << (yyvsp[(3) - (3)].integer); }
3511      break;
3512  
3513    case 61:
3514 -#line 406 "dtc-parser.y" /* yacc.c:1646  */
3515 -    { (yyval.integer) = (yyvsp[-2].integer) + (yyvsp[0].integer); }
3516 -#line 1897 "dtc-parser.tab.c" /* yacc.c:1646  */
3517 +
3518 +/* Line 1806 of yacc.c  */
3519 +#line 418 "dtc-parser.y"
3520 +    { (yyval.integer) = (yyvsp[(1) - (3)].integer) >> (yyvsp[(3) - (3)].integer); }
3521      break;
3522  
3523 -  case 62:
3524 -#line 407 "dtc-parser.y" /* yacc.c:1646  */
3525 -    { (yyval.integer) = (yyvsp[-2].integer) - (yyvsp[0].integer); }
3526 -#line 1903 "dtc-parser.tab.c" /* yacc.c:1646  */
3527 +  case 63:
3528 +
3529 +/* Line 1806 of yacc.c  */
3530 +#line 423 "dtc-parser.y"
3531 +    { (yyval.integer) = (yyvsp[(1) - (3)].integer) + (yyvsp[(3) - (3)].integer); }
3532      break;
3533  
3534    case 64:
3535 -#line 412 "dtc-parser.y" /* yacc.c:1646  */
3536 -    { (yyval.integer) = (yyvsp[-2].integer) * (yyvsp[0].integer); }
3537 -#line 1909 "dtc-parser.tab.c" /* yacc.c:1646  */
3538 -    break;
3539  
3540 -  case 65:
3541 -#line 413 "dtc-parser.y" /* yacc.c:1646  */
3542 -    { (yyval.integer) = (yyvsp[-2].integer) / (yyvsp[0].integer); }
3543 -#line 1915 "dtc-parser.tab.c" /* yacc.c:1646  */
3544 +/* Line 1806 of yacc.c  */
3545 +#line 424 "dtc-parser.y"
3546 +    { (yyval.integer) = (yyvsp[(1) - (3)].integer) - (yyvsp[(3) - (3)].integer); }
3547      break;
3548  
3549    case 66:
3550 -#line 414 "dtc-parser.y" /* yacc.c:1646  */
3551 -    { (yyval.integer) = (yyvsp[-2].integer) % (yyvsp[0].integer); }
3552 -#line 1921 "dtc-parser.tab.c" /* yacc.c:1646  */
3553 +
3554 +/* Line 1806 of yacc.c  */
3555 +#line 429 "dtc-parser.y"
3556 +    { (yyval.integer) = (yyvsp[(1) - (3)].integer) * (yyvsp[(3) - (3)].integer); }
3557      break;
3558  
3559 -  case 69:
3560 -#line 420 "dtc-parser.y" /* yacc.c:1646  */
3561 -    { (yyval.integer) = -(yyvsp[0].integer); }
3562 -#line 1927 "dtc-parser.tab.c" /* yacc.c:1646  */
3563 +  case 67:
3564 +
3565 +/* Line 1806 of yacc.c  */
3566 +#line 430 "dtc-parser.y"
3567 +    { (yyval.integer) = (yyvsp[(1) - (3)].integer) / (yyvsp[(3) - (3)].integer); }
3568      break;
3569  
3570 -  case 70:
3571 -#line 421 "dtc-parser.y" /* yacc.c:1646  */
3572 -    { (yyval.integer) = ~(yyvsp[0].integer); }
3573 -#line 1933 "dtc-parser.tab.c" /* yacc.c:1646  */
3574 +  case 68:
3575 +
3576 +/* Line 1806 of yacc.c  */
3577 +#line 431 "dtc-parser.y"
3578 +    { (yyval.integer) = (yyvsp[(1) - (3)].integer) % (yyvsp[(3) - (3)].integer); }
3579      break;
3580  
3581    case 71:
3582 -#line 422 "dtc-parser.y" /* yacc.c:1646  */
3583 -    { (yyval.integer) = !(yyvsp[0].integer); }
3584 -#line 1939 "dtc-parser.tab.c" /* yacc.c:1646  */
3585 +
3586 +/* Line 1806 of yacc.c  */
3587 +#line 437 "dtc-parser.y"
3588 +    { (yyval.integer) = -(yyvsp[(2) - (2)].integer); }
3589      break;
3590  
3591    case 72:
3592 -#line 427 "dtc-parser.y" /* yacc.c:1646  */
3593 -    {
3594 -                       (yyval.data) = empty_data;
3595 -               }
3596 -#line 1947 "dtc-parser.tab.c" /* yacc.c:1646  */
3597 +
3598 +/* Line 1806 of yacc.c  */
3599 +#line 438 "dtc-parser.y"
3600 +    { (yyval.integer) = ~(yyvsp[(2) - (2)].integer); }
3601      break;
3602  
3603    case 73:
3604 -#line 431 "dtc-parser.y" /* yacc.c:1646  */
3605 -    {
3606 -                       (yyval.data) = data_append_byte((yyvsp[-1].data), (yyvsp[0].byte));
3607 -               }
3608 -#line 1955 "dtc-parser.tab.c" /* yacc.c:1646  */
3609 +
3610 +/* Line 1806 of yacc.c  */
3611 +#line 439 "dtc-parser.y"
3612 +    { (yyval.integer) = !(yyvsp[(2) - (2)].integer); }
3613      break;
3614  
3615    case 74:
3616 -#line 435 "dtc-parser.y" /* yacc.c:1646  */
3617 +
3618 +/* Line 1806 of yacc.c  */
3619 +#line 444 "dtc-parser.y"
3620      {
3621 -                       (yyval.data) = data_add_marker((yyvsp[-1].data), LABEL, (yyvsp[0].labelref));
3622 +                       (yyval.data) = empty_data;
3623                 }
3624 -#line 1963 "dtc-parser.tab.c" /* yacc.c:1646  */
3625      break;
3626  
3627    case 75:
3628 -#line 442 "dtc-parser.y" /* yacc.c:1646  */
3629 +
3630 +/* Line 1806 of yacc.c  */
3631 +#line 448 "dtc-parser.y"
3632      {
3633 -                       (yyval.nodelist) = NULL;
3634 +                       (yyval.data) = data_append_byte((yyvsp[(1) - (2)].data), (yyvsp[(2) - (2)].byte));
3635                 }
3636 -#line 1971 "dtc-parser.tab.c" /* yacc.c:1646  */
3637      break;
3638  
3639    case 76:
3640 -#line 446 "dtc-parser.y" /* yacc.c:1646  */
3641 +
3642 +/* Line 1806 of yacc.c  */
3643 +#line 452 "dtc-parser.y"
3644      {
3645 -                       (yyval.nodelist) = chain_node((yyvsp[-1].node), (yyvsp[0].nodelist));
3646 +                       (yyval.data) = data_add_marker((yyvsp[(1) - (2)].data), LABEL, (yyvsp[(2) - (2)].labelref));
3647                 }
3648 -#line 1979 "dtc-parser.tab.c" /* yacc.c:1646  */
3649      break;
3650  
3651    case 77:
3652 -#line 450 "dtc-parser.y" /* yacc.c:1646  */
3653 +
3654 +/* Line 1806 of yacc.c  */
3655 +#line 459 "dtc-parser.y"
3656      {
3657 -                       ERROR(&(yylsp[0]), "Properties must precede subnodes");
3658 -                       YYERROR;
3659 +                       (yyval.nodelist) = NULL;
3660                 }
3661 -#line 1988 "dtc-parser.tab.c" /* yacc.c:1646  */
3662      break;
3663  
3664    case 78:
3665 -#line 458 "dtc-parser.y" /* yacc.c:1646  */
3666 +
3667 +/* Line 1806 of yacc.c  */
3668 +#line 463 "dtc-parser.y"
3669      {
3670 -                       (yyval.node) = name_node((yyvsp[0].node), (yyvsp[-1].propnodename));
3671 +                       (yyval.nodelist) = chain_node((yyvsp[(1) - (2)].node), (yyvsp[(2) - (2)].nodelist));
3672                 }
3673 -#line 1996 "dtc-parser.tab.c" /* yacc.c:1646  */
3674      break;
3675  
3676    case 79:
3677 -#line 462 "dtc-parser.y" /* yacc.c:1646  */
3678 +
3679 +/* Line 1806 of yacc.c  */
3680 +#line 467 "dtc-parser.y"
3681      {
3682 -                       (yyval.node) = name_node(build_node_delete(), (yyvsp[-1].propnodename));
3683 +                       ERROR(&(yylsp[(2) - (2)]), "Properties must precede subnodes");
3684 +                       YYERROR;
3685                 }
3686 -#line 2004 "dtc-parser.tab.c" /* yacc.c:1646  */
3687      break;
3688  
3689    case 80:
3690 -#line 466 "dtc-parser.y" /* yacc.c:1646  */
3691 +
3692 +/* Line 1806 of yacc.c  */
3693 +#line 475 "dtc-parser.y"
3694      {
3695 -                       add_label(&(yyvsp[0].node)->labels, (yyvsp[-1].labelref));
3696 -                       (yyval.node) = (yyvsp[0].node);
3697 +                       (yyval.node) = name_node((yyvsp[(2) - (2)].node), (yyvsp[(1) - (2)].propnodename));
3698                 }
3699 -#line 2013 "dtc-parser.tab.c" /* yacc.c:1646  */
3700      break;
3701  
3702 +  case 81:
3703  
3704 -#line 2017 "dtc-parser.tab.c" /* yacc.c:1646  */
3705 +/* Line 1806 of yacc.c  */
3706 +#line 479 "dtc-parser.y"
3707 +    {
3708 +                       (yyval.node) = name_node(build_node_delete(), (yyvsp[(2) - (3)].propnodename));
3709 +               }
3710 +    break;
3711 +
3712 +  case 82:
3713 +
3714 +/* Line 1806 of yacc.c  */
3715 +#line 483 "dtc-parser.y"
3716 +    {
3717 +                       add_label(&(yyvsp[(2) - (2)].node)->labels, (yyvsp[(1) - (2)].labelref));
3718 +                       (yyval.node) = (yyvsp[(2) - (2)].node);
3719 +               }
3720 +    break;
3721 +
3722 +
3723 +
3724 +/* Line 1806 of yacc.c  */
3725 +#line 2235 "dtc-parser.tab.c"
3726        default: break;
3727      }
3728    /* User semantic actions sometimes alter yychar, and that requires
3729 @@ -2036,7 +2254,7 @@ yyreduce:
3730    *++yyvsp = yyval;
3731    *++yylsp = yyloc;
3732  
3733 -  /* Now 'shift' the result of the reduction.  Determine what state
3734 +  /* Now `shift' the result of the reduction.  Determine what state
3735       that goes to, based on the state we popped back to and the rule
3736       number reduced by.  */
3737  
3738 @@ -2051,9 +2269,9 @@ yyreduce:
3739    goto yynewstate;
3740  
3741  
3742 -/*--------------------------------------.
3743 -| yyerrlab -- here on detecting error.  |
3744 -`--------------------------------------*/
3745 +/*------------------------------------.
3746 +| yyerrlab -- here on detecting error |
3747 +`------------------------------------*/
3748  yyerrlab:
3749    /* Make sure we have latest lookahead translation.  See comments at
3750       user semantic actions for why this is necessary.  */
3751 @@ -2104,20 +2322,20 @@ yyerrlab:
3752    if (yyerrstatus == 3)
3753      {
3754        /* If just tried and failed to reuse lookahead token after an
3755 -         error, discard it.  */
3756 +        error, discard it.  */
3757  
3758        if (yychar <= YYEOF)
3759 -        {
3760 -          /* Return failure if at end of input.  */
3761 -          if (yychar == YYEOF)
3762 -            YYABORT;
3763 -        }
3764 +       {
3765 +         /* Return failure if at end of input.  */
3766 +         if (yychar == YYEOF)
3767 +           YYABORT;
3768 +       }
3769        else
3770 -        {
3771 -          yydestruct ("Error: discarding",
3772 -                      yytoken, &yylval, &yylloc);
3773 -          yychar = YYEMPTY;
3774 -        }
3775 +       {
3776 +         yydestruct ("Error: discarding",
3777 +                     yytoken, &yylval, &yylloc);
3778 +         yychar = YYEMPTY;
3779 +       }
3780      }
3781  
3782    /* Else will try to reuse lookahead token after shifting the error
3783 @@ -2137,7 +2355,7 @@ yyerrorlab:
3784       goto yyerrorlab;
3785  
3786    yyerror_range[1] = yylsp[1-yylen];
3787 -  /* Do not reclaim the symbols of the rule whose action triggered
3788 +  /* Do not reclaim the symbols of the rule which action triggered
3789       this YYERROR.  */
3790    YYPOPSTACK (yylen);
3791    yylen = 0;
3792 @@ -2150,37 +2368,35 @@ yyerrorlab:
3793  | yyerrlab1 -- common code for both syntax error and YYERROR.  |
3794  `-------------------------------------------------------------*/
3795  yyerrlab1:
3796 -  yyerrstatus = 3;      /* Each real token shifted decrements this.  */
3797 +  yyerrstatus = 3;     /* Each real token shifted decrements this.  */
3798  
3799    for (;;)
3800      {
3801        yyn = yypact[yystate];
3802        if (!yypact_value_is_default (yyn))
3803 -        {
3804 -          yyn += YYTERROR;
3805 -          if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
3806 -            {
3807 -              yyn = yytable[yyn];
3808 -              if (0 < yyn)
3809 -                break;
3810 -            }
3811 -        }
3812 +       {
3813 +         yyn += YYTERROR;
3814 +         if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
3815 +           {
3816 +             yyn = yytable[yyn];
3817 +             if (0 < yyn)
3818 +               break;
3819 +           }
3820 +       }
3821  
3822        /* Pop the current state because it cannot handle the error token.  */
3823        if (yyssp == yyss)
3824 -        YYABORT;
3825 +       YYABORT;
3826  
3827        yyerror_range[1] = *yylsp;
3828        yydestruct ("Error: popping",
3829 -                  yystos[yystate], yyvsp, yylsp);
3830 +                 yystos[yystate], yyvsp, yylsp);
3831        YYPOPSTACK (1);
3832        yystate = *yyssp;
3833        YY_STACK_PRINT (yyss, yyssp);
3834      }
3835  
3836 -  YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
3837    *++yyvsp = yylval;
3838 -  YY_IGNORE_MAYBE_UNINITIALIZED_END
3839  
3840    yyerror_range[2] = yylloc;
3841    /* Using YYLLOC is tempting, but would change the location of
3842 @@ -2209,7 +2425,7 @@ yyabortlab:
3843    yyresult = 1;
3844    goto yyreturn;
3845  
3846 -#if !defined yyoverflow || YYERROR_VERBOSE
3847 +#if !defined(yyoverflow) || YYERROR_VERBOSE
3848  /*-------------------------------------------------.
3849  | yyexhaustedlab -- memory exhaustion comes here.  |
3850  `-------------------------------------------------*/
3851 @@ -2228,14 +2444,14 @@ yyreturn:
3852        yydestruct ("Cleanup: discarding lookahead",
3853                    yytoken, &yylval, &yylloc);
3854      }
3855 -  /* Do not reclaim the symbols of the rule whose action triggered
3856 +  /* Do not reclaim the symbols of the rule which action triggered
3857       this YYABORT or YYACCEPT.  */
3858    YYPOPSTACK (yylen);
3859    YY_STACK_PRINT (yyss, yyssp);
3860    while (yyssp != yyss)
3861      {
3862        yydestruct ("Cleanup: popping",
3863 -                  yystos[*yyssp], yyvsp, yylsp);
3864 +                 yystos[*yyssp], yyvsp, yylsp);
3865        YYPOPSTACK (1);
3866      }
3867  #ifndef yyoverflow
3868 @@ -2246,12 +2462,18 @@ yyreturn:
3869    if (yymsg != yymsgbuf)
3870      YYSTACK_FREE (yymsg);
3871  #endif
3872 -  return yyresult;
3873 +  /* Make sure YYID is used.  */
3874 +  return YYID (yyresult);
3875  }
3876 -#line 472 "dtc-parser.y" /* yacc.c:1906  */
3877 +
3878 +
3879 +
3880 +/* Line 2067 of yacc.c  */
3881 +#line 489 "dtc-parser.y"
3882  
3883  
3884  void yyerror(char const *s)
3885  {
3886         ERROR(&yylloc, "%s", s);
3887  }
3888 +
3889 --- a/scripts/dtc/dtc-parser.tab.h_shipped
3890 +++ b/scripts/dtc/dtc-parser.tab.h_shipped
3891 @@ -1,19 +1,19 @@
3892 -/* A Bison parser, made by GNU Bison 3.0.2.  */
3893 +/* A Bison parser, made by GNU Bison 2.5.  */
3894  
3895  /* Bison interface for Yacc-like parsers in C
3896 -
3897 -   Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc.
3898 -
3899 +   
3900 +      Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc.
3901 +   
3902     This program is free software: you can redistribute it and/or modify
3903     it under the terms of the GNU General Public License as published by
3904     the Free Software Foundation, either version 3 of the License, or
3905     (at your option) any later version.
3906 -
3907 +   
3908     This program is distributed in the hope that it will be useful,
3909     but WITHOUT ANY WARRANTY; without even the implied warranty of
3910     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
3911     GNU General Public License for more details.
3912 -
3913 +   
3914     You should have received a copy of the GNU General Public License
3915     along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
3916  
3917 @@ -26,55 +26,50 @@
3918     special exception, which will cause the skeleton and the resulting
3919     Bison output files to be licensed under the GNU General Public
3920     License without this special exception.
3921 -
3922 +   
3923     This special exception was added by the Free Software Foundation in
3924     version 2.2 of Bison.  */
3925  
3926 -#ifndef YY_YY_DTC_PARSER_TAB_H_INCLUDED
3927 -# define YY_YY_DTC_PARSER_TAB_H_INCLUDED
3928 -/* Debug traces.  */
3929 -#ifndef YYDEBUG
3930 -# define YYDEBUG 0
3931 -#endif
3932 -#if YYDEBUG
3933 -extern int yydebug;
3934 -#endif
3935  
3936 -/* Token type.  */
3937 +/* Tokens.  */
3938  #ifndef YYTOKENTYPE
3939  # define YYTOKENTYPE
3940 -  enum yytokentype
3941 -  {
3942 -    DT_V1 = 258,
3943 -    DT_MEMRESERVE = 259,
3944 -    DT_LSHIFT = 260,
3945 -    DT_RSHIFT = 261,
3946 -    DT_LE = 262,
3947 -    DT_GE = 263,
3948 -    DT_EQ = 264,
3949 -    DT_NE = 265,
3950 -    DT_AND = 266,
3951 -    DT_OR = 267,
3952 -    DT_BITS = 268,
3953 -    DT_DEL_PROP = 269,
3954 -    DT_DEL_NODE = 270,
3955 -    DT_PROPNODENAME = 271,
3956 -    DT_LITERAL = 272,
3957 -    DT_CHAR_LITERAL = 273,
3958 -    DT_BYTE = 274,
3959 -    DT_STRING = 275,
3960 -    DT_LABEL = 276,
3961 -    DT_REF = 277,
3962 -    DT_INCBIN = 278
3963 -  };
3964 +   /* Put the tokens into the symbol table, so that GDB and other debuggers
3965 +      know about them.  */
3966 +   enum yytokentype {
3967 +     DT_V1 = 258,
3968 +     DT_PLUGIN = 259,
3969 +     DT_MEMRESERVE = 260,
3970 +     DT_LSHIFT = 261,
3971 +     DT_RSHIFT = 262,
3972 +     DT_LE = 263,
3973 +     DT_GE = 264,
3974 +     DT_EQ = 265,
3975 +     DT_NE = 266,
3976 +     DT_AND = 267,
3977 +     DT_OR = 268,
3978 +     DT_BITS = 269,
3979 +     DT_DEL_PROP = 270,
3980 +     DT_DEL_NODE = 271,
3981 +     DT_PROPNODENAME = 272,
3982 +     DT_LITERAL = 273,
3983 +     DT_CHAR_LITERAL = 274,
3984 +     DT_BYTE = 275,
3985 +     DT_STRING = 276,
3986 +     DT_LABEL = 277,
3987 +     DT_REF = 278,
3988 +     DT_INCBIN = 279
3989 +   };
3990  #endif
3991  
3992 -/* Value type.  */
3993 +
3994 +
3995  #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
3996 -typedef union YYSTYPE YYSTYPE;
3997 -union YYSTYPE
3998 +typedef union YYSTYPE
3999  {
4000 -#line 38 "dtc-parser.y" /* yacc.c:1909  */
4001 +
4002 +/* Line 2068 of yacc.c  */
4003 +#line 39 "dtc-parser.y"
4004  
4005         char *propnodename;
4006         char *labelref;
4007 @@ -92,30 +87,32 @@ union YYSTYPE
4008         struct node *nodelist;
4009         struct reserve_info *re;
4010         uint64_t integer;
4011 +       int is_plugin;
4012 +
4013 +
4014  
4015 -#line 97 "dtc-parser.tab.h" /* yacc.c:1909  */
4016 -};
4017 +/* Line 2068 of yacc.c  */
4018 +#line 96 "dtc-parser.tab.h"
4019 +} YYSTYPE;
4020  # define YYSTYPE_IS_TRIVIAL 1
4021 +# define yystype YYSTYPE /* obsolescent; will be withdrawn */
4022  # define YYSTYPE_IS_DECLARED 1
4023  #endif
4024  
4025 -/* Location type.  */
4026 +extern YYSTYPE yylval;
4027 +
4028  #if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
4029 -typedef struct YYLTYPE YYLTYPE;
4030 -struct YYLTYPE
4031 +typedef struct YYLTYPE
4032  {
4033    int first_line;
4034    int first_column;
4035    int last_line;
4036    int last_column;
4037 -};
4038 +} YYLTYPE;
4039 +# define yyltype YYLTYPE /* obsolescent; will be withdrawn */
4040  # define YYLTYPE_IS_DECLARED 1
4041  # define YYLTYPE_IS_TRIVIAL 1
4042  #endif
4043  
4044 -
4045 -extern YYSTYPE yylval;
4046  extern YYLTYPE yylloc;
4047 -int yyparse (void);
4048  
4049 -#endif /* !YY_YY_DTC_PARSER_TAB_H_INCLUDED  */
4050 --- a/scripts/dtc/dtc-parser.y
4051 +++ b/scripts/dtc/dtc-parser.y
4052 @@ -19,6 +19,7 @@
4053   */
4054  %{
4055  #include <stdio.h>
4056 +#include <inttypes.h>
4057  
4058  #include "dtc.h"
4059  #include "srcpos.h"
4060 @@ -52,9 +53,11 @@ extern bool treesource_error;
4061         struct node *nodelist;
4062         struct reserve_info *re;
4063         uint64_t integer;
4064 +       int is_plugin;
4065  }
4066  
4067  %token DT_V1
4068 +%token DT_PLUGIN
4069  %token DT_MEMRESERVE
4070  %token DT_LSHIFT DT_RSHIFT DT_LE DT_GE DT_EQ DT_NE DT_AND DT_OR
4071  %token DT_BITS
4072 @@ -71,6 +74,7 @@ extern bool treesource_error;
4073  
4074  %type <data> propdata
4075  %type <data> propdataprefix
4076 +%type <is_plugin> plugindecl
4077  %type <re> memreserve
4078  %type <re> memreserves
4079  %type <array> arrayprefix
4080 @@ -101,10 +105,23 @@ extern bool treesource_error;
4081  %%
4082  
4083  sourcefile:
4084 -         DT_V1 ';' memreserves devicetree
4085 +         DT_V1 ';' plugindecl memreserves devicetree
4086                 {
4087 -                       the_boot_info = build_boot_info($3, $4,
4088 -                                                       guess_boot_cpuid($4));
4089 +                       $5->is_plugin = $3;
4090 +                       $5->is_root = 1;
4091 +                       the_boot_info = build_boot_info($4, $5,
4092 +                                                       guess_boot_cpuid($5));
4093 +               }
4094 +       ;
4095 +
4096 +plugindecl:
4097 +       /* empty */
4098 +               {
4099 +                       $$ = 0;
4100 +               }
4101 +       | DT_PLUGIN ';'
4102 +               {
4103 +                       $$ = 1;
4104                 }
4105         ;
4106  
4107 --- a/scripts/dtc/dtc.c
4108 +++ b/scripts/dtc/dtc.c
4109 @@ -29,6 +29,7 @@ int reservenum;               /* Number of memory res
4110  int minsize;           /* Minimum blob size */
4111  int padsize;           /* Additional padding to blob */
4112  int phandle_format = PHANDLE_BOTH;     /* Use linux,phandle or phandle properties */
4113 +int symbol_fixup_support = 0;
4114  
4115  static void fill_fullpaths(struct node *tree, const char *prefix)
4116  {
4117 @@ -51,7 +52,7 @@ static void fill_fullpaths(struct node *
4118  #define FDT_VERSION(version)   _FDT_VERSION(version)
4119  #define _FDT_VERSION(version)  #version
4120  static const char usage_synopsis[] = "dtc [options] <input file>";
4121 -static const char usage_short_opts[] = "qI:O:o:V:d:R:S:p:fb:i:H:sW:E:hv";
4122 +static const char usage_short_opts[] = "qI:O:o:V:d:R:S:p:fb:i:H:sW:E:hv@";
4123  static struct option const usage_long_opts[] = {
4124         {"quiet",            no_argument, NULL, 'q'},
4125         {"in-format",         a_argument, NULL, 'I'},
4126 @@ -69,6 +70,7 @@ static struct option const usage_long_op
4127         {"phandle",           a_argument, NULL, 'H'},
4128         {"warning",           a_argument, NULL, 'W'},
4129         {"error",             a_argument, NULL, 'E'},
4130 +       {"symbols",           a_argument, NULL, '@'},
4131         {"help",             no_argument, NULL, 'h'},
4132         {"version",          no_argument, NULL, 'v'},
4133         {NULL,               no_argument, NULL, 0x0},
4134 @@ -99,6 +101,7 @@ static const char * const usage_opts_hel
4135          "\t\tboth   - Both \"linux,phandle\" and \"phandle\" properties",
4136         "\n\tEnable/disable warnings (prefix with \"no-\")",
4137         "\n\tEnable/disable errors (prefix with \"no-\")",
4138 +       "\n\tSymbols and Fixups support",
4139         "\n\tPrint this help and exit",
4140         "\n\tPrint version and exit",
4141         NULL,
4142 @@ -186,7 +189,9 @@ int main(int argc, char *argv[])
4143                 case 'E':
4144                         parse_checks_option(false, true, optarg);
4145                         break;
4146 -
4147 +               case '@':
4148 +                       symbol_fixup_support = 1;
4149 +                       break;
4150                 case 'h':
4151                         usage(NULL);
4152                 default:
4153 --- a/scripts/dtc/dtc.h
4154 +++ b/scripts/dtc/dtc.h
4155 @@ -54,6 +54,7 @@ extern int reservenum;                /* Number of mem
4156  extern int minsize;            /* Minimum blob size */
4157  extern int padsize;            /* Additional padding to blob */
4158  extern int phandle_format;     /* Use linux,phandle or phandle properties */
4159 +extern int symbol_fixup_support;/* enable symbols & fixup support */
4160  
4161  #define PHANDLE_LEGACY 0x1
4162  #define PHANDLE_EPAPR  0x2
4163 @@ -132,6 +133,25 @@ struct label {
4164         struct label *next;
4165  };
4166  
4167 +struct fixup_entry {
4168 +       int offset;
4169 +       struct node *node;
4170 +       struct property *prop;
4171 +       struct fixup_entry *next;
4172 +};
4173 +
4174 +struct fixup {
4175 +       char *ref;
4176 +       struct fixup_entry *entries;
4177 +       struct fixup *next;
4178 +};
4179 +
4180 +struct symbol {
4181 +       struct label *label;
4182 +       struct node *node;
4183 +       struct symbol *next;
4184 +};
4185 +
4186  struct property {
4187         bool deleted;
4188         char *name;
4189 @@ -158,6 +178,12 @@ struct node {
4190         int addr_cells, size_cells;
4191  
4192         struct label *labels;
4193 +
4194 +       int is_root;
4195 +       int is_plugin;
4196 +       struct fixup *fixups;
4197 +       struct symbol *symbols;
4198 +       struct fixup_entry *local_fixups;
4199  };
4200  
4201  #define for_each_label_withdel(l0, l) \
4202 @@ -181,6 +207,18 @@ struct node {
4203         for_each_child_withdel(n, c) \
4204                 if (!(c)->deleted)
4205  
4206 +#define for_each_fixup(n, f) \
4207 +       for ((f) = (n)->fixups; (f); (f) = (f)->next)
4208 +
4209 +#define for_each_fixup_entry(f, fe) \
4210 +       for ((fe) = (f)->entries; (fe); (fe) = (fe)->next)
4211 +
4212 +#define for_each_symbol(n, s) \
4213 +       for ((s) = (n)->symbols; (s); (s) = (s)->next)
4214 +
4215 +#define for_each_local_fixup_entry(n, fe) \
4216 +       for ((fe) = (n)->local_fixups; (fe); (fe) = (fe)->next)
4217 +
4218  void add_label(struct label **labels, char *label);
4219  void delete_labels(struct label **labels);
4220  
4221 --- a/scripts/dtc/flattree.c
4222 +++ b/scripts/dtc/flattree.c
4223 @@ -262,6 +262,12 @@ static void flatten_tree(struct node *tr
4224         struct property *prop;
4225         struct node *child;
4226         bool seen_name_prop = false;
4227 +       struct symbol *sym;
4228 +       struct fixup *f;
4229 +       struct fixup_entry *fe;
4230 +       char *name, *s;
4231 +       const char *fullpath;
4232 +       int namesz, nameoff, vallen;
4233  
4234         if (tree->deleted)
4235                 return;
4236 @@ -276,8 +282,6 @@ static void flatten_tree(struct node *tr
4237         emit->align(etarget, sizeof(cell_t));
4238  
4239         for_each_property(tree, prop) {
4240 -               int nameoff;
4241 -
4242                 if (streq(prop->name, "name"))
4243                         seen_name_prop = true;
4244  
4245 @@ -310,6 +314,139 @@ static void flatten_tree(struct node *tr
4246                 flatten_tree(child, emit, etarget, strbuf, vi);
4247         }
4248  
4249 +       if (!symbol_fixup_support)
4250 +               goto no_symbols;
4251 +
4252 +       /* add the symbol nodes (if any) */
4253 +       if (tree->symbols) {
4254 +
4255 +               emit->beginnode(etarget, NULL);
4256 +               emit->string(etarget, "__symbols__", 0);
4257 +               emit->align(etarget, sizeof(cell_t));
4258 +
4259 +               for_each_symbol(tree, sym) {
4260 +
4261 +                       vallen = strlen(sym->node->fullpath);
4262 +
4263 +                       nameoff = stringtable_insert(strbuf, sym->label->label);
4264 +
4265 +                       emit->property(etarget, NULL);
4266 +                       emit->cell(etarget, vallen + 1);
4267 +                       emit->cell(etarget, nameoff);
4268 +
4269 +                       if ((vi->flags & FTF_VARALIGN) && vallen >= 8)
4270 +                               emit->align(etarget, 8);
4271 +
4272 +                       emit->string(etarget, sym->node->fullpath,
4273 +                                       strlen(sym->node->fullpath));
4274 +                       emit->align(etarget, sizeof(cell_t));
4275 +               }
4276 +
4277 +               emit->endnode(etarget, NULL);
4278 +       }
4279 +
4280 +       /* add the fixup nodes */
4281 +       if (tree->fixups) {
4282 +
4283 +               /* emit the external fixups */
4284 +               emit->beginnode(etarget, NULL);
4285 +               emit->string(etarget, "__fixups__", 0);
4286 +               emit->align(etarget, sizeof(cell_t));
4287 +
4288 +               for_each_fixup(tree, f) {
4289 +
4290 +                       namesz = 0;
4291 +                       for_each_fixup_entry(f, fe) {
4292 +                               fullpath = fe->node->fullpath;
4293 +                               if (fullpath[0] == '\0')
4294 +                                       fullpath = "/";
4295 +                               namesz += strlen(fullpath) + 1;
4296 +                               namesz += strlen(fe->prop->name) + 1;
4297 +                               namesz += 32;   /* space for :<number> + '\0' */
4298 +                       }
4299 +
4300 +                       name = xmalloc(namesz);
4301 +
4302 +                       s = name;
4303 +                       for_each_fixup_entry(f, fe) {
4304 +                               fullpath = fe->node->fullpath;
4305 +                               if (fullpath[0] == '\0')
4306 +                                       fullpath = "/";
4307 +                               snprintf(s, name + namesz - s, "%s:%s:%d",
4308 +                                               fullpath,
4309 +                                               fe->prop->name, fe->offset);
4310 +                               s += strlen(s) + 1;
4311 +                       }
4312 +
4313 +                       nameoff = stringtable_insert(strbuf, f->ref);
4314 +                       vallen = s - name - 1;
4315 +
4316 +                       emit->property(etarget, NULL);
4317 +                       emit->cell(etarget, vallen + 1);
4318 +                       emit->cell(etarget, nameoff);
4319 +
4320 +                       if ((vi->flags & FTF_VARALIGN) && vallen >= 8)
4321 +                               emit->align(etarget, 8);
4322 +
4323 +                       emit->string(etarget, name, vallen);
4324 +                       emit->align(etarget, sizeof(cell_t));
4325 +
4326 +                       free(name);
4327 +               }
4328 +
4329 +               emit->endnode(etarget, tree->labels);
4330 +       }
4331 +
4332 +       /* add the local fixup property */
4333 +       if (tree->local_fixups) {
4334 +
4335 +               /* emit the external fixups */
4336 +               emit->beginnode(etarget, NULL);
4337 +               emit->string(etarget, "__local_fixups__", 0);
4338 +               emit->align(etarget, sizeof(cell_t));
4339 +
4340 +               namesz = 0;
4341 +               for_each_local_fixup_entry(tree, fe) {
4342 +                       fullpath = fe->node->fullpath;
4343 +                       if (fullpath[0] == '\0')
4344 +                               fullpath = "/";
4345 +                       namesz += strlen(fullpath) + 1;
4346 +                       namesz += strlen(fe->prop->name) + 1;
4347 +                       namesz += 32;   /* space for :<number> + '\0' */
4348 +               }
4349 +
4350 +               name = xmalloc(namesz);
4351 +
4352 +               s = name;
4353 +               for_each_local_fixup_entry(tree, fe) {
4354 +                       fullpath = fe->node->fullpath;
4355 +                       if (fullpath[0] == '\0')
4356 +                               fullpath = "/";
4357 +                       snprintf(s, name + namesz - s, "%s:%s:%d",
4358 +                                       fullpath, fe->prop->name,
4359 +                                       fe->offset);
4360 +                       s += strlen(s) + 1;
4361 +               }
4362 +
4363 +               nameoff = stringtable_insert(strbuf, "fixup");
4364 +               vallen = s - name - 1;
4365 +
4366 +               emit->property(etarget, NULL);
4367 +               emit->cell(etarget, vallen + 1);
4368 +               emit->cell(etarget, nameoff);
4369 +
4370 +               if ((vi->flags & FTF_VARALIGN) && vallen >= 8)
4371 +                       emit->align(etarget, 8);
4372 +
4373 +               emit->string(etarget, name, vallen);
4374 +               emit->align(etarget, sizeof(cell_t));
4375 +
4376 +               free(name);
4377 +
4378 +               emit->endnode(etarget, tree->labels);
4379 +       }
4380 +
4381 +no_symbols:
4382         emit->endnode(etarget, tree->labels);
4383  }
4384  
4385 --- a/scripts/dtc/version_gen.h
4386 +++ b/scripts/dtc/version_gen.h
4387 @@ -1 +1 @@
4388 -#define DTC_VERSION "DTC 1.4.1-g9d3649bd"
4389 +#define DTC_VERSION "DTC 1.4.1-g9d3649bd-dirty"