|
abc4j API Specification | |||||||||
| 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
public class 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 PositionableInCharStreamgetPosition in class TokenEventpublic int getLength()
PositionableInCharStream
getLength in interface PositionableInCharStreamgetLength in class TokenEventpublic java.lang.String toString()
toString in class TokenEvent
|
abc4j API Specification | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||