Class: Rattler::BackEnd::ParserGenerator::FailGenerator
- Inherits:
-
ExprGenerator
- Object
- ExprGenerator
- Rattler::BackEnd::ParserGenerator::FailGenerator
- Defined in:
- lib/rattler/back_end/parser_generator/fail_generator.rb
Direct Known Subclasses
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from ExprGenerator
#gen_direct_action, #gen_dispatch_action, #gen_intermediate, #gen_intermediate_assert, #gen_intermediate_disallow, #gen_intermediate_skip, #gen_token, #initialize
Methods included from Parsers
Constructor Details
This class inherits a constructor from Rattler::BackEnd::ParserGenerator::ExprGenerator
Class Method Details
.nested(*args) ⇒ Object
38 39 40 |
# File 'lib/rattler/back_end/parser_generator/fail_generator.rb', line 38 def FailGenerator.nested(*args) NestedFailGenerator.new(*args) end |
.top_level(*args) ⇒ Object
47 48 49 |
# File 'lib/rattler/back_end/parser_generator/fail_generator.rb', line 47 def FailGenerator.top_level(*args) TopLevelFailGenerator.new(*args) end |
Instance Method Details
#gen_basic(fail, scope = {}) ⇒ Object
:nodoc:
8 9 10 11 12 13 14 |
# File 'lib/rattler/back_end/parser_generator/fail_generator.rb', line 8 def gen_basic(fail, scope={}) case fail.attrs[:type] when :expr then gen_fail_expr fail. when :rule then gen_fail_rule fail. when :parse then gen_fail_parse fail. end end |