source: project/release/4/colorize/trunk/tests/quickrep.scheme.expected @ 26711

Last change on this file since 26711 was 26711, checked in by sjamaan, 9 years ago

colorize: And another, slightly larger example from the wiki

File size: 2.1 KB
Line 
1
2<span class="paren1">(<span class="default">use irregex</span>)</span> <span class="comment">; irregex, the regular expression library, is one of the
3</span>               <span class="comment">; libraries included with CHICKEN.
4</span>
5<span class="paren1">(<span class="default"><i><span class="symbol">define</span></i> <span class="paren2">(<span class="default">process-line line re rplc</span>)</span>
6  <span class="paren2">(<span class="default">irregex-replace/all re line rplc</span>)</span></span>)</span>
7
8<span class="paren1">(<span class="default"><i><span class="symbol">define</span></i> <span class="paren2">(<span class="default">quickrep re rplc</span>)</span>
9  <span class="paren2">(<span class="default"><i><span class="symbol">let</span></i> <span class="paren3">(<span class="default"><span class="paren4">(<span class="default">line <span class="paren5">(<span class="default">read-line</span>)</span></span>)</span></span>)</span>
10    <span class="paren3">(<span class="default"><i><span class="symbol">if</span></i> <span class="paren4">(<span class="default">not <span class="paren5">(<span class="default">eof-object? line</span>)</span></span>)</span>
11        <span class="paren4">(<span class="default">begin
12          <span class="paren5">(<span class="default">display <span class="paren6">(<span class="default">process-line line re rplc</span>)</span></span>)</span>
13          <span class="paren5">(<span class="default">newline</span>)</span>
14          <span class="paren5">(<span class="default">quickrep re rplc</span>)</span></span>)</span></span>)</span></span>)</span></span>)</span>
15
16<span class="comment">;;; Does a lousy job of error checking!
17</span><span class="paren1">(<span class="default"><i><span class="symbol">define</span></i> <span class="paren2">(<span class="default">main args</span>)</span>
18  <span class="paren2">(<span class="default">quickrep <span class="paren3">(<span class="default">irregex <span class="paren4">(<span class="default">car args</span>)</span></span>)</span> <span class="paren3">(<span class="default">cadr args</span>)</span></span>)</span></span>)</span>
Note: See TracBrowser for help on using the repository browser.