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.1.9 vendor/bundle/jruby/2.5.0/gems/treetop-1.4.15/spec/compiler/circular_compilation_spec.rb
logstash-output-scalyr-0.1.8 vendor/bundle/jruby/2.5.0/gems/treetop-1.4.15/spec/compiler/circular_compilation_spec.rb
logstash-output-scalyr-0.1.7 vendor/bundle/jruby/2.5.0/gems/treetop-1.4.15/spec/compiler/circular_compilation_spec.rb
logstash-output-scalyr-0.1.6 vendor/bundle/jruby/2.5.0/gems/treetop-1.4.15/spec/compiler/circular_compilation_spec.rb
logstash-output-newrelic-1.2.0 vendor/bundle/jruby/2.5.0/gems/treetop-1.4.15/spec/compiler/circular_compilation_spec.rb
logstash-filter-csharp-0.2.1 vendor/bundle/jruby/2.3.0/gems/treetop-1.4.15/spec/compiler/circular_compilation_spec.rb
logstash-filter-csharp-0.2.1 vendor/bundle/jruby/2.5.0/gems/treetop-1.4.15/spec/compiler/circular_compilation_spec.rb
logstash-filter-csharp-0.2.0 vendor/bundle/jruby/2.5.0/gems/treetop-1.4.15/spec/compiler/circular_compilation_spec.rb
logstash-filter-csharp-0.2.0 vendor/bundle/jruby/2.3.0/gems/treetop-1.4.15/spec/compiler/circular_compilation_spec.rb
logstash-output-scalyr-0.1.5 vendor/bundle/jruby/2.5.0/gems/treetop-1.4.15/spec/compiler/circular_compilation_spec.rb
logstash-output-scalyr-0.1.4 vendor/bundle/jruby/2.5.0/gems/treetop-1.4.15/spec/compiler/circular_compilation_spec.rb
logstash-output-scalyr-0.1.3 vendor/bundle/jruby/2.5.0/gems/treetop-1.4.15/spec/compiler/circular_compilation_spec.rb
logstash-output-scalyr-0.1.2 vendor/bundle/jruby/2.5.0/gems/treetop-1.4.15/spec/compiler/circular_compilation_spec.rb
logstash-filter-device_detection-1.0.7-java vendor/bundle/jruby/1.9/gems/treetop-1.4.15/spec/compiler/circular_compilation_spec.rb
mrcooper-logstash-output-azuresearch-0.2.2 vendor/jruby/2.5.0/gems/treetop-1.4.15/spec/compiler/circular_compilation_spec.rb
logstash-output-icinga-1.1.0 vendor/jruby/1.9/gems/treetop-1.4.15/spec/compiler/circular_compilation_spec.rb
logstash-output-icinga-1.1.0 vendor/jruby/2.3.0/gems/treetop-1.4.15/spec/compiler/circular_compilation_spec.rb
logstash-filter-cache-redis-0.3.1 vendor/bundle/jruby/1.9/gems/treetop-1.4.15/spec/compiler/circular_compilation_spec.rb
logstash-filter-cache-redis-0.3.0 vendor/bundle/jruby/1.9/gems/treetop-1.4.15/spec/compiler/circular_compilation_spec.rb
logstash-filter-cache-redis-0.2.0 vendor/bundle/jruby/1.9/gems/treetop-1.4.15/spec/compiler/circular_compilation_spec.rb