Remove some stub functions from ATNSimulator.
These were ported over from the Java runtime, but they were all deprecated there, and were commented as such here. There is no point having them in the Swift runtime because we don't have legacy code to support.
This commit is contained in:
parent
8c03ef3138
commit
f41316f934
|
@ -8,24 +8,7 @@
|
|||
import Foundation
|
||||
|
||||
open class ATNSimulator {
|
||||
///
|
||||
/// - Use _org.antlr.v4.runtime.atn.ATNDeserializer#SERIALIZED_VERSION_ instead.
|
||||
///
|
||||
public static let SERIALIZED_VERSION: Int = {
|
||||
return ATNDeserializer.SERIALIZED_VERSION
|
||||
}()
|
||||
|
||||
|
||||
///
|
||||
/// This is the current serialized UUID.
|
||||
/// - Use _org.antlr.v4.runtime.atn.ATNDeserializer#checkCondition(boolean)_ instead.
|
||||
///
|
||||
public static let SERIALIZED_UUID: UUID = {
|
||||
return (ATNDeserializer.SERIALIZED_UUID as UUID)
|
||||
}()
|
||||
|
||||
|
||||
///
|
||||
///
|
||||
/// Must distinguish between missing edge and edge we know leads nowhere
|
||||
///
|
||||
public static let ERROR: DFAState = {
|
||||
|
@ -102,49 +85,6 @@ open class ATNSimulator {
|
|||
return PredictionContext.getCachedContext(context,
|
||||
sharedContextCache!,
|
||||
visited)
|
||||
//}
|
||||
}
|
||||
|
||||
///
|
||||
/// - note: Use _org.antlr.v4.runtime.atn.ATNDeserializer#deserialize_ instead.
|
||||
///
|
||||
public static func deserialize(_ data: [Character]) throws -> ATN {
|
||||
return try ATNDeserializer().deserialize(data)
|
||||
}
|
||||
|
||||
///
|
||||
/// - note: Use _org.antlr.v4.runtime.atn.ATNDeserializer#checkCondition(boolean)_ instead.
|
||||
///
|
||||
public static func checkCondition(_ condition: Bool) throws {
|
||||
try ATNDeserializer().checkCondition(condition)
|
||||
}
|
||||
|
||||
///
|
||||
/// - note: Use _org.antlr.v4.runtime.atn.ATNDeserializer#checkCondition(boolean, String)_ instead.
|
||||
///
|
||||
public static func checkCondition(_ condition: Bool, _ message: String) throws {
|
||||
try ATNDeserializer().checkCondition(condition, message)
|
||||
}
|
||||
|
||||
///
|
||||
/// - note: Use _org.antlr.v4.runtime.atn.ATNDeserializer#toInt_ instead.
|
||||
///
|
||||
public func toInt(_ c: Character) -> Int {
|
||||
return toInt(c)
|
||||
}
|
||||
|
||||
///
|
||||
/// - note: Use _org.antlr.v4.runtime.atn.ATNDeserializer#toInt32_ instead.
|
||||
///
|
||||
public func toInt32(_ data: [Character], _ offset: Int) -> Int {
|
||||
return toInt32(data, offset)
|
||||
}
|
||||
|
||||
///
|
||||
/// - note: Use _org.antlr.v4.runtime.atn.ATNDeserializer#toLong_ instead.
|
||||
///
|
||||
public func toLong(_ data: [Character], _ offset: Int) -> Int64 {
|
||||
return toLong(data, offset)
|
||||
}
|
||||
|
||||
public static func edgeFactory(_ atn: ATN,
|
||||
|
@ -153,12 +93,4 @@ open class ATNSimulator {
|
|||
_ sets: Array<IntervalSet>) throws -> Transition {
|
||||
return try ATNDeserializer().edgeFactory(atn, type, src, trg, arg1, arg2, arg3, sets)
|
||||
}
|
||||
|
||||
///
|
||||
/// - note: Use _org.antlr.v4.runtime.atn.ATNDeserializer#stateFactory_ instead.
|
||||
///
|
||||
public static func stateFactory(_ type: Int, _ ruleIndex: Int) throws -> ATNState {
|
||||
return try ATNDeserializer().stateFactory(type, ruleIndex)!
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue