lrama 0.6.10 → 0.6.11

Sign up to get free protection for your applications and to get access to all the features.
Files changed (42) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/test.yaml +5 -1
  3. data/Gemfile +2 -2
  4. data/NEWS.md +65 -30
  5. data/Steepfile +3 -0
  6. data/doc/development/compressed_state_table/main.md +635 -0
  7. data/doc/development/compressed_state_table/parse.output +174 -0
  8. data/doc/development/compressed_state_table/parse.y +22 -0
  9. data/doc/development/compressed_state_table/parser.rb +282 -0
  10. data/lib/lrama/bitmap.rb +1 -1
  11. data/lib/lrama/context.rb +3 -3
  12. data/lib/lrama/counterexamples/derivation.rb +6 -5
  13. data/lib/lrama/counterexamples/example.rb +7 -4
  14. data/lib/lrama/counterexamples/path.rb +4 -0
  15. data/lib/lrama/counterexamples.rb +19 -9
  16. data/lib/lrama/grammar/parameterizing_rule/rhs.rb +1 -1
  17. data/lib/lrama/grammar/rule_builder.rb +1 -1
  18. data/lib/lrama/grammar/symbols/resolver.rb +4 -0
  19. data/lib/lrama/grammar.rb +2 -2
  20. data/lib/lrama/lexer/token/user_code.rb +1 -1
  21. data/lib/lrama/lexer.rb +1 -0
  22. data/lib/lrama/parser.rb +520 -487
  23. data/lib/lrama/state/reduce.rb +2 -3
  24. data/lib/lrama/version.rb +1 -1
  25. data/parser.y +38 -27
  26. data/rbs_collection.lock.yaml +10 -2
  27. data/sig/lrama/counterexamples/derivation.rbs +33 -0
  28. data/sig/lrama/counterexamples/example.rbs +45 -0
  29. data/sig/lrama/counterexamples/path.rbs +21 -0
  30. data/sig/lrama/counterexamples/production_path.rbs +11 -0
  31. data/sig/lrama/counterexamples/start_path.rbs +13 -0
  32. data/sig/lrama/counterexamples/state_item.rbs +10 -0
  33. data/sig/lrama/counterexamples/transition_path.rbs +11 -0
  34. data/sig/lrama/counterexamples/triple.rbs +20 -0
  35. data/sig/lrama/counterexamples.rbs +29 -0
  36. data/sig/lrama/grammar/symbol.rbs +1 -1
  37. data/sig/lrama/grammar/symbols/resolver.rbs +3 -3
  38. data/sig/lrama/grammar.rbs +13 -0
  39. data/sig/lrama/state/reduce_reduce_conflict.rbs +2 -2
  40. data/sig/lrama/state.rbs +79 -0
  41. data/sig/lrama/states.rbs +101 -0
  42. metadata +17 -2
data/lib/lrama/parser.rb CHANGED
@@ -654,7 +654,7 @@ end
654
654
  module Lrama
655
655
  class Parser < Racc::Parser
656
656
 
657
- module_eval(<<'...end parser.y/module_eval...', 'parser.y', 417)
657
+ module_eval(<<'...end parser.y/module_eval...', 'parser.y', 428)
658
658
 
659
659
  include Lrama::Report::Duration
660
660
 
@@ -728,297 +728,306 @@ end
728
728
  ##### State transition tables begin ###
729
729
 
730
730
  racc_action_table = [
731
- 94, 48, 95, 166, 48, 77, 172, 48, 77, 166,
732
- 48, 77, 172, 48, 77, 47, 6, 85, 69, 48,
733
- 48, 47, 47, 77, 74, 81, 48, 48, 47, 47,
734
- 40, 81, 81, 48, 41, 47, 92, 48, 81, 47,
735
- 44, 77, 103, 168, 169, 45, 175, 169, 96, 168,
736
- 169, 52, 175, 169, 86, 20, 24, 25, 26, 27,
737
- 28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
738
- 38, 92, 48, 4, 47, 5, 77, 103, 48, 48,
739
- 47, 47, 77, 103, 116, 48, 4, 47, 5, 77,
740
- 20, 24, 25, 26, 27, 28, 29, 30, 31, 32,
741
- 33, 34, 35, 36, 37, 38, 11, 12, 13, 14,
742
- 15, 16, 17, 18, 19, 52, 20, 24, 25, 26,
743
- 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
744
- 37, 38, 11, 12, 13, 14, 15, 16, 17, 18,
745
- 19, 43, 20, 24, 25, 26, 27, 28, 29, 30,
746
- 31, 32, 33, 34, 35, 36, 37, 38, 48, 48,
747
- 47, 47, 77, 103, 48, 48, 47, 47, 77, 77,
748
- 48, 48, 47, 47, 77, 77, 48, 48, 196, 196,
749
- 77, 77, 48, 48, 47, 196, 77, 77, 148, 170,
750
- 52, 149, 149, 180, 181, 182, 131, 180, 181, 182,
751
- 131, 203, 208, 215, 204, 204, 204, 48, 48, 47,
752
- 47, 48, 48, 47, 47, 48, 48, 47, 47, 180,
753
- 181, 182, 119, 120, 55, 52, 52, 52, 52, 52,
754
- 61, 62, 63, 64, 65, 87, 52, 52, 106, 109,
755
- 111, 118, 125, 126, 128, 131, 132, 77, 140, 141,
756
- 142, 143, 145, 146, 153, 140, 155, 153, 159, 160,
757
- 161, 163, 164, 171, 176, 153, 183, 131, 187, 153,
758
- 189, 131, 153, 198, 153, 131, 161, 164, 205, 164,
759
- 161, 161, 213, 131, 161 ]
731
+ 89, 49, 90, 167, 49, 101, 173, 49, 101, 167,
732
+ 49, 101, 173, 6, 101, 80, 49, 49, 48, 48,
733
+ 41, 76, 76, 49, 49, 48, 48, 42, 76, 76,
734
+ 49, 49, 48, 48, 101, 96, 113, 49, 87, 48,
735
+ 150, 101, 96, 151, 45, 171, 169, 170, 151, 176,
736
+ 170, 91, 169, 170, 81, 176, 170, 20, 24, 25,
737
+ 26, 27, 28, 29, 30, 31, 87, 32, 33, 34,
738
+ 35, 36, 37, 38, 39, 49, 4, 48, 5, 101,
739
+ 96, 181, 182, 183, 128, 20, 24, 25, 26, 27,
740
+ 28, 29, 30, 31, 46, 32, 33, 34, 35, 36,
741
+ 37, 38, 39, 11, 12, 13, 14, 15, 16, 17,
742
+ 18, 19, 53, 20, 24, 25, 26, 27, 28, 29,
743
+ 30, 31, 53, 32, 33, 34, 35, 36, 37, 38,
744
+ 39, 11, 12, 13, 14, 15, 16, 17, 18, 19,
745
+ 44, 20, 24, 25, 26, 27, 28, 29, 30, 31,
746
+ 53, 32, 33, 34, 35, 36, 37, 38, 39, 49,
747
+ 4, 48, 5, 101, 96, 49, 49, 48, 48, 101,
748
+ 101, 49, 49, 48, 48, 101, 101, 49, 49, 48,
749
+ 197, 101, 101, 49, 49, 197, 48, 101, 101, 49,
750
+ 49, 197, 48, 101, 181, 182, 183, 128, 204, 210,
751
+ 217, 205, 205, 205, 49, 49, 48, 48, 49, 49,
752
+ 48, 48, 49, 49, 48, 48, 181, 182, 183, 116,
753
+ 117, 56, 53, 53, 53, 53, 53, 62, 63, 64,
754
+ 65, 66, 68, 68, 68, 82, 53, 53, 104, 108,
755
+ 108, 115, 122, 123, 125, 128, 129, 133, 139, 140,
756
+ 141, 142, 144, 145, 101, 154, 139, 157, 154, 161,
757
+ 162, 68, 164, 165, 172, 177, 154, 184, 128, 188,
758
+ 154, 190, 128, 154, 199, 154, 128, 68, 165, 206,
759
+ 165, 68, 68, 215, 128, 68 ]
760
760
 
761
761
  racc_action_check = [
762
- 46, 151, 46, 151, 157, 151, 157, 177, 157, 177,
763
- 188, 177, 188, 32, 188, 32, 1, 38, 32, 33,
764
- 34, 33, 34, 33, 33, 34, 35, 36, 35, 36,
765
- 5, 35, 36, 37, 6, 37, 44, 58, 37, 58,
766
- 9, 58, 58, 151, 151, 11, 157, 157, 46, 177,
767
- 177, 13, 188, 188, 38, 44, 44, 44, 44, 44,
768
- 44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
769
- 44, 88, 59, 0, 59, 0, 59, 59, 60, 79,
770
- 60, 79, 60, 60, 79, 72, 2, 72, 2, 72,
771
- 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
772
- 88, 88, 88, 88, 88, 88, 3, 3, 3, 3,
773
- 3, 3, 3, 3, 3, 14, 3, 3, 3, 3,
774
- 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
775
- 3, 3, 8, 8, 8, 8, 8, 8, 8, 8,
762
+ 47, 153, 47, 153, 159, 153, 159, 178, 159, 178,
763
+ 189, 178, 189, 1, 189, 39, 35, 36, 35, 36,
764
+ 5, 35, 36, 37, 38, 37, 38, 6, 37, 38,
765
+ 59, 74, 59, 74, 59, 59, 74, 60, 45, 60,
766
+ 138, 60, 60, 138, 9, 156, 153, 153, 156, 159,
767
+ 159, 47, 178, 178, 39, 189, 189, 45, 45, 45,
768
+ 45, 45, 45, 45, 45, 45, 83, 45, 45, 45,
769
+ 45, 45, 45, 45, 45, 61, 0, 61, 0, 61,
770
+ 61, 166, 166, 166, 166, 83, 83, 83, 83, 83,
771
+ 83, 83, 83, 83, 11, 83, 83, 83, 83, 83,
772
+ 83, 83, 83, 3, 3, 3, 3, 3, 3, 3,
773
+ 3, 3, 13, 3, 3, 3, 3, 3, 3, 3,
774
+ 3, 3, 14, 3, 3, 3, 3, 3, 3, 3,
775
+ 3, 8, 8, 8, 8, 8, 8, 8, 8, 8,
776
776
  8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
777
- 8, 8, 8, 8, 8, 8, 8, 8, 100, 12,
778
- 100, 12, 100, 100, 74, 111, 74, 111, 74, 111,
779
- 168, 175, 168, 175, 168, 175, 183, 189, 183, 189,
780
- 183, 189, 204, 205, 204, 205, 204, 205, 139, 154,
781
- 15, 139, 154, 165, 165, 165, 165, 173, 173, 173,
782
- 173, 195, 200, 212, 195, 200, 212, 67, 69, 67,
783
- 69, 81, 106, 81, 106, 114, 116, 114, 116, 197,
784
- 197, 197, 86, 86, 16, 17, 20, 24, 25, 26,
785
- 27, 28, 29, 30, 31, 39, 50, 55, 66, 70,
786
- 71, 85, 89, 90, 91, 92, 98, 110, 118, 119,
787
- 120, 121, 130, 131, 141, 142, 144, 145, 146, 147,
788
- 148, 149, 150, 156, 162, 164, 166, 167, 170, 171,
789
- 172, 174, 176, 186, 187, 191, 192, 194, 196, 199,
790
- 201, 203, 207, 208, 214 ]
777
+ 15, 8, 8, 8, 8, 8, 8, 8, 8, 97,
778
+ 2, 97, 2, 97, 97, 71, 108, 71, 108, 71,
779
+ 108, 109, 169, 109, 169, 109, 169, 176, 184, 176,
780
+ 184, 176, 184, 190, 205, 190, 205, 190, 205, 206,
781
+ 12, 206, 12, 206, 174, 174, 174, 174, 196, 201,
782
+ 214, 196, 201, 214, 69, 76, 69, 76, 104, 105,
783
+ 104, 105, 111, 113, 111, 113, 198, 198, 198, 81,
784
+ 81, 16, 17, 20, 24, 25, 26, 27, 28, 29,
785
+ 30, 31, 32, 33, 34, 40, 51, 56, 67, 70,
786
+ 72, 80, 84, 85, 86, 87, 93, 107, 115, 116,
787
+ 117, 118, 127, 128, 134, 140, 141, 143, 144, 145,
788
+ 146, 150, 151, 152, 158, 163, 165, 167, 168, 171,
789
+ 172, 173, 175, 177, 187, 188, 192, 193, 195, 197,
790
+ 200, 202, 204, 209, 210, 216 ]
791
791
 
792
792
  racc_action_pointer = [
793
- 63, 16, 76, 93, nil, 23, 34, nil, 119, 31,
794
- nil, 39, 156, 5, 69, 144, 219, 179, nil, nil,
795
- 180, nil, nil, nil, 181, 182, 183, 225, 226, 227,
796
- 228, 229, 10, 16, 17, 23, 24, 30, 12, 233,
797
- nil, nil, nil, nil, 32, nil, -5, nil, nil, nil,
798
- 190, nil, nil, nil, nil, 191, nil, nil, 34, 69,
799
- 75, nil, nil, nil, nil, nil, 230, 204, nil, 205,
800
- 233, 232, 82, nil, 161, nil, nil, nil, nil, 76,
801
- nil, 208, nil, nil, nil, 202, 218, nil, 67, 233,
802
- 221, 222, 194, nil, nil, nil, nil, nil, 244, nil,
803
- 155, nil, nil, nil, nil, nil, 209, nil, nil, nil,
804
- 240, 162, nil, nil, 212, nil, 213, nil, 243, 208,
805
- 211, 240, nil, nil, nil, nil, nil, nil, nil, nil,
806
- 211, 248, nil, nil, nil, nil, nil, nil, nil, 148,
807
- nil, 200, 250, nil, 254, 203, 206, 212, 252, 256,
808
- 218, -2, nil, nil, 149, nil, 219, 1, nil, nil,
809
- nil, nil, 223, nil, 211, 145, 227, 216, 167, nil,
810
- 227, 215, 231, 149, 220, 168, 218, 4, nil, nil,
811
- nil, nil, nil, 173, nil, nil, 271, 220, 7, 174,
812
- nil, 224, 268, nil, 233, 161, 239, 171, nil, 235,
813
- 162, 272, nil, 273, 179, 180, nil, 235, 232, nil,
814
- nil, nil, 163, nil, 276, nil, nil ]
793
+ 66, 13, 150, 90, nil, 13, 27, nil, 118, 35,
794
+ nil, 88, 187, 63, 73, 101, 216, 173, nil, nil,
795
+ 174, nil, nil, nil, 175, 176, 177, 222, 223, 224,
796
+ 225, 226, 224, 225, 226, 13, 14, 20, 21, 10,
797
+ 233, nil, nil, nil, nil, 34, nil, -5, nil, nil,
798
+ nil, 187, nil, nil, nil, nil, 188, nil, nil, 27,
799
+ 34, 72, nil, nil, nil, nil, nil, 230, nil, 201,
800
+ 231, 162, 232, nil, 28, nil, 202, nil, nil, nil,
801
+ 200, 215, nil, 62, 233, 221, 222, 191, nil, nil,
802
+ nil, nil, nil, 244, nil, nil, nil, 156, nil, nil,
803
+ nil, nil, nil, nil, 205, 206, nil, 241, 163, 168,
804
+ nil, 209, nil, 210, nil, 243, 206, 209, 240, nil,
805
+ nil, nil, nil, nil, nil, nil, nil, 209, 248, nil,
806
+ nil, nil, nil, nil, 247, nil, nil, nil, -2, nil,
807
+ 208, 251, nil, 255, 211, 204, 210, nil, nil, nil,
808
+ 253, 257, 217, -2, nil, nil, 3, nil, 218, 1,
809
+ nil, nil, nil, 222, nil, 219, 30, 226, 214, 169,
810
+ nil, 226, 223, 230, 143, 218, 174, 226, 4, nil,
811
+ nil, nil, nil, nil, 175, nil, nil, 272, 228, 7,
812
+ 180, nil, 222, 269, nil, 232, 156, 238, 165, nil,
813
+ 234, 157, 273, nil, 274, 181, 186, nil, nil, 233,
814
+ 230, nil, nil, nil, 158, nil, 277, nil, nil ]
815
815
 
816
816
  racc_action_default = [
817
- -1, -127, -1, -3, -10, -127, -127, -2, -3, -127,
818
- -16, -127, -127, -127, -127, -127, -127, -127, -24, -25,
819
- -127, -30, -31, -32, -127, -127, -127, -127, -127, -127,
820
- -127, -127, -127, -127, -127, -127, -127, -127, -127, -127,
821
- -13, 217, -4, -26, -127, -17, -118, -89, -90, -117,
822
- -14, -19, -81, -20, -21, -127, -23, -29, -127, -127,
823
- -127, -36, -37, -38, -39, -40, -41, -47, -49, -127,
824
- -52, -42, -74, -76, -127, -79, -80, -126, -43, -84,
825
- -86, -127, -44, -45, -46, -127, -127, -11, -5, -7,
826
- -91, -127, -64, -18, -119, -120, -121, -15, -127, -22,
827
- -27, -33, -122, -123, -34, -35, -127, -48, -50, -53,
828
- -72, -127, -75, -77, -84, -85, -127, -87, -127, -127,
829
- -127, -127, -6, -8, -9, -115, -92, -93, -94, -65,
830
- -127, -127, -82, -28, -51, -54, -73, -78, -88, -127,
831
- -60, -124, -127, -12, -127, -124, -127, -127, -55, -127,
832
- -58, -62, -66, -125, -127, -116, -95, -96, -98, -114,
833
- -83, -56, -127, -61, -124, -64, -89, -64, -127, -111,
834
- -127, -124, -89, -64, -64, -127, -124, -63, -67, -68,
835
- -104, -105, -106, -127, -70, -71, -127, -124, -97, -127,
836
- -99, -64, -55, -103, -57, -127, -89, -107, -112, -59,
837
- -127, -55, -102, -55, -127, -127, -109, -127, -64, -100,
838
- -69, -108, -127, -113, -55, -110, -101 ]
817
+ -1, -128, -1, -3, -10, -128, -128, -2, -3, -128,
818
+ -16, -128, -128, -128, -128, -128, -128, -128, -24, -25,
819
+ -128, -32, -33, -34, -128, -128, -128, -128, -128, -128,
820
+ -128, -128, -50, -50, -50, -128, -128, -128, -128, -128,
821
+ -128, -13, 219, -4, -26, -128, -17, -123, -93, -94,
822
+ -122, -14, -19, -85, -20, -21, -128, -23, -31, -128,
823
+ -128, -128, -38, -39, -40, -41, -42, -43, -51, -128,
824
+ -44, -128, -45, -46, -88, -90, -128, -47, -48, -49,
825
+ -128, -128, -11, -5, -7, -95, -128, -68, -18, -124,
826
+ -125, -126, -15, -128, -22, -27, -28, -29, -35, -83,
827
+ -84, -127, -36, -37, -128, -52, -54, -56, -128, -79,
828
+ -81, -88, -89, -128, -91, -128, -128, -128, -128, -6,
829
+ -8, -9, -120, -96, -97, -98, -69, -128, -128, -86,
830
+ -30, -55, -53, -57, -76, -82, -80, -92, -128, -62,
831
+ -66, -128, -12, -128, -66, -128, -128, -58, -77, -78,
832
+ -50, -128, -60, -64, -67, -70, -128, -121, -99, -100,
833
+ -102, -119, -87, -128, -63, -66, -68, -93, -68, -128,
834
+ -116, -128, -66, -93, -68, -68, -128, -66, -65, -71,
835
+ -72, -108, -109, -110, -128, -74, -75, -128, -66, -101,
836
+ -128, -103, -68, -50, -107, -59, -128, -93, -111, -117,
837
+ -61, -128, -50, -106, -50, -128, -128, -112, -113, -128,
838
+ -68, -104, -73, -114, -128, -118, -50, -115, -105 ]
839
839
 
840
840
  racc_goto_table = [
841
- 102, 102, 102, 49, 130, 73, 68, 89, 162, 91,
842
- 150, 139, 101, 104, 105, 1, 9, 174, 51, 53,
843
- 54, 42, 115, 70, 117, 79, 79, 79, 79, 56,
844
- 123, 3, 57, 7, 124, 154, 58, 59, 60, 179,
845
- 158, 107, 102, 108, 112, 194, 113, 191, 174, 157,
846
- 39, 122, 202, 91, 133, 97, 199, 115, 70, 138,
847
- 70, 209, 195, 210, 121, 46, 158, 99, 200, 93,
848
- 114, 206, 114, 66, 216, 188, 71, 178, 135, 184,
849
- 134, 110, 177, 137, 212, 190, 192, 78, 82, 83,
850
- 84, 136, 98, 165, 147, 127, 156, 70, 186, 173,
851
- 207, 144, nil, 201, nil, 114, nil, 114, nil, nil,
852
- 185, nil, nil, nil, nil, nil, nil, 193, nil, 165,
853
- 214, nil, nil, nil, nil, 197, nil, nil, nil, nil,
854
- 173, 197, nil, nil, nil, nil, nil, nil, nil, nil,
855
- nil, nil, nil, nil, nil, nil, 211, 197 ]
841
+ 69, 109, 50, 152, 57, 127, 84, 58, 112, 160,
842
+ 114, 59, 60, 61, 86, 52, 54, 55, 98, 102,
843
+ 103, 159, 106, 110, 175, 74, 74, 74, 74, 138,
844
+ 9, 1, 3, 180, 7, 43, 120, 160, 109, 109,
845
+ 195, 192, 121, 94, 119, 112, 40, 137, 118, 189,
846
+ 47, 200, 86, 92, 175, 156, 130, 131, 132, 107,
847
+ 135, 136, 88, 196, 111, 207, 111, 70, 72, 201,
848
+ 73, 77, 78, 79, 67, 147, 134, 178, 148, 149,
849
+ 93, 146, 124, 166, 179, 214, 185, 158, 208, 174,
850
+ 187, 209, 191, 193, 107, 107, 143, nil, nil, 186,
851
+ nil, 111, nil, 111, nil, nil, 194, nil, 166, nil,
852
+ 202, nil, nil, nil, 198, nil, nil, nil, 163, 174,
853
+ 198, nil, nil, nil, nil, nil, nil, nil, 216, nil,
854
+ nil, nil, nil, nil, nil, 213, 198, nil, nil, nil,
855
+ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
856
+ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
857
+ nil, 203, nil, nil, nil, nil, nil, nil, nil, nil,
858
+ 211, nil, 212, nil, nil, nil, nil, nil, nil, nil,
859
+ nil, nil, nil, nil, 218 ]
856
860
 
857
861
  racc_goto_check = [
858
- 35, 35, 35, 27, 40, 42, 26, 8, 32, 12,
859
- 31, 30, 21, 21, 21, 1, 7, 39, 16, 16,
860
- 16, 7, 45, 27, 45, 27, 27, 27, 27, 15,
861
- 5, 6, 15, 6, 9, 30, 15, 15, 15, 37,
862
- 34, 26, 35, 26, 42, 31, 42, 37, 39, 49,
863
- 10, 8, 32, 12, 21, 16, 31, 45, 27, 45,
864
- 27, 32, 38, 32, 11, 13, 34, 15, 38, 14,
865
- 27, 37, 27, 22, 32, 49, 23, 40, 28, 40,
866
- 26, 29, 33, 42, 38, 40, 40, 24, 24, 24,
867
- 24, 41, 43, 35, 44, 47, 48, 27, 50, 35,
868
- 51, 52, nil, 40, nil, 27, nil, 27, nil, nil,
869
- 35, nil, nil, nil, nil, nil, nil, 35, nil, 35,
870
- 40, nil, nil, nil, nil, 35, nil, nil, nil, nil,
871
- 35, 35, nil, nil, nil, nil, nil, nil, nil, nil,
872
- nil, nil, nil, nil, nil, nil, 35, 35 ]
862
+ 27, 20, 29, 33, 15, 40, 8, 15, 46, 39,
863
+ 46, 15, 15, 15, 12, 16, 16, 16, 22, 22,
864
+ 22, 50, 28, 43, 38, 29, 29, 29, 29, 32,
865
+ 7, 1, 6, 36, 6, 7, 5, 39, 20, 20,
866
+ 33, 36, 9, 15, 8, 46, 10, 46, 11, 50,
867
+ 13, 33, 12, 16, 38, 32, 22, 28, 28, 29,
868
+ 43, 43, 14, 37, 29, 36, 29, 24, 24, 37,
869
+ 25, 25, 25, 25, 23, 30, 31, 34, 41, 42,
870
+ 44, 45, 48, 20, 40, 37, 40, 49, 51, 20,
871
+ 52, 53, 40, 40, 29, 29, 54, nil, nil, 20,
872
+ nil, 29, nil, 29, nil, nil, 20, nil, 20, nil,
873
+ 40, nil, nil, nil, 20, nil, nil, nil, 27, 20,
874
+ 20, nil, nil, nil, nil, nil, nil, nil, 40, nil,
875
+ nil, nil, nil, nil, nil, 20, 20, nil, nil, nil,
876
+ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
877
+ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
878
+ nil, 27, nil, nil, nil, nil, nil, nil, nil, nil,
879
+ 27, nil, 27, nil, nil, nil, nil, nil, nil, nil,
880
+ nil, nil, nil, nil, 27 ]
873
881
 
874
882
  racc_goto_pointer = [
875
- nil, 15, nil, nil, nil, -59, 31, 13, -37, -55,
876
- 46, -23, -35, 53, 23, 12, 5, nil, nil, nil,
877
- nil, -46, 41, 43, 53, nil, -26, -9, -32, 11,
878
- -107, -131, -140, -82, -105, -58, nil, -126, -121, -140,
879
- -88, -19, -28, 40, -38, -57, nil, 5, -49, -96,
880
- -71, -98, -24 ]
883
+ nil, 31, nil, nil, nil, -48, 32, 27, -39, -42,
884
+ 42, -34, -31, 38, 15, -13, 2, nil, nil, nil,
885
+ -70, nil, -41, 42, 34, 35, nil, -32, -47, -10,
886
+ -59, -31, -86, -137, -88, nil, -133, -121, -135, -135,
887
+ -82, -56, -55, -48, 27, -48, -66, nil, -3, -57,
888
+ -123, -110, -80, -108, -26 ]
881
889
 
882
890
  racc_goto_default = [
883
- nil, nil, 2, 8, 88, nil, nil, nil, nil, nil,
884
- nil, nil, 10, nil, nil, 50, nil, 21, 22, 23,
885
- 100, nil, nil, nil, nil, 67, nil, 75, nil, nil,
886
- nil, nil, nil, 151, 152, 72, 129, nil, nil, 167,
887
- nil, 76, nil, nil, nil, 80, 90, nil, nil, nil,
888
- nil, nil, nil ]
891
+ nil, nil, 2, 8, 83, nil, nil, nil, nil, nil,
892
+ nil, nil, 10, nil, nil, 51, nil, 21, 22, 23,
893
+ 95, 97, nil, nil, nil, nil, 105, 71, nil, 99,
894
+ nil, nil, nil, nil, 153, 126, nil, nil, 168, 155,
895
+ nil, 100, nil, nil, nil, nil, 75, 85, nil, nil,
896
+ nil, nil, nil, nil, nil ]
889
897
 
890
898
  racc_reduce_table = [
891
899
  0, 0, :racc_error,
892
- 0, 61, :_reduce_1,
893
- 2, 61, :_reduce_2,
894
- 0, 62, :_reduce_3,
895
- 2, 62, :_reduce_4,
896
- 1, 63, :_reduce_5,
897
- 2, 63, :_reduce_6,
898
- 0, 64, :_reduce_none,
899
- 1, 64, :_reduce_none,
900
- 5, 56, :_reduce_none,
901
- 0, 65, :_reduce_10,
902
- 0, 66, :_reduce_11,
903
- 5, 57, :_reduce_12,
904
- 2, 57, :_reduce_none,
905
- 1, 71, :_reduce_14,
906
- 2, 71, :_reduce_15,
907
- 1, 58, :_reduce_none,
908
- 2, 58, :_reduce_17,
909
- 3, 58, :_reduce_none,
910
- 2, 58, :_reduce_none,
911
- 2, 58, :_reduce_20,
912
- 2, 58, :_reduce_21,
913
- 3, 58, :_reduce_22,
914
- 2, 58, :_reduce_23,
915
- 1, 58, :_reduce_24,
916
- 1, 58, :_reduce_25,
917
- 2, 58, :_reduce_none,
918
- 1, 76, :_reduce_27,
919
- 2, 76, :_reduce_28,
920
- 2, 67, :_reduce_29,
921
- 1, 67, :_reduce_none,
922
- 1, 67, :_reduce_none,
923
- 1, 67, :_reduce_none,
924
- 3, 67, :_reduce_33,
925
- 3, 67, :_reduce_34,
926
- 3, 67, :_reduce_35,
927
- 2, 67, :_reduce_36,
928
- 2, 67, :_reduce_37,
929
- 2, 67, :_reduce_38,
930
- 2, 67, :_reduce_39,
931
- 2, 67, :_reduce_40,
932
- 2, 72, :_reduce_none,
933
- 2, 72, :_reduce_42,
934
- 2, 72, :_reduce_43,
935
- 2, 72, :_reduce_44,
936
- 2, 72, :_reduce_45,
937
- 2, 72, :_reduce_46,
938
- 1, 81, :_reduce_47,
939
- 2, 81, :_reduce_48,
940
- 1, 77, :_reduce_49,
941
- 2, 77, :_reduce_50,
942
- 3, 77, :_reduce_51,
943
- 0, 84, :_reduce_none,
944
- 1, 84, :_reduce_none,
945
- 3, 80, :_reduce_54,
946
- 0, 87, :_reduce_none,
947
- 1, 87, :_reduce_none,
948
- 8, 73, :_reduce_57,
949
- 5, 74, :_reduce_58,
950
- 8, 74, :_reduce_59,
951
- 1, 85, :_reduce_60,
952
- 3, 85, :_reduce_61,
953
- 1, 86, :_reduce_62,
954
- 3, 86, :_reduce_63,
955
- 0, 95, :_reduce_none,
956
- 1, 95, :_reduce_none,
957
- 1, 88, :_reduce_66,
958
- 3, 88, :_reduce_67,
959
- 3, 88, :_reduce_68,
960
- 6, 88, :_reduce_69,
961
- 3, 88, :_reduce_70,
962
- 3, 88, :_reduce_71,
963
- 0, 83, :_reduce_none,
964
- 1, 83, :_reduce_73,
965
- 1, 97, :_reduce_74,
966
- 2, 97, :_reduce_75,
967
- 1, 78, :_reduce_76,
968
- 2, 78, :_reduce_77,
969
- 3, 78, :_reduce_78,
970
- 1, 90, :_reduce_none,
971
- 1, 90, :_reduce_none,
972
- 0, 98, :_reduce_81,
973
- 0, 99, :_reduce_82,
974
- 5, 70, :_reduce_83,
975
- 1, 100, :_reduce_84,
976
- 2, 100, :_reduce_85,
977
- 1, 79, :_reduce_86,
978
- 2, 79, :_reduce_87,
979
- 3, 79, :_reduce_88,
980
- 1, 82, :_reduce_89,
981
- 1, 82, :_reduce_90,
982
- 0, 102, :_reduce_none,
983
- 1, 102, :_reduce_none,
984
- 2, 59, :_reduce_none,
900
+ 0, 63, :_reduce_1,
901
+ 2, 63, :_reduce_2,
902
+ 0, 64, :_reduce_3,
903
+ 2, 64, :_reduce_4,
904
+ 1, 65, :_reduce_5,
905
+ 2, 65, :_reduce_6,
906
+ 0, 66, :_reduce_none,
907
+ 1, 66, :_reduce_none,
908
+ 5, 58, :_reduce_none,
909
+ 0, 67, :_reduce_10,
910
+ 0, 68, :_reduce_11,
911
+ 5, 59, :_reduce_12,
985
912
  2, 59, :_reduce_none,
986
- 4, 101, :_reduce_95,
987
- 1, 103, :_reduce_96,
988
- 3, 103, :_reduce_97,
989
- 1, 104, :_reduce_98,
990
- 3, 104, :_reduce_99,
991
- 5, 104, :_reduce_100,
992
- 7, 104, :_reduce_101,
993
- 4, 104, :_reduce_102,
994
- 3, 104, :_reduce_103,
995
- 1, 92, :_reduce_104,
996
- 1, 92, :_reduce_105,
997
- 1, 92, :_reduce_106,
998
- 1, 93, :_reduce_107,
999
- 3, 93, :_reduce_108,
1000
- 2, 93, :_reduce_109,
1001
- 4, 93, :_reduce_110,
1002
- 0, 105, :_reduce_111,
1003
- 0, 106, :_reduce_112,
1004
- 5, 94, :_reduce_113,
1005
- 3, 91, :_reduce_114,
1006
- 0, 107, :_reduce_115,
1007
- 3, 60, :_reduce_116,
1008
- 1, 68, :_reduce_none,
1009
- 0, 69, :_reduce_none,
913
+ 1, 73, :_reduce_14,
914
+ 2, 73, :_reduce_15,
915
+ 1, 60, :_reduce_none,
916
+ 2, 60, :_reduce_17,
917
+ 3, 60, :_reduce_none,
918
+ 2, 60, :_reduce_none,
919
+ 2, 60, :_reduce_20,
920
+ 2, 60, :_reduce_21,
921
+ 3, 60, :_reduce_22,
922
+ 2, 60, :_reduce_23,
923
+ 1, 60, :_reduce_24,
924
+ 1, 60, :_reduce_25,
925
+ 2, 60, :_reduce_none,
926
+ 1, 78, :_reduce_27,
927
+ 1, 78, :_reduce_28,
928
+ 1, 79, :_reduce_29,
929
+ 2, 79, :_reduce_30,
930
+ 2, 69, :_reduce_31,
1010
931
  1, 69, :_reduce_none,
1011
932
  1, 69, :_reduce_none,
1012
933
  1, 69, :_reduce_none,
1013
- 1, 75, :_reduce_none,
1014
- 1, 75, :_reduce_none,
1015
- 0, 89, :_reduce_none,
1016
- 1, 89, :_reduce_none,
1017
- 1, 96, :_reduce_126 ]
1018
-
1019
- racc_reduce_n = 127
1020
-
1021
- racc_shift_n = 217
934
+ 3, 69, :_reduce_35,
935
+ 3, 69, :_reduce_36,
936
+ 3, 69, :_reduce_37,
937
+ 2, 69, :_reduce_38,
938
+ 2, 69, :_reduce_39,
939
+ 2, 69, :_reduce_40,
940
+ 2, 69, :_reduce_41,
941
+ 2, 69, :_reduce_42,
942
+ 2, 74, :_reduce_none,
943
+ 2, 74, :_reduce_44,
944
+ 2, 74, :_reduce_45,
945
+ 2, 74, :_reduce_46,
946
+ 2, 74, :_reduce_47,
947
+ 2, 74, :_reduce_48,
948
+ 2, 74, :_reduce_49,
949
+ 0, 84, :_reduce_none,
950
+ 1, 84, :_reduce_none,
951
+ 1, 85, :_reduce_52,
952
+ 2, 85, :_reduce_53,
953
+ 2, 80, :_reduce_54,
954
+ 3, 80, :_reduce_55,
955
+ 0, 88, :_reduce_none,
956
+ 1, 88, :_reduce_none,
957
+ 3, 83, :_reduce_58,
958
+ 8, 75, :_reduce_59,
959
+ 5, 76, :_reduce_60,
960
+ 8, 76, :_reduce_61,
961
+ 1, 89, :_reduce_62,
962
+ 3, 89, :_reduce_63,
963
+ 1, 90, :_reduce_64,
964
+ 3, 90, :_reduce_65,
965
+ 0, 96, :_reduce_none,
966
+ 1, 96, :_reduce_none,
967
+ 0, 97, :_reduce_none,
968
+ 1, 97, :_reduce_none,
969
+ 1, 91, :_reduce_70,
970
+ 3, 91, :_reduce_71,
971
+ 3, 91, :_reduce_72,
972
+ 6, 91, :_reduce_73,
973
+ 3, 91, :_reduce_74,
974
+ 3, 91, :_reduce_75,
975
+ 0, 99, :_reduce_none,
976
+ 1, 99, :_reduce_none,
977
+ 1, 87, :_reduce_78,
978
+ 1, 100, :_reduce_79,
979
+ 2, 100, :_reduce_80,
980
+ 2, 81, :_reduce_81,
981
+ 3, 81, :_reduce_82,
982
+ 1, 77, :_reduce_none,
983
+ 1, 77, :_reduce_none,
984
+ 0, 101, :_reduce_85,
985
+ 0, 102, :_reduce_86,
986
+ 5, 72, :_reduce_87,
987
+ 1, 103, :_reduce_88,
988
+ 2, 103, :_reduce_89,
989
+ 1, 82, :_reduce_90,
990
+ 2, 82, :_reduce_91,
991
+ 3, 82, :_reduce_92,
992
+ 1, 86, :_reduce_93,
993
+ 1, 86, :_reduce_94,
994
+ 0, 105, :_reduce_none,
995
+ 1, 105, :_reduce_none,
996
+ 2, 61, :_reduce_none,
997
+ 2, 61, :_reduce_none,
998
+ 4, 104, :_reduce_99,
999
+ 1, 106, :_reduce_100,
1000
+ 3, 106, :_reduce_101,
1001
+ 1, 107, :_reduce_102,
1002
+ 3, 107, :_reduce_103,
1003
+ 5, 107, :_reduce_104,
1004
+ 7, 107, :_reduce_105,
1005
+ 4, 107, :_reduce_106,
1006
+ 3, 107, :_reduce_107,
1007
+ 1, 93, :_reduce_108,
1008
+ 1, 93, :_reduce_109,
1009
+ 1, 93, :_reduce_110,
1010
+ 0, 108, :_reduce_none,
1011
+ 1, 108, :_reduce_none,
1012
+ 2, 94, :_reduce_113,
1013
+ 3, 94, :_reduce_114,
1014
+ 4, 94, :_reduce_115,
1015
+ 0, 109, :_reduce_116,
1016
+ 0, 110, :_reduce_117,
1017
+ 5, 95, :_reduce_118,
1018
+ 3, 92, :_reduce_119,
1019
+ 0, 111, :_reduce_120,
1020
+ 3, 62, :_reduce_121,
1021
+ 1, 70, :_reduce_none,
1022
+ 0, 71, :_reduce_none,
1023
+ 1, 71, :_reduce_none,
1024
+ 1, 71, :_reduce_none,
1025
+ 1, 71, :_reduce_none,
1026
+ 1, 98, :_reduce_127 ]
1027
+
1028
+ racc_reduce_n = 128
1029
+
1030
+ racc_shift_n = 219
1022
1031
 
1023
1032
  racc_token_table = {
1024
1033
  false => 0,
@@ -1053,31 +1062,33 @@ racc_token_table = {
1053
1062
  "%after-reduce" => 29,
1054
1063
  "%after-shift-error-token" => 30,
1055
1064
  "%after-pop-stack" => 31,
1056
- "%token" => 32,
1057
- "%type" => 33,
1058
- "%left" => 34,
1059
- "%right" => 35,
1060
- "%precedence" => 36,
1061
- "%nonassoc" => 37,
1062
- "%rule" => 38,
1063
- "(" => 39,
1064
- ")" => 40,
1065
- ":" => 41,
1066
- "%inline" => 42,
1067
- "," => 43,
1068
- "|" => 44,
1069
- "%prec" => 45,
1070
- "{" => 46,
1071
- "}" => 47,
1072
- "?" => 48,
1073
- "+" => 49,
1074
- "*" => 50,
1075
- "[" => 51,
1076
- "]" => 52,
1077
- "{...}" => 53,
1078
- "%empty" => 54 }
1079
-
1080
- racc_nt_base = 55
1065
+ "-temp-group" => 32,
1066
+ "%token" => 33,
1067
+ "%type" => 34,
1068
+ "%nterm" => 35,
1069
+ "%left" => 36,
1070
+ "%right" => 37,
1071
+ "%precedence" => 38,
1072
+ "%nonassoc" => 39,
1073
+ "%rule" => 40,
1074
+ "(" => 41,
1075
+ ")" => 42,
1076
+ ":" => 43,
1077
+ "%inline" => 44,
1078
+ "," => 45,
1079
+ "|" => 46,
1080
+ "%empty" => 47,
1081
+ "%prec" => 48,
1082
+ "{" => 49,
1083
+ "}" => 50,
1084
+ "?" => 51,
1085
+ "+" => 52,
1086
+ "*" => 53,
1087
+ "[" => 54,
1088
+ "]" => 55,
1089
+ "{...}" => 56 }
1090
+
1091
+ racc_nt_base = 57
1081
1092
 
1082
1093
  racc_use_result_var = true
1083
1094
 
@@ -1131,8 +1142,10 @@ Racc_token_to_s_table = [
1131
1142
  "\"%after-reduce\"",
1132
1143
  "\"%after-shift-error-token\"",
1133
1144
  "\"%after-pop-stack\"",
1145
+ "\"-temp-group\"",
1134
1146
  "\"%token\"",
1135
1147
  "\"%type\"",
1148
+ "\"%nterm\"",
1136
1149
  "\"%left\"",
1137
1150
  "\"%right\"",
1138
1151
  "\"%precedence\"",
@@ -1144,6 +1157,7 @@ Racc_token_to_s_table = [
1144
1157
  "\"%inline\"",
1145
1158
  "\",\"",
1146
1159
  "\"|\"",
1160
+ "\"%empty\"",
1147
1161
  "\"%prec\"",
1148
1162
  "\"{\"",
1149
1163
  "\"}\"",
@@ -1153,7 +1167,6 @@ Racc_token_to_s_table = [
1153
1167
  "\"[\"",
1154
1168
  "\"]\"",
1155
1169
  "\"{...}\"",
1156
- "\"%empty\"",
1157
1170
  "$start",
1158
1171
  "input",
1159
1172
  "prologue_declaration",
@@ -1174,28 +1187,29 @@ Racc_token_to_s_table = [
1174
1187
  "symbol_declaration",
1175
1188
  "rule_declaration",
1176
1189
  "inline_declaration",
1177
- "generic_symbol",
1178
- "\"-many1@generic_symbol\"",
1190
+ "symbol",
1191
+ "\"-group@symbol|TAG\"",
1192
+ "\"-many1@-group@symbol|TAG\"",
1179
1193
  "token_declarations",
1180
1194
  "symbol_declarations",
1181
1195
  "token_declarations_for_precedence",
1182
1196
  "token_declaration",
1197
+ "\"-option@TAG\"",
1183
1198
  "\"-many1@token_declaration\"",
1184
1199
  "id",
1185
1200
  "alias",
1186
1201
  "\"-option@INTEGER\"",
1187
1202
  "rule_args",
1188
1203
  "rule_rhs_list",
1189
- "\"-option@TAG\"",
1190
1204
  "rule_rhs",
1191
- "empty",
1192
- "symbol",
1193
1205
  "named_ref",
1194
1206
  "parameterizing_suffix",
1195
1207
  "parameterizing_args",
1196
1208
  "midrule_action",
1209
+ "\"-option@%empty\"",
1197
1210
  "\"-option@named_ref\"",
1198
1211
  "string_as_id",
1212
+ "\"-option@string_as_id\"",
1199
1213
  "\"-many1@symbol\"",
1200
1214
  "@3",
1201
1215
  "@4",
@@ -1204,6 +1218,7 @@ Racc_token_to_s_table = [
1204
1218
  "\"-option@;\"",
1205
1219
  "rhs_list",
1206
1220
  "rhs",
1221
+ "\"-option@parameterizing_suffix\"",
1207
1222
  "@5",
1208
1223
  "@6",
1209
1224
  "@7" ]
@@ -1371,20 +1386,34 @@ module_eval(<<'.,.,', 'parser.y', 50)
1371
1386
 
1372
1387
  module_eval(<<'.,.,', 'parser.y', 109)
1373
1388
  def _reduce_27(val, _values, result)
1374
- result = val[1] ? val[1].unshift(val[0]) : val
1389
+ result = val
1375
1390
  result
1376
1391
  end
1377
1392
  .,.,
1378
1393
 
1379
1394
  module_eval(<<'.,.,', 'parser.y', 109)
1380
1395
  def _reduce_28(val, _values, result)
1396
+ result = val
1397
+ result
1398
+ end
1399
+ .,.,
1400
+
1401
+ module_eval(<<'.,.,', 'parser.y', 109)
1402
+ def _reduce_29(val, _values, result)
1403
+ result = val[1] ? val[1].unshift(val[0]) : val
1404
+ result
1405
+ end
1406
+ .,.,
1407
+
1408
+ module_eval(<<'.,.,', 'parser.y', 109)
1409
+ def _reduce_30(val, _values, result)
1381
1410
  result = val[1] ? val[1].unshift(val[0]) : val
1382
1411
  result
1383
1412
  end
1384
1413
  .,.,
1385
1414
 
1386
1415
  module_eval(<<'.,.,', 'parser.y', 55)
1387
- def _reduce_29(val, _values, result)
1416
+ def _reduce_31(val, _values, result)
1388
1417
  @grammar.set_union(
1389
1418
  Grammar::Code::NoReferenceCode.new(type: :union, token_code: val[1]),
1390
1419
  val[1].line
@@ -1394,16 +1423,16 @@ module_eval(<<'.,.,', 'parser.y', 55)
1394
1423
  end
1395
1424
  .,.,
1396
1425
 
1397
- # reduce 30 omitted
1426
+ # reduce 32 omitted
1398
1427
 
1399
- # reduce 31 omitted
1428
+ # reduce 33 omitted
1400
1429
 
1401
- # reduce 32 omitted
1430
+ # reduce 34 omitted
1402
1431
 
1403
1432
  module_eval(<<'.,.,', 'parser.y', 65)
1404
- def _reduce_33(val, _values, result)
1433
+ def _reduce_35(val, _values, result)
1405
1434
  @grammar.add_destructor(
1406
- ident_or_tags: val[2],
1435
+ ident_or_tags: val[2].flatten,
1407
1436
  token_code: val[1],
1408
1437
  lineno: val[1].line
1409
1438
  )
@@ -1413,9 +1442,9 @@ module_eval(<<'.,.,', 'parser.y', 65)
1413
1442
  .,.,
1414
1443
 
1415
1444
  module_eval(<<'.,.,', 'parser.y', 73)
1416
- def _reduce_34(val, _values, result)
1445
+ def _reduce_36(val, _values, result)
1417
1446
  @grammar.add_printer(
1418
- ident_or_tags: val[2],
1447
+ ident_or_tags: val[2].flatten,
1419
1448
  token_code: val[1],
1420
1449
  lineno: val[1].line
1421
1450
  )
@@ -1425,9 +1454,9 @@ module_eval(<<'.,.,', 'parser.y', 73)
1425
1454
  .,.,
1426
1455
 
1427
1456
  module_eval(<<'.,.,', 'parser.y', 81)
1428
- def _reduce_35(val, _values, result)
1457
+ def _reduce_37(val, _values, result)
1429
1458
  @grammar.add_error_token(
1430
- ident_or_tags: val[2],
1459
+ ident_or_tags: val[2].flatten,
1431
1460
  token_code: val[1],
1432
1461
  lineno: val[1].line
1433
1462
  )
@@ -1437,7 +1466,7 @@ module_eval(<<'.,.,', 'parser.y', 81)
1437
1466
  .,.,
1438
1467
 
1439
1468
  module_eval(<<'.,.,', 'parser.y', 89)
1440
- def _reduce_36(val, _values, result)
1469
+ def _reduce_38(val, _values, result)
1441
1470
  @grammar.after_shift = val[1]
1442
1471
 
1443
1472
  result
@@ -1445,7 +1474,7 @@ module_eval(<<'.,.,', 'parser.y', 89)
1445
1474
  .,.,
1446
1475
 
1447
1476
  module_eval(<<'.,.,', 'parser.y', 93)
1448
- def _reduce_37(val, _values, result)
1477
+ def _reduce_39(val, _values, result)
1449
1478
  @grammar.before_reduce = val[1]
1450
1479
 
1451
1480
  result
@@ -1453,7 +1482,7 @@ module_eval(<<'.,.,', 'parser.y', 93)
1453
1482
  .,.,
1454
1483
 
1455
1484
  module_eval(<<'.,.,', 'parser.y', 97)
1456
- def _reduce_38(val, _values, result)
1485
+ def _reduce_40(val, _values, result)
1457
1486
  @grammar.after_reduce = val[1]
1458
1487
 
1459
1488
  result
@@ -1461,7 +1490,7 @@ module_eval(<<'.,.,', 'parser.y', 97)
1461
1490
  .,.,
1462
1491
 
1463
1492
  module_eval(<<'.,.,', 'parser.y', 101)
1464
- def _reduce_39(val, _values, result)
1493
+ def _reduce_41(val, _values, result)
1465
1494
  @grammar.after_shift_error_token = val[1]
1466
1495
 
1467
1496
  result
@@ -1469,17 +1498,17 @@ module_eval(<<'.,.,', 'parser.y', 101)
1469
1498
  .,.,
1470
1499
 
1471
1500
  module_eval(<<'.,.,', 'parser.y', 105)
1472
- def _reduce_40(val, _values, result)
1501
+ def _reduce_42(val, _values, result)
1473
1502
  @grammar.after_pop_stack = val[1]
1474
1503
 
1475
1504
  result
1476
1505
  end
1477
1506
  .,.,
1478
1507
 
1479
- # reduce 41 omitted
1508
+ # reduce 43 omitted
1480
1509
 
1481
1510
  module_eval(<<'.,.,', 'parser.y', 111)
1482
- def _reduce_42(val, _values, result)
1511
+ def _reduce_44(val, _values, result)
1483
1512
  val[1].each {|hash|
1484
1513
  hash[:tokens].each {|id|
1485
1514
  @grammar.add_type(id: id, tag: hash[:tag])
@@ -1491,7 +1520,23 @@ module_eval(<<'.,.,', 'parser.y', 111)
1491
1520
  .,.,
1492
1521
 
1493
1522
  module_eval(<<'.,.,', 'parser.y', 119)
1494
- def _reduce_43(val, _values, result)
1523
+ def _reduce_45(val, _values, result)
1524
+ val[1].each {|hash|
1525
+ hash[:tokens].each {|id|
1526
+ if @grammar.find_term_by_s_value(id.s_value)
1527
+ on_action_error("symbol #{id.s_value} redeclared as a nonterminal", id)
1528
+ else
1529
+ @grammar.add_type(id: id, tag: hash[:tag])
1530
+ end
1531
+ }
1532
+ }
1533
+
1534
+ result
1535
+ end
1536
+ .,.,
1537
+
1538
+ module_eval(<<'.,.,', 'parser.y', 131)
1539
+ def _reduce_46(val, _values, result)
1495
1540
  val[1].each {|hash|
1496
1541
  hash[:tokens].each {|id|
1497
1542
  sym = @grammar.add_term(id: id)
@@ -1504,8 +1549,8 @@ module_eval(<<'.,.,', 'parser.y', 119)
1504
1549
  end
1505
1550
  .,.,
1506
1551
 
1507
- module_eval(<<'.,.,', 'parser.y', 129)
1508
- def _reduce_44(val, _values, result)
1552
+ module_eval(<<'.,.,', 'parser.y', 141)
1553
+ def _reduce_47(val, _values, result)
1509
1554
  val[1].each {|hash|
1510
1555
  hash[:tokens].each {|id|
1511
1556
  sym = @grammar.add_term(id: id)
@@ -1518,8 +1563,8 @@ module_eval(<<'.,.,', 'parser.y', 129)
1518
1563
  end
1519
1564
  .,.,
1520
1565
 
1521
- module_eval(<<'.,.,', 'parser.y', 139)
1522
- def _reduce_45(val, _values, result)
1566
+ module_eval(<<'.,.,', 'parser.y', 151)
1567
+ def _reduce_48(val, _values, result)
1523
1568
  val[1].each {|hash|
1524
1569
  hash[:tokens].each {|id|
1525
1570
  sym = @grammar.add_term(id: id)
@@ -1532,8 +1577,8 @@ module_eval(<<'.,.,', 'parser.y', 139)
1532
1577
  end
1533
1578
  .,.,
1534
1579
 
1535
- module_eval(<<'.,.,', 'parser.y', 149)
1536
- def _reduce_46(val, _values, result)
1580
+ module_eval(<<'.,.,', 'parser.y', 161)
1581
+ def _reduce_49(val, _values, result)
1537
1582
  val[1].each {|hash|
1538
1583
  hash[:tokens].each {|id|
1539
1584
  sym = @grammar.add_term(id: id)
@@ -1546,32 +1591,26 @@ module_eval(<<'.,.,', 'parser.y', 149)
1546
1591
  end
1547
1592
  .,.,
1548
1593
 
1549
- module_eval(<<'.,.,', 'parser.y', 178)
1550
- def _reduce_47(val, _values, result)
1551
- result = val[1] ? val[1].unshift(val[0]) : val
1552
- result
1553
- end
1554
- .,.,
1594
+ # reduce 50 omitted
1555
1595
 
1556
- module_eval(<<'.,.,', 'parser.y', 178)
1557
- def _reduce_48(val, _values, result)
1596
+ # reduce 51 omitted
1597
+
1598
+ module_eval(<<'.,.,', 'parser.y', 184)
1599
+ def _reduce_52(val, _values, result)
1558
1600
  result = val[1] ? val[1].unshift(val[0]) : val
1559
1601
  result
1560
1602
  end
1561
1603
  .,.,
1562
1604
 
1563
- module_eval(<<'.,.,', 'parser.y', 160)
1564
- def _reduce_49(val, _values, result)
1565
- val[0].each {|token_declaration|
1566
- @grammar.add_term(id: token_declaration[0], alias_name: token_declaration[2], token_id: token_declaration[1], tag: nil, replace: true)
1567
- }
1568
-
1605
+ module_eval(<<'.,.,', 'parser.y', 184)
1606
+ def _reduce_53(val, _values, result)
1607
+ result = val[1] ? val[1].unshift(val[0]) : val
1569
1608
  result
1570
1609
  end
1571
1610
  .,.,
1572
1611
 
1573
- module_eval(<<'.,.,', 'parser.y', 166)
1574
- def _reduce_50(val, _values, result)
1612
+ module_eval(<<'.,.,', 'parser.y', 172)
1613
+ def _reduce_54(val, _values, result)
1575
1614
  val[1].each {|token_declaration|
1576
1615
  @grammar.add_term(id: token_declaration[0], alias_name: token_declaration[2], token_id: token_declaration[1], tag: val[0], replace: true)
1577
1616
  }
@@ -1580,8 +1619,8 @@ module_eval(<<'.,.,', 'parser.y', 166)
1580
1619
  end
1581
1620
  .,.,
1582
1621
 
1583
- module_eval(<<'.,.,', 'parser.y', 172)
1584
- def _reduce_51(val, _values, result)
1622
+ module_eval(<<'.,.,', 'parser.y', 178)
1623
+ def _reduce_55(val, _values, result)
1585
1624
  val[2].each {|token_declaration|
1586
1625
  @grammar.add_term(id: token_declaration[0], alias_name: token_declaration[2], token_id: token_declaration[1], tag: val[1], replace: true)
1587
1626
  }
@@ -1590,23 +1629,19 @@ module_eval(<<'.,.,', 'parser.y', 172)
1590
1629
  end
1591
1630
  .,.,
1592
1631
 
1593
- # reduce 52 omitted
1632
+ # reduce 56 omitted
1594
1633
 
1595
- # reduce 53 omitted
1634
+ # reduce 57 omitted
1596
1635
 
1597
- module_eval(<<'.,.,', 'parser.y', 177)
1598
- def _reduce_54(val, _values, result)
1636
+ module_eval(<<'.,.,', 'parser.y', 183)
1637
+ def _reduce_58(val, _values, result)
1599
1638
  result = val
1600
1639
  result
1601
1640
  end
1602
1641
  .,.,
1603
1642
 
1604
- # reduce 55 omitted
1605
-
1606
- # reduce 56 omitted
1607
-
1608
- module_eval(<<'.,.,', 'parser.y', 181)
1609
- def _reduce_57(val, _values, result)
1643
+ module_eval(<<'.,.,', 'parser.y', 187)
1644
+ def _reduce_59(val, _values, result)
1610
1645
  rule = Grammar::ParameterizingRule::Rule.new(val[1].s_value, val[3], val[7], tag: val[5])
1611
1646
  @grammar.add_parameterizing_rule(rule)
1612
1647
 
@@ -1614,8 +1649,8 @@ module_eval(<<'.,.,', 'parser.y', 181)
1614
1649
  end
1615
1650
  .,.,
1616
1651
 
1617
- module_eval(<<'.,.,', 'parser.y', 187)
1618
- def _reduce_58(val, _values, result)
1652
+ module_eval(<<'.,.,', 'parser.y', 193)
1653
+ def _reduce_60(val, _values, result)
1619
1654
  rule = Grammar::ParameterizingRule::Rule.new(val[2].s_value, [], val[4], is_inline: true)
1620
1655
  @grammar.add_parameterizing_rule(rule)
1621
1656
 
@@ -1623,8 +1658,8 @@ module_eval(<<'.,.,', 'parser.y', 187)
1623
1658
  end
1624
1659
  .,.,
1625
1660
 
1626
- module_eval(<<'.,.,', 'parser.y', 192)
1627
- def _reduce_59(val, _values, result)
1661
+ module_eval(<<'.,.,', 'parser.y', 198)
1662
+ def _reduce_61(val, _values, result)
1628
1663
  rule = Grammar::ParameterizingRule::Rule.new(val[2].s_value, val[4], val[7], is_inline: true)
1629
1664
  @grammar.add_parameterizing_rule(rule)
1630
1665
 
@@ -1632,22 +1667,22 @@ module_eval(<<'.,.,', 'parser.y', 192)
1632
1667
  end
1633
1668
  .,.,
1634
1669
 
1635
- module_eval(<<'.,.,', 'parser.y', 196)
1636
- def _reduce_60(val, _values, result)
1670
+ module_eval(<<'.,.,', 'parser.y', 202)
1671
+ def _reduce_62(val, _values, result)
1637
1672
  result = [val[0]]
1638
1673
  result
1639
1674
  end
1640
1675
  .,.,
1641
1676
 
1642
- module_eval(<<'.,.,', 'parser.y', 197)
1643
- def _reduce_61(val, _values, result)
1677
+ module_eval(<<'.,.,', 'parser.y', 203)
1678
+ def _reduce_63(val, _values, result)
1644
1679
  result = val[0].append(val[2])
1645
1680
  result
1646
1681
  end
1647
1682
  .,.,
1648
1683
 
1649
- module_eval(<<'.,.,', 'parser.y', 201)
1650
- def _reduce_62(val, _values, result)
1684
+ module_eval(<<'.,.,', 'parser.y', 207)
1685
+ def _reduce_64(val, _values, result)
1651
1686
  builder = val[0]
1652
1687
  result = [builder]
1653
1688
 
@@ -1655,8 +1690,8 @@ module_eval(<<'.,.,', 'parser.y', 201)
1655
1690
  end
1656
1691
  .,.,
1657
1692
 
1658
- module_eval(<<'.,.,', 'parser.y', 206)
1659
- def _reduce_63(val, _values, result)
1693
+ module_eval(<<'.,.,', 'parser.y', 212)
1694
+ def _reduce_65(val, _values, result)
1660
1695
  builder = val[2]
1661
1696
  result = val[0].append(builder)
1662
1697
 
@@ -1664,12 +1699,16 @@ module_eval(<<'.,.,', 'parser.y', 206)
1664
1699
  end
1665
1700
  .,.,
1666
1701
 
1667
- # reduce 64 omitted
1702
+ # reduce 66 omitted
1668
1703
 
1669
- # reduce 65 omitted
1704
+ # reduce 67 omitted
1670
1705
 
1671
- module_eval(<<'.,.,', 'parser.y', 212)
1672
- def _reduce_66(val, _values, result)
1706
+ # reduce 68 omitted
1707
+
1708
+ # reduce 69 omitted
1709
+
1710
+ module_eval(<<'.,.,', 'parser.y', 218)
1711
+ def _reduce_70(val, _values, result)
1673
1712
  reset_precs
1674
1713
  result = Grammar::ParameterizingRule::Rhs.new
1675
1714
 
@@ -1677,8 +1716,8 @@ module_eval(<<'.,.,', 'parser.y', 212)
1677
1716
  end
1678
1717
  .,.,
1679
1718
 
1680
- module_eval(<<'.,.,', 'parser.y', 217)
1681
- def _reduce_67(val, _values, result)
1719
+ module_eval(<<'.,.,', 'parser.y', 223)
1720
+ def _reduce_71(val, _values, result)
1682
1721
  token = val[1]
1683
1722
  token.alias_name = val[2]
1684
1723
  builder = val[0]
@@ -1689,8 +1728,8 @@ module_eval(<<'.,.,', 'parser.y', 217)
1689
1728
  end
1690
1729
  .,.,
1691
1730
 
1692
- module_eval(<<'.,.,', 'parser.y', 225)
1693
- def _reduce_68(val, _values, result)
1731
+ module_eval(<<'.,.,', 'parser.y', 231)
1732
+ def _reduce_72(val, _values, result)
1694
1733
  builder = val[0]
1695
1734
  builder.symbols << Lrama::Lexer::Token::InstantiateRule.new(s_value: val[2], location: @lexer.location, args: [val[1]])
1696
1735
  result = builder
@@ -1699,8 +1738,8 @@ module_eval(<<'.,.,', 'parser.y', 225)
1699
1738
  end
1700
1739
  .,.,
1701
1740
 
1702
- module_eval(<<'.,.,', 'parser.y', 231)
1703
- def _reduce_69(val, _values, result)
1741
+ module_eval(<<'.,.,', 'parser.y', 237)
1742
+ def _reduce_73(val, _values, result)
1704
1743
  builder = val[0]
1705
1744
  builder.symbols << Lrama::Lexer::Token::InstantiateRule.new(s_value: val[1].s_value, location: @lexer.location, args: val[3], lhs_tag: val[5])
1706
1745
  result = builder
@@ -1709,8 +1748,8 @@ module_eval(<<'.,.,', 'parser.y', 231)
1709
1748
  end
1710
1749
  .,.,
1711
1750
 
1712
- module_eval(<<'.,.,', 'parser.y', 237)
1713
- def _reduce_70(val, _values, result)
1751
+ module_eval(<<'.,.,', 'parser.y', 243)
1752
+ def _reduce_74(val, _values, result)
1714
1753
  user_code = val[1]
1715
1754
  user_code.alias_name = val[2]
1716
1755
  builder = val[0]
@@ -1721,8 +1760,8 @@ module_eval(<<'.,.,', 'parser.y', 237)
1721
1760
  end
1722
1761
  .,.,
1723
1762
 
1724
- module_eval(<<'.,.,', 'parser.y', 245)
1725
- def _reduce_71(val, _values, result)
1763
+ module_eval(<<'.,.,', 'parser.y', 251)
1764
+ def _reduce_75(val, _values, result)
1726
1765
  sym = @grammar.find_symbol_by_id!(val[2])
1727
1766
  @prec_seen = true
1728
1767
  builder = val[0]
@@ -1733,137 +1772,137 @@ module_eval(<<'.,.,', 'parser.y', 245)
1733
1772
  end
1734
1773
  .,.,
1735
1774
 
1736
- # reduce 72 omitted
1775
+ # reduce 76 omitted
1737
1776
 
1738
- module_eval(<<'.,.,', 'parser.y', 253)
1739
- def _reduce_73(val, _values, result)
1740
- result = val[0].s_value
1777
+ # reduce 77 omitted
1778
+
1779
+ module_eval(<<'.,.,', 'parser.y', 258)
1780
+ def _reduce_78(val, _values, result)
1781
+ result = val[0].s_value if val[0]
1741
1782
  result
1742
1783
  end
1743
1784
  .,.,
1744
1785
 
1745
- module_eval(<<'.,.,', 'parser.y', 260)
1746
- def _reduce_74(val, _values, result)
1786
+ module_eval(<<'.,.,', 'parser.y', 271)
1787
+ def _reduce_79(val, _values, result)
1747
1788
  result = val[1] ? val[1].unshift(val[0]) : val
1748
1789
  result
1749
1790
  end
1750
1791
  .,.,
1751
1792
 
1752
- module_eval(<<'.,.,', 'parser.y', 260)
1753
- def _reduce_75(val, _values, result)
1793
+ module_eval(<<'.,.,', 'parser.y', 271)
1794
+ def _reduce_80(val, _values, result)
1754
1795
  result = val[1] ? val[1].unshift(val[0]) : val
1755
1796
  result
1756
1797
  end
1757
1798
  .,.,
1758
1799
 
1759
- module_eval(<<'.,.,', 'parser.y', 255)
1760
- def _reduce_76(val, _values, result)
1761
- result = [{tag: nil, tokens: val[0]}]
1762
- result
1763
- end
1764
- .,.,
1800
+ module_eval(<<'.,.,', 'parser.y', 262)
1801
+ def _reduce_81(val, _values, result)
1802
+ result = if val[0]
1803
+ [{tag: val[0], tokens: val[1]}]
1804
+ else
1805
+ [{tag: nil, tokens: val[1]}]
1806
+ end
1765
1807
 
1766
- module_eval(<<'.,.,', 'parser.y', 256)
1767
- def _reduce_77(val, _values, result)
1768
- result = [{tag: val[0], tokens: val[1]}]
1769
1808
  result
1770
1809
  end
1771
1810
  .,.,
1772
1811
 
1773
- module_eval(<<'.,.,', 'parser.y', 257)
1774
- def _reduce_78(val, _values, result)
1812
+ module_eval(<<'.,.,', 'parser.y', 268)
1813
+ def _reduce_82(val, _values, result)
1775
1814
  result = val[0].append({tag: val[1], tokens: val[2]})
1776
1815
  result
1777
1816
  end
1778
1817
  .,.,
1779
1818
 
1780
- # reduce 79 omitted
1819
+ # reduce 83 omitted
1781
1820
 
1782
- # reduce 80 omitted
1821
+ # reduce 84 omitted
1783
1822
 
1784
- module_eval(<<'.,.,', 'parser.y', 263)
1785
- def _reduce_81(val, _values, result)
1823
+ module_eval(<<'.,.,', 'parser.y', 274)
1824
+ def _reduce_85(val, _values, result)
1786
1825
  begin_c_declaration("}")
1787
1826
 
1788
1827
  result
1789
1828
  end
1790
1829
  .,.,
1791
1830
 
1792
- module_eval(<<'.,.,', 'parser.y', 267)
1793
- def _reduce_82(val, _values, result)
1831
+ module_eval(<<'.,.,', 'parser.y', 278)
1832
+ def _reduce_86(val, _values, result)
1794
1833
  end_c_declaration
1795
1834
 
1796
1835
  result
1797
1836
  end
1798
1837
  .,.,
1799
1838
 
1800
- module_eval(<<'.,.,', 'parser.y', 271)
1801
- def _reduce_83(val, _values, result)
1839
+ module_eval(<<'.,.,', 'parser.y', 282)
1840
+ def _reduce_87(val, _values, result)
1802
1841
  result = val[2]
1803
1842
 
1804
1843
  result
1805
1844
  end
1806
1845
  .,.,
1807
1846
 
1808
- module_eval(<<'.,.,', 'parser.y', 279)
1809
- def _reduce_84(val, _values, result)
1847
+ module_eval(<<'.,.,', 'parser.y', 290)
1848
+ def _reduce_88(val, _values, result)
1810
1849
  result = val[1] ? val[1].unshift(val[0]) : val
1811
1850
  result
1812
1851
  end
1813
1852
  .,.,
1814
1853
 
1815
- module_eval(<<'.,.,', 'parser.y', 279)
1816
- def _reduce_85(val, _values, result)
1854
+ module_eval(<<'.,.,', 'parser.y', 290)
1855
+ def _reduce_89(val, _values, result)
1817
1856
  result = val[1] ? val[1].unshift(val[0]) : val
1818
1857
  result
1819
1858
  end
1820
1859
  .,.,
1821
1860
 
1822
- module_eval(<<'.,.,', 'parser.y', 274)
1823
- def _reduce_86(val, _values, result)
1861
+ module_eval(<<'.,.,', 'parser.y', 285)
1862
+ def _reduce_90(val, _values, result)
1824
1863
  result = [{tag: nil, tokens: val[0]}]
1825
1864
  result
1826
1865
  end
1827
1866
  .,.,
1828
1867
 
1829
- module_eval(<<'.,.,', 'parser.y', 275)
1830
- def _reduce_87(val, _values, result)
1868
+ module_eval(<<'.,.,', 'parser.y', 286)
1869
+ def _reduce_91(val, _values, result)
1831
1870
  result = [{tag: val[0], tokens: val[1]}]
1832
1871
  result
1833
1872
  end
1834
1873
  .,.,
1835
1874
 
1836
- module_eval(<<'.,.,', 'parser.y', 276)
1837
- def _reduce_88(val, _values, result)
1875
+ module_eval(<<'.,.,', 'parser.y', 287)
1876
+ def _reduce_92(val, _values, result)
1838
1877
  result = val[0].append({tag: val[1], tokens: val[2]})
1839
1878
  result
1840
1879
  end
1841
1880
  .,.,
1842
1881
 
1843
- module_eval(<<'.,.,', 'parser.y', 278)
1844
- def _reduce_89(val, _values, result)
1882
+ module_eval(<<'.,.,', 'parser.y', 289)
1883
+ def _reduce_93(val, _values, result)
1845
1884
  on_action_error("ident after %prec", val[0]) if @prec_seen
1846
1885
  result
1847
1886
  end
1848
1887
  .,.,
1849
1888
 
1850
- module_eval(<<'.,.,', 'parser.y', 279)
1851
- def _reduce_90(val, _values, result)
1889
+ module_eval(<<'.,.,', 'parser.y', 290)
1890
+ def _reduce_94(val, _values, result)
1852
1891
  on_action_error("char after %prec", val[0]) if @prec_seen
1853
1892
  result
1854
1893
  end
1855
1894
  .,.,
1856
1895
 
1857
- # reduce 91 omitted
1896
+ # reduce 95 omitted
1858
1897
 
1859
- # reduce 92 omitted
1898
+ # reduce 96 omitted
1860
1899
 
1861
- # reduce 93 omitted
1900
+ # reduce 97 omitted
1862
1901
 
1863
- # reduce 94 omitted
1902
+ # reduce 98 omitted
1864
1903
 
1865
- module_eval(<<'.,.,', 'parser.y', 287)
1866
- def _reduce_95(val, _values, result)
1904
+ module_eval(<<'.,.,', 'parser.y', 298)
1905
+ def _reduce_99(val, _values, result)
1867
1906
  lhs = val[0]
1868
1907
  lhs.alias_name = val[1]
1869
1908
  val[3].each do |builder|
@@ -1876,8 +1915,8 @@ module_eval(<<'.,.,', 'parser.y', 287)
1876
1915
  end
1877
1916
  .,.,
1878
1917
 
1879
- module_eval(<<'.,.,', 'parser.y', 298)
1880
- def _reduce_96(val, _values, result)
1918
+ module_eval(<<'.,.,', 'parser.y', 309)
1919
+ def _reduce_100(val, _values, result)
1881
1920
  builder = val[0]
1882
1921
  if !builder.line
1883
1922
  builder.line = @lexer.line - 1
@@ -1888,8 +1927,8 @@ module_eval(<<'.,.,', 'parser.y', 298)
1888
1927
  end
1889
1928
  .,.,
1890
1929
 
1891
- module_eval(<<'.,.,', 'parser.y', 306)
1892
- def _reduce_97(val, _values, result)
1930
+ module_eval(<<'.,.,', 'parser.y', 317)
1931
+ def _reduce_101(val, _values, result)
1893
1932
  builder = val[2]
1894
1933
  if !builder.line
1895
1934
  builder.line = @lexer.line - 1
@@ -1900,8 +1939,8 @@ module_eval(<<'.,.,', 'parser.y', 306)
1900
1939
  end
1901
1940
  .,.,
1902
1941
 
1903
- module_eval(<<'.,.,', 'parser.y', 315)
1904
- def _reduce_98(val, _values, result)
1942
+ module_eval(<<'.,.,', 'parser.y', 326)
1943
+ def _reduce_102(val, _values, result)
1905
1944
  reset_precs
1906
1945
  result = @grammar.create_rule_builder(@rule_counter, @midrule_action_counter)
1907
1946
 
@@ -1909,8 +1948,8 @@ module_eval(<<'.,.,', 'parser.y', 315)
1909
1948
  end
1910
1949
  .,.,
1911
1950
 
1912
- module_eval(<<'.,.,', 'parser.y', 320)
1913
- def _reduce_99(val, _values, result)
1951
+ module_eval(<<'.,.,', 'parser.y', 331)
1952
+ def _reduce_103(val, _values, result)
1914
1953
  token = val[1]
1915
1954
  token.alias_name = val[2]
1916
1955
  builder = val[0]
@@ -1921,8 +1960,8 @@ module_eval(<<'.,.,', 'parser.y', 320)
1921
1960
  end
1922
1961
  .,.,
1923
1962
 
1924
- module_eval(<<'.,.,', 'parser.y', 328)
1925
- def _reduce_100(val, _values, result)
1963
+ module_eval(<<'.,.,', 'parser.y', 339)
1964
+ def _reduce_104(val, _values, result)
1926
1965
  token = Lrama::Lexer::Token::InstantiateRule.new(s_value: val[2], alias_name: val[3], location: @lexer.location, args: [val[1]], lhs_tag: val[4])
1927
1966
  builder = val[0]
1928
1967
  builder.add_rhs(token)
@@ -1933,8 +1972,8 @@ module_eval(<<'.,.,', 'parser.y', 328)
1933
1972
  end
1934
1973
  .,.,
1935
1974
 
1936
- module_eval(<<'.,.,', 'parser.y', 336)
1937
- def _reduce_101(val, _values, result)
1975
+ module_eval(<<'.,.,', 'parser.y', 347)
1976
+ def _reduce_105(val, _values, result)
1938
1977
  token = Lrama::Lexer::Token::InstantiateRule.new(s_value: val[1].s_value, alias_name: val[5], location: @lexer.location, args: val[3], lhs_tag: val[6])
1939
1978
  builder = val[0]
1940
1979
  builder.add_rhs(token)
@@ -1945,8 +1984,8 @@ module_eval(<<'.,.,', 'parser.y', 336)
1945
1984
  end
1946
1985
  .,.,
1947
1986
 
1948
- module_eval(<<'.,.,', 'parser.y', 344)
1949
- def _reduce_102(val, _values, result)
1987
+ module_eval(<<'.,.,', 'parser.y', 355)
1988
+ def _reduce_106(val, _values, result)
1950
1989
  user_code = val[1]
1951
1990
  user_code.alias_name = val[2]
1952
1991
  user_code.tag = val[3]
@@ -1958,8 +1997,8 @@ module_eval(<<'.,.,', 'parser.y', 344)
1958
1997
  end
1959
1998
  .,.,
1960
1999
 
1961
- module_eval(<<'.,.,', 'parser.y', 353)
1962
- def _reduce_103(val, _values, result)
2000
+ module_eval(<<'.,.,', 'parser.y', 364)
2001
+ def _reduce_107(val, _values, result)
1963
2002
  sym = @grammar.find_symbol_by_id!(val[2])
1964
2003
  @prec_seen = true
1965
2004
  builder = val[0]
@@ -1970,57 +2009,59 @@ module_eval(<<'.,.,', 'parser.y', 353)
1970
2009
  end
1971
2010
  .,.,
1972
2011
 
1973
- module_eval(<<'.,.,', 'parser.y', 360)
1974
- def _reduce_104(val, _values, result)
2012
+ module_eval(<<'.,.,', 'parser.y', 371)
2013
+ def _reduce_108(val, _values, result)
1975
2014
  result = "option"
1976
2015
  result
1977
2016
  end
1978
2017
  .,.,
1979
2018
 
1980
- module_eval(<<'.,.,', 'parser.y', 361)
1981
- def _reduce_105(val, _values, result)
2019
+ module_eval(<<'.,.,', 'parser.y', 372)
2020
+ def _reduce_109(val, _values, result)
1982
2021
  result = "nonempty_list"
1983
2022
  result
1984
2023
  end
1985
2024
  .,.,
1986
2025
 
1987
- module_eval(<<'.,.,', 'parser.y', 362)
1988
- def _reduce_106(val, _values, result)
2026
+ module_eval(<<'.,.,', 'parser.y', 373)
2027
+ def _reduce_110(val, _values, result)
1989
2028
  result = "list"
1990
2029
  result
1991
2030
  end
1992
2031
  .,.,
1993
2032
 
1994
- module_eval(<<'.,.,', 'parser.y', 364)
1995
- def _reduce_107(val, _values, result)
1996
- result = [val[0]]
1997
- result
1998
- end
1999
- .,.,
2033
+ # reduce 111 omitted
2034
+
2035
+ # reduce 112 omitted
2036
+
2037
+ module_eval(<<'.,.,', 'parser.y', 377)
2038
+ def _reduce_113(val, _values, result)
2039
+ result = if val[1]
2040
+ [Lrama::Lexer::Token::InstantiateRule.new(s_value: val[1].s_value, location: @lexer.location, args: val[0])]
2041
+ else
2042
+ [val[0]]
2043
+ end
2000
2044
 
2001
- module_eval(<<'.,.,', 'parser.y', 365)
2002
- def _reduce_108(val, _values, result)
2003
- result = val[0].append(val[2])
2004
2045
  result
2005
2046
  end
2006
2047
  .,.,
2007
2048
 
2008
- module_eval(<<'.,.,', 'parser.y', 366)
2009
- def _reduce_109(val, _values, result)
2010
- result = [Lrama::Lexer::Token::InstantiateRule.new(s_value: val[1].s_value, location: @lexer.location, args: val[0])]
2049
+ module_eval(<<'.,.,', 'parser.y', 383)
2050
+ def _reduce_114(val, _values, result)
2051
+ result = val[0].append(val[2])
2011
2052
  result
2012
2053
  end
2013
2054
  .,.,
2014
2055
 
2015
- module_eval(<<'.,.,', 'parser.y', 367)
2016
- def _reduce_110(val, _values, result)
2056
+ module_eval(<<'.,.,', 'parser.y', 384)
2057
+ def _reduce_115(val, _values, result)
2017
2058
  result = [Lrama::Lexer::Token::InstantiateRule.new(s_value: val[0].s_value, location: @lexer.location, args: val[2])]
2018
2059
  result
2019
2060
  end
2020
2061
  .,.,
2021
2062
 
2022
- module_eval(<<'.,.,', 'parser.y', 371)
2023
- def _reduce_111(val, _values, result)
2063
+ module_eval(<<'.,.,', 'parser.y', 388)
2064
+ def _reduce_116(val, _values, result)
2024
2065
  if @prec_seen
2025
2066
  on_action_error("multiple User_code after %prec", val[0]) if @code_after_prec
2026
2067
  @code_after_prec = true
@@ -2031,31 +2072,31 @@ module_eval(<<'.,.,', 'parser.y', 371)
2031
2072
  end
2032
2073
  .,.,
2033
2074
 
2034
- module_eval(<<'.,.,', 'parser.y', 379)
2035
- def _reduce_112(val, _values, result)
2075
+ module_eval(<<'.,.,', 'parser.y', 396)
2076
+ def _reduce_117(val, _values, result)
2036
2077
  end_c_declaration
2037
2078
 
2038
2079
  result
2039
2080
  end
2040
2081
  .,.,
2041
2082
 
2042
- module_eval(<<'.,.,', 'parser.y', 383)
2043
- def _reduce_113(val, _values, result)
2083
+ module_eval(<<'.,.,', 'parser.y', 400)
2084
+ def _reduce_118(val, _values, result)
2044
2085
  result = val[2]
2045
2086
 
2046
2087
  result
2047
2088
  end
2048
2089
  .,.,
2049
2090
 
2050
- module_eval(<<'.,.,', 'parser.y', 386)
2051
- def _reduce_114(val, _values, result)
2091
+ module_eval(<<'.,.,', 'parser.y', 403)
2092
+ def _reduce_119(val, _values, result)
2052
2093
  result = val[1].s_value
2053
2094
  result
2054
2095
  end
2055
2096
  .,.,
2056
2097
 
2057
- module_eval(<<'.,.,', 'parser.y', 390)
2058
- def _reduce_115(val, _values, result)
2098
+ module_eval(<<'.,.,', 'parser.y', 407)
2099
+ def _reduce_120(val, _values, result)
2059
2100
  begin_c_declaration('\Z')
2060
2101
  @grammar.epilogue_first_lineno = @lexer.line + 1
2061
2102
 
@@ -2063,8 +2104,8 @@ module_eval(<<'.,.,', 'parser.y', 390)
2063
2104
  end
2064
2105
  .,.,
2065
2106
 
2066
- module_eval(<<'.,.,', 'parser.y', 395)
2067
- def _reduce_116(val, _values, result)
2107
+ module_eval(<<'.,.,', 'parser.y', 412)
2108
+ def _reduce_121(val, _values, result)
2068
2109
  end_c_declaration
2069
2110
  @grammar.epilogue = val[2].s_value
2070
2111
 
@@ -2072,16 +2113,6 @@ module_eval(<<'.,.,', 'parser.y', 395)
2072
2113
  end
2073
2114
  .,.,
2074
2115
 
2075
- # reduce 117 omitted
2076
-
2077
- # reduce 118 omitted
2078
-
2079
- # reduce 119 omitted
2080
-
2081
- # reduce 120 omitted
2082
-
2083
- # reduce 121 omitted
2084
-
2085
2116
  # reduce 122 omitted
2086
2117
 
2087
2118
  # reduce 123 omitted
@@ -2090,8 +2121,10 @@ module_eval(<<'.,.,', 'parser.y', 395)
2090
2121
 
2091
2122
  # reduce 125 omitted
2092
2123
 
2093
- module_eval(<<'.,.,', 'parser.y', 412)
2094
- def _reduce_126(val, _values, result)
2124
+ # reduce 126 omitted
2125
+
2126
+ module_eval(<<'.,.,', 'parser.y', 423)
2127
+ def _reduce_127(val, _values, result)
2095
2128
  result = Lrama::Lexer::Token::Ident.new(s_value: val[0])
2096
2129
  result
2097
2130
  end