|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.EventObject
scanner.TokenEvent
abc.parser.InvalidTokenEvent
Event generated when an invalid token is encountered by a parser.
Constructor Summary | |
InvalidTokenEvent(java.lang.Object source,
CharStreamPosition position,
TokenType expectedTokenType)
Creates a new event. |
|
InvalidTokenEvent(java.lang.Object source,
Token token,
TokenType expectedTokenType)
Creates a new event |
Method Summary | |
TokenType |
getExpectedTokenType()
Returns the type of the token that was expected. |
int |
getLength()
Returns the length of this positionable object. |
CharStreamPosition |
getPosition()
Returns the place where this event occured. |
java.lang.String |
toString()
Returns a String representation of this event. |
Methods inherited from class scanner.TokenEvent |
getToken |
Methods inherited from class java.util.EventObject |
getSource |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public InvalidTokenEvent(java.lang.Object source, Token token, TokenType expectedTokenType)
source
- The source that generates the event.token
- The encountered invalid token.expectedTokenType
- The type of token that was expected.public InvalidTokenEvent(java.lang.Object source, CharStreamPosition position, TokenType expectedTokenType)
source
- The source that generates the event.position
- The place where the event occured.expectedTokenType
- The type of token that was expected.Method Detail |
public TokenType getExpectedTokenType()
getPosition()
public CharStreamPosition getPosition()
getPosition
in interface PositionableInCharStream
getPosition
in class TokenEvent
public int getLength()
PositionableInCharStream
getLength
in interface PositionableInCharStream
getLength
in class TokenEvent
public java.lang.String toString()
toString
in class TokenEvent
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |