org.antlr.v4.runtime.Parser.getErrorListenerDispatch()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(11.1k)|赞(0)|评价(0)|浏览(128)

本文整理了Java中org.antlr.v4.runtime.Parser.getErrorListenerDispatch()方法的一些代码示例,展示了Parser.getErrorListenerDispatch()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Parser.getErrorListenerDispatch()方法的具体详情如下:
包路径:org.antlr.v4.runtime.Parser
类名称:Parser
方法名:getErrorListenerDispatch

Parser.getErrorListenerDispatch介绍

暂无

代码示例

代码示例来源:origin: org.antlr/antlr4-runtime

protected void reportAttemptingFullContext(DFA dfa, BitSet conflictingAlts, ATNConfigSet configs, int startIndex, int stopIndex) {
  if ( debug || retry_debug ) {
    Interval interval = Interval.of(startIndex, stopIndex);
    System.out.println("reportAttemptingFullContext decision="+dfa.decision+":"+configs+
              ", input="+parser.getTokenStream().getText(interval));
  }
  if ( parser!=null ) parser.getErrorListenerDispatch().reportAttemptingFullContext(parser, dfa, startIndex, stopIndex, conflictingAlts, configs);
}

代码示例来源:origin: org.antlr/antlr4-runtime

protected void reportContextSensitivity(DFA dfa, int prediction, ATNConfigSet configs, int startIndex, int stopIndex) {
  if ( debug || retry_debug ) {
    Interval interval = Interval.of(startIndex, stopIndex);
    System.out.println("reportContextSensitivity decision="+dfa.decision+":"+configs+
              ", input="+parser.getTokenStream().getText(interval));
  }
  if ( parser!=null ) parser.getErrorListenerDispatch().reportContextSensitivity(parser, dfa, startIndex, stopIndex, prediction, configs);
}

代码示例来源:origin: org.antlr/antlr4-runtime

/** If context sensitive parsing, we know it's ambiguity not conflict */
protected void reportAmbiguity(DFA dfa,
                DFAState D, // the DFA state from execATN() that had SLL conflicts
                int startIndex, int stopIndex,
                boolean exact,
                BitSet ambigAlts,
                ATNConfigSet configs) // configs that LL not SLL considered conflicting
{
  if ( debug || retry_debug ) {
    Interval interval = Interval.of(startIndex, stopIndex);
    System.out.println("reportAmbiguity "+
              ambigAlts+":"+configs+
              ", input="+parser.getTokenStream().getText(interval));
  }
  if ( parser!=null ) parser.getErrorListenerDispatch().reportAmbiguity(parser, dfa, startIndex, stopIndex,
                                     exact, ambigAlts, configs);
}

代码示例来源:origin: org.antlr/antlr4-runtime

public void notifyErrorListeners(Token offendingToken, String msg,
                 RecognitionException e)
{
  _syntaxErrors++;
  int line = -1;
  int charPositionInLine = -1;
  line = offendingToken.getLine();
  charPositionInLine = offendingToken.getCharPositionInLine();
  ANTLRErrorListener listener = getErrorListenerDispatch();
  listener.syntaxError(this, offendingToken, line, charPositionInLine, msg, e);
}

代码示例来源:origin: com.impetus.fabric/fabric-jdbc-driver-shaded

protected void reportContextSensitivity(DFA dfa, int prediction, ATNConfigSet configs, int startIndex, int stopIndex) {
  if ( debug || retry_debug ) {
    Interval interval = Interval.of(startIndex, stopIndex);
    System.out.println("reportContextSensitivity decision="+dfa.decision+":"+configs+
              ", input="+parser.getTokenStream().getText(interval));
  }
  if ( parser!=null ) parser.getErrorListenerDispatch().reportContextSensitivity(parser, dfa, startIndex, stopIndex, prediction, configs);
}

代码示例来源:origin: io.virtdata/virtdata-lib-realer

protected void reportAttemptingFullContext(DFA dfa, BitSet conflictingAlts, ATNConfigSet configs, int startIndex, int stopIndex) {
  if ( debug || retry_debug ) {
    Interval interval = Interval.of(startIndex, stopIndex);
    System.out.println("reportAttemptingFullContext decision="+dfa.decision+":"+configs+
              ", input="+parser.getTokenStream().getText(interval));
  }
  if ( parser!=null ) parser.getErrorListenerDispatch().reportAttemptingFullContext(parser, dfa, startIndex, stopIndex, conflictingAlts, configs);
}

代码示例来源:origin: io.virtdata/virtdata-lib-realer

protected void reportContextSensitivity(DFA dfa, int prediction, ATNConfigSet configs, int startIndex, int stopIndex) {
  if ( debug || retry_debug ) {
    Interval interval = Interval.of(startIndex, stopIndex);
    System.out.println("reportContextSensitivity decision="+dfa.decision+":"+configs+
              ", input="+parser.getTokenStream().getText(interval));
  }
  if ( parser!=null ) parser.getErrorListenerDispatch().reportContextSensitivity(parser, dfa, startIndex, stopIndex, prediction, configs);
}

代码示例来源:origin: uk.co.nichesolutions/antlr4-runtime

protected void reportAttemptingFullContext(DFA dfa, BitSet conflictingAlts, ATNConfigSet configs, int startIndex, int stopIndex) {
  if ( debug || retry_debug ) {
    Interval interval = Interval.of(startIndex, stopIndex);
    System.out.println("reportAttemptingFullContext decision="+dfa.decision+":"+configs+
              ", input="+parser.getTokenStream().getText(interval));
  }
  if ( parser!=null ) parser.getErrorListenerDispatch().reportAttemptingFullContext(parser, dfa, startIndex, stopIndex, conflictingAlts, configs);
}

代码示例来源:origin: com.impetus.fabric/fabric-jdbc-driver-shaded

protected void reportAttemptingFullContext(DFA dfa, BitSet conflictingAlts, ATNConfigSet configs, int startIndex, int stopIndex) {
  if ( debug || retry_debug ) {
    Interval interval = Interval.of(startIndex, stopIndex);
    System.out.println("reportAttemptingFullContext decision="+dfa.decision+":"+configs+
              ", input="+parser.getTokenStream().getText(interval));
  }
  if ( parser!=null ) parser.getErrorListenerDispatch().reportAttemptingFullContext(parser, dfa, startIndex, stopIndex, conflictingAlts, configs);
}

代码示例来源:origin: uk.co.nichesolutions/antlr4-runtime

protected void reportContextSensitivity(DFA dfa, int prediction, ATNConfigSet configs, int startIndex, int stopIndex) {
  if ( debug || retry_debug ) {
    Interval interval = Interval.of(startIndex, stopIndex);
    System.out.println("reportContextSensitivity decision="+dfa.decision+":"+configs+
              ", input="+parser.getTokenStream().getText(interval));
  }
  if ( parser!=null ) parser.getErrorListenerDispatch().reportContextSensitivity(parser, dfa, startIndex, stopIndex, prediction, configs);
}

代码示例来源:origin: com.impetus.fabric/fabric-jdbc-driver-shaded

/** If context sensitive parsing, we know it's ambiguity not conflict */
protected void reportAmbiguity(DFA dfa, DFAState D, int startIndex, int stopIndex,
                boolean exact,
                BitSet ambigAlts,
                ATNConfigSet configs)
{
  if ( debug || retry_debug ) {
    Interval interval = Interval.of(startIndex, stopIndex);
    System.out.println("reportAmbiguity "+
              ambigAlts+":"+configs+
              ", input="+parser.getTokenStream().getText(interval));
  }
  if ( parser!=null ) parser.getErrorListenerDispatch().reportAmbiguity(parser, dfa, startIndex, stopIndex,
                                     exact, ambigAlts, configs);
}

代码示例来源:origin: io.virtdata/virtdata-lib-realer

/** If context sensitive parsing, we know it's ambiguity not conflict */
protected void reportAmbiguity(DFA dfa,
                DFAState D, // the DFA state from execATN() that had SLL conflicts
                int startIndex, int stopIndex,
                boolean exact,
                BitSet ambigAlts,
                ATNConfigSet configs) // configs that LL not SLL considered conflicting
{
  if ( debug || retry_debug ) {
    Interval interval = Interval.of(startIndex, stopIndex);
    System.out.println("reportAmbiguity "+
              ambigAlts+":"+configs+
              ", input="+parser.getTokenStream().getText(interval));
  }
  if ( parser!=null ) parser.getErrorListenerDispatch().reportAmbiguity(parser, dfa, startIndex, stopIndex,
                                     exact, ambigAlts, configs);
}

代码示例来源:origin: uk.co.nichesolutions/antlr4-runtime

/** If context sensitive parsing, we know it's ambiguity not conflict */
protected void reportAmbiguity(DFA dfa,
                DFAState D, // the DFA state from execATN() that had SLL conflicts
                int startIndex, int stopIndex,
                boolean exact,
                BitSet ambigAlts,
                ATNConfigSet configs) // configs that LL not SLL considered conflicting
{
  if ( debug || retry_debug ) {
    Interval interval = Interval.of(startIndex, stopIndex);
    System.out.println("reportAmbiguity "+
              ambigAlts+":"+configs+
              ", input="+parser.getTokenStream().getText(interval));
  }
  if ( parser!=null ) parser.getErrorListenerDispatch().reportAmbiguity(parser, dfa, startIndex, stopIndex,
                                     exact, ambigAlts, configs);
}

代码示例来源:origin: com.impetus.fabric/fabric-jdbc-driver-shaded

public void notifyErrorListeners(Token offendingToken, String msg,
                 RecognitionException e)
{
  _syntaxErrors++;
  int line = -1;
  int charPositionInLine = -1;
  line = offendingToken.getLine();
  charPositionInLine = offendingToken.getCharPositionInLine();
  ANTLRErrorListener listener = getErrorListenerDispatch();
  listener.syntaxError(this, offendingToken, line, charPositionInLine, msg, e);
}

代码示例来源:origin: com.tunnelvisionlabs/antlr4-runtime

protected void reportContextSensitivity(@NotNull DFA dfa, int prediction, @NotNull SimulatorState acceptState, int startIndex, int stopIndex) {
  if ( debug || retry_debug ) {
    Interval interval = Interval.of(startIndex, stopIndex);
    System.out.println("reportContextSensitivity decision="+dfa.decision+":"+acceptState.s0.configs+
              ", input="+parser.getInputStream().getText(interval));
  }
  if ( parser!=null ) parser.getErrorListenerDispatch().reportContextSensitivity(parser, dfa, startIndex, stopIndex, prediction, acceptState);
}

代码示例来源:origin: uk.co.nichesolutions/antlr4-runtime

public void notifyErrorListeners(Token offendingToken, String msg,
                 RecognitionException e)
{
  _syntaxErrors++;
  int line = -1;
  int charPositionInLine = -1;
  line = offendingToken.getLine();
  charPositionInLine = offendingToken.getCharPositionInLine();
  ANTLRErrorListener listener = getErrorListenerDispatch();
  listener.syntaxError(this, offendingToken, line, charPositionInLine, msg, e);
}

代码示例来源:origin: io.virtdata/virtdata-lib-realer

public void notifyErrorListeners(Token offendingToken, String msg,
                 RecognitionException e)
{
  _syntaxErrors++;
  int line = -1;
  int charPositionInLine = -1;
  line = offendingToken.getLine();
  charPositionInLine = offendingToken.getCharPositionInLine();
  ANTLRErrorListener listener = getErrorListenerDispatch();
  listener.syntaxError(this, offendingToken, line, charPositionInLine, msg, e);
}

代码示例来源:origin: com.tunnelvisionlabs/antlr4-runtime

protected void reportAttemptingFullContext(@NotNull DFA dfa, @Nullable BitSet conflictingAlts, @NotNull SimulatorState conflictState, int startIndex, int stopIndex) {
  if ( debug || retry_debug ) {
    Interval interval = Interval.of(startIndex, stopIndex);
    System.out.println("reportAttemptingFullContext decision="+dfa.decision+":"+conflictState.s0.configs+
              ", input="+parser.getInputStream().getText(interval));
  }
  if ( parser!=null ) parser.getErrorListenerDispatch().reportAttemptingFullContext(parser, dfa, startIndex, stopIndex, conflictingAlts, conflictState);
}

代码示例来源:origin: com.tunnelvisionlabs/antlr4-runtime

/** If context sensitive parsing, we know it's ambiguity not conflict */
protected void reportAmbiguity(@NotNull DFA dfa,
                DFAState D, // the DFA state from execATN() that had SLL conflicts
                int startIndex, int stopIndex,
                boolean exact,
                @NotNull BitSet ambigAlts,
                @NotNull ATNConfigSet configs) // configs that LL not SLL considered conflicting
{
  if ( debug || retry_debug ) {
    Interval interval = Interval.of(startIndex, stopIndex);
    System.out.println("reportAmbiguity "+
              ambigAlts+":"+configs+
              ", input="+parser.getInputStream().getText(interval));
  }
  if ( parser!=null ) parser.getErrorListenerDispatch().reportAmbiguity(parser, dfa, startIndex, stopIndex,
                                     exact, ambigAlts, configs);
}

代码示例来源:origin: com.tunnelvisionlabs/antlr4-runtime

public void notifyErrorListeners(@NotNull Token offendingToken, @NotNull String msg,
                 @Nullable RecognitionException e)
{
  _syntaxErrors++;
  int line = -1;
  int charPositionInLine = -1;
  if (offendingToken != null) {
    line = offendingToken.getLine();
    charPositionInLine = offendingToken.getCharPositionInLine();
  }
  ANTLRErrorListener<? super Token> listener = getErrorListenerDispatch();
  listener.syntaxError(this, offendingToken, line, charPositionInLine, msg, e);
}

相关文章