|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava_cup.runtime.virtual_parse_stack
public class virtual_parse_stack
This class implements a temporary or "virtual" parse stack that replaces the top portion of the actual parse stack (the part that has been changed by some set of operations) while maintaining its original contents. This data structure is used when the parse needs to "parse ahead" to determine if a given error recovery attempt will allow the parse to continue far enough to consider it successful. Once success or failure of parse ahead is determined the system then reverts to the original parse stack (which has not actually been modified). Since parse ahead does not execute actions, only parse state is maintained on the virtual stack, not full Symbol objects.
lr_parser
Constructor Summary | |
---|---|
virtual_parse_stack(java.util.Stack shadowing_stack)
Constructor to build a virtual stack out of a real stack. |
Method Summary | |
---|---|
boolean |
empty()
Indicate whether the stack is empty. |
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). |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public virtual_parse_stack(java.util.Stack shadowing_stack) throws java.lang.Exception
java.lang.Exception
Method Detail |
---|
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)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |