List of usage examples for org.antlr.v4.runtime.atn LexerATNSimulator getSharedContextCache
public PredictionContextCache getSharedContextCache()
From source file:com.tunnelvisionlabs.postgresql.PostgreSqlLexerUtils.java
License:Open Source License
public static PostgreSqlLexer createLexer(CharStream input) { PostgreSqlLexer lexer = new PostgreSqlLexer(input); // Use the custom LexerATNSimulator to work around known bugs LexerATNSimulator interpreter = lexer.getInterpreter(); interpreter = new PostgreSqlLexerAtnSimulator(lexer, interpreter.atn, interpreter.decisionToDFA, interpreter.getSharedContextCache()); lexer.setInterpreter(interpreter);//from w ww . j a v a2 s.co m return lexer; }