Lesson 2: Basic Syntax
Toka's syntax is very simple. Like Forth, it can be hard to read at first since it's not based on the syntax of algebraic equations. Here's a line of syntactically-valid Toka code:
this is a test 123 456
Don't bother trying to guess what it does. In fact it won't necessarily actually work, because some of the symbols might not be defined. But it is syntactically valid. It consists of 6 words, this is a test 123 456. Words are separated by white space - spaces and newlines. In most cases, spaces and newlines are the same. Tabs are ignored in most cases.
Another syntactically valid line:
asdf foo jello @W#$%^,T/%$ 1a2qw2 gibbet
That's 6 words. One of them is pretty strange, consisting mostly of punctuation, but it is a valid word nevertheless. Almost string of printing characters is a word. (Toka limits word names to 255 characters).
Left to right execution
The Toka interpreter is very simple. It parses the next word (i.e. it skips whitespace, then collects characters until it sees another whitespace character) and executes it.
That is it in a nutshell. So if you are trying to understand a Toka program, you have to look at each word in turn and figure out what it does. That sounds simple, but it will trip you up if you insist on looking for algebra. Just go left to right, one word at a time.
With practice, you will learn enough of the Toka vocabulary (the meanings of standard words) so that you can see what is going on at a glance, without having to puzzle out each individual word. It is just like learning to read - it is tedious until you get the basic vocabulary down, then it is easy.