#
# DO NOT MODIFY!!!!
# This file is automatically generated by Racc 1.5.2
# from Racc grammar file "".
#

require 'racc/parser.rb'
module RBS
  class Parser < Racc::Parser

module_eval(<<'...end parser.y/module_eval...', 'parser.y', 1072)

Types = RBS::Types
Namespace = RBS::Namespace
TypeName = RBS::TypeName
Declarations = RBS::AST::Declarations
Members = RBS::AST::Members
MethodType = RBS::MethodType
Annotation = RBS::AST::Annotation

class LocatedValue
  attr_reader :location
  attr_reader :value

  def initialize(location:, value:)
    @location = location
    @value = value
  end
end

require "strscan"

attr_reader :input
attr_reader :buffer
attr_reader :eof_re

def initialize(type, buffer:, eof_re:)
  super()
  @type = type
  @buffer = buffer
  @input = StringScanner.new(buffer.content)
  @eof_re = eof_re
  @eof = false
  @bound_variables_stack = []
  @comments = {}
  @ascii_only = buffer.content.ascii_only?
end

def start_merged_variables_scope
  set = @bound_variables_stack.last&.dup || Set.new
  @bound_variables_stack.push set
end

def start_new_variables_scope
  @bound_variables_stack.push Set.new
end

def reset_variable_scope
  @bound_variables_stack.pop
end

def insert_bound_variable(var)
  @bound_variables_stack.last << var
end

def is_bound_variable?(var)
  (@bound_variables_stack.last || Set.new).member?(var)
end

def self.parse_signature(input, eof_re: nil)
  case input
  when RBS::Buffer
    buffer = input
  else
    buffer = RBS::Buffer.new(name: nil, content: input.to_s)
  end

  self.new(:SIGNATURE, buffer: buffer, eof_re: eof_re).do_parse
end

def self.parse_type(input, variables: [], eof_re: nil)
  case input
  when RBS::Buffer
    buffer = input
  else
    buffer = RBS::Buffer.new(name: nil, content: input.to_s)
  end

  self.new(:TYPE, buffer: buffer, eof_re: eof_re).yield_self do |parser|
    parser.start_new_variables_scope

    variables.each do |var|
      parser.insert_bound_variable var
    end

    parser.do_parse
  ensure
    parser.reset_variable_scope
  end
end

def self.parse_method_type(input, variables: [], eof_re: nil)
  case input
  when RBS::Buffer
    buffer = input
  else
    buffer = RBS::Buffer.new(name: nil, content: input.to_s)
  end

  self.new(:METHODTYPE, buffer: buffer, eof_re: eof_re).yield_self do |parser|
    parser.start_new_variables_scope

    variables.each do |var|
      parser.insert_bound_variable var
    end

    parser.do_parse
  ensure
    parser.reset_variable_scope
  end
end

def leading_comment(location)
  @comments[location.start_line-1]
end

def push_comment(string, location)
  if (comment = leading_comment(location)) && comment.location.start_column == location.start_column
    comment.concat(string: "#{string}\n", location: location)
    @comments[comment.location.end_line] = comment
  else
    new_comment = AST::Comment.new(string: "#{string}\n", location: location)
    @comments[new_comment.location.end_line] = new_comment
  end
end

def new_token(type, value = input.matched)
  charpos = charpos(input)
  matched = input.matched

  if matched
    start_index = charpos - matched.size
    end_index = charpos

    location = RBS::Location.new(buffer: buffer,
                                 start_pos: start_index,
                                 end_pos: end_index)

    [type, LocatedValue.new(location: location, value: value)]
  else
    # scanner hasn't matched yet
    [false, nil]
  end
end

def charpos(scanner)
  if @ascii_only
    scanner.pos
  else
    scanner.charpos
  end
end

def empty_params_result
  [
    [],
    [],
    nil,
    [],
    {},
    {},
    nil
  ]
end

KEYWORDS = {
  "class" => :kCLASS,
  "type" => :kTYPE,
  "def" => :kDEF,
  "self" => :kSELF,
  "void" => :kVOID,
  "any" => :kANY,
  "untyped" => :kUNTYPED,
  "top" => :kTOP,
  "bot" => :kBOT,
  "instance" => :kINSTANCE,
  "bool" => :kBOOL,
  "nil" => :kNIL,
  "true" => :kTRUE,
  "false" => :kFALSE,
  "singleton" => :kSINGLETON,
  "interface" => :kINTERFACE,
  "end" => :kEND,
  "include" => :kINCLUDE,
  "extend" => :kEXTEND,
  "prepend" => :kPREPEND,
  "module" => :kMODULE,
  "attr_reader" => :kATTRREADER,
  "attr_writer" => :kATTRWRITER,
  "attr_accessor" => :kATTRACCESSOR,
  "public" => :kPUBLIC,
  "private" => :kPRIVATE,
  "alias" => :kALIAS,
  "extension" => :kEXTENSION,
  "incompatible" => :kINCOMPATIBLE,
  "unchecked" => :kUNCHECKED,
  "overload" => :kOVERLOAD,
  "out" => :kOUT,
  "in" => :kIN,
}
KEYWORDS_RE = /#{Regexp.union(*KEYWORDS.keys)}\b/

PUNCTS = {
  "===" => :tOPERATOR,
  "==" => :tOPERATOR,
  "=~" => :tOPERATOR,
  "!~" => :tOPERATOR,
  "!=" => :tOPERATOR,
  ">=" => :tOPERATOR,
  "<<" => :tOPERATOR,
  "<=>" => :tOPERATOR,
  "<=" => :tOPERATOR,
  ">>" => :tOPERATOR,
  ">" => :tOPERATOR,
  "~" => :tOPERATOR,
  "+@" => :tOPERATOR,
  "+" => :tOPERATOR,
  "[]=" => :tOPERATOR,
  "[]" => :tOPERATOR,
  "::" => :kCOLON2,
  ":" => :kCOLON,
  "(" => :kLPAREN,
  ")" => :kRPAREN,
  "[" => :kLBRACKET,
  "]" => :kRBRACKET,
  "{" => :kLBRACE,
  "}" => :kRBRACE,
  "," => :kCOMMA,
  "|" => :kBAR,
  "&" => :kAMP,
  "^" => :kHAT,
  "->" => :kARROW,
  "=>" => :kFATARROW,
  "=" => :kEQ,
  "?" => :kQUESTION,
  "!" => :kEXCLAMATION,
  "**" => :kSTAR2,
  "*" => :kSTAR,
  "..." => :kDOT3,
  "." => :kDOT,
  "<" => :kLT,
  "-@" => :tOPERATOR,
  "-" => :tOPERATOR,
  "/" => :tOPERATOR,
  "`" => :tOPERATOR,
  "%" => :tOPERATOR,
}
PUNCTS_RE = Regexp.union(*PUNCTS.keys)

ANNOTATION_RE = Regexp.union(/%a\{.*?\}/,
                             /%a\[.*?\]/,
                             /%a\(.*?\)/,
                             /%a\<.*?\>/,
                             /%a\|.*?\|/)

escape_sequences = %w[a b e f n r s t v "].map { |l| "\\\\#{l}" }
DBL_QUOTE_STR_ESCAPE_SEQUENCES_RE = /(#{escape_sequences.join("|")})/

def next_token
  if @type
    type = @type
    @type = nil
    return [:"type_#{type}", nil]
  end

  return new_token(false, '') if @eof

  while true
    return new_token(false, '') if input.eos?

    case
    when input.scan(/\s+/)
      # skip
    when input.scan(/#(( *)|( ?(?<string>.*)))\n/)
      charpos = charpos(input)
      start_index = charpos - input.matched.size
      end_index = charpos-1

      location = RBS::Location.new(buffer: buffer,
                                               start_pos: start_index,
                                               end_pos: end_index)

      push_comment input[:string] || "", location
    else
      break
    end
  end

  case
  when eof_re && input.scan(eof_re)
    @eof = true
    [:tEOF, input.matched]
  when input.scan(/`[a-zA-Z_]\w*`/)
    s = input.matched.yield_self {|s| s[1, s.length-2] }
    new_token(:tQUOTEDIDENT, s)
  when input.scan(/`(\\`|[^` :])+`/)
    s = input.matched.yield_self {|s| s[1, s.length-2] }.gsub(/\\`/, '`')
    new_token(:tQUOTEDMETHOD, s)
  when input.scan(ANNOTATION_RE)
    s = input.matched.yield_self {|s| s[3, s.length-4] }.strip
    new_token(:tANNOTATION, s)
  when input.scan(/self\?/)
    new_token(:kSELFQ, "self?")
  when input.scan(/(([a-zA-Z]\w*)|(_\w+))=/)
    new_token(:tWRITE_ATTR)
  when input.scan(KEYWORDS_RE)
    new_token(KEYWORDS[input.matched], input.matched.to_sym)
  when input.scan(/:((@{,2}|\$)?\w+(\?|\!)?|[|&\/%~`^]|<=>|={2,3}|=~|[<>]{2}|[<>]=?|[-+]@?|\*{1,2}|\[\]=?|![=~]?)\b?/)
    s = input.matched.yield_self {|s| s[1, s.length] }.to_sym
    new_token(:tSYMBOL, s)
  when input.scan(/[+-]?\d[\d_]*/)
    new_token(:tINTEGER, input.matched.to_i)
  when input.scan(PUNCTS_RE)
    new_token(PUNCTS[input.matched])
  when input.scan(/(::)?([A-Z]\w*::)+/)
    new_token(:tNAMESPACE)
  when input.scan(/[a-z_]\w*:/)
    new_token(:tLKEYWORD, input.matched.chop.to_sym)
  when input.scan(/[a-z_]\w*[?!]:/)
    new_token(:tLKEYWORD_Q_E, input.matched.chop.to_sym)
  when input.scan(/[A-Z]\w*:/)
    new_token(:tUKEYWORD, input.matched.chop.to_sym)
  when input.scan(/[A-Z]\w*[?!]:/)
    new_token(:tUKEYWORD_Q_E, input.matched.chop.to_sym)
  when input.scan(/\$[A-Za-z_]\w*/)
    new_token(:tGLOBALIDENT)
  when input.scan(/@[a-zA-Z_]\w*/)
    new_token(:tIVAR, input.matched.to_sym)
  when input.scan(/@@[a-zA-Z_]\w*/)
    new_token(:tCLASSVAR, input.matched.to_sym)
  when input.scan(/_[a-zA-Z]\w*\b/)
    new_token(:tINTERFACEIDENT)
  when input.scan(/[A-Z]\w*\b/)
    new_token(:tUIDENT)
  when input.scan(/[a-z_]\w*\b/)
    new_token(:tLIDENT)
  when input.scan(/"(\\"|[^"])*"/)
    s = input.matched.yield_self {|s| s[1, s.length - 2] }
                     .gsub(DBL_QUOTE_STR_ESCAPE_SEQUENCES_RE) do |match|
                       case match
                       when '\\a' then "\a"
                       when '\\b' then "\b"
                       when '\\e' then "\e"
                       when '\\f' then "\f"
                       when '\\n' then "\n"
                       when '\\r' then "\r"
                       when '\\s' then "\s"
                       when '\\t' then "\t"
                       when '\\v' then "\v"
                       when '\\"' then '"'
                       end
                     end
    new_token(:tSTRING, s)
  when input.scan(/'(\\'|[^'])*'/)
    s = input.matched.yield_self {|s| s[1, s.length - 2] }.gsub(/\\'/, "'")
    new_token(:tSTRING, s)
  else
    raise "Unexpected token: #{input.peek(10)}..."
  end
end

def on_error(token_id, error_value, value_stack)
  raise SyntaxError.new(token_str: token_to_str(token_id), error_value: error_value, value_stack: value_stack)
end

class SyntaxError < ParsingError
  attr_reader :token_str, :error_value, :value_stack

  def initialize(token_str:, error_value:, value_stack: nil)
    @token_str = token_str
    @error_value = error_value
    @value_stack = value_stack

    super "parse error on value: #{error_value.inspect} (#{token_str})"
  end
end

class SemanticsError < ParsingError
  attr_reader :subject, :location, :original_message

  def initialize(message, subject:, location:)
    @subject = subject
    @location = location
    @original_message = message

    super "parse error on #{location}: #{message}"
  end
end

...end parser.y/module_eval...
##### State transition tables begin ###

clist = [
'354,355,33,356,5,113,37,33,33,42,341,397,49,33,33,353,43,248,339,396',
'40,41,55,56,57,58,59,60,61,62,358,33,63,54,64,65,66,77,67,68,69,83,33',
'32,53,349,343,344,32,32,347,345,348,308,32,32,33,346,82,70,71,72,74',
'76,75,342,351,352,73,78,80,126,32,185,48,84,85,81,86,354,355,33,356',
'32,96,97,98,99,104,49,39,33,33,33,353,207,207,32,186,40,41,55,56,57',
'58,59,60,61,62,79,226,63,54,64,65,66,77,67,68,69,83,53,32,160,349,343',
'344,53,53,347,345,348,32,32,32,227,346,82,70,71,72,74,76,75,342,351',
'352,73,78,80,40,41,161,283,84,85,81,86,354,355,120,356,180,96,97,98',
'99,125,179,101,102,165,103,353,166,330,363,400,284,39,55,56,57,58,59',
'60,61,62,79,401,63,54,64,65,66,77,67,68,69,83,186,186,186,349,343,344',
'402,167,347,345,348,326,40,41,186,346,82,70,71,72,74,76,75,342,351,352',
'73,78,80,168,322,186,170,84,85,81,86,354,355,171,356,172,96,97,98,99',
'2,3,4,40,41,113,353,40,41,40,41,40,41,55,56,57,58,59,60,61,62,79,178',
'63,54,64,65,66,77,67,68,69,83,40,41,181,349,343,344,40,41,347,345,348',
'40,41,40,41,346,82,70,71,72,74,76,75,342,351,352,73,78,80,354,355,184',
'356,84,85,81,86,-4,41,-242,187,33,189,117,353,-242,40,41,40,41,113,55',
'56,57,58,59,60,61,62,79,180,63,54,64,65,66,77,67,68,69,83,40,41,190',
'349,343,344,286,287,347,345,348,32,375,376,-104,346,82,70,71,72,74,76',
'75,342,351,352,73,78,80,354,355,-105,356,84,85,81,86,40,41,40,41,-106',
'39,-107,353,391,392,40,41,40,41,55,56,57,58,59,60,61,62,79,-108,63,54',
'64,65,66,77,67,68,69,83,40,41,-109,349,343,344,40,41,347,345,348,40',
'41,40,41,346,82,70,71,72,74,76,75,342,351,352,73,78,80,40,41,-110,-111',
'84,85,81,86,354,355,-112,356,-113,96,97,98,99,-114,48,-129,195,196,197',
'353,198,199,200,208,209,42,55,56,57,58,59,60,61,62,79,210,63,54,64,65',
'66,77,67,68,69,83,228,242,251,349,343,344,252,253,347,345,348,255,257',
'258,42,346,82,70,71,72,74,76,75,342,351,352,73,78,80,354,355,260,356',
'84,85,81,86,260,260,266,42,228,270,274,353,276,278,279,315,274,317,55',
'56,57,58,59,60,61,62,79,278,63,54,64,65,66,77,67,68,69,83,327,328,329',
'349,343,344,332,332,347,345,348,332,362,364,371,346,82,70,71,72,74,76',
'75,342,351,352,73,78,80,372,373,374,377,84,85,81,86,33,379,382,96,97',
'98,99,382,382,395,22,23,21,398,26,-219,25,399,30,406,131,132,133,134',
'135,136,137,138,142,16,139,130,140,141,66,77,67,68,69,83,407,32,408',
'410,415,28,416,156,417,157,159,418,415,,,,82,70,71,72,74,76,75,,,,73',
'78,80,,,,,84,85,81,86,33,,,96,97,98,99,,,,22,23,21,,26,,25,,30,,131',
'132,133,134,135,136,137,138,142,16,139,130,140,141,66,77,67,68,69,83',
',32,,,174,28,,177,,175,,,,,,,82,70,71,72,74,76,75,,,,73,78,80,176,,',
',84,85,81,86,33,,,96,97,98,99,,,,22,23,21,,26,-219,25,,30,,131,132,133',
'134,135,136,137,138,142,16,139,130,140,141,66,77,67,68,69,83,,32,,,',
'28,,156,,157,159,,,,,,82,70,71,72,74,76,75,,,,73,78,80,,,,,84,85,81',
'86,33,,,96,97,98,99,,,,22,23,21,,26,-219,25,,30,,131,132,133,134,135',
'136,137,138,142,16,139,130,140,141,66,77,67,68,69,83,,32,,,,28,,156',
',157,159,,,,,,82,70,71,72,74,76,75,,,,73,78,80,,,,,84,85,81,86,33,,',
'96,97,98,99,,,,22,23,21,,26,-219,25,,30,,131,132,133,134,135,136,137',
'138,142,16,139,130,140,141,66,77,67,68,69,83,,32,,,,28,,234,,,159,,',
',,,82,70,71,72,74,76,75,,,,73,78,80,,,,,84,85,81,86,33,,,96,97,98,99',
',,,22,23,21,,26,-219,25,,30,,131,132,133,134,135,136,137,138,142,16',
'139,130,140,141,66,77,67,68,69,83,,32,,,,28,,156,,157,159,,,,,,82,70',
'71,72,74,76,75,,,,73,78,80,,,,,84,85,81,86,33,,,96,97,98,99,,,,22,23',
'21,,26,-219,25,,30,,131,132,133,134,135,136,137,138,142,16,139,130,140',
'141,66,77,67,68,69,83,,32,,,,28,,234,,,159,,,,,,82,70,71,72,74,76,75',
',,,73,78,80,,,,,84,85,81,86,96,97,98,99,,,,90,89,91,,,,,,,,55,56,57',
'58,59,60,61,62,79,,63,54,64,65,66,77,67,68,69,83,,,,,,,,,192,,193,,',
',,,82,70,71,72,74,76,75,,95,94,73,78,80,,,,,84,85,81,86,96,97,98,99',
',,,90,89,91,,,,,,40,41,55,56,57,58,59,60,61,62,79,,63,54,64,65,66,77',
'67,68,69,83,194,,,,,,,,,,,,,,,,82,70,71,72,74,76,75,,95,94,73,78,80',
'96,97,98,99,84,85,81,86,,,,,,,,,,55,56,57,58,59,60,61,62,79,,63,54,64',
'65,66,77,67,68,69,83,192,,193,,,,,234,,,159,,,,,,82,70,71,72,74,76,75',
'192,,193,73,78,80,96,97,98,99,84,85,81,86,,,,,,,,40,41,55,56,57,58,59',
'60,61,62,79,,63,54,64,65,66,77,67,68,69,83,194,40,41,,,,,234,,,159,',
',,,,82,70,71,72,74,76,75,194,,,73,78,80,96,97,98,99,84,85,81,86,,,,',
',,,,,55,56,57,58,59,60,61,62,79,,63,54,64,65,66,77,67,68,69,83,192,',
'193,192,,193,192,,193,,,,,,,,82,70,71,72,74,76,75,,,,73,78,80,,,,,84',
'85,81,86,,,,,,,,40,41,,40,41,,40,41,-242,,33,,117,,-242,,,303,304,113',
',,194,,,194,,,194,,-242,,33,,117,,-242,,305,303,304,113,,,,,,300,299',
',,32,-242,,33,,117,,-242,,305,303,304,113,,,,291,,300,299,,174,32,,177',
',175,,,326,,305,,,,,,,314,,300,299,,33,32,,176,,322,323,319,320,321',
'22,23,21,324,26,,25,318,30,,8,12,19,20,9,10,13,14,15,16,17,18,11,27',
',,33,,,,,32,,,,28,22,23,21,,26,,25,45,30,,8,12,19,20,9,10,13,14,15,16',
'17,18,11,27,,,33,,,,,32,,,,28,22,23,21,,26,,25,,30,,8,12,19,20,9,10',
'13,14,15,16,17,18,11,27,,,33,,,,,32,,,,28,22,23,21,,26,,25,,30,,8,12',
'19,20,9,10,13,14,15,16,17,18,11,27,,,33,,,,,32,,,,28,22,23,21,,26,,25',
',30,,8,12,19,20,9,10,13,14,15,16,17,18,11,27,,,33,,,,,32,,,,28,22,23',
'21,,26,,25,,30,,8,12,19,20,9,10,13,14,15,16,17,18,11,27,,,33,,,,,32',
',,,28,22,23,21,,26,,25,,30,,8,12,19,20,9,10,13,14,15,16,17,18,11,27',
',,33,,,,,32,,,,28,22,23,21,,26,,25,,30,,8,12,19,20,9,10,13,14,15,16',
'17,18,11,27,,,33,,,,,32,,,,28,22,23,21,,26,,25,-246,30,,8,12,19,20,9',
'10,13,14,15,16,17,18,11,27,,,33,,,,,32,,,,28,22,23,21,,26,,25,,30,,8',
'12,19,20,9,10,13,14,15,16,17,18,11,27,,,33,,,,,32,,,,28,22,23,21,,26',
',25,,30,,8,12,19,20,9,10,13,14,15,16,17,18,11,27,,,33,,,,,32,,,,28,22',
'23,21,,26,,25,,30,,8,12,19,20,9,10,13,14,15,16,17,18,11,27,,,33,,,,',
'32,,,,28,22,23,21,,26,,25,,30,,8,12,19,20,9,10,13,14,15,16,17,18,11',
'27,,,33,,,,,32,,,,28,22,23,21,,26,,25,,30,,8,12,19,20,9,10,13,14,15',
'16,17,18,11,27,,,33,,,,,32,,,,28,22,23,21,,26,,25,,30,,8,12,19,20,9',
'10,13,14,15,16,17,18,11,27,,,33,,,,,32,,,,28,22,23,21,,26,,25,,30,,8',
'12,19,20,9,10,13,14,15,16,17,18,11,27,,,33,,,,,32,,,,28,22,23,21,,26',
',25,,30,,8,12,19,20,9,10,13,14,15,16,17,18,11,27,,,33,,,,,32,,,,28,22',
'23,21,,26,,25,,30,,8,12,19,20,9,10,13,14,15,16,17,18,11,27,,,33,,,,',
'32,,,,28,22,23,21,,26,,25,,30,,8,12,19,20,9,10,13,14,15,16,17,18,11',
'27,,,33,,,,,32,,,,28,22,23,21,,26,,25,,30,,8,12,19,20,9,10,13,14,15',
'16,17,18,11,27,,,33,,,,,32,,,,28,22,23,21,,26,,25,,30,,8,12,19,20,9',
'10,13,14,15,16,17,18,11,27,,,33,,,,,32,,,,28,22,23,21,,26,,25,,30,,8',
'12,19,20,9,10,13,14,15,16,17,18,11,27,,,33,,,,,32,,,,28,22,23,21,,26',
',25,,30,,8,12,19,20,9,10,13,14,15,16,17,18,11,27,,,33,,,,,32,,,,28,22',
'23,21,,26,,25,,30,,8,12,19,20,9,10,13,14,15,16,17,18,11,27,,,33,,,,',
'32,,,,28,22,23,21,,26,,25,,30,,8,12,19,20,9,10,13,14,15,16,17,18,11',
'27,,,33,,,,,32,,,,28,22,23,21,,26,,25,,30,,8,12,19,20,9,10,13,14,15',
'16,17,18,11,27,,,33,,,,,32,,,,28,22,23,21,,26,,25,,30,,8,12,19,20,9',
'10,13,14,15,16,17,18,11,27,,,33,,,,,32,,,,28,22,23,21,,26,,25,,30,,8',
'12,19,20,9,10,13,14,15,16,17,18,11,27,,,33,,,,,32,,,,28,22,23,21,,26',
',25,,30,,8,12,19,20,9,10,13,14,15,16,17,18,11,27,,,33,,,,,32,,,,28,22',
'23,21,,26,,25,,30,,8,12,19,20,9,10,13,14,15,16,17,18,11,27,,,33,,,,',
'32,,,,28,22,23,21,,26,,25,,30,,8,12,19,20,9,10,13,14,15,16,17,18,11',
'27,,,33,,,,,32,,,,28,22,23,21,,26,,25,,30,,8,12,19,20,9,10,13,14,15',
'16,17,18,11,27,,,33,,,,,32,,,,28,22,23,21,,26,,25,,30,,8,12,19,20,9',
'10,13,14,15,16,17,18,11,27,,,33,,,,,32,,,,28,22,23,21,,26,,25,,30,,8',
'12,19,20,9,10,13,14,15,16,17,18,11,27,,,33,,,,,32,,,,28,22,23,21,,26',
',25,,30,,8,12,19,20,9,10,13,14,15,16,17,18,11,27,,,33,,,,,32,,,,28,22',
'23,21,,26,,25,,30,,8,12,19,20,9,10,13,14,15,16,17,18,11,27,,,33,,,,',
'32,,,,28,22,23,21,,26,,25,,30,,8,12,19,20,9,10,13,14,15,16,17,18,11',
'27,,,33,,,,,32,,,,28,22,23,21,,26,,25,,30,,8,12,19,20,9,10,13,14,15',
'16,17,18,11,27,,,33,,,,,32,,,,28,22,23,21,,26,,25,,30,,8,12,19,20,9',
'10,13,14,15,16,17,18,11,27,,,33,,,,,32,,,,28,22,23,21,,26,,25,,30,,8',
'12,19,20,9,10,13,14,15,16,17,18,11,27,,,,,,,,32,,,,28' ]
        racc_action_table = arr = ::Array.new(3044, nil)
        idx = 0
        clist.each do |str|
          str.split(',', -1).each do |i|
            arr[idx] = i.to_i unless i.empty?
            idx += 1
          end
        end

clist = [
'326,326,48,326,1,280,5,177,218,7,325,382,28,219,220,326,24,219,325,382',
'44,44,326,326,326,326,326,326,326,326,326,248,326,326,326,326,326,326',
'326,326,326,326,270,48,28,326,326,326,177,218,326,326,326,280,219,220',
'276,326,326,326,326,326,326,326,326,326,326,326,326,326,326,47,248,123',
'27,326,326,326,326,333,333,278,333,270,333,333,333,333,32,119,35,322',
'323,324,333,160,208,276,123,47,47,333,333,333,333,333,333,333,333,333',
'183,333,333,333,333,333,333,333,333,333,333,119,278,51,333,333,333,160',
'208,333,333,333,322,323,324,183,333,333,333,333,333,333,333,333,333',
'333,333,333,333,333,6,6,51,271,333,333,333,333,334,334,36,334,116,334',
'334,334,334,46,116,31,31,87,31,334,89,307,331,387,271,6,334,334,334',
'334,334,334,334,334,334,388,334,334,334,334,334,334,334,334,334,334',
'307,331,387,334,334,334,389,90,334,334,334,313,169,169,388,334,334,334',
'334,334,334,334,334,334,334,334,334,334,334,91,313,389,93,334,334,334',
'334,335,335,94,335,95,335,335,335,335,0,0,0,188,188,113,335,212,212',
'213,213,214,214,335,335,335,335,335,335,335,335,335,115,335,335,335',
'335,335,335,335,335,335,335,215,215,117,335,335,335,216,216,335,335',
'335,217,217,223,223,335,335,335,335,335,335,335,335,335,335,335,335',
'335,335,359,359,120,359,335,335,335,335,34,121,34,124,34,127,34,359',
'34,224,224,225,225,34,359,359,359,359,359,359,359,359,359,128,359,359',
'359,359,359,359,359,359,359,359,267,267,129,359,359,359,273,273,359',
'359,359,34,350,350,130,359,359,359,359,359,359,359,359,359,359,359,359',
'359,359,377,377,131,377,359,359,359,359,360,360,361,361,132,34,133,377',
'374,374,380,380,383,383,377,377,377,377,377,377,377,377,377,134,377',
'377,377,377,377,377,377,377,377,377,385,385,135,377,377,377,394,394',
'377,377,377,409,409,411,411,377,377,377,377,377,377,377,377,377,377',
'377,377,377,377,412,412,136,137,377,377,377,377,390,390,138,390,139',
'390,390,390,390,140,141,142,145,146,148,390,150,153,154,161,162,163',
'390,390,390,390,390,390,390,390,390,164,390,390,390,390,390,390,390',
'390,390,390,190,206,221,390,390,390,222,227,390,390,390,232,243,244',
'245,390,390,390,390,390,390,390,390,390,390,390,390,390,390,417,417',
'246,417,390,390,390,390,247,249,250,254,257,259,260,417,261,262,264',
'282,284,285,417,417,417,417,417,417,417,417,417,289,417,417,417,417',
'417,417,417,417,417,417,303,304,305,417,417,417,319,320,417,417,417',
'321,329,332,336,417,417,417,417,417,417,417,417,417,417,417,417,417',
'417,337,338,340,358,417,417,417,417,49,362,366,49,49,49,49,368,370,381',
'49,49,49,384,49,49,49,386,49,391,49,49,49,49,49,49,49,49,49,49,49,49',
'49,49,49,49,49,49,49,49,392,49,393,397,403,49,405,49,408,49,49,414,418',
',,,49,49,49,49,49,49,49,,,,49,49,49,,,,,49,49,49,49,156,,,156,156,156',
'156,,,,156,156,156,,156,,156,,156,,156,156,156,156,156,156,156,156,156',
'156,156,156,156,156,156,156,156,156,156,156,,156,,,114,156,,114,,114',
',,,,,,156,156,156,156,156,156,156,,,,156,156,156,114,,,,156,156,156',
'156,196,,,196,196,196,196,,,,196,196,196,,196,196,196,,196,,196,196',
'196,196,196,196,196,196,196,196,196,196,196,196,196,196,196,196,196',
'196,,196,,,,196,,196,,196,196,,,,,,196,196,196,196,196,196,196,,,,196',
'196,196,,,,,196,196,196,196,197,,,197,197,197,197,,,,197,197,197,,197',
'197,197,,197,,197,197,197,197,197,197,197,197,197,197,197,197,197,197',
'197,197,197,197,197,197,,197,,,,197,,197,,197,197,,,,,,197,197,197,197',
'197,197,197,,,,197,197,197,,,,,197,197,197,197,198,,,198,198,198,198',
',,,198,198,198,,198,198,198,,198,,198,198,198,198,198,198,198,198,198',
'198,198,198,198,198,198,198,198,198,198,198,,198,,,,198,,198,,,198,',
',,,,198,198,198,198,198,198,198,,,,198,198,198,,,,,198,198,198,198,207',
',,207,207,207,207,,,,207,207,207,,207,207,207,,207,,207,207,207,207',
'207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,,207',
',,,207,,207,,207,207,,,,,,207,207,207,207,207,207,207,,,,207,207,207',
',,,,207,207,207,207,255,,,255,255,255,255,,,,255,255,255,,255,255,255',
',255,,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255',
'255,255,255,255,,255,,,,255,,255,,,255,,,,,,255,255,255,255,255,255',
'255,,,,255,255,255,,,,,255,255,255,255,30,30,30,30,,,,30,30,30,,,,,',
',,30,30,30,30,30,30,30,30,30,,30,30,30,30,30,30,30,30,30,30,,,,,,,,',
'143,,143,,,,,,30,30,30,30,30,30,30,,30,30,30,30,30,,,,,30,30,30,30,165',
'165,165,165,,,,165,165,165,,,,,,143,143,165,165,165,165,165,165,165',
'165,165,,165,165,165,165,165,165,165,165,165,165,143,,,,,,,,,,,,,,,',
'165,165,165,165,165,165,165,,165,165,165,165,165,199,199,199,199,165',
'165,165,165,,,,,,,,,,199,199,199,199,199,199,199,199,199,,199,199,199',
'199,199,199,199,199,199,199,201,,201,,,,,199,,,199,,,,,,199,199,199',
'199,199,199,199,203,,203,199,199,199,200,200,200,200,199,199,199,199',
',,,,,,,201,201,200,200,200,200,200,200,200,200,200,,200,200,200,200',
'200,200,200,200,200,200,201,203,203,,,,,200,,,200,,,,,,200,200,200,200',
'200,200,200,203,,,200,200,200,234,234,234,234,200,200,200,200,,,,,,',
',,,234,234,234,234,234,234,234,234,234,,234,234,234,234,234,234,234',
'234,234,234,204,,204,205,,205,238,,238,,,,,,,,234,234,234,234,234,234',
'234,,,,234,234,234,,,,,234,234,234,234,,,,,,,,204,204,,205,205,,238',
'238,277,,277,,277,,277,,,277,277,277,,,204,,,205,,,238,,281,,281,,281',
',281,,277,281,281,281,,,,,,277,277,,,277,288,,288,,288,,288,,281,288',
'288,288,,,,277,,281,281,,290,281,,290,,290,,,290,,288,,,,,,,281,,288',
'288,,2,288,,290,,290,290,290,290,290,2,2,2,290,2,,2,288,2,,2,2,2,2,2',
'2,2,2,2,2,2,2,2,2,,,25,,,,,2,,,,2,25,25,25,,25,,25,25,25,,25,25,25,25',
'25,25,25,25,25,25,25,25,25,25,,,26,,,,,25,,,,25,26,26,26,,26,,26,,26',
',26,26,26,26,26,26,26,26,26,26,26,26,26,26,,,40,,,,,26,,,,26,40,40,40',
',40,,40,,40,,40,40,40,40,40,40,40,40,40,40,40,40,40,40,,,41,,,,,40,',
',,40,41,41,41,,41,,41,,41,,41,41,41,41,41,41,41,41,41,41,41,41,41,41',
',,43,,,,,41,,,,41,43,43,43,,43,,43,,43,,43,43,43,43,43,43,43,43,43,43',
'43,43,43,43,,,53,,,,,43,,,,43,53,53,53,,53,,53,,53,,53,53,53,53,53,53',
'53,53,53,53,53,53,53,53,,,92,,,,,53,,,,53,92,92,92,,92,,92,,92,,92,92',
'92,92,92,92,92,92,92,92,92,92,92,92,,,125,,,,,92,,,,92,125,125,125,',
'125,,125,125,125,,125,125,125,125,125,125,125,125,125,125,125,125,125',
'125,,,157,,,,,125,,,,125,157,157,157,,157,,157,,157,,157,157,157,157',
'157,157,157,157,157,157,157,157,157,157,,,158,,,,,157,,,,157,158,158',
'158,,158,,158,,158,,158,158,158,158,158,158,158,158,158,158,158,158',
'158,158,,,159,,,,,158,,,,158,159,159,159,,159,,159,,159,,159,159,159',
'159,159,159,159,159,159,159,159,159,159,159,,,166,,,,,159,,,,159,166',
'166,166,,166,,166,,166,,166,166,166,166,166,166,166,166,166,166,166',
'166,166,166,,,167,,,,,166,,,,166,167,167,167,,167,,167,,167,,167,167',
'167,167,167,167,167,167,167,167,167,167,167,167,,,168,,,,,167,,,,167',
'168,168,168,,168,,168,,168,,168,168,168,168,168,168,168,168,168,168',
'168,168,168,168,,,170,,,,,168,,,,168,170,170,170,,170,,170,,170,,170',
'170,170,170,170,170,170,170,170,170,170,170,170,170,,,171,,,,,170,,',
',170,171,171,171,,171,,171,,171,,171,171,171,171,171,171,171,171,171',
'171,171,171,171,171,,,172,,,,,171,,,,171,172,172,172,,172,,172,,172',
',172,172,172,172,172,172,172,172,172,172,172,172,172,172,,,178,,,,,172',
',,,172,178,178,178,,178,,178,,178,,178,178,178,178,178,178,178,178,178',
'178,178,178,178,178,,,179,,,,,178,,,,178,179,179,179,,179,,179,,179',
',179,179,179,179,179,179,179,179,179,179,179,179,179,179,,,181,,,,,179',
',,,179,181,181,181,,181,,181,,181,,181,181,181,181,181,181,181,181,181',
'181,181,181,181,181,,,186,,,,,181,,,,181,186,186,186,,186,,186,,186',
',186,186,186,186,186,186,186,186,186,186,186,186,186,186,,,202,,,,,186',
',,,186,202,202,202,,202,,202,,202,,202,202,202,202,202,202,202,202,202',
'202,202,202,202,202,,,209,,,,,202,,,,202,209,209,209,,209,,209,,209',
',209,209,209,209,209,209,209,209,209,209,209,209,209,209,,,228,,,,,209',
',,,209,228,228,228,,228,,228,,228,,228,228,228,228,228,228,228,228,228',
'228,228,228,228,228,,,251,,,,,228,,,,228,251,251,251,,251,,251,,251',
',251,251,251,251,251,251,251,251,251,251,251,251,251,251,,,279,,,,,251',
',,,251,279,279,279,,279,,279,,279,,279,279,279,279,279,279,279,279,279',
'279,279,279,279,279,,,315,,,,,279,,,,279,315,315,315,,315,,315,,315',
',315,315,315,315,315,315,315,315,315,315,315,315,315,315,,,327,,,,,315',
',,,315,327,327,327,,327,,327,,327,,327,327,327,327,327,327,327,327,327',
'327,327,327,327,327,,,328,,,,,327,,,,327,328,328,328,,328,,328,,328',
',328,328,328,328,328,328,328,328,328,328,328,328,328,328,,,365,,,,,328',
',,,328,365,365,365,,365,,365,,365,,365,365,365,365,365,365,365,365,365',
'365,365,365,365,365,,,367,,,,,365,,,,365,367,367,367,,367,,367,,367',
',367,367,367,367,367,367,367,367,367,367,367,367,367,367,,,369,,,,,367',
',,,367,369,369,369,,369,,369,,369,,369,369,369,369,369,369,369,369,369',
'369,369,369,369,369,,,371,,,,,369,,,,369,371,371,371,,371,,371,,371',
',371,371,371,371,371,371,371,371,371,371,371,371,371,371,,,372,,,,,371',
',,,371,372,372,372,,372,,372,,372,,372,372,372,372,372,372,372,372,372',
'372,372,372,372,372,,,373,,,,,372,,,,372,373,373,373,,373,,373,,373',
',373,373,373,373,373,373,373,373,373,373,373,373,373,373,,,379,,,,,373',
',,,373,379,379,379,,379,,379,,379,,379,379,379,379,379,379,379,379,379',
'379,379,379,379,379,,,395,,,,,379,,,,379,395,395,395,,395,,395,,395',
',395,395,395,395,395,395,395,395,395,395,395,395,395,395,,,398,,,,,395',
',,,395,398,398,398,,398,,398,,398,,398,398,398,398,398,398,398,398,398',
'398,398,398,398,398,,,399,,,,,398,,,,398,399,399,399,,399,,399,,399',
',399,399,399,399,399,399,399,399,399,399,399,399,399,399,,,,,,,,399',
',,,399' ]
        racc_action_check = arr = ::Array.new(3044, nil)
        idx = 0
        clist.each do |str|
          str.split(',', -1).each do |i|
            arr[idx] = i.to_i unless i.empty?
            idx += 1
          end
        end

racc_action_pointer = [
   173,     4,  1590,   nil,   nil,     6,   103,   -42,   nil,   nil,
   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
   nil,   nil,   nil,   nil,    -4,  1626,  1662,    56,    -6,   nil,
  1140,   167,    84,   nil,   316,    14,   140,   nil,   nil,   nil,
  1698,  1734,   nil,  1770,   -27,   nil,   121,    52,    -2,   604,
   nil,   101,   nil,  1806,   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,   125,   nil,   119,
   152,   174,  1842,   188,   195,   197,   nil,   nil,   nil,   nil,
   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
   nil,   nil,   nil,   238,   694,   224,   160,   237,   nil,    71,
   308,   269,   nil,    52,   298,  1878,   nil,   302,   337,   333,
   320,   337,   347,   349,   366,   379,   408,   409,   416,   418,
   423,   450,   425,  1189,   nil,   426,   425,   nil,   426,   nil,
   428,   nil,   nil,   429,   430,   nil,   681,  1914,  1950,  1986,
    77,   455,   428,   428,   466,  1214,  2022,  2058,  2094,   165,
  2130,  2166,  2202,   nil,   nil,   nil,   nil,     3,  2238,  2274,
   nil,  2310,   nil,    89,   nil,   nil,  2346,   nil,   202,   nil,
   450,   nil,   nil,   nil,   nil,   nil,   758,   835,   912,  1280,
  1346,  1321,  2382,  1344,  1453,  1456,   478,   989,    78,  2418,
   nil,   nil,   206,   208,   210,   232,   238,   243,     4,     9,
    10,   446,   503,   245,   278,   280,   nil,   505,  2454,   nil,
   nil,   nil,   465,   nil,  1412,   nil,   nil,   nil,  1459,   nil,
   nil,   nil,   nil,   493,   490,   463,   511,   517,    27,   518,
   534,  2490,   nil,   nil,   489,  1066,   nil,   491,   nil,   483,
   464,   501,   500,   nil,   527,   nil,   nil,   303,   nil,   nil,
    38,   132,   nil,   279,   nil,   nil,    52,  1506,    77,  2526,
    -8,  1528,   528,   nil,   470,   548,   nil,   nil,  1550,   514,
  1537,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
   nil,   nil,   nil,   527,   528,   516,   nil,   154,   nil,   nil,
   nil,   nil,   nil,   168,   nil,  2562,   nil,   nil,   nil,   545,
   546,   550,    87,    88,    89,   -62,    -2,  2598,  2634,   572,
   nil,   155,   527,    77,   156,   235,   565,   580,   581,   nil,
   563,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
   311,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   546,   306,
   340,   342,   565,   nil,   nil,  2670,   592,  2706,   597,  2742,
   598,  2778,  2814,  2850,   363,   nil,   nil,   377,   nil,  2886,
   350,   573,     0,   352,   577,   374,   581,   156,   168,   185,
   456,   570,   591,   618,   380,  2922,   nil,   632,  2958,  2994,
   nil,   nil,   nil,   594,   nil,   610,   nil,   nil,   599,   385,
   nil,   387,   403,   nil,   612,   nil,   nil,   527,   602,   nil,
   nil ]

racc_action_default = [
  -248,  -248,  -242,    -6,   -15,  -248,    -4,  -157,  -160,  -161,
  -162,  -163,  -164,  -165,  -166,  -167,  -168,  -169,  -170,  -171,
  -172,  -173,  -174,  -175,  -176,  -242,  -242,  -248,   -80,  -184,
  -248,  -248,  -243,  -245,   -16,    -4,  -147,   421,    -1,    -5,
  -242,  -242,  -183,  -242,  -185,  -178,  -247,  -248,  -242,  -242,
  -182,  -248,  -204,  -242,  -104,  -105,  -106,  -107,  -108,  -109,
  -110,  -111,  -112,  -113,  -114,  -115,  -116,  -117,  -118,  -119,
  -120,  -121,  -122,  -123,  -124,  -125,  -126,  -127,  -128,  -129,
  -130,  -131,  -132,  -133,  -134,  -135,  -136,  -247,  -188,  -248,
  -248,  -248,  -242,  -248,  -248,  -248,  -199,  -200,  -201,  -202,
  -235,  -236,  -237,  -238,  -244,    -2,    -7,    -8,    -9,   -10,
   -11,   -12,   -13,   -16,  -248,  -248,  -248,  -248,    -3,   -80,
  -248,  -158,  -159,  -248,  -248,  -242,  -180,  -248,  -248,  -248,
  -170,  -160,  -164,  -171,  -172,  -161,  -162,  -165,  -166,  -169,
  -163,  -115,  -167,  -231,  -197,  -248,  -208,  -209,  -211,  -212,
  -214,  -215,  -218,  -221,  -223,  -224,  -242,  -242,  -242,  -242,
  -248,  -248,  -248,  -206,  -248,  -246,  -242,  -242,  -242,  -193,
  -242,  -242,  -242,   -17,   -14,   -14,   -14,  -242,  -242,  -242,
  -240,  -242,   -79,  -248,  -149,  -177,  -242,  -179,  -186,  -181,
   -81,  -225,  -232,  -233,  -234,  -198,  -242,  -242,  -242,  -219,
  -219,  -231,  -242,  -231,  -231,  -231,  -248,  -242,  -248,  -242,
  -187,  -189,  -190,  -191,  -192,  -194,  -195,  -196,  -242,  -242,
  -242,  -248,  -248,  -154,  -155,  -156,  -148,  -248,  -242,  -207,
  -215,  -210,  -217,  -213,  -248,  -220,  -222,  -226,  -231,  -227,
  -228,  -230,   -82,  -248,  -248,  -203,  -137,  -137,  -242,  -137,
  -248,  -242,  -241,  -150,  -205,  -242,  -229,  -248,   -83,   -19,
  -145,   -24,   -30,   -26,   -29,   -57,  -239,  -153,  -216,   -30,
  -242,  -248,  -139,  -142,  -146,   -30,  -242,   -16,  -242,  -242,
   -16,   -16,   -20,  -138,  -145,  -248,  -143,  -144,   -16,   -25,
   -71,   -23,   -31,   -32,   -33,   -34,   -35,   -36,   -37,   -38,
   -39,   -40,   -41,  -248,  -248,  -248,   -27,  -248,   -56,   -58,
   -59,   -60,   -61,   -71,   -18,  -242,  -140,  -141,   -22,   -42,
   -42,   -42,  -242,  -242,  -242,   -68,  -248,  -242,  -242,  -248,
   -28,  -248,  -248,  -248,  -248,  -248,   -62,   -64,   -66,   -69,
  -248,   -72,   -86,   -87,   -88,   -89,   -90,   -91,   -92,   -93,
   -94,   -97,   -98,   -99,  -100,  -101,  -102,  -103,  -129,  -248,
   -53,   -54,  -248,   -21,   -43,  -242,   -50,  -242,   -50,  -242,
   -50,  -242,  -242,  -242,   -73,   -95,   -96,  -248,  -151,  -242,
   -44,  -248,  -248,   -46,  -248,   -48,  -248,  -248,  -248,  -248,
  -248,  -248,  -248,  -248,   -55,  -242,   -51,  -248,  -242,  -242,
   -63,   -65,   -67,   -15,   -84,  -248,   -74,   -75,  -248,   -45,
   -52,   -47,   -49,   -70,   -76,   -77,   -85,  -248,   -15,  -152,
   -78 ]

racc_goto_table = [
     6,    93,   127,    46,    92,   116,   163,    88,   114,   191,
    50,   202,   206,   129,    38,   230,   124,   233,   264,   128,
   272,   123,   359,   262,    47,   232,   232,     1,   277,   366,
   368,   370,   235,   236,   413,   281,    34,    35,   121,   122,
   106,   288,   105,   118,   316,   269,   264,   143,   264,   420,
   381,   289,   384,   275,   386,   378,   306,   164,   259,   261,
   244,   265,   218,   219,   220,   310,   311,   237,   312,   239,
   240,   241,   249,   393,   268,   333,   334,   335,   280,   309,
   340,   390,   403,   232,   119,   162,   405,   173,   271,   202,
   169,   285,   336,   337,   338,   183,   221,    87,   231,   100,
   nil,   182,   nil,   nil,   256,   nil,   nil,   nil,   nil,   nil,
   nil,   nil,   nil,   419,   nil,   nil,   nil,   nil,   nil,   nil,
   nil,   nil,   nil,   188,   nil,   nil,   nil,   nil,   nil,   nil,
   nil,   nil,   nil,   nil,   nil,   nil,    93,   nil,   nil,    92,
   nil,   nil,   211,   nil,   nil,   nil,   nil,   nil,   222,   nil,
   nil,   nil,   nil,   nil,   201,   203,   204,   205,   nil,   nil,
   229,   nil,   245,   nil,   212,   213,   214,   nil,   215,   216,
   217,   243,   246,   247,   nil,   nil,   223,   224,   nil,   225,
   nil,   254,   nil,   nil,   188,   nil,   nil,   nil,   nil,   128,
   128,   250,   nil,   nil,   143,   143,   143,   nil,   nil,   nil,
   238,   nil,   nil,   nil,   nil,   143,   nil,   nil,   nil,   nil,
   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
   nil,   nil,   nil,   nil,   282,   nil,   nil,   nil,   nil,   nil,
   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
   nil,   128,   nil,   nil,   nil,   nil,   nil,   nil,   116,   267,
   nil,   nil,   116,   143,   313,   nil,   nil,   307,   nil,   116,
   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,   331,   nil,   nil,   nil,   357,   nil,   nil,
   nil,   nil,   nil,   nil,   357,   357,   357,   365,   367,   369,
   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
   nil,   nil,   nil,   nil,   nil,   360,   361,   nil,   nil,   nil,
   357,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   357,   387,
   388,   389,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
   nil,   357,   nil,   380,   404,   383,   nil,   385,   nil,   nil,
   nil,   nil,   nil,   nil,   nil,   nil,   nil,   394,   nil,   nil,
   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   357,   nil,
   nil,   nil,   nil,   409,   nil,   nil,   411,   412 ]

racc_goto_check = [
     2,    52,    16,    20,    34,    59,    60,    64,    15,    76,
    46,    65,    50,    48,     3,    71,    61,    71,    24,    59,
    54,    20,    35,    22,     2,    66,    66,     1,    19,    35,
    35,    35,    72,    72,    44,    19,     4,     5,     2,     2,
     6,    19,     3,     3,    54,    18,    24,     2,    24,    44,
    36,    22,    36,    21,    36,    35,    23,    61,    17,    17,
    50,    17,    13,    13,    13,    26,    27,    76,    32,    76,
    76,    76,    37,    35,    71,    33,    33,    33,    38,    39,
    40,    42,    43,    66,    45,    49,    35,    15,    53,    65,
     2,    56,    24,    24,    24,    57,    58,    63,    67,    77,
   nil,    46,   nil,   nil,    76,   nil,   nil,   nil,   nil,   nil,
   nil,   nil,   nil,    35,   nil,   nil,   nil,   nil,   nil,   nil,
   nil,   nil,   nil,     2,   nil,   nil,   nil,   nil,   nil,   nil,
   nil,   nil,   nil,   nil,   nil,   nil,    52,   nil,   nil,    34,
   nil,   nil,    64,   nil,   nil,   nil,   nil,   nil,    59,   nil,
   nil,   nil,   nil,   nil,     2,     2,     2,     2,   nil,   nil,
    48,   nil,    60,   nil,     2,     2,     2,   nil,     2,     2,
     2,    48,    16,    16,   nil,   nil,     2,     2,   nil,     2,
   nil,    60,   nil,   nil,     2,   nil,   nil,   nil,   nil,    59,
    59,    59,   nil,   nil,     2,     2,     2,   nil,   nil,   nil,
     2,   nil,   nil,   nil,   nil,     2,   nil,   nil,   nil,   nil,
   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
   nil,   nil,   nil,   nil,    16,   nil,   nil,   nil,   nil,   nil,
   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
   nil,    59,   nil,   nil,   nil,   nil,   nil,   nil,    59,     2,
   nil,   nil,    59,     2,    15,   nil,   nil,    20,   nil,    59,
   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,    20,   nil,   nil,   nil,    52,   nil,   nil,
   nil,   nil,   nil,   nil,    52,    52,    52,    34,    34,    34,
   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
   nil,   nil,   nil,   nil,   nil,     2,     2,   nil,   nil,   nil,
    52,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,    52,    20,
    20,    20,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
   nil,    52,   nil,     2,    34,     2,   nil,     2,   nil,   nil,
   nil,   nil,   nil,   nil,   nil,   nil,   nil,     2,   nil,   nil,
   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,    52,   nil,
   nil,   nil,   nil,     2,   nil,   nil,     2,     2 ]

racc_goto_pointer = [
   nil,    27,    -2,     8,    33,    33,     6,   nil,   nil,   nil,
   nil,   nil,   nil,  -112,   nil,   -26,   -46,  -188,  -214,  -234,
   -22,  -208,  -225,  -222,  -230,   nil,  -215,  -214,   nil,   nil,
   nil,   nil,  -212,  -244,   -26,  -304,  -316,  -148,  -187,  -201,
  -245,   nil,  -293,  -308,  -369,    48,   -18,   nil,   -36,    34,
  -148,   nil,   -29,  -172,  -240,   nil,  -182,   -25,   -81,   -29,
   -47,   -30,   nil,    67,   -23,  -145,  -172,   -99,   nil,   nil,
   nil,  -181,  -167,   nil,   nil,   nil,  -134,    68 ]

racc_goto_default = [
   nil,   nil,    44,   nil,   nil,   414,   302,   107,   108,   109,
   110,   111,   112,   nil,    36,   290,   115,   nil,   nil,   nil,
   nil,   nil,   nil,   263,    24,   292,   293,   294,   295,   296,
   297,   298,   301,   nil,   144,   nil,   nil,   nil,   nil,   nil,
   nil,   325,   nil,   nil,   nil,   nil,   nil,    51,   nil,   nil,
    52,   350,   145,   nil,   nil,   273,   nil,   nil,   nil,    31,
     7,   nil,    29,   nil,   nil,   158,   146,   147,   148,   149,
   150,   151,   152,   153,   154,   155,   nil,   nil ]

racc_reduce_table = [
  0, 0, :racc_error,
  3, 82, :_reduce_1,
  3, 82, :_reduce_2,
  3, 82, :_reduce_3,
  0, 84, :_reduce_none,
  1, 84, :_reduce_none,
  0, 85, :_reduce_6,
  2, 85, :_reduce_7,
  1, 87, :_reduce_none,
  1, 87, :_reduce_none,
  1, 87, :_reduce_none,
  1, 87, :_reduce_none,
  1, 87, :_reduce_none,
  1, 87, :_reduce_none,
  0, 94, :_reduce_14,
  0, 95, :_reduce_15,
  0, 96, :_reduce_16,
  2, 96, :_reduce_17,
  8, 93, :_reduce_18,
  0, 99, :_reduce_19,
  2, 99, :_reduce_20,
  5, 99, :_reduce_21,
  8, 92, :_reduce_22,
  7, 92, :_reduce_23,
  0, 102, :_reduce_24,
  2, 102, :_reduce_25,
  1, 103, :_reduce_26,
  3, 103, :_reduce_27,
  4, 104, :_reduce_28,
  1, 104, :_reduce_29,
  0, 100, :_reduce_30,
  2, 100, :_reduce_31,
  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_38,
  1, 106, :_reduce_39,
  1, 106, :_reduce_none,
  1, 106, :_reduce_none,
  0, 114, :_reduce_42,
  2, 114, :_reduce_43,
  5, 112, :_reduce_44,
  7, 112, :_reduce_45,
  5, 112, :_reduce_46,
  7, 112, :_reduce_47,
  5, 112, :_reduce_48,
  7, 112, :_reduce_49,
  0, 117, :_reduce_50,
  2, 117, :_reduce_51,
  3, 117, :_reduce_52,
  3, 111, :_reduce_53,
  3, 111, :_reduce_54,
  5, 111, :_reduce_55,
  7, 91, :_reduce_56,
  0, 119, :_reduce_57,
  2, 119, :_reduce_58,
  1, 120, :_reduce_59,
  1, 120, :_reduce_60,
  1, 120, :_reduce_none,
  3, 108, :_reduce_62,
  6, 108, :_reduce_63,
  3, 109, :_reduce_64,
  6, 109, :_reduce_65,
  3, 110, :_reduce_66,
  6, 110, :_reduce_67,
  0, 121, :_reduce_68,
  1, 121, :_reduce_69,
  7, 107, :_reduce_70,
  0, 122, :_reduce_none,
  2, 122, :_reduce_72,
  0, 123, :_reduce_73,
  2, 123, :_reduce_74,
  2, 123, :_reduce_75,
  1, 125, :_reduce_76,
  1, 125, :_reduce_77,
  3, 125, :_reduce_78,
  3, 86, :_reduce_79,
  0, 128, :_reduce_80,
  3, 128, :_reduce_81,
  3, 130, :_reduce_82,
  4, 130, :_reduce_83,
  1, 124, :_reduce_none,
  2, 124, :_reduce_85,
  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,
  2, 116, :_reduce_95,
  2, 116, :_reduce_96,
  1, 116, :_reduce_none,
  1, 116, :_reduce_none,
  1, 116, :_reduce_none,
  1, 132, :_reduce_none,
  1, 132, :_reduce_none,
  1, 132, :_reduce_none,
  1, 132, :_reduce_none,
  1, 133, :_reduce_none,
  1, 133, :_reduce_none,
  1, 133, :_reduce_none,
  1, 133, :_reduce_none,
  1, 133, :_reduce_none,
  1, 133, :_reduce_none,
  1, 133, :_reduce_none,
  1, 133, :_reduce_none,
  1, 133, :_reduce_none,
  1, 133, :_reduce_none,
  1, 133, :_reduce_none,
  1, 133, :_reduce_none,
  1, 133, :_reduce_none,
  1, 133, :_reduce_none,
  1, 133, :_reduce_none,
  1, 133, :_reduce_none,
  1, 133, :_reduce_none,
  1, 133, :_reduce_none,
  1, 133, :_reduce_none,
  1, 133, :_reduce_none,
  1, 133, :_reduce_none,
  1, 133, :_reduce_none,
  1, 133, :_reduce_none,
  1, 133, :_reduce_none,
  1, 133, :_reduce_none,
  1, 133, :_reduce_none,
  1, 133, :_reduce_none,
  1, 133, :_reduce_none,
  1, 133, :_reduce_none,
  1, 133, :_reduce_none,
  1, 133, :_reduce_none,
  1, 133, :_reduce_none,
  1, 133, :_reduce_none,
  0, 98, :_reduce_137,
  3, 98, :_reduce_138,
  1, 134, :_reduce_139,
  3, 134, :_reduce_140,
  3, 135, :_reduce_141,
  0, 137, :_reduce_142,
  1, 137, :_reduce_143,
  1, 137, :_reduce_144,
  0, 136, :_reduce_145,
  1, 136, :_reduce_146,
  0, 126, :_reduce_147,
  3, 126, :_reduce_148,
  1, 138, :_reduce_149,
  3, 138, :_reduce_150,
  4, 113, :_reduce_151,
  8, 113, :_reduce_152,
  5, 88, :_reduce_153,
  3, 89, :_reduce_154,
  3, 89, :_reduce_155,
  3, 90, :_reduce_156,
  1, 83, :_reduce_none,
  3, 83, :_reduce_158,
  3, 83, :_reduce_159,
  1, 141, :_reduce_160,
  1, 141, :_reduce_161,
  1, 141, :_reduce_162,
  1, 141, :_reduce_163,
  1, 141, :_reduce_164,
  1, 141, :_reduce_165,
  1, 141, :_reduce_166,
  1, 141, :_reduce_167,
  1, 141, :_reduce_168,
  1, 141, :_reduce_169,
  1, 141, :_reduce_170,
  1, 141, :_reduce_171,
  1, 141, :_reduce_172,
  1, 141, :_reduce_173,
  1, 141, :_reduce_174,
  1, 141, :_reduce_175,
  1, 141, :_reduce_176,
  4, 141, :_reduce_177,
  2, 141, :_reduce_178,
  4, 141, :_reduce_179,
  3, 141, :_reduce_180,
  4, 141, :_reduce_181,
  2, 141, :_reduce_182,
  2, 141, :_reduce_183,
  1, 141, :_reduce_none,
  1, 101, :_reduce_185,
  3, 101, :_reduce_186,
  4, 143, :_reduce_187,
  1, 144, :_reduce_188,
  3, 144, :_reduce_189,
  3, 145, :_reduce_190,
  3, 145, :_reduce_191,
  3, 145, :_reduce_192,
  2, 145, :_reduce_193,
  3, 145, :_reduce_194,
  3, 145, :_reduce_195,
  3, 145, :_reduce_196,
  1, 146, :_reduce_none,
  2, 146, :_reduce_198,
  1, 115, :_reduce_none,
  1, 115, :_reduce_none,
  1, 115, :_reduce_none,
  1, 115, :_reduce_none,
  4, 127, :_reduce_203,
  1, 127, :_reduce_204,
  5, 131, :_reduce_205,
  2, 131, :_reduce_206,
  3, 129, :_reduce_207,
  1, 129, :_reduce_208,
  1, 129, :_reduce_none,
  3, 148, :_reduce_210,
  1, 148, :_reduce_211,
  1, 148, :_reduce_none,
  3, 150, :_reduce_213,
  1, 150, :_reduce_214,
  1, 150, :_reduce_none,
  3, 152, :_reduce_216,
  1, 152, :_reduce_217,
  1, 152, :_reduce_none,
  0, 153, :_reduce_219,
  3, 153, :_reduce_220,
  1, 153, :_reduce_221,
  3, 153, :_reduce_222,
  1, 153, :_reduce_223,
  1, 153, :_reduce_224,
  2, 147, :_reduce_225,
  3, 149, :_reduce_226,
  3, 151, :_reduce_227,
  3, 154, :_reduce_228,
  4, 155, :_reduce_229,
  3, 156, :_reduce_230,
  0, 157, :_reduce_none,
  1, 157, :_reduce_none,
  1, 157, :_reduce_none,
  1, 157, :_reduce_none,
  2, 105, :_reduce_235,
  1, 158, :_reduce_none,
  1, 158, :_reduce_none,
  1, 158, :_reduce_none,
  2, 118, :_reduce_239,
  2, 97, :_reduce_240,
  2, 139, :_reduce_241,
  0, 140, :_reduce_242,
  1, 140, :_reduce_243,
  2, 140, :_reduce_244,
  1, 140, :_reduce_245,
  1, 142, :_reduce_none,
  0, 142, :_reduce_none ]

racc_reduce_n = 248

racc_shift_n = 421

racc_token_table = {
  false => 0,
  :error => 1,
  :tUIDENT => 2,
  :tLIDENT => 3,
  :tNAMESPACE => 4,
  :tINTERFACEIDENT => 5,
  :tGLOBALIDENT => 6,
  :tLKEYWORD => 7,
  :tUKEYWORD => 8,
  :tLKEYWORD_Q_E => 9,
  :tUKEYWORD_Q_E => 10,
  :tIVAR => 11,
  :tCLASSVAR => 12,
  :tANNOTATION => 13,
  :tSTRING => 14,
  :tSYMBOL => 15,
  :tINTEGER => 16,
  :tWRITE_ATTR => 17,
  :kLPAREN => 18,
  :kRPAREN => 19,
  :kLBRACKET => 20,
  :kRBRACKET => 21,
  :kLBRACE => 22,
  :kRBRACE => 23,
  :kVOID => 24,
  :kNIL => 25,
  :kTRUE => 26,
  :kFALSE => 27,
  :kANY => 28,
  :kUNTYPED => 29,
  :kTOP => 30,
  :kBOT => 31,
  :kSELF => 32,
  :kSELFQ => 33,
  :kINSTANCE => 34,
  :kCLASS => 35,
  :kBOOL => 36,
  :kSINGLETON => 37,
  :kTYPE => 38,
  :kDEF => 39,
  :kMODULE => 40,
  :kPRIVATE => 41,
  :kPUBLIC => 42,
  :kALIAS => 43,
  :kCOLON => 44,
  :kCOLON2 => 45,
  :kCOMMA => 46,
  :kBAR => 47,
  :kAMP => 48,
  :kHAT => 49,
  :kARROW => 50,
  :kQUESTION => 51,
  :kEXCLAMATION => 52,
  :kSTAR => 53,
  :kSTAR2 => 54,
  :kFATARROW => 55,
  :kEQ => 56,
  :kDOT => 57,
  :kDOT3 => 58,
  :kLT => 59,
  :kINTERFACE => 60,
  :kEND => 61,
  :kINCLUDE => 62,
  :kEXTEND => 63,
  :kATTRREADER => 64,
  :kATTRWRITER => 65,
  :kATTRACCESSOR => 66,
  :tOPERATOR => 67,
  :tQUOTEDMETHOD => 68,
  :tQUOTEDIDENT => 69,
  :kPREPEND => 70,
  :kEXTENSION => 71,
  :kINCOMPATIBLE => 72,
  :type_TYPE => 73,
  :type_SIGNATURE => 74,
  :type_METHODTYPE => 75,
  :tEOF => 76,
  :kOUT => 77,
  :kIN => 78,
  :kUNCHECKED => 79,
  :kOVERLOAD => 80 }

racc_nt_base = 81

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",
  "tUIDENT",
  "tLIDENT",
  "tNAMESPACE",
  "tINTERFACEIDENT",
  "tGLOBALIDENT",
  "tLKEYWORD",
  "tUKEYWORD",
  "tLKEYWORD_Q_E",
  "tUKEYWORD_Q_E",
  "tIVAR",
  "tCLASSVAR",
  "tANNOTATION",
  "tSTRING",
  "tSYMBOL",
  "tINTEGER",
  "tWRITE_ATTR",
  "kLPAREN",
  "kRPAREN",
  "kLBRACKET",
  "kRBRACKET",
  "kLBRACE",
  "kRBRACE",
  "kVOID",
  "kNIL",
  "kTRUE",
  "kFALSE",
  "kANY",
  "kUNTYPED",
  "kTOP",
  "kBOT",
  "kSELF",
  "kSELFQ",
  "kINSTANCE",
  "kCLASS",
  "kBOOL",
  "kSINGLETON",
  "kTYPE",
  "kDEF",
  "kMODULE",
  "kPRIVATE",
  "kPUBLIC",
  "kALIAS",
  "kCOLON",
  "kCOLON2",
  "kCOMMA",
  "kBAR",
  "kAMP",
  "kHAT",
  "kARROW",
  "kQUESTION",
  "kEXCLAMATION",
  "kSTAR",
  "kSTAR2",
  "kFATARROW",
  "kEQ",
  "kDOT",
  "kDOT3",
  "kLT",
  "kINTERFACE",
  "kEND",
  "kINCLUDE",
  "kEXTEND",
  "kATTRREADER",
  "kATTRWRITER",
  "kATTRACCESSOR",
  "tOPERATOR",
  "tQUOTEDMETHOD",
  "tQUOTEDIDENT",
  "kPREPEND",
  "kEXTENSION",
  "kINCOMPATIBLE",
  "type_TYPE",
  "type_SIGNATURE",
  "type_METHODTYPE",
  "tEOF",
  "kOUT",
  "kIN",
  "kUNCHECKED",
  "kOVERLOAD",
  "$start",
  "target",
  "type",
  "eof",
  "signatures",
  "method_type",
  "signature",
  "type_decl",
  "const_decl",
  "global_decl",
  "interface_decl",
  "module_decl",
  "class_decl",
  "start_new_scope",
  "start_merged_scope",
  "annotations",
  "class_name",
  "module_type_params",
  "super_class",
  "class_members",
  "type_list",
  "colon_module_self_types",
  "module_self_types",
  "module_self_type",
  "qualified_name",
  "class_member",
  "method_member",
  "include_member",
  "extend_member",
  "prepend_member",
  "var_type_member",
  "attribute_member",
  "alias_member",
  "attribute_kind",
  "keyword",
  "method_name",
  "attr_var_opt",
  "interface_name",
  "interface_members",
  "interface_member",
  "overload",
  "attributes",
  "method_kind",
  "def_name",
  "method_types",
  "type_params",
  "proc_type",
  "params_opt",
  "params",
  "block",
  "simple_function_type",
  "method_name0",
  "identifier_keywords",
  "module_type_params0",
  "module_type_param",
  "type_param_check",
  "type_param_variance",
  "type_params0",
  "type_alias_name",
  "namespace",
  "simple_type",
  "comma_opt",
  "record_type",
  "record_fields",
  "record_field",
  "keyword_name",
  "required_positional",
  "optional_positional_params",
  "optional_positional",
  "rest_positional_param",
  "rest_positional",
  "trailing_positional_params",
  "keyword_params",
  "required_keyword",
  "optional_keyword",
  "rest_keyword",
  "var_name_opt",
  "simple_name" ]

Racc_debug_parser = false

##### State transition tables end #####

# reduce 0 omitted

module_eval(<<'.,.,', 'parser.y', 28)
  def _reduce_1(val, _values, result)
            result = val[1]

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 31)
  def _reduce_2(val, _values, result)
            result = val[1]

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 34)
  def _reduce_3(val, _values, result)
            result = val[1]

    result
  end
.,.,

# reduce 4 omitted

# reduce 5 omitted

module_eval(<<'.,.,', 'parser.y', 40)
  def _reduce_6(val, _values, result)
     result = []
    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 42)
  def _reduce_7(val, _values, result)
            result = val[0].push(val[1])

    result
  end
.,.,

# reduce 8 omitted

# reduce 9 omitted

# reduce 10 omitted

# reduce 11 omitted

# reduce 12 omitted

# reduce 13 omitted

module_eval(<<'.,.,', 'parser.y', 53)
  def _reduce_14(val, _values, result)
     start_new_variables_scope
    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 54)
  def _reduce_15(val, _values, result)
     start_merged_variables_scope
    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 57)
  def _reduce_16(val, _values, result)
     result = []
    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 59)
  def _reduce_17(val, _values, result)
            result = val[1].unshift(Annotation.new(string: val[0].value, location: val[0].location))

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 64)
  def _reduce_18(val, _values, result)
            reset_variable_scope

        location = val[1].location + val[7].location
        result = Declarations::Class.new(
          name: val[3].value,
          type_params: val[4]&.value || Declarations::ModuleTypeParams.empty,
          super_class: val[5],
          members: val[6],
          annotations: val[0],
          location: location,
          comment: leading_comment(val[0].first&.location || location)
        )

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 79)
  def _reduce_19(val, _values, result)
     result = nil
    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 81)
  def _reduce_20(val, _values, result)
            result = Declarations::Class::Super.new(name: val[1].value,
                                                args: [],
                                                location: val[1].location)

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 86)
  def _reduce_21(val, _values, result)
            result = Declarations::Class::Super.new(name: val[1].value,
                                                args: val[3],
                                                location: val[1].location + val[4].location)

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 93)
  def _reduce_22(val, _values, result)
            reset_variable_scope

        location = val[1].location + val[7].location
        result = Declarations::Module.new(
          name: val[3].value,
          type_params: val[4]&.value || Declarations::ModuleTypeParams.empty,
          self_types: val[5],
          members: val[6],
          annotations: val[0],
          location: location,
          comment: leading_comment(val[0].first&.location || location)
        )

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 107)
  def _reduce_23(val, _values, result)
            reset_variable_scope

        location = val[1].location + val[6].location
        result = Declarations::Module.new(
          name: val[3].value,
          type_params: Declarations::ModuleTypeParams.empty,
          self_types: val[4],
          members: val[5],
          annotations: val[0],
          location: location,
          comment: leading_comment(val[0].first&.location || location)
        )

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 122)
  def _reduce_24(val, _values, result)
     result = []
    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 124)
  def _reduce_25(val, _values, result)
            result = val[1]

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 129)
  def _reduce_26(val, _values, result)
            result = [val[0]]

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 132)
  def _reduce_27(val, _values, result)
            result = val[0].push(val[2])

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 137)
  def _reduce_28(val, _values, result)
            name = val[0].value
        args = val[2]
        location = val[0].location + val[3].location

        case
        when name.class?
          result = Declarations::Module::Self.new(name: name, args: args, location: location)
        when name.interface?
          result = Declarations::Module::Self.new(name: name, args: args, location: location)
        else
          raise SemanticsError.new("Module self type should be instance or interface", subject: val[0], location: val[0].location)
        end

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 151)
  def _reduce_29(val, _values, result)
            name = val[0].value
        args = []
        location = val[0].location

        case
        when name.class?
          result = Declarations::Module::Self.new(name: name, args: args, location: location)
        when name.interface?
          result = Declarations::Module::Self.new(name: name, args: args, location: location)
        else
          raise SemanticsError.new("Module self type should be instance or interface", subject: val[0], location: val[0].location)
        end

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 166)
  def _reduce_30(val, _values, result)
     result = []
    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 168)
  def _reduce_31(val, _values, result)
            result = val[0].push(val[1])

    result
  end
.,.,

# reduce 32 omitted

# reduce 33 omitted

# reduce 34 omitted

# reduce 35 omitted

# reduce 36 omitted

# reduce 37 omitted

module_eval(<<'.,.,', 'parser.y', 179)
  def _reduce_38(val, _values, result)
            result = Members::Public.new(location: val[0].location)

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 182)
  def _reduce_39(val, _values, result)
            result = Members::Private.new(location: val[0].location)

    result
  end
.,.,

# reduce 40 omitted

# reduce 41 omitted

module_eval(<<'.,.,', 'parser.y', 188)
  def _reduce_42(val, _values, result)
     result = :instance
    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 189)
  def _reduce_43(val, _values, result)
     result = :singleton
    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 193)
  def _reduce_44(val, _values, result)
            location = val[1].location + val[4].location
        result = Members::AttrReader.new(name: val[3].value,
                                         ivar_name: nil,
                                         type: val[4],
                                         kind: val[2],
                                         annotations: val[0],
                                         location: location,
                                         comment: leading_comment(val[0].first&.location || location))

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 203)
  def _reduce_45(val, _values, result)
            location = val[1].location + val[6].location
        result = Members::AttrReader.new(name: val[3].value.to_sym,
                                         ivar_name: val[4],
                                         type: val[6],
                                         kind: val[2],
                                         annotations: val[0],
                                         location: location,
                                         comment: leading_comment(val[0].first&.location || location))

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 213)
  def _reduce_46(val, _values, result)
            location = val[1].location + val[4].location
        result = Members::AttrWriter.new(name: val[3].value,
                                         ivar_name: nil,
                                         kind: val[2],
                                         type: val[4],
                                         annotations: val[0],
                                         location: location,
                                         comment: leading_comment(val[0].first&.location || location))

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 223)
  def _reduce_47(val, _values, result)
            location = val[1].location + val[6].location
        result = Members::AttrWriter.new(name: val[3].value.to_sym,
                                         ivar_name: val[4],
                                         kind: val[2],
                                         type: val[6],
                                         annotations: val[0],
                                         location: location,
                                         comment: leading_comment(val[0].first&.location || location))

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 233)
  def _reduce_48(val, _values, result)
            location = val[1].location + val[4].location
        result = Members::AttrAccessor.new(name: val[3].value,
                                           ivar_name: nil,
                                           kind: val[2],
                                           type: val[4],
                                           annotations: val[0],
                                           location: location,
                                           comment: leading_comment(val[0].first&.location || location))

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 243)
  def _reduce_49(val, _values, result)
            location = val[1].location + val[6].location
        result = Members::AttrAccessor.new(name: val[3].value.to_sym,
                                           ivar_name: val[4],
                                           kind: val[2],
                                           type: val[6],
                                           annotations: val[0],
                                           location: location,
                                           comment: leading_comment(val[0].first&.location || location))

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 254)
  def _reduce_50(val, _values, result)
     result = nil
    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 255)
  def _reduce_51(val, _values, result)
     result = false
    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 256)
  def _reduce_52(val, _values, result)
     result = val[1].value
    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 260)
  def _reduce_53(val, _values, result)
            location = val[0].location + val[2].location
        result = Members::InstanceVariable.new(
          name: val[0].value,
          type: val[2],
          location: location,
          comment: leading_comment(location)
        )

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 269)
  def _reduce_54(val, _values, result)
            type = val[2]

        if type.is_a?(Types::Variable)
          type = Types::ClassInstance.new(
            name: TypeName.new(name: type.name, namespace: Namespace.empty),
            args: [],
            location: type.location
          )
        end

        location = val[0].location + val[2].location
        result = Members::ClassVariable.new(
          name: val[0].value,
          type: type,
          location: location,
          comment: leading_comment(location)
        )

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 288)
  def _reduce_55(val, _values, result)
          type = val[4]

      if type.is_a?(Types::Variable)
        type = Types::ClassInstance.new(
          name: TypeName.new(name: type.name, namespace: Namespace.empty),
          args: [],
          location: type.location
        )
      end

      location = val[0].location + val[4].location
      result = Members::ClassInstanceVariable.new(
        name: val[2].value,
        type: type,
        location: location,
        comment: leading_comment(location)
      )

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 309)
  def _reduce_56(val, _values, result)
            reset_variable_scope

        location = val[1].location + val[6].location
        result = Declarations::Interface.new(
          name: val[3].value,
          type_params: val[4]&.value || Declarations::ModuleTypeParams.empty,
          members: val[5],
          annotations: val[0],
          location: location,
          comment: leading_comment(val[0].first&.location || location)
        )

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 323)
  def _reduce_57(val, _values, result)
     result = []
    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 325)
  def _reduce_58(val, _values, result)
            result = val[0].push(val[1])

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 330)
  def _reduce_59(val, _values, result)
            unless val[0].kind == :instance
          raise SemanticsError.new("Interface cannot have singleton method", subject: val[0], location: val[0].location)
        end

        if val[0].types.last == :super
          raise SemanticsError.new("Interface method cannot have `super` type", subject: val[0], location: val[0].location)
        end

        result = val[0]

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 341)
  def _reduce_60(val, _values, result)
            unless val[0].name.interface?
          raise SemanticsError.new("Interface should include an interface", subject: val[0], location: val[0].location)
        end

        result = val[0]

    result
  end
.,.,

# reduce 61 omitted

module_eval(<<'.,.,', 'parser.y', 351)
  def _reduce_62(val, _values, result)
            if val[2].value.alias?
          raise SemanticsError.new("Should include module or interface", subject: val[2].value, location: val[2].location)
        end
        location = val[1].location + val[2].location
        result = Members::Include.new(name: val[2].value,
                                      args: [],
                                      annotations: val[0],
                                      location: location,
                                      comment: leading_comment(val[0].first&.location || location))

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 362)
  def _reduce_63(val, _values, result)
            if val[2].value.alias?
          raise SemanticsError.new("Should include module or interface", subject: val[2].value, location: val[2].location)
        end
        location = val[1].location + val[5].location
        result = Members::Include.new(name: val[2].value,
                                      args: val[4],
                                      annotations: val[0],
                                      location: location,
                                      comment: leading_comment(val[0].first&.location || location))

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 375)
  def _reduce_64(val, _values, result)
            if val[2].value.alias?
          raise SemanticsError.new("Should extend module or interface", subject: val[2].value, location: val[2].location)
        end
        location = val[1].location + val[2].location
        result = Members::Extend.new(name: val[2].value,
                                     args: [],
                                     annotations: val[0],
                                     location: location,
                                     comment: leading_comment(val[0].first&.location || location))

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 386)
  def _reduce_65(val, _values, result)
            if val[2].value.alias?
          raise SemanticsError.new("Should extend module or interface", subject: val[2].value, location: val[2].location)
        end
        location = val[1].location + val[5].location
        result = Members::Extend.new(name: val[2].value,
                                     args: val[4],
                                     annotations: val[0],
                                     location: location,
                                     comment: leading_comment(val[0].first&.location || location))

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 399)
  def _reduce_66(val, _values, result)
            unless val[2].value.class?
          raise SemanticsError.new("Should prepend module", subject: val[2].value, location: val[2].location)
        end
        location = val[1].location + val[2].location
        result = Members::Prepend.new(name: val[2].value,
                                      args: [],
                                      annotations: val[0],
                                      location: location,
                                      comment: leading_comment(val[0].first&.location || location))

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 410)
  def _reduce_67(val, _values, result)
            unless val[2].value.class?
          raise SemanticsError.new("Should prepend module", subject: val[2].value, location: val[2].location)
        end
        location = val[1].location + val[5].location
        result = Members::Prepend.new(name: val[2].value,
                                      args: val[4],
                                      annotations: val[0],
                                      location: location,
                                      comment: leading_comment(val[0].first&.location || location))

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 422)
  def _reduce_68(val, _values, result)
     result = nil
    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 424)
  def _reduce_69(val, _values, result)
            RBS.logger.warn "`overload def` syntax is deprecated. Use `...` syntax instead."
        result = val[0]

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 430)
  def _reduce_70(val, _values, result)
            location = val[3].location + val[6].last.location

        last_type = val[6].last
        if last_type.is_a?(LocatedValue) && last_type.value == :dot3
          overload = true
          val[6].pop
        else
          overload = false
        end

        result = Members::MethodDefinition.new(
          name: val[5].value,
          kind: val[4],
          types: val[6],
          annotations: val[0],
          location: location,
          comment: leading_comment(val[0].first&.location || val[2]&.location || val[3].location),
          overload: overload || !!val[2]
        )

    result
  end
.,.,

# reduce 71 omitted

module_eval(<<'.,.,', 'parser.y', 453)
  def _reduce_72(val, _values, result)
            RBS.logger.warn "`incompatible` method attribute is deprecated and ignored."

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 457)
  def _reduce_73(val, _values, result)
     result = :instance
    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 458)
  def _reduce_74(val, _values, result)
     result = :singleton
    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 459)
  def _reduce_75(val, _values, result)
     result = :singleton_instance
    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 462)
  def _reduce_76(val, _values, result)
     result = [val[0]]
    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 463)
  def _reduce_77(val, _values, result)
     result = [LocatedValue.new(value: :dot3, location: val[0].location)]
    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 465)
  def _reduce_78(val, _values, result)
            result = val[2].unshift(val[0])

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 470)
  def _reduce_79(val, _values, result)
            reset_variable_scope

        location = (val[1] || val[2]).location + val[2].location
        type_params = val[1]&.value || []

        type, block = val[2].value

        result = MethodType.new(type_params: type_params,
                                type: type,
                                block: block,
                                location: location)

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 484)
  def _reduce_80(val, _values, result)
     result = nil
    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 486)
  def _reduce_81(val, _values, result)
            result = LocatedValue.new(value: val[1], location: val[0].location + val[2].location)

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 491)
  def _reduce_82(val, _values, result)
            block = Types::Block.new(type: val[1].value, required: true)
        result = LocatedValue.new(value: block, location: val[0].location + val[2].location)

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 495)
  def _reduce_83(val, _values, result)
            block = Types::Block.new(type: val[2].value, required: false)
        result = LocatedValue.new(value: block, location: val[0].location + val[3].location)

    result
  end
.,.,

# reduce 84 omitted

module_eval(<<'.,.,', 'parser.y', 502)
  def _reduce_85(val, _values, result)
            result = LocatedValue.new(value: val[0].value.to_sym,
                                  location: val[0].location + val[1].location)

    result
  end
.,.,

# reduce 86 omitted

# reduce 87 omitted

# reduce 88 omitted

# reduce 89 omitted

# reduce 90 omitted

# reduce 91 omitted

# reduce 92 omitted

# reduce 93 omitted

# reduce 94 omitted

module_eval(<<'.,.,', 'parser.y', 511)
  def _reduce_95(val, _values, result)
            unless val[0].location.pred?(val[1].location)
          raise SyntaxError.new(token_str: "kQUESTION", error_value: val[1])
        end

        result = LocatedValue.new(value: "#{val[0].value}?",
                                  location: val[0].location + val[1].location)

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 519)
  def _reduce_96(val, _values, result)
            unless val[0].location.pred?(val[1].location)
          raise SyntaxError.new(token_str: "kEXCLAMATION", error_value: val[1])
        end

        result = LocatedValue.new(value: "#{val[0].value}!",
                                  location: val[0].location + val[1].location)

    result
  end
.,.,

# reduce 97 omitted

# reduce 98 omitted

# reduce 99 omitted

# reduce 100 omitted

# reduce 101 omitted

# reduce 102 omitted

# reduce 103 omitted

# reduce 104 omitted

# reduce 105 omitted

# reduce 106 omitted

# reduce 107 omitted

# reduce 108 omitted

# reduce 109 omitted

# reduce 110 omitted

# reduce 111 omitted

# reduce 112 omitted

# reduce 113 omitted

# reduce 114 omitted

# reduce 115 omitted

# reduce 116 omitted

# reduce 117 omitted

# reduce 118 omitted

# reduce 119 omitted

# reduce 120 omitted

# reduce 121 omitted

# reduce 122 omitted

# reduce 123 omitted

# reduce 124 omitted

# reduce 125 omitted

# reduce 126 omitted

# reduce 127 omitted

# reduce 128 omitted

# reduce 129 omitted

# reduce 130 omitted

# reduce 131 omitted

# reduce 132 omitted

# reduce 133 omitted

# reduce 134 omitted

# reduce 135 omitted

# reduce 136 omitted

module_eval(<<'.,.,', 'parser.y', 539)
  def _reduce_137(val, _values, result)
     result = nil
    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 541)
  def _reduce_138(val, _values, result)
            val[1].each {|p| insert_bound_variable(p.name) }

        result = LocatedValue.new(value: val[1], location: val[0].location + val[2].location)

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 548)
  def _reduce_139(val, _values, result)
            result = Declarations::ModuleTypeParams.new()
        result.add(val[0])

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 552)
  def _reduce_140(val, _values, result)
            result = val[0].add(val[2])

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 557)
  def _reduce_141(val, _values, result)
            result = Declarations::ModuleTypeParams::TypeParam.new(name: val[2].value.to_sym,
                                                               variance: val[1],
                                                               skip_validation: val[0])

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 563)
  def _reduce_142(val, _values, result)
     result = :invariant
    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 564)
  def _reduce_143(val, _values, result)
     result = :covariant
    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 565)
  def _reduce_144(val, _values, result)
     result = :contravariant
    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 568)
  def _reduce_145(val, _values, result)
     result = false
    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 569)
  def _reduce_146(val, _values, result)
     result = true
    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 572)
  def _reduce_147(val, _values, result)
     result = nil
    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 574)
  def _reduce_148(val, _values, result)
            val[1].each {|var| insert_bound_variable(var) }

        result = LocatedValue.new(value: val[1],
                                  location: val[0].location + val[2].location)

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 582)
  def _reduce_149(val, _values, result)
            result = [val[0].value.to_sym]

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 585)
  def _reduce_150(val, _values, result)
            result = val[0].push(val[2].value.to_sym)

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 590)
  def _reduce_151(val, _values, result)
            location = val[1].location + val[3].location
        result = Members::Alias.new(
          new_name: val[2].value.to_sym,
          old_name: val[3].value.to_sym,
          kind: :instance,
          annotations: val[0],
          location: location,
          comment: leading_comment(val[0].first&.location || location)
        )

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 601)
  def _reduce_152(val, _values, result)
            location = val[1].location + val[7].location
        result = Members::Alias.new(
          new_name: val[4].value.to_sym,
          old_name: val[7].value.to_sym,
          kind: :singleton,
          annotations: val[0],
          location: location,
          comment: leading_comment(val[0].first&.location || location)
        )

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 614)
  def _reduce_153(val, _values, result)
            location = val[1].location + val[4].location
        result = Declarations::Alias.new(name: val[2].value,
                                         type: val[4],
                                         annotations: val[0],
                                         location: location,
                                         comment: leading_comment(val[0].first&.location || location))

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 624)
  def _reduce_154(val, _values, result)
            location = val[0].location + val[2].location
        result = Declarations::Constant.new(name: val[0].value,
                                            type: val[2],
                                            location: location,
                                            comment: leading_comment(location))

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 631)
  def _reduce_155(val, _values, result)
            location = (val[0] || val[1]).location + val[2].location
        name = TypeName.new(name: val[1].value, namespace: val[0]&.value || Namespace.empty)
        result = Declarations::Constant.new(name: name,
                                            type: val[2],
                                            location: location,
                                            comment: leading_comment(location))

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 641)
  def _reduce_156(val, _values, result)
            location = val[0].location + val[2].location
        result = Declarations::Global.new(name: val[0].value.to_sym,
                                          type: val[2],
                                          location: location,
                                          comment: leading_comment(location))

    result
  end
.,.,

# reduce 157 omitted

module_eval(<<'.,.,', 'parser.y', 651)
  def _reduce_158(val, _values, result)
            types = case l = val[0]
                when Types::Union
                  l.types + [val[2]]
                else
                  [l, val[2]]
                end

        result = Types::Union.new(types: types, location: val[0].location + val[2].location)

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 661)
  def _reduce_159(val, _values, result)
            types = case l = val[0]
                when Types::Intersection
                  l.types + [val[2]]
                else
                  [l, val[2]]
                end

        result = Types::Intersection.new(types: types,
                                         location: val[0].location + val[2].location)

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 674)
  def _reduce_160(val, _values, result)
            result = Types::Bases::Void.new(location: val[0].location)

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 677)
  def _reduce_161(val, _values, result)
            RBS.logger.warn "`any` type is deprecated. Use `untyped` instead. (#{val[0].location.to_s})"
        result = Types::Bases::Any.new(location: val[0].location)

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 681)
  def _reduce_162(val, _values, result)
            result = Types::Bases::Any.new(location: val[0].location)

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 684)
  def _reduce_163(val, _values, result)
            result = Types::Bases::Bool.new(location: val[0].location)

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 687)
  def _reduce_164(val, _values, result)
            result = Types::Bases::Nil.new(location: val[0].location)

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 690)
  def _reduce_165(val, _values, result)
            result = Types::Bases::Top.new(location: val[0].location)

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 693)
  def _reduce_166(val, _values, result)
            result = Types::Bases::Bottom.new(location: val[0].location)

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 696)
  def _reduce_167(val, _values, result)
            result = Types::Bases::Self.new(location: val[0].location)

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 699)
  def _reduce_168(val, _values, result)
            result = Types::Optional.new(type: Types::Bases::Self.new(location: val[0].location),
                                     location: val[0].location)

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 703)
  def _reduce_169(val, _values, result)
            result = Types::Bases::Instance.new(location: val[0].location)

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 706)
  def _reduce_170(val, _values, result)
            result = Types::Bases::Class.new(location: val[0].location)

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 709)
  def _reduce_171(val, _values, result)
            result = Types::Literal.new(literal: true, location: val[0].location)

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 712)
  def _reduce_172(val, _values, result)
            result = Types::Literal.new(literal: false, location: val[0].location)

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 715)
  def _reduce_173(val, _values, result)
            result = Types::Literal.new(literal: val[0].value, location: val[0].location)

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 718)
  def _reduce_174(val, _values, result)
            result = Types::Literal.new(literal: val[0].value, location: val[0].location)

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 721)
  def _reduce_175(val, _values, result)
            result = Types::Literal.new(literal: val[0].value, location: val[0].location)

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 724)
  def _reduce_176(val, _values, result)
            name = val[0].value
        args = []
        location = val[0].location

        case
        when name.class?
          if is_bound_variable?(name.name)
            result = Types::Variable.new(name: name.name, location: location)
          else
            result = Types::ClassInstance.new(name: name, args: args, location: location)
          end
        when name.alias?
          result = Types::Alias.new(name: name, location: location)
        when name.interface?
          result = Types::Interface.new(name: name, args: args, location: location)
        end

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 742)
  def _reduce_177(val, _values, result)
            name = val[0].value
        args = val[2]
        location = val[0].location + val[3].location

        case
        when name.class?
          if is_bound_variable?(name.name)
            raise SemanticsError.new("#{name.name} is type variable and cannot be applied", subject: name, location: location)
          end
          result = Types::ClassInstance.new(name: name, args: args, location: location)
        when name.interface?
          result = Types::Interface.new(name: name, args: args, location: location)
        else
          raise SyntaxError.new(token_str: "kLBRACKET", error_value: val[1])
        end

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 759)
  def _reduce_178(val, _values, result)
            location = val[0].location + val[1].location
        result = Types::Tuple.new(types: [], location: location)

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 763)
  def _reduce_179(val, _values, result)
            location = val[0].location + val[3].location
        types = val[1]
        result = Types::Tuple.new(types: types, location: location)

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 768)
  def _reduce_180(val, _values, result)
            type = val[1].dup
        type.instance_eval do
          @location = val[0].location + val[2].location
        end
        result = type

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 775)
  def _reduce_181(val, _values, result)
            result = Types::ClassSingleton.new(name: val[2].value,
                                           location: val[0].location + val[3].location)

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 779)
  def _reduce_182(val, _values, result)
            type, block = val[1].value
        result = Types::Proc.new(type: type, block: block, location: val[0].location + val[1].location)

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 783)
  def _reduce_183(val, _values, result)
            result = Types::Optional.new(type: val[0], location: val[0].location + val[1].location)

    result
  end
.,.,

# reduce 184 omitted

module_eval(<<'.,.,', 'parser.y', 789)
  def _reduce_185(val, _values, result)
            result = [val[0]]

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 792)
  def _reduce_186(val, _values, result)
            result = val[0] + [val[2]]

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 797)
  def _reduce_187(val, _values, result)
            result = Types::Record.new(
          fields: val[1],
          location: val[0].location + val[3].location
        )

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 805)
  def _reduce_188(val, _values, result)
            result = val[0]

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 808)
  def _reduce_189(val, _values, result)
            result = val[0].merge!(val[2])

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 813)
  def _reduce_190(val, _values, result)
            result = { val[0].value => val[2] }

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 816)
  def _reduce_191(val, _values, result)
            result = { val[0].value => val[2] }

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 819)
  def _reduce_192(val, _values, result)
            result = { val[0].value => val[2] }

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 822)
  def _reduce_193(val, _values, result)
            result = { val[0].value => val[1] }

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 825)
  def _reduce_194(val, _values, result)
            result = { val[0].value => val[2] }

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 828)
  def _reduce_195(val, _values, result)
            result = { val[0].value => val[2] }

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 831)
  def _reduce_196(val, _values, result)
            result = { val[0].value => val[2] }

    result
  end
.,.,

# reduce 197 omitted

module_eval(<<'.,.,', 'parser.y', 837)
  def _reduce_198(val, _values, result)
            result = val[0]

    result
  end
.,.,

# reduce 199 omitted

# reduce 200 omitted

# reduce 201 omitted

# reduce 202 omitted

module_eval(<<'.,.,', 'parser.y', 844)
  def _reduce_203(val, _values, result)
            location = (val[0] || val[1] || val[2]).location + val[3].location

        params = val[0]&.value || [[], [], nil, [], {}, {}, nil]

        type = Types::Function.new(
          required_positionals: params[0],
          optional_positionals: params[1],
          rest_positionals: params[2],
          trailing_positionals: params[3],
          required_keywords: params[4],
          optional_keywords: params[5],
          rest_keywords: params[6],
          return_type: val[3]
        )

        block = val[1].value

        result = LocatedValue.new(value: [type, block], location: location)

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 864)
  def _reduce_204(val, _values, result)
            result = LocatedValue.new(value: [val[0].value, nil], location: val[0].location)

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 869)
  def _reduce_205(val, _values, result)
            location = val[0].location + val[4].location
        type = Types::Function.new(
          required_positionals: val[1][0],
          optional_positionals: val[1][1],
          rest_positionals: val[1][2],
          trailing_positionals: val[1][3],
          required_keywords: val[1][4],
          optional_keywords: val[1][5],
          rest_keywords: val[1][6],
          return_type: val[4],
        )

        result = LocatedValue.new(value: type, location: location)

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 884)
  def _reduce_206(val, _values, result)
            location = val[0].location + val[1].location
        type = Types::Function.new(
          required_positionals: [],
          optional_positionals: [],
          rest_positionals: nil,
          trailing_positionals: [],
          required_keywords: {},
          optional_keywords: {},
          rest_keywords: nil,
          return_type: val[1]
        )

        result = LocatedValue.new(value: type, location: location)

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 901)
  def _reduce_207(val, _values, result)
            result = val[2]
        result[0].unshift(val[0])

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 905)
  def _reduce_208(val, _values, result)
            result = empty_params_result
        result[0].unshift(val[0])

    result
  end
.,.,

# reduce 209 omitted

module_eval(<<'.,.,', 'parser.y', 912)
  def _reduce_210(val, _values, result)
            result = val[2]
        result[1].unshift(val[0])

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 916)
  def _reduce_211(val, _values, result)
            result = empty_params_result
        result[1].unshift(val[0])

    result
  end
.,.,

# reduce 212 omitted

module_eval(<<'.,.,', 'parser.y', 923)
  def _reduce_213(val, _values, result)
            result = val[2]
        result[2] = val[0]

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 927)
  def _reduce_214(val, _values, result)
            result = empty_params_result
        result[2] = val[0]

    result
  end
.,.,

# reduce 215 omitted

module_eval(<<'.,.,', 'parser.y', 934)
  def _reduce_216(val, _values, result)
            result = val[2]
        result[3].unshift(val[0])

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 938)
  def _reduce_217(val, _values, result)
            result = empty_params_result
        result[3].unshift(val[0])

    result
  end
.,.,

# reduce 218 omitted

module_eval(<<'.,.,', 'parser.y', 945)
  def _reduce_219(val, _values, result)
            result = empty_params_result

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 948)
  def _reduce_220(val, _values, result)
            result = val[2]
        result[4].merge!(val[0])

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 952)
  def _reduce_221(val, _values, result)
            result = empty_params_result
        result[4].merge!(val[0])

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 956)
  def _reduce_222(val, _values, result)
            result = val[2]
        result[5].merge!(val[0])

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 960)
  def _reduce_223(val, _values, result)
            result = empty_params_result
        result[5].merge!(val[0])

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 964)
  def _reduce_224(val, _values, result)
            result = empty_params_result
        result[6] = val[0]

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 970)
  def _reduce_225(val, _values, result)
            result = Types::Function::Param.new(type: val[0],
                                            name: val[1]&.value&.to_sym)

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 976)
  def _reduce_226(val, _values, result)
            result = Types::Function::Param.new(type: val[1],
                                            name: val[2]&.value&.to_sym)

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 982)
  def _reduce_227(val, _values, result)
            result = Types::Function::Param.new(type: val[1],
                                            name: val[2]&.value&.to_sym)

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 988)
  def _reduce_228(val, _values, result)
            param = Types::Function::Param.new(type: val[1],
                                           name: val[2]&.value&.to_sym)
        result = { val[0].value => param }

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 995)
  def _reduce_229(val, _values, result)
            param = Types::Function::Param.new(type: val[2],
                                           name: val[3]&.value&.to_sym)
        result = { val[1].value => param }

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 1002)
  def _reduce_230(val, _values, result)
            result = Types::Function::Param.new(type: val[1],
                                            name: val[2]&.value&.to_sym)

    result
  end
.,.,

# reduce 231 omitted

# reduce 232 omitted

# reduce 233 omitted

# reduce 234 omitted

module_eval(<<'.,.,', 'parser.y', 1011)
  def _reduce_235(val, _values, result)
            namespace = val[0]&.value || Namespace.empty
        name = val[1].value.to_sym
        type_name = TypeName.new(namespace: namespace, name: name)
        location = (loc0 = val[0]&.location) ? loc0 + val[1].location : val[1].location
        result = LocatedValue.new(value: type_name, location: location)

    result
  end
.,.,

# reduce 236 omitted

# reduce 237 omitted

# reduce 238 omitted

module_eval(<<'.,.,', 'parser.y', 1023)
  def _reduce_239(val, _values, result)
            namespace = val[0]&.value || Namespace.empty
        name = val[1].value.to_sym
        type_name = TypeName.new(namespace: namespace, name: name)
        location = (loc0 = val[0]&.location) ? loc0 + val[1].location : val[1].location
        result = LocatedValue.new(value: type_name, location: location)

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 1032)
  def _reduce_240(val, _values, result)
            namespace = val[0]&.value || Namespace.empty
        name = val[1].value.to_sym
        type_name = TypeName.new(namespace: namespace, name: name)
        location = (loc0 = val[0]&.location) ? loc0 + val[1].location : val[1].location
        result = LocatedValue.new(value: type_name, location: location)

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 1041)
  def _reduce_241(val, _values, result)
            namespace = val[0]&.value || Namespace.empty
        name = val[1].value.to_sym
        type_name = TypeName.new(namespace: namespace, name: name)
        location = (loc0 = val[0]&.location) ? loc0 + val[1].location : val[1].location
        result = LocatedValue.new(value: type_name, location: location)

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 1051)
  def _reduce_242(val, _values, result)
            result = nil

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 1054)
  def _reduce_243(val, _values, result)
            result = LocatedValue.new(value: Namespace.root, location: val[0].location)

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 1057)
  def _reduce_244(val, _values, result)
            namespace = Namespace.parse(val[1].value).absolute!
        result = LocatedValue.new(value: namespace, location: val[0].location + val[1].location)

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 1061)
  def _reduce_245(val, _values, result)
            namespace = Namespace.parse(val[0].value)
        result = LocatedValue.new(value: namespace, location: val[0].location)

    result
  end
.,.,

# reduce 246 omitted

# reduce 247 omitted

def _reduce_none(val, _values, result)
  val[0]
end

  end   # class Parser
end   # module RBS


