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

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

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

Parser.displayRecognitionError介绍

暂无

代码示例

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  1. public void displayRecognitionError(String[] tokenNames, RecognitionException e)
  2. {
  3. if(errors!=null)
  4. {
  5. String hdr = getErrorHeader(e);
  6. String msg = getErrorMessage(e, tokenNames);
  7. errors.add(hdr + " " + msg);
  8. }
  9. else
  10. {
  11. super.displayRecognitionError(tokenNames, e);
  12. }
  13. }
  14. public void setErrorList(List errors)

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

  1. public void displayRecognitionError(String[] tokenNames, RecognitionException e)
  2. {
  3. if(errors!=null)
  4. {
  5. String hdr = getErrorHeader(e);
  6. String msg = getErrorMessage(e, tokenNames);
  7. errors.add(hdr + " " + msg);
  8. }
  9. else
  10. {
  11. super.displayRecognitionError(tokenNames, e);
  12. }
  13. }
  14. public void setErrorList(List errors)

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

  1. @Override
  2. public void displayRecognitionError(String[] tokenNames,
  3. RecognitionException re) {
  4. EpsilonParseProblemManager.INSTANCE.reportException(
  5. re.line, re.charPositionInLine, getErrorMessage(re, getTokenNames())
  6. );
  7. if (printErrors) {
  8. super.displayRecognitionError(tokenNames, re);
  9. }
  10. }

相关文章