1 0 $accept : line $end 2 3 1 lines : 4 2 | lines line 5 6 3 line : dexp '\n' 7 4 | vexp '\n' 8 5 | DREG '=' dexp '\n' 9 6 | VREG '=' vexp '\n' 10 7 | error '\n' 11 12 8 dexp : CONST 13 9 | DREG 14 10 | dexp '+' dexp 15 11 | dexp '-' dexp 16 12 | dexp '*' dexp 17 13 | dexp '/' dexp 18 14 | '-' dexp 19 15 | '(' dexp ')' 20 21 16 vexp : dexp 22 17 | '(' dexp ',' dexp ')' 23 18 | VREG 24 19 | vexp '+' vexp 25 20 | dexp '+' vexp 26 21 | vexp '-' vexp 27 22 | dexp '-' vexp 28 23 | vexp '*' vexp 29 24 | dexp '*' vexp 30 25 | vexp '/' vexp 31 26 | dexp '/' vexp 32 27 | '-' vexp 33 28 | '(' vexp ')' 34 35state 0 36 $accept : . line $end (0) 37 38 error shift 1 39 DREG shift 2 40 VREG shift 3 41 CONST shift 4 42 '-' shift 5 43 '(' shift 6 44 . error 45 46 line goto 7 47 dexp goto 8 48 vexp goto 9 49 50 51state 1 52 line : error . '\n' (7) 53 54 '\n' shift 10 55 . error 56 57 58state 2 59 line : DREG . '=' dexp '\n' (5) 60 dexp : DREG . (9) 61 62 '=' shift 11 63 '+' reduce 9 64 '-' reduce 9 65 '*' reduce 9 66 '/' reduce 9 67 '\n' reduce 9 68 69 70state 3 71 line : VREG . '=' vexp '\n' (6) 72 vexp : VREG . (18) 73 74 '=' shift 12 75 '+' reduce 18 76 '-' reduce 18 77 '*' reduce 18 78 '/' reduce 18 79 '\n' reduce 18 80 81 82state 4 83 dexp : CONST . (8) 84 85 . reduce 8 86 87 88state 5 89 dexp : '-' . dexp (14) 90 vexp : '-' . vexp (27) 91 92 DREG shift 13 93 VREG shift 14 94 CONST shift 4 95 '-' shift 5 96 '(' shift 6 97 . error 98 99 dexp goto 15 100 vexp goto 16 101 102 103state 6 104 dexp : '(' . dexp ')' (15) 105 vexp : '(' . dexp ',' dexp ')' (17) 106 vexp : '(' . vexp ')' (28) 107 108 DREG shift 13 109 VREG shift 14 110 CONST shift 4 111 '-' shift 5 112 '(' shift 6 113 . error 114 115 dexp goto 17 116 vexp goto 18 117 118 119state 7 120 $accept : line . $end (0) 121 122 $end accept 123 124 1258: shift/reduce conflict (shift 19, reduce 16) on '+' 1268: shift/reduce conflict (shift 20, reduce 16) on '-' 1278: shift/reduce conflict (shift 21, reduce 16) on '*' 1288: shift/reduce conflict (shift 22, reduce 16) on '/' 1298: shift/reduce conflict (shift 23, reduce 16) on '\n' 130state 8 131 line : dexp . '\n' (3) 132 dexp : dexp . '+' dexp (10) 133 dexp : dexp . '-' dexp (11) 134 dexp : dexp . '*' dexp (12) 135 dexp : dexp . '/' dexp (13) 136 vexp : dexp . (16) 137 vexp : dexp . '+' vexp (20) 138 vexp : dexp . '-' vexp (22) 139 vexp : dexp . '*' vexp (24) 140 vexp : dexp . '/' vexp (26) 141 142 '+' shift 19 143 '-' shift 20 144 '*' shift 21 145 '/' shift 22 146 '\n' shift 23 147 148 149state 9 150 line : vexp . '\n' (4) 151 vexp : vexp . '+' vexp (19) 152 vexp : vexp . '-' vexp (21) 153 vexp : vexp . '*' vexp (23) 154 vexp : vexp . '/' vexp (25) 155 156 '+' shift 24 157 '-' shift 25 158 '*' shift 26 159 '/' shift 27 160 '\n' shift 28 161 . error 162 163 164state 10 165 line : error '\n' . (7) 166 167 . reduce 7 168 169 170state 11 171 line : DREG '=' . dexp '\n' (5) 172 173 DREG shift 13 174 CONST shift 4 175 '-' shift 29 176 '(' shift 30 177 . error 178 179 dexp goto 31 180 181 182state 12 183 line : VREG '=' . vexp '\n' (6) 184 185 DREG shift 13 186 VREG shift 14 187 CONST shift 4 188 '-' shift 5 189 '(' shift 6 190 . error 191 192 dexp goto 32 193 vexp goto 33 194 195 196state 13 197 dexp : DREG . (9) 198 199 . reduce 9 200 201 202state 14 203 vexp : VREG . (18) 204 205 . reduce 18 206 207 20815: reduce/reduce conflict (reduce 14, reduce 16) on '+' 20915: reduce/reduce conflict (reduce 14, reduce 16) on '-' 21015: reduce/reduce conflict (reduce 14, reduce 16) on '*' 21115: reduce/reduce conflict (reduce 14, reduce 16) on '/' 21215: reduce/reduce conflict (reduce 14, reduce 16) on '\n' 21315: reduce/reduce conflict (reduce 14, reduce 16) on ')' 214state 15 215 dexp : dexp . '+' dexp (10) 216 dexp : dexp . '-' dexp (11) 217 dexp : dexp . '*' dexp (12) 218 dexp : dexp . '/' dexp (13) 219 dexp : '-' dexp . (14) 220 vexp : dexp . (16) 221 vexp : dexp . '+' vexp (20) 222 vexp : dexp . '-' vexp (22) 223 vexp : dexp . '*' vexp (24) 224 vexp : dexp . '/' vexp (26) 225 226 . reduce 14 227 228 229state 16 230 vexp : vexp . '+' vexp (19) 231 vexp : vexp . '-' vexp (21) 232 vexp : vexp . '*' vexp (23) 233 vexp : vexp . '/' vexp (25) 234 vexp : '-' vexp . (27) 235 236 . reduce 27 237 238 23917: shift/reduce conflict (shift 19, reduce 16) on '+' 24017: shift/reduce conflict (shift 20, reduce 16) on '-' 24117: shift/reduce conflict (shift 21, reduce 16) on '*' 24217: shift/reduce conflict (shift 22, reduce 16) on '/' 24317: shift/reduce conflict (shift 34, reduce 16) on ')' 244state 17 245 dexp : dexp . '+' dexp (10) 246 dexp : dexp . '-' dexp (11) 247 dexp : dexp . '*' dexp (12) 248 dexp : dexp . '/' dexp (13) 249 dexp : '(' dexp . ')' (15) 250 vexp : dexp . (16) 251 vexp : '(' dexp . ',' dexp ')' (17) 252 vexp : dexp . '+' vexp (20) 253 vexp : dexp . '-' vexp (22) 254 vexp : dexp . '*' vexp (24) 255 vexp : dexp . '/' vexp (26) 256 257 '+' shift 19 258 '-' shift 20 259 '*' shift 21 260 '/' shift 22 261 ')' shift 34 262 ',' shift 35 263 264 265state 18 266 vexp : vexp . '+' vexp (19) 267 vexp : vexp . '-' vexp (21) 268 vexp : vexp . '*' vexp (23) 269 vexp : vexp . '/' vexp (25) 270 vexp : '(' vexp . ')' (28) 271 272 '+' shift 24 273 '-' shift 25 274 '*' shift 26 275 '/' shift 27 276 ')' shift 36 277 . error 278 279 280state 19 281 dexp : dexp '+' . dexp (10) 282 vexp : dexp '+' . vexp (20) 283 284 DREG shift 13 285 VREG shift 14 286 CONST shift 4 287 '-' shift 5 288 '(' shift 6 289 . error 290 291 dexp goto 37 292 vexp goto 38 293 294 295state 20 296 dexp : dexp '-' . dexp (11) 297 vexp : dexp '-' . vexp (22) 298 299 DREG shift 13 300 VREG shift 14 301 CONST shift 4 302 '-' shift 5 303 '(' shift 6 304 . error 305 306 dexp goto 39 307 vexp goto 40 308 309 310state 21 311 dexp : dexp '*' . dexp (12) 312 vexp : dexp '*' . vexp (24) 313 314 DREG shift 13 315 VREG shift 14 316 CONST shift 4 317 '-' shift 5 318 '(' shift 6 319 . error 320 321 dexp goto 41 322 vexp goto 42 323 324 325state 22 326 dexp : dexp '/' . dexp (13) 327 vexp : dexp '/' . vexp (26) 328 329 DREG shift 13 330 VREG shift 14 331 CONST shift 4 332 '-' shift 5 333 '(' shift 6 334 . error 335 336 dexp goto 43 337 vexp goto 44 338 339 340state 23 341 line : dexp '\n' . (3) 342 343 . reduce 3 344 345 346state 24 347 vexp : vexp '+' . vexp (19) 348 349 DREG shift 13 350 VREG shift 14 351 CONST shift 4 352 '-' shift 5 353 '(' shift 6 354 . error 355 356 dexp goto 32 357 vexp goto 45 358 359 360state 25 361 vexp : vexp '-' . vexp (21) 362 363 DREG shift 13 364 VREG shift 14 365 CONST shift 4 366 '-' shift 5 367 '(' shift 6 368 . error 369 370 dexp goto 32 371 vexp goto 46 372 373 374state 26 375 vexp : vexp '*' . vexp (23) 376 377 DREG shift 13 378 VREG shift 14 379 CONST shift 4 380 '-' shift 5 381 '(' shift 6 382 . error 383 384 dexp goto 32 385 vexp goto 47 386 387 388state 27 389 vexp : vexp '/' . vexp (25) 390 391 DREG shift 13 392 VREG shift 14 393 CONST shift 4 394 '-' shift 5 395 '(' shift 6 396 . error 397 398 dexp goto 32 399 vexp goto 48 400 401 402state 28 403 line : vexp '\n' . (4) 404 405 . reduce 4 406 407 408state 29 409 dexp : '-' . dexp (14) 410 411 DREG shift 13 412 CONST shift 4 413 '-' shift 29 414 '(' shift 30 415 . error 416 417 dexp goto 49 418 419 420state 30 421 dexp : '(' . dexp ')' (15) 422 423 DREG shift 13 424 CONST shift 4 425 '-' shift 29 426 '(' shift 30 427 . error 428 429 dexp goto 50 430 431 432state 31 433 line : DREG '=' dexp . '\n' (5) 434 dexp : dexp . '+' dexp (10) 435 dexp : dexp . '-' dexp (11) 436 dexp : dexp . '*' dexp (12) 437 dexp : dexp . '/' dexp (13) 438 439 '+' shift 51 440 '-' shift 52 441 '*' shift 53 442 '/' shift 54 443 '\n' shift 55 444 . error 445 446 44732: shift/reduce conflict (shift 19, reduce 16) on '+' 44832: shift/reduce conflict (shift 20, reduce 16) on '-' 44932: shift/reduce conflict (shift 21, reduce 16) on '*' 45032: shift/reduce conflict (shift 22, reduce 16) on '/' 451state 32 452 dexp : dexp . '+' dexp (10) 453 dexp : dexp . '-' dexp (11) 454 dexp : dexp . '*' dexp (12) 455 dexp : dexp . '/' dexp (13) 456 vexp : dexp . (16) 457 vexp : dexp . '+' vexp (20) 458 vexp : dexp . '-' vexp (22) 459 vexp : dexp . '*' vexp (24) 460 vexp : dexp . '/' vexp (26) 461 462 '+' shift 19 463 '-' shift 20 464 '*' shift 21 465 '/' shift 22 466 '\n' reduce 16 467 ')' reduce 16 468 469 470state 33 471 line : VREG '=' vexp . '\n' (6) 472 vexp : vexp . '+' vexp (19) 473 vexp : vexp . '-' vexp (21) 474 vexp : vexp . '*' vexp (23) 475 vexp : vexp . '/' vexp (25) 476 477 '+' shift 24 478 '-' shift 25 479 '*' shift 26 480 '/' shift 27 481 '\n' shift 56 482 . error 483 484 485state 34 486 dexp : '(' dexp ')' . (15) 487 488 . reduce 15 489 490 491state 35 492 vexp : '(' dexp ',' . dexp ')' (17) 493 494 DREG shift 13 495 CONST shift 4 496 '-' shift 29 497 '(' shift 30 498 . error 499 500 dexp goto 57 501 502 503state 36 504 vexp : '(' vexp ')' . (28) 505 506 . reduce 28 507 508 50937: reduce/reduce conflict (reduce 10, reduce 16) on '+' 51037: reduce/reduce conflict (reduce 10, reduce 16) on '-' 51137: shift/reduce conflict (shift 21, reduce 16) on '*' 51237: shift/reduce conflict (shift 22, reduce 16) on '/' 51337: reduce/reduce conflict (reduce 10, reduce 16) on '\n' 51437: reduce/reduce conflict (reduce 10, reduce 16) on ')' 515state 37 516 dexp : dexp . '+' dexp (10) 517 dexp : dexp '+' dexp . (10) 518 dexp : dexp . '-' dexp (11) 519 dexp : dexp . '*' dexp (12) 520 dexp : dexp . '/' dexp (13) 521 vexp : dexp . (16) 522 vexp : dexp . '+' vexp (20) 523 vexp : dexp . '-' vexp (22) 524 vexp : dexp . '*' vexp (24) 525 vexp : dexp . '/' vexp (26) 526 527 '*' shift 21 528 '/' shift 22 529 '+' reduce 10 530 '-' reduce 10 531 '\n' reduce 10 532 ')' reduce 10 533 ',' reduce 10 534 535 536state 38 537 vexp : vexp . '+' vexp (19) 538 vexp : dexp '+' vexp . (20) 539 vexp : vexp . '-' vexp (21) 540 vexp : vexp . '*' vexp (23) 541 vexp : vexp . '/' vexp (25) 542 543 '*' shift 26 544 '/' shift 27 545 '+' reduce 20 546 '-' reduce 20 547 '\n' reduce 20 548 ')' reduce 20 549 550 55139: reduce/reduce conflict (reduce 11, reduce 16) on '+' 55239: reduce/reduce conflict (reduce 11, reduce 16) on '-' 55339: shift/reduce conflict (shift 21, reduce 16) on '*' 55439: shift/reduce conflict (shift 22, reduce 16) on '/' 55539: reduce/reduce conflict (reduce 11, reduce 16) on '\n' 55639: reduce/reduce conflict (reduce 11, reduce 16) on ')' 557state 39 558 dexp : dexp . '+' dexp (10) 559 dexp : dexp . '-' dexp (11) 560 dexp : dexp '-' dexp . (11) 561 dexp : dexp . '*' dexp (12) 562 dexp : dexp . '/' dexp (13) 563 vexp : dexp . (16) 564 vexp : dexp . '+' vexp (20) 565 vexp : dexp . '-' vexp (22) 566 vexp : dexp . '*' vexp (24) 567 vexp : dexp . '/' vexp (26) 568 569 '*' shift 21 570 '/' shift 22 571 '+' reduce 11 572 '-' reduce 11 573 '\n' reduce 11 574 ')' reduce 11 575 ',' reduce 11 576 577 578state 40 579 vexp : vexp . '+' vexp (19) 580 vexp : vexp . '-' vexp (21) 581 vexp : dexp '-' vexp . (22) 582 vexp : vexp . '*' vexp (23) 583 vexp : vexp . '/' vexp (25) 584 585 '*' shift 26 586 '/' shift 27 587 '+' reduce 22 588 '-' reduce 22 589 '\n' reduce 22 590 ')' reduce 22 591 592 59341: reduce/reduce conflict (reduce 12, reduce 16) on '+' 59441: reduce/reduce conflict (reduce 12, reduce 16) on '-' 59541: reduce/reduce conflict (reduce 12, reduce 16) on '*' 59641: reduce/reduce conflict (reduce 12, reduce 16) on '/' 59741: reduce/reduce conflict (reduce 12, reduce 16) on '\n' 59841: reduce/reduce conflict (reduce 12, reduce 16) on ')' 599state 41 600 dexp : dexp . '+' dexp (10) 601 dexp : dexp . '-' dexp (11) 602 dexp : dexp . '*' dexp (12) 603 dexp : dexp '*' dexp . (12) 604 dexp : dexp . '/' dexp (13) 605 vexp : dexp . (16) 606 vexp : dexp . '+' vexp (20) 607 vexp : dexp . '-' vexp (22) 608 vexp : dexp . '*' vexp (24) 609 vexp : dexp . '/' vexp (26) 610 611 . reduce 12 612 613 614state 42 615 vexp : vexp . '+' vexp (19) 616 vexp : vexp . '-' vexp (21) 617 vexp : vexp . '*' vexp (23) 618 vexp : dexp '*' vexp . (24) 619 vexp : vexp . '/' vexp (25) 620 621 . reduce 24 622 623 62443: reduce/reduce conflict (reduce 13, reduce 16) on '+' 62543: reduce/reduce conflict (reduce 13, reduce 16) on '-' 62643: reduce/reduce conflict (reduce 13, reduce 16) on '*' 62743: reduce/reduce conflict (reduce 13, reduce 16) on '/' 62843: reduce/reduce conflict (reduce 13, reduce 16) on '\n' 62943: reduce/reduce conflict (reduce 13, reduce 16) on ')' 630state 43 631 dexp : dexp . '+' dexp (10) 632 dexp : dexp . '-' dexp (11) 633 dexp : dexp . '*' dexp (12) 634 dexp : dexp . '/' dexp (13) 635 dexp : dexp '/' dexp . (13) 636 vexp : dexp . (16) 637 vexp : dexp . '+' vexp (20) 638 vexp : dexp . '-' vexp (22) 639 vexp : dexp . '*' vexp (24) 640 vexp : dexp . '/' vexp (26) 641 642 . reduce 13 643 644 645state 44 646 vexp : vexp . '+' vexp (19) 647 vexp : vexp . '-' vexp (21) 648 vexp : vexp . '*' vexp (23) 649 vexp : vexp . '/' vexp (25) 650 vexp : dexp '/' vexp . (26) 651 652 . reduce 26 653 654 655state 45 656 vexp : vexp . '+' vexp (19) 657 vexp : vexp '+' vexp . (19) 658 vexp : vexp . '-' vexp (21) 659 vexp : vexp . '*' vexp (23) 660 vexp : vexp . '/' vexp (25) 661 662 '*' shift 26 663 '/' shift 27 664 '+' reduce 19 665 '-' reduce 19 666 '\n' reduce 19 667 ')' reduce 19 668 669 670state 46 671 vexp : vexp . '+' vexp (19) 672 vexp : vexp . '-' vexp (21) 673 vexp : vexp '-' vexp . (21) 674 vexp : vexp . '*' vexp (23) 675 vexp : vexp . '/' vexp (25) 676 677 '*' shift 26 678 '/' shift 27 679 '+' reduce 21 680 '-' reduce 21 681 '\n' reduce 21 682 ')' reduce 21 683 684 685state 47 686 vexp : vexp . '+' vexp (19) 687 vexp : vexp . '-' vexp (21) 688 vexp : vexp . '*' vexp (23) 689 vexp : vexp '*' vexp . (23) 690 vexp : vexp . '/' vexp (25) 691 692 . reduce 23 693 694 695state 48 696 vexp : vexp . '+' vexp (19) 697 vexp : vexp . '-' vexp (21) 698 vexp : vexp . '*' vexp (23) 699 vexp : vexp . '/' vexp (25) 700 vexp : vexp '/' vexp . (25) 701 702 . reduce 25 703 704 705state 49 706 dexp : dexp . '+' dexp (10) 707 dexp : dexp . '-' dexp (11) 708 dexp : dexp . '*' dexp (12) 709 dexp : dexp . '/' dexp (13) 710 dexp : '-' dexp . (14) 711 712 . reduce 14 713 714 715state 50 716 dexp : dexp . '+' dexp (10) 717 dexp : dexp . '-' dexp (11) 718 dexp : dexp . '*' dexp (12) 719 dexp : dexp . '/' dexp (13) 720 dexp : '(' dexp . ')' (15) 721 722 '+' shift 51 723 '-' shift 52 724 '*' shift 53 725 '/' shift 54 726 ')' shift 34 727 . error 728 729 730state 51 731 dexp : dexp '+' . dexp (10) 732 733 DREG shift 13 734 CONST shift 4 735 '-' shift 29 736 '(' shift 30 737 . error 738 739 dexp goto 58 740 741 742state 52 743 dexp : dexp '-' . dexp (11) 744 745 DREG shift 13 746 CONST shift 4 747 '-' shift 29 748 '(' shift 30 749 . error 750 751 dexp goto 59 752 753 754state 53 755 dexp : dexp '*' . dexp (12) 756 757 DREG shift 13 758 CONST shift 4 759 '-' shift 29 760 '(' shift 30 761 . error 762 763 dexp goto 60 764 765 766state 54 767 dexp : dexp '/' . dexp (13) 768 769 DREG shift 13 770 CONST shift 4 771 '-' shift 29 772 '(' shift 30 773 . error 774 775 dexp goto 61 776 777 778state 55 779 line : DREG '=' dexp '\n' . (5) 780 781 . reduce 5 782 783 784state 56 785 line : VREG '=' vexp '\n' . (6) 786 787 . reduce 6 788 789 790state 57 791 dexp : dexp . '+' dexp (10) 792 dexp : dexp . '-' dexp (11) 793 dexp : dexp . '*' dexp (12) 794 dexp : dexp . '/' dexp (13) 795 vexp : '(' dexp ',' dexp . ')' (17) 796 797 '+' shift 51 798 '-' shift 52 799 '*' shift 53 800 '/' shift 54 801 ')' shift 62 802 . error 803 804 805state 58 806 dexp : dexp . '+' dexp (10) 807 dexp : dexp '+' dexp . (10) 808 dexp : dexp . '-' dexp (11) 809 dexp : dexp . '*' dexp (12) 810 dexp : dexp . '/' dexp (13) 811 812 '*' shift 53 813 '/' shift 54 814 '+' reduce 10 815 '-' reduce 10 816 '\n' reduce 10 817 ')' reduce 10 818 819 820state 59 821 dexp : dexp . '+' dexp (10) 822 dexp : dexp . '-' dexp (11) 823 dexp : dexp '-' dexp . (11) 824 dexp : dexp . '*' dexp (12) 825 dexp : dexp . '/' dexp (13) 826 827 '*' shift 53 828 '/' shift 54 829 '+' reduce 11 830 '-' reduce 11 831 '\n' reduce 11 832 ')' reduce 11 833 834 835state 60 836 dexp : dexp . '+' dexp (10) 837 dexp : dexp . '-' dexp (11) 838 dexp : dexp . '*' dexp (12) 839 dexp : dexp '*' dexp . (12) 840 dexp : dexp . '/' dexp (13) 841 842 . reduce 12 843 844 845state 61 846 dexp : dexp . '+' dexp (10) 847 dexp : dexp . '-' dexp (11) 848 dexp : dexp . '*' dexp (12) 849 dexp : dexp . '/' dexp (13) 850 dexp : dexp '/' dexp . (13) 851 852 . reduce 13 853 854 855state 62 856 vexp : '(' dexp ',' dexp ')' . (17) 857 858 . reduce 17 859 860 861Rules never reduced: 862 lines : (1) 863 lines : lines line (2) 864 865 866State 8 contains 5 shift/reduce conflicts. 867State 15 contains 6 reduce/reduce conflicts. 868State 17 contains 5 shift/reduce conflicts. 869State 32 contains 4 shift/reduce conflicts. 870State 37 contains 2 shift/reduce conflicts, 4 reduce/reduce conflicts. 871State 39 contains 2 shift/reduce conflicts, 4 reduce/reduce conflicts. 872State 41 contains 6 reduce/reduce conflicts. 873State 43 contains 6 reduce/reduce conflicts. 874 875 87615 terminals, 5 nonterminals 87729 grammar rules, 63 states 878