gettable (RubyParser)

    # File lib/ruby_parser_extras.rb, line 301
      def gettable(id)
        raise "no: #{id.inspect}" if Sexp === id
        id = id.to_sym if Sexp   === id # HACK
        id = id.to_sym if String === id # HACK

        return s(:self)                  if id == :self
        return s(:nil)                   if id == :nil
        return s(:true)                  if id == :true
        return s(:false)                 if id == :false
        return s(:str, self.file)        if id == "__FILE__""__FILE__"
        return s(:lit, lexer.src.current_line) if id == "__LINE__""__LINE__"

        result = case id.to_s
                 when /^@@/ then
                   s(:cvar, id)
                 when /^@/ then
                   s(:ivar, id)
                 when /^\$/ then
                   s(:gvar, id)
                 when /^[A-Z]/ then
                   s(:const, id)
                 else
                   type = env[id]
                   if type then
                     s(type, id)
                   elsif env.dynamic? and :dvar == env[id] then
                     s(:lvar, id)
                   else
                     s(:call, nil, id, s(:arglist))
                   end
                 end

        return result if result

        raise "identifier #{id.inspect} is not valid"
      end