forked from jasder/antlr
Update DefaultErrorStrategy.cpp
Property escape vocabulary reporting
This commit is contained in:
parent
c8f80b167d
commit
a2d6b62a1a
|
@ -199,8 +199,8 @@ void DefaultErrorStrategy::reportUnwantedToken(Parser *recognizer) {
|
|||
std::string tokenName = getTokenErrorDisplay(t);
|
||||
misc::IntervalSet expecting = getExpectedTokens(recognizer);
|
||||
|
||||
std::string msg = std::string("extraneous input ") + tokenName + std::string(" expecting ") +
|
||||
expecting.toString(recognizer->getVocabulary());
|
||||
std::string vocabulary = expecting.toString(recognizer->getVocabulary());
|
||||
std::string msg = std::string("extraneous input ") + tokenName + std::string(" expecting ") + escapeWSAndQuote(vocabulary);
|
||||
recognizer->notifyErrorListeners(t, msg, nullptr);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue