Public Methods | |
virtual_parse_stack (Stack shadowing_stack) throws java.lang.Exception | |
boolean | empty () |
void | pop () throws java.lang.Exception |
void | push (int state_num) |
int | top () throws java.lang.Exception |
Protected Methods | |
void | get_from_real () |
Protected Attributes | |
Stack | real_stack |
int | real_next |
Stack | vstack |
Definition at line 54 of file virtual_parse_stack.java.
|
Constructor to build a virtual stack out of a real stack. Definition at line 90 of file virtual_parse_stack.java. |
|
Indicate whether the stack is empty. Definition at line 108 of file virtual_parse_stack.java. |
|
Transfer an element from the real to the virtual stack. This assumes that the virtual stack is currently empty. Definition at line 121 of file virtual_parse_stack.java. Referenced by pop(), and virtual_parse_stack().
|
|
Pop the stack. Definition at line 140 of file virtual_parse_stack.java. Referenced by lr_parser::try_parse_ahead().
|
|
Push a state number onto the stack. Definition at line 156 of file virtual_parse_stack.java. Referenced by lr_parser::try_parse_ahead().
|
|
Return value on the top of the stack (without popping it). Definition at line 163 of file virtual_parse_stack.java. Referenced by lr_parser::try_parse_ahead().
|
|
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. Definition at line 71 of file virtual_parse_stack.java. |
|
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. Definition at line 63 of file virtual_parse_stack.java. |
|
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. Definition at line 81 of file virtual_parse_stack.java. |