From 67db19a05335c7fbea3ad6737303c8848fd39e74 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Tue, 15 Dec 2015 14:32:47 -0800 Subject: 2545 update html --- html/056recipe_header.cc.html | 48 ++++++++++++++++++++++++++++++++++--------- 1 file changed, 38 insertions(+), 10 deletions(-) (limited to 'html/056recipe_header.cc.html') diff --git a/html/056recipe_header.cc.html b/html/056recipe_header.cc.html index a1c6dd82..08cc8fdd 100644 --- a/html/056recipe_header.cc.html +++ b/html/056recipe_header.cc.html @@ -13,16 +13,17 @@ pre { white-space: pre-wrap; font-family: monospace; color: #eeeeee; background-color: #080808; } body { font-family: monospace; color: #eeeeee; background-color: #080808; } * { font-size: 1.05em; } -.traceContains { color: #008000; } .SalientComment { color: #00ffff; } -.cSpecial { color: #008000; } +.CommentedCode { color: #6c6c6c; } +.Error { color: #ffffff; background-color: #ff6060; padding-bottom: 1px; } +.Delimiter { color: #a04060; } +.traceContains { color: #008000; } .traceAbsent { color: #c00000; } +.cSpecial { color: #008000; } .Comment { color: #9090ff; } -.Delimiter { color: #a04060; } +.Constant { color: #00a0a0; } .Special { color: #ff6060; } .Identifier { color: #804000; } -.Constant { color: #00a0a0; } -.CommentedCode { color: #6c6c6c; } --> @@ -59,7 +60,6 @@ vector<reagent> products; has_header = false; :(before "End recipe Refinements") -skip_whitespace(in); if (in.peek() != '[') { trace(9999, "parse") << "recipe has a header; parsing" << end(); load_recipe_header(in, result); @@ -68,18 +68,18 @@ if (in.peek:(code) void load_recipe_header(istream& in, recipe& result) { result.has_header = true; - while (in.peek() != '[') { + while (has_data(in) && in.peek() != '[' && in.peek() != '\n') { string s = next_word(in); if (s == "->") break; result.ingredients.push_back(reagent(s)); trace(9999, "parse") << "header ingredient: " << result.ingredients.back().original_string << end(); - skip_whitespace_and_comments(in); + skip_whitespace_but_not_newline(in); } - while (in.peek() != '[') { + while (has_data(in) && in.peek() != '[' && in.peek() != '\n') { string s = next_word(in); result.products.push_back(reagent(s)); trace(9999, "parse") << "header product: " << result.products.back().original_string << end(); - skip_whitespace_and_comments(in); + skip_whitespace_but_not_newline(in); } // End Load Recipe Header(result) } @@ -108,6 +108,34 @@ recipe bar [ ] +mem: storing 4 in location 1 +:(scenario recipe_handles_missing_bracket) +% Hide_errors = true; +recipe main +] ++error: recipe body must begin with '[' + +:(scenario recipe_handles_missing_bracket_2) +% Hide_errors = true; +recipe main + local-scope + { + } +] +# doesn't overflow line when reading header +-parse: header ingredient: local-scope ++error: recipe body must begin with '[' + +:(scenario recipe_handles_missing_bracket_3) +% Hide_errors = true; +recipe main # comment + local-scope + { + } +] +# doesn't overflow line when reading header +-parse: header ingredient: local-scope ++error: recipe body must begin with '[' + :(after "Begin debug_string(recipe x)") out << "ingredients:\n"; for (long long int i = 0; i < SIZE(x.ingredients); ++i) -- cgit 1.4.1-2-gfad0