Class: Rattler::Compiler::ParserGenerator::LabelGenerator

Inherits:
ExprGenerator
  • Object
show all
Includes:
PredicatePropogating, SkipPropogating, TokenPropogating
Defined in:
lib/rattler/compiler/parser_generator/label_generator.rb

Direct Known Subclasses

NestedLabelGenerator, TopLevelLabelGenerator

Class Method Summary collapse

Instance Method Summary collapse

Methods included from SkipPropogating

#gen_intermediate_skip, #gen_skip

Methods included from TokenPropogating

#gen_token

Methods included from PredicatePropogating

#gen_assert, #gen_disallow, #gen_intermediate_assert, #gen_intermediate_disallow

Methods inherited from ExprGenerator

#gen_intermediate, #gen_intermediate_assert, #gen_intermediate_disallow, #gen_intermediate_skip, #gen_token, #initialize

Constructor Details

This class inherits a constructor from Rattler::Compiler::ParserGenerator::ExprGenerator

Class Method Details

.nested(*args) ⇒ Object



23
24
25
# File 'lib/rattler/compiler/parser_generator/label_generator.rb', line 23

def LabelGenerator.nested(*args)
  NestedLabelGenerator.new(*args)
end

.top_level(*args) ⇒ Object



33
34
35
# File 'lib/rattler/compiler/parser_generator/label_generator.rb', line 33

def LabelGenerator.top_level(*args)
  TopLevelLabelGenerator.new(*args)
end

Instance Method Details

#gen_basic(label, scope = ParserScope.empty) ⇒ Object



11
12
13
# File 'lib/rattler/compiler/parser_generator/label_generator.rb', line 11

def gen_basic(label, scope = ParserScope.empty)
  generate label.child, :basic, scope
end