Package kawa.lang
Class Translator.FormStack
- java.lang.Object
-
- gnu.lists.AbstractSequence<E>
-
- gnu.lists.ExtSequence<java.lang.Object>
-
- gnu.lists.LList
-
- gnu.lists.Pair
-
- kawa.lang.Translator.FormStack
-
- All Implemented Interfaces:
BoundedHashable,Consumable,Sequence<java.lang.Object>,java.io.Externalizable,java.io.Serializable,java.lang.Comparable,java.lang.Iterable<java.lang.Object>,java.util.Collection<java.lang.Object>,java.util.List<java.lang.Object>
- Enclosing class:
- Translator
public static class Translator.FormStack extends Pair
A list of "forms" to be further processed. It is implemented as an LList so we can save position information.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class gnu.lists.Pair
car, cdr, incompleteListMarker
-
Fields inherited from class gnu.lists.AbstractSequence
noInts
-
Fields inherited from interface gnu.lists.Sequence
ATTRIBUTE_VALUE, BOOLEAN_VALUE, CDATA_VALUE, CHAR_VALUE, COMMENT_VALUE, DOCUMENT_VALUE, DOUBLE_VALUE, ELEMENT_VALUE, EOF_VALUE, eofValue, FLOAT_VALUE, INT_S16_VALUE, INT_S32_VALUE, INT_S64_VALUE, INT_S8_VALUE, INT_U16_VALUE, INT_U32_VALUE, INT_U64_VALUE, INT_U8_VALUE, OBJECT_VALUE, PRIM_VALUE, PROCESSING_INSTRUCTION_VALUE, TEXT_BYTE_VALUE
-
-
Constructor Summary
Constructors Constructor Description FormStack(SourceLocator sloc)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.ObjectgetFirst()PairgetHead()Return the "head" of the list.PairlastPair()The Pair whose car is the last form in the list.java.lang.ObjectpopTail(Pair oldTail)voidpush(java.lang.Object value)voidpushAfter(java.lang.Object value, Pair position)voidpushAll(LList values)voidpushAll(LList values, Pair valuesLast)-
Methods inherited from class gnu.lists.Pair
compareTo, compareTo, equals, equals, get, getCar, getCdr, getPosNext, getPosPrevious, hasNext, isEmpty, length, make, nextPos, readExternal, readResolve, setCar, setCarBackdoor, setCdr, setCdrBackdoor, size, toArray, toArray, writeExternal
-
Methods inherited from class gnu.lists.LList
boundedHash, chain1, chain4, checkNonList, consume, consX, createPos, createRelativePos, getIterator, hashCode, length, list1, list2, list3, list4, listLength, makeList, makeList, makeList, reverseInPlace, setPosNext, setPosPrevious, toString
-
Methods inherited from class gnu.lists.ExtSequence
copyPos, isAfterPos, nextIndex, releasePos
-
Methods inherited from class gnu.lists.AbstractSequence
add, add, addAll, addAll, addPos, asImmutable, badRank, checkCanWrite, checkRank, clear, compare, compare, compare, consume, consumeNext, consumePosRange, contains, containsAll, effectiveIndex, effectiveIndex, effectiveIndex, effectiveIndex, effectiveIndex, elements, endPos, equals, fill, fill, fillPosRange, firstAttributePos, firstChildPos, firstChildPos, fromEndIndex, get, get, get, get, getAttribute, getAttributeLength, getBooleanRaw, getByteRaw, getCharRaw, getContainingSequenceSize, getDoubleRaw, getElementKind, getFloatRaw, getIndexDifference, getInt, getInt, getInt, getInt, getInt, getIntRaw, getIterator, getIteratorAtPos, getLongRaw, getLowBound, getNextKind, getNextTypeName, getNextTypeObject, getRaw, getRowMajor, getShortRaw, getSize, getSize, gotoAttributesStart, gotoChildrenStart, gotoParent, hasPrevious, indexOf, iterator, lastIndexOf, listIterator, listIterator, nextIndex, nextMatching, parentPos, previousPos, rank, remove, remove, removeAll, removePos, removePosRange, retainAll, set, set, setAt, setBuffer, setRaw, stableCompare, startPos, subList, subSequence, subSequencePos, toString, unsupported, unsupportedException
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
-
-
-
Constructor Detail
-
FormStack
public FormStack(SourceLocator sloc)
-
-
Method Detail
-
getHead
public Pair getHead()
Return the "head" of the list. The cdr of the head is the first element.
-
getFirst
public java.lang.Object getFirst()
-
lastPair
public Pair lastPair()
The Pair whose car is the last form in the list. If the list is empty, this returns the list head.
-
popTail
public java.lang.Object popTail(Pair oldTail)
-
push
public void push(java.lang.Object value)
-
pushAll
public void pushAll(LList values)
-
pushAfter
public void pushAfter(java.lang.Object value, Pair position)
-
-