Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make it possible for RecognitionException to release the parser and
token stream that triggered the error. These are useful for error diagnostics, but if client code wants to throw the RecognitionException but discard the parser and token stream, then the fields in RecognitionException need to be cleared. This adds RecognitionException.{clearRecognizer,clearInputStream} so that client code can clear those fields if desired. It also makes RecognitionException.ctx weak, so it will go nil at the same time as the parser is discarded.
- Loading branch information