forked from jasder/antlr
eb9124fff8
BailErrorStrategy is supposed to throw an error that's different from the ordinary recognition error, specifically so that it can be handled differently by client code. This was not ported over from Java correctly. Fix this by moving parseCancellation from ANTLRError to ANTLRException, adding its RecognitionException argument, and throwing it from the two handlers in BailErrorStrategy. Also remove ANTLRException.cannotInvokeStartRule, which is unused. (The Java runtime uses it when ParseTreePatternMatcher throws a generic exception, but we don't have that.) |
||
---|---|---|
.. | ||
antlr/v4 |