NoViableAltExceptionpublic class NoViableAltException extends RecognitionException
Fields Summary |
---|
public Token | token | public AST | node |
Constructors Summary |
---|
public NoViableAltException(AST t)
super("NoViableAlt", "<AST>", t.getLine(), t.getColumn());
node = t;
| public NoViableAltException(Token t, String fileName_)
super("NoViableAlt", fileName_, t.getLine(), t.getColumn());
token = t;
|
Methods Summary |
---|
public java.lang.String | getMessage()Returns a clean error message (no line number/column information)
if (token != null) {
return "unexpected token: " + token.getText();
}
// must a tree parser error if token==null
if (node == TreeParser.ASTNULL) {
return "unexpected end of subtree";
}
return "unexpected AST node: " + node.toString();
|
|