public class virtual_parse_stack
extends java.lang.Object
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 java.util.Stack |
real_stack
The real stack that we shadow.
|
protected java.util.Stack |
vstack
The virtual top portion of the stack.
|
Constructor and Description |
---|
virtual_parse_stack(java.util.Stack shadowing_stack)
Constructor to build a virtual stack out of a real stack.
|
Modifier and Type | Method and Description |
---|---|
boolean |
empty()
Indicate whether the stack is empty.
|
protected void |
get_from_real()
Transfer an element from the real to the virtual stack.
|
void |
pop()
Pop the stack.
|
void |
push(int state_num)
Push a state number onto the stack.
|
int |
top()
Return value on the top of the stack (without popping it).
|
protected java.util.Stack real_stack
protected int real_next
protected java.util.Stack vstack
public virtual_parse_stack(java.util.Stack shadowing_stack) throws java.lang.Exception
java.lang.Exception
protected void get_from_real()
public boolean empty()
public int top() throws java.lang.Exception
java.lang.Exception
public void pop() throws java.lang.Exception
java.lang.Exception
public void push(int state_num)