Class: Antlr4::Runtime::EmptyPredictionContext
Constant Summary
collapse
- EMPTY =
EmptyPredictionContext.new(PredictionContextUtils::EMPTY_RETURN_STATE)
PredictionContext::EMPTY_RETURN_STATE, PredictionContext::INITIAL_HASH
Instance Attribute Summary
#cached_hash_code
Instance Method Summary
collapse
#empty?, #get_parent, #get_return_state
#empty_path?, #hash, #to_s_recog, #to_strings, #to_strings3, #to_strings3_inner
Constructor Details
Returns a new instance of EmptyPredictionContext.
4
5
6
|
# File 'lib/antlr4/runtime/empty_prediction_context.rb', line 4
def initialize(return_state)
super(nil, return_state)
end
|
Instance Method Details
#equals(o) ⇒ Object
26
27
28
|
# File 'lib/antlr4/runtime/empty_prediction_context.rb', line 26
def equals(o)
self == o
end
|
#isEmpty ⇒ Object
10
11
12
|
# File 'lib/antlr4/runtime/empty_prediction_context.rb', line 10
def isEmpty
true
end
|
#parent(_index = nil) ⇒ Object
18
19
20
|
# File 'lib/antlr4/runtime/empty_prediction_context.rb', line 18
def parent(_index=nil)
nil
end
|
#return_state(_index = nil) ⇒ Object
22
23
24
|
# File 'lib/antlr4/runtime/empty_prediction_context.rb', line 22
def return_state(_index=nil)
@return_state
end
|
#size ⇒ Object
14
15
16
|
# File 'lib/antlr4/runtime/empty_prediction_context.rb', line 14
def size
1
end
|
#to_s ⇒ Object
30
31
32
|
# File 'lib/antlr4/runtime/empty_prediction_context.rb', line 30
def to_s
'$'
end
|