Skip to content

Commit bc99718

Browse files
committed
set parser prediction mode to SLL
1 parent 30a1ad3 commit bc99718

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/main/java/graphql/parser/Parser.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import org.antlr.v4.runtime.CommonTokenStream;
88
import org.antlr.v4.runtime.DefaultErrorStrategy;
99
import org.antlr.v4.runtime.RecognitionException;
10+
import org.antlr.v4.runtime.atn.PredictionMode;
1011

1112
public class Parser {
1213

@@ -18,6 +19,7 @@ public Document parseDocument(String input) {
1819
CommonTokenStream tokens = new CommonTokenStream(lexer);
1920

2021
GraphqlParser parser = new GraphqlParser(tokens);
22+
parser.getInterpreter().setPredictionMode(PredictionMode.SLL);
2123
parser.setErrorHandler(new ErrorStrategy());
2224
GraphqlParser.DocumentContext document = parser.document();
2325

0 commit comments

Comments
 (0)