Merge pull request #1512 from mike-lischke/master

C++ implementation for #1484
This commit is contained in:
Terence Parr 2016-12-14 13:23:24 -08:00 committed by GitHub
commit 17bad8ae69
2 changed files with 1 additions and 3 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;

View File

@ -78,7 +78,6 @@
#else
#define ANTLR4CPP_PUBLIC
#endif
#define EXPIMP_TEMPLATE
#else
#define GUID_LIBUUID
#if __GNUC__ >= 6
@ -86,7 +85,6 @@
#else
#define ANTLR4CPP_PUBLIC
#endif
#define EXPIMP_TEMPLATE
#endif
#include "support/guid.h"