Class: Rattler::Compiler::ParserGenerator::DisallowGenerator
- Inherits:
-
ExprGenerator
- Object
- ExprGenerator
- Rattler::Compiler::ParserGenerator::DisallowGenerator
show all
- Defined in:
- lib/rattler/compiler/parser_generator/disallow_generator.rb
Class Method Summary
collapse
Instance Method Summary
collapse
#gen_intermediate_assert, #initialize
Class Method Details
.top_level(*args) ⇒ Object
Instance Method Details
#gen_assert(disallow, scope = ParserScope.empty) ⇒ Object
12
13
14
|
# File 'lib/rattler/compiler/parser_generator/disallow_generator.rb', line 12
def gen_assert(disallow, scope = ParserScope.empty)
@g << 'false'
end
|
#gen_basic(disallow, scope = ParserScope.empty) ⇒ Object
8
9
10
|
# File 'lib/rattler/compiler/parser_generator/disallow_generator.rb', line 8
def gen_basic(disallow, scope = ParserScope.empty)
generate disallow.child, :disallow, scope
end
|
#gen_disallow(disallow, scope = ParserScope.empty) ⇒ Object
16
17
18
|
# File 'lib/rattler/compiler/parser_generator/disallow_generator.rb', line 16
def gen_disallow(disallow, scope = ParserScope.empty)
gen_basic disallow, scope
end
|
28
29
30
|
# File 'lib/rattler/compiler/parser_generator/disallow_generator.rb', line 28
def gen_intermediate(disallow, scope = ParserScope.empty)
generate disallow.child, :intermediate_disallow, scope
end
|
32
33
34
|
# File 'lib/rattler/compiler/parser_generator/disallow_generator.rb', line 32
def gen_intermediate_disallow(disallow, scope = ParserScope.empty)
gen_intermediate disallow, scope
end
|
36
37
38
|
# File 'lib/rattler/compiler/parser_generator/disallow_generator.rb', line 36
def gen_intermediate_skip(disallow, scope = ParserScope.empty)
gen_intermediate disallow, scope
end
|
#gen_skip(disallow, scope = ParserScope.empty) ⇒ Object
20
21
22
|
# File 'lib/rattler/compiler/parser_generator/disallow_generator.rb', line 20
def gen_skip(disallow, scope = ParserScope.empty)
gen_basic disallow, scope
end
|
#gen_token(disallow, scope = ParserScope.empty) ⇒ Object
24
25
26
|
# File 'lib/rattler/compiler/parser_generator/disallow_generator.rb', line 24
def gen_token(disallow, scope = ParserScope.empty)
expr(:block) { gen_action disallow, "''", scope }
end
|