Module: Rattler::BackEnd::ParserGenerator::List0Generating

Defined in:
lib/rattler/back_end/parser_generator/list0_generating.rb

Instance Method Summary collapse

Instance Method Details

#gen_assert(optional, scope = {}) ⇒ Object

:nodoc:



7
8
9
# File 'lib/rattler/back_end/parser_generator/list0_generating.rb', line 7

def gen_assert(optional, scope={})
  @g << 'true'
end

#gen_disallow(optional, scope = {}) ⇒ Object



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

def gen_disallow(optional, scope={})
  @g << 'false'
end

#gen_skip(list, scope = {}) ⇒ Object



15
16
17
18
19
20
21
# File 'lib/rattler/back_end/parser_generator/list0_generating.rb', line 15

def gen_skip(list, scope={})
  expr :block do
    gen_skipping list, scope
    @g << "@scanner.pos = #{end_pos_name} unless #{end_pos_name}.nil?"
    @g.newline << 'true'
  end
end