Class: Antelope::Ace::Token::Error
- Inherits:
-
Terminal
- Object
- Antelope::Ace::Token
- Terminal
- Antelope::Ace::Token::Error
- Defined in:
- lib/antelope/ace/token/error.rb
Overview
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.
Instance Attribute Summary
Attributes inherited from Antelope::Ace::Token
Instance Method Summary collapse
-
#error? ⇒ Boolean
abstract
Whether or not the token is an error token.
-
#initialize ⇒ Error
constructor
Initialize the error token.
Methods inherited from Terminal
Methods inherited from Antelope::Ace::Token
#<=>, #===, #epsilon?, #hash, #inspect, #nonterminal?, #terminal?, #to_a, #to_s, #without_transitions
Constructor Details
#initialize ⇒ Error
Initialize the error token. Technically takes no arguments.
Sets the name to be :$error.
15 16 17 |
# File 'lib/antelope/ace/token/error.rb', line 15 def initialize(*) super :$error end |
Instance Method Details
#error? ⇒ Boolean
This method is abstract.
Whether or not the token is an error token.
20 21 22 |
# File 'lib/antelope/ace/token/error.rb', line 20 def error? true end |