about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--020run.cc2
-rw-r--r--021check_instruction.cc4
-rw-r--r--040brace.cc2
-rw-r--r--html/020run.cc.html2
-rw-r--r--html/021check_instruction.cc.html4
-rw-r--r--html/040brace.cc.html2
6 files changed, 8 insertions, 8 deletions
diff --git a/020run.cc b/020run.cc
index 0476d753..e760deaa 100644
--- a/020run.cc
+++ b/020run.cc
@@ -92,7 +92,7 @@ void run_current_routine() {
     }
     // Write Products of Instruction
     if (SIZE(products) < SIZE(current_instruction().products)) {
-      raise << SIZE(products) << " vs " << SIZE(current_instruction().products) << ": failed to write to all products! " << to_original_string(current_instruction()) << '\n' << end();
+      raise << SIZE(products) << " vs " << SIZE(current_instruction().products) << ": failed to write to all products in '" << to_original_string(current_instruction()) << "'\n" << end();
     }
     else {
       for (int i = 0;  i < SIZE(current_instruction().products);  ++i)
diff --git a/021check_instruction.cc b/021check_instruction.cc
index 48fe3adf..8b34b55f 100644
--- a/021check_instruction.cc
+++ b/021check_instruction.cc
@@ -21,8 +21,8 @@ void check_instruction(const recipe_ordinal r) {
     switch (inst.operation) {
       // Primitive Recipe Checks
       case COPY: {
-        if (SIZE(inst.products) != SIZE(inst.ingredients)) {
-          raise << maybe(get(Recipe, r).name) << "ingredients and products should match in '" << inst.original_string << "'\n" << end();
+        if (SIZE(inst.products) > SIZE(inst.ingredients)) {
+          raise << maybe(get(Recipe, r).name) << "too many products in '" << inst.original_string << "'\n" << end();
           break;
         }
         for (int i = 0;  i < SIZE(inst.ingredients);  ++i) {
diff --git a/040brace.cc b/040brace.cc
index e6afce89..7cb0a11d 100644
--- a/040brace.cc
+++ b/040brace.cc
@@ -60,7 +60,7 @@ void transform_braces(const recipe_ordinal r) {
     }
     if (inst.label == "}") {
       if (open_braces.empty()) {
-        raise << maybe(get(Recipe, r).name) << "missing '{' in '" << get(Recipe, r).name << "'\n" << end();
+        raise << maybe(get(Recipe, r).name) << "unbalanced '}'\n" << end();
         return;
       }
       open_braces.pop();
diff --git a/html/020run.cc.html b/html/020run.cc.html
index 093f069a..031db6cc 100644
--- a/html/020run.cc.html
+++ b/html/020run.cc.html
@@ -159,7 +159,7 @@ if ('onhashchange' in window) {
 <span id="L92" class="LineNr"> 92 </span>  <span class="Conceal">¦</span> <span class="Delimiter">}</span>
 <span id="L93" class="LineNr"> 93 </span>  <span class="Conceal">¦</span> <span class="Comment">// Write Products of Instruction</span>
 <span id="L94" class="LineNr"> 94 </span>  <span class="Conceal">¦</span> <span class="Normal">if</span> <span class="Delimiter">(</span><a href='001help.cc.html#L138'>SIZE</a><span class="Delimiter">(</span>products<span class="Delimiter">)</span> &lt; <a href='001help.cc.html#L138'>SIZE</a><span class="Delimiter">(</span>current_instruction<span class="Delimiter">().</span>products<span class="Delimiter">))</span> <span class="Delimiter">{</span>
-<span id="L95" class="LineNr"> 95 </span>  <span class="Conceal">¦</span> <span class="Conceal">¦</span> <a href='003trace.cc.html#L168'>raise</a> &lt;&lt; <a href='001help.cc.html#L138'>SIZE</a><span class="Delimiter">(</span>products<span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot; vs &quot;</span> &lt;&lt; <a href='001help.cc.html#L138'>SIZE</a><span class="Delimiter">(</span>current_instruction<span class="Delimiter">().</span>products<span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot;: failed to write to all products! &quot;</span> &lt;&lt; to_original_string<span class="Delimiter">(</span>current_instruction<span class="Delimiter">())</span> &lt;&lt; <span class="cSpecial">'\n'</span> &lt;&lt; <a href='003trace.cc.html#L185'>end</a><span class="Delimiter">();</span>
+<span id="L95" class="LineNr"> 95 </span>  <span class="Conceal">¦</span> <span class="Conceal">¦</span> <a href='003trace.cc.html#L168'>raise</a> &lt;&lt; <a href='001help.cc.html#L138'>SIZE</a><span class="Delimiter">(</span>products<span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot; vs &quot;</span> &lt;&lt; <a href='001help.cc.html#L138'>SIZE</a><span class="Delimiter">(</span>current_instruction<span class="Delimiter">().</span>products<span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot;: failed to write to all products in '&quot;</span> &lt;&lt; to_original_string<span class="Delimiter">(</span>current_instruction<span class="Delimiter">())</span> &lt;&lt; <span class="Constant">&quot;'</span><span class="cSpecial">\n</span><span class="Constant">&quot;</span> &lt;&lt; <a href='003trace.cc.html#L185'>end</a><span class="Delimiter">();</span>
 <span id="L96" class="LineNr"> 96 </span>  <span class="Conceal">¦</span> <span class="Delimiter">}</span>
 <span id="L97" class="LineNr"> 97 </span>  <span class="Conceal">¦</span> <span class="Normal">else</span> <span class="Delimiter">{</span>
 <span id="L98" class="LineNr"> 98 </span>  <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Normal">for</span> <span class="Delimiter">(</span><span class="Normal">int</span> i = <span class="Constant">0</span><span class="Delimiter">;</span>  i &lt; <a href='001help.cc.html#L138'>SIZE</a><span class="Delimiter">(</span>current_instruction<span class="Delimiter">().</span>products<span class="Delimiter">);</span>  ++i<span class="Delimiter">)</span>
diff --git a/html/021check_instruction.cc.html b/html/021check_instruction.cc.html
index 60edd3e7..4bf85679 100644
--- a/html/021check_instruction.cc.html
+++ b/html/021check_instruction.cc.html
@@ -84,8 +84,8 @@ if ('onhashchange' in window) {
 <span id="L21" class="LineNr"> 21 </span>  <span class="Conceal">¦</span> <span class="Normal">switch</span> <span class="Delimiter">(</span>inst<span class="Delimiter">.</span>operation<span class="Delimiter">)</span> <span class="Delimiter">{</span>
 <span id="L22" class="LineNr"> 22 </span>  <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Comment">// Primitive Recipe Checks</span>
 <span id="L23" class="LineNr"> 23 </span>  <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Normal">case</span> <a href='010vm.cc.html#L189'>COPY</a>: <span class="Delimiter">{</span>
-<span id="L24" class="LineNr"> 24 </span>  <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Normal">if</span> <span class="Delimiter">(</span><a href='001help.cc.html#L138'>SIZE</a><span class="Delimiter">(</span>inst<span class="Delimiter">.</span>products<span class="Delimiter">)</span> != <a href='001help.cc.html#L138'>SIZE</a><span class="Delimiter">(</span>inst<span class="Delimiter">.</span>ingredients<span class="Delimiter">))</span> <span class="Delimiter">{</span>
-<span id="L25" class="LineNr"> 25 </span>  <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <a href='003trace.cc.html#L168'>raise</a> &lt;&lt; <a href='013update_operation.cc.html#L25'>maybe</a><span class="Delimiter">(</span>get<span class="Delimiter">(</span>Recipe<span class="Delimiter">,</span> r<span class="Delimiter">).</span>name<span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot;ingredients and products should match in '&quot;</span> &lt;&lt; inst<span class="Delimiter">.</span>original_string &lt;&lt; <span class="Constant">&quot;'</span><span class="cSpecial">\n</span><span class="Constant">&quot;</span> &lt;&lt; <a href='003trace.cc.html#L185'>end</a><span class="Delimiter">();</span>
+<span id="L24" class="LineNr"> 24 </span>  <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Normal">if</span> <span class="Delimiter">(</span><a href='001help.cc.html#L138'>SIZE</a><span class="Delimiter">(</span>inst<span class="Delimiter">.</span>products<span class="Delimiter">)</span> &gt; <a href='001help.cc.html#L138'>SIZE</a><span class="Delimiter">(</span>inst<span class="Delimiter">.</span>ingredients<span class="Delimiter">))</span> <span class="Delimiter">{</span>
+<span id="L25" class="LineNr"> 25 </span>  <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <a href='003trace.cc.html#L168'>raise</a> &lt;&lt; <a href='013update_operation.cc.html#L25'>maybe</a><span class="Delimiter">(</span>get<span class="Delimiter">(</span>Recipe<span class="Delimiter">,</span> r<span class="Delimiter">).</span>name<span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot;too many products in '&quot;</span> &lt;&lt; inst<span class="Delimiter">.</span>original_string &lt;&lt; <span class="Constant">&quot;'</span><span class="cSpecial">\n</span><span class="Constant">&quot;</span> &lt;&lt; <a href='003trace.cc.html#L185'>end</a><span class="Delimiter">();</span>
 <span id="L26" class="LineNr"> 26 </span>  <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Identifier">break</span><span class="Delimiter">;</span>
 <span id="L27" class="LineNr"> 27 </span>  <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Delimiter">}</span>
 <span id="L28" class="LineNr"> 28 </span>  <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Normal">for</span> <span class="Delimiter">(</span><span class="Normal">int</span> i = <span class="Constant">0</span><span class="Delimiter">;</span>  i &lt; <a href='001help.cc.html#L138'>SIZE</a><span class="Delimiter">(</span>inst<span class="Delimiter">.</span>ingredients<span class="Delimiter">);</span>  ++i<span class="Delimiter">)</span> <span class="Delimiter">{</span>
diff --git a/html/040brace.cc.html b/html/040brace.cc.html
index 5c868aaa..726e1f41 100644
--- a/html/040brace.cc.html
+++ b/html/040brace.cc.html
@@ -123,7 +123,7 @@ if ('onhashchange' in window) {
 <span id="L60" class="LineNr"> 60 </span>  <span class="Conceal">¦</span> <span class="Delimiter">}</span>
 <span id="L61" class="LineNr"> 61 </span>  <span class="Conceal">¦</span> <span class="Normal">if</span> <span class="Delimiter">(</span>inst<span class="Delimiter">.</span>label == <span class="Constant">&quot;}&quot;</span><span class="Delimiter">)</span> <span class="Delimiter">{</span>
 <span id="L62" class="LineNr"> 62 </span>  <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Normal">if</span> <span class="Delimiter">(</span>open_braces<span class="Delimiter">.</span>empty<span class="Delimiter">())</span> <span class="Delimiter">{</span>
-<span id="L63" class="LineNr"> 63 </span>  <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <a href='003trace.cc.html#L168'>raise</a> &lt;&lt; <a href='013update_operation.cc.html#L25'>maybe</a><span class="Delimiter">(</span>get<span class="Delimiter">(</span>Recipe<span class="Delimiter">,</span> r<span class="Delimiter">).</span>name<span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot;missing '{' in '&quot;</span> &lt;&lt; get<span class="Delimiter">(</span>Recipe<span class="Delimiter">,</span> r<span class="Delimiter">).</span>name &lt;&lt; <span class="Constant">&quot;'</span><span class="cSpecial">\n</span><span class="Constant">&quot;</span> &lt;&lt; <a href='003trace.cc.html#L185'>end</a><span class="Delimiter">();</span>
+<span id="L63" class="LineNr"> 63 </span>  <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <a href='003trace.cc.html#L168'>raise</a> &lt;&lt; <a href='013update_operation.cc.html#L25'>maybe</a><span class="Delimiter">(</span>get<span class="Delimiter">(</span>Recipe<span class="Delimiter">,</span> r<span class="Delimiter">).</span>name<span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot;unbalanced '}'</span><span class="cSpecial">\n</span><span class="Constant">&quot;</span> &lt;&lt; <a href='003trace.cc.html#L185'>end</a><span class="Delimiter">();</span>
 <span id="L64" class="LineNr"> 64 </span>  <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Identifier">return</span><span class="Delimiter">;</span>
 <span id="L65" class="LineNr"> 65 </span>  <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Delimiter">}</span>
 <span id="L66" class="LineNr"> 66 </span>  <span class="Conceal">¦</span> <span class="Conceal">¦</span> open_braces<span class="Delimiter">.</span>pop<span class="Delimiter">();</span>