about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--html/001help.cc.html2
-rw-r--r--html/014literal_string.cc.html30
-rw-r--r--html/075channel.mu.html2
-rw-r--r--html/082scenario_screen.cc.html9
-rw-r--r--html/085scenario_console.cc.html4
-rw-r--r--html/088file.mu.html58
-rw-r--r--html/089scenario_filesystem.cc.html276
-rw-r--r--html/090scenario_filesystem_test.mu.html57
-rw-r--r--html/100trace_browser.cc.html (renamed from html/090trace_browser.cc.html)2
-rw-r--r--html/101run_sandboxed.cc.html (renamed from html/091run_sandboxed.cc.html)2
-rw-r--r--html/102persist.cc.html (renamed from html/092persist.cc.html)2
-rw-r--r--html/edit/011-errors.mu.html7
-rw-r--r--index.html2
13 files changed, 427 insertions, 26 deletions
diff --git a/html/001help.cc.html b/html/001help.cc.html
index cf4c82ec..2c8bcce4 100644
--- a/html/001help.cc.html
+++ b/html/001help.cc.html
@@ -273,7 +273,7 @@ feenableexcept<span class="Delimiter">(</span>FE_OVERFLOW | FE_UNDERFLOW<span cl
 <span class="Normal">using</span> std::cerr<span class="Delimiter">;</span>
 <span class="PreProc">#include </span><span class="Constant">&lt;iomanip&gt;</span>
 
-<span class="PreProc">#include </span><span class="Constant">&lt;cstring&gt;</span>
+<span class="PreProc">#include </span><span class="Constant">&lt;string.h&gt;</span>
 <span class="PreProc">#include </span><span class="Constant">&lt;string&gt;</span>
 <span class="Normal">using</span> std::string<span class="Delimiter">;</span>
 
diff --git a/html/014literal_string.cc.html b/html/014literal_string.cc.html
index c917373b..6aa8050a 100644
--- a/html/014literal_string.cc.html
+++ b/html/014literal_string.cc.html
@@ -98,7 +98,7 @@ string slurp_quoted<span class="Delimiter">(</span>istream&amp; in<span class="D
   <span class="Normal">while</span> <span class="Delimiter">(</span>has_data<span class="Delimiter">(</span>in<span class="Delimiter">))</span> <span class="Delimiter">{</span>
     <span class="Normal">char</span> c = in<span class="Delimiter">.</span>get<span class="Delimiter">();</span>
     <span class="Normal">if</span> <span class="Delimiter">(</span>c == <span class="cSpecial">'\\'</span><span class="Delimiter">)</span> <span class="Delimiter">{</span>
-      out &lt;&lt; <span class="Normal">static_cast</span>&lt;<span class="Normal">char</span>&gt;<span class="Delimiter">(</span>in<span class="Delimiter">.</span>get<span class="Delimiter">());</span>
+      slurp_one_past_backslashes<span class="Delimiter">(</span>in<span class="Delimiter">,</span> out<span class="Delimiter">);</span>
       <span class="Identifier">continue</span><span class="Delimiter">;</span>
     <span class="Delimiter">}</span>
     out &lt;&lt; c<span class="Delimiter">;</span>
@@ -117,7 +117,7 @@ string slurp_quoted<span class="Delimiter">(</span>istream&amp; in<span class="D
   <span class="Normal">char</span> c<span class="Delimiter">;</span>
   <span class="Normal">while</span> <span class="Delimiter">(</span>in &gt;&gt; c<span class="Delimiter">)</span> <span class="Delimiter">{</span>
     <span class="Normal">if</span> <span class="Delimiter">(</span>c == <span class="cSpecial">'\\'</span><span class="Delimiter">)</span> <span class="Delimiter">{</span>
-      out &lt;&lt; <span class="Normal">static_cast</span>&lt;<span class="Normal">char</span>&gt;<span class="Delimiter">(</span>in<span class="Delimiter">.</span>get<span class="Delimiter">());</span>
+      slurp_one_past_backslashes<span class="Delimiter">(</span>in<span class="Delimiter">,</span> out<span class="Delimiter">);</span>
       <span class="Identifier">continue</span><span class="Delimiter">;</span>
     <span class="Delimiter">}</span>
     <span class="Normal">if</span> <span class="Delimiter">(</span>c == <span class="Constant">'#'</span><span class="Delimiter">)</span> <span class="Delimiter">{</span>
@@ -179,6 +179,28 @@ string emit_literal_string<span class="Delimiter">(</span>string name<span class
   <span class="Normal">if</span> <span class="Delimiter">(</span>!s<span class="Delimiter">.</span>empty<span class="Delimiter">())</span> s<span class="Delimiter">.</span>erase<span class="Delimiter">(</span>SIZE<span class="Delimiter">(</span>s<span class="Delimiter">)</span>-<span class="Constant">1</span><span class="Delimiter">);</span>
 <span class="Delimiter">}</span>
 
+<span class="Normal">void</span> slurp_one_past_backslashes<span class="Delimiter">(</span>istream&amp; in<span class="Delimiter">,</span> ostream&amp; out<span class="Delimiter">)</span> <span class="Delimiter">{</span>
+  <span class="Comment">// When you encounter a backslash, strip it out and pass through any</span>
+  <span class="Comment">// following run of backslashes. If we 'escaped' a single following</span>
+  <span class="Comment">// character, then the character '\' would be:</span>
+  <span class="Comment">//   '\\' escaped once</span>
+  <span class="Comment">//   '\\\\' escaped twice</span>
+  <span class="Comment">//   '\\\\\\\\' escaped thrice (8 backslashes)</span>
+  <span class="Comment">// ..and so on. With our approach it'll be:</span>
+  <span class="Comment">//   '\\' escaped once</span>
+  <span class="Comment">//   '\\\' escaped twice</span>
+  <span class="Comment">//   '\\\\' escaped thrice</span>
+  <span class="Comment">// This only works as long as backslashes aren't also overloaded to create</span>
+  <span class="Comment">// special characters. So Mu doesn't follow C's approach of overloading</span>
+  <span class="Comment">// backslashes both to escape quote characters and also as a notation for</span>
+  <span class="Comment">// unprintable characters like '\n'.</span>
+  <span class="Normal">while</span> <span class="Delimiter">(</span>has_data<span class="Delimiter">(</span>in<span class="Delimiter">))</span> <span class="Delimiter">{</span>
+    <span class="Normal">char</span> c = in<span class="Delimiter">.</span>get<span class="Delimiter">();</span>
+    out &lt;&lt; c<span class="Delimiter">;</span>
+    <span class="Normal">if</span> <span class="Delimiter">(</span>c != <span class="cSpecial">'\\'</span><span class="Delimiter">)</span> <span class="Identifier">break</span><span class="Delimiter">;</span>
+  <span class="Delimiter">}</span>
+<span class="Delimiter">}</span>
+
 <span class="Delimiter">:(scenario string_literal_nested)</span>
 def main [
   <span class="Constant">1</span>:address:array:character<span class="Special"> &lt;- </span>copy [abc [def]]
@@ -191,10 +213,10 @@ def main [
 ]
 <span class="traceContains">+parse:   ingredient: {&quot;abc [def&quot;: &quot;literal-string&quot;}</span>
 
-<span class="Delimiter">:(scenario string_literal_escaped_comment_aware)</span>
+<span class="Delimiter">:(scenario string_literal_escaped_twice)</span>
 def main [
   <span class="Constant">1</span>:address:array:character<span class="Special"> &lt;- </span>copy [
-abc \\\[def]
+abc \\[def]
 ]
 <span class="traceContains">+parse:   ingredient: {&quot;\nabc \[def&quot;: &quot;literal-string&quot;}</span>
 
diff --git a/html/075channel.mu.html b/html/075channel.mu.html
index 49bb5fb3..54fda434 100644
--- a/html/075channel.mu.html
+++ b/html/075channel.mu.html
@@ -102,6 +102,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color
 <span class="muRecipe">def</span> write out:address:sink:_elem, val:_elem<span class="muRecipe"> -&gt; </span>out:address:sink:_elem [
   <span class="Constant">local-scope</span>
   <span class="Constant">load-ingredients</span>
+  assert out, <span class="Constant">[write to null channel]</span>
   chan:address:channel:_elem<span class="Special"> &lt;- </span>get *out, <span class="Constant">chan:offset</span>
 <span class="Constant">  &lt;channel-write-initial&gt;</span>
   <span class="Delimiter">{</span>
@@ -132,6 +133,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color
 <span class="muRecipe">def</span> read in:address:source:_elem<span class="muRecipe"> -&gt; </span>result:_elem, eof?:boolean, in:address:source:_elem [
   <span class="Constant">local-scope</span>
   <span class="Constant">load-ingredients</span>
+  assert in, <span class="Constant">[read on null channel]</span>
   eof?<span class="Special"> &lt;- </span>copy <span class="Constant">0/false</span>  <span class="Comment"># default result</span>
   chan:address:channel:_elem<span class="Special"> &lt;- </span>get *in, <span class="Constant">chan:offset</span>
   <span class="Delimiter">{</span>
diff --git a/html/082scenario_screen.cc.html b/html/082scenario_screen.cc.html
index df06104d..d66b7407 100644
--- a/html/082scenario_screen.cc.html
+++ b/html/082scenario_screen.cc.html
@@ -151,10 +151,6 @@ scenario screen-in-scenario-color [
 ]
 <span class="traceContains">+error: expected screen location (0, 0) to be in color 2 instead of 1</span>
 
-<span class="Comment">//: allow naming just for 'screen'</span>
-<span class="Delimiter">:(before &quot;End is_special_name Cases&quot;)</span>
-<span class="Normal">if</span> <span class="Delimiter">(</span>s == <span class="Constant">&quot;screen&quot;</span><span class="Delimiter">)</span> <span class="Identifier">return</span> <span class="Constant">true</span><span class="Delimiter">;</span>
-
 <span class="Delimiter">:(scenarios run)</span>
 <span class="Delimiter">:(scenario convert_names_does_not_fail_when_mixing_special_names_and_numeric_locations)</span>
 <span class="Special">% Scenario_testing_scenario = true;</span>
@@ -183,8 +179,13 @@ assert<span class="Delimiter">(</span>Name[tmp_recipe<span class="Delimiter">.</
 <span class="Comment">// Scenario Globals.</span>
 <span class="Normal">const</span> <span class="Normal">int</span> SCREEN = Next_predefined_global_for_scenarios++<span class="Delimiter">;</span>
 <span class="Comment">// End Scenario Globals.</span>
+
+<span class="Comment">//: give 'screen' a fixed location in scenarios</span>
 <span class="Delimiter">:(before &quot;End Special Scenario Variable Names(r)&quot;)</span>
 Name[r][<span class="Constant">&quot;screen&quot;</span>] = SCREEN<span class="Delimiter">;</span>
+<span class="Comment">//: make 'screen' always a raw location in scenarios</span>
+<span class="Delimiter">:(before &quot;End is_special_name Cases&quot;)</span>
+<span class="Normal">if</span> <span class="Delimiter">(</span>s == <span class="Constant">&quot;screen&quot;</span><span class="Delimiter">)</span> <span class="Identifier">return</span> <span class="Constant">true</span><span class="Delimiter">;</span>
 
 <span class="Delimiter">:(before &quot;End Rewrite Instruction(curr, recipe result)&quot;)</span>
 <span class="Comment">// rewrite `assume-screen width, height` to</span>
diff --git a/html/085scenario_console.cc.html b/html/085scenario_console.cc.html
index bfa387e2..f2e79b3c 100644
--- a/html/085scenario_console.cc.html
+++ b/html/085scenario_console.cc.html
@@ -68,10 +68,10 @@ scenario keyboard-in-scenario [
 
 <span class="Delimiter">:(before &quot;End Scenario Globals&quot;)</span>
 <span class="Normal">const</span> <span class="Normal">int</span> CONSOLE = Next_predefined_global_for_scenarios++<span class="Delimiter">;</span>
+<span class="Comment">//: give 'console' a fixed location in scenarios</span>
 <span class="Delimiter">:(before &quot;End Special Scenario Variable Names(r)&quot;)</span>
 Name[r][<span class="Constant">&quot;console&quot;</span>] = CONSOLE<span class="Delimiter">;</span>
-
-<span class="Comment">//: allow naming just for 'console'</span>
+<span class="Comment">//: make 'console' always a raw location in scenarios</span>
 <span class="Delimiter">:(before &quot;End is_special_name Cases&quot;)</span>
 <span class="Normal">if</span> <span class="Delimiter">(</span>s == <span class="Constant">&quot;console&quot;</span><span class="Delimiter">)</span> <span class="Identifier">return</span> <span class="Constant">true</span><span class="Delimiter">;</span>
 
diff --git a/html/088file.mu.html b/html/088file.mu.html
index e2dec15c..6a194227 100644
--- a/html/088file.mu.html
+++ b/html/088file.mu.html
@@ -15,10 +15,10 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color
 * { font-size: 12pt; font-size: 1em; }
 .muRecipe { color: #ff8700; }
 .muData { color: #ffff00; }
-.Comment { color: #9090ff; }
 .Delimiter { color: #800080; }
-.Special { color: #c00000; }
+.Comment { color: #9090ff; }
 .Constant { color: #00a0a0; }
+.Special { color: #c00000; }
 .muControl { color: #c0a020; }
 -->
 </style>
@@ -35,18 +35,46 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color
 <span class="Comment"># are thus easier to test.</span>
 
 <span class="muData">container</span> filesystem [
-  <span class="Delimiter">{</span>data: (address table (address array character) (address array character))<span class="Delimiter">}</span>
+  data:address:array:file-mapping
+]
+
+<span class="muData">container</span> file-mapping [
+  name:address:array:character
+  contents:address:array:character
 ]
 
 <span class="muRecipe">def</span> start-reading fs:address:filesystem, filename:address:array:character<span class="muRecipe"> -&gt; </span>contents:address:source:character [
   <span class="Constant">local-scope</span>
   <span class="Constant">load-ingredients</span>
-  file:number<span class="Special"> &lt;- </span>$open-file-for-reading filename
-  contents:address:source:character, sink:address:sink:character<span class="Special"> &lt;- </span>new-channel <span class="Constant">30</span>
-  start-running transmit-from-file file, sink
+  <span class="Delimiter">{</span>
+    <span class="muControl">break-if</span> fs
+    <span class="Comment"># real file-system</span>
+    file:number<span class="Special"> &lt;- </span>$open-file-for-reading filename
+    assert file, <span class="Constant">[file not found]</span>
+    contents:address:source:character, sink:address:sink:character<span class="Special"> &lt;- </span>new-channel <span class="Constant">30</span>
+    start-running transmit-from-file file, sink
+    <span class="muControl">return</span>
+  <span class="Delimiter">}</span>
+  <span class="Comment"># fake file system</span>
+  i:number<span class="Special"> &lt;- </span>copy <span class="Constant">0</span>
+  data:address:array:file-mapping<span class="Special"> &lt;- </span>get *fs, <span class="Constant">data:offset</span>
+  len:number<span class="Special"> &lt;- </span>length *data
+  <span class="Delimiter">{</span>
+    done?:boolean<span class="Special"> &lt;- </span>greater-or-equal i, len
+    <span class="muControl">break-if</span> done?
+    tmp:file-mapping<span class="Special"> &lt;- </span>index *data, i
+    curr-filename:address:array:character<span class="Special"> &lt;- </span>get tmp, <span class="Constant">name:offset</span>
+    found?:boolean<span class="Special"> &lt;- </span>equal filename, curr-filename
+    <span class="muControl">loop-unless</span> found?
+    contents:address:source:character, sink:address:sink:character<span class="Special"> &lt;- </span>new-channel <span class="Constant">30</span>
+    curr-contents:address:array:character<span class="Special"> &lt;- </span>get tmp, <span class="Constant">contents:offset</span>
+    start-running transmit-from-text curr-contents, sink
+    <span class="muControl">return</span>
+  <span class="Delimiter">}</span>
+  <span class="muControl">return</span> <span class="Constant">0/not-found</span>
 ]
 
-<span class="muRecipe">def</span> transmit-from-file file:number, sink:address:sink:character<span class="muRecipe"> -&gt; </span>file:number, sink:address:sink:character [
+<span class="muRecipe">def</span> transmit-from-file file:number, sink:address:sink:character<span class="muRecipe"> -&gt; </span>sink:address:sink:character [
   <span class="Constant">local-scope</span>
   <span class="Constant">load-ingredients</span>
   <span class="Delimiter">{</span>
@@ -59,6 +87,22 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color
   $close-file file
 ]
 
+<span class="muRecipe">def</span> transmit-from-text contents:address:array:character, sink:address:sink:character<span class="muRecipe"> -&gt; </span>sink:address:sink:character [
+  <span class="Constant">local-scope</span>
+  <span class="Constant">load-ingredients</span>
+  i:number<span class="Special"> &lt;- </span>copy <span class="Constant">0</span>
+  len:number<span class="Special"> &lt;- </span>length *contents
+  <span class="Delimiter">{</span>
+    done?:boolean<span class="Special"> &lt;- </span>greater-or-equal i, len
+    <span class="muControl">break-if</span> done?
+    c:character<span class="Special"> &lt;- </span>index *contents, i
+    sink<span class="Special"> &lt;- </span>write sink, c
+    i<span class="Special"> &lt;- </span>add i, <span class="Constant">1</span>
+    <span class="muControl">loop</span>
+  <span class="Delimiter">}</span>
+  sink<span class="Special"> &lt;- </span>close sink
+]
+
 <span class="muRecipe">def</span> start-writing fs:address:filesystem, filename:address:array:character<span class="muRecipe"> -&gt; </span>sink:address:sink:character, routine-id:number [
   <span class="Constant">local-scope</span>
   <span class="Constant">load-ingredients</span>
diff --git a/html/089scenario_filesystem.cc.html b/html/089scenario_filesystem.cc.html
new file mode 100644
index 00000000..6dc1faa3
--- /dev/null
+++ b/html/089scenario_filesystem.cc.html
@@ -0,0 +1,276 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<meta http-equiv="content-type" content="text/html; charset=UTF-8">
+<title>Mu - 089scenario_filesystem.cc</title>
+<meta name="Generator" content="Vim/7.4">
+<meta name="plugin-version" content="vim7.4_v2">
+<meta name="syntax" content="cpp">
+<meta name="settings" content="use_css,pre_wrap,no_foldcolumn,expand_tabs,prevent_copy=">
+<meta name="colorscheme" content="minimal">
+<style type="text/css">
+<!--
+pre { white-space: pre-wrap; font-family: monospace; color: #eeeeee; background-color: #080808; }
+body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color: #080808; }
+* { font-size: 12pt; font-size: 1em; }
+.Constant { color: #00a0a0; }
+.cSpecial { color: #008000; }
+.Comment { color: #9090ff; }
+.Delimiter { color: #800080; }
+.Special { color: #c00000; }
+.Identifier { color: #fcb165; }
+.Normal { color: #eeeeee; background-color: #080808; padding-bottom: 1px; }
+-->
+</style>
+
+<script type='text/javascript'>
+<!--
+
+-->
+</script>
+</head>
+<body>
+<pre id='vimCodeElement'>
+<span class="Comment">//: Clean syntax to manipulate and check the file system in scenarios.</span>
+<span class="Comment">//: Instructions 'assume-filesystem' and 'filesystem-should-contain' implicitly create</span>
+<span class="Comment">//: a variable called 'filesystem' that is accessible to later instructions in</span>
+<span class="Comment">//: the scenario. 'filesystem-should-contain' can check unicode characters in</span>
+<span class="Comment">//: the fake filesystem</span>
+
+<span class="Delimiter">:(scenarios run_mu_scenario)</span>
+<span class="Delimiter">:(scenario simple_filesystem)</span>
+scenario assume-filesystem [
+  local-scope
+  assume-filesystem [
+    <span class="Comment"># file 'a' containing two lines of data</span>
+    [a]<span class="Special"> &lt;- </span>[
+      |a bc|
+      |de f|
+    ]
+    <span class="Comment"># directory 'b' containing two files, 'c' and 'd'</span>
+    [b/c]<span class="Special"> &lt;- </span>[]
+    [b/d]<span class="Special"> &lt;- </span>[
+      |xyz|
+    ]
+  ]
+  <span class="Normal">data</span>:address:array:file-mapping<span class="Special"> &lt;- </span>get *filesystem:address:filesystem<span class="Delimiter">,</span> data:offset
+  <span class="Normal">file1</span>:file-mapping<span class="Special"> &lt;- </span>index *data<span class="Delimiter">,</span> <span class="Constant">0</span>
+  file1-name:address:array:character<span class="Special"> &lt;- </span>get file1<span class="Delimiter">,</span> name:offset
+  <span class="Constant">10</span>:array:character/<span class="Special">raw &lt;- </span>copy *file1-name
+  file1-contents:address:array:character<span class="Special"> &lt;- </span>get file1<span class="Delimiter">,</span> contents:offset
+  <span class="Constant">100</span>:array:character/<span class="Special">raw &lt;- </span>copy *file1-contents
+  <span class="Normal">file2</span>:file-mapping<span class="Special"> &lt;- </span>index *data<span class="Delimiter">,</span> <span class="Constant">1</span>
+  file2-name:address:array:character<span class="Special"> &lt;- </span>get file2<span class="Delimiter">,</span> name:offset
+  <span class="Constant">30</span>:array:character/<span class="Special">raw &lt;- </span>copy *file2-name
+  file2-contents:address:array:character<span class="Special"> &lt;- </span>get file2<span class="Delimiter">,</span> contents:offset
+  <span class="Constant">40</span>:array:character/<span class="Special">raw &lt;- </span>copy *file2-contents
+  <span class="Normal">file3</span>:file-mapping<span class="Special"> &lt;- </span>index *data<span class="Delimiter">,</span> <span class="Constant">2</span>
+  file3-name:address:array:character<span class="Special"> &lt;- </span>get file3<span class="Delimiter">,</span> name:offset
+  <span class="Constant">50</span>:array:character/<span class="Special">raw &lt;- </span>copy *file3-name
+  file3-contents:address:array:character<span class="Special"> &lt;- </span>get file3<span class="Delimiter">,</span> contents:offset
+  <span class="Constant">60</span>:array:character/<span class="Special">raw &lt;- </span>copy *file3-contents
+  memory-should-contain [
+    <span class="Constant">10</span>:array:character<span class="Special"> &lt;- </span>[a]
+    <span class="Constant">100</span>:array:character<span class="Special"> &lt;- </span>[a bc
+de f
+]
+    <span class="Constant">30</span>:array:character<span class="Special"> &lt;- </span>[b/c]
+    <span class="Constant">40</span>:array:character<span class="Special"> &lt;- </span>[]
+    <span class="Constant">50</span>:array:character<span class="Special"> &lt;- </span>[b/d]
+    <span class="Constant">60</span>:array:character<span class="Special"> &lt;- </span>[xyz
+]
+  ]
+]
+
+<span class="Delimiter">:(scenario escaping_file_contents)</span>
+scenario assume-filesystem [
+  local-scope
+  assume-filesystem [
+    <span class="Comment"># file 'a' containing a '|'</span>
+    <span class="Comment"># need to escape '\' once for each block</span>
+    [a]<span class="Special"> &lt;- </span>[
+      |x\\\\|yz|
+    ]
+  ]
+  <span class="Normal">data</span>:address:array:file-mapping<span class="Special"> &lt;- </span>get *filesystem:address:filesystem<span class="Delimiter">,</span> data:offset
+  <span class="Normal">file1</span>:file-mapping<span class="Special"> &lt;- </span>index *data<span class="Delimiter">,</span> <span class="Constant">0</span>
+  file1-name:address:array:character<span class="Special"> &lt;- </span>get file1<span class="Delimiter">,</span> name:offset
+  <span class="Constant">10</span>:array:character/<span class="Special">raw &lt;- </span>copy *file1-name
+  file1-contents:address:array:character<span class="Special"> &lt;- </span>get file1<span class="Delimiter">,</span> contents:offset
+  <span class="Constant">20</span>:array:character/<span class="Special">raw &lt;- </span>copy *file1-contents
+  memory-should-contain [
+    <span class="Constant">10</span>:array:character<span class="Special"> &lt;- </span>[a]
+    <span class="Constant">20</span>:array:character<span class="Special"> &lt;- </span>[x|yz
+]
+  ]
+]
+
+<span class="Delimiter">:(before &quot;End Globals&quot;)</span>
+<span class="Normal">const</span> <span class="Normal">int</span> FILESYSTEM = Next_predefined_global_for_scenarios++<span class="Delimiter">;</span>
+<span class="Comment">//: give 'filesystem' a fixed location in scenarios</span>
+<span class="Delimiter">:(before &quot;End Special Scenario Variable Names(r)&quot;)</span>
+Name[r][<span class="Constant">&quot;filesystem&quot;</span>] = FILESYSTEM<span class="Delimiter">;</span>
+<span class="Comment">//: make 'filesystem' always a raw location in scenarios</span>
+<span class="Delimiter">:(before &quot;End is_special_name Cases&quot;)</span>
+<span class="Normal">if</span> <span class="Delimiter">(</span>s == <span class="Constant">&quot;filesystem&quot;</span><span class="Delimiter">)</span> <span class="Identifier">return</span> <span class="Constant">true</span><span class="Delimiter">;</span>
+
+<span class="Delimiter">:(before &quot;End initialize_transform_rewrite_literal_string_to_text()&quot;)</span>
+recipes_taking_literal_strings<span class="Delimiter">.</span>insert<span class="Delimiter">(</span><span class="Constant">&quot;assume-filesystem&quot;</span><span class="Delimiter">);</span>
+
+<span class="Comment">//: screen-should-contain is a regular instruction</span>
+<span class="Delimiter">:(before &quot;End Primitive Recipe Declarations&quot;)</span>
+ASSUME_FILESYSTEM<span class="Delimiter">,</span>
+<span class="Delimiter">:(before &quot;End Primitive Recipe Numbers&quot;)</span>
+put<span class="Delimiter">(</span>Recipe_ordinal<span class="Delimiter">,</span> <span class="Constant">&quot;assume-filesystem&quot;</span><span class="Delimiter">,</span> ASSUME_FILESYSTEM<span class="Delimiter">);</span>
+<span class="Delimiter">:(before &quot;End Primitive Recipe Checks&quot;)</span>
+<span class="Normal">case</span> ASSUME_FILESYSTEM: <span class="Delimiter">{</span>
+  <span class="Identifier">break</span><span class="Delimiter">;</span>
+<span class="Delimiter">}</span>
+<span class="Delimiter">:(before &quot;End Primitive Recipe Implementations&quot;)</span>
+<span class="Normal">case</span> ASSUME_FILESYSTEM: <span class="Delimiter">{</span>
+  assert<span class="Delimiter">(</span>scalar<span class="Delimiter">(</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">)));</span>
+  assume_filesystem<span class="Delimiter">(</span>current_instruction<span class="Delimiter">().</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">).</span>name<span class="Delimiter">,</span> current_recipe_name<span class="Delimiter">());</span>
+  <span class="Identifier">break</span><span class="Delimiter">;</span>
+<span class="Delimiter">}</span>
+
+<span class="Delimiter">:(code)</span>
+<span class="Normal">void</span> assume_filesystem<span class="Delimiter">(</span><span class="Normal">const</span> string&amp; data<span class="Delimiter">,</span> <span class="Normal">const</span> string&amp; caller<span class="Delimiter">)</span> <span class="Delimiter">{</span>
+  map&lt;string<span class="Delimiter">,</span> string&gt; contents<span class="Delimiter">;</span>
+  parse_filesystem<span class="Delimiter">(</span>data<span class="Delimiter">,</span> contents<span class="Delimiter">,</span> caller<span class="Delimiter">);</span>
+  construct_filesystem_object<span class="Delimiter">(</span>contents<span class="Delimiter">);</span>
+<span class="Delimiter">}</span>
+
+<span class="Normal">void</span> parse_filesystem<span class="Delimiter">(</span><span class="Normal">const</span> string&amp; data<span class="Delimiter">,</span> map&lt;string<span class="Delimiter">,</span> string&gt;&amp; out<span class="Delimiter">,</span> <span class="Normal">const</span> string&amp; caller<span class="Delimiter">)</span> <span class="Delimiter">{</span>
+  istringstream in<span class="Delimiter">(</span>data<span class="Delimiter">);</span>
+  in &gt;&gt; std::noskipws<span class="Delimiter">;</span>
+  <span class="Normal">while</span> <span class="Delimiter">(</span><span class="Constant">true</span><span class="Delimiter">)</span> <span class="Delimiter">{</span>
+    <span class="Normal">if</span> <span class="Delimiter">(</span>!has_data<span class="Delimiter">(</span>in<span class="Delimiter">))</span> <span class="Identifier">break</span><span class="Delimiter">;</span>
+    skip_whitespace_and_comments<span class="Delimiter">(</span>in<span class="Delimiter">);</span>
+    <span class="Normal">if</span> <span class="Delimiter">(</span>!has_data<span class="Delimiter">(</span>in<span class="Delimiter">))</span> <span class="Identifier">break</span><span class="Delimiter">;</span>
+    string filename = next_filesystem_word<span class="Delimiter">(</span>in<span class="Delimiter">);</span>
+    <span class="Normal">if</span> <span class="Delimiter">(</span>*filename<span class="Delimiter">.</span>begin<span class="Delimiter">()</span> != <span class="Constant">'['</span><span class="Delimiter">)</span> <span class="Delimiter">{</span>
+      raise &lt;&lt; caller &lt;&lt; <span class="Constant">&quot;: assume-filesystem: filename '&quot;</span> &lt;&lt; filename &lt;&lt; <span class="Constant">&quot;' must begin with a '['</span><span class="cSpecial">\n</span><span class="Constant">&quot;</span> &lt;&lt; end<span class="Delimiter">();</span>
+      <span class="Identifier">break</span><span class="Delimiter">;</span>
+    <span class="Delimiter">}</span>
+    <span class="Normal">if</span> <span class="Delimiter">(</span>*filename<span class="Delimiter">.</span>rbegin<span class="Delimiter">()</span> != <span class="Constant">']'</span><span class="Delimiter">)</span> <span class="Delimiter">{</span>
+      raise &lt;&lt; caller &lt;&lt; <span class="Constant">&quot;: assume-filesystem: filename '&quot;</span> &lt;&lt; filename &lt;&lt; <span class="Constant">&quot;' must end with a ']'</span><span class="cSpecial">\n</span><span class="Constant">&quot;</span> &lt;&lt; end<span class="Delimiter">();</span>
+      <span class="Identifier">break</span><span class="Delimiter">;</span>
+    <span class="Delimiter">}</span>
+    filename<span class="Delimiter">.</span>erase<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">,</span> <span class="Constant">1</span><span class="Delimiter">);</span>
+    filename<span class="Delimiter">.</span>erase<span class="Delimiter">(</span>SIZE<span class="Delimiter">(</span>filename<span class="Delimiter">)</span>-<span class="Constant">1</span><span class="Delimiter">);</span>
+    <span class="Normal">if</span> <span class="Delimiter">(</span>!has_data<span class="Delimiter">(</span>in<span class="Delimiter">))</span> <span class="Delimiter">{</span>
+      raise &lt;&lt; caller &lt;&lt; <span class="Constant">&quot;: assume-filesystem: no data for filename '&quot;</span> &lt;&lt; filename &lt;&lt; <span class="Constant">&quot;'</span><span class="cSpecial">\n</span><span class="Constant">&quot;</span> &lt;&lt; end<span class="Delimiter">();</span>
+      <span class="Identifier">break</span><span class="Delimiter">;</span>
+    <span class="Delimiter">}</span>
+    string arrow = next_filesystem_word<span class="Delimiter">(</span>in<span class="Delimiter">);</span>
+    <span class="Normal">if</span> <span class="Delimiter">(</span>arrow != <span class="Constant">&quot;&lt;-&quot;</span><span class="Delimiter">)</span> <span class="Delimiter">{</span>
+      raise &lt;&lt; caller &lt;&lt; <span class="Constant">&quot;: assume-filesystem: expected '&lt;-' after filename '&quot;</span> &lt;&lt; filename &lt;&lt; <span class="Constant">&quot;' but got '&quot;</span> &lt;&lt; arrow &lt;&lt; <span class="Constant">&quot;'</span><span class="cSpecial">\n</span><span class="Constant">&quot;</span> &lt;&lt; end<span class="Delimiter">();</span>
+      <span class="Identifier">break</span><span class="Delimiter">;</span>
+    <span class="Delimiter">}</span>
+    <span class="Normal">if</span> <span class="Delimiter">(</span>!has_data<span class="Delimiter">(</span>in<span class="Delimiter">))</span> <span class="Delimiter">{</span>
+      raise &lt;&lt; caller &lt;&lt; <span class="Constant">&quot;: assume-filesystem: no data for filename '&quot;</span> &lt;&lt; filename &lt;&lt; <span class="Constant">&quot;' after '&lt;-'</span><span class="cSpecial">\n</span><span class="Constant">&quot;</span> &lt;&lt; end<span class="Delimiter">();</span>
+      <span class="Identifier">break</span><span class="Delimiter">;</span>
+    <span class="Delimiter">}</span>
+    string contents = next_filesystem_word<span class="Delimiter">(</span>in<span class="Delimiter">);</span>
+    <span class="Normal">if</span> <span class="Delimiter">(</span>*contents<span class="Delimiter">.</span>begin<span class="Delimiter">()</span> != <span class="Constant">'['</span><span class="Delimiter">)</span> <span class="Delimiter">{</span>
+      raise &lt;&lt; caller &lt;&lt; <span class="Constant">&quot;: assume-filesystem: file contents '&quot;</span> &lt;&lt; contents &lt;&lt; <span class="Constant">&quot;' for filename '&quot;</span> &lt;&lt; filename &lt;&lt; <span class="Constant">&quot;' must begin with a '['</span><span class="cSpecial">\n</span><span class="Constant">&quot;</span> &lt;&lt; end<span class="Delimiter">();</span>
+      <span class="Identifier">break</span><span class="Delimiter">;</span>
+    <span class="Delimiter">}</span>
+    <span class="Normal">if</span> <span class="Delimiter">(</span>*contents<span class="Delimiter">.</span>rbegin<span class="Delimiter">()</span> != <span class="Constant">']'</span><span class="Delimiter">)</span> <span class="Delimiter">{</span>
+      raise &lt;&lt; caller &lt;&lt; <span class="Constant">&quot;: assume-filesystem: file contents '&quot;</span> &lt;&lt; contents &lt;&lt; <span class="Constant">&quot;' for filename '&quot;</span> &lt;&lt; filename &lt;&lt; <span class="Constant">&quot;' must end with a ']'</span><span class="cSpecial">\n</span><span class="Constant">&quot;</span> &lt;&lt; end<span class="Delimiter">();</span>
+      <span class="Identifier">break</span><span class="Delimiter">;</span>
+    <span class="Delimiter">}</span>
+    contents<span class="Delimiter">.</span>erase<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">,</span> <span class="Constant">1</span><span class="Delimiter">);</span>
+    contents<span class="Delimiter">.</span>erase<span class="Delimiter">(</span>SIZE<span class="Delimiter">(</span>contents<span class="Delimiter">)</span>-<span class="Constant">1</span><span class="Delimiter">);</span>
+    put<span class="Delimiter">(</span>out<span class="Delimiter">,</span> filename<span class="Delimiter">,</span> munge_filesystem_contents<span class="Delimiter">(</span>contents<span class="Delimiter">,</span> filename<span class="Delimiter">,</span> caller<span class="Delimiter">));</span>
+  <span class="Delimiter">}</span>
+<span class="Delimiter">}</span>
+
+string munge_filesystem_contents<span class="Delimiter">(</span><span class="Normal">const</span> string&amp; data<span class="Delimiter">,</span> <span class="Normal">const</span> string&amp; filename<span class="Delimiter">,</span> <span class="Normal">const</span> string&amp; caller<span class="Delimiter">)</span> <span class="Delimiter">{</span>
+  <span class="Normal">if</span> <span class="Delimiter">(</span>data<span class="Delimiter">.</span>empty<span class="Delimiter">())</span> <span class="Identifier">return</span> <span class="Constant">&quot;&quot;</span><span class="Delimiter">;</span>
+  istringstream in<span class="Delimiter">(</span>data<span class="Delimiter">);</span>
+  in &gt;&gt; std::noskipws<span class="Delimiter">;</span>
+  skip_whitespace_and_comments<span class="Delimiter">(</span>in<span class="Delimiter">);</span>
+  ostringstream out<span class="Delimiter">;</span>
+  <span class="Normal">while</span> <span class="Delimiter">(</span><span class="Constant">true</span><span class="Delimiter">)</span> <span class="Delimiter">{</span>
+    <span class="Normal">if</span> <span class="Delimiter">(</span>!has_data<span class="Delimiter">(</span>in<span class="Delimiter">))</span> <span class="Identifier">break</span><span class="Delimiter">;</span>
+    skip_whitespace<span class="Delimiter">(</span>in<span class="Delimiter">);</span>
+    <span class="Normal">if</span> <span class="Delimiter">(</span>!has_data<span class="Delimiter">(</span>in<span class="Delimiter">))</span> <span class="Identifier">break</span><span class="Delimiter">;</span>
+    <span class="Normal">if</span> <span class="Delimiter">(</span>in<span class="Delimiter">.</span>peek<span class="Delimiter">()</span> != <span class="Constant">'|'</span><span class="Delimiter">)</span> <span class="Delimiter">{</span>
+      raise &lt;&lt; caller &lt;&lt; <span class="Constant">&quot;: assume-filesystem: file contents for filename '&quot;</span> &lt;&lt; filename &lt;&lt; <span class="Constant">&quot;' must be delimited in '|'s</span><span class="cSpecial">\n</span><span class="Constant">&quot;</span> &lt;&lt; end<span class="Delimiter">();</span>
+      <span class="Identifier">break</span><span class="Delimiter">;</span>
+    <span class="Delimiter">}</span>
+    in<span class="Delimiter">.</span>get<span class="Delimiter">();</span>  <span class="Comment">// skip leading '|'</span>
+    string line<span class="Delimiter">;</span>
+    getline<span class="Delimiter">(</span>in<span class="Delimiter">,</span> line<span class="Delimiter">);</span>
+    <span class="Normal">for</span> <span class="Delimiter">(</span><span class="Normal">int</span> i = <span class="Constant">0</span><span class="Delimiter">;</span> i &lt; SIZE<span class="Delimiter">(</span>line<span class="Delimiter">);</span> ++i<span class="Delimiter">)</span> <span class="Delimiter">{</span>
+      <span class="Normal">if</span> <span class="Delimiter">(</span>line<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">)</span> == <span class="Constant">'|'</span><span class="Delimiter">)</span> <span class="Identifier">break</span><span class="Delimiter">;</span>
+      <span class="Normal">if</span> <span class="Delimiter">(</span>line<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">)</span> == <span class="cSpecial">'\\'</span><span class="Delimiter">)</span> <span class="Delimiter">{</span>
+        ++i<span class="Delimiter">;</span>  <span class="Comment">// skip</span>
+        <span class="Normal">if</span> <span class="Delimiter">(</span>i == SIZE<span class="Delimiter">(</span>line<span class="Delimiter">))</span> <span class="Delimiter">{</span>
+          raise &lt;&lt; caller &lt;&lt; <span class="Constant">&quot;: assume-filesystem: file contents can't end a line with '</span><span class="cSpecial">\\</span><span class="Constant">'</span><span class="cSpecial">\n</span><span class="Constant">&quot;</span> &lt;&lt; end<span class="Delimiter">();</span>
+          <span class="Identifier">break</span><span class="Delimiter">;</span>
+        <span class="Delimiter">}</span>
+      <span class="Delimiter">}</span>
+      out &lt;&lt; line<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">);</span>
+    <span class="Delimiter">}</span>
+    <span class="Comment">// todo: some way to represent a file without a final newline</span>
+    out &lt;&lt; <span class="cSpecial">'\n'</span><span class="Delimiter">;</span>
+  <span class="Delimiter">}</span>
+  <span class="Identifier">return</span> out<span class="Delimiter">.</span>str<span class="Delimiter">();</span>
+<span class="Delimiter">}</span>
+
+<span class="Normal">void</span> construct_filesystem_object<span class="Delimiter">(</span><span class="Normal">const</span> map&lt;string<span class="Delimiter">,</span> string&gt;&amp; contents<span class="Delimiter">)</span> <span class="Delimiter">{</span>
+  <span class="Normal">int</span> filesystem_data_address = allocate<span class="Delimiter">(</span>SIZE<span class="Delimiter">(</span>contents<span class="Delimiter">)</span>*<span class="Constant">2</span> + <span class="Comment">/*</span><span class="Comment">array length</span><span class="Comment">*/</span><span class="Constant">1</span><span class="Delimiter">);</span>
+  <span class="Normal">int</span> curr = filesystem_data_address + <span class="Comment">/*</span><span class="Comment">skip refcount</span><span class="Comment">*/</span><span class="Constant">1</span> + <span class="Comment">/*</span><span class="Comment">skip array length</span><span class="Comment">*/</span><span class="Constant">1</span><span class="Delimiter">;</span>
+  <span class="Normal">for</span> <span class="Delimiter">(</span>map&lt;string<span class="Delimiter">,</span> string&gt;::const_iterator p = contents<span class="Delimiter">.</span>begin<span class="Delimiter">();</span> p != contents<span class="Delimiter">.</span>end<span class="Delimiter">();</span> ++p<span class="Delimiter">)</span> <span class="Delimiter">{</span>
+    put<span class="Delimiter">(</span>Memory<span class="Delimiter">,</span> curr<span class="Delimiter">,</span> new_mu_string<span class="Delimiter">(</span>p<span class="Delimiter">-&gt;</span>first<span class="Delimiter">));</span>
+    curr++<span class="Delimiter">;</span>
+    put<span class="Delimiter">(</span>Memory<span class="Delimiter">,</span> curr<span class="Delimiter">,</span> new_mu_string<span class="Delimiter">(</span>p<span class="Delimiter">-&gt;</span>second<span class="Delimiter">));</span>
+    curr++<span class="Delimiter">;</span>
+  <span class="Delimiter">}</span>
+  put<span class="Delimiter">(</span>Memory<span class="Delimiter">,</span> filesystem_data_address+<span class="Comment">/*</span><span class="Comment">skip refcount</span><span class="Comment">*/</span><span class="Constant">1</span><span class="Delimiter">,</span> SIZE<span class="Delimiter">(</span>contents<span class="Delimiter">));</span>  <span class="Comment">// size of array</span>
+  put<span class="Delimiter">(</span>Memory<span class="Delimiter">,</span> filesystem_data_address<span class="Delimiter">,</span> <span class="Constant">1</span><span class="Delimiter">);</span>  <span class="Comment">// initialize refcount</span>
+  <span class="Comment">// wrap the filesystem data in a filesystem object</span>
+  <span class="Normal">int</span> filesystem_address = allocate<span class="Delimiter">(</span>size_of_filesystem<span class="Delimiter">());</span>
+  put<span class="Delimiter">(</span>Memory<span class="Delimiter">,</span> filesystem_address+<span class="Comment">/*</span><span class="Comment">skip refcount</span><span class="Comment">*/</span><span class="Constant">1</span><span class="Delimiter">,</span> filesystem_data_address<span class="Delimiter">);</span>
+  put<span class="Delimiter">(</span>Memory<span class="Delimiter">,</span> filesystem_address<span class="Delimiter">,</span> <span class="Constant">1</span><span class="Delimiter">);</span>  <span class="Comment">// initialize refcount</span>
+  <span class="Comment">// save in product</span>
+  put<span class="Delimiter">(</span>Memory<span class="Delimiter">,</span> FILESYSTEM<span class="Delimiter">,</span> filesystem_address<span class="Delimiter">);</span>
+<span class="Delimiter">}</span>
+
+<span class="Normal">int</span> size_of_filesystem<span class="Delimiter">()</span> <span class="Delimiter">{</span>
+  <span class="Comment">// memoize result if already computed</span>
+  <span class="Normal">static</span> <span class="Normal">int</span> result = <span class="Constant">0</span><span class="Delimiter">;</span>
+  <span class="Normal">if</span> <span class="Delimiter">(</span>result<span class="Delimiter">)</span> <span class="Identifier">return</span> result<span class="Delimiter">;</span>
+  assert<span class="Delimiter">(</span>get<span class="Delimiter">(</span>Type_ordinal<span class="Delimiter">,</span> <span class="Constant">&quot;filesystem&quot;</span><span class="Delimiter">));</span>
+  type_tree* type = <span class="Normal">new</span> type_tree<span class="Delimiter">(</span><span class="Constant">&quot;filesystem&quot;</span><span class="Delimiter">);</span>
+  result = size_of<span class="Delimiter">(</span>type<span class="Delimiter">)</span>+<span class="Comment">/*</span><span class="Comment">refcount</span><span class="Comment">*/</span><span class="Constant">1</span><span class="Delimiter">;</span>
+  <span class="Normal">delete</span> type<span class="Delimiter">;</span>
+  <span class="Identifier">return</span> result<span class="Delimiter">;</span>
+<span class="Delimiter">}</span>
+
+string next_filesystem_word<span class="Delimiter">(</span>istream&amp; in<span class="Delimiter">)</span> <span class="Delimiter">{</span>
+  skip_whitespace_and_comments<span class="Delimiter">(</span>in<span class="Delimiter">);</span>
+  <span class="Normal">if</span> <span class="Delimiter">(</span>in<span class="Delimiter">.</span>peek<span class="Delimiter">()</span> == <span class="Constant">'['</span><span class="Delimiter">)</span> <span class="Delimiter">{</span>
+    string result = slurp_quoted<span class="Delimiter">(</span>in<span class="Delimiter">);</span>
+    skip_whitespace_and_comments_but_not_newline<span class="Delimiter">(</span>in<span class="Delimiter">);</span>
+    <span class="Identifier">return</span> result<span class="Delimiter">;</span>
+  <span class="Delimiter">}</span>
+  ostringstream out<span class="Delimiter">;</span>
+  slurp_word<span class="Delimiter">(</span>in<span class="Delimiter">,</span> out<span class="Delimiter">);</span>
+  skip_whitespace_and_comments<span class="Delimiter">(</span>in<span class="Delimiter">);</span>
+  <span class="Identifier">return</span> out<span class="Delimiter">.</span>str<span class="Delimiter">();</span>
+<span class="Delimiter">}</span>
+
+<span class="Normal">void</span> skip_whitespace<span class="Delimiter">(</span>istream&amp; in<span class="Delimiter">)</span> <span class="Delimiter">{</span>
+  <span class="Normal">while</span> <span class="Delimiter">(</span><span class="Constant">true</span><span class="Delimiter">)</span> <span class="Delimiter">{</span>
+    <span class="Normal">if</span> <span class="Delimiter">(</span>!has_data<span class="Delimiter">(</span>in<span class="Delimiter">))</span> <span class="Identifier">break</span><span class="Delimiter">;</span>
+    <span class="Normal">if</span> <span class="Delimiter">(</span>isspace<span class="Delimiter">(</span>in<span class="Delimiter">.</span>peek<span class="Delimiter">()))</span> in<span class="Delimiter">.</span>get<span class="Delimiter">();</span>
+    <span class="Normal">else</span> <span class="Identifier">break</span><span class="Delimiter">;</span>
+  <span class="Delimiter">}</span>
+<span class="Delimiter">}</span>
+</pre>
+</body>
+</html>
+<!-- vim: set foldmethod=manual : -->
diff --git a/html/090scenario_filesystem_test.mu.html b/html/090scenario_filesystem_test.mu.html
new file mode 100644
index 00000000..1188f1dd
--- /dev/null
+++ b/html/090scenario_filesystem_test.mu.html
@@ -0,0 +1,57 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<meta http-equiv="content-type" content="text/html; charset=UTF-8">
+<title>Mu - 090scenario_filesystem_test.mu</title>
+<meta name="Generator" content="Vim/7.4">
+<meta name="plugin-version" content="vim7.4_v2">
+<meta name="syntax" content="none">
+<meta name="settings" content="use_css,pre_wrap,no_foldcolumn,expand_tabs,prevent_copy=">
+<meta name="colorscheme" content="minimal">
+<style type="text/css">
+<!--
+pre { white-space: pre-wrap; font-family: monospace; color: #eeeeee; background-color: #080808; }
+body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color: #080808; }
+* { font-size: 12pt; font-size: 1em; }
+.muScenario { color: #00af00; }
+.Comment { color: #9090ff; }
+.Constant { color: #00a0a0; }
+.Special { color: #c00000; }
+-->
+</style>
+
+<script type='text/javascript'>
+<!--
+
+-->
+</script>
+</head>
+<body>
+<pre id='vimCodeElement'>
+<span class="Comment"># Check our support for fake file systems in scenarios.</span>
+
+<span class="muScenario">scenario</span> read-from-fake-file [
+  <span class="Constant">local-scope</span>
+  assume-filesystem [
+    <span class="Constant">[a]</span><span class="Special"> &lt;- </span>[
+<span class="Constant">      |xyz|</span>
+    ]
+  ]
+  contents:address:source:character<span class="Special"> &lt;- </span>start-reading filesystem:address:filesystem, <span class="Constant">[a]</span>
+  <span class="Constant">1</span>:character/<span class="Special">raw &lt;- </span>read contents
+  <span class="Constant">2</span>:character/<span class="Special">raw &lt;- </span>read contents
+  <span class="Constant">3</span>:character/<span class="Special">raw &lt;- </span>read contents
+  <span class="Constant">4</span>:character/<span class="Special">raw &lt;- </span>read contents
+  _, <span class="Constant">5</span>:boolean/<span class="Special">raw &lt;- </span>read contents
+  memory-should-contain [
+    <span class="Constant">1</span><span class="Special"> &lt;- </span><span class="Constant">120</span>  <span class="Comment"># x</span>
+    <span class="Constant">2</span><span class="Special"> &lt;- </span><span class="Constant">121</span>  <span class="Comment"># y</span>
+    <span class="Constant">3</span><span class="Special"> &lt;- </span><span class="Constant">122</span>  <span class="Comment"># z</span>
+    <span class="Constant">4</span><span class="Special"> &lt;- </span><span class="Constant">10</span>  <span class="Comment"># newline</span>
+    <span class="Constant">5</span><span class="Special"> &lt;- </span><span class="Constant">1</span>  <span class="Comment"># eof</span>
+  ]
+]
+</pre>
+</body>
+</html>
+<!-- vim: set foldmethod=manual : -->
diff --git a/html/090trace_browser.cc.html b/html/100trace_browser.cc.html
index 7fe976a3..a2aee17e 100644
--- a/html/090trace_browser.cc.html
+++ b/html/100trace_browser.cc.html
@@ -2,7 +2,7 @@
 <html>
 <head>
 <meta http-equiv="content-type" content="text/html; charset=UTF-8">
-<title>Mu - 090trace_browser.cc</title>
+<title>Mu - 100trace_browser.cc</title>
 <meta name="Generator" content="Vim/7.4">
 <meta name="plugin-version" content="vim7.4_v2">
 <meta name="syntax" content="cpp">
diff --git a/html/091run_sandboxed.cc.html b/html/101run_sandboxed.cc.html
index cd7cd455..a0b9b043 100644
--- a/html/091run_sandboxed.cc.html
+++ b/html/101run_sandboxed.cc.html
@@ -2,7 +2,7 @@
 <html>
 <head>
 <meta http-equiv="content-type" content="text/html; charset=UTF-8">
-<title>Mu - 091run_sandboxed.cc</title>
+<title>Mu - 101run_sandboxed.cc</title>
 <meta name="Generator" content="Vim/7.4">
 <meta name="plugin-version" content="vim7.4_v2">
 <meta name="syntax" content="cpp">
diff --git a/html/092persist.cc.html b/html/102persist.cc.html
index 6c1e722c..d16622e4 100644
--- a/html/092persist.cc.html
+++ b/html/102persist.cc.html
@@ -2,7 +2,7 @@
 <html>
 <head>
 <meta http-equiv="content-type" content="text/html; charset=UTF-8">
-<title>Mu - 092persist.cc</title>
+<title>Mu - 102persist.cc</title>
 <meta name="Generator" content="Vim/7.4">
 <meta name="plugin-version" content="vim7.4_v2">
 <meta name="syntax" content="cpp">
diff --git a/html/edit/011-errors.mu.html b/html/edit/011-errors.mu.html
index b9db2f50..b9f46f1b 100644
--- a/html/edit/011-errors.mu.html
+++ b/html/edit/011-errors.mu.html
@@ -412,10 +412,9 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color
   assume-screen <span class="Constant">100/width</span>, <span class="Constant">15/height</span>
   <span class="Comment"># recipe is incomplete (unbalanced '[')</span>
   <span class="Constant">1</span>:address:array:character<span class="Special"> &lt;- </span>new <span class="Constant">[ </span>
-<span class="Constant">recipe foo «</span>
+<span class="Constant">recipe foo \\[</span>
 <span class="Constant">  x &lt;- copy 0</span>
 <span class="Constant">]</span>
-  replace <span class="Constant">1</span>:address:array:character, <span class="Constant">171/«</span>, <span class="Constant">91</span>  <span class="Comment"># '['</span>
   <span class="Constant">2</span>:address:array:character<span class="Special"> &lt;- </span>new <span class="Constant">[foo]</span>
   <span class="Constant">3</span>:address:programming-environment-data<span class="Special"> &lt;- </span>new-programming-environment screen:address:screen, <span class="Constant">1</span>:address:array:character, <span class="Constant">2</span>:address:array:character
   assume-console [
@@ -427,10 +426,10 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color
   screen-should-contain [
    <span class="Constant"> .  errors found                                                                   run (F4)           .</span>
    <span class="Constant"> .                                                  ┊foo                                              .</span>
-   <span class="Constant"> .recipe foo \\\[                                      ┊━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━.</span>
+   <span class="Constant"> .recipe foo \\[                                      ┊━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━.</span>
    <span class="Constant"> .  x &lt;- copy 0                                     ┊                                                 .</span>
    <span class="Constant"> .                                                  ┊                                                 .</span>
-   <span class="Constant"> .9: unbalanced '\\\[' for recipe                      ┊                                                 .</span>
+   <span class="Constant"> .9: unbalanced '\\[' for recipe                      ┊                                                 .</span>
    <span class="Constant"> .┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┊                                                 .</span>
    <span class="Constant"> .                                                  ┊                                                 .</span>
   ]
diff --git a/index.html b/index.html
index 5bc909aa..fb8f2c47 100644
--- a/index.html
+++ b/index.html
@@ -234,7 +234,7 @@ writing tests for keyboard and mouse using the fakes.
 
 <br/><a href='html/029tools.cc.html'>029tools.cc</a>: various primitive
 operations to help with testing and debugging.
-<br/><a href='html/090trace_browser.cc.html'>090trace_browser.cc</a>: a
+<br/><a href='html/100trace_browser.cc.html'>100trace_browser.cc</a>: a
 zoomable UI for inspecting traces generated by Mu programs. Allows both
 scanning a high-level view and drilling down into selective details.