1 From 462447ecf49eb6dd6d77f3d21b272dd4fa68bee9 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 082/232] scripts/dtc: Add overlay support
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(-)
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)
24 struct marker *m = prop->val.markers;
25 + struct fixup *f, **fp;
26 + struct fixup_entry *fe, **fep;
29 + int has_phandle_refs;
31 + has_phandle_refs = 0;
32 + for_each_marker_of_type(m, REF_PHANDLE) {
33 + has_phandle_refs = 1;
37 + if (!has_phandle_refs)
40 for_each_marker_of_type(m, REF_PHANDLE) {
41 assert(m->offset + sizeof(cell_t) <= prop->val.len);
43 refnode = get_node_by_ref(dt, m->ref);
45 + if (!refnode && !symbol_fixup_support) {
46 FAIL(c, "Reference to non-existent node or label \"%s\"\n",
52 - phandle = get_node_phandle(dt, refnode);
53 - *((cell_t *)(prop->val.val + m->offset)) = cpu_to_fdt32(phandle);
55 + /* allocate fixup entry */
56 + fe = xmalloc(sizeof(*fe));
60 + fe->offset = m->offset;
63 + /* search for an already existing fixup */
64 + for_each_fixup(dt, f)
65 + if (strcmp(f->ref, m->ref) == 0)
68 + /* no fixup found, add new */
70 + f = xmalloc(sizeof(*f));
75 + /* add it to the tree */
82 + /* and now append fixup entry */
85 + fep = &(*fep)->next;
88 + /* mark the entry as unresolved */
89 + phandle = 0xdeadbeef;
91 + phandle = get_node_phandle(dt, refnode);
93 + /* if it's a plugin, we need to record it */
94 + if (symbol_fixup_support && dt->is_plugin) {
96 + /* allocate a new local fixup entry */
97 + fe = xmalloc(sizeof(*fe));
101 + fe->offset = m->offset;
104 + /* append it to the local fixups */
105 + fep = &dt->local_fixups;
107 + fep = &(*fep)->next;
112 + *((cell_t *)(prop->val.val + m->offset)) =
113 + cpu_to_fdt32(phandle);
116 ERROR(phandle_references, NULL, NULL, fixup_phandle_references, NULL,
117 @@ -652,6 +722,45 @@ static void check_obsolete_chosen_interr
119 TREE_WARNING(obsolete_chosen_interrupt_controller, NULL);
121 +static void check_auto_label_phandles(struct check *c, struct node *dt,
125 + struct symbol *s, **sp;
128 + if (!symbol_fixup_support)
132 + for_each_label(node->labels, l) {
140 + /* force allocation of a phandle for this node */
141 + (void)get_node_phandle(dt, node);
143 + /* add the symbol */
144 + for_each_label(node->labels, l) {
146 + s = xmalloc(sizeof(*s));
151 + /* add it to the symbols list */
154 + sp = &((*sp)->next);
158 +NODE_WARNING(auto_label_phandles, NULL);
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,
167 + &auto_label_phandles,
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
179 + DPRINT("Keyword: /plugin/\n");
184 DPRINT("Keyword: /memreserve/\n");
186 --- a/scripts/dtc/dtc-lexer.lex.c_shipped
187 +++ b/scripts/dtc/dtc-lexer.lex.c_shipped
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
197 @@ -162,12 +162,7 @@ typedef unsigned int flex_uint32_t;
198 typedef struct yy_buffer_state *YY_BUFFER_STATE;
201 -#ifndef YY_TYPEDEF_YY_SIZE_T
202 -#define YY_TYPEDEF_YY_SIZE_T
203 -typedef size_t yy_size_t;
206 -extern yy_size_t yyleng;
209 extern FILE *yyin, *yyout;
211 @@ -176,7 +171,6 @@ extern FILE *yyin, *yyout;
212 #define EOB_ACT_LAST_MATCH 2
214 #define YY_LESS_LINENO(n)
215 - #define YY_LINENO_REWIND_TO(ptr)
217 /* Return all but the first "n" matched characters back to the input stream. */
219 @@ -194,6 +188,11 @@ extern FILE *yyin, *yyout;
221 #define unput(c) yyunput( c, (yytext_ptr) )
223 +#ifndef YY_TYPEDEF_YY_SIZE_T
224 +#define YY_TYPEDEF_YY_SIZE_T
225 +typedef size_t yy_size_t;
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
235 - yy_size_t yy_n_chars;
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
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 */
246 +static int yy_n_chars; /* number of characters read into yy_ch_buf */
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
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 );
258 void *yyalloc (yy_size_t );
259 void *yyrealloc (void *,yy_size_t );
260 @@ -342,7 +341,7 @@ void yyfree (void * );
262 /* Begin user sect3 */
266 #define YY_SKIP_YYWRAP
268 typedef unsigned char YY_CHAR;
269 @@ -373,8 +372,8 @@ static void yy_fatal_error (yyconst char
271 (yy_c_buf_p) = yy_cp;
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. */
280 @@ -382,25 +381,26 @@ struct yy_trans_info
281 flex_int32_t yy_verify;
284 -static yyconst flex_int16_t yy_accept[159] =
285 +static yyconst flex_int16_t yy_accept[166] =
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,
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,
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,
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,
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] =
342 -static yyconst flex_int32_t yy_meta[47] =
343 +static yyconst flex_int32_t yy_meta[48] =
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,
350 + 8, 8, 8, 8, 3, 1, 4
353 -static yyconst flex_int16_t yy_base[173] =
354 +static yyconst flex_int16_t yy_base[180] =
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,
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,
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,
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
396 -static yyconst flex_int16_t yy_def[173] =
397 +static yyconst flex_int16_t yy_def[180] =
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,
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,
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,
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
439 -static yyconst flex_int16_t yy_nxt[438] =
440 +static yyconst flex_int16_t yy_nxt[449] =
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,
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,
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,
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,
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,
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,
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,
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,
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
537 -static yyconst flex_int16_t yy_chk[438] =
538 +static yyconst flex_int16_t yy_chk[449] =
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,
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,
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,
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,
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,
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,
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
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"
638 @@ -704,7 +706,7 @@ FILE *yyget_out (void );
640 void yyset_out (FILE * out_str );
642 -yy_size_t yyget_leng (void );
643 +int yyget_leng (void );
645 char *yyget_text (void );
647 @@ -853,6 +855,10 @@ YY_DECL
648 register char *yy_cp, *yy_bp;
651 +#line 68 "dtc-lexer.l"
653 +#line 861 "dtc-lexer.lex.c"
658 @@ -879,11 +885,6 @@ YY_DECL
659 yy_load_buffer_state( );
663 -#line 68 "dtc-lexer.l"
665 -#line 886 "dtc-lexer.lex.c"
667 while ( 1 ) /* loops until end-of-file is reached */
669 yy_cp = (yy_c_buf_p);
670 @@ -901,7 +902,7 @@ YY_DECL
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] )
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 )
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];
687 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
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);
695 @@ -1007,23 +1008,31 @@ case 5:
697 #line 116 "dtc-lexer.l"
699 + DPRINT("Keyword: /plugin/\n");
705 +#line 121 "dtc-lexer.l"
707 DPRINT("Keyword: /memreserve/\n");
709 return DT_MEMRESERVE;
715 -#line 122 "dtc-lexer.l"
716 +#line 127 "dtc-lexer.l"
718 DPRINT("Keyword: /bits/\n");
726 -#line 128 "dtc-lexer.l"
727 +#line 133 "dtc-lexer.l"
729 DPRINT("Keyword: /delete-property/\n");
730 DPRINT("<PROPNODENAME>\n");
731 @@ -1031,9 +1040,9 @@ YY_RULE_SETUP
738 -#line 135 "dtc-lexer.l"
739 +#line 140 "dtc-lexer.l"
741 DPRINT("Keyword: /delete-node/\n");
742 DPRINT("<PROPNODENAME>\n");
743 @@ -1041,9 +1050,9 @@ YY_RULE_SETUP
750 -#line 142 "dtc-lexer.l"
751 +#line 147 "dtc-lexer.l"
753 DPRINT("Label: %s\n", yytext);
754 yylval.labelref = xstrdup(yytext);
755 @@ -1051,9 +1060,9 @@ YY_RULE_SETUP
762 -#line 149 "dtc-lexer.l"
763 +#line 154 "dtc-lexer.l"
766 DPRINT("Integer Literal: '%s'\n", yytext);
767 @@ -1073,10 +1082,10 @@ YY_RULE_SETUP
772 -/* rule 11 can match eol */
774 +/* rule 12 can match eol */
776 -#line 168 "dtc-lexer.l"
777 +#line 173 "dtc-lexer.l"
780 DPRINT("Character literal: %s\n", yytext);
781 @@ -1098,18 +1107,18 @@ YY_RULE_SETUP
782 return DT_CHAR_LITERAL;
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);
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
811 -#line 202 "dtc-lexer.l"
812 +#line 207 "dtc-lexer.l"
814 yylval.byte = strtol(yytext, NULL, 16);
815 DPRINT("Byte: %02x\n", (int)yylval.byte);
822 -#line 208 "dtc-lexer.l"
823 +#line 213 "dtc-lexer.l"
825 DPRINT("/BYTESTRING\n");
833 -#line 214 "dtc-lexer.l"
834 +#line 219 "dtc-lexer.l"
836 DPRINT("PropNodeName: %s\n", yytext);
837 yylval.propnodename = xstrdup((yytext[0] == '\\') ?
838 @@ -1146,75 +1155,75 @@ YY_RULE_SETUP
839 return DT_PROPNODENAME;
845 -#line 222 "dtc-lexer.l"
846 +#line 227 "dtc-lexer.l"
848 DPRINT("Binary Include\n");
853 -/* rule 18 can match eol */
855 -#line 227 "dtc-lexer.l"
856 -/* eat whitespace */
859 /* rule 19 can match eol */
861 -#line 228 "dtc-lexer.l"
862 -/* eat C-style comments */
863 +#line 232 "dtc-lexer.l"
864 +/* eat whitespace */
867 /* rule 20 can match eol */
869 -#line 229 "dtc-lexer.l"
870 -/* eat C++-style comments */
871 +#line 233 "dtc-lexer.l"
872 +/* eat C-style comments */
875 +/* rule 21 can match eol */
877 -#line 231 "dtc-lexer.l"
878 -{ return DT_LSHIFT; };
879 +#line 234 "dtc-lexer.l"
880 +/* eat C++-style comments */
884 -#line 232 "dtc-lexer.l"
885 -{ return DT_RSHIFT; };
886 +#line 236 "dtc-lexer.l"
887 +{ return DT_LSHIFT; };
891 -#line 233 "dtc-lexer.l"
893 +#line 237 "dtc-lexer.l"
894 +{ return DT_RSHIFT; };
898 -#line 234 "dtc-lexer.l"
900 +#line 238 "dtc-lexer.l"
905 -#line 235 "dtc-lexer.l"
907 +#line 239 "dtc-lexer.l"
912 -#line 236 "dtc-lexer.l"
914 +#line 240 "dtc-lexer.l"
919 -#line 237 "dtc-lexer.l"
921 +#line 241 "dtc-lexer.l"
926 -#line 238 "dtc-lexer.l"
928 +#line 242 "dtc-lexer.l"
933 -#line 240 "dtc-lexer.l"
934 +#line 243 "dtc-lexer.l"
939 +#line 245 "dtc-lexer.l"
941 DPRINT("Char: %c (\\x%02x)\n", yytext[0],
942 (unsigned)yytext[0]);
943 @@ -1230,12 +1239,12 @@ YY_RULE_SETUP
950 -#line 255 "dtc-lexer.l"
951 +#line 260 "dtc-lexer.l"
954 -#line 1239 "dtc-lexer.lex.c"
955 +#line 1248 "dtc-lexer.lex.c"
957 case YY_END_OF_BUFFER:
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 */
966 /* yy_get_next_buffer - try to read in a new buffer
967 @@ -1421,21 +1429,21 @@ static int yy_get_next_buffer (void)
971 - yy_size_t num_to_read =
973 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
975 while ( num_to_read <= 0 )
976 { /* Not enough room in the buffer - grow it. */
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;
982 int yy_c_buf_p_offset =
983 (int) ((yy_c_buf_p) - b->yy_ch_buf);
985 if ( b->yy_is_our_buffer )
987 - yy_size_t new_size = b->yy_buf_size * 2;
988 + int new_size = b->yy_buf_size * 2;
991 b->yy_buf_size += b->yy_buf_size / 8;
992 @@ -1466,7 +1474,7 @@ static int yy_get_next_buffer (void)
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 );
999 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
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 )
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];
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 )
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];
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);
1022 - return yy_is_jam ? 0 : yy_current_state;
1023 + return yy_is_jam ? 0 : yy_current_state;
1027 @@ -1589,7 +1597,7 @@ static int yy_get_next_buffer (void)
1030 { /* need more input */
1031 - yy_size_t offset = (yy_c_buf_p) - (yytext_ptr);
1032 + int offset = (yy_c_buf_p) - (yytext_ptr);
1035 switch ( yy_get_next_buffer( ) )
1036 @@ -1863,7 +1871,7 @@ void yypop_buffer_state (void)
1038 static void yyensure_buffer_stack (void)
1040 - yy_size_t num_to_alloc;
1043 if (!(yy_buffer_stack)) {
1045 @@ -1960,12 +1968,12 @@ YY_BUFFER_STATE yy_scan_string (yyconst
1047 * @return the newly allocated buffer state object.
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 )
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.
1064 -yy_size_t yyget_leng (void)
1065 +int yyget_leng (void)
1069 @@ -2195,7 +2203,7 @@ void yyfree (void * ptr )
1071 #define YYTABLES_NAME "yytables"
1073 -#line 254 "dtc-lexer.l"
1074 +#line 260 "dtc-lexer.l"
1078 --- a/scripts/dtc/dtc-parser.tab.c_shipped
1079 +++ b/scripts/dtc/dtc-parser.tab.c_shipped
1081 -/* A Bison parser, made by GNU Bison 3.0.2. */
1082 +/* A Bison parser, made by GNU Bison 2.5. */
1084 /* Bison implementation for Yacc-like parsers in C
1086 - Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc.
1089 + Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc.
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.
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.
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/>. */
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.
1112 This special exception was added by the Free Software Foundation in
1113 version 2.2 of Bison. */
1118 /* Bison version. */
1119 -#define YYBISON_VERSION "3.0.2"
1120 +#define YYBISON_VERSION "2.5"
1122 /* Skeleton name. */
1123 #define YYSKELETON_NAME "yacc.c"
1128 +/* Using locations. */
1129 +#define YYLSP_NEEDED 1
1133 /* Copy the first part of user declarations. */
1134 -#line 20 "dtc-parser.y" /* yacc.c:339 */
1136 +/* Line 268 of yacc.c */
1137 +#line 20 "dtc-parser.y"
1140 +#include <inttypes.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;
1148 -#line 84 "dtc-parser.tab.c" /* yacc.c:339 */
1150 -# ifndef YY_NULLPTR
1151 -# if defined __cplusplus && 201103L <= __cplusplus
1152 -# define YY_NULLPTR nullptr
1154 -# define YY_NULLPTR 0
1157 +/* Line 268 of yacc.c */
1158 +#line 91 "dtc-parser.tab.c"
1160 +/* Enabling traces. */
1165 /* Enabling verbose error messages. */
1166 #ifdef YYERROR_VERBOSE
1167 @@ -98,53 +102,51 @@ extern bool treesource_error;
1168 # define YYERROR_VERBOSE 0
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. */
1180 -extern int yydebug;
1181 +/* Enabling the token table. */
1182 +#ifndef YYTOKEN_TABLE
1183 +# define YYTOKEN_TABLE 0
1190 # define YYTOKENTYPE
1194 - DT_MEMRESERVE = 259,
1204 - DT_DEL_PROP = 269,
1205 - DT_DEL_NODE = 270,
1206 - DT_PROPNODENAME = 271,
1208 - DT_CHAR_LITERAL = 273,
1215 + /* Put the tokens into the symbol table, so that GDB and other debuggers
1216 + know about them. */
1217 + enum yytokentype {
1220 + DT_MEMRESERVE = 260,
1230 + DT_DEL_PROP = 270,
1231 + DT_DEL_NODE = 271,
1232 + DT_PROPNODENAME = 272,
1234 + DT_CHAR_LITERAL = 274,
1246 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
1247 -typedef union YYSTYPE YYSTYPE;
1249 +typedef union YYSTYPE
1251 -#line 38 "dtc-parser.y" /* yacc.c:355 */
1253 +/* Line 293 of yacc.c */
1254 +#line 39 "dtc-parser.y"
1258 @@ -162,37 +164,37 @@ union YYSTYPE
1259 struct node *nodelist;
1260 struct reserve_info *re;
1264 -#line 167 "dtc-parser.tab.c" /* yacc.c:355 */
1268 +/* Line 293 of yacc.c */
1269 +#line 173 "dtc-parser.tab.c"
1271 # define YYSTYPE_IS_TRIVIAL 1
1272 +# define yystype YYSTYPE /* obsolescent; will be withdrawn */
1273 # define YYSTYPE_IS_DECLARED 1
1276 -/* Location type. */
1277 #if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
1278 -typedef struct YYLTYPE YYLTYPE;
1280 +typedef struct YYLTYPE
1288 +# define yyltype YYLTYPE /* obsolescent; will be withdrawn */
1289 # define YYLTYPE_IS_DECLARED 1
1290 # define YYLTYPE_IS_TRIVIAL 1
1294 -extern YYSTYPE yylval;
1295 -extern YYLTYPE yylloc;
1296 -int yyparse (void);
1298 -#endif /* !YY_YY_DTC_PARSER_TAB_H_INCLUDED */
1300 /* Copy the second part of user declarations. */
1302 -#line 196 "dtc-parser.tab.c" /* yacc.c:358 */
1304 +/* Line 343 of yacc.c */
1305 +#line 198 "dtc-parser.tab.c"
1309 @@ -206,8 +208,11 @@ typedef unsigned char yytype_uint8;
1312 typedef YYTYPE_INT8 yytype_int8;
1314 +#elif (defined __STDC__ || defined __C99__FUNC__ \
1315 + || defined __cplusplus || defined _MSC_VER)
1316 typedef signed char yytype_int8;
1318 +typedef short int yytype_int8;
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
1332 @@ -241,68 +247,39 @@ typedef short int yytype_int16;
1333 # if defined YYENABLE_NLS && YYENABLE_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)
1341 -# define YY_(Msgid) Msgid
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)
1351 -# define YY_ATTRIBUTE(Spec) /* empty */
1355 -#ifndef YY_ATTRIBUTE_PURE
1356 -# define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__))
1359 -#ifndef YY_ATTRIBUTE_UNUSED
1360 -# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
1363 -#if !defined _Noreturn \
1364 - && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112)
1365 -# if defined _MSC_VER && 1200 <= _MSC_VER
1366 -# define _Noreturn __declspec (noreturn)
1368 -# define _Noreturn YY_ATTRIBUTE ((__noreturn__))
1369 +# define YY_(msgid) msgid
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))
1378 -# define YYUSE(E) /* empty */
1379 +# define YYUSE(e) /* empty */
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. */
1392 +# define YYID(n) (n)
1394 -# define YY_INITIAL_VALUE(Value) Value
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)
1408 -#ifndef YY_INITIAL_VALUE
1409 -# define YY_INITIAL_VALUE(Value) /* Nothing. */
1416 #if ! defined yyoverflow || YYERROR_VERBOSE
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
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
1431 @@ -332,8 +309,8 @@ typedef short int yytype_int16;
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;
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;
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 */
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 */
1469 @@ -373,8 +352,8 @@ void free (void *); /* INFRINGES ON USER
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)))
1478 /* A type that is properly aligned for any stack member. */
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
1484 -# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
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); \
1494 +# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
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); \
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
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)))
1518 -# define YYCOPY(Dst, Src, Count) \
1522 - for (yyi = 0; yyi < (Count); yyi++) \
1523 - (Dst)[yyi] = (Src)[yyi]; \
1526 +# define YYCOPY(To, From, Count) \
1530 + for (yyi = 0; yyi < (Count); yyi++) \
1531 + (To)[yyi] = (From)[yyi]; \
1536 #endif /* !YYCOPY_NEEDED */
1537 @@ -439,39 +418,37 @@ union yyalloc
1540 /* YYNTOKENS -- Number of terminals. */
1541 -#define YYNTOKENS 47
1542 +#define YYNTOKENS 48
1543 /* YYNNTS -- Number of nonterminals. */
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
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
1561 -#define YYTRANSLATE(YYX) \
1562 +#define YYTRANSLATE(YYX) \
1563 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
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[] =
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
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
1604 +static const yytype_uint16 yyprhs[] =
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,
1617 +/* YYRHS -- A `-1'-separated list of the rules' RHS. */
1618 +static const yytype_int8 yyrhs[] =
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,
1650 +/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
1651 static const yytype_uint16 yyrline[] =
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,
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,
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[] =
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
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[] =
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
1727 -#define YYPACT_NINF -81
1729 -#define yypact_value_is_default(Yystate) \
1730 - (!!((Yystate) == (-81)))
1732 -#define YYTABLE_NINF -1
1734 -#define yytable_value_is_error(Yytable_value) \
1737 - /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
1739 -static const yytype_int8 yypact[] =
1740 +/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
1741 +static const yytype_uint8 yyr1[] =
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,
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,
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[] =
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,
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,
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[] =
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
1829 - /* YYDEFGOTO[NTERM-NUM]. */
1830 +/* YYDEFGOTO[NTERM-NUM]. */
1831 static const yytype_int16 yydefgoto[] =
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
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
1847 +#define YYPACT_NINF -84
1848 +static const yytype_int8 yypact[] =
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
1881 -static const yytype_int16 yycheck[] =
1882 +/* YYPGOTO[NTERM-NUM]. */
1883 +static const yytype_int8 yypgoto[] =
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
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[] =
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,
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
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))
1949 +#define yytable_value_is_error(yytable_value) \
1952 +static const yytype_int16 yycheck[] =
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,
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
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[] =
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,
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
2012 -#define yyerrok (yyerrstatus = 0)
2013 -#define yyclearin (yychar = YYEMPTY)
2014 -#define YYEMPTY (-2)
2017 -#define YYACCEPT goto yyacceptlab
2018 -#define YYABORT goto yyabortlab
2019 -#define YYERROR goto yyerrorlab
2021 +#define yyerrok (yyerrstatus = 0)
2022 +#define yyclearin (yychar = YYEMPTY)
2023 +#define YYEMPTY (-2)
2026 +#define YYACCEPT goto yyacceptlab
2027 +#define YYABORT goto yyabortlab
2028 +#define YYERROR goto yyerrorlab
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
2038 +#define YYFAIL goto yyerrlab
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. */
2046 #define YYRECOVERING() (!!yyerrstatus)
2048 -#define YYBACKUP(Token, Value) \
2050 - if (yychar == YYEMPTY) \
2052 - yychar = (Token); \
2053 - yylval = (Value); \
2054 - YYPOPSTACK (yylen); \
2055 - yystate = *yyssp; \
2060 +#define YYBACKUP(Token, Value) \
2062 + if (yychar == YYEMPTY && yylen == 1) \
2064 + yychar = (Token); \
2065 + yylval = (Value); \
2071 yyerror (YY_("syntax error: cannot back up")); \
2076 -/* Error token number */
2078 -#define YYERRCODE 256
2085 +#define YYERRCODE 256
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). */
2092 +#define YYRHSLOC(Rhs, K) ((Rhs)[K])
2093 #ifndef YYLLOC_DEFAULT
2094 -# define YYLLOC_DEFAULT(Current, Rhs, N) \
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; \
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; \
2111 +# define YYLLOC_DEFAULT(Current, Rhs, N) \
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; \
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; \
2130 -#define YYRHSLOC(Rhs, K) ((Rhs)[K])
2133 -/* Enable debugging if requested. */
2137 -# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
2138 -# define YYFPRINTF fprintf
2141 -# define YYDPRINTF(Args) \
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 {
2152 #ifndef YY_LOCATION_PRINT
2153 # if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
2155 -/* Print *YYLOCP on YYO. Private, do not rely on its existence. */
2157 -YY_ATTRIBUTE_UNUSED
2159 -yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp)
2162 - int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0;
2163 - if (0 <= yylocp->first_line)
2165 - res += YYFPRINTF (yyo, "%d", yylocp->first_line);
2166 - if (0 <= yylocp->first_column)
2167 - res += YYFPRINTF (yyo, ".%d", yylocp->first_column);
2169 - if (0 <= yylocp->last_line)
2171 - if (yylocp->first_line < yylocp->last_line)
2173 - res += YYFPRINTF (yyo, "-%d", yylocp->last_line);
2175 - res += YYFPRINTF (yyo, ".%d", end_col);
2177 - else if (0 <= end_col && yylocp->first_column < end_col)
2178 - res += YYFPRINTF (yyo, "-%d", end_col);
2183 -# define YY_LOCATION_PRINT(File, Loc) \
2184 - yy_location_print_ (File, &(Loc))
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)
2191 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
2196 -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
2200 - YYFPRINTF (stderr, "%s ", Title); \
2201 - yy_symbol_print (stderr, \
2202 - Type, Value, Location); \
2203 - YYFPRINTF (stderr, "\n"); \
2206 +/* YYLEX -- calling `yylex' with the right arguments. */
2209 +# define YYLEX yylex (YYLEX_PARAM)
2211 +# define YYLEX yylex ()
2214 -/*----------------------------------------.
2215 -| Print this symbol's value on YYOUTPUT. |
2216 -`----------------------------------------*/
2217 +/* Enable debugging if requested. */
2221 +# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
2222 +# define YYFPRINTF fprintf
2225 +# define YYDPRINTF(Args) \
2231 +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
2235 + YYFPRINTF (stderr, "%s ", Title); \
2236 + yy_symbol_print (stderr, \
2237 + Type, Value, Location); \
2238 + YYFPRINTF (stderr, "\n"); \
2243 +/*--------------------------------.
2244 +| Print this symbol on YYOUTPUT. |
2245 +`--------------------------------*/
2248 +#if (defined __STDC__ || defined __C99__FUNC__ \
2249 + || defined __cplusplus || defined _MSC_VER)
2251 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp)
2254 +yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp)
2257 + YYSTYPE const * const yyvaluep;
2258 + YYLTYPE const * const yylocationp;
2261 - FILE *yyo = yyoutput;
2263 - YYUSE (yylocationp);
2266 + YYUSE (yylocationp);
2268 if (yytype < YYNTOKENS)
2269 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
2282 @@ -853,11 +882,23 @@ yy_symbol_value_print (FILE *yyoutput, i
2283 | Print this symbol on YYOUTPUT. |
2284 `--------------------------------*/
2286 +#if (defined __STDC__ || defined __C99__FUNC__ \
2287 + || defined __cplusplus || defined _MSC_VER)
2289 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp)
2292 +yy_symbol_print (yyoutput, yytype, yyvaluep, yylocationp)
2295 + YYSTYPE const * const yyvaluep;
2296 + YYLTYPE const * const yylocationp;
2299 - YYFPRINTF (yyoutput, "%s %s (",
2300 - yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
2301 + if (yytype < YYNTOKENS)
2302 + YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
2304 + YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
2306 YY_LOCATION_PRINT (yyoutput, *yylocationp);
2307 YYFPRINTF (yyoutput, ": ");
2308 @@ -870,8 +911,16 @@ yy_symbol_print (FILE *yyoutput, int yyt
2310 `------------------------------------------------------------------*/
2312 +#if (defined __STDC__ || defined __C99__FUNC__ \
2313 + || defined __cplusplus || defined _MSC_VER)
2315 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
2318 +yy_stack_print (yybottom, yytop)
2319 + yytype_int16 *yybottom;
2320 + yytype_int16 *yytop;
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");
2329 -# define YY_STACK_PRINT(Bottom, Top) \
2332 - yy_stack_print ((Bottom), (Top)); \
2334 +# define YY_STACK_PRINT(Bottom, Top) \
2337 + yy_stack_print ((Bottom), (Top)); \
2341 /*------------------------------------------------.
2342 | Report that the YYRULE is going to be reduced. |
2343 `------------------------------------------------*/
2345 +#if (defined __STDC__ || defined __C99__FUNC__ \
2346 + || defined __cplusplus || defined _MSC_VER)
2348 +yy_reduce_print (YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule)
2351 -yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule)
2352 +yy_reduce_print (yyvsp, yylsp, yyrule)
2358 - unsigned long int yylno = yyrline[yyrule];
2359 int yynrhs = yyr2[yyrule];
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++)
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");
2380 -# define YY_REDUCE_PRINT(Rule) \
2383 - yy_reduce_print (yyssp, yyvsp, yylsp, Rule); \
2385 +# define YY_REDUCE_PRINT(Rule) \
2388 + yy_reduce_print (yyvsp, yylsp, Rule); \
2391 /* Nonzero means print parse trace. It is left uninitialized so that
2392 multiple parsers can coexist. */
2393 @@ -931,7 +988,7 @@ int yydebug;
2396 /* YYINITDEPTH -- initial size of the parser's stacks. */
2397 -#ifndef YYINITDEPTH
2398 +#ifndef YYINITDEPTH
2399 # define YYINITDEPTH 200
2402 @@ -954,8 +1011,15 @@ int yydebug;
2403 # define yystrlen strlen
2405 /* Return the length of YYSTR. */
2406 +#if (defined __STDC__ || defined __C99__FUNC__ \
2407 + || defined __cplusplus || defined _MSC_VER)
2409 yystrlen (const char *yystr)
2413 + const char *yystr;
2417 for (yylen = 0; yystr[yylen]; yylen++)
2418 @@ -971,8 +1035,16 @@ yystrlen (const char *yystr)
2420 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
2422 +#if (defined __STDC__ || defined __C99__FUNC__ \
2423 + || defined __cplusplus || defined _MSC_VER)
2425 yystpcpy (char *yydest, const char *yysrc)
2428 +yystpcpy (yydest, yysrc)
2430 + const char *yysrc;
2434 const char *yys = yysrc;
2435 @@ -1002,27 +1074,27 @@ yytnamerr (char *yyres, const char *yyst
2436 char const *yyp = yystr;
2443 - goto do_not_strip_quotes;
2446 - if (*++yyp != '\\')
2447 - goto do_not_strip_quotes;
2448 - /* Fall through. */
2451 - yyres[yyn] = *yyp;
2457 - yyres[yyn] = '\0';
2464 + goto do_not_strip_quotes;
2467 + if (*++yyp != '\\')
2468 + goto do_not_strip_quotes;
2469 + /* Fall through. */
2472 + yyres[yyn] = *yyp;
2478 + yyres[yyn] = '\0';
2481 do_not_strip_quotes: ;
2484 @@ -1045,11 +1117,12 @@ static int
2485 yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
2486 yytype_int16 *yyssp, int yytoken)
2488 - YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]);
2489 + YYSIZE_T yysize0 = yytnamerr (0, yytname[yytoken]);
2490 YYSIZE_T yysize = yysize0;
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
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
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
2513 yyarg[yycount++] = yytname[yyx];
2515 - YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
2516 - if (! (yysize <= yysize1
2517 - && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
2521 + yysize1 = yysize + yytnamerr (0, yytname[yyx]);
2522 + if (! (yysize <= yysize1
2523 + && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
2529 @@ -1131,12 +1206,10 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, c
2534 - YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
2535 - if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
2539 + yysize1 = yysize + yystrlen (yyformat);
2540 + if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
2544 if (*yymsg_alloc < yysize)
2546 @@ -1173,21 +1246,50 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, c
2547 | Release the memory associated to this symbol. |
2548 `-----------------------------------------------*/
2551 +#if (defined __STDC__ || defined __C99__FUNC__ \
2552 + || defined __cplusplus || defined _MSC_VER)
2554 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp)
2557 +yydestruct (yymsg, yytype, yyvaluep, yylocationp)
2558 + const char *yymsg;
2560 + YYSTYPE *yyvaluep;
2561 + YYLTYPE *yylocationp;
2565 YYUSE (yylocationp);
2569 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
2571 - YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
2573 - YY_IGNORE_MAYBE_UNINITIALIZED_END
2583 +/* Prevent warnings from -Wmissing-prototypes. */
2584 +#ifdef YYPARSE_PARAM
2585 +#if defined __STDC__ || defined __cplusplus
2586 +int yyparse (void *YYPARSE_PARAM);
2590 +#else /* ! YYPARSE_PARAM */
2591 +#if defined __STDC__ || defined __cplusplus
2592 +int yyparse (void);
2596 +#endif /* ! YYPARSE_PARAM */
2599 /* The lookahead symbol. */
2600 @@ -1195,12 +1297,10 @@ int yychar;
2602 /* The semantic value of the lookahead symbol. */
2605 /* Location data for the lookahead symbol. */
2607 -# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
2613 /* Number of syntax errors so far. */
2616 @@ -1209,19 +1309,38 @@ int yynerrs;
2620 +#ifdef YYPARSE_PARAM
2621 +#if (defined __STDC__ || defined __C99__FUNC__ \
2622 + || defined __cplusplus || defined _MSC_VER)
2624 +yyparse (void *YYPARSE_PARAM)
2627 +yyparse (YYPARSE_PARAM)
2628 + void *YYPARSE_PARAM;
2630 +#else /* ! YYPARSE_PARAM */
2631 +#if (defined __STDC__ || defined __C99__FUNC__ \
2632 + || defined __cplusplus || defined _MSC_VER)
2643 /* Number of tokens to shift before error messages enabled. */
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.
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. */
2658 /* The state stack. */
2659 @@ -1247,7 +1366,7 @@ yyparse (void)
2662 /* Lookahead token as an internal (translated) token number. */
2665 /* The variables used to return semantic value and location from the
2668 @@ -1266,9 +1385,10 @@ yyparse (void)
2669 Keep to zero when no symbol should be popped. */
2672 - yyssp = yyss = yyssa;
2673 - yyvsp = yyvs = yyvsa;
2674 - yylsp = yyls = yylsa;
2679 yystacksize = YYINITDEPTH;
2681 YYDPRINTF ((stderr, "Starting parse\n"));
2682 @@ -1277,7 +1397,21 @@ yyparse (void)
2685 yychar = YYEMPTY; /* Cause a token to be read. */
2686 - yylsp[0] = yylloc;
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. */
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;
2704 /*------------------------------------------------------------.
2705 @@ -1298,26 +1432,26 @@ yyparse (void)
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
2712 - YYSTYPE *yyvs1 = yyvs;
2713 - yytype_int16 *yyss1 = yyss;
2714 - YYLTYPE *yyls1 = yyls;
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),
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
2732 + YYSTYPE *yyvs1 = yyvs;
2733 + yytype_int16 *yyss1 = yyss;
2734 + YYLTYPE *yyls1 = yyls;
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),
2750 #else /* no yyoverflow */
2751 # ifndef YYSTACK_RELOCATE
2752 @@ -1325,23 +1459,23 @@ yyparse (void)
2754 /* Extend the stack our own way. */
2755 if (YYMAXDEPTH <= yystacksize)
2756 - goto yyexhaustedlab;
2757 + goto yyexhaustedlab;
2759 if (YYMAXDEPTH < yystacksize)
2760 - yystacksize = YYMAXDEPTH;
2761 + yystacksize = YYMAXDEPTH;
2764 - yytype_int16 *yyss1 = yyss;
2765 - union yyalloc *yyptr =
2766 - (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
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));
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);
2787 #endif /* no yyoverflow */
2788 @@ -1351,10 +1485,10 @@ yyparse (void)
2789 yylsp = yyls + yysize - 1;
2791 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
2792 - (unsigned long int) yystacksize));
2793 + (unsigned long int) yystacksize));
2795 if (yyss + yystacksize - 1 <= yyssp)
2800 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
2801 @@ -1383,7 +1517,7 @@ yybackup:
2802 if (yychar == YYEMPTY)
2804 YYDPRINTF ((stderr, "Reading a token: "));
2805 - yychar = yylex ();
2809 if (yychar <= YYEOF)
2810 @@ -1423,9 +1557,7 @@ yybackup:
2814 - YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
2816 - YY_IGNORE_MAYBE_UNINITIALIZED_END
2820 @@ -1448,7 +1580,7 @@ yyreduce:
2823 /* If YYLEN is nonzero, implement the default value of the action:
2827 Otherwise, the following line sets YYVAL to garbage.
2828 This behavior is undocumented and Bison
2829 @@ -1463,273 +1595,322 @@ yyreduce:
2833 -#line 105 "dtc-parser.y" /* yacc.c:1646 */
2835 +/* Line 1806 of yacc.c */
2836 +#line 109 "dtc-parser.y"
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)));
2845 -#line 1472 "dtc-parser.tab.c" /* yacc.c:1646 */
2849 -#line 113 "dtc-parser.y" /* yacc.c:1646 */
2851 +/* Line 1806 of yacc.c */
2852 +#line 119 "dtc-parser.y"
2854 - (yyval.re) = NULL;
2855 + (yyval.is_plugin) = 0;
2857 -#line 1480 "dtc-parser.tab.c" /* yacc.c:1646 */
2861 -#line 117 "dtc-parser.y" /* yacc.c:1646 */
2863 +/* Line 1806 of yacc.c */
2864 +#line 123 "dtc-parser.y"
2866 - (yyval.re) = chain_reserve_entry((yyvsp[-1].re), (yyvsp[0].re));
2867 + (yyval.is_plugin) = 1;
2869 -#line 1488 "dtc-parser.tab.c" /* yacc.c:1646 */
2873 -#line 124 "dtc-parser.y" /* yacc.c:1646 */
2875 +/* Line 1806 of yacc.c */
2876 +#line 130 "dtc-parser.y"
2878 - (yyval.re) = build_reserve_entry((yyvsp[-2].integer), (yyvsp[-1].integer));
2879 + (yyval.re) = NULL;
2881 -#line 1496 "dtc-parser.tab.c" /* yacc.c:1646 */
2885 -#line 128 "dtc-parser.y" /* yacc.c:1646 */
2887 +/* Line 1806 of yacc.c */
2888 +#line 134 "dtc-parser.y"
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));
2894 -#line 1505 "dtc-parser.tab.c" /* yacc.c:1646 */
2898 -#line 136 "dtc-parser.y" /* yacc.c:1646 */
2900 +/* Line 1806 of yacc.c */
2901 +#line 141 "dtc-parser.y"
2903 - (yyval.node) = name_node((yyvsp[0].node), "");
2904 + (yyval.re) = build_reserve_entry((yyvsp[(2) - (4)].integer), (yyvsp[(3) - (4)].integer));
2906 -#line 1513 "dtc-parser.tab.c" /* yacc.c:1646 */
2910 -#line 140 "dtc-parser.y" /* yacc.c:1646 */
2912 +/* Line 1806 of yacc.c */
2913 +#line 145 "dtc-parser.y"
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);
2919 -#line 1521 "dtc-parser.tab.c" /* yacc.c:1646 */
2923 -#line 145 "dtc-parser.y" /* yacc.c:1646 */
2925 - struct node *target = get_node_by_ref((yyvsp[-3].node), (yyvsp[-1].labelref));
2927 - add_label(&target->labels, (yyvsp[-2].labelref));
2929 - merge_nodes(target, (yyvsp[0].node));
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"
2936 + (yyval.node) = name_node((yyvsp[(2) - (2)].node), "");
2938 -#line 1536 "dtc-parser.tab.c" /* yacc.c:1646 */
2942 -#line 156 "dtc-parser.y" /* yacc.c:1646 */
2944 - struct node *target = get_node_by_ref((yyvsp[-2].node), (yyvsp[-1].labelref));
2947 - merge_nodes(target, (yyvsp[0].node));
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"
2954 + (yyval.node) = merge_nodes((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
2956 -#line 1550 "dtc-parser.tab.c" /* yacc.c:1646 */
2960 -#line 166 "dtc-parser.y" /* yacc.c:1646 */
2962 +/* Line 1806 of yacc.c */
2963 +#line 162 "dtc-parser.y"
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));
2968 + add_label(&target->labels, (yyvsp[(2) - (4)].labelref));
2970 - delete_node(target);
2971 + merge_nodes(target, (yyvsp[(4) - (4)].node));
2973 - ERROR(&(yylsp[-1]), "Label or path %s not found", (yyvsp[-1].labelref));
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);
2980 -#line 1566 "dtc-parser.tab.c" /* yacc.c:1646 */
2984 -#line 181 "dtc-parser.y" /* yacc.c:1646 */
2986 +/* Line 1806 of yacc.c */
2987 +#line 173 "dtc-parser.y"
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));
2993 + merge_nodes(target, (yyvsp[(3) - (3)].node));
2995 + ERROR(&(yylsp[(2) - (3)]), "Label or path %s not found", (yyvsp[(2) - (3)].labelref));
2996 + (yyval.node) = (yyvsp[(1) - (3)].node);
2998 -#line 1574 "dtc-parser.tab.c" /* yacc.c:1646 */
3002 -#line 188 "dtc-parser.y" /* yacc.c:1646 */
3004 +/* Line 1806 of yacc.c */
3005 +#line 183 "dtc-parser.y"
3007 - (yyval.proplist) = NULL;
3008 + struct node *target = get_node_by_ref((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].labelref));
3011 + delete_node(target);
3013 + ERROR(&(yylsp[(3) - (4)]), "Label or path %s not found", (yyvsp[(3) - (4)].labelref));
3016 + (yyval.node) = (yyvsp[(1) - (4)].node);
3018 -#line 1582 "dtc-parser.tab.c" /* yacc.c:1646 */
3022 -#line 192 "dtc-parser.y" /* yacc.c:1646 */
3024 +/* Line 1806 of yacc.c */
3025 +#line 198 "dtc-parser.y"
3027 - (yyval.proplist) = chain_property((yyvsp[0].prop), (yyvsp[-1].proplist));
3028 + (yyval.node) = build_node((yyvsp[(2) - (5)].proplist), (yyvsp[(3) - (5)].nodelist));
3030 -#line 1590 "dtc-parser.tab.c" /* yacc.c:1646 */
3034 -#line 199 "dtc-parser.y" /* yacc.c:1646 */
3036 +/* Line 1806 of yacc.c */
3037 +#line 205 "dtc-parser.y"
3039 - (yyval.prop) = build_property((yyvsp[-3].propnodename), (yyvsp[-1].data));
3040 + (yyval.proplist) = NULL;
3042 -#line 1598 "dtc-parser.tab.c" /* yacc.c:1646 */
3046 -#line 203 "dtc-parser.y" /* yacc.c:1646 */
3048 +/* Line 1806 of yacc.c */
3049 +#line 209 "dtc-parser.y"
3051 - (yyval.prop) = build_property((yyvsp[-1].propnodename), empty_data);
3052 + (yyval.proplist) = chain_property((yyvsp[(2) - (2)].prop), (yyvsp[(1) - (2)].proplist));
3054 -#line 1606 "dtc-parser.tab.c" /* yacc.c:1646 */
3058 -#line 207 "dtc-parser.y" /* yacc.c:1646 */
3060 +/* Line 1806 of yacc.c */
3061 +#line 216 "dtc-parser.y"
3063 - (yyval.prop) = build_property_delete((yyvsp[-1].propnodename));
3064 + (yyval.prop) = build_property((yyvsp[(1) - (4)].propnodename), (yyvsp[(3) - (4)].data));
3066 -#line 1614 "dtc-parser.tab.c" /* yacc.c:1646 */
3070 -#line 211 "dtc-parser.y" /* yacc.c:1646 */
3072 +/* Line 1806 of yacc.c */
3073 +#line 220 "dtc-parser.y"
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);
3079 -#line 1623 "dtc-parser.tab.c" /* yacc.c:1646 */
3083 -#line 219 "dtc-parser.y" /* yacc.c:1646 */
3085 +/* Line 1806 of yacc.c */
3086 +#line 224 "dtc-parser.y"
3088 - (yyval.data) = data_merge((yyvsp[-1].data), (yyvsp[0].data));
3089 + (yyval.prop) = build_property_delete((yyvsp[(2) - (3)].propnodename));
3091 -#line 1631 "dtc-parser.tab.c" /* yacc.c:1646 */
3095 -#line 223 "dtc-parser.y" /* yacc.c:1646 */
3097 +/* Line 1806 of yacc.c */
3098 +#line 228 "dtc-parser.y"
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);
3104 -#line 1639 "dtc-parser.tab.c" /* yacc.c:1646 */
3108 -#line 227 "dtc-parser.y" /* yacc.c:1646 */
3110 +/* Line 1806 of yacc.c */
3111 +#line 236 "dtc-parser.y"
3113 - (yyval.data) = data_merge((yyvsp[-3].data), (yyvsp[-1].data));
3114 + (yyval.data) = data_merge((yyvsp[(1) - (2)].data), (yyvsp[(2) - (2)].data));
3116 -#line 1647 "dtc-parser.tab.c" /* yacc.c:1646 */
3120 -#line 231 "dtc-parser.y" /* yacc.c:1646 */
3122 +/* Line 1806 of yacc.c */
3123 +#line 240 "dtc-parser.y"
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);
3128 -#line 1655 "dtc-parser.tab.c" /* yacc.c:1646 */
3132 -#line 235 "dtc-parser.y" /* yacc.c:1646 */
3134 +/* Line 1806 of yacc.c */
3135 +#line 244 "dtc-parser.y"
3137 + (yyval.data) = data_merge((yyvsp[(1) - (4)].data), (yyvsp[(3) - (4)].data));
3143 +/* Line 1806 of yacc.c */
3144 +#line 248 "dtc-parser.y"
3146 + (yyval.data) = data_add_marker((yyvsp[(1) - (2)].data), REF_PATH, (yyvsp[(2) - (2)].labelref));
3152 +/* Line 1806 of yacc.c */
3153 +#line 252 "dtc-parser.y"
3155 - FILE *f = srcfile_relative_open((yyvsp[-5].data).val, NULL);
3156 + FILE *f = srcfile_relative_open((yyvsp[(4) - (9)].data).val, NULL);
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,
3168 - d = data_copy_file(f, (yyvsp[-1].integer));
3169 + d = data_copy_file(f, (yyvsp[(8) - (9)].integer));
3171 - (yyval.data) = data_merge((yyvsp[-8].data), d);
3172 + (yyval.data) = data_merge((yyvsp[(1) - (9)].data), d);
3175 -#line 1675 "dtc-parser.tab.c" /* yacc.c:1646 */
3179 -#line 251 "dtc-parser.y" /* yacc.c:1646 */
3182 +/* Line 1806 of yacc.c */
3183 +#line 268 "dtc-parser.y"
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;
3189 d = data_copy_file(f, -1);
3191 - (yyval.data) = data_merge((yyvsp[-4].data), d);
3192 + (yyval.data) = data_merge((yyvsp[(1) - (5)].data), d);
3195 -#line 1689 "dtc-parser.tab.c" /* yacc.c:1646 */
3199 -#line 261 "dtc-parser.y" /* yacc.c:1646 */
3202 +/* Line 1806 of yacc.c */
3203 +#line 278 "dtc-parser.y"
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));
3208 -#line 1697 "dtc-parser.tab.c" /* yacc.c:1646 */
3212 -#line 268 "dtc-parser.y" /* yacc.c:1646 */
3215 +/* Line 1806 of yacc.c */
3216 +#line 285 "dtc-parser.y"
3218 (yyval.data) = empty_data;
3220 -#line 1705 "dtc-parser.tab.c" /* yacc.c:1646 */
3224 -#line 272 "dtc-parser.y" /* yacc.c:1646 */
3227 +/* Line 1806 of yacc.c */
3228 +#line 289 "dtc-parser.y"
3230 - (yyval.data) = (yyvsp[-1].data);
3231 + (yyval.data) = (yyvsp[(1) - (2)].data);
3233 -#line 1713 "dtc-parser.tab.c" /* yacc.c:1646 */
3237 -#line 276 "dtc-parser.y" /* yacc.c:1646 */
3240 +/* Line 1806 of yacc.c */
3241 +#line 293 "dtc-parser.y"
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));
3246 -#line 1721 "dtc-parser.tab.c" /* yacc.c:1646 */
3250 -#line 283 "dtc-parser.y" /* yacc.c:1646 */
3253 +/* Line 1806 of yacc.c */
3254 +#line 300 "dtc-parser.y"
3256 unsigned long long bits;
3258 - bits = (yyvsp[-1].integer);
3259 + bits = (yyvsp[(2) - (3)].integer);
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");
3268 @@ -1737,23 +1918,25 @@ yyreduce:
3269 (yyval.array).data = empty_data;
3270 (yyval.array).bits = bits;
3272 -#line 1741 "dtc-parser.tab.c" /* yacc.c:1646 */
3276 -#line 299 "dtc-parser.y" /* yacc.c:1646 */
3279 +/* Line 1806 of yacc.c */
3280 +#line 316 "dtc-parser.y"
3282 (yyval.array).data = empty_data;
3283 (yyval.array).bits = 32;
3285 -#line 1750 "dtc-parser.tab.c" /* yacc.c:1646 */
3289 -#line 304 "dtc-parser.y" /* yacc.c:1646 */
3292 +/* Line 1806 of yacc.c */
3293 +#line 321 "dtc-parser.y"
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;
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.
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);
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);
3317 -#line 1773 "dtc-parser.tab.c" /* yacc.c:1646 */
3321 -#line 323 "dtc-parser.y" /* yacc.c:1646 */
3324 +/* Line 1806 of yacc.c */
3325 +#line 340 "dtc-parser.y"
3327 - uint64_t val = ~0ULL >> (64 - (yyvsp[-1].array).bits);
3328 + uint64_t val = ~0ULL >> (64 - (yyvsp[(1) - (2)].array).bits);
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,
3335 - (yyvsp[0].labelref));
3336 + (yyvsp[(2) - (2)].labelref));
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.");
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);
3345 -#line 1791 "dtc-parser.tab.c" /* yacc.c:1646 */
3349 -#line 337 "dtc-parser.y" /* yacc.c:1646 */
3352 +/* Line 1806 of yacc.c */
3353 +#line 354 "dtc-parser.y"
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));
3358 -#line 1799 "dtc-parser.tab.c" /* yacc.c:1646 */
3362 -#line 346 "dtc-parser.y" /* yacc.c:1646 */
3365 +/* Line 1806 of yacc.c */
3366 +#line 363 "dtc-parser.y"
3368 - (yyval.integer) = (yyvsp[-1].integer);
3369 + (yyval.integer) = (yyvsp[(2) - (3)].integer);
3371 -#line 1807 "dtc-parser.tab.c" /* yacc.c:1646 */
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 */
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 */
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); }
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 */
3395 +/* Line 1806 of yacc.c */
3396 +#line 379 "dtc-parser.y"
3397 + { (yyval.integer) = (yyvsp[(1) - (3)].integer) || (yyvsp[(3) - (3)].integer); }
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 */
3405 +/* Line 1806 of yacc.c */
3406 +#line 384 "dtc-parser.y"
3407 + { (yyval.integer) = (yyvsp[(1) - (3)].integer) && (yyvsp[(3) - (3)].integer); }
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 */
3415 +/* Line 1806 of yacc.c */
3416 +#line 389 "dtc-parser.y"
3417 + { (yyval.integer) = (yyvsp[(1) - (3)].integer) | (yyvsp[(3) - (3)].integer); }
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 */
3425 +/* Line 1806 of yacc.c */
3426 +#line 394 "dtc-parser.y"
3427 + { (yyval.integer) = (yyvsp[(1) - (3)].integer) ^ (yyvsp[(3) - (3)].integer); }
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 */
3435 +/* Line 1806 of yacc.c */
3436 +#line 399 "dtc-parser.y"
3437 + { (yyval.integer) = (yyvsp[(1) - (3)].integer) & (yyvsp[(3) - (3)].integer); }
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 */
3446 +/* Line 1806 of yacc.c */
3447 +#line 404 "dtc-parser.y"
3448 + { (yyval.integer) = (yyvsp[(1) - (3)].integer) == (yyvsp[(3) - (3)].integer); }
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 */
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); }
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 */
3471 +/* Line 1806 of yacc.c */
3472 +#line 410 "dtc-parser.y"
3473 + { (yyval.integer) = (yyvsp[(1) - (3)].integer) < (yyvsp[(3) - (3)].integer); }
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 */
3481 +/* Line 1806 of yacc.c */
3482 +#line 411 "dtc-parser.y"
3483 + { (yyval.integer) = (yyvsp[(1) - (3)].integer) > (yyvsp[(3) - (3)].integer); }
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 */
3491 +/* Line 1806 of yacc.c */
3492 +#line 412 "dtc-parser.y"
3493 + { (yyval.integer) = (yyvsp[(1) - (3)].integer) <= (yyvsp[(3) - (3)].integer); }
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 */
3501 +/* Line 1806 of yacc.c */
3502 +#line 413 "dtc-parser.y"
3503 + { (yyval.integer) = (yyvsp[(1) - (3)].integer) >= (yyvsp[(3) - (3)].integer); }
3508 +/* Line 1806 of yacc.c */
3509 +#line 417 "dtc-parser.y"
3510 + { (yyval.integer) = (yyvsp[(1) - (3)].integer) << (yyvsp[(3) - (3)].integer); }
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 */
3518 +/* Line 1806 of yacc.c */
3519 +#line 418 "dtc-parser.y"
3520 + { (yyval.integer) = (yyvsp[(1) - (3)].integer) >> (yyvsp[(3) - (3)].integer); }
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 */
3529 +/* Line 1806 of yacc.c */
3530 +#line 423 "dtc-parser.y"
3531 + { (yyval.integer) = (yyvsp[(1) - (3)].integer) + (yyvsp[(3) - (3)].integer); }
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 */
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); }
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 */
3554 +/* Line 1806 of yacc.c */
3555 +#line 429 "dtc-parser.y"
3556 + { (yyval.integer) = (yyvsp[(1) - (3)].integer) * (yyvsp[(3) - (3)].integer); }
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 */
3565 +/* Line 1806 of yacc.c */
3566 +#line 430 "dtc-parser.y"
3567 + { (yyval.integer) = (yyvsp[(1) - (3)].integer) / (yyvsp[(3) - (3)].integer); }
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 */
3576 +/* Line 1806 of yacc.c */
3577 +#line 431 "dtc-parser.y"
3578 + { (yyval.integer) = (yyvsp[(1) - (3)].integer) % (yyvsp[(3) - (3)].integer); }
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 */
3586 +/* Line 1806 of yacc.c */
3587 +#line 437 "dtc-parser.y"
3588 + { (yyval.integer) = -(yyvsp[(2) - (2)].integer); }
3592 -#line 427 "dtc-parser.y" /* yacc.c:1646 */
3594 - (yyval.data) = empty_data;
3596 -#line 1947 "dtc-parser.tab.c" /* yacc.c:1646 */
3598 +/* Line 1806 of yacc.c */
3599 +#line 438 "dtc-parser.y"
3600 + { (yyval.integer) = ~(yyvsp[(2) - (2)].integer); }
3604 -#line 431 "dtc-parser.y" /* yacc.c:1646 */
3606 - (yyval.data) = data_append_byte((yyvsp[-1].data), (yyvsp[0].byte));
3608 -#line 1955 "dtc-parser.tab.c" /* yacc.c:1646 */
3610 +/* Line 1806 of yacc.c */
3611 +#line 439 "dtc-parser.y"
3612 + { (yyval.integer) = !(yyvsp[(2) - (2)].integer); }
3616 -#line 435 "dtc-parser.y" /* yacc.c:1646 */
3618 +/* Line 1806 of yacc.c */
3619 +#line 444 "dtc-parser.y"
3621 - (yyval.data) = data_add_marker((yyvsp[-1].data), LABEL, (yyvsp[0].labelref));
3622 + (yyval.data) = empty_data;
3624 -#line 1963 "dtc-parser.tab.c" /* yacc.c:1646 */
3628 -#line 442 "dtc-parser.y" /* yacc.c:1646 */
3630 +/* Line 1806 of yacc.c */
3631 +#line 448 "dtc-parser.y"
3633 - (yyval.nodelist) = NULL;
3634 + (yyval.data) = data_append_byte((yyvsp[(1) - (2)].data), (yyvsp[(2) - (2)].byte));
3636 -#line 1971 "dtc-parser.tab.c" /* yacc.c:1646 */
3640 -#line 446 "dtc-parser.y" /* yacc.c:1646 */
3642 +/* Line 1806 of yacc.c */
3643 +#line 452 "dtc-parser.y"
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));
3648 -#line 1979 "dtc-parser.tab.c" /* yacc.c:1646 */
3652 -#line 450 "dtc-parser.y" /* yacc.c:1646 */
3654 +/* Line 1806 of yacc.c */
3655 +#line 459 "dtc-parser.y"
3657 - ERROR(&(yylsp[0]), "Properties must precede subnodes");
3659 + (yyval.nodelist) = NULL;
3661 -#line 1988 "dtc-parser.tab.c" /* yacc.c:1646 */
3665 -#line 458 "dtc-parser.y" /* yacc.c:1646 */
3667 +/* Line 1806 of yacc.c */
3668 +#line 463 "dtc-parser.y"
3670 - (yyval.node) = name_node((yyvsp[0].node), (yyvsp[-1].propnodename));
3671 + (yyval.nodelist) = chain_node((yyvsp[(1) - (2)].node), (yyvsp[(2) - (2)].nodelist));
3673 -#line 1996 "dtc-parser.tab.c" /* yacc.c:1646 */
3677 -#line 462 "dtc-parser.y" /* yacc.c:1646 */
3679 +/* Line 1806 of yacc.c */
3680 +#line 467 "dtc-parser.y"
3682 - (yyval.node) = name_node(build_node_delete(), (yyvsp[-1].propnodename));
3683 + ERROR(&(yylsp[(2) - (2)]), "Properties must precede subnodes");
3686 -#line 2004 "dtc-parser.tab.c" /* yacc.c:1646 */
3690 -#line 466 "dtc-parser.y" /* yacc.c:1646 */
3692 +/* Line 1806 of yacc.c */
3693 +#line 475 "dtc-parser.y"
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));
3699 -#line 2013 "dtc-parser.tab.c" /* yacc.c:1646 */
3704 -#line 2017 "dtc-parser.tab.c" /* yacc.c:1646 */
3705 +/* Line 1806 of yacc.c */
3706 +#line 479 "dtc-parser.y"
3708 + (yyval.node) = name_node(build_node_delete(), (yyvsp[(2) - (3)].propnodename));
3714 +/* Line 1806 of yacc.c */
3715 +#line 483 "dtc-parser.y"
3717 + add_label(&(yyvsp[(2) - (2)].node)->labels, (yyvsp[(1) - (2)].labelref));
3718 + (yyval.node) = (yyvsp[(2) - (2)].node);
3724 +/* Line 1806 of yacc.c */
3725 +#line 2235 "dtc-parser.tab.c"
3728 /* User semantic actions sometimes alter yychar, and that requires
3729 @@ -2036,7 +2254,7 @@ yyreduce:
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. */
3738 @@ -2051,9 +2269,9 @@ yyreduce:
3742 -/*--------------------------------------.
3743 -| yyerrlab -- here on detecting error. |
3744 -`--------------------------------------*/
3745 +/*------------------------------------.
3746 +| yyerrlab -- here on detecting error |
3747 +`------------------------------------*/
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)
3754 /* If just tried and failed to reuse lookahead token after an
3755 - error, discard it. */
3756 + error, discard it. */
3758 if (yychar <= YYEOF)
3760 - /* Return failure if at end of input. */
3761 - if (yychar == YYEOF)
3765 + /* Return failure if at end of input. */
3766 + if (yychar == YYEOF)
3771 - yydestruct ("Error: discarding",
3772 - yytoken, &yylval, &yylloc);
3776 + yydestruct ("Error: discarding",
3777 + yytoken, &yylval, &yylloc);
3782 /* Else will try to reuse lookahead token after shifting the error
3783 @@ -2137,7 +2355,7 @@ yyerrorlab:
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
3792 @@ -2150,37 +2368,35 @@ yyerrorlab:
3793 | yyerrlab1 -- common code for both syntax error and YYERROR. |
3794 `-------------------------------------------------------------*/
3796 - yyerrstatus = 3; /* Each real token shifted decrements this. */
3797 + yyerrstatus = 3; /* Each real token shifted decrements this. */
3801 yyn = yypact[yystate];
3802 if (!yypact_value_is_default (yyn))
3805 - if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
3807 - yyn = yytable[yyn];
3814 + if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
3816 + yyn = yytable[yyn];
3822 /* Pop the current state because it cannot handle the error token. */
3827 yyerror_range[1] = *yylsp;
3828 yydestruct ("Error: popping",
3829 - yystos[yystate], yyvsp, yylsp);
3830 + yystos[yystate], yyvsp, yylsp);
3833 YY_STACK_PRINT (yyss, yyssp);
3836 - YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
3838 - YY_IGNORE_MAYBE_UNINITIALIZED_END
3840 yyerror_range[2] = yylloc;
3841 /* Using YYLLOC is tempting, but would change the location of
3842 @@ -2209,7 +2425,7 @@ yyabortlab:
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);
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. */
3859 YY_STACK_PRINT (yyss, yyssp);
3860 while (yyssp != yyss)
3862 yydestruct ("Cleanup: popping",
3863 - yystos[*yyssp], yyvsp, yylsp);
3864 + yystos[*yyssp], yyvsp, yylsp);
3868 @@ -2246,12 +2462,18 @@ yyreturn:
3869 if (yymsg != yymsgbuf)
3870 YYSTACK_FREE (yymsg);
3873 + /* Make sure YYID is used. */
3874 + return YYID (yyresult);
3876 -#line 472 "dtc-parser.y" /* yacc.c:1906 */
3880 +/* Line 2067 of yacc.c */
3881 +#line 489 "dtc-parser.y"
3884 void yyerror(char const *s)
3886 ERROR(&yylloc, "%s", s);
3889 --- a/scripts/dtc/dtc-parser.tab.h_shipped
3890 +++ b/scripts/dtc/dtc-parser.tab.h_shipped
3892 -/* A Bison parser, made by GNU Bison 3.0.2. */
3893 +/* A Bison parser, made by GNU Bison 2.5. */
3895 /* Bison interface for Yacc-like parsers in C
3897 - Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc.
3900 + Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc.
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.
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.
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/>. */
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.
3923 This special exception was added by the Free Software Foundation in
3924 version 2.2 of Bison. */
3926 -#ifndef YY_YY_DTC_PARSER_TAB_H_INCLUDED
3927 -# define YY_YY_DTC_PARSER_TAB_H_INCLUDED
3928 -/* Debug traces. */
3933 -extern int yydebug;
3939 # define YYTOKENTYPE
3943 - DT_MEMRESERVE = 259,
3953 - DT_DEL_PROP = 269,
3954 - DT_DEL_NODE = 270,
3955 - DT_PROPNODENAME = 271,
3957 - DT_CHAR_LITERAL = 273,
3964 + /* Put the tokens into the symbol table, so that GDB and other debuggers
3965 + know about them. */
3966 + enum yytokentype {
3969 + DT_MEMRESERVE = 260,
3979 + DT_DEL_PROP = 270,
3980 + DT_DEL_NODE = 271,
3981 + DT_PROPNODENAME = 272,
3983 + DT_CHAR_LITERAL = 274,
3995 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
3996 -typedef union YYSTYPE YYSTYPE;
3998 +typedef union YYSTYPE
4000 -#line 38 "dtc-parser.y" /* yacc.c:1909 */
4002 +/* Line 2068 of yacc.c */
4003 +#line 39 "dtc-parser.y"
4007 @@ -92,30 +87,32 @@ union YYSTYPE
4008 struct node *nodelist;
4009 struct reserve_info *re;
4015 -#line 97 "dtc-parser.tab.h" /* yacc.c:1909 */
4017 +/* Line 2068 of yacc.c */
4018 +#line 96 "dtc-parser.tab.h"
4020 # define YYSTYPE_IS_TRIVIAL 1
4021 +# define yystype YYSTYPE /* obsolescent; will be withdrawn */
4022 # define YYSTYPE_IS_DECLARED 1
4025 -/* Location type. */
4026 +extern YYSTYPE yylval;
4028 #if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
4029 -typedef struct YYLTYPE YYLTYPE;
4031 +typedef struct YYLTYPE
4039 +# define yyltype YYLTYPE /* obsolescent; will be withdrawn */
4040 # define YYLTYPE_IS_DECLARED 1
4041 # define YYLTYPE_IS_TRIVIAL 1
4045 -extern YYSTYPE yylval;
4046 extern YYLTYPE yylloc;
4047 -int yyparse (void);
4049 -#endif /* !YY_YY_DTC_PARSER_TAB_H_INCLUDED */
4050 --- a/scripts/dtc/dtc-parser.y
4051 +++ b/scripts/dtc/dtc-parser.y
4056 +#include <inttypes.h>
4060 @@ -52,9 +53,11 @@ extern bool treesource_error;
4061 struct node *nodelist;
4062 struct reserve_info *re;
4069 %token DT_MEMRESERVE
4070 %token DT_LSHIFT DT_RSHIFT DT_LE DT_GE DT_EQ DT_NE DT_AND DT_OR
4072 @@ -71,6 +74,7 @@ extern bool treesource_error;
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;
4084 - DT_V1 ';' memreserves devicetree
4085 + DT_V1 ';' plugindecl memreserves devicetree
4087 - the_boot_info = build_boot_info($3, $4,
4088 - guess_boot_cpuid($4));
4089 + $5->is_plugin = $3;
4091 + the_boot_info = build_boot_info($4, $5,
4092 + guess_boot_cpuid($5));
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;
4115 static void fill_fullpaths(struct node *tree, const char *prefix)
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",
4142 @@ -186,7 +189,9 @@ int main(int argc, char *argv[])
4144 parse_checks_option(false, true, optarg);
4148 + symbol_fixup_support = 1;
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 */
4161 #define PHANDLE_LEGACY 0x1
4162 #define PHANDLE_EPAPR 0x2
4163 @@ -132,6 +133,25 @@ struct label {
4167 +struct fixup_entry {
4169 + struct node *node;
4170 + struct property *prop;
4171 + struct fixup_entry *next;
4176 + struct fixup_entry *entries;
4177 + struct fixup *next;
4181 + struct label *label;
4182 + struct node *node;
4183 + struct symbol *next;
4189 @@ -158,6 +178,12 @@ struct node {
4190 int addr_cells, size_cells;
4192 struct label *labels;
4196 + struct fixup *fixups;
4197 + struct symbol *symbols;
4198 + struct fixup_entry *local_fixups;
4201 #define for_each_label_withdel(l0, l) \
4202 @@ -181,6 +207,18 @@ struct node {
4203 for_each_child_withdel(n, c) \
4206 +#define for_each_fixup(n, f) \
4207 + for ((f) = (n)->fixups; (f); (f) = (f)->next)
4209 +#define for_each_fixup_entry(f, fe) \
4210 + for ((fe) = (f)->entries; (fe); (fe) = (fe)->next)
4212 +#define for_each_symbol(n, s) \
4213 + for ((s) = (n)->symbols; (s); (s) = (s)->next)
4215 +#define for_each_local_fixup_entry(n, fe) \
4216 + for ((fe) = (n)->local_fixups; (fe); (fe) = (fe)->next)
4218 void add_label(struct label **labels, char *label);
4219 void delete_labels(struct label **labels);
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;
4226 bool seen_name_prop = false;
4227 + struct symbol *sym;
4229 + struct fixup_entry *fe;
4231 + const char *fullpath;
4232 + int namesz, nameoff, vallen;
4236 @@ -276,8 +282,6 @@ static void flatten_tree(struct node *tr
4237 emit->align(etarget, sizeof(cell_t));
4239 for_each_property(tree, prop) {
4242 if (streq(prop->name, "name"))
4243 seen_name_prop = true;
4245 @@ -310,6 +314,139 @@ static void flatten_tree(struct node *tr
4246 flatten_tree(child, emit, etarget, strbuf, vi);
4249 + if (!symbol_fixup_support)
4252 + /* add the symbol nodes (if any) */
4253 + if (tree->symbols) {
4255 + emit->beginnode(etarget, NULL);
4256 + emit->string(etarget, "__symbols__", 0);
4257 + emit->align(etarget, sizeof(cell_t));
4259 + for_each_symbol(tree, sym) {
4261 + vallen = strlen(sym->node->fullpath);
4263 + nameoff = stringtable_insert(strbuf, sym->label->label);
4265 + emit->property(etarget, NULL);
4266 + emit->cell(etarget, vallen + 1);
4267 + emit->cell(etarget, nameoff);
4269 + if ((vi->flags & FTF_VARALIGN) && vallen >= 8)
4270 + emit->align(etarget, 8);
4272 + emit->string(etarget, sym->node->fullpath,
4273 + strlen(sym->node->fullpath));
4274 + emit->align(etarget, sizeof(cell_t));
4277 + emit->endnode(etarget, NULL);
4280 + /* add the fixup nodes */
4281 + if (tree->fixups) {
4283 + /* emit the external fixups */
4284 + emit->beginnode(etarget, NULL);
4285 + emit->string(etarget, "__fixups__", 0);
4286 + emit->align(etarget, sizeof(cell_t));
4288 + for_each_fixup(tree, f) {
4291 + for_each_fixup_entry(f, fe) {
4292 + fullpath = fe->node->fullpath;
4293 + if (fullpath[0] == '\0')
4295 + namesz += strlen(fullpath) + 1;
4296 + namesz += strlen(fe->prop->name) + 1;
4297 + namesz += 32; /* space for :<number> + '\0' */
4300 + name = xmalloc(namesz);
4303 + for_each_fixup_entry(f, fe) {
4304 + fullpath = fe->node->fullpath;
4305 + if (fullpath[0] == '\0')
4307 + snprintf(s, name + namesz - s, "%s:%s:%d",
4309 + fe->prop->name, fe->offset);
4310 + s += strlen(s) + 1;
4313 + nameoff = stringtable_insert(strbuf, f->ref);
4314 + vallen = s - name - 1;
4316 + emit->property(etarget, NULL);
4317 + emit->cell(etarget, vallen + 1);
4318 + emit->cell(etarget, nameoff);
4320 + if ((vi->flags & FTF_VARALIGN) && vallen >= 8)
4321 + emit->align(etarget, 8);
4323 + emit->string(etarget, name, vallen);
4324 + emit->align(etarget, sizeof(cell_t));
4329 + emit->endnode(etarget, tree->labels);
4332 + /* add the local fixup property */
4333 + if (tree->local_fixups) {
4335 + /* emit the external fixups */
4336 + emit->beginnode(etarget, NULL);
4337 + emit->string(etarget, "__local_fixups__", 0);
4338 + emit->align(etarget, sizeof(cell_t));
4341 + for_each_local_fixup_entry(tree, fe) {
4342 + fullpath = fe->node->fullpath;
4343 + if (fullpath[0] == '\0')
4345 + namesz += strlen(fullpath) + 1;
4346 + namesz += strlen(fe->prop->name) + 1;
4347 + namesz += 32; /* space for :<number> + '\0' */
4350 + name = xmalloc(namesz);
4353 + for_each_local_fixup_entry(tree, fe) {
4354 + fullpath = fe->node->fullpath;
4355 + if (fullpath[0] == '\0')
4357 + snprintf(s, name + namesz - s, "%s:%s:%d",
4358 + fullpath, fe->prop->name,
4360 + s += strlen(s) + 1;
4363 + nameoff = stringtable_insert(strbuf, "fixup");
4364 + vallen = s - name - 1;
4366 + emit->property(etarget, NULL);
4367 + emit->cell(etarget, vallen + 1);
4368 + emit->cell(etarget, nameoff);
4370 + if ((vi->flags & FTF_VARALIGN) && vallen >= 8)
4371 + emit->align(etarget, 8);
4373 + emit->string(etarget, name, vallen);
4374 + emit->align(etarget, sizeof(cell_t));
4378 + emit->endnode(etarget, tree->labels);
4382 emit->endnode(etarget, tree->labels);
4385 --- a/scripts/dtc/version_gen.h
4386 +++ b/scripts/dtc/version_gen.h
4388 -#define DTC_VERSION "DTC 1.4.1-g9d3649bd"
4389 +#define DTC_VERSION "DTC 1.4.1-g9d3649bd-dirty"