Class: Rattler::BackEnd::ParserGenerator::GroupMatchGenerator
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(group_match, scope = {}) ⇒ Object
11
12
13
|
# File 'lib/rattler/back_end/parser_generator/group_match_generator.rb', line 11
def gen_basic(group_match, scope={})
expr(:block) { gen_capture group_match, result_expr(group_match) }
end
|
#gen_direct_action(group_match, code, scope = {}) ⇒ Object
22
23
24
25
26
|
# File 'lib/rattler/back_end/parser_generator/group_match_generator.rb', line 22
def gen_direct_action(group_match, code, scope={})
expr :block do
gen_capture group_match, "(#{code.bind(scope, group_exprs(group_match))})"
end
end
|
#gen_dispatch_action(group_match, code, scope = {}) ⇒ Object
15
16
17
18
19
20
|
# File 'lib/rattler/back_end/parser_generator/group_match_generator.rb', line 15
def gen_dispatch_action(group_match, code, scope={})
expr :block do
gen_capture group_match,
code.bind(scope, "[#{group_exprs(group_match).join ', '}]")
end
end
|