Commit 33c929c0 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'devicetree-for-linus' of git://git.secretlab.ca/git/linux

Pull device tree bug fixes from Grant Likely:
 "This branch contains the following bug fixes:
   - Fix locking vs. interrupts. Bug caught by lockdep checks
   - Fix parsing of cpp #line directive output by dtc
   - Fix 'make clean' for dtc temporary files.

  There is also a commit that regenerates the dtc lexer and parser files
  with Bison 2.5.  The only purpose of this commit is to separate the
  functional change in the dtc bug fix from the code generation change
  caused by a different Bison version"

* tag 'devicetree-for-linus' of git://git.secretlab.ca/git/linux:
  dtc: ensure #line directives don't consume data from the next line
  dtc: Update generated files to output from Bison 2.5
  of: Fix locking vs. interrupts
  kbuild: make sure we clean up DTB temporary files
parents 25e33ed9 706b78f3
...@@ -54,6 +54,7 @@ EXPORT_SYMBOL(of_set_property_mutex); ...@@ -54,6 +54,7 @@ EXPORT_SYMBOL(of_set_property_mutex);
int of_set_property(struct device_node *dp, const char *name, void *val, int len) int of_set_property(struct device_node *dp, const char *name, void *val, int len)
{ {
struct property **prevp; struct property **prevp;
unsigned long flags;
void *new_val; void *new_val;
int err; int err;
...@@ -64,7 +65,7 @@ int of_set_property(struct device_node *dp, const char *name, void *val, int len ...@@ -64,7 +65,7 @@ int of_set_property(struct device_node *dp, const char *name, void *val, int len
err = -ENODEV; err = -ENODEV;
mutex_lock(&of_set_property_mutex); mutex_lock(&of_set_property_mutex);
raw_spin_lock(&devtree_lock); raw_spin_lock_irqsave(&devtree_lock, flags);
prevp = &dp->properties; prevp = &dp->properties;
while (*prevp) { while (*prevp) {
struct property *prop = *prevp; struct property *prop = *prevp;
...@@ -91,7 +92,7 @@ int of_set_property(struct device_node *dp, const char *name, void *val, int len ...@@ -91,7 +92,7 @@ int of_set_property(struct device_node *dp, const char *name, void *val, int len
} }
prevp = &(*prevp)->next; prevp = &(*prevp)->next;
} }
raw_spin_unlock(&devtree_lock); raw_spin_unlock_irqrestore(&devtree_lock, flags);
mutex_unlock(&of_set_property_mutex); mutex_unlock(&of_set_property_mutex);
/* XXX Upate procfs if necessary... */ /* XXX Upate procfs if necessary... */
......
...@@ -192,14 +192,15 @@ EXPORT_SYMBOL(of_find_property); ...@@ -192,14 +192,15 @@ EXPORT_SYMBOL(of_find_property);
struct device_node *of_find_all_nodes(struct device_node *prev) struct device_node *of_find_all_nodes(struct device_node *prev)
{ {
struct device_node *np; struct device_node *np;
unsigned long flags;
raw_spin_lock(&devtree_lock); raw_spin_lock_irqsave(&devtree_lock, flags);
np = prev ? prev->allnext : of_allnodes; np = prev ? prev->allnext : of_allnodes;
for (; np != NULL; np = np->allnext) for (; np != NULL; np = np->allnext)
if (of_node_get(np)) if (of_node_get(np))
break; break;
of_node_put(prev); of_node_put(prev);
raw_spin_unlock(&devtree_lock); raw_spin_unlock_irqrestore(&devtree_lock, flags);
return np; return np;
} }
EXPORT_SYMBOL(of_find_all_nodes); EXPORT_SYMBOL(of_find_all_nodes);
...@@ -421,8 +422,9 @@ struct device_node *of_get_next_available_child(const struct device_node *node, ...@@ -421,8 +422,9 @@ struct device_node *of_get_next_available_child(const struct device_node *node,
struct device_node *prev) struct device_node *prev)
{ {
struct device_node *next; struct device_node *next;
unsigned long flags;
raw_spin_lock(&devtree_lock); raw_spin_lock_irqsave(&devtree_lock, flags);
next = prev ? prev->sibling : node->child; next = prev ? prev->sibling : node->child;
for (; next; next = next->sibling) { for (; next; next = next->sibling) {
if (!__of_device_is_available(next)) if (!__of_device_is_available(next))
...@@ -431,7 +433,7 @@ struct device_node *of_get_next_available_child(const struct device_node *node, ...@@ -431,7 +433,7 @@ struct device_node *of_get_next_available_child(const struct device_node *node,
break; break;
} }
of_node_put(prev); of_node_put(prev);
raw_spin_unlock(&devtree_lock); raw_spin_unlock_irqrestore(&devtree_lock, flags);
return next; return next;
} }
EXPORT_SYMBOL(of_get_next_available_child); EXPORT_SYMBOL(of_get_next_available_child);
...@@ -735,13 +737,14 @@ EXPORT_SYMBOL_GPL(of_modalias_node); ...@@ -735,13 +737,14 @@ EXPORT_SYMBOL_GPL(of_modalias_node);
struct device_node *of_find_node_by_phandle(phandle handle) struct device_node *of_find_node_by_phandle(phandle handle)
{ {
struct device_node *np; struct device_node *np;
unsigned long flags;
raw_spin_lock(&devtree_lock); raw_spin_lock_irqsave(&devtree_lock, flags);
for (np = of_allnodes; np; np = np->allnext) for (np = of_allnodes; np; np = np->allnext)
if (np->phandle == handle) if (np->phandle == handle)
break; break;
of_node_get(np); of_node_get(np);
raw_spin_unlock(&devtree_lock); raw_spin_unlock_irqrestore(&devtree_lock, flags);
return np; return np;
} }
EXPORT_SYMBOL(of_find_node_by_phandle); EXPORT_SYMBOL(of_find_node_by_phandle);
......
...@@ -149,7 +149,7 @@ cpp_flags = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(LINUXINCLUDE) \ ...@@ -149,7 +149,7 @@ cpp_flags = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(LINUXINCLUDE) \
ld_flags = $(LDFLAGS) $(ldflags-y) ld_flags = $(LDFLAGS) $(ldflags-y)
dtc_cpp_flags = -Wp,-MD,$(depfile).pre -nostdinc \ dtc_cpp_flags = -Wp,-MD,$(depfile).pre.tmp -nostdinc \
-I$(srctree)/arch/$(SRCARCH)/boot/dts \ -I$(srctree)/arch/$(SRCARCH)/boot/dts \
-I$(srctree)/arch/$(SRCARCH)/boot/dts/include \ -I$(srctree)/arch/$(SRCARCH)/boot/dts/include \
-undef -D__DTS__ -undef -D__DTS__
...@@ -265,13 +265,13 @@ quiet_cmd_dtc = DTC $@ ...@@ -265,13 +265,13 @@ quiet_cmd_dtc = DTC $@
cmd_dtc = $(CPP) $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) $< ; \ cmd_dtc = $(CPP) $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) $< ; \
$(objtree)/scripts/dtc/dtc -O dtb -o $@ -b 0 \ $(objtree)/scripts/dtc/dtc -O dtb -o $@ -b 0 \
-i $(dir $<) $(DTC_FLAGS) \ -i $(dir $<) $(DTC_FLAGS) \
-d $(depfile).dtc $(dtc-tmp) ; \ -d $(depfile).dtc.tmp $(dtc-tmp) ; \
cat $(depfile).pre $(depfile).dtc > $(depfile) cat $(depfile).pre.tmp $(depfile).dtc.tmp > $(depfile)
$(obj)/%.dtb: $(src)/%.dts FORCE $(obj)/%.dtb: $(src)/%.dts FORCE
$(call if_changed_dep,dtc) $(call if_changed_dep,dtc)
dtc-tmp = $(subst $(comma),_,$(dot-target).dts) dtc-tmp = $(subst $(comma),_,$(dot-target).dts.tmp)
# Bzip2 # Bzip2
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
......
...@@ -71,7 +71,7 @@ static int pop_input_file(void); ...@@ -71,7 +71,7 @@ static int pop_input_file(void);
push_input_file(name); push_input_file(name);
} }
<*>^"#"(line)?{WS}+[0-9]+{WS}+{STRING}({WS}+[0-9]+)? { <*>^"#"(line)?[ \t]+[0-9]+[ \t]+{STRING}([ \t]+[0-9]+)? {
char *line, *tmp, *fn; char *line, *tmp, *fn;
/* skip text before line # */ /* skip text before line # */
line = yytext; line = yytext;
......
...@@ -405,19 +405,19 @@ static yyconst flex_int16_t yy_accept[161] = ...@@ -405,19 +405,19 @@ static yyconst flex_int16_t yy_accept[161] =
static yyconst flex_int32_t yy_ec[256] = static yyconst flex_int32_t yy_ec[256] =
{ 0, { 0,
1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 4, 4, 4, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 2, 4, 5, 6, 1, 1, 7, 8, 1, 1, 2, 5, 6, 7, 1, 1, 8, 9, 1,
1, 9, 10, 10, 11, 10, 12, 13, 14, 15, 1, 10, 11, 11, 12, 11, 13, 14, 15, 16,
15, 15, 15, 15, 15, 15, 15, 16, 1, 17, 16, 16, 16, 16, 16, 16, 16, 17, 1, 18,
18, 19, 10, 10, 20, 20, 20, 20, 20, 20, 19, 20, 11, 11, 21, 21, 21, 21, 21, 21,
21, 21, 21, 21, 21, 22, 21, 21, 21, 21, 22, 22, 22, 22, 22, 23, 22, 22, 22, 22,
21, 21, 21, 21, 23, 21, 21, 24, 21, 21, 22, 22, 22, 22, 24, 22, 22, 25, 22, 22,
1, 25, 26, 1, 21, 1, 20, 27, 28, 29, 1, 26, 27, 1, 22, 1, 21, 28, 29, 30,
30, 20, 21, 21, 31, 21, 21, 32, 33, 34, 31, 21, 22, 22, 32, 22, 22, 33, 34, 35,
35, 36, 21, 37, 38, 39, 40, 41, 21, 24, 36, 37, 22, 38, 39, 40, 41, 42, 22, 25,
42, 21, 43, 44, 45, 1, 1, 1, 1, 1, 43, 22, 44, 45, 46, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
...@@ -434,36 +434,36 @@ static yyconst flex_int32_t yy_ec[256] = ...@@ -434,36 +434,36 @@ static yyconst flex_int32_t yy_ec[256] =
1, 1, 1, 1, 1 1, 1, 1, 1, 1
} ; } ;
static yyconst flex_int32_t yy_meta[46] = static yyconst flex_int32_t yy_meta[47] =
{ 0, { 0,
1, 1, 1, 1, 1, 2, 3, 1, 2, 2, 1, 1, 1, 1, 1, 1, 2, 3, 1, 2,
2, 4, 5, 5, 5, 6, 1, 1, 1, 7, 2, 2, 4, 5, 5, 5, 6, 1, 1, 1,
8, 8, 8, 8, 1, 1, 7, 7, 7, 7, 7, 8, 8, 8, 8, 1, 1, 7, 7, 7,
8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8,
8, 8, 3, 1, 1 8, 8, 8, 3, 1, 1
} ; } ;
static yyconst flex_int16_t yy_base[175] = static yyconst flex_int16_t yy_base[175] =
{ 0, { 0,
0, 388, 381, 40, 41, 386, 71, 385, 34, 44, 0, 385, 378, 40, 41, 383, 72, 382, 34, 44,
390, 395, 60, 62, 371, 112, 111, 111, 111, 104, 388, 393, 61, 117, 368, 116, 115, 115, 115, 48,
370, 106, 371, 342, 124, 119, 0, 144, 395, 0, 367, 107, 368, 339, 127, 120, 0, 147, 393, 0,
123, 0, 159, 153, 165, 167, 395, 130, 395, 382, 127, 0, 133, 156, 168, 153, 393, 125, 393, 380,
395, 0, 372, 122, 395, 157, 374, 379, 350, 21, 393, 0, 369, 127, 393, 160, 371, 377, 347, 21,
346, 349, 395, 395, 395, 395, 395, 362, 395, 395, 343, 346, 393, 393, 393, 393, 393, 359, 393, 393,
181, 346, 342, 395, 359, 0, 191, 343, 190, 351, 183, 343, 339, 393, 356, 0, 183, 340, 187, 348,
350, 0, 0, 0, 173, 362, 177, 367, 357, 329, 347, 0, 0, 0, 178, 359, 195, 365, 354, 326,
335, 328, 337, 331, 206, 329, 334, 327, 395, 338, 332, 325, 334, 328, 204, 326, 331, 324, 393, 335,
170, 314, 346, 345, 318, 325, 343, 158, 316, 212, 150, 311, 343, 342, 315, 322, 340, 179, 313, 207,
322, 319, 320, 395, 340, 336, 308, 305, 314, 304, 319, 316, 317, 393, 337, 333, 305, 302, 311, 301,
295, 138, 208, 220, 395, 292, 305, 265, 264, 254, 310, 190, 338, 337, 393, 307, 322, 301, 305, 277,
201, 222, 285, 275, 273, 270, 236, 235, 225, 115, 208, 311, 307, 278, 271, 270, 248, 246, 213, 130,
395, 395, 252, 216, 216, 217, 214, 230, 209, 220, 393, 393, 263, 235, 207, 221, 218, 229, 213, 213,
213, 239, 211, 217, 216, 209, 229, 395, 240, 225, 206, 234, 218, 210, 208, 193, 219, 393, 223, 204,
206, 169, 395, 395, 116, 106, 99, 54, 395, 395, 176, 157, 393, 393, 120, 106, 97, 119, 393, 393,
254, 260, 268, 272, 276, 282, 289, 293, 301, 309, 245, 251, 259, 263, 267, 273, 280, 284, 292, 300,
313, 319, 327, 335 304, 310, 318, 326
} ; } ;
static yyconst flex_int16_t yy_def[175] = static yyconst flex_int16_t yy_def[175] =
...@@ -489,108 +489,108 @@ static yyconst flex_int16_t yy_def[175] = ...@@ -489,108 +489,108 @@ static yyconst flex_int16_t yy_def[175] =
160, 160, 160, 160 160, 160, 160, 160
} ; } ;
static yyconst flex_int16_t yy_nxt[441] = static yyconst flex_int16_t yy_nxt[440] =
{ 0, { 0,
12, 13, 14, 15, 16, 12, 17, 18, 12, 12, 12, 13, 14, 13, 15, 16, 12, 17, 18, 12,
12, 19, 12, 12, 12, 12, 20, 21, 22, 23, 12, 12, 19, 12, 12, 12, 12, 20, 21, 22,
23, 23, 23, 23, 12, 12, 23, 23, 23, 23, 23, 23, 23, 23, 23, 12, 12, 23, 23, 23,
23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
23, 23, 12, 24, 12, 25, 34, 35, 35, 25, 23, 23, 23, 12, 24, 12, 25, 34, 35, 35,
81, 26, 26, 27, 27, 27, 34, 35, 35, 82, 25, 81, 26, 26, 27, 27, 27, 34, 35, 35,
28, 36, 36, 36, 36, 159, 29, 28, 28, 28, 82, 28, 36, 36, 36, 53, 54, 29, 28, 28,
28, 12, 13, 14, 15, 16, 30, 17, 18, 30, 28, 28, 12, 13, 14, 13, 15, 16, 30, 17,
30, 30, 26, 30, 30, 30, 12, 20, 21, 22, 18, 30, 30, 30, 26, 30, 30, 30, 12, 20,
31, 31, 31, 31, 31, 32, 12, 31, 31, 31, 21, 22, 31, 31, 31, 31, 31, 32, 12, 31,
31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31,
31, 31, 31, 12, 24, 12, 39, 41, 45, 47, 31, 31, 31, 31, 31, 12, 24, 12, 36, 36,
53, 54, 48, 56, 57, 61, 61, 47, 66, 45, 36, 39, 41, 45, 47, 56, 57, 48, 61, 47,
48, 66, 66, 66, 39, 46, 40, 49, 59, 50, 39, 159, 48, 66, 61, 45, 66, 66, 66, 158,
158, 51, 122, 52, 157, 49, 46, 50, 136, 63, 46, 40, 49, 59, 50, 157, 51, 49, 52, 50,
137, 52, 156, 43, 40, 62, 65, 65, 65, 59, 40, 63, 46, 52, 36, 36, 36, 156, 43, 62,
61, 61, 123, 65, 75, 69, 69, 69, 36, 36, 65, 65, 65, 59, 136, 68, 137, 65, 75, 69,
65, 65, 65, 65, 70, 71, 72, 69, 69, 69, 69, 69, 70, 71, 65, 65, 65, 65, 70, 71,
45, 46, 61, 61, 109, 77, 70, 71, 93, 110, 72, 69, 69, 69, 61, 46, 45, 155, 154, 66,
68, 70, 71, 85, 85, 85, 66, 46, 155, 66, 70, 71, 66, 66, 66, 122, 85, 85, 85, 59,
66, 66, 69, 69, 69, 122, 59, 100, 100, 61, 69, 69, 69, 46, 77, 100, 109, 93, 100, 70,
61, 70, 71, 100, 100, 148, 112, 154, 85, 85, 71, 110, 112, 122, 129, 123, 153, 85, 85, 85,
85, 61, 61, 129, 129, 123, 129, 129, 135, 135, 135, 135, 135, 148, 148, 160, 135, 135, 135, 152,
135, 142, 142, 148, 143, 149, 153, 135, 135, 135, 142, 142, 142, 123, 143, 142, 142, 142, 151, 143,
142, 142, 160, 143, 152, 151, 150, 146, 145, 144, 150, 146, 145, 149, 149, 38, 38, 38, 38, 38,
141, 140, 139, 149, 38, 38, 38, 38, 38, 38, 38, 38, 38, 42, 144, 141, 140, 42, 42, 44,
38, 38, 42, 138, 134, 133, 42, 42, 44, 44, 44, 44, 44, 44, 44, 44, 44, 58, 58, 58,
44, 44, 44, 44, 44, 44, 58, 58, 58, 58, 58, 64, 139, 64, 66, 138, 134, 66, 133, 66,
64, 132, 64, 66, 131, 130, 66, 160, 66, 66, 66, 67, 132, 131, 67, 67, 67, 67, 73, 130,
67, 128, 127, 67, 67, 67, 67, 73, 126, 73, 73, 73, 76, 76, 76, 76, 76, 76, 76, 76,
73, 76, 76, 76, 76, 76, 76, 76, 76, 78, 78, 78, 78, 78, 78, 78, 78, 78, 91, 160,
78, 78, 78, 78, 78, 78, 78, 91, 125, 91, 91, 92, 129, 92, 92, 128, 92, 92, 121, 121,
92, 124, 92, 92, 120, 92, 92, 121, 121, 121, 121, 121, 121, 121, 121, 121, 147, 147, 147, 147,
121, 121, 121, 121, 121, 147, 147, 147, 147, 147, 147, 147, 147, 147, 127, 126, 125, 124, 61, 61,
147, 147, 147, 119, 118, 117, 116, 115, 47, 114, 120, 119, 118, 117, 116, 115, 47, 114, 110, 113,
110, 113, 111, 108, 107, 106, 48, 105, 104, 89, 111, 108, 107, 106, 48, 105, 104, 89, 103, 102,
103, 102, 101, 99, 98, 97, 96, 95, 94, 79, 101, 99, 98, 97, 96, 95, 94, 79, 77, 90,
77, 90, 89, 88, 59, 87, 86, 59, 84, 83, 89, 88, 59, 87, 86, 59, 84, 83, 80, 79,
80, 79, 77, 74, 160, 60, 59, 55, 37, 160, 77, 74, 160, 60, 59, 55, 37, 160, 33, 25,
33, 25, 26, 25, 11, 160, 160, 160, 160, 160, 26, 25, 11, 160, 160, 160, 160, 160, 160, 160,
160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160,
160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160,
160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160,
160, 160, 160, 160, 160, 160, 160, 160, 160, 160 160, 160, 160, 160, 160, 160, 160, 160, 160
} ; } ;
static yyconst flex_int16_t yy_chk[441] = static yyconst flex_int16_t yy_chk[440] =
{ 0, { 0,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 4, 9, 9, 9, 10, 1, 1, 1, 1, 1, 1, 4, 9, 9, 9,
50, 4, 5, 5, 5, 5, 10, 10, 10, 50, 10, 50, 4, 5, 5, 5, 5, 10, 10, 10,
5, 13, 13, 14, 14, 158, 5, 5, 5, 5, 50, 5, 13, 13, 13, 20, 20, 5, 5, 5,
5, 7, 7, 7, 7, 7, 7, 7, 7, 7, 5, 5, 7, 7, 7, 7, 7, 7, 7, 7,
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
7, 7, 7, 7, 7, 7, 16, 17, 18, 19, 7, 7, 7, 7, 7, 7, 7, 7, 14, 14,
20, 20, 19, 22, 22, 25, 25, 26, 31, 44, 14, 16, 17, 18, 19, 22, 22, 19, 25, 26,
26, 31, 31, 31, 38, 18, 16, 19, 31, 19, 38, 158, 26, 31, 33, 44, 31, 31, 31, 157,
157, 19, 112, 19, 156, 26, 44, 26, 130, 26, 18, 16, 19, 31, 19, 156, 19, 26, 19, 26,
130, 26, 155, 17, 38, 25, 28, 28, 28, 28, 38, 26, 44, 26, 36, 36, 36, 155, 17, 25,
33, 33, 112, 28, 46, 34, 34, 34, 36, 36, 28, 28, 28, 28, 130, 33, 130, 28, 46, 34,
28, 28, 28, 28, 34, 34, 34, 35, 35, 35, 34, 34, 91, 91, 28, 28, 28, 28, 34, 34,
75, 46, 61, 61, 98, 77, 35, 35, 77, 98, 34, 35, 35, 35, 61, 46, 75, 152, 151, 67,
33, 91, 91, 61, 61, 61, 67, 75, 152, 67, 35, 35, 67, 67, 67, 112, 61, 61, 61, 67,
67, 67, 69, 69, 69, 121, 67, 85, 85, 113, 69, 69, 69, 75, 77, 85, 98, 77, 100, 69,
113, 69, 69, 100, 100, 143, 100, 151, 85, 85, 69, 98, 100, 121, 129, 112, 150, 85, 85, 85,
85, 114, 114, 122, 122, 121, 129, 129, 135, 135, 135, 135, 135, 143, 147, 149, 129, 129, 129, 146,
135, 138, 138, 147, 138, 143, 150, 129, 129, 129, 138, 138, 138, 121, 138, 142, 142, 142, 145, 142,
142, 142, 149, 142, 146, 145, 144, 141, 140, 139, 144, 141, 140, 143, 147, 161, 161, 161, 161, 161,
137, 136, 134, 147, 161, 161, 161, 161, 161, 161, 161, 161, 161, 162, 139, 137, 136, 162, 162, 163,
161, 161, 162, 133, 128, 127, 162, 162, 163, 163, 163, 163, 163, 163, 163, 163, 163, 164, 164, 164,
163, 163, 163, 163, 163, 163, 164, 164, 164, 164, 164, 165, 134, 165, 166, 133, 128, 166, 127, 166,
165, 126, 165, 166, 125, 124, 166, 123, 166, 166, 166, 167, 126, 125, 167, 167, 167, 167, 168, 124,
167, 120, 119, 167, 167, 167, 167, 168, 118, 168, 168, 168, 169, 169, 169, 169, 169, 169, 169, 169,
168, 169, 169, 169, 169, 169, 169, 169, 169, 170, 170, 170, 170, 170, 170, 170, 170, 170, 171, 123,
170, 170, 170, 170, 170, 170, 170, 171, 117, 171, 171, 172, 122, 172, 172, 120, 172, 172, 173, 173,
172, 116, 172, 172, 111, 172, 172, 173, 173, 173, 173, 173, 173, 173, 173, 173, 174, 174, 174, 174,
173, 173, 173, 173, 173, 174, 174, 174, 174, 174, 174, 174, 174, 174, 119, 118, 117, 116, 114, 113,
174, 174, 174, 110, 109, 108, 107, 106, 105, 103, 111, 110, 109, 108, 107, 106, 105, 103, 102, 101,
102, 101, 99, 97, 96, 95, 94, 93, 92, 90, 99, 97, 96, 95, 94, 93, 92, 90, 88, 87,
88, 87, 86, 84, 83, 82, 81, 80, 79, 78, 86, 84, 83, 82, 81, 80, 79, 78, 76, 71,
76, 71, 70, 68, 65, 63, 62, 58, 52, 51, 70, 68, 65, 63, 62, 58, 52, 51, 49, 48,
49, 48, 47, 43, 40, 24, 23, 21, 15, 11, 47, 43, 40, 24, 23, 21, 15, 11, 8, 6,
8, 6, 3, 2, 160, 160, 160, 160, 160, 160, 3, 2, 160, 160, 160, 160, 160, 160, 160, 160,
160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160,
160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160,
160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160,
160, 160, 160, 160, 160, 160, 160, 160, 160, 160 160, 160, 160, 160, 160, 160, 160, 160, 160
} ; } ;
static yy_state_type yy_last_accepting_state; static yy_state_type yy_last_accepting_state;
......
/* A Bison parser, made by GNU Bison 2.5. */
/* A Bison parser, made by GNU Bison 2.4.1. */ /* Bison implementation for Yacc-like parsers in C
/* Skeleton implementation for Bison's Yacc-like parsers in C Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc.
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
...@@ -46,7 +44,7 @@ ...@@ -46,7 +44,7 @@
#define YYBISON 1 #define YYBISON 1
/* Bison version. */ /* Bison version. */
#define YYBISON_VERSION "2.4.1" #define YYBISON_VERSION "2.5"
/* Skeleton name. */ /* Skeleton name. */
#define YYSKELETON_NAME "yacc.c" #define YYSKELETON_NAME "yacc.c"
...@@ -67,7 +65,7 @@ ...@@ -67,7 +65,7 @@
/* Copy the first part of user declarations. */ /* Copy the first part of user declarations. */
/* Line 189 of yacc.c */ /* Line 268 of yacc.c */
#line 21 "dtc-parser.y" #line 21 "dtc-parser.y"
#include <stdio.h> #include <stdio.h>
...@@ -88,8 +86,8 @@ static unsigned long long eval_literal(const char *s, int base, int bits); ...@@ -88,8 +86,8 @@ static unsigned long long eval_literal(const char *s, int base, int bits);
static unsigned char eval_char_literal(const char *s); static unsigned char eval_char_literal(const char *s);
/* Line 189 of yacc.c */ /* Line 268 of yacc.c */
#line 93 "dtc-parser.tab.c" #line 91 "dtc-parser.tab.c"
/* Enabling traces. */ /* Enabling traces. */
#ifndef YYDEBUG #ifndef YYDEBUG
...@@ -147,7 +145,7 @@ static unsigned char eval_char_literal(const char *s); ...@@ -147,7 +145,7 @@ static unsigned char eval_char_literal(const char *s);
typedef union YYSTYPE typedef union YYSTYPE
{ {
/* Line 214 of yacc.c */ /* Line 293 of yacc.c */
#line 40 "dtc-parser.y" #line 40 "dtc-parser.y"
char *propnodename; char *propnodename;
...@@ -171,8 +169,8 @@ typedef union YYSTYPE ...@@ -171,8 +169,8 @@ typedef union YYSTYPE
/* Line 214 of yacc.c */ /* Line 293 of yacc.c */
#line 176 "dtc-parser.tab.c" #line 174 "dtc-parser.tab.c"
} YYSTYPE; } YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1 # define YYSTYPE_IS_TRIVIAL 1
# define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define yystype YYSTYPE /* obsolescent; will be withdrawn */
...@@ -183,8 +181,8 @@ typedef union YYSTYPE ...@@ -183,8 +181,8 @@ typedef union YYSTYPE
/* Copy the second part of user declarations. */ /* Copy the second part of user declarations. */
/* Line 264 of yacc.c */ /* Line 343 of yacc.c */
#line 188 "dtc-parser.tab.c" #line 186 "dtc-parser.tab.c"
#ifdef short #ifdef short
# undef short # undef short
...@@ -234,7 +232,7 @@ typedef short int yytype_int16; ...@@ -234,7 +232,7 @@ typedef short int yytype_int16;
#define YYSIZE_MAXIMUM ((YYSIZE_T) -1) #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
#ifndef YY_ #ifndef YY_
# if YYENABLE_NLS # if defined YYENABLE_NLS && YYENABLE_NLS
# if ENABLE_NLS # if ENABLE_NLS
# include <libintl.h> /* INFRINGES ON USER NAME SPACE */ # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
# define YY_(msgid) dgettext ("bison-runtime", msgid) # define YY_(msgid) dgettext ("bison-runtime", msgid)
...@@ -287,11 +285,11 @@ YYID (yyi) ...@@ -287,11 +285,11 @@ YYID (yyi)
# define alloca _alloca # define alloca _alloca
# else # else
# define YYSTACK_ALLOC alloca # define YYSTACK_ALLOC alloca
# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER) || defined __cplusplus || defined _MSC_VER)
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
# ifndef _STDLIB_H # ifndef EXIT_SUCCESS
# define _STDLIB_H 1 # define EXIT_SUCCESS 0
# endif # endif
# endif # endif
# endif # endif
...@@ -314,24 +312,24 @@ YYID (yyi) ...@@ -314,24 +312,24 @@ YYID (yyi)
# ifndef YYSTACK_ALLOC_MAXIMUM # ifndef YYSTACK_ALLOC_MAXIMUM
# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
# endif # endif
# if (defined __cplusplus && ! defined _STDLIB_H \ # if (defined __cplusplus && ! defined EXIT_SUCCESS \
&& ! ((defined YYMALLOC || defined malloc) \ && ! ((defined YYMALLOC || defined malloc) \
&& (defined YYFREE || defined free))) && (defined YYFREE || defined free)))
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
# ifndef _STDLIB_H # ifndef EXIT_SUCCESS
# define _STDLIB_H 1 # define EXIT_SUCCESS 0
# endif # endif
# endif # endif
# ifndef YYMALLOC # ifndef YYMALLOC
# define YYMALLOC malloc # define YYMALLOC malloc
# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ # if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER) || defined __cplusplus || defined _MSC_VER)
void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
# endif # endif
# endif # endif
# ifndef YYFREE # ifndef YYFREE
# define YYFREE free # define YYFREE free
# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ # if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER) || defined __cplusplus || defined _MSC_VER)
void free (void *); /* INFRINGES ON USER NAME SPACE */ void free (void *); /* INFRINGES ON USER NAME SPACE */
# endif # endif
...@@ -360,23 +358,7 @@ union yyalloc ...@@ -360,23 +358,7 @@ union yyalloc
((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
+ YYSTACK_GAP_MAXIMUM) + YYSTACK_GAP_MAXIMUM)
/* Copy COUNT objects from FROM to TO. The source and destination do # define YYCOPY_NEEDED 1
not overlap. */
# ifndef YYCOPY
# if defined __GNUC__ && 1 < __GNUC__
# define YYCOPY(To, From, Count) \
__builtin_memcpy (To, From, (Count) * sizeof (*(From)))
# else
# define YYCOPY(To, From, Count) \
do \
{ \
YYSIZE_T yyi; \
for (yyi = 0; yyi < (Count); yyi++) \
(To)[yyi] = (From)[yyi]; \
} \
while (YYID (0))
# endif
# endif
/* Relocate STACK from its old location to the new one. The /* Relocate STACK from its old location to the new one. The
local variables YYSIZE and YYSTACKSIZE give the old and new number of local variables YYSIZE and YYSTACKSIZE give the old and new number of
...@@ -396,6 +378,26 @@ union yyalloc ...@@ -396,6 +378,26 @@ union yyalloc
#endif #endif
#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
/* Copy COUNT objects from FROM to TO. The source and destination do
not overlap. */
# ifndef YYCOPY
# if defined __GNUC__ && 1 < __GNUC__
# define YYCOPY(To, From, Count) \
__builtin_memcpy (To, From, (Count) * sizeof (*(From)))
# else
# define YYCOPY(To, From, Count) \
do \
{ \
YYSIZE_T yyi; \
for (yyi = 0; yyi < (Count); yyi++) \
(To)[yyi] = (From)[yyi]; \
} \
while (YYID (0))
# endif
# endif
#endif /* !YYCOPY_NEEDED */
/* YYFINAL -- State number of the termination state. */ /* YYFINAL -- State number of the termination state. */
#define YYFINAL 4 #define YYFINAL 4
/* YYLAST -- Last index in YYTABLE. */ /* YYLAST -- Last index in YYTABLE. */
...@@ -571,8 +573,8 @@ static const yytype_uint8 yyr2[] = ...@@ -571,8 +573,8 @@ static const yytype_uint8 yyr2[] =
2, 0, 2, 2, 0, 2, 2, 2, 3, 2 2, 0, 2, 2, 0, 2, 2, 2, 3, 2
}; };
/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state /* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM.
STATE-NUM when YYTABLE doesn't specify something else to do. Zero Performed when YYTABLE doesn't specify something else to do. Zero
means the default is an error. */ means the default is an error. */
static const yytype_uint8 yydefact[] = static const yytype_uint8 yydefact[] =
{ {
...@@ -633,8 +635,7 @@ static const yytype_int8 yypgoto[] = ...@@ -633,8 +635,7 @@ static const yytype_int8 yypgoto[] =
/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
positive, shift that token. If negative, reduce the rule which positive, shift that token. If negative, reduce the rule which
number is the opposite. If zero, do what YYDEFACT says. number is the opposite. If YYTABLE_NINF, syntax error. */
If YYTABLE_NINF, syntax error. */
#define YYTABLE_NINF -1 #define YYTABLE_NINF -1
static const yytype_uint8 yytable[] = static const yytype_uint8 yytable[] =
{ {
...@@ -654,6 +655,12 @@ static const yytype_uint8 yytable[] = ...@@ -654,6 +655,12 @@ static const yytype_uint8 yytable[] =
137, 0, 73, 139 137, 0, 73, 139
}; };
#define yypact_value_is_default(yystate) \
((yystate) == (-78))
#define yytable_value_is_error(yytable_value) \
YYID (0)
static const yytype_int16 yycheck[] = static const yytype_int16 yycheck[] =
{ {
5, 38, 39, 17, 18, 19, 12, 12, 17, 18, 5, 38, 39, 17, 18, 19, 12, 12, 17, 18,
...@@ -705,9 +712,18 @@ static const yytype_uint8 yystos[] = ...@@ -705,9 +712,18 @@ static const yytype_uint8 yystos[] =
/* Like YYERROR except do call yyerror. This remains here temporarily /* Like YYERROR except do call yyerror. This remains here temporarily
to ease the transition to the new meaning of YYERROR, for GCC. to ease the transition to the new meaning of YYERROR, for GCC.
Once GCC version 2 has supplanted version 1, this can go. */ Once GCC version 2 has supplanted version 1, this can go. However,
YYFAIL appears to be in use. Nevertheless, it is formally deprecated
in Bison 2.4.2's NEWS entry, where a plan to phase it out is
discussed. */
#define YYFAIL goto yyerrlab #define YYFAIL goto yyerrlab
#if defined YYFAIL
/* This is here to suppress warnings from the GCC cpp's
-Wunused-macros. Normally we don't worry about that warning, but
some users do, and we want to make it easy for users to remove
YYFAIL uses, which will produce warnings from Bison 2.5. */
#endif
#define YYRECOVERING() (!!yyerrstatus) #define YYRECOVERING() (!!yyerrstatus)
...@@ -717,7 +733,6 @@ do \ ...@@ -717,7 +733,6 @@ do \
{ \ { \
yychar = (Token); \ yychar = (Token); \
yylval = (Value); \ yylval = (Value); \
yytoken = YYTRANSLATE (yychar); \
YYPOPSTACK (1); \ YYPOPSTACK (1); \
goto yybackup; \ goto yybackup; \
} \ } \
...@@ -759,19 +774,10 @@ while (YYID (0)) ...@@ -759,19 +774,10 @@ while (YYID (0))
#endif #endif
/* YY_LOCATION_PRINT -- Print the location on the stream. /* This macro is provided for backward compatibility. */
This macro was not mandated originally: define only if we know
we won't break user code: when these are the locations we know. */
#ifndef YY_LOCATION_PRINT #ifndef YY_LOCATION_PRINT
# if YYLTYPE_IS_TRIVIAL
# define YY_LOCATION_PRINT(File, Loc) \
fprintf (File, "%d.%d-%d.%d", \
(Loc).first_line, (Loc).first_column, \
(Loc).last_line, (Loc).last_column)
# else
# define YY_LOCATION_PRINT(File, Loc) ((void) 0) # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
# endif
#endif #endif
...@@ -963,7 +969,6 @@ int yydebug; ...@@ -963,7 +969,6 @@ int yydebug;
# define YYMAXDEPTH 10000 # define YYMAXDEPTH 10000
#endif #endif
#if YYERROR_VERBOSE #if YYERROR_VERBOSE
...@@ -1066,115 +1071,142 @@ yytnamerr (char *yyres, const char *yystr) ...@@ -1066,115 +1071,142 @@ yytnamerr (char *yyres, const char *yystr)
} }
# endif # endif
/* Copy into YYRESULT an error message about the unexpected token /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
YYCHAR while in state YYSTATE. Return the number of bytes copied, about the unexpected token YYTOKEN for the state stack whose top is
including the terminating null byte. If YYRESULT is null, do not YYSSP.
copy anything; just return the number of bytes that would be
copied. As a special case, return 0 if an ordinary "syntax error"
message will do. Return YYSIZE_MAXIMUM if overflow occurs during
size calculation. */
static YYSIZE_T
yysyntax_error (char *yyresult, int yystate, int yychar)
{
int yyn = yypact[yystate];
if (! (YYPACT_NINF < yyn && yyn <= YYLAST)) Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
return 0; not large enough to hold the message. In that case, also set
else *YYMSG_ALLOC to the required number of bytes. Return 2 if the
{ required number of bytes is too large to store. */
int yytype = YYTRANSLATE (yychar); static int
YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]); yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
yytype_int16 *yyssp, int yytoken)
{
YYSIZE_T yysize0 = yytnamerr (0, yytname[yytoken]);
YYSIZE_T yysize = yysize0; YYSIZE_T yysize = yysize0;
YYSIZE_T yysize1; YYSIZE_T yysize1;
int yysize_overflow = 0;
enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
/* Internationalized format string. */
const char *yyformat = 0;
/* Arguments of yyformat. */
char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
int yyx; /* Number of reported tokens (one for the "unexpected", one per
"expected"). */
# if 0 int yycount = 0;
/* This is so xgettext sees the translatable formats that are
constructed on the fly. */ /* There are many possibilities here to consider:
YY_("syntax error, unexpected %s"); - Assume YYFAIL is not used. It's too flawed to consider. See
YY_("syntax error, unexpected %s, expecting %s"); <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html>
YY_("syntax error, unexpected %s, expecting %s or %s"); for details. YYERROR is fine as it does not invoke this
YY_("syntax error, unexpected %s, expecting %s or %s or %s"); function.
YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"); - If this state is a consistent state with a default action, then
# endif the only way this function was invoked is if the default action
char *yyfmt; is an error action. In that case, don't check for expected
char const *yyf; tokens because there are none.
static char const yyunexpected[] = "syntax error, unexpected %s"; - The only way there can be no lookahead present (in yychar) is if
static char const yyexpecting[] = ", expecting %s"; this state is a consistent state with a default action. Thus,
static char const yyor[] = " or %s"; detecting the absence of a lookahead is sufficient to determine
char yyformat[sizeof yyunexpected that there is no unexpected or expected token to report. In that
+ sizeof yyexpecting - 1 case, just report a simple "syntax error".
+ ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) - Don't assume there isn't a lookahead just because this state is a
* (sizeof yyor - 1))]; consistent state with a default action. There might have been a
char const *yyprefix = yyexpecting; previous inconsistent state, consistent state with a non-default
action, or user semantic action that manipulated yychar.
- Of course, the expected token list depends on states to have
correct lookahead information, and it depends on the parser not
to perform extra reductions after fetching a lookahead from the
scanner and before detecting a syntax error. Thus, state merging
(from LALR or IELR) and default reductions corrupt the expected
token list. However, the list is correct for canonical LR with
one exception: it will still contain any token that will not be
accepted due to an error action in a later state.
*/
if (yytoken != YYEMPTY)
{
int yyn = yypact[*yyssp];
yyarg[yycount++] = yytname[yytoken];
if (!yypact_value_is_default (yyn))
{
/* Start YYX at -YYN if negative to avoid negative indexes in /* Start YYX at -YYN if negative to avoid negative indexes in
YYCHECK. */ YYCHECK. In other words, skip the first -YYN actions for
this state because they are default actions. */
int yyxbegin = yyn < 0 ? -yyn : 0; int yyxbegin = yyn < 0 ? -yyn : 0;
/* Stay within bounds of both yycheck and yytname. */ /* Stay within bounds of both yycheck and yytname. */
int yychecklim = YYLAST - yyn + 1; int yychecklim = YYLAST - yyn + 1;
int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
int yycount = 1; int yyx;
yyarg[0] = yytname[yytype];
yyfmt = yystpcpy (yyformat, yyunexpected);
for (yyx = yyxbegin; yyx < yyxend; ++yyx) for (yyx = yyxbegin; yyx < yyxend; ++yyx)
if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
&& !yytable_value_is_error (yytable[yyx + yyn]))
{ {
if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
{ {
yycount = 1; yycount = 1;
yysize = yysize0; yysize = yysize0;
yyformat[sizeof yyunexpected - 1] = '\0';
break; break;
} }
yyarg[yycount++] = yytname[yyx]; yyarg[yycount++] = yytname[yyx];
yysize1 = yysize + yytnamerr (0, yytname[yyx]); yysize1 = yysize + yytnamerr (0, yytname[yyx]);
yysize_overflow |= (yysize1 < yysize); if (! (yysize <= yysize1
&& yysize1 <= YYSTACK_ALLOC_MAXIMUM))
return 2;
yysize = yysize1; yysize = yysize1;
yyfmt = yystpcpy (yyfmt, yyprefix); }
yyprefix = yyor; }
} }
yyf = YY_(yyformat); switch (yycount)
yysize1 = yysize + yystrlen (yyf); {
yysize_overflow |= (yysize1 < yysize); # define YYCASE_(N, S) \
yysize = yysize1; case N: \
yyformat = S; \
break
YYCASE_(0, YY_("syntax error"));
YYCASE_(1, YY_("syntax error, unexpected %s"));
YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
# undef YYCASE_
}
if (yysize_overflow) yysize1 = yysize + yystrlen (yyformat);
return YYSIZE_MAXIMUM; if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
return 2;
yysize = yysize1;
if (yyresult) if (*yymsg_alloc < yysize)
{ {
*yymsg_alloc = 2 * yysize;
if (! (yysize <= *yymsg_alloc
&& *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
*yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
return 1;
}
/* Avoid sprintf, as that infringes on the user's name space. /* Avoid sprintf, as that infringes on the user's name space.
Don't have undefined behavior even if the translation Don't have undefined behavior even if the translation
produced a string with the wrong number of "%s"s. */ produced a string with the wrong number of "%s"s. */
char *yyp = yyresult;
int yyi = 0;
while ((*yyp = *yyf) != '\0')
{ {
if (*yyp == '%' && yyf[1] == 's' && yyi < yycount) char *yyp = *yymsg;
int yyi = 0;
while ((*yyp = *yyformat) != '\0')
if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
{ {
yyp += yytnamerr (yyp, yyarg[yyi++]); yyp += yytnamerr (yyp, yyarg[yyi++]);
yyf += 2; yyformat += 2;
} }
else else
{ {
yyp++; yyp++;
yyf++; yyformat++;
}
}
} }
return yysize;
} }
return 0;
} }
#endif /* YYERROR_VERBOSE */ #endif /* YYERROR_VERBOSE */
/*-----------------------------------------------. /*-----------------------------------------------.
| Release the memory associated to this symbol. | | Release the memory associated to this symbol. |
...@@ -1207,6 +1239,7 @@ yydestruct (yymsg, yytype, yyvaluep) ...@@ -1207,6 +1239,7 @@ yydestruct (yymsg, yytype, yyvaluep)
} }
} }
/* Prevent warnings from -Wmissing-prototypes. */ /* Prevent warnings from -Wmissing-prototypes. */
#ifdef YYPARSE_PARAM #ifdef YYPARSE_PARAM
#if defined __STDC__ || defined __cplusplus #if defined __STDC__ || defined __cplusplus
...@@ -1233,10 +1266,9 @@ YYSTYPE yylval; ...@@ -1233,10 +1266,9 @@ YYSTYPE yylval;
int yynerrs; int yynerrs;
/*----------.
/*-------------------------. | yyparse. |
| yyparse or yypush_parse. | `----------*/
`-------------------------*/
#ifdef YYPARSE_PARAM #ifdef YYPARSE_PARAM
#if (defined __STDC__ || defined __C99__FUNC__ \ #if (defined __STDC__ || defined __C99__FUNC__ \
...@@ -1260,8 +1292,6 @@ yyparse () ...@@ -1260,8 +1292,6 @@ yyparse ()
#endif #endif
#endif #endif
{ {
int yystate; int yystate;
/* Number of tokens to shift before error messages enabled. */ /* Number of tokens to shift before error messages enabled. */
int yyerrstatus; int yyerrstatus;
...@@ -1416,7 +1446,7 @@ yybackup: ...@@ -1416,7 +1446,7 @@ yybackup:
/* First try to decide what to do without reference to lookahead token. */ /* First try to decide what to do without reference to lookahead token. */
yyn = yypact[yystate]; yyn = yypact[yystate];
if (yyn == YYPACT_NINF) if (yypact_value_is_default (yyn))
goto yydefault; goto yydefault;
/* Not known => get a lookahead token if don't already have one. */ /* Not known => get a lookahead token if don't already have one. */
...@@ -1447,7 +1477,7 @@ yybackup: ...@@ -1447,7 +1477,7 @@ yybackup:
yyn = yytable[yyn]; yyn = yytable[yyn];
if (yyn <= 0) if (yyn <= 0)
{ {
if (yyn == 0 || yyn == YYTABLE_NINF) if (yytable_value_is_error (yyn))
goto yyerrlab; goto yyerrlab;
yyn = -yyn; yyn = -yyn;
goto yyreduce; goto yyreduce;
...@@ -1503,72 +1533,72 @@ yyreduce: ...@@ -1503,72 +1533,72 @@ yyreduce:
{ {
case 2: case 2:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 110 "dtc-parser.y" #line 110 "dtc-parser.y"
{ {
the_boot_info = build_boot_info((yyvsp[(3) - (4)].re), (yyvsp[(4) - (4)].node), the_boot_info = build_boot_info((yyvsp[(3) - (4)].re), (yyvsp[(4) - (4)].node),
guess_boot_cpuid((yyvsp[(4) - (4)].node))); guess_boot_cpuid((yyvsp[(4) - (4)].node)));
;} }
break; break;
case 3: case 3:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 118 "dtc-parser.y" #line 118 "dtc-parser.y"
{ {
(yyval.re) = NULL; (yyval.re) = NULL;
;} }
break; break;
case 4: case 4:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 122 "dtc-parser.y" #line 122 "dtc-parser.y"
{ {
(yyval.re) = chain_reserve_entry((yyvsp[(1) - (2)].re), (yyvsp[(2) - (2)].re)); (yyval.re) = chain_reserve_entry((yyvsp[(1) - (2)].re), (yyvsp[(2) - (2)].re));
;} }
break; break;
case 5: case 5:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 129 "dtc-parser.y" #line 129 "dtc-parser.y"
{ {
(yyval.re) = build_reserve_entry((yyvsp[(2) - (4)].integer), (yyvsp[(3) - (4)].integer)); (yyval.re) = build_reserve_entry((yyvsp[(2) - (4)].integer), (yyvsp[(3) - (4)].integer));
;} }
break; break;
case 6: case 6:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 133 "dtc-parser.y" #line 133 "dtc-parser.y"
{ {
add_label(&(yyvsp[(2) - (2)].re)->labels, (yyvsp[(1) - (2)].labelref)); add_label(&(yyvsp[(2) - (2)].re)->labels, (yyvsp[(1) - (2)].labelref));
(yyval.re) = (yyvsp[(2) - (2)].re); (yyval.re) = (yyvsp[(2) - (2)].re);
;} }
break; break;
case 7: case 7:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 141 "dtc-parser.y" #line 141 "dtc-parser.y"
{ {
(yyval.node) = name_node((yyvsp[(2) - (2)].node), ""); (yyval.node) = name_node((yyvsp[(2) - (2)].node), "");
;} }
break; break;
case 8: case 8:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 145 "dtc-parser.y" #line 145 "dtc-parser.y"
{ {
(yyval.node) = merge_nodes((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); (yyval.node) = merge_nodes((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
;} }
break; break;
case 9: case 9:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 149 "dtc-parser.y" #line 149 "dtc-parser.y"
{ {
struct node *target = get_node_by_ref((yyvsp[(1) - (3)].node), (yyvsp[(2) - (3)].labelref)); struct node *target = get_node_by_ref((yyvsp[(1) - (3)].node), (yyvsp[(2) - (3)].labelref));
...@@ -1578,12 +1608,12 @@ yyreduce: ...@@ -1578,12 +1608,12 @@ yyreduce:
else else
print_error("label or path, '%s', not found", (yyvsp[(2) - (3)].labelref)); print_error("label or path, '%s', not found", (yyvsp[(2) - (3)].labelref));
(yyval.node) = (yyvsp[(1) - (3)].node); (yyval.node) = (yyvsp[(1) - (3)].node);
;} }
break; break;
case 10: case 10:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 159 "dtc-parser.y" #line 159 "dtc-parser.y"
{ {
struct node *target = get_node_by_ref((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].labelref)); struct node *target = get_node_by_ref((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].labelref));
...@@ -1594,112 +1624,112 @@ yyreduce: ...@@ -1594,112 +1624,112 @@ yyreduce:
delete_node(target); delete_node(target);
(yyval.node) = (yyvsp[(1) - (4)].node); (yyval.node) = (yyvsp[(1) - (4)].node);
;} }
break; break;
case 11: case 11:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 173 "dtc-parser.y" #line 173 "dtc-parser.y"
{ {
(yyval.node) = build_node((yyvsp[(2) - (5)].proplist), (yyvsp[(3) - (5)].nodelist)); (yyval.node) = build_node((yyvsp[(2) - (5)].proplist), (yyvsp[(3) - (5)].nodelist));
;} }
break; break;
case 12: case 12:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 180 "dtc-parser.y" #line 180 "dtc-parser.y"
{ {
(yyval.proplist) = NULL; (yyval.proplist) = NULL;
;} }
break; break;
case 13: case 13:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 184 "dtc-parser.y" #line 184 "dtc-parser.y"
{ {
(yyval.proplist) = chain_property((yyvsp[(2) - (2)].prop), (yyvsp[(1) - (2)].proplist)); (yyval.proplist) = chain_property((yyvsp[(2) - (2)].prop), (yyvsp[(1) - (2)].proplist));
;} }
break; break;
case 14: case 14:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 191 "dtc-parser.y" #line 191 "dtc-parser.y"
{ {
(yyval.prop) = build_property((yyvsp[(1) - (4)].propnodename), (yyvsp[(3) - (4)].data)); (yyval.prop) = build_property((yyvsp[(1) - (4)].propnodename), (yyvsp[(3) - (4)].data));
;} }
break; break;
case 15: case 15:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 195 "dtc-parser.y" #line 195 "dtc-parser.y"
{ {
(yyval.prop) = build_property((yyvsp[(1) - (2)].propnodename), empty_data); (yyval.prop) = build_property((yyvsp[(1) - (2)].propnodename), empty_data);
;} }
break; break;
case 16: case 16:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 199 "dtc-parser.y" #line 199 "dtc-parser.y"
{ {
(yyval.prop) = build_property_delete((yyvsp[(2) - (3)].propnodename)); (yyval.prop) = build_property_delete((yyvsp[(2) - (3)].propnodename));
;} }
break; break;
case 17: case 17:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 203 "dtc-parser.y" #line 203 "dtc-parser.y"
{ {
add_label(&(yyvsp[(2) - (2)].prop)->labels, (yyvsp[(1) - (2)].labelref)); add_label(&(yyvsp[(2) - (2)].prop)->labels, (yyvsp[(1) - (2)].labelref));
(yyval.prop) = (yyvsp[(2) - (2)].prop); (yyval.prop) = (yyvsp[(2) - (2)].prop);
;} }
break; break;
case 18: case 18:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 211 "dtc-parser.y" #line 211 "dtc-parser.y"
{ {
(yyval.data) = data_merge((yyvsp[(1) - (2)].data), (yyvsp[(2) - (2)].data)); (yyval.data) = data_merge((yyvsp[(1) - (2)].data), (yyvsp[(2) - (2)].data));
;} }
break; break;
case 19: case 19:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 215 "dtc-parser.y" #line 215 "dtc-parser.y"
{ {
(yyval.data) = data_merge((yyvsp[(1) - (3)].data), (yyvsp[(2) - (3)].array).data); (yyval.data) = data_merge((yyvsp[(1) - (3)].data), (yyvsp[(2) - (3)].array).data);
;} }
break; break;
case 20: case 20:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 219 "dtc-parser.y" #line 219 "dtc-parser.y"
{ {
(yyval.data) = data_merge((yyvsp[(1) - (4)].data), (yyvsp[(3) - (4)].data)); (yyval.data) = data_merge((yyvsp[(1) - (4)].data), (yyvsp[(3) - (4)].data));
;} }
break; break;
case 21: case 21:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 223 "dtc-parser.y" #line 223 "dtc-parser.y"
{ {
(yyval.data) = data_add_marker((yyvsp[(1) - (2)].data), REF_PATH, (yyvsp[(2) - (2)].labelref)); (yyval.data) = data_add_marker((yyvsp[(1) - (2)].data), REF_PATH, (yyvsp[(2) - (2)].labelref));
;} }
break; break;
case 22: case 22:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 227 "dtc-parser.y" #line 227 "dtc-parser.y"
{ {
FILE *f = srcfile_relative_open((yyvsp[(4) - (9)].data).val, NULL); FILE *f = srcfile_relative_open((yyvsp[(4) - (9)].data).val, NULL);
...@@ -1716,12 +1746,12 @@ yyreduce: ...@@ -1716,12 +1746,12 @@ yyreduce:
(yyval.data) = data_merge((yyvsp[(1) - (9)].data), d); (yyval.data) = data_merge((yyvsp[(1) - (9)].data), d);
fclose(f); fclose(f);
;} }
break; break;
case 23: case 23:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 244 "dtc-parser.y" #line 244 "dtc-parser.y"
{ {
FILE *f = srcfile_relative_open((yyvsp[(4) - (5)].data).val, NULL); FILE *f = srcfile_relative_open((yyvsp[(4) - (5)].data).val, NULL);
...@@ -1731,48 +1761,48 @@ yyreduce: ...@@ -1731,48 +1761,48 @@ yyreduce:
(yyval.data) = data_merge((yyvsp[(1) - (5)].data), d); (yyval.data) = data_merge((yyvsp[(1) - (5)].data), d);
fclose(f); fclose(f);
;} }
break; break;
case 24: case 24:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 254 "dtc-parser.y" #line 254 "dtc-parser.y"
{ {
(yyval.data) = data_add_marker((yyvsp[(1) - (2)].data), LABEL, (yyvsp[(2) - (2)].labelref)); (yyval.data) = data_add_marker((yyvsp[(1) - (2)].data), LABEL, (yyvsp[(2) - (2)].labelref));
;} }
break; break;
case 25: case 25:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 261 "dtc-parser.y" #line 261 "dtc-parser.y"
{ {
(yyval.data) = empty_data; (yyval.data) = empty_data;
;} }
break; break;
case 26: case 26:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 265 "dtc-parser.y" #line 265 "dtc-parser.y"
{ {
(yyval.data) = (yyvsp[(1) - (2)].data); (yyval.data) = (yyvsp[(1) - (2)].data);
;} }
break; break;
case 27: case 27:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 269 "dtc-parser.y" #line 269 "dtc-parser.y"
{ {
(yyval.data) = data_add_marker((yyvsp[(1) - (2)].data), LABEL, (yyvsp[(2) - (2)].labelref)); (yyval.data) = data_add_marker((yyvsp[(1) - (2)].data), LABEL, (yyvsp[(2) - (2)].labelref));
;} }
break; break;
case 28: case 28:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 276 "dtc-parser.y" #line 276 "dtc-parser.y"
{ {
(yyval.array).data = empty_data; (yyval.array).data = empty_data;
...@@ -1787,22 +1817,22 @@ yyreduce: ...@@ -1787,22 +1817,22 @@ yyreduce:
" are currently supported"); " are currently supported");
(yyval.array).bits = 32; (yyval.array).bits = 32;
} }
;} }
break; break;
case 29: case 29:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 291 "dtc-parser.y" #line 291 "dtc-parser.y"
{ {
(yyval.array).data = empty_data; (yyval.array).data = empty_data;
(yyval.array).bits = 32; (yyval.array).bits = 32;
;} }
break; break;
case 30: case 30:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 296 "dtc-parser.y" #line 296 "dtc-parser.y"
{ {
if ((yyvsp[(1) - (2)].array).bits < 64) { if ((yyvsp[(1) - (2)].array).bits < 64) {
...@@ -1822,12 +1852,12 @@ yyreduce: ...@@ -1822,12 +1852,12 @@ yyreduce:
} }
(yyval.array).data = data_append_integer((yyvsp[(1) - (2)].array).data, (yyvsp[(2) - (2)].integer), (yyvsp[(1) - (2)].array).bits); (yyval.array).data = data_append_integer((yyvsp[(1) - (2)].array).data, (yyvsp[(2) - (2)].integer), (yyvsp[(1) - (2)].array).bits);
;} }
break; break;
case 31: case 31:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 316 "dtc-parser.y" #line 316 "dtc-parser.y"
{ {
uint64_t val = ~0ULL >> (64 - (yyvsp[(1) - (2)].array).bits); uint64_t val = ~0ULL >> (64 - (yyvsp[(1) - (2)].array).bits);
...@@ -1841,288 +1871,299 @@ yyreduce: ...@@ -1841,288 +1871,299 @@ yyreduce:
"arrays with 32-bit elements."); "arrays with 32-bit elements.");
(yyval.array).data = data_append_integer((yyvsp[(1) - (2)].array).data, val, (yyvsp[(1) - (2)].array).bits); (yyval.array).data = data_append_integer((yyvsp[(1) - (2)].array).data, val, (yyvsp[(1) - (2)].array).bits);
;} }
break; break;
case 32: case 32:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 330 "dtc-parser.y" #line 330 "dtc-parser.y"
{ {
(yyval.array).data = data_add_marker((yyvsp[(1) - (2)].array).data, LABEL, (yyvsp[(2) - (2)].labelref)); (yyval.array).data = data_add_marker((yyvsp[(1) - (2)].array).data, LABEL, (yyvsp[(2) - (2)].labelref));
;} }
break; break;
case 33: case 33:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 337 "dtc-parser.y" #line 337 "dtc-parser.y"
{ {
(yyval.integer) = eval_literal((yyvsp[(1) - (1)].literal), 0, 64); (yyval.integer) = eval_literal((yyvsp[(1) - (1)].literal), 0, 64);
;} }
break; break;
case 34: case 34:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 341 "dtc-parser.y" #line 341 "dtc-parser.y"
{ {
(yyval.integer) = eval_char_literal((yyvsp[(1) - (1)].literal)); (yyval.integer) = eval_char_literal((yyvsp[(1) - (1)].literal));
;} }
break; break;
case 35: case 35:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 345 "dtc-parser.y" #line 345 "dtc-parser.y"
{ {
(yyval.integer) = (yyvsp[(2) - (3)].integer); (yyval.integer) = (yyvsp[(2) - (3)].integer);
;} }
break; break;
case 38: case 38:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 356 "dtc-parser.y" #line 356 "dtc-parser.y"
{ (yyval.integer) = (yyvsp[(1) - (5)].integer) ? (yyvsp[(3) - (5)].integer) : (yyvsp[(5) - (5)].integer); ;} { (yyval.integer) = (yyvsp[(1) - (5)].integer) ? (yyvsp[(3) - (5)].integer) : (yyvsp[(5) - (5)].integer); }
break; break;
case 40: case 40:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 361 "dtc-parser.y" #line 361 "dtc-parser.y"
{ (yyval.integer) = (yyvsp[(1) - (3)].integer) || (yyvsp[(3) - (3)].integer); ;} { (yyval.integer) = (yyvsp[(1) - (3)].integer) || (yyvsp[(3) - (3)].integer); }
break; break;
case 42: case 42:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 366 "dtc-parser.y" #line 366 "dtc-parser.y"
{ (yyval.integer) = (yyvsp[(1) - (3)].integer) && (yyvsp[(3) - (3)].integer); ;} { (yyval.integer) = (yyvsp[(1) - (3)].integer) && (yyvsp[(3) - (3)].integer); }
break; break;
case 44: case 44:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 371 "dtc-parser.y" #line 371 "dtc-parser.y"
{ (yyval.integer) = (yyvsp[(1) - (3)].integer) | (yyvsp[(3) - (3)].integer); ;} { (yyval.integer) = (yyvsp[(1) - (3)].integer) | (yyvsp[(3) - (3)].integer); }
break; break;
case 46: case 46:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 376 "dtc-parser.y" #line 376 "dtc-parser.y"
{ (yyval.integer) = (yyvsp[(1) - (3)].integer) ^ (yyvsp[(3) - (3)].integer); ;} { (yyval.integer) = (yyvsp[(1) - (3)].integer) ^ (yyvsp[(3) - (3)].integer); }
break; break;
case 48: case 48:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 381 "dtc-parser.y" #line 381 "dtc-parser.y"
{ (yyval.integer) = (yyvsp[(1) - (3)].integer) & (yyvsp[(3) - (3)].integer); ;} { (yyval.integer) = (yyvsp[(1) - (3)].integer) & (yyvsp[(3) - (3)].integer); }
break; break;
case 50: case 50:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 386 "dtc-parser.y" #line 386 "dtc-parser.y"
{ (yyval.integer) = (yyvsp[(1) - (3)].integer) == (yyvsp[(3) - (3)].integer); ;} { (yyval.integer) = (yyvsp[(1) - (3)].integer) == (yyvsp[(3) - (3)].integer); }
break; break;
case 51: case 51:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 387 "dtc-parser.y" #line 387 "dtc-parser.y"
{ (yyval.integer) = (yyvsp[(1) - (3)].integer) != (yyvsp[(3) - (3)].integer); ;} { (yyval.integer) = (yyvsp[(1) - (3)].integer) != (yyvsp[(3) - (3)].integer); }
break; break;
case 53: case 53:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 392 "dtc-parser.y" #line 392 "dtc-parser.y"
{ (yyval.integer) = (yyvsp[(1) - (3)].integer) < (yyvsp[(3) - (3)].integer); ;} { (yyval.integer) = (yyvsp[(1) - (3)].integer) < (yyvsp[(3) - (3)].integer); }
break; break;
case 54: case 54:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 393 "dtc-parser.y" #line 393 "dtc-parser.y"
{ (yyval.integer) = (yyvsp[(1) - (3)].integer) > (yyvsp[(3) - (3)].integer); ;} { (yyval.integer) = (yyvsp[(1) - (3)].integer) > (yyvsp[(3) - (3)].integer); }
break; break;
case 55: case 55:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 394 "dtc-parser.y" #line 394 "dtc-parser.y"
{ (yyval.integer) = (yyvsp[(1) - (3)].integer) <= (yyvsp[(3) - (3)].integer); ;} { (yyval.integer) = (yyvsp[(1) - (3)].integer) <= (yyvsp[(3) - (3)].integer); }
break; break;
case 56: case 56:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 395 "dtc-parser.y" #line 395 "dtc-parser.y"
{ (yyval.integer) = (yyvsp[(1) - (3)].integer) >= (yyvsp[(3) - (3)].integer); ;} { (yyval.integer) = (yyvsp[(1) - (3)].integer) >= (yyvsp[(3) - (3)].integer); }
break; break;
case 57: case 57:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 399 "dtc-parser.y" #line 399 "dtc-parser.y"
{ (yyval.integer) = (yyvsp[(1) - (3)].integer) << (yyvsp[(3) - (3)].integer); ;} { (yyval.integer) = (yyvsp[(1) - (3)].integer) << (yyvsp[(3) - (3)].integer); }
break; break;
case 58: case 58:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 400 "dtc-parser.y" #line 400 "dtc-parser.y"
{ (yyval.integer) = (yyvsp[(1) - (3)].integer) >> (yyvsp[(3) - (3)].integer); ;} { (yyval.integer) = (yyvsp[(1) - (3)].integer) >> (yyvsp[(3) - (3)].integer); }
break; break;
case 60: case 60:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 405 "dtc-parser.y" #line 405 "dtc-parser.y"
{ (yyval.integer) = (yyvsp[(1) - (3)].integer) + (yyvsp[(3) - (3)].integer); ;} { (yyval.integer) = (yyvsp[(1) - (3)].integer) + (yyvsp[(3) - (3)].integer); }
break; break;
case 61: case 61:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 406 "dtc-parser.y" #line 406 "dtc-parser.y"
{ (yyval.integer) = (yyvsp[(1) - (3)].integer) - (yyvsp[(3) - (3)].integer); ;} { (yyval.integer) = (yyvsp[(1) - (3)].integer) - (yyvsp[(3) - (3)].integer); }
break; break;
case 63: case 63:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 411 "dtc-parser.y" #line 411 "dtc-parser.y"
{ (yyval.integer) = (yyvsp[(1) - (3)].integer) * (yyvsp[(3) - (3)].integer); ;} { (yyval.integer) = (yyvsp[(1) - (3)].integer) * (yyvsp[(3) - (3)].integer); }
break; break;
case 64: case 64:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 412 "dtc-parser.y" #line 412 "dtc-parser.y"
{ (yyval.integer) = (yyvsp[(1) - (3)].integer) / (yyvsp[(3) - (3)].integer); ;} { (yyval.integer) = (yyvsp[(1) - (3)].integer) / (yyvsp[(3) - (3)].integer); }
break; break;
case 65: case 65:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 413 "dtc-parser.y" #line 413 "dtc-parser.y"
{ (yyval.integer) = (yyvsp[(1) - (3)].integer) % (yyvsp[(3) - (3)].integer); ;} { (yyval.integer) = (yyvsp[(1) - (3)].integer) % (yyvsp[(3) - (3)].integer); }
break; break;
case 68: case 68:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 419 "dtc-parser.y" #line 419 "dtc-parser.y"
{ (yyval.integer) = -(yyvsp[(2) - (2)].integer); ;} { (yyval.integer) = -(yyvsp[(2) - (2)].integer); }
break; break;
case 69: case 69:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 420 "dtc-parser.y" #line 420 "dtc-parser.y"
{ (yyval.integer) = ~(yyvsp[(2) - (2)].integer); ;} { (yyval.integer) = ~(yyvsp[(2) - (2)].integer); }
break; break;
case 70: case 70:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 421 "dtc-parser.y" #line 421 "dtc-parser.y"
{ (yyval.integer) = !(yyvsp[(2) - (2)].integer); ;} { (yyval.integer) = !(yyvsp[(2) - (2)].integer); }
break; break;
case 71: case 71:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 426 "dtc-parser.y" #line 426 "dtc-parser.y"
{ {
(yyval.data) = empty_data; (yyval.data) = empty_data;
;} }
break; break;
case 72: case 72:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 430 "dtc-parser.y" #line 430 "dtc-parser.y"
{ {
(yyval.data) = data_append_byte((yyvsp[(1) - (2)].data), (yyvsp[(2) - (2)].byte)); (yyval.data) = data_append_byte((yyvsp[(1) - (2)].data), (yyvsp[(2) - (2)].byte));
;} }
break; break;
case 73: case 73:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 434 "dtc-parser.y" #line 434 "dtc-parser.y"
{ {
(yyval.data) = data_add_marker((yyvsp[(1) - (2)].data), LABEL, (yyvsp[(2) - (2)].labelref)); (yyval.data) = data_add_marker((yyvsp[(1) - (2)].data), LABEL, (yyvsp[(2) - (2)].labelref));
;} }
break; break;
case 74: case 74:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 441 "dtc-parser.y" #line 441 "dtc-parser.y"
{ {
(yyval.nodelist) = NULL; (yyval.nodelist) = NULL;
;} }
break; break;
case 75: case 75:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 445 "dtc-parser.y" #line 445 "dtc-parser.y"
{ {
(yyval.nodelist) = chain_node((yyvsp[(1) - (2)].node), (yyvsp[(2) - (2)].nodelist)); (yyval.nodelist) = chain_node((yyvsp[(1) - (2)].node), (yyvsp[(2) - (2)].nodelist));
;} }
break; break;
case 76: case 76:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 449 "dtc-parser.y" #line 449 "dtc-parser.y"
{ {
print_error("syntax error: properties must precede subnodes"); print_error("syntax error: properties must precede subnodes");
YYERROR; YYERROR;
;} }
break; break;
case 77: case 77:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 457 "dtc-parser.y" #line 457 "dtc-parser.y"
{ {
(yyval.node) = name_node((yyvsp[(2) - (2)].node), (yyvsp[(1) - (2)].propnodename)); (yyval.node) = name_node((yyvsp[(2) - (2)].node), (yyvsp[(1) - (2)].propnodename));
;} }
break; break;
case 78: case 78:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 461 "dtc-parser.y" #line 461 "dtc-parser.y"
{ {
(yyval.node) = name_node(build_node_delete(), (yyvsp[(2) - (3)].propnodename)); (yyval.node) = name_node(build_node_delete(), (yyvsp[(2) - (3)].propnodename));
;} }
break; break;
case 79: case 79:
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 465 "dtc-parser.y" #line 465 "dtc-parser.y"
{ {
add_label(&(yyvsp[(2) - (2)].node)->labels, (yyvsp[(1) - (2)].labelref)); add_label(&(yyvsp[(2) - (2)].node)->labels, (yyvsp[(1) - (2)].labelref));
(yyval.node) = (yyvsp[(2) - (2)].node); (yyval.node) = (yyvsp[(2) - (2)].node);
;} }
break; break;
/* Line 1455 of yacc.c */ /* Line 1806 of yacc.c */
#line 2124 "dtc-parser.tab.c" #line 2154 "dtc-parser.tab.c"
default: break; default: break;
} }
/* User semantic actions sometimes alter yychar, and that requires
that yytoken be updated with the new translation. We take the
approach of translating immediately before every use of yytoken.
One alternative is translating here after every semantic action,
but that translation would be missed if the semantic action invokes
YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
incorrect destructor might then be invoked immediately. In the
case of YYERROR or YYBACKUP, subsequent parser actions might lead
to an incorrect destructor call or verbose syntax error message
before the lookahead is translated. */
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
YYPOPSTACK (yylen); YYPOPSTACK (yylen);
...@@ -2150,6 +2191,10 @@ yyreduce: ...@@ -2150,6 +2191,10 @@ yyreduce:
| yyerrlab -- here on detecting error | | yyerrlab -- here on detecting error |
`------------------------------------*/ `------------------------------------*/
yyerrlab: yyerrlab:
/* Make sure we have latest lookahead translation. See comments at
user semantic actions for why this is necessary. */
yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
/* If not already recovering from an error, report this error. */ /* If not already recovering from an error, report this error. */
if (!yyerrstatus) if (!yyerrstatus)
{ {
...@@ -2157,37 +2202,36 @@ yyerrlab: ...@@ -2157,37 +2202,36 @@ yyerrlab:
#if ! YYERROR_VERBOSE #if ! YYERROR_VERBOSE
yyerror (YY_("syntax error")); yyerror (YY_("syntax error"));
#else #else
# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
yyssp, yytoken)
{ {
YYSIZE_T yysize = yysyntax_error (0, yystate, yychar); char const *yymsgp = YY_("syntax error");
if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM) int yysyntax_error_status;
yysyntax_error_status = YYSYNTAX_ERROR;
if (yysyntax_error_status == 0)
yymsgp = yymsg;
else if (yysyntax_error_status == 1)
{ {
YYSIZE_T yyalloc = 2 * yysize;
if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
yyalloc = YYSTACK_ALLOC_MAXIMUM;
if (yymsg != yymsgbuf) if (yymsg != yymsgbuf)
YYSTACK_FREE (yymsg); YYSTACK_FREE (yymsg);
yymsg = (char *) YYSTACK_ALLOC (yyalloc); yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
if (yymsg) if (!yymsg)
yymsg_alloc = yyalloc;
else
{ {
yymsg = yymsgbuf; yymsg = yymsgbuf;
yymsg_alloc = sizeof yymsgbuf; yymsg_alloc = sizeof yymsgbuf;
} yysyntax_error_status = 2;
}
if (0 < yysize && yysize <= yymsg_alloc)
{
(void) yysyntax_error (yymsg, yystate, yychar);
yyerror (yymsg);
} }
else else
{ {
yyerror (YY_("syntax error")); yysyntax_error_status = YYSYNTAX_ERROR;
if (yysize != 0) yymsgp = yymsg;
goto yyexhaustedlab; }
} }
yyerror (yymsgp);
if (yysyntax_error_status == 2)
goto yyexhaustedlab;
} }
# undef YYSYNTAX_ERROR
#endif #endif
} }
...@@ -2246,7 +2290,7 @@ yyerrlab1: ...@@ -2246,7 +2290,7 @@ yyerrlab1:
for (;;) for (;;)
{ {
yyn = yypact[yystate]; yyn = yypact[yystate];
if (yyn != YYPACT_NINF) if (!yypact_value_is_default (yyn))
{ {
yyn += YYTERROR; yyn += YYTERROR;
if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
...@@ -2305,8 +2349,13 @@ yyexhaustedlab: ...@@ -2305,8 +2349,13 @@ yyexhaustedlab:
yyreturn: yyreturn:
if (yychar != YYEMPTY) if (yychar != YYEMPTY)
{
/* Make sure we have latest lookahead translation. See comments at
user semantic actions for why this is necessary. */
yytoken = YYTRANSLATE (yychar);
yydestruct ("Cleanup: discarding lookahead", yydestruct ("Cleanup: discarding lookahead",
yytoken, &yylval); yytoken, &yylval);
}
/* Do not reclaim the symbols of the rule which action triggered /* Do not reclaim the symbols of the rule which action triggered
this YYABORT or YYACCEPT. */ this YYABORT or YYACCEPT. */
YYPOPSTACK (yylen); YYPOPSTACK (yylen);
...@@ -2331,7 +2380,7 @@ yyreturn: ...@@ -2331,7 +2380,7 @@ yyreturn:
/* Line 1675 of yacc.c */ /* Line 2067 of yacc.c */
#line 471 "dtc-parser.y" #line 471 "dtc-parser.y"
......
/* A Bison parser, made by GNU Bison 2.5. */
/* A Bison parser, made by GNU Bison 2.4.1. */ /* Bison interface for Yacc-like parsers in C
/* Skeleton interface for Bison's Yacc-like parsers in C Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc.
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
...@@ -70,7 +68,7 @@ ...@@ -70,7 +68,7 @@
typedef union YYSTYPE typedef union YYSTYPE
{ {
/* Line 1676 of yacc.c */ /* Line 2068 of yacc.c */
#line 40 "dtc-parser.y" #line 40 "dtc-parser.y"
char *propnodename; char *propnodename;
...@@ -94,8 +92,8 @@ typedef union YYSTYPE ...@@ -94,8 +92,8 @@ typedef union YYSTYPE
/* Line 1676 of yacc.c */ /* Line 2068 of yacc.c */
#line 99 "dtc-parser.tab.h" #line 97 "dtc-parser.tab.h"
} YYSTYPE; } YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1 # define YYSTYPE_IS_TRIVIAL 1
# define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define yystype YYSTYPE /* obsolescent; will be withdrawn */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment