org.antlr.v4.runtime.dfa.DFA Java Examples
The following examples show how to use
org.antlr.v4.runtime.dfa.DFA.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: MysqlParserFactory.java From antsdb with GNU Lesser General Public License v3.0 | 5 votes |
private DFA[] getDFA() { DFA[] result = new DFA[_ATN.getNumberOfDecisions()]; for (int i = 0; i < _ATN.getNumberOfDecisions(); i++) { result[i] = new DFA(_ATN.getDecisionState(i), i); } return result; }
Example #2
Source File: AntlrATNCacheFields.java From presto with Apache License 2.0 | 5 votes |
private static DFA[] createDecisionToDFA(ATN atn) { DFA[] decisionToDFA = new DFA[atn.getNumberOfDecisions()]; for (int i = 0; i < decisionToDFA.length; i++) { decisionToDFA[i] = new DFA(atn.getDecisionState(i), i); } return decisionToDFA; }
Example #3
Source File: ADLErrorListener.java From archie with Apache License 2.0 | 5 votes |
@Override public void reportAmbiguity(Parser recognizer, DFA dfa, int startIndex, int stopIndex, boolean exact, BitSet ambigAlts, ATNConfigSet configs) { String input = recognizer.getInputStream().getText(new Interval(startIndex, stopIndex)); String warning = String.format("FULL AMBIGUITY: %d-%d, exact: %b, input: %s", startIndex, stopIndex, exact, input); logger.debug(warning); errors.addWarning(warning); }
Example #4
Source File: DefaultANTLRErrorListener.java From yauaa with Apache License 2.0 | 5 votes |
@Override default void reportContextSensitivity( Parser recognizer, DFA dfa, int startIndex, int stopIndex, int prediction, ATNConfigSet configs) { // Ignore this always. }
Example #5
Source File: DefaultANTLRErrorListener.java From yauaa with Apache License 2.0 | 5 votes |
@Override default void reportAttemptingFullContext( Parser recognizer, DFA dfa, int startIndex, int stopIndex, BitSet conflictingAlts, ATNConfigSet configs) { // Ignore this always. }
Example #6
Source File: UserAgent.java From yauaa with Apache License 2.0 | 5 votes |
@Override public void reportAmbiguity( Parser recognizer, DFA dfa, int startIndex, int stopIndex, boolean exact, BitSet ambigAlts, ATNConfigSet configs) { hasAmbiguity = true; ambiguityCount++; }
Example #7
Source File: DefaultANTLRErrorListener.java From yauaa with Apache License 2.0 | 5 votes |
@Override default void reportAmbiguity( Parser recognizer, DFA dfa, int startIndex, int stopIndex, boolean exact, BitSet ambigAlts, ATNConfigSet configs) { // Ignore this always. }
Example #8
Source File: CompilerErrorListener.java From BigDataScript with Apache License 2.0 | 4 votes |
@Override public void reportAttemptingFullContext(Parser arg0, DFA arg1, int arg2, int arg3, BitSet arg4, ATNConfigSet arg5) { // Nothing to do }
Example #9
Source File: ErrorListener.java From metron with Apache License 2.0 | 4 votes |
@Override public void reportContextSensitivity(Parser recognizer, DFA dfa, int startIndex, int stopIndex, int prediction, ATNConfigSet configs) { }
Example #10
Source File: FilterErrorListener.java From alchemy with MIT License | 4 votes |
@Override public void reportAmbiguity(@NotNull Parser parser, @NotNull DFA dfa, int i, int i2, boolean b, @Nullable BitSet bitSet, @NotNull ATNConfigSet atnConfigs) { throw new IllegalArgumentException("ambiguity"); }
Example #11
Source File: CSSErrorListener.java From jStyleParser with GNU Lesser General Public License v3.0 | 4 votes |
@Override public void reportContextSensitivity(Parser parser, DFA dfa, int i, int i1, int i2, ATNConfigSet atnConfigSet) { log.error("CSSErrorListener context sensitivity | "); }
Example #12
Source File: CompilerErrorListener.java From BigDataScript with Apache License 2.0 | 4 votes |
@Override public void reportContextSensitivity(Parser arg0, DFA arg1, int arg2, int arg3, int arg4, ATNConfigSet arg5) { // Nothing to do }
Example #13
Source File: ExpressionTagQueryParser.java From hawkular-alerts with Apache License 2.0 | 4 votes |
@Override public void reportContextSensitivity(Parser recognizer, DFA dfa, int startIndex, int stopIndex, int prediction, ATNConfigSet configs) { error = true; errorMsg = "Context Sensitivity error"; }
Example #14
Source File: CompilerErrorListener.java From BigDataScript with Apache License 2.0 | 4 votes |
@Override public void reportAmbiguity(Parser arg0, DFA arg1, int arg2, int arg3, boolean arg4, BitSet arg5, ATNConfigSet arg6) { // Nothing to do }
Example #15
Source File: StrfTimeToDateTimeFormatter.java From logparser with Apache License 2.0 | 4 votes |
@Override public void reportContextSensitivity(org.antlr.v4.runtime.Parser parser, DFA dfa, int i, int i1, int i2, ATNConfigSet atnConfigSet) { // Ignoring this Antlr4 event }
Example #16
Source File: StrfTimeToDateTimeFormatter.java From logparser with Apache License 2.0 | 4 votes |
@Override public void reportAttemptingFullContext(org.antlr.v4.runtime.Parser parser, DFA dfa, int i, int i1, BitSet bitSet, ATNConfigSet atnConfigSet) { // Ignoring this Antlr4 event }
Example #17
Source File: StrfTimeToDateTimeFormatter.java From logparser with Apache License 2.0 | 4 votes |
@Override public void reportAmbiguity(org.antlr.v4.runtime.Parser parser, DFA dfa, int i, int i1, boolean b, BitSet bitSet, ATNConfigSet atnConfigSet) { // Ignoring this Antlr4 event }
Example #18
Source File: PositionAdjustingLexerATNSimulator.java From beakerx with Apache License 2.0 | 4 votes |
public PositionAdjustingLexerATNSimulator(Lexer recog, ATN atn, DFA[] decisionToDFA, PredictionContextCache sharedContextCache) { super(recog, atn, decisionToDFA, sharedContextCache); }
Example #19
Source File: BatfishGrammarErrorListener.java From batfish with Apache License 2.0 | 4 votes |
@Override public void reportAmbiguity( Parser arg0, DFA arg1, int arg2, int arg3, boolean arg4, BitSet arg5, ATNConfigSet arg6) {}
Example #20
Source File: ErrorListener.java From metron with Apache License 2.0 | 4 votes |
@Override public void reportAttemptingFullContext(Parser recognizer, DFA dfa, int startIndex, int stopIndex, BitSet conflictingAlts, ATNConfigSet configs) { }
Example #21
Source File: ErrorListener.java From metron with Apache License 2.0 | 4 votes |
@Override public void reportAmbiguity(Parser recognizer, DFA dfa, int startIndex, int stopIndex, boolean exact, BitSet ambigAlts, ATNConfigSet configs) { }
Example #22
Source File: JQLBaseErrorListener.java From kripton with Apache License 2.0 | 4 votes |
@Override public void reportContextSensitivity(Parser recognizer, DFA dfa, int startIndex, int stopIndex, int prediction, ATNConfigSet configs) { }
Example #23
Source File: ExpressionTagQueryParser.java From hawkular-alerts with Apache License 2.0 | 4 votes |
@Override public void reportAttemptingFullContext(Parser recognizer, DFA dfa, int startIndex, int stopIndex, BitSet conflictingAlts, ATNConfigSet configs) { error = true; errorMsg = "Attempting Full Context error"; }
Example #24
Source File: ExpressionTagQueryParser.java From hawkular-alerts with Apache License 2.0 | 4 votes |
@Override public void reportAmbiguity(Parser recognizer, DFA dfa, int startIndex, int stopIndex, boolean exact, BitSet ambigAlts, ATNConfigSet configs) { error = true; errorMsg = "Ambiguity error"; }
Example #25
Source File: ADLErrorListener.java From archie with Apache License 2.0 | 4 votes |
@Override public void reportContextSensitivity(Parser recognizer, DFA dfa, int startIndex, int stopIndex, int prediction, ATNConfigSet configs) { logger.debug("CONTEXT SENSITIVITY: {}-{}, prediction: {}", startIndex, stopIndex, prediction); }
Example #26
Source File: ADLErrorListener.java From archie with Apache License 2.0 | 4 votes |
@Override public void reportAttemptingFullContext(Parser recognizer, DFA dfa, int startIndex, int stopIndex, BitSet conflictingAlts, ATNConfigSet configs) { String input = recognizer.getInputStream().getText(new Interval(startIndex, stopIndex)); logger.debug("FULL CONTEXT: {}-{}, alts: {}, {}", startIndex, stopIndex, conflictingAlts, input); }
Example #27
Source File: JQLBaseErrorListener.java From kripton with Apache License 2.0 | 4 votes |
@Override public void reportContextSensitivity(Parser recognizer, DFA dfa, int startIndex, int stopIndex, int prediction, ATNConfigSet configs) { }
Example #28
Source File: JQLBaseErrorListener.java From kripton with Apache License 2.0 | 4 votes |
@Override public void reportAttemptingFullContext(Parser recognizer, DFA dfa, int startIndex, int stopIndex, BitSet conflictingAlts, ATNConfigSet configs) { }
Example #29
Source File: JQLBaseErrorListener.java From kripton with Apache License 2.0 | 4 votes |
@Override public void reportAmbiguity(Parser recognizer, DFA dfa, int startIndex, int stopIndex, boolean exact, BitSet ambigAlts, ATNConfigSet configs) { }
Example #30
Source File: ContentUriBaseErrorListener.java From kripton with Apache License 2.0 | 4 votes |
@Override public void reportAttemptingFullContext(Parser recognizer, DFA dfa, int startIndex, int stopIndex, BitSet conflictingAlts, ATNConfigSet configs) { }