Fix special template for tests

This commit is contained in:
gaulouis 2016-12-10 04:42:09 +01:00
parent 258b1a4a38
commit 822e3762a0
1 changed files with 9 additions and 9 deletions

View File

@ -70,14 +70,14 @@ ParserPropertyCall(p, call) ::= "<call>"
PositionAdjustingLexer() ::= <<
protected:
class PositionAdjustingLexerATNSimulator : public atn::LexerATNSimulator {
class PositionAdjustingLexerATNSimulator : public antlr4::atn::LexerATNSimulator {
public:
PositionAdjustingLexerATNSimulator(Lexer *recog, const atn::ATN &atn, std::vector\<dfa::DFA> &decisionToDFA,
atn::PredictionContextCache &sharedContextCache)
: atn::LexerATNSimulator(recog, atn, decisionToDFA, sharedContextCache) {
PositionAdjustingLexerATNSimulator(antlr4::Lexer *recog, const antlr4::atn::ATN &atn, std::vector\<antlr4::dfa::DFA> &decisionToDFA,
antlr4::atn::PredictionContextCache &sharedContextCache)
: antlr4::atn::LexerATNSimulator(recog, atn, decisionToDFA, sharedContextCache) {
}
void resetAcceptPosition(CharStream *input, int index, int line, int charPositionInLine) {
void resetAcceptPosition(antlr4::CharStream *input, int index, int line, int charPositionInLine) {
input->seek(index);
_line = line;
_charPositionInLine = charPositionInLine;
@ -87,16 +87,16 @@ protected:
};
public:
virtual std::unique_ptr\<Token> nextToken() override {
virtual std::unique_ptr\<antlr4::Token> nextToken() override {
if (dynamic_cast\<PositionAdjustingLexerATNSimulator *>(_interpreter) == nullptr) {
delete _interpreter;
_interpreter = new PositionAdjustingLexerATNSimulator(this, _atn, _decisionToDFA, _sharedContextCache);
}
return Lexer::nextToken();
return antlr4::Lexer::nextToken();
}
virtual Token* emit() override {
virtual antlr4::Token* emit() override {
switch (type) {
case TOKENS:
handleAcceptPositionForKeyword("tokens");
@ -109,7 +109,7 @@ public:
default:
break;
}
return Lexer::emit();
return antlr4::Lexer::emit();
}
private: