Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

+516 -465
+3 -2
arch/sparc/kernel/prom_common.c
··· 54 54 int of_set_property(struct device_node *dp, const char *name, void *val, int len) 55 55 { 56 56 struct property **prevp; 57 + unsigned long flags; 57 58 void *new_val; 58 59 int err; 59 60 ··· 65 64 err = -ENODEV; 66 65 67 66 mutex_lock(&of_set_property_mutex); 68 - raw_spin_lock(&devtree_lock); 67 + raw_spin_lock_irqsave(&devtree_lock, flags); 69 68 prevp = &dp->properties; 70 69 while (*prevp) { 71 70 struct property *prop = *prevp; ··· 92 91 } 93 92 prevp = &(*prevp)->next; 94 93 } 95 - raw_spin_unlock(&devtree_lock); 94 + raw_spin_unlock_irqrestore(&devtree_lock, flags); 96 95 mutex_unlock(&of_set_property_mutex); 97 96 98 97 /* XXX Upate procfs if necessary... */
+9 -6
drivers/of/base.c
··· 192 192 struct device_node *of_find_all_nodes(struct device_node *prev) 193 193 { 194 194 struct device_node *np; 195 + unsigned long flags; 195 196 196 - raw_spin_lock(&devtree_lock); 197 + raw_spin_lock_irqsave(&devtree_lock, flags); 197 198 np = prev ? prev->allnext : of_allnodes; 198 199 for (; np != NULL; np = np->allnext) 199 200 if (of_node_get(np)) 200 201 break; 201 202 of_node_put(prev); 202 - raw_spin_unlock(&devtree_lock); 203 + raw_spin_unlock_irqrestore(&devtree_lock, flags); 203 204 return np; 204 205 } 205 206 EXPORT_SYMBOL(of_find_all_nodes); ··· 422 421 struct device_node *prev) 423 422 { 424 423 struct device_node *next; 424 + unsigned long flags; 425 425 426 - raw_spin_lock(&devtree_lock); 426 + raw_spin_lock_irqsave(&devtree_lock, flags); 427 427 next = prev ? prev->sibling : node->child; 428 428 for (; next; next = next->sibling) { 429 429 if (!__of_device_is_available(next)) ··· 433 431 break; 434 432 } 435 433 of_node_put(prev); 436 - raw_spin_unlock(&devtree_lock); 434 + raw_spin_unlock_irqrestore(&devtree_lock, flags); 437 435 return next; 438 436 } 439 437 EXPORT_SYMBOL(of_get_next_available_child); ··· 737 735 struct device_node *of_find_node_by_phandle(phandle handle) 738 736 { 739 737 struct device_node *np; 738 + unsigned long flags; 740 739 741 - raw_spin_lock(&devtree_lock); 740 + raw_spin_lock_irqsave(&devtree_lock, flags); 742 741 for (np = of_allnodes; np; np = np->allnext) 743 742 if (np->phandle == handle) 744 743 break; 745 744 of_node_get(np); 746 - raw_spin_unlock(&devtree_lock); 745 + raw_spin_unlock_irqrestore(&devtree_lock, flags); 747 746 return np; 748 747 } 749 748 EXPORT_SYMBOL(of_find_node_by_phandle);
+4 -4
scripts/Makefile.lib
··· 149 149 150 150 ld_flags = $(LDFLAGS) $(ldflags-y) 151 151 152 - dtc_cpp_flags = -Wp,-MD,$(depfile).pre -nostdinc \ 152 + dtc_cpp_flags = -Wp,-MD,$(depfile).pre.tmp -nostdinc \ 153 153 -I$(srctree)/arch/$(SRCARCH)/boot/dts \ 154 154 -I$(srctree)/arch/$(SRCARCH)/boot/dts/include \ 155 155 -undef -D__DTS__ ··· 265 265 cmd_dtc = $(CPP) $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) $< ; \ 266 266 $(objtree)/scripts/dtc/dtc -O dtb -o $@ -b 0 \ 267 267 -i $(dir $<) $(DTC_FLAGS) \ 268 - -d $(depfile).dtc $(dtc-tmp) ; \ 269 - cat $(depfile).pre $(depfile).dtc > $(depfile) 268 + -d $(depfile).dtc.tmp $(dtc-tmp) ; \ 269 + cat $(depfile).pre.tmp $(depfile).dtc.tmp > $(depfile) 270 270 271 271 $(obj)/%.dtb: $(src)/%.dts FORCE 272 272 $(call if_changed_dep,dtc) 273 273 274 - dtc-tmp = $(subst $(comma),_,$(dot-target).dts) 274 + dtc-tmp = $(subst $(comma),_,$(dot-target).dts.tmp) 275 275 276 276 # Bzip2 277 277 # ---------------------------------------------------------------------------
+1 -1
scripts/dtc/dtc-lexer.l
··· 71 71 push_input_file(name); 72 72 } 73 73 74 - <*>^"#"(line)?{WS}+[0-9]+{WS}+{STRING}({WS}+[0-9]+)? { 74 + <*>^"#"(line)?[ \t]+[0-9]+[ \t]+{STRING}([ \t]+[0-9]+)? { 75 75 char *line, *tmp, *fn; 76 76 /* skip text before line # */ 77 77 line = yytext;
+110 -110
scripts/dtc/dtc-lexer.lex.c_shipped
··· 405 405 static yyconst flex_int32_t yy_ec[256] = 406 406 { 0, 407 407 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 408 - 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 408 + 4, 4, 4, 1, 1, 1, 1, 1, 1, 1, 409 409 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 410 - 1, 2, 4, 5, 6, 1, 1, 7, 8, 1, 411 - 1, 9, 10, 10, 11, 10, 12, 13, 14, 15, 412 - 15, 15, 15, 15, 15, 15, 15, 16, 1, 17, 413 - 18, 19, 10, 10, 20, 20, 20, 20, 20, 20, 414 - 21, 21, 21, 21, 21, 22, 21, 21, 21, 21, 415 - 21, 21, 21, 21, 23, 21, 21, 24, 21, 21, 416 - 1, 25, 26, 1, 21, 1, 20, 27, 28, 29, 410 + 1, 2, 5, 6, 7, 1, 1, 8, 9, 1, 411 + 1, 10, 11, 11, 12, 11, 13, 14, 15, 16, 412 + 16, 16, 16, 16, 16, 16, 16, 17, 1, 18, 413 + 19, 20, 11, 11, 21, 21, 21, 21, 21, 21, 414 + 22, 22, 22, 22, 22, 23, 22, 22, 22, 22, 415 + 22, 22, 22, 22, 24, 22, 22, 25, 22, 22, 416 + 1, 26, 27, 1, 22, 1, 21, 28, 29, 30, 417 417 418 - 30, 20, 21, 21, 31, 21, 21, 32, 33, 34, 419 - 35, 36, 21, 37, 38, 39, 40, 41, 21, 24, 420 - 42, 21, 43, 44, 45, 1, 1, 1, 1, 1, 418 + 31, 21, 22, 22, 32, 22, 22, 33, 34, 35, 419 + 36, 37, 22, 38, 39, 40, 41, 42, 22, 25, 420 + 43, 22, 44, 45, 46, 1, 1, 1, 1, 1, 421 421 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 422 422 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 423 423 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ··· 434 434 1, 1, 1, 1, 1 435 435 } ; 436 436 437 - static yyconst flex_int32_t yy_meta[46] = 437 + static yyconst flex_int32_t yy_meta[47] = 438 438 { 0, 439 - 1, 1, 1, 1, 1, 2, 3, 1, 2, 2, 440 - 2, 4, 5, 5, 5, 6, 1, 1, 1, 7, 441 - 8, 8, 8, 8, 1, 1, 7, 7, 7, 7, 442 - 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 443 - 8, 8, 3, 1, 1 439 + 1, 1, 1, 1, 1, 1, 2, 3, 1, 2, 440 + 2, 2, 4, 5, 5, 5, 6, 1, 1, 1, 441 + 7, 8, 8, 8, 8, 1, 1, 7, 7, 7, 442 + 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 443 + 8, 8, 8, 3, 1, 1 444 444 } ; 445 445 446 446 static yyconst flex_int16_t yy_base[175] = 447 447 { 0, 448 - 0, 388, 381, 40, 41, 386, 71, 385, 34, 44, 449 - 390, 395, 60, 62, 371, 112, 111, 111, 111, 104, 450 - 370, 106, 371, 342, 124, 119, 0, 144, 395, 0, 451 - 123, 0, 159, 153, 165, 167, 395, 130, 395, 382, 452 - 395, 0, 372, 122, 395, 157, 374, 379, 350, 21, 453 - 346, 349, 395, 395, 395, 395, 395, 362, 395, 395, 454 - 181, 346, 342, 395, 359, 0, 191, 343, 190, 351, 455 - 350, 0, 0, 0, 173, 362, 177, 367, 357, 329, 456 - 335, 328, 337, 331, 206, 329, 334, 327, 395, 338, 457 - 170, 314, 346, 345, 318, 325, 343, 158, 316, 212, 448 + 0, 385, 378, 40, 41, 383, 72, 382, 34, 44, 449 + 388, 393, 61, 117, 368, 116, 115, 115, 115, 48, 450 + 367, 107, 368, 339, 127, 120, 0, 147, 393, 0, 451 + 127, 0, 133, 156, 168, 153, 393, 125, 393, 380, 452 + 393, 0, 369, 127, 393, 160, 371, 377, 347, 21, 453 + 343, 346, 393, 393, 393, 393, 393, 359, 393, 393, 454 + 183, 343, 339, 393, 356, 0, 183, 340, 187, 348, 455 + 347, 0, 0, 0, 178, 359, 195, 365, 354, 326, 456 + 332, 325, 334, 328, 204, 326, 331, 324, 393, 335, 457 + 150, 311, 343, 342, 315, 322, 340, 179, 313, 207, 458 458 459 - 322, 319, 320, 395, 340, 336, 308, 305, 314, 304, 460 - 295, 138, 208, 220, 395, 292, 305, 265, 264, 254, 461 - 201, 222, 285, 275, 273, 270, 236, 235, 225, 115, 462 - 395, 395, 252, 216, 216, 217, 214, 230, 209, 220, 463 - 213, 239, 211, 217, 216, 209, 229, 395, 240, 225, 464 - 206, 169, 395, 395, 116, 106, 99, 54, 395, 395, 465 - 254, 260, 268, 272, 276, 282, 289, 293, 301, 309, 466 - 313, 319, 327, 335 459 + 319, 316, 317, 393, 337, 333, 305, 302, 311, 301, 460 + 310, 190, 338, 337, 393, 307, 322, 301, 305, 277, 461 + 208, 311, 307, 278, 271, 270, 248, 246, 213, 130, 462 + 393, 393, 263, 235, 207, 221, 218, 229, 213, 213, 463 + 206, 234, 218, 210, 208, 193, 219, 393, 223, 204, 464 + 176, 157, 393, 393, 120, 106, 97, 119, 393, 393, 465 + 245, 251, 259, 263, 267, 273, 280, 284, 292, 300, 466 + 304, 310, 318, 326 467 467 } ; 468 468 469 469 static yyconst flex_int16_t yy_def[175] = ··· 489 489 160, 160, 160, 160 490 490 } ; 491 491 492 - static yyconst flex_int16_t yy_nxt[441] = 492 + static yyconst flex_int16_t yy_nxt[440] = 493 493 { 0, 494 - 12, 13, 14, 15, 16, 12, 17, 18, 12, 12, 495 - 12, 19, 12, 12, 12, 12, 20, 21, 22, 23, 496 - 23, 23, 23, 23, 12, 12, 23, 23, 23, 23, 494 + 12, 13, 14, 13, 15, 16, 12, 17, 18, 12, 495 + 12, 12, 19, 12, 12, 12, 12, 20, 21, 22, 496 + 23, 23, 23, 23, 23, 12, 12, 23, 23, 23, 497 497 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 498 - 23, 23, 12, 24, 12, 25, 34, 35, 35, 25, 499 - 81, 26, 26, 27, 27, 27, 34, 35, 35, 82, 500 - 28, 36, 36, 36, 36, 159, 29, 28, 28, 28, 501 - 28, 12, 13, 14, 15, 16, 30, 17, 18, 30, 502 - 30, 30, 26, 30, 30, 30, 12, 20, 21, 22, 503 - 31, 31, 31, 31, 31, 32, 12, 31, 31, 31, 498 + 23, 23, 23, 12, 24, 12, 25, 34, 35, 35, 499 + 25, 81, 26, 26, 27, 27, 27, 34, 35, 35, 500 + 82, 28, 36, 36, 36, 53, 54, 29, 28, 28, 501 + 28, 28, 12, 13, 14, 13, 15, 16, 30, 17, 502 + 18, 30, 30, 30, 26, 30, 30, 30, 12, 20, 503 + 21, 22, 31, 31, 31, 31, 31, 32, 12, 31, 504 504 505 505 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 506 - 31, 31, 31, 12, 24, 12, 39, 41, 45, 47, 507 - 53, 54, 48, 56, 57, 61, 61, 47, 66, 45, 508 - 48, 66, 66, 66, 39, 46, 40, 49, 59, 50, 509 - 158, 51, 122, 52, 157, 49, 46, 50, 136, 63, 510 - 137, 52, 156, 43, 40, 62, 65, 65, 65, 59, 511 - 61, 61, 123, 65, 75, 69, 69, 69, 36, 36, 512 - 65, 65, 65, 65, 70, 71, 72, 69, 69, 69, 513 - 45, 46, 61, 61, 109, 77, 70, 71, 93, 110, 514 - 68, 70, 71, 85, 85, 85, 66, 46, 155, 66, 506 + 31, 31, 31, 31, 31, 12, 24, 12, 36, 36, 507 + 36, 39, 41, 45, 47, 56, 57, 48, 61, 47, 508 + 39, 159, 48, 66, 61, 45, 66, 66, 66, 158, 509 + 46, 40, 49, 59, 50, 157, 51, 49, 52, 50, 510 + 40, 63, 46, 52, 36, 36, 36, 156, 43, 62, 511 + 65, 65, 65, 59, 136, 68, 137, 65, 75, 69, 512 + 69, 69, 70, 71, 65, 65, 65, 65, 70, 71, 513 + 72, 69, 69, 69, 61, 46, 45, 155, 154, 66, 514 + 70, 71, 66, 66, 66, 122, 85, 85, 85, 59, 515 515 516 - 66, 66, 69, 69, 69, 122, 59, 100, 100, 61, 517 - 61, 70, 71, 100, 100, 148, 112, 154, 85, 85, 518 - 85, 61, 61, 129, 129, 123, 129, 129, 135, 135, 519 - 135, 142, 142, 148, 143, 149, 153, 135, 135, 135, 520 - 142, 142, 160, 143, 152, 151, 150, 146, 145, 144, 521 - 141, 140, 139, 149, 38, 38, 38, 38, 38, 38, 522 - 38, 38, 42, 138, 134, 133, 42, 42, 44, 44, 523 - 44, 44, 44, 44, 44, 44, 58, 58, 58, 58, 524 - 64, 132, 64, 66, 131, 130, 66, 160, 66, 66, 525 - 67, 128, 127, 67, 67, 67, 67, 73, 126, 73, 516 + 69, 69, 69, 46, 77, 100, 109, 93, 100, 70, 517 + 71, 110, 112, 122, 129, 123, 153, 85, 85, 85, 518 + 135, 135, 135, 148, 148, 160, 135, 135, 135, 152, 519 + 142, 142, 142, 123, 143, 142, 142, 142, 151, 143, 520 + 150, 146, 145, 149, 149, 38, 38, 38, 38, 38, 521 + 38, 38, 38, 42, 144, 141, 140, 42, 42, 44, 522 + 44, 44, 44, 44, 44, 44, 44, 58, 58, 58, 523 + 58, 64, 139, 64, 66, 138, 134, 66, 133, 66, 524 + 66, 67, 132, 131, 67, 67, 67, 67, 73, 130, 525 + 73, 73, 76, 76, 76, 76, 76, 76, 76, 76, 526 526 527 - 73, 76, 76, 76, 76, 76, 76, 76, 76, 78, 528 - 78, 78, 78, 78, 78, 78, 78, 91, 125, 91, 529 - 92, 124, 92, 92, 120, 92, 92, 121, 121, 121, 530 - 121, 121, 121, 121, 121, 147, 147, 147, 147, 147, 531 - 147, 147, 147, 119, 118, 117, 116, 115, 47, 114, 532 - 110, 113, 111, 108, 107, 106, 48, 105, 104, 89, 533 - 103, 102, 101, 99, 98, 97, 96, 95, 94, 79, 534 - 77, 90, 89, 88, 59, 87, 86, 59, 84, 83, 535 - 80, 79, 77, 74, 160, 60, 59, 55, 37, 160, 536 - 33, 25, 26, 25, 11, 160, 160, 160, 160, 160, 527 + 78, 78, 78, 78, 78, 78, 78, 78, 91, 160, 528 + 91, 92, 129, 92, 92, 128, 92, 92, 121, 121, 529 + 121, 121, 121, 121, 121, 121, 147, 147, 147, 147, 530 + 147, 147, 147, 147, 127, 126, 125, 124, 61, 61, 531 + 120, 119, 118, 117, 116, 115, 47, 114, 110, 113, 532 + 111, 108, 107, 106, 48, 105, 104, 89, 103, 102, 533 + 101, 99, 98, 97, 96, 95, 94, 79, 77, 90, 534 + 89, 88, 59, 87, 86, 59, 84, 83, 80, 79, 535 + 77, 74, 160, 60, 59, 55, 37, 160, 33, 25, 536 + 26, 25, 11, 160, 160, 160, 160, 160, 160, 160, 537 537 538 538 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 539 539 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 540 540 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 541 - 160, 160, 160, 160, 160, 160, 160, 160, 160, 160 541 + 160, 160, 160, 160, 160, 160, 160, 160, 160 542 542 } ; 543 543 544 - static yyconst flex_int16_t yy_chk[441] = 544 + static yyconst flex_int16_t yy_chk[440] = 545 545 { 0, 546 546 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 547 547 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 548 548 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 549 549 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 550 - 1, 1, 1, 1, 1, 4, 9, 9, 9, 10, 551 - 50, 4, 5, 5, 5, 5, 10, 10, 10, 50, 552 - 5, 13, 13, 14, 14, 158, 5, 5, 5, 5, 553 - 5, 7, 7, 7, 7, 7, 7, 7, 7, 7, 550 + 1, 1, 1, 1, 1, 1, 4, 9, 9, 9, 551 + 10, 50, 4, 5, 5, 5, 5, 10, 10, 10, 552 + 50, 5, 13, 13, 13, 20, 20, 5, 5, 5, 553 + 5, 5, 7, 7, 7, 7, 7, 7, 7, 7, 554 554 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 555 555 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 556 556 557 557 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 558 - 7, 7, 7, 7, 7, 7, 16, 17, 18, 19, 559 - 20, 20, 19, 22, 22, 25, 25, 26, 31, 44, 560 - 26, 31, 31, 31, 38, 18, 16, 19, 31, 19, 561 - 157, 19, 112, 19, 156, 26, 44, 26, 130, 26, 562 - 130, 26, 155, 17, 38, 25, 28, 28, 28, 28, 563 - 33, 33, 112, 28, 46, 34, 34, 34, 36, 36, 564 - 28, 28, 28, 28, 34, 34, 34, 35, 35, 35, 565 - 75, 46, 61, 61, 98, 77, 35, 35, 77, 98, 566 - 33, 91, 91, 61, 61, 61, 67, 75, 152, 67, 558 + 7, 7, 7, 7, 7, 7, 7, 7, 14, 14, 559 + 14, 16, 17, 18, 19, 22, 22, 19, 25, 26, 560 + 38, 158, 26, 31, 33, 44, 31, 31, 31, 157, 561 + 18, 16, 19, 31, 19, 156, 19, 26, 19, 26, 562 + 38, 26, 44, 26, 36, 36, 36, 155, 17, 25, 563 + 28, 28, 28, 28, 130, 33, 130, 28, 46, 34, 564 + 34, 34, 91, 91, 28, 28, 28, 28, 34, 34, 565 + 34, 35, 35, 35, 61, 46, 75, 152, 151, 67, 566 + 35, 35, 67, 67, 67, 112, 61, 61, 61, 67, 567 567 568 - 67, 67, 69, 69, 69, 121, 67, 85, 85, 113, 569 - 113, 69, 69, 100, 100, 143, 100, 151, 85, 85, 570 - 85, 114, 114, 122, 122, 121, 129, 129, 135, 135, 571 - 135, 138, 138, 147, 138, 143, 150, 129, 129, 129, 572 - 142, 142, 149, 142, 146, 145, 144, 141, 140, 139, 573 - 137, 136, 134, 147, 161, 161, 161, 161, 161, 161, 574 - 161, 161, 162, 133, 128, 127, 162, 162, 163, 163, 575 - 163, 163, 163, 163, 163, 163, 164, 164, 164, 164, 576 - 165, 126, 165, 166, 125, 124, 166, 123, 166, 166, 577 - 167, 120, 119, 167, 167, 167, 167, 168, 118, 168, 568 + 69, 69, 69, 75, 77, 85, 98, 77, 100, 69, 569 + 69, 98, 100, 121, 129, 112, 150, 85, 85, 85, 570 + 135, 135, 135, 143, 147, 149, 129, 129, 129, 146, 571 + 138, 138, 138, 121, 138, 142, 142, 142, 145, 142, 572 + 144, 141, 140, 143, 147, 161, 161, 161, 161, 161, 573 + 161, 161, 161, 162, 139, 137, 136, 162, 162, 163, 574 + 163, 163, 163, 163, 163, 163, 163, 164, 164, 164, 575 + 164, 165, 134, 165, 166, 133, 128, 166, 127, 166, 576 + 166, 167, 126, 125, 167, 167, 167, 167, 168, 124, 577 + 168, 168, 169, 169, 169, 169, 169, 169, 169, 169, 578 578 579 - 168, 169, 169, 169, 169, 169, 169, 169, 169, 170, 580 - 170, 170, 170, 170, 170, 170, 170, 171, 117, 171, 581 - 172, 116, 172, 172, 111, 172, 172, 173, 173, 173, 582 - 173, 173, 173, 173, 173, 174, 174, 174, 174, 174, 583 - 174, 174, 174, 110, 109, 108, 107, 106, 105, 103, 584 - 102, 101, 99, 97, 96, 95, 94, 93, 92, 90, 585 - 88, 87, 86, 84, 83, 82, 81, 80, 79, 78, 586 - 76, 71, 70, 68, 65, 63, 62, 58, 52, 51, 587 - 49, 48, 47, 43, 40, 24, 23, 21, 15, 11, 588 - 8, 6, 3, 2, 160, 160, 160, 160, 160, 160, 579 + 170, 170, 170, 170, 170, 170, 170, 170, 171, 123, 580 + 171, 172, 122, 172, 172, 120, 172, 172, 173, 173, 581 + 173, 173, 173, 173, 173, 173, 174, 174, 174, 174, 582 + 174, 174, 174, 174, 119, 118, 117, 116, 114, 113, 583 + 111, 110, 109, 108, 107, 106, 105, 103, 102, 101, 584 + 99, 97, 96, 95, 94, 93, 92, 90, 88, 87, 585 + 86, 84, 83, 82, 81, 80, 79, 78, 76, 71, 586 + 70, 68, 65, 63, 62, 58, 52, 51, 49, 48, 587 + 47, 43, 40, 24, 23, 21, 15, 11, 8, 6, 588 + 3, 2, 160, 160, 160, 160, 160, 160, 160, 160, 589 589 590 590 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 591 591 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 592 592 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 593 - 160, 160, 160, 160, 160, 160, 160, 160, 160, 160 593 + 160, 160, 160, 160, 160, 160, 160, 160, 160 594 594 } ; 595 595 596 596 static yy_state_type yy_last_accepting_state;
+383 -334
scripts/dtc/dtc-parser.tab.c_shipped
··· 1 + /* A Bison parser, made by GNU Bison 2.5. */ 1 2 2 - /* A Bison parser, made by GNU Bison 2.4.1. */ 3 - 4 - /* Skeleton implementation for Bison's Yacc-like parsers in C 3 + /* Bison implementation for Yacc-like parsers in C 5 4 6 - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 7 - Free Software Foundation, Inc. 5 + Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc. 8 6 9 7 This program is free software: you can redistribute it and/or modify 10 8 it under the terms of the GNU General Public License as published by ··· 44 46 #define YYBISON 1 45 47 46 48 /* Bison version. */ 47 - #define YYBISON_VERSION "2.4.1" 49 + #define YYBISON_VERSION "2.5" 48 50 49 51 /* Skeleton name. */ 50 52 #define YYSKELETON_NAME "yacc.c" ··· 65 67 66 68 /* Copy the first part of user declarations. */ 67 69 68 - /* Line 189 of yacc.c */ 70 + /* Line 268 of yacc.c */ 69 71 #line 21 "dtc-parser.y" 70 72 71 73 #include <stdio.h> ··· 86 88 static unsigned char eval_char_literal(const char *s); 87 89 88 90 89 - /* Line 189 of yacc.c */ 90 - #line 93 "dtc-parser.tab.c" 91 + /* Line 268 of yacc.c */ 92 + #line 91 "dtc-parser.tab.c" 91 93 92 94 /* Enabling traces. */ 93 95 #ifndef YYDEBUG ··· 145 147 typedef union YYSTYPE 146 148 { 147 149 148 - /* Line 214 of yacc.c */ 150 + /* Line 293 of yacc.c */ 149 151 #line 40 "dtc-parser.y" 150 152 151 153 char *propnodename; ··· 169 171 170 172 171 173 172 - /* Line 214 of yacc.c */ 173 - #line 176 "dtc-parser.tab.c" 174 + /* Line 293 of yacc.c */ 175 + #line 174 "dtc-parser.tab.c" 174 176 } YYSTYPE; 175 177 # define YYSTYPE_IS_TRIVIAL 1 176 178 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ ··· 181 183 /* Copy the second part of user declarations. */ 182 184 183 185 184 - /* Line 264 of yacc.c */ 185 - #line 188 "dtc-parser.tab.c" 186 + /* Line 343 of yacc.c */ 187 + #line 186 "dtc-parser.tab.c" 186 188 187 189 #ifdef short 188 190 # undef short ··· 232 234 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1) 233 235 234 236 #ifndef YY_ 235 - # if YYENABLE_NLS 237 + # if defined YYENABLE_NLS && YYENABLE_NLS 236 238 # if ENABLE_NLS 237 239 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */ 238 240 # define YY_(msgid) dgettext ("bison-runtime", msgid) ··· 285 287 # define alloca _alloca 286 288 # else 287 289 # define YYSTACK_ALLOC alloca 288 - # if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ 290 + # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ 289 291 || defined __cplusplus || defined _MSC_VER) 290 292 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ 291 - # ifndef _STDLIB_H 292 - # define _STDLIB_H 1 293 + # ifndef EXIT_SUCCESS 294 + # define EXIT_SUCCESS 0 293 295 # endif 294 296 # endif 295 297 # endif ··· 312 314 # ifndef YYSTACK_ALLOC_MAXIMUM 313 315 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM 314 316 # endif 315 - # if (defined __cplusplus && ! defined _STDLIB_H \ 317 + # if (defined __cplusplus && ! defined EXIT_SUCCESS \ 316 318 && ! ((defined YYMALLOC || defined malloc) \ 317 319 && (defined YYFREE || defined free))) 318 320 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ 319 - # ifndef _STDLIB_H 320 - # define _STDLIB_H 1 321 + # ifndef EXIT_SUCCESS 322 + # define EXIT_SUCCESS 0 321 323 # endif 322 324 # endif 323 325 # ifndef YYMALLOC 324 326 # define YYMALLOC malloc 325 - # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ 327 + # if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ 326 328 || defined __cplusplus || defined _MSC_VER) 327 329 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ 328 330 # endif 329 331 # endif 330 332 # ifndef YYFREE 331 333 # define YYFREE free 332 - # if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ 334 + # if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ 333 335 || defined __cplusplus || defined _MSC_VER) 334 336 void free (void *); /* INFRINGES ON USER NAME SPACE */ 335 337 # endif ··· 358 360 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ 359 361 + YYSTACK_GAP_MAXIMUM) 360 362 361 - /* Copy COUNT objects from FROM to TO. The source and destination do 362 - not overlap. */ 363 - # ifndef YYCOPY 364 - # if defined __GNUC__ && 1 < __GNUC__ 365 - # define YYCOPY(To, From, Count) \ 366 - __builtin_memcpy (To, From, (Count) * sizeof (*(From))) 367 - # else 368 - # define YYCOPY(To, From, Count) \ 369 - do \ 370 - { \ 371 - YYSIZE_T yyi; \ 372 - for (yyi = 0; yyi < (Count); yyi++) \ 373 - (To)[yyi] = (From)[yyi]; \ 374 - } \ 375 - while (YYID (0)) 376 - # endif 377 - # endif 363 + # define YYCOPY_NEEDED 1 378 364 379 365 /* Relocate STACK from its old location to the new one. The 380 366 local variables YYSIZE and YYSTACKSIZE give the old and new number of ··· 377 395 while (YYID (0)) 378 396 379 397 #endif 398 + 399 + #if defined YYCOPY_NEEDED && YYCOPY_NEEDED 400 + /* Copy COUNT objects from FROM to TO. The source and destination do 401 + not overlap. */ 402 + # ifndef YYCOPY 403 + # if defined __GNUC__ && 1 < __GNUC__ 404 + # define YYCOPY(To, From, Count) \ 405 + __builtin_memcpy (To, From, (Count) * sizeof (*(From))) 406 + # else 407 + # define YYCOPY(To, From, Count) \ 408 + do \ 409 + { \ 410 + YYSIZE_T yyi; \ 411 + for (yyi = 0; yyi < (Count); yyi++) \ 412 + (To)[yyi] = (From)[yyi]; \ 413 + } \ 414 + while (YYID (0)) 415 + # endif 416 + # endif 417 + #endif /* !YYCOPY_NEEDED */ 380 418 381 419 /* YYFINAL -- State number of the termination state. */ 382 420 #define YYFINAL 4 ··· 573 571 2, 0, 2, 2, 0, 2, 2, 2, 3, 2 574 572 }; 575 573 576 - /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state 577 - STATE-NUM when YYTABLE doesn't specify something else to do. Zero 574 + /* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM. 575 + Performed when YYTABLE doesn't specify something else to do. Zero 578 576 means the default is an error. */ 579 577 static const yytype_uint8 yydefact[] = 580 578 { ··· 635 633 636 634 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If 637 635 positive, shift that token. If negative, reduce the rule which 638 - number is the opposite. If zero, do what YYDEFACT says. 639 - If YYTABLE_NINF, syntax error. */ 636 + number is the opposite. If YYTABLE_NINF, syntax error. */ 640 637 #define YYTABLE_NINF -1 641 638 static const yytype_uint8 yytable[] = 642 639 { ··· 654 653 68, 0, 0, 70, 0, 0, 0, 0, 72, 0, 655 654 137, 0, 73, 139 656 655 }; 656 + 657 + #define yypact_value_is_default(yystate) \ 658 + ((yystate) == (-78)) 659 + 660 + #define yytable_value_is_error(yytable_value) \ 661 + YYID (0) 657 662 658 663 static const yytype_int16 yycheck[] = 659 664 { ··· 712 705 713 706 /* Like YYERROR except do call yyerror. This remains here temporarily 714 707 to ease the transition to the new meaning of YYERROR, for GCC. 715 - Once GCC version 2 has supplanted version 1, this can go. */ 708 + Once GCC version 2 has supplanted version 1, this can go. However, 709 + YYFAIL appears to be in use. Nevertheless, it is formally deprecated 710 + in Bison 2.4.2's NEWS entry, where a plan to phase it out is 711 + discussed. */ 716 712 717 713 #define YYFAIL goto yyerrlab 714 + #if defined YYFAIL 715 + /* This is here to suppress warnings from the GCC cpp's 716 + -Wunused-macros. Normally we don't worry about that warning, but 717 + some users do, and we want to make it easy for users to remove 718 + YYFAIL uses, which will produce warnings from Bison 2.5. */ 719 + #endif 718 720 719 721 #define YYRECOVERING() (!!yyerrstatus) 720 722 ··· 733 717 { \ 734 718 yychar = (Token); \ 735 719 yylval = (Value); \ 736 - yytoken = YYTRANSLATE (yychar); \ 737 720 YYPOPSTACK (1); \ 738 721 goto yybackup; \ 739 722 } \ ··· 774 759 #endif 775 760 776 761 777 - /* YY_LOCATION_PRINT -- Print the location on the stream. 778 - This macro was not mandated originally: define only if we know 779 - we won't break user code: when these are the locations we know. */ 762 + /* This macro is provided for backward compatibility. */ 780 763 781 764 #ifndef YY_LOCATION_PRINT 782 - # if YYLTYPE_IS_TRIVIAL 783 - # define YY_LOCATION_PRINT(File, Loc) \ 784 - fprintf (File, "%d.%d-%d.%d", \ 785 - (Loc).first_line, (Loc).first_column, \ 786 - (Loc).last_line, (Loc).last_column) 787 - # else 788 - # define YY_LOCATION_PRINT(File, Loc) ((void) 0) 789 - # endif 765 + # define YY_LOCATION_PRINT(File, Loc) ((void) 0) 790 766 #endif 791 767 792 768 ··· 969 963 # define YYMAXDEPTH 10000 970 964 #endif 971 965 972 - 973 966 974 967 #if YYERROR_VERBOSE 975 968 ··· 1071 1066 } 1072 1067 # endif 1073 1068 1074 - /* Copy into YYRESULT an error message about the unexpected token 1075 - YYCHAR while in state YYSTATE. Return the number of bytes copied, 1076 - including the terminating null byte. If YYRESULT is null, do not 1077 - copy anything; just return the number of bytes that would be 1078 - copied. As a special case, return 0 if an ordinary "syntax error" 1079 - message will do. Return YYSIZE_MAXIMUM if overflow occurs during 1080 - size calculation. */ 1081 - static YYSIZE_T 1082 - yysyntax_error (char *yyresult, int yystate, int yychar) 1069 + /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message 1070 + about the unexpected token YYTOKEN for the state stack whose top is 1071 + YYSSP. 1072 + 1073 + Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is 1074 + not large enough to hold the message. In that case, also set 1075 + *YYMSG_ALLOC to the required number of bytes. Return 2 if the 1076 + required number of bytes is too large to store. */ 1077 + static int 1078 + yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, 1079 + yytype_int16 *yyssp, int yytoken) 1083 1080 { 1084 - int yyn = yypact[yystate]; 1081 + YYSIZE_T yysize0 = yytnamerr (0, yytname[yytoken]); 1082 + YYSIZE_T yysize = yysize0; 1083 + YYSIZE_T yysize1; 1084 + enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; 1085 + /* Internationalized format string. */ 1086 + const char *yyformat = 0; 1087 + /* Arguments of yyformat. */ 1088 + char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; 1089 + /* Number of reported tokens (one for the "unexpected", one per 1090 + "expected"). */ 1091 + int yycount = 0; 1085 1092 1086 - if (! (YYPACT_NINF < yyn && yyn <= YYLAST)) 1087 - return 0; 1088 - else 1093 + /* There are many possibilities here to consider: 1094 + - Assume YYFAIL is not used. It's too flawed to consider. See 1095 + <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html> 1096 + for details. YYERROR is fine as it does not invoke this 1097 + function. 1098 + - If this state is a consistent state with a default action, then 1099 + the only way this function was invoked is if the default action 1100 + is an error action. In that case, don't check for expected 1101 + tokens because there are none. 1102 + - The only way there can be no lookahead present (in yychar) is if 1103 + this state is a consistent state with a default action. Thus, 1104 + detecting the absence of a lookahead is sufficient to determine 1105 + that there is no unexpected or expected token to report. In that 1106 + case, just report a simple "syntax error". 1107 + - Don't assume there isn't a lookahead just because this state is a 1108 + consistent state with a default action. There might have been a 1109 + previous inconsistent state, consistent state with a non-default 1110 + action, or user semantic action that manipulated yychar. 1111 + - Of course, the expected token list depends on states to have 1112 + correct lookahead information, and it depends on the parser not 1113 + to perform extra reductions after fetching a lookahead from the 1114 + scanner and before detecting a syntax error. Thus, state merging 1115 + (from LALR or IELR) and default reductions corrupt the expected 1116 + token list. However, the list is correct for canonical LR with 1117 + one exception: it will still contain any token that will not be 1118 + accepted due to an error action in a later state. 1119 + */ 1120 + if (yytoken != YYEMPTY) 1089 1121 { 1090 - int yytype = YYTRANSLATE (yychar); 1091 - YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]); 1092 - YYSIZE_T yysize = yysize0; 1093 - YYSIZE_T yysize1; 1094 - int yysize_overflow = 0; 1095 - enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; 1096 - char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; 1097 - int yyx; 1122 + int yyn = yypact[*yyssp]; 1123 + yyarg[yycount++] = yytname[yytoken]; 1124 + if (!yypact_value_is_default (yyn)) 1125 + { 1126 + /* Start YYX at -YYN if negative to avoid negative indexes in 1127 + YYCHECK. In other words, skip the first -YYN actions for 1128 + this state because they are default actions. */ 1129 + int yyxbegin = yyn < 0 ? -yyn : 0; 1130 + /* Stay within bounds of both yycheck and yytname. */ 1131 + int yychecklim = YYLAST - yyn + 1; 1132 + int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; 1133 + int yyx; 1098 1134 1099 - # if 0 1100 - /* This is so xgettext sees the translatable formats that are 1101 - constructed on the fly. */ 1102 - YY_("syntax error, unexpected %s"); 1103 - YY_("syntax error, unexpected %s, expecting %s"); 1104 - YY_("syntax error, unexpected %s, expecting %s or %s"); 1105 - YY_("syntax error, unexpected %s, expecting %s or %s or %s"); 1106 - YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"); 1107 - # endif 1108 - char *yyfmt; 1109 - char const *yyf; 1110 - static char const yyunexpected[] = "syntax error, unexpected %s"; 1111 - static char const yyexpecting[] = ", expecting %s"; 1112 - static char const yyor[] = " or %s"; 1113 - char yyformat[sizeof yyunexpected 1114 - + sizeof yyexpecting - 1 1115 - + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) 1116 - * (sizeof yyor - 1))]; 1117 - char const *yyprefix = yyexpecting; 1118 - 1119 - /* Start YYX at -YYN if negative to avoid negative indexes in 1120 - YYCHECK. */ 1121 - int yyxbegin = yyn < 0 ? -yyn : 0; 1122 - 1123 - /* Stay within bounds of both yycheck and yytname. */ 1124 - int yychecklim = YYLAST - yyn + 1; 1125 - int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; 1126 - int yycount = 1; 1127 - 1128 - yyarg[0] = yytname[yytype]; 1129 - yyfmt = yystpcpy (yyformat, yyunexpected); 1130 - 1131 - for (yyx = yyxbegin; yyx < yyxend; ++yyx) 1132 - if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) 1133 - { 1134 - if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) 1135 - { 1136 - yycount = 1; 1137 - yysize = yysize0; 1138 - yyformat[sizeof yyunexpected - 1] = '\0'; 1139 - break; 1140 - } 1141 - yyarg[yycount++] = yytname[yyx]; 1142 - yysize1 = yysize + yytnamerr (0, yytname[yyx]); 1143 - yysize_overflow |= (yysize1 < yysize); 1144 - yysize = yysize1; 1145 - yyfmt = yystpcpy (yyfmt, yyprefix); 1146 - yyprefix = yyor; 1147 - } 1148 - 1149 - yyf = YY_(yyformat); 1150 - yysize1 = yysize + yystrlen (yyf); 1151 - yysize_overflow |= (yysize1 < yysize); 1152 - yysize = yysize1; 1153 - 1154 - if (yysize_overflow) 1155 - return YYSIZE_MAXIMUM; 1156 - 1157 - if (yyresult) 1158 - { 1159 - /* Avoid sprintf, as that infringes on the user's name space. 1160 - Don't have undefined behavior even if the translation 1161 - produced a string with the wrong number of "%s"s. */ 1162 - char *yyp = yyresult; 1163 - int yyi = 0; 1164 - while ((*yyp = *yyf) != '\0') 1165 - { 1166 - if (*yyp == '%' && yyf[1] == 's' && yyi < yycount) 1167 - { 1168 - yyp += yytnamerr (yyp, yyarg[yyi++]); 1169 - yyf += 2; 1170 - } 1171 - else 1172 - { 1173 - yyp++; 1174 - yyf++; 1175 - } 1176 - } 1177 - } 1178 - return yysize; 1135 + for (yyx = yyxbegin; yyx < yyxend; ++yyx) 1136 + if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR 1137 + && !yytable_value_is_error (yytable[yyx + yyn])) 1138 + { 1139 + if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) 1140 + { 1141 + yycount = 1; 1142 + yysize = yysize0; 1143 + break; 1144 + } 1145 + yyarg[yycount++] = yytname[yyx]; 1146 + yysize1 = yysize + yytnamerr (0, yytname[yyx]); 1147 + if (! (yysize <= yysize1 1148 + && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) 1149 + return 2; 1150 + yysize = yysize1; 1151 + } 1152 + } 1179 1153 } 1154 + 1155 + switch (yycount) 1156 + { 1157 + # define YYCASE_(N, S) \ 1158 + case N: \ 1159 + yyformat = S; \ 1160 + break 1161 + YYCASE_(0, YY_("syntax error")); 1162 + YYCASE_(1, YY_("syntax error, unexpected %s")); 1163 + YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); 1164 + YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); 1165 + YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); 1166 + YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); 1167 + # undef YYCASE_ 1168 + } 1169 + 1170 + yysize1 = yysize + yystrlen (yyformat); 1171 + if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) 1172 + return 2; 1173 + yysize = yysize1; 1174 + 1175 + if (*yymsg_alloc < yysize) 1176 + { 1177 + *yymsg_alloc = 2 * yysize; 1178 + if (! (yysize <= *yymsg_alloc 1179 + && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) 1180 + *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; 1181 + return 1; 1182 + } 1183 + 1184 + /* Avoid sprintf, as that infringes on the user's name space. 1185 + Don't have undefined behavior even if the translation 1186 + produced a string with the wrong number of "%s"s. */ 1187 + { 1188 + char *yyp = *yymsg; 1189 + int yyi = 0; 1190 + while ((*yyp = *yyformat) != '\0') 1191 + if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) 1192 + { 1193 + yyp += yytnamerr (yyp, yyarg[yyi++]); 1194 + yyformat += 2; 1195 + } 1196 + else 1197 + { 1198 + yyp++; 1199 + yyformat++; 1200 + } 1201 + } 1202 + return 0; 1180 1203 } 1181 1204 #endif /* YYERROR_VERBOSE */ 1182 - 1183 1205 1184 1206 /*-----------------------------------------------. 1185 1207 | Release the memory associated to this symbol. | ··· 1239 1207 } 1240 1208 } 1241 1209 1210 + 1242 1211 /* Prevent warnings from -Wmissing-prototypes. */ 1243 1212 #ifdef YYPARSE_PARAM 1244 1213 #if defined __STDC__ || defined __cplusplus ··· 1266 1233 int yynerrs; 1267 1234 1268 1235 1269 - 1270 - /*-------------------------. 1271 - | yyparse or yypush_parse. | 1272 - `-------------------------*/ 1236 + /*----------. 1237 + | yyparse. | 1238 + `----------*/ 1273 1239 1274 1240 #ifdef YYPARSE_PARAM 1275 1241 #if (defined __STDC__ || defined __C99__FUNC__ \ ··· 1292 1260 #endif 1293 1261 #endif 1294 1262 { 1295 - 1296 - 1297 1263 int yystate; 1298 1264 /* Number of tokens to shift before error messages enabled. */ 1299 1265 int yyerrstatus; ··· 1446 1416 1447 1417 /* First try to decide what to do without reference to lookahead token. */ 1448 1418 yyn = yypact[yystate]; 1449 - if (yyn == YYPACT_NINF) 1419 + if (yypact_value_is_default (yyn)) 1450 1420 goto yydefault; 1451 1421 1452 1422 /* Not known => get a lookahead token if don't already have one. */ ··· 1477 1447 yyn = yytable[yyn]; 1478 1448 if (yyn <= 0) 1479 1449 { 1480 - if (yyn == 0 || yyn == YYTABLE_NINF) 1481 - goto yyerrlab; 1450 + if (yytable_value_is_error (yyn)) 1451 + goto yyerrlab; 1482 1452 yyn = -yyn; 1483 1453 goto yyreduce; 1484 1454 } ··· 1533 1503 { 1534 1504 case 2: 1535 1505 1536 - /* Line 1455 of yacc.c */ 1506 + /* Line 1806 of yacc.c */ 1537 1507 #line 110 "dtc-parser.y" 1538 1508 { 1539 1509 the_boot_info = build_boot_info((yyvsp[(3) - (4)].re), (yyvsp[(4) - (4)].node), 1540 1510 guess_boot_cpuid((yyvsp[(4) - (4)].node))); 1541 - ;} 1511 + } 1542 1512 break; 1543 1513 1544 1514 case 3: 1545 1515 1546 - /* Line 1455 of yacc.c */ 1516 + /* Line 1806 of yacc.c */ 1547 1517 #line 118 "dtc-parser.y" 1548 1518 { 1549 1519 (yyval.re) = NULL; 1550 - ;} 1520 + } 1551 1521 break; 1552 1522 1553 1523 case 4: 1554 1524 1555 - /* Line 1455 of yacc.c */ 1525 + /* Line 1806 of yacc.c */ 1556 1526 #line 122 "dtc-parser.y" 1557 1527 { 1558 1528 (yyval.re) = chain_reserve_entry((yyvsp[(1) - (2)].re), (yyvsp[(2) - (2)].re)); 1559 - ;} 1529 + } 1560 1530 break; 1561 1531 1562 1532 case 5: 1563 1533 1564 - /* Line 1455 of yacc.c */ 1534 + /* Line 1806 of yacc.c */ 1565 1535 #line 129 "dtc-parser.y" 1566 1536 { 1567 1537 (yyval.re) = build_reserve_entry((yyvsp[(2) - (4)].integer), (yyvsp[(3) - (4)].integer)); 1568 - ;} 1538 + } 1569 1539 break; 1570 1540 1571 1541 case 6: 1572 1542 1573 - /* Line 1455 of yacc.c */ 1543 + /* Line 1806 of yacc.c */ 1574 1544 #line 133 "dtc-parser.y" 1575 1545 { 1576 1546 add_label(&(yyvsp[(2) - (2)].re)->labels, (yyvsp[(1) - (2)].labelref)); 1577 1547 (yyval.re) = (yyvsp[(2) - (2)].re); 1578 - ;} 1548 + } 1579 1549 break; 1580 1550 1581 1551 case 7: 1582 1552 1583 - /* Line 1455 of yacc.c */ 1553 + /* Line 1806 of yacc.c */ 1584 1554 #line 141 "dtc-parser.y" 1585 1555 { 1586 1556 (yyval.node) = name_node((yyvsp[(2) - (2)].node), ""); 1587 - ;} 1557 + } 1588 1558 break; 1589 1559 1590 1560 case 8: 1591 1561 1592 - /* Line 1455 of yacc.c */ 1562 + /* Line 1806 of yacc.c */ 1593 1563 #line 145 "dtc-parser.y" 1594 1564 { 1595 1565 (yyval.node) = merge_nodes((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 1596 - ;} 1566 + } 1597 1567 break; 1598 1568 1599 1569 case 9: 1600 1570 1601 - /* Line 1455 of yacc.c */ 1571 + /* Line 1806 of yacc.c */ 1602 1572 #line 149 "dtc-parser.y" 1603 1573 { 1604 1574 struct node *target = get_node_by_ref((yyvsp[(1) - (3)].node), (yyvsp[(2) - (3)].labelref)); ··· 1608 1578 else 1609 1579 print_error("label or path, '%s', not found", (yyvsp[(2) - (3)].labelref)); 1610 1580 (yyval.node) = (yyvsp[(1) - (3)].node); 1611 - ;} 1581 + } 1612 1582 break; 1613 1583 1614 1584 case 10: 1615 1585 1616 - /* Line 1455 of yacc.c */ 1586 + /* Line 1806 of yacc.c */ 1617 1587 #line 159 "dtc-parser.y" 1618 1588 { 1619 1589 struct node *target = get_node_by_ref((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].labelref)); ··· 1624 1594 delete_node(target); 1625 1595 1626 1596 (yyval.node) = (yyvsp[(1) - (4)].node); 1627 - ;} 1597 + } 1628 1598 break; 1629 1599 1630 1600 case 11: 1631 1601 1632 - /* Line 1455 of yacc.c */ 1602 + /* Line 1806 of yacc.c */ 1633 1603 #line 173 "dtc-parser.y" 1634 1604 { 1635 1605 (yyval.node) = build_node((yyvsp[(2) - (5)].proplist), (yyvsp[(3) - (5)].nodelist)); 1636 - ;} 1606 + } 1637 1607 break; 1638 1608 1639 1609 case 12: 1640 1610 1641 - /* Line 1455 of yacc.c */ 1611 + /* Line 1806 of yacc.c */ 1642 1612 #line 180 "dtc-parser.y" 1643 1613 { 1644 1614 (yyval.proplist) = NULL; 1645 - ;} 1615 + } 1646 1616 break; 1647 1617 1648 1618 case 13: 1649 1619 1650 - /* Line 1455 of yacc.c */ 1620 + /* Line 1806 of yacc.c */ 1651 1621 #line 184 "dtc-parser.y" 1652 1622 { 1653 1623 (yyval.proplist) = chain_property((yyvsp[(2) - (2)].prop), (yyvsp[(1) - (2)].proplist)); 1654 - ;} 1624 + } 1655 1625 break; 1656 1626 1657 1627 case 14: 1658 1628 1659 - /* Line 1455 of yacc.c */ 1629 + /* Line 1806 of yacc.c */ 1660 1630 #line 191 "dtc-parser.y" 1661 1631 { 1662 1632 (yyval.prop) = build_property((yyvsp[(1) - (4)].propnodename), (yyvsp[(3) - (4)].data)); 1663 - ;} 1633 + } 1664 1634 break; 1665 1635 1666 1636 case 15: 1667 1637 1668 - /* Line 1455 of yacc.c */ 1638 + /* Line 1806 of yacc.c */ 1669 1639 #line 195 "dtc-parser.y" 1670 1640 { 1671 1641 (yyval.prop) = build_property((yyvsp[(1) - (2)].propnodename), empty_data); 1672 - ;} 1642 + } 1673 1643 break; 1674 1644 1675 1645 case 16: 1676 1646 1677 - /* Line 1455 of yacc.c */ 1647 + /* Line 1806 of yacc.c */ 1678 1648 #line 199 "dtc-parser.y" 1679 1649 { 1680 1650 (yyval.prop) = build_property_delete((yyvsp[(2) - (3)].propnodename)); 1681 - ;} 1651 + } 1682 1652 break; 1683 1653 1684 1654 case 17: 1685 1655 1686 - /* Line 1455 of yacc.c */ 1656 + /* Line 1806 of yacc.c */ 1687 1657 #line 203 "dtc-parser.y" 1688 1658 { 1689 1659 add_label(&(yyvsp[(2) - (2)].prop)->labels, (yyvsp[(1) - (2)].labelref)); 1690 1660 (yyval.prop) = (yyvsp[(2) - (2)].prop); 1691 - ;} 1661 + } 1692 1662 break; 1693 1663 1694 1664 case 18: 1695 1665 1696 - /* Line 1455 of yacc.c */ 1666 + /* Line 1806 of yacc.c */ 1697 1667 #line 211 "dtc-parser.y" 1698 1668 { 1699 1669 (yyval.data) = data_merge((yyvsp[(1) - (2)].data), (yyvsp[(2) - (2)].data)); 1700 - ;} 1670 + } 1701 1671 break; 1702 1672 1703 1673 case 19: 1704 1674 1705 - /* Line 1455 of yacc.c */ 1675 + /* Line 1806 of yacc.c */ 1706 1676 #line 215 "dtc-parser.y" 1707 1677 { 1708 1678 (yyval.data) = data_merge((yyvsp[(1) - (3)].data), (yyvsp[(2) - (3)].array).data); 1709 - ;} 1679 + } 1710 1680 break; 1711 1681 1712 1682 case 20: 1713 1683 1714 - /* Line 1455 of yacc.c */ 1684 + /* Line 1806 of yacc.c */ 1715 1685 #line 219 "dtc-parser.y" 1716 1686 { 1717 1687 (yyval.data) = data_merge((yyvsp[(1) - (4)].data), (yyvsp[(3) - (4)].data)); 1718 - ;} 1688 + } 1719 1689 break; 1720 1690 1721 1691 case 21: 1722 1692 1723 - /* Line 1455 of yacc.c */ 1693 + /* Line 1806 of yacc.c */ 1724 1694 #line 223 "dtc-parser.y" 1725 1695 { 1726 1696 (yyval.data) = data_add_marker((yyvsp[(1) - (2)].data), REF_PATH, (yyvsp[(2) - (2)].labelref)); 1727 - ;} 1697 + } 1728 1698 break; 1729 1699 1730 1700 case 22: 1731 1701 1732 - /* Line 1455 of yacc.c */ 1702 + /* Line 1806 of yacc.c */ 1733 1703 #line 227 "dtc-parser.y" 1734 1704 { 1735 1705 FILE *f = srcfile_relative_open((yyvsp[(4) - (9)].data).val, NULL); ··· 1746 1716 1747 1717 (yyval.data) = data_merge((yyvsp[(1) - (9)].data), d); 1748 1718 fclose(f); 1749 - ;} 1719 + } 1750 1720 break; 1751 1721 1752 1722 case 23: 1753 1723 1754 - /* Line 1455 of yacc.c */ 1724 + /* Line 1806 of yacc.c */ 1755 1725 #line 244 "dtc-parser.y" 1756 1726 { 1757 1727 FILE *f = srcfile_relative_open((yyvsp[(4) - (5)].data).val, NULL); ··· 1761 1731 1762 1732 (yyval.data) = data_merge((yyvsp[(1) - (5)].data), d); 1763 1733 fclose(f); 1764 - ;} 1734 + } 1765 1735 break; 1766 1736 1767 1737 case 24: 1768 1738 1769 - /* Line 1455 of yacc.c */ 1739 + /* Line 1806 of yacc.c */ 1770 1740 #line 254 "dtc-parser.y" 1771 1741 { 1772 1742 (yyval.data) = data_add_marker((yyvsp[(1) - (2)].data), LABEL, (yyvsp[(2) - (2)].labelref)); 1773 - ;} 1743 + } 1774 1744 break; 1775 1745 1776 1746 case 25: 1777 1747 1778 - /* Line 1455 of yacc.c */ 1748 + /* Line 1806 of yacc.c */ 1779 1749 #line 261 "dtc-parser.y" 1780 1750 { 1781 1751 (yyval.data) = empty_data; 1782 - ;} 1752 + } 1783 1753 break; 1784 1754 1785 1755 case 26: 1786 1756 1787 - /* Line 1455 of yacc.c */ 1757 + /* Line 1806 of yacc.c */ 1788 1758 #line 265 "dtc-parser.y" 1789 1759 { 1790 1760 (yyval.data) = (yyvsp[(1) - (2)].data); 1791 - ;} 1761 + } 1792 1762 break; 1793 1763 1794 1764 case 27: 1795 1765 1796 - /* Line 1455 of yacc.c */ 1766 + /* Line 1806 of yacc.c */ 1797 1767 #line 269 "dtc-parser.y" 1798 1768 { 1799 1769 (yyval.data) = data_add_marker((yyvsp[(1) - (2)].data), LABEL, (yyvsp[(2) - (2)].labelref)); 1800 - ;} 1770 + } 1801 1771 break; 1802 1772 1803 1773 case 28: 1804 1774 1805 - /* Line 1455 of yacc.c */ 1775 + /* Line 1806 of yacc.c */ 1806 1776 #line 276 "dtc-parser.y" 1807 1777 { 1808 1778 (yyval.array).data = empty_data; ··· 1817 1787 " are currently supported"); 1818 1788 (yyval.array).bits = 32; 1819 1789 } 1820 - ;} 1790 + } 1821 1791 break; 1822 1792 1823 1793 case 29: 1824 1794 1825 - /* Line 1455 of yacc.c */ 1795 + /* Line 1806 of yacc.c */ 1826 1796 #line 291 "dtc-parser.y" 1827 1797 { 1828 1798 (yyval.array).data = empty_data; 1829 1799 (yyval.array).bits = 32; 1830 - ;} 1800 + } 1831 1801 break; 1832 1802 1833 1803 case 30: 1834 1804 1835 - /* Line 1455 of yacc.c */ 1805 + /* Line 1806 of yacc.c */ 1836 1806 #line 296 "dtc-parser.y" 1837 1807 { 1838 1808 if ((yyvsp[(1) - (2)].array).bits < 64) { ··· 1852 1822 } 1853 1823 1854 1824 (yyval.array).data = data_append_integer((yyvsp[(1) - (2)].array).data, (yyvsp[(2) - (2)].integer), (yyvsp[(1) - (2)].array).bits); 1855 - ;} 1825 + } 1856 1826 break; 1857 1827 1858 1828 case 31: 1859 1829 1860 - /* Line 1455 of yacc.c */ 1830 + /* Line 1806 of yacc.c */ 1861 1831 #line 316 "dtc-parser.y" 1862 1832 { 1863 1833 uint64_t val = ~0ULL >> (64 - (yyvsp[(1) - (2)].array).bits); ··· 1871 1841 "arrays with 32-bit elements."); 1872 1842 1873 1843 (yyval.array).data = data_append_integer((yyvsp[(1) - (2)].array).data, val, (yyvsp[(1) - (2)].array).bits); 1874 - ;} 1844 + } 1875 1845 break; 1876 1846 1877 1847 case 32: 1878 1848 1879 - /* Line 1455 of yacc.c */ 1849 + /* Line 1806 of yacc.c */ 1880 1850 #line 330 "dtc-parser.y" 1881 1851 { 1882 1852 (yyval.array).data = data_add_marker((yyvsp[(1) - (2)].array).data, LABEL, (yyvsp[(2) - (2)].labelref)); 1883 - ;} 1853 + } 1884 1854 break; 1885 1855 1886 1856 case 33: 1887 1857 1888 - /* Line 1455 of yacc.c */ 1858 + /* Line 1806 of yacc.c */ 1889 1859 #line 337 "dtc-parser.y" 1890 1860 { 1891 1861 (yyval.integer) = eval_literal((yyvsp[(1) - (1)].literal), 0, 64); 1892 - ;} 1862 + } 1893 1863 break; 1894 1864 1895 1865 case 34: 1896 1866 1897 - /* Line 1455 of yacc.c */ 1867 + /* Line 1806 of yacc.c */ 1898 1868 #line 341 "dtc-parser.y" 1899 1869 { 1900 1870 (yyval.integer) = eval_char_literal((yyvsp[(1) - (1)].literal)); 1901 - ;} 1871 + } 1902 1872 break; 1903 1873 1904 1874 case 35: 1905 1875 1906 - /* Line 1455 of yacc.c */ 1876 + /* Line 1806 of yacc.c */ 1907 1877 #line 345 "dtc-parser.y" 1908 1878 { 1909 1879 (yyval.integer) = (yyvsp[(2) - (3)].integer); 1910 - ;} 1880 + } 1911 1881 break; 1912 1882 1913 1883 case 38: 1914 1884 1915 - /* Line 1455 of yacc.c */ 1885 + /* Line 1806 of yacc.c */ 1916 1886 #line 356 "dtc-parser.y" 1917 - { (yyval.integer) = (yyvsp[(1) - (5)].integer) ? (yyvsp[(3) - (5)].integer) : (yyvsp[(5) - (5)].integer); ;} 1887 + { (yyval.integer) = (yyvsp[(1) - (5)].integer) ? (yyvsp[(3) - (5)].integer) : (yyvsp[(5) - (5)].integer); } 1918 1888 break; 1919 1889 1920 1890 case 40: 1921 1891 1922 - /* Line 1455 of yacc.c */ 1892 + /* Line 1806 of yacc.c */ 1923 1893 #line 361 "dtc-parser.y" 1924 - { (yyval.integer) = (yyvsp[(1) - (3)].integer) || (yyvsp[(3) - (3)].integer); ;} 1894 + { (yyval.integer) = (yyvsp[(1) - (3)].integer) || (yyvsp[(3) - (3)].integer); } 1925 1895 break; 1926 1896 1927 1897 case 42: 1928 1898 1929 - /* Line 1455 of yacc.c */ 1899 + /* Line 1806 of yacc.c */ 1930 1900 #line 366 "dtc-parser.y" 1931 - { (yyval.integer) = (yyvsp[(1) - (3)].integer) && (yyvsp[(3) - (3)].integer); ;} 1901 + { (yyval.integer) = (yyvsp[(1) - (3)].integer) && (yyvsp[(3) - (3)].integer); } 1932 1902 break; 1933 1903 1934 1904 case 44: 1935 1905 1936 - /* Line 1455 of yacc.c */ 1906 + /* Line 1806 of yacc.c */ 1937 1907 #line 371 "dtc-parser.y" 1938 - { (yyval.integer) = (yyvsp[(1) - (3)].integer) | (yyvsp[(3) - (3)].integer); ;} 1908 + { (yyval.integer) = (yyvsp[(1) - (3)].integer) | (yyvsp[(3) - (3)].integer); } 1939 1909 break; 1940 1910 1941 1911 case 46: 1942 1912 1943 - /* Line 1455 of yacc.c */ 1913 + /* Line 1806 of yacc.c */ 1944 1914 #line 376 "dtc-parser.y" 1945 - { (yyval.integer) = (yyvsp[(1) - (3)].integer) ^ (yyvsp[(3) - (3)].integer); ;} 1915 + { (yyval.integer) = (yyvsp[(1) - (3)].integer) ^ (yyvsp[(3) - (3)].integer); } 1946 1916 break; 1947 1917 1948 1918 case 48: 1949 1919 1950 - /* Line 1455 of yacc.c */ 1920 + /* Line 1806 of yacc.c */ 1951 1921 #line 381 "dtc-parser.y" 1952 - { (yyval.integer) = (yyvsp[(1) - (3)].integer) & (yyvsp[(3) - (3)].integer); ;} 1922 + { (yyval.integer) = (yyvsp[(1) - (3)].integer) & (yyvsp[(3) - (3)].integer); } 1953 1923 break; 1954 1924 1955 1925 case 50: 1956 1926 1957 - /* Line 1455 of yacc.c */ 1927 + /* Line 1806 of yacc.c */ 1958 1928 #line 386 "dtc-parser.y" 1959 - { (yyval.integer) = (yyvsp[(1) - (3)].integer) == (yyvsp[(3) - (3)].integer); ;} 1929 + { (yyval.integer) = (yyvsp[(1) - (3)].integer) == (yyvsp[(3) - (3)].integer); } 1960 1930 break; 1961 1931 1962 1932 case 51: 1963 1933 1964 - /* Line 1455 of yacc.c */ 1934 + /* Line 1806 of yacc.c */ 1965 1935 #line 387 "dtc-parser.y" 1966 - { (yyval.integer) = (yyvsp[(1) - (3)].integer) != (yyvsp[(3) - (3)].integer); ;} 1936 + { (yyval.integer) = (yyvsp[(1) - (3)].integer) != (yyvsp[(3) - (3)].integer); } 1967 1937 break; 1968 1938 1969 1939 case 53: 1970 1940 1971 - /* Line 1455 of yacc.c */ 1941 + /* Line 1806 of yacc.c */ 1972 1942 #line 392 "dtc-parser.y" 1973 - { (yyval.integer) = (yyvsp[(1) - (3)].integer) < (yyvsp[(3) - (3)].integer); ;} 1943 + { (yyval.integer) = (yyvsp[(1) - (3)].integer) < (yyvsp[(3) - (3)].integer); } 1974 1944 break; 1975 1945 1976 1946 case 54: 1977 1947 1978 - /* Line 1455 of yacc.c */ 1948 + /* Line 1806 of yacc.c */ 1979 1949 #line 393 "dtc-parser.y" 1980 - { (yyval.integer) = (yyvsp[(1) - (3)].integer) > (yyvsp[(3) - (3)].integer); ;} 1950 + { (yyval.integer) = (yyvsp[(1) - (3)].integer) > (yyvsp[(3) - (3)].integer); } 1981 1951 break; 1982 1952 1983 1953 case 55: 1984 1954 1985 - /* Line 1455 of yacc.c */ 1955 + /* Line 1806 of yacc.c */ 1986 1956 #line 394 "dtc-parser.y" 1987 - { (yyval.integer) = (yyvsp[(1) - (3)].integer) <= (yyvsp[(3) - (3)].integer); ;} 1957 + { (yyval.integer) = (yyvsp[(1) - (3)].integer) <= (yyvsp[(3) - (3)].integer); } 1988 1958 break; 1989 1959 1990 1960 case 56: 1991 1961 1992 - /* Line 1455 of yacc.c */ 1962 + /* Line 1806 of yacc.c */ 1993 1963 #line 395 "dtc-parser.y" 1994 - { (yyval.integer) = (yyvsp[(1) - (3)].integer) >= (yyvsp[(3) - (3)].integer); ;} 1964 + { (yyval.integer) = (yyvsp[(1) - (3)].integer) >= (yyvsp[(3) - (3)].integer); } 1995 1965 break; 1996 1966 1997 1967 case 57: 1998 1968 1999 - /* Line 1455 of yacc.c */ 1969 + /* Line 1806 of yacc.c */ 2000 1970 #line 399 "dtc-parser.y" 2001 - { (yyval.integer) = (yyvsp[(1) - (3)].integer) << (yyvsp[(3) - (3)].integer); ;} 1971 + { (yyval.integer) = (yyvsp[(1) - (3)].integer) << (yyvsp[(3) - (3)].integer); } 2002 1972 break; 2003 1973 2004 1974 case 58: 2005 1975 2006 - /* Line 1455 of yacc.c */ 1976 + /* Line 1806 of yacc.c */ 2007 1977 #line 400 "dtc-parser.y" 2008 - { (yyval.integer) = (yyvsp[(1) - (3)].integer) >> (yyvsp[(3) - (3)].integer); ;} 1978 + { (yyval.integer) = (yyvsp[(1) - (3)].integer) >> (yyvsp[(3) - (3)].integer); } 2009 1979 break; 2010 1980 2011 1981 case 60: 2012 1982 2013 - /* Line 1455 of yacc.c */ 1983 + /* Line 1806 of yacc.c */ 2014 1984 #line 405 "dtc-parser.y" 2015 - { (yyval.integer) = (yyvsp[(1) - (3)].integer) + (yyvsp[(3) - (3)].integer); ;} 1985 + { (yyval.integer) = (yyvsp[(1) - (3)].integer) + (yyvsp[(3) - (3)].integer); } 2016 1986 break; 2017 1987 2018 1988 case 61: 2019 1989 2020 - /* Line 1455 of yacc.c */ 1990 + /* Line 1806 of yacc.c */ 2021 1991 #line 406 "dtc-parser.y" 2022 - { (yyval.integer) = (yyvsp[(1) - (3)].integer) - (yyvsp[(3) - (3)].integer); ;} 1992 + { (yyval.integer) = (yyvsp[(1) - (3)].integer) - (yyvsp[(3) - (3)].integer); } 2023 1993 break; 2024 1994 2025 1995 case 63: 2026 1996 2027 - /* Line 1455 of yacc.c */ 1997 + /* Line 1806 of yacc.c */ 2028 1998 #line 411 "dtc-parser.y" 2029 - { (yyval.integer) = (yyvsp[(1) - (3)].integer) * (yyvsp[(3) - (3)].integer); ;} 1999 + { (yyval.integer) = (yyvsp[(1) - (3)].integer) * (yyvsp[(3) - (3)].integer); } 2030 2000 break; 2031 2001 2032 2002 case 64: 2033 2003 2034 - /* Line 1455 of yacc.c */ 2004 + /* Line 1806 of yacc.c */ 2035 2005 #line 412 "dtc-parser.y" 2036 - { (yyval.integer) = (yyvsp[(1) - (3)].integer) / (yyvsp[(3) - (3)].integer); ;} 2006 + { (yyval.integer) = (yyvsp[(1) - (3)].integer) / (yyvsp[(3) - (3)].integer); } 2037 2007 break; 2038 2008 2039 2009 case 65: 2040 2010 2041 - /* Line 1455 of yacc.c */ 2011 + /* Line 1806 of yacc.c */ 2042 2012 #line 413 "dtc-parser.y" 2043 - { (yyval.integer) = (yyvsp[(1) - (3)].integer) % (yyvsp[(3) - (3)].integer); ;} 2013 + { (yyval.integer) = (yyvsp[(1) - (3)].integer) % (yyvsp[(3) - (3)].integer); } 2044 2014 break; 2045 2015 2046 2016 case 68: 2047 2017 2048 - /* Line 1455 of yacc.c */ 2018 + /* Line 1806 of yacc.c */ 2049 2019 #line 419 "dtc-parser.y" 2050 - { (yyval.integer) = -(yyvsp[(2) - (2)].integer); ;} 2020 + { (yyval.integer) = -(yyvsp[(2) - (2)].integer); } 2051 2021 break; 2052 2022 2053 2023 case 69: 2054 2024 2055 - /* Line 1455 of yacc.c */ 2025 + /* Line 1806 of yacc.c */ 2056 2026 #line 420 "dtc-parser.y" 2057 - { (yyval.integer) = ~(yyvsp[(2) - (2)].integer); ;} 2027 + { (yyval.integer) = ~(yyvsp[(2) - (2)].integer); } 2058 2028 break; 2059 2029 2060 2030 case 70: 2061 2031 2062 - /* Line 1455 of yacc.c */ 2032 + /* Line 1806 of yacc.c */ 2063 2033 #line 421 "dtc-parser.y" 2064 - { (yyval.integer) = !(yyvsp[(2) - (2)].integer); ;} 2034 + { (yyval.integer) = !(yyvsp[(2) - (2)].integer); } 2065 2035 break; 2066 2036 2067 2037 case 71: 2068 2038 2069 - /* Line 1455 of yacc.c */ 2039 + /* Line 1806 of yacc.c */ 2070 2040 #line 426 "dtc-parser.y" 2071 2041 { 2072 2042 (yyval.data) = empty_data; 2073 - ;} 2043 + } 2074 2044 break; 2075 2045 2076 2046 case 72: 2077 2047 2078 - /* Line 1455 of yacc.c */ 2048 + /* Line 1806 of yacc.c */ 2079 2049 #line 430 "dtc-parser.y" 2080 2050 { 2081 2051 (yyval.data) = data_append_byte((yyvsp[(1) - (2)].data), (yyvsp[(2) - (2)].byte)); 2082 - ;} 2052 + } 2083 2053 break; 2084 2054 2085 2055 case 73: 2086 2056 2087 - /* Line 1455 of yacc.c */ 2057 + /* Line 1806 of yacc.c */ 2088 2058 #line 434 "dtc-parser.y" 2089 2059 { 2090 2060 (yyval.data) = data_add_marker((yyvsp[(1) - (2)].data), LABEL, (yyvsp[(2) - (2)].labelref)); 2091 - ;} 2061 + } 2092 2062 break; 2093 2063 2094 2064 case 74: 2095 2065 2096 - /* Line 1455 of yacc.c */ 2066 + /* Line 1806 of yacc.c */ 2097 2067 #line 441 "dtc-parser.y" 2098 2068 { 2099 2069 (yyval.nodelist) = NULL; 2100 - ;} 2070 + } 2101 2071 break; 2102 2072 2103 2073 case 75: 2104 2074 2105 - /* Line 1455 of yacc.c */ 2075 + /* Line 1806 of yacc.c */ 2106 2076 #line 445 "dtc-parser.y" 2107 2077 { 2108 2078 (yyval.nodelist) = chain_node((yyvsp[(1) - (2)].node), (yyvsp[(2) - (2)].nodelist)); 2109 - ;} 2079 + } 2110 2080 break; 2111 2081 2112 2082 case 76: 2113 2083 2114 - /* Line 1455 of yacc.c */ 2084 + /* Line 1806 of yacc.c */ 2115 2085 #line 449 "dtc-parser.y" 2116 2086 { 2117 2087 print_error("syntax error: properties must precede subnodes"); 2118 2088 YYERROR; 2119 - ;} 2089 + } 2120 2090 break; 2121 2091 2122 2092 case 77: 2123 2093 2124 - /* Line 1455 of yacc.c */ 2094 + /* Line 1806 of yacc.c */ 2125 2095 #line 457 "dtc-parser.y" 2126 2096 { 2127 2097 (yyval.node) = name_node((yyvsp[(2) - (2)].node), (yyvsp[(1) - (2)].propnodename)); 2128 - ;} 2098 + } 2129 2099 break; 2130 2100 2131 2101 case 78: 2132 2102 2133 - /* Line 1455 of yacc.c */ 2103 + /* Line 1806 of yacc.c */ 2134 2104 #line 461 "dtc-parser.y" 2135 2105 { 2136 2106 (yyval.node) = name_node(build_node_delete(), (yyvsp[(2) - (3)].propnodename)); 2137 - ;} 2107 + } 2138 2108 break; 2139 2109 2140 2110 case 79: 2141 2111 2142 - /* Line 1455 of yacc.c */ 2112 + /* Line 1806 of yacc.c */ 2143 2113 #line 465 "dtc-parser.y" 2144 2114 { 2145 2115 add_label(&(yyvsp[(2) - (2)].node)->labels, (yyvsp[(1) - (2)].labelref)); 2146 2116 (yyval.node) = (yyvsp[(2) - (2)].node); 2147 - ;} 2117 + } 2148 2118 break; 2149 2119 2150 2120 2151 2121 2152 - /* Line 1455 of yacc.c */ 2153 - #line 2124 "dtc-parser.tab.c" 2122 + /* Line 1806 of yacc.c */ 2123 + #line 2154 "dtc-parser.tab.c" 2154 2124 default: break; 2155 2125 } 2126 + /* User semantic actions sometimes alter yychar, and that requires 2127 + that yytoken be updated with the new translation. We take the 2128 + approach of translating immediately before every use of yytoken. 2129 + One alternative is translating here after every semantic action, 2130 + but that translation would be missed if the semantic action invokes 2131 + YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or 2132 + if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an 2133 + incorrect destructor might then be invoked immediately. In the 2134 + case of YYERROR or YYBACKUP, subsequent parser actions might lead 2135 + to an incorrect destructor call or verbose syntax error message 2136 + before the lookahead is translated. */ 2156 2137 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); 2157 2138 2158 2139 YYPOPSTACK (yylen); ··· 2191 2150 | yyerrlab -- here on detecting error | 2192 2151 `------------------------------------*/ 2193 2152 yyerrlab: 2153 + /* Make sure we have latest lookahead translation. See comments at 2154 + user semantic actions for why this is necessary. */ 2155 + yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); 2156 + 2194 2157 /* If not already recovering from an error, report this error. */ 2195 2158 if (!yyerrstatus) 2196 2159 { ··· 2202 2157 #if ! YYERROR_VERBOSE 2203 2158 yyerror (YY_("syntax error")); 2204 2159 #else 2160 + # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ 2161 + yyssp, yytoken) 2205 2162 { 2206 - YYSIZE_T yysize = yysyntax_error (0, yystate, yychar); 2207 - if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM) 2208 - { 2209 - YYSIZE_T yyalloc = 2 * yysize; 2210 - if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM)) 2211 - yyalloc = YYSTACK_ALLOC_MAXIMUM; 2212 - if (yymsg != yymsgbuf) 2213 - YYSTACK_FREE (yymsg); 2214 - yymsg = (char *) YYSTACK_ALLOC (yyalloc); 2215 - if (yymsg) 2216 - yymsg_alloc = yyalloc; 2217 - else 2218 - { 2219 - yymsg = yymsgbuf; 2220 - yymsg_alloc = sizeof yymsgbuf; 2221 - } 2222 - } 2223 - 2224 - if (0 < yysize && yysize <= yymsg_alloc) 2225 - { 2226 - (void) yysyntax_error (yymsg, yystate, yychar); 2227 - yyerror (yymsg); 2228 - } 2229 - else 2230 - { 2231 - yyerror (YY_("syntax error")); 2232 - if (yysize != 0) 2233 - goto yyexhaustedlab; 2234 - } 2163 + char const *yymsgp = YY_("syntax error"); 2164 + int yysyntax_error_status; 2165 + yysyntax_error_status = YYSYNTAX_ERROR; 2166 + if (yysyntax_error_status == 0) 2167 + yymsgp = yymsg; 2168 + else if (yysyntax_error_status == 1) 2169 + { 2170 + if (yymsg != yymsgbuf) 2171 + YYSTACK_FREE (yymsg); 2172 + yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); 2173 + if (!yymsg) 2174 + { 2175 + yymsg = yymsgbuf; 2176 + yymsg_alloc = sizeof yymsgbuf; 2177 + yysyntax_error_status = 2; 2178 + } 2179 + else 2180 + { 2181 + yysyntax_error_status = YYSYNTAX_ERROR; 2182 + yymsgp = yymsg; 2183 + } 2184 + } 2185 + yyerror (yymsgp); 2186 + if (yysyntax_error_status == 2) 2187 + goto yyexhaustedlab; 2235 2188 } 2189 + # undef YYSYNTAX_ERROR 2236 2190 #endif 2237 2191 } 2238 2192 ··· 2290 2246 for (;;) 2291 2247 { 2292 2248 yyn = yypact[yystate]; 2293 - if (yyn != YYPACT_NINF) 2249 + if (!yypact_value_is_default (yyn)) 2294 2250 { 2295 2251 yyn += YYTERROR; 2296 2252 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) ··· 2349 2305 2350 2306 yyreturn: 2351 2307 if (yychar != YYEMPTY) 2352 - yydestruct ("Cleanup: discarding lookahead", 2353 - yytoken, &yylval); 2308 + { 2309 + /* Make sure we have latest lookahead translation. See comments at 2310 + user semantic actions for why this is necessary. */ 2311 + yytoken = YYTRANSLATE (yychar); 2312 + yydestruct ("Cleanup: discarding lookahead", 2313 + yytoken, &yylval); 2314 + } 2354 2315 /* Do not reclaim the symbols of the rule which action triggered 2355 2316 this YYABORT or YYACCEPT. */ 2356 2317 YYPOPSTACK (yylen); ··· 2380 2331 2381 2332 2382 2333 2383 - /* Line 1675 of yacc.c */ 2334 + /* Line 2067 of yacc.c */ 2384 2335 #line 471 "dtc-parser.y" 2385 2336 2386 2337
+6 -8
scripts/dtc/dtc-parser.tab.h_shipped
··· 1 + /* A Bison parser, made by GNU Bison 2.5. */ 1 2 2 - /* A Bison parser, made by GNU Bison 2.4.1. */ 3 - 4 - /* Skeleton interface for Bison's Yacc-like parsers in C 3 + /* Bison interface for Yacc-like parsers in C 5 4 6 - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 7 - Free Software Foundation, Inc. 5 + Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc. 8 6 9 7 This program is free software: you can redistribute it and/or modify 10 8 it under the terms of the GNU General Public License as published by ··· 68 70 typedef union YYSTYPE 69 71 { 70 72 71 - /* Line 1676 of yacc.c */ 73 + /* Line 2068 of yacc.c */ 72 74 #line 40 "dtc-parser.y" 73 75 74 76 char *propnodename; ··· 92 94 93 95 94 96 95 - /* Line 1676 of yacc.c */ 96 - #line 99 "dtc-parser.tab.h" 97 + /* Line 2068 of yacc.c */ 98 + #line 97 "dtc-parser.tab.h" 97 99 } YYSTYPE; 98 100 # define YYSTYPE_IS_TRIVIAL 1 99 101 # define yystype YYSTYPE /* obsolescent; will be withdrawn */