lrama 0.6.6 → 0.6.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5a24c7fd3c35d08a7e602fe74d4be9987f0415a1dc621ceb02ec4a722b1e16a0
4
- data.tar.gz: fa3e0819afd1a454c17189c05f4c02260e35a252b09fdc828238f01b7ad3c58e
3
+ metadata.gz: eb427615ab5c822c3d3c83edb934e110b478fcf7e149058a15f06c48cbb85b0b
4
+ data.tar.gz: 6b781dc123779bb4e51ec10185cc9215296629d6d3856e28c53c387388e45d4c
5
5
  SHA512:
6
- metadata.gz: 7a5268674e4e8630a8efad69e82af94202f66da34530fdb87b7bd8d0e4cee93cf3881e1509d441fade31d1886f39e48b43c9f25178511983002a30fe19047266
7
- data.tar.gz: 54122863a527a29a6279b9ad4c2732a378a138743d5d91e9c611ba9d66c7929f14385ee228b1dde7e20f2a4efc60fe1d9d5046fcb753c828daf64e4d9d465350
6
+ metadata.gz: 2c7962cff0ec5b31d0ef7e4c899e52258968c887bf42056775f1342d103badf93cff17a27a4b7fae390f4b451b75c3423408be21f2bcfb189b1acc6df7fcc6e7
7
+ data.tar.gz: cdfc5d75fb400e2a0612f911845a99ce0c0bfce583089b202a5be25aecd69e73484bb4cf172fce392c65cee0e496b911b064706035f0baba2de227289c4667e3
data/README.md CHANGED
@@ -30,6 +30,9 @@ Lrama is LALR (1) parser generator written by Ruby. The first goal of this proje
30
30
  * Parameterizing rules
31
31
  * The definition of a non-terminal symbol can be parameterized with other (terminal or non-terminal) symbols.
32
32
  * Providing a generic definition of parameterizing rules as a [standard library](lib/lrama/grammar/stdlib.y).
33
+ * Inlining
34
+ * The %inline directive causes all references to symbols to be replaced with its definition.
35
+ * Resolve shift/reduce conflicts without artificially altering the grammar file.
33
36
 
34
37
  ## Installation
35
38
 
data/lib/lrama/parser.rb CHANGED
@@ -733,94 +733,94 @@ end
733
733
 
734
734
  racc_action_table = [
735
735
  98, 51, 99, 163, 88, 79, 51, 51, 179, 163,
736
- 79, 79, 51, 162, 179, 156, 79, 165, 157, 3,
737
- 8, 203, 180, 165, 186, 187, 188, 96, 180, 186,
738
- 187, 188, 41, 48, 51, 161, 50, 47, 51, 70,
739
- 50, 54, 89, 82, 51, 166, 50, 54, 100, 82,
740
- 181, 166, 216, 54, 57, 217, 181, 23, 25, 26,
736
+ 79, 79, 51, 162, 179, 156, 79, 165, 157, 51,
737
+ 3, 50, 180, 165, 70, 51, 8, 50, 180, 79,
738
+ 75, 51, 6, 50, 7, 161, 82, 47, 51, 51,
739
+ 50, 50, 89, 82, 82, 166, 41, 51, 100, 50,
740
+ 181, 166, 82, 51, 48, 50, 181, 23, 25, 26,
741
741
  27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
742
- 37, 38, 47, 6, 51, 7, 50, 93, 79, 75,
743
- 51, 51, 50, 50, 58, 82, 82, 51, 51, 50,
744
- 50, 79, 23, 25, 26, 27, 28, 29, 30, 31,
745
- 32, 33, 34, 35, 36, 37, 38, 9, 51, 59,
746
- 50, 14, 15, 16, 17, 18, 19, 60, 61, 20,
742
+ 37, 38, 47, 51, 51, 50, 50, 93, 79, 196,
743
+ 51, 51, 50, 50, 79, 196, 51, 51, 50, 50,
744
+ 79, 196, 23, 25, 26, 27, 28, 29, 30, 31,
745
+ 32, 33, 34, 35, 36, 37, 38, 9, 51, 54,
746
+ 50, 14, 15, 16, 17, 18, 19, 54, 54, 20,
747
747
  21, 22, 23, 25, 26, 27, 28, 29, 30, 31,
748
748
  32, 33, 34, 35, 36, 37, 38, 39, 51, 51,
749
749
  50, 50, 79, 196, 51, 51, 50, 50, 79, 196,
750
750
  51, 51, 50, 50, 79, 196, 51, 51, 50, 50,
751
- 79, 196, 51, 51, 50, 50, 79, 196, 51, 51,
752
- 50, 50, 79, 196, 51, 51, 50, 50, 79, 79,
753
- 51, 51, 50, 50, 79, 79, 51, 51, 50, 50,
754
- 79, 79, 51, 51, 206, 206, 79, 79, 51, 51,
755
- 206, 50, 79, 79, 220, 227, 62, 217, 217, 51,
756
- 51, 50, 50, 51, 63, 50, 186, 187, 188, 64,
751
+ 79, 79, 51, 51, 50, 50, 79, 79, 51, 51,
752
+ 50, 50, 79, 79, 51, 51, 50, 206, 79, 79,
753
+ 51, 51, 206, 206, 79, 79, 51, 51, 50, 50,
754
+ 79, 186, 187, 188, 96, 186, 187, 188, 96, 216,
755
+ 220, 228, 217, 217, 217, 51, 51, 50, 50, 186,
756
+ 187, 188, 57, 58, 59, 60, 61, 62, 63, 64,
757
757
  65, 66, 67, 90, 94, 96, 101, 101, 101, 103,
758
758
  109, 113, 114, 117, 117, 117, 117, 120, 47, 124,
759
759
  125, 127, 129, 130, 131, 132, 133, 136, 140, 141,
760
760
  142, 143, 146, 147, 148, 150, 160, 168, 170, 171,
761
761
  172, 173, 174, 175, 176, 177, 146, 183, 191, 192,
762
- 160, 160, 96, 210, 211, 177, 214, 215, 210, 225,
763
- 226, 96, 96, 210 ]
762
+ 160, 160, 203, 210, 211, 177, 214, 215, 210, 225,
763
+ 210, 227, 96, 96, 210 ]
764
764
 
765
765
  racc_action_check = [
766
766
  49, 145, 49, 145, 39, 145, 159, 182, 159, 182,
767
- 159, 182, 200, 144, 200, 139, 200, 145, 139, 1,
768
- 3, 179, 159, 182, 164, 164, 164, 164, 200, 179,
769
- 179, 179, 7, 14, 33, 144, 33, 9, 35, 33,
770
- 35, 16, 39, 35, 36, 145, 36, 17, 49, 36,
771
- 159, 182, 207, 18, 19, 207, 200, 9, 9, 9,
767
+ 159, 182, 200, 144, 200, 139, 200, 145, 139, 33,
768
+ 1, 33, 159, 182, 33, 34, 3, 34, 200, 34,
769
+ 34, 35, 2, 35, 2, 144, 35, 9, 36, 37,
770
+ 36, 37, 39, 36, 37, 145, 7, 38, 49, 38,
771
+ 159, 182, 38, 15, 14, 15, 200, 9, 9, 9,
772
772
  9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
773
- 9, 9, 42, 2, 34, 2, 34, 42, 34, 34,
774
- 37, 38, 37, 38, 20, 37, 38, 74, 15, 74,
775
- 15, 74, 42, 42, 42, 42, 42, 42, 42, 42,
776
- 42, 42, 42, 42, 42, 42, 42, 4, 69, 23,
777
- 69, 4, 4, 4, 4, 4, 4, 25, 26, 4,
773
+ 9, 9, 42, 69, 172, 69, 172, 42, 172, 172,
774
+ 173, 70, 173, 70, 173, 173, 174, 81, 174, 81,
775
+ 174, 174, 42, 42, 42, 42, 42, 42, 42, 42,
776
+ 42, 42, 42, 42, 42, 42, 42, 4, 82, 16,
777
+ 82, 4, 4, 4, 4, 4, 4, 17, 18, 4,
778
778
  4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
779
- 4, 4, 4, 4, 4, 4, 4, 4, 172, 70,
780
- 172, 70, 172, 172, 173, 81, 173, 81, 173, 173,
781
- 174, 82, 174, 82, 174, 174, 193, 109, 193, 109,
782
- 193, 193, 197, 111, 197, 111, 197, 197, 198, 117,
783
- 198, 117, 198, 198, 75, 114, 75, 114, 75, 114,
784
- 116, 137, 116, 137, 116, 137, 166, 181, 166, 181,
785
- 166, 181, 183, 203, 183, 203, 183, 203, 215, 217,
786
- 215, 217, 215, 217, 213, 222, 27, 213, 222, 119,
787
- 134, 119, 134, 138, 28, 138, 208, 208, 208, 29,
779
+ 4, 4, 4, 4, 4, 4, 4, 4, 193, 109,
780
+ 193, 109, 193, 193, 197, 111, 197, 111, 197, 197,
781
+ 198, 117, 198, 117, 198, 198, 74, 75, 74, 75,
782
+ 74, 75, 114, 116, 114, 116, 114, 116, 137, 166,
783
+ 137, 166, 137, 166, 181, 183, 181, 183, 181, 183,
784
+ 203, 215, 203, 215, 203, 215, 217, 119, 217, 119,
785
+ 217, 164, 164, 164, 164, 178, 178, 178, 178, 207,
786
+ 213, 222, 207, 213, 222, 134, 138, 134, 138, 208,
787
+ 208, 208, 19, 20, 23, 25, 26, 27, 28, 29,
788
788
  30, 31, 32, 40, 45, 46, 53, 55, 56, 57,
789
789
  68, 72, 73, 80, 85, 86, 87, 88, 89, 95,
790
790
  96, 102, 104, 105, 106, 107, 108, 112, 120, 121,
791
791
  122, 123, 124, 125, 126, 128, 141, 149, 151, 152,
792
792
  153, 154, 155, 156, 157, 158, 161, 163, 167, 169,
793
- 175, 177, 178, 185, 189, 199, 204, 206, 216, 219,
794
- 221, 225, 226, 228 ]
793
+ 175, 177, 179, 185, 189, 199, 204, 206, 216, 219,
794
+ 220, 221, 225, 227, 229 ]
795
795
 
796
796
  racc_action_pointer = [
797
- nil, 19, 63, 20, 98, nil, nil, 25, nil, 33,
798
- nil, nil, nil, nil, 27, 85, 22, 28, 34, 49,
799
- 65, nil, nil, 90, nil, 98, 99, 187, 209, 214,
800
- 215, 216, 217, 31, 71, 35, 41, 77, 78, -1,
797
+ nil, 20, 22, 26, 98, nil, nil, 39, nil, 33,
798
+ nil, nil, nil, nil, 48, 50, 90, 98, 99, 207,
799
+ 194, nil, nil, 195, nil, 196, 197, 198, 213, 214,
800
+ 215, 216, 217, 16, 22, 28, 35, 36, 44, -1,
801
801
  221, nil, 68, nil, nil, 201, 174, nil, nil, -5,
802
802
  nil, nil, nil, 207, nil, 208, 209, 210, nil, nil,
803
- nil, nil, nil, nil, nil, nil, nil, nil, 222, 105,
804
- 136, nil, 225, 224, 84, 171, nil, nil, nil, nil,
805
- 225, 142, 148, nil, nil, 226, 227, 228, 197, 234,
803
+ nil, nil, nil, nil, nil, nil, nil, nil, 222, 70,
804
+ 78, nil, 225, 224, 153, 154, nil, nil, nil, nil,
805
+ 225, 84, 105, nil, nil, 226, 227, 228, 197, 234,
806
806
  nil, nil, nil, nil, nil, 197, 235, nil, nil, nil,
807
- nil, nil, 239, nil, 240, 241, 242, 243, 244, 154,
808
- nil, 160, 240, nil, 172, nil, 177, 166, nil, 206,
807
+ nil, nil, 239, nil, 240, 241, 242, 243, 244, 136,
808
+ nil, 142, 240, nil, 159, nil, 160, 148, nil, 184,
809
809
  243, 207, 239, 249, 206, 201, 252, nil, 253, nil,
810
- nil, nil, nil, nil, 207, nil, nil, 178, 210, -26,
810
+ nil, nil, nil, nil, 202, nil, nil, 165, 203, -26,
811
811
  nil, 210, nil, nil, -10, -2, nil, nil, nil, 237,
812
812
  nil, 238, 239, 240, 241, 242, 221, 259, 220, 3,
813
- nil, 220, nil, 227, -24, nil, 183, 248, nil, 249,
814
- nil, nil, 135, 141, 147, 224, nil, 225, 221, -19,
815
- nil, 184, 4, 189, nil, 265, nil, nil, nil, 272,
816
- nil, nil, nil, 153, nil, nil, nil, 159, 165, 230,
817
- 9, nil, nil, 190, 274, nil, 237, 11, 168, nil,
818
- nil, nil, nil, 163, nil, 195, 270, 196, nil, 259,
819
- nil, 260, 164, nil, nil, 230, 231, nil, 275, nil,
820
- nil ]
813
+ nil, 220, nil, 227, 143, nil, 166, 248, nil, 249,
814
+ nil, nil, 71, 77, 83, 224, nil, 225, 147, 232,
815
+ nil, 171, 4, 172, nil, 265, nil, nil, nil, 272,
816
+ nil, nil, nil, 135, nil, nil, nil, 141, 147, 230,
817
+ 9, nil, nil, 177, 274, nil, 237, 158, 161, nil,
818
+ nil, nil, nil, 159, nil, 178, 270, 183, nil, 259,
819
+ 272, 261, 160, nil, nil, 231, nil, 232, nil, 276,
820
+ nil, nil ]
821
821
 
822
822
  racc_action_default = [
823
- -2, -138, -8, -138, -138, -3, -4, -138, 231, -138,
823
+ -2, -138, -8, -138, -138, -3, -4, -138, 232, -138,
824
824
  -9, -10, -11, -12, -138, -138, -138, -138, -138, -138,
825
825
  -138, -24, -25, -138, -29, -138, -138, -138, -138, -138,
826
826
  -138, -138, -138, -138, -138, -138, -138, -138, -138, -138,
@@ -842,67 +842,67 @@ racc_action_default = [
842
842
  -112, -84, -20, -32, -131, -133, -134, -35, -38, -56,
843
843
  -61, -64, -65, -138, -138, -70, -94, -138, -116, -107,
844
844
  -137, -110, -132, -138, -68, -138, -136, -138, -118, -138,
845
- -66, -138, -138, -108, -117, -120, -120, -119, -136, -69,
846
- -111 ]
845
+ -136, -138, -138, -108, -117, -120, -66, -120, -119, -136,
846
+ -69, -111 ]
847
847
 
848
848
  racc_goto_table = [
849
- 76, 74, 69, 52, 209, 95, 110, 118, 119, 145,
850
- 158, 1, 185, 2, 4, 212, 43, 42, 207, 212,
851
- 212, 72, 91, 84, 84, 84, 84, 202, 80, 85,
852
- 86, 87, 53, 55, 56, 223, 5, 40, 213, 111,
853
- 115, 76, 116, 138, 199, 118, 182, 230, 110, 92,
854
- 222, 193, 197, 198, 122, 10, 218, 72, 72, 11,
855
- 12, 13, 49, 97, 118, 128, 169, 104, 151, 84,
856
- 84, 110, 105, 152, 106, 153, 107, 154, 134, 108,
857
- 76, 137, 115, 155, 68, 73, 112, 135, 139, 121,
858
- 200, 204, 221, 126, 167, 102, 149, 72, 144, 72,
859
- 189, 219, 123, 115, nil, 84, nil, 84, nil, nil,
860
- nil, 164, nil, nil, nil, nil, nil, nil, nil, nil,
861
- nil, nil, 72, 184, nil, 178, 84, nil, nil, nil,
862
- nil, nil, 190, nil, nil, nil, nil, 201, nil, nil,
849
+ 76, 95, 69, 52, 74, 118, 110, 209, 185, 145,
850
+ 158, 1, 119, 212, 2, 4, 43, 212, 212, 42,
851
+ 91, 72, 202, 84, 84, 84, 84, 80, 85, 86,
852
+ 87, 5, 40, 207, 53, 55, 56, 122, 223, 111,
853
+ 115, 76, 226, 118, 199, 116, 182, 138, 110, 92,
854
+ 10, 231, 218, 213, 193, 197, 198, 72, 72, 11,
855
+ 12, 13, 118, 49, 97, 222, 128, 169, 104, 84,
856
+ 84, 110, 151, 105, 152, 106, 153, 107, 134, 154,
857
+ 76, 108, 115, 155, 137, 68, 73, 112, 135, 139,
858
+ 121, 200, 204, 221, 126, 167, 102, 72, 149, 72,
859
+ 144, 189, 219, 115, 123, 84, nil, 84, nil, nil,
860
+ nil, 164, nil, nil, nil, nil, nil, nil, nil, 184,
861
+ nil, nil, 72, nil, nil, 178, 84, nil, nil, nil,
862
+ nil, nil, 190, 201, nil, nil, nil, nil, nil, nil,
863
863
  nil, nil, nil, nil, nil, nil, nil, 205, 164, 208,
864
864
  nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
865
865
  nil, nil, nil, nil, nil, nil, 178, nil, nil, 208,
866
866
  nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
867
- nil, 208, nil, 224, 228, 229 ]
867
+ 229, 208, 230, 224 ]
868
868
 
869
869
  racc_goto_check = [
870
- 42, 48, 33, 35, 60, 43, 34, 55, 54, 59,
871
- 39, 1, 44, 2, 3, 64, 56, 4, 45, 64,
872
- 64, 35, 5, 35, 35, 35, 35, 44, 32, 32,
873
- 32, 32, 15, 15, 15, 60, 6, 7, 45, 33,
874
- 42, 42, 48, 54, 39, 55, 59, 60, 34, 56,
875
- 45, 21, 21, 21, 8, 9, 44, 35, 35, 10,
876
- 11, 12, 13, 14, 55, 16, 17, 18, 19, 35,
877
- 35, 34, 22, 23, 24, 25, 26, 27, 33, 28,
878
- 42, 48, 42, 29, 30, 31, 36, 37, 38, 40,
879
- 41, 46, 47, 50, 51, 52, 53, 35, 58, 35,
880
- 61, 62, 63, 42, nil, 35, nil, 35, nil, nil,
881
- nil, 42, nil, nil, nil, nil, nil, nil, nil, nil,
882
- nil, nil, 35, 43, nil, 42, 35, nil, nil, nil,
883
- nil, nil, 42, nil, nil, nil, nil, 43, nil, nil,
870
+ 42, 43, 33, 35, 49, 56, 34, 46, 44, 60,
871
+ 39, 1, 55, 64, 2, 3, 57, 64, 64, 4,
872
+ 5, 35, 44, 35, 35, 35, 35, 32, 32, 32,
873
+ 32, 6, 7, 45, 15, 15, 15, 8, 46, 33,
874
+ 42, 42, 46, 56, 39, 49, 60, 55, 34, 57,
875
+ 9, 46, 44, 45, 21, 21, 21, 35, 35, 10,
876
+ 11, 12, 56, 13, 14, 45, 16, 17, 18, 35,
877
+ 35, 34, 19, 22, 23, 24, 25, 26, 33, 27,
878
+ 42, 28, 42, 29, 49, 30, 31, 36, 37, 38,
879
+ 40, 41, 47, 48, 51, 52, 53, 35, 54, 35,
880
+ 59, 61, 62, 42, 63, 35, nil, 35, nil, nil,
881
+ nil, 42, nil, nil, nil, nil, nil, nil, nil, 43,
882
+ nil, nil, 35, nil, nil, 42, 35, nil, nil, nil,
883
+ nil, nil, 42, 43, nil, nil, nil, nil, nil, nil,
884
884
  nil, nil, nil, nil, nil, nil, nil, 42, 42, 42,
885
885
  nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
886
886
  nil, nil, nil, nil, nil, nil, 42, nil, nil, 42,
887
887
  nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
888
- nil, 42, nil, 42, 43, 43 ]
888
+ 43, 42, 43, 42 ]
889
889
 
890
890
  racc_goto_pointer = [
891
- nil, 11, 13, 12, 8, -20, 34, 31, -36, 51,
892
- 55, 56, 57, 47, 14, 16, -38, -84, 9, -61,
893
- nil, -121, 13, -57, 14, -56, 15, -55, 17, -50,
894
- 51, 51, -7, -31, -63, -12, 14, -25, -32, -131,
895
- 0, -87, -34, -41, -152, -165, -89, -122, -33, nil,
896
- -8, -54, 41, -31, -74, -74, 7, nil, -26, -115,
897
- -181, -65, -110, 9, -178 ]
891
+ nil, 11, 14, 13, 10, -22, 29, 26, -53, 46,
892
+ 55, 56, 57, 48, 15, 18, -37, -83, 10, -57,
893
+ nil, -118, 14, -56, 15, -55, 16, -53, 19, -50,
894
+ 52, 52, -8, -31, -63, -12, 15, -24, -31, -131,
895
+ 1, -86, -34, -45, -156, -150, -178, -88, -121, -30,
896
+ nil, -7, -53, 42, -29, -70, -76, 7, nil, -24,
897
+ -115, -64, -109, 11, -180 ]
898
898
 
899
899
  racc_goto_default = [
900
900
  nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
901
901
  45, nil, nil, nil, nil, nil, nil, nil, nil, nil,
902
902
  24, nil, nil, nil, nil, nil, nil, nil, nil, nil,
903
903
  nil, nil, nil, nil, 71, 77, nil, nil, nil, nil,
904
- 46, 159, 195, nil, nil, nil, nil, nil, nil, 78,
905
- nil, nil, nil, nil, 81, 83, nil, 44, nil, nil,
904
+ 46, 159, 195, nil, nil, nil, nil, nil, nil, nil,
905
+ 78, nil, nil, nil, nil, 81, 83, nil, 44, nil,
906
906
  nil, nil, nil, nil, 194 ]
907
907
 
908
908
  racc_reduce_table = [
@@ -972,9 +972,9 @@ racc_reduce_table = [
972
972
  1, 95, :_reduce_63,
973
973
  3, 95, :_reduce_64,
974
974
  3, 95, :_reduce_65,
975
- 5, 95, :_reduce_66,
976
- 0, 100, :_reduce_67,
977
- 0, 101, :_reduce_68,
975
+ 6, 95, :_reduce_66,
976
+ 0, 101, :_reduce_67,
977
+ 0, 102, :_reduce_68,
978
978
  7, 95, :_reduce_69,
979
979
  3, 95, :_reduce_70,
980
980
  0, 90, :_reduce_none,
@@ -984,41 +984,41 @@ racc_reduce_table = [
984
984
  1, 85, :_reduce_75,
985
985
  2, 85, :_reduce_76,
986
986
  3, 85, :_reduce_77,
987
- 1, 102, :_reduce_78,
988
- 2, 102, :_reduce_79,
987
+ 1, 103, :_reduce_78,
988
+ 2, 103, :_reduce_79,
989
989
  1, 96, :_reduce_none,
990
990
  1, 96, :_reduce_none,
991
- 0, 104, :_reduce_82,
992
- 0, 105, :_reduce_83,
991
+ 0, 105, :_reduce_82,
992
+ 0, 106, :_reduce_83,
993
993
  6, 69, :_reduce_84,
994
- 0, 106, :_reduce_85,
995
- 0, 107, :_reduce_86,
994
+ 0, 107, :_reduce_85,
995
+ 0, 108, :_reduce_86,
996
996
  5, 69, :_reduce_87,
997
997
  1, 86, :_reduce_88,
998
998
  2, 86, :_reduce_89,
999
999
  3, 86, :_reduce_90,
1000
- 1, 108, :_reduce_91,
1001
- 2, 108, :_reduce_92,
1002
- 1, 109, :_reduce_none,
1000
+ 1, 109, :_reduce_91,
1001
+ 2, 109, :_reduce_92,
1002
+ 1, 110, :_reduce_none,
1003
1003
  1, 89, :_reduce_94,
1004
1004
  1, 89, :_reduce_95,
1005
1005
  1, 58, :_reduce_none,
1006
1006
  2, 58, :_reduce_none,
1007
- 1, 110, :_reduce_none,
1008
- 2, 110, :_reduce_none,
1009
- 4, 111, :_reduce_100,
1010
- 1, 112, :_reduce_101,
1011
- 3, 112, :_reduce_102,
1012
- 2, 112, :_reduce_none,
1013
- 0, 113, :_reduce_104,
1014
- 1, 113, :_reduce_105,
1015
- 3, 113, :_reduce_106,
1016
- 4, 113, :_reduce_107,
1017
- 6, 113, :_reduce_108,
1007
+ 1, 111, :_reduce_none,
1008
+ 2, 111, :_reduce_none,
1009
+ 4, 112, :_reduce_100,
1010
+ 1, 113, :_reduce_101,
1011
+ 3, 113, :_reduce_102,
1012
+ 2, 113, :_reduce_none,
1013
+ 0, 114, :_reduce_104,
1014
+ 1, 114, :_reduce_105,
1015
+ 3, 114, :_reduce_106,
1016
+ 4, 114, :_reduce_107,
1017
+ 6, 114, :_reduce_108,
1018
1018
  0, 115, :_reduce_109,
1019
1019
  0, 116, :_reduce_110,
1020
- 8, 113, :_reduce_111,
1021
- 3, 113, :_reduce_112,
1020
+ 8, 114, :_reduce_111,
1021
+ 3, 114, :_reduce_112,
1022
1022
  1, 98, :_reduce_113,
1023
1023
  1, 98, :_reduce_114,
1024
1024
  1, 98, :_reduce_115,
@@ -1041,13 +1041,13 @@ racc_reduce_table = [
1041
1041
  2, 75, :_reduce_132,
1042
1042
  1, 118, :_reduce_none,
1043
1043
  1, 118, :_reduce_none,
1044
- 1, 103, :_reduce_135,
1045
- 0, 114, :_reduce_none,
1046
- 1, 114, :_reduce_none ]
1044
+ 1, 104, :_reduce_135,
1045
+ 0, 100, :_reduce_none,
1046
+ 1, 100, :_reduce_none ]
1047
1047
 
1048
1048
  racc_reduce_n = 138
1049
1049
 
1050
- racc_shift_n = 231
1050
+ racc_shift_n = 232
1051
1051
 
1052
1052
  racc_token_table = {
1053
1053
  false => 0,
@@ -1227,6 +1227,7 @@ Racc_token_to_s_table = [
1227
1227
  "named_ref_opt",
1228
1228
  "parameterizing_suffix",
1229
1229
  "parameterizing_args",
1230
+ "tag_opt",
1230
1231
  "@15",
1231
1232
  "@16",
1232
1233
  "symbol_declaration_list",
@@ -1241,7 +1242,6 @@ Racc_token_to_s_table = [
1241
1242
  "rules",
1242
1243
  "rhs_list",
1243
1244
  "rhs",
1244
- "tag_opt",
1245
1245
  "@21",
1246
1246
  "@22",
1247
1247
  "@23",
@@ -1757,7 +1757,7 @@ module_eval(<<'.,.,', 'parser.y', 280)
1757
1757
  module_eval(<<'.,.,', 'parser.y', 286)
1758
1758
  def _reduce_66(val, _values, result)
1759
1759
  builder = val[0]
1760
- builder.symbols << Lrama::Lexer::Token::InstantiateRule.new(s_value: val[1].s_value, location: @lexer.location, args: val[3])
1760
+ builder.symbols << Lrama::Lexer::Token::InstantiateRule.new(s_value: val[1].s_value, location: @lexer.location, args: val[3], lhs_tag: val[5])
1761
1761
  result = builder
1762
1762
 
1763
1763
  result
data/lib/lrama/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Lrama
2
- VERSION = "0.6.6".freeze
2
+ VERSION = "0.6.8".freeze
3
3
  end
data/parser.y CHANGED
@@ -276,16 +276,16 @@ rule
276
276
  builder.symbols << token
277
277
  result = builder
278
278
  }
279
- | rule_rhs IDENTIFIER parameterizing_suffix
279
+ | rule_rhs symbol parameterizing_suffix
280
280
  {
281
281
  builder = val[0]
282
282
  builder.symbols << Lrama::Lexer::Token::InstantiateRule.new(s_value: val[2], location: @lexer.location, args: [val[1]])
283
283
  result = builder
284
284
  }
285
- | rule_rhs IDENTIFIER "(" parameterizing_args ")"
285
+ | rule_rhs IDENTIFIER "(" parameterizing_args ")" tag_opt
286
286
  {
287
287
  builder = val[0]
288
- builder.symbols << Lrama::Lexer::Token::InstantiateRule.new(s_value: val[1].s_value, location: @lexer.location, args: val[3])
288
+ builder.symbols << Lrama::Lexer::Token::InstantiateRule.new(s_value: val[1].s_value, location: @lexer.location, args: val[3], lhs_tag: val[5])
289
289
  result = builder
290
290
  }
291
291
  | rule_rhs "{"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lrama
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.6
4
+ version: 0.6.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yuichiro Kaneko
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-04-27 00:00:00.000000000 Z
11
+ date: 2024-04-29 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: LALR (1) parser generator written by Ruby
14
14
  email: