Method: EBNF::PEG::Parser::ClassMethods#production
- Defined in:
- lib/ebnf/peg/parser.rb
#production(term, clear_packrat: false) {|result, data, block| ... } ⇒ Object
Defines a production called when production of associated non-terminals has completed with data from previous production along with data defined for the current production. Block is called in an evaluation block from the enclosing parser.
Yield to generate a triple
144 145 146 |
# File 'lib/ebnf/peg/parser.rb', line 144 def production(term, clear_packrat: false, &block) production_handlers[term] = [block, clear_packrat] end |