Sha256: 3784632d5bf5aaa7f2a4e4bf13f18e0d4d0846daddbff27ae4d28de805506089

Contents?: true

Size: 681 Bytes

Versions: 11

Compression:

Stored size: 681 Bytes

Contents

require 'spec_helper'

module RepeatedSubruleSpec
  describe "a repeated subrule" do
    testing_grammar %{
      grammar Foo
        rule foo
          a:'a' space b:'b' space 'cc'
        end

        rule space
          ' '
        end
      end
    }
  
    it "should produce a parser having sequence-numbered node accessor methods" do
      parse("a b cc") do |result|
        result.should_not be_nil
        result.should respond_to(:space1)
        result.should respond_to(:space2)
        result.should_not respond_to(:space)
        result.should respond_to(:a)
        result.should respond_to(:b)
        result.should_not respond_to(:c)
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 2 rubygems

Version Path
treetop-1.6.8 spec/compiler/repeated_subrule_spec.rb
treetop-1.6.7 spec/compiler/repeated_subrule_spec.rb
treetop-1.6.6 spec/compiler/repeated_subrule_spec.rb
treetop-1.6.5 spec/compiler/repeated_subrule_spec.rb
treetop-1.6.4 spec/compiler/repeated_subrule_spec.rb
swift-pyrite-0.1.1 vendor/bundle/ruby/2.0.0/gems/treetop-1.6.3/spec/compiler/repeated_subrule_spec.rb
swift-pyrite-0.1.0 vendor/bundle/ruby/2.0.0/gems/treetop-1.6.3/spec/compiler/repeated_subrule_spec.rb
treetop-1.6.3 spec/compiler/repeated_subrule_spec.rb
treetop-1.6.2 spec/compiler/repeated_subrule_spec.rb
treetop-1.5.3 spec/compiler/repeated_subrule_spec.rb
treetop-1.5.1 spec/compiler/repeated_subrule_spec.rb