The machine-like behavior of people chained to electronics constitutes a degradation of their well-being and of their dignity. Ivan Illich
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” .
# ... snippet
parse>
pop;
"quotedword*" {
clear; add "“"; get; add "”"; put;
clear; add "text*"; push; .reparse
}
push;
The stack is what allows the Pep engine to cope with nesting patterns and other constructs of context-free and context-sensitive languages and text patterns. Perhaps the simplest example of a nesting text pattern are “palindromes” which are parsed in the example script /eg/palindrome.pss Another more complex example of nesting text structures is found in XML text which is parsed in the example script /eg/xml.parse.pss .