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

require 'racc/parser.rb'

$lines = []
$used_q = []
def get_lineno(token)
  nline = 0
  $used_q.each{ |t|
    nline += 1 if t[0] == :EOL
    break if t[1] == token
  }
  $lines[nline][0]
end

def get_line(token)
  nline = 0
  $used_q.each{ |t|
    nline += 1 if t[0] == :EOL
    break if t[1] == token
  }
  $lines[nline][1]
end

class KernelParser < Racc::Parser

module_eval(<<'...end kernelparser.y/module_eval...', 'kernelparser.y', 155)
def vartype(string)
[[:F64VEC,:F64,:F32VEC,:F32,:F16VEC,:F16,:S64,:U64,:S32,:U32,:S16,:U16][["F64vec","F64","F32vec","F32","F16vec","F16","S64","U64","S32","U32","S16","U16"].index(string)],string]
end
def iotype(string)
[[:EPI,:EPJ,:FORCE,:MEMBER,:ACCUM,:TABLE][["EPI","EPJ","FORCE","MEMBER","ACCUM","TABLE"].index(string)], string]
end
def dim(string)
  [[:x,:y,:z,:xx,:yy,:zz,:xy,:xz,:yz,:yx,:zx,:zy][["x","y","z","xx","yy","zz","xy","xz","yz","yx","zx","zy"].index(string)],string]
end

def parse(filename)
  @q=[]
  open(filename){ |f|
    count = 0
    f.each_line{|str|
      a=str.chomp.split(/(\/\/|\s|:|\=\=|\!\=|\+\=|-\=|\*\=|\&\&|\|\||\&|\||\+|-|\*|\/|\=|\(|\)|,|\.|>\=|<\=|>|<|\[|\]|;|~|\^)/).select{|s| s=~/\S+/}
      symbols = /^(\=\=|\!\=|\&\&|\|\||\&|\||\+|-|\*|\/|\(|\)|,|\.|>\=|<\=|>|<|\[|\]|\{|\})$/
      if a == [] || a[0] == "//"
        next
      end
      count += 1
      $lines.push([count,str])
      if a[0] =~ /(EPI|EPJ|FORCE|MEMBER|ACCUM|TABLE)/ && a[1] != '.'
        io = a[0]
        @q << iotype(a.shift) # iotype
      end
      if a[0] == "static"
        @q << ["static",a.shift]
      elsif a[0] == "local"
        @q << ["local",a.shift]
      end

      if a[0] =~ /(F(64|32|16)|F(64|32|16)vec|(U|S)(64|32|16))/
        @q << vartype(a.shift) # type
        @q << [:IDENT, a.shift] # varname
        if io != nil && a[0] == ":"
          @q << [":",a.shift] # :
          @q << [:IDENT, a.shift] # fdpsname
        end
      elsif a[0] == "function"
        #      print "function decl"
        @q << ["function", a.shift]
        @q << [:IDENT, a.shift]
        @q << ["(", a.shift]
        a.each{|x|
          if x =~ /(F(64|32|16)|F(64|32|16)vec|(U|S)(64|32|16))/
            @q << vartype(x)
          elsif x  == ','
            @q << [',', x]
          elsif x  == ')'
            @q << [')', x]
	  elsif x == "//"
	       break
          else
            @q << [:IDENT, x]
          end
        }
      elsif a[0] == "return"
        @q << ["return", a.shift]
        a.each{ |x|
          if x =~ symbols
            @q << [x, x]
	  elsif x =~ /^\d+(f|h|s|l|u|us|ul)?$/
            @q << [:DEC, x]
	  elsif x == "//"
		break
          else
            @q << [:IDENT, x]
          end
        }
      elsif a[0] == "end"
        @q << ["end", a.shift]
      elsif a[0] == "#pragma"
        #p a
        @q << ["#pragma",a.shift]
        a.each{|x|
	  if x == "//"
	       break
	  else
	    @q << [:TEXT,x]
          end
	       
        }
      elsif a[0] == "if"
        @q << ["if","if"]
        a.shift
        a.each{|x|
	  if x =~ symbols
	    @q << [x,x]
	  elsif x =~ /^\d+(f|h|s|l|u|us|ul)?$/
            @q << [:DEC, x]
	  elsif x == "//"
	    break
          else
            @q << [:IDENT, x]
	  end
        }
      elsif a[0] == "elsif"
        @q << ["elsif","elsif"]
        a.shift
        a.each{|x|
	  if x =~ symbols
	    @q << [x,x]
	  elsif x =~ /^\d+(f|h|s|l|u|us|ul)?$/
	    @q << [:DEC, x]
	  elsif x == "//"
	    break
	  else
            @q << [:IDENT, x]
	  end
        }
      elsif a[0] == "else"
        @q << ["else","else"]
      elsif a[0] == "endif"
        @q << ["endif","endif"]
      elsif a[1] =~ /(\=|\+\=|-\=)/
        #print "statement \n"
        @q << [:IDENT,a.shift]
        #p a
        @q << [a[0], a[0]]
        a.shift
        a.each{|x|
          if x =~ symbols
            @q << [x,x]
	  elsif x =~/^\d+(f|h|s|l|u|us|ul)?$/
            @q << [:DEC,x]
          elsif x == "//"
	    break   
          else
            @q << [:IDENT,x]
          end
	}
      elsif a[3] =~ /(\=|\+\=|-\=)/
        #print "statement \n"
        @q << [:IDENT,a.shift] # var
        @q << [a[0], a[0]]    #.
        a.shift
        @q << [:IDENT,a.shift]
        @q << [a[0], a[0]]    # =|+=|-=|*=|/=
        a.shift
        a.each{|x|
          if x =~ symbols
            @q << [x,x]
	  elsif x =~/^\d+(f|h|s|l|u|us|ul)?$/
            @q << [:DEC,x]
	  elsif x == "break"
	    break
          else
            @q << [:IDENT,x]
          end
        }
      else
        warn "error: unsupported DSL description"
        warn "  line #{f.lineno}: #{str}"
        abort
      end
      @q << [:EOL,:EOL]
    }
    @q << nil
    do_parse
  }
end

def next_token
  tmp = @q.shift
  $used_q << tmp
  tmp
end


def on_error(id,val,stack)
  #lineno = get_lineno(val)
  #line   = get_line(val)
  line0 = []
  $used_q.reverse_each{ |v|
    break if v[1] == :EOL
    line0.push(v[1])
  }
  line0 = "parse error: " + line0.reverse.join('')

  line1 = []
  @q.each{ |v|
    break if v[1] == :EOL
    line1.push(v[1])
  }
  line1 = line1.join('')

  #warning = "parse error :line #{lineno}: #{line}"
  warning = line0 + line1 + "\n"
  for i in 1..line0.length
    warning += " "
  end
  warning += "^"
  abort warning
end
...end kernelparser.y/module_eval...
##### State transition tables begin ###

racc_action_table = [
   116,    64,    73,    64,    72,    64,    96,    97,    94,    95,
    71,    64,   110,    64,   166,    64,    69,    64,    59,    64,
    51,    67,    62,    67,    62,    67,    62,    64,    49,    64,
    10,    67,    62,    67,    62,    67,    62,    67,    62,    67,
    62,   165,    73,    96,    97,    94,    95,    67,    62,    67,
    62,    96,    97,    64,    68,    64,    68,   156,    68,   111,
   112,   113,   114,   115,    68,    64,    68,    64,    68,    64,
    68,    64,    68,    67,    62,    67,    62,    64,    87,    64,
    68,    64,    68,    64,   120,    67,    62,    67,    62,    67,
    62,    67,    62,    64,    92,    64,   160,    67,    62,    67,
    62,    67,    62,    67,    62,    64,    68,    64,    68,    96,
    97,    94,    95,    67,    62,    67,    62,    64,    68,    64,
    68,    64,    68,   161,    68,    67,    62,    67,    62,   162,
    68,   170,    68,    58,    68,   160,    68,    67,    62,    67,
    62,    67,    62,   167,   166,   172,    68,    51,    68,    54,
    55,    96,    97,    94,    95,    37,    48,   175,    68,    36,
    68,    96,    97,    94,    95,   105,   104,   107,   106,   158,
    68,    93,    68,    84,    68,   168,   169,    83,    53,    56,
    57,    58,    31,    32,    33,    34,    35,    10,    36,   163,
   164,    81,    12,    13,    14,    15,    16,    17,    18,    19,
    20,    21,    22,    23,    24,    25,    26,    27,    96,    97,
    48,    31,    32,    33,    34,    35,    10,    36,   117,   120,
    68,    12,    13,    14,    15,    16,    17,    18,    19,    20,
    21,    22,    23,    24,    25,    26,    27,    36,   122,    51,
    31,    32,    33,    34,    35,    36,    51,    81,   126,   127,
    36,    96,    97,    94,    95,   105,   104,   107,   106,    51,
    31,    32,    33,    34,    35,   131,   132,   136,    31,    32,
    33,    34,    35,    31,    32,    33,    34,    35,    96,    97,
    94,    95,   105,   104,   107,   106,   100,   101,    98,    99,
   102,   103,    43,    44,   137,   138,   139,    51,    74,   nil,
   nil,   nil,   nil,   154,   nil,    16,    17,    18,    19,    20,
    21,    22,    23,    24,    25,    26,    27,    96,    97,    94,
    95,   105,   104,   107,   106,   100,   101,    98,    99,   102,
   103,    96,    97,    94,    95,   105,   104,   107,   106,   100,
   101,    98,    99,   102,   103,    96,    97,    94,    95,   105,
   104,   107,   106,   100,   101,    98,    99,    96,    97,    94,
    95,   105,   104,   107,   106,   100,   101,    98,    99,    16,
    17,    18,    19,    20,    21,    22,    23,    24,    25,    26,
    27,    16,    17,    18,    19,    20,    21,    22,    23,    24,
    25,    26,    27,    96,    97,    94,    95,   105,   104,   107,
   106,   100,   101,    96,    97,    94,    95,   105,   104,   107,
   106,   100,   101 ]

racc_action_check = [
    68,    57,    36,   166,    35,   110,   153,   153,   153,   153,
    34,   107,    67,   106,   134,   105,    32,   104,    30,   103,
    11,    57,    57,   166,   166,   110,   110,    55,    10,    53,
     8,   107,   107,   106,   106,   105,   105,   104,   104,   103,
   103,   134,    67,   150,   150,   150,   150,    55,    55,    53,
    53,   141,   141,    54,    57,    56,   166,   116,   110,    68,
    68,    68,    68,    68,   107,   102,   106,    31,   105,   101,
   104,    33,   103,    54,    54,    56,    56,   100,    53,    99,
    55,    98,    53,    97,   118,   102,   102,    31,    31,   101,
   101,    33,    33,    96,    58,    95,   122,   100,   100,    99,
    99,    98,    98,    97,    97,    94,    54,    87,    56,   151,
   151,   151,   151,    96,    96,    95,    95,    48,   102,    64,
    31,    62,   101,   123,    33,    94,    94,    87,    87,   124,
   100,   159,    99,    29,    98,   161,    97,    48,    48,    64,
    64,    62,    62,   155,   155,   163,    96,   164,    95,    29,
    29,   152,   152,   152,   152,     1,     9,   171,    94,     9,
    87,   146,   146,   146,   146,   146,   146,   146,   146,   121,
    48,    60,    64,    50,    62,   156,   156,    49,    29,    29,
    29,    65,     9,     9,     9,     9,     9,     0,     0,   128,
   128,    47,     0,     0,     0,     0,     0,     0,     0,     0,
     0,     0,     0,     0,     0,     0,     0,     0,   140,   140,
    46,     0,     0,     0,     0,     0,     2,     2,    70,    72,
    73,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     3,    76,    77,
     2,     2,     2,     2,     2,    38,    78,    79,    81,    82,
    28,   147,   147,   147,   147,   147,   147,   147,   147,    83,
     3,     3,     3,     3,     3,    85,    86,    88,    38,    38,
    38,    38,    38,    28,    28,    28,    28,    28,   108,   108,
   108,   108,   108,   108,   108,   108,   108,   108,   108,   108,
   108,   108,     6,     6,    89,    90,    91,    42,    37,   nil,
   nil,   nil,   nil,   108,   nil,     6,     6,     6,     6,     6,
     6,     6,     6,     6,     6,     6,     6,    61,    61,    61,
    61,    61,    61,    61,    61,    61,    61,    61,    61,    61,
    61,   133,   133,   133,   133,   133,   133,   133,   133,   133,
   133,   133,   133,   133,   133,   149,   149,   149,   149,   149,
   149,   149,   149,   149,   149,   149,   149,   148,   148,   148,
   148,   148,   148,   148,   148,   148,   148,   148,   148,    44,
    44,    44,    44,    44,    44,    44,    44,    44,    44,    44,
    44,    43,    43,    43,    43,    43,    43,    43,    43,    43,
    43,    43,    43,   144,   144,   144,   144,   144,   144,   144,
   144,   144,   144,   145,   145,   145,   145,   145,   145,   145,
   145,   145,   145 ]

racc_action_pointer = [
   161,   155,   190,   210,   nil,   nil,   270,   nil,     4,   132,
     1,    -7,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   223,   131,
    -3,    60,    -5,    64,   -11,   -51,   -56,   298,   218,   nil,
   nil,   nil,   270,   346,   334,   nil,   186,   166,   110,   149,
   152,   nil,   nil,    22,    46,    20,    48,    -6,    67,   nil,
   150,   313,   114,   nil,   112,   179,   nil,   -16,    -2,   nil,
   197,   nil,   164,   160,   nil,   nil,   218,   212,   219,   222,
   nil,   227,   228,   232,   nil,   244,   245,   100,   246,   273,
   274,   275,   nil,   nil,    98,    88,    86,    76,    74,    72,
    70,    62,    58,    12,    10,     8,     6,     4,   274,   nil,
    -2,   nil,   nil,   nil,   nil,   nil,    -3,   nil,    29,   nil,
   nil,   110,    69,   103,   108,   nil,   nil,   nil,   160,   nil,
   nil,   nil,   nil,   327,   -16,   nil,   nil,   nil,   nil,   nil,
   204,    47,   nil,   nil,   389,   399,   157,   247,   353,   341,
    39,   105,   147,     2,   nil,   114,   109,   nil,   nil,   110,
   nil,   108,   nil,   124,   120,   nil,    -4,   nil,   nil,   nil,
   nil,   136,   nil,   nil,   nil,   nil ]

racc_action_default = [
   -95,   -95,   -95,   -95,    -4,    -5,   -95,   -10,   -11,   -95,
   -95,   -95,   -22,   -23,   -24,   -25,   -26,   -27,   -28,   -29,
   -30,   -31,   -32,   -33,   -34,   -35,   -36,   -37,   -40,   -95,
   -95,   -95,   -95,   -95,   -95,   -95,   -83,   -95,   -95,    -2,
    -6,    -3,   -95,   -95,   -95,   -12,   -95,   -95,   -95,   -95,
   -95,   -38,   -41,   -95,   -95,   -95,   -95,   -95,   -95,   -48,
   -95,   -58,   -95,   -74,   -95,   -76,   -77,   -83,   -86,   -50,
   -95,   -52,   -53,   -95,   176,    -1,   -95,   -95,   -95,   -95,
   -14,   -95,   -95,   -95,   -21,   -95,   -95,   -95,   -95,   -95,
   -95,   -95,   -84,   -49,   -95,   -95,   -95,   -95,   -95,   -95,
   -95,   -95,   -95,   -95,   -95,   -95,   -95,   -95,   -95,   -75,
   -95,   -87,   -88,   -89,   -90,   -91,   -95,   -51,   -54,   -55,
   -57,   -95,   -95,   -95,   -95,   -13,   -16,   -15,   -95,   -18,
   -20,   -42,   -43,   -82,   -95,   -80,   -44,   -45,   -46,   -47,
   -59,   -60,   -61,   -62,   -63,   -64,   -65,   -66,   -67,   -68,
   -69,   -70,   -71,   -72,   -73,   -95,   -92,   -56,   -85,   -95,
   -39,   -95,    -9,   -95,   -95,   -78,   -95,   -79,   -93,   -94,
    -7,   -95,   -17,   -19,   -81,    -8 ]

racc_goto_table = [
   108,   129,   109,     3,   119,    38,   134,   159,     5,   174,
    40,    45,     2,   128,    42,    86,   118,    47,    50,    29,
   121,    29,    29,     1,   nil,   133,    80,   nil,    29,   155,
   nil,   nil,   140,   141,   142,   143,   144,   145,   146,   147,
   148,   149,   150,   151,   152,   153,   171,    29,   133,    76,
   157,    77,    78,     4,    79,    39,    41,    29,   125,   nil,
   nil,   nil,    46,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
    60,   nil,    70,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
   nil,    52,   173,   nil,   123,   124,   nil,    82,   nil,   nil,
   nil,    75,    85,    88,    89,    90,    91,   nil,   nil,   nil,
   nil,   nil,   nil,   nil,   133 ]

racc_goto_check = [
    24,    17,    24,     3,    23,     3,    27,     9,     5,    28,
     5,     3,     2,    16,     7,    20,    22,    13,     8,    19,
    26,    19,    19,     1,   nil,    24,    14,   nil,    19,    27,
   nil,   nil,    24,    24,    24,    24,    24,    24,    24,    24,
    24,    24,    24,    24,    24,    24,     9,    19,    24,     8,
    23,     7,     7,     4,    13,     4,     4,    19,    14,   nil,
   nil,   nil,     4,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
    15,   nil,    15,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
   nil,     4,    17,   nil,     8,     8,   nil,    15,   nil,   nil,
   nil,     4,    15,    15,    15,    15,    15,   nil,   nil,   nil,
   nil,   nil,   nil,   nil,    24 ]

racc_goto_pointer = [
   nil,    23,    12,     3,    53,     8,   nil,     8,     7,  -115,
   nil,   nil,   nil,     8,   -21,    39,   -70,   -82,   nil,    19,
   -38,   nil,   -56,   -68,   -62,   nil,   -53,   -81,  -157 ]

racc_goto_default = [
   nil,   nil,   nil,   nil,   nil,   nil,     6,    11,   130,   nil,
     7,     8,     9,   nil,   nil,   nil,   nil,   nil,    28,    65,
   nil,    30,   nil,   nil,    61,    63,    66,   nil,   135 ]

racc_reduce_table = [
  0, 0, :racc_error,
  3, 69, :_reduce_1,
  2, 69, :_reduce_2,
  2, 69, :_reduce_3,
  1, 69, :_reduce_4,
  1, 70, :_reduce_none,
  2, 70, :_reduce_6,
  6, 73, :_reduce_7,
  7, 73, :_reduce_8,
  5, 73, :_reduce_9,
  1, 73, :_reduce_none,
  1, 71, :_reduce_none,
  2, 71, :_reduce_12,
  4, 79, :_reduce_13,
  3, 79, :_reduce_14,
  3, 81, :_reduce_15,
  2, 82, :_reduce_none,
  6, 80, :_reduce_17,
  1, 84, :_reduce_none,
  3, 84, :_reduce_19,
  1, 85, :_reduce_20,
  3, 78, :_reduce_21,
  1, 74, :_reduce_none,
  1, 74, :_reduce_none,
  1, 74, :_reduce_none,
  1, 74, :_reduce_none,
  1, 75, :_reduce_none,
  1, 75, :_reduce_none,
  1, 75, :_reduce_none,
  1, 75, :_reduce_none,
  1, 75, :_reduce_none,
  1, 75, :_reduce_none,
  1, 75, :_reduce_none,
  1, 75, :_reduce_none,
  1, 75, :_reduce_none,
  1, 75, :_reduce_none,
  1, 75, :_reduce_none,
  1, 75, :_reduce_none,
  1, 76, :_reduce_none,
  1, 77, :_reduce_none,
  1, 72, :_reduce_none,
  2, 72, :_reduce_41,
  4, 86, :_reduce_42,
  4, 86, :_reduce_43,
  4, 86, :_reduce_44,
  4, 86, :_reduce_45,
  4, 86, :_reduce_46,
  4, 86, :_reduce_47,
  2, 86, :_reduce_48,
  3, 86, :_reduce_49,
  2, 86, :_reduce_50,
  3, 86, :_reduce_51,
  2, 86, :_reduce_52,
  2, 89, :_reduce_53,
  3, 89, :_reduce_54,
  1, 90, :_reduce_55,
  2, 90, :_reduce_56,
  1, 91, :_reduce_57,
  1, 83, :_reduce_none,
  3, 92, :_reduce_59,
  3, 92, :_reduce_60,
  3, 92, :_reduce_61,
  3, 92, :_reduce_62,
  3, 92, :_reduce_63,
  3, 92, :_reduce_64,
  3, 92, :_reduce_65,
  3, 92, :_reduce_66,
  3, 92, :_reduce_67,
  3, 92, :_reduce_68,
  3, 92, :_reduce_69,
  3, 92, :_reduce_70,
  3, 92, :_reduce_71,
  3, 92, :_reduce_72,
  3, 92, :_reduce_73,
  1, 92, :_reduce_74,
  2, 92, :_reduce_75,
  1, 92, :_reduce_none,
  1, 92, :_reduce_none,
  3, 88, :_reduce_78,
  4, 93, :_reduce_79,
  1, 95, :_reduce_none,
  3, 95, :_reduce_81,
  1, 96, :_reduce_82,
  1, 87, :_reduce_83,
  3, 87, :_reduce_84,
  4, 87, :_reduce_85,
  1, 94, :_reduce_86,
  2, 94, :_reduce_87,
  2, 94, :_reduce_88,
  2, 94, :_reduce_89,
  2, 94, :_reduce_90,
  2, 94, :_reduce_91,
  3, 94, :_reduce_92,
  4, 94, :_reduce_93,
  4, 94, :_reduce_94 ]

racc_reduce_n = 95

racc_shift_n = 176

racc_token_table = {
  false => 0,
  :error => 1,
  "." => 2,
  :UMINUS => 3,
  "*" => 4,
  "/" => 5,
  "+" => 6,
  "-" => 7,
  "<" => 8,
  ">" => 9,
  "<=" => 10,
  ">=" => 11,
  "&" => 12,
  "|" => 13,
  "==" => 14,
  "!=" => 15,
  "&&" => 16,
  "||" => 17,
  "+=" => 18,
  "-=" => 19,
  ":" => 20,
  :EOL => 21,
  "static" => 22,
  "local" => 23,
  "return" => 24,
  "end" => 25,
  "function" => 26,
  :IDENT => 27,
  "(" => 28,
  ")" => 29,
  "," => 30,
  :EPI => 31,
  :EPJ => 32,
  :FORCE => 33,
  :TABLE => 34,
  :F64VEC => 35,
  :F64 => 36,
  :F32VEC => 37,
  :F32 => 38,
  :F16VEC => 39,
  :F16 => 40,
  :S64 => 41,
  :U64 => 42,
  :S32 => 43,
  :U32 => 44,
  :S16 => 45,
  :U16 => 46,
  "=" => 47,
  "*=" => 48,
  "/=" => 49,
  "if" => 50,
  "else" => 51,
  "elsif" => 52,
  "endif" => 53,
  "#pragma" => 54,
  :TEXT => 55,
  "{" => 56,
  "}" => 57,
  "[" => 58,
  "]" => 59,
  :DEC => 60,
  "l" => 61,
  "s" => 62,
  "u" => 63,
  "ul" => 64,
  "us" => 65,
  "f" => 66,
  "h" => 67 }

racc_nt_base = 68

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",
  "\".\"",
  "UMINUS",
  "\"*\"",
  "\"/\"",
  "\"+\"",
  "\"-\"",
  "\"<\"",
  "\">\"",
  "\"<=\"",
  "\">=\"",
  "\"&\"",
  "\"|\"",
  "\"==\"",
  "\"!=\"",
  "\"&&\"",
  "\"||\"",
  "\"+=\"",
  "\"-=\"",
  "\":\"",
  "EOL",
  "\"static\"",
  "\"local\"",
  "\"return\"",
  "\"end\"",
  "\"function\"",
  "IDENT",
  "\"(\"",
  "\")\"",
  "\",\"",
  "EPI",
  "EPJ",
  "FORCE",
  "TABLE",
  "F64VEC",
  "F64",
  "F32VEC",
  "F32",
  "F16VEC",
  "F16",
  "S64",
  "U64",
  "S32",
  "U32",
  "S16",
  "U16",
  "\"=\"",
  "\"*=\"",
  "\"/=\"",
  "\"if\"",
  "\"else\"",
  "\"elsif\"",
  "\"endif\"",
  "\"#pragma\"",
  "TEXT",
  "\"{\"",
  "\"}\"",
  "\"[\"",
  "\"]\"",
  "DEC",
  "\"l\"",
  "\"s\"",
  "\"u\"",
  "\"ul\"",
  "\"us\"",
  "\"f\"",
  "\"h\"",
  "$start",
  "innerkernel",
  "iodeclarations",
  "functions",
  "statements",
  "iodeclaration",
  "iotype",
  "type",
  "varname",
  "fdpsname",
  "declaration",
  "function",
  "funcdeclaration",
  "ret_state",
  "end_state",
  "expression",
  "operands",
  "operand",
  "statement",
  "var",
  "table",
  "pragma",
  "options",
  "option",
  "binary",
  "funccall",
  "number",
  "args",
  "arg" ]

Racc_debug_parser = false

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

# reduce 0 omitted

module_eval(<<'.,.,', 'kernelparser.y', 18)
  def _reduce_1(val, _values, result)
    result=Kernelprogram.new(val)
    result
  end
.,.,

module_eval(<<'.,.,', 'kernelparser.y', 19)
  def _reduce_2(val, _values, result)
    result=Kernelprogram.new(val)
    result
  end
.,.,

module_eval(<<'.,.,', 'kernelparser.y', 20)
  def _reduce_3(val, _values, result)
    result=Kernelprogram.new(val)
    result
  end
.,.,

module_eval(<<'.,.,', 'kernelparser.y', 21)
  def _reduce_4(val, _values, result)
    result=Kernelprogram.new(val)
    result
  end
.,.,

# reduce 5 omitted

module_eval(<<'.,.,', 'kernelparser.y', 23)
  def _reduce_6(val, _values, result)
    result = val[0]+val[1]
    result
  end
.,.,

module_eval(<<'.,.,', 'kernelparser.y', 24)
  def _reduce_7(val, _values, result)
    result = [Iodeclaration.new([val[0],val[1],val[2],val[4],nil])]
    result
  end
.,.,

module_eval(<<'.,.,', 'kernelparser.y', 25)
  def _reduce_8(val, _values, result)
    result = [Iodeclaration.new([val[0],val[2],val[3],val[5],"static"])]
    result
  end
.,.,

module_eval(<<'.,.,', 'kernelparser.y', 26)
  def _reduce_9(val, _values, result)
     result = [Iodeclaration.new([val[0],val[2],val[3],nil,"local"])]
    result
  end
.,.,

# reduce 10 omitted

# reduce 11 omitted

module_eval(<<'.,.,', 'kernelparser.y', 30)
  def _reduce_12(val, _values, result)
    result = val[0]+val[1]
    result
  end
.,.,

module_eval(<<'.,.,', 'kernelparser.y', 31)
  def _reduce_13(val, _values, result)
    result = [Function.new([val[0],val[1],val[2]])]
    result
  end
.,.,

module_eval(<<'.,.,', 'kernelparser.y', 32)
  def _reduce_14(val, _values, result)
    result = [Function.new([val[0],[],val[1]])]
    result
  end
.,.,

module_eval(<<'.,.,', 'kernelparser.y', 33)
  def _reduce_15(val, _values, result)
    result = ReturnState.new(val[1])
    result
  end
.,.,

# reduce 16 omitted

module_eval(<<'.,.,', 'kernelparser.y', 35)
  def _reduce_17(val, _values, result)
    result = Funcdeclaration.new([val[1],val[3]])
    result
  end
.,.,

# reduce 18 omitted

module_eval(<<'.,.,', 'kernelparser.y', 38)
  def _reduce_19(val, _values, result)
    result = val[0] + val[2]
    result
  end
.,.,

module_eval(<<'.,.,', 'kernelparser.y', 39)
  def _reduce_20(val, _values, result)
    result = [val[0]]
    result
  end
.,.,

module_eval(<<'.,.,', 'kernelparser.y', 41)
  def _reduce_21(val, _values, result)
    result = [Iodeclaration.new(["MEMBER",val[0],val[1],nil,nil])]
    result
  end
.,.,

# reduce 22 omitted

# reduce 23 omitted

# reduce 24 omitted

# reduce 25 omitted

# reduce 26 omitted

# reduce 27 omitted

# reduce 28 omitted

# reduce 29 omitted

# reduce 30 omitted

# reduce 31 omitted

# reduce 32 omitted

# reduce 33 omitted

# reduce 34 omitted

# reduce 35 omitted

# reduce 36 omitted

# reduce 37 omitted

# reduce 38 omitted

# reduce 39 omitted

# reduce 40 omitted

module_eval(<<'.,.,', 'kernelparser.y', 66)
  def _reduce_41(val, _values, result)
    result = val[0]+val[1]
    result
  end
.,.,

module_eval(<<'.,.,', 'kernelparser.y', 68)
  def _reduce_42(val, _values, result)
    result = [Statement.new([val[0],val[2]])]
    result
  end
.,.,

module_eval(<<'.,.,', 'kernelparser.y', 69)
  def _reduce_43(val, _values, result)
    result = [TableDecl.new([val[0],val[2]])]
    result
  end
.,.,

module_eval(<<'.,.,', 'kernelparser.y', 70)
  def _reduce_44(val, _values, result)
    result = [Statement.new([val[0],val[2],nil,:plus])]
    result
  end
.,.,

module_eval(<<'.,.,', 'kernelparser.y', 71)
  def _reduce_45(val, _values, result)
    result = [Statement.new([val[0],val[2],nil,:minus])]
    result
  end
.,.,

module_eval(<<'.,.,', 'kernelparser.y', 72)
  def _reduce_46(val, _values, result)
    result = [Statement.new([val[0],val[2],nil,:mult])]
    result
  end
.,.,

module_eval(<<'.,.,', 'kernelparser.y', 73)
  def _reduce_47(val, _values, result)
    result = [Statement.new([val[0],val[2],nil,:div])]
    result
  end
.,.,

module_eval(<<'.,.,', 'kernelparser.y', 74)
  def _reduce_48(val, _values, result)
    result = [val[0]]
    result
  end
.,.,

module_eval(<<'.,.,', 'kernelparser.y', 75)
  def _reduce_49(val, _values, result)
    result = [IfElseState.new([:if,val[1]])]
    result
  end
.,.,

module_eval(<<'.,.,', 'kernelparser.y', 76)
  def _reduce_50(val, _values, result)
    result = [IfElseState.new([:else,nil])]
    result
  end
.,.,

module_eval(<<'.,.,', 'kernelparser.y', 77)
  def _reduce_51(val, _values, result)
    result = [IfElseState.new([:elsif,val[1]])]
    result
  end
.,.,

module_eval(<<'.,.,', 'kernelparser.y', 78)
  def _reduce_52(val, _values, result)
    result = [IfElseState.new([:endif,nil])]
    result
  end
.,.,

module_eval(<<'.,.,', 'kernelparser.y', 79)
  def _reduce_53(val, _values, result)
    result = Pragma.new([val[1],nil])
    result
  end
.,.,

module_eval(<<'.,.,', 'kernelparser.y', 80)
  def _reduce_54(val, _values, result)
    result = Pragma.new([val[1],val[2]])
    result
  end
.,.,

module_eval(<<'.,.,', 'kernelparser.y', 81)
  def _reduce_55(val, _values, result)
     result = val[0]
    result
  end
.,.,

module_eval(<<'.,.,', 'kernelparser.y', 82)
  def _reduce_56(val, _values, result)
     result = val[0] + val[1]
    result
  end
.,.,

module_eval(<<'.,.,', 'kernelparser.y', 83)
  def _reduce_57(val, _values, result)
     result = [val[0]]
    result
  end
.,.,

# reduce 58 omitted

module_eval(<<'.,.,', 'kernelparser.y', 87)
  def _reduce_59(val, _values, result)
    result = Expression.new([:plus,  val[0], val[2]])
    result
  end
.,.,

module_eval(<<'.,.,', 'kernelparser.y', 88)
  def _reduce_60(val, _values, result)
    result = Expression.new([:minus, val[0], val[2]])
    result
  end
.,.,

module_eval(<<'.,.,', 'kernelparser.y', 89)
  def _reduce_61(val, _values, result)
    result = Expression.new([:mult,  val[0], val[2]])
    result
  end
.,.,

module_eval(<<'.,.,', 'kernelparser.y', 90)
  def _reduce_62(val, _values, result)
    result = Expression.new([:div,   val[0], val[2]])
    result
  end
.,.,

module_eval(<<'.,.,', 'kernelparser.y', 91)
  def _reduce_63(val, _values, result)
    result = Expression.new([:eq,    val[0], val[2]])
    result
  end
.,.,

module_eval(<<'.,.,', 'kernelparser.y', 92)
  def _reduce_64(val, _values, result)
    result = Expression.new([:neq,   val[0], val[2]])
    result
  end
.,.,

module_eval(<<'.,.,', 'kernelparser.y', 93)
  def _reduce_65(val, _values, result)
    result = Expression.new([:and,   val[0], val[2]])
    result
  end
.,.,

module_eval(<<'.,.,', 'kernelparser.y', 94)
  def _reduce_66(val, _values, result)
    result = Expression.new([:or,    val[0], val[2]])
    result
  end
.,.,

module_eval(<<'.,.,', 'kernelparser.y', 95)
  def _reduce_67(val, _values, result)
    result = Expression.new([:land,   val[0], val[2]])
    result
  end
.,.,

module_eval(<<'.,.,', 'kernelparser.y', 96)
  def _reduce_68(val, _values, result)
    result = Expression.new([:lor,    val[0], val[2]])
    result
  end
.,.,

module_eval(<<'.,.,', 'kernelparser.y', 97)
  def _reduce_69(val, _values, result)
    result = Expression.new([:gt,    val[0], val[2]])
    result
  end
.,.,

module_eval(<<'.,.,', 'kernelparser.y', 98)
  def _reduce_70(val, _values, result)
    result = Expression.new([:lt,    val[0], val[2]])
    result
  end
.,.,

module_eval(<<'.,.,', 'kernelparser.y', 99)
  def _reduce_71(val, _values, result)
    result = Expression.new([:ge,    val[0], val[2]])
    result
  end
.,.,

module_eval(<<'.,.,', 'kernelparser.y', 100)
  def _reduce_72(val, _values, result)
    result = Expression.new([:le,    val[0], val[2]])
    result
  end
.,.,

module_eval(<<'.,.,', 'kernelparser.y', 101)
  def _reduce_73(val, _values, result)
    result = val[1]
    result
  end
.,.,

module_eval(<<'.,.,', 'kernelparser.y', 102)
  def _reduce_74(val, _values, result)
    result = val[0]
    result
  end
.,.,

module_eval(<<'.,.,', 'kernelparser.y', 103)
  def _reduce_75(val, _values, result)
    result = Expression.new([:uminus,val[1], nil])
    result
  end
.,.,

# reduce 76 omitted

# reduce 77 omitted

module_eval(<<'.,.,', 'kernelparser.y', 107)
  def _reduce_78(val, _values, result)
    result = Table.new(val[1])
    result
  end
.,.,

module_eval(<<'.,.,', 'kernelparser.y', 109)
  def _reduce_79(val, _values, result)
    result = FuncCall.new([val[0], val[2]])
    result
  end
.,.,

# reduce 80 omitted

module_eval(<<'.,.,', 'kernelparser.y', 111)
  def _reduce_81(val, _values, result)
    result = val[0] + val[2]
    result
  end
.,.,

module_eval(<<'.,.,', 'kernelparser.y', 112)
  def _reduce_82(val, _values, result)
    result = [val[0]]
    result
  end
.,.,

module_eval(<<'.,.,', 'kernelparser.y', 114)
  def _reduce_83(val, _values, result)
    result = val[0]
    result
  end
.,.,

module_eval(<<'.,.,', 'kernelparser.y', 115)
  def _reduce_84(val, _values, result)
    result = Expression.new([:dot,val[0],val[2]])
    result
  end
.,.,

module_eval(<<'.,.,', 'kernelparser.y', 116)
  def _reduce_85(val, _values, result)
    result = Expression.new([:array,val[0],val[2]])
    result
  end
.,.,

module_eval(<<'.,.,', 'kernelparser.y', 118)
  def _reduce_86(val, _values, result)
    result = IntegerValue.new(val[0])
    result
  end
.,.,

module_eval(<<'.,.,', 'kernelparser.y', 119)
  def _reduce_87(val, _values, result)
    result = IntegerValue.new(val[0]+val[1])
    result
  end
.,.,

module_eval(<<'.,.,', 'kernelparser.y', 120)
  def _reduce_88(val, _values, result)
    result = IntegerValue.new(val[0]+val[1])
    result
  end
.,.,

module_eval(<<'.,.,', 'kernelparser.y', 121)
  def _reduce_89(val, _values, result)
    result = IntegerValue.new(val[0]+val[1])
    result
  end
.,.,

module_eval(<<'.,.,', 'kernelparser.y', 122)
  def _reduce_90(val, _values, result)
    result = IntegerValue.new(val[0]+val[1])
    result
  end
.,.,

module_eval(<<'.,.,', 'kernelparser.y', 123)
  def _reduce_91(val, _values, result)
    result = IntegerValue.new(val[0]+val[1])
    result
  end
.,.,

module_eval(<<'.,.,', 'kernelparser.y', 124)
  def _reduce_92(val, _values, result)
    result = FloatingPoint.new(val[0]+val[1]+val[2])
    result
  end
.,.,

module_eval(<<'.,.,', 'kernelparser.y', 125)
  def _reduce_93(val, _values, result)
    result = FloatingPoint.new(val[0]+val[1]+val[2]+val[3])
    result
  end
.,.,

module_eval(<<'.,.,', 'kernelparser.y', 126)
  def _reduce_94(val, _values, result)
    result = FloatingPoint.new(val[0]+val[1]+val[2]+val[3])
    result
  end
.,.,

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

end   # class KernelParser
