Pasc+Java 这是一个国外的随机自动机*(RAM)一个学习用的程序
源代码在线查看: parserexception.java
/**
*
* @author Michael Wels
* @since 12.06.2002
* @version 1.01
*/
public class ParserException extends java.lang.Exception {
// Membervariablen
private Token token;
/**
* Creates new ParserException without detail message.
*/
public ParserException() {
}
/**
* Constructs an ParserException with the specified detail message.
*
* @param msg the detail message.
*/
public ParserException(String msg) {
super(msg);
}
/**
* Constructs an ParserException with the specified detail message.
*
* @param msg the detail message.
*/
public ParserException(String msg, Token lastToken) {
super(msg);
token = lastToken;
}
/**
* Accessormethode für das Token, bei dem der Fehler auftrat.
*
* @return Token
*/
public Token getToken() {
return token;
}
}