lrama 0.6.9 → 0.6.11

Sign up to get free protection for your applications and to get access to all the features.
Files changed (131) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/test.yaml +24 -1
  3. data/.gitignore +2 -0
  4. data/Gemfile +6 -3
  5. data/NEWS.md +269 -14
  6. data/README.md +41 -4
  7. data/Rakefile +2 -0
  8. data/Steepfile +9 -17
  9. data/doc/development/compressed_state_table/main.md +635 -0
  10. data/doc/development/compressed_state_table/parse.output +174 -0
  11. data/doc/development/compressed_state_table/parse.y +22 -0
  12. data/doc/development/compressed_state_table/parser.rb +282 -0
  13. data/exe/lrama +1 -0
  14. data/lib/lrama/bitmap.rb +3 -1
  15. data/lib/lrama/command.rb +8 -14
  16. data/lib/lrama/context.rb +11 -9
  17. data/lib/lrama/counterexamples/derivation.rb +8 -5
  18. data/lib/lrama/counterexamples/example.rb +9 -4
  19. data/lib/lrama/counterexamples/path.rb +6 -0
  20. data/lib/lrama/counterexamples/production_path.rb +2 -0
  21. data/lib/lrama/counterexamples/start_path.rb +2 -0
  22. data/lib/lrama/counterexamples/state_item.rb +2 -0
  23. data/lib/lrama/counterexamples/transition_path.rb +2 -0
  24. data/lib/lrama/counterexamples/triple.rb +2 -0
  25. data/lib/lrama/counterexamples.rb +36 -24
  26. data/lib/lrama/diagnostics.rb +36 -0
  27. data/lib/lrama/digraph.rb +2 -0
  28. data/lib/lrama/grammar/auxiliary.rb +2 -0
  29. data/lib/lrama/grammar/binding.rb +12 -1
  30. data/lib/lrama/grammar/code/destructor_code.rb +2 -0
  31. data/lib/lrama/grammar/code/initial_action_code.rb +2 -0
  32. data/lib/lrama/grammar/code/no_reference_code.rb +2 -0
  33. data/lib/lrama/grammar/code/printer_code.rb +2 -0
  34. data/lib/lrama/grammar/code/rule_action.rb +7 -3
  35. data/lib/lrama/grammar/code.rb +7 -5
  36. data/lib/lrama/grammar/counter.rb +2 -0
  37. data/lib/lrama/grammar/destructor.rb +2 -0
  38. data/lib/lrama/grammar/error_token.rb +2 -0
  39. data/lib/lrama/grammar/parameterizing_rule/resolver.rb +7 -1
  40. data/lib/lrama/grammar/parameterizing_rule/rhs.rb +6 -3
  41. data/lib/lrama/grammar/parameterizing_rule/rule.rb +6 -0
  42. data/lib/lrama/grammar/parameterizing_rule.rb +2 -0
  43. data/lib/lrama/grammar/percent_code.rb +2 -0
  44. data/lib/lrama/grammar/precedence.rb +2 -0
  45. data/lib/lrama/grammar/printer.rb +2 -0
  46. data/lib/lrama/grammar/reference.rb +2 -0
  47. data/lib/lrama/grammar/rule.rb +10 -3
  48. data/lib/lrama/grammar/rule_builder.rb +64 -65
  49. data/lib/lrama/grammar/symbol.rb +2 -0
  50. data/lib/lrama/grammar/symbols/resolver.rb +9 -1
  51. data/lib/lrama/grammar/symbols.rb +2 -0
  52. data/lib/lrama/grammar/type.rb +2 -0
  53. data/lib/lrama/grammar/union.rb +2 -0
  54. data/lib/lrama/grammar.rb +53 -32
  55. data/lib/lrama/grammar_validator.rb +37 -0
  56. data/lib/lrama/lexer/grammar_file.rb +2 -0
  57. data/lib/lrama/lexer/location.rb +2 -0
  58. data/lib/lrama/lexer/token/char.rb +2 -0
  59. data/lib/lrama/lexer/token/ident.rb +2 -0
  60. data/lib/lrama/lexer/token/instantiate_rule.rb +2 -0
  61. data/lib/lrama/lexer/token/tag.rb +2 -0
  62. data/lib/lrama/lexer/token/user_code.rb +4 -2
  63. data/lib/lrama/lexer/token.rb +7 -5
  64. data/lib/lrama/lexer.rb +12 -8
  65. data/lib/lrama/{warning.rb → logger.rb} +5 -13
  66. data/lib/lrama/option_parser.rb +58 -33
  67. data/lib/lrama/options.rb +5 -2
  68. data/lib/lrama/output.rb +38 -69
  69. data/lib/lrama/parser.rb +677 -773
  70. data/lib/lrama/report/duration.rb +2 -0
  71. data/lib/lrama/report/profile.rb +2 -0
  72. data/lib/lrama/report.rb +4 -2
  73. data/lib/lrama/state/reduce.rb +4 -2
  74. data/lib/lrama/state/reduce_reduce_conflict.rb +2 -0
  75. data/lib/lrama/state/resolved_conflict.rb +3 -1
  76. data/lib/lrama/state/shift.rb +2 -0
  77. data/lib/lrama/state/shift_reduce_conflict.rb +2 -0
  78. data/lib/lrama/state.rb +7 -5
  79. data/lib/lrama/states/item.rb +5 -3
  80. data/lib/lrama/states.rb +18 -46
  81. data/lib/lrama/states_reporter.rb +60 -19
  82. data/lib/lrama/trace_reporter.rb +30 -0
  83. data/lib/lrama/version.rb +3 -1
  84. data/lib/lrama.rb +22 -17
  85. data/lrama.gemspec +3 -1
  86. data/parser.y +129 -237
  87. data/rbs_collection.lock.yaml +10 -2
  88. data/sig/lrama/counterexamples/derivation.rbs +33 -0
  89. data/sig/lrama/counterexamples/example.rbs +45 -0
  90. data/sig/lrama/counterexamples/path.rbs +21 -0
  91. data/sig/lrama/counterexamples/production_path.rbs +11 -0
  92. data/sig/lrama/counterexamples/start_path.rbs +13 -0
  93. data/sig/lrama/counterexamples/state_item.rbs +10 -0
  94. data/sig/lrama/counterexamples/transition_path.rbs +11 -0
  95. data/sig/lrama/counterexamples/triple.rbs +20 -0
  96. data/sig/lrama/counterexamples.rbs +29 -0
  97. data/sig/lrama/grammar/auxiliary.rbs +10 -0
  98. data/sig/lrama/grammar/binding.rbs +4 -0
  99. data/sig/lrama/grammar/code/destructor_code.rbs +3 -4
  100. data/sig/lrama/grammar/code/initial_action_code.rbs +15 -0
  101. data/sig/lrama/grammar/code/no_reference_code.rbs +15 -0
  102. data/sig/lrama/grammar/code/printer_code.rbs +3 -4
  103. data/sig/lrama/grammar/code/rule_action.rbs +19 -0
  104. data/sig/lrama/grammar/code.rbs +3 -3
  105. data/sig/lrama/grammar/destructor.rbs +3 -1
  106. data/sig/lrama/grammar/error_token.rbs +4 -2
  107. data/sig/lrama/grammar/parameterizing_rule/resolver.rbs +2 -1
  108. data/sig/lrama/grammar/parameterizing_rule/rhs.rbs +1 -1
  109. data/sig/lrama/grammar/precedence.rbs +3 -1
  110. data/sig/lrama/grammar/printer.rbs +3 -1
  111. data/sig/lrama/grammar/rule.rbs +35 -3
  112. data/sig/lrama/grammar/rule_builder.rbs +10 -9
  113. data/sig/lrama/grammar/symbol.rbs +6 -6
  114. data/sig/lrama/grammar/symbols/resolver.rbs +24 -5
  115. data/sig/lrama/grammar/type.rbs +2 -2
  116. data/sig/lrama/grammar/union.rbs +12 -0
  117. data/sig/lrama/grammar.rbs +104 -1
  118. data/sig/lrama/options.rbs +3 -2
  119. data/sig/lrama/state/reduce.rbs +20 -0
  120. data/sig/lrama/state/reduce_reduce_conflict.rbs +13 -0
  121. data/sig/lrama/state/resolved_conflict.rbs +14 -0
  122. data/sig/lrama/state/shift.rbs +14 -0
  123. data/sig/lrama/state/shift_reduce_conflict.rbs +13 -0
  124. data/sig/lrama/state.rbs +79 -0
  125. data/sig/lrama/states/item.rbs +30 -0
  126. data/sig/lrama/states.rbs +101 -0
  127. data/template/bison/yacc.c +24 -19
  128. metadata +32 -6
  129. data/sample/calc.output +0 -263
  130. data/sample/calc.y +0 -101
  131. 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.7.3
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.7.3'
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 a LALR(1) parser generator.
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', 536)
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
- 98, 51, 99, 163, 88, 79, 51, 51, 180, 163,
736
- 79, 79, 51, 162, 180, 156, 79, 165, 157, 51,
737
- 3, 50, 181, 165, 70, 51, 8, 50, 181, 79,
738
- 75, 51, 6, 50, 7, 161, 82, 47, 51, 51,
739
- 50, 50, 89, 82, 82, 166, 41, 51, 100, 50,
740
- 182, 166, 82, 51, 48, 50, 182, 23, 25, 26,
741
- 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
742
- 37, 38, 47, 51, 51, 50, 50, 93, 79, 197,
743
- 51, 51, 50, 50, 79, 197, 51, 51, 50, 50,
744
- 79, 197, 23, 25, 26, 27, 28, 29, 30, 31,
745
- 32, 33, 34, 35, 36, 37, 38, 9, 51, 54,
746
- 50, 14, 15, 16, 17, 18, 19, 54, 54, 20,
747
- 21, 22, 23, 25, 26, 27, 28, 29, 30, 31,
748
- 32, 33, 34, 35, 36, 37, 38, 39, 51, 51,
749
- 50, 50, 79, 197, 51, 51, 50, 50, 79, 197,
750
- 51, 51, 50, 50, 79, 197, 51, 51, 50, 50,
751
- 79, 79, 51, 51, 50, 50, 79, 79, 51, 51,
752
- 50, 50, 79, 79, 51, 51, 50, 207, 79, 79,
753
- 51, 51, 207, 207, 79, 79, 51, 51, 50, 50,
754
- 79, 187, 188, 189, 96, 187, 188, 189, 96, 217,
755
- 221, 229, 218, 218, 218, 51, 51, 50, 50, 187,
756
- 188, 189, 57, 58, 59, 60, 61, 62, 63, 64,
757
- 65, 66, 67, 90, 94, 96, 101, 101, 101, 103,
758
- 109, 113, 114, 117, 117, 117, 117, 120, 47, 124,
759
- 125, 127, 129, 130, 131, 132, 133, 136, 140, 141,
760
- 142, 143, 146, 147, 148, 150, 160, 168, 170, 171,
761
- 172, 173, 174, 176, 177, 178, 146, 184, 192, 193,
762
- 200, 160, 204, 176, 211, 160, 215, 216, 178, 176,
763
- 226, 176, 228, 96, 96, 176 ]
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
- 49, 145, 49, 145, 39, 145, 159, 183, 159, 183,
767
- 159, 183, 201, 144, 201, 139, 201, 145, 139, 33,
768
- 1, 33, 159, 183, 33, 34, 3, 34, 201, 34,
769
- 34, 35, 2, 35, 2, 144, 35, 9, 36, 37,
770
- 36, 37, 39, 36, 37, 145, 7, 38, 49, 38,
771
- 159, 183, 38, 15, 14, 15, 201, 9, 9, 9,
772
- 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
773
- 9, 9, 42, 69, 172, 69, 172, 42, 172, 172,
774
- 173, 70, 173, 70, 173, 173, 174, 81, 174, 81,
775
- 174, 174, 42, 42, 42, 42, 42, 42, 42, 42,
776
- 42, 42, 42, 42, 42, 42, 42, 4, 82, 16,
777
- 82, 4, 4, 4, 4, 4, 4, 17, 18, 4,
778
- 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
779
- 4, 4, 4, 4, 4, 4, 4, 4, 194, 109,
780
- 194, 109, 194, 194, 198, 111, 198, 111, 198, 198,
781
- 199, 117, 199, 117, 199, 199, 74, 75, 74, 75,
782
- 74, 75, 114, 116, 114, 116, 114, 116, 137, 166,
783
- 137, 166, 137, 166, 182, 184, 182, 184, 182, 184,
784
- 204, 216, 204, 216, 204, 216, 218, 119, 218, 119,
785
- 218, 164, 164, 164, 164, 179, 179, 179, 179, 208,
786
- 214, 223, 208, 214, 223, 134, 138, 134, 138, 209,
787
- 209, 209, 19, 20, 23, 25, 26, 27, 28, 29,
788
- 30, 31, 32, 40, 45, 46, 53, 55, 56, 57,
789
- 68, 72, 73, 80, 85, 86, 87, 88, 89, 95,
790
- 96, 102, 104, 105, 106, 107, 108, 112, 120, 121,
791
- 122, 123, 124, 125, 126, 128, 141, 149, 151, 152,
792
- 153, 154, 155, 156, 157, 158, 161, 163, 167, 169,
793
- 175, 178, 180, 186, 190, 200, 205, 207, 213, 217,
794
- 220, 221, 222, 226, 228, 230 ]
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
- nil, 20, 22, 26, 98, nil, nil, 39, nil, 33,
798
- nil, nil, nil, nil, 48, 50, 90, 98, 99, 207,
799
- 194, nil, nil, 195, nil, 196, 197, 198, 213, 214,
800
- 215, 216, 217, 16, 22, 28, 35, 36, 44, -1,
801
- 221, nil, 68, nil, nil, 201, 174, nil, nil, -5,
802
- nil, nil, nil, 207, nil, 208, 209, 210, nil, nil,
803
- nil, nil, nil, nil, nil, nil, nil, nil, 222, 70,
804
- 78, nil, 225, 224, 153, 154, nil, nil, nil, nil,
805
- 225, 84, 105, nil, nil, 226, 227, 228, 197, 234,
806
- nil, nil, nil, nil, nil, 197, 235, nil, nil, nil,
807
- nil, nil, 239, nil, 240, 241, 242, 243, 244, 136,
808
- nil, 142, 240, nil, 159, nil, 160, 148, nil, 184,
809
- 243, 207, 239, 249, 206, 201, 252, nil, 253, nil,
810
- nil, nil, nil, nil, 202, nil, nil, 165, 203, -26,
811
- nil, 210, nil, nil, -10, -2, nil, nil, nil, 237,
812
- nil, 238, 239, 240, 241, 242, 255, 259, 220, 3,
813
- nil, 220, nil, 227, 143, nil, 166, 248, nil, 249,
814
- nil, nil, 71, 77, 83, 228, nil, nil, 225, 147,
815
- 232, nil, 171, 4, 172, nil, 265, nil, nil, nil,
816
- 272, nil, nil, nil, 135, nil, nil, nil, 141, 147,
817
- 229, 9, nil, nil, 177, 274, nil, 237, 158, 161,
818
- nil, nil, nil, 233, 159, nil, 178, 271, 183, nil,
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
- -2, -138, -8, -138, -138, -3, -4, -138, 233, -138,
824
- -9, -10, -11, -12, -138, -138, -138, -138, -138, -138,
825
- -138, -24, -25, -138, -29, -138, -138, -138, -138, -138,
826
- -138, -138, -138, -138, -138, -138, -138, -138, -138, -138,
827
- -138, -7, -123, -96, -98, -138, -120, -122, -13, -127,
828
- -94, -95, -126, -15, -85, -16, -17, -138, -21, -26,
829
- -30, -33, -36, -39, -40, -41, -42, -43, -44, -50,
830
- -138, -53, -71, -45, -75, -138, -78, -80, -81, -135,
831
- -46, -88, -138, -91, -93, -47, -48, -49, -138, -138,
832
- -5, -1, -97, -124, -99, -138, -138, -14, -128, -129,
833
- -130, -82, -138, -18, -138, -138, -138, -138, -138, -138,
834
- -54, -51, -73, -72, -138, -79, -76, -138, -92, -89,
835
- -138, -138, -138, -138, -104, -138, -138, -86, -138, -22,
836
- -27, -31, -34, -37, -52, -55, -74, -77, -90, -138,
837
- -58, -62, -6, -125, -100, -101, -105, -121, -83, -138,
838
- -19, -138, -138, -138, -138, -138, -136, -138, -57, -60,
839
- -63, -104, -103, -94, -120, -109, -138, -138, -87, -138,
840
- -23, -28, -138, -138, -138, -138, -137, -59, -62, -120,
841
- -94, -67, -138, -102, -138, -106, -136, -113, -114, -115,
842
- -138, -112, -84, -20, -32, -131, -133, -134, -35, -38,
843
- -62, -61, -64, -65, -138, -138, -70, -94, -138, -116,
844
- -107, -110, -132, -56, -138, -68, -138, -136, -138, -118,
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
- 76, 95, 69, 52, 74, 158, 110, 175, 118, 119,
850
- 145, 208, 1, 212, 186, 2, 43, 212, 212, 4,
851
- 42, 72, 91, 84, 84, 84, 84, 5, 40, 203,
852
- 122, 214, 80, 85, 86, 87, 10, 210, 11, 111,
853
- 115, 76, 12, 223, 138, 116, 118, 183, 110, 92,
854
- 53, 55, 56, 194, 198, 199, 13, 72, 72, 219,
855
- 49, 97, 128, 169, 213, 118, 104, 151, 224, 84,
856
- 84, 110, 227, 105, 152, 106, 153, 107, 134, 154,
857
- 76, 232, 115, 108, 137, 155, 68, 73, 112, 135,
858
- 139, 121, 201, 205, 222, 126, 167, 72, 102, 72,
859
- 149, 144, 190, 115, 220, 84, 123, 84, nil, nil,
860
- nil, 164, nil, nil, nil, nil, nil, nil, nil, 185,
861
- nil, nil, 72, nil, nil, 179, 84, nil, nil, nil,
862
- nil, nil, 191, nil, 202, nil, nil, nil, nil, nil,
863
- nil, nil, nil, nil, nil, nil, nil, nil, 206, 164,
864
- 209, nil, nil, nil, nil, nil, nil, nil, nil, nil,
865
- nil, nil, nil, nil, nil, nil, nil, 179, nil, nil,
866
- 209, nil, nil, nil, nil, nil, nil, nil, nil, nil,
867
- nil, 230, 209, 231, 225 ]
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
- 43, 44, 33, 35, 49, 40, 34, 39, 56, 55,
871
- 60, 46, 1, 64, 45, 2, 57, 64, 64, 3,
872
- 4, 35, 5, 35, 35, 35, 35, 6, 7, 45,
873
- 8, 46, 32, 32, 32, 32, 9, 39, 10, 33,
874
- 43, 43, 11, 46, 55, 49, 56, 60, 34, 57,
875
- 15, 15, 15, 21, 21, 21, 12, 35, 35, 45,
876
- 13, 14, 16, 17, 40, 56, 18, 19, 39, 35,
877
- 35, 34, 39, 22, 23, 24, 25, 26, 33, 27,
878
- 43, 39, 43, 28, 49, 29, 30, 31, 36, 37,
879
- 38, 41, 42, 47, 48, 51, 52, 35, 53, 35,
880
- 54, 59, 61, 43, 62, 35, 63, 35, nil, nil,
881
- nil, 43, nil, nil, nil, nil, nil, nil, nil, 44,
882
- nil, nil, 35, nil, nil, 43, 35, nil, nil, nil,
883
- nil, nil, 43, nil, 44, nil, nil, nil, nil, nil,
884
- nil, nil, nil, nil, nil, nil, nil, nil, 43, 43,
885
- 43, nil, nil, nil, nil, nil, nil, nil, nil, nil,
886
- nil, nil, nil, nil, nil, nil, nil, 43, nil, nil,
887
- 43, nil, nil, nil, nil, nil, nil, nil, nil, nil,
888
- nil, 44, 43, 44, 43 ]
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, 12, 15, 17, 11, -20, 25, 22, -60, 32,
892
- 34, 38, 52, 45, 12, 34, -41, -87, 8, -62,
893
- nil, -119, 14, -56, 15, -55, 16, -53, 21, -48,
894
- 53, 53, -3, -31, -63, -12, 16, -23, -30, -149,
895
- -136, 2, -86, -34, -45, -150, -173, -88, -121, -30,
896
- nil, -6, -52, 44, -27, -73, -73, 7, nil, -23,
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, nil, nil, nil, nil, nil, nil, nil, nil,
901
- 45, nil, nil, nil, nil, nil, nil, nil, nil, nil,
902
- 24, nil, nil, nil, nil, nil, nil, nil, nil, nil,
903
- nil, nil, nil, nil, 71, 77, nil, nil, nil, nil,
904
- nil, 46, 159, 196, nil, nil, nil, nil, nil, nil,
905
- 78, nil, nil, nil, nil, 81, 83, nil, 44, nil,
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
- 5, 55, :_reduce_none,
911
- 0, 56, :_reduce_none,
912
- 2, 56, :_reduce_none,
913
- 0, 61, :_reduce_4,
914
- 0, 62, :_reduce_5,
915
- 5, 60, :_reduce_6,
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
- 0, 57, :_reduce_8,
918
- 2, 57, :_reduce_none,
919
- 1, 63, :_reduce_none,
920
- 1, 63, :_reduce_none,
921
- 1, 63, :_reduce_none,
922
- 2, 63, :_reduce_13,
923
- 3, 63, :_reduce_none,
924
- 2, 63, :_reduce_none,
925
- 2, 63, :_reduce_16,
926
- 2, 63, :_reduce_17,
927
- 0, 70, :_reduce_18,
928
- 0, 71, :_reduce_19,
929
- 7, 63, :_reduce_20,
930
- 0, 72, :_reduce_21,
931
- 0, 73, :_reduce_22,
932
- 6, 63, :_reduce_23,
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
- 1, 84, :_reduce_50,
960
- 2, 84, :_reduce_51,
961
- 3, 84, :_reduce_52,
962
- 1, 87, :_reduce_53,
963
- 2, 87, :_reduce_54,
964
- 3, 88, :_reduce_55,
965
- 8, 65, :_reduce_56,
966
- 5, 66, :_reduce_57,
967
- 1, 92, :_reduce_58,
968
- 3, 92, :_reduce_59,
969
- 1, 94, :_reduce_60,
970
- 3, 94, :_reduce_61,
971
- 0, 96, :_reduce_62,
972
- 1, 96, :_reduce_63,
973
- 3, 96, :_reduce_64,
974
- 3, 96, :_reduce_65,
975
- 6, 96, :_reduce_66,
976
- 0, 101, :_reduce_67,
977
- 0, 102, :_reduce_68,
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
- 0, 105, :_reduce_82,
992
- 0, 106, :_reduce_83,
993
- 6, 69, :_reduce_84,
994
- 0, 107, :_reduce_85,
995
- 0, 108, :_reduce_86,
996
- 5, 69, :_reduce_87,
997
- 1, 86, :_reduce_88,
998
- 2, 86, :_reduce_89,
999
- 3, 86, :_reduce_90,
1000
- 1, 109, :_reduce_91,
1001
- 2, 109, :_reduce_92,
1002
- 1, 110, :_reduce_none,
1003
- 1, 89, :_reduce_94,
1004
- 1, 89, :_reduce_95,
1005
- 1, 58, :_reduce_none,
1006
- 2, 58, :_reduce_none,
1007
- 1, 111, :_reduce_none,
1008
- 2, 111, :_reduce_none,
1009
- 4, 112, :_reduce_100,
1010
- 1, 113, :_reduce_101,
1011
- 3, 113, :_reduce_102,
1012
- 2, 113, :_reduce_none,
1013
- 0, 114, :_reduce_104,
1014
- 1, 114, :_reduce_105,
1015
- 3, 114, :_reduce_106,
1016
- 4, 114, :_reduce_107,
1017
- 6, 114, :_reduce_108,
1018
- 0, 115, :_reduce_109,
1019
- 0, 116, :_reduce_110,
1020
- 8, 114, :_reduce_111,
1021
- 3, 114, :_reduce_112,
1022
- 1, 99, :_reduce_113,
1023
- 1, 99, :_reduce_114,
1024
- 1, 99, :_reduce_115,
1025
- 1, 100, :_reduce_116,
1026
- 3, 100, :_reduce_117,
1027
- 2, 100, :_reduce_118,
1028
- 4, 100, :_reduce_119,
1029
- 0, 98, :_reduce_none,
1030
- 3, 98, :_reduce_121,
1031
- 1, 95, :_reduce_none,
1032
- 0, 59, :_reduce_none,
1033
- 0, 117, :_reduce_124,
1034
- 3, 59, :_reduce_125,
1035
- 1, 67, :_reduce_none,
1036
- 0, 68, :_reduce_none,
1037
- 1, 68, :_reduce_none,
1038
- 1, 68, :_reduce_none,
1039
- 1, 68, :_reduce_none,
1040
- 1, 75, :_reduce_131,
1041
- 2, 75, :_reduce_132,
1042
- 1, 118, :_reduce_none,
1043
- 1, 118, :_reduce_none,
1044
- 1, 104, :_reduce_135,
1045
- 0, 93, :_reduce_none,
1046
- 1, 93, :_reduce_none ]
1047
-
1048
- racc_reduce_n = 138
1049
-
1050
- racc_shift_n = 233
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
- "{" => 19,
1073
- "}" => 20,
1074
- "%initial-action" => 21,
1075
- "%no-stdlib" => 22,
1076
- ";" => 23,
1077
- "%union" => 24,
1078
- "%destructor" => 25,
1079
- "%printer" => 26,
1080
- "%error-token" => 27,
1081
- "%after-shift" => 28,
1082
- "%before-reduce" => 29,
1083
- "%after-reduce" => 30,
1084
- "%after-shift-error-token" => 31,
1085
- "%after-pop-stack" => 32,
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
- "%left" => 35,
1089
- "%right" => 36,
1090
- "%precedence" => 37,
1091
- "%nonassoc" => 38,
1092
- "%rule" => 39,
1093
- "(" => 40,
1094
- ")" => 41,
1095
- ":" => 42,
1096
- "%inline" => 43,
1097
- "," => 44,
1098
- "|" => 45,
1099
- "%empty" => 46,
1100
- "%prec" => 47,
1101
- "?" => 48,
1102
- "+" => 49,
1103
- "*" => 50,
1104
- "[" => 51,
1105
- "]" => 52,
1106
- "{...}" => 53 }
1107
-
1108
- racc_nt_base = 54
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
- "params",
1200
- "@3",
1201
- "@4",
1202
- "@5",
1203
- "@6",
1185
+ "param",
1186
+ "\"-many1@param\"",
1204
1187
  "symbol_declaration",
1205
- "generic_symlist",
1206
- "@7",
1207
- "@8",
1208
- "@9",
1209
- "@10",
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
- "symbol",
1228
- "named_ref_opt",
1205
+ "named_ref",
1229
1206
  "parameterizing_suffix",
1230
1207
  "parameterizing_args",
1231
- "@15",
1232
- "@16",
1233
- "symbol_declaration_list",
1208
+ "midrule_action",
1209
+ "\"-option@%empty\"",
1210
+ "\"-option@named_ref\"",
1234
1211
  "string_as_id",
1235
- "@17",
1236
- "@18",
1237
- "@19",
1238
- "@20",
1239
- "token_declaration_list_for_precedence",
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
- "@21",
1246
- "@22",
1247
- "@23",
1248
- "generic_symlist_item" ]
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
- # reduce 1 omitted
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
- # reduce 2 omitted
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
- # reduce 3 omitted
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', 14)
1254
+ module_eval(<<'.,.,', 'parser.y', 11)
1264
1255
  def _reduce_4(val, _values, result)
1265
- begin_c_declaration("%}")
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', 19)
1261
+ module_eval(<<'.,.,', 'parser.y', 11)
1273
1262
  def _reduce_5(val, _values, result)
1274
- end_c_declaration
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', 23)
1268
+ module_eval(<<'.,.,', 'parser.y', 11)
1281
1269
  def _reduce_6(val, _values, result)
1282
- @grammar.prologue = val[2].s_value
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
- module_eval(<<'.,.,', 'parser.y', 27)
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
- # reduce 10 omitted
1300
-
1301
- # reduce 11 omitted
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
- # reduce 14 omitted
1313
-
1314
- # reduce 15 omitted
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', 44)
1327
- def _reduce_17(val, _values, result)
1328
- val[1].each {|token|
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
- module_eval(<<'.,.,', 'parser.y', 50)
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 _reduce_19(val, _values, result)
1346
- end_c_declaration
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
- module_eval(<<'.,.,', 'parser.y', 58)
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
- @grammar.add_percent_code(id: val[1], code: val[4])
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', 62)
1345
+ module_eval(<<'.,.,', 'parser.y', 37)
1361
1346
  def _reduce_21(val, _values, result)
1362
- begin_c_declaration("}")
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', 66)
1355
+ module_eval(<<'.,.,', 'parser.y', 43)
1369
1356
  def _reduce_22(val, _values, result)
1370
- end_c_declaration
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', 70)
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[3])
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', 72)
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
- # reduce 25 omitted
1392
-
1393
- module_eval(<<'.,.,', 'parser.y', 77)
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
- module_eval(<<'.,.,', 'parser.y', 81)
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', 85)
1394
+ module_eval(<<'.,.,', 'parser.y', 109)
1410
1395
  def _reduce_28(val, _values, result)
1411
- @grammar.set_union(
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
- # reduce 29 omitted
1421
-
1422
- module_eval(<<'.,.,', 'parser.y', 93)
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', 97)
1431
- def _reduce_31(val, _values, result)
1432
- end_c_declaration
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', 101)
1439
- def _reduce_32(val, _values, result)
1440
- @grammar.add_destructor(
1441
- ident_or_tags: val[6],
1442
- token_code: val[3],
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
- module_eval(<<'.,.,', 'parser.y', 109)
1451
- def _reduce_33(val, _values, result)
1452
- begin_c_declaration("}")
1453
-
1454
- result
1455
- end
1456
- .,.,
1426
+ # reduce 32 omitted
1457
1427
 
1458
- module_eval(<<'.,.,', 'parser.y', 113)
1459
- def _reduce_34(val, _values, result)
1460
- end_c_declaration
1428
+ # reduce 33 omitted
1461
1429
 
1462
- result
1463
- end
1464
- .,.,
1430
+ # reduce 34 omitted
1465
1431
 
1466
- module_eval(<<'.,.,', 'parser.y', 117)
1432
+ module_eval(<<'.,.,', 'parser.y', 65)
1467
1433
  def _reduce_35(val, _values, result)
1468
- @grammar.add_printer(
1469
- ident_or_tags: val[6],
1470
- token_code: val[3],
1471
- lineno: val[3].line
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', 125)
1444
+ module_eval(<<'.,.,', 'parser.y', 73)
1479
1445
  def _reduce_36(val, _values, result)
1480
- begin_c_declaration("}")
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', 129)
1456
+ module_eval(<<'.,.,', 'parser.y', 81)
1487
1457
  def _reduce_37(val, _values, result)
1488
- end_c_declaration
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', 133)
1468
+ module_eval(<<'.,.,', 'parser.y', 89)
1495
1469
  def _reduce_38(val, _values, result)
1496
- @grammar.add_error_token(
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', 141)
1476
+ module_eval(<<'.,.,', 'parser.y', 93)
1507
1477
  def _reduce_39(val, _values, result)
1508
- @grammar.after_shift = val[1]
1478
+ @grammar.before_reduce = val[1]
1509
1479
 
1510
1480
  result
1511
1481
  end
1512
1482
  .,.,
1513
1483
 
1514
- module_eval(<<'.,.,', 'parser.y', 145)
1484
+ module_eval(<<'.,.,', 'parser.y', 97)
1515
1485
  def _reduce_40(val, _values, result)
1516
- @grammar.before_reduce = val[1]
1486
+ @grammar.after_reduce = val[1]
1517
1487
 
1518
1488
  result
1519
1489
  end
1520
1490
  .,.,
1521
1491
 
1522
- module_eval(<<'.,.,', 'parser.y', 149)
1492
+ module_eval(<<'.,.,', 'parser.y', 101)
1523
1493
  def _reduce_41(val, _values, result)
1524
- @grammar.after_reduce = val[1]
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', 153)
1500
+ module_eval(<<'.,.,', 'parser.y', 105)
1531
1501
  def _reduce_42(val, _values, result)
1532
- @grammar.after_shift_error_token = val[1]
1502
+ @grammar.after_pop_stack = val[1]
1533
1503
 
1534
1504
  result
1535
1505
  end
1536
1506
  .,.,
1537
1507
 
1538
- module_eval(<<'.,.,', 'parser.y', 157)
1539
- def _reduce_43(val, _values, result)
1540
- @grammar.after_pop_stack = val[1]
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
- # reduce 44 omitted
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.add_type(id: id, tag: hash[:tag])
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', 171)
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', 181)
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', 191)
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', 201)
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
- module_eval(<<'.,.,', 'parser.y', 212)
1617
- def _reduce_50(val, _values, result)
1618
- val[0].each {|token_declaration|
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', 218)
1627
- def _reduce_51(val, _values, result)
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', 224)
1637
- def _reduce_52(val, _values, result)
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
- module_eval(<<'.,.,', 'parser.y', 229)
1647
- def _reduce_53(val, _values, result)
1648
- result = [val[0]]
1649
- result
1650
- end
1651
- .,.,
1632
+ # reduce 56 omitted
1652
1633
 
1653
- module_eval(<<'.,.,', 'parser.y', 230)
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', 232)
1661
- def _reduce_55(val, _values, result)
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', 236)
1668
- def _reduce_56(val, _values, result)
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', 242)
1677
- def _reduce_57(val, _values, result)
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', 246)
1686
- def _reduce_58(val, _values, result)
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', 247)
1693
- def _reduce_59(val, _values, result)
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', 251)
1700
- def _reduce_60(val, _values, result)
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', 256)
1709
- def _reduce_61(val, _values, result)
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
- module_eval(<<'.,.,', 'parser.y', 262)
1718
- def _reduce_62(val, _values, result)
1719
- reset_precs
1720
- result = Grammar::ParameterizingRule::Rhs.new
1702
+ # reduce 66 omitted
1721
1703
 
1722
- result
1723
- end
1724
- .,.,
1704
+ # reduce 67 omitted
1725
1705
 
1726
- module_eval(<<'.,.,', 'parser.y', 267)
1727
- def _reduce_63(val, _values, result)
1706
+ # reduce 68 omitted
1707
+
1708
+ # reduce 69 omitted
1709
+
1710
+ module_eval(<<'.,.,', 'parser.y', 218)
1711
+ def _reduce_70(val, _values, result)
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', 272)
1736
- def _reduce_64(val, _values, result)
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', 280)
1748
- def _reduce_65(val, _values, result)
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', 286)
1758
- def _reduce_66(val, _values, result)
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', 292)
1768
- def _reduce_67(val, _values, result)
1769
- if @prec_seen
1770
- on_action_error("multiple User_code after %prec", val[0]) if @code_after_prec
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', 312)
1800
- def _reduce_70(val, _values, result)
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 71 omitted
1812
-
1813
- # reduce 72 omitted
1814
-
1815
- # reduce 73 omitted
1775
+ # reduce 76 omitted
1816
1776
 
1817
- # reduce 74 omitted
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', 331)
1828
- def _reduce_76(val, _values, result)
1829
- result = [{tag: val[0], tokens: val[1]}]
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', 335)
1836
- def _reduce_77(val, _values, result)
1837
- result = val[0].append({tag: val[1], tokens: val[2]})
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', 338)
1844
- def _reduce_78(val, _values, result)
1845
- result = [val[0]]
1846
- result
1847
- end
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
- # reduce 80 omitted
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
- begin_c_declaration("}")
1864
-
1814
+ result = val[0].append({tag: val[1], tokens: val[2]})
1865
1815
  result
1866
1816
  end
1867
1817
  .,.,
1868
1818
 
1869
- module_eval(<<'.,.,', 'parser.y', 350)
1870
- def _reduce_83(val, _values, result)
1871
- end_c_declaration
1819
+ # reduce 83 omitted
1872
1820
 
1873
- result
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
- result
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
- begin_c_declaration("}")
1825
+ begin_c_declaration("}")
1888
1826
 
1889
1827
  result
1890
1828
  end
1891
1829
  .,.,
1892
1830
 
1893
- module_eval(<<'.,.,', 'parser.y', 362)
1831
+ module_eval(<<'.,.,', 'parser.y', 278)
1894
1832
  def _reduce_86(val, _values, result)
1895
- end_c_declaration
1833
+ end_c_declaration
1896
1834
 
1897
1835
  result
1898
1836
  end
1899
1837
  .,.,
1900
1838
 
1901
- module_eval(<<'.,.,', 'parser.y', 366)
1839
+ module_eval(<<'.,.,', 'parser.y', 282)
1902
1840
  def _reduce_87(val, _values, result)
1903
- result = [val[2]]
1841
+ result = val[2]
1904
1842
 
1905
1843
  result
1906
1844
  end
1907
1845
  .,.,
1908
1846
 
1909
- module_eval(<<'.,.,', 'parser.y', 371)
1847
+ module_eval(<<'.,.,', 'parser.y', 290)
1910
1848
  def _reduce_88(val, _values, result)
1911
- result = [{tag: nil, tokens: val[0]}]
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', 375)
1854
+ module_eval(<<'.,.,', 'parser.y', 290)
1918
1855
  def _reduce_89(val, _values, result)
1919
- result = [{tag: val[0], tokens: val[1]}]
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', 379)
1861
+ module_eval(<<'.,.,', 'parser.y', 285)
1926
1862
  def _reduce_90(val, _values, result)
1927
- result = val[0].append({tag: val[1], tokens: val[2]})
1928
-
1863
+ result = [{tag: nil, tokens: val[0]}]
1929
1864
  result
1930
1865
  end
1931
1866
  .,.,
1932
1867
 
1933
- module_eval(<<'.,.,', 'parser.y', 382)
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', 383)
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
- # reduce 93 omitted
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', 388)
1957
- def _reduce_95(val, _values, result)
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
- # reduce 99 omitted
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', 409)
1986
- def _reduce_101(val, _values, result)
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', 417)
1998
- def _reduce_102(val, _values, result)
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
- # reduce 103 omitted
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 = Grammar::RuleBuilder.new(@rule_counter, @midrule_action_counter)
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', 437)
2030
- def _reduce_106(val, _values, result)
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', 445)
2042
- def _reduce_107(val, _values, result)
2043
- token = Lrama::Lexer::Token::InstantiateRule.new(s_value: val[2], location: @lexer.location, args: [val[1]], lhs_tag: val[3])
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', 453)
2054
- def _reduce_108(val, _values, result)
2055
- token = Lrama::Lexer::Token::InstantiateRule.new(s_value: val[1].s_value, location: @lexer.location, args: val[3], lhs_tag: val[5])
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', 461)
2066
- def _reduce_109(val, _values, result)
2067
- if @prec_seen
2068
- on_action_error("multiple User_code after %prec", val[0]) if @code_after_prec
2069
- @code_after_prec = true
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', 482)
2099
- def _reduce_112(val, _values, result)
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', 489)
2111
- def _reduce_113(val, _values, result)
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', 490)
2118
- def _reduce_114(val, _values, result)
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', 491)
2125
- def _reduce_115(val, _values, result)
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
- module_eval(<<'.,.,', 'parser.y', 493)
2132
- def _reduce_116(val, _values, result)
2133
- result = [val[0]]
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', 494)
2139
- def _reduce_117(val, _values, result)
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', 495)
2146
- def _reduce_118(val, _values, result)
2147
- result = [Lrama::Lexer::Token::InstantiateRule.new(s_value: val[1].s_value, location: @lexer.location, args: val[0])]
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', 496)
2153
- def _reduce_119(val, _values, result)
2154
- result = [Lrama::Lexer::Token::InstantiateRule.new(s_value: val[0].s_value, location: @lexer.location, args: val[2])]
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
- # reduce 120 omitted
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
- # reduce 122 omitted
2169
-
2170
- # reduce 123 omitted
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', 511)
2182
- def _reduce_125(val, _values, result)
2183
- end_c_declaration
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
- # reduce 126 omitted
2191
-
2192
- # reduce 127 omitted
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', 523)
2208
- def _reduce_132(val, _values, result)
2209
- result = val[0].append(val[1])
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 133 omitted
2116
+ # reduce 122 omitted
2117
+
2118
+ # reduce 123 omitted
2119
+
2120
+ # reduce 124 omitted
2121
+
2122
+ # reduce 125 omitted
2215
2123
 
2216
- # reduce 134 omitted
2124
+ # reduce 126 omitted
2217
2125
 
2218
- module_eval(<<'.,.,', 'parser.y', 528)
2219
- def _reduce_135(val, _values, result)
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