UnexpectedExtraTokenException
Home ] Up ] ParserException ] DivisionByZeroException ] ParserIOException ] ParserNumberFormatException ] UnbalancedParenthesesException ] [ UnexpectedExtraTokenException ] UnexpectedTokenFoundException ] UnsupportedFeatureException ]

 

 

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;
}
The page was last updated February 19, 2008