Sha256: 98129a143b66ea5637eadec0838adb6855adc43f40671a20f52a9a54b336d59f

Contents?: true

Size: 229 Bytes

Versions: 7

Compression:

Stored size: 229 Bytes

Contents

class Object
  def load_grammar(path)
    adjusted_path = path =~ /\.treetop\Z/ ? path : path + '.treetop'
    compiler = Treetop::Compiler::GrammarCompiler.new
    Object.class_eval(compiler.ruby_source(adjusted_path))
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
treetop-1.0.1 lib/treetop/compiler/load_grammar.rb
treetop-1.1.2 lib/treetop/compiler/load_grammar.rb
treetop-1.0.0 lib/treetop/compiler/load_grammar.rb
treetop-1.1.1 lib/treetop/compiler/load_grammar.rb
treetop-1.0.2 lib/treetop/compiler/load_grammar.rb
treetop-1.1.0 lib/treetop/compiler/load_grammar.rb
treetop-1.1.4 lib/treetop/compiler/load_grammar.rb