@apexdevtools/apex-parser 5.0.0-beta.4 → 5.0.0-beta.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (75) hide show
  1. package/CHANGELOG.md +2 -2
  2. package/node_modules/antlr4/README.md +29 -0
  3. package/node_modules/antlr4/dist/antlr4.node.cjs +2 -0
  4. package/node_modules/antlr4/dist/antlr4.node.cjs.map +1 -0
  5. package/node_modules/antlr4/dist/antlr4.node.mjs +2 -0
  6. package/node_modules/antlr4/dist/antlr4.node.mjs.map +1 -0
  7. package/node_modules/antlr4/dist/antlr4.web.cjs +2 -0
  8. package/node_modules/antlr4/dist/antlr4.web.cjs.map +1 -0
  9. package/node_modules/antlr4/dist/antlr4.web.mjs +2 -0
  10. package/node_modules/antlr4/dist/antlr4.web.mjs.map +1 -0
  11. package/node_modules/antlr4/package.json +72 -0
  12. package/node_modules/antlr4/src/antlr4/BufferedTokenStream.d.ts +8 -0
  13. package/node_modules/antlr4/src/antlr4/CharStream.d.ts +17 -0
  14. package/node_modules/antlr4/src/antlr4/CharStreams.d.ts +9 -0
  15. package/node_modules/antlr4/src/antlr4/CommonToken.d.ts +10 -0
  16. package/node_modules/antlr4/src/antlr4/CommonTokenStream.d.ts +12 -0
  17. package/node_modules/antlr4/src/antlr4/FileStream.d.ts +9 -0
  18. package/node_modules/antlr4/src/antlr4/InputStream.d.ts +4 -0
  19. package/node_modules/antlr4/src/antlr4/Lexer.d.ts +34 -0
  20. package/node_modules/antlr4/src/antlr4/Parser.d.ts +50 -0
  21. package/node_modules/antlr4/src/antlr4/Recognizer.d.ts +12 -0
  22. package/node_modules/antlr4/src/antlr4/Token.d.ts +24 -0
  23. package/node_modules/antlr4/src/antlr4/TokenSource.d.ts +3 -0
  24. package/node_modules/antlr4/src/antlr4/TokenStream.d.ts +16 -0
  25. package/node_modules/antlr4/src/antlr4/TokenStreamRewriter.d.ts +38 -0
  26. package/node_modules/antlr4/src/antlr4/atn/ATN.d.ts +17 -0
  27. package/node_modules/antlr4/src/antlr4/atn/ATNConfig.d.ts +5 -0
  28. package/node_modules/antlr4/src/antlr4/atn/ATNConfigSet.d.ts +5 -0
  29. package/node_modules/antlr4/src/antlr4/atn/ATNDeserializationOptions.d.ts +6 -0
  30. package/node_modules/antlr4/src/antlr4/atn/ATNDeserializer.d.ts +7 -0
  31. package/node_modules/antlr4/src/antlr4/atn/ATNSimulator.d.ts +3 -0
  32. package/node_modules/antlr4/src/antlr4/atn/LexerATNSimulator.d.ts +15 -0
  33. package/node_modules/antlr4/src/antlr4/atn/ParserATNSimulator.d.ts +21 -0
  34. package/node_modules/antlr4/src/antlr4/atn/PredictionContextCache.d.ts +3 -0
  35. package/node_modules/antlr4/src/antlr4/atn/PredictionMode.d.ts +5 -0
  36. package/node_modules/antlr4/src/antlr4/atn/index.d.ts +9 -0
  37. package/node_modules/antlr4/src/antlr4/context/ParserRuleContext.d.ts +23 -0
  38. package/node_modules/antlr4/src/antlr4/context/RuleContext.d.ts +10 -0
  39. package/node_modules/antlr4/src/antlr4/context/index.d.ts +3 -0
  40. package/node_modules/antlr4/src/antlr4/dfa/DFA.d.ts +5 -0
  41. package/node_modules/antlr4/src/antlr4/dfa/index.d.ts +2 -0
  42. package/node_modules/antlr4/src/antlr4/error/BailErrorStrategy.d.ts +7 -0
  43. package/node_modules/antlr4/src/antlr4/error/DefaultErrorStrategy.d.ts +24 -0
  44. package/node_modules/antlr4/src/antlr4/error/DiagnosticErrorListener.d.ts +9 -0
  45. package/node_modules/antlr4/src/antlr4/error/ErrorListener.d.ts +6 -0
  46. package/node_modules/antlr4/src/antlr4/error/ErrorStrategy.d.ts +12 -0
  47. package/node_modules/antlr4/src/antlr4/error/FailedPredicateException.d.ts +7 -0
  48. package/node_modules/antlr4/src/antlr4/error/InputMismatchException.d.ts +6 -0
  49. package/node_modules/antlr4/src/antlr4/error/NoViableAltException.d.ts +13 -0
  50. package/node_modules/antlr4/src/antlr4/error/RecognitionException.d.ts +19 -0
  51. package/node_modules/antlr4/src/antlr4/error/index.d.ts +9 -0
  52. package/node_modules/antlr4/src/antlr4/index.d.cts +21 -0
  53. package/node_modules/antlr4/src/antlr4/misc/Interval.d.ts +10 -0
  54. package/node_modules/antlr4/src/antlr4/misc/IntervalSet.d.ts +13 -0
  55. package/node_modules/antlr4/src/antlr4/misc/index.d.ts +3 -0
  56. package/node_modules/antlr4/src/antlr4/state/ATNState.d.ts +6 -0
  57. package/node_modules/antlr4/src/antlr4/state/DecisionState.d.ts +6 -0
  58. package/node_modules/antlr4/src/antlr4/state/RuleStartState.d.ts +6 -0
  59. package/node_modules/antlr4/src/antlr4/state/RuleStopState.d.ts +5 -0
  60. package/node_modules/antlr4/src/antlr4/state/index.d.ts +5 -0
  61. package/node_modules/antlr4/src/antlr4/tree/ErrorNode.d.ts +5 -0
  62. package/node_modules/antlr4/src/antlr4/tree/ParseTree.d.ts +5 -0
  63. package/node_modules/antlr4/src/antlr4/tree/ParseTreeListener.d.ts +10 -0
  64. package/node_modules/antlr4/src/antlr4/tree/ParseTreeVisitor.d.ts +16 -0
  65. package/node_modules/antlr4/src/antlr4/tree/ParseTreeWalker.d.ts +8 -0
  66. package/node_modules/antlr4/src/antlr4/tree/RuleNode.d.ts +5 -0
  67. package/node_modules/antlr4/src/antlr4/tree/SyntaxTree.d.ts +3 -0
  68. package/node_modules/antlr4/src/antlr4/tree/TerminalNode.d.ts +8 -0
  69. package/node_modules/antlr4/src/antlr4/tree/Tree.d.ts +1 -0
  70. package/node_modules/antlr4/src/antlr4/tree/index.d.ts +8 -0
  71. package/node_modules/antlr4/src/antlr4/utils/Printer.d.ts +4 -0
  72. package/node_modules/antlr4/src/antlr4/utils/arrayToString.d.ts +1 -0
  73. package/node_modules/antlr4/src/antlr4/utils/index.d.ts +4 -0
  74. package/node_modules/antlr4/src/antlr4/utils/stringToCharArray.d.ts +1 -0
  75. package/package.json +5 -2
@@ -0,0 +1,72 @@
1
+ {
2
+ "name": "antlr4",
3
+ "version": "4.13.2",
4
+ "type": "module",
5
+ "description": "JavaScript runtime for ANTLR4",
6
+ "browser": "dist/antlr4.web.mjs",
7
+ "main": "dist/antlr4.node.cjs",
8
+ "module": "dist/antlr4.node.mjs",
9
+ "types": "src/antlr4/index.d.cts",
10
+ "repository": "antlr/antlr4.git",
11
+ "keywords": [
12
+ "lexer",
13
+ "parser",
14
+ "antlr",
15
+ "antlr4",
16
+ "grammar"
17
+ ],
18
+ "files": [
19
+ "dist",
20
+ "src/**/*.d.cts",
21
+ "src/**/*.d.ts"
22
+ ],
23
+ "license": "BSD-3-Clause",
24
+ "bugs": {
25
+ "url": "https://github.com/antlr/antlr4/issues"
26
+ },
27
+ "homepage": "https://github.com/antlr/antlr4",
28
+ "devDependencies": {
29
+ "@babel/core": "^7.19.1",
30
+ "@babel/eslint-parser": "^7.19.1",
31
+ "@babel/preset-env": "^7.19.4",
32
+ "@types/node": "^18.7.23",
33
+ "babel-loader": "^8.2.5",
34
+ "c8": "^7.12.0",
35
+ "compression-webpack-plugin": "^10.0.0",
36
+ "eslint": "^8.23.1",
37
+ "eslint-webpack-plugin": "^3.2.0",
38
+ "glob-parent": "^6.0.2",
39
+ "jasmine": "^4.0.2",
40
+ "jasmine-spec-reporter": "^7.0.0",
41
+ "minimist": "^1.2.6",
42
+ "source-map-support": "^0.5.21",
43
+ "terser-webpack-plugin": "^5.3.6",
44
+ "typescript": "^4.8.3",
45
+ "webpack": "^5.76.0",
46
+ "webpack-cli": "^4.10.0"
47
+ },
48
+ "scripts": {
49
+ "build": "webpack",
50
+ "test": "jasmine",
51
+ "coverage": "c8 jasmine",
52
+ "lint": "eslint src/antlr4/"
53
+ },
54
+ "engines": {
55
+ "node": ">=16"
56
+ },
57
+ "exports": {
58
+ ".": {
59
+ "types": "./src/antlr4/index.d.cts",
60
+ "node": {
61
+ "import": "./dist/antlr4.node.mjs",
62
+ "require": "./dist/antlr4.node.cjs",
63
+ "default": "./dist/antlr4.node.mjs"
64
+ },
65
+ "browser": {
66
+ "import": "./dist/antlr4.web.mjs",
67
+ "require": "./dist/antlr4.web.cjs",
68
+ "default": "./dist/antlr4.web.mjs"
69
+ }
70
+ }
71
+ }
72
+ }
@@ -0,0 +1,8 @@
1
+ import { TokenStream } from './TokenStream.js';
2
+ import { Lexer } from "./Lexer.js";
3
+
4
+ export declare class BufferedTokenStream extends TokenStream {
5
+
6
+ tokenSource: Lexer;
7
+
8
+ }
@@ -0,0 +1,17 @@
1
+ export declare class CharStream {
2
+
3
+ index: number; // defined as property
4
+ size: number;// defined as property
5
+
6
+ constructor(data: string);
7
+ constructor(data: string, decodeToUnicodeCodePoints: boolean);
8
+ reset(): void;
9
+ consume(): void;
10
+ LA(offset: number): number;
11
+ LT(offset: number): number;
12
+ mark(): number;
13
+ release(marker: number): void;
14
+ seek(index: number): void;
15
+ getText(start: number, stop: number): string;
16
+ toString(): string;
17
+ }
@@ -0,0 +1,9 @@
1
+ import {CharStream} from "./CharStream.js";
2
+
3
+ export declare class CharStreams {
4
+ static fromString(data: string, decodeToUnicodeCodePoints?: boolean): CharStream;
5
+ static fromBuffer(buffer: Buffer, encoding?: string): CharStream;
6
+ static fromBlob(blob: Blob, encoding: string, onLoad: (stream: CharStream) => void, onError: (error: Error) => void): void;
7
+ static fromPath(path: string, encoding: string, callback: (err: Error, stream: CharStream) => void): void;
8
+ static fromPathSync(path: string, encoding: string): CharStream;
9
+ }
@@ -0,0 +1,10 @@
1
+ import { Token } from "./Token.js";
2
+ import {InputStream} from "./InputStream.js";
3
+ import {TokenSource} from "./TokenSource.js";
4
+
5
+ export declare class CommonToken extends Token {
6
+ constructor(source: [ TokenSource, InputStream ], type: number, channel: number, start: number, stop: number);
7
+ clone(): CommonToken;
8
+ cloneWithType(type: number): CommonToken;
9
+ toString(): string;
10
+ }
@@ -0,0 +1,12 @@
1
+ import {Lexer} from "./Lexer.js";
2
+ import {BufferedTokenStream} from "./BufferedTokenStream.js";
3
+ import {Token} from "./Token.js";
4
+
5
+ export declare class CommonTokenStream extends BufferedTokenStream {
6
+ // properties
7
+ tokens: Token[];
8
+ // methods
9
+ constructor(lexer: Lexer);
10
+ constructor(lexer: Lexer, channel: number);
11
+ fill(): void;
12
+ }
@@ -0,0 +1,9 @@
1
+ import {CharStream} from "./CharStream.js";
2
+
3
+ export declare class FileStream extends CharStream {
4
+
5
+ fileName: string;
6
+
7
+ constructor(fileName: string, encoding?: string, decodeToUnicodeCodePoints?: boolean);
8
+
9
+ }
@@ -0,0 +1,4 @@
1
+ export declare class InputStream {
2
+ constructor(data: string);
3
+ constructor(data: string, decodeToUnicodeCodePoints: boolean);
4
+ }
@@ -0,0 +1,34 @@
1
+ import {Recognizer} from "./Recognizer.js";
2
+ import {LexerATNSimulator} from "./atn/index.js";
3
+ import {CharStream} from "./CharStream.js";
4
+ import {Token} from "./Token.js";
5
+
6
+ export declare class Lexer extends Recognizer<number> {
7
+
8
+ static DEFAULT_MODE: number;
9
+
10
+ _input: CharStream;
11
+ _interp: LexerATNSimulator;
12
+ text: string;
13
+ line: number;
14
+ column: number;
15
+ _tokenStartCharIndex: number;
16
+ _tokenStartLine: number;
17
+ _tokenStartColumn: number;
18
+ _type: number;
19
+
20
+ constructor(input: CharStream);
21
+ reset(): void;
22
+ nextToken(): Token;
23
+ skip(): void;
24
+ more(): void;
25
+ setMode(m: number): void;
26
+ getMode(): number;
27
+ getModeStack(): number[];
28
+ pushMode(m: number): void;
29
+ popMode(): number;
30
+ emitToken(token: Token): void;
31
+ emit(): Token;
32
+ emitEOF(): Token;
33
+ getAllTokens(): Token[];
34
+ }
@@ -0,0 +1,50 @@
1
+ import {TokenStream} from "./TokenStream.js";
2
+ import {Recognizer} from "./Recognizer.js";
3
+ import {ErrorStrategy, RecognitionException} from "./error/index.js";
4
+ import {IntervalSet} from "./misc/index.js";
5
+ import {ParserATNSimulator} from "./atn/index.js";
6
+ import {Token} from "./Token.js";
7
+ import {ParserRuleContext} from "./context/index.js";
8
+ import {Printer} from "./utils/index.js";
9
+ import {ParseTreeListener} from "./tree/index.js";
10
+
11
+ export declare class Parser extends Recognizer<Token> {
12
+
13
+ static EOF: number;
14
+
15
+ _input: TokenStream;
16
+ _ctx: ParserRuleContext;
17
+ _interp: ParserATNSimulator;
18
+ _errHandler: ErrorStrategy;
19
+ _parseListeners?: any[];
20
+ matchedEOF: boolean;
21
+ buildParseTrees: boolean;
22
+ printer?: Printer;
23
+ syntaxErrorsCount: number;
24
+
25
+ constructor(input: TokenStream);
26
+ match(ttype: number): Token;
27
+ matchWildcard(): Token;
28
+ getParseListeners(): ParseTreeListener[];
29
+ addParseListener(listener: ParseTreeListener): void;
30
+ removeParseListener(listener: ParseTreeListener): void;
31
+ removeParseListeners(): void;
32
+ consume(): Token;
33
+ enterRule(localctx: ParserRuleContext, state: number, ruleIndex: number): void;
34
+ exitRule() : void;
35
+ triggerExitRuleEvent() : void;
36
+ enterOuterAlt(localctx: ParserRuleContext, altNum: number): void;
37
+ enterRecursionRule(localctx: ParserRuleContext, state: number, ruleIndex: number, precedence: number): void;
38
+ pushNewRecursionContext(localctx: ParserRuleContext, state: number, ruleIndex: number): void;
39
+ unrollRecursionContexts(parentCtx: ParserRuleContext): void;
40
+ precpred(localctx: ParserRuleContext, precedence: number): boolean;
41
+ getRuleInvocationStack(): string[];
42
+ dumpDFA(): void;
43
+ getExpectedTokens(): IntervalSet;
44
+ getTokenStream(): TokenStream;
45
+ reset(): void;
46
+ setTokenStream(input: TokenStream): void;
47
+ notifyErrorListeners(msg: string, offendingToken: Token, err: RecognitionException | undefined): void;
48
+ getCurrentToken(): Token;
49
+
50
+ }
@@ -0,0 +1,12 @@
1
+ import {ErrorListener} from "./error/index.js";
2
+
3
+ export declare class Recognizer<TSymbol> {
4
+
5
+ state: number;
6
+
7
+ removeErrorListeners(): void;
8
+ addErrorListener(listener: ErrorListener<TSymbol>): void;
9
+ getErrorListener(): ErrorListener<TSymbol>;
10
+ getLiteralNames(): string[];
11
+ getSymbolicNames(): string[];
12
+ }
@@ -0,0 +1,24 @@
1
+ import { TokenSource } from "./TokenSource.js";
2
+ import { CharStream } from "./CharStream.js";
3
+
4
+ export declare class Token {
5
+
6
+ static INVALID_TYPE: number;
7
+ static EOF: number;
8
+ static DEFAULT_CHANNEL: number;
9
+ static HIDDEN_CHANNEL: number;
10
+
11
+ tokenIndex: number;
12
+ line: number;
13
+ column: number;
14
+ channel: number;
15
+ text: string;
16
+ type: number;
17
+ start : number;
18
+ stop: number;
19
+
20
+ clone(): Token;
21
+ cloneWithType(type: number): Token;
22
+ getTokenSource(): TokenSource;
23
+ getInputStream(): CharStream;
24
+ }
@@ -0,0 +1,3 @@
1
+ export declare class TokenSource {
2
+
3
+ }
@@ -0,0 +1,16 @@
1
+ import {Interval} from "./misc/index.js";
2
+ import {Token} from "./Token.js";
3
+
4
+ export declare class TokenStream {
5
+
6
+ index: number;
7
+ size: number;
8
+
9
+ LA(i: number): number;
10
+ LT(k: number): Token;
11
+ getText(interval?: Interval): string;
12
+ // channelIndex can be retrieved using: lexer.channelNames().findIndex(channelName)
13
+ getHiddenTokensToLeft(tokenIndex: number, channelIndex?: number): Token[];
14
+ getHiddenTokensToRight(tokenIndex: number, channelIndex?: number): Token[];
15
+ get(idx: number): Token;
16
+ }
@@ -0,0 +1,38 @@
1
+ import { CommonTokenStream } from "./CommonTokenStream.js";
2
+ import { Token } from "./Token.js";
3
+ import { Interval } from "./misc/Interval.js";
4
+
5
+ type Rewrites = Array<RewriteOperation | undefined>;
6
+ type Text = unknown;
7
+
8
+ export declare class TokenStreamRewriter {
9
+ static DEFAULT_PROGRAM_NAME: string;
10
+ constructor(tokens: CommonTokenStream);
11
+ getTokenStream(): CommonTokenStream;
12
+ insertAfter(token: Token, text: Text, programName?: string): void;
13
+ insertAfter(index: number, text: Text, programName?: string): void;
14
+ insertBefore(token: Token, text: Text, programName?: string): void;
15
+ insertBefore(index: number, text: Text, programName?: string): void;
16
+ replaceSingle(token: Token, text: Text, programName?: string): void;
17
+ replaceSingle(index: number, text: Text, programName?: string): void;
18
+ replace(from: Token | number, to: Token | number, text: Text, programName?: string): void;
19
+ delete(from: number | Token, to: number | Token, programName?: string): void;
20
+ getProgram(name: string): Rewrites;
21
+ initializeProgram(name: string): Rewrites;
22
+ getText(): string;
23
+ getText(program: string): string;
24
+ getText(interval: Interval, programName?: string): string;
25
+ reduceToSingleOperationPerIndex(rewrites: Rewrites): Map<number, RewriteOperation>;
26
+ catOpText(a: Text, b: Text): string;
27
+ getKindOfOps(rewrites: Rewrites, kind: any, before: number): RewriteOperation[];
28
+ }
29
+
30
+
31
+ declare class RewriteOperation {
32
+ constructor(tokens: CommonTokenStream, index: number, instructionIndex: number, text: Text);
33
+ tokens: CommonTokenStream;
34
+ instructionIndex: number;
35
+ index: number;
36
+ text: Text;
37
+ toString(): string;
38
+ }
@@ -0,0 +1,17 @@
1
+ import {IntervalSet} from "../misc/index.js";
2
+ import {RuleContext} from "../context/index.js";
3
+ import {ATNState, DecisionState, RuleStartState, RuleStopState} from "../state/index.js";
4
+
5
+ export declare class ATN {
6
+
7
+ static INVALID_ALT_NUMBER: number;
8
+
9
+ states: ATNState[];
10
+ decisionToState: DecisionState[];
11
+ ruleToStartState: RuleStartState[];
12
+ ruleToStopState: RuleStopState[];
13
+
14
+ getExpectedTokens(stateNumber: number, ctx: RuleContext ): IntervalSet;
15
+ nextTokens(atnState: ATNState, ctx?: RuleContext): IntervalSet;
16
+
17
+ }
@@ -0,0 +1,5 @@
1
+ import { ATNState } from "../state/index.js";
2
+
3
+ export declare class ATNConfig {
4
+ state: ATNState;
5
+ }
@@ -0,0 +1,5 @@
1
+ import {ATNConfig} from "./ATNConfig.js";
2
+
3
+ export declare class ATNConfigSet {
4
+ configs: ATNConfig[];
5
+ }
@@ -0,0 +1,6 @@
1
+ export declare class ATNDeserializationOptions {
2
+ readOnly?: boolean;
3
+ verifyATN?: boolean;
4
+ generateRuleBypassTransitions?: boolean;
5
+
6
+ }
@@ -0,0 +1,7 @@
1
+ import {ATNDeserializationOptions} from "./ATNDeserializationOptions.js";
2
+ import {ATN} from "./ATN.js";
3
+
4
+ export declare class ATNDeserializer {
5
+ constructor(options?: ATNDeserializationOptions);
6
+ deserialize(data: number[]) : ATN;
7
+ }
@@ -0,0 +1,3 @@
1
+ export declare class ATNSimulator {
2
+
3
+ }
@@ -0,0 +1,15 @@
1
+ import {Recognizer} from "../Recognizer.js";
2
+ import {ATNSimulator} from "./ATNSimulator.js";
3
+ import {ATN} from "./ATN.js";
4
+ import {PredictionContextCache} from "./PredictionContextCache.js";
5
+ import {DFA} from "../dfa/index.js";
6
+ import {CharStream} from "../CharStream.js";
7
+
8
+ export declare class LexerATNSimulator implements ATNSimulator {
9
+
10
+ decisionToDFA: DFA[];
11
+
12
+ constructor(recog: Recognizer<number>, atn: ATN, decisionToDFA: DFA[], sharedContextCache: PredictionContextCache);
13
+ consume(input: CharStream) : void;
14
+
15
+ }
@@ -0,0 +1,21 @@
1
+ import {ATNSimulator} from "./ATNSimulator.js";
2
+ import {ParserRuleContext} from "../context/index.js";
3
+ import {TokenStream} from "../TokenStream.js";
4
+ import {Recognizer} from "../Recognizer.js";
5
+ import {ATN} from "./ATN.js";
6
+ import {PredictionContextCache} from "./PredictionContextCache.js";
7
+ import {DFA} from "../dfa/index.js";
8
+ import {PredictionMode} from "./PredictionMode.js";
9
+ import {Token} from "../Token.js";
10
+
11
+ export declare class ParserATNSimulator extends ATNSimulator {
12
+
13
+ predictionMode: PredictionMode;
14
+ decisionToDFA: DFA[];
15
+ atn: ATN;
16
+ debug?: boolean;
17
+ trace_atn_sim?: boolean;
18
+
19
+ constructor(recog: Recognizer<Token>, atn: ATN, decisionToDFA: DFA[], sharedContextCache: PredictionContextCache);
20
+ adaptivePredict(input: TokenStream, decision: number, outerContext: ParserRuleContext) : number;
21
+ }
@@ -0,0 +1,3 @@
1
+ export declare class PredictionContextCache {
2
+
3
+ }
@@ -0,0 +1,5 @@
1
+ export declare class PredictionMode {
2
+ static SLL: number;
3
+ static LL: number;
4
+ static LL_EXACT_AMBIG_DETECTION: number;
5
+ }
@@ -0,0 +1,9 @@
1
+ export * from './ATN.js';
2
+ export * from './ATNConfig.js';
3
+ export * from './ATNConfigSet.js';
4
+ export * from './ATNDeserializer.js';
5
+ export * from './LexerATNSimulator.js';
6
+ export * from './ParserATNSimulator.js';
7
+ export * from './PredictionMode.js';
8
+ export * from './PredictionContextCache.js';
9
+
@@ -0,0 +1,23 @@
1
+ import {RuleContext} from "./RuleContext.js";
2
+ import {ParseTree, TerminalNode} from "../tree/index.js";
3
+ import {RecognitionException} from "../error/index.js";
4
+ import {Token} from "../Token.js";
5
+ import {Parser} from "../Parser.js";
6
+
7
+ export declare class ParserRuleContext extends RuleContext {
8
+ start: Token;
9
+ stop: Token | undefined;
10
+ children: ParseTree[] | null;
11
+ parentCtx: ParserRuleContext | undefined;
12
+ exception?: RecognitionException;
13
+ parser?: Parser;
14
+
15
+ constructor(parent?: ParserRuleContext, invokingStateNumber?: number);
16
+ copyFrom(ctx: ParserRuleContext): void;
17
+ getChildCount() : number;
18
+ getChild(i: number) : ParseTree;
19
+ getToken(ttype: number, i: number): TerminalNode;
20
+ getTokens(ttype: number): TerminalNode[];
21
+ getTypedRuleContext<T extends ParserRuleContext, P extends Parser>(ctxType: { new (parser?: P, parent?: ParserRuleContext, invokingState?: number, ...args: any[]) : T}, i: number): T;
22
+ getTypedRuleContexts<T extends ParserRuleContext, P extends Parser>(ctxType: { new (parser?: P, parent?: ParserRuleContext, invokingState?: number, ...args: any[]) : T}): T[];
23
+ }
@@ -0,0 +1,10 @@
1
+ import {RuleNode} from "../tree/index.js";
2
+ import {Parser} from "../Parser.js";
3
+
4
+ export declare class RuleContext extends RuleNode {
5
+ parentCtx: RuleContext | undefined;
6
+ invokingState: number;
7
+
8
+ get ruleContext() : RuleContext;
9
+ toStringTree(ruleNames: string[] | null, recog: Parser) : string;
10
+ }
@@ -0,0 +1,3 @@
1
+ export * from './RuleContext.js';
2
+ export * from './ParserRuleContext.js';
3
+
@@ -0,0 +1,5 @@
1
+ export declare class DFA {
2
+ constructor(ds: any, index: number);
3
+ toLexerString(): string;
4
+ }
5
+
@@ -0,0 +1,2 @@
1
+ export * from './DFA.js';
2
+
@@ -0,0 +1,7 @@
1
+ import {DefaultErrorStrategy} from "./DefaultErrorStrategy.js";
2
+
3
+ export declare class BailErrorStrategy extends DefaultErrorStrategy {
4
+
5
+ constructor();
6
+
7
+ }
@@ -0,0 +1,24 @@
1
+ import {ErrorStrategy} from "./ErrorStrategy.js";
2
+ import {RecognitionException} from "./RecognitionException.js";
3
+ import {Parser} from "../Parser.js";
4
+ import {Token} from "../Token.js";
5
+
6
+ export declare class DefaultErrorStrategy implements ErrorStrategy {
7
+ recover(recognizer: Parser, e: RecognitionException): void;
8
+
9
+ recoverInline(recognizer: Parser): Token;
10
+
11
+ reportError(recognizer: Parser, e: RecognitionException): void;
12
+
13
+ reportMatch(recognizer: Parser): void;
14
+
15
+ reset(recognizer: Parser): void;
16
+
17
+ sync(recognizer: Parser): void;
18
+
19
+ inErrorRecoveryMode(recognizer: Parser): boolean;
20
+
21
+ beginErrorCondition(recognizer: Parser): void;
22
+
23
+ getMissingSymbol(recognizer: Parser): Token;
24
+ }
@@ -0,0 +1,9 @@
1
+ import {ErrorListener} from "./ErrorListener.js";
2
+ import {Recognizer} from "../Recognizer.js";
3
+ import {RecognitionException} from "./RecognitionException.js";
4
+
5
+ export declare class DiagnosticErrorListener<TSymbol> implements ErrorListener<TSymbol> {
6
+
7
+ syntaxError(recognizer: Recognizer<TSymbol>, offendingSymbol: TSymbol, line: number, column: number, msg: string, e: RecognitionException | undefined): void;
8
+
9
+ }
@@ -0,0 +1,6 @@
1
+ import {Recognizer} from "../Recognizer.js";
2
+ import {RecognitionException} from "./RecognitionException.js";
3
+
4
+ export declare class ErrorListener<TSymbol> {
5
+ syntaxError(recognizer: Recognizer<TSymbol>, offendingSymbol: TSymbol, line: number, column: number, msg: string, e: RecognitionException | undefined): void;
6
+ }
@@ -0,0 +1,12 @@
1
+ import {RecognitionException} from "./RecognitionException.js";
2
+ import {Parser} from "../Parser.js";
3
+ import {Token} from "../Token.js";
4
+
5
+ export declare class ErrorStrategy {
6
+ reset(recognizer: Parser): void;
7
+ sync(recognizer: Parser): void;
8
+ recover(recognizer: Parser, e: RecognitionException): void;
9
+ recoverInline(recognizer: Parser): Token;
10
+ reportMatch(recognizer: Parser): void;
11
+ reportError(recognizer: Parser, e: RecognitionException): void;
12
+ }
@@ -0,0 +1,7 @@
1
+ import {RecognitionException} from "./RecognitionException.js";
2
+ import {Parser} from "../Parser.js";
3
+
4
+ export declare class FailedPredicateException extends RecognitionException {
5
+
6
+ constructor(recognizer: Parser, predicate: string | undefined, message: string | undefined);
7
+ }
@@ -0,0 +1,6 @@
1
+ import {RecognitionException} from "./RecognitionException.js";
2
+ import {Parser} from "../Parser.js";
3
+
4
+ export declare class InputMismatchException extends RecognitionException {
5
+ constructor(recognizer: Parser);
6
+ }
@@ -0,0 +1,13 @@
1
+ import {ATNConfigSet} from "../atn/index.js";
2
+ import {Recognizer} from "../Recognizer.js";
3
+ import { Token } from "../Token.js";
4
+ import {RecognitionException} from "./RecognitionException.js";
5
+
6
+ export declare class NoViableAltException extends RecognitionException {
7
+
8
+ deadEndConfigs: ATNConfigSet;
9
+
10
+ constructor(recognizer: Recognizer<any>);
11
+
12
+ startToken: Token;
13
+ }
@@ -0,0 +1,19 @@
1
+ import {ParserRuleContext, RuleContext} from "../context/index.js";
2
+ import {TokenStream} from "../TokenStream.js";
3
+ import {Recognizer} from "../Recognizer.js";
4
+ import {CharStream} from "../CharStream.js";
5
+ import {Token} from "../Token.js";
6
+
7
+ export interface ExceptionParams {
8
+ message: string;
9
+ recognizer?: Recognizer<never>;
10
+ input?: CharStream | TokenStream;
11
+ ctx?: ParserRuleContext;
12
+
13
+ }
14
+
15
+ export declare class RecognitionException extends Error {
16
+ ctx: RuleContext;
17
+ offendingToken: Token | null;
18
+ constructor(params: ExceptionParams);
19
+ }
@@ -0,0 +1,9 @@
1
+ export * from './RecognitionException.js';
2
+ export * from './NoViableAltException.js';
3
+ export * from './FailedPredicateException.js';
4
+ export * from './InputMismatchException.js';
5
+ export * from './ErrorStrategy.js';
6
+ export * from './BailErrorStrategy.js';
7
+ export * from './DefaultErrorStrategy.js';
8
+ export * from './ErrorListener.js';
9
+ export * from './DiagnosticErrorListener.js';