home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / scheme / schmrprt / exrename.lha / exrename.tex
LaTeX Document  |  1993-07-16  |  10.3 KB

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: LaTeX Document (document/latex).

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert LaTeX Document (document/latex) magic Supported
1% dexvert Text File (text/txt) fallback Supported
100% file LaTeX document text default
99% file LaTeX document, ASCII text default
100% checkBytes Printable ASCII default
100% perlTextCheck Likely Text (Perl) default
100% siegfried fmt/281 LaTeX (Subdocument) default
100% detectItEasy Format: plain text[LF] default (weak)



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 5c 64 6f 63 75 6d 65 6e | 74 73 74 79 6c 65 7b 61 |\documen|tstyle{a|
|00000010| 72 74 69 63 6c 65 7d 0a | 0a 0a 5c 64 65 66 5c 73 |rticle}.|..\def\s|
|00000020| 63 68 74 72 75 65 7b 5c | 68 62 6f 78 7b 7b 5c 74 |chtrue{\|hbox{{\t|
|00000030| 74 20 5c 23 74 7d 7d 7d | 0a 5c 64 65 66 5c 73 63 |t \#t}}}|.\def\sc|
|00000040| 68 66 61 6c 73 65 7b 5c | 68 62 6f 78 7b 7b 5c 74 |hfalse{\|hbox{{\t|
|00000050| 74 20 5c 23 66 7d 7d 7d | 0a 5c 64 65 66 5c 69 64 |t \#f}}}|.\def\id|
|00000060| 65 23 31 7b 5c 68 62 6f | 78 7b 7b 5c 74 74 20 23 |e#1{\hbo|x{{\tt #|
|00000070| 31 7d 7d 7d 0a 0a 0a 5c | 6e 65 77 63 6f 6d 6d 61 |1}}}...\|newcomma|
|00000080| 6e 64 7b 5c 6d 65 74 61 | 7d 5b 31 5d 7b 7b 5c 6e |nd{\meta|}[1]{{\n|
|00000090| 6f 69 6e 64 65 6e 74 5c | 68 62 6f 78 7b 5c 72 6d |oindent\|hbox{\rm|
|000000a0| 24 5c 6c 61 6e 67 6c 65 | 24 23 31 24 5c 72 61 6e |$\langle|$#1$\ran|
|000000b0| 67 6c 65 24 7d 7d 7d 0a | 5c 6c 65 74 5c 68 79 70 |gle$}}}.|\let\hyp|
|000000c0| 65 72 3d 5c 6d 65 74 61 | 0a 5c 6e 65 77 63 6f 6d |er=\meta|.\newcom|
|000000d0| 6d 61 6e 64 7b 5c 68 79 | 70 65 72 69 7d 5b 31 5d |mand{\hy|peri}[1]|
|000000e0| 7b 5c 68 79 70 65 72 7b | 23 31 24 5f 31 24 7d 7d |{\hyper{|#1$_1$}}|
|000000f0| 0a 5c 6e 65 77 63 6f 6d | 6d 61 6e 64 7b 5c 68 79 |.\newcom|mand{\hy|
|00000100| 70 65 72 69 69 7d 5b 31 | 5d 7b 5c 68 79 70 65 72 |perii}[1|]{\hyper|
|00000110| 7b 23 31 24 5f 32 24 7d | 7d 0a 5c 6e 65 77 63 6f |{#1$_2$}|}.\newco|
|00000120| 6d 6d 61 6e 64 7b 5c 68 | 79 70 65 72 6a 7d 5b 31 |mmand{\h|yperj}[1|
|00000130| 5d 7b 5c 68 79 70 65 72 | 7b 23 31 24 5f 69 24 7d |]{\hyper|{#1$_i$}|
|00000140| 7d 0a 5c 6e 65 77 63 6f | 6d 6d 61 6e 64 7b 5c 68 |}.\newco|mmand{\h|
|00000150| 79 70 65 72 6e 7d 5b 31 | 5d 7b 5c 68 79 70 65 72 |ypern}[1|]{\hyper|
|00000160| 7b 23 31 24 5f 6e 24 7d | 7d 0a 5c 6e 65 77 63 6f |{#1$_n$}|}.\newco|
|00000170| 6d 6d 61 6e 64 7b 5c 76 | 61 72 7d 5b 31 5d 7b 5c |mmand{\v|ar}[1]{\|
|00000180| 6e 6f 69 6e 64 65 6e 74 | 5c 68 62 6f 78 7b 5c 69 |noindent|\hbox{\i|
|00000190| 74 7b 7d 23 31 5c 2f 7d | 7d 20 20 25 20 43 61 72 |t{}#1\/}|} % Car|
|000001a0| 65 66 75 6c 2c 20 69 73 | 20 5c 2f 20 61 6c 77 61 |eful, is| \/ alwa|
|000001b0| 79 73 20 74 68 65 20 72 | 69 67 68 74 20 74 68 69 |ys the r|ight thi|
|000001c0| 6e 67 3f 0a 5c 6e 65 77 | 63 6f 6d 6d 61 6e 64 7b |ng?.\new|command{|
|000001d0| 5c 76 61 72 69 7d 5b 31 | 5d 7b 5c 76 61 72 7b 23 |\vari}[1|]{\var{#|
|000001e0| 31 24 5f 31 24 7d 7d 0a | 5c 6e 65 77 63 6f 6d 6d |1$_1$}}.|\newcomm|
|000001f0| 61 6e 64 7b 5c 76 61 72 | 69 69 7d 5b 31 5d 7b 5c |and{\var|ii}[1]{\|
|00000200| 76 61 72 7b 23 31 24 5f | 32 24 7d 7d 0a 5c 6e 65 |var{#1$_|2$}}.\ne|
|00000210| 77 63 6f 6d 6d 61 6e 64 | 7b 5c 76 61 72 69 69 69 |wcommand|{\variii|
|00000220| 7d 5b 31 5d 7b 5c 76 61 | 72 7b 23 31 24 5f 33 24 |}[1]{\va|r{#1$_3$|
|00000230| 7d 7d 0a 5c 6e 65 77 63 | 6f 6d 6d 61 6e 64 7b 5c |}}.\newc|ommand{\|
|00000240| 76 61 72 69 76 7d 5b 31 | 5d 7b 5c 76 61 72 7b 23 |variv}[1|]{\var{#|
|00000250| 31 24 5f 34 24 7d 7d 0a | 5c 6e 65 77 63 6f 6d 6d |1$_4$}}.|\newcomm|
|00000260| 61 6e 64 7b 5c 76 61 72 | 6a 7d 5b 31 5d 7b 5c 76 |and{\var|j}[1]{\v|
|00000270| 61 72 7b 23 31 24 5f 6a | 24 7d 7d 0a 5c 6e 65 77 |ar{#1$_j|$}}.\new|
|00000280| 63 6f 6d 6d 61 6e 64 7b | 5c 76 61 72 6e 7d 5b 31 |command{|\varn}[1|
|00000290| 5d 7b 5c 76 61 72 7b 23 | 31 24 5f 6e 24 7d 7d 0a |]{\var{#|1$_n$}}.|
|000002a0| 0a 0a 5c 6e 65 77 63 6f | 6d 6d 61 6e 64 7b 5c 76 |..\newco|mmand{\v|
|000002b0| 72 7d 5b 31 5d 7b 7b 5c | 6e 6f 69 6e 64 65 6e 74 |r}[1]{{\|noindent|
|000002c0| 5c 68 62 6f 78 7b 24 23 | 31 24 5c 2f 7d 7d 7d 20 |\hbox{$#|1$\/}}} |
|000002d0| 20 25 20 43 61 72 65 66 | 75 6c 2c 20 69 73 20 5c | % Caref|ul, is \|
|000002e0| 2f 20 61 6c 77 61 79 73 | 20 74 68 65 20 72 69 67 |/ always| the rig|
|000002f0| 68 74 20 74 68 69 6e 67 | 3f 0a 5c 6e 65 77 63 6f |ht thing|?.\newco|
|00000300| 6d 6d 61 6e 64 7b 5c 76 | 72 69 7d 5b 31 5d 7b 5c |mmand{\v|ri}[1]{\|
|00000310| 76 72 7b 23 31 5f 31 7d | 7d 0a 5c 6e 65 77 63 6f |vr{#1_1}|}.\newco|
|00000320| 6d 6d 61 6e 64 7b 5c 76 | 72 69 69 7d 5b 31 5d 7b |mmand{\v|rii}[1]{|
|00000330| 5c 76 72 7b 23 31 5f 32 | 7d 7d 0a 5c 6e 65 77 63 |\vr{#1_2|}}.\newc|
|00000340| 6f 6d 6d 61 6e 64 7b 5c | 76 72 69 69 69 7d 5b 31 |ommand{\|vriii}[1|
|00000350| 5d 7b 5c 76 72 7b 23 31 | 5f 33 7d 7d 0a 5c 6e 65 |]{\vr{#1|_3}}.\ne|
|00000360| 77 63 6f 6d 6d 61 6e 64 | 7b 5c 76 72 69 76 7d 5b |wcommand|{\vriv}[|
|00000370| 31 5d 7b 5c 76 72 7b 23 | 31 5f 34 7d 7d 0a 5c 6e |1]{\vr{#|1_4}}.\n|
|00000380| 65 77 63 6f 6d 6d 61 6e | 64 7b 5c 76 72 6a 7d 5b |ewcomman|d{\vrj}[|
|00000390| 31 5d 7b 5c 76 72 7b 23 | 31 5f 6a 7d 7d 0a 5c 6e |1]{\vr{#|1_j}}.\n|
|000003a0| 65 77 63 6f 6d 6d 61 6e | 64 7b 5c 76 72 6e 7d 5b |ewcomman|d{\vrn}[|
|000003b0| 31 5d 7b 5c 76 72 7b 23 | 31 5f 6e 7d 7d 0a 0a 0a |1]{\vr{#|1_n}}...|
|000003c0| 25 20 5c 66 72 6f 62 71 | 20 77 69 6c 6c 20 6d 61 |% \frobq| will ma|
|000003d0| 6b 65 20 71 75 6f 74 65 | 20 61 6e 64 20 62 61 63 |ke quote| and bac|
|000003e0| 6b 71 75 6f 74 65 20 6c | 6f 6f 6b 20 6e 69 63 65 |kquote l|ook nice|
|000003f0| 72 2e 0a 5c 64 65 66 5c | 66 72 6f 62 71 63 61 74 |r..\def\|frobqcat|
|00000400| 73 7b 25 5c 63 61 74 63 | 6f 64 65 60 5c 27 3d 31 |s{%\catc|ode`\'=1|
|00000410| 33 0a 5c 63 61 74 63 6f | 64 65 60 5c 60 3d 31 33 |3.\catco|de`\`=13|
|00000420| 7b 7d 7d 0a 7b 5c 66 72 | 6f 62 71 63 61 74 73 0a |{}}.{\fr|obqcats.|
|00000430| 5c 67 64 65 66 5c 66 72 | 6f 62 71 64 65 66 73 7b |\gdef\fr|obqdefs{|
|00000440| 25 5c 64 65 66 27 7b 5c | 73 69 6e 67 6c 65 71 75 |%\def'{\|singlequ|
|00000450| 6f 74 65 7d 0a 5c 64 65 | 66 60 7b 5c 62 61 63 6b |ote}.\de|f`{\back|
|00000460| 71 75 6f 74 65 7d 7d 7d | 0a 5c 64 65 66 5c 66 72 |quote}}}|.\def\fr|
|00000470| 6f 62 71 7b 5c 66 72 6f | 62 71 63 61 74 73 5c 66 |obq{\fro|bqcats\f|
|00000480| 72 6f 62 71 64 65 66 73 | 7d 0a 0a 0a 25 20 5c 63 |robqdefs|}...% \c|
|00000490| 66 20 3d 20 63 6f 64 65 | 20 66 6f 6e 74 0a 25 20 |f = code| font.% |
|000004a0| 55 6e 66 6f 72 74 75 6e | 61 74 65 6c 79 2c 20 5c |Unfortun|ately, \|
|000004b0| 63 66 20 5c 63 66 20 77 | 6f 6e 27 74 20 77 6f 72 |cf \cf w|on't wor|
|000004c0| 6b 20 61 74 20 61 6c 6c | 2c 20 73 6f 20 64 6f 6e |k at all|, so don|
|000004d0| 27 74 20 65 76 65 6e 20 | 61 74 74 65 6d 70 74 20 |'t even |attempt |
|000004e0| 74 6f 0a 25 20 6e 65 78 | 74 20 63 6f 6e 73 74 72 |to.% nex|t constr|
|000004f0| 75 63 74 69 6f 6e 73 20 | 77 68 69 63 68 20 75 73 |uctions |which us|
|00000500| 65 20 74 68 65 6d 2e 2e | 2e 0a 5c 6e 65 77 63 6f |e them..|..\newco|
|00000510| 6d 6d 61 6e 64 7b 5c 63 | 66 7d 7b 5c 66 72 65 6e |mmand{\c|f}{\fren|
|00000520| 63 68 73 70 61 63 69 6e | 67 5c 66 72 6f 62 71 5c |chspacin|g\frobq\|
|00000530| 74 74 7d 0a 0a 0a 25 20 | 53 61 6d 65 20 61 73 20 |tt}...% |Same as |
|00000540| 5c 6f 62 65 79 63 72 2c | 20 62 75 74 20 64 6f 65 |\obeycr,| but doe|
|00000550| 73 6e 27 74 20 64 6f 20 | 61 20 5c 40 67 6f 62 62 |sn't do |a \@gobb|
|00000560| 6c 65 63 72 2e 0a 7b 5c | 63 61 74 63 6f 64 65 60 |lecr..{\|catcode`|
|00000570| 5c 5e 5e 4d 3d 31 33 20 | 5c 67 64 65 66 5c 6d 79 |\^^M=13 |\gdef\my|
|00000580| 6f 62 65 79 63 72 7b 5c | 63 61 74 63 6f 64 65 60 |obeycr{\|catcode`|
|00000590| 5c 5e 5e 4d 3d 31 33 20 | 5c 64 65 66 5e 5e 4d 7b |\^^M=13 |\def^^M{|
|000005a0| 5c 5c 7d 7d 25 0a 5c 67 | 64 65 66 5c 72 65 73 74 |\\}}%.\g|def\rest|
|000005b0| 6f 72 65 63 72 7b 5c 63 | 61 74 63 6f 64 65 60 5c |orecr{\c|atcode`\|
|000005c0| 5e 5e 4d 3d 35 20 7d 7d | 0a 0a 0a 7b 5c 63 61 74 |^^M=5 }}|...{\cat|
|000005d0| 63 6f 64 65 60 5c 5e 5e | 49 3d 31 33 20 5c 67 64 |code`\^^|I=13 \gd|
|000005e0| 65 66 5c 6f 62 65 79 74 | 61 62 73 7b 5c 63 61 74 |ef\obeyt|abs{\cat|
|000005f0| 63 6f 64 65 60 5c 5e 5e | 49 3d 31 33 20 5c 64 65 |code`\^^|I=13 \de|
|00000600| 66 5e 5e 49 7b 5c 68 62 | 6f 78 7b 5c 68 73 6b 69 |f^^I{\hb|ox{\hski|
|00000610| 70 20 34 65 6d 7d 7d 7d | 7d 0a 0a 0a 7b 5c 6f 62 |p 4em}}}|}...{\ob|
|00000620| 65 79 73 70 61 63 65 73 | 5c 67 64 65 66 20 7b 5c |eyspaces|\gdef {\|
|00000630| 68 62 6f 78 7b 5c 68 73 | 6b 69 70 30 2e 35 65 6d |hbox{\hs|kip0.5em|
|00000640| 7d 7d 7d 0a 0a 0a 5c 67 | 64 65 66 5c 67 6f 62 62 |}}}...\g|def\gobb|
|00000650| 6c 65 63 72 7b 5c 40 67 | 6f 62 62 6c 65 63 72 7d |lecr{\@g|obblecr}|
|00000660| 0a 0a 0a 5c 64 65 66 5c | 73 65 74 75 70 63 6f 64 |...\def\|setupcod|
|00000670| 65 7b 5c 40 6d 61 6b 65 | 6f 74 68 65 72 5c 5e 7d |e{\@make|other\^}|
|00000680| 0a 0a 0a 5c 6e 65 77 65 | 6e 76 69 72 6f 6e 6d 65 |...\newe|nvironme|
|00000690| 6e 74 7b 67 72 61 6d 6d | 61 72 7d 7b 0a 20 20 5c |nt{gramm|ar}{. \|
|000006a0| 64 65 66 5c 3a 7b 5c 67 | 6f 65 73 74 6f 7b 7d 7d |def\:{\g|oesto{}}|
|000006b0| 0a 20 20 5c 64 65 66 5c | 7c 7b 24 5c 76 65 72 74 |. \def\||{$\vert|
|000006c0| 24 7d 0a 20 20 5c 63 66 | 20 5c 6d 79 6f 62 65 79 |$}. \cf| \myobey|
|000006d0| 63 72 0a 20 20 5c 62 65 | 67 69 6e 7b 74 61 62 62 |cr. \be|gin{tabb|
|000006e0| 69 6e 67 7d 0a 20 20 20 | 20 25 5c 71 71 75 61 64 |ing}. | %\qquad|
|000006f0| 5c 71 75 61 64 20 5c 3d | 20 0a 20 20 20 20 5c 71 |\quad \=| . \q|
|00000700| 71 75 61 64 20 5c 3d 20 | 24 5c 76 65 72 74 24 20 |quad \= |$\vert$ |
|00000710| 5c 3d 20 5c 6b 69 6c 6c | 0a 20 20 7d 7b 5c 75 6e |\= \kill|. }{\un|
|00000720| 73 6b 69 70 5c 65 6e 64 | 7b 74 61 62 62 69 6e 67 |skip\end|{tabbing|
|00000730| 7d 7d 0a 0a 0a 25 20 43 | 6f 6d 6d 61 6e 64 73 20 |}}...% C|ommands |
|00000740| 66 6f 72 20 67 72 61 6d | 6d 61 72 73 0a 5c 6e 65 |for gram|mars.\ne|
|00000750| 77 63 6f 6d 6d 61 6e 64 | 7b 5c 61 72 62 6e 6f 7d |wcommand|{\arbno}|
|00000760| 5b 31 5d 7b 23 31 5c 68 | 62 6f 78 7b 5c 72 6d 2a |[1]{#1\h|box{\rm*|
|00000770| 7d 7d 20 20 0a 5c 6e 65 | 77 63 6f 6d 6d 61 6e 64 |}} .\ne|wcommand|
|00000780| 7b 5c 61 74 6c 65 61 73 | 74 6f 6e 65 7d 5b 31 5d |{\atleas|tone}[1]|
|00000790| 7b 23 31 5c 68 62 6f 78 | 7b 24 5e 2b 24 7d 7d 0a |{#1\hbox|{$^+$}}.|
|000007a0| 0a 0a 5c 6e 65 77 63 6f | 6d 6d 61 6e 64 7b 5c 67 |..\newco|mmand{\g|
|000007b0| 6f 65 73 74 6f 7d 7b 24 | 5c 6c 6f 6e 67 72 69 67 |oesto}{$|\longrig|
|000007c0| 68 74 61 72 72 6f 77 24 | 7d 0a 0a 0a 0a 0a 0a 0a |htarrow$|}.......|
|000007d0| 0a 0a 5c 62 65 67 69 6e | 7b 64 6f 63 75 6d 65 6e |..\begin|{documen|
|000007e0| 74 7d 0a 0a 0a 5c 63 65 | 6e 74 65 72 6c 69 6e 65 |t}...\ce|nterline|
|000007f0| 7b 7b 5c 4c 61 72 67 65 | 20 48 79 67 69 65 6e 69 |{{\Large| Hygieni|
|00000800| 63 20 4d 61 63 72 6f 73 | 20 54 68 72 6f 75 67 68 |c Macros| Through|
|00000810| 20 45 78 70 6c 69 63 69 | 74 20 52 65 6e 61 6d 69 | Explici|t Renami|
|00000820| 6e 67 7d 7d 0a 0a 0a 5c | 76 73 6b 69 70 20 32 34 |ng}}...\|vskip 24|
|00000830| 70 74 0a 0a 0a 5c 63 65 | 6e 74 65 72 6c 69 6e 65 |pt...\ce|nterline|
|00000840| 7b 57 69 6c 6c 69 61 6d | 20 43 6c 69 6e 67 65 72 |{William| Clinger|
|00000850| 7d 0a 0a 0a 5c 76 73 6b | 69 70 20 37 32 70 74 0a |}...\vsk|ip 72pt.|
|00000860| 0a 0a 54 68 69 73 20 70 | 61 70 65 72 20 64 65 73 |..This p|aper des|
|00000870| 63 72 69 62 65 73 20 61 | 6e 20 61 6c 74 65 72 6e |cribes a|n altern|
|00000880| 61 74 69 76 65 20 74 6f | 20 74 68 65 20 6c 6f 77 |ative to| the low|
|00000890| 2d 6c 65 76 65 6c 20 6d | 61 63 72 6f 0a 66 61 63 |-level m|acro.fac|
|000008a0| 69 6c 69 74 79 20 64 65 | 73 63 72 69 62 65 64 20 |ility de|scribed |
|000008b0| 69 6e 20 74 68 65 20 7b | 5c 65 6d 20 52 65 76 69 |in the {|\em Revi|
|000008c0| 73 65 64 24 5e 34 24 20 | 52 65 70 6f 72 74 20 6f |sed$^4$ |Report o|
|000008d0| 6e 20 74 68 65 0a 41 6c | 67 6f 72 69 74 68 6d 69 |n the.Al|gorithmi|
|000008e0| 63 20 4c 61 6e 67 75 61 | 67 65 20 53 63 68 65 6d |c Langua|ge Schem|
|000008f0| 65 7d 20 5b 31 5d 2e 0a | 54 68 65 20 66 61 63 69 |e} [1]..|The faci|
|00000900| 6c 69 74 79 20 64 65 73 | 63 72 69 62 65 64 20 68 |lity des|cribed h|
|00000910| 65 72 65 20 69 73 20 62 | 61 73 65 64 20 6f 6e 20 |ere is b|ased on |
|00000920| 65 78 70 6c 69 63 69 74 | 20 72 65 6e 61 6d 69 6e |explicit| renamin|
|00000930| 67 0a 6f 66 20 69 64 65 | 6e 74 69 66 69 65 72 73 |g.of ide|ntifiers|
|00000940| 2c 20 61 6e 64 20 77 61 | 73 20 64 65 76 65 6c 6f |, and wa|s develo|
|00000950| 70 65 64 20 66 6f 72 20 | 74 68 65 20 66 69 72 73 |ped for |the firs|
|00000960| 74 20 69 6d 70 6c 65 6d | 65 6e 74 61 74 69 6f 6e |t implem|entation|
|00000970| 20 6f 66 20 74 68 65 20 | 68 79 67 69 65 6e 69 63 | of the |hygienic|
|00000980| 0a 6d 61 63 72 6f 20 65 | 78 70 61 6e 73 69 6f 6e |.macro e|xpansion|
|00000990| 20 61 6c 67 6f 72 69 74 | 68 6d 20 64 65 73 63 72 | algorit|hm descr|
|000009a0| 69 62 65 64 20 69 6e 20 | 5b 32 5d 2e 20 49 74 20 |ibed in |[2]. It |
|000009b0| 77 61 73 20 74 68 65 20 | 66 69 72 73 74 0a 6c 6f |was the |first.lo|
|000009c0| 77 2d 6c 65 76 65 6c 20 | 6d 61 63 72 6f 20 66 61 |w-level |macro fa|
|000009d0| 63 69 6c 69 74 79 20 74 | 6f 20 62 65 20 64 65 73 |cility t|o be des|
|000009e0| 69 67 6e 65 64 20 66 6f | 72 20 63 6f 6d 70 61 74 |igned fo|r compat|
|000009f0| 69 62 69 6c 69 74 79 20 | 77 69 74 68 20 61 20 68 |ibility |with a h|
|00000a00| 69 67 68 2d 6c 65 76 65 | 6c 0a 68 79 67 69 65 6e |igh-leve|l.hygien|
|00000a10| 69 63 20 6d 61 63 72 6f | 20 73 79 73 74 65 6d 2c |ic macro| system,|
|00000a20| 20 61 6e 64 20 69 74 20 | 72 65 6d 61 69 6e 73 20 | and it |remains |
|00000a30| 6f 6e 65 20 6f 66 20 74 | 68 65 20 65 61 73 69 65 |one of t|he easie|
|00000a40| 73 74 20 74 6f 20 75 6e | 64 65 72 73 74 61 6e 64 |st to un|derstand|
|00000a50| 2e 0a 0a 0a 57 68 65 72 | 65 61 73 20 74 68 65 20 |....Wher|eas the |
|00000a60| 6c 6f 77 2d 6c 65 76 65 | 6c 20 6d 61 63 72 6f 20 |low-leve|l macro |
|00000a70| 66 61 63 69 6c 69 74 79 | 20 64 65 73 63 72 69 62 |facility| describ|
|00000a80| 65 64 20 69 6e 20 74 68 | 65 0a 52 65 76 69 73 65 |ed in th|e.Revise|
|00000a90| 64 24 5e 34 24 20 52 65 | 70 6f 72 74 20 72 65 6e |d$^4$ Re|port ren|
|00000aa0| 61 6d 65 73 20 69 64 65 | 6e 74 69 66 69 65 72 73 |ames ide|ntifiers|
|00000ab0| 20 61 75 74 6f 6d 61 74 | 69 63 61 6c 6c 79 2c 0a | automat|ically,.|
|00000ac0| 73 6f 20 74 68 61 74 20 | 68 79 67 69 65 6e 69 63 |so that |hygienic|
|00000ad0| 20 6d 61 63 72 6f 73 20 | 61 72 65 20 6f 62 74 61 | macros |are obta|
|00000ae0| 69 6e 65 64 20 62 79 20 | 64 65 66 61 75 6c 74 2c |ined by |default,|
|00000af0| 20 74 68 65 0a 66 61 63 | 69 6c 69 74 79 20 64 65 | the.fac|ility de|
|00000b00| 73 63 72 69 62 65 64 20 | 68 65 72 65 20 72 65 71 |scribed |here req|
|00000b10| 75 69 72 65 73 20 74 68 | 61 74 20 69 64 65 6e 74 |uires th|at ident|
|00000b20| 69 66 69 65 72 73 20 62 | 65 0a 72 65 6e 61 6d 65 |ifiers b|e.rename|
|00000b30| 64 20 65 78 70 6c 69 63 | 69 74 6c 79 20 69 6e 20 |d explic|itly in |
|00000b40| 6f 72 64 65 72 20 74 6f | 20 6d 61 69 6e 74 61 69 |order to| maintai|
|00000b50| 6e 20 68 79 67 69 65 6e | 65 2e 0a 0a 0a 41 6e 6f |n hygien|e....Ano|
|00000b60| 74 68 65 72 20 64 69 66 | 66 65 72 65 6e 63 65 20 |ther dif|ference |
|00000b70| 69 73 20 74 68 61 74 2c | 20 61 73 20 6f 72 69 67 |is that,| as orig|
|00000b80| 69 6e 61 6c 6c 79 20 69 | 6d 70 6c 65 6d 65 6e 74 |inally i|mplement|
|00000b90| 65 64 0a 61 6e 64 20 61 | 73 20 64 65 73 63 72 69 |ed.and a|s descri|
|00000ba0| 62 65 64 20 68 65 72 65 | 2c 20 74 68 65 72 65 20 |bed here|, there |
|00000bb0| 69 73 20 6e 6f 20 77 61 | 79 20 74 6f 20 64 65 66 |is no wa|y to def|
|00000bc0| 69 6e 65 20 63 65 72 74 | 61 69 6e 0a 68 79 67 69 |ine cert|ain.hygi|
|00000bd0| 65 6e 69 63 20 6d 61 63 | 72 6f 73 20 74 68 61 74 |enic mac|ros that|
|00000be0| 20 64 65 66 69 6e 65 20 | 6f 74 68 65 72 20 68 79 | define |other hy|
|00000bf0| 67 69 65 6e 69 63 20 6d | 61 63 72 6f 73 2e 0a 54 |gienic m|acros..T|
|00000c00| 68 65 20 70 72 6f 62 6c | 65 6d 20 69 73 20 74 68 |he probl|em is th|
|00000c10| 61 74 20 74 68 65 20 74 | 72 61 6e 73 66 6f 72 6d |at the t|ransform|
|00000c20| 61 74 69 6f 6e 20 70 72 | 6f 63 65 64 75 72 65 20 |ation pr|ocedure |
|00000c30| 66 6f 72 20 74 68 65 0a | 64 65 66 69 6e 65 64 20 |for the.|defined |
|00000c40| 6d 61 63 72 6f 20 6d 61 | 79 20 6e 65 65 64 20 74 |macro ma|y need t|
|00000c50| 6f 20 63 6f 6d 70 61 72 | 65 20 70 69 65 63 65 73 |o compar|e pieces|
|00000c60| 20 6f 66 20 69 74 73 0a | 66 69 72 73 74 20 61 72 | of its.|first ar|
|00000c70| 67 75 6d 65 6e 74 20 77 | 69 74 68 20 74 68 65 20 |gument w|ith the |
|00000c80| 64 65 6e 6f 74 61 74 69 | 6f 6e 20 6f 66 20 61 6e |denotati|on of an|
|00000c90| 20 69 64 65 6e 74 69 66 | 69 65 72 2c 0a 62 75 74 | identif|ier,.but|
|00000ca0| 20 74 68 65 20 6f 6e 6c | 79 20 77 61 79 20 66 6f | the onl|y way fo|
|00000cb0| 72 20 74 68 65 20 64 65 | 66 69 6e 69 6e 67 20 6d |r the de|fining m|
|00000cc0| 61 63 72 6f 20 74 6f 20 | 70 61 73 73 20 74 68 61 |acro to |pass tha|
|00000cd0| 74 0a 64 65 6e 6f 74 61 | 74 69 6f 6e 20 61 6c 6f |t.denota|tion alo|
|00000ce0| 6e 67 20 74 6f 20 74 68 | 65 20 64 65 66 69 6e 65 |ng to th|e define|
|00000cf0| 64 20 6d 61 63 72 6f 20 | 69 73 20 61 73 20 70 61 |d macro |is as pa|
|00000d00| 72 74 20 6f 66 0a 74 68 | 65 20 63 6f 64 65 20 66 |rt of.th|e code f|
|00000d10| 6f 72 20 74 68 65 20 64 | 65 66 69 6e 65 64 20 6d |or the d|efined m|
|00000d20| 61 63 72 6f 2e 0a 54 68 | 69 73 20 70 72 6f 62 6c |acro..Th|is probl|
|00000d30| 65 6d 20 63 61 6e 20 62 | 65 20 73 6f 6c 76 65 64 |em can b|e solved|
|00000d40| 20 62 79 20 69 6e 74 72 | 6f 64 75 63 69 6e 67 20 | by intr|oducing |
|00000d50| 5c 69 64 65 7b 73 79 6e | 74 61 78 7d 0a 65 78 70 |\ide{syn|tax}.exp|
|00000d60| 72 65 73 73 69 6f 6e 73 | 20 61 73 20 69 6e 20 74 |ressions| as in t|
|00000d70| 68 65 20 52 65 76 69 73 | 65 64 24 5e 34 24 20 52 |he Revis|ed$^4$ R|
|00000d80| 65 70 6f 72 74 2e 20 20 | 5c 69 64 65 7b 53 79 6e |eport. |\ide{Syn|
|00000d90| 74 61 78 7d 0a 69 73 20 | 6c 69 6b 65 20 5c 69 64 |tax}.is |like \id|
|00000da0| 65 7b 71 75 6f 74 65 7d | 2c 20 65 78 63 65 70 74 |e{quote}|, except|
|00000db0| 20 74 68 61 74 20 74 68 | 65 20 64 65 6e 6f 74 61 | that th|e denota|
|00000dc0| 74 69 6f 6e 20 6f 66 20 | 61 6e 0a 69 64 65 6e 74 |tion of |an.ident|
|00000dd0| 69 66 69 65 72 20 71 75 | 6f 74 65 64 20 62 79 20 |ifier qu|oted by |
|00000de0| 5c 69 64 65 7b 73 79 6e | 74 61 78 7d 20 69 73 20 |\ide{syn|tax} is |
|00000df0| 70 72 65 73 65 72 76 65 | 64 20 61 73 20 70 61 72 |preserve|d as par|
|00000e00| 74 0a 6f 66 20 74 68 65 | 20 71 75 6f 74 65 64 20 |t.of the| quoted |
|00000e10| 76 61 6c 75 65 2e 0a 0a | 0a 41 73 20 77 69 74 68 |value...|.As with|
|00000e20| 20 74 68 65 20 6c 6f 77 | 2d 6c 65 76 65 6c 20 6d | the low|-level m|
|00000e30| 61 63 72 6f 20 66 61 63 | 69 6c 69 74 79 20 62 61 |acro fac|ility ba|
|00000e40| 73 65 64 20 6f 6e 20 73 | 79 6e 74 61 63 74 69 63 |sed on s|yntactic|
|00000e50| 0a 63 6c 6f 73 75 72 65 | 73 20 5b 33 5d 2c 20 74 |.closure|s [3], t|
|00000e60| 68 65 20 65 78 70 6c 69 | 63 69 74 20 72 65 6e 61 |he expli|cit rena|
|00000e70| 6d 69 6e 67 20 66 61 63 | 69 6c 69 74 79 20 61 64 |ming fac|ility ad|
|00000e80| 64 73 20 61 20 6e 65 77 | 0a 70 72 6f 64 75 63 74 |ds a new|.product|
|00000e90| 69 6f 6e 20 66 6f 72 20 | 5c 6d 65 74 61 7b 74 72 |ion for |\meta{tr|
|00000ea0| 61 6e 73 66 6f 72 6d 65 | 72 20 73 70 65 63 7d 3a |ansforme|r spec}:|
|00000eb0| 0a 5c 62 65 67 69 6e 7b | 67 72 61 6d 6d 61 72 7d |.\begin{|grammar}|
|00000ec0| 0a 20 20 20 20 5c 6d 65 | 74 61 7b 74 72 61 6e 73 |. \me|ta{trans|
|00000ed0| 66 6f 72 6d 65 72 7d 20 | 5c 3a 20 28 74 72 61 6e |former} |\: (tran|
|00000ee0| 73 66 6f 72 6d 65 72 20 | 5c 6d 65 74 61 7b 65 78 |sformer |\meta{ex|
|00000ef0| 70 72 65 73 73 69 6f 6e | 7d 29 25 0a 5c 65 6e 64 |pression|})%.\end|
|00000f00| 7b 67 72 61 6d 6d 61 72 | 7d 0a 0a 0a 54 68 65 20 |{grammar|}...The |
|00000f10| 5c 6d 65 74 61 7b 65 78 | 70 72 65 73 73 69 6f 6e |\meta{ex|pression|
|00000f20| 7d 20 69 73 20 65 78 70 | 61 6e 64 65 64 20 69 6e |} is exp|anded in|
|00000f30| 20 74 68 65 20 73 79 6e | 74 61 63 74 69 63 0a 65 | the syn|tactic.e|
|00000f40| 6e 76 69 72 6f 6e 6d 65 | 6e 74 20 6f 66 20 74 68 |nvironme|nt of th|
|00000f50| 65 20 5c 69 64 65 7b 74 | 72 61 6e 73 66 6f 72 6d |e \ide{t|ransform|
|00000f60| 65 72 7d 20 65 78 70 72 | 65 73 73 69 6f 6e 2c 20 |er} expr|ession, |
|00000f70| 61 6e 64 20 74 68 65 0a | 65 78 70 61 6e 64 65 64 |and the.|expanded|
|00000f80| 20 65 78 70 72 65 73 73 | 69 6f 6e 20 69 73 20 65 | express|ion is e|
|00000f90| 76 61 6c 75 61 74 65 64 | 20 69 6e 20 74 68 65 20 |valuated| in the |
|00000fa0| 73 74 61 6e 64 61 72 64 | 20 74 72 61 6e 73 66 6f |standard| transfo|
|00000fb0| 72 6d 65 72 0a 65 6e 76 | 69 72 6f 6e 6d 65 6e 74 |rmer.env|ironment|
|00000fc0| 20 74 6f 20 79 69 65 6c | 64 20 61 20 7b 5c 65 6d | to yiel|d a {\em|
|00000fd0| 20 74 72 61 6e 73 66 6f | 72 6d 61 74 69 6f 6e 20 | transfo|rmation |
|00000fe0| 70 72 6f 63 65 64 75 72 | 65 7d 2e 0a 54 68 65 20 |procedur|e}..The |
|00000ff0| 74 72 61 6e 73 66 6f 72 | 6d 61 74 69 6f 6e 20 70 |transfor|mation p|
|00001000| 72 6f 63 65 64 75 72 65 | 20 74 61 6b 65 73 20 61 |rocedure| takes a|
|00001010| 6e 20 65 78 70 72 65 73 | 73 69 6f 6e 20 61 6e 64 |n expres|sion and|
|00001020| 20 74 77 6f 0a 6f 74 68 | 65 72 20 61 72 67 75 6d | two.oth|er argum|
|00001030| 65 6e 74 73 20 61 6e 64 | 20 72 65 74 75 72 6e 73 |ents and| returns|
|00001040| 20 61 20 74 72 61 6e 73 | 66 6f 72 6d 65 64 20 65 | a trans|formed e|
|00001050| 78 70 72 65 73 73 69 6f | 6e 2e 0a 46 6f 72 20 65 |xpressio|n..For e|
|00001060| 78 61 6d 70 6c 65 2c 20 | 74 68 65 20 74 72 61 6e |xample, |the tran|
|00001070| 73 66 6f 72 6d 61 74 69 | 6f 6e 0a 70 72 6f 63 65 |sformati|on.proce|
|00001080| 64 75 72 65 20 66 6f 72 | 20 61 20 5c 69 64 65 7b |dure for| a \ide{|
|00001090| 63 61 6c 6c 7d 20 6d 61 | 63 72 6f 20 73 75 63 68 |call} ma|cro such|
|000010a0| 20 74 68 61 74 0a 5c 69 | 64 65 7b 28 63 61 6c 6c | that.\i|de{(call|
|000010b0| 20 5c 76 61 72 7b 70 72 | 6f 63 7d 20 5c 76 61 72 | \var{pr|oc} \var|
|000010c0| 7b 61 72 67 7d 20 2e 2e | 2e 29 7d 20 65 78 70 61 |{arg} ..|.)} expa|
|000010d0| 6e 64 73 0a 69 6e 74 6f | 20 5c 69 64 65 7b 28 5c |nds.into| \ide{(\|
|000010e0| 76 61 72 7b 70 72 6f 63 | 7d 20 5c 76 61 72 7b 61 |var{proc|} \var{a|
|000010f0| 72 67 7d 20 2e 2e 2e 29 | 7d 20 63 61 6e 20 62 65 |rg} ...)|} can be|
|00001100| 20 77 72 69 74 74 65 6e | 20 61 73 0a 5c 62 65 67 | written| as.\beg|
|00001110| 69 6e 7b 76 65 72 62 61 | 74 69 6d 7d 0a 20 20 20 |in{verba|tim}. |
|00001120| 20 20 28 6c 61 6d 62 64 | 61 20 28 65 78 70 20 72 | (lambd|a (exp r|
|00001130| 65 6e 61 6d 65 20 63 6f | 6d 70 61 72 65 29 0a 20 |ename co|mpare). |
|00001140| 20 20 20 20 20 20 28 63 | 64 72 20 65 78 70 29 29 | (c|dr exp))|
|00001150| 0a 5c 65 6e 64 7b 76 65 | 72 62 61 74 69 6d 7d 0a |.\end{ve|rbatim}.|
|00001160| 5c 6e 6f 69 6e 64 65 6e | 74 0a 45 78 70 72 65 73 |\noinden|t.Expres|
|00001170| 73 69 6f 6e 73 20 61 72 | 65 20 72 65 70 72 65 73 |sions ar|e repres|
|00001180| 65 6e 74 65 64 20 61 73 | 20 6c 69 73 74 73 20 69 |ented as| lists i|
|00001190| 6e 20 74 68 65 20 74 72 | 61 64 69 74 69 6f 6e 61 |n the tr|aditiona|
|000011a0| 6c 20 6d 61 6e 6e 65 72 | 2c 0a 65 78 63 65 70 74 |l manner|,.except|
|000011b0| 20 74 68 61 74 20 69 64 | 65 6e 74 69 66 69 65 72 | that id|entifier|
|000011c0| 73 20 6d 61 79 20 62 65 | 20 72 65 70 72 65 73 65 |s may be| represe|
|000011d0| 6e 74 65 64 20 62 79 20 | 6f 62 6a 65 63 74 73 20 |nted by |objects |
|000011e0| 6f 74 68 65 72 20 74 68 | 61 6e 0a 73 79 6d 62 6f |other th|an.symbo|
|000011f0| 6c 73 2e 0a 54 72 61 6e | 73 66 6f 72 6d 61 74 69 |ls..Tran|sformati|
|00001200| 6f 6e 20 70 72 6f 63 65 | 64 75 72 65 73 20 6d 61 |on proce|dures ma|
|00001210| 79 20 75 73 65 20 74 68 | 65 20 70 72 65 64 69 63 |y use th|e predic|
|00001220| 61 74 65 0a 5c 69 64 65 | 7b 69 64 65 6e 74 69 66 |ate.\ide|{identif|
|00001230| 69 65 72 3f 7d 20 74 6f | 20 64 65 74 65 72 6d 69 |ier?} to| determi|
|00001240| 6e 65 20 77 68 65 74 68 | 65 72 20 61 6e 20 6f 62 |ne wheth|er an ob|
|00001250| 6a 65 63 74 20 69 73 20 | 74 68 65 0a 72 65 70 72 |ject is |the.repr|
|00001260| 65 73 65 6e 74 61 74 69 | 6f 6e 20 6f 66 20 61 6e |esentati|on of an|
|00001270| 20 69 64 65 6e 74 69 66 | 69 65 72 2e 0a 0a 0a 54 | identif|ier....T|
|00001280| 68 65 20 73 65 63 6f 6e | 64 20 61 72 67 75 6d 65 |he secon|d argume|
|00001290| 6e 74 20 74 6f 20 61 20 | 74 72 61 6e 73 66 6f 72 |nt to a |transfor|
|000012a0| 6d 61 74 69 6f 6e 20 70 | 72 6f 63 65 64 75 72 65 |mation p|rocedure|
|000012b0| 20 69 73 20 61 20 72 65 | 6e 61 6d 69 6e 67 20 70 | is a re|naming p|
|000012c0| 72 6f 63 65 64 75 72 65 | 20 74 68 61 74 0a 74 61 |rocedure| that.ta|
|000012d0| 6b 65 73 20 74 68 65 20 | 72 65 70 72 65 73 65 6e |kes the |represen|
|000012e0| 74 61 74 69 6f 6e 20 6f | 66 20 61 6e 20 69 64 65 |tation o|f an ide|
|000012f0| 6e 74 69 66 69 65 72 20 | 61 73 20 69 74 73 20 61 |ntifier |as its a|
|00001300| 72 67 75 6d 65 6e 74 20 | 61 6e 64 20 72 65 74 75 |rgument |and retu|
|00001310| 72 6e 73 20 74 68 65 0a | 72 65 70 72 65 73 65 6e |rns the.|represen|
|00001320| 74 61 74 69 6f 6e 20 6f | 66 20 61 20 66 72 65 73 |tation o|f a fres|
|00001330| 68 20 69 64 65 6e 74 69 | 66 69 65 72 20 74 68 61 |h identi|fier tha|
|00001340| 74 20 6f 63 63 75 72 73 | 20 6e 6f 77 68 65 72 65 |t occurs| nowhere|
|00001350| 20 65 6c 73 65 20 69 6e | 20 74 68 65 0a 70 72 6f | else in| the.pro|
|00001360| 67 72 61 6d 2e 20 20 46 | 6f 72 20 65 78 61 6d 70 |gram. F|or examp|
|00001370| 6c 65 2c 20 74 68 65 20 | 74 72 61 6e 73 66 6f 72 |le, the |transfor|
|00001380| 6d 61 74 69 6f 6e 20 70 | 72 6f 63 65 64 75 72 65 |mation p|rocedure|
|00001390| 20 66 6f 72 20 61 20 73 | 69 6d 70 6c 69 66 69 65 | for a s|implifie|
|000013a0| 64 0a 76 65 72 73 69 6f | 6e 20 6f 66 20 74 68 65 |d.versio|n of the|
|000013b0| 20 5c 69 64 65 7b 6c 65 | 74 7d 20 6d 61 63 72 6f | \ide{le|t} macro|
|000013c0| 20 6d 69 67 68 74 20 62 | 65 20 77 72 69 74 74 65 | might b|e writte|
|000013d0| 6e 20 61 73 0a 5c 62 65 | 67 69 6e 7b 76 65 72 62 |n as.\be|gin{verb|
|000013e0| 61 74 69 6d 7d 0a 20 20 | 20 20 20 28 6c 61 6d 62 |atim}. | (lamb|
|000013f0| 64 61 20 28 65 78 70 20 | 72 65 6e 61 6d 65 20 63 |da (exp |rename c|
|00001400| 6f 6d 70 61 72 65 29 0a | 20 20 20 20 20 20 20 28 |ompare).| (|
|00001410| 6c 65 74 20 28 28 76 61 | 72 73 20 28 6d 61 70 20 |let ((va|rs (map |
|00001420| 63 61 72 20 28 63 61 64 | 72 20 65 78 70 29 29 29 |car (cad|r exp)))|
|00001430| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 20 28 69 |. | (i|
|00001440| 6e 69 74 73 20 28 6d 61 | 70 20 63 61 64 72 20 28 |nits (ma|p cadr (|
|00001450| 63 61 64 72 20 65 78 70 | 29 29 29 0a 20 20 20 20 |cadr exp|))). |
|00001460| 20 20 20 20 20 20 20 20 | 20 28 62 6f 64 79 20 28 | | (body (|
|00001470| 63 64 64 72 20 65 78 70 | 29 29 29 0a 20 20 20 20 |cddr exp|))). |
|00001480| 20 20 20 20 20 60 28 28 | 6c 61 6d 62 64 61 20 2c | `((|lambda ,|
|00001490| 76 61 72 73 20 2c 40 62 | 6f 64 79 29 0a 20 20 20 |vars ,@b|ody). |
|000014a0| 20 20 20 20 20 20 20 20 | 2c 40 69 6e 69 74 73 29 | |,@inits)|
|000014b0| 29 29 0a 5c 65 6e 64 7b | 76 65 72 62 61 74 69 6d |)).\end{|verbatim|
|000014c0| 7d 0a 0a 0a 5c 6e 6f 69 | 6e 64 65 6e 74 0a 54 68 |}...\noi|ndent.Th|
|000014d0| 69 73 20 77 6f 75 6c 64 | 20 6e 6f 74 20 62 65 20 |is would| not be |
|000014e0| 68 79 67 69 65 6e 69 63 | 2c 20 68 6f 77 65 76 65 |hygienic|, howeve|
|000014f0| 72 2e 20 20 41 0a 68 79 | 67 69 65 6e 69 63 20 5c |r. A.hy|gienic \|
|00001500| 69 64 65 7b 6c 65 74 7d | 20 6d 61 63 72 6f 20 6d |ide{let}| macro m|
|00001510| 75 73 74 20 72 65 6e 61 | 6d 65 20 74 68 65 20 69 |ust rena|me the i|
|00001520| 64 65 6e 74 69 66 69 65 | 72 20 5c 69 64 65 7b 6c |dentifie|r \ide{l|
|00001530| 61 6d 62 64 61 7d 20 74 | 6f 20 70 72 6f 74 65 63 |ambda} t|o protec|
|00001540| 74 20 69 74 0a 66 72 6f | 6d 20 62 65 69 6e 67 20 |t it.fro|m being |
|00001550| 63 61 70 74 75 72 65 64 | 20 62 79 20 61 20 6c 6f |captured| by a lo|
|00001560| 63 61 6c 20 62 69 6e 64 | 69 6e 67 2e 20 20 54 68 |cal bind|ing. Th|
|00001570| 65 20 72 65 6e 61 6d 69 | 6e 67 20 65 66 66 65 63 |e renami|ng effec|
|00001580| 74 69 76 65 6c 79 0a 63 | 72 65 61 74 65 73 20 61 |tively.c|reates a|
|00001590| 6e 20 66 72 65 73 68 20 | 61 6c 69 61 73 20 66 6f |n fresh |alias fo|
|000015a0| 72 20 5c 69 64 65 7b 6c | 61 6d 62 64 61 7d 2c 20 |r \ide{l|ambda}, |
|000015b0| 6f 6e 65 20 74 68 61 74 | 20 63 61 6e 6e 6f 74 20 |one that| cannot |
|000015c0| 62 65 20 63 61 70 74 75 | 72 65 64 20 62 79 0a 61 |be captu|red by.a|
|000015d0| 6e 79 20 73 75 62 73 65 | 71 75 65 6e 74 20 62 69 |ny subse|quent bi|
|000015e0| 6e 64 69 6e 67 3a 0a 5c | 62 65 67 69 6e 7b 76 65 |nding:.\|begin{ve|
|000015f0| 72 62 61 74 69 6d 7d 0a | 20 20 20 20 20 28 6c 61 |rbatim}.| (la|
|00001600| 6d 62 64 61 20 28 65 78 | 70 20 72 65 6e 61 6d 65 |mbda (ex|p rename|
|00001610| 20 63 6f 6d 70 61 72 65 | 29 0a 20 20 20 20 20 20 | compare|). |
|00001620| 20 28 6c 65 74 20 28 28 | 76 61 72 73 20 28 6d 61 | (let ((|vars (ma|
|00001630| 70 20 63 61 72 20 28 63 | 61 64 72 20 65 78 70 29 |p car (c|adr exp)|
|00001640| 29 29 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |)). | |
|00001650| 28 69 6e 69 74 73 20 28 | 6d 61 70 20 63 61 64 72 |(inits (|map cadr|
|00001660| 20 28 63 61 64 72 20 65 | 78 70 29 29 29 0a 20 20 | (cadr e|xp))). |
|00001670| 20 20 20 20 20 20 20 20 | 20 20 20 28 62 6f 64 79 | | (body|
|00001680| 20 28 63 64 64 72 20 65 | 78 70 29 29 29 0a 20 20 | (cddr e|xp))). |
|00001690| 20 20 20 20 20 20 20 60 | 28 28 2c 28 72 65 6e 61 | `|((,(rena|
|000016a0| 6d 65 20 27 6c 61 6d 62 | 64 61 29 20 2c 76 61 72 |me 'lamb|da) ,var|
|000016b0| 73 20 2c 40 62 6f 64 79 | 29 0a 20 20 20 20 20 20 |s ,@body|). |
|000016c0| 20 20 20 20 20 2c 40 69 | 6e 69 74 73 29 29 29 0a | ,@i|nits))).|
|000016d0| 5c 65 6e 64 7b 76 65 72 | 62 61 74 69 6d 7d 0a 0a |\end{ver|batim}..|
|000016e0| 0a 20 20 20 54 68 65 20 | 65 78 70 72 65 73 73 69 |. The |expressi|
|000016f0| 6f 6e 20 72 65 74 75 72 | 6e 65 64 20 62 79 20 74 |on retur|ned by t|
|00001700| 68 65 20 74 72 61 6e 73 | 66 6f 72 6d 61 74 69 6f |he trans|formatio|
|00001710| 6e 20 70 72 6f 63 65 64 | 75 72 65 20 77 69 6c 6c |n proced|ure will|
|00001720| 20 62 65 0a 65 78 70 61 | 6e 64 65 64 20 69 6e 20 | be.expa|nded in |
|00001730| 74 68 65 20 73 79 6e 74 | 61 63 74 69 63 20 65 6e |the synt|actic en|
|00001740| 76 69 72 6f 6e 6d 65 6e | 74 20 6f 62 74 61 69 6e |vironmen|t obtain|
|00001750| 65 64 20 66 72 6f 6d 20 | 74 68 65 20 73 79 6e 74 |ed from |the synt|
|00001760| 61 63 74 69 63 0a 65 6e | 76 69 72 6f 6e 6d 65 6e |actic.en|vironmen|
|00001770| 74 20 6f 66 20 74 68 65 | 20 6d 61 63 72 6f 20 61 |t of the| macro a|
|00001780| 70 70 6c 69 63 61 74 69 | 6f 6e 20 62 79 20 62 69 |pplicati|on by bi|
|00001790| 6e 64 69 6e 67 20 61 6e | 79 20 66 72 65 73 68 20 |nding an|y fresh |
|000017a0| 69 64 65 6e 74 69 66 69 | 65 72 73 0a 67 65 6e 65 |identifi|ers.gene|
|000017b0| 72 61 74 65 64 20 62 79 | 20 74 68 65 20 72 65 6e |rated by| the ren|
|000017c0| 61 6d 69 6e 67 20 70 72 | 6f 63 65 64 75 72 65 20 |aming pr|ocedure |
|000017d0| 74 6f 20 74 68 65 20 64 | 65 6e 6f 74 61 74 69 6f |to the d|enotatio|
|000017e0| 6e 73 20 6f 66 20 74 68 | 65 20 6f 72 69 67 69 6e |ns of th|e origin|
|000017f0| 61 6c 0a 69 64 65 6e 74 | 69 66 69 65 72 73 20 69 |al.ident|ifiers i|
|00001800| 6e 20 74 68 65 20 73 79 | 6e 74 61 63 74 69 63 20 |n the sy|ntactic |
|00001810| 65 6e 76 69 72 6f 6e 6d | 65 6e 74 20 69 6e 20 77 |environm|ent in w|
|00001820| 68 69 63 68 20 74 68 65 | 20 6d 61 63 72 6f 20 77 |hich the| macro w|
|00001830| 61 73 0a 64 65 66 69 6e | 65 64 2e 20 20 54 68 69 |as.defin|ed. Thi|
|00001840| 73 20 6d 65 61 6e 73 20 | 74 68 61 74 20 61 20 72 |s means |that a r|
|00001850| 65 6e 61 6d 65 64 20 69 | 64 65 6e 74 69 66 69 65 |enamed i|dentifie|
|00001860| 72 20 77 69 6c 6c 20 64 | 65 6e 6f 74 65 20 74 68 |r will d|enote th|
|00001870| 65 20 73 61 6d 65 0a 74 | 68 69 6e 67 20 61 73 20 |e same.t|hing as |
|00001880| 74 68 65 20 6f 72 69 67 | 69 6e 61 6c 20 69 64 65 |the orig|inal ide|
|00001890| 6e 74 69 66 69 65 72 20 | 75 6e 6c 65 73 73 20 74 |ntifier |unless t|
|000018a0| 68 65 20 74 72 61 6e 73 | 66 6f 72 6d 61 74 69 6f |he trans|formatio|
|000018b0| 6e 20 70 72 6f 63 65 64 | 75 72 65 0a 74 68 61 74 |n proced|ure.that|
|000018c0| 20 72 65 6e 61 6d 65 64 | 20 74 68 65 20 69 64 65 | renamed| the ide|
|000018d0| 6e 74 69 66 69 65 72 20 | 70 6c 61 63 65 64 20 61 |ntifier |placed a|
|000018e0| 6e 20 6f 63 63 75 72 72 | 65 6e 63 65 20 6f 66 20 |n occurr|ence of |
|000018f0| 69 74 20 69 6e 20 61 20 | 62 69 6e 64 69 6e 67 0a |it in a |binding.|
|00001900| 70 6f 73 69 74 69 6f 6e | 2e 0a 0a 0a 20 20 20 54 |position|.... T|
|00001910| 68 65 20 72 65 6e 61 6d | 69 6e 67 20 70 72 6f 63 |he renam|ing proc|
|00001920| 65 64 75 72 65 20 61 63 | 74 73 20 61 73 20 61 20 |edure ac|ts as a |
|00001930| 6d 61 74 68 65 6d 61 74 | 69 63 61 6c 20 66 75 6e |mathemat|ical fun|
|00001940| 63 74 69 6f 6e 20 69 6e | 20 74 68 65 20 73 65 6e |ction in| the sen|
|00001950| 73 65 0a 74 68 61 74 20 | 74 68 65 20 69 64 65 6e |se.that |the iden|
|00001960| 74 69 66 69 65 72 73 20 | 6f 62 74 61 69 6e 65 64 |tifiers |obtained|
|00001970| 20 66 72 6f 6d 20 61 6e | 79 20 74 77 6f 20 63 61 | from an|y two ca|
|00001980| 6c 6c 73 20 77 69 74 68 | 20 74 68 65 20 73 61 6d |lls with| the sam|
|00001990| 65 0a 61 72 67 75 6d 65 | 6e 74 20 77 69 6c 6c 20 |e.argume|nt will |
|000019a0| 62 65 20 74 68 65 20 73 | 61 6d 65 20 69 6e 20 74 |be the s|ame in t|
|000019b0| 68 65 20 73 65 6e 73 65 | 20 6f 66 20 5c 69 64 65 |he sense| of \ide|
|000019c0| 7b 65 71 76 3f 7d 2e 20 | 20 49 74 20 69 73 20 61 |{eqv?}. | It is a|
|000019d0| 6e 20 65 72 72 6f 72 20 | 69 66 0a 74 68 65 20 72 |n error |if.the r|
|000019e0| 65 6e 61 6d 69 6e 67 20 | 70 72 6f 63 65 64 75 72 |enaming |procedur|
|000019f0| 65 20 69 73 20 63 61 6c | 6c 65 64 20 61 66 74 65 |e is cal|led afte|
|00001a00| 72 20 74 68 65 20 74 72 | 61 6e 73 66 6f 72 6d 61 |r the tr|ansforma|
|00001a10| 74 69 6f 6e 20 70 72 6f | 63 65 64 75 72 65 0a 68 |tion pro|cedure.h|
|00001a20| 61 73 20 72 65 74 75 72 | 6e 65 64 2e 0a 0a 0a 20 |as retur|ned.... |
|00001a30| 20 20 54 68 65 20 74 68 | 69 72 64 20 61 72 67 75 | The th|ird argu|
|00001a40| 6d 65 6e 74 20 74 6f 20 | 61 20 74 72 61 6e 73 66 |ment to |a transf|
|00001a50| 6f 72 6d 61 74 69 6f 6e | 20 70 72 6f 63 65 64 75 |ormation| procedu|
|00001a60| 72 65 20 69 73 20 61 20 | 63 6f 6d 70 61 72 69 73 |re is a |comparis|
|00001a70| 6f 6e 0a 70 72 65 64 69 | 63 61 74 65 20 74 68 61 |on.predi|cate tha|
|00001a80| 74 20 74 61 6b 65 73 20 | 74 68 65 20 72 65 70 72 |t takes |the repr|
|00001a90| 65 73 65 6e 74 61 74 69 | 6f 6e 73 20 6f 66 20 74 |esentati|ons of t|
|00001aa0| 77 6f 20 69 64 65 6e 74 | 69 66 69 65 72 73 20 61 |wo ident|ifiers a|
|00001ab0| 73 20 69 74 73 0a 61 72 | 67 75 6d 65 6e 74 73 20 |s its.ar|guments |
|00001ac0| 61 6e 64 20 72 65 74 75 | 72 6e 73 20 74 72 75 65 |and retu|rns true|
|00001ad0| 20 69 66 20 61 6e 64 20 | 6f 6e 6c 79 20 69 66 20 | if and |only if |
|00001ae0| 74 68 65 79 20 64 65 6e | 6f 74 65 20 74 68 65 20 |they den|ote the |
|00001af0| 73 61 6d 65 20 74 68 69 | 6e 67 0a 69 6e 20 74 68 |same thi|ng.in th|
|00001b00| 65 20 73 79 6e 74 61 63 | 74 69 63 20 65 6e 76 69 |e syntac|tic envi|
|00001b10| 72 6f 6e 6d 65 6e 74 20 | 74 68 61 74 20 77 69 6c |ronment |that wil|
|00001b20| 6c 20 62 65 20 75 73 65 | 64 20 74 6f 20 65 78 70 |l be use|d to exp|
|00001b30| 61 6e 64 20 74 68 65 0a | 74 72 61 6e 73 66 6f 72 |and the.|transfor|
|00001b40| 6d 65 64 20 6d 61 63 72 | 6f 20 61 70 70 6c 69 63 |med macr|o applic|
|00001b50| 61 74 69 6f 6e 2e 20 20 | 46 6f 72 20 65 78 61 6d |ation. |For exam|
|00001b60| 70 6c 65 2c 20 74 68 65 | 20 74 72 61 6e 73 66 6f |ple, the| transfo|
|00001b70| 72 6d 61 74 69 6f 6e 0a | 70 72 6f 63 65 64 75 72 |rmation.|procedur|
|00001b80| 65 20 66 6f 72 20 61 20 | 73 69 6d 70 6c 69 66 69 |e for a |simplifi|
|00001b90| 65 64 20 76 65 72 73 69 | 6f 6e 20 6f 66 20 74 68 |ed versi|on of th|
|00001ba0| 65 20 5c 69 64 65 7b 63 | 6f 6e 64 7d 20 6d 61 63 |e \ide{c|ond} mac|
|00001bb0| 72 6f 20 63 61 6e 20 62 | 65 20 77 72 69 74 74 65 |ro can b|e writte|
|00001bc0| 6e 0a 61 73 0a 5c 62 65 | 67 69 6e 7b 76 65 72 62 |n.as.\be|gin{verb|
|00001bd0| 61 74 69 6d 7d 0a 20 20 | 20 20 20 28 6c 61 6d 62 |atim}. | (lamb|
|00001be0| 64 61 20 28 65 78 70 20 | 72 65 6e 61 6d 65 20 63 |da (exp |rename c|
|00001bf0| 6f 6d 70 61 72 65 29 0a | 20 20 20 20 20 20 20 28 |ompare).| (|
|00001c00| 6c 65 74 20 28 28 63 6c | 61 75 73 65 73 20 28 63 |let ((cl|auses (c|
|00001c10| 64 72 20 65 78 70 29 29 | 29 0a 20 20 20 20 20 20 |dr exp))|). |
|00001c20| 20 20 20 28 69 66 20 28 | 6e 75 6c 6c 3f 20 63 6c | (if (|null? cl|
|00001c30| 61 75 73 65 73 29 0a 20 | 20 20 20 20 20 20 20 20 |auses). | |
|00001c40| 20 20 20 20 60 28 2c 28 | 72 65 6e 61 6d 65 20 27 | `(,(|rename '|
|00001c50| 71 75 6f 74 65 29 20 75 | 6e 73 70 65 63 69 66 69 |quote) u|nspecifi|
|00001c60| 65 64 29 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 |ed). | |
|00001c70| 20 28 6c 65 74 2a 20 28 | 28 66 69 72 73 74 20 28 | (let* (|(first (|
|00001c80| 63 61 72 20 63 6c 61 75 | 73 65 73 29 29 0a 20 20 |car clau|ses)). |
|00001c90| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001ca0| 20 20 28 72 65 73 74 20 | 28 63 64 72 20 63 6c 61 | (rest |(cdr cla|
|00001cb0| 75 73 65 73 29 29 0a 20 | 20 20 20 20 20 20 20 20 |uses)). | |
|00001cc0| 20 20 20 20 20 20 20 20 | 20 20 20 28 74 65 73 74 | | (test|
|00001cd0| 20 28 63 61 72 20 66 69 | 72 73 74 29 29 29 0a 20 | (car fi|rst))). |
|00001ce0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 28 63 | | (c|
|00001cf0| 6f 6e 64 20 28 28 61 6e | 64 20 28 69 64 65 6e 74 |ond ((an|d (ident|
|00001d00| 69 66 69 65 72 3f 20 74 | 65 73 74 29 0a 20 20 20 |ifier? t|est). |
|00001d10| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001d20| 20 20 20 20 20 20 20 20 | 28 63 6f 6d 70 61 72 65 | |(compare|
|00001d30| 20 74 65 73 74 20 28 72 | 65 6e 61 6d 65 20 27 65 | test (r|ename 'e|
|00001d40| 6c 73 65 29 29 29 0a 20 | 20 20 20 20 20 20 20 20 |lse))). | |
|00001d50| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 60 28 2c | | `(,|
|00001d60| 28 72 65 6e 61 6d 65 20 | 27 62 65 67 69 6e 29 20 |(rename |'begin) |
|00001d70| 2c 40 28 63 64 72 20 66 | 69 72 73 74 29 29 29 0a |,@(cdr f|irst))).|
|00001d80| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001d90| 20 20 20 20 20 28 65 6c | 73 65 20 60 28 2c 28 72 | (el|se `(,(r|
|00001da0| 65 6e 61 6d 65 20 27 69 | 66 29 0a 20 20 20 20 20 |ename 'i|f). |
|00001db0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001dc0| 20 20 20 20 20 20 20 20 | 2c 74 65 73 74 0a 20 20 | |,test. |
|00001dd0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001de0| 20 20 20 20 20 20 20 20 | 20 20 20 20 28 2c 28 72 | | (,(r|
|00001df0| 65 6e 61 6d 65 20 27 62 | 65 67 69 6e 29 20 2c 40 |ename 'b|egin) ,@|
|00001e00| 28 63 64 72 20 66 69 72 | 73 74 29 29 0a 20 20 20 |(cdr fir|st)). |
|00001e10| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001e20| 20 20 20 20 20 20 20 20 | 20 20 20 28 63 6f 6e 64 | | (cond|
|00001e30| 20 2c 40 72 65 73 74 29 | 29 29 29 29 29 29 29 0a | ,@rest)|))))))).|
|00001e40| 5c 65 6e 64 7b 76 65 72 | 62 61 74 69 6d 7d 0a 5c |\end{ver|batim}.\|
|00001e50| 6e 6f 69 6e 64 65 6e 74 | 0a 49 6e 20 74 68 69 73 |noindent|.In this|
|00001e60| 20 65 78 61 6d 70 6c 65 | 20 74 68 65 20 69 64 65 | example| the ide|
|00001e70| 6e 74 69 66 69 65 72 20 | 5c 69 64 65 7b 65 6c 73 |ntifier |\ide{els|
|00001e80| 65 7d 20 69 73 20 72 65 | 6e 61 6d 65 64 20 62 65 |e} is re|named be|
|00001e90| 66 6f 72 65 20 62 65 69 | 6e 67 20 70 61 73 73 65 |fore bei|ng passe|
|00001ea0| 64 0a 74 6f 20 74 68 65 | 20 63 6f 6d 70 61 72 69 |d.to the| compari|
|00001eb0| 73 6f 6e 20 70 72 65 64 | 69 63 61 74 65 2c 20 73 |son pred|icate, s|
|00001ec0| 6f 20 74 68 65 20 63 6f | 6d 70 61 72 69 73 6f 6e |o the co|mparison|
|00001ed0| 20 77 69 6c 6c 20 62 65 | 20 74 72 75 65 20 69 66 | will be| true if|
|00001ee0| 20 61 6e 64 0a 6f 6e 6c | 79 20 69 66 20 74 68 65 | and.onl|y if the|
|00001ef0| 20 74 65 73 74 20 65 78 | 70 72 65 73 73 69 6f 6e | test ex|pression|
|00001f00| 20 69 73 20 61 6e 20 69 | 64 65 6e 74 69 66 69 65 | is an i|dentifie|
|00001f10| 72 20 74 68 61 74 20 64 | 65 6e 6f 74 65 73 20 74 |r that d|enotes t|
|00001f20| 68 65 20 73 61 6d 65 0a | 74 68 69 6e 67 20 69 6e |he same.|thing in|
|00001f30| 20 74 68 65 20 73 79 6e | 74 61 63 74 69 63 20 65 | the syn|tactic e|
|00001f40| 6e 76 69 72 6f 6e 6d 65 | 6e 74 20 6f 66 20 74 68 |nvironme|nt of th|
|00001f50| 65 20 65 78 70 72 65 73 | 73 69 6f 6e 20 62 65 69 |e expres|sion bei|
|00001f60| 6e 67 20 74 72 61 6e 73 | 66 6f 72 6d 65 64 0a 61 |ng trans|formed.a|
|00001f70| 73 20 5c 69 64 65 7b 65 | 6c 73 65 7d 20 64 65 6e |s \ide{e|lse} den|
|00001f80| 6f 74 65 73 20 69 6e 20 | 74 68 65 20 73 79 6e 74 |otes in |the synt|
|00001f90| 61 63 74 69 63 20 65 6e | 76 69 72 6f 6e 6d 65 6e |actic en|vironmen|
|00001fa0| 74 20 69 6e 20 77 68 69 | 63 68 20 74 68 65 20 5c |t in whi|ch the \|
|00001fb0| 69 64 65 7b 63 6f 6e 64 | 7d 0a 6d 61 63 72 6f 20 |ide{cond|}.macro |
|00001fc0| 77 61 73 20 64 65 66 69 | 6e 65 64 2e 20 20 49 66 |was defi|ned. If|
|00001fd0| 20 5c 69 64 65 7b 65 6c | 73 65 7d 20 77 65 72 65 | \ide{el|se} were|
|00001fe0| 20 6e 6f 74 20 72 65 6e | 61 6d 65 64 20 62 65 66 | not ren|amed bef|
|00001ff0| 6f 72 65 20 62 65 69 6e | 67 20 70 61 73 73 65 64 |ore bein|g passed|
|00002000| 20 74 6f 0a 74 68 65 20 | 63 6f 6d 70 61 72 69 73 | to.the |comparis|
|00002010| 6f 6e 20 70 72 65 64 69 | 63 61 74 65 2c 20 74 68 |on predi|cate, th|
|00002020| 65 6e 20 69 74 20 77 6f | 75 6c 64 20 6d 61 74 63 |en it wo|uld matc|
|00002030| 68 20 61 20 6c 6f 63 61 | 6c 20 76 61 72 69 61 62 |h a loca|l variab|
|00002040| 6c 65 20 74 68 61 74 0a | 68 61 70 70 65 6e 65 64 |le that.|happened|
|00002050| 20 74 6f 20 62 65 20 6e | 61 6d 65 64 20 5c 69 64 | to be n|amed \id|
|00002060| 65 7b 65 6c 73 65 7d 2c | 20 61 6e 64 20 74 68 65 |e{else},| and the|
|00002070| 20 6d 61 63 72 6f 20 77 | 6f 75 6c 64 20 6e 6f 74 | macro w|ould not|
|00002080| 20 62 65 20 68 79 67 69 | 65 6e 69 63 2e 0a 0a 0a | be hygi|enic....|
|00002090| 20 20 20 53 6f 6d 65 20 | 6d 61 63 72 6f 73 20 61 | Some |macros a|
|000020a0| 72 65 20 6e 6f 6e 2d 68 | 79 67 69 65 6e 69 63 20 |re non-h|ygienic |
|000020b0| 62 79 20 64 65 73 69 67 | 6e 2e 20 20 46 6f 72 20 |by desig|n. For |
|000020c0| 65 78 61 6d 70 6c 65 2c | 20 74 68 65 0a 66 6f 6c |example,| the.fol|
|000020d0| 6c 6f 77 69 6e 67 20 64 | 65 66 69 6e 65 73 20 61 |lowing d|efines a|
|000020e0| 20 5c 69 64 65 7b 6c 6f | 6f 70 7d 20 6d 61 63 72 | \ide{lo|op} macr|
|000020f0| 6f 20 74 68 61 74 20 69 | 6d 70 6c 69 63 69 74 6c |o that i|mplicitl|
|00002100| 79 20 62 69 6e 64 73 20 | 5c 69 64 65 7b 65 78 69 |y binds |\ide{exi|
|00002110| 74 7d 20 74 6f 20 61 6e | 0a 65 73 63 61 70 65 20 |t} to an|.escape |
|00002120| 70 72 6f 63 65 64 75 72 | 65 2e 20 20 54 68 65 20 |procedur|e. The |
|00002130| 62 69 6e 64 69 6e 67 20 | 6f 66 20 5c 69 64 65 7b |binding |of \ide{|
|00002140| 65 78 69 74 7d 20 69 73 | 20 69 6e 74 65 6e 64 65 |exit} is| intende|
|00002150| 64 20 74 6f 20 63 61 70 | 74 75 72 65 20 66 72 65 |d to cap|ture fre|
|00002160| 65 0a 72 65 66 65 72 65 | 6e 63 65 73 20 74 6f 20 |e.refere|nces to |
|00002170| 5c 69 64 65 7b 65 78 69 | 74 7d 20 69 6e 20 74 68 |\ide{exi|t} in th|
|00002180| 65 20 62 6f 64 79 20 6f | 66 20 74 68 65 20 6c 6f |e body o|f the lo|
|00002190| 6f 70 2c 20 73 6f 20 5c | 69 64 65 7b 65 78 69 74 |op, so \|ide{exit|
|000021a0| 7d 20 69 73 20 6e 6f 74 | 0a 72 65 6e 61 6d 65 64 |} is not|.renamed|
|000021b0| 2e 0a 5c 62 65 67 69 6e | 7b 76 65 72 62 61 74 69 |..\begin|{verbati|
|000021c0| 6d 7d 0a 20 20 20 20 20 | 28 64 65 66 69 6e 65 2d |m}. |(define-|
|000021d0| 73 79 6e 74 61 78 20 6c | 6f 6f 70 0a 20 20 20 20 |syntax l|oop. |
|000021e0| 20 20 20 28 74 72 61 6e | 73 66 6f 72 6d 65 72 0a | (tran|sformer.|
|000021f0| 20 20 20 20 20 20 20 20 | 28 6c 61 6d 62 64 61 20 | |(lambda |
|00002200| 28 78 20 72 20 63 29 0a | 20 20 20 20 20 20 20 20 |(x r c).| |
|00002210| 20 20 28 6c 65 74 20 28 | 28 62 6f 64 79 20 28 63 | (let (|(body (c|
|00002220| 64 72 20 78 29 29 29 0a | 20 20 20 20 20 20 20 20 |dr x))).| |
|00002230| 20 20 20 20 60 28 2c 28 | 72 20 27 63 61 6c 6c 2d | `(,(|r 'call-|
|00002240| 77 69 74 68 2d 63 75 72 | 72 65 6e 74 2d 63 6f 6e |with-cur|rent-con|
|00002250| 74 69 6e 75 61 74 69 6f | 6e 29 0a 20 20 20 20 20 |tinuatio|n). |
|00002260| 20 20 20 20 20 20 20 20 | 20 28 2c 28 72 20 27 6c | | (,(r 'l|
|00002270| 61 6d 62 64 61 29 20 28 | 65 78 69 74 29 0a 20 20 |ambda) (|exit). |
|00002280| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 28 2c 28 | | (,(|
|00002290| 72 20 27 6c 65 74 29 20 | 2c 28 72 20 27 66 29 20 |r 'let) |,(r 'f) |
|000022a0| 28 29 20 2c 40 62 6f 64 | 79 20 28 2c 28 72 20 27 |() ,@bod|y (,(r '|
|000022b0| 66 29 29 29 29 29 29 29 | 29 29 0a 5c 65 6e 64 7b |f)))))))|)).\end{|
|000022c0| 76 65 72 62 61 74 69 6d | 7d 0a 0a 0a 53 75 70 70 |verbatim|}...Supp|
|000022d0| 6f 73 65 20 61 20 5c 69 | 64 65 7b 77 68 69 6c 65 |ose a \i|de{while|
|000022e0| 7d 20 6d 61 63 72 6f 20 | 69 73 20 69 6d 70 6c 65 |} macro |is imple|
|000022f0| 6d 65 6e 74 65 64 20 75 | 73 69 6e 67 20 5c 69 64 |mented u|sing \id|
|00002300| 65 7b 6c 6f 6f 70 7d 2c | 20 77 69 74 68 20 74 68 |e{loop},| with th|
|00002310| 65 20 69 6e 74 65 6e 74 | 0a 74 68 61 74 20 5c 69 |e intent|.that \i|
|00002320| 64 65 7b 65 78 69 74 7d | 20 6d 61 79 20 62 65 20 |de{exit}| may be |
|00002330| 75 73 65 64 20 74 6f 20 | 65 73 63 61 70 65 20 66 |used to |escape f|
|00002340| 72 6f 6d 20 74 68 65 20 | 5c 69 64 65 7b 77 68 69 |rom the |\ide{whi|
|00002350| 6c 65 7d 20 6c 6f 6f 70 | 2e 20 20 54 68 65 20 5c |le} loop|. The \|
|00002360| 69 64 65 7b 77 68 69 6c | 65 7d 0a 6d 61 63 72 6f |ide{whil|e}.macro|
|00002370| 20 63 61 6e 6e 6f 74 20 | 62 65 20 77 72 69 74 74 | cannot |be writt|
|00002380| 65 6e 20 61 73 0a 5c 62 | 65 67 69 6e 7b 76 65 72 |en as.\b|egin{ver|
|00002390| 62 61 74 69 6d 7d 0a 20 | 20 20 20 20 28 64 65 66 |batim}. | (def|
|000023a0| 69 6e 65 2d 73 79 6e 74 | 61 78 20 77 68 69 6c 65 |ine-synt|ax while|
|000023b0| 0a 20 20 20 20 20 20 20 | 28 73 79 6e 74 61 78 2d |. |(syntax-|
|000023c0| 72 75 6c 65 73 20 28 29 | 0a 20 20 20 20 20 20 20 |rules ()|. |
|000023d0| 20 20 28 28 77 68 69 6c | 65 20 74 65 73 74 20 62 | ((whil|e test b|
|000023e0| 6f 64 79 20 2e 2e 2e 29 | 0a 20 20 20 20 20 20 20 |ody ...)|. |
|000023f0| 20 20 20 28 6c 6f 6f 70 | 20 28 69 66 20 28 6e 6f | (loop| (if (no|
|00002400| 74 20 74 65 73 74 29 20 | 28 65 78 69 74 20 23 66 |t test) |(exit #f|
|00002410| 29 29 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |)). | |
|00002420| 20 20 20 62 6f 64 79 20 | 2e 2e 2e 29 29 29 29 0a | body |...)))).|
|00002430| 5c 65 6e 64 7b 76 65 72 | 62 61 74 69 6d 7d 0a 5c |\end{ver|batim}.\|
|00002440| 6e 6f 69 6e 64 65 6e 74 | 0a 62 65 63 61 75 73 65 |noindent|.because|
|00002450| 20 74 68 65 20 72 65 66 | 65 72 65 6e 63 65 20 74 | the ref|erence t|
|00002460| 6f 20 5c 69 64 65 7b 65 | 78 69 74 7d 20 74 68 61 |o \ide{e|xit} tha|
|00002470| 74 20 69 73 20 69 6e 73 | 65 72 74 65 64 20 62 79 |t is ins|erted by|
|00002480| 20 74 68 65 20 5c 69 64 | 65 7b 77 68 69 6c 65 7d | the \id|e{while}|
|00002490| 20 6d 61 63 72 6f 0a 69 | 73 20 69 6e 74 65 6e 64 | macro.i|s intend|
|000024a0| 65 64 20 74 6f 20 62 65 | 20 63 61 70 74 75 72 65 |ed to be| capture|
|000024b0| 64 20 62 79 20 74 68 65 | 20 62 69 6e 64 69 6e 67 |d by the| binding|
|000024c0| 20 6f 66 20 5c 69 64 65 | 7b 65 78 69 74 7d 20 74 | of \ide|{exit} t|
|000024d0| 68 61 74 20 77 69 6c 6c | 20 62 65 0a 69 6e 73 65 |hat will| be.inse|
|000024e0| 72 74 65 64 20 62 79 20 | 74 68 65 20 5c 69 64 65 |rted by |the \ide|
|000024f0| 7b 6c 6f 6f 70 7d 20 6d | 61 63 72 6f 2e 20 20 49 |{loop} m|acro. I|
|00002500| 6e 20 6f 74 68 65 72 20 | 77 6f 72 64 73 2c 20 74 |n other |words, t|
|00002510| 68 69 73 20 5c 69 64 65 | 7b 77 68 69 6c 65 7d 20 |his \ide|{while} |
|00002520| 6d 61 63 72 6f 20 69 73 | 0a 6e 6f 74 20 68 79 67 |macro is|.not hyg|
|00002530| 69 65 6e 69 63 2e 20 20 | 4c 69 6b 65 20 5c 69 64 |ienic. |Like \id|
|00002540| 65 7b 6c 6f 6f 70 7d 2c | 20 69 74 20 6d 75 73 74 |e{loop},| it must|
|00002550| 20 62 65 20 77 72 69 74 | 74 65 6e 20 75 73 69 6e | be writ|ten usin|
|00002560| 67 20 74 68 65 20 5c 69 | 64 65 7b 74 72 61 6e 73 |g the \i|de{trans|
|00002570| 66 6f 72 6d 65 72 7d 0a | 73 79 6e 74 61 78 3a 0a |former}.|syntax:.|
|00002580| 5c 62 65 67 69 6e 7b 76 | 65 72 62 61 74 69 6d 7d |\begin{v|erbatim}|
|00002590| 0a 20 20 20 20 20 28 64 | 65 66 69 6e 65 2d 73 79 |. (d|efine-sy|
|000025a0| 6e 74 61 78 20 77 68 69 | 6c 65 0a 20 20 20 20 20 |ntax whi|le. |
|000025b0| 20 20 28 74 72 61 6e 73 | 66 6f 72 6d 65 72 0a 20 | (trans|former. |
|000025c0| 20 20 20 20 20 20 20 28 | 6c 61 6d 62 64 61 20 28 | (|lambda (|
|000025d0| 78 20 72 20 63 29 0a 20 | 20 20 20 20 20 20 20 20 |x r c). | |
|000025e0| 20 28 6c 65 74 20 28 28 | 74 65 73 74 20 28 63 61 | (let ((|test (ca|
|000025f0| 64 72 20 78 29 29 0a 20 | 20 20 20 20 20 20 20 20 |dr x)). | |
|00002600| 20 20 20 20 20 20 20 28 | 62 6f 64 79 20 28 63 64 | (|body (cd|
|00002610| 64 72 20 78 29 29 29 0a | 20 20 20 20 20 20 20 20 |dr x))).| |
|00002620| 20 20 20 20 60 28 2c 28 | 72 20 27 6c 6f 6f 70 29 | `(,(|r 'loop)|
|00002630| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 28 |. | (|
|00002640| 2c 28 72 20 27 69 66 29 | 20 28 2c 28 72 20 27 6e |,(r 'if)| (,(r 'n|
|00002650| 6f 74 29 20 2c 74 65 73 | 74 29 20 28 65 78 69 74 |ot) ,tes|t) (exit|
|00002660| 20 23 66 29 29 0a 20 20 | 20 20 20 20 20 20 20 20 | #f)). | |
|00002670| 20 20 20 20 2c 40 62 6f | 64 79 29 29 29 29 29 0a | ,@bo|dy))))).|
|00002680| 5c 65 6e 64 7b 76 65 72 | 62 61 74 69 6d 7d 0a 0a |\end{ver|batim}..|
|00002690| 0a 5c 62 65 67 69 6e 7b | 74 68 65 62 69 62 6c 69 |.\begin{|thebibli|
|000026a0| 6f 67 72 61 70 68 79 7d | 7b 39 39 7d 0a 0a 0a 5c |ography}|{99}...\|
|000026b0| 62 69 62 69 74 65 6d 7b | 72 72 72 73 7d 20 20 20 |bibitem{|rrrs} |
|000026c0| 20 20 20 57 69 6c 6c 69 | 61 6d 20 43 6c 69 6e 67 | Willi|am Cling|
|000026d0| 65 72 20 61 6e 64 20 4a | 6f 6e 61 74 68 61 6e 20 |er and J|onathan |
|000026e0| 52 65 65 73 2c 20 65 64 | 69 74 6f 72 73 2e 20 5c |Rees, ed|itors. \|
|000026f0| 5c 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |\. | |
|00002700| 20 20 20 20 20 20 52 65 | 76 69 73 65 64 24 5e 34 | Re|vised$^4|
|00002710| 24 20 72 65 70 6f 72 74 | 20 6f 6e 20 74 68 65 20 |$ report| on the |
|00002720| 61 6c 67 6f 72 69 74 68 | 6d 69 63 20 6c 61 6e 67 |algorith|mic lang|
|00002730| 75 61 67 65 0a 20 20 20 | 20 20 20 20 20 20 20 20 |uage. | |
|00002740| 20 20 20 20 20 20 20 20 | 20 20 20 53 63 68 65 6d | | Schem|
|00002750| 65 2e 20 5c 5c 0a 20 20 | 20 20 20 20 20 20 20 20 |e. \\. | |
|00002760| 20 20 20 20 20 20 20 20 | 20 20 54 6f 20 61 70 70 | | To app|
|00002770| 65 61 72 20 69 6e 20 74 | 68 65 20 70 72 65 76 69 |ear in t|he previ|
|00002780| 6f 75 73 20 69 73 73 75 | 65 20 6f 66 20 7b 5c 65 |ous issu|e of {\e|
|00002790| 6d 20 4c 69 73 70 20 50 | 6f 69 6e 74 65 72 73 7d |m Lisp P|ointers}|
|000027a0| 2e 0a 0a 0a 5c 62 69 62 | 69 74 65 6d 7b 6d 61 63 |....\bib|item{mac|
|000027b0| 72 6f 73 74 68 61 74 77 | 6f 72 6b 7d 20 20 20 20 |rosthatw|ork} |
|000027c0| 57 69 6c 6c 69 61 6d 20 | 43 6c 69 6e 67 65 72 20 |William |Clinger |
|000027d0| 61 6e 64 20 4a 6f 6e 61 | 74 68 61 6e 20 52 65 65 |and Jona|than Ree|
|000027e0| 73 2e 20 5c 5c 0a 20 20 | 20 20 20 20 20 20 20 20 |s. \\. | |
|000027f0| 20 20 20 20 20 20 20 20 | 20 20 4d 61 63 72 6f 73 | | Macros|
|00002800| 20 74 68 61 74 20 77 6f | 72 6b 2e 20 5c 5c 0a 20 | that wo|rk. \\. |
|00002810| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002820| 20 20 20 7b 5c 65 6d 20 | 31 39 39 31 20 41 43 4d | {\em |1991 ACM|
|00002830| 20 43 6f 6e 66 65 72 65 | 6e 63 65 20 6f 6e 0a 20 | Confere|nce on. |
|00002840| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002850| 20 20 20 20 20 50 72 69 | 6e 63 69 70 6c 65 73 20 | Pri|nciples |
|00002860| 6f 66 20 50 72 6f 67 72 | 61 6d 6d 69 6e 67 20 4c |of Progr|amming L|
|00002870| 61 6e 67 75 61 67 65 73 | 7d 2e 0a 0a 0a 5c 62 69 |anguages|}....\bi|
|00002880| 62 69 74 65 6d 7b 68 61 | 6e 73 6f 6e 7d 20 20 20 |bitem{ha|nson} |
|00002890| 20 43 68 72 69 73 20 48 | 61 6e 73 6f 6e 2e 20 5c | Chris H|anson. \|
|000028a0| 5c 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |\. | |
|000028b0| 20 20 20 20 20 20 41 20 | 73 79 6e 74 61 63 74 69 | A |syntacti|
|000028c0| 63 20 63 6c 6f 73 75 72 | 65 73 20 6d 61 63 72 6f |c closur|es macro|
|000028d0| 20 66 61 63 69 6c 69 74 | 79 2e 20 5c 5c 0a 20 20 | facilit|y. \\. |
|000028e0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000028f0| 20 20 54 6f 20 61 70 70 | 65 61 72 20 69 6e 20 74 | To app|ear in t|
|00002900| 68 69 73 20 69 73 73 75 | 65 20 6f 66 20 7b 5c 65 |his issu|e of {\e|
|00002910| 6d 20 4c 69 73 70 20 50 | 6f 69 6e 74 65 72 73 7d |m Lisp P|ointers}|
|00002920| 2e 0a 5c 65 6e 64 7b 74 | 68 65 62 69 62 6c 69 6f |..\end{t|hebiblio|
|00002930| 67 72 61 70 68 79 7d 0a | 0a 0a 0a 0a 5c 65 6e 64 |graphy}.|....\end|
|00002940| 7b 64 6f 63 75 6d 65 6e | 74 7d 0a |{documen|t}. |
+--------+-------------------------+-------------------------+--------+--------+