Sha256: 512cff1bc34a51e22ef869d2056e2e45b088ef080f86099aa7aee66272073bd7

Contents?: true

Size: 887 Bytes

Versions: 262

Compression:

Stored size: 887 Bytes

Contents

require 'spec_helper'

BENCHMARK = false
METAGRAMMAR_PATH = File.expand_path('../../../lib/treetop/compiler/metagrammar.treetop', __FILE__)

module CircularCompilationSpec
  describe "a parser for the metagrammar" do
    attr_reader :parser
    
    before do
      @parser = Treetop::Compiler::MetagrammarParser.new
    end
    
    it "can parse the metagrammar.treetop whence it was generated" do
      File.open(METAGRAMMAR_PATH, 'r') do |f|
        metagrammar_source = f.read
        result = parser.parse(metagrammar_source)
        result.should_not be_nil

        # generated_parser = result.compile
        # Object.class_eval(generated_parser)
        # parser_2 = Treetop::Compiler::MetagrammarParser.new
        # optionally_benchmark do
        #   result = parser_2.parse(metagrammar_source)
        #   result.should_not be_nil
        # end
      end
    end
  end
end

Version data entries

262 entries across 217 versions & 32 rubygems

Version Path
logstash-output-scalyr-0.2.1.beta vendor/bundle/jruby/2.5.0/gems/treetop-1.4.15/spec/compiler/circular_compilation_spec.rb
logstash-output-scalyr-0.2.0 vendor/bundle/jruby/2.5.0/gems/treetop-1.4.15/spec/compiler/circular_compilation_spec.rb
logstash-output-scalyr-0.2.0.beta vendor/bundle/jruby/2.5.0/gems/treetop-1.4.15/spec/compiler/circular_compilation_spec.rb
logstash-output-scalyr-0.1.26.beta vendor/bundle/jruby/2.5.0/gems/treetop-1.4.15/spec/compiler/circular_compilation_spec.rb
logstash-output-scalyr-0.1.25.beta vendor/bundle/jruby/2.5.0/gems/treetop-1.4.15/spec/compiler/circular_compilation_spec.rb
logstash-output-scalyr-0.1.24.beta vendor/bundle/jruby/2.5.0/gems/treetop-1.4.15/spec/compiler/circular_compilation_spec.rb
logstash-output-scalyr-0.1.23.beta vendor/bundle/jruby/2.5.0/gems/treetop-1.4.15/spec/compiler/circular_compilation_spec.rb
logstash-output-scalyr-0.1.22.beta vendor/bundle/jruby/2.5.0/gems/treetop-1.4.15/spec/compiler/circular_compilation_spec.rb
logstash-output-scalyr-0.1.21.beta vendor/bundle/jruby/2.5.0/gems/treetop-1.4.15/spec/compiler/circular_compilation_spec.rb
logstash-output-scalyr-0.1.20.beta vendor/bundle/jruby/2.5.0/gems/treetop-1.4.15/spec/compiler/circular_compilation_spec.rb
logstash-output-scalyr-0.1.19.beta vendor/bundle/jruby/2.5.0/gems/treetop-1.4.15/spec/compiler/circular_compilation_spec.rb
logstash-output-scalyr-0.1.18.beta vendor/bundle/jruby/2.5.0/gems/treetop-1.4.15/spec/compiler/circular_compilation_spec.rb
logstash-output-scalyr-0.1.17.beta vendor/bundle/jruby/2.5.0/gems/treetop-1.4.15/spec/compiler/circular_compilation_spec.rb
logstash-output-scalyr-0.1.16.beta vendor/bundle/jruby/2.5.0/gems/treetop-1.4.15/spec/compiler/circular_compilation_spec.rb
logstash-output-scalyr-0.1.15.beta vendor/bundle/jruby/2.5.0/gems/treetop-1.4.15/spec/compiler/circular_compilation_spec.rb
logstash-output-scalyr-0.1.14.beta vendor/bundle/jruby/2.5.0/gems/treetop-1.4.15/spec/compiler/circular_compilation_spec.rb
logstash-output-scalyr-0.1.13 vendor/bundle/jruby/2.5.0/gems/treetop-1.4.15/spec/compiler/circular_compilation_spec.rb
logstash-output-scalyr-0.1.12 vendor/bundle/jruby/2.5.0/gems/treetop-1.4.15/spec/compiler/circular_compilation_spec.rb
logstash-output-scalyr-0.1.11.beta vendor/bundle/jruby/2.5.0/gems/treetop-1.4.15/spec/compiler/circular_compilation_spec.rb
logstash-output-scalyr-0.1.10.beta vendor/bundle/jruby/2.5.0/gems/treetop-1.4.15/spec/compiler/circular_compilation_spec.rb