public class virtual_parse_stack extends 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 Stack<Symbol> |
real_stack
The real stack that we shadow.
|
protected Stack<Integer> |
vstack
The virtual top portion of the stack.
|
Constructor and Description |
---|
virtual_parse_stack(Stack<Symbol> 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 Stack<Symbol> real_stack
protected int real_next
protected Stack<Integer> vstack
protected void get_from_real()
public boolean empty()
public int top() throws Exception
Exception
public void push(int state_num)
Copyright © 2003–2016 Community Z Tools Project. All rights reserved.