The stack within the Pep machine (Parsing Engine for Patterns) is a stack of strings which can be pushed and popped The pep stack is designed to work in conjuction with, and be synchronized to the pep tape (which is an array of strings with a pointer to the current tape-cell)
When a parse token is “popped” off the the stack, then the tape-pointer (or current tape-cell ) is decremented so that the tape-pointer is pointing to the tape-cell which corresponds to the grammar token which is at the start of the workspace buffer. This means that as soon as you pop a grammar token off the stack, you can start working with the token's associated “attribute” .
pop;
"quotedword*" {
clear;
add "“"; get; add "”"; put; clear;
}
push;
The stack is what allows the Pep engine to cope with nesting patterns and other constructs of context-free languages.