recognitionexception.java

来自「SRI international 发布的OAA框架软件」· Java 代码 · 共 53 行

JAVA
53
字号
package antlr_oaa;

/* ANTLR Translator Generator
 * Project led by Terence Parr at http://www.jGuru.com
 * Software rights: http://www.antlr.org/RIGHTS.html
 *
 * $Id: RecognitionException.java,v 1.1 2002/11/08 17:37:47 agno Exp $
 */

public class RecognitionException extends ANTLRException {
    public String fileName;		// not used by treeparsers
    public int line;			// not used by treeparsers
    public int column;			// not used by treeparsers

    public RecognitionException() {
	super("parsing error");
    }

    /**
     * RecognitionException constructor comment.
     * @param s java.lang.String
     */
    public RecognitionException(String s) {
	super(s);
    }

    /**
     * RecognitionException constructor comment.
     * @param s java.lang.String
     */
    public RecognitionException(String s, String fileName, int line) {
	super(s);
	this.fileName = fileName;
	this.line = line;
    }

    public int getColumn() { return column; }

    /** @deprecated As of ANTLR 2.7.0 */
    public String getErrorMessage () { return getMessage(); }

    public String getFilename() {
	return fileName;
    }

    public int getLine() { return line; }

    public String toString() {
	return FileLineFormatter.getFormatter().
	    getFormatString(fileName,line)+getMessage();
    }
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?