class Antelope::Grammar::Token::Epsilon

Defines an epsilon token. An epsilon token represents nothing. This is used to say that a nonterminal can reduce to nothing.

Public Class Methods

new(*) click to toggle source

Initialize. Technically takes no arguments. Sets the name of the token to be ‘:$empty`.

Calls superclass method Antelope::Grammar::Token::new
# File lib/antelope/grammar/token/epsilon.rb, line 12
def initialize(*)
  super :"$empty"
end

Public Instance Methods

epsilon?() click to toggle source

(see Token#epsilon?)

# File lib/antelope/grammar/token/epsilon.rb, line 17
def epsilon?
  true
end