Traveller, there is no path. You make the path as you walk. Traveller, there is no path. Your tracks are the path, and when you look behind, you will see the road that never again you will traverse. Traveller, there is no path, just the wake that is left in the sea. Antonio Machado
go to the tape cell marked with the given name.
The go command jumps to the tape cell which has been marked with the give name. The go command has 2 forms:
go "top";
go;
begin { mark "topcell"; ++; }
while [:space:]; clear;
whilenot [:space:]; put;
# create a list of urls in the 1st tapecell
B"http:",B"https:",B"www." {
add " "; print;
mark "here"; go "topcell"; get; put;
go "here"; clear;
}
!B"http".!B"www.".!"" { add " "; print; clear; }
(eof) { go "topcell"; add "\n[url-list]:\n"; get; print; quit; }
See the script pars/eg/markdown.toc.pss for an example of using
the “mark” and “go” commands to create a table of contents for
a document from markdown-style underline headings.
When using mark and go to allocate a particular tape-cell
as a “buffer” (variable) to store a value, there may be issues when
using the ++ and the -- commands.
It may be necessary to realign the current tape-cell with go 'top';
after a -- command. On the other hand, there should be no issue when
using the pop and push commands, because when the
workspace buffer is empty, then the push command should do
nothing (that is: the tape pointer is not incremented) and the same
should be true of the pop command when the stack is empty
(the tape pointer should not be decremented)
I have not done much language parsing/compiling with mark and go so this topic requires further experimentation.
The non-parameter version of go (that is, “go;") has been implemented in” the pep interpreter but has not been tested or used much. It has been implemented in some of the translation scripts. The non-parameter version is important because it converts the tape into a kind of associative array . I believe this is important in using nom for type checking . Type checking is not strictly pertinent to context-free languages because it involves remembering the type a variable. But with the addition of an associative array to the Pep machine, type-checking becomes possible.
Never-the-less, when nom is performing a type-checking task, it will not be possible for it to also compile or translate the source code or language. This means that a compiling system with nom would have to use 2 passes .
The script /tr/syntagma.pss (which is the implementation of the
syntagma parsing language) contains code using mark and go, which
demonstrates how to implement some kind of type-checking in nom*
nov 2026: I am modifying the behaviour of the implicit mark and
go commands to use the text in the workspace to mark or jump to.
Previously I used the text in the tape cell.