Class: Rattler::Util::GrammarCLI
- Defined in:
- lib/rattler/util/grammar_cli.rb
Overview
GrammarCLI
defines a command line interface for generated grammars.
Instance Method Summary collapse
-
#initialize(grammar_module) ⇒ GrammarCLI
constructor
Create a new command line interface for the given grammar module.
Methods inherited from ParserCLI
Constructor Details
#initialize(grammar_module) ⇒ GrammarCLI
Create a new command line interface for the given grammar module
12 13 14 15 16 |
# 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 |