Skip to content

Commit bd14bb1

Browse files
luomingtaoM-Adoo
authored andcommitted
fix: circle dependency
1 parent 73b2281 commit bd14bb1

File tree

8 files changed

+14
-13
lines changed

8 files changed

+14
-13
lines changed

benchmark/TestPerformance.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ import { ParserRuleContext } from "../src/ParserRuleContext";
4545
import { ParseTree } from "../src/tree/ParseTree";
4646
import { ParseTreeListener } from "../src/tree/ParseTreeListener";
4747
import { ParseTreeWalker } from "../src/tree/ParseTreeWalker";
48-
import { PredictionContextCache } from "../src/atn/PredictionContextCache";
48+
import { PredictionContextCache } from "../src/atn/PredictionContext";
4949
import { PredictionMode } from "../src/atn/PredictionMode";
5050
import { RecognitionException } from "../src/RecognitionException";
5151
import { Recognizer } from "../src/Recognizer";

src/Parser.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import { IntStream } from "./IntStream";
2424
import { Lexer } from "./Lexer";
2525
import { Override, NotNull, Nullable } from "./Decorators";
2626
import { ParseInfo } from "./atn/ParseInfo";
27+
import { ProfilingATNSimulator } from "./atn/ProfilingATNSimulator";
2728
import { ParserATNSimulator } from "./atn/ParserATNSimulator";
2829
import { ParserErrorListener } from "./ParserErrorListener";
2930
import { ParserRuleContext } from "./ParserRuleContext";
@@ -39,7 +40,6 @@ import { Token } from "./Token";
3940
import { TokenFactory } from "./TokenFactory";
4041
import { TokenSource } from "./TokenSource";
4142
import { TokenStream } from "./TokenStream";
42-
import { ProfilingATNSimulator } from "./atn/ProfilingATNSimulator";
4343
import { ParseTreePatternMatcher } from "./tree/pattern/ParseTreePatternMatcher";
4444

4545
class TraceListener implements ParseTreeListener {

src/ParserInterpreter.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55

66
// ConvertTo-TS run at 2016-10-04T11:26:53.1043451-07:00
77

8+
import { Parser } from "./Parser";
9+
import { ParserATNSimulator } from "./atn/ParserATNSimulator";
810
import { ActionTransition } from "./atn/ActionTransition";
911
import { ATN } from "./atn/ATN";
1012
import { ATNState } from "./atn/ATNState";
@@ -18,8 +20,6 @@ import { InterpreterRuleContext } from "./InterpreterRuleContext";
1820
import { LoopEndState } from "./atn/LoopEndState";
1921
import { NotNull } from "./Decorators";
2022
import { Override } from "./Decorators";
21-
import { Parser } from "./Parser";
22-
import { ParserATNSimulator } from "./atn/ParserATNSimulator";
2323
import { ParserRuleContext } from "./ParserRuleContext";
2424
import { PrecedencePredicateTransition } from "./atn/PrecedencePredicateTransition";
2525
import { PredicateTransition } from "./atn/PredicateTransition";

src/atn/ParserATNSimulator.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
// ConvertTo-TS run at 2016-10-04T11:26:31.1989835-07:00
77

8+
import { Parser } from "../Parser";
89
import { AcceptStateInfo } from "../dfa/AcceptStateInfo";
910
import { ActionTransition } from "./ActionTransition";
1011
import { Array2DHashSet } from "../misc/Array2DHashSet";
@@ -30,7 +31,6 @@ import { NotNull, Nullable, Override } from "../Decorators";
3031
import { NotSetTransition } from "./NotSetTransition";
3132
import { NoViableAltException } from "../NoViableAltException";
3233
import { ObjectEqualityComparator } from "../misc/ObjectEqualityComparator";
33-
import { Parser } from "../Parser";
3434
import { ParserRuleContext } from "../ParserRuleContext";
3535
import { PrecedencePredicateTransition } from "./PrecedencePredicateTransition";
3636
import { PredicateTransition } from "./PredicateTransition";

src/atn/ProfilingATNSimulator.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55

66
// ConvertTo-TS run at 2016-10-04T11:26:36.4188352-07:00
77

8+
import { Parser } from "../Parser";
9+
import { ParserATNSimulator } from "./ParserATNSimulator";
810
import { AmbiguityInfo } from "./AmbiguityInfo";
911
import { INVALID_ALT_NUMBER } from "./Constant";
1012
import { ATNConfigSet } from "./ATNConfigSet";
@@ -17,8 +19,6 @@ import { DFAState } from "../dfa/DFAState";
1719
import { ErrorInfo } from "./ErrorInfo";
1820
import { NotNull, Override } from "../Decorators";
1921
import { LookaheadEventInfo } from "./LookaheadEventInfo";
20-
import { Parser } from "../Parser";
21-
import { ParserATNSimulator } from "./ParserATNSimulator";
2222
import { ParserRuleContext } from "../ParserRuleContext";
2323
import { PredicateEvalInfo } from "./PredicateEvalInfo";
2424
import { PredictionContextCache } from "./PredictionContext";

src/index.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
* Copyright 2016 The ANTLR Project. All rights reserved.
33
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
44
*/
5-
5+
export * from "./ParserInterpreter";
6+
export * from "./Parser";
67
export * from "./ANTLRErrorListener";
78
export * from "./ANTLRErrorStrategy";
89
// export * from "./ANTLRFileStream";
910
export * from "./ANTLRInputStream";
10-
export * from "./BailErrorStrategy";
1111
export * from "./BufferedTokenStream";
1212
export * from "./CharStream";
1313
export * from "./CharStreams";
@@ -29,9 +29,7 @@ export * from "./LexerInterpreter";
2929
export * from "./LexerNoViableAltException";
3030
export * from "./ListTokenSource";
3131
export * from "./NoViableAltException";
32-
export * from "./Parser";
3332
export * from "./ParserErrorListener";
34-
export * from "./ParserInterpreter";
3533
export * from "./ParserRuleContext";
3634
export * from "./ProxyErrorListener";
3735
export * from "./ProxyParserErrorListener";
@@ -51,3 +49,6 @@ export * from "./TokenStreamRewriter";
5149
export * from "./Vocabulary";
5250
export * from "./VocabularyImpl";
5351
export * from "./WritableToken";
52+
export * from "./BailErrorStrategy";
53+
export * from "./atn";
54+
export * from "./misc";

src/misc/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export * from "./EqualityComparator";
1616
// export * from "./FlexibleHashMap";
1717
export * from "./IntegerList";
1818
export * from "./IntegerStack";
19-
export * from "./InterpreterDataReader";
19+
// export * from "./InterpreterDataReader";
2020
export * from "./Interval";
2121
export * from "./IntervalSet";
2222
export * from "./IntSet";

test/tool/TestGraphNodes.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import assertEquals = assert.strictEqual;
1010
import { test as Test, suite } from "mocha-typescript";
1111

1212
import { PredictionContext } from "../../src/atn/PredictionContext";
13-
import { PredictionContextCache } from "../../src/atn/PredictionContextCache";
13+
import { PredictionContextCache } from "../../src/atn/PredictionContext";
1414

1515
/// Assuming that IdentityHashMap<K, V> == Map<K, V>;
1616

0 commit comments

Comments
 (0)