lrama 0.5.11 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/test.yaml +2 -2
- data/Gemfile +1 -1
- data/LEGAL.md +1 -0
- data/NEWS.md +187 -0
- data/README.md +15 -4
- data/Steepfile +3 -0
- data/lib/lrama/grammar/code/printer_code.rb +1 -1
- data/lib/lrama/grammar/code/rule_action.rb +19 -3
- data/lib/lrama/grammar/code.rb +19 -7
- data/lib/lrama/grammar/parameterizing_rule.rb +6 -0
- data/lib/lrama/grammar/parameterizing_rule_builder.rb +34 -0
- data/lib/lrama/grammar/parameterizing_rule_resolver.rb +30 -0
- data/lib/lrama/grammar/parameterizing_rule_rhs_builder.rb +53 -0
- data/lib/lrama/grammar/rule_builder.rb +26 -22
- data/lib/lrama/grammar.rb +15 -41
- data/lib/lrama/lexer/grammar_file.rb +21 -0
- data/lib/lrama/lexer/location.rb +77 -2
- data/lib/lrama/lexer/token/instantiate_rule.rb +18 -0
- data/lib/lrama/lexer/token/user_code.rb +10 -10
- data/lib/lrama/lexer/token.rb +1 -1
- data/lib/lrama/lexer.rb +21 -11
- data/lib/lrama/parser.rb +619 -454
- data/lib/lrama/states_reporter.rb +1 -1
- data/lib/lrama/version.rb +1 -1
- data/parser.y +95 -30
- data/sig/lrama/grammar/code/printer_code.rbs +1 -1
- data/sig/lrama/grammar/code.rbs +5 -5
- data/sig/lrama/grammar/parameterizing_rule.rbs +10 -0
- data/sig/lrama/grammar/parameterizing_rule_builder.rbs +19 -0
- data/sig/lrama/grammar/parameterizing_rule_resolver.rbs +16 -0
- data/sig/lrama/grammar/parameterizing_rule_rhs_builder.rbs +18 -0
- data/sig/lrama/grammar/parameterizing_rules/builder/base.rbs +5 -3
- data/sig/lrama/grammar/parameterizing_rules/builder/separated_list.rbs +2 -0
- data/sig/lrama/grammar/parameterizing_rules/builder/separated_nonempty_list.rbs +2 -0
- data/sig/lrama/grammar/parameterizing_rules/builder.rbs +4 -3
- data/sig/lrama/grammar/rule_builder.rbs +2 -4
- data/sig/lrama/lexer/grammar_file.rbs +15 -0
- data/sig/lrama/lexer/location.rbs +13 -1
- data/sig/lrama/lexer/token/instantiate_rule.rbs +12 -0
- metadata +16 -6
- data/doc/TODO.md +0 -59
- data/lib/lrama/lexer/token/parameterizing.rb +0 -34
- data/sig/lrama/lexer/token/parameterizing.rbs +0 -17
data/lib/lrama/parser.rb
CHANGED
@@ -658,13 +658,12 @@ end
|
|
658
658
|
module Lrama
|
659
659
|
class Parser < Racc::Parser
|
660
660
|
|
661
|
-
module_eval(<<'...end parser.y/module_eval...', 'parser.y',
|
661
|
+
module_eval(<<'...end parser.y/module_eval...', 'parser.y', 500)
|
662
662
|
|
663
663
|
include Lrama::Report::Duration
|
664
664
|
|
665
665
|
def initialize(text, path, debug = false)
|
666
|
-
@
|
667
|
-
@path = path
|
666
|
+
@grammar_file = Lrama::Lexer::GrammarFile.new(path, text)
|
668
667
|
@yydebug = debug
|
669
668
|
@rule_counter = Lrama::Grammar::Counter.new(0)
|
670
669
|
@midrule_action_counter = Lrama::Grammar::Counter.new(1)
|
@@ -672,7 +671,7 @@ end
|
|
672
671
|
|
673
672
|
def parse
|
674
673
|
report_duration(:parse) do
|
675
|
-
@lexer = Lrama::Lexer.new(@
|
674
|
+
@lexer = Lrama::Lexer.new(@grammar_file)
|
676
675
|
@grammar = Lrama::Grammar.new(@rule_counter)
|
677
676
|
@precedence_number = 0
|
678
677
|
reset_precs
|
@@ -689,40 +688,26 @@ end
|
|
689
688
|
|
690
689
|
def on_error(error_token_id, error_value, value_stack)
|
691
690
|
if error_value.is_a?(Lrama::Lexer::Token)
|
692
|
-
|
693
|
-
first_column = error_value.first_column
|
694
|
-
last_column = error_value.last_column
|
691
|
+
location = error_value.location
|
695
692
|
value = "'#{error_value.s_value}'"
|
696
693
|
else
|
697
|
-
|
698
|
-
first_column = @lexer.head_column
|
699
|
-
last_column = @lexer.column
|
694
|
+
location = @lexer.location
|
700
695
|
value = error_value.inspect
|
701
696
|
end
|
702
697
|
|
703
|
-
|
704
|
-
|
705
|
-
|
706
|
-
#{carrets(first_column, last_column)}
|
707
|
-
ERROR
|
698
|
+
error_message = "parse error on value #{value} (#{token_to_str(error_token_id) || '?'})"
|
699
|
+
|
700
|
+
raise_parse_error(error_message, location)
|
708
701
|
end
|
709
702
|
|
710
703
|
def on_action_error(error_message, error_value)
|
711
704
|
if error_value.is_a?(Lrama::Lexer::Token)
|
712
|
-
|
713
|
-
first_column = error_value.first_column
|
714
|
-
last_column = error_value.last_column
|
705
|
+
location = error_value.location
|
715
706
|
else
|
716
|
-
|
717
|
-
first_column = @lexer.head_column
|
718
|
-
last_column = @lexer.column
|
707
|
+
location = @lexer.location
|
719
708
|
end
|
720
709
|
|
721
|
-
|
722
|
-
#{@path}:#{line}: #{error_message}
|
723
|
-
#{@text.split("\n")[line - 1]}
|
724
|
-
#{carrets(first_column, last_column)}
|
725
|
-
ERROR
|
710
|
+
raise_parse_error(error_message, location)
|
726
711
|
end
|
727
712
|
|
728
713
|
private
|
@@ -742,268 +727,303 @@ def end_c_declaration
|
|
742
727
|
@lexer.end_symbol = nil
|
743
728
|
end
|
744
729
|
|
745
|
-
def
|
746
|
-
|
730
|
+
def raise_parse_error(error_message, location)
|
731
|
+
raise ParseError, location.generate_error_message(error_message)
|
747
732
|
end
|
748
733
|
...end parser.y/module_eval...
|
749
734
|
##### State transition tables begin ###
|
750
735
|
|
751
736
|
racc_action_table = [
|
752
|
-
|
753
|
-
|
754
|
-
|
755
|
-
|
756
|
-
|
757
|
-
|
758
|
-
|
759
|
-
|
760
|
-
|
761
|
-
|
762
|
-
|
763
|
-
|
764
|
-
|
765
|
-
|
766
|
-
|
767
|
-
|
768
|
-
|
769
|
-
|
770
|
-
|
771
|
-
|
772
|
-
|
773
|
-
|
737
|
+
85, 44, 86, 145, 144, 67, 44, 44, 145, 187,
|
738
|
+
67, 67, 44, 6, 187, 7, 67, 147, 196, 44,
|
739
|
+
143, 43, 147, 188, 58, 163, 164, 165, 188, 3,
|
740
|
+
44, 40, 43, 8, 67, 63, 34, 44, 148, 43,
|
741
|
+
41, 87, 40, 148, 189, 47, 44, 80, 43, 189,
|
742
|
+
21, 23, 24, 25, 26, 27, 28, 29, 30, 31,
|
743
|
+
47, 21, 23, 24, 25, 26, 27, 28, 29, 30,
|
744
|
+
31, 9, 44, 47, 43, 13, 14, 15, 16, 17,
|
745
|
+
18, 50, 51, 19, 20, 21, 23, 24, 25, 26,
|
746
|
+
27, 28, 29, 30, 31, 32, 44, 44, 43, 43,
|
747
|
+
52, 70, 70, 44, 44, 43, 43, 53, 70, 70,
|
748
|
+
44, 44, 43, 43, 67, 173, 44, 44, 43, 43,
|
749
|
+
67, 173, 44, 44, 43, 43, 67, 173, 44, 44,
|
750
|
+
43, 43, 67, 173, 44, 44, 43, 43, 67, 173,
|
751
|
+
44, 44, 43, 43, 67, 173, 44, 44, 43, 43,
|
752
|
+
67, 67, 44, 44, 43, 43, 67, 67, 44, 44,
|
753
|
+
43, 43, 67, 67, 44, 44, 43, 43, 67, 67,
|
754
|
+
44, 44, 43, 43, 67, 67, 163, 164, 165, 83,
|
755
|
+
44, 44, 43, 43, 141, 190, 142, 191, 205, 54,
|
756
|
+
191, 55, 76, 77, 81, 83, 88, 88, 88, 90,
|
757
|
+
96, 100, 101, 104, 104, 104, 104, 107, 110, 111,
|
758
|
+
113, 115, 116, 117, 118, 119, 122, 126, 127, 128,
|
759
|
+
131, 132, 133, 135, 150, 152, 153, 154, 155, 156,
|
760
|
+
157, 158, 131, 160, 168, 169, 178, 182, 183, 185,
|
761
|
+
178, 83, 182, 201, 203, 83, 207, 83 ]
|
774
762
|
|
775
763
|
racc_action_check = [
|
776
|
-
|
777
|
-
|
778
|
-
|
779
|
-
|
780
|
-
|
781
|
-
|
782
|
-
|
783
|
-
|
784
|
-
4,
|
785
|
-
|
786
|
-
|
787
|
-
|
788
|
-
|
789
|
-
|
790
|
-
|
791
|
-
|
792
|
-
|
793
|
-
|
794
|
-
|
795
|
-
|
796
|
-
|
797
|
-
|
764
|
+
42, 130, 42, 130, 129, 130, 159, 177, 159, 177,
|
765
|
+
159, 177, 193, 2, 193, 2, 193, 130, 187, 26,
|
766
|
+
129, 26, 159, 177, 26, 187, 187, 187, 193, 1,
|
767
|
+
27, 9, 27, 3, 27, 27, 7, 14, 130, 14,
|
768
|
+
13, 42, 35, 159, 177, 15, 57, 35, 57, 193,
|
769
|
+
9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
|
770
|
+
16, 35, 35, 35, 35, 35, 35, 35, 35, 35,
|
771
|
+
35, 4, 58, 17, 58, 4, 4, 4, 4, 4,
|
772
|
+
4, 18, 19, 4, 4, 4, 4, 4, 4, 4,
|
773
|
+
4, 4, 4, 4, 4, 4, 28, 29, 28, 29,
|
774
|
+
21, 28, 29, 30, 31, 30, 31, 23, 30, 31,
|
775
|
+
154, 69, 154, 69, 154, 154, 155, 70, 155, 70,
|
776
|
+
155, 155, 156, 96, 156, 96, 156, 156, 170, 98,
|
777
|
+
170, 98, 170, 170, 174, 104, 174, 104, 174, 174,
|
778
|
+
175, 106, 175, 106, 175, 175, 62, 63, 62, 63,
|
779
|
+
62, 63, 101, 103, 101, 103, 101, 103, 123, 148,
|
780
|
+
123, 148, 123, 148, 160, 189, 160, 189, 160, 189,
|
781
|
+
191, 196, 191, 196, 191, 196, 146, 146, 146, 146,
|
782
|
+
120, 124, 120, 124, 125, 179, 125, 179, 202, 24,
|
783
|
+
202, 25, 32, 33, 38, 39, 46, 48, 49, 50,
|
784
|
+
56, 60, 61, 68, 73, 74, 75, 76, 82, 83,
|
785
|
+
89, 91, 92, 93, 94, 95, 99, 107, 108, 109,
|
786
|
+
110, 111, 112, 114, 134, 136, 137, 138, 139, 140,
|
787
|
+
141, 142, 143, 145, 149, 151, 157, 162, 166, 176,
|
788
|
+
185, 186, 190, 192, 197, 201, 206, 207 ]
|
798
789
|
|
799
790
|
racc_action_pointer = [
|
800
|
-
nil,
|
801
|
-
nil, nil,
|
802
|
-
|
803
|
-
|
804
|
-
-5, nil, nil, nil,
|
805
|
-
nil, nil, nil, nil,
|
806
|
-
|
807
|
-
nil,
|
808
|
-
|
809
|
-
|
810
|
-
|
811
|
-
|
812
|
-
|
813
|
-
|
814
|
-
|
815
|
-
|
816
|
-
|
817
|
-
nil, nil,
|
791
|
+
nil, 29, 3, 33, 62, nil, nil, 29, nil, 27,
|
792
|
+
nil, nil, nil, 34, 34, 26, 41, 54, 76, 63,
|
793
|
+
nil, 81, nil, 88, 170, 172, 16, 27, 93, 94,
|
794
|
+
100, 101, 187, 191, nil, 38, nil, nil, 172, 151,
|
795
|
+
nil, nil, -5, nil, nil, nil, 177, nil, 178, 179,
|
796
|
+
180, nil, nil, nil, nil, nil, 192, 43, 69, nil,
|
797
|
+
195, 194, 143, 144, nil, nil, nil, nil, 195, 108,
|
798
|
+
114, nil, nil, 196, 197, 198, 173, nil, nil, nil,
|
799
|
+
nil, nil, 172, 204, nil, nil, nil, nil, nil, 208,
|
800
|
+
nil, 209, 210, 211, 212, 213, 120, nil, 126, 209,
|
801
|
+
nil, 149, nil, 150, 132, nil, 138, 212, 207, 217,
|
802
|
+
181, 176, 220, nil, 221, nil, nil, nil, nil, nil,
|
803
|
+
177, nil, nil, 155, 178, 149, nil, nil, nil, -18,
|
804
|
+
-2, nil, nil, nil, 204, nil, 205, 206, 207, 208,
|
805
|
+
209, 194, 226, 193, nil, 199, 135, nil, 156, 214,
|
806
|
+
nil, 215, nil, nil, 107, 113, 119, 197, nil, 3,
|
807
|
+
161, nil, 229, nil, nil, nil, 236, nil, nil, nil,
|
808
|
+
125, nil, nil, nil, 131, 137, 201, 4, nil, 150,
|
809
|
+
nil, nil, nil, nil, nil, 201, 197, -16, nil, 162,
|
810
|
+
234, 167, 223, 9, nil, nil, 168, 242, nil, nil,
|
811
|
+
nil, 201, 153, nil, nil, nil, 226, 203, nil ]
|
818
812
|
|
819
813
|
racc_action_default = [
|
820
|
-
-2, -
|
821
|
-
-9, -10,
|
822
|
-
-
|
823
|
-
-
|
824
|
-
-
|
825
|
-
|
826
|
-
-
|
827
|
-
-
|
828
|
-
-
|
829
|
-
-
|
830
|
-
-
|
831
|
-
|
832
|
-
-
|
833
|
-
|
834
|
-
-
|
835
|
-
|
836
|
-
-
|
837
|
-
-
|
814
|
+
-2, -128, -8, -128, -128, -3, -4, -128, 209, -128,
|
815
|
+
-9, -10, -11, -128, -128, -128, -128, -128, -128, -128,
|
816
|
+
-23, -128, -27, -128, -128, -128, -128, -128, -128, -128,
|
817
|
+
-128, -128, -128, -128, -7, -113, -88, -90, -128, -110,
|
818
|
+
-112, -12, -117, -86, -87, -116, -14, -77, -15, -16,
|
819
|
+
-128, -20, -24, -28, -31, -34, -37, -43, -128, -46,
|
820
|
+
-63, -38, -67, -128, -70, -72, -73, -125, -39, -80,
|
821
|
+
-128, -83, -85, -40, -41, -42, -128, -5, -1, -89,
|
822
|
+
-114, -91, -128, -128, -13, -118, -119, -120, -74, -128,
|
823
|
+
-17, -128, -128, -128, -128, -128, -128, -47, -44, -65,
|
824
|
+
-64, -128, -71, -68, -128, -84, -81, -128, -128, -128,
|
825
|
+
-96, -128, -128, -78, -128, -21, -25, -29, -32, -35,
|
826
|
+
-45, -48, -66, -69, -82, -128, -50, -6, -115, -92,
|
827
|
+
-93, -97, -111, -75, -128, -18, -128, -128, -128, -128,
|
828
|
+
-128, -128, -128, -96, -95, -86, -110, -101, -128, -128,
|
829
|
+
-79, -128, -22, -26, -128, -128, -128, -54, -51, -94,
|
830
|
+
-128, -98, -126, -105, -106, -107, -128, -104, -76, -19,
|
831
|
+
-30, -121, -123, -124, -33, -36, -49, -52, -55, -128,
|
832
|
+
-108, -99, -127, -102, -122, -54, -110, -86, -59, -128,
|
833
|
+
-126, -128, -128, -53, -56, -57, -128, -128, -62, -100,
|
834
|
+
-109, -110, -128, -60, -103, -58, -128, -110, -61 ]
|
838
835
|
|
839
836
|
racc_goto_table = [
|
840
|
-
|
841
|
-
|
842
|
-
|
843
|
-
|
844
|
-
|
845
|
-
|
846
|
-
|
847
|
-
|
848
|
-
|
849
|
-
|
850
|
-
nil, nil,
|
851
|
-
nil,
|
852
|
-
nil,
|
837
|
+
64, 45, 57, 62, 105, 82, 97, 162, 106, 177,
|
838
|
+
179, 1, 181, 60, 2, 72, 72, 72, 72, 130,
|
839
|
+
184, 4, 35, 36, 184, 184, 68, 73, 74, 75,
|
840
|
+
46, 48, 49, 78, 98, 102, 64, 193, 5, 103,
|
841
|
+
199, 105, 124, 33, 60, 60, 202, 97, 195, 79,
|
842
|
+
108, 10, 159, 170, 174, 175, 72, 72, 11, 105,
|
843
|
+
12, 42, 84, 114, 151, 91, 136, 92, 137, 97,
|
844
|
+
93, 138, 120, 94, 64, 139, 102, 123, 95, 140,
|
845
|
+
56, 61, 99, 60, 121, 60, 125, 176, 197, 206,
|
846
|
+
112, 72, 149, 72, 89, 134, 102, 129, 166, 192,
|
847
|
+
109, nil, nil, 146, nil, nil, nil, 60, nil, nil,
|
848
|
+
nil, 72, 161, nil, nil, nil, nil, nil, nil, nil,
|
849
|
+
nil, 167, nil, nil, nil, nil, nil, nil, nil, nil,
|
850
|
+
nil, nil, 146, 180, nil, nil, nil, nil, nil, nil,
|
853
851
|
nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
|
854
|
-
nil,
|
852
|
+
186, nil, 194, nil, nil, nil, nil, nil, nil, nil,
|
853
|
+
nil, nil, 198, nil, 200, nil, 186, 204, nil, 180,
|
854
|
+
nil, nil, nil, 208 ]
|
855
855
|
|
856
856
|
racc_goto_check = [
|
857
|
-
|
858
|
-
|
859
|
-
|
860
|
-
|
861
|
-
|
862
|
-
|
863
|
-
|
864
|
-
|
865
|
-
|
866
|
-
|
867
|
-
nil, nil,
|
868
|
-
nil,
|
869
|
-
nil, nil, nil,
|
857
|
+
40, 34, 32, 46, 53, 41, 33, 42, 52, 39,
|
858
|
+
43, 1, 59, 34, 2, 34, 34, 34, 34, 58,
|
859
|
+
63, 3, 4, 54, 63, 63, 31, 31, 31, 31,
|
860
|
+
14, 14, 14, 5, 32, 40, 40, 39, 6, 46,
|
861
|
+
59, 53, 52, 7, 34, 34, 43, 33, 42, 54,
|
862
|
+
8, 9, 58, 20, 20, 20, 34, 34, 10, 53,
|
863
|
+
11, 12, 13, 15, 16, 17, 18, 21, 22, 33,
|
864
|
+
23, 24, 32, 25, 40, 26, 40, 46, 27, 28,
|
865
|
+
29, 30, 35, 34, 36, 34, 37, 38, 44, 45,
|
866
|
+
48, 34, 49, 34, 50, 51, 40, 57, 60, 61,
|
867
|
+
62, nil, nil, 40, nil, nil, nil, 34, nil, nil,
|
868
|
+
nil, 34, 41, nil, nil, nil, nil, nil, nil, nil,
|
869
|
+
nil, 40, nil, nil, nil, nil, nil, nil, nil, nil,
|
870
|
+
nil, nil, 40, 40, nil, nil, nil, nil, nil, nil,
|
870
871
|
nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
|
871
|
-
nil,
|
872
|
+
40, nil, 41, nil, nil, nil, nil, nil, nil, nil,
|
873
|
+
nil, nil, 40, nil, 40, nil, 40, 41, nil, 40,
|
874
|
+
nil, nil, nil, 41 ]
|
872
875
|
|
873
876
|
racc_goto_pointer = [
|
874
|
-
nil,
|
875
|
-
|
876
|
-
|
877
|
-
-
|
878
|
-
-
|
879
|
-
-
|
877
|
+
nil, 11, 14, 19, 13, -2, 36, 37, -27, 47,
|
878
|
+
54, 56, 47, 20, 15, -27, -71, 14, -49, nil,
|
879
|
+
-101, 15, -48, 17, -46, 19, -43, 23, -40, 54,
|
880
|
+
54, -2, -24, -51, -13, 22, -15, -21, -70, -148,
|
881
|
+
-27, -34, -139, -150, -100, -114, -24, nil, 2, -41,
|
882
|
+
47, -18, -62, -65, 14, nil, nil, -13, -91, -150,
|
883
|
+
-49, -84, 20, -150 ]
|
880
884
|
|
881
885
|
racc_goto_default = [
|
882
886
|
nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
|
883
|
-
|
887
|
+
38, nil, nil, nil, nil, nil, nil, nil, nil, 22,
|
884
888
|
nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
|
885
|
-
nil, nil,
|
886
|
-
nil, nil, nil,
|
887
|
-
nil, nil,
|
889
|
+
nil, nil, nil, 59, 65, nil, nil, nil, nil, nil,
|
890
|
+
172, nil, nil, nil, nil, nil, nil, 66, nil, nil,
|
891
|
+
nil, nil, 69, 71, nil, 37, 39, nil, nil, nil,
|
892
|
+
nil, nil, nil, 171 ]
|
888
893
|
|
889
894
|
racc_reduce_table = [
|
890
895
|
0, 0, :racc_error,
|
891
|
-
5,
|
892
|
-
0,
|
893
|
-
2, 48, :_reduce_none,
|
894
|
-
0, 53, :_reduce_4,
|
895
|
-
0, 54, :_reduce_5,
|
896
|
-
5, 52, :_reduce_6,
|
897
|
-
2, 52, :_reduce_none,
|
898
|
-
0, 49, :_reduce_8,
|
896
|
+
5, 48, :_reduce_none,
|
897
|
+
0, 49, :_reduce_none,
|
899
898
|
2, 49, :_reduce_none,
|
900
|
-
|
901
|
-
|
902
|
-
|
903
|
-
2,
|
904
|
-
|
905
|
-
2, 55, :_reduce_15,
|
906
|
-
0, 60, :_reduce_16,
|
907
|
-
0, 61, :_reduce_17,
|
908
|
-
7, 55, :_reduce_18,
|
909
|
-
0, 62, :_reduce_19,
|
910
|
-
0, 63, :_reduce_20,
|
911
|
-
6, 55, :_reduce_21,
|
912
|
-
1, 55, :_reduce_none,
|
913
|
-
0, 66, :_reduce_23,
|
914
|
-
0, 67, :_reduce_24,
|
915
|
-
6, 56, :_reduce_25,
|
916
|
-
1, 56, :_reduce_none,
|
917
|
-
0, 68, :_reduce_27,
|
918
|
-
0, 69, :_reduce_28,
|
919
|
-
7, 56, :_reduce_none,
|
920
|
-
0, 70, :_reduce_30,
|
921
|
-
0, 71, :_reduce_31,
|
922
|
-
7, 56, :_reduce_32,
|
923
|
-
0, 72, :_reduce_33,
|
924
|
-
0, 73, :_reduce_34,
|
925
|
-
7, 56, :_reduce_35,
|
926
|
-
2, 64, :_reduce_none,
|
927
|
-
2, 64, :_reduce_37,
|
928
|
-
2, 64, :_reduce_38,
|
929
|
-
2, 64, :_reduce_39,
|
930
|
-
2, 64, :_reduce_40,
|
931
|
-
2, 64, :_reduce_41,
|
932
|
-
1, 74, :_reduce_42,
|
933
|
-
2, 74, :_reduce_43,
|
934
|
-
3, 74, :_reduce_44,
|
935
|
-
1, 77, :_reduce_45,
|
936
|
-
2, 77, :_reduce_46,
|
937
|
-
3, 78, :_reduce_47,
|
938
|
-
0, 80, :_reduce_none,
|
939
|
-
1, 80, :_reduce_none,
|
940
|
-
0, 81, :_reduce_none,
|
941
|
-
1, 81, :_reduce_none,
|
942
|
-
1, 75, :_reduce_52,
|
943
|
-
2, 75, :_reduce_53,
|
944
|
-
3, 75, :_reduce_54,
|
945
|
-
1, 82, :_reduce_55,
|
946
|
-
2, 82, :_reduce_56,
|
947
|
-
1, 83, :_reduce_none,
|
948
|
-
1, 83, :_reduce_none,
|
949
|
-
0, 85, :_reduce_59,
|
950
|
-
0, 86, :_reduce_60,
|
951
|
-
6, 59, :_reduce_61,
|
952
|
-
0, 87, :_reduce_62,
|
953
|
-
0, 88, :_reduce_63,
|
954
|
-
5, 59, :_reduce_64,
|
955
|
-
1, 76, :_reduce_65,
|
956
|
-
2, 76, :_reduce_66,
|
957
|
-
3, 76, :_reduce_67,
|
958
|
-
1, 89, :_reduce_68,
|
959
|
-
2, 89, :_reduce_69,
|
960
|
-
1, 90, :_reduce_none,
|
961
|
-
1, 79, :_reduce_71,
|
962
|
-
1, 79, :_reduce_72,
|
963
|
-
1, 50, :_reduce_none,
|
899
|
+
0, 54, :_reduce_4,
|
900
|
+
0, 55, :_reduce_5,
|
901
|
+
5, 53, :_reduce_6,
|
902
|
+
2, 53, :_reduce_none,
|
903
|
+
0, 50, :_reduce_8,
|
964
904
|
2, 50, :_reduce_none,
|
965
|
-
1,
|
966
|
-
|
967
|
-
|
968
|
-
|
969
|
-
|
970
|
-
2,
|
971
|
-
|
972
|
-
|
973
|
-
|
974
|
-
|
975
|
-
|
976
|
-
0,
|
977
|
-
|
978
|
-
|
979
|
-
|
980
|
-
|
981
|
-
|
982
|
-
1, 97, :_reduce_none,
|
983
|
-
1, 99, :_reduce_93,
|
984
|
-
3, 99, :_reduce_94,
|
985
|
-
0, 94, :_reduce_none,
|
986
|
-
3, 94, :_reduce_96,
|
987
|
-
1, 93, :_reduce_none,
|
988
|
-
0, 51, :_reduce_none,
|
989
|
-
0, 102, :_reduce_99,
|
990
|
-
3, 51, :_reduce_100,
|
905
|
+
1, 56, :_reduce_none,
|
906
|
+
1, 56, :_reduce_none,
|
907
|
+
2, 56, :_reduce_12,
|
908
|
+
3, 56, :_reduce_none,
|
909
|
+
2, 56, :_reduce_none,
|
910
|
+
2, 56, :_reduce_15,
|
911
|
+
2, 56, :_reduce_16,
|
912
|
+
0, 62, :_reduce_17,
|
913
|
+
0, 63, :_reduce_18,
|
914
|
+
7, 56, :_reduce_19,
|
915
|
+
0, 64, :_reduce_20,
|
916
|
+
0, 65, :_reduce_21,
|
917
|
+
6, 56, :_reduce_22,
|
918
|
+
1, 56, :_reduce_none,
|
919
|
+
0, 68, :_reduce_24,
|
920
|
+
0, 69, :_reduce_25,
|
921
|
+
6, 57, :_reduce_26,
|
991
922
|
1, 57, :_reduce_none,
|
992
|
-
0,
|
993
|
-
|
994
|
-
|
995
|
-
|
996
|
-
|
997
|
-
|
998
|
-
|
923
|
+
0, 70, :_reduce_28,
|
924
|
+
0, 71, :_reduce_29,
|
925
|
+
7, 57, :_reduce_none,
|
926
|
+
0, 72, :_reduce_31,
|
927
|
+
0, 73, :_reduce_32,
|
928
|
+
7, 57, :_reduce_33,
|
929
|
+
0, 74, :_reduce_34,
|
930
|
+
0, 75, :_reduce_35,
|
931
|
+
7, 57, :_reduce_36,
|
932
|
+
2, 66, :_reduce_none,
|
933
|
+
2, 66, :_reduce_38,
|
934
|
+
2, 66, :_reduce_39,
|
935
|
+
2, 66, :_reduce_40,
|
936
|
+
2, 66, :_reduce_41,
|
937
|
+
2, 66, :_reduce_42,
|
938
|
+
1, 76, :_reduce_43,
|
939
|
+
2, 76, :_reduce_44,
|
940
|
+
3, 76, :_reduce_45,
|
941
|
+
1, 79, :_reduce_46,
|
942
|
+
2, 79, :_reduce_47,
|
943
|
+
3, 80, :_reduce_48,
|
944
|
+
7, 58, :_reduce_49,
|
945
|
+
1, 84, :_reduce_50,
|
946
|
+
3, 84, :_reduce_51,
|
947
|
+
1, 85, :_reduce_52,
|
948
|
+
3, 85, :_reduce_53,
|
949
|
+
0, 86, :_reduce_54,
|
950
|
+
1, 86, :_reduce_55,
|
951
|
+
3, 86, :_reduce_56,
|
952
|
+
3, 86, :_reduce_57,
|
953
|
+
5, 86, :_reduce_58,
|
954
|
+
0, 91, :_reduce_59,
|
955
|
+
0, 92, :_reduce_60,
|
956
|
+
7, 86, :_reduce_61,
|
957
|
+
3, 86, :_reduce_62,
|
958
|
+
0, 82, :_reduce_none,
|
959
|
+
1, 82, :_reduce_none,
|
960
|
+
0, 83, :_reduce_none,
|
961
|
+
1, 83, :_reduce_none,
|
962
|
+
1, 77, :_reduce_67,
|
963
|
+
2, 77, :_reduce_68,
|
964
|
+
3, 77, :_reduce_69,
|
965
|
+
1, 93, :_reduce_70,
|
966
|
+
2, 93, :_reduce_71,
|
967
|
+
1, 87, :_reduce_none,
|
968
|
+
1, 87, :_reduce_none,
|
969
|
+
0, 95, :_reduce_74,
|
970
|
+
0, 96, :_reduce_75,
|
971
|
+
6, 61, :_reduce_76,
|
972
|
+
0, 97, :_reduce_77,
|
973
|
+
0, 98, :_reduce_78,
|
974
|
+
5, 61, :_reduce_79,
|
975
|
+
1, 78, :_reduce_80,
|
976
|
+
2, 78, :_reduce_81,
|
977
|
+
3, 78, :_reduce_82,
|
978
|
+
1, 99, :_reduce_83,
|
979
|
+
2, 99, :_reduce_84,
|
980
|
+
1, 100, :_reduce_none,
|
981
|
+
1, 81, :_reduce_86,
|
982
|
+
1, 81, :_reduce_87,
|
983
|
+
1, 51, :_reduce_none,
|
984
|
+
2, 51, :_reduce_none,
|
985
|
+
1, 101, :_reduce_none,
|
986
|
+
2, 101, :_reduce_none,
|
987
|
+
4, 102, :_reduce_92,
|
988
|
+
1, 104, :_reduce_93,
|
989
|
+
3, 104, :_reduce_94,
|
990
|
+
2, 104, :_reduce_none,
|
991
|
+
0, 105, :_reduce_96,
|
992
|
+
1, 105, :_reduce_97,
|
993
|
+
3, 105, :_reduce_98,
|
994
|
+
4, 105, :_reduce_99,
|
995
|
+
6, 105, :_reduce_100,
|
996
|
+
0, 107, :_reduce_101,
|
997
|
+
0, 108, :_reduce_102,
|
998
|
+
7, 105, :_reduce_103,
|
999
|
+
3, 105, :_reduce_104,
|
1000
|
+
1, 89, :_reduce_none,
|
1001
|
+
1, 89, :_reduce_none,
|
1002
|
+
1, 89, :_reduce_none,
|
1003
|
+
1, 90, :_reduce_108,
|
1004
|
+
3, 90, :_reduce_109,
|
1005
|
+
0, 88, :_reduce_none,
|
1006
|
+
3, 88, :_reduce_111,
|
999
1007
|
1, 103, :_reduce_none,
|
1000
|
-
|
1001
|
-
0,
|
1002
|
-
|
1003
|
-
|
1004
|
-
|
1005
|
-
|
1006
|
-
|
1008
|
+
0, 52, :_reduce_none,
|
1009
|
+
0, 109, :_reduce_114,
|
1010
|
+
3, 52, :_reduce_115,
|
1011
|
+
1, 59, :_reduce_none,
|
1012
|
+
0, 60, :_reduce_none,
|
1013
|
+
1, 60, :_reduce_none,
|
1014
|
+
1, 60, :_reduce_none,
|
1015
|
+
1, 60, :_reduce_none,
|
1016
|
+
1, 67, :_reduce_121,
|
1017
|
+
2, 67, :_reduce_122,
|
1018
|
+
1, 110, :_reduce_none,
|
1019
|
+
1, 110, :_reduce_none,
|
1020
|
+
1, 94, :_reduce_125,
|
1021
|
+
0, 106, :_reduce_none,
|
1022
|
+
1, 106, :_reduce_none ]
|
1023
|
+
|
1024
|
+
racc_reduce_n = 128
|
1025
|
+
|
1026
|
+
racc_shift_n = 209
|
1007
1027
|
|
1008
1028
|
racc_token_table = {
|
1009
1029
|
false => 0,
|
@@ -1039,21 +1059,22 @@ racc_token_table = {
|
|
1039
1059
|
"%right" => 30,
|
1040
1060
|
"%precedence" => 31,
|
1041
1061
|
"%nonassoc" => 32,
|
1042
|
-
"
|
1043
|
-
"
|
1044
|
-
"
|
1045
|
-
"
|
1046
|
-
"
|
1047
|
-
"
|
1048
|
-
"
|
1049
|
-
"
|
1050
|
-
"
|
1051
|
-
"
|
1052
|
-
"
|
1053
|
-
"
|
1054
|
-
"
|
1055
|
-
|
1056
|
-
|
1062
|
+
"%rule" => 33,
|
1063
|
+
"(" => 34,
|
1064
|
+
")" => 35,
|
1065
|
+
":" => 36,
|
1066
|
+
"," => 37,
|
1067
|
+
"|" => 38,
|
1068
|
+
"%empty" => 39,
|
1069
|
+
"%prec" => 40,
|
1070
|
+
"?" => 41,
|
1071
|
+
"+" => 42,
|
1072
|
+
"*" => 43,
|
1073
|
+
"[" => 44,
|
1074
|
+
"]" => 45,
|
1075
|
+
"{...}" => 46 }
|
1076
|
+
|
1077
|
+
racc_nt_base = 47
|
1057
1078
|
|
1058
1079
|
racc_use_result_var = true
|
1059
1080
|
|
@@ -1108,16 +1129,17 @@ Racc_token_to_s_table = [
|
|
1108
1129
|
"\"%right\"",
|
1109
1130
|
"\"%precedence\"",
|
1110
1131
|
"\"%nonassoc\"",
|
1132
|
+
"\"%rule\"",
|
1133
|
+
"\"(\"",
|
1134
|
+
"\")\"",
|
1111
1135
|
"\":\"",
|
1136
|
+
"\",\"",
|
1112
1137
|
"\"|\"",
|
1113
1138
|
"\"%empty\"",
|
1114
|
-
"\"(\"",
|
1115
|
-
"\")\"",
|
1116
1139
|
"\"%prec\"",
|
1117
1140
|
"\"?\"",
|
1118
1141
|
"\"+\"",
|
1119
1142
|
"\"*\"",
|
1120
|
-
"\",\"",
|
1121
1143
|
"\"[\"",
|
1122
1144
|
"\"]\"",
|
1123
1145
|
"\"{...}\"",
|
@@ -1132,6 +1154,7 @@ Racc_token_to_s_table = [
|
|
1132
1154
|
"@2",
|
1133
1155
|
"bison_declaration",
|
1134
1156
|
"grammar_declaration",
|
1157
|
+
"rule_declaration",
|
1135
1158
|
"variable",
|
1136
1159
|
"value",
|
1137
1160
|
"params",
|
@@ -1157,27 +1180,32 @@ Racc_token_to_s_table = [
|
|
1157
1180
|
"id",
|
1158
1181
|
"int_opt",
|
1159
1182
|
"alias",
|
1160
|
-
"
|
1183
|
+
"rule_args",
|
1184
|
+
"rule_rhs_list",
|
1185
|
+
"rule_rhs",
|
1161
1186
|
"symbol",
|
1162
|
-
"
|
1187
|
+
"named_ref_opt",
|
1188
|
+
"parameterizing_suffix",
|
1189
|
+
"parameterizing_args",
|
1163
1190
|
"@15",
|
1164
1191
|
"@16",
|
1192
|
+
"symbol_declaration_list",
|
1193
|
+
"string_as_id",
|
1165
1194
|
"@17",
|
1166
1195
|
"@18",
|
1196
|
+
"@19",
|
1197
|
+
"@20",
|
1167
1198
|
"token_declaration_list_for_precedence",
|
1168
1199
|
"token_declaration_for_precedence",
|
1169
1200
|
"rules_or_grammar_declaration",
|
1170
1201
|
"rules",
|
1171
1202
|
"id_colon",
|
1172
|
-
"named_ref_opt",
|
1173
1203
|
"rhs_list",
|
1174
1204
|
"rhs",
|
1175
|
-
"parameterizing_suffix",
|
1176
1205
|
"tag_opt",
|
1177
|
-
"parameterizing_args",
|
1178
|
-
"@19",
|
1179
|
-
"@20",
|
1180
1206
|
"@21",
|
1207
|
+
"@22",
|
1208
|
+
"@23",
|
1181
1209
|
"generic_symlist_item" ]
|
1182
1210
|
Ractor.make_shareable(Racc_token_to_s_table) if defined?(Ractor)
|
1183
1211
|
|
@@ -1231,19 +1259,21 @@ module_eval(<<'.,.,', 'parser.y', 27)
|
|
1231
1259
|
|
1232
1260
|
# reduce 10 omitted
|
1233
1261
|
|
1234
|
-
|
1235
|
-
|
1262
|
+
# reduce 11 omitted
|
1263
|
+
|
1264
|
+
module_eval(<<'.,.,', 'parser.y', 32)
|
1265
|
+
def _reduce_12(val, _values, result)
|
1236
1266
|
@grammar.expect = val[1]
|
1237
1267
|
result
|
1238
1268
|
end
|
1239
1269
|
.,.,
|
1240
1270
|
|
1241
|
-
# reduce 12 omitted
|
1242
|
-
|
1243
1271
|
# reduce 13 omitted
|
1244
1272
|
|
1245
|
-
|
1246
|
-
|
1273
|
+
# reduce 14 omitted
|
1274
|
+
|
1275
|
+
module_eval(<<'.,.,', 'parser.y', 37)
|
1276
|
+
def _reduce_15(val, _values, result)
|
1247
1277
|
val[1].each {|token|
|
1248
1278
|
@grammar.lex_param = Grammar::Code::NoReferenceCode.new(type: :lex_param, token_code: token).token_code.s_value
|
1249
1279
|
}
|
@@ -1252,8 +1282,8 @@ module_eval(<<'.,.,', 'parser.y', 36)
|
|
1252
1282
|
end
|
1253
1283
|
.,.,
|
1254
1284
|
|
1255
|
-
module_eval(<<'.,.,', 'parser.y',
|
1256
|
-
def
|
1285
|
+
module_eval(<<'.,.,', 'parser.y', 43)
|
1286
|
+
def _reduce_16(val, _values, result)
|
1257
1287
|
val[1].each {|token|
|
1258
1288
|
@grammar.parse_param = Grammar::Code::NoReferenceCode.new(type: :parse_param, token_code: token).token_code.s_value
|
1259
1289
|
}
|
@@ -1262,74 +1292,74 @@ module_eval(<<'.,.,', 'parser.y', 42)
|
|
1262
1292
|
end
|
1263
1293
|
.,.,
|
1264
1294
|
|
1265
|
-
module_eval(<<'.,.,', 'parser.y',
|
1266
|
-
def
|
1295
|
+
module_eval(<<'.,.,', 'parser.y', 49)
|
1296
|
+
def _reduce_17(val, _values, result)
|
1267
1297
|
begin_c_declaration("}")
|
1268
1298
|
|
1269
1299
|
result
|
1270
1300
|
end
|
1271
1301
|
.,.,
|
1272
1302
|
|
1273
|
-
module_eval(<<'.,.,', 'parser.y',
|
1274
|
-
def
|
1303
|
+
module_eval(<<'.,.,', 'parser.y', 53)
|
1304
|
+
def _reduce_18(val, _values, result)
|
1275
1305
|
end_c_declaration
|
1276
1306
|
|
1277
1307
|
result
|
1278
1308
|
end
|
1279
1309
|
.,.,
|
1280
1310
|
|
1281
|
-
module_eval(<<'.,.,', 'parser.y',
|
1282
|
-
def
|
1311
|
+
module_eval(<<'.,.,', 'parser.y', 57)
|
1312
|
+
def _reduce_19(val, _values, result)
|
1283
1313
|
@grammar.add_percent_code(id: val[1], code: val[4])
|
1284
1314
|
|
1285
1315
|
result
|
1286
1316
|
end
|
1287
1317
|
.,.,
|
1288
1318
|
|
1289
|
-
module_eval(<<'.,.,', 'parser.y',
|
1290
|
-
def
|
1319
|
+
module_eval(<<'.,.,', 'parser.y', 61)
|
1320
|
+
def _reduce_20(val, _values, result)
|
1291
1321
|
begin_c_declaration("}")
|
1292
1322
|
|
1293
1323
|
result
|
1294
1324
|
end
|
1295
1325
|
.,.,
|
1296
1326
|
|
1297
|
-
module_eval(<<'.,.,', 'parser.y',
|
1298
|
-
def
|
1327
|
+
module_eval(<<'.,.,', 'parser.y', 65)
|
1328
|
+
def _reduce_21(val, _values, result)
|
1299
1329
|
end_c_declaration
|
1300
1330
|
|
1301
1331
|
result
|
1302
1332
|
end
|
1303
1333
|
.,.,
|
1304
1334
|
|
1305
|
-
module_eval(<<'.,.,', 'parser.y',
|
1306
|
-
def
|
1335
|
+
module_eval(<<'.,.,', 'parser.y', 69)
|
1336
|
+
def _reduce_22(val, _values, result)
|
1307
1337
|
@grammar.initial_action = Grammar::Code::InitialActionCode.new(type: :initial_action, token_code: val[3])
|
1308
1338
|
|
1309
1339
|
result
|
1310
1340
|
end
|
1311
1341
|
.,.,
|
1312
1342
|
|
1313
|
-
# reduce
|
1343
|
+
# reduce 23 omitted
|
1314
1344
|
|
1315
|
-
module_eval(<<'.,.,', 'parser.y',
|
1316
|
-
def
|
1345
|
+
module_eval(<<'.,.,', 'parser.y', 75)
|
1346
|
+
def _reduce_24(val, _values, result)
|
1317
1347
|
begin_c_declaration("}")
|
1318
1348
|
|
1319
1349
|
result
|
1320
1350
|
end
|
1321
1351
|
.,.,
|
1322
1352
|
|
1323
|
-
module_eval(<<'.,.,', 'parser.y',
|
1324
|
-
def
|
1353
|
+
module_eval(<<'.,.,', 'parser.y', 79)
|
1354
|
+
def _reduce_25(val, _values, result)
|
1325
1355
|
end_c_declaration
|
1326
1356
|
|
1327
1357
|
result
|
1328
1358
|
end
|
1329
1359
|
.,.,
|
1330
1360
|
|
1331
|
-
module_eval(<<'.,.,', 'parser.y',
|
1332
|
-
def
|
1361
|
+
module_eval(<<'.,.,', 'parser.y', 83)
|
1362
|
+
def _reduce_26(val, _values, result)
|
1333
1363
|
@grammar.set_union(
|
1334
1364
|
Grammar::Code::NoReferenceCode.new(type: :union, token_code: val[3]),
|
1335
1365
|
val[3].line
|
@@ -1339,44 +1369,44 @@ module_eval(<<'.,.,', 'parser.y', 82)
|
|
1339
1369
|
end
|
1340
1370
|
.,.,
|
1341
1371
|
|
1342
|
-
# reduce
|
1372
|
+
# reduce 27 omitted
|
1343
1373
|
|
1344
|
-
module_eval(<<'.,.,', 'parser.y',
|
1345
|
-
def
|
1374
|
+
module_eval(<<'.,.,', 'parser.y', 91)
|
1375
|
+
def _reduce_28(val, _values, result)
|
1346
1376
|
begin_c_declaration("}")
|
1347
1377
|
|
1348
1378
|
result
|
1349
1379
|
end
|
1350
1380
|
.,.,
|
1351
1381
|
|
1352
|
-
module_eval(<<'.,.,', 'parser.y',
|
1353
|
-
def
|
1382
|
+
module_eval(<<'.,.,', 'parser.y', 95)
|
1383
|
+
def _reduce_29(val, _values, result)
|
1354
1384
|
end_c_declaration
|
1355
1385
|
|
1356
1386
|
result
|
1357
1387
|
end
|
1358
1388
|
.,.,
|
1359
1389
|
|
1360
|
-
# reduce
|
1390
|
+
# reduce 30 omitted
|
1361
1391
|
|
1362
|
-
module_eval(<<'.,.,', 'parser.y',
|
1363
|
-
def
|
1392
|
+
module_eval(<<'.,.,', 'parser.y', 100)
|
1393
|
+
def _reduce_31(val, _values, result)
|
1364
1394
|
begin_c_declaration("}")
|
1365
1395
|
|
1366
1396
|
result
|
1367
1397
|
end
|
1368
1398
|
.,.,
|
1369
1399
|
|
1370
|
-
module_eval(<<'.,.,', 'parser.y',
|
1371
|
-
def
|
1400
|
+
module_eval(<<'.,.,', 'parser.y', 104)
|
1401
|
+
def _reduce_32(val, _values, result)
|
1372
1402
|
end_c_declaration
|
1373
1403
|
|
1374
1404
|
result
|
1375
1405
|
end
|
1376
1406
|
.,.,
|
1377
1407
|
|
1378
|
-
module_eval(<<'.,.,', 'parser.y',
|
1379
|
-
def
|
1408
|
+
module_eval(<<'.,.,', 'parser.y', 108)
|
1409
|
+
def _reduce_33(val, _values, result)
|
1380
1410
|
@grammar.add_printer(
|
1381
1411
|
ident_or_tags: val[6],
|
1382
1412
|
token_code: val[3],
|
@@ -1387,24 +1417,24 @@ module_eval(<<'.,.,', 'parser.y', 107)
|
|
1387
1417
|
end
|
1388
1418
|
.,.,
|
1389
1419
|
|
1390
|
-
module_eval(<<'.,.,', 'parser.y',
|
1391
|
-
def
|
1420
|
+
module_eval(<<'.,.,', 'parser.y', 116)
|
1421
|
+
def _reduce_34(val, _values, result)
|
1392
1422
|
begin_c_declaration("}")
|
1393
1423
|
|
1394
1424
|
result
|
1395
1425
|
end
|
1396
1426
|
.,.,
|
1397
1427
|
|
1398
|
-
module_eval(<<'.,.,', 'parser.y',
|
1399
|
-
def
|
1428
|
+
module_eval(<<'.,.,', 'parser.y', 120)
|
1429
|
+
def _reduce_35(val, _values, result)
|
1400
1430
|
end_c_declaration
|
1401
1431
|
|
1402
1432
|
result
|
1403
1433
|
end
|
1404
1434
|
.,.,
|
1405
1435
|
|
1406
|
-
module_eval(<<'.,.,', 'parser.y',
|
1407
|
-
def
|
1436
|
+
module_eval(<<'.,.,', 'parser.y', 124)
|
1437
|
+
def _reduce_36(val, _values, result)
|
1408
1438
|
@grammar.add_error_token(
|
1409
1439
|
ident_or_tags: val[6],
|
1410
1440
|
token_code: val[3],
|
@@ -1415,10 +1445,10 @@ module_eval(<<'.,.,', 'parser.y', 123)
|
|
1415
1445
|
end
|
1416
1446
|
.,.,
|
1417
1447
|
|
1418
|
-
# reduce
|
1448
|
+
# reduce 37 omitted
|
1419
1449
|
|
1420
|
-
module_eval(<<'.,.,', 'parser.y',
|
1421
|
-
def
|
1450
|
+
module_eval(<<'.,.,', 'parser.y', 134)
|
1451
|
+
def _reduce_38(val, _values, result)
|
1422
1452
|
val[1].each {|hash|
|
1423
1453
|
hash[:tokens].each {|id|
|
1424
1454
|
@grammar.add_type(id: id, tag: hash[:tag])
|
@@ -1429,8 +1459,8 @@ module_eval(<<'.,.,', 'parser.y', 133)
|
|
1429
1459
|
end
|
1430
1460
|
.,.,
|
1431
1461
|
|
1432
|
-
module_eval(<<'.,.,', 'parser.y',
|
1433
|
-
def
|
1462
|
+
module_eval(<<'.,.,', 'parser.y', 142)
|
1463
|
+
def _reduce_39(val, _values, result)
|
1434
1464
|
val[1].each {|hash|
|
1435
1465
|
hash[:tokens].each {|id|
|
1436
1466
|
sym = @grammar.add_term(id: id)
|
@@ -1443,8 +1473,8 @@ module_eval(<<'.,.,', 'parser.y', 141)
|
|
1443
1473
|
end
|
1444
1474
|
.,.,
|
1445
1475
|
|
1446
|
-
module_eval(<<'.,.,', 'parser.y',
|
1447
|
-
def
|
1476
|
+
module_eval(<<'.,.,', 'parser.y', 152)
|
1477
|
+
def _reduce_40(val, _values, result)
|
1448
1478
|
val[1].each {|hash|
|
1449
1479
|
hash[:tokens].each {|id|
|
1450
1480
|
sym = @grammar.add_term(id: id)
|
@@ -1457,8 +1487,8 @@ module_eval(<<'.,.,', 'parser.y', 151)
|
|
1457
1487
|
end
|
1458
1488
|
.,.,
|
1459
1489
|
|
1460
|
-
module_eval(<<'.,.,', 'parser.y',
|
1461
|
-
def
|
1490
|
+
module_eval(<<'.,.,', 'parser.y', 162)
|
1491
|
+
def _reduce_41(val, _values, result)
|
1462
1492
|
val[1].each {|hash|
|
1463
1493
|
hash[:tokens].each {|id|
|
1464
1494
|
sym = @grammar.add_term(id: id)
|
@@ -1471,8 +1501,8 @@ module_eval(<<'.,.,', 'parser.y', 161)
|
|
1471
1501
|
end
|
1472
1502
|
.,.,
|
1473
1503
|
|
1474
|
-
module_eval(<<'.,.,', 'parser.y',
|
1475
|
-
def
|
1504
|
+
module_eval(<<'.,.,', 'parser.y', 172)
|
1505
|
+
def _reduce_42(val, _values, result)
|
1476
1506
|
val[1].each {|hash|
|
1477
1507
|
hash[:tokens].each {|id|
|
1478
1508
|
sym = @grammar.add_term(id: id)
|
@@ -1485,8 +1515,8 @@ module_eval(<<'.,.,', 'parser.y', 171)
|
|
1485
1515
|
end
|
1486
1516
|
.,.,
|
1487
1517
|
|
1488
|
-
module_eval(<<'.,.,', 'parser.y',
|
1489
|
-
def
|
1518
|
+
module_eval(<<'.,.,', 'parser.y', 183)
|
1519
|
+
def _reduce_43(val, _values, result)
|
1490
1520
|
val[0].each {|token_declaration|
|
1491
1521
|
@grammar.add_term(id: token_declaration[0], alias_name: token_declaration[2], token_id: token_declaration[1], tag: nil, replace: true)
|
1492
1522
|
}
|
@@ -1495,8 +1525,8 @@ module_eval(<<'.,.,', 'parser.y', 182)
|
|
1495
1525
|
end
|
1496
1526
|
.,.,
|
1497
1527
|
|
1498
|
-
module_eval(<<'.,.,', 'parser.y',
|
1499
|
-
def
|
1528
|
+
module_eval(<<'.,.,', 'parser.y', 189)
|
1529
|
+
def _reduce_44(val, _values, result)
|
1500
1530
|
val[1].each {|token_declaration|
|
1501
1531
|
@grammar.add_term(id: token_declaration[0], alias_name: token_declaration[2], token_id: token_declaration[1], tag: val[0], replace: true)
|
1502
1532
|
}
|
@@ -1505,8 +1535,8 @@ module_eval(<<'.,.,', 'parser.y', 188)
|
|
1505
1535
|
end
|
1506
1536
|
.,.,
|
1507
1537
|
|
1508
|
-
module_eval(<<'.,.,', 'parser.y',
|
1509
|
-
def
|
1538
|
+
module_eval(<<'.,.,', 'parser.y', 195)
|
1539
|
+
def _reduce_45(val, _values, result)
|
1510
1540
|
val[2].each {|token_declaration|
|
1511
1541
|
@grammar.add_term(id: token_declaration[0], alias_name: token_declaration[2], token_id: token_declaration[1], tag: val[1], replace: true)
|
1512
1542
|
}
|
@@ -1515,86 +1545,131 @@ module_eval(<<'.,.,', 'parser.y', 194)
|
|
1515
1545
|
end
|
1516
1546
|
.,.,
|
1517
1547
|
|
1518
|
-
module_eval(<<'.,.,', 'parser.y',
|
1519
|
-
def
|
1548
|
+
module_eval(<<'.,.,', 'parser.y', 200)
|
1549
|
+
def _reduce_46(val, _values, result)
|
1520
1550
|
result = [val[0]]
|
1521
1551
|
result
|
1522
1552
|
end
|
1523
1553
|
.,.,
|
1524
1554
|
|
1525
|
-
module_eval(<<'.,.,', 'parser.y',
|
1526
|
-
def
|
1555
|
+
module_eval(<<'.,.,', 'parser.y', 201)
|
1556
|
+
def _reduce_47(val, _values, result)
|
1527
1557
|
result = val[0].append(val[1])
|
1528
1558
|
result
|
1529
1559
|
end
|
1530
1560
|
.,.,
|
1531
1561
|
|
1532
|
-
module_eval(<<'.,.,', 'parser.y',
|
1533
|
-
def
|
1562
|
+
module_eval(<<'.,.,', 'parser.y', 203)
|
1563
|
+
def _reduce_48(val, _values, result)
|
1534
1564
|
result = val
|
1535
1565
|
result
|
1536
1566
|
end
|
1537
1567
|
.,.,
|
1538
1568
|
|
1539
|
-
|
1540
|
-
|
1541
|
-
|
1569
|
+
module_eval(<<'.,.,', 'parser.y', 207)
|
1570
|
+
def _reduce_49(val, _values, result)
|
1571
|
+
builder = Grammar::ParameterizingRuleBuilder.new(val[1].s_value, val[3], val[6])
|
1572
|
+
@grammar.add_parameterizing_rule_builder(builder)
|
1542
1573
|
|
1543
|
-
|
1574
|
+
result
|
1575
|
+
end
|
1576
|
+
.,.,
|
1544
1577
|
|
1545
|
-
|
1578
|
+
module_eval(<<'.,.,', 'parser.y', 211)
|
1579
|
+
def _reduce_50(val, _values, result)
|
1580
|
+
result = [val[0]]
|
1581
|
+
result
|
1582
|
+
end
|
1583
|
+
.,.,
|
1546
1584
|
|
1547
1585
|
module_eval(<<'.,.,', 'parser.y', 212)
|
1586
|
+
def _reduce_51(val, _values, result)
|
1587
|
+
result = val[0].append(val[2])
|
1588
|
+
result
|
1589
|
+
end
|
1590
|
+
.,.,
|
1591
|
+
|
1592
|
+
module_eval(<<'.,.,', 'parser.y', 216)
|
1548
1593
|
def _reduce_52(val, _values, result)
|
1549
|
-
|
1594
|
+
builder = val[0]
|
1595
|
+
result = [builder]
|
1550
1596
|
|
1551
1597
|
result
|
1552
1598
|
end
|
1553
1599
|
.,.,
|
1554
1600
|
|
1555
|
-
module_eval(<<'.,.,', 'parser.y',
|
1601
|
+
module_eval(<<'.,.,', 'parser.y', 221)
|
1556
1602
|
def _reduce_53(val, _values, result)
|
1557
|
-
|
1603
|
+
builder = val[2]
|
1604
|
+
result = val[0].append(builder)
|
1558
1605
|
|
1559
1606
|
result
|
1560
1607
|
end
|
1561
1608
|
.,.,
|
1562
1609
|
|
1563
|
-
module_eval(<<'.,.,', 'parser.y',
|
1610
|
+
module_eval(<<'.,.,', 'parser.y', 227)
|
1564
1611
|
def _reduce_54(val, _values, result)
|
1565
|
-
|
1612
|
+
reset_precs
|
1613
|
+
result = Grammar::ParameterizingRuleRhsBuilder.new
|
1566
1614
|
|
1567
1615
|
result
|
1568
1616
|
end
|
1569
1617
|
.,.,
|
1570
1618
|
|
1571
|
-
module_eval(<<'.,.,', 'parser.y',
|
1619
|
+
module_eval(<<'.,.,', 'parser.y', 232)
|
1572
1620
|
def _reduce_55(val, _values, result)
|
1573
|
-
|
1621
|
+
reset_precs
|
1622
|
+
result = Grammar::ParameterizingRuleRhsBuilder.new
|
1623
|
+
|
1574
1624
|
result
|
1575
1625
|
end
|
1576
1626
|
.,.,
|
1577
1627
|
|
1578
|
-
module_eval(<<'.,.,', 'parser.y',
|
1628
|
+
module_eval(<<'.,.,', 'parser.y', 237)
|
1579
1629
|
def _reduce_56(val, _values, result)
|
1580
|
-
|
1630
|
+
token = val[1]
|
1631
|
+
token.alias_name = val[2]
|
1632
|
+
builder = val[0]
|
1633
|
+
builder.symbols << token
|
1634
|
+
result = builder
|
1635
|
+
|
1581
1636
|
result
|
1582
1637
|
end
|
1583
1638
|
.,.,
|
1584
1639
|
|
1585
|
-
|
1640
|
+
module_eval(<<'.,.,', 'parser.y', 245)
|
1641
|
+
def _reduce_57(val, _values, result)
|
1642
|
+
builder = val[0]
|
1643
|
+
builder.symbols << Lrama::Lexer::Token::InstantiateRule.new(s_value: val[2], location: @lexer.location, args: [val[1]])
|
1644
|
+
result = builder
|
1645
|
+
|
1646
|
+
result
|
1647
|
+
end
|
1648
|
+
.,.,
|
1649
|
+
|
1650
|
+
module_eval(<<'.,.,', 'parser.y', 251)
|
1651
|
+
def _reduce_58(val, _values, result)
|
1652
|
+
builder = val[0]
|
1653
|
+
builder.symbols << Lrama::Lexer::Token::InstantiateRule.new(s_value: val[1].s_value, location: @lexer.location, args: val[3])
|
1654
|
+
result = builder
|
1586
1655
|
|
1587
|
-
|
1656
|
+
result
|
1657
|
+
end
|
1658
|
+
.,.,
|
1588
1659
|
|
1589
|
-
module_eval(<<'.,.,', 'parser.y',
|
1660
|
+
module_eval(<<'.,.,', 'parser.y', 257)
|
1590
1661
|
def _reduce_59(val, _values, result)
|
1591
|
-
|
1662
|
+
if @prec_seen
|
1663
|
+
on_action_error("multiple User_code after %prec", val[0]) if @code_after_prec
|
1664
|
+
@code_after_prec = true
|
1665
|
+
end
|
1666
|
+
begin_c_declaration("}")
|
1592
1667
|
|
1593
1668
|
result
|
1594
1669
|
end
|
1595
1670
|
.,.,
|
1596
1671
|
|
1597
|
-
module_eval(<<'.,.,', 'parser.y',
|
1672
|
+
module_eval(<<'.,.,', 'parser.y', 265)
|
1598
1673
|
def _reduce_60(val, _values, result)
|
1599
1674
|
end_c_declaration
|
1600
1675
|
|
@@ -1602,102 +1677,192 @@ module_eval(<<'.,.,', 'parser.y', 235)
|
|
1602
1677
|
end
|
1603
1678
|
.,.,
|
1604
1679
|
|
1605
|
-
module_eval(<<'.,.,', 'parser.y',
|
1680
|
+
module_eval(<<'.,.,', 'parser.y', 269)
|
1606
1681
|
def _reduce_61(val, _values, result)
|
1607
|
-
|
1682
|
+
user_code = val[3]
|
1683
|
+
user_code.alias_name = val[6]
|
1684
|
+
builder = val[0]
|
1685
|
+
builder.user_code = user_code
|
1686
|
+
result = builder
|
1608
1687
|
|
1609
1688
|
result
|
1610
1689
|
end
|
1611
1690
|
.,.,
|
1612
1691
|
|
1613
|
-
module_eval(<<'.,.,', 'parser.y',
|
1692
|
+
module_eval(<<'.,.,', 'parser.y', 277)
|
1614
1693
|
def _reduce_62(val, _values, result)
|
1694
|
+
sym = @grammar.find_symbol_by_id!(val[2])
|
1695
|
+
@prec_seen = true
|
1696
|
+
builder = val[0]
|
1697
|
+
builder.precedence_sym = sym
|
1698
|
+
result = builder
|
1699
|
+
|
1700
|
+
result
|
1701
|
+
end
|
1702
|
+
.,.,
|
1703
|
+
|
1704
|
+
# reduce 63 omitted
|
1705
|
+
|
1706
|
+
# reduce 64 omitted
|
1707
|
+
|
1708
|
+
# reduce 65 omitted
|
1709
|
+
|
1710
|
+
# reduce 66 omitted
|
1711
|
+
|
1712
|
+
module_eval(<<'.,.,', 'parser.y', 292)
|
1713
|
+
def _reduce_67(val, _values, result)
|
1714
|
+
result = [{tag: nil, tokens: val[0]}]
|
1715
|
+
|
1716
|
+
result
|
1717
|
+
end
|
1718
|
+
.,.,
|
1719
|
+
|
1720
|
+
module_eval(<<'.,.,', 'parser.y', 296)
|
1721
|
+
def _reduce_68(val, _values, result)
|
1722
|
+
result = [{tag: val[0], tokens: val[1]}]
|
1723
|
+
|
1724
|
+
result
|
1725
|
+
end
|
1726
|
+
.,.,
|
1727
|
+
|
1728
|
+
module_eval(<<'.,.,', 'parser.y', 300)
|
1729
|
+
def _reduce_69(val, _values, result)
|
1730
|
+
result = val[0].append({tag: val[1], tokens: val[2]})
|
1731
|
+
|
1732
|
+
result
|
1733
|
+
end
|
1734
|
+
.,.,
|
1735
|
+
|
1736
|
+
module_eval(<<'.,.,', 'parser.y', 303)
|
1737
|
+
def _reduce_70(val, _values, result)
|
1738
|
+
result = [val[0]]
|
1739
|
+
result
|
1740
|
+
end
|
1741
|
+
.,.,
|
1742
|
+
|
1743
|
+
module_eval(<<'.,.,', 'parser.y', 304)
|
1744
|
+
def _reduce_71(val, _values, result)
|
1745
|
+
result = val[0].append(val[1])
|
1746
|
+
result
|
1747
|
+
end
|
1748
|
+
.,.,
|
1749
|
+
|
1750
|
+
# reduce 72 omitted
|
1751
|
+
|
1752
|
+
# reduce 73 omitted
|
1753
|
+
|
1754
|
+
module_eval(<<'.,.,', 'parser.y', 311)
|
1755
|
+
def _reduce_74(val, _values, result)
|
1615
1756
|
begin_c_declaration("}")
|
1616
1757
|
|
1617
1758
|
result
|
1618
1759
|
end
|
1619
1760
|
.,.,
|
1620
1761
|
|
1621
|
-
module_eval(<<'.,.,', 'parser.y',
|
1622
|
-
def
|
1762
|
+
module_eval(<<'.,.,', 'parser.y', 315)
|
1763
|
+
def _reduce_75(val, _values, result)
|
1623
1764
|
end_c_declaration
|
1624
1765
|
|
1625
1766
|
result
|
1626
1767
|
end
|
1627
1768
|
.,.,
|
1628
1769
|
|
1629
|
-
module_eval(<<'.,.,', 'parser.y',
|
1630
|
-
def
|
1770
|
+
module_eval(<<'.,.,', 'parser.y', 319)
|
1771
|
+
def _reduce_76(val, _values, result)
|
1772
|
+
result = val[0].append(val[3])
|
1773
|
+
|
1774
|
+
result
|
1775
|
+
end
|
1776
|
+
.,.,
|
1777
|
+
|
1778
|
+
module_eval(<<'.,.,', 'parser.y', 323)
|
1779
|
+
def _reduce_77(val, _values, result)
|
1780
|
+
begin_c_declaration("}")
|
1781
|
+
|
1782
|
+
result
|
1783
|
+
end
|
1784
|
+
.,.,
|
1785
|
+
|
1786
|
+
module_eval(<<'.,.,', 'parser.y', 327)
|
1787
|
+
def _reduce_78(val, _values, result)
|
1788
|
+
end_c_declaration
|
1789
|
+
|
1790
|
+
result
|
1791
|
+
end
|
1792
|
+
.,.,
|
1793
|
+
|
1794
|
+
module_eval(<<'.,.,', 'parser.y', 331)
|
1795
|
+
def _reduce_79(val, _values, result)
|
1631
1796
|
result = [val[2]]
|
1632
1797
|
|
1633
1798
|
result
|
1634
1799
|
end
|
1635
1800
|
.,.,
|
1636
1801
|
|
1637
|
-
module_eval(<<'.,.,', 'parser.y',
|
1638
|
-
def
|
1802
|
+
module_eval(<<'.,.,', 'parser.y', 336)
|
1803
|
+
def _reduce_80(val, _values, result)
|
1639
1804
|
result = [{tag: nil, tokens: val[0]}]
|
1640
1805
|
|
1641
1806
|
result
|
1642
1807
|
end
|
1643
1808
|
.,.,
|
1644
1809
|
|
1645
|
-
module_eval(<<'.,.,', 'parser.y',
|
1646
|
-
def
|
1810
|
+
module_eval(<<'.,.,', 'parser.y', 340)
|
1811
|
+
def _reduce_81(val, _values, result)
|
1647
1812
|
result = [{tag: val[0], tokens: val[1]}]
|
1648
1813
|
|
1649
1814
|
result
|
1650
1815
|
end
|
1651
1816
|
.,.,
|
1652
1817
|
|
1653
|
-
module_eval(<<'.,.,', 'parser.y',
|
1654
|
-
def
|
1818
|
+
module_eval(<<'.,.,', 'parser.y', 344)
|
1819
|
+
def _reduce_82(val, _values, result)
|
1655
1820
|
result = val[0].append({tag: val[1], tokens: val[2]})
|
1656
1821
|
|
1657
1822
|
result
|
1658
1823
|
end
|
1659
1824
|
.,.,
|
1660
1825
|
|
1661
|
-
module_eval(<<'.,.,', 'parser.y',
|
1662
|
-
def
|
1826
|
+
module_eval(<<'.,.,', 'parser.y', 347)
|
1827
|
+
def _reduce_83(val, _values, result)
|
1663
1828
|
result = [val[0]]
|
1664
1829
|
result
|
1665
1830
|
end
|
1666
1831
|
.,.,
|
1667
1832
|
|
1668
|
-
module_eval(<<'.,.,', 'parser.y',
|
1669
|
-
def
|
1833
|
+
module_eval(<<'.,.,', 'parser.y', 348)
|
1834
|
+
def _reduce_84(val, _values, result)
|
1670
1835
|
result = val[0].append(val[1])
|
1671
1836
|
result
|
1672
1837
|
end
|
1673
1838
|
.,.,
|
1674
1839
|
|
1675
|
-
# reduce
|
1840
|
+
# reduce 85 omitted
|
1676
1841
|
|
1677
|
-
module_eval(<<'.,.,', 'parser.y',
|
1678
|
-
def
|
1842
|
+
module_eval(<<'.,.,', 'parser.y', 352)
|
1843
|
+
def _reduce_86(val, _values, result)
|
1679
1844
|
on_action_error("ident after %prec", val[0]) if @prec_seen
|
1680
1845
|
result
|
1681
1846
|
end
|
1682
1847
|
.,.,
|
1683
1848
|
|
1684
|
-
module_eval(<<'.,.,', 'parser.y',
|
1685
|
-
def
|
1849
|
+
module_eval(<<'.,.,', 'parser.y', 353)
|
1850
|
+
def _reduce_87(val, _values, result)
|
1686
1851
|
on_action_error("char after %prec", val[0]) if @prec_seen
|
1687
1852
|
result
|
1688
1853
|
end
|
1689
1854
|
.,.,
|
1690
1855
|
|
1691
|
-
# reduce
|
1856
|
+
# reduce 88 omitted
|
1692
1857
|
|
1693
|
-
# reduce
|
1858
|
+
# reduce 89 omitted
|
1694
1859
|
|
1695
|
-
# reduce
|
1860
|
+
# reduce 90 omitted
|
1696
1861
|
|
1697
|
-
# reduce
|
1862
|
+
# reduce 91 omitted
|
1698
1863
|
|
1699
|
-
module_eval(<<'.,.,', 'parser.y',
|
1700
|
-
def
|
1864
|
+
module_eval(<<'.,.,', 'parser.y', 363)
|
1865
|
+
def _reduce_92(val, _values, result)
|
1701
1866
|
lhs = val[0]
|
1702
1867
|
lhs.alias_name = val[1]
|
1703
1868
|
val[3].each do |builder|
|
@@ -1710,8 +1875,8 @@ module_eval(<<'.,.,', 'parser.y', 283)
|
|
1710
1875
|
end
|
1711
1876
|
.,.,
|
1712
1877
|
|
1713
|
-
module_eval(<<'.,.,', 'parser.y',
|
1714
|
-
def
|
1878
|
+
module_eval(<<'.,.,', 'parser.y', 374)
|
1879
|
+
def _reduce_93(val, _values, result)
|
1715
1880
|
builder = val[0]
|
1716
1881
|
if !builder.line
|
1717
1882
|
builder.line = @lexer.line - 1
|
@@ -1722,8 +1887,8 @@ module_eval(<<'.,.,', 'parser.y', 294)
|
|
1722
1887
|
end
|
1723
1888
|
.,.,
|
1724
1889
|
|
1725
|
-
module_eval(<<'.,.,', 'parser.y',
|
1726
|
-
def
|
1890
|
+
module_eval(<<'.,.,', 'parser.y', 382)
|
1891
|
+
def _reduce_94(val, _values, result)
|
1727
1892
|
builder = val[2]
|
1728
1893
|
if !builder.line
|
1729
1894
|
builder.line = @lexer.line - 1
|
@@ -1734,10 +1899,10 @@ module_eval(<<'.,.,', 'parser.y', 302)
|
|
1734
1899
|
end
|
1735
1900
|
.,.,
|
1736
1901
|
|
1737
|
-
# reduce
|
1902
|
+
# reduce 95 omitted
|
1738
1903
|
|
1739
|
-
module_eval(<<'.,.,', 'parser.y',
|
1740
|
-
def
|
1904
|
+
module_eval(<<'.,.,', 'parser.y', 392)
|
1905
|
+
def _reduce_96(val, _values, result)
|
1741
1906
|
reset_precs
|
1742
1907
|
result = Grammar::RuleBuilder.new(@rule_counter, @midrule_action_counter)
|
1743
1908
|
|
@@ -1745,8 +1910,8 @@ module_eval(<<'.,.,', 'parser.y', 312)
|
|
1745
1910
|
end
|
1746
1911
|
.,.,
|
1747
1912
|
|
1748
|
-
module_eval(<<'.,.,', 'parser.y',
|
1749
|
-
def
|
1913
|
+
module_eval(<<'.,.,', 'parser.y', 397)
|
1914
|
+
def _reduce_97(val, _values, result)
|
1750
1915
|
reset_precs
|
1751
1916
|
result = Grammar::RuleBuilder.new(@rule_counter, @midrule_action_counter)
|
1752
1917
|
|
@@ -1754,8 +1919,8 @@ module_eval(<<'.,.,', 'parser.y', 317)
|
|
1754
1919
|
end
|
1755
1920
|
.,.,
|
1756
1921
|
|
1757
|
-
module_eval(<<'.,.,', 'parser.y',
|
1758
|
-
def
|
1922
|
+
module_eval(<<'.,.,', 'parser.y', 402)
|
1923
|
+
def _reduce_98(val, _values, result)
|
1759
1924
|
token = val[1]
|
1760
1925
|
token.alias_name = val[2]
|
1761
1926
|
builder = val[0]
|
@@ -1766,9 +1931,9 @@ module_eval(<<'.,.,', 'parser.y', 322)
|
|
1766
1931
|
end
|
1767
1932
|
.,.,
|
1768
1933
|
|
1769
|
-
module_eval(<<'.,.,', 'parser.y',
|
1770
|
-
def
|
1771
|
-
token = Lrama::Lexer::Token::
|
1934
|
+
module_eval(<<'.,.,', 'parser.y', 410)
|
1935
|
+
def _reduce_99(val, _values, result)
|
1936
|
+
token = Lrama::Lexer::Token::InstantiateRule.new(s_value: val[2], location: @lexer.location, args: [val[1]])
|
1772
1937
|
builder = val[0]
|
1773
1938
|
builder.add_rhs(token)
|
1774
1939
|
builder.lhs_tag = val[3]
|
@@ -1779,9 +1944,9 @@ module_eval(<<'.,.,', 'parser.y', 330)
|
|
1779
1944
|
end
|
1780
1945
|
.,.,
|
1781
1946
|
|
1782
|
-
module_eval(<<'.,.,', 'parser.y',
|
1783
|
-
def
|
1784
|
-
token = Lrama::Lexer::Token::
|
1947
|
+
module_eval(<<'.,.,', 'parser.y', 419)
|
1948
|
+
def _reduce_100(val, _values, result)
|
1949
|
+
token = Lrama::Lexer::Token::InstantiateRule.new(s_value: val[1].s_value, location: @lexer.location, args: val[3])
|
1785
1950
|
builder = val[0]
|
1786
1951
|
builder.add_rhs(token)
|
1787
1952
|
builder.lhs_tag = val[5]
|
@@ -1792,8 +1957,8 @@ module_eval(<<'.,.,', 'parser.y', 339)
|
|
1792
1957
|
end
|
1793
1958
|
.,.,
|
1794
1959
|
|
1795
|
-
module_eval(<<'.,.,', 'parser.y',
|
1796
|
-
def
|
1960
|
+
module_eval(<<'.,.,', 'parser.y', 428)
|
1961
|
+
def _reduce_101(val, _values, result)
|
1797
1962
|
if @prec_seen
|
1798
1963
|
on_action_error("multiple User_code after %prec", val[0]) if @code_after_prec
|
1799
1964
|
@code_after_prec = true
|
@@ -1804,16 +1969,16 @@ module_eval(<<'.,.,', 'parser.y', 348)
|
|
1804
1969
|
end
|
1805
1970
|
.,.,
|
1806
1971
|
|
1807
|
-
module_eval(<<'.,.,', 'parser.y',
|
1808
|
-
def
|
1972
|
+
module_eval(<<'.,.,', 'parser.y', 436)
|
1973
|
+
def _reduce_102(val, _values, result)
|
1809
1974
|
end_c_declaration
|
1810
1975
|
|
1811
1976
|
result
|
1812
1977
|
end
|
1813
1978
|
.,.,
|
1814
1979
|
|
1815
|
-
module_eval(<<'.,.,', 'parser.y',
|
1816
|
-
def
|
1980
|
+
module_eval(<<'.,.,', 'parser.y', 440)
|
1981
|
+
def _reduce_103(val, _values, result)
|
1817
1982
|
user_code = val[3]
|
1818
1983
|
user_code.alias_name = val[6]
|
1819
1984
|
builder = val[0]
|
@@ -1824,8 +1989,8 @@ module_eval(<<'.,.,', 'parser.y', 360)
|
|
1824
1989
|
end
|
1825
1990
|
.,.,
|
1826
1991
|
|
1827
|
-
module_eval(<<'.,.,', 'parser.y',
|
1828
|
-
def
|
1992
|
+
module_eval(<<'.,.,', 'parser.y', 448)
|
1993
|
+
def _reduce_104(val, _values, result)
|
1829
1994
|
sym = @grammar.find_symbol_by_id!(val[2])
|
1830
1995
|
@prec_seen = true
|
1831
1996
|
builder = val[0]
|
@@ -1836,41 +2001,41 @@ module_eval(<<'.,.,', 'parser.y', 368)
|
|
1836
2001
|
end
|
1837
2002
|
.,.,
|
1838
2003
|
|
1839
|
-
# reduce
|
2004
|
+
# reduce 105 omitted
|
1840
2005
|
|
1841
|
-
# reduce
|
2006
|
+
# reduce 106 omitted
|
1842
2007
|
|
1843
|
-
# reduce
|
2008
|
+
# reduce 107 omitted
|
1844
2009
|
|
1845
|
-
module_eval(<<'.,.,', 'parser.y',
|
1846
|
-
def
|
2010
|
+
module_eval(<<'.,.,', 'parser.y', 459)
|
2011
|
+
def _reduce_108(val, _values, result)
|
1847
2012
|
result = [val[0]]
|
1848
2013
|
result
|
1849
2014
|
end
|
1850
2015
|
.,.,
|
1851
2016
|
|
1852
|
-
module_eval(<<'.,.,', 'parser.y',
|
1853
|
-
def
|
2017
|
+
module_eval(<<'.,.,', 'parser.y', 460)
|
2018
|
+
def _reduce_109(val, _values, result)
|
1854
2019
|
result = val[0].append(val[2])
|
1855
2020
|
result
|
1856
2021
|
end
|
1857
2022
|
.,.,
|
1858
2023
|
|
1859
|
-
# reduce
|
2024
|
+
# reduce 110 omitted
|
1860
2025
|
|
1861
|
-
module_eval(<<'.,.,', 'parser.y',
|
1862
|
-
def
|
2026
|
+
module_eval(<<'.,.,', 'parser.y', 463)
|
2027
|
+
def _reduce_111(val, _values, result)
|
1863
2028
|
result = val[1].s_value
|
1864
2029
|
result
|
1865
2030
|
end
|
1866
2031
|
.,.,
|
1867
2032
|
|
1868
|
-
# reduce
|
2033
|
+
# reduce 112 omitted
|
1869
2034
|
|
1870
|
-
# reduce
|
2035
|
+
# reduce 113 omitted
|
1871
2036
|
|
1872
|
-
module_eval(<<'.,.,', 'parser.y',
|
1873
|
-
def
|
2037
|
+
module_eval(<<'.,.,', 'parser.y', 470)
|
2038
|
+
def _reduce_114(val, _values, result)
|
1874
2039
|
begin_c_declaration('\Z')
|
1875
2040
|
@grammar.epilogue_first_lineno = @lexer.line + 1
|
1876
2041
|
|
@@ -1878,8 +2043,8 @@ module_eval(<<'.,.,', 'parser.y', 390)
|
|
1878
2043
|
end
|
1879
2044
|
.,.,
|
1880
2045
|
|
1881
|
-
module_eval(<<'.,.,', 'parser.y',
|
1882
|
-
def
|
2046
|
+
module_eval(<<'.,.,', 'parser.y', 475)
|
2047
|
+
def _reduce_115(val, _values, result)
|
1883
2048
|
end_c_declaration
|
1884
2049
|
@grammar.epilogue = val[2].s_value
|
1885
2050
|
|
@@ -1887,44 +2052,44 @@ module_eval(<<'.,.,', 'parser.y', 395)
|
|
1887
2052
|
end
|
1888
2053
|
.,.,
|
1889
2054
|
|
1890
|
-
# reduce
|
2055
|
+
# reduce 116 omitted
|
1891
2056
|
|
1892
|
-
# reduce
|
2057
|
+
# reduce 117 omitted
|
1893
2058
|
|
1894
|
-
# reduce
|
2059
|
+
# reduce 118 omitted
|
1895
2060
|
|
1896
|
-
# reduce
|
2061
|
+
# reduce 119 omitted
|
1897
2062
|
|
1898
|
-
# reduce
|
2063
|
+
# reduce 120 omitted
|
1899
2064
|
|
1900
|
-
module_eval(<<'.,.,', 'parser.y',
|
1901
|
-
def
|
2065
|
+
module_eval(<<'.,.,', 'parser.y', 486)
|
2066
|
+
def _reduce_121(val, _values, result)
|
1902
2067
|
result = [val[0]]
|
1903
2068
|
result
|
1904
2069
|
end
|
1905
2070
|
.,.,
|
1906
2071
|
|
1907
|
-
module_eval(<<'.,.,', 'parser.y',
|
1908
|
-
def
|
2072
|
+
module_eval(<<'.,.,', 'parser.y', 487)
|
2073
|
+
def _reduce_122(val, _values, result)
|
1909
2074
|
result = val[0].append(val[1])
|
1910
2075
|
result
|
1911
2076
|
end
|
1912
2077
|
.,.,
|
1913
2078
|
|
1914
|
-
# reduce
|
2079
|
+
# reduce 123 omitted
|
1915
2080
|
|
1916
|
-
# reduce
|
2081
|
+
# reduce 124 omitted
|
1917
2082
|
|
1918
|
-
module_eval(<<'.,.,', 'parser.y',
|
1919
|
-
def
|
2083
|
+
module_eval(<<'.,.,', 'parser.y', 492)
|
2084
|
+
def _reduce_125(val, _values, result)
|
1920
2085
|
result = Lrama::Lexer::Token::Ident.new(s_value: val[0])
|
1921
2086
|
result
|
1922
2087
|
end
|
1923
2088
|
.,.,
|
1924
2089
|
|
1925
|
-
# reduce
|
2090
|
+
# reduce 126 omitted
|
1926
2091
|
|
1927
|
-
# reduce
|
2092
|
+
# reduce 127 omitted
|
1928
2093
|
|
1929
2094
|
def _reduce_none(val, _values, result)
|
1930
2095
|
val[0]
|