class Antlr4::Runtime::ATNSimulator

Constants

SERIALIZED_UUID
SERIALIZED_VERSION

Attributes

error[RW]
atn[RW]
shared_context_cache[R]

Public Class Methods

check_condition(condition, message = nil) click to toggle source
# File lib/antlr4/runtime/atn_simulator.rb, line 39
def self.check_condition(condition, message = nil)
  ATNDeserializer.new.check_condition(condition, message)
end
deserialize(data) click to toggle source
# File lib/antlr4/runtime/atn_simulator.rb, line 35
def self.deserialize(data)
  ATNDeserializer.new.deserialize(data)
end
new(atn, shared_context_cache) click to toggle source
# File lib/antlr4/runtime/atn_simulator.rb, line 17
def initialize(atn, shared_context_cache)
  @atn = atn
  @shared_context_cache = shared_context_cache
end
to_int(c) click to toggle source
# File lib/antlr4/runtime/atn_simulator.rb, line 43
def self.to_int(c)
  ATNDeserializer.to_int(c)
end
to_int32(data, offset) click to toggle source
# File lib/antlr4/runtime/atn_simulator.rb, line 47
def self.to_int32(data, offset)
  ATNDeserializer.to_int32(data, offset)
end
to_long(data, offset) click to toggle source
# File lib/antlr4/runtime/atn_simulator.rb, line 51
def self.to_long(data, offset)
  ATNDeserializer.to_long(data, offset)
end
to_uuid(data, offset) click to toggle source
# File lib/antlr4/runtime/atn_simulator.rb, line 55
def self.to_uuid(data, offset)
  ATNDeserializer.to_uuid(data, offset)
end

Public Instance Methods

cached_context(context) click to toggle source
# File lib/antlr4/runtime/atn_simulator.rb, line 28
def cached_context(context)
  return context if @shared_context_cache.nil?

  visited = {}
  PredictionContextUtils.cached_context(context, @shared_context_cache, visited)
end
clear_dfa() click to toggle source
# File lib/antlr4/runtime/atn_simulator.rb, line 22
def clear_dfa
  raise UnsupportedOperationException, 'This ATN simulator does not support clearing the DFA.'
end
edge_factory(atn, type, src, trg, arg1, arg2, arg3, sets) click to toggle source
# File lib/antlr4/runtime/atn_simulator.rb, line 59
def edge_factory(atn, type, src, trg, arg1, arg2, arg3, sets)
  ATNDeserializer.new.edge_factory(atn, type, src, trg, arg1, arg2, arg3, sets)
end
state_factory(type, rule_index) click to toggle source
# File lib/antlr4/runtime/atn_simulator.rb, line 63
def state_factory(type, rule_index)
  ATNDeserializer.new.state_factory(type, rule_index)
end