C++ implementation for #1484.

This commit is contained in:
Mike Lischke 2016-12-14 17:34:03 +01:00
parent 50df59fea8
commit 76fcb6d37e
1 changed files with 1 additions and 1 deletions

View File

@ -41,7 +41,7 @@ std::map<std::string, size_t> Recognizer::getTokenTypeMap() {
if (iterator != _tokenTypeMapCache.end()) {
result = iterator->second;
} else {
for (size_t i = 0; i < getATN().maxTokenType; ++i) {
for (size_t i = 0; i <= getATN().maxTokenType; ++i) {
std::string literalName = vocabulary.getLiteralName(i);
if (!literalName.empty()) {
result[literalName] = i;