From 805d58c6aeeeba3e4989c0eed6781b3861e8fae0 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Thu, 25 Jan 2018 22:39:31 -0800 Subject: 4199 --- html/023boolean.cc.html | 69 ++++++++++++++++++++++++------------------------- 1 file changed, 34 insertions(+), 35 deletions(-) (limited to 'html/023boolean.cc.html') diff --git a/html/023boolean.cc.html b/html/023boolean.cc.html index 4e81b369..e3ed198b 100644 --- a/html/023boolean.cc.html +++ b/html/023boolean.cc.html @@ -15,18 +15,17 @@ body { font-size: 12pt; font-family: monospace; color: #aaaaaa; background-color a { color:#eeeeee; text-decoration: none; } a:hover { text-decoration: underline; } * { font-size: 12pt; font-size: 1em; } -.Special { color: #c00000; } -.Conceal { color: #4e4e4e; } .traceContains { color: #008000; } .LineNr { color: #444444; } -.Identifier { color: #c0a020; } .Constant { color: #00a0a0; } +.muRecipe { color: #ff8700; } +.Delimiter { color: #800080; } +.Special { color: #c00000; } +.Identifier { color: #c0a020; } .Normal { color: #aaaaaa; background-color: #080808; padding-bottom: 1px; } .Comment { color: #9090ff; } .Comment a { color:#0000ee; text-decoration:underline; } -.Delimiter { color: #800080; } .cSpecial { color: #008000; } -.muRecipe { color: #ff8700; } --> @@ -70,18 +69,18 @@ if ('onhashchange' in window) { 7 :(before "End Primitive Recipe Checks") 8 case AND: { 9 for (int i = 0; i < SIZE(inst.ingredients); ++i) { - 10 ¦ if (!is_mu_scalar(inst.ingredients.at(i))) { - 11 ¦ ¦ raise << maybe(get(Recipe, r).name) << "'and' requires boolean ingredients, but got '" << inst.ingredients.at(i).original_string << "'\n" << end(); - 12 ¦ ¦ goto finish_checking_instruction; - 13 ¦ } + 10 if (!is_mu_scalar(inst.ingredients.at(i))) { + 11 raise << maybe(get(Recipe, r).name) << "'and' requires boolean ingredients, but got '" << inst.ingredients.at(i).original_string << "'\n" << end(); + 12 goto finish_checking_instruction; + 13 } 14 } 15 if (SIZE(inst.products) > 1) { - 16 ¦ raise << maybe(get(Recipe, r).name) << "'and' yields exactly one product in '" << to_original_string(inst) << "'\n" << end(); - 17 ¦ break; + 16 raise << maybe(get(Recipe, r).name) << "'and' yields exactly one product in '" << to_original_string(inst) << "'\n" << end(); + 17 break; 18 } 19 if (!inst.products.empty() && !is_dummy(inst.products.at(0)) && !is_mu_boolean(inst.products.at(0))) { - 20 ¦ raise << maybe(get(Recipe, r).name) << "'and' should yield a boolean, but got '" << inst.products.at(0).original_string << "'\n" << end(); - 21 ¦ break; + 20 raise << maybe(get(Recipe, r).name) << "'and' should yield a boolean, but got '" << inst.products.at(0).original_string << "'\n" << end(); + 21 break; 22 } 23 break; 24 } @@ -89,7 +88,7 @@ if ('onhashchange' in window) { 26 case AND: { 27 bool result = true; 28 for (int i = 0; i < SIZE(ingredients); ++i) - 29 ¦ result = result && ingredients.at(i).at(0); + 29 result = result && ingredients.at(i).at(0); 30 products.resize(1); 31 products.at(0).push_back(result); 32 break; @@ -128,18 +127,18 @@ if ('onhashchange' in window) { 65 :(before "End Primitive Recipe Checks") 66 case OR: { 67 for (int i = 0; i < SIZE(inst.ingredients); ++i) { - 68 ¦ if (!is_mu_scalar(inst.ingredients.at(i))) { - 69 ¦ ¦ raise << maybe(get(Recipe, r).name) << "'and' requires boolean ingredients, but got '" << inst.ingredients.at(i).original_string << "'\n" << end(); - 70 ¦ ¦ goto finish_checking_instruction; - 71 ¦ } + 68 if (!is_mu_scalar(inst.ingredients.at(i))) { + 69 raise << maybe(get(Recipe, r).name) << "'and' requires boolean ingredients, but got '" << inst.ingredients.at(i).original_string << "'\n" << end(); + 70 goto finish_checking_instruction; + 71 } 72 } 73 if (SIZE(inst.products) > 1) { - 74 ¦ raise << maybe(get(Recipe, r).name) << "'or' yields exactly one product in '" << to_original_string(inst) << "'\n" << end(); - 75 ¦ break; + 74 raise << maybe(get(Recipe, r).name) << "'or' yields exactly one product in '" << to_original_string(inst) << "'\n" << end(); + 75 break; 76 } 77 if (!inst.products.empty() && !is_dummy(inst.products.at(0)) && !is_mu_boolean(inst.products.at(0))) { - 78 ¦ raise << maybe(get(Recipe, r).name) << "'or' should yield a boolean, but got '" << inst.products.at(0).original_string << "'\n" << end(); - 79 ¦ break; + 78 raise << maybe(get(Recipe, r).name) << "'or' should yield a boolean, but got '" << inst.products.at(0).original_string << "'\n" << end(); + 79 break; 80 } 81 break; 82 } @@ -147,7 +146,7 @@ if ('onhashchange' in window) { 84 case OR: { 85 bool result = false; 86 for (int i = 0; i < SIZE(ingredients); ++i) - 87 ¦ result = result || ingredients.at(i).at(0); + 87 result = result || ingredients.at(i).at(0); 88 products.resize(1); 89 products.at(0).push_back(result); 90 break; @@ -186,21 +185,21 @@ if ('onhashchange' in window) { 123 :(before "End Primitive Recipe Checks") 124 case NOT: { 125 if (SIZE(inst.products) != SIZE(inst.ingredients)) { -126 ¦ raise << "ingredients and products should match in '" << to_original_string(inst) << "'\n" << end(); -127 ¦ break; +126 raise << "ingredients and products should match in '" << to_original_string(inst) << "'\n" << end(); +127 break; 128 } 129 for (int i = 0; i < SIZE(inst.ingredients); ++i) { -130 ¦ if (!is_mu_scalar(inst.ingredients.at(i))) { -131 ¦ ¦ raise << maybe(get(Recipe, r).name) << "'not' requires boolean ingredients, but got '" << inst.ingredients.at(i).original_string << "'\n" << end(); -132 ¦ ¦ goto finish_checking_instruction; -133 ¦ } +130 if (!is_mu_scalar(inst.ingredients.at(i))) { +131 raise << maybe(get(Recipe, r).name) << "'not' requires boolean ingredients, but got '" << inst.ingredients.at(i).original_string << "'\n" << end(); +132 goto finish_checking_instruction; +133 } 134 } 135 for (int i = 0; i < SIZE(inst.products); ++i) { -136 ¦ if (is_dummy(inst.products.at(i))) continue; -137 ¦ if (!is_mu_boolean(inst.products.at(i))) { -138 ¦ ¦ raise << maybe(get(Recipe, r).name) << "'not' should yield a boolean, but got '" << inst.products.at(i).original_string << "'\n" << end(); -139 ¦ ¦ goto finish_checking_instruction; -140 ¦ } +136 if (is_dummy(inst.products.at(i))) continue; +137 if (!is_mu_boolean(inst.products.at(i))) { +138 raise << maybe(get(Recipe, r).name) << "'not' should yield a boolean, but got '" << inst.products.at(i).original_string << "'\n" << end(); +139 goto finish_checking_instruction; +140 } 141 } 142 break; 143 } @@ -208,7 +207,7 @@ if ('onhashchange' in window) { 145 case NOT: { 146 products.resize(SIZE(ingredients)); 147 for (int i = 0; i < SIZE(ingredients); ++i) { -148 ¦ products.at(i).push_back(!ingredients.at(i).at(0)); +148 products.at(i).push_back(!ingredients.at(i).at(0)); 149 } 150 break; 151 } -- cgit 1.4.1-2-gfad0