diff options
Diffstat (limited to 'html/subx/001help.cc.html')
-rw-r--r-- | html/subx/001help.cc.html | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/html/subx/001help.cc.html b/html/subx/001help.cc.html index aed0d399..63ed444d 100644 --- a/html/subx/001help.cc.html +++ b/html/subx/001help.cc.html @@ -133,13 +133,13 @@ if ('onhashchange' in window) { <span id="L73" class="LineNr"> 73 </span> <span class="Constant">" subx --help</span><span class="cSpecial">\n</span><span class="Constant">"</span> <span id="L74" class="LineNr"> 74 </span> <span class="Constant">"- Convert a textual SubX <a href='011run.cc.html#L99'>program</a> into a standard ELF binary that you can</span><span class="cSpecial">\n</span><span class="Constant">"</span> <span id="L75" class="LineNr"> 75 </span> <span class="Constant">" <a href='011run.cc.html#L83'>run</a> on your computer:</span><span class="cSpecial">\n</span><span class="Constant">"</span> -<span id="L76" class="LineNr"> 76 </span> <span class="Constant">" subx translate <input 'source' file> <output ELF binary></span><span class="cSpecial">\n</span><span class="Constant">"</span> +<span id="L76" class="LineNr"> 76 </span> <span class="Constant">" subx translate input1.subx intput2.subx ... -o <output ELF binary></span><span class="cSpecial">\n</span><span class="Constant">"</span> <span id="L77" class="LineNr"> 77 </span> <span class="Constant">"- Run a SubX binary using SubX itself (for better error messages):</span><span class="cSpecial">\n</span><span class="Constant">"</span> <span id="L78" class="LineNr"> 78 </span> <span class="Constant">" subx <a href='011run.cc.html#L83'>run</a> <ELF binary></span><span class="cSpecial">\n</span><span class="Constant">"</span> <span id="L79" class="LineNr"> 79 </span> <span class="Constant">"Add '--trace' to any of these commands to also emit a <a href='003trace.cc.html#L204'>trace</a>, for debugging purposes.</span><span class="cSpecial">\n</span><span class="Constant">"</span> <span id="L80" class="LineNr"> 80 </span> <span class="Constant">"However, options starting with '--' must always come before any other arguments.</span><span class="cSpecial">\n</span><span class="Constant">"</span> <span id="L81" class="LineNr"> 81 </span> <span class="Constant">"</span><span class="cSpecial">\n</span><span class="Constant">"</span> -<span id="L82" class="LineNr"> 82 </span> <span class="Constant">"To <a href='011run.cc.html#L108'>start</a> learning how to write SubX programs, <a href='011run.cc.html#L83'>run</a>:</span><span class="cSpecial">\n</span><span class="Constant">"</span> +<span id="L82" class="LineNr"> 82 </span> <span class="Constant">"To start learning how to write SubX programs, <a href='011run.cc.html#L83'>run</a>:</span><span class="cSpecial">\n</span><span class="Constant">"</span> <span id="L83" class="LineNr"> 83 </span> <span class="Constant">" subx help</span><span class="cSpecial">\n</span><span class="Constant">"</span> <span id="L84" class="LineNr"> 84 </span> <span class="Delimiter">);</span> <span id="L85" class="LineNr"> 85 </span> <span class="Comment">// End Help Texts</span> @@ -152,9 +152,9 @@ if ('onhashchange' in window) { <span id="L92" class="LineNr"> 92 </span> <span id="L93" class="LineNr"> 93 </span><span class="Normal">bool</span> <a href='001help.cc.html#L93'>starts_with</a><span class="Delimiter">(</span><span class="Normal">const</span> string& s<span class="Delimiter">,</span> <span class="Normal">const</span> string& pat<span class="Delimiter">)</span> <span class="Delimiter">{</span> <span id="L94" class="LineNr"> 94 </span> string::const_iterator a=s<span class="Delimiter">.</span>begin<span class="Delimiter">(),</span> b=pat<span class="Delimiter">.</span>begin<span class="Delimiter">();</span> -<span id="L95" class="LineNr"> 95 </span> <span class="Normal">for</span> <span class="Delimiter">(</span><span class="Comment">/*</span><span class="Comment">nada</span><span class="Comment">*/</span><span class="Delimiter">;</span> a!=s<span class="Delimiter">.</span><a href='003trace.cc.html#L230'>end</a><span class="Delimiter">()</span> && b!=pat<span class="Delimiter">.</span><a href='003trace.cc.html#L230'>end</a><span class="Delimiter">();</span> ++a<span class="Delimiter">,</span> ++b<span class="Delimiter">)</span> +<span id="L95" class="LineNr"> 95 </span> <span class="Normal">for</span> <span class="Delimiter">(</span><span class="Comment">/*</span><span class="Comment">nada</span><span class="Comment">*/</span><span class="Delimiter">;</span> a!=s<span class="Delimiter">.</span>end<span class="Delimiter">()</span> && b!=pat<span class="Delimiter">.</span>end<span class="Delimiter">();</span> ++a<span class="Delimiter">,</span> ++b<span class="Delimiter">)</span> <span id="L96" class="LineNr"> 96 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>*a != *b<span class="Delimiter">)</span> <span class="Identifier">return</span><span class="Constant"> false</span><span class="Delimiter">;</span> -<span id="L97" class="LineNr"> 97 </span> <span class="Identifier">return</span> b == pat<span class="Delimiter">.</span><a href='003trace.cc.html#L230'>end</a><span class="Delimiter">();</span> +<span id="L97" class="LineNr"> 97 </span> <span class="Identifier">return</span> b == pat<span class="Delimiter">.</span>end<span class="Delimiter">();</span> <span id="L98" class="LineNr"> 98 </span><span class="Delimiter">}</span> <span id="L99" class="LineNr"> 99 </span> <span id="L100" class="LineNr">100 </span><span class="Comment">//: I'll throw some style conventions here for want of a better place for them.</span> @@ -206,7 +206,7 @@ if ('onhashchange' in window) { <span id="L146" class="LineNr">146 </span><span class="Comment">//: yadda-yadda. Instead use this macro below to perform an unsafe cast to</span> <span id="L147" class="LineNr">147 </span><span class="Comment">//: signed. We'll just give up immediately if a container's ever too large.</span> <span id="L148" class="LineNr">148 </span><span class="Comment">//: Basically, Mu is not concerned about this being a little slower than it</span> -<span id="L149" class="LineNr">149 </span><span class="Comment">//: could be. (<a href="https://gist.github.com/rygorous/e0f055bfb74e3d5f0af20690759de5a7">https://gist.github.com/rygorous/e0f055bfb74e3d5f0af20690759de5a7)</a></span> +<span id="L149" class="LineNr">149 </span><span class="Comment">//: could be. (<a href="https://gist.github.com/rygorous/e0f055bfb74e3d5f0af20690759de5a7">https://gist.github.com/rygorous/e0f055bfb74e3d5f0af20690759de5a7</a>)</span> <span id="L150" class="LineNr">150 </span><span class="Comment">//:</span> <span id="L151" class="LineNr">151 </span><span class="Comment">//: Addendum to corollary: We're going to uniformly use int everywhere, to</span> <span id="L152" class="LineNr">152 </span><span class="Comment">//: indicate that we're oblivious to number size, and since Clang on 32-bit</span> @@ -286,17 +286,17 @@ if ('onhashchange' in window) { <span id="L226" class="LineNr">226 </span><span class="Comment">// from <a href="http://stackoverflow.com/questions/152643/idiomatic-c-for-reading-from-a-const-map">http://stackoverflow.com/questions/152643/idiomatic-c-for-reading-from-a-const-map</a></span> <span id="L227" class="LineNr">227 </span><span class="Normal">template</span><<span class="Normal">typename</span> T> <span class="Normal">typename</span> T::mapped_type& get<span class="Delimiter">(</span>T& map<span class="Delimiter">,</span> <span class="Normal">typename</span> T::key_type <span class="Normal">const</span>& key<span class="Delimiter">)</span> <span class="Delimiter">{</span> <span id="L228" class="LineNr">228 </span> <span class="Normal">typename</span> T::iterator iter<span class="Delimiter">(</span>map<span class="Delimiter">.</span>find<span class="Delimiter">(</span>key<span class="Delimiter">));</span> -<span id="L229" class="LineNr">229 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>iter == map<span class="Delimiter">.</span><a href='003trace.cc.html#L230'>end</a><span class="Delimiter">())</span> <span class="Delimiter">{</span> +<span id="L229" class="LineNr">229 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>iter == map<span class="Delimiter">.</span>end<span class="Delimiter">())</span> <span class="Delimiter">{</span> <span id="L230" class="LineNr">230 </span> cerr << <span class="Constant">"get couldn't find key '"</span> << key << <span class="Constant">"'</span><span class="cSpecial">\n</span><span class="Constant">"</span><span class="Delimiter">;</span> -<span id="L231" class="LineNr">231 </span> assert<span class="Delimiter">(</span>iter != map<span class="Delimiter">.</span><a href='003trace.cc.html#L230'>end</a><span class="Delimiter">());</span> +<span id="L231" class="LineNr">231 </span> assert<span class="Delimiter">(</span>iter != map<span class="Delimiter">.</span>end<span class="Delimiter">());</span> <span id="L232" class="LineNr">232 </span> <span class="Delimiter">}</span> <span id="L233" class="LineNr">233 </span> <span class="Identifier">return</span> iter<span class="Delimiter">-></span>second<span class="Delimiter">;</span> <span id="L234" class="LineNr">234 </span><span class="Delimiter">}</span> <span id="L235" class="LineNr">235 </span><span class="Normal">template</span><<span class="Normal">typename</span> T> <span class="Normal">typename</span> T::mapped_type <span class="Normal">const</span>& get<span class="Delimiter">(</span><span class="Normal">const</span> T& map<span class="Delimiter">,</span> <span class="Normal">typename</span> T::key_type <span class="Normal">const</span>& key<span class="Delimiter">)</span> <span class="Delimiter">{</span> <span id="L236" class="LineNr">236 </span> <span class="Normal">typename</span> T::const_iterator iter<span class="Delimiter">(</span>map<span class="Delimiter">.</span>find<span class="Delimiter">(</span>key<span class="Delimiter">));</span> -<span id="L237" class="LineNr">237 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>iter == map<span class="Delimiter">.</span><a href='003trace.cc.html#L230'>end</a><span class="Delimiter">())</span> <span class="Delimiter">{</span> +<span id="L237" class="LineNr">237 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>iter == map<span class="Delimiter">.</span>end<span class="Delimiter">())</span> <span class="Delimiter">{</span> <span id="L238" class="LineNr">238 </span> cerr << <span class="Constant">"get couldn't find key '"</span> << key << <span class="Constant">"'</span><span class="cSpecial">\n</span><span class="Constant">"</span><span class="Delimiter">;</span> -<span id="L239" class="LineNr">239 </span> assert<span class="Delimiter">(</span>iter != map<span class="Delimiter">.</span><a href='003trace.cc.html#L230'>end</a><span class="Delimiter">());</span> +<span id="L239" class="LineNr">239 </span> assert<span class="Delimiter">(</span>iter != map<span class="Delimiter">.</span>end<span class="Delimiter">());</span> <span id="L240" class="LineNr">240 </span> <span class="Delimiter">}</span> <span id="L241" class="LineNr">241 </span> <span class="Identifier">return</span> iter<span class="Delimiter">-></span>second<span class="Delimiter">;</span> <span id="L242" class="LineNr">242 </span><span class="Delimiter">}</span> @@ -305,7 +305,7 @@ if ('onhashchange' in window) { <span id="L245" class="LineNr">245 </span> <span class="Identifier">return</span> map[key]<span class="Delimiter">;</span> <span id="L246" class="LineNr">246 </span><span class="Delimiter">}</span> <span id="L247" class="LineNr">247 </span><span class="Normal">template</span><<span class="Normal">typename</span> T> <span class="Normal">bool</span> <a href='001help.cc.html#L247'>contains_key</a><span class="Delimiter">(</span>T& map<span class="Delimiter">,</span> <span class="Normal">typename</span> T::key_type <span class="Normal">const</span>& key<span class="Delimiter">)</span> <span class="Delimiter">{</span> -<span id="L248" class="LineNr">248 </span> <span class="Identifier">return</span> map<span class="Delimiter">.</span>find<span class="Delimiter">(</span>key<span class="Delimiter">)</span> != map<span class="Delimiter">.</span><a href='003trace.cc.html#L230'>end</a><span class="Delimiter">();</span> +<span id="L248" class="LineNr">248 </span> <span class="Identifier">return</span> map<span class="Delimiter">.</span>find<span class="Delimiter">(</span>key<span class="Delimiter">)</span> != map<span class="Delimiter">.</span>end<span class="Delimiter">();</span> <span id="L249" class="LineNr">249 </span><span class="Delimiter">}</span> <span id="L250" class="LineNr">250 </span><span class="Normal">template</span><<span class="Normal">typename</span> T> <span class="Normal">typename</span> T::mapped_type& <a href='001help.cc.html#L250'>get_or_insert</a><span class="Delimiter">(</span>T& map<span class="Delimiter">,</span> <span class="Normal">typename</span> T::key_type <span class="Normal">const</span>& key<span class="Delimiter">)</span> <span class="Delimiter">{</span> <span id="L251" class="LineNr">251 </span> <span class="Identifier">return</span> map[key]<span class="Delimiter">;</span> |