diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2016-10-22 04:04:46 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2016-10-22 04:04:46 -0700 |
commit | beea7ce25cfe42c363259705a6b5741ad47484ab (patch) | |
tree | d30b44a935bad1cb6c88083c57caabdf062ed513 | |
parent | 98e3a41bf96b37d94f6b0a0e98a4635a174e9903 (diff) | |
download | mu-beea7ce25cfe42c363259705a6b5741ad47484ab.tar.gz |
3543
72 files changed, 278 insertions, 127 deletions
diff --git a/html/000organization.cc.html b/html/000organization.cc.html index d074f97e..a94eb30c 100644 --- a/html/000organization.cc.html +++ b/html/000organization.cc.html @@ -16,7 +16,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color .Delimiter { color: #800080; } .Comment { color: #9090ff; } .Constant { color: #00a0a0; } -.Identifier { color: #fcb165; } +.Identifier { color: #ecf32c; } .Normal { color: #eeeeee; background-color: #080808; padding-bottom: 1px; } .PreProc { color: #800080; } --> diff --git a/html/001help.cc.html b/html/001help.cc.html index 1ad1ee68..0b857932 100644 --- a/html/001help.cc.html +++ b/html/001help.cc.html @@ -18,7 +18,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color .Comment { color: #9090ff; } .Delimiter { color: #800080; } .cSpecial { color: #008000; } -.Identifier { color: #fcb165; } +.Identifier { color: #ecf32c; } .Normal { color: #eeeeee; background-color: #080808; padding-bottom: 1px; } .PreProc { color: #800080; } .CommentedCode { color: #6c6c6c; } diff --git a/html/002test.cc.html b/html/002test.cc.html index bca0201f..b66c4cea 100644 --- a/html/002test.cc.html +++ b/html/002test.cc.html @@ -17,7 +17,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color .Comment { color: #9090ff; } .Delimiter { color: #800080; } .cSpecial { color: #008000; } -.Identifier { color: #fcb165; } +.Identifier { color: #ecf32c; } .Normal { color: #eeeeee; background-color: #080808; padding-bottom: 1px; } .PreProc { color: #800080; } .CommentedCode { color: #6c6c6c; } @@ -58,7 +58,6 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color <span class="Delimiter">:(before "End Includes")</span> <span class="PreProc">#define CHECK(X) \</span> <span class="PreProc"> </span><span class="Normal">if</span><span class="PreProc"> (Passed && !(X)) </span><span class="Delimiter">{</span><span class="PreProc"> \</span> -<span class="PreProc"> ++Num_failures</span><span class="Delimiter">;</span><span class="PreProc"> \</span> <span class="PreProc"> cerr << </span><span class="Constant">"</span><span class="cSpecial">\n</span><span class="Constant">F - "</span><span class="PreProc"> << __FUNCTION__ << </span><span class="Constant">"("</span><span class="PreProc"> << </span><span class="Constant">__FILE__</span><span class="PreProc"> << </span><span class="Constant">":"</span><span class="PreProc"> << </span><span class="Constant">__LINE__</span><span class="PreProc"> << </span><span class="Constant">"): "</span><span class="PreProc"> << #X << </span><span class="cSpecial">'\n'</span><span class="Delimiter">;</span><span class="PreProc"> \</span> <span class="PreProc"> Passed = </span><span class="Constant">false</span><span class="Delimiter">;</span><span class="PreProc"> \</span> <span class="PreProc"> </span><span class="Identifier">return</span><span class="Delimiter">;</span><span class="PreProc"> </span><span class="Comment">/*</span><span class="Comment"> Currently we stop at the very first failure. </span><span class="Comment">*/</span><span class="PreProc"> \</span> @@ -66,7 +65,6 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color <span class="PreProc">#define CHECK_EQ(X</span><span class="Delimiter">,</span><span class="PreProc"> Y) \</span> <span class="PreProc"> </span><span class="Normal">if</span><span class="PreProc"> (Passed && (X) != (Y)) </span><span class="Delimiter">{</span><span class="PreProc"> \</span> -<span class="PreProc"> ++Num_failures</span><span class="Delimiter">;</span><span class="PreProc"> \</span> <span class="PreProc"> cerr << </span><span class="Constant">"</span><span class="cSpecial">\n</span><span class="Constant">F - "</span><span class="PreProc"> << __FUNCTION__ << </span><span class="Constant">"("</span><span class="PreProc"> << </span><span class="Constant">__FILE__</span><span class="PreProc"> << </span><span class="Constant">":"</span><span class="PreProc"> << </span><span class="Constant">__LINE__</span><span class="PreProc"> << </span><span class="Constant">"): "</span><span class="PreProc"> << #X << </span><span class="Constant">" == "</span><span class="PreProc"> << #Y << </span><span class="cSpecial">'\n'</span><span class="Delimiter">;</span><span class="PreProc"> \</span> <span class="PreProc"> cerr << </span><span class="Constant">" got "</span><span class="PreProc"> << (X) << </span><span class="cSpecial">'\n'</span><span class="Delimiter">;</span><span class="PreProc"> </span><span class="Comment">/*</span><span class="Comment"> BEWARE: multiple eval </span><span class="Comment">*/</span><span class="PreProc"> \</span> <span class="PreProc"> Passed = </span><span class="Constant">false</span><span class="Delimiter">;</span><span class="PreProc"> \</span> @@ -116,6 +114,7 @@ Passed = <span class="Constant">true</span><span class="Delimiter">;</span> <span class="Comment">// End Test Teardown</span> teardown<span class="Delimiter">();</span> <span class="Normal">if</span> <span class="Delimiter">(</span>Passed<span class="Delimiter">)</span> cerr << <span class="Constant">'.'</span><span class="Delimiter">;</span> + <span class="Normal">else</span> ++Num_failures<span class="Delimiter">;</span> <span class="Delimiter">}</span> <span class="Normal">bool</span> is_integer<span class="Delimiter">(</span><span class="Normal">const</span> string& s<span class="Delimiter">)</span> <span class="Delimiter">{</span> diff --git a/html/003trace.cc.html b/html/003trace.cc.html index d4618fb9..a4e56ca8 100644 --- a/html/003trace.cc.html +++ b/html/003trace.cc.html @@ -17,7 +17,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color .Comment { color: #9090ff; } .Delimiter { color: #800080; } .cSpecial { color: #008000; } -.Identifier { color: #fcb165; } +.Identifier { color: #ecf32c; } .Normal { color: #eeeeee; background-color: #080808; padding-bottom: 1px; } .PreProc { color: #800080; } --> @@ -211,7 +211,6 @@ trace_stream* Trace_stream = <span class="Constant">NULL</span><span class="Deli <span class="Delimiter">:(before "End Test Teardown")</span> <span class="Normal">if</span> <span class="Delimiter">(</span>Passed && !Hide_errors && trace_count<span class="Delimiter">(</span><span class="Constant">"error"</span><span class="Delimiter">)</span> > <span class="Constant">0</span><span class="Delimiter">)</span> <span class="Delimiter">{</span> Passed = <span class="Constant">false</span><span class="Delimiter">;</span> - ++Num_failures<span class="Delimiter">;</span> <span class="Delimiter">}</span> <span class="Delimiter">:(before "End Types")</span> @@ -253,7 +252,6 @@ START_TRACING_UNTIL_END_OF_SCOPE <span class="PreProc">#define CHECK_TRACE_CONTAINS_ERROR() CHECK(trace_count(</span><span class="Constant">"error"</span><span class="PreProc">) > </span><span class="Constant">0</span><span class="PreProc">)</span> <span class="PreProc">#define CHECK_TRACE_DOESNT_CONTAIN_ERROR() \</span> <span class="PreProc"> </span><span class="Normal">if</span><span class="PreProc"> (Passed && trace_count(</span><span class="Constant">"error"</span><span class="PreProc">) > </span><span class="Constant">0</span><span class="PreProc">) </span><span class="Delimiter">{</span><span class="PreProc"> \</span> -<span class="PreProc"> ++Num_failures</span><span class="Delimiter">;</span><span class="PreProc"> \</span> <span class="PreProc"> cerr << </span><span class="Constant">"</span><span class="cSpecial">\n</span><span class="Constant">F - "</span><span class="PreProc"> << __FUNCTION__ << </span><span class="Constant">"("</span><span class="PreProc"> << </span><span class="Constant">__FILE__</span><span class="PreProc"> << </span><span class="Constant">":"</span><span class="PreProc"> << </span><span class="Constant">__LINE__</span><span class="PreProc"> << </span><span class="Constant">"): unexpected errors</span><span class="cSpecial">\n</span><span class="Constant">"</span><span class="Delimiter">;</span><span class="PreProc"> \</span> <span class="PreProc"> DUMP(</span><span class="Constant">"error"</span><span class="PreProc">)</span><span class="Delimiter">;</span><span class="PreProc"> \</span> <span class="PreProc"> Passed = </span><span class="Constant">false</span><span class="Delimiter">;</span><span class="PreProc"> \</span> @@ -262,7 +260,6 @@ START_TRACING_UNTIL_END_OF_SCOPE <span class="PreProc">#define CHECK_TRACE_COUNT(label</span><span class="Delimiter">,</span><span class="PreProc"> count) \</span> <span class="PreProc"> </span><span class="Normal">if</span><span class="PreProc"> (Passed && trace_count(label) != (count)) </span><span class="Delimiter">{</span><span class="PreProc"> \</span> -<span class="PreProc"> ++Num_failures</span><span class="Delimiter">;</span><span class="PreProc"> \</span> <span class="PreProc"> cerr << </span><span class="Constant">"</span><span class="cSpecial">\n</span><span class="Constant">F - "</span><span class="PreProc"> << __FUNCTION__ << </span><span class="Constant">"("</span><span class="PreProc"> << </span><span class="Constant">__FILE__</span><span class="PreProc"> << </span><span class="Constant">":"</span><span class="PreProc"> << </span><span class="Constant">__LINE__</span><span class="PreProc"> << </span><span class="Constant">"): trace_count of "</span><span class="PreProc"> << label << </span><span class="Constant">" should be "</span><span class="PreProc"> << count << </span><span class="cSpecial">'\n'</span><span class="Delimiter">;</span><span class="PreProc"> \</span> <span class="PreProc"> cerr << </span><span class="Constant">" got "</span><span class="PreProc"> << trace_count(label) << </span><span class="cSpecial">'\n'</span><span class="Delimiter">;</span><span class="PreProc"> </span><span class="Comment">/*</span><span class="Comment"> multiple eval </span><span class="Comment">*/</span><span class="PreProc"> \</span> <span class="PreProc"> DUMP(label)</span><span class="Delimiter">;</span><span class="PreProc"> \</span> @@ -293,7 +290,6 @@ START_TRACING_UNTIL_END_OF_SCOPE split_label_contents<span class="Delimiter">(</span>expected_lines<span class="Delimiter">.</span>at<span class="Delimiter">(</span>curr_expected_line<span class="Delimiter">),</span> &label<span class="Delimiter">,</span> &contents<span class="Delimiter">);</span> <span class="Delimiter">}</span> - ++Num_failures<span class="Delimiter">;</span> <span class="Normal">if</span> <span class="Delimiter">(</span>line_exists_anywhere<span class="Delimiter">(</span>label<span class="Delimiter">,</span> contents<span class="Delimiter">))</span> <span class="Delimiter">{</span> cerr << <span class="Constant">"</span><span class="cSpecial">\n</span><span class="Constant">F - "</span> << FUNCTION << <span class="Constant">"("</span> << <span class="Normal">FILE</span> << <span class="Constant">":"</span> << LINE << <span class="Constant">"): line ["</span> << label << <span class="Constant">": "</span> << contents << <span class="Constant">"] out of order in trace:</span><span class="cSpecial">\n</span><span class="Constant">"</span><span class="Delimiter">;</span> DUMP<span class="Delimiter">(</span><span class="Constant">""</span><span class="Delimiter">);</span> diff --git a/html/010vm.cc.html b/html/010vm.cc.html index c6da65ae..acfb4e10 100644 --- a/html/010vm.cc.html +++ b/html/010vm.cc.html @@ -19,7 +19,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color .Comment { color: #9090ff; } .Delimiter { color: #800080; } .SalientComment { color: #00ffff; } -.Identifier { color: #fcb165; } +.Identifier { color: #ecf32c; } .Normal { color: #eeeeee; background-color: #080808; padding-bottom: 1px; } .PreProc { color: #800080; } .CommentedCode { color: #6c6c6c; } diff --git a/html/011load.cc.html b/html/011load.cc.html index a80dce11..0d208739 100644 --- a/html/011load.cc.html +++ b/html/011load.cc.html @@ -22,7 +22,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color .Special { color: #c00000; } .traceContains { color: #008000; } .Normal { color: #eeeeee; background-color: #080808; padding-bottom: 1px; } -.Identifier { color: #fcb165; } +.Identifier { color: #ecf32c; } --> </style> @@ -62,6 +62,10 @@ vector<recipe_ordinal> load<span class="Delimiter">(</span>istream& in 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 command = next_word<span class="Delimiter">(</span>in<span class="Delimiter">);</span> + <span class="Normal">if</span> <span class="Delimiter">(</span>command<span class="Delimiter">.</span>empty<span class="Delimiter">())</span> <span class="Delimiter">{</span> + assert<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="Delimiter">}</span> <span class="Comment">// Command Handlers</span> <span class="Normal">if</span> <span class="Delimiter">(</span>command == <span class="Constant">"recipe"</span> || command == <span class="Constant">"def"</span><span class="Delimiter">)</span> <span class="Delimiter">{</span> recipe_ordinal r = slurp_recipe<span class="Delimiter">(</span>in<span class="Delimiter">);</span> @@ -86,6 +90,11 @@ vector<recipe_ordinal> load<span class="Delimiter">(</span>istream& in <span class="Normal">int</span> slurp_recipe<span class="Delimiter">(</span>istream& in<span class="Delimiter">)</span> <span class="Delimiter">{</span> recipe result<span class="Delimiter">;</span> result<span class="Delimiter">.</span>name = next_word<span class="Delimiter">(</span>in<span class="Delimiter">);</span> + <span class="Normal">if</span> <span class="Delimiter">(</span>result<span class="Delimiter">.</span>name<span class="Delimiter">.</span>empty<span class="Delimiter">())</span> <span class="Delimiter">{</span> + assert<span class="Delimiter">(</span>!has_data<span class="Delimiter">(</span>in<span class="Delimiter">));</span> + raise << <span class="Constant">"file ended with 'recipe'</span><span class="cSpecial">\n</span><span class="Constant">"</span> << end<span class="Delimiter">();</span> + <span class="Identifier">return</span> -<span class="Constant">1</span><span class="Delimiter">;</span> + <span class="Delimiter">}</span> <span class="Comment">// End Load Recipe Name</span> skip_whitespace_but_not_newline<span class="Delimiter">(</span>in<span class="Delimiter">);</span> <span class="Comment">// End Recipe Refinements</span> @@ -125,7 +134,7 @@ vector<recipe_ordinal> load<span class="Delimiter">(</span>istream& in curr<span class="Delimiter">-></span>clear<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="Delimiter">{</span> - raise << <span class="Constant">"0: unbalanced '[' for recipe</span><span class="cSpecial">\n</span><span class="Constant">"</span> << end<span class="Delimiter">();</span> + raise << <span class="Constant">"incomplete recipe at end of file (0)</span><span class="cSpecial">\n</span><span class="Constant">"</span> << end<span class="Delimiter">();</span> <span class="Identifier">return</span> <span class="Constant">false</span><span class="Delimiter">;</span> <span class="Delimiter">}</span> @@ -133,10 +142,15 @@ vector<recipe_ordinal> load<span class="Delimiter">(</span>istream& in <span class="Normal">while</span> <span class="Delimiter">(</span>has_data<span class="Delimiter">(</span>in<span class="Delimiter">)</span> && in<span class="Delimiter">.</span>peek<span class="Delimiter">()</span> != <span class="cSpecial">'\n'</span><span class="Delimiter">)</span> <span class="Delimiter">{</span> skip_whitespace_but_not_newline<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="Delimiter">{</span> - raise << <span class="Constant">"1: unbalanced '[' for recipe</span><span class="cSpecial">\n</span><span class="Constant">"</span> << end<span class="Delimiter">();</span> + raise << <span class="Constant">"incomplete recipe at end of file (1)</span><span class="cSpecial">\n</span><span class="Constant">"</span> << end<span class="Delimiter">();</span> <span class="Identifier">return</span> <span class="Constant">false</span><span class="Delimiter">;</span> <span class="Delimiter">}</span> string word = next_word<span class="Delimiter">(</span>in<span class="Delimiter">);</span> + <span class="Normal">if</span> <span class="Delimiter">(</span>word<span class="Delimiter">.</span>empty<span class="Delimiter">())</span> <span class="Delimiter">{</span> + assert<span class="Delimiter">(</span>!has_data<span class="Delimiter">(</span>in<span class="Delimiter">));</span> + raise << <span class="Constant">"incomplete recipe at end of file (2)</span><span class="cSpecial">\n</span><span class="Constant">"</span> << end<span class="Delimiter">();</span> + <span class="Identifier">return</span> <span class="Constant">false</span><span class="Delimiter">;</span> + <span class="Delimiter">}</span> words<span class="Delimiter">.</span>push_back<span class="Delimiter">(</span>word<span class="Delimiter">);</span> skip_whitespace_but_not_newline<span class="Delimiter">(</span>in<span class="Delimiter">);</span> <span class="Delimiter">}</span> @@ -149,7 +163,7 @@ vector<recipe_ordinal> load<span class="Delimiter">(</span>istream& in curr<span class="Delimiter">-></span>label = words<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">);</span> trace<span class="Delimiter">(</span><span class="Constant">9993</span><span class="Delimiter">,</span> <span class="Constant">"parse"</span><span class="Delimiter">)</span> << <span class="Constant">"label: "</span> << curr<span class="Delimiter">-></span>label << end<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 << <span class="Constant">"7: unbalanced '[' for recipe</span><span class="cSpecial">\n</span><span class="Constant">"</span> << end<span class="Delimiter">();</span> + raise << <span class="Constant">"incomplete recipe at end of file (3)</span><span class="cSpecial">\n</span><span class="Constant">"</span> << end<span class="Delimiter">();</span> <span class="Identifier">return</span> <span class="Constant">false</span><span class="Delimiter">;</span> <span class="Delimiter">}</span> <span class="Identifier">return</span> <span class="Constant">true</span><span class="Delimiter">;</span> @@ -185,6 +199,7 @@ vector<recipe_ordinal> load<span class="Delimiter">(</span>istream& in <span class="Identifier">return</span> <span class="Constant">true</span><span class="Delimiter">;</span> <span class="Delimiter">}</span> +<span class="Comment">// can return empty string -- only if `in` has no more data</span> string next_word<span class="Delimiter">(</span>istream& in<span class="Delimiter">)</span> <span class="Delimiter">{</span> skip_whitespace_but_not_newline<span class="Delimiter">(</span>in<span class="Delimiter">);</span> <span class="Comment">// End next_word Special-cases</span> diff --git a/html/012transform.cc.html b/html/012transform.cc.html index 31993361..100c0205 100644 --- a/html/012transform.cc.html +++ b/html/012transform.cc.html @@ -16,7 +16,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color .Constant { color: #00a0a0; } .Comment { color: #9090ff; } .Delimiter { color: #800080; } -.Identifier { color: #fcb165; } +.Identifier { color: #ecf32c; } .Normal { color: #eeeeee; background-color: #080808; padding-bottom: 1px; } --> </style> diff --git a/html/013update_operation.cc.html b/html/013update_operation.cc.html index 48dd882e..b8259ed3 100644 --- a/html/013update_operation.cc.html +++ b/html/013update_operation.cc.html @@ -19,7 +19,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color .cSpecial { color: #008000; } .CommentedCode { color: #6c6c6c; } .Normal { color: #eeeeee; background-color: #080808; padding-bottom: 1px; } -.Identifier { color: #fcb165; } +.Identifier { color: #ecf32c; } --> </style> diff --git a/html/014literal_string.cc.html b/html/014literal_string.cc.html index c19da0af..9d772d06 100644 --- a/html/014literal_string.cc.html +++ b/html/014literal_string.cc.html @@ -21,7 +21,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color .Special { color: #c00000; } .traceContains { color: #008000; } .Normal { color: #eeeeee; background-color: #080808; padding-bottom: 1px; } -.Identifier { color: #fcb165; } +.Identifier { color: #ecf32c; } --> </style> diff --git a/html/015literal_noninteger.cc.html b/html/015literal_noninteger.cc.html index dd45673a..43bb4cd8 100644 --- a/html/015literal_noninteger.cc.html +++ b/html/015literal_noninteger.cc.html @@ -21,7 +21,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color .Special { color: #c00000; } .traceContains { color: #008000; } .Normal { color: #eeeeee; background-color: #080808; padding-bottom: 1px; } -.Identifier { color: #fcb165; } +.Identifier { color: #ecf32c; } --> </style> diff --git a/html/016dilated_reagent.cc.html b/html/016dilated_reagent.cc.html index 65d8ba2e..5705bbfc 100644 --- a/html/016dilated_reagent.cc.html +++ b/html/016dilated_reagent.cc.html @@ -23,7 +23,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color .traceContains { color: #008000; } .Error { color: #ffffff; background-color: #ff6060; padding-bottom: 1px; } .PreProc { color: #800080; } -.Identifier { color: #fcb165; } +.Identifier { color: #ecf32c; } --> </style> @@ -144,7 +144,13 @@ string slurp_balanced_bracket<span class="Delimiter">(</span>istream& in<spa <span class="Identifier">return</span><span class="Delimiter">;</span> <span class="Delimiter">}</span> <span class="Delimiter">{</span> - string_tree* type_names = <span class="Normal">new</span> string_tree<span class="Delimiter">(</span>next_word<span class="Delimiter">(</span>in<span class="Delimiter">));</span> + string s = next_word<span class="Delimiter">(</span>in<span class="Delimiter">);</span> + <span class="Normal">if</span> <span class="Delimiter">(</span>s<span class="Delimiter">.</span>empty<span class="Delimiter">())</span> <span class="Delimiter">{</span> + assert<span class="Delimiter">(</span>!has_data<span class="Delimiter">(</span>in<span class="Delimiter">));</span> + raise << <span class="Constant">"incomplete dilated reagent at end of file (0)</span><span class="cSpecial">\n</span><span class="Constant">"</span> << end<span class="Delimiter">();</span> + <span class="Identifier">return</span><span class="Delimiter">;</span> + <span class="Delimiter">}</span> + string_tree* type_names = <span class="Normal">new</span> string_tree<span class="Delimiter">(</span>s<span class="Delimiter">);</span> <span class="Comment">// End Parsing Dilated Reagent Type Property(type_names)</span> type = new_type_tree<span class="Delimiter">(</span>type_names<span class="Delimiter">);</span> <span class="Normal">delete</span> type_names<span class="Delimiter">;</span> @@ -153,7 +159,13 @@ string slurp_balanced_bracket<span class="Delimiter">(</span>istream& in<spa string key = slurp_key<span class="Delimiter">(</span>in<span class="Delimiter">);</span> <span class="Normal">if</span> <span class="Delimiter">(</span>key<span class="Delimiter">.</span>empty<span class="Delimiter">())</span> <span class="Identifier">continue</span><span class="Delimiter">;</span> <span class="Normal">if</span> <span class="Delimiter">(</span>key == <span class="Constant">"}"</span><span class="Delimiter">)</span> <span class="Identifier">continue</span><span class="Delimiter">;</span> - string_tree* value = <span class="Normal">new</span> string_tree<span class="Delimiter">(</span>next_word<span class="Delimiter">(</span>in<span class="Delimiter">));</span> + string s = next_word<span class="Delimiter">(</span>in<span class="Delimiter">);</span> + <span class="Normal">if</span> <span class="Delimiter">(</span>s<span class="Delimiter">.</span>empty<span class="Delimiter">())</span> <span class="Delimiter">{</span> + assert<span class="Delimiter">(</span>!has_data<span class="Delimiter">(</span>in<span class="Delimiter">));</span> + raise << <span class="Constant">"incomplete dilated reagent at end of file (1)</span><span class="cSpecial">\n</span><span class="Constant">"</span> << end<span class="Delimiter">();</span> + <span class="Identifier">return</span><span class="Delimiter">;</span> + <span class="Delimiter">}</span> + string_tree* value = <span class="Normal">new</span> string_tree<span class="Delimiter">(</span>s<span class="Delimiter">);</span> <span class="Comment">// End Parsing Dilated Reagent Property(value)</span> properties<span class="Delimiter">.</span>push_back<span class="Delimiter">(</span>pair<string<span class="Delimiter">,</span> string_tree*><span class="Delimiter">(</span>key<span class="Delimiter">,</span> value<span class="Delimiter">));</span> <span class="Delimiter">}</span> @@ -163,6 +175,11 @@ string slurp_balanced_bracket<span class="Delimiter">(</span>istream& in<spa <span class="Delimiter">:(code)</span> string slurp_key<span class="Delimiter">(</span>istream& in<span class="Delimiter">)</span> <span class="Delimiter">{</span> string result = next_word<span class="Delimiter">(</span>in<span class="Delimiter">);</span> + <span class="Normal">if</span> <span class="Delimiter">(</span>result<span class="Delimiter">.</span>empty<span class="Delimiter">())</span> <span class="Delimiter">{</span> + assert<span class="Delimiter">(</span>!has_data<span class="Delimiter">(</span>in<span class="Delimiter">));</span> + raise << <span class="Constant">"incomplete dilated reagent at end of file (2)</span><span class="cSpecial">\n</span><span class="Constant">"</span> << end<span class="Delimiter">();</span> + <span class="Identifier">return</span> result<span class="Delimiter">;</span> + <span class="Delimiter">}</span> <span class="Normal">while</span> <span class="Delimiter">(</span>!result<span class="Delimiter">.</span>empty<span class="Delimiter">()</span> && *result<span class="Delimiter">.</span>rbegin<span class="Delimiter">()</span> == <span class="Constant">':'</span><span class="Delimiter">)</span> strip_last<span class="Delimiter">(</span>result<span class="Delimiter">);</span> <span class="Normal">while</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>peek<span class="Delimiter">()</span> == <span class="Constant">':'</span><span class="Delimiter">)</span> diff --git a/html/017parse_tree.cc.html b/html/017parse_tree.cc.html index 0ff64fb1..6ffd509d 100644 --- a/html/017parse_tree.cc.html +++ b/html/017parse_tree.cc.html @@ -14,6 +14,7 @@ pre { white-space: pre-wrap; font-family: monospace; color: #eeeeee; background- body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color: #080808; } * { font-size: 12pt; font-size: 1em; } .Constant { color: #00a0a0; } +.cSpecial { color: #008000; } .muRecipe { color: #ff8700; } .Comment { color: #9090ff; } .Delimiter { color: #800080; } @@ -21,7 +22,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color .traceContains { color: #008000; } .Normal { color: #eeeeee; background-color: #080808; padding-bottom: 1px; } .muData { color: #ffff00; } -.Identifier { color: #fcb165; } +.Identifier { color: #ecf32c; } --> </style> @@ -81,7 +82,13 @@ string_tree* parse_string_tree<span class="Delimiter">(</span>istream& in<sp <span class="Identifier">return</span> <span class="Constant">NULL</span><span class="Delimiter">;</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> - string_tree* result = <span class="Normal">new</span> string_tree<span class="Delimiter">(</span>next_word<span class="Delimiter">(</span>in<span class="Delimiter">));</span> + string s = next_word<span class="Delimiter">(</span>in<span class="Delimiter">);</span> + <span class="Normal">if</span> <span class="Delimiter">(</span>s<span class="Delimiter">.</span>empty<span class="Delimiter">())</span> <span class="Delimiter">{</span> + assert<span class="Delimiter">(</span>!has_data<span class="Delimiter">(</span>in<span class="Delimiter">));</span> + raise << <span class="Constant">"incomplete string tree at end of file (0)</span><span class="cSpecial">\n</span><span class="Constant">"</span> << end<span class="Delimiter">();</span> + <span class="Identifier">return</span> <span class="Constant">NULL</span><span class="Delimiter">;</span> + <span class="Delimiter">}</span> + string_tree* result = <span class="Normal">new</span> string_tree<span class="Delimiter">(</span>s<span class="Delimiter">);</span> <span class="Identifier">return</span> result<span class="Delimiter">;</span> <span class="Delimiter">}</span> in<span class="Delimiter">.</span>get<span class="Delimiter">();</span> <span class="Comment">// skip '('</span> @@ -92,10 +99,18 @@ string_tree* parse_string_tree<span class="Delimiter">(</span>istream& in<sp assert<span class="Delimiter">(</span>has_data<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="Identifier">break</span><span class="Delimiter">;</span> *curr = <span class="Normal">new</span> string_tree<span class="Delimiter">(</span><span class="Constant">NULL</span><span class="Delimiter">,</span> <span class="Constant">NULL</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="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> <span class="Delimiter">(</span>*curr<span class="Delimiter">)-></span>left = parse_string_tree<span class="Delimiter">(</span>in<span class="Delimiter">);</span> - <span class="Normal">else</span> - <span class="Delimiter">(</span>*curr<span class="Delimiter">)-></span>left = <span class="Normal">new</span> string_tree<span class="Delimiter">(</span>next_word<span class="Delimiter">(</span>in<span class="Delimiter">));</span> + <span class="Delimiter">}</span> + <span class="Normal">else</span> <span class="Delimiter">{</span> + string s = next_word<span class="Delimiter">(</span>in<span class="Delimiter">);</span> + <span class="Normal">if</span> <span class="Delimiter">(</span>s<span class="Delimiter">.</span>empty<span class="Delimiter">())</span> <span class="Delimiter">{</span> + assert<span class="Delimiter">(</span>!has_data<span class="Delimiter">(</span>in<span class="Delimiter">));</span> + raise << <span class="Constant">"incomplete string tree at end of file (1)</span><span class="cSpecial">\n</span><span class="Constant">"</span> << end<span class="Delimiter">();</span> + <span class="Identifier">return</span> <span class="Constant">NULL</span><span class="Delimiter">;</span> + <span class="Delimiter">}</span> + <span class="Delimiter">(</span>*curr<span class="Delimiter">)-></span>left = <span class="Normal">new</span> string_tree<span class="Delimiter">(</span>s<span class="Delimiter">);</span> + <span class="Delimiter">}</span> curr = &<span class="Delimiter">(</span>*curr<span class="Delimiter">)-></span>right<span class="Delimiter">;</span> <span class="Delimiter">}</span> in<span class="Delimiter">.</span>get<span class="Delimiter">();</span> <span class="Comment">// skip ')'</span> diff --git a/html/018type_abbreviations.cc.html b/html/018type_abbreviations.cc.html index c0325c4d..b2550ec5 100644 --- a/html/018type_abbreviations.cc.html +++ b/html/018type_abbreviations.cc.html @@ -23,7 +23,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color .traceContains { color: #008000; } .Normal { color: #eeeeee; background-color: #080808; padding-bottom: 1px; } .Constant { color: #00a0a0; } -.Identifier { color: #fcb165; } +.Identifier { color: #ecf32c; } --> </style> diff --git a/html/020run.cc.html b/html/020run.cc.html index 437285aa..e138ac60 100644 --- a/html/020run.cc.html +++ b/html/020run.cc.html @@ -24,7 +24,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color .Comment { color: #9090ff; } .Constant { color: #00a0a0; } .Special { color: #c00000; } -.Identifier { color: #fcb165; } +.Identifier { color: #ecf32c; } .PreProc { color: #800080; } --> </style> diff --git a/html/021check_instruction.cc.html b/html/021check_instruction.cc.html index c6bd2575..d9f01d9b 100644 --- a/html/021check_instruction.cc.html +++ b/html/021check_instruction.cc.html @@ -20,7 +20,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color .Comment { color: #9090ff; } .Delimiter { color: #800080; } .cSpecial { color: #008000; } -.Identifier { color: #fcb165; } +.Identifier { color: #ecf32c; } .Normal { color: #eeeeee; background-color: #080808; padding-bottom: 1px; } --> </style> diff --git a/html/022arithmetic.cc.html b/html/022arithmetic.cc.html index 89d4d36e..3b0a9cac 100644 --- a/html/022arithmetic.cc.html +++ b/html/022arithmetic.cc.html @@ -20,7 +20,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color .Comment { color: #9090ff; } .Delimiter { color: #800080; } .cSpecial { color: #008000; } -.Identifier { color: #fcb165; } +.Identifier { color: #ecf32c; } .Normal { color: #eeeeee; background-color: #080808; padding-bottom: 1px; } .PreProc { color: #800080; } --> diff --git a/html/023boolean.cc.html b/html/023boolean.cc.html index d079cf29..b0b9f772 100644 --- a/html/023boolean.cc.html +++ b/html/023boolean.cc.html @@ -20,7 +20,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color .Comment { color: #9090ff; } .Delimiter { color: #800080; } .cSpecial { color: #008000; } -.Identifier { color: #fcb165; } +.Identifier { color: #ecf32c; } .Normal { color: #eeeeee; background-color: #080808; padding-bottom: 1px; } --> </style> diff --git a/html/024jump.cc.html b/html/024jump.cc.html index 077373b7..6ec34b93 100644 --- a/html/024jump.cc.html +++ b/html/024jump.cc.html @@ -22,7 +22,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color .Special { color: #c00000; } .traceContains { color: #008000; } .Normal { color: #eeeeee; background-color: #080808; padding-bottom: 1px; } -.Identifier { color: #fcb165; } +.Identifier { color: #ecf32c; } --> </style> diff --git a/html/025compare.cc.html b/html/025compare.cc.html index c2be1759..ad45045d 100644 --- a/html/025compare.cc.html +++ b/html/025compare.cc.html @@ -20,7 +20,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color .Comment { color: #9090ff; } .Delimiter { color: #800080; } .cSpecial { color: #008000; } -.Identifier { color: #fcb165; } +.Identifier { color: #ecf32c; } .Normal { color: #eeeeee; background-color: #080808; padding-bottom: 1px; } --> </style> diff --git a/html/026call.cc.html b/html/026call.cc.html index 4afc0186..6f21f765 100644 --- a/html/026call.cc.html +++ b/html/026call.cc.html @@ -22,7 +22,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color .Special { color: #c00000; } .traceContains { color: #008000; } .Normal { color: #eeeeee; background-color: #080808; padding-bottom: 1px; } -.Identifier { color: #fcb165; } +.Identifier { color: #ecf32c; } --> </style> diff --git a/html/027call_ingredient.cc.html b/html/027call_ingredient.cc.html index 7aa1cd97..2b15f95b 100644 --- a/html/027call_ingredient.cc.html +++ b/html/027call_ingredient.cc.html @@ -21,7 +21,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color .Special { color: #c00000; } .traceContains { color: #008000; } .Normal { color: #eeeeee; background-color: #080808; padding-bottom: 1px; } -.Identifier { color: #fcb165; } +.Identifier { color: #ecf32c; } --> </style> @@ -112,9 +112,7 @@ put<span class="Delimiter">(</span>Recipe_ordinal<span class="Delimiter">,</span <span class="Normal">if</span> <span class="Delimiter">(</span>current_instruction<span class="Delimiter">().</span>products<span class="Delimiter">.</span>empty<span class="Delimiter">())</span> <span class="Identifier">break</span><span class="Delimiter">;</span> products<span class="Delimiter">.</span>resize<span class="Delimiter">(</span><span class="Constant">2</span><span class="Delimiter">);</span> <span class="Comment">// pad the first product with sufficient zeros to match its type</span> - <span class="Normal">int</span> size = size_of<span class="Delimiter">(</span>current_instruction<span class="Delimiter">().</span>products<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><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 < size<span class="Delimiter">;</span> ++i<span class="Delimiter">)</span> - products<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">).</span>push_back<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">);</span> + products<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">).</span>resize<span class="Delimiter">(</span>size_of<span class="Delimiter">(</span>current_instruction<span class="Delimiter">().</span>products<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">)));</span> products<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">1</span><span class="Delimiter">).</span>push_back<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">);</span> <span class="Delimiter">}</span> <span class="Identifier">break</span><span class="Delimiter">;</span> diff --git a/html/028call_reply.cc.html b/html/028call_reply.cc.html index 867180e0..f764d5db 100644 --- a/html/028call_reply.cc.html +++ b/html/028call_reply.cc.html @@ -21,7 +21,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color .Special { color: #c00000; } .traceContains { color: #008000; } .Normal { color: #eeeeee; background-color: #080808; padding-bottom: 1px; } -.Identifier { color: #fcb165; } +.Identifier { color: #ecf32c; } --> </style> diff --git a/html/029tools.cc.html b/html/029tools.cc.html index 7af3acb9..5c9ba6b9 100644 --- a/html/029tools.cc.html +++ b/html/029tools.cc.html @@ -23,7 +23,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color .cSpecial { color: #008000; } .traceContains { color: #008000; } .Normal { color: #eeeeee; background-color: #080808; padding-bottom: 1px; } -.Identifier { color: #fcb165; } +.Identifier { color: #ecf32c; } --> </style> diff --git a/html/030container.cc.html b/html/030container.cc.html index abddc0aa..644f031e 100644 --- a/html/030container.cc.html +++ b/html/030container.cc.html @@ -24,7 +24,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color .traceContains { color: #008000; } .Normal { color: #eeeeee; background-color: #080808; padding-bottom: 1px; } .muData { color: #ffff00; } -.Identifier { color: #fcb165; } +.Identifier { color: #ecf32c; } --> </style> @@ -759,6 +759,11 @@ Num_calls_to_transform_all_at_first_definition = -<span class="Constant">1</span <span class="Normal">void</span> insert_container<span class="Delimiter">(</span><span class="Normal">const</span> string& command<span class="Delimiter">,</span> kind_of_type kind<span class="Delimiter">,</span> istream& in<span class="Delimiter">)</span> <span class="Delimiter">{</span> skip_whitespace_but_not_newline<span class="Delimiter">(</span>in<span class="Delimiter">);</span> string name = next_word<span class="Delimiter">(</span>in<span class="Delimiter">);</span> + <span class="Normal">if</span> <span class="Delimiter">(</span>name<span class="Delimiter">.</span>empty<span class="Delimiter">())</span> <span class="Delimiter">{</span> + assert<span class="Delimiter">(</span>!has_data<span class="Delimiter">(</span>in<span class="Delimiter">));</span> + raise << <span class="Constant">"incomplete container definition at end of file (0)</span><span class="cSpecial">\n</span><span class="Constant">"</span> << end<span class="Delimiter">();</span> + <span class="Identifier">return</span><span class="Delimiter">;</span> + <span class="Delimiter">}</span> <span class="Comment">// End container Name Refinements</span> trace<span class="Delimiter">(</span><span class="Constant">9991</span><span class="Delimiter">,</span> <span class="Constant">"parse"</span><span class="Delimiter">)</span> << <span class="Constant">"--- defining "</span> << command << <span class="Constant">' '</span> << name << end<span class="Delimiter">();</span> <span class="Normal">if</span> <span class="Delimiter">(</span>!contains_key<span class="Delimiter">(</span>Type_ordinal<span class="Delimiter">,</span> name<span class="Delimiter">)</span> @@ -782,6 +787,11 @@ Num_calls_to_transform_all_at_first_definition = -<span class="Constant">1</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> skip_whitespace_and_comments<span class="Delimiter">(</span>in<span class="Delimiter">);</span> string element = next_word<span class="Delimiter">(</span>in<span class="Delimiter">);</span> + <span class="Normal">if</span> <span class="Delimiter">(</span>element<span class="Delimiter">.</span>empty<span class="Delimiter">())</span> <span class="Delimiter">{</span> + assert<span class="Delimiter">(</span>!has_data<span class="Delimiter">(</span>in<span class="Delimiter">));</span> + raise << <span class="Constant">"incomplete container definition at end of file (1)</span><span class="cSpecial">\n</span><span class="Constant">"</span> << end<span class="Delimiter">();</span> + <span class="Identifier">return</span><span class="Delimiter">;</span> + <span class="Delimiter">}</span> <span class="Normal">if</span> <span class="Delimiter">(</span>element == <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>in<span class="Delimiter">.</span>peek<span class="Delimiter">()</span> != <span class="cSpecial">'\n'</span><span class="Delimiter">)</span> <span class="Delimiter">{</span> raise << command << <span class="Constant">" '"</span> << name << <span class="Constant">"' contains multiple elements on a single line. Containers and exclusive containers must only contain elements, one to a line, no code.</span><span class="cSpecial">\n</span><span class="Constant">"</span> << end<span class="Delimiter">();</span> diff --git a/html/031merge.cc.html b/html/031merge.cc.html index 6b39e164..f26edc7e 100644 --- a/html/031merge.cc.html +++ b/html/031merge.cc.html @@ -23,7 +23,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color .Normal { color: #eeeeee; background-color: #080808; padding-bottom: 1px; } .PreProc { color: #800080; } .Constant { color: #00a0a0; } -.Identifier { color: #fcb165; } +.Identifier { color: #ecf32c; } --> </style> diff --git a/html/032array.cc.html b/html/032array.cc.html index ecd99f8b..3d92149f 100644 --- a/html/032array.cc.html +++ b/html/032array.cc.html @@ -23,7 +23,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color .traceContains { color: #008000; } .Normal { color: #eeeeee; background-color: #080808; padding-bottom: 1px; } .muData { color: #ffff00; } -.Identifier { color: #fcb165; } +.Identifier { color: #ecf32c; } --> </style> diff --git a/html/033exclusive_container.cc.html b/html/033exclusive_container.cc.html index 1f8849e3..bb1ebd85 100644 --- a/html/033exclusive_container.cc.html +++ b/html/033exclusive_container.cc.html @@ -23,7 +23,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color .traceContains { color: #008000; } .Normal { color: #eeeeee; background-color: #080808; padding-bottom: 1px; } .muData { color: #ffff00; } -.Identifier { color: #fcb165; } +.Identifier { color: #ecf32c; } --> </style> diff --git a/html/034address.cc.html b/html/034address.cc.html index d27f79e9..6ddedbe8 100644 --- a/html/034address.cc.html +++ b/html/034address.cc.html @@ -22,7 +22,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color .Special { color: #c00000; } .traceContains { color: #008000; } .Normal { color: #eeeeee; background-color: #080808; padding-bottom: 1px; } -.Identifier { color: #fcb165; } +.Identifier { color: #ecf32c; } --> </style> diff --git a/html/035lookup.cc.html b/html/035lookup.cc.html index 22b62af4..c654b1f0 100644 --- a/html/035lookup.cc.html +++ b/html/035lookup.cc.html @@ -23,7 +23,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color .Special { color: #c00000; } .traceContains { color: #008000; } .Normal { color: #eeeeee; background-color: #080808; padding-bottom: 1px; } -.Identifier { color: #fcb165; } +.Identifier { color: #ecf32c; } --> </style> diff --git a/html/036refcount.cc.html b/html/036refcount.cc.html index 7edfe3f9..e9970c4b 100644 --- a/html/036refcount.cc.html +++ b/html/036refcount.cc.html @@ -23,7 +23,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color .traceContains { color: #008000; } .Normal { color: #eeeeee; background-color: #080808; padding-bottom: 1px; } .muData { color: #ffff00; } -.Identifier { color: #fcb165; } +.Identifier { color: #ecf32c; } .SalientComment { color: #00ffff; } --> </style> diff --git a/html/037abandon.cc.html b/html/037abandon.cc.html index b3f955ff..e73ca70d 100644 --- a/html/037abandon.cc.html +++ b/html/037abandon.cc.html @@ -23,7 +23,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color .Normal { color: #eeeeee; background-color: #080808; padding-bottom: 1px; } .muData { color: #ffff00; } .CommentedCode { color: #6c6c6c; } -.Identifier { color: #fcb165; } +.Identifier { color: #ecf32c; } --> </style> diff --git a/html/038new_text.cc.html b/html/038new_text.cc.html index 4c3a8461..d7ed1415 100644 --- a/html/038new_text.cc.html +++ b/html/038new_text.cc.html @@ -21,7 +21,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color .Special { color: #c00000; } .traceContains { color: #008000; } .Normal { color: #eeeeee; background-color: #080808; padding-bottom: 1px; } -.Identifier { color: #fcb165; } +.Identifier { color: #ecf32c; } --> </style> diff --git a/html/039location_array.cc.html b/html/039location_array.cc.html index 94aec343..f9504a09 100644 --- a/html/039location_array.cc.html +++ b/html/039location_array.cc.html @@ -16,7 +16,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color .Constant { color: #00a0a0; } .cSpecial { color: #008000; } .Delimiter { color: #800080; } -.Identifier { color: #fcb165; } +.Identifier { color: #ecf32c; } .Normal { color: #eeeeee; background-color: #080808; padding-bottom: 1px; } .Comment { color: #9090ff; } --> diff --git a/html/040brace.cc.html b/html/040brace.cc.html index 2ef1dfb1..405c2d57 100644 --- a/html/040brace.cc.html +++ b/html/040brace.cc.html @@ -20,7 +20,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color .Comment { color: #9090ff; } .Delimiter { color: #800080; } .Special { color: #c00000; } -.Identifier { color: #fcb165; } +.Identifier { color: #ecf32c; } .Normal { color: #eeeeee; background-color: #080808; padding-bottom: 1px; } --> </style> diff --git a/html/041jump_target.cc.html b/html/041jump_target.cc.html index d0b2b3aa..8904671c 100644 --- a/html/041jump_target.cc.html +++ b/html/041jump_target.cc.html @@ -21,7 +21,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color .Comment { color: #9090ff; } .Delimiter { color: #800080; } .Special { color: #c00000; } -.Identifier { color: #fcb165; } +.Identifier { color: #ecf32c; } .Normal { color: #eeeeee; background-color: #080808; padding-bottom: 1px; } --> </style> diff --git a/html/042name.cc.html b/html/042name.cc.html index bcb4993e..9fe6b220 100644 --- a/html/042name.cc.html +++ b/html/042name.cc.html @@ -23,7 +23,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color .Special { color: #c00000; } .traceContains { color: #008000; } .Normal { color: #eeeeee; background-color: #080808; padding-bottom: 1px; } -.Identifier { color: #fcb165; } +.Identifier { color: #ecf32c; } --> </style> diff --git a/html/043space.cc.html b/html/043space.cc.html index 95448e34..be17cf77 100644 --- a/html/043space.cc.html +++ b/html/043space.cc.html @@ -24,7 +24,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color .traceContains { color: #008000; } .Normal { color: #eeeeee; background-color: #080808; padding-bottom: 1px; } .muData { color: #ffff00; } -.Identifier { color: #fcb165; } +.Identifier { color: #ecf32c; } --> </style> diff --git a/html/044space_surround.cc.html b/html/044space_surround.cc.html index bc05a6d5..2a246ae6 100644 --- a/html/044space_surround.cc.html +++ b/html/044space_surround.cc.html @@ -21,7 +21,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color .Special { color: #c00000; } .traceContains { color: #008000; } .Normal { color: #eeeeee; background-color: #080808; padding-bottom: 1px; } -.Identifier { color: #fcb165; } +.Identifier { color: #ecf32c; } --> </style> diff --git a/html/045closure_name.cc.html b/html/045closure_name.cc.html index cb7cf32a..5876b712 100644 --- a/html/045closure_name.cc.html +++ b/html/045closure_name.cc.html @@ -20,7 +20,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color .Comment { color: #9090ff; } .Delimiter { color: #800080; } .Special { color: #c00000; } -.Identifier { color: #fcb165; } +.Identifier { color: #ecf32c; } .Normal { color: #eeeeee; background-color: #080808; padding-bottom: 1px; } --> </style> diff --git a/html/046global.cc.html b/html/046global.cc.html index 4bae44f9..df109cd5 100644 --- a/html/046global.cc.html +++ b/html/046global.cc.html @@ -21,7 +21,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color .Special { color: #c00000; } .traceContains { color: #008000; } .Normal { color: #eeeeee; background-color: #080808; padding-bottom: 1px; } -.Identifier { color: #fcb165; } +.Identifier { color: #ecf32c; } --> </style> diff --git a/html/047check_type_by_name.cc.html b/html/047check_type_by_name.cc.html index db280f49..e769674e 100644 --- a/html/047check_type_by_name.cc.html +++ b/html/047check_type_by_name.cc.html @@ -21,7 +21,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color .Special { color: #c00000; } .traceContains { color: #008000; } .Normal { color: #eeeeee; background-color: #080808; padding-bottom: 1px; } -.Identifier { color: #fcb165; } +.Identifier { color: #ecf32c; } --> </style> diff --git a/html/050scenario.cc.html b/html/050scenario.cc.html index 274d846f..337bf0a7 100644 --- a/html/050scenario.cc.html +++ b/html/050scenario.cc.html @@ -25,7 +25,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color .Comment { color: #9090ff; } .Constant { color: #00a0a0; } .Special { color: #c00000; } -.Identifier { color: #fcb165; } +.Identifier { color: #ecf32c; } --> </style> @@ -117,6 +117,11 @@ vector<scenario> Scenarios<span class="Delimiter">;</span> <span class="muScenario">scenario</span> parse_scenario<span class="Delimiter">(</span>istream& in<span class="Delimiter">)</span> <span class="Delimiter">{</span> scenario result<span class="Delimiter">;</span> result<span class="Delimiter">.</span>name = next_word<span class="Delimiter">(</span>in<span class="Delimiter">);</span> + <span class="Normal">if</span> <span class="Delimiter">(</span>result<span class="Delimiter">.</span>name<span class="Delimiter">.</span>empty<span class="Delimiter">())</span> <span class="Delimiter">{</span> + assert<span class="Delimiter">(</span>!has_data<span class="Delimiter">(</span>in<span class="Delimiter">));</span> + raise << <span class="Constant">"incomplete scenario at end of file</span><span class="cSpecial">\n</span><span class="Constant">"</span> << end<span class="Delimiter">();</span> + <span class="Identifier">return</span> result<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> raise << <span class="Constant">"Expected '[' after scenario '"</span> << result<span class="Delimiter">.</span>name << <span class="Constant">"'</span><span class="cSpecial">\n</span><span class="Constant">"</span> << end<span class="Delimiter">();</span> @@ -217,11 +222,9 @@ Hide_missing_default_space_errors = <span class="Constant">false</span><span cla bind_special_scenario_names<span class="Delimiter">(</span>tmp<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">));</span> transform_all<span class="Delimiter">();</span> run<span class="Delimiter">(</span>tmp<span class="Delimiter">.</span>front<span class="Delimiter">());</span> - <span class="Normal">if</span> <span class="Delimiter">(</span>!Hide_errors && trace_count<span class="Delimiter">(</span><span class="Constant">"error"</span><span class="Delimiter">)</span> > <span class="Constant">0</span><span class="Delimiter">)</span> - Passed = <span class="Constant">false</span><span class="Delimiter">;</span> <span class="Comment">// End Mu Test Teardown</span> - <span class="Normal">if</span> <span class="Delimiter">(</span>!Passed<span class="Delimiter">)</span> - ++Num_failures<span class="Delimiter">;</span> + <span class="Normal">if</span> <span class="Delimiter">(</span>!Hide_errors && trace_count<span class="Delimiter">(</span><span class="Constant">"error"</span><span class="Delimiter">)</span> > <span class="Constant">0</span> && !Scenario_testing_scenario<span class="Delimiter">)</span> + Passed = <span class="Constant">false</span><span class="Delimiter">;</span> <span class="Normal">if</span> <span class="Delimiter">(</span>not_already_inside_test && Trace_stream<span class="Delimiter">)</span> <span class="Delimiter">{</span> teardown<span class="Delimiter">();</span> <span class="Normal">if</span> <span class="Delimiter">(</span>Save_trace<span class="Delimiter">)</span> <span class="Delimiter">{</span> @@ -370,6 +373,11 @@ put<span class="Delimiter">(</span>Recipe_ordinal<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 lhs = next_word<span class="Delimiter">(</span>in<span class="Delimiter">);</span> + <span class="Normal">if</span> <span class="Delimiter">(</span>lhs<span class="Delimiter">.</span>empty<span class="Delimiter">())</span> <span class="Delimiter">{</span> + assert<span class="Delimiter">(</span>!has_data<span class="Delimiter">(</span>in<span class="Delimiter">));</span> + raise << <span class="Constant">"incomplete 'memory-should-contain' block at end of file (0)</span><span class="cSpecial">\n</span><span class="Constant">"</span> << end<span class="Delimiter">();</span> + <span class="Identifier">return</span><span class="Delimiter">;</span> + <span class="Delimiter">}</span> <span class="Normal">if</span> <span class="Delimiter">(</span>!is_integer<span class="Delimiter">(</span>lhs<span class="Delimiter">))</span> <span class="Delimiter">{</span> check_type<span class="Delimiter">(</span>lhs<span class="Delimiter">,</span> in<span class="Delimiter">);</span> <span class="Identifier">continue</span><span class="Delimiter">;</span> @@ -379,6 +387,11 @@ put<span class="Delimiter">(</span>Recipe_ordinal<span class="Delimiter">,</span string _assign<span class="Delimiter">;</span> in >> _assign<span class="Delimiter">;</span> assert<span class="Delimiter">(</span>_assign == <span class="Constant">"<-"</span><span class="Delimiter">);</span> skip_whitespace_and_comments<span class="Delimiter">(</span>in<span class="Delimiter">);</span> string rhs = next_word<span class="Delimiter">(</span>in<span class="Delimiter">);</span> + <span class="Normal">if</span> <span class="Delimiter">(</span>rhs<span class="Delimiter">.</span>empty<span class="Delimiter">())</span> <span class="Delimiter">{</span> + assert<span class="Delimiter">(</span>!has_data<span class="Delimiter">(</span>in<span class="Delimiter">));</span> + raise << <span class="Constant">"incomplete 'memory-should-contain' block at end of file (1)</span><span class="cSpecial">\n</span><span class="Constant">"</span> << end<span class="Delimiter">();</span> + <span class="Identifier">return</span><span class="Delimiter">;</span> + <span class="Delimiter">}</span> <span class="Normal">if</span> <span class="Delimiter">(</span>!is_integer<span class="Delimiter">(</span>rhs<span class="Delimiter">)</span> && !is_noninteger<span class="Delimiter">(</span>rhs<span class="Delimiter">))</span> <span class="Delimiter">{</span> <span class="Normal">if</span> <span class="Delimiter">(</span>Current_scenario && !Scenario_testing_scenario<span class="Delimiter">)</span> <span class="Comment">// genuine test in a mu file</span> @@ -415,9 +428,19 @@ put<span class="Delimiter">(</span>Recipe_ordinal<span class="Delimiter">,</span x<span class="Delimiter">.</span>set_value<span class="Delimiter">(</span>to_integer<span class="Delimiter">(</span>x<span class="Delimiter">.</span>name<span class="Delimiter">));</span> skip_whitespace_and_comments<span class="Delimiter">(</span>in<span class="Delimiter">);</span> string _assign = next_word<span class="Delimiter">(</span>in<span class="Delimiter">);</span> + <span class="Normal">if</span> <span class="Delimiter">(</span>_assign<span class="Delimiter">.</span>empty<span class="Delimiter">())</span> <span class="Delimiter">{</span> + assert<span class="Delimiter">(</span>!has_data<span class="Delimiter">(</span>in<span class="Delimiter">));</span> + raise << <span class="Constant">"incomplete 'memory-should-contain' block at end of file (2)</span><span class="cSpecial">\n</span><span class="Constant">"</span> << end<span class="Delimiter">();</span> + <span class="Identifier">return</span><span class="Delimiter">;</span> + <span class="Delimiter">}</span> assert<span class="Delimiter">(</span>_assign == <span class="Constant">"<-"</span><span class="Delimiter">);</span> skip_whitespace_and_comments<span class="Delimiter">(</span>in<span class="Delimiter">);</span> string literal = next_word<span class="Delimiter">(</span>in<span class="Delimiter">);</span> + <span class="Normal">if</span> <span class="Delimiter">(</span>literal<span class="Delimiter">.</span>empty<span class="Delimiter">())</span> <span class="Delimiter">{</span> + assert<span class="Delimiter">(</span>!has_data<span class="Delimiter">(</span>in<span class="Delimiter">));</span> + raise << <span class="Constant">"incomplete 'memory-should-contain' block at end of file (3)</span><span class="cSpecial">\n</span><span class="Constant">"</span> << end<span class="Delimiter">();</span> + <span class="Identifier">return</span><span class="Delimiter">;</span> + <span class="Delimiter">}</span> <span class="Normal">int</span> address = x<span class="Delimiter">.</span>value<span class="Delimiter">;</span> <span class="Comment">// exclude quoting brackets</span> assert<span class="Delimiter">(</span>*literal<span class="Delimiter">.</span>begin<span class="Delimiter">()</span> == <span class="Constant">'['</span><span class="Delimiter">);</span> literal<span class="Delimiter">.</span>erase<span class="Delimiter">(</span>literal<span class="Delimiter">.</span>begin<span class="Delimiter">());</span> @@ -572,7 +595,7 @@ put<span class="Delimiter">(</span>Recipe_ordinal<span class="Delimiter">,</span << <span class="Constant">"in trace with label '"</span> << expected_lines<span class="Delimiter">.</span>at<span class="Delimiter">(</span>curr_expected_line<span class="Delimiter">).</span>label << <span class="Constant">"'</span><span class="cSpecial">\n</span><span class="Constant">"</span> << end<span class="Delimiter">();</span> <span class="Normal">if</span> <span class="Delimiter">(</span>!Hide_errors<span class="Delimiter">)</span> DUMP<span class="Delimiter">(</span>expected_lines<span class="Delimiter">.</span>at<span class="Delimiter">(</span>curr_expected_line<span class="Delimiter">).</span>label<span class="Delimiter">);</span> - Passed = <span class="Constant">false</span><span class="Delimiter">;</span> + <span class="Normal">if</span> <span class="Delimiter">(</span>!Scenario_testing_scenario<span class="Delimiter">)</span> Passed = <span class="Constant">false</span><span class="Delimiter">;</span> <span class="Delimiter">}</span> vector<trace_line> parse_trace<span class="Delimiter">(</span><span class="Normal">const</span> string& expected<span class="Delimiter">)</span> <span class="Delimiter">{</span> @@ -660,7 +683,7 @@ put<span class="Delimiter">(</span>Recipe_ordinal<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 < SIZE<span class="Delimiter">(</span>lines<span class="Delimiter">);</span> ++i<span class="Delimiter">)</span> <span class="Delimiter">{</span> <span class="Normal">if</span> <span class="Delimiter">(</span>trace_count<span class="Delimiter">(</span>lines<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">).</span>label<span class="Delimiter">,</span> lines<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">).</span>contents<span class="Delimiter">)</span> != <span class="Constant">0</span><span class="Delimiter">)</span> <span class="Delimiter">{</span> raise << <span class="Constant">"unexpected ["</span> << lines<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">).</span>contents << <span class="Constant">"] in trace with label '"</span> << lines<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">).</span>label << <span class="Constant">"'</span><span class="cSpecial">\n</span><span class="Constant">"</span> << end<span class="Delimiter">();</span> - Passed = <span class="Constant">false</span><span class="Delimiter">;</span> + <span class="Normal">if</span> <span class="Delimiter">(</span>!Scenario_testing_scenario<span class="Delimiter">)</span> Passed = <span class="Constant">false</span><span class="Delimiter">;</span> <span class="Identifier">return</span> <span class="Constant">false</span><span class="Delimiter">;</span> <span class="Delimiter">}</span> <span class="Delimiter">}</span> @@ -791,6 +814,11 @@ is_autogenerated = <span class="Constant">false</span><span class="Delimiter">;< in >> std::noskipws<span class="Delimiter">;</span> skip_whitespace_and_comments<span class="Delimiter">(</span>in<span class="Delimiter">);</span> string _scenario = next_word<span class="Delimiter">(</span>in<span class="Delimiter">);</span> + <span class="Normal">if</span> <span class="Delimiter">(</span>_scenario<span class="Delimiter">.</span>empty<span class="Delimiter">())</span> <span class="Delimiter">{</span> + assert<span class="Delimiter">(</span>!has_data<span class="Delimiter">(</span>in<span class="Delimiter">));</span> + raise << <span class="Constant">"no scenario in string passed into run_mu_scenario()</span><span class="cSpecial">\n</span><span class="Constant">"</span> << end<span class="Delimiter">();</span> + <span class="Identifier">return</span><span class="Delimiter">;</span> + <span class="Delimiter">}</span> assert<span class="Delimiter">(</span>_scenario == <span class="Constant">"scenario"</span><span class="Delimiter">);</span> scenario s = parse_scenario<span class="Delimiter">(</span>in<span class="Delimiter">);</span> run_mu_scenario<span class="Delimiter">(</span>s<span class="Delimiter">);</span> diff --git a/html/052tangle.cc.html b/html/052tangle.cc.html index a589bff5..498d1c2e 100644 --- a/html/052tangle.cc.html +++ b/html/052tangle.cc.html @@ -22,7 +22,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color .Special { color: #c00000; } .traceContains { color: #008000; } .Normal { color: #eeeeee; background-color: #080808; padding-bottom: 1px; } -.Identifier { color: #fcb165; } +.Identifier { color: #ecf32c; } --> </style> @@ -70,6 +70,11 @@ Fragments_used<span class="Delimiter">.</span>clear<span class="Delimiter">();</ <span class="Delimiter">:(before "End Command Handlers")</span> <span class="Normal">else</span> <span class="Normal">if</span> <span class="Delimiter">(</span>command == <span class="Constant">"before"</span><span class="Delimiter">)</span> <span class="Delimiter">{</span> string label = next_word<span class="Delimiter">(</span>in<span class="Delimiter">);</span> + <span class="Normal">if</span> <span class="Delimiter">(</span>label<span class="Delimiter">.</span>empty<span class="Delimiter">())</span> <span class="Delimiter">{</span> + assert<span class="Delimiter">(</span>!has_data<span class="Delimiter">(</span>in<span class="Delimiter">));</span> + raise << <span class="Constant">"incomplete 'before' block at end of file</span><span class="cSpecial">\n</span><span class="Constant">"</span> << end<span class="Delimiter">();</span> + <span class="Identifier">return</span> result<span class="Delimiter">;</span> + <span class="Delimiter">}</span> recipe tmp<span class="Delimiter">;</span> slurp_body<span class="Delimiter">(</span>in<span class="Delimiter">,</span> tmp<span class="Delimiter">);</span> <span class="Normal">if</span> <span class="Delimiter">(</span>is_waypoint<span class="Delimiter">(</span>label<span class="Delimiter">))</span> @@ -80,6 +85,11 @@ Fragments_used<span class="Delimiter">.</span>clear<span class="Delimiter">();</ <span class="Delimiter">}</span> <span class="Normal">else</span> <span class="Normal">if</span> <span class="Delimiter">(</span>command == <span class="Constant">"after"</span><span class="Delimiter">)</span> <span class="Delimiter">{</span> string label = next_word<span class="Delimiter">(</span>in<span class="Delimiter">);</span> + <span class="Normal">if</span> <span class="Delimiter">(</span>label<span class="Delimiter">.</span>empty<span class="Delimiter">())</span> <span class="Delimiter">{</span> + assert<span class="Delimiter">(</span>!has_data<span class="Delimiter">(</span>in<span class="Delimiter">));</span> + raise << <span class="Constant">"incomplete 'after' block at end of file</span><span class="cSpecial">\n</span><span class="Constant">"</span> << end<span class="Delimiter">();</span> + <span class="Identifier">return</span> result<span class="Delimiter">;</span> + <span class="Delimiter">}</span> recipe tmp<span class="Delimiter">;</span> slurp_body<span class="Delimiter">(</span>in<span class="Delimiter">,</span> tmp<span class="Delimiter">);</span> <span class="Normal">if</span> <span class="Delimiter">(</span>is_waypoint<span class="Delimiter">(</span>label<span class="Delimiter">))</span> diff --git a/html/053recipe_header.cc.html b/html/053recipe_header.cc.html index 5e9a957c..cce0a02f 100644 --- a/html/053recipe_header.cc.html +++ b/html/053recipe_header.cc.html @@ -21,7 +21,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color .Comment { color: #9090ff; } .Delimiter { color: #800080; } .Special { color: #c00000; } -.Identifier { color: #fcb165; } +.Identifier { color: #ecf32c; } .Normal { color: #eeeeee; background-color: #080808; padding-bottom: 1px; } .Error { color: #ffffff; background-color: #ff6060; padding-bottom: 1px; } .SalientComment { color: #00ffff; } @@ -71,6 +71,11 @@ has_header = <span class="Constant">false</span><span class="Delimiter">;</span> result<span class="Delimiter">.</span>has_header = <span class="Constant">true</span><span class="Delimiter">;</span> <span class="Normal">while</span> <span class="Delimiter">(</span>has_data<span class="Delimiter">(</span>in<span class="Delimiter">)</span> && in<span class="Delimiter">.</span>peek<span class="Delimiter">()</span> != <span class="Constant">'['</span> && in<span class="Delimiter">.</span>peek<span class="Delimiter">()</span> != <span class="cSpecial">'\n'</span><span class="Delimiter">)</span> <span class="Delimiter">{</span> string s = next_word<span class="Delimiter">(</span>in<span class="Delimiter">);</span> + <span class="Normal">if</span> <span class="Delimiter">(</span>s<span class="Delimiter">.</span>empty<span class="Delimiter">())</span> <span class="Delimiter">{</span> + assert<span class="Delimiter">(</span>!has_data<span class="Delimiter">(</span>in<span class="Delimiter">));</span> + raise << <span class="Constant">"incomplete recipe header at end of file (0)</span><span class="cSpecial">\n</span><span class="Constant">"</span> << end<span class="Delimiter">();</span> + <span class="Identifier">return</span><span class="Delimiter">;</span> + <span class="Delimiter">}</span> <span class="Normal">if</span> <span class="Delimiter">(</span>s == <span class="Constant">"<-"</span><span class="Delimiter">)</span> raise << <span class="Constant">"recipe "</span> << result<span class="Delimiter">.</span>name << <span class="Constant">" should say '->' and not '<-'</span><span class="cSpecial">\n</span><span class="Constant">"</span> << end<span class="Delimiter">();</span> <span class="Normal">if</span> <span class="Delimiter">(</span>s == <span class="Constant">"->"</span><span class="Delimiter">)</span> <span class="Identifier">break</span><span class="Delimiter">;</span> @@ -80,6 +85,11 @@ has_header = <span class="Constant">false</span><span class="Delimiter">;</span> <span class="Delimiter">}</span> <span class="Normal">while</span> <span class="Delimiter">(</span>has_data<span class="Delimiter">(</span>in<span class="Delimiter">)</span> && in<span class="Delimiter">.</span>peek<span class="Delimiter">()</span> != <span class="Constant">'['</span> && in<span class="Delimiter">.</span>peek<span class="Delimiter">()</span> != <span class="cSpecial">'\n'</span><span class="Delimiter">)</span> <span class="Delimiter">{</span> string s = next_word<span class="Delimiter">(</span>in<span class="Delimiter">);</span> + <span class="Normal">if</span> <span class="Delimiter">(</span>s<span class="Delimiter">.</span>empty<span class="Delimiter">())</span> <span class="Delimiter">{</span> + assert<span class="Delimiter">(</span>!has_data<span class="Delimiter">(</span>in<span class="Delimiter">));</span> + raise << <span class="Constant">"incomplete recipe header at end of file (1)</span><span class="cSpecial">\n</span><span class="Constant">"</span> << end<span class="Delimiter">();</span> + <span class="Identifier">return</span><span class="Delimiter">;</span> + <span class="Delimiter">}</span> result<span class="Delimiter">.</span>products<span class="Delimiter">.</span>push_back<span class="Delimiter">(</span>reagent<span class="Delimiter">(</span>s<span class="Delimiter">));</span> trace<span class="Delimiter">(</span><span class="Constant">9999</span><span class="Delimiter">,</span> <span class="Constant">"parse"</span><span class="Delimiter">)</span> << <span class="Constant">"header product: "</span> << result<span class="Delimiter">.</span>products<span class="Delimiter">.</span>back<span class="Delimiter">().</span>original_string << end<span class="Delimiter">();</span> skip_whitespace_but_not_newline<span class="Delimiter">(</span>in<span class="Delimiter">);</span> @@ -242,9 +252,7 @@ put<span class="Delimiter">(</span>Recipe_ordinal<span class="Delimiter">,</span <span class="Normal">else</span> <span class="Delimiter">{</span> products<span class="Delimiter">.</span>resize<span class="Delimiter">(</span><span class="Constant">2</span><span class="Delimiter">);</span> <span class="Comment">// pad the first product with sufficient zeros to match its type</span> - <span class="Normal">int</span> size = size_of<span class="Delimiter">(</span>current_instruction<span class="Delimiter">().</span>products<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><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 < size<span class="Delimiter">;</span> ++i<span class="Delimiter">)</span> - products<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">).</span>push_back<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">);</span> + products<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">).</span>resize<span class="Delimiter">(</span>size_of<span class="Delimiter">(</span>current_instruction<span class="Delimiter">().</span>products<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">)));</span> products<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">1</span><span class="Delimiter">).</span>push_back<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">);</span> <span class="Delimiter">}</span> <span class="Identifier">break</span><span class="Delimiter">;</span> diff --git a/html/054static_dispatch.cc.html b/html/054static_dispatch.cc.html index 32548869..5b3c52b9 100644 --- a/html/054static_dispatch.cc.html +++ b/html/054static_dispatch.cc.html @@ -23,7 +23,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color .traceContains { color: #008000; } .Normal { color: #eeeeee; background-color: #080808; padding-bottom: 1px; } .muData { color: #ffff00; } -.Identifier { color: #fcb165; } +.Identifier { color: #ecf32c; } --> </style> diff --git a/html/055shape_shifting_container.cc.html b/html/055shape_shifting_container.cc.html index a0c82477..7721fc45 100644 --- a/html/055shape_shifting_container.cc.html +++ b/html/055shape_shifting_container.cc.html @@ -20,7 +20,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color .Comment { color: #9090ff; } .Delimiter { color: #800080; } .SalientComment { color: #00ffff; } -.Identifier { color: #fcb165; } +.Identifier { color: #ecf32c; } .Normal { color: #eeeeee; background-color: #080808; padding-bottom: 1px; } .CommentedCode { color: #6c6c6c; } .Constant { color: #00a0a0; } diff --git a/html/056shape_shifting_recipe.cc.html b/html/056shape_shifting_recipe.cc.html index aa527a1d..f5ea7e02 100644 --- a/html/056shape_shifting_recipe.cc.html +++ b/html/056shape_shifting_recipe.cc.html @@ -24,7 +24,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color .Comment { color: #9090ff; } .Constant { color: #00a0a0; } .Special { color: #c00000; } -.Identifier { color: #fcb165; } +.Identifier { color: #ecf32c; } .PreProc { color: #800080; } --> </style> diff --git a/html/057immutable.cc.html b/html/057immutable.cc.html index 5cb35f7b..366589f3 100644 --- a/html/057immutable.cc.html +++ b/html/057immutable.cc.html @@ -23,7 +23,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color .traceContains { color: #008000; } .Normal { color: #eeeeee; background-color: #080808; padding-bottom: 1px; } .muData { color: #ffff00; } -.Identifier { color: #fcb165; } +.Identifier { color: #ecf32c; } --> </style> diff --git a/html/058to_text.cc.html b/html/058to_text.cc.html index 33fb6060..3f4efc85 100644 --- a/html/058to_text.cc.html +++ b/html/058to_text.cc.html @@ -17,7 +17,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color .Comment { color: #9090ff; } .Delimiter { color: #800080; } .cSpecial { color: #008000; } -.Identifier { color: #fcb165; } +.Identifier { color: #ecf32c; } .Normal { color: #eeeeee; background-color: #080808; padding-bottom: 1px; } --> </style> diff --git a/html/060rewrite_literal_string.cc.html b/html/060rewrite_literal_string.cc.html index 04e4965c..9e6b1cf1 100644 --- a/html/060rewrite_literal_string.cc.html +++ b/html/060rewrite_literal_string.cc.html @@ -20,7 +20,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color .Special { color: #c00000; } .traceContains { color: #008000; } .Normal { color: #eeeeee; background-color: #080808; padding-bottom: 1px; } -.Identifier { color: #fcb165; } +.Identifier { color: #ecf32c; } --> </style> diff --git a/html/062convert_ingredients_to_text.cc.html b/html/062convert_ingredients_to_text.cc.html index 8653cbf6..05f4a760 100644 --- a/html/062convert_ingredients_to_text.cc.html +++ b/html/062convert_ingredients_to_text.cc.html @@ -21,7 +21,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color .traceContains { color: #008000; } .Normal { color: #eeeeee; background-color: #080808; padding-bottom: 1px; } .muData { color: #ffff00; } -.Identifier { color: #fcb165; } +.Identifier { color: #ecf32c; } --> </style> diff --git a/html/067random.cc.html b/html/067random.cc.html index 6eaca039..963db65a 100644 --- a/html/067random.cc.html +++ b/html/067random.cc.html @@ -16,7 +16,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color .Constant { color: #00a0a0; } .Comment { color: #9090ff; } .Delimiter { color: #800080; } -.Identifier { color: #fcb165; } +.Identifier { color: #ecf32c; } .Normal { color: #eeeeee; background-color: #080808; padding-bottom: 1px; } --> </style> @@ -59,6 +59,10 @@ put<span class="Delimiter">(</span>Recipe_ordinal<span class="Delimiter">,</span srand<span class="Delimiter">(</span>time<span class="Delimiter">(</span><span class="Constant">NULL</span><span class="Delimiter">));</span> <span class="Identifier">break</span><span class="Delimiter">;</span> <span class="Delimiter">}</span> + +<span class="Comment">// undo non-determinism in later tests</span> +<span class="Delimiter">:(before "End Setup")</span> +srand<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">);</span> </pre> </body> </html> diff --git a/html/068random.mu.html b/html/068random.mu.html index 52707f10..20b26659 100644 --- a/html/068random.mu.html +++ b/html/068random.mu.html @@ -86,6 +86,25 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color <span class="Constant">8</span><span class="Special"> <- </span><span class="Constant">1</span> <span class="Comment"># end of stream</span> ] ] + +<span class="muRecipe">def</span> random-in-range generator:&:stream:num, start:num, end:num<span class="muRecipe"> -> </span>result:num, fail?:bool, generator:&:stream:num [ + <span class="Constant">local-scope</span> + <span class="Constant">load-ingredients</span> + result, fail?, generator<span class="Special"> <- </span>random generator + <span class="muControl">return-if</span> fail? + delta:num<span class="Special"> <- </span>subtract end, start + _, result<span class="Special"> <- </span>divide-with-remainder result, delta + result<span class="Special"> <- </span>add result, start +] + +<span class="muScenario">scenario</span> random-in-range [ + <span class="Constant">local-scope</span> + source:&:stream:num<span class="Special"> <- </span>assume-random-numbers <span class="Constant">91</span> + <span class="Constant">1</span>:num/<span class="Special">raw <- </span>random-in-range source, <span class="Constant">40</span>, <span class="Constant">50</span> + memory-should-contain [ + <span class="Constant">1</span><span class="Special"> <- </span><span class="Constant">41</span> + ] +] </pre> </body> </html> diff --git a/html/069hash.cc.html b/html/069hash.cc.html index b86928bb..d0dd445c 100644 --- a/html/069hash.cc.html +++ b/html/069hash.cc.html @@ -20,7 +20,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color .Comment { color: #9090ff; } .Delimiter { color: #800080; } .cSpecial { color: #008000; } -.Identifier { color: #fcb165; } +.Identifier { color: #ecf32c; } .Normal { color: #eeeeee; background-color: #080808; padding-bottom: 1px; } .muData { color: #ffff00; } .CommentedCode { color: #6c6c6c; } diff --git a/html/071recipe.cc.html b/html/071recipe.cc.html index d4476afb..51073ad2 100644 --- a/html/071recipe.cc.html +++ b/html/071recipe.cc.html @@ -22,7 +22,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color .Special { color: #c00000; } .traceContains { color: #008000; } .Normal { color: #eeeeee; background-color: #080808; padding-bottom: 1px; } -.Identifier { color: #fcb165; } +.Identifier { color: #ecf32c; } --> </style> @@ -150,10 +150,12 @@ put<span class="Delimiter">(</span>Recipe_ordinal<span class="Delimiter">,</span raise << maybe<span class="Delimiter">(</span>current_recipe_name<span class="Delimiter">())</span> << <span class="Constant">"tried to call empty recipe in '"</span> << to_string<span class="Delimiter">(</span>current_instruction<span class="Delimiter">())</span> << <span class="Constant">"'"</span> << end<span class="Delimiter">();</span> <span class="Identifier">break</span><span class="Delimiter">;</span> <span class="Delimiter">}</span> - <span class="Normal">const</span> instruction& caller_instruction = current_instruction<span class="Delimiter">();</span> + instruction<span class="Comment">/*</span><span class="Comment">copy</span><span class="Comment">*/</span> call_instruction = current_instruction<span class="Delimiter">();</span> + call_instruction<span class="Delimiter">.</span>operation = ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">).</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">);</span> + call_instruction<span class="Delimiter">.</span>ingredients<span class="Delimiter">.</span>erase<span class="Delimiter">(</span>call_instruction<span class="Delimiter">.</span>ingredients<span class="Delimiter">.</span>begin<span class="Delimiter">());</span> Current_routine<span class="Delimiter">-></span>calls<span class="Delimiter">.</span>push_front<span class="Delimiter">(</span>call<span class="Delimiter">(</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">).</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">)));</span> ingredients<span class="Delimiter">.</span>erase<span class="Delimiter">(</span>ingredients<span class="Delimiter">.</span>begin<span class="Delimiter">());</span> <span class="Comment">// drop the callee</span> - finish_call_housekeeping<span class="Delimiter">(</span>caller_instruction<span class="Delimiter">,</span> ingredients<span class="Delimiter">);</span> + finish_call_housekeeping<span class="Delimiter">(</span>call_instruction<span class="Delimiter">,</span> ingredients<span class="Delimiter">);</span> <span class="Identifier">continue</span><span class="Delimiter">;</span> <span class="Delimiter">}</span> diff --git a/html/072scheduler.cc.html b/html/072scheduler.cc.html index 720b8473..3eac3e1b 100644 --- a/html/072scheduler.cc.html +++ b/html/072scheduler.cc.html @@ -23,7 +23,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color .Special { color: #c00000; } .traceContains { color: #008000; } .Normal { color: #eeeeee; background-color: #080808; padding-bottom: 1px; } -.Identifier { color: #fcb165; } +.Identifier { color: #ecf32c; } --> </style> @@ -316,6 +316,23 @@ increment_any_refcounts<span class="Delimiter">(</span>ingredient<span class="De <span class="Identifier">return</span> <span class="Constant">false</span><span class="Delimiter">;</span> <span class="Delimiter">}</span> +<span class="Comment">// ensure this works with indirect calls using 'call' as well</span> +<span class="Delimiter">:(scenario start_running_immediately_updates_refcounts_of_ingredients_of_indirect_calls)</span> +<span class="Special">% Scheduling_interval = 1;</span> +<span class="muRecipe">def</span> main [ + local-scope + <span class="Normal">n</span>:&:num<span class="Special"> <- </span><span class="Normal">new</span> <span class="Constant">number:type</span> + *n<span class="Special"> <- </span>copy <span class="Constant">34</span> + call f1<span class="Delimiter">,</span> n + <span class="Constant">1</span>:num/<span class="Special">raw <- </span>copy *n +] +<span class="muRecipe">def</span> f1 n:&:num [ + local-scope + load-ingredients +] +<span class="Comment"># check that n wasn't reclaimed when f1 returned</span> +<span class="traceContains">+mem: storing 34 in location 1</span> + <span class="Delimiter">:(scenario next_ingredient_never_leaks_refcounts)</span> <span class="muRecipe">def</span> create-space n:&:num<span class="muRecipe"> -> </span><span class="Normal">default</span>-space:space [ <span class="Normal">default</span>-space<span class="Special"> <- </span><span class="Normal">new</span> <span class="Constant">location:type</span><span class="Delimiter">,</span> <span class="Constant">2</span> @@ -565,15 +582,11 @@ DISCONTINUED<span class="Delimiter">,</span> <span class="Delimiter">}</span> <span class="Delimiter">:(before "End Test Teardown")</span> -<span class="Normal">if</span> <span class="Delimiter">(</span>Passed && any_routines_with_error<span class="Delimiter">())</span> <span class="Delimiter">{</span> - Passed = <span class="Constant">false</span><span class="Delimiter">;</span> +<span class="Normal">if</span> <span class="Delimiter">(</span>Passed && any_routines_with_error<span class="Delimiter">())</span> raise << <span class="Constant">"some routines died with errors</span><span class="cSpecial">\n</span><span class="Constant">"</span> << end<span class="Delimiter">();</span> -<span class="Delimiter">}</span> <span class="Delimiter">:(before "End Mu Test Teardown")</span> -<span class="Normal">if</span> <span class="Delimiter">(</span>Passed && any_routines_with_error<span class="Delimiter">())</span> <span class="Delimiter">{</span> - Passed = <span class="Constant">false</span><span class="Delimiter">;</span> +<span class="Normal">if</span> <span class="Delimiter">(</span>Passed && any_routines_with_error<span class="Delimiter">())</span> raise << Current_scenario<span class="Delimiter">-></span>name << <span class="Constant">": some routines died with errors</span><span class="cSpecial">\n</span><span class="Constant">"</span> << end<span class="Delimiter">();</span> -<span class="Delimiter">}</span> <span class="Delimiter">:(code)</span> <span class="Normal">bool</span> any_routines_with_error<span class="Delimiter">()</span> <span class="Delimiter">{</span> diff --git a/html/073wait.cc.html b/html/073wait.cc.html index b5339856..321b73c3 100644 --- a/html/073wait.cc.html +++ b/html/073wait.cc.html @@ -23,7 +23,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color .traceContains { color: #008000; } .Normal { color: #eeeeee; background-color: #080808; padding-bottom: 1px; } .muData { color: #ffff00; } -.Identifier { color: #fcb165; } +.Identifier { color: #ecf32c; } --> </style> @@ -70,20 +70,16 @@ WAITING<span class="Delimiter">,</span> waiting_on_location = <span class="Constant">0</span><span class="Delimiter">;</span> <span class="Delimiter">:(before "End Mu Test Teardown")</span> -<span class="Normal">if</span> <span class="Delimiter">(</span>Passed && any_routines_waiting<span class="Delimiter">())</span> <span class="Delimiter">{</span> - Passed = <span class="Constant">false</span><span class="Delimiter">;</span> +<span class="Normal">if</span> <span class="Delimiter">(</span>Passed && any_routines_waiting<span class="Delimiter">())</span> raise << Current_scenario<span class="Delimiter">-></span>name << <span class="Constant">": deadlock!</span><span class="cSpecial">\n</span><span class="Constant">"</span> << end<span class="Delimiter">();</span> -<span class="Delimiter">}</span> <span class="Delimiter">:(before "End Run Routine")</span> <span class="Normal">if</span> <span class="Delimiter">(</span>any_routines_waiting<span class="Delimiter">())</span> <span class="Delimiter">{</span> raise << <span class="Constant">"deadlock!</span><span class="cSpecial">\n</span><span class="Constant">"</span> << end<span class="Delimiter">();</span> dump_waiting_routines<span class="Delimiter">();</span> <span class="Delimiter">}</span> <span class="Delimiter">:(before "End Test Teardown")</span> -<span class="Normal">if</span> <span class="Delimiter">(</span>Passed && any_routines_with_error<span class="Delimiter">())</span> <span class="Delimiter">{</span> - Passed = <span class="Constant">false</span><span class="Delimiter">;</span> +<span class="Normal">if</span> <span class="Delimiter">(</span>Passed && any_routines_with_error<span class="Delimiter">())</span> raise << <span class="Constant">"some routines died with errors</span><span class="cSpecial">\n</span><span class="Constant">"</span> << end<span class="Delimiter">();</span> -<span class="Delimiter">}</span> <span class="Delimiter">:(code)</span> <span class="Normal">bool</span> any_routines_waiting<span class="Delimiter">()</span> <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 < SIZE<span class="Delimiter">(</span>Routines<span class="Delimiter">);</span> ++i<span class="Delimiter">)</span> <span class="Delimiter">{</span> diff --git a/html/074deep_copy.cc.html b/html/074deep_copy.cc.html index 1509dab3..9be9b2e4 100644 --- a/html/074deep_copy.cc.html +++ b/html/074deep_copy.cc.html @@ -22,7 +22,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color .traceContains { color: #008000; } .Normal { color: #eeeeee; background-color: #080808; padding-bottom: 1px; } .muData { color: #ffff00; } -.Identifier { color: #fcb165; } +.Identifier { color: #ecf32c; } --> </style> diff --git a/html/075channel.mu.html b/html/075channel.mu.html index 862329f8..eda9e8da 100644 --- a/html/075channel.mu.html +++ b/html/075channel.mu.html @@ -412,7 +412,8 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color result<span class="Special"> <- </span>length *q ] -<span class="Comment"># helper for channels of characters in particular</span> +<span class="SalientComment">## helpers for channels of characters in particular</span> + <span class="muRecipe">def</span> buffer-lines in:&:source:char, buffered-out:&:sink:char<span class="muRecipe"> -> </span>buffered-out:&:sink:char, in:&:source:char [ <span class="Constant">local-scope</span> <span class="Constant">load-ingredients</span> @@ -511,6 +512,19 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color test: reached end ] ] + +<span class="muRecipe">def</span> drain source:&:source:char<span class="muRecipe"> -> </span>result:text, source:&:source:char [ + <span class="Constant">local-scope</span> + <span class="Constant">load-ingredients</span> + buf:&:buffer<span class="Special"> <- </span>new-buffer <span class="Constant">30</span> + <span class="Delimiter">{</span> + c:char, done?:bool<span class="Special"> <- </span>read source + <span class="muControl">break-if</span> done? + buf<span class="Special"> <- </span>append buf, c + <span class="muControl">loop</span> + <span class="Delimiter">}</span> + result<span class="Special"> <- </span>buffer-to-array buf +] </pre> </body> </html> diff --git a/html/080display.cc.html b/html/080display.cc.html index 0523bbf3..6de5c230 100644 --- a/html/080display.cc.html +++ b/html/080display.cc.html @@ -18,7 +18,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color .Comment { color: #9090ff; } .Delimiter { color: #800080; } .SalientComment { color: #00ffff; } -.Identifier { color: #fcb165; } +.Identifier { color: #ecf32c; } .Normal { color: #eeeeee; background-color: #080808; padding-bottom: 1px; } .PreProc { color: #800080; } --> diff --git a/html/082scenario_screen.cc.html b/html/082scenario_screen.cc.html index 40636764..ede1e5f8 100644 --- a/html/082scenario_screen.cc.html +++ b/html/082scenario_screen.cc.html @@ -21,7 +21,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color .Comment { color: #9090ff; } .Delimiter { color: #800080; } .Special { color: #c00000; } -.Identifier { color: #fcb165; } +.Identifier { color: #ecf32c; } .Normal { color: #eeeeee; background-color: #080808; padding-bottom: 1px; } .muRecipe { color: #ff8700; } --> @@ -304,7 +304,7 @@ put<span class="Delimiter">(</span>Recipe_ordinal<span class="Delimiter">,</span <span class="Normal">if</span> <span class="Delimiter">(</span>cursor<span class="Delimiter">.</span>at_end<span class="Delimiter">())</span> <span class="Identifier">break</span><span class="Delimiter">;</span> <span class="Normal">if</span> <span class="Delimiter">(</span>cursor<span class="Delimiter">.</span>get<span class="Delimiter">()</span> != <span class="Constant">'.'</span><span class="Delimiter">)</span> <span class="Delimiter">{</span> raise << Current_scenario<span class="Delimiter">-></span>name << <span class="Constant">": each row of the expected screen should start with a '.'</span><span class="cSpecial">\n</span><span class="Constant">"</span> << end<span class="Delimiter">();</span> - Passed = <span class="Constant">false</span><span class="Delimiter">;</span> + <span class="Normal">if</span> <span class="Delimiter">(</span>!Scenario_testing_scenario<span class="Delimiter">)</span> Passed = <span class="Constant">false</span><span class="Delimiter">;</span> <span class="Identifier">return</span><span class="Delimiter">;</span> <span class="Delimiter">}</span> <span class="Normal">for</span> <span class="Delimiter">(</span><span class="Normal">int</span> column = <span class="Constant">0</span><span class="Delimiter">;</span> column < screen_width<span class="Delimiter">;</span> ++column<span class="Delimiter">,</span> addr+= <span class="Comment">/*</span><span class="Comment">size of screen-cell</span><span class="Comment">*/</span><span class="Constant">2</span><span class="Delimiter">)</span> <span class="Delimiter">{</span> @@ -360,7 +360,7 @@ put<span class="Delimiter">(</span>Recipe_ordinal<span class="Delimiter">,</span <span class="Delimiter">}</span> <span class="Normal">if</span> <span class="Delimiter">(</span>cursor<span class="Delimiter">.</span>get<span class="Delimiter">()</span> != <span class="Constant">'.'</span><span class="Delimiter">)</span> <span class="Delimiter">{</span> raise << Current_scenario<span class="Delimiter">-></span>name << <span class="Constant">": row "</span> << row << <span class="Constant">" of the expected screen is too long</span><span class="cSpecial">\n</span><span class="Constant">"</span> << end<span class="Delimiter">();</span> - Passed = <span class="Constant">false</span><span class="Delimiter">;</span> + <span class="Normal">if</span> <span class="Delimiter">(</span>!Scenario_testing_scenario<span class="Delimiter">)</span> Passed = <span class="Constant">false</span><span class="Delimiter">;</span> <span class="Identifier">return</span><span class="Delimiter">;</span> <span class="Delimiter">}</span> <span class="Delimiter">}</span> diff --git a/html/085scenario_console.cc.html b/html/085scenario_console.cc.html index e6c70135..91f5aab2 100644 --- a/html/085scenario_console.cc.html +++ b/html/085scenario_console.cc.html @@ -19,7 +19,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color .Comment { color: #9090ff; } .Delimiter { color: #800080; } .Special { color: #c00000; } -.Identifier { color: #fcb165; } +.Identifier { color: #ecf32c; } .Normal { color: #eeeeee; background-color: #080808; padding-bottom: 1px; } --> </style> diff --git a/html/087file.cc.html b/html/087file.cc.html index 192db668..1fd4af3a 100644 --- a/html/087file.cc.html +++ b/html/087file.cc.html @@ -17,7 +17,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color .Comment { color: #9090ff; } .Delimiter { color: #800080; } .cSpecial { color: #008000; } -.Identifier { color: #fcb165; } +.Identifier { color: #ecf32c; } .Normal { color: #eeeeee; background-color: #080808; padding-bottom: 1px; } .PreProc { color: #800080; } --> diff --git a/html/089scenario_filesystem.cc.html b/html/089scenario_filesystem.cc.html index 8d42226c..7fa10101 100644 --- a/html/089scenario_filesystem.cc.html +++ b/html/089scenario_filesystem.cc.html @@ -19,7 +19,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color .Comment { color: #9090ff; } .Delimiter { color: #800080; } .Special { color: #c00000; } -.Identifier { color: #fcb165; } +.Identifier { color: #ecf32c; } .Normal { color: #eeeeee; background-color: #080808; padding-bottom: 1px; } --> </style> @@ -149,6 +149,11 @@ put<span class="Delimiter">(</span>Recipe_ordinal<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_word<span class="Delimiter">(</span>in<span class="Delimiter">);</span> + <span class="Normal">if</span> <span class="Delimiter">(</span>filename<span class="Delimiter">.</span>empty<span class="Delimiter">())</span> <span class="Delimiter">{</span> + assert<span class="Delimiter">(</span>!has_data<span class="Delimiter">(</span>in<span class="Delimiter">));</span> + raise << <span class="Constant">"incomplete 'resources' block at end of file (0)</span><span class="cSpecial">\n</span><span class="Constant">"</span> << end<span class="Delimiter">();</span> + <span class="Identifier">return</span><span class="Delimiter">;</span> + <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 << caller << <span class="Constant">": assume-resources: filename '"</span> << filename << <span class="Constant">"' must begin with a '['</span><span class="cSpecial">\n</span><span class="Constant">"</span> << end<span class="Delimiter">();</span> <span class="Identifier">break</span><span class="Delimiter">;</span> @@ -164,6 +169,11 @@ put<span class="Delimiter">(</span>Recipe_ordinal<span class="Delimiter">,</span <span class="Identifier">break</span><span class="Delimiter">;</span> <span class="Delimiter">}</span> string arrow = next_word<span class="Delimiter">(</span>in<span class="Delimiter">);</span> + <span class="Normal">if</span> <span class="Delimiter">(</span>arrow<span class="Delimiter">.</span>empty<span class="Delimiter">())</span> <span class="Delimiter">{</span> + assert<span class="Delimiter">(</span>!has_data<span class="Delimiter">(</span>in<span class="Delimiter">));</span> + raise << <span class="Constant">"incomplete 'resources' block at end of file (1)</span><span class="cSpecial">\n</span><span class="Constant">"</span> << end<span class="Delimiter">();</span> + <span class="Identifier">return</span><span class="Delimiter">;</span> + <span class="Delimiter">}</span> <span class="Normal">if</span> <span class="Delimiter">(</span>arrow != <span class="Constant">"<-"</span><span class="Delimiter">)</span> <span class="Delimiter">{</span> raise << caller << <span class="Constant">": assume-resources: expected '<-' after filename '"</span> << filename << <span class="Constant">"' but got '"</span> << arrow << <span class="Constant">"'</span><span class="cSpecial">\n</span><span class="Constant">"</span> << end<span class="Delimiter">();</span> <span class="Identifier">break</span><span class="Delimiter">;</span> @@ -173,6 +183,11 @@ put<span class="Delimiter">(</span>Recipe_ordinal<span class="Delimiter">,</span <span class="Identifier">break</span><span class="Delimiter">;</span> <span class="Delimiter">}</span> string contents = next_word<span class="Delimiter">(</span>in<span class="Delimiter">);</span> + <span class="Normal">if</span> <span class="Delimiter">(</span>contents<span class="Delimiter">.</span>empty<span class="Delimiter">())</span> <span class="Delimiter">{</span> + assert<span class="Delimiter">(</span>!has_data<span class="Delimiter">(</span>in<span class="Delimiter">));</span> + raise << <span class="Constant">"incomplete 'resources' block at end of file (2)</span><span class="cSpecial">\n</span><span class="Constant">"</span> << end<span class="Delimiter">();</span> + <span class="Identifier">return</span><span class="Delimiter">;</span> + <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 << caller << <span class="Constant">": assume-resources: file contents '"</span> << contents << <span class="Constant">"' for filename '"</span> << filename << <span class="Constant">"' must begin with a '['</span><span class="cSpecial">\n</span><span class="Constant">"</span> << end<span class="Delimiter">();</span> <span class="Identifier">break</span><span class="Delimiter">;</span> diff --git a/html/091socket.cc.html b/html/091socket.cc.html index 9dadf48c..2d5f54f1 100644 --- a/html/091socket.cc.html +++ b/html/091socket.cc.html @@ -16,7 +16,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color .Constant { color: #00a0a0; } .cSpecial { color: #008000; } .Delimiter { color: #800080; } -.Identifier { color: #fcb165; } +.Identifier { color: #ecf32c; } .Normal { color: #eeeeee; background-color: #080808; padding-bottom: 1px; } .PreProc { color: #800080; } .Comment { color: #9090ff; } diff --git a/html/092socket.mu.html b/html/092socket.mu.html index 062217fe..186c7c3b 100644 --- a/html/092socket.mu.html +++ b/html/092socket.mu.html @@ -196,11 +196,11 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color put-index *new-port-connections, len, *new-port-connection ] -<span class="muRecipe">def</span> receive-from-socket session:num, sink:&:sink:char<span class="muRecipe"> -> </span>sink:&:sink:char [ +<span class="muRecipe">def</span> receive-from-socket socket:num, sink:&:sink:char<span class="muRecipe"> -> </span>sink:&:sink:char [ <span class="Constant">local-scope</span> <span class="Constant">load-ingredients</span> <span class="Delimiter">{</span> - req:text, eof?:bool<span class="Special"> <- </span>$read-from-socket session, <span class="Constant">4096/bytes</span> + req:text, eof?:bool<span class="Special"> <- </span>$read-from-socket socket, <span class="Constant">4096/bytes</span> bytes-read:num<span class="Special"> <- </span>length *req i:num<span class="Special"> <- </span>copy <span class="Constant">0</span> <span class="Delimiter">{</span> diff --git a/html/100trace_browser.cc.html b/html/100trace_browser.cc.html index a2aee17e..1b357983 100644 --- a/html/100trace_browser.cc.html +++ b/html/100trace_browser.cc.html @@ -17,7 +17,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color .Comment { color: #9090ff; } .Delimiter { color: #800080; } .cSpecial { color: #008000; } -.Identifier { color: #fcb165; } +.Identifier { color: #ecf32c; } .Normal { color: #eeeeee; background-color: #080808; padding-bottom: 1px; } --> </style> diff --git a/html/101run_sandboxed.cc.html b/html/101run_sandboxed.cc.html index f2883e6f..dc606ed0 100644 --- a/html/101run_sandboxed.cc.html +++ b/html/101run_sandboxed.cc.html @@ -22,7 +22,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color .Special { color: #c00000; } .traceContains { color: #008000; } .Normal { color: #eeeeee; background-color: #080808; padding-bottom: 1px; } -.Identifier { color: #fcb165; } +.Identifier { color: #ecf32c; } --> </style> diff --git a/html/102persist.cc.html b/html/102persist.cc.html index 76437a6d..c0d8ca78 100644 --- a/html/102persist.cc.html +++ b/html/102persist.cc.html @@ -17,7 +17,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color .Comment { color: #9090ff; } .Delimiter { color: #800080; } .cSpecial { color: #008000; } -.Identifier { color: #fcb165; } +.Identifier { color: #ecf32c; } .Normal { color: #eeeeee; background-color: #080808; padding-bottom: 1px; } --> </style> diff --git a/html/http-client.mu.html b/html/http-client.mu.html index bd5520c3..96e87f5c 100644 --- a/html/http-client.mu.html +++ b/html/http-client.mu.html @@ -37,17 +37,17 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color <span class="Constant">local-scope</span> google:&:source:char<span class="Special"> <- </span>start-reading-from-network <span class="Constant">0/real-resources</span>, <span class="Constant">[google.com]</span>, <span class="Constant">[/]</span> n:num<span class="Special"> <- </span>copy <span class="Constant">0</span> - b:&:buffer<span class="Special"> <- </span>new-buffer <span class="Constant">30</span> + buf:&:buffer<span class="Special"> <- </span>new-buffer <span class="Constant">30</span> <span class="Delimiter">{</span> c:char, done?:bool<span class="Special"> <- </span>read google <span class="muControl">break-if</span> done? n<span class="Special"> <- </span>add n, <span class="Constant">1</span> - b<span class="Special"> <- </span>append b, c + buf<span class="Special"> <- </span>append buf, c <span class="CommentedCode">#? trunc?:bool <- greater-or-equal n, 10000</span> <span class="CommentedCode">#? loop-unless trunc?</span> <span class="muControl">loop</span> <span class="Delimiter">}</span> - result:text<span class="Special"> <- </span>buffer-to-array b + result:text<span class="Special"> <- </span>buffer-to-array buf open-console len:num<span class="Special"> <- </span>length *result print <span class="Constant">0/real-screen</span>, result diff --git a/html/http-server.mu.html b/html/http-server.mu.html index d09f4f87..cdc4d661 100644 --- a/html/http-server.mu.html +++ b/html/http-server.mu.html @@ -13,7 +13,6 @@ 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; } -.Delimiter { color: #800080; } .muControl { color: #c0a020; } .Comment { color: #9090ff; } .Constant { color: #00a0a0; } @@ -47,14 +46,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color session:num<span class="Special"> <- </span>$accept socket contents:&:source:char, sink:&:sink:char<span class="Special"> <- </span>new-channel <span class="Constant">30</span> sink<span class="Special"> <- </span>start-running receive-from-socket session, sink - buf:&:buffer<span class="Special"> <- </span>new-buffer <span class="Constant">30</span> - <span class="Delimiter">{</span> - c:char, done?:bool, contents<span class="Special"> <- </span>read contents - <span class="muControl">break-if</span> done? - buf<span class="Special"> <- </span>append buf, c - <span class="muControl">loop</span> - <span class="Delimiter">}</span> - socket-text:text<span class="Special"> <- </span>buffer-to-array buf + query:text<span class="Special"> <- </span>drain contents $print <span class="Constant">[Done reading from socket.]</span>, <span class="Constant">10/newline</span> write-to-socket session, <span class="Constant">[HTTP/1.0 200 OK</span> <span class="Constant">Content-type: text/plain</span> diff --git a/html/lambda-to-mu.mu.html b/html/lambda-to-mu.mu.html index 52100115..46788657 100644 --- a/html/lambda-to-mu.mu.html +++ b/html/lambda-to-mu.mu.html @@ -222,7 +222,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color <span class="Delimiter">{</span> <span class="muControl">break-if</span> pair? <span class="Comment"># atom</span> - b:&:buffer<span class="Special"> <- </span>new-buffer <span class="Constant">30</span> + buf:&:buffer<span class="Special"> <- </span>new-buffer <span class="Constant">30</span> <span class="Delimiter">{</span> done?:bool<span class="Special"> <- </span>end-of-stream? in <span class="muControl">break-if</span> done? @@ -233,10 +233,10 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color done?<span class="Special"> <- </span>space? c <span class="muControl">break-if</span> done? c<span class="Special"> <- </span>read in - b<span class="Special"> <- </span>append b, c + buf<span class="Special"> <- </span>append buf, c <span class="muControl">loop</span> <span class="Delimiter">}</span> - s:text<span class="Special"> <- </span>buffer-to-array b + s:text<span class="Special"> <- </span>buffer-to-array buf out<span class="Special"> <- </span>new-atom s <span class="Delimiter">}</span> <span class="Delimiter">{</span> |