Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| ESC/Java2 © 2003,2004,2005 David Cok and Joseph Kiniry © 2005 UCD Dublin © 2003,2004 Radboud University Nijmegen © 1999,2000 Compaq Computer Corporation © 1997,1998,1999 Digital Equipment Corporation All Rights Reserved
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## javafe.parser
Class TokenQueue

    java.lang.Object
      javafe.parser.TokenQueue

class TokenQueue
extends java.lang.Object

Field Summary
`private int` | `end`
`boolean` | `notempty` Do not write.
`private int` | `start`
`private Token[]` | `toks` Contents of queue tokens.

Constructor Summary
`TokenQueue()`

Method Summary
`void` | `clear()` Empties lookahead queue.
`void` | `dequeue(Token dst)` Removes head of token queue.
`Token` | `elementAt(int n)` Returns `n`th element in token queue.
`void` | `enqueue(Token td)` Pushes a token onto the lookahead queue.
`void` | `setElementAt(int n, Token t)`
`int` | `size()` Returns number of items in token queue.
`private java.lang.String` | `stateToString()`
`void` | `zzz(java.lang.String prefix)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### toks

    private Token[] toks

  Contents of queue tokens. Used as circular buffer with `start` and `end` being output and input pointers, respectively. `toks[start]` is first element; `toks[(end + toks.len - 1) % toks.len]` is last element.

### start

    private int start

### end

    private int end

### notempty

    public boolean notempty

  Do not write. True iff queue is not empty.

Constructor Detail

### TokenQueue

    public TokenQueue()

Method Detail

### size

    public int size()

  Returns number of items in token queue.

### elementAt

    public Token elementAt(int n)

  Returns `n`th element in token queue.

           requires 0 <= n;

### setElementAt

    public void setElementAt(int n,
                             Token t)

### clear

    public void clear()

  Empties lookahead queue.

### dequeue

    public void dequeue(Token dst)

  Removes head of token queue. Requires: notempty

           requires dst != null;

### enqueue

    public void enqueue(Token td)

  Pushes a token onto the lookahead queue.

           requires td != null;

### stateToString

    private java.lang.String stateToString()

### zzz

    public void zzz(java.lang.String prefix)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| ESC/Java2 © 2003,2004,2005 David Cok and Joseph Kiniry © 2005 UCD Dublin © 2003,2004 Radboud University Nijmegen © 1999,2000 Compaq Computer Corporation © 1997,1998,1999 Digital Equipment Corporation All Rights Reserved
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

The ESC/Java2 Project Homepage