diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2015-09-06 16:35:46 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2015-09-06 16:35:46 -0700 |
commit | 0e4a335edc7d4e584924fd6b298156e45d2626c8 (patch) | |
tree | 4bde00176d6d00b72462e856974fecd4411ef025 /html/013literal_string.cc.html | |
parent | 3cf4cc43f2622816777c22c49c32e5159574a1d3 (diff) | |
download | mu-0e4a335edc7d4e584924fd6b298156e45d2626c8.tar.gz |
2175
Diffstat (limited to 'html/013literal_string.cc.html')
-rw-r--r-- | html/013literal_string.cc.html | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/html/013literal_string.cc.html b/html/013literal_string.cc.html index 735e67e0..56fff30c 100644 --- a/html/013literal_string.cc.html +++ b/html/013literal_string.cc.html @@ -13,12 +13,11 @@ 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; } -.Identifier { color: #804000; } .cSpecial { color: #008000; } .Comment { color: #9090ff; } .Delimiter { color: #a04060; } .Special { color: #ff6060; } -.CommentedCode { color: #6c6c6c; } +.Identifier { color: #804000; } .Constant { color: #00a0a0; } .traceContains { color: #008000; } --> @@ -60,7 +59,6 @@ Type_ordinal[<span class="Constant">"literal-string"</span>] = <span c string result = slurp_quoted<span class="Delimiter">(</span>in<span class="Delimiter">);</span> skip_whitespace<span class="Delimiter">(</span>in<span class="Delimiter">);</span> skip_comment<span class="Delimiter">(</span>in<span class="Delimiter">);</span> -<span class="CommentedCode">//? cerr << '^' << result << "$\n"; //? 1</span> <span class="Identifier">return</span> result<span class="Delimiter">;</span> <span class="Delimiter">}</span> @@ -82,12 +80,10 @@ bool code_string<span class="Delimiter">(</span>istream& in<span class="Deli char c = in<span class="Delimiter">.</span>get<span class="Delimiter">();</span> if <span class="Delimiter">(</span>!isspace<span class="Delimiter">(</span>c<span class="Delimiter">))</span> <span class="Delimiter">{</span> in<span class="Delimiter">.</span>putback<span class="Delimiter">(</span>c<span class="Delimiter">);</span> -<span class="CommentedCode">//? cerr << "code_string: " << out.str() << '\n'; //? 1</span> <span class="Identifier">return</span> <span class="Constant">false</span><span class="Delimiter">;</span> <span class="Delimiter">}</span> out << c<span class="Delimiter">;</span> if <span class="Delimiter">(</span>c == <span class="cSpecial">'\n'</span><span class="Delimiter">)</span> <span class="Delimiter">{</span> -<span class="CommentedCode">//? cerr << "code_string: " << out.str() << '\n'; //? 1</span> <span class="Identifier">return</span> <span class="Constant">true</span><span class="Delimiter">;</span> <span class="Delimiter">}</span> <span class="Delimiter">}</span> @@ -97,18 +93,14 @@ bool code_string<span class="Delimiter">(</span>istream& in<span class="Deli <span class="Comment">// Read a regular string. Regular strings can only contain other regular</span> <span class="Comment">// strings.</span> void slurp_quoted_comment_oblivious<span class="Delimiter">(</span>istream& in<span class="Delimiter">,</span> ostringstream& out<span class="Delimiter">)</span> <span class="Delimiter">{</span> -<span class="CommentedCode">//? cerr << "comment oblivious\n"; //? 1</span> int brace_depth = <span class="Constant">1</span><span class="Delimiter">;</span> while <span class="Delimiter">(</span>!in<span class="Delimiter">.</span>eof<span class="Delimiter">())</span> <span class="Delimiter">{</span> char c = in<span class="Delimiter">.</span>get<span class="Delimiter">();</span> -<span class="CommentedCode">//? cerr << '%' << (int)c << ' ' << brace_depth << ": " << out.str() << "%$\n"; //? 1</span> -<span class="CommentedCode">//? cout << (int)c << ": " << brace_depth << '\n'; //? 2</span> if <span class="Delimiter">(</span>c == <span class="cSpecial">'\\'</span><span class="Delimiter">)</span> <span class="Delimiter">{</span> out << static_cast<char><span class="Delimiter">(</span>in<span class="Delimiter">.</span>get<span class="Delimiter">());</span> <span class="Identifier">continue</span><span class="Delimiter">;</span> <span class="Delimiter">}</span> out << c<span class="Delimiter">;</span> -<span class="CommentedCode">//? cout << out.str() << "$\n"; //? 1</span> if <span class="Delimiter">(</span>c == <span class="Constant">'['</span><span class="Delimiter">)</span> ++brace_depth<span class="Delimiter">;</span> if <span class="Delimiter">(</span>c == <span class="Constant">']'</span><span class="Delimiter">)</span> --brace_depth<span class="Delimiter">;</span> if <span class="Delimiter">(</span>brace_depth == <span class="Constant">0</span><span class="Delimiter">)</span> <span class="Identifier">break</span><span class="Delimiter">;</span> @@ -121,10 +113,8 @@ void slurp_quoted_comment_oblivious<span class="Delimiter">(</span>istream& <span class="Comment">// Read a code string. Code strings can contain either code or regular strings.</span> void slurp_quoted_comment_aware<span class="Delimiter">(</span>istream& in<span class="Delimiter">,</span> ostringstream& out<span class="Delimiter">)</span> <span class="Delimiter">{</span> -<span class="CommentedCode">//? cerr << "comment aware\n"; //? 1</span> char c<span class="Delimiter">;</span> while <span class="Delimiter">(</span>in >> c<span class="Delimiter">)</span> <span class="Delimiter">{</span> -<span class="CommentedCode">//? cerr << '^' << (int)c << ": " << out.str() << "$\n"; //? 1</span> if <span class="Delimiter">(</span>c == <span class="cSpecial">'\\'</span><span class="Delimiter">)</span> <span class="Delimiter">{</span> out << static_cast<char><span class="Delimiter">(</span>in<span class="Delimiter">.</span>get<span class="Delimiter">());</span> <span class="Identifier">continue</span><span class="Delimiter">;</span> |