class Rattler::Util::GrammarCLI

GrammarCLI defines a command line interface for generated grammars.

Public Class Methods

new(grammar_module) click to toggle source

Create a new command line interface for the given grammar module

@param [Module] grammar_module the grammar module to run the command line

interface for
Calls superclass method
# File lib/rattler/util/grammar_cli.rb, line 12
def initialize(grammar_module)
  parser_class = Class.new(Rattler::Runtime::ExtendedPackratParser)
  parser_class.module_eval { include grammar_module }
  super(parser_class)
end