Sha256: db818cee8f0b1f034f00b902ed81a1d0d8b9574a274950e0980aa88881da88b8

Contents?: true

Size: 426 Bytes

Versions: 35

Compression:

Stored size: 426 Bytes

Contents

#
# nonassoc test
#

class P

preclow
  nonassoc N
  left P
prechigh

rule

target : exp
exp    : exp N exp
       | exp P exp
       | T

end

---- inner

  def parse
    @src = [[:T,'T'], [:N,'N'], [:T,'T'], [:N,'N'], [:T,'T']]
    do_parse
  end

  def next_token
    @src.shift
  end

---- footer

begin
  P.new.parse
rescue ParseError
  exit 0
else
  $stderr.puts 'parse error not raised: nonassoc not work'
  exit 1
end

Version data entries

35 entries across 30 versions & 5 rubygems

Version Path
tdiary-5.2.0 vendor/bundle/ruby/2.7.0/gems/racc-1.5.2/test/assets/nonass.y
tdiary-5.1.7 vendor/bundle/ruby/3.0.0/gems/racc-1.5.2/test/assets/nonass.y
tdiary-5.1.7 vendor/bundle/ruby/2.7.0/gems/racc-1.5.2/test/assets/nonass.y
rails_mini_profiler-0.2.0 vendor/bundle/ruby/3.0.0/gems/racc-1.5.2/test/assets/nonass.y
mumukit-content-type-1.11.1 vendor/bundle/ruby/2.6.0/gems/racc-1.5.2/test/assets/nonass.y
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/gems/tdiary-5.1.5/vendor/bundle/ruby/2.7.0/gems/racc-1.5.2/test/assets/nonass.y
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/gems/tdiary-5.1.5/vendor/bundle/ruby/3.0.0/gems/racc-1.5.2/test/assets/nonass.y
tdiary-5.1.6 vendor/bundle/ruby/3.0.0/gems/racc-1.5.2/test/assets/nonass.y
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/gems/racc-1.5.2/test/assets/nonass.y
tdiary-5.1.5 vendor/bundle/ruby/3.0.0/gems/racc-1.5.2/test/assets/nonass.y
tdiary-5.1.5 vendor/bundle/ruby/2.7.0/gems/racc-1.5.2/test/assets/nonass.y
racc-1.5.2-java test/assets/nonass.y
racc-1.5.2 test/assets/nonass.y
racc-1.5.1-java test/assets/nonass.y
racc-1.5.1 test/assets/nonass.y
racc-1.5.0-java test/assets/nonass.y
racc-1.5.0 test/assets/nonass.y
racc-1.4.16-java test/assets/nonass.y
racc-1.4.16 test/assets/nonass.y
racc-1.4.15-java test/assets/nonass.y