diff options
author | Christopher L. Conway <christopherleeconway@gmail.com> | 2010-04-05 20:04:45 +0000 |
---|---|---|
committer | Christopher L. Conway <christopherleeconway@gmail.com> | 2010-04-05 20:04:45 +0000 |
commit | 31921b60ec820d6c5873a43f3b88dada6b861f45 (patch) | |
tree | 513e9d739b5da6b37a9cee2d840dba3ade90473f /src/parser/antlr_input.cpp | |
parent | f55a79b565151772bbf67ae2517a025c8999bca0 (diff) |
Simplifying ANTLR3 overrides
Diffstat (limited to 'src/parser/antlr_input.cpp')
-rw-r--r-- | src/parser/antlr_input.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/parser/antlr_input.cpp b/src/parser/antlr_input.cpp index b46e22853..b8caf5ded 100644 --- a/src/parser/antlr_input.cpp +++ b/src/parser/antlr_input.cpp @@ -134,8 +134,13 @@ void AntlrInput::setParser(pANTLR3_PARSER pParser) { // it would have to be declared separately in every input's grammar and we'd have to // pass it in as an address anyway. d_parser->super = getParserState(); +// d_parser->rec->match = &match; d_parser->rec->reportError = &reportError; - d_parser->rec->recoverFromMismatchedToken = &recoverFromMismatchedToken; + /* Don't try to recover from a parse error. */ + // [chris 4/5/2010] Not clear on why this cast is necessary, but I get an error if I remove it. + d_parser->rec->recoverFromMismatchedToken = + (void* (*)(ANTLR3_BASE_RECOGNIZER_struct*, ANTLR3_UINT32, ANTLR3_BITSET_LIST_struct*)) + d_parser->rec->mismatch; } |