antlr/runtime-testsuite/test/org/antlr/v4
Ewan Mellor eb9124fff8
[Swift] Fix parse-cancellation in BailErrorStrategy.
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.)
2017-11-11 10:45:38 -08:00
..
runtime Fixed empty CodePointCharStream throwing exception on getText. Fixes #1949 2017-08-02 14:30:46 +02:00
test/runtime [Swift] Fix parse-cancellation in BailErrorStrategy. 2017-11-11 10:45:38 -08:00