def compile_parser(*args)
      options = @@defaults.dup
      grammar = nil
      for arg in args
        case arg
        when Hash then options.merge!(arg)
        when String then grammar = arg
        end
      end
      base_class = options.delete(:class) ||
        (Rattler::Runtime::const_get @@parser_types[options[:type]])
      Rattler::Compiler.compile_parser(base_class, grammar, options)
    end
def compile_parser(*args)
      options = @@defaults.dup
      grammar = nil
      for arg in args
        case arg
        when Hash then options.merge!(arg)
        when String then grammar = arg
        end
      end
      base_class = options.delete(:class) ||
        (Rattler::Runtime::const_get @@parser_types[options[:type]])
      Rattler::Compiler.compile_parser(base_class, grammar, options)
    end
Define a parser with the given grammar and compile it into a parser class
 using the given options

 @return [Class] a new parser class