#
# DO NOT MODIFY!!!!
# This file is automatically generated by racc 1.4.5
# from racc grammer file "lib/einstein/parser.racc".
#

require 'racc/parser'


require 'einstein/parser.rex.rb'

module Einstein

  class Parser < Racc::Parser

##### racc 1.4.5 generates ###

racc_reduce_table = [
 0, 0, :racc_error,
 1, 19, :_reduce_none,
 1, 21, :_reduce_2,
 1, 21, :_reduce_3,
 3, 22, :_reduce_4,
 1, 22, :_reduce_none,
 1, 23, :_reduce_none,
 2, 23, :_reduce_7,
 2, 23, :_reduce_8,
 2, 23, :_reduce_9,
 1, 24, :_reduce_none,
 3, 24, :_reduce_11,
 1, 25, :_reduce_none,
 3, 25, :_reduce_13,
 3, 25, :_reduce_14,
 3, 25, :_reduce_15,
 1, 26, :_reduce_none,
 3, 26, :_reduce_17,
 3, 26, :_reduce_18,
 1, 27, :_reduce_none,
 3, 27, :_reduce_20,
 3, 27, :_reduce_21,
 1, 28, :_reduce_none,
 3, 28, :_reduce_23,
 1, 20, :_reduce_none,
 3, 20, :_reduce_25,
 3, 20, :_reduce_26 ]

racc_reduce_n = 27

racc_shift_n = 46

racc_action_table = [
     4,     6,     8,    17,    11,    12,    13,     4,     6,     8,
    17,    11,    12,    13,     4,     6,     8,    17,    11,    12,
    13,     4,     6,     8,    17,    11,    12,    13,     4,     6,
     8,    43,    11,    12,    13,     4,     6,     8,    26,    11,
    12,    13,     4,     6,     8,    39,    11,    12,    13,     4,
     6,     8,    30,    11,    12,    13,     4,     6,     8,    26,
    11,    12,    13,     4,     6,     8,    26,    11,    12,    13,
     4,     6,     8,   nil,    11,    12,    13,     4,     6,     8,
   nil,    11,    12,    13,     4,     6,     8,   nil,    11,    12,
    13,     4,     6,     8,   nil,    11,    12,    13,     4,     6,
     8,   nil,    11,    12,    13,     4,     6,     8,   nil,    11,
    12,    13,    20,    18,    19,    20,    18,    19,    20,    18,
    19,    24,    25,    21,    22,    21,    22,    21,    22,    24,
    25,    31,    32 ]

racc_action_check = [
     0,     0,     0,    34,     0,     0,     0,    32,    32,    32,
    35,    32,    32,    32,    31,    31,    31,    36,    31,    31,
    31,    26,    26,    26,     3,    26,    26,    26,     8,     8,
     8,    30,     8,     8,     8,    25,    25,    25,    10,    25,
    25,    25,    24,    24,    24,    23,    24,    24,    24,    11,
    11,    11,    14,    11,    11,    11,    12,    12,    12,    44,
    12,    12,    12,    13,    13,    13,    45,    13,    13,    13,
    20,    20,    20,   nil,    20,    20,    20,    21,    21,    21,
   nil,    21,    21,    21,    17,    17,    17,   nil,    17,    17,
    17,    18,    18,    18,   nil,    18,    18,    18,    19,    19,
    19,   nil,    19,    19,    19,    22,    22,    22,   nil,    22,
    22,    22,    37,    37,    37,     5,     5,     5,    38,    38,
    38,     9,     9,    40,    40,     7,     7,    41,    41,    42,
    42,    15,    15 ]

racc_action_pointer = [
    -2,   nil,   nil,    15,   nil,   105,   nil,   119,    26,   108,
    23,    47,    54,    61,    52,   115,   nil,    82,    89,    96,
    68,    75,   103,    40,    40,    33,    19,   nil,   nil,   nil,
    31,    12,     5,   nil,    -6,     1,     8,   102,   108,   nil,
   117,   121,   116,   nil,    44,    51 ]

racc_action_default = [
   -27,    -6,   -10,   -12,    -2,   -16,    -3,   -19,   -27,   -22,
   -24,   -27,   -27,   -27,   -27,    -1,    -5,   -27,   -27,   -27,
   -27,   -27,   -27,   -27,   -27,   -27,   -27,    -7,    -8,    -9,
   -27,   -27,   -27,   -11,   -14,   -15,   -13,   -17,   -18,    -4,
   -20,   -21,   -23,    46,   -25,   -26 ]

racc_goto_table = [
    14,    27,    28,    29,    34,    35,    36,    33,    23,    37,
    38,    40,    41,    44,    45,    42 ]

racc_goto_check = [
     1,     5,     5,     5,     6,     6,     6,     5,     1,     7,
     7,     8,     8,    10,    10,     9 ]

racc_goto_pointer = [
   nil,     0,   nil,   nil,   nil,   -10,   -14,   -12,   -13,   -11,
   -18 ]

racc_goto_default = [
   nil,   nil,    15,    16,     1,     2,     3,     5,     7,     9,
    10 ]

racc_token_table = {
 false => 0,
 Object.new => 1,
 :IDENT => 2,
 :NUMBER => 3,
 "(" => 4,
 ")" => 5,
 "+" => 6,
 "-" => 7,
 "~" => 8,
 :MULT2 => 9,
 "*" => 10,
 "/" => 11,
 "%" => 12,
 :LSHIFT => 13,
 :RSHIFT => 14,
 "&" => 15,
 "|" => 16,
 "^" => 17 }

racc_use_result_var = true

racc_nt_base = 18

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',
'IDENT',
'NUMBER',
'"("',
'")"',
'"+"',
'"-"',
'"~"',
'MULT2',
'"*"',
'"/"',
'"%"',
'LSHIFT',
'RSHIFT',
'"&"',
'"|"',
'"^"',
'$start',
'exp',
'bitwise_or',
'literal',
'primary',
'unary',
'exponent',
'multiplicative',
'additive',
'shift',
'bitwise_and']

Racc_debug_parser = false

##### racc system variables end #####

 # reduce 0 omitted

 # reduce 1 omitted

module_eval <<'.,.,', 'lib/einstein/parser.racc', 5
  def _reduce_2( val, _values, result )
 result = [:resolve, val.first]
   result
  end
.,.,

module_eval <<'.,.,', 'lib/einstein/parser.racc', 6
  def _reduce_3( val, _values, result )
 result = [:lit, val.first]
   result
  end
.,.,

module_eval <<'.,.,', 'lib/einstein/parser.racc', 8
  def _reduce_4( val, _values, result )
 result = val[1]
   result
  end
.,.,

 # reduce 5 omitted

 # reduce 6 omitted

module_eval <<'.,.,', 'lib/einstein/parser.racc', 12
  def _reduce_7( val, _values, result )
 result = [:unary_plus, val[1]]
   result
  end
.,.,

module_eval <<'.,.,', 'lib/einstein/parser.racc', 13
  def _reduce_8( val, _values, result )
 result = [:unary_minus, val[1]]
   result
  end
.,.,

module_eval <<'.,.,', 'lib/einstein/parser.racc', 14
  def _reduce_9( val, _values, result )
 result = [:bitwise_not, val[1]]
   result
  end
.,.,

 # reduce 10 omitted

module_eval <<'.,.,', 'lib/einstein/parser.racc', 17
  def _reduce_11( val, _values, result )
 result = [:exponent, val[0], val[2]]
   result
  end
.,.,

 # reduce 12 omitted

module_eval <<'.,.,', 'lib/einstein/parser.racc', 20
  def _reduce_13( val, _values, result )
 result = [:multiply, val[0], val[2]]
   result
  end
.,.,

module_eval <<'.,.,', 'lib/einstein/parser.racc', 21
  def _reduce_14( val, _values, result )
 result = [:divide, val[0], val[2]]
   result
  end
.,.,

module_eval <<'.,.,', 'lib/einstein/parser.racc', 22
  def _reduce_15( val, _values, result )
 result = [:modulus, val[0], val[2]]
   result
  end
.,.,

 # reduce 16 omitted

module_eval <<'.,.,', 'lib/einstein/parser.racc', 25
  def _reduce_17( val, _values, result )
 result = [:add, val[0], val[2]]
   result
  end
.,.,

module_eval <<'.,.,', 'lib/einstein/parser.racc', 26
  def _reduce_18( val, _values, result )
 result = [:subtract, val[0], val[2]]
   result
  end
.,.,

 # reduce 19 omitted

module_eval <<'.,.,', 'lib/einstein/parser.racc', 29
  def _reduce_20( val, _values, result )
 result = [:lshift, val[0], val[2]]
   result
  end
.,.,

module_eval <<'.,.,', 'lib/einstein/parser.racc', 30
  def _reduce_21( val, _values, result )
 result = [:rshift, val[0], val[2]]
   result
  end
.,.,

 # reduce 22 omitted

module_eval <<'.,.,', 'lib/einstein/parser.racc', 33
  def _reduce_23( val, _values, result )
 result = [:bitwise_and, val[0], val[2]]
   result
  end
.,.,

 # reduce 24 omitted

module_eval <<'.,.,', 'lib/einstein/parser.racc', 36
  def _reduce_25( val, _values, result )
 result = [:bitwise_or, val[0], val[2]]
   result
  end
.,.,

module_eval <<'.,.,', 'lib/einstein/parser.racc', 37
  def _reduce_26( val, _values, result )
 result = [:bitwise_xor, val[0], val[2]]
   result
  end
.,.,

 def _reduce_none( val, _values, result )
  result
 end

  end   # class Parser

end   # module Einstein
