package parser;
/**
* Exception thrown when an unexpected extra token was detected by the parser.
*
* @author Bryan J. Higgs
*/
public class UnexpectedExtraTokenException extends ParserException
{
/**
* Constructor
*/
public UnexpectedExtraTokenException(Token token, String line)
{
super(line, token.getOffset());
m_token = token;
}
/**
* Gets the message for the exception
* (implementation of abstract method)
*/
public String getMessage()
{
return "Unexpected token after end of expression: " + m_token;
}
/// Private data ///
private Token m_token;
}
|