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

###### racc/parser.rb begin
unless $".find {|p| p.end_with?('/racc/parser.rb')}
$".push "#{__dir__}/racc/parser.rb"
self.class.module_eval(<<'...end racc/parser.rb/module_eval...', 'racc/parser.rb', 1)
#--
# Copyright (c) 1999-2006 Minero Aoki
#
# This program is free software.
# You can distribute/modify this program under the same terms of ruby.
#
# As a special exception, when this code is copied by Racc
# into a Racc output file, you may use that output file
# without restriction.
#++

unless $".find {|p| p.end_with?('/racc/info.rb')}
$".push "#{__dir__}/racc/info.rb"

module Racc
  VERSION   = '1.8.1'
  Version = VERSION
  Copyright = 'Copyright (c) 1999-2006 Minero Aoki'
end

end


module Racc
  class ParseError < StandardError; end
end
unless defined?(::ParseError)
  ParseError = Racc::ParseError # :nodoc:
end

# Racc is an LALR(1) parser generator.
# It is written in Ruby itself, and generates Ruby programs.
#
# == Command-line Reference
#
#     racc [-o<var>filename</var>] [--output-file=<var>filename</var>]
#          [-e<var>rubypath</var>] [--executable=<var>rubypath</var>]
#          [-v] [--verbose]
#          [-O<var>filename</var>] [--log-file=<var>filename</var>]
#          [-g] [--debug]
#          [-E] [--embedded]
#          [-l] [--no-line-convert]
#          [-c] [--line-convert-all]
#          [-a] [--no-omit-actions]
#          [-C] [--check-only]
#          [-S] [--output-status]
#          [--version] [--copyright] [--help] <var>grammarfile</var>
#
# [+grammarfile+]
#   Racc grammar file. Any extension is permitted.
# [-o+outfile+, --output-file=+outfile+]
#   A filename for output. default is <+filename+>.tab.rb
# [-O+filename+, --log-file=+filename+]
#   Place logging output in file +filename+.
#   Default log file name is <+filename+>.output.
# [-e+rubypath+, --executable=+rubypath+]
#   output executable file(mode 755). where +path+ is the Ruby interpreter.
# [-v, --verbose]
#   verbose mode. create +filename+.output file, like yacc's y.output file.
# [-g, --debug]
#   add debug code to parser class. To display debugging information,
#   use this '-g' option and set @yydebug true in parser class.
# [-E, --embedded]
#   Output parser which doesn't need runtime files (racc/parser.rb).
# [-F, --frozen]
#   Output parser which declares frozen_string_literals: true
# [-C, --check-only]
#   Check syntax of racc grammar file and quit.
# [-S, --output-status]
#   Print messages time to time while compiling.
# [-l, --no-line-convert]
#   turns off line number converting.
# [-c, --line-convert-all]
#   Convert line number of actions, inner, header and footer.
# [-a, --no-omit-actions]
#   Call all actions, even if an action is empty.
# [--version]
#   print Racc version and quit.
# [--copyright]
#   Print copyright and quit.
# [--help]
#   Print usage and quit.
#
# == Generating Parser Using Racc
#
# To compile Racc grammar file, simply type:
#
#   $ racc parse.y
#
# This creates Ruby script file "parse.tab.y". The -o option can change the output filename.
#
# == Writing A Racc Grammar File
#
# If you want your own parser, you have to write a grammar file.
# A grammar file contains the name of your parser class, grammar for the parser,
# user code, and anything else.
# When writing a grammar file, yacc's knowledge is helpful.
# If you have not used yacc before, Racc is not too difficult.
#
# Here's an example Racc grammar file.
#
#   class Calcparser
#   rule
#     target: exp { print val[0] }
#
#     exp: exp '+' exp
#        | exp '*' exp
#        | '(' exp ')'
#        | NUMBER
#   end
#
# Racc grammar files resemble yacc files.
# But (of course), this is Ruby code.
# yacc's $$ is the 'result', $0, $1... is
# an array called 'val', and $-1, $-2... is an array called '_values'.
#
# See the {Grammar File Reference}[rdoc-ref:lib/racc/rdoc/grammar.en.rdoc] for
# more information on grammar files.
#
# == Parser
#
# Then you must prepare the parse entry method. There are two types of
# parse methods in Racc, Racc::Parser#do_parse and Racc::Parser#yyparse
#
# Racc::Parser#do_parse is simple.
#
# It's yyparse() of yacc, and Racc::Parser#next_token is yylex().
# This method must returns an array like [TOKENSYMBOL, ITS_VALUE].
# EOF is [false, false].
# (TOKENSYMBOL is a Ruby symbol (taken from String#intern) by default.
# If you want to change this, see the grammar reference.
#
# Racc::Parser#yyparse is little complicated, but useful.
# It does not use Racc::Parser#next_token, instead it gets tokens from any iterator.
#
# For example, <code>yyparse(obj, :scan)</code> causes
# calling +obj#scan+, and you can return tokens by yielding them from +obj#scan+.
#
# == Debugging
#
# When debugging, "-v" or/and the "-g" option is helpful.
#
# "-v" creates verbose log file (.output).
# "-g" creates a "Verbose Parser".
# Verbose Parser prints the internal status when parsing.
# But it's _not_ automatic.
# You must use -g option and set +@yydebug+ to +true+ in order to get output.
# -g option only creates the verbose parser.
#
# === Racc reported syntax error.
#
# Isn't there too many "end"?
# grammar of racc file is changed in v0.10.
#
# Racc does not use '%' mark, while yacc uses huge number of '%' marks..
#
# === Racc reported "XXXX conflicts".
#
# Try "racc -v xxxx.y".
# It causes producing racc's internal log file, xxxx.output.
#
# === Generated parsers does not work correctly
#
# Try "racc -g xxxx.y".
# This command let racc generate "debugging parser".
# Then set @yydebug=true in your parser.
# It produces a working log of your parser.
#
# == Re-distributing Racc runtime
#
# A parser, which is created by Racc, requires the Racc runtime module;
# racc/parser.rb.
#
# Ruby 1.8.x comes with Racc runtime module,
# you need NOT distribute Racc runtime files.
#
# If you want to include the Racc runtime module with your parser.
# This can be done by using '-E' option:
#
#   $ racc -E -omyparser.rb myparser.y
#
# This command creates myparser.rb which `includes' Racc runtime.
# Only you must do is to distribute your parser file (myparser.rb).
#
# Note: parser.rb is ruby license, but your parser is not.
# Your own parser is completely yours.
module Racc

  unless defined?(Racc_No_Extensions)
    Racc_No_Extensions = false # :nodoc:
  end

  class Parser

    Racc_Runtime_Version = ::Racc::VERSION
    Racc_Runtime_Core_Version_R = ::Racc::VERSION

    begin
      if Object.const_defined?(:RUBY_ENGINE) and RUBY_ENGINE == 'jruby'
        require 'jruby'
        require 'racc/cparse-jruby.jar'
        com.headius.racc.Cparse.new.load(JRuby.runtime, false)
      else
        require 'racc/cparse'
      end

      unless new.respond_to?(:_racc_do_parse_c, true)
        raise LoadError, 'old cparse.so'
      end
      if Racc_No_Extensions
        raise LoadError, 'selecting ruby version of racc runtime core'
      end

      Racc_Main_Parsing_Routine    = :_racc_do_parse_c # :nodoc:
      Racc_YY_Parse_Method         = :_racc_yyparse_c # :nodoc:
      Racc_Runtime_Core_Version    = Racc_Runtime_Core_Version_C # :nodoc:
      Racc_Runtime_Type            = 'c' # :nodoc:
    rescue LoadError
      Racc_Main_Parsing_Routine    = :_racc_do_parse_rb
      Racc_YY_Parse_Method         = :_racc_yyparse_rb
      Racc_Runtime_Core_Version    = Racc_Runtime_Core_Version_R
      Racc_Runtime_Type            = 'ruby'
    end

    def Parser.racc_runtime_type # :nodoc:
      Racc_Runtime_Type
    end

    def _racc_setup
      @yydebug = false unless self.class::Racc_debug_parser
      @yydebug = false unless defined?(@yydebug)
      if @yydebug
        @racc_debug_out = $stderr unless defined?(@racc_debug_out)
        @racc_debug_out ||= $stderr
      end
      arg = self.class::Racc_arg
      arg[13] = true if arg.size < 14
      arg
    end

    def _racc_init_sysvars
      @racc_state  = [0]
      @racc_tstack = []
      @racc_vstack = []

      @racc_t = nil
      @racc_val = nil

      @racc_read_next = true

      @racc_user_yyerror = false
      @racc_error_status = 0
    end

    # The entry point of the parser. This method is used with #next_token.
    # If Racc wants to get token (and its value), calls next_token.
    #
    # Example:
    #     def parse
    #       @q = [[1,1],
    #             [2,2],
    #             [3,3],
    #             [false, '$']]
    #       do_parse
    #     end
    #
    #     def next_token
    #       @q.shift
    #     end
    class_eval <<~RUBY, __FILE__, __LINE__ + 1
    def do_parse
      #{Racc_Main_Parsing_Routine}(_racc_setup(), false)
    end
    RUBY

    # The method to fetch next token.
    # If you use #do_parse method, you must implement #next_token.
    #
    # The format of return value is [TOKEN_SYMBOL, VALUE].
    # +token-symbol+ is represented by Ruby's symbol by default, e.g. :IDENT
    # for 'IDENT'.  ";" (String) for ';'.
    #
    # The final symbol (End of file) must be false.
    def next_token
      raise NotImplementedError, "#{self.class}\#next_token is not defined"
    end

    def _racc_do_parse_rb(arg, in_debug)
      action_table, action_check, action_default, action_pointer,
      _,            _,            _,              _,
      _,            _,            token_table,    * = arg

      _racc_init_sysvars
      tok = act = i = nil

      catch(:racc_end_parse) {
        while true
          if i = action_pointer[@racc_state[-1]]
            if @racc_read_next
              if @racc_t != 0   # not EOF
                tok, @racc_val = next_token()
                unless tok      # EOF
                  @racc_t = 0
                else
                  @racc_t = (token_table[tok] or 1)   # error token
                end
                racc_read_token(@racc_t, tok, @racc_val) if @yydebug
                @racc_read_next = false
              end
            end
            i += @racc_t
            unless i >= 0 and
                   act = action_table[i] and
                   action_check[i] == @racc_state[-1]
              act = action_default[@racc_state[-1]]
            end
          else
            act = action_default[@racc_state[-1]]
          end
          while act = _racc_evalact(act, arg)
            ;
          end
        end
      }
    end

    # Another entry point for the parser.
    # If you use this method, you must implement RECEIVER#METHOD_ID method.
    #
    # RECEIVER#METHOD_ID is a method to get next token.
    # It must 'yield' the token, which format is [TOKEN-SYMBOL, VALUE].
    class_eval <<~RUBY, __FILE__, __LINE__ + 1
    def yyparse(recv, mid)
      #{Racc_YY_Parse_Method}(recv, mid, _racc_setup(), false)
    end
    RUBY

    def _racc_yyparse_rb(recv, mid, arg, c_debug)
      action_table, action_check, action_default, action_pointer,
      _,            _,            _,              _,
      _,            _,            token_table,    * = arg

      _racc_init_sysvars

      catch(:racc_end_parse) {
        until i = action_pointer[@racc_state[-1]]
          while act = _racc_evalact(action_default[@racc_state[-1]], arg)
            ;
          end
        end
        recv.__send__(mid) do |tok, val|
          unless tok
            @racc_t = 0
          else
            @racc_t = (token_table[tok] or 1)   # error token
          end
          @racc_val = val
          @racc_read_next = false

          i += @racc_t
          unless i >= 0 and
                 act = action_table[i] and
                 action_check[i] == @racc_state[-1]
            act = action_default[@racc_state[-1]]
          end
          while act = _racc_evalact(act, arg)
            ;
          end

          while !(i = action_pointer[@racc_state[-1]]) ||
                ! @racc_read_next ||
                @racc_t == 0  # $
            unless i and i += @racc_t and
                   i >= 0 and
                   act = action_table[i] and
                   action_check[i] == @racc_state[-1]
              act = action_default[@racc_state[-1]]
            end
            while act = _racc_evalact(act, arg)
              ;
            end
          end
        end
      }
    end

    ###
    ### common
    ###

    def _racc_evalact(act, arg)
      action_table, action_check, _, action_pointer,
      _,            _,            _, _,
      _,            _,            _, shift_n,
      reduce_n,     * = arg
      nerr = 0   # tmp

      if act > 0 and act < shift_n
        #
        # shift
        #
        if @racc_error_status > 0
          @racc_error_status -= 1 unless @racc_t <= 1 # error token or EOF
        end
        @racc_vstack.push @racc_val
        @racc_state.push act
        @racc_read_next = true
        if @yydebug
          @racc_tstack.push @racc_t
          racc_shift @racc_t, @racc_tstack, @racc_vstack
        end

      elsif act < 0 and act > -reduce_n
        #
        # reduce
        #
        code = catch(:racc_jump) {
          @racc_state.push _racc_do_reduce(arg, act)
          false
        }
        if code
          case code
          when 1 # yyerror
            @racc_user_yyerror = true   # user_yyerror
            return -reduce_n
          when 2 # yyaccept
            return shift_n
          else
            raise '[Racc Bug] unknown jump code'
          end
        end

      elsif act == shift_n
        #
        # accept
        #
        racc_accept if @yydebug
        throw :racc_end_parse, @racc_vstack[0]

      elsif act == -reduce_n
        #
        # error
        #
        case @racc_error_status
        when 0
          unless arg[21]    # user_yyerror
            nerr += 1
            on_error @racc_t, @racc_val, @racc_vstack
          end
        when 3
          if @racc_t == 0   # is $
            # We're at EOF, and another error occurred immediately after
            # attempting auto-recovery
            throw :racc_end_parse, nil
          end
          @racc_read_next = true
        end
        @racc_user_yyerror = false
        @racc_error_status = 3
        while true
          if i = action_pointer[@racc_state[-1]]
            i += 1   # error token
            if  i >= 0 and
                (act = action_table[i]) and
                action_check[i] == @racc_state[-1]
              break
            end
          end
          throw :racc_end_parse, nil if @racc_state.size <= 1
          @racc_state.pop
          @racc_vstack.pop
          if @yydebug
            @racc_tstack.pop
            racc_e_pop @racc_state, @racc_tstack, @racc_vstack
          end
        end
        return act

      else
        raise "[Racc Bug] unknown action #{act.inspect}"
      end

      racc_next_state(@racc_state[-1], @racc_state) if @yydebug

      nil
    end

    def _racc_do_reduce(arg, act)
      _,          _,            _,            _,
      goto_table, goto_check,   goto_default, goto_pointer,
      nt_base,    reduce_table, _,            _,
      _,          use_result,   * = arg

      state = @racc_state
      vstack = @racc_vstack
      tstack = @racc_tstack

      i = act * -3
      len       = reduce_table[i]
      reduce_to = reduce_table[i+1]
      method_id = reduce_table[i+2]
      void_array = []

      tmp_t = tstack[-len, len] if @yydebug
      tmp_v = vstack[-len, len]
      tstack[-len, len] = void_array if @yydebug
      vstack[-len, len] = void_array
      state[-len, len]  = void_array

      # tstack must be updated AFTER method call
      if use_result
        vstack.push __send__(method_id, tmp_v, vstack, tmp_v[0])
      else
        vstack.push __send__(method_id, tmp_v, vstack)
      end
      tstack.push reduce_to

      racc_reduce(tmp_t, reduce_to, tstack, vstack) if @yydebug

      k1 = reduce_to - nt_base
      if i = goto_pointer[k1]
        i += state[-1]
        if i >= 0 and (curstate = goto_table[i]) and goto_check[i] == k1
          return curstate
        end
      end
      goto_default[k1]
    end

    # This method is called when a parse error is found.
    #
    # ERROR_TOKEN_ID is an internal ID of token which caused error.
    # You can get string representation of this ID by calling
    # #token_to_str.
    #
    # ERROR_VALUE is a value of error token.
    #
    # value_stack is a stack of symbol values.
    # DO NOT MODIFY this object.
    #
    # This method raises ParseError by default.
    #
    # If this method returns, parsers enter "error recovering mode".
    def on_error(t, val, vstack)
      raise ParseError, sprintf("parse error on value %s (%s)",
                                val.inspect, token_to_str(t) || '?')
    end

    # Enter error recovering mode.
    # This method does not call #on_error.
    def yyerror
      throw :racc_jump, 1
    end

    # Exit parser.
    # Return value is +Symbol_Value_Stack[0]+.
    def yyaccept
      throw :racc_jump, 2
    end

    # Leave error recovering mode.
    def yyerrok
      @racc_error_status = 0
    end

    # For debugging output
    def racc_read_token(t, tok, val)
      @racc_debug_out.print 'read    '
      @racc_debug_out.print tok.inspect, '(', racc_token2str(t), ') '
      @racc_debug_out.puts val.inspect
      @racc_debug_out.puts
    end

    def racc_shift(tok, tstack, vstack)
      @racc_debug_out.puts "shift   #{racc_token2str tok}"
      racc_print_stacks tstack, vstack
      @racc_debug_out.puts
    end

    def racc_reduce(toks, sim, tstack, vstack)
      out = @racc_debug_out
      out.print 'reduce '
      if toks.empty?
        out.print ' <none>'
      else
        toks.each {|t| out.print ' ', racc_token2str(t) }
      end
      out.puts " --> #{racc_token2str(sim)}"
      racc_print_stacks tstack, vstack
      @racc_debug_out.puts
    end

    def racc_accept
      @racc_debug_out.puts 'accept'
      @racc_debug_out.puts
    end

    def racc_e_pop(state, tstack, vstack)
      @racc_debug_out.puts 'error recovering mode: pop token'
      racc_print_states state
      racc_print_stacks tstack, vstack
      @racc_debug_out.puts
    end

    def racc_next_state(curstate, state)
      @racc_debug_out.puts  "goto    #{curstate}"
      racc_print_states state
      @racc_debug_out.puts
    end

    def racc_print_stacks(t, v)
      out = @racc_debug_out
      out.print '        ['
      t.each_index do |i|
        out.print ' (', racc_token2str(t[i]), ' ', v[i].inspect, ')'
      end
      out.puts ' ]'
    end

    def racc_print_states(s)
      out = @racc_debug_out
      out.print '        ['
      s.each {|st| out.print ' ', st }
      out.puts ' ]'
    end

    def racc_token2str(tok)
      self.class::Racc_token_to_s_table[tok] or
          raise "[Racc Bug] can't convert token #{tok} to string"
    end

    # Convert internal ID of token symbol to the string.
    def token_to_str(t)
      self.class::Racc_token_to_s_table[t]
    end

  end

end

...end racc/parser.rb/module_eval...
end
###### racc/parser.rb end
module Lrama
  class Parser < Racc::Parser

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

include Lrama::Report::Duration

def initialize(text, path, debug = false)
  @grammar_file = Lrama::Lexer::GrammarFile.new(path, text)
  @yydebug = debug
  @rule_counter = Lrama::Grammar::Counter.new(0)
  @midrule_action_counter = Lrama::Grammar::Counter.new(1)
end

def parse
  report_duration(:parse) do
    @lexer = Lrama::Lexer.new(@grammar_file)
    @grammar = Lrama::Grammar.new(@rule_counter)
    @precedence_number = 0
    reset_precs
    do_parse
    @grammar
  end
end

def next_token
  @lexer.next_token
end

def on_error(error_token_id, error_value, value_stack)
  if error_value.is_a?(Lrama::Lexer::Token)
    location = error_value.location
    value = "'#{error_value.s_value}'"
  else
    location = @lexer.location
    value = error_value.inspect
  end

  error_message = "parse error on value #{value} (#{token_to_str(error_token_id) || '?'})"

  raise_parse_error(error_message, location)
end

def on_action_error(error_message, error_value)
  if error_value.is_a?(Lrama::Lexer::Token)
    location = error_value.location
  else
    location = @lexer.location
  end

  raise_parse_error(error_message, location)
end

private

def reset_precs
  @prec_seen = false
  @code_after_prec = false
end

def begin_c_declaration(end_symbol)
  @lexer.status = :c_declaration
  @lexer.end_symbol = end_symbol
end

def end_c_declaration
  @lexer.status = :initial
  @lexer.end_symbol = nil
end

def raise_parse_error(error_message, location)
  raise ParseError, location.generate_error_message(error_message)
end
...end parser.y/module_eval...
##### State transition tables begin ###

racc_action_table = [
    89,    49,    90,   167,    49,   101,   173,    49,   101,   167,
    49,   101,   173,     6,   101,    80,    49,    49,    48,    48,
    41,    76,    76,    49,    49,    48,    48,    42,    76,    76,
    49,    49,    48,    48,   101,    96,   113,    49,    87,    48,
   150,   101,    96,   151,    45,   171,   169,   170,   151,   176,
   170,    91,   169,   170,    81,   176,   170,    20,    24,    25,
    26,    27,    28,    29,    30,    31,    87,    32,    33,    34,
    35,    36,    37,    38,    39,    49,     4,    48,     5,   101,
    96,   181,   182,   183,   128,    20,    24,    25,    26,    27,
    28,    29,    30,    31,    46,    32,    33,    34,    35,    36,
    37,    38,    39,    11,    12,    13,    14,    15,    16,    17,
    18,    19,    53,    20,    24,    25,    26,    27,    28,    29,
    30,    31,    53,    32,    33,    34,    35,    36,    37,    38,
    39,    11,    12,    13,    14,    15,    16,    17,    18,    19,
    44,    20,    24,    25,    26,    27,    28,    29,    30,    31,
    53,    32,    33,    34,    35,    36,    37,    38,    39,    49,
     4,    48,     5,   101,    96,    49,    49,    48,    48,   101,
   101,    49,    49,    48,    48,   101,   101,    49,    49,    48,
   197,   101,   101,    49,    49,   197,    48,   101,   101,    49,
    49,   197,    48,   101,   181,   182,   183,   128,   204,   210,
   217,   205,   205,   205,    49,    49,    48,    48,    49,    49,
    48,    48,    49,    49,    48,    48,   181,   182,   183,   116,
   117,    56,    53,    53,    53,    53,    53,    62,    63,    64,
    65,    66,    68,    68,    68,    82,    53,    53,   104,   108,
   108,   115,   122,   123,   125,   128,   129,   133,   139,   140,
   141,   142,   144,   145,   101,   154,   139,   157,   154,   161,
   162,    68,   164,   165,   172,   177,   154,   184,   128,   188,
   154,   190,   128,   154,   199,   154,   128,    68,   165,   206,
   165,    68,    68,   215,   128,    68 ]

racc_action_check = [
    47,   153,    47,   153,   159,   153,   159,   178,   159,   178,
   189,   178,   189,     1,   189,    39,    35,    36,    35,    36,
     5,    35,    36,    37,    38,    37,    38,     6,    37,    38,
    59,    74,    59,    74,    59,    59,    74,    60,    45,    60,
   138,    60,    60,   138,     9,   156,   153,   153,   156,   159,
   159,    47,   178,   178,    39,   189,   189,    45,    45,    45,
    45,    45,    45,    45,    45,    45,    83,    45,    45,    45,
    45,    45,    45,    45,    45,    61,     0,    61,     0,    61,
    61,   166,   166,   166,   166,    83,    83,    83,    83,    83,
    83,    83,    83,    83,    11,    83,    83,    83,    83,    83,
    83,    83,    83,     3,     3,     3,     3,     3,     3,     3,
     3,     3,    13,     3,     3,     3,     3,     3,     3,     3,
     3,     3,    14,     3,     3,     3,     3,     3,     3,     3,
     3,     8,     8,     8,     8,     8,     8,     8,     8,     8,
     8,     8,     8,     8,     8,     8,     8,     8,     8,     8,
    15,     8,     8,     8,     8,     8,     8,     8,     8,    97,
     2,    97,     2,    97,    97,    71,   108,    71,   108,    71,
   108,   109,   169,   109,   169,   109,   169,   176,   184,   176,
   184,   176,   184,   190,   205,   190,   205,   190,   205,   206,
    12,   206,    12,   206,   174,   174,   174,   174,   196,   201,
   214,   196,   201,   214,    69,    76,    69,    76,   104,   105,
   104,   105,   111,   113,   111,   113,   198,   198,   198,    81,
    81,    16,    17,    20,    24,    25,    26,    27,    28,    29,
    30,    31,    32,    33,    34,    40,    51,    56,    67,    70,
    72,    80,    84,    85,    86,    87,    93,   107,   115,   116,
   117,   118,   127,   128,   134,   140,   141,   143,   144,   145,
   146,   150,   151,   152,   158,   163,   165,   167,   168,   171,
   172,   173,   175,   177,   187,   188,   192,   193,   195,   197,
   200,   202,   204,   209,   210,   216 ]

racc_action_pointer = [
    66,    13,   150,    90,   nil,    13,    27,   nil,   118,    35,
   nil,    88,   187,    63,    73,   101,   216,   173,   nil,   nil,
   174,   nil,   nil,   nil,   175,   176,   177,   222,   223,   224,
   225,   226,   224,   225,   226,    13,    14,    20,    21,    10,
   233,   nil,   nil,   nil,   nil,    34,   nil,    -5,   nil,   nil,
   nil,   187,   nil,   nil,   nil,   nil,   188,   nil,   nil,    27,
    34,    72,   nil,   nil,   nil,   nil,   nil,   230,   nil,   201,
   231,   162,   232,   nil,    28,   nil,   202,   nil,   nil,   nil,
   200,   215,   nil,    62,   233,   221,   222,   191,   nil,   nil,
   nil,   nil,   nil,   244,   nil,   nil,   nil,   156,   nil,   nil,
   nil,   nil,   nil,   nil,   205,   206,   nil,   241,   163,   168,
   nil,   209,   nil,   210,   nil,   243,   206,   209,   240,   nil,
   nil,   nil,   nil,   nil,   nil,   nil,   nil,   209,   248,   nil,
   nil,   nil,   nil,   nil,   247,   nil,   nil,   nil,    -2,   nil,
   208,   251,   nil,   255,   211,   204,   210,   nil,   nil,   nil,
   253,   257,   217,    -2,   nil,   nil,     3,   nil,   218,     1,
   nil,   nil,   nil,   222,   nil,   219,    30,   226,   214,   169,
   nil,   226,   223,   230,   143,   218,   174,   226,     4,   nil,
   nil,   nil,   nil,   nil,   175,   nil,   nil,   272,   228,     7,
   180,   nil,   222,   269,   nil,   232,   156,   238,   165,   nil,
   234,   157,   273,   nil,   274,   181,   186,   nil,   nil,   233,
   230,   nil,   nil,   nil,   158,   nil,   277,   nil,   nil ]

racc_action_default = [
    -1,  -128,    -1,    -3,   -10,  -128,  -128,    -2,    -3,  -128,
   -16,  -128,  -128,  -128,  -128,  -128,  -128,  -128,   -24,   -25,
  -128,   -32,   -33,   -34,  -128,  -128,  -128,  -128,  -128,  -128,
  -128,  -128,   -50,   -50,   -50,  -128,  -128,  -128,  -128,  -128,
  -128,   -13,   219,    -4,   -26,  -128,   -17,  -123,   -93,   -94,
  -122,   -14,   -19,   -85,   -20,   -21,  -128,   -23,   -31,  -128,
  -128,  -128,   -38,   -39,   -40,   -41,   -42,   -43,   -51,  -128,
   -44,  -128,   -45,   -46,   -88,   -90,  -128,   -47,   -48,   -49,
  -128,  -128,   -11,    -5,    -7,   -95,  -128,   -68,   -18,  -124,
  -125,  -126,   -15,  -128,   -22,   -27,   -28,   -29,   -35,   -83,
   -84,  -127,   -36,   -37,  -128,   -52,   -54,   -56,  -128,   -79,
   -81,   -88,   -89,  -128,   -91,  -128,  -128,  -128,  -128,    -6,
    -8,    -9,  -120,   -96,   -97,   -98,   -69,  -128,  -128,   -86,
   -30,   -55,   -53,   -57,   -76,   -82,   -80,   -92,  -128,   -62,
   -66,  -128,   -12,  -128,   -66,  -128,  -128,   -58,   -77,   -78,
   -50,  -128,   -60,   -64,   -67,   -70,  -128,  -121,   -99,  -100,
  -102,  -119,   -87,  -128,   -63,   -66,   -68,   -93,   -68,  -128,
  -116,  -128,   -66,   -93,   -68,   -68,  -128,   -66,   -65,   -71,
   -72,  -108,  -109,  -110,  -128,   -74,   -75,  -128,   -66,  -101,
  -128,  -103,   -68,   -50,  -107,   -59,  -128,   -93,  -111,  -117,
   -61,  -128,   -50,  -106,   -50,  -128,  -128,  -112,  -113,  -128,
   -68,  -104,   -73,  -114,  -128,  -118,   -50,  -115,  -105 ]

racc_goto_table = [
    69,   109,    50,   152,    57,   127,    84,    58,   112,   160,
   114,    59,    60,    61,    86,    52,    54,    55,    98,   102,
   103,   159,   106,   110,   175,    74,    74,    74,    74,   138,
     9,     1,     3,   180,     7,    43,   120,   160,   109,   109,
   195,   192,   121,    94,   119,   112,    40,   137,   118,   189,
    47,   200,    86,    92,   175,   156,   130,   131,   132,   107,
   135,   136,    88,   196,   111,   207,   111,    70,    72,   201,
    73,    77,    78,    79,    67,   147,   134,   178,   148,   149,
    93,   146,   124,   166,   179,   214,   185,   158,   208,   174,
   187,   209,   191,   193,   107,   107,   143,   nil,   nil,   186,
   nil,   111,   nil,   111,   nil,   nil,   194,   nil,   166,   nil,
   202,   nil,   nil,   nil,   198,   nil,   nil,   nil,   163,   174,
   198,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   216,   nil,
   nil,   nil,   nil,   nil,   nil,   213,   198,   nil,   nil,   nil,
   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
   nil,   203,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
   211,   nil,   212,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
   nil,   nil,   nil,   nil,   218 ]

racc_goto_check = [
    27,    20,    29,    33,    15,    40,     8,    15,    46,    39,
    46,    15,    15,    15,    12,    16,    16,    16,    22,    22,
    22,    50,    28,    43,    38,    29,    29,    29,    29,    32,
     7,     1,     6,    36,     6,     7,     5,    39,    20,    20,
    33,    36,     9,    15,     8,    46,    10,    46,    11,    50,
    13,    33,    12,    16,    38,    32,    22,    28,    28,    29,
    43,    43,    14,    37,    29,    36,    29,    24,    24,    37,
    25,    25,    25,    25,    23,    30,    31,    34,    41,    42,
    44,    45,    48,    20,    40,    37,    40,    49,    51,    20,
    52,    53,    40,    40,    29,    29,    54,   nil,   nil,    20,
   nil,    29,   nil,    29,   nil,   nil,    20,   nil,    20,   nil,
    40,   nil,   nil,   nil,    20,   nil,   nil,   nil,    27,    20,
    20,   nil,   nil,   nil,   nil,   nil,   nil,   nil,    40,   nil,
   nil,   nil,   nil,   nil,   nil,    20,    20,   nil,   nil,   nil,
   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
   nil,    27,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
    27,   nil,    27,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
   nil,   nil,   nil,   nil,    27 ]

racc_goto_pointer = [
   nil,    31,   nil,   nil,   nil,   -48,    32,    27,   -39,   -42,
    42,   -34,   -31,    38,    15,   -13,     2,   nil,   nil,   nil,
   -70,   nil,   -41,    42,    34,    35,   nil,   -32,   -47,   -10,
   -59,   -31,   -86,  -137,   -88,   nil,  -133,  -121,  -135,  -135,
   -82,   -56,   -55,   -48,    27,   -48,   -66,   nil,    -3,   -57,
  -123,  -110,   -80,  -108,   -26 ]

racc_goto_default = [
   nil,   nil,     2,     8,    83,   nil,   nil,   nil,   nil,   nil,
   nil,   nil,    10,   nil,   nil,    51,   nil,    21,    22,    23,
    95,    97,   nil,   nil,   nil,   nil,   105,    71,   nil,    99,
   nil,   nil,   nil,   nil,   153,   126,   nil,   nil,   168,   155,
   nil,   100,   nil,   nil,   nil,   nil,    75,    85,   nil,   nil,
   nil,   nil,   nil,   nil,   nil ]

racc_reduce_table = [
  0, 0, :racc_error,
  0, 63, :_reduce_1,
  2, 63, :_reduce_2,
  0, 64, :_reduce_3,
  2, 64, :_reduce_4,
  1, 65, :_reduce_5,
  2, 65, :_reduce_6,
  0, 66, :_reduce_none,
  1, 66, :_reduce_none,
  5, 58, :_reduce_none,
  0, 67, :_reduce_10,
  0, 68, :_reduce_11,
  5, 59, :_reduce_12,
  2, 59, :_reduce_none,
  1, 73, :_reduce_14,
  2, 73, :_reduce_15,
  1, 60, :_reduce_none,
  2, 60, :_reduce_17,
  3, 60, :_reduce_none,
  2, 60, :_reduce_none,
  2, 60, :_reduce_20,
  2, 60, :_reduce_21,
  3, 60, :_reduce_22,
  2, 60, :_reduce_23,
  1, 60, :_reduce_24,
  1, 60, :_reduce_25,
  2, 60, :_reduce_none,
  1, 78, :_reduce_27,
  1, 78, :_reduce_28,
  1, 79, :_reduce_29,
  2, 79, :_reduce_30,
  2, 69, :_reduce_31,
  1, 69, :_reduce_none,
  1, 69, :_reduce_none,
  1, 69, :_reduce_none,
  3, 69, :_reduce_35,
  3, 69, :_reduce_36,
  3, 69, :_reduce_37,
  2, 69, :_reduce_38,
  2, 69, :_reduce_39,
  2, 69, :_reduce_40,
  2, 69, :_reduce_41,
  2, 69, :_reduce_42,
  2, 74, :_reduce_none,
  2, 74, :_reduce_44,
  2, 74, :_reduce_45,
  2, 74, :_reduce_46,
  2, 74, :_reduce_47,
  2, 74, :_reduce_48,
  2, 74, :_reduce_49,
  0, 84, :_reduce_none,
  1, 84, :_reduce_none,
  1, 85, :_reduce_52,
  2, 85, :_reduce_53,
  2, 80, :_reduce_54,
  3, 80, :_reduce_55,
  0, 88, :_reduce_none,
  1, 88, :_reduce_none,
  3, 83, :_reduce_58,
  8, 75, :_reduce_59,
  5, 76, :_reduce_60,
  8, 76, :_reduce_61,
  1, 89, :_reduce_62,
  3, 89, :_reduce_63,
  1, 90, :_reduce_64,
  3, 90, :_reduce_65,
  0, 96, :_reduce_none,
  1, 96, :_reduce_none,
  0, 97, :_reduce_none,
  1, 97, :_reduce_none,
  1, 91, :_reduce_70,
  3, 91, :_reduce_71,
  3, 91, :_reduce_72,
  6, 91, :_reduce_73,
  3, 91, :_reduce_74,
  3, 91, :_reduce_75,
  0, 99, :_reduce_none,
  1, 99, :_reduce_none,
  1, 87, :_reduce_78,
  1, 100, :_reduce_79,
  2, 100, :_reduce_80,
  2, 81, :_reduce_81,
  3, 81, :_reduce_82,
  1, 77, :_reduce_none,
  1, 77, :_reduce_none,
  0, 101, :_reduce_85,
  0, 102, :_reduce_86,
  5, 72, :_reduce_87,
  1, 103, :_reduce_88,
  2, 103, :_reduce_89,
  1, 82, :_reduce_90,
  2, 82, :_reduce_91,
  3, 82, :_reduce_92,
  1, 86, :_reduce_93,
  1, 86, :_reduce_94,
  0, 105, :_reduce_none,
  1, 105, :_reduce_none,
  2, 61, :_reduce_none,
  2, 61, :_reduce_none,
  4, 104, :_reduce_99,
  1, 106, :_reduce_100,
  3, 106, :_reduce_101,
  1, 107, :_reduce_102,
  3, 107, :_reduce_103,
  5, 107, :_reduce_104,
  7, 107, :_reduce_105,
  4, 107, :_reduce_106,
  3, 107, :_reduce_107,
  1, 93, :_reduce_108,
  1, 93, :_reduce_109,
  1, 93, :_reduce_110,
  0, 108, :_reduce_none,
  1, 108, :_reduce_none,
  2, 94, :_reduce_113,
  3, 94, :_reduce_114,
  4, 94, :_reduce_115,
  0, 109, :_reduce_116,
  0, 110, :_reduce_117,
  5, 95, :_reduce_118,
  3, 92, :_reduce_119,
  0, 111, :_reduce_120,
  3, 62, :_reduce_121,
  1, 70, :_reduce_none,
  0, 71, :_reduce_none,
  1, 71, :_reduce_none,
  1, 71, :_reduce_none,
  1, 71, :_reduce_none,
  1, 98, :_reduce_127 ]

racc_reduce_n = 128

racc_shift_n = 219

racc_token_table = {
  false => 0,
  :error => 1,
  :C_DECLARATION => 2,
  :CHARACTER => 3,
  :IDENT_COLON => 4,
  :IDENTIFIER => 5,
  :INTEGER => 6,
  :STRING => 7,
  :TAG => 8,
  "%%" => 9,
  "%{" => 10,
  "%}" => 11,
  "%require" => 12,
  "%expect" => 13,
  "%define" => 14,
  "%param" => 15,
  "%lex-param" => 16,
  "%parse-param" => 17,
  "%code" => 18,
  "%initial-action" => 19,
  "%no-stdlib" => 20,
  "%locations" => 21,
  ";" => 22,
  "%union" => 23,
  "%destructor" => 24,
  "%printer" => 25,
  "%error-token" => 26,
  "%after-shift" => 27,
  "%before-reduce" => 28,
  "%after-reduce" => 29,
  "%after-shift-error-token" => 30,
  "%after-pop-stack" => 31,
  "-temp-group" => 32,
  "%token" => 33,
  "%type" => 34,
  "%nterm" => 35,
  "%left" => 36,
  "%right" => 37,
  "%precedence" => 38,
  "%nonassoc" => 39,
  "%rule" => 40,
  "(" => 41,
  ")" => 42,
  ":" => 43,
  "%inline" => 44,
  "," => 45,
  "|" => 46,
  "%empty" => 47,
  "%prec" => 48,
  "{" => 49,
  "}" => 50,
  "?" => 51,
  "+" => 52,
  "*" => 53,
  "[" => 54,
  "]" => 55,
  "{...}" => 56 }

racc_nt_base = 57

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 ]
Ractor.make_shareable(Racc_arg) if defined?(Ractor)

Racc_token_to_s_table = [
  "$end",
  "error",
  "C_DECLARATION",
  "CHARACTER",
  "IDENT_COLON",
  "IDENTIFIER",
  "INTEGER",
  "STRING",
  "TAG",
  "\"%%\"",
  "\"%{\"",
  "\"%}\"",
  "\"%require\"",
  "\"%expect\"",
  "\"%define\"",
  "\"%param\"",
  "\"%lex-param\"",
  "\"%parse-param\"",
  "\"%code\"",
  "\"%initial-action\"",
  "\"%no-stdlib\"",
  "\"%locations\"",
  "\";\"",
  "\"%union\"",
  "\"%destructor\"",
  "\"%printer\"",
  "\"%error-token\"",
  "\"%after-shift\"",
  "\"%before-reduce\"",
  "\"%after-reduce\"",
  "\"%after-shift-error-token\"",
  "\"%after-pop-stack\"",
  "\"-temp-group\"",
  "\"%token\"",
  "\"%type\"",
  "\"%nterm\"",
  "\"%left\"",
  "\"%right\"",
  "\"%precedence\"",
  "\"%nonassoc\"",
  "\"%rule\"",
  "\"(\"",
  "\")\"",
  "\":\"",
  "\"%inline\"",
  "\",\"",
  "\"|\"",
  "\"%empty\"",
  "\"%prec\"",
  "\"{\"",
  "\"}\"",
  "\"?\"",
  "\"+\"",
  "\"*\"",
  "\"[\"",
  "\"]\"",
  "\"{...}\"",
  "$start",
  "input",
  "prologue_declaration",
  "bison_declaration",
  "rules_or_grammar_declaration",
  "epilogue_declaration",
  "\"-many@prologue_declaration\"",
  "\"-many@bison_declaration\"",
  "\"-many1@rules_or_grammar_declaration\"",
  "\"-option@epilogue_declaration\"",
  "@1",
  "@2",
  "grammar_declaration",
  "variable",
  "value",
  "param",
  "\"-many1@param\"",
  "symbol_declaration",
  "rule_declaration",
  "inline_declaration",
  "symbol",
  "\"-group@symbol|TAG\"",
  "\"-many1@-group@symbol|TAG\"",
  "token_declarations",
  "symbol_declarations",
  "token_declarations_for_precedence",
  "token_declaration",
  "\"-option@TAG\"",
  "\"-many1@token_declaration\"",
  "id",
  "alias",
  "\"-option@INTEGER\"",
  "rule_args",
  "rule_rhs_list",
  "rule_rhs",
  "named_ref",
  "parameterizing_suffix",
  "parameterizing_args",
  "midrule_action",
  "\"-option@%empty\"",
  "\"-option@named_ref\"",
  "string_as_id",
  "\"-option@string_as_id\"",
  "\"-many1@symbol\"",
  "@3",
  "@4",
  "\"-many1@id\"",
  "rules",
  "\"-option@;\"",
  "rhs_list",
  "rhs",
  "\"-option@parameterizing_suffix\"",
  "@5",
  "@6",
  "@7" ]
Ractor.make_shareable(Racc_token_to_s_table) if defined?(Ractor)

Racc_debug_parser = true

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

# reduce 0 omitted

module_eval(<<'.,.,', 'parser.y', 11)
  def _reduce_1(val, _values, result)
    result = val[1] ? val[1].unshift(val[0]) : val
    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 11)
  def _reduce_2(val, _values, result)
    result = val[1] ? val[1].unshift(val[0]) : val
    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 11)
  def _reduce_3(val, _values, result)
    result = val[1] ? val[1].unshift(val[0]) : val
    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 11)
  def _reduce_4(val, _values, result)
    result = val[1] ? val[1].unshift(val[0]) : val
    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 11)
  def _reduce_5(val, _values, result)
    result = val[1] ? val[1].unshift(val[0]) : val
    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 11)
  def _reduce_6(val, _values, result)
    result = val[1] ? val[1].unshift(val[0]) : val
    result
  end
.,.,

# reduce 7 omitted

# reduce 8 omitted

# reduce 9 omitted

module_eval(<<'.,.,', 'parser.y', 12)
  def _reduce_10(val, _values, result)
                                begin_c_declaration("%}")
                            @grammar.prologue_first_lineno = @lexer.line

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 17)
  def _reduce_11(val, _values, result)
                                end_c_declaration

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 21)
  def _reduce_12(val, _values, result)
                                @grammar.prologue = val[2].s_value

    result
  end
.,.,

# reduce 13 omitted

module_eval(<<'.,.,', 'parser.y', 54)
  def _reduce_14(val, _values, result)
    result = val[1] ? val[1].unshift(val[0]) : val
    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 54)
  def _reduce_15(val, _values, result)
    result = val[1] ? val[1].unshift(val[0]) : val
    result
  end
.,.,

# reduce 16 omitted

module_eval(<<'.,.,', 'parser.y', 26)
  def _reduce_17(val, _values, result)
     @grammar.expect = val[1]
    result
  end
.,.,

# reduce 18 omitted

# reduce 19 omitted

module_eval(<<'.,.,', 'parser.y', 31)
  def _reduce_20(val, _values, result)
                             val[1].each {|token|
                           @grammar.lex_param = Grammar::Code::NoReferenceCode.new(type: :lex_param, token_code: token).token_code.s_value
                         }

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 37)
  def _reduce_21(val, _values, result)
                             val[1].each {|token|
                           @grammar.parse_param = Grammar::Code::NoReferenceCode.new(type: :parse_param, token_code: token).token_code.s_value
                         }

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 43)
  def _reduce_22(val, _values, result)
                             @grammar.add_percent_code(id: val[1], code: val[2])

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 47)
  def _reduce_23(val, _values, result)
                             @grammar.initial_action = Grammar::Code::InitialActionCode.new(type: :initial_action, token_code: val[1])

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 49)
  def _reduce_24(val, _values, result)
     @grammar.no_stdlib = true
    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 50)
  def _reduce_25(val, _values, result)
     @grammar.locations = true
    result
  end
.,.,

# reduce 26 omitted

module_eval(<<'.,.,', 'parser.y', 109)
  def _reduce_27(val, _values, result)
    result = val
    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 109)
  def _reduce_28(val, _values, result)
    result = val
    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 109)
  def _reduce_29(val, _values, result)
    result = val[1] ? val[1].unshift(val[0]) : val
    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 109)
  def _reduce_30(val, _values, result)
    result = val[1] ? val[1].unshift(val[0]) : val
    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 55)
  def _reduce_31(val, _values, result)
                               @grammar.set_union(
                             Grammar::Code::NoReferenceCode.new(type: :union, token_code: val[1]),
                             val[1].line
                           )

    result
  end
.,.,

# reduce 32 omitted

# reduce 33 omitted

# reduce 34 omitted

module_eval(<<'.,.,', 'parser.y', 65)
  def _reduce_35(val, _values, result)
                               @grammar.add_destructor(
                             ident_or_tags: val[2].flatten,
                             token_code: val[1],
                             lineno: val[1].line
                           )

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 73)
  def _reduce_36(val, _values, result)
                               @grammar.add_printer(
                             ident_or_tags: val[2].flatten,
                             token_code: val[1],
                             lineno: val[1].line
                           )

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 81)
  def _reduce_37(val, _values, result)
                               @grammar.add_error_token(
                             ident_or_tags: val[2].flatten,
                             token_code: val[1],
                             lineno: val[1].line
                           )

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 89)
  def _reduce_38(val, _values, result)
                               @grammar.after_shift = val[1]

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 93)
  def _reduce_39(val, _values, result)
                               @grammar.before_reduce = val[1]

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 97)
  def _reduce_40(val, _values, result)
                               @grammar.after_reduce = val[1]

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 101)
  def _reduce_41(val, _values, result)
                               @grammar.after_shift_error_token = val[1]

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 105)
  def _reduce_42(val, _values, result)
                               @grammar.after_pop_stack = val[1]

    result
  end
.,.,

# reduce 43 omitted

module_eval(<<'.,.,', 'parser.y', 111)
  def _reduce_44(val, _values, result)
                              val[1].each {|hash|
                            hash[:tokens].each {|id|
                              @grammar.add_type(id: id, tag: hash[:tag])
                            }
                          }

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 119)
  def _reduce_45(val, _values, result)
                              val[1].each {|hash|
                            hash[:tokens].each {|id|
                              if @grammar.find_term_by_s_value(id.s_value)
                                on_action_error("symbol #{id.s_value} redeclared as a nonterminal", id)
                              else
                                @grammar.add_type(id: id, tag: hash[:tag])
                              end
                            }
                          }

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 131)
  def _reduce_46(val, _values, result)
                              val[1].each {|hash|
                            hash[:tokens].each {|id|
                              sym = @grammar.add_term(id: id)
                              @grammar.add_left(sym, @precedence_number)
                            }
                          }
                          @precedence_number += 1

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 141)
  def _reduce_47(val, _values, result)
                              val[1].each {|hash|
                            hash[:tokens].each {|id|
                              sym = @grammar.add_term(id: id)
                              @grammar.add_right(sym, @precedence_number)
                            }
                          }
                          @precedence_number += 1

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 151)
  def _reduce_48(val, _values, result)
                              val[1].each {|hash|
                            hash[:tokens].each {|id|
                              sym = @grammar.add_term(id: id)
                              @grammar.add_precedence(sym, @precedence_number)
                            }
                          }
                          @precedence_number += 1

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 161)
  def _reduce_49(val, _values, result)
                              val[1].each {|hash|
                            hash[:tokens].each {|id|
                              sym = @grammar.add_term(id: id)
                              @grammar.add_nonassoc(sym, @precedence_number)
                            }
                          }
                          @precedence_number += 1

    result
  end
.,.,

# reduce 50 omitted

# reduce 51 omitted

module_eval(<<'.,.,', 'parser.y', 184)
  def _reduce_52(val, _values, result)
    result = val[1] ? val[1].unshift(val[0]) : val
    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 184)
  def _reduce_53(val, _values, result)
    result = val[1] ? val[1].unshift(val[0]) : val
    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 172)
  def _reduce_54(val, _values, result)
                              val[1].each {|token_declaration|
                            @grammar.add_term(id: token_declaration[0], alias_name: token_declaration[2], token_id: token_declaration[1], tag: val[0], replace: true)
                          }

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 178)
  def _reduce_55(val, _values, result)
                              val[2].each {|token_declaration|
                            @grammar.add_term(id: token_declaration[0], alias_name: token_declaration[2], token_id: token_declaration[1], tag: val[1], replace: true)
                          }

    result
  end
.,.,

# reduce 56 omitted

# reduce 57 omitted

module_eval(<<'.,.,', 'parser.y', 183)
  def _reduce_58(val, _values, result)
     result = val
    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 187)
  def _reduce_59(val, _values, result)
                            rule = Grammar::ParameterizingRule::Rule.new(val[1].s_value, val[3], val[7], tag: val[5])
                        @grammar.add_parameterizing_rule(rule)

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 193)
  def _reduce_60(val, _values, result)
                            rule = Grammar::ParameterizingRule::Rule.new(val[2].s_value, [], val[4], is_inline: true)
                        @grammar.add_parameterizing_rule(rule)

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 198)
  def _reduce_61(val, _values, result)
                            rule = Grammar::ParameterizingRule::Rule.new(val[2].s_value, val[4], val[7], is_inline: true)
                        @grammar.add_parameterizing_rule(rule)

    result
  end
.,.,

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

module_eval(<<'.,.,', 'parser.y', 203)
  def _reduce_63(val, _values, result)
     result = val[0].append(val[2])
    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 207)
  def _reduce_64(val, _values, result)
                      builder = val[0]
                  result = [builder]

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 212)
  def _reduce_65(val, _values, result)
                      builder = val[2]
                  result = val[0].append(builder)

    result
  end
.,.,

# reduce 66 omitted

# reduce 67 omitted

# reduce 68 omitted

# reduce 69 omitted

module_eval(<<'.,.,', 'parser.y', 218)
  def _reduce_70(val, _values, result)
                  reset_precs
              result = Grammar::ParameterizingRule::Rhs.new

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 223)
  def _reduce_71(val, _values, result)
                  token = val[1]
              token.alias_name = val[2]
              builder = val[0]
              builder.symbols << token
              result = builder

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 231)
  def _reduce_72(val, _values, result)
                    builder = val[0]
                builder.symbols << Lrama::Lexer::Token::InstantiateRule.new(s_value: val[2], location: @lexer.location, args: [val[1]])
                result = builder

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 237)
  def _reduce_73(val, _values, result)
                    builder = val[0]
                builder.symbols << Lrama::Lexer::Token::InstantiateRule.new(s_value: val[1].s_value, location: @lexer.location, args: val[3], lhs_tag: val[5])
                result = builder

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 243)
  def _reduce_74(val, _values, result)
                  user_code = val[1]
              user_code.alias_name = val[2]
              builder = val[0]
              builder.user_code = user_code
              result = builder

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 251)
  def _reduce_75(val, _values, result)
                  sym = @grammar.find_symbol_by_id!(val[2])
              @prec_seen = true
              builder = val[0]
              builder.precedence_sym = sym
              result = builder

    result
  end
.,.,

# reduce 76 omitted

# reduce 77 omitted

module_eval(<<'.,.,', 'parser.y', 258)
  def _reduce_78(val, _values, result)
     result = val[0].s_value if val[0]
    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 271)
  def _reduce_79(val, _values, result)
    result = val[1] ? val[1].unshift(val[0]) : val
    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 271)
  def _reduce_80(val, _values, result)
    result = val[1] ? val[1].unshift(val[0]) : val
    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 262)
  def _reduce_81(val, _values, result)
                              result = if val[0]
                            [{tag: val[0], tokens: val[1]}]
                          else
                            [{tag: nil, tokens: val[1]}]
                          end

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 268)
  def _reduce_82(val, _values, result)
     result = val[0].append({tag: val[1], tokens: val[2]})
    result
  end
.,.,

# reduce 83 omitted

# reduce 84 omitted

module_eval(<<'.,.,', 'parser.y', 274)
  def _reduce_85(val, _values, result)
                   begin_c_declaration("}")

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 278)
  def _reduce_86(val, _values, result)
                   end_c_declaration

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 282)
  def _reduce_87(val, _values, result)
                   result = val[2]

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 290)
  def _reduce_88(val, _values, result)
    result = val[1] ? val[1].unshift(val[0]) : val
    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 290)
  def _reduce_89(val, _values, result)
    result = val[1] ? val[1].unshift(val[0]) : val
    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 285)
  def _reduce_90(val, _values, result)
     result = [{tag: nil, tokens: val[0]}]
    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 286)
  def _reduce_91(val, _values, result)
     result = [{tag: val[0], tokens: val[1]}]
    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 287)
  def _reduce_92(val, _values, result)
     result = val[0].append({tag: val[1], tokens: val[2]})
    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 289)
  def _reduce_93(val, _values, result)
     on_action_error("ident after %prec", val[0]) if @prec_seen
    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 290)
  def _reduce_94(val, _values, result)
     on_action_error("char after %prec", val[0]) if @prec_seen
    result
  end
.,.,

# reduce 95 omitted

# reduce 96 omitted

# reduce 97 omitted

# reduce 98 omitted

module_eval(<<'.,.,', 'parser.y', 298)
  def _reduce_99(val, _values, result)
                 lhs = val[0]
             lhs.alias_name = val[1]
             val[3].each do |builder|
               builder.lhs = lhs
               builder.complete_input
               @grammar.add_rule_builder(builder)
             end

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 309)
  def _reduce_100(val, _values, result)
                    builder = val[0]
                if !builder.line
                  builder.line = @lexer.line - 1
                end
                result = [builder]

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 317)
  def _reduce_101(val, _values, result)
                    builder = val[2]
                if !builder.line
                  builder.line = @lexer.line - 1
                end
                result = val[0].append(builder)

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 326)
  def _reduce_102(val, _values, result)
               reset_precs
           result = @grammar.create_rule_builder(@rule_counter, @midrule_action_counter)

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 331)
  def _reduce_103(val, _values, result)
               token = val[1]
           token.alias_name = val[2]
           builder = val[0]
           builder.add_rhs(token)
           result = builder

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 339)
  def _reduce_104(val, _values, result)
               token = Lrama::Lexer::Token::InstantiateRule.new(s_value: val[2], alias_name: val[3], location: @lexer.location, args: [val[1]], lhs_tag: val[4])
           builder = val[0]
           builder.add_rhs(token)
           builder.line = val[1].first_line
           result = builder

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 347)
  def _reduce_105(val, _values, result)
               token = Lrama::Lexer::Token::InstantiateRule.new(s_value: val[1].s_value, alias_name: val[5], location: @lexer.location, args: val[3], lhs_tag: val[6])
           builder = val[0]
           builder.add_rhs(token)
           builder.line = val[1].first_line
           result = builder

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 355)
  def _reduce_106(val, _values, result)
               user_code = val[1]
           user_code.alias_name = val[2]
           user_code.tag = val[3]
           builder = val[0]
           builder.user_code = user_code
           result = builder

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 364)
  def _reduce_107(val, _values, result)
               sym = @grammar.find_symbol_by_id!(val[2])
           @prec_seen = true
           builder = val[0]
           builder.precedence_sym = sym
           result = builder

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 371)
  def _reduce_108(val, _values, result)
     result = "option"
    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 372)
  def _reduce_109(val, _values, result)
     result = "nonempty_list"
    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 373)
  def _reduce_110(val, _values, result)
     result = "list"
    result
  end
.,.,

# reduce 111 omitted

# reduce 112 omitted

module_eval(<<'.,.,', 'parser.y', 377)
  def _reduce_113(val, _values, result)
                                result = if val[1]
                              [Lrama::Lexer::Token::InstantiateRule.new(s_value: val[1].s_value, location: @lexer.location, args: val[0])]
                            else
                              [val[0]]
                            end

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 383)
  def _reduce_114(val, _values, result)
     result = val[0].append(val[2])
    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 384)
  def _reduce_115(val, _values, result)
     result = [Lrama::Lexer::Token::InstantiateRule.new(s_value: val[0].s_value, location: @lexer.location, args: val[2])]
    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 388)
  def _reduce_116(val, _values, result)
                          if @prec_seen
                        on_action_error("multiple User_code after %prec", val[0])  if @code_after_prec
                        @code_after_prec = true
                      end
                      begin_c_declaration("}")

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 396)
  def _reduce_117(val, _values, result)
                          end_c_declaration

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 400)
  def _reduce_118(val, _values, result)
                          result = val[2]

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 403)
  def _reduce_119(val, _values, result)
     result = val[1].s_value
    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 407)
  def _reduce_120(val, _values, result)
                                begin_c_declaration('\Z')
                            @grammar.epilogue_first_lineno = @lexer.line + 1

    result
  end
.,.,

module_eval(<<'.,.,', 'parser.y', 412)
  def _reduce_121(val, _values, result)
                                end_c_declaration
                            @grammar.epilogue = val[2].s_value

    result
  end
.,.,

# reduce 122 omitted

# reduce 123 omitted

# reduce 124 omitted

# reduce 125 omitted

# reduce 126 omitted

module_eval(<<'.,.,', 'parser.y', 423)
  def _reduce_127(val, _values, result)
     result = Lrama::Lexer::Token::Ident.new(s_value: val[0])
    result
  end
.,.,

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

  end   # class Parser
end   # module Lrama
