Method: SeqParBenchmark#initialize

Defined in:
lib/vendor/treetop/benchmark/seqpar_benchmark.rb

#initializeSeqParBenchmark

Loads the grammar and returns a parser



24
25
26
27
28
29
30
31
32
33
# File 'lib/vendor/treetop/benchmark/seqpar_benchmark.rb', line 24

def initialize
  compiler = Treetop::Compiler::GrammarCompiler.new
  @where = File.expand_path(File.dirname(__FILE__))
  grammar = File.join(@where, 'seqpar.treetop')
  output = File.join(@where, 'seqpar.rb')
  compiler.compile(grammar, output)
  load output
  File.delete(output)
  @parser = SeqParParser.new
end