Module: Treetop::Compiler::Metagrammar::Primary5

Defined in:
lib/treetop/compiler/metagrammar.rb

Instance Method Summary collapse

Instance Method Details

#compile(address, builder, parent_expression = nil) ⇒ Object



1498
1499
1500
1501
1502
1503
# File 'lib/treetop/compiler/metagrammar.rb', line 1498

def compile(address, builder, parent_expression=nil)
	    if node_class_declarations.inline_module && atomic.inline_module
	      STDERR.puts "Extraneous module ignored after suffix: #{input[interval].inspect}"
	    end
  suffix.compile(address, builder, self)
end

#inline_moduleObject



1521
1522
1523
# File 'lib/treetop/compiler/metagrammar.rb', line 1521

def inline_module
       node_class_declarations.inline_module
end

#inline_module_nameObject



1525
1526
1527
# File 'lib/treetop/compiler/metagrammar.rb', line 1525

def inline_module_name
  node_class_declarations.inline_module_name
end

#inline_modulesObject



1517
1518
1519
# File 'lib/treetop/compiler/metagrammar.rb', line 1517

def inline_modules
  atomic.inline_modules + parent_modules
end

#node_class_nameObject



1509
1510
1511
# File 'lib/treetop/compiler/metagrammar.rb', line 1509

def node_class_name
  node_class_declarations.node_class_name
end

#optional_expressionObject



1505
1506
1507
# File 'lib/treetop/compiler/metagrammar.rb', line 1505

def optional_expression
  atomic
end

#parent_modulesObject



1513
1514
1515
# File 'lib/treetop/compiler/metagrammar.rb', line 1513

def parent_modules
  node_class_declarations.inline_modules
end