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

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

Instance Method Summary collapse

Instance Method Details

#alternativesObject



1046
1047
1048
# File 'lib/treetop/compiler/metagrammar.rb', line 1046

def alternatives
  [head] + tail
end

#inline_modulesObject



1054
1055
1056
# File 'lib/treetop/compiler/metagrammar.rb', line 1054

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

#tailObject



1050
1051
1052
# File 'lib/treetop/compiler/metagrammar.rb', line 1050

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