diff options
Diffstat (limited to 'html/examples')
-rw-r--r-- | html/examples/ex1.subx.html | 4 | ||||
-rw-r--r-- | html/examples/ex10.subx.html | 8 | ||||
-rw-r--r-- | html/examples/ex11.subx.html | 14 | ||||
-rw-r--r-- | html/examples/ex12.subx.html | 6 | ||||
-rw-r--r-- | html/examples/ex2.subx.html | 4 | ||||
-rw-r--r-- | html/examples/ex3.subx.html | 6 | ||||
-rw-r--r-- | html/examples/ex4.subx.html | 6 | ||||
-rw-r--r-- | html/examples/ex5.subx.html | 6 | ||||
-rw-r--r-- | html/examples/ex6.subx.html | 6 | ||||
-rw-r--r-- | html/examples/ex7.subx.html | 6 | ||||
-rw-r--r-- | html/examples/ex8.subx.html | 8 | ||||
-rw-r--r-- | html/examples/ex9.subx.html | 8 |
12 files changed, 41 insertions, 41 deletions
diff --git a/html/examples/ex1.subx.html b/html/examples/ex1.subx.html index 15b7a0de..2f69914a 100644 --- a/html/examples/ex1.subx.html +++ b/html/examples/ex1.subx.html @@ -15,9 +15,9 @@ body { font-size:12pt; font-family: monospace; color: #000000; background-color: a { color:inherit; } * { font-size:12pt; font-size: 1em; } .subxComment { color: #005faf; } +.subxS2Comment { color: #8a8a8a; } .LineNr { } .SpecialChar { color: #d70000; } -.subxS2Comment { color: #8a8a8a; } --> </style> @@ -56,7 +56,7 @@ if ('onhashchange' in window) { <span id="L1" class="LineNr"> 1 </span><span class="subxComment"># First program: same as <a href="https://www.muppetlabs.com/~breadbox/software/tiny/teensy.html">https://www.muppetlabs.com/~breadbox/software/tiny/teensy.html</a></span> <span id="L2" class="LineNr"> 2 </span><span class="subxComment"># Just return 42.</span> <span id="L3" class="LineNr"> 3 </span><span class="subxComment">#</span> -<span id="L4" class="LineNr"> 4 </span><span class="subxComment"># To run (from the subx directory):</span> +<span id="L4" class="LineNr"> 4 </span><span class="subxComment"># To run:</span> <span id="L5" class="LineNr"> 5 </span><span class="subxComment"># $ ./subx translate examples/ex1.2.subx -o examples/ex1</span> <span id="L6" class="LineNr"> 6 </span><span class="subxComment"># $ ./subx run examples/ex1</span> <span id="L7" class="LineNr"> 7 </span><span class="subxComment"># Expected result:</span> diff --git a/html/examples/ex10.subx.html b/html/examples/ex10.subx.html index dbe4a83c..c2242bc1 100644 --- a/html/examples/ex10.subx.html +++ b/html/examples/ex10.subx.html @@ -15,13 +15,13 @@ body { font-size:12pt; font-family: monospace; color: #000000; background-color: a { color:inherit; } * { font-size:12pt; font-size: 1em; } .subxComment { color: #005faf; } -.subxS1Comment { color: #0000af; } +.subxS2Comment { color: #8a8a8a; } +.subxFunction { color: #af5f00; text-decoration: underline; } .LineNr { } +.subxS1Comment { color: #0000af; } .SpecialChar { color: #d70000; } .Normal { color: #000000; background-color: #c6c6c6; padding-bottom: 1px; } -.subxFunction { color: #af5f00; text-decoration: underline; } .Constant { color: #008787; } -.subxS2Comment { color: #8a8a8a; } --> </style> @@ -59,7 +59,7 @@ if ('onhashchange' in window) { <pre id='vimCodeElement'> <span id="L1" class="LineNr"> 1 </span><span class="subxComment"># String comparison: return 1 iff the two args passed in at the commandline are equal.</span> <span id="L2" class="LineNr"> 2 </span><span class="subxComment">#</span> -<span id="L3" class="LineNr"> 3 </span><span class="subxComment"># To run (from the subx directory):</span> +<span id="L3" class="LineNr"> 3 </span><span class="subxComment"># To run:</span> <span id="L4" class="LineNr"> 4 </span><span class="subxComment"># $ ./subx translate examples/ex10.subx -o examples/ex10</span> <span id="L5" class="LineNr"> 5 </span><span class="subxComment"># $ ./subx run examples/ex10 abc abd</span> <span id="L6" class="LineNr"> 6 </span><span class="subxComment"># Expected result:</span> diff --git a/html/examples/ex11.subx.html b/html/examples/ex11.subx.html index b151ed11..131e587a 100644 --- a/html/examples/ex11.subx.html +++ b/html/examples/ex11.subx.html @@ -14,17 +14,17 @@ pre { font-family: monospace; color: #000000; background-color: #c6c6c6; } body { font-size:12pt; font-family: monospace; color: #000000; background-color: #c6c6c6; } a { color:inherit; } * { font-size:12pt; font-size: 1em; } -.subxS2Comment { color: #8a8a8a; } -.subxH1Comment { color: #005faf; text-decoration: underline; } .subxComment { color: #005faf; } -.subxS1Comment { color: #0000af; } +.subxFunction { color: #af5f00; text-decoration: underline; } .LineNr { } +.subxS1Comment { color: #0000af; } +.subxTest { color: #5f8700; } .SpecialChar { color: #d70000; } .Normal { color: #000000; background-color: #c6c6c6; padding-bottom: 1px; } -.subxFunction { color: #af5f00; text-decoration: underline; } -.Constant { color: #008787; } .subxMinorFunction { color: #875f5f; } -.subxTest { color: #5f8700; } +.Constant { color: #008787; } +.subxS2Comment { color: #8a8a8a; } +.subxH1Comment { color: #005faf; text-decoration: underline; } --> </style> @@ -67,7 +67,7 @@ if ('onhashchange' in window) { <span id="L5" class="LineNr"> 5 </span><span class="subxComment"># kernel in a few places. This layer implements a function for comparing</span> <span id="L6" class="LineNr"> 6 </span><span class="subxComment"># a null-terminated 'kernel string' with a length-prefixed 'SubX string'.</span> <span id="L7" class="LineNr"> 7 </span><span class="subxComment">#</span> -<span id="L8" class="LineNr"> 8 </span><span class="subxComment"># To run (from the subx directory):</span> +<span id="L8" class="LineNr"> 8 </span><span class="subxComment"># To run:</span> <span id="L9" class="LineNr"> 9 </span><span class="subxComment"># $ ./subx translate examples/ex11.subx -o examples/ex11</span> <span id="L10" class="LineNr"> 10 </span><span class="subxComment"># $ ./subx run examples/ex11 # runs a series of tests</span> <span id="L11" class="LineNr"> 11 </span><span class="subxComment"># ...... # all tests pass</span> diff --git a/html/examples/ex12.subx.html b/html/examples/ex12.subx.html index 684dc278..0694e505 100644 --- a/html/examples/ex12.subx.html +++ b/html/examples/ex12.subx.html @@ -15,11 +15,11 @@ body { font-size:12pt; font-family: monospace; color: #000000; background-color: a { color:inherit; } * { font-size:12pt; font-size: 1em; } .subxComment { color: #005faf; } -.subxS1Comment { color: #0000af; } +.subxS2Comment { color: #8a8a8a; } .LineNr { } +.subxS1Comment { color: #0000af; } .SpecialChar { color: #d70000; } .Normal { color: #000000; background-color: #c6c6c6; padding-bottom: 1px; } -.subxS2Comment { color: #8a8a8a; } --> </style> @@ -58,7 +58,7 @@ if ('onhashchange' in window) { <span id="L1" class="LineNr"> 1 </span><span class="subxComment"># Example showing mmap syscall.</span> <span id="L2" class="LineNr"> 2 </span><span class="subxComment"># Create a new segment using mmap, save the address, write to it.</span> <span id="L3" class="LineNr"> 3 </span><span class="subxComment">#</span> -<span id="L4" class="LineNr"> 4 </span><span class="subxComment"># To run (from the subx directory):</span> +<span id="L4" class="LineNr"> 4 </span><span class="subxComment"># To run:</span> <span id="L5" class="LineNr"> 5 </span><span class="subxComment"># $ ./subx translate examples/ex12.subx -o examples/ex12</span> <span id="L6" class="LineNr"> 6 </span><span class="subxComment"># $ ./subx run examples/ex12</span> <span id="L7" class="LineNr"> 7 </span><span class="subxComment"># You shouldn't get a segmentation fault.</span> diff --git a/html/examples/ex2.subx.html b/html/examples/ex2.subx.html index 5c0cef8a..fd34b63f 100644 --- a/html/examples/ex2.subx.html +++ b/html/examples/ex2.subx.html @@ -15,9 +15,9 @@ body { font-size:12pt; font-family: monospace; color: #000000; background-color: a { color:inherit; } * { font-size:12pt; font-size: 1em; } .subxComment { color: #005faf; } +.subxS2Comment { color: #8a8a8a; } .LineNr { } .SpecialChar { color: #d70000; } -.subxS2Comment { color: #8a8a8a; } --> </style> @@ -55,7 +55,7 @@ if ('onhashchange' in window) { <pre id='vimCodeElement'> <span id="L1" class="LineNr"> 1 </span><span class="subxComment"># Add 1 and 1, and return the result in the exit code.</span> <span id="L2" class="LineNr"> 2 </span><span class="subxComment">#</span> -<span id="L3" class="LineNr"> 3 </span><span class="subxComment"># To run (from the subx directory):</span> +<span id="L3" class="LineNr"> 3 </span><span class="subxComment"># To run:</span> <span id="L4" class="LineNr"> 4 </span><span class="subxComment"># $ ./subx translate examples/ex2.subx -o examples/ex2</span> <span id="L5" class="LineNr"> 5 </span><span class="subxComment"># $ ./subx run examples/ex2</span> <span id="L6" class="LineNr"> 6 </span><span class="subxComment"># Expected result:</span> diff --git a/html/examples/ex3.subx.html b/html/examples/ex3.subx.html index 198fd9c7..9a9ff088 100644 --- a/html/examples/ex3.subx.html +++ b/html/examples/ex3.subx.html @@ -15,12 +15,12 @@ body { font-size:12pt; font-family: monospace; color: #000000; background-color: a { color:inherit; } * { font-size:12pt; font-size: 1em; } .subxComment { color: #005faf; } -.subxS1Comment { color: #0000af; } +.subxS2Comment { color: #8a8a8a; } .LineNr { } +.subxS1Comment { color: #0000af; } .SpecialChar { color: #d70000; } .Constant { color: #008787; } .Normal { color: #000000; background-color: #c6c6c6; padding-bottom: 1px; } -.subxS2Comment { color: #8a8a8a; } --> </style> @@ -58,7 +58,7 @@ if ('onhashchange' in window) { <pre id='vimCodeElement'> <span id="L1" class="LineNr"> 1 </span><span class="subxComment"># Add the first 10 numbers, and return the result in the exit code.</span> <span id="L2" class="LineNr"> 2 </span><span class="subxComment">#</span> -<span id="L3" class="LineNr"> 3 </span><span class="subxComment"># To run (from the subx directory):</span> +<span id="L3" class="LineNr"> 3 </span><span class="subxComment"># To run:</span> <span id="L4" class="LineNr"> 4 </span><span class="subxComment"># $ ./subx translate examples/ex3.subx -o examples/ex3</span> <span id="L5" class="LineNr"> 5 </span><span class="subxComment"># $ ./subx run examples/ex3</span> <span id="L6" class="LineNr"> 6 </span><span class="subxComment"># Expected result:</span> diff --git a/html/examples/ex4.subx.html b/html/examples/ex4.subx.html index 3b637ef6..2c76ae70 100644 --- a/html/examples/ex4.subx.html +++ b/html/examples/ex4.subx.html @@ -15,10 +15,10 @@ body { font-size:12pt; font-family: monospace; color: #000000; background-color: a { color:inherit; } * { font-size:12pt; font-size: 1em; } .subxComment { color: #005faf; } -.subxS1Comment { color: #0000af; } +.subxS2Comment { color: #8a8a8a; } .LineNr { } +.subxS1Comment { color: #0000af; } .SpecialChar { color: #d70000; } -.subxS2Comment { color: #8a8a8a; } --> </style> @@ -56,7 +56,7 @@ if ('onhashchange' in window) { <pre id='vimCodeElement'> <span id="L1" class="LineNr"> 1 </span><span class="subxComment"># Read a character from stdin, save it to a global, write it to stdout.</span> <span id="L2" class="LineNr"> 2 </span><span class="subxComment">#</span> -<span id="L3" class="LineNr"> 3 </span><span class="subxComment"># To run (from the subx directory):</span> +<span id="L3" class="LineNr"> 3 </span><span class="subxComment"># To run:</span> <span id="L4" class="LineNr"> 4 </span><span class="subxComment"># $ ./subx translate examples/ex4.subx -o examples/ex4</span> <span id="L5" class="LineNr"> 5 </span><span class="subxComment"># $ ./subx run examples/ex4</span> <span id="L6" class="LineNr"> 6 </span> diff --git a/html/examples/ex5.subx.html b/html/examples/ex5.subx.html index 13af1b8d..62b48e8a 100644 --- a/html/examples/ex5.subx.html +++ b/html/examples/ex5.subx.html @@ -15,11 +15,11 @@ body { font-size:12pt; font-family: monospace; color: #000000; background-color: a { color:inherit; } * { font-size:12pt; font-size: 1em; } .subxComment { color: #005faf; } -.subxS1Comment { color: #0000af; } +.subxS2Comment { color: #8a8a8a; } .LineNr { } +.subxS1Comment { color: #0000af; } .SpecialChar { color: #d70000; } .Normal { color: #000000; background-color: #c6c6c6; padding-bottom: 1px; } -.subxS2Comment { color: #8a8a8a; } --> </style> @@ -57,7 +57,7 @@ if ('onhashchange' in window) { <pre id='vimCodeElement'> <span id="L1" class="LineNr"> 1 </span><span class="subxComment"># Read a character from stdin, save it to a local on the stack, write it to stdout.</span> <span id="L2" class="LineNr"> 2 </span><span class="subxComment">#</span> -<span id="L3" class="LineNr"> 3 </span><span class="subxComment"># To run (from the subx directory):</span> +<span id="L3" class="LineNr"> 3 </span><span class="subxComment"># To run:</span> <span id="L4" class="LineNr"> 4 </span><span class="subxComment"># $ ./subx translate examples/ex5.subx -o examples/ex5</span> <span id="L5" class="LineNr"> 5 </span><span class="subxComment"># $ ./subx run examples/ex5</span> <span id="L6" class="LineNr"> 6 </span> diff --git a/html/examples/ex6.subx.html b/html/examples/ex6.subx.html index faedfdfd..140d68c3 100644 --- a/html/examples/ex6.subx.html +++ b/html/examples/ex6.subx.html @@ -15,11 +15,11 @@ body { font-size:12pt; font-family: monospace; color: #000000; background-color: a { color:inherit; } * { font-size:12pt; font-size: 1em; } .subxComment { color: #005faf; } -.subxS1Comment { color: #0000af; } +.subxS2Comment { color: #8a8a8a; } .LineNr { } +.subxS1Comment { color: #0000af; } .SpecialChar { color: #d70000; } .Normal { color: #000000; background-color: #c6c6c6; padding-bottom: 1px; } -.subxS2Comment { color: #8a8a8a; } --> </style> @@ -57,7 +57,7 @@ if ('onhashchange' in window) { <pre id='vimCodeElement'> <span id="L1" class="LineNr"> 1 </span><span class="subxComment"># Print out a (global variable) string to stdout.</span> <span id="L2" class="LineNr"> 2 </span><span class="subxComment">#</span> -<span id="L3" class="LineNr"> 3 </span><span class="subxComment"># To run (from the subx directory):</span> +<span id="L3" class="LineNr"> 3 </span><span class="subxComment"># To run:</span> <span id="L4" class="LineNr"> 4 </span><span class="subxComment"># $ ./subx translate examples/ex6.subx -o examples/ex6</span> <span id="L5" class="LineNr"> 5 </span><span class="subxComment"># $ ./subx run examples/ex6</span> <span id="L6" class="LineNr"> 6 </span><span class="subxComment"># Hello, world!</span> diff --git a/html/examples/ex7.subx.html b/html/examples/ex7.subx.html index 6c897547..2df98c2e 100644 --- a/html/examples/ex7.subx.html +++ b/html/examples/ex7.subx.html @@ -15,11 +15,11 @@ body { font-size:12pt; font-family: monospace; color: #000000; background-color: a { color:inherit; } * { font-size:12pt; font-size: 1em; } .subxComment { color: #005faf; } -.subxS1Comment { color: #0000af; } +.subxS2Comment { color: #8a8a8a; } .LineNr { } +.subxS1Comment { color: #0000af; } .SpecialChar { color: #d70000; } .Normal { color: #000000; background-color: #c6c6c6; padding-bottom: 1px; } -.subxS2Comment { color: #8a8a8a; } --> </style> @@ -61,7 +61,7 @@ if ('onhashchange' in window) { <span id="L4" class="LineNr"> 4 </span><span class="subxComment"># it for reading, read a character from it, close it, delete it, and return</span> <span id="L5" class="LineNr"> 5 </span><span class="subxComment"># the character read.</span> <span id="L6" class="LineNr"> 6 </span><span class="subxComment">#</span> -<span id="L7" class="LineNr"> 7 </span><span class="subxComment"># To run (from the subx directory):</span> +<span id="L7" class="LineNr"> 7 </span><span class="subxComment"># To run:</span> <span id="L8" class="LineNr"> 8 </span><span class="subxComment"># $ ./subx translate examples/ex7.subx -o examples/ex7</span> <span id="L9" class="LineNr"> 9 </span><span class="subxComment"># $ ./subx run examples/ex7</span> <span id="L10" class="LineNr"> 10 </span><span class="subxComment"># Expected result:</span> diff --git a/html/examples/ex8.subx.html b/html/examples/ex8.subx.html index bb689d42..51234836 100644 --- a/html/examples/ex8.subx.html +++ b/html/examples/ex8.subx.html @@ -15,13 +15,13 @@ body { font-size:12pt; font-family: monospace; color: #000000; background-color: a { color:inherit; } * { font-size:12pt; font-size: 1em; } .subxComment { color: #005faf; } -.subxS1Comment { color: #0000af; } +.subxS2Comment { color: #8a8a8a; } +.subxFunction { color: #af5f00; text-decoration: underline; } .LineNr { } +.subxS1Comment { color: #0000af; } .SpecialChar { color: #d70000; } .Normal { color: #000000; background-color: #c6c6c6; padding-bottom: 1px; } -.subxFunction { color: #af5f00; text-decoration: underline; } .Constant { color: #008787; } -.subxS2Comment { color: #8a8a8a; } --> </style> @@ -59,7 +59,7 @@ if ('onhashchange' in window) { <pre id='vimCodeElement'> <span id="L1" class="LineNr"> 1 </span><span class="subxComment"># Example reading commandline arguments: compute length of first arg.</span> <span id="L2" class="LineNr"> 2 </span><span class="subxComment">#</span> -<span id="L3" class="LineNr"> 3 </span><span class="subxComment"># To run (from the subx directory):</span> +<span id="L3" class="LineNr"> 3 </span><span class="subxComment"># To run:</span> <span id="L4" class="LineNr"> 4 </span><span class="subxComment"># $ ./subx translate examples/ex8.subx -o examples/ex8</span> <span id="L5" class="LineNr"> 5 </span><span class="subxComment"># $ ./subx run examples/ex8 abc de fghi</span> <span id="L6" class="LineNr"> 6 </span><span class="subxComment"># Expected result:</span> diff --git a/html/examples/ex9.subx.html b/html/examples/ex9.subx.html index 52e78b3a..e497713e 100644 --- a/html/examples/ex9.subx.html +++ b/html/examples/ex9.subx.html @@ -15,12 +15,12 @@ body { font-size:12pt; font-family: monospace; color: #000000; background-color: a { color:inherit; } * { font-size:12pt; font-size: 1em; } .subxComment { color: #005faf; } -.subxS1Comment { color: #0000af; } +.subxS2Comment { color: #8a8a8a; } +.subxFunction { color: #af5f00; text-decoration: underline; } .LineNr { } +.subxS1Comment { color: #0000af; } .SpecialChar { color: #d70000; } .Normal { color: #000000; background-color: #c6c6c6; padding-bottom: 1px; } -.subxFunction { color: #af5f00; text-decoration: underline; } -.subxS2Comment { color: #8a8a8a; } --> </style> @@ -61,7 +61,7 @@ if ('onhashchange' in window) { <span id="L3" class="LineNr"> 3 </span><span class="subxComment"># Show difference between ascii codes of first letter of first arg and first</span> <span id="L4" class="LineNr"> 4 </span><span class="subxComment"># letter of second arg.</span> <span id="L5" class="LineNr"> 5 </span><span class="subxComment">#</span> -<span id="L6" class="LineNr"> 6 </span><span class="subxComment"># To run (from the subx directory):</span> +<span id="L6" class="LineNr"> 6 </span><span class="subxComment"># To run:</span> <span id="L7" class="LineNr"> 7 </span><span class="subxComment"># $ ./subx translate examples/ex9.subx -o examples/ex9</span> <span id="L8" class="LineNr"> 8 </span><span class="subxComment"># $ ./subx run examples/ex9 z x</span> <span id="L9" class="LineNr"> 9 </span><span class="subxComment"># Expected result:</span> |