rbs 1.5.1 → 1.7.0.beta.1

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