|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.ArrayList<Token>
org.pz.platypus.TokenList
public class TokenList
The ArrayList of Tokens that we generate in the parser and pass to the output plug-in.
Field Summary |
---|
Fields inherited from class java.util.AbstractList |
---|
modCount |
Constructor Summary | |
---|---|
TokenList()
|
Method Summary | |
---|---|
boolean |
areNextTokenContentsEqualTo(int i,
java.lang.String s)
See if the next immediate token (if any), is equal to s. |
void |
dump(GDD gdd)
dumps all the tokens in the output token list to System.out |
Token |
getNextToken(int tokNumber)
Gets the next token after the token pointed to by the tokenNumber |
Token |
getPrevToken(int tokNum)
Returns the token previous to the one whose number is passed in |
boolean |
isNextToken(int i,
TokenType tokType)
See if next immediate token (if any), is of type tokType. |
boolean |
lineSoFarEmitsText(int tokNum)
Gets all the preceding tokens in this input line and sees whether any of them contain text. |
int |
searchAheadFor(int currTokIndex,
TokenType tokType)
Start searching for tokType token in the list. |
Methods inherited from class java.util.ArrayList |
---|
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, remove, removeRange, set, size, toArray, toArray, trimToSize |
Methods inherited from class java.util.AbstractList |
---|
equals, hashCode, iterator, listIterator, listIterator, subList |
Methods inherited from class java.util.AbstractCollection |
---|
containsAll, removeAll, retainAll, toString |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.List |
---|
containsAll, equals, hashCode, iterator, listIterator, listIterator, removeAll, retainAll, subList |
Constructor Detail |
---|
public TokenList()
Method Detail |
---|
public Token getNextToken(int tokNumber)
tokNumber
- the number of the current token
public Token getPrevToken(int tokNum)
tokNum
- the number of the current token
public boolean lineSoFarEmitsText(int tokNum)
tokNum
- the present token
public void dump(GDD gdd)
gdd
- the GDDpublic boolean isNextToken(int i, TokenType tokType)
i
- the current positiontokType
- tokType to compare with
public boolean areNextTokenContentsEqualTo(int i, java.lang.String s)
i
- the current positions
- the token str
public int searchAheadFor(int currTokIndex, TokenType tokType)
currTokIndex
- tokType
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |