Sha256: a743fefb3f6f3ec6b796b5c942e3ded0fba17a52e42b6444154915413acfda6c

Contents?: true

Size: 483 Bytes

Versions: 18

Compression:

Stored size: 483 Bytes

Contents

# $Id$
#
# Test grammer file for error handling.

class A
rule

target: a b c

a :
      {
        yyerror
        raise ArgumentError, "yyerror failed"
      }
  | error

b :
      {
        yyerrok
      }

c :
      {
        yyaccept
        raise "yyaccept failed"
      }

end

---- inner

  def parse
    do_parse
  end

  def next_token
    [false, '$end']
  end

  def on_error(*args)
    $stderr.puts "on_error called: args=#{args.inspect}"
  end

---- footer

A.new.parse

Version data entries

18 entries across 18 versions & 2 rubygems

Version Path
racc-1.4.16-java sample/yyerr.y
racc-1.4.16 sample/yyerr.y
racc-1.4.15-java sample/yyerr.y
racc-1.4.15 sample/yyerr.y
racc-1.4.14-java sample/yyerr.y
racc-1.4.14 sample/yyerr.y
racc-1.4.13-java sample/yyerr.y
racc-1.4.13 sample/yyerr.y
racc-1.4.12-java sample/yyerr.y
racc-1.4.12 sample/yyerr.y
racc-1.4.11 sample/yyerr.y
gd-racc-1.4.11 sample/yyerr.y
racc-1.4.10 sample/yyerr.y
racc-1.4.9-java sample/yyerr.y
racc-1.4.9 sample/yyerr.y
racc-1.4.8 sample/yyerr.y
racc-1.4.7 sample/yyerr.y
racc-1.4.6 sample/yyerr.y