Class: Antelope::Ace::Token::Epsilon
- Inherits:
-
Antelope::Ace::Token
- Object
- Antelope::Ace::Token
- Antelope::Ace::Token::Epsilon
- Defined in:
- lib/antelope/ace/token/epsilon.rb
Overview
Defines an epsilon token. An epsilon token represents nothing. This is used to say that a nonterminal can reduce to nothing.
Instance Attribute Summary
Attributes inherited from Antelope::Ace::Token
Instance Method Summary collapse
-
#epsilon? ⇒ Boolean
abstract
Whether or not the token is an epsilon token.
-
#initialize ⇒ Epsilon
constructor
Initialize.
Methods inherited from Antelope::Ace::Token
#<=>, #===, #error?, #hash, #nonterminal?, #terminal?, #to_a, #to_s, #without_transitions
Constructor Details
#initialize ⇒ Epsilon
Initialize. Technically takes no arguments. Sets
the name of the token to be :epsilon.
11 12 13 |
# File 'lib/antelope/ace/token/epsilon.rb', line 11 def initialize(*) super :epsilon end |
Instance Method Details
#epsilon? ⇒ Boolean
This method is abstract.
Whether or not the token is an epsilon token.
16 17 18 |
# File 'lib/antelope/ace/token/epsilon.rb', line 16 def epsilon? true end |