Class: Rattler::BackEnd::ParserGenerator::DirectActionGenerator

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

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

Methods included from Parsers

define

Constructor Details

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

Class Method Details

.nested(*args) ⇒ Object



31
32
33
# File 'lib/rattler/back_end/parser_generator/direct_action_generator.rb', line 31

def DirectActionGenerator.nested(*args)
  NestedDirectActionGenerator.new(*args)
end

.top_level(*args) ⇒ Object



41
42
43
# File 'lib/rattler/back_end/parser_generator/direct_action_generator.rb', line 41

def DirectActionGenerator.top_level(*args)
  TopLevelDirectActionGenerator.new(*args)
end

Instance Method Details

#gen_basic(action, scope = {}) ⇒ Object



11
12
13
# File 'lib/rattler/back_end/parser_generator/direct_action_generator.rb', line 11

def gen_basic(action, scope={})
  generate action.child, :direct_action, action.bindable_code, scope
end

#gen_direct_action(inner, code, scope = {}) ⇒ Object



19
20
21
# File 'lib/rattler/back_end/parser_generator/direct_action_generator.rb', line 19

def gen_direct_action(inner, code, scope={})
  super { gen_nested inner, :basic, scope }
end

#gen_dispatch_action(inner, code, scope = {}) ⇒ Object



15
16
17
# File 'lib/rattler/back_end/parser_generator/direct_action_generator.rb', line 15

def gen_dispatch_action(inner, code, scope={})
  super { gen_nested inner, :basic, scope }
end