Sha256: d3e4810c9a18ca152ecb816d73bad7a62dab49484b58b454b93e4416514dc03e

Contents?: true

Size: 507 Bytes

Versions: 3

Compression:

Stored size: 507 Bytes

Contents

module Antelope
  module Ace
    class Token

      # Defines an epsilon token.  An epsilon token represents
      # nothing.  This is used to say that a nonterminal can
      # reduce to nothing.
      class Epsilon < Token
        # Initialize.  Technically takes no arguments.  Sets
        # the name of the token to be `:epsilon`.
        def initialize(*)
          super :epsilon
        end

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

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
antelope-0.1.1 lib/antelope/ace/token/epsilon.rb
antelope-0.1.0 lib/antelope/ace/token/epsilon.rb
antelope-0.0.1 lib/antelope/ace/token/epsilon.rb