diff options
author | Christopher L. Conway <christopherleeconway@gmail.com> | 2010-05-03 20:52:41 +0000 |
---|---|---|
committer | Christopher L. Conway <christopherleeconway@gmail.com> | 2010-05-03 20:52:41 +0000 |
commit | 09b5745fa1a2fcdc6b8d0a0d31c1ba34c96d67f0 (patch) | |
tree | ce337d6e07fb2879e9461b114b6ac2745772b57b /src/parser/antlr_input.cpp | |
parent | 1c5ad02344b9041cab9dd275ae69c953c31c6b8d (diff) |
Importing ANTLR3 lexer nextToken function to avoid escaped exceptions.
Diffstat (limited to 'src/parser/antlr_input.cpp')
-rw-r--r-- | src/parser/antlr_input.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/parser/antlr_input.cpp b/src/parser/antlr_input.cpp index 675a04510..b6f10ab25 100644 --- a/src/parser/antlr_input.cpp +++ b/src/parser/antlr_input.cpp @@ -197,6 +197,8 @@ void AntlrInput::setAntlr3Lexer(pANTLR3_LEXER pLexer) { // Override default lexer error reporting d_lexer->rec->reportError = &lexerError; + // Override default nextToken function, just to prevent exceptions escaping. + d_lexer->rec->state->tokSource->nextToken = &nextToken; } void AntlrInput::setParser(Parser *parser) { |