|
Venice 0.7beta | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.util.AbstractCollection java.util.AbstractList java.util.Vector org.mov.parser.TokenStack
public class TokenStack
A stack of tokens which is used during parsing.
Field Summary |
---|
Fields inherited from class java.util.Vector |
---|
capacityIncrement, elementCount, elementData |
Fields inherited from class java.util.AbstractList |
---|
modCount |
Constructor Summary | |
---|---|
TokenStack()
Create a new token stack. |
Method Summary | |
---|---|
boolean |
match(int tokenType)
Compare the token on the top of the stack with the given type. |
Token |
pop()
Remove and return the token on the top of the stack. |
boolean |
pop(int tokenType)
Remove the token on the top of the stack and compare it with the given type. |
Methods inherited from class java.util.Vector |
---|
add, add, addAll, addAll, addElement, capacity, clear, clone, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, get, hashCode, indexOf, indexOf, insertElementAt, isEmpty, lastElement, lastIndexOf, lastIndexOf, remove, remove, removeAll, removeAllElements, removeElement, removeElementAt, removeRange, retainAll, set, setElementAt, setSize, size, subList, toArray, toArray, toString, trimToSize |
Methods inherited from class java.util.AbstractList |
---|
iterator, listIterator, listIterator |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.List |
---|
iterator, listIterator, listIterator |
Constructor Detail |
---|
public TokenStack()
Method Detail |
---|
public Token pop()
public boolean pop(int tokenType)
tokenType
- the expected token type on the stack.
TRUE
if the token is of the same type.public boolean match(int tokenType)
tokenType
- token type to compare with
1
if the token is of the same type;
0
otherwise
|
Venice 0.7beta | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |