1 0 $accept : input $end 2 3 1 opt_scope : 4 2 | CLCL 5 3 | opt_scope ID CLCL 6 7 4 typename : opt_scope ID 8 9 5 $$1 : 10 11 6 input : $$1 decl_list 12 13 7 decl_list : 14 15 8 $$2 : 16 17 9 decl_list : decl_list $$2 decl 18 19 10 $$3 : 20 21 11 decl : decl_specs $$2 $$3 declarator_list ';' 22 23 12 $$4 : 24 25 13 decl : decl_specs $$2 $$3 declarator $$4 block_statement 26 27 14 decl_specs : decl_spec 28 15 | decl_specs $$2 decl_spec 29 30 16 cv_quals : 31 17 | cv_quals cv_qual 32 33 18 decl_spec : cv_qual 34 19 | typename 35 20 | EXTERN 36 21 | REGISTER 37 22 | STATIC 38 39 23 cv_qual : CONST 40 24 | VOLATILE 41 42 25 $$5 : 43 44 26 $$6 : 45 46 27 declarator_list : declarator_list ',' $$5 $$6 declarator 47 28 | declarator 48 49 29 declarator : 50 30 | ID 51 52 31 $$7 : 53 54 32 $$8 : 55 56 33 declarator : '(' $$7 $$8 declarator ')' 57 34 | '*' cv_quals $$5 $$6 declarator 58 35 | declarator '[' $$5 expr ']' 59 36 | declarator '(' $$5 formal_arg_list ')' cv_quals 60 61 37 formal_arg_list : 62 38 | nonempty_formal_arg_list 63 64 39 nonempty_formal_arg_list : nonempty_formal_arg_list ',' $$7 formal_arg 65 40 | formal_arg 66 67 41 formal_arg : decl_specs $$2 $$3 declarator 68 69 42 expr : expr '+' $$7 expr 70 43 | expr '-' $$7 expr 71 44 | expr '*' $$7 expr 72 45 | expr '%' $$7 expr 73 46 | expr '/' $$7 expr 74 47 | '*' $$2 expr 75 48 | ID 76 49 | CONSTANT 77 78 50 statement : decl 79 80 51 $$9 : 81 82 52 statement : $$9 expr ';' 83 84 53 $$10 : 85 86 54 $$11 : 87 88 55 statement : IF '(' $$7 expr ')' THEN $$10 statement ELSE $$11 statement 89 56 | IF '(' $$7 expr ')' THEN $$10 statement 90 91 57 $$12 : 92 93 58 statement : $$12 block_statement 94 95 59 statement_list : 96 60 | statement_list $$2 statement 97 98 61 block_statement : '{' $$2 statement_list '}' 99 100state 0 101 $accept : . input $end (0) 102 $$1 : . (5) 103 104 . reduce 5 105 106 input goto 1 107 $$1 goto 2 108 109 110state 1 111 $accept : input . $end (0) 112 113 $end accept 114 115 116state 2 117 input : $$1 . decl_list (6) 118 decl_list : . (7) 119 120 . reduce 7 121 122 decl_list goto 3 123 124 125state 3 126 input : $$1 decl_list . (6) 127 decl_list : decl_list . $$2 decl (9) 128 $$2 : . (8) 129 130 $end reduce 6 131 ID reduce 8 132 EXTERN reduce 8 133 REGISTER reduce 8 134 STATIC reduce 8 135 CONST reduce 8 136 VOLATILE reduce 8 137 CLCL reduce 8 138 139 $$2 goto 4 140 141 142state 4 143 decl_list : decl_list $$2 . decl (9) 144 opt_scope : . (1) 145 146 EXTERN shift 5 147 REGISTER shift 6 148 STATIC shift 7 149 CONST shift 8 150 VOLATILE shift 9 151 CLCL shift 10 152 ID reduce 1 153 154 decl goto 11 155 decl_specs goto 12 156 decl_spec goto 13 157 typename goto 14 158 cv_qual goto 15 159 opt_scope goto 16 160 161 162state 5 163 decl_spec : EXTERN . (20) 164 165 . reduce 20 166 167 168state 6 169 decl_spec : REGISTER . (21) 170 171 . reduce 21 172 173 174state 7 175 decl_spec : STATIC . (22) 176 177 . reduce 22 178 179 180state 8 181 cv_qual : CONST . (23) 182 183 . reduce 23 184 185 186state 9 187 cv_qual : VOLATILE . (24) 188 189 . reduce 24 190 191 192state 10 193 opt_scope : CLCL . (2) 194 195 . reduce 2 196 197 198state 11 199 decl_list : decl_list $$2 decl . (9) 200 201 . reduce 9 202 203 204state 12 205 decl : decl_specs . $$2 $$3 declarator_list ';' (11) 206 decl : decl_specs . $$2 $$3 declarator $$4 block_statement (13) 207 decl_specs : decl_specs . $$2 decl_spec (15) 208 $$2 : . (8) 209 210 . reduce 8 211 212 $$2 goto 17 213 214 215state 13 216 decl_specs : decl_spec . (14) 217 218 . reduce 14 219 220 221state 14 222 decl_spec : typename . (19) 223 224 . reduce 19 225 226 227state 15 228 decl_spec : cv_qual . (18) 229 230 . reduce 18 231 232 233state 16 234 opt_scope : opt_scope . ID CLCL (3) 235 typename : opt_scope . ID (4) 236 237 ID shift 18 238 . error 239 240 24117: reduce/reduce conflict (reduce 1, reduce 10) on ID 242state 17 243 decl : decl_specs $$2 . $$3 declarator_list ';' (11) 244 decl : decl_specs $$2 . $$3 declarator $$4 block_statement (13) 245 decl_specs : decl_specs $$2 . decl_spec (15) 246 opt_scope : . (1) 247 $$3 : . (10) 248 249 EXTERN shift 5 250 REGISTER shift 6 251 STATIC shift 7 252 CONST shift 8 253 VOLATILE shift 9 254 CLCL shift 10 255 '*' reduce 10 256 '(' reduce 10 257 '[' reduce 10 258 ID [trial] reduce 1 259 ID [trial] reduce 10 260 ';' reduce 10 261 ',' reduce 10 262 '{' reduce 10 263 264 decl_spec goto 19 265 typename goto 14 266 cv_qual goto 15 267 opt_scope goto 16 268 $$3 goto 20 269 270 27118: shift/reduce conflict (shift 21, reduce 4) on CLCL 272state 18 273 opt_scope : opt_scope ID . CLCL (3) 274 typename : opt_scope ID . (4) 275 276 CLCL [trial] shift 21 277 '*' reduce 4 278 '(' reduce 4 279 '[' reduce 4 280 ID reduce 4 281 EXTERN reduce 4 282 REGISTER reduce 4 283 STATIC reduce 4 284 CONST reduce 4 285 VOLATILE reduce 4 286 CLCL [trial] reduce 4 287 ';' reduce 4 288 ',' reduce 4 289 ')' reduce 4 290 '{' reduce 4 291 292 293state 19 294 decl_specs : decl_specs $$2 decl_spec . (15) 295 296 . reduce 15 297 298 29920: shift/reduce conflict (shift 23, reduce 29) on '(' 300state 20 301 decl : decl_specs $$2 $$3 . declarator_list ';' (11) 302 decl : decl_specs $$2 $$3 . declarator $$4 block_statement (13) 303 declarator : . (29) 304 305 '*' shift 22 306 '(' [trial] shift 23 307 ID shift 24 308 '(' [trial] reduce 29 309 '[' reduce 29 310 ';' reduce 29 311 ',' reduce 29 312 '{' reduce 29 313 314 declarator_list goto 25 315 declarator goto 26 316 317 318state 21 319 opt_scope : opt_scope ID CLCL . (3) 320 321 . reduce 3 322 323 324state 22 325 declarator : '*' . cv_quals $$5 $$6 declarator (34) 326 cv_quals : . (16) 327 328 . reduce 16 329 330 cv_quals goto 27 331 332 333state 23 334 declarator : '(' . $$7 $$8 declarator ')' (33) 335 $$7 : . (31) 336 337 . reduce 31 338 339 $$7 goto 28 340 341 342state 24 343 declarator : ID . (30) 344 345 . reduce 30 346 347 348state 25 349 decl : decl_specs $$2 $$3 declarator_list . ';' (11) 350 declarator_list : declarator_list . ',' $$5 $$6 declarator (27) 351 352 ';' shift 29 353 ',' shift 30 354 . error 355 356 357state 26 358 decl : decl_specs $$2 $$3 declarator . $$4 block_statement (13) 359 declarator_list : declarator . (28) 360 declarator : declarator . '[' $$5 expr ']' (35) 361 declarator : declarator . '(' $$5 formal_arg_list ')' cv_quals (36) 362 $$4 : . (12) 363 364 '(' shift 31 365 '[' shift 32 366 ';' reduce 28 367 ',' reduce 28 368 '{' reduce 12 369 370 $$4 goto 33 371 372 373state 27 374 cv_quals : cv_quals . cv_qual (17) 375 declarator : '*' cv_quals . $$5 $$6 declarator (34) 376 $$5 : . (25) 377 378 CONST shift 8 379 VOLATILE shift 9 380 '*' reduce 25 381 '(' reduce 25 382 '[' reduce 25 383 ID reduce 25 384 ';' reduce 25 385 ',' reduce 25 386 ')' reduce 25 387 '{' reduce 25 388 389 cv_qual goto 34 390 $$5 goto 35 391 392 393state 28 394 declarator : '(' $$7 . $$8 declarator ')' (33) 395 $$8 : . (32) 396 397 . reduce 32 398 399 $$8 goto 36 400 401 402state 29 403 decl : decl_specs $$2 $$3 declarator_list ';' . (11) 404 405 . reduce 11 406 407 408state 30 409 declarator_list : declarator_list ',' . $$5 $$6 declarator (27) 410 $$5 : . (25) 411 412 . reduce 25 413 414 $$5 goto 37 415 416 417state 31 418 declarator : declarator '(' . $$5 formal_arg_list ')' cv_quals (36) 419 $$5 : . (25) 420 421 . reduce 25 422 423 $$5 goto 38 424 425 426state 32 427 declarator : declarator '[' . $$5 expr ']' (35) 428 $$5 : . (25) 429 430 . reduce 25 431 432 $$5 goto 39 433 434 435state 33 436 decl : decl_specs $$2 $$3 declarator $$4 . block_statement (13) 437 438 '{' shift 40 439 . error 440 441 block_statement goto 41 442 443 444state 34 445 cv_quals : cv_quals cv_qual . (17) 446 447 . reduce 17 448 449 450state 35 451 declarator : '*' cv_quals $$5 . $$6 declarator (34) 452 $$6 : . (26) 453 454 . reduce 26 455 456 $$6 goto 42 457 458 45936: shift/reduce conflict (shift 23, reduce 29) on '(' 460state 36 461 declarator : '(' $$7 $$8 . declarator ')' (33) 462 declarator : . (29) 463 464 '*' shift 22 465 '(' [trial] shift 23 466 ID shift 24 467 '(' [trial] reduce 29 468 '[' reduce 29 469 ')' reduce 29 470 471 declarator goto 43 472 473 474state 37 475 declarator_list : declarator_list ',' $$5 . $$6 declarator (27) 476 $$6 : . (26) 477 478 . reduce 26 479 480 $$6 goto 44 481 482 483state 38 484 declarator : declarator '(' $$5 . formal_arg_list ')' cv_quals (36) 485 opt_scope : . (1) 486 formal_arg_list : . (37) 487 488 EXTERN shift 5 489 REGISTER shift 6 490 STATIC shift 7 491 CONST shift 8 492 VOLATILE shift 9 493 CLCL shift 10 494 ID reduce 1 495 ')' reduce 37 496 497 formal_arg goto 45 498 decl_specs goto 46 499 decl_spec goto 13 500 typename goto 14 501 cv_qual goto 15 502 opt_scope goto 16 503 formal_arg_list goto 47 504 nonempty_formal_arg_list goto 48 505 506 507state 39 508 declarator : declarator '[' $$5 . expr ']' (35) 509 510 '*' shift 49 511 ID shift 50 512 CONSTANT shift 51 513 . error 514 515 expr goto 52 516 517 518state 40 519 block_statement : '{' . $$2 statement_list '}' (61) 520 $$2 : . (8) 521 522 . reduce 8 523 524 $$2 goto 53 525 526 527state 41 528 decl : decl_specs $$2 $$3 declarator $$4 block_statement . (13) 529 530 . reduce 13 531 532 53342: shift/reduce conflict (shift 23, reduce 29) on '(' 534state 42 535 declarator : '*' cv_quals $$5 $$6 . declarator (34) 536 declarator : . (29) 537 538 '*' shift 22 539 '(' [trial] shift 23 540 ID shift 24 541 '(' [trial] reduce 29 542 '[' reduce 29 543 ';' reduce 29 544 ',' reduce 29 545 ')' reduce 29 546 '{' reduce 29 547 548 declarator goto 54 549 550 551state 43 552 declarator : '(' $$7 $$8 declarator . ')' (33) 553 declarator : declarator . '[' $$5 expr ']' (35) 554 declarator : declarator . '(' $$5 formal_arg_list ')' cv_quals (36) 555 556 '(' shift 31 557 '[' shift 32 558 ')' shift 55 559 . error 560 561 56244: shift/reduce conflict (shift 23, reduce 29) on '(' 563state 44 564 declarator_list : declarator_list ',' $$5 $$6 . declarator (27) 565 declarator : . (29) 566 567 '*' shift 22 568 '(' [trial] shift 23 569 ID shift 24 570 '(' [trial] reduce 29 571 '[' reduce 29 572 ';' reduce 29 573 ',' reduce 29 574 575 declarator goto 56 576 577 578state 45 579 nonempty_formal_arg_list : formal_arg . (40) 580 581 . reduce 40 582 583 584state 46 585 decl_specs : decl_specs . $$2 decl_spec (15) 586 formal_arg : decl_specs . $$2 $$3 declarator (41) 587 $$2 : . (8) 588 589 . reduce 8 590 591 $$2 goto 57 592 593 594state 47 595 declarator : declarator '(' $$5 formal_arg_list . ')' cv_quals (36) 596 597 ')' shift 58 598 . error 599 600 601state 48 602 formal_arg_list : nonempty_formal_arg_list . (38) 603 nonempty_formal_arg_list : nonempty_formal_arg_list . ',' $$7 formal_arg (39) 604 605 ',' shift 59 606 ')' reduce 38 607 608 609state 49 610 expr : '*' . $$2 expr (47) 611 $$2 : . (8) 612 613 . reduce 8 614 615 $$2 goto 60 616 617 618state 50 619 expr : ID . (48) 620 621 . reduce 48 622 623 624state 51 625 expr : CONSTANT . (49) 626 627 . reduce 49 628 629 630state 52 631 declarator : declarator '[' $$5 expr . ']' (35) 632 expr : expr . '+' $$7 expr (42) 633 expr : expr . '-' $$7 expr (43) 634 expr : expr . '*' $$7 expr (44) 635 expr : expr . '%' $$7 expr (45) 636 expr : expr . '/' $$7 expr (46) 637 638 '+' shift 61 639 '-' shift 62 640 '*' shift 63 641 '/' shift 64 642 '%' shift 65 643 ']' shift 66 644 . error 645 646 647state 53 648 block_statement : '{' $$2 . statement_list '}' (61) 649 statement_list : . (59) 650 651 . reduce 59 652 653 statement_list goto 67 654 655 656state 54 657 declarator : '*' cv_quals $$5 $$6 declarator . (34) 658 declarator : declarator . '[' $$5 expr ']' (35) 659 declarator : declarator . '(' $$5 formal_arg_list ')' cv_quals (36) 660 661 '(' shift 31 662 '[' shift 32 663 ';' reduce 34 664 ',' reduce 34 665 ')' reduce 34 666 '{' reduce 34 667 668 669state 55 670 declarator : '(' $$7 $$8 declarator ')' . (33) 671 672 . reduce 33 673 674 675state 56 676 declarator_list : declarator_list ',' $$5 $$6 declarator . (27) 677 declarator : declarator . '[' $$5 expr ']' (35) 678 declarator : declarator . '(' $$5 formal_arg_list ')' cv_quals (36) 679 680 '(' shift 31 681 '[' shift 32 682 ';' reduce 27 683 ',' reduce 27 684 685 68657: reduce/reduce conflict (reduce 1, reduce 10) on ID 687state 57 688 decl_specs : decl_specs $$2 . decl_spec (15) 689 formal_arg : decl_specs $$2 . $$3 declarator (41) 690 opt_scope : . (1) 691 $$3 : . (10) 692 693 EXTERN shift 5 694 REGISTER shift 6 695 STATIC shift 7 696 CONST shift 8 697 VOLATILE shift 9 698 CLCL shift 10 699 '*' reduce 10 700 '(' reduce 10 701 '[' reduce 10 702 ID [trial] reduce 1 703 ID [trial] reduce 10 704 ',' reduce 10 705 ')' reduce 10 706 707 decl_spec goto 19 708 typename goto 14 709 cv_qual goto 15 710 opt_scope goto 16 711 $$3 goto 68 712 713 714state 58 715 declarator : declarator '(' $$5 formal_arg_list ')' . cv_quals (36) 716 cv_quals : . (16) 717 718 . reduce 16 719 720 cv_quals goto 69 721 722 723state 59 724 nonempty_formal_arg_list : nonempty_formal_arg_list ',' . $$7 formal_arg (39) 725 $$7 : . (31) 726 727 . reduce 31 728 729 $$7 goto 70 730 731 732state 60 733 expr : '*' $$2 . expr (47) 734 735 '*' shift 49 736 ID shift 50 737 CONSTANT shift 51 738 . error 739 740 expr goto 71 741 742 743state 61 744 expr : expr '+' . $$7 expr (42) 745 $$7 : . (31) 746 747 . reduce 31 748 749 $$7 goto 72 750 751 752state 62 753 expr : expr '-' . $$7 expr (43) 754 $$7 : . (31) 755 756 . reduce 31 757 758 $$7 goto 73 759 760 761state 63 762 expr : expr '*' . $$7 expr (44) 763 $$7 : . (31) 764 765 . reduce 31 766 767 $$7 goto 74 768 769 770state 64 771 expr : expr '/' . $$7 expr (46) 772 $$7 : . (31) 773 774 . reduce 31 775 776 $$7 goto 75 777 778 779state 65 780 expr : expr '%' . $$7 expr (45) 781 $$7 : . (31) 782 783 . reduce 31 784 785 $$7 goto 76 786 787 788state 66 789 declarator : declarator '[' $$5 expr ']' . (35) 790 791 . reduce 35 792 793 794state 67 795 statement_list : statement_list . $$2 statement (60) 796 block_statement : '{' $$2 statement_list . '}' (61) 797 $$2 : . (8) 798 799 '}' shift 77 800 '*' reduce 8 801 ID reduce 8 802 CONSTANT reduce 8 803 EXTERN reduce 8 804 REGISTER reduce 8 805 STATIC reduce 8 806 CONST reduce 8 807 VOLATILE reduce 8 808 IF reduce 8 809 CLCL reduce 8 810 '{' reduce 8 811 812 $$2 goto 78 813 814 81568: shift/reduce conflict (shift 23, reduce 29) on '(' 816state 68 817 formal_arg : decl_specs $$2 $$3 . declarator (41) 818 declarator : . (29) 819 820 '*' shift 22 821 '(' [trial] shift 23 822 ID shift 24 823 '(' [trial] reduce 29 824 '[' reduce 29 825 ',' reduce 29 826 ')' reduce 29 827 828 declarator goto 79 829 830 831state 69 832 cv_quals : cv_quals . cv_qual (17) 833 declarator : declarator '(' $$5 formal_arg_list ')' cv_quals . (36) 834 835 CONST shift 8 836 VOLATILE shift 9 837 '(' reduce 36 838 '[' reduce 36 839 ';' reduce 36 840 ',' reduce 36 841 ')' reduce 36 842 '{' reduce 36 843 844 cv_qual goto 34 845 846 847state 70 848 nonempty_formal_arg_list : nonempty_formal_arg_list ',' $$7 . formal_arg (39) 849 opt_scope : . (1) 850 851 EXTERN shift 5 852 REGISTER shift 6 853 STATIC shift 7 854 CONST shift 8 855 VOLATILE shift 9 856 CLCL shift 10 857 ID reduce 1 858 859 formal_arg goto 80 860 decl_specs goto 46 861 decl_spec goto 13 862 typename goto 14 863 cv_qual goto 15 864 opt_scope goto 16 865 866 867state 71 868 expr : expr . '+' $$7 expr (42) 869 expr : expr . '-' $$7 expr (43) 870 expr : expr . '*' $$7 expr (44) 871 expr : expr . '%' $$7 expr (45) 872 expr : expr . '/' $$7 expr (46) 873 expr : '*' $$2 expr . (47) 874 875 . reduce 47 876 877 878state 72 879 expr : expr '+' $$7 . expr (42) 880 881 '*' shift 49 882 ID shift 50 883 CONSTANT shift 51 884 . error 885 886 expr goto 81 887 888 889state 73 890 expr : expr '-' $$7 . expr (43) 891 892 '*' shift 49 893 ID shift 50 894 CONSTANT shift 51 895 . error 896 897 expr goto 82 898 899 900state 74 901 expr : expr '*' $$7 . expr (44) 902 903 '*' shift 49 904 ID shift 50 905 CONSTANT shift 51 906 . error 907 908 expr goto 83 909 910 911state 75 912 expr : expr '/' $$7 . expr (46) 913 914 '*' shift 49 915 ID shift 50 916 CONSTANT shift 51 917 . error 918 919 expr goto 84 920 921 922state 76 923 expr : expr '%' $$7 . expr (45) 924 925 '*' shift 49 926 ID shift 50 927 CONSTANT shift 51 928 . error 929 930 expr goto 85 931 932 933state 77 934 block_statement : '{' $$2 statement_list '}' . (61) 935 936 . reduce 61 937 938 93978: reduce/reduce conflict (reduce 1, reduce 51) on ID 940state 78 941 statement_list : statement_list $$2 . statement (60) 942 opt_scope : . (1) 943 $$9 : . (51) 944 $$12 : . (57) 945 946 EXTERN shift 5 947 REGISTER shift 6 948 STATIC shift 7 949 CONST shift 8 950 VOLATILE shift 9 951 IF shift 86 952 CLCL shift 10 953 '*' reduce 51 954 ID [trial] reduce 1 955 ID [trial] reduce 51 956 CONSTANT reduce 51 957 '{' reduce 57 958 959 decl goto 87 960 statement goto 88 961 decl_specs goto 12 962 decl_spec goto 13 963 typename goto 14 964 cv_qual goto 15 965 opt_scope goto 16 966 $$9 goto 89 967 $$12 goto 90 968 969 970state 79 971 declarator : declarator . '[' $$5 expr ']' (35) 972 declarator : declarator . '(' $$5 formal_arg_list ')' cv_quals (36) 973 formal_arg : decl_specs $$2 $$3 declarator . (41) 974 975 '(' shift 31 976 '[' shift 32 977 ',' reduce 41 978 ')' reduce 41 979 980 981state 80 982 nonempty_formal_arg_list : nonempty_formal_arg_list ',' $$7 formal_arg . (39) 983 984 . reduce 39 985 986 987state 81 988 expr : expr . '+' $$7 expr (42) 989 expr : expr '+' $$7 expr . (42) 990 expr : expr . '-' $$7 expr (43) 991 expr : expr . '*' $$7 expr (44) 992 expr : expr . '%' $$7 expr (45) 993 expr : expr . '/' $$7 expr (46) 994 995 '*' shift 63 996 '/' shift 64 997 '%' shift 65 998 '+' reduce 42 999 '-' reduce 42 1000 ';' reduce 42 1001 ')' reduce 42 1002 ']' reduce 42 1003 1004 1005state 82 1006 expr : expr . '+' $$7 expr (42) 1007 expr : expr . '-' $$7 expr (43) 1008 expr : expr '-' $$7 expr . (43) 1009 expr : expr . '*' $$7 expr (44) 1010 expr : expr . '%' $$7 expr (45) 1011 expr : expr . '/' $$7 expr (46) 1012 1013 '*' shift 63 1014 '/' shift 64 1015 '%' shift 65 1016 '+' reduce 43 1017 '-' reduce 43 1018 ';' reduce 43 1019 ')' reduce 43 1020 ']' reduce 43 1021 1022 1023state 83 1024 expr : expr . '+' $$7 expr (42) 1025 expr : expr . '-' $$7 expr (43) 1026 expr : expr . '*' $$7 expr (44) 1027 expr : expr '*' $$7 expr . (44) 1028 expr : expr . '%' $$7 expr (45) 1029 expr : expr . '/' $$7 expr (46) 1030 1031 . reduce 44 1032 1033 1034state 84 1035 expr : expr . '+' $$7 expr (42) 1036 expr : expr . '-' $$7 expr (43) 1037 expr : expr . '*' $$7 expr (44) 1038 expr : expr . '%' $$7 expr (45) 1039 expr : expr . '/' $$7 expr (46) 1040 expr : expr '/' $$7 expr . (46) 1041 1042 . reduce 46 1043 1044 1045state 85 1046 expr : expr . '+' $$7 expr (42) 1047 expr : expr . '-' $$7 expr (43) 1048 expr : expr . '*' $$7 expr (44) 1049 expr : expr . '%' $$7 expr (45) 1050 expr : expr '%' $$7 expr . (45) 1051 expr : expr . '/' $$7 expr (46) 1052 1053 . reduce 45 1054 1055 1056state 86 1057 statement : IF . '(' $$7 expr ')' THEN $$10 statement ELSE $$11 statement (55) 1058 statement : IF . '(' $$7 expr ')' THEN $$10 statement (56) 1059 1060 '(' shift 91 1061 . error 1062 1063 1064state 87 1065 statement : decl . (50) 1066 1067 . reduce 50 1068 1069 1070state 88 1071 statement_list : statement_list $$2 statement . (60) 1072 1073 . reduce 60 1074 1075 1076state 89 1077 statement : $$9 . expr ';' (52) 1078 1079 '*' shift 49 1080 ID shift 50 1081 CONSTANT shift 51 1082 . error 1083 1084 expr goto 92 1085 1086 1087state 90 1088 statement : $$12 . block_statement (58) 1089 1090 '{' shift 40 1091 . error 1092 1093 block_statement goto 93 1094 1095 1096state 91 1097 statement : IF '(' . $$7 expr ')' THEN $$10 statement ELSE $$11 statement (55) 1098 statement : IF '(' . $$7 expr ')' THEN $$10 statement (56) 1099 $$7 : . (31) 1100 1101 . reduce 31 1102 1103 $$7 goto 94 1104 1105 1106state 92 1107 expr : expr . '+' $$7 expr (42) 1108 expr : expr . '-' $$7 expr (43) 1109 expr : expr . '*' $$7 expr (44) 1110 expr : expr . '%' $$7 expr (45) 1111 expr : expr . '/' $$7 expr (46) 1112 statement : $$9 expr . ';' (52) 1113 1114 '+' shift 61 1115 '-' shift 62 1116 '*' shift 63 1117 '/' shift 64 1118 '%' shift 65 1119 ';' shift 95 1120 . error 1121 1122 1123state 93 1124 statement : $$12 block_statement . (58) 1125 1126 . reduce 58 1127 1128 1129state 94 1130 statement : IF '(' $$7 . expr ')' THEN $$10 statement ELSE $$11 statement (55) 1131 statement : IF '(' $$7 . expr ')' THEN $$10 statement (56) 1132 1133 '*' shift 49 1134 ID shift 50 1135 CONSTANT shift 51 1136 . error 1137 1138 expr goto 96 1139 1140 1141state 95 1142 statement : $$9 expr ';' . (52) 1143 1144 . reduce 52 1145 1146 1147state 96 1148 expr : expr . '+' $$7 expr (42) 1149 expr : expr . '-' $$7 expr (43) 1150 expr : expr . '*' $$7 expr (44) 1151 expr : expr . '%' $$7 expr (45) 1152 expr : expr . '/' $$7 expr (46) 1153 statement : IF '(' $$7 expr . ')' THEN $$10 statement ELSE $$11 statement (55) 1154 statement : IF '(' $$7 expr . ')' THEN $$10 statement (56) 1155 1156 '+' shift 61 1157 '-' shift 62 1158 '*' shift 63 1159 '/' shift 64 1160 '%' shift 65 1161 ')' shift 97 1162 . error 1163 1164 1165state 97 1166 statement : IF '(' $$7 expr ')' . THEN $$10 statement ELSE $$11 statement (55) 1167 statement : IF '(' $$7 expr ')' . THEN $$10 statement (56) 1168 1169 THEN shift 98 1170 . error 1171 1172 1173state 98 1174 statement : IF '(' $$7 expr ')' THEN . $$10 statement ELSE $$11 statement (55) 1175 statement : IF '(' $$7 expr ')' THEN . $$10 statement (56) 1176 $$10 : . (53) 1177 1178 . reduce 53 1179 1180 $$10 goto 99 1181 1182 118399: reduce/reduce conflict (reduce 1, reduce 51) on ID 1184state 99 1185 statement : IF '(' $$7 expr ')' THEN $$10 . statement ELSE $$11 statement (55) 1186 statement : IF '(' $$7 expr ')' THEN $$10 . statement (56) 1187 opt_scope : . (1) 1188 $$9 : . (51) 1189 $$12 : . (57) 1190 1191 EXTERN shift 5 1192 REGISTER shift 6 1193 STATIC shift 7 1194 CONST shift 8 1195 VOLATILE shift 9 1196 IF shift 86 1197 CLCL shift 10 1198 '*' reduce 51 1199 ID [trial] reduce 1 1200 ID [trial] reduce 51 1201 CONSTANT reduce 51 1202 '{' reduce 57 1203 1204 decl goto 87 1205 statement goto 100 1206 decl_specs goto 12 1207 decl_spec goto 13 1208 typename goto 14 1209 cv_qual goto 15 1210 opt_scope goto 16 1211 $$9 goto 89 1212 $$12 goto 90 1213 1214 1215100: shift/reduce conflict (shift 101, reduce 56) on ELSE 1216state 100 1217 statement : IF '(' $$7 expr ')' THEN $$10 statement . ELSE $$11 statement (55) 1218 statement : IF '(' $$7 expr ')' THEN $$10 statement . (56) 1219 1220 ELSE [trial] shift 101 1221 '*' reduce 56 1222 ID reduce 56 1223 CONSTANT reduce 56 1224 EXTERN reduce 56 1225 REGISTER reduce 56 1226 STATIC reduce 56 1227 CONST reduce 56 1228 VOLATILE reduce 56 1229 IF reduce 56 1230 ELSE [trial] reduce 56 1231 CLCL reduce 56 1232 '{' reduce 56 1233 '}' reduce 56 1234 1235 1236state 101 1237 statement : IF '(' $$7 expr ')' THEN $$10 statement ELSE . $$11 statement (55) 1238 $$11 : . (54) 1239 1240 . reduce 54 1241 1242 $$11 goto 102 1243 1244 1245102: reduce/reduce conflict (reduce 1, reduce 51) on ID 1246state 102 1247 statement : IF '(' $$7 expr ')' THEN $$10 statement ELSE $$11 . statement (55) 1248 opt_scope : . (1) 1249 $$9 : . (51) 1250 $$12 : . (57) 1251 1252 EXTERN shift 5 1253 REGISTER shift 6 1254 STATIC shift 7 1255 CONST shift 8 1256 VOLATILE shift 9 1257 IF shift 86 1258 CLCL shift 10 1259 '*' reduce 51 1260 ID [trial] reduce 1 1261 ID [trial] reduce 51 1262 CONSTANT reduce 51 1263 '{' reduce 57 1264 1265 decl goto 87 1266 statement goto 103 1267 decl_specs goto 12 1268 decl_spec goto 13 1269 typename goto 14 1270 cv_qual goto 15 1271 opt_scope goto 16 1272 $$9 goto 89 1273 $$12 goto 90 1274 1275 1276state 103 1277 statement : IF '(' $$7 expr ')' THEN $$10 statement ELSE $$11 statement . (55) 1278 1279 . reduce 55 1280 1281 1282State 17 contains 1 reduce/reduce conflict. 1283State 18 contains 1 shift/reduce conflict. 1284State 20 contains 1 shift/reduce conflict. 1285State 36 contains 1 shift/reduce conflict. 1286State 42 contains 1 shift/reduce conflict. 1287State 44 contains 1 shift/reduce conflict. 1288State 57 contains 1 reduce/reduce conflict. 1289State 68 contains 1 shift/reduce conflict. 1290State 78 contains 1 reduce/reduce conflict. 1291State 99 contains 1 reduce/reduce conflict. 1292State 100 contains 1 shift/reduce conflict. 1293State 102 contains 1 reduce/reduce conflict. 1294 1295 129629 terminals, 31 nonterminals 129762 grammar rules, 104 states 1298 1299grammar parser grammar 1300symbol# value# symbol 1301 0 0 $end 1302 1 256 error 1303 2 43 '+' 1304 3 45 '-' 1305 4 42 '*' 1306 5 47 '/' 1307 6 37 '%' 1308 7 257 PREFIX 1309 8 258 POSTFIX 1310 9 40 '(' 1311 10 91 '[' 1312 11 46 '.' 1313 12 259 ID 1314 13 260 CONSTANT 1315 14 261 EXTERN 1316 15 262 REGISTER 1317 16 263 STATIC 1318 17 264 CONST 1319 18 265 VOLATILE 1320 19 266 IF 1321 20 267 THEN 1322 21 268 ELSE 1323 22 269 CLCL 1324 23 59 ';' 1325 24 44 ',' 1326 25 41 ')' 1327 26 93 ']' 1328 27 123 '{' 1329 28 125 '}' 1330 29 270 $accept 1331 30 271 input 1332 31 272 expr 1333 32 273 decl 1334 33 274 declarator_list 1335 34 275 decl_list 1336 35 276 statement 1337 36 277 statement_list 1338 37 278 block_statement 1339 38 279 declarator 1340 39 280 formal_arg 1341 40 281 decl_specs 1342 41 282 decl_spec 1343 42 283 typename 1344 43 284 cv_quals 1345 44 285 cv_qual 1346 45 286 opt_scope 1347 46 287 formal_arg_list 1348 47 288 nonempty_formal_arg_list 1349 48 289 $$1 1350 49 290 $$2 1351 50 291 $$3 1352 51 292 $$4 1353 52 293 $$5 1354 53 294 $$6 1355 54 295 $$7 1356 55 296 $$8 1357 56 297 $$9 1358 57 298 $$10 1359 58 299 $$11 1360 59 300 $$12 1361