# # DO NOT MODIFY!!!! # This file is automatically generated by Racc 1.4.14 # from Racc grammer file "". # require 'racc/parser.rb' module Steep class Parser < Racc::Parser module_eval(<<'...end parser.y/module_eval...', 'parser.y', 521) require "strscan" attr_reader :input attr_reader :buffer attr_reader :offset def initialize(type, buffer:, offset:, input: nil) super() @type = type @buffer = buffer @input = StringScanner.new(input || buffer.content) @offset = offset end def self.parse_method(input, name: nil) new(:METHOD, buffer: AST::Buffer.new(name: name, content: input), offset: 0).do_parse end def self.parse_signature(input, name: nil) new(:SIGNATURE, buffer: AST::Buffer.new(name: name, content: input), offset: 0).do_parse end def self.parse_annotation_opt(input, buffer:, offset: 0) new(:ANNOTATION, input: input, buffer: buffer, offset: offset).do_parse rescue => exn Steep.logger.debug "Parsing comment failed: #{exn.inspect}" nil end def self.parse_type(input, name: nil) new(:TYPE, buffer: AST::Buffer.new(name: name, content: input), offset: 0).do_parse end class LocatedValue attr_reader :location attr_reader :value def initialize(location:, value:) @location = location @value = value end end def new_token(type, value = nil) start_index = offset + input.pos - input.matched.bytesize end_index = offset + input.pos location = AST::Location.new(buffer: buffer, start_pos: start_index, end_pos: end_index) [type, LocatedValue.new(location: location, value: value)] end def next_token if @type type = @type @type = nil return [:"type_#{type}", nil] end case when input.scan(/\s+/) next_token when input.scan(/#.*/) next_token when input.eos? [false, false] when input.scan(/->/) new_token(:ARROW) when input.scan(/\?/) new_token(:QUESTION) when input.scan(/\(/) new_token(:LPAREN, nil) when input.scan(/\)/) new_token(:RPAREN, nil) when input.scan(/{/) new_token(:LBRACE, nil) when input.scan(/}/) new_token(:RBRACE, nil) when input.scan(/,/) new_token(:COMMA, nil) when input.scan(/::/) new_token(:COLON2) when input.scan(/:/) new_token(:COLON) when input.scan(/\*\*/) new_token(:STAR2, :**) when input.scan(/\*/) new_token(:STAR, :*) when input.scan(/\+/) new_token(:PLUS, :+) when input.scan(/\./) new_token(:DOT) when input.scan(/<:/) new_token(:LTCOLON) when input.scan(/(\[\]=)|(\[\])|===|==|\^|!=|<=/) new_token(:OPERATOR, :>=) when input.scan(//) new_token(:GT, :>) when input.scan(/nil\b/) new_token(:NIL, :nil) when input.scan(/any\b/) new_token(:ANY, :any) when input.scan(/void\b/) new_token(:VOID, :void) when input.scan(/interface\b/) new_token(:INTERFACE, :interface) when input.scan(/end\b/) new_token(:END, :end) when input.scan(/\|/) new_token(:BAR, :bar) when input.scan(/def\b/) new_token(:DEF) when input.scan(/@type\b/) new_token(:AT_TYPE) when input.scan(/@implements\b/) new_token(:AT_IMPLEMENTS) when input.scan(/@dynamic\b/) new_token(:AT_DYNAMIC) when input.scan(/const\b/) new_token(:CONST, :const) when input.scan(/var\b/) new_token(:VAR, :var) when input.scan(/return\b/) new_token(:RETURN) when input.scan(/block\b/) new_token(:BLOCK, :block) when input.scan(/break\b/) new_token(:BREAK, :break) when input.scan(/method\b/) new_token(:METHOD, :method) when input.scan(/self\?/) new_token(:SELFQ) when input.scan(/self\b/) new_token(:SELF, :self) when input.scan(/'\w+/) new_token(:TVAR, input.matched.gsub(/\A'/, '').to_sym) when input.scan(/attr_reader\b/) new_token(:ATTR_READER, :attr_reader) when input.scan(/attr_accessor\b/) new_token(:ATTR_ACCESSOR, :attr_accessor) when input.scan(/instance\b/) new_token(:INSTANCE, :instance) when input.scan(/class\b/) new_token(:CLASS, :class) when input.scan(/module\b/) new_token(:MODULE, :module) when input.scan(/include\?/) new_token(:METHOD_NAME, :include?) when input.scan(/include\b/) new_token(:INCLUDE, :include) when input.scan(/extend\b/) new_token(:EXTEND, :extend) when input.scan(/instance\b/) new_token(:INSTANCE, :instance) when input.scan(/ivar\b/) new_token(:IVAR, :ivar) when input.scan(/%/) new_token(:PERCENT, :%) when input.scan(/-/) new_token(:MINUS, :-) when input.scan(/&/) new_token(:OPERATOR, :&) when input.scan(/~/) new_token(:OPERATOR, :~) when input.scan(/\//) new_token(:OPERATOR, :/) when input.scan(/!/) new_token(:OPERATOR, :!) when input.scan(/extension\b/) new_token(:EXTENSION, :extension) when input.scan(/constructor\b/) new_token(:CONSTRUCTOR, true) when input.scan(/noconstructor\b/) new_token(:NOCONSTRUCTOR, false) when input.scan(/\w+(\!|\?|=)/) new_token(:METHOD_NAME, input.matched.to_sym) when input.scan(/\$\w+\b/) new_token(:GVAR, input.matched.to_sym) when input.scan(/[A-Z]\w*/) new_token(:UIDENT, input.matched.to_sym) when input.scan(/_\w+/) new_token(:INTERFACE_NAME, input.matched.to_sym) when input.scan(/@\w+/) new_token(:IVAR_NAME, input.matched.to_sym) when input.scan(/\w+/) new_token(:IDENT, input.matched.to_sym) end end ...end parser.y/module_eval... ##### State transition tables begin ### racc_action_table = [ 96, 178, 95, 291, 317, 114, 99, 100, 80, 176, 85, 86, 87, 299, 81, 292, 79, 9, 103, 104, 102, 77, 78, 92, 89, 25, 24, 82, 83, 301, 93, 221, 130, 302, 300, 88, 105, 106, 318, 84, 90, 91, 94, 97, 98, 101, 96, 303, 95, 25, 24, 305, 99, 100, 80, 305, 85, 86, 87, 309, 81, 310, 79, 311, 103, 104, 102, 77, 78, 92, 89, 25, 24, 82, 83, 27, 93, 171, 172, 28, 29, 88, 105, 106, 312, 84, 90, 91, 94, 97, 98, 101, 96, 313, 95, 215, 216, 316, 99, 100, 80, 319, 85, 86, 87, 320, 81, 321, 79, 9, 103, 104, 102, 77, 78, 92, 89, 25, 24, 82, 83, 9, 93, 2, 3, 4, 5, 88, 105, 106, 326, 84, 90, 91, 94, 97, 98, 101, 96, 327, 95, 25, 24, 329, 99, 100, 80, 331, 85, 86, 87, 332, 81, 9, 79, 9, 103, 104, 102, 77, 78, 92, 89, 25, 24, 82, 83, 6, 93, 25, 24, 25, 24, 88, 105, 106, 9, 84, 90, 91, 94, 97, 98, 101, 96, 45, 95, 50, 57, 58, 99, 100, 80, 60, 85, 86, 87, 110, 81, 25, 79, 65, 103, 104, 102, 77, 78, 92, 89, 112, 113, 82, 83, 114, 93, 116, 143, 144, 111, 88, 105, 106, 9, 84, 90, 91, 94, 97, 98, 101, 96, 9, 95, 9, 9, 25, 99, 100, 80, 153, 85, 86, 87, 153, 81, 155, 79, 156, 103, 104, 102, 77, 78, 92, 89, 157, 159, 82, 83, 160, 93, 161, 162, 9, 164, 88, 105, 106, 165, 84, 90, 91, 94, 97, 98, 101, 96, 166, 95, 167, 168, 175, 99, 100, 80, 179, 85, 86, 87, 180, 81, 181, 79, 182, 103, 104, 102, 77, 78, 92, 89, 183, 184, 82, 83, 189, 93, -72, -73, -74, -75, 88, 105, 106, -79, 84, 90, 91, 94, 97, 98, 101, 96, -71, 95, 50, 193, 195, 99, 100, 80, 197, 85, 86, 87, 110, 81, 198, 79, 199, 103, 104, 102, 77, 78, 92, 89, 200, 204, 82, 83, 207, 93, 212, 213, 114, 111, 88, 105, 106, 220, 84, 90, 91, 94, 97, 98, 101, 96, 240, 95, 242, 193, 265, 99, 100, 80, 9, 85, 86, 87, 274, 81, 275, 79, 276, 103, 104, 102, 77, 78, 92, 89, 278, 279, 82, 83, 281, 93, 283, 288, 289, 290, 88, 105, 106, nil, 84, 90, 91, 94, 97, 98, 101, 96, nil, 95, nil, nil, nil, 99, 100, 80, nil, 85, 86, 87, nil, 81, nil, 79, nil, 103, 104, 102, 77, 78, 92, 89, nil, nil, 82, 83, nil, 93, nil, nil, nil, nil, 88, 105, 106, 47, 84, 90, 91, 94, 97, 98, 101, 73, 72, 70, 33, 34, 35, 36, 37, 38, 39, 40, 42, 69, nil, 74, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 25, 24, nil, 219, nil, nil, 75, 20, 21, 67, nil, 66, 68, 71, 33, 34, 35, 36, 37, 38, 39, 40, 42, 17, 19, nil, 22, 25, 24, nil, 127, 129, 130, nil, nil, nil, 25, 24, 132, 34, 133, 134, 135, 136, 39, 40, 137, nil, nil, nil, nil, 138, 139, 140, 141, 142, 127, 129, 130, nil, 25, 24, nil, nil, 132, 34, 133, 134, 135, 136, 39, 40, 137, nil, nil, nil, nil, 138, 139, 140, 141, 142, 221, 130, 20, 21, 25, 24, nil, 33, 34, 35, 36, 37, 38, 39, 40, 42, nil, nil, 17, 19, nil, 22, 25, 24, 221, 130, nil, nil, nil, 25, 24, 33, 34, 35, 36, 37, 38, 39, 40, 42, nil, nil, nil, nil, nil, nil, nil, 127, 237, nil, nil, nil, nil, 25, 24, 231, nil, 232, 233, 234, 235, nil, nil, 230, nil, 127, 129, 130, 138, 139, 140, 141, 142, 231, nil, 232, 233, 234, 235, nil, nil, 230, nil, 127, 237, nil, 138, 139, 140, 141, 142, 231, nil, 232, 233, 234, 235, nil, nil, 230, nil, 127, 237, nil, 138, 139, 140, 141, 142, 231, nil, 232, 233, 234, 235, nil, nil, 230, nil, nil, nil, nil, 138, 139, 140, 141, 142, 33, 34, 35, 36, 37, 38, 39, 40, 42, 33, 34, 35, 36, 37, 38, 39, 40, 42, nil, nil, nil, nil, 25, 24, nil, nil, nil, nil, nil, nil, nil, 25, 24, 33, 34, 35, 36, 37, 38, 39, 40, 42, 33, 34, 35, 36, 37, 38, 39, 40, 42, nil, nil, nil, nil, 25, 24, nil, nil, nil, nil, nil, nil, nil, 25, 24, 33, 34, 35, 36, 37, 38, 39, 40, 42, 33, 34, 35, 36, 37, 38, 39, 40, 42, nil, nil, nil, nil, 25, 24, nil, nil, nil, nil, nil, nil, nil, 25, 24, 33, 34, 35, 36, 37, 38, 39, 40, 42, 33, 34, 35, 36, 37, 38, 39, 40, 42, nil, nil, nil, nil, 25, 24, nil, nil, nil, nil, nil, nil, nil, 25, 24, 33, 34, 35, 36, 37, 38, 39, 40, 42, 33, 34, 35, 36, 37, 38, 39, 40, 42, nil, nil, nil, nil, 25, 24, nil, nil, nil, nil, nil, nil, nil, 25, 24, 33, 34, 35, 36, 37, 38, 39, 40, 42, nil, nil, 132, 34, 133, 134, 135, 136, 39, 40, 137, nil, nil, 25, 24, 138, 139, 140, 141, 142, nil, nil, nil, nil, 25, 24, 33, 34, 35, 36, 37, 38, 39, 40, 42, 33, 34, 35, 36, 37, 38, 39, 40, 42, nil, nil, nil, nil, 25, 24, nil, nil, nil, nil, nil, nil, nil, 25, 24, 33, 34, 35, 36, 37, 38, 39, 40, 42, 33, 34, 35, 36, 37, 38, 39, 40, 42, nil, nil, nil, nil, 25, 24, nil, nil, nil, nil, nil, nil, nil, 25, 24, 33, 34, 35, 36, 37, 38, 39, 40, 42, 33, 34, 35, 36, 37, 38, 39, 40, 42, nil, nil, nil, nil, 25, 24, nil, nil, nil, nil, nil, nil, nil, 25, 24, 33, 34, 35, 36, 37, 38, 39, 40, 42, 33, 34, 35, 36, 37, 38, 39, 40, 42, nil, nil, nil, nil, 25, 24, nil, nil, nil, nil, nil, nil, nil, 25, 24, 33, 34, 35, 36, 37, 38, 39, 40, 42, 33, 34, 35, 36, 37, 38, 39, 40, 42, nil, nil, nil, nil, 25, 24, nil, nil, nil, nil, nil, nil, nil, 25, 24, 33, 34, 35, 36, 37, 38, 39, 40, 42, 33, 34, 35, 36, 37, 38, 39, 40, 42, nil, nil, nil, nil, 25, 24, nil, nil, nil, nil, nil, nil, nil, 25, 24, 33, 34, 35, 36, 37, 38, 39, 40, 42, 33, 34, 35, 36, 37, 38, 39, 40, 42, nil, nil, nil, nil, 25, 24, nil, nil, nil, nil, nil, nil, nil, 25, 24, 33, 34, 35, 36, 37, 38, 39, 40, 42, 33, 34, 35, 36, 37, 38, 39, 40, 42, nil, nil, nil, nil, 25, 24, nil, nil, nil, nil, nil, nil, nil, 25, 24, 33, 34, 35, 36, 37, 38, 39, 40, 42, 33, 34, 35, 36, 37, 38, 39, 40, 42, 20, 21, nil, nil, 25, 24, 20, 21, nil, nil, nil, nil, nil, 25, 24, nil, 17, 19, nil, 22, 25, 24, 17, 19, nil, 22, 25, 24, 20, 21, nil, nil, nil, nil, 20, 21, nil, nil, nil, nil, 20, 21, nil, nil, 17, 19, nil, 22, 25, 24, 17, 19, nil, 22, 25, 24, 17, 19, nil, 22, 25, 24, 231, nil, 232, 233, 234, 235, nil, nil, 230, nil, 257, nil, nil, 138, 139, 140, 141, 142, 255, 256, 257, 258, 259, 260, nil, nil, 257, nil, 255, 256, nil, 258, 259, 260, 255, 256, 257, 258, 259, 260, nil, nil, nil, nil, 255, 256, nil, 258, 259, 260 ] racc_action_check = [ 282, 116, 282, 271, 305, 272, 282, 282, 282, 116, 282, 282, 282, 282, 282, 273, 282, 278, 282, 282, 282, 282, 282, 282, 282, 258, 258, 282, 282, 283, 282, 276, 276, 284, 282, 282, 282, 282, 305, 282, 282, 282, 282, 282, 282, 282, 311, 285, 311, 28, 28, 286, 311, 311, 311, 287, 311, 311, 311, 296, 311, 298, 311, 299, 311, 311, 311, 311, 311, 311, 311, 21, 21, 311, 311, 4, 311, 113, 113, 4, 4, 311, 311, 311, 300, 311, 311, 311, 311, 311, 311, 311, 168, 301, 168, 171, 171, 304, 168, 168, 168, 306, 168, 168, 168, 307, 168, 308, 168, 309, 168, 168, 168, 168, 168, 168, 168, 20, 20, 168, 168, 310, 168, 0, 0, 0, 0, 168, 168, 168, 314, 168, 168, 168, 168, 168, 168, 168, 312, 315, 312, 195, 195, 318, 312, 312, 312, 324, 312, 312, 312, 325, 312, 331, 312, 332, 312, 312, 312, 312, 312, 312, 312, 257, 257, 312, 312, 1, 312, 71, 71, 22, 22, 312, 312, 312, 2, 312, 312, 312, 312, 312, 312, 312, 29, 6, 29, 9, 17, 18, 29, 29, 29, 19, 29, 29, 29, 29, 29, 24, 29, 25, 29, 29, 29, 29, 29, 29, 29, 32, 41, 29, 29, 43, 29, 46, 49, 50, 29, 29, 29, 29, 59, 29, 29, 29, 29, 29, 29, 29, 167, 61, 167, 62, 63, 65, 167, 167, 167, 66, 167, 167, 167, 67, 167, 68, 167, 69, 167, 167, 167, 167, 167, 167, 167, 70, 72, 167, 167, 73, 167, 74, 75, 76, 80, 167, 167, 167, 100, 167, 167, 167, 167, 167, 167, 167, 193, 108, 193, 110, 111, 115, 193, 193, 193, 117, 193, 193, 193, 118, 193, 120, 193, 122, 193, 193, 193, 193, 193, 193, 193, 124, 125, 193, 193, 131, 193, 132, 133, 134, 135, 193, 193, 193, 136, 193, 193, 193, 193, 193, 193, 193, 166, 137, 166, 144, 147, 148, 166, 166, 166, 149, 166, 166, 166, 166, 166, 150, 166, 152, 166, 166, 166, 166, 166, 166, 166, 154, 158, 166, 166, 161, 166, 169, 170, 173, 166, 166, 166, 166, 177, 166, 166, 166, 166, 166, 166, 166, 260, 187, 260, 191, 192, 198, 260, 260, 260, 200, 260, 260, 260, 222, 260, 223, 260, 225, 260, 260, 260, 260, 260, 260, 260, 244, 245, 260, 260, 255, 260, 256, 262, 263, 265, 260, 260, 260, nil, 260, 260, 260, 260, 260, 260, 260, 259, nil, 259, nil, nil, nil, 259, 259, 259, nil, 259, 259, 259, nil, 259, nil, 259, nil, 259, 259, 259, 259, 259, 259, 259, nil, nil, 259, 259, nil, 259, nil, nil, nil, nil, 259, 259, 259, 8, 259, 259, 259, 259, 259, 259, 259, 27, 27, 27, 8, 8, 8, 8, 8, 8, 8, 8, 8, 27, nil, 27, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 8, 8, nil, 175, nil, nil, 27, 13, 13, 27, nil, 27, 27, 27, 175, 175, 175, 175, 175, 175, 175, 175, 175, 13, 13, nil, 13, 13, 13, nil, 47, 47, 47, nil, nil, nil, 175, 175, 47, 47, 47, 47, 47, 47, 47, 47, 47, nil, nil, nil, nil, 47, 47, 47, 47, 47, 180, 180, 180, nil, 47, 47, nil, nil, 180, 180, 180, 180, 180, 180, 180, 180, 180, nil, nil, nil, nil, 180, 180, 180, 180, 180, 275, 275, 3, 3, 180, 180, nil, 275, 275, 275, 275, 275, 275, 275, 275, 275, nil, nil, 3, 3, nil, 3, 3, 3, 178, 178, nil, nil, nil, 275, 275, 178, 178, 178, 178, 178, 178, 178, 178, 178, nil, nil, nil, nil, nil, nil, nil, 183, 183, nil, nil, nil, nil, 178, 178, 183, nil, 183, 183, 183, 183, nil, nil, 183, nil, 181, 181, 181, 183, 183, 183, 183, 183, 181, nil, 181, 181, 181, 181, nil, nil, 181, nil, 182, 182, nil, 181, 181, 181, 181, 181, 182, nil, 182, 182, 182, 182, nil, nil, 182, nil, 184, 184, nil, 182, 182, 182, 182, 182, 184, nil, 184, 184, 184, 184, nil, nil, 184, nil, nil, nil, nil, 184, 184, 184, 184, 184, 303, 303, 303, 303, 303, 303, 303, 303, 303, 189, 189, 189, 189, 189, 189, 189, 189, 189, nil, nil, nil, nil, 303, 303, nil, nil, nil, nil, nil, nil, nil, 189, 189, 197, 197, 197, 197, 197, 197, 197, 197, 197, 199, 199, 199, 199, 199, 199, 199, 199, 199, nil, nil, nil, nil, 197, 197, nil, nil, nil, nil, nil, nil, nil, 199, 199, 127, 127, 127, 127, 127, 127, 127, 127, 127, 204, 204, 204, 204, 204, 204, 204, 204, 204, nil, nil, nil, nil, 127, 127, nil, nil, nil, nil, nil, nil, nil, 204, 204, 207, 207, 207, 207, 207, 207, 207, 207, 207, 213, 213, 213, 213, 213, 213, 213, 213, 213, nil, nil, nil, nil, 207, 207, nil, nil, nil, nil, nil, nil, nil, 213, 213, 219, 219, 219, 219, 219, 219, 219, 219, 219, 220, 220, 220, 220, 220, 220, 220, 220, 220, nil, nil, nil, nil, 219, 219, nil, nil, nil, nil, nil, nil, nil, 220, 220, 221, 221, 221, 221, 221, 221, 221, 221, 221, nil, nil, 129, 129, 129, 129, 129, 129, 129, 129, 129, nil, nil, 221, 221, 129, 129, 129, 129, 129, nil, nil, nil, nil, 129, 129, 130, 130, 130, 130, 130, 130, 130, 130, 130, 240, 240, 240, 240, 240, 240, 240, 240, 240, nil, nil, nil, nil, 130, 130, nil, nil, nil, nil, nil, nil, nil, 240, 240, 5, 5, 5, 5, 5, 5, 5, 5, 5, 57, 57, 57, 57, 57, 57, 57, 57, 57, nil, nil, nil, nil, 5, 5, nil, nil, nil, nil, nil, nil, nil, 57, 57, 58, 58, 58, 58, 58, 58, 58, 58, 58, 281, 281, 281, 281, 281, 281, 281, 281, 281, nil, nil, nil, nil, 58, 58, nil, nil, nil, nil, nil, nil, nil, 281, 281, 112, 112, 112, 112, 112, 112, 112, 112, 112, 155, 155, 155, 155, 155, 155, 155, 155, 155, nil, nil, nil, nil, 112, 112, nil, nil, nil, nil, nil, nil, nil, 155, 155, 156, 156, 156, 156, 156, 156, 156, 156, 156, 157, 157, 157, 157, 157, 157, 157, 157, 157, nil, nil, nil, nil, 156, 156, nil, nil, nil, nil, nil, nil, nil, 157, 157, 288, 288, 288, 288, 288, 288, 288, 288, 288, 159, 159, 159, 159, 159, 159, 159, 159, 159, nil, nil, nil, nil, 288, 288, nil, nil, nil, nil, nil, nil, nil, 159, 159, 160, 160, 160, 160, 160, 160, 160, 160, 160, 114, 114, 114, 114, 114, 114, 114, 114, 114, nil, nil, nil, nil, 160, 160, nil, nil, nil, nil, nil, nil, nil, 114, 114, 162, 162, 162, 162, 162, 162, 162, 162, 162, 302, 302, 302, 302, 302, 302, 302, 302, 302, nil, nil, nil, nil, 162, 162, nil, nil, nil, nil, nil, nil, nil, 302, 302, 316, 316, 316, 316, 316, 316, 316, 316, 316, 319, 319, 319, 319, 319, 319, 319, 319, 319, 12, 12, nil, nil, 316, 316, 16, 16, nil, nil, nil, nil, nil, 319, 319, nil, 12, 12, nil, 12, 12, 12, 16, 16, nil, 16, 16, 16, 14, 14, nil, nil, nil, nil, 11, 11, nil, nil, nil, nil, 15, 15, nil, nil, 14, 14, nil, 14, 14, 14, 11, 11, nil, 11, 11, 11, 15, 15, nil, 15, 15, 15, 237, nil, 237, 237, 237, 237, nil, nil, 237, nil, 290, nil, nil, 237, 237, 237, 237, 237, 290, 290, 246, 290, 290, 290, nil, nil, 196, nil, 246, 246, nil, 246, 246, 246, 196, 196, 194, 196, 196, 196, nil, nil, nil, nil, 194, 194, nil, 194, 194, 194 ] racc_action_pointer = [ 121, 167, 160, 549, 19, 909, 185, nil, 445, 168, nil, 1190, 1156, 472, 1184, 1196, 1162, 175, 176, 167, 77, 31, 131, nil, 159, 160, nil, 439, 9, 174, nil, nil, 193, nil, nil, nil, nil, nil, nil, nil, nil, 183, nil, 183, nil, nil, 201, 505, nil, 199, 208, nil, nil, nil, nil, nil, nil, 918, 942, 206, nil, 215, 217, 218, nil, 195, 208, 212, 232, 234, 242, 129, 243, 246, 219, 249, 247, nil, nil, nil, 253, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 251, nil, nil, nil, nil, nil, nil, nil, 268, nil, 252, 253, 975, 57, 1083, 275, -6, 277, 280, nil, 282, nil, 284, nil, 292, 293, nil, 742, nil, 852, 876, 292, 294, 295, 296, 297, 301, 310, nil, nil, nil, nil, nil, nil, 306, nil, nil, 283, 279, 318, 330, nil, 326, nil, 334, 984, 1008, 1017, 335, 1050, 1074, 338, 1107, nil, nil, nil, 312, 220, 82, 336, 345, 67, nil, 325, nil, 481, nil, 354, 580, nil, 531, 622, 640, 604, 658, nil, nil, 356, nil, 685, nil, 333, 329, 266, 1240, 101, 1230, 709, 333, 718, 361, nil, nil, nil, 751, nil, nil, 775, nil, nil, nil, nil, nil, 784, nil, nil, nil, nil, nil, 808, 817, 841, 373, 374, nil, 376, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 1220, nil, nil, 885, nil, nil, nil, 380, 356, 1224, nil, nil, nil, nil, nil, nil, nil, nil, 384, 392, 123, -15, 404, 358, nil, 384, 363, nil, 394, nil, nil, nil, nil, nil, -5, -25, 0, nil, 556, 20, nil, 1, nil, nil, 951, -10, 1, 17, 31, 44, 48, 1041, nil, 1214, nil, nil, nil, nil, nil, 29, nil, 48, 36, 57, 85, 1116, 676, 84, -4, 88, 88, 69, 93, 105, 36, 128, nil, 113, 122, 1140, nil, 135, 1149, nil, nil, nil, nil, 134, 138, nil, nil, nil, nil, nil, 137, 139, nil, nil ] racc_action_default = [ -188, -188, -129, -80, -188, -188, -188, -1, -8, -188, -2, -80, -80, -80, -80, -80, -80, -188, -188, -188, -188, -188, -188, -96, -188, -98, -3, -188, -188, -188, -4, -45, -57, -47, -48, -49, -50, -51, -52, -53, -54, -55, -56, -63, -64, 335, -32, -25, -10, -188, -131, -81, -82, -83, -84, -85, -86, -188, -188, -129, -95, -129, -129, -129, -97, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -129, -138, -139, -140, -141, -142, -143, -144, -145, -146, -147, -148, -149, -150, -151, -152, -153, -154, -155, -156, -157, -158, -159, -160, -161, -162, -163, -164, -165, -168, -169, -180, -183, -184, -188, -188, -188, -188, -188, -188, -35, -188, -11, -13, -14, -16, -17, -19, -20, -21, -24, -188, -27, -188, -188, -188, -47, -49, -50, -51, -52, -56, -69, -70, -76, -77, -78, -130, -188, -87, -88, -133, -125, -93, -188, -99, -188, -187, -188, -188, -188, -188, -188, -188, -188, -188, -188, -179, -166, -167, -188, -188, -188, -188, -65, -60, -59, -67, -68, -188, -33, -188, -43, -9, -25, -25, -25, -25, -25, -26, -28, -188, -29, -188, -132, -188, -133, -188, -100, -188, -100, -188, -188, -188, -129, -172, -173, -174, -188, -176, -177, -188, -181, -182, -185, -186, -46, -188, -58, -61, -62, -5, -6, -188, -188, -188, -188, -37, -39, -40, -42, -44, -12, -15, -71, -72, -73, -74, -75, -79, -18, -188, -22, -23, -188, -30, -89, -134, -188, -188, -100, -102, -103, -104, -105, -106, -107, -108, -109, -188, -123, -188, -188, -188, -188, -126, -127, -188, -94, -188, -170, -171, -175, -178, -66, -188, -188, -188, -36, -43, -43, -31, -129, -90, -101, -188, -188, -188, -114, -116, -120, -120, -188, -91, -100, -7, -34, -38, -41, -135, -136, -110, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -129, -129, -188, -188, -124, -188, -188, -188, -121, -188, -188, -128, -92, -137, -111, -188, -188, -115, -117, -118, -122, -119, -129, -129, -112, -113 ] racc_goto_table = [ 30, 18, 7, 48, 107, 169, 117, 49, 187, 18, 18, 18, 18, 18, 18, 210, 211, 225, 61, 62, 63, 173, 174, 227, 295, 191, 76, 245, 229, 263, 64, 222, 223, 147, 196, 148, 149, 150, 236, 238, 239, 244, 128, 304, 306, 152, 154, 282, 261, 10, 163, 26, 145, 146, 194, 322, 323, 51, 52, 53, 54, 55, 56, 217, 177, 1, 294, 115, 46, 158, 243, 151, 214, 59, nil, nil, nil, 333, 334, 280, nil, nil, 218, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 270, 286, 287, nil, nil, nil, nil, nil, 225, 225, 187, nil, nil, nil, 227, 227, 185, 308, 186, 188, 272, 271, 293, 223, 298, nil, nil, nil, nil, nil, nil, nil, nil, 228, nil, 209, 190, nil, nil, nil, nil, nil, nil, nil, 201, 202, 203, nil, 205, 206, nil, 208, nil, 324, 325, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 128, nil, 128, nil, nil, nil, nil, nil, 307, nil, nil, 241, nil, nil, nil, nil, nil, nil, nil, 264, 262, 266, 314, 315, nil, nil, 268, 267, nil, 269, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 273, 186, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 277, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 284, 285, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 128, nil, nil, nil, nil, nil, 297, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 328, nil, nil, 330 ] racc_goto_check = [ 5, 30, 2, 5, 61, 29, 12, 58, 22, 30, 30, 30, 30, 30, 30, 54, 54, 15, 30, 30, 30, 10, 11, 17, 55, 39, 30, 41, 14, 41, 43, 24, 13, 6, 42, 6, 6, 6, 18, 18, 18, 54, 5, 56, 56, 60, 60, 53, 57, 3, 6, 4, 5, 5, 40, 55, 55, 3, 3, 3, 3, 3, 3, 9, 23, 1, 25, 8, 7, 30, 39, 43, 31, 38, nil, nil, nil, 55, 55, 41, nil, nil, 10, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 29, 54, 54, nil, nil, nil, nil, nil, 15, 15, 22, nil, nil, nil, 17, 17, 5, 41, 5, 5, 10, 11, 24, 13, 54, nil, nil, nil, nil, nil, nil, nil, nil, 12, nil, 61, 58, nil, nil, nil, nil, nil, nil, nil, 5, 5, 5, nil, 5, 5, nil, 5, nil, 54, 54, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 5, nil, 5, nil, nil, nil, nil, nil, 29, nil, nil, 5, nil, nil, nil, nil, nil, nil, nil, 5, 30, 5, 29, 29, nil, nil, 5, 2, nil, 5, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 5, 5, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 5, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 30, 30, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 5, nil, nil, nil, nil, nil, 5, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 5, nil, nil, 5 ] racc_goto_pointer = [ nil, 65, 0, 46, 47, -5, -26, 60, 21, -112, -93, -92, -41, -146, -153, -161, nil, -155, -144, nil, nil, nil, -121, -52, -147, -210, nil, nil, nil, -107, -2, -99, nil, nil, nil, nil, nil, nil, 54, -122, -94, -167, -115, 6, nil, nil, nil, nil, nil, nil, nil, nil, nil, -209, -152, -254, -243, -147, -2, nil, -21, -25, nil ] racc_goto_default = [ nil, nil, 296, nil, nil, 170, 8, nil, nil, nil, 43, 44, nil, 118, 119, 120, 121, 122, 123, 124, 125, 126, 131, nil, nil, 224, 226, 31, 32, nil, 41, nil, 11, 12, 13, 14, 15, 16, nil, nil, nil, nil, nil, 23, 246, 247, 248, 249, 250, 251, 252, 253, 254, nil, 109, nil, nil, nil, nil, 192, nil, nil, 108 ] racc_reduce_table = [ 0, 0, :racc_error, 2, 63, :_reduce_1, 2, 63, :_reduce_2, 2, 63, :_reduce_3, 2, 63, :_reduce_4, 5, 64, :_reduce_5, 1, 71, :_reduce_none, 3, 71, :_reduce_7, 0, 69, :_reduce_8, 3, 69, :_reduce_9, 1, 69, :_reduce_10, 1, 74, :_reduce_11, 3, 74, :_reduce_12, 1, 74, :_reduce_13, 1, 76, :_reduce_14, 3, 76, :_reduce_15, 1, 76, :_reduce_16, 1, 78, :_reduce_17, 3, 78, :_reduce_18, 1, 78, :_reduce_19, 1, 80, :_reduce_20, 1, 80, :_reduce_21, 3, 80, :_reduce_22, 3, 80, :_reduce_23, 1, 80, :_reduce_24, 0, 83, :_reduce_25, 2, 83, :_reduce_26, 1, 75, :_reduce_27, 2, 77, :_reduce_28, 2, 79, :_reduce_29, 3, 81, :_reduce_30, 4, 82, :_reduce_31, 0, 70, :_reduce_32, 2, 70, :_reduce_33, 5, 70, :_reduce_34, 0, 85, :_reduce_35, 3, 85, :_reduce_36, 1, 86, :_reduce_37, 3, 86, :_reduce_38, 1, 86, :_reduce_39, 1, 87, :_reduce_40, 3, 87, :_reduce_41, 1, 87, :_reduce_42, 0, 88, :_reduce_43, 1, 88, :_reduce_44, 1, 72, :_reduce_45, 4, 72, :_reduce_46, 1, 72, :_reduce_47, 1, 72, :_reduce_48, 1, 72, :_reduce_49, 1, 72, :_reduce_50, 1, 72, :_reduce_51, 1, 72, :_reduce_52, 1, 72, :_reduce_53, 1, 72, :_reduce_54, 1, 90, :_reduce_55, 1, 90, :_reduce_56, 1, 89, :_reduce_none, 4, 89, :_reduce_58, 3, 89, :_reduce_59, 0, 93, :_reduce_60, 1, 93, :_reduce_none, 1, 93, :_reduce_none, 1, 67, :_reduce_none, 1, 67, :_reduce_64, 1, 91, :_reduce_65, 3, 91, :_reduce_66, 3, 73, :_reduce_67, 3, 73, :_reduce_68, 1, 84, :_reduce_none, 1, 84, :_reduce_none, 1, 84, :_reduce_none, 1, 84, :_reduce_none, 1, 84, :_reduce_none, 1, 84, :_reduce_none, 1, 84, :_reduce_none, 1, 84, :_reduce_none, 1, 84, :_reduce_none, 1, 84, :_reduce_none, 1, 84, :_reduce_none, 0, 65, :_reduce_80, 2, 65, :_reduce_81, 2, 65, :_reduce_82, 2, 65, :_reduce_83, 2, 65, :_reduce_84, 2, 65, :_reduce_85, 2, 65, :_reduce_86, 3, 99, :_reduce_87, 3, 98, :_reduce_88, 5, 94, :_reduce_89, 6, 95, :_reduce_90, 6, 96, :_reduce_91, 8, 97, :_reduce_92, 0, 104, :_reduce_93, 2, 104, :_reduce_94, 1, 100, :_reduce_none, 1, 92, :_reduce_none, 2, 92, :_reduce_97, 1, 105, :_reduce_98, 3, 105, :_reduce_99, 0, 103, :_reduce_100, 2, 103, :_reduce_101, 1, 106, :_reduce_none, 1, 106, :_reduce_none, 1, 106, :_reduce_none, 1, 106, :_reduce_none, 1, 106, :_reduce_none, 1, 106, :_reduce_none, 1, 106, :_reduce_none, 1, 106, :_reduce_none, 3, 112, :_reduce_110, 5, 107, :_reduce_111, 7, 108, :_reduce_112, 7, 109, :_reduce_113, 2, 110, :_reduce_114, 5, 110, :_reduce_115, 2, 111, :_reduce_116, 5, 111, :_reduce_117, 5, 113, :_reduce_118, 5, 114, :_reduce_119, 0, 118, :_reduce_120, 2, 118, :_reduce_121, 3, 118, :_reduce_122, 0, 115, :_reduce_123, 3, 115, :_reduce_124, 0, 102, :_reduce_125, 2, 102, :_reduce_126, 1, 119, :_reduce_127, 4, 119, :_reduce_128, 0, 68, :_reduce_129, 3, 68, :_reduce_130, 1, 120, :_reduce_131, 3, 120, :_reduce_132, 0, 101, :_reduce_133, 2, 101, :_reduce_134, 4, 121, :_reduce_135, 1, 117, :_reduce_136, 3, 117, :_reduce_137, 1, 116, :_reduce_none, 1, 116, :_reduce_none, 1, 116, :_reduce_none, 1, 116, :_reduce_none, 1, 116, :_reduce_none, 1, 116, :_reduce_none, 1, 116, :_reduce_none, 1, 116, :_reduce_none, 1, 116, :_reduce_none, 1, 116, :_reduce_none, 1, 116, :_reduce_none, 1, 116, :_reduce_none, 1, 116, :_reduce_none, 1, 116, :_reduce_none, 1, 116, :_reduce_none, 1, 116, :_reduce_none, 1, 116, :_reduce_none, 1, 116, :_reduce_none, 1, 116, :_reduce_none, 1, 116, :_reduce_none, 1, 116, :_reduce_none, 1, 116, :_reduce_none, 1, 116, :_reduce_none, 1, 116, :_reduce_none, 1, 116, :_reduce_none, 1, 116, :_reduce_163, 1, 116, :_reduce_164, 1, 116, :_reduce_165, 2, 116, :_reduce_166, 2, 116, :_reduce_167, 1, 116, :_reduce_none, 1, 116, :_reduce_none, 5, 66, :_reduce_170, 5, 66, :_reduce_171, 4, 66, :_reduce_172, 4, 66, :_reduce_173, 4, 66, :_reduce_174, 5, 66, :_reduce_175, 4, 66, :_reduce_176, 4, 66, :_reduce_177, 5, 66, :_reduce_178, 3, 66, :_reduce_179, 2, 66, :_reduce_180, 4, 66, :_reduce_181, 3, 123, :_reduce_182, 1, 123, :_reduce_183, 1, 124, :_reduce_184, 3, 124, :_reduce_185, 3, 124, :_reduce_186, 1, 122, :_reduce_187 ] racc_reduce_n = 188 racc_shift_n = 335 racc_token_table = { false => 0, :error => 1, :type_METHOD => 2, :type_SIGNATURE => 3, :type_ANNOTATION => 4, :type_TYPE => 5, :ARROW => 6, :LPAREN => 7, :RPAREN => 8, :COMMA => 9, :STAR2 => 10, :QUESTION => 11, :STAR => 12, :COLON => 13, :LBRACE => 14, :RBRACE => 15, :LT => 16, :GT => 17, :ANY => 18, :TVAR => 19, :CLASS => 20, :MODULE => 21, :INSTANCE => 22, :SELF => 23, :VOID => 24, :NIL => 25, :INTERFACE_NAME => 26, :DOT => 27, :CONSTRUCTOR => 28, :NOCONSTRUCTOR => 29, :BAR => 30, :IDENT => 31, :MODULE_NAME => 32, :BLOCK => 33, :INCLUDE => 34, :IVAR => 35, :GVAR => 36, :INTERFACE => 37, :END => 38, :EXTENSION => 39, :UIDENT => 40, :COLON2 => 41, :IVAR_NAME => 42, :DEF => 43, :SELFQ => 44, :EXTEND => 45, :ATTR_READER => 46, :ATTR_ACCESSOR => 47, :LTCOLON => 48, :PLUS => 49, :OPERATOR => 50, :METHOD_NAME => 51, :BREAK => 52, :PERCENT => 53, :MINUS => 54, :METHOD => 55, :AT_TYPE => 56, :VAR => 57, :RETURN => 58, :CONST => 59, :AT_IMPLEMENTS => 60, :AT_DYNAMIC => 61 } racc_nt_base = 62 racc_use_result_var = true Racc_arg = [ racc_action_table, racc_action_check, racc_action_default, racc_action_pointer, racc_goto_table, racc_goto_check, racc_goto_default, racc_goto_pointer, racc_nt_base, racc_reduce_table, racc_token_table, racc_shift_n, racc_reduce_n, racc_use_result_var ] Racc_token_to_s_table = [ "$end", "error", "type_METHOD", "type_SIGNATURE", "type_ANNOTATION", "type_TYPE", "ARROW", "LPAREN", "RPAREN", "COMMA", "STAR2", "QUESTION", "STAR", "COLON", "LBRACE", "RBRACE", "LT", "GT", "ANY", "TVAR", "CLASS", "MODULE", "INSTANCE", "SELF", "VOID", "NIL", "INTERFACE_NAME", "DOT", "CONSTRUCTOR", "NOCONSTRUCTOR", "BAR", "IDENT", "MODULE_NAME", "BLOCK", "INCLUDE", "IVAR", "GVAR", "INTERFACE", "END", "EXTENSION", "UIDENT", "COLON2", "IVAR_NAME", "DEF", "SELFQ", "EXTEND", "ATTR_READER", "ATTR_ACCESSOR", "LTCOLON", "PLUS", "OPERATOR", "METHOD_NAME", "BREAK", "PERCENT", "MINUS", "METHOD", "AT_TYPE", "VAR", "RETURN", "CONST", "AT_IMPLEMENTS", "AT_DYNAMIC", "$start", "target", "method_type", "signatures", "annotation", "type", "type_params", "params", "block_opt", "return_type", "simple_type", "union_seq", "params0", "required_param", "params1", "optional_param", "params2", "rest_param", "params3", "required_keyword", "optional_keyword", "params4", "keyword", "block_params", "block_params0", "block_params1", "block_params2", "type_name", "instance_type_name", "type_seq", "module_name", "constructor", "interface", "class_decl", "module_decl", "extension_decl", "const_decl", "gvar_decl", "interface_name", "interface_members", "super_opt", "class_members", "self_type_opt", "module_name0", "class_member", "instance_method_member", "module_method_member", "module_instance_method_member", "include_member", "extend_member", "ivar_member", "attr_reader_member", "attr_accessor_member", "constructor_method", "method_name", "method_type_union", "attr_ivar_opt", "super_class", "type_param_seq", "interface_method", "subject", "dynamic_names", "dynamic_name" ] Racc_debug_parser = false ##### State transition tables end ##### # reduce 0 omitted module_eval(<<'.,.,', 'parser.y', 6) def _reduce_1(val, _values, result) result = val[1] result end .,., module_eval(<<'.,.,', 'parser.y', 7) def _reduce_2(val, _values, result) result = val[1] result end .,., module_eval(<<'.,.,', 'parser.y', 8) def _reduce_3(val, _values, result) result = val[1] result end .,., module_eval(<<'.,.,', 'parser.y', 9) def _reduce_4(val, _values, result) result = val[1] result end .,., module_eval(<<'.,.,', 'parser.y', 13) def _reduce_5(val, _values, result) result = AST::MethodType.new(location: AST::Location.concat(*val.compact.map(&:location)), type_params: val[0], params: val[1]&.value, block: val[2], return_type: val[4]) result end .,., # reduce 6 omitted module_eval(<<'.,.,', 'parser.y', 21) def _reduce_7(val, _values, result) result = AST::Types::Union.build(location: val[0].location + val[2].location, types: val[1]) result end .,., module_eval(<<'.,.,', 'parser.y', 24) def _reduce_8(val, _values, result) result = nil result end .,., module_eval(<<'.,.,', 'parser.y', 25) def _reduce_9(val, _values, result) result = LocatedValue.new(location: val[0].location + val[2].location, value: val[1]) result end .,., module_eval(<<'.,.,', 'parser.y', 27) def _reduce_10(val, _values, result) result = LocatedValue.new(location: val[0].location, value: AST::MethodType::Params::Required.new(location: val[0].location, type: val[0])) result end .,., module_eval(<<'.,.,', 'parser.y', 30) def _reduce_11(val, _values, result) result = AST::MethodType::Params::Required.new(location: val[0].location, type: val[0]) result end .,., module_eval(<<'.,.,', 'parser.y', 32) def _reduce_12(val, _values, result) location = val[0].location result = AST::MethodType::Params::Required.new(location: location, type: val[0], next_params: val[2]) result end .,., module_eval(<<'.,.,', 'parser.y', 37) def _reduce_13(val, _values, result) result = val[0] result end .,., module_eval(<<'.,.,', 'parser.y', 39) def _reduce_14(val, _values, result) result = AST::MethodType::Params::Optional.new(location: val[0].first, type: val[0].last) result end .,., module_eval(<<'.,.,', 'parser.y', 41) def _reduce_15(val, _values, result) location = val[0].first result = AST::MethodType::Params::Optional.new(type: val[0].last, location: location, next_params: val[2]) result end .,., module_eval(<<'.,.,', 'parser.y', 44) def _reduce_16(val, _values, result) result = val[0] result end .,., module_eval(<<'.,.,', 'parser.y', 46) def _reduce_17(val, _values, result) result = AST::MethodType::Params::Rest.new(location: val[0].first, type: val[0].last) result end .,., module_eval(<<'.,.,', 'parser.y', 48) def _reduce_18(val, _values, result) loc = val[0].first result = AST::MethodType::Params::Rest.new(location: loc, type: val[0].last, next_params: val[2]) result end .,., module_eval(<<'.,.,', 'parser.y', 51) def _reduce_19(val, _values, result) result = val[0] result end .,., module_eval(<<'.,.,', 'parser.y', 54) def _reduce_20(val, _values, result) location, name, type = val[0] result = AST::MethodType::Params::RequiredKeyword.new(location: location, name: name, type: type) result end .,., module_eval(<<'.,.,', 'parser.y', 58) def _reduce_21(val, _values, result) location, name, type = val[0] result = AST::MethodType::Params::OptionalKeyword.new(location: location, name: name, type: type) result end .,., module_eval(<<'.,.,', 'parser.y', 62) def _reduce_22(val, _values, result) location, name, type = val[0] result = AST::MethodType::Params::RequiredKeyword.new(location: location, name: name, type: type, next_params: val[2]) result end .,., module_eval(<<'.,.,', 'parser.y', 69) def _reduce_23(val, _values, result) location, name, type = val[0] result = AST::MethodType::Params::OptionalKeyword.new(location: location, name: name, type: type, next_params: val[2]) result end .,., module_eval(<<'.,.,', 'parser.y', 75) def _reduce_24(val, _values, result) result = val[0] result end .,., module_eval(<<'.,.,', 'parser.y', 77) def _reduce_25(val, _values, result) result = nil result end .,., module_eval(<<'.,.,', 'parser.y', 79) def _reduce_26(val, _values, result) result = AST::MethodType::Params::RestKeyword.new(location: val[0].location + val[1].location, type: val[1]) result end .,., module_eval(<<'.,.,', 'parser.y', 83) def _reduce_27(val, _values, result) result = val[0] result end .,., module_eval(<<'.,.,', 'parser.y', 84) def _reduce_28(val, _values, result) result = [val[0].location + val[1].location, val[1]] result end .,., module_eval(<<'.,.,', 'parser.y', 86) def _reduce_29(val, _values, result) result = [val[0].location + val[1].location, val[1]] result end .,., module_eval(<<'.,.,', 'parser.y', 88) def _reduce_30(val, _values, result) result = [val[0].location + val[2].location, val[0].value, val[2]] result end .,., module_eval(<<'.,.,', 'parser.y', 91) def _reduce_31(val, _values, result) result = [val[0].location + val[3].location, val[1].value, val[3]] result end .,., module_eval(<<'.,.,', 'parser.y', 95) def _reduce_32(val, _values, result) result = nil result end .,., module_eval(<<'.,.,', 'parser.y', 97) def _reduce_33(val, _values, result) result = AST::MethodType::Block.new(params: nil, return_type: nil, location: val[0].location + val[1].location) result end .,., module_eval(<<'.,.,', 'parser.y', 102) def _reduce_34(val, _values, result) result = AST::MethodType::Block.new(params: val[1], return_type: val[3], location: val[0].location + val[4].location) result end .,., module_eval(<<'.,.,', 'parser.y', 107) def _reduce_35(val, _values, result) result = nil result end .,., module_eval(<<'.,.,', 'parser.y', 109) def _reduce_36(val, _values, result) result = val[1] result end .,., module_eval(<<'.,.,', 'parser.y', 113) def _reduce_37(val, _values, result) result = AST::MethodType::Params::Required.new(location: val[0].location, type: val[0]) result end .,., module_eval(<<'.,.,', 'parser.y', 117) def _reduce_38(val, _values, result) result = AST::MethodType::Params::Required.new(location: val[0].location, type: val[0], next_params: val[2]) result end .,., module_eval(<<'.,.,', 'parser.y', 121) def _reduce_39(val, _values, result) result = val[0] result end .,., module_eval(<<'.,.,', 'parser.y', 124) def _reduce_40(val, _values, result) result = AST::MethodType::Params::Optional.new(location: val[0].first, type: val[0].last) result end .,., module_eval(<<'.,.,', 'parser.y', 128) def _reduce_41(val, _values, result) loc = val.first[0] + (val[2] || val[1]).location type = val.first[1] next_params = val[2] result = AST::MethodType::Params::Optional.new(location: loc, type: type, next_params: next_params) result end .,., module_eval(<<'.,.,', 'parser.y', 133) def _reduce_42(val, _values, result) result = val[0] result end .,., module_eval(<<'.,.,', 'parser.y', 135) def _reduce_43(val, _values, result) result = nil result end .,., module_eval(<<'.,.,', 'parser.y', 137) def _reduce_44(val, _values, result) result = AST::MethodType::Params::Rest.new(location: val[0].first, type: val[0].last) result end .,., module_eval(<<'.,.,', 'parser.y', 141) def _reduce_45(val, _values, result) result = AST::Types::Name.new(name: val[0].value, location: val[0].location, args: []) result end .,., module_eval(<<'.,.,', 'parser.y', 144) def _reduce_46(val, _values, result) loc = val[0].location + val[3].location name = val[0].value args = val[2] result = AST::Types::Name.new(location: loc, name: name, args: args) result end .,., module_eval(<<'.,.,', 'parser.y', 149) def _reduce_47(val, _values, result) result = AST::Types::Any.new(location: val[0].location) result end .,., module_eval(<<'.,.,', 'parser.y', 150) def _reduce_48(val, _values, result) result = AST::Types::Var.new(location: val[0].location, name: val[0].value) result end .,., module_eval(<<'.,.,', 'parser.y', 151) def _reduce_49(val, _values, result) result = AST::Types::Class.new(location: val[0].location) result end .,., module_eval(<<'.,.,', 'parser.y', 152) def _reduce_50(val, _values, result) result = AST::Types::Class.new(location: val[0].location) result end .,., module_eval(<<'.,.,', 'parser.y', 153) def _reduce_51(val, _values, result) result = AST::Types::Instance.new(location: val[0].location) result end .,., module_eval(<<'.,.,', 'parser.y', 154) def _reduce_52(val, _values, result) result = AST::Types::Self.new(location: val[0].location) result end .,., module_eval(<<'.,.,', 'parser.y', 155) def _reduce_53(val, _values, result) result = AST::Types::Void.new(location: val[0].location) result end .,., module_eval(<<'.,.,', 'parser.y', 156) def _reduce_54(val, _values, result) result = AST::Types::Name.new_instance(name: ModuleName.new(name: "NilClass", absolute: true), location: val[0].location) result end .,., module_eval(<<'.,.,', 'parser.y', 160) def _reduce_55(val, _values, result) result = LocatedValue.new(value: TypeName::Instance.new(name: val[0].value), location: val[0].location) result end .,., module_eval(<<'.,.,', 'parser.y', 164) def _reduce_56(val, _values, result) result = LocatedValue.new(value: TypeName::Interface.new(name: val[0].value), location: val[0].location) result end .,., # reduce 57 omitted module_eval(<<'.,.,', 'parser.y', 170) def _reduce_58(val, _values, result) loc = val[0].location + (val[3] || val[2]).location result = LocatedValue.new(value: TypeName::Class.new(name: val[0].value, constructor: val[3]&.value), location: loc) result end .,., module_eval(<<'.,.,', 'parser.y', 175) def _reduce_59(val, _values, result) loc = val[0].location + val.last.location result = LocatedValue.new(value: TypeName::Module.new(name: val[0].value), location: loc) result end .,., module_eval(<<'.,.,', 'parser.y', 180) def _reduce_60(val, _values, result) result = nil result end .,., # reduce 61 omitted # reduce 62 omitted # reduce 63 omitted module_eval(<<'.,.,', 'parser.y', 186) def _reduce_64(val, _values, result) loc = val[0].first.location + val[0].last.location result = AST::Types::Union.build(types: val[0], location: loc) result end .,., module_eval(<<'.,.,', 'parser.y', 190) def _reduce_65(val, _values, result) result = [val[0]] result end .,., module_eval(<<'.,.,', 'parser.y', 191) def _reduce_66(val, _values, result) result = [val[0]] + val[2] result end .,., module_eval(<<'.,.,', 'parser.y', 193) def _reduce_67(val, _values, result) result = [val[0], val[2]] result end .,., module_eval(<<'.,.,', 'parser.y', 194) def _reduce_68(val, _values, result) result = [val[0]] + val[2] result end .,., # reduce 69 omitted # reduce 70 omitted # reduce 71 omitted # reduce 72 omitted # reduce 73 omitted # reduce 74 omitted # reduce 75 omitted # reduce 76 omitted # reduce 77 omitted # reduce 78 omitted # reduce 79 omitted module_eval(<<'.,.,', 'parser.y', 208) def _reduce_80(val, _values, result) result = [] result end .,., module_eval(<<'.,.,', 'parser.y', 209) def _reduce_81(val, _values, result) result = [val[0]] + val[1] result end .,., module_eval(<<'.,.,', 'parser.y', 210) def _reduce_82(val, _values, result) result = [val[0]] + val[1] result end .,., module_eval(<<'.,.,', 'parser.y', 211) def _reduce_83(val, _values, result) result = [val[0]] + val[1] result end .,., module_eval(<<'.,.,', 'parser.y', 212) def _reduce_84(val, _values, result) result = [val[0]] + val[1] result end .,., module_eval(<<'.,.,', 'parser.y', 213) def _reduce_85(val, _values, result) result = [val[0]] + val[1] result end .,., module_eval(<<'.,.,', 'parser.y', 214) def _reduce_86(val, _values, result) result = [val[0]] + val[1] result end .,., module_eval(<<'.,.,', 'parser.y', 217) def _reduce_87(val, _values, result) loc = val.first.location + val.last.location result = AST::Signature::Gvar.new( location: loc, name: val[0].value, type: val[2] ) result end .,., module_eval(<<'.,.,', 'parser.y', 226) def _reduce_88(val, _values, result) loc = val.first.location + val.last.location result = AST::Signature::Const.new( location: loc, name: val[0].value, type: val[2] ) result end .,., module_eval(<<'.,.,', 'parser.y', 235) def _reduce_89(val, _values, result) loc = val.first.location + val.last.location result = AST::Signature::Interface.new( location: loc, name: val[1].value, params: val[2], methods: val[3] ) result end .,., module_eval(<<'.,.,', 'parser.y', 245) def _reduce_90(val, _values, result) loc = val.first.location + val.last.location result = AST::Signature::Class.new(name: val[1].value.absolute!, params: val[2], super_class: val[3], members: val[4], location: loc) result end .,., module_eval(<<'.,.,', 'parser.y', 253) def _reduce_91(val, _values, result) loc = val.first.location + val.last.location result = AST::Signature::Module.new(name: val[1].value.absolute!, location: loc, params: val[2], self_type: val[3], members: val[4]) result end .,., module_eval(<<'.,.,', 'parser.y', 261) def _reduce_92(val, _values, result) loc = val.first.location + val.last.location result = AST::Signature::Extension.new(module_name: val[1].value.absolute!, name: val[4].value, location: loc, params: val[2], members: val[6]) result end .,., module_eval(<<'.,.,', 'parser.y', 269) def _reduce_93(val, _values, result) result = nil result end .,., module_eval(<<'.,.,', 'parser.y', 270) def _reduce_94(val, _values, result) result = val[1] result end .,., # reduce 95 omitted # reduce 96 omitted module_eval(<<'.,.,', 'parser.y', 276) def _reduce_97(val, _values, result) loc = val.first.location + val.last.location result = LocatedValue.new(location: loc, value: val[1].value.absolute!) result end .,., module_eval(<<'.,.,', 'parser.y', 281) def _reduce_98(val, _values, result) result = LocatedValue.new(location: val[0].location, value: ModuleName.parse(val[0].value)) result end .,., module_eval(<<'.,.,', 'parser.y', 284) def _reduce_99(val, _values, result) location = val[0].location + val.last.location name = ModuleName.parse(val[0].value) + val.last.value result = LocatedValue.new(location: location, value: name) result end .,., module_eval(<<'.,.,', 'parser.y', 289) def _reduce_100(val, _values, result) result = [] result end .,., module_eval(<<'.,.,', 'parser.y', 290) def _reduce_101(val, _values, result) result = [val[0]] + val[1] result end .,., # reduce 102 omitted # reduce 103 omitted # reduce 104 omitted # reduce 105 omitted # reduce 106 omitted # reduce 107 omitted # reduce 108 omitted # reduce 109 omitted module_eval(<<'.,.,', 'parser.y', 302) def _reduce_110(val, _values, result) loc = val.first.location + val.last.location result = AST::Signature::Members::Ivar.new( location: loc, name: val[0].value, type: val[2] ) result end .,., module_eval(<<'.,.,', 'parser.y', 311) def _reduce_111(val, _values, result) loc = val.first.location + val.last.last.location result = AST::Signature::Members::Method.new( name: val[2].value, types: val[4], kind: :instance, location: loc, attributes: [val[1] ? :constructor : nil].compact ) result end .,., module_eval(<<'.,.,', 'parser.y', 321) def _reduce_112(val, _values, result) loc = val.first.location + val.last.last.location result = AST::Signature::Members::Method.new( name: val[4].value, types: val[6], kind: :module, location: loc, attributes: [val[1] ? :constructor : nil].compact ) result end .,., module_eval(<<'.,.,', 'parser.y', 331) def _reduce_113(val, _values, result) loc = val.first.location + val.last.last.location result = AST::Signature::Members::Method.new( name: val[4].value, types: val[6], kind: :module_instance, location: loc, attributes: [val[1] ? :constructor : nil].compact ) result end .,., module_eval(<<'.,.,', 'parser.y', 341) def _reduce_114(val, _values, result) loc = val.first.location + val.last.location name = val[1].value result = AST::Signature::Members::Include.new(name: name, location: loc, args: []) result end .,., module_eval(<<'.,.,', 'parser.y', 346) def _reduce_115(val, _values, result) loc = val.first.location + val.last.location name = val[1].value result = AST::Signature::Members::Include.new(name: name, location: loc, args: val[3]) result end .,., module_eval(<<'.,.,', 'parser.y', 351) def _reduce_116(val, _values, result) loc = val.first.location + val.last.location name = val[1].value result = AST::Signature::Members::Extend.new(name: name, location: loc, args: []) result end .,., module_eval(<<'.,.,', 'parser.y', 356) def _reduce_117(val, _values, result) loc = val.first.location + val.last.location name = val[1].value result = AST::Signature::Members::Extend.new(name: name, location: loc, args: val[3]) result end .,., module_eval(<<'.,.,', 'parser.y', 361) def _reduce_118(val, _values, result) loc = val.first.location + val.last.location result = AST::Signature::Members::Attr.new(location: loc, name: val[1].value, kind: :reader, ivar: val[2], type: val[4]) result end .,., module_eval(<<'.,.,', 'parser.y', 365) def _reduce_119(val, _values, result) loc = val.first.location + val.last.location result = AST::Signature::Members::Attr.new(location: loc, name: val[1].value, kind: :accessor, ivar: val[2], type: val[4]) result end .,., module_eval(<<'.,.,', 'parser.y', 369) def _reduce_120(val, _values, result) result = nil result end .,., module_eval(<<'.,.,', 'parser.y', 370) def _reduce_121(val, _values, result) result = false result end .,., module_eval(<<'.,.,', 'parser.y', 371) def _reduce_122(val, _values, result) result = val[1].value result end .,., module_eval(<<'.,.,', 'parser.y', 373) def _reduce_123(val, _values, result) result = false result end .,., module_eval(<<'.,.,', 'parser.y', 374) def _reduce_124(val, _values, result) result = true result end .,., module_eval(<<'.,.,', 'parser.y', 376) def _reduce_125(val, _values, result) result = nil result end .,., module_eval(<<'.,.,', 'parser.y', 377) def _reduce_126(val, _values, result) result = val[1] result end .,., module_eval(<<'.,.,', 'parser.y', 380) def _reduce_127(val, _values, result) result = AST::Signature::SuperClass.new(location: val[0].location, name: val[0].value, args: []) result end .,., module_eval(<<'.,.,', 'parser.y', 383) def _reduce_128(val, _values, result) loc = val[0].location + val[3].location name = val[0].value result = AST::Signature::SuperClass.new(location: loc, name: name, args: val[2]) result end .,., module_eval(<<'.,.,', 'parser.y', 388) def _reduce_129(val, _values, result) result = nil result end .,., module_eval(<<'.,.,', 'parser.y', 390) def _reduce_130(val, _values, result) location = val[0].location + val[2].location result = AST::TypeParams.new(location: location, variables: val[1]) result end .,., module_eval(<<'.,.,', 'parser.y', 394) def _reduce_131(val, _values, result) result = [val[0].value] result end .,., module_eval(<<'.,.,', 'parser.y', 395) def _reduce_132(val, _values, result) result = [val[0].value] + val[2] result end .,., module_eval(<<'.,.,', 'parser.y', 397) def _reduce_133(val, _values, result) result = [] result end .,., module_eval(<<'.,.,', 'parser.y', 398) def _reduce_134(val, _values, result) result = val[1].unshift(val[0]) result end .,., module_eval(<<'.,.,', 'parser.y', 401) def _reduce_135(val, _values, result) loc = val[0].location + val[3].last.location result = AST::Signature::Interface::Method.new(location: loc, name: val[1].value, types: val[3]) result end .,., module_eval(<<'.,.,', 'parser.y', 405) def _reduce_136(val, _values, result) result = [val[0]] result end .,., module_eval(<<'.,.,', 'parser.y', 406) def _reduce_137(val, _values, result) result = [val[0]] + val[2] result end .,., # reduce 138 omitted # reduce 139 omitted # reduce 140 omitted # reduce 141 omitted # reduce 142 omitted # reduce 143 omitted # reduce 144 omitted # reduce 145 omitted # reduce 146 omitted # reduce 147 omitted # reduce 148 omitted # reduce 149 omitted # reduce 150 omitted # reduce 151 omitted # reduce 152 omitted # reduce 153 omitted # reduce 154 omitted # reduce 155 omitted # reduce 156 omitted # reduce 157 omitted # reduce 158 omitted # reduce 159 omitted # reduce 160 omitted # reduce 161 omitted # reduce 162 omitted module_eval(<<'.,.,', 'parser.y', 429) def _reduce_163(val, _values, result) result = LocatedValue.new(location: val[0].location, value: :|) result end .,., module_eval(<<'.,.,', 'parser.y', 430) def _reduce_164(val, _values, result) result = LocatedValue.new(location: val[0].location, value: :constructor) result end .,., module_eval(<<'.,.,', 'parser.y', 431) def _reduce_165(val, _values, result) result = LocatedValue.new(location: val[0].location, value: :noconstructor) result end .,., module_eval(<<'.,.,', 'parser.y', 433) def _reduce_166(val, _values, result) raise ParseError, "\nunexpected method name any ?" unless val[0].location.pred?(val[1].location) result = LocatedValue.new(location: val[0].location + val[1].location, value: :any?) result end .,., module_eval(<<'.,.,', 'parser.y', 437) def _reduce_167(val, _values, result) raise ParseError, "\nunexpected method name > >" unless val[0].location.pred?(val[1].location) result = LocatedValue.new(location: val[0].location + val[1].location, value: :>>) result end .,., # reduce 168 omitted # reduce 169 omitted module_eval(<<'.,.,', 'parser.y', 444) def _reduce_170(val, _values, result) loc = val.first.location + val.last.location result = AST::Annotation::VarType.new(location: loc, name: val[2].value, type: val[4]) result end .,., module_eval(<<'.,.,', 'parser.y', 450) def _reduce_171(val, _values, result) loc = val.first.location + val.last.location result = AST::Annotation::MethodType.new(location: loc, name: val[2].value, type: val[4]) result end .,., module_eval(<<'.,.,', 'parser.y', 456) def _reduce_172(val, _values, result) loc = val.first.location + val.last.location result = AST::Annotation::ReturnType.new(type: val[3], location: loc) result end .,., module_eval(<<'.,.,', 'parser.y', 460) def _reduce_173(val, _values, result) loc = val.first.location + val.last.location result = AST::Annotation::BlockType.new(type: val[3], location: loc) result end .,., module_eval(<<'.,.,', 'parser.y', 464) def _reduce_174(val, _values, result) loc = val.first.location + val.last.location result = AST::Annotation::SelfType.new(type: val[3], location: loc) result end .,., module_eval(<<'.,.,', 'parser.y', 468) def _reduce_175(val, _values, result) loc = val.first.location + val.last.location result = AST::Annotation::ConstType.new(name: val[2].value, type: val[4], location: loc) result end .,., module_eval(<<'.,.,', 'parser.y', 474) def _reduce_176(val, _values, result) loc = val.first.location + val.last.location result = AST::Annotation::InstanceType.new(type: val[3], location: loc) result end .,., module_eval(<<'.,.,', 'parser.y', 478) def _reduce_177(val, _values, result) loc = val.first.location + val.last.location result = AST::Annotation::ModuleType.new(type: val[3], location: loc) result end .,., module_eval(<<'.,.,', 'parser.y', 482) def _reduce_178(val, _values, result) loc = val.first.location + val.last.location result = AST::Annotation::IvarType.new(name: val[2].value, type: val[4], location: loc) result end .,., module_eval(<<'.,.,', 'parser.y', 486) def _reduce_179(val, _values, result) loc = val[0].location + (val[2]&.location || val[1].location) args = val[2]&.variables || [] name = AST::Annotation::Implements::Module.new(name: val[1].value, args: args) result = AST::Annotation::Implements.new(name: name, location: loc) result end .,., module_eval(<<'.,.,', 'parser.y', 492) def _reduce_180(val, _values, result) loc = val[0].location + val[1].last.location result = AST::Annotation::Dynamic.new(names: val[1], location: loc) result end .,., module_eval(<<'.,.,', 'parser.y', 496) def _reduce_181(val, _values, result) loc = val.first.location + val.last.location result = AST::Annotation::BreakType.new(type: val[3], location: loc) result end .,., module_eval(<<'.,.,', 'parser.y', 500) def _reduce_182(val, _values, result) result = [val[0]] + val[2] result end .,., module_eval(<<'.,.,', 'parser.y', 501) def _reduce_183(val, _values, result) result = val result end .,., module_eval(<<'.,.,', 'parser.y', 504) def _reduce_184(val, _values, result) result = AST::Annotation::Dynamic::Name.new(name: val[0].value, location: val[0].location, kind: :instance) result end .,., module_eval(<<'.,.,', 'parser.y', 507) def _reduce_185(val, _values, result) loc = val.first.location + val.last.location result = AST::Annotation::Dynamic::Name.new(name: val[2].value, location: loc, kind: :module) result end .,., module_eval(<<'.,.,', 'parser.y', 511) def _reduce_186(val, _values, result) loc = val.first.location + val.last.location result = AST::Annotation::Dynamic::Name.new(name: val[2].value, location: loc, kind: :module_instance) result end .,., module_eval(<<'.,.,', 'parser.y', 515) def _reduce_187(val, _values, result) result = val[0] result end .,., def _reduce_none(val, _values, result) val[0] end end # class Parser end # module Steep