C# 클래스 Antlr4.Runtime.DiagnosticErrorListener

This implementation of IAntlrErrorListener{Symbol} can be used to identify certain potential correctness and performance problems in grammars. "Reports" are made by calling Parser.NotifyErrorListeners(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.
상속: BaseErrorListener
파일 보기 프로젝트 열기: antlr/antlr4

보호된 프로퍼티들

프로퍼티 타입 설명
exactOnly bool

공개 메소드들

메소드 설명
DiagnosticErrorListener ( ) : Antlr4.Runtime

Initializes a new instance of DiagnosticErrorListener which only reports exact ambiguities.

DiagnosticErrorListener ( bool exactOnly ) : Antlr4.Runtime

Initializes a new instance of DiagnosticErrorListener , specifying whether all ambiguities or only exact ambiguities are reported.

ReportAmbiguity ( Parser recognizer, DFA dfa, int startIndex, int stopIndex, bool exact, BitSet ambigAlts, ATNConfigSet configs ) : void
ReportAttemptingFullContext ( Parser recognizer, DFA dfa, int startIndex, int stopIndex, BitSet conflictingAlts, SimulatorState conflictState ) : void
ReportContextSensitivity ( Parser recognizer, DFA dfa, int startIndex, int stopIndex, int prediction, SimulatorState acceptState ) : void

보호된 메소드들

메소드 설명
GetDecisionDescription ( Parser recognizer, DFA dfa ) : string

비공개 메소드들

메소드 설명
GetConflictingAlts ( BitSet reportedAlts, ATNConfigSet configSet ) : BitSet

메소드 상세

DiagnosticErrorListener() 공개 메소드

Initializes a new instance of DiagnosticErrorListener which only reports exact ambiguities.
public DiagnosticErrorListener ( ) : Antlr4.Runtime
리턴 Antlr4.Runtime

DiagnosticErrorListener() 공개 메소드

Initializes a new instance of DiagnosticErrorListener , specifying whether all ambiguities or only exact ambiguities are reported.
public DiagnosticErrorListener ( bool exactOnly ) : Antlr4.Runtime
exactOnly bool /// /// /// to report only exact ambiguities, otherwise /// /// to report all ambiguities. ///
리턴 Antlr4.Runtime

GetDecisionDescription() 보호된 메소드

protected GetDecisionDescription ( Parser recognizer, DFA dfa ) : string
recognizer Parser
dfa Antlr4.Runtime.Dfa.DFA
리턴 string

ReportAmbiguity() 공개 메소드

public ReportAmbiguity ( Parser recognizer, DFA dfa, int startIndex, int stopIndex, bool exact, BitSet ambigAlts, ATNConfigSet configs ) : void
recognizer Parser
dfa Antlr4.Runtime.Dfa.DFA
startIndex int
stopIndex int
exact bool
ambigAlts Antlr4.Runtime.Sharpen.BitSet
configs ATNConfigSet
리턴 void

ReportAttemptingFullContext() 공개 메소드

public ReportAttemptingFullContext ( Parser recognizer, DFA dfa, int startIndex, int stopIndex, BitSet conflictingAlts, SimulatorState conflictState ) : void
recognizer Parser
dfa Antlr4.Runtime.Dfa.DFA
startIndex int
stopIndex int
conflictingAlts Antlr4.Runtime.Sharpen.BitSet
conflictState Antlr4.Runtime.Atn.SimulatorState
리턴 void

ReportContextSensitivity() 공개 메소드

public ReportContextSensitivity ( Parser recognizer, DFA dfa, int startIndex, int stopIndex, int prediction, SimulatorState acceptState ) : void
recognizer Parser
dfa Antlr4.Runtime.Dfa.DFA
startIndex int
stopIndex int
prediction int
acceptState Antlr4.Runtime.Atn.SimulatorState
리턴 void

프로퍼티 상세

exactOnly 보호되어 있는 프로퍼티

When , only exactly known ambiguities are reported.
protected bool exactOnly
리턴 bool