From ba1fb981f6ce186e37c73e26ec79925bbaf991eb Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Tue, 4 Apr 2017 10:49:13 -0700 Subject: 3811 --- 020run.cc | 2 +- 021check_instruction.cc | 4 ++-- 040brace.cc | 2 +- html/020run.cc.html | 2 +- html/021check_instruction.cc.html | 4 ++-- html/040brace.cc.html | 2 +- 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) { 92 ¦ } 93 ¦ // Write Products of Instruction 94 ¦ if (SIZE(products) < SIZE(current_instruction().products)) { - 95 ¦ ¦ raise << SIZE(products) << " vs " << SIZE(current_instruction().products) << ": failed to write to all products! " << to_original_string(current_instruction()) << '\n' << end(); + 95 ¦ ¦ raise << SIZE(products) << " vs " << SIZE(current_instruction().products) << ": failed to write to all products in '" << to_original_string(current_instruction()) << "'\n" << end(); 96 ¦ } 97 ¦ else { 98 ¦ ¦ for (int i = 0; i < SIZE(current_instruction().products); ++i) 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) { 21 ¦ switch (inst.operation) { 22 ¦ ¦ // Primitive Recipe Checks 23 ¦ ¦ case COPY: { - 24 ¦ ¦ ¦ if (SIZE(inst.products) != SIZE(inst.ingredients)) { - 25 ¦ ¦ ¦ ¦ raise << maybe(get(Recipe, r).name) << "ingredients and products should match in '" << inst.original_string << "'\n" << end(); + 24 ¦ ¦ ¦ if (SIZE(inst.products) > SIZE(inst.ingredients)) { + 25 ¦ ¦ ¦ ¦ raise << maybe(get(Recipe, r).name) << "too many products in '" << inst.original_string << "'\n" << end(); 26 ¦ ¦ ¦ ¦ break; 27 ¦ ¦ ¦ } 28 ¦ ¦ ¦ for (int i = 0; i < SIZE(inst.ingredients); ++i) { 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) { 60 ¦ } 61 ¦ if (inst.label == "}") { 62 ¦ ¦ if (open_braces.empty()) { - 63 ¦ ¦ ¦ raise << maybe(get(Recipe, r).name) << "missing '{' in '" << get(Recipe, r).name << "'\n" << end(); + 63 ¦ ¦ ¦ raise << maybe(get(Recipe, r).name) << "unbalanced '}'\n" << end(); 64 ¦ ¦ ¦ return; 65 ¦ ¦ } 66 ¦ ¦ open_braces.pop(); -- cgit 1.4.1-2-gfad0