Module: Treetop::Compiler::Metagrammar::Choice2

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

Instance Method Summary collapse

Instance Method Details

#alternativesObject



1059
1060
1061
# File 'lib/treetop/compiler/metagrammar.rb', line 1059

def alternatives
  [head] + tail
end

#inline_modulesObject



1067
1068
1069
# File 'lib/treetop/compiler/metagrammar.rb', line 1067

def inline_modules
  (alternatives.map {|alt| alt.inline_modules }).flatten
end

#tailObject



1063
1064
1065
# File 'lib/treetop/compiler/metagrammar.rb', line 1063

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