about summary refs log tree commit diff stats
path: root/cpp
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-04-24 10:20:47 -0700
committerKartik K. Agaram <vc@akkartik.com>2015-04-24 10:20:47 -0700
commita1d703b3c86c6842899acf0d5c6c0fe3536fa36f (patch)
treefce4a514a1f853efada92264fc2ed7e48e1a4100 /cpp
parent88be3dbc0c996490dbac97538f4d712a5b4f6f07 (diff)
downloadmu-a1d703b3c86c6842899acf0d5c6c0fe3536fa36f.tar.gz
1163
Diffstat (limited to 'cpp')
-rw-r--r--cpp/.traces/lesser_than (renamed from cpp/.traces/less_than)2
-rw-r--r--cpp/.traces/lesser_than2 (renamed from cpp/.traces/less_than2)2
-rw-r--r--cpp/024compare14
-rw-r--r--cpp/060string.mu4
4 files changed, 11 insertions, 11 deletions
diff --git a/cpp/.traces/less_than b/cpp/.traces/lesser_than
index 0d6b4b80..9628c081 100644
--- a/cpp/.traces/less_than
+++ b/cpp/.traces/lesser_than
@@ -11,7 +11,7 @@ parse/0:   product: {name: "3", value: 0, type: 1, properties: ["3": "integer"]}
 after-brace/0: recipe main
 after-brace/0: copy ...
 after-brace/0: copy ...
-after-brace/0: less-than ...
+after-brace/0: lesser-than ...
 run/0: instruction main/0
 run/0: ingredient 0 is 32
 mem/0: storing 32 in location 1
diff --git a/cpp/.traces/less_than2 b/cpp/.traces/lesser_than2
index d747f82f..dc373a53 100644
--- a/cpp/.traces/less_than2
+++ b/cpp/.traces/lesser_than2
@@ -11,7 +11,7 @@ parse/0:   product: {name: "3", value: 0, type: 1, properties: ["3": "integer"]}
 after-brace/0: recipe main
 after-brace/0: copy ...
 after-brace/0: copy ...
-after-brace/0: less-than ...
+after-brace/0: lesser-than ...
 run/0: instruction main/0
 run/0: ingredient 0 is 34
 mem/0: storing 34 in location 1
diff --git a/cpp/024compare b/cpp/024compare
index c1e961f9..c536b23e 100644
--- a/cpp/024compare
+++ b/cpp/024compare
@@ -93,11 +93,11 @@ recipe main [
 +mem: storing 0 in location 3
 
 :(before "End Primitive Recipe Declarations")
-LESS_THAN,
+LESSER_THAN,
 :(before "End Primitive Recipe Numbers")
-Recipe_number["less-than"] = LESS_THAN;
+Recipe_number["lesser-than"] = LESSER_THAN;
 :(before "End Primitive Recipe Implementations")
-case LESS_THAN: {
+case LESSER_THAN: {
   trace("run") << "ingredient 0 is " << instructions[pc].ingredients[0].name;
   vector<int> arg0 = read_memory(instructions[pc].ingredients[0]);
   assert(arg0.size() == 1);
@@ -111,11 +111,11 @@ case LESS_THAN: {
   break;
 }
 
-:(scenario less_than)
+:(scenario lesser_than)
 recipe main [
   1:integer <- copy 32:literal
   2:integer <- copy 33:literal
-  3:integer <- less-than 1:integer, 2:integer
+  3:integer <- lesser-than 1:integer, 2:integer
 ]
 +run: instruction main/2
 +run: ingredient 0 is 1
@@ -125,11 +125,11 @@ recipe main [
 +run: product 0 is 1
 +mem: storing 1 in location 3
 
-:(scenario less_than2)
+:(scenario lesser_than2)
 recipe main [
   1:integer <- copy 34:literal
   2:integer <- copy 33:literal
-  3:integer <- less-than 1:integer, 2:integer
+  3:integer <- lesser-than 1:integer, 2:integer
 ]
 +run: instruction main/2
 +run: ingredient 0 is 1
diff --git a/cpp/060string.mu b/cpp/060string.mu
index 5c17f91f..6f0929f1 100644
--- a/cpp/060string.mu
+++ b/cpp/060string.mu
@@ -244,7 +244,7 @@ recipe integer-to-decimal-string [
   # save sign
   negate-result:boolean <- copy 0:literal
   {
-    negative?:boolean <- less-than n:integer, 0:literal
+    negative?:boolean <- lesser-than n:integer, 0:literal
     break-unless negative?:boolean
     negate-result:boolean <- copy 1:literal
     n:integer <- multiply n:integer -1:literal
@@ -273,7 +273,7 @@ recipe integer-to-decimal-string [
   j:integer <- copy 0:literal
   {
     # while i >= 0
-    done?:boolean <- less-than i:integer, 0:literal
+    done?:boolean <- lesser-than i:integer, 0:literal
     break-if done?:boolean
     # result[j] = tmp[i]
     src:character <- index buf:address:array:character/deref, i:integer