|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface PredictiveParser
This interface describes an incremental parser capable of predicting the possible next tokens.
Method Summary | |
---|---|
void |
addToken(java.lang.String token)
Adds the token to the end of the token sequence. |
void |
addTokens(java.util.List<java.lang.String> tokens)
Adds the tokens to the token list. |
NextTokenOptions |
getNextTokenOptions()
This method returns the options for the next token to be added at the end. |
int |
getReference()
This method should return the token number to which the last token refers, if it is a reference like "it". |
int |
getTokenCount()
Returns the number of tokens of the current (partial) text. |
java.util.List<java.lang.String> |
getTokens()
Returns the current token sequence. |
boolean |
isComplete()
Returns true if the current token sequence is a complete statement. |
boolean |
isPossibleNextToken(java.lang.String token)
Returns whether the given token is a possible next token. |
void |
removeAllTokens()
Removes all tokens in the current token sequence. |
void |
removeToken()
Removes the last token. |
void |
setTokens(java.util.List<java.lang.String> tokens)
Sets the given tokens. |
Method Detail |
---|
void addToken(java.lang.String token)
token
- The new token to be added.void addTokens(java.util.List<java.lang.String> tokens)
tokens
- The tokens to be added.void removeToken()
void removeAllTokens()
void setTokens(java.util.List<java.lang.String> tokens)
tokens
- The tokens.java.util.List<java.lang.String> getTokens()
int getTokenCount()
NextTokenOptions getNextTokenOptions()
boolean isPossibleNextToken(java.lang.String token)
token
- The token.
boolean isComplete()
int getReference()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |