org.antlr.v4.runtime.atn.ATNConfigSet Java Examples

The following examples show how to use org.antlr.v4.runtime.atn.ATNConfigSet. 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: ADLErrorListener.java    From archie with Apache License 2.0 5 votes vote down vote up
@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 #2
Source File: DefaultANTLRErrorListener.java    From yauaa with Apache License 2.0 5 votes vote down vote up
@Override
default void reportContextSensitivity(
    Parser recognizer,
    DFA dfa,
    int startIndex,
    int stopIndex,
    int prediction,
    ATNConfigSet configs) {
    // Ignore this always.
}
 
Example #3
Source File: DefaultANTLRErrorListener.java    From yauaa with Apache License 2.0 5 votes vote down vote up
@Override
default void reportAttemptingFullContext(
    Parser recognizer,
    DFA dfa,
    int startIndex,
    int stopIndex,
    BitSet conflictingAlts,
    ATNConfigSet configs) {
    // Ignore this always.
}
 
Example #4
Source File: UserAgent.java    From yauaa with Apache License 2.0 5 votes vote down vote up
@Override
public void reportAmbiguity(
    Parser recognizer,
    DFA dfa,
    int startIndex,
    int stopIndex,
    boolean exact,
    BitSet ambigAlts,
    ATNConfigSet configs) {
    hasAmbiguity = true;
    ambiguityCount++;
}
 
Example #5
Source File: DefaultANTLRErrorListener.java    From yauaa with Apache License 2.0 5 votes vote down vote up
@Override
default void reportAmbiguity(
    Parser recognizer,
    DFA dfa,
    int startIndex,
    int stopIndex,
    boolean exact,
    BitSet ambigAlts,
    ATNConfigSet configs) {
    // Ignore this always.
}
 
Example #6
Source File: FilterErrorListener.java    From alchemy with MIT License 4 votes vote down vote up
@Override
public void reportAttemptingFullContext(@NotNull Parser parser, @NotNull DFA dfa, int i, int i2, @Nullable BitSet bitSet, @NotNull ATNConfigSet atnConfigs) {
    throw new IllegalArgumentException("ambiguity");
}
 
Example #7
Source File: ErrorListener.java    From metron with Apache License 2.0 4 votes vote down vote up
@Override
public void reportAttemptingFullContext(Parser recognizer, DFA dfa, int startIndex, int stopIndex, BitSet conflictingAlts, ATNConfigSet configs) {
}
 
Example #8
Source File: CSSErrorListener.java    From jStyleParser with GNU Lesser General Public License v3.0 4 votes vote down vote up
@Override
public void reportContextSensitivity(Parser parser, DFA dfa, int i, int i1, int i2, ATNConfigSet atnConfigSet) {
    log.error("CSSErrorListener context sensitivity | ");
}
 
Example #9
Source File: CompilerErrorListener.java    From BigDataScript with Apache License 2.0 4 votes vote down vote up
@Override
public void reportContextSensitivity(Parser arg0, DFA arg1, int arg2, int arg3, int arg4, ATNConfigSet arg5) {
	// Nothing to do
}
 
Example #10
Source File: CompilerErrorListener.java    From BigDataScript with Apache License 2.0 4 votes vote down vote up
@Override
public void reportAttemptingFullContext(Parser arg0, DFA arg1, int arg2, int arg3, BitSet arg4, ATNConfigSet arg5) {
	// Nothing to do
}
 
Example #11
Source File: CompilerErrorListener.java    From BigDataScript with Apache License 2.0 4 votes vote down vote up
@Override
public void reportAmbiguity(Parser arg0, DFA arg1, int arg2, int arg3, boolean arg4, BitSet arg5, ATNConfigSet arg6) {
	// Nothing to do
}
 
Example #12
Source File: StrfTimeToDateTimeFormatter.java    From logparser with Apache License 2.0 4 votes vote down vote up
@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 #13
Source File: StrfTimeToDateTimeFormatter.java    From logparser with Apache License 2.0 4 votes vote down vote up
@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 #14
Source File: StrfTimeToDateTimeFormatter.java    From logparser with Apache License 2.0 4 votes vote down vote up
@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 #15
Source File: JQLBaseErrorListener.java    From kripton with Apache License 2.0 4 votes vote down vote up
@Override
public void reportAmbiguity(Parser recognizer, DFA dfa, int startIndex, int stopIndex, boolean exact,
		BitSet ambigAlts, ATNConfigSet configs) {
	
}
 
Example #16
Source File: BatfishGrammarErrorListener.java    From batfish with Apache License 2.0 4 votes vote down vote up
@Override
public void reportAttemptingFullContext(
    Parser arg0, DFA arg1, int arg2, int arg3, BitSet arg4, ATNConfigSet arg5) {}
 
Example #17
Source File: BatfishGrammarErrorListener.java    From batfish with Apache License 2.0 4 votes vote down vote up
@Override
public void reportContextSensitivity(
    Parser arg0, DFA arg1, int arg2, int arg3, int arg4, ATNConfigSet arg5) {}
 
Example #18
Source File: BatfishParserATNSimulator.java    From batfish with Apache License 2.0 4 votes vote down vote up
@Override
protected NoViableAltException noViableAlt(
    TokenStream input, ParserRuleContext outerContext, ATNConfigSet configs, int startIndex) {
  _exception = super.noViableAlt(input, outerContext, configs, startIndex);
  return _exception;
}
 
Example #19
Source File: FilterErrorListener.java    From alchemy with MIT License 4 votes vote down vote up
@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 #20
Source File: ErrorListener.java    From metron with Apache License 2.0 4 votes vote down vote up
@Override
public void reportContextSensitivity(Parser recognizer, DFA dfa, int startIndex, int stopIndex, int prediction, ATNConfigSet configs) {
}
 
Example #21
Source File: BatfishGrammarErrorListener.java    From batfish with Apache License 2.0 4 votes vote down vote up
@Override
public void reportAmbiguity(
    Parser arg0, DFA arg1, int arg2, int arg3, boolean arg4, BitSet arg5, ATNConfigSet arg6) {}
 
Example #22
Source File: ErrorListener.java    From metron with Apache License 2.0 4 votes vote down vote up
@Override
public void reportAmbiguity(Parser recognizer, DFA dfa, int startIndex, int stopIndex, boolean exact, BitSet ambigAlts, ATNConfigSet configs) {
}
 
Example #23
Source File: ExpressionTagQueryParser.java    From hawkular-alerts with Apache License 2.0 4 votes vote down vote up
@Override
public void reportContextSensitivity(Parser recognizer, DFA dfa, int startIndex, int stopIndex, int prediction, ATNConfigSet configs) {
    error = true;
    errorMsg = "Context Sensitivity error";
}
 
Example #24
Source File: ExpressionTagQueryParser.java    From hawkular-alerts with Apache License 2.0 4 votes vote down vote up
@Override
public void reportAttemptingFullContext(Parser recognizer, DFA dfa, int startIndex, int stopIndex, BitSet conflictingAlts, ATNConfigSet configs) {
    error = true;
    errorMsg = "Attempting Full Context error";
}
 
Example #25
Source File: ExpressionTagQueryParser.java    From hawkular-alerts with Apache License 2.0 4 votes vote down vote up
@Override
public void reportAmbiguity(Parser recognizer, DFA dfa, int startIndex, int stopIndex, boolean exact, BitSet ambigAlts, ATNConfigSet configs) {
    error = true;
    errorMsg = "Ambiguity error";
}
 
Example #26
Source File: ADLErrorListener.java    From archie with Apache License 2.0 4 votes vote down vote up
@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 #27
Source File: ADLErrorListener.java    From archie with Apache License 2.0 4 votes vote down vote up
@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 #28
Source File: JQLBaseErrorListener.java    From kripton with Apache License 2.0 4 votes vote down vote up
@Override
public void reportContextSensitivity(Parser recognizer, DFA dfa, int startIndex, int stopIndex, int prediction,
		ATNConfigSet configs) {
	
}
 
Example #29
Source File: JQLBaseErrorListener.java    From kripton with Apache License 2.0 4 votes vote down vote up
@Override
public void reportAttemptingFullContext(Parser recognizer, DFA dfa, int startIndex, int stopIndex,
		BitSet conflictingAlts, ATNConfigSet configs) {
	
}
 
Example #30
Source File: JQLBaseErrorListener.java    From kripton with Apache License 2.0 4 votes vote down vote up
@Override
public void reportAmbiguity(Parser recognizer, DFA dfa, int startIndex, int stopIndex, boolean exact,
		BitSet ambigAlts, ATNConfigSet configs) {
	
}