18 package com.mysql.clusterj.jdbc.antlr;
20 import org.antlr.runtime.RecognitionException;
22 import java.util.List;
32 protected boolean seenErrors =
false;
35 if (recognizerErrorDelegate == null) {
36 throw new IllegalArgumentException(
"You must pass a recognizer delegate");
38 this.recognizerErrorDelegate = recognizerErrorDelegate;
41 public void displayRecognitionError(
final String[] tokenNames,
final RecognitionException e) {
42 recognizerErrorDelegate.originalDisplayError(tokenNames, e);
46 public void reportError(
final RecognitionException e) {
47 recognizerErrorDelegate.originalReportError(e);
50 public String getErrorHeader(
final RecognitionException e) {
51 return recognizerErrorDelegate.originalGetErrorHeader(e);
54 public String getErrorMessage(
final RecognitionException e,
final String[] tokenNames) {
55 return recognizerErrorDelegate.originalGetErrorMessage(e, tokenNames);
58 public void emitErrorMessage(
final String msg) {
59 recognizerErrorDelegate.originalEmitErrorMessage(msg);