com.sun.java_cup.internal.runtime.lr_parser
| Modifier and Type | Field and Description |
|---|---|
| protected int | real_next
Top of stack indicator for where we leave off in the real stack. |
| protected Stack | real_stack
The real stack that we shadow. |
| protected Stack | vstack
The virtual top portion of the stack. |
| Access | Constructor and Description |
|---|---|
| public | virtual_parse_stack(Stack<Symbol> shadowing_stack)
Constructor to build a virtual stack out of a real stack. |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | |
| protected void | |
| public void | |
| public void | |
| public int |
| real_next | back to summary |
|---|---|
| protected int real_next Top of stack indicator for where we leave off in the real stack. This is measured from top of stack, so 0 would indicate that no elements have been "moved" from the real to virtual stack. | |
| real_stack | back to summary |
|---|---|
| protected Stack<Symbol> real_stack The real stack that we shadow. This is accessed when we move off the bottom of the virtual portion of the stack, but is always left unmodified. | |
| vstack | back to summary |
|---|---|
| protected Stack<Integer> vstack The virtual top portion of the stack. This stack contains Integer objects with state numbers. This stack shadows the top portion of the real stack within the area that has been modified (via operations on the virtual stack). When this portion of the stack becomes empty we transfer elements from the underlying stack onto this stack. | |
| virtual_parse_stack | back to summary |
|---|---|
| public virtual_parse_stack(Stack<Symbol> shadowing_stack) throws Exception Constructor to build a virtual stack out of a real stack. | |
| empty | back to summary |
|---|---|
| public boolean empty() Indicate whether the stack is empty. | |
| get_from_real | back to summary |
|---|---|
| protected void get_from_real() Transfer an element from the real to the virtual stack. This assumes that the virtual stack is currently empty. | |
| pop | back to summary |
|---|---|
| public void pop() throws Exception Pop the stack. | |
| push | back to summary |
|---|---|
| public void push(int state_num) Push a state number onto the stack. | |
| top | back to summary |
|---|---|
| public int top() throws Exception Return value on the top of the stack (without popping it). | |