Sha256: 737d4cce0e809242614fc280a39c6a312473b81b2a999289163add3e58164a7c

Contents?: true

Size: 699 Bytes

Versions: 35

Compression:

Stored size: 699 Bytes

Contents

class ScannerChecker
rule
  target: A
      {
        i = 7
        i %= 4
	raise 'assert failed' unless i == 3
        tmp = %-This is percent string.-
	raise 'assert failed' unless tmp == 'This is percent string.'
        a = 5; b = 3
        assert_equal(2,(a%b))    #A
      # assert_equal(2,(a %b))   # is %-string
        assert_equal(2,(a% b))   #B
        assert_equal(2,(a % b))  #C
      }
end

---- inner ----

  def parse
    @q = [[:A, 'A'], [false, '$']]
    do_parse
  end

  def next_token
    @q.shift
  end

  def assert_equal( expect, real )
    raise "expect #{expect.inspect} but #{real.inspect}" unless expect == real
  end

---- footer ----

parser = ScannerChecker.new.parse

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/percent.y
tdiary-5.1.7 vendor/bundle/ruby/3.0.0/gems/racc-1.5.2/test/assets/percent.y
tdiary-5.1.7 vendor/bundle/ruby/2.7.0/gems/racc-1.5.2/test/assets/percent.y
rails_mini_profiler-0.2.0 vendor/bundle/ruby/3.0.0/gems/racc-1.5.2/test/assets/percent.y
mumukit-content-type-1.11.1 vendor/bundle/ruby/2.6.0/gems/racc-1.5.2/test/assets/percent.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/percent.y
tdiary-5.1.6 vendor/bundle/ruby/3.0.0/gems/racc-1.5.2/test/assets/percent.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/percent.y
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/gems/racc-1.5.2/test/assets/percent.y
tdiary-5.1.5 vendor/bundle/ruby/3.0.0/gems/racc-1.5.2/test/assets/percent.y
tdiary-5.1.5 vendor/bundle/ruby/2.7.0/gems/racc-1.5.2/test/assets/percent.y
racc-1.5.2-java test/assets/percent.y
racc-1.5.2 test/assets/percent.y
racc-1.5.1-java test/assets/percent.y
racc-1.5.1 test/assets/percent.y
racc-1.5.0-java test/assets/percent.y
racc-1.5.0 test/assets/percent.y
racc-1.4.16-java test/assets/percent.y
racc-1.4.16 test/assets/percent.y
racc-1.4.15-java test/assets/percent.y