/*! * Copyright 2016 The ANTLR Project. All rights reserved. * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information. */ import { ATNConfigSet } from './atn/ATNConfigSet'; import { BitSet } from './misc/BitSet'; import { DFA } from './dfa/DFA'; import { Parser } from './Parser'; import { ParserErrorListener } from './ParserErrorListener'; import { SimulatorState } from './atn/SimulatorState'; export declare class DiagnosticErrorListener implements ParserErrorListener { protected exactOnly: boolean; /** * Initializes a new instance of {@link DiagnosticErrorListener}, specifying * whether all ambiguities or only exact ambiguities are reported. * * @param exactOnly {@code true} to report only exact ambiguities, otherwise * {@code false} to report all ambiguities. Defaults to true. */ constructor(exactOnly?: boolean); reportAmbiguity(recognizer: Parser, dfa: DFA, startIndex: number, stopIndex: number, exact: boolean, ambigAlts: BitSet | undefined, configs: ATNConfigSet): void; reportAttemptingFullContext(recognizer: Parser, dfa: DFA, startIndex: number, stopIndex: number, conflictingAlts: BitSet | undefined, conflictState: SimulatorState): void; reportContextSensitivity(recognizer: Parser, dfa: DFA, startIndex: number, stopIndex: number, prediction: number, acceptState: SimulatorState): void; protected getDecisionDescription(recognizer: Parser, dfa: DFA): string; /** * Computes the set of conflicting or ambiguous alternatives from a * configuration set, if that information was not already provided by the * parser. * * @param reportedAlts The set of conflicting or ambiguous alternatives, as * reported by the parser. * @param configs The conflicting or ambiguous configuration set. * @return Returns {@code reportedAlts} if it is not {@code null}, otherwise * returns the set of alternatives represented in {@code configs}. */ protected getConflictingAlts(reportedAlts: BitSet | undefined, configs: ATNConfigSet): BitSet; }