--- /dev/null
+/*
+ * SyntaxError.java
+ * Copyright (C) 2000 Klaus Hartlage
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+package net.sourceforge.phpeclipse.phpeditor;
+
+/**
+ * Exception for a syntax error detected by the HartMath parser
+ *
+ */
+public class SyntaxError extends Error {
+
+ int lineNumber;
+ int columnNumber;
+ String currentLine;
+ String error;
+ /**
+ * SyntaxError exception
+ *
+ *
+ * @see
+ */
+ public SyntaxError(int lineNumber, int columnNumber, String currentLine, String error) {
+ this.lineNumber = lineNumber;
+ this.columnNumber = columnNumber;
+ this.currentLine = currentLine;
+ this.error = error;
+ }
+
+ public String getMessage() {
+ // StringBuffer buf = new StringBuffer(256);
+ // buf.append("Syntax error in line:");
+ // buf.append(lineNumber+1);
+ // buf.append(": "+ error + "\n");
+ // buf.append( currentLine + "\n");
+ // for (int i=0; i<(columnNumber-1); i++) {
+ // buf.append(' ');
+ // }
+ // buf.append('^');
+ // return buf.toString();
+ System.err.println(currentLine);
+ return error;
+ }
+
+ public int getLine() {
+ return lineNumber;
+ }
+}