antlr/antlr4 — Issue #40: Move report* callbacks from ANTLRErrorStrategy to ANTLRErrorListener
Author: sharwell
Created: 2012-03-08 15:23:36+00:00
State: open
Labels: comp:runtime, error-handling, type:feature:2

The following calls are made from within `ParserATNSimulator` for reporting purposes only. The results of the call do not have any direct impact on parsing.

* `ANTLRErrorStrategy.reportError`
* `ANTLRErrorStrategy.reportAmbiguity`
* `ANTLRErrorStrategy.reportAttemptingFullContext`
* `ANTLRErrorStrategy.reportContextSensitivity`
* `ANTLRErrorStrategy.reportInsufficientPredicates`

These methods are more appropriate as part of the `ANTLRErrorListener` interface.

If someone does need an error strategy where behavior is dependent on these callbacks, it would be easy to simply implement both `ANTLRErrorStrategy` and `ANTLRErrorListener` on the same object.