forked from jasder/antlr
Merge pull request #1512 from mike-lischke/master
C++ implementation for #1484
This commit is contained in:
commit
17bad8ae69
|
@ -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;
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Reference in New Issue