Module: Treetop::Compiler::Metagrammar::Sequence2

Defined in:
lib/gems/treetop-1.2.4/lib/treetop/compiler/metagrammar.rb

Instance Method Summary collapse

Instance Method Details

#inline_module_nameObject



844
845
846
# File 'lib/gems/treetop-1.2.4/lib/treetop/compiler/metagrammar.rb', line 844

def inline_module_name
  node_class_declarations.inline_module_name
end

#inline_modulesObject



838
839
840
841
842
# File 'lib/gems/treetop-1.2.4/lib/treetop/compiler/metagrammar.rb', line 838

def inline_modules
  (sequence_elements.map {|elt| elt.inline_modules}).flatten +
  [sequence_element_accessor_module] +
  node_class_declarations.inline_modules
end

#sequence_elementsObject



830
831
832
# File 'lib/gems/treetop-1.2.4/lib/treetop/compiler/metagrammar.rb', line 830

def sequence_elements
  [head] + tail
end

#tailObject



834
835
836
# File 'lib/gems/treetop-1.2.4/lib/treetop/compiler/metagrammar.rb', line 834

def tail
  super.elements.map {|elt| elt.labeled_sequence_primary }
end