diff --git a/runtime/JavaScript/src/antlr4/error/DiagnosticErrorListener.d.ts b/runtime/JavaScript/src/antlr4/error/DiagnosticErrorListener.d.ts index b88fe66844..4b7d381ba3 100644 --- a/runtime/JavaScript/src/antlr4/error/DiagnosticErrorListener.d.ts +++ b/runtime/JavaScript/src/antlr4/error/DiagnosticErrorListener.d.ts @@ -1,9 +1,3 @@ import {ErrorListener} from "./ErrorListener"; -import {Recognizer} from "../Recognizer"; -import {RecognitionException} from "./RecognitionException"; -export declare class DiagnosticErrorListener implements ErrorListener { - - syntaxError(recognizer: Recognizer, offendingSymbol: TSymbol, line: number, column: number, msg: string, e: RecognitionException | undefined): void; - -} +export declare class DiagnosticErrorListener extends ErrorListener {} diff --git a/runtime/JavaScript/src/antlr4/error/ErrorListener.d.ts b/runtime/JavaScript/src/antlr4/error/ErrorListener.d.ts index 4b61236410..e3882711c9 100644 --- a/runtime/JavaScript/src/antlr4/error/ErrorListener.d.ts +++ b/runtime/JavaScript/src/antlr4/error/ErrorListener.d.ts @@ -1,6 +1,15 @@ -import {Recognizer} from "../Recognizer"; -import {RecognitionException} from "./RecognitionException"; +import { ATNConfigSet } from "../atn"; +import { BitSet } from '../misc/BitSet'; +import { DFA } from "../dfa"; +import { Recognizer } from "../Recognizer"; +import { RecognitionException } from "./RecognitionException"; export declare class ErrorListener { + reportAmbiguity(recognizer: Recognizer, dfa: DFA, startIndex: number, stopIndex: number, exact: boolean, ambigAlts: BitSet, configs: ATNConfigSet): void; + + reportAttemptingFullContext(recognizer: Recognizer, dfa: DFA, startIndex: number, stopIndex: number, conflictingAlts: BitSet, configs: ATNConfigSet): void; + + reportContextSensitivity(recognizer: Recognizer, dfa: DFA, startIndex: number, stopIndex: number, prediction: number, configs: ATNConfigSet): void; + syntaxError(recognizer: Recognizer, offendingSymbol: TSymbol, line: number, column: number, msg: string, e: RecognitionException | undefined): void; } diff --git a/runtime/JavaScript/src/antlr4/misc/BitSet.d.ts b/runtime/JavaScript/src/antlr4/misc/BitSet.d.ts new file mode 100644 index 0000000000..a3a74ee966 --- /dev/null +++ b/runtime/JavaScript/src/antlr4/misc/BitSet.d.ts @@ -0,0 +1,18 @@ +export declare class BitSet { + // write methods are not exposed based on this conversation https://github.com/antlr/antlr4/pull/4731#discussion_r1847139040 + readonly length: number; + + get(index: number): number; + + values(): Array; + + minValue(): number; + + hashCode(): number; + + equals(): boolean; + + toString(): string; + + static _bitCount(l: number): number; +}