Top Description Fields Constructors Methods
org.antlr.runtime

public Class UnwantedTokenException

extends MismatchedTokenException
Class Inheritance

An extra token while parsing a TokenStream

Field Summary

Inherited from org.antlr.runtime.MismatchedTokenException:
expecting

Constructor Summary

AccessConstructor and Description
public
UnwantedTokenException()

Used for remote debugger deserialization

public
UnwantedTokenException(int expecting, IntStream input)

Method Summary

Modifier and TypeMethod and Description
public Token
public String
toString()

Overrides org.antlr.runtime.MismatchedTokenException.toString.

Returns a short description of this throwable.

Constructor Detail

UnwantedTokenExceptionback to summary
public UnwantedTokenException()

Used for remote debugger deserialization

UnwantedTokenExceptionback to summary
public UnwantedTokenException(int expecting, IntStream input)

Method Detail

getUnexpectedTokenback to summary
public Token getUnexpectedToken()
toStringback to summary
public String toString()

Overrides org.antlr.runtime.MismatchedTokenException.toString.

Doc from java.lang.Throwable.toString.

Returns a short description of this throwable. The result is the concatenation of:

  • the name of the class of this object
  • ": " (a colon and a space)
  • the result of invoking this object's getLocalizedMessage method
If getLocalizedMessage returns null, then just the class name is returned.
Returns:String

a string representation of this throwable.

Annotations
@Override