]> git.lizzy.rs Git - metalua.git/blob - doc/manual/metalua-manual.log
manual page width reduced
[metalua.git] / doc / manual / metalua-manual.log
1 This is pdfeTeX, Version 3.141592-1.21a-2.2 (Web2C 7.5.4) (format=pdflatex 2006.6.6)  25 JAN 2008 10:10
2 entering extended mode
3 **metalua-manual.tex
4 (./metalua-manual.tex
5 LaTeX2e <2003/12/01>
6 Babel <v3.8d> and hyphenation patterns for american, french, german, ngerman, b
7 ahasa, basque, bulgarian, catalan, croatian, czech, danish, dutch, esperanto, e
8 stonian, finnish, greek, icelandic, irish, italian, latin, magyar, norsk, polis
9 h, portuges, romanian, russian, serbian, slovak, slovene, spanish, swedish, tur
10 kish, ukrainian, nohyphenation, loaded.
11 (/sw/share/texmf-dist/tex/latex/base/book.cls
12 Document Class: book 2004/02/16 v1.4f Standard LaTeX document class
13 (/sw/share/texmf-dist/tex/latex/base/bk10.clo
14 File: bk10.clo 2004/02/16 v1.4f Standard LaTeX file (size option)
15 )
16 \c@part=\count79
17 \c@chapter=\count80
18 \c@section=\count81
19 \c@subsection=\count82
20 \c@subsubsection=\count83
21 \c@paragraph=\count84
22 \c@subparagraph=\count85
23 \c@figure=\count86
24 \c@table=\count87
25 \abovecaptionskip=\skip41
26 \belowcaptionskip=\skip42
27 \bibindent=\dimen102
28 )
29 (/sw/share/texmf-dist/tex/latex/psnfss/palatino.sty
30 Package: palatino 2004/09/15 PSNFSS-v9.2 (SPQR) 
31 )
32 (/sw/share/texmf-dist/tex/latex/fancyhdr/fancyhdr.sty
33 \fancy@headwidth=\skip43
34 \f@ncyO@elh=\skip44
35 \f@ncyO@erh=\skip45
36 \f@ncyO@olh=\skip46
37 \f@ncyO@orh=\skip47
38 \f@ncyO@elf=\skip48
39 \f@ncyO@erf=\skip49
40 \f@ncyO@olf=\skip50
41 \f@ncyO@orf=\skip51
42 )
43 (/sw/share/texmf-dist/tex/latex/base/alltt.sty
44 Package: alltt 1997/06/16 v2.0g defines alltt environment
45 )
46 (/sw/share/texmf-dist/tex/latex/url/url.sty
47 \Urlmuskip=\muskip10
48 Package: url 2004/03/15  ver 3.1  Verb mode for urls, etc.
49 ) (./metalua-manual.aux (./intro.aux) (./syntax-ext.aux) (./data.aux) (./meta.a
50 ux) (./gg-ref.aux) (./mlp-ref.aux)
51 (./stdlib.aux) (./clopts-ref.aux) (./springs-ref.aux) (./walk-ref.aux)
52 (./match-ref.aux) (./dollar-ref.aux) (./clist-ref.aux) (./hygiene-ref.aux)
53 (./samples.aux) (./sample-exception.aux) (./sample-match.aux) (./src-hints.aux)
54 (./ast.aux))
55 \openout1 = `metalua-manual.aux'.
56
57 LaTeX Font Info:    Checking defaults for OML/cmm/m/it on input line 26.
58 LaTeX Font Info:    ... okay on input line 26.
59 LaTeX Font Info:    Checking defaults for T1/cmr/m/n on input line 26.
60 LaTeX Font Info:    ... okay on input line 26.
61 LaTeX Font Info:    Checking defaults for OT1/cmr/m/n on input line 26.
62 LaTeX Font Info:    ... okay on input line 26.
63 LaTeX Font Info:    Checking defaults for OMS/cmsy/m/n on input line 26.
64 LaTeX Font Info:    ... okay on input line 26.
65 LaTeX Font Info:    Checking defaults for OMX/cmex/m/n on input line 26.
66 LaTeX Font Info:    ... okay on input line 26.
67 LaTeX Font Info:    Checking defaults for U/cmr/m/n on input line 26.
68 LaTeX Font Info:    ... okay on input line 26.
69 LaTeX Font Info:    Try loading font information for OT1+ppl on input line 26.
70  (/sw/share/texmf-dist/tex/latex/psnfss/ot1ppl.fd
71 File: ot1ppl.fd 2001/06/04 font definitions for OT1/ppl.
72 )
73 LaTeX Font Info:    External font `cmex10' loaded for size
74 (Font)              <12> on input line 31.
75 LaTeX Font Info:    External font `cmex10' loaded for size
76 (Font)              <8> on input line 31.
77 LaTeX Font Info:    External font `cmex10' loaded for size
78 (Font)              <6> on input line 31.
79
80
81 LaTeX Warning: No \author given.
82
83 [1
84
85
86 {/sw/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}] [2
87
88 ]
89 LaTeX Font Info:    Font shape `OT1/ppl/bx/n' in size <24.88> not available
90 (Font)              Font shape `OT1/ppl/b/n' tried instead on input line 32.
91
92 (./metalua-manual.toc
93 LaTeX Font Info:    External font `cmex10' loaded for size
94 (Font)              <7> on input line 1.
95 LaTeX Font Info:    External font `cmex10' loaded for size
96 (Font)              <5> on input line 1.
97 LaTeX Font Info:    Font shape `OT1/ppl/bx/n' in size <10> not available
98 (Font)              Font shape `OT1/ppl/b/n' tried instead on input line 67.
99 LaTeX Font Info:    Try loading font information for OT1+pcr on input line 68.
100  (/sw/share/texmf-dist/tex/latex/psnfss/ot1pcr.fd
101 File: ot1pcr.fd 2001/06/04 font definitions for OT1/pcr.
102 )
103 Underfull \vbox (badness 2452) has occurred while \output is active []
104
105  [3]
106 Underfull \vbox (badness 1694) has occurred while \output is active []
107
108  [4])
109 \tf@toc=\write3
110 \openout3 = `metalua-manual.toc'.
111
112
113 [5]
114 \openout2 = `intro.aux'.
115
116  (./intro.tex
117 LaTeX Font Info:    Font shape `OT1/ppl/bx/n' in size <14.4> not available
118 (Font)              Font shape `OT1/ppl/b/n' tried instead on input line 1.
119 LaTeX Font Info:    Try loading font information for OMS+ppl on input line 22.
120  (/sw/share/texmf-dist/tex/latex/psnfss/omsppl.fd
121 File: omsppl.fd 
122 )
123 LaTeX Font Info:    Font shape `OMS/ppl/m/n' in size <10> not available
124 (Font)              Font shape `OMS/cmsy/m/n' tried instead on input line 22.
125  [6
126
127 ]
128 Overfull \hbox (10.8078pt too wide) in paragraph at lines 99--102
129 []\OT1/ppl/m/n/10 The mail-ing list ($\OT1/pcr/m/n/10 http : / / www . lua . or
130 g / lua-[]l . html$\OT1/ppl/m/n/10 ) and the IRC chan-
131  []
132
133
134 Overfull \hbox (2.75807pt too wide) in paragraph at lines 99--102
135 \OT1/ppl/m/n/10 nel ($\OT1/pcr/m/n/10 irc : / / irc . freenode . net / #lua$\OT
136 1/ppl/m/n/10 ) are pop-u-lated with a very help-
137  []
138
139 [7]
140 Overfull \hbox (4.66658pt too wide) in paragraph at lines 135--144
141 []\OT1/ppl/m/n/10 Macro-systems bolted on ex-ist-ing lan-guages (Tem-plate Hask
142 ell[], CamlP4[],
143  []
144
145 [8]) [9]
146 \openout2 = `syntax-ext.aux'.
147
148  (./syntax-ext.tex
149 LaTeX Font Info:    Font shape `OT1/ppl/bx/n' in size <12> not available
150 (Font)              Font shape `OT1/ppl/b/n' tried instead on input line 7.
151
152 Overfull \hbox (39.20924pt too wide) in paragraph at lines 8--14
153 \OT1/pcr/m/n/10 argn) return some[]expr end\OT1/ppl/m/n/10 '' can be writ-ten `
154 `\OT1/pcr/m/n/10 |arg1,arg2,argn| some[]exp\OT1/ppl/m/n/10 ''. 
155  []
156
157
158 Overfull \hbox (1.36873pt too wide) in paragraph at lines 15--19
159 \OT1/ppl/m/n/10 that re-turn func-tions: ``\OT1/pcr/m/n/10 function(x) return f
160 unction(y) return x+y
161  []
162
163 LaTeX Font Info:    Try loading font information for OMS+pcr on input line 51.
164 (/sw/share/texmf-dist/tex/latex/psnfss/omspcr.fd
165 File: omspcr.fd 
166 )
167 LaTeX Font Info:    Font shape `OMS/pcr/m/n' in size <10> not available
168 (Font)              Font shape `OMS/cmsy/m/n' tried instead on input line 51.
169 ) [10
170
171
172 ] [11]
173 \openout2 = `data.aux'.
174
175  (./data.tex
176 [12
177
178
179 ]
180 Overfull \hbox (1.5184pt too wide) in paragraph at lines 88--91
181 \OT1/ppl/m/n/10 fore, []\OT1/pcr/m/n/10 { tag = "Nil" } \OT1/ppl/m/n/10 can be 
182 ab-bre-vi-ated as []\OT1/pcr/m/n/10 `Nil \OT1/ppl/m/n/10 (al-though []\OT1/pcr/
183 m/n/10 `Nil{ }
184  []
185
186
187 Overfull \hbox (63.0pt too wide) in paragraph at lines 104--104
188 []      \OT1/pcr/m/n/10 `Formula{ "Multiplication", `Variable "i", `Variable "p
189 i" } },[] 
190  []
191
192 [13]
193 Overfull \hbox (0.74602pt too wide) in paragraph at lines 142--147
194 \OT1/ppl/m/n/10 based on unary or bi-nary op-er-a-tors, func-tion def-i-ni-tion
195 s, func-tion calls, method
196  []
197
198
199 Overfull \hbox (2.99579pt too wide) in paragraph at lines 148--154
200 \OT1/ppl/m/n/10 with can be re-turned through eval-u-a-tion, whereas state-ment
201 s just ex-e-cute them-
202  []
203
204 LaTeX Font Info:    Font shape `OMS/pcr/m/n' in size <8> not available
205 (Font)              Font shape `OMS/cmsy/m/n' tried instead on input line 160.
206
207 Overfull \hbox (9.88669pt too wide) in paragraph at lines 156--161
208 \OT1/ppl/m/n/10 the num-ber value as its sole child. For in-stance, []\OT1/pcr/
209 m/n/10 6 \OT1/ppl/m/n/10 is rep-re-sented by []\OT1/pcr/m/n/10 `Number 6[]\OT1/
210 ppl/m/n/10 . 
211  []
212
213
214 Overfull \hbox (35.12733pt too wide) in paragraph at lines 163--166
215 \OT1/ppl/m/n/10 string as its sole child. For in-stance, []\OT1/pcr/m/n/10 "foo
216 bar" \OT1/ppl/m/n/10 is rep-re-sented by []\OT1/pcr/m/n/10 `String "foobar"\OT1
217 /ppl/m/n/10 . 
218  []
219
220 [14]
221 Overfull \hbox (0.27684pt too wide) in paragraph at lines 173--174
222  \OT1/ppl/b/n/10 Other atomic val-ues[] \OT1/ppl/m/n/10 Here are the trans-la-t
223 ions of other keyword-based atomic
224  []
225
226
227 Overfull \hbox (108.50003pt too wide) in paragraph at lines 204--207
228 []\OT1/pcr/m/n/10 `Table{ `Key{ `String "x", `Number 1 }, `Key{ `String "y", `N
229 umber 2} }\OT1/ppl/m/n/10 ; 
230  []
231
232
233 Overfull \hbox (8.57785pt too wide) in paragraph at lines 208--211
234 []\OT1/ppl/m/n/10 indexed and non-indexed en-tries can be mixed: []\OT1/pcr/m/n
235 /10 { 1, [100]="foo", 3}
236  []
237
238
239 Overfull \hbox (72.50003pt too wide) in paragraph at lines 208--211
240 []\OT1/pcr/m/n/10 `Table{ `Number 1, `Key{ `Number 100, `String "foo"}, `Number
241  3 }\OT1/ppl/m/n/10 ; 
242  []
243
244
245 Overfull \hbox (70.04755pt too wide) in paragraph at lines 215--219
246  \OT1/ppl/b/n/10 Bi-nary Op-er-a-tors[] \OT1/ppl/m/n/10 Bi-nary op-er-a-tions a
247 re rep-re-sented by []\OT1/pcr/m/n/10 `Op{ operator, left, right}\OT1/ppl/m/n/1
248 0 ,
249  []
250
251 [15]
252 Overfull \hbox (130.62933pt too wide) in paragraph at lines 259--261
253 [][]\OT1/pcr/m/n/10 1+2*3 \OT1/ppl/m/n/10 is rep-re-sented as []\OT1/pcr/m/n/10
254  `Op{ `Add, `Number 1, `Op{ `Mul, `Number 2, `Number 3 } }\OT1/ppl/m/n/10 ; 
255  []
256
257
258 Overfull \hbox (140.12933pt too wide) in paragraph at lines 261--263
259 [][]\OT1/pcr/m/n/10 (1+2)*3 \OT1/ppl/m/n/10 is rep-re-sented as []\OT1/pcr/m/n/
260 10 `Op{ `Mul, `Op{ `Add, `Number 1, `Number 2 }, `Number 3 } 
261  []
262
263
264 Overfull \hbox (68.12933pt too wide) in paragraph at lines 294--296
265 [][]\OT1/pcr/m/n/10 -(1+2) \OT1/ppl/m/n/10 is rep-re-sented as []\OT1/pcr/m/n/1
266 0 `Op{ `Sub, `Op{ `Add, `Number 1, `Number 2 } } 
267  []
268
269 [16]
270 Overfull \hbox (94.62933pt too wide) in paragraph at lines 307--309
271 [][]\OT1/pcr/m/n/10 x[3][5] \OT1/ppl/m/n/10 is rep-re-sented as []\OT1/pcr/m/n/
272 10 `Index{ `Index{ `Id "x", `Number 3 }, `Number 5 }\OT1/ppl/m/n/10 ; 
273  []
274
275
276 Overfull \hbox (97.28851pt too wide) in paragraph at lines 309--311
277 [][]\OT1/pcr/m/n/10 x.y \OT1/ppl/m/n/10 is syn-tax sugar for []\OT1/pcr/m/n/10 
278 x["y"]\OT1/ppl/m/n/10 , and is rep-re-sented as []\OT1/pcr/m/n/10 `Index{ `Id "
279 x", `String "y" }\OT1/ppl/m/n/10 ; 
280  []
281
282
283 Overfull \hbox (16.62933pt too wide) in paragraph at lines 324--326
284 [][]\OT1/pcr/m/n/10 f(x, 1) \OT1/ppl/m/n/10 is rep-re-sented as []\OT1/pcr/m/n/
285 10 `Call{ `Id "f", `Id "x", `Number 1 }\OT1/ppl/m/n/10 ; 
286  []
287
288
289 Overfull \hbox (4.62933pt too wide) in paragraph at lines 326--328
290 [][]\OT1/pcr/m/n/10 f(x, ...) \OT1/ppl/m/n/10 is rep-re-sented as []\OT1/pcr/m/
291 n/10 `Call{ `Id "f", `Id "x", `Dots }\OT1/ppl/m/n/10 . 
292  []
293
294
295 Overfull \hbox (118.62933pt too wide) in paragraph at lines 340--342
296 [][]\OT1/pcr/m/n/10 o:f(x, 1) \OT1/ppl/m/n/10 is rep-re-sented as []\OT1/pcr/m/
297 n/10 `Invoke{ `Id "o", `String "f", `Id "x", `Number 1 }\OT1/ppl/m/n/10 ; 
298  []
299
300
301 Overfull \hbox (106.62933pt too wide) in paragraph at lines 342--344
302 [][]\OT1/pcr/m/n/10 o:f(x, ...) \OT1/ppl/m/n/10 is rep-re-sented as []\OT1/pcr/
303 m/n/10 `Invoke{ `Id "o", `String "f", `Id "x", `Dots }\OT1/ppl/m/n/10 ; 
304  []
305
306
307 Overfull \hbox (9.7182pt too wide) in paragraph at lines 346--351
308 \OT1/ppl/m/n/10 ments. No-tice also that ``\OT1/pcr/m/n/10 function o:m (x) ret
309 urn x end\OT1/ppl/m/n/10 '' is not a method
310  []
311
312 [17]
313 Overfull \hbox (11.12653pt too wide) in paragraph at lines 360--363
314 []\OT1/ppl/m/n/10 The block is a list of state-ment AST, op-tion-naly ter-mi-na
315 ted with a []\OT1/pcr/m/n/10 `Return{...}
316  []
317
318
319 Overfull \hbox (16.00003pt too wide) in paragraph at lines 383--385
320 [][]\OT1/pcr/m/n/10 function (fmt, ...) print (string.format (fmt, ...)) end
321  []
322
323
324 Overfull \hbox (88.00003pt too wide) in paragraph at lines 391--391
325  []                    \OT1/pcr/m/n/10 `Call{ `Index{ `Id "string", `String "fo
326 rmat" },[] 
327  []
328
329
330 Overfull \hbox (3.18822pt too wide) in paragraph at lines 393--397
331 [][]\OT1/pcr/m/n/10 function f (x) return x end \OT1/ppl/m/n/10 is not an ex-pr
332 es-sion, but a state-ment:
333  []
334
335
336 Overfull \hbox (51.02776pt too wide) in paragraph at lines 393--397
337 \OT1/ppl/m/n/10 it is ac-tu-ally syn-tax sugar for the as-sign-ment []\OT1/pcr/
338 m/n/10 f = function (x) return x end\OT1/ppl/m/n/10 ,
339  []
340
341
342 Overfull \hbox (22.00003pt too wide) in paragraph at lines 400--400
343  []      \OT1/pcr/m/n/10 { `Function{ { `Id x } { `Return{ `Id "x" } } } } }[] 
344
345  []
346
347
348 Overfull \hbox (9.95673pt too wide) in paragraph at lines 407--414
349  \OT1/ppl/b/n/10 Paren-the-ses[] \OT1/ppl/m/n/10 In Lua, paren-the-ses are some
350 -times se-man-ti-cally mean-ing-ful: when
351  []
352
353
354 Overfull \hbox (0.51523pt too wide) in paragraph at lines 407--414
355 \OT1/ppl/m/n/10 the paren-the-sised ex-pres-sion re-turns mul-ti-ple val-ues, p
356 utting it be-tween paren-
357  []
358
359
360 Overfull \hbox (0.88937pt too wide) in paragraph at lines 407--414
361 \OT1/pcr/m/n/10 f() return 1, 2, 3 end; return \OMS/cmsy/m/n/10 f \OT1/pcr/m/n/
362 10 f() \OMS/cmsy/m/n/10 g\OT1/ppl/m/n/10 '' will re-turn ``\OMS/cmsy/m/n/10 f\O
363 T1/pcr/m/n/10 1, 2, 3\OMS/cmsy/m/n/10 g\OT1/ppl/m/n/10 '',
364  []
365
366
367 Overfull \hbox (15.64977pt too wide) in paragraph at lines 407--414
368 \OT1/ppl/m/n/10 whereas ``\OT1/pcr/m/n/10 local function f() return 1, 2, 3 end
369 ; return \OMS/cmsy/m/n/10 f \OT1/pcr/m/n/10 (f())
370  []
371
372 [18]
373 Overfull \hbox (105.0pt too wide) in paragraph at lines 423--423
374 []                          \OT1/pcr/m/n/10 `Return{ `Number 1, `Number 2, `Num
375 ber 3 } } } },[] 
376  []
377
378
379 Overfull \hbox (12.50003pt too wide) in paragraph at lines 442--444
380 []\OT1/pcr/m/n/10 `Set{ { `Index{ `Id "x", `Number 1 } }, { `Number 2 } }\OT1/p
381 pl/m/n/10 ; 
382  []
383
384
385 Overfull \hbox (0.50003pt too wide) in paragraph at lines 445--447
386 []\OT1/pcr/m/n/10 `Set{ { `Id "a",`Id "b" }, { `Number 1, `Number 2 } }\OT1/ppl
387 /m/n/10 ; 
388  []
389
390
391 Overfull \hbox (18.50003pt too wide) in paragraph at lines 448--450
392 []\OT1/pcr/m/n/10 `Set{ { `Id "a" }, { `Number 1, `Number 2, `Number 3 } }\OT1/
393 ppl/m/n/10 ; 
394  []
395
396
397 Overfull \hbox (95.70926pt too wide) in paragraph at lines 451--454
398 [][]\OT1/pcr/m/n/10 function f(x) return x end \OT1/ppl/m/n/10 is syn-tax sugar
399  for []\OT1/pcr/m/n/10 f = function (x) return x end\OT1/ppl/m/n/10 ,
400  []
401
402
403 Overfull \hbox (100.00003pt too wide) in paragraph at lines 451--454
404 []\OT1/pcr/m/n/10 `Set{ { `Id "f" }, { `Function{ { `Id x } { `Return{ `Id "x" 
405 } } } } } 
406  []
407
408
409 Overfull \hbox (6.48944pt too wide) in paragraph at lines 455--458
410 []\OT1/pcr/m/n/10 o["f"] = function (self, x) return x end\OT1/ppl/m/n/10 , and
411  as such, is rep-
412  []
413
414 [19]
415 Overfull \hbox (28.62933pt too wide) in paragraph at lines 474--476
416 [][]\OT1/pcr/m/n/10 local x=2 \OT1/ppl/m/n/10 is rep-re-sented as []\OT1/pcr/m/
417 n/10 `Local{ { `Id "x" }, { `Number 2 } }\OT1/ppl/m/n/10 ; 
418  []
419
420
421 Overfull \hbox (22.62933pt too wide) in paragraph at lines 477--479
422 [][]\OT1/pcr/m/n/10 local a, b \OT1/ppl/m/n/10 is rep-re-sented as []\OT1/pcr/m
423 /n/10 `Local{ { `Id "a",`Id "b" }, { } }\OT1/ppl/m/n/10 ; 
424  []
425
426
427 Overfull \hbox (9.0pt too wide) in paragraph at lines 500--500
428 []                        \OT1/pcr/m/n/10 { `Call{ `Id "f", `Id "x" } } } } }[]
429  
430  []
431
432 LaTeX Font Info:    Font shape `OT1/ppl/bx/it' in size <10> not available
433 (Font)              Font shape `OT1/ppl/b/it' tried instead on input line 505.
434 [20]
435 Overfull \hbox (18.77942pt too wide) in paragraph at lines 549--552
436  \OT1/ppl/b/n/10 For state-ments[] \OT1/pcr/m/n/10 for x=<first>,<last>,<step> 
437 do <foo>; <bar>; ...
438  []
439
440
441 Overfull \hbox (0.12932pt too wide) in paragraph at lines 549--552
442 \OT1/pcr/m/n/10 end \OT1/ppl/m/n/10 is rep-re-sented as \OT1/pcr/m/n/10 `Fornum
443 \OMS/cmsy/m/n/10 f \OT1/pcr/m/n/10 `Id "x", <first>, <last>, <step>,
444  []
445
446
447 Overfull \hbox (15.00009pt too wide) in paragraph at lines 562--565
448 \OT1/pcr/m/n/10 `Forin\OMS/cmsy/m/n/10 f f\OT1/pcr/m/n/10 `Id "x1",`Id "x2",...
449 \OMS/cmsy/m/n/10 g\OT1/pcr/m/n/10 , \OMS/cmsy/m/n/10 f \OT1/pcr/m/n/10 <e1>, <e
450 2>,... \OMS/cmsy/m/n/10 g f \OT1/pcr/m/n/10 <foo>,
451  []
452
453 [21]
454 Overfull \hbox (122.0293pt too wide) in paragraph at lines 577--579
455 [][]\OT1/pcr/m/n/10 if <foo> then <bar>; <baz> end \OT1/ppl/m/n/10 is rep-re-se
456 nted as: []\OT1/pcr/m/n/10 `If{ <foo>, { <bar>, <baz> } }\OT1/ppl/m/n/10 ; 
457  []
458
459
460 Overfull \hbox (7.08931pt too wide) in paragraph at lines 580--583
461 [][]\OT1/pcr/m/n/10 if <foo> then <bar1> else <bar2>; <baz2> end \OT1/ppl/m/n/1
462 0 is rep-re-sented
463  []
464
465
466 Overfull \hbox (82.00003pt too wide) in paragraph at lines 585--588
467 [][]\OT1/pcr/m/n/10 if <foo1> then <bar1>; <baz1> elseif <foo2> then <bar2>; <b
468 az2> end 
469  []
470
471
472 Overfull \hbox (42.50003pt too wide) in paragraph at lines 585--588
473 []\OT1/pcr/m/n/10 `If{ <foo1>, { <bar1>, <baz1> }, <foo2>,{ <bar2>, <baz2> } }\
474 OT1/ppl/m/n/10 ; 
475  []
476
477
478 Overfull \hbox (25.56914pt too wide) in paragraph at lines 609--611
479  \OT1/ppl/b/n/10 Ex-am-ple[] \OT1/pcr/m/n/10 return 1, 2, 3 \OT1/ppl/m/n/10 is 
480 rep-re-sented as \OT1/pcr/m/n/10 `Return\OMS/cmsy/m/n/10 f \OT1/pcr/m/n/10 `Num
481 ber 1, `Number
482  []
483
484
485 Overfull \hbox (4.76651pt too wide) in paragraph at lines 625--629
486 []\OT1/ppl/m/n/10 Identifiers, string AST or plain strings are equiv-a-lent: ``
487 \OT1/pcr/m/n/10 `Label\OMS/cmsy/m/n/10 f \OT1/pcr/m/n/10 `Id "foo"\OMS/cmsy/m/n
488 /10 g\OT1/ppl/m/n/10 ''
489  []
490
491
492 Overfull \hbox (2.47899pt too wide) in paragraph at lines 625--629
493 \OT1/ppl/m/n/10 is syn-ony-mous for ``\OT1/pcr/m/n/10 `Label\OMS/cmsy/m/n/10 f 
494 \OT1/pcr/m/n/10 `String "foo"\OMS/cmsy/m/n/10 g\OT1/ppl/m/n/10 '' and ``\OT1/pc
495 r/m/n/10 `Label "foo"\OT1/ppl/m/n/10 ''. The
496  []
497
498 [22]) [23]
499 \openout2 = `meta.aux'.
500
501  (./meta.tex
502 Overfull \hbox (7.37595pt too wide) in paragraph at lines 2--5
503 \OT1/ppl/m/n/10 As the pre-vi-ous sec-tion shows, AST are not ex-tremely read-a
504 ble, and as promized,
505  []
506
507 [24
508
509
510 ]
511 Overfull \hbox (45.0pt too wide) in paragraph at lines 68--68
512 []\OT1/pcr/m/n/10 Y = `Let{ { `Id "four" }, { `Op{ `Add, `Number 2, `Number 2 }
513  } }[] 
514  []
515
516
517 Overfull \hbox (51.0pt too wide) in paragraph at lines 68--68
518 []\OT1/pcr/m/n/10 X = +{ 2+2 };                          Y = +{stat: four = -{ 
519 X } }[] 
520  []
521
522
523 Overfull \hbox (51.0pt too wide) in paragraph at lines 68--68
524 []\OT1/pcr/m/n/10 X = `Op{ `Add, +{2}, +{2} };           Y = +{stat: four = -{ 
525 X } }[] 
526  []
527
528
529 Overfull \hbox (51.0pt too wide) in paragraph at lines 68--68
530 []\OT1/pcr/m/n/10 X = `Op{ `Add, `Number 2, `Number 2 }; Y = +{stat: four = -{ 
531 X } }[] 
532  []
533
534
535 Overfull \hbox (9.0pt too wide) in paragraph at lines 68--68
536 []\OT1/pcr/m/n/10 Y = +{stat: four = -{ `Op{ `Add, `Number 2, `Number 2 } } }[]
537  
538  []
539
540
541 Overfull \hbox (39.0pt too wide) in paragraph at lines 68--68
542 []\OT1/pcr/m/n/10 Y = +{stat: four = -{ +{ -{ +{ -{ +{ -{ +{ 2+2 } } } } } } } 
543 } }[] 
544  []
545
546
547 Overfull \hbox (141.0pt too wide) in paragraph at lines 79--79
548 []\OT1/pcr/m/n/10 Y = +{stat: four = -{block: local two=`Number 2; return `Op{ 
549 `Add, two, two } } }[] 
550  []
551
552
553 Overfull \hbox (27.0pt too wide) in paragraph at lines 109--109
554 []\OT1/pcr/m/n/10 +-----------+    /      \    +---+    /        \    +--------
555 +[] 
556  []
557
558
559 Overfull \hbox (27.0pt too wide) in paragraph at lines 109--109
560 []\OT1/pcr/m/n/10 |SOURCE FILE|-->< Parser >-->|AST|-->< Compiler >-->|BYTECODE
561 |[] 
562  []
563
564
565 Overfull \hbox (27.0pt too wide) in paragraph at lines 109--109
566 []\OT1/pcr/m/n/10 +-----------+    \______/    +---+    \________/    +--------
567 +[] 
568  []
569
570 [25]
571 Overfull \hbox (33.0pt too wide) in paragraph at lines 128--128
572 []                                                     \OT1/pcr/m/n/10 +-------
573 -+[] 
574  []
575
576
577 Overfull \hbox (33.0pt too wide) in paragraph at lines 128--128
578 []                  \OT1/pcr/m/n/10 ______               ________   +->|BYTECOD
579 E|[] 
580  []
581
582
583 Overfull \hbox (33.0pt too wide) in paragraph at lines 128--128
584 []\OT1/pcr/m/n/10 +-----------+    /      \    +---+    /        \  |  +-------
585 -+[] 
586  []
587
588
589 Overfull \hbox (33.0pt too wide) in paragraph at lines 128--128
590 []\OT1/pcr/m/n/10 +-----------+    \______/    +-^-+    \________/  |  +-------
591 -+[] 
592  []
593
594
595 Overfull \hbox (33.0pt too wide) in paragraph at lines 128--128
596 []                              \OT1/pcr/m/n/10 /|\      ________   +->|BYTECOD
597 E|[] 
598  []
599
600
601 Overfull \hbox (33.0pt too wide) in paragraph at lines 128--128
602 []                               \OT1/pcr/m/n/10 |      /        \     +---+---
603 -+[] 
604  []
605
606
607 Overfull \hbox (3.0pt too wide) in paragraph at lines 128--128
608 []                               \OT1/pcr/m/n/10 +-----<   Eval   ><-------+[] 
609
610  []
611
612
613 Underfull \hbox (badness 10000) in paragraph at lines 134--134
614
615  []
616
617
618 Overfull \hbox (47.00006pt too wide) in paragraph at lines 137--137
619 []\OT1/pcr/m/n/10 -\OMS/cmsy/m/n/10 f\OT1/pcr/m/n/10 block: print "META HELLO";
620  return +\OMS/cmsy/m/n/10 f \OT1/pcr/m/n/10 print "GENERATED HELLO" \OMS/cmsy/m
621 /n/10 g g[] 
622  []
623
624
625 Underfull \hbox (badness 10000) in paragraph at lines 149--150
626
627  []
628
629
630 Overfull \hbox (74.17773pt too wide) in paragraph at lines 159--163
631 \OT1/ppl/m/n/10 piler is the AST rep-re-sent-ing []\OT1/pcr/m/n/10 print "GENER
632 ATED HELLO"; []print "NORMAL HELLO"\OT1/ppl/m/n/10 . 
633  []
634
635 [26]
636 Overfull \hbox (25.81767pt too wide) in paragraph at lines 186--189
637 []\OT1/ppl/m/n/10 Here is the prob-lem: in Lua, choices are made by us-ing []\O
638 T1/pcr/m/n/10 if _ then _ else _ end
639  []
640
641
642 Underfull \hbox (badness 10000) in paragraph at lines 213--213
643
644  []
645
646 [27]
647 Overfull \hbox (21.0pt too wide) in paragraph at lines 217--217
648 []  \OT1/pcr/m/n/10 -- Declaring the [ternary] metafunction. As a metafunction,
649 [] 
650  []
651
652
653 Overfull \hbox (49.00003pt too wide) in paragraph at lines 218--218
654 []  \OT1/pcr/m/n/10 -- it only exists within -\OMS/cmsy/m/n/10 f\OT1/pcr/m/n/10
655  ...\OMS/cmsy/m/n/10 g\OT1/pcr/m/n/10 , i.e. not in the program itself.[] 
656  []
657
658
659 Overfull \hbox (7.00012pt too wide) in paragraph at lines 225--225
660 []\OT1/pcr/m/n/10 hi = -\OMS/cmsy/m/n/10 f \OT1/pcr/m/n/10 ternary ( +\OMS/cmsy
661 /m/n/10 f\OT1/pcr/m/n/10 lang=="fr"\OMS/cmsy/m/n/10 g\OT1/pcr/m/n/10 , +\OMS/cm
662 sy/m/n/10 f\OT1/pcr/m/n/10 "Bonjour"\OMS/cmsy/m/n/10 g\OT1/pcr/m/n/10 , +\OMS/c
663 msy/m/n/10 f\OT1/pcr/m/n/10 "Hello"\OMS/cmsy/m/n/10 g\OT1/pcr/m/n/10 ) \OMS/cms
664 y/m/n/10 g[] 
665  []
666
667
668 Overfull \hbox (7.00012pt too wide) in paragraph at lines 229--229
669 []\OT1/pcr/m/n/10 hi = -\OMS/cmsy/m/n/10 f \OT1/pcr/m/n/10 ternary ( +\OMS/cmsy
670 /m/n/10 f\OT1/pcr/m/n/10 lang=="fr"\OMS/cmsy/m/n/10 g\OT1/pcr/m/n/10 , +\OMS/cm
671 sy/m/n/10 f\OT1/pcr/m/n/10 "Bonjour"\OMS/cmsy/m/n/10 g\OT1/pcr/m/n/10 , +\OMS/c
672 msy/m/n/10 f\OT1/pcr/m/n/10 "Hello"\OMS/cmsy/m/n/10 g\OT1/pcr/m/n/10 ) \OMS/cms
673 y/m/n/10 g[] 
674  []
675
676
677 Underfull \hbox (badness 10000) in paragraph at lines 240--241
678
679  []
680
681
682 Overfull \hbox (10.44992pt too wide) in paragraph at lines 249--257
683 []\OT1/pcr/m/n/10 x=x+1 \OT1/ppl/m/n/10 is []\OT1/pcr/m/n/10 `Let{ { `Id x }, {
684  `Op{ `Add, `Id x, `Number 1 } } }\OT1/ppl/m/n/10 .
685  []
686
687
688 Underfull \hbox (badness 10000) in paragraph at lines 258--258
689
690  []
691
692 [28]
693 Overfull \hbox (13.00012pt too wide) in paragraph at lines 265--265
694 []      \OT1/pcr/m/n/10 return `Let\OMS/cmsy/m/n/10 f f \OT1/pcr/m/n/10 var \OM
695 S/cmsy/m/n/10 g\OT1/pcr/m/n/10 , \OMS/cmsy/m/n/10 f \OT1/pcr/m/n/10 `Op\OMS/cms
696 y/m/n/10 f \OT1/pcr/m/n/10 `Add, var, `Number 1 \OMS/cmsy/m/n/10 g g g[] 
697  []
698
699
700 Underfull \hbox (badness 10000) in paragraph at lines 280--281
701
702  []
703
704 ) [29] [30
705
706
707 ]
708 Chapter 1.
709 LaTeX Font Info:    Font shape `OT1/ppl/bx/n' in size <20.74> not available
710 (Font)              Font shape `OT1/ppl/b/n' tried instead on input line 37.
711 [31]
712 \openout2 = `gg-ref.aux'.
713
714  (./gg-ref.tex
715 Overfull \hbox (69.0pt too wide) in paragraph at lines 54--54
716 []                         \OT1/pcr/m/n/10 func_params_content, ")", mlp.block,
717  "end" }[] 
718  []
719
720
721 Overfull \hbox (3.0pt too wide) in paragraph at lines 54--54
722 []\OT1/pcr/m/n/10 func_stat = gg.sequence{ "local", "function", mlp.id, "(",[] 
723
724  []
725
726
727 Overfull \hbox (69.0pt too wide) in paragraph at lines 54--54
728 []                         \OT1/pcr/m/n/10 func_params_content, ")", mlp.block,
729  "end" }[] 
730  []
731
732 [32
733
734 ]
735 Overfull \hbox (3.68726pt too wide) in paragraph at lines 80--85
736 \OT1/ppl/m/n/10 and the builder re-turns \OT1/pcr/m/n/10 x\OT1/ppl/m/n/10 , the
737 n the whole parser re-turns \OT1/pcr/m/n/10 f3(f2(f1(x)))\OT1/ppl/m/n/10 . 
738  []
739
740
741 Overfull \hbox (0.7478pt too wide) in paragraph at lines 100--102
742 []\OT1/ppl/m/n/10 It can also be di-rectly called as sim-ply []\OT1/pcr/m/n/10 
743 x(lexer) \OT1/ppl/m/n/10 in-stead of []\OT1/pcr/m/n/10 x:parse(lexer)\OT1/ppl/m
744 /n/10 . 
745  []
746
747 [33]
748 Overfull \hbox (39.0pt too wide) in paragraph at lines 125--125
749 []  \OT1/pcr/m/n/10 mlp.do_stat, mlp.while_stat, mlp.repeat_stat, mlp.if_stat..
750 . }[] 
751  []
752
753
754 Overfull \hbox (25.36647pt too wide) in paragraph at lines 133--143
755 \OT1/ppl/m/n/10 struc-tor, and are con-verted into se-quence parsers on-the-fly
756  by call-ing []\OT1/pcr/m/n/10 gg.sequence
757  []
758
759
760 Overfull \hbox (2.07597pt too wide) in paragraph at lines 153--159
761 \OT1/ppl/m/n/10 turn value is re-turned as the parser's re-sult. If ab-sent, th
762 e se-lected parser's
763  []
764
765
766 Overfull \hbox (62.307pt too wide) in paragraph at lines 153--159
767 \OT1/ppl/m/n/10 re-sult is sim-ply re-turned. It can be up-dated at any-time wi
768 th []\OT1/pcr/m/n/10 x.builder = <newval>\OT1/ppl/m/n/10 . 
769  []
770
771
772 Overfull \hbox (58.00003pt too wide) in paragraph at lines 159--163
773 []\OT1/pcr/m/n/10 builder = function(x) return { tag = "foobar"; unpack (x) } e
774 nd 
775  []
776
777 [34]
778 Overfull \hbox (0.7478pt too wide) in paragraph at lines 179--181
779 []\OT1/ppl/m/n/10 It can also be di-rectly called as sim-ply []\OT1/pcr/m/n/10 
780 x(lexer) \OT1/ppl/m/n/10 in-stead of []\OT1/pcr/m/n/10 x:parse(lexer)\OT1/ppl/m
781 /n/10 . 
782  []
783
784
785 Overfull \hbox (11.24693pt too wide) in paragraph at lines 188--194
786 []\OT1/ppl/m/n/10 Take a se-quence parser, or a con-fig ta-ble that would be ac
787 -cepted by []\OT1/pcr/m/n/10 gg.sequence
788  []
789
790 [35] [36]
791 Overfull \hbox (58.00003pt too wide) in paragraph at lines 284--288
792 []\OT1/pcr/m/n/10 builder = function(x) return { tag = "foobar"; unpack (x) } e
793 nd 
794  []
795
796
797 Overfull \hbox (0.7478pt too wide) in paragraph at lines 308--310
798 []\OT1/ppl/m/n/10 It can also be di-rectly called as sim-ply []\OT1/pcr/m/n/10 
799 x(lexer) \OT1/ppl/m/n/10 in-stead of []\OT1/pcr/m/n/10 x:parse(lexer)\OT1/ppl/m
800 /n/10 . 
801  []
802
803 [37]
804 Overfull \hbox (69.0pt too wide) in paragraph at lines 341--345
805 []\OT1/pcr/m/n/10 { "+",  prec=60, assoc="left", builder= |a, _, b| `Op{ `Add, 
806 a, b } } 
807  []
808
809
810 Overfull \hbox (5.62663pt too wide) in paragraph at lines 348--351
811  \OT1/ppl/b/n/10 In-fix op-er-a-tors[] \OT1/ppl/m/n/10 In-fix op-er-a-tors are 
812 de-scribed by a ta-ble whose array-part works
813  []
814
815
816 Overfull \hbox (4.10693pt too wide) in paragraph at lines 353--357
817 [][]\OT1/pcr/m/n/10 prec = <number> \OT1/ppl/m/n/10 its prece-dence. The higher
818  the prece-dence, the tighter
819  []
820
821 [38]
822 Overfull \hbox (20.18748pt too wide) in paragraph at lines 397--399
823  \OT1/ppl/b/n/10 Suf-fix op-er-a-tors[] \OT1/ppl/m/n/10 Same as pre-fix op-er-a
824 -tors, ex-cept that []\OT1/pcr/m/n/10 builder \OT1/ppl/m/n/10 takes \OT1/pcr/m/
825 n/10 |operand,
826  []
827
828 [39]
829 Overfull \hbox (0.7478pt too wide) in paragraph at lines 443--445
830 []\OT1/ppl/m/n/10 It can also be di-rectly called as sim-ply []\OT1/pcr/m/n/10 
831 x(lexer) \OT1/ppl/m/n/10 in-stead of []\OT1/pcr/m/n/10 x:parse(lexer)\OT1/ppl/m
832 /n/10 . 
833  []
834
835 [40]
836 Overfull \hbox (0.7478pt too wide) in paragraph at lines 488--490
837 []\OT1/ppl/m/n/10 It can also be di-rectly called as sim-ply []\OT1/pcr/m/n/10 
838 x(lexer) \OT1/ppl/m/n/10 in-stead of []\OT1/pcr/m/n/10 x:parse(lexer)\OT1/ppl/m
839 /n/10 . 
840  []
841
842 ) [41]
843 \openout2 = `mlp-ref.aux'.
844
845  (./mlp-ref.tex
846 Underfull \hbox (badness 2426) in paragraph at lines 33--33
847 \OT1/ppl/m/n/10 ments' open-ning paren-the-sis to the fi-nal
848  []
849
850
851 Underfull \hbox (badness 1642) in paragraph at lines 33--33
852 \OT1/pcr/m/n/10 end\OT1/ppl/m/n/10 , but ex-clud-ing the ini-tial \OT1/pcr/m/n/
853 10 function
854  []
855
856
857 Underfull \hbox (badness 4805) in paragraph at lines 33--33
858 \OT1/ppl/m/n/10 key-word, so that it can be used both
859  []
860
861
862 Underfull \hbox (badness 2922) in paragraph at lines 33--33
863 \OT1/ppl/m/n/10 for anony-mous func-tions, for \OT1/pcr/m/n/10 function
864  []
865
866
867 Underfull \hbox (badness 10000) in paragraph at lines 33--33
868 \OT1/pcr/m/n/10 some[]name(...) end \OT1/ppl/m/n/10 and for \OT1/pcr/m/n/10 loc
869 al
870  []
871
872
873 Underfull \hbox (badness 1147) in paragraph at lines 65--65
874 []\OT1/ppl/m/n/10 Try to read an iden-ti-fier, or an iden-ti-fier
875  []
876
877
878 Overfull \hbox (40.1871pt too wide) in paragraph at lines 23--71
879 [] 
880  []
881
882
883 Underfull \hbox (badness 4279) in paragraph at lines 78--78
884 []\OT1/ppl/m/n/10 Read a se-quence of state-ments, op-tion-
885  []
886
887
888 Underfull \hbox (badness 10000) in paragraph at lines 78--78
889 \OT1/ppl/m/n/10 ally sep-a-rated by semi-colons. When
890  []
891
892
893 Underfull \hbox (badness 4805) in paragraph at lines 78--78
894 \OT1/ppl/m/n/10 in-tro-duc-ing syn-tax ex-ten-sions, it's of-ten
895  []
896
897
898 Underfull \hbox (badness 2591) in paragraph at lines 78--78
899 \OT1/ppl/m/n/10 nec-es-sary to add block ter-mi-na-tors with
900  []
901
902
903 Overfull \hbox (53.21857pt too wide) in paragraph at lines 74--83
904 [] 
905  []
906
907
908 Underfull \vbox (badness 4341) has occurred while \output is active []
909
910  [42
911
912
913 ])
914 [43]
915 \openout2 = `stdlib.aux'.
916
917  (./stdlib.tex
918 Underfull \hbox (badness 10000) in paragraph at lines 12--13
919
920  []
921
922
923 Underfull \hbox (badness 10000) in paragraph at lines 17--18
924
925  []
926
927
928 Underfull \hbox (badness 10000) in paragraph at lines 22--23
929
930  []
931
932
933 Underfull \hbox (badness 10000) in paragraph at lines 29--30
934
935  []
936
937
938 Underfull \hbox (badness 10000) in paragraph at lines 34--35
939
940  []
941
942
943 Underfull \hbox (badness 10000) in paragraph at lines 39--40
944
945  []
946
947
948 Underfull \hbox (badness 10000) in paragraph at lines 43--44
949
950  []
951
952 [44
953
954
955 ]
956 Overfull \hbox (34.82903pt too wide) in paragraph at lines 48--50
957 []\OT1/pcr/m/n/10 for x in values(t) do [...] end \OT1/ppl/m/n/10 is equiv-a-le
958 nt to \OT1/pcr/m/n/10 for [], x in pairs(t)
959  []
960
961
962 Underfull \hbox (badness 10000) in paragraph at lines 51--52
963
964  []
965
966
967 Overfull \hbox (22.82903pt too wide) in paragraph at lines 57--59
968 []\OT1/pcr/m/n/10 for k in keys(t) do [...] end \OT1/ppl/m/n/10 is equiv-a-lent
969  to \OT1/pcr/m/n/10 for k, [] in pairs(t)
970  []
971
972
973 Underfull \hbox (badness 10000) in paragraph at lines 61--62
974
975  []
976
977
978 Underfull \hbox (badness 10000) in paragraph at lines 66--67
979
980  []
981
982
983 Underfull \hbox (badness 10000) in paragraph at lines 70--71
984
985  []
986
987
988 Underfull \hbox (badness 10000) in paragraph at lines 80--81
989
990  []
991
992 [45]
993 Underfull \hbox (badness 10000) in paragraph at lines 106--107
994
995  []
996
997
998 Overfull \hbox (15.66942pt too wide) in paragraph at lines 111--113
999 []\OT1/ppl/m/n/10 For in-stance, \OT1/pcr/m/n/10 table.imap((|x,y|x+y), 2, \OMS
1000 /cmsy/m/n/10 f\OT1/pcr/m/n/10 "foo", 1, 2, 3\OMS/cmsy/m/n/10 g\OT1/pcr/m/n/10 ,
1001  \OMS/cmsy/m/n/10 f\OT1/pcr/m/n/10 "bar",
1002  []
1003
1004
1005 Underfull \hbox (badness 10000) in paragraph at lines 114--115
1006
1007  []
1008
1009
1010 Overfull \hbox (17.5pt too wide) in paragraph at lines 122--127
1011 \OT1/pcr/m/n/10 table.ifold( (|acc, xi, yi| acc + max (xi, yi)), 0, 2, x, y)\OT
1012 1/ppl/m/n/10 . 
1013  []
1014
1015
1016 Underfull \hbox (badness 10000) in paragraph at lines 128--129
1017
1018  []
1019
1020
1021 Underfull \hbox (badness 10000) in paragraph at lines 135--136
1022
1023  []
1024
1025 [46]
1026 Underfull \hbox (badness 10000) in paragraph at lines 140--141
1027
1028  []
1029
1030
1031 Underfull \hbox (badness 10000) in paragraph at lines 145--146
1032
1033  []
1034
1035
1036 Overfull \hbox (2.17764pt too wide) in paragraph at lines 147--149
1037 []\OT1/ppl/m/n/10 Flatten a list of lists into a list. for in-stance, \OT1/pcr/
1038 m/n/10 table.iflatten\OMS/cmsy/m/n/10 ff\OT1/pcr/m/n/10 1,2\OMS/cmsy/m/n/10 g\O
1039 T1/pcr/m/n/10 , \OMS/cmsy/m/n/10 f\OT1/pcr/m/n/10 3,4\OMS/cmsy/m/n/10 gg
1040  []
1041
1042
1043 Underfull \hbox (badness 10000) in paragraph at lines 155--156
1044
1045  []
1046
1047
1048 Underfull \hbox (badness 10000) in paragraph at lines 160--161
1049
1050  []
1051
1052
1053 Underfull \hbox (badness 10000) in paragraph at lines 165--166
1054
1055  []
1056
1057
1058 Underfull \hbox (badness 10000) in paragraph at lines 171--172
1059
1060  []
1061
1062
1063 Underfull \hbox (badness 10000) in paragraph at lines 177--178
1064
1065  []
1066
1067 [47]
1068 Underfull \hbox (badness 10000) in paragraph at lines 182--183
1069
1070  []
1071
1072
1073 Underfull \hbox (badness 10000) in paragraph at lines 191--192
1074
1075  []
1076
1077
1078 Underfull \hbox (badness 10000) in paragraph at lines 202--203
1079
1080  []
1081
1082 [48]
1083 Overfull \hbox (5.48813pt too wide) in paragraph at lines 221--229
1084 \OT1/ppl/m/n/10 aliases to other stan-dard func-tions such as \OT1/pcr/m/n/10 l
1085 oadstring() \OT1/ppl/m/n/10 or \OT1/pcr/m/n/10 string.dump()\OT1/ppl/m/n/10 ;
1086  []
1087
1088 ) [49]
1089 \openout2 = `clopts-ref.aux'.
1090
1091  (./clopts-ref.tex) [50
1092
1093
1094 ]
1095 \openout2 = `springs-ref.aux'.
1096
1097  (./springs-ref.tex
1098 Overfull \hbox (2.28566pt too wide) in paragraph at lines 21--23
1099 \OT1/ppl/m/n/10 Notice how-ever that the Pluto ver-sion used in met-alua has si
1100 g-nif-i-cantly patched
1101  []
1102
1103 ) [51
1104
1105
1106 ]
1107 \openout2 = `walk-ref.aux'.
1108
1109  (./walk-ref.tex
1110 Overfull \hbox (1.67618pt too wide) in paragraph at lines 3--12
1111 \OT1/ppl/m/n/10 check for some prop-erty, you of-ten need to de-sign a func-tio
1112 n that walks through
1113  []
1114
1115 [52
1116
1117
1118 ]
1119 Overfull \hbox (19.36885pt too wide) in paragraph at lines 74--79
1120 \OT1/ppl/m/n/10 There are 3 main tree walk-ers: \OT1/pcr/m/n/10 walk.expr()\OT1
1121 /ppl/m/n/10 , \OT1/pcr/m/n/10 walk.stat() \OT1/ppl/m/n/10 and \OT1/pcr/m/n/10 w
1122 alk.block()\OT1/ppl/m/n/10 ,
1123  []
1124
1125
1126 Overfull \hbox (3.61923pt too wide) in paragraph at lines 80--85
1127 []\OT1/pcr/m/n/10 cfg.stat.down(node, parent, grandparent...)\OT1/ppl/m/n/10 , 
1128 which ap-plies
1129  []
1130
1131
1132 Overfull \hbox (0.66913pt too wide) in paragraph at lines 85--89
1133 []\OT1/pcr/m/n/10 cfg.stat.up(node, parent, grandparent...)\OT1/ppl/m/n/10 , wh
1134 ich is ap-plies
1135  []
1136
1137
1138 Overfull \hbox (3.22891pt too wide) in paragraph at lines 89--94
1139 []\OT1/pcr/m/n/10 cfg.expr.down() \OT1/ppl/m/n/10 and \OT1/pcr/m/n/10 cfg.expr.
1140 up()\OT1/ppl/m/n/10 , which work just as their \OT1/pcr/m/n/10 stat
1141  []
1142
1143 [53]
1144 Overfull \hbox (8.72974pt too wide) in paragraph at lines 96--99
1145 []\OT1/pcr/m/n/10 cfg.binder(identifier, id[]parent, id[]grandparent...)\OT1/pp
1146 l/m/n/10 : this
1147  []
1148
1149 [54]
1150 Overfull \hbox (135.0pt too wide) in paragraph at lines 217--217
1151 []\OT1/pcr/m/n/10 -------------------------------------------------------------
1152 -------------------[] 
1153  []
1154
1155
1156 Overfull \hbox (27.0pt too wide) in paragraph at lines 217--217
1157 []\OT1/pcr/m/n/10 -- Scope handling: ':push()' saves the current scope, ':pop()
1158 '[] 
1159  []
1160
1161
1162 Overfull \hbox (57.0pt too wide) in paragraph at lines 217--217
1163 []\OT1/pcr/m/n/10 -- restores the previously saved one. ':add(identifiers_list)
1164 ' adds[] 
1165  []
1166
1167
1168 Overfull \hbox (33.0pt too wide) in paragraph at lines 217--217
1169 []\OT1/pcr/m/n/10 -- identifiers to the current scope. Current scope is stored 
1170 in[] 
1171  []
1172
1173
1174 Overfull \hbox (135.0pt too wide) in paragraph at lines 217--217
1175 []\OT1/pcr/m/n/10 -------------------------------------------------------------
1176 -------------------[] 
1177  []
1178
1179 [55]
1180 Overfull \hbox (33.0pt too wide) in paragraph at lines 217--217
1181 []   \OT1/pcr/m/n/10 table.insert (self.stack, table.shallow_copy (self.current
1182 ))[] 
1183  []
1184
1185
1186 Overfull \hbox (3.0pt too wide) in paragraph at lines 217--217
1187 []      \OT1/pcr/m/n/10 match id with `Id{ x } -> self.current[x] = true end[] 
1188
1189  []
1190
1191
1192 Overfull \hbox (135.0pt too wide) in paragraph at lines 243--243
1193 []      \OT1/pcr/m/n/10 | `Id{ name } -> if not scope.current[name] then freeva
1194 rs[name] = true end[] 
1195  []
1196
1197 [56]
1198 Overfull \hbox (33.98691pt too wide) in paragraph at lines 250--254
1199 \OT1/ppl/m/n/10 when we leave it. That will be done by pro-vid-ing func-tions \
1200 OT1/pcr/m/n/10 cfg.block.down()
1201  []
1202
1203
1204 Overfull \hbox (0.13757pt too wide) in paragraph at lines 250--254
1205 \OT1/ppl/m/n/10 and \OT1/pcr/m/n/10 cfg.block.up()\OT1/ppl/m/n/10 . Sav-ing and
1206  restor-ing will be per-formed by meth-
1207  []
1208
1209
1210 Overfull \hbox (135.0pt too wide) in paragraph at lines 278--278
1211 []   \OT1/pcr/m/n/10 ----------------------------------------------------------
1212 -------------------[] 
1213  []
1214
1215
1216 Overfull \hbox (63.0pt too wide) in paragraph at lines 278--278
1217 []   \OT1/pcr/m/n/10 -- Create a separate scope for each block, close it when l
1218 eaving.[] 
1219  []
1220
1221
1222 Overfull \hbox (135.0pt too wide) in paragraph at lines 278--278
1223 []   \OT1/pcr/m/n/10 ----------------------------------------------------------
1224 -------------------[] 
1225  []
1226
1227 [57]
1228 Overfull \hbox (135.0pt too wide) in paragraph at lines 355--355
1229 []   \OT1/pcr/m/n/10 ----------------------------------------------------------
1230 -------------------[] 
1231  []
1232
1233
1234 Overfull \hbox (93.0pt too wide) in paragraph at lines 355--355
1235 []   \OT1/pcr/m/n/10 -- Check identifiers; add functions parameters to newly cr
1236 eated scope.[] 
1237  []
1238
1239
1240 Overfull \hbox (135.0pt too wide) in paragraph at lines 355--355
1241 []   \OT1/pcr/m/n/10 ----------------------------------------------------------
1242 -------------------[] 
1243  []
1244
1245
1246 Overfull \hbox (135.0pt too wide) in paragraph at lines 355--355
1247 []      \OT1/pcr/m/n/10 | `Id{ name } -> if not scope.current[name] then freeva
1248 rs[name] = true end[] 
1249  []
1250
1251
1252 Overfull \hbox (51.0pt too wide) in paragraph at lines 355--355
1253 []      \OT1/pcr/m/n/10 | `Function{ params, _ } -> scope:push(); scope:add (pa
1254 rams)[] 
1255  []
1256
1257
1258 Overfull \hbox (135.0pt too wide) in paragraph at lines 355--355
1259 []   \OT1/pcr/m/n/10 ----------------------------------------------------------
1260 -------------------[] 
1261  []
1262
1263
1264 Overfull \hbox (135.0pt too wide) in paragraph at lines 355--355
1265 []   \OT1/pcr/m/n/10 ----------------------------------------------------------
1266 -------------------[] 
1267  []
1268
1269
1270 Overfull \hbox (135.0pt too wide) in paragraph at lines 355--355
1271 []   \OT1/pcr/m/n/10 ----------------------------------------------------------
1272 -------------------[] 
1273  []
1274
1275
1276 Overfull \hbox (15.0pt too wide) in paragraph at lines 355--355
1277 []   \OT1/pcr/m/n/10 -- Create a new scope and register loop variable[s] in it[
1278
1279  []
1280
1281
1282 Overfull \hbox (135.0pt too wide) in paragraph at lines 355--355
1283 []   \OT1/pcr/m/n/10 ----------------------------------------------------------
1284 -------------------[] 
1285  []
1286
1287
1288 Overfull \hbox (33.0pt too wide) in paragraph at lines 355--355
1289 []      \OT1/pcr/m/n/10 | `Forin{ vars, ... }    -> scope:push(); scope:add(var
1290 s)[] 
1291  []
1292
1293
1294 Overfull \hbox (27.0pt too wide) in paragraph at lines 355--355
1295 []      \OT1/pcr/m/n/10 | `Fornum{ var, ... }    -> scope:push(); scope:add{var
1296 }[] 
1297  []
1298
1299
1300 Overfull \hbox (135.0pt too wide) in paragraph at lines 355--355
1301 []   \OT1/pcr/m/n/10 ----------------------------------------------------------
1302 -------------------[] 
1303  []
1304
1305
1306 Overfull \hbox (135.0pt too wide) in paragraph at lines 355--355
1307 []   \OT1/pcr/m/n/10 ----------------------------------------------------------
1308 -------------------[] 
1309  []
1310
1311 [58]
1312 Overfull \hbox (135.0pt too wide) in paragraph at lines 355--355
1313 []   \OT1/pcr/m/n/10 ----------------------------------------------------------
1314 -------------------[] 
1315  []
1316
1317
1318 Overfull \hbox (63.0pt too wide) in paragraph at lines 355--355
1319 []   \OT1/pcr/m/n/10 -- Create a separate scope for each block, close it when l
1320 eaving.[] 
1321  []
1322
1323
1324 Overfull \hbox (135.0pt too wide) in paragraph at lines 355--355
1325 []   \OT1/pcr/m/n/10 ----------------------------------------------------------
1326 -------------------[] 
1327  []
1328
1329
1330 Overfull \hbox (135.0pt too wide) in paragraph at lines 385--385
1331 []   \OT1/pcr/m/n/10 ----------------------------------------------------------
1332 -------------------[] 
1333  []
1334
1335
1336 Overfull \hbox (15.0pt too wide) in paragraph at lines 385--385
1337 []   \OT1/pcr/m/n/10 -- Create a new scope and register loop variable[s] in it[
1338
1339  []
1340
1341
1342 Overfull \hbox (135.0pt too wide) in paragraph at lines 385--385
1343 []   \OT1/pcr/m/n/10 ----------------------------------------------------------
1344 -------------------[] 
1345  []
1346
1347
1348 Overfull \hbox (33.0pt too wide) in paragraph at lines 385--385
1349 []      \OT1/pcr/m/n/10 | `Forin{ vars, ... }    -> scope:push(); scope:add(var
1350 s)[] 
1351  []
1352
1353
1354 Overfull \hbox (27.0pt too wide) in paragraph at lines 385--385
1355 []      \OT1/pcr/m/n/10 | `Fornum{ var, ... }    -> scope:push(); scope:add{var
1356 }[] 
1357  []
1358
1359
1360 Overfull \hbox (75.0pt too wide) in paragraph at lines 385--385
1361 []      \OT1/pcr/m/n/10 | `Repeat{ block, cond } -> -- 'cond' is in the scope o
1362 f 'block'[] 
1363  []
1364
1365
1366 Overfull \hbox (93.0pt too wide) in paragraph at lines 385--385
1367 []         \OT1/pcr/m/n/10 for s in values (block) do walk.stat(cfg)(s) end -- 
1368 no new scope[] 
1369  []
1370
1371
1372 Overfull \hbox (117.0pt too wide) in paragraph at lines 385--385
1373 []         \OT1/pcr/m/n/10 return 'break' -- No automatic walking of subparts '
1374 cond' and 'body'[] 
1375  []
1376
1377 [59]
1378 Overfull \hbox (2.89964pt too wide) in paragraph at lines 414--416
1379 []\OT1/pcr/m/n/10 cfg.id.free(identifier, parent, grandparent...)\OT1/ppl/m/n/1
1380 0 , which is
1381  []
1382
1383
1384 Overfull \hbox (18.50003pt too wide) in paragraph at lines 416--419
1385 []\OT1/pcr/m/n/10 cfg.id.bound(identifier, binder, parent, grandparent...)\OT1/
1386 ppl/m/n/10 ,
1387  []
1388
1389 [60]
1390 Overfull \hbox (135.0pt too wide) in paragraph at lines 490--490
1391 []\OT1/pcr/m/n/10 -------------------------------------------------------------
1392 -------------------[] 
1393  []
1394
1395
1396 Overfull \hbox (69.0pt too wide) in paragraph at lines 490--490
1397 []\OT1/pcr/m/n/10 -- bound_vars keeps a binder node -> old_name -> new_name dic
1398 tionary.[] 
1399  []
1400
1401
1402 Overfull \hbox (51.0pt too wide) in paragraph at lines 490--490
1403 []\OT1/pcr/m/n/10 -- It allows to associate all instances of an identifier toge
1404 ther,[] 
1405  []
1406
1407
1408 Overfull \hbox (135.0pt too wide) in paragraph at lines 490--490
1409 []\OT1/pcr/m/n/10 -------------------------------------------------------------
1410 -------------------[] 
1411  []
1412
1413
1414 Overfull \hbox (135.0pt too wide) in paragraph at lines 490--490
1415 []\OT1/pcr/m/n/10 -------------------------------------------------------------
1416 -------------------[] 
1417  []
1418
1419
1420 Overfull \hbox (51.0pt too wide) in paragraph at lines 490--490
1421 []\OT1/pcr/m/n/10 -- local_renames will keep all identifier nodes to rename as 
1422 keys,[] 
1423  []
1424
1425
1426 Overfull \hbox (33.0pt too wide) in paragraph at lines 490--490
1427 []\OT1/pcr/m/n/10 -- and their new name as values. The renaming must happen aft
1428 er[] 
1429  []
1430
1431
1432 Overfull \hbox (87.0pt too wide) in paragraph at lines 490--490
1433 []\OT1/pcr/m/n/10 -- the whole tree has been visited, in order to avoid breakin
1434 g captures.[] 
1435  []
1436
1437
1438 Overfull \hbox (135.0pt too wide) in paragraph at lines 490--490
1439 []\OT1/pcr/m/n/10 -------------------------------------------------------------
1440 -------------------[] 
1441  []
1442
1443
1444 Overfull \hbox (135.0pt too wide) in paragraph at lines 490--490
1445 []\OT1/pcr/m/n/10 -------------------------------------------------------------
1446 -------------------[] 
1447  []
1448
1449
1450 Overfull \hbox (81.0pt too wide) in paragraph at lines 490--490
1451 []\OT1/pcr/m/n/10 -- Associate a new name in bound_vars when a local variable i
1452 s created.[] 
1453  []
1454
1455
1456 Overfull \hbox (135.0pt too wide) in paragraph at lines 490--490
1457 []\OT1/pcr/m/n/10 -------------------------------------------------------------
1458 -------------------[] 
1459  []
1460
1461
1462 Overfull \hbox (99.0pt too wide) in paragraph at lines 490--490
1463 []   \OT1/pcr/m/n/10 local new_name         = mlp.gensym(old_name)[1] -- genera
1464 te a new name[] 
1465  []
1466
1467
1468 Overfull \hbox (87.0pt too wide) in paragraph at lines 490--490
1469 []   \OT1/pcr/m/n/10 binder_table[old_name] = new_name -- remember name for nex
1470 t instances[] 
1471  []
1472
1473
1474 Overfull \hbox (57.0pt too wide) in paragraph at lines 490--490
1475 []   \OT1/pcr/m/n/10 local_renames[id]      = new_name -- add to the rename tod
1476 o-list[] 
1477  []
1478
1479
1480 Overfull \hbox (135.0pt too wide) in paragraph at lines 490--490
1481 []\OT1/pcr/m/n/10 -------------------------------------------------------------
1482 -------------------[] 
1483  []
1484
1485
1486 Overfull \hbox (135.0pt too wide) in paragraph at lines 490--490
1487 []\OT1/pcr/m/n/10 -------------------------------------------------------------
1488 -------------------[] 
1489  []
1490
1491 [61]
1492 Overfull \hbox (39.0pt too wide) in paragraph at lines 490--490
1493 []\OT1/pcr/m/n/10 for id, new_name in pairs(local_renames) do id[1] = new_name 
1494 end[] 
1495  []
1496
1497 ) [62]
1498 Chapter 2.
1499 [63
1500
1501
1502 ]
1503 \openout2 = `match-ref.aux'.
1504
1505  (./match-ref.tex
1506 Overfull \hbox (6.73804pt too wide) in paragraph at lines 14--25
1507 \OT1/ppl/m/n/10 match-ing: it lets you give a list of (\OT1/pcr/m/n/10 pattern 
1508 -> code[]to[]execute[]if[]match\OT1/ppl/m/n/10 )
1509  []
1510
1511
1512 Overfull \hbox (32.70644pt too wide) in paragraph at lines 49--54
1513 []\OT1/ppl/m/n/10 When the match state-ment is ex-e-cuted, the first pat-tern w
1514 hich matches \OT1/pcr/m/n/10 <some[]value>
1515  []
1516
1517 [64
1518
1519 ]
1520 Overfull \hbox (0.31627pt too wide) in paragraph at lines 85--91
1521  \OT1/ppl/b/n/10 Iden-ti-fiers[] \OT1/ppl/m/n/10 The other fun-da-men-tal kind 
1522 of pat-terns are iden-ti-fiers: they match
1523  []
1524
1525
1526 Overfull \hbox (117.0pt too wide) in paragraph at lines 97--97
1527 []\OT1/pcr/m/n/10 | `Local{ identifiers, values } -> table.foreach(identifiers,
1528  |x| print(x[1])[] 
1529  []
1530
1531 [65] [66]
1532 Overfull \hbox (45.0pt too wide) in paragraph at lines 167--167
1533 []\OT1/pcr/m/n/10 | "^(%w+) +(%w+) +(%w+)$"/{ w1, w2, w3 } -> do_stuff (w1, w2,
1534  w3)[] 
1535  []
1536
1537 ) [67]
1538 \openout2 = `dollar-ref.aux'.
1539
1540  (./dollar-ref.tex) [68
1541
1542
1543 ]
1544 \openout2 = `clist-ref.aux'.
1545
1546  (./clist-ref.tex
1547 Overfull \hbox (13.74886pt too wide) in paragraph at lines 43--49
1548 \OT1/ppl/m/n/10 have been \OT1/pcr/m/n/10 y = \OMS/cmsy/m/n/10 f\OT1/pcr/m/n/10
1549  i for i=1,3; i for i=1,3; i for i=1,3\OMS/cmsy/m/n/10 g \OT1/ppl/m/n/10 (no-ti
1550 ce how-
1551  []
1552
1553 [69
1554
1555
1556 ]) [70]
1557 \openout2 = `hygiene-ref.aux'.
1558
1559  (./hygiene-ref.tex) [71
1560
1561
1562 ]
1563 \openout2 = `samples.aux'.
1564
1565  (./samples.tex) [72
1566
1567
1568 ]
1569 \openout2 = `sample-exception.aux'.
1570
1571
1572 (./sample-exception.tex
1573 Overfull \hbox (21.0pt too wide) in paragraph at lines 32--32
1574 []  \OT1/pcr/m/n/10 <exception_1> -> <block of statements handling exception 1>
1575 [] 
1576  []
1577
1578
1579 Overfull \hbox (21.0pt too wide) in paragraph at lines 32--32
1580 []\OT1/pcr/m/n/10 | <exception_2> -> <block of statements handling exception 2>
1581 [] 
1582  []
1583
1584
1585 Overfull \hbox (21.0pt too wide) in paragraph at lines 32--32
1586 []\OT1/pcr/m/n/10 | <exception_n> -> <block of statements handling exception n>
1587 [] 
1588  []
1589
1590
1591 Overfull \hbox (33.0pt too wide) in paragraph at lines 49--49
1592 []   \OT1/pcr/m/n/10 gg.sequence{ "try",  mlp.block,  "with",  gg.optkeyword "|
1593 ",[] 
1594  []
1595
1596
1597 Overfull \hbox (63.0pt too wide) in paragraph at lines 49--49
1598 []                \OT1/pcr/m/n/10 gg.list{ gg.sequence{ mlp.expr,  "->",  mlp.b
1599 lock },[] 
1600  []
1601
1602
1603 Overfull \hbox (45.0pt too wide) in paragraph at lines 49--49
1604 []                         \OT1/pcr/m/n/10 separators = "|", terminators = "end
1605 " },[] 
1606  []
1607
1608 [73
1609
1610
1611 ]
1612 Overfull \hbox (44.87628pt too wide) in paragraph at lines 51--58
1613 \OT1/ppl/m/n/10 word. The parser del-e-gates the build-ing of the re-sult-ing s
1614 tate-ment to \OT1/pcr/m/n/10 trywith[]builder\OT1/ppl/m/n/10 ,
1615  []
1616
1617
1618 Overfull \hbox (0.56863pt too wide) in paragraph at lines 77--80
1619 []\OT1/ppl/m/n/10 The fun-da-men-tal mech-a-nism is \OT1/pcr/m/n/10 pcall(func,
1620  arg1, arg2, ..., argn)\OT1/ppl/m/n/10 :
1621  []
1622
1623 [74]
1624 Overfull \hbox (11.217pt too wide) in paragraph at lines 125--130
1625 []\OT1/ppl/m/n/10 To com-pile a \OT1/pcr/m/n/10 try/with \OT1/ppl/m/n/10 block,
1626  af-ter hav-ing put the guarded block into a \OT1/pcr/m/n/10 pcall()
1627  []
1628
1629
1630 Overfull \hbox (69.0pt too wide) in paragraph at lines 154--154
1631 []\OT1/pcr/m/n/10 | exn_nomorecofee -> print "you shouldn't see that: uncompara
1632 ble exn"[] 
1633  []
1634
1635
1636 Overfull \hbox (87.0pt too wide) in paragraph at lines 154--154
1637 []\OT1/pcr/m/n/10 | exn_nullarg     -> print "you shouldn't see that: too speci
1638 alized exn"[] 
1639  []
1640
1641
1642 Overfull \hbox (51.0pt too wide) in paragraph at lines 154--154
1643 []\OT1/pcr/m/n/10 | exception       -> print "execution should never reach that
1644  far"[] 
1645  []
1646
1647 [75]
1648 Underfull \vbox (badness 10000) has occurred while \output is active []
1649
1650  [76]
1651 Overfull \hbox (15.0pt too wide) in paragraph at lines 219--219
1652 []   \OT1/pcr/m/n/10 ---------------------------------------------------------[
1653
1654  []
1655
1656
1657 Overfull \hbox (15.0pt too wide) in paragraph at lines 219--219
1658 []   \OT1/pcr/m/n/10 ---------------------------------------------------------[
1659
1660  []
1661
1662
1663 Overfull \hbox (15.0pt too wide) in paragraph at lines 219--219
1664 []   \OT1/pcr/m/n/10 ---------------------------------------------------------[
1665
1666  []
1667
1668
1669 Overfull \hbox (33.0pt too wide) in paragraph at lines 219--219
1670 []   \OT1/pcr/m/n/10 -- [catchers] is the big [if] statement which handles erro
1671 rs[] 
1672  []
1673
1674
1675 Overfull \hbox (15.0pt too wide) in paragraph at lines 219--219
1676 []   \OT1/pcr/m/n/10 ---------------------------------------------------------[
1677
1678  []
1679
1680
1681 Overfull \hbox (27.0pt too wide) in paragraph at lines 219--219
1682 []      \OT1/pcr/m/n/10 -- insert the corresponding block to execute on success
1683 :[] 
1684  []
1685
1686
1687 Overfull \hbox (15.0pt too wide) in paragraph at lines 219--219
1688 []   \OT1/pcr/m/n/10 ---------------------------------------------------------[
1689
1690  []
1691
1692
1693 Overfull \hbox (27.0pt too wide) in paragraph at lines 219--219
1694 []   \OT1/pcr/m/n/10 -- Finally, put an [else] block to rethrow uncought errors
1695 :[] 
1696  []
1697
1698
1699 Overfull \hbox (15.0pt too wide) in paragraph at lines 219--219
1700 []   \OT1/pcr/m/n/10 ---------------------------------------------------------[
1701
1702  []
1703
1704
1705 Overfull \hbox (15.0pt too wide) in paragraph at lines 219--219
1706 []   \OT1/pcr/m/n/10 ---------------------------------------------------------[
1707
1708  []
1709
1710
1711 Overfull \hbox (15.0pt too wide) in paragraph at lines 219--219
1712 []   \OT1/pcr/m/n/10 ---------------------------------------------------------[
1713
1714  []
1715
1716
1717 Overfull \hbox (27.0pt too wide) in paragraph at lines 219--219
1718 []      \OT1/pcr/m/n/10 local status, exn  = { pcall (function() -{block} end) 
1719 }[] 
1720  []
1721
1722 [77] [78]
1723 Overfull \hbox (3.47722pt too wide) in paragraph at lines 290--292
1724 []\OT1/ppl/m/n/10 Coroutines can't yield across a \OT1/pcr/m/n/10 pcall()\OT1/p
1725 pl/m/n/10 . There-fore, a yield in the guarded
1726  []
1727
1728
1729 Overfull \hbox (87.0pt too wide) in paragraph at lines 320--320
1730 []   \OT1/pcr/m/n/10 throw (exn_invalid:new "I'm sorry Dave, I'm afraid I can't
1731  do that.")[] 
1732  []
1733
1734
1735 Overfull \hbox (9.0pt too wide) in paragraph at lines 320--320
1736 []\OT1/pcr/m/n/10 | exn_invalid e -> printf ("The computer choked: %s", e[1])[]
1737  
1738  []
1739
1740 [79]) [80]
1741 \openout2 = `sample-match.aux'.
1742
1743  (./sample-match.tex [81
1744
1745
1746 ]
1747 Overfull \hbox (33.0pt too wide) in paragraph at lines 80--80
1748 []   \OT1/pcr/m/n/10 | `Op{ op, a, b } -> return binopfuncs[op](eval(a), eval(b
1749 ))[] 
1750  []
1751
1752 [82]
1753 Overfull \hbox (9.28348pt too wide) in paragraph at lines 166--166
1754 []  \OT1/pcr/m/n/10 if type(v2) == "string" then[] 
1755  []
1756
1757
1758 Overfull \hbox (27.28348pt too wide) in paragraph at lines 166--166
1759 []     \OT1/pcr/m/n/10 if type(v2) == "number" then[] 
1760  []
1761
1762
1763 Overfull \hbox (39.28348pt too wide) in paragraph at lines 166--166
1764 []        \OT1/pcr/m/n/10 if type(v2) == "table" then[] 
1765  []
1766
1767
1768 Overfull \hbox (57.28348pt too wide) in paragraph at lines 166--166
1769 []          \OT1/pcr/m/n/10 if type(v3) == "number" then[] 
1770  []
1771
1772
1773 Overfull \hbox (3.28348pt too wide) in paragraph at lines 166--166
1774 []            \OT1/pcr/m/n/10 if v2 ~= nil then[] 
1775  []
1776
1777
1778 Overfull \hbox (69.28348pt too wide) in paragraph at lines 166--166
1779 []             \OT1/pcr/m/n/10 if type(v2) == "table" then[] 
1780  []
1781
1782
1783 Overfull \hbox (15.28348pt too wide) in paragraph at lines 166--166
1784 []              \OT1/pcr/m/n/10 if v3 ~= nil then[] 
1785  []
1786
1787
1788 Overfull \hbox (3.28348pt too wide) in paragraph at lines 166--166
1789 []               \OT1/pcr/m/n/10 let v2 = v1[4][] 
1790  []
1791
1792
1793 Overfull \hbox (21.28348pt too wide) in paragraph at lines 166--166
1794 []               \OT1/pcr/m/n/10 if v2 ~= nil then[] 
1795  []
1796
1797
1798 Underfull \hbox (badness 10000) in paragraph at lines 104--169
1799
1800  []
1801
1802
1803 Underfull \hbox (badness 10000) in paragraph at lines 104--169
1804
1805  []
1806
1807
1808 Underfull \hbox (badness 10000) in paragraph at lines 104--169
1809
1810  []
1811
1812
1813 Overfull \hbox (2.13712pt too wide) in paragraph at lines 170--174
1814 \OT1/ppl/m/n/10 not put all as-sign-ments on one side, and all tests on an othe
1815 r, e.g. []\OT1/pcr/m/n/10 v2 = v1.tag
1816  []
1817
1818
1819 Underfull \vbox (badness 10000) has occurred while \output is active []
1820
1821  [83]
1822 Overfull \hbox (93.0pt too wide) in paragraph at lines 215--215
1823 []      \OT1/pcr/m/n/10 -------------------------------------------------------
1824 ------------[] 
1825  []
1826
1827
1828 Overfull \hbox (57.0pt too wide) in paragraph at lines 215--215
1829 []      \OT1/pcr/m/n/10 -- Turn a pattern into a list of conditions and assigna
1830 tions,[] 
1831  []
1832
1833
1834 Overfull \hbox (81.0pt too wide) in paragraph at lines 215--215
1835 []      \OT1/pcr/m/n/10 -- stored into [acc]. [n] is the depth of the subpatter
1836 n into the[] 
1837  []
1838
1839
1840 Overfull \hbox (69.0pt too wide) in paragraph at lines 215--215
1841 []      \OT1/pcr/m/n/10 -- toplevel pattern; [tested_term] is the AST of the te
1842 rm to be[] 
1843  []
1844
1845
1846 Overfull \hbox (87.0pt too wide) in paragraph at lines 215--215
1847 []      \OT1/pcr/m/n/10 -- tested; [pattern] is the AST of a pattern, or a subt
1848 ree of that[] 
1849  []
1850
1851
1852 Overfull \hbox (93.0pt too wide) in paragraph at lines 215--215
1853 []      \OT1/pcr/m/n/10 -------------------------------------------------------
1854 ------------[] 
1855  []
1856
1857
1858 Overfull \hbox (57.0pt too wide) in paragraph at lines 215--215
1859 []         \OT1/pcr/m/n/10 if "Number" == pattern.tag or "String" == pattern.ta
1860 g then[] 
1861  []
1862
1863
1864 Overfull \hbox (3.0pt too wide) in paragraph at lines 215--215
1865 []            \OT1/pcr/m/n/10 accumulate (+{stat: local -{pattern} = -{v} })[] 
1866
1867  []
1868
1869
1870 Overfull \hbox (15.0pt too wide) in paragraph at lines 215--215
1871 []               \OT1/pcr/m/n/10 then key = x[1];           sub_pattern = x[2][
1872
1873  []
1874
1875
1876 Overfull \hbox (87.0pt too wide) in paragraph at lines 215--215
1877 []               \OT1/pcr/m/n/10 else key = `Number{ idx }; sub_pattern = x; id
1878 x=idx+1 end[] 
1879  []
1880
1881
1882 Overfull \hbox (15.0pt too wide) in paragraph at lines 215--215
1883 []               \OT1/pcr/m/n/10 accumulate (+{stat: (-{w}) = -{v} [-{key}] })[
1884
1885  []
1886
1887
1888 Overfull \hbox (93.0pt too wide) in paragraph at lines 215--215
1889 []      \OT1/pcr/m/n/10 -------------------------------------------------------
1890 ------------[] 
1891  []
1892
1893
1894 Overfull \hbox (104.39642pt too wide) in paragraph at lines 229--237
1895 []\OT1/ppl/m/n/10 In the quotes, you might no-tice the paren-the-ses around the
1896  vari-able in ``[]\OT1/pcr/m/n/10 (-{w}) = -{v} [-{key}]\OT1/ppl/m/n/10 '':
1897  []
1898
1899 [84]
1900 Overfull \hbox (93.0pt too wide) in paragraph at lines 277--277
1901 []      \OT1/pcr/m/n/10 -------------------------------------------------------
1902 ------------[] 
1903  []
1904
1905
1906 Overfull \hbox (39.0pt too wide) in paragraph at lines 277--277
1907 []      \OT1/pcr/m/n/10 -- Turn a list of tests and assignations into [acc] int
1908 o a[] 
1909  []
1910
1911
1912 Overfull \hbox (15.0pt too wide) in paragraph at lines 277--277
1913 []      \OT1/pcr/m/n/10 -- single term of nested conditionals and assignments.[
1914
1915  []
1916
1917
1918 Overfull \hbox (81.0pt too wide) in paragraph at lines 277--277
1919 []      \OT1/pcr/m/n/10 -- [inner_term] is the AST of a term to be put into the
1920  innermost[] 
1921  []
1922
1923
1924 Overfull \hbox (81.0pt too wide) in paragraph at lines 277--277
1925 []      \OT1/pcr/m/n/10 -- conditionnal, after all assignments. [n] is the inde
1926 x in [acc][] 
1927  []
1928
1929
1930 Overfull \hbox (69.0pt too wide) in paragraph at lines 277--277
1931 []      \OT1/pcr/m/n/10 -- This is a recursive function, which builds the inner
1932  part of[] 
1933  []
1934
1935
1936 Overfull \hbox (9.0pt too wide) in paragraph at lines 277--277
1937 []      \OT1/pcr/m/n/10 -- the statement first, then surrounds it with nested[]
1938  
1939  []
1940
1941
1942 Overfull \hbox (69.0pt too wide) in paragraph at lines 277--277
1943 []      \OT1/pcr/m/n/10 -- [if ... then ... end], [local ... = ...] and [let ..
1944 . = ...][] 
1945  []
1946
1947
1948 Overfull \hbox (93.0pt too wide) in paragraph at lines 277--277
1949 []      \OT1/pcr/m/n/10 -------------------------------------------------------
1950 ------------[] 
1951  []
1952
1953
1954 Overfull \hbox (105.0pt too wide) in paragraph at lines 277--277
1955 []         \OT1/pcr/m/n/10 assert (not inner_term.tag, "collapse inner term mus
1956 t be a block")[] 
1957  []
1958
1959
1960 Overfull \hbox (45.0pt too wide) in paragraph at lines 277--277
1961 []         \OT1/pcr/m/n/10 assert (not inside.tag, "collapse must produce a blo
1962 ck")[] 
1963  []
1964
1965
1966 Overfull \hbox (99.0pt too wide) in paragraph at lines 277--277
1967 []            \OT1/pcr/m/n/10 -- [it] is a test, put it in an [if ... then .. e
1968 nd] statement[] 
1969  []
1970
1971
1972 Overfull \hbox (105.0pt too wide) in paragraph at lines 277--277
1973 []            \OT1/pcr/m/n/10 -- [it] is a statement, just add it at the result
1974 's  beginning.[] 
1975  []
1976
1977 [85]
1978 Overfull \hbox (21.0pt too wide) in paragraph at lines 322--322
1979 []  \OT1/pcr/m/n/10 local v1, v2, ... vx -- variables used to store subpatterns
1980 [] 
1981  []
1982
1983
1984 Overfull \hbox (93.0pt too wide) in paragraph at lines 343--343
1985 []      \OT1/pcr/m/n/10 -------------------------------------------------------
1986 ------------[] 
1987  []
1988
1989
1990 Overfull \hbox (63.0pt too wide) in paragraph at lines 343--343
1991 []      \OT1/pcr/m/n/10 -- parse all [pattern ==> block] pairs. Result goes in 
1992 [body].[] 
1993  []
1994
1995
1996 Overfull \hbox (93.0pt too wide) in paragraph at lines 343--343
1997 []      \OT1/pcr/m/n/10 -------------------------------------------------------
1998 ------------[] 
1999  []
2000
2001
2002 Overfull \hbox (117.0pt too wide) in paragraph at lines 343--343
2003 []         \OT1/pcr/m/n/10 parse_pattern (1, case[1], var(1)) -- fill [acc] wit
2004 h conds and lets[] 
2005  []
2006
2007
2008 Overfull \hbox (111.0pt too wide) in paragraph at lines 343--343
2009 []            \OT1/pcr/m/n/10 table.insert (case[2], `Break) -- to skip other c
2010 ases on success[] 
2011  []
2012
2013 [86]
2014 Overfull \hbox (93.0pt too wide) in paragraph at lines 343--343
2015 []         \OT1/pcr/m/n/10 for _, x in ipairs (compiled_case) do table.insert (
2016 body, x) end[] 
2017  []
2018
2019
2020 Overfull \hbox (93.0pt too wide) in paragraph at lines 364--364
2021 []      \OT1/pcr/m/n/10 -------------------------------------------------------
2022 ------------[] 
2023  []
2024
2025
2026 Overfull \hbox (39.0pt too wide) in paragraph at lines 364--364
2027 []      \OT1/pcr/m/n/10 for i = 1, max_n do table.insert (local_vars, var(i))  
2028 end[] 
2029  []
2030
2031
2032 Overfull \hbox (93.0pt too wide) in paragraph at lines 364--364
2033 []      \OT1/pcr/m/n/10 -------------------------------------------------------
2034 ------------[] 
2035  []
2036
2037
2038 Overfull \hbox (87.0pt too wide) in paragraph at lines 364--364
2039 []      \OT1/pcr/m/n/10 -- cases are put inside a [repeat until true], so that 
2040 the [break][] 
2041  []
2042
2043
2044 Overfull \hbox (105.0pt too wide) in paragraph at lines 364--364
2045 []      \OT1/pcr/m/n/10 -- inserted after the value will jump after the last ca
2046 se on success.[] 
2047  []
2048
2049
2050 Overfull \hbox (93.0pt too wide) in paragraph at lines 364--364
2051 []      \OT1/pcr/m/n/10 -------------------------------------------------------
2052 ------------[] 
2053  []
2054
2055
2056 Overfull \hbox (93.0pt too wide) in paragraph at lines 364--364
2057 []      \OT1/pcr/m/n/10 -------------------------------------------------------
2058 ------------[] 
2059  []
2060
2061 [87]
2062 Overfull \hbox (75.0pt too wide) in paragraph at lines 406--406
2063 []\OT1/pcr/m/n/10 -------------------------------------------------------------
2064 ---------[] 
2065  []
2066
2067
2068 Overfull \hbox (9.0pt too wide) in paragraph at lines 406--406
2069 []\OT1/pcr/m/n/10 mlp.stat:add{ "match", mlp.expr, "with", gg.optkeyword "|",[]
2070  
2071  []
2072
2073
2074 Overfull \hbox (39.0pt too wide) in paragraph at lines 406--406
2075 []              \OT1/pcr/m/n/10 gg.list{ gg.sequence{ mlp.expr, "->", mlp.block
2076  },[] 
2077  []
2078
2079
2080 Overfull \hbox (75.0pt too wide) in paragraph at lines 406--406
2081 []\OT1/pcr/m/n/10 -------------------------------------------------------------
2082 ---------[] 
2083  []
2084
2085
2086 Overfull \hbox (4.38596pt too wide) in paragraph at lines 421--425
2087 \OT1/ppl/m/n/10 tem pre-sented above. Some of these pro-pos-als can be im-ple-m
2088 ented very quickly,
2089  []
2090
2091
2092 Overfull \hbox (15.27702pt too wide) in paragraph at lines 426--428
2093 []\OT1/ppl/m/n/10 The code of the ba-sic ver-sion, as pre-sented here, is avail
2094 -able at $\OT1/pcr/m/n/10 http : / / metalua .
2095  []
2096
2097 [88]
2098 Overfull \hbox (9.30801pt too wide) in paragraph at lines 441--446
2099 []\OT1/ppl/m/n/10 Labels and go-tos in met-alua ASTs are rep-re-sented as \OT1/
2100 pcr/m/n/10 `Label\OMS/cmsy/m/n/10 f \OT1/pcr/m/n/10 id \OMS/cmsy/m/n/10 g \OT1/
2101 ppl/m/n/10 and \OT1/pcr/m/n/10 `Goto\OMS/cmsy/m/n/10 f
2102  []
2103
2104
2105 Overfull \hbox (3.56679pt too wide) in paragraph at lines 441--446
2106 \OT1/pcr/m/n/10 id \OMS/cmsy/m/n/10 g \OT1/ppl/m/n/10 re-spec-tively, with \OT1
2107 /pcr/m/n/10 id \OT1/ppl/m/n/10 an iden-ti-fier, typ-i-cally gen-er-ated by \OT1
2108 /pcr/m/n/10 mlp.gensym()\OT1/ppl/m/n/10 .
2109  []
2110
2111 [89]
2112 Overfull \hbox (7.66571pt too wide) in paragraph at lines 535--539
2113 \OT1/ppl/m/n/10 dummy, un-used vari-able. Non-linear oc-curences of it should p
2114 rob-a-bly be silently
2115  []
2116
2117
2118 Overfull \hbox (161.43729pt too wide) in paragraph at lines 541--549
2119 \OT1/ppl/m/n/10 ``[]\OT1/pcr/m/n/10 foo=bar\OT1/ppl/m/n/10 '' as-sign-ment. See
2120 n this way, it al-lows to write things such as ``[]\OT1/pcr/m/n/10 `If{ cond, b
2121 lock } = some_ast }\OT1/ppl/m/n/10 ''
2122  []
2123
2124 [90]
2125 Overfull \hbox (1.14665pt too wide) in paragraph at lines 556--564
2126 \OT1/ppl/m/n/10 and take state-ments as right-hand sides of cases. We could al-
2127 low pat-tern match-
2128  []
2129
2130 [91]
2131 Overfull \hbox (23.63799pt too wide) in paragraph at lines 595--600
2132 \OT1/ppl/m/n/10 tent to strings and num-ber. For in-stance, ``\OT1/pcr/m/n/10 <
2133 foo bar=3><baz/>eek</foo>\OT1/ppl/m/n/10 ''
2134  []
2135
2136 )
2137 Overfull \hbox (6.67633pt too wide) in paragraph at lines 610--52
2138 \OT1/ppl/m/n/10 Most of the im-prove-ments pro-posed here are ac-tu-ally im-ple
2139 -mented in the \OT1/pcr/m/n/10 match
2140  []
2141
2142 [92]
2143 \openout2 = `src-hints.aux'.
2144
2145  (./src-hints.tex [93
2146
2147
2148 ]
2149 Overfull \hbox (5.47766pt too wide) in paragraph at lines 93--101
2150 \OT1/ppl/m/n/10 scaf-fold-ing from Kein-Hong Man's Yueliang project ($\OT1/pcr/
2151 m/n/10 http : / / luaforge . net /
2152  []
2153
2154 [94]
2155 Overfull \hbox (10.8356pt too wide) in paragraph at lines 106--109
2156 []\OT1/ppl/m/n/10 it's rather easy to get bitwise-identical com-pi-la-tions, be
2157 -tween what Yueliang
2158  []
2159
2160
2161 Overfull \hbox (2.92763pt too wide) in paragraph at lines 128--133
2162 []\OT1/ppl/m/n/10 So, the files bor-rowed from Yueliang are \OT1/ppl/b/n/10 lop
2163 -code.lua\OT1/ppl/m/n/10 , \OT1/ppl/b/n/10 lcode.lua\OT1/ppl/m/n/10 , and \OT1/
2164 ppl/b/n/10 ldump.lua\OT1/ppl/m/n/10 .
2165  []
2166
2167 ) [95]
2168 \openout2 = `ast.aux'.
2169
2170  (./ast.tex) [96
2171
2172
2173 ] (./metalua-manual.aux (./intro.aux) (./syntax-ext.aux)
2174 (./data.aux) (./meta.aux) (./gg-ref.aux) (./mlp-ref.aux) (./stdlib.aux)
2175 (./clopts-ref.aux) (./springs-ref.aux) (./walk-ref.aux) (./match-ref.aux)
2176 (./dollar-ref.aux) (./clist-ref.aux) (./hygiene-ref.aux) (./samples.aux)
2177 (./sample-exception.aux) (./sample-match.aux) (./src-hints.aux) (./ast.aux)) ) 
2178 Here is how much of TeX's memory you used:
2179  782 strings out of 94500
2180  9251 string characters out of 1176115
2181  60690 words of memory out of 1000000
2182  3841 multiletter control sequences out of 10000+50000
2183  24604 words of font info for 62 fonts, out of 500000 for 2000
2184  580 hyphenation exceptions out of 1000
2185  32i,11n,43p,209b,429s stack positions out of 1500i,500n,5000p,200000b,5000s
2186 PDF statistics:
2187  346 PDF objects out of 300000
2188  0 named destinations out of 131072
2189  1 words of extra memory for PDF output out of 65536
2190 <
2191 /sw/share/texmf-dist/fonts/type1/bluesky/cm/cmr7.pfb></sw/share/texmf-dist/font
2192 s/type1/bluesky/cm/cmsy7.pfb></sw/share/texmf-dist/fonts/type1/bluesky/cm/cmex1
2193 0.pfb>{/sw/share/texmf-dist/fonts/enc/dvips/psnfss/8r.enc}</sw/share/texmf-dist
2194 /fonts/type1/urw/palatino/uplbi8a.pfb></sw/share/texmf-dist/fonts/type1/bluesky
2195 /cm/cmsy8.pfb></sw/share/texmf-dist/fonts/type1/bluesky/cm/cmr10.pfb></sw/share
2196 /texmf-dist/fonts/type1/bluesky/cm/cmmi7.pfb></sw/share/texmf-dist/fonts/type1/
2197 bluesky/cm/cmmi10.pfb></sw/share/texmf-dist/fonts/type1/urw/palatino/uplri8a.pf
2198 b></sw/share/texmf-dist/fonts/type1/urw/palatino/uplr8a.pfb></sw/share/texmf-di
2199 st/fonts/type1/urw/courier/ucrr8a.pfb></sw/share/texmf-dist/fonts/type1/bluesky
2200 /cm/cmsy10.pfb></sw/share/texmf-dist/fonts/type1/urw/palatino/uplb8a.pfb></sw/s
2201 hare/texmf-dist/fonts/type1/urw/palatino/uplr8a.pfb>
2202 Output written on metalua-manual.pdf (96 pages, 338205 bytes).