about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-05-23 12:45:39 -0700
committerKartik K. Agaram <vc@akkartik.com>2015-05-23 12:45:39 -0700
commit7002b26a64b0ec5ce5a6002eb94da8dd8303e8b1 (patch)
tree5748a1121e8822adb01c5003ce1c7db5531f3998
parent60f68dcf1ee09b7fb578516437a1e4c726d30b1f (diff)
downloadmu-7002b26a64b0ec5ce5a6002eb94da8dd8303e8b1.tar.gz
1436
-rw-r--r--041name.cc3
-rw-r--r--072scenario_screen.cc4
-rw-r--r--075scenario_keyboard.cc4
3 files changed, 8 insertions, 3 deletions
diff --git a/041name.cc b/041name.cc
index 300a9c60..24ba4e00 100644
--- a/041name.cc
+++ b/041name.cc
@@ -125,9 +125,6 @@ bool is_raw(const reagent& r) {
 bool is_special_name(const string& s) {
   if (s == "_") return true;
   if (s == "0") return true;
-  // tests will use these in later layers even though tests will mostly use numeric addresses
-  if (s == "screen") return true;
-  if (s == "keyboard") return true;
   // End is_special_name Cases
   return false;
 }
diff --git a/072scenario_screen.cc b/072scenario_screen.cc
index e7c6fb49..e0f9a147 100644
--- a/072scenario_screen.cc
+++ b/072scenario_screen.cc
@@ -53,6 +53,10 @@ scenario screen-in-scenario-error [
 ]
 +warn: expected screen location (0, 0) to contain 98 ('b') instead of 97 ('a')
 
+//: allow naming just for 'screen'
+:(before "End is_special_name Cases")
+if (s == "screen") return true;
+
 :(before "End Globals")
 // Scenarios may not define default-space, so they should fit within the
 // initial area of memory reserved for tests. We'll put the predefined
diff --git a/075scenario_keyboard.cc b/075scenario_keyboard.cc
index 31c10e82..363b3afd 100644
--- a/075scenario_keyboard.cc
+++ b/075scenario_keyboard.cc
@@ -30,6 +30,10 @@ const long long int KEYBOARD = Next_predefined_global_for_scenarios++;
 :(before "End Predefined Scenario Locals In Run")
 Name[tmp_recipe.at(0)]["keyboard"] = KEYBOARD;
 
+//: allow naming just for 'keyword'
+:(before "End is_special_name Cases")
+if (s == "keyboard") return true;
+
 :(before "End Rewrite Instruction(curr)")
 // rewrite `assume-keyboard string` to
 //   ```