History

Lua 2.4

Lua Team committed 30 years ago

Commit ff7c16d1 parent 0a2b61162 files · +6886 −4759Browse files

Unified · Split

62 files
  1. COPYRIGHT +1 −1
  2. HISTORY +21 −0
  3. INSTALL +26 −0
  4. Makefile +8 −0
  5. README +8 −34
  6. clients/lib/Makefile +3 −10
  7. clients/lib/iolib.c +119 −123
  8. clients/lib/mathlib.c +41 −23
  9. clients/lib/strlib.c +147 −63
  10. clients/lua/Makefile +5 −8
  11. clients/lua/lua.c +11 −3
  12. config +28 −0
  13. doc/Makefile +9 −2
  14. doc/luac.man +75 −0
  15. doc/luac.ps +246 −0
  16. doc/luac.txt +66 −0
  17. doc/manual.ps +0 −2859
  18. doc/refman.ps +3562 −0
  19. domake +0 −11
  20. include/Makefile +5 −3
  21. include/lua.h +24 −16
  22. include/luadebug.h +15 −4
  23. include/lualib.h +13 −2
  24. src/Makefile +47 −21
  25. src/fallback.c +53 −39
  26. src/fallback.h +6 −3
  27. src/func.c +80 −3
  28. src/func.h +22 −2
  29. src/hash.c +29 −41
  30. src/hash.h +8 −7
  31. src/inout.c +78 −52
  32. src/inout.h +8 −4
  33. src/lex.c +30 −61
  34. src/lex.h +19 −0
  35. src/lua.stx +47 −273
  36. src/luac/Makefile +24 −0
  37. src/luac/dump.c +247 −0
  38. src/luac/luac.c +104 −0
  39. src/luac/luac.h +24 −0
  40. src/luac/print.c +189 −0
  41. src/luac/print.h +76 −0
  42. src/mem.c +34 −11
  43. src/mem.h +18 −4
  44. src/opcode.c +202 −89
  45. src/opcode.h +6 −20
  46. src/parser.c +439 −663
  47. src/parser.h +3 −2
  48. src/table.c +94 −97
  49. src/table.h +17 −8
  50. src/tree.c +100 −78
  51. src/tree.h +4 −13
  52. src/types.h +1 −3
  53. src/ugly.h +0 −36
  54. src/undump.c +326 −0
  55. src/undump.h +23 −0
  56. test/bisect.lua +26 −0
  57. test/cf.lua +27 −0
  58. test/dump.lua +1 −1
  59. test/examples/ps/ps.lua +3 −7
  60. test/hello.lua +3 −0
  61. test/long.lua +0 −22
  62. test/sort.lua +35 −37
COPYRIGHT+1−1
@@ -1,4 +1,4 @@
1−Copyright (c) 1994-1995 TeCGraf, PUC-Rio. Written by Waldemar Celes Filho,
1+Copyright (c) 1994-1996 TeCGraf, PUC-Rio. Written by Waldemar Celes Filho,
22 Roberto Ierusalimschy, Luiz Henrique de Figueiredo. All rights reserved.
33
44 Permission is hereby granted, without written agreement and without license or
HISTORY+21−0
@@ -0,0 +1,21 @@
1+Current version is 2.4 (version 2.3 was never publicly released)
2+
3+* Changes since version 2.2
4+ + external compiler creates portable binary files that can be loaded faster
5+ + interface for debugging and profiling
6+ + new "getglobal" fallback
7+ + new functions for handling references to Lua objects
8+ + new functions in standard lib
9+ + only one copy of each string is stored
10+ + expanded documentation, with more examples
11+
12+* Changes since version 2.1
13+ + functions now may be declared with any "lvalue" as a name
14+ + garbage collection of functions
15+ + support for pipes
16+
17+* Changes since version 1.1
18+ + object-oriented support
19+ + fallbacks
20+ + simplified syntax for tables
21+ + many internal improvements
INSTALL+26−0
@@ -0,0 +1,26 @@
1+* Installation
2+ Installing Lua should be very easy:
3+
4+ 1. Edit "config" to suit your platform, if at all necessary
5+ 2. Then, type "make"
6+
7+* What you get
8+ If make succeeds, you get:
9+ * a compiler and an interpreter in ./bin/lua;
10+ * libraries in ./lib;
11+ * include files in ./include.
12+
13+ There is a reference manual in ./doc, and tests and examples in ./test.
14+ You don't need these directories for development.
15+
16+* If you have problems (and solutions!)
17+ If make fails, please let us know (lua@icad.puc-rio.br).
18+ If you make changes to "config", please send them to us.
19+
20+* Shared libraries
21+ If you are running SunOs 4.x, type the following after "make" succeeds:
22+ ld -o lib/liblua.so.2.4 src/*.o
23+ ld -o lib/liblualib.so.2.4 clients/lib/*.o
24+
25+ For AIX, the OpenGL clone Mesa includes a script for making shared libraries.
26+ For other systems, please let us know how!
Makefile+8−0
@@ -0,0 +1,8 @@
1+# makefile for lua hierarchy
2+
3+all co clean klean:
4+ cd src; make $@
5+ cd src/luac; make $@
6+ cd include; make $@
7+ cd clients/lib; make $@
8+ cd clients/lua; make $@
README+8−34
@@ -15,46 +15,20 @@ · 14 unmodified lines
1515 + portable, written in ANSI C (runs in Unix, DOS, Windows, Mac, Cray, ...)
1616
1717 * Availability
18− In Brazil: ftp://ftp.icad.puc-rio.br/pub/lua/lua-2.2.tar.gz
19− In Canada: ftp://csg.uwaterloo.ca/pub/lhf/lua/lua-2.2.tar.gz
18+ The latest version of Lua is always available at the following locations:
19+ In Brazil: ftp://ftp.icad.puc-rio.br/pub/lua/lua.tar.gz
20+ In Canada: ftp://csg.uwaterloo.ca/pub/lhf/lua/lua.tar.gz
2021 Home page: http://www.inf.puc-rio.br/~roberto/lua.html
22+ The current version is 2.4.
2123
2224 * Legal matters
2325 Lua is freely available for both academic and commercial purposes.
2426 Lua is not in the public domain; TeCGraf keeps its copyright.
2527 See COPYRIGHT.
2628
27−* Changes since version 2.1 (current version is 2.2)
28− + functions now may be declared with any "lvalue" as a name
29− + garbage collection of functions
30− + support for pipes
31−
32−* Changes since version 1.1
33− + object-oriented support
34− + fallbacks
35− + simplified syntax for tables
36− + many internal improvements
37−
38−* Installing
39− To make, simply type domake.
40− If make succeeds, you get an interpreter in ./bin/lua.
41− If make fails, please let me know.
42− The libraries are in ./lib. The include files are in ./include.
43− You don't need the other directories for development.
44− There is a reference manual in ./doc, and tests and examples in ./test.
45− This distribution is biased towards SunOS 4 with gcc but it is simple to
46− change the Makefiles for other systems, if necessary.
47− If you are running SunOs, type also "domake dynamic" to build shared
48− libraries in ./lib.
49− If your system does not have "popen", then change ./clients/lib/Makefile.
29+* Installation
30+ See INSTALL.
5031
5132 * Contacting the authors
52− Send your comments, bug reports and anything else to lhf@icad.puc-rio.br.
53− Please send me email if you download Lua so that we can know how far it goes.
54−
55−--
56−Luiz Henrique de Figueiredo email: lhf@icad.puc-rio.br
57−TeCGraf-Grupo de Tecnologia em Computacao Grafica, Dep. Informatica, PUC-Rio
58−Rua Marques de Sao Vicente 225 voice: +55 21 529-9424
59−22453-900 Rio de Janeiro, RJ, Brasil fax: +55 21 511-5645
60−--
33+ Send your comments, bug reports and anything else to lua@icad.puc-rio.br.
34+ Please send us email if you download Lua so that we can know how far it goes.
clients/lib/Makefile+3−10
@@ -1,17 +1,10 @@
11 # makefile for lualib
22
3−INC= $(LUA)/include
4−LIB= $(LUA)/lib
3+LUA= ../..
54
6−# in SunOs /usr/5include contains prototypes for standard lib
7−INCS= -I/usr/5include -I$(INC)
8−WARN= -Wall -Wmissing-prototypes -Wshadow -ansi
5+include $(LUA)/config
96
10−# if your system does not have popen, remove -DPOPEN from the line below
11−DEFS= -DPOPEN
12−
13−CC= gcc
14−CFLAGS= $(INCS) $(DEFS) $(WARN) -O2
7+EXTRA_DEFS= $(POPEN)
158
169 OBJS= iolib.o mathlib.o strlib.o
1710 SRCS= iolib.c mathlib.c mathlib.h strlib.c strlib.h
clients/lib/iolib.c+119−123
@@ -3,15 +3,14 @@ · 2 unmodified lines
33 ** Input/output library to LUA
44 */
55
6−char *rcs_iolib="$Id: iolib.c,v 1.29 1995/11/10 18:32:59 roberto Exp $";
6+char *rcs_iolib="$Id: iolib.c,v 1.44 1996/05/03 20:10:59 roberto Exp $";
77
88 #include <stdio.h>
99 #include <ctype.h>
10−#include <sys/types.h>
11−#include <sys/stat.h>
1210 #include <string.h>
1311 #include <time.h>
1412 #include <stdlib.h>
13+#include <errno.h>
1514
1615 #include "lua.h"
1716 #include "luadebug.h"
@@ -29,6 +28,14 @@ int pclose(); · 11 unmodified lines
2928 #endif
3029
3130
31+static void pushresult (int i)
32+{
33+ if (i)
34+ lua_pushnumber (1);
35+ else
36+ lua_pushnil();
37+}
38+
3239 static void closeread (void)
3340 {
3441 if (in != stdin)
@@ -116,15 +123,12 @@ static void io_writeto (void) · 81 unmodified lines
116123 ** LUA interface:
117124 ** status = appendto (filename)
118125 ** where:
119−** status = 2 -> success (already exist)
120−** status = 1 -> success (new file)
126+** status = 1 -> success
121127 ** status = nil -> error
122128 */
123129 static void io_appendto (void)
124130 {
125131 char *s = lua_check_string(1, "appendto");
126− struct stat st;
127− int r = (stat(s, &st) == -1) ? 1 : 2;
128132 FILE *fp = fopen (s, "a");
129133 if (fp == NULL)
130134 lua_pushnil();
@@ -132,7 +136,7 @@ static void io_appendto (void) · 1 unmodified line
132136 {
133137 if (out != stdout) fclose (out);
134138 out = fp;
135− lua_pushnumber (r);
139+ lua_pushnumber(1);
136140 }
137141 }
138142
@@ -142,15 +146,14 @@ static char getformat (char *f, int *just, int *m, int *n) · 3 unmodified lines
142146 int t;
143147 switch (*f++)
144148 {
149+ case 'q': case 'Q':
145150 case 's': case 'S':
146− t = 's';
151+ case 'i': case 'I':
152+ t = tolower(*(f-1));
147153 break;
148154 case 'f': case 'F': case 'g': case 'G': case 'e': case 'E':
149155 t = 'f';
150156 break;
151− case 'i': case 'I':
152− t = 'i';
153− break;
154157 default:
155158 t = 0; /* to avoid compiler warnings */
156159 lua_arg_error("read/write (format)");
@@ -177,32 +180,6 @@ static char getformat (char *f, int *just, int *m, int *n) · 20 unmodified lines
177180 }
178181
179182
180−static char *add_char (int c)
181−{
182− static char *buff = NULL;
183− static int max = 0;
184− static int n = 0;
185− if (n >= max)
186− {
187− if (max == 0)
188− {
189− max = 100;
190− buff = (char *)malloc(max);
191− }
192− else
193− {
194− max *= 2;
195− buff = (char *)realloc(buff, max);
196− }
197− if (buff == NULL)
198− lua_error("memory overflow");
199− }
200− buff[n++] = c;
201− if (c == 0)
202− n = 0; /* prepare for next string */
203− return buff;
204−}
205−
206183 /*
207184 ** Read a variable. On error put nil on stack.
208185 ** LUA interface:
@@ -222,23 +199,23 @@ static int read_until_char (int del) · 13 unmodified lines
222199 {
223200 int c;
224201 while((c = fgetc(in)) != EOF && c != del)
225− add_char(c);
202+ luaI_addchar(c);
226203 return c;
227204 }
228205
229−static int read_until_blank (void)
206+static void read_until_blank (void)
230207 {
231208 int c;
232209 while((c = fgetc(in)) != EOF && !isspace(c))
233− add_char(c);
234− return c;
210+ luaI_addchar(c);
211+ if (c != EOF) ungetc(c,in);
235212 }
236213
237214 static void read_m (int m)
238215 {
239216 int c;
240217 while (m-- && (c = fgetc(in)) != EOF)
241− add_char(c);
218+ luaI_addchar(c);
242219 }
243220
244221
@@ -256,21 +233,18 @@ static void read_free (void) · 11 unmodified lines
256233 { /* string */
257234 c = read_until_char(c);
258235 if (c == EOF)
259− {
260− add_char(0); /* to be ready for next time */
261236 lua_pushnil();
262− }
263237 else
264− lua_pushstring(add_char(0));
238+ lua_pushstring(luaI_addchar(0));
265239 }
266240 else
267241 {
268242 double d;
269243 char dummy;
270244 char *s;
271− add_char(c);
245+ luaI_addchar(c);
272246 read_until_blank();
273− s = add_char(0);
247+ s = luaI_addchar(0);
274248 if (sscanf(s, "%lf %c", &d, &dummy) == 1)
275249 lua_pushnumber(d);
276250 else
@@ -281,6 +255,7 @@ static void read_free (void) · 4 unmodified lines
281255 static void io_read (void)
282256 {
283257 lua_Object o = lua_getparam (1);
258+ luaI_addchar(0); /* initialize buffer */
284259 if (o == LUA_NOOBJECT) /* free format */
285260 read_free();
286261 else /* formatted */
@@ -289,12 +264,19 @@ static void io_read (void) · 2 unmodified lines
289264 switch (getformat(lua_check_string(1, "read"), &dummy1, &m, &dummy2))
290265 {
291266 case 's':
267+ {
268+ char *s;
292269 if (m < 0)
293270 read_until_blank();
294271 else
295272 read_m(m);
296− lua_pushstring(add_char(0));
273+ s = luaI_addchar(0);
274+ if ((m >= 0 && strlen(s) == m) || (m < 0 && strlen(s) > 0))
275+ lua_pushstring(s);
276+ else
277+ lua_pushnil();
297278 break;
279+ }
298280
299281 case 'i': /* can read as float, since it makes no difference to Lua */
300282 case 'f':
@@ -306,7 +288,7 @@ static void io_read (void) · 5 unmodified lines
306288 else
307289 {
308290 read_m(m);
309− result = sscanf(add_char(0), "%lf", &d);
291+ result = sscanf(luaI_addchar(0), "%lf", &d);
310292 }
311293 if (result == 1)
312294 lua_pushnumber(d);
@@ -314,6 +296,8 @@ static void io_read (void) · 1 unmodified line
314296 lua_pushnil();
315297 break;
316298 }
299+ default:
300+ lua_arg_error("read (format)");
317301 }
318302 }
319303 }
@@ -324,10 +308,16 @@ static void io_read (void) · 4 unmodified lines
324308 */
325309 static void io_readuntil (void)
326310 {
327− int del = *lua_check_string(1, "readuntil");
328− int c = read_until_char(del);
311+ int del, c;
312+ lua_Object p = lua_getparam(1);
313+ luaI_addchar(0); /* initialize buffer */
314+ if (p == LUA_NOOBJECT || lua_isnil(p))
315+ del = EOF;
316+ else
317+ del = *lua_check_string(1, "readuntil");
318+ c = read_until_char(del);
329319 if (c != EOF) ungetc(c,in);
330− lua_pushstring(add_char(0));
320+ lua_pushstring(luaI_addchar(0));
331321 }
332322
333323
@@ -384,6 +374,13 @@ static int write_string (char *s, int just, int m) · 50 unmodified lines
384374 return status;
385375 }
386376
377+static int write_quoted (int just, int m)
378+{
379+ luaI_addchar(0);
380+ luaI_addquoted(lua_check_string(1, "write"));
381+ return write_string(luaI_addchar(0), just, m);
382+}
383+
387384 static int write_float (int just, int m, int n)
388385 {
389386 char buffer[100];
@@ -420,15 +417,16 @@ static void io_write (void) · 30 unmodified lines
420417 if (lua_getparam (2) == LUA_NOOBJECT) /* free format */
421418 {
422419 lua_Object o1 = lua_getparam(1);
423− if (lua_isnumber(o1))
420+ int t = lua_type(o1);
421+ if (t == LUA_T_NUMBER)
424422 status = fprintf (out, "%g", lua_getnumber(o1)) >= 0;
425− else if (lua_isstring(o1))
423+ else if (t == LUA_T_STRING)
426424 status = fprintf (out, "%s", lua_getstring(o1)) >= 0;
427425 }
428426 else /* formated */
429427 {
430428 int just, m, n;
431− switch (getformat (lua_check_string(2, "write"), &just, &m, &n))
429+ switch (getformat(lua_check_string(2, "write"), &just, &m, &n))
432430 {
433431 case 's':
434432 {
@@ -439,6 +437,9 @@ static void io_write (void) · 4 unmodified lines
439437 status = 0;
440438 break;
441439 }
440+ case 'q':
441+ status = write_quoted(just, m);
442+ break;
442443 case 'f':
443444 status = write_float(just, m, n);
444445 break;
@@ -467,59 +468,54 @@ static void io_execute (void) · 22 unmodified lines
467468 */
468469 static void io_remove (void)
469470 {
470− if (remove(lua_check_string(1, "remove")) == 0)
471− lua_pushnumber (1);
472− else
473− lua_pushnil();
471+ pushresult(remove(lua_check_string(1, "remove")) == 0);
474472 }
475473
474+static void io_rename (void)
475+{
476+ char *f1 = lua_check_string(1, "rename");
477+ char *f2 = lua_check_string(2, "rename");
478+ pushresult(rename(f1, f2) == 0);
479+}
476480
477−/*
478−** To get a environment variables
479−*/
480−static void io_getenv (void)
481+static void io_tmpname (void)
481482 {
482− char *env = getenv(lua_check_string(1, "getenv"));
483− if (env == NULL) lua_pushnil();
484− else lua_pushstring(env);
483+ lua_pushstring(tmpnam(NULL));
485484 }
486485
487−/*
488−** Return time: hour, min, sec
489−*/
490−static void io_time (void)
486+static void io_errorno (void)
491487 {
492− time_t t;
493− struct tm *s;
494−
495− time(&t);
496− s = localtime(&t);
497− lua_pushnumber(s->tm_hour);
498− lua_pushnumber(s->tm_min);
499− lua_pushnumber(s->tm_sec);
488+/* lua_pushstring(strerror(errno));*/
500489 }
501−
490+
491+
502492 /*
503−** Return date: dd, mm, yyyy
493+** To get a environment variable
504494 */
505−static void io_date (void)
495+static void io_getenv (void)
506496 {
507− time_t t;
508− struct tm *s;
509−
510− time(&t);
511− s = localtime(&t);
512− lua_pushnumber(s->tm_mday);
513− lua_pushnumber(s->tm_mon+1);
514− lua_pushnumber(s->tm_year+1900);
497+ char *env = getenv(lua_check_string(1, "getenv"));
498+ lua_pushstring(env); /* if NULL push nil */
515499 }
516−
500+
517501 /*
518−** Beep
502+** Return user formatted time stamp
519503 */
520−static void io_beep (void)
504+static void io_date (void)
521505 {
522− printf("\a");
506+ time_t t;
507+ struct tm *tm;
508+ char *s;
509+ char b[BUFSIZ];
510+ if (lua_getparam(1) == LUA_NOOBJECT)
511+ s = "%c";
512+ else
513+ s = lua_check_string(1, "date");
514+ time(&t); tm = localtime(&t);
515+ if (strftime(b,sizeof(b),s,tm))
516+ lua_pushstring(b);
517+ else
518+ lua_error("invalid `date' format");
523519 }
524520
525521 /*
@@ -528,9 +524,8 @@ static void io_beep (void) · 2 unmodified lines
528524 static void io_exit (void)
529525 {
530526 lua_Object o = lua_getparam(1);
531− if (lua_isstring(o))
532− fprintf(stderr, "%s\n", lua_getstring(o));
533− exit(1);
527+ int code = lua_isnumber(o) ? (int)lua_getnumber(o) : 1;
528+ exit(code);
534529 }
535530
536531 /*
@@ -543,14 +538,14 @@ static void io_debug (void) · 6 unmodified lines
543538 {
544539 char buffer[250];
545540 fprintf(stderr, "lua_debug> ");
546− if (gets(buffer) == 0) return;
541+ if (fgets(buffer, sizeof(buffer), stdin) == 0) return;
547542 if (strcmp(buffer, "cont") == 0) return;
548543 lua_dostring(buffer);
549544 }
550545 }
551546
552547
553−void lua_printstack (FILE *f)
548+static void lua_printstack (FILE *f)
554549 {
555550 int level = 0;
556551 lua_Object func;
@@ -560,13 +555,13 @@ void lua_printstack (FILE *f) · 3 unmodified lines
560555 char *name;
561556 int currentline;
562557 fprintf(f, "\t");
563− switch (*getobjname(func, &name))
558+ switch (*lua_getobjname(func, &name))
564559 {
565560 case 'g':
566561 fprintf(f, "function %s", name);
567562 break;
568563 case 'f':
569− fprintf(f, "fallback %s", name);
564+ fprintf(f, "`%s' fallback", name);
570565 break;
571566 default:
572567 {
@@ -582,7 +577,7 @@ void lua_printstack (FILE *f) · 9 unmodified lines
582577 }
583578 }
584579 if ((currentline = lua_currentline(func)) > 0)
585− fprintf(f, " at line %d", currentline);
580+ fprintf(f, " at line %d", currentline);
586581 fprintf(f, "\n");
587582 }
588583 }
@@ -597,26 +592,27 @@ static void errorfb (void) · 8 unmodified lines
597592 }
598593
599594
600−/*
601−** Open io library
602−*/
595+static struct lua_reg iolib[] = {
596+{"readfrom", io_readfrom},
597+{"writeto", io_writeto},
598+{"appendto", io_appendto},
599+{"read", io_read},
600+{"readuntil",io_readuntil},
601+{"write", io_write},
602+{"execute", io_execute},
603+{"remove", io_remove},
604+{"rename", io_rename},
605+{"tmpname", io_tmpname},
606+{"ioerror", io_errorno},
607+{"getenv", io_getenv},
608+{"date", io_date},
609+{"exit", io_exit},
610+{"debug", io_debug},
611+{"print_stack", errorfb}
612+};
613+
603614 void iolib_open (void)
604615 {
605− lua_register ("readfrom", io_readfrom);
606− lua_register ("writeto", io_writeto);
607− lua_register ("appendto", io_appendto);
608− lua_register ("read", io_read);
609− lua_register ("readuntil",io_readuntil);
610− lua_register ("write", io_write);
611− lua_register ("execute", io_execute);
612− lua_register ("remove", io_remove);
613− lua_register ("getenv", io_getenv);
614− lua_register ("time", io_time);
615− lua_register ("date", io_date);
616− lua_register ("beep", io_beep);
617− lua_register ("exit", io_exit);
618− lua_register ("debug", io_debug);
619− lua_register ("print_stack", errorfb);
620− lua_setfallback("error", errorfb);
616+ luaI_openlib(iolib, (sizeof(iolib)/sizeof(iolib[0])));
617+ lua_setfallback("error", errorfb);
621618 }
622−
clients/lib/mathlib.c+41−23
@@ -3,9 +3,9 @@ · 2 unmodified lines
33 ** Mathematics library to LUA
44 */
55
6−char *rcs_mathlib="$Id: mathlib.c,v 1.13 1995/11/10 17:54:31 roberto Exp $";
6+char *rcs_mathlib="$Id: mathlib.c,v 1.17 1996/04/30 21:13:55 roberto Exp $";
77
8−#include <stdio.h> /* NULL */
8+#include <stdlib.h>
99 #include <math.h>
1010
1111 #include "lualib.h"
@@ -113,7 +113,7 @@ static void math_pow (void) · 101 unmodified lines
113113 lua_Object op = lua_getparam(3);
114114 if (!lua_isnumber(o1) || !lua_isnumber(o2) || *(lua_getstring(op)) != 'p')
115115 {
116− lua_Object old = lua_getlocked(old_pow);
116+ lua_Object old = lua_getref(old_pow);
117117 lua_pushobject(o1);
118118 lua_pushobject(o2);
119119 lua_pushobject(op);
@@ -184,29 +184,47 @@ static void math_rad (void) · 64 unmodified lines
184184 lua_pushnumber (d/180.*PI);
185185 }
186186
187+static void math_random (void)
188+{
189+ lua_pushnumber((double)(rand()%RAND_MAX) / (double)RAND_MAX);
190+}
191+
192+static void math_randomseed (void)
193+{
194+ srand(lua_check_number(1, "randomseed"));
195+}
196+
197+
198+static struct lua_reg mathlib[] = {
199+{"abs", math_abs},
200+{"sin", math_sin},
201+{"cos", math_cos},
202+{"tan", math_tan},
203+{"asin", math_asin},
204+{"acos", math_acos},
205+{"atan", math_atan},
206+{"atan2", math_atan2},
207+{"ceil", math_ceil},
208+{"floor", math_floor},
209+{"mod", math_mod},
210+{"sqrt", math_sqrt},
211+{"min", math_min},
212+{"max", math_max},
213+{"log", math_log},
214+{"log10", math_log10},
215+{"exp", math_exp},
216+{"deg", math_deg},
217+{"rad", math_rad},
218+{"random", math_random},
219+{"randomseed", math_randomseed}
220+};
221+
187222 /*
188223 ** Open math library
189224 */
190225 void mathlib_open (void)
191226 {
192− lua_register ("abs", math_abs);
193− lua_register ("sin", math_sin);
194− lua_register ("cos", math_cos);
195− lua_register ("tan", math_tan);
196− lua_register ("asin", math_asin);
197− lua_register ("acos", math_acos);
198− lua_register ("atan", math_atan);
199− lua_register ("atan2", math_atan2);
200− lua_register ("ceil", math_ceil);
201− lua_register ("floor", math_floor);
202− lua_register ("mod", math_mod);
203− lua_register ("sqrt", math_sqrt);
204− lua_register ("min", math_min);
205− lua_register ("max", math_max);
206− lua_register ("log", math_log);
207− lua_register ("log10", math_log10);
208− lua_register ("exp", math_exp);
209− lua_register ("deg", math_deg);
210− lua_register ("rad", math_rad);
211− old_pow = lua_lockobject(lua_setfallback("arith", math_pow));
227+ luaI_openlib(mathlib, (sizeof(mathlib)/sizeof(mathlib[0])));
228+ old_pow = lua_refobject(lua_setfallback("arith", math_pow), 1);
212229 }
230+
clients/lib/strlib.c+147−63
@@ -3,12 +3,13 @@ · 2 unmodified lines
33 ** String library to LUA
44 */
55
6−char *rcs_strlib="$Id: strlib.c,v 1.14 1995/11/10 17:54:31 roberto Exp $";
6+char *rcs_strlib="$Id: strlib.c,v 1.23 1996/04/30 21:13:55 roberto Exp $";
77
88 #include <string.h>
99 #include <stdio.h>
1010 #include <stdlib.h>
1111 #include <ctype.h>
12+#include <limits.h>
1213
1314 #include "lua.h"
1415 #include "lualib.h"
@@ -24,12 +25,12 @@ void lua_arg_error(char *funcname) · 9 unmodified lines
2425 char *lua_check_string (int numArg, char *funcname)
2526 {
2627 lua_Object o = lua_getparam(numArg);
27− if (!(lua_isstring(o) || lua_isnumber(o)))
28+ if (!lua_isstring(o))
2829 lua_arg_error(funcname);
2930 return lua_getstring(o);
3031 }
3132
32−float lua_check_number (int numArg, char *funcname)
33+double lua_check_number (int numArg, char *funcname)
3334 {
3435 lua_Object o = lua_getparam(numArg);
3536 if (!lua_isnumber(o))
@@ -37,13 +38,36 @@ float lua_check_number (int numArg, char *funcname) · 1 unmodified line
3738 return lua_getnumber(o);
3839 }
3940
40−static char *newstring (char *s)
41+static int lua_opt_number (int numArg, int def, char *funcname)
4142 {
42− char *ns = (char *)malloc(strlen(s)+1);
43− if (ns == 0)
44− lua_error("not enough memory for new string");
45− strcpy(ns, s);
46− return ns;
43+ return (lua_getparam(numArg) == LUA_NOOBJECT) ? def :
44+ (int)lua_check_number(numArg, funcname);
45+}
46+
47+char *luaI_addchar (int c)
48+{
49+ static char *buff = NULL;
50+ static int max = 0;
51+ static int n = 0;
52+ if (n >= max)
53+ {
54+ if (max == 0)
55+ {
56+ max = 100;
57+ buff = (char *)malloc(max);
58+ }
59+ else
60+ {
61+ max *= 2;
62+ buff = (char *)realloc(buff, max);
63+ }
64+ if (buff == NULL)
65+ lua_error("memory overflow");
66+ }
67+ buff[n++] = c;
68+ if (c == 0)
69+ n = 0; /* prepare for next string */
70+ return buff;
4771 }
4872
4973
@@ -56,15 +80,12 @@ static void str_find (void) · 6 unmodified lines
5680 {
5781 char *s1 = lua_check_string(1, "strfind");
5882 char *s2 = lua_check_string(2, "strfind");
59− int init = (lua_getparam(3) == LUA_NOOBJECT) ? 0 :
60− (int)lua_check_number(3, "strfind")-1;
61− char *f = strstr(s1+init,s2);
83+ int init = lua_opt_number(3, 1, "strfind") - 1;
84+ char *f = (init>=0 && init<=strlen(s1)) ? strstr(s1+init,s2) : NULL;
6285 if (f != NULL)
6386 {
6487 int pos = f-s1+1;
65− if (lua_getparam (4) == LUA_NOOBJECT)
66− lua_pushnumber (pos);
67− else if ((int)lua_check_number(4, "strfind") >= pos+strlen(s2)-1)
88+ if (lua_opt_number(4, INT_MAX, "strfind") >= pos+strlen(s2)-1)
6889 lua_pushnumber (pos);
6990 else
7091 lua_pushnil();
@@ -94,34 +115,16 @@ static void str_sub (void) · 23 unmodified lines
94115 {
95116 char *s = lua_check_string(1, "strsub");
96117 int start = (int)lua_check_number(2, "strsub");
97− int end = (lua_getparam(3) == LUA_NOOBJECT) ? strlen(s) :
98− (int)lua_check_number(3, "strsub");
118+ int end = lua_opt_number(3, strlen(s), "strsub");
99119 if (end < start || start < 1 || end > strlen(s))
100120 lua_pushliteral("");
101121 else
102122 {
103− char temp = s[end];
104− s[end] = 0;
105− lua_pushstring (&s[start-1]);
106− s[end] = temp;
107− }
108−}
109−
110−/*
111−** Convert a string according to given function.
112−*/
113−typedef int (*strfunc)(int s);
114−static void str_apply (strfunc f, char *funcname)
115−{
116− char *s, *c;
117− c = s = newstring(lua_check_string(1, funcname));
118− while (*c != 0)
119− {
120− *c = f(*c);
121− c++;
123+ luaI_addchar(0);
124+ while (start <= end)
125+ luaI_addchar(s[start++ - 1]);
126+ lua_pushstring (luaI_addchar(0));
122127 }
123− lua_pushstring(s);
124− free(s);
125128 }
126129
127130 /*
@@ -131,7 +134,11 @@ static void str_apply (strfunc f, char *funcname) · 3 unmodified lines
131134 */
132135 static void str_lower (void)
133136 {
134− str_apply(tolower, "strlower");
137+ char *s = lua_check_string(1, "strlower");
138+ luaI_addchar(0);
139+ while (*s)
140+ luaI_addchar(tolower(*s++));
141+ lua_pushstring(luaI_addchar(0));
135142 }
136143
137144
@@ -142,7 +149,11 @@ static void str_lower (void) · 4 unmodified lines
142149 */
143150 static void str_upper (void)
144151 {
145− str_apply(toupper, "strupper");
152+ char *s = lua_check_string(1, "strupper");
153+ luaI_addchar(0);
154+ while (*s)
155+ luaI_addchar(toupper(*s++));
156+ lua_pushstring(luaI_addchar(0));
146157 }
147158
148159 /*
@@ -151,42 +162,115 @@ static void str_upper (void) · 2 unmodified lines
151162 static void str_ascii (void)
152163 {
153164 char *s = lua_check_string(1, "ascii");
154− lua_Object o2 = lua_getparam(2);
155− int pos;
156− pos = (o2 == LUA_NOOBJECT) ? 0 : (int)lua_check_number(2, "ascii")-1;
165+ int pos = lua_opt_number(2, 1, "ascii") - 1;
157166 if (pos<0 || pos>=strlen(s))
158167 lua_arg_error("ascii");
159168 lua_pushnumber(s[pos]);
160169 }
161170
162−/*
163−** converts one or more integers to chars in a string
164−*/
165−#define maxparams 50
166−static void str_int2str (void)
171+void luaI_addquoted (char *s)
172+{
173+ luaI_addchar('"');
174+ for (; *s; s++)
175+ {
176+ if (*s == '"' || *s == '\\' || *s == '\n')
177+ luaI_addchar('\\');
178+ luaI_addchar(*s);
179+ }
180+ luaI_addchar('"');
181+}
182+
183+#define MAX_CONVERTION 2000
184+#define MAX_FORMAT 50
185+
186+static void str_format (void)
167187 {
168− char s[maxparams+1];
169− int i = 0;
170− while (lua_getparam(++i) != LUA_NOOBJECT)
188+ int arg = 1;
189+ char *strfrmt = lua_check_string(arg++, "format");
190+ luaI_addchar(0); /* initialize */
191+ while (*strfrmt)
171192 {
172− if (i > maxparams)
173− lua_error("too many parameters to function `int2str'");
174− s[i-1] = (int)lua_check_number(i, "int2str");
193+ if (*strfrmt != '%')
194+ luaI_addchar(*strfrmt++);
195+ else if (*++strfrmt == '%')
196+ luaI_addchar(*strfrmt++); /* %% */
197+ else
198+ { /* format item */
199+ char form[MAX_FORMAT]; /* store the format ('%...') */
200+ char buff[MAX_CONVERTION]; /* store the formated value */
201+ int size = 0;
202+ int i = 0;
203+ form[i++] = '%';
204+ form[i] = *strfrmt++;
205+ while (!isalpha(form[i]))
206+ {
207+ if (isdigit(form[i]))
208+ {
209+ size = size*10 + form[i]-'0';
210+ if (size >= MAX_CONVERTION)
211+ lua_error("format size/precision too long in function `format'");
212+ }
213+ else if (form[i] == '.')
214+ size = 0; /* re-start */
215+ if (++i >= MAX_FORMAT)
216+ lua_error("bad format in function `format'");
217+ form[i] = *strfrmt++;
218+ }
219+ form[i+1] = 0; /* ends string */
220+ switch (form[i])
221+ {
222+ case 'q':
223+ luaI_addquoted(lua_check_string(arg++, "format"));
224+ buff[0] = '\0'; /* addchar already done */
225+ break;
226+ case 's':
227+ {
228+ char *s = lua_check_string(arg++, "format");
229+ if (strlen(s) >= MAX_CONVERTION)
230+ lua_error("string argument too long in function `format'");
231+ sprintf(buff, form, s);
232+ break;
233+ }
234+ case 'c': case 'd': case 'i': case 'o':
235+ case 'u': case 'x': case 'X':
236+ sprintf(buff, form, (int)lua_check_number(arg++, "format"));
237+ break;
238+ case 'e': case 'E': case 'f': case 'g':
239+ sprintf(buff, form, lua_check_number(arg++, "format"));
240+ break;
241+ default: /* also treat cases 'pnLlh' */
242+ lua_error("invalid format option in function `format'");
243+ }
244+ for (i=0; buff[i]; i++) /* move formated value to result */
245+ luaI_addchar(buff[i]);
246+ }
175247 }
176− s[i-1] = 0;
177− lua_pushstring(s);
248+ lua_pushstring(luaI_addchar(0)); /* push the result */
178249 }
179250
251+
252+void luaI_openlib (struct lua_reg *l, int n)
253+{
254+ int i;
255+ for (i=0; i<n; i++)
256+ lua_register(l[i].name, l[i].func);
257+}
258+
259+static struct lua_reg strlib[] = {
260+{"strfind", str_find},
261+{"strlen", str_len},
262+{"strsub", str_sub},
263+{"strlower", str_lower},
264+{"strupper", str_upper},
265+{"ascii", str_ascii},
266+{"format", str_format}
267+};
268+
269+
180270 /*
181271 ** Open string library
182272 */
183273 void strlib_open (void)
184274 {
185− lua_register ("strfind", str_find);
186− lua_register ("strlen", str_len);
187− lua_register ("strsub", str_sub);
188− lua_register ("strlower", str_lower);
189− lua_register ("strupper", str_upper);
190− lua_register ("ascii", str_ascii);
191− lua_register ("int2str", str_int2str);
275+ luaI_openlib(strlib, (sizeof(strlib)/sizeof(strlib[0])));
192276 }
clients/lua/Makefile+5−8
@@ -1,21 +1,18 @@
11 # makefile for lua interpreter
22
3−BIN= $(LUA)/bin
4−INC= $(LUA)/include
5−LIB= $(LUA)/lib
3+LUA= ../..
64
7−CC= gcc
8−CFLAGS= $(INCS) $(DEFS) $(WARN) -O2
5+include $(LUA)/config
96
10−# in SunOs /usr/5include contains prototypes for standard lib
11−INCS= -I/usr/5include -I$(INC)
12−WARN= -Wall -Wmissing-prototypes -Wshadow -ansi
7+EXTRA_DEFS= $(POSIX)
138
149 OBJS= lua.o
1510 SRCS= lua.c
1611
1712 T=$(BIN)/lua
1813
14+all: $T
15+
1916 $T: $(OBJS)
2017 $(CC) -o $@ $(OBJS) -L$(LIB) -llua -llualib -lm
2118
clients/lua/lua.c+11−3
@@ -3,7 +3,7 @@ · 2 unmodified lines
33 ** Linguagem para Usuarios de Aplicacao
44 */
55
6−char *rcs_lua="$Id: lua.c,v 1.7 1995/10/31 17:05:35 roberto Exp $";
6+char *rcs_lua="$Id: lua.c,v 1.10 1996/05/03 19:20:17 roberto Exp $";
77
88 #include <stdio.h>
99 #include <string.h>
@@ -14,11 +14,15 @@ char *rcs_lua="$Id: lua.c,v 1.7 1995/10/31 17:05:35 roberto Exp $"; · 4 unmodified lines
1414 static int lua_argc;
1515 static char **lua_argv;
1616
17+#ifdef POSIX
1718 /*
1819 ** although this function is POSIX, there is no standard header file that
1920 ** defines it
2021 */
2122 int isatty (int fd);
23+#else
24+#define isatty(x) (x==0) /* assume stdin is a tty */
25+#endif
2226
2327 /*
2428 %F Allow Lua code to access argv strings.
@@ -41,10 +45,10 @@ static void lua_getargv (void) · 16 unmodified lines
4145
4246 static void manual_input (void)
4347 {
44− if (isatty(fileno(stdin)))
48+ if (isatty(0))
4549 {
4650 char buffer[250];
47− while (gets(buffer) != 0)
51+ while (fgets(buffer, sizeof(buffer), stdin) != 0)
4852 lua_dostring(buffer);
4953 }
5054 else
@@ -83,7 +87,11 @@ int main (int argc, char *argv[]) · 32 unmodified lines
8387 printf("%s %s\n(written by %s)\n\n",
8488 LUA_VERSION, LUA_COPYRIGHT, LUA_AUTHORS);
8589 else
90+ {
8691 result = lua_dofile (argv[i]);
92+ if (result)
93+ fprintf(stderr, "lua: error trying to run file %s\n", argv[i]);
94+ }
8795 }
8896 }
8997 return result;
config+28−0
@@ -0,0 +1,28 @@
1+# configuration file for making Lua
2+
3+# you need an ANSI C compiler
4+CC= gcc
5+WARN= -Wall -Wmissing-prototypes -Wshadow -ansi
6+
7+# in SunOs 4.1.x, uncomment the following line to avoid prototypes warnings
8+# for standard functions
9+#EXTRA_INCS= -I/usr/5include
10+
11+# if you don't have popen() in your C library, comment the following line:
12+POPEN= -DPOPEN
13+
14+# if your C library is not POSIX compliant, comment the following line:
15+POSIX= -DPOSIX
16+
17+### NO NEED TO CHANGE ANYTHING BELOW THIS LINE ================================
18+
19+VERSION= 2.4
20+
21+INC= $(LUA)/include
22+LIB= $(LUA)/lib
23+BIN= $(LUA)/bin
24+
25+INCS= -I$(INC) $(EXTRA_INCS)
26+DEFS= $(EXTRA_DEFS)
27+
28+CFLAGS= -O2 $(WARN) $(INCS) $(DEFS)
doc/Makefile+9−2
@@ -1,16 +1,23 @@
11 # makefile for lua distribution
22
33 all:
4+ rm -f manual.id
5+ touch manual.id
46 latex manual.tex
57 latex manual.tex
8+ makeindex manual
9+ sort -df manual.idx | sed -e 's/_/\\_/g' >manual.id
10+ latex manual.tex
611 dvips -o manual.ps manual.dvi
7− rm -f manual.tex manual.aux manual.log
12+ gzip manual.ps
13+ mv manual.ps.gz refman.ps.gz
14+ rm -f manual.*
815
916 clean:
1017 rm -f manual.tex
1118
1219 co:
13− co -f -M manual.tex
20+ co -f -M manual.tex luac.man
1421
1522 klean: clean
1623 rm -f manual.tex manual.ps manual.dvi
doc/luac.man+75−0
@@ -0,0 +1,75 @@
1+.\" $Id: luac.man,v 1.3 1996/03/28 20:24:55 lhf Exp $
2+.TH LUAC 1 "12 March 1996"
3+.SH NAME
4+luac \- Lua compiler
5+.SH SYNOPSIS
6+.B luac
7+[
8+.B \-dlpv
9+]
10+[
11+.B \-o
12+.I outputfile
13+]
14+.I sourcefile
15+\&.\|.\|.
16+.SH DESCRIPTION
17+.B luac
18+is the Lua compiler.
19+It translates programs written in the Lua programming language
20+into binary files that can be loaded and executed with
21+.B lua_dofile
22+in C or
23+.B dofile
24+in Lua.
25+
26+.BR luac
27+produces a single output file containing the bytecode
28+for all named source files.
29+By default,
30+the output file is named
31+.BR luac.out ,
32+but you can change this with the
33+.B \-o
34+option.
35+
36+You can use "-" to indicate stdin as a source file.
37+.SH OPTIONS
38+.LP
39+.TP 1i
40+.B \-d
41+turns debugging on.
42+.TP
43+.B \-l
44+produces a listing of the compiled bytecode for Lua's virtual machine.
45+.TP
46+.B \-p
47+parses sources files but does not generate any output file.
48+.TP
49+.B \-v
50+prints version information.
51+.TP
52+.BI \-o " outputfile"
53+Name the output file
54+.IR output ,
55+instead of the default
56+.BR luac.out .
57+The output file cannot be a source file.
58+.SH FILES
59+.PD 0
60+.TP 20
61+.B luac.out
62+default output file
63+.PD
64+.SH "SEE ALSO"
65+.BR lua (1)
66+.LP
67+.IR "Reference Manual of the Programming Language Lua"
68+.SH DIAGNOSTICS
69+Error messages should be self explanatory.
70+.SH BUGS
71+Inherits any bugs from Lua,
72+but Lua has no bugs...
73+.SH AUTHORS
74+W. Celes, R. Ierusalimschy & L. H. de Figueiredo
75+(lua@icad.puc-rio.br)
doc/luac.ps+246−0
@@ -0,0 +1,246 @@
1+%!PS-Adobe-3.0
2+%%Creator: groff version 1.09
3+%%CreationDate: Fri Mar 29 10:45:53 1996
4+%%DocumentNeededResources: font Times-Roman
5+%%+ font Times-Bold
6+%%+ font Times-Italic
7+%%DocumentSuppliedResources: procset grops 1.09 0
8+%%Pages: 1
9+%%PageOrder: Ascend
10+%%Orientation: Portrait
11+%%EndComments
12+%%BeginProlog
13+%%BeginResource: procset grops 1.09 0
14+/setpacking where{
15+pop
16+currentpacking
17+true setpacking
18+}if
19+/grops 120 dict dup begin
20+/SC 32 def
21+/A/show load def
22+/B{0 SC 3 -1 roll widthshow}bind def
23+/C{0 exch ashow}bind def
24+/D{0 exch 0 SC 5 2 roll awidthshow}bind def
25+/E{0 rmoveto show}bind def
26+/F{0 rmoveto 0 SC 3 -1 roll widthshow}bind def
27+/G{0 rmoveto 0 exch ashow}bind def
28+/H{0 rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def
29+/I{0 exch rmoveto show}bind def
30+/J{0 exch rmoveto 0 SC 3 -1 roll widthshow}bind def
31+/K{0 exch rmoveto 0 exch ashow}bind def
32+/L{0 exch rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def
33+/M{rmoveto show}bind def
34+/N{rmoveto 0 SC 3 -1 roll widthshow}bind def
35+/O{rmoveto 0 exch ashow}bind def
36+/P{rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def
37+/Q{moveto show}bind def
38+/R{moveto 0 SC 3 -1 roll widthshow}bind def
39+/S{moveto 0 exch ashow}bind def
40+/T{moveto 0 exch 0 SC 5 2 roll awidthshow}bind def
41+/SF{
42+findfont exch
43+[exch dup 0 exch 0 exch neg 0 0]makefont
44+dup setfont
45+[exch/setfont cvx]cvx bind def
46+}bind def
47+/MF{
48+findfont
49+[5 2 roll
50+0 3 1 roll
51+neg 0 0]makefont
52+dup setfont
53+[exch/setfont cvx]cvx bind def
54+}bind def
55+/level0 0 def
56+/RES 0 def
57+/PL 0 def
58+/LS 0 def
59+/PLG{
60+gsave newpath clippath pathbbox grestore
61+exch pop add exch pop
62+}bind def
63+/BP{
64+/level0 save def
65+1 setlinecap
66+1 setlinejoin
67+72 RES div dup scale
68+LS{
69+90 rotate
70+}{
71+0 PL translate
72+}ifelse
73+1 -1 scale
74+}bind def
75+/EP{
76+level0 restore
77+showpage
78+}bind def
79+/DA{
80+newpath arcn stroke
81+}bind def
82+/SN{
83+transform
84+.25 sub exch .25 sub exch
85+round .25 add exch round .25 add exch
86+itransform
87+}bind def
88+/DL{
89+SN
90+moveto
91+SN
92+lineto stroke
93+}bind def
94+/DC{
95+newpath 0 360 arc closepath
96+}bind def
97+/TM matrix def
98+/DE{
99+TM currentmatrix pop
100+translate scale newpath 0 0 .5 0 360 arc closepath
101+TM setmatrix
102+}bind def
103+/RC/rcurveto load def
104+/RL/rlineto load def
105+/ST/stroke load def
106+/MT/moveto load def
107+/CL/closepath load def
108+/FL{
109+currentgray exch setgray fill setgray
110+}bind def
111+/BL/fill load def
112+/LW/setlinewidth load def
113+/RE{
114+findfont
115+dup maxlength 1 index/FontName known not{1 add}if dict begin
116+{
117+1 index/FID ne{def}{ pop pop}ifelse
118+}forall
119+/Encoding exch def
120+dup/FontName exch def
121+currentdict end definefont pop
122+}bind def
123+/DEFS 0 def
124+/EBEGIN{
125+moveto
126+DEFS begin
127+}bind def
128+/EEND/end load def
129+/CNT 0 def
130+/level1 0 def
131+/PBEGIN{
132+/level1 save def
133+translate
134+div 3 1 roll div exch scale
135+neg exch neg exch translate
136+0 setgray
137+0 setlinecap
138+1 setlinewidth
139+0 setlinejoin
140+10 setmiterlimit
141+[] 0 setdash
142+/setstrokeadjust where{
143+pop
144+false setstrokeadjust
145+}if
146+/setoverprint where{
147+pop
148+false setoverprint
149+}if
150+newpath
151+/CNT countdictstack def
152+userdict begin
153+/showpage{} def
154+}bind def
155+/PEND{
156+clear
157+countdictstack CNT sub{end}repeat
158+level1 restore
159+}bind def
160+end def
161+/setpacking where{
162+pop
163+setpacking
164+}if
165+%%EndResource
166+%%IncludeResource: font Times-Roman
167+%%IncludeResource: font Times-Bold
168+%%IncludeResource: font Times-Italic
169+grops begin/DEFS 1 dict def DEFS begin/u{.001 mul}bind def end/RES 72
170+def/PL 792 def/LS false def/ENC0[/asciicircum/asciitilde/Scaron/Zcaron
171+/scaron/zcaron/Ydieresis/trademark/quotesingle/.notdef/.notdef/.notdef
172+/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef
173+/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef
174+/.notdef/.notdef/space/exclam/quotedbl/numbersign/dollar/percent
175+/ampersand/quoteright/parenleft/parenright/asterisk/plus/comma/hyphen
176+/period/slash/zero/one/two/three/four/five/six/seven/eight/nine/colon
177+/semicolon/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O
178+/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright/circumflex
179+/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y
180+/z/braceleft/bar/braceright/tilde/.notdef/quotesinglbase/guillemotleft
181+/guillemotright/bullet/florin/fraction/perthousand/dagger/daggerdbl
182+/endash/emdash/ff/fi/fl/ffi/ffl/dotlessi/dotlessj/grave/hungarumlaut
183+/dotaccent/breve/caron/ring/ogonek/quotedblleft/quotedblright/oe/lslash
184+/quotedblbase/OE/Lslash/.notdef/exclamdown/cent/sterling/currency/yen
185+/brokenbar/section/dieresis/copyright/ordfeminine/guilsinglleft
186+/logicalnot/minus/registered/macron/degree/plusminus/twosuperior
187+/threesuperior/acute/mu/paragraph/periodcentered/cedilla/onesuperior
188+/ordmasculine/guilsinglright/onequarter/onehalf/threequarters
189+/questiondown/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE
190+/Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex
191+/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis
192+/multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn
193+/germandbls/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla
194+/egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis
195+/eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide/oslash
196+/ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis]def
197+/Times-Italic@0 ENC0/Times-Italic RE/Times-Bold@0 ENC0/Times-Bold RE
198+/Times-Roman@0 ENC0/Times-Roman RE
199+%%EndProlog
200+%%Page: 1 1
201+%%BeginPageSetup
202+BP
203+%%EndPageSetup
204+/F0 10/Times-Roman@0 SF(LU)72 48 Q -.034 -.4(AC \( 1 \))-.4 H
205+(User Commands)157.852 E(LU)157.452 E -.034 -.4(AC \( 1 \))-.4 H/F1 9
206+/Times-Bold@0 SF -.18(NA)72 96 S(ME).18 E F0(luac \255 Lua compiler)108
207+108 Q F1(SYNOPSIS)72 124.8 Q/F2 10/Times-Bold@0 SF(luac)108 136.8 Q F0
208+([)3.75 E F2(\255dlpv)3.75 E F0 3.75(][)3.75 G F2<ad6f>A/F3 10
209+/Times-Italic@0 SF(output\214le)3.75 E F0(])3.75 E F3(sour)3.75 E
210+(ce\214le)-.37 E F0 1.666(...)3.75 G F1(DESCRIPTION)72 153.6 Q F2(luac)
211+108 165.6 Q F0 .371(is the Lua compiler)2.871 F 5.371(.I)-.55 G 2.871
212+(tt)-5.371 G .37(ranslates programs written in the Lua programming lang\
213+uage into binary \214les)-2.871 F(that can be loaded and e)108 177.6 Q
214+-.15(xe)-.15 G(cuted with).15 E F2(lua_do\214le)2.5 E F0(in C or)2.5 E
215+F2(do\214le)2.5 E F0(in Lua.)2.5 E F2(luac)108 201.6 Q F0 .159(produces\
216+ a single output \214le containing the bytecode for all named source \
217+\214les.)2.658 F .159(By def)5.159 F .159(ault, the output)-.1 F
218+(\214le is named)108 213.6 Q F2(luac.out)2.5 E F0 2.5(,b)C
219+(ut you can change this with the)-2.7 E F2<ad6f>2.5 E F0(option.)2.5 E
220+-1.1(Yo)108 237.6 S 2.5(uc)1.1 G
221+(an use "-" to indicate stdin as a source \214le.)-2.5 E F1(OPTIONS)72
222+254.4 Q F2<ad64>108 266.4 Q F0(turns deb)60.74 E(ugging on.)-.2 E F2
223+<ad6c>108 283.2 Q F0
224+(produces a listing of the compiled bytecode for Lua')63.52 E 2.5(sv)
225+-.55 G(irtual machine.)-2.5 E F2<ad70>108 300 Q F0
226+(parses sources \214les b)60.74 E(ut does not generate an)-.2 E 2.5(yo)
227+-.15 G(utput \214le.)-2.5 E F2<ad76>108 316.8 Q F0(prints v)61.3 E
228+(ersion information.)-.15 E F2<ad6f>108 333.6 Q F3(output\214le)2.5 E F0
229+.657(Name the output \214le)21.02 F F3(output)3.157 E F0 3.157(,i)C .657
230+(nstead of the def)-3.157 F(ault)-.1 E F2(luac.out)3.157 E F0 5.657(.T)C
231+.656(he output \214le cannot be a)-5.657 F(source \214le.)180 345.6 Q F1
232+(FILES)72 362.4 Q F2(luac.out)108 374.4 Q F0(def)65.83 E
233+(ault output \214le)-.1 E F1(SEE ALSO)72 391.2 Q F2(lua)108 403.2 Q F0
234+(\(1\))A F3(Refer)108 420 Q(ence Manual of the Pr)-.37 E -.1(og)-.45 G
235+-.15(ra).1 G(mming Langua).15 E .2 -.1(ge L)-.1 H(ua).1 E F1(DIA)72
236+436.8 Q(GNOSTICS)-.495 E F0(Error messages should be self e)108 448.8 Q
237+(xplanatory)-.15 E(.)-.65 E F1 -.09(BU)72 465.6 S(GS).09 E F0
238+(Inherits an)108 477.6 Q 2.5(yb)-.15 G(ugs from Lua, b)-2.7 E
239+(ut Lua has no b)-.2 E(ugs...)-.2 E F1 -.45(AU)72 494.4 S(THORS).45 E F0
240+1.84 -.92(W. C)108 506.4 T(eles, R. Ierusalimsch).92 E 2.5(y&L)-.05 G
241+2.5(.H)-2.5 G 2.5(.d)-2.5 G 2.5(eF)-2.5 G
242+(igueiredo \(lua@icad.puc-rio.br\))-2.5 E(29 March 1996)72 768 Q
243+(12 March 1996)142.35 E(1)198.45 E EP
244+%%Trailer
245+end
246+%%EOF
doc/luac.txt+66−0
@@ -0,0 +1,66 @@
1+
2+
3+
4+LUAC(1) User Commands LUAC(1)
5+
6+
7+
8+NAME
9+ luac - Lua compiler
10+
11+SYNOPSIS
12+ luac [ -dlpv ] [ -o outputfile ] sourcefile ...
13+
14+DESCRIPTION
15+ luac is the Lua compiler. It translates programs written in
16+ the Lua programming language into binary files that can be
17+ loaded and executed with lua_dofile in C or dofile in Lua.
18+
19+ luac produces a single output file containing the bytecode
20+ for all named source files. By default, the output file is
21+ named luac.out, but you can change this with the -o option.
22+
23+ You can use "-" to indicate stdin as a source file.
24+
25+OPTIONS
26+ -d turns debugging on.
27+
28+ -l produces a listing of the compiled bytecode for
29+ Lua's virtual machine.
30+
31+ -p parses sources files but does not generate any
32+ output file.
33+
34+ -v prints version information.
35+
36+ -o outputfile
37+ Name the output file output, instead of the
38+ default luac.out. The output file cannot be a
39+ source file.
40+
41+FILES
42+ luac.out default output file
43+
44+SEE ALSO
45+ lua(1)
46+
47+ Reference Manual of the Programming Language Lua
48+
49+DIAGNOSTICS
50+ Error messages should be self explanatory.
51+
52+BUGS
53+ Inherits any bugs from Lua, but Lua has no bugs...
54+
55+AUTHORS
56+ W. Celes, R. Ierusalimschy & L. H. de Figueiredo
57+ (lua@icad.puc-rio.br)
58+
59+
60+
61+
62+
63+Formatted 96/03/29 12 March 1996 1
64+
65+
66+
doc/manual.ps+0−2859
@@ -1,2859 +0,0 @@
1−%!PS-Adobe-2.0
2−%%Creator: dvips 5.58 Copyright 1986, 1994 Radical Eye Software
3−%%Title: manual.dvi
4−%%CreationDate: Tue Nov 28 10:59:43 1995
5−%%Pages: 27
6−%%PageOrder: Ascend
7−%%BoundingBox: 0 0 612 792
8−%%EndComments
9−%DVIPSCommandLine: /software/tex/bin/_dvips -o manual.ps manual.dvi
10−%DVIPSParameters: dpi=300, comments removed
11−%DVIPSSource: TeX output 1995.11.28:1056
12−%%BeginProcSet: tex.pro
13−/TeXDict 250 dict def TeXDict begin /N{def}def /B{bind def}N /S{exch}N
14−/X{S N}B /TR{translate}N /isls false N /vsize 11 72 mul N /hsize 8.5 72
15−mul N /landplus90{false}def /@rigin{isls{[0 landplus90{1 -1}{-1 1}
16−ifelse 0 0 0]concat}if 72 Resolution div 72 VResolution div neg scale
17−isls{landplus90{VResolution 72 div vsize mul 0 exch}{Resolution -72 div
18−hsize mul 0}ifelse TR}if Resolution VResolution vsize -72 div 1 add mul
19−TR[matrix currentmatrix{dup dup round sub abs 0.00001 lt{round}if}
20−forall round exch round exch]setmatrix}N /@landscape{/isls true N}B
21−/@manualfeed{statusdict /manualfeed true put}B /@copies{/#copies X}B
22−/FMat[1 0 0 -1 0 0]N /FBB[0 0 0 0]N /nn 0 N /IE 0 N /ctr 0 N /df-tail{
23−/nn 8 dict N nn begin /FontType 3 N /FontMatrix fntrx N /FontBBox FBB N
24−string /base X array /BitMaps X /BuildChar{CharBuilder}N /Encoding IE N
25−end dup{/foo setfont}2 array copy cvx N load 0 nn put /ctr 0 N[}B /df{
26−/sf 1 N /fntrx FMat N df-tail}B /dfs{div /sf X /fntrx[sf 0 0 sf neg 0 0]
27−N df-tail}B /E{pop nn dup definefont setfont}B /ch-width{ch-data dup
28−length 5 sub get}B /ch-height{ch-data dup length 4 sub get}B /ch-xoff{
29−128 ch-data dup length 3 sub get sub}B /ch-yoff{ch-data dup length 2 sub
30−get 127 sub}B /ch-dx{ch-data dup length 1 sub get}B /ch-image{ch-data
31−dup type /stringtype ne{ctr get /ctr ctr 1 add N}if}B /id 0 N /rw 0 N
32−/rc 0 N /gp 0 N /cp 0 N /G 0 N /sf 0 N /CharBuilder{save 3 1 roll S dup
33−/base get 2 index get S /BitMaps get S get /ch-data X pop /ctr 0 N ch-dx
34−0 ch-xoff ch-yoff ch-height sub ch-xoff ch-width add ch-yoff
35−setcachedevice ch-width ch-height true[1 0 0 -1 -.1 ch-xoff sub ch-yoff
36−.1 sub]{ch-image}imagemask restore}B /D{/cc X dup type /stringtype ne{]}
37−if nn /base get cc ctr put nn /BitMaps get S ctr S sf 1 ne{dup dup
38−length 1 sub dup 2 index S get sf div put}if put /ctr ctr 1 add N}B /I{
39−cc 1 add D}B /bop{userdict /bop-hook known{bop-hook}if /SI save N @rigin
40−0 0 moveto /V matrix currentmatrix dup 1 get dup mul exch 0 get dup mul
41−add .99 lt{/QV}{/RV}ifelse load def pop pop}N /eop{SI restore userdict
42−/eop-hook known{eop-hook}if showpage}N /@start{userdict /start-hook
43−known{start-hook}if pop /VResolution X /Resolution X 1000 div /DVImag X
44−/IE 256 array N 0 1 255{IE S 1 string dup 0 3 index put cvn put}for
45−65781.76 div /vsize X 65781.76 div /hsize X}N /p{show}N /RMat[1 0 0 -1 0
46−0]N /BDot 260 string N /rulex 0 N /ruley 0 N /v{/ruley X /rulex X V}B /V
47−{}B /RV statusdict begin /product where{pop product dup length 7 ge{0 7
48−getinterval dup(Display)eq exch 0 4 getinterval(NeXT)eq or}{pop false}
49−ifelse}{false}ifelse end{{gsave TR -.1 .1 TR 1 1 scale rulex ruley false
50−RMat{BDot}imagemask grestore}}{{gsave TR -.1 .1 TR rulex ruley scale 1 1
51−false RMat{BDot}imagemask grestore}}ifelse B /QV{gsave newpath transform
52−round exch round exch itransform moveto rulex 0 rlineto 0 ruley neg
53−rlineto rulex neg 0 rlineto fill grestore}B /a{moveto}B /delta 0 N /tail
54−{dup /delta X 0 rmoveto}B /M{S p delta add tail}B /b{S p tail}B /c{-4 M}
55−B /d{-3 M}B /e{-2 M}B /f{-1 M}B /g{0 M}B /h{1 M}B /i{2 M}B /j{3 M}B /k{
56−4 M}B /w{0 rmoveto}B /l{p -4 w}B /m{p -3 w}B /n{p -2 w}B /o{p -1 w}B /q{
57−p 1 w}B /r{p 2 w}B /s{p 3 w}B /t{p 4 w}B /x{0 S rmoveto}B /y{3 2 roll p
58−a}B /bos{/SS save N}B /eos{SS restore}B end
59−%%EndProcSet
60−TeXDict begin 40258431 52099146 1000 300 300
61−(/home/lhf/w/doc/lua/html/save/manual.dvi) @start /Fa
62−7 121 df<07F8001FFE003FFF803E07C03E03C01C01E00001E0003FE003FFE00FFFE03F
63−C1E07C01E07801E0F001E0F001E0F001E07803E07C07E03FFFFE1FFEFE03F87E17157E94
64−1A>97 D<01F80007FF000FFF801F07C03C03C07801E07801E0F000F0F000F0FFFFF0FFFF
65−F0FFFFF0F000007000007800007C00F03E00F01F03F00FFFE003FFC000FE0014157D941A
66−>101 D<7F0F8000FF7FE0007FFFF0000FF0F0000FC078000F8078000F0078000F007800
67−0F0078000F0078000F0078000F0078000F0078000F0078000F0078000F0078000F007800
68−0F0078007FE1FF00FFF3FF807FE1FF00191580941A>110 D<7FC1F8FFC7FC7FDFFE03FE
69−1E03F80C03F00003E00003E00003C00003C00003C00003C00003C00003C00003C00003C0
70−0003C00003C0007FFF80FFFF807FFF8017157F941A>114 D<01C00003C00003C00003C0
71−0003C00003C00003C0007FFFE0FFFFE0FFFFE003C00003C00003C00003C00003C00003C0
72−0003C00003C00003C00003C00003C0F003C0F003C0F003C0F001E1E001FFE000FF80003F
73−00141C7F9B1A>116 D<7FC7FCFFC7FE7FC7FC0F01E00F01E00F01E00F83E00783C00783
74−C00783C003C78003C78003C78001C70001EF0001EF0001EF0000FE0000FE0000FE00007C
75−0017157F941A>118 D<7FC7F87FCFFC7FC7F80787C007C78003EF8001FF0000FE0000FC
76−00007C00007C00007C0000FE0001EF0003EF0003C7800783C00F83E07FC7FCFFC7FE7FC7
77−FC17157F941A>120 D E /Fb 1 122 df<1C0C2E1C4E1C8E389C381C381C383870387038
78−70387018E00FE000E000C0E1C0E38047003C000E137F8C11>121
79−D E /Fc 2 121 df<70F8F8F87005057C840D>58 D<07C3C00FE7E0187C603078F06079
80−F06079F0C0F1E000F1C000F00000F00001E00001E00039E00079E030FBC060FBC060F3C0
81−C0E7E3807CFF00383C0014147E931A>120 D E /Fd 47 121 df<0007F800007FFE0001
82−FC0F0003F01F0007E03F800FC03F800FC03F800FC03F800FC01F000FC004000FC000000F
83−C000000FC00000FFFFFF80FFFFFF80FFFFFF800FC01F800FC01F800FC01F800FC01F800F
84−C01F800FC01F800FC01F800FC01F800FC01F800FC01F800FC01F800FC01F800FC01F800F
85−C01F800FC01F800FC01F807FF8FFF07FF8FFF07FF8FFF01C237FA21F>12
86−D<3C7EFFFFFFFF7E3C08087C8710>46 D<0000180000380000380000700000700000E000
87−00E00000E00001C00001C0000380000380000380000700000700000700000E00000E0000
88−1C00001C00001C0000380000380000700000700000700000E00000E00001C00001C00001
89−C0000380000380000700000700000700000E00000E00000E00001C00001C000038000038
90−0000380000700000700000E00000E00000C0000015317DA41C>I<00180000780003F800
91−FFF800FFF800FDF80001F80001F80001F80001F80001F80001F80001F80001F80001F800
92−01F80001F80001F80001F80001F80001F80001F80001F80001F80001F80001F80001F800
93−01F80001F8007FFFE07FFFE07FFFE013207C9F1C>49 D<03FC000FFF003FFFC0783FE07C
94−0FF0FE07F0FE03F8FE03F8FE03F87C03F83803F80003F80003F00007F00007E0000FC000
95−1F80001F00003C0000780000F00001E03803C0380700380600380C00781FFFF03FFFF07F
96−FFF0FFFFF0FFFFF0FFFFF015207D9F1C>I<01FE0007FF800FFFE01E07F03F03F03F03F8
97−3F83F83F03F81F03F80C03F80003F00007E00007C0001F8001FE0001FF000007E00003F0
98−0001F80001FC0001FE0001FE7C01FE7C01FEFE01FEFE01FCFE01FC7C03F87C07F03FFFE0
99−0FFFC003FE0017207E9F1C>I<0000E00001E00003E00007E0000FE0000FE0001FE0003F
100−E00077E000E7E000E7E001C7E00387E00707E00E07E00E07E01C07E03807E07007E0E007
101−E0FFFFFFFFFFFFFFFFFF0007E00007E00007E00007E00007E00007E000FFFF00FFFF00FF
102−FF18207E9F1C>I<2000603C01E03FFFC03FFFC03FFF803FFE003FFC003FF00038000038
103−000038000038000039FC003FFF003E0FC03807E03003F00003F00003F00003F80003F838
104−03F87C03F8FC03F8FC03F8FC03F0F803F07007E03C0FC03FFF800FFF0003F80015207D9F
105−1C>I<001F8000FFE003FFF007F0F00FC1F81F81F83F01F83F01F87E00F07E00007E0000
106−FE0800FE7FC0FEFFE0FF81F0FF00F8FF00FCFF00FCFE00FEFE00FEFE00FEFE00FE7E00FE
107−7E00FE7E00FE3E00FC3E00FC1F00F80F83F007FFE003FFC000FF0017207E9F1C>I<7000
108−007C00007FFFFE7FFFFE7FFFFE7FFFFC7FFFF87FFFF0F00070E000E0E001C0E00380E007
109−00000E00000E00001C00003C0000380000780000780000F80000F00001F00001F00001F0
110−0001F00003F00003F00003F00003F00003F00003F00003F00001E00017227DA11C>I<00
111−FE0003FFC007FFE00F83F01E01F01E00F83E00F83E00F83F00F83F80F83FE1F01FF9E01F
112−FFC00FFF8007FFC003FFE00FFFF01F7FF83E1FFC7C07FC7C01FEF800FEF8007EF8003EF8
113−003EF8003E7C003C7E00783F01F81FFFF00FFFC001FF0017207E9F1C>I<000070000000
114−00F800000000F800000000F800000001FC00000001FC00000003FE00000003FE00000003
115−FE000000077F000000077F0000000F7F8000000E3F8000000E3F8000001C1FC000001C1F
116−C000003C1FE00000380FE00000380FE00000700FF000007007F00000F007F80000FFFFF8
117−0000FFFFF80001FFFFFC0001C001FC0001C001FC00038000FE00038000FE00078000FF00
118−0700007F00FFF007FFF8FFF007FFF8FFF007FFF825227EA12A>65
119−D<0003FE0180001FFF838000FFFFE78001FF00FF8003F8003F8007F0001F800FE0000F80
120−1FC0000F803F800007803F800007807F800003807F000003807F00000380FF00000000FF
121−00000000FF00000000FF00000000FF00000000FF00000000FF00000000FF000000007F00
122−0000007F000003807F800003803F800003803F800007801FC00007000FE0000F0007F000
123−1E0003F8003C0001FF00F80000FFFFF000001FFFC0000003FE000021227DA128>67
124−D<FFFFFF8000FFFFFFF000FFFFFFFC0007F003FE0007F0007F0007F0003F8007F0001FC0
125−07F0000FE007F0000FE007F0000FF007F00007F007F00007F007F00007F007F00007F807
126−F00007F807F00007F807F00007F807F00007F807F00007F807F00007F807F00007F807F0
127−0007F807F00007F007F00007F007F00007F007F0000FE007F0000FE007F0001FC007F000
128−3F8007F0007F0007F003FE00FFFFFFFC00FFFFFFF000FFFFFF800025227EA12B>I<FFFF
129−FFFCFFFFFFFCFFFFFFFC07F001FC07F0007C07F0003C07F0001C07F0001E07F0001E07F0
130−1C0E07F01C0E07F01C0E07F01C0E07F03C0007F07C0007FFFC0007FFFC0007FFFC0007F0
131−7C0007F03C0007F01C0707F01C0707F01C0707F01C0E07F0000E07F0000E07F0001E07F0
132−001E07F0003E07F0007E07F001FCFFFFFFFCFFFFFFFCFFFFFFFC20227EA125>I<FFFFFF
133−F8FFFFFFF8FFFFFFF807F003F807F000F807F0007807F0003807F0003C07F0003C07F01C
134−1C07F01C1C07F01C1C07F01C1C07F03C0007F07C0007FFFC0007FFFC0007FFFC0007F07C
135−0007F03C0007F01C0007F01C0007F01C0007F01C0007F0000007F0000007F0000007F000
136−0007F0000007F0000007F00000FFFFC000FFFFC000FFFFC0001E227EA123>I<FFFF83FF
137−FEFFFF83FFFEFFFF83FFFE07F0001FC007F0001FC007F0001FC007F0001FC007F0001FC0
138−07F0001FC007F0001FC007F0001FC007F0001FC007F0001FC007F0001FC007F0001FC007
139−FFFFFFC007FFFFFFC007FFFFFFC007F0001FC007F0001FC007F0001FC007F0001FC007F0
140−001FC007F0001FC007F0001FC007F0001FC007F0001FC007F0001FC007F0001FC007F000
141−1FC007F0001FC0FFFF83FFFEFFFF83FFFEFFFF83FFFE27227EA12C>72
142−D<FFFF80FFFF80FFFF8007F00007F00007F00007F00007F00007F00007F00007F00007F0
143−0007F00007F00007F00007F00007F00007F00007F00007F00007F00007F00007F00007F0
144−0007F00007F00007F00007F00007F00007F00007F000FFFF80FFFF80FFFF8011227EA115
145−>I<FFFFC000FFFFC000FFFFC00007F0000007F0000007F0000007F0000007F0000007F0
146−000007F0000007F0000007F0000007F0000007F0000007F0000007F0000007F0000007F0
147−000007F0000007F0000007F0003807F0003807F0003807F0003807F0007807F0007807F0
148−007807F000F007F001F007F003F007F00FF0FFFFFFF0FFFFFFF0FFFFFFF01D227EA122>
149−76 D<FFF800001FFFFFF800001FFFFFFC00003FFF07FC00003FE007FC00003FE0077E00
150−0077E0077E000077E0073F0000E7E0073F0000E7E0071F8001C7E0071F8001C7E0071F80
151−01C7E0070FC00387E0070FC00387E00707E00707E00707E00707E00703F00E07E00703F0
152−0E07E00703F00E07E00701F81C07E00701F81C07E00700FC3807E00700FC3807E007007E
153−7007E007007E7007E007007E7007E007003FE007E007003FE007E007001FC007E007001F
154−C007E007000F8007E0FFF80F80FFFFFFF80F80FFFFFFF80700FFFF30227EA135>I<0007
155−FC0000003FFF800000FE0FE00003F803F80007E000FC000FC0007E001FC0007F001F8000
156−3F003F80003F803F80003F807F00001FC07F00001FC07F00001FC0FF00001FE0FF00001F
157−E0FF00001FE0FF00001FE0FF00001FE0FF00001FE0FF00001FE0FF00001FE0FF00001FE0
158−7F00001FC07F80003FC07F80003FC03F80003F803FC0007F801FC0007F000FE000FE0007
159−F001FC0003F803F80000FE0FE000003FFF80000007FC000023227DA12A>79
160−D<FFFFFF00FFFFFFE0FFFFFFF007F007F807F001FC07F001FE07F000FE07F000FF07F000
161−FF07F000FF07F000FF07F000FF07F000FF07F000FE07F001FE07F001FC07F007F807FFFF
162−F007FFFFC007F0000007F0000007F0000007F0000007F0000007F0000007F0000007F000
163−0007F0000007F0000007F0000007F00000FFFF8000FFFF8000FFFF800020227EA126>I<
164−01FE0607FF8E1FFFFE3F01FE7C007E78003E78001EF8001EF8000EF8000EFC0000FF0000
165−FFE0007FFF007FFFC03FFFF01FFFF80FFFFC03FFFE003FFE0003FE00007F00003F00001F
166−E0001FE0001FE0001FF0001EF0003EFC003CFF00FCFFFFF8E7FFE0C0FF8018227DA11F>
167−83 D<7FFFFFFF807FFFFFFF807FFFFFFF807E03F81F807C03F807807803F807807003F8
168−0380F003F803C0F003F803C0E003F801C0E003F801C0E003F801C0E003F801C00003F800
169−000003F800000003F800000003F800000003F800000003F800000003F800000003F80000
170−0003F800000003F800000003F800000003F800000003F800000003F800000003F8000000
171−03F800000003F800000003F8000001FFFFF00001FFFFF00001FFFFF00022227EA127>I<
172−FFFF001FFEFFFF001FFEFFFF001FFE07F00001C007F80003C003F800038003FC00078001
173−FC00070001FC00070000FE000E0000FE000E0000FF001E00007F001C00007F803C00003F
174−803800003F803800001FC07000001FC07000001FE0F000000FE0E000000FF0E0000007F1
175−C0000007F1C0000007FBC0000003FB80000003FF80000001FF00000001FF00000000FE00
176−000000FE00000000FE000000007C000000007C0000000038000027227FA12A>86
177−D<0FFE003FFF807E07E07E03F07E01F07E01F83C01F80001F80001F800FFF807FFF81FE1
178−F83F01F87E01F8FC01F8FC01F8FC01F8FC01F87E03F87E0EFF1FFCFF07F03F18167E951B
179−>97 D<FF800000FF800000FF8000001F8000001F8000001F8000001F8000001F8000001F
180−8000001F8000001F8000001F8000001F8000001F8FE0001FFFF8001FF07C001FC03E001F
181−801F001F800F801F800F801F800FC01F800FC01F800FC01F800FC01F800FC01F800FC01F
182−800FC01F800FC01F800F801F801F801F801F001FC03E001FE07C001E7FF8001C0FC0001A
183−237EA21F>I<00FF8007FFE00F83F01F03F03E03F07E03F07C01E07C0000FC0000FC0000
184−FC0000FC0000FC0000FC00007C00007E00007E00003E00381F00700FC0F007FFC000FF00
185−15167E9519>I<0001FF000001FF000001FF0000003F0000003F0000003F0000003F0000
186−003F0000003F0000003F0000003F0000003F0000003F0001FE3F0007FFBF000F81FF001F
187−007F003E003F007E003F007C003F00FC003F00FC003F00FC003F00FC003F00FC003F00FC
188−003F00FC003F00FC003F007C003F007C003F003E003F001F00FF000F83FFE007FFBFE001
189−FC3FE01B237EA21F>I<00FE0007FF800F87C01E01E03E01F07C00F07C00F8FC00F8FC00
190−F8FFFFF8FFFFF8FC0000FC0000FC00007C00007C00007E00003E00381F00700FC0F003FF
191−C000FF0015167E951A>I<01FE1F0007FFFF800F87E7801F03E7801E01E7003E01F0003E
192−01F0003E01F0003E01F0003E01F0001E01E0001F03E0000F87C0000FFF800019FE000018
193−0000001C0000001C0000001FFFE0001FFFF8000FFFFE000FFFFF003FFFFF007C003F80F8
194−001F80F8000F80F8000F80F8000F807C001F007E003F001F80FC000FFFF80001FFC00019
195−217F951C>103 D<FF800000FF800000FF8000001F8000001F8000001F8000001F800000
196−1F8000001F8000001F8000001F8000001F8000001F8000001F87E0001F9FF8001FB8FC00
197−1FE07C001FC07E001FC07E001F807E001F807E001F807E001F807E001F807E001F807E00
198−1F807E001F807E001F807E001F807E001F807E001F807E001F807E00FFF1FFC0FFF1FFC0
199−FFF1FFC01A237EA21F>I<1E003F007F807F807F807F803F001E00000000000000000000
200−000000FF80FF80FF801F801F801F801F801F801F801F801F801F801F801F801F801F801F
201−801F801F80FFF0FFF0FFF00C247FA30F>I<003C007E00FF00FF00FF00FF007E003C0000
202−0000000000000000000003FF03FF03FF003F003F003F003F003F003F003F003F003F003F
203−003F003F003F003F003F003F003F003F003F003F003F003F783FFC3FFC3EFC7E78FC7FF0
204−1FC0102E83A311>I<FF800000FF800000FF8000001F8000001F8000001F8000001F8000
205−001F8000001F8000001F8000001F8000001F8000001F8000001F83FF801F83FF801F83FF
206−801F80F0001F83E0001F8780001F8F00001F9E00001FBE00001FFE00001FFF00001FFF80
207−001FCFC0001F8FC0001F87E0001F83F0001F83F0001F81F8001F80FC00FFF1FFC0FFF1FF
208−C0FFF1FFC01A237EA21E>I<FF80FF80FF801F801F801F801F801F801F801F801F801F80
209−1F801F801F801F801F801F801F801F801F801F801F801F801F801F801F801F801F801F80
210−1F801F80FFF0FFF0FFF00C237FA20F>I<FF87F00FE000FF9FFC3FF800FFB87E70FC001F
211−E03EC07C001FC03F807E001FC03F807E001F803F007E001F803F007E001F803F007E001F
212−803F007E001F803F007E001F803F007E001F803F007E001F803F007E001F803F007E001F
213−803F007E001F803F007E001F803F007E001F803F007E00FFF1FFE3FFC0FFF1FFE3FFC0FF
214−F1FFE3FFC02A167E952F>I<FF87E000FF9FF800FFB8FC001FE07C001FC07E001FC07E00
215−1F807E001F807E001F807E001F807E001F807E001F807E001F807E001F807E001F807E00
216−1F807E001F807E001F807E001F807E00FFF1FFC0FFF1FFC0FFF1FFC01A167E951F>I<00
217−FE0007FFC00F83E01E00F03E00F87C007C7C007C7C007CFC007EFC007EFC007EFC007EFC
218−007EFC007EFC007E7C007C7C007C3E00F81F01F00F83E007FFC000FE0017167E951C>I<
219−FF8FE000FFFFF800FFF07C001FC03E001F801F001F801F801F801F801F800FC01F800FC0
220−1F800FC01F800FC01F800FC01F800FC01F800FC01F800FC01F801F801F801F801F803F00
221−1FC03E001FE0FC001FFFF8001F8FC0001F8000001F8000001F8000001F8000001F800000
222−1F8000001F800000FFF00000FFF00000FFF000001A207E951F>I<FF0F80FF1FE0FF33F0
223−1F63F01FC3F01FC3F01FC1E01F80001F80001F80001F80001F80001F80001F80001F8000
224−1F80001F80001F80001F8000FFF800FFF800FFF80014167F9517>114
225−D<07F3001FFF00781F00700F00F00700F00700F80000FF0000FFF0007FFC003FFE001FFF
226−0007FF00003F80E00F80E00780F00780F00780F80700FC1E00FFFC00C7F00011167E9516
227−>I<01C00001C00001C00001C00003C00003C00003C00007C00007C0000FC0003FFF00FF
228−FF00FFFF000FC0000FC0000FC0000FC0000FC0000FC0000FC0000FC0000FC0000FC0000F
229−C3800FC3800FC3800FC3800FC3800FC30007E70003FE0000FC0011207F9F16>I<FF83FE
230−00FF83FE00FF83FE001F807E001F807E001F807E001F807E001F807E001F807E001F807E
231−001F807E001F807E001F807E001F807E001F807E001F807E001F807E001F80FE001F80FE
232−000F83FFC007FF7FC001FC7FC01A167E951F>I<FFF03FE0FFF03FE0FFF03FE00FC00E00
233−0FE01E0007E01C0007E01C0003F0380003F0380003F8780001F8700001FCF00000FCE000
234−00FCE000007FC000007FC000007FC000003F8000003F8000001F0000001F0000000E0000
235−1B167F951E>I<FFE3FF8FF8FFE3FF8FF8FFE3FF8FF81FC07C03C00FC0FE03800FC0FE03
236−800FE0FF078007E1FF070007E1DF070003F1DF8E0003F38F8E0003F38F8E0001FB8FDC00
237−01FF07DC0001FF07FC0000FF07F80000FE03F80000FE03F800007E03F000007C01F00000
238−3C01E000003800E00025167F9528>I<FFF0FFE0FFF0FFE0FFF0FFE007E0780007F0F000
239−03F8F00001F9E00000FFC00000FF8000007F0000003F0000001F8000003FC000007FE000
240−00F7F00001E3F00001C1F80003C0FC000780FE00FFC1FFE0FFC1FFE0FFC1FFE01B167F95
241−1E>I E /Fe 4 112 df<03CC0E2E183C381C301C701CE038E038E038E038C073C073C0F3
242−60F263361E1C10107C8F14>97 D<383E1F006CC331804F83C1C0CF03C1C0CE0381C0CE03
243−81C01C0703801C0703801C0703801C070700380E0730380E0730380E0E30380E0E60701C
244−0640300C03801C107D8F1F>109 D<383E006CC3004F8380CF0380CE0380CE03801C0700
245−1C07001C07001C0E00380E60380E60381C60381CC0700C8030070013107D8F16>I<01F0
246−06180C0C180E300E700E600EE00EE00EE00CE01CE018E030606030C01F000F107C8F14>
247−I E /Ff 2 104 df<003C00E001C0038003800380038003800380038003800380038003
248−800380038007001E00F8001E000700038003800380038003800380038003800380038003
249−800380038001C000E0003C0E257E9B13>102 D<F8001E00070003800380038003800380
250−0380038003800380038003800380038001C000E0003C00E001C003800380038003800380
251−0380038003800380038003800380038007001E00F8000E257E9B13>I
252−E /Fg 35 122 df<00FC000383000603800E07801C07801C03001C00001C00001C00001C
253−0000FFFF80FFFF801C03801C03801C03801C03801C03801C03801C03801C03801C03801C
254−03801C03801C0380FF8FF0FF8FF0141A809915>12 D<70F8FCFC7404040808102040060C
255−7D990B>39 D<70F0F8F87808081010102040050C7D840B>44 D<70F8F8F87005057D840B
256−>46 D<07E01C38381C381C700E700E700EF00FF00FF00FF00FF00FF00FF00FF00FF00FF0
257−0F700E700E700E381C381C1C3807E010187F9713>48 D<07E01FF8383C781C781E781E30
258−1E001E001C0038007007E00038001C000E000F000F700FF80FF80EF01E703C3FF80FE010
259−187F9713>51 D<70F8F8F87000000000000070F0F8F8780808101010204005177D8F0B>
260−59 D<000C0000001E0000001E0000001E0000003F0000003F0000003F00000067800000
261−6780000067800000C3C00000C3C00000C3C0000181E0000181E0000181E0000300F00003
262−FFF00007FFF80006007800060078000E007C000C003C001E003C00FF81FFC0FF81FFC01A
263−1A7F991D>65 D<FFFF80FFFFE00F00F00F00780F003C0F003C0F003C0F003C0F003C0F00
264−780F00700F01E00FFFC00F00F00F00380F003C0F001E0F001E0F001E0F001E0F001E0F00
265−3C0F003C0F00F8FFFFF0FFFFC0171A7F991B>I<FFF000FFF0000F00000F00000F00000F
266−00000F00000F00000F00000F00000F00000F00000F00000F00000F00000F00000F00180F
267−00180F00180F00380F00380F00300F00700F01F0FFFFF0FFFFF0151A7F9918>76
268−D<FFFF80FFFFE00F00F00F00780F00380F003C0F003C0F003C0F003C0F003C0F00380F00
269−700F01E00FFFC00F00000F00000F00000F00000F00000F00000F00000F00000F00000F00
270−00FFF000FFF000161A7F991A>80 D<07C21FF6383E701E600EE006E006E006F000F8007F
271−803FF01FF80FFC01FE001E000F0007C007C007C007E006F00EFC1CDFF887E0101A7E9915
272−>83 D<7FFFFF007FFFFF00781E0F00601E0300601E0300E01E0380C01E0180C01E0180C0
273−1E0180001E0000001E0000001E0000001E0000001E0000001E0000001E0000001E000000
274−1E0000001E0000001E0000001E0000001E0000001E0000001E000003FFF00003FFF00019
275−1A7F991C>I<FFC3FF0FF0FFC3FF0FF01E007803C01E007801801E007801800F00FC0300
276−0F00FC03000F00FC030007819E060007819E060007819E060003C39F0C0003C30F0C0003
277−C30F0C0003E30F1C0001E607980001E607980001E607980000FC03F00000FC03F00000FC
278−03F000007801E000007801E000007801E000003801C000003000C000241A7F9927>87
279−D<FEFEC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0
280−FEFE07257D9B0B>91 D<FEFE060606060606060606060606060606060606060606060606
281−060606060606060606FEFE0725809B0B>93 D<1FC000707000783800781C00301C00001C
282−0003FC001F1C003C1C00781C00F01C00F01D80F01D80F03D80785D801F8F0011107F8F13
283−>97 D<FC0000FC00001C00001C00001C00001C00001C00001C00001C00001C00001CFC00
284−1F07001E03801C03C01C01C01C01E01C01E01C01E01C01E01C01E01C01E01C01C01C0380
285−1E03001F060018F800131A809915>I<07F01C1C383C783C7018F000F000F000F000F000
286−F0007000780C380C1C3807E00E107F8F11>I<003F00003F000007000007000007000007
287−0000070000070000070000070003E7000C1F00180F00380700700700F00700F00700F007
288−00F00700F00700F00700700700780700380F001C3FE007E7E0131A7F9915>I<07C01C70
289−38387038701CF01CFFFCF000F000F000F0007000780C38081C3807E00E107F8F11>I<01
290−F007180E3C0C3C1C181C001C001C001C001C00FFC0FFC01C001C001C001C001C001C001C
291−001C001C001C001C001C00FF80FF800E1A80990C>I<0FC700387B80703B80F03C00F03C
292−00F03C00F03C007038003870006FC0004000004000006000007FF0003FFC003FFE00600F
293−00C00300C00300C00300C00300600600381C0007E00011187F8F13>I<387C7C7C380000
294−000000FCFC1C1C1C1C1C1C1C1C1C1C1C1CFFFF081A80990A>105
295−D<FC00FC001C001C001C001C001C001C001C001C001C001C001C001C001C001C001C001C
296−001C001C001C001C001C001C00FF80FF80091A80990A>108 D<FC7C1F00FD8E63801E07
297−81C01E0781C01C0701C01C0701C01C0701C01C0701C01C0701C01C0701C01C0701C01C07
298−01C01C0701C01C0701C0FF9FE7F8FF9FE7F81D107F8F20>I<FC7C00FD87001E03801E03
299−801C03801C03801C03801C03801C03801C03801C03801C03801C03801C0380FF9FF0FF9F
300−F01410808F15>I<07E01C38381C700E700EF00FF00FF00FF00FF00FF00F700E700E381C
301−1C3807E010107F8F13>I<FCFC00FF07001E03801C03C01C03C01C01E01C01E01C01E01C
302−01E01C01E01C01E01C03C01C03801E07001F0E001CF8001C00001C00001C00001C00001C
303−0000FF8000FF80001317808F15>I<FCF0FD1C1E3C1E3C1C181C001C001C001C001C001C
304−001C001C001C00FF80FF800E10808F0F>114 D<1F2060E04060C060C060F0007F003FC0
305−1FE000F0C070C030E030E020F0408F800C107F8F0F>I<18001800180018001800180038
306−007FC0FFC03800380038003800380038003800386038603860386038601CC007800B177F
307−960F>I<FC1F80FC1F801C03801C03801C03801C03801C03801C03801C03801C03801C03
308−801C03801C07800C07800E0BF003F3F01410808F15>I<FE3F80FE3F803C0E001C0C001C
309−0C000E18000E18000E180007300007300007700003E00003E00001C00001C00001C00011
310−107F8F14>I<FE3F80FE3F803C0E001C0C001C0C000E18000E18000E1800073000073000
311−07700003E00003E00001C00001C00001C000018000018000618000F30000F30000E60000
312−78000011177F8F14>121 D E /Fh 4 52 df<00C00000C00000C00000C00000C00000C0
313−0000C00000C00000C000FFFF80FFFF8000C00000C00000C00000C00000C00000C00000C0
314−0000C00000C00011147E8F17>43 D<0C007C009C001C001C001C001C001C001C001C001C
315−001C001C001C001C00FF8009107E8F0F>49 D<1F006180C0C0E0E0E0E000E000C001C001
316−8003000400082010203FC07FC0FFC00B107F8F0F>I<1F00218071C071C021C001800300
317−1F00018000C000E040E0E0E0E0C041803F000B107F8F0F>I E /Fi
318−5 107 df<03F0000FFC001FFE003FFF007FFF807FFF80FFFFC0FFFFC0FFFFC0FFFFC0FF
319−FFC0FFFFC07FFF807FFF803FFF001FFE000FFC0003F00012127E9317>15
320−D<0000000600000000060000000006000000000300000000030000000003800000000180
321−00000000C0000000006000000000700000000018FFFFFFFFFFFFFFFFFFFF000000001800
322−00000070000000006000000000C000000001800000000380000000030000000003000000
323−0006000000000600000000060028187E962D>33 D<001F007F00F801E003C003C003C003
324−C003C003C003C003C003C003C003C003C003C003C003C007800F00FE00F800FE000F0007
325−8003C003C003C003C003C003C003C003C003C003C003C003C003C003C003C001E000F800
326−7F001F102D7DA117>102 D<F800FE001F00078003C003C003C003C003C003C003C003C0
327−03C003C003C003C003C003C003C001E000F0007F001F007F00F001E003C003C003C003C0
328−03C003C003C003C003C003C003C003C003C003C003C007801F00FE00F800102D7DA117>
329−I<C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0
330−C0C0C0C0C0C0C0C0C0C0022D7BA10D>106 D E /Fj 3 52 df<06001E00FE00EE000E00
331−0E000E000E000E000E000E000E000E000E000E000E000E00FFE0FFE00B137D9211>49
332−D<1F003FC041E0C0F0E070E07000F000E000E001C00380030004000810101020307FE0FF
333−E0FFE00C137E9211>I<1FC03FE07070707820380078007000E00FC000700038003C003C
334−403CE03CE03840707FE01FC00E137F9211>I E /Fk 46 121 df<3C03C07E07E0FF0FF0
335−FF8FF8FF8FF8FF8FF87F87F83D83D80180180380380300300300300600600E00E01C01C0
336−38038030030015117E9F1B>34 D<3C007E00FF00FF80FF80FF807F803D80018003800300
337−030006000E001C003800300009117D9F0F>39 D<3C7EFFFFFFFF7E3C08087D870F>46
338−D<00380000F80007F800FFF800FFF800F9F80001F80001F80001F80001F80001F80001F8
339−0001F80001F80001F80001F80001F80001F80001F80001F80001F80001F80001F80001F8
340−0001F80001F8007FFFE07FFFE07FFFE0131D7D9C1A>49 D<03FC001FFF803FFFC07C1FE0
341−FE07F0FE03F0FE03F8FE01F87C01F83801F80003F80003F00007E00007E0000FC0001F00
342−003E00007C0000F00001E0380380380700380E00781FFFF83FFFF07FFFF0FFFFF0FFFFF0
343−FFFFF0151D7E9C1A>I<03FC000FFF801FFFC03C0FE07E07F07E03F07E03F07E03F03C07
344−F00007E0000FC0001F8003FE0003FC00000F800007E00003F00003F00003F83803F87C03
345−F8FE03F8FE03F8FE03F0FC07F07C0FE03FFFC01FFF0003FC00151D7E9C1A>I<0001E000
346−03E00003E00007E0000FE0001FE0003BE00073E000F3E001E3E001C3E00383E00703E00E
347−03E01C03E03803E07803E0F003E0FFFFFEFFFFFEFFFFFE0007E00007E00007E00007E000
348−07E000FFFE00FFFE00FFFE171D7F9C1A>I<3800E03FFFE03FFFC03FFF803FFF003FFC00
349−3FC00038000038000038000038000039FC003FFF803E07C03803E01003F00003F00003F8
350−0003F87803F8FC03F8FC03F8FC03F8FC03F07807E07C0FE03FFFC00FFF0003F800151D7E
351−9C1A>I<003F0001FFC007FFE00FC1E01F03F01E03F03E03F07E03F07C01E07C0000FC10
352−00FCFF00FDFFC0FF03E0FE01F0FE01F0FC01F8FC01F8FC01F8FC01F87C01F87C01F87C01
353−F83C01F03E01F01F03E00FFFC007FF8001FC00151D7E9C1A>I<7000007FFFF87FFFF87F
354−FFF87FFFF07FFFE0FFFFC0F00380E00700E00E00E00E00001C0000380000780000700000
355−F00000F00001F00001E00003E00003E00003E00007E00007E00007E00007E00007E00007
356−E00003C000018000151E7D9D1A>I<01FE0007FF801FFFC03E07E03C03F07C01F07C01F0
357−7E01F07F81F07FE3E03FF3C03FFF801FFF000FFF8007FFC01FFFE03E7FF07C1FF87807F8
358−F803F8F801F8F800F8F800F8F800F07C01F07F03E03FFFC00FFF8003FC00151D7E9C1A>
359−I<0000E000000001F000000001F000000003F800000003F800000003F800000007FC0000
360−0007FC0000000FFE0000000EFE0000000EFE0000001C7F0000001C7F0000003C7F800000
361−383F800000383F800000701FC00000701FC00000F01FE00000E00FE00000FFFFE00001FF
362−FFF00001FFFFF00003C007F800038003F800038003F800070001FC00070001FC00FFF01F
363−FFE0FFF01FFFE0FFF01FFFE0231F7E9E28>65 D<FFFFFE00FFFFFFC0FFFFFFE007E007F0
364−07E003F807E001FC07E001FC07E001FC07E001FC07E001FC07E001FC07E001F807E003F0
365−07E00FE007FFFF8007FFFFE007E003F007E001F807E000FC07E000FC07E000FE07E000FE
366−07E000FE07E000FE07E000FE07E001FC07E001FC07E007F8FFFFFFF0FFFFFFE0FFFFFF00
367−1F1F7E9E25>I<0007F806007FFF0E01FFFFDE03FE03FE07F000FE0FC0007E1F80003E3F
368−80001E3F00001E7F00000E7E00000E7E00000EFE000000FE000000FE000000FE000000FE
369−000000FE000000FE0000007E0000007E00000E7F00000E3F00000E3F80001C1F80001C0F
370−C0003807F0007803FE03F001FFFFC0007FFF800007FC001F1F7D9E26>I<FFFFFE0000FF
371−FFFFC000FFFFFFF00007F007F80007F001FC0007F000FE0007F0007F0007F0003F0007F0
372−003F8007F0001F8007F0001F8007F0001FC007F0001FC007F0001FC007F0001FC007F000
373−1FC007F0001FC007F0001FC007F0001FC007F0001FC007F0001F8007F0001F8007F0003F
374−8007F0003F0007F0007F0007F0007E0007F001FC0007F007F800FFFFFFF000FFFFFFC000
375−FFFFFE0000221F7E9E28>I<FFFFFFE0FFFFFFE0FFFFFFE007F007E007F003E007F001E0
376−07F000F007F000F007F0707007F0707007F0707007F0707007F1F00007FFF00007FFF000
377−07FFF00007F1F00007F0700007F0701C07F0701C07F0701C07F0003807F0003807F00038
378−07F0007807F0007807F001F807F007F8FFFFFFF0FFFFFFF0FFFFFFF01E1F7E9E22>I<FF
379−FFFFE0FFFFFFE0FFFFFFE007F007E007F003E007F001E007F000F007F000F007F0007007
380−F0707007F0707007F0707007F0700007F1F00007FFF00007FFF00007FFF00007F1F00007
381−F0700007F0700007F0700007F0700007F0000007F0000007F0000007F0000007F0000007
382−F00000FFFFC000FFFFC000FFFFC0001C1F7E9E21>I<FFFF80FFFF80FFFF8007F00007F0
383−0007F00007F00007F00007F00007F00007F00007F00007F00007F00007F00007F00007F0
384−0007F00007F00007F00007F00007F00007F00007F00007F00007F00007F00007F000FFFF
385−80FFFF80FFFF80111F7F9E14>73 D<FFFFC000FFFFC000FFFFC00007F0000007F0000007
386−F0000007F0000007F0000007F0000007F0000007F0000007F0000007F0000007F0000007
387−F0000007F0000007F0000007F0000007F001C007F001C007F001C007F001C007F003C007
388−F003C007F0078007F0078007F00F8007F03F80FFFFFF80FFFFFF80FFFFFF801A1F7E9E1F
389−>76 D<001FF80000FFFF0001F81F8007E007E00FC003F01F8001F81F0000F83F0000FC7F
390−0000FE7E00007E7E00007EFE00007FFE00007FFE00007FFE00007FFE00007FFE00007FFE
391−00007FFE00007FFE00007F7E00007E7F0000FE7F0000FE3F0000FC3F8001FC1F8001F80F
392−C003F007E007E001F81F8000FFFF00001FF800201F7D9E27>79 D<FFFFFE00FFFFFF80FF
393−FFFFE007F00FF007F003F807F001F807F001FC07F001FC07F001FC07F001FC07F001FC07
394−F001FC07F001F807F003F007F00FF007FFFFC007FFFF0007F0000007F0000007F0000007
395−F0000007F0000007F0000007F0000007F0000007F0000007F0000007F00000FFFF8000FF
396−FF8000FFFF80001E1F7E9E24>I<FFFFF80000FFFFFF8000FFFFFFC00007F00FF00007F0
397−03F80007F001F80007F001FC0007F001FC0007F001FC0007F001FC0007F001FC0007F001
398−F80007F003F00007F00FE00007FFFF800007FFFF000007F03F800007F00FC00007F00FE0
399−0007F007F00007F007F00007F007F00007F007F00007F007F00007F007F00007F007F020
400−07F007F07007F003F070FFFF81F8E0FFFF80FFC0FFFF803F80241F7E9E27>82
401−D<03FC180FFF381FFFF83E03F87C00F8780078F80078F80038F80038FC0000FF0000FFF8
402−007FFF007FFFC03FFFE01FFFF00FFFF803FFF8001FFC0001FC0000FC00007CE0007CE000
403−7CE0007CF00078F800F8FE01F0FFFFE0EFFFC0C1FF00161F7D9E1D>I<7FFFFFFC7FFFFF
404−FC7FFFFFFC7E0FE0FC780FE03C700FE01CF00FE01EF00FE01EE00FE00EE00FE00EE00FE0
405−0EE00FE00E000FE000000FE000000FE000000FE000000FE000000FE000000FE000000FE0
406−00000FE000000FE000000FE000000FE000000FE000000FE000000FE00007FFFFC007FFFF
407−C007FFFFC01F1E7E9D24>I<0600600E00E01C01C0380380300300600600600600E00E00
408−C00C00DE0DE0FF0FF0FF8FF8FF8FF8FF8FF87F87F83F03F01E01E015117D9F1B>92
409−D<07FC001FFF803F0FC03F07E03F03F03F03F00C03F00003F001FFF00FFFF01F83F07E03
410−F07C03F0F803F0F803F0F803F0FC07F07E0DFE3FF8FE07E07E17147F9319>97
411−D<FF800000FF800000FF8000001F8000001F8000001F8000001F8000001F8000001F8000
412−001F8000001F8000001F8000001F8FE0001FFFF8001FF07C001FC03E001F803F001F801F
413−001F801F001F801F801F801F801F801F801F801F801F801F801F801F801F801F001F801F
414−001F803E001FC03E001FE0FC001E7FF0001C1FC00019207F9F1D>I<01FE0007FF801F0F
415−C03E0FC03E0FC07C0FC07C0300FC0000FC0000FC0000FC0000FC0000FC00007C00007E00
416−003E00E03F01C01F83C007FF8001FC0013147E9317>I<0007FC000007FC000007FC0000
417−00FC000000FC000000FC000000FC000000FC000000FC000000FC000000FC000000FC0001
418−FCFC000FFFFC001F83FC003E00FC007E00FC007C00FC007C00FC00FC00FC00FC00FC00FC
419−00FC00FC00FC00FC00FC00FC00FC007C00FC007C00FC007E00FC003E01FC001F07FF800F
420−FFFF8003F8FF8019207E9F1D>I<01FE0007FF800F83C01E01E03E00F07C00F07C00F8FC
421−00F8FFFFF8FFFFF8FC0000FC0000FC00007C00007C00003E00381E00380F80F007FFE000
422−FF8015147F9318>I<003F8000FFC003F3E007E7E007C7E00FC7E00FC3C00FC0000FC000
423−0FC0000FC0000FC000FFFC00FFFC00FFFC000FC0000FC0000FC0000FC0000FC0000FC000
424−0FC0000FC0000FC0000FC0000FC0000FC0000FC0000FC0007FFC007FFC007FFC0013207F
425−9F10>I<03FC7C0FFFFE1E07DE3C03DE7C03EC7C03E07C03E07C03E07C03E03C03C01E07
426−801FFF0033FC003000007000007800007FFF803FFFF03FFFF81FFFFC3FFFFC7C00FEF800
427−3EF8003EF8003EF8003E7C007C3F01F80FFFE003FF80171E7F931A>I<FF800000FF8000
428−00FF8000001F8000001F8000001F8000001F8000001F8000001F8000001F8000001F8000
429−001F8000001F87F0001F9FF8001FB8FC001FE07E001FC07E001FC07E001F807E001F807E
430−001F807E001F807E001F807E001F807E001F807E001F807E001F807E001F807E001F807E
431−00FFF3FFC0FFF3FFC0FFF3FFC01A207E9F1D>I<1E003F007F807F807F807F803F001E00
432−00000000000000000000FF80FF80FF801F801F801F801F801F801F801F801F801F801F80
433−1F801F801F801F80FFF0FFF0FFF00C217EA00F>I<FF800000FF800000FF8000001F8000
434−001F8000001F8000001F8000001F8000001F8000001F8000001F8000001F8000001F83FF
435−001F83FF001F83FF001F81E0001F83C0001F8780001F9E00001FBC00001FFE00001FFF00
436−001FDF00001F9F80001F0FC0001F07E0001F03E0001F03F0001F01F800FFE3FF80FFE3FF
437−80FFE3FF8019207F9F1C>107 D<FF80FF80FF801F801F801F801F801F801F801F801F80
438−1F801F801F801F801F801F801F801F801F801F801F801F801F801F801F801F801F801F80
439−FFF0FFF0FFF00C207E9F0F>I<FF07F00FE000FF1FFC3FF800FF387E70FC001F603FC07E
440−001FC03F807E001FC03F807E001F803F007E001F803F007E001F803F007E001F803F007E
441−001F803F007E001F803F007E001F803F007E001F803F007E001F803F007E001F803F007E
442−001F803F007E00FFF1FFE3FFC0FFF1FFE3FFC0FFF1FFE3FFC02A147E932D>I<FF07F000
443−FF1FF800FF38FC001F607E001FC07E001FC07E001F807E001F807E001F807E001F807E00
444−1F807E001F807E001F807E001F807E001F807E001F807E001F807E00FFF3FFC0FFF3FFC0
445−FFF3FFC01A147E931D>I<01FF0007FFC01F83F03E00F83E00F87C007C7C007CFC007EFC
446−007EFC007EFC007EFC007EFC007E7C007C7C007C3E00F83E00F81F83F007FFC001FF0017
447−147F931A>I<FF8FE000FFFFF800FFF0FC001FC07E001F803F001F803F001F801F001F80
448−1F801F801F801F801F801F801F801F801F801F801F801F801F001F803F001F803E001FC0
449−7E001FE0FC001FFFF0001F9FC0001F8000001F8000001F8000001F8000001F8000001F80
450−0000FFF00000FFF00000FFF00000191D7F931D>I<FF1F00FF3FC0FF67E01FC7E01FC7E0
451−1FC7E01F81801F80001F80001F80001F80001F80001F80001F80001F80001F80001F8000
452−FFF800FFF800FFF80013147F9316>114 D<0FE63FFE783E700EF00EF00EFE00FFE07FF8
453−3FFC1FFE0FFF007FE01FE00FF00FF00EFC1EFFFCC7F010147E9315>I<03800380038003
454−800780078007800F801F803FFCFFFCFFFC1F801F801F801F801F801F801F801F801F801F
455−8E1F8E1F8E1F8E1F8E0F9C07F803F00F1D7F9C14>I<FF83FE00FF83FE00FF83FE001F80
456−7E001F807E001F807E001F807E001F807E001F807E001F807E001F807E001F807E001F80
457−7E001F807E001F807E001F80FE001F80FE000F83FFC007FF7FC001FC7FC01A147E931D>
458−I<FFE7FF3FE0FFE7FF3FE0FFE7FF3FE01F80FC07000FC1FC0E000FC1FC0E000FC3FE1E00
459−07E3BE1C0007E3BE1C0007F7BF3C0003F71F380003F71FB80001FE0FF00001FE0FF00001
460−FE0FF00000FC07E00000FC07E00000FC07E000007803C000007803C00023147F9326>
461−119 D<FFF3FF00FFF3FF00FFF3FF000FE0E00007E1E00003F3C00001FF800000FF000000
462−FE0000007E0000003F0000007F800000FFC00001EFE00003C7E0000383F0000781F800FF
463−C3FF80FFC3FF80FFC3FF8019147F931C>I E /Fl 84 127 df<70F8F8F8F8F8F8F8F8F8
464−F8F8F8F8F8F8F870000000000070F8F8F870051C779B18>33 D<2008701CF83EF83EF83E
465−F83EF83EF83E701C701C701C701C701C30180F0E7C9C18>I<030600078F00078F00078F
466−00078F00078F00078F007FFFC0FFFFE0FFFFE07FFFC00F1E000F1E000F1E000F1E000F1E
467−000F1E007FFFC0FFFFE0FFFFE07FFFC01E3C001E3C001E3C001E3C001E3C001E3C000C18
468−00131C7E9B18>I<00C00001C00001C00001C00003F0000FFC003FFE007DDF0071CF00E1
469−C780E1CF80E1CF80E1CF80F1C70079C0007FC0003FF0001FFC0007FE0001FF0001CF0021
470−C78071C380F9C380F9C380F1C380F1C70079C7007DDE003FFC001FF80007E00001C00001
471−C00001C00000C00011247D9F18>I<3803007C07807C0780EE0F80EE0F00EE0F00EE1F00
472−EE1E00EE1E00EE3E007C3C007C3C00387C0000780000780000F80000F00001F00001E000
473−01E00003E00003C00003C00007C0000783800787C00F87C00F0EE00F0EE01F0EE01E0EE0
474−1E0EE03E0EE03C07C03C07C018038013247E9F18>I<01C00007E0000FF0000E70001C38
475−001C38001C38001C38001C73F81CF3F81CE3F80FC1C00FC3800F83800F03801F07003F87
476−007B8E0071CE00F1FC00F0FC00F07C00F07870F0787078FE707FFFE03FC7E00F03C0151C
477−7F9B18>I<387C7C7E3E0E0E0E1C1C38F8F0C0070E789B18>I<007000F001E003C007800F
478−001E001E003C003C007800780078007000F000F000F000F000F000F000F000F000700078
479−00780078003C003C001E001E000F00078003C001F000F000700C24799F18>I<6000F000
480−78003C001E000F000780078003C003C001E001E001E000E000F000F000F000F000F000F0
481−00F000F000E001E001E001E003C003C0078007800F001E003C007800F00060000C247C9F
482−18>I<01C00001C00001C00001C00061C300F9CF80FDDF807FFF003FFE000FF8000FF800
483−3FFE007FFF00FDDF80F9CF8061C30001C00001C00001C00001C00011147D9718>I<0060
484−0000F00000F00000F00000F00000F00000F00000F0007FFFC0FFFFE0FFFFE07FFFC000F0
485−0000F00000F00000F00000F00000F00000F00000600013147E9718>I<1C3E7E7F3F1F07
486−0E1E7CF860080C788518>I<7FFFC0FFFFE0FFFFE07FFFC013047E8F18>I<3078FCFC7830
487−0606778518>I<000300000780000780000F80000F00001F00001E00001E00003E00003C
488−00007C0000780000780000F80000F00001F00001E00003E00003C00003C00007C0000780
489−000F80000F00000F00001F00001E00003E00003C00003C00007C0000780000F80000F000
490−00F0000060000011247D9F18>I<01F00007FC000FFE001F1F001E0F003C07807803C078
491−03C07803C0F001E0F001E0F001E0F001E0F001E0F001E0F001E0F001E0F001E0F803E078
492−03C07803C07C07C03C07801E0F001F1F000FFE0007FC0001F000131C7E9B18>I<01C001
493−C003C007C007C01FC0FFC0FBC063C003C003C003C003C003C003C003C003C003C003C003
494−C003C003C003C003C003C07FFEFFFF7FFE101C7C9B18>I<03F0001FFE003FFF007C0F80
495−7807C0F003C0F801E0F801E07001E00001E00001E00003C00003C0000780000780000F00
496−001E00003C0000F80001F00003E00007C0000F80001E01E03C01E07FFFE0FFFFE07FFFE0
497−131C7E9B18>I<03F8001FFE003FFF003C0F807C07C07C03C07C03C01003C00003800007
498−80000F0003FE0003FE0003FF00000F800007C00003C00001E00001E00001E07001E0F801
499−E0F803C0F007C07C0F807FFF001FFE0007F000131C7E9B18>I<001F00003F00007F0000
500−770000F70001E70001C70003C7000787000707000E07001E07003C0700380700780700F0
501−0700FFFFF8FFFFF8FFFFF8000700000700000700000700000700000700007FF0007FF000
502−7FF0151C7F9B18>I<3FFF807FFF807FFF80780000780000780000780000780000780000
503−7800007800007BF8007FFE007FFF007C0F803003C00003C00001E00001E07001E0F801E0
504−F801E0F803C07807C07C0F803FFF001FFC0003F000131C7E9B18>I<F00000FFFFE0FFFF
505−E0FFFFE0F007C0F00F80000F00001E00003C00003C0000780000780000F00000F00001E0
506−0001E00001E00003C00003C00003C00003C0000780000780000780000780000780000780
507−00078000030000131D7E9C18>55 D<3078FCFC783000000000000000003078FCFC783006
508−14779318>58 D<183C7E7E3C180000000000000000183C7E7E3E1E0E1C3C78F060071A78
509−9318>I<0000C00003E00007E0001FC0003F8000FE0001FC0007F0000FE0003F80007F00
510−00FC0000FC00007F00003F80000FE00007F00001FC0000FE00003F80001FC00007E00003
511−E00000C013187E9918>I<7FFFC0FFFFE0FFFFE07FFFC00000000000000000000000007F
512−FFC0FFFFE0FFFFE07FFFC0130C7E9318>I<600000F80000FC00007F00003F80000FE000
513−07F00001FC0000FE00003F80001FC00007E00007E0001FC0003F8000FE0001FC0007F000
514−0FE0003F80007F0000FC0000F8000060000013187E9918>I<0FF0003FFC007FFF00781F
515−00F80780F80780F80780201F00007E0000FC0001F00001E00003C00003C00003C00003C0
516−0003C00003800000000000000000000000000000000003800007C00007C00007C0000380
517−00111C7D9B18>I<007C0001FE0007FF000F87801E03C03C1DC0387FC070FFE071E3E071
518−C1E0E1C1E0E380E0E380E0E380E0E380E0E380E0E380E0E1C1C071C1C071E3C070FF8038
519−7F003C1C001E01E00F83E007FFC001FF80007E00131C7E9B18>I<00F80000F80000F800
520−01FC0001DC0001DC0001DC0003DE0003DE0003DE0003DE00038E00078F00078F00078F00
521−078F00078F000F07800FFF800FFF800FFF800F07801E03C01E03C01E03C07F8FF0FF8FF8
522−7F8FF0151C7F9B18>I<7FFE00FFFF007FFF801E07C01E03C01E01E01E01E01E01E01E01
523−E01E01E01E03C01E07C01FFF801FFF001FFFC01E03E01E01E01E00F01E00F01E00F01E00
524−F01E00F01E00F01E01E01E03E07FFFC0FFFF807FFE00141C7F9B18>I<00F8E003FFE007
525−FFE00F07E01E03E03C03E03C01E07801E07801E0700000F00000F00000F00000F00000F0
526−0000F00000F00000F000007000007801E07801E03C01E03C01E01E03C00F07C007FF8003
527−FE0000F800131C7E9B18>I<7FFC00FFFF007FFF801E07C01E03E01E01E01E01F01E00F0
528−1E00F01E00F81E00781E00781E00781E00781E00781E00781E00781E00781E00781E00F0
529−1E00F01E01F01E01E01E03E01E07C07FFF80FFFF007FFC00151C809B18>I<FFFFF0FFFF
530−F0FFFFF01E00F01E00F01E00F01E00F01E00001E00001E0F001E0F001E0F001FFF001FFF
531−001FFF001E0F001E0F001E0F001E00001E00001E00781E00781E00781E00781E0078FFFF
532−F8FFFFF8FFFFF8151C7F9B18>I<FFFFF8FFFFF8FFFFF81E00781E00781E00781E00781E
533−00001E00001E0F001E0F001E0F001FFF001FFF001FFF001E0F001E0F001E0F001E00001E
534−00001E00001E00001E00001E00001E0000FFE000FFE000FFE000151C7F9B18>I<01F1C0
535−07FFC00FFFC01F0FC01E07C03C03C03803C07803C07803C0700000F00000F00000F00000
536−F00000F00000F01FF0F03FF0F01FF07003C07803C07803C03807C03C07C01E0FC01F0FC0
537−0FFFC007FFC001F3C0141C7E9B18>I<7FFF80FFFFC07FFF8001E00001E00001E00001E0
538−0001E00001E00001E00001E00001E00001E00001E00001E00001E00001E00001E00001E0
539−0001E00001E00001E00001E00001E00001E0007FFF80FFFFC07FFF80121C7D9B18>73
540−D<01FFE001FFE001FFE0000F00000F00000F00000F00000F00000F00000F00000F00000F
541−00000F00000F00000F00000F00000F00000F00000F00000F00000F00700F00F80F00F80F
542−00F83E007FFC003FF8000FE000131C7E9B18>I<FFE000FFE000FFE0001E00001E00001E
543−00001E00001E00001E00001E00001E00001E00001E00001E00001E00001E00001E00001E
544−00001E00001E00001E00F01E00F01E00F01E00F01E00F0FFFFF0FFFFF0FFFFF0141C7F9B
545−18>76 D<FC01F8FE03F8FE03F83F07E03B06E03B06E03B06E03B8EE03B8EE0398CE0398C
546−E039DCE039DCE039DCE038D8E038F8E038F8E03870E03870E03800E03800E03800E03800
547−E03800E03800E0FE03F8FE03F8FE03F8151C7F9B18>I<7E07F0FF0FF87F07F01F81C01D
548−81C01D81C01DC1C01CC1C01CC1C01CE1C01CE1C01CE1C01C61C01C71C01C71C01C31C01C
549−39C01C39C01C39C01C19C01C19C01C1DC01C0DC01C0DC01C0FC07F07C0FF87C07F03C015
550−1C7F9B18>I<0FFE003FFF807FFFC07C07C07803C0F803E0F001E0F001E0F001E0F001E0
551−F001E0F001E0F001E0F001E0F001E0F001E0F001E0F001E0F001E0F001E0F001E0F001E0
552−F803E07803C07C07C07FFFC03FFF800FFE00131C7E9B18>I<FFFE00FFFF80FFFFC01E07
553−C01E03E01E01E01E00F01E00F01E00F01E00F01E00F01E01E01E03E01E07C01FFFC01FFF
554−801FFE001E00001E00001E00001E00001E00001E00001E00001E0000FFC000FFC000FFC0
555−00141C7F9B18>I<7FF800FFFE007FFF001E1F801E07801E07C01E03C01E03C01E03C01E
556−07C01E07801E1F801FFF001FFE001FFE001E0F001E0F001E07801E07801E07801E07801E
557−07801E07BC1E07BC1E07BC7F83F8FFC1F87F80F0161C7F9B18>82
558−D<7FFFF8FFFFF8FFFFF8F07878F07878F07878F078780078000078000078000078000078
559−000078000078000078000078000078000078000078000078000078000078000078000078
560−0000780007FF8007FF8007FF80151C7F9B18>84 D<FFC7FEFFC7FEFFC7FE1E00F01E00F0
561−1E00F01E00F01E00F01E00F01E00F01E00F01E00F01E00F01E00F01E00F01E00F01E00F0
562−1E00F01E00F01E00F01E00F01E00F00F01E00F01E007C7C003FF8001FF00007C00171C80
563−9B18>I<FF07F8FF8FF8FF07F83C01E01E03C01E03C01E03C01E03C00F07800F07800F07
564−800F07800F0780078F00078F00078F00078F00038E00038E0003DE0003DE0001DC0001DC
565−0001DC0001FC0001FC0000F80000F800151C7F9B18>I<FE03F8FE03F8FE03F870007070
566−00707000703800E03800E03800E03800E03800E038F8E039FCE039DCE039DCE019DCC019
567−DCC019DCC0198CC0198CC01D8DC01D8DC01D8DC01D05C00F07800F07800F07800E038015
568−1C7F9B18>I<FFFCFFFCFFFCF000F000F000F000F000F000F000F000F000F000F000F000
569−F000F000F000F000F000F000F000F000F000F000F000F000F000F000F000F000F000F000
570−FFFCFFFCFFFC0E24789F18>91 D<600000F00000F00000F800007800007C00003C00003C
571−00003E00001E00001F00000F00000F00000F800007800007C00003C00003C00003E00001
572−E00001F00000F00000F800007800007800007C00003C00003E00001E00001E00001F0000
573−0F00000F8000078000078000030011247D9F18>I<FFFCFFFCFFFC003C003C003C003C00
574−3C003C003C003C003C003C003C003C003C003C003C003C003C003C003C003C003C003C00
575−3C003C003C003C003C003C003C003CFFFCFFFCFFFC0E247F9F18>I<03800FE03FF8FFFE
576−FC7EF01E40040F077C9B18>I<7FFFC0FFFFE0FFFFE07FFFC013047E7F18>I<061E3E3870
577−70E0E0E0F8FC7C7C38070E789E18>I<0FF0003FFC007FFE007C1F007C0F003807800007
578−8000FF8007FF801FFF807F87807C0780F00780F00780F00780F807807C1F803FFFF81FFB
579−F807E1F815147E9318>I<7F0000FF00007F00000F00000F00000F00000F00000F00000F
580−3E000FFF800FFFE00FC1F00F80F00F00780F00780F003C0F003C0F003C0F003C0F003C0F
581−003C0F00780F80780F80F00FC1F00FFFE00FFF80073E00161C809B18>I<01FC0007FF00
582−1FFF803E0F803C0F80780700780000F00000F00000F00000F00000F00000F00000780000
583−7803C03C03C03E07C01FFF8007FF0001FC0012147D9318>I<001FC0003FC0001FC00003
584−C00003C00003C00003C00003C001F3C007FFC01FFFC03E0FC03C07C07803C07803C0F003
585−C0F003C0F003C0F003C0F003C0F003C07803C07807C03C07C03E1FC01FFFF807FBFC01F3
586−F8161C7F9B18>I<01F80007FE000FFF001F0F803C03C07803C07801C0F001E0F001E0FF
587−FFE0FFFFE0FFFFE0F000007800007801E03C01E01F03E00FFFC007FF8000FE0013147E93
588−18>I<001F80007FC000FFE000F3E001E3E001E08001E00001E0007FFFC0FFFFC0FFFFC0
589−01E00001E00001E00001E00001E00001E00001E00001E00001E00001E00001E00001E000
590−01E00001E0007FFF807FFF807FFF80131C7F9B18>I<03F1E00FFFF01FFFF83E1F783C0F
591−307807807807807807807807807807803C0F003E1F003FFE003FFC003BF0003800003800
592−001FFE001FFFC03FFFE07801F0700070E00038E00038E00038E000387800F07E03F01FFF
593−C00FFF8001FC00151F7F9318>I<7F0000FF00007F00000F00000F00000F00000F00000F
594−00000F1F000F7F800FFFC00FE1C00FC1E00F81E00F01E00F01E00F01E00F01E00F01E00F
595−01E00F01E00F01E00F01E00F01E00F01E07FE3FCFFF3FE7FE3FC171C809B18>I<01C000
596−03E00003E00003E00001C0000000000000000000000000007FE000FFE0007FE00001E000
597−01E00001E00001E00001E00001E00001E00001E00001E00001E00001E00001E00001E000
598−01E000FFFF80FFFF80FFFF80111D7D9C18>I<001C003E003E003E001C00000000000000
599−000FFE0FFE0FFE001E001E001E001E001E001E001E001E001E001E001E001E001E001E00
600−1E001E001E001E001E001E001E701CF83CF878FFF87FF01FC00F277E9C18>I<7E0000FE
601−00007E00000E00000E00000E00000E00000E00000E3FF00E3FF00E3FF00E07800E0F000E
602−1E000E3C000E78000EF0000FF8000FFC000F9C000F0E000E0F000E07000E03800E03C07F
603−C7F8FFC7F87FC7F8151C7F9B18>I<FFE000FFE000FFE00001E00001E00001E00001E000
604−01E00001E00001E00001E00001E00001E00001E00001E00001E00001E00001E00001E000
605−01E00001E00001E00001E00001E00001E000FFFFC0FFFFC0FFFFC0121C7D9B18>I<F9C1
606−C0FFF7F0FFFFF03E3E383C3C383C3C383838383838383838383838383838383838383838
607−38383838383838383838383838FE3E3EFE7E7EFE3E3E1714809318>I<7F1F00FF7F807F
608−FFC00FE1C00FC1E00F81E00F01E00F01E00F01E00F01E00F01E00F01E00F01E00F01E00F
609−01E00F01E00F01E07FE3FCFFF3FE7FE3FC1714809318>I<01F0000FFE001FFF003E0F80
610−3C07807803C07803C0F001E0F001E0F001E0F001E0F001E0F001E07803C07803C03C0780
611−3F1F801FFF000FFE0001F00013147E9318>I<7F3E00FFFF807FFFE00FC1F00F80F00F00
612−780F00780F003C0F003C0F003C0F003C0F003C0F003C0F00780F80780F80F00FC1F00FFF
613−E00FFF800F3E000F00000F00000F00000F00000F00000F00000F00007FE000FFF0007FE0
614−00161E809318>I<01F9E007FDE00FFFE01F0FE03C07E07803E07801E0F001E0F001E0F0
615−01E0F001E0F001E0F001E07801E07803E03C07E03E0FE01FFFE007FDE001F1E00001E000
616−01E00001E00001E00001E00001E00001E0000FFC001FFE000FFC171E7F9318>I<FF87E0
617−FF9FF0FFBFF807F87807F03007E00007C00007C000078000078000078000078000078000
618−078000078000078000078000FFFE00FFFF00FFFE0015147F9318>I<07FF003FFF007FFF
619−00700F00E00F00E00F00F000007E00007FF0001FFC0007FF00003F00700780F00380F003
620−80F80380FC0F00FFFF00FFFC00E7F00011147D9318>I<03800007800007800007800007
621−80007FFFC0FFFFC0FFFFC007800007800007800007800007800007800007800007800007
622−80000780C00781E00781E00781E003C3C003FFC001FF00007E0013197F9818>I<7F0FE0
623−FF1FE07F0FE00F01E00F01E00F01E00F01E00F01E00F01E00F01E00F01E00F01E00F01E0
624−0F01E00F01E00F03E00F07E007FFFC03FFFE01F9FC1714809318>I<7F8FF0FF8FF87F8F
625−F01C01C00E03800E03800E0380070700070700070700078F00038E00038E0003DE0001DC
626−0001DC0001DC0000F80000F80000700015147F9318>I<FF07F8FF8FF8FF07F83800E038
627−00E03800E03800E01C01C01C71C01CF9C01CF9C01CF9C01DDDC00DDD800DDD800DDD800F
628−8F800F8F800F8F8007070015147F9318>I<7F8FF07F9FF07F8FF00F0700078E00039E00
629−01DC0001F80000F80000700000F00000F80001DC00039E00038E000707000E07807F8FF0
630−FF8FF87F8FF015147F9318>I<7F8FF0FF8FF87F8FF00E01C00E03800E03800703800707
631−00070700038700038700038E0001CE0001CE0001CC0000DC0000FC000078000078000078
632−0000700000700000700000F0007CE0007DE00073C0007F80003F00001E0000151E7F9318
633−>I<3FFFF07FFFF07FFFF07803E07807C0780F80001F00003E00007C0000F80001F00003
634−E00007C0000F80F01F00F03E00F07C00F0FFFFF0FFFFF0FFFFF014147F9318>I<0007E0
635−001FE0007FE0007C0000F00000F00000F00000F00000F00000F00000F00000F00000F000
636−00F00000F00001F0007FE000FFC000FFC0007FE00001F00000F00000F00000F00000F000
637−00F00000F00000F00000F00000F00000F00000F000007C00007FE0001FE00007E013247E
638−9F18>I<60F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0
639−F0F0F0600424769F18>I<7E0000FF8000FFE00003E00000F00000F00000F00000F00000
640−F00000F00000F00000F00000F00000F00000F00000F800007FC0003FE0003FE0007FC000
641−F80000F00000F00000F00000F00000F00000F00000F00000F00000F00000F00000F00003
642−E000FFE000FF80007E000013247E9F18>I<0E0C1F1E3FBEFBF8F1F060E00F067C9B18>I
643−E /Fm 34 122 df<00001FE000007FF00001C03800018078000380780007003000070000
644−0007000000070000000E0000000E0000000E000000FFFFE000FFFFE0001C01C0001C01C0
645−001C01C0001C01C0001C0380003803800038038000380380003807000038070000780700
646−0070071800700E3000700E3000700E3000600E6000E007E000E003C000E0000000E00000
647−01C0000001C00000318000007B800000F30000007E0000003C0000001D29829F1A>12
648−D<00003FC0FF800000FFE3FFC00001C1E700E0000381EE01E0000380DC01E00007001C00
649−C0000700180000000700380000000700380000000E00380000000E00380000000E007000
650−0000FFFFFFFF8000FFFFFFFF80000E00700700001C00700700001C00700700001C00E007
651−00001C00E00E00001C00E00E00003800E00E00003800E00E00003801C01C00003801C01C
652−00003801C01C00007001C01C60007001C038C00070038038C00070038038C00070038039
653−8000E003801F8000E003000F0000E00700000000E00700000001C00700000001C00E0000
654−0031860E000000798F1C000000F31E380000007E0FF00000003C07C00000002B29829F28
655−>14 D<1C3E7E7E3E060C0C18183060C080070E769F0E>39 D<000200060006000E003C00
656−FC03DC031C0038003800380038007000700070007000E000E000E000E001C001C001C001
657−C00380038003800380FFF8FFF80F1E7B9D17>49 D<070F1F1F0E00000000000000000000
658−70F8F8F0E008147B930E>58 D<0000FE020007FF06001F818C003E00DC0078007C00F000
659−7C01E0003803C00038078000380F8000381F0000301F0000303E0000303E0000007C0000
660−007C0000007C0000007C000000F8000000F8000000F8000000F80000C0F8000180780001
661−8078000300780003003C0006003C000C001E0018000F00300007C0E00003FF800000FE00
662−001F217A9F21>67 D<01FFFFFC01FFFFF8001E0078001E0038001E0038003C0018003C00
663−18003C0018003C003000780C3000780C3000780C0000781C0000F0380000FFF80000FFF8
664−0000F0380001E0300001E0300001E0300001E0300003C0000003C0000003C0000003C000
665−0007800000078000000780000007800000FFFC0000FFF800001E1F7D9E1E>70
666−D<00FF007FE001FF00FFC0001F001E00001F800C00001F800C0000378018000033C01800
667−0033C018000033C018000063C030000061E030000061E030000061E0300000C0F0600000
668−C0F0600000C0F0600000C0786000018078C000018078C00001803CC00001803CC0000300
669−3D800003001F800003001F800003001F800006000F000006000F000006000F00000E000F
670−0000FFC0060000FFC0060000231F7D9E22>78 D<01FFFF8001FFFFE0001E01F0001E0078
671−001E0078003C007C003C007C003C007C003C007C007800F8007800F8007800F0007801E0
672−00F003C000F00F8000FFFF0000FFF80001E0000001E0000001E0000001E0000003C00000
673−03C0000003C0000003C0000007800000078000000780000007800000FFF80000FFF00000
674−1E1F7D9E1F>80 D<0007E040001FF8C0003C1D8000700F8000E0078001C0078001800300
675−038003000380030003800300038000000380000003C0000003F8000001FF800001FFE000
676−007FF000001FF0000001F800000078000000380000003800000038003000380030003800
677−3000300070007000700060007800E0007801C000EE078000C7FE000081F800001A217D9F
678−1A>83 D<00F18003FDC0078F800E07801C07803C07803C0700780700780700780700F00E
679−00F00E00F00E00F00E30F01C60F03C60707C6078FCC03FCFC00F070014147C9317>97
680−D<07803F803F000700070007000E000E000E000E001C001C001CF01FFC3F1E3E0E3C0F38
681−0F700F700F700F700FE01EE01EE01EE03CE03CE038607071E03FC01F0010207B9F15>I<
682−007E0001FF000383800F07801E07801C07003C0200780000780000780000F00000F00000
683−F00000F00000F00000700200700700381E001FF80007E00011147C9315>I<0000780003
684−F80003F00000700000700000700000E00000E00000E00000E00001C00001C000F1C003FD
685−C0078F800E07801C07803C07803C0700780700780700780700F00E00F00E00F00E00F00E
686−30F01C60F03C60707C6078FCC03FCFC00F070015207C9F17>I<007C0001FF000783000F
687−01801E01803C01803C0300780E007FFC007FE000F00000F00000F00000F0000070000070
688−02007807003C1E001FF80007E00011147C9315>I<0000F80001FC0003BC00033C000718
689−000700000700000E00000E00000E00000E00000E0000FFE001FFE0001C00001C00001C00
690−00380000380000380000380000380000700000700000700000700000700000E00000E000
691−00E00000E00000E00001C00001C00001C0000180003380007B8000F300007E00003C0000
692−1629829F0E>I<003C6000FF7001E3E00381E00701E00F01E00F01C01E01C01E01C01E01
693−C03C03803C03803C03803C03803C07003C0F001C1F001E3F000FFE0003CE00000E00000E
694−00001C00001C00301C00783800F0F0007FE0003F8000141D7E9315>I<01E0000FE0000F
695−C00001C00001C00001C000038000038000038000038000070000070000073E00077F000E
696−C3800F81C00F01C00E01C01E03801C03801C03801C0380380700380700380700380E1870
697−0E30700E30701C60700C60E00FC060078015207D9F17>I<006000F000F000E000000000
698−000000000000000000000F001F80318031C063806380C3800700070007000E000E000E00
699−1C301C601C6038C018C01F800F000C1F7D9E0E>I<0001800003C00003C0000380000000
700−000000000000000000000000000000000000003C00007E0000C700018700030700030700
701−060E00000E00000E00000E00001C00001C00001C00001C00003800003800003800003800
702−00700000700000700000700000E00000E00030E00079C000F380007F00003C0000122882
703−9E0E>I<01E0000FE0000FC00001C00001C00001C0000380000380000380000380000700
704−000700000703C00707E00E0C600E18E00E31E00E61E01CC1C01F80001F00001FC00039E0
705−003870003870003838607070C07070C07070C0703980E03F00601E0013207D9F15>I<03
706−C01FC01F8003800380038007000700070007000E000E000E000E001C001C001C001C0038
707−003800380038007000700070007180E300E300E300E6007E003C000A207C9F0C>I<1E07
708−C0F8003F1FE1FC0033B8730E0063E076070063C03C07006380380700C780780E00070070
709−0E000700700E000700700E000E00E01C000E00E01C000E00E01C000E00E038601C01C038
710−C01C01C038C01C01C071801C01C031803803803F001801801E0023147D9325>I<1E07C0
711−3F1FE033B87063E07063C038638038C780700700700700700700700E00E00E00E00E00E0
712−0E01C31C01C61C01C61C038C1C018C3801F81800F018147D931A>I<007C0001FF000383
713−800F01C01E01C01C01E03C01E07801E07801E07801E0F003C0F003C0F003C0F00780F007
714−00700F00701E003838001FF00007C00013147C9317>I<01C1E007E7F8067E3C0C7C1C0C
715−781E0C701E18E01E00E01E00E01E00E01E01C03C01C03C01C03C01C07803C07803C07003
716−C0E003E3C0077F80071E000700000700000E00000E00000E00000E00001C0000FFC000FF
717−8000171D809317>I<0E0F003F3F8033F1C063C1C063C3C06383C0C78380070000070000
718−0700000E00000E00000E00000E00001C00001C00001C00001C000038000018000012147D
719−9313>114 D<00FC03FE07070E0F0E0F0E0E1E000F800FF007F803FC003E001E701EF01C
720−F01CE03860703FE01F8010147D9313>I<018001C0038003800380038007000700FFF0FF
721−F00E000E000E000E001C001C001C001C0038003800380038307060706070C071803F001E
722−000C1C7C9B0F>I<0F00601F80703180E031C0E06380E06380E0C381C00701C00701C007
723−01C00E03800E03800E03800E038C0E07180E07180E0F180E1F3007F3F003E1C016147D93
724−18>I<0F01C01F83C03183E031C1E06380E06380E0C380C00700C00700C00700C00E0180
725−0E01800E01800E03000E03000E06000E06000F0C0007F80001E00013147D9315>I<0F00
726−60E01F8071E03180E1F031C0E0F06380E0706380E070C381C0600701C0600701C0600701
727−C0600E0380C00E0380C00E0380C00E0381800E0381800E0781800E078300070F860007F9
728−FC0001F0F8001C147D931E>I<0787800FCFC018F8E03070E06071E06071E0C0E1C000E0
729−0000E00000E00001C00001C00001C00071C060F380C0F380C0E38180C7C3007CFE00387C
730−0013147D9315>I<0F00601F80703180E031C0E06380E06380E0C381C00701C00701C007
731−01C00E03800E03800E03800E03800E07000E07000E0F000E1F0007FE0003EE00000E0000
732−0E00001C00781C0078380070700060E0003FC0001F0000141D7D9316>I
733−E /Fn 74 123 df<001FC1F0007FF7F801F07E7C03C0FC7C0780FC7C0F00F8380F007800
734−0F0078000F0078000F0078000F0078000F007800FFFFFF80FFFFFF800F0078000F007800
735−0F0078000F0078000F0078000F0078000F0078000F0078000F0078000F0078000F007800
736−0F0078000F0078000F0078000F0078000F0078007FE3FF807FE3FF801E20809F1B>11
737−D<001F8000FFC001E0E003C0F00781F00F01F00F00E00F00000F00000F00000F00000F00
738−00FFFFF0FFFFF00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00
739−F00F00F00F00F00F00F00F00F00F00F00F00F07FC3FE7FC3FE1720809F19>I<001FB000
740−FFF001E1F003C1F00781F00F00F00F00F00F00F00F00F00F00F00F00F00F00F0FFFFF0FF
741−FFF00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F
742−00F00F00F00F00F00F00F00F00F07FE7FE7FE7FE1720809F19>I<001FC0FC00007FE7FE
743−0001F07F070003C0FE07800780FC0F800F00F80F800F007807000F007800000F00780000
744−0F007800000F007800000F00780000FFFFFFFF80FFFFFFFF800F007807800F007807800F
745−007807800F007807800F007807800F007807800F007807800F007807800F007807800F00
746−7807800F007807800F007807800F007807800F007807800F007807800F007807807FE3FF
747−3FF07FE3FF3FF02420809F26>I<070F1F1E3C78F0E0400809779F17>19
748−D<7038F87CFC7EFC7E7C3E0C060C060C06180C180C381C3018603040200F0E7F9F17>34
749−D<70F8FCFC7C0C0C0C181838306040060E7C9F0D>39 D<006000C001800380070006000E
750−001C001C003C003800380078007000700070007000F000F000F000F000F000F000F000F0
751−00F000F000F000F00070007000700070007800380038003C001C001C000E000600070003
752−80018000C000600B2E7CA112>I<C0006000300038001C000C000E000700070007800380
753−038003C001C001C001C001C001E001E001E001E001E001E001E001E001E001E001E001E0
754−01C001C001C001C003C0038003800780070007000E000C001C00380030006000C0000B2E
755−7EA112>I<70F8F8F878181818183030606040050E7C840D>44 D<FFF0FFF0FFF00C0380
756−8B0F>I<70F8F8F87005057C840D>I<0000400000C0000180000180000180000300000300
757−000300000600000600000C00000C00000C00001800001800001800003000003000006000
758−00600000600000C00000C00000C000018000018000018000030000030000060000060000
759−0600000C00000C00000C0000180000180000300000300000300000600000600000600000
760−C00000C00000122D7EA117>I<03F0000FFC001E1E001C0E003807007807807003807003
761−80700380F003C0F003C0F003C0F003C0F003C0F003C0F003C0F003C0F003C0F003C0F003
762−C0F003C0F003C07003807003807003807807803807001C0E001E1E000FFC0003F000121F
763−7E9D17>I<00C001C00FC0FFC0F3C003C003C003C003C003C003C003C003C003C003C003
764−C003C003C003C003C003C003C003C003C003C003C003C003C07FFF7FFF101E7D9D17>I<
765−07F0000FFC00383E00700F00600F80F80780FC07C0FC07C0FC03C07803C03003C00007C0
766−000780000780000F00001E00001C0000380000700000E00001C0000380000300C00600C0
767−0C00C01801C03FFF807FFF80FFFF80FFFF80121E7E9D17>I<03F0000FFC001C1E00300F
768−00780F807C0F807C07807C0F803C0F80000F00000F00001E00007C0007F00007F000003C
769−00000E00000F000007800007800007C03007C07807C0FC07C0FC07C0FC0780780F80700F
770−003C1E001FFC0007F000121F7E9D17>I<000700000700000F00001F00001F00003F0000
771−7F0000EF0000CF0001CF00038F00030F00070F000E0F000C0F00180F00380F00300F0060
772−0F00E00F00FFFFF0FFFFF0000F00000F00000F00000F00000F00000F0000FFF000FFF014
773−1E7F9D17>I<3003003FFF003FFE003FF8003FE000300000300000300000300000300000
774−30000031F00037FC003E1E00380F00380F003007800007800007C00007C00007C07807C0
775−F807C0F807C0F80780F00780600F00700E00383C001FF80007E000121F7E9D17>I<007C
776−0001FE000783000E07800C0F801C0F80380700380000780000700000700000F1F800F3FE
777−00F40E00F80700F80380F80380F003C0F003C0F003C0F003C0F003C07003C07003C07003
778−803803803807001C07000E1E0007FC0001F000121F7E9D17>I<6000007FFFE07FFFE07F
779−FFC07FFFC0E00180C00300C00300C00600000C0000180000180000300000700000600000
780−E00000E00001E00001C00001C00003C00003C00003C00003C00007C00007C00007C00007
781−C00007C00007C000038000131F7E9D17>I<03F0000FFC001C1E00380700300700700380
782−7003807003807803807C07007F07003F8E001FFC000FF80007FC0007FE001EFF00387F80
783−701F80700FC0E003C0E003C0E001C0E001C0E001C0F001807003803807001E0E000FFC00
784−03F000121F7E9D17>I<03F00007F8001E1C00380E00380700700700700380F00380F003
785−80F003C0F003C0F003C0F003C0F003C07007C07007C03807C01C0BC01FF3C007E3C00003
786−800003800007800007003807007C0E007C0E00781C003078001FF0000FC000121F7E9D17
787−>I<70F8F8F8700000000000000000000070F8F8F87005147C930D>I<70F8F8F870000000
788−0000000000000070F8F8F878181818183030606040051D7C930D>I<FFFFFFFCFFFFFFFC
789−0000000000000000000000000000000000000000000000000000000000000000FFFFFFFC
790−FFFFFFFC1E0C7E9023>61 D<0003800000038000000380000007C0000007C0000007C000
791−000FE000000FE000000FE0000019F0000019F0000019F0000030F8000030F8000030F800
792−00607C0000607C0000607C0000C03E0000C03E0000C03E0001FFFF0001FFFF0001801F00
793−03000F8003000F8003000F80060007C0060007C01F0007E0FFC03FFEFFC03FFE1F207F9F
794−22>65 D<FFFFE000FFFFF8000F803E000F801E000F801F000F800F800F800F800F800F80
795−0F800F800F800F800F800F000F801F000F803E000F807C000FFFF8000FFFFC000F801F00
796−0F800F800F8007C00F8003C00F8003E00F8003E00F8003E00F8003E00F8003E00F8007C0
797−0F8007C00F800F800F803F00FFFFFE00FFFFF8001B1F7E9E20>I<000FE010007FF83000
798−F80E7003E00370078001F00F0000F01F0000F01E0000703C0000703C0000707C00003078
799−000030F8000030F8000000F8000000F8000000F8000000F8000000F8000000F8000000F8
800−000000780000307C0000303C0000303C0000301E0000601F0000600F0000C00780018003
801−E0030000F80E00007FFC00000FE0001C217E9F21>I<FFFFFF80FFFFFF800F800F800F80
802−03800F8003800F8001800F8001C00F8000C00F8000C00F80C0C00F80C0C00F80C0000F80
803−C0000F81C0000FFFC0000FFFC0000F81C0000F80C0000F80C0000F80C0600F80C0600F80
804−00600F8000C00F8000C00F8000C00F8001C00F8001C00F8003C00F800F80FFFFFF80FFFF
805−FF801B1F7E9E1F>69 D<FFFFFF80FFFFFF8007C00F8007C0038007C0018007C0018007C0
806−01C007C000C007C000C007C060C007C060C007C0600007C0600007C0E00007FFE00007FF
807−E00007C0E00007C0600007C0600007C0600007C0600007C0000007C0000007C0000007C0
808−000007C0000007C0000007C0000007C00000FFFF0000FFFF00001A1F7F9E1E>I<000FE0
809−10007FF83000F80E7003E00370078001F00F0000F01F0000F01E0000703C0000703C0000
810−707C00003078000030F8000030F8000000F8000000F8000000F8000000F8000000F80000
811−00F8007FFEF8007FFE780001F07C0001F03C0001F03C0001F01E0001F01F0001F00F0001
812−F007C001F003E003F000FC0E70007FFC10000FF0001F217E9F24>I<FFF8FFF8FFF8FFF8
813−0F800F800F800F800F800F800F800F800F800F800F800F800F800F800F800F800F800F80
814−0F800F800F800F800F800F800FFFFF800FFFFF800F800F800F800F800F800F800F800F80
815−0F800F800F800F800F800F800F800F800F800F800F800F800F800F800F800F800F800F80
816−FFF8FFF8FFF8FFF81D1F7E9E22>I<FFF8FFF80F800F800F800F800F800F800F800F800F
817−800F800F800F800F800F800F800F800F800F800F800F800F800F800F800F800F800F800F
818−80FFF8FFF80D1F7F9E10>I<FFFC00FFFC000F80000F80000F80000F80000F80000F8000
819−0F80000F80000F80000F80000F80000F80000F80000F80000F80000F80000F80000F8006
820−0F80060F80060F80060F800E0F800E0F800C0F801C0F803C0F80FCFFFFFCFFFFFC171F7E
821−9E1C>76 D<FFC0000FFEFFE0001FFE07E0001FC007E0001FC006F00037C006F00037C006
822−F00037C006780067C006780067C006780067C0063C00C7C0063C00C7C0063C00C7C0061E
823−0187C0061E0187C0060F0307C0060F0307C0060F0307C006078607C006078607C0060786
824−07C00603CC07C00603CC07C00603CC07C00601F807C00601F807C00601F807C00600F007
825−C00F00F007C0FFF0F0FFFEFFF060FFFE271F7F9E2A>I<FF801FF8FFC01FF80FE003C00F
826−E001800DF001800DF001800CF801800CFC01800C7C01800C3E01800C3F01800C1F01800C
827−0F81800C0FC1800C07C1800C07E1800C03E1800C01F1800C01F9800C00F9800C007D800C
828−007F800C003F800C001F800C001F800C000F800C000F800C0007801E000380FFC00380FF
829−C001801D1F7E9E22>I<001FE000007FF80001F03E0003C00F00078007800F0003C01E00
830−01E03E0001F03C0000F07C0000F87C0000F878000078F800007CF800007CF800007CF800
831−007CF800007CF800007CF800007CF800007CF800007C7C0000F87C0000F87C0000F83C00
832−00F03E0001F01E0001E00F0003C00780078003C00F0001F03E00007FF800001FE0001E21
833−7E9F23>I<FFFFE000FFFFF8000F803E000F801F000F800F800F8007800F8007C00F8007
834−C00F8007C00F8007C00F8007C00F8007800F800F800F801F000F803E000FFFF8000FFFE0
835−000F8000000F8000000F8000000F8000000F8000000F8000000F8000000F8000000F8000
836−000F8000000F8000000F800000FFF80000FFF800001A1F7E9E1F>I<FFFF8000FFFFF000
837−0F807C000F803E000F801F000F800F000F800F800F800F800F800F800F800F800F800F00
838−0F801F000F803E000F807C000FFFF0000FFFE0000F81F8000F807C000F807C000F803E00
839−0F803E000F803E000F803E000F803E000F803E000F803E000F803E0C0F803E0C0F801F0C
840−FFF80F18FFF807F8000001F01E207E9E21>82 D<03F0400FFCC01E0FC03807C07803C070
841−01C0F001C0F000C0F000C0F000C0F80000FC00007F00007FF0003FFE001FFF000FFF8003
842−FFC0007FE00007E00003F00001F00000F0C000F0C000F0C000F0E000E0E000E0F001E0F8
843−01C0FE0780C7FF0081FC0014217E9F19>I<7FFFFFE07FFFFFE07C0F81E0700F80E0600F
844−8060600F8060E00F8070C00F8030C00F8030C00F8030C00F8030000F8000000F8000000F
845−8000000F8000000F8000000F8000000F8000000F8000000F8000000F8000000F8000000F
846−8000000F8000000F8000000F8000000F8000000F8000000F800003FFFE0003FFFE001C1F
847−7E9E21>I<FFF81FF8FFF81FF80F8003C00F8001800F8001800F8001800F8001800F8001
848−800F8001800F8001800F8001800F8001800F8001800F8001800F8001800F8001800F8001
849−800F8001800F8001800F8001800F8001800F8001800F8001800F80018007800300078003
850−0003C0030003C0060001E00C0000F83800003FF000000FC0001D207E9E22>I<FFF807FE
851−FFF807FE0F8000F00F8000E007C000C007C000C007C000C003E0018003E0018003F00180
852−01F0030001F0030001F8070000F8060000F8060000FC0E00007C0C00007C0C00003E1800
853−003E1800003E1800001F3000001F3000001FB000000FE000000FE000000FE0000007C000
854−0007C0000003800000038000000380001F207F9E22>I<FFF8FFF83FF0FFF8FFF83FF01F
855−800F8007800F800F8003000F8007C003000FC007C0070007C007C0060007C00FE0060007
856−E00FE00E0003E00FE00C0003E01FF00C0003E019F00C0001F019F0180001F019F0180001
857−F030F8180000F830F8300000F830F8300000F8607C3000007C607C6000007C607C600000
858−7CC03E6000007EC03EE000003EC03EC000003FC03FC000003F801FC000001F801F800000
859−1F801F8000001F000F8000000F000F0000000F000F0000000E000700000006000600002C
860−207F9E2F>I<FFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0
861−C0C0C0C0C0C0C0C0C0C0C0C0C0FFFF082D7CA10D>91 D<0804180C3018703860306030C0
862−60C060C060F87CFC7EFC7E7C3E381C0F0E7A9F17>I<FFFF030303030303030303030303
863−0303030303030303030303030303030303030303030303030303030303FFFF082D80A10D
864−>I<0FE0003FF8007C3C007C1E007C0F00380F00000F00000F0001FF000FCF003E0F0078
865−0F00780F00F00F30F00F30F00F30F01F30783FF03FC7E00F83C014147E9317>97
866−D<1E0000FE0000FE00001E00001E00001E00001E00001E00001E00001E00001E00001E00
867−001E3F001EFFC01FC1E01F00F01E00701E00781E00381E003C1E003C1E003C1E003C1E00
868−3C1E003C1E00381E00781E00701F00F01D83E01CFF80183E0016207F9F19>I<01F80007
869−FE001E1F003C1F00381F00780E00700000F00000F00000F00000F00000F00000F0000078
870−00007800003C01803C03801F070007FE0001F80011147F9314>I<0001E0000FE0000FE0
871−0001E00001E00001E00001E00001E00001E00001E00001E00001E003F1E007FDE01F07E0
872−3C03E03801E07801E07001E0F001E0F001E0F001E0F001E0F001E0F001E07001E07801E0
873−3801E03C03E01E0FE00FFDFC03F1FC16207F9F19>I<03F0000FFC001E1E003C0F003807
874−00780700700380F00380FFFF80FFFF80F00000F00000F000007000007800003801803C03
875−801F070007FE0001F80011147F9314>I<003E0000FF0003CF80078F80078F800F07000F
876−00000F00000F00000F00000F00000F0000FFF000FFF0000F00000F00000F00000F00000F
877−00000F00000F00000F00000F00000F00000F00000F00000F00000F00000F00000F00007F
878−F0007FF0001120809F0E>I<0000E003E3F00FFE701C1C70380E60780F00780F00780F00
879−780F00780F00380E001C1C001FF80033E0002000003000003000003FFE003FFF801FFFC0
880−1FFFE07001E06000F0E00070E00070E000707000E07801E03E07C00FFF0003FC00141F7F
881−9417>I<1E0000FE0000FE00001E00001E00001E00001E00001E00001E00001E00001E00
882−001E00001E1F001E7F801EC3C01F81E01F01E01E01E01E01E01E01E01E01E01E01E01E01
883−E01E01E01E01E01E01E01E01E01E01E01E01E01E01E0FFC7FCFFC7FC16207F9F19>I<1C
884−003E003E003E001C000000000000000000000000001E00FE00FE001E001E001E001E001E
885−001E001E001E001E001E001E001E001E001E001E00FFC0FFC00A1F7F9E0D>I<007000F8
886−00F800F80070000000000000000000000000007807F807F800F800780078007800780078
887−007800780078007800780078007800780078007800780078007800787078F878F8F0F9E0
888−7FC03F000D28839E0E>I<1E0000FE0000FE00001E00001E00001E00001E00001E00001E
889−00001E00001E00001E00001E1FF01E1FF01E0F801E0E001E0C001E18001E30001E70001E
890−F0001FF8001F78001E3C001E3E001E1E001E1F001E0F801E07801E07C0FFCFF8FFCFF815
891−207F9F18>I<1E00FE00FE001E001E001E001E001E001E001E001E001E001E001E001E00
892−1E001E001E001E001E001E001E001E001E001E001E001E001E001E001E00FFC0FFC00A20
893−7F9F0D>I<1E1F80FC00FE7FC3FE00FEC1E60F001F80FC07801F00F807801E00F007801E
894−00F007801E00F007801E00F007801E00F007801E00F007801E00F007801E00F007801E00
895−F007801E00F007801E00F007801E00F007801E00F00780FFC7FE3FF0FFC7FE3FF024147F
896−9327>I<1E1F00FE7F80FEC3C01F81E01F01E01E01E01E01E01E01E01E01E01E01E01E01
897−E01E01E01E01E01E01E01E01E01E01E01E01E01E01E0FFC7FCFFC7FC16147F9319>I<01
898−F80007FE001E07803C03C03801C07000E07000E0F000F0F000F0F000F0F000F0F000F0F0
899−00F07000E07801E03801C03C03C01E078007FE0001F80014147F9317>I<1E3F00FEFFC0
900−FFC3E01F00F01E00701E00781E00781E003C1E003C1E003C1E003C1E003C1E003C1E0078
901−1E00781E00F01F00F01F83E01EFF801E3E001E00001E00001E00001E00001E00001E0000
902−1E0000FFC000FFC000161D7F9319>I<01F06007FCE01F0EE03C03E03C03E07801E07801
903−E0F001E0F001E0F001E0F001E0F001E0F001E07801E07801E03803E03C03E01F0FE00FFD
904−E003F1E00001E00001E00001E00001E00001E00001E00001E0000FFC000FFC161D7F9318
905−>I<1E78FEFCFF9E1F1E1F0C1F001E001E001E001E001E001E001E001E001E001E001E00
906−1E00FFE0FFE00F147F9312>I<0FC83FF870386018E018E018F000FF807FE03FF81FFC01
907−FC003EC00EC00EE00EE00CF83CDFF887E00F147F9312>I<06000600060006000E000E00
908−1E003E00FFF8FFF81E001E001E001E001E001E001E001E001E001E001E0C1E0C1E0C1E0C
909−1E0C0F1807F003E00E1C7F9B12>I<1E01E0FE0FE0FE0FE01E01E01E01E01E01E01E01E0
910−1E01E01E01E01E01E01E01E01E01E01E01E01E01E01E01E01E03E01E03E00E0DE007F9FC
911−03F1FC16147F9319>I<FFC7F8FFC7F81E01E01F01C00F01800F01800783000783000783
912−0003C60003C60003C60001EC0001EC0001FC0000F80000F8000070000070000070001514
913−7F9318>I<FF9FF3FCFF9FF3FC1E03C0F01E03C0601F03C0E00F07C0C00F07E0C00F87E1
914−C0078CE180078CF18007CCF38003D8730003D87B0003F87F0001F03E0001F03E0001F03E
915−0000E01C0000E01C0000E01C001E147F9321>I<7FE7FC7FE7FC0F83E007838003C30003
916−E70001EE0000FC00007800007800003C00007E0000FE0001CF000187800387800703C00F
917−03E0FF87FEFF87FE1714809318>I<FFC7F8FFC7F81E01E01F01C00F01800F0180078300
918−07830007830003C60003C60003C60001EC0001EC0001FC0000F80000F800007000007000
919−00700000600000600000600070C000F8C000C18000E380007F00003C0000151D7F9318>
920−I<7FFF7FFF781E703E603C607860F861F001E003E007C007830F831F031E073C067C0678
921−1EFFFEFFFE10147F9314>I E /Fo 41 122 df<0001FF0000001FFFC000007F81E00000
922−FC01E00001F807F00003F807F00007F007F00007F007F00007F007F00007F007F00007F0
923−01C00007F000000007F000000007F000000007F03FF800FFFFFFF800FFFFFFF800FFFFFF
924−F80007F003F80007F003F80007F003F80007F003F80007F003F80007F003F80007F003F8
925−0007F003F80007F003F80007F003F80007F003F80007F003F80007F003F80007F003F800
926−07F003F80007F003F80007F003F80007F003F80007F003F80007F003F80007F003F8007F
927−FF3FFF807FFF3FFF807FFF3FFF80212A7FA925>12 D<000E00001E00007E0007FE00FFFE
928−00FFFE00F8FE0000FE0000FE0000FE0000FE0000FE0000FE0000FE0000FE0000FE0000FE
929−0000FE0000FE0000FE0000FE0000FE0000FE0000FE0000FE0000FE0000FE0000FE0000FE
930−0000FE0000FE0000FE0000FE0000FE0000FE0000FE00FFFFFEFFFFFEFFFFFE17277BA622
931−>49 D<00FF800007FFF0001FFFFC003E07FE007E01FF807F007F80FF807FC0FF803FC0FF
932−803FE0FF801FE0FF801FE07F001FE03E003FE000003FE000003FC000003FC000007F8000
933−007F000000FE000000FC000001F8000003F0000007C000000F8000001F0000003C000000
934−7800E0007000E000E000E001C001C0030001C0060001C00FFFFFC01FFFFFC03FFFFFC07F
935−FFFFC0FFFFFF80FFFFFF80FFFFFF801B277DA622>I<007F800003FFF00007FFFC000F81
936−FE001F00FF001F80FF003FC07F803FC07F803FC07F803FC07F801FC07F800F80FF000000
937−FF000000FE000001FC000003F8000007F00000FF800000FFC0000001F8000000FE000000
938−7F0000007F8000003FC000003FC000003FE01C003FE07F003FE07F003FE0FF803FE0FF80
939−3FE0FF803FC0FF803FC07F007F807E00FF003F01FE001FFFFC0007FFF00000FF80001B27
940−7DA622>I<00000F0000000F0000001F0000003F0000007F000000FF000001FF000001FF
941−000003BF0000073F00000E3F00001C3F00003C3F0000383F0000703F0000E03F0001C03F
942−0003803F0007803F0007003F000E003F001C003F0038003F0070003F00F0003F00FFFFFF
943−F8FFFFFFF8FFFFFFF800007F0000007F0000007F0000007F0000007F0000007F0000007F
944−0000007F00001FFFF8001FFFF8001FFFF81D277EA622>I<180003001F801F001FFFFE00
945−1FFFFC001FFFF8001FFFF0001FFFE0001FFF80001FFE00001C0000001C0000001C000000
946−1C0000001C0000001C0000001C7FC0001DFFF8001F80FC001E003F0008003F0000001F80
947−00001FC000001FC000001FE000001FE03C001FE07E001FE0FF001FE0FF001FE0FF001FE0
948−FF001FC0FE001FC07C003F8078003F803C007F001F01FE000FFFFC0003FFF00000FF8000
949−1B277DA622>I<0007F800003FFE0000FFFF0001FC0F8003F00F8007E01FC00FC03FC01F
950−803FC01F803FC03F803FC03F001F807F000F007F0000007F000000FF020000FF1FF000FF
951−3FFC00FF603E00FFC03F00FF801F80FF801FC0FF801FC0FF001FC0FF001FE0FF001FE0FF
952−001FE07F001FE07F001FE07F001FE07F001FE03F001FE03F001FC01F801FC01F801F800F
953−C03F0007E07E0003FFFC0001FFF800003FC0001B277DA622>I<380000003E0000003FFF
954−FFF03FFFFFF03FFFFFF07FFFFFE07FFFFFC07FFFFF807FFFFF0070000E0070000E007000
955−1C00E0003800E0007000E000E0000001C0000001C0000003800000078000000F8000000F
956−0000001F0000001F0000003F0000003F0000007E0000007E0000007E000000FE000000FE
957−000000FE000000FE000001FE000001FE000001FE000001FE000001FE000001FE000001FE
958−000000FC0000007800001C297CA822>I<00000780000000000780000000000FC0000000
959−000FC0000000000FC0000000001FE0000000001FE0000000003FF0000000003FF0000000
960−003FF00000000077F80000000077F800000000F7FC00000000E3FC00000000E3FC000000
961−01C1FE00000001C1FE00000003C1FF0000000380FF0000000380FF00000007007F800000
962−07007F8000000F007FC000000E003FC000000E003FC000001C001FE000001C001FE00000
963−3FFFFFF000003FFFFFF000003FFFFFF00000700007F80000700007F80000F00007FC0000
964−E00003FC0001E00003FE0001C00001FE0001C00001FE0003C00001FF00FFFE003FFFFCFF
965−FE003FFFFCFFFE003FFFFC2E297EA833>65 D<FFFFFFFFE0FFFFFFFFE0FFFFFFFFE003FC
966−001FE003FC0007F003FC0001F003FC0001F003FC0000F003FC00007003FC00007003FC00
967−007003FC01C07803FC01C03803FC01C03803FC01C03803FC03C00003FC03C00003FC0FC0
968−0003FFFFC00003FFFFC00003FFFFC00003FC0FC00003FC03C00003FC03C00003FC01C00E
969−03FC01C00E03FC01C00E03FC01C01C03FC00001C03FC00001C03FC00001C03FC00003C03
970−FC00003803FC00007803FC0000F803FC0001F803FC0003F803FC001FF8FFFFFFFFF0FFFF
971−FFFFF0FFFFFFFFF027297EA82C>69 D<FFFFFFFFC0FFFFFFFFC0FFFFFFFFC003FC003FC0
972−03FC000FE003FC0003E003FC0001E003FC0001E003FC0000E003FC0000E003FC0000E003
973−FC0000F003FC01C07003FC01C07003FC01C07003FC01C00003FC03C00003FC03C00003FC
974−0FC00003FFFFC00003FFFFC00003FFFFC00003FC0FC00003FC03C00003FC03C00003FC01
975−C00003FC01C00003FC01C00003FC01C00003FC00000003FC00000003FC00000003FC0000
976−0003FC00000003FC00000003FC00000003FC00000003FC000000FFFFFC0000FFFFFC0000
977−FFFFFC000024297EA82A>I<FFFFF0FFFFF0FFFFF003FC0003FC0003FC0003FC0003FC00
978−03FC0003FC0003FC0003FC0003FC0003FC0003FC0003FC0003FC0003FC0003FC0003FC00
979−03FC0003FC0003FC0003FC0003FC0003FC0003FC0003FC0003FC0003FC0003FC0003FC00
980−03FC0003FC0003FC0003FC0003FC0003FC00FFFFF0FFFFF0FFFFF014297EA819>73
981−D<FFFFFC0000FFFFFC0000FFFFFC000003FC00000003FC00000003FC00000003FC000000
982−03FC00000003FC00000003FC00000003FC00000003FC00000003FC00000003FC00000003
983−FC00000003FC00000003FC00000003FC00000003FC00000003FC00000003FC00000003FC
984−00000003FC00000003FC00000003FC0001C003FC0001C003FC0001C003FC0001C003FC00
985−03C003FC00038003FC00038003FC00078003FC00078003FC000F8003FC000F8003FC001F
986−8003FC007F8003FC01FF00FFFFFFFF00FFFFFFFF00FFFFFFFF0022297EA828>76
987−D<FFFE0000003FFF80FFFE0000003FFF80FFFF0000007FFF8003FF0000007FE00003FF00
988−00007FE00003BF800000EFE00003BF800000EFE000039FC00001CFE000039FC00001CFE0
989−00038FE000038FE000038FE000038FE000038FE000038FE0000387F000070FE0000387F0
990−00070FE0000383F8000E0FE0000383F8000E0FE0000381FC001C0FE0000381FC001C0FE0
991−000381FC001C0FE0000380FE00380FE0000380FE00380FE00003807F00700FE00003807F
992−00700FE00003803F80E00FE00003803F80E00FE00003803F80E00FE00003801FC1C00FE0
993−0003801FC1C00FE00003800FE3800FE00003800FE3800FE000038007F7000FE000038007
994−F7000FE000038007F7000FE000038003FE000FE000038003FE000FE000038001FC000FE0
995−00038001FC000FE000038000F8000FE000FFFE00F803FFFF80FFFE00F803FFFF80FFFE00
996−7003FFFF8039297DA840>I<FFFFFFF800FFFFFFFF00FFFFFFFFC003FC003FE003FC000F
997−F003FC0007F803FC0007FC03FC0003FC03FC0003FE03FC0003FE03FC0003FE03FC0003FE
998−03FC0003FE03FC0003FE03FC0003FE03FC0003FC03FC0007FC03FC0007F803FC000FF003
999−FC003FE003FFFFFF8003FFFFFE0003FC00000003FC00000003FC00000003FC00000003FC
1000−00000003FC00000003FC00000003FC00000003FC00000003FC00000003FC00000003FC00
1001−000003FC00000003FC00000003FC00000003FC000000FFFFF00000FFFFF00000FFFFF000
1002−0027297EA82E>80 D<00FF806003FFF0E00FFFF9E01F80FFE03F001FE03E0007E07C0003
1003−E07C0003E0FC0001E0FC0001E0FC0000E0FE0000E0FE0000E0FF000000FFC000007FFC00
1004−007FFFE0003FFFF8001FFFFE001FFFFF0007FFFF8003FFFFC000FFFFC0000FFFE000007F
1005−E000001FF000000FF0000007F0E00003F0E00003F0E00003F0E00003F0F00003E0F00003
1006−E0F80007E0FC0007C0FF000F80FFE03F80F3FFFE00E1FFFC00C01FF0001C297CA825>83
1007−D<7FFFFFFFFF807FFFFFFFFF807FFFFFFFFF807F807F807F807C007F800F8078007F8007
1008−8078007F80078070007F800380F0007F8003C0F0007F8003C0E0007F8001C0E0007F8001
1009−C0E0007F8001C0E0007F8001C0E0007F8001C000007F80000000007F80000000007F8000
1010−0000007F80000000007F80000000007F80000000007F80000000007F80000000007F8000
1011−0000007F80000000007F80000000007F80000000007F80000000007F80000000007F8000
1012−0000007F80000000007F80000000007F80000000007F80000000007F80000000007F8000
1013−0000007F80000000FFFFFFC00000FFFFFFC00000FFFFFFC0002A287EA72F>I<FFFFF000
1014−7FFFFFFFF0007FFFFFFFF0007FFF03FE000001C001FE0000038001FE0000038001FF0000
1015−078000FF0000070000FF80000F00007F80000E00007FC0000E00003FC0001C00003FC000
1016−1C00003FE0003C00001FE0003800001FF0007800000FF0007000000FF80070000007F800
1017−E0000007F800E0000003FC01C0000003FC01C0000003FE03C0000001FE0380000001FF07
1018−80000000FF0700000000FF87000000007F8E000000007F8E000000007FDE000000003FDC
1019−000000003FFC000000001FF8000000001FF8000000000FF0000000000FF0000000000FF0
1020−0000000007E00000000007E00000000003C00000000003C0000030297FA833>86
1021−D<01FF80000FFFF0001F81FC003FC0FE003FC07F003FC03F003FC03F801F803F800F003F
1022−8000003F8000003F800000FF80007FFF8003FFFF800FF03F801FC03F803F803F807F003F
1023−80FE003F80FE003F80FE003F80FE003F80FE007F807F00DF803F839FFC1FFF0FFC03FC03
1024−FC1E1B7E9A21>97 D<FFE00000FFE00000FFE000000FE000000FE000000FE000000FE000
1025−000FE000000FE000000FE000000FE000000FE000000FE000000FE000000FE000000FE1FE
1026−000FEFFF800FFE0FE00FF803F00FF001F80FE001FC0FE000FC0FE000FE0FE000FE0FE000
1027−FF0FE000FF0FE000FF0FE000FF0FE000FF0FE000FF0FE000FF0FE000FF0FE000FE0FE000
1028−FE0FE000FE0FE001FC0FE001FC0FF001F80FF803F00F9C0FE00F0FFF800E01FC00202A7E
1029−A925>I<003FE00001FFFC0003F07E000FC0FF001FC0FF003F80FF003F80FF007F007E00
1030−7F003C007F000000FF000000FF000000FF000000FF000000FF000000FF000000FF000000
1031−7F0000007F0000007F8000003F8003803F8003801FC007000FE00E0003F83C0001FFF800
1032−003FC000191B7E9A1E>I<00007FF000007FF000007FF0000007F0000007F0000007F000
1033−0007F0000007F0000007F0000007F0000007F0000007F0000007F0000007F0000007F000
1034−3F87F001FFF7F007F03FF00FC00FF01F8007F03F8007F03F8007F07F0007F07F0007F07F
1035−0007F0FF0007F0FF0007F0FF0007F0FF0007F0FF0007F0FF0007F0FF0007F0FF0007F07F
1036−0007F07F0007F03F0007F03F8007F01F800FF00FC01FF007F07FFF01FFE7FF007F87FF20
1037−2A7EA925>I<003FC00001FFF00003F0FC000FC03E001F803F001F801F003F801F807F00
1038−1F807F001FC07F000FC0FF000FC0FF000FC0FFFFFFC0FFFFFFC0FF000000FF000000FF00
1039−00007F0000007F0000007F0000003F8001C01F8001C00FC0038007C0070003F01E0000FF
1040−FC00003FE0001A1B7E9A1F>I<0003F800001FFE00007E3F0001FC3F8001F87F8003F87F
1041−8007F07F8007F03F0007F03F0007F0000007F0000007F0000007F0000007F0000007F000
1042−00FFFFC000FFFFC000FFFFC00007F0000007F0000007F0000007F0000007F0000007F000
1043−0007F0000007F0000007F0000007F0000007F0000007F0000007F0000007F0000007F000
1044−0007F0000007F0000007F0000007F0000007F0000007F000007FFF80007FFF80007FFF80
1045−00192A7EA915>I<00FF81F003FFE7F80FC1FE1C1F80FC7C3F007E7C3F007E387F007F00
1046−7F007F007F007F007F007F007F007F007F007F003F007E003F007E001F80FC000FC1F800
1047−1FFFE00018FF800038000000380000003C0000003E0000003FFFF8003FFFFF001FFFFFC0
1048−0FFFFFE007FFFFF01FFFFFF03E0007F07C0001F8F80000F8F80000F8F80000F8F80000F8
1049−7C0001F07C0001F03F0007E00FC01F8007FFFF00007FF0001E287E9A22>I<FFE00000FF
1050−E00000FFE000000FE000000FE000000FE000000FE000000FE000000FE000000FE000000F
1051−E000000FE000000FE000000FE000000FE000000FE0FE000FE3FF800FE70FC00FEC0FE00F
1052−F807E00FF807F00FF007F00FF007F00FE007F00FE007F00FE007F00FE007F00FE007F00F
1053−E007F00FE007F00FE007F00FE007F00FE007F00FE007F00FE007F00FE007F00FE007F00F
1054−E007F00FE007F0FFFE3FFFFFFE3FFFFFFE3FFF202A7DA925>I<07000F801FC03FE03FE0
1055−3FE01FC00F8007000000000000000000000000000000FFE0FFE0FFE00FE00FE00FE00FE0
1056−0FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE0FFFE
1057−FFFEFFFE0F2B7EAA12>I<FFE00000FFE00000FFE000000FE000000FE000000FE000000F
1058−E000000FE000000FE000000FE000000FE000000FE000000FE000000FE000000FE000000F
1059−E01FFC0FE01FFC0FE01FFC0FE007800FE00F000FE01E000FE03C000FE078000FE0E0000F
1060−E3C0000FE7C0000FEFE0000FFFF0000FFFF8000FF3F8000FE1FC000FC0FE000FC07F000F
1061−C07F000FC03F800FC01FC00FC00FE00FC00FE00FC007F0FFFC1FFFFFFC1FFFFFFC1FFF20
1062−2A7FA923>107 D<FFE0FFE0FFE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE0
1063−0FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE0
1064−0FE00FE00FE00FE00FE00FE00FE0FFFEFFFEFFFE0F2A7EA912>I<FFC07F001FC000FFC1
1065−FFC07FF000FFC707E1C1F8000FCC07F301FC000FD803F600FC000FD803FE00FE000FF003
1066−FC00FE000FF003FC00FE000FE003F800FE000FE003F800FE000FE003F800FE000FE003F8
1067−00FE000FE003F800FE000FE003F800FE000FE003F800FE000FE003F800FE000FE003F800
1068−FE000FE003F800FE000FE003F800FE000FE003F800FE000FE003F800FE000FE003F800FE
1069−000FE003F800FE000FE003F800FE00FFFE3FFF8FFFE0FFFE3FFF8FFFE0FFFE3FFF8FFFE0
1070−331B7D9A38>I<FFC0FE00FFC3FF80FFC70FC00FCC0FE00FD807E00FD807F00FF007F00F
1071−F007F00FE007F00FE007F00FE007F00FE007F00FE007F00FE007F00FE007F00FE007F00F
1072−E007F00FE007F00FE007F00FE007F00FE007F00FE007F00FE007F00FE007F0FFFE3FFFFF
1073−FE3FFFFFFE3FFF201B7D9A25>I<003FE00001FFFC0003F07E000FC01F801F800FC03F80
1074−0FE03F0007E07F0007F07F0007F07F0007F0FF0007F8FF0007F8FF0007F8FF0007F8FF00
1075−07F8FF0007F8FF0007F8FF0007F87F0007F07F0007F03F800FE03F800FE01F800FC00FC0
1076−1F8007F07F0001FFFC00003FE0001D1B7E9A22>I<FFE1FE00FFEFFF80FFFE0FE00FF807
1077−F00FF003F80FE001FC0FE001FC0FE001FE0FE000FE0FE000FF0FE000FF0FE000FF0FE000
1078−FF0FE000FF0FE000FF0FE000FF0FE000FF0FE000FE0FE001FE0FE001FE0FE001FC0FE003
1079−FC0FF003F80FF807F00FFC1FE00FEFFF800FE1FC000FE000000FE000000FE000000FE000
1080−000FE000000FE000000FE000000FE000000FE00000FFFE0000FFFE0000FFFE000020277E
1081−9A25>I<FFC1F0FFC7FCFFCE3E0FDC7F0FD87F0FF07F0FF07F0FF03E0FE0000FE0000FE0
1082−000FE0000FE0000FE0000FE0000FE0000FE0000FE0000FE0000FE0000FE0000FE0000FE0
1083−000FE000FFFF00FFFF00FFFF00181B7F9A1B>114 D<03FE300FFFF03E03F07800F07000
1084−F0F00070F00070F80070FE0000FFE0007FFF007FFFC03FFFE01FFFF007FFF800FFF80007
1085−FC0000FCE0007CE0003CF0003CF00038F80038FC0070FF01E0F7FFC0C1FF00161B7E9A1B
1086−>I<00E00000E00000E00000E00001E00001E00001E00003E00003E00007E0000FE0001F
1087−FFE0FFFFE0FFFFE00FE0000FE0000FE0000FE0000FE0000FE0000FE0000FE0000FE0000F
1088−E0000FE0000FE0000FE0000FE0700FE0700FE0700FE0700FE0700FE0700FE07007F0E003
1089−F0C001FF80007F0014267FA51A>I<FFE07FF0FFE07FF0FFE07FF00FE007F00FE007F00F
1090−E007F00FE007F00FE007F00FE007F00FE007F00FE007F00FE007F00FE007F00FE007F00F
1091−E007F00FE007F00FE007F00FE007F00FE007F00FE007F00FE007F00FE00FF00FE00FF007
1092−E01FF003F077FF01FFE7FF007F87FF201B7D9A25>I<FFFC03FFFFFC03FFFFFC03FF0FF0
1093−00F007F000E007F800E003F801C003F801C003FC03C001FC038001FE078000FE070000FF
1094−0700007F0E00007F0E00007F9E00003F9C00003FFC00001FF800001FF800000FF000000F
1095−F000000FF0000007E0000007E0000003C0000003C000201B7F9A23>I<FFFC7FFC1FFCFF
1096−FC7FFC1FFCFFFC7FFC1FFC0FE00FE001C007F007E0038007F007E0038007F807F0078003
1097−F807F0070003F80FF8070003FC0FF80F0001FC0FF80E0001FC1FFC0E0000FE1CFC1C0000
1098−FE1CFE1C0000FF387E3C00007F387E3800007F787F3800003FF03F7000003FF03FF00000
1099−3FE01FF000001FE01FE000001FE01FE000000FC00FC000000FC00FC000000F8007C00000
1100−07800780000007800780002E1B7F9A31>I<FFFC1FFEFFFC1FFEFFFC1FFE07F0038003F8
1101−078003FC0F0001FE1E0000FE3C00007F3800007FF800003FF000001FE000000FE000000F
1102−F0000007F800000FF800001FFC00003CFE000038FF0000787F0000F03F8001E01FC003C0
1103−1FE003800FE0FFF03FFFFFF03FFFFFF03FFF201B7F9A23>I<FFFC03FFFFFC03FFFFFC03
1104−FF0FF000F007F000E007F800E003F801C003F801C003FC03C001FC038001FE078000FE07
1105−0000FF0700007F0E00007F0E00007F9E00003F9C00003FFC00001FF800001FF800000FF0
1106−00000FF000000FF0000007E0000007E0000003C0000003C0000003800000038000000780
1107−00380700007C0F0000FE0E0000FE1E0000FE1C0000FE38000074F000003FE000000F8000
1108−0020277F9A23>I E /Fp 39 127 df<007E0001C1800301800703C00E03C00E01800E00
1109−000E00000E00000E00000E0000FFFFC0FFFFC00E01C00E01C00E01C00E01C00E01C00E01
1110−C00E01C00E01C00E01C00E01C00E01C00E01C00E01C00E01C07F87F87F87F8151D809C17
1111−>12 D<FC00FC001C001C001C001C001C001C001C001C001C001C001C001C001C001C00FF
1112−80FF8009127F910C>16 D<070F0F1C3870E0400808789C15>19 D<1C001E000780038003
1113−800380FF00800009087B7E12>24 D<70F8F8F87005057D840C>46
1114−D<07C01FF0387C603C601EF01FF81FF80FF80F700F001F001E001E003C0038007000E000
1115−C00180030006000C031803100320067FFEFFFEFFFE101C7E9B15>50
1116−D<00060000000F0000000F0000000F0000001F8000001F8000001F8000003FC0000033C0
1117−000033C0000073E0000061E0000061E00000E1F00000C0F00000C0F00001C0F800018078
1118−0001FFF80003FFFC0003003C0003003C0007003E0006001E0006001E000E001F001E000F
1119−00FF807FF0FF807FF01C1D7F9C1F>65 D<001F808000FFE18001F03B8007C00F800F0007
1120−801F0007801E0003803C0003807C0001807C00018078000180F8000000F8000000F80000
1121−00F8000000F8000000F8000000F8000000F8000000780001807C0001807C0001803C0001
1122−801E0003001F0003000F00060007C00C0001F0380000FFF000001FC000191E7E9C1E>67
1123−D<FFFFFCFFFFFC0F007C0F001C0F000C0F000E0F00060F03060F03060F03060F03000F07
1124−000FFF000FFF000F07000F03000F03000F03030F03030F00030F00060F00060F00060F00
1125−0E0F001E0F007CFFFFFCFFFFFC181C7E9B1C>69 D<FFF0FFF00F000F000F000F000F000F
1126−000F000F000F000F000F000F000F000F000F000F000F000F000F000F000F000F000F000F
1127−00FFF0FFF00C1C7F9B0F>73 D<FFF800FFF8000F00000F00000F00000F00000F00000F00
1128−000F00000F00000F00000F00000F00000F00000F00000F00000F00000F00180F00180F00
1129−180F00180F00380F00300F00700F00F00F01F0FFFFF0FFFFF0151C7E9B1A>76
1130−D<003F800000E0E0000380380007001C000E000E001E000F003C0007803C0007807C0007
1131−C0780003C0780003C0F80003E0F80003E0F80003E0F80003E0F80003E0F80003E0F80003
1132−E0F80003E0780003C07C0007C07C0007C03C0007803E000F801E000F000F001E0007001C
1133−000380380000E0E000003F80001B1E7E9C20>79 D<FFFF80FFFFE00F01F00F00780F003C
1134−0F003E0F003E0F003E0F003E0F003E0F003C0F003C0F00780F01F00FFFC00F00000F0000
1135−0F00000F00000F00000F00000F00000F00000F00000F00000F0000FFF000FFF000171C7E
1136−9B1C>I<7FFFFFC07FFFFFC0780F03C0700F01C0600F00C0E00F00E0C00F0060C00F0060
1137−C00F0060C00F0060000F0000000F0000000F0000000F0000000F0000000F0000000F0000
1138−000F0000000F0000000F0000000F0000000F0000000F0000000F0000000F0000000F0000
1139−03FFFC0003FFFC001B1C7F9B1E>84 D<0FE0001838003C1C003C0E00180E00000E00000E
1140−0001FE000F8E003C0E00780E00700E00F00E60F00E60F00E60701E603827C00FC3801312
1141−7F9115>97 D<FC0000FC00001C00001C00001C00001C00001C00001C00001C00001C0000
1142−1C00001CFC001F87001E03801C01C01C01E01C00E01C00F01C00F01C00F01C00F01C00F0
1143−1C00F01C00E01C01E01C01C01E03801B070018FC00141D7F9C17>I<03F80E0C1C1E381E
1144−780C7000F000F000F000F000F000F0007000780638061C0C0E1803E00F127F9112>I<00
1145−1F80001F8000038000038000038000038000038000038000038000038000038003F3800E
1146−0F801C0780380380780380700380F00380F00380F00380F00380F00380F0038070038078
1147−03803803801C07800E1BF003F3F0141D7F9C17>I<07E00C301818381C701E700EF00EFF
1148−FEF000F000F000F000700070063806180C0E1803E00F127F9112>I<00F8018C071E061E
1149−0E0C0E000E000E000E000E000E00FFE0FFE00E000E000E000E000E000E000E000E000E00
1150−0E000E000E000E000E007FE07FE00F1D809C0D>I<00038007E4C00C39C0381DC0381C00
1151−781E00781E00781E00781E00381C00381C001C300037E0002000003000003000003FF800
1152−1FFF001FFF803003806001C0C000C0C000C0C000C06001803003001C0E0007F800121C7F
1153−9215>I<FC0000FC00001C00001C00001C00001C00001C00001C00001C00001C00001C00
1154−001C7C001C87001D03001E03801C03801C03801C03801C03801C03801C03801C03801C03
1155−801C03801C03801C03801C0380FF9FF0FF9FF0141D7F9C17>I<38007C007C007C003800
1156−000000000000000000000000FC00FC001C001C001C001C001C001C001C001C001C001C00
1157−1C001C001C001C00FF80FF80091D7F9C0C>I<01C003E003E003E001C000000000000000
1158−000000000007E007E000E000E000E000E000E000E000E000E000E000E000E000E000E000
1159−E000E000E000E000E000E060E0F0C0F1C061803E000B25839C0D>I<FC00FC001C001C00
1160−1C001C001C001C001C001C001C001C001C001C001C001C001C001C001C001C001C001C00
1161−1C001C001C001C001C00FF80FF80091D7F9C0C>108 D<FC7E07E000FC838838001D0190
1162−18001E01E01C001C01C01C001C01C01C001C01C01C001C01C01C001C01C01C001C01C01C
1163−001C01C01C001C01C01C001C01C01C001C01C01C001C01C01C001C01C01C00FF8FF8FF80
1164−FF8FF8FF8021127F9124>I<FC7C00FC87001D03001E03801C03801C03801C03801C0380
1165−1C03801C03801C03801C03801C03801C03801C03801C0380FF9FF0FF9FF014127F9117>
1166−I<03F0000E1C00180600380700700380700380F003C0F003C0F003C0F003C0F003C0F003
1167−C07003807003803807001C0E000E1C0003F00012127F9115>I<FCFC00FF87001E03801C
1168−01C01C01E01C00E01C00F01C00F01C00F01C00F01C00F01C00F01C01E01C01E01C01C01E
1169−03801F07001CFC001C00001C00001C00001C00001C00001C0000FF8000FF8000141A7F91
1170−17>I<03F1800E19801C0780380780780380780380F00380F00380F00380F00380F00380
1171−F003807003807803803807801C07800E1B8003E380000380000380000380000380000380
1172−000380001FF0001FF0141A7F9116>I<FCE0FD381E781E781C301C001C001C001C001C00
1173−1C001C001C001C001C001C00FFC0FFC00D127F9110>I<1F9020F04070C030C030E030F8
1174−007F803FE00FF000F8C038C018C018E018E010D0608FC00D127F9110>I<0C000C000C00
1175−0C000C000C001C001C003FE0FFE01C001C001C001C001C001C001C001C001C301C301C30
1176−1C301C300C200E6003C00C1A7F9910>I<FC1F80FC1F801C03801C03801C03801C03801C
1177−03801C03801C03801C03801C03801C03801C03801C03801C07800C07800E1BF003E3F014
1178−127F9117>I<FF0FE0FF0FE01C07801C03000E06000E06000E0600070C00070C00070C00
1179−03980003980003F80001F00001F00000E00000E00000E00013127F9116>I<FF3FCFE0FF
1180−3FCFE03C0F07801C0F03001C1B03001C1B87000E1B86000E3B86000E3186000731CC0007
1181−31CC000760CC0003E0F80003E0F80003C0780003C0780001C0700001C070001B127F911E
1182−>I<7F8FF07F8FF00F0780070600038E0001DC0001D80000F00000700000780000F80001
1183−DC00038E00030E000607000F0380FF0FF8FF0FF81512809116>I<FF0FE0FF0FE01C0780
1184−1C03000E06000E06000E0600070C00070C00070C0003980003980003F80001F00001F000
1185−00E00000E00000E00000C00000C00000C000F18000F18000F300006600003C0000131A7F
1186−9116>I<1C043F0843F080E00E047D9B15>126 D E /Fq 13 118
1187−df<0F001F003F803F007E00F800F000C0000908769C18>19 D<00038000000380000007
1188−C0000007C0000007C000000FE000000FE000001FF000001BF000003BF8000031F8000031
1189−F8000060FC000060FC0000E0FE0000C07E0000C07E0001803F0001FFFF0003FFFF800300
1190−1F8007001FC006000FC006000FC00C0007E00C0007E0FF803FFEFF803FFE1F1C7E9B24>
1191−65 D<07F8601FFEE03C07E07801E07000E0F000E0F00060F00060F80000FE0000FFE000
1192−7FFE003FFF003FFF800FFFC007FFE0007FE00003F00001F00000F0C000F0C000F0C000E0
1193−E000E0F001C0FC03C0EFFF00C3FC00141C7D9B1B>83 D<07F8001FFE003F1F803F07803F
1194−07C01E07C00C07C003FFC01FFFC03F87C07E07C0FC07C0FC07C0FC07C0FC0FC07E1FC03F
1195−FBF80FE1F815127F9117>97 D<FF0000FF00001F00001F00001F00001F00001F00001F00
1196−001F00001F00001F00001F1FC01FFFE01FC1F81F00F81F007C1F007C1F007E1F007E1F00
1197−7E1F007E1F007E1F007E1F007C1F007C1F80F81FC1F01C7FE0181F80171D7F9C1B>I<03
1198−F8000FFE001F3F003E3F007C3F007C1E00FC0C00FC0000FC0000FC0000FC0000FC00007C
1199−00007E01803E03801F07000FFE0003F80011127E9115>I<1C003E007F007F007F003E00
1200−1C00000000000000000000007F007F001F001F001F001F001F001F001F001F001F001F00
1201−1F001F001F001F00FFC0FFC00A1E7F9D0E>105 D<FF1FC0FE00FF7FE3FF001FE1F70F80
1202−1F80FC07C01F80FC07C01F00F807C01F00F807C01F00F807C01F00F807C01F00F807C01F
1203−00F807C01F00F807C01F00F807C01F00F807C01F00F807C01F00F807C0FFE7FF3FF8FFE7
1204−FF3FF825127F9128>109 D<01FC000FFF801F07C03E03E07C01F07C01F0FC01F8FC01F8
1205−FC01F8FC01F8FC01F8FC01F87C01F07C01F03E03E01F07C00FFF8001FC0015127F9118>
1206−111 D<FE7C00FEFF001FDF801F9F801F9F801F0F001F06001F00001F00001F00001F0000
1207−1F00001F00001F00001F00001F0000FFE000FFE00011127F9114>114
1208−D<1FD83FF87038E018E018F000FF807FE07FF01FF807FC007CC01CC01CE01CF038FFF0CF
1209−C00E127E9113>I<030003000300070007000F000F003F00FFFCFFFC1F001F001F001F00
1210−1F001F001F001F001F001F0C1F0C1F0C1F0C0F9807F003E00E1A7F9913>I<FF07F8FF07
1211−F81F00F81F00F81F00F81F00F81F00F81F00F81F00F81F00F81F00F81F00F81F00F81F00
1212−F81F01F80F03F807FEFF03F8FF18127F911B>I E /Fr 19 118 df<387CFCFE7E3E0E1C
1213−3CF8F040070C788516>44 D<FFFF80FFFF80FFFF8011037E8D16>I<3078FCFC78300606
1214−788516>I<00F80003FC0007FE000F07001C3B8038FF8079FF8073C7C07383C0E701C0E7
1215−01C0E701C0E701C0E701C0E701C0E701C073838073C78079FF0038FE001C38000F03C007
1216−FFC003FF0000FC0012197E9816>64 D<1FE0003FF0007FF800783C00300E00000E00003E
1217−0007FE001FFE007FCE00780E00E00E00E00E00E00E00783E007FFFE03FF7E00FC3E01312
1218−7E9116>97 D<FC0000FC0000FC00001C00001C00001C00001C00001C7C001DFE001FFF00
1219−1F07801E03C01C01C01C00E01C00E01C00E01C00E01C00E01C00E01E01C01E03C01F0780
1220−1FFF001DFE000CF80013197F9816>I<03F80FFC1FFE3C1E780C7000E000E000E000E000
1221−E000F000700778073E0E1FFC0FF803F010127D9116>I<003F00003F00003F0000070000
1222−070000070000070003E7000FF7001FFF003C1F00780F00700700E00700E00700E00700E0
1223−0700E00700E00700700F00780F003C1F001FFFE00FF7E007C7E013197F9816>I<03F000
1224−0FFC001FFE003C0F00780700700380E00380FFFF80FFFF80FFFF80E00000E00000700380
1225−7803803E07801FFF0007FE0001F80011127E9116>I<001E00007F0001FF8001C7800383
1226−000380000380007FFF00FFFF00FFFF000380000380000380000380000380000380000380
1227−000380000380000380000380000380007FFC00FFFE007FFC0011197F9816>I<FC0000FC
1228−0000FC00001C00001C00001C00001C00001CF8001DFC001FFE001F0F001E07001C07001C
1229−07001C07001C07001C07001C07001C07001C07001C07001C0700FF8FE0FF9FE0FF8FE013
1230−197F9816>104 D<07000F800F800F800700000000000000FF80FF80FF80038003800380
1231−038003800380038003800380038003800380FFFCFFFEFFFC0F1A7C9916>I<7FC000FFC0
1232−007FC00001C00001C00001C00001C00001C00001C00001C00001C00001C00001C00001C0
1233−0001C00001C00001C00001C00001C00001C00001C00001C0007FFF00FFFF807FFF001119
1234−7E9816>108 D<03E0000FF8001FFC003C1E00780F00700700E00380E00380E00380E003
1235−80E00380F00780700700780F003C1E001FFC000FF80003E00011127E9116>111
1236−D<FC7C00FDFE00FFFF001F07801E03C01C01C01C00E01C00E01C00E01C00E01C00E01C00
1237−E01E01C01E03C01F07801FFF001DFE001CF8001C00001C00001C00001C00001C00001C00
1238−00FF8000FF8000FF8000131B7F9116>I<7F0F80FF3FC07F7FE007F1E007C0C007800007
1239−80000700000700000700000700000700000700000700000700007FFC00FFFC007FFC0013
1240−127F9116>114 D<0FEC3FFC7FFCF03CE01CE01C70007F801FF007F8003C600EE00EF00E
1241−F81EFFFCFFF8C7E00F127D9116>I<0300000700000700000700000700007FFF00FFFF00
1242−FFFF00070000070000070000070000070000070000070000070100070380070380070380
1243−07870003FE0001FC0000F80011177F9616>I<FC3F00FC3F00FC3F001C07001C07001C07
1244−001C07001C07001C07001C07001C07001C07001C07001C07001C1F001FFFE00FFFE007E7
1245−E013127F9116>I E /Fs 40 125 df<038007800F800F001E003C0038007000E0004000
1246−090A77A218>19 D<70F8FCFC7404040404080810102040060F7C840E>44
1247−D<FFF8FFF8FFF80D03808B10>I<00C001C007C0FFC0FBC003C003C003C003C003C003C0
1248−03C003C003C003C003C003C003C003C003C003C003C003C003C003C003C003C003C003C0
1249−03C003C0FFFFFFFF10217CA018>49 D<3000803C07003FFF003FFE003FF80037E0003000
1250−0030000030000030000030000030000031F800360C003807003007003007800003C00003
1251−C00003E00003E00003E07003E0F803E0F803E0F803E0F803C0C003C0600780600780300F
1252−001C1E000FFC0003F00013227EA018>53 D<01F00007FC000E0E001C0700380380780380
1253−700380F001C0F001C0F001C0F001E0F001E0F001E0F001E0F001E07001E07003E03803E0
1254−1805E00C05E00619E003E1E00001C00001C00003C00003803803807C03807C0700780E00
1255−301C003838001FF00007C00013227EA018>57 D<000FE010003FF83000F80E7001E00770
1256−03C001F0078001F00F0000F01E0000F03E0000703C0000707C0000707C00003078000030
1257−78000030F8000000F8000000F8000000F8000000F8000000F8000000F8000000F8000000
1258−78000000780000307C0000307C0000303C0000303E0000601E0000600F0000C0078000C0
1259−03C0018001E0030000FC0E00003FFC00000FE0001C247DA223>67
1260−D<FFFFF800FFFFFF0007C00F8007C003C007C001E007C000F007C0007807C0007C07C000
1261−3C07C0003E07C0001E07C0001E07C0001E07C0001F07C0001F07C0001F07C0001F07C000
1262−1F07C0001F07C0001F07C0001F07C0001F07C0001E07C0001E07C0003E07C0003C07C000
1263−3C07C0007807C000F007C001F007C003E007C00F80FFFFFF00FFFFF80020227FA125>I<
1264−FFFFFFE0FFFFFFE007C007E007C001E007C000E007C0006007C0007007C0007007C00030
1265−07C0003007C0183007C0183007C0180007C0180007C0380007C0780007FFF80007FFF800
1266−07C0780007C0380007C0180007C0180007C0180007C0180007C0000007C0000007C00000
1267−07C0000007C0000007C0000007C0000007C00000FFFF0000FFFF00001C227FA120>70
1268−D<FFFE1FFFC0FFFE1FFFC007C000F80007C000F80007C000F80007C000F80007C000F800
1269−07C000F80007C000F80007C000F80007C000F80007C000F80007C000F80007C000F80007
1270−C000F80007FFFFF80007FFFFF80007C000F80007C000F80007C000F80007C000F80007C0
1271−00F80007C000F80007C000F80007C000F80007C000F80007C000F80007C000F80007C000
1272−F80007C000F80007C000F80007C000F800FFFE1FFFC0FFFE1FFFC022227FA125>72
1273−D<FFFEFFFE07C007C007C007C007C007C007C007C007C007C007C007C007C007C007C007
1274−C007C007C007C007C007C007C007C007C007C007C007C007C007C007C0FFFEFFFE0F227F
1275−A112>I<FFFE0000FFFE00000F8000000F8000000F8000000F8000000F8000000F800000
1276−0F8000000F8000000F8000000F8000000F8000000F8000000F8000000F8000000F800000
1277−0F8000000F8000000F8000000F8000000F8001800F8001800F8001800F8001800F800380
1278−0F8003800F8003000F8007000F8007000F800F000F803F00FFFFFF00FFFFFF0019227EA1
1279−1E>76 D<FFC003FFC0FFE003FFC007F0003C0007F000180006F800180006FC001800067C
1280−001800063E001800063F001800061F001800060F801800060FC018000607C018000603E0
1281−18000603F018000601F018000600F818000600FC180006007C180006003E180006003F18
1282−0006001F180006000F980006000FD800060007D800060003F800060003F800060001F800
1283−060000F800060000F80006000078000F00003800FFF0003800FFF000180022227FA125>
1284−78 D<FFFFF800FFFFFE0007C01F8007C007C007C003C007C001E007C001E007C001F007
1285−C001F007C001F007C001F007C001F007C001E007C001E007C003C007C0078007C01F0007
1286−FFFC0007C0000007C0000007C0000007C0000007C0000007C0000007C0000007C0000007
1287−C0000007C0000007C0000007C0000007C0000007C00000FFFE0000FFFE00001C227FA121
1288−>80 D<FFFFF00000FFFFFE000007C01F000007C007800007C003C00007C003E00007C001
1289−F00007C001F00007C001F00007C001F00007C001F00007C001E00007C003E00007C003C0
1290−0007C007800007C01E000007FFF0000007C03C000007C01E000007C00F000007C00F8000
1291−07C007C00007C007C00007C007C00007C007C00007C007C00007C007C00007C007C00007
1292−C007C00007C007C0C007C007C0C007C003C0C0FFFE01E180FFFE00F1000000003E002223
1293−7FA124>82 D<FFFE03FFC0FFFE03FFC007C0003C0007C000180007C000180007C0001800
1294−07C000180007C000180007C000180007C000180007C000180007C000180007C000180007
1295−C000180007C000180007C000180007C000180007C000180007C000180007C000180007C0
1296−00180007C000180007C000180007C000180007C000180007C000180003C000300003E000
1297−300001E000300001E000600000F000C0000078018000003E070000000FFE00000003F800
1298−0022237FA125>85 D<FFF83FFE07FEFFF83FFE07FE1F8003F001F80F8003E000600F8003
1299−F000600FC003F000E007C003F000C007C003F000C007E006F800C003E006F8018003E006
1300−F8018003E00C7C018001F00C7C030001F00C7C030001F01C7E030001F8183E070000F818
1301−3E060000F8183E060000FC301F0600007C301F0C00007C301F0C00007C600F8C00003E60
1302−0F9800003E600F9800003EE00FD800003FC007F800001FC007F000001FC007F000001F80
1303−03F000000F8003E000000F8003E000000F0001E00000070001C00000070001C000000700
1304−01C0002F237FA132>87 D<1FF000383C007C0E007C0F007C078038078000078000078000
1305−FF8007C7801E07803C0780780780700780F00798F00798F00798F00F987817983C23F00F
1306−C1E015157E9418>97 D<0F0000FF0000FF00001F00000F00000F00000F00000F00000F00
1307−000F00000F00000F00000F00000F00000F3F000F61C00F80600F00300F00380F003C0F00
1308−1C0F001E0F001E0F001E0F001E0F001E0F001E0F001E0F001C0F003C0F00380F00700F80
1309−600E61C00C3F0017237FA21B>I<01FE000707000C0F801C0F80380F80780700700000F0
1310−0000F00000F00000F00000F00000F00000F000007000007800C03800C01C01800C030007
1311−060001F80012157E9416>I<0001E0001FE0001FE00003E00001E00001E00001E00001E0
1312−0001E00001E00001E00001E00001E00001E001F9E00707E00C03E01C01E03801E07801E0
1313−7001E0F001E0F001E0F001E0F001E0F001E0F001E0F001E07001E07801E03801E01801E0
1314−0C03F0070DFE01F1FE17237EA21B>I<01FC000707000C03801C01C03801C07801E07000
1315−E0F000E0FFFFE0F00000F00000F00000F00000F000007000007800603800601C00C00E01
1316−8007070000FC0013157F9416>I<003E0000E18003C3C00387C00787C00F03800F00000F
1317−00000F00000F00000F00000F00000F00000F0000FFF800FFF8000F00000F00000F00000F
1318−00000F00000F00000F00000F00000F00000F00000F00000F00000F00000F00000F00000F
1319−00000F0000FFF000FFF000122380A20F>I<0000F003F1180E1E381C0E38380730380700
1320−7807807807807807807807803807003807001C0E001E1C0033F000200000200000300000
1321−3800003FFE001FFFC00FFFE03801F0700070E00038E00038E00038E00038600030700070
1322−3800E00E038003FE0015217F9518>I<0F0000FF0000FF00001F00000F00000F00000F00
1323−000F00000F00000F00000F00000F00000F00000F00000F0F800F31C00F40E00F80F00F80
1324−F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00
1325−F00F00F00F00F0FFF3FFFFF3FF18237FA21B>I<0E001F001F001F000E00000000000000
1326−000000000000000000000F007F007F001F000F000F000F000F000F000F000F000F000F00
1327−0F000F000F000F000F000F00FFE0FFE00B2280A10D>I<0F00FF00FF001F000F000F000F
1328−000F000F000F000F000F000F000F000F000F000F000F000F000F000F000F000F000F000F
1329−000F000F000F000F000F000F000F000F00FFF0FFF00C2380A20D>108
1330−D<0F0FC07E00FF30E18700FF407203801F807C03C00F807C03C00F007803C00F007803C0
1331−0F007803C00F007803C00F007803C00F007803C00F007803C00F007803C00F007803C00F
1332−007803C00F007803C00F007803C00F007803C00F007803C0FFF3FF9FFCFFF3FF9FFC2615
1333−7F9429>I<0F0F80FF31C0FF40E01F80F00F80F00F00F00F00F00F00F00F00F00F00F00F
1334−00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F0FFF3FFFFF3FF18157F94
1335−1B>I<01FC000707000C01801800C03800E0700070700070F00078F00078F00078F00078
1336−F00078F00078F000787000707800F03800E01C01C00E038007070001FC0015157F9418>
1337−I<0F3F00FF61C0FF80600F00700F00380F003C0F003C0F001E0F001E0F001E0F001E0F00
1338−1E0F001E0F001E0F003C0F003C0F00380F00700F80E00F61C00F3F000F00000F00000F00
1339−000F00000F00000F00000F00000F0000FFF000FFF000171F7F941B>I<01F860070CE00E
1340−02E01C03E03801E07801E07801E0F001E0F001E0F001E0F001E0F001E0F001E0F001E078
1341−01E07801E03801E01C03E00C03E0070DE001F1E00001E00001E00001E00001E00001E000
1342−01E00001E00001E0001FFE001FFE171F7E941A>I<0F1E00FF2300FF47801F87800F8300
1343−0F80000F00000F00000F00000F00000F00000F00000F00000F00000F00000F00000F0000
1344−0F00000F0000FFF800FFF8001115809413>I<0FC8307860386018E018E018F000FC007F
1345−C03FE01FF007F8007CC03CC01CC01CE01CE018F038D8708FC00E157E9413>I<06000600
1346−06000600060006000E000E000E001E003FFCFFFC1E001E001E001E001E001E001E001E00
1347−1E001E001E0C1E0C1E0C1E0C1E0C1E0C0F18071001E00E1F7F9E13>I<0F00F0FF0FF0FF
1348−0FF01F01F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F
1349−00F00F00F00F01F00F01F00702F80386FF00F8FF18157F941B>I<FFC1FEFFC1FE1F00F8
1350−0F00600F00600780C00780C00780C003C18003C18003E38001E30001E30000F60000F600
1351−00F600007C00007C00007C0000380000380017157F941A>I<FFC1FEFFC1FE1F00F80F00
1352−600F00600780C00780C00780C003C18003C18003E38001E30001E30000F60000F60000F6
1353−00007C00007C00007C00003800003800003000003000007000006000F86000F8C000F8C0
1354−00F980006300003E0000171F7F941A>121 D<3FFFC03C0780380F80300F00701E00603E
1355−00603C0060780000F80000F00001E00003C00007C0C00780C00F00C01F01C01E01803C01
1356−807C0380780780FFFF8012157F9416>I<FFFFFFFFFFFF3001808C31>124
1357−D E /Ft 20 118 df<78FCFCFCFC7806067A8512>46 D<007F800001FFE0000781F8000E
1358−007C0018003E0030001F0030000F8060000FC0600007C0F80007C0FC0007E0FE0007E0FE
1359−0003E0FE0003E0FE0003E07C0007E0000007E0000007C0000007C000000FC000000F8000
1360−000F8000001F0000003E0000003C00000078000000F8000000F0000001E0000003C00000
1361−070000000E0000001C000000180000003000000060000000C00060018000600380006007
1362−0000C00E0000C00C0000C0180001C03FFFFFC07FFFFF80FFFFFF80FFFFFF801B2F7DAE21
1363−>50 D<FFFFC00000FFFFC0000007F000000003E000000003E000000003E000000003E000
1364−000003E000000003E000000003E000000003E000000003E000000003E000000003E00000
1365−0003E000000003E000000003E000000003E000000003E000000003E000000003E0000000
1366−03E000000003E000000003E000000003E000000003E000000003E000000003E000000003
1367−E000000003E000000003E000000003E000006003E000006003E000006003E000006003E0
1368−0000C003E00000C003E00000C003E00000C003E00001C003E00001C003E00003C003E000
1369−03C003E00007C003E0000F8003E0003F8007E000FF80FFFFFFFF80FFFFFFFF8023317DB0
1370−29>76 D<FFF00000007FF8FFF8000000FFF807F8000000FF0003F8000000FE00037C0000
1371−01BE00037C000001BE00037C000001BE00033E0000033E00033E0000033E00033E000003
1372−3E00031F0000063E00031F0000063E00031F0000063E00030F80000C3E00030F80000C3E
1373−00030F80000C3E000307C000183E000307C000183E000307C000183E000303E000303E00
1374−0303E000303E000303E000303E000301F000603E000301F000603E000301F000C03E0003
1375−00F800C03E000300F800C03E0003007C01803E0003007C01803E0003007C01803E000300
1376−3E03003E0003003E03003E0003003E03003E0003001F06003E0003001F06003E0003001F
1377−06003E0003000F8C003E0003000F8C003E0003000F8C003E00030007D8003E00030007D8
1378−003E00030007D8003E00030003F0003E00030003F0003E00030003F0003E00078001E000
1379−3E000FC001E0007F00FFFC01E00FFFF8FFFC00C00FFFF835317CB03D>I<FFFFFFE000FF
1380−FFFFFC0007E0007F0003E0000F8003E00007C003E00003E003E00001F003E00001F803E0
1381−0000F803E00000F803E00000FC03E00000FC03E00000FC03E00000FC03E00000FC03E000
1382−00FC03E00000F803E00000F803E00001F803E00001F003E00003E003E00007C003E0000F
1383−8003E0007F0003FFFFFC0003FFFFE00003E000000003E000000003E000000003E0000000
1384−03E000000003E000000003E000000003E000000003E000000003E000000003E000000003
1385−E000000003E000000003E000000003E000000003E000000003E000000003E000000003E0
1386−00000003E000000007F0000000FFFF800000FFFF80000026317DB02D>80
1387−D<FFFFFF000000FFFFFFF0000007E001FC000003E0003F000003E0000F800003E00007C0
1388−0003E00003E00003E00003F00003E00003F00003E00001F00003E00001F80003E00001F8
1389−0003E00001F80003E00001F80003E00001F80003E00001F00003E00003F00003E00003F0
1390−0003E00003E00003E00007C00003E0000F800003E0003F000003E001FC000003FFFFF000
1391−0003FFFFC0000003E001F0000003E0007C000003E0003E000003E0001F000003E0000F00
1392−0003E0000F800003E00007800003E00007C00003E00007C00003E00007C00003E00007C0
1393−0003E00007C00003E00007E00003E00007E00003E00007E00003E00007E00003E00007E0
1394−0003E00007E01803E00007F01803E00003F01803E00003F01807F00001F830FFFF8000F8
1395−70FFFF80007FE0000000000F802D327CB031>82 D<03FE00000FFFC0001E03E0003F00F0
1396−003F0078003F003C001E001C000C001E0000001E0000001E0000001E0000001E000001FE
1397−00003FFE0001FF1E0007F01E000F801E001F001E003E001E007C001E007C001E00F8001E
1398−0CF8001E0CF8001E0CF8003E0CF8003E0C7C007E0C3E00DF1C1F038FB80FFF07F003F803
1399−C01E1F7D9E21>97 D<001FF00000FFFC0001F01E0007C03F000F003F000F003F001E001E
1400−003C000C003C0000007C00000078000000F8000000F8000000F8000000F8000000F80000
1401−00F8000000F8000000F8000000F80000007C0000007C0000003C0000003E0001801E0001
1402−800F0003000F80070007C00E0001F81C0000FFF000001FC000191F7E9E1D>99
1403−D<003F800000FFE00003E0F80007803C000F001E001E001E001E000F003C000F007C000F
1404−007C000F8078000780F8000780FFFFFF80FFFFFF80F8000000F8000000F8000000F80000
1405−00F8000000F8000000780000007C0000003C0000003C0001801E0001800F0003000F8006
1406−0007C00E0001F0380000FFF000001FC000191F7E9E1D>101 D<0003F0000FF8003C3C00
1407−787E00F07E01E07E01E03C01C01803C00003C00003C00003C00003C00003C00003C00003
1408−C00003C00003C00003C000FFFFC0FFFFC003C00003C00003C00003C00003C00003C00003
1409−C00003C00003C00003C00003C00003C00003C00003C00003C00003C00003C00003C00003
1410−C00003C00003C00003C00003C00003C00003C00003C00007E0007FFF007FFF0017327FB1
1411−14>I<000000F0007F03F801FFCF1C03C1FC3C0780F83C0F0078181F007C001E003C003E
1412−003E003E003E003E003E003E003E003E003E003E003E003E003E001E003C001F007C000F
1413−0078000780F0000FC1E0000DFFC0001C7F000018000000180000001C0000001C0000001E
1414−0000000FFFF8000FFFFF0007FFFF800FFFFFC01E0007E0380001F07000007070000078E0
1415−000038E0000038E0000038E0000038E000003870000070780000F03C0001E01E0003C007
1416−C01F0001FFFC00003FE0001E2F7E9F21>I<0780000000FF80000000FF800000000F8000
1417−000007800000000780000000078000000007800000000780000000078000000007800000
1418−000780000000078000000007800000000780000000078000000007800000000780000000
1419−07800000000781FE00000787FF8000078E07C000079803E00007B001E00007E000F00007
1420−C000F00007C000F00007C000F000078000F000078000F000078000F000078000F0000780
1421−00F000078000F000078000F000078000F000078000F000078000F000078000F000078000
1422−F000078000F000078000F000078000F000078000F000078000F000078000F000078000F0
1423−000FC001F800FFFC1FFF80FFFC1FFF8021327EB125>I<0F001F801F801F801F800F0000
1424−00000000000000000000000000000000000000000007807F807F800F8007800780078007
1425−800780078007800780078007800780078007800780078007800780078007800780078007
1426−80078007800FC0FFF8FFF80D307EAF12>I<0780FF80FF800F8007800780078007800780
1427−078007800780078007800780078007800780078007800780078007800780078007800780
1428−078007800780078007800780078007800780078007800780078007800780078007800780
1429−078007800FC0FFFCFFFC0E327EB112>108 D<0781FE003FC000FF87FF80FFF000FF8E07
1430−C1C0F8000F9803E3007C0007B001E6003C0007E000FC001E0007C000F8001E0007C000F8
1431−001E0007C000F8001E00078000F0001E00078000F0001E00078000F0001E00078000F000
1432−1E00078000F0001E00078000F0001E00078000F0001E00078000F0001E00078000F0001E
1433−00078000F0001E00078000F0001E00078000F0001E00078000F0001E00078000F0001E00
1434−078000F0001E00078000F0001E00078000F0001E00078000F0001E00078000F0001E000F
1435−C001F8003F00FFFC1FFF83FFF0FFFC1FFF83FFF0341F7E9E38>I<0781FE0000FF87FF80
1436−00FF8E07C0000F9803E00007B001E00007E000F00007C000F00007C000F00007C000F000
1437−078000F000078000F000078000F000078000F000078000F000078000F000078000F00007
1438−8000F000078000F000078000F000078000F000078000F000078000F000078000F0000780
1439−00F000078000F000078000F000078000F000078000F0000FC001F800FFFC1FFF80FFFC1F
1440−FF80211F7E9E25>I<001FC00000FFF80001E03C0007800F000F0007801E0003C01E0003
1441−C03C0001E03C0001E0780000F0780000F0780000F0F80000F8F80000F8F80000F8F80000
1442−F8F80000F8F80000F8F80000F8F80000F8780000F07C0001F03C0001E03C0001E01E0003
1443−C01E0003C00F00078007C01F0001F07C0000FFF800001FC0001D1F7E9E21>I<0783E0FF
1444−8FF8FF9C7C0FB87C07F07C07E03807E00007C00007C00007C00007800007800007800007
1445−800007800007800007800007800007800007800007800007800007800007800007800007
1446−80000780000780000FC000FFFE00FFFE00161F7E9E19>114 D<00C00000C00000C00000
1447−C00000C00001C00001C00001C00003C00003C00007C0000FC0001FC000FFFFE0FFFFE003
1448−C00003C00003C00003C00003C00003C00003C00003C00003C00003C00003C00003C00003
1449−C00003C00003C00003C00003C03003C03003C03003C03003C03003C03003C03003C03001
1450−E06001E06000F0C0007F80001F00142C7FAB19>116 D<078000F000FF801FF000FF801F
1451−F0000F8001F000078000F000078000F000078000F000078000F000078000F000078000F0
1452−00078000F000078000F000078000F000078000F000078000F000078000F000078000F000
1453−078000F000078000F000078000F000078000F000078000F000078000F000078001F00007
1454−8001F000078003F000038007F00003C00EF00001F03CF80000FFF0FF80003FC0FF80211F
1455−7E9E25>I E end
1456−%%EndProlog
1457−%%BeginSetup
1458−%%Feature: *Resolution 300dpi
1459−TeXDict begin
1460−
1461−%%EndSetup
1462−%%Page: 1 1
1463−1 0 bop 108 381 a Ft(Reference)22 b(Man)n(ual)f(of)g(the)h(Programming)
1464−f(Language)g(Lua)g(2.2)99 508 y Fs(Rob)q(erto)c(Ierusalimsc)o(h)o(y)49
1465−b(Luiz)17 b(Henrique)e(de)h(Figueiredo)50 b(W)l(aldemar)17
1466−b(Celes)g(Filho)563 587 y Fr(roberto,lhf,celes)o(@icad)o(.puc-)o(rio.b)
1467−o(r)479 694 y Fs(Departamen)o(to)g(de)f(Inform\023)-24
1468−b(atica)17 b(|)f(PUC-Rio)763 795 y(No)o(v)o(em)o(b)q(er,)e(1995)842
1469−963 y Fq(Abstract)72 1039 y Fp(Lua)f(is)h(an)f(extension)i(programmi)o
1470−(ng)c(language)h(designed)j(to)e(b)q(e)i(used)f(as)g(a)f
1471−(con\014guration)g(language)g(for)72 1089 y(an)o(y)18
1472−b(program)f(that)h(needs)i(one.)31 b(This)19 b(do)q(cumen)o(t)e
1473−(describ)q(es)k(v)o(ersion)d(2.2)g(of)f(the)i(Lua)f(programming)72
1474−1138 y(language)d(and)g(the)h(API)g(that)g(allo)o(ws)e(in)o(teraction)i
1475−(b)q(et)o(w)o(een)h(Lua)e(programs)f(and)i(its)f(host)h(C)g(program.)72
1476−1188 y(It)e(also)f(presen)o(ts)j(some)d(examples)g(of)g(using)h(the)h
1477−(main)c(features)k(of)f(the)g(system.)881 1404 y Fq(Sum\023)-24
1478−b(ario)72 1471 y Fp(Lua)15 b(\023)-20 b(e)18 b(uma)d(linguagem)f(de)j
1479−(extens~)-21 b(ao)18 b(pro)r(jetada)f(para)f(ser)i(usada)f(como)e
1480−(linguagem)g(de)i(con\014gura\030)-18 b(c~)d(ao)72 1521
1481−y(em)12 b(qualquer)g(programa)e(que)j(precise)h(de)f(uma.)j(Este)e(do)q
1482−(cumen)o(to)d(descrev)o(e)k(a)d(v)o(ers~)-21 b(ao)13
1483−b(2.2)e(da)h(linguagem)72 1571 y(de)18 b(programa\030)-18
1484−b(c~)d(ao)16 b(Lua)i(e)g(a)g(In)o(terface)h(de)f(Programa\030)-18
1485−b(c~)d(ao)16 b(que)i(p)q(ermite)g(a)f(in)o(tera\030)-18
1486−b(c~)d(ao)18 b(en)o(tre)h(programas)72 1621 y(Lua)c(e)g(o)g(programa)e
1487−(C)h(hosp)q(edeiro.)22 b(O)15 b(do)q(cumen)o(to)g(tam)o(b)o(\023)-20
1488−b(em)12 b(apresen)o(ta)k(alguns)e(exemplos)g(de)i(uso)f(das)72
1489−1671 y(principais)f(caracter)-5 b(\023)-16 b(\020sticas)15
1490−b(do)f(sistema.)-42 1814 y Fo(1)67 b(In)n(tro)r(duction)-42
1491−1915 y Fn(Lua)18 b(is)f(an)g(extension)g(programmi)o(ng)d(language)j
1492−(designed)g(to)g(supp)q(ort)g(general)g(pro)q(cedural)g(programming)-42
1493−1972 y(features)k(with)f(data)g(description)g(facilities.)34
1494−b(It)21 b(is)f(supp)q(osed)i(to)e(b)q(e)h(used)h(as)e(a)g
1495−(con\014guration)g(language)-42 2028 y(for)d(an)o(y)f(program)f(that)i
1496−(needs)g(one.)26 b(Its)17 b(main)e(extensions)i(are)f(related)h(to)f
1497−(ob)s(ject-orien)o(ted)g(facilities,)f(and)-42 2085 y(fallbac)o(ks,)g
1498−(but)h(it)f(has)h(some)f(other)h(minor)e(con)o(tributions.)21
1499−b(Lua)16 b(has)g(b)q(een)h(designed)g(and)f(implemen)o(ted)e(b)o(y)-42
1500−2141 y(W.)h(Celes)g(F.,)f(L.)h(H.)g(de)h(Figueiredo)e(and)h(R.)h
1501−(Ierusalimsc)o(h)o(y)l(.)29 2197 y(Lua)c(is)f(implemen)o(ted)f(as)h(a)g
1502−(library)l(,)g(written)g(in)h(C.)f(Being)g(an)h(extension)g(language,)f
1503−(Lua)h(has)f(no)h(notion)f(of)-42 2254 y(a)h(\\main")d(program:)16
1504−b(it)10 b(only)h(w)o(orks)g Fm(emb)n(e)n(dde)n(d)f Fn(in)i(a)f(host)g
1505−(clien)o(t,)g(called)g(the)g Fm(emb)n(e)n(dding)f Fn(program.)17
1506−b(This)11 b(host)-42 2310 y(program)i(can)j(in)o(v)o(ok)o(e)e
1507−(functions)h(to)f(execute)i(a)f(piece)g(of)g(co)q(de)g(in)g(Lua,)g(can)
1508−h(write)e(and)h(read)g(Lua)h(v)m(ariables,)-42 2367 y(and)f(can)e
1509−(register)g(C)h(functions)f(to)h(b)q(e)g(called)g(b)o(y)f(Lua)h(co)q
1510−(de.)20 b(Through)14 b(the)g(use)g(of)g(C)f(functions,)h(Lua)g(can)g(b)
1511−q(e)-42 2423 y(augmen)o(ted)d(to)h(cop)q(e)g(with)f(rather)h
1512−(di\013eren)o(t)f(domains,)f(th)o(us)i(creating)f(customized)g
1513−(programmi)o(ng)e(languages)-42 2480 y(sharing)15 b(a)g(syn)o(tactical)
1514−e(framew)o(ork.)29 2536 y(Lua)f(is)e(free)i(distribution)e(soft)o(w)o
1515−(are,)g(and)h(pro)o(vided)g(as)g(usual)g(with)g(no)g(guaran)o(tees.)18
1516−b(The)11 b(implemen)o(tatio)o(n)-42 2593 y(describ)q(ed)17
1517−b(in)e(this)f(man)o(ual)g(is)g(a)o(v)m(ailable)g(b)o(y)h(anon)o(ymous)f
1518−(ftp)h(from)922 2748 y(1)p eop
1519−%%Page: 2 2
1520−2 1 bop 30 199 a Fl(ftp.icad.puc-rio.br:/pub/lu)o(a/lua-2)o(.2.tar.)o
1521−(gz)-42 293 y Fn(or)15 b(b)o(y)g(WWW)g(\(W)l(orld)f(Wide)h(W)l(eb\))g
1522−(from)30 387 y Fl(http://www.inf.puc-rio.br/~)o(roberto)o(/lua.ht)o(ml)
1523−-42 530 y Fo(2)67 b(En)n(vironmen)n(t)25 b(and)e(Mo)r(dules)-42
1524−632 y Fn(All)10 b(statemen)o(ts)e(in)i(Lua)h(are)f(executed)h(in)g(a)f
1525−Fm(glob)n(al)h(envir)n(onment)p Fn(.)17 b(This)9 b(en)o(vironmen)o(t,)h
1526−(whic)o(h)g(k)o(eeps)h(all)e(global)-42 688 y(v)m(ariables)14
1527−b(and)g(functions,)f(is)g(initialized)g(at)g(the)h(b)q(eginning)g(of)f
1528−(the)h(em)o(b)q(edding)f(program)f(and)i(p)q(ersists)f(un)o(til)-42
1529−744 y(its)i(end.)29 801 y(The)g(global)d(en)o(vironmen)o(t)h(can)h(b)q
1530−(e)h(manipulated)e(b)o(y)h(Lua)h(co)q(de)g(or)e(b)o(y)h(the)h(em)o(b)q
1531−(edding)f(program,)e(whic)o(h)-42 857 y(can)k(read)f(and)g(write)g
1532−(global)e(v)m(ariables)i(using)g(functions)g(in)g(the)g(library)f(that)
1533−h(implemen)o(ts)d(Lua.)29 914 y(Global)g(v)m(ariables)h(do)h(not)f
1534−(need)h(declaration.)k(An)o(y)c(v)m(ariable)f(is)g(assumed)g(to)g(b)q
1535−(e)h(global)e(unless)i(explicitly)-42 970 y(declared)20
1536−b(lo)q(cal)e(\(see)h(lo)q(cal)f(declarations,)h(Section)g(4.4.5\).)30
1537−b(Before)19 b(the)g(\014rst)g(assignmen)o(t,)e(the)j(v)m(alue)f(of)g(a)
1538−-42 1027 y(global)14 b(v)m(ariable)h(is)g Fk(nil)p Fn(.)29
1539−1083 y(The)g(unit)g(of)g(execution)h(of)e(Lua)i(is)f(called)f(a)h
1540−Fm(chunk)p Fn(.)20 b(The)15 b(syn)o(tax)g(for)f(c)o(h)o(unks)i(is:)1480
1541−1067 y Fj(1)42 1155 y Fm(chunk)50 b Fi(!)g(f)p Fm(statement)32
1542−b Fi(j)16 b Fm(function)s Fi(g)-42 1227 y Fn(A)f(c)o(h)o(unk)f(ma)o(y)e
1543−(con)o(tain)h(statemen)o(ts)f(and)i(function)g(de\014nitions,)g(and)g
1544−(ma)o(y)e(b)q(e)j(in)f(a)g(\014le)g(or)f(in)h(a)g(string)f(inside)-42
1545−1284 y(the)k(host)f(program.)22 b(When)17 b(a)g(c)o(h)o(unk)g(is)f
1546−(executed,)h(\014rst)g(all)e(its)h(functions)g(and)h(statemen)o(ts)e
1547−(are)h(compiled,)-42 1340 y(then)d(the)e(statemen)o(ts)f(are)i
1548−(executed)g(in)g(sequen)o(tial)f(order.)18 b(All)11 b(mo)q
1549−(di\014cations)f(a)i(c)o(h)o(unk)g(e\013ects)f(on)h(the)g(global)-42
1550−1397 y(en)o(vironmen)o(t)k(p)q(ersist)h(after)f(its)g(end.)27
1551−b(Those)17 b(include)g(mo)q(di\014cations)f(to)g(global)g(v)m(ariables)
1552−g(and)i(de\014nitions)-42 1453 y(of)d(new)h(functions)285
1553−1437 y Fj(2)303 1453 y Fn(.)-42 1596 y Fo(3)67 b(T)n(yp)r(es)-42
1554−1698 y Fn(Lua)14 b(is)g(a)f(dynamically)f(t)o(yp)q(ed)i(language.)k(V)l
1555−(ariables)13 b(do)h(not)f(ha)o(v)o(e)g(t)o(yp)q(es;)h(only)f(v)m(alues)
1556−h(do.)19 b(All)13 b(v)m(alues)h(carry)-42 1754 y(their)h(o)o(wn)g(t)o
1557−(yp)q(e.)20 b(Therefore,)15 b(there)g(are)g(no)g(t)o(yp)q(e)g
1558−(de\014nitions)g(in)g(the)g(language.)29 1811 y(There)20
1559−b(are)f(sev)o(en)h(basic)f(t)o(yp)q(es)h(in)g(Lua:)29
1560−b Fm(nil)p Fn(,)19 b Fm(numb)n(er)p Fn(,)h Fm(string)p
1561−Fn(,)g Fm(function)p Fn(,)g Fm(CF)m(unction)p Fn(,)e
1562−Fm(user)n(data)p Fn(,)j(and)-42 1867 y Fm(table)p Fn(.)f
1563−Fm(Nil)14 b Fn(is)g(the)g(t)o(yp)q(e)h(of)f(the)h(v)m(alue)g
1564−Fk(nil)p Fn(,)e(whose)h(main)f(prop)q(ert)o(y)h(is)h(to)e(b)q(e)j
1565−(di\013eren)o(t)d(from)g(an)o(y)h(other)h(v)m(alue.)-42
1566−1924 y Fm(Numb)n(er)h Fn(represen)o(ts)f(real)f(\(\015oating)g(p)q(oin)
1567−o(t\))g(n)o(um)o(b)q(ers,)h(while)f Fm(string)h Fn(has)g(the)g(usual)g
1568−(meaning.)29 1980 y(F)l(unctions)20 b(are)f(considered)i(\014rst-class)
1569−e(v)m(alues)h(in)g(Lua.)34 b(This)19 b(means)g(that)h(functions)f(can)h
1570−(b)q(e)h(stored)-42 2037 y(in)c(v)m(ariables,)g(passed)g(as)g(argumen)o
1571−(ts)f(to)g(other)h(functions)g(and)g(returned)h(as)e(results.)26
1572−b(When)17 b(a)g(function)g(is)-42 2093 y(de\014ned)g(in)d(Lua,)h(its)f
1573−(b)q(o)q(dy)i(is)e(compiled)f(and)i(stored)g(in)f(a)h(giv)o(en)f(v)m
1574−(ariable.)19 b(Lua)c(can)g(call)f(\(and)h(manipulate\))-42
1575−2150 y(functions)g(written)g(in)g(Lua)g(and)h(functions)f(written)f(in)
1576−h(C;)f(the)i(latter)e(ha)o(v)o(e)g(t)o(yp)q(e)i Fm(CF)m(unction)s
1577−Fn(.)29 2206 y(The)i(t)o(yp)q(e)f Fm(user)n(data)h Fn(is)g(pro)o(vided)
1578−f(to)g(allo)o(w)f(arbitrary)f(C)j(p)q(oin)o(ters)f(to)g(b)q(e)h(stored)
1579−f(in)g(Lua)h(v)m(ariables.)26 b(It)-42 2262 y(corresp)q(onds)18
1580−b(to)f Fl(void*)f Fn(and)i(has)f(no)g(pre-de\014ned)j(op)q(erations)c
1581−(in)h(Lua,)h(b)q(esides)g(assignmen)o(t)d(and)j(equalit)o(y)-42
1582−2319 y(test.)24 b(Ho)o(w)o(ev)o(er,)16 b(b)o(y)g(using)h(fallbac)o(ks,)
1583−e(the)i(programmer)c(ma)o(y)i(de\014ne)j(op)q(erations)e(for)g
1584−Fm(user)n(data)h Fn(v)m(alues;)g(see)-42 2375 y(Section)f(4.7.)29
1585−2432 y(The)c(t)o(yp)q(e)g Fm(table)g Fn(implemen)o(ts)d(asso)q(ciativ)o
1586−(e)i(arra)o(ys,)g(that)g(is,)h(arra)o(ys)e(whic)o(h)i(can)g(b)q(e)h
1587−(indexed)g(not)f(only)f(with)-42 2488 y(n)o(um)o(b)q(ers,)k(but)g(with)
1588−g(an)o(y)g(v)m(alue)h(\(except)f Fk(nil)p Fn(\).)20 b(Therefore,)15
1589−b(this)f(t)o(yp)q(e)i(ma)o(y)e(b)q(e)i(used)g(not)f(only)g(to)f
1590−(represen)o(t)p -42 2530 780 2 v 10 2557 a Fh(1)28 2573
1591−y Fg(As)e(usual,)i Ff(f)p Fe(a)s Ff(g)f Fg(means)h(0)f(or)g(more)g
1592−Fe(a)s Fg('s,)f([)p Fe(a)s Fg(])f(means)j(an)f(optional)j
1593−Fe(a)c Fg(and)i Ff(f)p Fe(a)s Ff(g)1179 2557 y Fh(+)1217
1594−2573 y Fg(means)f(one)h(or)f(more)g Fe(a)s Fg('s.)10
1595−2603 y Fh(2)28 2619 y Fg(Actually)m(,)h(a)f(function)h(de\014nition)i
1596−(is)d(an)h(assignmen)o(t)h(to)d(a)h(global)j(v)n(ariable;)e(see)f
1597−(Section)i(3.)922 2748 y Fn(2)p eop
1598−%%Page: 3 3
1599−3 2 bop -42 199 a Fn(ordinary)15 b(arra)o(ys,)e(but)i(also)f(sym)o(b)q
1600−(ol)g(tables,)g(sets,)g(records,)h(etc.)20 b(T)l(o)15
1601−b(represen)o(t)g(records,)f(Lua)i(uses)f(the)g(\014eld)-42
1602−256 y(name)k(as)f(an)h(index.)32 b(The)19 b(language)g(supp)q(orts)g
1603−(this)f(represen)o(tation)g(b)o(y)i(pro)o(viding)e Fl(a.name)g
1604−Fn(as)g(syn)o(tactic)-42 312 y(sugar)i(for)f Fl(a["name"])p
1605−Fn(.)33 b(T)l(ables)20 b(ma)o(y)e(also)h(carry)g(metho)q(ds.)34
1606−b(Because)20 b(functions)g(are)g(\014rst)f(class)h(v)m(alues,)-42
1607−369 y(table)d(\014elds)g(ma)o(y)e(con)o(tain)g(functions.)25
1608−b(The)16 b(form)f Fl(t:f\(x\))h Fn(is)g(syn)o(tactic)g(sugar)g(for)g
1609−Fl(t.f\(t,x\))p Fn(,)g(whic)o(h)g(calls)-42 425 y(the)g(metho)q(d)e
1610−Fl(f)h Fn(from)f(the)h(table)g Fl(t)g Fn(passing)f(itself)g(as)h(the)g
1611−(\014rst)g(parameter.)29 482 y(It)d(is)f(imp)q(ortan)o(t)e(to)i(notice)
1612−g(that)g(tables)g(are)g(ob)s(jects,)g(and)h(not)f(v)m(alues.)19
1613−b(V)l(ariables)10 b(cannot)i(con)o(tain)e(tables,)-42
1614−538 y(only)15 b(references)g(to)f(them.)19 b(Assignmen)o(t,)12
1615−b(parameter)h(passing)i(and)f(returns)h(alw)o(a)o(ys)e(manipulate)g
1616−(references)-42 594 y(to)k(tables,)f(and)i(do)f(not)f(imply)g(an)o(y)h
1617−(kind)g(of)f(cop)o(y)l(.)26 b(Moreo)o(v)o(er,)16 b(tables)g(m)o(ust)f
1618−(b)q(e)j(explicitly)e(created)h(b)q(efore)-42 651 y(used;)f(see)f
1619−(Section)g(4.5.7.)-42 794 y Fo(4)67 b(The)23 b(Language)-42
1620−895 y Fn(This)15 b(section)g(describ)q(es)h(the)f(lexis,)f(syn)o(tax)h
1621−(and)g(seman)o(tics)e(of)i(Lua.)-42 1017 y Fd(4.1)56
1622−b(Lexical)19 b(Con)n(v)n(en)n(tions)-42 1103 y Fn(Lua)g(is)e(a)g(case)h
1623−(sensitiv)o(e)f(language.)27 b(Iden)o(ti\014ers)18 b(can)g(b)q(e)g(an)o
1624−(y)f(string)g(of)g(letters,)h(digits,)e(and)i(underscores,)-42
1625−1159 y(not)d(b)q(eginning)h(with)e(a)h(digit.)k(The)c(follo)o(wing)e(w)
1626−o(ords)i(are)f(reserv)o(ed,)h(and)h(cannot)f(b)q(e)h(used)f(as)g(iden)o
1627−(ti\014ers:)173 1253 y Fl(and)143 b(do)191 b(else)142
1628−b(elseif)95 b(end)173 1309 y(function)23 b(if)191 b(local)118
1629−b(nil)167 b(not)173 1366 y(or)g(repeat)95 b(return)f(until)119
1630−b(then)95 b(while)29 1459 y Fn(The)15 b(follo)o(wing)e(strings)i
1631−(denote)g(other)g(tok)o(ens:)173 1552 y Fl(~=)48 b(<=)f(>=)h(<)71
1632−b(>)h(==)47 b(=)71 b(..)48 b(+)71 b(-)h(*)f(/)173 1609
1633−y(\045)h(\()f(\))h({)f(})h([)f(])g(;)h(,)f(.)29 1702
1634−y Fn(Literal)17 b(strings)f(can)i(b)q(e)g(delimited)e(b)o(y)i(matc)o
1635−(hing)d(single)i(or)g(double)h(quotes,)g(and)f(can)h(con)o(tain)f(the)h
1636−(C-)-42 1758 y(lik)o(e)i(escap)q(e)i(sequences)g Fl('\\n')p
1637−Fn(,)f Fl('\\t')f Fn(and)h Fl('\\r')p Fn(.)36 b(Literal)20
1638−b(strings)g(can)g(also)g(b)q(e)i(delimited)d(b)o(y)h(matc)o(hing)-42
1639−1815 y Fl([[)k(...)g(]])p Fn(.)18 b(Literals)12 b(in)h(this)f(last)g
1640−(form)f(ma)o(y)h(run)h(for)f(sev)o(eral)g(lines,)h(ma)o(y)e(con)o(tain)
1641−h(nested)i Fl([[)23 b(...)h(]])p Fn(,)12 b(and)-42 1871
1642−y(do)k(not)e(in)o(terpret)h(escap)q(e)h(sequences.)29
1643−1928 y(Commen)o(ts)c(start)h(an)o(ywhere)i(outside)g(a)f(string)g(with)
1644−g(a)g(double)h(h)o(yphen)h(\()p Fl(--)p Fn(\))e(and)h(run)g(un)o(til)f
1645−(the)g(end)i(of)-42 1984 y(the)g(line.)29 2041 y(Numerical)h(constan)o
1646−(ts)g(ma)o(y)f(b)q(e)j(written)e(with)h(an)g(optional)e(decimal)h
1647−(part,)h(and)g(an)g(optional)f(decimal)-42 2097 y(exp)q(onen)o(t.)k
1648−(Examples)14 b(of)g(v)m(alid)h(n)o(umerical)f(constan)o(ts)g(are:)126
1649−2190 y Fl(4)119 b(4.)g(.4)g(4.57e-3)f(.3e12)-42 2312
1650−y Fd(4.2)56 b(Co)r(ercion)-42 2398 y Fn(Lua)19 b(pro)o(vides)f(some)f
1651−(automatic)f(con)o(v)o(ersions.)29 b(An)o(y)19 b(arithmetic)d(op)q
1652−(eration)i(applied)g(to)g(a)g(string)f(tries)h(to)-42
1653−2454 y(con)o(v)o(ert)d(that)f(string)g(to)h(a)f(n)o(um)o(b)q(er,)g
1654−(follo)o(wing)f(the)i(usual)g(rules.)20 b(Con)o(v)o(ersely)l(,)14
1655−b(whenev)o(er)h(a)g(n)o(um)o(b)q(er)f(is)h(used)-42 2511
1656−y(when)h(a)f(string)f(is)h(exp)q(ected,)h(that)e(n)o(um)o(b)q(er)h(is)g
1657−(con)o(v)o(erted)g(to)f(a)h(string,)f(according)h(to)f(the)h(follo)o
1658−(wing)e(rule:)20 b(if)-42 2567 y(the)13 b(n)o(um)o(b)q(er)g(is)f(an)h
1659−(in)o(teger,)f(it)g(is)g(written)g(without)g(exp)q(onen)o(t)h(or)f
1660−(decimal)f(p)q(oin)o(t;)i(otherwise,)f(it)g(is)h(formatted)-42
1661−2623 y(follo)o(wing)g(the)j(\\)p Fl(\045g)p Fn(")e(con)o(v)o(ersion)g
1662−(sp)q(eci\014cation)h(of)g(the)h(standard)e Fl(printf)h
1663−Fn(C)g(function.)922 2748 y(3)p eop
1664−%%Page: 4 4
1665−4 3 bop -42 199 a Fd(4.3)56 b(Adjustmen)n(t)-42 285 y
1666−Fn(F)l(unctions)14 b(in)g(Lua)h(can)f(return)g(man)o(y)f(v)m(alues.)19
1667−b(Because)c(there)f(are)g(no)g(t)o(yp)q(e)h(declarations,)d(the)i
1668−(system)f(do)q(es)-42 342 y(not)18 b(kno)o(w)f(ho)o(w)g(man)o(y)f(v)m
1669−(alues)i(a)g(function)f(will)g(return,)g(or)h(ho)o(w)f(man)o(y)f
1670−(parameters)g(it)h(needs.)28 b(Therefore,)-42 398 y(sometimes,)10
1671−b(a)i(list)g(of)g(v)m(alues)h(m)o(ust)e(b)q(e)i Fm(adjuste)n(d)5
1672−b Fn(,)13 b(at)f(run)g(time,)f(to)h(a)h(giv)o(en)f(length.)18
1673−b(If)13 b(there)g(are)f(more)f(v)m(alues)-42 454 y(than)17
1674−b(are)f(needed,)i(the)f(last)f(v)m(alues)h(are)f(thro)o(wn)g(a)o(w)o(a)
1675−o(y)l(.)23 b(If)17 b(there)g(are)f(more)g(needs)h(than)g(v)m(alues,)g
1676−(the)f(list)g(is)-42 511 y(extended)j(with)e(as)h(man)o(y)e
1677−Fk(nil)p Fn('s)h(as)g(needed.)29 b(Adjustmen)o(t)17 b(o)q(ccurs)h(in)f
1678−(m)o(ultiple)f(assignmen)o(t)g(and)i(function)-42 567
1679−y(calls.)-42 689 y Fd(4.4)56 b(Statemen)n(ts)-42 775
1680−y Fn(Lua)19 b(supp)q(orts)f(an)f(almost)f(con)o(v)o(en)o(tional)g(set)i
1681−(of)f(statemen)o(ts.)26 b(The)18 b(con)o(v)o(en)o(tional)e(commands)f
1682−(include)k(as-)-42 831 y(signmen)o(t,)d(con)o(trol)f(structures)i(and)g
1683−(pro)q(cedure)h(calls.)24 b(Non-con)o(v)o(en)o(tional)16
1684−b(commands)e(include)k(table)e(con-)-42 888 y(structors,)e(explained)i
1685−(in)f(Section)g(4.5.7,)e(and)i(lo)q(cal)g(v)m(ariable)f(declarations.)
1686−-42 1008 y Fk(4.4.1)52 b(Blo)q(c)o(ks)-42 1094 y Fn(A)15
1687−b(blo)q(c)o(k)f(is)f(a)h(list)f(of)h(statemen)o(ts,)e(executed)j
1688−(sequen)o(tially)l(.)k(An)o(y)14 b(statemen)o(t)e(can)j(b)q(e)g
1689−(optionally)d(follo)o(w)o(ed)h(b)o(y)-42 1150 y(a)i(semicolon.)42
1690−1209 y Fm(blo)n(ck)49 b Fi(!)h(f)p Fm(stat)16 b(sc)s
1691−Fi(g)g Fn([)p Fm(r)n(et)f(sc)s Fn(])98 1266 y Fm(sc)49
1692−b Fi(!)h Fn([';'])-42 1334 y(F)l(or)13 b(syn)o(tactic)f(reasons,)g(a)h
1693−(return)g(statemen)o(t)e(can)i(only)g(b)q(e)g(written)f(as)h(the)g
1694−(last)f(statemen)o(t)f(of)h(a)h(blo)q(c)o(k.)19 b(This)-42
1695−1391 y(restriction)14 b(also)g(a)o(v)o(oids)g(some)g(\\statemen)o(t)f
1696−(not)i(reac)o(hed")g(errors.)-42 1511 y Fk(4.4.2)52 b(Assignmen)o(t)-42
1697−1597 y Fn(The)18 b(language)e(allo)o(ws)f(m)o(ultiple)g(assignmen)o(t.)
1698−23 b(Therefore,)17 b(the)g(syn)o(tax)g(de\014nes)h(a)f(list)e(of)i(v)m
1699−(ariables)f(on)h(the)-42 1653 y(left)h(side,)g(and)h(a)e(list)g(of)h
1700−(expressions)g(on)g(the)g(righ)o(t)f(side.)29 b(Both)18
1701−b(lists)f(ha)o(v)o(e)g(their)h(elemen)o(ts)f(separated)h(b)o(y)-42
1702−1709 y(commas.)116 1769 y Fm(stat)50 b Fi(!)g Fm(varlist1)16
1703−b Fn('=')g Fm(explist1)42 1825 y(varlist1)50 b Fi(!)g
1704−Fm(var)17 b Fi(f)p Fn(',')d Fm(var)5 b Fi(g)-42 1894
1705−y Fn(This)15 b(statemen)o(t)d(\014rst)i(ev)m(aluates)g(all)g(v)m(alues)
1706−g(on)h(the)f(righ)o(t)g(side)g(and)h(ev)o(en)o(tual)f(indices)g(on)h
1707−(the)f(left)g(side,)g(and)-42 1950 y(then)i(mak)o(es)e(the)h(assignmen)
1708−o(ts.)j(Therefore,)c(it)h(can)g(b)q(e)h(used)g(to)e(exc)o(hange)i(t)o
1709−(w)o(o)e(v)m(alues,)h(as)f(in)30 2044 y Fl(x,)24 b(y)f(=)h(y,)g(x)-42
1710−2138 y Fn(Before)f(the)g(assignmen)o(t,)f(the)g(list)f(of)i(v)m(alues)f
1711−(is)g Fm(adjuste)n(d)h Fn(to)f(the)h(length)f(of)g(the)h(list)e(of)h(v)
1712−m(ariables;)j(see)-42 2194 y(Section)16 b(4.3.)42 2266
1713−y Fm(var)50 b Fi(!)g Fm(name)-42 2338 y Fn(A)16 b(single)e(name)g(can)i
1714−(denote)f(a)g(global)f(or)h(a)g(lo)q(cal)f(v)m(ariable,)g(or)h(a)g
1715−(formal)d(parameter.)42 2410 y Fm(var)50 b Fi(!)g Fm(var)17
1716−b Fn('[')e Fm(exp1)i Fn(']')-42 2483 y(Square)j(brac)o(k)o(ets)f(are)h
1717−(used)g(to)f(index)h(a)f(table.)33 b(If)20 b Fl(var)f
1718−Fn(results)g(in)g(a)h(table)f(v)m(alue,)h(the)g(\014eld)g(indexed)h(b)o
1719−(y)-42 2539 y(the)c(expression)f(v)m(alue)h(gets)f(the)h(assigned)f(v)m
1720−(alue.)24 b(Otherwise,)16 b(the)h(fallbac)o(k)e Fm(settable)h
1721−Fn(is)g(called,)g(with)f(three)922 2748 y(4)p eop
1722−%%Page: 5 5
1723−5 4 bop -42 199 a Fn(parameters:)31 b(the)22 b(v)m(alue)f(of)g
1724−Fl(var)p Fn(,)h(the)g(v)m(alue)g(of)f(expression,)h(and)g(the)f(v)m
1725−(alue)h(b)q(eing)g(assigned)f(to)g(it;)i(see)-42 256
1726−y(Section)16 b(4.7.)42 328 y Fm(var)50 b Fi(!)g Fm(var)17
1727−b Fn('.')j Fm(name)-42 400 y Fn(The)c(syn)o(tax)e Fl(var.NAME)g
1728−Fn(is)h(just)g(syn)o(tactic)f(sugar)h(for)f Fl(var["NAME"])p
1729−Fn(.)-42 520 y Fk(4.4.3)52 b(Con)o(trol)17 b(Structures)-42
1730−606 y Fn(The)k(condition)e(expression)h(of)f(a)h(con)o(trol)e
1731−(structure)i(can)g(return)g(an)o(y)g(v)m(alue.)34 b(All)19
1732−b(v)m(alues)h(di\013eren)o(t)f(from)-42 662 y Fk(nil)f
1733−Fn(are)g(considered)g(true,)h(while)f Fk(nil)f Fn(is)h(considered)h
1734−(false.)28 b Fl(if)p Fn('s,)18 b Fl(while)p Fn('s)f(and)h
1735−Fl(repeat)p Fn('s)f(ha)o(v)o(e)h(the)h(usual)-42 719
1736−y(meaning.)70 787 y Fm(stat)50 b Fi(!)g Fk(while)15 b
1737−Fm(exp1)i Fk(do)f Fm(blo)n(ck)g Fk(end)245 843 y Fi(j)32
1738−b Fk(rep)q(eat)17 b Fm(blo)n(ck)f Fk(un)o(til)f Fm(exp1)245
1739−900 y Fi(j)32 b Fk(if)16 b Fm(exp1)h Fk(then)g Fm(blo)n(ck)e
1740−Fi(f)p Fm(elseif)8 b Fi(g)16 b Fn([)p Fk(else)f Fm(blo)n(ck)5
1741−b Fn(])15 b Fk(end)42 956 y Fm(elseif)49 b Fi(!)h Fk(elseif)15
1742−b Fm(exp1)i Fk(then)f Fm(blo)n(ck)29 1049 y Fn(A)g Fl(return)g
1743−Fn(is)g(used)g(to)g(return)g(v)m(alues)h(from)d(a)i(function.)23
1744−b(Because)17 b(a)f(function)g(ma)o(y)f(return)h(more)f(than)-42
1745−1106 y(one)h(v)m(alue,)f(the)g(syn)o(tax)g(for)f(a)h(return)g(statemen)
1746−o(t)e(is:)42 1178 y Fm(r)n(et)50 b Fi(!)g Fk(return)16
1747−b Fm(explist)-42 1370 y Fk(4.4.4)52 b(Expressions)16
1748−b(as)h(Statemen)o(ts)-42 1456 y Fn(All)h(expressions)h(with)f(p)q
1749−(ossible)g(side-e\013ects)h(can)f(b)q(e)i(executed)f(as)g(statemen)o
1750−(ts.)28 b(These)19 b(include)g(function)-42 1512 y(calls)c(and)g(table)
1751−g(constructors:)42 1572 y Fm(stat)50 b Fi(!)g Fm(functionc)n(al)r(l)42
1752−1628 y(stat)g Fi(!)g Fm(table)n(c)n(onstructor)-42 1697
1753−y Fn(Ev)o(en)o(tual)14 b(returned)h(v)m(alues)g(are)g(thro)o(wn)f(a)o
1754−(w)o(a)o(y)l(.)k(F)l(unction)c(calls)g(are)h(explained)f(in)h(Section)f
1755−(4.5.8;)f(construc-)-42 1753 y(tors)i(are)g(the)g(sub)s(ject)g(of)g
1756−(Section)g(4.5.7.)-42 1873 y Fk(4.4.5)52 b(Lo)q(cal)19
1757−b(Declarations)-42 1959 y Fn(Lo)q(cal)e(v)m(ariables)e(can)h(b)q(e)h
1758−(declared)f(an)o(ywhere)g(inside)g(a)g(blo)q(c)o(k.)22
1759−b(Their)16 b(scop)q(e)h(b)q(egins)f(after)f(the)i(declaration)-42
1760−2015 y(and)f(lasts)e(un)o(til)g(the)i(end)f(of)g(the)g(blo)q(c)o(k.)20
1761−b(The)15 b(declaration)f(ma)o(y)g(include)i(an)f(initial)e(assignmen)o
1762−(t:)92 2083 y Fm(stat)50 b Fi(!)g Fk(lo)q(cal)17 b Fm(de)n(clist)e
1763−Fn([)p Fm(init)t Fn(])42 2140 y Fm(de)n(clist)49 b Fi(!)h
1764−Fm(name)16 b Fi(f)p Fn(',')f Fm(name)s Fi(g)96 2196 y
1765−Fm(init)49 b Fi(!)h Fn('=')16 b Fm(explist1)-42 2265
1766−y Fn(If)f(there)f(is)f(an)h(initial)e(assignmen)o(t,)g(it)h(has)h(the)g
1767−(same)f(seman)o(tics)f(of)h(a)h(m)o(ultiple)e(assignmen)o(t.)17
1768−b(Otherwise,)d(all)-42 2321 y(v)m(ariables)h(are)g(initialized)e(with)i
1769−Fk(nil)p Fn(.)-42 2443 y Fd(4.5)56 b(Expressions)-42
1770−2529 y Fk(4.5.1)c(Simple)15 b(Expressions)-42 2614 y
1771−Fn(Simple)f(expressions)h(are:)922 2748 y(5)p eop
1772−%%Page: 6 6
1773−6 5 bop 42 193 a Fm(exp)50 b Fi(!)g Fn('\(')16 b Fm(exp)g
1774−Fn('\)')42 250 y Fm(exp)50 b Fi(!)g Fk(nil)42 306 y Fm(exp)g
1775−Fi(!)g Fn('n)o(um)o(b)q(er')42 362 y Fm(exp)g Fi(!)g
1776−Fn('literal')42 419 y Fm(exp)g Fi(!)g Fm(var)-42 490
1777−y Fn(Num)o(b)q(ers)22 b(\(n)o(umerical)f(constan)o(ts\))g(and)i(string)
1778−f(literals)f(are)h(explained)h(in)f(Section)h(4.1.)41
1779−b(V)l(ariables)22 b(are)-42 546 y(explained)16 b(in)f(Section)g(4.4.2.)
1780−-42 665 y Fk(4.5.2)52 b(Arithmetic)15 b(Op)q(erators)-42
1781−751 y Fn(Lua)21 b(supp)q(orts)g(the)g(usual)f(arithmetic)e(op)q
1782−(erators.)35 b(These)21 b(op)q(erators)f(are)g(the)g(binary)h
1783−Fl(+)p Fn(,)g Fl(-)p Fn(,)g Fl(*)p Fn(,)h Fl(/)e Fn(and)h
1784−Fl(^)-42 808 y Fn(\(exp)q(onen)o(tiation\),)15 b(and)h(the)g(unary)g
1785−Fl(-)p Fn(.)22 b(If)16 b(the)g(op)q(erands)g(are)g(n)o(um)o(b)q(ers,)f
1786−(or)g(strings)g(that)g(can)h(b)q(e)h(con)o(v)o(erted)-42
1787−864 y(to)d(n)o(um)o(b)q(ers,)g(according)g(to)g(the)g(rules)g(giv)o(en)
1788−g(in)h(Section)f(4.2,)f(all)h(op)q(erations)f(but)i(exp)q(onen)o
1789−(tiation)e(ha)o(v)o(e)h(the)-42 920 y(usual)f(meaning.)18
1790−b(Otherwise,)13 b(the)g(fallbac)o(k)f(\\arith")g(is)g(called;)h(see)g
1791−(Section)g(4.7.)19 b(An)13 b(exp)q(onen)o(tiation)f(alw)o(a)o(ys)-42
1792−977 y(calls)k(this)f(fallbac)o(k.)22 b(The)16 b(standard)g
1793−(mathematical)c(library)j(rede\014nes)j(this)d(fallbac)o(k,)g(giving)g
1794−(the)h(exp)q(ected)-42 1033 y(meaning)e(to)h(exp)q(onen)o(tiation;)f
1795−(see)h(Section)g(6.3.)-42 1152 y Fk(4.5.3)52 b(Relational)18
1796−b(Op)q(erators)-42 1238 y Fn(Lua)e(o\013ers)e(the)i(follo)o(wing)d
1797−(relational)g(op)q(erators:)126 1327 y Fl(<)71 b(>)g(<=)48
1798−b(>=)f(~=)h(==)-42 1415 y Fn(All)15 b(return)g Fk(nil)f
1799−Fn(as)h(false)g(and)g(1)g(as)g(true.)29 1472 y(Equalit)o(y)g(\014rst)h
1800−(compares)f(the)i(t)o(yp)q(es)f(of)h(its)e(op)q(erands.)24
1801−b(If)17 b(they)g(are)f(di\013eren)o(t,)g(the)g(result)g(is)g
1802−Fk(nil)p Fn(.)23 b(Oth-)-42 1528 y(erwise,)18 b(their)f(v)m(alues)h
1803−(are)g(compared.)26 b(Num)o(b)q(ers)17 b(and)h(strings)f(are)h
1804−(compared)e(in)i(the)g(usual)f(w)o(a)o(y)l(.)27 b(T)l(ables,)-42
1805−1585 y(CF)l(unctions,)14 b(and)g(functions)g(are)g(compared)f(b)o(y)h
1806−(reference,)h(that)e(is,)h(t)o(w)o(o)e(tables)i(are)g(considered)g
1807−(equal)g(only)-42 1641 y(if)h(they)g(are)g(the)h(same)d(table.)20
1808−b(The)15 b(op)q(erator)g Fl(~=)f Fn(is)h(exactly)g(the)g(negation)f(of)
1809−h(equalit)o(y)f(\()p Fl(=)p Fn(\).)29 1698 y(The)19 b(other)g(op)q
1810−(erators)f(w)o(ork)g(as)g(follo)o(ws.)29 b(If)19 b(b)q(oth)g(argumen)o
1811−(ts)e(are)i(n)o(um)o(b)q(ers,)f(they)h(are)g(compared)f(as)-42
1812−1754 y(suc)o(h.)27 b(Otherwise,)17 b(if)g(b)q(oth)g(argumen)o(ts)f(can)
1813−h(b)q(e)h(con)o(v)o(erted)f(to)g(strings,)f(their)h(v)m(alues)g(are)g
1814−(compared)g(using)-42 1811 y(lexicographical)d(order.)20
1815−b(Otherwise,)14 b(the)i(fallbac)o(k)d(\\order")i(is)g(called;)f(see)h
1816−(Section)h(4.7.)-42 1930 y Fk(4.5.4)52 b(Logical)18 b(Op)q(erators)-42
1817−2016 y Fn(All)f(logical)f(op)q(erators,)g(lik)o(e)h(con)o(trol)f
1818−(structures,)h(consider)g Fk(nil)g Fn(as)g(false)g(and)g(an)o(ything)g
1819−(else)g(as)g(true.)26 b(The)-42 2072 y(logical)14 b(op)q(erators)g
1820−(are:)269 2161 y Fl(and)71 b(or)g(not)-42 2249 y Fn(The)17
1821−b(op)q(erators)f Fl(and)g Fn(and)h Fl(or)f Fn(use)h(short-cut)f(ev)m
1822−(aluation,)g(that)g(is,)g(the)h(second)g(op)q(erand)g(is)f(ev)m
1823−(aluated)h(only)-42 2306 y(if)e(necessary)l(.)-42 2425
1824−y Fk(4.5.5)52 b(Concatenation)-42 2511 y Fn(Lua)18 b(o\013ers)d(a)i
1825−(string)f(concatenation)g(op)q(erator,)f(denoted)j(b)o(y)e(\\)p
1826−Fl(..)p Fn(".)24 b(If)17 b(op)q(erands)g(are)g(strings)e(or)i(n)o(um)o
1827−(b)q(ers,)-42 2567 y(they)c(are)g(con)o(v)o(erted)f(to)g(strings)g
1828−(according)g(to)g(the)h(rules)f(in)h(Section)f(4.2.)18
1829−b(Otherwise,)13 b(the)g(fallbac)o(k)e(\\concat")-42 2623
1830−y(is)k(called;)g(see)g(Section)g(4.7.)922 2748 y(6)p
1831−eop
1832−%%Page: 7 7
1833−7 6 bop -42 199 a Fk(4.5.6)52 b(Precedence)-42 285 y
1834−Fn(Op)q(erator)15 b(precedence)i(follo)o(ws)d(the)h(table)g(b)q(elo)o
1835−(w,)f(from)f(the)j(lo)o(w)o(er)d(to)i(the)g(higher)g(priorit)o(y:)269
1836−379 y Fl(and)71 b(or)269 435 y(<)g(>)h(<=)47 b(>=)h(~=)f(=)269
1837−492 y(..)269 548 y(+)71 b(-)269 605 y(*)g(/)269 661 y(not)47
1838−b(-)24 b(\(unary\))269 718 y(^)-42 811 y Fn(All)15 b(binary)g(op)q
1839−(erators)f(are)h(left)f(asso)q(ciativ)o(e,)g(except)h(for)g
1840−Fl(^)p Fn(,)g(whic)o(h)g(is)f(righ)o(t)g(asso)q(ciativ)o(e.)-42
1841−931 y Fk(4.5.7)52 b(T)l(able)18 b(Constructors)-42 1017
1842−y Fn(T)l(able)d(constructors)f(are)h(expressions)g(that)f(create)h
1843−(tables;)f(ev)o(ery)h(time)e(a)i(constructor)f(is)h(ev)m(aluated,)g(a)f
1844−(new)-42 1074 y(table)f(is)g(created.)19 b(Constructors)12
1845−b(can)h(b)q(e)h(used)g(to)e(create)h(empt)o(y)f(tables,)g(or)h(to)g
1846−(create)g(a)f(table)h(and)g(initialize)-42 1130 y(some)h(\014elds.)29
1847−1187 y(The)h(general)g(syn)o(tax)g(for)f(constructors)h(is:)42
1848−1255 y Fm(table)n(c)n(onstructor)49 b Fi(!)i Fn(')p Fi(f)p
1849−Fn(')15 b Fm(\014eld)r(list)g Fn(')p Fi(g)p Fn(')212
1850−1311 y Fm(\014eld)r(list)48 b Fi(!)j Fm(l\014eld)r(list)31
1851−b Fi(j)16 b Fm(\016eld)r(list)31 b Fi(j)16 b Fm(l\014eld)r(list)f
1852−Fn(';')g Fm(\016eld)r(list)200 1368 y(l\014eld)r(list)48
1853−b Fi(!)j Fn([)p Fm(l\014eld)r(list1)6 b Fn(])197 1424
1854−y Fm(\016eld)r(list)49 b Fi(!)i Fn([)p Fm(\016eld)r(list1)6
1855−b Fn(])29 1517 y(The)15 b(form)f Fm(l\014eld)r(list1)g
1856−Fn(is)h(used)g(to)g(initialize)e(lists.)42 1589 y Fm(l\014eld)r(list1)
1857−49 b Fi(!)h Fm(exp)16 b Fi(f)p Fn(',')f Fm(exp)s Fi(g)h
1858−Fn([','])-42 1662 y(The)i(expressions)f(in)g(the)g(list)f(are)h
1859−(assigned)g(to)g(consecutiv)o(e)g(n)o(umerical)f(indexes,)h(starting)f
1860−(with)h(1.)25 b(As)18 b(an)-42 1718 y(example:)30 1812
1861−y Fl(a)24 b(=)g({"v1",)f("v2",)g(34})-42 1906 y Fn(is)15
1862−b(equiv)m(alen)o(t)g(to:)30 2000 y Fl(temp)23 b(=)h({})30
1863−2056 y(temp[1])f(=)h("v1")30 2112 y(temp[2])f(=)h("v2")30
1864−2169 y(temp[3])f(=)h(34)30 2225 y(a)g(=)g(temp)29 2319
1865−y Fn(The)15 b(next)h(form)d(initializes)g(named)i(\014elds)g(in)g(a)g
1866−(table.)42 2378 y Fm(\016eld)r(list1)50 b Fi(!)g Fm(\016eld)16
1867−b Fi(f)p Fn(',')f Fm(\016eld)5 b Fi(g)15 b Fn([','])127
1868−2435 y Fm(\016eld)50 b Fi(!)g Fm(name)16 b Fn('=')g Fm(exp)-42
1869−2503 y Fn(As)g(an)f(example:)30 2597 y Fl(a)24 b(=)g({x)f(=)h(1,)f(y)h
1870−(=)g(3})922 2748 y Fn(7)p eop
1871−%%Page: 8 8
1872−8 7 bop -42 199 a Fn(is)15 b(equiv)m(alen)o(t)g(to:)30
1873−293 y Fl(temp)23 b(=)h({})30 350 y(temp.x)f(=)h(1)30
1874−406 y(temp.y)f(=)h(3)30 462 y(a)g(=)g(temp)-42 582 y
1875−Fk(4.5.8)52 b(F)l(unction)18 b(Calls)-42 668 y Fn(A)e(function)f(call)f
1876−(has)h(the)g(follo)o(wing)e(syn)o(tax:)42 740 y Fm(functionc)n(al)r(l)
1877−49 b Fi(!)h Fm(var)17 b(r)n(e)n(alPar)n(ams)-42 813 y
1878−Fn(Here,)i Fl(var)e Fn(can)h(b)q(e)h(an)o(y)e(v)m(ariable)h(\(global,)e
1879−(lo)q(cal,)i(indexed,)g(etc\).)28 b(If)18 b(its)f(t)o(yp)q(e)h(is)g
1880−Fm(function)j Fn(or)c Fm(CF)m(unction)s Fn(,)-42 869
1881−y(this)g(function)g(is)f(called.)25 b(Otherwise,)17 b(the)g(fallbac)o
1882−(k)f(\\function")g(is)h(called,)g(ha)o(ving)f(as)g(\014rst)h(parameter)
1883−e(the)-42 925 y(v)m(alue)h(of)f Fl(var)p Fn(,)f(and)h(then)h(the)f
1884−(original)f(call)g(parameters.)29 982 y(The)h(form:)42
1885−1054 y Fm(functionc)n(al)r(l)49 b Fi(!)h Fm(var)17 b
1886−Fn(':')j Fm(name)c(r)n(e)n(alPar)n(ams)-42 1126 y Fn(can)g(b)q(e)g
1887−(used)f(to)g(call)f(\\metho)q(ds".)19 b(A)c(call)f Fl(var:name\(...\))g
1888−Fn(is)g(syn)o(tactic)h(sugar)f(for)6 1220 y Fl(var.name\(var,)22
1889−b(...\))-42 1314 y Fn(except)16 b(that)f Fl(var)f Fn(is)h(ev)m(aluated)
1890−g(only)g(once.)42 1382 y Fm(r)n(e)n(alPar)n(ams)49 b
1891−Fi(!)h Fn('\(')16 b([)p Fm(explist1)6 b Fn(])15 b('\)')42
1892−1438 y Fm(r)n(e)n(alPar)n(ams)49 b Fi(!)h Fm(table)n(c)n(onstructor)115
1893−1495 y(explist1)f Fi(!)h Fm(exp1)17 b Fi(f)p Fn(',')e
1894−Fm(exp1)6 b Fi(g)-42 1563 y Fn(All)18 b(argumen)o(t)e(expressions)i
1895−(are)g(ev)m(aluated)g(b)q(efore)g(the)h(call;)f(then)g(the)g(list)f(of)
1896−h(argumen)o(ts)e(is)i(adjusted)g(to)-42 1620 y(the)j(length)f(of)f(the)
1897−h(list)f(of)h(parameters)e(\(see)j(Section)f(4.3\);)h(\014nally)l(,)f
1898−(this)g(list)f(is)g(assigned)h(to)g(the)g(formal)-42
1899−1676 y(parameters.)g(A)15 b(call)g(of)g(the)h(form)e
1900−Fl(f{...})h Fn(is)g(syn)o(tactic)f(sugar)h(for)g Fl(f\({...}\))p
1901−Fn(,)f(that)h(is,)g(the)h(parameter)e(list)-42 1732 y(is)h(a)g(single)g
1902−(new)g(table.)29 1789 y(Because)h(a)f(function)h(can)g(return)f(an)o(y)
1903−g(n)o(um)o(b)q(er)g(of)g(results)g(\(see)h(Section)f(4.4.3\),)e(the)j
1904−(n)o(um)o(b)q(er)f(of)g(results)-42 1845 y(m)o(ust)c(b)q(e)i(adjusted)f
1905−(b)q(efore)h(used.)19 b(If)13 b(the)f(function)g(is)g(called)f(as)h(an)
1906−g(statemen)o(t)e(\(see)j(Section)f(4.4.4\),)e(its)h(return)-42
1907−1902 y(list)18 b(is)h(adjusted)g(to)g(0.)31 b(If)20 b(the)f(function)g
1908−(is)g(called)g(in)g(a)g(place)g(that)f(needs)i(a)f(single)f(v)m(alue)i
1909−(\(syn)o(tactically)-42 1958 y(denoted)f(b)o(y)f(the)g(non-terminal)e
1910−Fl(exp1)p Fn(\),)h(its)g(return)h(list)f(is)g(adjusted)h(to)g(1.)27
1911−b(If)18 b(the)g(function)g(is)g(called)f(in)h(a)-42 2015
1912−y(place)f(that)g(can)g(hold)g(man)o(y)e(v)m(alues)i(\(syn)o(tactically)
1913−e(denoted)j(b)o(y)f(the)g(non-terminal)e Fl(exp)p Fn(\),)h(no)h
1914−(adjustmen)o(t)-42 2071 y(is)e(done.)-42 2193 y Fd(4.6)56
1915−b(F)-5 b(unction)20 b(De\014nitions)-42 2279 y Fn(F)l(unctions)15
1916−b(in)f(Lua)g(can)h(b)q(e)g(de\014ned)h(an)o(ywhere)e(in)g(the)g(global)
1917−f(lev)o(el)h(of)g(a)g(mo)q(dule.)19 b(The)14 b(syn)o(tax)g(for)g
1918−(function)-42 2335 y(de\014nition)i(is:)42 2407 y Fm(function)50
1919−b Fi(!)g Fk(function)16 b Fm(var)h Fn('\(')e([)p Fm(p)n(arlist1)6
1920−b Fn(])16 b('\)')f Fm(blo)n(ck)g Fk(end)29 2536 y Fn(When)f(Lua)g
1921−(pre-compiles)f(a)g(c)o(h)o(unk,)h(all)f(its)f(function)i(b)q(o)q(dies)
1922−g(are)f(pre-compiled,)g(to)q(o.)19 b(Then,)14 b(when)g(Lua)-42
1923−2592 y(\\executes")i(the)f(function)g(de\014nition,)g(its)f(b)q(o)q(dy)
1924−i(is)f(stored,)f(with)h(t)o(yp)q(e)g Fm(function)p Fn(,)f(in)o(to)g
1925−(the)i(v)m(ariable)e Fl(var)p Fn(.)922 2748 y(8)p eop
1926−%%Page: 9 9
1927−9 8 bop 29 199 a Fn(P)o(arameters)13 b(act)i(as)f(lo)q(cal)h(v)m
1928−(ariables,)f(initialized)f(with)i(the)g(argumen)o(t)f(v)m(alues.)42
1929−271 y Fm(p)n(arlist1)50 b Fi(!)g Fm('name')16 b Fi(f)p
1930−Fn(',')f Fm(name)s Fi(g)29 400 y Fn(Results)g(are)f(returned)h(using)f
1931−(the)h Fl(return)f Fn(statemen)o(t)e(\(see)j(Section)f(4.4.3\).)k(If)d
1932−(con)o(trol)e(reac)o(hes)i(the)g(end)-42 456 y(of)g(a)g(function)g
1933−(without)f(a)h(return)g(instruction,)f(the)h(function)g(returns)h(with)
1934−e(no)h(results.)29 513 y(There)22 b(is)f(a)g(sp)q(ecial)g(syn)o(tax)g
1935−(for)g(de\014nition)h(of)f(metho)q(ds,)h(that)e(is,)j(functions)e(whic)
1936−o(h)g(ha)o(v)o(e)h(an)f(extra)-42 569 y(parameter)14
1937−b Fm(self)p Fn(.)42 641 y Fm(function)50 b Fi(!)g Fk(function)16
1938−b Fm(var)h Fn(':')j Fm(name)c Fn('\(')f([)p Fm(p)n(arlist1)6
1939−b Fn(])16 b('\)')f Fm(blo)n(ck)g Fk(end)-42 714 y Fn(A)h(declaration)e
1940−(lik)o(e)-42 807 y Fl(function)23 b(v:f)h(\(...\))6 864
1941−y(...)-42 920 y(end)-42 1014 y Fn(is)15 b(equiv)m(alen)o(t)g(to)-42
1942−1108 y Fl(function)23 b(v.f)h(\(self,)f(...\))6 1164
1943−y(...)-42 1221 y(end)-42 1315 y Fn(that)16 b(is,)g(the)g(function)g
1944−(gets)g(an)g(extra)f(formal)f(parameter)h(called)h Fl(self)p
1945−Fn(.)22 b(Notice)16 b(that)f(the)h(v)m(ariable)g Fl(v)g
1946−Fn(m)o(ust)-42 1371 y(b)q(e)g(previously)f(initialized)f(with)g(a)h
1947−(table)g(v)m(alue.)-42 1493 y Fd(4.7)56 b(F)-5 b(allbac)n(ks)-42
1948−1579 y Fn(Lua)17 b(pro)o(vides)f(a)g(p)q(o)o(w)o(erful)g(mec)o(hanism)e
1949−(to)h(extend)i(its)f(seman)o(tics,)e(called)i Fm(fal)r(lb)n(acks)p
1950−Fn(.)23 b(Basically)l(,)15 b(a)h(fallbac)o(k)-42 1635
1951−y(is)f(a)g(programmer)d(de\014ned)17 b(function)e(whic)o(h)g(is)f
1952−(called)h(whenev)o(er)h(Lua)f(do)q(es)h(not)f(kno)o(w)f(ho)o(w)h(to)g
1953−(pro)q(ceed.)29 1691 y(Lua)h(supp)q(orts)f(the)g(follo)o(wing)e
1954−(fallbac)o(ks,)h(iden)o(ti\014ed)h(b)o(y)g(the)g(giv)o(en)g(strings:)
1955−-42 1785 y Fk(\\arith")24 b Fn(called)17 b(when)g(an)h(arithmetic)c(op)
1956−q(eration)j(is)g(applied)g(to)f(non)i(n)o(umerical)d(op)q(erands,)j(or)
1957−f(when)g(the)72 1842 y(binary)f Fl(^)g Fn(op)q(eration)g(is)f(called.)
1958−23 b(It)17 b(receiv)o(es)f(three)g(argumen)o(ts:)k(the)d(t)o(w)o(o)e
1959−(op)q(erands)h(\(the)g(second)h(one)72 1898 y(is)j(nil)g(when)h(the)g
1960−(op)q(eration)e(is)h(unary)h(min)o(us\))e(and)h(one)h(of)f(the)g(follo)
1961−o(wing)f(strings)g(describing)h(the)72 1955 y(o\013ended)c(op)q
1962−(erator:)120 2067 y Fl(add)47 b(sub)g(mul)h(div)f(pow)g(unm)72
1963−2180 y Fn(Its)15 b(return)f(v)m(alue)h(is)f(the)h(\014nal)f(result)g
1964−(of)g(the)h(arithmetic)d(op)q(eration.)19 b(The)c(default)f(function)g
1965−(issues)h(an)72 2236 y(error.)-42 2330 y Fk(\\order")23
1966−b Fn(called)15 b(when)h(an)g(order)f(comparison)e(is)i(applied)h(to)f
1967−(non)g(n)o(umerical)f(or)h(non)h(string)e(op)q(erands.)21
1968−b(It)72 2386 y(receiv)o(es)d(three)g(argumen)o(ts:)23
1969−b(the)18 b(t)o(w)o(o)f(op)q(erands)h(and)g(one)g(of)f(the)h(follo)o
1970−(wing)e(strings)h(describing)g(the)72 2443 y(o\013ended)f(op)q(erator:)
1971−120 2555 y Fl(lt)23 b(gt)h(le)g(ge)922 2748 y Fn(9)p
1972−eop
1973−%%Page: 10 10
1974−10 9 bop 72 199 a Fn(Its)17 b(return)h(v)m(alue)f(is)g(the)g(\014nal)g
1975−(result)g(of)g(the)g(comparison)f(op)q(eration.)25 b(The)18
1976−b(default)e(function)i(issues)72 256 y(an)d(error.)-42
1977−350 y Fk(\\concat")25 b Fn(called)d(when)g(a)f(concatenation)f(is)h
1978−(applied)h(to)f(non)h(string)e(op)q(erands.)39 b(It)22
1979−b(receiv)o(es)f(the)h(t)o(w)o(o)72 406 y(op)q(erands)d(as)f(argumen)o
1980−(ts.)29 b(Its)18 b(return)h(v)m(alue)g(is)f(the)g(\014nal)h(result)f
1981−(of)g(the)h(concatenation)f(op)q(eration.)72 462 y(The)e(default)e
1982−(function)h(issues)g(an)h(error.)-42 556 y Fk(\\index")23
1983−b Fn(called)14 b(when)i(Lua)f(tries)f(to)g(retriev)o(e)g(the)h(v)m
1984−(alue)g(of)f(an)h(index)g(not)f(presen)o(t)h(in)f(a)h(table.)k(It)c
1985−(receiv)o(es)72 613 y(as)20 b(argumen)o(ts)e(the)i(table)g(and)g(the)g
1986−(index.)35 b(Its)20 b(return)g(v)m(alue)g(is)f(the)h(\014nal)g(result)g
1987−(of)f(the)i(indexing)72 669 y(op)q(eration.)e(The)d(default)e(function)
1988−h(returns)h(nil.)-42 763 y Fk(\\gettable")25 b Fn(called)17
1989−b(when)i(Lua)g(tries)e(to)g(index)i(a)f(non)g(table)g(v)m(alue.)29
1990−b(It)18 b(receiv)o(es)g(as)g(argumen)o(ts)e(the)i(non)72
1991−819 y(table)d(v)m(alue)h(and)g(the)g(index.)22 b(Its)15
1992−b(return)h(v)m(alue)g(is)f(the)h(\014nal)g(result)f(of)g(the)h
1993−(indexing)g(op)q(eration.)k(The)72 876 y(default)15 b(function)g
1994−(issues)g(an)g(error.)-42 970 y Fk(\\settable")24 b Fn(called)18
1995−b(when)g(Lua)g(tries)f(to)h(assign)f(indexed)h(a)g(non)g(table)f(v)m
1996−(alue.)28 b(It)18 b(receiv)o(es)g(as)f(argumen)o(ts)72
1997−1026 y(the)e(non)h(table)e(v)m(alue,)h(the)h(index,)f(and)g(the)h
1998−(assigned)e(v)m(alue.)20 b(The)c(default)f(function)g(issues)g(an)g
1999−(error.)-42 1120 y Fk(\\function")24 b Fn(called)16 b(when)h(Lua)g
2000−(tries)f(to)g(call)f(a)h(non)h(function)f(v)m(alue.)24
2001−b(It)17 b(receiv)o(es)f(as)g(argumen)o(ts)f(the)h(non)72
2002−1176 y(function)i(v)m(alue)h(and)g(the)f(argumen)o(ts)f(giv)o(en)h(in)g
2003−(the)h(original)d(call.)29 b(Its)19 b(return)f(v)m(alues)h(are)f(the)h
2004−(\014nal)72 1233 y(results)c(of)f(the)i(call)e(op)q(eration.)19
2005−b(The)d(default)e(function)h(issues)g(an)h(error.)-42
2006−1327 y Fk(\\gc")24 b Fn(called)12 b(during)g(garbage)e(collection.)18
2007−b(It)12 b(receiv)o(es)g(as)f(argumen)o(t)f(the)i(table)f(b)q(eing)h
2008−(collected.)19 b(After)11 b(eac)o(h)72 1383 y(run)16
2009−b(of)f(the)g(collector)f(this)h(function)g(is)g(called)g(with)g
2010−(argumen)o(t)f(nil.)20 b(Because)c(this)e(function)i(op)q(erates)72
2011−1440 y(during)i(garbage)g(collection,)f(it)h(m)o(ust)f(b)q(e)i(used)g
2012−(with)f(great)f(care,)i(and)f(programmers)d(should)k(a)o(v)o(oid)72
2013−1496 y(the)g(creation)g(of)g(new)g(ob)s(jects)g(\(tables)f(or)h
2014−(strings\))e(in)i(this)g(function.)32 b(The)19 b(default)g(function)g
2015−(do)q(es)72 1553 y(nothing.)-42 1646 y Fk(\\error")k
2016−Fn(called)16 b(when)i(an)f(error)f(o)q(ccurs.)26 b(It)17
2017−b(receiv)o(es)g(as)g(argumen)o(t)e(a)i(string)f(describing)h(the)g
2018−(error.)25 b(The)72 1703 y(default)15 b(function)g(prin)o(ts)f(the)i
2019−(message)d(on)j(the)f(standard)g(error)f(output.)29 1797
2020−y(The)19 b(function)f Fl(setfallback)f Fn(is)g(used)i(to)f(c)o(hange)g
2021−(a)g(fallbac)o(k)f(action.)29 b(Its)18 b(\014rst)g(argumen)o(t)f(is)g
2022−(a)h(string)-42 1853 y(describing)f(the)g(fallbac)o(k,)e(and)i(the)f
2023−(second)i(the)e(new)h(function)g(to)f(b)q(e)h(called.)24
2024−b(It)16 b(returns)h(the)f(old)h(function)-42 1910 y(for)e(the)g(giv)o
2025−(en)g(fallbac)o(k.)29 1966 y(Section)g(7.4)f(sho)o(ws)h(an)g(example)f
2026−(of)h(the)g(use)h(of)e(fallbac)o(ks.)-42 2088 y Fd(4.8)56
2027−b(Error)18 b(Handling)-42 2173 y Fn(Because)c(Lua)g(is)e(an)h
2028−(extension)g(language,)f(all)g(Lua)i(actions)e(start)g(from)f(C)i(co)q
2029−(de)h(calling)d(a)i(function)g(from)e(the)-42 2230 y(Lua)j(library)l(.)
2030−k(Whenev)o(er)13 b(an)g(error)f(o)q(ccurs)i(during)f(Lua)g(compilation)
2031−d(or)j(execution,)g(an)g(error)f(fallbac)o(k)g(func-)-42
2032−2286 y(tion)k(is)g(called,)f(and)i(then)f(the)g(corresp)q(onding)h
2033−(function)f(from)e(the)i(library)f(\()p Fl(lua_dofile)p
2034−Fn(,)g Fl(lua_dostring)p Fn(,)-42 2343 y Fl(lua_call)p
2035−Fn(,)f(and)i Fl(lua_callfunction)p Fn(\))c(is)j(terminated)e(returning)
2036−i(an)g(error)g(condition.)29 2399 y(The)21 b(only)g(argumen)o(t)e(to)h
2037−(the)h(error)g(fallbac)o(k)e(function)i(is)g(a)f(string)g(describing)h
2038−(the)g(error)g(and)g(some)-42 2456 y(extra)c(informations,)d(lik)o(e)h
2039−(curren)o(t)i(line)g(\(when)g(the)f(error)h(is)f(at)g(compilation\))e
2040−(or)i(curren)o(t)h(function)f(\(when)-42 2512 y(the)g(error)f(is)g(at)g
2041−(execution\).)21 b(F)l(or)15 b(more)f(information)e(ab)q(out)k(an)f
2042−(error,)g(the)g(Lua)h(program)e(can)h(include)h(the)-42
2043−2569 y(compilation)10 b(pragma)h Fl($debug)p Fn(.)18
2044−b(This)12 b(pragma)f(m)o(ust)f(b)q(e)k(written)d(in)h(a)h(line)f(b)o(y)
2045−g(itself.)18 b(When)13 b(an)f(error)g(o)q(ccurs)911 2748
2046−y(10)p eop
2047−%%Page: 11 11
2048−11 10 bop -42 199 a Fn(in)15 b(a)g(program)e(compiled)h(with)h(this)f
2049−(option,)g(the)i(error)e(message)g(includes)h(extra)g(information)d
2050−(sho)o(wing)i(the)-42 256 y(stac)o(k)h(of)g(calls.)29
2051−312 y(The)g(standard)f(error)g(routine)g(only)g(prin)o(ts)g(the)g
2052−(error)g(message)f(to)h Fl(stderr)p Fn(.)19 b(If)14 b(needed,)i(it)e
2053−(is)g(p)q(ossible)g(to)-42 369 y(c)o(hange)i(the)f(error)g(fallbac)o(k)
2054−e(routine;)i(see)g(Section)g(4.7.)29 425 y(Lua)e(co)q(de)g(can)f
2055−(generate)g(an)g(error)g(b)o(y)g(calling)f(the)i(function)f
2056−Fl(error)p Fn(.)18 b(Its)13 b(optional)d(parameter)h(is)h(a)g(string,)
2057−-42 482 y(whic)o(h)k(is)e(used)i(as)f(the)g(error)g(message.)-42
2058−624 y Fo(5)67 b(The)23 b(Application)h(Program)f(In)n(terface)-42
2059−725 y Fn(This)13 b(section)g(describ)q(es)h(the)f(API)g(for)g(Lua,)h
2060−(that)e(is,)h(the)g(set)g(of)f(C)h(functions)g(a)o(v)m(ailable)f(to)h
2061−(the)g(host)g(program)-42 782 y(to)i(comm)o(unicate)e(with)h(the)h
2062−(library)l(.)k(The)d(API)f(functions)g(can)h(b)q(e)f(classi\014ed)g(in)
2063−g(the)h(follo)o(wing)d(categories:)14 869 y(1.)22 b(executing)15
2064−b(Lua)h(co)q(de;)14 961 y(2.)22 b(con)o(v)o(erting)14
2065−b(v)m(alues)i(b)q(et)o(w)o(een)f(C)g(and)g(Lua;)14 1052
2066−y(3.)22 b(manipulating)13 b(\(reading)h(and)i(writing\))d(Lua)j(ob)s
2067−(jects;)14 1144 y(4.)22 b(calling)14 b(Lua)i(functions;)14
2068−1235 y(5.)22 b(C)15 b(functions)g(to)g(b)q(e)g(called)g(b)o(y)g(Lua;)14
2069−1326 y(6.)22 b(lo)q(c)o(king)14 b(Lua)i(Ob)s(jects.)-42
2070−1414 y(All)f(API)h(functions)f(are)f(declared)i(in)f(the)g(\014le)g
2071−Fl(lua.h)p Fn(.)-42 1535 y Fd(5.1)56 b(Executing)18 b(Lua)h(Co)r(de)-42
2072−1621 y Fn(A)i(host)g(program)d(can)j(execute)h(Lua)f(programs)d
2073−(written)i(in)h(a)f(\014le)h(or)f(in)h(a)g(string,)f(using)h(the)g
2074−(follo)o(wing)-42 1677 y(functions:)-42 1765 y Fl(int)286
2075−b(lua_dofile)357 b(\(char)23 b(*filename\);)-42 1821
2076−y(int)286 b(lua_dostring)309 b(\(char)23 b(*string\);)-42
2077−1909 y Fn(Both)15 b(functions)f(return)g(an)g(error)f(co)q(de:)20
2078−b(0,)14 b(in)g(case)g(of)g(success;)h(non)f(zero,)g(in)g(case)h(of)e
2079−(errors.)19 b(The)c(function)-42 1965 y Fl(lua_dofile)p
2080−Fn(,)f(if)h(called)f(with)h(argumen)o(t)e(NULL)j(\(0\),)e(executes)i
2081−(the)f(\\\014le")g Fl(stdin)p Fn(.)-42 2086 y Fd(5.2)56
2082−b(Con)n(v)n(erting)20 b(V)-5 b(alues)20 b(b)r(et)n(w)n(een)e(C)h(and)h
2083−(Lua)-42 2172 y Fn(Because)13 b(Lua)g(has)f(no)g(static)f(t)o(yp)q(e)h
2084−(system,)f(all)h(v)m(alues)g(passed)g(b)q(et)o(w)o(een)h(Lua)f(and)h(C)
2085−f(ha)o(v)o(e)g(t)o(yp)q(e)g Fl(lua)p 1739 2172 15 2 v
2086−17 w(Object)p Fn(,)-42 2228 y(whic)o(h)k(w)o(orks)e(lik)o(e)g(an)h
2087−(abstract)f(t)o(yp)q(e)i(in)f(C)g(that)f(can)h(hold)g(an)o(y)g(Lua)h(v)
2088−m(alue.)29 2285 y(Lua)11 b(has)f(automatic)e(memory)f(managemen)o(t,)i
2089−(and)h(garbage)g(collection.)17 b(Because)11 b(of)f(that,)g(a)g
2090−Fl(lua_Object)-42 2341 y Fn(has)18 b(a)f(limited)e(scop)q(e,)j(and)g
2091−(is)f(only)g(v)m(alid)g(inside)g(the)h Fm(blo)n(ck)j
2092−Fn(where)d(it)f(w)o(as)f(created.)27 b(A)17 b(C)h(function)f(called)-42
2093−2398 y(from)c(Lua)i(is)f(a)h(blo)q(c)o(k,)f(and)h(its)e(parameters)g
2094−(are)h(v)m(alid)h(only)f(un)o(til)g(its)f(end.)21 b(A)14
2095−b(go)q(o)q(d)h(programmi)o(ng)d(practice)-42 2454 y(is)i(to)f(con)o(v)o
2096−(ert)g(Lua)h(ob)s(jects)f(to)g(C)h(v)m(alues)g(as)f(so)q(on)h(as)f
2097−(they)h(are)g(a)o(v)m(ailable,)e(and)i(nev)o(er)g(to)f(store)g
2098−Fl(lua_Object)p Fn(s)-42 2511 y(in)j(C)e(global)g(v)m(ariables.)29
2099−2567 y(When)f(C)g(co)q(de)h(calls)e(Lua)h(rep)q(eatedly)l(,)g(as)g(in)g
2100−(a)f(lo)q(op,)h(ob)s(jects)f(returned)i(b)o(y)f(these)g(calls)f(accum)o
2101−(ulate,)f(and)-42 2623 y(ma)o(y)j(create)h(a)g(memory)d(problem.)19
2102−b(T)l(o)c(a)o(v)o(oid)f(this,)g(nested)i(blo)q(c)o(ks)f(can)g(b)q(e)h
2103−(de\014ned)g(with)f(the)g(functions:)911 2748 y(11)p
2104−eop
2105−%%Page: 12 12
2106−12 11 bop -42 199 a Fl(void)262 b(lua_beginblock)f(\(void\);)-42
2107−256 y(void)h(lua_endblock)309 b(\(void\);)-42 350 y Fn(After)15
2108−b(the)h(end)f(of)g(the)g(blo)q(c)o(k,)g(all)f Fl(lua_Object)p
2109−Fn('s)g(created)h(inside)g(it)f(are)h(released.)29 406
2110−y(T)l(o)g(c)o(hec)o(k)g(the)h(t)o(yp)q(e)f(of)g(a)g Fl(lua_Object)p
2111−Fn(,)e(the)i(follo)o(wing)e(function)i(is)g(a)o(v)m(ailable:)-42
2112−500 y Fl(int)286 b(lua_type)405 b(\(lua_Object)22 b(object\);)-42
2113−594 y Fn(plus)16 b(the)f(follo)o(wing)e(macros:)-42 687
2114−y Fl(int)286 b(lua_isnil)381 b(\(lua_Object)22 b(object\);)-42
2115−744 y(int)286 b(lua_isnumber)309 b(\(lua_Object)22 b(object\);)-42
2116−800 y(int)286 b(lua_isstring)309 b(\(lua_Object)22 b(object\);)-42
2117−857 y(int)286 b(lua_istable)333 b(\(lua_Object)22 b(object\);)-42
2118−913 y(int)286 b(lua_iscfunction)237 b(\(lua_Object)22
2119−b(object\);)-42 970 y(int)286 b(lua_isuserdata)261 b(\(lua_Object)22
2120−b(object\);)-42 1064 y Fn(All)15 b(macros)e(return)j(1)e(if)h(the)g(ob)
2121−s(ject)g(has)g(the)g(giv)o(en)g(t)o(yp)q(e,)g(and)g(0)g(otherwise.)29
2122−1120 y(The)20 b(function)g Fl(lua_type)f Fn(can)h(b)q(e)h(used)f(to)g
2123−(distinguish)f(b)q(et)o(w)o(een)h(di\013eren)o(t)f(kinds)h(of)g(user)g
2124−(data;)h(see)-42 1176 y(b)q(elo)o(w.)29 1233 y(T)l(o)15
2125−b(translate)f(a)h(v)m(alue)g(from)f(t)o(yp)q(e)h Fl(lua_Object)f
2126−Fn(to)g(a)h(sp)q(eci\014c)h(C)f(t)o(yp)q(e,)g(the)g(programmer)d(can)k
2127−(use:)-42 1327 y Fl(double)214 b(lua_getnumber)285 b(\(lua_Object)22
2128−b(object\);)-42 1383 y(char)239 b(*lua_getstring)284
2129−b(\(lua_Object)22 b(object\);)-42 1440 y(lua_CFunction)46
2130−b(lua_getcfunction)213 b(\(lua_Object)22 b(object\);)-42
2131−1496 y(void)239 b(*lua_getuserdata)d(\(lua_Object)22
2132−b(object\);)-42 1590 y(lua_getnumber)14 b Fn(con)o(v)o(erts)g(a)g
2133−Fl(lua_Object)g Fn(to)g(a)h(\015oat.)k(This)c Fl(lua_Object)e
2134−Fn(m)o(ust)h(b)q(e)h(a)g(n)o(um)o(b)q(er)f(or)h(a)f(string)-42
2135−1646 y(con)o(v)o(ertible)h(to)f(n)o(um)o(b)q(er)h(\(see)g(Section)g
2136−(4.2\);)f(otherwise,)g(the)h(function)g(returns)g(0.)29
2137−1703 y Fl(lua_getstring)c Fn(con)o(v)o(erts)g(a)h Fl(lua_Object)f
2138−Fn(to)h(a)g(string)g(\()p Fl(char)23 b(*)p Fn(\).)18
2139−b(This)12 b Fl(lua_Object)f Fn(m)o(ust)g(b)q(e)i(a)f(string)-42
2140−1759 y(or)k(a)f(n)o(um)o(b)q(er;)h(otherwise,)e(the)i(function)g
2141−(returns)g(0)f(\(the)h(n)o(ull)f(p)q(oin)o(ter\).)21
2142−b(This)16 b(function)f(do)q(es)i(not)e(create)h(a)-42
2143−1816 y(new)f(string,)d(but)i(returns)g(a)f(p)q(oin)o(ter)g(to)h(a)f
2144−(string)g(inside)g(the)h(Lua)g(en)o(vironmen)o(t.)k(Because)d(Lua)f
2145−(has)f(garbage)-42 1872 y(collection,)h(there)h(is)g(no)g(guaran)o(tee)
2146−g(that)f(suc)o(h)i(p)q(oin)o(ter)e(will)g(b)q(e)i(v)m(alid)f(after)f
2147−(the)i(blo)q(c)o(k)f(ends.)29 1929 y Fl(lua_getcfunction)f
2148−Fn(con)o(v)o(erts)h(a)h Fl(lua_Object)f Fn(to)g(a)h(C)g(function.)23
2149−b(This)15 b Fl(lua_Object)g Fn(m)o(ust)g(ha)o(v)o(e)g(t)o(yp)q(e)-42
2150−1985 y Fm(CF)m(unction)s Fn(;)j(otherwise,)f(the)h(function)g(returns)g
2151−(0)f(\(the)h(n)o(ull)f(p)q(oin)o(ter\).)27 b(The)18 b(t)o(yp)q(e)g
2152−Fl(lua_CFunction)e Fn(is)h(ex-)-42 2042 y(plained)f(in)f(Section)g
2153−(5.5.)29 2098 y Fl(lua_getuserdata)10 b Fn(con)o(v)o(erts)i(a)g
2154−Fl(lua_Object)e Fn(to)i Fl(void*)p Fn(.)18 b(This)12
2155−b Fl(lua_Object)f Fn(m)o(ust)g(ha)o(v)o(e)h(t)o(yp)q(e)g
2156−Fm(user)n(data)s Fn(;)-42 2154 y(otherwise,)j(the)g(function)g(returns)
2157−g(0)g(\(the)g(n)o(ull)f(p)q(oin)o(ter\).)29 2211 y(The)j(rev)o(erse)g
2158−(pro)q(cess,)h(that)e(is,)h(passing)f(a)h(sp)q(eci\014c)h(C)f(v)m(alue)
2159−g(to)g(Lua,)h(is)e(done)i(b)o(y)f(using)g(the)g(follo)o(wing)-42
2160−2267 y(functions:)-42 2361 y Fl(void)262 b(lua_pushnumber)f(\(double)23
2161−b(n\);)-42 2418 y(void)262 b(lua_pushstring)f(\(char)23
2162−b(*s\);)-42 2474 y(void)262 b(lua_pushliteral)237 b(\(char)23
2163−b(*s\);)-42 2531 y(void)262 b(lua_pushcfunction)189 b(\(lua_CFunction)
2164−22 b(f\);)-42 2587 y(void)262 b(lua_pushusertag)237 b(\(void)23
2165−b(*u,)h(int)f(tag\);)911 2748 y Fn(12)p eop
2166−%%Page: 13 13
2167−13 12 bop -42 199 a Fn(plus)16 b(the)f(macro:)-42 293
2168−y Fl(void)262 b(lua_pushuserdata)213 b(\(void)23 b(*u\);)-42
2169−387 y Fn(All)17 b(of)f(them)g(receiv)o(e)h(a)f(C)h(v)m(alue,)g(con)o(v)
2170−o(ert)f(it)h(to)f(a)g(corresp)q(onden)o(t)i Fl(lua_Object)p
2171−Fn(,)d(and)i(lea)o(v)o(e)f(the)h(result)g(on)-42 443
2172−y(the)h(top)g(of)f(the)h(Lua)g(stac)o(k,)f(where)h(it)f(can)h(b)q(e)h
2173−(assigned)e(to)g(a)h(Lua)g(v)m(ariable,)f(passed)h(as)g(paramen)o(ter)e
2174−(to)h(a)-42 500 y(Lua)f(function,)g(etc)f(\(see)h(b)q(elo)o(w\).)21
2175−b Fl(lua_pushliteral)13 b Fn(is)i(lik)o(e)g Fl(lua_pushstring)p
2176−Fn(,)f(but)h(also)g(puts)h(the)f(string)-42 556 y(in)h(the)g(Lua)g
2177−(literal)e(table.)21 b(This)15 b(a)o(v)o(oids)g(the)h(string)e(to)h(b)q
2178−(e)i(garbage)e(collected,)g(and)h(therefore)f(has)h(a)f(b)q(etter)-42
2179−613 y(o)o(v)o(erall)e(p)q(erformance.)19 b(As)14 b(a)h(rule,)f(when)h
2180−(the)f(string)g(to)g(b)q(e)h(pushed)g(is)f(a)h(literal,)d
2181−Fl(lua_pushliteral)g Fn(should)-42 669 y(b)q(e)k(used.)29
2182−726 y(User)10 b(data)g(can)h(ha)o(v)o(e)e(di\013eren)o(t)h(tags,)g
2183−(whose)g(seman)o(tics)f(are)h(de\014ned)h(b)o(y)g(the)f(host)g
2184−(program.)16 b(An)o(y)10 b(p)q(ositiv)o(e)-42 782 y(in)o(teger)15
2185−b(can)h(b)q(e)h(used)f(to)g(tag)e(a)i(user)g(data.)21
2186−b(When)16 b(a)g(user)g(data)f(is)g(retriev)o(ed,)g(the)h(function)g
2187−Fl(lua_type)e Fn(can)-42 839 y(b)q(e)i(used)g(to)f(get)f(its)h(tag.)29
2188−895 y(T)l(o)g(complete)f(the)h(set,)g(the)g(v)m(alue)g
2189−Fk(nil)g Fn(or)f(a)h Fl(lua_Object)f Fn(can)h(also)g(b)q(e)g(pushed)i
2190−(on)o(to)d(the)h(stac)o(k,)f(with:)-42 989 y Fl(void)262
2191−b(lua_pushnil)333 b(\(void\);)-42 1045 y(void)262 b(lua_pushobject)f
2192−(\(lua_Object)22 b(object\);)-42 1167 y Fd(5.3)56 b(Manipulating)22
2193−b(Lua)c(Ob)s(jects)-42 1253 y Fn(T)l(o)d(read)h(the)f(v)m(alue)g(of)g
2194−(an)o(y)g(global)f(Lua)h(v)m(ariable,)f(one)i(can)f(use)h(the)f
2195−(function:)-42 1347 y Fl(lua_Object)118 b(lua_getglobal)285
2196−b(\(char)23 b(*varname\);)-42 1440 y Fn(T)l(o)15 b(store)g(a)g(v)m
2197−(alue)g(previously)g(pushed)h(on)o(to)e(the)i(stac)o(k)e(in)h(a)g
2198−(global)f(v)m(ariable,)g(there)h(is)g(the)g(function:)-42
2199−1534 y Fl(void)262 b(lua_storeglobal)237 b(\(char)23
2200−b(*varname\);)29 1628 y Fn(T)l(ables)15 b(can)g(also)f(b)q(e)i
2201−(manipulated)e(via)g(the)i(API.)f(The)g(function)-42
2202−1722 y Fl(lua_Object)118 b(lua_getsubscript)213 b(\(void\);)-42
2203−1816 y Fn(exp)q(ects)16 b(on)f(the)h(stac)o(k)e(a)h(table)f(and)i(an)f
2204−(index,)g(and)g(returns)g(the)g(con)o(ten)o(ts)g(of)g(the)g(table)f(at)
2205−h(that)f(index.)20 b(As)-42 1872 y(in)15 b(Lua,)g(if)g(the)g(\014rst)f
2206−(ob)s(ject)h(is)f(not)h(a)f(table,)g(or)h(the)g(index)g(is)g(not)f
2207−(presen)o(t)h(in)g(the)g(table,)f(the)h(corresp)q(onden)o(t)-42
2208−1929 y(fallbac)o(k)f(is)h(called.)29 1985 y(F)l(or)g(compatibilit)n(y)d
2209−(with)j(previous)g(v)o(ersions)f(of)h(the)g(API,)g(the)h(follo)o(wing)d
2210−(macros)g(are)i(supp)q(orted:)-42 2079 y Fl(lua_Object)118
2211−b(lua_getindexed)261 b(\(lua_Object)22 b(table,)h(float)h(index\);)-42
2212−2135 y(lua_Object)118 b(lua_getfield)309 b(\(lua_Object)22
2213−b(table,)h(char)h(*field\);)-42 2229 y Fn(The)16 b(\014rst)f(one)g(is)g
2214−(used)h(for)e(n)o(umeric)g(indices,)h(while)g(the)g(second)h(can)f(b)q
2215−(e)h(used)g(for)e(an)o(y)h(string)f(index.)29 2286 y(T)l(o)i(store)g(a)
2216−g(v)m(alue)h(in)f(an)h(index,)g(the)f(program)e(m)o(ust)h(push)j(on)o
2217−(to)d(the)i(stac)o(k)e(the)i(table,)f(the)h(index,)f(and)-42
2218−2342 y(the)g(v)m(alue,)f(and)g(then)h(call)e(the)h(function:)-42
2219−2436 y Fl(void)24 b(lua_storesubscript)d(\(void\);)-42
2220−2530 y Fn(Again,)15 b(the)g(corresp)q(onden)o(t)g(fallbac)o(k)f(is)h
2221−(called)g(if)f(needed.)29 2586 y(Finally)l(,)g(the)h(function)911
2222−2748 y(13)p eop
2223−%%Page: 14 14
2224−14 13 bop -42 199 a Fl(lua_Object)118 b(lua_createtable)237
2225−b(\(void\);)-42 293 y Fn(creates)15 b(a)g(new)h(table.)29
2226−349 y Fm(Ple)n(ase)22 b(Notic)n(e:)36 b Fn(Most)22 b(functions)g(from)e
2227−(the)j(Lua)f(library)f(receiv)o(e)i(parameters)d(through)i(the)h(stac)o
2228−(k.)-42 406 y(Because)c(other)e(functions)g(also)g(use)h(the)g(stac)o
2229−(k,)f(it)g(is)g(imp)q(ortan)o(t)e(that)i(these)h(parameters)e(b)q(e)i
2230−(pushed)h(just)-42 462 y(b)q(efore)d(the)f(corresp)q(onden)o(t)g(call,)
2231−f(without)g(in)o(termediate)e(calls)i(to)h(the)g(Lua)g(library)l(.)k(F)
2232−l(or)14 b(instance,)h(supp)q(ose)-42 519 y(the)h(user)f(w)o(an)o(ts)f
2233−(the)h(v)m(alue)h(of)f Fl(a[i])p Fn(.)k(A)c(simplistic)e(solution)h(w)o
2234−(ould)g(b)q(e:)6 613 y Fl(/*)24 b(Warning:)f(WRONG)g(CODE)g(*/)6
2235−669 y(lua_Object)g(result;)6 725 y(lua_pushobject\(lua_getglobal)o
2236−(\("a"\)\);)44 b(/*)24 b(push)f(table)g(*/)6 782 y
2237−(lua_pushobject\(lua_getglobal)o(\("i"\)\);)44 b(/*)24
2238−b(push)f(index)g(*/)6 838 y(result)g(=)h(lua_getsubscript\(\);)-42
2239−932 y Fn(Ho)o(w)o(ev)o(er,)c(the)f(call)g Fl(lua_getglobal\("i"\))e
2240−Fn(mo)q(di\014es)i(the)h(stac)o(k,)f(and)h(in)o(v)m(alidates)e(the)i
2241−(previous)f(pushed)-42 989 y(v)m(alue.)i(A)15 b(correct)g(solution)f
2242−(could)h(b)q(e:)6 1082 y Fl(lua_Object)23 b(result;)6
2243−1139 y(lua_Object)g(index)g(=)h(lua_getglobal\("i"\);)6
2244−1195 y(lua_pushobject\(lua_getglobal)o(\("a"\)\);)44
2245−b(/*)24 b(push)f(table)g(*/)6 1252 y(lua_pushobject\(index\);)355
2246−b(/*)24 b(push)f(index)g(*/)6 1308 y(result)g(=)h
2247−(lua_getsubscript\(\);)-42 1430 y Fd(5.4)56 b(Calling)21
2248−b(Lua)e(F)-5 b(unctions)-42 1516 y Fn(F)l(unctions)19
2249−b(de\014ned)g(in)g(Lua)f(b)o(y)h(a)f(c)o(h)o(unk)g(executed)i(with)e
2250−Fl(dofile)f Fn(or)h Fl(dostring)f Fn(can)i(b)q(e)g(called)f(from)e(the)
2251−-42 1572 y(host)h(program.)23 b(This)16 b(is)g(done)h(using)g(the)g
2252−(follo)o(wing)e(proto)q(col:)22 b(\014rst,)16 b(the)h(argumen)o(ts)e
2253−(to)h(the)h(function)g(are)-42 1629 y(pushed)f(on)o(to)d(the)i(Lua)g
2254−(stac)o(k)e(\(see)i(Section)f(5.2\),)f(in)h(direct)g(order,)g(i.e.,)g
2255−(the)g(\014rst)g(argumen)o(t)f(is)h(pushed)h(\014rst.)-42
2256−1685 y(Again,)g(it)f(is)h(imp)q(ortan)o(t)e(to)h(emphasize)h(that,)f
2257−(during)h(this)f(phase,)i(no)f(other)g(Lua)g(function)g(can)g(b)q(e)h
2258−(called.)29 1741 y(Then,)f(the)h(function)f(is)f(called)h(using)-42
2259−1835 y Fl(int)286 b(lua_call)405 b(\(char)23 b(*functionname\);)-42
2260−1929 y Fn(or)-42 2023 y Fl(int)286 b(lua_callfunction)213
2261−b(\(lua_Object)22 b(function\);)-42 2116 y Fn(Both)16
2262−b(functions)g(return)f(an)h(error)f(co)q(de:)22 b(0,)15
2263−b(in)h(case)g(of)f(success;)i(non)f(zero,)f(in)h(case)g(of)f(errors.)21
2264−b(Finally)l(,)14 b(the)-42 2173 y(returned)i(v)m(alues)f(\(a)g(Lua)h
2265−(function)f(ma)o(y)e(return)i(man)o(y)f(v)m(alues\))h(can)g(b)q(e)h
2266−(retriev)o(ed)f(with)f(the)i(macro)-42 2267 y Fl(lua_Object)118
2267−b(lua_getresult)309 b(\(int)23 b(number\);)-42 2360 y
2268−Fn(where)18 b Fl(number)d Fn(is)i(the)g(order)f(of)h(the)g(result,)f
2269−(starting)f(with)h(1.)25 b(When)17 b(called)f(with)g(a)h(n)o(um)o(b)q
2270−(er)f(larger)g(than)-42 2417 y(the)g(actual)e(n)o(um)o(b)q(er)h(of)f
2271−(results,)h(this)f(function)h(returns)g Fl(LUA_NOOBJECT)p
2272−Fn(.)29 2473 y(Tw)o(o)j(sp)q(ecial)g(Lua)g(functions)h(ha)o(v)o(e)e
2273−(exclusiv)o(e)i(in)o(terfaces:)25 b Fl(error)18 b Fn(and)g
2274−Fl(setfallback)p Fn(.)28 b(A)18 b(C)h(function)-42 2530
2275−y(can)d(generate)f(a)g(Lua)g(error)g(calling)f(the)h(function)-42
2276−2623 y Fl(void)24 b(lua_error)e(\(char)i(*message\);)911
2277−2748 y Fn(14)p eop
2278−%%Page: 15 15
2279−15 14 bop -42 199 a Fn(This)18 b(function)g(nev)o(er)g(returns.)28
2280−b(If)18 b(the)g(C)f(function)h(has)g(b)q(een)h(called)f(from)e(Lua,)i
2281−(the)g(corresp)q(onding)g(Lua)-42 256 y(execution)f(terminates,)d(as)i
2282−(if)g(an)g(error)f(had)i(o)q(ccurred)g(inside)f(Lua)h(co)q(de.)23
2283−b(Otherwise,)16 b(the)h(whole)f(program)-42 312 y(terminates.)29
2284−369 y(F)l(allbac)o(ks)e(can)h(b)q(e)h(c)o(hanged)g(with:)-42
2285−460 y Fl(lua_Object)23 b(lua_setfallback)f(\(char)h(*name,)g
2286−(lua_CFunction)f(fallback\);)-42 552 y Fn(The)12 b(\014rst)f(parameter)
2287−f(is)g(the)i(fallbac)o(k)e(name,)h(and)g(the)h(second)f(a)h(CF)l
2288−(unction)f(to)f(b)q(e)i(used)g(as)f(the)h(new)f(fallbac)o(k.)-42
2289−608 y(This)k(function)g(returns)g(a)g Fl(lua_Object)p
2290−Fn(,)f(whic)o(h)h(is)g(the)g(old)g(fallbac)o(k)f(v)m(alue,)h(or)g(nil)f
2291−(on)h(fail)g(\(in)o(v)m(alid)f(fallbac)o(k)-42 665 y(name\).)19
2292−b(This)c(old)g(v)m(alue)g(can)g(b)q(e)h(used)g(for)f(c)o(haining)f
2293−(fallbac)o(ks.)29 721 y(An)i(example)e(of)g(C)h(co)q(de)h(calling)e(a)h
2294−(Lua)g(function)h(is)e(sho)o(wn)h(in)g(Section)g(7.6.)-42
2295−842 y Fd(5.5)56 b(C)19 b(F)-5 b(unctions)-42 928 y Fn(T)l(o)15
2296−b(register)g(a)f(C)h(function)g(to)g(Lua,)g(there)g(is)g(the)g(follo)o
2297−(wing)e(macro:)-42 1020 y Fl(#define)23 b(lua_register\(n,f\))165
2298−b(\(lua_pushcfunction\(f\),)21 b(lua_storeglobal\(n\)\))-42
2299−1076 y(/*)j(char)f(*n;)215 b(*/)-42 1133 y(/*)24 b(lua_CFunction)e(f;)i
2300−(*/)-42 1224 y Fn(whic)o(h)15 b(receiv)o(es)g(the)f(name)g(the)h
2301−(function)f(will)g(ha)o(v)o(e)g(in)g(Lua,)h(and)g(a)f(p)q(oin)o(ter)g
2302−(to)g(the)h(function.)20 b(This)14 b(p)q(oin)o(ter)-42
2303−1281 y(m)o(ust)g(ha)o(v)o(e)h(t)o(yp)q(e)g Fl(lua_CFunction)p
2304−Fn(,)e(whic)o(h)i(is)g(de\014ned)i(as)-42 1372 y Fl(typedef)23
2305−b(void)h(\(*lua_CFunction\))d(\(void\);)-42 1464 y Fn(that)15
2306−b(is,)f(a)h(p)q(oin)o(ter)g(to)f(a)h(function)g(with)g(no)g(parameters)
2307−e(and)j(no)f(results.)29 1521 y(In)g(order)e(to)h(comm)o(unicate)d
2308−(prop)q(erly)j(with)f(Lua,)h(a)f(C)h(function)g(m)o(ust)e(follo)o(w)g
2309−(a)i(proto)q(col,)f(whic)o(h)g(de\014nes)-42 1577 y(the)j(w)o(a)o(y)e
2310−(parameters)f(and)j(results)e(are)h(passed.)29 1633 y(T)l(o)g(access)g
2311−(its)g(argumen)o(ts,)e(a)i(C)g(function)g(calls:)-42
2312−1725 y Fl(lua_Object)118 b(lua_getparam)309 b(\(int)23
2313−b(number\);)-42 1817 y Fn(where)16 b Fl(number)e Fn(starts)g(with)h(1)g
2314−(to)f(get)h(the)h(\014rst)e(argumen)o(t.)19 b(When)c(called)g(with)g(a)
2315−g(n)o(um)o(b)q(er)f(larger)g(than)h(the)-42 1873 y(actual)e(n)o(um)o(b)
2316−q(er)f(of)g(argumen)o(ts,)f(this)i(function)f(returns)h
2317−Fl(LUA)p 1029 1873 15 2 v 17 w(NOOBJECT)p Fn(.)e(In)j(this)e(w)o(a)o(y)
2318−l(,)g(it)g(is)h(p)q(ossible)f(to)g(write)-42 1930 y(functions)j(that)g
2319−(w)o(ork)f(with)h(a)g(v)m(ariable)f(n)o(um)o(b)q(er)h(of)f(parameters.)
2320−29 1986 y(T)l(o)g(return)g(v)m(alues,)g(a)g(C)g(function)g(just)f
2321−(pushes)i(them)e(on)o(to)g(the)i(stac)o(k,)e(in)h(direct)g(order;)f
2322−(see)i(Section)f(5.2.)-42 2042 y(Lik)o(e)i(a)e(Lua)i(function,)f(a)g(C)
2323−g(function)g(called)f(b)o(y)h(Lua)h(can)f(also)g(return)g(man)o(y)e
2324−(results.)29 2099 y(Section)i(7.5)f(presen)o(ts)i(an)f(example)f(of)g
2325−(a)h(CF)l(unction.)-42 2220 y Fd(5.6)56 b(Lo)r(c)n(king)19
2326−b(Lua)f(Ob)s(jects)-42 2306 y Fn(As)h(already)g(noted,)g
2327−Fl(lua_Object)p Fn(s)f(are)h(v)o(olatile.)29 b(If)19
2328−b(the)g(C)g(co)q(de)h(needs)g(to)e(k)o(eep)h(a)g Fl(lua_Object)f
2329−Fn(outside)-42 2363 y(blo)q(c)o(k)d(b)q(oundaries,)h(it)e(has)h(to)g
2330−Fm(lo)n(ck)f Fn(the)h(ob)s(ject.)20 b(The)15 b(routines)g(to)f
2331−(manipulate)g(lo)q(c)o(king)g(are)h(the)g(follo)o(wing:)-42
2332−2454 y Fl(int)191 b(lua_lock)23 b(\(void\);)-42 2511
2333−y(lua_Object)g(lua_getlocked)46 b(\(int)23 b(ref\);)-42
2334−2567 y(void)167 b(lua_pushlocked)22 b(\(int)h(ref\);)-42
2335−2623 y(void)167 b(lua_unlock)22 b(\(int)i(ref\);)911
2336−2748 y Fn(15)p eop
2337−%%Page: 16 16
2338−16 15 bop -42 199 a Fn(The)18 b(function)e Fl(lua_lock)g
2339−Fn(lo)q(c)o(ks)g(the)h(ob)s(ject)f(whic)o(h)h(is)f(on)h(the)g(top)f(of)
2340−h(the)g(stac)o(k,)f(and)h(returns)f(a)h(reference)-42
2341−256 y(to)e(it.)k(Whenev)o(er)c(the)f(lo)q(c)o(k)o(ed)h(ob)s(ject)f(is)g
2342−(needed,)i(a)e(call)g(to)g Fl(lua_getlocked)f Fn(returns)i(a)f(handle)h
2343−(to)f(it,)g(while)-42 312 y Fl(lua_pushlocked)f Fn(pushes)i(the)f
2344−(handle)g(on)g(the)g(stac)o(k.)19 b(When)c(a)e(lo)q(c)o(k)o(ed)h(ob)s
2345−(ject)g(is)f(no)h(longer)g(needed,)h(it)e(can)-42 369
2346−y(b)q(e)j(unlo)q(c)o(k)o(ed)g(with)e(a)h(call)f(to)h
2347−Fl(lua_unlock)p Fn(.)-42 512 y Fo(6)67 b(Prede\014ned)24
2348−b(F)-6 b(unctions)24 b(and)f(Libraries)-42 613 y Fn(The)17
2349−b(set)g(of)f(prede\014ned)i(functions)e(in)h(Lua)f(is)h(small)d(but)j
2350−(p)q(o)o(w)o(erful.)23 b(Most)15 b(of)h(them)g(pro)o(vide)g(features)g
2351−(that)-42 670 y(allo)o(ws)d(some)g(degree)h(of)g(re\015exivit)o(y)f(in)
2352−h(the)g(language.)19 b(Man)o(y)13 b(of)h(these)h(features)e(cannot)h(b)
2353−q(e)h(sim)o(ulated)d(with)-42 726 y(the)k(rest)f(of)f(the)i(Language)f
2354−(nor)g(with)f(the)i(standard)e(API.)29 783 y(The)g(libraries,)e(on)i
2355−(the)f(other)g(hand,)h(pro)o(vide)g(useful)f(routines)g(that)g(are)h
2356−(implemen)o(ted)d(directly)i(through)-42 839 y(the)g(standard)f(API.)h
2357−(Therefore,)f(they)h(are)f(not)g(necessary)h(to)f(the)g(language,)g
2358−(and)h(are)f(pro)o(vided)h(as)f(separated)-42 896 y(C)j(mo)q(dules.)k
2359−(Curren)o(tly)c(there)g(are)g(three)g(standard)g(libraries:)27
2360−989 y Fi(\017)22 b Fn(string)14 b(manipulation;)27 1083
2361−y Fi(\017)22 b Fn(mathematical)11 b(functions)k(\(sin,)g(cos,)f(etc\);)
2362−27 1177 y Fi(\017)22 b Fn(input)15 b(and)h(output.)-42
2363−1271 y(In)h(order)f(to)g(ha)o(v)o(e)g(access)g(to)g(these)g(libraries,)
2364−f(the)h(host)g(program)e(m)o(ust)h(call)g(the)h(functions)g
2365−Fl(strlib_open)p Fn(,)-42 1327 y Fl(mathlib_open)p Fn(,)e(and)h
2366−Fl(iolib_open)p Fn(,)e(declared)j(in)f Fl(lualib.h)p
2367−Fn(.)-42 1449 y Fd(6.1)56 b(Prede\014ned)18 b(F)-5 b(unctions)-42
2368−1535 y Fl(dofile)24 b(\(filename\))-42 1621 y Fn(This)16
2369−b(function)f(receiv)o(es)g(a)g(\014le)h(name,)e(op)q(ens)i(it)f(and)h
2370−(executes)g(its)f(con)o(ten)o(ts)f(as)i(a)f(Lua)h(c)o(h)o(unk.)21
2371−b(It)15 b(returns)h(1)-42 1677 y(if)f(there)g(are)g(no)g(errors,)g
2372−Fk(nil)f Fn(otherwise.)-42 1797 y Fl(dostring)23 b(\(string\))-42
2373−1883 y Fn(This)e(function)h(executes)g(a)f(giv)o(en)g(string)f(as)h(a)g
2374−(Lua)h(c)o(h)o(unk.)38 b(It)22 b(returns)f(1)g(if)g(there)g(are)g(no)h
2375−(errors,)f Fk(nil)-42 1939 y Fn(otherwise.)-42 2059 y
2376−Fl(next)j(\(table,)f(index\))-42 2145 y Fn(This)18 b(function)f(allo)o
2377−(ws)f(a)i(program)d(to)i(tra)o(v)o(erse)g(all)g(\014elds)h(of)f(a)g
2378−(table.)27 b(Its)18 b(\014rst)f(argumen)o(t)f(is)i(a)f(table)g(and)-42
2379−2202 y(its)e(second)i(argumen)o(t)c(is)j(an)f(index)h(in)g(this)f
2380−(table.)21 b(It)15 b(returns)h(the)g(next)f(index)h(of)g(the)f(table)h
2381−(and)f(the)h(v)m(alue)-42 2258 y(asso)q(ciated)g(with)f(the)h(index.)23
2382−b(When)17 b(called)e(with)h Fk(nil)f Fn(as)g(its)h(second)g(argumen)o
2383−(t,)e(the)j(function)e(returns)h(the)-42 2315 y(\014rst)g(index)g(of)g
2384−(the)g(table)g(\(and)f(its)h(asso)q(ciated)f(v)m(alue\).)22
2385−b(When)17 b(called)e(with)h(the)g(last)f(index,)h(or)f(with)h
2386−Fk(nil)f Fn(in)-42 2371 y(an)h(empt)o(y)e(table,)g(it)g(returns)h
2387−Fk(nil)p Fn(.)29 2428 y(In)i(Lua)f(there)g(is)g(no)g(declaration)f(of)h
2388−(\014elds;)g(seman)o(tically)l(,)d(there)j(is)g(no)g(di\013erence)g(b)q
2389−(et)o(w)o(een)h(a)e(\014eld)i(not)-42 2484 y(presen)o(t)g(in)f(a)g
2390−(table)f(or)h(a)g(\014eld)h(with)e(v)m(alue)i Fk(nil)p
2391−Fn(.)22 b(Therefore,)16 b(the)g(function)g(only)g(considers)g(\014elds)
2392−h(with)e(non)-42 2540 y(nil)g(v)m(alues.)20 b(The)c(order)f(the)g
2393−(indices)g(are)g(en)o(umerated)f(is)h(not)g(sp)q(eci\014ed,)h
2394−Fm(even)f(for)i(numeric)f(indic)n(es)p Fn(.)29 2597 y(See)g(Section)f
2395−(7.1)f(for)h(an)g(example)f(of)h(the)g(use)h(of)e(this)h(function.)911
2396−2748 y(16)p eop
2397−%%Page: 17 17
2398−17 16 bop -42 199 a Fl(nextvar)23 b(\(name\))-42 285
2399−y Fn(This)18 b(function)g(is)g(similar)d(to)i(the)i(function)f
2400−Fl(next)p Fn(,)f(but)i(it)e(iterates)g(o)o(v)o(er)g(the)h(global)f(v)m
2401−(ariables.)28 b(Its)18 b(single)-42 342 y(argumen)o(t)c(is)h(the)h
2402−(name)e(of)h(a)g(global)f(v)m(ariable,)g(or)h Fk(nil)g
2403−Fn(to)g(get)g(a)g(\014rst)g(name.)k(Similarly)13 b(to)h
2404−Fl(next)p Fn(,)h(it)g(returns)-42 398 y(the)j(name)e(of)g(another)h(v)m
2405−(ariable)f(and)h(its)f(v)m(alue,)i(or)e Fk(nil)g Fn(if)g(there)h(are)g
2406−(no)g(more)e(v)m(ariables.)25 b(See)18 b(Section)e(7.1)-42
2407−454 y(for)f(an)g(example)f(of)h(the)g(use)h(of)f(this)f(function.)-42
2408−574 y Fl(print)24 b(\(e1,)f(e2,)g(...\))-42 660 y Fn(This)18
2409−b(function)g(receiv)o(es)g(an)o(y)g(n)o(um)o(b)q(er)g(of)f(argumen)o
2410−(ts,)g(and)h(prin)o(ts)g(their)f(v)m(alues)i(in)f(a)g(reasonable)f
2411−(format.)-42 717 y(Eac)o(h)i(v)m(alue)g(is)f(prin)o(ted)h(in)f(a)h(new)
2412−g(line.)30 b(This)18 b(function)h(is)f(not)g(in)o(tended)h(for)f
2413−(formatted)f(output,)i(but)g(as)-42 773 y(a)h(quic)o(k)f(w)o(a)o(y)g
2414−(to)g(sho)o(w)g(a)g(v)m(alue,)i(for)e(instance)g(for)g(error)g
2415−(messages)f(or)h(debugging.)34 b(See)20 b(Section)f(6.4)g(for)-42
2416−830 y(functions)c(for)g(formatted)e(output.)-42 950 y
2417−Fl(tonumber)23 b(\(e\))-42 1036 y Fn(This)13 b(function)f(receiv)o(es)g
2418−(one)h(argumen)o(t,)e(and)h(tries)g(to)g(con)o(v)o(ert)f(it)h(to)g(a)g
2419−(n)o(um)o(b)q(er.)18 b(If)13 b(the)g(argumen)o(t)d(is)i(already)-42
2420−1092 y(a)j(n)o(um)o(b)q(er)g(or)g(a)g(string)f(con)o(v)o(ertible)g(to)h
2421−(a)g(n)o(um)o(b)q(er)f(\(see)h(Section)h(4.2\),)d(it)i(returns)g(that)f
2422−(n)o(um)o(b)q(er;)h(otherwise,)-42 1148 y(it)g(returns)g
2423−Fk(nil)p Fn(.)-42 1269 y Fl(type)24 b(\(v\))-42 1354
2424−y Fn(This)13 b(function)h(allo)o(ws)d(Lua)j(to)e(test)h(the)g(t)o(yp)q
2425−(e)h(of)f(a)g(v)m(alue.)19 b(It)13 b(receiv)o(es)h(one)f(argumen)o(t,)f
2426−(and)h(returns)g(its)g(t)o(yp)q(e,)-42 1411 y(co)q(ded)21
2427−b(as)e(a)g(string.)31 b(The)19 b(p)q(ossible)g(results)g(of)g(this)g
2428−(function)g(are)g Fl("nil")g Fn(\(a)f(string,)h(not)g(the)h(v)m(alue)f
2429−Fk(nil)p Fn(\),)-42 1467 y Fl("number")p Fn(,)g Fl("string")p
2430−Fn(,)g Fl("table")p Fn(,)h Fl("function")e Fn(\(returned)h(b)q(oth)h
2431−(for)f(C)g(functions)g(and)h(Lua)f(functions\),)-42 1524
2432−y(and)d Fl("userdata")p Fn(.)29 1580 y(Besides)f(this)f(string,)f(the)i
2433−(function)f(returns)h(a)f(second)h(result,)f(whic)o(h)g(is)g(the)h
2434−Fm(tag)g Fn(of)f(the)g(v)m(alue.)20 b(This)14 b(tag)-42
2435−1637 y(can)g(b)q(e)h(used)f(to)f(distinguish)g(b)q(et)o(w)o(een)g(user)
2436−h(data)f(with)g(di\013eren)o(t)g(tags,)g(and)h(b)q(et)o(w)o(een)f(C)h
2437−(functions)f(and)h(Lua)-42 1693 y(functions.)-42 1813
2438−y Fl(error)24 b(\(message\))-42 1899 y Fn(This)e(function)f(issues)g
2439−(an)h(error)f(message)f(and)h(terminates)f(the)h(last)g(called)g
2440−(function)g(from)f(the)i(library)-42 1955 y(\()p Fl(lua_dofile)p
2441−Fn(,)14 b Fl(lua_dostring)p Fn(,)f Fc(:)8 b(:)g(:)d Fn(\).)20
2442−b(It)15 b(nev)o(er)g(returns.)-42 2075 y Fl(setglobal)23
2443−b(\(name,)g(value\))-42 2161 y Fn(This)18 b(function)h(assigns)e(the)i
2444−(giv)o(en)f(v)m(alue)g(to)g(a)g(global)f(v)m(ariable.)29
2445−b(The)19 b(string)e Fl(name)h Fn(do)q(es)h(not)f(need)h(to)f(b)q(e)-42
2446−2218 y(a)f(syn)o(tactically)d(v)m(alid)i(v)m(ariable)g(name.)22
2447−b(Therefore,)17 b(this)f(function)g(can)g(set)h(global)e(v)m(ariables)g
2448−(with)h(strange)-42 2274 y(names)f(lik)o(e)f Fl(m)24
2449−b(v)f(1)15 b Fn(or)g Fl(34)p Fn(.)-42 2394 y Fl(getglobal)23
2450−b(\(name\))-42 2480 y Fn(This)e(function)g(retriev)o(es)g(the)g(v)m
2451−(alue)h(of)f(a)g(global)f(v)m(ariable.)37 b(The)22 b(string)e
2452−Fl(name)h Fn(do)q(es)g(not)g(need)h(to)f(b)q(e)h(a)-42
2453−2536 y(syn)o(tactically)14 b(v)m(alid)g(v)m(ariable)h(name.)911
2454−2748 y(17)p eop
2455−%%Page: 18 18
2456−18 17 bop -42 199 a Fl(setfallback)23 b(\(fallbackname,)f
2457−(newfallback\))-42 285 y Fn(This)13 b(function)f(sets)g(a)h(new)f
2458−(fallbac)o(k)g(function)g(to)g(the)h(giv)o(en)f(fallbac)o(k.)18
2459−b(It)12 b(returns)h(the)g(old)f(fallbac)o(k)f(function.)-42
2460−407 y Fd(6.2)56 b(String)19 b(Manipulation)-42 493 y
2461−Fn(This)j(library)e(pro)o(vides)i(generic)f(functions)h(for)f(string)g
2462−(manipulation,)f(suc)o(h)i(as)g(\014nding)g(and)g(extracting)-42
2463−549 y(substrings.)29 b(When)19 b(indexing)f(a)g(string,)f(the)i
2464−(\014rst)f(c)o(haracter)f(has)h(p)q(osition)g(1.)29 b(See)19
2465−b(Section)f(7.2)f(for)h(some)-42 606 y(examples)c(on)i(string)e
2466−(manipulation)f(in)i(Lua.)-42 726 y Fl(strfind)23 b(\(str,)h(substr,)e
2467−([init,)i([end]]\))-42 811 y Fn(Receiv)o(es)c(t)o(w)o(o)e(string)h
2468−(argumen)o(ts,)f(and)h(returns)g(a)g(n)o(um)o(b)q(er.)32
2469−b(This)19 b(n)o(um)o(b)q(er)f(indicates)h(the)g(\014rst)g(p)q(osition)
2470−-42 868 y(where)13 b(the)f(second)h(argumen)o(t)e(app)q(ears)h(in)g
2471−(the)g(\014rst)g(argumen)o(t.)17 b(If)c(the)f(second)h(argumen)o(t)d
2472−(is)i(not)g(a)g(substring)-42 924 y(of)j(the)g(\014rst)g(one,)f(then)i
2473−Fl(strfind)e Fn(returns)h Fk(nil)p Fn(.)j(A)e(third)e(optional)g(n)o
2474−(umerical)f(argumen)o(t)g(sp)q(eci\014es)j(where)f(to)-42
2475−981 y(start)f(the)i(searc)o(h.)j(Another)d(optional)d(n)o(umerical)h
2476−(argumen)o(t)f(sp)q(eci\014es)j(where)g(to)e(stop)h(it.)-42
2477−1101 y Fl(strlen)24 b(\(s\))-42 1187 y Fn(Receiv)o(es)16
2478−b(a)f(string)f(and)i(returns)f(its)f(length.)-42 1307
2479−y Fl(strsub)24 b(\(s,)f(i,)h([j]\))-42 1392 y Fn(Returns)17
2480−b(another)f(string,)f(whic)o(h)h(is)g(a)g(substring)g(of)g
2481−Fl(s)p Fn(,)g(starting)e(at)i Fl(i)g Fn(and)g(runing)g(un)o(til)g
2482−Fl(j)p Fn(.)23 b(If)16 b Fl(j)g Fn(is)g(absen)o(t,)-42
2483−1449 y(it)f(is)g(assumed)g(to)f(b)q(e)i(equal)g(to)e(the)i(length)f(of)
2484−g Fl(s)p Fn(.)20 b(P)o(articularly)l(,)13 b(the)j(call)e
2485−Fl(strsub\(s,1,j\))g Fn(returns)h(a)g(pre\014x)-42 1505
2486−y(of)g Fl(s)g Fn(with)g(length)g Fl(j)p Fn(,)f(while)h(the)g(call)g
2487−Fl(strsub\(s,i\))e Fn(returns)i(a)g(su\016x)g(of)g Fl(s)p
2488−Fn(,)g(starting)e(at)i Fl(i)p Fn(.)-42 1625 y Fl(strlower)23
2489−b(\(s\))-42 1711 y Fn(Receiv)o(es)14 b(a)e(string)g(and)h(returns)f(a)h
2490−(cop)o(y)f(of)h(that)f(string)f(with)h(all)g(upp)q(er)i(case)f(letters)
2491−e(c)o(hanged)i(to)f(lo)o(w)o(er)g(case.)-42 1768 y(All)j(other)g(c)o
2492−(haracters)f(are)h(left)g(unc)o(hanged.)-42 1888 y Fl(strupper)23
2493−b(\(s\))-42 1974 y Fn(Receiv)o(es)14 b(a)e(string)g(and)h(returns)f(a)h
2494−(cop)o(y)f(of)h(that)f(string)f(with)h(all)g(lo)o(w)o(er)f(case)i
2495−(letters)f(c)o(hanged)h(to)f(upp)q(er)i(case.)-42 2030
2496−y(All)h(other)g(c)o(haracters)f(are)h(left)g(unc)o(hanged.)-42
2497−2150 y Fl(ascii)24 b(\(s,)f([i]\))-42 2236 y Fn(Returns)16
2498−b(the)f(ascii)g(co)q(de)h(of)e(the)i(c)o(haracter)e Fl(s[i])p
2499−Fn(.)19 b(If)d Fl(i)f Fn(is)g(absen)o(t,)f(it)h(is)f(assumed)h(to)f(b)q
2500−(e)i(1.)-42 2356 y Fl(int2str)23 b(\()p Fi(f)p Fl(i)p
2501−Fi(g)p Fl(\))-42 2442 y Fn(Receiv)o(es)e(0)f(or)g(more)f(n)o(um)o(b)q
2502−(ers.)34 b(Returns)21 b(a)f(string)f(with)h(length)g(equal)g(to)g(the)g
2503−(n)o(um)o(b)q(er)g(of)g(argumen)o(ts,)-42 2498 y(wherein)c(eac)o(h)f(c)
2504−o(haracter)g(has)g(ascii)f(v)m(alue)h(equal)g(to)g(its)f(corresp)q
2505−(onden)o(t)i(argumen)o(t.)911 2748 y(18)p eop
2506−%%Page: 19 19
2507−19 18 bop -42 199 a Fd(6.3)56 b(Mathematical)20 b(F)-5
2508−b(unctions)-42 285 y Fn(This)13 b(library)f(is)h(an)g(in)o(terface)f
2509−(to)h(some)e(functions)i(of)g(the)g(standard)g(C)g(math)e(library)l(.)
2510−19 b(Moreo)o(v)o(er,)11 b(it)i(registers)-42 342 y(a)i(fallbac)o(k)f
2511−(for)h(the)g(binary)g(op)q(erator)f Fl(^)h Fn(whic)o(h,)g(when)h
2512−(applied)f(to)f(n)o(um)o(b)q(ers)h Fl(x^y)p Fn(,)f(returns)h
2513−Fc(x)1619 325 y Fb(y)1639 342 y Fn(.)29 398 y(The)g(library)f(pro)o
2514−(vides)h(the)g(follo)o(wing)e(functions:)-42 492 y Fl(abs)24
2515−b(acos)f(asin)h(atan)f(atan2)g(ceil)g(cos)h(floor)-42
2516−548 y(log)g(log10)f(max)h(min)47 b(mod)g(sin)h(sqrt)23
2517−b(tan)-42 642 y Fn(Most)17 b(of)g(them)g(are)g(only)g(in)o(terfaces)g
2518−(to)g(the)g(homon)o(ymous)e(functions)j(in)f(the)h(C)f(library)l(,)g
2519−(except)h(that,)f(for)-42 699 y(the)f(trigonometri)o(c)d(functions,)h
2520−(all)h(angles)f(are)h(expressed)h(in)f(degrees.)29 755
2521−y(The)d(function)f Fl(max)g Fn(returns)g(the)g(maxim)o(um)d(v)m(alue)j
2522−(of)g(its)f(n)o(umeric)h(argumen)o(ts.)16 b(Similarly)l(,)9
2523−b Fl(min)i Fn(computes)-42 811 y(the)16 b(minim)o(um)o(.)h(Both)e(can)g
2524−(b)q(e)h(used)g(with)e(an)h(unlimited)f(n)o(um)o(b)q(er)g(of)h(argumen)
2525−o(ts.)29 868 y(The)g(function)h Fl(mod)e Fn(is)h(equiv)m(alen)o(t)g(to)
2526−f(the)i Fl(\045)f Fn(op)q(erator)f(in)h(C.)-42 990 y
2527−Fd(6.4)56 b(I/O)19 b(F)-5 b(acilities)-42 1075 y Fn(All)20
2528−b(I/O)g(op)q(erations)f(in)h(Lua)g(are)f(done)i(o)o(v)o(er)e(t)o(w)o(o)
2529−f Fm(curr)n(ent)i Fn(\014les,)g(one)g(for)g(reading)f(and)h(one)g(for)f
2530−(writing.)-42 1132 y(Initially)l(,)14 b(the)h(curren)o(t)g(input)h
2531−(\014le)f(is)g Fl(stdin)p Fn(,)f(and)h(the)g(curren)o(t)g(output)g
2532−(\014le)h(is)e Fl(stdout)p Fn(.)29 1188 y(Unless)h(otherwise)g(stated,)
2533−f(all)g(I/O)i(functions)f(return)g(1)g(on)g(success)h(and)f
2534−Fk(nil)f Fn(on)h(failure.)-42 1308 y Fl(readfrom)23 b(\(filename\))-42
2535−1394 y Fn(This)e(function)g(op)q(ens)g(a)g(\014le)g(named)f
2536−Fl(filename)g Fn(and)h(sets)g(it)f(as)h(the)g Fm(curr)n(ent)f
2537−Fn(input)h(\014le.)38 b(When)21 b(called)-42 1451 y(without)c
2538−(parameters,)e(this)i(function)g(closes)f(the)i(curren)o(t)f(input)g
2539−(\014le,)g(and)h(restores)e Fl(stdin)h Fn(as)f(the)i(curren)o(t)-42
2540−1507 y(input)e(\014le.)29 1564 y Fm(System)f(dep)n(endent:)k
2541−Fn(if)13 b Fl(filename)h Fn(starts)e(with)i(a)g Fl(|)p
2542−Fn(,)g(then)g(a)g(pip)q(ed)h(input)g(is)e(op)q(en,)i(via)e(function)i
2543−Fl(popen)p Fn(.)-42 1684 y Fl(writeto)23 b(\(filename\))-42
2544−1769 y Fn(This)13 b(function)g(op)q(ens)h(a)e(\014le)i(named)e
2545−Fl(filename)g Fn(and)h(sets)g(it)f(as)h(the)g Fm(curr)n(ent)g
2546−Fn(output)g(\014le.)19 b(Notice)12 b(that,)h(if)f(the)-42
2547−1826 y(\014le)19 b(already)e(exists,)g(it)h(is)f(completely)f(erased)j
2548−(with)e(this)g(op)q(eration.)28 b(When)18 b(called)g(without)f
2549−(parameters,)-42 1882 y(this)e(function)g(closes)g(the)g(curren)o(t)g
2550−(output)g(\014le,)g(and)h(restores)e Fl(stdout)g Fn(as)h(the)g(curren)o
2551−(t)g(output)g(\014le.)29 1939 y Fm(System)e(dep)n(endent:)18
2552−b Fn(if)12 b Fl(filename)f Fn(starts)g(with)h(a)g Fl(|)p
2553−Fn(,)g(then)h(a)f(pip)q(ed)h(output)g(is)e(op)q(en,)j(via)d(function)i
2554−Fl(popen)p Fn(.)-42 2059 y Fl(appendto)23 b(\(filename\))-42
2555−2145 y Fn(This)11 b(function)g(op)q(ens)h(a)f(\014le)g(named)f
2556−Fl(filename)g Fn(and)i(sets)f(it)f(as)h(the)g Fm(curr)n(ent)g
2557−Fn(output)g(\014le.)19 b(Unlik)o(e)10 b(the)h Fl(writeto)-42
2558−2201 y Fn(op)q(eration,)16 b(this)f(function)h(do)q(es)h(not)f(erase)f
2559−(an)o(y)h(previous)g(con)o(ten)o(t)g(of)f(the)i(\014le.)22
2560−b(This)16 b(function)g(returns)g(2)g(if)-42 2258 y(the)g(\014le)f
2561−(already)f(exists,)h(1)f(if)h(it)g(creates)g(a)f(new)i(\014le,)f(and)g
2562−Fk(nil)f Fn(on)h(failure.)-42 2378 y Fl(remove)24 b(\(filename\))-42
2563−2463 y Fn(This)15 b(function)g(deletes)h(the)f(\014le)g(with)g(the)g
2564−(giv)o(en)g(name.)911 2748 y(19)p eop
2565−%%Page: 20 20
2566−20 19 bop -42 199 a Fl(read)24 b(\([format]\))-42 285
2567−y Fn(This)17 b(function)g(returns)f(a)h(v)m(alue)g(read)g(from)e(the)i
2568−(curren)o(t)g(input.)25 b(An)17 b(optional)f(string)g(argumen)o(t)f(sp)
2569−q(eci\014es)-42 342 y(the)h(w)o(a)o(y)e(the)h(input)g(is)g(in)o
2570−(terpreted.)29 398 y(Without)d(a)h(format)d(argumen)o(t,)h
2571−Fl(read)i Fn(\014rst)f(skips)h(blanks,)g(tabs)f(and)h(newlines.)19
2572−b(Then)14 b(it)e(c)o(hec)o(ks)h(whether)-42 454 y(the)h(curren)o(t)f(c)
2573−o(haracter)f(is)h Fl(")g Fn(or)f Fl(')p Fn(.)19 b(If)14
2574−b(so,)e(it)h(reads)g(a)f(string)g(up)i(to)f(the)g(ending)g(quotation)f
2575−(mark,)f(and)j(returns)-42 511 y(this)h(string,)f(without)g(the)h
2576−(quotation)f(marks.)k(Otherwise)d(it)g(reads)g(up)h(to)e(a)h(blank,)g
2577−(tab)f(or)h(newline.)29 567 y(The)g(format)e(string)i(can)g(ha)o(v)o(e)
2578−g(the)g(follo)o(wing)e(format:)30 658 y Fl(?[n])-42 748
2579−y Fn(where)j Fl(?)f Fn(can)g(b)q(e:)-42 839 y Fk('s')i(or)g('S')k
2580−Fn(to)15 b(read)g(a)g(string;)-42 931 y Fk('f)5 b(')17
2581−b(or)g('F')22 b Fn(to)14 b(read)h(a)g(real)g(n)o(um)o(b)q(er;)-42
2582−1024 y Fk('i')h(or)i('I')j Fn(to)15 b(read)g(an)g(in)o(teger.)-42
2583−1114 y(The)e(optional)e Fl(n)h Fn(is)g(a)g(n)o(um)o(b)q(er)g(whic)o(h)g
2584−(sp)q(eci\014es)h(ho)o(w)f(man)o(y)f(c)o(haracters)h(m)o(ust)e(b)q(e)j
2585−(read)g(to)e(comp)q(ose)h(the)g(input)-42 1171 y(v)m(alue.)21
2586−b(P)o(articularly)l(,)12 b(the)k(format)c Fl("s1")j Fn(reads)g(a)g
2587−(single)g(c)o(haracter.)-42 1290 y Fl(readuntil)23 b(\(char\))-42
2588−1376 y Fn(Reads)18 b(the)f(curren)o(t)g(input)g(un)o(til)f(the)g
2589−(\014rst)h(o)q(currence)h(of)e(the)h(giv)o(en)f(c)o(haracter.)25
2590−b(Returns)17 b(the)g(string)f(read.)-42 1432 y(The)g(c)o(haracter)e
2591−(itself)h(is)f(not)h(read.)-42 1552 y Fl(write)24 b(\(value,)f
2592−([format]\))-42 1637 y Fn(This)d(function)g(writes)f(the)i(v)m(alue)f
2593−(of)g(its)f(\014rst)h(argumen)o(t)e(to)i(the)g(curren)o(t)g(output.)35
2594−b(An)20 b(optional)f(second)-42 1694 y(argumen)o(t)13
2595−b(sp)q(eci\014es)i(the)f(format)e(to)i(b)q(e)h(used.)20
2596−b(This)14 b(format)e(is)i(giv)o(en)f(as)h(a)g(string,)f(comp)q(osed)h
2597−(of)g(four)f(parts.)-42 1750 y(The)j(\014rst)f(part)f(is)h(the)g(only)g
2598−(one)g(not)g(optional,)f(and)h(m)o(ust)f(b)q(e)i(one)f(of)g(the)g
2599−(follo)o(wing)e(c)o(haracters:)-42 1841 y Fk('s')k(or)g('S')k
2600−Fn(to)15 b(write)f(strings;)-42 1933 y Fk('f)5 b(')17
2601−b(or)g('F')22 b Fn(to)14 b(write)g(\015oats;)-42 2026
2602−y Fk('i')i(or)i('I')j Fn(to)15 b(write)f(in)o(tegers.)-42
2603−2116 y(These)i(c)o(haracters)e(can)i(b)q(e)g(follo)o(w)o(ed)d(b)o(y)30
2604−2207 y Fl([?][m][.n])-42 2297 y Fn(where:)-42 2388 y
2605−Fl(?)23 b Fn(indicates)15 b(justi\014cation)f(inside)h(the)g(\014eld.)
2606−100 2480 y(')p Fl(<)p Fn(')22 b(righ)o(t)14 b(justi\014cation)g
2607−(\(default\);)100 2552 y(')p Fl(>)p Fn(')22 b(left)15
2608−b(justi\014cation;)100 2623 y(')p Fl(|)p Fn(')22 b(cen)o(ter)15
2609−b(justi\014cation.)911 2748 y(20)p eop
2610−%%Page: 21 21
2611−21 20 bop -42 199 a Fl(m)23 b Fn(Indicates)16 b(the)f(\014eld)g(size)g
2612−(in)g(c)o(haracters.)-42 293 y Fl(.n)23 b Fn(F)l(or)18
2613−b(reals,)h(indicates)f(the)h(n)o(um)o(b)q(er)f(of)g(digital)f(places.)
2614−31 b(F)l(or)18 b(in)o(tegers,)h(it)f(is)g(the)h(minim)o(um)c(n)o(um)o
2615−(b)q(er)j(of)72 350 y(digits.)h(This)c(option)f(has)h(no)g(meaning)f
2616−(for)h(strings.)29 443 y(When)20 b(called)e(without)g(a)h(format)e
2617−(string,)i(this)f(function)h(writes)f(n)o(um)o(b)q(ers)h(using)f(the)i
2618−Fl(\045g)e Fn(format)f(and)-42 500 y(strings)e(with)f
2619−Fl(\045s)p Fn(.)-42 643 y Fo(7)67 b(Some)22 b(Examples)-42
2620−744 y Fn(This)17 b(section)f(giv)o(es)g(examples)g(sho)o(wing)g(some)g
2621−(features)g(of)h(Lua.)25 b(It)17 b(do)q(es)g(not)g(in)o(tend)f(to)h(co)
2622−o(v)o(er)f(the)h(whole)-42 801 y(language,)e(but)g(only)g(to)f
2623−(illustrate)f(some)h(in)o(teresting)g(uses)i(of)e(the)i(system.)-42
2624−923 y Fd(7.1)56 b(The)18 b(F)-5 b(unctions)21 b Fa(next)c
2625−Fd(and)i Fa(nextvar)-42 1008 y Fn(This)f(example)f(sho)o(ws)g(ho)o(w)h
2626−(to)f(use)i(the)f(function)g Fl(next)f Fn(to)h(iterate)f(o)o(v)o(er)g
2627−(the)h(\014elds)g(of)g(a)g(table.)28 b(F)l(unction)-42
2628−1065 y Fm(clone)15 b Fn(receiv)o(es)g(an)o(y)g(table)f(and)i(returns)f
2629−(a)g(clone)g(of)g(it.)-42 1159 y Fl(function)23 b(clone)g(\(t\))263
2630−b(--)23 b(t)h(is)f(a)h(table)6 1215 y(local)f(new_t)h(=)f({})263
2631−b(--)23 b(creates)g(a)h(new)f(table)6 1272 y(local)g(i,)h(v)g(=)f
2632−(next\(t,)g(nil\))48 b(--)23 b(i)h(is)f(an)h(index)f(of)h(t,)f(v)h(=)g
2633−(t[i])6 1328 y(while)f(i)h(do)54 1385 y(new_t[i])f(=)g(v)54
2634−1441 y(i,)h(v)f(=)h(next\(t,)f(i\))191 b(--)23 b(get)h(next)f(index)6
2635−1497 y(end)6 1554 y(return)g(new_t)-42 1610 y(end)29
2636−1704 y Fn(The)15 b(next)h(example)e(prin)o(ts)g(the)i(names)e(of)g(all)
2637−h(global)e(v)m(ariables)i(in)g(the)g(system)f(with)h(non)g(nil)g(v)m
2638−(alues:)-42 1798 y Fl(function)23 b(printGlobalVariables)e(\(\))6
2639−1854 y(local)i(i,)h(v)g(=)f(nextvar\(nil\))6 1911 y(while)g(i)h(do)54
2640−1967 y(print\(i\))54 2024 y(i,)g(v)f(=)h(nextvar\(i\))6
2641−2080 y(end)-42 2137 y(end)-42 2258 y Fd(7.2)56 b(String)19
2642−b(Manipulation)-42 2344 y Fn(The)d(\014rst)f(example)f(is)g(a)h
2643−(function)g(to)g(trim)e(extra)i(blanks)g(at)f(the)h(b)q(eginning)h(and)
2644−f(end)h(of)f(a)g(string.)-42 2438 y Fl(function)23 b(trim\(s\))6
2645−2495 y(local)g(l)h(=)g(1)6 2551 y(while)f(strsub\(s,l,l\))f(==)i(')g(')
2646−g(do)54 2607 y(l)g(=)f(l+1)911 2748 y Fn(21)p eop
2647−%%Page: 22 22
2648−22 21 bop 6 199 a Fl(end)6 256 y(local)23 b(r)h(=)g(strlen\(s\))6
2649−312 y(while)f(strsub\(s,r,r\))f(==)i(')g(')g(do)54 369
2650−y(r)g(=)f(r-1)6 425 y(end)6 482 y(return)g(strsub\(s,l,r\))-42
2651−538 y(end)29 631 y Fn(The)15 b(second)h(example)e(sho)o(ws)h(a)g
2652−(function)g(that)f(eliminates)f(all)h(blanks)h(of)g(a)g(string.)-42
2653−723 y Fl(function)23 b(remove_blanks)f(\(s\))6 780 y(local)h(b)h(=)g
2654−(strfind\(s,)e(')i('\))6 836 y(while)f(b)h(do)54 893
2655−y(s)g(=)f(strsub\(s,)g(1,)h(b-1\))f(..)h(strsub\(s,)e(b+1\))54
2656−949 y(b)i(=)f(strfind\(s,)g(')h('\))6 1006 y(end)6 1062
2657−y(return)f(s)-42 1118 y(end)-42 1240 y Fd(7.3)56 b(P)n(ersistence)-42
2658−1326 y Fn(Because)21 b(of)e(its)g(re\015exiv)o(e)g(facilities,)g(p)q
2659−(ersistence)h(in)f(Lua)h(can)g(b)q(e)g(ac)o(hiev)o(ed)g(within)f(the)g
2660−(language.)33 b(This)-42 1382 y(section)12 b(sho)o(ws)f(some)g(w)o(a)o
2661−(ys)g(to)g(store)g(and)h(retriev)o(e)f(v)m(alues)i(in)e(Lua,)i(using)f
2662−(a)f(text)h(\014le)g(written)e(in)i(the)g(language)-42
2663−1439 y(itself)j(as)f(the)i(storage)e(media.)29 1495 y(T)l(o)h(store)f
2664−(a)h(single)g(v)m(alue)g(with)g(a)g(name,)f(the)h(follo)o(wing)e(co)q
2665−(de)j(is)e(enough:)-42 1588 y Fl(function)23 b(store)g(\(name,)g
2666−(value\))6 1644 y(write\('\\n')g(..)g(name)h(..)f('='\))6
2667−1701 y(write_value\(value\))-42 1757 y(end)-42 1862 y(function)g
2668−(write_value)g(\(value\))6 1918 y(local)g(t)h(=)g(type\(value\))102
2669−1975 y(if)f(t)h(==)g('nil')94 b(then)24 b(write\('nil'\))6
2670−2031 y(elseif)f(t)h(==)g('number')e(then)i(write\(value\))6
2671−2088 y(elseif)f(t)h(==)g('string')e(then)i(write\('[[')e(..)i(value)f
2672−(..)h(']]'\))6 2144 y(end)-42 2200 y(end)-42 2305 y Fn(In)16
2673−b(order)f(to)g(restore)f(this)h(v)m(alue,)g(a)g Fl(lua_dofile)f
2674−Fn(su\016ces.)29 2361 y(Storing)i(tables)h(is)g(a)g(little)e(more)h
2675−(complex.)25 b(Assuming)16 b(that)g(the)h(table)g(is)g(a)g(tree,)g(and)
2676−g(all)f(indices)i(are)-42 2418 y(iden)o(ti\014ers)13
2677−b(\(that)e(is,)i(the)g(tables)f(are)g(b)q(eing)h(used)g(as)g
2678−(records\),)f(its)g(v)m(alue)h(can)g(b)q(e)g(written)f(directly)g(with)
2679−g(table)-42 2474 y(constructors.)19 b(First,)14 b(the)h(function)g
2680−Fl(write_value)f Fn(is)h(c)o(hanged)g(to)-42 2567 y Fl(function)23
2681−b(write_value)g(\(value\))6 2623 y(local)g(t)h(=)g(type\(value\))911
2682−2748 y Fn(22)p eop
2683−%%Page: 23 23
2684−23 22 bop 102 199 a Fl(if)23 b(t)h(==)g('nil')94 b(then)24
2685−b(write\('nil'\))6 256 y(elseif)f(t)h(==)g('number')e(then)i
2686−(write\(value\))6 312 y(elseif)f(t)h(==)g('string')e(then)i(write\('"')
2687−e(..)i(value)f(..)h('"'\))6 369 y(elseif)f(t)h(==)g('table')46
2688−b(then)24 b(write_record\(value\))6 425 y(end)-42 482
2689−y(end)-42 575 y Fn(The)16 b(function)f Fl(write_record)e
2690−Fn(is:)-42 669 y Fl(function)23 b(write_record\(t\))6
2691−726 y(local)g(i,)h(v)g(=)f(next\(t,)g(nil\))6 782 y(write\('{'\))47
2692−b(--)23 b(starts)g(constructor)6 839 y(while)g(i)h(do)54
2693−895 y(store\(i,)f(v\))54 951 y(write\(',)g('\))54 1008
2694−y(i,)h(v)f(=)h(next\(t,)f(i\))6 1064 y(end)6 1121 y(write\('}'\))47
2695−b(--)23 b(closes)g(constructor)-42 1177 y(end)-42 1299
2696−y Fd(7.4)56 b(Inheritance)-42 1385 y Fn(The)15 b(fallbac)o(k)f(for)g
2697−(absen)o(t)g(indices)h(can)g(b)q(e)g(used)g(to)f(implemen)o(t)e(man)o
2698−(y)h(kinds)i(of)f(inheritance)g(in)h(Lua.)20 b(As)15
2699−b(an)-42 1441 y(example,)f(the)h(follo)o(wing)e(co)q(de)j(implemen)o
2700−(ts)d(single)h(inheritance:)-42 1535 y Fl(function)23
2701−b(Index)g(\(t,f\))6 1592 y(if)h(f)g(==)f('parent')g(then)47
2702−b(--)24 b(to)f(avoid)g(loop)54 1648 y(return)g(OldIndex\(t,f\))6
2703−1704 y(end)6 1761 y(local)g(p)h(=)g(t.parent)6 1817 y(if)g(type\(p\))f
2704−(==)g('table')g(then)54 1874 y(return)g(p[f])6 1930 y(else)54
2705−1987 y(return)g(OldIndex\(t,f\))6 2043 y(end)-42 2100
2706−y(end)-42 2213 y(OldIndex)g(=)h(setfallback\("index",)d(Index\))-42
2707−2306 y Fn(Whenev)o(er)15 b(Lua)g(attempts)d(to)i(access)h(an)f(absen)o
2708−(t)g(\014eld)h(in)f(a)g(table,)g(it)g(calls)f(the)i(fallbac)o(k)e
2709−(function)h Fl(Index)p Fn(.)19 b(If)-42 2363 y(the)14
2710−b(table)e(has)h(a)g(\014eld)h Fl(parent)e Fn(with)h(a)g(table)f(v)m
2711−(alue,)i(then)f(Lua)h(attempts)d(to)h(access)i(the)f(desired)g(\014eld)
2712−h(in)f(this)-42 2419 y(paren)o(t)i(ob)s(ject.)k(This)c(pro)q(cess)g(is)
2713−f(rep)q(eated)h(\\up)o(w)o(ards")f(un)o(til)g(a)h(v)m(alue)g(for)f(the)
2714−h(\014eld)g(is)g(found)g(or)f(the)h(ob)s(ject)-42 2476
2715−y(has)h(no)f(paren)o(t.)k(In)d(the)f(latter)f(case,)h(the)g(previous)g
2716−(fallbac)o(k)f(is)h(called)g(to)f(supply)i(a)e(v)m(alue)i(for)e(the)i
2717−(\014eld.)29 2532 y(When)e(b)q(etter)g(p)q(erformance)f(is)g(needed,)i
2718−(the)f(same)e(fallbac)o(k)h(ma)o(y)f(b)q(e)i(implemen)o(ted)e(in)i(C,)f
2719−(as)g(illustrated)-42 2589 y(in)j(Figure)e(1.)20 b(This)14
2720−b(co)q(de)i(m)o(ust)e(b)q(e)i(registered)e(with:)911
2721−2748 y(23)p eop
2722−%%Page: 24 24
2723−24 23 bop -42 317 1950 6 v -42 411 a Fl(int)24 b(lockedParentName;)45
2724−b(/*)24 b(stores)f(the)g(lock)h(index)f(for)g(the)h(string)f("parent")g
2725−(*/)-42 467 y(int)h(lockedOldIndex;)93 b(/*)24 b(previous)f(fallback)f
2726−(function)h(*/)-42 580 y(void)h(callOldFallback)e(\(lua_Object)g
2727−(table,)h(lua_Object)g(index\))-42 637 y({)6 693 y(lua_Object)g
2728−(oldIndex)f(=)i(lua_getlocked\(lockedOldIndex)o(\);)6
2729−750 y(lua_pushobject\(table\);)6 806 y(lua_pushobject\(index\);)6
2730−863 y(lua_callfunction\(oldIndex\);)-42 919 y(})-42 1032
2731−y(void)g(Index)f(\(void\))-42 1088 y({)6 1145 y(lua_Object)g(table)g(=)
2732−h(lua_getparam\(1\);)6 1201 y(lua_Object)f(index)g(=)h
2733−(lua_getparam\(2\);)6 1258 y(lua_Object)f(parent;)6 1314
2734−y(if)h(\(lua_isstring\(index\))d(&&)j(strcmp\(lua_getstring\(in)o
2735−(dex\),)d("parent"\))h(==)i(0\))6 1371 y({)54 1427 y
2736−(callOldFallback\(table,)d(index\);)54 1484 y(return;)6
2737−1540 y(})6 1597 y(lua_pushobject\(table\);)6 1653 y
2738−(lua_pushlocked\(lockedParentN)o(ame\);)6 1709 y(parent)i(=)h
2739−(lua_getsubscript\(\);)6 1766 y(if)g(\(lua_istable\(parent\)\))6
2740−1822 y({)54 1879 y(lua_pushobject\(parent\);)54 1935
2741−y(lua_pushobject\(index\);)54 1992 y(/*)g(return)f(result)g(from)g
2742−(getsubscript)f(*/)54 2048 y(lua_pushobject\(lua_getsubs)o(cript\(\))o
2743−(\);)6 2105 y(})6 2161 y(else)54 2218 y(callOldFallback\(table,)f
2744−(index\);)-42 2274 y(})665 2409 y Fn(Figure)15 b(1:)k(Inheritance)d(in)
2745−f(C.)p -42 2466 V 911 2748 a(24)p eop
2746−%%Page: 25 25
2747−25 24 bop -42 159 1950 6 v -42 253 a Fl(void)24 b(math_max)f(\(void\))
2748−-42 310 y({)-18 366 y(int)h(i=1;)71 b(/*)23 b(number)g(of)h(arguments)f
2749−(*/)-18 423 y(double)g(d,)h(dmax;)-18 479 y(lua_Object)f(o;)-18
2750−536 y(/*)h(the)f(function)g(must)g(get)h(at)g(least)f(one)g(argument)g
2751−(*/)-18 592 y(if)h(\(\(o)f(=)h(lua_getparam\(i++\)\))e(==)h
2752−(LUA_NOOBJECT\))30 648 y(lua_error)g(\("too)g(few)g(arguments)g(to)h
2753−(function)e(`max'"\);)-18 705 y(/*)i(and)f(this)h(argument)e(must)i(be)
2754−f(a)h(number)f(*/)-18 761 y(if)h(\(!lua_isnumber\(o\)\))30
2755−818 y(lua_error)f(\("incorrect)f(argument)h(to)g(function)g(`max'"\);)
2756−-18 874 y(dmax)h(=)f(lua_getnumber)f(\(o\);)-18 931 y(/*)i(loops)f
2757−(until)g(there)g(is)h(no)g(more)f(arguments)g(*/)-18
2758−987 y(while)h(\(\(o)f(=)h(lua_getparam\(i++\)\))d(!=)j(LUA_NOOBJECT\))
2759−-18 1044 y({)6 1100 y(if)g(\(!lua_isnumber\(o\)\))54
2760−1157 y(lua_error)f(\("incorrect)f(argument)h(to)g(function)g(`max'"\);)
2761−6 1213 y(d)h(=)g(lua_getnumber)e(\(o\);)6 1270 y(if)i(\(d)f(>)h(dmax\))
2762−f(dmax)h(=)f(d;)-18 1326 y(})-18 1382 y(/*)h(push)f(the)h(result)f(to)g
2763−(be)h(returned)f(*/)-18 1439 y(lua_pushnumber)f(\(dmax\);)-42
2764−1495 y(})623 1631 y Fn(Figure)14 b(2:)20 b(C)15 b(function)g
2765−Fl(math)p 1147 1631 15 2 v 16 w(max)p Fn(.)p -42 1687
2766−1950 6 v 6 1815 a Fl(lua_pushliteral\("parent"\);)6 1871
2767−y(lockedParentName)22 b(=)i(lua_lock\(\);)6 1928 y
2768−(lua_pushobject\(lua_setfallba)o(ck\("ind)o(ex",)d(Index\)\);)6
2769−1984 y(lockedOldIndex)h(=)i(lua_lock\(\);)-42 2076 y
2770−Fn(Notice)15 b(ho)o(w)g(the)g(string)f Fl("parent")g
2771−Fn(is)h(k)o(ept)g(lo)q(c)o(k)o(ed)g(in)g(Lua)h(for)e(optimal)f(p)q
2772−(erformance.)-42 2198 y Fd(7.5)56 b(A)19 b(CF)-5 b(unction)-42
2773−2284 y Fn(A)18 b(CF)l(unction)f(to)f(compute)h(the)g(maxim)o(um)c(of)k
2774−(a)g(v)m(ariable)g(n)o(um)o(b)q(er)f(of)h(argumen)o(ts)f(is)h(sho)o(wn)
2775−g(in)g(Figure)f(2.)-42 2340 y(After)f(registered)g(with)-42
2776−2432 y Fl(lua_register)23 b(\("max",)g(math_max\);)-42
2777−2525 y Fn(this)15 b(function)g(is)g(a)o(v)m(ailable)f(in)h(Lua,)g(as)g
2778−(follo)o(ws:)-42 2617 y Fl(i)24 b(=)g(max\(4,)f(5,)h(10,)f(-34\))47
2779−b(--)24 b(i)g(receives)e(10)911 2748 y Fn(25)p eop
2780−%%Page: 26 26
2781−26 25 bop -42 199 a Fd(7.6)56 b(Calling)21 b(Lua)e(F)-5
2782−b(unctions)-42 285 y Fn(This)17 b(example)e(illustrates)f(ho)o(w)i(a)h
2783−(C)f(function)g(can)h(call)e(the)i(Lua)g(function)f Fl(remove_blanks)f
2784−Fn(presen)o(ted)i(in)-42 342 y(Section)f(7.2.)-42 435
2785−y Fl(void)24 b(remove_blanks)e(\(char)h(*s\))-42 492
2786−y({)6 548 y(lua_pushstring\(s\);)45 b(/*)24 b(prepare)f(parameter)g(*/)
2787−6 605 y(lua_call\("remove_blanks"\);)44 b(/*)24 b(call)f(Lua)h
2788−(function)f(*/)6 661 y(strcpy\(s,)g(lua_getstring\(lua_getresu)o
2789−(lt\(1\)\)\))o(;)45 b(/*)24 b(copy)f(result)g(back)g(to)h('s')f(*/)-42
2790−718 y(})-42 861 y Fo(Ac)n(kno)n(wledgmen)n(ts)-42 962
2791−y Fn(The)18 b(authors)f(w)o(ould)g(lik)o(e)f(to)h(thank)h(CENPES/PETR)o
2792−(OBR)1073 951 y(\023)1067 962 y(AS)g(whic)o(h,)g(join)o(tly)d(with)i(T)
2793−l(eCGraf,)g(used)h(ex-)-42 1019 y(tensiv)o(ely)13 b(early)h(v)o
2794−(ersions)f(of)g(this)g(system)g(and)h(ga)o(v)o(e)e(v)m(aluable)i
2795−(commen)o(ts.)j(The)d(authors)f(w)o(ould)g(also)g(lik)o(e)g(to)-42
2796−1075 y(thank)j(Carlos)d(Henrique)j(Levy)l(,)f(who)g(found)h(the)f(name)
2797−f(of)h(the)h(game)1204 1059 y Fj(3)1221 1075 y Fn(.)-42
2798−1218 y Fo(A)68 b(Incompatibiliti)q(es)24 b(with)f(Previous)h(V)-6
2799−b(ersions)-42 1320 y Fn(Although)15 b(great)f(care)h(has)g(b)q(een)h
2800−(tak)o(en)f(to)f(a)o(v)o(oid)g(incompatibiliti)o(es)e(with)j(the)g
2801−(previous)g(public)g(v)o(ersions)f(of)-42 1376 y(Lua,)i(some)e
2802−(di\013erences)h(had)g(to)g(b)q(e)h(in)o(tro)q(duced.)k(Here)15
2803−b(is)g(a)g(list)f(of)h(all)f(these)h(di\013erences.)-42
2804−1498 y Fd(Incompatibilities)21 b(with)f(v)n(ersion)f(2.1)27
2805−1584 y Fi(\017)j Fn(The)16 b(function)g Fl(type)f Fn(no)o(w)h(returns)g
2806−(the)g(string)f Fl(function)f Fn(b)q(oth)i(for)g(C)g(and)g(Lua)g
2807−(functions.)22 b(Because)72 1640 y(Lua)c(functions)g(and)g(C)g
2808−(functions)f(are)h(compatible,)e(this)i(b)q(eha)o(vior)f(is)g(usually)h
2809−(more)e(useful.)28 b(When)72 1697 y(needed,)20 b(the)e(second)g(result)
2810−g(of)f(function)h Fl(type)f Fn(ma)o(y)f(b)q(e)j(used)g(to)e
2811−(distinguish)g(b)q(et)o(w)o(een)h(Lua)h(and)f(C)72 1753
2812−y(functions.)27 1847 y Fi(\017)k Fn(A)15 b(function)g(de\014nition)g
2813−(only)g(assigns)f(the)h(function)g(v)m(alue)g(to)g(the)g(giv)o(en)f(v)m
2814−(ariable)h(at)f(execution)h(time.)-42 1969 y Fd(Incompatibilities)21
2815−b(with)f(v)n(ersion)f(1.1)27 2055 y Fi(\017)j Fn(The)16
2816−b(equalit)o(y)e(test)g(op)q(erator)h(no)o(w)f(is)h(denoted)h(b)o(y)f
2817−Fl(==)p Fn(,)f(instead)h(of)g Fl(=)p Fn(.)27 2148 y Fi(\017)22
2818−b Fn(The)13 b(syn)o(tax)f(for)g(table)g(construction)g(has)h(b)q(een)h
2819−(greatly)d(simpli\014ed.)18 b(The)13 b(old)f Fl(@\(size\))g
2820−Fn(has)g(b)q(een)i(sub-)72 2205 y(stituted)h(b)o(y)h
2821−Fl({})p Fn(.)21 b(The)16 b(list)e(constructor)h(\(formerly)e
2822−Fl(@[...])p Fn(\))i(and)h(the)f(record)h(constructor)f(\(formerly)72
2823−2261 y Fl(@{...})p Fn(\))f(no)o(w)g(are)h(b)q(oth)f(co)q(ded)i(lik)o(e)
2824−e Fl({...})p Fn(.)19 b(When)c(the)g(construction)f(in)o(v)o(olv)o(es)g
2825−(a)g(function)h(call,)e(lik)o(e)72 2318 y(in)i Fl(@func{...})p
2826−Fn(,)e(the)i(new)g(syn)o(tax)f(do)q(es)i(not)e(use)h(the)g
2827−Fl(@)p Fn(.)20 b(More)14 b(imp)q(ortan)o(t,)e Fm(a)17
2828−b(c)n(onstruction)e(function)72 2374 y(must)i(now)f(explicitly)g(r)n
2829−(eturn)g(the)g(c)n(onstructe)n(d)g(table)p Fn(.)27 2468
2830−y Fi(\017)22 b Fn(The)16 b(function)f Fl(lua_call)f Fn(no)h(longer)f
2831−(has)h(the)h(parameter)d Fl(nparam)p Fn(.)p -42 2509
2832−780 2 v 10 2536 a Fh(3)28 2552 y Fg(BTW,)f(Lua)i(means)f
2833−Fe(mo)n(on)f Fg(in)i(P)o(ortuguese.)911 2748 y Fn(26)p
2834−eop
2835−%%Page: 27 27
2836−27 26 bop 27 199 a Fi(\017)22 b Fn(The)g(function)f Fl(lua_pop)g
2837−Fn(is)g(no)h(longer)e(a)o(v)m(ailable,)i(since)g(it)f(could)g(lead)g
2838−(to)g(strange)g(b)q(eha)o(vior.)39 b(In)72 256 y(particular,)18
2839−b(to)h(access)g(results)g(returned)g(from)f(a)g(Lua)i(function,)f(the)h
2840−(new)f(macro)e Fl(lua_getresult)72 312 y Fn(should)e(b)q(e)h(used.)27
2841−406 y Fi(\017)22 b Fn(The)16 b(old)e(functions)h Fl(lua_storefield)f
2842−Fn(and)h Fl(lua_storeindexed)e Fn(ha)o(v)o(e)i(b)q(een)h(replaced)f(b)o
2843−(y)72 518 y Fl(int)24 b(lua_storesubscript)d(\(void\);)72
2844−631 y Fn(with)15 b(the)g(parameters)e(explicitly)h(pushed)j(on)e(the)g
2845−(stac)o(k.)27 725 y Fi(\017)22 b Fn(The)12 b(functionalit)o(y)e(of)i
2846−(the)g(function)f Fl(lua_errorfunction)f Fn(has)h(b)q(een)i(replaced)f
2847−(b)o(y)g(the)g Fm(fal)r(lb)n(ack)f Fn(mec)o(h-)72 781
2848−y(anism;)i(see)j(Section)f(4.8.)27 875 y Fi(\017)22 b
2849−Fn(When)16 b(calling)e(a)h(function)h(from)d(the)j(Lua)g(library)l(,)e
2850−(parameters)g(passed)h(through)h(the)f(stac)o(k)g(m)o(ust)f(b)q(e)72
2851−932 y(pushed)20 b(just)f(b)q(efore)g(the)g(corresp)q(onden)o(t)g(call,)
2852−f(with)g(no)h(in)o(termediate)e(calls)g(to)i(Lua.)31
2853−b(Sp)q(ecial)19 b(care)72 988 y(should)c(b)q(e)h(tak)o(en)f(with)f
2854−(macros)g(lik)o(e)g Fl(lua_getindexed)f Fn(and)j Fl(lua_getfield)p
2855−Fn(.)911 2748 y(27)p eop
2856−%%Trailer
2857−end
2858−userdict /end-hook known{end-hook}if
2859−%%EOF
doc/refman.ps+3562−0
@@ -0,0 +1,3562 @@
1+%!PS-Adobe-2.0
2+%%Creator: dvips 5.58 Copyright 1986, 1994 Radical Eye Software
3+%%Title: manual.dvi
4+%%CreationDate: Tue May 14 15:22:07 1996
5+%%Pages: 38
6+%%PageOrder: Ascend
7+%%BoundingBox: 0 0 612 792
8+%%EndComments
9+%DVIPSCommandLine: _dvips -o manual.ps manual.dvi
10+%DVIPSParameters: dpi=300, comments removed
11+%DVIPSSource: TeX output 1996.05.14:1521
12+%%BeginProcSet: tex.pro
13+/TeXDict 250 dict def TeXDict begin /N{def}def /B{bind def}N /S{exch}N
14+/X{S N}B /TR{translate}N /isls false N /vsize 11 72 mul N /hsize 8.5 72
15+mul N /landplus90{false}def /@rigin{isls{[0 landplus90{1 -1}{-1 1}
16+ifelse 0 0 0]concat}if 72 Resolution div 72 VResolution div neg scale
17+isls{landplus90{VResolution 72 div vsize mul 0 exch}{Resolution -72 div
18+hsize mul 0}ifelse TR}if Resolution VResolution vsize -72 div 1 add mul
19+TR[matrix currentmatrix{dup dup round sub abs 0.00001 lt{round}if}
20+forall round exch round exch]setmatrix}N /@landscape{/isls true N}B
21+/@manualfeed{statusdict /manualfeed true put}B /@copies{/#copies X}B
22+/FMat[1 0 0 -1 0 0]N /FBB[0 0 0 0]N /nn 0 N /IE 0 N /ctr 0 N /df-tail{
23+/nn 8 dict N nn begin /FontType 3 N /FontMatrix fntrx N /FontBBox FBB N
24+string /base X array /BitMaps X /BuildChar{CharBuilder}N /Encoding IE N
25+end dup{/foo setfont}2 array copy cvx N load 0 nn put /ctr 0 N[}B /df{
26+/sf 1 N /fntrx FMat N df-tail}B /dfs{div /sf X /fntrx[sf 0 0 sf neg 0 0]
27+N df-tail}B /E{pop nn dup definefont setfont}B /ch-width{ch-data dup
28+length 5 sub get}B /ch-height{ch-data dup length 4 sub get}B /ch-xoff{
29+128 ch-data dup length 3 sub get sub}B /ch-yoff{ch-data dup length 2 sub
30+get 127 sub}B /ch-dx{ch-data dup length 1 sub get}B /ch-image{ch-data
31+dup type /stringtype ne{ctr get /ctr ctr 1 add N}if}B /id 0 N /rw 0 N
32+/rc 0 N /gp 0 N /cp 0 N /G 0 N /sf 0 N /CharBuilder{save 3 1 roll S dup
33+/base get 2 index get S /BitMaps get S get /ch-data X pop /ctr 0 N ch-dx
34+0 ch-xoff ch-yoff ch-height sub ch-xoff ch-width add ch-yoff
35+setcachedevice ch-width ch-height true[1 0 0 -1 -.1 ch-xoff sub ch-yoff
36+.1 sub]{ch-image}imagemask restore}B /D{/cc X dup type /stringtype ne{]}
37+if nn /base get cc ctr put nn /BitMaps get S ctr S sf 1 ne{dup dup
38+length 1 sub dup 2 index S get sf div put}if put /ctr ctr 1 add N}B /I{
39+cc 1 add D}B /bop{userdict /bop-hook known{bop-hook}if /SI save N @rigin
40+0 0 moveto /V matrix currentmatrix dup 1 get dup mul exch 0 get dup mul
41+add .99 lt{/QV}{/RV}ifelse load def pop pop}N /eop{SI restore userdict
42+/eop-hook known{eop-hook}if showpage}N /@start{userdict /start-hook
43+known{start-hook}if pop /VResolution X /Resolution X 1000 div /DVImag X
44+/IE 256 array N 0 1 255{IE S 1 string dup 0 3 index put cvn put}for
45+65781.76 div /vsize X 65781.76 div /hsize X}N /p{show}N /RMat[1 0 0 -1 0
46+0]N /BDot 260 string N /rulex 0 N /ruley 0 N /v{/ruley X /rulex X V}B /V
47+{}B /RV statusdict begin /product where{pop product dup length 7 ge{0 7
48+getinterval dup(Display)eq exch 0 4 getinterval(NeXT)eq or}{pop false}
49+ifelse}{false}ifelse end{{gsave TR -.1 .1 TR 1 1 scale rulex ruley false
50+RMat{BDot}imagemask grestore}}{{gsave TR -.1 .1 TR rulex ruley scale 1 1
51+false RMat{BDot}imagemask grestore}}ifelse B /QV{gsave newpath transform
52+round exch round exch itransform moveto rulex 0 rlineto 0 ruley neg
53+rlineto rulex neg 0 rlineto fill grestore}B /a{moveto}B /delta 0 N /tail
54+{dup /delta X 0 rmoveto}B /M{S p delta add tail}B /b{S p tail}B /c{-4 M}
55+B /d{-3 M}B /e{-2 M}B /f{-1 M}B /g{0 M}B /h{1 M}B /i{2 M}B /j{3 M}B /k{
56+4 M}B /w{0 rmoveto}B /l{p -4 w}B /m{p -3 w}B /n{p -2 w}B /o{p -1 w}B /q{
57+p 1 w}B /r{p 2 w}B /s{p 3 w}B /t{p 4 w}B /x{0 S rmoveto}B /y{3 2 roll p
58+a}B /bos{/SS save N}B /eos{SS restore}B end
59+%%EndProcSet
60+TeXDict begin 40258431 52099146 1000 300 300
61+(/home/lhf/w/lua/distr/lua/doc/manual.dvi) @start /Fa
62+7 115 df<000FE0007FFC01FFFE03F03E07C00E0F80041F00001F00003E00003E00007C
63+00007C00007C0000F80000F80000F80000F80000F80000F80000F80000F800007C00007C
64+00007C00003E00003E00001F00001F00010F800307C00703F01F01FFFE007FF8000FE018
65+227EA01D>67 D<001FF0007FFC01FFFF03F03F07C00F0F80021F00001F00003E00003C00
66+007C00007C0000780000F80000F80000F80000F80000F80000F80000F801FFF801FF7801
67+FF7C000F7C000F3C000F3E000F1F000F1F000F0F800F07C00F03F01F01FFFF007FFC001F
68+E018227EA01E>71 D<FFFFFFC0FFFFFFC0FFFFFFC0001F0000001F0000001F0000001F00
69+00001F0000001F0000001F0000001F0000001F0000001F0000001F0000001F0000001F00
70+00001F0000001F0000001F0000001F0000001F0000001F0000001F0000001F0000001F00
71+00001F0000001F0000001F0000001F0000001F0000001F0000001F00001A207E9F1F>84
72+D<07E03FF87FFC783E601F400F000F000F01FF0FFF3FFF7F0FF80FF00FF00FF00FF83F7F
73+FF3FFF1F8F10147E9316>97 D<03F0000FFC001FFE003E1F007C0700780700700380FFFF
74+80FFFF80FFFF80F00000F00000F000007000007800003C00803E07801FFF8007FF0001F8
75+0011147F9314>101 D<007E01FE03FE078207000F000F000F000F000F000F000F00FFF0
76+FFF0FFF00F000F000F000F000F000F000F000F000F000F000F000F000F000F000F000F00
77+0F000F20809F0E>I<F0E0F3E0F7E0FFE0FF00FC00F800F800F000F000F000F000F000F0
78+00F000F000F000F000F000F0000B147D9310>114 D E /Fb 7 121
79+df<07F8001FFE003FFF803E07C03E03C01C01E00001E0003FE003FFE00FFFE03FC1E07C
80+01E07801E0F001E0F001E0F001E07803E07C07E03FFFFE1FFEFE03F87E17157E941A>97
81+D<01F80007FF000FFF801F07C03C03C07801E07801E0F000F0F000F0FFFFF0FFFFF0FFFF
82+F0F000007000007800007C00F03E00F01F03F00FFFE003FFC000FE0014157D941A>101
83+D<7F0F8000FF7FE0007FFFF0000FF0F0000FC078000F8078000F0078000F0078000F0078
84+000F0078000F0078000F0078000F0078000F0078000F0078000F0078000F0078000F0078
85+007FE1FF00FFF3FF807FE1FF00191580941A>110 D<7FC1F8FFC7FC7FDFFE03FE1E03F8
86+0C03F00003E00003E00003C00003C00003C00003C00003C00003C00003C00003C00003C0
87+0003C0007FFF80FFFF807FFF8017157F941A>114 D<01C00003C00003C00003C00003C0
88+0003C00003C0007FFFE0FFFFE0FFFFE003C00003C00003C00003C00003C00003C00003C0
89+0003C00003C00003C00003C0F003C0F003C0F003C0F001E1E001FFE000FF80003F00141C
90+7F9B1A>116 D<7FC7FCFFC7FE7FC7FC0F01E00F01E00F01E00F83E00783C00783C00783
91+C003C78003C78003C78001C70001EF0001EF0001EF0000FE0000FE0000FE00007C001715
92+7F941A>118 D<7FC7F87FCFFC7FC7F80787C007C78003EF8001FF0000FE0000FC00007C
93+00007C00007C0000FE0001EF0003EF0003C7800783C00F83E07FC7FCFFC7FE7FC7FC1715
94+7F941A>120 D E /Fc 1 122 df<1E0180370380670380670380C707000E07000E07000E
95+07001C0E001C0E001C0E000C1E000E3C0003DC00001C0038380078380078700030C0001F
96+00001114808D11>121 D E /Fd 3 121 df<70F8F8F878181818183030606040050E7C84
97+0D>59 D<0E07E0001F8FF00033F8780063F0380063E03C0063C03C00C780780007807800
98+07807800078078000F00F0000F00F0000F00F0000F01E1801E01E3001E03C3001E03C600
99+1E01CE003C01FC001800F00019147F931B>110 D<07C3C00FE7E0187C603078F06079F0
100+6079F0C0F1E000F1C000F00000F00001E00001E00039E00079E030FBC060FBC060F3C0C0
101+E7E3807CFF00383C0014147E931A>120 D E /Fe 51 121 df<0007F800007FFE0001FC
102+0F0003F01F0007E03F800FC03F800FC03F800FC03F800FC01F000FC004000FC000000FC0
103+00000FC00000FFFFFF80FFFFFF80FFFFFF800FC01F800FC01F800FC01F800FC01F800FC0
104+1F800FC01F800FC01F800FC01F800FC01F800FC01F800FC01F800FC01F800FC01F800FC0
105+1F800FC01F800FC01F807FF8FFF07FF8FFF07FF8FFF01C237FA21F>12
106+D<3C7EFFFFFFFF7E3C08087C8710>46 D<0000180000380000380000700000700000E000
107+00E00000E00001C00001C0000380000380000380000700000700000700000E00000E0000
108+1C00001C00001C0000380000380000700000700000700000E00000E00001C00001C00001
109+C0000380000380000700000700000700000E00000E00000E00001C00001C000038000038
110+0000380000700000700000E00000E00000C0000015317DA41C>I<00FE0007FFC00F83E0
111+1F01F03E00F83E00F87C007C7C007C7C007CFC007CFC007EFC007EFC007EFC007EFC007E
112+FC007EFC007EFC007EFC007EFC007EFC007EFC007EFC007E7C007C7C007C7C007C3E00F8
113+3E00F81F01F00F83E007FFC000FE0017207E9F1C>I<00180000780003F800FFF800FFF8
114+00FDF80001F80001F80001F80001F80001F80001F80001F80001F80001F80001F80001F8
115+0001F80001F80001F80001F80001F80001F80001F80001F80001F80001F80001F80001F8
116+007FFFE07FFFE07FFFE013207C9F1C>I<03FC000FFF003FFFC0783FE07C0FF0FE07F0FE
117+03F8FE03F8FE03F87C03F83803F80003F80003F00007F00007E0000FC0001F80001F0000
118+3C0000780000F00001E03803C0380700380600380C00781FFFF03FFFF07FFFF0FFFFF0FF
119+FFF0FFFFF015207D9F1C>I<01FE0007FF800FFFE01E07F03F03F03F03F83F83F83F03F8
120+1F03F80C03F80003F00007E00007C0001F8001FE0001FF000007E00003F00001F80001FC
121+0001FE0001FE7C01FE7C01FEFE01FEFE01FCFE01FC7C03F87C07F03FFFE00FFFC003FE00
122+17207E9F1C>I<0000E00001E00003E00007E0000FE0000FE0001FE0003FE00077E000E7
123+E000E7E001C7E00387E00707E00E07E00E07E01C07E03807E07007E0E007E0FFFFFFFFFF
124+FFFFFFFF0007E00007E00007E00007E00007E00007E000FFFF00FFFF00FFFF18207E9F1C
125+>I<2000603C01E03FFFC03FFFC03FFF803FFE003FFC003FF00038000038000038000038
126+000039FC003FFF003E0FC03807E03003F00003F00003F00003F80003F83803F87C03F8FC
127+03F8FC03F8FC03F0F803F07007E03C0FC03FFF800FFF0003F80015207D9F1C>I<001F80
128+00FFE003FFF007F0F00FC1F81F81F83F01F83F01F87E00F07E00007E0000FE0800FE7FC0
129+FEFFE0FF81F0FF00F8FF00FCFF00FCFE00FEFE00FEFE00FEFE00FE7E00FE7E00FE7E00FE
130+3E00FC3E00FC1F00F80F83F007FFE003FFC000FF0017207E9F1C>I<7000007C00007FFF
131+FE7FFFFE7FFFFE7FFFFC7FFFF87FFFF0F00070E000E0E001C0E00380E00700000E00000E
132+00001C00003C0000380000780000780000F80000F00001F00001F00001F00001F00003F0
133+0003F00003F00003F00003F00003F00003F00001E00017227DA11C>I<00FE0003FFC007
134+FFE00F83F01E01F01E00F83E00F83E00F83F00F83F80F83FE1F01FF9E01FFFC00FFF8007
135+FFC003FFE00FFFF01F7FF83E1FFC7C07FC7C01FEF800FEF8007EF8003EF8003EF8003E7C
136+003C7E00783F01F81FFFF00FFFC001FF0017207E9F1C>I<00FE0007FF800FFFE01F83F0
137+3F01F07E00F87E00F8FE00FCFE00FCFE00FCFE00FEFE00FEFE00FEFE00FE7E01FE7E01FE
138+3E01FE1F03FE0FFEFE07FCFE0020FE0000FC0000FC1E00FC3F01F83F01F83F01F03F03E0
139+1E0FC01FFF800FFE0003F80017207E9F1C>I<00007000000000F800000000F800000000
140+F800000001FC00000001FC00000003FE00000003FE00000003FE000000077F000000077F
141+0000000F7F8000000E3F8000000E3F8000001C1FC000001C1FC000003C1FE00000380FE0
142+0000380FE00000700FF000007007F00000F007F80000FFFFF80000FFFFF80001FFFFFC00
143+01C001FC0001C001FC00038000FE00038000FE00078000FF000700007F00FFF007FFF8FF
144+F007FFF8FFF007FFF825227EA12A>65 D<0003FE0180001FFF838000FFFFE78001FF00FF
145+8003F8003F8007F0001F800FE0000F801FC0000F803F800007803F800007807F80000380
146+7F000003807F00000380FF00000000FF00000000FF00000000FF00000000FF00000000FF
147+00000000FF00000000FF000000007F000000007F000003807F800003803F800003803F80
148+0007801FC00007000FE0000F0007F0001E0003F8003C0001FF00F80000FFFFF000001FFF
149+C0000003FE000021227DA128>67 D<FFFFFF8000FFFFFFF000FFFFFFFC0007F003FE0007
150+F0007F0007F0003F8007F0001FC007F0000FE007F0000FE007F0000FF007F00007F007F0
151+0007F007F00007F007F00007F807F00007F807F00007F807F00007F807F00007F807F000
152+07F807F00007F807F00007F807F00007F807F00007F007F00007F007F00007F007F0000F
153+E007F0000FE007F0001FC007F0003F8007F0007F0007F003FE00FFFFFFFC00FFFFFFF000
154+FFFFFF800025227EA12B>I<FFFFFFFCFFFFFFFCFFFFFFFC07F001FC07F0007C07F0003C
155+07F0001C07F0001E07F0001E07F01C0E07F01C0E07F01C0E07F01C0E07F03C0007F07C00
156+07FFFC0007FFFC0007FFFC0007F07C0007F03C0007F01C0707F01C0707F01C0707F01C0E
157+07F0000E07F0000E07F0001E07F0001E07F0003E07F0007E07F001FCFFFFFFFCFFFFFFFC
158+FFFFFFFC20227EA125>I<FFFFFFF8FFFFFFF8FFFFFFF807F003F807F000F807F0007807
159+F0003807F0003C07F0003C07F01C1C07F01C1C07F01C1C07F01C1C07F03C0007F07C0007
160+FFFC0007FFFC0007FFFC0007F07C0007F03C0007F01C0007F01C0007F01C0007F01C0007
161+F0000007F0000007F0000007F0000007F0000007F0000007F00000FFFFC000FFFFC000FF
162+FFC0001E227EA123>I<FFFF83FFFEFFFF83FFFEFFFF83FFFE07F0001FC007F0001FC007
163+F0001FC007F0001FC007F0001FC007F0001FC007F0001FC007F0001FC007F0001FC007F0
164+001FC007F0001FC007F0001FC007FFFFFFC007FFFFFFC007FFFFFFC007F0001FC007F000
165+1FC007F0001FC007F0001FC007F0001FC007F0001FC007F0001FC007F0001FC007F0001F
166+C007F0001FC007F0001FC007F0001FC007F0001FC0FFFF83FFFEFFFF83FFFEFFFF83FFFE
167+27227EA12C>72 D<FFFF80FFFF80FFFF8007F00007F00007F00007F00007F00007F00007
168+F00007F00007F00007F00007F00007F00007F00007F00007F00007F00007F00007F00007
169+F00007F00007F00007F00007F00007F00007F00007F00007F00007F000FFFF80FFFF80FF
170+FF8011227EA115>I<FFFFC000FFFFC000FFFFC00007F0000007F0000007F0000007F000
171+0007F0000007F0000007F0000007F0000007F0000007F0000007F0000007F0000007F000
172+0007F0000007F0000007F0000007F0000007F0003807F0003807F0003807F0003807F000
173+7807F0007807F0007807F000F007F001F007F003F007F00FF0FFFFFFF0FFFFFFF0FFFFFF
174+F01D227EA122>76 D<FFF800001FFFFFF800001FFFFFFC00003FFF07FC00003FE007FC00
175+003FE0077E000077E0077E000077E0073F0000E7E0073F0000E7E0071F8001C7E0071F80
176+01C7E0071F8001C7E0070FC00387E0070FC00387E00707E00707E00707E00707E00703F0
177+0E07E00703F00E07E00703F00E07E00701F81C07E00701F81C07E00700FC3807E00700FC
178+3807E007007E7007E007007E7007E007007E7007E007003FE007E007003FE007E007001F
179+C007E007001FC007E007000F8007E0FFF80F80FFFFFFF80F80FFFFFFF80700FFFF30227E
180+A135>I<0007FC0000003FFF800000FE0FE00003F803F80007E000FC000FC0007E001FC0
181+007F001F80003F003F80003F803F80003F807F00001FC07F00001FC07F00001FC0FF0000
182+1FE0FF00001FE0FF00001FE0FF00001FE0FF00001FE0FF00001FE0FF00001FE0FF00001F
183+E0FF00001FE07F00001FC07F80003FC07F80003FC03F80003F803FC0007F801FC0007F00
184+0FE000FE0007F001FC0003F803F80000FE0FE000003FFF80000007FC000023227DA12A>
185+79 D<FFFFFF00FFFFFFE0FFFFFFF007F007F807F001FC07F001FE07F000FE07F000FF07
186+F000FF07F000FF07F000FF07F000FF07F000FF07F000FE07F001FE07F001FC07F007F807
187+FFFFF007FFFFC007F0000007F0000007F0000007F0000007F0000007F0000007F0000007
188+F0000007F0000007F0000007F0000007F00000FFFF8000FFFF8000FFFF800020227EA126
189+>I<FFFFFE0000FFFFFFC000FFFFFFF00007F007F80007F001FC0007F001FE0007F000FE
190+0007F000FF0007F000FF0007F000FF0007F000FF0007F000FF0007F000FE0007F001FE00
191+07F001FC0007F007F00007FFFFC00007FFFF000007F00FC00007F007E00007F007F00007
192+F003F00007F003F80007F003F80007F003F80007F003F80007F003FC0007F003FC0007F0
193+03FC0007F003FC0E07F001FE0EFFFF81FF1CFFFF80FFF8FFFF801FF027227EA12A>82
194+D<01FE0607FF8E1FFFFE3F01FE7C007E78003E78001EF8001EF8000EF8000EFC0000FF00
195+00FFE0007FFF007FFFC03FFFF01FFFF80FFFFC03FFFE003FFE0003FE00007F00003F0000
196+1FE0001FE0001FE0001FF0001EF0003EFC003CFF00FCFFFFF8E7FFE0C0FF8018227DA11F
197+>I<7FFFFFFF807FFFFFFF807FFFFFFF807E03F81F807C03F807807803F807807003F803
198+80F003F803C0F003F803C0E003F801C0E003F801C0E003F801C0E003F801C00003F80000
199+0003F800000003F800000003F800000003F800000003F800000003F800000003F8000000
200+03F800000003F800000003F800000003F800000003F800000003F800000003F800000003
201+F800000003F800000003F8000001FFFFF00001FFFFF00001FFFFF00022227EA127>I<FF
202+FF001FFEFFFF001FFEFFFF001FFE07F00001C007F80003C003F800038003FC00078001FC
203+00070001FC00070000FE000E0000FE000E0000FF001E00007F001C00007F803C00003F80
204+3800003F803800001FC07000001FC07000001FE0F000000FE0E000000FF0E0000007F1C0
205+000007F1C0000007FBC0000003FB80000003FF80000001FF00000001FF00000000FE0000
206+0000FE00000000FE000000007C000000007C0000000038000027227FA12A>86
207+D<0FFE003FFF807E07E07E03F07E01F07E01F83C01F80001F80001F800FFF807FFF81FE1
208+F83F01F87E01F8FC01F8FC01F8FC01F8FC01F87E03F87E0EFF1FFCFF07F03F18167E951B
209+>97 D<FF800000FF800000FF8000001F8000001F8000001F8000001F8000001F8000001F
210+8000001F8000001F8000001F8000001F8000001F8FE0001FFFF8001FF07C001FC03E001F
211+801F001F800F801F800F801F800FC01F800FC01F800FC01F800FC01F800FC01F800FC01F
212+800FC01F800FC01F800F801F801F801F801F001FC03E001FE07C001E7FF8001C0FC0001A
213+237EA21F>I<00FF8007FFE00F83F01F03F03E03F07E03F07C01E07C0000FC0000FC0000
214+FC0000FC0000FC0000FC00007C00007E00007E00003E00381F00700FC0F007FFC000FF00
215+15167E9519>I<0001FF000001FF000001FF0000003F0000003F0000003F0000003F0000
216+003F0000003F0000003F0000003F0000003F0000003F0001FE3F0007FFBF000F81FF001F
217+007F003E003F007E003F007C003F00FC003F00FC003F00FC003F00FC003F00FC003F00FC
218+003F00FC003F00FC003F007C003F007C003F003E003F001F00FF000F83FFE007FFBFE001
219+FC3FE01B237EA21F>I<00FE0007FF800F87C01E01E03E01F07C00F07C00F8FC00F8FC00
220+F8FFFFF8FFFFF8FC0000FC0000FC00007C00007C00007E00003E00381F00700FC0F003FF
221+C000FF0015167E951A>I<001F8000FFE001F1F003E3F007E3F00FC3F00FC1E00FC0000F
222+C0000FC0000FC0000FC0000FC000FFFE00FFFE00FFFE000FC0000FC0000FC0000FC0000F
223+C0000FC0000FC0000FC0000FC0000FC0000FC0000FC0000FC0000FC0000FC0000FC0007F
224+FC007FFC007FFC00142380A211>I<01FE1F0007FFFF800F87E7801F03E7801E01E7003E
225+01F0003E01F0003E01F0003E01F0003E01F0001E01E0001F03E0000F87C0000FFF800019
226+FE0000180000001C0000001C0000001FFFE0001FFFF8000FFFFE000FFFFF003FFFFF007C
227+003F80F8001F80F8000F80F8000F80F8000F807C001F007E003F001F80FC000FFFF80001
228+FFC00019217F951C>I<FF800000FF800000FF8000001F8000001F8000001F8000001F80
229+00001F8000001F8000001F8000001F8000001F8000001F8000001F87E0001F9FF8001FB8
230+FC001FE07C001FC07E001FC07E001F807E001F807E001F807E001F807E001F807E001F80
231+7E001F807E001F807E001F807E001F807E001F807E001F807E001F807E00FFF1FFC0FFF1
232+FFC0FFF1FFC01A237EA21F>I<1E003F007F807F807F807F803F001E0000000000000000
233+0000000000FF80FF80FF801F801F801F801F801F801F801F801F801F801F801F801F801F
234+801F801F801F80FFF0FFF0FFF00C247FA30F>I<003C007E00FF00FF00FF00FF007E003C
235+00000000000000000000000003FF03FF03FF003F003F003F003F003F003F003F003F003F
236+003F003F003F003F003F003F003F003F003F003F003F003F003F783FFC3FFC3EFC7E78FC
237+7FF01FC0102E83A311>I<FF800000FF800000FF8000001F8000001F8000001F8000001F
238+8000001F8000001F8000001F8000001F8000001F8000001F8000001F83FF801F83FF801F
239+83FF801F80F0001F83E0001F8780001F8F00001F9E00001FBE00001FFE00001FFF00001F
240+FF80001FCFC0001F8FC0001F87E0001F83F0001F83F0001F81F8001F80FC00FFF1FFC0FF
241+F1FFC0FFF1FFC01A237EA21E>I<FF80FF80FF801F801F801F801F801F801F801F801F80
242+1F801F801F801F801F801F801F801F801F801F801F801F801F801F801F801F801F801F80
243+1F801F801F80FFF0FFF0FFF00C237FA20F>I<FF87F00FE000FF9FFC3FF800FFB87E70FC
244+001FE03EC07C001FC03F807E001FC03F807E001F803F007E001F803F007E001F803F007E
245+001F803F007E001F803F007E001F803F007E001F803F007E001F803F007E001F803F007E
246+001F803F007E001F803F007E001F803F007E001F803F007E00FFF1FFE3FFC0FFF1FFE3FF
247+C0FFF1FFE3FFC02A167E952F>I<FF87E000FF9FF800FFB8FC001FE07C001FC07E001FC0
248+7E001F807E001F807E001F807E001F807E001F807E001F807E001F807E001F807E001F80
249+7E001F807E001F807E001F807E001F807E00FFF1FFC0FFF1FFC0FFF1FFC01A167E951F>
250+I<00FE0007FFC00F83E01E00F03E00F87C007C7C007C7C007CFC007EFC007EFC007EFC00
251+7EFC007EFC007EFC007E7C007C7C007C3E00F81F01F00F83E007FFC000FE0017167E951C
252+>I<FF8FE000FFFFF800FFF07C001FC03E001F801F001F801F801F801F801F800FC01F80
253+0FC01F800FC01F800FC01F800FC01F800FC01F800FC01F800FC01F801F801F801F801F80
254+3F001FC03E001FE0FC001FFFF8001F8FC0001F8000001F8000001F8000001F8000001F80
255+00001F8000001F800000FFF00000FFF00000FFF000001A207E951F>I<FF0F80FF1FE0FF
256+33F01F63F01FC3F01FC3F01FC1E01F80001F80001F80001F80001F80001F80001F80001F
257+80001F80001F80001F80001F8000FFF800FFF800FFF80014167F9517>114
258+D<07F3001FFF00781F00700F00F00700F00700F80000FF0000FFF0007FFC003FFE001FFF
259+0007FF00003F80E00F80E00780F00780F00780F80700FC1E00FFFC00C7F00011167E9516
260+>I<01C00001C00001C00001C00003C00003C00003C00007C00007C0000FC0003FFF00FF
261+FF00FFFF000FC0000FC0000FC0000FC0000FC0000FC0000FC0000FC0000FC0000FC0000F
262+C3800FC3800FC3800FC3800FC3800FC30007E70003FE0000FC0011207F9F16>I<FF83FE
263+00FF83FE00FF83FE001F807E001F807E001F807E001F807E001F807E001F807E001F807E
264+001F807E001F807E001F807E001F807E001F807E001F807E001F807E001F80FE001F80FE
265+000F83FFC007FF7FC001FC7FC01A167E951F>I<FFF03FE0FFF03FE0FFF03FE00FC00E00
266+0FE01E0007E01C0007E01C0003F0380003F0380003F8780001F8700001FCF00000FCE000
267+00FCE000007FC000007FC000007FC000003F8000003F8000001F0000001F0000000E0000
268+1B167F951E>I<FFE3FF8FF8FFE3FF8FF8FFE3FF8FF81FC07C03C00FC0FE03800FC0FE03
269+800FE0FF078007E1FF070007E1DF070003F1DF8E0003F38F8E0003F38F8E0001FB8FDC00
270+01FF07DC0001FF07FC0000FF07F80000FE03F80000FE03F800007E03F000007C01F00000
271+3C01E000003800E00025167F9528>I<FFF0FFE0FFF0FFE0FFF0FFE007E0780007F0F000
272+03F8F00001F9E00000FFC00000FF8000007F0000003F0000001F8000003FC000007FE000
273+00F7F00001E3F00001C1F80003C0FC000780FE00FFC1FFE0FFC1FFE0FFC1FFE01B167F95
274+1E>I E /Ff 1 98 df<03CC0E2E183C381C301C701CE038E038E038E038C073C073C0F3
275+60F263361E1C10107C8F14>97 D E /Fg 2 104 df<003C00E001C00380038003800380
276+03800380038003800380038003800380038007001E00F8001E0007000380038003800380
277+03800380038003800380038003800380038001C000E0003C0E257E9B13>102
278+D<F8001E000700038003800380038003800380038003800380038003800380038001C000
279+E0003C00E001C0038003800380038003800380038003800380038003800380038007001E
280+00F8000E257E9B13>I E /Fh 30 122 df<00FC000383000603800E07801C07801C0300
281+1C00001C00001C00001C0000FFFF80FFFF801C03801C03801C03801C03801C03801C0380
282+1C03801C03801C03801C03801C03801C0380FF8FF0FF8FF0141A809915>12
283+D<70F8FCFC7404040808102040060C7D990B>39 D<70F0F8F87808081010102040050C7D
284+840B>44 D<70F8F8F87005057D840B>46 D<07E01C38381C381C700E700E700EF00FF00F
285+F00FF00FF00FF00FF00FF00FF00FF00F700E700E700E381C381C1C3807E010187F9713>
286+48 D<07E01FF8383C781C781E781E301E001E001C0038007007E00038001C000E000F00
287+0F700FF80FF80EF01E703C3FF80FE010187F9713>51 D<70F8F8F87000000000000070F0
288+F8F8780808101010204005177D8F0B>59 D<000C0000001E0000001E0000001E0000003F
289+0000003F0000003F000000678000006780000067800000C3C00000C3C00000C3C0000181
290+E0000181E0000181E0000300F00003FFF00007FFF80006007800060078000E007C000C00
291+3C001E003C00FF81FFC0FF81FFC01A1A7F991D>65 D<07C21FF6383E701E600EE006E006
292+E006F000F8007F803FF01FF80FFC01FE001E000F0007C007C007C007E006F00EFC1CDFF8
293+87E0101A7E9915>83 D<FEFEC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0
294+C0C0C0C0C0C0C0C0C0FEFE07257D9B0B>91 D<FEFE060606060606060606060606060606
295+060606060606060606060606060606060606FEFE0725809B0B>93
296+D<1FC000707000783800781C00301C00001C0003FC001F1C003C1C00781C00F01C00F01D
297+80F01D80F03D80785D801F8F0011107F8F13>97 D<FC0000FC00001C00001C00001C0000
298+1C00001C00001C00001C00001C00001CFC001F07001E03801C03C01C01C01C01E01C01E0
299+1C01E01C01E01C01E01C01E01C01C01C03801E03001F060018F800131A809915>I<07F0
300+1C1C383C783C7018F000F000F000F000F000F0007000780C380C1C3807E00E107F8F11>
301+I<003F00003F0000070000070000070000070000070000070000070000070003E7000C1F
302+00180F00380700700700F00700F00700F00700F00700F00700F00700700700780700380F
303+001C3FE007E7E0131A7F9915>I<07C01C7038387038701CF01CFFFCF000F000F000F000
304+7000780C38081C3807E00E107F8F11>I<01F007180E3C0C3C1C181C001C001C001C001C
305+00FFC0FFC01C001C001C001C001C001C001C001C001C001C001C001C00FF80FF800E1A80
306+990C>I<0FC700387B80703B80F03C00F03C00F03C00F03C007038003870006FC0004000
307+004000006000007FF0003FFC003FFE00600F00C00300C00300C00300C00300600600381C
308+0007E00011187F8F13>I<387C7C7C380000000000FCFC1C1C1C1C1C1C1C1C1C1C1C1CFF
309+FF081A80990A>105 D<FC00FC001C001C001C001C001C001C001C001C001C001C001C00
310+1C001C001C001C001C001C001C001C001C001C001C00FF80FF80091A80990A>108
311+D<FC7C1F00FD8E63801E0781C01E0781C01C0701C01C0701C01C0701C01C0701C01C0701
312+C01C0701C01C0701C01C0701C01C0701C01C0701C0FF9FE7F8FF9FE7F81D107F8F20>I<
313+FC7C00FD87001E03801E03801C03801C03801C03801C03801C03801C03801C03801C0380
314+1C03801C0380FF9FF0FF9FF01410808F15>I<07E01C38381C700E700EF00FF00FF00FF0
315+0FF00FF00F700E700E381C1C3807E010107F8F13>I<FCFC00FF07001E03801C03C01C03
316+C01C01E01C01E01C01E01C01E01C01E01C01E01C03C01C03801E07001F0E001CF8001C00
317+001C00001C00001C00001C0000FF8000FF80001317808F15>I<FCF0FD1C1E3C1E3C1C18
318+1C001C001C001C001C001C001C001C001C00FF80FF800E10808F0F>114
319+D<1F2060E04060C060C060F0007F003FC01FE000F0C070C030E030E020F0408F800C107F
320+8F0F>I<18001800180018001800180038007FC0FFC03800380038003800380038003800
321+386038603860386038601CC007800B177F960F>I<FC1F80FC1F801C03801C03801C0380
322+1C03801C03801C03801C03801C03801C03801C03801C07800C07800E0BF003F3F0141080
323+8F15>I<FE3F80FE3F803C0E001C0C001C0C000E18000E18000E18000730000730000770
324+0003E00003E00001C00001C00001C00011107F8F14>I<FE3F80FE3F803C0E001C0C001C
325+0C000E18000E18000E180007300007300007700003E00003E00001C00001C00001C00001
326+8000018000618000F30000F30000E6000078000011177F8F14>121
327+D E /Fi 3 51 df<00C00000C00000C00000C00000C00000C00000C00000C00000C000FF
328+FF80FFFF8000C00000C00000C00000C00000C00000C00000C00000C00000C00011147E8F
329+17>43 D<0C007C009C001C001C001C001C001C001C001C001C001C001C001C001C00FF80
330+09107E8F0F>49 D<1F006180C0C0E0E0E0E000E000C001C0018003000400082010203FC0
331+7FC0FFC00B107F8F0F>I E /Fj 5 107 df<03F0000FFC001FFE003FFF007FFF807FFF80
332+FFFFC0FFFFC0FFFFC0FFFFC0FFFFC0FFFFC07FFF807FFF803FFF001FFE000FFC0003F000
333+12127E9317>15 D<00000006000000000600000000060000000003000000000300000000
334+0380000000018000000000C0000000006000000000700000000018FFFFFFFFFFFFFFFFFF
335+FF00000000180000000070000000006000000000C0000000018000000003800000000300
336+000000030000000006000000000600000000060028187E962D>33
337+D<001F007F00F801E003C003C003C003C003C003C003C003C003C003C003C003C003C003
338+C003C007800F00FE00F800FE000F00078003C003C003C003C003C003C003C003C003C003
339+C003C003C003C003C003C001E000F8007F001F102D7DA117>102
340+D<F800FE001F00078003C003C003C003C003C003C003C003C003C003C003C003C003C003
341+C003C001E000F0007F001F007F00F001E003C003C003C003C003C003C003C003C003C003
342+C003C003C003C003C003C007801F00FE00F800102D7DA117>I<C0C0C0C0C0C0C0C0C0C0
343+C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C002
344+2D7BA10D>106 D E /Fk 2 51 df<06001E00FE00EE000E000E000E000E000E000E000E
345+000E000E000E000E000E000E000E000E00FFE0FFE00B157D9412>49
346+D<1F803FE070F0F870F878F838703800780070007000E001C00180030006000C18101820
347+387FF0FFF0FFF00D157E9412>I E /Fl 52 122 df<000FF000007FF80001F81C0003E0
348+3E0007E07E000FC07E000FC07E000FC07E000FC03C000FC000000FC000000FC1FF00FFFF
349+FF00FFFFFF00FFFFFF000FC03F000FC03F000FC03F000FC03F000FC03F000FC03F000FC0
350+3F000FC03F000FC03F000FC03F000FC03F000FC03F000FC03F000FC03F007FF9FFE07FF9
351+FFE07FF9FFE01B20809F1D>12 D<3C03C07E07E0FF0FF0FF8FF8FF8FF8FF8FF87F87F83D
352+83D80180180380380300300300300600600E00E01C01C038038030030015117E9F1B>34
353+D<3C007E00FF00FF80FF80FF807F803D80018003800300030006000E001C003800300009
354+117D9F0F>39 D<3C7EFFFFFFFF7E3C08087D870F>46 D<00380000F80007F800FFF800FF
355+F800F9F80001F80001F80001F80001F80001F80001F80001F80001F80001F80001F80001
356+F80001F80001F80001F80001F80001F80001F80001F80001F80001F8007FFFE07FFFE07F
357+FFE0131D7D9C1A>49 D<03FC001FFF803FFFC07C1FE0FE07F0FE03F0FE03F8FE01F87C01
358+F83801F80003F80003F00007E00007E0000FC0001F00003E00007C0000F00001E0380380
359+380700380E00781FFFF83FFFF07FFFF0FFFFF0FFFFF0FFFFF0151D7E9C1A>I<03FC000F
360+FF801FFFC03C0FE07E07F07E03F07E03F07E03F03C07F00007E0000FC0001F8003FE0003
361+FC00000F800007E00003F00003F00003F83803F87C03F8FE03F8FE03F8FE03F0FC07F07C
362+0FE03FFFC01FFF0003FC00151D7E9C1A>I<0001E00003E00003E00007E0000FE0001FE0
363+003BE00073E000F3E001E3E001C3E00383E00703E00E03E01C03E03803E07803E0F003E0
364+FFFFFEFFFFFEFFFFFE0007E00007E00007E00007E00007E000FFFE00FFFE00FFFE171D7F
365+9C1A>I<3800E03FFFE03FFFC03FFF803FFF003FFC003FC0003800003800003800003800
366+0039FC003FFF803E07C03803E01003F00003F00003F80003F87803F8FC03F8FC03F8FC03
367+F8FC03F07807E07C0FE03FFFC00FFF0003F800151D7E9C1A>I<003F0001FFC007FFE00F
368+C1E01F03F01E03F03E03F07E03F07C01E07C0000FC1000FCFF00FDFFC0FF03E0FE01F0FE
369+01F0FC01F8FC01F8FC01F8FC01F87C01F87C01F87C01F83C01F03E01F01F03E00FFFC007
370+FF8001FC00151D7E9C1A>I<7000007FFFF87FFFF87FFFF87FFFF07FFFE0FFFFC0F00380
371+E00700E00E00E00E00001C0000380000780000700000F00000F00001F00001E00003E000
372+03E00003E00007E00007E00007E00007E00007E00007E00003C000018000151E7D9D1A>
373+I<01FE0007FF801FFFC03E07E03C03F07C01F07C01F07E01F07F81F07FE3E03FF3C03FFF
374+801FFF000FFF8007FFC01FFFE03E7FF07C1FF87807F8F803F8F801F8F800F8F800F8F800
375+F07C01F07F03E03FFFC00FFF8003FC00151D7E9C1A>I<0000E000000001F000000001F0
376+00000003F800000003F800000003F800000007FC00000007FC0000000FFE0000000EFE00
377+00000EFE0000001C7F0000001C7F0000003C7F800000383F800000383F800000701FC000
378+00701FC00000F01FE00000E00FE00000FFFFE00001FFFFF00001FFFFF00003C007F80003
379+8003F800038003F800070001FC00070001FC00FFF01FFFE0FFF01FFFE0FFF01FFFE0231F
380+7E9E28>65 D<FFFFFE00FFFFFFC0FFFFFFE007E007F007E003F807E001FC07E001FC07E0
381+01FC07E001FC07E001FC07E001FC07E001F807E003F007E00FE007FFFF8007FFFFE007E0
382+03F007E001F807E000FC07E000FC07E000FE07E000FE07E000FE07E000FE07E000FE07E0
383+01FC07E001FC07E007F8FFFFFFF0FFFFFFE0FFFFFF001F1F7E9E25>I<0007F806007FFF
384+0E01FFFFDE03FE03FE07F000FE0FC0007E1F80003E3F80001E3F00001E7F00000E7E0000
385+0E7E00000EFE000000FE000000FE000000FE000000FE000000FE000000FE0000007E0000
386+007E00000E7F00000E3F00000E3F80001C1F80001C0FC0003807F0007803FE03F001FFFF
387+C0007FFF800007FC001F1F7D9E26>I<FFFFFE0000FFFFFFC000FFFFFFF00007F007F800
388+07F001FC0007F000FE0007F0007F0007F0003F0007F0003F8007F0001F8007F0001F8007
389+F0001FC007F0001FC007F0001FC007F0001FC007F0001FC007F0001FC007F0001FC007F0
390+001FC007F0001FC007F0001F8007F0001F8007F0003F8007F0003F0007F0007F0007F000
391+7E0007F001FC0007F007F800FFFFFFF000FFFFFFC000FFFFFE0000221F7E9E28>I<FFFF
392+FFE0FFFFFFE0FFFFFFE007F007E007F003E007F001E007F000F007F000F007F0707007F0
393+707007F0707007F0707007F1F00007FFF00007FFF00007FFF00007F1F00007F0700007F0
394+701C07F0701C07F0701C07F0003807F0003807F0003807F0007807F0007807F001F807F0
395+07F8FFFFFFF0FFFFFFF0FFFFFFF01E1F7E9E22>I<FFFFFFE0FFFFFFE0FFFFFFE007F007
396+E007F003E007F001E007F000F007F000F007F0007007F0707007F0707007F0707007F070
397+0007F1F00007FFF00007FFF00007FFF00007F1F00007F0700007F0700007F0700007F070
398+0007F0000007F0000007F0000007F0000007F0000007F00000FFFFC000FFFFC000FFFFC0
399+001C1F7E9E21>I<FFFF80FFFF80FFFF8007F00007F00007F00007F00007F00007F00007
400+F00007F00007F00007F00007F00007F00007F00007F00007F00007F00007F00007F00007
401+F00007F00007F00007F00007F00007F00007F000FFFF80FFFF80FFFF80111F7F9E14>73
402+D<FFFFC000FFFFC000FFFFC00007F0000007F0000007F0000007F0000007F0000007F000
403+0007F0000007F0000007F0000007F0000007F0000007F0000007F0000007F0000007F000
404+0007F001C007F001C007F001C007F001C007F003C007F003C007F0078007F0078007F00F
405+8007F03F80FFFFFF80FFFFFF80FFFFFF801A1F7E9E1F>76 D<001FF80000FFFF0001F81F
406+8007E007E00FC003F01F8001F81F0000F83F0000FC7F0000FE7E00007E7E00007EFE0000
407+7FFE00007FFE00007FFE00007FFE00007FFE00007FFE00007FFE00007FFE00007F7E0000
408+7E7F0000FE7F0000FE3F0000FC3F8001FC1F8001F80FC003F007E007E001F81F8000FFFF
409+00001FF800201F7D9E27>79 D<FFFFFE00FFFFFF80FFFFFFE007F00FF007F003F807F001
410+F807F001FC07F001FC07F001FC07F001FC07F001FC07F001FC07F001F807F003F007F00F
411+F007FFFFC007FFFF0007F0000007F0000007F0000007F0000007F0000007F0000007F000
412+0007F0000007F0000007F0000007F00000FFFF8000FFFF8000FFFF80001E1F7E9E24>I<
413+001FF80000FFFF0001F81F8007E007E00FC003F01F8001F81F8001F83F0000FC7F0000FE
414+7F0000FE7E00007EFE00007FFE00007FFE00007FFE00007FFE00007FFE00007FFE00007F
415+FE00007FFE00007F7E00007E7E00007E7F0000FE3F0000FC3F87C1FC1F8FE1F80FD833F0
416+07F81FE001F81F8000FFFF00001FFE0300000E0300000F0700000FFF000007FF000007FE
417+000007FE000003FC000001F8000000F020287D9E27>I<FFFFF80000FFFFFF8000FFFFFF
418+C00007F00FF00007F003F80007F001F80007F001FC0007F001FC0007F001FC0007F001FC
419+0007F001FC0007F001F80007F003F00007F00FE00007FFFF800007FFFF000007F03F8000
420+07F00FC00007F00FE00007F007F00007F007F00007F007F00007F007F00007F007F00007
421+F007F00007F007F02007F007F07007F003F070FFFF81F8E0FFFF80FFC0FFFF803F80241F
422+7E9E27>I<03FC180FFF381FFFF83E03F87C00F8780078F80078F80038F80038FC0000FF
423+0000FFF8007FFF007FFFC03FFFE01FFFF00FFFF803FFF8001FFC0001FC0000FC00007CE0
424+007CE0007CE0007CF00078F800F8FE01F0FFFFE0EFFFC0C1FF00161F7D9E1D>I<7FFFFF
425+FC7FFFFFFC7FFFFFFC7E0FE0FC780FE03C700FE01CF00FE01EF00FE01EE00FE00EE00FE0
426+0EE00FE00EE00FE00E000FE000000FE000000FE000000FE000000FE000000FE000000FE0
427+00000FE000000FE000000FE000000FE000000FE000000FE000000FE000000FE00007FFFF
428+C007FFFFC007FFFFC01F1E7E9D24>I<FFFF007FF8FFFF007FF8FFFF007FF807F0000700
429+07F8000F0003F8000E0003FC000E0001FC001C0001FC001C0001FE003C0000FE00380000
430+FF007800007F007000007F807000003F80E000003F80E000001FC1C000001FC1C000001F
431+E3C000000FE38000000FF780000007F700000007FF00000003FE00000003FE00000003FE
432+00000001FC00000001FC00000000F800000000F800000000700000251F7F9E28>86
433+D<0600600E00E01C01C0380380300300600600600600E00E00C00C00DE0DE0FF0FF0FF8F
434+F8FF8FF8FF8FF87F87F83F03F01E01E015117D9F1B>92 D<07FC001FFF803F0FC03F07E0
435+3F03F03F03F00C03F00003F001FFF00FFFF01F83F07E03F07C03F0F803F0F803F0F803F0
436+FC07F07E0DFE3FF8FE07E07E17147F9319>97 D<FF800000FF800000FF8000001F800000
437+1F8000001F8000001F8000001F8000001F8000001F8000001F8000001F8000001F8FE000
438+1FFFF8001FF07C001FC03E001F803F001F801F001F801F001F801F801F801F801F801F80
439+1F801F801F801F801F801F801F801F001F801F001F803E001FC03E001FE0FC001E7FF000
440+1C1FC00019207F9F1D>I<01FE0007FF801F0FC03E0FC03E0FC07C0FC07C0300FC0000FC
441+0000FC0000FC0000FC0000FC00007C00007E00003E00E03F01C01F83C007FF8001FC0013
442+147E9317>I<0007FC000007FC000007FC000000FC000000FC000000FC000000FC000000
443+FC000000FC000000FC000000FC000000FC0001FCFC000FFFFC001F83FC003E00FC007E00
444+FC007C00FC007C00FC00FC00FC00FC00FC00FC00FC00FC00FC00FC00FC00FC00FC007C00
445+FC007C00FC007E00FC003E01FC001F07FF800FFFFF8003F8FF8019207E9F1D>I<01FE00
446+07FF800F83C01E01E03E00F07C00F07C00F8FC00F8FFFFF8FFFFF8FC0000FC0000FC0000
447+7C00007C00003E00381E00380F80F007FFE000FF8015147F9318>I<003F8000FFC003F3
448+E007E7E007C7E00FC7E00FC3C00FC0000FC0000FC0000FC0000FC000FFFC00FFFC00FFFC
449+000FC0000FC0000FC0000FC0000FC0000FC0000FC0000FC0000FC0000FC0000FC0000FC0
450+000FC0000FC0007FFC007FFC007FFC0013207F9F10>I<03FC7C0FFFFE1E07DE3C03DE7C
451+03EC7C03E07C03E07C03E07C03E03C03C01E07801FFF0033FC003000007000007800007F
452+FF803FFFF03FFFF81FFFFC3FFFFC7C00FEF8003EF8003EF8003EF8003E7C007C3F01F80F
453+FFE003FF80171E7F931A>I<FF800000FF800000FF8000001F8000001F8000001F800000
454+1F8000001F8000001F8000001F8000001F8000001F8000001F87F0001F9FF8001FB8FC00
455+1FE07E001FC07E001FC07E001F807E001F807E001F807E001F807E001F807E001F807E00
456+1F807E001F807E001F807E001F807E001F807E00FFF3FFC0FFF3FFC0FFF3FFC01A207E9F
457+1D>I<1E003F007F807F807F807F803F001E0000000000000000000000FF80FF80FF801F
458+801F801F801F801F801F801F801F801F801F801F801F801F801F80FFF0FFF0FFF00C217E
459+A00F>I<FF800000FF800000FF8000001F8000001F8000001F8000001F8000001F800000
460+1F8000001F8000001F8000001F8000001F83FF001F83FF001F83FF001F81E0001F83C000
461+1F8780001F9E00001FBC00001FFE00001FFF00001FDF00001F9F80001F0FC0001F07E000
462+1F03E0001F03F0001F01F800FFE3FF80FFE3FF80FFE3FF8019207F9F1C>107
463+D<FF80FF80FF801F801F801F801F801F801F801F801F801F801F801F801F801F801F801F
464+801F801F801F801F801F801F801F801F801F801F801F80FFF0FFF0FFF00C207E9F0F>I<
465+FF07F00FE000FF1FFC3FF800FF387E70FC001F603FC07E001FC03F807E001FC03F807E00
466+1F803F007E001F803F007E001F803F007E001F803F007E001F803F007E001F803F007E00
467+1F803F007E001F803F007E001F803F007E001F803F007E001F803F007E00FFF1FFE3FFC0
468+FFF1FFE3FFC0FFF1FFE3FFC02A147E932D>I<FF07F000FF1FF800FF38FC001F607E001F
469+C07E001FC07E001F807E001F807E001F807E001F807E001F807E001F807E001F807E001F
470+807E001F807E001F807E001F807E00FFF3FFC0FFF3FFC0FFF3FFC01A147E931D>I<01FF
471+0007FFC01F83F03E00F83E00F87C007C7C007CFC007EFC007EFC007EFC007EFC007EFC00
472+7E7C007C7C007C3E00F83E00F81F83F007FFC001FF0017147F931A>I<FF8FE000FFFFF8
473+00FFF0FC001FC07E001F803F001F803F001F801F001F801F801F801F801F801F801F801F
474+801F801F801F801F801F801F001F803F001F803E001FC07E001FE0FC001FFFF0001F9FC0
475+001F8000001F8000001F8000001F8000001F8000001F800000FFF00000FFF00000FFF000
476+00191D7F931D>I<01F81C0007FE3C001F87FC003F01FC003E00FC007E00FC007C00FC00
477+FC00FC00FC00FC00FC00FC00FC00FC00FC00FC00FC00FC007C00FC007E00FC007E00FC00
478+3F01FC001F87FC000FFEFC0003F8FC000000FC000000FC000000FC000000FC000000FC00
479+0000FC000007FF800007FF800007FF80191D7E931C>I<FF1F00FF3FC0FF67E01FC7E01F
480+C7E01FC7E01F81801F80001F80001F80001F80001F80001F80001F80001F80001F80001F
481+8000FFF800FFF800FFF80013147F9316>I<0FE63FFE783E700EF00EF00EFE00FFE07FF8
482+3FFC1FFE0FFF007FE01FE00FF00FF00EFC1EFFFCC7F010147E9315>I<03800380038003
483+800780078007800F801F803FFCFFFCFFFC1F801F801F801F801F801F801F801F801F801F
484+8E1F8E1F8E1F8E1F8E0F9C07F803F00F1D7F9C14>I<FF83FE00FF83FE00FF83FE001F80
485+7E001F807E001F807E001F807E001F807E001F807E001F807E001F807E001F807E001F80
486+7E001F807E001F807E001F80FE001F80FE000F83FFC007FF7FC001FC7FC01A147E931D>
487+I<FFF0FF80FFF0FF80FFF0FF800FC038000FC038000FE0780007E0700007F0F00003F0E0
488+0003F9E00001F9C00001F9C00000FF800000FF800000FF8000007F0000007F0000003E00
489+00003E0000001C000019147F931C>I<FFE7FF3FE0FFE7FF3FE0FFE7FF3FE01F80FC0700
490+0FC1FC0E000FC1FC0E000FC3FE1E0007E3BE1C0007E3BE1C0007F7BF3C0003F71F380003
491+F71FB80001FE0FF00001FE0FF00001FE0FF00000FC07E00000FC07E00000FC07E0000078
492+03C000007803C00023147F9326>I<FFF3FF00FFF3FF00FFF3FF000FE0E00007E1E00003
493+F3C00001FF800000FF000000FE0000007E0000003F0000007F800000FFC00001EFE00003
494+C7E0000383F0000781F800FFC3FF80FFC3FF80FFC3FF8019147F931C>I<FFF0FF80FFF0
495+FF80FFF0FF800FC038000FC038000FE0780007E0700007F0F00003F0E00003F9E00001F9
496+C00001F9C00000FF800000FF800000FF8000007F0000007F0000003E0000003E0000001C
497+0000001C00000038000078380000FC780000FC700000E0E00000F1E000007F8000001E00
498+0000191D7F931C>I E /Fm 86 127 df<70F8F8F8F8F8F8F8F8F8F8F8F8F8F8F8F87000
499+0000000070F8F8F870051C779B18>33 D<2008701CF83EF83EF83EF83EF83EF83E701C70
500+1C701C701C701C30180F0E7C9C18>I<030600078F00078F00078F00078F00078F00078F
501+007FFFC0FFFFE0FFFFE07FFFC00F1E000F1E000F1E000F1E000F1E000F1E007FFFC0FFFF
502+E0FFFFE07FFFC01E3C001E3C001E3C001E3C001E3C001E3C000C1800131C7E9B18>I<00
503+C00001C00001C00001C00003F0000FFC003FFE007DDF0071CF00E1C780E1CF80E1CF80E1
504+CF80F1C70079C0007FC0003FF0001FFC0007FE0001FF0001CF0021C78071C380F9C380F9
505+C380F1C380F1C70079C7007DDE003FFC001FF80007E00001C00001C00001C00000C00011
506+247D9F18>I<3803007C07807C0780EE0F80EE0F00EE0F00EE1F00EE1E00EE1E00EE3E00
507+7C3C007C3C00387C0000780000780000F80000F00001F00001E00001E00003E00003C000
508+03C00007C0000783800787C00F87C00F0EE00F0EE01F0EE01E0EE01E0EE03E0EE03C07C0
509+3C07C018038013247E9F18>I<01C00007E0000FF0000E70001C38001C38001C38001C38
510+001C73F81CF3F81CE3F80FC1C00FC3800F83800F03801F07003F87007B8E0071CE00F1FC
511+00F0FC00F07C00F07870F0787078FE707FFFE03FC7E00F03C0151C7F9B18>I<387C7C7E
512+3E0E0E0E1C1C38F8F0C0070E789B18>I<007000F001E003C007800F001E001E003C003C
513+007800780078007000F000F000F000F000F000F000F000F00070007800780078003C003C
514+001E001E000F00078003C001F000F000700C24799F18>I<6000F00078003C001E000F00
515+0780078003C003C001E001E001E000E000F000F000F000F000F000F000F000F000E001E0
516+01E001E003C003C0078007800F001E003C007800F00060000C247C9F18>I<01C00001C0
517+0001C00001C00061C300F9CF80FDDF807FFF003FFE000FF8000FF8003FFE007FFF00FDDF
518+80F9CF8061C30001C00001C00001C00001C00011147D9718>I<00600000F00000F00000
519+F00000F00000F00000F00000F0007FFFC0FFFFE0FFFFE07FFFC000F00000F00000F00000
520+F00000F00000F00000F00000600013147E9718>I<1C3E7E7F3F1F070E1E7CF860080C78
521+8518>I<7FFFC0FFFFE0FFFFE07FFFC013047E8F18>I<3078FCFC78300606778518>I<00
522+0300000780000780000F80000F00001F00001E00001E00003E00003C00007C0000780000
523+780000F80000F00001F00001E00003E00003C00003C00007C0000780000F80000F00000F
524+00001F00001E00003E00003C00003C00007C0000780000F80000F00000F0000060000011
525+247D9F18>I<01F00007FC000FFE001F1F001E0F003C07807803C07803C07803C0F001E0
526+F001E0F001E0F001E0F001E0F001E0F001E0F001E0F001E0F803E07803C07803C07C07C0
527+3C07801E0F001F1F000FFE0007FC0001F000131C7E9B18>I<01C001C003C007C007C01F
528+C0FFC0FBC063C003C003C003C003C003C003C003C003C003C003C003C003C003C003C003
529+C003C07FFEFFFF7FFE101C7C9B18>I<03F0001FFE003FFF007C0F807807C0F003C0F801
530+E0F801E07001E00001E00001E00003C00003C0000780000780000F00001E00003C0000F8
531+0001F00003E00007C0000F80001E01E03C01E07FFFE0FFFFE07FFFE0131C7E9B18>I<03
532+F8001FFE003FFF003C0F807C07C07C03C07C03C01003C0000380000780000F0003FE0003
533+FE0003FF00000F800007C00003C00001E00001E00001E07001E0F801E0F803C0F007C07C
534+0F807FFF001FFE0007F000131C7E9B18>I<001F00003F00007F0000770000F70001E700
535+01C70003C7000787000707000E07001E07003C0700380700780700F00700FFFFF8FFFFF8
536+FFFFF8000700000700000700000700000700000700007FF0007FF0007FF0151C7F9B18>
537+I<3FFF807FFF807FFF807800007800007800007800007800007800007800007800007BF8
538+007FFE007FFF007C0F803003C00003C00001E00001E07001E0F801E0F801E0F803C07807
539+C07C0F803FFF001FFC0003F000131C7E9B18>I<F00000FFFFE0FFFFE0FFFFE0F007C0F0
540+0F80000F00001E00003C00003C0000780000780000F00000F00001E00001E00001E00003
541+C00003C00003C00003C00007800007800007800007800007800007800007800003000013
542+1D7E9C18>55 D<3078FCFC783000000000000000003078FCFC78300614779318>58
543+D<183C7E7E3C180000000000000000183C7E7E3E1E0E1C3C78F060071A789318>I<0000
544+C00003E00007E0001FC0003F8000FE0001FC0007F0000FE0003F80007F0000FC0000FC00
545+007F00003F80000FE00007F00001FC0000FE00003F80001FC00007E00003E00000C01318
546+7E9918>I<7FFFC0FFFFE0FFFFE07FFFC00000000000000000000000007FFFC0FFFFE0FF
547+FFE07FFFC0130C7E9318>I<600000F80000FC00007F00003F80000FE00007F00001FC00
548+00FE00003F80001FC00007E00007E0001FC0003F8000FE0001FC0007F0000FE0003F8000
549+7F0000FC0000F8000060000013187E9918>I<0FF0003FFC007FFF00781F00F80780F807
550+80F80780201F00007E0000FC0001F00001E00003C00003C00003C00003C00003C0000380
551+0000000000000000000000000000000003800007C00007C00007C000038000111C7D9B18
552+>I<007C0001FE0007FF000F87801E03C03C1DC0387FC070FFE071E3E071C1E0E1C1E0E3
553+80E0E380E0E380E0E380E0E380E0E380E0E1C1C071C1C071E3C070FF80387F003C1C001E
554+01E00F83E007FFC001FF80007E00131C7E9B18>I<00F80000F80000F80001FC0001DC00
555+01DC0001DC0003DE0003DE0003DE0003DE00038E00078F00078F00078F00078F00078F00
556+0F07800FFF800FFF800FFF800F07801E03C01E03C01E03C07F8FF0FF8FF87F8FF0151C7F
557+9B18>I<7FFE00FFFF007FFF801E07C01E03C01E01E01E01E01E01E01E01E01E01E01E03
558+C01E07C01FFF801FFF001FFFC01E03E01E01E01E00F01E00F01E00F01E00F01E00F01E00
559+F01E01E01E03E07FFFC0FFFF807FFE00141C7F9B18>I<00F8E003FFE007FFE00F07E01E
560+03E03C03E03C01E07801E07801E0700000F00000F00000F00000F00000F00000F00000F0
561+0000F000007000007801E07801E03C01E03C01E01E03C00F07C007FF8003FE0000F80013
562+1C7E9B18>I<7FFC00FFFF007FFF801E07C01E03E01E01E01E01F01E00F01E00F01E00F8
563+1E00781E00781E00781E00781E00781E00781E00781E00781E00781E00F01E00F01E01F0
564+1E01E01E03E01E07C07FFF80FFFF007FFC00151C809B18>I<FFFFF0FFFFF0FFFFF01E00
565+F01E00F01E00F01E00F01E00001E00001E0F001E0F001E0F001FFF001FFF001FFF001E0F
566+001E0F001E0F001E00001E00001E00781E00781E00781E00781E0078FFFFF8FFFFF8FFFF
567+F8151C7F9B18>I<FFFFF8FFFFF8FFFFF81E00781E00781E00781E00781E00001E00001E
568+0F001E0F001E0F001FFF001FFF001FFF001E0F001E0F001E0F001E00001E00001E00001E
569+00001E00001E00001E0000FFE000FFE000FFE000151C7F9B18>I<01F1C007FFC00FFFC0
570+1F0FC01E07C03C03C03803C07803C07803C0700000F00000F00000F00000F00000F00000
571+F01FF0F03FF0F01FF07003C07803C07803C03807C03C07C01E0FC01F0FC00FFFC007FFC0
572+01F3C0141C7E9B18>I<7F8FF0FFDFF87F8FF01E03C01E03C01E03C01E03C01E03C01E03
573+C01E03C01E03C01E03C01FFFC01FFFC01FFFC01E03C01E03C01E03C01E03C01E03C01E03
574+C01E03C01E03C01E03C01E03C07F8FF0FFDFF87F8FF0151C7F9B18>I<7FFF80FFFFC07F
575+FF8001E00001E00001E00001E00001E00001E00001E00001E00001E00001E00001E00001
576+E00001E00001E00001E00001E00001E00001E00001E00001E00001E00001E0007FFF80FF
577+FFC07FFF80121C7D9B18>I<01FFE001FFE001FFE0000F00000F00000F00000F00000F00
578+000F00000F00000F00000F00000F00000F00000F00000F00000F00000F00000F00000F00
579+000F00700F00F80F00F80F00F83E007FFC003FF8000FE000131C7E9B18>I<FFE000FFE0
580+00FFE0001E00001E00001E00001E00001E00001E00001E00001E00001E00001E00001E00
581+001E00001E00001E00001E00001E00001E00001E00F01E00F01E00F01E00F01E00F0FFFF
582+F0FFFFF0FFFFF0141C7F9B18>76 D<FC01F8FE03F8FE03F83F07E03B06E03B06E03B06E0
583+3B8EE03B8EE0398CE0398CE039DCE039DCE039DCE038D8E038F8E038F8E03870E03870E0
584+3800E03800E03800E03800E03800E03800E0FE03F8FE03F8FE03F8151C7F9B18>I<7E07
585+F0FF0FF87F07F01F81C01D81C01D81C01DC1C01CC1C01CC1C01CE1C01CE1C01CE1C01C61
586+C01C71C01C71C01C31C01C39C01C39C01C39C01C19C01C19C01C1DC01C0DC01C0DC01C0F
587+C07F07C0FF87C07F03C0151C7F9B18>I<0FFE003FFF807FFFC07C07C07803C0F803E0F0
588+01E0F001E0F001E0F001E0F001E0F001E0F001E0F001E0F001E0F001E0F001E0F001E0F0
589+01E0F001E0F001E0F001E0F803E07803C07C07C07FFFC03FFF800FFE00131C7E9B18>I<
590+FFFE00FFFF80FFFFC01E07C01E03E01E01E01E00F01E00F01E00F01E00F01E00F01E01E0
591+1E03E01E07C01FFFC01FFF801FFE001E00001E00001E00001E00001E00001E00001E0000
592+1E0000FFC000FFC000FFC000141C7F9B18>I<7FF800FFFE007FFF001E1F801E07801E07
593+C01E03C01E03C01E03C01E07C01E07801E1F801FFF001FFE001FFE001E0F001E0F001E07
594+801E07801E07801E07801E07801E07BC1E07BC1E07BC7F83F8FFC1F87F80F0161C7F9B18
595+>82 D<7FFFF8FFFFF8FFFFF8F07878F07878F07878F07878007800007800007800007800
596+007800007800007800007800007800007800007800007800007800007800007800007800
597+00780000780007FF8007FF8007FF80151C7F9B18>84 D<FFC7FEFFC7FEFFC7FE1E00F01E
598+00F01E00F01E00F01E00F01E00F01E00F01E00F01E00F01E00F01E00F01E00F01E00F01E
599+00F01E00F01E00F01E00F01E00F01E00F00F01E00F01E007C7C003FF8001FF00007C0017
600+1C809B18>I<FF07F8FF8FF8FF07F83C01E01E03C01E03C01E03C01E03C00F07800F0780
601+0F07800F07800F0780078F00078F00078F00078F00038E00038E0003DE0003DE0001DC00
602+01DC0001DC0001FC0001FC0000F80000F800151C7F9B18>I<FE03F8FE03F8FE03F87000
603+707000707000703800E03800E03800E03800E03800E038F8E039FCE039DCE039DCE019DC
604+C019DCC019DCC0198CC0198CC01D8DC01D8DC01D8DC01D05C00F07800F07800F07800E03
605+80151C7F9B18>I<7F8FE07F9FE07F8FE00F0F800F8F00079F0007DE0003FE0003FC0001
606+FC0001F80000F80000F00000F00000F80001F80001FC0003FC0003DE00079E00078F0007
607+8F000F07800F07801E07C07F8FF0FF8FF87F8FF0151C7F9B18>I<FFFCFFFCFFFCF000F0
608+00F000F000F000F000F000F000F000F000F000F000F000F000F000F000F000F000F000F0
609+00F000F000F000F000F000F000F000F000F000F000FFFCFFFCFFFC0E24789F18>91
610+D<600000F00000F00000F800007800007C00003C00003C00003E00001E00001F00000F00
611+000F00000F800007800007C00003C00003C00003E00001E00001F00000F00000F8000078
612+00007800007C00003C00003E00001E00001E00001F00000F00000F800007800007800003
613+0011247D9F18>I<FFFCFFFCFFFC003C003C003C003C003C003C003C003C003C003C003C
614+003C003C003C003C003C003C003C003C003C003C003C003C003C003C003C003C003C003C
615+003CFFFCFFFCFFFC0E247F9F18>I<03800FE03FF8FFFEFC7EF01E40040F077C9B18>I<7F
616+FFC0FFFFE0FFFFE07FFFC013047E7F18>I<061E3E387070E0E0E0F8FC7C7C38070E789E
617+18>I<0FF0003FFC007FFE007C1F007C0F0038078000078000FF8007FF801FFF807F8780
618+7C0780F00780F00780F00780F807807C1F803FFFF81FFBF807E1F815147E9318>I<7F00
619+00FF00007F00000F00000F00000F00000F00000F00000F3E000FFF800FFFE00FC1F00F80
620+F00F00780F00780F003C0F003C0F003C0F003C0F003C0F003C0F00780F80780F80F00FC1
621+F00FFFE00FFF80073E00161C809B18>I<01FC0007FF001FFF803E0F803C0F8078070078
622+0000F00000F00000F00000F00000F00000F000007800007803C03C03C03E07C01FFF8007
623+FF0001FC0012147D9318>I<001FC0003FC0001FC00003C00003C00003C00003C00003C0
624+01F3C007FFC01FFFC03E0FC03C07C07803C07803C0F003C0F003C0F003C0F003C0F003C0
625+F003C07803C07807C03C07C03E1FC01FFFF807FBFC01F3F8161C7F9B18>I<01F80007FE
626+000FFF001F0F803C03C07803C07801C0F001E0F001E0FFFFE0FFFFE0FFFFE0F000007800
627+007801E03C01E01F03E00FFFC007FF8000FE0013147E9318>I<001F80007FC000FFE000
628+F3E001E3E001E08001E00001E0007FFFC0FFFFC0FFFFC001E00001E00001E00001E00001
629+E00001E00001E00001E00001E00001E00001E00001E00001E00001E0007FFF807FFF807F
630+FF80131C7F9B18>I<03F1E00FFFF01FFFF83E1F783C0F30780780780780780780780780
631+7807803C0F003E1F003FFE003FFC003BF0003800003800001FFE001FFFC03FFFE07801F0
632+700070E00038E00038E00038E000387800F07E03F01FFFC00FFF8001FC00151F7F9318>
633+I<7F0000FF00007F00000F00000F00000F00000F00000F00000F1F000F7F800FFFC00FE1
634+C00FC1E00F81E00F01E00F01E00F01E00F01E00F01E00F01E00F01E00F01E00F01E00F01
635+E00F01E07FE3FCFFF3FE7FE3FC171C809B18>I<01C00003E00003E00003E00001C00000
636+00000000000000000000007FE000FFE0007FE00001E00001E00001E00001E00001E00001
637+E00001E00001E00001E00001E00001E00001E00001E00001E000FFFF80FFFF80FFFF8011
638+1D7D9C18>I<001C003E003E003E001C00000000000000000FFE0FFE0FFE001E001E001E
639+001E001E001E001E001E001E001E001E001E001E001E001E001E001E001E001E001E001E
640+701CF83CF878FFF87FF01FC00F277E9C18>I<7E0000FE00007E00000E00000E00000E00
641+000E00000E00000E3FF00E3FF00E3FF00E07800E0F000E1E000E3C000E78000EF0000FF8
642+000FFC000F9C000F0E000E0F000E07000E03800E03C07FC7F8FFC7F87FC7F8151C7F9B18
643+>I<FFE000FFE000FFE00001E00001E00001E00001E00001E00001E00001E00001E00001
644+E00001E00001E00001E00001E00001E00001E00001E00001E00001E00001E00001E00001
645+E00001E000FFFFC0FFFFC0FFFFC0121C7D9B18>I<F9C1C0FFF7F0FFFFF03E3E383C3C38
646+3C3C38383838383838383838383838383838383838383838383838383838383838383838
647+FE3E3EFE7E7EFE3E3E1714809318>I<7F1F00FF7F807FFFC00FE1C00FC1E00F81E00F01
648+E00F01E00F01E00F01E00F01E00F01E00F01E00F01E00F01E00F01E00F01E07FE3FCFFF3
649+FE7FE3FC1714809318>I<01F0000FFE001FFF003E0F803C07807803C07803C0F001E0F0
650+01E0F001E0F001E0F001E0F001E07803C07803C03C07803F1F801FFF000FFE0001F00013
651+147E9318>I<7F3E00FFFF807FFFE00FC1F00F80F00F00780F00780F003C0F003C0F003C
652+0F003C0F003C0F003C0F00780F80780F80F00FC1F00FFFE00FFF800F3E000F00000F0000
653+0F00000F00000F00000F00000F00007FE000FFF0007FE000161E809318>I<01F9E007FD
654+E00FFFE01F0FE03C07E07803E07801E0F001E0F001E0F001E0F001E0F001E0F001E07801
655+E07803E03C07E03E0FE01FFFE007FDE001F1E00001E00001E00001E00001E00001E00001
656+E00001E0000FFC001FFE000FFC171E7F9318>I<FF87E0FF9FF0FFBFF807F87807F03007
657+E00007C00007C000078000078000078000078000078000078000078000078000078000FF
658+FE00FFFF00FFFE0015147F9318>I<07FF003FFF007FFF00700F00E00F00E00F00F00000
659+7E00007FF0001FFC0007FF00003F00700780F00380F00380F80380FC0F00FFFF00FFFC00
660+E7F00011147D9318>I<0380000780000780000780000780007FFFC0FFFFC0FFFFC00780
661+000780000780000780000780000780000780000780000780000780C00781E00781E00781
662+E003C3C003FFC001FF00007E0013197F9818>I<7F0FE0FF1FE07F0FE00F01E00F01E00F
663+01E00F01E00F01E00F01E00F01E00F01E00F01E00F01E00F01E00F01E00F03E00F07E007
664+FFFC03FFFE01F9FC1714809318>I<7F8FF0FF8FF87F8FF01C01C00E03800E03800E0380
665+070700070700070700078F00038E00038E0003DE0001DC0001DC0001DC0000F80000F800
666+00700015147F9318>I<FF07F8FF8FF8FF07F83800E03800E03800E03800E01C01C01C71
667+C01CF9C01CF9C01CF9C01DDDC00DDD800DDD800DDD800F8F800F8F800F8F800707001514
668+7F9318>I<7F8FF07F9FF07F8FF00F0700078E00039E0001DC0001F80000F80000700000
669+F00000F80001DC00039E00038E000707000E07807F8FF0FF8FF87F8FF015147F9318>I<
670+7F8FF0FF8FF87F8FF00E01C00E03800E0380070380070700070700038700038700038E00
671+01CE0001CE0001CC0000DC0000FC0000780000780000780000700000700000700000F000
672+7CE0007DE00073C0007F80003F00001E0000151E7F9318>I<3FFFF07FFFF07FFFF07803
673+E07807C0780F80001F00003E00007C0000F80001F00003E00007C0000F80F01F00F03E00
674+F07C00F0FFFFF0FFFFF0FFFFF014147F9318>I<0007E0001FE0007FE0007C0000F00000
675+F00000F00000F00000F00000F00000F00000F00000F00000F00000F00001F0007FE000FF
676+C000FFC0007FE00001F00000F00000F00000F00000F00000F00000F00000F00000F00000
677+F00000F00000F000007C00007FE0001FE00007E013247E9F18>I<60F0F0F0F0F0F0F0F0
678+F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0600424769F18>I<7E00
679+00FF8000FFE00003E00000F00000F00000F00000F00000F00000F00000F00000F00000F0
680+0000F00000F00000F800007FC0003FE0003FE0007FC000F80000F00000F00000F00000F0
681+0000F00000F00000F00000F00000F00000F00000F00003E000FFE000FF80007E00001324
682+7E9F18>I<0E0C1F1E3FBEFBF8F1F060E00F067C9B18>I E /Fn 39
683+122 df<00001FE000007FF00001C0380001807800038078000700300007000000070000
684+00070000000E0000000E0000000E000000FFFFE000FFFFE0001C01C0001C01C0001C01C0
685+001C01C0001C038000380380003803800038038000380700003807000078070000700718
686+00700E3000700E3000700E3000600E6000E007E000E003C000E0000000E0000001C00000
687+01C00000318000007B800000F30000007E0000003C0000001D29829F1A>12
688+D<00003FC0FF800000FFE3FFC00001C1E700E0000381EE01E0000380DC01E00007001C00
689+C0000700180000000700380000000700380000000E00380000000E00380000000E007000
690+0000FFFFFFFF8000FFFFFFFF80000E00700700001C00700700001C00700700001C00E007
691+00001C00E00E00001C00E00E00003800E00E00003800E00E00003801C01C00003801C01C
692+00003801C01C00007001C01C60007001C038C00070038038C00070038038C00070038039
693+8000E003801F8000E003000F0000E00700000000E00700000001C00700000001C00E0000
694+0031860E000000798F1C000000F31E380000007E0FF00000003C07C00000002B29829F28
695+>14 D<00E001F001F003E003E003E003C003C003C00780078007800700070007000E000E
696+000E000C000C001C0018001800000000000000000000007000F800F800F000E0000C217B
697+A00E>33 D<1C1C3E3E7E7E7E7E3E3E06060C0C0C0C1818181830306060C0C080800F0E78
698+9F17>I<70F8F8F0E005057B840E>46 D<000200060006000E003C00FC03DC031C003800
699+3800380038007000700070007000E000E000E000E001C001C001C001C003800380038003
700+80FFF8FFF80F1E7B9D17>49 D<0007C0001FE000386000E0E001C1E001C1E00380C00700
701+000F00000E00001E10001E7C001DFE003F07003E07003C07807C07807807807807807807
702+80700F00700F00F00F00F00E00F01E00701C0070380070380038F0001FC0000F8000131F
703+7B9D17>54 D<001F00007F8000E1C001C0E00380E00700E00700E00700E00F01C00F01C0
704+0F838007C70007EE0003F80001F80003FC000E7E001C3F00381F00700F00700700E00700
705+E00700E00700E00E00E00E00E01C00E0380070F0003FE0001F8000131F7B9D17>56
706+D<070F1F1F0E0000000000000000000070F8F8F0E008147B930E>58
707+D<0000FE020007FF06001F818C003E00DC0078007C00F0007C01E0003803C00038078000
708+380F8000381F0000301F0000303E0000303E0000007C0000007C0000007C0000007C0000
709+00F8000000F8000000F8000000F80000C0F80001807800018078000300780003003C0006
710+003C000C001E0018000F00300007C0E00003FF800000FE00001F217A9F21>67
711+D<01FFFFFC01FFFFF8001E0078001E0038001E0038003C0018003C0018003C0018003C00
712+3000780C3000780C3000780C0000781C0000F0380000FFF80000FFF80000F0380001E030
713+0001E0300001E0300001E0300003C0000003C0000003C0000003C0000007800000078000
714+000780000007800000FFFC0000FFF800001E1F7D9E1E>70 D<00FF007FE001FF00FFC000
715+1F001E00001F800C00001F800C0000378018000033C018000033C018000033C018000063
716+C030000061E030000061E030000061E0300000C0F0600000C0F0600000C0F0600000C078
717+6000018078C000018078C00001803CC00001803CC00003003D800003001F800003001F80
718+0003001F800006000F000006000F000006000F00000E000F0000FFC0060000FFC0060000
719+231F7D9E22>78 D<01FFFF8001FFFFE0001E01F0001E0078001E0078003C007C003C007C
720+003C007C003C007C007800F8007800F8007800F0007801E000F003C000F00F8000FFFF00
721+00FFF80001E0000001E0000001E0000001E0000003C0000003C0000003C0000003C00000
722+07800000078000000780000007800000FFF80000FFF000001E1F7D9E1F>80
723+D<0007E040001FF8C0003C1D8000700F8000E0078001C007800180030003800300038003
724+0003800300038000000380000003C0000003F8000001FF800001FFE000007FF000001FF0
725+000001F80000007800000038000000380000003800300038003000380030003000700070
726+00700060007800E0007801C000EE078000C7FE000081F800001A217D9F1A>83
727+D<06060E0E1C1C1818303060606060C0C0C0C0F0F0F8F8F8F8F8F870700F0E749F17>92
728+D<00F18003FDC0078F800E07801C07803C07803C0700780700780700780700F00E00F00E
729+00F00E00F00E30F01C60F03C60707C6078FCC03FCFC00F070014147C9317>97
730+D<07803F803F000700070007000E000E000E000E001C001C001CF01FFC3F1E3E0E3C0F38
731+0F700F700F700F700FE01EE01EE01EE03CE03CE038607071E03FC01F0010207B9F15>I<
732+007E0001FF000383800F07801E07801C07003C0200780000780000780000F00000F00000
733+F00000F00000F00000700200700700381E001FF80007E00011147C9315>I<0000780003
734+F80003F00000700000700000700000E00000E00000E00000E00001C00001C000F1C003FD
735+C0078F800E07801C07803C07803C0700780700780700780700F00E00F00E00F00E00F00E
736+30F01C60F03C60707C6078FCC03FCFC00F070015207C9F17>I<007C0001FF000783000F
737+01801E01803C01803C0300780E007FFC007FE000F00000F00000F00000F0000070000070
738+02007807003C1E001FF80007E00011147C9315>I<0000F80001FC0003BC00033C000718
739+000700000700000E00000E00000E00000E00000E0000FFE001FFE0001C00001C00001C00
740+00380000380000380000380000380000700000700000700000700000700000E00000E000
741+00E00000E00000E00001C00001C00001C0000180003380007B8000F300007E00003C0000
742+1629829F0E>I<003C6000FF7001E3E00381E00701E00F01E00F01C01E01C01E01C01E01
743+C03C03803C03803C03803C03803C07003C0F001C1F001E3F000FFE0003CE00000E00000E
744+00001C00001C00301C00783800F0F0007FE0003F8000141D7E9315>I<01E0000FE0000F
745+C00001C00001C00001C000038000038000038000038000070000070000073E00077F000E
746+C3800F81C00F01C00E01C01E03801C03801C03801C0380380700380700380700380E1870
747+0E30700E30701C60700C60E00FC060078015207D9F17>I<006000F000F000E000000000
748+000000000000000000000F001F80318031C063806380C3800700070007000E000E000E00
749+1C301C601C6038C018C01F800F000C1F7D9E0E>I<0001800003C00003C0000380000000
750+000000000000000000000000000000000000003C00007E0000C700018700030700030700
751+060E00000E00000E00000E00001C00001C00001C00001C00003800003800003800003800
752+00700000700000700000700000E00000E00030E00079C000F380007F00003C0000122882
753+9E0E>I<01E0000FE0000FC00001C00001C00001C0000380000380000380000380000700
754+000700000703C00707E00E0C600E18E00E31E00E61E01CC1C01F80001F00001FC00039E0
755+003870003870003838607070C07070C07070C0703980E03F00601E0013207D9F15>I<03
756+C01FC01F8003800380038007000700070007000E000E000E000E001C001C001C001C0038
757+003800380038007000700070007180E300E300E300E6007E003C000A207C9F0C>I<1E07
758+C0F8003F1FE1FC0033B8730E0063E076070063C03C07006380380700C780780E00070070
759+0E000700700E000700700E000E00E01C000E00E01C000E00E01C000E00E038601C01C038
760+C01C01C038C01C01C071801C01C031803803803F001801801E0023147D9325>I<1E07C0
761+3F1FE033B87063E07063C038638038C780700700700700700700700E00E00E00E00E00E0
762+0E01C31C01C61C01C61C038C1C018C3801F81800F018147D931A>I<007C0001FF000383
763+800F01C01E01C01C01E03C01E07801E07801E07801E0F003C0F003C0F003C0F00780F007
764+00700F00701E003838001FF00007C00013147C9317>I<01C1E007E7F8067E3C0C7C1C0C
765+781E0C701E18E01E00E01E00E01E00E01E01C03C01C03C01C03C01C07803C07803C07003
766+C0E003E3C0077F80071E000700000700000E00000E00000E00000E00001C0000FFC000FF
767+8000171D809317>I<0E0F003F3F8033F1C063C1C063C3C06383C0C78380070000070000
768+0700000E00000E00000E00000E00001C00001C00001C00001C000038000018000012147D
769+9313>114 D<00FC03FE07070E0F0E0F0E0E1E000F800FF007F803FC003E001E701EF01C
770+F01CE03860703FE01F8010147D9313>I<018001C0038003800380038007000700FFF0FF
771+F00E000E000E000E001C001C001C001C0038003800380038307060706070C071803F001E
772+000C1C7C9B0F>I<0F00601F80703180E031C0E06380E06380E0C381C00701C00701C007
773+01C00E03800E03800E03800E038C0E07180E07180E0F180E1F3007F3F003E1C016147D93
774+18>I<0F01C01F83C03183E031C1E06380E06380E0C380C00700C00700C00700C00E0180
775+0E01800E01800E03000E03000E06000E06000F0C0007F80001E00013147D9315>I<0F00
776+60E01F8071E03180E1F031C0E0F06380E0706380E070C381C0600701C0600701C0600701
777+C0600E0380C00E0380C00E0380C00E0381800E0381800E0781800E078300070F860007F9
778+FC0001F0F8001C147D931E>I<0787800FCFC018F8E03070E06071E06071E0C0E1C000E0
779+0000E00000E00001C00001C00001C00071C060F380C0F380C0E38180C7C3007CFE00387C
780+0013147D9315>I<0F00601F80703180E031C0E06380E06380E0C381C00701C00701C007
781+01C00E03800E03800E03800E03800E07000E07000E0F000E1F0007FE0003EE00000E0000
782+0E00001C00781C0078380070700060E0003FC0001F0000141D7D9316>I
783+E /Fo 77 123 df<001FC1F0007FF7F801F07E7C03C0FC7C0780FC7C0F00F8380F007800
784+0F0078000F0078000F0078000F0078000F007800FFFFFF80FFFFFF800F0078000F007800
785+0F0078000F0078000F0078000F0078000F0078000F0078000F0078000F0078000F007800
786+0F0078000F0078000F0078000F0078000F0078007FE3FF807FE3FF801E20809F1B>11
787+D<001F8000FFC001E0E003C0F00781F00F01F00F00E00F00000F00000F00000F00000F00
788+00FFFFF0FFFFF00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00
789+F00F00F00F00F00F00F00F00F00F00F00F00F07FC3FE7FC3FE1720809F19>I<001FB000
790+FFF001E1F003C1F00781F00F00F00F00F00F00F00F00F00F00F00F00F00F00F0FFFFF0FF
791+FFF00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F
792+00F00F00F00F00F00F00F00F00F07FE7FE7FE7FE1720809F19>I<001FC0FC00007FE7FE
793+0001F07F070003C0FE07800780FC0F800F00F80F800F007807000F007800000F00780000
794+0F007800000F007800000F00780000FFFFFFFF80FFFFFFFF800F007807800F007807800F
795+007807800F007807800F007807800F007807800F007807800F007807800F007807800F00
796+7807800F007807800F007807800F007807800F007807800F007807800F007807807FE3FF
797+3FF07FE3FF3FF02420809F26>I<070F1F1E3C78F0E0400809779F17>19
798+D<7038F87CFC7EFC7E7C3E0C060C060C06180C180C381C3018603040200F0E7F9F17>34
799+D<70F8FCFC7C0C0C0C181838306040060E7C9F0D>39 D<006000C001800380070006000E
800+001C001C003C003800380078007000700070007000F000F000F000F000F000F000F000F0
801+00F000F000F000F00070007000700070007800380038003C001C001C000E000600070003
802+80018000C000600B2E7CA112>I<C0006000300038001C000C000E000700070007800380
803+038003C001C001C001C001C001E001E001E001E001E001E001E001E001E001E001E001E0
804+01C001C001C001C003C0038003800780070007000E000C001C00380030006000C0000B2E
805+7EA112>I<00030000000300000003000000030000000300000003000000030000000300
806+0000030000000300000003000000030000000300000003000000030000FFFFFFFCFFFFFF
807+FC0003000000030000000300000003000000030000000300000003000000030000000300
808+000003000000030000000300000003000000030000000300001E207E9A23>43
809+D<70F8F8F878181818183030606040050E7C840D>I<FFF0FFF0FFF00C03808B0F>I<70F8
810+F8F87005057C840D>I<0000400000C00001800001800001800003000003000003000006
811+00000600000C00000C00000C000018000018000018000030000030000060000060000060
812+0000C00000C00000C0000180000180000180000300000300000600000600000600000C00
813+000C00000C0000180000180000300000300000300000600000600000600000C00000C000
814+00122D7EA117>I<03F0000FFC001E1E001C0E00380700780780700380700380700380F0
815+03C0F003C0F003C0F003C0F003C0F003C0F003C0F003C0F003C0F003C0F003C0F003C0F0
816+03C07003807003807003807807803807001C0E001E1E000FFC0003F000121F7E9D17>I<
817+00C001C00FC0FFC0F3C003C003C003C003C003C003C003C003C003C003C003C003C003C0
818+03C003C003C003C003C003C003C003C003C003C07FFF7FFF101E7D9D17>I<07F0000FFC
819+00383E00700F00600F80F80780FC07C0FC07C0FC03C07803C03003C00007C00007800007
820+80000F00001E00001C0000380000700000E00001C0000380000300C00600C00C00C01801
821+C03FFF807FFF80FFFF80FFFF80121E7E9D17>I<03F0000FFC001C1E00300F00780F807C
822+0F807C07807C0F803C0F80000F00000F00001E00007C0007F00007F000003C00000E0000
823+0F000007800007800007C03007C07807C0FC07C0FC07C0FC0780780F80700F003C1E001F
824+FC0007F000121F7E9D17>I<000700000700000F00001F00001F00003F00007F0000EF00
825+00CF0001CF00038F00030F00070F000E0F000C0F00180F00380F00300F00600F00E00F00
826+FFFFF0FFFFF0000F00000F00000F00000F00000F00000F0000FFF000FFF0141E7F9D17>
827+I<3003003FFF003FFE003FF8003FE00030000030000030000030000030000030000031F0
828+0037FC003E1E00380F00380F003007800007800007C00007C00007C07807C0F807C0F807
829+C0F80780F00780600F00700E00383C001FF80007E000121F7E9D17>I<007C0001FE0007
830+83000E07800C0F801C0F80380700380000780000700000700000F1F800F3FE00F40E00F8
831+0700F80380F80380F003C0F003C0F003C0F003C0F003C07003C07003C070038038038038
832+07001C07000E1E0007FC0001F000121F7E9D17>I<6000007FFFE07FFFE07FFFC07FFFC0
833+E00180C00300C00300C00600000C0000180000180000300000700000600000E00000E000
834+01E00001C00001C00003C00003C00003C00003C00007C00007C00007C00007C00007C000
835+07C000038000131F7E9D17>I<03F0000FFC001C1E003807003007007003807003807003
836+807803807C07007F07003F8E001FFC000FF80007FC0007FE001EFF00387F80701F80700F
837+C0E003C0E003C0E001C0E001C0E001C0F001807003803807001E0E000FFC0003F000121F
838+7E9D17>I<03F00007F8001E1C00380E00380700700700700380F00380F00380F003C0F0
839+03C0F003C0F003C0F003C07007C07007C03807C01C0BC01FF3C007E3C000038000038000
840+07800007003807007C0E007C0E00781C003078001FF0000FC000121F7E9D17>I<70F8F8
841+F8700000000000000000000070F8F8F87005147C930D>I<70F8F8F87000000000000000
842+00000070F8F8F878181818183030606040051D7C930D>I<FFFFFFFCFFFFFFFC00000000
843+00000000000000000000000000000000000000000000000000000000FFFFFFFCFFFFFFFC
844+1E0C7E9023>61 D<0003800000038000000380000007C0000007C0000007C000000FE000
845+000FE000000FE0000019F0000019F0000019F0000030F8000030F8000030F80000607C00
846+00607C0000607C0000C03E0000C03E0000C03E0001FFFF0001FFFF0001801F0003000F80
847+03000F8003000F80060007C0060007C01F0007E0FFC03FFEFFC03FFE1F207F9F22>65
848+D<FFFFE000FFFFF8000F803E000F801E000F801F000F800F800F800F800F800F800F800F
849+800F800F800F800F000F801F000F803E000F807C000FFFF8000FFFFC000F801F000F800F
850+800F8007C00F8003C00F8003E00F8003E00F8003E00F8003E00F8003E00F8007C00F8007
851+C00F800F800F803F00FFFFFE00FFFFF8001B1F7E9E20>I<000FE010007FF83000F80E70
852+03E00370078001F00F0000F01F0000F01E0000703C0000703C0000707C00003078000030
853+F8000030F8000000F8000000F8000000F8000000F8000000F8000000F8000000F8000000
854+780000307C0000303C0000303C0000301E0000601F0000600F0000C00780018003E00300
855+00F80E00007FFC00000FE0001C217E9F21>I<FFFFF800FFFFFE0007C01F8007C007C007
856+C001E007C000F007C000F007C0007807C0007807C0007C07C0003C07C0003C07C0003E07
857+C0003E07C0003E07C0003E07C0003E07C0003E07C0003E07C0003E07C0003C07C0003C07
858+C0007C07C0007807C000F807C000F007C001E007C007C007C01F80FFFFFE00FFFFF8001F
859+1F7F9E23>I<FFFFFF80FFFFFF800F800F800F8003800F8003800F8001800F8001C00F80
860+00C00F8000C00F80C0C00F80C0C00F80C0000F80C0000F81C0000FFFC0000FFFC0000F81
861+C0000F80C0000F80C0000F80C0600F80C0600F8000600F8000C00F8000C00F8000C00F80
862+01C00F8001C00F8003C00F800F80FFFFFF80FFFFFF801B1F7E9E1F>I<FFFFFF80FFFFFF
863+8007C00F8007C0038007C0018007C0018007C001C007C000C007C000C007C060C007C060
864+C007C0600007C0600007C0E00007FFE00007FFE00007C0E00007C0600007C0600007C060
865+0007C0600007C0000007C0000007C0000007C0000007C0000007C0000007C0000007C000
866+00FFFF0000FFFF00001A1F7F9E1E>I<000FE010007FF83000F80E7003E00370078001F0
867+0F0000F01F0000F01E0000703C0000703C0000707C00003078000030F8000030F8000000
868+F8000000F8000000F8000000F8000000F8000000F8007FFEF8007FFE780001F07C0001F0
869+3C0001F03C0001F01E0001F01F0001F00F0001F007C001F003E003F000FC0E70007FFC10
870+000FF0001F217E9F24>I<FFF8FFF8FFF8FFF80F800F800F800F800F800F800F800F800F
871+800F800F800F800F800F800F800F800F800F800F800F800F800F800F800F800FFFFF800F
872+FFFF800F800F800F800F800F800F800F800F800F800F800F800F800F800F800F800F800F
873+800F800F800F800F800F800F800F800F800F80FFF8FFF8FFF8FFF81D1F7E9E22>I<FFF8
874+FFF80F800F800F800F800F800F800F800F800F800F800F800F800F800F800F800F800F80
875+0F800F800F800F800F800F800F800F800F800F80FFF8FFF80D1F7F9E10>I<07FFE007FF
876+E0001F00001F00001F00001F00001F00001F00001F00001F00001F00001F00001F00001F
877+00001F00001F00001F00001F00001F00001F00001F00001F00001F00781F00FC1F00FC1F
878+00FC1F00F83E00703E00387C001FF0000FC0001320809E17>I<FFFC00FFFC000F80000F
879+80000F80000F80000F80000F80000F80000F80000F80000F80000F80000F80000F80000F
880+80000F80000F80000F80000F80060F80060F80060F80060F800E0F800E0F800C0F801C0F
881+803C0F80FCFFFFFCFFFFFC171F7E9E1C>76 D<FFC0000FFEFFE0001FFE07E0001FC007E0
882+001FC006F00037C006F00037C006F00037C006780067C006780067C006780067C0063C00
883+C7C0063C00C7C0063C00C7C0061E0187C0061E0187C0060F0307C0060F0307C0060F0307
884+C006078607C006078607C006078607C00603CC07C00603CC07C00603CC07C00601F807C0
885+0601F807C00601F807C00600F007C00F00F007C0FFF0F0FFFEFFF060FFFE271F7F9E2A>
886+I<FF801FF8FFC01FF80FE003C00FE001800DF001800DF001800CF801800CFC01800C7C01
887+800C3E01800C3F01800C1F01800C0F81800C0FC1800C07C1800C07E1800C03E1800C01F1
888+800C01F9800C00F9800C007D800C007F800C003F800C001F800C001F800C000F800C000F
889+800C0007801E000380FFC00380FFC001801D1F7E9E22>I<001FE000007FF80001F03E00
890+03C00F00078007800F0003C01E0001E03E0001F03C0000F07C0000F87C0000F878000078
891+F800007CF800007CF800007CF800007CF800007CF800007CF800007CF800007CF800007C
892+7C0000F87C0000F87C0000F83C0000F03E0001F01E0001E00F0003C00780078003C00F00
893+01F03E00007FF800001FE0001E217E9F23>I<FFFFE000FFFFF8000F803E000F801F000F
894+800F800F8007800F8007C00F8007C00F8007C00F8007C00F8007C00F8007800F800F800F
895+801F000F803E000FFFF8000FFFE0000F8000000F8000000F8000000F8000000F8000000F
896+8000000F8000000F8000000F8000000F8000000F8000000F800000FFF80000FFF800001A
897+1F7E9E1F>I<FFFF8000FFFFF0000F807C000F803E000F801F000F800F000F800F800F80
898+0F800F800F800F800F800F800F000F801F000F803E000F807C000FFFF0000FFFE0000F81
899+F8000F807C000F807C000F803E000F803E000F803E000F803E000F803E000F803E000F80
900+3E000F803E0C0F803E0C0F801F0CFFF80F18FFF807F8000001F01E207E9E21>82
901+D<03F0400FFCC01E0FC03807C07803C07001C0F001C0F000C0F000C0F000C0F80000FC00
902+007F00007FF0003FFE001FFF000FFF8003FFC0007FE00007E00003F00001F00000F0C000
903+F0C000F0C000F0E000E0E000E0F001E0F801C0FE0780C7FF0081FC0014217E9F19>I<7F
904+FFFFE07FFFFFE07C0F81E0700F80E0600F8060600F8060E00F8070C00F8030C00F8030C0
905+0F8030C00F8030000F8000000F8000000F8000000F8000000F8000000F8000000F800000
906+0F8000000F8000000F8000000F8000000F8000000F8000000F8000000F8000000F800000
907+0F8000000F800003FFFE0003FFFE001C1F7E9E21>I<FFF81FF8FFF81FF80F8003C00F80
908+01800F8001800F8001800F8001800F8001800F8001800F8001800F8001800F8001800F80
909+01800F8001800F8001800F8001800F8001800F8001800F8001800F8001800F8001800F80
910+01800F8001800F800180078003000780030003C0030003C0060001E00C0000F83800003F
911+F000000FC0001D207E9E22>I<FFF807FEFFF807FE0F8000F00F8000E007C000C007C000
912+C007C000C003E0018003E0018003F0018001F0030001F0030001F8070000F8060000F806
913+0000FC0E00007C0C00007C0C00003E1800003E1800003E1800001F3000001F3000001FB0
914+00000FE000000FE000000FE0000007C0000007C0000003800000038000000380001F207F
915+9E22>I<FFF8FFF83FF0FFF8FFF83FF01F800F8007800F800F8003000F8007C003000FC0
916+07C0070007C007C0060007C00FE0060007E00FE00E0003E00FE00C0003E01FF00C0003E0
917+19F00C0001F019F0180001F019F0180001F030F8180000F830F8300000F830F8300000F8
918+607C3000007C607C6000007C607C6000007CC03E6000007EC03EE000003EC03EC000003F
919+C03FC000003F801FC000001F801F8000001F801F8000001F000F8000000F000F0000000F
920+000F0000000E000700000006000600002C207F9E2F>I<FFFFC0C0C0C0C0C0C0C0C0C0C0
921+C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0FFFF082D7CA1
922+0D>91 D<0804180C3018703860306030C060C060C060F87CFC7EFC7E7C3E381C0F0E7A9F
923+17>I<FFFF03030303030303030303030303030303030303030303030303030303030303
924+03030303030303030303FFFF082D80A10D>I<0FE0003FF8007C3C007C1E007C0F00380F
925+00000F00000F0001FF000FCF003E0F00780F00780F00F00F30F00F30F00F30F01F30783F
926+F03FC7E00F83C014147E9317>97 D<1E0000FE0000FE00001E00001E00001E00001E0000
927+1E00001E00001E00001E00001E00001E3F001EFFC01FC1E01F00F01E00701E00781E0038
928+1E003C1E003C1E003C1E003C1E003C1E003C1E00381E00781E00701F00F01D83E01CFF80
929+183E0016207F9F19>I<01F80007FE001E1F003C1F00381F00780E00700000F00000F000
930+00F00000F00000F00000F000007800007800003C01803C03801F070007FE0001F8001114
931+7F9314>I<0001E0000FE0000FE00001E00001E00001E00001E00001E00001E00001E000
932+01E00001E003F1E007FDE01F07E03C03E03801E07801E07001E0F001E0F001E0F001E0F0
933+01E0F001E0F001E07001E07801E03801E03C03E01E0FE00FFDFC03F1FC16207F9F19>I<
934+03F0000FFC001E1E003C0F00380700780700700380F00380FFFF80FFFF80F00000F00000
935+F000007000007800003801803C03801F070007FE0001F80011147F9314>I<003E0000FF
936+0003CF80078F80078F800F07000F00000F00000F00000F00000F00000F0000FFF000FFF0
937+000F00000F00000F00000F00000F00000F00000F00000F00000F00000F00000F00000F00
938+000F00000F00000F00000F00007FF0007FF0001120809F0E>I<0000E003E3F00FFE701C
939+1C70380E60780F00780F00780F00780F00780F00380E001C1C001FF80033E00020000030
940+00003000003FFE003FFF801FFFC01FFFE07001E06000F0E00070E00070E000707000E078
941+01E03E07C00FFF0003FC00141F7F9417>I<1E0000FE0000FE00001E00001E00001E0000
942+1E00001E00001E00001E00001E00001E00001E1F001E7F801EC3C01F81E01F01E01E01E0
943+1E01E01E01E01E01E01E01E01E01E01E01E01E01E01E01E01E01E01E01E01E01E01E01E0
944+FFC7FCFFC7FC16207F9F19>I<1C003E003E003E001C000000000000000000000000001E
945+00FE00FE001E001E001E001E001E001E001E001E001E001E001E001E001E001E001E00FF
946+C0FFC00A1F7F9E0D>I<007000F800F800F80070000000000000000000000000007807F8
947+07F800F80078007800780078007800780078007800780078007800780078007800780078
948+0078007800787078F878F8F0F9E07FC03F000D28839E0E>I<1E0000FE0000FE00001E00
949+001E00001E00001E00001E00001E00001E00001E00001E00001E1FF01E1FF01E0F801E0E
950+001E0C001E18001E30001E70001EF0001FF8001F78001E3C001E3E001E1E001E1F001E0F
951+801E07801E07C0FFCFF8FFCFF815207F9F18>I<1E00FE00FE001E001E001E001E001E00
952+1E001E001E001E001E001E001E001E001E001E001E001E001E001E001E001E001E001E00
953+1E001E001E001E00FFC0FFC00A207F9F0D>I<1E1F80FC00FE7FC3FE00FEC1E60F001F80
954+FC07801F00F807801E00F007801E00F007801E00F007801E00F007801E00F007801E00F0
955+07801E00F007801E00F007801E00F007801E00F007801E00F007801E00F007801E00F007
956+80FFC7FE3FF0FFC7FE3FF024147F9327>I<1E1F00FE7F80FEC3C01F81E01F01E01E01E0
957+1E01E01E01E01E01E01E01E01E01E01E01E01E01E01E01E01E01E01E01E01E01E01E01E0
958+FFC7FCFFC7FC16147F9319>I<01F80007FE001E07803C03C03801C07000E07000E0F000
959+F0F000F0F000F0F000F0F000F0F000F07000E07801E03801C03C03C01E078007FE0001F8
960+0014147F9317>I<1E3F00FEFFC0FFC3E01F00F01E00701E00781E00781E003C1E003C1E
961+003C1E003C1E003C1E003C1E00781E00781E00F01F00F01F83E01EFF801E3E001E00001E
962+00001E00001E00001E00001E00001E0000FFC000FFC000161D7F9319>I<01F06007FCE0
963+1F0EE03C03E03C03E07801E07801E0F001E0F001E0F001E0F001E0F001E0F001E07801E0
964+7801E03803E03C03E01F0FE00FFDE003F1E00001E00001E00001E00001E00001E00001E0
965+0001E0000FFC000FFC161D7F9318>I<1E78FEFCFF9E1F1E1F0C1F001E001E001E001E00
966+1E001E001E001E001E001E001E001E00FFE0FFE00F147F9312>I<0FC83FF870386018E0
967+18E018F000FF807FE03FF81FFC01FC003EC00EC00EE00EE00CF83CDFF887E00F147F9312
968+>I<06000600060006000E000E001E003E00FFF8FFF81E001E001E001E001E001E001E00
969+1E001E001E001E0C1E0C1E0C1E0C1E0C0F1807F003E00E1C7F9B12>I<1E01E0FE0FE0FE
970+0FE01E01E01E01E01E01E01E01E01E01E01E01E01E01E01E01E01E01E01E01E01E01E01E
971+01E01E03E01E03E00E0DE007F9FC03F1FC16147F9319>I<FFC7F8FFC7F81E01E01F01C0
972+0F01800F018007830007830007830003C60003C60003C60001EC0001EC0001FC0000F800
973+00F80000700000700000700015147F9318>I<FF9FF3FCFF9FF3FC1E03C0F01E03C0601F
974+03C0E00F07C0C00F07E0C00F87E1C0078CE180078CF18007CCF38003D8730003D87B0003
975+F87F0001F03E0001F03E0001F03E0000E01C0000E01C0000E01C001E147F9321>I<7FE7
976+FC7FE7FC0F83E007838003C30003E70001EE0000FC00007800007800003C00007E0000FE
977+0001CF000187800387800703C00F03E0FF87FEFF87FE1714809318>I<FFC7F8FFC7F81E
978+01E01F01C00F01800F018007830007830007830003C60003C60003C60001EC0001EC0001
979+FC0000F80000F80000700000700000700000600000600000600070C000F8C000C18000E3
980+80007F00003C0000151D7F9318>I<7FFF7FFF781E703E603C607860F861F001E003E007
981+C007830F831F031E073C067C06781EFFFEFFFE10147F9314>I E
982+/Fp 43 122 df<0001FF0000001FFFC000007F81E00000FC01E00001F807F00003F807F0
983+0007F007F00007F007F00007F007F00007F007F00007F001C00007F000000007F0000000
984+07F000000007F03FF800FFFFFFF800FFFFFFF800FFFFFFF80007F003F80007F003F80007
985+F003F80007F003F80007F003F80007F003F80007F003F80007F003F80007F003F80007F0
986+03F80007F003F80007F003F80007F003F80007F003F80007F003F80007F003F80007F003
987+F80007F003F80007F003F80007F003F80007F003F8007FFF3FFF807FFF3FFF807FFF3FFF
988+80212A7FA925>12 D<000E00001E00007E0007FE00FFFE00FFFE00F8FE0000FE0000FE00
989+00FE0000FE0000FE0000FE0000FE0000FE0000FE0000FE0000FE0000FE0000FE0000FE00
990+00FE0000FE0000FE0000FE0000FE0000FE0000FE0000FE0000FE0000FE0000FE0000FE00
991+00FE0000FE0000FE00FFFFFEFFFFFEFFFFFE17277BA622>49 D<00FF800007FFF0001FFF
992+FC003E07FE007E01FF807F007F80FF807FC0FF803FC0FF803FE0FF801FE0FF801FE07F00
993+1FE03E003FE000003FE000003FC000003FC000007F8000007F000000FE000000FC000001
994+F8000003F0000007C000000F8000001F0000003C0000007800E0007000E000E000E001C0
995+01C0030001C0060001C00FFFFFC01FFFFFC03FFFFFC07FFFFFC0FFFFFF80FFFFFF80FFFF
996+FF801B277DA622>I<007F800003FFF00007FFFC000F81FE001F00FF001F80FF003FC07F
997+803FC07F803FC07F803FC07F801FC07F800F80FF000000FF000000FE000001FC000003F8
998+000007F00000FF800000FFC0000001F8000000FE0000007F0000007F8000003FC000003F
999+C000003FE01C003FE07F003FE07F003FE0FF803FE0FF803FE0FF803FC0FF803FC07F007F
1000+807E00FF003F01FE001FFFFC0007FFF00000FF80001B277DA622>I<00000F0000000F00
1001+00001F0000003F0000007F000000FF000001FF000001FF000003BF0000073F00000E3F00
1002+001C3F00003C3F0000383F0000703F0000E03F0001C03F0003803F0007803F0007003F00
1003+0E003F001C003F0038003F0070003F00F0003F00FFFFFFF8FFFFFFF8FFFFFFF800007F00
1004+00007F0000007F0000007F0000007F0000007F0000007F0000007F00001FFFF8001FFFF8
1005+001FFFF81D277EA622>I<180003001F801F001FFFFE001FFFFC001FFFF8001FFFF0001F
1006+FFE0001FFF80001FFE00001C0000001C0000001C0000001C0000001C0000001C0000001C
1007+7FC0001DFFF8001F80FC001E003F0008003F0000001F8000001FC000001FC000001FE000
1008+001FE03C001FE07E001FE0FF001FE0FF001FE0FF001FE0FF001FC0FE001FC07C003F8078
1009+003F803C007F001F01FE000FFFFC0003FFF00000FF80001B277DA622>I<0007F800003F
1010+FE0000FFFF0001FC0F8003F00F8007E01FC00FC03FC01F803FC01F803FC03F803FC03F00
1011+1F807F000F007F0000007F000000FF020000FF1FF000FF3FFC00FF603E00FFC03F00FF80
1012+1F80FF801FC0FF801FC0FF001FC0FF001FE0FF001FE0FF001FE07F001FE07F001FE07F00
1013+1FE07F001FE03F001FE03F001FC01F801FC01F801F800FC03F0007E07E0003FFFC0001FF
1014+F800003FC0001B277DA622>I<380000003E0000003FFFFFF03FFFFFF03FFFFFF07FFFFF
1015+E07FFFFFC07FFFFF807FFFFF0070000E0070000E0070001C00E0003800E0007000E000E0
1016+000001C0000001C0000003800000078000000F8000000F0000001F0000001F0000003F00
1017+00003F0000007E0000007E0000007E000000FE000000FE000000FE000000FE000001FE00
1018+0001FE000001FE000001FE000001FE000001FE000001FE000000FC0000007800001C297C
1019+A822>I<003FC00001FFF00003FFFC0007C07E000F003F001E001F001E000F803E000F80
1020+3E000F803F000F803F800F803FC00F003FF01F001FFC1E001FFE3C000FFFF80007FFE000
1021+03FFF00001FFFC0001FFFE0007FFFF000F0FFF801E07FFC03E01FFC07C007FE07C001FE0
1022+F8000FE0F80007E0F80003E0F80003E0F80003E0F80003C07C0003C07E0007803F000F00
1023+1FC03F000FFFFC0003FFF800007FC0001B277DA622>I<00000780000000000780000000
1024+000FC0000000000FC0000000000FC0000000001FE0000000001FE0000000003FF0000000
1025+003FF0000000003FF00000000077F80000000077F800000000F7FC00000000E3FC000000
1026+00E3FC00000001C1FE00000001C1FE00000003C1FF0000000380FF0000000380FF000000
1027+07007F80000007007F8000000F007FC000000E003FC000000E003FC000001C001FE00000
1028+1C001FE000003FFFFFF000003FFFFFF000003FFFFFF00000700007F80000700007F80000
1029+F00007FC0000E00003FC0001E00003FE0001C00001FE0001C00001FE0003C00001FF00FF
1030+FE003FFFFCFFFE003FFFFCFFFE003FFFFC2E297EA833>65 D<00007FE0030003FFFC0700
1031+1FFFFF0F007FF00FDF00FF8001FF01FE0000FF03FC00007F07F000003F0FF000001F1FE0
1032+00001F1FE000000F3FC000000F3FC00000077FC00000077F800000077F80000000FF8000
1033+0000FF80000000FF80000000FF80000000FF80000000FF80000000FF80000000FF800000
1034+00FF800000007F800000007F800000007FC00000073FC00000073FC00000071FE0000007
1035+1FE000000E0FF000000E07F000001C03FC00003C01FE00007800FF8001F0007FF007C000
1036+1FFFFF800003FFFE0000007FF00028297CA831>67 D<FFFFFFFC0000FFFFFFFF8000FFFF
1037+FFFFE00003FC001FF80003FC0003FC0003FC0001FE0003FC0000FF0003FC00007F8003FC
1038+00003FC003FC00001FC003FC00001FE003FC00001FE003FC00000FF003FC00000FF003FC
1039+00000FF003FC00000FF003FC00000FF803FC00000FF803FC00000FF803FC00000FF803FC
1040+00000FF803FC00000FF803FC00000FF803FC00000FF803FC00000FF803FC00000FF803FC
1041+00000FF003FC00000FF003FC00000FF003FC00001FE003FC00001FE003FC00001FC003FC
1042+00003FC003FC00003F8003FC00007F0003FC0001FF0003FC0003FC0003FC001FF800FFFF
1043+FFFFF000FFFFFFFF8000FFFFFFFC00002D297EA834>I<FFFFFFFFE0FFFFFFFFE0FFFFFF
1044+FFE003FC001FE003FC0007F003FC0001F003FC0001F003FC0000F003FC00007003FC0000
1045+7003FC00007003FC01C07803FC01C03803FC01C03803FC01C03803FC03C00003FC03C000
1046+03FC0FC00003FFFFC00003FFFFC00003FFFFC00003FC0FC00003FC03C00003FC03C00003
1047+FC01C00E03FC01C00E03FC01C00E03FC01C01C03FC00001C03FC00001C03FC00001C03FC
1048+00003C03FC00003803FC00007803FC0000F803FC0001F803FC0003F803FC001FF8FFFFFF
1049+FFF0FFFFFFFFF0FFFFFFFFF027297EA82C>I<FFFFFFFFC0FFFFFFFFC0FFFFFFFFC003FC
1050+003FC003FC000FE003FC0003E003FC0001E003FC0001E003FC0000E003FC0000E003FC00
1051+00E003FC0000F003FC01C07003FC01C07003FC01C07003FC01C00003FC03C00003FC03C0
1052+0003FC0FC00003FFFFC00003FFFFC00003FFFFC00003FC0FC00003FC03C00003FC03C000
1053+03FC01C00003FC01C00003FC01C00003FC01C00003FC00000003FC00000003FC00000003
1054+FC00000003FC00000003FC00000003FC00000003FC00000003FC000000FFFFFC0000FFFF
1055+FC0000FFFFFC000024297EA82A>I<FFFFF0FFFFF0FFFFF003FC0003FC0003FC0003FC00
1056+03FC0003FC0003FC0003FC0003FC0003FC0003FC0003FC0003FC0003FC0003FC0003FC00
1057+03FC0003FC0003FC0003FC0003FC0003FC0003FC0003FC0003FC0003FC0003FC0003FC00
1058+03FC0003FC0003FC0003FC0003FC0003FC0003FC00FFFFF0FFFFF0FFFFF014297EA819>
1059+73 D<FFFFFC0000FFFFFC0000FFFFFC000003FC00000003FC00000003FC00000003FC00
1060+000003FC00000003FC00000003FC00000003FC00000003FC00000003FC00000003FC0000
1061+0003FC00000003FC00000003FC00000003FC00000003FC00000003FC00000003FC000000
1062+03FC00000003FC00000003FC00000003FC0001C003FC0001C003FC0001C003FC0001C003
1063+FC0003C003FC00038003FC00038003FC00078003FC00078003FC000F8003FC000F8003FC
1064+001F8003FC007F8003FC01FF00FFFFFFFF00FFFFFFFF00FFFFFFFF0022297EA828>76
1065+D<FFFFFFF800FFFFFFFF00FFFFFFFFC003FC003FE003FC000FF003FC0007F803FC0007FC
1066+03FC0003FC03FC0003FE03FC0003FE03FC0003FE03FC0003FE03FC0003FE03FC0003FE03
1067+FC0003FE03FC0003FC03FC0007FC03FC0007F803FC000FF003FC003FE003FFFFFF8003FF
1068+FFFE0003FC00000003FC00000003FC00000003FC00000003FC00000003FC00000003FC00
1069+000003FC00000003FC00000003FC00000003FC00000003FC00000003FC00000003FC0000
1070+0003FC00000003FC000000FFFFF00000FFFFF00000FFFFF0000027297EA82E>80
1071+D<00FF806003FFF0E00FFFF9E01F80FFE03F001FE03E0007E07C0003E07C0003E0FC0001
1072+E0FC0001E0FC0000E0FE0000E0FE0000E0FF000000FFC000007FFC00007FFFE0003FFFF8
1073+001FFFFE001FFFFF0007FFFF8003FFFFC000FFFFC0000FFFE000007FE000001FF000000F
1074+F0000007F0E00003F0E00003F0E00003F0E00003F0F00003E0F00003E0F80007E0FC0007
1075+C0FF000F80FFE03F80F3FFFE00E1FFFC00C01FF0001C297CA825>83
1076+D<7FFFFFFFFF807FFFFFFFFF807FFFFFFFFF807F807F807F807C007F800F8078007F8007
1077+8078007F80078070007F800380F0007F8003C0F0007F8003C0E0007F8001C0E0007F8001
1078+C0E0007F8001C0E0007F8001C0E0007F8001C000007F80000000007F80000000007F8000
1079+0000007F80000000007F80000000007F80000000007F80000000007F80000000007F8000
1080+0000007F80000000007F80000000007F80000000007F80000000007F80000000007F8000
1081+0000007F80000000007F80000000007F80000000007F80000000007F80000000007F8000
1082+0000007F80000000FFFFFFC00000FFFFFFC00000FFFFFFC0002A287EA72F>I<FFFFF000
1083+7FFFFFFFF0007FFFFFFFF0007FFF03FE000001C001FE0000038001FE0000038001FF0000
1084+078000FF0000070000FF80000F00007F80000E00007FC0000E00003FC0001C00003FC000
1085+1C00003FE0003C00001FE0003800001FF0007800000FF0007000000FF80070000007F800
1086+E0000007F800E0000003FC01C0000003FC01C0000003FE03C0000001FE0380000001FF07
1087+80000000FF0700000000FF87000000007F8E000000007F8E000000007FDE000000003FDC
1088+000000003FFC000000001FF8000000001FF8000000000FF0000000000FF0000000000FF0
1089+0000000007E00000000007E00000000003C00000000003C0000030297FA833>86
1090+D<01FF80000FFFF0001F81FC003FC0FE003FC07F003FC03F003FC03F801F803F800F003F
1091+8000003F8000003F800000FF80007FFF8003FFFF800FF03F801FC03F803F803F807F003F
1092+80FE003F80FE003F80FE003F80FE003F80FE007F807F00DF803F839FFC1FFF0FFC03FC03
1093+FC1E1B7E9A21>97 D<FFE00000FFE00000FFE000000FE000000FE000000FE000000FE000
1094+000FE000000FE000000FE000000FE000000FE000000FE000000FE000000FE000000FE1FE
1095+000FEFFF800FFE0FE00FF803F00FF001F80FE001FC0FE000FC0FE000FE0FE000FE0FE000
1096+FF0FE000FF0FE000FF0FE000FF0FE000FF0FE000FF0FE000FF0FE000FF0FE000FE0FE000
1097+FE0FE000FE0FE001FC0FE001FC0FF001F80FF803F00F9C0FE00F0FFF800E01FC00202A7E
1098+A925>I<003FE00001FFFC0003F07E000FC0FF001FC0FF003F80FF003F80FF007F007E00
1099+7F003C007F000000FF000000FF000000FF000000FF000000FF000000FF000000FF000000
1100+7F0000007F0000007F8000003F8003803F8003801FC007000FE00E0003F83C0001FFF800
1101+003FC000191B7E9A1E>I<00007FF000007FF000007FF0000007F0000007F0000007F000
1102+0007F0000007F0000007F0000007F0000007F0000007F0000007F0000007F0000007F000
1103+3F87F001FFF7F007F03FF00FC00FF01F8007F03F8007F03F8007F07F0007F07F0007F07F
1104+0007F0FF0007F0FF0007F0FF0007F0FF0007F0FF0007F0FF0007F0FF0007F0FF0007F07F
1105+0007F07F0007F03F0007F03F8007F01F800FF00FC01FF007F07FFF01FFE7FF007F87FF20
1106+2A7EA925>I<003FC00001FFF00003F0FC000FC03E001F803F001F801F003F801F807F00
1107+1F807F001FC07F000FC0FF000FC0FF000FC0FFFFFFC0FFFFFFC0FF000000FF000000FF00
1108+00007F0000007F0000007F0000003F8001C01F8001C00FC0038007C0070003F01E0000FF
1109+FC00003FE0001A1B7E9A1F>I<0003F800001FFE00007E3F0001FC3F8001F87F8003F87F
1110+8007F07F8007F03F0007F03F0007F0000007F0000007F0000007F0000007F0000007F000
1111+00FFFFC000FFFFC000FFFFC00007F0000007F0000007F0000007F0000007F0000007F000
1112+0007F0000007F0000007F0000007F0000007F0000007F0000007F0000007F0000007F000
1113+0007F0000007F0000007F0000007F0000007F0000007F000007FFF80007FFF80007FFF80
1114+00192A7EA915>I<00FF81F003FFE7F80FC1FE1C1F80FC7C3F007E7C3F007E387F007F00
1115+7F007F007F007F007F007F007F007F007F007F003F007E003F007E001F80FC000FC1F800
1116+1FFFE00018FF800038000000380000003C0000003E0000003FFFF8003FFFFF001FFFFFC0
1117+0FFFFFE007FFFFF01FFFFFF03E0007F07C0001F8F80000F8F80000F8F80000F8F80000F8
1118+7C0001F07C0001F03F0007E00FC01F8007FFFF00007FF0001E287E9A22>I<FFE00000FF
1119+E00000FFE000000FE000000FE000000FE000000FE000000FE000000FE000000FE000000F
1120+E000000FE000000FE000000FE000000FE000000FE0FE000FE3FF800FE70FC00FEC0FE00F
1121+F807E00FF807F00FF007F00FF007F00FE007F00FE007F00FE007F00FE007F00FE007F00F
1122+E007F00FE007F00FE007F00FE007F00FE007F00FE007F00FE007F00FE007F00FE007F00F
1123+E007F00FE007F0FFFE3FFFFFFE3FFFFFFE3FFF202A7DA925>I<07000F801FC03FE03FE0
1124+3FE01FC00F8007000000000000000000000000000000FFE0FFE0FFE00FE00FE00FE00FE0
1125+0FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE0FFFE
1126+FFFEFFFE0F2B7EAA12>I<FFE00000FFE00000FFE000000FE000000FE000000FE000000F
1127+E000000FE000000FE000000FE000000FE000000FE000000FE000000FE000000FE000000F
1128+E01FFC0FE01FFC0FE01FFC0FE007800FE00F000FE01E000FE03C000FE078000FE0E0000F
1129+E3C0000FE7C0000FEFE0000FFFF0000FFFF8000FF3F8000FE1FC000FC0FE000FC07F000F
1130+C07F000FC03F800FC01FC00FC00FE00FC00FE00FC007F0FFFC1FFFFFFC1FFFFFFC1FFF20
1131+2A7FA923>107 D<FFE0FFE0FFE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE0
1132+0FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE0
1133+0FE00FE00FE00FE00FE00FE00FE0FFFEFFFEFFFE0F2A7EA912>I<FFC07F001FC000FFC1
1134+FFC07FF000FFC707E1C1F8000FCC07F301FC000FD803F600FC000FD803FE00FE000FF003
1135+FC00FE000FF003FC00FE000FE003F800FE000FE003F800FE000FE003F800FE000FE003F8
1136+00FE000FE003F800FE000FE003F800FE000FE003F800FE000FE003F800FE000FE003F800
1137+FE000FE003F800FE000FE003F800FE000FE003F800FE000FE003F800FE000FE003F800FE
1138+000FE003F800FE000FE003F800FE00FFFE3FFF8FFFE0FFFE3FFF8FFFE0FFFE3FFF8FFFE0
1139+331B7D9A38>I<FFC0FE00FFC3FF80FFC70FC00FCC0FE00FD807E00FD807F00FF007F00F
1140+F007F00FE007F00FE007F00FE007F00FE007F00FE007F00FE007F00FE007F00FE007F00F
1141+E007F00FE007F00FE007F00FE007F00FE007F00FE007F00FE007F00FE007F0FFFE3FFFFF
1142+FE3FFFFFFE3FFF201B7D9A25>I<003FE00001FFFC0003F07E000FC01F801F800FC03F80
1143+0FE03F0007E07F0007F07F0007F07F0007F0FF0007F8FF0007F8FF0007F8FF0007F8FF00
1144+07F8FF0007F8FF0007F8FF0007F87F0007F07F0007F03F800FE03F800FE01F800FC00FC0
1145+1F8007F07F0001FFFC00003FE0001D1B7E9A22>I<FFE1FE00FFEFFF80FFFE0FE00FF807
1146+F00FF003F80FE001FC0FE001FC0FE001FE0FE000FE0FE000FF0FE000FF0FE000FF0FE000
1147+FF0FE000FF0FE000FF0FE000FF0FE000FF0FE000FE0FE001FE0FE001FE0FE001FC0FE003
1148+FC0FF003F80FF807F00FFC1FE00FEFFF800FE1FC000FE000000FE000000FE000000FE000
1149+000FE000000FE000000FE000000FE000000FE00000FFFE0000FFFE0000FFFE000020277E
1150+9A25>I<FFC1F0FFC7FCFFCE3E0FDC7F0FD87F0FF07F0FF07F0FF03E0FE0000FE0000FE0
1151+000FE0000FE0000FE0000FE0000FE0000FE0000FE0000FE0000FE0000FE0000FE0000FE0
1152+000FE000FFFF00FFFF00FFFF00181B7F9A1B>114 D<03FE300FFFF03E03F07800F07000
1153+F0F00070F00070F80070FE0000FFE0007FFF007FFFC03FFFE01FFFF007FFF800FFF80007
1154+FC0000FCE0007CE0003CF0003CF00038F80038FC0070FF01E0F7FFC0C1FF00161B7E9A1B
1155+>I<00E00000E00000E00000E00001E00001E00001E00003E00003E00007E0000FE0001F
1156+FFE0FFFFE0FFFFE00FE0000FE0000FE0000FE0000FE0000FE0000FE0000FE0000FE0000F
1157+E0000FE0000FE0000FE0000FE0700FE0700FE0700FE0700FE0700FE0700FE07007F0E003
1158+F0C001FF80007F0014267FA51A>I<FFE07FF0FFE07FF0FFE07FF00FE007F00FE007F00F
1159+E007F00FE007F00FE007F00FE007F00FE007F00FE007F00FE007F00FE007F00FE007F00F
1160+E007F00FE007F00FE007F00FE007F00FE007F00FE007F00FE007F00FE00FF00FE00FF007
1161+E01FF003F077FF01FFE7FF007F87FF201B7D9A25>I<FFFC03FFFFFC03FFFFFC03FF0FF0
1162+00F007F000E007F800E003F801C003F801C003FC03C001FC038001FE078000FE070000FF
1163+0700007F0E00007F0E00007F9E00003F9C00003FFC00001FF800001FF800000FF000000F
1164+F000000FF0000007E0000007E0000003C0000003C000201B7F9A23>I<FFFC7FFC1FFCFF
1165+FC7FFC1FFCFFFC7FFC1FFC0FE00FE001C007F007E0038007F007E0038007F807F0078003
1166+F807F0070003F80FF8070003FC0FF80F0001FC0FF80E0001FC1FFC0E0000FE1CFC1C0000
1167+FE1CFE1C0000FF387E3C00007F387E3800007F787F3800003FF03F7000003FF03FF00000
1168+3FE01FF000001FE01FE000001FE01FE000000FC00FC000000FC00FC000000F8007C00000
1169+07800780000007800780002E1B7F9A31>I<FFFC1FFEFFFC1FFEFFFC1FFE07F0038003F8
1170+078003FC0F0001FE1E0000FE3C00007F3800007FF800003FF000001FE000000FE000000F
1171+F0000007F800000FF800001FFC00003CFE000038FF0000787F0000F03F8001E01FC003C0
1172+1FE003800FE0FFF03FFFFFF03FFFFFF03FFF201B7F9A23>I<FFFC03FFFFFC03FFFFFC03
1173+FF0FF000F007F000E007F800E003F801C003F801C003FC03C001FC038001FE078000FE07
1174+0000FF0700007F0E00007F0E00007F9E00003F9C00003FFC00001FF800001FF800000FF0
1175+00000FF000000FF0000007E0000007E0000003C0000003C0000003800000038000000780
1176+00380700007C0F0000FE0E0000FE1E0000FE1C0000FE38000074F000003FE000000F8000
1177+0020277F9A23>I E /Fq 41 127 df<007E0001C1800301800703C00E03C00E01800E00
1178+000E00000E00000E00000E0000FFFFC0FFFFC00E01C00E01C00E01C00E01C00E01C00E01
1179+C00E01C00E01C00E01C00E01C00E01C00E01C00E01C00E01C07F87F87F87F8151D809C17
1180+>12 D<FC00FC001C001C001C001C001C001C001C001C001C001C001C001C001C001C00FF
1181+80FF8009127F910C>16 D<070F0F1C3870E0400808789C15>19 D<1C001E000780038003
1182+800380FF00800009087B7E12>24 D<70F8F8F87005057D840C>46
1183+D<07C01FF0387C603C601EF01FF81FF80FF80F700F001F001E001E003C0038007000E000
1184+C00180030006000C031803100320067FFEFFFEFFFE101C7E9B15>50
1185+D<000C00001C00001C00003C00007C00005C0000DC00019C00031C00031C00061C000C1C
1186+00081C00181C00301C00201C00601C00C01C00FFFFC0FFFFC0001C00001C00001C00001C
1187+00001C00001C0001FFC001FFC0121C7F9B15>52 D<00060000000F0000000F0000000F00
1188+00001F8000001F8000001F8000003FC0000033C0000033C0000073E0000061E0000061E0
1189+0000E1F00000C0F00000C0F00001C0F8000180780001FFF80003FFFC0003003C0003003C
1190+0007003E0006001E0006001E000E001F001E000F00FF807FF0FF807FF01C1D7F9C1F>65
1191+D<001F808000FFE18001F03B8007C00F800F0007801F0007801E0003803C0003807C0001
1192+807C00018078000180F8000000F8000000F8000000F8000000F8000000F8000000F80000
1193+00F8000000780001807C0001807C0001803C0001801E0003001F0003000F00060007C00C
1194+0001F0380000FFF000001FC000191E7E9C1E>67 D<FFFFFCFFFFFC0F007C0F001C0F000C
1195+0F000E0F00060F03060F03060F03060F03000F07000FFF000FFF000F07000F03000F0300
1196+0F03030F03030F00030F00060F00060F00060F000E0F001E0F007CFFFFFCFFFFFC181C7E
1197+9B1C>69 D<FFF0FFF00F000F000F000F000F000F000F000F000F000F000F000F000F000F
1198+000F000F000F000F000F000F000F000F000F000F00FFF0FFF00C1C7F9B0F>73
1199+D<FFF800FFF8000F00000F00000F00000F00000F00000F00000F00000F00000F00000F00
1200+000F00000F00000F00000F00000F00000F00180F00180F00180F00180F00380F00300F00
1201+700F00F00F01F0FFFFF0FFFFF0151C7E9B1A>76 D<003F800000E0E0000380380007001C
1202+000E000E001E000F003C0007803C0007807C0007C0780003C0780003C0F80003E0F80003
1203+E0F80003E0F80003E0F80003E0F80003E0F80003E0F80003E0780003C07C0007C07C0007
1204+C03C0007803E000F801E000F000F001E0007001C000380380000E0E000003F80001B1E7E
1205+9C20>79 D<FFFF80FFFFE00F01F00F00780F003C0F003E0F003E0F003E0F003E0F003E0F
1206+003C0F003C0F00780F01F00FFFC00F00000F00000F00000F00000F00000F00000F00000F
1207+00000F00000F00000F0000FFF000FFF000171C7E9B1C>I<7FFFFFC07FFFFFC0780F03C0
1208+700F01C0600F00C0E00F00E0C00F0060C00F0060C00F0060C00F0060000F0000000F0000
1209+000F0000000F0000000F0000000F0000000F0000000F0000000F0000000F0000000F0000
1210+000F0000000F0000000F0000000F0000000F000003FFFC0003FFFC001B1C7F9B1E>84
1211+D<FFE01FF0FFE01FF01F0007800F0003000F00030007800600078006000780060003C00C
1212+0003C00C0003C00C0001E0180001E0180001F0180000F0300000F0300000F87000007860
1213+0000786000003CC000003CC000003CC000001F8000001F8000001F8000000F0000000F00
1214+00000F0000000600001C1D7F9B1F>86 D<0FE0001838003C1C003C0E00180E00000E0000
1215+0E0001FE000F8E003C0E00780E00700E00F00E60F00E60F00E60701E603827C00FC38013
1216+127F9115>97 D<FC0000FC00001C00001C00001C00001C00001C00001C00001C00001C00
1217+001C00001CFC001F87001E03801C01C01C01E01C00E01C00F01C00F01C00F01C00F01C00
1218+F01C00F01C00E01C01E01C01C01E03801B070018FC00141D7F9C17>I<03F80E0C1C1E38
1219+1E780C7000F000F000F000F000F000F0007000780638061C0C0E1803E00F127F9112>I<
1220+001F80001F8000038000038000038000038000038000038000038000038000038003F380
1221+0E0F801C0780380380780380700380F00380F00380F00380F00380F00380F00380700380
1222+7803803803801C07800E1BF003F3F0141D7F9C17>I<07E00C301818381C701E700EF00E
1223+FFFEF000F000F000F000700070063806180C0E1803E00F127F9112>I<00F8018C071E06
1224+1E0E0C0E000E000E000E000E000E00FFE0FFE00E000E000E000E000E000E000E000E000E
1225+000E000E000E000E000E007FE07FE00F1D809C0D>I<00038007E4C00C39C0381DC0381C
1226+00781E00781E00781E00781E00381C00381C001C300037E0002000003000003000003FF8
1227+001FFF001FFF803003806001C0C000C0C000C0C000C06001803003001C0E0007F800121C
1228+7F9215>I<FC0000FC00001C00001C00001C00001C00001C00001C00001C00001C00001C
1229+00001C7C001C87001D03001E03801C03801C03801C03801C03801C03801C03801C03801C
1230+03801C03801C03801C03801C0380FF9FF0FF9FF0141D7F9C17>I<38007C007C007C0038
1231+00000000000000000000000000FC00FC001C001C001C001C001C001C001C001C001C001C
1232+001C001C001C001C00FF80FF80091D7F9C0C>I<01C003E003E003E001C0000000000000
1233+00000000000007E007E000E000E000E000E000E000E000E000E000E000E000E000E000E0
1234+00E000E000E000E000E000E060E0F0C0F1C061803E000B25839C0D>I<FC00FC001C001C
1235+001C001C001C001C001C001C001C001C001C001C001C001C001C001C001C001C001C001C
1236+001C001C001C001C001C00FF80FF80091D7F9C0C>108 D<FC7E07E000FC838838001D01
1237+9018001E01E01C001C01C01C001C01C01C001C01C01C001C01C01C001C01C01C001C01C0
1238+1C001C01C01C001C01C01C001C01C01C001C01C01C001C01C01C001C01C01C00FF8FF8FF
1239+80FF8FF8FF8021127F9124>I<FC7C00FC87001D03001E03801C03801C03801C03801C03
1240+801C03801C03801C03801C03801C03801C03801C03801C0380FF9FF0FF9FF014127F9117
1241+>I<03F0000E1C00180600380700700380700380F003C0F003C0F003C0F003C0F003C0F0
1242+03C07003807003803807001C0E000E1C0003F00012127F9115>I<FCFC00FF87001E0380
1243+1C01C01C01E01C00E01C00F01C00F01C00F01C00F01C00F01C00F01C01E01C01E01C01C0
1244+1E03801F07001CFC001C00001C00001C00001C00001C00001C0000FF8000FF8000141A7F
1245+9117>I<03F1800E19801C0780380780780380780380F00380F00380F00380F00380F003
1246+80F003807003807803803807801C07800E1B8003E3800003800003800003800003800003
1247+80000380001FF0001FF0141A7F9116>I<FCE0FD381E781E781C301C001C001C001C001C
1248+001C001C001C001C001C001C00FFC0FFC00D127F9110>I<1F9020F04070C030C030E030
1249+F8007F803FE00FF000F8C038C018C018E018E010D0608FC00D127F9110>I<0C000C000C
1250+000C000C000C001C001C003FE0FFE01C001C001C001C001C001C001C001C001C301C301C
1251+301C301C300C200E6003C00C1A7F9910>I<FC1F80FC1F801C03801C03801C03801C0380
1252+1C03801C03801C03801C03801C03801C03801C03801C03801C07800C07800E1BF003E3F0
1253+14127F9117>I<FF0FE0FF0FE01C07801C03000E06000E06000E0600070C00070C00070C
1254+0003980003980003F80001F00001F00000E00000E00000E00013127F9116>I<FF3FCFE0
1255+FF3FCFE03C0F07801C0F03001C1B03001C1B87000E1B86000E3B86000E3186000731CC00
1256+0731CC000760CC0003E0F80003E0F80003C0780003C0780001C0700001C070001B127F91
1257+1E>I<7F8FF07F8FF00F0780070600038E0001DC0001D80000F00000700000780000F800
1258+01DC00038E00030E000607000F0380FF0FF8FF0FF81512809116>I<FF0FE0FF0FE01C07
1259+801C03000E06000E06000E0600070C00070C00070C0003980003980003F80001F00001F0
1260+0000E00000E00000E00000C00000C00000C000F18000F18000F300006600003C0000131A
1261+7F9116>I<1C043F0843F080E00E047D9B15>126 D E /Fr 13 118
1262+df<0F001F003F803F007E00F800F000C0000908769C18>19 D<00038000000380000007
1263+C0000007C0000007C000000FE000000FE000001FF000001BF000003BF8000031F8000031
1264+F8000060FC000060FC0000E0FE0000C07E0000C07E0001803F0001FFFF0003FFFF800300
1265+1F8007001FC006000FC006000FC00C0007E00C0007E0FF803FFEFF803FFE1F1C7E9B24>
1266+65 D<07F8601FFEE03C07E07801E07000E0F000E0F00060F00060F80000FE0000FFE000
1267+7FFE003FFF003FFF800FFFC007FFE0007FE00003F00001F00000F0C000F0C000F0C000E0
1268+E000E0F001C0FC03C0EFFF00C3FC00141C7D9B1B>83 D<07F8001FFE003F1F803F07803F
1269+07C01E07C00C07C003FFC01FFFC03F87C07E07C0FC07C0FC07C0FC07C0FC0FC07E1FC03F
1270+FBF80FE1F815127F9117>97 D<FF0000FF00001F00001F00001F00001F00001F00001F00
1271+001F00001F00001F00001F1FC01FFFE01FC1F81F00F81F007C1F007C1F007E1F007E1F00
1272+7E1F007E1F007E1F007E1F007C1F007C1F80F81FC1F01C7FE0181F80171D7F9C1B>I<03
1273+F8000FFE001F3F003E3F007C3F007C1E00FC0C00FC0000FC0000FC0000FC0000FC00007C
1274+00007E01803E03801F07000FFE0003F80011127E9115>I<1C003E007F007F007F003E00
1275+1C00000000000000000000007F007F001F001F001F001F001F001F001F001F001F001F00
1276+1F001F001F001F00FFC0FFC00A1E7F9D0E>105 D<FF1FC0FE00FF7FE3FF001FE1F70F80
1277+1F80FC07C01F80FC07C01F00F807C01F00F807C01F00F807C01F00F807C01F00F807C01F
1278+00F807C01F00F807C01F00F807C01F00F807C01F00F807C01F00F807C0FFE7FF3FF8FFE7
1279+FF3FF825127F9128>109 D<01FC000FFF801F07C03E03E07C01F07C01F0FC01F8FC01F8
1280+FC01F8FC01F8FC01F8FC01F87C01F07C01F03E03E01F07C00FFF8001FC0015127F9118>
1281+111 D<FE7C00FEFF001FDF801F9F801F9F801F0F001F06001F00001F00001F00001F0000
1282+1F00001F00001F00001F00001F0000FFE000FFE00011127F9114>114
1283+D<1FD83FF87038E018E018F000FF807FE07FF01FF807FC007CC01CC01CE01CF038FFF0CF
1284+C00E127E9113>I<030003000300070007000F000F003F00FFFCFFFC1F001F001F001F00
1285+1F001F001F001F001F001F0C1F0C1F0C1F0C0F9807F003E00E1A7F9913>I<FF07F8FF07
1286+F81F00F81F00F81F00F81F00F81F00F81F00F81F00F81F00F81F00F81F00F81F00F81F00
1287+F81F01F80F03F807FEFF03F8FF18127F911B>I E /Fs 7 115 df<000FF000007FFC0000
1288+FFFF0001FFFF0007F81F0007E006000F8000001F0000003F0000003E0000003E0000007C
1289+0000007C0000007C000000F8000000F8000000F8000000F8000000F8000000F8000000F8
1290+000000F8000000F80000007C0000007C0000007C0000003E0000003E0000003F0000001F
1291+0000000F80008007E0038007F80F8001FFFF8000FFFF00007FFC00000FF00019257DA31F
1292+>67 D<000FF000003FFE0000FFFF8001FFFF8003F80F8007E003000FC000001F8000001F
1293+0000003E0000003E0000007C0000007C0000007C000000F8000000F8000000F8000000F8
1294+000000F8000000F8000000F800FFC0F800FFC0F800FFC07C0003C07C0003C07C0003C03E
1295+0003C03E0003C01F0003C01F8003C00FC003C007E003C003F807C001FFFFC000FFFFC000
1296+3FFF00000FF8001A257DA321>71 D<FFFFFFF0FFFFFFF0FFFFFFF0FFFFFFF0000F800000
1297+0F8000000F8000000F8000000F8000000F8000000F8000000F8000000F8000000F800000
1298+0F8000000F8000000F8000000F8000000F8000000F8000000F8000000F8000000F800000
1299+0F8000000F8000000F8000000F8000000F8000000F8000000F8000000F8000000F800000
1300+0F8000000F8000000F80001C237EA221>84 D<07F0003FFC007FFE00781F00600F004007
1301+8000078000078000078001FF800FFF801FFF807F0780780780F00780F00780F00780F80F
1302+807C1F807FFF803FFF801FC78011167E9517>97 D<01F80007FE000FFF001F07803C03C0
1303+7801C07801C07000E0FFFFE0FFFFE0FFFFE0F00000F00000F000007000007800007C0000
1304+3E00401F03C00FFFC007FF8000FC0013167F9516>101 D<007F01FF03FF07C107000F00
1305+0F000F000F000F000F000F000F00FFF8FFF8FFF80F000F000F000F000F000F000F000F00
1306+0F000F000F000F000F000F000F000F000F000F000F00102380A20F>I<F0E0F3E0F7E0FF
1307+E0FF00FC00F800F800F000F000F000F000F000F000F000F000F000F000F000F000F000F0
1308+000B167C9511>114 D E /Ft 30 118 df<387CFCFE7E3E0E1C3CF8F040070C788516>
1309+44 D<FFFF80FFFF80FFFF8011037E8D16>I<3078FCFC78300606788516>I<0001800003
1310+80000380000700000700000E00000E00001C00001C0000380000380000700000700000E0
1311+0000E00001C00001C0000380000380000700000700000E00000E00001C00001C00003800
1312+00380000700000700000E00000E00000C0000011207E9C16>I<03E0000FF8001FFC001E
1313+3C00380E00780F00700700700700E00380E00380E00380E00380E00380E00380E00380E0
1314+0380F00780700700700700780F003C1E001E3C001FFC000FF80003E00011197E9816>I<
1315+0300070007000F001F00FF00FF00E7000700070007000700070007000700070007000700
1316+0700070007000700FFF8FFF8FFF80D197B9816>I<07E0001FF8003FFC00783E00E00700
1317+F00780F00380600380000380000380000700000700000E00001C0000380000700000E000
1318+01C0000380000F00001E03803803807FFF80FFFF807FFF8011197E9816>I<007C0000FC
1319+0000FC0001DC00039C00039C00071C000F1C000E1C001E1C003C1C00381C00781C00F01C
1320+00FFFFE0FFFFE0FFFFE0001C00001C00001C00001C00001C0001FFC001FFC001FFC01319
1321+7F9816>52 D<3FFE007FFE007FFE00700000700000700000700000700000700000700000
1322+77F0007FFC007FFE00780F00300700000380000380600380F00380F00380E00700781E00
1323+3FFC001FF80007E00011197E9816>I<00F80003FC0007FE000F07001C0F00380F007806
1324+00700000700000E7F800EFFC00FFFE00F80F00F00700F00380E00380E003807003807003
1325+807007803807003C1E001FFC000FF80003E00011197E9816>I<07F0001FFC003FFE007C
1326+1F00F00780E00380E00380E003807007007C1F001FFC0007F0001FFC003C1E00700700F0
1327+0780E00380E00380E00380F007807007007C1F003FFE001FFC0007F00011197E9816>56
1328+D<03E0000FF8001FFC003C1E00700E00700700E00700E00780E00380E00380E007807007
1329+80780F803FFF801FFB800FF380000700000700300700780E00781C00707C003FF8001FE0
1330+000F800011197E9816>I<3078FCFC78300000000000003078FCFC78300612789116>I<00
1331+F80003FC0007FE000F07001C3B8038FF8079FF8073C7C07383C0E701C0E701C0E701C0E7
1332+01C0E701C0E701C0E701C073838073C78079FF0038FE001C38000F03C007FFC003FF0000
1333+FC0012197E9816>64 D<7FF800FFFE007FFF001C0F001C07801C03C01C01C01C01C01C01
1334+E01C00E01C00E01C00E01C00E01C00E01C00E01C00E01C00E01C01C01C01C01C03C01C07
1335+801C0F807FFF00FFFE007FF8001319809816>68 D<1FE0003FF0007FF800783C00300E00
1336+000E00003E0007FE001FFE007FCE00780E00E00E00E00E00E00E00783E007FFFE03FF7E0
1337+0FC3E013127E9116>97 D<FC0000FC0000FC00001C00001C00001C00001C00001C7C001D
1338+FE001FFF001F07801E03C01C01C01C00E01C00E01C00E01C00E01C00E01C00E01E01C01E
1339+03C01F07801FFF001DFE000CF80013197F9816>I<03F80FFC1FFE3C1E780C7000E000E0
1340+00E000E000E000F000700778073E0E1FFC0FF803F010127D9116>I<003F00003F00003F
1341+0000070000070000070000070003E7000FF7001FFF003C1F00780F00700700E00700E007
1342+00E00700E00700E00700E00700700F00780F003C1F001FFFE00FF7E007C7E013197F9816
1343+>I<03F0000FFC001FFE003C0F00780700700380E00380FFFF80FFFF80FFFF80E00000E0
1344+00007003807803803E07801FFF0007FE0001F80011127E9116>I<001E00007F0001FF80
1345+01C7800383000380000380007FFF00FFFF00FFFF00038000038000038000038000038000
1346+0380000380000380000380000380000380000380007FFC00FFFE007FFC0011197F9816>
1347+I<FC0000FC0000FC00001C00001C00001C00001C00001CF8001DFC001FFE001F0F001E07
1348+001C07001C07001C07001C07001C07001C07001C07001C07001C07001C0700FF8FE0FF9F
1349+E0FF8FE013197F9816>104 D<07000F800F800F800700000000000000FF80FF80FF8003
1350+8003800380038003800380038003800380038003800380FFFCFFFEFFFC0F1A7C9916>I<
1351+7FC000FFC0007FC00001C00001C00001C00001C00001C00001C00001C00001C00001C000
1352+01C00001C00001C00001C00001C00001C00001C00001C00001C00001C0007FFF00FFFF80
1353+7FFF0011197E9816>108 D<03E0000FF8001FFC003C1E00780F00700700E00380E00380
1354+E00380E00380E00380F00780700700780F003C1E001FFC000FF80003E00011127E9116>
1355+111 D<FC7C00FDFE00FFFF001F07801E03C01C01C01C00E01C00E01C00E01C00E01C00E0
1356+1C00E01E01C01E03C01F07801FFF001DFE001CF8001C00001C00001C00001C00001C0000
1357+1C0000FF8000FF8000FF8000131B7F9116>I<7F0F80FF3FC07F7FE007F1E007C0C00780
1358+000780000700000700000700000700000700000700000700000700007FFC00FFFC007FFC
1359+0013127F9116>114 D<0FEC3FFC7FFCF03CE01CE01C70007F801FF007F8003C600EE00E
1360+F00EF81EFFFCFFF8C7E00F127D9116>I<0300000700000700000700000700007FFF00FF
1361+FF00FFFF0007000007000007000007000007000007000007000007010007038007038007
1362+038007870003FE0001FC0000F80011177F9616>I<FC3F00FC3F00FC3F001C07001C0700
1363+1C07001C07001C07001C07001C07001C07001C07001C07001C07001C1F001FFFE00FFFE0
1364+07E7E013127F9116>I E /Fu 34 125 df<038007800F800F001E003C0038007000E000
1365+4000090A77A218>19 D<FFF8FFF8FFF80D03808B10>45 D<000FE010003FF83000F80E70
1366+01E0077003C001F0078001F00F0000F01E0000F03E0000703C0000707C0000707C000030
1367+7800003078000030F8000000F8000000F8000000F8000000F8000000F8000000F8000000
1368+F800000078000000780000307C0000307C0000303C0000303E0000601E0000600F0000C0
1369+078000C003C0018001E0030000FC0E00003FFC00000FE0001C247DA223>67
1370+D<FFFFF800FFFFFF0007C00F8007C003C007C001E007C000F007C0007807C0007C07C000
1371+3C07C0003E07C0001E07C0001E07C0001E07C0001F07C0001F07C0001F07C0001F07C000
1372+1F07C0001F07C0001F07C0001F07C0001F07C0001E07C0001E07C0003E07C0003C07C000
1373+3C07C0007807C000F007C001F007C003E007C00F80FFFFFF00FFFFF80020227FA125>I<
1374+FFFFFFE0FFFFFFE007C007E007C001E007C000E007C0006007C0007007C0007007C00030
1375+07C0003007C0183007C0183007C0180007C0180007C0380007C0780007FFF80007FFF800
1376+07C0780007C0380007C0180007C0180007C0180007C0180007C0000007C0000007C00000
1377+07C0000007C0000007C0000007C0000007C00000FFFF0000FFFF00001C227FA120>70
1378+D<FFFE1FFFC0FFFE1FFFC007C000F80007C000F80007C000F80007C000F80007C000F800
1379+07C000F80007C000F80007C000F80007C000F80007C000F80007C000F80007C000F80007
1380+C000F80007FFFFF80007FFFFF80007C000F80007C000F80007C000F80007C000F80007C0
1381+00F80007C000F80007C000F80007C000F80007C000F80007C000F80007C000F80007C000
1382+F80007C000F80007C000F80007C000F800FFFE1FFFC0FFFE1FFFC022227FA125>72
1383+D<FFFEFFFE07C007C007C007C007C007C007C007C007C007C007C007C007C007C007C007
1384+C007C007C007C007C007C007C007C007C007C007C007C007C007C007C0FFFEFFFE0F227F
1385+A112>I<FFFE0000FFFE00000F8000000F8000000F8000000F8000000F8000000F800000
1386+0F8000000F8000000F8000000F8000000F8000000F8000000F8000000F8000000F800000
1387+0F8000000F8000000F8000000F8000000F8001800F8001800F8001800F8001800F800380
1388+0F8003800F8003000F8007000F8007000F800F000F803F00FFFFFF00FFFFFF0019227EA1
1389+1E>76 D<FFFFF800FFFFFE0007C01F8007C007C007C003C007C001E007C001E007C001F0
1390+07C001F007C001F007C001F007C001F007C001E007C001E007C003C007C0078007C01F00
1391+07FFFC0007C0000007C0000007C0000007C0000007C0000007C0000007C0000007C00000
1392+07C0000007C0000007C0000007C0000007C0000007C00000FFFE0000FFFE00001C227FA1
1393+21>80 D<FFFFF00000FFFFFE000007C01F000007C007800007C003C00007C003E00007C0
1394+01F00007C001F00007C001F00007C001F00007C001F00007C001E00007C003E00007C003
1395+C00007C007800007C01E000007FFF0000007C03C000007C01E000007C00F000007C00F80
1396+0007C007C00007C007C00007C007C00007C007C00007C007C00007C007C00007C007C000
1397+07C007C00007C007C0C007C007C0C007C003C0C0FFFE01E180FFFE00F1000000003E0022
1398+237FA124>82 D<FFFE03FFC0FFFE03FFC007C0003C0007C000180007C000180007C00018
1399+0007C000180007C000180007C000180007C000180007C000180007C000180007C0001800
1400+07C000180007C000180007C000180007C000180007C000180007C000180007C000180007
1401+C000180007C000180007C000180007C000180007C000180007C000180003C000300003E0
1402+00300001E000300001E000600000F000C0000078018000003E070000000FFE00000003F8
1403+000022237FA125>85 D<FFF83FFE07FEFFF83FFE07FE1F8003F001F80F8003E000600F80
1404+03F000600FC003F000E007C003F000C007C003F000C007E006F800C003E006F8018003E0
1405+06F8018003E00C7C018001F00C7C030001F00C7C030001F01C7E030001F8183E070000F8
1406+183E060000F8183E060000FC301F0600007C301F0C00007C301F0C00007C600F8C00003E
1407+600F9800003E600F9800003EE00FD800003FC007F800001FC007F000001FC007F000001F
1408+8003F000000F8003E000000F8003E000000F0001E00000070001C00000070001C0000007
1409+0001C0002F237FA132>87 D<1FF000383C007C0E007C0F007C0780380780000780000780
1410+00FF8007C7801E07803C0780780780700780F00798F00798F00798F00F987817983C23F0
1411+0FC1E015157E9418>97 D<0F0000FF0000FF00001F00000F00000F00000F00000F00000F
1412+00000F00000F00000F00000F00000F00000F3F000F61C00F80600F00300F00380F003C0F
1413+001C0F001E0F001E0F001E0F001E0F001E0F001E0F001E0F001C0F003C0F00380F00700F
1414+80600E61C00C3F0017237FA21B>I<01FE000707000C0F801C0F80380F80780700700000
1415+F00000F00000F00000F00000F00000F00000F000007000007800C03800C01C01800C0300
1416+07060001F80012157E9416>I<0001E0001FE0001FE00003E00001E00001E00001E00001
1417+E00001E00001E00001E00001E00001E00001E001F9E00707E00C03E01C01E03801E07801
1418+E07001E0F001E0F001E0F001E0F001E0F001E0F001E0F001E07001E07801E03801E01801
1419+E00C03F0070DFE01F1FE17237EA21B>I<01FC000707000C03801C01C03801C07801E070
1420+00E0F000E0FFFFE0F00000F00000F00000F00000F000007000007800603800601C00C00E
1421+018007070000FC0013157F9416>I<003E0000E18003C3C00387C00787C00F03800F0000
1422+0F00000F00000F00000F00000F00000F00000F0000FFF800FFF8000F00000F00000F0000
1423+0F00000F00000F00000F00000F00000F00000F00000F00000F00000F00000F00000F0000
1424+0F00000F0000FFF000FFF000122380A20F>I<0000F003F1180E1E381C0E383807303807
1425+007807807807807807807807803807003807001C0E001E1C0033F0002000002000003000
1426+003800003FFE001FFFC00FFFE03801F0700070E00038E00038E00038E000386000307000
1427+703800E00E038003FE0015217F9518>I<0F0000FF0000FF00001F00000F00000F00000F
1428+00000F00000F00000F00000F00000F00000F00000F00000F0F800F31C00F40E00F80F00F
1429+80F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F
1430+00F00F00F00F00F0FFF3FFFFF3FF18237FA21B>I<0E001F001F001F000E000000000000
1431+00000000000000000000000F007F007F001F000F000F000F000F000F000F000F000F000F
1432+000F000F000F000F000F000F00FFE0FFE00B2280A10D>I<0F00FF00FF001F000F000F00
1433+0F000F000F000F000F000F000F000F000F000F000F000F000F000F000F000F000F000F00
1434+0F000F000F000F000F000F000F000F000F00FFF0FFF00C2380A20D>108
1435+D<0F0FC07E00FF30E18700FF407203801F807C03C00F807C03C00F007803C00F007803C0
1436+0F007803C00F007803C00F007803C00F007803C00F007803C00F007803C00F007803C00F
1437+007803C00F007803C00F007803C00F007803C00F007803C0FFF3FF9FFCFFF3FF9FFC2615
1438+7F9429>I<0F0F80FF31C0FF40E01F80F00F80F00F00F00F00F00F00F00F00F00F00F00F
1439+00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F0FFF3FFFFF3FF18157F94
1440+1B>I<01FC000707000C01801800C03800E0700070700070F00078F00078F00078F00078
1441+F00078F00078F000787000707800F03800E01C01C00E038007070001FC0015157F9418>
1442+I<0F3F00FF61C0FF80600F00700F00380F003C0F003C0F001E0F001E0F001E0F001E0F00
1443+1E0F001E0F001E0F003C0F003C0F00380F00700F80E00F61C00F3F000F00000F00000F00
1444+000F00000F00000F00000F00000F0000FFF000FFF000171F7F941B>I<01F860070CE00E
1445+02E01C03E03801E07801E07801E0F001E0F001E0F001E0F001E0F001E0F001E0F001E078
1446+01E07801E03801E01C03E00C03E0070DE001F1E00001E00001E00001E00001E00001E000
1447+01E00001E00001E0001FFE001FFE171F7E941A>I<0F1E00FF2300FF47801F87800F8300
1448+0F80000F00000F00000F00000F00000F00000F00000F00000F00000F00000F00000F0000
1449+0F00000F0000FFF800FFF8001115809413>I<0FC8307860386018E018E018F000FC007F
1450+C03FE01FF007F8007CC03CC01CC01CE01CE018F038D8708FC00E157E9413>I<06000600
1451+06000600060006000E000E000E001E003FFCFFFC1E001E001E001E001E001E001E001E00
1452+1E001E001E0C1E0C1E0C1E0C1E0C1E0C0F18071001E00E1F7F9E13>I<0F00F0FF0FF0FF
1453+0FF01F01F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F
1454+00F00F00F00F01F00F01F00702F80386FF00F8FF18157F941B>I<FFC1FEFFC1FE1F00F8
1455+0F00600F00600780C00780C00780C003C18003C18003E38001E30001E30000F60000F600
1456+00F600007C00007C00007C00003800003800003000003000007000006000F86000F8C000
1457+F8C000F980006300003E0000171F7F941A>121 D<3FFFC03C0780380F80300F00701E00
1458+603E00603C0060780000F80000F00001E00003C00007C0C00780C00F00C01F01C01E0180
1459+3C01807C0380780780FFFF8012157F9416>I<FFFFFFFFFFFF3001808C31>124
1460+D E /Fv 21 118 df<78FCFCFCFC7806067A8512>46 D<007F800001FFE0000781F8000E
1461+007C0018003E0030001F0030000F8060000FC0600007C0F80007C0FC0007E0FE0007E0FE
1462+0003E0FE0003E0FE0003E07C0007E0000007E0000007C0000007C000000FC000000F8000
1463+000F8000001F0000003E0000003C00000078000000F8000000F0000001E0000003C00000
1464+070000000E0000001C000000180000003000000060000000C00060018000600380006007
1465+0000C00E0000C00C0000C0180001C03FFFFFC07FFFFF80FFFFFF80FFFFFF801B2F7DAE21
1466+>50 D<00001C0000001C0000003C0000003C0000007C000000FC000000FC000001BC0000
1467+03BC0000033C0000073C0000063C00000C3C00001C3C0000183C0000303C0000303C0000
1468+603C0000E03C0000C03C0001803C0003803C0003003C0007003C0006003C000C003C001C
1469+003C0018003C0030003C0030003C0060003C00E0003C00FFFFFFF8FFFFFFF800003C0000
1470+003C0000003C0000003C0000003C0000003C0000003C0000003C0000003C0000003C0000
1471+007E00000FFFF0000FFFF01D2F7EAE21>52 D<FFFFC00000FFFFC0000007F000000003E0
1472+00000003E000000003E000000003E000000003E000000003E000000003E000000003E000
1473+000003E000000003E000000003E000000003E000000003E000000003E000000003E00000
1474+0003E000000003E000000003E000000003E000000003E000000003E000000003E0000000
1475+03E000000003E000000003E000000003E000000003E000000003E000000003E000006003
1476+E000006003E000006003E000006003E00000C003E00000C003E00000C003E00000C003E0
1477+0001C003E00001C003E00003C003E00003C003E00007C003E0000F8003E0003F8007E000
1478+FF80FFFFFFFF80FFFFFFFF8023317DB029>76 D<FFF00000007FF8FFF8000000FFF807F8
1479+000000FF0003F8000000FE00037C000001BE00037C000001BE00037C000001BE00033E00
1480+00033E00033E0000033E00033E0000033E00031F0000063E00031F0000063E00031F0000
1481+063E00030F80000C3E00030F80000C3E00030F80000C3E000307C000183E000307C00018
1482+3E000307C000183E000303E000303E000303E000303E000303E000303E000301F000603E
1483+000301F000603E000301F000C03E000300F800C03E000300F800C03E0003007C01803E00
1484+03007C01803E0003007C01803E0003003E03003E0003003E03003E0003003E03003E0003
1485+001F06003E0003001F06003E0003001F06003E0003000F8C003E0003000F8C003E000300
1486+0F8C003E00030007D8003E00030007D8003E00030007D8003E00030003F0003E00030003
1487+F0003E00030003F0003E00078001E0003E000FC001E0007F00FFFC01E00FFFF8FFFC00C0
1488+0FFFF835317CB03D>I<FFFFFFE000FFFFFFFC0007E0007F0003E0000F8003E00007C003
1489+E00003E003E00001F003E00001F803E00000F803E00000F803E00000FC03E00000FC03E0
1490+0000FC03E00000FC03E00000FC03E00000FC03E00000F803E00000F803E00001F803E000
1491+01F003E00003E003E00007C003E0000F8003E0007F0003FFFFFC0003FFFFE00003E00000
1492+0003E000000003E000000003E000000003E000000003E000000003E000000003E0000000
1493+03E000000003E000000003E000000003E000000003E000000003E000000003E000000003
1494+E000000003E000000003E000000003E000000003E000000007F0000000FFFF800000FFFF
1495+80000026317DB02D>80 D<FFFFFF000000FFFFFFF0000007E001FC000003E0003F000003
1496+E0000F800003E00007C00003E00003E00003E00003F00003E00003F00003E00001F00003
1497+E00001F80003E00001F80003E00001F80003E00001F80003E00001F80003E00001F00003
1498+E00003F00003E00003F00003E00003E00003E00007C00003E0000F800003E0003F000003
1499+E001FC000003FFFFF0000003FFFFC0000003E001F0000003E0007C000003E0003E000003
1500+E0001F000003E0000F000003E0000F800003E00007800003E00007C00003E00007C00003
1501+E00007C00003E00007C00003E00007C00003E00007E00003E00007E00003E00007E00003
1502+E00007E00003E00007E00003E00007E01803E00007F01803E00003F01803E00003F01807
1503+F00001F830FFFF8000F870FFFF80007FE0000000000F802D327CB031>82
1504+D<03FE00000FFFC0001E03E0003F00F0003F0078003F003C001E001C000C001E0000001E
1505+0000001E0000001E0000001E000001FE00003FFE0001FF1E0007F01E000F801E001F001E
1506+003E001E007C001E007C001E00F8001E0CF8001E0CF8001E0CF8003E0CF8003E0C7C007E
1507+0C3E00DF1C1F038FB80FFF07F003F803C01E1F7D9E21>97 D<001FF00000FFFC0001F01E
1508+0007C03F000F003F000F003F001E001E003C000C003C0000007C00000078000000F80000
1509+00F8000000F8000000F8000000F8000000F8000000F8000000F8000000F80000007C0000
1510+007C0000003C0000003E0001801E0001800F0003000F80070007C00E0001F81C0000FFF0
1511+00001FC000191F7E9E1D>99 D<003F800000FFE00003E0F80007803C000F001E001E001E
1512+001E000F003C000F007C000F007C000F8078000780F8000780FFFFFF80FFFFFF80F80000
1513+00F8000000F8000000F8000000F8000000F8000000780000007C0000003C0000003C0001
1514+801E0001800F0003000F80060007C00E0001F0380000FFF000001FC000191F7E9E1D>
1515+101 D<0003F0000FF8003C3C00787E00F07E01E07E01E03C01C01803C00003C00003C000
1516+03C00003C00003C00003C00003C00003C00003C00003C000FFFFC0FFFFC003C00003C000
1517+03C00003C00003C00003C00003C00003C00003C00003C00003C00003C00003C00003C000
1518+03C00003C00003C00003C00003C00003C00003C00003C00003C00003C00003C00003C000
1519+07E0007FFF007FFF0017327FB114>I<000000F0007F03F801FFCF1C03C1FC3C0780F83C
1520+0F0078181F007C001E003C003E003E003E003E003E003E003E003E003E003E003E003E00
1521+3E003E001E003C001F007C000F0078000780F0000FC1E0000DFFC0001C7F000018000000
1522+180000001C0000001C0000001E0000000FFFF8000FFFFF0007FFFF800FFFFFC01E0007E0
1523+380001F07000007070000078E0000038E0000038E0000038E0000038E000003870000070
1524+780000F03C0001E01E0003C007C01F0001FFFC00003FE0001E2F7E9F21>I<0780000000
1525+FF80000000FF800000000F80000000078000000007800000000780000000078000000007
1526+800000000780000000078000000007800000000780000000078000000007800000000780
1527+0000000780000000078000000007800000000781FE00000787FF8000078E07C000079803
1528+E00007B001E00007E000F00007C000F00007C000F00007C000F000078000F000078000F0
1529+00078000F000078000F000078000F000078000F000078000F000078000F000078000F000
1530+078000F000078000F000078000F000078000F000078000F000078000F000078000F00007
1531+8000F000078000F000078000F0000FC001F800FFFC1FFF80FFFC1FFF8021327EB125>I<
1532+0F001F801F801F801F800F00000000000000000000000000000000000000000000000780
1533+7F807F800F80078007800780078007800780078007800780078007800780078007800780
1534+0780078007800780078007800780078007800FC0FFF8FFF80D307EAF12>I<0780FF80FF
1535+800F80078007800780078007800780078007800780078007800780078007800780078007
1536+800780078007800780078007800780078007800780078007800780078007800780078007
1537+80078007800780078007800780078007800FC0FFFCFFFC0E327EB112>108
1538+D<0781FE003FC000FF87FF80FFF000FF8E07C1C0F8000F9803E3007C0007B001E6003C00
1539+07E000FC001E0007C000F8001E0007C000F8001E0007C000F8001E00078000F0001E0007
1540+8000F0001E00078000F0001E00078000F0001E00078000F0001E00078000F0001E000780
1541+00F0001E00078000F0001E00078000F0001E00078000F0001E00078000F0001E00078000
1542+F0001E00078000F0001E00078000F0001E00078000F0001E00078000F0001E00078000F0
1543+001E00078000F0001E00078000F0001E000FC001F8003F00FFFC1FFF83FFF0FFFC1FFF83
1544+FFF0341F7E9E38>I<0781FE0000FF87FF8000FF8E07C0000F9803E00007B001E00007E0
1545+00F00007C000F00007C000F00007C000F000078000F000078000F000078000F000078000
1546+F000078000F000078000F000078000F000078000F000078000F000078000F000078000F0
1547+00078000F000078000F000078000F000078000F000078000F000078000F000078000F000
1548+078000F0000FC001F800FFFC1FFF80FFFC1FFF80211F7E9E25>I<001FC00000FFF80001
1549+E03C0007800F000F0007801E0003C01E0003C03C0001E03C0001E0780000F0780000F078
1550+0000F0F80000F8F80000F8F80000F8F80000F8F80000F8F80000F8F80000F8F80000F878
1551+0000F07C0001F03C0001E03C0001E01E0003C01E0003C00F00078007C01F0001F07C0000
1552+FFF800001FC0001D1F7E9E21>I<0783E0FF8FF8FF9C7C0FB87C07F07C07E03807E00007
1553+C00007C00007C00007800007800007800007800007800007800007800007800007800007
1554+80000780000780000780000780000780000780000780000780000FC000FFFE00FFFE0016
1555+1F7E9E19>114 D<00C00000C00000C00000C00000C00001C00001C00001C00003C00003
1556+C00007C0000FC0001FC000FFFFE0FFFFE003C00003C00003C00003C00003C00003C00003
1557+C00003C00003C00003C00003C00003C00003C00003C00003C00003C00003C03003C03003
1558+C03003C03003C03003C03003C03003C03001E06001E06000F0C0007F80001F00142C7FAB
1559+19>116 D<078000F000FF801FF000FF801FF0000F8001F000078000F000078000F00007
1560+8000F000078000F000078000F000078000F000078000F000078000F000078000F0000780
1561+00F000078000F000078000F000078000F000078000F000078000F000078000F000078000
1562+F000078000F000078000F000078001F000078001F000078003F000038007F00003C00EF0
1563+0001F03CF80000FFF0FF80003FC0FF80211F7E9E25>I E end
1564+%%EndProlog
1565+%%BeginSetup
1566+%%Feature: *Resolution 300dpi
1567+TeXDict begin
1568+
1569+%%EndSetup
1570+%%Page: 1 1
1571+1 0 bop 108 381 a Fv(Reference)22 b(Man)n(ual)f(of)g(the)h(Programming)
1572+f(Language)g(Lua)g(2.4)99 508 y Fu(Rob)q(erto)c(Ierusalimsc)o(h)o(y)49
1573+b(Luiz)17 b(Henrique)e(de)h(Figueiredo)50 b(W)l(aldemar)17
1574+b(Celes)g(Filho)563 587 y Ft(roberto,lhf,celes)o(@icad)o(.puc-)o(rio.b)
1575+o(r)359 694 y Fs(T)l(eC)431 709 y(Graf)534 694 y Fu(|)g(Departamen)o
1576+(to)f(de)g(Inform\023)-24 b(atica)17 b(|)f(PUC-Rio)661
1577+790 y Ft(Date:)21 b(1996/04/29)f(18:50:08)842 957 y Fr(Abstract)72
1578+1033 y Fq(Lua)13 b(is)h(an)f(extension)i(programmi)o(ng)c(language)h
1579+(designed)j(to)e(b)q(e)i(used)f(as)g(a)f(con\014guration)g(language)g
1580+(for)72 1083 y(an)o(y)18 b(program)e(that)i(needs)h(one.)30
1581+b(This)18 b(do)q(cumen)o(t)f(describ)q(es)j(V)m(ersion)e(2.4)f(of)g
1582+(the)i(Lua)e(programming)72 1132 y(language)e(and)g(the)h(API)g(that)g
1583+(allo)o(ws)e(in)o(teraction)i(b)q(et)o(w)o(een)h(Lua)e(programs)f(and)i
1584+(its)f(host)h(C)g(program.)72 1182 y(It)e(also)f(presen)o(ts)j(some)d
1585+(examples)g(of)g(using)h(the)h(main)c(features)k(of)f(the)g(system.)881
1586+1397 y Fr(Sum\023)-24 b(ario)72 1465 y Fq(Lua)15 b(\023)-20
1587+b(e)18 b(uma)d(linguagem)f(de)j(extens~)-21 b(ao)18 b(pro)r(jetada)f
1588+(para)f(ser)i(usada)f(como)e(linguagem)g(de)i(con\014gura\030)-18
1589+b(c~)d(ao)72 1515 y(em)12 b(qualquer)g(programa)e(que)j(precise)h(de)f
1590+(uma.)j(Este)e(do)q(cumen)o(to)d(descrev)o(e)k(a)d(v)o(ers~)-21
1591+b(ao)13 b(2.4)e(da)h(linguagem)72 1565 y(de)18 b(programa\030)-18
1592+b(c~)d(ao)16 b(Lua)i(e)g(a)g(In)o(terface)h(de)f(Programa\030)-18
1593+b(c~)d(ao)16 b(que)i(p)q(ermite)g(a)f(in)o(tera\030)-18
1594+b(c~)d(ao)18 b(en)o(tre)h(programas)72 1614 y(Lua)c(e)g(o)g(programa)e
1595+(C)h(hosp)q(edeiro.)22 b(O)15 b(do)q(cumen)o(to)g(tam)o(b)o(\023)-20
1596+b(em)12 b(apresen)o(ta)k(alguns)e(exemplos)g(de)i(uso)f(das)72
1597+1664 y(principais)f(caracter)-5 b(\023)-16 b(\020sticas)15
1598+b(do)f(sistema.)-42 1807 y Fp(1)67 b(In)n(tro)r(duction)-42
1599+1909 y Fo(Lua)18 b(is)f(an)g(extension)g(programmi)o(ng)d(language)j
1600+(designed)g(to)g(supp)q(ort)g(general)g(pro)q(cedural)g(programming)-42
1601+1965 y(features)f(with)g(data)g(description)f(facilities.)22
1602+b(It)16 b(is)g(supp)q(osed)h(to)f(b)q(e)g(used)h(as)f(a)g
1603+(con\014guration)g(language)f(for)-42 2022 y(an)o(y)j(program)d(that)i
1604+(needs)i(one.)27 b(Lua)18 b(has)f(b)q(een)i(designed)f(and)g(implemen)o
1605+(ted)d(b)o(y)j(W.)f(Celes)g(F.,)g(L.)h(H.)f(de)-42 2078
1606+y(Figueiredo)e(and)g(R.)g(Ierusalimsc)o(h)o(y)l(.)29
1607+2135 y(Lua)d(is)f(implemen)o(ted)f(as)h(a)g(library)l(,)g(written)g(in)
1608+h(C.)f(Being)g(an)h(extension)g(language,)f(Lua)h(has)f(no)h(notion)f
1609+(of)-42 2191 y(a)h(\\main")d(program:)16 b(it)10 b(only)h(w)o(orks)g
1610+Fn(emb)n(e)n(dde)n(d)f Fo(in)i(a)f(host)g(clien)o(t,)g(called)g(the)g
1611+Fn(emb)n(e)n(dding)f Fo(program.)17 b(This)11 b(host)-42
1612+2248 y(program)i(can)j(in)o(v)o(ok)o(e)e(functions)h(to)f(execute)i(a)f
1613+(piece)g(of)g(co)q(de)g(in)g(Lua,)g(can)h(write)e(and)h(read)g(Lua)h(v)
1614+m(ariables,)-42 2304 y(and)f(can)e(register)g(C)h(functions)f(to)h(b)q
1615+(e)g(called)g(b)o(y)f(Lua)h(co)q(de.)20 b(Through)14
1616+b(the)g(use)g(of)g(C)f(functions,)h(Lua)g(can)g(b)q(e)-42
1617+2360 y(augmen)o(ted)d(to)h(cop)q(e)g(with)f(rather)h(di\013eren)o(t)f
1618+(domains,)f(th)o(us)i(creating)f(customized)g(programmi)o(ng)e
1619+(languages)-42 2417 y(sharing)15 b(a)g(syn)o(tactical)e(framew)o(ork.)
1620+29 2473 y(Lua)f(is)e(free)i(distribution)e(soft)o(w)o(are,)g(and)h(pro)
1621+o(vided)g(as)g(usual)g(with)g(no)g(guaran)o(tees.)18
1622+b(The)11 b(implemen)o(tatio)o(n)-42 2530 y(describ)q(ed)17
1623+b(in)e(this)f(man)o(ual)g(is)g(a)o(v)m(ailable)g(b)o(y)h(anon)o(ymous)f
1624+(ftp)h(from)30 2623 y Fm(ftp.icad.puc-rio.br:/pub/lu)o(a/lua.t)o(ar.gz)
1625+922 2748 y Fo(1)p eop
1626+%%Page: 2 2
1627+2 1 bop -42 199 a Fo(or)15 b(b)o(y)g(WWW)g(\(W)l(orld)f(Wide)h(W)l
1628+(eb\))g(from)30 293 y Fm(http://www.inf.puc-rio.br/~)o(roberto)o
1629+(/lua.ht)o(ml)-42 436 y Fp(2)67 b(En)n(vironmen)n(t)25
1630+b(and)e(Ch)n(unks)-42 538 y Fo(All)10 b(statemen)o(ts)e(in)i(Lua)h(are)
1631+f(executed)h(in)g(a)f Fn(glob)n(al)h(envir)n(onment)p
1632+Fo(.)17 b(This)9 b(en)o(vironmen)o(t,)h(whic)o(h)g(k)o(eeps)h(all)e
1633+(global)-42 594 y(v)m(ariables)14 b(and)g(functions,)f(is)g
1634+(initialized)g(at)g(the)h(b)q(eginning)g(of)f(the)h(em)o(b)q(edding)f
1635+(program)f(and)i(p)q(ersists)f(un)o(til)-42 651 y(its)i(end.)29
1636+707 y(The)g(global)d(en)o(vironmen)o(t)h(can)h(b)q(e)h(manipulated)e(b)
1637+o(y)h(Lua)h(co)q(de)g(or)e(b)o(y)h(the)h(em)o(b)q(edding)f(program,)e
1638+(whic)o(h)-42 764 y(can)k(read)f(and)g(write)g(global)e(v)m(ariables)i
1639+(using)g(functions)g(in)g(the)g(library)f(that)h(implemen)o(ts)d(Lua.)
1640+29 820 y(Global)g(v)m(ariables)h(do)h(not)f(need)h(declaration.)k(An)o
1641+(y)c(v)m(ariable)f(is)g(assumed)g(to)g(b)q(e)h(global)e(unless)i
1642+(explicitly)-42 876 y(declared)20 b(lo)q(cal)e(\(see)h(lo)q(cal)f
1643+(declarations,)h(Section)g(4.4.5\).)30 b(Before)19 b(the)g(\014rst)g
1644+(assignmen)o(t,)e(the)j(v)m(alue)f(of)g(a)-42 933 y(global)14
1645+b(v)m(ariable)h(is)g Fl(nil)p Fo(.)29 989 y(The)g(unit)g(of)g
1646+(execution)h(of)e(Lua)i(is)f(called)f(a)h Fn(chunk)p
1647+Fo(.)20 b(The)15 b(syn)o(tax)g(for)f(c)o(h)o(unks)i(is:)1480
1648+973 y Fk(1)42 1062 y Fn(chunk)50 b Fj(!)g(f)p Fn(statement)32
1649+b Fj(j)16 b Fn(function)s Fj(g)-42 1134 y Fo(A)f(c)o(h)o(unk)f(ma)o(y)e
1650+(con)o(tain)h(statemen)o(ts)f(and)i(function)g(de\014nitions,)g(and)g
1651+(ma)o(y)e(b)q(e)j(in)f(a)g(\014le)g(or)f(in)h(a)g(string)f(inside)-42
1652+1190 y(the)k(host)f(program.)22 b(When)17 b(a)g(c)o(h)o(unk)g(is)f
1653+(executed,)h(\014rst)g(all)e(its)h(functions)g(and)h(statemen)o(ts)e
1654+(are)h(compiled,)-42 1247 y(then)d(the)e(statemen)o(ts)f(are)i
1655+(executed)g(in)g(sequen)o(tial)f(order.)18 b(All)11 b(mo)q
1656+(di\014cations)f(a)i(c)o(h)o(unk)g(e\013ects)f(on)h(the)g(global)-42
1657+1303 y(en)o(vironmen)o(t)k(p)q(ersist)h(after)f(its)g(end.)27
1658+b(Those)17 b(include)g(mo)q(di\014cations)f(to)g(global)g(v)m(ariables)
1659+g(and)i(de\014nitions)-42 1359 y(of)d(new)h(functions)285
1660+1343 y Fk(2)304 1359 y Fo(.)29 1416 y(Ch)o(unks)j(ma)o(y)e(b)q(e)i
1661+(pre-compiled;)g(see)g(program)d Fm(luac)i Fo(for)g(details.)30
1662+b(Ascii)18 b(\014les)g(with)g(c)o(h)o(unk)h(co)q(de)g(and)-42
1663+1472 y(their)e(binary)g(pre-compiled)f(forms)f(are)i(in)o(terc)o
1664+(hangeable.)25 b(Lua)17 b(automatically)d(detects)j(the)g(\014le)g(t)o
1665+(yp)q(e)g(and)-42 1529 y(acts)e(accordingly)l(.)-42 1672
1666+y Fp(3)67 b(T)n(yp)r(es)-42 1773 y Fo(Lua)14 b(is)g(a)f(dynamically)f
1667+(t)o(yp)q(ed)i(language.)k(V)l(ariables)13 b(do)h(not)f(ha)o(v)o(e)g(t)
1668+o(yp)q(es;)h(only)f(v)m(alues)h(do.)19 b(All)13 b(v)m(alues)h(carry)-42
1669+1830 y(their)h(o)o(wn)g(t)o(yp)q(e.)20 b(Therefore,)15
1670+b(there)g(are)g(no)g(t)o(yp)q(e)g(de\014nitions)g(in)g(the)g(language.)
1671+29 1886 y(There)20 b(are)f(sev)o(en)h(basic)f(t)o(yp)q(es)h(in)g(Lua:)
1672+29 b Fn(nil)p Fo(,)19 b Fn(numb)n(er)p Fo(,)h Fn(string)p
1673+Fo(,)g Fn(function)p Fo(,)g Fn(CF)m(unction)p Fo(,)e
1674+Fn(user)n(data)p Fo(,)j(and)-42 1943 y Fn(table)p Fo(.)f
1675+Fn(Nil)14 b Fo(is)g(the)g(t)o(yp)q(e)h(of)f(the)h(v)m(alue)g
1676+Fl(nil)p Fo(,)e(whose)h(main)f(prop)q(ert)o(y)h(is)h(to)e(b)q(e)j
1677+(di\013eren)o(t)d(from)g(an)o(y)h(other)h(v)m(alue.)-42
1678+1999 y Fn(Numb)n(er)h Fo(represen)o(ts)f(real)f(\(\015oating)g(p)q(oin)
1679+o(t\))g(n)o(um)o(b)q(ers,)h(while)f Fn(string)h Fo(has)g(the)g(usual)g
1680+(meaning.)29 2056 y(F)l(unctions)20 b(are)f(considered)i(\014rst-class)
1681+e(v)m(alues)h(in)g(Lua.)34 b(This)19 b(means)g(that)h(functions)f(can)h
1682+(b)q(e)h(stored)-42 2112 y(in)c(v)m(ariables,)g(passed)g(as)g(argumen)o
1683+(ts)f(to)g(other)h(functions)g(and)g(returned)h(as)e(results.)26
1684+b(When)17 b(a)g(function)g(is)-42 2169 y(de\014ned)g(in)d(Lua,)h(its)f
1685+(b)q(o)q(dy)i(is)e(compiled)f(and)i(stored)g(in)f(a)h(giv)o(en)f(v)m
1686+(ariable.)19 b(Lua)c(can)g(call)f(\(and)h(manipulate\))-42
1687+2225 y(functions)g(written)g(in)g(Lua)g(and)h(functions)f(written)f(in)
1688+h(C;)f(the)i(latter)e(ha)o(v)o(e)g(t)o(yp)q(e)i Fn(CF)m(unction)s
1689+Fo(.)29 2282 y(The)i(t)o(yp)q(e)f Fn(user)n(data)h Fo(is)g(pro)o(vided)
1690+f(to)g(allo)o(w)f(arbitrary)f(C)j(p)q(oin)o(ters)f(to)g(b)q(e)h(stored)
1691+f(in)g(Lua)h(v)m(ariables.)26 b(It)-42 2338 y(corresp)q(onds)18
1692+b(to)f Fm(void*)f Fo(and)i(has)f(no)g(pre-de\014ned)j(op)q(erations)c
1693+(in)h(Lua,)h(b)q(esides)g(assignmen)o(t)d(and)j(equalit)o(y)-42
1694+2394 y(test.)24 b(Ho)o(w)o(ev)o(er,)16 b(b)o(y)g(using)h(fallbac)o(ks,)
1695+e(the)i(programmer)c(ma)o(y)i(de\014ne)j(op)q(erations)e(for)g
1696+Fn(user)n(data)h Fo(v)m(alues;)g(see)-42 2451 y(Section)f(4.7.)p
1697+-42 2482 780 2 v 10 2509 a Fi(1)28 2524 y Fh(As)c(usual,)i
1698+Fg(f)p Ff(a)s Fg(g)f Fh(means)h(0)f(or)g(more)g Ff(a)s
1699+Fh('s,)f([)p Ff(a)s Fh(])f(means)j(an)f(optional)j Ff(a)c
1700+Fh(and)i Fg(f)p Ff(a)s Fg(g)1179 2509 y Fi(+)1217 2524
1701+y Fh(means)f(one)h(or)f(more)g Ff(a)s Fh('s.)10 2554
1702+y Fi(2)28 2570 y Fh(Actually)m(,)h(a)f(function)h(de\014nition)i(is)d
1703+(an)h(assignmen)o(t)h(to)d(a)h(global)j(v)n(ariable;)e(see)f(Section)i
1704+(3.)922 2748 y Fo(2)p eop
1705+%%Page: 3 3
1706+3 2 bop 29 199 a Fo(The)12 b(t)o(yp)q(e)g Fn(table)g
1707+Fo(implemen)o(ts)d(asso)q(ciativ)o(e)i(arra)o(ys,)g(that)g(is,)h(arra)o
1708+(ys)e(whic)o(h)i(can)g(b)q(e)h(indexed)g(not)f(only)f(with)-42
1709+256 y(n)o(um)o(b)q(ers,)k(but)g(with)g(an)o(y)g(v)m(alue)h(\(except)f
1710+Fl(nil)p Fo(\).)20 b(Therefore,)15 b(this)f(t)o(yp)q(e)i(ma)o(y)e(b)q
1711+(e)i(used)g(not)f(only)g(to)f(represen)o(t)-42 312 y(ordinary)h(arra)o
1712+(ys,)e(but)i(also)f(sym)o(b)q(ol)g(tables,)g(sets,)g(records,)h(etc.)20
1713+b(T)l(o)15 b(represen)o(t)g(records,)f(Lua)i(uses)f(the)g(\014eld)-42
1714+369 y(name)k(as)f(an)h(index.)32 b(The)19 b(language)g(supp)q(orts)g
1715+(this)f(represen)o(tation)g(b)o(y)i(pro)o(viding)e Fm(a.name)g
1716+Fo(as)g(syn)o(tactic)-42 425 y(sugar)i(for)f Fm(a["name"])p
1717+Fo(.)33 b(T)l(ables)20 b(ma)o(y)e(also)h(carry)g(metho)q(ds.)34
1718+b(Because)20 b(functions)g(are)g(\014rst)f(class)h(v)m(alues,)-42
1719+482 y(table)d(\014elds)g(ma)o(y)e(con)o(tain)g(functions.)25
1720+b(The)16 b(form)f Fm(t:f\(x\))h Fo(is)g(syn)o(tactic)g(sugar)g(for)g
1721+Fm(t.f\(t,x\))p Fo(,)g(whic)o(h)g(calls)-42 538 y(the)g(metho)q(d)e
1722+Fm(f)h Fo(from)f(the)h(table)g Fm(t)g Fo(passing)f(itself)g(as)h(the)g
1723+(\014rst)g(parameter.)29 594 y(It)d(is)f(imp)q(ortan)o(t)e(to)i(notice)
1724+g(that)g(tables)g(are)g(ob)s(jects,)g(and)h(not)f(v)m(alues.)19
1725+b(V)l(ariables)10 b(cannot)i(con)o(tain)e(tables,)-42
1726+651 y(only)15 b(references)g(to)f(them.)19 b(Assignmen)o(t,)12
1727+b(parameter)h(passing)i(and)f(returns)h(alw)o(a)o(ys)e(manipulate)g
1728+(references)-42 707 y(to)k(tables,)f(and)i(do)f(not)f(imply)g(an)o(y)h
1729+(kind)g(of)f(cop)o(y)l(.)26 b(Moreo)o(v)o(er,)16 b(tables)g(m)o(ust)f
1730+(b)q(e)j(explicitly)e(created)h(b)q(efore)-42 764 y(used;)f(see)f
1731+(Section)g(4.5.7.)-42 907 y Fp(4)67 b(The)23 b(Language)-42
1732+1008 y Fo(This)15 b(section)g(describ)q(es)h(the)f(lexis,)f(syn)o(tax)h
1733+(and)g(seman)o(tics)e(of)i(Lua.)-42 1130 y Fe(4.1)56
1734+b(Lexical)19 b(Con)n(v)n(en)n(tions)-42 1216 y Fo(Lua)g(is)e(a)g(case)h
1735+(sensitiv)o(e)f(language.)27 b(Iden)o(ti\014ers)18 b(can)g(b)q(e)g(an)o
1736+(y)f(string)g(of)g(letters,)h(digits,)e(and)i(underscores,)-42
1737+1272 y(not)d(b)q(eginning)h(with)e(a)h(digit.)k(The)c(follo)o(wing)e(w)
1738+o(ords)i(are)f(reserv)o(ed,)h(and)h(cannot)f(b)q(e)h(used)f(as)g(iden)o
1739+(ti\014ers:)173 1366 y Fm(and)143 b(do)191 b(else)142
1740+b(elseif)95 b(end)173 1422 y(function)23 b(if)191 b(local)118
1741+b(nil)167 b(not)173 1478 y(or)g(repeat)95 b(return)f(until)119
1742+b(then)95 b(while)29 1572 y Fo(The)15 b(follo)o(wing)e(strings)i
1743+(denote)g(other)g(tok)o(ens:)173 1665 y Fm(~=)48 b(<=)f(>=)h(<)71
1744+b(>)h(==)47 b(=)71 b(..)48 b(+)71 b(-)h(*)f(/)173 1721
1745+y(\045)h(\()f(\))h({)f(})h([)f(])g(;)h(,)f(.)29 1815
1746+y Fo(Literal)17 b(strings)f(can)i(b)q(e)g(delimited)e(b)o(y)i(matc)o
1747+(hing)d(single)i(or)g(double)h(quotes,)g(and)f(can)h(con)o(tain)f(the)h
1748+(C-)-42 1871 y(lik)o(e)i(escap)q(e)i(sequences)g Fm('\\n')p
1749+Fo(,)f Fm('\\t')f Fo(and)h Fm('\\r')p Fo(.)36 b(Literal)20
1750+b(strings)g(can)g(also)g(b)q(e)i(delimited)d(b)o(y)h(matc)o(hing)-42
1751+1928 y Fm([[)k(...)g(]])p Fo(.)18 b(Literals)12 b(in)h(this)f(last)g
1752+(form)f(ma)o(y)h(run)h(for)f(sev)o(eral)g(lines,)h(ma)o(y)e(con)o(tain)
1753+h(nested)i Fm([[)23 b(...)h(]])p Fo(,)12 b(and)-42 1984
1754+y(do)k(not)e(in)o(terpret)h(escap)q(e)h(sequences.)29
1755+2041 y(Commen)o(ts)c(start)h(an)o(ywhere)i(outside)g(a)f(string)g(with)
1756+g(a)g(double)h(h)o(yphen)h(\()p Fm(--)p Fo(\))e(and)h(run)g(un)o(til)f
1757+(the)g(end)i(of)-42 2097 y(the)g(line.)29 2153 y(Numerical)h(constan)o
1758+(ts)g(ma)o(y)f(b)q(e)j(written)e(with)h(an)g(optional)e(decimal)h
1759+(part,)h(and)g(an)g(optional)f(decimal)-42 2210 y(exp)q(onen)o(t.)k
1760+(Examples)14 b(of)g(v)m(alid)h(n)o(umerical)f(constan)o(ts)g(are:)126
1761+2303 y Fm(4)119 b(4.0)g(0.4)g(4.57e-3)f(0.3e12)-42 2425
1762+y Fe(4.2)56 b(Co)r(ercion)-42 2511 y Fo(Lua)19 b(pro)o(vides)f(some)f
1763+(automatic)f(con)o(v)o(ersions.)29 b(An)o(y)19 b(arithmetic)d(op)q
1764+(eration)i(applied)g(to)g(a)g(string)f(tries)h(to)-42
1765+2567 y(con)o(v)o(ert)d(that)f(string)g(to)h(a)f(n)o(um)o(b)q(er,)g
1766+(follo)o(wing)f(the)i(usual)g(rules.)20 b(Con)o(v)o(ersely)l(,)14
1767+b(whenev)o(er)h(a)g(n)o(um)o(b)q(er)f(is)h(used)-42 2623
1768+y(when)h(a)f(string)f(is)h(exp)q(ected,)h(that)e(n)o(um)o(b)q(er)h(is)g
1769+(con)o(v)o(erted)g(to)f(a)h(string,)f(according)h(to)f(the)h(follo)o
1770+(wing)e(rule:)20 b(if)922 2748 y(3)p eop
1771+%%Page: 4 4
1772+4 3 bop -42 199 a Fo(the)13 b(n)o(um)o(b)q(er)g(is)f(an)h(in)o(teger,)f
1773+(it)g(is)g(written)g(without)g(exp)q(onen)o(t)h(or)f(decimal)f(p)q(oin)
1774+o(t;)i(otherwise,)f(it)g(is)h(formatted)-42 256 y(follo)o(wing)g(the)j
1775+(\\)p Fm(\045g)p Fo(")e(con)o(v)o(ersion)g(sp)q(eci\014cation)h(of)g
1776+(the)h(standard)e Fm(printf)h Fo(C)g(function.)-42 377
1777+y Fe(4.3)56 b(Adjustmen)n(t)-42 463 y Fo(F)l(unctions)14
1778+b(in)g(Lua)h(can)f(return)g(man)o(y)f(v)m(alues.)19 b(Because)c(there)f
1779+(are)g(no)g(t)o(yp)q(e)h(declarations,)d(the)i(system)f(do)q(es)-42
1780+520 y(not)18 b(kno)o(w)f(ho)o(w)g(man)o(y)f(v)m(alues)i(a)g(function)f
1781+(will)g(return,)g(or)h(ho)o(w)f(man)o(y)f(parameters)g(it)h(needs.)28
1782+b(Therefore,)-42 576 y(sometimes,)10 b(a)i(list)g(of)g(v)m(alues)h(m)o
1783+(ust)e(b)q(e)i Fn(adjuste)n(d)5 b Fo(,)13 b(at)f(run)g(time,)f(to)h(a)h
1784+(giv)o(en)f(length.)18 b(If)13 b(there)g(are)f(more)f(v)m(alues)-42
1785+633 y(than)17 b(are)f(needed,)i(the)f(last)f(v)m(alues)h(are)f(thro)o
1786+(wn)g(a)o(w)o(a)o(y)l(.)23 b(If)17 b(there)g(are)f(more)g(needs)h(than)
1787+g(v)m(alues,)g(the)f(list)g(is)-42 689 y(extended)j(with)e(as)h(man)o
1788+(y)e Fl(nil)p Fo('s)h(as)g(needed.)29 b(Adjustmen)o(t)17
1789+b(o)q(ccurs)h(in)f(m)o(ultiple)f(assignmen)o(t)g(and)i(function)-42
1790+746 y(calls.)-42 867 y Fe(4.4)56 b(Statemen)n(ts)-42
1791+953 y Fo(Lua)19 b(supp)q(orts)f(an)f(almost)f(con)o(v)o(en)o(tional)g
1792+(set)i(of)f(statemen)o(ts.)26 b(The)18 b(con)o(v)o(en)o(tional)e
1793+(commands)f(include)k(as-)-42 1009 y(signmen)o(t,)d(con)o(trol)f
1794+(structures)i(and)g(pro)q(cedure)h(calls.)24 b(Non-con)o(v)o(en)o
1795+(tional)16 b(commands)e(include)k(table)e(con-)-42 1066
1796+y(structors,)e(explained)i(in)f(Section)g(4.5.7,)e(and)i(lo)q(cal)g(v)m
1797+(ariable)f(declarations.)-42 1186 y Fl(4.4.1)52 b(Blo)q(c)o(ks)-42
1798+1272 y Fo(A)15 b(blo)q(c)o(k)f(is)f(a)h(list)f(of)h(statemen)o(ts,)e
1799+(executed)j(sequen)o(tially)l(.)k(An)o(y)14 b(statemen)o(t)e(can)j(b)q
1800+(e)g(optionally)d(follo)o(w)o(ed)h(b)o(y)-42 1328 y(a)i(semicolon.)42
1801+1388 y Fn(blo)n(ck)49 b Fj(!)h(f)p Fn(stat)16 b(sc)s
1802+Fj(g)g Fo([)p Fn(r)n(et)f(sc)s Fo(])98 1444 y Fn(sc)49
1803+b Fj(!)h Fo([';'])-42 1512 y(F)l(or)13 b(syn)o(tactic)f(reasons,)g(a)h
1804+(return)g(statemen)o(t)e(can)i(only)g(b)q(e)g(written)f(as)h(the)g
1805+(last)f(statemen)o(t)f(of)h(a)h(blo)q(c)o(k.)19 b(This)-42
1806+1569 y(restriction)14 b(also)g(a)o(v)o(oids)g(some)g(\\statemen)o(t)f
1807+(not)i(reac)o(hed")g(errors.)-42 1689 y Fl(4.4.2)52 b(Assignmen)o(t)-42
1808+1775 y Fo(The)18 b(language)e(allo)o(ws)f(m)o(ultiple)g(assignmen)o(t.)
1809+23 b(Therefore,)17 b(the)g(syn)o(tax)g(de\014nes)h(a)f(list)e(of)i(v)m
1810+(ariables)f(on)h(the)-42 1831 y(left)h(side,)g(and)h(a)e(list)g(of)h
1811+(expressions)g(on)g(the)g(righ)o(t)f(side.)29 b(Both)18
1812+b(lists)f(ha)o(v)o(e)g(their)h(elemen)o(ts)f(separated)h(b)o(y)-42
1813+1888 y(commas.)116 1947 y Fn(stat)50 b Fj(!)g Fn(varlist1)16
1814+b Fo('=')g Fn(explist1)42 2003 y(varlist1)50 b Fj(!)g
1815+Fn(var)17 b Fj(f)p Fo(',')d Fn(var)5 b Fj(g)-42 2072
1816+y Fo(This)15 b(statemen)o(t)d(\014rst)i(ev)m(aluates)g(all)g(v)m(alues)
1817+g(on)h(the)f(righ)o(t)g(side)g(and)h(ev)o(en)o(tual)f(indices)g(on)h
1818+(the)f(left)g(side,)g(and)-42 2128 y(then)i(mak)o(es)e(the)h(assignmen)
1819+o(ts.)j(Therefore,)c(it)h(can)g(b)q(e)h(used)g(to)e(exc)o(hange)i(t)o
1820+(w)o(o)e(v)m(alues,)h(as)f(in)30 2222 y Fm(x,)24 b(y)f(=)h(y,)g(x)-42
1821+2316 y Fo(Before)f(the)g(assignmen)o(t,)f(the)g(list)f(of)i(v)m(alues)f
1822+(is)g Fn(adjuste)n(d)h Fo(to)f(the)h(length)f(of)g(the)h(list)e(of)h(v)
1823+m(ariables;)j(see)-42 2372 y(Section)16 b(4.3.)42 2444
1824+y Fn(var)50 b Fj(!)g Fn(name)-42 2516 y Fo(A)16 b(single)e(name)g(can)i
1825+(denote)f(a)g(global)f(or)h(a)g(lo)q(cal)f(v)m(ariable,)g(or)h(a)g
1826+(formal)d(parameter.)42 2589 y Fn(var)50 b Fj(!)g Fn(var)17
1827+b Fo('[')e Fn(exp1)i Fo(']')922 2748 y(4)p eop
1828+%%Page: 5 5
1829+5 4 bop -42 199 a Fo(Square)20 b(brac)o(k)o(ets)f(are)h(used)g(to)f
1830+(index)h(a)f(table.)33 b(If)20 b Fm(var)f Fo(results)g(in)g(a)h(table)f
1831+(v)m(alue,)h(the)g(\014eld)g(indexed)h(b)o(y)-42 256
1832+y(the)c(expression)f(v)m(alue)h(gets)f(the)h(assigned)f(v)m(alue.)24
1833+b(Otherwise,)16 b(the)h(fallbac)o(k)e Fn(settable)h Fo(is)g(called,)g
1834+(with)f(three)-42 312 y(parameters:)31 b(the)22 b(v)m(alue)f(of)g
1835+Fm(var)p Fo(,)h(the)g(v)m(alue)g(of)f(expression,)h(and)g(the)f(v)m
1836+(alue)h(b)q(eing)g(assigned)f(to)g(it;)i(see)-42 369
1837+y(Section)16 b(4.7.)42 441 y Fn(var)50 b Fj(!)g Fn(var)17
1838+b Fo('.')j Fn(name)-42 513 y Fo(The)c(syn)o(tax)e Fm(var.NAME)g
1839+Fo(is)h(just)g(syn)o(tactic)f(sugar)h(for)f Fm(var["NAME"])p
1840+Fo(.)-42 633 y Fl(4.4.3)52 b(Con)o(trol)17 b(Structures)-42
1841+719 y Fo(The)k(condition)e(expression)h(of)f(a)h(con)o(trol)e
1842+(structure)i(can)g(return)g(an)o(y)g(v)m(alue.)34 b(All)19
1843+b(v)m(alues)h(di\013eren)o(t)f(from)-42 775 y Fl(nil)f
1844+Fo(are)g(considered)g(true,)h(while)f Fl(nil)f Fo(is)h(considered)h
1845+(false.)28 b Fm(if)p Fo('s,)18 b Fm(while)p Fo('s)f(and)h
1846+Fm(repeat)p Fo('s)f(ha)o(v)o(e)h(the)h(usual)-42 832
1847+y(meaning.)70 900 y Fn(stat)50 b Fj(!)g Fl(while)15 b
1848+Fn(exp1)i Fl(do)f Fn(blo)n(ck)g Fl(end)245 956 y Fj(j)32
1849+b Fl(rep)q(eat)17 b Fn(blo)n(ck)f Fl(un)o(til)f Fn(exp1)245
1850+1013 y Fj(j)32 b Fl(if)16 b Fn(exp1)h Fl(then)g Fn(blo)n(ck)e
1851+Fj(f)p Fn(elseif)8 b Fj(g)16 b Fo([)p Fl(else)f Fn(blo)n(ck)5
1852+b Fo(])15 b Fl(end)42 1069 y Fn(elseif)49 b Fj(!)h Fl(elseif)15
1853+b Fn(exp1)i Fl(then)f Fn(blo)n(ck)29 1162 y Fo(A)g Fm(return)g
1854+Fo(is)g(used)g(to)g(return)g(v)m(alues)h(from)d(a)i(function.)23
1855+b(Because)17 b(a)f(function)g(ma)o(y)f(return)h(more)f(than)-42
1856+1219 y(one)h(v)m(alue,)f(the)g(syn)o(tax)g(for)f(a)h(return)g(statemen)
1857+o(t)e(is:)42 1291 y Fn(r)n(et)50 b Fj(!)g Fl(return)16
1858+b Fn(explist)-42 1483 y Fl(4.4.4)52 b(F)l(unction)18
1859+b(Calls)e(as)h(Statemen)o(ts)-42 1569 y Fo(Because)f(of)f(p)q(ossible)g
1860+(side-e\013ects,)g(function)g(calls)f(can)h(b)q(e)h(executed)g(as)f
1861+(statemen)o(ts.)42 1641 y Fn(stat)50 b Fj(!)g Fn(functionc)n(al)r(l)-42
1862+1713 y Fo(Ev)o(en)o(tual)15 b(returned)g(v)m(alues)h(are)f(thro)o(wn)f
1863+(a)o(w)o(a)o(y)l(.)19 b(F)l(unction)c(calls)f(are)h(explained)g(in)g
1864+(Section)g(4.5.8.)-42 1833 y Fl(4.4.5)52 b(Lo)q(cal)19
1865+b(Declarations)-42 1919 y Fo(Lo)q(cal)e(v)m(ariables)e(can)h(b)q(e)h
1866+(declared)f(an)o(ywhere)g(inside)g(a)g(blo)q(c)o(k.)22
1867+b(Their)16 b(scop)q(e)h(b)q(egins)f(after)f(the)i(declaration)-42
1868+1975 y(and)f(lasts)e(un)o(til)g(the)i(end)f(of)g(the)g(blo)q(c)o(k.)20
1869+b(The)15 b(declaration)f(ma)o(y)g(include)i(an)f(initial)e(assignmen)o
1870+(t:)92 2044 y Fn(stat)50 b Fj(!)g Fl(lo)q(cal)17 b Fn(de)n(clist)e
1871+Fo([)p Fn(init)t Fo(])42 2100 y Fn(de)n(clist)49 b Fj(!)h
1872+Fn(name)16 b Fj(f)p Fo(',')f Fn(name)s Fj(g)96 2157 y
1873+Fn(init)49 b Fj(!)h Fo('=')16 b Fn(explist1)-42 2225
1874+y Fo(If)f(there)f(is)f(an)h(initial)e(assignmen)o(t,)g(it)h(has)h(the)g
1875+(same)f(seman)o(tics)f(of)h(a)h(m)o(ultiple)e(assignmen)o(t.)17
1876+b(Otherwise,)d(all)-42 2281 y(v)m(ariables)h(are)g(initialized)e(with)i
1877+Fl(nil)p Fo(.)-42 2403 y Fe(4.5)56 b(Expressions)-42
1878+2489 y Fl(4.5.1)c(Simple)15 b(Expressions)-42 2575 y
1879+Fo(Simple)f(expressions)h(are:)922 2748 y(5)p eop
1880+%%Page: 6 6
1881+6 5 bop 42 193 a Fn(exp)50 b Fj(!)g Fo('\(')16 b Fn(exp)g
1882+Fo('\)')42 250 y Fn(exp)50 b Fj(!)g Fl(nil)42 306 y Fn(exp)g
1883+Fj(!)g Fo('n)o(um)o(b)q(er')42 362 y Fn(exp)g Fj(!)g
1884+Fo('literal')42 419 y Fn(exp)g Fj(!)g Fn(var)-42 490
1885+y Fo(Num)o(b)q(ers)22 b(\(n)o(umerical)f(constan)o(ts\))g(and)i(string)
1886+f(literals)f(are)h(explained)h(in)f(Section)h(4.1.)41
1887+b(V)l(ariables)22 b(are)-42 546 y(explained)16 b(in)f(Section)g(4.4.2.)
1888+-42 665 y Fl(4.5.2)52 b(Arithmetic)15 b(Op)q(erators)-42
1889+751 y Fo(Lua)21 b(supp)q(orts)g(the)g(usual)f(arithmetic)e(op)q
1890+(erators.)35 b(These)21 b(op)q(erators)f(are)g(the)g(binary)h
1891+Fm(+)p Fo(,)g Fm(-)p Fo(,)g Fm(*)p Fo(,)h Fm(/)e Fo(and)h
1892+Fm(^)-42 808 y Fo(\(exp)q(onen)o(tiation\),)15 b(and)h(the)g(unary)g
1893+Fm(-)p Fo(.)22 b(If)16 b(the)g(op)q(erands)g(are)g(n)o(um)o(b)q(ers,)f
1894+(or)g(strings)g(that)g(can)h(b)q(e)h(con)o(v)o(erted)-42
1895+864 y(to)d(n)o(um)o(b)q(ers,)g(according)g(to)g(the)g(rules)g(giv)o(en)
1896+g(in)h(Section)f(4.2,)f(all)h(op)q(erations)f(but)i(exp)q(onen)o
1897+(tiation)e(ha)o(v)o(e)h(the)-42 920 y(usual)f(meaning.)18
1898+b(Otherwise,)13 b(the)g(fallbac)o(k)f(\\arith")g(is)g(called;)h(see)g
1899+(Section)g(4.7.)19 b(An)13 b(exp)q(onen)o(tiation)f(alw)o(a)o(ys)-42
1900+977 y(calls)k(this)f(fallbac)o(k.)22 b(The)16 b(standard)g
1901+(mathematical)c(library)j(rede\014nes)j(this)d(fallbac)o(k,)g(giving)g
1902+(the)h(exp)q(ected)-42 1033 y(meaning)e(to)h(exp)q(onen)o(tiation;)f
1903+(see)h(Section)g(6.3.)-42 1152 y Fl(4.5.3)52 b(Relational)18
1904+b(Op)q(erators)-42 1238 y Fo(Lua)e(o\013ers)e(the)i(follo)o(wing)d
1905+(relational)g(op)q(erators:)126 1327 y Fm(<)71 b(>)g(<=)48
1906+b(>=)f(~=)h(==)-42 1415 y Fo(All)15 b(return)g Fl(nil)f
1907+Fo(as)h(false)g(and)g(a)g(v)m(alue)g(di\013eren)o(t)g(from)e
1908+Fl(nil)h Fo(\(actually)g(the)h(n)o(um)o(b)q(er)g(1\))g(as)f(true.)29
1909+1472 y(Equalit)o(y)h(\014rst)h(compares)f(the)i(t)o(yp)q(es)f(of)h(its)
1910+e(op)q(erands.)24 b(If)17 b(they)g(are)f(di\013eren)o(t,)g(the)g
1911+(result)g(is)g Fl(nil)p Fo(.)23 b(Oth-)-42 1528 y(erwise,)18
1912+b(their)f(v)m(alues)h(are)g(compared.)26 b(Num)o(b)q(ers)17
1913+b(and)h(strings)f(are)h(compared)e(in)i(the)g(usual)f(w)o(a)o(y)l(.)27
1914+b(T)l(ables,)-42 1585 y(CF)l(unctions,)14 b(and)g(functions)g(are)g
1915+(compared)f(b)o(y)h(reference,)h(that)e(is,)h(t)o(w)o(o)e(tables)i(are)
1916+g(considered)g(equal)g(only)-42 1641 y(if)h(they)g(are)g(the)h(same)d
1917+(table.)20 b(The)15 b(op)q(erator)g Fm(~=)f Fo(is)h(exactly)g(the)g
1918+(negation)f(of)h(equalit)o(y)f(\()p Fm(==)p Fo(\).)29
1919+1698 y(The)19 b(other)g(op)q(erators)f(w)o(ork)g(as)g(follo)o(ws.)29
1920+b(If)19 b(b)q(oth)g(argumen)o(ts)e(are)i(n)o(um)o(b)q(ers,)f(they)h
1921+(are)g(compared)f(as)-42 1754 y(suc)o(h.)27 b(Otherwise,)17
1922+b(if)g(b)q(oth)g(argumen)o(ts)f(can)h(b)q(e)h(con)o(v)o(erted)f(to)g
1923+(strings,)f(their)h(v)m(alues)g(are)g(compared)g(using)-42
1924+1811 y(lexicographical)d(order.)20 b(Otherwise,)14 b(the)i(fallbac)o(k)
1925+d(\\order")i(is)g(called;)f(see)h(Section)h(4.7.)-42
1926+1930 y Fl(4.5.4)52 b(Logical)18 b(Op)q(erators)-42 2016
1927+y Fo(All)f(logical)f(op)q(erators,)g(lik)o(e)h(con)o(trol)f
1928+(structures,)h(consider)g Fl(nil)g Fo(as)g(false)g(and)g(an)o(ything)g
1929+(else)g(as)g(true.)26 b(The)-42 2072 y(logical)14 b(op)q(erators)g
1930+(are:)269 2161 y Fm(and)71 b(or)g(not)-42 2249 y Fo(The)17
1931+b(op)q(erators)f Fm(and)g Fo(and)h Fm(or)f Fo(use)h(short-cut)f(ev)m
1932+(aluation,)g(that)g(is,)g(the)h(second)g(op)q(erand)g(is)f(ev)m
1933+(aluated)h(only)-42 2306 y(if)e(necessary)l(.)-42 2425
1934+y Fl(4.5.5)52 b(Concatenation)-42 2511 y Fo(Lua)18 b(o\013ers)d(a)i
1935+(string)f(concatenation)g(op)q(erator,)f(denoted)j(b)o(y)e(\\)p
1936+Fm(..)p Fo(".)24 b(If)17 b(op)q(erands)g(are)g(strings)e(or)i(n)o(um)o
1937+(b)q(ers,)-42 2567 y(they)c(are)g(con)o(v)o(erted)f(to)g(strings)g
1938+(according)g(to)g(the)h(rules)f(in)h(Section)f(4.2.)18
1939+b(Otherwise,)13 b(the)g(fallbac)o(k)e(\\concat")-42 2623
1940+y(is)k(called;)g(see)g(Section)g(4.7.)922 2748 y(6)p
1941+eop
1942+%%Page: 7 7
1943+7 6 bop -42 199 a Fl(4.5.6)52 b(Precedence)-42 285 y
1944+Fo(Op)q(erator)15 b(precedence)i(follo)o(ws)d(the)h(table)g(b)q(elo)o
1945+(w,)f(from)f(the)j(lo)o(w)o(er)d(to)i(the)g(higher)g(priorit)o(y:)269
1946+379 y Fm(and)71 b(or)269 435 y(<)g(>)h(<=)47 b(>=)h(~=)f(==)269
1947+492 y(..)269 548 y(+)71 b(-)269 605 y(*)g(/)269 661 y(not)47
1948+b(-)24 b(\(unary\))269 718 y(^)-42 811 y Fo(All)15 b(binary)g(op)q
1949+(erators)f(are)h(left)f(asso)q(ciativ)o(e,)g(except)h(for)g
1950+Fm(^)p Fo(,)g(whic)o(h)g(is)f(righ)o(t)g(asso)q(ciativ)o(e.)-42
1951+931 y Fl(4.5.7)52 b(T)l(able)18 b(Constructors)-42 1017
1952+y Fo(T)l(able)d(constructors)f(are)h(expressions)g(that)f(create)h
1953+(tables;)f(ev)o(ery)h(time)e(a)i(constructor)f(is)h(ev)m(aluated,)g(a)f
1954+(new)-42 1074 y(table)f(is)g(created.)19 b(Constructors)12
1955+b(can)h(b)q(e)h(used)g(to)e(create)h(empt)o(y)f(tables,)g(or)h(to)g
1956+(create)g(a)f(table)h(and)g(initialize)-42 1130 y(some)h(\014elds.)29
1957+1187 y(The)h(general)g(syn)o(tax)g(for)f(constructors)h(is:)42
1958+1255 y Fn(table)n(c)n(onstructor)49 b Fj(!)i Fo(')p Fj(f)p
1959+Fo(')15 b Fn(\014eld)r(list)g Fo(')p Fj(g)p Fo(')212
1960+1311 y Fn(\014eld)r(list)48 b Fj(!)j Fn(l\014eld)r(list)31
1961+b Fj(j)16 b Fn(\016eld)r(list)31 b Fj(j)16 b Fn(l\014eld)r(list)f
1962+Fo(';')g Fn(\016eld)r(list)200 1368 y(l\014eld)r(list)48
1963+b Fj(!)j Fo([)p Fn(l\014eld)r(list1)6 b Fo(])197 1424
1964+y Fn(\016eld)r(list)49 b Fj(!)i Fo([)p Fn(\016eld)r(list1)6
1965+b Fo(])29 1517 y(The)15 b(form)f Fn(l\014eld)r(list1)g
1966+Fo(is)h(used)g(to)g(initialize)e(lists.)42 1589 y Fn(l\014eld)r(list1)
1967+49 b Fj(!)h Fn(exp)16 b Fj(f)p Fo(',')f Fn(exp)s Fj(g)h
1968+Fo([','])-42 1662 y(The)i(expressions)f(in)g(the)g(list)f(are)h
1969+(assigned)g(to)g(consecutiv)o(e)g(n)o(umerical)f(indexes,)h(starting)f
1970+(with)h(1.)25 b(As)18 b(an)-42 1718 y(example:)30 1812
1971+y Fm(a)24 b(=)g({"v1",)f("v2",)g(34})-42 1906 y Fo(is)15
1972+b(equiv)m(alen)o(t)g(to:)30 2000 y Fm(temp)23 b(=)h({})30
1973+2056 y(temp[1])f(=)h("v1")30 2112 y(temp[2])f(=)h("v2")30
1974+2169 y(temp[3])f(=)h(34)30 2225 y(a)g(=)g(temp)29 2319
1975+y Fo(The)15 b(next)h(form)d(initializes)g(named)i(\014elds)g(in)g(a)g
1976+(table.)42 2378 y Fn(\016eld)r(list1)50 b Fj(!)g Fn(\016eld)16
1977+b Fj(f)p Fo(',')f Fn(\016eld)5 b Fj(g)15 b Fo([','])127
1978+2435 y Fn(\016eld)50 b Fj(!)g Fn(name)16 b Fo('=')g Fn(exp)-42
1979+2503 y Fo(As)g(an)f(example:)30 2597 y Fm(a)24 b(=)g({x)f(=)h(1,)f(y)h
1980+(=)g(3})922 2748 y Fo(7)p eop
1981+%%Page: 8 8
1982+8 7 bop -42 199 a Fo(is)15 b(equiv)m(alen)o(t)g(to:)30
1983+293 y Fm(temp)23 b(=)h({})30 350 y(temp.x)f(=)h(1)30
1984+406 y(temp.y)f(=)h(3)30 462 y(a)g(=)g(temp)-42 582 y
1985+Fl(4.5.8)52 b(F)l(unction)18 b(Calls)-42 668 y Fo(A)e(function)f(call)f
1986+(has)h(the)g(follo)o(wing)e(syn)o(tax:)42 740 y Fn(functionc)n(al)r(l)
1987+49 b Fj(!)h Fn(var)17 b(r)n(e)n(alPar)n(ams)-42 813 y
1988+Fo(Here,)i Fm(var)e Fo(can)h(b)q(e)h(an)o(y)e(v)m(ariable)h(\(global,)e
1989+(lo)q(cal,)i(indexed,)g(etc\).)28 b(If)18 b(its)f(t)o(yp)q(e)h(is)g
1990+Fn(function)j Fo(or)c Fn(CF)m(unction)s Fo(,)-42 869
1991+y(this)g(function)g(is)f(called.)25 b(Otherwise,)17 b(the)g(fallbac)o
1992+(k)f(\\function")g(is)h(called,)g(ha)o(ving)f(as)g(\014rst)h(parameter)
1993+e(the)-42 925 y(v)m(alue)h(of)f Fm(var)p Fo(,)f(and)h(then)h(the)f
1994+(original)f(call)g(parameters.)29 982 y(The)h(form:)42
1995+1054 y Fn(functionc)n(al)r(l)49 b Fj(!)h Fn(var)17 b
1996+Fo(':')j Fn(name)c(r)n(e)n(alPar)n(ams)-42 1126 y Fo(can)g(b)q(e)g
1997+(used)f(to)g(call)f(\\metho)q(ds".)19 b(A)c(call)f Fm(var:name\(...\))g
1998+Fo(is)g(syn)o(tactic)h(sugar)f(for)6 1220 y Fm(var.name\(var,)22
1999+b(...\))-42 1314 y Fo(except)16 b(that)f Fm(var)f Fo(is)h(ev)m(aluated)
2000+g(only)g(once.)42 1382 y Fn(r)n(e)n(alPar)n(ams)49 b
2001+Fj(!)h Fo('\(')16 b([)p Fn(explist1)6 b Fo(])15 b('\)')42
2002+1438 y Fn(r)n(e)n(alPar)n(ams)49 b Fj(!)h Fn(table)n(c)n(onstructor)115
2003+1495 y(explist1)f Fj(!)h Fn(exp1)17 b Fj(f)p Fo(',')e
2004+Fn(exp1)6 b Fj(g)-42 1563 y Fo(All)18 b(argumen)o(t)e(expressions)i
2005+(are)g(ev)m(aluated)g(b)q(efore)g(the)h(call;)f(then)g(the)g(list)f(of)
2006+h(argumen)o(ts)e(is)i(adjusted)g(to)-42 1620 y(the)j(length)f(of)f(the)
2007+h(list)f(of)h(parameters)e(\(see)j(Section)f(4.3\);)h(\014nally)l(,)f
2008+(this)g(list)f(is)g(assigned)h(to)g(the)g(formal)-42
2009+1676 y(parameters.)g(A)15 b(call)g(of)g(the)h(form)e
2010+Fm(f{...})h Fo(is)g(syn)o(tactic)f(sugar)h(for)g Fm(f\({...}\))p
2011+Fo(,)f(that)h(is,)g(the)h(parameter)e(list)-42 1732 y(is)h(a)g(single)g
2012+(new)g(table.)29 1789 y(Because)h(a)f(function)h(can)g(return)f(an)o(y)
2013+g(n)o(um)o(b)q(er)g(of)g(results)g(\(see)h(Section)f(4.4.3\),)e(the)j
2014+(n)o(um)o(b)q(er)f(of)g(results)-42 1845 y(m)o(ust)e(b)q(e)h(adjusted)g
2015+(b)q(efore)g(used.)20 b(If)14 b(the)g(function)f(is)h(called)f(as)g(a)h
2016+(statemen)o(t)d(\(see)j(Section)g(4.4.4\),)e(its)g(return)-42
2017+1902 y(list)18 b(is)h(adjusted)g(to)g(0.)31 b(If)20 b(the)f(function)g
2018+(is)g(called)g(in)g(a)g(place)g(that)f(needs)i(a)f(single)f(v)m(alue)i
2019+(\(syn)o(tactically)-42 1958 y(denoted)f(b)o(y)f(the)g(non-terminal)e
2020+Fm(exp1)p Fo(\),)h(its)g(return)h(list)f(is)g(adjusted)h(to)g(1.)27
2021+b(If)18 b(the)g(function)g(is)g(called)f(in)h(a)-42 2015
2022+y(place)f(that)g(can)g(hold)g(man)o(y)e(v)m(alues)i(\(syn)o(tactically)
2023+e(denoted)j(b)o(y)f(the)g(non-terminal)e Fm(exp)p Fo(\),)h(no)h
2024+(adjustmen)o(t)-42 2071 y(is)e(done.)-42 2193 y Fe(4.6)56
2025+b(F)-5 b(unction)20 b(De\014nitions)-42 2279 y Fo(F)l(unctions)c(in)g
2026+(Lua)g(can)g(b)q(e)h(de\014ned)g(an)o(ywhere)f(in)g(the)g(global)e(lev)
2027+o(el)i(of)f(a)h(c)o(h)o(unk.)22 b(The)16 b(syn)o(tax)f(for)h(function)
2028+-42 2335 y(de\014nition)g(is:)42 2407 y Fn(function)50
2029+b Fj(!)g Fl(function)16 b Fn(var)h Fo('\(')e([)p Fn(p)n(arlist1)6
2030+b Fo(])16 b('\)')f Fn(blo)n(ck)g Fl(end)29 2536 y Fo(When)f(Lua)g
2031+(pre-compiles)f(a)g(c)o(h)o(unk,)h(all)f(its)f(function)i(b)q(o)q(dies)
2032+g(are)f(pre-compiled,)g(to)q(o.)19 b(Then,)14 b(when)g(Lua)-42
2033+2592 y(\\executes")i(the)f(function)g(de\014nition,)g(its)f(b)q(o)q(dy)
2034+i(is)f(stored,)f(with)h(t)o(yp)q(e)g Fn(function)p Fo(,)f(in)o(to)g
2035+(the)i(v)m(ariable)e Fm(var)p Fo(.)922 2748 y(8)p eop
2036+%%Page: 9 9
2037+9 8 bop 29 199 a Fo(P)o(arameters)13 b(act)i(as)f(lo)q(cal)h(v)m
2038+(ariables,)f(initialized)f(with)i(the)g(argumen)o(t)f(v)m(alues.)42
2039+271 y Fn(p)n(arlist1)50 b Fj(!)g Fn(name)16 b Fj(f)p
2040+Fo(',')f Fn(name)s Fj(g)29 400 y Fo(Results)g(are)f(returned)h(using)f
2041+(the)h Fm(return)f Fo(statemen)o(t)e(\(see)j(Section)f(4.4.3\).)k(If)d
2042+(con)o(trol)e(reac)o(hes)i(the)g(end)-42 456 y(of)g(a)g(function)g
2043+(without)f(a)h(return)g(instruction,)f(the)h(function)g(returns)h(with)
2044+e(no)h(results.)29 513 y(There)22 b(is)f(a)g(sp)q(ecial)g(syn)o(tax)g
2045+(for)g(de\014nition)h(of)f(metho)q(ds,)h(that)e(is,)j(functions)e(whic)
2046+o(h)g(ha)o(v)o(e)h(an)f(extra)-42 569 y(parameter)14
2047+b Fn(self)p Fo(.)42 641 y Fn(function)50 b Fj(!)g Fl(function)16
2048+b Fn(var)h Fo(':')j Fn(name)c Fo('\(')f([)p Fn(p)n(arlist1)6
2049+b Fo(])16 b('\)')f Fn(blo)n(ck)g Fl(end)-42 714 y Fo(A)h(declaration)e
2050+(lik)o(e)-42 807 y Fm(function)23 b(v:f)h(\(...\))6 864
2051+y(...)-42 920 y(end)-42 1014 y Fo(is)15 b(equiv)m(alen)o(t)g(to)-42
2052+1108 y Fm(function)23 b(v.f)h(\(self,)f(...\))6 1164
2053+y(...)-42 1221 y(end)-42 1315 y Fo(that)16 b(is,)g(the)g(function)g
2054+(gets)g(an)g(extra)f(formal)f(parameter)h(called)h Fm(self)p
2055+Fo(.)22 b(Notice)16 b(that)f(the)h(v)m(ariable)g Fm(v)g
2056+Fo(m)o(ust)-42 1371 y(ha)o(v)o(e)f(b)q(een)i(previously)d(initialized)g
2057+(with)g(a)h(table)g(v)m(alue.)-42 1493 y Fe(4.7)56 b(F)-5
2058+b(allbac)n(ks)-42 1579 y Fo(Lua)17 b(pro)o(vides)f(a)g(p)q(o)o(w)o
2059+(erful)g(mec)o(hanism)e(to)h(extend)i(its)f(seman)o(tics,)e(called)i
2060+Fn(fal)r(lb)n(acks)p Fo(.)23 b(Basically)l(,)15 b(a)h(fallbac)o(k)-42
2061+1635 y(is)f(a)g(programmer)d(de\014ned)17 b(function)e(whic)o(h)g(is)f
2062+(called)h(whenev)o(er)h(Lua)f(do)q(es)h(not)f(kno)o(w)f(ho)o(w)h(to)g
2063+(pro)q(ceed.)29 1691 y(Lua)h(supp)q(orts)f(the)g(follo)o(wing)e
2064+(fallbac)o(ks,)h(iden)o(ti\014ed)h(b)o(y)g(the)g(giv)o(en)g(strings:)
2065+-42 1785 y Fl(\\arith")24 b Fo(called)17 b(when)g(an)h(arithmetic)c(op)
2066+q(eration)j(is)g(applied)g(to)f(non)i(n)o(umerical)d(op)q(erands,)j(or)
2067+f(when)g(the)72 1842 y(binary)f Fm(^)g Fo(op)q(eration)g(is)f(called.)
2068+23 b(It)17 b(receiv)o(es)f(three)g(argumen)o(ts:)k(the)d(t)o(w)o(o)e
2069+(op)q(erands)h(\(the)g(second)h(one)72 1898 y(is)j(nil)g(when)h(the)g
2070+(op)q(eration)e(is)h(unary)h(min)o(us\))e(and)h(one)h(of)f(the)g(follo)
2071+o(wing)f(strings)g(describing)h(the)72 1955 y(o\013ended)c(op)q
2072+(erator:)120 2067 y Fm(add)47 b(sub)g(mul)h(div)f(pow)g(unm)72
2073+2180 y Fo(Its)15 b(return)f(v)m(alue)h(is)f(the)h(\014nal)f(result)g
2074+(of)g(the)h(arithmetic)d(op)q(eration.)19 b(The)c(default)f(function)g
2075+(issues)h(an)72 2236 y(error.)-42 2330 y Fl(\\order")23
2076+b Fo(called)15 b(when)h(an)g(order)f(comparison)e(is)i(applied)h(to)f
2077+(non)g(n)o(umerical)f(or)h(non)h(string)e(op)q(erands.)21
2078+b(It)72 2386 y(receiv)o(es)d(three)g(argumen)o(ts:)23
2079+b(the)18 b(t)o(w)o(o)f(op)q(erands)h(and)g(one)g(of)f(the)h(follo)o
2080+(wing)e(strings)h(describing)g(the)72 2443 y(o\013ended)f(op)q(erator:)
2081+120 2555 y Fm(lt)23 b(gt)h(le)g(ge)922 2748 y Fo(9)p
2082+eop
2083+%%Page: 10 10
2084+10 9 bop 72 199 a Fo(Its)17 b(return)h(v)m(alue)f(is)g(the)g(\014nal)g
2085+(result)g(of)g(the)g(comparison)f(op)q(eration.)25 b(The)18
2086+b(default)e(function)i(issues)72 256 y(an)d(error.)-42
2087+350 y Fl(\\concat")25 b Fo(called)d(when)g(a)f(concatenation)f(is)h
2088+(applied)h(to)f(non)h(string)e(op)q(erands.)39 b(It)22
2089+b(receiv)o(es)f(the)h(t)o(w)o(o)72 406 y(op)q(erands)d(as)f(argumen)o
2090+(ts.)29 b(Its)18 b(return)h(v)m(alue)g(is)f(the)g(\014nal)h(result)f
2091+(of)g(the)h(concatenation)f(op)q(eration.)72 462 y(The)e(default)e
2092+(function)h(issues)g(an)h(error.)-42 556 y Fl(\\index")23
2093+b Fo(called)14 b(when)i(Lua)f(tries)f(to)g(retriev)o(e)g(the)h(v)m
2094+(alue)g(of)f(an)h(index)g(not)f(presen)o(t)h(in)f(a)h(table.)k(It)c
2095+(receiv)o(es)72 613 y(as)20 b(argumen)o(ts)e(the)i(table)g(and)g(the)g
2096+(index.)35 b(Its)20 b(return)g(v)m(alue)g(is)f(the)h(\014nal)g(result)g
2097+(of)f(the)i(indexing)72 669 y(op)q(eration.)e(The)d(default)e(function)
2098+h(returns)h(nil.)-42 763 y Fl(\\getglobal")24 b Fo(called)15
2099+b(when)h(Lua)f(tries)f(to)h(retriev)o(e)f(the)i(v)m(alue)f(of)g(a)f
2100+(global)g(v)m(ariable)h(whic)o(h)g(has)g(a)g(nil)f(v)m(alue)72
2101+819 y(\(or)k(whic)o(h)h(has)g(not)g(b)q(een)h(initialized\).)30
2102+b(It)19 b(receiv)o(es)g(as)f(argumen)o(t)g(the)h(name)f(of)g(the)i(v)m
2103+(ariable.)30 b(Its)72 876 y(return)15 b(v)m(alue)h(is)e(the)i(\014nal)f
2104+(result)f(of)h(the)g(expression.)20 b(The)c(default)e(function)h
2105+(returns)g(nil.)-42 970 y Fl(\\gettable")25 b Fo(called)17
2106+b(when)i(Lua)g(tries)e(to)g(index)i(a)f(non)g(table)g(v)m(alue.)29
2107+b(It)18 b(receiv)o(es)g(as)g(argumen)o(ts)e(the)i(non)72
2108+1026 y(table)d(v)m(alue)h(and)g(the)g(index.)22 b(Its)15
2109+b(return)h(v)m(alue)g(is)f(the)h(\014nal)g(result)f(of)g(the)h
2110+(indexing)g(op)q(eration.)k(The)72 1083 y(default)15
2111+b(function)g(issues)g(an)g(error.)-42 1176 y Fl(\\settable")24
2112+b Fo(called)18 b(when)g(Lua)g(tries)f(to)h(assign)f(indexed)h(a)g(non)g
2113+(table)f(v)m(alue.)28 b(It)18 b(receiv)o(es)g(as)f(argumen)o(ts)72
2114+1233 y(the)e(non)h(table)e(v)m(alue,)h(the)h(index,)f(and)g(the)h
2115+(assigned)e(v)m(alue.)20 b(The)c(default)f(function)g(issues)g(an)g
2116+(error.)-42 1327 y Fl(\\function")24 b Fo(called)16 b(when)h(Lua)g
2117+(tries)f(to)g(call)f(a)h(non)h(function)f(v)m(alue.)24
2118+b(It)17 b(receiv)o(es)f(as)g(argumen)o(ts)f(the)h(non)72
2119+1383 y(function)i(v)m(alue)h(and)g(the)f(argumen)o(ts)f(giv)o(en)h(in)g
2120+(the)h(original)d(call.)29 b(Its)19 b(return)f(v)m(alues)h(are)f(the)h
2121+(\014nal)72 1440 y(results)c(of)f(the)i(call)e(op)q(eration.)19
2122+b(The)d(default)e(function)h(issues)g(an)h(error.)-42
2123+1533 y Fl(\\gc")24 b Fo(called)12 b(during)g(garbage)e(collection.)18
2124+b(It)12 b(receiv)o(es)g(as)f(argumen)o(t)f(the)i(table)f(b)q(eing)h
2125+(collected.)19 b(After)11 b(eac)o(h)72 1590 y(run)16
2126+b(of)f(the)g(collector)f(this)h(function)g(is)g(called)g(with)g
2127+(argumen)o(t)f(nil.)20 b(Because)c(this)e(function)i(op)q(erates)72
2128+1646 y(during)i(garbage)g(collection,)f(it)h(m)o(ust)f(b)q(e)i(used)g
2129+(with)f(great)f(care,)i(and)f(programmers)d(should)k(a)o(v)o(oid)72
2130+1703 y(the)g(creation)g(of)g(new)g(ob)s(jects)g(\(tables)f(or)h
2131+(strings\))e(in)i(this)g(function.)32 b(The)19 b(default)g(function)g
2132+(do)q(es)72 1759 y(nothing.)-42 1853 y Fl(\\error")k
2133+Fo(called)16 b(when)i(an)f(error)f(o)q(ccurs.)26 b(It)17
2134+b(receiv)o(es)g(as)g(argumen)o(t)e(a)i(string)f(describing)h(the)g
2135+(error.)25 b(The)72 1910 y(default)15 b(function)g(prin)o(ts)f(the)i
2136+(message)d(on)j(the)f(standard)g(error)f(output.)29 2003
2137+y(The)19 b(function)f Fm(setfallback)f Fo(is)g(used)i(to)f(c)o(hange)g
2138+(a)g(fallbac)o(k)f(action.)29 b(Its)18 b(\014rst)g(argumen)o(t)f(is)g
2139+(a)h(string)-42 2060 y(describing)f(the)g(fallbac)o(k,)e(and)i(the)f
2140+(second)i(the)e(new)h(function)g(to)f(b)q(e)h(called.)24
2141+b(It)16 b(returns)h(the)f(old)h(function)-42 2116 y(for)e(the)g(giv)o
2142+(en)g(fallbac)o(k.)29 2173 y(Section)g(8.6)f(sho)o(ws)h(an)g(example)f
2143+(of)h(the)g(use)h(of)e(fallbac)o(ks.)-42 2294 y Fe(4.8)56
2144+b(Error)18 b(Handling)-42 2380 y Fo(Because)c(Lua)g(is)e(an)h
2145+(extension)g(language,)f(all)g(Lua)i(actions)e(start)g(from)f(C)i(co)q
2146+(de)h(calling)d(a)i(function)g(from)e(the)-42 2437 y(Lua)j(library)l(.)
2147+k(Whenev)o(er)13 b(an)g(error)f(o)q(ccurs)i(during)f(Lua)g(compilation)
2148+d(or)j(execution,)g(an)g(error)f(fallbac)o(k)g(func-)-42
2149+2493 y(tion)k(is)g(called,)f(and)i(then)f(the)g(corresp)q(onding)h
2150+(function)f(from)e(the)i(library)f(\()p Fm(lua_dofile)p
2151+Fo(,)g Fm(lua_dostring)p Fo(,)-42 2550 y Fm(lua_call)p
2152+Fo(,)f(and)i Fm(lua_callfunction)p Fo(\))c(is)j(terminated)e(returning)
2153+i(an)g(error)g(condition.)911 2748 y(10)p eop
2154+%%Page: 11 11
2155+11 10 bop 29 199 a Fo(The)15 b(only)f(argumen)o(t)e(to)i(the)g(error)g
2156+(fallbac)o(k)f(function)h(is)g(a)g(string)g(describing)g(the)g(error.)
2157+19 b(The)c(standard)-42 256 y(I/O)i(library)d(rede\014nes)j(this)e
2158+(fallbac)o(k,)f(using)h(the)h(debug)g(facilities)e(\(see)h(Section)h
2159+(7,)f(in)g(order)h(to)f(prin)o(t)g(some)-42 312 y(extra)h
2160+(informations,)c(lik)o(e)j(the)h(stac)o(k)f(of)h(calls.)21
2161+b(F)l(or)15 b(more)f(information)f(ab)q(out)j(an)g(error,)e(the)i(Lua)h
2162+(program)-42 369 y(can)j(include)f(the)g(compilation)d(pragma)h
2163+Fm($debug)p Fo(.)62 b(This)18 b(pragma)f(m)o(ust)h(b)q(e)h(written)f
2164+(in)h(a)f(line)h(b)o(y)g(itself.)-42 425 y(When)14 b(an)f(error)f(o)q
2165+(ccurs)h(in)g(a)f(program)f(compiled)h(with)g(this)g(option,)g(the)h
2166+(error)g(routine)f(is)g(able)h(to)f(prin)o(t)g(also)-42
2167+482 y(the)18 b(lines)f(where)h(the)g(calls)e(\(and)i(the)f(error\))g(w)
2168+o(ere)g(made.)26 b(If)18 b(needed,)h(it)e(is)g(p)q(ossible)g(to)g(c)o
2169+(hange)h(the)f(error)-42 538 y(fallbac)o(k)d(routine;)h(see)g(Section)g
2170+(4.7.)29 594 y(Lua)e(co)q(de)g(can)f(generate)g(an)g(error)g(b)o(y)g
2171+(calling)f(the)i(function)f Fm(error)p Fo(.)18 b(Its)13
2172+b(optional)d(parameter)h(is)h(a)g(string,)-42 651 y(whic)o(h)k(is)e
2173+(used)i(as)f(the)g(error)g(message.)-42 794 y Fp(5)67
2174+b(The)23 b(Application)h(Program)f(In)n(terface)-42 896
2175+y Fo(This)13 b(section)g(describ)q(es)h(the)f(API)g(for)g(Lua,)h(that)e
2176+(is,)h(the)g(set)g(of)f(C)h(functions)g(a)o(v)m(ailable)f(to)h(the)g
2177+(host)g(program)-42 952 y(to)i(comm)o(unicate)e(with)h(the)h(library)l
2178+(.)k(The)d(API)f(functions)g(can)h(b)q(e)f(classi\014ed)g(in)g(the)h
2179+(follo)o(wing)d(categories:)14 1046 y(1.)22 b(executing)15
2180+b(Lua)h(co)q(de;)14 1140 y(2.)22 b(con)o(v)o(erting)14
2181+b(v)m(alues)i(b)q(et)o(w)o(een)f(C)g(and)g(Lua;)14 1233
2182+y(3.)22 b(manipulating)13 b(\(reading)h(and)i(writing\))d(Lua)j(ob)s
2183+(jects;)14 1327 y(4.)22 b(calling)14 b(Lua)i(functions;)14
2184+1421 y(5.)22 b(C)15 b(functions)g(to)g(b)q(e)g(called)g(b)o(y)g(Lua;)14
2185+1515 y(6.)22 b(references)16 b(to)f(Lua)g(Ob)s(jects.)-42
2186+1609 y(All)g(API)h(functions)f(are)f(declared)i(in)f(the)g(\014le)g
2187+Fm(lua.h)p Fo(.)-42 1730 y Fe(5.1)56 b(Executing)18 b(Lua)h(Co)r(de)-42
2188+1816 y Fo(A)12 b(host)f(program)f(can)i(execute)g(Lua)g(c)o(h)o(unks)g
2189+(written)f(in)g(a)h(\014le)f(or)h(in)f(a)g(string,)g(using)h(the)g
2190+(follo)o(wing)d(functions:)-42 1967 y Fm(int)286 b(lua_dofile)357
2191+b(\(char)23 b(*filename\);)-42 2023 y(int)286 b(lua_dostring)309
2192+b(\(char)23 b(*string\);)-42 2117 y Fo(Both)15 b(functions)f(return)g
2193+(an)g(error)f(co)q(de:)20 b(0,)14 b(in)g(case)g(of)g(success;)h(non)f
2194+(zero,)g(in)g(case)h(of)e(errors.)19 b(The)c(function)-42
2195+2173 y Fm(lua_dofile)p Fo(,)h(if)g(called)g(with)g(argumen)o(t)f(NULL)j
2196+(\(0\),)d(executes)j(the)f(\\\014le")f Fm(stdin)p Fo(.)23
2197+b(F)l(unction)17 b Fm(lua_dofile)-42 2230 y Fo(is)f(also)e(able)h(to)g
2198+(execute)h(pre-compiled)f(c)o(h)o(unks.)21 b(It)16 b(detects)f(whether)
2199+h(the)f(\014le)h(is)f(text)g(or)g(not,)g(and)g(loads)g(it)-42
2200+2286 y(accordingly)g(\(see)g(program)e Fm(luac)p Fo(\).)-42
2201+2408 y Fe(5.2)56 b(Con)n(v)n(erting)20 b(V)-5 b(alues)20
2202+b(b)r(et)n(w)n(een)e(C)h(and)h(Lua)-42 2494 y Fo(Because)13
2203+b(Lua)f(has)g(no)f(static)g(t)o(yp)q(e)h(system,)f(all)f(v)m(alues)i
2204+(passed)g(b)q(et)o(w)o(een)g(Lua)g(and)g(C)g(ha)o(v)o(e)f(t)o(yp)q(e)h
2205+Fm(lua_Object)p Fo(,)-42 2550 y(whic)o(h)f(w)o(orks)f(lik)o(e)g(an)h
2206+(abstract)f(t)o(yp)q(e)h(in)g(C)g(that)f(can)h(hold)g(an)o(y)g(Lua)g(v)
2207+m(alue.)19 b(V)l(alues)11 b(of)f(t)o(yp)q(e)h Fm(lua_Object)f
2208+Fo(ha)o(v)o(e)-42 2607 y(no)16 b(meaning)d(outside)i(Lua;)g(for)g
2209+(instance,)g(the)g(comparisson)e(of)i(t)o(w)o(o)f Fm(lua_Object's)f
2210+Fo(is)i(of)g(no)g(signi\014cance.)911 2748 y(11)p eop
2211+%%Page: 12 12
2212+12 11 bop 29 199 a Fo(Lua)11 b(has)f(automatic)e(memory)f(managemen)o
2213+(t,)i(and)h(garbage)g(collection.)17 b(Because)11 b(of)f(that,)g(a)g
2214+Fm(lua_Object)-42 256 y Fo(has)18 b(a)f(limited)e(scop)q(e,)j(and)g(is)
2215+f(only)g(v)m(alid)g(inside)g(the)h Fn(blo)n(ck)j Fo(where)d(it)f(w)o
2216+(as)f(created.)27 b(A)17 b(C)h(function)f(called)-42
2217+312 y(from)c(Lua)i(is)f(a)h(blo)q(c)o(k,)f(and)h(its)e(parameters)g
2218+(are)h(v)m(alid)h(only)f(un)o(til)g(its)f(end.)21 b(A)14
2219+b(go)q(o)q(d)h(programmi)o(ng)d(practice)-42 369 y(is)i(to)f(con)o(v)o
2220+(ert)g(Lua)h(ob)s(jects)f(to)g(C)h(v)m(alues)g(as)f(so)q(on)h(as)f
2221+(they)h(are)g(a)o(v)m(ailable,)e(and)i(nev)o(er)g(to)f(store)g
2222+Fm(lua_Object)p Fo(s)-42 425 y(in)j(C)e(global)g(v)m(ariables.)29
2223+482 y(When)f(C)g(co)q(de)h(calls)e(Lua)h(rep)q(eatedly)l(,)g(as)g(in)g
2224+(a)f(lo)q(op,)h(ob)s(jects)f(returned)i(b)o(y)f(these)g(calls)f(accum)o
2225+(ulate,)f(and)-42 538 y(ma)o(y)j(create)h(a)g(memory)d(problem.)19
2226+b(T)l(o)c(a)o(v)o(oid)f(this,)g(nested)i(blo)q(c)o(ks)f(can)g(b)q(e)h
2227+(de\014ned)g(with)f(the)g(functions:)-42 629 y Fm(void)262
2228+b(lua_beginblock)f(\(void\);)-42 686 y(void)h(lua_endblock)309
2229+b(\(void\);)-42 777 y Fo(After)15 b(the)h(end)f(of)g(the)g(blo)q(c)o
2230+(k,)g(all)f Fm(lua_Object)p Fo('s)g(created)h(inside)g(it)f(are)h
2231+(released.)29 834 y(T)l(o)g(c)o(hec)o(k)g(the)h(t)o(yp)q(e)f(of)g(a)g
2232+Fm(lua_Object)p Fo(,)e(the)i(follo)o(wing)e(function)i(is)g(a)o(v)m
2233+(ailable:)-42 925 y Fm(int)286 b(lua_type)405 b(\(lua_Object)22
2234+b(object\);)-42 1016 y Fo(plus)16 b(the)f(follo)o(wing)e(macros)g(and)j
2235+(functions:)-42 1108 y Fm(int)286 b(lua_isnil)381 b(\(lua_Object)22
2236+b(object\);)-42 1164 y(int)286 b(lua_isnumber)309 b(\(lua_Object)22
2237+b(object\);)-42 1220 y(int)286 b(lua_isstring)309 b(\(lua_Object)22
2238+b(object\);)-42 1277 y(int)286 b(lua_istable)333 b(\(lua_Object)22
2239+b(object\);)-42 1333 y(int)286 b(lua_isfunction)261 b(\(lua_Object)22
2240+b(object\);)-42 1390 y(int)286 b(lua_iscfunction)237
2241+b(\(lua_Object)22 b(object\);)-42 1446 y(int)286 b(lua_isuserdata)261
2242+b(\(lua_Object)22 b(object\);)-42 1538 y Fo(All)14 b(macros)f(return)i
2243+(1)f(if)g(the)h(ob)s(ject)f(is)g(compatible)f(with)h(the)g(giv)o(en)g
2244+(t)o(yp)q(e,)h(and)g(0)f(otherwise.)19 b(The)c(function)-42
2245+1594 y Fm(lua_isnumber)d Fo(accepts)i(n)o(um)o(b)q(ers)f(and)h(n)o
2246+(umerical)e(strings,)g Fm(lua_isstring)g Fo(accepts)i(strings)e(and)i
2247+(n)o(um)o(b)q(ers)-42 1650 y(\(see)i(Section)f(4.2\),)e(and)j
2248+Fm(lua_isfunction)d Fo(accepts)i(Lua)h(and)f(C)g(functions.)29
2249+1707 y(The)20 b(function)g Fm(lua_type)f Fo(can)h(b)q(e)h(used)f(to)g
2250+(distinguish)f(b)q(et)o(w)o(een)h(di\013eren)o(t)f(kinds)h(of)g(user)g
2251+(data;)h(see)-42 1763 y(b)q(elo)o(w.)29 1820 y(T)l(o)15
2252+b(translate)f(a)h(v)m(alue)g(from)f(t)o(yp)q(e)h Fm(lua_Object)f
2253+Fo(to)g(a)h(sp)q(eci\014c)h(C)f(t)o(yp)q(e,)g(the)g(programmer)d(can)k
2254+(use:)-42 1911 y Fm(double)214 b(lua_getnumber)285 b(\(lua_Object)22
2255+b(object\);)-42 1968 y(char)239 b(*lua_getstring)284
2256+b(\(lua_Object)22 b(object\);)-42 2024 y(lua_CFunction)46
2257+b(lua_getcfunction)213 b(\(lua_Object)22 b(object\);)-42
2258+2081 y(void)239 b(*lua_getuserdata)d(\(lua_Object)22
2259+b(object\);)-42 2172 y(lua_getnumber)14 b Fo(con)o(v)o(erts)g(a)g
2260+Fm(lua_Object)g Fo(to)g(a)h(\015oat.)k(This)c Fm(lua_Object)e
2261+Fo(m)o(ust)h(b)q(e)h(a)g(n)o(um)o(b)q(er)f(or)h(a)f(string)-42
2262+2228 y(con)o(v)o(ertible)h(to)f(n)o(um)o(b)q(er)h(\(see)g(Section)g
2263+(4.2\);)f(otherwise,)g(the)h(function)g(returns)g(0.)29
2264+2285 y Fm(lua_getstring)c Fo(con)o(v)o(erts)g(a)h Fm(lua_Object)f
2265+Fo(to)h(a)g(string)g(\()p Fm(char)23 b(*)p Fo(\).)18
2266+b(This)12 b Fm(lua_Object)f Fo(m)o(ust)g(b)q(e)i(a)f(string)-42
2267+2341 y(or)k(a)f(n)o(um)o(b)q(er;)h(otherwise,)e(the)i(function)g
2268+(returns)g(0)f(\(the)h(n)o(ull)f(p)q(oin)o(ter\).)21
2269+b(This)16 b(function)f(do)q(es)i(not)e(create)h(a)-42
2270+2398 y(new)f(string,)d(but)i(returns)g(a)f(p)q(oin)o(ter)g(to)h(a)f
2271+(string)g(inside)g(the)h(Lua)g(en)o(vironmen)o(t.)k(Because)d(Lua)f
2272+(has)f(garbage)-42 2454 y(collection,)h(there)h(is)g(no)g(guaran)o(tee)
2273+g(that)f(suc)o(h)i(p)q(oin)o(ter)e(will)g(b)q(e)i(v)m(alid)f(after)f
2274+(the)i(blo)q(c)o(k)f(ends.)29 2511 y Fm(lua_getcfunction)f
2275+Fo(con)o(v)o(erts)h(a)h Fm(lua_Object)f Fo(to)g(a)h(C)g(function.)23
2276+b(This)15 b Fm(lua_Object)g Fo(m)o(ust)g(ha)o(v)o(e)g(t)o(yp)q(e)-42
2277+2567 y Fn(CF)m(unction)s Fo(;)j(otherwise,)f(the)h(function)g(returns)g
2278+(0)f(\(the)h(n)o(ull)f(p)q(oin)o(ter\).)27 b(The)18 b(t)o(yp)q(e)g
2279+Fm(lua_CFunction)e Fo(is)h(ex-)-42 2623 y(plained)f(in)f(Section)g
2280+(5.5.)911 2748 y(12)p eop
2281+%%Page: 13 13
2282+13 12 bop 29 199 a Fm(lua_getuserdata)10 b Fo(con)o(v)o(erts)i(a)g
2283+Fm(lua_Object)e Fo(to)i Fm(void*)p Fo(.)18 b(This)12
2284+b Fm(lua_Object)f Fo(m)o(ust)g(ha)o(v)o(e)h(t)o(yp)q(e)g
2285+Fn(user)n(data)s Fo(;)-42 256 y(otherwise,)j(the)g(function)g(returns)g
2286+(0)g(\(the)g(n)o(ull)f(p)q(oin)o(ter\).)29 312 y(The)j(rev)o(erse)g
2287+(pro)q(cess,)h(that)e(is,)h(passing)f(a)h(sp)q(eci\014c)h(C)f(v)m(alue)
2288+g(to)g(Lua,)h(is)e(done)i(b)o(y)f(using)g(the)g(follo)o(wing)-42
2289+369 y(functions:)-42 457 y Fm(void)262 b(lua_pushnumber)f(\(double)23
2290+b(n\);)-42 513 y(void)262 b(lua_pushstring)f(\(char)23
2291+b(*s\);)-42 570 y(void)262 b(lua_pushcfunction)189 b(\(lua_CFunction)22
2292+b(f\);)-42 626 y(void)262 b(lua_pushusertag)237 b(\(void)23
2293+b(*u,)h(int)f(tag\);)-42 714 y Fo(plus)16 b(the)f(macro:)-42
2294+802 y Fm(void)262 b(lua_pushuserdata)213 b(\(void)23
2295+b(*u\);)-42 890 y Fo(All)17 b(of)f(them)g(receiv)o(e)h(a)f(C)h(v)m
2296+(alue,)g(con)o(v)o(ert)f(it)h(to)f(a)g(corresp)q(onden)o(t)i
2297+Fm(lua_Object)p Fo(,)d(and)i(lea)o(v)o(e)f(the)h(result)g(on)-42
2298+947 y(the)h(top)g(of)f(the)h(Lua)g(stac)o(k,)f(where)h(it)f(can)h(b)q
2299+(e)h(assigned)e(to)g(a)h(Lua)g(v)m(ariable,)f(passed)h(as)g(paramen)o
2300+(ter)e(to)h(a)-42 1003 y(Lua)f(function,)f(etc)g(\(see)g(b)q(elo)o
2301+(w\).)29 1060 y(User)10 b(data)g(can)h(ha)o(v)o(e)e(di\013eren)o(t)h
2302+(tags,)g(whose)g(seman)o(tics)f(are)h(de\014ned)h(b)o(y)g(the)f(host)g
2303+(program.)16 b(An)o(y)10 b(p)q(ositiv)o(e)-42 1116 y(in)o(teger)15
2304+b(can)h(b)q(e)h(used)f(to)g(tag)e(a)i(user)g(data.)21
2305+b(When)16 b(a)g(user)g(data)f(is)g(retriev)o(ed,)g(the)h(function)g
2306+Fm(lua_type)e Fo(can)-42 1173 y(b)q(e)i(used)g(to)f(get)f(its)h(tag.)29
2307+1229 y(T)l(o)g(complete)f(the)h(set,)g(the)g(v)m(alue)g
2308+Fl(nil)g Fo(or)f(a)h Fm(lua_Object)f Fo(can)h(also)g(b)q(e)g(pushed)i
2309+(on)o(to)d(the)h(stac)o(k,)f(with:)-42 1317 y Fm(void)262
2310+b(lua_pushnil)333 b(\(void\);)-42 1374 y(void)262 b(lua_pushobject)f
2311+(\(lua_Object)22 b(object\);)-42 1494 y Fe(5.3)56 b(Manipulating)22
2312+b(Lua)c(Ob)s(jects)-42 1580 y Fo(T)l(o)d(read)h(the)f(v)m(alue)g(of)g
2313+(an)o(y)g(global)f(Lua)h(v)m(ariable,)f(one)i(can)f(use)h(the)f
2314+(function:)-42 1668 y Fm(lua_Object)118 b(lua_getglobal)285
2315+b(\(char)23 b(*varname\);)-42 1756 y Fo(As)16 b(in)f(Lua,)g(if)g(the)g
2316+(v)m(alue)g(of)g(the)g(global)f(is)h Fl(nil)p Fo(,)f(the)h
2317+Fm("getglobal")f Fo(fallbac)o(k)g(is)g(called.)29 1813
2318+y(T)l(o)h(store)f(a)h(v)m(alue)h(previously)e(pushed)j(on)o(to)d(the)h
2319+(stac)o(k)g(in)g(a)f(global)g(v)m(ariable,)h(there)g(is)g(the)g
2320+(function:)-42 1901 y Fm(void)262 b(lua_storeglobal)237
2321+b(\(char)23 b(*varname\);)29 1989 y Fo(T)l(ables)15 b(can)g(also)f(b)q
2322+(e)i(manipulated)e(via)g(the)i(API.)f(The)g(function)-42
2323+2077 y Fm(lua_Object)118 b(lua_getsubscript)213 b(\(void\);)-42
2324+2165 y Fo(exp)q(ects)16 b(on)f(the)h(stac)o(k)e(a)h(table)f(and)i(an)f
2325+(index,)g(and)g(returns)g(the)g(con)o(ten)o(ts)g(of)g(the)g(table)f(at)
2326+h(that)f(index.)20 b(As)-42 2221 y(in)15 b(Lua,)g(if)g(the)g(\014rst)f
2327+(ob)s(ject)h(is)f(not)h(a)f(table,)g(or)h(the)g(index)g(is)g(not)f
2328+(presen)o(t)h(in)g(the)g(table,)f(the)h(corresp)q(onden)o(t)-42
2329+2278 y(fallbac)o(k)f(is)h(called.)29 2334 y(T)l(o)h(store)g(a)g(v)m
2330+(alue)h(in)f(an)h(index,)g(the)f(program)e(m)o(ust)h(push)j(on)o(to)d
2331+(the)i(stac)o(k)e(the)i(table,)f(the)h(index,)f(and)-42
2332+2391 y(the)g(v)m(alue,)f(and)g(then)h(call)e(the)h(function:)-42
2333+2479 y Fm(void)24 b(lua_storesubscript)d(\(void\);)-42
2334+2567 y Fo(Again,)15 b(the)g(corresp)q(onden)o(t)g(fallbac)o(k)f(is)h
2335+(called)g(if)f(needed.)29 2623 y(Finally)l(,)g(the)h(function)911
2336+2748 y(13)p eop
2337+%%Page: 14 14
2338+14 13 bop -42 199 a Fm(lua_Object)118 b(lua_createtable)237
2339+b(\(void\);)-42 293 y Fo(creates)15 b(a)g(new)h(table.)29
2340+349 y Fn(Ple)n(ase)22 b(Notic)n(e:)36 b Fo(Most)22 b(functions)g(from)e
2341+(the)j(Lua)f(library)f(receiv)o(e)i(parameters)d(through)i(the)h(stac)o
2342+(k.)-42 406 y(Because)c(other)e(functions)g(also)g(use)h(the)g(stac)o
2343+(k,)f(it)g(is)g(imp)q(ortan)o(t)e(that)i(these)h(parameters)e(b)q(e)i
2344+(pushed)h(just)-42 462 y(b)q(efore)d(the)f(corresp)q(onden)o(t)g(call,)
2345+f(without)g(in)o(termediate)e(calls)i(to)h(the)g(Lua)g(library)l(.)k(F)
2346+l(or)14 b(instance,)h(supp)q(ose)-42 519 y(the)h(user)f(w)o(an)o(ts)f
2347+(the)h(v)m(alue)h(of)f Fm(a[i])p Fo(.)k(A)c(simplistic)e(solution)h(w)o
2348+(ould)g(b)q(e:)6 613 y Fm(/*)24 b(Warning:)f(WRONG)g(CODE)g(*/)6
2349+669 y(lua_Object)g(result;)6 725 y(lua_pushobject\(lua_getglobal)o
2350+(\("a"\)\);)44 b(/*)24 b(push)f(table)g(*/)6 782 y
2351+(lua_pushobject\(lua_getglobal)o(\("i"\)\);)44 b(/*)24
2352+b(push)f(index)g(*/)6 838 y(result)g(=)h(lua_getsubscript\(\);)-42
2353+932 y Fo(Ho)o(w)o(ev)o(er,)c(the)f(call)g Fm(lua_getglobal\("i"\))e
2354+Fo(mo)q(di\014es)i(the)h(stac)o(k,)f(and)h(in)o(v)m(alidates)e(the)i
2355+(previous)f(pushed)-42 989 y(v)m(alue.)i(A)15 b(correct)g(solution)f
2356+(could)h(b)q(e:)6 1082 y Fm(lua_Object)23 b(result;)6
2357+1139 y(lua_Object)g(index)g(=)h(lua_getglobal\("i"\);)6
2358+1195 y(lua_pushobject\(lua_getglobal)o(\("a"\)\);)44
2359+b(/*)24 b(push)f(table)g(*/)6 1252 y(lua_pushobject\(index\);)355
2360+b(/*)24 b(push)f(index)g(*/)6 1308 y(result)g(=)h
2361+(lua_getsubscript\(\);)-42 1430 y Fe(5.4)56 b(Calling)21
2362+b(Lua)e(F)-5 b(unctions)-42 1516 y Fo(F)l(unctions)19
2363+b(de\014ned)g(in)g(Lua)f(b)o(y)h(a)f(c)o(h)o(unk)g(executed)i(with)e
2364+Fm(dofile)f Fo(or)h Fm(dostring)f Fo(can)i(b)q(e)g(called)f(from)e(the)
2365+-42 1572 y(host)h(program.)23 b(This)16 b(is)g(done)h(using)g(the)g
2366+(follo)o(wing)e(proto)q(col:)22 b(\014rst,)16 b(the)h(argumen)o(ts)e
2367+(to)h(the)h(function)g(are)-42 1629 y(pushed)f(on)o(to)d(the)i(Lua)g
2368+(stac)o(k)e(\(see)i(Section)f(5.2\),)f(in)h(direct)g(order,)g(i.e.,)g
2369+(the)g(\014rst)g(argumen)o(t)f(is)h(pushed)h(\014rst.)-42
2370+1685 y(Again,)g(it)f(is)h(imp)q(ortan)o(t)e(to)h(emphasize)h(that,)f
2371+(during)h(this)f(phase,)i(no)f(other)g(Lua)g(function)g(can)g(b)q(e)h
2372+(called.)29 1741 y(Then,)f(the)h(function)f(is)f(called)h(using)-42
2373+1835 y Fm(int)286 b(lua_call)405 b(\(char)23 b(*functionname\);)-42
2374+1929 y Fo(or)-42 2023 y Fm(int)286 b(lua_callfunction)213
2375+b(\(lua_Object)22 b(function\);)-42 2116 y Fo(Both)16
2376+b(functions)g(return)f(an)h(error)f(co)q(de:)22 b(0,)15
2377+b(in)h(case)g(of)f(success;)i(non)f(zero,)f(in)h(case)g(of)f(errors.)21
2378+b(Finally)l(,)14 b(the)-42 2173 y(returned)i(v)m(alues)f(\(a)g(Lua)h
2379+(function)f(ma)o(y)e(return)i(man)o(y)f(v)m(alues\))h(can)g(b)q(e)h
2380+(retriev)o(ed)f(with)f(the)i(macro)-42 2267 y Fm(lua_Object)118
2381+b(lua_getresult)309 b(\(int)23 b(number\);)-42 2360 y
2382+Fo(where)18 b Fm(number)d Fo(is)i(the)g(order)f(of)h(the)g(result,)f
2383+(starting)f(with)h(1.)25 b(When)17 b(called)f(with)g(a)h(n)o(um)o(b)q
2384+(er)f(larger)g(than)-42 2417 y(the)g(actual)e(n)o(um)o(b)q(er)h(of)f
2385+(results,)h(this)f(function)h(returns)g Fm(LUA_NOOBJECT)p
2386+Fo(.)29 2473 y(Tw)o(o)j(sp)q(ecial)g(Lua)g(functions)h(ha)o(v)o(e)e
2387+(exclusiv)o(e)i(in)o(terfaces:)25 b Fm(error)18 b Fo(and)g
2388+Fm(setfallback)p Fo(.)28 b(A)18 b(C)h(function)-42 2530
2389+y(can)d(generate)f(a)g(Lua)g(error)g(calling)f(the)h(function)-42
2390+2623 y Fm(void)24 b(lua_error)e(\(char)i(*message\);)911
2391+2748 y Fo(14)p eop
2392+%%Page: 15 15
2393+15 14 bop -42 199 a Fo(This)18 b(function)g(nev)o(er)g(returns.)28
2394+b(If)18 b(the)g(C)f(function)h(has)g(b)q(een)h(called)f(from)e(Lua,)i
2395+(the)g(corresp)q(onding)g(Lua)-42 256 y(execution)f(terminates,)d(as)i
2396+(if)g(an)g(error)f(had)i(o)q(ccurred)g(inside)f(Lua)h(co)q(de.)23
2397+b(Otherwise,)16 b(the)h(whole)f(program)-42 312 y(terminates.)29
2398+369 y(F)l(allbac)o(ks)e(can)h(b)q(e)h(c)o(hanged)g(with:)-42
2399+454 y Fm(lua_Object)23 b(lua_setfallback)f(\(char)h(*name,)g
2400+(lua_CFunction)f(fallback\);)-42 540 y Fo(The)12 b(\014rst)f(parameter)
2401+f(is)g(the)i(fallbac)o(k)e(name,)h(and)g(the)h(second)f(a)h(CF)l
2402+(unction)f(to)f(b)q(e)i(used)g(as)f(the)h(new)f(fallbac)o(k.)-42
2403+596 y(This)k(function)f(returns)h(a)f Fm(lua_Object)p
2404+Fo(,)g(whic)o(h)g(is)g(the)h(old)g(fallbac)o(k)e(v)m(alue,)i(or)f
2405+Fl(nil)g Fo(on)g(fail)g(\(in)o(v)m(alid)g(fallbac)o(k)-42
2406+653 y(name\).)19 b(This)c(old)g(v)m(alue)g(can)g(b)q(e)h(used)g(for)f
2407+(c)o(haining)f(fallbac)o(ks.)29 709 y(An)i(example)e(of)g(C)h(co)q(de)h
2408+(calling)e(a)h(Lua)g(function)h(is)e(sho)o(wn)h(in)g(Section)g(8.10.)
2409+-42 829 y Fe(5.5)56 b(C)19 b(F)-5 b(unctions)-42 915
2410+y Fo(T)l(o)15 b(register)g(a)f(C)h(function)g(to)g(Lua,)g(there)g(is)g
2411+(the)g(follo)o(wing)e(macro:)-42 1001 y Fm(#define)23
2412+b(lua_register\(n,f\))165 b(\(lua_pushcfunction\(f\),)21
2413+b(lua_storeglobal\(n\)\))-42 1057 y(/*)j(char)f(*n;)215
2414+b(*/)-42 1114 y(/*)24 b(lua_CFunction)e(f;)i(*/)-42 1199
2415+y Fo(whic)o(h)15 b(receiv)o(es)g(the)f(name)g(the)h(function)f(will)g
2416+(ha)o(v)o(e)g(in)g(Lua,)h(and)g(a)f(p)q(oin)o(ter)g(to)g(the)h
2417+(function.)20 b(This)14 b(p)q(oin)o(ter)-42 1256 y(m)o(ust)g(ha)o(v)o
2418+(e)h(t)o(yp)q(e)g Fm(lua_CFunction)p Fo(,)e(whic)o(h)i(is)g(de\014ned)i
2419+(as)-42 1341 y Fm(typedef)23 b(void)h(\(*lua_CFunction\))d(\(void\);)
2420+-42 1427 y Fo(that)15 b(is,)f(a)h(p)q(oin)o(ter)g(to)f(a)h(function)g
2421+(with)g(no)g(parameters)e(and)j(no)f(results.)29 1483
2422+y(In)g(order)e(to)h(comm)o(unicate)d(prop)q(erly)j(with)f(Lua,)h(a)f(C)
2423+h(function)g(m)o(ust)e(follo)o(w)g(a)i(proto)q(col,)f(whic)o(h)g
2424+(de\014nes)-42 1540 y(the)j(w)o(a)o(y)e(parameters)f(and)j(results)e
2425+(are)h(passed.)29 1596 y(T)l(o)g(access)g(its)g(argumen)o(ts,)e(a)i(C)g
2426+(function)g(calls:)-42 1682 y Fm(lua_Object)118 b(lua_getparam)309
2427+b(\(int)23 b(number\);)-42 1767 y Fo(where)16 b Fm(number)e
2428+Fo(starts)g(with)h(1)g(to)f(get)h(the)h(\014rst)e(argumen)o(t.)19
2429+b(When)c(called)g(with)g(a)g(n)o(um)o(b)q(er)f(larger)g(than)h(the)-42
2430+1824 y(actual)d(n)o(um)o(b)q(er)g(of)g(argumen)o(ts,)f(this)g(function)
2431+i(returns)f Fm(LUA_NOOBJECT)p Fo(.)e(In)j(this)f(w)o(a)o(y)l(,)g(it)g
2432+(is)f(p)q(ossible)i(to)e(write)-42 1880 y(functions)k(that)g(w)o(ork)f
2433+(with)h(a)g(v)m(ariable)f(n)o(um)o(b)q(er)h(of)f(parameters.)29
2434+1937 y(T)l(o)g(return)g(v)m(alues,)g(a)g(C)g(function)g(just)f(pushes)i
2435+(them)e(on)o(to)g(the)i(stac)o(k,)e(in)h(direct)g(order;)f(see)i
2436+(Section)f(5.2.)-42 1993 y(Lik)o(e)i(a)e(Lua)i(function,)f(a)g(C)g
2437+(function)g(called)f(b)o(y)h(Lua)h(can)f(also)g(return)g(man)o(y)e
2438+(results.)29 2050 y(Section)i(8.9)f(presen)o(ts)i(an)f(example)f(of)g
2439+(a)h(CF)l(unction.)-42 2170 y Fe(5.6)56 b(References)17
2440+b(to)i(Lua)f(Ob)s(jects)-42 2256 y Fo(As)h(already)g(noted,)g
2441+Fm(lua_Object)p Fo(s)f(are)h(v)o(olatile.)29 b(If)19
2442+b(the)g(C)g(co)q(de)h(needs)g(to)e(k)o(eep)h(a)g Fm(lua_Object)f
2443+Fo(outside)-42 2312 y(blo)q(c)o(k)f(b)q(oundaries,)g(it)e(m)o(ust)g
2444+(create)i(a)f Fn(r)n(efer)n(enc)n(e)f Fo(to)h(the)g(ob)s(ject.)23
2445+b(The)17 b(routines)f(to)g(manipulate)f(references)-42
2446+2369 y(are)g(the)h(follo)o(wing:)-42 2454 y Fm(int)286
2447+b(lua_ref)23 b(\(int)h(lock\);)-42 2511 y(lua_Object)118
2448+b(lua_getref)47 b(\(int)23 b(ref\);)-42 2567 y(void)262
2449+b(lua_pushref)23 b(\(int)g(ref\);)-42 2623 y(void)262
2450+b(lua_unref)23 b(\(int)g(ref\);)911 2748 y Fo(15)p eop
2451+%%Page: 16 16
2452+16 15 bop -42 199 a Fo(The)23 b(function)e Fm(lua_ref)g
2453+Fo(creates)g(a)h(reference)g(to)g(the)f(ob)s(ject)h(whic)o(h)f(is)h(on)
2454+f(the)h(top)g(of)f(the)h(stac)o(k,)g(and)-42 256 y(returns)f(this)f
2455+(reference.)36 b(If)21 b Fm(lock)f Fo(is)g(true,)h(the)g(ob)s(ject)f
2456+(is)g Fn(lo)n(cke)n(d)p Fo(:)30 b(that)19 b(means)h(the)h(ob)s(ject)e
2457+(will)h(not)g(b)q(e)-42 312 y(garbage)g(collected.)35
2458+b(Notice)19 b(that)h(an)g(unlo)q(c)o(k)o(ed)g(reference)h(ma)o(y)e(b)q
2459+(e)i(garbage)e(collected.)35 b(Whenev)o(er)20 b(the)-42
2460+369 y(referenced)15 b(ob)s(ject)e(is)f(needed,)j(a)e(call)f(to)h
2461+Fm(lua_getref)f Fo(returns)h(a)g(handle)h(to)f(it,)f(while)h
2462+Fm(lua_pushref)f Fo(pushes)-42 425 y(the)k(ob)s(ject)g(on)g(the)g(stac)
2463+o(k.)21 b(If)16 b(the)g(ob)s(ject)f(has)h(b)q(een)h(collected,)e
2464+Fm(lua_getref)g Fo(returns)g Fm(LUA_NOOBJECT)p Fo(,)f(and)-42
2465+482 y Fm(lua_pushobject)g Fo(issues)h(an)g(error.)29
2466+538 y(When)h(a)f(reference)g(is)g(no)g(longer)g(needed,)h(it)e(can)i(b)
2467+q(e)g(freed)f(with)g(a)f(call)h(to)f Fm(lua_unref)p Fo(.)-42
2468+681 y Fp(6)67 b(Prede\014ned)24 b(F)-6 b(unctions)24
2469+b(and)f(Libraries)-42 783 y Fo(The)17 b(set)g(of)f(prede\014ned)i
2470+(functions)e(in)h(Lua)f(is)h(small)d(but)j(p)q(o)o(w)o(erful.)23
2471+b(Most)15 b(of)h(them)g(pro)o(vide)g(features)g(that)-42
2472+839 y(allo)o(ws)d(some)h(degree)g(of)h(re\015exivit)o(y)e(in)i(the)f
2473+(language.)19 b(Some)14 b(of)g(these)h(features)f(cannot)g(b)q(e)i(sim)
2474+o(ulated)c(with)-42 896 y(the)21 b(rest)f(of)g(the)h(Language)g(nor)f
2475+(with)g(the)h(standard)f(Lua)h(API.)f(Others)h(are)f(just)h(helpful)f
2476+(in)o(terfaces)g(to)-42 952 y(common)13 b(API)j(functions.)29
2477+1008 y(The)e(libraries,)e(on)i(the)f(other)g(hand,)h(pro)o(vide)g
2478+(useful)f(routines)g(that)g(are)h(implemen)o(ted)d(directly)i(through)
2479+-42 1065 y(the)g(standard)f(API.)h(Therefore,)f(they)h(are)f(not)g
2480+(necessary)h(to)f(the)g(language,)g(and)h(are)f(pro)o(vided)h(as)f
2481+(separated)-42 1121 y(C)j(mo)q(dules.)k(Curren)o(tly)c(there)g(are)g
2482+(three)g(standard)g(libraries:)27 1215 y Fj(\017)22 b
2483+Fo(string)14 b(manipulation;)27 1309 y Fj(\017)22 b Fo(mathematical)11
2484+b(functions)k(\(sin,)g(cos,)f(etc\);)27 1403 y Fj(\017)22
2485+b Fo(input)15 b(and)h(output)f(\(plus)g(some)e(system)h(facilities\).)
2486+-42 1497 y(In)j(order)f(to)g(ha)o(v)o(e)g(access)g(to)g(these)g
2487+(libraries,)f(the)h(host)g(program)e(m)o(ust)h(call)g(the)h(functions)g
2488+Fm(strlib_open)p Fo(,)-42 1553 y Fm(mathlib_open)p Fo(,)e(and)h
2489+Fm(iolib_open)p Fo(,)e(declared)j(in)f Fm(lualib.h)p
2490+Fo(.)-42 1675 y Fe(6.1)56 b(Prede\014ned)18 b(F)-5 b(unctions)-42
2491+1761 y Fm(dofile)24 b(\(filename\))-42 1846 y Fo(This)18
2492+b(function)g(receiv)o(es)g(a)f(\014le)h(name,)f(op)q(ens)i(it)e(and)h
2493+(executes)h(its)e(con)o(ten)o(ts)g(as)h(a)f(Lua)i(c)o(h)o(unk,)f(or)g
2494+(as)f(pre-)-42 1903 y(compiled)e(c)o(h)o(unks.)20 b(When)c(called)f
2495+(without)f(argumen)o(ts,)g(it)g(executes)i(the)g(con)o(ten)o(ts)e(of)h
2496+(the)h(standard)f(input.)-42 1959 y(It)i(returns)g(1)f(if)g(there)h
2497+(are)f(no)h(errors,)f Fl(nil)g Fo(otherwise.)23 b(It)17
2498+b(issues)f(an)h(error)f(when)h(called)f(with)g(a)h(non)f(string)-42
2499+2016 y(argumen)o(t.)-42 2136 y Fm(dostring)23 b(\(string\))-42
2500+2222 y Fo(This)e(function)h(executes)g(a)f(giv)o(en)g(string)f(as)h(a)g
2501+(Lua)h(c)o(h)o(unk.)38 b(It)22 b(returns)f(1)g(if)g(there)g(are)g(no)h
2502+(errors,)f Fl(nil)-42 2278 y Fo(otherwise.)-42 2398 y
2503+Fm(next)j(\(table,)f(index\))-42 2484 y Fo(This)18 b(function)f(allo)o
2504+(ws)f(a)i(program)d(to)i(tra)o(v)o(erse)g(all)g(\014elds)h(of)f(a)g
2505+(table.)27 b(Its)18 b(\014rst)f(argumen)o(t)f(is)i(a)f(table)g(and)-42
2506+2540 y(its)e(second)i(argumen)o(t)c(is)j(an)f(index)h(in)g(this)f
2507+(table.)21 b(It)15 b(returns)h(the)g(next)f(index)h(of)g(the)f(table)h
2508+(and)f(the)h(v)m(alue)-42 2597 y(asso)q(ciated)g(with)f(the)h(index.)23
2509+b(When)17 b(called)e(with)h Fl(nil)f Fo(as)g(its)h(second)g(argumen)o
2510+(t,)e(the)j(function)e(returns)h(the)911 2748 y(16)p
2511+eop
2512+%%Page: 17 17
2513+17 16 bop -42 199 a Fo(\014rst)16 b(index)g(of)g(the)g(table)g(\(and)f
2514+(its)h(asso)q(ciated)f(v)m(alue\).)22 b(When)17 b(called)e(with)h(the)g
2515+(last)f(index,)h(or)f(with)h Fl(nil)f Fo(in)-42 256 y(an)h(empt)o(y)e
2516+(table,)g(it)g(returns)h Fl(nil)p Fo(.)29 312 y(In)i(Lua)f(there)g(is)g
2517+(no)g(declaration)f(of)h(\014elds;)g(seman)o(tically)l(,)d(there)j(is)g
2518+(no)g(di\013erence)g(b)q(et)o(w)o(een)h(a)e(\014eld)i(not)-42
2519+369 y(presen)o(t)g(in)f(a)g(table)f(or)h(a)g(\014eld)h(with)e(v)m(alue)
2520+i Fl(nil)p Fo(.)22 b(Therefore,)16 b(the)g(function)g(only)g(considers)
2521+g(\014elds)h(with)e(non)-42 425 y(nil)g(v)m(alues.)20
2522+b(The)c(order)f(the)g(indices)g(are)g(en)o(umerated)f(is)h(not)g(sp)q
2523+(eci\014ed,)h Fn(even)f(for)i(numeric)f(indic)n(es)p
2524+Fo(.)29 482 y(See)g(Section)f(8.2)f(for)h(an)g(example)f(of)h(the)g
2525+(use)h(of)e(this)h(function.)-42 602 y Fm(nextvar)23
2526+b(\(name\))-42 687 y Fo(This)18 b(function)g(is)g(similar)d(to)i(the)i
2527+(function)f Fm(next)p Fo(,)f(but)i(it)e(iterates)g(o)o(v)o(er)g(the)h
2528+(global)f(v)m(ariables.)28 b(Its)18 b(single)-42 744
2529+y(argumen)o(t)c(is)h(the)h(name)e(of)h(a)g(global)f(v)m(ariable,)g(or)h
2530+Fl(nil)g Fo(to)g(get)g(a)g(\014rst)g(name.)k(Similarly)13
2531+b(to)h Fm(next)p Fo(,)h(it)g(returns)-42 800 y(the)j(name)e(of)g
2532+(another)h(v)m(ariable)f(and)h(its)f(v)m(alue,)i(or)e
2533+Fl(nil)g Fo(if)g(there)h(are)g(no)g(more)e(v)m(ariables.)25
2534+b(See)18 b(Section)e(8.2)-42 857 y(for)f(an)g(example)f(of)h(the)g(use)
2535+h(of)f(this)f(function.)-42 977 y Fm(tostring)23 b(\(e\))-42
2536+1063 y Fo(This)15 b(function)g(receiv)o(es)g(an)g(argumen)o(t)f(of)h
2537+(an)o(y)g(t)o(yp)q(e)g(and)g(con)o(v)o(erts)g(it)f(to)h(a)f(string)h
2538+(in)g(a)g(reasonable)f(format.)-42 1183 y Fm(print)24
2539+b(\(e1,)f(e2,)g(...\))-42 1269 y Fo(This)18 b(function)g(receiv)o(es)g
2540+(an)o(y)g(n)o(um)o(b)q(er)g(of)f(argumen)o(ts,)g(and)h(prin)o(ts)g
2541+(their)f(v)m(alues)i(in)f(a)g(reasonable)f(format.)-42
2542+1325 y(Eac)o(h)i(v)m(alue)g(is)f(prin)o(ted)h(in)f(a)h(new)g(line.)30
2543+b(This)18 b(function)h(is)f(not)g(in)o(tended)h(for)f(formatted)f
2544+(output,)i(but)g(as)-42 1381 y(a)h(quic)o(k)f(w)o(a)o(y)g(to)g(sho)o(w)
2545+g(a)g(v)m(alue,)i(for)e(instance)g(for)g(error)g(messages)f(or)h
2546+(debugging.)34 b(See)20 b(Section)f(6.4)g(for)-42 1438
2547+y(functions)c(for)g(formatted)e(output.)-42 1558 y Fm(tonumber)23
2548+b(\(e\))-42 1644 y Fo(This)13 b(function)f(receiv)o(es)g(one)h(argumen)
2549+o(t,)e(and)h(tries)g(to)g(con)o(v)o(ert)f(it)h(to)g(a)g(n)o(um)o(b)q
2550+(er.)18 b(If)13 b(the)g(argumen)o(t)d(is)i(already)-42
2551+1700 y(a)j(n)o(um)o(b)q(er)g(or)g(a)g(string)f(con)o(v)o(ertible)g(to)h
2552+(a)g(n)o(um)o(b)q(er)f(\(see)h(Section)h(4.2\),)d(it)i(returns)g(that)f
2553+(n)o(um)o(b)q(er;)h(otherwise,)-42 1757 y(it)g(returns)g
2554+Fl(nil)p Fo(.)-42 1877 y Fm(type)24 b(\(v\))-42 1963
2555+y Fo(This)13 b(function)h(allo)o(ws)d(Lua)j(to)e(test)h(the)g(t)o(yp)q
2556+(e)h(of)f(a)g(v)m(alue.)19 b(It)13 b(receiv)o(es)h(one)f(argumen)o(t,)f
2557+(and)h(returns)g(its)g(t)o(yp)q(e,)-42 2019 y(co)q(ded)21
2558+b(as)e(a)g(string.)31 b(The)19 b(p)q(ossible)g(results)g(of)g(this)g
2559+(function)g(are)g Fm("nil")g Fo(\(a)f(string,)h(not)g(the)h(v)m(alue)f
2560+Fl(nil)p Fo(\),)-42 2075 y Fm("number")p Fo(,)g Fm("string")p
2561+Fo(,)g Fm("table")p Fo(,)h Fm("function")e Fo(\(returned)h(b)q(oth)h
2562+(for)f(C)g(functions)g(and)h(Lua)f(functions\),)-42 2132
2563+y(and)d Fm("userdata")p Fo(.)29 2188 y(Besides)f(this)f(string,)f(the)i
2564+(function)f(returns)h(a)f(second)h(result,)f(whic)o(h)g(is)g(the)h
2565+Fn(tag)g Fo(of)f(the)g(v)m(alue.)20 b(This)14 b(tag)-42
2566+2245 y(can)g(b)q(e)h(used)f(to)f(distinguish)g(b)q(et)o(w)o(een)g(user)
2567+h(data)f(with)g(di\013eren)o(t)g(tags,)g(and)h(b)q(et)o(w)o(een)f(C)h
2568+(functions)f(and)h(Lua)-42 2301 y(functions.)-42 2421
2569+y Fm(assert)24 b(\(v\))-42 2507 y Fo(This)15 b(function)g(issues)g(an)g
2570+Fn(\\assertion)h(faile)n(d!")k Fo(error)15 b(when)h(its)e(argumen)o(t)f
2571+(is)i Fl(nil)p Fo(.)911 2748 y(17)p eop
2572+%%Page: 18 18
2573+18 17 bop -42 199 a Fm(error)24 b(\(message\))-42 285
2574+y Fo(This)e(function)f(issues)g(an)h(error)f(message)f(and)h
2575+(terminates)f(the)h(last)g(called)g(function)g(from)f(the)i(library)-42
2576+342 y(\()p Fm(lua_dofile)p Fo(,)14 b Fm(lua_dostring)p
2577+Fo(,)f(.)7 b(.)g(.)g(\).)20 b(It)15 b(nev)o(er)g(returns.)-42
2578+462 y Fm(setglobal)23 b(\(name,)g(value\))-42 547 y Fo(This)18
2579+b(function)h(assigns)e(the)i(giv)o(en)f(v)m(alue)g(to)g(a)g(global)f(v)
2580+m(ariable.)29 b(The)19 b(string)e Fm(name)h Fo(do)q(es)h(not)f(need)h
2581+(to)f(b)q(e)-42 604 y(a)f(syn)o(tactically)d(v)m(alid)i(v)m(ariable)g
2582+(name.)22 b(Therefore,)17 b(this)f(function)g(can)g(set)h(global)e(v)m
2583+(ariables)g(with)h(strange)-42 660 y(names)f(lik)o(e)f
2584+Fm(m)24 b(v)f(1)15 b Fo(or)g Fm(34)p Fo(.)20 b(It)15
2585+b(returns)g(the)g(v)m(alue)h(of)e(its)h(second)h(argumen)o(t.)-42
2586+780 y Fm(getglobal)23 b(\(name\))-42 866 y Fo(This)e(function)g
2587+(retriev)o(es)g(the)g(v)m(alue)h(of)f(a)g(global)f(v)m(ariable.)37
2588+b(The)22 b(string)e Fm(name)h Fo(do)q(es)g(not)g(need)h(to)f(b)q(e)h(a)
2589+-42 923 y(syn)o(tactically)14 b(v)m(alid)g(v)m(ariable)h(name.)-42
2590+1043 y Fm(setfallback)23 b(\(fallbackname,)f(newfallback\))-42
2591+1128 y Fo(This)13 b(function)f(sets)g(a)h(new)f(fallbac)o(k)g(function)
2592+g(to)g(the)h(giv)o(en)f(fallbac)o(k.)18 b(It)12 b(returns)h(the)g(old)f
2593+(fallbac)o(k)f(function.)-42 1250 y Fe(6.2)56 b(String)19
2594+b(Manipulation)-42 1336 y Fo(This)j(library)e(pro)o(vides)i(generic)f
2595+(functions)h(for)f(string)g(manipulation,)f(suc)o(h)i(as)g(\014nding)g
2596+(and)g(extracting)-42 1392 y(substrings.)29 b(When)19
2597+b(indexing)f(a)g(string,)f(the)i(\014rst)f(c)o(haracter)f(has)h(p)q
2598+(osition)g(1.)29 b(See)19 b(Section)f(8.3)f(for)h(some)-42
2599+1449 y(examples)c(on)i(string)e(manipulation)f(in)i(Lua.)-42
2600+1569 y Fm(strfind)23 b(\(str,)h(substr,)e([init,)i([end]]\))-42
2601+1655 y Fo(Receiv)o(es)c(t)o(w)o(o)e(string)h(argumen)o(ts,)f(and)h
2602+(returns)g(a)g(n)o(um)o(b)q(er.)32 b(This)19 b(n)o(um)o(b)q(er)f
2603+(indicates)h(the)g(\014rst)g(p)q(osition)-42 1711 y(where)13
2604+b(the)f(second)h(argumen)o(t)e(app)q(ears)h(in)g(the)g(\014rst)g
2605+(argumen)o(t.)17 b(If)c(the)f(second)h(argumen)o(t)d(is)i(not)g(a)g
2606+(substring)-42 1768 y(of)j(the)g(\014rst)g(one,)f(then)i
2607+Fm(strfind)e Fo(returns)h Fl(nil)p Fo(.)j(A)e(third)e(optional)g(n)o
2608+(umerical)f(argumen)o(t)g(sp)q(eci\014es)j(where)f(to)-42
2609+1824 y(start)f(the)i(searc)o(h.)j(Another)d(optional)d(n)o(umerical)h
2610+(argumen)o(t)f(sp)q(eci\014es)j(where)g(to)e(stop)h(it.)-42
2611+1944 y Fm(strlen)24 b(\(s\))-42 2030 y Fo(Receiv)o(es)16
2612+b(a)f(string)f(and)i(returns)f(its)f(length.)-42 2150
2613+y Fm(strsub)24 b(\(s,)f(i,)h([j]\))-42 2236 y Fo(Returns)17
2614+b(another)f(string,)f(whic)o(h)h(is)g(a)g(substring)g(of)g
2615+Fm(s)p Fo(,)g(starting)e(at)i Fm(i)g Fo(and)g(runing)g(un)o(til)g
2616+Fm(j)p Fo(.)23 b(If)16 b Fm(j)g Fo(is)g(absen)o(t,)-42
2617+2292 y(it)f(is)g(assumed)g(to)f(b)q(e)i(equal)g(to)e(the)i(length)f(of)
2618+g Fm(s)p Fo(.)20 b(P)o(articularly)l(,)13 b(the)j(call)e
2619+Fm(strsub\(s,1,j\))g Fo(returns)h(a)g(pre\014x)-42 2349
2620+y(of)g Fm(s)g Fo(with)g(length)g Fm(j)p Fo(,)f(while)h(the)g(call)g
2621+Fm(strsub\(s,i\))e Fo(returns)i(a)g(su\016x)g(of)g Fm(s)p
2622+Fo(,)g(starting)e(at)i Fm(i)p Fo(.)-42 2469 y Fm(strlower)23
2623+b(\(s\))-42 2555 y Fo(Receiv)o(es)14 b(a)e(string)g(and)h(returns)f(a)h
2624+(cop)o(y)f(of)h(that)f(string)f(with)h(all)g(upp)q(er)i(case)f(letters)
2625+e(c)o(hanged)i(to)f(lo)o(w)o(er)g(case.)-42 2611 y(All)j(other)g(c)o
2626+(haracters)f(are)h(left)g(unc)o(hanged.)911 2748 y(18)p
2627+eop
2628+%%Page: 19 19
2629+19 18 bop -42 199 a Fm(strupper)23 b(\(s\))-42 285 y
2630+Fo(Receiv)o(es)14 b(a)e(string)g(and)h(returns)f(a)h(cop)o(y)f(of)h
2631+(that)f(string)f(with)h(all)g(lo)o(w)o(er)f(case)i(letters)f(c)o
2632+(hanged)h(to)f(upp)q(er)i(case.)-42 342 y(All)h(other)g(c)o(haracters)f
2633+(are)h(left)g(unc)o(hanged.)-42 462 y Fm(ascii)24 b(\(s,)f([i]\))-42
2634+547 y Fo(Returns)16 b(the)f(ascii)g(co)q(de)h(of)e(the)i(c)o(haracter)e
2635+Fm(s[i])p Fo(.)19 b(If)d Fm(i)f Fo(is)g(absen)o(t,)f(it)h(is)f(assumed)
2636+h(to)f(b)q(e)i(1.)-42 667 y Fm(format)24 b(\(formatstring,)d(e1,)j(e2,)
2637+f(...\))-42 753 y Fo(This)14 b(function)f(returns)g(a)h(formated)d(v)o
2638+(ersion)i(of)g(its)g(v)m(ariable)g(n)o(um)o(b)q(er)f(of)i(argumen)o(ts)
2639+d(follo)o(wing)g(the)j(descrip-)-42 810 y(tion)h(giv)o(en)f(in)h(its)f
2640+(\014rst)g(argumen)o(t)f(\(whic)o(h)h(m)o(ust)g(b)q(e)h(a)g(string\).)j
2641+(The)d(format)e(string)g(follo)o(ws)g(the)i(same)f(rules)-42
2642+866 y(as)g(the)h Fm(printf)e Fo(family)f(of)i(standard)g(C)g
2643+(functions.)19 b(The)c(only)f(di\013erencies)g(are)g(that)f(the)i
2644+(options/mo)q(di\014ers)-42 923 y Fm(*)p Fo(,)f Fm(l)p
2645+Fo(,)g Fm(L)p Fo(,)f Fm(n)p Fo(,)h Fm(p)p Fo(,)g(and)g
2646+Fm(h)g Fo(are)f(not)h(supp)q(orted,)g(and)g(there)g(is)g(an)g(extra)f
2647+(option,)g Fm(q)p Fo(.)19 b(This)14 b(option)f(formats)f(a)h(string)-42
2648+979 y(in)19 b(a)f(form)f(suitable)h(to)g(b)q(e)i(safely)e(read)g(bac)o
2649+(k)h(b)o(y)f(the)h(Lua)g(in)o(terpreter.)30 b(The)19
2650+b(string)e(is)h(written)g(b)q(et)o(w)o(een)-42 1036 y(double)g(quotes,)
2651+f(and)h(all)e(double)i(quotes,)f(returns)g(and)g(bac)o(kslashes)g(in)g
2652+(the)h(string)e(are)h(correctly)f(escap)q(ed)-42 1092
2653+y(when)g(written.)29 1148 y(The)k(options)e Fm(c)p Fo(,)i
2654+Fm(d)p Fo(,)g Fm(E)p Fo(,)e Fm(e)p Fo(,)i Fm(f)p Fo(,)g
2655+Fm(g)f(i)p Fo(,)h Fm(o)p Fo(,)g Fm(u)p Fo(,)g Fm(X)p
2656+Fo(,)e(and)i Fm(x)f Fo(all)f(exp)q(ect)i(a)f(n)o(um)o(b)q(er)g(argumen)
2657+o(t,)f(while)h Fm(q)g Fo(and)h Fm(s)-42 1205 y Fo(exp)q(ects)c(a)f
2658+(string.)-42 1327 y Fe(6.3)56 b(Mathematical)20 b(F)-5
2659+b(unctions)-42 1412 y Fo(This)13 b(library)f(is)h(an)g(in)o(terface)f
2660+(to)h(some)e(functions)i(of)g(the)g(standard)g(C)g(math)e(library)l(.)
2661+19 b(Moreo)o(v)o(er,)11 b(it)i(registers)-42 1469 y(a)i(fallbac)o(k)f
2662+(for)h(the)g(binary)g(op)q(erator)f Fm(^)h Fo(whic)o(h,)g(when)h
2663+(applied)f(to)f(n)o(um)o(b)q(ers)h Fm(x^y)p Fo(,)f(returns)h
2664+Fd(x)1619 1452 y Fc(y)1640 1469 y Fo(.)29 1525 y(The)g(library)f(pro)o
2665+(vides)h(the)g(follo)o(wing)e(functions:)-42 1619 y Fm(abs)24
2666+b(acos)f(asin)h(atan)f(atan2)g(ceil)g(cos)h(floor)f(log)g(log10)-42
2667+1676 y(max)h(min)47 b(mod)h(sin)f(sqrt)23 b(tan)h(random)f(randomseed)
2668+-42 1769 y Fo(Most)17 b(of)g(them)g(are)g(only)g(in)o(terfaces)g(to)g
2669+(the)g(homon)o(ymous)e(functions)j(in)f(the)h(C)f(library)l(,)g(except)
2670+h(that,)f(for)-42 1826 y(the)f(trigonometri)o(c)d(functions,)h(all)h
2671+(angles)f(are)h(expressed)h(in)f(degrees.)29 1882 y(The)d(function)f
2672+Fm(max)g Fo(returns)g(the)g(maxim)o(um)d(v)m(alue)j(of)g(its)f(n)o
2673+(umeric)h(argumen)o(ts.)16 b(Similarly)l(,)9 b Fm(min)i
2674+Fo(computes)-42 1939 y(the)16 b(minim)o(um)o(.)h(Both)e(can)g(b)q(e)h
2675+(used)g(with)e(an)h(unlimited)f(n)o(um)o(b)q(er)g(of)h(argumen)o(ts.)29
2676+1995 y(The)g(function)h Fm(mod)e Fo(is)h(equiv)m(alen)o(t)g(to)f(the)i
2677+Fm(\045)f Fo(op)q(erator)f(in)h(C.)29 2052 y(The)f(functions)g
2678+Fm(random)f Fo(and)h Fm(randomseed)f Fo(are)h(in)o(terfaces)f(to)g(the)
2679+h(simple)f(random)g(generator)g(functions)-42 2108 y
2680+Fm(rand)18 b Fo(and)h Fm(srand)p Fo(,)f(pro)o(vided)g(b)o(y)g(ANSI)h
2681+(C.)f(The)h(function)f Fm(random)f Fo(returns)h(pseudo-random)g(n)o(um)
2682+o(b)q(ers)g(in)-42 2165 y(the)e(range)f([0)p Fd(;)8 b
2683+Fo(1\).)-42 2286 y Fe(6.4)56 b(I/O)19 b(F)-5 b(acilities)-42
2684+2372 y Fo(All)20 b(I/O)g(op)q(erations)f(in)h(Lua)g(are)f(done)i(o)o(v)
2685+o(er)e(t)o(w)o(o)f Fn(curr)n(ent)i Fo(\014les,)g(one)g(for)g(reading)f
2686+(and)h(one)g(for)f(writing.)-42 2429 y(Initially)l(,)14
2687+b(the)h(curren)o(t)g(input)h(\014le)f(is)g Fm(stdin)p
2688+Fo(,)f(and)h(the)g(curren)o(t)g(output)g(\014le)h(is)e
2689+Fm(stdout)p Fo(.)29 2485 y(Unless)h(otherwise)g(stated,)f(all)g(I/O)i
2690+(functions)f(return)g(1)g(on)g(success)h(and)f Fl(nil)f
2691+Fo(on)h(failure.)911 2748 y(19)p eop
2692+%%Page: 20 20
2693+20 19 bop -42 199 a Fm(readfrom)23 b(\(filename\))-42
2694+285 y Fo(This)e(function)g(op)q(ens)g(a)g(\014le)g(named)f
2695+Fm(filename)g Fo(and)h(sets)g(it)f(as)h(the)g Fn(curr)n(ent)f
2696+Fo(input)h(\014le.)38 b(When)21 b(called)-42 342 y(without)c
2697+(parameters,)e(this)i(function)g(closes)f(the)i(curren)o(t)f(input)g
2698+(\014le,)g(and)h(restores)e Fm(stdin)h Fo(as)f(the)i(curren)o(t)-42
2699+398 y(input)e(\014le.)29 454 y Fn(System)f(dep)n(endent:)k
2700+Fo(if)13 b Fm(filename)h Fo(starts)e(with)i(a)g Fm(|)p
2701+Fo(,)g(then)g(a)g(pip)q(ed)h(input)g(is)e(op)q(en,)i(via)e(function)i
2702+Fm(popen)p Fo(.)-42 574 y Fm(writeto)23 b(\(filename\))-42
2703+660 y Fo(This)d(function)g(op)q(ens)g(a)f(\014le)h(named)f
2704+Fm(filename)g Fo(and)h(sets)g(it)f(as)g(the)h Fn(curr)n(ent)g
2705+Fo(output)f(\014le.)34 b(Notice)20 b(that,)-42 717 y(if)g(the)g(\014le)
2706+f(already)h(exists,)f(it)h(will)e(b)q(e)i Fn(c)n(ompletely)g(er)n(ase)n
2707+(d)g Fo(with)f(this)g(op)q(eration.)33 b(When)20 b(called)f(without)-42
2708+773 y(parameters,)13 b(this)i(function)g(closes)f(the)h(curren)o(t)g
2709+(output)g(\014le,)g(and)g(restores)f Fm(stdout)g Fo(as)h(the)g(curren)o
2710+(t)g(output)-42 829 y(\014le.)29 886 y Fn(System)e(dep)n(endent:)18
2711+b Fo(if)12 b Fm(filename)f Fo(starts)g(with)h(a)g Fm(|)p
2712+Fo(,)g(then)h(a)f(pip)q(ed)h(output)g(is)e(op)q(en,)j(via)d(function)i
2713+Fm(popen)p Fo(.)-42 1006 y Fm(appendto)23 b(\(filename\))-42
2714+1091 y Fo(This)11 b(function)g(op)q(ens)h(a)f(\014le)g(named)f
2715+Fm(filename)g Fo(and)i(sets)f(it)f(as)h(the)g Fn(curr)n(ent)g
2716+Fo(output)g(\014le.)19 b(Unlik)o(e)10 b(the)h Fm(writeto)-42
2717+1148 y Fo(op)q(eration,)k(this)f(function)h(do)q(es)h(not)f(erase)g(an)
2718+o(y)f(previous)h(con)o(ten)o(t)g(of)g(the)g(\014le.)-42
2719+1268 y Fm(remove)24 b(\(filename\))-42 1354 y Fo(This)15
2720+b(function)g(deletes)h(the)f(\014le)g(with)g(the)g(giv)o(en)g(name.)-42
2721+1473 y Fm(rename)24 b(\(name1,)e(name2\))-42 1559 y Fo(This)15
2722+b(function)g(renames)f(\014le)i Fm(name1)e Fo(to)h Fm(name2)p
2723+Fo(.)-42 1679 y Fm(tmpname)23 b(\(\))-42 1765 y Fo(This)15
2724+b(function)g(returns)g(a)g(string)f(with)h(a)g(\014le)g(name)f(that)h
2725+(can)g(safely)g(b)q(e)g(used)h(for)f(a)g(temp)q(orary)e(\014le.)-42
2726+1885 y Fm(read)24 b(\([format]\))-42 1970 y Fo(This)17
2727+b(function)g(returns)f(a)h(v)m(alue)g(read)g(from)e(the)i(curren)o(t)g
2728+(input.)25 b(An)17 b(optional)f(string)g(argumen)o(t)f(sp)q(eci\014es)
2729+-42 2027 y(the)h(w)o(a)o(y)e(the)h(input)g(is)g(in)o(terpreted.)29
2730+2083 y(Without)d(a)h(format)d(argumen)o(t,)h Fm(read)i
2731+Fo(\014rst)f(skips)h(blanks,)g(tabs)f(and)h(newlines.)19
2732+b(Then)14 b(it)e(c)o(hec)o(ks)h(whether)-42 2140 y(the)h(curren)o(t)f
2733+(c)o(haracter)f(is)h Fm(")g Fo(or)f Fm(')p Fo(.)19 b(If)14
2734+b(so,)e(it)h(reads)g(a)f(string)g(up)i(to)f(the)g(ending)g(quotation)f
2735+(mark,)f(and)j(returns)-42 2196 y(this)h(string,)f(without)g(the)h
2736+(quotation)f(marks.)k(Otherwise)d(it)g(reads)g(up)h(to)e(a)h(blank,)g
2737+(tab)f(or)h(newline.)29 2253 y(The)g(format)e(string)i(can)g(ha)o(v)o
2738+(e)g(the)g(follo)o(wing)e(format:)30 2345 y Fm(?[n])-42
2739+2438 y Fo(where)j Fm(?)f Fo(can)g(b)q(e:)-42 2530 y Fl('s')i(or)g('S')k
2740+Fo(to)15 b(read)g(a)g(string;)-42 2623 y Fl('f)5 b(')17
2741+b(or)g('F')22 b Fo(to)14 b(read)h(a)g(real)g(n)o(um)o(b)q(er;)911
2742+2748 y(20)p eop
2743+%%Page: 21 21
2744+21 20 bop -42 199 a Fl('i')16 b(or)i('I')j Fo(to)15 b(read)g(an)g(in)o
2745+(teger.)-42 293 y(The)e(optional)e Fm(n)h Fo(is)g(a)g(n)o(um)o(b)q(er)g
2746+(whic)o(h)g(sp)q(eci\014es)h(ho)o(w)f(man)o(y)f(c)o(haracters)h(m)o
2747+(ust)e(b)q(e)j(read)g(to)e(comp)q(ose)h(the)g(input)-42
2748+350 y(v)m(alue.)21 b(P)o(articularly)l(,)12 b(the)k(format)c
2749+Fm("s1")j Fo(reads)g(a)g(single)g(c)o(haracter.)-42 470
2750+y Fm(readuntil)23 b(\(char\))-42 555 y Fo(Reads)f(the)f(curren)o(t)f
2751+(input)h(un)o(til)f(the)h(\014rst)f(o)q(currence)i(of)e(the)h(giv)o(en)
2752+f(c)o(haracter.)36 b(When)21 b(called)f(with)h(no)-42
2753+612 y(parameters,)16 b(reads)h(un)o(til)f(the)h(end)h(of)e(the)h
2754+(curren)o(t)g(input)g(\014le.)26 b(Returns)17 b(the)h(string)e(read.)25
2755+b(The)17 b(c)o(haracter)-42 668 y(itself)e(is)f(not)h(read.)-42
2756+788 y Fm(write)24 b(\(value,)f([format]\))-42 874 y Fo(This)d(function)
2757+g(writes)f(the)i(v)m(alue)f(of)g(its)f(\014rst)h(argumen)o(t)e(to)i
2758+(the)g(curren)o(t)g(output.)35 b(An)20 b(optional)f(second)-42
2759+931 y(argumen)o(t)13 b(sp)q(eci\014es)i(the)f(format)e(to)i(b)q(e)h
2760+(used.)20 b(This)14 b(format)e(is)i(giv)o(en)f(as)h(a)g(string,)f(comp)
2761+q(osed)h(of)g(four)f(parts.)-42 987 y(The)j(\014rst)f(part)f(is)h(the)g
2762+(only)g(one)g(not)g(optional,)f(and)h(m)o(ust)f(b)q(e)i(one)f(of)g(the)
2763+g(follo)o(wing)e(c)o(haracters:)-42 1081 y Fl('s')k(or)g('S')k
2764+Fo(to)15 b(write)f(strings;)-42 1175 y Fl('f)5 b(')17
2765+b(or)g('F')22 b Fo(to)14 b(write)g(\015oats;)-42 1269
2766+y Fl('i')i(or)i('I')j Fo(to)15 b(write)f(in)o(tegers;)-42
2767+1362 y Fl('q')j(or)g('Q')22 b Fo(to)17 b(write)g(quoted)g(strings.)27
2768+b(This)17 b(format)e(writes)i(the)h(string)f(in)g(a)h(form)e(suitable)h
2769+(to)g(b)q(e)h(safely)72 1419 y(read)13 b(bac)o(k)f(b)o(y)h(the)g(Lua)g
2770+(in)o(terpreter.)18 b(The)13 b(string)e(is)i(written)e(b)q(et)o(w)o
2771+(een)i(double)g(quotes,)g(and)g(all)e(double)72 1475
2772+y(quotes,)k(returns)g(and)g(bac)o(kslashes)g(in)g(the)g(string)f(are)h
2773+(correctly)g(escap)q(ed)h(when)f(written.)-42 1569 y(These)h(c)o
2774+(haracters)e(can)i(b)q(e)g(follo)o(w)o(ed)d(b)o(y)30
2775+1663 y Fm([?][m][.n])-42 1757 y Fo(where:)-42 1851 y
2776+Fm(?)23 b Fo(indicates)15 b(justi\014cation)f(inside)h(the)g(\014eld.)
2777+100 1944 y(')p Fm(<)p Fo(')22 b(righ)o(t)14 b(justi\014cation)g
2778+(\(default\);)100 2017 y(')p Fm(>)p Fo(')22 b(left)15
2779+b(justi\014cation;)100 2090 y(')p Fm(|)p Fo(')22 b(cen)o(ter)15
2780+b(justi\014cation.)-42 2184 y Fm(m)23 b Fo(Indicates)16
2781+b(the)f(\014eld)g(size)g(in)g(c)o(haracters.)-42 2278
2782+y Fm(.n)23 b Fo(F)l(or)18 b(reals,)h(indicates)f(the)h(n)o(um)o(b)q(er)
2783+f(of)g(digital)f(places.)31 b(F)l(or)18 b(in)o(tegers,)h(it)f(is)g(the)
2784+h(minim)o(um)c(n)o(um)o(b)q(er)j(of)72 2335 y(digits.)h(This)c(option)f
2785+(has)h(no)g(meaning)f(for)h(strings.)29 2428 y(When)20
2786+b(called)e(without)g(a)h(format)e(string,)i(this)f(function)h(writes)f
2787+(n)o(um)o(b)q(ers)h(using)f(the)i Fm(\045g)e Fo(format)f(and)-42
2788+2485 y(strings)e(with)f Fm(\045s)p Fo(.)20 b(F)l(or)14
2789+b(b)q(etter)h(format)e(facilities,)g(the)j(function)f
2790+Fm(format)f Fo(should)h(b)q(e)h(used)g(\(see)f(Section)g(6.2\).)911
2791+2748 y(21)p eop
2792+%%Page: 22 22
2793+22 21 bop -42 199 a Fm(date)24 b(\([format]\))-42 285
2794+y Fo(This)19 b(function)f(returns)h(a)f(string)g(con)o(taining)f(date)h
2795+(and)h(time)e(formatted)g(according)h(to)g(the)g(giv)o(en)g(string)-42
2796+342 y Fm(format)p Fo(,)g(follo)o(wing)e(the)i(same)f(rules)h(of)f(the)i
2797+(ANSI)f(C)g(function)g Fm(strftime)p Fo(.)28 b(When)18
2798+b(called)g(without)f(argu-)-42 398 y(men)o(ts,)d(it)g(returns)h(a)g
2799+(reasonable)g(date)g(and)g(time)f(represen)o(tation.)29
2800+454 y(This)h(function)g(replaces)g(functions)g Fm(date)g
2801+Fo(and)g Fm(time)g Fo(from)e(previous)i(Lua)g(v)o(ersions.)-42
2802+574 y Fm(exit)24 b(\([code]\))-42 660 y Fo(This)15 b(function)g(calls)g
2803+(the)g(C)g(function)g Fm(exit)p Fo(,)f(with)h(an)g(optional)f
2804+Fm(code)p Fo(,)g(to)g(terminate)g(the)h(program.)-42
2805+804 y Fp(7)67 b(The)23 b(Debuger)f(In)n(terface)-42 905
2806+y Fo(Lua)c(has)e(no)h(built)f(in)g(debuger)i(facilities.)k(Instead,)17
2807+b(it)f(o\013ers)g(a)h(sp)q(ecial)f(in)o(terface,)g(b)o(y)h(means)e(of)i
2808+(functions)-42 961 y(and)12 b Fn(ho)n(oks)p Fo(,)g(whic)o(h)f(allo)o
2809+(ws)f(the)i(construction)e(of)h(di\013eren)o(t)g(kinds)h(of)f
2810+(debugers,)h(pro\014les,)g(and)g(other)f(to)q(ols)f(that)-42
2811+1018 y(need)17 b(\\inside")d(information)e(from)i(the)h(in)o
2812+(terpreter.)k(This)c(in)o(terface)f(is)h(declared)h(in)f(the)g(\014le)g
2813+Fm(luadebug.h)p Fo(.)-42 1140 y Fe(7.1)56 b(Stac)n(k)19
2814+b(and)g(F)-5 b(unction)20 b(Information)-42 1225 y Fo(The)c(main)e
2815+(function)h(to)f(get)h(information)d(ab)q(out)j(the)h(in)o(terpreter)e
2816+(stac)o(k)g(is)-42 1319 y Fm(lua_Function)23 b(lua_stackedfunction)e
2817+(\(int)i(level\);)-42 1413 y Fo(It)18 b(returns)f(a)g(handle)h(\()p
2818+Fm(lua_Function)p Fo(\))d(to)h(the)i Fn(activation)g(r)n(e)n(c)n(or)n
2819+(d)j Fo(of)c(the)h(function)f(executing)g(at)g(a)g(giv)o(en)-42
2820+1470 y(lev)o(el.)34 b(Lev)o(el)20 b(0)f(is)h(the)g(curren)o(t)f
2821+(running)h(function,)h(while)e(lev)o(el)g Fd(n)14 b Fo(+)f(1)20
2822+b(is)f(the)h(function)g(that)f(has)h(called)-42 1526
2823+y(lev)o(el)g Fd(n)p Fo(.)34 b(When)21 b(called)e(with)h(a)f(lev)o(el)h
2824+(greater)f(than)h(the)g(stac)o(k)f(depth,)i Fm(lua_stackedfunction)d
2825+Fo(returns)-42 1582 y Fm(LUA_NOOBJECT)p Fo(.)29 1639
2826+y(The)k(t)o(yp)q(e)f Fm(lua_Function)f Fo(is)h(just)g(another)g(name)g
2827+(to)g Fm(lua_Object)p Fo(.)37 b(Although,)22 b(in)f(this)g(library)l(,)
2828+h(a)-42 1695 y Fm(lua_Function)12 b Fo(can)i(b)q(e)g(used)g(wherev)o
2829+(er)f(a)g Fm(lua_Object)f Fo(is)h(required,)g(a)g(parameter)f
2830+Fm(lua_Function)f Fo(accepts)-42 1752 y(only)k(a)g(handle)h(returned)f
2831+(b)o(y)g Fm(lua_stackedfunction)p Fo(.)29 1808 y(Three)g(other)g
2832+(functions)g(pro)q(duce)h(extra)f(information)d(ab)q(out)j(a)g
2833+(function:)-42 1902 y Fm(void)24 b(lua_funcinfo)e(\(lua_Object)g(func,)
2834+i(char)f(**filename,)f(int)i(*linedefined\);)-42 1959
2835+y(int)g(lua_currentline)e(\(lua_Function)g(func\);)-42
2836+2015 y(char)i(*lua_getobjname)e(\(lua_Object)g(o,)i(char)f(**name\);)
2837+-42 2109 y(lua_funcinfo)16 b Fo(giv)o(es)g(the)h(\014le)g(name)g(and)g
2838+(the)g(line)g(where)g(the)g(giv)o(en)g(function)g(has)g(b)q(een)h
2839+(de\014ned.)27 b(If)17 b(the)-42 2165 y(\\function")f(is)f(in)h(fact)g
2840+(the)g(main)f(co)q(de)h(of)g(a)g(c)o(h)o(unk,)g Fm(linedefined)f
2841+Fo(is)g(0.)22 b(If)17 b(the)f(function)g(is)f(a)h(C)g(function,)-42
2842+2222 y Fm(linedefined)e Fo(is)h(-1,)g(and)g Fm(filename)f
2843+Fo(is)h Fm("\(C\)")p Fo(.)29 2278 y(The)j(function)f
2844+Fm(lua_currentline)f Fo(giv)o(es)g(the)i(curren)o(t)f(line)g(where)h(a)
2845+f(giv)o(en)g(function)h(is)f(executing.)26 b(It)-42 2335
2846+y(only)16 b(w)o(orks)e(if)h(the)g(function)h(has)f(b)q(een)i
2847+(pre-compiled)d(with)h(debug)h(information)d(\(see)i(Section)h(4.8\).)j
2848+(When)-42 2391 y(no)d(line)e(information)f(is)i(a)o(v)m(ailable,)e(it)h
2849+(returns)i(-1.)29 2448 y(F)l(unction)g Fm(lua_getobjname)e
2850+Fo(tries)i(to)f(\014nd)i(a)f(reasonable)g(name)f(for)h(a)f(giv)o(en)h
2851+(function.)23 b(Because)17 b(func-)-42 2504 y(tions)11
2852+b(in)g(Lua)g(are)g(\014rst)g(class)f(v)m(alues,)i(they)f(do)g(not)g(ha)
2853+o(v)o(e)g(a)g(\014xed)g(name.)18 b(Some)10 b(functions)h(ma)o(y)e(b)q
2854+(e)j(the)g(v)m(alue)f(of)-42 2560 y(man)o(y)j(global)f(v)m(ariables,)h
2855+(while)g(others)h(ma)o(y)e(b)q(e)i(stored)f(only)h(in)f(a)h(table)f
2856+(\014eld.)20 b(F)l(unction)14 b Fm(lua_getobjname)-42
2857+2617 y Fo(\014rst)j(c)o(hec)o(ks)g(whether)h(the)f(giv)o(en)f(function)
2858+h(is)g(a)f(fallbac)o(k.)24 b(If)18 b(so,)e(it)h(returns)f(the)i(string)
2859+e Fm("fallback")p Fo(,)f(and)911 2748 y(22)p eop
2860+%%Page: 23 23
2861+23 22 bop -42 199 a Fm(name)16 b Fo(is)f(set)h(to)f(p)q(oin)o(t)g(to)g
2862+(the)h(fallbac)o(k)f(name.)21 b(Otherwise,)15 b(if)h(the)f(giv)o(en)h
2863+(function)g(is)f(the)h(v)m(alue)g(of)f(a)h(global)-42
2864+256 y(v)m(ariable,)e Fm(lua_getobjname)f Fo(returns)i(the)g(string)e
2865+Fm("global")p Fo(,)h(while)g Fm(name)g Fo(p)q(oin)o(ts)g(to)g(the)h(v)m
2866+(ariable)f(name.)19 b(If)-42 312 y(the)f(giv)o(en)e(function)h(is)f
2867+(neither)h(a)g(fallbac)o(k)f(nor)g(a)h(global)e(v)m(ariable,)i
2868+Fm(lua_getobjname)e Fo(returns)i(the)g(empt)o(y)-42 369
2869+y(string,)d(and)i Fm(name)e Fo(is)h(set)g(to)f Fm(NULL)p
2870+Fo(.)-42 487 y Fe(7.2)56 b(Manipulating)22 b(Lo)r(cal)c(V)-5
2871+b(ariables)-42 573 y Fo(The)17 b(follo)o(wing)d(functions)i(allo)o(w)e
2872+(the)i(manipulation)e(of)i(the)g(lo)q(cal)f(v)m(ariables)h(of)g(a)f
2873+(giv)o(en)h(activ)m(ation)f(record.)-42 629 y(They)h(only)f(w)o(ork)f
2874+(if)h(the)g(function)g(has)g(b)q(een)h(pre-compiled)f(with)f(debug)i
2875+(information)c(\(see)j(Section)h(4.8\).)-42 706 y Fm(lua_Object)23
2876+b(lua_getlocal)f(\(lua_Function)g(func,)h(int)h(local_number,)e(char)h
2877+(**name\);)-42 762 y(int)h(lua_setlocal)e(\(lua_Function)g(func,)h(int)
2878+h(local_number\);)-42 839 y Fo(The)19 b(\014rst)f(one)h(returns)g(the)f
2879+(v)m(alue)h(of)f(a)g(lo)q(cal)g(v)m(ariable,)g(and)h(sets)f
2880+Fm(name)g Fo(to)g(p)q(oin)o(t)g(to)g(the)h(v)m(ariable)f(name.)-42
2881+895 y Fm(local_number)f Fo(is)i(an)f(index)h(for)f(lo)q(cal)g(v)m
2882+(ariables.)29 b(The)19 b(\014rst)f(parameter)f(has)i(index)f(1,)h(and)g
2883+(so)f(on,)h(un)o(til)-42 952 y(the)k(last)e(activ)o(e)h(lo)q(cal)f(v)m
2884+(ariable.)40 b(When)23 b(called)f(with)g(a)g Fm(local_number)e
2885+Fo(greater)i(than)g(the)g(n)o(um)o(b)q(er)g(of)-42 1008
2886+y(activ)o(e)15 b(lo)q(cal)g(v)m(ariables,)f(or)h(if)g(the)h(activ)m
2887+(ation)e(record)h(has)h(no)f(debug)h(information,)d Fm(lua_getlocal)h
2888+Fo(returns)-42 1065 y Fm(LUA_NOOBJECT)p Fo(.)29 1121
2889+y(The)d(function)h Fm(lua_setlocal)d Fo(sets)i(the)g(lo)q(cal)f(v)m
2890+(ariable)h Fm(local_number)f Fo(to)g(the)h(v)m(alue)h(previously)e
2891+(pushed)-42 1178 y(on)19 b(the)f(stac)o(k)f(\(see)h(Section)g(5.2\).)28
2892+b(If)18 b(the)h(function)f(succeeds)h(it)e(returns)h(1.)29
2893+b(If)18 b Fm(local_number)f Fo(is)g(greater)-42 1234
2894+y(than)d(the)f(n)o(um)o(b)q(er)g(of)g(activ)o(e)g(lo)q(cal)f(v)m
2895+(ariables,)h(or)g(if)g(the)g(activ)m(ation)f(record)i(has)f(no)g(debug)
2896+h(information,)d(this)-42 1291 y(function)16 b(fails)d(and)j(returns)f
2897+(0.)-42 1409 y Fe(7.3)56 b(Ho)r(oks)-42 1495 y Fo(The)16
2898+b(Lua)f(in)o(terpreter)g(o\013ers)f(t)o(w)o(o)g(ho)q(oks)h(for)g(debug)
2899+g(purp)q(oses:)-42 1572 y Fm(typedef)23 b(void)h(\(*lua_CHFunction\))d
2900+(\(lua_Function)h(func,)i(char)f(*file,)g(int)g(line\);)-42
2901+1628 y(extern)h(lua_CHFunction)d(lua_callhook;)-42 1741
2902+y(typedef)i(void)h(\(*lua_LHFunction\))d(\(int)j(line\);)-42
2903+1797 y(extern)g(lua_LHFunction)d(lua_linehook;)-42 1874
2904+y Fo(The)i(\014rst)f(one)g(is)f(called)h(whenev)o(er)h(the)f(in)o
2905+(terpreter)f(en)o(ters)h(or)f(lea)o(v)o(es)h(a)f(function.)41
2906+b(When)22 b(en)o(tering)g(a)-42 1930 y(function,)c(its)f(parameters)f
2907+(are)h(a)h(handle)g(to)f(the)g(function)h(activ)m(ation)e(record,)i
2908+(plus)g(the)f(\014le)h(and)g(the)g(line)-42 1987 y(where)h(the)g
2909+(function)f(is)g(de\014ned)h(\(the)f(same)f(information)f(whic)o(h)i
2910+(is)g(pro)o(vided)g(b)o(y)g Fm(lua_funcinfo)p Fo(\);)g(when)-42
2911+2043 y(lea)o(ving)d(a)f(function,)h Fm(func)g Fo(is)f
2912+Fm(LUA_NOOBJECT)p Fo(,)g Fm(file)g Fo(is)h Fm("\(return\)")p
2913+Fo(,)e(and)j Fm(line)e Fo(is)h(0.)29 2100 y(The)24 b(other)f(ho)q(ok)g
2914+(is)g(called)g(ev)o(ery)g(time)f(the)h(in)o(terpreter)g(c)o(hanges)g
2915+(the)g(line)g(of)g(co)q(de)h(it)f(is)g(execut-)-42 2156
2916+y(ing.)31 b(Its)19 b(only)g(parameter)e(is)i(the)g(line)f(n)o(um)o(b)q
2917+(er)h(\(the)f(same)g(information)e(whic)o(h)j(is)g(pro)o(vided)f(b)o(y)
2918+h(the)g(call)-42 2213 y Fm(lua_currentline\(lua_stackedfun)o(ction\(0)o
2919+(\)\))p Fo(\).)d(This)d(second)h(ho)q(ok)f(is)g(only)f(called)h(if)g
2920+(the)g(activ)o(e)g(func-)-42 2269 y(tion)i(has)g(b)q(een)h
2921+(pre-compiled)f(with)f(debug)i(information)c(\(see)k(Section)f(4.8\).)
2922+29 2326 y(A)g(ho)q(ok)g(is)g(disabled)g(when)h(its)e(v)m(alue)i(is)e
2923+(NULL)i(\(0\),)e(whic)o(h)h(is)g(the)g(initial)f(v)m(alue)h(of)g(b)q
2924+(oth)g(ho)q(oks.)-42 2466 y Fp(8)67 b(Some)22 b(Examples)-42
2925+2567 y Fo(This)17 b(section)f(giv)o(es)g(examples)g(sho)o(wing)g(some)g
2926+(features)g(of)h(Lua.)25 b(It)17 b(do)q(es)g(not)g(in)o(tend)f(to)h(co)
2927+o(v)o(er)f(the)h(whole)-42 2623 y(language,)e(but)g(only)g(to)f
2928+(illustrate)f(some)h(in)o(teresting)g(uses)i(of)e(the)i(system.)911
2929+2748 y(23)p eop
2930+%%Page: 24 24
2931+24 23 bop -42 199 a Fe(8.1)56 b(Data)19 b(Structures)-42
2932+285 y Fo(T)l(ables)c(are)f(a)g(strong)f(unifying)h(data)g(constructor.)
2933+19 b(They)c(directly)f(implemen)o(t)d(a)j(m)o(ultitude)f(of)h(data)g(t)
2934+o(yp)q(es,)-42 342 y(lik)o(e)h(ordinary)f(arra)o(ys,)g(records,)g
2935+(sets,)h(bags,)f(and)i(lists.)29 398 y(Arra)o(ys)e(need)h(no)g
2936+(explanations.)k(In)c(Lua,)g(it)e(is)i(con)o(v)o(en)o(tional)e(to)h
2937+(start)f(indices)i(from)e(1,)h(but)h(this)f(is)g(only)-42
2938+454 y(a)f(con)o(v)o(en)o(tion.)19 b(Arra)o(ys)12 b(can)h(b)q(e)h
2939+(indexed)g(b)o(y)f(0,)g(negativ)o(e)g(n)o(um)o(b)q(ers,)f(or)h(an)o(y)g
2940+(other)f(v)m(alue)i(\(but)f Fl(nil)p Fo(\).)18 b(Records)-42
2941+511 y(are)d(also)g(trivially)d(implemen)o(ted)h(b)o(y)i(the)h(syn)o
2942+(tactic)e(sugar)g Fm(a.x)p Fo(.)29 567 y(The)j(b)q(est)g(w)o(a)o(y)f
2943+(to)g(implemen)o(t)e(a)i(set)h(is)f(to)g(store)g(its)g(elemen)o(ts)g
2944+(as)g(indices)h(of)f(a)h(table.)24 b(The)17 b(statemen)o(t)-42
2945+624 y Fm(s)24 b(=)g({})14 b Fo(creates)h(an)f(empt)o(y)g(set)g
2946+Fm(s)p Fo(.)20 b(The)15 b(statemen)o(t)d Fm(s[x])24 b(=)f(1)15
2947+b Fo(inserts)f(the)h(v)m(alue)g(of)f Fm(x)h Fo(in)o(to)e(the)i(set)g
2948+Fm(s)p Fo(.)k(The)-42 680 y(expression)e Fm(s[x])f Fo(is)h(true)f(if)g
2949+(and)h(only)g(if)f Fm(x)h Fo(b)q(elongs)f(to)g Fm(s)p
2950+Fo(.)25 b(Finally)l(,)15 b(the)i(statemen)o(t)e Fm(s[x])23
2951+b(=)h(nil)16 b Fo(erases)h Fm(x)-42 737 y Fo(from)d Fm(s)p
2952+Fo(.)29 793 y(Bags)h(can)h(b)q(e)g(implemen)o(ted)e(similarl)o(y)f(to)i
2953+(sets,)g(but)h(using)f(the)h(v)m(alue)f(asso)q(ciated)g(to)g(an)h
2954+(elemen)o(t)e(as)h(its)-42 850 y(coun)o(ter.)20 b(So,)15
2955+b(to)f(insert)h(an)g(elemen)o(t,)f(the)h(follo)o(wing)e(co)q(de)j(is)f
2956+(enough:)-42 943 y Fm(if)24 b(s[x])f(then)h(s[x])f(=)h(s[x]+1)-42
2957+1000 y(else)g(s[x])f(=)h(1)g(end)-42 1094 y Fo(and)16
2958+b(to)e(remo)o(v)o(e)g(an)h(elemen)o(t:)-42 1188 y Fm(if)24
2959+b(s[x])f(then)h(s[x])f(=)h(s[x]-1)f(end)-42 1244 y(if)h(s[x])f(==)h(0)g
2960+(then)f(s[x])g(=)h(nil)g(end)29 1338 y Fo(Lisp-lik)o(e)d(lists)f(also)g
2961+(ha)o(v)o(e)h(an)g(easy)g(implemen)o(tatio)o(n.)36 b(The)21
2962+b(\\cons")g(of)g(t)o(w)o(o)f(elemen)o(ts)g Fm(x)h Fo(and)g
2963+Fm(y)g Fo(can)-42 1394 y(b)q(e)d(created)e(with)g(the)h(co)q(de)g
2964+Fm(l)23 b(=)h({car=x,)f(cdr=y})p Fo(.)g(The)17 b(expression)f
2965+Fm(l.car)g Fo(extracts)g(the)g(header,)h(while)-42 1451
2966+y Fm(l.cdr)d Fo(extracts)g(the)g(tail.)k(An)d(alternativ)o(e)d(w)o(a)o
2967+(y)i(is)f(to)h(create)g(the)g(list)g(directly)f(with)h
2968+Fm(l={x,y})p Fo(,)f(and)h(then)h(to)-42 1507 y(extract)g(the)g(header)h
2969+(with)e Fm(l[1])h Fo(and)g(the)h(tail)d(with)i Fm(l[2])p
2970+Fo(.)-42 1629 y Fe(8.2)56 b(The)18 b(F)-5 b(unctions)21
2971+b Fb(next)c Fe(and)i Fb(nextvar)-42 1715 y Fo(This)f(example)f(sho)o
2972+(ws)g(ho)o(w)h(to)f(use)i(the)f(function)g Fm(next)f
2973+Fo(to)h(iterate)f(o)o(v)o(er)g(the)h(\014elds)g(of)g(a)g(table.)28
2974+b(F)l(unction)-42 1771 y Fn(clone)15 b Fo(receiv)o(es)g(an)o(y)g(table)
2975+f(and)i(returns)f(a)g(clone)g(of)g(it.)-42 1865 y Fm(function)23
2976+b(clone)g(\(t\))263 b(--)23 b(t)h(is)f(a)h(table)6 1921
2977+y(local)f(new_t)h(=)f({})263 b(--)23 b(create)g(a)h(new)f(table)6
2978+1978 y(local)g(i,)h(v)g(=)f(next\(t,)g(nil\))48 b(--)23
2979+b(i)h(is)f(an)h(index)f(of)h(t,)f(v)h(=)g(t[i])6 2034
2980+y(while)f(i)h(do)54 2091 y(new_t[i])f(=)g(v)54 2147 y(i,)h(v)f(=)h
2981+(next\(t,)f(i\))191 b(--)23 b(get)h(next)f(index)6 2204
2982+y(end)6 2260 y(return)g(new_t)-42 2317 y(end)29 2410
2983+y Fo(The)15 b(next)h(example)e(prin)o(ts)g(the)i(names)e(of)g(all)h
2984+(global)e(v)m(ariables)i(in)g(the)g(system)f(with)h(non)g(nil)g(v)m
2985+(alues:)-42 2504 y Fm(function)23 b(printGlobalVariables)e(\(\))6
2986+2561 y(local)i(i,)h(v)g(=)f(nextvar\(nil\))6 2617 y(while)g(i)h(do)911
2987+2748 y Fo(24)p eop
2988+%%Page: 25 25
2989+25 24 bop 54 199 a Fm(print\(i\))54 256 y(i,)24 b(v)f(=)h(nextvar\(i\))
2990+6 312 y(end)-42 369 y(end)-42 488 y Fe(8.3)56 b(String)19
2991+b(Manipulation)-42 574 y Fo(The)d(\014rst)f(example)f(is)g(a)h
2992+(function)g(to)g(trim)e(extra)i(blanks)g(at)f(the)h(b)q(eginning)h(and)
2993+f(end)h(of)f(a)g(string.)-42 654 y Fm(function)23 b(trim\(s\))6
2994+710 y(local)g(l)h(=)g(1)6 767 y(while)f(strsub\(s,l,l\))f(==)i(')g(')g
2995+(do)54 823 y(l)g(=)f(l+1)6 880 y(end)6 936 y(local)g(r)h(=)g
2996+(strlen\(s\))6 992 y(while)f(strsub\(s,r,r\))f(==)i(')g(')g(do)54
2997+1049 y(r)g(=)f(r-1)6 1105 y(end)6 1162 y(return)g(strsub\(s,l,r\))-42
2998+1218 y(end)29 1298 y Fo(The)15 b(second)h(example)e(sho)o(ws)h(a)g
2999+(function)g(that)f(eliminates)f(all)h(blanks)h(of)g(a)g(string.)-42
3000+1379 y Fm(function)23 b(remove_blanks)f(\(s\))6 1435
3001+y(local)h(b)h(=)g(strfind\(s,)e(')i('\))6 1492 y(while)f(b)h(do)54
3002+1548 y(s)g(=)f(strsub\(s,)g(1,)h(b-1\))f(..)h(strsub\(s,)e(b+1\))54
3003+1604 y(b)i(=)f(strfind\(s,)g(')h('\))6 1661 y(end)6 1717
3004+y(return)f(s)-42 1774 y(end)-42 1893 y Fe(8.4)56 b(V)-5
3005+b(ariable)21 b(n)n(um)n(b)r(er)d(of)h(argumen)n(ts)-42
3006+1979 y Fo(Lua)14 b(do)q(es)f(not)g(pro)o(vide)f(an)o(y)h(explicit)f
3007+(mec)o(hanism)f(to)h(deal)h(with)f(v)m(ariable)h(n)o(um)o(b)q(er)f(of)h
3008+(argumen)o(ts.)k(Ho)o(w)o(ev)o(er,)-42 2035 y(one)f(can)g(use)g(table)f
3009+(constructors)g(to)g(sim)o(ulate)e(this)i(mec)o(hanism.)k(As)d(an)g
3010+(example,)e(supp)q(ose)i(a)g(function)f(to)-42 2092 y(concatenate)g
3011+(all)g(its)f(argumen)o(ts.)k(It)d(could)g(b)q(e)h(written)f(lik)o(e)-42
3012+2172 y Fm(function)23 b(concat)g(\(o\))6 2228 y(local)g(i)h(=)g(1)6
3013+2285 y(local)f(s)h(=)g('')6 2341 y(while)f(o[i])h(do)54
3014+2398 y(s)g(=)f(s)h(..)g(o[i])54 2454 y(i)g(=)f(i+1)6
3015+2511 y(end)6 2567 y(return)g(s)-42 2623 y(end)911 2748
3016+y Fo(25)p eop
3017+%%Page: 26 26
3018+26 25 bop -42 199 a Fo(T)l(o)15 b(call)g(it,)f(one)h(uses)h(a)e(table)h
3019+(constructor)g(to)f(join)h(all)f(argumen)o(ts:)6 293
3020+y Fm(x)24 b(=)g(concat{"hello)e(",)h("john",)g(")h(and)f(",)h("mary"})
3021+-42 415 y Fe(8.5)56 b(P)n(ersistence)-42 501 y Fo(Because)21
3022+b(of)e(its)g(re\015exiv)o(e)g(facilities,)g(p)q(ersistence)h(in)f(Lua)h
3023+(can)g(b)q(e)g(ac)o(hiev)o(ed)g(within)f(the)g(language.)33
3024+b(This)-42 557 y(section)12 b(sho)o(ws)f(some)g(w)o(a)o(ys)g(to)g
3025+(store)g(and)h(retriev)o(e)f(v)m(alues)i(in)e(Lua,)i(using)f(a)f(text)h
3026+(\014le)g(written)e(in)i(the)g(language)-42 614 y(itself)j(as)f(the)i
3027+(storage)e(media.)29 670 y(T)l(o)h(store)f(a)h(single)g(v)m(alue)g
3028+(with)g(a)g(name,)f(the)h(follo)o(wing)e(co)q(de)j(is)e(enough:)-42
3029+764 y Fm(function)23 b(store)g(\(name,)g(value\))6 820
3030+y(write\(format\('\\n\045s)f(=',)h(name\)\))6 877 y
3031+(write_value\(value\))-42 933 y(end)-42 1039 y(function)g(write_value)g
3032+(\(value\))6 1096 y(local)g(t)h(=)g(type\(value\))102
3033+1152 y(if)f(t)h(==)g('nil')94 b(then)24 b(write\('nil'\))6
3034+1209 y(elseif)f(t)h(==)g('number')e(then)i(write\(value\))6
3035+1265 y(elseif)f(t)h(==)g('string')e(then)i(write\(value,)e('q'\))6
3036+1322 y(end)-42 1378 y(end)-42 1484 y Fo(In)16 b(order)f(to)g(restore)f
3037+(this)h(v)m(alue,)g(a)g Fm(lua_dofile)f Fo(su\016ces.)29
3038+1541 y(Storing)i(tables)h(is)g(a)g(little)e(more)h(complex.)25
3039+b(Assuming)16 b(that)g(the)h(table)g(is)g(a)g(tree,)g(and)g(all)f
3040+(indices)i(are)-42 1597 y(iden)o(ti\014ers)13 b(\(that)e(is,)i(the)g
3041+(tables)f(are)g(b)q(eing)h(used)g(as)g(records\),)f(its)g(v)m(alue)h
3042+(can)g(b)q(e)g(written)f(directly)g(with)g(table)-42
3043+1654 y(constructors.)19 b(First,)14 b(the)h(function)g
3044+Fm(write_value)f Fo(is)h(c)o(hanged)g(to)-42 1748 y Fm(function)23
3045+b(write_value)g(\(value\))6 1804 y(local)g(t)h(=)g(type\(value\))102
3046+1860 y(if)f(t)h(==)g('nil')94 b(then)24 b(write\('nil'\))6
3047+1917 y(elseif)f(t)h(==)g('number')e(then)i(write\(value\))6
3048+1973 y(elseif)f(t)h(==)g('string')e(then)i(write\(value,)e('q'\))6
3049+2030 y(elseif)h(t)h(==)g('table')46 b(then)24 b(write_record\(value\))6
3050+2086 y(end)-42 2143 y(end)-42 2237 y Fo(The)16 b(function)f
3051+Fm(write_record)e Fo(is:)-42 2330 y Fm(function)23 b(write_record\(t\))
3052+6 2387 y(local)g(i,)h(v)g(=)f(next\(t,)g(nil\))6 2443
3053+y(write\('{'\))47 b(--)23 b(starts)g(constructor)6 2500
3054+y(while)g(i)h(do)54 2556 y(store\(i,)f(v\))54 2613 y(write\(',)g('\))
3055+911 2748 y Fo(26)p eop
3056+%%Page: 27 27
3057+27 26 bop 54 199 a Fm(i,)24 b(v)f(=)h(next\(t,)f(i\))6
3058+256 y(end)6 312 y(write\('}'\))47 b(--)23 b(closes)g(constructor)-42
3059+369 y(end)-42 490 y Fe(8.6)56 b(Inheritance)-42 576 y
3060+Fo(The)15 b(fallbac)o(k)f(for)g(absen)o(t)g(indices)h(can)g(b)q(e)g
3061+(used)g(to)f(implemen)o(t)e(man)o(y)h(kinds)i(of)f(inheritance)g(in)h
3062+(Lua.)20 b(As)15 b(an)-42 632 y(example,)f(the)h(follo)o(wing)e(co)q
3063+(de)j(implemen)o(ts)d(single)h(inheritance:)-42 726 y
3064+Fm(function)23 b(Index)g(\(t,f\))6 782 y(if)h(f)g(==)f('parent')g(then)
3065+47 b(--)24 b(to)f(avoid)g(loop)54 838 y(return)g(OldIndex\(t,f\))6
3066+895 y(end)6 951 y(local)g(p)h(=)g(t.parent)6 1008 y(if)g(type\(p\))f
3067+(==)g('table')g(then)54 1064 y(return)g(p[f])6 1121 y(else)54
3068+1177 y(return)g(OldIndex\(t,f\))6 1234 y(end)-42 1290
3069+y(end)-42 1403 y(OldIndex)g(=)h(setfallback\("index",)d(Index\))-42
3070+1496 y Fo(Whenev)o(er)15 b(Lua)g(attempts)d(to)i(access)h(an)f(absen)o
3071+(t)g(\014eld)h(in)f(a)g(table,)g(it)g(calls)f(the)i(fallbac)o(k)e
3072+(function)h Fm(Index)p Fo(.)19 b(If)-42 1553 y(the)14
3073+b(table)e(has)h(a)g(\014eld)h Fm(parent)e Fo(with)h(a)g(table)f(v)m
3074+(alue,)i(then)f(Lua)h(attempts)d(to)h(access)i(the)f(desired)g(\014eld)
3075+h(in)f(this)-42 1609 y(paren)o(t)i(ob)s(ject.)k(This)c(pro)q(cess)g(is)
3076+f(rep)q(eated)h(\\up)o(w)o(ards")f(un)o(til)g(a)h(v)m(alue)g(for)f(the)
3077+h(\014eld)g(is)g(found)g(or)f(the)h(ob)s(ject)-42 1665
3078+y(has)h(no)f(paren)o(t.)k(In)d(the)f(latter)f(case,)h(the)g(previous)g
3079+(fallbac)o(k)f(is)h(called)g(to)f(supply)i(a)e(v)m(alue)i(for)e(the)i
3080+(\014eld.)29 1722 y(When)e(b)q(etter)g(p)q(erformance)f(is)g(needed,)i
3081+(the)f(same)e(fallbac)o(k)h(ma)o(y)f(b)q(e)i(implemen)o(ted)e(in)i(C,)f
3082+(as)g(illustrated)-42 1778 y(in)j(Figure)e(1.)20 b(This)14
3083+b(co)q(de)i(m)o(ust)e(b)q(e)i(registered)e(with:)6 1871
3084+y Fm(lua_pushstring\("parent"\);)6 1928 y(lockedParentName)22
3085+b(=)i(lua_ref\(1\);)6 1984 y(lua_pushobject\(lua_setfallba)o(ck\("ind)o
3086+(ex",)d(Index\)\);)6 2041 y(lockedOldIndex)h(=)i(lua_ref\(1\);)-42
3087+2134 y Fo(Notice)15 b(ho)o(w)g(the)g(string)f Fm("parent")g
3088+Fo(is)h(k)o(ept)g(lo)q(c)o(k)o(ed)g(in)g(Lua)h(for)e(optimal)f(p)q
3089+(erformance.)-42 2255 y Fe(8.7)56 b(Programming)19 b(with)h(Classes)-42
3090+2341 y Fo(There)e(are)g(man)o(y)e(di\013eren)o(t)h(w)o(a)o(ys)g(to)g
3091+(do)h(ob)s(ject-orien)o(ted)e(programming)e(in)k(Lua.)28
3092+b(This)17 b(section)h(presen)o(ts)-42 2398 y(one)g(p)q(ossible)f(w)o(a)
3093+o(y)f(to)g(implemen)o(t)f(classes,)h(using)h(the)g(inheritance)g(mec)o
3094+(hanism)e(presen)o(ted)j(ab)q(o)o(v)o(e.)25 b Fn(Ple)n(ase)-42
3095+2454 y(notic)n(e:)20 b(the)d(fol)r(lowing)e(examples)g(only)h(work)g
3096+(with)g(the)h(index)e(fal)r(lb)n(ack)g(r)n(e)n(de\014ne)n(d)g(ac)n(c)n
3097+(or)n(ding)g(to)h(Se)n(ction)e(8.6)p Fo(.)29 2511 y(As)j(one)g(could)f
3098+(exp)q(ect,)i(a)e(go)q(o)q(d)h(w)o(a)o(y)e(to)h(represen)o(t)h(a)f
3099+(class)g(is)h(as)f(a)g(table.)24 b(This)16 b(table)g(will)g(con)o(tain)
3100+g(all)-42 2567 y(instance)f(metho)q(ds)f(of)h(the)g(class,)f(plus)h(ev)
3101+o(en)o(tual)f(default)h(v)m(alues)g(for)f(instance)h(v)m(ariables.)k
3102+(An)c(instance)g(of)g(a)-42 2623 y(class)g(has)g(its)f
3103+Fm(parent)h Fo(\014eld)g(p)q(oin)o(ting)g(to)f(the)h(class,)g(and)g(so)
3104+g(it)f(\\inherits")g(all)g(metho)q(ds.)911 2748 y(27)p
3105+eop
3106+%%Page: 28 28
3107+28 27 bop -42 261 1950 6 v -42 355 a Fm(#include)23 b("lua.h")-42
3108+467 y(int)h(lockedParentName;)45 b(/*)24 b(lock)f(index)g(for)h(the)f
3109+(string)g("parent")g(*/)-42 524 y(int)h(lockedOldIndex;)93
3110+b(/*)24 b(previous)f(fallback)f(function)h(*/)-42 637
3111+y(void)h(callOldFallback)e(\(lua_Object)g(table,)h(lua_Object)g
3112+(index\))-42 693 y({)6 750 y(lua_Object)g(oldIndex)f(=)i
3113+(lua_getref\(lockedOldIndex\);)6 806 y(lua_pushobject\(table\);)6
3114+863 y(lua_pushobject\(index\);)6 919 y(lua_callfunction\(oldIndex\);)
3115+-42 976 y(})-42 1088 y(void)g(Index)f(\(void\))-42 1145
3116+y({)6 1201 y(lua_Object)g(table)g(=)h(lua_getparam\(1\);)6
3117+1258 y(lua_Object)f(index)g(=)h(lua_getparam\(2\);)6
3118+1314 y(lua_Object)f(parent;)6 1371 y(if)h(\(lua_isstring\(index\))d(&&)
3119+j(strcmp\(lua_getstring\(in)o(dex\),)d("parent"\))h(==)i(0\))6
3120+1427 y({)54 1484 y(callOldFallback\(table,)d(index\);)54
3121+1540 y(return;)6 1597 y(})6 1653 y(lua_pushobject\(table\);)6
3122+1709 y(lua_pushref\(lockedParentName)o(\);)6 1766 y(parent)i(=)h
3123+(lua_getsubscript\(\);)6 1822 y(if)g(\(lua_istable\(parent\)\))6
3124+1879 y({)54 1935 y(lua_pushobject\(parent\);)54 1992
3125+y(lua_pushobject\(index\);)54 2048 y(/*)g(return)f(result)g(from)g
3126+(getsubscript)f(*/)54 2105 y(lua_pushobject\(lua_getsubs)o(cript\(\))o
3127+(\);)6 2161 y(})6 2218 y(else)54 2274 y(callOldFallback\(table,)f
3128+(index\);)-42 2330 y(})665 2466 y Fo(Figure)15 b(1:)k(Inheritance)d(in)
3129+f(C.)p -42 2522 V 911 2748 a(28)p eop
3130+%%Page: 29 29
3131+29 28 bop -42 159 1950 6 v -42 253 a Fm(Point)24 b(=)f({x)h(=)g(0,)f(y)
3132+h(=)g(0})-42 366 y(function)f(Point:create)f(\(o\))6
3133+423 y(o.parent)h(=)h(self)6 479 y(return)f(o)-42 536
3134+y(end)-42 648 y(function)g(Point:move)g(\(p\))6 705 y(self.x)g(=)h
3135+(self.x)f(+)h(p.x)6 761 y(self.y)f(=)h(self.y)f(+)h(p.y)-42
3136+818 y(end)-42 931 y(...)-42 1044 y(--)-42 1100 y(--)g(creating)f
3137+(points)-42 1157 y(--)-42 1213 y(p1)h(=)g(Point:create{x)e(=)h(10,)h(y)
3138+g(=)f(20})-42 1270 y(p2)h(=)g(Point:create{x)e(=)h(10})48
3139+b(--)23 b(y)h(will)f(be)h(inherited)f(until)g(it)g(is)h(set)-42
3140+1382 y(--)-42 1439 y(--)g(example)f(of)h(a)f(method)g(invocation)-42
3141+1495 y(--)-42 1552 y(p1:move\(p2\))690 1687 y Fo(Figure)15
3142+b(2:)k(A)c(Class)g(P)o(oin)o(t.)p -42 1744 V 29 1872
3143+a(F)l(or)e(instance,)g(a)g(class)g Fm(Point)g Fo(can)g(b)q(e)h(describ)
3144+q(ed)h(as)e(in)g(Figure)f(2.)19 b(F)l(unction)14 b Fm(create)e
3145+Fo(helps)i(the)f(creation)-42 1928 y(of)f(new)h(p)q(oin)o(ts,)f(adding)
3146+g(the)g(paren)o(t)g(\014eld.)20 b(F)l(unction)12 b Fm(move)f
3147+Fo(is)h(an)h(example)e(of)h(an)g(instance)g(metho)q(d.)18
3148+b(Finally)l(,)-42 1984 y(a)h(sub)q(class)f(can)h(b)q(e)h(created)e(as)g
3149+(a)h(new)g(table,)f(with)g(the)h Fm(parent)f Fo(\014eld)h(p)q(oin)o
3150+(ting)e(to)h(its)g(sup)q(erclass.)30 b(It)19 b(is)-42
3151+2041 y(in)o(teresting)d(to)g(notice)g(ho)o(w)g(the)h(use)g(of)f
3152+Fm(self)g Fo(in)h(metho)q(d)e Fm(create)h Fo(allo)o(ws)f(this)h(metho)q
3153+(d)g(to)g(w)o(ork)g(prop)q(erly)-42 2097 y(ev)o(en)g(when)g(inherited)f
3154+(b)o(y)g(a)f(sub)q(class.)20 b(As)c(usual,)e(a)h(sub)q(class)g(ma)o(y)f
3155+(o)o(v)o(erwrite)f(an)o(y)i(inherited)g(metho)q(d)f(with)-42
3156+2154 y(its)h(o)o(wn)g(v)o(ersion.)-42 2275 y Fe(8.8)56
3157+b(Mo)r(dules)-42 2361 y Fo(Here)17 b(w)o(e)f(explain)f(one)i(p)q
3158+(ossible)f(w)o(a)o(y)f(to)g(sim)o(ulate)f(mo)q(dules)h(in)h(Lua.)23
3159+b(The)17 b(main)d(idea)i(is)g(to)f(use)i(a)f(table)f(to)-42
3160+2418 y(store)g(the)g(mo)q(dule)g(functions.)29 2474 y(A)g(mo)q(dule)g
3161+(should)g(b)q(e)h(written)e(as)h(a)g(separate)f(c)o(h)o(unk,)h
3162+(starting)f(with:)-42 2567 y Fm(if)24 b(modulename)f(then)g(return)g
3163+(end)47 b(--)24 b(avoid)f(loading)g(twice)g(the)h(same)f(module)-42
3164+2623 y(modulename)g(=)h({})47 b(--)24 b(create)f(a)h(table)f(to)g
3165+(represent)g(the)g(module)911 2748 y Fo(29)p eop
3166+%%Page: 30 30
3167+30 29 bop -42 159 1950 6 v -42 253 a Fm(function)23 b(open)h(\(mod\))6
3168+310 y(local)f(n,)h(f)g(=)f(next\(mod,)g(nil\))6 366 y(while)g(n)h(do)54
3169+423 y(setglobal\(n,)e(f\))54 479 y(n,)i(f)f(=)h(next\(mod,)f(n\))6
3170+536 y(end)-42 592 y(end)645 727 y Fo(Figure)14 b(3:)20
3171+b(Op)q(ening)c(a)f(mo)q(dule.)p -42 784 V -42 913 a(After)g(that,)f
3172+(functions)h(can)h(b)q(e)g(directly)e(de\014ned)j(with)d(the)h(syn)o
3173+(tax)-42 1006 y Fm(function)23 b(modulename.foo)f(\(...\))6
3174+1063 y(...)-42 1119 y(end)29 1213 y Fo(An)o(y)14 b(co)q(de)g(that)f
3175+(needs)i(this)e(mo)q(dule)g(has)g(only)h(to)f(execute)h
3176+Fm(dofile\("filename"\))p Fo(,)d(where)j Fm(filename)f
3177+Fo(is)-42 1270 y(the)j(\014le)f(where)g(the)h(mo)q(dule)e(is)h
3178+(written.)k(After)14 b(this,)h(an)o(y)g(function)g(can)g(b)q(e)h
3179+(called)f(with)-42 1363 y Fm(modulename.foo\(...\))29
3180+1457 y Fo(If)h(a)f(mo)q(dule)g(function)h(is)f(going)g(to)g(b)q(e)h
3181+(used)g(man)o(y)f(times,)e(the)j(program)e(can)i(giv)o(e)f(a)g(lo)q
3182+(cal)g(name)f(to)i(it.)-42 1514 y(Because)g(functions)f(are)g(v)m
3183+(alues,)g(it)g(is)f(enough)i(to)e(write)-42 1607 y Fm(localname)23
3184+b(=)h(modulename.foo)-42 1701 y Fo(Finally)l(,)15 b(a)g(mo)q(dule)g(ma)
3185+o(y)f(b)q(e)j Fn(op)n(ene)n(d)p Fo(,)e(giving)f(direct)i(access)g(to)f
3186+(all)g(its)g(functions,)g(as)g(sho)o(wn)h(in)f(the)h(co)q(de)h(in)-42
3187+1758 y(Figure)e(3.)-42 1879 y Fe(8.9)56 b(A)19 b(CF)-5
3188+b(unction)-42 1965 y Fo(A)18 b(CF)l(unction)f(to)f(compute)h(the)g
3189+(maxim)o(um)c(of)k(a)g(v)m(ariable)g(n)o(um)o(b)q(er)f(of)h(argumen)o
3190+(ts)f(is)h(sho)o(wn)g(in)g(Figure)f(4.)-42 2022 y(After)f(registered)g
3191+(with)-42 2115 y Fm(lua_register)23 b(\("max",)g(math_max\);)-42
3192+2209 y Fo(this)15 b(function)g(is)g(a)o(v)m(ailable)f(in)h(Lua,)g(as)g
3193+(follo)o(ws:)-42 2303 y Fm(i)24 b(=)g(max\(4,)f(5,)h(10,)f(-34\))47
3194+b(--)24 b(i)g(receives)e(10)-42 2425 y Fe(8.10)56 b(Calling)21
3195+b(Lua)e(F)-5 b(unctions)-42 2511 y Fo(This)17 b(example)e(illustrates)f
3196+(ho)o(w)i(a)h(C)f(function)g(can)h(call)e(the)i(Lua)g(function)f
3197+Fm(remove_blanks)f Fo(presen)o(ted)i(in)-42 2567 y(Section)f(8.3.)911
3198+2748 y(30)p eop
3199+%%Page: 31 31
3200+31 30 bop -42 628 1950 6 v -42 722 a Fm(void)24 b(math_max)f(\(void\))
3201+-42 778 y({)-18 834 y(int)h(i=1;)71 b(/*)23 b(number)g(of)h(arguments)f
3202+(*/)-18 891 y(double)g(d,)h(dmax;)-18 947 y(lua_Object)f(o;)-18
3203+1004 y(/*)h(the)f(function)g(must)g(get)h(at)g(least)f(one)g(argument)g
3204+(*/)-18 1060 y(if)h(\(\(o)f(=)h(lua_getparam\(i++\)\))e(==)h
3205+(LUA_NOOBJECT\))30 1117 y(lua_error)g(\("too)g(few)g(arguments)g(to)h
3206+(function)e(`max'"\);)-18 1173 y(/*)i(and)f(this)h(argument)e(must)i
3207+(be)f(a)h(number)f(*/)-18 1230 y(if)h(\(!lua_isnumber\(o\)\))30
3208+1286 y(lua_error)f(\("incorrect)f(argument)h(to)g(function)g(`max'"\);)
3209+-18 1343 y(dmax)h(=)f(lua_getnumber)f(\(o\);)-18 1399
3210+y(/*)i(loops)f(until)g(there)g(is)h(no)g(more)f(arguments)g(*/)-18
3211+1455 y(while)h(\(\(o)f(=)h(lua_getparam\(i++\)\))d(!=)j(LUA_NOOBJECT\))
3212+-18 1512 y({)6 1568 y(if)g(\(!lua_isnumber\(o\)\))54
3213+1625 y(lua_error)f(\("incorrect)f(argument)h(to)g(function)g(`max'"\);)
3214+6 1681 y(d)h(=)g(lua_getnumber)e(\(o\);)6 1738 y(if)i(\(d)f(>)h(dmax\))
3215+f(dmax)h(=)f(d;)-18 1794 y(})-18 1851 y(/*)h(push)f(the)h(result)f(to)g
3216+(be)h(returned)f(*/)-18 1907 y(lua_pushnumber)f(\(dmax\);)-42
3217+1964 y(})623 2099 y Fo(Figure)14 b(4:)20 b(C)15 b(function)g
3218+Fm(math)p 1147 2099 15 2 v 16 w(max)p Fo(.)p -42 2155
3219+1950 6 v 911 2748 a(31)p eop
3220+%%Page: 32 32
3221+32 31 bop -42 199 a Fm(void)24 b(remove_blanks)e(\(char)h(*s\))-42
3222+256 y({)6 312 y(lua_pushstring\(s\);)45 b(/*)24 b(prepare)f(parameter)g
3223+(*/)6 369 y(lua_call\("remove_blanks"\);)44 b(/*)24 b(call)f(Lua)h
3224+(function)f(*/)6 425 y(strcpy\(s,)g(lua_getstring\(lua_getresu)o
3225+(lt\(1\)\)\))o(;)45 b(/*)24 b(copy)f(result)g(back)g(to)h('s')f(*/)-42
3226+482 y(})-42 625 y Fp(Ac)n(kno)n(wledgmen)n(ts)-42 726
3227+y Fo(The)15 b(authors)f(w)o(ould)f(lik)o(e)h(to)f(thank)h(CENPES/PETR)o
3228+(OBR)1053 715 y(\023)1047 726 y(AS)h(whic)o(h,)f(join)o(tly)f(with)h
3229+Fa(T)l(eC)1574 740 y(Graf)1656 726 y Fo(,)g(used)h(exten-)-42
3230+783 y(siv)o(ely)i(early)g(v)o(ersions)g(of)h(this)f(system)f(and)i(ga)o
3231+(v)o(e)f(v)m(aluable)g(commen)o(ts.)25 b(The)18 b(authors)f(w)o(ould)g
3232+(also)g(lik)o(e)g(to)-42 839 y(thank)f(Carlos)d(Henrique)j(Levy)l(,)f
3233+(who)g(found)h(the)f(name)f(of)h(the)h(game.)i(Lua)d(means)g
3234+Fn(mo)n(on)g Fo(in)g(P)o(ortuguese.)-42 982 y Fp(A)68
3235+b(Incompatibiliti)q(es)24 b(with)f(Previous)h(V)-6 b(ersions)-42
3236+1084 y Fo(Although)15 b(great)f(care)h(has)g(b)q(een)h(tak)o(en)f(to)f
3237+(a)o(v)o(oid)g(incompatibiliti)o(es)e(with)j(the)g(previous)g(public)g
3238+(v)o(ersions)f(of)-42 1140 y(Lua,)i(some)e(di\013erences)h(had)g(to)g
3239+(b)q(e)h(in)o(tro)q(duced.)k(Here)15 b(is)g(a)g(list)f(of)h(all)f
3240+(these)h(di\013erences.)-42 1262 y Fe(Incompatibilities)21
3241+b(with)f(v)n(ersion)f(2.2)27 1348 y Fj(\017)j Fo(F)l(unctions)15
3242+b Fm(date)f Fo(and)h Fm(time)f Fo(\(from)f Fm(iolib)p
3243+Fo(\))g(ha)o(v)o(e)i(b)q(een)h(sup)q(erseded)g(b)o(y)e(the)h(new)g(v)o
3244+(ersion)f(of)h(function)72 1404 y Fm(date)p Fo(.)27 1498
3245+y Fj(\017)22 b Fo(F)l(unction)17 b Fm(append)g Fo(\(from)e
3246+Fm(iolib)p Fo(\))i(no)o(w)f(returns)i(1)f(whenev)o(er)h(it)e(succeeds,)
3247+j(whether)e(the)h(\014le)f(is)g(new)72 1555 y(or)e(not.)27
3248+1648 y Fj(\017)22 b Fo(F)l(unction)14 b Fm(int2str)g
3249+Fo(\(from)f Fm(strlib)p Fo(\))g(has)h(b)q(een)i(sup)q(erseded)g(b)o(y)e
3250+(new)h(function)g Fm(format)p Fo(,)e(with)h(param-)72
3251+1705 y(eter)h Fm("\045c")p Fo(.)27 1799 y Fj(\017)22
3252+b Fo(The)15 b(API)h(lo)q(c)o(k)f(mec)o(hanism)d(has)j(b)q(een)h(sup)q
3253+(erseded)h(b)o(y)e(the)g(reference)h(mec)o(hanism.)h(Ho)o(w)o(ev)o(er,)
3254+d Fm(lua.h)72 1855 y Fo(pro)o(vides)h(compatibilit)n(y)e(macros,)g(so)h
3255+(there)i(is)e(no)i(need)g(to)e(c)o(hange)h(programs.)27
3256+1949 y Fj(\017)22 b Fo(API)16 b(function)f Fm(lua_pushliteral)e
3257+Fo(no)o(w)i(is)f(just)h(a)g(macro)f(to)g Fm(lua_pushstring)p
3258+Fo(.)-42 2071 y Fe(Incompatibilities)21 b(with)f(v)n(ersion)f(2.1)27
3259+2156 y Fj(\017)j Fo(The)13 b(function)f Fm(type)g Fo(no)o(w)g(returns)h
3260+(the)f(string)g Fm("function")f Fo(b)q(oth)h(for)g(C)g(and)h(Lua)g
3261+(functions.)19 b(Because)72 2213 y(Lua)f(functions)g(and)g(C)g
3262+(functions)f(are)h(compatible,)e(this)i(b)q(eha)o(vior)f(is)g(usually)h
3263+(more)e(useful.)28 b(When)72 2269 y(needed,)20 b(the)e(second)g(result)
3264+g(of)f(function)h Fm(type)f Fo(ma)o(y)f(b)q(e)j(used)g(to)e
3265+(distinguish)g(b)q(et)o(w)o(een)h(Lua)h(and)f(C)72 2326
3266+y(functions.)27 2420 y Fj(\017)k Fo(A)15 b(function)g(de\014nition)g
3267+(only)g(assigns)f(the)h(function)g(v)m(alue)g(to)g(the)g(giv)o(en)f(v)m
3268+(ariable)h(at)f(execution)h(time.)911 2748 y(32)p eop
3269+%%Page: 33 33
3270+33 32 bop -42 199 a Fe(Incompatibilities)21 b(with)f(v)n(ersion)f(1.1)
3271+27 285 y Fj(\017)j Fo(The)16 b(equalit)o(y)e(test)g(op)q(erator)h(no)o
3272+(w)f(is)h(denoted)h(b)o(y)f Fm(==)p Fo(,)f(instead)h(of)g
3273+Fm(=)p Fo(.)27 379 y Fj(\017)22 b Fo(The)13 b(syn)o(tax)f(for)g(table)g
3274+(construction)g(has)h(b)q(een)h(greatly)d(simpli\014ed.)18
3275+b(The)13 b(old)f Fm(@\(size\))g Fo(has)g(b)q(een)i(sub-)72
3276+435 y(stituted)h(b)o(y)h Fm({})p Fo(.)21 b(The)16 b(list)e(constructor)
3277+h(\(formerly)e Fm(@[...])p Fo(\))i(and)h(the)f(record)h(constructor)f
3278+(\(formerly)72 492 y Fm(@{...})p Fo(\))f(no)o(w)g(are)h(b)q(oth)f(co)q
3279+(ded)i(lik)o(e)e Fm({...})p Fo(.)19 b(When)c(the)g(construction)f(in)o
3280+(v)o(olv)o(es)g(a)g(function)h(call,)e(lik)o(e)72 548
3281+y(in)i Fm(@func{...})p Fo(,)e(the)i(new)g(syn)o(tax)f(do)q(es)i(not)e
3282+(use)h(the)g Fm(@)p Fo(.)20 b(More)14 b(imp)q(ortan)o(t,)e
3283+Fn(a)17 b(c)n(onstruction)e(function)72 605 y(must)i(now)f(explicitly)g
3284+(r)n(eturn)g(the)g(c)n(onstructe)n(d)g(table)p Fo(.)27
3285+699 y Fj(\017)22 b Fo(The)16 b(function)f Fm(lua_call)f
3286+Fo(no)h(longer)f(has)h(the)h(parameter)d Fm(nparam)p
3287+Fo(.)27 792 y Fj(\017)22 b Fo(The)g(function)f Fm(lua_pop)g
3288+Fo(is)g(no)h(longer)e(a)o(v)m(ailable,)i(since)g(it)f(could)g(lead)g
3289+(to)g(strange)g(b)q(eha)o(vior.)39 b(In)72 849 y(particular,)18
3290+b(to)h(access)g(results)g(returned)g(from)f(a)g(Lua)i(function,)f(the)h
3291+(new)f(macro)e Fm(lua_getresult)72 905 y Fo(should)e(b)q(e)h(used.)27
3292+999 y Fj(\017)22 b Fo(The)16 b(old)e(functions)h Fm(lua_storefield)f
3293+Fo(and)h Fm(lua_storeindexed)e Fo(ha)o(v)o(e)i(b)q(een)h(replaced)f(b)o
3294+(y)72 1112 y Fm(int)24 b(lua_storesubscript)d(\(void\);)72
3295+1224 y Fo(with)15 b(the)g(parameters)e(explicitly)h(pushed)j(on)e(the)g
3296+(stac)o(k.)27 1318 y Fj(\017)22 b Fo(The)12 b(functionalit)o(y)e(of)i
3297+(the)g(function)f Fm(lua_errorfunction)f Fo(has)h(b)q(een)i(replaced)f
3298+(b)o(y)g(the)g Fn(fal)r(lb)n(ack)f Fo(mec)o(h-)72 1374
3299+y(anism;)i(see)j(Section)f(4.8.)27 1468 y Fj(\017)22
3300+b Fo(When)16 b(calling)e(a)h(function)h(from)d(the)j(Lua)g(library)l(,)
3301+e(parameters)g(passed)h(through)h(the)f(stac)o(k)g(m)o(ust)f(b)q(e)72
3302+1525 y(pushed)20 b(just)f(b)q(efore)g(the)g(corresp)q(onden)o(t)g
3303+(call,)f(with)g(no)h(in)o(termediate)e(calls)g(to)i(Lua.)31
3304+b(Sp)q(ecial)19 b(care)72 1581 y(should)c(b)q(e)h(tak)o(en)f(with)f
3305+(macros)g(lik)o(e)g Fm(lua_getindexed)f Fo(and)j Fm(lua_getfield)p
3306+Fo(.)911 2748 y(33)p eop
3307+%%Page: 34 34
3308+34 33 bop -42 264 a Fp(Index)-42 354 y Fo(..)20 b(6)-42
3309+411 y(abs)c(19)-42 467 y(acos)f(19)-42 524 y(Adjustmen)o(t)f(4)-42
3310+580 y(and)i(6)-42 637 y(app)q(endto)g(20)-42 693 y(argumen)o(ts)e(8)-42
3311+749 y(arithmetic)f(fallbac)o(k)h(9)-42 806 y(arithmetic)f(op)q(erators)
3312+i(6)-42 862 y(arra)o(ys)f(3)-42 919 y(ascii)h(19)-42
3313+975 y(asin)g(19)-42 1032 y(assert)g(17)-42 1088 y(Assignmen)o(t)f(4)-42
3314+1145 y(asso)q(ciativ)o(e)g(arra)o(ys)g(3)-42 1201 y(atan)h(19)-42
3315+1258 y(atan2)g(19)-42 1314 y(basic)g(t)o(yp)q(es)h(2)-42
3316+1370 y(blo)q(c)o(k)f(4)-42 1427 y(C)g(p)q(oin)o(ters)g(2)-42
3317+1483 y(ceil)g(19)-42 1540 y(CF)l(unction)g(2)-42 1596
3318+y(c)o(h)o(unk)h(2)-42 1653 y(clone)g(24)-42 1709 y(closing)f(a)g
3319+(\014le)g(20)-42 1766 y(Co)q(ercion)g(3)-42 1822 y(Commen)o(ts)e(3)-42
3320+1879 y(concatenation)i(fallbac)o(k)f(10)-42 1935 y(concatenation)h(6)
3321+-42 1991 y(condition)g(expression)g(5)-42 2048 y(constructors)g(7)-42
3322+2104 y(cos)g(19)-42 2161 y(Data)f(Structures)i(24)-42
3323+2217 y(date)f(22)-42 2274 y(debug)h(pragma)e(11)-42 2330
3324+y(do\014le)i(16)-42 2387 y(dostring)f(16)-42 2443 y(error)g(fallbac)o
3325+(k)f(10)-42 2500 y(error)h(18)-42 2556 y(exit)g(22)-42
3326+2612 y(exp)q(onen)o(tiation)g(6)1006 354 y(Expressions)g(5)1006
3327+411 y(fallbac)o(ks)f(9)1006 467 y(\015o)q(or)h(19)1006
3328+524 y(format)e(19)1006 580 y(function)i(call)f(8)1006
3329+637 y(F)l(unction)h(De\014nitions)g(8)1006 693 y(function)g(falbac)o(k)
3330+f(10)1006 749 y(function)h(2)1006 806 y(functions)g(in)g(C)g(30)1006
3331+862 y(getglobal)f(18)1006 919 y(gettable)g(fallbac)o(k)g(10)1006
3332+975 y(global)g(en)o(vironmen)o(t)f(2)1006 1032 y(Global)h(v)m(ariables)
3333+g(2)1006 1088 y(Iden)o(ti\014ers)i(3)1006 1145 y(if-then-else)f(5)1006
3334+1201 y(index)h(fallbac)o(k)e(10)1006 1258 y(index)i(getglobal)d(10)1006
3335+1314 y(inheritance)i(27)1006 1370 y(Literal)f(strings)g(3)1006
3336+1427 y(Lo)q(cal)h(v)m(ariables)g(5)1006 1483 y(log10)f(19)1006
3337+1540 y(log)g(19)1006 1596 y(logical)g(op)q(erators)g(6)1006
3338+1653 y(luac)h(11)1006 1709 y(luac)g(2)1006 1766 y(lua)p
3339+1070 1766 14 2 v 16 w(call)f(14)1006 1822 y(lua)p 1070
3340+1822 V 16 w(callfunction)g(14)1006 1879 y(lua)p 1070
3341+1879 V 16 w(CF)l(unction)h(15)1006 1935 y(lua)p 1070
3342+1935 V 16 w(createtable)g(13)1006 1991 y(lua)p 1070 1991
3343+V 16 w(do\014le)g(11)1006 2048 y(lua)p 1070 2048 V 16
3344+w(dostring)f(11)1006 2104 y(lua)p 1070 2104 V 16 w(error)h(14)1006
3345+2161 y(lua)p 1070 2161 V 16 w(getcfunction)g(12)1006
3346+2217 y(lua)p 1070 2217 V 16 w(getglobal)f(13)1006 2274
3347+y(lua)p 1070 2274 V 16 w(getn)o(um)o(b)q(er)g(12)1006
3348+2330 y(lua)p 1070 2330 V 16 w(getparam)f(15)1006 2387
3349+y(lua)p 1070 2387 V 16 w(getref)i(15)1006 2443 y(lua)p
3350+1070 2443 V 16 w(getresult)f(14)1006 2500 y(lua)p 1070
3351+2500 V 16 w(getstring)g(12)1006 2556 y(lua)p 1070 2556
3352+V 16 w(getsubscript)h(13)1006 2612 y(lua)p 1070 2612
3353+V 16 w(getuserdata)f(12)911 2748 y(34)p eop
3354+%%Page: 35 35
3355+35 34 bop -42 199 a Fo(lua)p 22 199 14 2 v 16 w(iscfunction)15
3356+b(12)-42 256 y(lua)p 22 256 V 16 w(isfunction)g(12)-42
3357+312 y(lua)p 22 312 V 16 w(isnil)g(12)-42 369 y(lua)p
3358+22 369 V 16 w(isn)o(um)o(b)q(er)g(12)-42 425 y(lua)p
3359+22 425 V 16 w(isstring)f(12)-42 482 y(lua)p 22 482 V
3360+16 w(istable)h(12)-42 538 y(lua)p 22 538 V 16 w(isuserdata)g(12)-42
3361+594 y(LUA)p 57 594 V 17 w(NOOBJECT)i(15)-42 651 y(lua)p
3362+22 651 V 16 w(Ob)s(ject)f(11)-42 707 y(lua)p 22 707 V
3363+16 w(pushcfunction)g(13)-42 764 y(lua)p 22 764 V 16 w(pushnil)g(13)-42
3364+820 y(lua)p 22 820 V 16 w(pushn)o(um)o(b)q(er)g(13)-42
3365+877 y(lua)p 22 877 V 16 w(pushob)s(ject)g(13)-42 933
3366+y(lua)p 22 933 V 16 w(pushref)g(15)-42 990 y(lua)p 22
3367+990 V 16 w(pushstring)f(13)-42 1046 y(lua)p 22 1046 V
3368+16 w(push)o(userdata)h(13)-42 1103 y(lua)p 22 1103 V
3369+16 w(push)o(usertag)f(13)-42 1159 y(lua)p 22 1159 V 16
3370+w(ref)h(15)-42 1215 y(lua)p 22 1215 V 16 w(register)f(15)-42
3371+1272 y(lua)p 22 1272 V 16 w(setfallbac)o(k)f(15)-42 1328
3372+y(lua)p 22 1328 V 16 w(storeglobal)g(13)-42 1385 y(lua)p
3373+22 1385 V 16 w(storesubscript)h(13)-42 1441 y(lua)p 22
3374+1441 V 16 w(t)o(yp)q(e)h(12)-42 1498 y(lua)p 22 1498
3375+V 16 w(unref)g(15)-42 1554 y(max)e(19)-42 1611 y(metho)q(ds)h(9)-42
3376+1667 y(min)f(19)-42 1724 y(mo)q(d)h(19)-42 1780 y(Mo)q(dules)h(29)-42
3377+1836 y(m)o(ultiple)e(assignmen)o(t)f(4)-42 1893 y(next)j(16)-42
3378+1949 y(next)g(24)-42 2006 y(nextv)m(ar)g(17)-42 2062
3379+y(nextv)m(ar)g(24)-42 2119 y(nil)f(2)-42 2175 y(not)g(6)-42
3380+2232 y(n)o(um)o(b)q(er)g(2)-42 2288 y(Numerical)f(constan)o(ts)g(3)-42
3381+2345 y(Op)q(erator)h(precedence)i(7)-42 2401 y(or)e(6)-42
3382+2457 y(order)g(fallbac)o(k)f(9)-42 2514 y(P)o(ersistence)h(26)-42
3383+2570 y(pip)q(ed)h(input)g(20)1006 199 y(pip)q(ed)g(output)f(20)1006
3384+256 y(p)q(op)q(en)h(20)1006 312 y(p)q(op)q(en)g(20)1006
3385+369 y(pre-compilation)d(2)1006 425 y(prede\014ned)k(functions)e(16)1006
3386+482 y(prin)o(t)g(17)1006 538 y(Programmi)o(ng)d(with)j(Classes)f(27)
3387+1006 594 y(random)g(19)1006 651 y(randomseed)h(19)1006
3388+707 y(read)g(20)1006 764 y(readfrom)f(20)1006 820 y(readun)o(til)g(21)
3389+1006 877 y(records)h(3)1006 933 y(reference)h(15)1006
3390+990 y(re\015exivit)o(y)e(16)1006 1046 y(relational)f(op)q(erators)i(6)
3391+1006 1103 y(remo)o(v)o(e)f(20)1006 1159 y(rename)g(20)1006
3392+1215 y(rep)q(eat-un)o(til)h(5)1006 1272 y(reserv)o(ed)g(w)o(ords)g(3)
3393+1006 1328 y(return)g(statemen)o(t)e(4)1006 1385 y(return)i(statemen)o
3394+(t)e(5)1006 1441 y(self)i(9)1006 1498 y(setfallbac)o(k)f(10)1006
3395+1554 y(setfallbac)o(k)g(18)1006 1611 y(setglobal)g(18)1006
3396+1667 y(settable)h(fallbac)o(k)f(10)1006 1724 y(short-cut)h(ev)m
3397+(aluation)f(6)1006 1780 y(Simple)g(Expressions)h(5)1006
3398+1836 y(sin)g(19)1006 1893 y(sqrt)g(19)1006 1949 y(statemen)o(ts)e(4)
3399+1006 2006 y(str\014nd)i(18)1006 2062 y(string)f(2)1006
3400+2119 y(strlen)h(18)1006 2175 y(strlo)o(w)o(er)e(18)1006
3401+2232 y(strsub)i(18)1006 2288 y(strupp)q(er)h(19)1006
3402+2345 y(table)f(2)1006 2401 y(tag)f(17)1006 2457 y(tan)h(19)1006
3403+2514 y(tmpname)e(20)1006 2570 y(tok)o(ens)i(3)911 2748
3404+y(35)p eop
3405+%%Page: 36 36
3406+36 35 bop -42 199 a Fo(ton)o(um)o(b)q(er)14 b(17)-42
3407+256 y(tostring)g(17)-42 312 y(t)o(yp)q(e)i(17)-42 369
3408+y(T)o(yp)q(es)g(2)-42 425 y(userdata)f(2)-42 482 y(V)l(ariable)g(n)o
3409+(um)o(b)q(er)f(of)h(argumen)o(ts)f(25)-42 538 y(v)o(ersion)h(1.1)f(33)
3410+-42 594 y(v)o(ersion)h(2.1)f(32)-42 651 y(v)o(ersion)h(2.2)f(32)-42
3411+707 y(while-do)h(5)-42 764 y(write)g(21)-42 820 y(writeto)f(20)911
3412+2748 y(36)p eop
3413+%%Page: 37 37
3414+37 36 bop -42 199 a Fp(Con)n(ten)n(ts)-42 301 y Fl(1)43
3415+b(In)o(tro)q(duction)1567 b(1)-42 403 y(2)43 b(En)o(vironmen)o(t)14
3416+b(and)k(Ch)o(unks)1268 b(2)-42 505 y(3)43 b(T)o(yp)q(es)1717
3417+b(2)-42 607 y(4)43 b(The)17 b(Language)1534 b(3)27 663
3418+y Fo(4.1)45 b(Lexical)15 b(Con)o(v)o(en)o(tions)40 b(.)22
3419+b(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)g
3420+(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)g(.)
3421+65 b(3)27 720 y(4.2)45 b(Co)q(ercion)16 b(.)23 b(.)f(.)g(.)h(.)f(.)h(.)
3422+f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)h(.)f
3423+(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)
3424+g(.)65 b(3)27 776 y(4.3)45 b(Adjustmen)o(t)28 b(.)22
3425+b(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g
3426+(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)
3427+h(.)f(.)h(.)f(.)g(.)65 b(4)27 833 y(4.4)45 b(Statemen)o(ts)40
3428+b(.)22 b(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)
3429+f(.)g(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f
3430+(.)g(.)h(.)f(.)h(.)f(.)g(.)65 b(4)131 889 y(4.4.1)51
3431+b(Blo)q(c)o(ks)22 b(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f
3432+(.)g(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)
3433+g(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)g(.)65 b(4)131 946 y(4.4.2)51
3434+b(Assignmen)o(t)27 b(.)22 b(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h
3435+(.)f(.)g(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)
3436+f(.)g(.)h(.)f(.)h(.)f(.)g(.)65 b(4)131 1002 y(4.4.3)51
3437+b(Con)o(trol)13 b(Structures)30 b(.)22 b(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)
3438+f(.)g(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f
3439+(.)g(.)h(.)f(.)h(.)f(.)g(.)65 b(5)131 1059 y(4.4.4)51
3440+b(F)l(unction)15 b(Calls)f(as)g(Statemen)o(ts)30 b(.)22
3441+b(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g
3442+(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)g(.)65 b(5)131 1115 y(4.4.5)51
3443+b(Lo)q(cal)15 b(Declarations)28 b(.)22 b(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)
3444+f(.)g(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f
3445+(.)g(.)h(.)f(.)h(.)f(.)g(.)65 b(5)27 1171 y(4.5)45 b(Expressions)30
3446+b(.)22 b(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)
3447+f(.)g(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f
3448+(.)g(.)h(.)f(.)h(.)f(.)g(.)65 b(5)131 1228 y(4.5.1)51
3449+b(Simple)14 b(Expressions)k(.)k(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h
3450+(.)f(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)
3451+f(.)h(.)f(.)g(.)65 b(5)131 1284 y(4.5.2)51 b(Arithmetic)13
3452+b(Op)q(erators)41 b(.)22 b(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)h(.)f
3453+(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)
3454+g(.)65 b(6)131 1341 y(4.5.3)51 b(Relational)13 b(Op)q(erators)19
3455+b(.)k(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)g
3456+(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)g(.)65
3457+b(6)131 1397 y(4.5.4)51 b(Logical)14 b(Op)q(erators)44
3458+b(.)22 b(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)g(.)h(.)
3459+f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)g(.)65
3460+b(6)131 1454 y(4.5.5)51 b(Concatenation)40 b(.)23 b(.)f(.)g(.)h(.)f(.)g
3461+(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)
3462+h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)g(.)65 b(6)131
3463+1510 y(4.5.6)51 b(Precedence)40 b(.)22 b(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)
3464+h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h
3465+(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)g(.)65 b(7)131
3466+1567 y(4.5.7)51 b(T)l(able)15 b(Constructors)j(.)k(.)h(.)f(.)g(.)h(.)f
3467+(.)g(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)
3468+g(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)g(.)65 b(7)131 1623 y(4.5.8)51
3469+b(F)l(unction)15 b(Calls)39 b(.)23 b(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)
3470+h(.)f(.)g(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h
3471+(.)f(.)g(.)h(.)f(.)h(.)f(.)g(.)65 b(8)27 1680 y(4.6)45
3472+b(F)l(unction)15 b(De\014nitions)35 b(.)22 b(.)h(.)f(.)g(.)h(.)f(.)g(.)
3473+h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h
3474+(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)g(.)65 b(8)27
3475+1736 y(4.7)45 b(F)l(allbac)o(ks)f(.)22 b(.)g(.)h(.)f(.)h(.)f(.)g(.)h(.)
3476+f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)g(.)h(.)f
3477+(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)g(.)65
3478+b(9)27 1792 y(4.8)45 b(Error)14 b(Handling)31 b(.)22
3479+b(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f
3480+(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)
3481+h(.)f(.)g(.)42 b(10)-42 1894 y Fl(5)h(The)17 b(Application)g(Program)f
3482+(In)o(terface)1020 b(11)27 1951 y Fo(5.1)45 b(Executing)15
3483+b(Lua)h(Co)q(de)32 b(.)22 b(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f
3484+(.)g(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)
3485+g(.)h(.)f(.)h(.)f(.)g(.)42 b(11)27 2007 y(5.2)j(Con)o(v)o(erting)14
3486+b(V)l(alues)h(b)q(et)o(w)o(een)h(C)f(and)g(Lua)27 b(.)c(.)f(.)g(.)h(.)f
3487+(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)
3488+h(.)f(.)g(.)42 b(11)27 2064 y(5.3)j(Manipulating)14 b(Lua)h(Ob)s(jects)
3489+20 b(.)i(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)g(.)h(.)
3490+f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)g(.)42
3491+b(13)27 2120 y(5.4)j(Calling)14 b(Lua)h(F)l(unctions)34
3492+b(.)23 b(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)
3493+g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)g
3494+(.)42 b(14)27 2177 y(5.5)j(C)15 b(F)l(unctions)22 b(.)g(.)h(.)f(.)h(.)f
3495+(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)
3496+g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)g
3497+(.)42 b(15)27 2233 y(5.6)j(References)17 b(to)d(Lua)i(Ob)s(jects)21
3498+b(.)h(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)g(.)h(.)f
3499+(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)g(.)42
3500+b(15)-42 2335 y Fl(6)h(Prede\014ned)16 b(F)l(unctions)h(and)h
3501+(Libraries)1024 b(16)27 2391 y Fo(6.1)45 b(Prede\014ned)17
3502+b(F)l(unctions)k(.)h(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)
3503+h(.)f(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h
3504+(.)f(.)h(.)f(.)g(.)42 b(16)27 2448 y(6.2)j(String)15
3505+b(Manipulation)35 b(.)22 b(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f
3506+(.)g(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)
3507+g(.)h(.)f(.)h(.)f(.)g(.)42 b(18)27 2504 y(6.3)j(Mathematical)12
3508+b(F)l(unctions)29 b(.)22 b(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h
3509+(.)f(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)
3510+f(.)h(.)f(.)g(.)42 b(19)27 2561 y(6.4)j(I/O)16 b(F)l(acilities)31
3511+b(.)23 b(.)f(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)
3512+g(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g
3513+(.)h(.)f(.)h(.)f(.)g(.)42 b(19)911 2748 y(37)p eop
3514+%%Page: 38 38
3515+38 37 bop -42 199 a Fl(7)43 b(The)17 b(Debuger)h(In)o(terface)1309
3516+b(22)27 256 y Fo(7.1)45 b(Stac)o(k)15 b(and)g(F)l(unction)g
3517+(Information)e(.)22 b(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)g(.)h
3518+(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)g(.)42
3519+b(22)27 312 y(7.2)j(Manipulating)14 b(Lo)q(cal)h(V)l(ariables)29
3520+b(.)22 b(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)g(.)
3521+h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)g(.)42
3522+b(23)27 369 y(7.3)j(Ho)q(oks)34 b(.)22 b(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)
3523+g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)g
3524+(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)g(.)
3525+42 b(23)-42 471 y Fl(8)h(Some)16 b(Examples)1468 b(23)27
3526+527 y Fo(8.1)45 b(Data)14 b(Structures)i(.)22 b(.)h(.)f(.)g(.)h(.)f(.)g
3527+(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)g(.)
3528+h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)g(.)42
3529+b(24)27 583 y(8.2)j(The)16 b(F)l(unctions)f Fm(next)f
3530+Fo(and)i Fm(nextvar)i Fo(.)23 b(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)g
3531+(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)g(.)
3532+42 b(24)27 640 y(8.3)j(String)15 b(Manipulation)35 b(.)22
3533+b(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)g
3534+(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)g(.)
3535+42 b(25)27 696 y(8.4)j(V)l(ariable)15 b(n)o(um)o(b)q(er)f(of)h(argumen)
3536+o(ts)d(.)22 b(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)g(.)h(.)f
3537+(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)g(.)42
3538+b(25)27 753 y(8.5)j(P)o(ersistence)e(.)22 b(.)h(.)f(.)h(.)f(.)g(.)h(.)f
3539+(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)
3540+g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)g(.)42
3541+b(26)27 809 y(8.6)j(Inheritance)40 b(.)22 b(.)h(.)f(.)h(.)f(.)g(.)h(.)f
3542+(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)
3543+g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)g(.)42
3544+b(27)27 866 y(8.7)j(Programmi)o(ng)12 b(with)j(Classes)e(.)22
3545+b(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)g
3546+(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)g(.)42
3547+b(27)27 922 y(8.8)j(Mo)q(dules)25 b(.)e(.)f(.)g(.)h(.)f(.)h(.)f(.)g(.)h
3548+(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)g(.)h(.)
3549+f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)g(.)42
3550+b(29)27 979 y(8.9)j(A)15 b(CF)l(unction)41 b(.)23 b(.)f(.)h(.)f(.)g(.)h
3551+(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)g(.)h(.)
3552+f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)g(.)42
3553+b(30)27 1035 y(8.10)22 b(Calling)14 b(Lua)h(F)l(unctions)34
3554+b(.)23 b(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)
3555+g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)g
3556+(.)42 b(30)-42 1137 y Fl(A)29 b(Incompatibilities)14
3557+b(with)j(Previous)f(V)l(ersions)899 b(32)911 2748 y Fo(38)p
3558+eop
3559+%%Trailer
3560+end
3561+userdict /end-hook known{end-hook}if
3562+%%EOF
domake+0−11
@@ -1,11 +0,0 @@
1−#!/bin/sh -x
2−# makefile for lua hierarchy
3−
4−VERSION=2.2
5−LUA=`pwd`
6−export LUA VERSION
7−
8−cd $LUA/src; make $*
9−cd $LUA/include; make $*
10−cd $LUA/clients/lib; make $*
11−cd $LUA/clients/lua; make $*
include/Makefile+5−3
@@ -1,11 +1,13 @@
1−# makefile for lua distribution
1+# makefile for lua distribution (includes)
2+
3+LUA= ..
4+
5+include $(LUA)/config
26
37 SRCS= lua.h lualib.h luadebug.h
48
59 all:
610
7−dynamic:
8−
911 clean:
1012
1113 co:
include/lua.h+24−16
@@ -2,14 +2,14 @@ · 1 unmodified line
22 ** LUA - Linguagem para Usuarios de Aplicacao
33 ** Grupo de Tecnologia em Computacao Grafica
44 ** TeCGraf - PUC-Rio
5−** $Id: lua.h,v 3.21 1995/11/13 15:36:52 roberto Exp $
5+** $Id: lua.h,v 3.28 1996/05/06 14:32:59 roberto Exp $
66 */
77
88
99 #ifndef lua_h
1010 #define lua_h
1111
12−#define LUA_VERSION "Lua 2.2"
12+#define LUA_VERSION "Lua 2.4"
1313 #define LUA_COPYRIGHT "Copyright (C) 1994, 1995 TeCGraf"
1414 #define LUA_AUTHORS "W. Celes, R. Ierusalimschy & L. H. de Figueiredo"
1515
@@ -52,6 +52,14 @@ void lua_endblock (void); · 36 unmodified lines
5252 lua_Object lua_getparam (int number);
5353 #define lua_getresult(_) lua_getparam(_)
5454
55+#define lua_isnil(_) (lua_type(_)==LUA_T_NIL)
56+#define lua_istable(_) (lua_type(_)==LUA_T_ARRAY)
57+#define lua_isuserdata(_) (lua_type(_)>=LUA_T_USERDATA)
58+#define lua_iscfunction(_) (lua_type(_)==LUA_T_CFUNCTION)
59+int lua_isnumber (lua_Object object);
60+int lua_isstring (lua_Object object);
61+int lua_isfunction (lua_Object object);
62+
5563 float lua_getnumber (lua_Object object);
5664 char *lua_getstring (lua_Object object);
5765 lua_CFunction lua_getcfunction (lua_Object object);
@@ -60,7 +68,6 @@ void *lua_getuserdata (lua_Object object); · 2 unmodified lines
6068 void lua_pushnil (void);
6169 void lua_pushnumber (float n);
6270 void lua_pushstring (char *s);
63−void lua_pushliteral (char *s);
6471 void lua_pushcfunction (lua_CFunction fn);
6572 void lua_pushusertag (void *u, int tag);
6673 void lua_pushobject (lua_Object object);
@@ -73,32 +80,33 @@ lua_Object lua_getsubscript (void); · 6 unmodified lines
7380
7481 int lua_type (lua_Object object);
7582
76−int lua_lock (void);
77−lua_Object lua_getlocked (int ref);
78−void lua_pushlocked (int ref);
79−void lua_unlock (int ref);
83+
84+int lua_ref (int lock);
85+lua_Object lua_getref (int ref);
86+void lua_pushref (int ref);
87+void lua_unref (int ref);
8088
8189 lua_Object lua_createtable (void);
8290
8391
8492 /* some useful macros */
8593
86−#define lua_lockobject(o) (lua_pushobject(o), lua_lock())
94+#define lua_refobject(o,l) (lua_pushobject(o), lua_ref(l))
8795
8896 #define lua_register(n,f) (lua_pushcfunction(f), lua_storeglobal(n))
8997
9098 #define lua_pushuserdata(u) lua_pushusertag(u, LUA_T_USERDATA)
9199
92−#define lua_isnil(_) (lua_type(_)==LUA_T_NIL)
93−#define lua_isnumber(_) (lua_type(_)==LUA_T_NUMBER)
94−#define lua_isstring(_) (lua_type(_)==LUA_T_STRING)
95−#define lua_istable(_) (lua_type(_)==LUA_T_ARRAY)
96−#define lua_isfunction(_) (lua_type(_)==LUA_T_FUNCTION)
97−#define lua_iscfunction(_) (lua_type(_)==LUA_T_CFUNCTION)
98−#define lua_isuserdata(_) (lua_type(_)>=LUA_T_USERDATA)
99100
101+/* for compatibility with old versions. Avoid using these macros */
102+
103+#define lua_lockobject(o) lua_refobject(o,1)
104+#define lua_lock() lua_ref(1)
105+#define lua_getlocked lua_getref
106+#define lua_pushlocked lua_pushref
107+#define lua_unlock lua_unref
100108
101−/* for lua 1.1 compatibility. Avoid using these macros */
109+#define lua_pushliteral(o) lua_pushstring(o)
102110
103111 #define lua_getindexed(o,n) (lua_pushobject(o), lua_pushnumber(n), lua_getsubscript())
104112 #define lua_getfield(o,f) (lua_pushobject(o), lua_pushliteral(f), lua_getsubscript())
include/luadebug.h+15−4
@@ -2,7 +2,7 @@ · 1 unmodified line
22 ** LUA - Linguagem para Usuarios de Aplicacao
33 ** Grupo de Tecnologia em Computacao Grafica
44 ** TeCGraf - PUC-Rio
5−** $Id: luadebug.h,v 1.2 1995/10/26 14:21:56 roberto Exp $
5+** $Id: luadebug.h,v 1.6 1996/03/20 17:05:44 roberto Exp $
66 */
77
88
@@ -11,10 +11,21 @@ · 2 unmodified lines
1111
1212 #include "lua.h"
1313
14−lua_Object lua_stackedfunction(int level);
14+typedef lua_Object lua_Function;
15+
16+typedef void (*lua_LHFunction) (int line);
17+typedef void (*lua_CHFunction) (lua_Function func, char *file, int line);
18+
19+lua_Function lua_stackedfunction (int level);
1520 void lua_funcinfo (lua_Object func, char **filename, int *linedefined);
16−int lua_currentline (lua_Object func);
17−char *getobjname (lua_Object o, char **name);
21+int lua_currentline (lua_Function func);
22+char *lua_getobjname (lua_Object o, char **name);
23+
24+lua_Object lua_getlocal (lua_Function func, int local_number, char **name);
25+int lua_setlocal (lua_Function func, int local_number);
1826
27+extern lua_LHFunction lua_linehook;
28+extern lua_CHFunction lua_callhook;
29+extern int lua_debug;
1930
2031 #endif
include/lualib.h+13−2
@@ -2,21 +2,32 @@ · 1 unmodified line
22 ** Libraries to be used in LUA programs
33 ** Grupo de Tecnologia em Computacao Grafica
44 ** TeCGraf - PUC-Rio
5−** $Id: lualib.h,v 1.4 1995/11/10 17:54:31 roberto Exp $
5+** $Id: lualib.h,v 1.8 1996/04/30 21:13:55 roberto Exp $
66 */
77
88 #ifndef lualib_h
99 #define lualib_h
1010
11+#include "lua.h"
12+
1113 void iolib_open (void);
1214 void strlib_open (void);
1315 void mathlib_open (void);
1416
1517
1618 /* auxiliar functions (private) */
19+
20+struct lua_reg {
21+ char *name;
22+ lua_CFunction func;
23+};
24+
25+void luaI_openlib (struct lua_reg *l, int n);
1726 void lua_arg_error(char *funcname);
1827 char *lua_check_string (int numArg, char *funcname);
19−float lua_check_number (int numArg, char *funcname);
28+double lua_check_number (int numArg, char *funcname);
29+char *luaI_addchar (int c);
30+void luaI_addquoted (char *s);
2031
2132 #endif
2233
src/Makefile+47−21
@@ -1,40 +1,66 @@
1−# makefile for lua distribution
1+# makefile for lua distribution (main library)
22
3−INC= $(LUA)/include
4−LIB= $(LUA)/lib
3+LUA= ..
54
6−# in SunOs /usr/5include contains prototypes for standard lib
7−INCS= -I/usr/5include -I$(INC)
8−WARN= -Wall -Wmissing-prototypes -Wshadow -ansi
5+include $(LUA)/config
96
10−CC= gcc
11−CFLAGS= $(INCS) $(DEFS) $(WARN) -O2
7+OBJS= fallback.o\
8+ func.o\
9+ hash.o\
10+ inout.o\
11+ lex.o\
12+ mem.o\
13+ opcode.o\
14+ parser.o\
15+ table.o\
16+ tree.o\
17+ undump.o
1218
13−OBJS= fallback.o func.o hash.o inout.o lex.o mem.o opcode.o parser.o table.o tree.o
14−SRCS= fallback.c func.c hash.c inout.c lex.c mem.c opcode.c table.c tree.c fallback.h func.h hash.h inout.h mem.h opcode.h table.h tree.h types.h ugly.h lua.stx
19+SRCS= fallback.c\
20+ fallback.h\
21+ func.c\
22+ func.h\
23+ hash.c\
24+ hash.h\
25+ inout.c\
26+ inout.h\
27+ lex.c\
28+ lex.h\
29+ mem.c\
30+ mem.h\
31+ opcode.c\
32+ opcode.h\
33+ parser.c\
34+ parser.h\
35+ table.c\
36+ table.h\
37+ tree.c\
38+ tree.h\
39+ types.h\
40+ undump.c\
41+ undump.h\
42+ lua.stx
1543
1644 SLIB= $(LIB)/liblua.a
1745
18−# dynamic libraries only work for SunOs
19−DLIB= $(LIB)/liblua.so.$(VERSION)
20−
2146 all: $(SLIB)
2247
23−dynamic: $(DLIB)
24−
2548 $(SLIB): $(OBJS)
2649 ar rcuv $@ $(OBJS)
2750 ranlib $@
2851
29−$(DLIB): $(OBJS)
30− ld -o $@ $(OBJS)
31−
3252 clean:
33− rm -f $(OBJS) $(SLIB) $(DLIB)
53+ rm -f $(OBJS) $(SLIB)
3454
3555 co:
3656 co -f -M $(SRCS)
37− yacc -d lua.stx ; mv -f y.tab.c parser.c ; mv -f y.tab.h parser.h
57+
58+parser:
59+ yacc -d lua.stx
60+ rm -f parser.c parser.h
61+ sed -e 's/yy/luaY_/g' y.tab.c > parser.c
62+ sed -e 's/yy/luaY_/g' y.tab.h > parser.h
63+ rm y.tab.c y.tab.h
3864
3965 klean: clean
40− rm -f $(SRCS) parser.c parser.h
66+ rm -f $(SRCS)
src/fallback.c+53−39
@@ -3,7 +3,7 @@ · 2 unmodified lines
33 ** TecCGraf - PUC-Rio
44 */
55
6−char *rcs_fallback="$Id: fallback.c,v 1.17 1995/10/17 14:30:05 roberto Exp $";
6+char *rcs_fallback="$Id: fallback.c,v 1.25 1996/04/25 14:10:00 roberto Exp $";
77
88 #include <stdio.h>
99 #include <string.h>
@@ -12,6 +12,7 @@ char *rcs_fallback="$Id: fallback.c,v 1.17 1995/10/17 14:30:05 roberto Exp $"; · 2 unmodified lines
1212 #include "fallback.h"
1313 #include "opcode.h"
1414 #include "lua.h"
15+#include "table.h"
1516
1617
1718 static void errorFB (void);
@@ -36,8 +37,10 @@ struct FB luaI_fallBacks[] = { · 18 unmodified lines
3637 {"concat", {LUA_T_CFUNCTION, {concatFB}}, 2, 1},
3738 {"settable", {LUA_T_CFUNCTION, {gettableFB}}, 3, 0},
3839 {"gc", {LUA_T_CFUNCTION, {GDFB}}, 1, 0},
39−{"function", {LUA_T_CFUNCTION, {funcFB}}, -1, -1}
40+{"function", {LUA_T_CFUNCTION, {funcFB}}, -1, -1},
4041 /* no fixed number of params or results */
42+{"getglobal", {LUA_T_CFUNCTION, {indexFB}}, 1, 1}
43+ /* same default behavior of index FB */
4144 };
4245
4346 #define N_FB (sizeof(luaI_fallBacks)/sizeof(struct FB))
@@ -47,7 +50,7 @@ void luaI_setfallback (void) · 3 unmodified lines
4750 int i;
4851 char *name = lua_getstring(lua_getparam(1));
4952 lua_Object func = lua_getparam(2);
50− if (name == NULL || !(lua_isfunction(func) || lua_iscfunction(func)))
53+ if (name == NULL || !lua_isfunction(func))
5154 lua_error("incorrect argument to function `setfallback'");
5255 for (i=0; i<N_FB; i++)
5356 {
@@ -110,66 +113,77 @@ static void funcFB (void) · 56 unmodified lines
110113
111114
112115 /*
113−** Lock routines
116+** Reference routines
114117 */
115118
116−static Object *lockArray = NULL;
117−static Word lockSize = 0;
119+static struct ref {
120+ Object o;
121+ enum {LOCK, HOLD, FREE, COLLECTED} status;
122+} *refArray = NULL;
123+static int refSize = 0;
118124
119−int luaI_lock (Object *object)
125+int luaI_ref (Object *object, int lock)
120126 {
121− Word i;
122− Word oldSize;
127+ int i;
128+ int oldSize;
123129 if (tag(object) == LUA_T_NIL)
124− return -1;
125− for (i=0; i<lockSize; i++)
126− if (tag(&lockArray[i]) == LUA_T_NIL)
127− {
128− lockArray[i] = *object;
129− return i;
130− }
130+ return -1; /* special ref for nil */
131+ for (i=0; i<refSize; i++)
132+ if (refArray[i].status == FREE)
133+ goto found;
131134 /* no more empty spaces */
132− oldSize = lockSize;
133− if (lockArray == NULL)
134− {
135− lockSize = 10;
136− lockArray = newvector(lockSize, Object);
137− }
138− else
139− {
140− lockSize = 3*oldSize/2 + 5;
141− lockArray = growvector(lockArray, lockSize, Object);
142− }
143− for (i=oldSize; i<lockSize; i++)
144− tag(&lockArray[i]) = LUA_T_NIL;
145− lockArray[oldSize] = *object;
146− return oldSize;
135+ oldSize = refSize;
136+ refSize = growvector(&refArray, refSize, struct ref, refEM, MAX_WORD);
137+ for (i=oldSize; i<refSize; i++)
138+ refArray[i].status = FREE;
139+ i = oldSize;
140+ found:
141+ refArray[i].o = *object;
142+ refArray[i].status = lock ? LOCK : HOLD;
143+ return i;
147144 }
148145
149146
150−void lua_unlock (int ref)
147+void lua_unref (int ref)
151148 {
152− tag(&lockArray[ref]) = LUA_T_NIL;
149+ if (ref >= 0 && ref < refSize)
150+ refArray[ref].status = FREE;
153151 }
154152
155153
156−Object *luaI_getlocked (int ref)
154+Object *luaI_getref (int ref)
157155 {
158− return &lockArray[ref];
156+ static Object nul = {LUA_T_NIL, {0}};
157+ if (ref == -1)
158+ return &nul;
159+ if (ref >= 0 && ref < refSize &&
160+ (refArray[ref].status == LOCK || refArray[ref].status == HOLD))
161+ return &refArray[ref].o;
162+ else
163+ return NULL;
159164 }
160165
161166
162167 void luaI_travlock (int (*fn)(Object *))
163168 {
164− Word i;
165− for (i=0; i<lockSize; i++)
166− fn(&lockArray[i]);
169+ int i;
170+ for (i=0; i<refSize; i++)
171+ if (refArray[i].status == LOCK)
172+ fn(&refArray[i].o);
167173 }
168174
169175
176+void luaI_invalidaterefs (void)
177+{
178+ int i;
179+ for (i=0; i<refSize; i++)
180+ if (refArray[i].status == HOLD && !luaI_ismarked(&refArray[i].o))
181+ refArray[i].status = COLLECTED;
182+}
183+
170184 char *luaI_travfallbacks (int (*fn)(Object *))
171185 {
172− Word i;
186+ int i;
173187 for (i=0; i<N_FB; i++)
174188 if (fn(&luaI_fallBacks[i].function))
175189 return luaI_fallBacks[i].kind;
src/fallback.h+6−3
@@ -1,10 +1,11 @@
11 /*
2−** $Id: fallback.h,v 1.10 1995/10/17 11:52:38 roberto Exp $
2+** $Id: fallback.h,v 1.13 1996/04/25 14:10:00 roberto Exp $
33 */
44
55 #ifndef fallback_h
66 #define fallback_h
77
8+#include "lua.h"
89 #include "opcode.h"
910
1011 extern struct FB {
@@ -23,11 +24,13 @@ extern struct FB { · 12 unmodified lines
2324 #define FB_SETTABLE 6
2425 #define FB_GC 7
2526 #define FB_FUNCTION 8
27+#define FB_GETGLOBAL 9
2628
2729 void luaI_setfallback (void);
28−int luaI_lock (Object *object);
29−Object *luaI_getlocked (int ref);
30+int luaI_ref (Object *object, int lock);
31+Object *luaI_getref (int ref);
3032 void luaI_travlock (int (*fn)(Object *));
33+void luaI_invalidaterefs (void);
3134 char *luaI_travfallbacks (int (*fn)(Object *));
3235
3336 #endif
src/func.c+80−3
@@ -1,4 +1,4 @@
1−#include <stdio.h>
1+#include <stdlib.h>
22
33 #include "luadebug.h"
44 #include "table.h"
@@ -6,8 +6,26 @@ · 1 unmodified line
66 #include "func.h"
77 #include "opcode.h"
88
9+
910 static TFunc *function_root = NULL;
11+static LocVar *currvars = NULL;
12+static int numcurrvars = 0;
13+static int maxcurrvars = 0;
14+
1015
16+/*
17+** Initialize TFunc struct
18+*/
19+void luaI_initTFunc (TFunc *f)
20+{
21+ f->next = NULL;
22+ f->marked = 0;
23+ f->size = 0;
24+ f->code = NULL;
25+ f->lineDefined = 0;
26+ f->fileName = NULL;
27+ f->locvars = NULL;
28+}
1129
1230 /*
1331 ** Insert function in list for GC
@@ -24,9 +42,10 @@ void luaI_insertfunction (TFunc *f) · 10 unmodified lines
2442 /*
2543 ** Free function
2644 */
27−static void freefunc (TFunc *f)
45+void luaI_freefunc (TFunc *f)
2846 {
2947 luaI_free (f->code);
48+ luaI_free (f->locvars);
3049 luaI_free (f);
3150 }
3251
@@ -48,7 +67,7 @@ Long luaI_funccollector (void) · 15 unmodified lines
4867 function_root = next;
4968 else
5069 prev->next = next;
51− freefunc (curr);
70+ luaI_freefunc (curr);
5271 ++counter;
5372 }
5473 else
@@ -77,3 +96,61 @@ void lua_funcinfo (lua_Object func, char **filename, int *linedefined) · 22 unmodified lines
7796 }
7897 }
7998
99+/*
100+** Stores information to know that variable has been declared in given line
101+*/
102+void luaI_registerlocalvar (TaggedString *varname, int line)
103+{
104+ if (numcurrvars >= maxcurrvars)
105+ maxcurrvars = growvector(&currvars, maxcurrvars, LocVar, "", MAX_WORD);
106+ currvars[numcurrvars].varname = varname;
107+ currvars[numcurrvars].line = line;
108+ numcurrvars++;
109+}
110+
111+/*
112+** Stores information to know that variable has been out of scope in given line
113+*/
114+void luaI_unregisterlocalvar (int line)
115+{
116+ luaI_registerlocalvar(NULL, line);
117+}
118+
119+/*
120+** Copies "currvars" into a new area and store it in function header.
121+** The values (varname = NULL, line = -1) signal the end of vector.
122+*/
123+void luaI_closelocalvars (TFunc *func)
124+{
125+ func->locvars = newvector (numcurrvars+1, LocVar);
126+ memcpy (func->locvars, currvars, numcurrvars*sizeof(LocVar));
127+ func->locvars[numcurrvars].varname = NULL;
128+ func->locvars[numcurrvars].line = -1;
129+ numcurrvars = 0; /* prepares for next function */
130+}
131+
132+/*
133+** Look for n-esim local variable at line "line" in function "func".
134+** Returns NULL if not found.
135+*/
136+char *luaI_getlocalname (TFunc *func, int local_number, int line)
137+{
138+ int count = 0;
139+ char *varname = NULL;
140+ LocVar *lv = func->locvars;
141+ if (lv == NULL)
142+ return NULL;
143+ for (; lv->line != -1 && lv->line < line; lv++)
144+ {
145+ if (lv->varname) /* register */
146+ {
147+ if (++count == local_number)
148+ varname = lv->varname->str;
149+ }
150+ else /* unregister */
151+ if (--count < local_number)
152+ varname = NULL;
153+ }
154+ return varname;
155+}
156+
src/func.h+22−2
@@ -1,24 +1,44 @@
1+/*
2+** $Id: func.h,v 1.8 1996/03/14 15:54:20 roberto Exp $
3+*/
4+
15 #ifndef func_h
26 #define func_h
37
48 #include "types.h"
59 #include "lua.h"
10+#include "tree.h"
11+
12+typedef struct LocVar
13+{
14+ TaggedString *varname; /* NULL signals end of scope */
15+ int line;
16+} LocVar;
17+
618
719 /*
8−** Header para funcoes.
20+** Function Headers
921 */
1022 typedef struct TFunc
1123 {
1224 struct TFunc *next;
13− char marked;
25+ int marked;
1426 int size;
1527 Byte *code;
1628 int lineDefined;
1729 char *fileName;
30+ LocVar *locvars;
1831 } TFunc;
1932
2033 Long luaI_funccollector (void);
2134 void luaI_insertfunction (TFunc *f);
2235
36+void luaI_initTFunc (TFunc *f);
37+void luaI_freefunc (TFunc *f);
38+
39+void luaI_registerlocalvar (TaggedString *varname, int line);
40+void luaI_unregisterlocalvar (int line);
41+void luaI_closelocalvars (TFunc *func);
42+char *luaI_getlocalname (TFunc *func, int local_number, int line);
2343
2444 #endif
src/hash.c+29−41
@@ -3,9 +3,8 @@ · 2 unmodified lines
33 ** hash manager for lua
44 */
55
6−char *rcs_hash="$Id: hash.c,v 2.26 1995/10/04 14:20:26 roberto Exp $";
6+char *rcs_hash="$Id: hash.c,v 2.30 1996/05/06 14:30:27 roberto Exp $";
77
8−#include <string.h>
98
109 #include "mem.h"
1110 #include "opcode.h"
@@ -13,7 +12,6 @@ char *rcs_hash="$Id: hash.c,v 2.26 1995/10/04 14:20:26 roberto Exp $"; · 1 unmodified line
1312 #include "table.h"
1413 #include "lua.h"
1514
16−#define streq(s1,s2) (s1 == s2 || (*(s1) == *(s2) && strcmp(s1,s2)==0))
1715
1816 #define nhash(t) ((t)->nhash)
1917 #define nuse(t) ((t)->nuse)
@@ -24,22 +22,22 @@ char *rcs_hash="$Id: hash.c,v 2.26 1995/10/04 14:20:26 roberto Exp $"; · 4 unmodified lines
2422 #define val(n) (&(n)->val)
2523
2624
27−#define REHASH_LIMIT 0.70 /* avoid more than this % full */
25+#define REHASH_LIMIT 0.70 /* avoid more than this % full */
2826
2927
3028 static Hash *listhead = NULL;
3129
3230
33−
3431 /* hash dimensions values */
35−static Word dimensions[] =
36− {3, 5, 7, 11, 23, 47, 97, 197, 397, 797, 1597, 3203, 6421,
37− 12853, 25717, 51437, 65521, 0}; /* 65521 == last prime < MAX_WORD */
32+static Long dimensions[] =
33+ {3L, 5L, 7L, 11L, 23L, 47L, 97L, 197L, 397L, 797L, 1597L, 3203L, 6421L,
34+ 12853L, 25717L, 51437L, 102811L, 205619L, 411233L, 822433L,
35+ 1644817L, 3289613L, 6579211L, 13158023L, MAX_INT};
3836
39−static Word redimension (Word nhash)
37+int luaI_redimension (int nhash)
4038 {
41− Word i;
42− for (i=0; dimensions[i]!=0; i++)
39+ int i;
40+ for (i=0; dimensions[i]<MAX_INT; i++)
4341 {
4442 if (dimensions[i] > nhash)
4543 return dimensions[i];
@@ -48,7 +46,7 @@ static Word redimension (Word nhash) · 2 unmodified lines
4846 return 0; /* to avoid warnings */
4947 }
5048
51−static Word hashindex (Hash *t, Object *ref) /* hash function */
49+static int hashindex (Hash *t, Object *ref) /* hash function */
5250 {
5351 switch (tag(ref))
5452 {
@@ -56,19 +54,9 @@ static Word hashindex (Hash *t, Object *ref) /* hash function */ · 1 unmodified line
5654 lua_error ("unexpected type to index table");
5755 return -1; /* UNREACHEABLE */
5856 case LUA_T_NUMBER:
59− return (((Word)nvalue(ref))%nhash(t));
57+ return (((int)nvalue(ref))%nhash(t));
6058 case LUA_T_STRING:
61− {
62− unsigned long h = tsvalue(ref)->hash;
63− if (h == 0)
64− {
65− char *name = svalue(ref);
66− while (*name)
67− h = ((h<<5)-h)^(unsigned char)*(name++);
68− tsvalue(ref)->hash = h;
69− }
70− return (Word)h%nhash(t); /* make it a valid index */
71− }
59+ return (int)((tsvalue(ref)->hash)%nhash(t)); /* make it a valid index */
7260 case LUA_T_FUNCTION:
7361 return (((IntPoint)ref->value.tf)%nhash(t));
7462 case LUA_T_CFUNCTION:
@@ -80,14 +68,14 @@ static Word hashindex (Hash *t, Object *ref) /* hash function */ · 5 unmodified lines
8068 }
8169 }
8270
83−Bool lua_equalObj (Object *t1, Object *t2)
71+int lua_equalObj (Object *t1, Object *t2)
8472 {
8573 if (tag(t1) != tag(t2)) return 0;
8674 switch (tag(t1))
8775 {
8876 case LUA_T_NIL: return 1;
8977 case LUA_T_NUMBER: return nvalue(t1) == nvalue(t2);
90− case LUA_T_STRING: return streq(svalue(t1), svalue(t2));
78+ case LUA_T_STRING: return svalue(t1) == svalue(t2);
9179 case LUA_T_ARRAY: return avalue(t1) == avalue(t2);
9280 case LUA_T_FUNCTION: return t1->value.tf == t2->value.tf;
9381 case LUA_T_CFUNCTION: return fvalue(t1) == fvalue(t2);
@@ -95,9 +83,9 @@ Bool lua_equalObj (Object *t1, Object *t2) · 1 unmodified line
9583 }
9684 }
9785
98−static Word present (Hash *t, Object *ref)
86+static int present (Hash *t, Object *ref)
9987 {
100− Word h = hashindex(t, ref);
88+ int h = hashindex(t, ref);
10189 while (tag(ref(node(t, h))) != LUA_T_NIL)
10290 {
10391 if (lua_equalObj(ref, ref(node(t, h))))
@@ -111,9 +99,9 @@ static Word present (Hash *t, Object *ref) · 7 unmodified lines
11199 /*
112100 ** Alloc a vector node
113101 */
114−static Node *hashnodecreate (Word nhash)
102+static Node *hashnodecreate (int nhash)
115103 {
116− Word i;
104+ int i;
117105 Node *v = newvector (nhash, Node);
118106 for (i=0; i<nhash; i++)
119107 tag(ref(&v[i])) = LUA_T_NIL;
@@ -123,10 +111,10 @@ static Node *hashnodecreate (Word nhash) · 3 unmodified lines
123111 /*
124112 ** Create a new hash. Return the hash pointer or NULL on error.
125113 */
126−static Hash *hashcreate (Word nhash)
114+static Hash *hashcreate (int nhash)
127115 {
128116 Hash *t = new(Hash);
129− nhash = redimension((Word)((float)nhash/REHASH_LIMIT));
117+ nhash = luaI_redimension((int)((float)nhash/REHASH_LIMIT));
130118 nodevector(t) = hashnodecreate(nhash);
131119 nhash(t) = nhash;
132120 nuse(t) = 0;
@@ -151,7 +139,7 @@ void lua_hashmark (Hash *h) · 18 unmodified lines
151139 {
152140 if (markarray(h) == 0)
153141 {
154− Word i;
142+ int i;
155143 markarray(h) = 1;
156144 for (i=0; i<nhash(h); i++)
157145 {
@@ -218,7 +206,7 @@ Long lua_hashcollector (void) · 60 unmodified lines
218206 ** executes garbage collection if the number of arrays created
219207 ** exceed a pre-defined range.
220208 */
221−Hash *lua_createarray (Word nhash)
209+Hash *lua_createarray (int nhash)
222210 {
223211 Hash *array;
224212 lua_pack();
@@ -234,10 +222,10 @@ Hash *lua_createarray (Word nhash) · 9 unmodified lines
234222 */
235223 static void rehash (Hash *t)
236224 {
237− Word i;
238− Word nold = nhash(t);
225+ int i;
226+ int nold = nhash(t);
239227 Node *vold = nodevector(t);
240− nhash(t) = redimension(nhash(t));
228+ nhash(t) = luaI_redimension(nhash(t));
241229 nodevector(t) = hashnodecreate(nhash(t));
242230 for (i=0; i<nold; i++)
243231 {
@@ -254,7 +242,7 @@ static void rehash (Hash *t) · 10 unmodified lines
254242 */
255243 Object *lua_hashget (Hash *t, Object *ref)
256244 {
257− Word h = present(t, ref);
245+ int h = present(t, ref);
258246 if (tag(ref(node(t, h))) != LUA_T_NIL) return val(node(t, h));
259247 else return NULL;
260248 }
@@ -266,7 +254,7 @@ Object *lua_hashget (Hash *t, Object *ref) · 5 unmodified lines
266254 */
267255 Object *lua_hashdefine (Hash *t, Object *ref)
268256 {
269− Word h;
257+ int h;
270258 Node *n;
271259 h = present(t, ref);
272260 n = node(t, h);
@@ -292,7 +280,7 @@ Object *lua_hashdefine (Hash *t, Object *ref) · 19 unmodified lines
292280 ** in the hash.
293281 ** This function pushs the element value and its reference to the stack.
294282 */
295−static void hashnext (Hash *t, Word i)
283+static void hashnext (Hash *t, int i)
296284 {
297285 if (i >= nhash(t))
298286 {
@@ -329,7 +317,7 @@ void lua_next (void) · 30 unmodified lines
329317 }
330318 else
331319 {
332− Word h = present (t, luaI_Address(r));
320+ int h = present (t, luaI_Address(r));
333321 hashnext(t, h+1);
334322 }
335323 }
src/hash.h+8−7
@@ -1,14 +1,14 @@
11 /*
22 ** hash.h
33 ** hash manager for lua
4−** Luiz Henrique de Figueiredo - 17 Aug 90
5−** $Id: hash.h,v 2.8 1995/01/12 14:19:04 roberto Exp $
4+** $Id: hash.h,v 2.12 1996/05/06 14:30:27 roberto Exp $
65 */
76
87 #ifndef hash_h
98 #define hash_h
109
1110 #include "types.h"
11+#include "opcode.h"
1212
1313 typedef struct node
1414 {
@@ -19,15 +19,16 @@ typedef struct node · 4 unmodified lines
1919 typedef struct Hash
2020 {
2121 struct Hash *next;
22− char mark;
23− Word nhash;
24− Word nuse;
2522 Node *node;
23+ int nhash;
24+ int nuse;
25+ char mark;
2626 } Hash;
2727
2828
29−Bool lua_equalObj (Object *t1, Object *t2);
30−Hash *lua_createarray (Word nhash);
29+int lua_equalObj (Object *t1, Object *t2);
30+int luaI_redimension (int nhash);
31+Hash *lua_createarray (int nhash);
3132 void lua_hashmark (Hash *h);
3233 Long lua_hashcollector (void);
3334 Object *lua_hashget (Hash *t, Object *ref);
src/inout.c+78−52
@@ -5,31 +5,21 @@ · 4 unmodified lines
55 ** Also provides some predefined lua functions.
66 */
77
8−char *rcs_inout="$Id: inout.c,v 2.25 1995/10/25 13:05:51 roberto Exp $";
8+char *rcs_inout="$Id: inout.c,v 2.36 1996/03/19 22:28:37 roberto Exp $";
99
1010 #include <stdio.h>
11−#include <stdlib.h>
12−#include <string.h>
1311
14−#include "mem.h"
12+#include "lex.h"
1513 #include "opcode.h"
16−#include "hash.h"
1714 #include "inout.h"
1815 #include "table.h"
1916 #include "tree.h"
2017 #include "lua.h"
21−
22−
23−#ifndef MAXFUNCSTACK
24−#define MAXFUNCSTACK 100
25−#endif
26−
27−#define MAXMESSAGE MAXFUNCSTACK*80
18+#include "mem.h"
2819
2920
3021 /* Exported variables */
3122 Word lua_linenumber;
32−Bool lua_debug = 0;
3323 char *lua_parsedfile;
3424
3525
@@ -54,9 +44,9 @@ static int stringinput (void) · 18 unmodified lines
5444
5545 /*
5646 ** Function to open a file to be input unit.
57−** Return 0 on success or error message on error.
47+** Return the file.
5848 */
59−char *lua_openfile (char *fn)
49+FILE *lua_openfile (char *fn)
6050 {
6151 lua_setinput (fileinput);
6252 if (fn == NULL)
@@ -67,14 +57,10 @@ char *lua_openfile (char *fn) · 4 unmodified lines
6757 else
6858 fp = fopen (fn, "r");
6959 if (fp == NULL)
70− {
71− static char buff[255];
72− sprintf(buff, "unable to open file `%.200s'", fn);
73− return buff;
74− }
60+ return NULL;
7561 lua_linenumber = 1;
76− lua_parsedfile = lua_constcreate(fn)->ts.str;
77− return NULL;
62+ lua_parsedfile = luaI_createfixedstring(fn)->str;
63+ return fp;
7864 }
7965
8066 /*
@@ -97,7 +83,7 @@ void lua_openstring (char *s) · 16 unmodified lines
9783 lua_setinput (stringinput);
9884 st = s;
9985 lua_linenumber = 1;
100− lua_parsedfile = lua_constcreate("(string)")->ts.str;
86+ lua_parsedfile = luaI_createfixedstring("(string)")->str;
10187 }
10288
10389 /*
@@ -126,33 +112,57 @@ void lua_internaldostring (void) · 22 unmodified lines
126112 void lua_internaldofile (void)
127113 {
128114 lua_Object obj = lua_getparam (1);
129− if (lua_isstring(obj) && !lua_dofile(lua_getstring(obj)))
115+ char *fname = NULL;
116+ if (lua_isstring(obj))
117+ fname = lua_getstring(obj);
118+ else if (obj != LUA_NOOBJECT)
119+ lua_error("invalid argument to function `dofile'");
120+ /* else fname = NULL */
121+ if (!lua_dofile(fname))
130122 lua_pushnumber(1);
131123 else
132124 lua_pushnil();
133125 }
134126
135−/*
136−** Internal function: print object values
137−*/
138−void lua_print (void)
127+
128+static char *tostring (lua_Object obj)
139129 {
140− int i=1;
141− lua_Object obj;
142− while ((obj=lua_getparam (i++)) != LUA_NOOBJECT)
143− {
144− if (lua_isnumber(obj)) printf("%g\n",lua_getnumber(obj));
145− else if (lua_isstring(obj)) printf("%s\n",lua_getstring(obj));
146− else if (lua_isfunction(obj)) printf("function: %p\n",(luaI_Address(obj))->value.tf);
147− else if (lua_iscfunction(obj)) printf("cfunction: %p\n",lua_getcfunction(obj)
148−);
149− else if (lua_isuserdata(obj)) printf("userdata: %p\n",lua_getuserdata(obj));
150− else if (lua_istable(obj)) printf("table: %p\n",avalue(luaI_Address(obj)));
151− else if (lua_isnil(obj)) printf("nil\n");
152− else printf("invalid value to print\n");
153− }
130+ char *buff = luaI_buffer(20);
131+ if (lua_isstring(obj)) /* get strings and numbers */
132+ return lua_getstring(obj);
133+ else switch(lua_type(obj))
134+ {
135+ case LUA_T_FUNCTION:
136+ sprintf(buff, "function: %p", (luaI_Address(obj))->value.tf);
137+ break;
138+ case LUA_T_CFUNCTION:
139+ sprintf(buff, "cfunction: %p", lua_getcfunction(obj));
140+ break;
141+ case LUA_T_ARRAY:
142+ sprintf(buff, "table: %p", avalue(luaI_Address(obj)));
143+ break;
144+ case LUA_T_NIL:
145+ sprintf(buff, "nil");
146+ break;
147+ default:
148+ sprintf(buff, "userdata: %p", lua_getuserdata(obj));
149+ break;
150+ }
151+ return buff;
154152 }
155153
154+void luaI_tostring (void)
155+{
156+ lua_pushstring(tostring(lua_getparam(1)));
157+}
158+
159+void luaI_print (void)
160+{
161+ int i = 1;
162+ lua_Object obj;
163+ while ((obj = lua_getparam(i++)) != LUA_NOOBJECT)
164+ printf("%s\n", tostring(obj));
165+}
156166
157167 /*
158168 ** Internal function: return an object type.
@@ -196,16 +206,7 @@ void lua_obj2number (void) · 37 unmodified lines
196206 {
197207 lua_Object o = lua_getparam(1);
198208 if (lua_isnumber(o))
199− lua_pushobject(o);
200− else if (lua_isstring(o))
201− {
202− char c;
203− float f;
204− if (sscanf(lua_getstring(o),"%f %c",&f,&c) == 1)
205− lua_pushnumber(f);
206− else
207− lua_pushnil();
208− }
209+ lua_pushnumber(lua_getnumber(o));
209210 else
210211 lua_pushnil();
211212 }
@@ -218,3 +219,28 @@ void luaI_error (void) · 6 unmodified lines
218219 lua_error(s);
219220 }
220221
222+void luaI_assert (void)
223+{
224+ lua_Object p = lua_getparam(1);
225+ if (p == LUA_NOOBJECT || lua_isnil(p))
226+ lua_error("assertion failed!");
227+}
228+
229+void luaI_setglobal (void)
230+{
231+ lua_Object name = lua_getparam(1);
232+ lua_Object value = lua_getparam(2);
233+ if (!lua_isstring(name))
234+ lua_error("incorrect argument to function `setglobal'");
235+ lua_pushobject(value);
236+ lua_storeglobal(lua_getstring(name));
237+ lua_pushobject(value); /* return given value */
238+}
239+
240+void luaI_getglobal (void)
241+{
242+ lua_Object name = lua_getparam(1);
243+ if (!lua_isstring(name))
244+ lua_error("incorrect argument to function `getglobal'");
245+ lua_pushobject(lua_getglobal(lua_getstring(name)));
246+}
src/inout.h+8−4
@@ -1,5 +1,5 @@
11 /*
2−** $Id: inout.h,v 1.10 1995/10/17 11:58:41 roberto Exp $
2+** $Id: inout.h,v 1.15 1996/03/15 18:21:58 roberto Exp $
33 */
44
55
@@ -7,23 +7,27 @@ · 1 unmodified line
77 #define inout_h
88
99 #include "types.h"
10+#include <stdio.h>
1011
1112
1213 extern Word lua_linenumber;
13−extern Bool lua_debug;
1414 extern Word lua_debugline;
1515 extern char *lua_parsedfile;
1616
17−char *lua_openfile (char *fn);
17+FILE *lua_openfile (char *fn);
1818 void lua_closefile (void);
1919 void lua_openstring (char *s);
2020 void lua_closestring (void);
2121
2222 void lua_internaldofile (void);
2323 void lua_internaldostring (void);
24−void lua_print (void);
24+void luaI_tostring (void);
25+void luaI_print (void);
2526 void luaI_type (void);
2627 void lua_obj2number (void);
2728 void luaI_error (void);
29+void luaI_assert (void);
30+void luaI_setglobal (void);
31+void luaI_getglobal (void);
2832
2933 #endif
src/lex.c+30−61
@@ -1,23 +1,19 @@
1−char *rcs_lex = "$Id: lex.c,v 2.21 1995/11/16 20:46:24 roberto Exp $";
1+char *rcs_lex = "$Id: lex.c,v 2.32 1996/03/21 16:33:47 roberto Exp $";
22
33
44 #include <ctype.h>
5−#include <stdio.h>
6−#include <stdlib.h>
75 #include <string.h>
86
97 #include "mem.h"
108 #include "tree.h"
119 #include "table.h"
12−#include "opcode.h"
10+#include "lex.h"
1311 #include "inout.h"
12+#include "luadebug.h"
1413 #include "parser.h"
15−#include "ugly.h"
1614
1715 #define MINBUFF 260
1816
19−#define lua_strcmp(a,b) (a[0]<b[0]?(-1):(a[0]>b[0]?(1):strcmp(a,b)))
20−
2117 #define next() { current = input(); }
2218 #define save(x) { *yytextLast++ = (x); }
2319 #define save_and_next() { save(current); next(); }
@@ -47,7 +43,6 @@ char *lua_lasttext (void) · 23 unmodified lines
4743 }
4844
4945
50−/* The reserved words must be listed in lexicographic order */
5146 static struct
5247 {
5348 char *name;
@@ -74,30 +69,21 @@ static struct · 20 unmodified lines
7469 #define RESERVEDSIZE (sizeof(reserved)/sizeof(reserved[0]))
7570
7671
77−static int findReserved (char *name)
72+void luaI_addReserved (void)
7873 {
79− int l = 0;
80− int h = RESERVEDSIZE - 1;
81− while (l <= h)
74+ int i;
75+ for (i=0; i<RESERVEDSIZE; i++)
8276 {
83− int m = (l+h)/2;
84− int comp = lua_strcmp(name, reserved[m].name);
85− if (comp < 0)
86− h = m-1;
87− else if (comp == 0)
88− return reserved[m].token;
89− else
90− l = m+1;
77+ TaggedString *ts = lua_createstring(reserved[i].name);
78+ ts->marked = reserved[i].token; /* reserved word (always > 255) */
9179 }
92− return 0;
9380 }
9481
9582
9683 static void growtext (void)
9784 {
9885 int size = yytextLast - yytext;
99− textsize *= 2;
100− yytext = growvector(yytext, textsize, char);
86+ textsize = growvector(&yytext, textsize, char, lexEM, MAX_WORD);
10187 yytextLast = yytext + size;
10288 }
10389
@@ -144,9 +130,9 @@ static int read_long_string (void) · 40 unmodified lines
144130 }
145131
146132
147−int yylex (void)
133+int luaY_lex (void)
148134 {
149− float a;
135+ double a;
150136 static int linelasttoken = 0;
151137 if (lua_debug)
152138 luaI_codedebugline(linelasttoken);
@@ -154,9 +140,6 @@ int yylex (void) · 1 unmodified line
154140 while (1)
155141 {
156142 yytextLast = yytext;
157−#if 0
158− fprintf(stderr,"'%c' %d\n",current,current);
159−#endif
160143 switch (current)
161144 {
162145 case EOF:
@@ -174,22 +157,21 @@ int yylex (void) · 11 unmodified lines
174157 while (isalnum(current) || current == '_')
175158 save_and_next();
176159 *yytextLast = 0;
177− if (lua_strcmp(yytext, "debug") == 0)
160+ if (strcmp(yytext, "debug") == 0)
178161 {
179− yylval.vInt = 1;
162+ luaY_lval.vInt = 1;
180163 return DEBUG;
181164 }
182− else if (lua_strcmp(yytext, "nodebug") == 0)
165+ else if (strcmp(yytext, "nodebug") == 0)
183166 {
184− yylval.vInt = 0;
167+ luaY_lval.vInt = 0;
185168 return DEBUG;
186169 }
187170 return WRONGTOKEN;
188171
189172 case '-':
190173 save_and_next();
191− if (current != '-') return '-'; /* else goes through */
192− case '#':
174+ if (current != '-') return '-';
193175 do { next(); } while (current != '\n' && current != 0);
194176 continue;
195177
@@ -203,7 +185,7 @@ int yylex (void) · 7 unmodified lines
203185 return WRONGTOKEN;
204186 save_and_next(); /* pass the second ']' */
205187 *(yytextLast-2) = 0; /* erases ']]' */
206− yylval.vWord = luaI_findconstantbyname(yytext+2);
188+ luaY_lval.vWord = luaI_findconstantbyname(yytext+2);
207189 return STRING;
208190 }
209191
@@ -254,6 +236,7 @@ int yylex (void) · 44 unmodified lines
254236 case 'n': save('\n'); next(); break;
255237 case 't': save('\t'); next(); break;
256238 case 'r': save('\r'); next(); break;
239+ case '\n': lua_linenumber++; /* goes through */
257240 default : save(current); next(); break;
258241 }
259242 break;
@@ -263,7 +246,7 @@ int yylex (void) · 3 unmodified lines
263246 }
264247 next(); /* skip the delimiter */
265248 *yytextLast = 0;
266− yylval.vWord = luaI_findconstantbyname(yytext);
249+ luaY_lval.vWord = luaI_findconstantbyname(yytext);
267250 return STRING;
268251 }
269252
@@ -281,12 +264,14 @@ int yylex (void) · 11 unmodified lines
281264 case 'Z':
282265 case '_':
283266 {
284− Word res;
267+ TaggedString *ts;
285268 do { save_and_next(); } while (isalnum(current) || current == '_');
286269 *yytextLast = 0;
287− res = findReserved(yytext);
288− if (res) return res;
289− yylval.pNode = lua_constcreate(yytext);
270+ ts = lua_createstring(yytext);
271+ if (ts->marked > 2)
272+ return ts->marked; /* reserved word */
273+ luaY_lval.pTStr = ts;
274+ ts->marked = 2; /* avoid GC */
290275 return NAME;
291276 }
292277
@@ -305,48 +290,32 @@ int yylex (void) · 12 unmodified lines
305290 case '0': case '1': case '2': case '3': case '4':
306291 case '5': case '6': case '7': case '8': case '9':
307292 a=0.0;
308− do { a=10*a+current-'0'; save_and_next(); } while (isdigit(current));
293+ do { a=10.0*a+(current-'0'); save_and_next(); } while (isdigit(current));
309294 if (current == '.') save_and_next();
310295 fraction:
311− { float da=0.1;
296+ { double da=0.1;
312297 while (isdigit(current))
313298 {a+=(current-'0')*da; da/=10.0; save_and_next()};
314299 if (current == 'e' || current == 'E')
315300 {
316301 int e=0;
317302 int neg;
318− float ea;
303+ double ea;
319304 save_and_next();
320305 neg=(current=='-');
321306 if (current == '+' || current == '-') save_and_next();
322307 if (!isdigit(current)) return WRONGTOKEN;
323− do { e=10*e+current-'0'; save_and_next(); } while (isdigit(current));
308+ do { e=10.0*e+(current-'0'); save_and_next(); } while (isdigit(current));
324309 for (ea=neg?0.1:10.0; e>0; e>>=1)
325310 {
326311 if (e & 1) a*=ea;
327312 ea*=ea;
328313 }
329314 }
330− yylval.vFloat = a;
315+ luaY_lval.vFloat = a;
331316 return NUMBER;
332317 }
333318
334− case U_and: case U_do: case U_else: case U_elseif: case U_end:
335− case U_function: case U_if: case U_local: case U_nil: case U_not:
336− case U_or: case U_repeat: case U_return: case U_then:
337− case U_until: case U_while:
338− {
339− int old = current;
340− next();
341− return reserved[old-U_and].token;
342− }
343−
344− case U_eq: next(); return EQ;
345− case U_le: next(); return LE;
346− case U_ge: next(); return GE;
347− case U_ne: next(); return NE;
348− case U_sc: next(); return CONC;
349−
350319 default: /* also end of file */
351320 {
352321 save_and_next();
src/lex.h+19−0
@@ -0,0 +1,19 @@
1+/*
2+** lex.h
3+** TecCGraf - PUC-Rio
4+** $Id: lex.h,v 1.2 1996/02/14 13:35:51 roberto Exp $
5+*/
6+
7+#ifndef lex_h
8+#define lex_h
9+
10+
11+typedef int (*Input) (void);
12+
13+void lua_setinput (Input fn);
14+char *lua_lasttext (void);
15+int luaY_lex (void);
16+void luaI_addReserved (void);
17+
18+
19+#endif
src/lua.stx+47−273
@@ -1,12 +1,13 @@
11 %{
22
3−char *rcs_luastx = "$Id: lua.stx,v 3.25 1995/10/26 17:02:50 roberto Exp $";
3+char *rcs_luastx = "$Id: lua.stx,v 3.36 1996/03/21 16:31:32 roberto Exp $";
44
55 #include <stdio.h>
66 #include <stdlib.h>
7−#include <string.h>
87
8+#include "luadebug.h"
99 #include "mem.h"
10+#include "lex.h"
1011 #include "opcode.h"
1112 #include "hash.h"
1213 #include "inout.h"
@@ -30,7 +31,7 @@ int yyparse (void); · 17 unmodified lines
3031 #endif
3132 static int maxcode;
3233 static int maxmain;
33−static Long maxcurr; /* to allow maxcurr *= 2 without overflow */
34+static int maxcurr;
3435 static Byte *funcCode = NULL;
3536 static Byte **initcode;
3637 static Byte *basepc;
@@ -44,35 +45,32 @@ static Long varbuffer[MAXVAR]; /* variables in an assignment list; · 7 unmodified lines
4445 static int nvarbuffer=0; /* number of variables at a list */
4546
4647 #define MAXLOCALS 32
47−static Word localvar[MAXLOCALS]; /* store local variable names */
48+static TaggedString *localvar[MAXLOCALS]; /* store local variable names */
4849 static int nlocalvar=0; /* number of local variables */
4950
5051 #define MAXFIELDS FIELDS_PER_FLUSH*2
5152 static Word fields[MAXFIELDS]; /* fieldnames to be flushed */
5253 static int nfields=0;
5354
55+int lua_debug = 0;
5456
5557 /* Internal functions */
5658
5759 static void yyerror (char *s)
5860 {
59− static char msg[256];
60− sprintf (msg,"%s near \"%s\" at line %d in file `%s'",
61− s, lua_lasttext (), lua_linenumber, lua_parsedfile);
61+ char msg[256];
62+ char *token = lua_lasttext();
63+ if (token[0] == 0)
64+ token = "<eof>";
65+ sprintf (msg,"%s; last token read: \"%s\" at line %d in file `%s'",
66+ s, token, lua_linenumber, lua_parsedfile);
6267 lua_error (msg);
6368 }
6469
6570 static void code_byte (Byte c)
6671 {
6772 if (pc>maxcurr-2) /* 1 byte free to code HALT of main code */
68− {
69− if (maxcurr >= MAX_INT)
70− lua_error("code size overflow");
71− maxcurr *= 2;
72− if (maxcurr >= MAX_INT)
73− maxcurr = MAX_INT;
74− basepc = growvector(basepc, maxcurr, Byte);
75− }
73+ maxcurr = growvector(&basepc, maxcurr, Byte, codeEM, MAX_INT);
7674 basepc[pc++] = c;
7775 }
7876
@@ -104,10 +102,12 @@ static void code_code (TFunc *tf) · 25 unmodified lines
104102 code_byte(code.m.c4);
105103 }
106104
107−static void code_word_at (Byte *p, Word n)
105+static void code_word_at (Byte *p, int n)
108106 {
109107 CodeWord code;
110− code.w = n;
108+ if ((Word)n != n)
109+ yyerror("block too big");
110+ code.w = (Word)n;
111111 *p++ = code.m.c1;
112112 *p++ = code.m.c2;
113113 }
@@ -117,7 +117,7 @@ static void push_field (Word name) · 3 unmodified lines
117117 if (nfields < MAXFIELDS)
118118 fields[nfields++] = name;
119119 else
120− lua_error ("too many fields in nested constructors");
120+ yyerror ("too many fields in nested constructors");
121121 }
122122
123123 static void flush_record (int n)
@@ -142,24 +142,24 @@ static void flush_list (int m, int n) · 18 unmodified lines
142142 code_byte(m);
143143 }
144144 else
145− lua_error ("list constructor too long");
145+ yyerror ("list constructor too long");
146146 code_byte(n);
147147 }
148148
149−static void add_localvar (Word name)
149+static void store_localvar (TaggedString *name, int n)
150150 {
151− if (nlocalvar < MAXLOCALS)
152− localvar[nlocalvar++] = name;
151+ if (nlocalvar+n < MAXLOCALS)
152+ localvar[nlocalvar+n] = name;
153153 else
154− lua_error ("too many local variables");
154+ yyerror ("too many local variables");
155+ if (lua_debug)
156+ luaI_registerlocalvar(name, lua_linenumber);
155157 }
156158
157−static void store_localvar (Word name, int n)
159+static void add_localvar (TaggedString *name)
158160 {
159− if (nlocalvar+n < MAXLOCALS)
160− localvar[nlocalvar+n] = name;
161− else
162− lua_error ("too many local variables");
161+ store_localvar(name, 0);
162+ nlocalvar++;
163163 }
164164
165165 static void add_varbuffer (Long var)
@@ -167,7 +167,7 @@ static void add_varbuffer (Long var) · 1 unmodified line
167167 if (nvarbuffer < MAXVAR)
168168 varbuffer[nvarbuffer++] = var;
169169 else
170− lua_error ("variable buffer overflow");
170+ yyerror ("variable buffer overflow");
171171 }
172172
173173 static void code_number (float f)
@@ -197,7 +197,7 @@ static void code_number (float f) · 23 unmodified lines
197197 /*
198198 ** Search a local name and if find return its index. If do not find return -1
199199 */
200−static int lua_localname (Word n)
200+static int lua_localname (TaggedString *n)
201201 {
202202 int i;
203203 for (i=nlocalvar-1; i >= 0; i--)
@@ -388,7 +388,6 @@ static void codeIf (Long thenAdd, Long elseAdd) · 184 unmodified lines
388388 */
389389 void lua_parse (TFunc *tf)
390390 {
391− lua_debug = 0;
392391 initcode = &(tf->code);
393392 *initcode = newvector(CODE_BLOCK, Byte);
394393 maincode = 0;
@@ -416,7 +415,7 @@ void lua_parse (TFunc *tf) · 21 unmodified lines
416415 Word vWord;
417416 Long vLong;
418417 TFunc *pFunc;
419− TreeNode *pNode;
418+ TaggedString *pTStr;
420419 }
421420
422421 %start functionlist
@@ -429,7 +428,7 @@ void lua_parse (TFunc *tf) · 6 unmodified lines
429428 %token FUNCTION
430429 %token <vFloat> NUMBER
431430 %token <vWord> STRING
432−%token <pNode> NAME
431+%token <pTStr> NAME
433432 %token <vInt> DEBUG
434433
435434 %type <vLong> PrepJump
@@ -481,7 +480,7 @@ funcname : var { $$ =$1; init_func(); } · 45 unmodified lines
481480 code_word(luaI_findconstant($3));
482481 $$ = 0; /* indexed variable */
483482 init_func();
484− add_localvar(luaI_findsymbolbyname("self"));
483+ add_localvar(luaI_createfixedstring("self"));
485484 }
486485 ;
487486
@@ -489,11 +488,14 @@ body : '(' parlist ')' block END · 1 unmodified line
489488 {
490489 codereturn();
491490 $$ = new(TFunc);
491+ luaI_initTFunc($$);
492492 $$->size = pc;
493493 $$->code = newvector(pc, Byte);
494494 $$->fileName = lua_parsedfile;
495495 $$->lineDefined = $2;
496496 memcpy($$->code, basepc, pc*sizeof(Byte));
497+ if (lua_debug)
498+ luaI_closelocalvars($$);
497499 /* save func values */
498500 funcCode = basepc; maxcode=maxcurr;
499501 #if LISTING
@@ -554,7 +556,11 @@ block : {$<vInt>$ = nlocalvar;} statlist ret · 54 unmodified lines
554556 {
555557 if (nlocalvar != $<vInt>1)
556558 {
557− nlocalvar = $<vInt>1;
559+ if (lua_debug)
560+ for (; nlocalvar > $<vInt>1; nlocalvar--)
561+ luaI_unregisterlocalvar(lua_linenumber);
562+ else
563+ nlocalvar = $<vInt>1;
558564 lua_codeadjust (0);
559565 }
560566 }
@@ -672,14 +678,8 @@ parlist : /* empty */ { lua_codeadjust(0); $$ = lua_linenumber; } · 111 unmodified lines
672678 | parlist1 { lua_codeadjust(0); $$ = lua_linenumber; }
673679 ;
674680
675−parlist1 : NAME
676− {
677− add_localvar(luaI_findsymbol($1));
678− }
679− | parlist1 ',' NAME
680− {
681− add_localvar(luaI_findsymbol($3));
682− }
681+parlist1 : NAME { add_localvar($1); }
682+ | parlist1 ',' NAME { add_localvar($3); }
683683 ;
684684
685685 fieldlist : lfieldlist
@@ -759,10 +759,9 @@ var : singlevar { $$ = $1; } · 73 unmodified lines
759759
760760 singlevar : NAME
761761 {
762− Word s = luaI_findsymbol($1);
763− int local = lua_localname (s);
762+ int local = lua_localname($1);
764763 if (local == -1) /* global var */
765− $$ = s + 1; /* return positive value */
764+ $$ = luaI_findsymbol($1)+1; /* return positive value */
766765 else
767766 $$ = -(local+1); /* return negative value */
768767 }
@@ -771,10 +770,10 @@ singlevar : NAME · 2 unmodified lines
771770 varexp : var { lua_pushvar($1); }
772771 ;
773772
774−localdeclist : NAME {store_localvar(luaI_findsymbol($1), 0); $$ = 1;}
773+localdeclist : NAME {store_localvar($1, 0); $$ = 1;}
775774 | localdeclist ',' NAME
776775 {
777− store_localvar(luaI_findsymbol($3), $1);
776+ store_localvar($3, $1);
778777 $$ = $1+1;
779778 }
780779 ;
@@ -787,228 +786,3 @@ setdebug : DEBUG { lua_debug = $1; } · 6 unmodified lines
787786 ;
788787
789788 %%
790−
791−#if LISTING
792−
793−static void PrintCode (Byte *code, Byte *end)
794−{
795− Byte *p = code;
796− printf ("\n\nCODE\n");
797− while (p != end)
798− {
799− switch ((OpCode)*p)
800− {
801− case PUSHNIL: printf ("%d PUSHNIL\n", (p++)-code); break;
802− case PUSH0: case PUSH1: case PUSH2:
803− printf ("%d PUSH%c\n", p-code, *p-PUSH0+'0');
804− p++;
805− break;
806− case PUSHBYTE:
807− printf ("%d PUSHBYTE %d\n", p-code, *(++p));
808− p++;
809− break;
810− case PUSHWORD:
811− {
812− CodeWord c;
813− int n = p-code;
814− p++;
815− get_word(c,p);
816− printf ("%d PUSHWORD %d\n", n, c.w);
817− }
818− break;
819− case PUSHFLOAT:
820− {
821− CodeFloat c;
822− int n = p-code;
823− p++;
824− get_float(c,p);
825− printf ("%d PUSHFLOAT %f\n", n, c.f);
826− }
827− break;
828− case PUSHSTRING:
829− {
830− CodeWord c;
831− int n = p-code;
832− p++;
833− get_word(c,p);
834− printf ("%d PUSHSTRING %d\n", n, c.w);
835− }
836− break;
837− case PUSHFUNCTION:
838− {
839− CodeCode c;
840− int n = p-code;
841− p++;
842− get_code(c,p);
843− printf ("%d PUSHFUNCTION %p\n", n, c.tf);
844− }
845− break;
846−
847− case PUSHLOCAL0: case PUSHLOCAL1: case PUSHLOCAL2: case PUSHLOCAL3:
848− case PUSHLOCAL4: case PUSHLOCAL5: case PUSHLOCAL6: case PUSHLOCAL7:
849− case PUSHLOCAL8: case PUSHLOCAL9:
850− printf ("%d PUSHLOCAL%c\n", p-code, *p-PUSHLOCAL0+'0');
851− p++;
852− break;
853− case PUSHLOCAL: printf ("%d PUSHLOCAL %d\n", p-code, *(++p));
854− p++;
855− break;
856− case PUSHGLOBAL:
857− {
858− CodeWord c;
859− int n = p-code;
860− p++;
861− get_word(c,p);
862− printf ("%d PUSHGLOBAL %d\n", n, c.w);
863− }
864− break;
865− case PUSHINDEXED: printf ("%d PUSHINDEXED\n", (p++)-code); break;
866− case STORELOCAL0: case STORELOCAL1: case STORELOCAL2: case STORELOCAL3:
867− case STORELOCAL4: case STORELOCAL5: case STORELOCAL6: case STORELOCAL7:
868− case STORELOCAL8: case STORELOCAL9:
869− printf ("%d STORELOCAL%c\n", p-code, *p-STORELOCAL0+'0');
870− p++;
871− break;
872− case STORELOCAL:
873− printf ("%d STORELOCAL %d\n", p-code, *(++p));
874− p++;
875− break;
876− case STOREGLOBAL:
877− {
878− CodeWord c;
879− int n = p-code;
880− p++;
881− get_word(c,p);
882− printf ("%d STOREGLOBAL %d\n", n, c.w);
883− }
884− break;
885− case PUSHSELF:
886− {
887− CodeWord c;
888− int n = p-code;
889− p++;
890− get_word(c,p);
891− printf ("%d PUSHSELF %d\n", n, c.w);
892− }
893− break;
894− case STOREINDEXED0: printf ("%d STOREINDEXED0\n", (p++)-code); break;
895− case STOREINDEXED: printf ("%d STOREINDEXED %d\n", p-code, *(++p));
896− p++;
897− break;
898− case STORELIST0:
899− printf("%d STORELIST0 %d\n", p-code, *(++p));
900− p++;
901− break;
902− case STORELIST:
903− printf("%d STORELIST %d %d\n", p-code, *(p+1), *(p+2));
904− p+=3;
905− break;
906− case STORERECORD:
907− printf("%d STORERECORD %d\n", p-code, *(++p));
908− p += *p*sizeof(Word) + 1;
909− break;
910− case ADJUST0: printf ("%d ADJUST0\n", (p++)-code); break;
911− case ADJUST:
912− printf ("%d ADJUST %d\n", p-code, *(++p));
913− p++;
914− break;
915− case CREATEARRAY:
916− {
917− CodeWord c;
918− int n = p-code;
919− p++;
920− get_word(c,p);
921− printf ("%d CREATEARRAY %d\n", n, c.w);
922− break;
923− }
924− case EQOP: printf ("%d EQOP\n", (p++)-code); break;
925− case LTOP: printf ("%d LTOP\n", (p++)-code); break;
926− case LEOP: printf ("%d LEOP\n", (p++)-code); break;
927− case ADDOP: printf ("%d ADDOP\n", (p++)-code); break;
928− case SUBOP: printf ("%d SUBOP\n", (p++)-code); break;
929− case MULTOP: printf ("%d MULTOP\n", (p++)-code); break;
930− case DIVOP: printf ("%d DIVOP\n", (p++)-code); break;
931− case POWOP: printf ("%d POWOP\n", (p++)-code); break;
932− case CONCOP: printf ("%d CONCOP\n", (p++)-code); break;
933− case MINUSOP: printf ("%d MINUSOP\n", (p++)-code); break;
934− case NOTOP: printf ("%d NOTOP\n", (p++)-code); break;
935− case ONTJMP:
936− {
937− CodeWord c;
938− int n = p-code;
939− p++;
940− get_word(c,p);
941− printf ("%d ONTJMP %d\n", n, c.w);
942− }
943− break;
944− case ONFJMP:
945− {
946− CodeWord c;
947− int n = p-code;
948− p++;
949− get_word(c,p);
950− printf ("%d ONFJMP %d\n", n, c.w);
951− }
952− break;
953− case JMP:
954− {
955− CodeWord c;
956− int n = p-code;
957− p++;
958− get_word(c,p);
959− printf ("%d JMP %d\n", n, c.w);
960− }
961− break;
962− case UPJMP:
963− {
964− CodeWord c;
965− int n = p-code;
966− p++;
967− get_word(c,p);
968− printf ("%d UPJMP %d\n", n, c.w);
969− }
970− break;
971− case IFFJMP:
972− {
973− CodeWord c;
974− int n = p-code;
975− p++;
976− get_word(c,p);
977− printf ("%d IFFJMP %d\n", n, c.w);
978− }
979− break;
980− case IFFUPJMP:
981− {
982− CodeWord c;
983− int n = p-code;
984− p++;
985− get_word(c,p);
986− printf ("%d IFFUPJMP %d\n", n, c.w);
987− }
988− break;
989− case POP: printf ("%d POP\n", (p++)-code); break;
990− case CALLFUNC:
991− printf ("%d CALLFUNC %d %d\n", p-code, *(p+1), *(p+2));
992− p+=3;
993− break;
994− case RETCODE0: printf ("%d RETCODE0\n", (p++)-code); break;
995− case RETCODE:
996− printf ("%d RETCODE %d\n", p-code, *(++p));
997− p++;
998− break;
999− case SETLINE:
1000− {
1001− CodeWord c;
1002− int n = p-code;
1003− p++;
1004− get_word(c,p);
1005− printf ("%d SETLINE %d\n", n, c.w);
1006− }
1007− break;
1008−
1009− default: printf ("%d Cannot happen: code %d\n", (p++)-code, *(p-1)); break;
1010− }
1011− }
1012−}
1013−#endif
1014−
src/luac/Makefile+24−0
@@ -0,0 +1,24 @@
1+# makefile for lua distribution (compiler)
2+
3+LUA= ../..
4+
5+include $(LUA)/config
6+
7+INCS= -I$(INC) $(EXTRA_INCS) -I..
8+OBJS= dump.o luac.o print.o
9+SRCS= dump.c luac.c print.c luac.h print.h
10+T=$(BIN)/luac
11+
12+all: $T
13+
14+$T: $(OBJS)
15+ $(CC) -o $@ $(OBJS) -L$(LIB) -llua
16+
17+clean:
18+ rm -f $(OBJS) $T
19+
20+co:
21+ co -f -M $(SRCS)
22+
23+klean: clean
24+ rm -f $(SRCS)
src/luac/dump.c+247−0
@@ -0,0 +1,247 @@
1+/*
2+** dump.c
3+** thread and save bytecodes to file
4+*/
5+
6+char* rcs_dump="$Id: dump.c,v 1.12 1996/03/12 20:00:03 lhf Exp $";
7+
8+#include <stdio.h>
9+#include <string.h>
10+#include "luac.h"
11+
12+static TFunc* lastF=NULL; /* list of functions seen in code */
13+
14+static int SawVar(int i, int at)
15+{
16+ int old=VarLoc(i);
17+ VarLoc(i)=at;
18+ return old;
19+}
20+
21+static int SawStr(int i, int at)
22+{
23+ int old=StrLoc(i);
24+ StrLoc(i)=at;
25+ return old;
26+}
27+
28+static void ThreadCode(Byte* code, Byte* end)
29+{
30+ Byte* p;
31+ int i;
32+ for (i=0; i<lua_ntable; i++) VarLoc(i)=0;
33+ for (i=0; i<lua_nconstant; i++) StrLoc(i)=0;
34+ for (p=code; p!=end;)
35+ {
36+ OpCode op=(OpCode)*p;
37+ int at=p-code+1;
38+ switch (op)
39+ {
40+ case PUSHNIL:
41+ case PUSH0:
42+ case PUSH1:
43+ case PUSH2:
44+ case PUSHLOCAL0:
45+ case PUSHLOCAL1:
46+ case PUSHLOCAL2:
47+ case PUSHLOCAL3:
48+ case PUSHLOCAL4:
49+ case PUSHLOCAL5:
50+ case PUSHLOCAL6:
51+ case PUSHLOCAL7:
52+ case PUSHLOCAL8:
53+ case PUSHLOCAL9:
54+ case PUSHINDEXED:
55+ case STORELOCAL0:
56+ case STORELOCAL1:
57+ case STORELOCAL2:
58+ case STORELOCAL3:
59+ case STORELOCAL4:
60+ case STORELOCAL5:
61+ case STORELOCAL6:
62+ case STORELOCAL7:
63+ case STORELOCAL8:
64+ case STORELOCAL9:
65+ case STOREINDEXED0:
66+ case ADJUST0:
67+ case EQOP:
68+ case LTOP:
69+ case LEOP:
70+ case GTOP:
71+ case GEOP:
72+ case ADDOP:
73+ case SUBOP:
74+ case MULTOP:
75+ case DIVOP:
76+ case POWOP:
77+ case CONCOP:
78+ case MINUSOP:
79+ case NOTOP:
80+ case POP:
81+ case RETCODE0:
82+ p++;
83+ break;
84+ case PUSHBYTE:
85+ case PUSHLOCAL:
86+ case STORELOCAL:
87+ case STOREINDEXED:
88+ case STORELIST0:
89+ case ADJUST:
90+ case RETCODE:
91+ p+=2;
92+ break;
93+ case PUSHWORD:
94+ case CREATEARRAY:
95+ case ONTJMP:
96+ case ONFJMP:
97+ case JMP:
98+ case UPJMP:
99+ case IFFJMP:
100+ case IFFUPJMP:
101+ case SETLINE:
102+ case STORELIST:
103+ case CALLFUNC:
104+ p+=3;
105+ break;
106+ case PUSHFLOAT:
107+ p+=5;
108+ break;
109+ case PUSHSELF:
110+ case PUSHSTRING:
111+ {
112+ CodeWord c;
113+ p++;
114+ get_word(c,p);
115+ c.w=SawStr(c.w,at);
116+ p[-2]=c.m.c1;
117+ p[-1]=c.m.c2;
118+ break;
119+ }
120+ case PUSHFUNCTION:
121+ {
122+ CodeCode c;
123+ p++;
124+ get_code(c,p);
125+ c.tf->marked=at;
126+ c.tf->next=NULL; /* TODO: remove? */
127+ lastF=lastF->next=c.tf;
128+ break;
129+ }
130+ case PUSHGLOBAL:
131+ case STOREGLOBAL:
132+ {
133+ CodeWord c;
134+ p++;
135+ get_word(c,p);
136+ c.w=SawVar(c.w,at);
137+ p[-2]=c.m.c1;
138+ p[-1]=c.m.c2;
139+ break;
140+ }
141+ case STORERECORD:
142+ {
143+ int n=*++p;
144+ p++;
145+ while (n--)
146+ {
147+ CodeWord c;
148+ at=p-code;
149+ get_word(c,p);
150+ c.w=SawStr(c.w,at);
151+ p[-2]=c.m.c1;
152+ p[-1]=c.m.c2;
153+ }
154+ break;
155+ }
156+ default:
157+ fprintf(stderr,"luac: cannot happen: opcode=%d",*p);
158+ exit(1);
159+ break;
160+ }
161+ }
162+}
163+
164+static void DumpWord(int i, FILE* D)
165+{
166+ Word w=i;
167+ fwrite(&w,sizeof(w),1,D);
168+}
169+
170+static void DumpBlock(char* b, int size, FILE* D)
171+{
172+ fwrite(b,size,1,D);
173+}
174+
175+static void DumpSize(int i, FILE* D)
176+{
177+ Word lo=i&0x0FFFF;
178+ Word hi=(i>>16)&0x0FFFF;
179+ fwrite(&hi,sizeof(hi),1,D);
180+ fwrite(&lo,sizeof(lo),1,D);
181+ if (hi!=0)
182+ fprintf(stderr,
183+ "luac: warning: code too long for 16-bit machines (%d bytes)\n",i);
184+}
185+
186+static void DumpString(char* s, FILE* D)
187+{
188+ int n=strlen(s)+1;
189+ if ((Word)n != n)
190+ {
191+ fprintf(stderr,"luac: string too long: \"%.32s...\"\n",s);
192+ exit(1);
193+ }
194+ DumpWord(n,D);
195+ DumpBlock(s,n,D);
196+}
197+
198+static void DumpStrings(FILE* D)
199+{
200+ int i;
201+ for (i=0; i<lua_ntable; i++)
202+ {
203+ if (VarLoc(i)!=0)
204+ {
205+ fputc(ID_VAR,D);
206+ DumpWord(VarLoc(i),D);
207+ DumpString(VarStr(i),D);
208+ }
209+ VarLoc(i)=i;
210+ }
211+ for (i=0; i<lua_nconstant; i++)
212+ {
213+ if (StrLoc(i)!=0)
214+ {
215+ fputc(ID_STR,D);
216+ DumpWord(StrLoc(i),D);
217+ DumpString(StrStr(i),D);
218+ }
219+ StrLoc(i)=i;
220+ }
221+}
222+
223+void DumpFunction(TFunc* tf, FILE* D)
224+{
225+ lastF=tf;
226+ ThreadCode(tf->code,tf->code+tf->size);
227+ fputc(ID_FUN,D);
228+ DumpSize(tf->size,D);
229+ DumpWord(tf->lineDefined,D);
230+ if (IsMain(tf))
231+ DumpString(tf->fileName,D);
232+ else
233+ DumpWord(tf->marked,D);
234+ DumpBlock(tf->code,tf->size,D);
235+ DumpStrings(D);
236+}
237+
238+void DumpHeader(FILE* D)
239+{
240+ Word w=TEST_WORD;
241+ float f=TEST_FLOAT;
242+ fputc(ID_CHUNK,D);
243+ fputs(SIGNATURE,D);
244+ fputc(VERSION,D);
245+ fwrite(&w,sizeof(w),1,D);
246+ fwrite(&f,sizeof(f),1,D);
247+}
src/luac/luac.c+104−0
@@ -0,0 +1,104 @@
1+/*
2+** luac.c
3+** lua compiler (saves bytecodes to files)
4+*/
5+
6+char* rcs_luac="$Id: luac.c,v 1.16 1996/03/13 17:33:03 lhf Exp $";
7+
8+#include <stdio.h>
9+#include <string.h>
10+#include "luac.h"
11+
12+static void compile(char* filename);
13+
14+static int listing=0; /* list bytecodes? */
15+static int dumping=1; /* dump bytecodes? */
16+static FILE* D; /* output file */
17+
18+static void usage(void)
19+{
20+ fprintf(stderr,"usage: luac [-dlpv] [-o output] file ...\n");
21+ exit(0);
22+}
23+
24+#define IS(s) (strcmp(argv[i],s)==0)
25+
26+int main(int argc, char* argv[])
27+{
28+ char* d="luac.out"; /* default output file */
29+ int i;
30+ for (i=1; i<argc; i++)
31+ {
32+ if (argv[i][0]!='-') /* end of options */
33+ break;
34+ else if (IS("-")) /* use stdin */
35+ break;
36+ else if (IS("-d")) /* debug */
37+ lua_debug=1;
38+ else if (IS("-l")) /* list */
39+ listing=1;
40+ else if (IS("-o")) /* output file */
41+ d=argv[++i];
42+ else if (IS("-p")) /* parse only (for timing purposes) */
43+ dumping=0;
44+ else if (IS("-v")) /* show version */
45+ printf("%s %s\n(written by %s)\n\n",LUA_VERSION,LUA_COPYRIGHT,LUA_AUTHORS);
46+ else /* unknown option */
47+ usage();
48+ }
49+ --i; /* fake new argv[0] */
50+ argc-=i;
51+ argv+=i;
52+ if (argc<2) usage();
53+ for (i=1; i<argc; i++)
54+ if (IS(d))
55+ {
56+ fprintf(stderr,"luac: will not overwrite input file \"%s\"\n",d);
57+ exit(1);
58+ }
59+ D=(dumping) ? fopen(d,"wb") : stdout; /* must open in binary mode */
60+ if (D==NULL)
61+ {
62+ fprintf(stderr,"luac: cannot open ");
63+ perror(d);
64+ exit(1);
65+ }
66+ for (i=1; i<argc; i++) compile(IS("-")? NULL : argv[i]);
67+ fclose(D);
68+ return 0;
69+}
70+
71+static void do_dump(TFunc* tf) /* only for tf==main */
72+{
73+ if (dumping) DumpHeader(D);
74+ while (tf!=NULL)
75+ {
76+ TFunc* nf;
77+ if (listing) PrintFunction(tf);
78+ if (dumping) DumpFunction(tf,D);
79+ nf=tf->next; /* list only built after first main */
80+ luaI_freefunc(tf);
81+ tf=nf;
82+ }
83+}
84+
85+static void do_compile(void)
86+{
87+ TFunc* tf=new(TFunc);
88+ luaI_initTFunc(tf);
89+ tf->fileName = lua_parsedfile;
90+ lua_parse(tf);
91+ do_dump(tf);
92+}
93+
94+static void compile(char* filename)
95+{
96+ if (lua_openfile(filename)==NULL)
97+ {
98+ fprintf(stderr,"luac: cannot open ");
99+ perror(filename);
100+ exit(1);
101+ }
102+ do_compile();
103+ lua_closefile();
104+}
src/luac/luac.h+24−0
@@ -0,0 +1,24 @@
1+/*
2+** luac.h
3+** definitions for luac compiler
4+** $Id: luac.h,v 1.5 1996/03/08 21:41:47 lhf Exp $
5+*/
6+
7+#include "inout.h"
8+#include "mem.h"
9+#include "opcode.h"
10+#include "table.h"
11+#include "undump.h"
12+
13+#define VarStr(i) (lua_table[i].varname->str)
14+#define VarLoc(i) (lua_table[i].varname->varindex)
15+#define StrStr(i) (lua_constant[i]->str)
16+#define StrLoc(i) (lua_constant[i]->constindex)
17+
18+extern Word lua_ntable;
19+extern Word lua_nconstant;
20+extern int lua_debug;
21+
22+void DumpHeader(FILE* D);
23+void DumpFunction(TFunc* tf, FILE* D);
24+void PrintFunction(TFunc* tf);
src/luac/print.c+189−0
@@ -0,0 +1,189 @@
1+/*
2+** print.c
3+** print bytecodes
4+*/
5+
6+char* rcs_print="$Id: print.c,v 1.6 1996/03/12 20:00:24 lhf Exp $";
7+
8+#include <stdio.h>
9+#include <string.h>
10+#include "luac.h"
11+#include "print.h"
12+
13+static LocVar* V=NULL;
14+
15+static char* LocStr(int i)
16+{
17+ if (V==NULL) return ""; else return V[i].varname->str;
18+}
19+
20+static void PrintCode(Byte* code, Byte* end)
21+{
22+ Byte* p;
23+ for (p=code; p!=end;)
24+ {
25+ OpCode op=(OpCode)*p;
26+ if (op>SETLINE) op=SETLINE+1;
27+ printf("%6d\t%s",p-code,OpCodeName[op]);
28+ switch (op)
29+ {
30+ case PUSHNIL:
31+ case PUSH0:
32+ case PUSH1:
33+ case PUSH2:
34+ case PUSHINDEXED:
35+ case STOREINDEXED0:
36+ case ADJUST0:
37+ case EQOP:
38+ case LTOP:
39+ case LEOP:
40+ case GTOP:
41+ case GEOP:
42+ case ADDOP:
43+ case SUBOP:
44+ case MULTOP:
45+ case DIVOP:
46+ case POWOP:
47+ case CONCOP:
48+ case MINUSOP:
49+ case NOTOP:
50+ case POP:
51+ case RETCODE0:
52+ p++;
53+ break;
54+ case PUSHLOCAL0:
55+ case PUSHLOCAL1:
56+ case PUSHLOCAL2:
57+ case PUSHLOCAL3:
58+ case PUSHLOCAL4:
59+ case PUSHLOCAL5:
60+ case PUSHLOCAL6:
61+ case PUSHLOCAL7:
62+ case PUSHLOCAL8:
63+ case PUSHLOCAL9:
64+ {
65+ int i=op-PUSHLOCAL0;
66+ printf("\t%d\t; %s",i,LocStr(i));
67+ p++;
68+ break;
69+ }
70+ case STORELOCAL0:
71+ case STORELOCAL1:
72+ case STORELOCAL2:
73+ case STORELOCAL3:
74+ case STORELOCAL4:
75+ case STORELOCAL5:
76+ case STORELOCAL6:
77+ case STORELOCAL7:
78+ case STORELOCAL8:
79+ case STORELOCAL9:
80+ {
81+ int i=op-STORELOCAL0;
82+ printf("\t%d\t; %s",i,LocStr(i));
83+ p++;
84+ break;
85+ }
86+ case PUSHLOCAL:
87+ case STORELOCAL:
88+ {
89+ int i=*(p+1);
90+ printf("\t%d\t; %s",i,LocStr(i));
91+ p+=2;
92+ break;
93+ }
94+ case PUSHBYTE:
95+ case STOREINDEXED:
96+ case STORELIST0:
97+ case ADJUST:
98+ case RETCODE:
99+ printf("\t%d",*(p+1));
100+ p+=2;
101+ break;
102+ case PUSHWORD:
103+ case CREATEARRAY:
104+ case ONTJMP:
105+ case ONFJMP:
106+ case JMP:
107+ case UPJMP:
108+ case IFFJMP:
109+ case IFFUPJMP:
110+ case SETLINE:
111+ {
112+ CodeWord c;
113+ p++;
114+ get_word(c,p);
115+ printf("\t%d",c.w);
116+ break;
117+ }
118+ case PUSHFLOAT:
119+ {
120+ CodeFloat c;
121+ p++;
122+ get_float(c,p);
123+ printf("\t%g",c.f);
124+ break;
125+ }
126+ case PUSHSELF:
127+ case PUSHSTRING:
128+ {
129+ CodeWord c;
130+ p++;
131+ get_word(c,p);
132+ printf("\t%d\t; \"%s\"",c.w,StrStr(c.w));
133+ break;
134+ }
135+ case PUSHFUNCTION:
136+ {
137+ CodeCode c;
138+ p++;
139+ get_code(c,p);
140+ printf("\t%p\t; \"%s\":%d",c.tf,c.tf->fileName,c.tf->lineDefined);
141+ break;
142+ }
143+ case PUSHGLOBAL:
144+ case STOREGLOBAL:
145+ {
146+ CodeWord c;
147+ p++;
148+ get_word(c,p);
149+ printf("\t%d\t; %s",c.w,VarStr(c.w));
150+ break;
151+ }
152+ case STORELIST:
153+ case CALLFUNC:
154+ printf("\t%d %d",*(p+1),*(p+2));
155+ p+=3;
156+ break;
157+ case STORERECORD:
158+ {
159+ int n=*++p;
160+ printf("\t%d",n);
161+ p++;
162+ while (n--)
163+ {
164+ CodeWord c;
165+ printf("\n%6d\t FIELD",p-code);
166+ get_word(c,p);
167+ printf("\t%d\t; \"%s\"",c.w,StrStr(c.w));
168+ }
169+ break;
170+ }
171+ default:
172+ printf("\tcannot happen: opcode=%d",*p);
173+ exit(1);
174+ break;
175+ }
176+ printf("\n");
177+ }
178+}
179+
180+void PrintFunction(TFunc* tf)
181+{
182+ if (IsMain(tf))
183+ printf("\nmain of \"%s\" (%d bytes at %p)\n",tf->fileName,tf->size,tf);
184+ else
185+ printf("\nfunction \"%s\":%d (%d bytes at %p); used at main+%d\n",
186+ tf->fileName,tf->lineDefined,tf->size,tf,tf->marked);
187+ V=tf->locvars;
188+ PrintCode(tf->code,tf->code+tf->size);
189+}
src/luac/print.h+76−0
@@ -0,0 +1,76 @@
1+/*
2+** print.h
3+** opcode names
4+** $Id: print.h,v 1.1 1996/02/23 19:04:13 lhf Exp $
5+*/
6+
7+static char* OpCodeName[]={ /* attention: same order as enum in opcode.h */
8+ "PUSHNIL",
9+ "PUSH0",
10+ "PUSH1",
11+ "PUSH2",
12+ "PUSHBYTE",
13+ "PUSHWORD",
14+ "PUSHFLOAT",
15+ "PUSHSTRING",
16+ "PUSHFUNCTION",
17+ "PUSHLOCAL0",
18+ "PUSHLOCAL1",
19+ "PUSHLOCAL2",
20+ "PUSHLOCAL3",
21+ "PUSHLOCAL4",
22+ "PUSHLOCAL5",
23+ "PUSHLOCAL6",
24+ "PUSHLOCAL7",
25+ "PUSHLOCAL8",
26+ "PUSHLOCAL9",
27+ "PUSHLOCAL",
28+ "PUSHGLOBAL",
29+ "PUSHINDEXED",
30+ "PUSHSELF",
31+ "STORELOCAL0",
32+ "STORELOCAL1",
33+ "STORELOCAL2",
34+ "STORELOCAL3",
35+ "STORELOCAL4",
36+ "STORELOCAL5",
37+ "STORELOCAL6",
38+ "STORELOCAL7",
39+ "STORELOCAL8",
40+ "STORELOCAL9",
41+ "STORELOCAL",
42+ "STOREGLOBAL",
43+ "STOREINDEXED0",
44+ "STOREINDEXED",
45+ "STORELIST0",
46+ "STORELIST",
47+ "STORERECORD",
48+ "ADJUST0",
49+ "ADJUST",
50+ "CREATEARRAY",
51+ "EQOP",
52+ "LTOP",
53+ "LEOP",
54+ "GTOP",
55+ "GEOP",
56+ "ADDOP",
57+ "SUBOP",
58+ "MULTOP",
59+ "DIVOP",
60+ "POWOP",
61+ "CONCOP",
62+ "MINUSOP",
63+ "NOTOP",
64+ "ONTJMP",
65+ "ONFJMP",
66+ "JMP",
67+ "UPJMP",
68+ "IFFJMP",
69+ "IFFUPJMP",
70+ "POP",
71+ "CALLFUNC",
72+ "RETCODE0",
73+ "RETCODE",
74+ "SETLINE",
75+ ""
76+};
src/mem.c+34−11
@@ -3,18 +3,24 @@ · 2 unmodified lines
33 ** TecCGraf - PUC-Rio
44 */
55
6−char *rcs_mem = "$Id: mem.c,v 1.5 1995/02/06 19:34:03 roberto Exp $";
6+char *rcs_mem = "$Id: mem.c,v 1.12 1996/05/06 16:59:00 roberto Exp $";
77
88 #include <stdlib.h>
9−#include <string.h>
109
1110 #include "mem.h"
1211 #include "lua.h"
1312
13+
14+#define mem_error() lua_error(memEM)
15+
16+
1417 void luaI_free (void *block)
1518 {
16− *((int *)block) = -1; /* to catch errors */
17− free(block);
19+ if (block)
20+ {
21+ *((int *)block) = -1; /* to catch errors */
22+ free(block);
23+ }
1824 }
1925
2026
@@ -22,23 +28,40 @@ void *luaI_malloc (unsigned long size) · 1 unmodified line
2228 {
2329 void *block = malloc((size_t)size);
2430 if (block == NULL)
25− lua_error("not enough memory");
31+ mem_error();
2632 return block;
2733 }
2834
2935
3036 void *luaI_realloc (void *oldblock, unsigned long size)
3137 {
32− void *block = realloc(oldblock, (size_t)size);
38+ void *block = oldblock ? realloc(oldblock, (size_t)size) :
39+ malloc((size_t)size);
3340 if (block == NULL)
34− lua_error("not enough memory");
41+ mem_error();
3542 return block;
3643 }
3744
3845
39−char *luaI_strdup (char *str)
46+int luaI_growvector (void **block, unsigned long nelems, int size,
47+ char *errormsg, unsigned long limit)
4048 {
41− char *newstr = luaI_malloc(strlen(str)+1);
42− strcpy(newstr, str);
43− return newstr;
49+ if (nelems >= limit)
50+ lua_error(errormsg);
51+ nelems = (nelems == 0) ? 20 : nelems*2;
52+ if (nelems > limit)
53+ nelems = limit;
54+ *block = luaI_realloc(*block, nelems*size);
55+ return (int) nelems;
4456 }
57+
58+
59+void* luaI_buffer (unsigned long size)
60+{
61+ static unsigned long buffsize = 0;
62+ static char* buffer = NULL;
63+ if (size > buffsize)
64+ buffer = luaI_realloc(buffer, buffsize=size);
65+ return buffer;
66+}
67+
src/mem.h+18−4
@@ -1,7 +1,7 @@
11 /*
22 ** mem.c
33 ** memory manager for lua
4−** $Id: mem.h,v 1.2 1995/01/13 22:11:12 roberto Exp $
4+** $Id: mem.h,v 1.7 1996/04/22 18:00:37 roberto Exp $
55 */
66
77 #ifndef mem_h
@@ -11,15 +11,29 @@ · 3 unmodified lines
1111 #define NULL 0
1212 #endif
1313
14+
15+/* memory error messages */
16+#define codeEM "code size overflow"
17+#define symbolEM "symbol table overflow"
18+#define constantEM "constant table overflow"
19+#define stackEM "stack size overflow"
20+#define lexEM "lex buffer overflow"
21+#define refEM "reference table overflow"
22+#define tableEM "table overflow"
23+#define memEM "not enough memory"
24+
25+
1426 void luaI_free (void *block);
1527 void *luaI_malloc (unsigned long size);
1628 void *luaI_realloc (void *oldblock, unsigned long size);
17−
18−char *luaI_strdup (char *str);
29+void *luaI_buffer (unsigned long size);
30+int luaI_growvector (void **block, unsigned long nelems, int size,
31+ char *errormsg, unsigned long limit);
1932
2033 #define new(s) ((s *)luaI_malloc(sizeof(s)))
2134 #define newvector(n,s) ((s *)luaI_malloc((n)*sizeof(s)))
22−#define growvector(old,n,s) ((s *)luaI_realloc(old,(n)*sizeof(s)))
35+#define growvector(old,n,s,e,l) \
36+ (luaI_growvector((void**)old,n,sizeof(s),e,l))
2337
2438 #endif
2539
src/opcode.c+202−89
@@ -3,10 +3,9 @@ · 2 unmodified lines
33 ** TecCGraf - PUC-Rio
44 */
55
6−char *rcs_opcode="$Id: opcode.c,v 3.50 1995/11/16 20:46:24 roberto Exp $";
6+char *rcs_opcode="$Id: opcode.c,v 3.68 1996/04/25 14:10:00 roberto Exp $";
77
88 #include <setjmp.h>
9−#include <stdlib.h>
109 #include <stdio.h>
1110 #include <string.h>
1211
@@ -18,6 +17,7 @@ char *rcs_opcode="$Id: opcode.c,v 3.50 1995/11/16 20:46:24 roberto Exp $"; · 5 unmodified lines
1817 #include "table.h"
1918 #include "lua.h"
2019 #include "fallback.h"
20+#include "undump.h"
2121
2222 #define tonumber(o) ((tag(o) != LUA_T_NUMBER) && (lua_tonumber(o) != 0))
2323 #define tostring(o) ((tag(o) != LUA_T_STRING) && (lua_tostring(o) != 0))
@@ -25,6 +25,10 @@ char *rcs_opcode="$Id: opcode.c,v 3.50 1995/11/16 20:46:24 roberto Exp $"; · 1 unmodified line
2525
2626 #define STACK_SIZE 128
2727
28+#ifndef STACK_LIMIT
29+#define STACK_LIMIT 6000
30+#endif
31+
2832 typedef int StkId; /* index to stack elements */
2933
3034 static Object initial_stack;
@@ -53,6 +57,11 @@ static int CnResults = 0; /* when Lua calls C, has the number of parameters; */ · 22 unmodified lines
5357 static jmp_buf *errorJmp = NULL; /* current error recover point */
5458
5559
60+/* Hooks */
61+lua_LHFunction lua_linehook = NULL;
62+lua_CHFunction lua_callhook = NULL;
63+
64+
5665 static StkId lua_execute (Byte *pc, StkId base);
5766 static void do_call (StkId base, int nResults);
5867
@@ -64,7 +73,6 @@ Object *luaI_Address (lua_Object o) · 5 unmodified lines
6473 }
6574
6675
67−
6876 /*
6977 ** Init stack
7078 */
@@ -89,14 +97,17 @@ static void growstack (void) · 18 unmodified lines
8997 lua_initstack();
9098 else
9199 {
100+ static int limit = STACK_LIMIT;
92101 StkId t = top-stack;
93− Long maxstack = stackLimit - stack;
94− maxstack *= 2;
95− stack = growvector(stack, maxstack, Object);
96− stackLimit = stack+maxstack;
102+ Long stacksize = stackLimit - stack;
103+ stacksize = growvector(&stack, stacksize, Object, stackEM, limit+100);
104+ stackLimit = stack+stacksize;
97105 top = stack + t;
98− if (maxstack >= MAX_WORD/2)
99− lua_error("stack size overflow");
106+ if (stacksize >= limit)
107+ {
108+ limit = stacksize;
109+ lua_error(stackEM);
110+ }
100111 }
101112 }
102113
@@ -106,18 +117,9 @@ static void growstack (void) · 3 unmodified lines
106117 */
107118 static char *lua_strconc (char *l, char *r)
108119 {
109− static char *buffer = NULL;
110− static int buffer_size = 0;
111− int nl = strlen(l);
112− int n = nl+strlen(r)+1;
113− if (n > buffer_size)
114− {
115− buffer_size = n;
116− if (buffer != NULL)
117− luaI_free(buffer);
118− buffer = newvector(buffer_size, char);
119− }
120− strcpy(buffer,l);
120+ int nl = strlen(l);
121+ char *buffer = luaI_buffer(nl+strlen(r)+1);
122+ strcpy(buffer, l);
121123 strcpy(buffer+nl, r);
122124 return buffer;
123125 }
@@ -150,7 +152,7 @@ static int lua_tonumber (Object *obj) · 26 unmodified lines
150152 */
151153 static int lua_tostring (Object *obj)
152154 {
153− static char s[256];
155+ char s[256];
154156 if (tag(obj) != LUA_T_NUMBER)
155157 return 1;
156158 if ((int) nvalue(obj) == nvalue(obj))
@@ -158,8 +160,6 @@ static int lua_tostring (Object *obj) · 1 unmodified line
158160 else
159161 sprintf (s, "%g", nvalue(obj));
160162 tsvalue(obj) = lua_createstring(s);
161− if (tsvalue(obj) == NULL)
162− return 1;
163163 tag(obj) = LUA_T_STRING;
164164 return 0;
165165 }
@@ -192,6 +192,48 @@ static void open_stack (int nelems) · 26 unmodified lines
192192 }
193193
194194
195+/*
196+** call Line hook
197+*/
198+static void lineHook (int line)
199+{
200+ StkId oldBase = CBase;
201+ int oldCnResults = CnResults;
202+ StkId old_top = CBase = top-stack;
203+ CnResults = 0;
204+ (*lua_linehook)(line);
205+ top = stack+old_top;
206+ CnResults = oldCnResults;
207+ CBase = oldBase;
208+}
209+
210+
211+/*
212+** Call hook
213+** The function being called is in [stack+base-1]
214+*/
215+static void callHook (StkId base, lua_Type type, int isreturn)
216+{
217+ StkId oldBase = CBase;
218+ int oldCnResults = CnResults;
219+ StkId old_top = CBase = top-stack;
220+ CnResults = 0;
221+ if (isreturn)
222+ (*lua_callhook)(LUA_NOOBJECT, "(return)", 0);
223+ else
224+ {
225+ Object *f = stack+base-1;
226+ if (type == LUA_T_MARK)
227+ (*lua_callhook)(Ref(f), f->value.tf->fileName, f->value.tf->lineDefined);
228+ else
229+ (*lua_callhook)(Ref(f), "(C)", -1);
230+ }
231+ top = stack+old_top;
232+ CnResults = oldCnResults;
233+ CBase = oldBase;
234+}
235+
236+
195237 /*
196238 ** Call a C function. CBase will point to the top of the stack,
197239 ** and CnResults is the number of parameters. Returns an index
@@ -204,8 +246,12 @@ static StkId callC (lua_CFunction func, StkId base) · 6 unmodified lines
204246 StkId firstResult;
205247 CnResults = (top-stack) - base;
206248 /* incorporate parameters on the stack */
207− CBase = base+CnResults;
249+ CBase = base+CnResults; /* == top-stack */
250+ if (lua_callhook)
251+ callHook(base, LUA_T_CMARK, 0);
208252 (*func)();
253+ if (lua_callhook) /* func may have changed lua_callhook */
254+ callHook(base, LUA_T_CMARK, 1);
209255 firstResult = CBase;
210256 CBase = oldBase;
211257 CnResults = oldCnResults;
@@ -303,6 +349,18 @@ static void storesubscript (void) · 91 unmodified lines
303349 }
304350
305351
352+static void getglobal (Word n)
353+{
354+ *top = lua_table[n].object;
355+ incr_top;
356+ if (tag(top-1) == LUA_T_NIL)
357+ { /* must call getglobal fallback */
358+ tag(top-1) = LUA_T_STRING;
359+ tsvalue(top-1) = lua_table[n].varname;
360+ callFB(FB_GETGLOBAL);
361+ }
362+}
363+
306364 /*
307365 ** Traverse all objects on stack
308366 */
@@ -340,7 +398,7 @@ void lua_error (char *s) · 31 unmodified lines
340398 }
341399
342400
343−lua_Object lua_stackedfunction (int level)
401+lua_Function lua_stackedfunction (int level)
344402 {
345403 Object *p = top;
346404 while (--p >= stack)
@@ -351,13 +409,45 @@ lua_Object lua_stackedfunction (int level) · 4 unmodified lines
351409 }
352410
353411
354−int lua_currentline (lua_Object func)
412+int lua_currentline (lua_Function func)
355413 {
356414 Object *f = Address(func);
357415 return (f+1 < top && (f+1)->tag == LUA_T_LINE) ? (f+1)->value.i : -1;
358416 }
359417
360418
419+lua_Object lua_getlocal (lua_Function func, int local_number, char **name)
420+{
421+ Object *f = luaI_Address(func);
422+ *name = luaI_getlocalname(f->value.tf, local_number, lua_currentline(func));
423+ if (*name)
424+ {
425+ /* if "*name", there must be a LUA_T_LINE */
426+ /* therefore, f+2 points to function base */
427+ return Ref((f+2)+(local_number-1));
428+ }
429+ else
430+ return LUA_NOOBJECT;
431+}
432+
433+int lua_setlocal (lua_Function func, int local_number)
434+{
435+ Object *f = Address(func);
436+ char *name = luaI_getlocalname(f->value.tf, local_number, lua_currentline(func));
437+ adjustC(1);
438+ --top;
439+ if (name)
440+ {
441+ /* if "name", there must be a LUA_T_LINE */
442+ /* therefore, f+2 points to function base */
443+ *((f+2)+(local_number-1)) = *top;
444+ return 1;
445+ }
446+ else
447+ return 0;
448+}
449+
450+
361451 /*
362452 ** Execute a protected call. Assumes that function is at CBase and
363453 ** parameters are on top of it. Leave nResults on the stack.
@@ -386,6 +476,16 @@ static int do_protectedrun (int nResults) · 22 unmodified lines
386476 return status;
387477 }
388478
479+int luaI_dorun (TFunc *tf)
480+{
481+ int status;
482+ adjustC(1); /* one slot for the pseudo-function */
483+ stack[CBase].tag = LUA_T_FUNCTION;
484+ stack[CBase].value.tf = tf;
485+ status = do_protectedrun(0);
486+ adjustC(0);
487+ return status;
488+}
389489
390490 static int do_protectedmain (void)
391491 {
@@ -394,16 +494,12 @@ static int do_protectedmain (void) · 2 unmodified lines
394494 jmp_buf myErrorJmp;
395495 jmp_buf *oldErr = errorJmp;
396496 errorJmp = &myErrorJmp;
397− adjustC(1); /* one slot for the pseudo-function */
398− stack[CBase].tag = LUA_T_FUNCTION;
399− stack[CBase].value.tf = &tf;
400− tf.lineDefined = 0;
497+ luaI_initTFunc(&tf);
401498 tf.fileName = lua_parsedfile;
402− tf.code = NULL;
403499 if (setjmp(myErrorJmp) == 0)
404500 {
405501 lua_parse(&tf);
406− status = do_protectedrun(0);
502+ status = luaI_dorun(&tf);
407503 }
408504 else
409505 {
@@ -411,8 +507,7 @@ static int do_protectedmain (void) · 1 unmodified line
411507 adjustC(0); /* erase extra slot */
412508 }
413509 errorJmp = oldErr;
414− if (tf.code)
415− luaI_free(tf.code);
510+ luaI_free(tf.code);
416511 return status;
417512 }
418513
@@ -449,13 +544,13 @@ int lua_call (char *funcname) · 30 unmodified lines
449544 int lua_dofile (char *filename)
450545 {
451546 int status;
452− char *message = lua_openfile (filename);
453− if (message)
454− {
455− lua_message(message);
547+ int c;
548+ FILE *f = lua_openfile(filename);
549+ if (f == NULL)
456550 return 1;
457− }
458− status = do_protectedmain();
551+ c = fgetc(f);
552+ ungetc(c, f);
553+ status = (c == ID_CHUNK) ? luaI_undump(f) : do_protectedmain();
459554 lua_closefile();
460555 return status;
461556 }
@@ -514,8 +609,9 @@ static StkId Cblocks[MAX_C_BLOCKS]; · 52 unmodified lines
514609 */
515610 void lua_beginblock (void)
516611 {
517− if (numCblocks < MAX_C_BLOCKS)
518− Cblocks[numCblocks] = CBase;
612+ if (numCblocks >= MAX_C_BLOCKS)
613+ lua_error("`lua_beginblock': too many nested blocks");
614+ Cblocks[numCblocks] = CBase;
519615 numCblocks++;
520616 }
521617
@@ -525,11 +621,8 @@ void lua_beginblock (void) · 3 unmodified lines
525621 void lua_endblock (void)
526622 {
527623 --numCblocks;
528− if (numCblocks < MAX_C_BLOCKS)
529− {
530− CBase = Cblocks[numCblocks];
531− adjustC(0);
532− }
624+ CBase = Cblocks[numCblocks];
625+ adjustC(0);
533626 }
534627
535628 /*
@@ -566,6 +659,23 @@ lua_Object lua_getparam (int number) · 30 unmodified lines
566659 return CBase-CnResults+number;
567660 }
568661
662+int lua_isnumber (lua_Object object)
663+{
664+ return (object != LUA_NOOBJECT) && (tonumber(Address(object)) == 0);
665+}
666+
667+int lua_isstring (lua_Object object)
668+{
669+ int t = lua_type(object);
670+ return (t == LUA_T_STRING) || (t == LUA_T_NUMBER);
671+}
672+
673+int lua_isfunction (lua_Object object)
674+{
675+ int t = lua_type(object);
676+ return (t == LUA_T_FUNCTION) || (t == LUA_T_CFUNCTION);
677+}
678+
569679 /*
570680 ** Given an object handle, return its number value. On error, return 0.0.
571681 */
@@ -607,27 +717,31 @@ void *lua_getuserdata (lua_Object object) · 35 unmodified lines
607717 }
608718
609719
610−lua_Object lua_getlocked (int ref)
720+lua_Object lua_getref (int ref)
611721 {
612− adjustC(0);
613− *top = *luaI_getlocked(ref);
614− incr_top;
615− CBase++; /* incorporate object in the stack */
616− return Ref(top-1);
722+ Object *o = luaI_getref(ref);
723+ if (o == NULL)
724+ return LUA_NOOBJECT;
725+ adjustC(0);
726+ luaI_pushobject(o);
727+ CBase++; /* incorporate object in the stack */
728+ return Ref(top-1);
617729 }
618730
619731
620−void lua_pushlocked (int ref)
732+void lua_pushref (int ref)
621733 {
622− *top = *luaI_getlocked(ref);
623− incr_top;
734+ Object *o = luaI_getref(ref);
735+ if (o == NULL)
736+ lua_error("access to invalid (possibly garbage collected) reference");
737+ luaI_pushobject(o);
624738 }
625739
626740
627−int lua_lock (void)
741+int lua_ref (int lock)
628742 {
629743 adjustC(1);
630− return luaI_lock(--top);
744+ return luaI_ref(--top, lock);
631745 }
632746
633747
@@ -637,10 +751,8 @@ int lua_lock (void) · 3 unmodified lines
637751 */
638752 lua_Object lua_getglobal (char *name)
639753 {
640− Word n = luaI_findsymbolbyname(name);
641754 adjustC(0);
642− *top = s_object(n);
643− incr_top;
755+ getglobal(luaI_findsymbolbyname(name));
644756 CBase++; /* incorporate object in the stack */
645757 return Ref(top-1);
646758 }
@@ -678,20 +790,17 @@ void lua_pushnumber (real n) · 31 unmodified lines
678790 */
679791 void lua_pushstring (char *s)
680792 {
681− tsvalue(top) = lua_createstring(s);
682− tag(top) = LUA_T_STRING;
683− incr_top;
684−}
685−
686−/*
687−** Push an object (tag=string) on stack and register it on the constant table.
688−*/
689−void lua_pushliteral (char *s)
690−{
691− tsvalue(top) = lua_constant[luaI_findconstantbyname(s)];
692− tag(top) = LUA_T_STRING;
693− incr_top;
793+ if (s == NULL)
794+ tag(top) = LUA_T_NIL;
795+ else
796+ {
797+ tsvalue(top) = lua_createstring(s);
798+ tag(top) = LUA_T_STRING;
799+ }
800+ incr_top;
694801 }
802+/*>>>>>>>>>#undef lua_pushliteral
803+void lua_pushliteral(char *s) { lua_pushstring(s); }*/
695804
696805 /*
697806 ** Push an object (tag=cfunction) to stack.
@@ -707,27 +816,29 @@ void lua_pushcfunction (lua_CFunction fn) · 9 unmodified lines
707816 */
708817 void lua_pushusertag (void *u, int tag)
709818 {
710− if (tag < LUA_T_USERDATA) return;
819+ if (tag < LUA_T_USERDATA)
820+ lua_error("invalid tag in `lua_pushusertag'");
711821 tag(top) = tag; uvalue(top) = u;
712822 incr_top;
713823 }
714824
715825 /*
716−** Push a lua_Object to stack.
826+** Push an object on the stack.
717827 */
718−void lua_pushobject (lua_Object o)
828+void luaI_pushobject (Object *o)
719829 {
720− *top = *Address(o);
830+ *top = *o;
721831 incr_top;
722832 }
723833
724834 /*
725−** Push an object on the stack.
835+** Push a lua_Object on stack.
726836 */
727−void luaI_pushobject (Object *o)
837+void lua_pushobject (lua_Object o)
728838 {
729− *top = *o;
730− incr_top;
839+ if (o == LUA_NOOBJECT)
840+ lua_error("attempt to push a NOOBJECT");
841+ luaI_pushobject(Address(o));
731842 }
732843
733844 int lua_type (lua_Object o)
@@ -783,6 +894,8 @@ static void comparison (lua_Type tag_less, lua_Type tag_equal, · 49 unmodified lines
783894 */
784895 static StkId lua_execute (Byte *pc, StkId base)
785896 {
897+ if (lua_callhook)
898+ callHook (base, LUA_T_MARK, 0);
786899 while (1)
787900 {
788901 OpCode opcode;
@@ -849,8 +962,7 @@ static StkId lua_execute (Byte *pc, StkId base) · 60 unmodified lines
849962 {
850963 CodeWord code;
851964 get_word(code,pc);
852− *top = s_object(code.w);
853− incr_top;
965+ getglobal(code.w);
854966 }
855967 break;
856968
@@ -1143,10 +1255,10 @@ static StkId lua_execute (Byte *pc, StkId base) · 286 unmodified lines
11431255 break;
11441256
11451257 case RETCODE0:
1146− return base;
1147−
11481258 case RETCODE:
1149− return base+*pc;
1259+ if (lua_callhook)
1260+ callHook (base, LUA_T_MARK, 1);
1261+ return (base + ((opcode==RETCODE0) ? 0 : *pc));
11501262
11511263 case SETLINE:
11521264 {
@@ -1160,6 +1272,8 @@ static StkId lua_execute (Byte *pc, StkId base) · 7 unmodified lines
11601272 (stack+base-1)->tag = LUA_T_LINE;
11611273 }
11621274 (stack+base-1)->value.i = code.w;
1275+ if (lua_linehook)
1276+ lineHook (code.w);
11631277 break;
11641278 }
11651279
@@ -1169,4 +1283,3 @@ static StkId lua_execute (Byte *pc, StkId base) · 3 unmodified lines
11691283 }
11701284 }
11711285
1172−
src/opcode.h+6−20
@@ -1,6 +1,6 @@
11 /*
22 ** TeCGraf - PUC-Rio
3−** $Id: opcode.h,v 3.14 1995/10/25 13:05:51 roberto Exp $
3+** $Id: opcode.h,v 3.20 1996/03/15 13:13:13 roberto Exp $
44 */
55
66 #ifndef opcode_h
@@ -11,9 +11,6 @@ · 4 unmodified lines
1111 #include "tree.h"
1212 #include "func.h"
1313
14−#ifndef real
15−#define real float
16−#endif
1714
1815 #define FIELDS_PER_FLUSH 40
1916
@@ -74,12 +71,9 @@ typedef enum · 54 unmodified lines
7471 #define MULT_RET 255
7572
7673
77−typedef void (*Cfunction) (void);
78−typedef int (*Input) (void);
79−
8074 typedef union
8175 {
82− Cfunction f;
76+ lua_CFunction f;
8377 real n;
8478 TaggedString *ts;
8579 TFunc *tf;
@@ -94,10 +88,6 @@ typedef struct Object · 8 unmodified lines
9488 Value value;
9589 } Object;
9690
97−typedef struct
98−{
99− Object object;
100−} Symbol;
10191
10292 /* Macros to access structure members */
10393 #define tag(o) ((o)->tag)
@@ -119,14 +109,14 @@ typedef struct · 15 unmodified lines
119109
120110 typedef union
121111 {
122− struct {char c1; char c2;} m;
112+ struct {Byte c1; Byte c2;} m;
123113 Word w;
124114 } CodeWord;
125115 #define get_word(code,pc) {code.m.c1 = *pc++; code.m.c2 = *pc++;}
126116
127117 typedef union
128118 {
129− struct {char c1; char c2; char c3; char c4;} m;
119+ struct {Byte c1; Byte c2; Byte c3; Byte c4;} m;
130120 float f;
131121 } CodeFloat;
132122 #define get_float(code,pc) {code.m.c1 = *pc++; code.m.c2 = *pc++;\
@@ -134,7 +124,7 @@ typedef union · 1 unmodified line
134124
135125 typedef union
136126 {
137− struct {char c1; char c2; char c3; char c4;} m;
127+ struct {Byte c1; Byte c2; Byte c3; Byte c4;} m;
138128 TFunc *tf;
139129 } CodeCode;
140130 #define get_code(code,pc) {code.m.c1 = *pc++; code.m.c2 = *pc++;\
@@ -142,16 +132,12 @@ typedef union · 1 unmodified line
142132
143133
144134 /* Exported functions */
145−char *lua_strdup (char *l);
146−
147−void lua_setinput (Input fn); /* from "lex.c" module */
148−char *lua_lasttext (void); /* from "lex.c" module */
149−int yylex (void); /* from "lex.c" module */
150135 void lua_parse (TFunc *tf); /* from "lua.stx" module */
151136 void luaI_codedebugline (int line); /* from "lua.stx" module */
152137 void lua_travstack (int (*fn)(Object *));
153138 Object *luaI_Address (lua_Object o);
154139 void luaI_pushobject (Object *o);
155140 void luaI_gcFB (Object *o);
141+int luaI_dorun (TFunc *tf);
156142
157143 #endif
src/parser.c+439−663
@@ -1,25 +1,26 @@
11 #if defined (__cplusplus) || defined (c_plusplus)
22 #include <c_varieties.h>
33 #ifdef __EXTERN_C__
4− EXTERN_FUNCTION ( extern int yylex, ());
4+ EXTERN_FUNCTION ( extern int luaY_lex, ());
55 #else
6− extern int yylex();
6+ extern int luaY_lex();
77 #endif
8− extern void yyerror(char *);
9− extern int yyparse();
8+ extern void luaY_error(char *);
9+ extern int luaY_parse();
1010 #endif
1111
12−#include <malloc.h>
12+#include <stdlib.h>
1313
1414 # line 2 "lua.stx"
1515
16−char *rcs_luastx = "$Id: lua.stx,v 3.25 1995/10/26 17:02:50 roberto Exp $";
16+char *rcs_luastx = "$Id: parser.c,v 1.1 1996/05/14 19:44:57 lhf Exp $";
1717
1818 #include <stdio.h>
1919 #include <stdlib.h>
20−#include <string.h>
2120
21+#include "luadebug.h"
2222 #include "mem.h"
23+#include "lex.h"
2324 #include "opcode.h"
2425 #include "hash.h"
2526 #include "inout.h"
@@ -29,7 +30,7 @@ char *rcs_luastx = "$Id: lua.stx,v 3.25 1995/10/26 17:02:50 roberto Exp $"; · 3 unmodified lines
2930 #include "func.h"
3031
3132 /* to avoid warnings generated by yacc */
32−int yyparse (void);
33+int luaY_parse (void);
3334 #define malloc luaI_malloc
3435 #define realloc luaI_realloc
3536 #define free luaI_free
@@ -43,7 +44,7 @@ int yyparse (void); · 7 unmodified lines
4344 #endif
4445 static int maxcode;
4546 static int maxmain;
46−static Long maxcurr; /* to allow maxcurr *= 2 without overflow */
47+static int maxcurr;
4748 static Byte *funcCode = NULL;
4849 static Byte **initcode;
4950 static Byte *basepc;
@@ -57,35 +58,32 @@ static Long varbuffer[MAXVAR]; /* variables in an assignment list; · 7 unmodified lines
5758 static int nvarbuffer=0; /* number of variables at a list */
5859
5960 #define MAXLOCALS 32
60−static Word localvar[MAXLOCALS]; /* store local variable names */
61+static TaggedString *localvar[MAXLOCALS]; /* store local variable names */
6162 static int nlocalvar=0; /* number of local variables */
6263
6364 #define MAXFIELDS FIELDS_PER_FLUSH*2
6465 static Word fields[MAXFIELDS]; /* fieldnames to be flushed */
6566 static int nfields=0;
6667
68+int lua_debug = 0;
6769
6870 /* Internal functions */
6971
70−static void yyerror (char *s)
72+static void luaY_error (char *s)
7173 {
72− static char msg[256];
73− sprintf (msg,"%s near \"%s\" at line %d in file `%s'",
74− s, lua_lasttext (), lua_linenumber, lua_parsedfile);
74+ char msg[256];
75+ char *token = lua_lasttext();
76+ if (token[0] == 0)
77+ token = "<eof>";
78+ sprintf (msg,"%s; last token read: \"%s\" at line %d in file `%s'",
79+ s, token, lua_linenumber, lua_parsedfile);
7580 lua_error (msg);
7681 }
7782
7883 static void code_byte (Byte c)
7984 {
8085 if (pc>maxcurr-2) /* 1 byte free to code HALT of main code */
81− {
82− if (maxcurr >= MAX_INT)
83− lua_error("code size overflow");
84− maxcurr *= 2;
85− if (maxcurr >= MAX_INT)
86− maxcurr = MAX_INT;
87− basepc = growvector(basepc, maxcurr, Byte);
88− }
86+ maxcurr = growvector(&basepc, maxcurr, Byte, codeEM, MAX_INT);
8987 basepc[pc++] = c;
9088 }
9189
@@ -117,10 +115,12 @@ static void code_code (TFunc *tf) · 25 unmodified lines
117115 code_byte(code.m.c4);
118116 }
119117
120−static void code_word_at (Byte *p, Word n)
118+static void code_word_at (Byte *p, int n)
121119 {
122120 CodeWord code;
123− code.w = n;
121+ if ((Word)n != n)
122+ luaY_error("block too big");
123+ code.w = (Word)n;
124124 *p++ = code.m.c1;
125125 *p++ = code.m.c2;
126126 }
@@ -130,7 +130,7 @@ static void push_field (Word name) · 3 unmodified lines
130130 if (nfields < MAXFIELDS)
131131 fields[nfields++] = name;
132132 else
133− lua_error ("too many fields in nested constructors");
133+ luaY_error ("too many fields in nested constructors");
134134 }
135135
136136 static void flush_record (int n)
@@ -155,24 +155,24 @@ static void flush_list (int m, int n) · 18 unmodified lines
155155 code_byte(m);
156156 }
157157 else
158− lua_error ("list constructor too long");
158+ luaY_error ("list constructor too long");
159159 code_byte(n);
160160 }
161161
162−static void add_localvar (Word name)
162+static void store_localvar (TaggedString *name, int n)
163163 {
164− if (nlocalvar < MAXLOCALS)
165− localvar[nlocalvar++] = name;
164+ if (nlocalvar+n < MAXLOCALS)
165+ localvar[nlocalvar+n] = name;
166166 else
167− lua_error ("too many local variables");
167+ luaY_error ("too many local variables");
168+ if (lua_debug)
169+ luaI_registerlocalvar(name, lua_linenumber);
168170 }
169171
170−static void store_localvar (Word name, int n)
172+static void add_localvar (TaggedString *name)
171173 {
172− if (nlocalvar+n < MAXLOCALS)
173− localvar[nlocalvar+n] = name;
174− else
175− lua_error ("too many local variables");
174+ store_localvar(name, 0);
175+ nlocalvar++;
176176 }
177177
178178 static void add_varbuffer (Long var)
@@ -180,7 +180,7 @@ static void add_varbuffer (Long var) · 1 unmodified line
180180 if (nvarbuffer < MAXVAR)
181181 varbuffer[nvarbuffer++] = var;
182182 else
183− lua_error ("variable buffer overflow");
183+ luaY_error ("variable buffer overflow");
184184 }
185185
186186 static void code_number (float f)
@@ -210,7 +210,7 @@ static void code_number (float f) · 23 unmodified lines
210210 /*
211211 ** Search a local name and if find return its index. If do not find return -1
212212 */
213−static int lua_localname (Word n)
213+static int lua_localname (TaggedString *n)
214214 {
215215 int i;
216216 for (i=nlocalvar-1; i >= 0; i--)
@@ -401,13 +401,12 @@ static void codeIf (Long thenAdd, Long elseAdd) · 184 unmodified lines
401401 */
402402 void lua_parse (TFunc *tf)
403403 {
404− lua_debug = 0;
405404 initcode = &(tf->code);
406405 *initcode = newvector(CODE_BLOCK, Byte);
407406 maincode = 0;
408407 maxmain = CODE_BLOCK;
409408 change2main();
410− if (yyparse ()) lua_error("parse error");
409+ if (luaY_parse ()) lua_error("parse error");
411410 savemain();
412411 (*initcode)[maincode++] = RETCODE0;
413412 tf->size = maincode;
@@ -419,7 +418,7 @@ void lua_parse (TFunc *tf) · 5 unmodified lines
419418
420419
421420
422−# line 411 "lua.stx"
421+# line 410 "lua.stx"
423422 typedef union
424423 {
425424 int vInt;
@@ -428,7 +427,7 @@ typedef union · 2 unmodified lines
428427 Word vWord;
429428 Long vLong;
430429 TFunc *pFunc;
431− TreeNode *pNode;
430+ TaggedString *pTStr;
432431 } YYSTYPE;
433432 # define WRONGTOKEN 257
434433 # define NIL 258
@@ -457,244 +456,19 @@ typedef union · 22 unmodified lines
457456 # define CONC 281
458457 # define UNARY 282
459458 # define NOT 283
460−#define yyclearin yychar = -1
461−#define yyerrok yyerrflag = 0
462−extern int yychar;
463−extern int yyerrflag;
459+#define luaY_clearin luaY_char = -1
460+#define luaY_errok luaY_errflag = 0
461+extern int luaY_char;
462+extern int luaY_errflag;
464463 #ifndef YYMAXDEPTH
465464 #define YYMAXDEPTH 150
466465 #endif
467−YYSTYPE yylval, yyval;
466+YYSTYPE luaY_lval, luaY_val;
468467 # define YYERRCODE 256
469468
470−# line 789 "lua.stx"
471−
472−
473−#if LISTING
474−
475−static void PrintCode (Byte *code, Byte *end)
476−{
477− Byte *p = code;
478− printf ("\n\nCODE\n");
479− while (p != end)
480− {
481− switch ((OpCode)*p)
482− {
483− case PUSHNIL: printf ("%d PUSHNIL\n", (p++)-code); break;
484− case PUSH0: case PUSH1: case PUSH2:
485− printf ("%d PUSH%c\n", p-code, *p-PUSH0+'0');
486− p++;
487− break;
488− case PUSHBYTE:
489− printf ("%d PUSHBYTE %d\n", p-code, *(++p));
490− p++;
491− break;
492− case PUSHWORD:
493− {
494− CodeWord c;
495− int n = p-code;
496− p++;
497− get_word(c,p);
498− printf ("%d PUSHWORD %d\n", n, c.w);
499− }
500− break;
501− case PUSHFLOAT:
502− {
503− CodeFloat c;
504− int n = p-code;
505− p++;
506− get_float(c,p);
507− printf ("%d PUSHFLOAT %f\n", n, c.f);
508− }
509− break;
510− case PUSHSTRING:
511− {
512− CodeWord c;
513− int n = p-code;
514− p++;
515− get_word(c,p);
516− printf ("%d PUSHSTRING %d\n", n, c.w);
517− }
518− break;
519− case PUSHFUNCTION:
520− {
521− CodeCode c;
522− int n = p-code;
523− p++;
524− get_code(c,p);
525− printf ("%d PUSHFUNCTION %p\n", n, c.tf);
526− }
527− break;
528−
529− case PUSHLOCAL0: case PUSHLOCAL1: case PUSHLOCAL2: case PUSHLOCAL3:
530− case PUSHLOCAL4: case PUSHLOCAL5: case PUSHLOCAL6: case PUSHLOCAL7:
531− case PUSHLOCAL8: case PUSHLOCAL9:
532− printf ("%d PUSHLOCAL%c\n", p-code, *p-PUSHLOCAL0+'0');
533− p++;
534− break;
535− case PUSHLOCAL: printf ("%d PUSHLOCAL %d\n", p-code, *(++p));
536− p++;
537− break;
538− case PUSHGLOBAL:
539− {
540− CodeWord c;
541− int n = p-code;
542− p++;
543− get_word(c,p);
544− printf ("%d PUSHGLOBAL %d\n", n, c.w);
545− }
546− break;
547− case PUSHINDEXED: printf ("%d PUSHINDEXED\n", (p++)-code); break;
548− case STORELOCAL0: case STORELOCAL1: case STORELOCAL2: case STORELOCAL3:
549− case STORELOCAL4: case STORELOCAL5: case STORELOCAL6: case STORELOCAL7:
550− case STORELOCAL8: case STORELOCAL9:
551− printf ("%d STORELOCAL%c\n", p-code, *p-STORELOCAL0+'0');
552− p++;
553− break;
554− case STORELOCAL:
555− printf ("%d STORELOCAL %d\n", p-code, *(++p));
556− p++;
557− break;
558− case STOREGLOBAL:
559− {
560− CodeWord c;
561− int n = p-code;
562− p++;
563− get_word(c,p);
564− printf ("%d STOREGLOBAL %d\n", n, c.w);
565− }
566− break;
567− case PUSHSELF:
568− {
569− CodeWord c;
570− int n = p-code;
571− p++;
572− get_word(c,p);
573− printf ("%d PUSHSELF %d\n", n, c.w);
574− }
575− break;
576− case STOREINDEXED0: printf ("%d STOREINDEXED0\n", (p++)-code); break;
577− case STOREINDEXED: printf ("%d STOREINDEXED %d\n", p-code, *(++p));
578− p++;
579− break;
580− case STORELIST0:
581− printf("%d STORELIST0 %d\n", p-code, *(++p));
582− p++;
583− break;
584− case STORELIST:
585− printf("%d STORELIST %d %d\n", p-code, *(p+1), *(p+2));
586− p+=3;
587− break;
588− case STORERECORD:
589− printf("%d STORERECORD %d\n", p-code, *(++p));
590− p += *p*sizeof(Word) + 1;
591− break;
592− case ADJUST0: printf ("%d ADJUST0\n", (p++)-code); break;
593− case ADJUST:
594− printf ("%d ADJUST %d\n", p-code, *(++p));
595− p++;
596− break;
597− case CREATEARRAY:
598− {
599− CodeWord c;
600− int n = p-code;
601− p++;
602− get_word(c,p);
603− printf ("%d CREATEARRAY %d\n", n, c.w);
604− break;
605− }
606− case EQOP: printf ("%d EQOP\n", (p++)-code); break;
607− case LTOP: printf ("%d LTOP\n", (p++)-code); break;
608− case LEOP: printf ("%d LEOP\n", (p++)-code); break;
609− case ADDOP: printf ("%d ADDOP\n", (p++)-code); break;
610− case SUBOP: printf ("%d SUBOP\n", (p++)-code); break;
611− case MULTOP: printf ("%d MULTOP\n", (p++)-code); break;
612− case DIVOP: printf ("%d DIVOP\n", (p++)-code); break;
613− case POWOP: printf ("%d POWOP\n", (p++)-code); break;
614− case CONCOP: printf ("%d CONCOP\n", (p++)-code); break;
615− case MINUSOP: printf ("%d MINUSOP\n", (p++)-code); break;
616− case NOTOP: printf ("%d NOTOP\n", (p++)-code); break;
617− case ONTJMP:
618− {
619− CodeWord c;
620− int n = p-code;
621− p++;
622− get_word(c,p);
623− printf ("%d ONTJMP %d\n", n, c.w);
624− }
625− break;
626− case ONFJMP:
627− {
628− CodeWord c;
629− int n = p-code;
630− p++;
631− get_word(c,p);
632− printf ("%d ONFJMP %d\n", n, c.w);
633− }
634− break;
635− case JMP:
636− {
637− CodeWord c;
638− int n = p-code;
639− p++;
640− get_word(c,p);
641− printf ("%d JMP %d\n", n, c.w);
642− }
643− break;
644− case UPJMP:
645− {
646− CodeWord c;
647− int n = p-code;
648− p++;
649− get_word(c,p);
650− printf ("%d UPJMP %d\n", n, c.w);
651− }
652− break;
653− case IFFJMP:
654− {
655− CodeWord c;
656− int n = p-code;
657− p++;
658− get_word(c,p);
659− printf ("%d IFFJMP %d\n", n, c.w);
660− }
661− break;
662− case IFFUPJMP:
663− {
664− CodeWord c;
665− int n = p-code;
666− p++;
667− get_word(c,p);
668− printf ("%d IFFUPJMP %d\n", n, c.w);
669− }
670− break;
671− case POP: printf ("%d POP\n", (p++)-code); break;
672− case CALLFUNC:
673− printf ("%d CALLFUNC %d %d\n", p-code, *(p+1), *(p+2));
674− p+=3;
675− break;
676− case RETCODE0: printf ("%d RETCODE0\n", (p++)-code); break;
677− case RETCODE:
678− printf ("%d RETCODE %d\n", p-code, *(++p));
679− p++;
680− break;
681− case SETLINE:
682− {
683− CodeWord c;
684− int n = p-code;
685− p++;
686− get_word(c,p);
687− printf ("%d SETLINE %d\n", n, c.w);
688− }
689− break;
690−
691− default: printf ("%d Cannot happen: code %d\n", (p++)-code, *(p-1)); break;
692− }
693− }
694−}
695−#endif
469+# line 788 "lua.stx"
696470
697−int yyexca[] ={
471+int luaY_exca[] ={
698472 -1, 1,
699473 0, -1,
700474 -2, 0,
@@ -760,7 +534,7 @@ int yyexca[] ={ · 59 unmodified lines
760534 };
761535 # define YYNPROD 100
762536 # define YYLAST 311
763−int yyact[]={
537+int luaY_act[]={
764538
765539 61, 59, 148, 60, 141, 62, 118, 61, 59, 90,
766540 60, 89, 62, 86, 84, 18, 42, 168, 54, 164,
@@ -794,7 +568,7 @@ int yyact[]={ · 27 unmodified lines
794568 0, 0, 0, 0, 0, 30, 31, 18, 30, 31,
795569 113, 0, 0, 0, 64, 0, 0, 34, 0, 0,
796570 34 };
797−int yypact[]={
571+int luaY_pact[]={
798572
799573 -1000, -188, -1000, -1000, 51, -1000, -258, 24, -1000, -1000,
800574 47, -1000, -257, -1000, -1000, 93, -1000, 73, -1000, -1000,
@@ -814,14 +588,14 @@ int yypact[]={ · 13 unmodified lines
814588 -21, -1000, -1000, -1000, 51, -1000, -1000, -248, -1000, 24,
815589 -1000, 69, -250, -1000, -1000, -1000, -42, -1000, -1000, -1000,
816590 -1000, -1000, -212, -1000 };
817−int yypgo[]={
591+int luaY_pgo[]={
818592
819593 0, 216, 54, 44, 138, 76, 57, 212, 211, 210,
820594 205, 202, 201, 199, 61, 198, 195, 194, 189, 159,
821595 188, 186, 185, 184, 182, 92, 37, 181, 130, 32,
822596 180, 88, 34, 177, 176, 175, 172, 141, 170, 168,
823597 165, 163, 154, 134, 51, 56 };
824−int yyr1[]={
598+int luaY_r1[]={
825599
826600 0, 1, 1, 1, 23, 23, 24, 21, 21, 22,
827601 30, 30, 26, 26, 25, 33, 25, 34, 25, 25,
@@ -833,7 +607,7 @@ int yyr1[]={ · 5 unmodified lines
833607 42, 42, 43, 10, 10, 15, 15, 44, 44, 13,
834608 13, 14, 14, 45, 16, 16, 17, 17, 7, 7,
835609 19, 19, 19, 20, 28, 11, 11, 12, 12, 27 };
836−int yyr2[]={
610+int luaY_r2[]={
837611
838612 0, 0, 4, 4, 4, 2, 7, 3, 7, 11,
839613 0, 6, 0, 2, 17, 1, 17, 1, 13, 7,
@@ -845,7 +619,7 @@ int yyr2[]={ · 5 unmodified lines
845619 3, 7, 1, 7, 5, 1, 5, 0, 2, 1,
846620 5, 3, 7, 7, 1, 5, 3, 7, 3, 7,
847621 3, 9, 7, 3, 3, 3, 7, 1, 5, 3 };
848−int yychk[]={
622+int luaY_chk[]={
849623
850624 -1000, -1, -23, -24, -25, -27, 270, 259, 263, 265,
851625 -7, -5, 269, 274, -19, -9, -20, -28, 273, -26,
@@ -865,7 +639,7 @@ int yychk[]={ · 13 unmodified lines
865639 -31, -29, -2, -26, -3, -6, 267, -32, 261, 262,
866640 -13, -14, -2, -26, 267, -29, -31, -44, 267, 260,
867641 -2, -29, -2, -32 };
868−int yydef[]={
642+int luaY_def[]={
869643
870644 1, -2, 2, 3, 12, 5, 0, 56, 15, 17,
871645 0, 20, 0, 99, -2, 56, 90, 59, 93, 4,
@@ -885,14 +659,14 @@ int yydef[]={ · 13 unmodified lines
885659 83, 29, 18, 11, 12, -2, 9, 0, 25, 56,
886660 76, 77, 0, 28, 14, 23, 0, 80, 16, 29,
887661 25, 29, 22, 24 };
888−typedef struct { char *t_name; int t_val; } yytoktype;
662+typedef struct { char *t_name; int t_val; } luaY_toktype;
889663 #ifndef YYDEBUG
890664 # define YYDEBUG 0 /* don't allow debugging */
891665 #endif
892666
893667 #if YYDEBUG
894668
895−yytoktype yytoks[] =
669+luaY_toktype luaY_toks[] =
896670 {
897671 "WRONGTOKEN", 257,
898672 "NIL", 258,
@@ -931,7 +705,7 @@ yytoktype yytoks[] = · 32 unmodified lines
931705 "-unknown-", -1 /* ends search */
932706 };
933707
934−char * yyreds[] =
708+char * luaY_reds[] =
935709 {
936710 "-no such reduction-",
937711 "functionlist : /* empty */",
@@ -1048,24 +822,24 @@ char * yyreds[] = · 110 unmodified lines
1048822 /*
1049823 ** yacc user known macros and defines
1050824 */
1051−#define YYERROR goto yyerrlab
825+#define YYERROR goto luaY_errlab
1052826 #define YYACCEPT return(0)
1053827 #define YYABORT return(1)
1054828 #define YYBACKUP( newtoken, newvalue )\
1055829 {\
1056− if ( yychar >= 0 || ( yyr2[ yytmp ] >> 1 ) != 1 )\
830+ if ( luaY_char >= 0 || ( luaY_r2[ luaY_tmp ] >> 1 ) != 1 )\
1057831 {\
1058− yyerror( "syntax error - cannot backup" );\
1059− goto yyerrlab;\
832+ luaY_error( "syntax error - cannot backup" );\
833+ goto luaY_errlab;\
1060834 }\
1061− yychar = newtoken;\
1062− yystate = *yyps;\
1063− yylval = newvalue;\
1064− goto yynewstate;\
835+ luaY_char = newtoken;\
836+ luaY_state = *luaY_ps;\
837+ luaY_lval = newvalue;\
838+ goto luaY_newstate;\
1065839 }
1066−#define YYRECOVERING() (!!yyerrflag)
840+#define YYRECOVERING() (!!luaY_errflag)
1067841 #define YYCOPY(to, from, type) \
1068− (type *) memcpy(to, (char *) from, yynewmax * sizeof(type))
842+ (type *) memcpy(to, (char *) from, luaY_newmax * sizeof(type))
1069843 #ifndef YYDEBUG
1070844 # define YYDEBUG 1 /* make debugging available */
1071845 #endif
@@ -1085,7 +859,7 @@ EXTERN_FUNCTION ( extern void *memcpy, (void *, const void *, int) ); · 13 unmodified lines
1085859 /*
1086860 ** user known globals
1087861 */
1088−int yydebug; /* set to 1 to get debugging */
862+int luaY_debug; /* set to 1 to get debugging */
1089863
1090864 /*
1091865 ** driver internal defines
@@ -1095,50 +869,50 @@ int yydebug; /* set to 1 to get debugging */ · 3 unmodified lines
1095869 /*
1096870 ** static variables used by the parser
1097871 */
1098−static YYSTYPE yy_yyv[YYMAXDEPTH], *yyv = yy_yyv; /* value stack */
1099−static int yy_yys[YYMAXDEPTH], *yys = yy_yys; /* state stack */
872+static YYSTYPE luaY__luaY_v[YYMAXDEPTH], *luaY_v = luaY__luaY_v; /* value stack */
873+static int luaY__luaY_s[YYMAXDEPTH], *luaY_s = luaY__luaY_s; /* state stack */
1100874
1101−static YYSTYPE *yypv; /* top of value stack */
1102−static int *yyps; /* top of state stack */
875+static YYSTYPE *luaY_pv; /* top of value stack */
876+static int *luaY_ps; /* top of state stack */
1103877
1104−static int yystate; /* current state */
1105−static int yytmp; /* extra var (lasts between blocks) */
878+static int luaY_state; /* current state */
879+static int luaY_tmp; /* extra var (lasts between blocks) */
1106880
1107881 #if defined(__cplusplus) || defined(__STDC__) || defined(lint)
1108882 static int __yaccpar_lint_hack__ = 0;
1109883 /* if you change the value from 0 to
1110884 something else, make sure you know
1111− what to do with yyerrlab reference.
885+ what to do with luaY_errlab reference.
1112886 This is a hack - to make sure C++ and
1113887 lint are happy with the 4.1 yacc code. */
1114888 #endif
1115889
1116−int yynerrs; /* number of errors */
890+int luaY_nerrs; /* number of errors */
1117891
1118−int yyerrflag; /* error recovery flag */
1119−int yychar; /* current input token number */
1120−static unsigned yymaxdepth = YYMAXDEPTH;
892+int luaY_errflag; /* error recovery flag */
893+int luaY_char; /* current input token number */
894+static unsigned luaY_maxdepth = YYMAXDEPTH;
1121895
1122896
1123897 /*
1124−** yyparse - return 0 if worked, 1 if syntax error not recovered from
898+** luaY_parse - return 0 if worked, 1 if syntax error not recovered from
1125899 */
1126900 int
1127−yyparse()
901+luaY_parse()
1128902 {
1129− register YYSTYPE *yypvt = (YYSTYPE*)0 ; /* top of value stack for
903+ register YYSTYPE *luaY_pvt = (YYSTYPE*)0 ; /* top of value stack for
1130904 $vars */
1131905
1132906 /*
1133− ** Initialize externals - yyparse may be called more than once
907+ ** Initialize externals - luaY_parse may be called more than once
1134908 */
1135− yypv = &yyv[-1];
1136− yyps = &yys[-1];
1137− yystate = 0;
1138− yytmp = 0;
1139− yynerrs = 0;
1140− yyerrflag = 0;
1141− yychar = -1;
909+ luaY_pv = &luaY_v[-1];
910+ luaY_ps = &luaY_s[-1];
911+ luaY_state = 0;
912+ luaY_tmp = 0;
913+ luaY_nerrs = 0;
914+ luaY_errflag = 0;
915+ luaY_char = -1;
1142916
1143917 #if defined(__cplusplus) || defined(__STDC__) || defined(lint)
1144918 /*
@@ -1147,42 +921,42 @@ $vars */ · 2 unmodified lines
1147921 */
1148922 switch (__yaccpar_lint_hack__)
1149923 {
1150− case 1: goto yyerrlab;
1151− case 2: goto yynewstate;
924+ case 1: goto luaY_errlab;
925+ case 2: goto luaY_newstate;
1152926 }
1153927 #endif
1154928
1155929 {
1156− register YYSTYPE *yy_pv; /* top of value stack */
1157− register int *yy_ps; /* top of state stack */
1158− register int yy_state; /* current state */
1159− register int yy_n; /* internal state number info */
930+ register YYSTYPE *luaY__pv; /* top of value stack */
931+ register int *luaY__ps; /* top of state stack */
932+ register int luaY__state; /* current state */
933+ register int luaY__n; /* internal state number info */
1160934
1161− goto yystack;
935+ goto luaY_stack;
1162936
1163937 /*
1164938 ** get globals into registers.
1165939 ** branch to here only if YYBACKUP was called.
1166940 */
1167− yynewstate:
1168− yy_pv = yypv;
1169− yy_ps = yyps;
1170− yy_state = yystate;
1171− goto yy_newstate;
941+ luaY_newstate:
942+ luaY__pv = luaY_pv;
943+ luaY__ps = luaY_ps;
944+ luaY__state = luaY_state;
945+ goto luaY__newstate;
1172946
1173947 /*
1174948 ** get globals into registers.
1175949 ** either we just started, or we just finished a reduction
1176950 */
1177− yystack:
1178− yy_pv = yypv;
1179− yy_ps = yyps;
1180− yy_state = yystate;
951+ luaY_stack:
952+ luaY__pv = luaY_pv;
953+ luaY__ps = luaY_ps;
954+ luaY__state = luaY_state;
1181955
1182956 /*
1183957 ** top of for (;;) loop while no reductions done
1184958 */
1185− yy_stack:
959+ luaY__stack:
1186960 /*
1187961 ** put a state and value onto the stacks
1188962 */
@@ -1193,153 +967,153 @@ $vars */ · 4 unmodified lines
1193967 ** Note: linear search is used since time is not a real
1194968 ** consideration while debugging.
1195969 */
1196− if ( yydebug )
970+ if ( luaY_debug )
1197971 {
1198− register int yy_i;
972+ register int luaY__i;
1199973
1200− (void)printf( "State %d, token ", yy_state );
1201− if ( yychar == 0 )
974+ (void)printf( "State %d, token ", luaY__state );
975+ if ( luaY_char == 0 )
1202976 (void)printf( "end-of-file\n" );
1203− else if ( yychar < 0 )
977+ else if ( luaY_char < 0 )
1204978 (void)printf( "-none-\n" );
1205979 else
1206980 {
1207− for ( yy_i = 0; yytoks[yy_i].t_val >= 0;
1208− yy_i++ )
981+ for ( luaY__i = 0; luaY_toks[luaY__i].t_val >= 0;
982+ luaY__i++ )
1209983 {
1210− if ( yytoks[yy_i].t_val == yychar )
984+ if ( luaY_toks[luaY__i].t_val == luaY_char )
1211985 break;
1212986 }
1213− (void)printf( "%s\n", yytoks[yy_i].t_name );
987+ (void)printf( "%s\n", luaY_toks[luaY__i].t_name );
1214988 }
1215989 }
1216990 #endif /* YYDEBUG */
1217− if ( ++yy_ps >= &yys[ yymaxdepth ] ) /* room on stack? */
991+ if ( ++luaY__ps >= &luaY_s[ luaY_maxdepth ] ) /* room on stack? */
1218992 {
1219993 /*
1220994 ** reallocate and recover. Note that pointers
1221995 ** have to be reset, or bad things will happen
1222996 */
1223− int yyps_index = (yy_ps - yys);
1224− int yypv_index = (yy_pv - yyv);
1225− int yypvt_index = (yypvt - yyv);
1226− int yynewmax;
997+ int luaY_ps_index = (luaY__ps - luaY_s);
998+ int luaY_pv_index = (luaY__pv - luaY_v);
999+ int luaY_pvt_index = (luaY_pvt - luaY_v);
1000+ int luaY_newmax;
12271001
1228− yynewmax = yymaxdepth + YYMAXDEPTH;
1229− if (yymaxdepth == YYMAXDEPTH) /* first time growth */
1002+ luaY_newmax = luaY_maxdepth + YYMAXDEPTH;
1003+ if (luaY_maxdepth == YYMAXDEPTH) /* first time growth */
12301004 {
1231− YYSTYPE *newyyv = (YYSTYPE*)malloc(yynewmax*sizeof(YYSTYPE));
1232− int *newyys = (int*)malloc(yynewmax*sizeof(int));
1233− if (newyys != 0 && newyyv != 0)
1005+ YYSTYPE *newluaY_v = (YYSTYPE*)malloc(luaY_newmax*sizeof(YYSTYPE));
1006+ int *newluaY_s = (int*)malloc(luaY_newmax*sizeof(int));
1007+ if (newluaY_s != 0 && newluaY_v != 0)
12341008 {
1235− yys = YYCOPY(newyys, yys, int);
1236− yyv = YYCOPY(newyyv, yyv, YYSTYPE);
1009+ luaY_s = YYCOPY(newluaY_s, luaY_s, int);
1010+ luaY_v = YYCOPY(newluaY_v, luaY_v, YYSTYPE);
12371011 }
12381012 else
1239− yynewmax = 0; /* failed */
1013+ luaY_newmax = 0; /* failed */
12401014 }
12411015 else /* not first time */
12421016 {
1243− yyv = (YYSTYPE*)realloc((char*)yyv,
1244− yynewmax * sizeof(YYSTYPE));
1245− yys = (int*)realloc((char*)yys,
1246− yynewmax * sizeof(int));
1247− if (yys == 0 || yyv == 0)
1248− yynewmax = 0; /* failed */
1017+ luaY_v = (YYSTYPE*)realloc((char*)luaY_v,
1018+ luaY_newmax * sizeof(YYSTYPE));
1019+ luaY_s = (int*)realloc((char*)luaY_s,
1020+ luaY_newmax * sizeof(int));
1021+ if (luaY_s == 0 || luaY_v == 0)
1022+ luaY_newmax = 0; /* failed */
12491023 }
1250− if (yynewmax <= yymaxdepth) /* tables not expanded */
1024+ if (luaY_newmax <= luaY_maxdepth) /* tables not expanded */
12511025 {
1252− yyerror( "yacc stack overflow" );
1026+ luaY_error( "yacc stack overflow" );
12531027 YYABORT;
12541028 }
1255− yymaxdepth = yynewmax;
1029+ luaY_maxdepth = luaY_newmax;
12561030
1257− yy_ps = yys + yyps_index;
1258− yy_pv = yyv + yypv_index;
1259− yypvt = yyv + yypvt_index;
1031+ luaY__ps = luaY_s + luaY_ps_index;
1032+ luaY__pv = luaY_v + luaY_pv_index;
1033+ luaY_pvt = luaY_v + luaY_pvt_index;
12601034 }
1261− *yy_ps = yy_state;
1262− *++yy_pv = yyval;
1035+ *luaY__ps = luaY__state;
1036+ *++luaY__pv = luaY_val;
12631037
12641038 /*
12651039 ** we have a new state - find out what to do
12661040 */
1267− yy_newstate:
1268− if ( ( yy_n = yypact[ yy_state ] ) <= YYFLAG )
1269− goto yydefault; /* simple state */
1041+ luaY__newstate:
1042+ if ( ( luaY__n = luaY_pact[ luaY__state ] ) <= YYFLAG )
1043+ goto luaY_default; /* simple state */
12701044 #if YYDEBUG
12711045 /*
12721046 ** if debugging, need to mark whether new token grabbed
12731047 */
1274− yytmp = yychar < 0;
1048+ luaY_tmp = luaY_char < 0;
12751049 #endif
1276− if ( ( yychar < 0 ) && ( ( yychar = yylex() ) < 0 ) )
1277− yychar = 0; /* reached EOF */
1050+ if ( ( luaY_char < 0 ) && ( ( luaY_char = luaY_lex() ) < 0 ) )
1051+ luaY_char = 0; /* reached EOF */
12781052 #if YYDEBUG
1279− if ( yydebug && yytmp )
1053+ if ( luaY_debug && luaY_tmp )
12801054 {
1281− register int yy_i;
1055+ register int luaY__i;
12821056
12831057 (void)printf( "Received token " );
1284− if ( yychar == 0 )
1058+ if ( luaY_char == 0 )
12851059 (void)printf( "end-of-file\n" );
1286− else if ( yychar < 0 )
1060+ else if ( luaY_char < 0 )
12871061 (void)printf( "-none-\n" );
12881062 else
12891063 {
1290− for ( yy_i = 0; yytoks[yy_i].t_val >= 0;
1291− yy_i++ )
1064+ for ( luaY__i = 0; luaY_toks[luaY__i].t_val >= 0;
1065+ luaY__i++ )
12921066 {
1293− if ( yytoks[yy_i].t_val == yychar )
1067+ if ( luaY_toks[luaY__i].t_val == luaY_char )
12941068 break;
12951069 }
1296− (void)printf( "%s\n", yytoks[yy_i].t_name );
1070+ (void)printf( "%s\n", luaY_toks[luaY__i].t_name );
12971071 }
12981072 }
12991073 #endif /* YYDEBUG */
1300− if ( ( ( yy_n += yychar ) < 0 ) || ( yy_n >= YYLAST ) )
1301− goto yydefault;
1302− if ( yychk[ yy_n = yyact[ yy_n ] ] == yychar ) /*valid shift*/
1074+ if ( ( ( luaY__n += luaY_char ) < 0 ) || ( luaY__n >= YYLAST ) )
1075+ goto luaY_default;
1076+ if ( luaY_chk[ luaY__n = luaY_act[ luaY__n ] ] == luaY_char ) /*valid shift*/
13031077 {
1304− yychar = -1;
1305− yyval = yylval;
1306− yy_state = yy_n;
1307− if ( yyerrflag > 0 )
1308− yyerrflag--;
1309− goto yy_stack;
1078+ luaY_char = -1;
1079+ luaY_val = luaY_lval;
1080+ luaY__state = luaY__n;
1081+ if ( luaY_errflag > 0 )
1082+ luaY_errflag--;
1083+ goto luaY__stack;
13101084 }
13111085
1312− yydefault:
1313− if ( ( yy_n = yydef[ yy_state ] ) == -2 )
1086+ luaY_default:
1087+ if ( ( luaY__n = luaY_def[ luaY__state ] ) == -2 )
13141088 {
13151089 #if YYDEBUG
1316− yytmp = yychar < 0;
1090+ luaY_tmp = luaY_char < 0;
13171091 #endif
1318− if ( ( yychar < 0 ) && ( ( yychar = yylex() ) < 0 ) )
1319− yychar = 0; /* reached EOF */
1092+ if ( ( luaY_char < 0 ) && ( ( luaY_char = luaY_lex() ) < 0 ) )
1093+ luaY_char = 0; /* reached EOF */
13201094 #if YYDEBUG
1321− if ( yydebug && yytmp )
1095+ if ( luaY_debug && luaY_tmp )
13221096 {
1323− register int yy_i;
1097+ register int luaY__i;
13241098
13251099 (void)printf( "Received token " );
1326− if ( yychar == 0 )
1100+ if ( luaY_char == 0 )
13271101 (void)printf( "end-of-file\n" );
1328− else if ( yychar < 0 )
1102+ else if ( luaY_char < 0 )
13291103 (void)printf( "-none-\n" );
13301104 else
13311105 {
1332− for ( yy_i = 0;
1333− yytoks[yy_i].t_val >= 0;
1334− yy_i++ )
1106+ for ( luaY__i = 0;
1107+ luaY_toks[luaY__i].t_val >= 0;
1108+ luaY__i++ )
13351109 {
1336− if ( yytoks[yy_i].t_val
1337− == yychar )
1110+ if ( luaY_toks[luaY__i].t_val
1111+ == luaY_char )
13381112 {
13391113 break;
13401114 }
13411115 }
1342− (void)printf( "%s\n", yytoks[yy_i].t_name );
1116+ (void)printf( "%s\n", luaY_toks[luaY__i].t_name );
13431117 }
13441118 }
13451119 #endif /* YYDEBUG */
@@ -1347,17 +1121,17 @@ $vars */ · 1 unmodified line
13471121 ** look through exception table
13481122 */
13491123 {
1350− register int *yyxi = yyexca;
1124+ register int *luaY_xi = luaY_exca;
13511125
1352− while ( ( *yyxi != -1 ) ||
1353− ( yyxi[1] != yy_state ) )
1126+ while ( ( *luaY_xi != -1 ) ||
1127+ ( luaY_xi[1] != luaY__state ) )
13541128 {
1355− yyxi += 2;
1129+ luaY_xi += 2;
13561130 }
1357− while ( ( *(yyxi += 2) >= 0 ) &&
1358− ( *yyxi != yychar ) )
1131+ while ( ( *(luaY_xi += 2) >= 0 ) &&
1132+ ( *luaY_xi != luaY_char ) )
13591133 ;
1360− if ( ( yy_n = yyxi[1] ) < 0 )
1134+ if ( ( luaY__n = luaY_xi[1] ) < 0 )
13611135 YYACCEPT;
13621136 }
13631137 }
@@ -1365,42 +1139,42 @@ $vars */ · 1 unmodified line
13651139 /*
13661140 ** check for syntax error
13671141 */
1368− if ( yy_n == 0 ) /* have an error */
1142+ if ( luaY__n == 0 ) /* have an error */
13691143 {
13701144 /* no worry about speed here! */
1371− switch ( yyerrflag )
1145+ switch ( luaY_errflag )
13721146 {
13731147 case 0: /* new error */
1374− yyerror( "syntax error" );
1148+ luaY_error( "syntax error" );
13751149 goto skip_init;
1376− yyerrlab:
1150+ luaY_errlab:
13771151 /*
13781152 ** get globals into registers.
13791153 ** we have a user generated syntax type error
13801154 */
1381− yy_pv = yypv;
1382− yy_ps = yyps;
1383− yy_state = yystate;
1384− yynerrs++;
1155+ luaY__pv = luaY_pv;
1156+ luaY__ps = luaY_ps;
1157+ luaY__state = luaY_state;
1158+ luaY_nerrs++;
13851159 skip_init:
13861160 case 1:
13871161 case 2: /* incompletely recovered error */
13881162 /* try again... */
1389− yyerrflag = 3;
1163+ luaY_errflag = 3;
13901164 /*
13911165 ** find state where "error" is a legal
13921166 ** shift action
13931167 */
1394− while ( yy_ps >= yys )
1168+ while ( luaY__ps >= luaY_s )
13951169 {
1396− yy_n = yypact[ *yy_ps ] + YYERRCODE;
1397− if ( yy_n >= 0 && yy_n < YYLAST &&
1398− yychk[yyact[yy_n]] == YYERRCODE) {
1170+ luaY__n = luaY_pact[ *luaY__ps ] + YYERRCODE;
1171+ if ( luaY__n >= 0 && luaY__n < YYLAST &&
1172+ luaY_chk[luaY_act[luaY__n]] == YYERRCODE) {
13991173 /*
14001174 ** simulate shift of "error"
14011175 */
1402− yy_state = yyact[ yy_n ];
1403− goto yy_stack;
1176+ luaY__state = luaY_act[ luaY__n ];
1177+ goto luaY__stack;
14041178 }
14051179 /*
14061180 ** current state has no shift on
@@ -1408,13 +1182,13 @@ $vars */ · 1 unmodified line
14081182 */
14091183 #if YYDEBUG
14101184 # define _POP_ "Error recovery pops state %d, uncovers state %d\n"
1411− if ( yydebug )
1412− (void)printf( _POP_, *yy_ps,
1413− yy_ps[-1] );
1185+ if ( luaY_debug )
1186+ (void)printf( _POP_, *luaY__ps,
1187+ luaY__ps[-1] );
14141188 # undef _POP_
14151189 #endif
1416− yy_ps--;
1417− yy_pv--;
1190+ luaY__ps--;
1191+ luaY__pv--;
14181192 }
14191193 /*
14201194 ** there is no state on stack with "error" as
@@ -1430,40 +1204,40 @@ $vars */ · 9 unmodified lines
14301204 ** debugging, it doesn't hurt to leave the
14311205 ** tests here.
14321206 */
1433− if ( yydebug )
1207+ if ( luaY_debug )
14341208 {
1435− register int yy_i;
1209+ register int luaY__i;
14361210
14371211 (void)printf( "Error recovery discards " );
1438− if ( yychar == 0 )
1212+ if ( luaY_char == 0 )
14391213 (void)printf( "token end-of-file\n" );
1440− else if ( yychar < 0 )
1214+ else if ( luaY_char < 0 )
14411215 (void)printf( "token -none-\n" );
14421216 else
14431217 {
1444− for ( yy_i = 0;
1445− yytoks[yy_i].t_val >= 0;
1446− yy_i++ )
1218+ for ( luaY__i = 0;
1219+ luaY_toks[luaY__i].t_val >= 0;
1220+ luaY__i++ )
14471221 {
1448− if ( yytoks[yy_i].t_val
1449− == yychar )
1222+ if ( luaY_toks[luaY__i].t_val
1223+ == luaY_char )
14501224 {
14511225 break;
14521226 }
14531227 }
14541228 (void)printf( "token %s\n",
1455− yytoks[yy_i].t_name );
1229+ luaY_toks[luaY__i].t_name );
14561230 }
14571231 }
14581232 #endif /* YYDEBUG */
1459− if ( yychar == 0 ) /* reached EOF. quit */
1233+ if ( luaY_char == 0 ) /* reached EOF. quit */
14601234 YYABORT;
1461− yychar = -1;
1462− goto yy_newstate;
1235+ luaY_char = -1;
1236+ goto luaY__newstate;
14631237 }
1464− }/* end if ( yy_n == 0 ) */
1238+ }/* end if ( luaY__n == 0 ) */
14651239 /*
1466− ** reduction by production yy_n
1240+ ** reduction by production luaY__n
14671241 ** put stack tops, etc. so things right after switch
14681242 */
14691243 #if YYDEBUG
@@ -1472,92 +1246,95 @@ $vars */ · 2 unmodified lines
14721246 ** specification of the reduction which is just about
14731247 ** to be done.
14741248 */
1475− if ( yydebug )
1249+ if ( luaY_debug )
14761250 (void)printf( "Reduce by (%d) \"%s\"\n",
1477− yy_n, yyreds[ yy_n ] );
1251+ luaY__n, luaY_reds[ luaY__n ] );
14781252 #endif
1479− yytmp = yy_n; /* value to switch over */
1480− yypvt = yy_pv; /* $vars top of value stack */
1253+ luaY_tmp = luaY__n; /* value to switch over */
1254+ luaY_pvt = luaY__pv; /* $vars top of value stack */
14811255 /*
14821256 ** Look in goto table for next state
1483− ** Sorry about using yy_state here as temporary
1257+ ** Sorry about using luaY__state here as temporary
14841258 ** register variable, but why not, if it works...
1485− ** If yyr2[ yy_n ] doesn't have the low order bit
1259+ ** If luaY_r2[ luaY__n ] doesn't have the low order bit
14861260 ** set, then there is no action to be done for
14871261 ** this reduction. So, no saving & unsaving of
14881262 ** registers done. The only difference between the
14891263 ** code just after the if and the body of the if is
1490− ** the goto yy_stack in the body. This way the test
1264+ ** the goto luaY__stack in the body. This way the test
14911265 ** can be made before the choice of what to do is needed.
14921266 */
14931267 {
14941268 /* length of production doubled with extra bit */
1495− register int yy_len = yyr2[ yy_n ];
1269+ register int luaY__len = luaY_r2[ luaY__n ];
14961270
1497− if ( !( yy_len & 01 ) )
1271+ if ( !( luaY__len & 01 ) )
14981272 {
1499− yy_len >>= 1;
1500− yyval = ( yy_pv -= yy_len )[1]; /* $$ = $1 */
1501− yy_state = yypgo[ yy_n = yyr1[ yy_n ] ] +
1502− *( yy_ps -= yy_len ) + 1;
1503− if ( yy_state >= YYLAST ||
1504− yychk[ yy_state =
1505− yyact[ yy_state ] ] != -yy_n )
1273+ luaY__len >>= 1;
1274+ luaY_val = ( luaY__pv -= luaY__len )[1]; /* $$ = $1 */
1275+ luaY__state = luaY_pgo[ luaY__n = luaY_r1[ luaY__n ] ] +
1276+ *( luaY__ps -= luaY__len ) + 1;
1277+ if ( luaY__state >= YYLAST ||
1278+ luaY_chk[ luaY__state =
1279+ luaY_act[ luaY__state ] ] != -luaY__n )
15061280 {
1507− yy_state = yyact[ yypgo[ yy_n ] ];
1281+ luaY__state = luaY_act[ luaY_pgo[ luaY__n ] ];
15081282 }
1509− goto yy_stack;
1283+ goto luaY__stack;
15101284 }
1511− yy_len >>= 1;
1512− yyval = ( yy_pv -= yy_len )[1]; /* $$ = $1 */
1513− yy_state = yypgo[ yy_n = yyr1[ yy_n ] ] +
1514− *( yy_ps -= yy_len ) + 1;
1515− if ( yy_state >= YYLAST ||
1516− yychk[ yy_state = yyact[ yy_state ] ] != -yy_n )
1285+ luaY__len >>= 1;
1286+ luaY_val = ( luaY__pv -= luaY__len )[1]; /* $$ = $1 */
1287+ luaY__state = luaY_pgo[ luaY__n = luaY_r1[ luaY__n ] ] +
1288+ *( luaY__ps -= luaY__len ) + 1;
1289+ if ( luaY__state >= YYLAST ||
1290+ luaY_chk[ luaY__state = luaY_act[ luaY__state ] ] != -luaY__n )
15171291 {
1518− yy_state = yyact[ yypgo[ yy_n ] ];
1292+ luaY__state = luaY_act[ luaY_pgo[ luaY__n ] ];
15191293 }
15201294 }
15211295 /* save until reenter driver code */
1522− yystate = yy_state;
1523− yyps = yy_ps;
1524− yypv = yy_pv;
1296+ luaY_state = luaY__state;
1297+ luaY_ps = luaY__ps;
1298+ luaY_pv = luaY__pv;
15251299 }
15261300 /*
15271301 ** code supplied by user is placed in this switch
15281302 */
1529− switch( yytmp )
1303+ switch( luaY_tmp )
15301304 {
15311305
15321306 case 6:
1533−# line 470 "lua.stx"
1307+# line 469 "lua.stx"
15341308 {
15351309 code_byte(PUSHFUNCTION);
1536− code_code(yypvt[-0].pFunc);
1537− storesinglevar(yypvt[-1].vLong);
1310+ code_code(luaY_pvt[-0].pFunc);
1311+ storesinglevar(luaY_pvt[-1].vLong);
15381312 } break;
15391313 case 7:
1540−# line 477 "lua.stx"
1541−{ yyval.vLong =yypvt[-0].vLong; init_func(); } break;
1314+# line 476 "lua.stx"
1315+{ luaY_val.vLong =luaY_pvt[-0].vLong; init_func(); } break;
15421316 case 8:
1543−# line 479 "lua.stx"
1317+# line 478 "lua.stx"
15441318 {
15451319 code_byte(PUSHSTRING);
1546− code_word(luaI_findconstant(yypvt[-0].pNode));
1547− yyval.vLong = 0; /* indexed variable */
1320+ code_word(luaI_findconstant(luaY_pvt[-0].pTStr));
1321+ luaY_val.vLong = 0; /* indexed variable */
15481322 init_func();
1549− add_localvar(luaI_findsymbolbyname("self"));
1323+ add_localvar(luaI_createfixedstring("self"));
15501324 } break;
15511325 case 9:
1552−# line 489 "lua.stx"
1326+# line 488 "lua.stx"
15531327 {
15541328 codereturn();
1555− yyval.pFunc = new(TFunc);
1556− yyval.pFunc->size = pc;
1557− yyval.pFunc->code = newvector(pc, Byte);
1558− yyval.pFunc->fileName = lua_parsedfile;
1559− yyval.pFunc->lineDefined = yypvt[-3].vInt;
1560− memcpy(yyval.pFunc->code, basepc, pc*sizeof(Byte));
1329+ luaY_val.pFunc = new(TFunc);
1330+ luaI_initTFunc(luaY_val.pFunc);
1331+ luaY_val.pFunc->size = pc;
1332+ luaY_val.pFunc->code = newvector(pc, Byte);
1333+ luaY_val.pFunc->fileName = lua_parsedfile;
1334+ luaY_val.pFunc->lineDefined = luaY_pvt[-3].vInt;
1335+ memcpy(luaY_val.pFunc->code, basepc, pc*sizeof(Byte));
1336+ if (lua_debug)
1337+ luaI_closelocalvars(luaY_val.pFunc);
15611338 /* save func values */
15621339 funcCode = basepc; maxcode=maxcurr;
15631340 #if LISTING
@@ -1566,346 +1343,345 @@ case 9: · 2 unmodified lines
15661343 change2main(); /* change back to main code */
15671344 } break;
15681345 case 14:
1569−# line 513 "lua.stx"
1570−{ codeIf(yypvt[-4].vLong, yypvt[-2].vLong); } break;
1571−case 15:
15721346 # line 515 "lua.stx"
1573−{yyval.vLong=pc;} break;
1347+{ codeIf(luaY_pvt[-4].vLong, luaY_pvt[-2].vLong); } break;
1348+case 15:
1349+# line 517 "lua.stx"
1350+{luaY_val.vLong=pc;} break;
15741351 case 16:
1575−# line 516 "lua.stx"
1352+# line 518 "lua.stx"
15761353 {
1577− basepc[yypvt[-3].vLong] = IFFJMP;
1578− code_word_at(basepc+yypvt[-3].vLong+1, pc - (yypvt[-3].vLong + sizeof(Word)+1));
1579− basepc[yypvt[-1].vLong] = UPJMP;
1580− code_word_at(basepc+yypvt[-1].vLong+1, pc - (yypvt[-6].vLong));
1354+ basepc[luaY_pvt[-3].vLong] = IFFJMP;
1355+ code_word_at(basepc+luaY_pvt[-3].vLong+1, pc - (luaY_pvt[-3].vLong + sizeof(Word)+1));
1356+ basepc[luaY_pvt[-1].vLong] = UPJMP;
1357+ code_word_at(basepc+luaY_pvt[-1].vLong+1, pc - (luaY_pvt[-6].vLong));
15811358 } break;
15821359 case 17:
1583−# line 523 "lua.stx"
1584−{yyval.vLong=pc;} break;
1360+# line 525 "lua.stx"
1361+{luaY_val.vLong=pc;} break;
15851362 case 18:
1586−# line 524 "lua.stx"
1363+# line 526 "lua.stx"
15871364 {
1588− basepc[yypvt[-0].vLong] = IFFUPJMP;
1589− code_word_at(basepc+yypvt[-0].vLong+1, pc - (yypvt[-4].vLong));
1365+ basepc[luaY_pvt[-0].vLong] = IFFUPJMP;
1366+ code_word_at(basepc+luaY_pvt[-0].vLong+1, pc - (luaY_pvt[-4].vLong));
15901367 } break;
15911368 case 19:
1592−# line 530 "lua.stx"
1369+# line 532 "lua.stx"
15931370 {
15941371 {
15951372 int i;
1596− adjust_mult_assign(nvarbuffer, yypvt[-0].vLong, yypvt[-2].vInt * 2 + nvarbuffer);
1373+ adjust_mult_assign(nvarbuffer, luaY_pvt[-0].vLong, luaY_pvt[-2].vInt * 2 + nvarbuffer);
15971374 for (i=nvarbuffer-1; i>=0; i--)
15981375 lua_codestore (i);
1599− if (yypvt[-2].vInt > 1 || (yypvt[-2].vInt == 1 && varbuffer[0] != 0))
1376+ if (luaY_pvt[-2].vInt > 1 || (luaY_pvt[-2].vInt == 1 && varbuffer[0] != 0))
16001377 lua_codeadjust (0);
16011378 }
16021379 } break;
16031380 case 21:
1604−# line 542 "lua.stx"
1605−{ nlocalvar += yypvt[-1].vInt;
1606− adjust_mult_assign(yypvt[-1].vInt, yypvt[-0].vInt, 0);
1381+# line 544 "lua.stx"
1382+{ nlocalvar += luaY_pvt[-1].vInt;
1383+ adjust_mult_assign(luaY_pvt[-1].vInt, luaY_pvt[-0].vInt, 0);
16071384 } break;
16081385 case 24:
1609−# line 550 "lua.stx"
1610−{ codeIf(yypvt[-3].vLong, yypvt[-1].vLong); } break;
1386+# line 552 "lua.stx"
1387+{ codeIf(luaY_pvt[-3].vLong, luaY_pvt[-1].vLong); } break;
16111388 case 25:
1612−# line 553 "lua.stx"
1613−{yyval.vInt = nlocalvar;} break;
1389+# line 555 "lua.stx"
1390+{luaY_val.vInt = nlocalvar;} break;
16141391 case 26:
1615−# line 554 "lua.stx"
1392+# line 556 "lua.stx"
16161393 {
1617− if (nlocalvar != yypvt[-2].vInt)
1394+ if (nlocalvar != luaY_pvt[-2].vInt)
16181395 {
1619− nlocalvar = yypvt[-2].vInt;
1396+ if (lua_debug)
1397+ for (; nlocalvar > luaY_pvt[-2].vInt; nlocalvar--)
1398+ luaI_unregisterlocalvar(lua_linenumber);
1399+ else
1400+ nlocalvar = luaY_pvt[-2].vInt;
16201401 lua_codeadjust (0);
16211402 }
16221403 } break;
16231404 case 28:
1624−# line 565 "lua.stx"
1405+# line 571 "lua.stx"
16251406 {
1626− adjust_functioncall(yypvt[-1].vLong, MULT_RET);
1407+ adjust_functioncall(luaY_pvt[-1].vLong, MULT_RET);
16271408 codereturn();
16281409 } break;
16291410 case 29:
1630−# line 572 "lua.stx"
1411+# line 578 "lua.stx"
16311412 {
1632− yyval.vLong = pc;
1413+ luaY_val.vLong = pc;
16331414 code_byte(0); /* open space */
16341415 code_word (0);
16351416 } break;
16361417 case 30:
1637−# line 578 "lua.stx"
1638−{ adjust_functioncall(yypvt[-0].vLong, 1); } break;
1418+# line 584 "lua.stx"
1419+{ adjust_functioncall(luaY_pvt[-0].vLong, 1); } break;
16391420 case 31:
1640−# line 581 "lua.stx"
1641−{ yyval.vLong = yypvt[-1].vLong; } break;
1421+# line 587 "lua.stx"
1422+{ luaY_val.vLong = luaY_pvt[-1].vLong; } break;
16421423 case 32:
1643−# line 582 "lua.stx"
1644−{ code_byte(EQOP); yyval.vLong = 0; } break;
1424+# line 588 "lua.stx"
1425+{ code_byte(EQOP); luaY_val.vLong = 0; } break;
16451426 case 33:
1646−# line 583 "lua.stx"
1647−{ code_byte(LTOP); yyval.vLong = 0; } break;
1427+# line 589 "lua.stx"
1428+{ code_byte(LTOP); luaY_val.vLong = 0; } break;
16481429 case 34:
1649−# line 584 "lua.stx"
1650−{ code_byte(GTOP); yyval.vLong = 0; } break;
1430+# line 590 "lua.stx"
1431+{ code_byte(GTOP); luaY_val.vLong = 0; } break;
16511432 case 35:
1652−# line 585 "lua.stx"
1653−{ code_byte(EQOP); code_byte(NOTOP); yyval.vLong = 0; } break;
1433+# line 591 "lua.stx"
1434+{ code_byte(EQOP); code_byte(NOTOP); luaY_val.vLong = 0; } break;
16541435 case 36:
1655−# line 586 "lua.stx"
1656−{ code_byte(LEOP); yyval.vLong = 0; } break;
1436+# line 592 "lua.stx"
1437+{ code_byte(LEOP); luaY_val.vLong = 0; } break;
16571438 case 37:
1658−# line 587 "lua.stx"
1659−{ code_byte(GEOP); yyval.vLong = 0; } break;
1439+# line 593 "lua.stx"
1440+{ code_byte(GEOP); luaY_val.vLong = 0; } break;
16601441 case 38:
1661−# line 588 "lua.stx"
1662−{ code_byte(ADDOP); yyval.vLong = 0; } break;
1442+# line 594 "lua.stx"
1443+{ code_byte(ADDOP); luaY_val.vLong = 0; } break;
16631444 case 39:
1664−# line 589 "lua.stx"
1665−{ code_byte(SUBOP); yyval.vLong = 0; } break;
1445+# line 595 "lua.stx"
1446+{ code_byte(SUBOP); luaY_val.vLong = 0; } break;
16661447 case 40:
1667−# line 590 "lua.stx"
1668−{ code_byte(MULTOP); yyval.vLong = 0; } break;
1448+# line 596 "lua.stx"
1449+{ code_byte(MULTOP); luaY_val.vLong = 0; } break;
16691450 case 41:
1670−# line 591 "lua.stx"
1671−{ code_byte(DIVOP); yyval.vLong = 0; } break;
1451+# line 597 "lua.stx"
1452+{ code_byte(DIVOP); luaY_val.vLong = 0; } break;
16721453 case 42:
1673−# line 592 "lua.stx"
1674−{ code_byte(POWOP); yyval.vLong = 0; } break;
1454+# line 598 "lua.stx"
1455+{ code_byte(POWOP); luaY_val.vLong = 0; } break;
16751456 case 43:
1676−# line 593 "lua.stx"
1677−{ code_byte(CONCOP); yyval.vLong = 0; } break;
1457+# line 599 "lua.stx"
1458+{ code_byte(CONCOP); luaY_val.vLong = 0; } break;
16781459 case 44:
1679−# line 594 "lua.stx"
1680−{ code_byte(MINUSOP); yyval.vLong = 0;} break;
1460+# line 600 "lua.stx"
1461+{ code_byte(MINUSOP); luaY_val.vLong = 0;} break;
16811462 case 45:
1682−# line 595 "lua.stx"
1683−{ yyval.vLong = 0; } break;
1463+# line 601 "lua.stx"
1464+{ luaY_val.vLong = 0; } break;
16841465 case 46:
1685−# line 596 "lua.stx"
1686−{ yyval.vLong = 0;} break;
1466+# line 602 "lua.stx"
1467+{ luaY_val.vLong = 0;} break;
16871468 case 47:
1688−# line 597 "lua.stx"
1689−{ code_number(yypvt[-0].vFloat); yyval.vLong = 0; } break;
1469+# line 603 "lua.stx"
1470+{ code_number(luaY_pvt[-0].vFloat); luaY_val.vLong = 0; } break;
16901471 case 48:
1691−# line 599 "lua.stx"
1472+# line 605 "lua.stx"
16921473 {
16931474 code_byte(PUSHSTRING);
1694− code_word(yypvt[-0].vWord);
1695− yyval.vLong = 0;
1475+ code_word(luaY_pvt[-0].vWord);
1476+ luaY_val.vLong = 0;
16961477 } break;
16971478 case 49:
1698−# line 604 "lua.stx"
1699−{code_byte(PUSHNIL); yyval.vLong = 0; } break;
1479+# line 610 "lua.stx"
1480+{code_byte(PUSHNIL); luaY_val.vLong = 0; } break;
17001481 case 50:
1701−# line 605 "lua.stx"
1702−{ yyval.vLong = yypvt[-0].vLong; } break;
1482+# line 611 "lua.stx"
1483+{ luaY_val.vLong = luaY_pvt[-0].vLong; } break;
17031484 case 51:
1704−# line 606 "lua.stx"
1705−{ code_byte(NOTOP); yyval.vLong = 0;} break;
1485+# line 612 "lua.stx"
1486+{ code_byte(NOTOP); luaY_val.vLong = 0;} break;
17061487 case 52:
1707−# line 607 "lua.stx"
1488+# line 613 "lua.stx"
17081489 {code_byte(POP); } break;
17091490 case 53:
1710−# line 608 "lua.stx"
1491+# line 614 "lua.stx"
17111492 {
1712− basepc[yypvt[-2].vLong] = ONFJMP;
1713− code_word_at(basepc+yypvt[-2].vLong+1, pc - (yypvt[-2].vLong + sizeof(Word)+1));
1714− yyval.vLong = 0;
1493+ basepc[luaY_pvt[-2].vLong] = ONFJMP;
1494+ code_word_at(basepc+luaY_pvt[-2].vLong+1, pc - (luaY_pvt[-2].vLong + sizeof(Word)+1));
1495+ luaY_val.vLong = 0;
17151496 } break;
17161497 case 54:
1717−# line 613 "lua.stx"
1498+# line 619 "lua.stx"
17181499 {code_byte(POP); } break;
17191500 case 55:
1720−# line 614 "lua.stx"
1501+# line 620 "lua.stx"
17211502 {
1722− basepc[yypvt[-2].vLong] = ONTJMP;
1723− code_word_at(basepc+yypvt[-2].vLong+1, pc - (yypvt[-2].vLong + sizeof(Word)+1));
1724− yyval.vLong = 0;
1503+ basepc[luaY_pvt[-2].vLong] = ONTJMP;
1504+ code_word_at(basepc+luaY_pvt[-2].vLong+1, pc - (luaY_pvt[-2].vLong + sizeof(Word)+1));
1505+ luaY_val.vLong = 0;
17251506 } break;
17261507 case 56:
1727−# line 622 "lua.stx"
1508+# line 628 "lua.stx"
17281509 {
17291510 code_byte(CREATEARRAY);
1730− yyval.vLong = pc; code_word(0);
1511+ luaY_val.vLong = pc; code_word(0);
17311512 } break;
17321513 case 57:
1733−# line 627 "lua.stx"
1514+# line 633 "lua.stx"
17341515 {
1735− code_word_at(basepc+yypvt[-3].vLong, yypvt[-1].vInt);
1516+ code_word_at(basepc+luaY_pvt[-3].vLong, luaY_pvt[-1].vInt);
17361517 } break;
17371518 case 58:
1738−# line 633 "lua.stx"
1519+# line 639 "lua.stx"
17391520 {
17401521 code_byte(CALLFUNC);
1741− code_byte(yypvt[-1].vInt+yypvt[-0].vInt);
1742− yyval.vLong = pc;
1522+ code_byte(luaY_pvt[-1].vInt+luaY_pvt[-0].vInt);
1523+ luaY_val.vLong = pc;
17431524 code_byte(0); /* may be modified by other rules */
17441525 } break;
17451526 case 59:
1746−# line 641 "lua.stx"
1747−{ yyval.vInt = 0; } break;
1527+# line 647 "lua.stx"
1528+{ luaY_val.vInt = 0; } break;
17481529 case 60:
1749−# line 643 "lua.stx"
1530+# line 649 "lua.stx"
17501531 {
17511532 code_byte(PUSHSELF);
1752− code_word(luaI_findconstant(yypvt[-0].pNode));
1753− yyval.vInt = 1;
1533+ code_word(luaI_findconstant(luaY_pvt[-0].pTStr));
1534+ luaY_val.vInt = 1;
17541535 } break;
17551536 case 61:
1756−# line 651 "lua.stx"
1757−{ yyval.vInt = adjust_functioncall(yypvt[-1].vLong, 1); } break;
1537+# line 657 "lua.stx"
1538+{ luaY_val.vInt = adjust_functioncall(luaY_pvt[-1].vLong, 1); } break;
17581539 case 62:
1759−# line 652 "lua.stx"
1760−{ yyval.vInt = 1; } break;
1540+# line 658 "lua.stx"
1541+{ luaY_val.vInt = 1; } break;
17611542 case 63:
1762−# line 655 "lua.stx"
1763−{ yyval.vLong = 0; } break;
1543+# line 661 "lua.stx"
1544+{ luaY_val.vLong = 0; } break;
17641545 case 64:
1765−# line 656 "lua.stx"
1766−{ yyval.vLong = yypvt[-0].vLong; } break;
1546+# line 662 "lua.stx"
1547+{ luaY_val.vLong = luaY_pvt[-0].vLong; } break;
17671548 case 65:
1768−# line 659 "lua.stx"
1769−{ if (yypvt[-0].vLong != 0) yyval.vLong = yypvt[-0].vLong; else yyval.vLong = -1; } break;
1549+# line 665 "lua.stx"
1550+{ if (luaY_pvt[-0].vLong != 0) luaY_val.vLong = luaY_pvt[-0].vLong; else luaY_val.vLong = -1; } break;
17701551 case 66:
1771−# line 660 "lua.stx"
1772−{ yyval.vLong = adjust_functioncall(yypvt[-1].vLong, 1); } break;
1552+# line 666 "lua.stx"
1553+{ luaY_val.vLong = adjust_functioncall(luaY_pvt[-1].vLong, 1); } break;
17731554 case 67:
1774−# line 661 "lua.stx"
1555+# line 667 "lua.stx"
17751556 {
1776− if (yypvt[-0].vLong == 0) yyval.vLong = -(yypvt[-1].vLong + 1); /* -length */
1557+ if (luaY_pvt[-0].vLong == 0) luaY_val.vLong = -(luaY_pvt[-1].vLong + 1); /* -length */
17771558 else
17781559 {
1779− adjust_functioncall(yypvt[-0].vLong, yypvt[-1].vLong);
1780− yyval.vLong = yypvt[-0].vLong;
1560+ adjust_functioncall(luaY_pvt[-0].vLong, luaY_pvt[-1].vLong);
1561+ luaY_val.vLong = luaY_pvt[-0].vLong;
17811562 }
17821563 } break;
17831564 case 68:
1784−# line 671 "lua.stx"
1785−{ lua_codeadjust(0); yyval.vInt = lua_linenumber; } break;
1565+# line 677 "lua.stx"
1566+{ lua_codeadjust(0); luaY_val.vInt = lua_linenumber; } break;
17861567 case 69:
1787−# line 672 "lua.stx"
1788−{ lua_codeadjust(0); yyval.vInt = lua_linenumber; } break;
1568+# line 678 "lua.stx"
1569+{ lua_codeadjust(0); luaY_val.vInt = lua_linenumber; } break;
17891570 case 70:
1790−# line 676 "lua.stx"
1791−{
1792− add_localvar(luaI_findsymbol(yypvt[-0].pNode));
1793− } break;
1571+# line 681 "lua.stx"
1572+{ add_localvar(luaY_pvt[-0].pTStr); } break;
17941573 case 71:
1795−# line 680 "lua.stx"
1796−{
1797− add_localvar(luaI_findsymbol(yypvt[-0].pNode));
1798− } break;
1574+# line 682 "lua.stx"
1575+{ add_localvar(luaY_pvt[-0].pTStr); } break;
17991576 case 72:
18001577 # line 686 "lua.stx"
1801−{ flush_list(yypvt[-0].vInt/FIELDS_PER_FLUSH, yypvt[-0].vInt%FIELDS_PER_FLUSH); } break;
1578+{ flush_list(luaY_pvt[-0].vInt/FIELDS_PER_FLUSH, luaY_pvt[-0].vInt%FIELDS_PER_FLUSH); } break;
18021579 case 73:
18031580 # line 688 "lua.stx"
1804−{ yyval.vInt = yypvt[-2].vInt+yypvt[-0].vInt; } break;
1581+{ luaY_val.vInt = luaY_pvt[-2].vInt+luaY_pvt[-0].vInt; } break;
18051582 case 74:
18061583 # line 690 "lua.stx"
1807−{ yyval.vInt = yypvt[-1].vInt; flush_record(yypvt[-1].vInt%FIELDS_PER_FLUSH); } break;
1584+{ luaY_val.vInt = luaY_pvt[-1].vInt; flush_record(luaY_pvt[-1].vInt%FIELDS_PER_FLUSH); } break;
18081585 case 75:
18091586 # line 694 "lua.stx"
1810−{ yyval.vInt = 0; } break;
1587+{ luaY_val.vInt = 0; } break;
18111588 case 76:
18121589 # line 696 "lua.stx"
1813−{ yyval.vInt = yypvt[-0].vInt; flush_record(yypvt[-0].vInt%FIELDS_PER_FLUSH); } break;
1590+{ luaY_val.vInt = luaY_pvt[-0].vInt; flush_record(luaY_pvt[-0].vInt%FIELDS_PER_FLUSH); } break;
18141591 case 79:
18151592 # line 703 "lua.stx"
1816−{ yyval.vInt = 0; } break;
1593+{ luaY_val.vInt = 0; } break;
18171594 case 80:
18181595 # line 704 "lua.stx"
1819−{ yyval.vInt = yypvt[-1].vInt; } break;
1596+{ luaY_val.vInt = luaY_pvt[-1].vInt; } break;
18201597 case 81:
18211598 # line 707 "lua.stx"
1822−{yyval.vInt=1;} break;
1599+{luaY_val.vInt=1;} break;
18231600 case 82:
18241601 # line 709 "lua.stx"
18251602 {
1826− yyval.vInt=yypvt[-2].vInt+1;
1827− if (yyval.vInt%FIELDS_PER_FLUSH == 0) flush_record(FIELDS_PER_FLUSH);
1603+ luaY_val.vInt=luaY_pvt[-2].vInt+1;
1604+ if (luaY_val.vInt%FIELDS_PER_FLUSH == 0) flush_record(FIELDS_PER_FLUSH);
18281605 } break;
18291606 case 83:
18301607 # line 716 "lua.stx"
18311608 {
1832− push_field(luaI_findconstant(yypvt[-2].pNode));
1609+ push_field(luaI_findconstant(luaY_pvt[-2].pTStr));
18331610 } break;
18341611 case 84:
18351612 # line 721 "lua.stx"
1836−{ yyval.vInt = 0; } break;
1613+{ luaY_val.vInt = 0; } break;
18371614 case 85:
18381615 # line 722 "lua.stx"
1839−{ yyval.vInt = yypvt[-1].vInt; } break;
1616+{ luaY_val.vInt = luaY_pvt[-1].vInt; } break;
18401617 case 86:
18411618 # line 725 "lua.stx"
1842−{yyval.vInt=1;} break;
1619+{luaY_val.vInt=1;} break;
18431620 case 87:
18441621 # line 727 "lua.stx"
18451622 {
1846− yyval.vInt=yypvt[-2].vInt+1;
1847− if (yyval.vInt%FIELDS_PER_FLUSH == 0)
1848− flush_list(yyval.vInt/FIELDS_PER_FLUSH - 1, FIELDS_PER_FLUSH);
1623+ luaY_val.vInt=luaY_pvt[-2].vInt+1;
1624+ if (luaY_val.vInt%FIELDS_PER_FLUSH == 0)
1625+ flush_list(luaY_val.vInt/FIELDS_PER_FLUSH - 1, FIELDS_PER_FLUSH);
18491626 } break;
18501627 case 88:
18511628 # line 735 "lua.stx"
18521629 {
18531630 nvarbuffer = 0;
1854− add_varbuffer(yypvt[-0].vLong);
1855− yyval.vInt = (yypvt[-0].vLong == 0) ? 1 : 0;
1631+ add_varbuffer(luaY_pvt[-0].vLong);
1632+ luaY_val.vInt = (luaY_pvt[-0].vLong == 0) ? 1 : 0;
18561633 } break;
18571634 case 89:
18581635 # line 741 "lua.stx"
18591636 {
1860− add_varbuffer(yypvt[-0].vLong);
1861− yyval.vInt = (yypvt[-0].vLong == 0) ? yypvt[-2].vInt + 1 : yypvt[-2].vInt;
1637+ add_varbuffer(luaY_pvt[-0].vLong);
1638+ luaY_val.vInt = (luaY_pvt[-0].vLong == 0) ? luaY_pvt[-2].vInt + 1 : luaY_pvt[-2].vInt;
18621639 } break;
18631640 case 90:
18641641 # line 747 "lua.stx"
1865−{ yyval.vLong = yypvt[-0].vLong; } break;
1642+{ luaY_val.vLong = luaY_pvt[-0].vLong; } break;
18661643 case 91:
18671644 # line 749 "lua.stx"
18681645 {
1869− yyval.vLong = 0; /* indexed variable */
1646+ luaY_val.vLong = 0; /* indexed variable */
18701647 } break;
18711648 case 92:
18721649 # line 753 "lua.stx"
18731650 {
18741651 code_byte(PUSHSTRING);
1875− code_word(luaI_findconstant(yypvt[-0].pNode));
1876− yyval.vLong = 0; /* indexed variable */
1652+ code_word(luaI_findconstant(luaY_pvt[-0].pTStr));
1653+ luaY_val.vLong = 0; /* indexed variable */
18771654 } break;
18781655 case 93:
18791656 # line 761 "lua.stx"
18801657 {
1881− Word s = luaI_findsymbol(yypvt[-0].pNode);
1882− int local = lua_localname (s);
1658+ int local = lua_localname(luaY_pvt[-0].pTStr);
18831659 if (local == -1) /* global var */
1884− yyval.vLong = s + 1; /* return positive value */
1660+ luaY_val.vLong = luaI_findsymbol(luaY_pvt[-0].pTStr)+1; /* return positive value */
18851661 else
1886− yyval.vLong = -(local+1); /* return negative value */
1662+ luaY_val.vLong = -(local+1); /* return negative value */
18871663 } break;
18881664 case 94:
1889−# line 771 "lua.stx"
1890−{ lua_pushvar(yypvt[-0].vLong); } break;
1665+# line 770 "lua.stx"
1666+{ lua_pushvar(luaY_pvt[-0].vLong); } break;
18911667 case 95:
1892−# line 774 "lua.stx"
1893−{store_localvar(luaI_findsymbol(yypvt[-0].pNode), 0); yyval.vInt = 1;} break;
1668+# line 773 "lua.stx"
1669+{store_localvar(luaY_pvt[-0].pTStr, 0); luaY_val.vInt = 1;} break;
18941670 case 96:
1895−# line 776 "lua.stx"
1671+# line 775 "lua.stx"
18961672 {
1897− store_localvar(luaI_findsymbol(yypvt[-0].pNode), yypvt[-2].vInt);
1898− yyval.vInt = yypvt[-2].vInt+1;
1673+ store_localvar(luaY_pvt[-0].pTStr, luaY_pvt[-2].vInt);
1674+ luaY_val.vInt = luaY_pvt[-2].vInt+1;
18991675 } break;
19001676 case 97:
1901−# line 782 "lua.stx"
1902−{ yyval.vInt = 0; } break;
1677+# line 781 "lua.stx"
1678+{ luaY_val.vInt = 0; } break;
19031679 case 98:
1904−# line 783 "lua.stx"
1905−{ yyval.vInt = yypvt[-0].vLong; } break;
1680+# line 782 "lua.stx"
1681+{ luaY_val.vInt = luaY_pvt[-0].vLong; } break;
19061682 case 99:
1907−# line 786 "lua.stx"
1908−{ lua_debug = yypvt[-0].vInt; } break;
1683+# line 785 "lua.stx"
1684+{ lua_debug = luaY_pvt[-0].vInt; } break;
19091685 }
1910− goto yystack; /* reset registers in driver code */
1686+ goto luaY_stack; /* reset registers in driver code */
19111687 }
src/parser.h+3−2
@@ -1,3 +1,4 @@
1+
12 typedef union
23 {
34 int vInt;
@@ -6,9 +7,9 @@ typedef union · 2 unmodified lines
67 Word vWord;
78 Long vLong;
89 TFunc *pFunc;
9− TreeNode *pNode;
10+ TaggedString *pTStr;
1011 } YYSTYPE;
11−extern YYSTYPE yylval;
12+extern YYSTYPE luaY_lval;
1213 # define WRONGTOKEN 257
1314 # define NIL 258
1415 # define IF 259
src/table.c+94−97
@@ -3,9 +3,7 @@ · 2 unmodified lines
33 ** Module to control static tables
44 */
55
6−char *rcs_table="$Id: table.c,v 2.38 1995/11/03 15:30:50 roberto Exp $";
7−
8−/*#include <string.h>*/
6+char *rcs_table="$Id: table.c,v 2.54 1996/05/06 14:29:35 roberto Exp $";
97
108 #include "mem.h"
119 #include "opcode.h"
@@ -21,61 +19,66 @@ char *rcs_table="$Id: table.c,v 2.38 1995/11/03 15:30:50 roberto Exp $"; · 9 unmodified lines
2119 #define BUFFER_BLOCK 256
2220
2321 Symbol *lua_table = NULL;
24−static Word lua_ntable = 0;
22+Word lua_ntable = 0;
2523 static Long lua_maxsymbol = 0;
2624
2725 TaggedString **lua_constant = NULL;
28−static Word lua_nconstant = 0;
26+Word lua_nconstant = 0;
2927 static Long lua_maxconstant = 0;
3028
3129
32−#define GARBAGE_BLOCK 1024
33−#define MIN_GARBAGE_BLOCK (GARBAGE_BLOCK/2)
30+#define GARBAGE_BLOCK 50
3431
3532 static void lua_nextvar (void);
36−static void setglobal (void);
37−static void getglobal (void);
3833
3934 /*
40−** Initialise symbol table with internal functions
35+** Internal functions
4136 */
42−static void lua_initsymbol (void)
37+static struct {
38+ char *name;
39+ lua_CFunction func;
40+} int_funcs[] = {
41+ {"assert", luaI_assert},
42+ {"dofile", lua_internaldofile},
43+ {"dostring", lua_internaldostring},
44+ {"error", luaI_error},
45+ {"getglobal", luaI_getglobal},
46+ {"next", lua_next},
47+ {"nextvar", lua_nextvar},
48+ {"print", luaI_print},
49+ {"setfallback", luaI_setfallback},
50+ {"setglobal", luaI_setglobal},
51+ {"tonumber", lua_obj2number},
52+ {"tostring", luaI_tostring},
53+ {"type", luaI_type}
54+};
55+
56+#define INTFUNCSIZE (sizeof(int_funcs)/sizeof(int_funcs[0]))
57+
58+
59+void luaI_initsymbol (void)
4360 {
44− Word n;
45− lua_maxsymbol = BUFFER_BLOCK;
46− lua_table = newvector(lua_maxsymbol, Symbol);
47− n = luaI_findsymbolbyname("next");
48− s_tag(n) = LUA_T_CFUNCTION; s_fvalue(n) = lua_next;
49− n = luaI_findsymbolbyname("dofile");
50− s_tag(n) = LUA_T_CFUNCTION; s_fvalue(n) = lua_internaldofile;
51− n = luaI_findsymbolbyname("setglobal");
52− s_tag(n) = LUA_T_CFUNCTION; s_fvalue(n) = setglobal;
53− n = luaI_findsymbolbyname("getglobal");
54− s_tag(n) = LUA_T_CFUNCTION; s_fvalue(n) = getglobal;
55− n = luaI_findsymbolbyname("nextvar");
56− s_tag(n) = LUA_T_CFUNCTION; s_fvalue(n) = lua_nextvar;
57− n = luaI_findsymbolbyname("type");
58− s_tag(n) = LUA_T_CFUNCTION; s_fvalue(n) = luaI_type;
59− n = luaI_findsymbolbyname("tonumber");
60− s_tag(n) = LUA_T_CFUNCTION; s_fvalue(n) = lua_obj2number;
61− n = luaI_findsymbolbyname("print");
62− s_tag(n) = LUA_T_CFUNCTION; s_fvalue(n) = lua_print;
63− n = luaI_findsymbolbyname("dostring");
64− s_tag(n) = LUA_T_CFUNCTION; s_fvalue(n) = lua_internaldostring;
65− n = luaI_findsymbolbyname("setfallback");
66− s_tag(n) = LUA_T_CFUNCTION; s_fvalue(n) = luaI_setfallback;
67− n = luaI_findsymbolbyname("error");
68− s_tag(n) = LUA_T_CFUNCTION; s_fvalue(n) = luaI_error;
61+ int i;
62+ lua_maxsymbol = BUFFER_BLOCK;
63+ lua_table = newvector(lua_maxsymbol, Symbol);
64+ for (i=0; i<INTFUNCSIZE; i++)
65+ {
66+ Word n = luaI_findsymbolbyname(int_funcs[i].name);
67+ s_tag(n) = LUA_T_CFUNCTION; s_fvalue(n) = int_funcs[i].func;
68+ }
6969 }
7070
7171
7272 /*
7373 ** Initialise constant table with pre-defined constants
7474 */
75−void lua_initconstant (void)
75+void luaI_initconstant (void)
7676 {
7777 lua_maxconstant = BUFFER_BLOCK;
7878 lua_constant = newvector(lua_maxconstant, TaggedString *);
79+ /* pre-register mem error messages, to avoid loop when error arises */
80+ luaI_findconstantbyname(tableEM);
81+ luaI_findconstantbyname(memEM);
7982 }
8083
8184
@@ -83,22 +86,15 @@ void lua_initconstant (void) · 1 unmodified line
8386 ** Given a name, search it at symbol table and return its index. If not
8487 ** found, allocate it.
8588 */
86−Word luaI_findsymbol (TreeNode *t)
89+Word luaI_findsymbol (TaggedString *t)
8790 {
88− if (lua_table == NULL)
89− lua_initsymbol();
9091 if (t->varindex == NOT_USED)
9192 {
9293 if (lua_ntable == lua_maxsymbol)
93− {
94− if (lua_maxsymbol >= MAX_WORD)
95− lua_error("symbol table overflow");
96− lua_maxsymbol *= 2;
97− if (lua_maxsymbol >= MAX_WORD)
98− lua_maxsymbol = MAX_WORD;
99− lua_table = growvector(lua_table, lua_maxsymbol, Symbol);
100− }
94+ lua_maxsymbol = growvector(&lua_table, lua_maxsymbol, Symbol,
95+ symbolEM, MAX_WORD);
10196 t->varindex = lua_ntable;
97+ lua_table[lua_ntable].varname = t;
10298 s_tag(lua_ntable) = LUA_T_NIL;
10399 lua_ntable++;
104100 }
@@ -108,7 +104,7 @@ Word luaI_findsymbol (TreeNode *t) · 3 unmodified lines
108104
109105 Word luaI_findsymbolbyname (char *name)
110106 {
111− return luaI_findsymbol(lua_constcreate(name));
107+ return luaI_findsymbol(luaI_createfixedstring(name));
112108 }
113109
114110
@@ -116,23 +112,15 @@ Word luaI_findsymbolbyname (char *name) · 1 unmodified line
116112 ** Given a tree node, check it is has a correspondent constant index. If not,
117113 ** allocate it.
118114 */
119−Word luaI_findconstant (TreeNode *t)
115+Word luaI_findconstant (TaggedString *t)
120116 {
121− if (lua_constant == NULL)
122− lua_initconstant();
123117 if (t->constindex == NOT_USED)
124118 {
125119 if (lua_nconstant == lua_maxconstant)
126− {
127− if (lua_maxconstant >= MAX_WORD)
128− lua_error("constant table overflow");
129− lua_maxconstant *= 2;
130− if (lua_maxconstant >= MAX_WORD)
131− lua_maxconstant = MAX_WORD;
132− lua_constant = growvector(lua_constant, lua_maxconstant, TaggedString *);
133− }
120+ lua_maxconstant = growvector(&lua_constant, lua_maxconstant, TaggedString *,
121+ constantEM, MAX_WORD);
134122 t->constindex = lua_nconstant;
135− lua_constant[lua_nconstant] = &(t->ts);
123+ lua_constant[lua_nconstant] = t;
136124 lua_nconstant++;
137125 }
138126 return t->constindex;
@@ -141,7 +129,15 @@ Word luaI_findconstant (TreeNode *t) · 2 unmodified lines
141129
142130 Word luaI_findconstantbyname (char *name)
143131 {
144− return luaI_findconstant(lua_constcreate(name));
132+ return luaI_findconstant(luaI_createfixedstring(name));
133+}
134+
135+TaggedString *luaI_createfixedstring (char *name)
136+{
137+ TaggedString *ts = lua_createstring(name);
138+ if (!ts->marked)
139+ ts->marked = 2; /* avoid GC */
140+ return ts;
145141 }
146142
147143
@@ -153,7 +149,7 @@ static char *lua_travsymbol (int (*fn)(Object *)) · 5 unmodified lines
153149 Word i;
154150 for (i=0; i<lua_ntable; i++)
155151 if (fn(&s_object(i)))
156− return luaI_nodebysymbol(i)->ts.str;
152+ return lua_table[i].varname->str;
157153 return NULL;
158154 }
159155
@@ -162,7 +158,7 @@ static char *lua_travsymbol (int (*fn)(Object *)) · 2 unmodified lines
162158 ** Mark an object if it is a string or a unmarked array.
163159 */
164160 int lua_markobject (Object *o)
165−{
161+{/* if already marked, does not change mark value */
166162 if (tag(o) == LUA_T_STRING && !tsvalue(o)->marked)
167163 tsvalue(o)->marked = 1;
168164 else if (tag(o) == LUA_T_ARRAY)
@@ -173,27 +169,52 @@ int lua_markobject (Object *o) · 4 unmodified lines
173169 return 0;
174170 }
175171
172+/*
173+* returns 0 if the object is going to be (garbage) collected
174+*/
175+int luaI_ismarked (Object *o)
176+{
177+ switch (o->tag)
178+ {
179+ case LUA_T_STRING:
180+ return o->value.ts->marked;
181+ case LUA_T_FUNCTION:
182+ return o->value.tf->marked;
183+ case LUA_T_ARRAY:
184+ return o->value.a->mark;
185+ default: /* nil, number, cfunction, or user data */
186+ return 1;
187+ }
188+}
189+
176190
177191 /*
178192 ** Garbage collection.
179193 ** Delete all unused strings and arrays.
180194 */
181−void lua_pack (void)
195+Long luaI_collectgarbage (void)
182196 {
183− static Long block = GARBAGE_BLOCK; /* when garbage collector will be called */
184− static Long nentity = 0; /* counter of new entities (strings and arrays) */
185197 Long recovered = 0;
186− if (nentity++ < block) return;
187198 lua_travstack(lua_markobject); /* mark stack objects */
188199 lua_travsymbol(lua_markobject); /* mark symbol table objects */
189200 luaI_travlock(lua_markobject); /* mark locked objects */
190201 luaI_travfallbacks(lua_markobject); /* mark fallbacks */
202+ luaI_invalidaterefs();
191203 recovered += lua_strcollector();
192204 recovered += lua_hashcollector();
193205 recovered += luaI_funccollector();
194− nentity = 0; /* reset counter */
195− block=(16*block-7*recovered)/12; /* adapt block size */
196− if (block < MIN_GARBAGE_BLOCK) block = MIN_GARBAGE_BLOCK;
206+ return recovered;
207+}
208+
209+void lua_pack (void)
210+{
211+ static unsigned long block = GARBAGE_BLOCK;
212+ static unsigned long nentity = 0; /* total of strings, arrays, etc */
213+ unsigned long recovered = 0;
214+ if (nentity++ < block) return;
215+ recovered = luaI_collectgarbage();
216+ block = block*2*(1.0 - (float)recovered/nentity);
217+ nentity -= recovered;
197218 }
198219
199220
@@ -225,36 +246,12 @@ static void lua_nextvar (void) · 25 unmodified lines
225246 }
226247 else
227248 {
228− TreeNode *t = luaI_nodebysymbol(next);
229− Object name;
230− tag(&name) = LUA_T_STRING;
231− tsvalue(&name) = &(t->ts);
232− luaI_pushobject(&name);
249+ lua_pushstring(lua_table[next].varname->str);
233250 luaI_pushobject(&s_object(next));
234251 }
235252 }
236253
237254
238−static void setglobal (void)
239−{
240− lua_Object name = lua_getparam(1);
241− lua_Object value = lua_getparam(2);
242− if (!lua_isstring(name))
243− lua_error("incorrect argument to function `setglobal'");
244− lua_pushobject(value);
245− lua_storeglobal(lua_getstring(name));
246−}
247−
248−
249−static void getglobal (void)
250−{
251− lua_Object name = lua_getparam(1);
252− if (!lua_isstring(name))
253− lua_error("incorrect argument to function `getglobal'");
254− lua_pushobject(lua_getglobal(lua_getstring(name)));
255−}
256−
257−
258255 static Object *functofind;
259256 static int checkfunc (Object *o)
260257 {
@@ -270,7 +267,7 @@ static int checkfunc (Object *o) · 9 unmodified lines
270267 }
271268
272269
273−char *getobjname (lua_Object o, char **name)
270+char *lua_getobjname (lua_Object o, char **name)
274271 { /* try to find a name for given function */
275272 functofind = luaI_Address(o);
276273 if ((*name = luaI_travfallbacks(checkfunc)) != NULL)
src/table.h+17−8
@@ -1,7 +1,7 @@
11 /*
22 ** Module to control static tables
33 ** TeCGraf - PUC-Rio
4−** $Id: table.h,v 2.13 1995/10/26 14:21:56 roberto Exp $
4+** $Id: table.h,v 2.21 1996/04/22 18:00:37 roberto Exp $
55 */
66
77 #ifndef table_h
@@ -10,19 +10,28 @@ · 2 unmodified lines
1010 #include "tree.h"
1111 #include "opcode.h"
1212
13−extern Symbol *lua_table;
14−extern TaggedString **lua_constant;
13+typedef struct
14+{
15+ Object object;
16+ TaggedString *varname;
17+} Symbol;
1518
16−extern char *lua_file[];
17−extern int lua_nfile;
1819
20+extern Symbol *lua_table;
21+extern Word lua_ntable;
22+extern TaggedString **lua_constant;
23+extern Word lua_nconstant;
1924
20−void lua_initconstant (void);
25+void luaI_initsymbol (void);
26+void luaI_initconstant (void);
2127 Word luaI_findsymbolbyname (char *name);
22−Word luaI_findsymbol (TreeNode *t);
23−Word luaI_findconstant (TreeNode *t);
28+Word luaI_findsymbol (TaggedString *t);
29+Word luaI_findconstant (TaggedString *t);
2430 Word luaI_findconstantbyname (char *name);
31+TaggedString *luaI_createfixedstring (char *str);
2532 int lua_markobject (Object *o);
33+int luaI_ismarked (Object *o);
34+Long luaI_collectgarbage (void);
2635 void lua_pack (void);
2736
2837
src/tree.c+100−78
@@ -3,7 +3,7 @@ · 2 unmodified lines
33 ** TecCGraf - PUC-Rio
44 */
55
6−char *rcs_tree="$Id: tree.c,v 1.14 1995/10/17 11:53:53 roberto Exp $";
6+char *rcs_tree="$Id: tree.c,v 1.20 1996/03/14 15:56:26 roberto Exp $";
77
88
99 #include <string.h>
@@ -11,66 +11,104 @@ char *rcs_tree="$Id: tree.c,v 1.14 1995/10/17 11:53:53 roberto Exp $"; · 1 unmodified line
1111 #include "mem.h"
1212 #include "lua.h"
1313 #include "tree.h"
14+#include "lex.h"
15+#include "hash.h"
1416 #include "table.h"
1517
1618
17−#define lua_strcmp(a,b) (a[0]<b[0]?(-1):(a[0]>b[0]?(1):strcmp(a,b)))
19+#define NUM_HASHS 64
1820
21+typedef struct {
22+ int size;
23+ int nuse; /* number of elements (including EMPTYs) */
24+ TaggedString **hash;
25+} stringtable;
1926
20−typedef struct StringNode {
21− struct StringNode *next;
22− TaggedString ts;
23−} StringNode;
27+static int initialized = 0;
2428
25−static StringNode *string_root = NULL;
29+static stringtable string_root[NUM_HASHS];
2630
27−static TreeNode *constant_root = NULL;
31+static TaggedString EMPTY = {NOT_USED, NOT_USED, 0, 2, {0}};
2832
29−/*
30−** Insert a new constant/variable at the tree.
31−*/
32−static TreeNode *tree_create (TreeNode **node, char *str)
33+
34+static unsigned long hash (char *str)
3335 {
34− if (*node == NULL)
35− {
36− *node = (TreeNode *) luaI_malloc(sizeof(TreeNode)+strlen(str));
37− (*node)->left = (*node)->right = NULL;
38− strcpy((*node)->ts.str, str);
39− (*node)->ts.marked = 0;
40− (*node)->ts.hash = 0;
41− (*node)->varindex = (*node)->constindex = NOT_USED;
42− return *node;
43− }
44− else
45− {
46− int c = lua_strcmp(str, (*node)->ts.str);
47− if (c < 0)
48− return tree_create(&(*node)->left, str);
49− else if (c > 0)
50− return tree_create(&(*node)->right, str);
51− else
52− return *node;
53− }
36+ unsigned long h = 0;
37+ while (*str)
38+ h = ((h<<5)-h)^(unsigned char)*(str++);
39+ return h;
5440 }
5541
56−TaggedString *lua_createstring (char *str)
42+static void initialize (void)
5743 {
58− StringNode *newString;
59− if (str == NULL) return NULL;
60− lua_pack();
61− newString = (StringNode *)luaI_malloc(sizeof(StringNode)+strlen(str));
62− newString->ts.marked = 0;
63− newString->ts.hash = 0;
64− strcpy(newString->ts.str, str);
65− newString->next = string_root;
66− string_root = newString;
67− return &(newString->ts);
44+ initialized = 1;
45+ luaI_addReserved();
46+ luaI_initsymbol();
47+ luaI_initconstant();
48+}
49+
50+
51+static void grow (stringtable *tb)
52+{
53+ int newsize = luaI_redimension(tb->size);
54+ TaggedString **newhash = newvector(newsize, TaggedString *);
55+ int i;
56+ for (i=0; i<newsize; i++)
57+ newhash[i] = NULL;
58+ /* rehash */
59+ tb->nuse = 0;
60+ for (i=0; i<tb->size; i++)
61+ if (tb->hash[i] != NULL && tb->hash[i] != &EMPTY)
62+ {
63+ int h = tb->hash[i]->hash%newsize;
64+ while (newhash[h])
65+ h = (h+1)%newsize;
66+ newhash[h] = tb->hash[i];
67+ tb->nuse++;
68+ }
69+ luaI_free(tb->hash);
70+ tb->size = newsize;
71+ tb->hash = newhash;
6872 }
6973
74+static TaggedString *insert (char *str, stringtable *tb)
75+{
76+ TaggedString *ts;
77+ unsigned long h = hash(str);
78+ int i;
79+ int j = -1;
80+ if ((Long)tb->nuse*3 >= (Long)tb->size*2)
81+ {
82+ if (!initialized)
83+ initialize();
84+ grow(tb);
85+ }
86+ i = h%tb->size;
87+ while (tb->hash[i])
88+ {
89+ if (tb->hash[i] == &EMPTY)
90+ j = i;
91+ else if (strcmp(str, tb->hash[i]->str) == 0)
92+ return tb->hash[i];
93+ i = (i+1)%tb->size;
94+ }
95+ /* not found */
96+ lua_pack();
97+ if (j != -1) /* is there an EMPTY space? */
98+ i = j;
99+ else
100+ tb->nuse++;
101+ ts = tb->hash[i] = (TaggedString *)luaI_malloc(sizeof(TaggedString)+strlen(str));
102+ strcpy(ts->str, str);
103+ ts->marked = 0;
104+ ts->hash = h;
105+ ts->varindex = ts->constindex = NOT_USED;
106+ return ts;
107+}
70108
71−TreeNode *lua_constcreate (char *str)
109+TaggedString *lua_createstring (char *str)
72110 {
73− return tree_create(&constant_root, str);
111+ return insert(str, &string_root[(unsigned)str[0]%NUM_HASHS]);
74112 }
75113
76114
@@ -80,44 +118,28 @@ TreeNode *lua_constcreate (char *str) · 3 unmodified lines
80118 */
81119 Long lua_strcollector (void)
82120 {
83− StringNode *curr = string_root, *prev = NULL;
84121 Long counter = 0;
85− while (curr)
122+ int i;
123+ for (i=0; i<NUM_HASHS; i++)
86124 {
87− StringNode *next = curr->next;
88− if (!curr->ts.marked)
89− {
90− if (prev == NULL) string_root = next;
91− else prev->next = next;
92− luaI_free(curr);
93− ++counter;
94− }
95− else
125+ stringtable *tb = &string_root[i];
126+ int j;
127+ for (j=0; j<tb->size; j++)
96128 {
97− curr->ts.marked = 0;
98− prev = curr;
129+ TaggedString *t = tb->hash[j];
130+ if (t != NULL && t->marked <= 1)
131+ {
132+ if (t->marked)
133+ t->marked = 0;
134+ else
135+ {
136+ luaI_free(t);
137+ tb->hash[j] = &EMPTY;
138+ counter++;
139+ }
140+ }
99141 }
100− curr = next;
101142 }
102143 return counter;
103144 }
104145
105−
106−/*
107−** Traverse the constant tree looking for a specific symbol number
108−*/
109−static TreeNode *nodebysymbol (TreeNode *root, Word symbol)
110−{
111− TreeNode *t;
112− if (root == NULL) return NULL;
113− if (root->varindex == symbol) return root;
114− t = nodebysymbol(root->left, symbol);
115− if (t) return t;
116− return nodebysymbol(root->right, symbol);
117−}
118−
119−TreeNode *luaI_nodebysymbol (Word symbol)
120−{
121− return nodebysymbol(constant_root, symbol);
122−}
123−
src/tree.h+4−13
@@ -1,7 +1,7 @@
11 /*
22 ** tree.h
33 ** TecCGraf - PUC-Rio
4−** $Id: tree.h,v 1.10 1995/10/17 11:53:53 roberto Exp $
4+** $Id: tree.h,v 1.14 1996/02/26 17:07:49 roberto Exp $
55 */
66
77 #ifndef tree_h
@@ -14,24 +14,15 @@ · 6 unmodified lines
1414
1515 typedef struct TaggedString
1616 {
17+ Word varindex; /* != NOT_USED if this is a symbol */
18+ Word constindex; /* != NOT_USED if this is a constant */
1719 unsigned long hash; /* 0 if not initialized */
18− char marked; /* for garbage collection */
20+ int marked; /* for garbage collection; never collect (nor change) if > 1 */
1921 char str[1]; /* \0 byte already reserved */
2022 } TaggedString;
2123
22−typedef struct TreeNode
23−{
24− struct TreeNode *right;
25− struct TreeNode *left;
26− unsigned short varindex; /* != NOT_USED if this is a symbol */
27− unsigned short constindex; /* != NOT_USED if this is a constant */
28− TaggedString ts;
29−} TreeNode;
30−
3124
3225 TaggedString *lua_createstring (char *str);
33−TreeNode *lua_constcreate (char *str);
3426 Long lua_strcollector (void);
35−TreeNode *luaI_nodebysymbol (Word symbol);
3627
3728 #endif
src/types.h+1−3
@@ -1,6 +1,6 @@
11 /*
22 ** TeCGraf - PUC-Rio
3−** $Id: types.h,v 1.3 1995/02/06 19:32:43 roberto Exp $
3+** $Id: types.h,v 1.4 1996/02/07 14:13:17 roberto Exp $
44 */
55
66 #ifndef types_h
@@ -12,8 +12,6 @@ · 5 unmodified lines
1212 #define real float
1313 #endif
1414
15−typedef int Bool; /* boolean values */
16−
1715 #define Byte lua_Byte /* some systems have Byte as a predefined type */
1816 typedef unsigned char Byte; /* unsigned 8 bits */
1917
src/ugly.h+0−36
@@ -1,36 +0,0 @@
1−/*
2−** ugly.h
3−** TecCGraf - PUC-Rio
4−** $Id: ugly.h,v 1.2 1994/11/13 14:39:04 roberto Stab $
5−*/
6−
7−#ifndef ugly_h
8−#define ugly_h
9−
10−/* This enum must have the same order of the array 'reserved' in lex.c */
11−
12−enum {
13− U_and=128,
14− U_do,
15− U_else,
16− U_elseif,
17− U_end,
18− U_function,
19− U_if,
20− U_local,
21− U_nil,
22− U_not,
23− U_or,
24− U_repeat,
25− U_return,
26− U_then,
27− U_until,
28− U_while,
29− U_eq = '='+128,
30− U_le = '<'+128,
31− U_ge = '>'+128,
32− U_ne = '~'+128,
33− U_sc = '.'+128
34−};
35−
36−#endif
src/undump.c+326−0
@@ -0,0 +1,326 @@
1+/*
2+** undump.c
3+** load bytecodes from files
4+*/
5+
6+char* rcs_undump="$Id: undump.c,v 1.14 1996/03/14 17:31:15 lhf Exp $";
7+
8+#include <stdio.h>
9+#include <string.h>
10+#include "opcode.h"
11+#include "mem.h"
12+#include "table.h"
13+#include "undump.h"
14+
15+static int swapword=0;
16+static int swapfloat=0;
17+static TFunc* Main=NULL; /* functions in a chunk */
18+static TFunc* lastF=NULL;
19+
20+static void warn(char* s) /* TODO: remove */
21+{
22+#if 0
23+ fprintf(stderr,"undump: %s\n",s);
24+#endif
25+}
26+
27+static void FixCode(Byte* code, Byte* end) /* swap words */
28+{
29+ Byte* p;
30+ for (p=code; p!=end;)
31+ {
32+ OpCode op=(OpCode)*p;
33+ switch (op)
34+ {
35+ case PUSHNIL:
36+ case PUSH0:
37+ case PUSH1:
38+ case PUSH2:
39+ case PUSHLOCAL0:
40+ case PUSHLOCAL1:
41+ case PUSHLOCAL2:
42+ case PUSHLOCAL3:
43+ case PUSHLOCAL4:
44+ case PUSHLOCAL5:
45+ case PUSHLOCAL6:
46+ case PUSHLOCAL7:
47+ case PUSHLOCAL8:
48+ case PUSHLOCAL9:
49+ case PUSHINDEXED:
50+ case STORELOCAL0:
51+ case STORELOCAL1:
52+ case STORELOCAL2:
53+ case STORELOCAL3:
54+ case STORELOCAL4:
55+ case STORELOCAL5:
56+ case STORELOCAL6:
57+ case STORELOCAL7:
58+ case STORELOCAL8:
59+ case STORELOCAL9:
60+ case STOREINDEXED0:
61+ case ADJUST0:
62+ case EQOP:
63+ case LTOP:
64+ case LEOP:
65+ case GTOP:
66+ case GEOP:
67+ case ADDOP:
68+ case SUBOP:
69+ case MULTOP:
70+ case DIVOP:
71+ case POWOP:
72+ case CONCOP:
73+ case MINUSOP:
74+ case NOTOP:
75+ case POP:
76+ case RETCODE0:
77+ p++;
78+ break;
79+ case PUSHBYTE:
80+ case PUSHLOCAL:
81+ case STORELOCAL:
82+ case STOREINDEXED:
83+ case STORELIST0:
84+ case ADJUST:
85+ case RETCODE:
86+ p+=2;
87+ break;
88+ case STORELIST:
89+ case CALLFUNC:
90+ p+=3;
91+ break;
92+ case PUSHFUNCTION:
93+ p+=5;
94+ break;
95+ case PUSHWORD:
96+ case PUSHSELF:
97+ case CREATEARRAY:
98+ case ONTJMP:
99+ case ONFJMP:
100+ case JMP:
101+ case UPJMP:
102+ case IFFJMP:
103+ case IFFUPJMP:
104+ case SETLINE:
105+ case PUSHSTRING:
106+ case PUSHGLOBAL:
107+ case STOREGLOBAL:
108+ {
109+ Byte t;
110+ t=p[1]; p[1]=p[2]; p[2]=t;
111+ p+=3;
112+ break;
113+ }
114+ case PUSHFLOAT:
115+ {
116+ Byte t;
117+ t=p[1]; p[1]=p[4]; p[4]=t;
118+ t=p[2]; p[2]=p[3]; p[3]=t;
119+ p+=5;
120+ break;
121+ }
122+ case STORERECORD:
123+ {
124+ int n=*++p;
125+ p++;
126+ while (n--)
127+ {
128+ Byte t;
129+ t=p[0]; p[0]=p[1]; p[1]=t;
130+ p+=2;
131+ }
132+ break;
133+ }
134+ default:
135+ lua_error("corrupt binary file");
136+ break;
137+ }
138+ }
139+}
140+
141+static void Unthread(Byte* code, int i, int v)
142+{
143+ while (i!=0)
144+ {
145+ CodeWord c;
146+ Byte* p=code+i;
147+ get_word(c,p);
148+ i=c.w;
149+ c.w=v;
150+ p[-2]=c.m.c1;
151+ p[-1]=c.m.c2;
152+ }
153+}
154+
155+static int LoadWord(FILE* D)
156+{
157+ Word w;
158+ fread(&w,sizeof(w),1,D);
159+ if (swapword)
160+ {
161+ Byte* p=(Byte*)&w; /* TODO: need union? */
162+ Byte t;
163+ t=p[0]; p[0]=p[1]; p[1]=t;
164+ }
165+ return w;
166+}
167+
168+static int LoadSize(FILE* D)
169+{
170+ Word hi=LoadWord(D);
171+ Word lo=LoadWord(D);
172+ int s=(hi<<16)|lo;
173+ if ((Word)s != s) lua_error("code too long");
174+ return s;
175+}
176+
177+static char* LoadBlock(int size, FILE* D)
178+{
179+ char* b=luaI_malloc(size);
180+ fread(b,size,1,D);
181+ return b;
182+}
183+
184+static char* LoadString(FILE* D)
185+{
186+ int size=LoadWord(D);
187+ char *b=luaI_buffer(size);
188+ fread(b,size,1,D);
189+ return b;
190+}
191+
192+static char* LoadNewString(FILE* D)
193+{
194+ return LoadBlock(LoadWord(D),D);
195+}
196+
197+static void LoadFunction(FILE* D)
198+{
199+ TFunc* tf=new(TFunc);
200+ tf->next=NULL;
201+ tf->locvars=NULL;
202+ tf->size=LoadSize(D);
203+ tf->lineDefined=LoadWord(D);
204+ if (IsMain(tf)) /* new main */
205+ {
206+ tf->fileName=LoadNewString(D);
207+ Main=lastF=tf;
208+ }
209+ else /* fix PUSHFUNCTION */
210+ {
211+ CodeCode c;
212+ Byte* p;
213+ tf->marked=LoadWord(D);
214+ tf->fileName=Main->fileName;
215+ p=Main->code+tf->marked;
216+ c.tf=tf;
217+ *p++=c.m.c1; *p++=c.m.c2; *p++=c.m.c3; *p++=c.m.c4;
218+ lastF=lastF->next=tf;
219+ }
220+ tf->code=LoadBlock(tf->size,D);
221+ if (swapword || swapfloat) FixCode(tf->code,tf->code+tf->size);
222+ while (1) /* unthread */
223+ {
224+ int c=getc(D);
225+ if (c==ID_VAR) /* global var */
226+ {
227+ int i=LoadWord(D);
228+ char* s=LoadString(D);
229+ int v=luaI_findsymbolbyname(s);
230+ Unthread(tf->code,i,v);
231+ }
232+ else if (c==ID_STR) /* constant string */
233+ {
234+ int i=LoadWord(D);
235+ char* s=LoadString(D);
236+ int v=luaI_findconstantbyname(s);
237+ Unthread(tf->code,i,v);
238+ }
239+ else
240+ {
241+ ungetc(c,D);
242+ break;
243+ }
244+ }
245+}
246+
247+static void LoadSignature(FILE* D)
248+{
249+ char* s=SIGNATURE;
250+ while (*s!=0 && getc(D)==*s)
251+ ++s;
252+ if (*s!=0) lua_error("bad signature");
253+}
254+
255+static void LoadHeader(FILE* D) /* TODO: error handling */
256+{
257+ Word w,tw=TEST_WORD;
258+ float f,tf=TEST_FLOAT;
259+ LoadSignature(D);
260+ getc(D); /* skip version */
261+ fread(&w,sizeof(w),1,D); /* test word */
262+ if (w!=tw)
263+ {
264+ swapword=1;
265+ warn("different byte order");
266+ }
267+ fread(&f,sizeof(f),1,D); /* test float */
268+ if (f!=tf)
269+ {
270+ Byte* p=(Byte*)&f; /* TODO: need union? */
271+ Byte t;
272+ swapfloat=1;
273+ t=p[0]; p[0]=p[3]; p[3]=t;
274+ t=p[1]; p[1]=p[2]; p[2]=t;
275+ if (f!=tf) /* TODO: try another perm? */
276+ lua_error("different float representation");
277+ else
278+ warn("different byte order in floats");
279+ }
280+}
281+
282+static void LoadChunk(FILE* D)
283+{
284+ LoadHeader(D);
285+ while (1)
286+ {
287+ int c=getc(D);
288+ if (c==ID_FUN) LoadFunction(D); else { ungetc(c,D); break; }
289+ }
290+}
291+
292+/*
293+** load one chunk from a file.
294+** return list of functions found, headed by main, or NULL at EOF.
295+*/
296+TFunc* luaI_undump1(FILE* D)
297+{
298+ while (1)
299+ {
300+ int c=getc(D);
301+ if (c==ID_CHUNK)
302+ {
303+ LoadChunk(D);
304+ return Main;
305+ }
306+ else if (c==EOF)
307+ return NULL;
308+ else
309+ lua_error("not a lua binary file");
310+ }
311+}
312+
313+/*
314+** load and run all chunks in a file
315+*/
316+int luaI_undump(FILE* D)
317+{
318+ TFunc* m;
319+ while ((m=luaI_undump1(D)))
320+ {
321+ int status=luaI_dorun(m);
322+ luaI_freefunc(m);
323+ if (status!=0) return status;
324+ }
325+ return 0;
326+}
src/undump.h+23−0
@@ -0,0 +1,23 @@
1+/*
2+** undump.h
3+** definitions for lua decompiler
4+** $Id: undump.h,v 1.2 1996/03/11 21:59:41 lhf Exp $
5+*/
6+
7+#include "func.h"
8+
9+#define IsMain(f) (f->lineDefined==0)
10+
11+/* definitions for chunk headers */
12+
13+#define ID_CHUNK 27 /* ESC */
14+#define ID_FUN 'F'
15+#define ID_VAR 'V'
16+#define ID_STR 'S'
17+#define SIGNATURE "Lua"
18+#define VERSION 0x23 /* 2.3 */
19+#define TEST_WORD 0x1234 /* a word for testing byte ordering */
20+#define TEST_FLOAT 0.123456789e-23 /* a float for testing representation */
21+
22+TFunc* luaI_undump1(FILE* D); /* load one chunk */
23+int luaI_undump(FILE* D); /* load all chunks */
test/bisect.lua+26−0
@@ -0,0 +1,26 @@
1+$debug
2+-- bisection method for solving non-linear equations
3+
4+function bisect(f,a,b,fa,fb)
5+print(n.." a="..a.." fa="..fa.." b="..b.." fb="..fb)
6+ local c=(a+b)/2
7+ if abs(a-b)<delta then return c end
8+ n=n+1
9+ local fc=f(c)
10+ if fa*fc<0 then return bisect(f,a,c,fa,fc) else return bisect(f,c,b,fc,fb) end
11+end
12+
13+-- find root of f in the inverval [a,b]. bisection needs that f(a)*f(b)<0
14+function solve(f,a,b)
15+ delta=1e-6 -- tolerance
16+ n=0
17+ local z=bisect(f,a,b,f(a),f(b))
18+ print(format("after %d steps, root is %.10g",n,z))
19+end
20+
21+-- our function
22+function f(x)
23+ return x*x*x-x-1
24+end
25+
26+solve(f,1,2)
test/cf.lua+27−0
@@ -0,0 +1,27 @@
1+-- temperature conversion table
2+
3+-- celsius to farenheit
4+
5+c0=-20
6+while c0<50 do
7+
8+ c1=c0+10
9+ write("C ")
10+ c=c0
11+ while c<c1 do
12+ write(format("%3.0f ",c))
13+ c=c+1
14+ end
15+ write("\n")
16+
17+ c=c0
18+ write("F ")
19+ while c<c1 do
20+ f=(9/5)*c+32
21+ write(format("%3.0f ",f))
22+ c=c+1
23+ end
24+ write("\n\n")
25+
26+ c0=c1
27+end
test/dump.lua+1−1
@@ -1,4 +1,4 @@
1−
1+-- dump global environment
22
33 function savevar (n,v)
44 if v == nil then return end;
test/examples/ps/ps.lua+3−7
@@ -1,7 +1,7 @@
11 -- ps.lua
22 -- lua interface to postscript
33 -- Luiz Henrique de Figueiredo (lhf@csg.uwaterloo.ca)
4−-- 12 Nov 95
4+-- 14 May 96
55
66 PS={}
77
@@ -12,15 +12,11 @@ end · 4 unmodified lines
1212 -------------------------------------------------------------------- control --
1313
1414 function PS.open(title)
15− local d,m,y=date()
16− local H,M,S=time()
17− if d<10 then d="0"..d end
18− if m<10 then m="0"..m end
1915 if title==nil then title="(no title)" end
2016 P("%!PS-Adobe-2.0 EPSF-1.2")
2117 P("%%Title: "..title)
22− P("%%Creator: ps.lua from Lua 2.2")
23− P("%%CreationDate: "..y..m..d.." "..H..":"..M..":"..S)
18+ P("%%Creator: ps.lua from Lua 2.4")
19+ P("%%CreationDate: "..date())
2420 P("%%Pages: (atend)")
2521 P("%%BoundingBox: (atend)")
2622 P("%%EndComments")
test/hello.lua+3−0
@@ -0,0 +1,3 @@
1+-- the first program in every language
2+
3+print("hello world, from Lua!")
test/long.lua+0−22
@@ -1,22 +0,0 @@
1−function sort(a,n) -- selection sort
2− local i=1
3− while i<=n do
4− local m, j = i, i+1
5− while j<=n do
6− if a[j]<a[m] then m=j end
7− j=j+1
8− end
9− a[i],a[m]=a[m],a[i] -- swap a[i] and a[m]
10− i=i+1
11− end
12−end
13−
14−
15−v = { }
16−
17−i=1
18−while i <= 5000 do v[i] = 5000-i i=i+1 end
19−
20−sort(v,5000)
21−
22−print("v512 = ".. v[512])
test/sort.lua+35−37
@@ -1,28 +1,25 @@
11 $debug
22
3−function quicksort(r,s)
4− if s<=r then return end -- caso basico da recursao
5− local v, i, j = x[r], r, s+1
6− i=i+1; while x[i]<v do i=i+1 end
7− j=j-1; while x[j]>v do j=j-1 end
8− x[i],x[j]=x[j],x[i]
9− while j>i do -- separacao
10− i=i+1; while x[i]<v do i=i+1 end
11− j=j-1; while x[j]>v do j=j-1 end
12− x[i],x[j]=x[j],x[i]
13− end
14− x[i],x[j]=x[j],x[i] -- undo last swap
15− x[j],x[r]=x[r],x[j]
16− quicksort(r,j-1) -- recursao
17− quicksort(j+1,s)
3+function quicksort(a,r,s)
4+ if s<=r then return end
5+ local v, i, j = a[r], r, s+1
6+ repeat
7+ i=i+1; while a[i]<v do i=i+1 end
8+ j=j-1; while a[j]>v do j=j-1 end
9+ a[i],a[j]=a[j],a[i]
10+ until j<=i
11+ a[i],a[j]=a[j],a[i] -- undo last swap
12+ a[j],a[r]=a[r],a[j]
13+ quicksort(a,r,j-1)
14+ quicksort(a,j+1,s)
1815 end
1916
20−function sort(a,n) -- selection sort
17+function selectionsort(a,n)
2118 local i=1
2219 while i<=n do
2320 local m, j = i, i+1
2421 while j<=n do
25− if a[j]<a[m] then m=j end
22+ if a[j]>a[m] then m=j end -- reverse sort
2623 j=j+1
2724 end
2825 a[i],a[m]=a[m],a[i] -- swap a[i] and a[m]
@@ -30,25 +27,26 @@ function sort(a,n) -- selection sort · 1 unmodified line
3027 end
3128 end
3229
33−function main()
34− x={}
35− n=-1
36− n=n+1; x[n]="a"
37− n=n+1; x[n]="waldemar"
38− n=n+1; x[n]="luiz"
39− n=n+1; x[n]="lula"
40− n=n+1; x[n]="peter"
41− n=n+1; x[n]="raquel"
42− n=n+1; x[n]="camilo"
43− n=n+1; x[n]="andre"
44− n=n+1; x[n]="marcelo"
45− n=n+1; x[n]="sedrez"
46− n=n+1; x[n]="z"
47− print(x[0]..","..x[1]..","..x[2]..","..x[3]..","..x[4]..","..x[5]..","..x[6]..","..x[7]..","..x[8]..","..x[9]..","..x[10])
48− quicksort(1,n-1)
49− print(x[0]..","..x[1]..","..x[2]..","..x[3]..","..x[4]..","..x[5]..","..x[6]..","..x[7]..","..x[8]..","..x[9]..","..x[10])
50− sort (x, n-1)
51− print(x[0]..","..x[1]..","..x[2]..","..x[3]..","..x[4]..","..x[5]..","..x[6]..","..x[7]..","..x[8]..","..x[9]..","..x[10])
30+function show(m,x)
31+ write(m.."\n\t")
32+ local i=0
33+ while x[i] do
34+ write(x[i])
35+ i=i+1
36+ if x[i] then write(",") end
37+ end
38+ write("\n")
5239 end
5340
54−main()
41+x={"Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"}
42+
43+n=1 while x[n] do n=n+1 end -- count elements
44+x[0]="A" x[n]="Z" -- quicksort need sentinels
45+
46+show("original",x)
47+
48+quicksort(x,1,n-1)
49+show("after quicksort",x)
50+
51+selectionsort(x, n-1)
52+show("after reverse selection sort",x)