about summary refs log tree commit diff stats
path: root/010vm.cc
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2016-10-22 11:05:18 -0700
committerKartik K. Agaram <vc@akkartik.com>2016-10-22 11:28:46 -0700
commitd3c120c1e298c74235843e5b5c702decec17f0c2 (patch)
tree16f86b111a4b4bc5e1a5073e25e73676e66b0073 /010vm.cc
parent48f6d48ac99e321278fbab857566fe4ea4d53c4b (diff)
downloadmu-d3c120c1e298c74235843e5b5c702decec17f0c2.tar.gz
3549
More consistent definitions for jump targets and waypoints.

1. A label is a word starting with something other than a letter or
digit or '$'.

2. A waypoint is a label that starts with '<' and ends with '>'. It has
no restrictions. A recipe can define any number of waypoints, and
recipes can have duplicate waypoints.

3. The special labels '{' and '}' can also be duplicated any number of
times in a recipe. The only constraint on them is that they have to
balance in any recipe. Every '{' must be followed by a matching '}'.

4. All other labels are 'jump targets'. You can't have duplicate jump
targets in a recipe; that would make jumps ambiguous.
Diffstat (limited to '010vm.cc')
-rw-r--r--010vm.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/010vm.cc b/010vm.cc
index d57f7fb2..feb67a30 100644
--- a/010vm.cc
+++ b/010vm.cc
@@ -28,7 +28,7 @@ struct recipe {
 //   product1, product2, product3, ... <- operation ingredient1, ingredient2, ingredient3, ...
 // or just a single 'label' starting with a non-alphanumeric character
 //   +label
-// Labels don't do anything, they're just waypoints.
+// Labels don't do anything, they're just named locations in a recipe.
 struct instruction {
   bool is_label;
   string label;  // only if is_label