Class: Rattler::BackEnd::ParserGenerator::LabelGenerator
Class Method Summary
collapse
Instance Method Summary
collapse
#gen_intermediate_skip, #gen_skip
#gen_token
#gen_assert, #gen_disallow, #gen_intermediate_assert, #gen_intermediate_disallow
#gen_intermediate, #gen_intermediate_assert, #gen_intermediate_disallow, #gen_intermediate_skip, #gen_token, #initialize
Methods included from Parsers
define
Class Method Details
.top_level(*args) ⇒ Object
Instance Method Details
#gen_basic(label, scope = {}) ⇒ Object
11
12
13
|
# File 'lib/rattler/back_end/parser_generator/label_generator.rb', line 11
def gen_basic(label, scope={})
generate label.child, :basic, scope
end
|
#gen_direct_action(label, code, scope = {}) ⇒ Object
22
23
24
25
26
27
28
|
# File 'lib/rattler/back_end/parser_generator/label_generator.rb', line 22
def gen_direct_action(label, code, scope={})
expr :block do
scope = gen_capturing label.child, scope, label.label
(@g << ' &&').newline
@g.surround('(', ')') { @g << code.bind(scope, direct_action_args) }
end
end
|
#gen_dispatch_action(label, code, scope = {}) ⇒ Object
15
16
17
18
19
20
|
# File 'lib/rattler/back_end/parser_generator/label_generator.rb', line 15
def gen_dispatch_action(label, code, scope={})
expr :block do
scope = gen_capturing label.child, scope, label.label
(@g << ' &&').newline << code.bind(scope, dispatch_action_args)
end
end
|