Sha256: 6fc610531af6f0471d656f6808c54ea94909de79cfe6efeb4d0cd3fb575b565b

Contents?: true

Size: 626 Bytes

Versions: 11

Compression:

Stored size: 626 Bytes

Contents

# encoding: utf-8

module Antelope
  module Ace
    class Token

      # Defines an error token.  This may be used internally by the
      # parser when it enters panic mode; any tokens following this
      # are the synchronisation tokens.  This is considered a terminal
      # for the purposes of rule definitions.
      class Error < Terminal

        # Initialize the error token.  Technically takes no arguments.
        # Sets the name to be `:$error`.
        def initialize(*)
          super :$error
        end

        # (see Token#error?)
        def error?
          true
        end
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
antelope-0.2.0 lib/antelope/ace/token/error.rb
antelope-0.1.11 lib/antelope/ace/token/error.rb
antelope-0.1.10 lib/antelope/ace/token/error.rb
antelope-0.1.9 lib/antelope/ace/token/error.rb
antelope-0.1.8 lib/antelope/ace/token/error.rb
antelope-0.1.7 lib/antelope/ace/token/error.rb
antelope-0.1.6 lib/antelope/ace/token/error.rb
antelope-0.1.5 lib/antelope/ace/token/error.rb
antelope-0.1.4 lib/antelope/ace/token/error.rb
antelope-0.1.3 lib/antelope/ace/token/error.rb
antelope-0.1.2 lib/antelope/ace/token/error.rb