rbs 0.13.1 → 0.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ruby.yml +1 -1
  3. data/.gitignore +0 -1
  4. data/CHANGELOG.md +7 -2
  5. data/Gemfile +3 -0
  6. data/README.md +8 -2
  7. data/Steepfile +1 -0
  8. data/bin/annotate-with-rdoc +1 -1
  9. data/bin/setup +0 -2
  10. data/docs/CONTRIBUTING.md +1 -0
  11. data/goodcheck.yml +22 -5
  12. data/lib/rbs/ast/comment.rb +1 -1
  13. data/lib/rbs/definition_builder.rb +4 -5
  14. data/lib/rbs/environment.rb +1 -1
  15. data/lib/rbs/namespace.rb +1 -1
  16. data/lib/rbs/parser.rb +3146 -0
  17. data/lib/rbs/parser.y +7 -2
  18. data/lib/rbs/test/setup_helper.rb +4 -4
  19. data/lib/rbs/test/type_check.rb +2 -2
  20. data/lib/rbs/type_name.rb +1 -1
  21. data/lib/rbs/variance_calculator.rb +1 -1
  22. data/lib/rbs/version.rb +1 -1
  23. data/lib/rbs/writer.rb +1 -1
  24. data/sig/constant.rbs +2 -2
  25. data/sig/constant_table.rbs +10 -10
  26. data/sig/declarations.rbs +1 -1
  27. data/sig/definition.rbs +1 -1
  28. data/sig/namespace.rbs +3 -3
  29. data/sig/parser.rbs +25 -0
  30. data/sig/substitution.rbs +3 -3
  31. data/sig/typename.rbs +1 -1
  32. data/sig/types.rbs +1 -1
  33. data/sig/writer.rbs +15 -15
  34. data/stdlib/benchmark/benchmark.rbs +2 -2
  35. data/stdlib/builtin/basic_object.rbs +54 -54
  36. data/stdlib/builtin/binding.rbs +42 -42
  37. data/stdlib/builtin/class.rbs +33 -33
  38. data/stdlib/builtin/complex.rbs +90 -90
  39. data/stdlib/builtin/encoding.rbs +33 -33
  40. data/stdlib/builtin/enumerable.rbs +32 -32
  41. data/stdlib/builtin/enumerator.rbs +35 -35
  42. data/stdlib/builtin/errors.rbs +1 -1
  43. data/stdlib/builtin/exception.rbs +50 -50
  44. data/stdlib/builtin/false_class.rbs +6 -6
  45. data/stdlib/builtin/fiber.rbs +14 -14
  46. data/stdlib/builtin/fiber_error.rbs +1 -1
  47. data/stdlib/builtin/float.rbs +161 -161
  48. data/stdlib/builtin/gc.rbs +1 -1
  49. data/stdlib/builtin/io.rbs +83 -83
  50. data/stdlib/builtin/kernel.rbs +69 -69
  51. data/stdlib/builtin/match_data.rbs +1 -1
  52. data/stdlib/builtin/method.rbs +19 -19
  53. data/stdlib/builtin/nil_class.rbs +20 -20
  54. data/stdlib/builtin/numeric.rbs +101 -101
  55. data/stdlib/builtin/object.rbs +172 -172
  56. data/stdlib/builtin/proc.rbs +91 -91
  57. data/stdlib/builtin/range.rbs +2 -4
  58. data/stdlib/builtin/rational.rbs +83 -83
  59. data/stdlib/builtin/signal.rbs +7 -7
  60. data/stdlib/builtin/string.rbs +4 -4
  61. data/stdlib/builtin/string_io.rbs +1 -1
  62. data/stdlib/builtin/thread.rbs +185 -185
  63. data/stdlib/builtin/thread_group.rbs +2 -2
  64. data/stdlib/builtin/true_class.rbs +9 -9
  65. data/stdlib/builtin/warning.rbs +1 -1
  66. data/stdlib/date/date.rbs +2 -2
  67. data/stdlib/find/find.rbs +10 -10
  68. data/stdlib/pathname/pathname.rbs +1 -1
  69. data/stdlib/tmpdir/tmpdir.rbs +12 -12
  70. metadata +3 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 74ff49fc40275647a8d06dcda0f3a210454b5e1d73a4a08a65e3b6c9147cceb5
4
- data.tar.gz: fe69119582d76d69cfe3bcf91bf902bdb5c329b32787adfccb473da93ed99a71
3
+ metadata.gz: 391c185c91da1e233ce83cf4c9cd37f3624bfef9fbb96aa636bf9b42348bd62a
4
+ data.tar.gz: 21163b54afaf9e6d5a4b7638e29433511bbb3b26c62892ca4a22053d64675baa
5
5
  SHA512:
6
- metadata.gz: b35ce98a3183f6c2ef53e9fafb52620d837fb2d2300a27bedf4d81a45b245769c42770ae9b6b07a2ad873bcf6dd191f7faf3986cc895646f515f395fc5003bc8
7
- data.tar.gz: 479296ba1c726b424d86817b0b33956b270a6f7df56ff40f41122f600e49ab3858a3f438ce4277bc0bbff6be32b74d41b470c956c0a7977d5d067ab016d4e3df
6
+ metadata.gz: 19aa7220827ebae3cbc653622a1041d3a65b463edacd045800d5247e2a3e30cd30cfcd5ce9296abeb03232a0497693803ed84c3e910cd9c62d104a0f59097043
7
+ data.tar.gz: 8eebfa6339124dc466c23a75fe6b1a90728ce916e8eab4dd8d7442055d2d2bf22fafb696ace169202b6a15888e1a059ac2f6dca25db3953e75b6e88f2b729934
@@ -12,7 +12,7 @@ jobs:
12
12
  strategy:
13
13
  matrix:
14
14
  container_tag:
15
- - master-nightly-bionic
15
+ - master-nightly-bionic
16
16
  - 2.6.5-bionic
17
17
  - 2.7.0-bionic
18
18
  job:
data/.gitignore CHANGED
@@ -6,7 +6,6 @@
6
6
  /spec/reports/
7
7
  /tmp/
8
8
  /.ruby-version
9
- /lib/rbs/parser.rb
10
9
  /lib/rbs/parser.output
11
10
  /vendor/sigs
12
11
  /Gemfile.lock
@@ -2,11 +2,16 @@
2
2
 
3
3
  ## master
4
4
 
5
- ## 0.13.1 (2020-09-09)
5
+ ## 0.14.0 (2020-10-17)
6
+
7
+ * Allow keyword names ending with `?` and `!` ([#417](https://github.com/ruby/rbs/pull/417))
8
+ * Make `Range[T]` covariant ([#418](https://github.com/ruby/rbs/pull/418))
9
+
10
+ ## 0.13.1 (2020-10-09)
6
11
 
7
12
  * Fix test for CI of ruby/ruby ([#412](https://github.com/ruby/rbs/pull/412))
8
13
 
9
- ## 0.13.0 (2020-09-09)
14
+ ## 0.13.0 (2020-10-09)
10
15
 
11
16
  * Signature updates for `URI` classes.
12
17
  * Fix tests ([#410](https://github.com/ruby/rbs/pull/410))
data/Gemfile CHANGED
@@ -19,3 +19,6 @@ gem "goodcheck"
19
19
  # Test gems
20
20
  gem "rbs-amber", path: "test/assets/test-gem"
21
21
 
22
+ group :ide, optional: true do
23
+ gem "ruby-debug-ide"
24
+ end
data/README.md CHANGED
@@ -74,7 +74,7 @@ $ rbs method Object then
74
74
 
75
75
  ## Library
76
76
 
77
- There are two important concepts, _environment_ and _definition_.
77
+ There are two important concepts, _environment_ and _definition_.
78
78
 
79
79
  An _environment_ is a dictionary that keeps track of all declarations. What is the declaration associated with `String` class? An _environment_ will give you the answer.
80
80
 
@@ -104,8 +104,14 @@ builder = RBS::DefinitionBuilder.new(env: environment)
104
104
 
105
105
  # Definition of instance of String
106
106
  instance = builder.build_instance(string)
107
- # Print the types of `gsub` method
107
+
108
+ # Print the types of `gsub` method:
108
109
  puts instance.methods[:gsub].method_types.join("\n")
110
+ # Ouputs =>
111
+ # (::Regexp | ::string pattern, ::string replacement) -> ::String
112
+ # (::Regexp | ::string pattern, ::Hash[::String, ::String] hash) -> ::String
113
+ # (::Regexp | ::string pattern) { (::String match) -> ::_ToS } -> ::String
114
+ # (::Regexp | ::string pattern) -> ::Enumerator[::String, self]
109
115
 
110
116
  # Definition of singleton of String
111
117
  singleton = builder.build_singleton(string)
data/Steepfile CHANGED
@@ -1,6 +1,7 @@
1
1
  target :lib do
2
2
  signature "sig"
3
3
  check "lib"
4
+ ignore "lib/rbs/parser.rb"
4
5
 
5
6
  vendor stdlib: "stdlib"
6
7
  library "set", "pathname", "json", "logger"
@@ -14,7 +14,7 @@ def format_comment(comment)
14
14
  out = RDoc::Markup::Document.new
15
15
  out << comment
16
16
  formatter = RDoc::Markup::ToMarkdown.new
17
- out.accept(formatter)
17
+ out.accept(formatter).lines.map(&:rstrip).join("\n")
18
18
  end
19
19
 
20
20
  def comment_for_constant(decl, stores:)
data/bin/setup CHANGED
@@ -6,5 +6,3 @@ set -vx
6
6
  bundle install --jobs 4 --retry 3
7
7
 
8
8
  # Do any other automated setup that you need to do here
9
-
10
- bundle exec rake parser
@@ -17,6 +17,7 @@
17
17
  - Use `rbs prototype runtime --merge CLASS_NAME` command to generate the missing method definitions.
18
18
  - Committing the auto generated signatures is recommended.
19
19
  5. Annotate with RDoc.
20
+ - You'll need RDoc installed. Rvm users should use `rvm docs generate` first.
20
21
  - Use `bin/annotate-with-rdoc stdlib/path/to/signature.rbs` to annotate the RBS files.
21
22
  - Committing the generated annotations is recommended.
22
23
  6. Fix method types and comments.
@@ -6,12 +6,12 @@ rules:
6
6
  - "stdlib/**/*.rbs"
7
7
  fail:
8
8
  - |
9
- # arglists 💪👽🚨 << Delete this section
10
- # File.absolute_path?(file_name) -> true or false
9
+ # arglists 💪👽🚨 << Delete this section
10
+ # File.absolute_path?(file_name) -> true or false
11
11
  #
12
12
 
13
13
  - id: rbs.no_arg
14
- pattern:
14
+ pattern:
15
15
  regexp: arg\d+
16
16
  message: |
17
17
  Stop using parameter names like `arg0` or `arg1`
@@ -23,7 +23,7 @@ rules:
23
23
  - Documents (comments) may contain that pattern.
24
24
  glob:
25
25
  - "stdlib/**/*.rbs"
26
- fail:
26
+ fail:
27
27
  - "def `send`: (String | Symbol arg0, *untyped arg1) -> untyped"
28
28
  pass:
29
29
  - "def `send`: (String | Symbol, *untyped) -> untyped"
@@ -62,4 +62,21 @@ rules:
62
62
  end
63
63
  end
64
64
 
65
-
65
+ - id: no_trailing_whitespace
66
+ pattern:
67
+ regexp: '[ \t]+$'
68
+ message: |
69
+ Trim trailing whitespaces
70
+ glob:
71
+ - '**/*.rb'
72
+ - '**/*.rbs'
73
+ - '**/*.md'
74
+ justification:
75
+ - Let the maintainers know if it is an autogenerated files.
76
+ pass:
77
+ - "Hello world"
78
+ - "Hello\nworld"
79
+ - "Hello\n\nworld"
80
+ fail:
81
+ - "Hello world "
82
+ - "Hello \nworld"
@@ -23,7 +23,7 @@ module RBS
23
23
  { string: string, location: location }.to_json(*a)
24
24
  end
25
25
 
26
- def concat(string:, location:)
26
+ def concat(string:, location:)
27
27
  @string.concat string
28
28
 
29
29
  if loc = @location
@@ -40,7 +40,7 @@ module RBS
40
40
  if s = super_class
41
41
  yield s
42
42
  end
43
-
43
+
44
44
  self_types&.each(&block)
45
45
  included_modules&.each(&block)
46
46
  prepended_modules&.each(&block)
@@ -303,7 +303,7 @@ module RBS
303
303
  mod_ancestors = instance_ancestors(name, building_ancestors: building_ancestors)
304
304
  ancestors.unshift(*mod_ancestors.apply(arg_types, location: entry.primary.decl.location))
305
305
  end
306
- end
306
+ end
307
307
  end
308
308
 
309
309
  ancestors.unshift(self_ancestor)
@@ -316,7 +316,7 @@ module RBS
316
316
  mod_ancestors = instance_ancestors(name, building_ancestors: building_ancestors)
317
317
  ancestors.unshift(*mod_ancestors.apply(arg_types, location: entry.primary.decl.location))
318
318
  end
319
- end
319
+ end
320
320
  end
321
321
 
322
322
  building_ancestors.pop
@@ -814,8 +814,7 @@ module RBS
814
814
 
815
815
  methods.each do |name, method|
816
816
  method.method_types.each do |method_type|
817
- case method_type
818
- when MethodType
817
+ unless name == :initialize
819
818
  result = calculator.in_method_type(method_type: method_type, variables: param_names)
820
819
 
821
820
  validate_params_with type_params, result: result do |param|
@@ -13,7 +13,7 @@ module RBS
13
13
  def context
14
14
  @context ||= begin
15
15
  (outer + [decl]).each.with_object([Namespace.root]) do |decl, array|
16
- first = array.first or raise
16
+ first = array.first or raise
17
17
  array.unshift(first + decl.name.to_namespace)
18
18
  end
19
19
  end
@@ -100,7 +100,7 @@ module RBS
100
100
 
101
101
  until current.empty?
102
102
  yield current
103
- current = _ = current.parent
103
+ current = _ = current.parent
104
104
  end
105
105
 
106
106
  yield current
@@ -0,0 +1,3146 @@
1
+ #
2
+ # DO NOT MODIFY!!!!
3
+ # This file is automatically generated by Racc 1.5.0
4
+ # from Racc grammar file "".
5
+ #
6
+
7
+ require 'racc/parser.rb'
8
+ module RBS
9
+ class Parser < Racc::Parser
10
+
11
+ module_eval(<<'...end parser.y/module_eval...', 'parser.y', 1042)
12
+
13
+ Types = RBS::Types
14
+ Namespace = RBS::Namespace
15
+ TypeName = RBS::TypeName
16
+ Declarations = RBS::AST::Declarations
17
+ Members = RBS::AST::Members
18
+ MethodType = RBS::MethodType
19
+ Annotation = RBS::AST::Annotation
20
+
21
+ class LocatedValue
22
+ attr_reader :location
23
+ attr_reader :value
24
+
25
+ def initialize(location:, value:)
26
+ @location = location
27
+ @value = value
28
+ end
29
+ end
30
+
31
+ require "strscan"
32
+
33
+ attr_reader :input
34
+ attr_reader :buffer
35
+ attr_reader :eof_re
36
+
37
+ def initialize(type, buffer:, eof_re:)
38
+ super()
39
+ @type = type
40
+ @buffer = buffer
41
+ @input = StringScanner.new(buffer.content)
42
+ @eof_re = eof_re
43
+ @eof = false
44
+ @bound_variables_stack = []
45
+ @comments = {}
46
+ @ascii_only = buffer.content.ascii_only?
47
+ end
48
+
49
+ def start_merged_variables_scope
50
+ set = @bound_variables_stack.last&.dup || Set.new
51
+ @bound_variables_stack.push set
52
+ end
53
+
54
+ def start_new_variables_scope
55
+ @bound_variables_stack.push Set.new
56
+ end
57
+
58
+ def reset_variable_scope
59
+ @bound_variables_stack.pop
60
+ end
61
+
62
+ def insert_bound_variable(var)
63
+ @bound_variables_stack.last << var
64
+ end
65
+
66
+ def is_bound_variable?(var)
67
+ (@bound_variables_stack.last || Set.new).member?(var)
68
+ end
69
+
70
+ def self.parse_signature(input, eof_re: nil)
71
+ case input
72
+ when RBS::Buffer
73
+ buffer = input
74
+ else
75
+ buffer = RBS::Buffer.new(name: nil, content: input.to_s)
76
+ end
77
+
78
+ self.new(:SIGNATURE, buffer: buffer, eof_re: eof_re).do_parse
79
+ end
80
+
81
+ def self.parse_type(input, variables: [], eof_re: nil)
82
+ case input
83
+ when RBS::Buffer
84
+ buffer = input
85
+ else
86
+ buffer = RBS::Buffer.new(name: nil, content: input.to_s)
87
+ end
88
+
89
+ self.new(:TYPE, buffer: buffer, eof_re: eof_re).yield_self do |parser|
90
+ parser.start_new_variables_scope
91
+
92
+ variables.each do |var|
93
+ parser.insert_bound_variable var
94
+ end
95
+
96
+ parser.do_parse
97
+ ensure
98
+ parser.reset_variable_scope
99
+ end
100
+ end
101
+
102
+ def self.parse_method_type(input, variables: [], eof_re: nil)
103
+ case input
104
+ when RBS::Buffer
105
+ buffer = input
106
+ else
107
+ buffer = RBS::Buffer.new(name: nil, content: input.to_s)
108
+ end
109
+
110
+ self.new(:METHODTYPE, buffer: buffer, eof_re: eof_re).yield_self do |parser|
111
+ parser.start_new_variables_scope
112
+
113
+ variables.each do |var|
114
+ parser.insert_bound_variable var
115
+ end
116
+
117
+ parser.do_parse
118
+ ensure
119
+ parser.reset_variable_scope
120
+ end
121
+ end
122
+
123
+ def leading_comment(location)
124
+ @comments[location.start_line-1]
125
+ end
126
+
127
+ def push_comment(string, location)
128
+ if (comment = leading_comment(location)) && comment.location.start_column == location.start_column
129
+ comment.concat(string: "#{string}\n", location: location)
130
+ @comments[comment.location.end_line] = comment
131
+ else
132
+ new_comment = AST::Comment.new(string: "#{string}\n", location: location)
133
+ @comments[new_comment.location.end_line] = new_comment
134
+ end
135
+ end
136
+
137
+ def new_token(type, value = input.matched)
138
+ charpos = charpos(input)
139
+ start_index = charpos - input.matched.size
140
+ end_index = charpos
141
+
142
+ location = RBS::Location.new(buffer: buffer,
143
+ start_pos: start_index,
144
+ end_pos: end_index)
145
+
146
+ [type, LocatedValue.new(location: location, value: value)]
147
+ end
148
+
149
+ def charpos(scanner)
150
+ if @ascii_only
151
+ scanner.pos
152
+ else
153
+ scanner.charpos
154
+ end
155
+ end
156
+
157
+ def empty_params_result
158
+ [
159
+ [],
160
+ [],
161
+ nil,
162
+ [],
163
+ {},
164
+ {},
165
+ nil
166
+ ]
167
+ end
168
+
169
+ KEYWORDS = {
170
+ "class" => :kCLASS,
171
+ "type" => :kTYPE,
172
+ "def" => :kDEF,
173
+ "self" => :kSELF,
174
+ "void" => :kVOID,
175
+ "any" => :kANY,
176
+ "untyped" => :kUNTYPED,
177
+ "top" => :kTOP,
178
+ "bot" => :kBOT,
179
+ "instance" => :kINSTANCE,
180
+ "bool" => :kBOOL,
181
+ "nil" => :kNIL,
182
+ "true" => :kTRUE,
183
+ "false" => :kFALSE,
184
+ "singleton" => :kSINGLETON,
185
+ "interface" => :kINTERFACE,
186
+ "end" => :kEND,
187
+ "include" => :kINCLUDE,
188
+ "extend" => :kEXTEND,
189
+ "prepend" => :kPREPEND,
190
+ "module" => :kMODULE,
191
+ "attr_reader" => :kATTRREADER,
192
+ "attr_writer" => :kATTRWRITER,
193
+ "attr_accessor" => :kATTRACCESSOR,
194
+ "public" => :kPUBLIC,
195
+ "private" => :kPRIVATE,
196
+ "alias" => :kALIAS,
197
+ "extension" => :kEXTENSION,
198
+ "incompatible" => :kINCOMPATIBLE,
199
+ "unchecked" => :kUNCHECKED,
200
+ "overload" => :kOVERLOAD,
201
+ "out" => :kOUT,
202
+ "in" => :kIN,
203
+ }
204
+ KEYWORDS_RE = /#{Regexp.union(*KEYWORDS.keys)}\b/
205
+
206
+ PUNCTS = {
207
+ "===" => :tOPERATOR,
208
+ "==" => :tOPERATOR,
209
+ "=~" => :tOPERATOR,
210
+ "!~" => :tOPERATOR,
211
+ "!=" => :tOPERATOR,
212
+ ">=" => :tOPERATOR,
213
+ "<<" => :tOPERATOR,
214
+ "<=>" => :tOPERATOR,
215
+ "<=" => :tOPERATOR,
216
+ ">>" => :tOPERATOR,
217
+ ">" => :tOPERATOR,
218
+ "~" => :tOPERATOR,
219
+ "+@" => :tOPERATOR,
220
+ "+" => :tOPERATOR,
221
+ "[]=" => :tOPERATOR,
222
+ "[]" => :tOPERATOR,
223
+ "::" => :kCOLON2,
224
+ ":" => :kCOLON,
225
+ "(" => :kLPAREN,
226
+ ")" => :kRPAREN,
227
+ "[" => :kLBRACKET,
228
+ "]" => :kRBRACKET,
229
+ "{" => :kLBRACE,
230
+ "}" => :kRBRACE,
231
+ "," => :kCOMMA,
232
+ "|" => :kBAR,
233
+ "&" => :kAMP,
234
+ "^" => :kHAT,
235
+ "->" => :kARROW,
236
+ "=>" => :kFATARROW,
237
+ "=" => :kEQ,
238
+ "?" => :kQUESTION,
239
+ "!" => :kEXCLAMATION,
240
+ "**" => :kSTAR2,
241
+ "*" => :kSTAR,
242
+ "..." => :kDOT3,
243
+ "." => :kDOT,
244
+ "<" => :kLT,
245
+ "-@" => :tOPERATOR,
246
+ "-" => :tOPERATOR,
247
+ "/" => :tOPERATOR,
248
+ "`" => :tOPERATOR,
249
+ "%" => :tOPERATOR,
250
+ }
251
+ PUNCTS_RE = Regexp.union(*PUNCTS.keys)
252
+
253
+ ANNOTATION_RE = Regexp.union(/%a\{.*?\}/,
254
+ /%a\[.*?\]/,
255
+ /%a\(.*?\)/,
256
+ /%a\<.*?\>/,
257
+ /%a\|.*?\|/)
258
+ def next_token
259
+ if @type
260
+ type = @type
261
+ @type = nil
262
+ return [:"type_#{type}", nil]
263
+ end
264
+
265
+ return if @eof
266
+
267
+ while true
268
+ return if input.eos?
269
+
270
+ case
271
+ when input.scan(/\s+/)
272
+ # skip
273
+ when input.scan(/#(( *)|( ?(?<string>.*)))\n/)
274
+ charpos = charpos(input)
275
+ start_index = charpos - input.matched.size
276
+ end_index = charpos-1
277
+
278
+ location = RBS::Location.new(buffer: buffer,
279
+ start_pos: start_index,
280
+ end_pos: end_index)
281
+
282
+ push_comment input[:string] || "", location
283
+ else
284
+ break
285
+ end
286
+ end
287
+
288
+ case
289
+ when eof_re && input.scan(eof_re)
290
+ @eof = true
291
+ [:tEOF, input.matched]
292
+ when input.scan(/`[a-zA-Z_]\w*`/)
293
+ s = input.matched.yield_self {|s| s[1, s.length-2] }
294
+ new_token(:tQUOTEDIDENT, s)
295
+ when input.scan(/`(\\`|[^` :])+`/)
296
+ s = input.matched.yield_self {|s| s[1, s.length-2] }.gsub(/\\`/, '`')
297
+ new_token(:tQUOTEDMETHOD, s)
298
+ when input.scan(ANNOTATION_RE)
299
+ s = input.matched.yield_self {|s| s[3, s.length-4] }.strip
300
+ new_token(:tANNOTATION, s)
301
+ when input.scan(/self\?/)
302
+ new_token(:kSELFQ, "self?")
303
+ when input.scan(/(([a-zA-Z]\w*)|(_\w+))=/)
304
+ new_token(:tWRITE_ATTR)
305
+ when input.scan(KEYWORDS_RE)
306
+ new_token(KEYWORDS[input.matched], input.matched.to_sym)
307
+ when input.scan(/:((@{,2}|\$)?\w+(\?|\!)?|\+|\-)\b?/)
308
+ s = input.matched.yield_self {|s| s[1, s.length] }.to_sym
309
+ new_token(:tSYMBOL, s)
310
+ when input.scan(/[+-]?\d[\d_]*/)
311
+ new_token(:tINTEGER, input.matched.to_i)
312
+ when input.scan(PUNCTS_RE)
313
+ new_token(PUNCTS[input.matched])
314
+ when input.scan(/(::)?([A-Z]\w*::)+/)
315
+ new_token(:tNAMESPACE)
316
+ when input.scan(/[a-z_]\w*:/)
317
+ new_token(:tLKEYWORD, input.matched.chop.to_sym)
318
+ when input.scan(/[a-z_]\w*[?!]:/)
319
+ new_token(:tLKEYWORD_Q_E, input.matched.chop.to_sym)
320
+ when input.scan(/[A-Z]\w*:/)
321
+ new_token(:tUKEYWORD, input.matched.chop.to_sym)
322
+ when input.scan(/[A-Z]\w*[?!]:/)
323
+ new_token(:tUKEYWORD_Q_E, input.matched.chop.to_sym)
324
+ when input.scan(/\$[A-Za-z_]\w*/)
325
+ new_token(:tGLOBALIDENT)
326
+ when input.scan(/@[a-zA-Z_]\w*/)
327
+ new_token(:tIVAR, input.matched.to_sym)
328
+ when input.scan(/@@[a-zA-Z_]\w*/)
329
+ new_token(:tCLASSVAR, input.matched.to_sym)
330
+ when input.scan(/_[a-zA-Z]\w*\b/)
331
+ new_token(:tINTERFACEIDENT)
332
+ when input.scan(/[A-Z]\w*\b/)
333
+ new_token(:tUIDENT)
334
+ when input.scan(/[a-z_]\w*\b/)
335
+ new_token(:tLIDENT)
336
+ when input.scan(/"(\\"|[^"])*"/)
337
+ s = input.matched.yield_self {|s| s[1, s.length - 2] }.gsub(/\\"/, '"')
338
+ new_token(:tSTRING, s)
339
+ when input.scan(/'(\\'|[^'])*'/)
340
+ s = input.matched.yield_self {|s| s[1, s.length - 2] }.gsub(/\\'/, "'")
341
+ new_token(:tSTRING, s)
342
+ else
343
+ raise "Unexpected token: #{input.peek(10)}..."
344
+ end
345
+ end
346
+
347
+ def on_error(token_id, error_value, value_stack)
348
+ raise SyntaxError.new(token_str: token_to_str(token_id), error_value: error_value, value_stack: value_stack)
349
+ end
350
+
351
+ class SyntaxError < StandardError
352
+ attr_reader :token_str, :error_value, :value_stack
353
+
354
+ def initialize(token_str:, error_value:, value_stack: nil)
355
+ @token_str = token_str
356
+ @error_value = error_value
357
+ @value_stack = value_stack
358
+
359
+ super "parse error on value: #{error_value.inspect} (#{token_str})"
360
+ end
361
+ end
362
+
363
+ class SemanticsError < StandardError
364
+ attr_reader :subject, :location, :original_message
365
+
366
+ def initialize(message, subject:, location:)
367
+ @subject = subject
368
+ @location = location
369
+ @original_message = message
370
+
371
+ super "parse error on #{location}: #{message}"
372
+ end
373
+ end
374
+
375
+ ...end parser.y/module_eval...
376
+ ##### State transition tables begin ###
377
+
378
+ clist = [
379
+ '341,342,33,343,406,76,5,33,33,380,354,37,50,33,33,340,42,379,352,2,3',
380
+ '4,209,210,211,212,213,214,215,216,220,33,217,208,218,219,104,115,105',
381
+ '106,107,121,33,32,51,336,330,331,32,32,334,332,335,301,32,32,33,333',
382
+ '120,108,109,110,112,114,113,329,338,339,111,116,118,196,32,199,87,122',
383
+ '123,119,124,341,342,33,343,32,58,59,60,61,279,280,43,33,33,33,340,231',
384
+ '50,32,200,88,197,209,210,211,212,213,214,215,216,220,361,217,208,218',
385
+ '219,104,115,105,106,107,121,33,32,48,336,330,331,50,51,334,332,335,32',
386
+ '32,32,88,333,120,108,109,110,112,114,113,329,338,339,111,116,118,341',
387
+ '342,320,343,122,123,119,124,66,51,158,39,32,40,41,340,157,83,324,395',
388
+ '89,316,209,210,211,212,213,214,215,216,355,276,217,208,218,219,104,115',
389
+ '105,106,107,121,39,88,88,336,330,331,40,41,334,332,335,40,41,144,277',
390
+ '333,120,108,109,110,112,114,113,329,338,339,111,116,118,164,397,396',
391
+ '145,122,123,119,124,341,342,146,343,147,58,59,60,61,63,64,148,65,272',
392
+ '273,340,76,88,88,88,40,41,209,210,211,212,213,214,215,216,220,156,217',
393
+ '208,218,219,104,115,105,106,107,121,40,41,159,336,330,331,40,41,334',
394
+ '332,335,40,41,387,388,333,120,108,109,110,112,114,113,329,338,339,111',
395
+ '116,118,341,342,161,343,122,123,119,124,163,58,59,60,61,40,41,340,55',
396
+ '54,56,40,41,41,209,210,211,212,213,214,215,216,220,166,217,208,218,219',
397
+ '104,115,105,106,107,121,40,41,158,336,330,331,40,41,334,332,335,40,41',
398
+ '40,41,333,120,108,109,110,112,114,113,329,338,339,111,116,118,40,41',
399
+ '40,41,122,123,119,124,341,342,-107,343,-108,58,59,60,61,58,59,60,61',
400
+ '40,41,340,55,54,56,40,41,-109,209,210,211,212,213,214,215,216,220,-110',
401
+ '217,208,218,219,104,115,105,106,107,121,40,41,-111,336,330,331,40,41',
402
+ '334,332,335,365,366,40,41,333,120,108,109,110,112,114,113,329,338,339',
403
+ '111,116,118,341,342,-112,343,122,123,119,124,40,41,-113,-114,-115,-116',
404
+ '-117,340,48,-132,171,172,173,174,209,210,211,212,213,214,215,216,220',
405
+ '175,217,208,218,219,104,115,105,106,107,121,176,177,42,336,330,331,201',
406
+ '234,334,332,335,235,237,238,239,333,120,108,109,110,112,114,113,329',
407
+ '338,339,111,116,118,241,83,245,245,122,123,119,124,341,342,245,343,251',
408
+ '58,59,60,61,254,42,257,259,263,265,340,267,268,42,270,307,309,209,210',
409
+ '211,212,213,214,215,216,220,263,217,208,218,219,104,115,105,106,107',
410
+ '121,311,267,321,336,330,331,322,323,334,332,335,359,364,364,364,333',
411
+ '120,108,109,110,112,114,113,329,338,339,111,116,118,371,372,373,374',
412
+ '122,123,119,124,33,375,377,58,59,60,61,378,381,382,22,23,21,392,26,-217',
413
+ '25,401,30,402,93,94,95,96,97,98,99,100,117,16,101,92,102,103,104,115',
414
+ '105,106,107,121,403,32,406,407,408,28,409,139,,140,142,,,,,,120,108',
415
+ '109,110,112,114,113,,,,111,116,118,,,,,122,123,119,124,33,,,58,59,60',
416
+ '61,,,,22,23,21,,26,,25,,30,,93,94,95,96,97,98,99,100,117,16,101,92,102',
417
+ '103,104,115,105,106,107,121,,32,,,,28,,,,,,,,,,,120,108,109,110,112',
418
+ '114,113,,,,111,116,118,,,,,122,123,119,124,33,,,58,59,60,61,,,,22,23',
419
+ '21,,26,-217,25,,30,,93,94,95,96,97,98,99,100,117,16,101,92,102,103,104',
420
+ '115,105,106,107,121,,32,,,,28,,207,,,142,,,,,,120,108,109,110,112,114',
421
+ '113,,,,111,116,118,,,,,122,123,119,124,33,,,58,59,60,61,,,,22,23,21',
422
+ ',26,-217,25,,30,,93,94,95,96,97,98,99,100,117,16,101,92,102,103,104',
423
+ '115,105,106,107,121,,32,,,,28,,207,,,142,,,,,,120,108,109,110,112,114',
424
+ '113,,,,111,116,118,,,,,122,123,119,124,33,,,58,59,60,61,,,,22,23,21',
425
+ ',26,-217,25,,30,,93,94,95,96,97,98,99,100,117,16,101,92,102,103,104',
426
+ '115,105,106,107,121,,32,,,,28,,139,,140,142,,,,,,120,108,109,110,112',
427
+ '114,113,,,,111,116,118,,,,,122,123,119,124,33,,,58,59,60,61,,,,22,23',
428
+ '21,,26,-217,25,,30,,93,94,95,96,97,98,99,100,117,16,101,92,102,103,104',
429
+ '115,105,106,107,121,-4,32,-239,,33,28,80,139,-239,140,142,,,76,,,120',
430
+ '108,109,110,112,114,113,,,,111,116,118,,,,,122,123,119,124,,,,,,,,,32',
431
+ ',,,,,,,,,,168,33,169,,58,59,60,61,,,,22,23,21,,26,-217,25,,30,39,93',
432
+ '94,95,96,97,98,99,100,117,16,101,92,102,103,104,115,105,106,107,121',
433
+ '168,32,169,40,41,28,,139,,140,142,,,,,,120,108,109,110,112,114,113,',
434
+ ',170,111,116,118,58,59,60,61,122,123,119,124,,,,,,,,40,41,209,210,211',
435
+ '212,213,214,215,216,220,,217,208,218,219,104,115,105,106,107,121,170',
436
+ ',,,,,,207,,,142,,,,,,120,108,109,110,112,114,113,168,,169,111,116,118',
437
+ '58,59,60,61,122,123,119,124,,,,,,,,,,209,210,211,212,213,214,215,216',
438
+ '220,,217,208,218,219,104,115,105,106,107,121,,40,41,,,,,207,,,142,,',
439
+ ',,,120,108,109,110,112,114,113,170,,,111,116,118,58,59,60,61,122,123',
440
+ '119,124,,,,,,,,,,209,210,211,212,213,214,215,216,220,,217,208,218,219',
441
+ '104,115,105,106,107,121,168,,169,168,152,169,168,155,169,153,,,,,,,120',
442
+ '108,109,110,112,114,113,,,,111,116,118,154,,,,122,123,119,124,,,,151',
443
+ ',,,40,41,,40,41,,40,41,-239,,33,,80,,-239,,,296,297,76,,,170,,,170,',
444
+ ',170,,-239,,33,,80,,-239,,298,296,297,76,,,,,,293,292,,,32,-239,,33',
445
+ ',80,,-239,,298,296,297,76,,,,284,,293,292,,,32,-239,,33,,80,,-239,,298',
446
+ '296,297,76,,,,312,,293,292,,,32,,,,,,,,,298,,,,,,,360,,293,292,,33,32',
447
+ ',,,,,,,,22,23,21,,26,,25,308,30,,8,12,19,20,9,10,13,14,15,16,17,18,11',
448
+ '27,,,33,,,,,32,,,,28,22,23,21,,26,,25,,30,,8,12,19,20,9,10,13,14,15',
449
+ '16,17,18,11,27,,,33,,,,,32,,,,28,22,23,21,,26,,25,,30,,8,12,19,20,9',
450
+ '10,13,14,15,16,17,18,11,27,,,33,,,,,32,,,,28,22,23,21,,26,,25,,30,,8',
451
+ '12,19,20,9,10,13,14,15,16,17,18,11,27,,,33,,,,,32,,,,28,22,23,21,,26',
452
+ ',25,,30,,8,12,19,20,9,10,13,14,15,16,17,18,11,27,,,33,,,,,32,,,,28,22',
453
+ '23,21,,26,,25,,30,,8,12,19,20,9,10,13,14,15,16,17,18,11,27,,,33,,,,',
454
+ '32,,,,28,22,23,21,,26,,25,45,30,,8,12,19,20,9,10,13,14,15,16,17,18,11',
455
+ '27,,,33,,,,,32,,,,28,22,23,21,,26,,25,,30,,8,12,19,20,9,10,13,14,15',
456
+ '16,17,18,11,27,,,33,,,,,32,,,,28,22,23,21,,26,,25,,30,,8,12,19,20,9',
457
+ '10,13,14,15,16,17,18,11,27,,,33,,,,,32,,,,28,22,23,21,,26,,25,,30,,8',
458
+ '12,19,20,9,10,13,14,15,16,17,18,11,27,,,33,,,,,32,,,,28,22,23,21,,26',
459
+ ',25,,30,,8,12,19,20,9,10,13,14,15,16,17,18,11,27,,,33,,,,,32,,,,28,22',
460
+ '23,21,,26,,25,,30,,8,12,19,20,9,10,13,14,15,16,17,18,11,27,,,33,,,,',
461
+ '32,,,,28,22,23,21,,26,,25,,30,,8,12,19,20,9,10,13,14,15,16,17,18,11',
462
+ '27,,,33,,,,,32,,,,28,22,23,21,,26,,25,,30,,8,12,19,20,9,10,13,14,15',
463
+ '16,17,18,11,27,,,33,,,,,32,,,,28,22,23,21,,26,,25,,30,,8,12,19,20,9',
464
+ '10,13,14,15,16,17,18,11,27,,,33,,,,,32,,,,28,22,23,21,,26,,25,,30,,8',
465
+ '12,19,20,9,10,13,14,15,16,17,18,11,27,,,33,,,,,32,,,,28,22,23,21,,26',
466
+ ',25,,30,,8,12,19,20,9,10,13,14,15,16,17,18,11,27,,,33,,,,,32,,,,28,22',
467
+ '23,21,,26,,25,,30,,8,12,19,20,9,10,13,14,15,16,17,18,11,27,,,33,,,,',
468
+ '32,,,,28,22,23,21,,26,,25,,30,,8,12,19,20,9,10,13,14,15,16,17,18,11',
469
+ '27,,,33,,,,,32,,,,28,22,23,21,,26,,25,,30,,8,12,19,20,9,10,13,14,15',
470
+ '16,17,18,11,27,,,33,,,,,32,,,,28,22,23,21,,26,,25,,30,,8,12,19,20,9',
471
+ '10,13,14,15,16,17,18,11,27,,,33,,,,,32,,,,28,22,23,21,,26,,25,,30,,8',
472
+ '12,19,20,9,10,13,14,15,16,17,18,11,27,,,33,,,,,32,,,,28,22,23,21,,26',
473
+ ',25,,30,,8,12,19,20,9,10,13,14,15,16,17,18,11,27,,,33,,,,,32,,,,28,22',
474
+ '23,21,,26,,25,,30,,8,12,19,20,9,10,13,14,15,16,17,18,11,27,,,33,,,,',
475
+ '32,,,,28,22,23,21,,26,,25,,30,,8,12,19,20,9,10,13,14,15,16,17,18,11',
476
+ '27,,,33,,,,,32,,,,28,22,23,21,,26,,25,,30,,8,12,19,20,9,10,13,14,15',
477
+ '16,17,18,11,27,,,33,,,,,32,,,,28,22,23,21,,26,,25,,30,,8,12,19,20,9',
478
+ '10,13,14,15,16,17,18,11,27,,,33,,,,,32,,,,28,22,23,21,,26,,25,,30,,8',
479
+ '12,19,20,9,10,13,14,15,16,17,18,11,27,,,33,,,,,32,,,,28,22,23,21,,26',
480
+ ',25,,30,,8,12,19,20,9,10,13,14,15,16,17,18,11,27,,,33,,,,,32,,,,28,22',
481
+ '23,21,,26,,25,,30,,8,12,19,20,9,10,13,14,15,16,17,18,11,27,,,33,,,,',
482
+ '32,,,,28,22,23,21,,26,,25,,30,,8,12,19,20,9,10,13,14,15,16,17,18,11',
483
+ '27,,,33,,,,,32,,,,28,22,23,21,,26,,25,,30,,8,12,19,20,9,10,13,14,15',
484
+ '16,17,18,11,27,,,33,,,,,32,,,,28,22,23,21,,26,,25,,30,,8,12,19,20,9',
485
+ '10,13,14,15,16,17,18,11,27,,,33,,,,,32,,,,28,22,23,21,,26,,25,,30,,8',
486
+ '12,19,20,9,10,13,14,15,16,17,18,11,27,,,33,,,,,32,,,,28,22,23,21,,26',
487
+ ',25,,30,,8,12,19,20,9,10,13,14,15,16,17,18,11,27,,,33,,,,,32,,,,28,22',
488
+ '23,21,,26,,25,,30,,8,12,19,20,9,10,13,14,15,16,17,18,11,27,152,,,155',
489
+ ',153,,32,320,,,28,,,,,,,,,,,,,,154,,316,317,313,314,315,,,,318,151' ]
490
+ racc_action_table = arr = ::Array.new(2819, nil)
491
+ idx = 0
492
+ clist.each do |str|
493
+ str.split(',', -1).each do |i|
494
+ arr[idx] = i.to_i unless i.empty?
495
+ idx += 1
496
+ end
497
+ end
498
+
499
+ clist = [
500
+ '375,375,317,375,409,269,1,259,267,364,319,5,28,265,231,375,7,364,319',
501
+ '0,0,0,375,375,375,375,375,375,375,375,375,318,375,375,375,375,375,375',
502
+ '375,375,375,375,316,317,28,375,375,375,259,267,375,375,375,269,265,231',
503
+ '190,375,375,375,375,375,375,375,375,375,375,375,375,375,375,160,318',
504
+ '162,46,375,375,375,375,314,314,188,314,316,314,314,314,314,262,262,24',
505
+ '189,187,48,314,189,196,190,162,46,160,314,314,314,314,314,314,314,314',
506
+ '314,326,314,314,314,314,314,314,314,314,314,314,155,188,27,314,314,314',
507
+ '237,196,314,314,314,189,187,48,326,314,314,314,314,314,314,314,314,314',
508
+ '314,314,314,314,314,320,320,306,320,314,314,314,314,32,237,79,35,155',
509
+ '6,6,320,79,36,300,383,47,306,320,320,320,320,320,320,320,320,320,260',
510
+ '320,320,320,320,320,320,320,320,320,320,6,300,383,320,320,320,47,47',
511
+ '320,320,320,252,252,52,260,320,320,320,320,320,320,320,320,320,320,320',
512
+ '320,320,320,86,385,384,53,320,320,320,320,386,386,54,386,55,386,386',
513
+ '386,386,31,31,56,31,257,257,386,76,86,385,384,149,149,386,386,386,386',
514
+ '386,386,386,386,386,78,386,386,386,386,386,386,386,386,386,386,391,391',
515
+ '80,386,386,386,393,393,386,386,386,394,394,374,374,386,386,386,386,386',
516
+ '386,386,386,386,386,386,386,386,386,408,408,82,408,386,386,386,386,83',
517
+ '30,30,30,30,369,369,408,30,30,30,367,367,84,408,408,408,408,408,408',
518
+ '408,408,408,90,408,408,408,408,408,408,408,408,408,408,184,184,91,408',
519
+ '408,408,185,185,408,408,408,186,186,362,362,408,408,408,408,408,408',
520
+ '408,408,408,408,408,408,408,408,165,165,358,358,408,408,408,408,315',
521
+ '315,92,315,93,315,315,315,315,145,145,145,145,192,192,315,145,145,145',
522
+ '193,193,94,315,315,315,315,315,315,315,315,315,95,315,315,315,315,315',
523
+ '315,315,315,315,315,194,194,96,315,315,315,357,357,315,315,315,337,337',
524
+ '390,390,315,315,315,315,315,315,315,315,315,315,315,315,315,315,356',
525
+ '356,97,356,315,315,315,315,44,44,98,99,100,101,102,356,103,117,127,128',
526
+ '129,131,356,356,356,356,356,356,356,356,356,133,356,356,356,356,356',
527
+ '356,356,356,356,356,136,137,143,356,356,356,172,191,356,356,356,195',
528
+ '197,198,200,356,356,356,356,356,356,356,356,356,356,356,356,356,356',
529
+ '205,228,229,230,356,356,356,356,313,313,232,313,233,313,313,313,313',
530
+ '236,240,243,244,245,246,313,247,249,253,255,271,275,313,313,313,313',
531
+ '313,313,313,313,313,277,313,313,313,313,313,313,313,313,313,313,278',
532
+ '282,296,313,313,313,297,298,313,313,313,323,328,346,348,313,313,313',
533
+ '313,313,313,313,313,313,313,313,313,313,313,349,350,351,353,313,313',
534
+ '313,313,174,355,359,174,174,174,174,363,368,370,174,174,174,380,174',
535
+ '174,174,387,174,388,174,174,174,174,174,174,174,174,174,174,174,174',
536
+ '174,174,174,174,174,174,174,174,389,174,398,400,403,174,405,174,,174',
537
+ '174,,,,,,174,174,174,174,174,174,174,,,,174,174,174,,,,,174,174,174',
538
+ '174,139,,,139,139,139,139,,,,139,139,139,,139,,139,,139,,139,139,139',
539
+ '139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139',
540
+ ',139,,,,139,,,,,,,,,,,139,139,139,139,139,139,139,,,,139,139,139,,,',
541
+ ',139,139,139,139,241,,,241,241,241,241,,,,241,241,241,,241,241,241,',
542
+ '241,,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241',
543
+ '241,241,241,241,,241,,,,241,,241,,,241,,,,,,241,241,241,241,241,241',
544
+ '241,,,,241,241,241,,,,,241,241,241,241,175,,,175,175,175,175,,,,175',
545
+ '175,175,,175,175,175,,175,,175,175,175,175,175,175,175,175,175,175,175',
546
+ '175,175,175,175,175,175,175,175,175,,175,,,,175,,175,,,175,,,,,,175',
547
+ '175,175,175,175,175,175,,,,175,175,175,,,,,175,175,175,175,161,,,161',
548
+ '161,161,161,,,,161,161,161,,161,161,161,,161,,161,161,161,161,161,161',
549
+ '161,161,161,161,161,161,161,161,161,161,161,161,161,161,,161,,,,161',
550
+ ',161,,161,161,,,,,,161,161,161,161,161,161,161,,,,161,161,161,,,,,161',
551
+ '161,161,161,173,,,173,173,173,173,,,,173,173,173,,173,173,173,,173,',
552
+ '173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173',
553
+ '173,173,173,34,173,34,,34,173,34,173,34,173,173,,,34,,,173,173,173,173',
554
+ '173,173,173,,,,173,173,173,,,,,173,173,173,173,,,,,,,,,34,,,,,,,,,,',
555
+ '180,50,180,,50,50,50,50,,,,50,50,50,,50,50,50,,50,34,50,50,50,50,50',
556
+ '50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,181,50,181,180,180,50,',
557
+ '50,,50,50,,,,,,50,50,50,50,50,50,50,,,180,50,50,50,177,177,177,177,50',
558
+ '50,50,50,,,,,,,,181,181,177,177,177,177,177,177,177,177,177,,177,177',
559
+ '177,177,177,177,177,177,177,177,181,,,,,,,177,,,177,,,,,,177,177,177',
560
+ '177,177,177,177,224,,224,177,177,177,176,176,176,176,177,177,177,177',
561
+ ',,,,,,,,,176,176,176,176,176,176,176,176,176,,176,176,176,176,176,176',
562
+ '176,176,176,176,,224,224,,,,,176,,,176,,,,,,176,176,176,176,176,176',
563
+ '176,224,,,176,176,176,207,207,207,207,176,176,176,176,,,,,,,,,,207,207',
564
+ '207,207,207,207,207,207,207,,207,207,207,207,207,207,207,207,207,207',
565
+ '125,,125,178,77,178,182,77,182,77,,,,,,,207,207,207,207,207,207,207',
566
+ ',,,207,207,207,77,,,,207,207,207,207,,,,77,,,,125,125,,178,178,,182',
567
+ '182,266,,266,,266,,266,,,266,266,266,,,125,,,178,,,182,,281,,281,,281',
568
+ ',281,,266,281,281,281,,,,,,266,266,,,266,325,,325,,325,,325,,281,325',
569
+ '325,325,,,,266,,281,281,,,281,274,,274,,274,,274,,325,274,274,274,,',
570
+ ',281,,325,325,,,325,,,,,,,,,274,,,,,,,325,,274,274,,156,274,,,,,,,,',
571
+ '156,156,156,,156,,156,274,156,,156,156,156,156,156,156,156,156,156,156',
572
+ '156,156,156,156,,,26,,,,,156,,,,156,26,26,26,,26,,26,,26,,26,26,26,26',
573
+ '26,26,26,26,26,26,26,26,26,26,,,40,,,,,26,,,,26,40,40,40,,40,,40,,40',
574
+ ',40,40,40,40,40,40,40,40,40,40,40,40,40,40,,,41,,,,,40,,,,40,41,41,41',
575
+ ',41,,41,,41,,41,41,41,41,41,41,41,41,41,41,41,41,41,41,,,43,,,,,41,',
576
+ ',,41,43,43,43,,43,,43,,43,,43,43,43,43,43,43,43,43,43,43,43,43,43,43',
577
+ ',,88,,,,,43,,,,43,88,88,88,,88,,88,,88,,88,88,88,88,88,88,88,88,88,88',
578
+ '88,88,88,88,,,25,,,,,88,,,,88,25,25,25,,25,,25,25,25,,25,25,25,25,25',
579
+ '25,25,25,25,25,25,25,25,25,,,235,,,,,25,,,,25,235,235,235,,235,,235',
580
+ ',235,,235,235,235,235,235,235,235,235,235,235,235,235,235,235,,,268',
581
+ ',,,,235,,,,235,268,268,268,,268,,268,,268,,268,268,268,268,268,268,268',
582
+ '268,268,268,268,268,268,268,,,140,,,,,268,,,,268,140,140,140,,140,,140',
583
+ ',140,,140,140,140,140,140,140,140,140,140,140,140,140,140,140,,,141',
584
+ ',,,,140,,,,140,141,141,141,,141,,141,,141,,141,141,141,141,141,141,141',
585
+ '141,141,141,141,141,141,141,,,142,,,,,141,,,,141,142,142,142,,142,,142',
586
+ ',142,,142,142,142,142,142,142,142,142,142,142,142,142,142,142,,,234',
587
+ ',,,,142,,,,142,234,234,234,,234,,234,,234,,234,234,234,234,234,234,234',
588
+ '234,234,234,234,234,234,234,,,146,,,,,234,,,,234,146,146,146,,146,,146',
589
+ ',146,,146,146,146,146,146,146,146,146,146,146,146,146,146,146,,,147',
590
+ ',,,,146,,,,146,147,147,147,,147,,147,,147,,147,147,147,147,147,147,147',
591
+ '147,147,147,147,147,147,147,,,57,,,,,147,,,,147,57,57,57,,57,,57,,57',
592
+ ',57,57,57,57,57,57,57,57,57,57,57,57,57,57,,,309,,,,,57,,,,57,309,309',
593
+ '309,,309,,309,,309,,309,309,309,309,309,309,309,309,309,309,309,309',
594
+ '309,309,,,321,,,,,309,,,,309,321,321,321,,321,,321,,321,,321,321,321',
595
+ '321,321,321,321,321,321,321,321,321,321,321,,,322,,,,,321,,,,321,322',
596
+ '322,322,,322,,322,,322,,322,322,322,322,322,322,322,322,322,322,322',
597
+ '322,322,322,,,148,,,,,322,,,,322,148,148,148,,148,,148,,148,,148,148',
598
+ '148,148,148,148,148,148,148,148,148,148,148,148,,,327,,,,,148,,,,148',
599
+ '327,327,327,,327,,327,,327,,327,327,327,327,327,327,327,327,327,327',
600
+ '327,327,327,327,,,201,,,,,327,,,,327,201,201,201,,201,,201,,201,,201',
601
+ '201,201,201,201,201,201,201,201,201,201,201,201,201,,,2,,,,,201,,,,201',
602
+ '2,2,2,,2,,2,,2,,2,2,2,2,2,2,2,2,2,2,2,2,2,2,,,345,,,,,2,,,,2,345,345',
603
+ '345,,345,,345,,345,,345,345,345,345,345,345,345,345,345,345,345,345',
604
+ '345,345,,,347,,,,,345,,,,345,347,347,347,,347,,347,,347,,347,347,347',
605
+ '347,347,347,347,347,347,347,347,347,347,347,,,157,,,,,347,,,,347,157',
606
+ '157,157,,157,,157,,157,,157,157,157,157,157,157,157,157,157,157,157',
607
+ '157,157,157,,,159,,,,,157,,,,157,159,159,159,,159,,159,,159,,159,159',
608
+ '159,159,159,159,159,159,159,159,159,159,159,159,,,51,,,,,159,,,,159',
609
+ '51,51,51,,51,,51,,51,,51,51,51,51,51,51,51,51,51,51,51,51,51,51,,,371',
610
+ ',,,,51,,,,51,371,371,371,,371,,371,,371,,371,371,371,371,371,371,371',
611
+ '371,371,371,371,371,371,371,,,372,,,,,371,,,,371,372,372,372,,372,,372',
612
+ ',372,,372,372,372,372,372,372,372,372,372,372,372,372,372,372,,,373',
613
+ ',,,,372,,,,372,373,373,373,,373,,373,,373,,373,373,373,373,373,373,373',
614
+ '373,373,373,373,373,373,373,,,377,,,,,373,,,,373,377,377,377,,377,,377',
615
+ ',377,,377,377,377,377,377,377,377,377,377,377,377,377,377,377,,,378',
616
+ ',,,,377,,,,377,378,378,378,,378,,378,,378,,378,378,378,378,378,378,378',
617
+ '378,378,378,378,378,378,378,,,381,,,,,378,,,,378,381,381,381,,381,,381',
618
+ ',381,,381,381,381,381,381,381,381,381,381,381,381,381,381,381,,,382',
619
+ ',,,,381,,,,381,382,382,382,,382,,382,,382,,382,382,382,382,382,382,382',
620
+ '382,382,382,382,382,382,382,,,179,,,,,382,,,,382,179,179,179,,179,,179',
621
+ ',179,,179,179,179,179,179,179,179,179,179,179,179,179,179,179,283,,',
622
+ '283,,283,,179,283,,,179,,,,,,,,,,,,,,283,,283,283,283,283,283,,,,283',
623
+ '283' ]
624
+ racc_action_check = arr = ::Array.new(2819, nil)
625
+ idx = 0
626
+ clist.each do |str|
627
+ str.split(',', -1).each do |i|
628
+ arr[idx] = i.to_i unless i.empty?
629
+ idx += 1
630
+ end
631
+ end
632
+
633
+ racc_action_pointer = [
634
+ -54, 6, 2276, nil, nil, 11, 116, -35, nil, nil,
635
+ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
636
+ nil, nil, nil, nil, 70, 1700, 1520, 105, -6, nil,
637
+ 302, 236, 154, nil, 1033, 85, 147, nil, nil, nil,
638
+ 1556, 1592, nil, 1628, 411, nil, 53, 151, 89, nil,
639
+ 1086, 2456, 182, 178, 176, 178, 185, 2024, nil, nil,
640
+ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
641
+ nil, nil, nil, nil, nil, nil, 232, 1297, 216, 158,
642
+ 229, nil, 284, 306, 273, nil, 200, nil, 1664, nil,
643
+ 312, 342, 337, 339, 356, 366, 379, 408, 416, 417,
644
+ 418, 419, 420, 448, nil, nil, nil, nil, nil, nil,
645
+ nil, nil, nil, nil, nil, nil, nil, 423, nil, nil,
646
+ nil, nil, nil, nil, nil, 1325, nil, 424, 450, 424,
647
+ nil, 425, nil, 435, nil, nil, 446, 447, nil, 681,
648
+ 1808, 1844, 1880, 443, nil, 381, 1952, 1988, 2168, 202,
649
+ nil, nil, nil, nil, nil, 117, 1484, 2384, nil, 2420,
650
+ 49, 912, 52, nil, nil, 324, nil, nil, nil, nil,
651
+ nil, nil, 448, 989, 604, 835, 1218, 1152, 1328, 2744,
652
+ 1086, 1127, 1331, nil, 295, 301, 306, 88, 77, 87,
653
+ 52, 443, 345, 351, 374, 453, 78, 482, 486, nil,
654
+ 504, 2240, nil, nil, nil, 475, nil, 1284, nil, nil,
655
+ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
656
+ nil, nil, nil, nil, 1216, nil, nil, nil, 502, 503,
657
+ 504, 10, 511, 528, 1916, 1736, 515, 109, nil, nil,
658
+ 488, 758, nil, 522, 482, 463, 499, 499, nil, 526,
659
+ nil, nil, 156, 496, nil, 525, nil, 240, nil, 3,
660
+ 160, nil, 11, nil, nil, 9, 1378, 4, 1772, -8,
661
+ nil, 530, nil, nil, 1444, 530, nil, 481, 569, nil,
662
+ nil, 1400, 526, 2747, nil, nil, nil, nil, nil, nil,
663
+ nil, nil, nil, nil, nil, nil, 529, 533, 521, nil,
664
+ 147, nil, nil, nil, nil, nil, 109, nil, nil, 2060,
665
+ nil, nil, nil, 527, 77, 377, 38, -2, 27, -62,
666
+ 148, 2096, 2132, 571, nil, 1422, 89, 2204, 565, nil,
667
+ nil, nil, nil, nil, nil, nil, nil, 381, nil, nil,
668
+ nil, nil, nil, nil, nil, 2312, 566, 2348, 567, 580,
669
+ 581, 582, nil, 564, nil, 552, 448, 380, 326, 566,
670
+ nil, nil, 308, 571, -2, nil, nil, 272, 572, 266,
671
+ 573, 2492, 2528, 2564, 252, -2, nil, 2600, 2636, nil,
672
+ 602, 2672, 2708, 148, 202, 201, 227, 568, 570, 616,
673
+ 387, 224, nil, 230, 235, nil, nil, nil, 592, nil,
674
+ 607, nil, nil, 595, nil, 607, nil, nil, 298, -54,
675
+ nil, nil ]
676
+
677
+ racc_action_default = [
678
+ -243, -243, -239, -6, -16, -243, -4, -160, -163, -164,
679
+ -165, -166, -167, -168, -169, -170, -171, -172, -173, -174,
680
+ -175, -176, -177, -178, -179, -239, -239, -243, -243, -187,
681
+ -243, -243, -240, -242, -17, -4, -150, 412, -1, -5,
682
+ -239, -239, -186, -239, -188, -181, -243, -243, -239, -185,
683
+ -239, -239, -243, -191, -243, -243, -243, -239, -199, -200,
684
+ -201, -202, -233, -234, -235, -236, -241, -2, -7, -8,
685
+ -9, -10, -11, -12, -13, -14, -17, -243, -243, -243,
686
+ -243, -3, -82, -243, -161, -162, -243, -182, -239, -183,
687
+ -243, -243, -173, -163, -167, -174, -175, -164, -165, -168,
688
+ -169, -172, -166, -118, -119, -120, -121, -122, -123, -124,
689
+ -125, -126, -127, -128, -129, -130, -131, -170, -133, -134,
690
+ -135, -136, -137, -138, -139, -229, -197, -243, -243, -206,
691
+ -207, -209, -210, -212, -213, -216, -219, -221, -222, -239,
692
+ -239, -239, -239, -204, -190, -243, -239, -239, -239, -196,
693
+ -18, -15, -15, -15, -15, -239, -239, -239, -238, -239,
694
+ -84, -239, -243, -152, -180, -189, -184, -223, -230, -231,
695
+ -232, -198, -243, -239, -239, -239, -217, -217, -229, -239,
696
+ -229, -229, -229, -192, -193, -194, -195, -239, -239, -239,
697
+ -239, -243, -157, -158, -159, -243, -243, -243, -243, -151,
698
+ -243, -239, -205, -213, -208, -215, -211, -243, -107, -108,
699
+ -109, -110, -111, -112, -113, -114, -115, -116, -117, -118,
700
+ -132, -218, -220, -224, -229, -225, -226, -228, -150, -140,
701
+ -140, -239, -140, -243, -239, -239, -243, -243, -83, -153,
702
+ -203, -239, -227, -243, -23, -148, -28, -34, -30, -33,
703
+ -59, -237, -156, -81, -85, -243, -214, -243, -34, -239,
704
+ -243, -142, -145, -149, -34, -239, -17, -239, -239, -17,
705
+ -86, -243, -20, -21, -17, -24, -141, -148, -243, -146,
706
+ -147, -17, -29, -73, -27, -35, -36, -37, -38, -39,
707
+ -40, -41, -42, -43, -44, -45, -243, -243, -243, -31,
708
+ -243, -58, -60, -61, -62, -63, -73, -34, -22, -239,
709
+ -143, -144, -26, -243, -243, -243, -239, -239, -239, -70,
710
+ -243, -239, -239, -243, -32, -17, -243, -239, -52, -89,
711
+ -90, -91, -92, -93, -94, -95, -96, -97, -100, -101,
712
+ -102, -103, -104, -105, -106, -239, -52, -239, -52, -64,
713
+ -66, -68, -71, -243, -74, -132, -243, -55, -56, -243,
714
+ -19, -25, -46, -243, -243, -98, -99, -48, -243, -50,
715
+ -243, -239, -239, -239, -75, -243, -154, -239, -239, -53,
716
+ -243, -239, -239, -243, -243, -243, -243, -243, -243, -243,
717
+ -57, -47, -54, -49, -51, -65, -67, -69, -16, -87,
718
+ -243, -76, -77, -243, -72, -78, -79, -88, -243, -16,
719
+ -155, -80 ]
720
+
721
+ racc_goto_table = [
722
+ 6, 57, 77, 46, 82, 191, 49, 128, 79, 90,
723
+ 143, 52, 167, 247, 179, 203, 62, 206, 344, 344,
724
+ 344, 86, 91, 38, 47, 344, 261, 328, 346, 348,
725
+ 205, 205, 266, 34, 356, 404, 363, 35, 84, 85,
726
+ 221, 222, 68, 274, 150, 271, 411, 282, 125, 281,
727
+ 258, 67, 81, 264, 368, 149, 370, 299, 310, 244,
728
+ 246, 344, 250, 303, 304, 223, 305, 225, 226, 227,
729
+ 376, 187, 188, 189, 190, 232, 269, 302, 353, 386,
730
+ 344, 249, 179, 256, 398, 160, 165, 195, 260, 389,
731
+ 278, 344, 325, 162, 204, 1, nil, 205, nil, nil,
732
+ 400, nil, nil, nil, nil, nil, nil, nil, nil, nil,
733
+ nil, 242, nil, 344, nil, 249, 57, 249, 198, nil,
734
+ nil, nil, 410, nil, nil, nil, 183, nil, nil, nil,
735
+ 202, nil, nil, nil, nil, nil, nil, 178, 180, 181,
736
+ 182, nil, nil, nil, 184, 185, 186, nil, 228, 229,
737
+ 230, nil, nil, nil, 192, 193, nil, 194, nil, 125,
738
+ 240, 91, 91, 91, 233, nil, 349, 350, 351, nil,
739
+ nil, 125, 125, 125, 236, nil, nil, 224, nil, nil,
740
+ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
741
+ nil, nil, nil, nil, 253, nil, 243, nil, nil, nil,
742
+ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
743
+ nil, nil, nil, nil, nil, 255, nil, nil, nil, nil,
744
+ 275, nil, nil, nil, nil, nil, nil, nil, nil, nil,
745
+ nil, nil, 252, 91, nil, nil, nil, 306, nil, 125,
746
+ 79, nil, nil, nil, nil, nil, 300, nil, 79, nil,
747
+ nil, nil, nil, nil, nil, 79, nil, nil, nil, nil,
748
+ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
749
+ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
750
+ nil, nil, nil, nil, 327, 345, 347, 326, nil, nil,
751
+ nil, nil, nil, nil, nil, nil, nil, nil, nil, 79,
752
+ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
753
+ nil, nil, nil, nil, nil, nil, nil, nil, nil, 357,
754
+ 358, nil, nil, nil, nil, 362, nil, nil, nil, nil,
755
+ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
756
+ nil, nil, nil, 367, nil, 369, nil, nil, nil, 383,
757
+ 384, 385, nil, nil, nil, nil, nil, 399, nil, nil,
758
+ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
759
+ nil, nil, nil, nil, nil, 390, 391, nil, nil, 393,
760
+ 394 ]
761
+
762
+ racc_goto_check = [
763
+ 2, 36, 16, 23, 18, 27, 51, 50, 59, 17,
764
+ 49, 61, 74, 25, 63, 69, 75, 69, 53, 53,
765
+ 53, 23, 59, 3, 2, 53, 55, 37, 37, 37,
766
+ 64, 64, 20, 4, 37, 46, 38, 5, 2, 2,
767
+ 70, 70, 6, 20, 16, 19, 46, 25, 2, 20,
768
+ 22, 3, 3, 24, 38, 2, 38, 26, 55, 21,
769
+ 21, 53, 21, 29, 30, 74, 35, 74, 74, 74,
770
+ 37, 14, 14, 14, 14, 39, 40, 41, 42, 44,
771
+ 53, 27, 63, 69, 45, 47, 2, 48, 54, 37,
772
+ 57, 53, 20, 58, 65, 1, nil, 64, nil, nil,
773
+ 37, nil, nil, nil, nil, nil, nil, nil, nil, nil,
774
+ nil, 74, nil, 53, nil, 27, 36, 27, 50, nil,
775
+ nil, nil, 37, nil, nil, nil, 61, nil, nil, nil,
776
+ 50, nil, nil, nil, nil, nil, nil, 2, 2, 2,
777
+ 2, nil, nil, nil, 2, 2, 2, nil, 17, 17,
778
+ 17, nil, nil, nil, 2, 2, nil, 2, nil, 2,
779
+ 49, 59, 59, 59, 59, nil, 27, 27, 27, nil,
780
+ nil, 2, 2, 2, 51, nil, nil, 2, nil, nil,
781
+ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
782
+ nil, nil, nil, nil, 49, nil, 18, nil, nil, nil,
783
+ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
784
+ nil, nil, nil, nil, nil, 51, nil, nil, nil, nil,
785
+ 17, nil, nil, nil, nil, nil, nil, nil, nil, nil,
786
+ nil, nil, 2, 59, nil, nil, nil, 16, nil, 2,
787
+ 59, nil, nil, nil, nil, nil, 23, nil, 59, nil,
788
+ nil, nil, nil, nil, nil, 59, nil, nil, nil, nil,
789
+ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
790
+ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
791
+ nil, nil, nil, nil, 36, 36, 36, 23, nil, nil,
792
+ nil, nil, nil, nil, nil, nil, nil, nil, nil, 59,
793
+ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
794
+ nil, nil, nil, nil, nil, nil, nil, nil, nil, 2,
795
+ 2, nil, nil, nil, nil, 2, nil, nil, nil, nil,
796
+ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
797
+ nil, nil, nil, 2, nil, 2, nil, nil, nil, 23,
798
+ 23, 23, nil, nil, nil, nil, nil, 36, nil, nil,
799
+ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
800
+ nil, nil, nil, nil, nil, 2, 2, nil, nil, 2,
801
+ 2 ]
802
+
803
+ racc_goto_pointer = [
804
+ nil, 95, -2, 17, 30, 33, 8, nil, nil, nil,
805
+ nil, nil, nil, nil, -80, nil, -32, -39, -32, -212,
806
+ -215, -170, -194, -22, -193, -218, -210, -150, nil, -206,
807
+ -205, nil, nil, nil, nil, -203, -29, -286, -292, -115,
808
+ -174, -192, -241, nil, -295, -302, -363, 3, -73, -41,
809
+ -43, -22, nil, -295, -157, -219, nil, -172, 10, -26,
810
+ nil, -19, nil, -125, -144, -80, nil, nil, nil, -158,
811
+ -136, nil, nil, nil, -113, -15 ]
812
+
813
+ racc_goto_default = [
814
+ nil, nil, 44, nil, nil, 405, 295, 69, 70, 71,
815
+ 72, 73, 74, 75, nil, 36, 283, 78, nil, nil,
816
+ nil, nil, nil, nil, nil, nil, 248, 24, 285, 286,
817
+ 287, 288, 289, 290, 291, 294, 126, nil, nil, nil,
818
+ nil, nil, nil, 319, nil, nil, nil, nil, nil, 7,
819
+ nil, nil, 337, 127, nil, nil, 262, nil, nil, 31,
820
+ 29, nil, 53, 141, 129, 130, 131, 132, 133, 134,
821
+ 135, 136, 137, 138, nil, nil ]
822
+
823
+ racc_reduce_table = [
824
+ 0, 0, :racc_error,
825
+ 3, 82, :_reduce_1,
826
+ 3, 82, :_reduce_2,
827
+ 3, 82, :_reduce_3,
828
+ 0, 84, :_reduce_none,
829
+ 1, 84, :_reduce_none,
830
+ 0, 85, :_reduce_6,
831
+ 2, 85, :_reduce_7,
832
+ 1, 87, :_reduce_none,
833
+ 1, 87, :_reduce_none,
834
+ 1, 87, :_reduce_none,
835
+ 1, 87, :_reduce_none,
836
+ 1, 87, :_reduce_none,
837
+ 1, 87, :_reduce_none,
838
+ 1, 87, :_reduce_none,
839
+ 0, 95, :_reduce_15,
840
+ 0, 96, :_reduce_16,
841
+ 0, 97, :_reduce_17,
842
+ 2, 97, :_reduce_18,
843
+ 10, 94, :_reduce_19,
844
+ 1, 100, :_reduce_none,
845
+ 1, 100, :_reduce_none,
846
+ 8, 93, :_reduce_22,
847
+ 0, 103, :_reduce_23,
848
+ 2, 103, :_reduce_24,
849
+ 5, 103, :_reduce_25,
850
+ 8, 92, :_reduce_26,
851
+ 7, 92, :_reduce_27,
852
+ 0, 105, :_reduce_28,
853
+ 2, 105, :_reduce_29,
854
+ 1, 106, :_reduce_30,
855
+ 3, 106, :_reduce_31,
856
+ 4, 107, :_reduce_32,
857
+ 1, 107, :_reduce_33,
858
+ 0, 101, :_reduce_34,
859
+ 2, 101, :_reduce_35,
860
+ 1, 109, :_reduce_none,
861
+ 1, 109, :_reduce_none,
862
+ 1, 109, :_reduce_none,
863
+ 1, 109, :_reduce_none,
864
+ 1, 109, :_reduce_none,
865
+ 1, 109, :_reduce_none,
866
+ 1, 109, :_reduce_42,
867
+ 1, 109, :_reduce_43,
868
+ 1, 109, :_reduce_none,
869
+ 1, 109, :_reduce_none,
870
+ 4, 115, :_reduce_46,
871
+ 6, 115, :_reduce_47,
872
+ 4, 115, :_reduce_48,
873
+ 6, 115, :_reduce_49,
874
+ 4, 115, :_reduce_50,
875
+ 6, 115, :_reduce_51,
876
+ 0, 119, :_reduce_52,
877
+ 2, 119, :_reduce_53,
878
+ 3, 119, :_reduce_54,
879
+ 3, 114, :_reduce_55,
880
+ 3, 114, :_reduce_56,
881
+ 5, 114, :_reduce_57,
882
+ 7, 91, :_reduce_58,
883
+ 0, 121, :_reduce_59,
884
+ 2, 121, :_reduce_60,
885
+ 1, 122, :_reduce_61,
886
+ 1, 122, :_reduce_62,
887
+ 1, 122, :_reduce_none,
888
+ 3, 111, :_reduce_64,
889
+ 6, 111, :_reduce_65,
890
+ 3, 112, :_reduce_66,
891
+ 6, 112, :_reduce_67,
892
+ 3, 113, :_reduce_68,
893
+ 6, 113, :_reduce_69,
894
+ 0, 123, :_reduce_70,
895
+ 1, 123, :_reduce_71,
896
+ 7, 110, :_reduce_72,
897
+ 0, 124, :_reduce_none,
898
+ 2, 124, :_reduce_74,
899
+ 0, 125, :_reduce_75,
900
+ 2, 125, :_reduce_76,
901
+ 2, 125, :_reduce_77,
902
+ 1, 127, :_reduce_78,
903
+ 1, 127, :_reduce_79,
904
+ 3, 127, :_reduce_80,
905
+ 6, 86, :_reduce_81,
906
+ 0, 128, :_reduce_82,
907
+ 3, 128, :_reduce_83,
908
+ 0, 129, :_reduce_84,
909
+ 3, 129, :_reduce_85,
910
+ 4, 129, :_reduce_86,
911
+ 1, 126, :_reduce_none,
912
+ 2, 126, :_reduce_88,
913
+ 1, 118, :_reduce_none,
914
+ 1, 118, :_reduce_none,
915
+ 1, 118, :_reduce_none,
916
+ 1, 118, :_reduce_none,
917
+ 1, 118, :_reduce_none,
918
+ 1, 118, :_reduce_none,
919
+ 1, 118, :_reduce_none,
920
+ 1, 118, :_reduce_none,
921
+ 1, 118, :_reduce_none,
922
+ 2, 118, :_reduce_98,
923
+ 2, 118, :_reduce_99,
924
+ 1, 118, :_reduce_none,
925
+ 1, 118, :_reduce_none,
926
+ 1, 118, :_reduce_none,
927
+ 1, 133, :_reduce_none,
928
+ 1, 133, :_reduce_none,
929
+ 1, 133, :_reduce_none,
930
+ 1, 133, :_reduce_none,
931
+ 1, 134, :_reduce_none,
932
+ 1, 134, :_reduce_none,
933
+ 1, 134, :_reduce_none,
934
+ 1, 134, :_reduce_none,
935
+ 1, 134, :_reduce_none,
936
+ 1, 134, :_reduce_none,
937
+ 1, 134, :_reduce_none,
938
+ 1, 134, :_reduce_none,
939
+ 1, 134, :_reduce_none,
940
+ 1, 134, :_reduce_none,
941
+ 1, 134, :_reduce_none,
942
+ 1, 134, :_reduce_none,
943
+ 1, 134, :_reduce_none,
944
+ 1, 134, :_reduce_none,
945
+ 1, 134, :_reduce_none,
946
+ 1, 134, :_reduce_none,
947
+ 1, 134, :_reduce_none,
948
+ 1, 134, :_reduce_none,
949
+ 1, 134, :_reduce_none,
950
+ 1, 134, :_reduce_none,
951
+ 1, 134, :_reduce_none,
952
+ 1, 134, :_reduce_none,
953
+ 1, 134, :_reduce_none,
954
+ 1, 134, :_reduce_none,
955
+ 1, 134, :_reduce_none,
956
+ 1, 134, :_reduce_none,
957
+ 1, 134, :_reduce_none,
958
+ 1, 134, :_reduce_none,
959
+ 1, 134, :_reduce_none,
960
+ 1, 134, :_reduce_none,
961
+ 1, 134, :_reduce_none,
962
+ 1, 134, :_reduce_none,
963
+ 1, 134, :_reduce_none,
964
+ 0, 102, :_reduce_140,
965
+ 3, 102, :_reduce_141,
966
+ 1, 135, :_reduce_142,
967
+ 3, 135, :_reduce_143,
968
+ 3, 136, :_reduce_144,
969
+ 0, 138, :_reduce_145,
970
+ 1, 138, :_reduce_146,
971
+ 1, 138, :_reduce_147,
972
+ 0, 137, :_reduce_148,
973
+ 1, 137, :_reduce_149,
974
+ 0, 99, :_reduce_150,
975
+ 3, 99, :_reduce_151,
976
+ 1, 139, :_reduce_152,
977
+ 3, 139, :_reduce_153,
978
+ 4, 116, :_reduce_154,
979
+ 8, 116, :_reduce_155,
980
+ 5, 88, :_reduce_156,
981
+ 3, 89, :_reduce_157,
982
+ 3, 89, :_reduce_158,
983
+ 3, 90, :_reduce_159,
984
+ 1, 83, :_reduce_none,
985
+ 3, 83, :_reduce_161,
986
+ 3, 83, :_reduce_162,
987
+ 1, 130, :_reduce_163,
988
+ 1, 130, :_reduce_164,
989
+ 1, 130, :_reduce_165,
990
+ 1, 130, :_reduce_166,
991
+ 1, 130, :_reduce_167,
992
+ 1, 130, :_reduce_168,
993
+ 1, 130, :_reduce_169,
994
+ 1, 130, :_reduce_170,
995
+ 1, 130, :_reduce_171,
996
+ 1, 130, :_reduce_172,
997
+ 1, 130, :_reduce_173,
998
+ 1, 130, :_reduce_174,
999
+ 1, 130, :_reduce_175,
1000
+ 1, 130, :_reduce_176,
1001
+ 1, 130, :_reduce_177,
1002
+ 1, 130, :_reduce_178,
1003
+ 1, 130, :_reduce_179,
1004
+ 4, 130, :_reduce_180,
1005
+ 2, 130, :_reduce_181,
1006
+ 3, 130, :_reduce_182,
1007
+ 3, 130, :_reduce_183,
1008
+ 4, 130, :_reduce_184,
1009
+ 2, 130, :_reduce_185,
1010
+ 2, 130, :_reduce_186,
1011
+ 1, 130, :_reduce_none,
1012
+ 1, 104, :_reduce_188,
1013
+ 3, 104, :_reduce_189,
1014
+ 3, 141, :_reduce_190,
1015
+ 1, 142, :_reduce_191,
1016
+ 3, 142, :_reduce_192,
1017
+ 3, 143, :_reduce_193,
1018
+ 3, 143, :_reduce_194,
1019
+ 3, 143, :_reduce_195,
1020
+ 2, 143, :_reduce_196,
1021
+ 1, 144, :_reduce_none,
1022
+ 2, 144, :_reduce_198,
1023
+ 1, 117, :_reduce_none,
1024
+ 1, 117, :_reduce_none,
1025
+ 1, 117, :_reduce_none,
1026
+ 1, 117, :_reduce_none,
1027
+ 5, 132, :_reduce_203,
1028
+ 2, 132, :_reduce_204,
1029
+ 3, 131, :_reduce_205,
1030
+ 1, 131, :_reduce_206,
1031
+ 1, 131, :_reduce_none,
1032
+ 3, 146, :_reduce_208,
1033
+ 1, 146, :_reduce_209,
1034
+ 1, 146, :_reduce_none,
1035
+ 3, 148, :_reduce_211,
1036
+ 1, 148, :_reduce_212,
1037
+ 1, 148, :_reduce_none,
1038
+ 3, 150, :_reduce_214,
1039
+ 1, 150, :_reduce_215,
1040
+ 1, 150, :_reduce_none,
1041
+ 0, 151, :_reduce_217,
1042
+ 3, 151, :_reduce_218,
1043
+ 1, 151, :_reduce_219,
1044
+ 3, 151, :_reduce_220,
1045
+ 1, 151, :_reduce_221,
1046
+ 1, 151, :_reduce_222,
1047
+ 2, 145, :_reduce_223,
1048
+ 3, 147, :_reduce_224,
1049
+ 3, 149, :_reduce_225,
1050
+ 3, 152, :_reduce_226,
1051
+ 4, 153, :_reduce_227,
1052
+ 3, 154, :_reduce_228,
1053
+ 0, 155, :_reduce_none,
1054
+ 1, 155, :_reduce_none,
1055
+ 1, 155, :_reduce_none,
1056
+ 1, 155, :_reduce_none,
1057
+ 2, 108, :_reduce_233,
1058
+ 1, 156, :_reduce_none,
1059
+ 1, 156, :_reduce_none,
1060
+ 1, 156, :_reduce_none,
1061
+ 2, 120, :_reduce_237,
1062
+ 2, 98, :_reduce_238,
1063
+ 0, 140, :_reduce_239,
1064
+ 1, 140, :_reduce_240,
1065
+ 2, 140, :_reduce_241,
1066
+ 1, 140, :_reduce_242 ]
1067
+
1068
+ racc_reduce_n = 243
1069
+
1070
+ racc_shift_n = 412
1071
+
1072
+ racc_token_table = {
1073
+ false => 0,
1074
+ :error => 1,
1075
+ :tUIDENT => 2,
1076
+ :tLIDENT => 3,
1077
+ :tNAMESPACE => 4,
1078
+ :tINTERFACEIDENT => 5,
1079
+ :tGLOBALIDENT => 6,
1080
+ :tLKEYWORD => 7,
1081
+ :tUKEYWORD => 8,
1082
+ :tLKEYWORD_Q_E => 9,
1083
+ :tUKEYWORD_Q_E => 10,
1084
+ :tIVAR => 11,
1085
+ :tCLASSVAR => 12,
1086
+ :tANNOTATION => 13,
1087
+ :tSTRING => 14,
1088
+ :tSYMBOL => 15,
1089
+ :tINTEGER => 16,
1090
+ :tWRITE_ATTR => 17,
1091
+ :kLPAREN => 18,
1092
+ :kRPAREN => 19,
1093
+ :kLBRACKET => 20,
1094
+ :kRBRACKET => 21,
1095
+ :kLBRACE => 22,
1096
+ :kRBRACE => 23,
1097
+ :kVOID => 24,
1098
+ :kNIL => 25,
1099
+ :kTRUE => 26,
1100
+ :kFALSE => 27,
1101
+ :kANY => 28,
1102
+ :kUNTYPED => 29,
1103
+ :kTOP => 30,
1104
+ :kBOT => 31,
1105
+ :kSELF => 32,
1106
+ :kSELFQ => 33,
1107
+ :kINSTANCE => 34,
1108
+ :kCLASS => 35,
1109
+ :kBOOL => 36,
1110
+ :kSINGLETON => 37,
1111
+ :kTYPE => 38,
1112
+ :kDEF => 39,
1113
+ :kMODULE => 40,
1114
+ :kPRIVATE => 41,
1115
+ :kPUBLIC => 42,
1116
+ :kALIAS => 43,
1117
+ :kCOLON => 44,
1118
+ :kCOLON2 => 45,
1119
+ :kCOMMA => 46,
1120
+ :kBAR => 47,
1121
+ :kAMP => 48,
1122
+ :kHAT => 49,
1123
+ :kARROW => 50,
1124
+ :kQUESTION => 51,
1125
+ :kEXCLAMATION => 52,
1126
+ :kSTAR => 53,
1127
+ :kSTAR2 => 54,
1128
+ :kFATARROW => 55,
1129
+ :kEQ => 56,
1130
+ :kDOT => 57,
1131
+ :kDOT3 => 58,
1132
+ :kLT => 59,
1133
+ :kINTERFACE => 60,
1134
+ :kEND => 61,
1135
+ :kINCLUDE => 62,
1136
+ :kEXTEND => 63,
1137
+ :kATTRREADER => 64,
1138
+ :kATTRWRITER => 65,
1139
+ :kATTRACCESSOR => 66,
1140
+ :tOPERATOR => 67,
1141
+ :tQUOTEDMETHOD => 68,
1142
+ :tQUOTEDIDENT => 69,
1143
+ :kPREPEND => 70,
1144
+ :kEXTENSION => 71,
1145
+ :kINCOMPATIBLE => 72,
1146
+ :type_TYPE => 73,
1147
+ :type_SIGNATURE => 74,
1148
+ :type_METHODTYPE => 75,
1149
+ :tEOF => 76,
1150
+ :kOUT => 77,
1151
+ :kIN => 78,
1152
+ :kUNCHECKED => 79,
1153
+ :kOVERLOAD => 80 }
1154
+
1155
+ racc_nt_base = 81
1156
+
1157
+ racc_use_result_var = true
1158
+
1159
+ Racc_arg = [
1160
+ racc_action_table,
1161
+ racc_action_check,
1162
+ racc_action_default,
1163
+ racc_action_pointer,
1164
+ racc_goto_table,
1165
+ racc_goto_check,
1166
+ racc_goto_default,
1167
+ racc_goto_pointer,
1168
+ racc_nt_base,
1169
+ racc_reduce_table,
1170
+ racc_token_table,
1171
+ racc_shift_n,
1172
+ racc_reduce_n,
1173
+ racc_use_result_var ]
1174
+
1175
+ Racc_token_to_s_table = [
1176
+ "$end",
1177
+ "error",
1178
+ "tUIDENT",
1179
+ "tLIDENT",
1180
+ "tNAMESPACE",
1181
+ "tINTERFACEIDENT",
1182
+ "tGLOBALIDENT",
1183
+ "tLKEYWORD",
1184
+ "tUKEYWORD",
1185
+ "tLKEYWORD_Q_E",
1186
+ "tUKEYWORD_Q_E",
1187
+ "tIVAR",
1188
+ "tCLASSVAR",
1189
+ "tANNOTATION",
1190
+ "tSTRING",
1191
+ "tSYMBOL",
1192
+ "tINTEGER",
1193
+ "tWRITE_ATTR",
1194
+ "kLPAREN",
1195
+ "kRPAREN",
1196
+ "kLBRACKET",
1197
+ "kRBRACKET",
1198
+ "kLBRACE",
1199
+ "kRBRACE",
1200
+ "kVOID",
1201
+ "kNIL",
1202
+ "kTRUE",
1203
+ "kFALSE",
1204
+ "kANY",
1205
+ "kUNTYPED",
1206
+ "kTOP",
1207
+ "kBOT",
1208
+ "kSELF",
1209
+ "kSELFQ",
1210
+ "kINSTANCE",
1211
+ "kCLASS",
1212
+ "kBOOL",
1213
+ "kSINGLETON",
1214
+ "kTYPE",
1215
+ "kDEF",
1216
+ "kMODULE",
1217
+ "kPRIVATE",
1218
+ "kPUBLIC",
1219
+ "kALIAS",
1220
+ "kCOLON",
1221
+ "kCOLON2",
1222
+ "kCOMMA",
1223
+ "kBAR",
1224
+ "kAMP",
1225
+ "kHAT",
1226
+ "kARROW",
1227
+ "kQUESTION",
1228
+ "kEXCLAMATION",
1229
+ "kSTAR",
1230
+ "kSTAR2",
1231
+ "kFATARROW",
1232
+ "kEQ",
1233
+ "kDOT",
1234
+ "kDOT3",
1235
+ "kLT",
1236
+ "kINTERFACE",
1237
+ "kEND",
1238
+ "kINCLUDE",
1239
+ "kEXTEND",
1240
+ "kATTRREADER",
1241
+ "kATTRWRITER",
1242
+ "kATTRACCESSOR",
1243
+ "tOPERATOR",
1244
+ "tQUOTEDMETHOD",
1245
+ "tQUOTEDIDENT",
1246
+ "kPREPEND",
1247
+ "kEXTENSION",
1248
+ "kINCOMPATIBLE",
1249
+ "type_TYPE",
1250
+ "type_SIGNATURE",
1251
+ "type_METHODTYPE",
1252
+ "tEOF",
1253
+ "kOUT",
1254
+ "kIN",
1255
+ "kUNCHECKED",
1256
+ "kOVERLOAD",
1257
+ "$start",
1258
+ "target",
1259
+ "type",
1260
+ "eof",
1261
+ "signatures",
1262
+ "method_type",
1263
+ "signature",
1264
+ "type_decl",
1265
+ "const_decl",
1266
+ "global_decl",
1267
+ "interface_decl",
1268
+ "module_decl",
1269
+ "class_decl",
1270
+ "extension_decl",
1271
+ "start_new_scope",
1272
+ "start_merged_scope",
1273
+ "annotations",
1274
+ "class_name",
1275
+ "type_params",
1276
+ "extension_name",
1277
+ "class_members",
1278
+ "module_type_params",
1279
+ "super_class",
1280
+ "type_list",
1281
+ "colon_module_self_types",
1282
+ "module_self_types",
1283
+ "module_self_type",
1284
+ "qualified_name",
1285
+ "class_member",
1286
+ "method_member",
1287
+ "include_member",
1288
+ "extend_member",
1289
+ "prepend_member",
1290
+ "var_type_member",
1291
+ "attribute_member",
1292
+ "alias_member",
1293
+ "keyword",
1294
+ "method_name",
1295
+ "attr_var_opt",
1296
+ "interface_name",
1297
+ "interface_members",
1298
+ "interface_member",
1299
+ "overload",
1300
+ "attributes",
1301
+ "method_kind",
1302
+ "def_name",
1303
+ "method_types",
1304
+ "params_opt",
1305
+ "block_opt",
1306
+ "simple_type",
1307
+ "params",
1308
+ "function_type",
1309
+ "method_name0",
1310
+ "identifier_keywords",
1311
+ "module_type_params0",
1312
+ "module_type_param",
1313
+ "type_param_check",
1314
+ "type_param_variance",
1315
+ "type_params0",
1316
+ "namespace",
1317
+ "record_type",
1318
+ "record_fields",
1319
+ "record_field",
1320
+ "keyword_name",
1321
+ "required_positional",
1322
+ "optional_positional_params",
1323
+ "optional_positional",
1324
+ "rest_positional_param",
1325
+ "rest_positional",
1326
+ "trailing_positional_params",
1327
+ "keyword_params",
1328
+ "required_keyword",
1329
+ "optional_keyword",
1330
+ "rest_keyword",
1331
+ "var_name_opt",
1332
+ "simple_name" ]
1333
+
1334
+ Racc_debug_parser = false
1335
+
1336
+ ##### State transition tables end #####
1337
+
1338
+ # reduce 0 omitted
1339
+
1340
+ module_eval(<<'.,.,', 'parser.y', 28)
1341
+ def _reduce_1(val, _values, result)
1342
+ result = val[1]
1343
+
1344
+ result
1345
+ end
1346
+ .,.,
1347
+
1348
+ module_eval(<<'.,.,', 'parser.y', 31)
1349
+ def _reduce_2(val, _values, result)
1350
+ result = val[1]
1351
+
1352
+ result
1353
+ end
1354
+ .,.,
1355
+
1356
+ module_eval(<<'.,.,', 'parser.y', 34)
1357
+ def _reduce_3(val, _values, result)
1358
+ result = val[1]
1359
+
1360
+ result
1361
+ end
1362
+ .,.,
1363
+
1364
+ # reduce 4 omitted
1365
+
1366
+ # reduce 5 omitted
1367
+
1368
+ module_eval(<<'.,.,', 'parser.y', 40)
1369
+ def _reduce_6(val, _values, result)
1370
+ result = []
1371
+ result
1372
+ end
1373
+ .,.,
1374
+
1375
+ module_eval(<<'.,.,', 'parser.y', 42)
1376
+ def _reduce_7(val, _values, result)
1377
+ result = val[0].push(val[1])
1378
+
1379
+ result
1380
+ end
1381
+ .,.,
1382
+
1383
+ # reduce 8 omitted
1384
+
1385
+ # reduce 9 omitted
1386
+
1387
+ # reduce 10 omitted
1388
+
1389
+ # reduce 11 omitted
1390
+
1391
+ # reduce 12 omitted
1392
+
1393
+ # reduce 13 omitted
1394
+
1395
+ # reduce 14 omitted
1396
+
1397
+ module_eval(<<'.,.,', 'parser.y', 54)
1398
+ def _reduce_15(val, _values, result)
1399
+ start_new_variables_scope
1400
+ result
1401
+ end
1402
+ .,.,
1403
+
1404
+ module_eval(<<'.,.,', 'parser.y', 55)
1405
+ def _reduce_16(val, _values, result)
1406
+ start_merged_variables_scope
1407
+ result
1408
+ end
1409
+ .,.,
1410
+
1411
+ module_eval(<<'.,.,', 'parser.y', 58)
1412
+ def _reduce_17(val, _values, result)
1413
+ result = []
1414
+ result
1415
+ end
1416
+ .,.,
1417
+
1418
+ module_eval(<<'.,.,', 'parser.y', 60)
1419
+ def _reduce_18(val, _values, result)
1420
+ result = val[1].unshift(Annotation.new(string: val[0].value, location: val[0].location))
1421
+
1422
+ result
1423
+ end
1424
+ .,.,
1425
+
1426
+ module_eval(<<'.,.,', 'parser.y', 65)
1427
+ def _reduce_19(val, _values, result)
1428
+ reset_variable_scope
1429
+
1430
+ location = val[1].location + val[9].location
1431
+ result = Declarations::Extension.new(
1432
+ name: val[3].value,
1433
+ type_params: val[4]&.value || [],
1434
+ extension_name: val[6].value.to_sym,
1435
+ members: val[8],
1436
+ annotations: val[0],
1437
+ location: location,
1438
+ comment: leading_comment(val[0].first&.location || location)
1439
+ )
1440
+
1441
+ result
1442
+ end
1443
+ .,.,
1444
+
1445
+ # reduce 20 omitted
1446
+
1447
+ # reduce 21 omitted
1448
+
1449
+ module_eval(<<'.,.,', 'parser.y', 83)
1450
+ def _reduce_22(val, _values, result)
1451
+ reset_variable_scope
1452
+
1453
+ location = val[1].location + val[7].location
1454
+ result = Declarations::Class.new(
1455
+ name: val[3].value,
1456
+ type_params: val[4]&.value || Declarations::ModuleTypeParams.empty,
1457
+ super_class: val[5],
1458
+ members: val[6],
1459
+ annotations: val[0],
1460
+ location: location,
1461
+ comment: leading_comment(val[0].first&.location || location)
1462
+ )
1463
+
1464
+ result
1465
+ end
1466
+ .,.,
1467
+
1468
+ module_eval(<<'.,.,', 'parser.y', 98)
1469
+ def _reduce_23(val, _values, result)
1470
+ result = nil
1471
+ result
1472
+ end
1473
+ .,.,
1474
+
1475
+ module_eval(<<'.,.,', 'parser.y', 100)
1476
+ def _reduce_24(val, _values, result)
1477
+ result = Declarations::Class::Super.new(name: val[1].value,
1478
+ args: [])
1479
+
1480
+ result
1481
+ end
1482
+ .,.,
1483
+
1484
+ module_eval(<<'.,.,', 'parser.y', 104)
1485
+ def _reduce_25(val, _values, result)
1486
+ result = Declarations::Class::Super.new(name: val[1].value,
1487
+ args: val[3])
1488
+
1489
+ result
1490
+ end
1491
+ .,.,
1492
+
1493
+ module_eval(<<'.,.,', 'parser.y', 110)
1494
+ def _reduce_26(val, _values, result)
1495
+ reset_variable_scope
1496
+
1497
+ location = val[1].location + val[7].location
1498
+ result = Declarations::Module.new(
1499
+ name: val[3].value,
1500
+ type_params: val[4]&.value || Declarations::ModuleTypeParams.empty,
1501
+ self_types: val[5],
1502
+ members: val[6],
1503
+ annotations: val[0],
1504
+ location: location,
1505
+ comment: leading_comment(val[0].first&.location || location)
1506
+ )
1507
+
1508
+ result
1509
+ end
1510
+ .,.,
1511
+
1512
+ module_eval(<<'.,.,', 'parser.y', 124)
1513
+ def _reduce_27(val, _values, result)
1514
+ reset_variable_scope
1515
+
1516
+ location = val[1].location + val[6].location
1517
+ result = Declarations::Module.new(
1518
+ name: val[3].value,
1519
+ type_params: Declarations::ModuleTypeParams.empty,
1520
+ self_types: val[4],
1521
+ members: val[5],
1522
+ annotations: val[0],
1523
+ location: location,
1524
+ comment: leading_comment(val[0].first&.location || location)
1525
+ )
1526
+
1527
+ result
1528
+ end
1529
+ .,.,
1530
+
1531
+ module_eval(<<'.,.,', 'parser.y', 139)
1532
+ def _reduce_28(val, _values, result)
1533
+ result = []
1534
+ result
1535
+ end
1536
+ .,.,
1537
+
1538
+ module_eval(<<'.,.,', 'parser.y', 141)
1539
+ def _reduce_29(val, _values, result)
1540
+ result = val[1]
1541
+
1542
+ result
1543
+ end
1544
+ .,.,
1545
+
1546
+ module_eval(<<'.,.,', 'parser.y', 146)
1547
+ def _reduce_30(val, _values, result)
1548
+ result = [val[0]]
1549
+
1550
+ result
1551
+ end
1552
+ .,.,
1553
+
1554
+ module_eval(<<'.,.,', 'parser.y', 149)
1555
+ def _reduce_31(val, _values, result)
1556
+ result = val[0].push(val[2])
1557
+
1558
+ result
1559
+ end
1560
+ .,.,
1561
+
1562
+ module_eval(<<'.,.,', 'parser.y', 154)
1563
+ def _reduce_32(val, _values, result)
1564
+ name = val[0].value
1565
+ args = val[2]
1566
+ location = val[0].location + val[3].location
1567
+
1568
+ case
1569
+ when name.class?
1570
+ result = Declarations::Module::Self.new(name: name, args: args, location: location)
1571
+ when name.interface?
1572
+ result = Declarations::Module::Self.new(name: name, args: args, location: location)
1573
+ else
1574
+ raise SemanticsError.new("Module self type should be instance or interface", subject: val[0], location: val[0].location)
1575
+ end
1576
+
1577
+ result
1578
+ end
1579
+ .,.,
1580
+
1581
+ module_eval(<<'.,.,', 'parser.y', 168)
1582
+ def _reduce_33(val, _values, result)
1583
+ name = val[0].value
1584
+ args = []
1585
+ location = val[0].location
1586
+
1587
+ case
1588
+ when name.class?
1589
+ result = Declarations::Module::Self.new(name: name, args: args, location: location)
1590
+ when name.interface?
1591
+ result = Declarations::Module::Self.new(name: name, args: args, location: location)
1592
+ else
1593
+ raise SemanticsError.new("Module self type should be instance or interface", subject: val[0], location: val[0].location)
1594
+ end
1595
+
1596
+ result
1597
+ end
1598
+ .,.,
1599
+
1600
+ module_eval(<<'.,.,', 'parser.y', 183)
1601
+ def _reduce_34(val, _values, result)
1602
+ result = []
1603
+ result
1604
+ end
1605
+ .,.,
1606
+
1607
+ module_eval(<<'.,.,', 'parser.y', 185)
1608
+ def _reduce_35(val, _values, result)
1609
+ result = val[0].push(val[1])
1610
+
1611
+ result
1612
+ end
1613
+ .,.,
1614
+
1615
+ # reduce 36 omitted
1616
+
1617
+ # reduce 37 omitted
1618
+
1619
+ # reduce 38 omitted
1620
+
1621
+ # reduce 39 omitted
1622
+
1623
+ # reduce 40 omitted
1624
+
1625
+ # reduce 41 omitted
1626
+
1627
+ module_eval(<<'.,.,', 'parser.y', 196)
1628
+ def _reduce_42(val, _values, result)
1629
+ result = Members::Public.new(location: val[0].location)
1630
+
1631
+ result
1632
+ end
1633
+ .,.,
1634
+
1635
+ module_eval(<<'.,.,', 'parser.y', 199)
1636
+ def _reduce_43(val, _values, result)
1637
+ result = Members::Private.new(location: val[0].location)
1638
+
1639
+ result
1640
+ end
1641
+ .,.,
1642
+
1643
+ # reduce 44 omitted
1644
+
1645
+ # reduce 45 omitted
1646
+
1647
+ module_eval(<<'.,.,', 'parser.y', 206)
1648
+ def _reduce_46(val, _values, result)
1649
+ location = val[1].location + val[3].location
1650
+ result = Members::AttrReader.new(name: val[2].value,
1651
+ ivar_name: nil,
1652
+ type: val[3],
1653
+ annotations: val[0],
1654
+ location: location,
1655
+ comment: leading_comment(val[0].first&.location || location))
1656
+
1657
+ result
1658
+ end
1659
+ .,.,
1660
+
1661
+ module_eval(<<'.,.,', 'parser.y', 215)
1662
+ def _reduce_47(val, _values, result)
1663
+ location = val[1].location + val[5].location
1664
+ result = Members::AttrReader.new(name: val[2].value.to_sym,
1665
+ ivar_name: val[3],
1666
+ type: val[5],
1667
+ annotations: val[0],
1668
+ location: location,
1669
+ comment: leading_comment(val[0].first&.location || location))
1670
+
1671
+ result
1672
+ end
1673
+ .,.,
1674
+
1675
+ module_eval(<<'.,.,', 'parser.y', 224)
1676
+ def _reduce_48(val, _values, result)
1677
+ location = val[1].location + val[3].location
1678
+ result = Members::AttrWriter.new(name: val[2].value,
1679
+ ivar_name: nil,
1680
+ type: val[3],
1681
+ annotations: val[0],
1682
+ location: location,
1683
+ comment: leading_comment(val[0].first&.location || location))
1684
+
1685
+ result
1686
+ end
1687
+ .,.,
1688
+
1689
+ module_eval(<<'.,.,', 'parser.y', 233)
1690
+ def _reduce_49(val, _values, result)
1691
+ location = val[1].location + val[5].location
1692
+ result = Members::AttrWriter.new(name: val[2].value.to_sym,
1693
+ ivar_name: val[3],
1694
+ type: val[5],
1695
+ annotations: val[0],
1696
+ location: location,
1697
+ comment: leading_comment(val[0].first&.location || location))
1698
+
1699
+ result
1700
+ end
1701
+ .,.,
1702
+
1703
+ module_eval(<<'.,.,', 'parser.y', 242)
1704
+ def _reduce_50(val, _values, result)
1705
+ location = val[1].location + val[3].location
1706
+ result = Members::AttrAccessor.new(name: val[2].value,
1707
+ ivar_name: nil,
1708
+ type: val[3],
1709
+ annotations: val[0],
1710
+ location: location,
1711
+ comment: leading_comment(val[0].first&.location || location))
1712
+
1713
+ result
1714
+ end
1715
+ .,.,
1716
+
1717
+ module_eval(<<'.,.,', 'parser.y', 251)
1718
+ def _reduce_51(val, _values, result)
1719
+ location = val[1].location + val[5].location
1720
+ result = Members::AttrAccessor.new(name: val[2].value.to_sym,
1721
+ ivar_name: val[3],
1722
+ type: val[5],
1723
+ annotations: val[0],
1724
+ location: location,
1725
+ comment: leading_comment(val[0].first&.location || location))
1726
+
1727
+ result
1728
+ end
1729
+ .,.,
1730
+
1731
+ module_eval(<<'.,.,', 'parser.y', 261)
1732
+ def _reduce_52(val, _values, result)
1733
+ result = nil
1734
+ result
1735
+ end
1736
+ .,.,
1737
+
1738
+ module_eval(<<'.,.,', 'parser.y', 262)
1739
+ def _reduce_53(val, _values, result)
1740
+ result = false
1741
+ result
1742
+ end
1743
+ .,.,
1744
+
1745
+ module_eval(<<'.,.,', 'parser.y', 263)
1746
+ def _reduce_54(val, _values, result)
1747
+ result = val[1].value
1748
+ result
1749
+ end
1750
+ .,.,
1751
+
1752
+ module_eval(<<'.,.,', 'parser.y', 267)
1753
+ def _reduce_55(val, _values, result)
1754
+ location = val[0].location + val[2].location
1755
+ result = Members::InstanceVariable.new(
1756
+ name: val[0].value,
1757
+ type: val[2],
1758
+ location: location,
1759
+ comment: leading_comment(location)
1760
+ )
1761
+
1762
+ result
1763
+ end
1764
+ .,.,
1765
+
1766
+ module_eval(<<'.,.,', 'parser.y', 276)
1767
+ def _reduce_56(val, _values, result)
1768
+ type = val[2]
1769
+
1770
+ if type.is_a?(Types::Variable)
1771
+ type = Types::ClassInstance.new(
1772
+ name: TypeName.new(name: type.name, namespace: Namespace.empty),
1773
+ args: [],
1774
+ location: type.location
1775
+ )
1776
+ end
1777
+
1778
+ location = val[0].location + val[2].location
1779
+ result = Members::ClassVariable.new(
1780
+ name: val[0].value,
1781
+ type: type,
1782
+ location: location,
1783
+ comment: leading_comment(location)
1784
+ )
1785
+
1786
+ result
1787
+ end
1788
+ .,.,
1789
+
1790
+ module_eval(<<'.,.,', 'parser.y', 295)
1791
+ def _reduce_57(val, _values, result)
1792
+ type = val[4]
1793
+
1794
+ if type.is_a?(Types::Variable)
1795
+ type = Types::ClassInstance.new(
1796
+ name: TypeName.new(name: type.name, namespace: Namespace.empty),
1797
+ args: [],
1798
+ location: type.location
1799
+ )
1800
+ end
1801
+
1802
+ location = val[0].location + val[4].location
1803
+ result = Members::ClassInstanceVariable.new(
1804
+ name: val[2].value,
1805
+ type: type,
1806
+ location: location,
1807
+ comment: leading_comment(location)
1808
+ )
1809
+
1810
+ result
1811
+ end
1812
+ .,.,
1813
+
1814
+ module_eval(<<'.,.,', 'parser.y', 316)
1815
+ def _reduce_58(val, _values, result)
1816
+ reset_variable_scope
1817
+
1818
+ location = val[1].location + val[6].location
1819
+ result = Declarations::Interface.new(
1820
+ name: val[3].value,
1821
+ type_params: val[4]&.value || Declarations::ModuleTypeParams.empty,
1822
+ members: val[5],
1823
+ annotations: val[0],
1824
+ location: location,
1825
+ comment: leading_comment(val[0].first&.location || location)
1826
+ )
1827
+
1828
+ result
1829
+ end
1830
+ .,.,
1831
+
1832
+ module_eval(<<'.,.,', 'parser.y', 330)
1833
+ def _reduce_59(val, _values, result)
1834
+ result = []
1835
+ result
1836
+ end
1837
+ .,.,
1838
+
1839
+ module_eval(<<'.,.,', 'parser.y', 332)
1840
+ def _reduce_60(val, _values, result)
1841
+ result = val[0].push(val[1])
1842
+
1843
+ result
1844
+ end
1845
+ .,.,
1846
+
1847
+ module_eval(<<'.,.,', 'parser.y', 337)
1848
+ def _reduce_61(val, _values, result)
1849
+ unless val[0].kind == :instance
1850
+ raise SemanticsError.new("Interface cannot have singleton method", subject: val[0], location: val[0].location)
1851
+ end
1852
+
1853
+ if val[0].types.last == :super
1854
+ raise SemanticsError.new("Interface method cannot have `super` type", subject: val[0], location: val[0].location)
1855
+ end
1856
+
1857
+ result = val[0]
1858
+
1859
+ result
1860
+ end
1861
+ .,.,
1862
+
1863
+ module_eval(<<'.,.,', 'parser.y', 348)
1864
+ def _reduce_62(val, _values, result)
1865
+ unless val[0].name.interface?
1866
+ raise SemanticsError.new("Interface should include an interface", subject: val[0], location: val[0].location)
1867
+ end
1868
+
1869
+ result = val[0]
1870
+
1871
+ result
1872
+ end
1873
+ .,.,
1874
+
1875
+ # reduce 63 omitted
1876
+
1877
+ module_eval(<<'.,.,', 'parser.y', 358)
1878
+ def _reduce_64(val, _values, result)
1879
+ if val[2].value.alias?
1880
+ raise SemanticsError.new("Should include module or interface", subject: val[2].value, location: val[2].location)
1881
+ end
1882
+ location = val[1].location + val[2].location
1883
+ result = Members::Include.new(name: val[2].value,
1884
+ args: [],
1885
+ annotations: val[0],
1886
+ location: location,
1887
+ comment: leading_comment(val[0].first&.location || location))
1888
+
1889
+ result
1890
+ end
1891
+ .,.,
1892
+
1893
+ module_eval(<<'.,.,', 'parser.y', 369)
1894
+ def _reduce_65(val, _values, result)
1895
+ if val[2].value.alias?
1896
+ raise SemanticsError.new("Should include module or interface", subject: val[2].value, location: val[2].location)
1897
+ end
1898
+ location = val[1].location + val[5].location
1899
+ result = Members::Include.new(name: val[2].value,
1900
+ args: val[4],
1901
+ annotations: val[0],
1902
+ location: location,
1903
+ comment: leading_comment(val[0].first&.location || location))
1904
+
1905
+ result
1906
+ end
1907
+ .,.,
1908
+
1909
+ module_eval(<<'.,.,', 'parser.y', 382)
1910
+ def _reduce_66(val, _values, result)
1911
+ if val[2].value.alias?
1912
+ raise SemanticsError.new("Should extend module or interface", subject: val[2].value, location: val[2].location)
1913
+ end
1914
+ location = val[1].location + val[2].location
1915
+ result = Members::Extend.new(name: val[2].value,
1916
+ args: [],
1917
+ annotations: val[0],
1918
+ location: location,
1919
+ comment: leading_comment(val[0].first&.location || location))
1920
+
1921
+ result
1922
+ end
1923
+ .,.,
1924
+
1925
+ module_eval(<<'.,.,', 'parser.y', 393)
1926
+ def _reduce_67(val, _values, result)
1927
+ if val[2].value.alias?
1928
+ raise SemanticsError.new("Should extend module or interface", subject: val[2].value, location: val[2].location)
1929
+ end
1930
+ location = val[1].location + val[5].location
1931
+ result = Members::Extend.new(name: val[2].value,
1932
+ args: val[4],
1933
+ annotations: val[0],
1934
+ location: location,
1935
+ comment: leading_comment(val[0].first&.location || location))
1936
+
1937
+ result
1938
+ end
1939
+ .,.,
1940
+
1941
+ module_eval(<<'.,.,', 'parser.y', 406)
1942
+ def _reduce_68(val, _values, result)
1943
+ unless val[2].value.class?
1944
+ raise SemanticsError.new("Should prepend module", subject: val[2].value, location: val[2].location)
1945
+ end
1946
+ location = val[1].location + val[2].location
1947
+ result = Members::Prepend.new(name: val[2].value,
1948
+ args: [],
1949
+ annotations: val[0],
1950
+ location: location,
1951
+ comment: leading_comment(val[0].first&.location || location))
1952
+
1953
+ result
1954
+ end
1955
+ .,.,
1956
+
1957
+ module_eval(<<'.,.,', 'parser.y', 417)
1958
+ def _reduce_69(val, _values, result)
1959
+ unless val[2].value.class?
1960
+ raise SemanticsError.new("Should prepend module", subject: val[2].value, location: val[2].location)
1961
+ end
1962
+ location = val[1].location + val[5].location
1963
+ result = Members::Prepend.new(name: val[2].value,
1964
+ args: val[4],
1965
+ annotations: val[0],
1966
+ location: location,
1967
+ comment: leading_comment(val[0].first&.location || location))
1968
+
1969
+ result
1970
+ end
1971
+ .,.,
1972
+
1973
+ module_eval(<<'.,.,', 'parser.y', 429)
1974
+ def _reduce_70(val, _values, result)
1975
+ result = nil
1976
+ result
1977
+ end
1978
+ .,.,
1979
+
1980
+ module_eval(<<'.,.,', 'parser.y', 431)
1981
+ def _reduce_71(val, _values, result)
1982
+ RBS.logger.warn "`overload def` syntax is deprecated. Use `...` syntax instead."
1983
+ result = val[0]
1984
+
1985
+ result
1986
+ end
1987
+ .,.,
1988
+
1989
+ module_eval(<<'.,.,', 'parser.y', 437)
1990
+ def _reduce_72(val, _values, result)
1991
+ location = val[3].location + val[6].last.location
1992
+
1993
+ last_type = val[6].last
1994
+ if last_type.is_a?(LocatedValue) && last_type.value == :dot3
1995
+ overload = true
1996
+ val[6].pop
1997
+ else
1998
+ overload = false
1999
+ end
2000
+
2001
+ result = Members::MethodDefinition.new(
2002
+ name: val[5].value,
2003
+ kind: val[4],
2004
+ types: val[6],
2005
+ annotations: val[0],
2006
+ location: location,
2007
+ comment: leading_comment(val[0].first&.location || val[2]&.location || val[3].location),
2008
+ overload: overload || !!val[2]
2009
+ )
2010
+
2011
+ result
2012
+ end
2013
+ .,.,
2014
+
2015
+ # reduce 73 omitted
2016
+
2017
+ module_eval(<<'.,.,', 'parser.y', 460)
2018
+ def _reduce_74(val, _values, result)
2019
+ RBS.logger.warn "`incompatible` method attribute is deprecated and ignored."
2020
+
2021
+ result
2022
+ end
2023
+ .,.,
2024
+
2025
+ module_eval(<<'.,.,', 'parser.y', 464)
2026
+ def _reduce_75(val, _values, result)
2027
+ result = :instance
2028
+ result
2029
+ end
2030
+ .,.,
2031
+
2032
+ module_eval(<<'.,.,', 'parser.y', 465)
2033
+ def _reduce_76(val, _values, result)
2034
+ result = :singleton
2035
+ result
2036
+ end
2037
+ .,.,
2038
+
2039
+ module_eval(<<'.,.,', 'parser.y', 466)
2040
+ def _reduce_77(val, _values, result)
2041
+ result = :singleton_instance
2042
+ result
2043
+ end
2044
+ .,.,
2045
+
2046
+ module_eval(<<'.,.,', 'parser.y', 469)
2047
+ def _reduce_78(val, _values, result)
2048
+ result = [val[0]]
2049
+ result
2050
+ end
2051
+ .,.,
2052
+
2053
+ module_eval(<<'.,.,', 'parser.y', 470)
2054
+ def _reduce_79(val, _values, result)
2055
+ result = [LocatedValue.new(value: :dot3, location: val[0].location)]
2056
+ result
2057
+ end
2058
+ .,.,
2059
+
2060
+ module_eval(<<'.,.,', 'parser.y', 472)
2061
+ def _reduce_80(val, _values, result)
2062
+ result = val[2].unshift(val[0])
2063
+
2064
+ result
2065
+ end
2066
+ .,.,
2067
+
2068
+ module_eval(<<'.,.,', 'parser.y', 477)
2069
+ def _reduce_81(val, _values, result)
2070
+ location = (val[1] || val[2] || val[3] || val[4]).location + val[5].location
2071
+ type_params = val[1]&.value || []
2072
+
2073
+ params = val[2]&.value || empty_params_result
2074
+
2075
+ type = Types::Function.new(
2076
+ required_positionals: params[0],
2077
+ optional_positionals: params[1],
2078
+ rest_positionals: params[2],
2079
+ trailing_positionals: params[3],
2080
+ required_keywords: params[4],
2081
+ optional_keywords: params[5],
2082
+ rest_keywords: params[6],
2083
+ return_type: val[5]
2084
+ )
2085
+
2086
+ block = val[3]&.value
2087
+
2088
+ result = MethodType.new(type_params: type_params,
2089
+ type: type,
2090
+ block: block,
2091
+ location: location)
2092
+
2093
+ result
2094
+ end
2095
+ .,.,
2096
+
2097
+ module_eval(<<'.,.,', 'parser.y', 502)
2098
+ def _reduce_82(val, _values, result)
2099
+ result = nil
2100
+ result
2101
+ end
2102
+ .,.,
2103
+
2104
+ module_eval(<<'.,.,', 'parser.y', 504)
2105
+ def _reduce_83(val, _values, result)
2106
+ result = LocatedValue.new(value: val[1], location: val[0].location + val[2].location)
2107
+
2108
+ result
2109
+ end
2110
+ .,.,
2111
+
2112
+ module_eval(<<'.,.,', 'parser.y', 508)
2113
+ def _reduce_84(val, _values, result)
2114
+ result = nil
2115
+ result
2116
+ end
2117
+ .,.,
2118
+
2119
+ module_eval(<<'.,.,', 'parser.y', 510)
2120
+ def _reduce_85(val, _values, result)
2121
+ block = MethodType::Block.new(type: val[1].value, required: true)
2122
+ result = LocatedValue.new(value: block, location: val[0].location + val[2].location)
2123
+
2124
+ result
2125
+ end
2126
+ .,.,
2127
+
2128
+ module_eval(<<'.,.,', 'parser.y', 514)
2129
+ def _reduce_86(val, _values, result)
2130
+ block = MethodType::Block.new(type: val[2].value, required: false)
2131
+ result = LocatedValue.new(value: block, location: val[0].location + val[3].location)
2132
+
2133
+ result
2134
+ end
2135
+ .,.,
2136
+
2137
+ # reduce 87 omitted
2138
+
2139
+ module_eval(<<'.,.,', 'parser.y', 521)
2140
+ def _reduce_88(val, _values, result)
2141
+ result = LocatedValue.new(value: val[0].value.to_sym,
2142
+ location: val[0].location + val[1].location)
2143
+
2144
+ result
2145
+ end
2146
+ .,.,
2147
+
2148
+ # reduce 89 omitted
2149
+
2150
+ # reduce 90 omitted
2151
+
2152
+ # reduce 91 omitted
2153
+
2154
+ # reduce 92 omitted
2155
+
2156
+ # reduce 93 omitted
2157
+
2158
+ # reduce 94 omitted
2159
+
2160
+ # reduce 95 omitted
2161
+
2162
+ # reduce 96 omitted
2163
+
2164
+ # reduce 97 omitted
2165
+
2166
+ module_eval(<<'.,.,', 'parser.y', 530)
2167
+ def _reduce_98(val, _values, result)
2168
+ unless val[0].location.pred?(val[1].location)
2169
+ raise SyntaxError.new(token_str: "kQUESTION", error_value: val[1])
2170
+ end
2171
+
2172
+ result = LocatedValue.new(value: "#{val[0].value}?",
2173
+ location: val[0].location + val[1].location)
2174
+
2175
+ result
2176
+ end
2177
+ .,.,
2178
+
2179
+ module_eval(<<'.,.,', 'parser.y', 538)
2180
+ def _reduce_99(val, _values, result)
2181
+ unless val[0].location.pred?(val[1].location)
2182
+ raise SyntaxError.new(token_str: "kEXCLAMATION", error_value: val[1])
2183
+ end
2184
+
2185
+ result = LocatedValue.new(value: "#{val[0].value}!",
2186
+ location: val[0].location + val[1].location)
2187
+
2188
+ result
2189
+ end
2190
+ .,.,
2191
+
2192
+ # reduce 100 omitted
2193
+
2194
+ # reduce 101 omitted
2195
+
2196
+ # reduce 102 omitted
2197
+
2198
+ # reduce 103 omitted
2199
+
2200
+ # reduce 104 omitted
2201
+
2202
+ # reduce 105 omitted
2203
+
2204
+ # reduce 106 omitted
2205
+
2206
+ # reduce 107 omitted
2207
+
2208
+ # reduce 108 omitted
2209
+
2210
+ # reduce 109 omitted
2211
+
2212
+ # reduce 110 omitted
2213
+
2214
+ # reduce 111 omitted
2215
+
2216
+ # reduce 112 omitted
2217
+
2218
+ # reduce 113 omitted
2219
+
2220
+ # reduce 114 omitted
2221
+
2222
+ # reduce 115 omitted
2223
+
2224
+ # reduce 116 omitted
2225
+
2226
+ # reduce 117 omitted
2227
+
2228
+ # reduce 118 omitted
2229
+
2230
+ # reduce 119 omitted
2231
+
2232
+ # reduce 120 omitted
2233
+
2234
+ # reduce 121 omitted
2235
+
2236
+ # reduce 122 omitted
2237
+
2238
+ # reduce 123 omitted
2239
+
2240
+ # reduce 124 omitted
2241
+
2242
+ # reduce 125 omitted
2243
+
2244
+ # reduce 126 omitted
2245
+
2246
+ # reduce 127 omitted
2247
+
2248
+ # reduce 128 omitted
2249
+
2250
+ # reduce 129 omitted
2251
+
2252
+ # reduce 130 omitted
2253
+
2254
+ # reduce 131 omitted
2255
+
2256
+ # reduce 132 omitted
2257
+
2258
+ # reduce 133 omitted
2259
+
2260
+ # reduce 134 omitted
2261
+
2262
+ # reduce 135 omitted
2263
+
2264
+ # reduce 136 omitted
2265
+
2266
+ # reduce 137 omitted
2267
+
2268
+ # reduce 138 omitted
2269
+
2270
+ # reduce 139 omitted
2271
+
2272
+ module_eval(<<'.,.,', 'parser.y', 558)
2273
+ def _reduce_140(val, _values, result)
2274
+ result = nil
2275
+ result
2276
+ end
2277
+ .,.,
2278
+
2279
+ module_eval(<<'.,.,', 'parser.y', 560)
2280
+ def _reduce_141(val, _values, result)
2281
+ val[1].each {|p| insert_bound_variable(p.name) }
2282
+
2283
+ result = LocatedValue.new(value: val[1], location: val[0].location + val[2].location)
2284
+
2285
+ result
2286
+ end
2287
+ .,.,
2288
+
2289
+ module_eval(<<'.,.,', 'parser.y', 567)
2290
+ def _reduce_142(val, _values, result)
2291
+ result = Declarations::ModuleTypeParams.new()
2292
+ result.add(val[0])
2293
+
2294
+ result
2295
+ end
2296
+ .,.,
2297
+
2298
+ module_eval(<<'.,.,', 'parser.y', 571)
2299
+ def _reduce_143(val, _values, result)
2300
+ result = val[0].add(val[2])
2301
+
2302
+ result
2303
+ end
2304
+ .,.,
2305
+
2306
+ module_eval(<<'.,.,', 'parser.y', 576)
2307
+ def _reduce_144(val, _values, result)
2308
+ result = Declarations::ModuleTypeParams::TypeParam.new(name: val[2].value.to_sym,
2309
+ variance: val[1],
2310
+ skip_validation: val[0])
2311
+
2312
+ result
2313
+ end
2314
+ .,.,
2315
+
2316
+ module_eval(<<'.,.,', 'parser.y', 582)
2317
+ def _reduce_145(val, _values, result)
2318
+ result = :invariant
2319
+ result
2320
+ end
2321
+ .,.,
2322
+
2323
+ module_eval(<<'.,.,', 'parser.y', 583)
2324
+ def _reduce_146(val, _values, result)
2325
+ result = :covariant
2326
+ result
2327
+ end
2328
+ .,.,
2329
+
2330
+ module_eval(<<'.,.,', 'parser.y', 584)
2331
+ def _reduce_147(val, _values, result)
2332
+ result = :contravariant
2333
+ result
2334
+ end
2335
+ .,.,
2336
+
2337
+ module_eval(<<'.,.,', 'parser.y', 587)
2338
+ def _reduce_148(val, _values, result)
2339
+ result = false
2340
+ result
2341
+ end
2342
+ .,.,
2343
+
2344
+ module_eval(<<'.,.,', 'parser.y', 588)
2345
+ def _reduce_149(val, _values, result)
2346
+ result = true
2347
+ result
2348
+ end
2349
+ .,.,
2350
+
2351
+ module_eval(<<'.,.,', 'parser.y', 591)
2352
+ def _reduce_150(val, _values, result)
2353
+ result = nil
2354
+ result
2355
+ end
2356
+ .,.,
2357
+
2358
+ module_eval(<<'.,.,', 'parser.y', 593)
2359
+ def _reduce_151(val, _values, result)
2360
+ val[1].each {|var| insert_bound_variable(var) }
2361
+
2362
+ result = LocatedValue.new(value: val[1],
2363
+ location: val[0].location + val[2].location)
2364
+
2365
+ result
2366
+ end
2367
+ .,.,
2368
+
2369
+ module_eval(<<'.,.,', 'parser.y', 601)
2370
+ def _reduce_152(val, _values, result)
2371
+ result = [val[0].value.to_sym]
2372
+
2373
+ result
2374
+ end
2375
+ .,.,
2376
+
2377
+ module_eval(<<'.,.,', 'parser.y', 604)
2378
+ def _reduce_153(val, _values, result)
2379
+ result = val[0].push(val[2].value.to_sym)
2380
+
2381
+ result
2382
+ end
2383
+ .,.,
2384
+
2385
+ module_eval(<<'.,.,', 'parser.y', 609)
2386
+ def _reduce_154(val, _values, result)
2387
+ location = val[1].location + val[3].location
2388
+ result = Members::Alias.new(
2389
+ new_name: val[2].value.to_sym,
2390
+ old_name: val[3].value.to_sym,
2391
+ kind: :instance,
2392
+ annotations: val[0],
2393
+ location: location,
2394
+ comment: leading_comment(val[0].first&.location || location)
2395
+ )
2396
+
2397
+ result
2398
+ end
2399
+ .,.,
2400
+
2401
+ module_eval(<<'.,.,', 'parser.y', 620)
2402
+ def _reduce_155(val, _values, result)
2403
+ location = val[1].location + val[7].location
2404
+ result = Members::Alias.new(
2405
+ new_name: val[4].value.to_sym,
2406
+ old_name: val[7].value.to_sym,
2407
+ kind: :singleton,
2408
+ annotations: val[0],
2409
+ location: location,
2410
+ comment: leading_comment(val[0].first&.location || location)
2411
+ )
2412
+
2413
+ result
2414
+ end
2415
+ .,.,
2416
+
2417
+ module_eval(<<'.,.,', 'parser.y', 633)
2418
+ def _reduce_156(val, _values, result)
2419
+ location = val[1].location + val[4].location
2420
+ result = Declarations::Alias.new(name: val[2].value,
2421
+ type: val[4],
2422
+ annotations: val[0],
2423
+ location: location,
2424
+ comment: leading_comment(val[0].first&.location || location))
2425
+
2426
+ result
2427
+ end
2428
+ .,.,
2429
+
2430
+ module_eval(<<'.,.,', 'parser.y', 643)
2431
+ def _reduce_157(val, _values, result)
2432
+ location = val[0].location + val[2].location
2433
+ result = Declarations::Constant.new(name: val[0].value,
2434
+ type: val[2],
2435
+ location: location,
2436
+ comment: leading_comment(location))
2437
+
2438
+ result
2439
+ end
2440
+ .,.,
2441
+
2442
+ module_eval(<<'.,.,', 'parser.y', 650)
2443
+ def _reduce_158(val, _values, result)
2444
+ location = (val[0] || val[1]).location + val[2].location
2445
+ name = TypeName.new(name: val[1].value, namespace: val[0]&.value || Namespace.empty)
2446
+ result = Declarations::Constant.new(name: name,
2447
+ type: val[2],
2448
+ location: location,
2449
+ comment: leading_comment(location))
2450
+
2451
+ result
2452
+ end
2453
+ .,.,
2454
+
2455
+ module_eval(<<'.,.,', 'parser.y', 660)
2456
+ def _reduce_159(val, _values, result)
2457
+ location = val[0].location + val[2].location
2458
+ result = Declarations::Global.new(name: val[0].value.to_sym,
2459
+ type: val[2],
2460
+ location: location,
2461
+ comment: leading_comment(location))
2462
+
2463
+ result
2464
+ end
2465
+ .,.,
2466
+
2467
+ # reduce 160 omitted
2468
+
2469
+ module_eval(<<'.,.,', 'parser.y', 670)
2470
+ def _reduce_161(val, _values, result)
2471
+ types = case l = val[0]
2472
+ when Types::Union
2473
+ l.types + [val[2]]
2474
+ else
2475
+ [l, val[2]]
2476
+ end
2477
+
2478
+ result = Types::Union.new(types: types, location: val[0].location + val[2].location)
2479
+
2480
+ result
2481
+ end
2482
+ .,.,
2483
+
2484
+ module_eval(<<'.,.,', 'parser.y', 680)
2485
+ def _reduce_162(val, _values, result)
2486
+ types = case l = val[0]
2487
+ when Types::Intersection
2488
+ l.types + [val[2]]
2489
+ else
2490
+ [l, val[2]]
2491
+ end
2492
+
2493
+ result = Types::Intersection.new(types: types,
2494
+ location: val[0].location + val[2].location)
2495
+
2496
+ result
2497
+ end
2498
+ .,.,
2499
+
2500
+ module_eval(<<'.,.,', 'parser.y', 693)
2501
+ def _reduce_163(val, _values, result)
2502
+ result = Types::Bases::Void.new(location: val[0].location)
2503
+
2504
+ result
2505
+ end
2506
+ .,.,
2507
+
2508
+ module_eval(<<'.,.,', 'parser.y', 696)
2509
+ def _reduce_164(val, _values, result)
2510
+ RBS.logger.warn "`any` type is deprecated. Use `untyped` instead. (#{val[0].location.to_s})"
2511
+ result = Types::Bases::Any.new(location: val[0].location)
2512
+
2513
+ result
2514
+ end
2515
+ .,.,
2516
+
2517
+ module_eval(<<'.,.,', 'parser.y', 700)
2518
+ def _reduce_165(val, _values, result)
2519
+ result = Types::Bases::Any.new(location: val[0].location)
2520
+
2521
+ result
2522
+ end
2523
+ .,.,
2524
+
2525
+ module_eval(<<'.,.,', 'parser.y', 703)
2526
+ def _reduce_166(val, _values, result)
2527
+ result = Types::Bases::Bool.new(location: val[0].location)
2528
+
2529
+ result
2530
+ end
2531
+ .,.,
2532
+
2533
+ module_eval(<<'.,.,', 'parser.y', 706)
2534
+ def _reduce_167(val, _values, result)
2535
+ result = Types::Bases::Nil.new(location: val[0].location)
2536
+
2537
+ result
2538
+ end
2539
+ .,.,
2540
+
2541
+ module_eval(<<'.,.,', 'parser.y', 709)
2542
+ def _reduce_168(val, _values, result)
2543
+ result = Types::Bases::Top.new(location: val[0].location)
2544
+
2545
+ result
2546
+ end
2547
+ .,.,
2548
+
2549
+ module_eval(<<'.,.,', 'parser.y', 712)
2550
+ def _reduce_169(val, _values, result)
2551
+ result = Types::Bases::Bottom.new(location: val[0].location)
2552
+
2553
+ result
2554
+ end
2555
+ .,.,
2556
+
2557
+ module_eval(<<'.,.,', 'parser.y', 715)
2558
+ def _reduce_170(val, _values, result)
2559
+ result = Types::Bases::Self.new(location: val[0].location)
2560
+
2561
+ result
2562
+ end
2563
+ .,.,
2564
+
2565
+ module_eval(<<'.,.,', 'parser.y', 718)
2566
+ def _reduce_171(val, _values, result)
2567
+ result = Types::Optional.new(type: Types::Bases::Self.new(location: val[0].location),
2568
+ location: val[0].location)
2569
+
2570
+ result
2571
+ end
2572
+ .,.,
2573
+
2574
+ module_eval(<<'.,.,', 'parser.y', 722)
2575
+ def _reduce_172(val, _values, result)
2576
+ result = Types::Bases::Instance.new(location: val[0].location)
2577
+
2578
+ result
2579
+ end
2580
+ .,.,
2581
+
2582
+ module_eval(<<'.,.,', 'parser.y', 725)
2583
+ def _reduce_173(val, _values, result)
2584
+ result = Types::Bases::Class.new(location: val[0].location)
2585
+
2586
+ result
2587
+ end
2588
+ .,.,
2589
+
2590
+ module_eval(<<'.,.,', 'parser.y', 728)
2591
+ def _reduce_174(val, _values, result)
2592
+ result = Types::Literal.new(literal: true, location: val[0].location)
2593
+
2594
+ result
2595
+ end
2596
+ .,.,
2597
+
2598
+ module_eval(<<'.,.,', 'parser.y', 731)
2599
+ def _reduce_175(val, _values, result)
2600
+ result = Types::Literal.new(literal: false, location: val[0].location)
2601
+
2602
+ result
2603
+ end
2604
+ .,.,
2605
+
2606
+ module_eval(<<'.,.,', 'parser.y', 734)
2607
+ def _reduce_176(val, _values, result)
2608
+ result = Types::Literal.new(literal: val[0].value, location: val[0].location)
2609
+
2610
+ result
2611
+ end
2612
+ .,.,
2613
+
2614
+ module_eval(<<'.,.,', 'parser.y', 737)
2615
+ def _reduce_177(val, _values, result)
2616
+ result = Types::Literal.new(literal: val[0].value, location: val[0].location)
2617
+
2618
+ result
2619
+ end
2620
+ .,.,
2621
+
2622
+ module_eval(<<'.,.,', 'parser.y', 740)
2623
+ def _reduce_178(val, _values, result)
2624
+ result = Types::Literal.new(literal: val[0].value, location: val[0].location)
2625
+
2626
+ result
2627
+ end
2628
+ .,.,
2629
+
2630
+ module_eval(<<'.,.,', 'parser.y', 743)
2631
+ def _reduce_179(val, _values, result)
2632
+ name = val[0].value
2633
+ args = []
2634
+ location = val[0].location
2635
+
2636
+ case
2637
+ when name.class?
2638
+ if is_bound_variable?(name.name)
2639
+ result = Types::Variable.new(name: name.name, location: location)
2640
+ else
2641
+ result = Types::ClassInstance.new(name: name, args: args, location: location)
2642
+ end
2643
+ when name.alias?
2644
+ result = Types::Alias.new(name: name, location: location)
2645
+ when name.interface?
2646
+ result = Types::Interface.new(name: name, args: args, location: location)
2647
+ end
2648
+
2649
+ result
2650
+ end
2651
+ .,.,
2652
+
2653
+ module_eval(<<'.,.,', 'parser.y', 761)
2654
+ def _reduce_180(val, _values, result)
2655
+ name = val[0].value
2656
+ args = val[2]
2657
+ location = val[0].location + val[3].location
2658
+
2659
+ case
2660
+ when name.class?
2661
+ if is_bound_variable?(name.name)
2662
+ raise SemanticsError.new("#{name.name} is type variable and cannot be applied", subject: name, location: location)
2663
+ end
2664
+ result = Types::ClassInstance.new(name: name, args: args, location: location)
2665
+ when name.interface?
2666
+ result = Types::Interface.new(name: name, args: args, location: location)
2667
+ else
2668
+ raise SyntaxError.new(token_str: "kLBRACKET", error_value: val[1])
2669
+ end
2670
+
2671
+ result
2672
+ end
2673
+ .,.,
2674
+
2675
+ module_eval(<<'.,.,', 'parser.y', 778)
2676
+ def _reduce_181(val, _values, result)
2677
+ location = val[0].location + val[1].location
2678
+ result = Types::Tuple.new(types: [], location: location)
2679
+
2680
+ result
2681
+ end
2682
+ .,.,
2683
+
2684
+ module_eval(<<'.,.,', 'parser.y', 782)
2685
+ def _reduce_182(val, _values, result)
2686
+ location = val[0].location + val[2].location
2687
+ types = val[1]
2688
+ result = Types::Tuple.new(types: types, location: location)
2689
+
2690
+ result
2691
+ end
2692
+ .,.,
2693
+
2694
+ module_eval(<<'.,.,', 'parser.y', 787)
2695
+ def _reduce_183(val, _values, result)
2696
+ type = val[1].dup
2697
+ type.instance_eval do
2698
+ @location = val[0].location + val[2].location
2699
+ end
2700
+ result = type
2701
+
2702
+ result
2703
+ end
2704
+ .,.,
2705
+
2706
+ module_eval(<<'.,.,', 'parser.y', 794)
2707
+ def _reduce_184(val, _values, result)
2708
+ result = Types::ClassSingleton.new(name: val[2].value,
2709
+ location: val[0].location + val[3].location)
2710
+
2711
+ result
2712
+ end
2713
+ .,.,
2714
+
2715
+ module_eval(<<'.,.,', 'parser.y', 798)
2716
+ def _reduce_185(val, _values, result)
2717
+ result = Types::Proc.new(type: val[1].value, location: val[0].location + val[1].location)
2718
+
2719
+ result
2720
+ end
2721
+ .,.,
2722
+
2723
+ module_eval(<<'.,.,', 'parser.y', 801)
2724
+ def _reduce_186(val, _values, result)
2725
+ result = Types::Optional.new(type: val[0], location: val[0].location + val[1].location)
2726
+
2727
+ result
2728
+ end
2729
+ .,.,
2730
+
2731
+ # reduce 187 omitted
2732
+
2733
+ module_eval(<<'.,.,', 'parser.y', 807)
2734
+ def _reduce_188(val, _values, result)
2735
+ result = [val[0]]
2736
+
2737
+ result
2738
+ end
2739
+ .,.,
2740
+
2741
+ module_eval(<<'.,.,', 'parser.y', 810)
2742
+ def _reduce_189(val, _values, result)
2743
+ result = val[0] + [val[2]]
2744
+
2745
+ result
2746
+ end
2747
+ .,.,
2748
+
2749
+ module_eval(<<'.,.,', 'parser.y', 815)
2750
+ def _reduce_190(val, _values, result)
2751
+ result = Types::Record.new(
2752
+ fields: val[1],
2753
+ location: val[0].location + val[2].location
2754
+ )
2755
+
2756
+ result
2757
+ end
2758
+ .,.,
2759
+
2760
+ module_eval(<<'.,.,', 'parser.y', 823)
2761
+ def _reduce_191(val, _values, result)
2762
+ result = val[0]
2763
+
2764
+ result
2765
+ end
2766
+ .,.,
2767
+
2768
+ module_eval(<<'.,.,', 'parser.y', 826)
2769
+ def _reduce_192(val, _values, result)
2770
+ result = val[0].merge!(val[2])
2771
+
2772
+ result
2773
+ end
2774
+ .,.,
2775
+
2776
+ module_eval(<<'.,.,', 'parser.y', 831)
2777
+ def _reduce_193(val, _values, result)
2778
+ result = { val[0].value => val[2] }
2779
+
2780
+ result
2781
+ end
2782
+ .,.,
2783
+
2784
+ module_eval(<<'.,.,', 'parser.y', 834)
2785
+ def _reduce_194(val, _values, result)
2786
+ result = { val[0].value => val[2] }
2787
+
2788
+ result
2789
+ end
2790
+ .,.,
2791
+
2792
+ module_eval(<<'.,.,', 'parser.y', 837)
2793
+ def _reduce_195(val, _values, result)
2794
+ result = { val[0].value => val[2] }
2795
+
2796
+ result
2797
+ end
2798
+ .,.,
2799
+
2800
+ module_eval(<<'.,.,', 'parser.y', 840)
2801
+ def _reduce_196(val, _values, result)
2802
+ result = { val[0].value => val[1] }
2803
+
2804
+ result
2805
+ end
2806
+ .,.,
2807
+
2808
+ # reduce 197 omitted
2809
+
2810
+ module_eval(<<'.,.,', 'parser.y', 846)
2811
+ def _reduce_198(val, _values, result)
2812
+ result = val[0]
2813
+
2814
+ result
2815
+ end
2816
+ .,.,
2817
+
2818
+ # reduce 199 omitted
2819
+
2820
+ # reduce 200 omitted
2821
+
2822
+ # reduce 201 omitted
2823
+
2824
+ # reduce 202 omitted
2825
+
2826
+ module_eval(<<'.,.,', 'parser.y', 853)
2827
+ def _reduce_203(val, _values, result)
2828
+ location = val[0].location + val[4].location
2829
+ type = Types::Function.new(
2830
+ required_positionals: val[1][0],
2831
+ optional_positionals: val[1][1],
2832
+ rest_positionals: val[1][2],
2833
+ trailing_positionals: val[1][3],
2834
+ required_keywords: val[1][4],
2835
+ optional_keywords: val[1][5],
2836
+ rest_keywords: val[1][6],
2837
+ return_type: val[4],
2838
+ )
2839
+
2840
+ result = LocatedValue.new(value: type, location: location)
2841
+
2842
+ result
2843
+ end
2844
+ .,.,
2845
+
2846
+ module_eval(<<'.,.,', 'parser.y', 868)
2847
+ def _reduce_204(val, _values, result)
2848
+ location = val[0].location + val[1].location
2849
+ type = Types::Function.new(
2850
+ required_positionals: [],
2851
+ optional_positionals: [],
2852
+ rest_positionals: nil,
2853
+ trailing_positionals: [],
2854
+ required_keywords: {},
2855
+ optional_keywords: {},
2856
+ rest_keywords: nil,
2857
+ return_type: val[2]
2858
+ )
2859
+
2860
+ result = LocatedValue.new(value: type, location: location)
2861
+
2862
+ result
2863
+ end
2864
+ .,.,
2865
+
2866
+ module_eval(<<'.,.,', 'parser.y', 885)
2867
+ def _reduce_205(val, _values, result)
2868
+ result = val[2]
2869
+ result[0].unshift(val[0])
2870
+
2871
+ result
2872
+ end
2873
+ .,.,
2874
+
2875
+ module_eval(<<'.,.,', 'parser.y', 889)
2876
+ def _reduce_206(val, _values, result)
2877
+ result = empty_params_result
2878
+ result[0].unshift(val[0])
2879
+
2880
+ result
2881
+ end
2882
+ .,.,
2883
+
2884
+ # reduce 207 omitted
2885
+
2886
+ module_eval(<<'.,.,', 'parser.y', 896)
2887
+ def _reduce_208(val, _values, result)
2888
+ result = val[2]
2889
+ result[1].unshift(val[0])
2890
+
2891
+ result
2892
+ end
2893
+ .,.,
2894
+
2895
+ module_eval(<<'.,.,', 'parser.y', 900)
2896
+ def _reduce_209(val, _values, result)
2897
+ result = empty_params_result
2898
+ result[1].unshift(val[0])
2899
+
2900
+ result
2901
+ end
2902
+ .,.,
2903
+
2904
+ # reduce 210 omitted
2905
+
2906
+ module_eval(<<'.,.,', 'parser.y', 907)
2907
+ def _reduce_211(val, _values, result)
2908
+ result = val[2]
2909
+ result[2] = val[0]
2910
+
2911
+ result
2912
+ end
2913
+ .,.,
2914
+
2915
+ module_eval(<<'.,.,', 'parser.y', 911)
2916
+ def _reduce_212(val, _values, result)
2917
+ result = empty_params_result
2918
+ result[2] = val[0]
2919
+
2920
+ result
2921
+ end
2922
+ .,.,
2923
+
2924
+ # reduce 213 omitted
2925
+
2926
+ module_eval(<<'.,.,', 'parser.y', 918)
2927
+ def _reduce_214(val, _values, result)
2928
+ result = val[2]
2929
+ result[3].unshift(val[0])
2930
+
2931
+ result
2932
+ end
2933
+ .,.,
2934
+
2935
+ module_eval(<<'.,.,', 'parser.y', 922)
2936
+ def _reduce_215(val, _values, result)
2937
+ result = empty_params_result
2938
+ result[3].unshift(val[0])
2939
+
2940
+ result
2941
+ end
2942
+ .,.,
2943
+
2944
+ # reduce 216 omitted
2945
+
2946
+ module_eval(<<'.,.,', 'parser.y', 929)
2947
+ def _reduce_217(val, _values, result)
2948
+ result = empty_params_result
2949
+
2950
+ result
2951
+ end
2952
+ .,.,
2953
+
2954
+ module_eval(<<'.,.,', 'parser.y', 932)
2955
+ def _reduce_218(val, _values, result)
2956
+ result = val[2]
2957
+ result[4].merge!(val[0])
2958
+
2959
+ result
2960
+ end
2961
+ .,.,
2962
+
2963
+ module_eval(<<'.,.,', 'parser.y', 936)
2964
+ def _reduce_219(val, _values, result)
2965
+ result = empty_params_result
2966
+ result[4].merge!(val[0])
2967
+
2968
+ result
2969
+ end
2970
+ .,.,
2971
+
2972
+ module_eval(<<'.,.,', 'parser.y', 940)
2973
+ def _reduce_220(val, _values, result)
2974
+ result = val[2]
2975
+ result[5].merge!(val[0])
2976
+
2977
+ result
2978
+ end
2979
+ .,.,
2980
+
2981
+ module_eval(<<'.,.,', 'parser.y', 944)
2982
+ def _reduce_221(val, _values, result)
2983
+ result = empty_params_result
2984
+ result[5].merge!(val[0])
2985
+
2986
+ result
2987
+ end
2988
+ .,.,
2989
+
2990
+ module_eval(<<'.,.,', 'parser.y', 948)
2991
+ def _reduce_222(val, _values, result)
2992
+ result = empty_params_result
2993
+ result[6] = val[0]
2994
+
2995
+ result
2996
+ end
2997
+ .,.,
2998
+
2999
+ module_eval(<<'.,.,', 'parser.y', 954)
3000
+ def _reduce_223(val, _values, result)
3001
+ result = Types::Function::Param.new(type: val[0],
3002
+ name: val[1]&.value&.to_sym)
3003
+
3004
+ result
3005
+ end
3006
+ .,.,
3007
+
3008
+ module_eval(<<'.,.,', 'parser.y', 960)
3009
+ def _reduce_224(val, _values, result)
3010
+ result = Types::Function::Param.new(type: val[1],
3011
+ name: val[2]&.value&.to_sym)
3012
+
3013
+ result
3014
+ end
3015
+ .,.,
3016
+
3017
+ module_eval(<<'.,.,', 'parser.y', 966)
3018
+ def _reduce_225(val, _values, result)
3019
+ result = Types::Function::Param.new(type: val[1],
3020
+ name: val[2]&.value&.to_sym)
3021
+
3022
+ result
3023
+ end
3024
+ .,.,
3025
+
3026
+ module_eval(<<'.,.,', 'parser.y', 972)
3027
+ def _reduce_226(val, _values, result)
3028
+ param = Types::Function::Param.new(type: val[1],
3029
+ name: val[2]&.value&.to_sym)
3030
+ result = { val[0].value => param }
3031
+
3032
+ result
3033
+ end
3034
+ .,.,
3035
+
3036
+ module_eval(<<'.,.,', 'parser.y', 979)
3037
+ def _reduce_227(val, _values, result)
3038
+ param = Types::Function::Param.new(type: val[2],
3039
+ name: val[3]&.value&.to_sym)
3040
+ result = { val[1].value => param }
3041
+
3042
+ result
3043
+ end
3044
+ .,.,
3045
+
3046
+ module_eval(<<'.,.,', 'parser.y', 986)
3047
+ def _reduce_228(val, _values, result)
3048
+ result = Types::Function::Param.new(type: val[1],
3049
+ name: val[2]&.value&.to_sym)
3050
+
3051
+ result
3052
+ end
3053
+ .,.,
3054
+
3055
+ # reduce 229 omitted
3056
+
3057
+ # reduce 230 omitted
3058
+
3059
+ # reduce 231 omitted
3060
+
3061
+ # reduce 232 omitted
3062
+
3063
+ module_eval(<<'.,.,', 'parser.y', 995)
3064
+ def _reduce_233(val, _values, result)
3065
+ namespace = val[0]&.value || Namespace.empty
3066
+ name = val[1].value.to_sym
3067
+ type_name = TypeName.new(namespace: namespace, name: name)
3068
+ location = (loc0 = val[0]&.location) ? loc0 + val[1].location : val[1].location
3069
+ result = LocatedValue.new(value: type_name, location: location)
3070
+
3071
+ result
3072
+ end
3073
+ .,.,
3074
+
3075
+ # reduce 234 omitted
3076
+
3077
+ # reduce 235 omitted
3078
+
3079
+ # reduce 236 omitted
3080
+
3081
+ module_eval(<<'.,.,', 'parser.y', 1007)
3082
+ def _reduce_237(val, _values, result)
3083
+ namespace = val[0]&.value || Namespace.empty
3084
+ name = val[1].value.to_sym
3085
+ type_name = TypeName.new(namespace: namespace, name: name)
3086
+ location = (loc0 = val[0]&.location) ? loc0 + val[1].location : val[1].location
3087
+ result = LocatedValue.new(value: type_name, location: location)
3088
+
3089
+ result
3090
+ end
3091
+ .,.,
3092
+
3093
+ module_eval(<<'.,.,', 'parser.y', 1016)
3094
+ def _reduce_238(val, _values, result)
3095
+ namespace = val[0]&.value || Namespace.empty
3096
+ name = val[1].value.to_sym
3097
+ type_name = TypeName.new(namespace: namespace, name: name)
3098
+ location = (loc0 = val[0]&.location) ? loc0 + val[1].location : val[1].location
3099
+ result = LocatedValue.new(value: type_name, location: location)
3100
+
3101
+ result
3102
+ end
3103
+ .,.,
3104
+
3105
+ module_eval(<<'.,.,', 'parser.y', 1025)
3106
+ def _reduce_239(val, _values, result)
3107
+ result = nil
3108
+
3109
+ result
3110
+ end
3111
+ .,.,
3112
+
3113
+ module_eval(<<'.,.,', 'parser.y', 1028)
3114
+ def _reduce_240(val, _values, result)
3115
+ result = LocatedValue.new(value: Namespace.root, location: val[0].location)
3116
+
3117
+ result
3118
+ end
3119
+ .,.,
3120
+
3121
+ module_eval(<<'.,.,', 'parser.y', 1031)
3122
+ def _reduce_241(val, _values, result)
3123
+ namespace = Namespace.parse(val[1].value).absolute!
3124
+ result = LocatedValue.new(value: namespace, location: val[0].location + val[1].location)
3125
+
3126
+ result
3127
+ end
3128
+ .,.,
3129
+
3130
+ module_eval(<<'.,.,', 'parser.y', 1035)
3131
+ def _reduce_242(val, _values, result)
3132
+ namespace = Namespace.parse(val[0].value)
3133
+ result = LocatedValue.new(value: namespace, location: val[0].location)
3134
+
3135
+ result
3136
+ end
3137
+ .,.,
3138
+
3139
+ def _reduce_none(val, _values, result)
3140
+ val[0]
3141
+ end
3142
+
3143
+ end # class Parser
3144
+ end # module RBS
3145
+
3146
+