I’ve started a new topic for this, even though it’s the continuation of the parser work in the linked thread…
I’ve managed to get multiple commands running on the teletype, this is done by separating additional commands with a semi-colon, e.g.
X 1 ; Y 2 ; Z 3 L 0 3 : PN I 0 1 ; PN I 1 2
In the loop example, the code after the
: would be run 4 times.
Do the examples make sense? I’ve got to dash soon, but I can write up a more detailed explanation / tutorial if needed. My feeling is that this (along with the mathematical operators) would be considered an ‘advanced’ topic.
As with all things in computer science:
There are two hard things in computer science: cache invalidation, naming things, and off-by-one errors.
While the first hasn’t been a bother I have struggled a bit with the last two. To that end I’ve tweaked the nomenclature a little and introduced the concept of a sub command:
(the old concept of a sub command has been renamed to post command)
As it stands the code hasn’t been pushed anywhere yet (or even run on hardware). The changes are actually quite small, but I need to walk away from it for a bit, and then come back and double check it and add comments, tests, etc.
Once all the I2C gremlins have been fixed I’d like to get a PR opened for this (and implicitly the parser work). It’s probably going to be the last big change I make for a while. Things are looking a bit busy for the next few months.