Class UnexpectedTokenException

All Implemented Interfaces:
Serializable

public class UnexpectedTokenException extends ParseException

Thrown by a Parser when we got a token we weren't expecting

See Also:
  • Constructor Details

    • UnexpectedTokenException

      public UnexpectedTokenException(Problem customProblem, Set<? extends TokenType> expected, Token got)
    • UnexpectedTokenException

      public UnexpectedTokenException(Set<? extends TokenType> expected, Token got)
  • Method Details

    • hasDefaultProblem

      public boolean hasDefaultProblem()
      Returns:
      true if the problem connected to this exception was supplied by the thrower (i.e. a custom message), or whether it was a default unexpected token problem as generated by the constructor.
    • getExpected

      public Set<? extends TokenType> getExpected()
    • getGot

      public Token getGot()