home *** CD-ROM | disk | FTP | other *** search
open in:
MacOS 8.1
|
Win98
|
DOS
browse contents |
view JSON data
|
view as text
This file was processed as: LaTeX Document
(document/latex).
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| dexvert
| LaTeX Document (document/latex)
| magic
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| 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 65 78 74 72 61 70 61 | 72 74 7b 41 70 70 65 6e |\extrapa|rt{Appen|
|00000010| 64 69 78 3a 20 4d 61 63 | 72 6f 73 7d 0a 0a 54 68 |dix: Mac|ros}..Th|
|00000020| 69 73 20 61 70 70 65 6e | 64 69 78 20 64 65 73 63 |is appen|dix desc|
|00000030| 72 69 62 65 73 20 61 6e | 20 65 78 74 65 6e 73 69 |ribes an| extensi|
|00000040| 6f 6e 20 74 6f 20 53 63 | 68 65 6d 65 20 74 68 61 |on to Sc|heme tha|
|00000050| 74 20 61 6c 6c 6f 77 73 | 20 70 72 6f 67 72 61 6d |t allows| program|
|00000060| 73 0a 74 6f 20 64 65 66 | 69 6e 65 20 61 6e 64 20 |s.to def|ine and |
|00000070| 75 73 65 20 6e 65 77 20 | 64 65 72 69 76 65 64 20 |use new |derived |
|00000080| 65 78 70 72 65 73 73 69 | 6f 6e 20 74 79 70 65 73 |expressi|on types|
|00000090| 2e 0a 41 20 64 65 72 69 | 76 65 64 20 65 78 70 72 |..A deri|ved expr|
|000000a0| 65 73 73 69 6f 6e 20 74 | 79 70 65 20 74 68 61 74 |ession t|ype that|
|000000b0| 20 68 61 73 20 62 65 65 | 6e 20 64 65 66 69 6e 65 | has bee|n define|
|000000c0| 64 20 75 73 69 6e 67 20 | 74 68 69 73 20 65 78 74 |d using |this ext|
|000000d0| 65 6e 73 69 6f 6e 0a 69 | 73 20 63 61 6c 6c 65 64 |ension.i|s called|
|000000e0| 20 61 20 7b 5c 65 6d 20 | 6d 61 63 72 6f 7d 2e 5c | a {\em |macro}.\|
|000000f0| 6d 61 69 6e 69 6e 64 65 | 78 7b 6d 61 63 72 6f 7d |maininde|x{macro}|
|00000100| 0a 0a 44 65 72 69 76 65 | 64 20 65 78 70 72 65 73 |..Derive|d expres|
|00000110| 73 69 6f 6e 20 74 79 70 | 65 73 20 69 6e 74 72 6f |sion typ|es intro|
|00000120| 64 75 63 65 64 20 75 73 | 69 6e 67 20 74 68 69 73 |duced us|ing this|
|00000130| 20 65 78 74 65 6e 73 69 | 6f 6e 20 68 61 76 65 0a | extensi|on have.|
|00000140| 74 68 65 20 73 79 6e 74 | 61 78 0a 5c 62 65 67 69 |the synt|ax.\begi|
|00000150| 6e 7b 73 63 68 65 6d 65 | 7d 0a 28 5c 68 79 70 65 |n{scheme|}.(\hype|
|00000160| 72 7b 6b 65 79 77 6f 72 | 64 7d 20 5c 61 72 62 6e |r{keywor|d} \arbn|
|00000170| 6f 7b 5c 68 79 70 65 72 | 7b 64 61 74 75 6d 7d 7d |o{\hyper|{datum}}|
|00000180| 29 25 0a 5c 65 6e 64 7b | 73 63 68 65 6d 65 7d 25 |)%.\end{|scheme}%|
|00000190| 0a 77 68 65 72 65 20 5c | 68 79 70 65 72 7b 6b 65 |.where \|hyper{ke|
|000001a0| 79 77 6f 72 64 7d 20 69 | 73 20 61 6e 20 69 64 65 |yword} i|s an ide|
|000001b0| 6e 74 69 66 69 65 72 20 | 74 68 61 74 20 75 6e 69 |ntifier |that uni|
|000001c0| 71 75 65 6c 79 20 64 65 | 74 65 72 6d 69 6e 65 73 |quely de|termines|
|000001d0| 20 74 68 65 0a 65 78 70 | 72 65 73 73 69 6f 6e 20 | the.exp|ression |
|000001e0| 74 79 70 65 2e 20 20 54 | 68 69 73 20 69 64 65 6e |type. T|his iden|
|000001f0| 74 69 66 69 65 72 20 69 | 73 20 63 61 6c 6c 65 64 |tifier i|s called|
|00000200| 20 74 68 65 20 7b 5c 65 | 6d 20 73 79 6e 74 61 63 | the {\e|m syntac|
|00000210| 74 69 63 0a 6b 65 79 77 | 6f 72 64 7d 5c 69 6e 64 |tic.keyw|ord}\ind|
|00000220| 65 78 7b 73 79 6e 74 61 | 63 74 69 63 20 6b 65 79 |ex{synta|ctic key|
|00000230| 77 6f 72 64 7d 2c 20 6f | 72 20 73 69 6d 70 6c 79 |word}, o|r simply|
|00000240| 20 7b 5c 65 6d 0a 6b 65 | 79 77 6f 72 64 7d 5c 69 | {\em.ke|yword}\i|
|00000250| 6e 64 65 78 7b 6b 65 79 | 77 6f 72 64 7d 2c 20 6f |ndex{key|word}, o|
|00000260| 66 20 74 68 65 20 6d 61 | 63 72 6f 5c 69 6e 64 65 |f the ma|cro\inde|
|00000270| 78 7b 6d 61 63 72 6f 20 | 6b 65 79 77 6f 72 64 7d |x{macro |keyword}|
|00000280| 2e 20 20 54 68 65 0a 6e | 75 6d 62 65 72 20 6f 66 |. The.n|umber of|
|00000290| 20 74 68 65 20 5c 68 79 | 70 65 72 7b 64 61 74 75 | the \hy|per{datu|
|000002a0| 6d 7d 73 2c 20 61 6e 64 | 20 74 68 65 69 72 20 73 |m}s, and| their s|
|000002b0| 79 6e 74 61 78 2c 20 64 | 65 70 65 6e 64 73 20 6f |yntax, d|epends o|
|000002c0| 6e 20 74 68 65 0a 65 78 | 70 72 65 73 73 69 6f 6e |n the.ex|pression|
|000002d0| 20 74 79 70 65 2e 0a 0a | 45 61 63 68 20 69 6e 73 | type...|Each ins|
|000002e0| 74 61 6e 63 65 20 6f 66 | 20 61 20 6d 61 63 72 6f |tance of| a macro|
|000002f0| 20 69 73 20 63 61 6c 6c | 65 64 20 61 20 7b 5c 65 | is call|ed a {\e|
|00000300| 6d 20 75 73 65 7d 5c 69 | 6e 64 65 78 7b 6d 61 63 |m use}\i|ndex{mac|
|00000310| 72 6f 20 75 73 65 7d 0a | 6f 66 20 74 68 65 20 6d |ro use}.|of the m|
|00000320| 61 63 72 6f 2e 0a 54 68 | 65 20 73 65 74 20 6f 66 |acro..Th|e set of|
|00000330| 20 72 75 6c 65 73 2c 20 | 6f 72 20 6d 6f 72 65 20 | rules, |or more |
|00000340| 67 65 6e 65 72 61 6c 6c | 79 20 74 68 65 20 70 72 |generall|y the pr|
|00000350| 6f 63 65 64 75 72 65 2c | 20 74 68 61 74 20 73 70 |ocedure,| that sp|
|00000360| 65 63 69 66 69 65 73 0a | 68 6f 77 20 61 20 75 73 |ecifies.|how a us|
|00000370| 65 20 6f 66 20 61 20 6d | 61 63 72 6f 20 69 73 20 |e of a m|acro is |
|00000380| 74 72 61 6e 73 63 72 69 | 62 65 64 20 69 6e 74 6f |transcri|bed into|
|00000390| 20 61 20 6d 6f 72 65 20 | 70 72 69 6d 69 74 69 76 | a more |primitiv|
|000003a0| 65 20 65 78 70 72 65 73 | 73 69 6f 6e 0a 69 73 20 |e expres|sion.is |
|000003b0| 63 61 6c 6c 65 64 20 74 | 68 65 20 7b 5c 65 6d 20 |called t|he {\em |
|000003c0| 74 72 61 6e 73 66 6f 72 | 6d 65 72 7d 5c 69 6e 64 |transfor|mer}\ind|
|000003d0| 65 78 7b 6d 61 63 72 6f | 20 74 72 61 6e 73 66 6f |ex{macro| transfo|
|000003e0| 72 6d 65 72 7d 0a 6f 66 | 20 74 68 65 20 6d 61 63 |rmer}.of| the mac|
|000003f0| 72 6f 2e 0a 0a 54 68 65 | 20 65 78 74 65 6e 73 69 |ro...The| extensi|
|00000400| 6f 6e 20 64 65 73 63 72 | 69 62 65 64 20 68 65 72 |on descr|ibed her|
|00000410| 65 20 63 6f 6e 73 69 73 | 74 73 20 6f 66 20 74 68 |e consis|ts of th|
|00000420| 72 65 65 20 70 61 72 74 | 73 3a 0a 0a 5c 62 65 67 |ree part|s:..\beg|
|00000430| 69 6e 7b 69 74 65 6d 69 | 7a 65 7d 0a 0a 5c 69 74 |in{itemi|ze}..\it|
|00000440| 65 6d 20 41 20 73 65 74 | 20 6f 66 20 65 78 70 72 |em A set| of expr|
|00000450| 65 73 73 69 6f 6e 73 20 | 75 73 65 64 20 74 6f 20 |essions |used to |
|00000460| 65 73 74 61 62 6c 69 73 | 68 20 74 68 61 74 20 63 |establis|h that c|
|00000470| 65 72 74 61 69 6e 20 69 | 64 65 6e 74 69 66 69 65 |ertain i|dentifie|
|00000480| 72 73 0a 61 72 65 20 6d | 61 63 72 6f 20 6b 65 79 |rs.are m|acro key|
|00000490| 77 6f 72 64 73 2c 20 61 | 73 73 6f 63 69 61 74 65 |words, a|ssociate|
|000004a0| 20 74 68 65 6d 20 77 69 | 74 68 20 6d 61 63 72 6f | them wi|th macro|
|000004b0| 20 74 72 61 6e 73 66 6f | 72 6d 65 72 73 2c 20 61 | transfo|rmers, a|
|000004c0| 6e 64 20 63 6f 6e 74 72 | 6f 6c 0a 74 68 65 20 73 |nd contr|ol.the s|
|000004d0| 63 6f 70 65 20 77 69 74 | 68 69 6e 20 77 68 69 63 |cope wit|hin whic|
|000004e0| 68 20 61 20 6d 61 63 72 | 6f 20 69 73 20 64 65 66 |h a macr|o is def|
|000004f0| 69 6e 65 64 2c 0a 0a 5c | 69 74 65 6d 20 61 20 63 |ined,..\|item a c|
|00000500| 6f 6e 76 65 6e 69 65 6e | 74 20 70 61 74 74 65 72 |onvenien|t patter|
|00000510| 6e 20 6c 61 6e 67 75 61 | 67 65 20 74 68 61 74 20 |n langua|ge that |
|00000520| 6d 61 6b 65 73 20 69 74 | 20 65 61 73 79 20 74 6f |makes it| easy to|
|00000530| 20 77 72 69 74 65 0a 74 | 72 61 6e 73 66 6f 72 6d | write.t|ransform|
|00000540| 65 72 73 20 66 6f 72 20 | 6d 6f 73 74 20 6d 61 63 |ers for |most mac|
|00000550| 72 6f 73 2c 20 61 6e 64 | 0a 0a 5c 69 74 65 6d 20 |ros, and|..\item |
|00000560| 61 20 63 6f 6d 70 61 74 | 69 62 6c 65 20 6c 6f 77 |a compat|ible low|
|00000570| 2d 6c 65 76 65 6c 20 6d | 61 63 72 6f 20 66 61 63 |-level m|acro fac|
|00000580| 69 6c 69 74 79 20 66 6f | 72 20 77 72 69 74 69 6e |ility fo|r writin|
|00000590| 67 20 6d 61 63 72 6f 0a | 74 72 61 6e 73 66 6f 72 |g macro.|transfor|
|000005a0| 6d 65 72 73 20 74 68 61 | 74 20 63 61 6e 6e 6f 74 |mers tha|t cannot|
|000005b0| 20 62 65 20 65 78 70 72 | 65 73 73 65 64 20 62 79 | be expr|essed by|
|000005c0| 20 74 68 65 20 70 61 74 | 74 65 72 6e 20 6c 61 6e | the pat|tern lan|
|000005d0| 67 75 61 67 65 2e 0a 0a | 5c 65 6e 64 7b 69 74 65 |guage...|\end{ite|
|000005e0| 6d 69 7a 65 7d 0a 0a 57 | 69 74 68 20 74 68 69 73 |mize}..W|ith this|
|000005f0| 20 65 78 74 65 6e 73 69 | 6f 6e 2c 20 74 68 65 72 | extensi|on, ther|
|00000600| 65 20 61 72 65 20 6e 6f | 20 72 65 73 65 72 76 65 |e are no| reserve|
|00000610| 64 20 69 64 65 6e 74 69 | 66 69 65 72 73 2e 20 20 |d identi|fiers. |
|00000620| 54 68 65 20 73 79 6e 74 | 61 63 74 69 63 0a 6b 65 |The synt|actic.ke|
|00000630| 79 77 6f 72 64 20 6f 66 | 20 61 20 6d 61 63 72 6f |yword of| a macro|
|00000640| 20 6d 61 79 20 73 68 61 | 64 6f 77 20 76 61 72 69 | may sha|dow vari|
|00000650| 61 62 6c 65 20 62 69 6e | 64 69 6e 67 73 2c 20 61 |able bin|dings, a|
|00000660| 6e 64 20 6c 6f 63 61 6c | 20 76 61 72 69 61 62 6c |nd local| variabl|
|00000670| 65 0a 62 69 6e 64 69 6e | 67 73 20 6d 61 79 20 73 |e.bindin|gs may s|
|00000680| 68 61 64 6f 77 20 6b 65 | 79 77 6f 72 64 20 62 69 |hadow ke|yword bi|
|00000690| 6e 64 69 6e 67 73 2e 20 | 20 5c 69 6e 64 65 78 7b |ndings. | \index{|
|000006a0| 6b 65 79 77 6f 72 64 7d | 20 41 6c 6c 20 6d 61 63 |keyword}| All mac|
|000006b0| 72 6f 73 0a 64 65 66 69 | 6e 65 64 20 75 73 69 6e |ros.defi|ned usin|
|000006c0| 67 20 74 68 65 20 70 61 | 74 74 65 72 6e 20 6c 61 |g the pa|ttern la|
|000006d0| 6e 67 75 61 67 65 20 61 | 72 65 20 60 60 68 79 67 |nguage a|re ``hyg|
|000006e0| 69 65 6e 69 63 27 27 20 | 61 6e 64 0a 60 60 72 65 |ienic'' |and.``re|
|000006f0| 66 65 72 65 6e 74 69 61 | 6c 6c 79 20 74 72 61 6e |ferentia|lly tran|
|00000700| 73 70 61 72 65 6e 74 27 | 27 3a 5c 6d 61 69 6e 69 |sparent'|':\maini|
|00000710| 6e 64 65 78 7b 68 79 67 | 69 65 6e 69 63 7d 0a 5c |ndex{hyg|ienic}.\|
|00000720| 6d 61 69 6e 69 6e 64 65 | 78 7b 72 65 66 65 72 65 |maininde|x{refere|
|00000730| 6e 74 69 61 6c 6c 79 20 | 74 72 61 6e 73 70 61 72 |ntially |transpar|
|00000740| 65 6e 74 7d 0a 0a 5c 62 | 65 67 69 6e 7b 69 74 65 |ent}..\b|egin{ite|
|00000750| 6d 69 7a 65 7d 0a 0a 5c | 69 74 65 6d 20 49 66 20 |mize}..\|item If |
|00000760| 61 20 6d 61 63 72 6f 20 | 74 72 61 6e 73 66 6f 72 |a macro |transfor|
|00000770| 6d 65 72 20 69 6e 73 65 | 72 74 73 20 61 20 62 69 |mer inse|rts a bi|
|00000780| 6e 64 69 6e 67 20 66 6f | 72 20 61 6e 20 69 64 65 |nding fo|r an ide|
|00000790| 6e 74 69 66 69 65 72 0a | 28 76 61 72 69 61 62 6c |ntifier.|(variabl|
|000007a0| 65 20 6f 72 20 6b 65 79 | 77 6f 72 64 29 2c 20 74 |e or key|word), t|
|000007b0| 68 65 20 69 64 65 6e 74 | 69 66 69 65 72 20 77 69 |he ident|ifier wi|
|000007c0| 6c 6c 20 69 6e 20 65 66 | 66 65 63 74 20 62 65 20 |ll in ef|fect be |
|000007d0| 72 65 6e 61 6d 65 64 0a | 74 68 72 6f 75 67 68 6f |renamed.|througho|
|000007e0| 75 74 20 69 74 73 20 73 | 63 6f 70 65 20 74 6f 20 |ut its s|cope to |
|000007f0| 61 76 6f 69 64 20 63 6f | 6e 66 6c 69 63 74 73 20 |avoid co|nflicts |
|00000800| 77 69 74 68 20 6f 74 68 | 65 72 20 69 64 65 6e 74 |with oth|er ident|
|00000810| 69 66 69 65 72 73 2e 0a | 0a 5c 69 74 65 6d 20 49 |ifiers..|.\item I|
|00000820| 66 20 61 20 6d 61 63 72 | 6f 20 74 72 61 6e 73 66 |f a macr|o transf|
|00000830| 6f 72 6d 65 72 20 69 6e | 73 65 72 74 73 20 61 20 |ormer in|serts a |
|00000840| 66 72 65 65 20 72 65 66 | 65 72 65 6e 63 65 20 74 |free ref|erence t|
|00000850| 6f 20 61 6e 0a 69 64 65 | 6e 74 69 66 69 65 72 2c |o an.ide|ntifier,|
|00000860| 20 74 68 65 20 72 65 66 | 65 72 65 6e 63 65 20 72 | the ref|erence r|
|00000870| 65 66 65 72 73 20 74 6f | 20 74 68 65 20 62 69 6e |efers to| the bin|
|00000880| 64 69 6e 67 20 74 68 61 | 74 20 77 61 73 20 76 69 |ding tha|t was vi|
|00000890| 73 69 62 6c 65 0a 77 68 | 65 72 65 20 74 68 65 20 |sible.wh|ere the |
|000008a0| 74 72 61 6e 73 66 6f 72 | 6d 65 72 20 77 61 73 20 |transfor|mer was |
|000008b0| 73 70 65 63 69 66 69 65 | 64 2c 20 72 65 67 61 72 |specifie|d, regar|
|000008c0| 64 6c 65 73 73 20 6f 66 | 20 61 6e 79 20 6c 6f 63 |dless of| any loc|
|000008d0| 61 6c 0a 62 69 6e 64 69 | 6e 67 73 20 74 68 61 74 |al.bindi|ngs that|
|000008e0| 20 6d 61 79 20 73 75 72 | 72 6f 75 6e 64 20 74 68 | may sur|round th|
|000008f0| 65 20 75 73 65 20 6f 66 | 20 74 68 65 20 6d 61 63 |e use of| the mac|
|00000900| 72 6f 2e 0a 0a 5c 65 6e | 64 7b 69 74 65 6d 69 7a |ro...\en|d{itemiz|
|00000910| 65 7d 0a 0a 25 54 68 65 | 20 6c 6f 77 2d 6c 65 76 |e}..%The| low-lev|
|00000920| 65 6c 20 66 61 63 69 6c | 69 74 79 20 70 65 72 6d |el facil|ity perm|
|00000930| 69 74 73 20 6e 6f 6e 2d | 68 79 67 69 65 6e 69 63 |its non-|hygienic|
|00000940| 20 6d 61 63 72 6f 73 20 | 74 6f 20 62 65 20 77 72 | macros |to be wr|
|00000950| 69 74 74 65 6e 2c 0a 25 | 61 6e 64 20 6d 61 79 20 |itten,.%|and may |
|00000960| 62 65 20 75 73 65 64 20 | 74 6f 20 69 6d 70 6c 65 |be used |to imple|
|00000970| 6d 65 6e 74 20 74 68 65 | 20 68 69 67 68 2d 6c 65 |ment the| high-le|
|00000980| 76 65 6c 20 70 61 74 74 | 65 72 6e 20 6c 61 6e 67 |vel patt|ern lang|
|00000990| 75 61 67 65 2e 0a 0a 54 | 68 69 73 20 61 70 70 65 |uage...T|his appe|
|000009a0| 6e 64 69 78 20 69 73 20 | 64 69 76 69 64 65 64 20 |ndix is |divided |
|000009b0| 69 6e 74 6f 20 74 68 72 | 65 65 20 6d 61 6a 6f 72 |into thr|ee major|
|000009c0| 20 73 65 63 74 69 6f 6e | 73 2e 20 20 54 68 65 20 | section|s. The |
|000009d0| 66 69 72 73 74 0a 73 65 | 63 74 69 6f 6e 20 64 65 |first.se|ction de|
|000009e0| 73 63 72 69 62 65 73 20 | 74 68 65 20 65 78 70 72 |scribes |the expr|
|000009f0| 65 73 73 69 6f 6e 73 20 | 61 6e 64 20 64 65 66 69 |essions |and defi|
|00000a00| 6e 69 74 69 6f 6e 73 20 | 75 73 65 64 20 74 6f 0a |nitions |used to.|
|00000a10| 69 6e 74 72 6f 64 75 63 | 65 20 6d 61 63 72 6f 73 |introduc|e macros|
|00000a20| 2c 20 69 2e 65 2e 7e 74 | 6f 20 62 69 6e 64 20 69 |, i.e.~t|o bind i|
|00000a30| 64 65 6e 74 69 66 69 65 | 72 73 20 74 6f 20 6d 61 |dentifie|rs to ma|
|00000a40| 63 72 6f 0a 74 72 61 6e | 73 66 6f 72 6d 65 72 73 |cro.tran|sformers|
|00000a50| 2e 0a 0a 54 68 65 20 73 | 65 63 6f 6e 64 20 73 65 |...The s|econd se|
|00000a60| 63 74 69 6f 6e 20 64 65 | 73 63 72 69 62 65 73 20 |ction de|scribes |
|00000a70| 74 68 65 20 70 61 74 74 | 65 72 6e 20 6c 61 6e 67 |the patt|ern lang|
|00000a80| 75 61 67 65 2e 20 20 54 | 68 69 73 20 70 61 74 74 |uage. T|his patt|
|00000a90| 65 72 6e 0a 6c 61 6e 67 | 75 61 67 65 20 69 73 20 |ern.lang|uage is |
|00000aa0| 73 75 66 66 69 63 69 65 | 6e 74 20 74 6f 20 73 70 |sufficie|nt to sp|
|00000ab0| 65 63 69 66 79 20 6d 6f | 73 74 20 6d 61 63 72 6f |ecify mo|st macro|
|00000ac0| 20 74 72 61 6e 73 66 6f | 72 6d 65 72 73 2c 20 69 | transfo|rmers, i|
|00000ad0| 6e 63 6c 75 64 69 6e 67 | 0a 74 68 6f 73 65 20 66 |ncluding|.those f|
|00000ae0| 6f 72 20 61 6c 6c 20 74 | 68 65 20 64 65 72 69 76 |or all t|he deriv|
|00000af0| 65 64 20 65 78 70 72 65 | 73 73 69 6f 6e 20 74 79 |ed expre|ssion ty|
|00000b00| 70 65 73 20 66 72 6f 6d | 0a 73 65 63 74 69 6f 6e |pes from|.section|
|00000b10| 7e 5c 72 65 66 7b 64 65 | 72 69 76 65 64 65 78 70 |~\ref{de|rivedexp|
|00000b20| 73 7d 2e 20 20 54 68 65 | 20 70 72 69 6d 61 72 79 |s}. The| primary|
|00000b30| 20 6c 69 6d 69 74 61 74 | 69 6f 6e 20 6f 66 20 74 | limitat|ion of t|
|00000b40| 68 65 20 70 61 74 74 65 | 72 6e 0a 6c 61 6e 67 75 |he patte|rn.langu|
|00000b50| 61 67 65 20 69 73 20 74 | 68 61 74 20 69 74 20 69 |age is t|hat it i|
|00000b60| 73 20 74 68 6f 72 6f 75 | 67 68 6c 79 20 68 79 67 |s thorou|ghly hyg|
|00000b70| 69 65 6e 69 63 2c 20 61 | 6e 64 20 74 68 75 73 20 |ienic, a|nd thus |
|00000b80| 63 61 6e 6e 6f 74 20 65 | 78 70 72 65 73 73 0a 6d |cannot e|xpress.m|
|00000b90| 61 63 72 6f 73 20 74 68 | 61 74 20 62 69 6e 64 20 |acros th|at bind |
|00000ba0| 69 64 65 6e 74 69 66 69 | 65 72 73 20 69 6d 70 6c |identifi|ers impl|
|00000bb0| 69 63 69 74 6c 79 2e 0a | 0a 54 68 65 20 74 68 69 |icitly..|.The thi|
|00000bc0| 72 64 20 73 65 63 74 69 | 6f 6e 20 64 65 73 63 72 |rd secti|on descr|
|00000bd0| 69 62 65 73 20 61 20 6c | 6f 77 2d 6c 65 76 65 6c |ibes a l|ow-level|
|00000be0| 20 6d 61 63 72 6f 20 66 | 61 63 69 6c 69 74 79 20 | macro f|acility |
|00000bf0| 74 68 61 74 20 63 6f 75 | 6c 64 20 62 65 0a 75 73 |that cou|ld be.us|
|00000c00| 65 64 20 74 6f 20 69 6d | 70 6c 65 6d 65 6e 74 20 |ed to im|plement |
|00000c10| 74 68 65 20 70 61 74 74 | 65 72 6e 20 6c 61 6e 67 |the patt|ern lang|
|00000c20| 75 61 67 65 20 64 65 73 | 63 72 69 62 65 64 20 69 |uage des|cribed i|
|00000c30| 6e 20 74 68 65 20 73 65 | 63 6f 6e 64 0a 73 65 63 |n the se|cond.sec|
|00000c40| 74 69 6f 6e 2e 20 20 54 | 68 69 73 20 6c 6f 77 2d |tion. T|his low-|
|00000c50| 6c 65 76 65 6c 20 66 61 | 63 69 6c 69 74 79 20 69 |level fa|cility i|
|00000c60| 73 20 61 6c 73 6f 20 63 | 61 70 61 62 6c 65 20 6f |s also c|apable o|
|00000c70| 66 20 65 78 70 72 65 73 | 73 69 6e 67 0a 6e 6f 6e |f expres|sing.non|
|00000c80| 2d 68 79 67 69 65 6e 69 | 63 20 6d 61 63 72 6f 73 |-hygieni|c macros|
|00000c90| 20 61 6e 64 20 6f 74 68 | 65 72 20 6d 61 63 72 6f | and oth|er macro|
|00000ca0| 73 20 77 68 6f 73 65 20 | 74 72 61 6e 73 66 6f 72 |s whose |transfor|
|00000cb0| 6d 65 72 73 20 63 61 6e | 6e 6f 74 20 62 65 0a 64 |mers can|not be.d|
|00000cc0| 65 73 63 72 69 62 65 64 | 20 62 79 20 74 68 65 20 |escribed| by the |
|00000cd0| 70 61 74 74 65 72 6e 20 | 6c 61 6e 67 75 61 67 65 |pattern |language|
|00000ce0| 2c 20 61 6e 64 20 69 73 | 20 69 6d 70 6f 72 74 61 |, and is| importa|
|00000cf0| 6e 74 20 61 73 20 61 6e | 20 65 78 61 6d 70 6c 65 |nt as an| example|
|00000d00| 20 6f 66 20 61 0a 6d 6f | 72 65 20 70 6f 77 65 72 | of a.mo|re power|
|00000d10| 66 75 6c 20 66 61 63 69 | 6c 69 74 79 20 74 68 61 |ful faci|lity tha|
|00000d20| 74 20 63 61 6e 20 63 6f | 2d 65 78 69 73 74 20 77 |t can co|-exist w|
|00000d30| 69 74 68 20 74 68 65 20 | 68 69 67 68 2d 6c 65 76 |ith the |high-lev|
|00000d40| 65 6c 20 70 61 74 74 65 | 72 6e 0a 6c 61 6e 67 75 |el patte|rn.langu|
|00000d50| 61 67 65 2e 0a 0a 54 68 | 65 20 70 61 72 74 69 63 |age...Th|e partic|
|00000d60| 75 6c 61 72 20 6c 6f 77 | 2d 6c 65 76 65 6c 20 66 |ular low|-level f|
|00000d70| 61 63 69 6c 69 74 79 20 | 64 65 73 63 72 69 62 65 |acility |describe|
|00000d80| 64 20 69 6e 20 74 68 65 | 20 74 68 69 72 64 0a 73 |d in the| third.s|
|00000d90| 65 63 74 69 6f 6e 20 69 | 73 20 62 75 74 20 6f 6e |ection i|s but on|
|00000da0| 65 20 6f 66 20 73 65 76 | 65 72 61 6c 20 6c 6f 77 |e of sev|eral low|
|00000db0| 2d 6c 65 76 65 6c 20 66 | 61 63 69 6c 69 74 69 65 |-level f|acilitie|
|00000dc0| 73 20 74 68 61 74 20 68 | 61 76 65 20 62 65 65 6e |s that h|ave been|
|00000dd0| 0a 64 65 73 69 67 6e 65 | 64 20 61 6e 64 20 69 6d |.designe|d and im|
|00000de0| 70 6c 65 6d 65 6e 74 65 | 64 20 74 6f 20 63 6f 6d |plemente|d to com|
|00000df0| 70 6c 65 6d 65 6e 74 20 | 74 68 65 20 70 61 74 74 |plement |the patt|
|00000e00| 65 72 6e 20 6c 61 6e 67 | 75 61 67 65 20 64 65 73 |ern lang|uage des|
|00000e10| 63 72 69 62 65 64 0a 69 | 6e 20 74 68 65 20 73 65 |cribed.i|n the se|
|00000e20| 63 6f 6e 64 20 73 65 63 | 74 69 6f 6e 2e 20 20 54 |cond sec|tion. T|
|00000e30| 68 65 20 64 65 73 69 67 | 6e 20 6f 66 20 73 75 63 |he desig|n of suc|
|00000e40| 68 20 6c 6f 77 2d 6c 65 | 76 65 6c 20 6d 61 63 72 |h low-le|vel macr|
|00000e50| 6f 20 66 61 63 69 6c 69 | 74 69 65 73 0a 72 65 6d |o facili|ties.rem|
|00000e60| 61 69 6e 73 20 61 6e 20 | 61 63 74 69 76 65 20 61 |ains an |active a|
|00000e70| 72 65 61 20 6f 66 20 72 | 65 73 65 61 72 63 68 2c |rea of r|esearch,|
|00000e80| 20 61 6e 64 20 64 65 73 | 63 72 69 70 74 69 6f 6e | and des|cription|
|00000e90| 73 20 6f 66 20 61 6c 74 | 65 72 6e 61 74 69 76 65 |s of alt|ernative|
|00000ea0| 0a 6c 6f 77 2d 6c 65 76 | 65 6c 20 66 61 63 69 6c |.low-lev|el facil|
|00000eb0| 69 74 69 65 73 20 77 69 | 6c 6c 20 62 65 20 70 75 |ities wi|ll be pu|
|00000ec0| 62 6c 69 73 68 65 64 20 | 69 6e 20 73 75 62 73 65 |blished |in subse|
|00000ed0| 71 75 65 6e 74 20 64 6f | 63 75 6d 65 6e 74 73 2e |quent do|cuments.|
|00000ee0| 0a 0a 25 20 54 68 65 20 | 66 6f 75 72 74 68 20 73 |..% The |fourth s|
|00000ef0| 65 63 74 69 6f 6e 20 64 | 65 73 63 72 69 62 65 73 |ection d|escribes|
|00000f00| 20 73 6f 6d 65 20 66 65 | 61 74 75 72 65 73 20 74 | some fe|atures t|
|00000f10| 68 61 74 20 77 6f 75 6c | 64 20 6d 61 6b 65 20 74 |hat woul|d make t|
|00000f20| 68 65 0a 25 20 6c 6f 77 | 2d 6c 65 76 65 6c 20 6d |he.% low|-level m|
|00000f30| 61 63 72 6f 20 66 61 63 | 69 6c 69 74 79 20 65 61 |acro fac|ility ea|
|00000f40| 73 69 65 72 20 74 6f 20 | 75 73 65 20 64 69 72 65 |sier to |use dire|
|00000f50| 63 74 6c 79 2e 0a 0a 5c | 73 75 62 73 65 63 74 69 |ctly...\|subsecti|
|00000f60| 6f 6e 2a 7b 42 69 6e 64 | 69 6e 67 20 73 79 6e 74 |on*{Bind|ing synt|
|00000f70| 61 63 74 69 63 20 6b 65 | 79 77 6f 72 64 73 7d 0a |actic ke|ywords}.|
|00000f80| 5c 6c 61 62 65 6c 7b 62 | 69 6e 64 73 79 6e 74 61 |\label{b|indsynta|
|00000f90| 78 7d 0a 0a 7b 5c 63 66 | 20 44 65 66 69 6e 65 2d |x}..{\cf| Define-|
|00000fa0| 73 79 6e 74 61 78 7d 2c | 20 7b 5c 63 66 20 6c 65 |syntax},| {\cf le|
|00000fb0| 74 2d 73 79 6e 74 61 78 | 7d 2c 20 61 6e 64 20 7b |t-syntax|}, and {|
|00000fc0| 5c 63 66 20 6c 65 74 72 | 65 63 2d 73 79 6e 74 61 |\cf letr|ec-synta|
|00000fd0| 78 7d 20 61 72 65 0a 61 | 6e 61 6c 6f 67 6f 75 73 |x} are.a|nalogous|
|00000fe0| 20 74 6f 20 7b 5c 63 66 | 20 64 65 66 69 6e 65 7d | to {\cf| define}|
|00000ff0| 2c 20 7b 5c 63 66 20 6c | 65 74 7d 2c 20 61 6e 64 |, {\cf l|et}, and|
|00001000| 20 7b 5c 63 66 20 6c 65 | 74 72 65 63 7d 2c 20 62 | {\cf le|trec}, b|
|00001010| 75 74 20 74 68 65 79 20 | 62 69 6e 64 0a 73 79 6e |ut they |bind.syn|
|00001020| 74 61 63 74 69 63 20 6b | 65 79 77 6f 72 64 73 20 |tactic k|eywords |
|00001030| 74 6f 20 6d 61 63 72 6f | 20 74 72 61 6e 73 66 6f |to macro| transfo|
|00001040| 72 6d 65 72 73 20 69 6e | 73 74 65 61 64 20 6f 66 |rmers in|stead of|
|00001050| 20 62 69 6e 64 69 6e 67 | 20 76 61 72 69 61 62 6c | binding| variabl|
|00001060| 65 73 0a 74 6f 20 6c 6f | 63 61 74 69 6f 6e 73 20 |es.to lo|cations |
|00001070| 74 68 61 74 20 63 6f 6e | 74 61 69 6e 20 76 61 6c |that con|tain val|
|00001080| 75 65 73 2e 20 20 46 75 | 72 74 68 65 72 6d 6f 72 |ues. Fu|rthermor|
|00001090| 65 2c 20 74 68 65 72 65 | 20 69 73 20 6e 6f 20 7b |e, there| is no {|
|000010a0| 5c 63 66 0a 64 65 66 69 | 6e 65 2d 73 79 6e 74 61 |\cf.defi|ne-synta|
|000010b0| 78 7d 20 61 6e 61 6c 6f | 67 75 65 20 6f 66 20 74 |x} analo|gue of t|
|000010c0| 68 65 20 69 6e 74 65 72 | 6e 61 6c 20 64 65 66 69 |he inter|nal defi|
|000010d0| 6e 69 74 69 6f 6e 73 20 | 64 65 73 63 72 69 62 65 |nitions |describe|
|000010e0| 64 20 69 6e 0a 73 65 63 | 74 69 6f 6e 7e 5c 72 65 |d in.sec|tion~\re|
|000010f0| 66 7b 69 6e 74 65 72 6e | 61 6c 64 65 66 69 6e 65 |f{intern|aldefine|
|00001100| 73 7d 2e 0a 0a 5c 62 65 | 67 69 6e 7b 72 61 74 69 |s}...\be|gin{rati|
|00001110| 6f 6e 61 6c 65 7d 0a 41 | 73 20 64 69 73 63 75 73 |onale}.A|s discus|
|00001120| 73 65 64 20 62 65 6c 6f | 77 2c 20 74 68 65 20 73 |sed belo|w, the s|
|00001130| 79 6e 74 61 78 20 61 6e | 64 20 73 63 6f 70 65 20 |yntax an|d scope |
|00001140| 72 75 6c 65 73 20 66 6f | 72 20 64 65 66 69 6e 69 |rules fo|r defini|
|00001150| 74 69 6f 6e 73 0a 67 69 | 76 65 20 72 69 73 65 20 |tions.gi|ve rise |
|00001160| 74 6f 20 73 79 6e 74 61 | 63 74 69 63 20 61 6d 62 |to synta|ctic amb|
|00001170| 69 67 75 69 74 69 65 73 | 20 77 68 65 6e 20 73 79 |iguities| when sy|
|00001180| 6e 74 61 63 74 69 63 20 | 6b 65 79 77 6f 72 64 73 |ntactic |keywords|
|00001190| 20 61 72 65 0a 6e 6f 74 | 20 72 65 73 65 72 76 65 | are.not| reserve|
|000011a0| 64 2e 0a 46 75 72 74 68 | 65 72 20 61 6d 62 69 67 |d..Furth|er ambig|
|000011b0| 75 69 74 69 65 73 20 77 | 6f 75 6c 64 20 61 72 69 |uities w|ould ari|
|000011c0| 73 65 20 69 66 20 7b 5c | 63 66 20 64 65 66 69 6e |se if {\|cf defin|
|000011d0| 65 2d 73 79 6e 74 61 78 | 7d 0a 77 65 72 65 20 70 |e-syntax|}.were p|
|000011e0| 65 72 6d 69 74 74 65 64 | 20 61 74 20 74 68 65 20 |ermitted| at the |
|000011f0| 62 65 67 69 6e 6e 69 6e | 67 20 6f 66 20 61 20 5c |beginnin|g of a \|
|00001200| 6d 65 74 61 7b 62 6f 64 | 79 7d 2c 20 77 69 74 68 |meta{bod|y}, with|
|00001210| 20 73 63 6f 70 65 0a 72 | 75 6c 65 73 20 61 6e 61 | scope.r|ules ana|
|00001220| 6c 6f 67 6f 75 73 20 74 | 6f 20 74 68 6f 73 65 20 |logous t|o those |
|00001230| 66 6f 72 20 69 6e 74 65 | 72 6e 61 6c 20 64 65 66 |for inte|rnal def|
|00001240| 69 6e 69 74 69 6f 6e 73 | 2e 0a 5c 65 6e 64 7b 72 |initions|..\end{r|
|00001250| 61 74 69 6f 6e 61 6c 65 | 7d 0a 0a 54 68 65 73 65 |ationale|}..These|
|00001260| 20 6e 65 77 20 65 78 70 | 72 65 73 73 69 6f 6e 20 | new exp|ression |
|00001270| 74 79 70 65 73 20 61 6e | 64 20 74 68 65 20 70 61 |types an|d the pa|
|00001280| 74 74 65 72 6e 20 6c 61 | 6e 67 75 61 67 65 20 64 |ttern la|nguage d|
|00001290| 65 73 63 72 69 62 65 64 | 20 69 6e 0a 73 65 63 74 |escribed| in.sect|
|000012a0| 69 6f 6e 7e 5c 72 65 66 | 7b 70 61 74 74 65 72 6e |ion~\ref|{pattern|
|000012b0| 6c 61 6e 67 75 61 67 65 | 7d 20 61 72 65 20 61 64 |language|} are ad|
|000012c0| 64 65 64 20 74 6f 20 53 | 63 68 65 6d 65 20 62 79 |ded to S|cheme by|
|000012d0| 20 61 75 67 6d 65 6e 74 | 69 6e 67 20 74 68 65 0a | augment|ing the.|
|000012e0| 42 4e 46 20 69 6e 20 73 | 65 63 74 69 6f 6e 7e 5c |BNF in s|ection~\|
|000012f0| 72 65 66 7b 42 4e 46 7d | 20 77 69 74 68 20 74 68 |ref{BNF}| with th|
|00001300| 65 20 66 6f 6c 6c 6f 77 | 69 6e 67 20 6e 65 77 20 |e follow|ing new |
|00001310| 70 72 6f 64 75 63 74 69 | 6f 6e 73 2e 20 20 4e 6f |producti|ons. No|
|00001320| 74 65 0a 74 68 61 74 20 | 74 68 65 20 69 64 65 6e |te.that |the iden|
|00001330| 74 69 66 69 65 72 20 7b | 5c 63 66 20 2e 2e 2e 7d |tifier {|\cf ...}|
|00001340| 20 75 73 65 64 20 69 6e | 20 73 6f 6d 65 20 6f 66 | used in| some of|
|00001350| 20 74 68 65 73 65 20 70 | 72 6f 64 75 63 74 69 6f | these p|roductio|
|00001360| 6e 73 20 69 73 20 6e 6f | 74 0a 61 20 6d 65 74 61 |ns is no|t.a meta|
|00001370| 73 79 6d 62 6f 6c 2e 0a | 0a 5c 62 65 67 69 6e 7b |symbol..|.\begin{|
|00001380| 67 72 61 6d 6d 61 72 7d | 25 0a 5c 6d 65 74 61 7b |grammar}|%.\meta{|
|00001390| 65 78 70 72 65 73 73 69 | 6f 6e 7d 20 5c 3a 20 5c |expressi|on} \: \|
|000013a0| 6d 65 74 61 7b 6d 61 63 | 72 6f 20 75 73 65 7d 0a |meta{mac|ro use}.|
|000013b0| 5c 3e 20 20 5c 7c 20 5c | 6d 65 74 61 7b 6d 61 63 |\> \| \|meta{mac|
|000013c0| 72 6f 20 62 6c 6f 63 6b | 7d 0a 0a 5c 6d 65 74 61 |ro block|}..\meta|
|000013d0| 7b 6d 61 63 72 6f 20 75 | 73 65 7d 20 5c 3a 20 28 |{macro u|se} \: (|
|000013e0| 5c 6d 65 74 61 7b 6b 65 | 79 77 6f 72 64 7d 20 5c |\meta{ke|yword} \|
|000013f0| 61 72 62 6e 6f 7b 5c 6d | 65 74 61 7b 64 61 74 75 |arbno{\m|eta{datu|
|00001400| 6d 7d 7d 29 0a 5c 6d 65 | 74 61 7b 6b 65 79 77 6f |m}}).\me|ta{keywo|
|00001410| 72 64 7d 20 5c 3a 20 5c | 6d 65 74 61 7b 69 64 65 |rd} \: \|meta{ide|
|00001420| 6e 74 69 66 69 65 72 7d | 0a 0a 5c 6d 65 74 61 7b |ntifier}|..\meta{|
|00001430| 6d 61 63 72 6f 20 62 6c | 6f 63 6b 7d 20 5c 3a 0a |macro bl|ock} \:.|
|00001440| 5c 3e 20 20 5c 3e 20 28 | 6c 65 74 2d 73 79 6e 74 |\> \> (|let-synt|
|00001450| 61 78 20 28 5c 61 72 62 | 6e 6f 7b 5c 6d 65 74 61 |ax (\arb|no{\meta|
|00001460| 7b 73 79 6e 74 61 78 20 | 73 70 65 63 7d 7d 29 20 |{syntax |spec}}) |
|00001470| 5c 6d 65 74 61 7b 62 6f | 64 79 7d 29 0a 5c 3e 20 |\meta{bo|dy}).\> |
|00001480| 20 5c 7c 20 28 6c 65 74 | 72 65 63 2d 73 79 6e 74 | \| (let|rec-synt|
|00001490| 61 78 20 28 5c 61 72 62 | 6e 6f 7b 5c 6d 65 74 61 |ax (\arb|no{\meta|
|000014a0| 7b 73 79 6e 74 61 78 20 | 73 70 65 63 7d 7d 29 20 |{syntax |spec}}) |
|000014b0| 5c 6d 65 74 61 7b 62 6f | 64 79 7d 29 0a 5c 6d 65 |\meta{bo|dy}).\me|
|000014c0| 74 61 7b 73 79 6e 74 61 | 78 20 73 70 65 63 7d 20 |ta{synta|x spec} |
|000014d0| 5c 3a 20 28 5c 6d 65 74 | 61 7b 6b 65 79 77 6f 72 |\: (\met|a{keywor|
|000014e0| 64 7d 20 5c 6d 65 74 61 | 7b 74 72 61 6e 73 66 6f |d} \meta|{transfo|
|000014f0| 72 6d 65 72 20 73 70 65 | 63 7d 29 0a 5c 6d 65 74 |rmer spe|c}).\met|
|00001500| 61 7b 74 72 61 6e 73 66 | 6f 72 6d 65 72 20 73 70 |a{transf|ormer sp|
|00001510| 65 63 7d 20 5c 3a 0a 5c | 3e 20 20 5c 3e 20 28 73 |ec} \:.\|> \> (s|
|00001520| 79 6e 74 61 78 2d 72 75 | 6c 65 73 20 28 5c 61 72 |yntax-ru|les (\ar|
|00001530| 62 6e 6f 7b 5c 6d 65 74 | 61 7b 69 64 65 6e 74 69 |bno{\met|a{identi|
|00001540| 66 69 65 72 7d 7d 29 20 | 5c 61 72 62 6e 6f 7b 5c |fier}}) |\arbno{\|
|00001550| 6d 65 74 61 7b 73 79 6e | 74 61 78 20 72 75 6c 65 |meta{syn|tax rule|
|00001560| 7d 7d 29 0a 5c 6d 65 74 | 61 7b 73 79 6e 74 61 78 |}}).\met|a{syntax|
|00001570| 20 72 75 6c 65 7d 20 5c | 3a 20 28 5c 6d 65 74 61 | rule} \|: (\meta|
|00001580| 7b 70 61 74 74 65 72 6e | 7d 20 5c 6d 65 74 61 7b |{pattern|} \meta{|
|00001590| 74 65 6d 70 6c 61 74 65 | 7d 29 0a 5c 6d 65 74 61 |template|}).\meta|
|000015a0| 7b 70 61 74 74 65 72 6e | 7d 20 5c 3a 20 5c 6d 65 |{pattern|} \: \me|
|000015b0| 74 61 7b 70 61 74 74 65 | 72 6e 20 69 64 65 6e 74 |ta{patte|rn ident|
|000015c0| 69 66 69 65 72 7d 0a 5c | 3e 20 20 5c 7c 20 28 5c |ifier}.\|> \| (\|
|000015d0| 61 72 62 6e 6f 7b 5c 6d | 65 74 61 7b 70 61 74 74 |arbno{\m|eta{patt|
|000015e0| 65 72 6e 7d 7d 29 0a 5c | 3e 20 20 5c 7c 20 28 5c |ern}}).\|> \| (\|
|000015f0| 61 74 6c 65 61 73 74 6f | 6e 65 7b 5c 6d 65 74 61 |atleasto|ne{\meta|
|00001600| 7b 70 61 74 74 65 72 6e | 7d 7d 20 2e 20 5c 6d 65 |{pattern|}} . \me|
|00001610| 74 61 7b 70 61 74 74 65 | 72 6e 7d 29 0a 5c 3e 20 |ta{patte|rn}).\> |
|00001620| 20 5c 7c 20 28 5c 61 72 | 62 6e 6f 7b 5c 6d 65 74 | \| (\ar|bno{\met|
|00001630| 61 7b 70 61 74 74 65 72 | 6e 7d 7d 20 5c 6d 65 74 |a{patter|n}} \met|
|00001640| 61 7b 70 61 74 74 65 72 | 6e 7d 20 5c 6d 65 74 61 |a{patter|n} \meta|
|00001650| 7b 65 6c 6c 69 70 73 69 | 73 7d 29 0a 5c 3e 20 20 |{ellipsi|s}).\> |
|00001660| 5c 7c 20 5c 6d 65 74 61 | 7b 70 61 74 74 65 72 6e |\| \meta|{pattern|
|00001670| 20 64 61 74 75 6d 7d 0a | 5c 6d 65 74 61 7b 70 61 | datum}.|\meta{pa|
|00001680| 74 74 65 72 6e 20 64 61 | 74 75 6d 7d 20 5c 3a 20 |ttern da|tum} \: |
|00001690| 5c 6d 65 74 61 7b 76 65 | 63 74 6f 72 7d 0a 5c 3e |\meta{ve|ctor}.\>|
|000016a0| 20 20 5c 7c 20 5c 6d 65 | 74 61 7b 73 74 72 69 6e | \| \me|ta{strin|
|000016b0| 67 7d 0a 5c 3e 20 20 5c | 7c 20 5c 6d 65 74 61 7b |g}.\> \|| \meta{|
|000016c0| 63 68 61 72 61 63 74 65 | 72 7d 0a 5c 3e 20 20 5c |characte|r}.\> \|
|000016d0| 7c 20 5c 6d 65 74 61 7b | 62 6f 6f 6c 65 61 6e 7d || \meta{|boolean}|
|000016e0| 0a 5c 3e 20 20 5c 7c 20 | 5c 6d 65 74 61 7b 6e 75 |.\> \| |\meta{nu|
|000016f0| 6d 62 65 72 7d 0a 5c 6d | 65 74 61 7b 74 65 6d 70 |mber}.\m|eta{temp|
|00001700| 6c 61 74 65 7d 20 5c 3a | 20 5c 6d 65 74 61 7b 70 |late} \:| \meta{p|
|00001710| 61 74 74 65 72 6e 20 69 | 64 65 6e 74 69 66 69 65 |attern i|dentifie|
|00001720| 72 7d 0a 5c 3e 20 20 5c | 7c 20 28 5c 61 72 62 6e |r}.\> \|| (\arbn|
|00001730| 6f 7b 5c 6d 65 74 61 7b | 74 65 6d 70 6c 61 74 65 |o{\meta{|template|
|00001740| 20 65 6c 65 6d 65 6e 74 | 7d 7d 29 0a 5c 3e 20 20 | element|}}).\> |
|00001750| 5c 7c 20 28 5c 61 74 6c | 65 61 73 74 6f 6e 65 7b |\| (\atl|eastone{|
|00001760| 5c 6d 65 74 61 7b 74 65 | 6d 70 6c 61 74 65 20 65 |\meta{te|mplate e|
|00001770| 6c 65 6d 65 6e 74 7d 7d | 20 2e 20 5c 6d 65 74 61 |lement}}| . \meta|
|00001780| 7b 74 65 6d 70 6c 61 74 | 65 7d 29 0a 5c 3e 20 20 |{templat|e}).\> |
|00001790| 5c 7c 20 5c 6d 65 74 61 | 7b 74 65 6d 70 6c 61 74 |\| \meta|{templat|
|000017a0| 65 20 64 61 74 75 6d 7d | 0a 5c 6d 65 74 61 7b 74 |e datum}|.\meta{t|
|000017b0| 65 6d 70 6c 61 74 65 20 | 65 6c 65 6d 65 6e 74 7d |emplate |element}|
|000017c0| 20 5c 3a 20 5c 6d 65 74 | 61 7b 74 65 6d 70 6c 61 | \: \met|a{templa|
|000017d0| 74 65 7d 0a 5c 3e 20 20 | 5c 7c 20 5c 6d 65 74 61 |te}.\> |\| \meta|
|000017e0| 7b 74 65 6d 70 6c 61 74 | 65 7d 20 5c 6d 65 74 61 |{templat|e} \meta|
|000017f0| 7b 65 6c 6c 69 70 73 69 | 73 7d 0a 5c 6d 65 74 61 |{ellipsi|s}.\meta|
|00001800| 7b 74 65 6d 70 6c 61 74 | 65 20 64 61 74 75 6d 7d |{templat|e datum}|
|00001810| 20 5c 3a 20 5c 6d 65 74 | 61 7b 70 61 74 74 65 72 | \: \met|a{patter|
|00001820| 6e 20 64 61 74 75 6d 7d | 0a 5c 6d 65 74 61 7b 70 |n datum}|.\meta{p|
|00001830| 61 74 74 65 72 6e 20 69 | 64 65 6e 74 69 66 69 65 |attern i|dentifie|
|00001840| 72 7d 20 5c 3a 20 5c 6d | 65 74 61 7b 61 6e 79 20 |r} \: \m|eta{any |
|00001850| 69 64 65 6e 74 69 66 69 | 65 72 20 65 78 63 65 70 |identifi|er excep|
|00001860| 74 20 7b 5c 63 66 20 2e | 2e 2e 7d 7d 0a 5c 6d 65 |t {\cf .|..}}.\me|
|00001870| 74 61 7b 65 6c 6c 69 70 | 73 69 73 7d 20 5c 3a 20 |ta{ellip|sis} \: |
|00001880| 5c 6d 65 74 61 7b 74 68 | 65 20 69 64 65 6e 74 69 |\meta{th|e identi|
|00001890| 66 69 65 72 20 7b 5c 63 | 66 20 2e 2e 2e 7d 7d 0a |fier {\c|f ...}}.|
|000018a0| 0a 5c 6d 65 74 61 7b 63 | 6f 6d 6d 61 6e 64 20 6f |.\meta{c|ommand o|
|000018b0| 72 20 64 65 66 69 6e 69 | 74 69 6f 6e 7d 20 5c 3a |r defini|tion} \:|
|000018c0| 20 5c 6d 65 74 61 7b 73 | 79 6e 74 61 78 20 64 65 | \meta{s|yntax de|
|000018d0| 66 69 6e 69 74 69 6f 6e | 7d 0a 5c 6d 65 74 61 7b |finition|}.\meta{|
|000018e0| 73 79 6e 74 61 78 20 64 | 65 66 69 6e 69 74 69 6f |syntax d|efinitio|
|000018f0| 6e 7d 20 5c 3a 0a 5c 3e | 20 20 5c 3e 20 28 64 65 |n} \:.\>| \> (de|
|00001900| 66 69 6e 65 2d 73 79 6e | 74 61 78 20 5c 6d 65 74 |fine-syn|tax \met|
|00001910| 61 7b 6b 65 79 77 6f 72 | 64 7d 20 5c 6d 65 74 61 |a{keywor|d} \meta|
|00001920| 7b 74 72 61 6e 73 66 6f | 72 6d 65 72 20 73 70 65 |{transfo|rmer spe|
|00001930| 63 7d 29 0a 5c 3e 20 20 | 5c 7c 20 28 62 65 67 69 |c}).\> |\| (begi|
|00001940| 6e 20 5c 61 72 62 6e 6f | 7b 5c 6d 65 74 61 7b 73 |n \arbno|{\meta{s|
|00001950| 79 6e 74 61 78 20 64 65 | 66 69 6e 69 74 69 6f 6e |yntax de|finition|
|00001960| 7d 7d 29 25 0a 5c 65 6e | 64 7b 67 72 61 6d 6d 61 |}})%.\en|d{gramma|
|00001970| 72 7d 0a 0a 25 20 49 74 | 20 69 73 20 61 6e 20 65 |r}..% It| is an e|
|00001980| 72 72 6f 72 20 66 6f 72 | 20 61 20 70 72 6f 67 72 |rror for| a progr|
|00001990| 61 6d 20 74 6f 20 63 6f | 6e 74 61 69 6e 20 6d 6f |am to co|ntain mo|
|000019a0| 72 65 20 74 68 61 6e 20 | 6f 6e 65 20 74 6f 70 2d |re than |one top-|
|000019b0| 6c 65 76 65 6c 0a 25 20 | 5c 6d 65 74 61 7b 64 65 |level.% |\meta{de|
|000019c0| 66 69 6e 69 74 69 6f 6e | 7d 20 6f 72 20 5c 6d 65 |finition|} or \me|
|000019d0| 74 61 7b 73 79 6e 74 61 | 78 20 64 65 66 69 6e 69 |ta{synta|x defini|
|000019e0| 74 69 6f 6e 7d 20 6f 66 | 20 61 6e 79 20 69 64 65 |tion} of| any ide|
|000019f0| 6e 74 69 66 69 65 72 2e | 0a 25 0a 25 20 5b 49 20 |ntifier.|.%.% [I |
|00001a00| 66 6c 75 73 68 65 64 20 | 74 68 69 73 20 62 65 63 |flushed |this bec|
|00001a10| 61 75 73 65 20 69 74 20 | 69 73 6e 27 74 20 61 6e |ause it |isn't an|
|00001a20| 20 65 72 72 6f 72 20 66 | 6f 72 20 61 20 70 72 6f | error f|or a pro|
|00001a30| 67 72 61 6d 20 74 6f 0a | 25 20 63 6f 6e 74 61 69 |gram to.|% contai|
|00001a40| 6e 20 6d 6f 72 65 20 74 | 68 61 6e 20 6f 6e 65 20 |n more t|han one |
|00001a50| 74 6f 70 2d 6c 65 76 65 | 6c 20 64 65 66 69 6e 69 |top-leve|l defini|
|00001a60| 74 69 6f 6e 20 6f 66 20 | 61 6e 20 69 64 65 6e 74 |tion of |an ident|
|00001a70| 69 66 69 65 72 2c 0a 25 | 20 61 6e 64 20 49 20 64 |ifier,.%| and I d|
|00001a80| 69 64 6e 27 74 20 77 61 | 6e 74 20 74 6f 20 69 6e |idn't wa|nt to in|
|00001a90| 74 72 6f 64 75 63 65 20 | 61 6e 79 20 67 72 61 74 |troduce |any grat|
|00001aa0| 75 69 74 6f 75 73 20 69 | 6e 63 6f 6d 70 61 74 69 |uitous i|ncompati|
|00001ab0| 62 69 6c 69 74 69 65 73 | 0a 25 20 77 69 74 68 20 |bilities|.% with |
|00001ac0| 74 68 65 20 65 78 69 73 | 74 69 6e 67 20 53 63 68 |the exis|ting Sch|
|00001ad0| 65 6d 65 20 6c 61 6e 67 | 75 61 67 65 2e 20 2d 2d |eme lang|uage. --|
|00001ae0| 20 57 69 6c 6c 5d 0a 0a | 41 6c 74 68 6f 75 67 68 | Will]..|Although|
|00001af0| 20 6d 61 63 72 6f 73 20 | 6d 61 79 20 65 78 70 61 | macros |may expa|
|00001b00| 6e 64 20 69 6e 74 6f 20 | 64 65 66 69 6e 69 74 69 |nd into |definiti|
|00001b10| 6f 6e 73 20 69 6e 20 61 | 6e 79 20 63 6f 6e 74 65 |ons in a|ny conte|
|00001b20| 78 74 20 74 68 61 74 20 | 70 65 72 6d 69 74 73 0a |xt that |permits.|
|00001b30| 64 65 66 69 6e 69 74 69 | 6f 6e 73 2c 20 69 74 20 |definiti|ons, it |
|00001b40| 69 73 20 61 6e 20 65 72 | 72 6f 72 20 66 6f 72 20 |is an er|ror for |
|00001b50| 61 20 64 65 66 69 6e 69 | 74 69 6f 6e 20 74 6f 20 |a defini|tion to |
|00001b60| 73 68 61 64 6f 77 20 61 | 20 73 79 6e 74 61 63 74 |shadow a| syntact|
|00001b70| 69 63 0a 6b 65 79 77 6f | 72 64 20 77 68 6f 73 65 |ic.keywo|rd whose|
|00001b80| 20 6d 65 61 6e 69 6e 67 | 20 69 73 20 6e 65 65 64 | meaning| is need|
|00001b90| 65 64 20 74 6f 20 64 65 | 74 65 72 6d 69 6e 65 20 |ed to de|termine |
|00001ba0| 77 68 65 74 68 65 72 20 | 73 6f 6d 65 20 64 65 66 |whether |some def|
|00001bb0| 69 6e 69 74 69 6f 6e 20 | 69 6e 0a 74 68 65 20 67 |inition |in.the g|
|00001bc0| 72 6f 75 70 20 6f 66 20 | 74 6f 70 2d 6c 65 76 65 |roup of |top-leve|
|00001bd0| 6c 20 6f 72 20 69 6e 74 | 65 72 6e 61 6c 20 64 65 |l or int|ernal de|
|00001be0| 66 69 6e 69 74 69 6f 6e | 73 20 74 68 61 74 20 63 |finition|s that c|
|00001bf0| 6f 6e 74 61 69 6e 73 20 | 74 68 65 0a 73 68 61 64 |ontains |the.shad|
|00001c00| 6f 77 69 6e 67 20 64 65 | 66 69 6e 69 74 69 6f 6e |owing de|finition|
|00001c10| 20 69 73 20 69 6e 20 66 | 61 63 74 20 61 20 64 65 | is in f|act a de|
|00001c20| 66 69 6e 69 74 69 6f 6e | 2c 20 6f 72 20 69 73 20 |finition|, or is |
|00001c30| 6e 65 65 64 65 64 20 74 | 6f 20 64 65 74 65 72 6d |needed t|o determ|
|00001c40| 69 6e 65 0a 74 68 65 20 | 62 6f 75 6e 64 61 72 79 |ine.the |boundary|
|00001c50| 20 62 65 74 77 65 65 6e | 20 74 68 65 20 67 72 6f | between| the gro|
|00001c60| 75 70 20 61 6e 64 20 74 | 68 65 20 65 78 70 72 65 |up and t|he expre|
|00001c70| 73 73 69 6f 6e 73 20 74 | 68 61 74 20 66 6f 6c 6c |ssions t|hat foll|
|00001c80| 6f 77 20 74 68 65 0a 67 | 72 6f 75 70 2e 20 20 46 |ow the.g|roup. F|
|00001c90| 6f 72 20 65 78 61 6d 70 | 6c 65 2c 20 74 68 65 20 |or examp|le, the |
|00001ca0| 66 6f 6c 6c 6f 77 69 6e | 67 20 61 72 65 20 65 72 |followin|g are er|
|00001cb0| 72 6f 72 73 3a 0a 0a 5c | 62 65 67 69 6e 7b 73 63 |rors:..\|begin{sc|
|00001cc0| 68 65 6d 65 7d 0a 28 64 | 65 66 69 6e 65 20 64 65 |heme}.(d|efine de|
|00001cd0| 66 69 6e 65 20 33 29 0a | 0a 28 62 65 67 69 6e 20 |fine 3).|.(begin |
|00001ce0| 28 64 65 66 69 6e 65 20 | 62 65 67 69 6e 20 6c 69 |(define |begin li|
|00001cf0| 73 74 29 29 0a 0a 28 6c | 65 74 2d 73 79 6e 74 61 |st))..(l|et-synta|
|00001d00| 78 0a 20 20 28 28 66 6f | 6f 20 28 73 79 6e 74 61 |x. ((fo|o (synta|
|00001d10| 78 2d 72 75 6c 65 73 20 | 28 29 0a 20 20 20 20 20 |x-rules |(). |
|00001d20| 20 20 20 20 20 28 28 66 | 6f 6f 20 28 70 72 6f 63 | ((f|oo (proc|
|00001d30| 20 61 72 67 73 20 2e 2e | 2e 29 20 62 6f 64 79 20 | args ..|.) body |
|00001d40| 2e 2e 2e 29 0a 20 20 20 | 20 20 20 20 20 20 20 20 |...). | |
|00001d50| 28 64 65 66 69 6e 65 20 | 70 72 6f 63 0a 20 20 20 |(define |proc. |
|00001d60| 20 20 20 20 20 20 20 20 | 20 20 28 6c 61 6d 62 64 | | (lambd|
|00001d70| 61 20 28 61 72 67 73 20 | 2e 2e 2e 29 0a 20 20 20 |a (args |...). |
|00001d80| 20 20 20 20 20 20 20 20 | 20 20 20 20 62 6f 64 79 | | body|
|00001d90| 20 2e 2e 2e 29 29 29 29 | 29 29 0a 20 20 28 6c 65 | ...))))|)). (le|
|00001da0| 74 20 28 28 78 20 33 29 | 29 0a 20 20 20 20 28 66 |t ((x 3)|). (f|
|00001db0| 6f 6f 20 28 70 6c 75 73 | 20 78 20 79 29 20 28 2b |oo (plus| x y) (+|
|00001dc0| 20 78 20 79 29 29 0a 20 | 20 20 20 28 64 65 66 69 | x y)). | (defi|
|00001dd0| 6e 65 20 66 6f 6f 20 78 | 29 0a 20 20 20 20 28 70 |ne foo x|). (p|
|00001de0| 6c 75 73 20 66 6f 6f 20 | 78 29 29 29 0a 5c 65 6e |lus foo |x))).\en|
|00001df0| 64 7b 73 63 68 65 6d 65 | 7d 0a 0a 0a 5c 62 65 67 |d{scheme|}...\beg|
|00001e00| 69 6e 7b 65 6e 74 72 79 | 7d 7b 25 0a 5c 70 72 6f |in{entry|}{%.\pro|
|00001e10| 74 6f 7b 6c 65 74 2d 73 | 79 6e 74 61 78 7d 7b 20 |to{let-s|yntax}{ |
|00001e20| 5c 68 79 70 65 72 7b 62 | 69 6e 64 69 6e 67 73 7d |\hyper{b|indings}|
|00001e30| 20 5c 68 79 70 65 72 7b | 62 6f 64 79 7d 7d 7b 5c | \hyper{|body}}{\|
|00001e40| 65 78 70 72 74 79 70 65 | 7d 7d 0a 0a 5c 73 79 6e |exprtype|}}..\syn|
|00001e50| 74 61 78 0a 5c 68 79 70 | 65 72 7b 42 69 6e 64 69 |tax.\hyp|er{Bindi|
|00001e60| 6e 67 73 7d 20 73 68 6f | 75 6c 64 20 68 61 76 65 |ngs} sho|uld have|
|00001e70| 20 74 68 65 20 66 6f 72 | 6d 0a 5c 62 65 67 69 6e | the for|m.\begin|
|00001e80| 7b 73 63 68 65 6d 65 7d | 0a 28 28 5c 68 79 70 65 |{scheme}|.((\hype|
|00001e90| 72 7b 6b 65 79 77 6f 72 | 64 7d 20 5c 68 79 70 65 |r{keywor|d} \hype|
|00001ea0| 72 7b 74 72 61 6e 73 66 | 6f 72 6d 65 72 20 73 70 |r{transf|ormer sp|
|00001eb0| 65 63 7d 29 20 5c 64 6f | 74 73 66 6f 6f 29 25 0a |ec}) \do|tsfoo)%.|
|00001ec0| 5c 65 6e 64 7b 73 63 68 | 65 6d 65 7d 0a 25 77 68 |\end{sch|eme}.%wh|
|00001ed0| 65 72 65 20 65 61 63 68 | 20 5c 68 79 70 65 72 7b |ere each| \hyper{|
|00001ee0| 6b 65 79 77 6f 72 64 7d | 20 69 73 20 61 6e 20 69 |keyword}| is an i|
|00001ef0| 64 65 6e 74 69 66 69 65 | 72 2c 0a 25 65 61 63 68 |dentifie|r,.%each|
|00001f00| 20 5c 68 79 70 65 72 7b | 74 72 61 6e 73 66 6f 72 | \hyper{|transfor|
|00001f10| 6d 65 72 20 73 70 65 63 | 7d 20 69 73 20 61 6e 20 |mer spec|} is an |
|00001f20| 69 6e 73 74 61 6e 63 65 | 20 6f 66 20 7b 5c 63 66 |instance| of {\cf|
|00001f30| 20 73 79 6e 74 61 78 2d | 72 75 6c 65 73 7d 2c 20 | syntax-|rules}, |
|00001f40| 61 6e 64 0a 45 61 63 68 | 20 5c 68 79 70 65 72 7b |and.Each| \hyper{|
|00001f50| 6b 65 79 77 6f 72 64 7d | 20 69 73 20 61 6e 20 69 |keyword}| is an i|
|00001f60| 64 65 6e 74 69 66 69 65 | 72 2c 0a 65 61 63 68 20 |dentifie|r,.each |
|00001f70| 5c 68 79 70 65 72 7b 74 | 72 61 6e 73 66 6f 72 6d |\hyper{t|ransform|
|00001f80| 65 72 20 73 70 65 63 7d | 20 69 73 20 61 6e 20 69 |er spec}| is an i|
|00001f90| 6e 73 74 61 6e 63 65 20 | 6f 66 20 7b 5c 63 66 20 |nstance |of {\cf |
|00001fa0| 73 79 6e 74 61 78 2d 72 | 75 6c 65 73 7d 2c 20 61 |syntax-r|ules}, a|
|00001fb0| 6e 64 0a 5c 68 79 70 65 | 72 7b 62 6f 64 79 7d 20 |nd.\hype|r{body} |
|00001fc0| 73 68 6f 75 6c 64 20 62 | 65 20 61 20 73 65 71 75 |should b|e a sequ|
|00001fd0| 65 6e 63 65 20 6f 66 20 | 6f 6e 65 20 6f 72 20 6d |ence of |one or m|
|00001fe0| 6f 72 65 20 65 78 70 72 | 65 73 73 69 6f 6e 73 2e |ore expr|essions.|
|00001ff0| 20 20 49 74 20 69 73 20 | 61 6e 20 65 72 72 6f 72 | It is |an error|
|00002000| 0a 66 6f 72 20 61 20 5c | 68 79 70 65 72 7b 6b 65 |.for a \|hyper{ke|
|00002010| 79 77 6f 72 64 7d 20 74 | 6f 20 61 70 70 65 61 72 |yword} t|o appear|
|00002020| 20 6d 6f 72 65 20 74 68 | 61 6e 20 6f 6e 63 65 20 | more th|an once |
|00002030| 69 6e 20 74 68 65 20 6c | 69 73 74 20 6f 66 20 6b |in the l|ist of k|
|00002040| 65 79 77 6f 72 64 73 0a | 62 65 69 6e 67 20 62 6f |eywords.|being bo|
|00002050| 75 6e 64 2e 0a 0a 5c 73 | 65 6d 61 6e 74 69 63 73 |und...\s|emantics|
|00002060| 0a 54 68 65 20 5c 68 79 | 70 65 72 7b 62 6f 64 79 |.The \hy|per{body|
|00002070| 7d 20 69 73 20 65 78 70 | 61 6e 64 65 64 20 69 6e |} is exp|anded in|
|00002080| 20 74 68 65 20 73 79 6e | 74 61 63 74 69 63 20 65 | the syn|tactic e|
|00002090| 6e 76 69 72 6f 6e 6d 65 | 6e 74 0a 6f 62 74 61 69 |nvironme|nt.obtai|
|000020a0| 6e 65 64 20 62 79 20 65 | 78 74 65 6e 64 69 6e 67 |ned by e|xtending|
|000020b0| 20 74 68 65 20 73 79 6e | 74 61 63 74 69 63 20 65 | the syn|tactic e|
|000020c0| 6e 76 69 72 6f 6e 6d 65 | 6e 74 20 6f 66 20 74 68 |nvironme|nt of th|
|000020d0| 65 0a 7b 5c 63 66 20 6c | 65 74 2d 73 79 6e 74 61 |e.{\cf l|et-synta|
|000020e0| 78 7d 20 65 78 70 72 65 | 73 73 69 6f 6e 20 77 69 |x} expre|ssion wi|
|000020f0| 74 68 20 6d 61 63 72 6f | 73 20 77 68 6f 73 65 20 |th macro|s whose |
|00002100| 6b 65 79 77 6f 72 64 73 | 20 61 72 65 0a 74 68 65 |keywords| are.the|
|00002110| 20 5c 68 79 70 65 72 7b | 6b 65 79 77 6f 72 64 7d | \hyper{|keyword}|
|00002120| 73 2c 20 62 6f 75 6e 64 | 20 74 6f 20 74 68 65 20 |s, bound| to the |
|00002130| 73 70 65 63 69 66 69 65 | 64 20 74 72 61 6e 73 66 |specifie|d transf|
|00002140| 6f 72 6d 65 72 73 2e 0a | 45 61 63 68 20 62 69 6e |ormers..|Each bin|
|00002150| 64 69 6e 67 20 6f 66 20 | 61 20 5c 68 79 70 65 72 |ding of |a \hyper|
|00002160| 7b 6b 65 79 77 6f 72 64 | 7d 20 68 61 73 20 5c 68 |{keyword|} has \h|
|00002170| 79 70 65 72 7b 62 6f 64 | 79 7d 20 61 73 20 69 74 |yper{bod|y} as it|
|00002180| 73 20 72 65 67 69 6f 6e | 2e 0a 0a 5c 62 65 67 69 |s region|...\begi|
|00002190| 6e 7b 73 63 68 65 6d 65 | 7d 0a 28 6c 65 74 2d 73 |n{scheme|}.(let-s|
|000021a0| 79 6e 74 61 78 20 28 28 | 77 68 65 6e 20 28 73 79 |yntax ((|when (sy|
|000021b0| 6e 74 61 78 2d 72 75 6c | 65 73 20 28 29 0a 20 20 |ntax-rul|es (). |
|000021c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000021d0| 20 20 20 28 28 77 68 65 | 6e 20 74 65 73 74 20 73 | ((whe|n test s|
|000021e0| 74 6d 74 31 20 73 74 6d | 74 32 20 2e 2e 2e 29 0a |tmt1 stm|t2 ...).|
|000021f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002200| 20 20 20 20 20 20 28 69 | 66 20 74 65 73 74 0a 20 | (i|f test. |
|00002210| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002220| 20 20 20 20 20 20 20 20 | 20 28 62 65 67 69 6e 20 | | (begin |
|00002230| 73 74 6d 74 31 0a 20 20 | 20 20 20 20 20 20 20 20 |stmt1. | |
|00002240| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002250| 20 20 20 20 20 20 20 73 | 74 6d 74 32 20 2e 2e 2e | s|tmt2 ...|
|00002260| 29 29 29 29 29 29 0a 20 | 20 28 6c 65 74 20 28 28 |)))))). | (let ((|
|00002270| 69 66 20 5c 73 63 68 74 | 72 75 65 29 29 0a 20 20 |if \scht|rue)). |
|00002280| 20 20 28 77 68 65 6e 20 | 69 66 20 28 73 65 74 21 | (when |if (set!|
|00002290| 20 69 66 20 27 6e 6f 77 | 29 29 0a 20 20 20 20 69 | if 'now|)). i|
|000022a0| 66 29 29 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |f)) | |
|000022b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 5c 65 | | \e|
|000022c0| 76 20 20 6e 6f 77 0a 0a | 28 6c 65 74 20 28 28 78 |v now..|(let ((x|
|000022d0| 20 27 6f 75 74 65 72 29 | 29 0a 20 20 28 6c 65 74 | 'outer)|). (let|
|000022e0| 2d 73 79 6e 74 61 78 20 | 28 28 6d 20 28 73 79 6e |-syntax |((m (syn|
|000022f0| 74 61 78 2d 72 75 6c 65 | 73 20 28 29 20 28 28 6d |tax-rule|s () ((m|
|00002300| 29 20 78 29 29 29 29 0a | 20 20 20 20 28 6c 65 74 |) x)))).| (let|
|00002310| 20 28 28 78 20 27 69 6e | 6e 65 72 29 29 0a 20 20 | ((x 'in|ner)). |
|00002320| 20 20 20 20 28 6d 29 29 | 29 29 20 20 20 20 20 20 | (m))|)) |
|00002330| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002340| 20 5c 65 76 20 20 6f 75 | 74 65 72 25 0a 5c 65 6e | \ev ou|ter%.\en|
|00002350| 64 7b 73 63 68 65 6d 65 | 7d 0a 0a 5c 65 6e 64 7b |d{scheme|}..\end{|
|00002360| 65 6e 74 72 79 7d 0a 0a | 5c 62 65 67 69 6e 7b 65 |entry}..|\begin{e|
|00002370| 6e 74 72 79 7d 7b 25 0a | 5c 70 72 6f 74 6f 7b 6c |ntry}{%.|\proto{l|
|00002380| 65 74 72 65 63 2d 73 79 | 6e 74 61 78 7d 7b 20 5c |etrec-sy|ntax}{ \|
|00002390| 68 79 70 65 72 7b 62 69 | 6e 64 69 6e 67 73 7d 20 |hyper{bi|ndings} |
|000023a0| 5c 68 79 70 65 72 7b 62 | 6f 64 79 7d 7d 7b 5c 65 |\hyper{b|ody}}{\e|
|000023b0| 78 70 72 74 79 70 65 7d | 7d 0a 0a 5c 73 79 6e 74 |xprtype}|}..\synt|
|000023c0| 61 78 0a 53 61 6d 65 20 | 61 73 20 66 6f 72 20 7b |ax.Same |as for {|
|000023d0| 5c 63 66 20 6c 65 74 2d | 73 79 6e 74 61 78 7d 2e |\cf let-|syntax}.|
|000023e0| 0a 0a 5c 73 65 6d 61 6e | 74 69 63 73 0a 20 54 68 |..\seman|tics. Th|
|000023f0| 65 20 5c 68 79 70 65 72 | 7b 62 6f 64 79 7d 20 69 |e \hyper|{body} i|
|00002400| 73 20 65 78 70 61 6e 64 | 65 64 20 69 6e 20 74 68 |s expand|ed in th|
|00002410| 65 20 73 79 6e 74 61 63 | 74 69 63 20 65 6e 76 69 |e syntac|tic envi|
|00002420| 72 6f 6e 6d 65 6e 74 20 | 6f 62 74 61 69 6e 65 64 |ronment |obtained|
|00002430| 20 62 79 0a 65 78 74 65 | 6e 64 69 6e 67 20 74 68 | by.exte|nding th|
|00002440| 65 20 73 79 6e 74 61 63 | 74 69 63 20 65 6e 76 69 |e syntac|tic envi|
|00002450| 72 6f 6e 6d 65 6e 74 20 | 6f 66 20 74 68 65 20 7b |ronment |of the {|
|00002460| 5c 63 66 20 6c 65 74 72 | 65 63 2d 73 79 6e 74 61 |\cf letr|ec-synta|
|00002470| 78 7d 0a 65 78 70 72 65 | 73 73 69 6f 6e 20 77 69 |x}.expre|ssion wi|
|00002480| 74 68 20 6d 61 63 72 6f | 73 20 77 68 6f 73 65 20 |th macro|s whose |
|00002490| 6b 65 79 77 6f 72 64 73 | 20 61 72 65 20 74 68 65 |keywords| are the|
|000024a0| 0a 5c 68 79 70 65 72 7b | 6b 65 79 77 6f 72 64 7d |.\hyper{|keyword}|
|000024b0| 73 2c 20 62 6f 75 6e 64 | 20 74 6f 20 74 68 65 20 |s, bound| to the |
|000024c0| 73 70 65 63 69 66 69 65 | 64 20 74 72 61 6e 73 66 |specifie|d transf|
|000024d0| 6f 72 6d 65 72 73 2e 0a | 45 61 63 68 20 62 69 6e |ormers..|Each bin|
|000024e0| 64 69 6e 67 20 6f 66 20 | 61 20 5c 68 79 70 65 72 |ding of |a \hyper|
|000024f0| 7b 6b 65 79 77 6f 72 64 | 7d 20 68 61 73 20 74 68 |{keyword|} has th|
|00002500| 65 20 5c 68 79 70 65 72 | 7b 62 69 6e 64 69 6e 67 |e \hyper|{binding|
|00002510| 73 7d 0a 61 73 20 77 65 | 6c 6c 20 61 73 20 74 68 |s}.as we|ll as th|
|00002520| 65 20 5c 68 79 70 65 72 | 7b 62 6f 64 79 7d 20 77 |e \hyper|{body} w|
|00002530| 69 74 68 69 6e 20 69 74 | 73 20 72 65 67 69 6f 6e |ithin it|s region|
|00002540| 2c 0a 73 6f 20 74 68 65 | 20 74 72 61 6e 73 66 6f |,.so the| transfo|
|00002550| 72 6d 65 72 73 20 63 61 | 6e 0a 74 72 61 6e 73 63 |rmers ca|n.transc|
|00002560| 72 69 62 65 20 65 78 70 | 72 65 73 73 69 6f 6e 73 |ribe exp|ressions|
|00002570| 20 69 6e 74 6f 20 75 73 | 65 73 20 6f 66 20 74 68 | into us|es of th|
|00002580| 65 20 6d 61 63 72 6f 73 | 0a 69 6e 74 72 6f 64 75 |e macros|.introdu|
|00002590| 63 65 64 20 62 79 20 74 | 68 65 20 7b 5c 63 66 20 |ced by t|he {\cf |
|000025a0| 6c 65 74 72 65 63 2d 73 | 79 6e 74 61 78 7d 20 65 |letrec-s|yntax} e|
|000025b0| 78 70 72 65 73 73 69 6f | 6e 2e 0a 0a 5c 62 65 67 |xpressio|n...\beg|
|000025c0| 69 6e 7b 73 63 68 65 6d | 65 7d 0a 28 6c 65 74 72 |in{schem|e}.(letr|
|000025d0| 65 63 2d 73 79 6e 74 61 | 78 0a 20 20 28 28 6f 72 |ec-synta|x. ((or|
|000025e0| 20 28 73 79 6e 74 61 78 | 2d 72 75 6c 65 73 20 28 | (syntax|-rules (|
|000025f0| 29 0a 20 20 20 20 20 20 | 20 20 20 28 28 6f 72 29 |). | ((or)|
|00002600| 20 5c 73 63 68 66 61 6c | 73 65 29 0a 20 20 20 20 | \schfal|se). |
|00002610| 20 20 20 20 20 28 28 6f | 72 20 65 29 20 65 29 0a | ((o|r e) e).|
|00002620| 20 20 20 20 20 20 20 20 | 20 28 28 6f 72 20 65 31 | | ((or e1|
|00002630| 20 65 32 20 2e 2e 2e 29 | 0a 20 20 20 20 20 20 20 | e2 ...)|. |
|00002640| 20 20 20 28 6c 65 74 20 | 28 28 74 65 6d 70 20 65 | (let |((temp e|
|00002650| 31 29 29 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 |1)). | |
|00002660| 28 69 66 20 74 65 6d 70 | 0a 20 20 20 20 20 20 20 |(if temp|. |
|00002670| 20 20 20 20 20 20 20 20 | 20 74 65 6d 70 0a 20 20 | | temp. |
|00002680| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 28 6f | | (o|
|00002690| 72 20 65 32 20 2e 2e 2e | 29 29 29 29 29 29 29 0a |r e2 ...|))))))).|
|000026a0| 20 20 28 6c 65 74 20 28 | 28 78 20 5c 73 63 68 66 | (let (|(x \schf|
|000026b0| 61 6c 73 65 29 0a 20 20 | 20 20 20 20 20 20 28 79 |alse). | (y|
|000026c0| 20 37 29 0a 20 20 20 20 | 20 20 20 20 28 74 65 6d | 7). | (tem|
|000026d0| 70 20 38 29 0a 20 20 20 | 20 20 20 20 20 28 6c 65 |p 8). | (le|
|000026e0| 74 20 6f 64 64 3f 29 0a | 20 20 20 20 20 20 20 20 |t odd?).| |
|000026f0| 28 69 66 20 65 76 65 6e | 3f 29 29 0a 20 20 20 20 |(if even|?)). |
|00002700| 28 6f 72 20 78 0a 20 20 | 20 20 20 20 20 20 28 6c |(or x. | (l|
|00002710| 65 74 20 74 65 6d 70 29 | 0a 20 20 20 20 20 20 20 |et temp)|. |
|00002720| 20 28 69 66 20 79 29 0a | 20 20 20 20 20 20 20 20 | (if y).| |
|00002730| 79 29 29 29 20 20 20 20 | 20 20 20 20 5c 65 76 20 |y))) | \ev |
|00002740| 20 37 25 0a 5c 65 6e 64 | 7b 73 63 68 65 6d 65 7d | 7%.\end|{scheme}|
|00002750| 0a 0a 5c 65 6e 64 7b 65 | 6e 74 72 79 7d 0a 0a 5c |..\end{e|ntry}..\|
|00002760| 62 65 67 69 6e 7b 65 6e | 74 72 79 7d 7b 25 0a 5c |begin{en|try}{%.\|
|00002770| 70 72 6f 74 6f 7b 64 65 | 66 69 6e 65 2d 73 79 6e |proto{de|fine-syn|
|00002780| 74 61 78 7d 7b 20 5c 68 | 79 70 65 72 7b 6b 65 79 |tax}{ \h|yper{key|
|00002790| 77 6f 72 64 7d 20 5c 68 | 79 70 65 72 7b 74 72 61 |word} \h|yper{tra|
|000027a0| 6e 73 66 6f 72 6d 65 72 | 20 73 70 65 63 7d 7d 7b |nsformer| spec}}{|
|000027b0| 7d 7d 0a 0a 5c 73 79 6e | 74 61 78 0a 54 68 65 20 |}}..\syn|tax.The |
|000027c0| 5c 68 79 70 65 72 7b 6b | 65 79 77 6f 72 64 7d 20 |\hyper{k|eyword} |
|000027d0| 69 73 20 61 6e 20 69 64 | 65 6e 74 69 66 69 65 72 |is an id|entifier|
|000027e0| 2c 20 61 6e 64 20 74 68 | 65 20 5c 68 79 70 65 72 |, and th|e \hyper|
|000027f0| 7b 74 72 61 6e 73 66 6f | 72 6d 65 72 0a 73 70 65 |{transfo|rmer.spe|
|00002800| 63 7d 20 73 68 6f 75 6c | 64 20 62 65 20 61 6e 20 |c} shoul|d be an |
|00002810| 69 6e 73 74 61 6e 63 65 | 20 6f 66 20 7b 5c 63 66 |instance| of {\cf|
|00002820| 20 73 79 6e 74 61 78 2d | 72 75 6c 65 73 7d 2e 0a | syntax-|rules}..|
|00002830| 0a 5c 73 65 6d 61 6e 74 | 69 63 73 0a 54 68 65 20 |.\semant|ics.The |
|00002840| 74 6f 70 2d 6c 65 76 65 | 6c 20 73 79 6e 74 61 63 |top-leve|l syntac|
|00002850| 74 69 63 20 65 6e 76 69 | 72 6f 6e 6d 65 6e 74 20 |tic envi|ronment |
|00002860| 69 73 20 65 78 74 65 6e | 64 65 64 20 62 79 20 62 |is exten|ded by b|
|00002870| 69 6e 64 69 6e 67 20 74 | 68 65 0a 5c 68 79 70 65 |inding t|he.\hype|
|00002880| 72 7b 6b 65 79 77 6f 72 | 64 7d 20 74 6f 20 74 68 |r{keywor|d} to th|
|00002890| 65 20 73 70 65 63 69 66 | 69 65 64 20 74 72 61 6e |e specif|ied tran|
|000028a0| 73 66 6f 72 6d 65 72 2e | 0a 0a 5c 62 65 67 69 6e |sformer.|..\begin|
|000028b0| 7b 73 63 68 65 6d 65 7d | 0a 28 64 65 66 69 6e 65 |{scheme}|.(define|
|000028c0| 2d 73 79 6e 74 61 78 20 | 6c 65 74 2a 0a 20 20 28 |-syntax |let*. (|
|000028d0| 73 79 6e 74 61 78 2d 72 | 75 6c 65 73 20 28 29 0a |syntax-r|ules ().|
|000028e0| 20 20 20 20 28 28 6c 65 | 74 2a 20 28 29 20 62 6f | ((le|t* () bo|
|000028f0| 64 79 31 20 62 6f 64 79 | 32 20 2e 2e 2e 29 0a 20 |dy1 body|2 ...). |
|00002900| 20 20 20 20 28 6c 65 74 | 20 28 29 20 62 6f 64 79 | (let| () body|
|00002910| 31 20 62 6f 64 79 32 20 | 2e 2e 2e 29 29 0a 20 20 |1 body2 |...)). |
|00002920| 20 20 28 28 6c 65 74 2a | 20 28 28 6e 61 6d 65 31 | ((let*| ((name1|
|00002930| 20 76 61 6c 31 29 20 28 | 6e 61 6d 65 32 20 76 61 | val1) (|name2 va|
|00002940| 6c 32 29 20 2e 2e 2e 29 | 0a 20 20 20 20 20 20 20 |l2) ...)|. |
|00002950| 62 6f 64 79 31 20 62 6f | 64 79 32 20 2e 2e 2e 29 |body1 bo|dy2 ...)|
|00002960| 0a 20 20 20 20 20 28 6c | 65 74 20 28 28 6e 61 6d |. (l|et ((nam|
|00002970| 65 31 20 76 61 6c 31 29 | 29 0a 20 20 20 20 20 20 |e1 val1)|). |
|00002980| 20 28 6c 65 74 2a 20 28 | 28 6e 61 6d 65 32 20 76 | (let* (|(name2 v|
|00002990| 61 6c 32 29 20 2e 2e 2e | 29 0a 20 20 20 20 20 20 |al2) ...|). |
|000029a0| 20 20 20 62 6f 64 79 31 | 20 62 6f 64 79 32 20 2e | body1| body2 .|
|000029b0| 2e 2e 29 29 29 29 29 0a | 5c 65 6e 64 7b 73 63 68 |..))))).|\end{sch|
|000029c0| 65 6d 65 7d 0a 0a 5c 65 | 6e 64 7b 65 6e 74 72 79 |eme}..\e|nd{entry|
|000029d0| 7d 0a 0a 5c 73 75 62 73 | 65 63 74 69 6f 6e 2a 7b |}..\subs|ection*{|
|000029e0| 50 61 74 74 65 72 6e 20 | 6c 61 6e 67 75 61 67 65 |Pattern |language|
|000029f0| 7d 0a 5c 6c 61 62 65 6c | 7b 70 61 74 74 65 72 6e |}.\label|{pattern|
|00002a00| 6c 61 6e 67 75 61 67 65 | 7d 0a 0a 5c 62 65 67 69 |language|}..\begi|
|00002a10| 6e 7b 65 6e 74 72 79 7d | 7b 25 0a 5c 70 72 6f 74 |n{entry}|{%.\prot|
|00002a20| 6f 7b 73 79 6e 74 61 78 | 2d 72 75 6c 65 73 7d 7b |o{syntax|-rules}{|
|00002a30| 20 5c 68 79 70 65 72 7b | 6c 69 74 65 72 61 6c 73 | \hyper{|literals|
|00002a40| 7d 20 5c 68 79 70 65 72 | 7b 73 79 6e 74 61 78 20 |} \hyper|{syntax |
|00002a50| 72 75 6c 65 7d 20 5c 64 | 6f 74 73 66 6f 6f 7d 7b |rule} \d|otsfoo}{|
|00002a60| 7d 7d 0a 0a 5c 73 79 6e | 74 61 78 0a 5c 68 79 70 |}}..\syn|tax.\hyp|
|00002a70| 65 72 7b 4c 69 74 65 72 | 61 6c 73 7d 20 69 73 20 |er{Liter|als} is |
|00002a80| 61 20 6c 69 73 74 20 6f | 66 20 69 64 65 6e 74 69 |a list o|f identi|
|00002a90| 66 69 65 72 73 2c 20 61 | 6e 64 20 65 61 63 68 20 |fiers, a|nd each |
|00002aa0| 5c 68 79 70 65 72 7b 73 | 79 6e 74 61 78 20 72 75 |\hyper{s|yntax ru|
|00002ab0| 6c 65 7d 0a 73 68 6f 75 | 6c 64 20 62 65 20 6f 66 |le}.shou|ld be of|
|00002ac0| 20 74 68 65 20 66 6f 72 | 6d 0a 5c 62 65 67 69 6e | the for|m.\begin|
|00002ad0| 7b 73 63 68 65 6d 65 7d | 0a 28 5c 68 79 70 65 72 |{scheme}|.(\hyper|
|00002ae0| 7b 70 61 74 74 65 72 6e | 7d 20 5c 68 79 70 65 72 |{pattern|} \hyper|
|00002af0| 7b 74 65 6d 70 6c 61 74 | 65 7d 29 25 0a 5c 65 6e |{templat|e})%.\en|
|00002b00| 64 7b 73 63 68 65 6d 65 | 7d 0a 77 68 65 72 65 20 |d{scheme|}.where |
|00002b10| 74 68 65 20 5c 68 79 70 | 65 72 7b 70 61 74 74 65 |the \hyp|er{patte|
|00002b20| 72 6e 7d 20 61 6e 64 20 | 5c 68 79 70 65 72 7b 74 |rn} and |\hyper{t|
|00002b30| 65 6d 70 6c 61 74 65 7d | 20 61 72 65 20 61 73 20 |emplate}| are as |
|00002b40| 69 6e 20 74 68 65 20 67 | 72 61 6d 6d 61 72 0a 61 |in the g|rammar.a|
|00002b50| 62 6f 76 65 2e 0a 0a 5c | 73 65 6d 61 6e 74 69 63 |bove...\|semantic|
|00002b60| 73 20 41 6e 20 69 6e 73 | 74 61 6e 63 65 20 6f 66 |s An ins|tance of|
|00002b70| 20 7b 5c 63 66 20 73 79 | 6e 74 61 78 2d 72 75 6c | {\cf sy|ntax-rul|
|00002b80| 65 73 7d 20 70 72 6f 64 | 75 63 65 73 20 61 20 6e |es} prod|uces a n|
|00002b90| 65 77 20 6d 61 63 72 6f | 0a 74 72 61 6e 73 66 6f |ew macro|.transfo|
|00002ba0| 72 6d 65 72 20 62 79 20 | 73 70 65 63 69 66 79 69 |rmer by |specifyi|
|00002bb0| 6e 67 20 61 20 73 65 71 | 75 65 6e 63 65 20 6f 66 |ng a seq|uence of|
|00002bc0| 20 68 79 67 69 65 6e 69 | 63 20 72 65 77 72 69 74 | hygieni|c rewrit|
|00002bd0| 65 20 72 75 6c 65 73 2e | 20 20 41 20 75 73 65 0a |e rules.| A use.|
|00002be0| 6f 66 20 61 20 6d 61 63 | 72 6f 20 77 68 6f 73 65 |of a mac|ro whose|
|00002bf0| 20 6b 65 79 77 6f 72 64 | 20 69 73 20 61 73 73 6f | keyword| is asso|
|00002c00| 63 69 61 74 65 64 20 77 | 69 74 68 20 61 20 74 72 |ciated w|ith a tr|
|00002c10| 61 6e 73 66 6f 72 6d 65 | 72 20 73 70 65 63 69 66 |ansforme|r specif|
|00002c20| 69 65 64 20 62 79 0a 7b | 5c 63 66 20 73 79 6e 74 |ied by.{|\cf synt|
|00002c30| 61 78 2d 72 75 6c 65 73 | 7d 20 69 73 20 6d 61 74 |ax-rules|} is mat|
|00002c40| 63 68 65 64 20 61 67 61 | 69 6e 73 74 20 74 68 65 |ched aga|inst the|
|00002c50| 20 70 61 74 74 65 72 6e | 73 20 63 6f 6e 74 61 69 | pattern|s contai|
|00002c60| 6e 65 64 20 69 6e 20 74 | 68 65 0a 5c 68 79 70 65 |ned in t|he.\hype|
|00002c70| 72 7b 73 79 6e 74 61 78 | 20 72 75 6c 65 7d 73 2c |r{syntax| rule}s,|
|00002c80| 20 62 65 67 69 6e 6e 69 | 6e 67 20 77 69 74 68 20 | beginni|ng with |
|00002c90| 74 68 65 20 6c 65 66 74 | 6d 6f 73 74 20 5c 68 79 |the left|most \hy|
|00002ca0| 70 65 72 7b 73 79 6e 74 | 61 78 20 72 75 6c 65 7d |per{synt|ax rule}|
|00002cb0| 2e 0a 57 68 65 6e 20 61 | 20 6d 61 74 63 68 20 69 |..When a| match i|
|00002cc0| 73 20 66 6f 75 6e 64 2c | 20 74 68 65 20 6d 61 63 |s found,| the mac|
|00002cd0| 72 6f 20 75 73 65 20 69 | 73 20 74 72 61 6e 73 63 |ro use i|s transc|
|00002ce0| 72 69 62 65 64 20 68 79 | 67 69 65 6e 69 63 61 6c |ribed hy|gienical|
|00002cf0| 6c 79 0a 61 63 63 6f 72 | 64 69 6e 67 20 74 6f 20 |ly.accor|ding to |
|00002d00| 74 68 65 20 74 65 6d 70 | 6c 61 74 65 2e 0a 0a 45 |the temp|late...E|
|00002d10| 61 63 68 20 70 61 74 74 | 65 72 6e 20 62 65 67 69 |ach patt|ern begi|
|00002d20| 6e 73 20 77 69 74 68 20 | 74 68 65 20 6b 65 79 77 |ns with |the keyw|
|00002d30| 6f 72 64 20 66 6f 72 20 | 74 68 65 20 6d 61 63 72 |ord for |the macr|
|00002d40| 6f 2e 20 20 54 68 69 73 | 20 6b 65 79 77 6f 72 64 |o. This| keyword|
|00002d50| 0a 69 73 20 6e 6f 74 20 | 69 6e 76 6f 6c 76 65 64 |.is not |involved|
|00002d60| 20 69 6e 20 74 68 65 20 | 6d 61 74 63 68 69 6e 67 | in the |matching|
|00002d70| 20 61 6e 64 20 69 73 20 | 6e 6f 74 20 63 6f 6e 73 | and is |not cons|
|00002d80| 69 64 65 72 65 64 20 61 | 20 70 61 74 74 65 72 6e |idered a| pattern|
|00002d90| 0a 76 61 72 69 61 62 6c | 65 20 6f 72 20 6c 69 74 |.variabl|e or lit|
|00002da0| 65 72 61 6c 20 69 64 65 | 6e 74 69 66 69 65 72 2e |eral ide|ntifier.|
|00002db0| 0a 0a 5c 62 65 67 69 6e | 7b 72 61 74 69 6f 6e 61 |..\begin|{rationa|
|00002dc0| 6c 65 7d 0a 54 68 65 20 | 73 63 6f 70 65 20 6f 66 |le}.The |scope of|
|00002dd0| 20 74 68 65 20 6b 65 79 | 77 6f 72 64 20 69 73 20 | the key|word is |
|00002de0| 64 65 74 65 72 6d 69 6e | 65 64 20 62 79 20 74 68 |determin|ed by th|
|00002df0| 65 20 65 78 70 72 65 73 | 73 69 6f 6e 20 6f 72 20 |e expres|sion or |
|00002e00| 73 79 6e 74 61 78 0a 64 | 65 66 69 6e 69 74 69 6f |syntax.d|efinitio|
|00002e10| 6e 20 74 68 61 74 20 62 | 69 6e 64 73 20 69 74 20 |n that b|inds it |
|00002e20| 74 6f 20 74 68 65 20 61 | 73 73 6f 63 69 61 74 65 |to the a|ssociate|
|00002e30| 64 20 6d 61 63 72 6f 20 | 74 72 61 6e 73 66 6f 72 |d macro |transfor|
|00002e40| 6d 65 72 2e 0a 49 66 20 | 74 68 65 20 6b 65 79 77 |mer..If |the keyw|
|00002e50| 6f 72 64 20 77 65 72 65 | 20 61 20 70 61 74 74 65 |ord were| a patte|
|00002e60| 72 6e 20 76 61 72 69 61 | 62 6c 65 20 6f 72 20 6c |rn varia|ble or l|
|00002e70| 69 74 65 72 61 6c 20 69 | 64 65 6e 74 69 66 69 65 |iteral i|dentifie|
|00002e80| 72 2c 20 74 68 65 6e 0a | 74 68 65 20 74 65 6d 70 |r, then.|the temp|
|00002e90| 6c 61 74 65 20 74 68 61 | 74 20 66 6f 6c 6c 6f 77 |late tha|t follow|
|00002ea0| 73 20 74 68 65 20 70 61 | 74 74 65 72 6e 20 77 6f |s the pa|ttern wo|
|00002eb0| 75 6c 64 20 62 65 20 77 | 69 74 68 69 6e 20 69 74 |uld be w|ithin it|
|00002ec0| 73 20 73 63 6f 70 65 0a | 72 65 67 61 72 64 6c 65 |s scope.|regardle|
|00002ed0| 73 73 20 6f 66 20 77 68 | 65 74 68 65 72 20 74 68 |ss of wh|ether th|
|00002ee0| 65 20 6b 65 79 77 6f 72 | 64 20 77 65 72 65 20 62 |e keywor|d were b|
|00002ef0| 6f 75 6e 64 20 62 79 20 | 7b 5c 63 66 20 6c 65 74 |ound by |{\cf let|
|00002f00| 2d 73 79 6e 74 61 78 7d | 0a 6f 72 20 62 79 20 7b |-syntax}|.or by {|
|00002f10| 5c 63 66 20 6c 65 74 72 | 65 63 2d 73 79 6e 74 61 |\cf letr|ec-synta|
|00002f20| 78 7d 2e 0a 5c 65 6e 64 | 7b 72 61 74 69 6f 6e 61 |x}..\end|{rationa|
|00002f30| 6c 65 7d 0a 0a 41 6e 20 | 69 64 65 6e 74 69 66 69 |le}..An |identifi|
|00002f40| 65 72 20 74 68 61 74 20 | 61 70 70 65 61 72 73 20 |er that |appears |
|00002f50| 69 6e 20 74 68 65 20 70 | 61 74 74 65 72 6e 20 6f |in the p|attern o|
|00002f60| 66 20 61 20 5c 68 79 70 | 65 72 7b 73 79 6e 74 61 |f a \hyp|er{synta|
|00002f70| 78 20 72 75 6c 65 7d 20 | 69 73 0a 61 20 70 61 74 |x rule} |is.a pat|
|00002f80| 74 65 72 6e 20 76 61 72 | 69 61 62 6c 65 2c 20 75 |tern var|iable, u|
|00002f90| 6e 6c 65 73 73 20 69 74 | 20 69 73 20 74 68 65 20 |nless it| is the |
|00002fa0| 6b 65 79 77 6f 72 64 20 | 74 68 61 74 20 62 65 67 |keyword |that beg|
|00002fb0| 69 6e 73 20 74 68 65 20 | 70 61 74 74 65 72 6e 2c |ins the |pattern,|
|00002fc0| 0a 69 73 20 6c 69 73 74 | 65 64 20 69 6e 20 5c 68 |.is list|ed in \h|
|00002fd0| 79 70 65 72 7b 6c 69 74 | 65 72 61 6c 73 7d 2c 20 |yper{lit|erals}, |
|00002fe0| 6f 72 20 69 73 20 74 68 | 65 20 69 64 65 6e 74 69 |or is th|e identi|
|00002ff0| 66 69 65 72 20 60 60 7b | 5c 63 66 20 2e 2e 2e 7d |fier ``{|\cf ...}|
|00003000| 27 27 2e 0a 50 61 74 74 | 65 72 6e 20 76 61 72 69 |''..Patt|ern vari|
|00003010| 61 62 6c 65 73 20 6d 61 | 74 63 68 20 61 72 62 69 |ables ma|tch arbi|
|00003020| 74 72 61 72 79 20 69 6e | 70 75 74 20 65 6c 65 6d |trary in|put elem|
|00003030| 65 6e 74 73 20 61 6e 64 | 0a 61 72 65 20 75 73 65 |ents and|.are use|
|00003040| 64 20 74 6f 20 72 65 66 | 65 72 20 74 6f 20 65 6c |d to ref|er to el|
|00003050| 65 6d 65 6e 74 73 20 6f | 66 20 74 68 65 20 69 6e |ements o|f the in|
|00003060| 70 75 74 20 69 6e 20 74 | 68 65 20 74 65 6d 70 6c |put in t|he templ|
|00003070| 61 74 65 2e 20 20 49 74 | 20 69 73 20 61 6e 0a 65 |ate. It| is an.e|
|00003080| 72 72 6f 72 20 66 6f 72 | 20 74 68 65 20 73 61 6d |rror for| the sam|
|00003090| 65 20 70 61 74 74 65 72 | 6e 20 76 61 72 69 61 62 |e patter|n variab|
|000030a0| 6c 65 20 74 6f 20 61 70 | 70 65 61 72 20 6d 6f 72 |le to ap|pear mor|
|000030b0| 65 20 74 68 61 6e 20 6f | 6e 63 65 20 69 6e 20 61 |e than o|nce in a|
|000030c0| 0a 5c 68 79 70 65 72 7b | 70 61 74 74 65 72 6e 7d |.\hyper{|pattern}|
|000030d0| 2e 0a 0a 49 64 65 6e 74 | 69 66 69 65 72 73 20 74 |...Ident|ifiers t|
|000030e0| 68 61 74 20 61 70 70 65 | 61 72 20 69 6e 20 5c 68 |hat appe|ar in \h|
|000030f0| 79 70 65 72 7b 6c 69 74 | 65 72 61 6c 73 7d 20 61 |yper{lit|erals} a|
|00003100| 72 65 20 69 6e 74 65 72 | 70 72 65 74 65 64 20 61 |re inter|preted a|
|00003110| 73 20 6c 69 74 65 72 61 | 6c 0a 69 64 65 6e 74 69 |s litera|l.identi|
|00003120| 66 69 65 72 73 20 74 6f | 20 62 65 20 6d 61 74 63 |fiers to| be matc|
|00003130| 68 65 64 20 61 67 61 69 | 6e 73 74 20 63 6f 72 72 |hed agai|nst corr|
|00003140| 65 73 70 6f 6e 64 69 6e | 67 20 73 75 62 66 6f 72 |espondin|g subfor|
|00003150| 6d 73 20 6f 66 20 74 68 | 65 20 69 6e 70 75 74 2e |ms of th|e input.|
|00003160| 0a 41 20 73 75 62 66 6f | 72 6d 0a 69 6e 20 74 68 |.A subfo|rm.in th|
|00003170| 65 20 69 6e 70 75 74 20 | 6d 61 74 63 68 65 73 20 |e input |matches |
|00003180| 61 20 6c 69 74 65 72 61 | 6c 20 69 64 65 6e 74 69 |a litera|l identi|
|00003190| 66 69 65 72 20 69 66 20 | 61 6e 64 20 6f 6e 6c 79 |fier if |and only|
|000031a0| 20 69 66 20 69 74 20 69 | 73 20 61 6e 0a 69 64 65 | if it i|s an.ide|
|000031b0| 6e 74 69 66 69 65 72 0a | 61 6e 64 20 65 69 74 68 |ntifier.|and eith|
|000031c0| 65 72 20 62 6f 74 68 20 | 69 74 73 20 6f 63 63 75 |er both |its occu|
|000031d0| 72 72 65 6e 63 65 20 69 | 6e 20 74 68 65 20 6d 61 |rrence i|n the ma|
|000031e0| 63 72 6f 20 65 78 70 72 | 65 73 73 69 6f 6e 20 61 |cro expr|ession a|
|000031f0| 6e 64 20 69 74 73 0a 6f | 63 63 75 72 72 65 6e 63 |nd its.o|ccurrenc|
|00003200| 65 20 69 6e 20 74 68 65 | 20 6d 61 63 72 6f 20 64 |e in the| macro d|
|00003210| 65 66 69 6e 69 74 69 6f | 6e 20 68 61 76 65 20 74 |efinitio|n have t|
|00003220| 68 65 20 73 61 6d 65 20 | 6c 65 78 69 63 61 6c 20 |he same |lexical |
|00003230| 62 69 6e 64 69 6e 67 2c | 20 6f 72 0a 74 68 65 20 |binding,| or.the |
|00003240| 74 77 6f 20 69 64 65 6e | 74 69 66 69 65 72 73 20 |two iden|tifiers |
|00003250| 61 72 65 20 65 71 75 61 | 6c 20 61 6e 64 20 62 6f |are equa|l and bo|
|00003260| 74 68 20 68 61 76 65 20 | 6e 6f 20 6c 65 78 69 63 |th have |no lexic|
|00003270| 61 6c 20 62 69 6e 64 69 | 6e 67 2e 0a 0a 25 20 5b |al bindi|ng...% [|
|00003280| 42 69 6c 6c 20 52 6f 7a | 61 73 20 73 75 67 67 65 |Bill Roz|as sugge|
|00003290| 73 74 65 64 20 74 68 65 | 20 74 65 72 6d 20 22 6e |sted the| term "n|
|000032a0| 6f 69 73 65 20 77 6f 72 | 64 22 20 66 6f 72 20 74 |oise wor|d" for t|
|000032b0| 68 65 73 65 20 6c 69 74 | 65 72 61 6c 0a 25 20 69 |hese lit|eral.% i|
|000032c0| 64 65 6e 74 69 66 69 65 | 72 73 2c 20 62 75 74 20 |dentifie|rs, but |
|000032d0| 69 6e 20 74 68 65 69 72 | 20 6d 6f 73 74 20 69 6e |in their| most in|
|000032e0| 74 65 72 65 73 74 69 6e | 67 20 75 73 65 73 2c 20 |terestin|g uses, |
|000032f0| 73 75 63 68 20 61 73 20 | 61 20 73 65 74 66 0a 25 |such as |a setf.%|
|00003300| 20 6d 61 63 72 6f 2c 20 | 74 68 65 79 20 61 72 65 | macro, |they are|
|00003310| 6e 27 74 20 6e 6f 69 73 | 65 20 77 6f 72 64 73 20 |n't nois|e words |
|00003320| 61 74 20 61 6c 6c 2e 20 | 2d 2d 20 57 69 6c 6c 5d |at all. |-- Will]|
|00003330| 0a 0a 41 20 73 75 62 70 | 61 74 74 65 72 6e 20 66 |..A subp|attern f|
|00003340| 6f 6c 6c 6f 77 65 64 20 | 62 79 20 7b 5c 63 66 20 |ollowed |by {\cf |
|00003350| 2e 2e 2e 7d 20 63 61 6e | 20 6d 61 74 63 68 20 7a |...} can| match z|
|00003360| 65 72 6f 20 6f 72 20 6d | 6f 72 65 20 65 6c 65 6d |ero or m|ore elem|
|00003370| 65 6e 74 73 20 6f 66 20 | 74 68 65 0a 69 6e 70 75 |ents of |the.inpu|
|00003380| 74 2e 20 20 49 74 20 69 | 73 20 61 6e 20 65 72 72 |t. It i|s an err|
|00003390| 6f 72 20 66 6f 72 20 7b | 5c 63 66 20 2e 2e 2e 7d |or for {|\cf ...}|
|000033a0| 20 74 6f 20 61 70 70 65 | 61 72 20 69 6e 20 5c 68 | to appe|ar in \h|
|000033b0| 79 70 65 72 7b 6c 69 74 | 65 72 61 6c 73 7d 2e 0a |yper{lit|erals}..|
|000033c0| 57 69 74 68 69 6e 20 61 | 20 70 61 74 74 65 72 6e |Within a| pattern|
|000033d0| 20 74 68 65 20 69 64 65 | 6e 74 69 66 69 65 72 20 | the ide|ntifier |
|000033e0| 7b 5c 63 66 20 2e 2e 2e | 7d 20 6d 75 73 74 20 66 |{\cf ...|} must f|
|000033f0| 6f 6c 6c 6f 77 20 74 68 | 65 20 6c 61 73 74 20 65 |ollow th|e last e|
|00003400| 6c 65 6d 65 6e 74 20 6f | 66 0a 61 20 6e 6f 6e 65 |lement o|f.a none|
|00003410| 6d 70 74 79 20 73 65 71 | 75 65 6e 63 65 20 6f 66 |mpty seq|uence of|
|00003420| 20 73 75 62 70 61 74 74 | 65 72 6e 73 2e 0a 0a 4d | subpatt|erns...M|
|00003430| 6f 72 65 20 66 6f 72 6d | 61 6c 6c 79 2c 20 61 6e |ore form|ally, an|
|00003440| 20 69 6e 70 75 74 20 66 | 6f 72 6d 20 24 46 24 20 | input f|orm $F$ |
|00003450| 6d 61 74 63 68 65 73 20 | 61 20 70 61 74 74 65 72 |matches |a patter|
|00003460| 6e 20 24 50 24 20 69 66 | 20 61 6e 64 20 6f 6e 6c |n $P$ if| and onl|
|00003470| 79 20 69 66 3a 0a 0a 5c | 62 65 67 69 6e 7b 69 74 |y if:..\|begin{it|
|00003480| 65 6d 69 7a 65 7d 0a 5c | 69 74 65 6d 20 24 50 24 |emize}.\|item $P$|
|00003490| 20 69 73 20 61 20 70 61 | 74 74 65 72 6e 20 76 61 | is a pa|ttern va|
|000034a0| 72 69 61 62 6c 65 3b 20 | 6f 72 0a 0a 5c 69 74 65 |riable; |or..\ite|
|000034b0| 6d 20 24 50 24 20 69 73 | 20 61 20 6c 69 74 65 72 |m $P$ is| a liter|
|000034c0| 61 6c 20 69 64 65 6e 74 | 69 66 69 65 72 20 61 6e |al ident|ifier an|
|000034d0| 64 20 24 46 24 20 69 73 | 20 61 6e 20 69 64 65 6e |d $F$ is| an iden|
|000034e0| 74 69 66 69 65 72 20 77 | 69 74 68 20 74 68 65 20 |tifier w|ith the |
|000034f0| 73 61 6d 65 0a 20 20 20 | 20 20 20 62 69 6e 64 69 |same. | bindi|
|00003500| 6e 67 3b 20 6f 72 0a 0a | 5c 69 74 65 6d 20 24 50 |ng; or..|\item $P|
|00003510| 24 20 69 73 20 61 20 70 | 61 74 74 65 72 6e 20 6c |$ is a p|attern l|
|00003520| 69 73 74 20 7b 5c 63 66 | 20 28 24 50 5f 31 24 20 |ist {\cf| ($P_1$ |
|00003530| 24 5c 64 6f 74 73 24 20 | 24 50 5f 6e 24 29 7d 20 |$\dots$ |$P_n$)} |
|00003540| 61 6e 64 20 24 46 24 20 | 69 73 20 61 0a 20 20 20 |and $F$ |is a. |
|00003550| 20 20 20 6c 69 73 74 20 | 6f 66 20 24 6e 24 0a 20 | list |of $n$. |
|00003560| 20 20 20 20 20 66 6f 72 | 6d 73 20 74 68 61 74 20 | for|ms that |
|00003570| 6d 61 74 63 68 20 24 50 | 5f 31 24 20 74 68 72 6f |match $P|_1$ thro|
|00003580| 75 67 68 20 24 50 5f 6e | 24 2c 20 72 65 73 70 65 |ugh $P_n|$, respe|
|00003590| 63 74 69 76 65 6c 79 3b | 20 6f 72 0a 0a 5c 69 74 |ctively;| or..\it|
|000035a0| 65 6d 20 24 50 24 20 69 | 73 20 61 6e 20 69 6d 70 |em $P$ i|s an imp|
|000035b0| 72 6f 70 65 72 20 70 61 | 74 74 65 72 6e 20 6c 69 |roper pa|ttern li|
|000035c0| 73 74 0a 20 20 20 20 20 | 20 7b 5c 63 66 20 28 24 |st. | {\cf ($|
|000035d0| 50 5f 31 24 20 24 50 5f | 32 24 20 24 5c 64 6f 74 |P_1$ $P_|2$ $\dot|
|000035e0| 73 24 20 24 50 5f 6e 24 | 20 2e 20 24 50 5f 7b 6e |s$ $P_n$| . $P_{n|
|000035f0| 2b 31 7d 24 29 7d 0a 20 | 20 20 20 20 20 61 6e 64 |+1}$)}. | and|
|00003600| 20 24 46 24 20 69 73 20 | 61 20 6c 69 73 74 20 6f | $F$ is |a list o|
|00003610| 72 0a 20 20 20 20 20 20 | 69 6d 70 72 6f 70 65 72 |r. |improper|
|00003620| 20 6c 69 73 74 20 6f 66 | 20 24 6e 24 20 6f 72 20 | list of| $n$ or |
|00003630| 6d 6f 72 65 20 66 6f 72 | 6d 73 20 74 68 61 74 20 |more for|ms that |
|00003640| 6d 61 74 63 68 20 24 50 | 5f 31 24 20 74 68 72 6f |match $P|_1$ thro|
|00003650| 75 67 68 20 24 50 5f 6e | 24 2c 0a 20 20 20 20 20 |ugh $P_n|$,. |
|00003660| 20 72 65 73 70 65 63 74 | 69 76 65 6c 79 2c 20 61 | respect|ively, a|
|00003670| 6e 64 20 77 68 6f 73 65 | 20 24 6e 24 74 68 20 60 |nd whose| $n$th `|
|00003680| 60 63 64 72 27 27 20 6d | 61 74 63 68 65 73 20 24 |`cdr'' m|atches $|
|00003690| 50 5f 7b 6e 2b 31 7d 24 | 3b 20 6f 72 0a 0a 5c 69 |P_{n+1}$|; or..\i|
|000036a0| 74 65 6d 20 24 50 24 20 | 69 73 20 25 20 61 20 70 |tem $P$ |is % a p|
|000036b0| 61 74 74 65 72 6e 20 6c | 69 73 74 0a 20 20 20 20 |attern l|ist. |
|000036c0| 20 20 6f 66 20 74 68 65 | 20 66 6f 72 6d 0a 20 20 | of the| form. |
|000036d0| 20 20 20 20 7b 5c 63 66 | 20 28 24 50 5f 31 24 20 | {\cf| ($P_1$ |
|000036e0| 24 5c 64 6f 74 73 24 20 | 24 50 5f 6e 24 20 24 50 |$\dots$ |$P_n$ $P|
|000036f0| 5f 7b 6e 2b 31 7d 24 20 | 5c 6d 65 74 61 7b 65 6c |_{n+1}$ |\meta{el|
|00003700| 6c 69 70 73 69 73 7d 29 | 7d 0a 20 20 20 20 20 20 |lipsis})|}. |
|00003710| 77 68 65 72 65 20 5c 6d | 65 74 61 7b 65 6c 6c 69 |where \m|eta{elli|
|00003720| 70 73 69 73 7d 20 69 73 | 20 74 68 65 20 69 64 65 |psis} is| the ide|
|00003730| 6e 74 69 66 69 65 72 20 | 7b 5c 63 66 20 2e 2e 2e |ntifier |{\cf ...|
|00003740| 7d 0a 20 20 20 20 20 20 | 61 6e 64 20 24 46 24 20 |}. |and $F$ |
|00003750| 69 73 0a 20 20 20 20 20 | 20 61 20 70 72 6f 70 65 |is. | a prope|
|00003760| 72 20 6c 69 73 74 20 6f | 66 20 61 74 20 6c 65 61 |r list o|f at lea|
|00003770| 73 74 20 24 6e 24 20 65 | 6c 65 6d 65 6e 74 73 2c |st $n$ e|lements,|
|00003780| 20 74 68 65 20 66 69 72 | 73 74 20 24 6e 24 20 6f | the fir|st $n$ o|
|00003790| 66 20 77 68 69 63 68 20 | 6d 61 74 63 68 0a 20 20 |f which |match. |
|000037a0| 20 20 20 20 24 50 5f 31 | 24 20 74 68 72 6f 75 67 | $P_1|$ throug|
|000037b0| 68 20 24 50 5f 6e 24 2c | 20 72 65 73 70 65 63 74 |h $P_n$,| respect|
|000037c0| 69 76 65 6c 79 2c 20 61 | 6e 64 20 65 61 63 68 20 |ively, a|nd each |
|000037d0| 72 65 6d 61 69 6e 69 6e | 67 20 65 6c 65 6d 65 6e |remainin|g elemen|
|000037e0| 74 20 6f 66 20 24 46 24 | 0a 20 20 20 20 20 20 6d |t of $F$|. m|
|000037f0| 61 74 63 68 65 73 20 24 | 50 5f 7b 6e 2b 31 7d 24 |atches $|P_{n+1}$|
|00003800| 3b 20 6f 72 0a 0a 5c 69 | 74 65 6d 20 24 50 24 20 |; or..\i|tem $P$ |
|00003810| 69 73 20 61 20 70 61 74 | 74 65 72 6e 20 64 61 74 |is a pat|tern dat|
|00003820| 75 6d 20 61 6e 64 20 24 | 46 24 20 69 73 20 65 71 |um and $|F$ is eq|
|00003830| 75 61 6c 20 74 6f 20 24 | 50 24 20 69 6e 20 74 68 |ual to $|P$ in th|
|00003840| 65 20 73 65 6e 73 65 20 | 6f 66 0a 20 20 20 20 20 |e sense |of. |
|00003850| 20 74 68 65 20 7b 5c 63 | 66 20 65 71 75 61 6c 3f | the {\c|f equal?|
|00003860| 7d 20 70 72 6f 63 65 64 | 75 72 65 2e 0a 5c 65 6e |} proced|ure..\en|
|00003870| 64 7b 69 74 65 6d 69 7a | 65 7d 0a 0a 49 74 20 69 |d{itemiz|e}..It i|
|00003880| 73 20 61 6e 20 65 72 72 | 6f 72 20 74 6f 20 75 73 |s an err|or to us|
|00003890| 65 20 61 20 6d 61 63 72 | 6f 20 6b 65 79 77 6f 72 |e a macr|o keywor|
|000038a0| 64 2c 20 77 69 74 68 69 | 6e 20 74 68 65 20 73 63 |d, withi|n the sc|
|000038b0| 6f 70 65 20 6f 66 20 69 | 74 73 0a 62 69 6e 64 69 |ope of i|ts.bindi|
|000038c0| 6e 67 2c 20 69 6e 20 61 | 6e 20 65 78 70 72 65 73 |ng, in a|n expres|
|000038d0| 73 69 6f 6e 20 74 68 61 | 74 20 64 6f 65 73 20 6e |sion tha|t does n|
|000038e0| 6f 74 20 6d 61 74 63 68 | 20 61 6e 79 20 6f 66 20 |ot match| any of |
|000038f0| 74 68 65 20 70 61 74 74 | 65 72 6e 73 2e 0a 0a 57 |the patt|erns...W|
|00003900| 68 65 6e 20 61 20 6d 61 | 63 72 6f 20 75 73 65 20 |hen a ma|cro use |
|00003910| 69 73 20 74 72 61 6e 73 | 63 72 69 62 65 64 20 61 |is trans|cribed a|
|00003920| 63 63 6f 72 64 69 6e 67 | 20 74 6f 20 74 68 65 20 |ccording| to the |
|00003930| 74 65 6d 70 6c 61 74 65 | 20 6f 66 20 74 68 65 0a |template| of the.|
|00003940| 6d 61 74 63 68 69 6e 67 | 20 5c 68 79 70 65 72 7b |matching| \hyper{|
|00003950| 73 79 6e 74 61 78 20 72 | 75 6c 65 7d 2c 20 70 61 |syntax r|ule}, pa|
|00003960| 74 74 65 72 6e 20 76 61 | 72 69 61 62 6c 65 73 20 |ttern va|riables |
|00003970| 74 68 61 74 20 6f 63 63 | 75 72 20 69 6e 20 74 68 |that occ|ur in th|
|00003980| 65 0a 74 65 6d 70 6c 61 | 74 65 20 61 72 65 20 72 |e.templa|te are r|
|00003990| 65 70 6c 61 63 65 64 20 | 62 79 20 74 68 65 20 73 |eplaced |by the s|
|000039a0| 75 62 66 6f 72 6d 73 20 | 74 68 65 79 20 6d 61 74 |ubforms |they mat|
|000039b0| 63 68 20 69 6e 20 74 68 | 65 20 69 6e 70 75 74 2e |ch in th|e input.|
|000039c0| 0a 50 61 74 74 65 72 6e | 20 76 61 72 69 61 62 6c |.Pattern| variabl|
|000039d0| 65 73 20 74 68 61 74 20 | 6f 63 63 75 72 20 69 6e |es that |occur in|
|000039e0| 20 73 75 62 70 61 74 74 | 65 72 6e 73 20 66 6f 6c | subpatt|erns fol|
|000039f0| 6c 6f 77 65 64 20 62 79 | 20 6f 6e 65 20 6f 72 20 |lowed by| one or |
|00003a00| 6d 6f 72 65 0a 69 6e 73 | 74 61 6e 63 65 73 20 6f |more.ins|tances o|
|00003a10| 66 20 74 68 65 20 69 64 | 65 6e 74 69 66 69 65 72 |f the id|entifier|
|00003a20| 0a 7b 5c 63 66 20 2e 2e | 2e 7d 20 61 72 65 20 61 |.{\cf ..|.} are a|
|00003a30| 6c 6c 6f 77 65 64 20 6f | 6e 6c 79 20 69 6e 20 73 |llowed o|nly in s|
|00003a40| 75 62 74 65 6d 70 6c 61 | 74 65 73 20 74 68 61 74 |ubtempla|tes that|
|00003a50| 20 61 72 65 0a 66 6f 6c | 6c 6f 77 65 64 20 62 79 | are.fol|lowed by|
|00003a60| 20 61 73 20 6d 61 6e 79 | 20 69 6e 73 74 61 6e 63 | as many| instanc|
|00003a70| 65 73 20 6f 66 20 7b 5c | 63 66 20 2e 2e 2e 7d 2e |es of {\|cf ...}.|
|00003a80| 0a 54 68 65 79 20 61 72 | 65 20 72 65 70 6c 61 63 |.They ar|e replac|
|00003a90| 65 64 20 69 6e 20 74 68 | 65 0a 6f 75 74 70 75 74 |ed in th|e.output|
|00003aa0| 20 62 79 20 61 6c 6c 20 | 6f 66 20 74 68 65 20 73 | by all |of the s|
|00003ab0| 75 62 66 6f 72 6d 73 20 | 74 68 65 79 20 6d 61 74 |ubforms |they mat|
|00003ac0| 63 68 20 69 6e 20 74 68 | 65 20 69 6e 70 75 74 2c |ch in th|e input,|
|00003ad0| 20 64 69 73 74 72 69 62 | 75 74 65 64 20 61 73 0a | distrib|uted as.|
|00003ae0| 69 6e 64 69 63 61 74 65 | 64 2e 20 20 49 74 20 69 |indicate|d. It i|
|00003af0| 73 20 61 6e 20 65 72 72 | 6f 72 20 69 66 20 74 68 |s an err|or if th|
|00003b00| 65 20 6f 75 74 70 75 74 | 20 63 61 6e 6e 6f 74 20 |e output| cannot |
|00003b10| 62 65 20 62 75 69 6c 74 | 20 75 70 20 61 73 0a 73 |be built| up as.s|
|00003b20| 70 65 63 69 66 69 65 64 | 2e 0a 0a 25 25 25 20 54 |pecified|...%%% T|
|00003b30| 68 69 73 20 64 65 73 63 | 72 69 70 74 69 6f 6e 20 |his desc|ription |
|00003b40| 6f 66 20 6f 75 74 70 75 | 74 20 63 6f 6e 73 74 72 |of outpu|t constr|
|00003b50| 75 63 74 69 6f 6e 20 69 | 73 20 76 65 72 79 20 76 |uction i|s very v|
|00003b60| 61 67 75 65 2e 20 20 49 | 74 20 73 68 6f 75 6c 64 |ague. I|t should|
|00003b70| 0a 25 25 25 20 70 72 6f | 62 61 62 6c 79 20 62 65 |.%%% pro|bably be|
|00003b80| 20 66 6f 72 6d 61 6c 69 | 7a 65 64 2c 20 62 75 74 | formali|zed, but|
|00003b90| 20 74 68 61 74 20 69 73 | 20 6e 6f 74 20 65 61 73 | that is| not eas|
|00003ba0| 79 2e 2e 2e 0a 0a 49 64 | 65 6e 74 69 66 69 65 72 |y.....Id|entifier|
|00003bb0| 73 20 74 68 61 74 20 61 | 70 70 65 61 72 20 69 6e |s that a|ppear in|
|00003bc0| 20 74 68 65 20 74 65 6d | 70 6c 61 74 65 20 62 75 | the tem|plate bu|
|00003bd0| 74 20 61 72 65 20 6e 6f | 74 20 70 61 74 74 65 72 |t are no|t patter|
|00003be0| 6e 20 76 61 72 69 61 62 | 6c 65 73 0a 6f 72 20 74 |n variab|les.or t|
|00003bf0| 68 65 20 69 64 65 6e 74 | 69 66 69 65 72 0a 7b 5c |he ident|ifier.{\|
|00003c00| 63 66 20 2e 2e 2e 7d 20 | 61 72 65 20 69 6e 73 65 |cf ...} |are inse|
|00003c10| 72 74 65 64 20 69 6e 74 | 6f 20 74 68 65 20 6f 75 |rted int|o the ou|
|00003c20| 74 70 75 74 20 61 73 20 | 6c 69 74 65 72 61 6c 20 |tput as |literal |
|00003c30| 69 64 65 6e 74 69 66 69 | 65 72 73 2e 20 20 49 66 |identifi|ers. If|
|00003c40| 20 61 0a 6c 69 74 65 72 | 61 6c 20 69 64 65 6e 74 | a.liter|al ident|
|00003c50| 69 66 69 65 72 20 69 73 | 20 69 6e 73 65 72 74 65 |ifier is| inserte|
|00003c60| 64 20 61 73 20 61 20 66 | 72 65 65 20 69 64 65 6e |d as a f|ree iden|
|00003c70| 74 69 66 69 65 72 20 74 | 68 65 6e 20 69 74 20 72 |tifier t|hen it r|
|00003c80| 65 66 65 72 73 20 74 6f | 20 74 68 65 0a 62 69 6e |efers to| the.bin|
|00003c90| 64 69 6e 67 20 6f 66 20 | 74 68 61 74 20 69 64 65 |ding of |that ide|
|00003ca0| 6e 74 69 66 69 65 72 20 | 77 69 74 68 69 6e 20 77 |ntifier |within w|
|00003cb0| 68 6f 73 65 20 73 63 6f | 70 65 20 74 68 65 20 69 |hose sco|pe the i|
|00003cc0| 6e 73 74 61 6e 63 65 20 | 6f 66 0a 7b 5c 63 66 20 |nstance |of.{\cf |
|00003cd0| 73 79 6e 74 61 78 2d 72 | 75 6c 65 73 7d 20 61 70 |syntax-r|ules} ap|
|00003ce0| 70 65 61 72 73 2e 0a 49 | 66 20 61 20 6c 69 74 65 |pears..I|f a lite|
|00003cf0| 72 61 6c 20 69 64 65 6e | 74 69 66 69 65 72 20 69 |ral iden|tifier i|
|00003d00| 73 20 69 6e 73 65 72 74 | 65 64 20 61 73 20 61 20 |s insert|ed as a |
|00003d10| 62 6f 75 6e 64 20 69 64 | 65 6e 74 69 66 69 65 72 |bound id|entifier|
|00003d20| 20 74 68 65 6e 20 69 74 | 20 69 73 0a 69 6e 20 65 | then it| is.in e|
|00003d30| 66 66 65 63 74 20 72 65 | 6e 61 6d 65 64 20 74 6f |ffect re|named to|
|00003d40| 20 70 72 65 76 65 6e 74 | 20 69 6e 61 64 76 65 72 | prevent| inadver|
|00003d50| 74 65 6e 74 20 63 61 70 | 74 75 72 65 73 20 6f 66 |tent cap|tures of|
|00003d60| 20 66 72 65 65 20 69 64 | 65 6e 74 69 66 69 65 72 | free id|entifier|
|00003d70| 73 2e 0a 0a 5c 62 65 67 | 69 6e 7b 73 63 68 65 6d |s...\beg|in{schem|
|00003d80| 65 7d 0a 28 64 65 66 69 | 6e 65 2d 73 79 6e 74 61 |e}.(defi|ne-synta|
|00003d90| 78 20 6c 65 74 0a 20 20 | 28 73 79 6e 74 61 78 2d |x let. |(syntax-|
|00003da0| 72 75 6c 65 73 20 28 29 | 0a 20 20 20 20 28 28 6c |rules ()|. ((l|
|00003db0| 65 74 20 28 28 6e 61 6d | 65 20 76 61 6c 29 20 2e |et ((nam|e val) .|
|00003dc0| 2e 2e 29 20 62 6f 64 79 | 31 20 62 6f 64 79 32 20 |..) body|1 body2 |
|00003dd0| 2e 2e 2e 29 0a 20 20 20 | 20 20 28 28 6c 61 6d 62 |...). | ((lamb|
|00003de0| 64 61 20 28 6e 61 6d 65 | 20 2e 2e 2e 29 20 62 6f |da (name| ...) bo|
|00003df0| 64 79 31 20 62 6f 64 79 | 32 20 2e 2e 2e 29 0a 20 |dy1 body|2 ...). |
|00003e00| 20 20 20 20 20 76 61 6c | 20 2e 2e 2e 29 29 0a 20 | val| ...)). |
|00003e10| 20 20 20 28 28 6c 65 74 | 20 74 61 67 20 28 28 6e | ((let| tag ((n|
|00003e20| 61 6d 65 20 76 61 6c 29 | 20 2e 2e 2e 29 20 62 6f |ame val)| ...) bo|
|00003e30| 64 79 31 20 62 6f 64 79 | 32 20 2e 2e 2e 29 0a 20 |dy1 body|2 ...). |
|00003e40| 20 20 20 20 28 28 6c 65 | 74 72 65 63 20 28 28 74 | ((le|trec ((t|
|00003e50| 61 67 20 28 6c 61 6d 62 | 64 61 20 28 6e 61 6d 65 |ag (lamb|da (name|
|00003e60| 20 2e 2e 2e 29 0a 20 20 | 20 20 20 20 20 20 20 20 | ...). | |
|00003e70| 20 20 20 20 20 20 20 20 | 20 20 20 20 62 6f 64 79 | | body|
|00003e80| 31 20 62 6f 64 79 32 20 | 2e 2e 2e 29 29 29 0a 20 |1 body2 |...))). |
|00003e90| 20 20 20 20 20 20 20 74 | 61 67 29 0a 20 20 20 20 | t|ag). |
|00003ea0| 20 20 76 61 6c 20 2e 2e | 2e 29 29 29 29 0a 0a 28 | val ..|.))))..(|
|00003eb0| 64 65 66 69 6e 65 2d 73 | 79 6e 74 61 78 20 63 6f |define-s|yntax co|
|00003ec0| 6e 64 0a 20 20 28 73 79 | 6e 74 61 78 2d 72 75 6c |nd. (sy|ntax-rul|
|00003ed0| 65 73 20 28 65 6c 73 65 | 20 3d 3e 29 0a 20 20 20 |es (else| =>). |
|00003ee0| 20 28 28 63 6f 6e 64 20 | 28 65 6c 73 65 20 72 65 | ((cond |(else re|
|00003ef0| 73 75 6c 74 31 20 72 65 | 73 75 6c 74 32 20 2e 2e |sult1 re|sult2 ..|
|00003f00| 2e 29 29 0a 20 20 20 20 | 20 28 62 65 67 69 6e 20 |.)). | (begin |
|00003f10| 72 65 73 75 6c 74 31 20 | 72 65 73 75 6c 74 32 20 |result1 |result2 |
|00003f20| 2e 2e 2e 29 29 0a 20 20 | 20 20 28 28 63 6f 6e 64 |...)). | ((cond|
|00003f30| 20 28 74 65 73 74 20 3d | 3e 20 72 65 73 75 6c 74 | (test =|> result|
|00003f40| 29 29 0a 20 20 20 20 20 | 28 6c 65 74 20 28 28 74 |)). |(let ((t|
|00003f50| 65 6d 70 20 74 65 73 74 | 29 29 0a 20 20 20 20 20 |emp test|)). |
|00003f60| 20 20 28 69 66 20 74 65 | 6d 70 20 28 72 65 73 75 | (if te|mp (resu|
|00003f70| 6c 74 20 74 65 6d 70 29 | 29 29 29 0a 20 20 20 20 |lt temp)|))). |
|00003f80| 28 28 63 6f 6e 64 20 28 | 74 65 73 74 20 3d 3e 20 |((cond (|test => |
|00003f90| 72 65 73 75 6c 74 29 20 | 63 6c 61 75 73 65 31 20 |result) |clause1 |
|00003fa0| 63 6c 61 75 73 65 32 20 | 2e 2e 2e 29 0a 20 20 20 |clause2 |...). |
|00003fb0| 20 20 28 6c 65 74 20 28 | 28 74 65 6d 70 20 74 65 | (let (|(temp te|
|00003fc0| 73 74 29 29 0a 20 20 20 | 20 20 20 20 28 69 66 20 |st)). | (if |
|00003fd0| 74 65 6d 70 0a 20 20 20 | 20 20 20 20 20 20 20 20 |temp. | |
|00003fe0| 28 72 65 73 75 6c 74 20 | 74 65 6d 70 29 0a 20 20 |(result |temp). |
|00003ff0| 20 20 20 20 20 20 20 20 | 20 28 63 6f 6e 64 20 63 | | (cond c|
|00004000| 6c 61 75 73 65 31 20 63 | 6c 61 75 73 65 32 20 2e |lause1 c|lause2 .|
|00004010| 2e 2e 29 29 29 29 0a 20 | 20 20 20 28 28 63 6f 6e |..)))). | ((con|
|00004020| 64 20 28 74 65 73 74 29 | 29 20 74 65 73 74 29 0a |d (test)|) test).|
|00004030| 20 20 20 20 28 28 63 6f | 6e 64 20 28 74 65 73 74 | ((co|nd (test|
|00004040| 29 20 63 6c 61 75 73 65 | 31 20 63 6c 61 75 73 65 |) clause|1 clause|
|00004050| 32 20 2e 2e 2e 29 0a 20 | 20 20 20 20 28 6f 72 20 |2 ...). | (or |
|00004060| 74 65 73 74 20 28 63 6f | 6e 64 20 63 6c 61 75 73 |test (co|nd claus|
|00004070| 65 31 20 63 6c 61 75 73 | 65 32 20 2e 2e 2e 29 29 |e1 claus|e2 ...))|
|00004080| 29 0a 20 20 20 20 28 28 | 63 6f 6e 64 20 28 74 65 |). ((|cond (te|
|00004090| 73 74 20 72 65 73 75 6c | 74 31 20 72 65 73 75 6c |st resul|t1 resul|
|000040a0| 74 32 20 2e 2e 2e 29 29 | 0a 20 20 20 20 20 28 69 |t2 ...))|. (i|
|000040b0| 66 20 74 65 73 74 20 28 | 62 65 67 69 6e 20 72 65 |f test (|begin re|
|000040c0| 73 75 6c 74 31 20 72 65 | 73 75 6c 74 32 20 2e 2e |sult1 re|sult2 ..|
|000040d0| 2e 29 29 29 0a 20 20 20 | 20 28 28 63 6f 6e 64 20 |.))). | ((cond |
|000040e0| 28 74 65 73 74 20 72 65 | 73 75 6c 74 31 20 72 65 |(test re|sult1 re|
|000040f0| 73 75 6c 74 32 20 2e 2e | 2e 29 0a 20 20 20 20 20 |sult2 ..|.). |
|00004100| 20 20 20 20 20 20 63 6c | 61 75 73 65 31 20 63 6c | cl|ause1 cl|
|00004110| 61 75 73 65 32 20 2e 2e | 2e 29 0a 20 20 20 20 20 |ause2 ..|.). |
|00004120| 28 69 66 20 74 65 73 74 | 0a 20 20 20 20 20 20 20 |(if test|. |
|00004130| 20 20 28 62 65 67 69 6e | 20 72 65 73 75 6c 74 31 | (begin| result1|
|00004140| 20 72 65 73 75 6c 74 32 | 20 2e 2e 2e 29 0a 20 20 | result2| ...). |
|00004150| 20 20 20 20 20 20 20 28 | 63 6f 6e 64 20 63 6c 61 | (|cond cla|
|00004160| 75 73 65 31 20 63 6c 61 | 75 73 65 32 20 2e 2e 2e |use1 cla|use2 ...|
|00004170| 29 29 29 29 29 0a 0a 28 | 6c 65 74 20 28 28 3d 3e |)))))..(|let ((=>|
|00004180| 20 5c 73 63 68 66 61 6c | 73 65 29 29 0a 20 20 28 | \schfal|se)). (|
|00004190| 63 6f 6e 64 20 28 5c 73 | 63 68 74 72 75 65 20 3d |cond (\s|chtrue =|
|000041a0| 3e 20 27 6f 6b 29 29 29 | 20 20 20 20 20 20 20 20 |> 'ok)))| |
|000041b0| 20 20 20 5c 65 76 20 6f | 6b 25 0a 5c 65 6e 64 7b | \ev o|k%.\end{|
|000041c0| 73 63 68 65 6d 65 7d 0a | 0a 54 68 65 20 6c 61 73 |scheme}.|.The las|
|000041d0| 74 20 65 78 61 6d 70 6c | 65 20 69 73 20 6e 6f 74 |t exampl|e is not|
|000041e0| 20 61 6e 20 65 72 72 6f | 72 20 62 65 63 61 75 73 | an erro|r becaus|
|000041f0| 65 20 74 68 65 20 6c 6f | 63 61 6c 20 76 61 72 69 |e the lo|cal vari|
|00004200| 61 62 6c 65 20 7b 5c 63 | 66 20 3d 3e 7d 0a 69 73 |able {\c|f =>}.is|
|00004210| 20 72 65 6e 61 6d 65 64 | 20 69 6e 20 65 66 66 65 | renamed| in effe|
|00004220| 63 74 2c 20 73 6f 20 74 | 68 61 74 20 69 74 73 20 |ct, so t|hat its |
|00004230| 75 73 65 20 69 73 20 64 | 69 73 74 69 6e 63 74 20 |use is d|istinct |
|00004240| 66 72 6f 6d 20 75 73 65 | 73 20 6f 66 20 74 68 65 |from use|s of the|
|00004250| 20 74 6f 70 0a 6c 65 76 | 65 6c 20 69 64 65 6e 74 | top.lev|el ident|
|00004260| 69 66 69 65 72 20 7b 5c | 63 66 20 3d 3e 7d 20 74 |ifier {\|cf =>} t|
|00004270| 68 61 74 20 74 68 65 20 | 74 72 61 6e 73 66 6f 72 |hat the |transfor|
|00004280| 6d 65 72 20 66 6f 72 20 | 7b 5c 63 66 20 63 6f 6e |mer for |{\cf con|
|00004290| 64 7d 20 6c 6f 6f 6b 73 | 0a 66 6f 72 2e 20 20 54 |d} looks|.for. T|
|000042a0| 68 75 73 2c 20 72 61 74 | 68 65 72 20 74 68 61 6e |hus, rat|her than|
|000042b0| 20 65 78 70 61 6e 64 69 | 6e 67 20 69 6e 74 6f 0a | expandi|ng into.|
|000042c0| 0a 5c 62 65 67 69 6e 7b | 73 63 68 65 6d 65 7d 0a |.\begin{|scheme}.|
|000042d0| 28 6c 65 74 20 28 28 3d | 3e 20 5c 73 63 68 66 61 |(let ((=|> \schfa|
|000042e0| 6c 73 65 29 29 0a 20 20 | 28 6c 65 74 20 28 28 74 |lse)). |(let ((t|
|000042f0| 65 6d 70 20 5c 73 63 68 | 74 72 75 65 29 29 0a 20 |emp \sch|true)). |
|00004300| 20 20 20 28 69 66 20 74 | 65 6d 70 20 28 27 6f 6b | (if t|emp ('ok|
|00004310| 20 74 65 6d 70 29 29 29 | 29 25 0a 5c 65 6e 64 7b | temp)))|)%.\end{|
|00004320| 73 63 68 65 6d 65 7d 0a | 0a 77 68 69 63 68 20 77 |scheme}.|.which w|
|00004330| 6f 75 6c 64 20 72 65 73 | 75 6c 74 20 69 6e 20 61 |ould res|ult in a|
|00004340| 6e 20 69 6e 76 61 6c 69 | 64 20 70 72 6f 63 65 64 |n invali|d proced|
|00004350| 75 72 65 20 63 61 6c 6c | 2c 20 69 74 20 65 78 70 |ure call|, it exp|
|00004360| 61 6e 64 73 20 69 6e 73 | 74 65 61 64 0a 69 6e 74 |ands ins|tead.int|
|00004370| 6f 0a 0a 5c 62 65 67 69 | 6e 7b 73 63 68 65 6d 65 |o..\begi|n{scheme|
|00004380| 7d 0a 28 6c 65 74 20 28 | 28 3d 3e 20 5c 73 63 68 |}.(let (|(=> \sch|
|00004390| 66 61 6c 73 65 29 29 0a | 20 20 28 69 66 20 5c 73 |false)).| (if \s|
|000043a0| 63 68 74 72 75 65 20 28 | 62 65 67 69 6e 20 3d 3e |chtrue (|begin =>|
|000043b0| 20 27 6f 6b 29 29 29 25 | 0a 5c 65 6e 64 7b 73 63 | 'ok)))%|.\end{sc|
|000043c0| 68 65 6d 65 7d 0a 0a 5c | 65 6e 64 7b 65 6e 74 72 |heme}..\|end{entr|
|000043d0| 79 7d 0a 0a 5c 73 75 62 | 73 65 63 74 69 6f 6e 2a |y}..\sub|section*|
|000043e0| 7b 41 20 63 6f 6d 70 61 | 74 69 62 6c 65 20 6c 6f |{A compa|tible lo|
|000043f0| 77 2d 6c 65 76 65 6c 20 | 6d 61 63 72 6f 20 66 61 |w-level |macro fa|
|00004400| 63 69 6c 69 74 79 7d 0a | 5c 6c 61 62 65 6c 7b 6c |cility}.|\label{l|
|00004410| 6f 77 6c 65 76 65 6c 6d | 61 63 72 6f 73 7d 0a 0a |owlevelm|acros}..|
|00004420| 41 6c 74 68 6f 75 67 68 | 20 74 68 65 20 70 61 74 |Although| the pat|
|00004430| 74 65 72 6e 20 6c 61 6e | 67 75 61 67 65 20 70 72 |tern lan|guage pr|
|00004440| 6f 76 69 64 65 64 20 62 | 79 20 7b 5c 63 66 20 73 |ovided b|y {\cf s|
|00004450| 79 6e 74 61 78 2d 72 75 | 6c 65 73 7d 20 69 73 20 |yntax-ru|les} is |
|00004460| 74 68 65 0a 70 72 65 66 | 65 72 72 65 64 20 77 61 |the.pref|erred wa|
|00004470| 79 20 74 6f 20 73 70 65 | 63 69 66 79 20 6d 61 63 |y to spe|cify mac|
|00004480| 72 6f 20 74 72 61 6e 73 | 66 6f 72 6d 65 72 73 2c |ro trans|formers,|
|00004490| 20 6f 74 68 65 72 20 6c | 6f 77 2d 6c 65 76 65 6c | other l|ow-level|
|000044a0| 0a 66 61 63 69 6c 69 74 | 69 65 73 20 6d 61 79 20 |.facilit|ies may |
|000044b0| 62 65 20 70 72 6f 76 69 | 64 65 64 20 74 6f 20 73 |be provi|ded to s|
|000044c0| 70 65 63 69 66 79 20 6d | 6f 72 65 20 63 6f 6d 70 |pecify m|ore comp|
|000044d0| 6c 65 78 20 6d 61 63 72 | 6f 20 74 72 61 6e 73 66 |lex macr|o transf|
|000044e0| 6f 72 6d 65 72 73 2e 0a | 49 6e 20 66 61 63 74 2c |ormers..|In fact,|
|000044f0| 20 7b 5c 63 66 20 73 79 | 6e 74 61 78 2d 72 75 6c | {\cf sy|ntax-rul|
|00004500| 65 73 7d 20 63 61 6e 20 | 69 74 73 65 6c 66 20 62 |es} can |itself b|
|00004510| 65 20 64 65 66 69 6e 65 | 64 20 61 73 20 61 20 6d |e define|d as a m|
|00004520| 61 63 72 6f 20 75 73 69 | 6e 67 20 74 68 65 0a 6c |acro usi|ng the.l|
|00004530| 6f 77 2d 6c 65 76 65 6c | 20 66 61 63 69 6c 69 74 |ow-level| facilit|
|00004540| 69 65 73 20 64 65 73 63 | 72 69 62 65 64 20 69 6e |ies desc|ribed in|
|00004550| 20 74 68 69 73 20 73 65 | 63 74 69 6f 6e 2e 0a 0a | this se|ction...|
|00004560| 54 68 65 20 6c 6f 77 2d | 6c 65 76 65 6c 20 6d 61 |The low-|level ma|
|00004570| 63 72 6f 20 66 61 63 69 | 6c 69 74 79 20 64 65 73 |cro faci|lity des|
|00004580| 63 72 69 62 65 64 20 68 | 65 72 65 20 69 6e 74 72 |cribed h|ere intr|
|00004590| 6f 64 75 63 65 73 20 7b | 5c 63 66 20 73 79 6e 74 |oduces {|\cf synt|
|000045a0| 61 78 7d 0a 61 73 20 61 | 20 6e 65 77 20 73 79 6e |ax}.as a| new syn|
|000045b0| 74 61 63 74 69 63 20 6b | 65 79 77 6f 72 64 20 61 |tactic k|eyword a|
|000045c0| 6e 61 6c 6f 67 6f 75 73 | 20 74 6f 20 7b 5c 63 66 |nalogous| to {\cf|
|000045d0| 20 71 75 6f 74 65 7d 2c | 20 61 6e 64 20 61 6c 6c | quote},| and all|
|000045e0| 6f 77 73 20 61 0a 5c 6d | 65 74 61 7b 74 72 61 6e |ows a.\m|eta{tran|
|000045f0| 73 66 6f 72 6d 65 72 20 | 73 70 65 63 7d 20 74 6f |sformer |spec} to|
|00004600| 20 62 65 20 61 6e 79 20 | 65 78 70 72 65 73 73 69 | be any |expressi|
|00004610| 6f 6e 2e 20 20 54 68 69 | 73 20 69 73 20 61 63 63 |on. Thi|s is acc|
|00004620| 6f 6d 70 6c 69 73 68 65 | 64 20 62 79 0a 61 64 64 |omplishe|d by.add|
|00004630| 69 6e 67 20 74 68 65 20 | 66 6f 6c 6c 6f 77 69 6e |ing the |followin|
|00004640| 67 20 74 77 6f 20 70 72 | 6f 64 75 63 74 69 6f 6e |g two pr|oduction|
|00004650| 73 20 74 6f 20 74 68 65 | 20 70 72 6f 64 75 63 74 |s to the| product|
|00004660| 69 6f 6e 73 20 69 6e 0a | 73 65 63 74 69 6f 6e 7e |ions in.|section~|
|00004670| 5c 72 65 66 7b 42 4e 46 | 7d 20 61 6e 64 20 69 6e |\ref{BNF|} and in|
|00004680| 20 73 65 63 74 69 6f 6e | 7e 5c 72 65 66 7b 62 69 | section|~\ref{bi|
|00004690| 6e 64 73 79 6e 74 61 78 | 7d 20 61 62 6f 76 65 2e |ndsyntax|} above.|
|000046a0| 0a 0a 5c 62 65 67 69 6e | 7b 67 72 61 6d 6d 61 72 |..\begin|{grammar|
|000046b0| 7d 25 0a 5c 6d 65 74 61 | 7b 65 78 70 72 65 73 73 |}%.\meta|{express|
|000046c0| 69 6f 6e 7d 20 5c 3a 20 | 28 73 79 6e 74 61 78 20 |ion} \: |(syntax |
|000046d0| 5c 68 79 70 65 72 7b 64 | 61 74 75 6d 7d 29 0a 5c |\hyper{d|atum}).\|
|000046e0| 6d 65 74 61 7b 74 72 61 | 6e 73 66 6f 72 6d 65 72 |meta{tra|nsformer|
|000046f0| 20 73 70 65 63 7d 20 5c | 3a 20 5c 6d 65 74 61 7b | spec} \|: \meta{|
|00004700| 65 78 70 72 65 73 73 69 | 6f 6e 7d 25 0a 5c 65 6e |expressi|on}%.\en|
|00004710| 64 7b 67 72 61 6d 6d 61 | 72 7d 0a 0a 54 68 65 20 |d{gramma|r}..The |
|00004720| 6c 6f 77 2d 6c 65 76 65 | 6c 20 6d 61 63 72 6f 20 |low-leve|l macro |
|00004730| 73 79 73 74 65 6d 20 61 | 6c 73 6f 20 61 64 64 73 |system a|lso adds|
|00004740| 20 74 68 65 20 66 6f 6c | 6c 6f 77 69 6e 67 20 70 | the fol|lowing p|
|00004750| 72 6f 63 65 64 75 72 65 | 73 3a 0a 0a 5c 62 65 67 |rocedure|s:..\beg|
|00004760| 69 6e 7b 73 63 68 65 6d | 65 7d 0a 75 6e 77 72 61 |in{schem|e}.unwra|
|00004770| 70 2d 73 79 6e 74 61 78 | 20 20 20 20 20 20 20 20 |p-syntax| |
|00004780| 20 20 69 64 65 6e 74 69 | 66 69 65 72 2d 3e 73 79 | identi|fier->sy|
|00004790| 6d 62 6f 6c 0a 69 64 65 | 6e 74 69 66 69 65 72 3f |mbol.ide|ntifier?|
|000047a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 67 65 6e 65 | | gene|
|000047b0| 72 61 74 65 2d 69 64 65 | 6e 74 69 66 69 65 72 0a |rate-ide|ntifier.|
|000047c0| 66 72 65 65 2d 69 64 65 | 6e 74 69 66 69 65 72 3d |free-ide|ntifier=|
|000047d0| 3f 20 20 20 20 20 20 63 | 6f 6e 73 74 72 75 63 74 |? c|onstruct|
|000047e0| 2d 69 64 65 6e 74 69 66 | 69 65 72 0a 62 6f 75 6e |-identif|ier.boun|
|000047f0| 64 2d 69 64 65 6e 74 69 | 66 69 65 72 3d 3f 0a 5c |d-identi|fier=?.\|
|00004800| 65 6e 64 7b 73 63 68 65 | 6d 65 7d 0a 0a 45 76 61 |end{sche|me}..Eva|
|00004810| 6c 75 61 74 69 6f 6e 20 | 6f 66 20 61 20 70 72 6f |luation |of a pro|
|00004820| 67 72 61 6d 20 70 72 6f | 63 65 65 64 73 20 69 6e |gram pro|ceeds in|
|00004830| 20 74 77 6f 20 6c 6f 67 | 69 63 61 6c 20 73 74 65 | two log|ical ste|
|00004840| 70 73 2e 20 20 46 69 72 | 73 74 20 74 68 65 0a 70 |ps. Fir|st the.p|
|00004850| 72 6f 67 72 61 6d 20 69 | 73 20 63 6f 6e 76 65 72 |rogram i|s conver|
|00004860| 74 65 64 20 69 6e 74 6f | 20 61 6e 20 69 6e 74 65 |ted into| an inte|
|00004870| 72 6d 65 64 69 61 74 65 | 20 6c 61 6e 67 75 61 67 |rmediate| languag|
|00004880| 65 20 76 69 61 20 6d 61 | 63 72 6f 2d 65 78 70 61 |e via ma|cro-expa|
|00004890| 6e 73 69 6f 6e 2c 0a 61 | 6e 64 20 74 68 65 6e 20 |nsion,.a|nd then |
|000048a0| 74 68 65 20 72 65 73 75 | 6c 74 20 6f 66 20 6d 61 |the resu|lt of ma|
|000048b0| 63 72 6f 20 65 78 70 61 | 6e 73 69 6f 6e 20 69 73 |cro expa|nsion is|
|000048c0| 20 65 76 61 6c 75 61 74 | 65 64 2e 20 20 57 68 65 | evaluat|ed. Whe|
|000048d0| 6e 20 69 74 20 69 73 0a | 6e 65 63 65 73 73 61 72 |n it is.|necessar|
|000048e0| 79 20 74 6f 20 64 69 73 | 74 69 6e 67 75 69 73 68 |y to dis|tinguish|
|000048f0| 20 74 68 65 20 73 65 63 | 6f 6e 64 20 73 74 61 67 | the sec|ond stag|
|00004900| 65 20 6f 66 20 74 68 69 | 73 20 70 72 6f 63 65 73 |e of thi|s proces|
|00004910| 73 20 66 72 6f 6d 20 74 | 68 65 0a 66 75 6c 6c 20 |s from t|he.full |
|00004920| 65 76 61 6c 75 61 74 69 | 6f 6e 20 70 72 6f 63 65 |evaluati|on proce|
|00004930| 73 73 2c 20 69 74 20 69 | 73 20 72 65 66 65 72 72 |ss, it i|s referr|
|00004940| 65 64 20 74 6f 20 61 73 | 20 60 60 65 78 65 63 75 |ed to as| ``execu|
|00004950| 74 69 6f 6e 2e 27 27 0a | 0a 53 79 6e 74 61 78 20 |tion.''.|.Syntax |
|00004960| 64 65 66 69 6e 69 74 69 | 6f 6e 73 2c 20 65 69 74 |definiti|ons, eit|
|00004970| 68 65 72 20 6c 65 78 69 | 63 61 6c 20 6f 72 20 67 |her lexi|cal or g|
|00004980| 6c 6f 62 61 6c 2c 20 63 | 61 75 73 65 20 61 6e 20 |lobal, c|ause an |
|00004990| 69 64 65 6e 74 69 66 69 | 65 72 20 74 6f 0a 62 65 |identifi|er to.be|
|000049a0| 20 74 72 65 61 74 65 64 | 20 61 73 20 61 20 6b 65 | treated| as a ke|
|000049b0| 79 77 6f 72 64 20 77 69 | 74 68 69 6e 20 74 68 65 |yword wi|thin the|
|000049c0| 20 73 63 6f 70 65 20 6f | 66 20 74 68 65 20 62 69 | scope o|f the bi|
|000049d0| 6e 64 69 6e 67 2e 20 20 | 54 68 65 20 6b 65 79 77 |nding. |The keyw|
|000049e0| 6f 72 64 0a 69 73 20 61 | 73 73 6f 63 69 61 74 65 |ord.is a|ssociate|
|000049f0| 64 20 77 69 74 68 20 61 | 20 74 72 61 6e 73 66 6f |d with a| transfo|
|00004a00| 72 6d 65 72 2c 20 77 68 | 69 63 68 20 6d 61 79 20 |rmer, wh|ich may |
|00004a10| 62 65 20 63 72 65 61 74 | 65 64 20 69 6d 70 6c 69 |be creat|ed impli|
|00004a20| 63 69 74 6c 79 0a 75 73 | 69 6e 67 20 74 68 65 20 |citly.us|ing the |
|00004a30| 70 61 74 74 65 72 6e 20 | 6c 61 6e 67 75 61 67 65 |pattern |language|
|00004a40| 20 6f 66 20 7b 5c 63 66 | 20 73 79 6e 74 61 78 2d | of {\cf| syntax-|
|00004a50| 72 75 6c 65 73 7d 20 6f | 72 20 65 78 70 6c 69 63 |rules} o|r explic|
|00004a60| 69 74 6c 79 20 75 73 69 | 6e 67 0a 74 68 65 20 6c |itly usi|ng.the l|
|00004a70| 6f 77 2d 6c 65 76 65 6c | 20 66 61 63 69 6c 69 74 |ow-level| facilit|
|00004a80| 69 65 73 20 64 65 73 63 | 72 69 62 65 64 20 62 65 |ies desc|ribed be|
|00004a90| 6c 6f 77 2e 0a 0a 53 69 | 6e 63 65 20 61 20 74 72 |low...Si|nce a tr|
|00004aa0| 61 6e 73 66 6f 72 6d 65 | 72 20 73 70 65 63 20 6d |ansforme|r spec m|
|00004ab0| 75 73 74 20 62 65 20 66 | 75 6c 6c 79 20 65 76 61 |ust be f|ully eva|
|00004ac0| 6c 75 61 74 65 64 20 64 | 75 72 69 6e 67 20 74 68 |luated d|uring th|
|00004ad0| 65 0a 63 6f 75 72 73 65 | 20 6f 66 20 65 78 70 61 |e.course| of expa|
|00004ae0| 6e 73 69 6f 6e 2c 20 69 | 74 20 69 73 20 6e 65 63 |nsion, i|t is nec|
|00004af0| 65 73 73 61 72 79 20 74 | 6f 20 73 70 65 63 69 66 |essary t|o specif|
|00004b00| 79 20 74 68 65 20 65 6e | 76 69 72 6f 6e 6d 65 6e |y the en|vironmen|
|00004b10| 74 20 69 6e 0a 77 68 69 | 63 68 20 74 68 69 73 20 |t in.whi|ch this |
|00004b20| 65 76 61 6c 75 61 74 69 | 6f 6e 20 74 61 6b 65 73 |evaluati|on takes|
|00004b30| 20 70 6c 61 63 65 2e 20 | 20 41 20 74 72 61 6e 73 | place. | A trans|
|00004b40| 66 6f 72 6d 65 72 20 73 | 70 65 63 20 69 73 0a 65 |former s|pec is.e|
|00004b50| 78 70 61 6e 64 65 64 20 | 69 6e 20 74 68 65 20 73 |xpanded |in the s|
|00004b60| 61 6d 65 20 65 6e 76 69 | 72 6f 6e 6d 65 6e 74 20 |ame envi|ronment |
|00004b70| 61 73 20 74 68 61 74 20 | 69 6e 20 77 68 69 63 68 |as that |in which|
|00004b80| 20 74 68 65 20 70 72 6f | 67 72 61 6d 20 69 73 20 | the pro|gram is |
|00004b90| 62 65 69 6e 67 0a 65 78 | 70 61 6e 64 65 64 2c 20 |being.ex|panded, |
|00004ba0| 62 75 74 20 69 73 20 65 | 78 65 63 75 74 65 64 20 |but is e|xecuted |
|00004bb0| 69 6e 20 61 6e 20 65 6e | 76 69 72 6f 6e 6d 65 6e |in an en|vironmen|
|00004bc0| 74 20 74 68 61 74 20 69 | 73 20 64 69 73 74 69 6e |t that i|s distin|
|00004bd0| 63 74 20 66 72 6f 6d 20 | 74 68 65 0a 65 6e 76 69 |ct from |the.envi|
|00004be0| 72 6f 6e 6d 65 6e 74 20 | 69 6e 20 77 68 69 63 68 |ronment |in which|
|00004bf0| 20 74 68 65 20 70 72 6f | 67 72 61 6d 20 69 73 20 | the pro|gram is |
|00004c00| 65 78 65 63 75 74 65 64 | 2e 20 20 54 68 69 73 20 |executed|. This |
|00004c10| 65 78 65 63 75 74 69 6f | 6e 0a 65 6e 76 69 72 6f |executio|n.enviro|
|00004c20| 6e 6d 65 6e 74 20 64 69 | 73 74 69 6e 63 74 69 6f |nment di|stinctio|
|00004c30| 6e 20 69 73 20 69 6d 70 | 6f 72 74 61 6e 74 20 6f |n is imp|ortant o|
|00004c40| 6e 6c 79 20 66 6f 72 20 | 74 68 65 20 72 65 73 6f |nly for |the reso|
|00004c50| 6c 75 74 69 6f 6e 20 6f | 66 20 67 6c 6f 62 61 6c |lution o|f global|
|00004c60| 0a 76 61 72 69 61 62 6c | 65 20 72 65 66 65 72 65 |.variabl|e refere|
|00004c70| 6e 63 65 73 20 61 6e 64 | 20 61 73 73 69 67 6e 6d |nces and| assignm|
|00004c80| 65 6e 74 73 2e 20 20 49 | 6e 20 77 68 61 74 20 66 |ents. I|n what f|
|00004c90| 6f 6c 6c 6f 77 73 2c 20 | 74 68 65 20 65 6e 76 69 |ollows, |the envi|
|00004ca0| 72 6f 6e 6d 65 6e 74 0a | 69 6e 20 77 68 69 63 68 |ronment.|in which|
|00004cb0| 20 74 72 61 6e 73 66 6f | 72 6d 65 72 73 20 61 72 | transfo|rmers ar|
|00004cc0| 65 20 65 78 65 63 75 74 | 65 64 20 69 73 20 63 61 |e execut|ed is ca|
|00004cd0| 6c 6c 65 64 20 74 68 65 | 20 73 74 61 6e 64 61 72 |lled the| standar|
|00004ce0| 64 20 74 72 61 6e 73 66 | 6f 72 6d 65 72 0a 65 6e |d transf|ormer.en|
|00004cf0| 76 69 72 6f 6e 6d 65 6e | 74 20 61 6e 64 20 69 73 |vironmen|t and is|
|00004d00| 20 61 73 73 75 6d 65 64 | 20 74 6f 20 62 65 20 61 | assumed| to be a|
|00004d10| 20 73 74 61 6e 64 61 72 | 64 20 53 63 68 65 6d 65 | standar|d Scheme|
|00004d20| 20 65 6e 76 69 72 6f 6e | 6d 65 6e 74 2e 0a 0a 53 | environ|ment...S|
|00004d30| 69 6e 63 65 20 70 61 72 | 74 20 6f 66 20 74 68 65 |ince par|t of the|
|00004d40| 20 74 61 73 6b 20 6f 66 | 20 68 79 67 69 65 6e 69 | task of| hygieni|
|00004d50| 63 20 6d 61 63 72 6f 20 | 65 78 70 61 6e 73 69 6f |c macro |expansio|
|00004d60| 6e 20 69 73 20 74 6f 20 | 72 65 73 6f 6c 76 65 0a |n is to |resolve.|
|00004d70| 69 64 65 6e 74 69 66 69 | 65 72 20 72 65 66 65 72 |identifi|er refer|
|00004d80| 65 6e 63 65 73 2c 20 74 | 68 65 20 66 61 63 74 20 |ences, t|he fact |
|00004d90| 74 68 61 74 20 74 72 61 | 6e 73 66 6f 72 6d 65 72 |that tra|nsformer|
|00004da0| 73 20 61 72 65 20 65 78 | 70 61 6e 64 65 64 20 69 |s are ex|panded i|
|00004db0| 6e 20 74 68 65 0a 73 61 | 6d 65 20 65 6e 76 69 72 |n the.sa|me envir|
|00004dc0| 6f 6e 6d 65 6e 74 20 61 | 73 20 74 68 65 20 70 72 |onment a|s the pr|
|00004dd0| 6f 67 72 61 6d 20 6d 65 | 61 6e 73 20 74 68 61 74 |ogram me|ans that|
|00004de0| 20 69 64 65 6e 74 69 66 | 69 65 72 20 62 69 6e 64 | identif|ier bind|
|00004df0| 69 6e 67 73 20 69 6e 20 | 74 68 65 0a 70 72 6f 67 |ings in |the.prog|
|00004e00| 72 61 6d 20 63 61 6e 20 | 73 68 61 64 6f 77 20 69 |ram can |shadow i|
|00004e10| 64 65 6e 74 69 66 69 65 | 72 20 75 73 65 73 20 77 |dentifie|r uses w|
|00004e20| 69 74 68 69 6e 20 74 72 | 61 6e 73 66 6f 72 6d 65 |ithin tr|ansforme|
|00004e30| 72 73 2e 20 20 53 69 6e | 63 65 0a 76 61 72 69 61 |rs. Sin|ce.varia|
|00004e40| 62 6c 65 20 62 69 6e 64 | 69 6e 67 73 20 69 6e 20 |ble bind|ings in |
|00004e50| 74 68 65 20 70 72 6f 67 | 72 61 6d 20 61 72 65 20 |the prog|ram are |
|00004e60| 6e 6f 74 20 61 76 61 69 | 6c 61 62 6c 65 20 61 74 |not avai|lable at|
|00004e70| 20 74 68 65 20 74 69 6d | 65 20 74 68 65 0a 74 72 | the tim|e the.tr|
|00004e80| 61 6e 73 66 6f 72 6d 65 | 72 20 69 73 20 65 78 65 |ansforme|r is exe|
|00004e90| 63 75 74 65 64 2c 20 69 | 74 20 69 73 20 61 6e 20 |cuted, i|t is an |
|00004ea0| 65 72 72 6f 72 20 66 6f | 72 20 61 20 74 72 61 6e |error fo|r a tran|
|00004eb0| 73 66 6f 72 6d 65 72 20 | 74 6f 20 72 65 66 65 72 |sformer |to refer|
|00004ec0| 65 6e 63 65 0a 6f 72 20 | 61 73 73 69 67 6e 20 74 |ence.or |assign t|
|00004ed0| 68 65 6d 2e 20 20 48 6f | 77 65 76 65 72 2c 20 73 |hem. Ho|wever, s|
|00004ee0| 69 6e 63 65 20 6b 65 79 | 77 6f 72 64 20 62 69 6e |ince key|word bin|
|00004ef0| 64 69 6e 67 73 20 61 72 | 65 20 61 76 61 69 6c 61 |dings ar|e availa|
|00004f00| 62 6c 65 20 64 75 72 69 | 6e 67 0a 65 78 70 61 6e |ble duri|ng.expan|
|00004f10| 73 69 6f 6e 2c 20 6c 65 | 78 69 63 61 6c 6c 79 20 |sion, le|xically |
|00004f20| 76 69 73 69 62 6c 65 20 | 6b 65 79 77 6f 72 64 20 |visible |keyword |
|00004f30| 62 69 6e 64 69 6e 67 73 | 20 66 72 6f 6d 20 74 68 |bindings| from th|
|00004f40| 65 20 70 72 6f 67 72 61 | 6d 20 6d 61 79 20 62 65 |e progra|m may be|
|00004f50| 0a 75 73 65 64 20 69 6e | 20 6d 61 63 72 6f 20 75 |.used in| macro u|
|00004f60| 73 65 73 20 69 6e 20 61 | 20 74 72 61 6e 73 66 6f |ses in a| transfo|
|00004f70| 72 6d 65 72 2e 0a 0a 57 | 68 65 6e 20 61 20 6d 61 |rmer...W|hen a ma|
|00004f80| 63 72 6f 20 75 73 65 20 | 69 73 20 65 6e 63 6f 75 |cro use |is encou|
|00004f90| 6e 74 65 72 65 64 2c 20 | 74 68 65 20 6d 61 63 72 |ntered, |the macr|
|00004fa0| 6f 20 74 72 61 6e 73 66 | 6f 72 6d 65 72 20 61 73 |o transf|ormer as|
|00004fb0| 73 6f 63 69 61 74 65 64 | 20 77 69 74 68 0a 74 68 |sociated| with.th|
|00004fc0| 65 20 6d 61 63 72 6f 20 | 6b 65 79 77 6f 72 64 20 |e macro |keyword |
|00004fd0| 69 73 20 61 70 70 6c 69 | 65 64 20 74 6f 20 61 20 |is appli|ed to a |
|00004fe0| 72 65 70 72 65 73 65 6e | 74 61 74 69 6f 6e 20 6f |represen|tation o|
|00004ff0| 66 20 74 68 65 20 6d 61 | 63 72 6f 0a 65 78 70 72 |f the ma|cro.expr|
|00005000| 65 73 73 69 6f 6e 2e 20 | 20 54 68 65 20 72 65 73 |ession. | The res|
|00005010| 75 6c 74 20 72 65 74 75 | 72 6e 65 64 20 62 79 20 |ult retu|rned by |
|00005020| 74 68 65 20 6d 61 63 72 | 6f 20 74 72 61 6e 73 66 |the macr|o transf|
|00005030| 6f 72 6d 65 72 20 72 65 | 70 6c 61 63 65 73 20 74 |ormer re|places t|
|00005040| 68 65 0a 6f 72 69 67 69 | 6e 61 6c 20 65 78 70 72 |he.origi|nal expr|
|00005050| 65 73 73 69 6f 6e 20 61 | 6e 64 20 69 73 20 65 78 |ession a|nd is ex|
|00005060| 70 61 6e 64 65 64 20 6f | 6e 63 65 20 61 67 61 69 |panded o|nce agai|
|00005070| 6e 2e 20 20 54 68 75 73 | 20 6d 61 63 72 6f 20 65 |n. Thus| macro e|
|00005080| 78 70 61 6e 73 69 6f 6e | 73 0a 6d 61 79 20 74 68 |xpansion|s.may th|
|00005090| 65 6d 73 65 6c 76 65 73 | 20 62 65 20 6f 72 20 63 |emselves| be or c|
|000050a0| 6f 6e 74 61 69 6e 20 6d | 61 63 72 6f 20 75 73 65 |ontain m|acro use|
|000050b0| 73 2e 0a 0a 54 68 65 20 | 73 79 6e 74 61 63 74 69 |s...The |syntacti|
|000050c0| 63 20 72 65 70 72 65 73 | 65 6e 74 61 74 69 6f 6e |c repres|entation|
|000050d0| 20 70 61 73 73 65 64 20 | 74 6f 20 61 20 6d 61 63 | passed |to a mac|
|000050e0| 72 6f 20 74 72 61 6e 73 | 66 6f 72 6d 65 72 0a 65 |ro trans|former.e|
|000050f0| 6e 63 61 70 73 75 6c 61 | 74 65 73 20 69 6e 66 6f |ncapsula|tes info|
|00005100| 72 6d 61 74 69 6f 6e 20 | 61 62 6f 75 74 20 74 68 |rmation |about th|
|00005110| 65 20 73 74 72 75 63 74 | 75 72 65 20 6f 66 20 74 |e struct|ure of t|
|00005120| 68 65 20 72 65 70 72 65 | 73 65 6e 74 65 64 20 66 |he repre|sented f|
|00005130| 6f 72 6d 0a 61 6e 64 20 | 74 68 65 20 62 69 6e 64 |orm.and |the bind|
|00005140| 69 6e 67 73 20 6f 66 20 | 74 68 65 20 69 64 65 6e |ings of |the iden|
|00005150| 74 69 66 69 65 72 73 20 | 69 74 20 63 6f 6e 74 61 |tifiers |it conta|
|00005160| 69 6e 73 2e 20 20 54 68 | 65 73 65 20 73 79 6e 74 |ins. Th|ese synt|
|00005170| 61 78 20 6f 62 6a 65 63 | 74 73 0a 63 61 6e 20 62 |ax objec|ts.can b|
|00005180| 65 20 74 72 61 76 65 72 | 73 65 64 20 61 6e 64 20 |e traver|sed and |
|00005190| 65 78 61 6d 69 6e 65 64 | 20 75 73 69 6e 67 20 74 |examined| using t|
|000051a0| 68 65 20 70 72 6f 63 65 | 64 75 72 65 73 20 64 65 |he proce|dures de|
|000051b0| 73 63 72 69 62 65 64 20 | 62 65 6c 6f 77 2e 0a 54 |scribed |below..T|
|000051c0| 68 65 20 6f 75 74 70 75 | 74 20 6f 66 20 61 20 74 |he outpu|t of a t|
|000051d0| 72 61 6e 73 66 6f 72 6d | 65 72 20 6d 61 79 20 62 |ransform|er may b|
|000051e0| 65 20 62 75 69 6c 74 20 | 75 70 20 75 73 69 6e 67 |e built |up using|
|000051f0| 20 74 68 65 20 75 73 75 | 61 6c 20 53 63 68 65 6d | the usu|al Schem|
|00005200| 65 0a 6c 69 73 74 20 63 | 6f 6e 73 74 72 75 63 74 |e.list c|onstruct|
|00005210| 6f 72 73 2c 20 63 6f 6d | 62 69 6e 69 6e 67 20 70 |ors, com|bining p|
|00005220| 69 65 63 65 73 20 6f 66 | 20 74 68 65 20 69 6e 70 |ieces of| the inp|
|00005230| 75 74 20 77 69 74 68 20 | 6e 65 77 20 73 79 6e 74 |ut with |new synt|
|00005240| 61 63 74 69 63 0a 73 74 | 72 75 63 74 75 72 65 73 |actic.st|ructures|
|00005250| 2e 0a 0a 5c 62 65 67 69 | 6e 7b 65 6e 74 72 79 7d |...\begi|n{entry}|
|00005260| 7b 25 0a 5c 70 72 6f 74 | 6f 7b 73 79 6e 74 61 78 |{%.\prot|o{syntax|
|00005270| 7d 7b 20 5c 68 79 70 65 | 72 7b 64 61 74 75 6d 7d |}{ \hype|r{datum}|
|00005280| 7d 7b 5c 65 78 70 72 74 | 79 70 65 7d 7d 0a 0a 5c |}{\exprt|ype}}..\|
|00005290| 73 79 6e 74 61 78 0a 54 | 68 65 20 5c 68 79 70 65 |syntax.T|he \hype|
|000052a0| 72 7b 64 61 74 75 6d 7d | 20 6d 61 79 20 62 65 20 |r{datum}| may be |
|000052b0| 61 6e 79 20 65 78 74 65 | 72 6e 61 6c 20 72 65 70 |any exte|rnal rep|
|000052c0| 72 65 73 65 6e 74 61 74 | 69 6f 6e 20 6f 66 20 61 |resentat|ion of a|
|000052d0| 20 53 63 68 65 6d 65 0a | 6f 62 6a 65 63 74 2e 0a | Scheme.|object..|
|000052e0| 0a 5c 73 65 6d 61 6e 74 | 69 63 73 0a 7b 5c 63 66 |.\semant|ics.{\cf|
|000052f0| 20 53 79 6e 74 61 78 7d | 20 69 73 20 74 68 65 20 | Syntax}| is the |
|00005300| 73 79 6e 74 61 63 74 69 | 63 20 61 6e 61 6c 6f 67 |syntacti|c analog|
|00005310| 75 65 20 6f 66 20 7b 5c | 63 66 20 71 75 6f 74 65 |ue of {\|cf quote|
|00005320| 7d 2e 20 20 49 74 20 63 | 72 65 61 74 65 73 20 61 |}. It c|reates a|
|00005330| 0a 73 79 6e 74 61 63 74 | 69 63 20 72 65 70 72 65 |.syntact|ic repre|
|00005340| 73 65 6e 74 61 74 69 6f | 6e 20 6f 66 20 5c 68 79 |sentatio|n of \hy|
|00005350| 70 65 72 7b 64 61 74 75 | 6d 7d 20 74 68 61 74 2c |per{datu|m} that,|
|00005360| 20 6c 69 6b 65 20 61 6e | 20 61 72 67 75 6d 65 6e | like an| argumen|
|00005370| 74 20 74 6f 20 61 0a 74 | 72 61 6e 73 66 6f 72 6d |t to a.t|ransform|
|00005380| 65 72 2c 20 63 6f 6e 74 | 61 69 6e 73 20 69 6e 66 |er, cont|ains inf|
|00005390| 6f 72 6d 61 74 69 6f 6e | 20 61 62 6f 75 74 20 74 |ormation| about t|
|000053a0| 68 65 20 62 69 6e 64 69 | 6e 67 73 20 66 6f 72 20 |he bindi|ngs for |
|000053b0| 69 64 65 6e 74 69 66 69 | 65 72 73 0a 63 6f 6e 74 |identifi|ers.cont|
|000053c0| 61 69 6e 65 64 20 69 6e | 20 5c 68 79 70 65 72 7b |ained in| \hyper{|
|000053d0| 64 61 74 75 6d 7d 2e 20 | 20 54 68 65 20 62 69 6e |datum}. | The bin|
|000053e0| 64 69 6e 67 20 66 6f 72 | 20 61 6e 20 69 64 65 6e |ding for| an iden|
|000053f0| 74 69 66 69 65 72 20 69 | 6e 74 72 6f 64 75 63 65 |tifier i|ntroduce|
|00005400| 64 0a 62 79 20 7b 5c 63 | 66 20 73 79 6e 74 61 78 |d.by {\c|f syntax|
|00005410| 7d 20 69 73 20 74 68 65 | 20 63 6c 6f 73 65 73 74 |} is the| closest|
|00005420| 20 6c 65 78 69 63 61 6c | 6c 79 20 76 69 73 69 62 | lexical|ly visib|
|00005430| 6c 65 20 62 69 6e 64 69 | 6e 67 2e 20 20 41 6c 6c |le bindi|ng. All|
|00005440| 0a 76 61 72 69 61 62 6c | 65 73 20 61 6e 64 20 6b |.variabl|es and k|
|00005450| 65 79 77 6f 72 64 73 20 | 69 6e 74 72 6f 64 75 63 |eywords |introduc|
|00005460| 65 64 20 62 79 20 74 72 | 61 6e 73 66 6f 72 6d 65 |ed by tr|ansforme|
|00005470| 72 73 20 6d 75 73 74 20 | 62 65 20 63 72 65 61 74 |rs must |be creat|
|00005480| 65 64 20 62 79 0a 7b 5c | 63 66 20 73 79 6e 74 61 |ed by.{\|cf synta|
|00005490| 78 7d 2e 20 20 49 74 20 | 69 73 20 61 6e 20 65 72 |x}. It |is an er|
|000054a0| 72 6f 72 20 74 6f 20 69 | 6e 73 65 72 74 20 61 20 |ror to i|nsert a |
|000054b0| 73 79 6d 62 6f 6c 20 69 | 6e 20 74 68 65 20 6f 75 |symbol i|n the ou|
|000054c0| 74 70 75 74 20 6f 66 20 | 61 0a 74 72 61 6e 73 66 |tput of |a.transf|
|000054d0| 6f 72 6d 61 74 69 6f 6e | 20 70 72 6f 63 65 64 75 |ormation| procedu|
|000054e0| 72 65 20 75 6e 6c 65 73 | 73 20 69 74 20 69 73 20 |re unles|s it is |
|000054f0| 74 6f 20 62 65 20 70 61 | 72 74 20 6f 66 20 61 20 |to be pa|rt of a |
|00005500| 71 75 6f 74 65 64 20 64 | 61 74 75 6d 2e 0a 0a 5c |quoted d|atum...\|
|00005510| 62 65 67 69 6e 7b 73 63 | 68 65 6d 65 7d 0a 28 73 |begin{sc|heme}.(s|
|00005520| 79 6d 62 6f 6c 3f 20 28 | 73 79 6e 74 61 78 20 78 |ymbol? (|syntax x|
|00005530| 29 29 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |)) | |
|00005540| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005550| 20 5c 65 76 20 5c 73 63 | 68 66 61 6c 73 65 25 0a | \ev \sc|hfalse%.|
|00005560| 0a 28 6c 65 74 2d 73 79 | 6e 74 61 78 20 28 28 63 |.(let-sy|ntax ((c|
|00005570| 61 72 20 28 6c 61 6d 62 | 64 61 20 28 78 29 20 28 |ar (lamb|da (x) (|
|00005580| 73 79 6e 74 61 78 20 63 | 61 72 29 29 29 29 0a 20 |syntax c|ar)))). |
|00005590| 20 28 28 63 61 72 29 20 | 27 28 30 29 29 29 20 20 | ((car) |'(0))) |
|000055a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000055b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000055c0| 20 20 5c 65 76 20 30 25 | 0a 0a 28 6c 65 74 2d 73 | \ev 0%|..(let-s|
|000055d0| 79 6e 74 61 78 0a 20 20 | 28 28 71 75 6f 74 65 2d |yntax. |((quote-|
|000055e0| 71 75 6f 74 65 0a 20 20 | 20 20 28 6c 61 6d 62 64 |quote. | (lambd|
|000055f0| 61 20 28 78 29 20 28 6c | 69 73 74 20 28 73 79 6e |a (x) (l|ist (syn|
|00005600| 74 61 78 20 71 75 6f 74 | 65 29 20 27 71 75 6f 74 |tax quot|e) 'quot|
|00005610| 65 29 29 29 29 0a 20 20 | 28 71 75 6f 74 65 2d 71 |e)))). |(quote-q|
|00005620| 75 6f 74 65 29 29 20 20 | 20 20 20 20 20 20 20 20 |uote)) | |
|00005630| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005640| 20 20 20 20 20 20 20 20 | 20 5c 65 76 20 71 75 6f | | \ev quo|
|00005650| 74 65 25 0a 0a 28 6c 65 | 74 2d 73 79 6e 74 61 78 |te%..(le|t-syntax|
|00005660| 0a 20 20 28 28 71 75 6f | 74 65 2d 71 75 6f 74 65 |. ((quo|te-quote|
|00005670| 0a 20 20 20 20 28 6c 61 | 6d 62 64 61 20 28 78 29 |. (la|mbda (x)|
|00005680| 20 28 6c 69 73 74 20 27 | 71 75 6f 74 65 20 27 71 | (list '|quote 'q|
|00005690| 75 6f 74 65 29 29 29 29 | 0a 20 20 28 71 75 6f 74 |uote))))|. (quot|
|000056a0| 65 2d 71 75 6f 74 65 29 | 29 20 20 20 20 20 20 20 |e-quote)|) |
|000056b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000056c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 5c 65 76 20 | | \ev |
|000056d0| 5c 73 63 68 65 72 72 6f | 72 25 0a 5c 65 6e 64 7b |\scherro|r%.\end{|
|000056e0| 73 63 68 65 6d 65 7d 0a | 0a 54 68 65 20 73 65 63 |scheme}.|.The sec|
|000056f0| 6f 6e 64 20 7b 5c 63 66 | 20 71 75 6f 74 65 2d 71 |ond {\cf| quote-q|
|00005700| 75 6f 74 65 7d 20 65 78 | 61 6d 70 6c 65 20 72 65 |uote} ex|ample re|
|00005710| 73 75 6c 74 73 20 69 6e | 20 61 6e 20 65 72 72 6f |sults in| an erro|
|00005720| 72 20 62 65 63 61 75 73 | 65 20 74 77 6f 20 72 61 |r becaus|e two ra|
|00005730| 77 0a 73 79 6d 62 6f 6c | 73 20 61 72 65 20 62 65 |w.symbol|s are be|
|00005740| 69 6e 67 20 69 6e 73 65 | 72 74 65 64 20 69 6e 20 |ing inse|rted in |
|00005750| 74 68 65 20 6f 75 74 70 | 75 74 2e 20 20 54 68 65 |the outp|ut. The|
|00005760| 20 71 75 6f 74 65 64 20 | 7b 5c 63 66 20 71 75 6f | quoted |{\cf quo|
|00005770| 74 65 7d 20 69 6e 20 74 | 68 65 0a 66 69 72 73 74 |te} in t|he.first|
|00005780| 20 7b 5c 63 66 20 71 75 | 6f 74 65 2d 71 75 6f 74 | {\cf qu|ote-quot|
|00005790| 65 7d 20 65 78 61 6d 70 | 6c 65 20 64 6f 65 73 20 |e} examp|le does |
|000057a0| 6e 6f 74 20 63 61 75 73 | 65 20 61 6e 20 65 72 72 |not caus|e an err|
|000057b0| 6f 72 20 62 65 63 61 75 | 73 65 20 69 74 20 77 69 |or becau|se it wi|
|000057c0| 6c 6c 0a 62 65 20 61 20 | 71 75 6f 74 65 64 20 64 |ll.be a |quoted d|
|000057d0| 61 74 75 6d 2e 0a 0a 5c | 62 65 67 69 6e 7b 73 63 |atum...\|begin{sc|
|000057e0| 68 65 6d 65 7d 0a 28 6c | 65 74 2d 73 79 6e 74 61 |heme}.(l|et-synta|
|000057f0| 78 20 28 28 71 75 6f 74 | 65 2d 6d 65 0a 20 20 20 |x ((quot|e-me. |
|00005800| 20 20 20 20 20 20 20 20 | 20 20 20 28 6c 61 6d 62 | | (lamb|
|00005810| 64 61 20 28 78 29 0a 20 | 20 20 20 20 20 20 20 20 |da (x). | |
|00005820| 20 20 20 20 20 20 20 28 | 6c 69 73 74 20 28 73 79 | (|list (sy|
|00005830| 6e 74 61 78 20 71 75 6f | 74 65 29 20 78 29 29 29 |ntax quo|te) x)))|
|00005840| 29 0a 20 20 28 71 75 6f | 74 65 2d 6d 65 20 70 6c |). (quo|te-me pl|
|00005850| 65 61 73 65 29 29 20 20 | 20 20 20 20 20 20 20 20 |ease)) | |
|00005860| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005870| 20 20 20 20 5c 65 76 20 | 28 71 75 6f 74 65 2d 6d | \ev |(quote-m|
|00005880| 65 20 70 6c 65 61 73 65 | 29 0a 0a 28 6c 65 74 20 |e please|)..(let |
|00005890| 28 28 78 20 30 29 29 0a | 20 20 28 6c 65 74 2d 73 |((x 0)).| (let-s|
|000058a0| 79 6e 74 61 78 20 28 28 | 61 6c 70 68 61 20 28 6c |yntax ((|alpha (l|
|000058b0| 61 6d 62 64 61 20 28 65 | 29 20 28 73 79 6e 74 61 |ambda (e|) (synta|
|000058c0| 78 20 78 29 29 29 29 0a | 20 20 20 20 28 61 6c 70 |x x)))).| (alp|
|000058d0| 68 61 29 29 29 20 20 20 | 20 20 20 20 20 20 20 20 |ha))) | |
|000058e0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000058f0| 20 20 20 20 20 20 20 20 | 20 20 5c 65 76 20 30 0a | | \ev 0.|
|00005900| 0a 28 6c 65 74 20 28 28 | 78 20 30 29 29 0a 20 20 |.(let ((|x 0)). |
|00005910| 28 6c 65 74 2d 73 79 6e | 74 61 78 20 28 28 61 6c |(let-syn|tax ((al|
|00005920| 70 68 61 20 28 6c 61 6d | 62 64 61 20 28 78 29 20 |pha (lam|bda (x) |
|00005930| 28 73 79 6e 74 61 78 20 | 78 29 29 29 29 0a 20 20 |(syntax |x)))). |
|00005940| 20 20 28 61 6c 70 68 61 | 29 29 29 20 20 20 20 20 | (alpha|))) |
|00005950| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005960| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005970| 5c 65 76 20 5c 73 63 68 | 65 72 72 6f 72 0a 0a 28 |\ev \sch|error..(|
|00005980| 6c 65 74 2d 73 79 6e 74 | 61 78 20 28 28 61 6c 70 |let-synt|ax ((alp|
|00005990| 68 61 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |ha. | |
|000059a0| 20 28 6c 65 74 2d 73 79 | 6e 74 61 78 20 28 28 62 | (let-sy|ntax ((b|
|000059b0| 65 74 61 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 |eta. | |
|000059c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000059d0| 28 73 79 6e 74 61 78 2d | 72 75 6c 65 73 20 28 29 |(syntax-|rules ()|
|000059e0| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|000059f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 28 | | (|
|00005a00| 28 62 65 74 61 29 20 30 | 29 29 29 29 0a 20 20 20 |(beta) 0|)))). |
|00005a10| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 28 6c 61 | | (la|
|00005a20| 6d 62 64 61 20 28 78 29 | 20 28 73 79 6e 74 61 78 |mbda (x)| (syntax|
|00005a30| 20 28 62 65 74 61 29 29 | 29 29 29 29 0a 20 20 28 | (beta))|)))). (|
|00005a40| 61 6c 70 68 61 29 29 20 | 20 20 20 20 20 20 20 20 |alpha)) | |
|00005a50| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005a60| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 5c | | \|
|00005a70| 65 76 20 5c 73 63 68 65 | 72 72 6f 72 25 0a 5c 65 |ev \sche|rror%.\e|
|00005a80| 6e 64 7b 73 63 68 65 6d | 65 7d 0a 0a 0a 54 68 65 |nd{schem|e}...The|
|00005a90| 20 6c 61 73 74 20 74 77 | 6f 20 65 78 61 6d 70 6c | last tw|o exampl|
|00005aa0| 65 73 20 61 72 65 20 65 | 72 72 6f 72 73 20 62 65 |es are e|rrors be|
|00005ab0| 63 61 75 73 65 20 69 6e | 20 62 6f 74 68 20 63 61 |cause in| both ca|
|00005ac0| 73 65 73 20 61 20 6c 65 | 78 69 63 61 6c 6c 79 0a |ses a le|xically.|
|00005ad0| 62 6f 75 6e 64 20 69 64 | 65 6e 74 69 66 69 65 72 |bound id|entifier|
|00005ae0| 20 69 73 20 70 6c 61 63 | 65 64 20 6f 75 74 73 69 | is plac|ed outsi|
|00005af0| 64 65 20 6f 66 20 74 68 | 65 20 73 63 6f 70 65 20 |de of th|e scope |
|00005b00| 6f 66 20 69 74 73 20 62 | 69 6e 64 69 6e 67 2e 0a |of its b|inding..|
|00005b10| 49 6e 20 74 68 65 20 66 | 69 72 73 74 20 63 61 73 |In the f|irst cas|
|00005b20| 65 2c 20 74 68 65 20 76 | 61 72 69 61 62 6c 65 20 |e, the v|ariable |
|00005b30| 7b 5c 63 66 20 78 7d 20 | 69 73 20 70 6c 61 63 65 |{\cf x} |is place|
|00005b40| 64 20 6f 75 74 73 69 64 | 65 20 69 74 73 20 73 63 |d outsid|e its sc|
|00005b50| 6f 70 65 2e 0a 49 6e 20 | 74 68 65 20 73 65 63 6f |ope..In |the seco|
|00005b60| 6e 64 20 63 61 73 65 2c | 20 74 68 65 20 6b 65 79 |nd case,| the key|
|00005b70| 77 6f 72 64 20 7b 5c 63 | 66 20 62 65 74 61 7d 20 |word {\c|f beta} |
|00005b80| 69 73 20 70 6c 61 63 65 | 64 20 6f 75 74 73 69 64 |is place|d outsid|
|00005b90| 65 20 69 74 73 0a 73 63 | 6f 70 65 2e 0a 0a 5c 62 |e its.sc|ope...\b|
|00005ba0| 65 67 69 6e 7b 73 63 68 | 65 6d 65 7d 0a 28 6c 65 |egin{sch|eme}.(le|
|00005bb0| 74 2d 73 79 6e 74 61 78 | 20 28 28 61 6c 70 68 61 |t-syntax| ((alpha|
|00005bc0| 20 28 73 79 6e 74 61 78 | 2d 72 75 6c 65 73 20 28 | (syntax|-rules (|
|00005bd0| 29 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |). | |
|00005be0| 20 20 20 20 20 20 20 20 | 28 28 61 6c 70 68 61 29 | |((alpha)|
|00005bf0| 20 30 29 29 29 29 0a 20 | 20 28 6c 65 74 2d 73 79 | 0)))). | (let-sy|
|00005c00| 6e 74 61 78 20 28 28 62 | 65 74 61 20 28 6c 61 6d |ntax ((b|eta (lam|
|00005c10| 62 64 61 20 28 78 29 20 | 28 61 6c 70 68 61 29 29 |bda (x) |(alpha))|
|00005c20| 29 29 0a 20 20 20 20 28 | 62 65 74 61 29 29 29 20 |)). (|beta))) |
|00005c30| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005c40| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005c50| 20 20 20 20 20 5c 65 76 | 20 30 0a 0a 28 6c 65 74 | \ev| 0..(let|
|00005c60| 20 28 28 6c 69 73 74 20 | 30 29 29 0a 20 20 28 6c | ((list |0)). (l|
|00005c70| 65 74 2d 73 79 6e 74 61 | 78 20 28 28 61 6c 70 68 |et-synta|x ((alph|
|00005c80| 61 20 28 6c 61 6d 62 64 | 61 20 28 78 29 20 28 6c |a (lambd|a (x) (l|
|00005c90| 69 73 74 20 30 29 29 29 | 29 0a 20 20 20 20 28 61 |ist 0)))|). (a|
|00005ca0| 6c 70 68 61 29 29 29 20 | 20 20 20 20 20 20 20 20 |lpha))) | |
|00005cb0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005cc0| 20 20 20 20 20 20 20 20 | 20 20 20 20 5c 65 76 20 | | \ev |
|00005cd0| 5c 73 63 68 65 72 72 6f | 72 25 0a 5c 65 6e 64 7b |\scherro|r%.\end{|
|00005ce0| 73 63 68 65 6d 65 7d 0a | 0a 54 68 65 20 6c 61 73 |scheme}.|.The las|
|00005cf0| 74 20 65 78 61 6d 70 6c | 65 20 69 73 20 61 6e 20 |t exampl|e is an |
|00005d00| 65 72 72 6f 72 20 62 65 | 63 61 75 73 65 20 74 68 |error be|cause th|
|00005d10| 65 20 72 65 66 65 72 65 | 6e 63 65 20 74 6f 20 7b |e refere|nce to {|
|00005d20| 5c 63 66 20 6c 69 73 74 | 7d 20 69 6e 20 74 68 65 |\cf list|} in the|
|00005d30| 0a 74 72 61 6e 73 66 6f | 72 6d 65 72 20 69 73 20 |.transfo|rmer is |
|00005d40| 73 68 61 64 6f 77 65 64 | 20 62 79 20 74 68 65 20 |shadowed| by the |
|00005d50| 6c 65 78 69 63 61 6c 20 | 62 69 6e 64 69 6e 67 20 |lexical |binding |
|00005d60| 66 6f 72 20 7b 5c 63 66 | 20 6c 69 73 74 7d 2e 20 |for {\cf| list}. |
|00005d70| 20 53 69 6e 63 65 20 74 | 68 65 0a 65 78 70 61 6e | Since t|he.expan|
|00005d80| 73 69 6f 6e 20 70 72 6f | 63 65 73 73 20 69 73 20 |sion pro|cess is |
|00005d90| 64 69 73 74 69 6e 63 74 | 20 66 72 6f 6d 20 74 68 |distinct| from th|
|00005da0| 65 20 65 78 65 63 75 74 | 69 6f 6e 20 6f 66 20 74 |e execut|ion of t|
|00005db0| 68 65 20 70 72 6f 67 72 | 61 6d 2c 0a 74 72 61 6e |he progr|am,.tran|
|00005dc0| 73 66 6f 72 6d 65 72 73 | 20 63 61 6e 6e 6f 74 20 |sformers| cannot |
|00005dd0| 72 65 66 65 72 65 6e 63 | 65 20 70 72 6f 67 72 61 |referenc|e progra|
|00005de0| 6d 20 76 61 72 69 61 62 | 6c 65 73 2e 20 20 4f 6e |m variab|les. On|
|00005df0| 20 74 68 65 20 6f 74 68 | 65 72 20 68 61 6e 64 2c | the oth|er hand,|
|00005e00| 0a 74 68 65 20 70 72 65 | 76 69 6f 75 73 20 65 78 |.the pre|vious ex|
|00005e10| 61 6d 70 6c 65 20 69 73 | 20 6e 6f 74 20 61 6e 20 |ample is| not an |
|00005e20| 65 72 72 6f 72 20 62 65 | 63 61 75 73 65 20 64 65 |error be|cause de|
|00005e30| 66 69 6e 69 74 69 6f 6e | 73 20 66 6f 72 20 6b 65 |finition|s for ke|
|00005e40| 79 77 6f 72 64 73 0a 69 | 6e 20 74 68 65 20 70 72 |ywords.i|n the pr|
|00005e50| 6f 67 72 61 6d 20 64 6f | 20 65 78 69 73 74 20 61 |ogram do| exist a|
|00005e60| 74 20 65 78 70 61 6e 73 | 69 6f 6e 20 74 69 6d 65 |t expans|ion time|
|00005e70| 2e 0a 0a 5c 62 65 67 69 | 6e 7b 6e 6f 74 65 7d 0a |...\begi|n{note}.|
|00005e80| 49 74 20 68 61 73 20 62 | 65 65 6e 20 73 75 67 67 |It has b|een sugg|
|00005e90| 65 73 74 65 64 20 74 68 | 61 74 20 7b 5c 63 66 20 |ested th|at {\cf |
|00005ea0| 5c 23 27 5c 68 79 70 65 | 72 7b 64 61 74 75 6d 7d |\#'\hype|r{datum}|
|00005eb0| 7d 20 61 6e 64 0a 7b 5c | 63 66 20 5c 23 60 5c 68 |} and.{\|cf \#`\h|
|00005ec0| 79 70 65 72 7b 64 61 74 | 75 6d 7d 7d 20 77 6f 75 |yper{dat|um}} wou|
|00005ed0| 6c 64 20 62 65 0a 66 65 | 6c 69 63 69 74 6f 75 73 |ld be.fe|licitous|
|00005ee0| 20 61 62 62 72 65 76 69 | 61 74 69 6f 6e 73 20 66 | abbrevi|ations f|
|00005ef0| 6f 72 20 7b 5c 63 66 20 | 28 73 79 6e 74 61 78 20 |or {\cf |(syntax |
|00005f00| 5c 68 79 70 65 72 7b 64 | 61 74 75 6d 7d 29 7d 0a |\hyper{d|atum})}.|
|00005f10| 61 6e 64 20 7b 5c 63 66 | 20 28 71 75 61 73 69 73 |and {\cf| (quasis|
|00005f20| 79 6e 74 61 78 20 5c 68 | 79 70 65 72 7b 64 61 74 |yntax \h|yper{dat|
|00005f30| 75 6d 7d 29 7d 2c 20 72 | 65 73 70 65 63 74 69 76 |um})}, r|espectiv|
|00005f40| 65 6c 79 2c 0a 77 68 65 | 72 65 20 7b 5c 63 66 20 |ely,.whe|re {\cf |
|00005f50| 71 75 61 73 69 73 79 6e | 74 61 78 7d 2c 20 77 68 |quasisyn|tax}, wh|
|00005f60| 69 63 68 20 69 73 20 6e | 6f 74 20 64 65 73 63 72 |ich is n|ot descr|
|00005f70| 69 62 65 64 20 69 6e 20 | 74 68 69 73 0a 61 70 70 |ibed in |this.app|
|00005f80| 65 6e 64 69 78 2c 20 77 | 6f 75 6c 64 20 62 65 61 |endix, w|ould bea|
|00005f90| 72 20 74 68 65 20 73 61 | 6d 65 20 72 65 6c 61 74 |r the sa|me relat|
|00005fa0| 69 6f 6e 73 68 69 70 20 | 74 6f 20 7b 5c 63 66 20 |ionship |to {\cf |
|00005fb0| 73 79 6e 74 61 78 7d 0a | 74 68 61 74 20 7b 5c 63 |syntax}.|that {\c|
|00005fc0| 66 20 71 75 61 73 69 71 | 75 6f 74 65 7d 20 62 65 |f quasiq|uote} be|
|00005fd0| 61 72 73 20 74 6f 20 7b | 5c 63 66 20 71 75 6f 74 |ars to {|\cf quot|
|00005fe0| 65 7d 2e 0a 5c 65 6e 64 | 7b 6e 6f 74 65 7d 0a 0a |e}..\end|{note}..|
|00005ff0| 5c 65 6e 64 7b 65 6e 74 | 72 79 7d 0a 0a 5c 62 65 |\end{ent|ry}..\be|
|00006000| 67 69 6e 7b 65 6e 74 72 | 79 7d 7b 25 0a 5c 70 72 |gin{entr|y}{%.\pr|
|00006010| 6f 74 6f 7b 69 64 65 6e | 74 69 66 69 65 72 3f 7d |oto{iden|tifier?}|
|00006020| 7b 20 73 79 6e 74 61 78 | 2d 6f 62 6a 65 63 74 7d |{ syntax|-object}|
|00006030| 7b 70 72 6f 63 65 64 75 | 72 65 7d 7d 0a 0a 52 65 |{procedu|re}}..Re|
|00006040| 74 75 72 6e 73 20 5c 73 | 63 68 74 72 75 65 7b 7d |turns \s|chtrue{}|
|00006050| 20 69 66 20 5c 76 61 72 | 7b 73 79 6e 74 61 78 2d | if \var|{syntax-|
|00006060| 6f 62 6a 65 63 74 7d 20 | 72 65 70 72 65 73 65 6e |object} |represen|
|00006070| 74 73 20 61 6e 20 69 64 | 65 6e 74 69 66 69 65 72 |ts an id|entifier|
|00006080| 2c 0a 6f 74 68 65 72 77 | 69 73 65 20 72 65 74 75 |,.otherw|ise retu|
|00006090| 72 6e 73 20 5c 73 63 68 | 66 61 6c 73 65 7b 7d 2e |rns \sch|false{}.|
|000060a0| 0a 0a 5c 62 65 67 69 6e | 7b 73 63 68 65 6d 65 7d |..\begin|{scheme}|
|000060b0| 0a 28 69 64 65 6e 74 69 | 66 69 65 72 3f 20 28 73 |.(identi|fier? (s|
|000060c0| 79 6e 74 61 78 20 78 29 | 29 20 20 20 20 20 20 20 |yntax x)|) |
|000060d0| 5c 65 76 20 5c 73 63 68 | 74 72 75 65 0a 28 69 64 |\ev \sch|true.(id|
|000060e0| 65 6e 74 69 66 69 65 72 | 3f 20 28 71 75 6f 74 65 |entifier|? (quote|
|000060f0| 20 78 29 29 20 20 20 20 | 20 20 20 20 5c 65 76 20 | x)) | \ev |
|00006100| 5c 73 63 68 66 61 6c 73 | 65 0a 28 69 64 65 6e 74 |\schfals|e.(ident|
|00006110| 69 66 69 65 72 3f 20 33 | 29 20 20 20 20 20 20 20 |ifier? 3|) |
|00006120| 20 20 20 20 20 20 20 20 | 20 5c 65 76 20 5c 73 63 | | \ev \sc|
|00006130| 68 66 61 6c 73 65 25 0a | 5c 65 6e 64 7b 73 63 68 |hfalse%.|\end{sch|
|00006140| 65 6d 65 7d 0a 0a 5c 65 | 6e 64 7b 65 6e 74 72 79 |eme}..\e|nd{entry|
|00006150| 7d 0a 0a 0a 5c 62 65 67 | 69 6e 7b 65 6e 74 72 79 |}...\beg|in{entry|
|00006160| 7d 7b 25 0a 5c 70 72 6f | 74 6f 7b 75 6e 77 72 61 |}{%.\pro|to{unwra|
|00006170| 70 2d 73 79 6e 74 61 78 | 7d 7b 20 73 79 6e 74 61 |p-syntax|}{ synta|
|00006180| 78 2d 6f 62 6a 65 63 74 | 7d 7b 70 72 6f 63 65 64 |x-object|}{proced|
|00006190| 75 72 65 7d 7d 0a 0a 49 | 66 20 5c 76 61 72 7b 73 |ure}}..I|f \var{s|
|000061a0| 79 6e 74 61 78 2d 6f 62 | 6a 65 63 74 7d 20 69 73 |yntax-ob|ject} is|
|000061b0| 20 61 6e 20 69 64 65 6e | 74 69 66 69 65 72 2c 20 | an iden|tifier, |
|000061c0| 74 68 65 6e 20 69 74 20 | 69 73 20 72 65 74 75 72 |then it |is retur|
|000061d0| 6e 65 64 20 75 6e 63 68 | 61 6e 67 65 64 2e 0a 4f |ned unch|anged..O|
|000061e0| 74 68 65 72 77 69 73 65 | 20 7b 5c 63 66 20 75 6e |therwise| {\cf un|
|000061f0| 77 72 61 70 2d 73 79 6e | 74 61 78 7d 20 63 6f 6e |wrap-syn|tax} con|
|00006200| 76 65 72 74 73 20 74 68 | 65 20 6f 75 74 65 72 6d |verts th|e outerm|
|00006210| 6f 73 74 20 73 74 72 75 | 63 74 75 72 65 20 6f 66 |ost stru|cture of|
|00006220| 0a 5c 76 61 72 7b 73 79 | 6e 74 61 78 2d 6f 62 6a |.\var{sy|ntax-obj|
|00006230| 65 63 74 7d 20 69 6e 74 | 6f 20 61 0a 64 61 74 61 |ect} int|o a.data|
|00006240| 20 6f 62 6a 65 63 74 20 | 77 68 6f 73 65 20 65 78 | object |whose ex|
|00006250| 74 65 72 6e 61 6c 20 72 | 65 70 72 65 73 65 6e 74 |ternal r|epresent|
|00006260| 61 74 69 6f 6e 20 69 73 | 20 74 68 65 20 73 61 6d |ation is| the sam|
|00006270| 65 20 61 73 20 74 68 61 | 74 20 6f 66 0a 5c 76 61 |e as tha|t of.\va|
|00006280| 72 7b 73 79 6e 74 61 78 | 2d 6f 62 6a 65 63 74 7d |r{syntax|-object}|
|00006290| 2e 20 20 54 68 65 20 72 | 65 73 75 6c 74 20 69 73 |. The r|esult is|
|000062a0| 20 65 69 74 68 65 72 20 | 61 6e 20 69 64 65 6e 74 | either |an ident|
|000062b0| 69 66 69 65 72 2c 20 61 | 20 70 61 69 72 20 77 68 |ifier, a| pair wh|
|000062c0| 6f 73 65 0a 63 61 72 0a | 61 6e 64 20 63 64 72 20 |ose.car.|and cdr |
|000062d0| 61 72 65 20 73 79 6e 74 | 61 78 20 6f 62 6a 65 63 |are synt|ax objec|
|000062e0| 74 73 2c 20 61 20 76 65 | 63 74 6f 72 20 77 68 6f |ts, a ve|ctor who|
|000062f0| 73 65 20 65 6c 65 6d 65 | 6e 74 73 20 61 72 65 20 |se eleme|nts are |
|00006300| 73 79 6e 74 61 78 0a 6f | 62 6a 65 63 74 73 2c 20 |syntax.o|bjects, |
|00006310| 61 6e 20 65 6d 70 74 79 | 20 6c 69 73 74 2c 20 61 |an empty| list, a|
|00006320| 20 73 74 72 69 6e 67 2c | 20 61 20 62 6f 6f 6c 65 | string,| a boole|
|00006330| 61 6e 2c 20 61 20 63 68 | 61 72 61 63 74 65 72 2c |an, a ch|aracter,|
|00006340| 20 6f 72 20 61 20 6e 75 | 6d 62 65 72 2e 0a 0a 5c | or a nu|mber...\|
|00006350| 62 65 67 69 6e 7b 73 63 | 68 65 6d 65 7d 0a 28 69 |begin{sc|heme}.(i|
|00006360| 64 65 6e 74 69 66 69 65 | 72 3f 20 28 75 6e 77 72 |dentifie|r? (unwr|
|00006370| 61 70 2d 73 79 6e 74 61 | 78 20 28 73 79 6e 74 61 |ap-synta|x (synta|
|00006380| 78 20 78 29 29 29 0a 20 | 20 20 20 20 20 20 20 20 |x x))). | |
|00006390| 20 20 20 20 20 5c 65 76 | 20 5c 73 63 68 74 72 75 | \ev| \schtru|
|000063a0| 65 0a 28 69 64 65 6e 74 | 69 66 69 65 72 3f 20 28 |e.(ident|ifier? (|
|000063b0| 63 61 72 20 28 75 6e 77 | 72 61 70 2d 73 79 6e 74 |car (unw|rap-synt|
|000063c0| 61 78 20 28 73 79 6e 74 | 61 78 20 28 78 29 29 29 |ax (synt|ax (x)))|
|000063d0| 29 29 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |)). | |
|000063e0| 20 5c 65 76 20 5c 73 63 | 68 74 72 75 65 0a 28 75 | \ev \sc|htrue.(u|
|000063f0| 6e 77 72 61 70 2d 73 79 | 6e 74 61 78 20 28 63 64 |nwrap-sy|ntax (cd|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.