lrama 0.6.9 → 0.6.11
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 +24 -1
- data/.gitignore +2 -0
- data/Gemfile +6 -3
- data/NEWS.md +269 -14
- data/README.md +41 -4
- data/Rakefile +2 -0
- data/Steepfile +9 -17
- data/doc/development/compressed_state_table/main.md +635 -0
- data/doc/development/compressed_state_table/parse.output +174 -0
- data/doc/development/compressed_state_table/parse.y +22 -0
- data/doc/development/compressed_state_table/parser.rb +282 -0
- data/exe/lrama +1 -0
- data/lib/lrama/bitmap.rb +3 -1
- data/lib/lrama/command.rb +8 -14
- data/lib/lrama/context.rb +11 -9
- data/lib/lrama/counterexamples/derivation.rb +8 -5
- data/lib/lrama/counterexamples/example.rb +9 -4
- data/lib/lrama/counterexamples/path.rb +6 -0
- data/lib/lrama/counterexamples/production_path.rb +2 -0
- data/lib/lrama/counterexamples/start_path.rb +2 -0
- data/lib/lrama/counterexamples/state_item.rb +2 -0
- data/lib/lrama/counterexamples/transition_path.rb +2 -0
- data/lib/lrama/counterexamples/triple.rb +2 -0
- data/lib/lrama/counterexamples.rb +36 -24
- data/lib/lrama/diagnostics.rb +36 -0
- data/lib/lrama/digraph.rb +2 -0
- data/lib/lrama/grammar/auxiliary.rb +2 -0
- data/lib/lrama/grammar/binding.rb +12 -1
- data/lib/lrama/grammar/code/destructor_code.rb +2 -0
- data/lib/lrama/grammar/code/initial_action_code.rb +2 -0
- data/lib/lrama/grammar/code/no_reference_code.rb +2 -0
- data/lib/lrama/grammar/code/printer_code.rb +2 -0
- data/lib/lrama/grammar/code/rule_action.rb +7 -3
- data/lib/lrama/grammar/code.rb +7 -5
- data/lib/lrama/grammar/counter.rb +2 -0
- data/lib/lrama/grammar/destructor.rb +2 -0
- data/lib/lrama/grammar/error_token.rb +2 -0
- data/lib/lrama/grammar/parameterizing_rule/resolver.rb +7 -1
- data/lib/lrama/grammar/parameterizing_rule/rhs.rb +6 -3
- data/lib/lrama/grammar/parameterizing_rule/rule.rb +6 -0
- data/lib/lrama/grammar/parameterizing_rule.rb +2 -0
- data/lib/lrama/grammar/percent_code.rb +2 -0
- data/lib/lrama/grammar/precedence.rb +2 -0
- data/lib/lrama/grammar/printer.rb +2 -0
- data/lib/lrama/grammar/reference.rb +2 -0
- data/lib/lrama/grammar/rule.rb +10 -3
- data/lib/lrama/grammar/rule_builder.rb +64 -65
- data/lib/lrama/grammar/symbol.rb +2 -0
- data/lib/lrama/grammar/symbols/resolver.rb +9 -1
- data/lib/lrama/grammar/symbols.rb +2 -0
- data/lib/lrama/grammar/type.rb +2 -0
- data/lib/lrama/grammar/union.rb +2 -0
- data/lib/lrama/grammar.rb +53 -32
- data/lib/lrama/grammar_validator.rb +37 -0
- data/lib/lrama/lexer/grammar_file.rb +2 -0
- data/lib/lrama/lexer/location.rb +2 -0
- data/lib/lrama/lexer/token/char.rb +2 -0
- data/lib/lrama/lexer/token/ident.rb +2 -0
- data/lib/lrama/lexer/token/instantiate_rule.rb +2 -0
- data/lib/lrama/lexer/token/tag.rb +2 -0
- data/lib/lrama/lexer/token/user_code.rb +4 -2
- data/lib/lrama/lexer/token.rb +7 -5
- data/lib/lrama/lexer.rb +12 -8
- data/lib/lrama/{warning.rb → logger.rb} +5 -13
- data/lib/lrama/option_parser.rb +58 -33
- data/lib/lrama/options.rb +5 -2
- data/lib/lrama/output.rb +38 -69
- data/lib/lrama/parser.rb +677 -773
- data/lib/lrama/report/duration.rb +2 -0
- data/lib/lrama/report/profile.rb +2 -0
- data/lib/lrama/report.rb +4 -2
- data/lib/lrama/state/reduce.rb +4 -2
- data/lib/lrama/state/reduce_reduce_conflict.rb +2 -0
- data/lib/lrama/state/resolved_conflict.rb +3 -1
- data/lib/lrama/state/shift.rb +2 -0
- data/lib/lrama/state/shift_reduce_conflict.rb +2 -0
- data/lib/lrama/state.rb +7 -5
- data/lib/lrama/states/item.rb +5 -3
- data/lib/lrama/states.rb +18 -46
- data/lib/lrama/states_reporter.rb +60 -19
- data/lib/lrama/trace_reporter.rb +30 -0
- data/lib/lrama/version.rb +3 -1
- data/lib/lrama.rb +22 -17
- data/lrama.gemspec +3 -1
- data/parser.y +129 -237
- data/rbs_collection.lock.yaml +10 -2
- data/sig/lrama/counterexamples/derivation.rbs +33 -0
- data/sig/lrama/counterexamples/example.rbs +45 -0
- data/sig/lrama/counterexamples/path.rbs +21 -0
- data/sig/lrama/counterexamples/production_path.rbs +11 -0
- data/sig/lrama/counterexamples/start_path.rbs +13 -0
- data/sig/lrama/counterexamples/state_item.rbs +10 -0
- data/sig/lrama/counterexamples/transition_path.rbs +11 -0
- data/sig/lrama/counterexamples/triple.rbs +20 -0
- data/sig/lrama/counterexamples.rbs +29 -0
- data/sig/lrama/grammar/auxiliary.rbs +10 -0
- data/sig/lrama/grammar/binding.rbs +4 -0
- data/sig/lrama/grammar/code/destructor_code.rbs +3 -4
- data/sig/lrama/grammar/code/initial_action_code.rbs +15 -0
- data/sig/lrama/grammar/code/no_reference_code.rbs +15 -0
- data/sig/lrama/grammar/code/printer_code.rbs +3 -4
- data/sig/lrama/grammar/code/rule_action.rbs +19 -0
- data/sig/lrama/grammar/code.rbs +3 -3
- data/sig/lrama/grammar/destructor.rbs +3 -1
- data/sig/lrama/grammar/error_token.rbs +4 -2
- data/sig/lrama/grammar/parameterizing_rule/resolver.rbs +2 -1
- data/sig/lrama/grammar/parameterizing_rule/rhs.rbs +1 -1
- data/sig/lrama/grammar/precedence.rbs +3 -1
- data/sig/lrama/grammar/printer.rbs +3 -1
- data/sig/lrama/grammar/rule.rbs +35 -3
- data/sig/lrama/grammar/rule_builder.rbs +10 -9
- data/sig/lrama/grammar/symbol.rbs +6 -6
- data/sig/lrama/grammar/symbols/resolver.rbs +24 -5
- data/sig/lrama/grammar/type.rbs +2 -2
- data/sig/lrama/grammar/union.rbs +12 -0
- data/sig/lrama/grammar.rbs +104 -1
- data/sig/lrama/options.rbs +3 -2
- data/sig/lrama/state/reduce.rbs +20 -0
- data/sig/lrama/state/reduce_reduce_conflict.rbs +13 -0
- data/sig/lrama/state/resolved_conflict.rbs +14 -0
- data/sig/lrama/state/shift.rbs +14 -0
- data/sig/lrama/state/shift_reduce_conflict.rbs +13 -0
- data/sig/lrama/state.rbs +79 -0
- data/sig/lrama/states/item.rbs +30 -0
- data/sig/lrama/states.rbs +101 -0
- data/template/bison/yacc.c +24 -19
- metadata +32 -6
- data/sample/calc.output +0 -263
- data/sample/calc.y +0 -101
- data/sample/parse.y +0 -59
data/lib/lrama/parser.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
#
|
2
2
|
# DO NOT MODIFY!!!!
|
3
|
-
# This file is automatically generated by Racc 1.
|
3
|
+
# This file is automatically generated by Racc 1.8.1
|
4
4
|
# from Racc grammar file "parser.y".
|
5
5
|
#
|
6
6
|
|
@@ -23,7 +23,7 @@ unless $".find {|p| p.end_with?('/racc/info.rb')}
|
|
23
23
|
$".push "#{__dir__}/racc/info.rb"
|
24
24
|
|
25
25
|
module Racc
|
26
|
-
VERSION = '1.
|
26
|
+
VERSION = '1.8.1'
|
27
27
|
Version = VERSION
|
28
28
|
Copyright = 'Copyright (c) 1999-2006 Minero Aoki'
|
29
29
|
end
|
@@ -31,10 +31,6 @@ end
|
|
31
31
|
end
|
32
32
|
|
33
33
|
|
34
|
-
unless defined?(NotImplementedError)
|
35
|
-
NotImplementedError = NotImplementError # :nodoc:
|
36
|
-
end
|
37
|
-
|
38
34
|
module Racc
|
39
35
|
class ParseError < StandardError; end
|
40
36
|
end
|
@@ -42,7 +38,7 @@ unless defined?(::ParseError)
|
|
42
38
|
ParseError = Racc::ParseError # :nodoc:
|
43
39
|
end
|
44
40
|
|
45
|
-
# Racc is
|
41
|
+
# Racc is an LALR(1) parser generator.
|
46
42
|
# It is written in Ruby itself, and generates Ruby programs.
|
47
43
|
#
|
48
44
|
# == Command-line Reference
|
@@ -658,7 +654,7 @@ end
|
|
658
654
|
module Lrama
|
659
655
|
class Parser < Racc::Parser
|
660
656
|
|
661
|
-
module_eval(<<'...end parser.y/module_eval...', 'parser.y',
|
657
|
+
module_eval(<<'...end parser.y/module_eval...', 'parser.y', 428)
|
662
658
|
|
663
659
|
include Lrama::Report::Duration
|
664
660
|
|
@@ -732,322 +728,306 @@ end
|
|
732
728
|
##### State transition tables begin ###
|
733
729
|
|
734
730
|
racc_action_table = [
|
735
|
-
|
736
|
-
|
737
|
-
|
738
|
-
|
739
|
-
|
740
|
-
|
741
|
-
27, 28, 29, 30, 31, 32, 33, 34,
|
742
|
-
|
743
|
-
|
744
|
-
|
745
|
-
|
746
|
-
|
747
|
-
|
748
|
-
|
749
|
-
|
750
|
-
|
751
|
-
|
752
|
-
|
753
|
-
|
754
|
-
|
755
|
-
|
756
|
-
|
757
|
-
|
758
|
-
|
759
|
-
|
760
|
-
|
761
|
-
|
762
|
-
|
763
|
-
|
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 ]
|
764
760
|
|
765
761
|
racc_action_check = [
|
766
|
-
|
767
|
-
|
768
|
-
|
769
|
-
|
770
|
-
|
771
|
-
159,
|
772
|
-
|
773
|
-
|
774
|
-
|
775
|
-
|
776
|
-
|
777
|
-
|
778
|
-
|
779
|
-
|
780
|
-
|
781
|
-
|
782
|
-
|
783
|
-
|
784
|
-
|
785
|
-
|
786
|
-
214,
|
787
|
-
|
788
|
-
|
789
|
-
|
790
|
-
|
791
|
-
|
792
|
-
|
793
|
-
|
794
|
-
|
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
|
+
8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
|
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 ]
|
795
791
|
|
796
792
|
racc_action_pointer = [
|
797
|
-
|
798
|
-
nil,
|
799
|
-
|
800
|
-
|
801
|
-
|
802
|
-
nil,
|
803
|
-
|
804
|
-
|
805
|
-
|
806
|
-
nil, nil, nil,
|
807
|
-
nil, nil,
|
808
|
-
nil,
|
809
|
-
|
810
|
-
nil, nil, nil, nil,
|
811
|
-
|
812
|
-
|
813
|
-
nil,
|
814
|
-
nil,
|
815
|
-
|
816
|
-
|
817
|
-
|
818
|
-
|
819
|
-
260, 273, 262, 160, nil, nil, 232, nil, 233, nil,
|
820
|
-
277, 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 ]
|
821
815
|
|
822
816
|
racc_action_default = [
|
823
|
-
-
|
824
|
-
|
825
|
-
-
|
826
|
-
-
|
827
|
-
-
|
828
|
-
|
829
|
-
|
830
|
-
-
|
831
|
-
|
832
|
-
|
833
|
-
|
834
|
-
-
|
835
|
-
|
836
|
-
-
|
837
|
-
-
|
838
|
-
-
|
839
|
-
|
840
|
-
|
841
|
-
-
|
842
|
-
-
|
843
|
-
-
|
844
|
-
|
845
|
-
-138, -136, -138, -138, -108, -117, -120, -66, -120, -119,
|
846
|
-
-136, -69, -111 ]
|
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 ]
|
847
839
|
|
848
840
|
racc_goto_table = [
|
849
|
-
|
850
|
-
|
851
|
-
|
852
|
-
|
853
|
-
|
854
|
-
|
855
|
-
|
856
|
-
|
857
|
-
|
858
|
-
|
859
|
-
|
860
|
-
|
861
|
-
nil, nil,
|
862
|
-
nil, nil,
|
863
|
-
nil, nil, nil, nil, nil, nil, nil, nil,
|
864
|
-
|
865
|
-
nil,
|
866
|
-
|
867
|
-
nil,
|
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 ]
|
868
860
|
|
869
861
|
racc_goto_check = [
|
870
|
-
|
871
|
-
|
872
|
-
|
873
|
-
|
874
|
-
|
875
|
-
|
876
|
-
|
877
|
-
|
878
|
-
|
879
|
-
|
880
|
-
|
881
|
-
|
882
|
-
nil, nil,
|
883
|
-
nil, nil,
|
884
|
-
nil, nil, nil, nil, nil, nil, nil, nil,
|
885
|
-
|
886
|
-
nil, nil, nil, nil, nil, nil, nil,
|
887
|
-
|
888
|
-
nil,
|
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 ]
|
889
881
|
|
890
882
|
racc_goto_pointer = [
|
891
|
-
nil,
|
892
|
-
34, 38,
|
893
|
-
nil,
|
894
|
-
|
895
|
-
|
896
|
-
|
897
|
-
-114, -63, -107, 13, -181 ]
|
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 ]
|
898
889
|
|
899
890
|
racc_goto_default = [
|
900
|
-
nil, nil,
|
901
|
-
|
902
|
-
|
903
|
-
nil, nil, nil, nil,
|
904
|
-
nil,
|
905
|
-
|
906
|
-
nil, nil, nil, nil, 195 ]
|
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 ]
|
907
897
|
|
908
898
|
racc_reduce_table = [
|
909
899
|
0, 0, :racc_error,
|
910
|
-
|
911
|
-
|
912
|
-
|
913
|
-
|
914
|
-
|
915
|
-
|
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,
|
912
|
+
2, 59, :_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,
|
916
925
|
2, 60, :_reduce_none,
|
917
|
-
|
918
|
-
|
919
|
-
1,
|
920
|
-
|
921
|
-
|
922
|
-
|
923
|
-
|
924
|
-
|
925
|
-
|
926
|
-
|
927
|
-
|
928
|
-
|
929
|
-
|
930
|
-
|
931
|
-
|
932
|
-
|
933
|
-
1, 63, :_reduce_24,
|
934
|
-
1, 63, :_reduce_none,
|
935
|
-
0, 76, :_reduce_26,
|
936
|
-
0, 77, :_reduce_27,
|
937
|
-
6, 64, :_reduce_28,
|
938
|
-
1, 64, :_reduce_none,
|
939
|
-
0, 78, :_reduce_30,
|
940
|
-
0, 79, :_reduce_31,
|
941
|
-
7, 64, :_reduce_32,
|
942
|
-
0, 80, :_reduce_33,
|
943
|
-
0, 81, :_reduce_34,
|
944
|
-
7, 64, :_reduce_35,
|
945
|
-
0, 82, :_reduce_36,
|
946
|
-
0, 83, :_reduce_37,
|
947
|
-
7, 64, :_reduce_38,
|
948
|
-
2, 64, :_reduce_39,
|
949
|
-
2, 64, :_reduce_40,
|
950
|
-
2, 64, :_reduce_41,
|
951
|
-
2, 64, :_reduce_42,
|
952
|
-
2, 64, :_reduce_43,
|
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,
|
931
|
+
1, 69, :_reduce_none,
|
932
|
+
1, 69, :_reduce_none,
|
933
|
+
1, 69, :_reduce_none,
|
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,
|
953
942
|
2, 74, :_reduce_none,
|
943
|
+
2, 74, :_reduce_44,
|
954
944
|
2, 74, :_reduce_45,
|
955
945
|
2, 74, :_reduce_46,
|
956
946
|
2, 74, :_reduce_47,
|
957
947
|
2, 74, :_reduce_48,
|
958
948
|
2, 74, :_reduce_49,
|
959
|
-
|
960
|
-
|
961
|
-
|
962
|
-
|
963
|
-
2,
|
964
|
-
3,
|
965
|
-
|
966
|
-
|
967
|
-
|
968
|
-
|
969
|
-
|
970
|
-
|
971
|
-
|
972
|
-
|
973
|
-
|
974
|
-
3,
|
975
|
-
|
976
|
-
|
977
|
-
0,
|
978
|
-
7, 96, :_reduce_69,
|
979
|
-
3, 96, :_reduce_70,
|
980
|
-
0, 90, :_reduce_none,
|
981
|
-
1, 90, :_reduce_none,
|
982
|
-
0, 91, :_reduce_none,
|
983
|
-
1, 91, :_reduce_none,
|
984
|
-
1, 85, :_reduce_75,
|
985
|
-
2, 85, :_reduce_76,
|
986
|
-
3, 85, :_reduce_77,
|
987
|
-
1, 103, :_reduce_78,
|
988
|
-
2, 103, :_reduce_79,
|
989
|
-
1, 97, :_reduce_none,
|
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,
|
990
968
|
1, 97, :_reduce_none,
|
991
|
-
|
992
|
-
|
993
|
-
|
994
|
-
|
995
|
-
|
996
|
-
|
997
|
-
|
998
|
-
|
999
|
-
|
1000
|
-
1,
|
1001
|
-
2,
|
1002
|
-
|
1003
|
-
|
1004
|
-
1,
|
1005
|
-
1,
|
1006
|
-
|
1007
|
-
|
1008
|
-
|
1009
|
-
|
1010
|
-
|
1011
|
-
|
1012
|
-
2,
|
1013
|
-
|
1014
|
-
1,
|
1015
|
-
|
1016
|
-
|
1017
|
-
|
1018
|
-
|
1019
|
-
|
1020
|
-
|
1021
|
-
|
1022
|
-
|
1023
|
-
1,
|
1024
|
-
|
1025
|
-
|
1026
|
-
|
1027
|
-
|
1028
|
-
|
1029
|
-
|
1030
|
-
|
1031
|
-
1,
|
1032
|
-
0,
|
1033
|
-
|
1034
|
-
|
1035
|
-
|
1036
|
-
|
1037
|
-
|
1038
|
-
|
1039
|
-
|
1040
|
-
|
1041
|
-
|
1042
|
-
|
1043
|
-
1,
|
1044
|
-
|
1045
|
-
|
1046
|
-
1,
|
1047
|
-
|
1048
|
-
|
1049
|
-
|
1050
|
-
|
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
|
1051
1031
|
|
1052
1032
|
racc_token_table = {
|
1053
1033
|
false => 0,
|
@@ -1069,43 +1049,46 @@ racc_token_table = {
|
|
1069
1049
|
"%lex-param" => 16,
|
1070
1050
|
"%parse-param" => 17,
|
1071
1051
|
"%code" => 18,
|
1072
|
-
"
|
1073
|
-
"
|
1074
|
-
"%
|
1075
|
-
"
|
1076
|
-
"
|
1077
|
-
"%
|
1078
|
-
"%
|
1079
|
-
"%
|
1080
|
-
"%
|
1081
|
-
"%
|
1082
|
-
"%
|
1083
|
-
"%after-
|
1084
|
-
"%after-
|
1085
|
-
"
|
1052
|
+
"%initial-action" => 19,
|
1053
|
+
"%no-stdlib" => 20,
|
1054
|
+
"%locations" => 21,
|
1055
|
+
";" => 22,
|
1056
|
+
"%union" => 23,
|
1057
|
+
"%destructor" => 24,
|
1058
|
+
"%printer" => 25,
|
1059
|
+
"%error-token" => 26,
|
1060
|
+
"%after-shift" => 27,
|
1061
|
+
"%before-reduce" => 28,
|
1062
|
+
"%after-reduce" => 29,
|
1063
|
+
"%after-shift-error-token" => 30,
|
1064
|
+
"%after-pop-stack" => 31,
|
1065
|
+
"-temp-group" => 32,
|
1086
1066
|
"%token" => 33,
|
1087
1067
|
"%type" => 34,
|
1088
|
-
"%
|
1089
|
-
"%
|
1090
|
-
"%
|
1091
|
-
"%
|
1092
|
-
"%
|
1093
|
-
"
|
1094
|
-
"
|
1095
|
-
"
|
1096
|
-
"
|
1097
|
-
"
|
1098
|
-
"
|
1099
|
-
"
|
1100
|
-
"%
|
1101
|
-
"
|
1102
|
-
"
|
1103
|
-
"
|
1104
|
-
"
|
1105
|
-
"
|
1106
|
-
"
|
1107
|
-
|
1108
|
-
|
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
|
1109
1092
|
|
1110
1093
|
racc_use_result_var = true
|
1111
1094
|
|
@@ -1146,10 +1129,9 @@ Racc_token_to_s_table = [
|
|
1146
1129
|
"\"%lex-param\"",
|
1147
1130
|
"\"%parse-param\"",
|
1148
1131
|
"\"%code\"",
|
1149
|
-
"\"{\"",
|
1150
|
-
"\"}\"",
|
1151
1132
|
"\"%initial-action\"",
|
1152
1133
|
"\"%no-stdlib\"",
|
1134
|
+
"\"%locations\"",
|
1153
1135
|
"\";\"",
|
1154
1136
|
"\"%union\"",
|
1155
1137
|
"\"%destructor\"",
|
@@ -1160,8 +1142,10 @@ Racc_token_to_s_table = [
|
|
1160
1142
|
"\"%after-reduce\"",
|
1161
1143
|
"\"%after-shift-error-token\"",
|
1162
1144
|
"\"%after-pop-stack\"",
|
1145
|
+
"\"-temp-group\"",
|
1163
1146
|
"\"%token\"",
|
1164
1147
|
"\"%type\"",
|
1148
|
+
"\"%nterm\"",
|
1165
1149
|
"\"%left\"",
|
1166
1150
|
"\"%right\"",
|
1167
1151
|
"\"%precedence\"",
|
@@ -1175,6 +1159,8 @@ Racc_token_to_s_table = [
|
|
1175
1159
|
"\"|\"",
|
1176
1160
|
"\"%empty\"",
|
1177
1161
|
"\"%prec\"",
|
1162
|
+
"\"{\"",
|
1163
|
+
"\"}\"",
|
1178
1164
|
"\"?\"",
|
1179
1165
|
"\"+\"",
|
1180
1166
|
"\"*\"",
|
@@ -1183,69 +1169,59 @@ Racc_token_to_s_table = [
|
|
1183
1169
|
"\"{...}\"",
|
1184
1170
|
"$start",
|
1185
1171
|
"input",
|
1186
|
-
"prologue_declarations",
|
1187
|
-
"bison_declarations",
|
1188
|
-
"grammar",
|
1189
|
-
"epilogue_opt",
|
1190
1172
|
"prologue_declaration",
|
1173
|
+
"bison_declaration",
|
1174
|
+
"rules_or_grammar_declaration",
|
1175
|
+
"epilogue_declaration",
|
1176
|
+
"\"-many@prologue_declaration\"",
|
1177
|
+
"\"-many@bison_declaration\"",
|
1178
|
+
"\"-many1@rules_or_grammar_declaration\"",
|
1179
|
+
"\"-option@epilogue_declaration\"",
|
1191
1180
|
"@1",
|
1192
1181
|
"@2",
|
1193
|
-
"bison_declaration",
|
1194
1182
|
"grammar_declaration",
|
1195
|
-
"rule_declaration",
|
1196
|
-
"inline_declaration",
|
1197
1183
|
"variable",
|
1198
1184
|
"value",
|
1199
|
-
"
|
1200
|
-
"@
|
1201
|
-
"@4",
|
1202
|
-
"@5",
|
1203
|
-
"@6",
|
1185
|
+
"param",
|
1186
|
+
"\"-many1@param\"",
|
1204
1187
|
"symbol_declaration",
|
1205
|
-
"
|
1206
|
-
"
|
1207
|
-
"
|
1208
|
-
"@
|
1209
|
-
"@
|
1210
|
-
"@11",
|
1211
|
-
"@12",
|
1212
|
-
"@13",
|
1213
|
-
"@14",
|
1188
|
+
"rule_declaration",
|
1189
|
+
"inline_declaration",
|
1190
|
+
"symbol",
|
1191
|
+
"\"-group@symbol|TAG\"",
|
1192
|
+
"\"-many1@-group@symbol|TAG\"",
|
1214
1193
|
"token_declarations",
|
1215
1194
|
"symbol_declarations",
|
1216
1195
|
"token_declarations_for_precedence",
|
1217
|
-
"token_declaration_list",
|
1218
1196
|
"token_declaration",
|
1197
|
+
"\"-option@TAG\"",
|
1198
|
+
"\"-many1@token_declaration\"",
|
1219
1199
|
"id",
|
1220
|
-
"int_opt",
|
1221
1200
|
"alias",
|
1201
|
+
"\"-option@INTEGER\"",
|
1222
1202
|
"rule_args",
|
1223
|
-
"tag_opt",
|
1224
1203
|
"rule_rhs_list",
|
1225
|
-
"id_colon",
|
1226
1204
|
"rule_rhs",
|
1227
|
-
"
|
1228
|
-
"named_ref_opt",
|
1205
|
+
"named_ref",
|
1229
1206
|
"parameterizing_suffix",
|
1230
1207
|
"parameterizing_args",
|
1231
|
-
"
|
1232
|
-
"
|
1233
|
-
"
|
1208
|
+
"midrule_action",
|
1209
|
+
"\"-option@%empty\"",
|
1210
|
+
"\"-option@named_ref\"",
|
1234
1211
|
"string_as_id",
|
1235
|
-
"@
|
1236
|
-
"@
|
1237
|
-
"@
|
1238
|
-
"@
|
1239
|
-
"
|
1240
|
-
"token_declaration_for_precedence",
|
1241
|
-
"rules_or_grammar_declaration",
|
1212
|
+
"\"-option@string_as_id\"",
|
1213
|
+
"\"-many1@symbol\"",
|
1214
|
+
"@3",
|
1215
|
+
"@4",
|
1216
|
+
"\"-many1@id\"",
|
1242
1217
|
"rules",
|
1218
|
+
"\"-option@;\"",
|
1243
1219
|
"rhs_list",
|
1244
1220
|
"rhs",
|
1245
|
-
"@
|
1246
|
-
"@
|
1247
|
-
"@
|
1248
|
-
"
|
1221
|
+
"\"-option@parameterizing_suffix\"",
|
1222
|
+
"@5",
|
1223
|
+
"@6",
|
1224
|
+
"@7" ]
|
1249
1225
|
Ractor.make_shareable(Racc_token_to_s_table) if defined?(Ractor)
|
1250
1226
|
|
1251
1227
|
Racc_debug_parser = true
|
@@ -1254,302 +1230,304 @@ Racc_debug_parser = true
|
|
1254
1230
|
|
1255
1231
|
# reduce 0 omitted
|
1256
1232
|
|
1257
|
-
|
1233
|
+
module_eval(<<'.,.,', 'parser.y', 11)
|
1234
|
+
def _reduce_1(val, _values, result)
|
1235
|
+
result = val[1] ? val[1].unshift(val[0]) : val
|
1236
|
+
result
|
1237
|
+
end
|
1238
|
+
.,.,
|
1258
1239
|
|
1259
|
-
|
1240
|
+
module_eval(<<'.,.,', 'parser.y', 11)
|
1241
|
+
def _reduce_2(val, _values, result)
|
1242
|
+
result = val[1] ? val[1].unshift(val[0]) : val
|
1243
|
+
result
|
1244
|
+
end
|
1245
|
+
.,.,
|
1260
1246
|
|
1261
|
-
|
1247
|
+
module_eval(<<'.,.,', 'parser.y', 11)
|
1248
|
+
def _reduce_3(val, _values, result)
|
1249
|
+
result = val[1] ? val[1].unshift(val[0]) : val
|
1250
|
+
result
|
1251
|
+
end
|
1252
|
+
.,.,
|
1262
1253
|
|
1263
|
-
module_eval(<<'.,.,', 'parser.y',
|
1254
|
+
module_eval(<<'.,.,', 'parser.y', 11)
|
1264
1255
|
def _reduce_4(val, _values, result)
|
1265
|
-
|
1266
|
-
@grammar.prologue_first_lineno = @lexer.line
|
1267
|
-
|
1256
|
+
result = val[1] ? val[1].unshift(val[0]) : val
|
1268
1257
|
result
|
1269
1258
|
end
|
1270
1259
|
.,.,
|
1271
1260
|
|
1272
|
-
module_eval(<<'.,.,', 'parser.y',
|
1261
|
+
module_eval(<<'.,.,', 'parser.y', 11)
|
1273
1262
|
def _reduce_5(val, _values, result)
|
1274
|
-
|
1275
|
-
|
1263
|
+
result = val[1] ? val[1].unshift(val[0]) : val
|
1276
1264
|
result
|
1277
1265
|
end
|
1278
1266
|
.,.,
|
1279
1267
|
|
1280
|
-
module_eval(<<'.,.,', 'parser.y',
|
1268
|
+
module_eval(<<'.,.,', 'parser.y', 11)
|
1281
1269
|
def _reduce_6(val, _values, result)
|
1282
|
-
|
1283
|
-
|
1270
|
+
result = val[1] ? val[1].unshift(val[0]) : val
|
1284
1271
|
result
|
1285
1272
|
end
|
1286
1273
|
.,.,
|
1287
1274
|
|
1288
1275
|
# reduce 7 omitted
|
1289
1276
|
|
1290
|
-
|
1291
|
-
def _reduce_8(val, _values, result)
|
1292
|
-
result = ""
|
1293
|
-
result
|
1294
|
-
end
|
1295
|
-
.,.,
|
1277
|
+
# reduce 8 omitted
|
1296
1278
|
|
1297
1279
|
# reduce 9 omitted
|
1298
1280
|
|
1299
|
-
|
1300
|
-
|
1301
|
-
|
1302
|
-
|
1303
|
-
# reduce 12 omitted
|
1281
|
+
module_eval(<<'.,.,', 'parser.y', 12)
|
1282
|
+
def _reduce_10(val, _values, result)
|
1283
|
+
begin_c_declaration("%}")
|
1284
|
+
@grammar.prologue_first_lineno = @lexer.line
|
1304
1285
|
|
1305
|
-
module_eval(<<'.,.,', 'parser.y', 33)
|
1306
|
-
def _reduce_13(val, _values, result)
|
1307
|
-
@grammar.expect = val[1]
|
1308
1286
|
result
|
1309
1287
|
end
|
1310
1288
|
.,.,
|
1311
1289
|
|
1312
|
-
|
1313
|
-
|
1314
|
-
|
1315
|
-
|
1316
|
-
module_eval(<<'.,.,', 'parser.y', 38)
|
1317
|
-
def _reduce_16(val, _values, result)
|
1318
|
-
val[1].each {|token|
|
1319
|
-
@grammar.lex_param = Grammar::Code::NoReferenceCode.new(type: :lex_param, token_code: token).token_code.s_value
|
1320
|
-
}
|
1290
|
+
module_eval(<<'.,.,', 'parser.y', 17)
|
1291
|
+
def _reduce_11(val, _values, result)
|
1292
|
+
end_c_declaration
|
1321
1293
|
|
1322
1294
|
result
|
1323
1295
|
end
|
1324
1296
|
.,.,
|
1325
1297
|
|
1326
|
-
module_eval(<<'.,.,', 'parser.y',
|
1327
|
-
def
|
1328
|
-
|
1329
|
-
@grammar.parse_param = Grammar::Code::NoReferenceCode.new(type: :parse_param, token_code: token).token_code.s_value
|
1330
|
-
}
|
1298
|
+
module_eval(<<'.,.,', 'parser.y', 21)
|
1299
|
+
def _reduce_12(val, _values, result)
|
1300
|
+
@grammar.prologue = val[2].s_value
|
1331
1301
|
|
1332
1302
|
result
|
1333
1303
|
end
|
1334
1304
|
.,.,
|
1335
1305
|
|
1336
|
-
|
1337
|
-
def _reduce_18(val, _values, result)
|
1338
|
-
begin_c_declaration("}")
|
1306
|
+
# reduce 13 omitted
|
1339
1307
|
|
1308
|
+
module_eval(<<'.,.,', 'parser.y', 54)
|
1309
|
+
def _reduce_14(val, _values, result)
|
1310
|
+
result = val[1] ? val[1].unshift(val[0]) : val
|
1340
1311
|
result
|
1341
1312
|
end
|
1342
1313
|
.,.,
|
1343
1314
|
|
1344
1315
|
module_eval(<<'.,.,', 'parser.y', 54)
|
1345
|
-
def
|
1346
|
-
|
1316
|
+
def _reduce_15(val, _values, result)
|
1317
|
+
result = val[1] ? val[1].unshift(val[0]) : val
|
1318
|
+
result
|
1319
|
+
end
|
1320
|
+
.,.,
|
1321
|
+
|
1322
|
+
# reduce 16 omitted
|
1347
1323
|
|
1324
|
+
module_eval(<<'.,.,', 'parser.y', 26)
|
1325
|
+
def _reduce_17(val, _values, result)
|
1326
|
+
@grammar.expect = val[1]
|
1348
1327
|
result
|
1349
1328
|
end
|
1350
1329
|
.,.,
|
1351
1330
|
|
1352
|
-
|
1331
|
+
# reduce 18 omitted
|
1332
|
+
|
1333
|
+
# reduce 19 omitted
|
1334
|
+
|
1335
|
+
module_eval(<<'.,.,', 'parser.y', 31)
|
1353
1336
|
def _reduce_20(val, _values, result)
|
1354
|
-
|
1337
|
+
val[1].each {|token|
|
1338
|
+
@grammar.lex_param = Grammar::Code::NoReferenceCode.new(type: :lex_param, token_code: token).token_code.s_value
|
1339
|
+
}
|
1355
1340
|
|
1356
1341
|
result
|
1357
1342
|
end
|
1358
1343
|
.,.,
|
1359
1344
|
|
1360
|
-
module_eval(<<'.,.,', 'parser.y',
|
1345
|
+
module_eval(<<'.,.,', 'parser.y', 37)
|
1361
1346
|
def _reduce_21(val, _values, result)
|
1362
|
-
|
1347
|
+
val[1].each {|token|
|
1348
|
+
@grammar.parse_param = Grammar::Code::NoReferenceCode.new(type: :parse_param, token_code: token).token_code.s_value
|
1349
|
+
}
|
1363
1350
|
|
1364
1351
|
result
|
1365
1352
|
end
|
1366
1353
|
.,.,
|
1367
1354
|
|
1368
|
-
module_eval(<<'.,.,', 'parser.y',
|
1355
|
+
module_eval(<<'.,.,', 'parser.y', 43)
|
1369
1356
|
def _reduce_22(val, _values, result)
|
1370
|
-
|
1357
|
+
@grammar.add_percent_code(id: val[1], code: val[2])
|
1371
1358
|
|
1372
1359
|
result
|
1373
1360
|
end
|
1374
1361
|
.,.,
|
1375
1362
|
|
1376
|
-
module_eval(<<'.,.,', 'parser.y',
|
1363
|
+
module_eval(<<'.,.,', 'parser.y', 47)
|
1377
1364
|
def _reduce_23(val, _values, result)
|
1378
|
-
@grammar.initial_action = Grammar::Code::InitialActionCode.new(type: :initial_action, token_code: val[
|
1365
|
+
@grammar.initial_action = Grammar::Code::InitialActionCode.new(type: :initial_action, token_code: val[1])
|
1379
1366
|
|
1380
1367
|
result
|
1381
1368
|
end
|
1382
1369
|
.,.,
|
1383
1370
|
|
1384
|
-
module_eval(<<'.,.,', 'parser.y',
|
1371
|
+
module_eval(<<'.,.,', 'parser.y', 49)
|
1385
1372
|
def _reduce_24(val, _values, result)
|
1386
1373
|
@grammar.no_stdlib = true
|
1387
1374
|
result
|
1388
1375
|
end
|
1389
1376
|
.,.,
|
1390
1377
|
|
1391
|
-
|
1392
|
-
|
1393
|
-
|
1394
|
-
def _reduce_26(val, _values, result)
|
1395
|
-
begin_c_declaration("}")
|
1396
|
-
|
1378
|
+
module_eval(<<'.,.,', 'parser.y', 50)
|
1379
|
+
def _reduce_25(val, _values, result)
|
1380
|
+
@grammar.locations = true
|
1397
1381
|
result
|
1398
1382
|
end
|
1399
1383
|
.,.,
|
1400
1384
|
|
1401
|
-
|
1402
|
-
def _reduce_27(val, _values, result)
|
1403
|
-
end_c_declaration
|
1385
|
+
# reduce 26 omitted
|
1404
1386
|
|
1387
|
+
module_eval(<<'.,.,', 'parser.y', 109)
|
1388
|
+
def _reduce_27(val, _values, result)
|
1389
|
+
result = val
|
1405
1390
|
result
|
1406
1391
|
end
|
1407
1392
|
.,.,
|
1408
1393
|
|
1409
|
-
module_eval(<<'.,.,', 'parser.y',
|
1394
|
+
module_eval(<<'.,.,', 'parser.y', 109)
|
1410
1395
|
def _reduce_28(val, _values, result)
|
1411
|
-
|
1412
|
-
Grammar::Code::NoReferenceCode.new(type: :union, token_code: val[3]),
|
1413
|
-
val[3].line
|
1414
|
-
)
|
1415
|
-
|
1396
|
+
result = val
|
1416
1397
|
result
|
1417
1398
|
end
|
1418
1399
|
.,.,
|
1419
1400
|
|
1420
|
-
|
1421
|
-
|
1422
|
-
|
1423
|
-
def _reduce_30(val, _values, result)
|
1424
|
-
begin_c_declaration("}")
|
1425
|
-
|
1401
|
+
module_eval(<<'.,.,', 'parser.y', 109)
|
1402
|
+
def _reduce_29(val, _values, result)
|
1403
|
+
result = val[1] ? val[1].unshift(val[0]) : val
|
1426
1404
|
result
|
1427
1405
|
end
|
1428
1406
|
.,.,
|
1429
1407
|
|
1430
|
-
module_eval(<<'.,.,', 'parser.y',
|
1431
|
-
def
|
1432
|
-
|
1433
|
-
|
1408
|
+
module_eval(<<'.,.,', 'parser.y', 109)
|
1409
|
+
def _reduce_30(val, _values, result)
|
1410
|
+
result = val[1] ? val[1].unshift(val[0]) : val
|
1434
1411
|
result
|
1435
1412
|
end
|
1436
1413
|
.,.,
|
1437
1414
|
|
1438
|
-
module_eval(<<'.,.,', 'parser.y',
|
1439
|
-
def
|
1440
|
-
@grammar.
|
1441
|
-
|
1442
|
-
|
1443
|
-
lineno: val[3].line
|
1415
|
+
module_eval(<<'.,.,', 'parser.y', 55)
|
1416
|
+
def _reduce_31(val, _values, result)
|
1417
|
+
@grammar.set_union(
|
1418
|
+
Grammar::Code::NoReferenceCode.new(type: :union, token_code: val[1]),
|
1419
|
+
val[1].line
|
1444
1420
|
)
|
1445
1421
|
|
1446
1422
|
result
|
1447
1423
|
end
|
1448
1424
|
.,.,
|
1449
1425
|
|
1450
|
-
|
1451
|
-
def _reduce_33(val, _values, result)
|
1452
|
-
begin_c_declaration("}")
|
1453
|
-
|
1454
|
-
result
|
1455
|
-
end
|
1456
|
-
.,.,
|
1426
|
+
# reduce 32 omitted
|
1457
1427
|
|
1458
|
-
|
1459
|
-
def _reduce_34(val, _values, result)
|
1460
|
-
end_c_declaration
|
1428
|
+
# reduce 33 omitted
|
1461
1429
|
|
1462
|
-
|
1463
|
-
end
|
1464
|
-
.,.,
|
1430
|
+
# reduce 34 omitted
|
1465
1431
|
|
1466
|
-
module_eval(<<'.,.,', 'parser.y',
|
1432
|
+
module_eval(<<'.,.,', 'parser.y', 65)
|
1467
1433
|
def _reduce_35(val, _values, result)
|
1468
|
-
@grammar.
|
1469
|
-
ident_or_tags: val[
|
1470
|
-
token_code: val[
|
1471
|
-
lineno: val[
|
1434
|
+
@grammar.add_destructor(
|
1435
|
+
ident_or_tags: val[2].flatten,
|
1436
|
+
token_code: val[1],
|
1437
|
+
lineno: val[1].line
|
1472
1438
|
)
|
1473
1439
|
|
1474
1440
|
result
|
1475
1441
|
end
|
1476
1442
|
.,.,
|
1477
1443
|
|
1478
|
-
module_eval(<<'.,.,', 'parser.y',
|
1444
|
+
module_eval(<<'.,.,', 'parser.y', 73)
|
1479
1445
|
def _reduce_36(val, _values, result)
|
1480
|
-
|
1446
|
+
@grammar.add_printer(
|
1447
|
+
ident_or_tags: val[2].flatten,
|
1448
|
+
token_code: val[1],
|
1449
|
+
lineno: val[1].line
|
1450
|
+
)
|
1481
1451
|
|
1482
1452
|
result
|
1483
1453
|
end
|
1484
1454
|
.,.,
|
1485
1455
|
|
1486
|
-
module_eval(<<'.,.,', 'parser.y',
|
1456
|
+
module_eval(<<'.,.,', 'parser.y', 81)
|
1487
1457
|
def _reduce_37(val, _values, result)
|
1488
|
-
|
1458
|
+
@grammar.add_error_token(
|
1459
|
+
ident_or_tags: val[2].flatten,
|
1460
|
+
token_code: val[1],
|
1461
|
+
lineno: val[1].line
|
1462
|
+
)
|
1489
1463
|
|
1490
1464
|
result
|
1491
1465
|
end
|
1492
1466
|
.,.,
|
1493
1467
|
|
1494
|
-
module_eval(<<'.,.,', 'parser.y',
|
1468
|
+
module_eval(<<'.,.,', 'parser.y', 89)
|
1495
1469
|
def _reduce_38(val, _values, result)
|
1496
|
-
@grammar.
|
1497
|
-
ident_or_tags: val[6],
|
1498
|
-
token_code: val[3],
|
1499
|
-
lineno: val[3].line
|
1500
|
-
)
|
1470
|
+
@grammar.after_shift = val[1]
|
1501
1471
|
|
1502
1472
|
result
|
1503
1473
|
end
|
1504
1474
|
.,.,
|
1505
1475
|
|
1506
|
-
module_eval(<<'.,.,', 'parser.y',
|
1476
|
+
module_eval(<<'.,.,', 'parser.y', 93)
|
1507
1477
|
def _reduce_39(val, _values, result)
|
1508
|
-
@grammar.
|
1478
|
+
@grammar.before_reduce = val[1]
|
1509
1479
|
|
1510
1480
|
result
|
1511
1481
|
end
|
1512
1482
|
.,.,
|
1513
1483
|
|
1514
|
-
module_eval(<<'.,.,', 'parser.y',
|
1484
|
+
module_eval(<<'.,.,', 'parser.y', 97)
|
1515
1485
|
def _reduce_40(val, _values, result)
|
1516
|
-
@grammar.
|
1486
|
+
@grammar.after_reduce = val[1]
|
1517
1487
|
|
1518
1488
|
result
|
1519
1489
|
end
|
1520
1490
|
.,.,
|
1521
1491
|
|
1522
|
-
module_eval(<<'.,.,', 'parser.y',
|
1492
|
+
module_eval(<<'.,.,', 'parser.y', 101)
|
1523
1493
|
def _reduce_41(val, _values, result)
|
1524
|
-
@grammar.
|
1494
|
+
@grammar.after_shift_error_token = val[1]
|
1525
1495
|
|
1526
1496
|
result
|
1527
1497
|
end
|
1528
1498
|
.,.,
|
1529
1499
|
|
1530
|
-
module_eval(<<'.,.,', 'parser.y',
|
1500
|
+
module_eval(<<'.,.,', 'parser.y', 105)
|
1531
1501
|
def _reduce_42(val, _values, result)
|
1532
|
-
@grammar.
|
1502
|
+
@grammar.after_pop_stack = val[1]
|
1533
1503
|
|
1534
1504
|
result
|
1535
1505
|
end
|
1536
1506
|
.,.,
|
1537
1507
|
|
1538
|
-
|
1539
|
-
|
1540
|
-
|
1508
|
+
# reduce 43 omitted
|
1509
|
+
|
1510
|
+
module_eval(<<'.,.,', 'parser.y', 111)
|
1511
|
+
def _reduce_44(val, _values, result)
|
1512
|
+
val[1].each {|hash|
|
1513
|
+
hash[:tokens].each {|id|
|
1514
|
+
@grammar.add_type(id: id, tag: hash[:tag])
|
1515
|
+
}
|
1516
|
+
}
|
1541
1517
|
|
1542
1518
|
result
|
1543
1519
|
end
|
1544
1520
|
.,.,
|
1545
1521
|
|
1546
|
-
|
1547
|
-
|
1548
|
-
module_eval(<<'.,.,', 'parser.y', 163)
|
1522
|
+
module_eval(<<'.,.,', 'parser.y', 119)
|
1549
1523
|
def _reduce_45(val, _values, result)
|
1550
1524
|
val[1].each {|hash|
|
1551
1525
|
hash[:tokens].each {|id|
|
1552
|
-
@grammar.
|
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
|
1553
1531
|
}
|
1554
1532
|
}
|
1555
1533
|
|
@@ -1557,7 +1535,7 @@ module_eval(<<'.,.,', 'parser.y', 163)
|
|
1557
1535
|
end
|
1558
1536
|
.,.,
|
1559
1537
|
|
1560
|
-
module_eval(<<'.,.,', 'parser.y',
|
1538
|
+
module_eval(<<'.,.,', 'parser.y', 131)
|
1561
1539
|
def _reduce_46(val, _values, result)
|
1562
1540
|
val[1].each {|hash|
|
1563
1541
|
hash[:tokens].each {|id|
|
@@ -1571,7 +1549,7 @@ module_eval(<<'.,.,', 'parser.y', 171)
|
|
1571
1549
|
end
|
1572
1550
|
.,.,
|
1573
1551
|
|
1574
|
-
module_eval(<<'.,.,', 'parser.y',
|
1552
|
+
module_eval(<<'.,.,', 'parser.y', 141)
|
1575
1553
|
def _reduce_47(val, _values, result)
|
1576
1554
|
val[1].each {|hash|
|
1577
1555
|
hash[:tokens].each {|id|
|
@@ -1585,7 +1563,7 @@ module_eval(<<'.,.,', 'parser.y', 181)
|
|
1585
1563
|
end
|
1586
1564
|
.,.,
|
1587
1565
|
|
1588
|
-
module_eval(<<'.,.,', 'parser.y',
|
1566
|
+
module_eval(<<'.,.,', 'parser.y', 151)
|
1589
1567
|
def _reduce_48(val, _values, result)
|
1590
1568
|
val[1].each {|hash|
|
1591
1569
|
hash[:tokens].each {|id|
|
@@ -1599,7 +1577,7 @@ module_eval(<<'.,.,', 'parser.y', 191)
|
|
1599
1577
|
end
|
1600
1578
|
.,.,
|
1601
1579
|
|
1602
|
-
module_eval(<<'.,.,', 'parser.y',
|
1580
|
+
module_eval(<<'.,.,', 'parser.y', 161)
|
1603
1581
|
def _reduce_49(val, _values, result)
|
1604
1582
|
val[1].each {|hash|
|
1605
1583
|
hash[:tokens].each {|id|
|
@@ -1613,18 +1591,26 @@ module_eval(<<'.,.,', 'parser.y', 201)
|
|
1613
1591
|
end
|
1614
1592
|
.,.,
|
1615
1593
|
|
1616
|
-
|
1617
|
-
|
1618
|
-
|
1619
|
-
@grammar.add_term(id: token_declaration[0], alias_name: token_declaration[2], token_id: token_declaration[1], tag: nil, replace: true)
|
1620
|
-
}
|
1594
|
+
# reduce 50 omitted
|
1595
|
+
|
1596
|
+
# reduce 51 omitted
|
1621
1597
|
|
1598
|
+
module_eval(<<'.,.,', 'parser.y', 184)
|
1599
|
+
def _reduce_52(val, _values, result)
|
1600
|
+
result = val[1] ? val[1].unshift(val[0]) : val
|
1622
1601
|
result
|
1623
1602
|
end
|
1624
1603
|
.,.,
|
1625
1604
|
|
1626
|
-
module_eval(<<'.,.,', 'parser.y',
|
1627
|
-
def
|
1605
|
+
module_eval(<<'.,.,', 'parser.y', 184)
|
1606
|
+
def _reduce_53(val, _values, result)
|
1607
|
+
result = val[1] ? val[1].unshift(val[0]) : val
|
1608
|
+
result
|
1609
|
+
end
|
1610
|
+
.,.,
|
1611
|
+
|
1612
|
+
module_eval(<<'.,.,', 'parser.y', 172)
|
1613
|
+
def _reduce_54(val, _values, result)
|
1628
1614
|
val[1].each {|token_declaration|
|
1629
1615
|
@grammar.add_term(id: token_declaration[0], alias_name: token_declaration[2], token_id: token_declaration[1], tag: val[0], replace: true)
|
1630
1616
|
}
|
@@ -1633,8 +1619,8 @@ module_eval(<<'.,.,', 'parser.y', 218)
|
|
1633
1619
|
end
|
1634
1620
|
.,.,
|
1635
1621
|
|
1636
|
-
module_eval(<<'.,.,', 'parser.y',
|
1637
|
-
def
|
1622
|
+
module_eval(<<'.,.,', 'parser.y', 178)
|
1623
|
+
def _reduce_55(val, _values, result)
|
1638
1624
|
val[2].each {|token_declaration|
|
1639
1625
|
@grammar.add_term(id: token_declaration[0], alias_name: token_declaration[2], token_id: token_declaration[1], tag: val[1], replace: true)
|
1640
1626
|
}
|
@@ -1643,29 +1629,19 @@ module_eval(<<'.,.,', 'parser.y', 224)
|
|
1643
1629
|
end
|
1644
1630
|
.,.,
|
1645
1631
|
|
1646
|
-
|
1647
|
-
def _reduce_53(val, _values, result)
|
1648
|
-
result = [val[0]]
|
1649
|
-
result
|
1650
|
-
end
|
1651
|
-
.,.,
|
1632
|
+
# reduce 56 omitted
|
1652
1633
|
|
1653
|
-
|
1654
|
-
def _reduce_54(val, _values, result)
|
1655
|
-
result = val[0].append(val[1])
|
1656
|
-
result
|
1657
|
-
end
|
1658
|
-
.,.,
|
1634
|
+
# reduce 57 omitted
|
1659
1635
|
|
1660
|
-
module_eval(<<'.,.,', 'parser.y',
|
1661
|
-
def
|
1636
|
+
module_eval(<<'.,.,', 'parser.y', 183)
|
1637
|
+
def _reduce_58(val, _values, result)
|
1662
1638
|
result = val
|
1663
1639
|
result
|
1664
1640
|
end
|
1665
1641
|
.,.,
|
1666
1642
|
|
1667
|
-
module_eval(<<'.,.,', 'parser.y',
|
1668
|
-
def
|
1643
|
+
module_eval(<<'.,.,', 'parser.y', 187)
|
1644
|
+
def _reduce_59(val, _values, result)
|
1669
1645
|
rule = Grammar::ParameterizingRule::Rule.new(val[1].s_value, val[3], val[7], tag: val[5])
|
1670
1646
|
@grammar.add_parameterizing_rule(rule)
|
1671
1647
|
|
@@ -1673,8 +1649,8 @@ module_eval(<<'.,.,', 'parser.y', 236)
|
|
1673
1649
|
end
|
1674
1650
|
.,.,
|
1675
1651
|
|
1676
|
-
module_eval(<<'.,.,', 'parser.y',
|
1677
|
-
def
|
1652
|
+
module_eval(<<'.,.,', 'parser.y', 193)
|
1653
|
+
def _reduce_60(val, _values, result)
|
1678
1654
|
rule = Grammar::ParameterizingRule::Rule.new(val[2].s_value, [], val[4], is_inline: true)
|
1679
1655
|
@grammar.add_parameterizing_rule(rule)
|
1680
1656
|
|
@@ -1682,22 +1658,31 @@ module_eval(<<'.,.,', 'parser.y', 242)
|
|
1682
1658
|
end
|
1683
1659
|
.,.,
|
1684
1660
|
|
1685
|
-
module_eval(<<'.,.,', 'parser.y',
|
1686
|
-
def
|
1661
|
+
module_eval(<<'.,.,', 'parser.y', 198)
|
1662
|
+
def _reduce_61(val, _values, result)
|
1663
|
+
rule = Grammar::ParameterizingRule::Rule.new(val[2].s_value, val[4], val[7], is_inline: true)
|
1664
|
+
@grammar.add_parameterizing_rule(rule)
|
1665
|
+
|
1666
|
+
result
|
1667
|
+
end
|
1668
|
+
.,.,
|
1669
|
+
|
1670
|
+
module_eval(<<'.,.,', 'parser.y', 202)
|
1671
|
+
def _reduce_62(val, _values, result)
|
1687
1672
|
result = [val[0]]
|
1688
1673
|
result
|
1689
1674
|
end
|
1690
1675
|
.,.,
|
1691
1676
|
|
1692
|
-
module_eval(<<'.,.,', 'parser.y',
|
1693
|
-
def
|
1677
|
+
module_eval(<<'.,.,', 'parser.y', 203)
|
1678
|
+
def _reduce_63(val, _values, result)
|
1694
1679
|
result = val[0].append(val[2])
|
1695
1680
|
result
|
1696
1681
|
end
|
1697
1682
|
.,.,
|
1698
1683
|
|
1699
|
-
module_eval(<<'.,.,', 'parser.y',
|
1700
|
-
def
|
1684
|
+
module_eval(<<'.,.,', 'parser.y', 207)
|
1685
|
+
def _reduce_64(val, _values, result)
|
1701
1686
|
builder = val[0]
|
1702
1687
|
result = [builder]
|
1703
1688
|
|
@@ -1705,8 +1690,8 @@ module_eval(<<'.,.,', 'parser.y', 251)
|
|
1705
1690
|
end
|
1706
1691
|
.,.,
|
1707
1692
|
|
1708
|
-
module_eval(<<'.,.,', 'parser.y',
|
1709
|
-
def
|
1693
|
+
module_eval(<<'.,.,', 'parser.y', 212)
|
1694
|
+
def _reduce_65(val, _values, result)
|
1710
1695
|
builder = val[2]
|
1711
1696
|
result = val[0].append(builder)
|
1712
1697
|
|
@@ -1714,17 +1699,16 @@ module_eval(<<'.,.,', 'parser.y', 256)
|
|
1714
1699
|
end
|
1715
1700
|
.,.,
|
1716
1701
|
|
1717
|
-
|
1718
|
-
def _reduce_62(val, _values, result)
|
1719
|
-
reset_precs
|
1720
|
-
result = Grammar::ParameterizingRule::Rhs.new
|
1702
|
+
# reduce 66 omitted
|
1721
1703
|
|
1722
|
-
|
1723
|
-
end
|
1724
|
-
.,.,
|
1704
|
+
# reduce 67 omitted
|
1725
1705
|
|
1726
|
-
|
1727
|
-
|
1706
|
+
# reduce 68 omitted
|
1707
|
+
|
1708
|
+
# reduce 69 omitted
|
1709
|
+
|
1710
|
+
module_eval(<<'.,.,', 'parser.y', 218)
|
1711
|
+
def _reduce_70(val, _values, result)
|
1728
1712
|
reset_precs
|
1729
1713
|
result = Grammar::ParameterizingRule::Rhs.new
|
1730
1714
|
|
@@ -1732,8 +1716,8 @@ module_eval(<<'.,.,', 'parser.y', 267)
|
|
1732
1716
|
end
|
1733
1717
|
.,.,
|
1734
1718
|
|
1735
|
-
module_eval(<<'.,.,', 'parser.y',
|
1736
|
-
def
|
1719
|
+
module_eval(<<'.,.,', 'parser.y', 223)
|
1720
|
+
def _reduce_71(val, _values, result)
|
1737
1721
|
token = val[1]
|
1738
1722
|
token.alias_name = val[2]
|
1739
1723
|
builder = val[0]
|
@@ -1744,8 +1728,8 @@ module_eval(<<'.,.,', 'parser.y', 272)
|
|
1744
1728
|
end
|
1745
1729
|
.,.,
|
1746
1730
|
|
1747
|
-
module_eval(<<'.,.,', 'parser.y',
|
1748
|
-
def
|
1731
|
+
module_eval(<<'.,.,', 'parser.y', 231)
|
1732
|
+
def _reduce_72(val, _values, result)
|
1749
1733
|
builder = val[0]
|
1750
1734
|
builder.symbols << Lrama::Lexer::Token::InstantiateRule.new(s_value: val[2], location: @lexer.location, args: [val[1]])
|
1751
1735
|
result = builder
|
@@ -1754,8 +1738,8 @@ module_eval(<<'.,.,', 'parser.y', 280)
|
|
1754
1738
|
end
|
1755
1739
|
.,.,
|
1756
1740
|
|
1757
|
-
module_eval(<<'.,.,', 'parser.y',
|
1758
|
-
def
|
1741
|
+
module_eval(<<'.,.,', 'parser.y', 237)
|
1742
|
+
def _reduce_73(val, _values, result)
|
1759
1743
|
builder = val[0]
|
1760
1744
|
builder.symbols << Lrama::Lexer::Token::InstantiateRule.new(s_value: val[1].s_value, location: @lexer.location, args: val[3], lhs_tag: val[5])
|
1761
1745
|
result = builder
|
@@ -1764,30 +1748,10 @@ module_eval(<<'.,.,', 'parser.y', 286)
|
|
1764
1748
|
end
|
1765
1749
|
.,.,
|
1766
1750
|
|
1767
|
-
module_eval(<<'.,.,', 'parser.y',
|
1768
|
-
def
|
1769
|
-
|
1770
|
-
|
1771
|
-
@code_after_prec = true
|
1772
|
-
end
|
1773
|
-
begin_c_declaration("}")
|
1774
|
-
|
1775
|
-
result
|
1776
|
-
end
|
1777
|
-
.,.,
|
1778
|
-
|
1779
|
-
module_eval(<<'.,.,', 'parser.y', 300)
|
1780
|
-
def _reduce_68(val, _values, result)
|
1781
|
-
end_c_declaration
|
1782
|
-
|
1783
|
-
result
|
1784
|
-
end
|
1785
|
-
.,.,
|
1786
|
-
|
1787
|
-
module_eval(<<'.,.,', 'parser.y', 304)
|
1788
|
-
def _reduce_69(val, _values, result)
|
1789
|
-
user_code = val[3]
|
1790
|
-
user_code.alias_name = val[6]
|
1751
|
+
module_eval(<<'.,.,', 'parser.y', 243)
|
1752
|
+
def _reduce_74(val, _values, result)
|
1753
|
+
user_code = val[1]
|
1754
|
+
user_code.alias_name = val[2]
|
1791
1755
|
builder = val[0]
|
1792
1756
|
builder.user_code = user_code
|
1793
1757
|
result = builder
|
@@ -1796,8 +1760,8 @@ module_eval(<<'.,.,', 'parser.y', 304)
|
|
1796
1760
|
end
|
1797
1761
|
.,.,
|
1798
1762
|
|
1799
|
-
module_eval(<<'.,.,', 'parser.y',
|
1800
|
-
def
|
1763
|
+
module_eval(<<'.,.,', 'parser.y', 251)
|
1764
|
+
def _reduce_75(val, _values, result)
|
1801
1765
|
sym = @grammar.find_symbol_by_id!(val[2])
|
1802
1766
|
@prec_seen = true
|
1803
1767
|
builder = val[0]
|
@@ -1808,168 +1772,137 @@ module_eval(<<'.,.,', 'parser.y', 312)
|
|
1808
1772
|
end
|
1809
1773
|
.,.,
|
1810
1774
|
|
1811
|
-
# reduce
|
1812
|
-
|
1813
|
-
# reduce 72 omitted
|
1814
|
-
|
1815
|
-
# reduce 73 omitted
|
1775
|
+
# reduce 76 omitted
|
1816
1776
|
|
1817
|
-
# reduce
|
1818
|
-
|
1819
|
-
module_eval(<<'.,.,', 'parser.y', 327)
|
1820
|
-
def _reduce_75(val, _values, result)
|
1821
|
-
result = [{tag: nil, tokens: val[0]}]
|
1777
|
+
# reduce 77 omitted
|
1822
1778
|
|
1779
|
+
module_eval(<<'.,.,', 'parser.y', 258)
|
1780
|
+
def _reduce_78(val, _values, result)
|
1781
|
+
result = val[0].s_value if val[0]
|
1823
1782
|
result
|
1824
1783
|
end
|
1825
1784
|
.,.,
|
1826
1785
|
|
1827
|
-
module_eval(<<'.,.,', 'parser.y',
|
1828
|
-
def
|
1829
|
-
|
1830
|
-
|
1786
|
+
module_eval(<<'.,.,', 'parser.y', 271)
|
1787
|
+
def _reduce_79(val, _values, result)
|
1788
|
+
result = val[1] ? val[1].unshift(val[0]) : val
|
1831
1789
|
result
|
1832
1790
|
end
|
1833
1791
|
.,.,
|
1834
1792
|
|
1835
|
-
module_eval(<<'.,.,', 'parser.y',
|
1836
|
-
def
|
1837
|
-
|
1838
|
-
|
1793
|
+
module_eval(<<'.,.,', 'parser.y', 271)
|
1794
|
+
def _reduce_80(val, _values, result)
|
1795
|
+
result = val[1] ? val[1].unshift(val[0]) : val
|
1839
1796
|
result
|
1840
1797
|
end
|
1841
1798
|
.,.,
|
1842
1799
|
|
1843
|
-
module_eval(<<'.,.,', 'parser.y',
|
1844
|
-
def
|
1845
|
-
|
1846
|
-
|
1847
|
-
|
1848
|
-
|
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
|
1849
1807
|
|
1850
|
-
module_eval(<<'.,.,', 'parser.y', 339)
|
1851
|
-
def _reduce_79(val, _values, result)
|
1852
|
-
result = val[0].append(val[1])
|
1853
1808
|
result
|
1854
1809
|
end
|
1855
1810
|
.,.,
|
1856
1811
|
|
1857
|
-
|
1858
|
-
|
1859
|
-
# reduce 81 omitted
|
1860
|
-
|
1861
|
-
module_eval(<<'.,.,', 'parser.y', 346)
|
1812
|
+
module_eval(<<'.,.,', 'parser.y', 268)
|
1862
1813
|
def _reduce_82(val, _values, result)
|
1863
|
-
|
1864
|
-
|
1814
|
+
result = val[0].append({tag: val[1], tokens: val[2]})
|
1865
1815
|
result
|
1866
1816
|
end
|
1867
1817
|
.,.,
|
1868
1818
|
|
1869
|
-
|
1870
|
-
def _reduce_83(val, _values, result)
|
1871
|
-
end_c_declaration
|
1819
|
+
# reduce 83 omitted
|
1872
1820
|
|
1873
|
-
|
1874
|
-
end
|
1875
|
-
.,.,
|
1876
|
-
|
1877
|
-
module_eval(<<'.,.,', 'parser.y', 354)
|
1878
|
-
def _reduce_84(val, _values, result)
|
1879
|
-
result = val[0].append(val[3])
|
1821
|
+
# reduce 84 omitted
|
1880
1822
|
|
1881
|
-
|
1882
|
-
end
|
1883
|
-
.,.,
|
1884
|
-
|
1885
|
-
module_eval(<<'.,.,', 'parser.y', 358)
|
1823
|
+
module_eval(<<'.,.,', 'parser.y', 274)
|
1886
1824
|
def _reduce_85(val, _values, result)
|
1887
|
-
|
1825
|
+
begin_c_declaration("}")
|
1888
1826
|
|
1889
1827
|
result
|
1890
1828
|
end
|
1891
1829
|
.,.,
|
1892
1830
|
|
1893
|
-
module_eval(<<'.,.,', 'parser.y',
|
1831
|
+
module_eval(<<'.,.,', 'parser.y', 278)
|
1894
1832
|
def _reduce_86(val, _values, result)
|
1895
|
-
|
1833
|
+
end_c_declaration
|
1896
1834
|
|
1897
1835
|
result
|
1898
1836
|
end
|
1899
1837
|
.,.,
|
1900
1838
|
|
1901
|
-
module_eval(<<'.,.,', 'parser.y',
|
1839
|
+
module_eval(<<'.,.,', 'parser.y', 282)
|
1902
1840
|
def _reduce_87(val, _values, result)
|
1903
|
-
|
1841
|
+
result = val[2]
|
1904
1842
|
|
1905
1843
|
result
|
1906
1844
|
end
|
1907
1845
|
.,.,
|
1908
1846
|
|
1909
|
-
module_eval(<<'.,.,', 'parser.y',
|
1847
|
+
module_eval(<<'.,.,', 'parser.y', 290)
|
1910
1848
|
def _reduce_88(val, _values, result)
|
1911
|
-
|
1912
|
-
|
1849
|
+
result = val[1] ? val[1].unshift(val[0]) : val
|
1913
1850
|
result
|
1914
1851
|
end
|
1915
1852
|
.,.,
|
1916
1853
|
|
1917
|
-
module_eval(<<'.,.,', 'parser.y',
|
1854
|
+
module_eval(<<'.,.,', 'parser.y', 290)
|
1918
1855
|
def _reduce_89(val, _values, result)
|
1919
|
-
|
1920
|
-
|
1856
|
+
result = val[1] ? val[1].unshift(val[0]) : val
|
1921
1857
|
result
|
1922
1858
|
end
|
1923
1859
|
.,.,
|
1924
1860
|
|
1925
|
-
module_eval(<<'.,.,', 'parser.y',
|
1861
|
+
module_eval(<<'.,.,', 'parser.y', 285)
|
1926
1862
|
def _reduce_90(val, _values, result)
|
1927
|
-
|
1928
|
-
|
1863
|
+
result = [{tag: nil, tokens: val[0]}]
|
1929
1864
|
result
|
1930
1865
|
end
|
1931
1866
|
.,.,
|
1932
1867
|
|
1933
|
-
module_eval(<<'.,.,', 'parser.y',
|
1868
|
+
module_eval(<<'.,.,', 'parser.y', 286)
|
1934
1869
|
def _reduce_91(val, _values, result)
|
1935
|
-
result = [val[0]]
|
1870
|
+
result = [{tag: val[0], tokens: val[1]}]
|
1936
1871
|
result
|
1937
1872
|
end
|
1938
1873
|
.,.,
|
1939
1874
|
|
1940
|
-
module_eval(<<'.,.,', 'parser.y',
|
1875
|
+
module_eval(<<'.,.,', 'parser.y', 287)
|
1941
1876
|
def _reduce_92(val, _values, result)
|
1942
|
-
result = val[0].append(val[1])
|
1877
|
+
result = val[0].append({tag: val[1], tokens: val[2]})
|
1943
1878
|
result
|
1944
1879
|
end
|
1945
1880
|
.,.,
|
1946
1881
|
|
1947
|
-
|
1948
|
-
|
1949
|
-
module_eval(<<'.,.,', 'parser.y', 387)
|
1950
|
-
def _reduce_94(val, _values, result)
|
1882
|
+
module_eval(<<'.,.,', 'parser.y', 289)
|
1883
|
+
def _reduce_93(val, _values, result)
|
1951
1884
|
on_action_error("ident after %prec", val[0]) if @prec_seen
|
1952
1885
|
result
|
1953
1886
|
end
|
1954
1887
|
.,.,
|
1955
1888
|
|
1956
|
-
module_eval(<<'.,.,', 'parser.y',
|
1957
|
-
def
|
1889
|
+
module_eval(<<'.,.,', 'parser.y', 290)
|
1890
|
+
def _reduce_94(val, _values, result)
|
1958
1891
|
on_action_error("char after %prec", val[0]) if @prec_seen
|
1959
1892
|
result
|
1960
1893
|
end
|
1961
1894
|
.,.,
|
1962
1895
|
|
1896
|
+
# reduce 95 omitted
|
1897
|
+
|
1963
1898
|
# reduce 96 omitted
|
1964
1899
|
|
1965
1900
|
# reduce 97 omitted
|
1966
1901
|
|
1967
1902
|
# reduce 98 omitted
|
1968
1903
|
|
1969
|
-
|
1970
|
-
|
1971
|
-
module_eval(<<'.,.,', 'parser.y', 398)
|
1972
|
-
def _reduce_100(val, _values, result)
|
1904
|
+
module_eval(<<'.,.,', 'parser.y', 298)
|
1905
|
+
def _reduce_99(val, _values, result)
|
1973
1906
|
lhs = val[0]
|
1974
1907
|
lhs.alias_name = val[1]
|
1975
1908
|
val[3].each do |builder|
|
@@ -1982,8 +1915,8 @@ module_eval(<<'.,.,', 'parser.y', 398)
|
|
1982
1915
|
end
|
1983
1916
|
.,.,
|
1984
1917
|
|
1985
|
-
module_eval(<<'.,.,', 'parser.y',
|
1986
|
-
def
|
1918
|
+
module_eval(<<'.,.,', 'parser.y', 309)
|
1919
|
+
def _reduce_100(val, _values, result)
|
1987
1920
|
builder = val[0]
|
1988
1921
|
if !builder.line
|
1989
1922
|
builder.line = @lexer.line - 1
|
@@ -1994,8 +1927,8 @@ module_eval(<<'.,.,', 'parser.y', 409)
|
|
1994
1927
|
end
|
1995
1928
|
.,.,
|
1996
1929
|
|
1997
|
-
module_eval(<<'.,.,', 'parser.y',
|
1998
|
-
def
|
1930
|
+
module_eval(<<'.,.,', 'parser.y', 317)
|
1931
|
+
def _reduce_101(val, _values, result)
|
1999
1932
|
builder = val[2]
|
2000
1933
|
if !builder.line
|
2001
1934
|
builder.line = @lexer.line - 1
|
@@ -2006,28 +1939,17 @@ module_eval(<<'.,.,', 'parser.y', 417)
|
|
2006
1939
|
end
|
2007
1940
|
.,.,
|
2008
1941
|
|
2009
|
-
|
2010
|
-
|
2011
|
-
module_eval(<<'.,.,', 'parser.y', 427)
|
2012
|
-
def _reduce_104(val, _values, result)
|
2013
|
-
reset_precs
|
2014
|
-
result = Grammar::RuleBuilder.new(@rule_counter, @midrule_action_counter)
|
2015
|
-
|
2016
|
-
result
|
2017
|
-
end
|
2018
|
-
.,.,
|
2019
|
-
|
2020
|
-
module_eval(<<'.,.,', 'parser.y', 432)
|
2021
|
-
def _reduce_105(val, _values, result)
|
1942
|
+
module_eval(<<'.,.,', 'parser.y', 326)
|
1943
|
+
def _reduce_102(val, _values, result)
|
2022
1944
|
reset_precs
|
2023
|
-
result =
|
1945
|
+
result = @grammar.create_rule_builder(@rule_counter, @midrule_action_counter)
|
2024
1946
|
|
2025
1947
|
result
|
2026
1948
|
end
|
2027
1949
|
.,.,
|
2028
1950
|
|
2029
|
-
module_eval(<<'.,.,', 'parser.y',
|
2030
|
-
def
|
1951
|
+
module_eval(<<'.,.,', 'parser.y', 331)
|
1952
|
+
def _reduce_103(val, _values, result)
|
2031
1953
|
token = val[1]
|
2032
1954
|
token.alias_name = val[2]
|
2033
1955
|
builder = val[0]
|
@@ -2038,9 +1960,9 @@ module_eval(<<'.,.,', 'parser.y', 437)
|
|
2038
1960
|
end
|
2039
1961
|
.,.,
|
2040
1962
|
|
2041
|
-
module_eval(<<'.,.,', 'parser.y',
|
2042
|
-
def
|
2043
|
-
token = Lrama::Lexer::Token::InstantiateRule.new(s_value: val[2], location: @lexer.location, args: [val[1]], lhs_tag: val[
|
1963
|
+
module_eval(<<'.,.,', 'parser.y', 339)
|
1964
|
+
def _reduce_104(val, _values, result)
|
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])
|
2044
1966
|
builder = val[0]
|
2045
1967
|
builder.add_rhs(token)
|
2046
1968
|
builder.line = val[1].first_line
|
@@ -2050,9 +1972,9 @@ module_eval(<<'.,.,', 'parser.y', 445)
|
|
2050
1972
|
end
|
2051
1973
|
.,.,
|
2052
1974
|
|
2053
|
-
module_eval(<<'.,.,', 'parser.y',
|
2054
|
-
def
|
2055
|
-
token = Lrama::Lexer::Token::InstantiateRule.new(s_value: val[1].s_value, location: @lexer.location, args: val[3], lhs_tag: val[
|
1975
|
+
module_eval(<<'.,.,', 'parser.y', 347)
|
1976
|
+
def _reduce_105(val, _values, result)
|
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])
|
2056
1978
|
builder = val[0]
|
2057
1979
|
builder.add_rhs(token)
|
2058
1980
|
builder.line = val[1].first_line
|
@@ -2062,31 +1984,11 @@ module_eval(<<'.,.,', 'parser.y', 453)
|
|
2062
1984
|
end
|
2063
1985
|
.,.,
|
2064
1986
|
|
2065
|
-
module_eval(<<'.,.,', 'parser.y',
|
2066
|
-
def
|
2067
|
-
|
2068
|
-
|
2069
|
-
|
2070
|
-
end
|
2071
|
-
begin_c_declaration("}")
|
2072
|
-
|
2073
|
-
result
|
2074
|
-
end
|
2075
|
-
.,.,
|
2076
|
-
|
2077
|
-
module_eval(<<'.,.,', 'parser.y', 469)
|
2078
|
-
def _reduce_110(val, _values, result)
|
2079
|
-
end_c_declaration
|
2080
|
-
|
2081
|
-
result
|
2082
|
-
end
|
2083
|
-
.,.,
|
2084
|
-
|
2085
|
-
module_eval(<<'.,.,', 'parser.y', 473)
|
2086
|
-
def _reduce_111(val, _values, result)
|
2087
|
-
user_code = val[3]
|
2088
|
-
user_code.alias_name = val[6]
|
2089
|
-
user_code.tag = val[7]
|
1987
|
+
module_eval(<<'.,.,', 'parser.y', 355)
|
1988
|
+
def _reduce_106(val, _values, result)
|
1989
|
+
user_code = val[1]
|
1990
|
+
user_code.alias_name = val[2]
|
1991
|
+
user_code.tag = val[3]
|
2090
1992
|
builder = val[0]
|
2091
1993
|
builder.user_code = user_code
|
2092
1994
|
result = builder
|
@@ -2095,8 +1997,8 @@ module_eval(<<'.,.,', 'parser.y', 473)
|
|
2095
1997
|
end
|
2096
1998
|
.,.,
|
2097
1999
|
|
2098
|
-
module_eval(<<'.,.,', 'parser.y',
|
2099
|
-
def
|
2000
|
+
module_eval(<<'.,.,', 'parser.y', 364)
|
2001
|
+
def _reduce_107(val, _values, result)
|
2100
2002
|
sym = @grammar.find_symbol_by_id!(val[2])
|
2101
2003
|
@prec_seen = true
|
2102
2004
|
builder = val[0]
|
@@ -2107,125 +2009,127 @@ module_eval(<<'.,.,', 'parser.y', 482)
|
|
2107
2009
|
end
|
2108
2010
|
.,.,
|
2109
2011
|
|
2110
|
-
module_eval(<<'.,.,', 'parser.y',
|
2111
|
-
def
|
2012
|
+
module_eval(<<'.,.,', 'parser.y', 371)
|
2013
|
+
def _reduce_108(val, _values, result)
|
2112
2014
|
result = "option"
|
2113
2015
|
result
|
2114
2016
|
end
|
2115
2017
|
.,.,
|
2116
2018
|
|
2117
|
-
module_eval(<<'.,.,', 'parser.y',
|
2118
|
-
def
|
2019
|
+
module_eval(<<'.,.,', 'parser.y', 372)
|
2020
|
+
def _reduce_109(val, _values, result)
|
2119
2021
|
result = "nonempty_list"
|
2120
2022
|
result
|
2121
2023
|
end
|
2122
2024
|
.,.,
|
2123
2025
|
|
2124
|
-
module_eval(<<'.,.,', 'parser.y',
|
2125
|
-
def
|
2026
|
+
module_eval(<<'.,.,', 'parser.y', 373)
|
2027
|
+
def _reduce_110(val, _values, result)
|
2126
2028
|
result = "list"
|
2127
2029
|
result
|
2128
2030
|
end
|
2129
2031
|
.,.,
|
2130
2032
|
|
2131
|
-
|
2132
|
-
|
2133
|
-
|
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
|
2044
|
+
|
2134
2045
|
result
|
2135
2046
|
end
|
2136
2047
|
.,.,
|
2137
2048
|
|
2138
|
-
module_eval(<<'.,.,', 'parser.y',
|
2139
|
-
def
|
2049
|
+
module_eval(<<'.,.,', 'parser.y', 383)
|
2050
|
+
def _reduce_114(val, _values, result)
|
2140
2051
|
result = val[0].append(val[2])
|
2141
2052
|
result
|
2142
2053
|
end
|
2143
2054
|
.,.,
|
2144
2055
|
|
2145
|
-
module_eval(<<'.,.,', 'parser.y',
|
2146
|
-
def
|
2147
|
-
result = [Lrama::Lexer::Token::InstantiateRule.new(s_value: val[
|
2056
|
+
module_eval(<<'.,.,', 'parser.y', 384)
|
2057
|
+
def _reduce_115(val, _values, result)
|
2058
|
+
result = [Lrama::Lexer::Token::InstantiateRule.new(s_value: val[0].s_value, location: @lexer.location, args: val[2])]
|
2148
2059
|
result
|
2149
2060
|
end
|
2150
2061
|
.,.,
|
2151
2062
|
|
2152
|
-
module_eval(<<'.,.,', 'parser.y',
|
2153
|
-
def
|
2154
|
-
|
2063
|
+
module_eval(<<'.,.,', 'parser.y', 388)
|
2064
|
+
def _reduce_116(val, _values, result)
|
2065
|
+
if @prec_seen
|
2066
|
+
on_action_error("multiple User_code after %prec", val[0]) if @code_after_prec
|
2067
|
+
@code_after_prec = true
|
2068
|
+
end
|
2069
|
+
begin_c_declaration("}")
|
2070
|
+
|
2155
2071
|
result
|
2156
2072
|
end
|
2157
2073
|
.,.,
|
2158
2074
|
|
2159
|
-
|
2075
|
+
module_eval(<<'.,.,', 'parser.y', 396)
|
2076
|
+
def _reduce_117(val, _values, result)
|
2077
|
+
end_c_declaration
|
2160
2078
|
|
2161
|
-
module_eval(<<'.,.,', 'parser.y', 499)
|
2162
|
-
def _reduce_121(val, _values, result)
|
2163
|
-
result = val[1].s_value
|
2164
2079
|
result
|
2165
2080
|
end
|
2166
2081
|
.,.,
|
2167
2082
|
|
2168
|
-
|
2169
|
-
|
2170
|
-
|
2171
|
-
|
2172
|
-
module_eval(<<'.,.,', 'parser.y', 506)
|
2173
|
-
def _reduce_124(val, _values, result)
|
2174
|
-
begin_c_declaration('\Z')
|
2175
|
-
@grammar.epilogue_first_lineno = @lexer.line + 1
|
2083
|
+
module_eval(<<'.,.,', 'parser.y', 400)
|
2084
|
+
def _reduce_118(val, _values, result)
|
2085
|
+
result = val[2]
|
2176
2086
|
|
2177
2087
|
result
|
2178
2088
|
end
|
2179
2089
|
.,.,
|
2180
2090
|
|
2181
|
-
module_eval(<<'.,.,', 'parser.y',
|
2182
|
-
def
|
2183
|
-
|
2184
|
-
@grammar.epilogue = val[2].s_value
|
2185
|
-
|
2091
|
+
module_eval(<<'.,.,', 'parser.y', 403)
|
2092
|
+
def _reduce_119(val, _values, result)
|
2093
|
+
result = val[1].s_value
|
2186
2094
|
result
|
2187
2095
|
end
|
2188
2096
|
.,.,
|
2189
2097
|
|
2190
|
-
|
2191
|
-
|
2192
|
-
|
2098
|
+
module_eval(<<'.,.,', 'parser.y', 407)
|
2099
|
+
def _reduce_120(val, _values, result)
|
2100
|
+
begin_c_declaration('\Z')
|
2101
|
+
@grammar.epilogue_first_lineno = @lexer.line + 1
|
2193
2102
|
|
2194
|
-
# reduce 128 omitted
|
2195
|
-
|
2196
|
-
# reduce 129 omitted
|
2197
|
-
|
2198
|
-
# reduce 130 omitted
|
2199
|
-
|
2200
|
-
module_eval(<<'.,.,', 'parser.y', 522)
|
2201
|
-
def _reduce_131(val, _values, result)
|
2202
|
-
result = [val[0]]
|
2203
2103
|
result
|
2204
2104
|
end
|
2205
2105
|
.,.,
|
2206
2106
|
|
2207
|
-
module_eval(<<'.,.,', 'parser.y',
|
2208
|
-
def
|
2209
|
-
|
2107
|
+
module_eval(<<'.,.,', 'parser.y', 412)
|
2108
|
+
def _reduce_121(val, _values, result)
|
2109
|
+
end_c_declaration
|
2110
|
+
@grammar.epilogue = val[2].s_value
|
2111
|
+
|
2210
2112
|
result
|
2211
2113
|
end
|
2212
2114
|
.,.,
|
2213
2115
|
|
2214
|
-
# reduce
|
2116
|
+
# reduce 122 omitted
|
2117
|
+
|
2118
|
+
# reduce 123 omitted
|
2119
|
+
|
2120
|
+
# reduce 124 omitted
|
2121
|
+
|
2122
|
+
# reduce 125 omitted
|
2215
2123
|
|
2216
|
-
# reduce
|
2124
|
+
# reduce 126 omitted
|
2217
2125
|
|
2218
|
-
module_eval(<<'.,.,', 'parser.y',
|
2219
|
-
def
|
2126
|
+
module_eval(<<'.,.,', 'parser.y', 423)
|
2127
|
+
def _reduce_127(val, _values, result)
|
2220
2128
|
result = Lrama::Lexer::Token::Ident.new(s_value: val[0])
|
2221
2129
|
result
|
2222
2130
|
end
|
2223
2131
|
.,.,
|
2224
2132
|
|
2225
|
-
# reduce 136 omitted
|
2226
|
-
|
2227
|
-
# reduce 137 omitted
|
2228
|
-
|
2229
2133
|
def _reduce_none(val, _values, result)
|
2230
2134
|
val[0]
|
2231
2135
|
end
|