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

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

Instance Method Summary collapse

Instance Method Details

#alternatives ⇒ Object



1258
1259
1260
# File 'lib/treetop/compiler/metagrammar.rb', line 1258

def alternatives
  [head] + tail
end

#inline_module ⇒ Object



1274
1275
1276
# File 'lib/treetop/compiler/metagrammar.rb', line 1274

def inline_module
  nil
end

#inline_modules ⇒ Object



1270
1271
1272
# File 'lib/treetop/compiler/metagrammar.rb', line 1270

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

#parent_modules ⇒ Object



1266
1267
1268
# File 'lib/treetop/compiler/metagrammar.rb', line 1266

def parent_modules
  []
end

#tail ⇒ Object



1262
1263
1264
# File 'lib/treetop/compiler/metagrammar.rb', line 1262

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