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

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

Instance Method Summary collapse

Instance Method Details

#alternativesObject



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

def alternatives
  [head] + tail
end

#inline_moduleObject



1082
1083
1084
# File 'lib/treetop/compiler/metagrammar.rb', line 1082

def inline_module
  nil
end

#inline_modulesObject



1078
1079
1080
# File 'lib/treetop/compiler/metagrammar.rb', line 1078

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

#parent_modulesObject



1074
1075
1076
# File 'lib/treetop/compiler/metagrammar.rb', line 1074

def parent_modules
  []
end

#tailObject



1070
1071
1072
# File 'lib/treetop/compiler/metagrammar.rb', line 1070

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