|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.voytechs.jnetstream.npl.TokenList
public abstract class TokenList
| Field Summary | |
|---|---|
protected java.io.StreamTokenizer |
in
|
| Constructor Summary | |
|---|---|
TokenList(java.io.StreamTokenizer in)
|
|
| Method Summary | |
|---|---|
int |
consumeTokens(int n)
Consumes N number of tokens from the stream. |
protected Token |
fetchRawTokenFromStream()
Fetches the RAW token. |
protected Token |
fetchTokenFromStream()
Fetches the next token from the raw stream. |
abstract java.lang.String |
getFilename()
Returns the filename of the stream if known. |
int |
getLineNumber()
Returns the line number of the curren token. |
boolean |
hasMoreTokens()
Tells if there are more tokens in the stream. |
void |
insert(Token token)
Inserts the given token into the stream buffer. |
Token |
lookAhead()
Looks ahead 1 token, but does not advance the token sequence in the stream. |
Token |
lookAhead(int nth)
Gets the Nth token in the stream from the current token position. |
Token |
lookAheadNoTranslation(int nth)
Gets the Nth token in the stream from the current token position. |
static void |
main(java.lang.String[] args)
Checks to see if there are any more tokens in the stream. |
Token |
nextToken()
Returns the next token. |
Token |
nextTokenNoTranslation()
Fetches the next token either from stream or cache with no translation. |
Token |
previousToken()
|
void |
pushBack()
Push back upto 2 to previous tokens. |
abstract Token |
translateNextToken()
Translate the next token on the tokenlist into a new token. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.io.StreamTokenizer in
| Constructor Detail |
|---|
public TokenList(java.io.StreamTokenizer in)
-
| Method Detail |
|---|
public Token previousToken()
public void pushBack()
public void insert(Token token)
public Token nextToken()
public Token lookAhead()
public Token lookAhead(int nth)
public abstract Token translateNextToken()
public int consumeTokens(int n)
public boolean hasMoreTokens()
public Token nextTokenNoTranslation()
public Token lookAheadNoTranslation(int nth)
protected Token fetchTokenFromStream()
protected Token fetchRawTokenFromStream()
public abstract java.lang.String getFilename()
public int getLineNumber()
public static void main(java.lang.String[] args)
args - command line arguments
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||