This commit is contained in:
janyou 2016-12-14 11:14:02 +08:00
parent 57d8cc2e0c
commit f964dd4af0
1 changed files with 1 additions and 1 deletions

View File

@ -62,7 +62,7 @@ open class Recognizer<ATNInterpreter:ATNSimulator> {
if result == nil {
result = Dictionary<String, Int>()
let length = self.getATN().maxTokenType
for i in 0..<length {
for i in 0...length {
let literalName: String? = vocabulary.getLiteralName(i)
if literalName != nil {
result![literalName!] = i