Class: EmptyPredictionContext
- Inherits:
-
SingletonPredictionContext
- Object
- PredictionContext
- SingletonPredictionContext
- EmptyPredictionContext
- Defined in:
- lib/antlr4/PredictionContext.rb
Constant Summary
Constants inherited from PredictionContext
PredictionContext::EMPTY_RETURN_STATE
Instance Attribute Summary
Attributes inherited from SingletonPredictionContext
#cache_string, #parentCtx, #returnState
Attributes inherited from PredictionContext
Instance Method Summary collapse
- #getParent(index) ⇒ Object
- #getReturnState(index) ⇒ Object
-
#initialize(h = nil) ⇒ EmptyPredictionContext
constructor
A new instance of EmptyPredictionContext.
- #isEmpty ⇒ Object
-
#to_s ⇒ Object
def ==(other) self.equal? other end.
Methods inherited from SingletonPredictionContext
#==, create, #eql?, #hash, #length, #mk_string
Methods inherited from PredictionContext
EMPTY, EMPTY_RETURN_STATE, calculateEmptyHashCode, calculateHashCode, #hasEmptyPath, #hash
Constructor Details
#initialize(h = nil) ⇒ EmptyPredictionContext
Returns a new instance of EmptyPredictionContext.
171 172 173 174 |
# File 'lib/antlr4/PredictionContext.rb', line 171 def initialize(h=nil) super(nil, PredictionContext::EMPTY_RETURN_STATE ) @cachedHashCode = "".hash end |
Instance Method Details
#getParent(index) ⇒ Object
180 181 182 |
# File 'lib/antlr4/PredictionContext.rb', line 180 def getParent(index) nil end |
#getReturnState(index) ⇒ Object
184 185 186 |
# File 'lib/antlr4/PredictionContext.rb', line 184 def getReturnState(index) PredictionContext::EMPTY_RETURN_STATE # self.returnState end |
#isEmpty ⇒ Object
176 177 178 |
# File 'lib/antlr4/PredictionContext.rb', line 176 def isEmpty true end |
#to_s ⇒ Object
def ==(other)
self.equal? other
end
192 193 194 |
# File 'lib/antlr4/PredictionContext.rb', line 192 def to_s "$" end |