From fd7d8138a4ff5515f9b79c584a98d5c26d8ddb8a Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Thu, 2 Mar 2017 05:48:01 -0800 Subject: 3750 --- html/011load.cc.html | 52 ++++++++++++++++++++++++++-------------------------- 1 file changed, 26 insertions(+), 26 deletions(-) (limited to 'html/011load.cc.html') diff --git a/html/011load.cc.html b/html/011load.cc.html index e718060e..5aeeb12e 100644 --- a/html/011load.cc.html +++ b/html/011load.cc.html @@ -105,7 +105,7 @@ if ('onhashchange' in window) { 43 } 44 // End Command Handlers 45 else { - 46 raise << "unknown top-level command: " << command << '\n' << end(); + 46 raise << "unknown top-level command: " << command << '\n' << end(); 47 } 48 } 49 return result; @@ -117,21 +117,21 @@ if ('onhashchange' in window) { 55 result.name = next_word(in); 56 if (result.name.empty()) { 57 assert(!has_data(in)); - 58 raise << "file ended with 'recipe'\n" << end(); + 58 raise << "file ended with 'recipe'\n" << end(); 59 return -1; 60 } 61 // End Load Recipe Name 62 skip_whitespace_but_not_newline(in); 63 // End Recipe Refinements 64 if (result.name.empty()) - 65 raise << "empty result.name\n" << end(); - 66 trace(9991, "parse") << "--- defining " << result.name << end(); + 65 raise << "empty result.name\n" << end(); + 66 trace(9991, "parse") << "--- defining " << result.name << end(); 67 if (!contains_key(Recipe_ordinal, result.name)) 68 put(Recipe_ordinal, result.name, Next_recipe_ordinal++); - 69 if (Recipe.find(get(Recipe_ordinal, result.name)) != Recipe.end()) { - 70 trace(9991, "parse") << "already exists" << end(); + 69 if (Recipe.find(get(Recipe_ordinal, result.name)) != Recipe.end()) { + 70 trace(9991, "parse") << "already exists" << end(); 71 if (should_check_for_redefine(result.name)) - 72 raise << "redefining recipe " << result.name << "\n" << end(); + 72 raise << "redefining recipe " << result.name << "\n" << end(); 73 Recipe.erase(get(Recipe_ordinal, result.name)); 74 } 75 slurp_body(in, result); @@ -144,13 +144,13 @@ if ('onhashchange' in window) { 82 in >> std::noskipws; 83 skip_whitespace_but_not_newline(in); 84 if (in.get() != '[') - 85 raise << result.name << ": recipe body must begin with '['\n" << end(); + 85 raise << result.name << ": recipe body must begin with '['\n" << end(); 86 skip_whitespace_and_comments(in); // permit trailing comment after '[' 87 instruction curr; 88 while (next_instruction(in, &curr)) { 89 curr.original_string = to_original_string(curr); 90 // End Rewrite Instruction(curr, recipe result) - 91 trace(9992, "load") << "after rewriting: " << to_string(curr) << end(); + 91 trace(9992, "load") << "after rewriting: " << to_string(curr) << end(); 92 if (!curr.is_empty()) result.steps.push_back(curr); 93 } 94 } @@ -159,7 +159,7 @@ if ('onhashchange' in window) { 97 curr->clear(); 98 skip_whitespace_and_comments(in); 99 if (!has_data(in)) { -100 raise << "incomplete recipe at end of file (0)\n" << end(); +100 raise << "incomplete recipe at end of file (0)\n" << end(); 101 return false; 102 } 103 @@ -167,13 +167,13 @@ if ('onhashchange' in window) { 105 while (has_data(in) && in.peek() != '\n') { 106 skip_whitespace_but_not_newline(in); 107 if (!has_data(in)) { -108 raise << "incomplete recipe at end of file (1)\n" << end(); +108 raise << "incomplete recipe at end of file (1)\n" << end(); 109 return false; 110 } 111 string word = next_word(in); 112 if (word.empty()) { 113 assert(!has_data(in)); -114 raise << "incomplete recipe at end of file (2)\n" << end(); +114 raise << "incomplete recipe at end of file (2)\n" << end(); 115 return false; 116 } 117 words.push_back(word); @@ -186,39 +186,39 @@ if ('onhashchange' in window) { 124 if (SIZE(words) == 1 && is_label_word(words.at(0))) { 125 curr->is_label = true; 126 curr->label = words.at(0); -127 trace(9993, "parse") << "label: " << curr->label << end(); +127 trace(9993, "parse") << "label: " << curr->label << end(); 128 if (!has_data(in)) { -129 raise << "incomplete recipe at end of file (3)\n" << end(); +129 raise << "incomplete recipe at end of file (3)\n" << end(); 130 return false; 131 } 132 return true; 133 } 134 135 vector<string>::iterator p = words.begin(); -136 if (find(words.begin(), words.end(), "<-") != words.end()) { +136 if (find(words.begin(), words.end(), "<-") != words.end()) { 137 for (; *p != "<-"; ++p) 138 curr->products.push_back(reagent(*p)); 139 ++p; // skip <- 140 } 141 -142 if (p == words.end()) { -143 raise << "instruction prematurely ended with '<-'\n" << end(); +142 if (p == words.end()) { +143 raise << "instruction prematurely ended with '<-'\n" << end(); 144 return false; 145 } 146 curr->name = *p; ++p; 147 // curr->operation will be set at transform time 148 -149 for (; p != words.end(); ++p) +149 for (; p != words.end(); ++p) 150 curr->ingredients.push_back(reagent(*p)); 151 -152 trace(9993, "parse") << "instruction: " << curr->name << end(); -153 trace(9993, "parse") << " number of ingredients: " << SIZE(curr->ingredients) << end(); -154 for (vector<reagent>::iterator p = curr->ingredients.begin(); p != curr->ingredients.end(); ++p) -155 trace(9993, "parse") << " ingredient: " << to_string(*p) << end(); -156 for (vector<reagent>::iterator p = curr->products.begin(); p != curr->products.end(); ++p) -157 trace(9993, "parse") << " product: " << to_string(*p) << end(); +152 trace(9993, "parse") << "instruction: " << curr->name << end(); +153 trace(9993, "parse") << " number of ingredients: " << SIZE(curr->ingredients) << end(); +154 for (vector<reagent>::iterator p = curr->ingredients.begin(); p != curr->ingredients.end(); ++p) +155 trace(9993, "parse") << " ingredient: " << to_string(*p) << end(); +156 for (vector<reagent>::iterator p = curr->products.begin(); p != curr->products.end(); ++p) +157 trace(9993, "parse") << " product: " << to_string(*p) << end(); 158 if (!has_data(in)) { -159 raise << "9: unbalanced '[' for recipe\n" << end(); +159 raise << "9: unbalanced '[' for recipe\n" << end(); 160 return false; 161 } 162 // End next_instruction(curr) @@ -234,7 +234,7 @@ if ('onhashchange' in window) { 172 skip_whitespace_and_comments_but_not_newline(in); 173 string result = out.str(); 174 if (result != "[" && ends_with(result, '[')) -175 raise << "insert a space before '[' in '" << result << "'\n" << end(); +175 raise << "insert a space before '[' in '" << result << "'\n" << end(); 176 return result; 177 } 178 -- cgit 1.4.1-2-gfad0