Class DiagnosticErrorListener

java.lang.Object
org.graalvm.shadowed.org.antlr.v4.runtime.BaseErrorListener
org.graalvm.shadowed.org.antlr.v4.runtime.DiagnosticErrorListener
All Implemented Interfaces:
ANTLRErrorListener

public class DiagnosticErrorListener extends BaseErrorListener
This implementation of ANTLRErrorListener can be used to identify certain potential correctness and performance problems in grammars. "Reports" are made by calling Parser.notifyErrorListeners(java.lang.String) with the appropriate message.
  • Ambiguities: These are cases where more than one path through the grammar can match the input.
  • Weak context sensitivity: These are cases where full-context prediction resolved an SLL conflict to a unique alternative which equaled the minimum alternative of the SLL conflict.
  • Strong (forced) context sensitivity: These are cases where the full-context prediction resolved an SLL conflict to a unique alternative, and the minimum alternative of the SLL conflict was found to not be a truly viable alternative. Two-stage parsing cannot be used for inputs where this situation occurs.