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

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

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

Parser.displayRecognitionError介绍

暂无

代码示例

代码示例来源:origin: protostuff/protostuff

/**
 * Creates the error/warning message that we need to show users/IDEs when ANTLR has found a parsing error, has
 * recovered from it and is now telling us that a parsing exception occurred.
 * 
 * @param tokenNames
 *            token names as known by ANTLR (which we ignore)
 * @param e
 *            The exception that was thrown
 */
@Override
public void displayRecognitionError(String[] tokenNames, RecognitionException e)
{
  // This is just a place holder that shows how to override this method
  //
  super.displayRecognitionError(tokenNames, e);
}

代码示例来源:origin: net.rapture/CodeGenLib

@Override
public void displayRecognitionError(String[] tokenNames, RecognitionException e) {
  // This is just a place holder that shows how to override this method
  //
  super.displayRecognitionError(tokenNames, e);
}

代码示例来源:origin: net.rapture/RaptureCore

/**
 * Creates the error/warning message that we need to show users/IDEs when
 * ANTLR has found a parsing error, has recovered from it and is now telling
 * us that a parsing exception occurred.
 * 
 * @param tokenNames
 *            token names as known by ANTLR (which we ignore)
 * @param e
 *            The exception that was thrown
 */
@Override
public void displayRecognitionError(String[] tokenNames, RecognitionException e) {
  // This is just a place holder that shows how to override this method
  //
  super.displayRecognitionError(tokenNames, e);
}

代码示例来源:origin: com.dyuproject.fbsgen/fbsgen-parser

/**
 * Creates the error/warning message that we need to show users/IDEs when
 * ANTLR has found a parsing error, has recovered from it and is now telling
 * us that a parsing exception occurred.
 * 
 * @param tokenNames
 *            token names as known by ANTLR (which we ignore)
 * @param e
 *            The exception that was thrown
 */
public void displayRecognitionError(String[] tokenNames, RecognitionException e)
{
  // This is just a place holder that shows how to override this method
  //
  super.displayRecognitionError(tokenNames, e);
}

代码示例来源:origin: net.rapture/RaptureCore

/**
 * Creates the error/warning message that we need to show users/IDEs when
 * ANTLR has found a parsing error, has recovered from it and is now telling
 * us that a parsing exception occurred.
 * 
 * @param tokenNames
 *            token names as known by ANTLR (which we ignore)
 * @param e
 *            The exception that was thrown
 */
@Override
public void displayRecognitionError(String[] tokenNames, RecognitionException e) {
  // This is just a place holder that shows how to override this method
  //
  super.displayRecognitionError(tokenNames, e);
}

代码示例来源:origin: com.dyuproject.protostuff/protostuff-parser

/**
 * Creates the error/warning message that we need to show users/IDEs when
 * ANTLR has found a parsing error, has recovered from it and is now telling
 * us that a parsing exception occurred.
 * 
 * @param tokenNames
 *            token names as known by ANTLR (which we ignore)
 * @param e
 *            The exception that was thrown
 */
public void displayRecognitionError(String[] tokenNames, RecognitionException e)
{
  // This is just a place holder that shows how to override this method
  //
  super.displayRecognitionError(tokenNames, e);
}

代码示例来源:origin: net.rapture/RaptureCommon

/**
   * Creates the error/warning message that we need to show users/IDEs when
   * ANTLR has found a parsing error, has recovered from it and is now telling
   * us that a parsing exception occurred.
   * 
   * @param tokenNames
   *            token names as known by ANTLR (which we ignore)
   * @param e
   *            The exception that was thrown
   */
  @Override
  public void displayRecognitionError(String[] tokenNames, RecognitionException e) {

    // This is just a place holder that shows how to override this method
    //
    super.displayRecognitionError(tokenNames, e);
  }
}

代码示例来源:origin: net.sourceforge.jadex/jadex-rules

public void displayRecognitionError(String[] tokenNames, RecognitionException e)
{
  if(errors!=null)
  {
    String hdr = getErrorHeader(e);
    String msg = getErrorMessage(e, tokenNames);
    errors.add(hdr + " " + msg);
  }
  else
  {
    super.displayRecognitionError(tokenNames, e);
  }
}
public void setErrorList(List errors)

代码示例来源:origin: org.activecomponents.jadex/jadex-rules

public void displayRecognitionError(String[] tokenNames, RecognitionException e)
{
  if(errors!=null)
  {
    String hdr = getErrorHeader(e);
    String msg = getErrorMessage(e, tokenNames);
    errors.add(hdr + " " + msg);
  }
  else
  {
    super.displayRecognitionError(tokenNames, e);
  }
}
public void setErrorList(List errors)

代码示例来源:origin: org.eclipse.epsilon/epsilon-core

@Override
public void displayRecognitionError(String[] tokenNames,
                  RecognitionException re) {
  
  EpsilonParseProblemManager.INSTANCE.reportException(
      re.line, re.charPositionInLine, getErrorMessage(re, getTokenNames())
  );
  
  if (printErrors) {
    super.displayRecognitionError(tokenNames, re);
  }
}

相关文章