diff options
author | Lua Team <team@lua.org> | 1996-05-14 12:00:00 +0000 |
---|---|---|
committer | repogen <> | 1996-05-14 12:00:00 +0000 |
commit | 721542976ebc89f2f8d17d19be7e4426570b69be (patch) | |
tree | 0c79a45c63aa89d6e4b8ac80931e46d74a72f8cb | |
parent | 71754d2f6423fb9b6e87658e58bafc5470d53f65 (diff) | |
download | lua-github-721542976ebc89f2f8d17d19be7e4426570b69be.tar.gz |
Lua 2.42.4
-rw-r--r-- | COPYRIGHT | 2 | ||||
-rw-r--r-- | HISTORY | 21 | ||||
-rw-r--r-- | INSTALL | 26 | ||||
-rw-r--r-- | Makefile | 8 | ||||
-rw-r--r-- | README | 42 | ||||
-rw-r--r-- | clients/lib/Makefile | 13 | ||||
-rw-r--r-- | clients/lib/iolib.c | 242 | ||||
-rw-r--r-- | clients/lib/mathlib.c | 64 | ||||
-rw-r--r-- | clients/lib/strlib.c | 210 | ||||
-rw-r--r-- | clients/lua/Makefile | 13 | ||||
-rw-r--r-- | clients/lua/lua.c | 14 | ||||
-rw-r--r-- | config | 28 | ||||
-rw-r--r-- | doc/Makefile | 11 | ||||
-rw-r--r-- | doc/luac.man | 75 | ||||
-rw-r--r-- | doc/luac.ps | 246 | ||||
-rw-r--r-- | doc/luac.txt | 66 | ||||
-rw-r--r-- | doc/manual.ps | 2859 | ||||
-rw-r--r-- | doc/refman.ps | 3562 | ||||
-rwxr-xr-x | domake | 11 | ||||
-rw-r--r-- | include/Makefile | 8 | ||||
-rw-r--r-- | include/lua.h | 40 | ||||
-rw-r--r-- | include/luadebug.h | 19 | ||||
-rw-r--r-- | include/lualib.h | 15 | ||||
-rw-r--r-- | src/Makefile | 68 | ||||
-rw-r--r-- | src/fallback.c | 92 | ||||
-rw-r--r-- | src/fallback.h | 9 | ||||
-rw-r--r-- | src/func.c | 83 | ||||
-rw-r--r-- | src/func.h | 24 | ||||
-rw-r--r-- | src/hash.c | 70 | ||||
-rw-r--r-- | src/hash.h | 15 | ||||
-rw-r--r-- | src/inout.c | 130 | ||||
-rw-r--r-- | src/inout.h | 12 | ||||
-rw-r--r-- | src/lex.c | 91 | ||||
-rw-r--r-- | src/lex.h | 19 | ||||
-rw-r--r-- | src/lua.stx | 320 | ||||
-rw-r--r-- | src/luac/Makefile | 24 | ||||
-rw-r--r-- | src/luac/dump.c | 247 | ||||
-rw-r--r-- | src/luac/luac.c | 104 | ||||
-rw-r--r-- | src/luac/luac.h | 24 | ||||
-rw-r--r-- | src/luac/print.c | 189 | ||||
-rw-r--r-- | src/luac/print.h | 76 | ||||
-rw-r--r-- | src/mem.c | 45 | ||||
-rw-r--r-- | src/mem.h | 22 | ||||
-rw-r--r-- | src/opcode.c | 291 | ||||
-rw-r--r-- | src/opcode.h | 26 | ||||
-rw-r--r-- | src/parser.c | 1102 | ||||
-rw-r--r-- | src/parser.h | 5 | ||||
-rw-r--r-- | src/table.c | 191 | ||||
-rw-r--r-- | src/table.h | 25 | ||||
-rw-r--r-- | src/tree.c | 178 | ||||
-rw-r--r-- | src/tree.h | 17 | ||||
-rw-r--r-- | src/types.h | 4 | ||||
-rw-r--r-- | src/ugly.h | 36 | ||||
-rw-r--r-- | src/undump.c | 326 | ||||
-rw-r--r-- | src/undump.h | 23 | ||||
-rw-r--r-- | test/bisect.lua | 26 | ||||
-rw-r--r-- | test/cf.lua | 27 | ||||
-rw-r--r-- | test/dump.lua | 2 | ||||
-rw-r--r-- | test/examples/ps/ps.lua | 10 | ||||
-rw-r--r-- | test/hello.lua | 3 | ||||
-rw-r--r-- | test/long.lua | 22 | ||||
-rw-r--r-- | test/sort.lua | 72 |
62 files changed, 6886 insertions, 4759 deletions
@@ -1,4 +1,4 @@ -Copyright (c) 1994-1995 TeCGraf, PUC-Rio. Written by Waldemar Celes Filho, +Copyright (c) 1994-1996 TeCGraf, PUC-Rio. Written by Waldemar Celes Filho, Roberto Ierusalimschy, Luiz Henrique de Figueiredo. All rights reserved. Permission is hereby granted, without written agreement and without license or diff --git a/HISTORY b/HISTORY new file mode 100644 index 00000000..fb8d17c1 --- /dev/null +++ b/HISTORY @@ -0,0 +1,21 @@ +Current version is 2.4 (version 2.3 was never publicly released) + +* Changes since version 2.2 + + external compiler creates portable binary files that can be loaded faster + + interface for debugging and profiling + + new "getglobal" fallback + + new functions for handling references to Lua objects + + new functions in standard lib + + only one copy of each string is stored + + expanded documentation, with more examples + +* Changes since version 2.1 + + functions now may be declared with any "lvalue" as a name + + garbage collection of functions + + support for pipes + +* Changes since version 1.1 + + object-oriented support + + fallbacks + + simplified syntax for tables + + many internal improvements diff --git a/INSTALL b/INSTALL new file mode 100644 index 00000000..94d004de --- /dev/null +++ b/INSTALL @@ -0,0 +1,26 @@ +* Installation + Installing Lua should be very easy: + + 1. Edit "config" to suit your platform, if at all necessary + 2. Then, type "make" + +* What you get + If make succeeds, you get: + * a compiler and an interpreter in ./bin/lua; + * libraries in ./lib; + * include files in ./include. + + There is a reference manual in ./doc, and tests and examples in ./test. + You don't need these directories for development. + +* If you have problems (and solutions!) + If make fails, please let us know (lua@icad.puc-rio.br). + If you make changes to "config", please send them to us. + +* Shared libraries + If you are running SunOs 4.x, type the following after "make" succeeds: + ld -o lib/liblua.so.2.4 src/*.o + ld -o lib/liblualib.so.2.4 clients/lib/*.o + + For AIX, the OpenGL clone Mesa includes a script for making shared libraries. + For other systems, please let us know how! diff --git a/Makefile b/Makefile new file mode 100644 index 00000000..2e5ac6e9 --- /dev/null +++ b/Makefile @@ -0,0 +1,8 @@ +# makefile for lua hierarchy + +all co clean klean: + cd src; make $@ + cd src/luac; make $@ + cd include; make $@ + cd clients/lib; make $@ + cd clients/lua; make $@ @@ -15,46 +15,20 @@ + portable, written in ANSI C (runs in Unix, DOS, Windows, Mac, Cray, ...) * Availability - In Brazil: ftp://ftp.icad.puc-rio.br/pub/lua/lua-2.2.tar.gz - In Canada: ftp://csg.uwaterloo.ca/pub/lhf/lua/lua-2.2.tar.gz + The latest version of Lua is always available at the following locations: + In Brazil: ftp://ftp.icad.puc-rio.br/pub/lua/lua.tar.gz + In Canada: ftp://csg.uwaterloo.ca/pub/lhf/lua/lua.tar.gz Home page: http://www.inf.puc-rio.br/~roberto/lua.html + The current version is 2.4. * Legal matters Lua is freely available for both academic and commercial purposes. Lua is not in the public domain; TeCGraf keeps its copyright. See COPYRIGHT. -* Changes since version 2.1 (current version is 2.2) - + functions now may be declared with any "lvalue" as a name - + garbage collection of functions - + support for pipes - -* Changes since version 1.1 - + object-oriented support - + fallbacks - + simplified syntax for tables - + many internal improvements - -* Installing - To make, simply type domake. - If make succeeds, you get an interpreter in ./bin/lua. - If make fails, please let me know. - The libraries are in ./lib. The include files are in ./include. - You don't need the other directories for development. - There is a reference manual in ./doc, and tests and examples in ./test. - This distribution is biased towards SunOS 4 with gcc but it is simple to - change the Makefiles for other systems, if necessary. - If you are running SunOs, type also "domake dynamic" to build shared - libraries in ./lib. - If your system does not have "popen", then change ./clients/lib/Makefile. +* Installation + See INSTALL. * Contacting the authors - Send your comments, bug reports and anything else to lhf@icad.puc-rio.br. - Please send me email if you download Lua so that we can know how far it goes. - --- -Luiz Henrique de Figueiredo email: lhf@icad.puc-rio.br -TeCGraf-Grupo de Tecnologia em Computacao Grafica, Dep. Informatica, PUC-Rio -Rua Marques de Sao Vicente 225 voice: +55 21 529-9424 -22453-900 Rio de Janeiro, RJ, Brasil fax: +55 21 511-5645 --- + Send your comments, bug reports and anything else to lua@icad.puc-rio.br. + Please send us email if you download Lua so that we can know how far it goes. diff --git a/clients/lib/Makefile b/clients/lib/Makefile index 70750979..ffe2a63f 100644 --- a/clients/lib/Makefile +++ b/clients/lib/Makefile @@ -1,17 +1,10 @@ # makefile for lualib -INC= $(LUA)/include -LIB= $(LUA)/lib +LUA= ../.. -# in SunOs /usr/5include contains prototypes for standard lib -INCS= -I/usr/5include -I$(INC) -WARN= -Wall -Wmissing-prototypes -Wshadow -ansi +include $(LUA)/config -# if your system does not have popen, remove -DPOPEN from the line below -DEFS= -DPOPEN - -CC= gcc -CFLAGS= $(INCS) $(DEFS) $(WARN) -O2 +EXTRA_DEFS= $(POPEN) OBJS= iolib.o mathlib.o strlib.o SRCS= iolib.c mathlib.c mathlib.h strlib.c strlib.h diff --git a/clients/lib/iolib.c b/clients/lib/iolib.c index 01f8b553..9ed7e479 100644 --- a/clients/lib/iolib.c +++ b/clients/lib/iolib.c @@ -3,15 +3,14 @@ ** Input/output library to LUA */ -char *rcs_iolib="$Id: iolib.c,v 1.29 1995/11/10 18:32:59 roberto Exp $"; +char *rcs_iolib="$Id: iolib.c,v 1.44 1996/05/03 20:10:59 roberto Exp $"; #include <stdio.h> #include <ctype.h> -#include <sys/types.h> -#include <sys/stat.h> #include <string.h> #include <time.h> #include <stdlib.h> +#include <errno.h> #include "lua.h" #include "luadebug.h" @@ -29,6 +28,14 @@ int pclose(); #endif +static void pushresult (int i) +{ + if (i) + lua_pushnumber (1); + else + lua_pushnil(); +} + static void closeread (void) { if (in != stdin) @@ -116,15 +123,12 @@ static void io_writeto (void) ** LUA interface: ** status = appendto (filename) ** where: -** status = 2 -> success (already exist) -** status = 1 -> success (new file) +** status = 1 -> success ** status = nil -> error */ static void io_appendto (void) { char *s = lua_check_string(1, "appendto"); - struct stat st; - int r = (stat(s, &st) == -1) ? 1 : 2; FILE *fp = fopen (s, "a"); if (fp == NULL) lua_pushnil(); @@ -132,7 +136,7 @@ static void io_appendto (void) { if (out != stdout) fclose (out); out = fp; - lua_pushnumber (r); + lua_pushnumber(1); } } @@ -142,15 +146,14 @@ static char getformat (char *f, int *just, int *m, int *n) int t; switch (*f++) { + case 'q': case 'Q': case 's': case 'S': - t = 's'; + case 'i': case 'I': + t = tolower(*(f-1)); break; case 'f': case 'F': case 'g': case 'G': case 'e': case 'E': t = 'f'; break; - case 'i': case 'I': - t = 'i'; - break; default: t = 0; /* to avoid compiler warnings */ lua_arg_error("read/write (format)"); @@ -177,32 +180,6 @@ static char getformat (char *f, int *just, int *m, int *n) } -static char *add_char (int c) -{ - static char *buff = NULL; - static int max = 0; - static int n = 0; - if (n >= max) - { - if (max == 0) - { - max = 100; - buff = (char *)malloc(max); - } - else - { - max *= 2; - buff = (char *)realloc(buff, max); - } - if (buff == NULL) - lua_error("memory overflow"); - } - buff[n++] = c; - if (c == 0) - n = 0; /* prepare for next string */ - return buff; -} - /* ** Read a variable. On error put nil on stack. ** LUA interface: @@ -222,23 +199,23 @@ static int read_until_char (int del) { int c; while((c = fgetc(in)) != EOF && c != del) - add_char(c); + luaI_addchar(c); return c; } -static int read_until_blank (void) +static void read_until_blank (void) { int c; while((c = fgetc(in)) != EOF && !isspace(c)) - add_char(c); - return c; + luaI_addchar(c); + if (c != EOF) ungetc(c,in); } static void read_m (int m) { int c; while (m-- && (c = fgetc(in)) != EOF) - add_char(c); + luaI_addchar(c); } @@ -256,21 +233,18 @@ static void read_free (void) { /* string */ c = read_until_char(c); if (c == EOF) - { - add_char(0); /* to be ready for next time */ lua_pushnil(); - } else - lua_pushstring(add_char(0)); + lua_pushstring(luaI_addchar(0)); } else { double d; char dummy; char *s; - add_char(c); + luaI_addchar(c); read_until_blank(); - s = add_char(0); + s = luaI_addchar(0); if (sscanf(s, "%lf %c", &d, &dummy) == 1) lua_pushnumber(d); else @@ -281,6 +255,7 @@ static void read_free (void) static void io_read (void) { lua_Object o = lua_getparam (1); + luaI_addchar(0); /* initialize buffer */ if (o == LUA_NOOBJECT) /* free format */ read_free(); else /* formatted */ @@ -289,12 +264,19 @@ static void io_read (void) switch (getformat(lua_check_string(1, "read"), &dummy1, &m, &dummy2)) { case 's': + { + char *s; if (m < 0) read_until_blank(); else read_m(m); - lua_pushstring(add_char(0)); + s = luaI_addchar(0); + if ((m >= 0 && strlen(s) == m) || (m < 0 && strlen(s) > 0)) + lua_pushstring(s); + else + lua_pushnil(); break; + } case 'i': /* can read as float, since it makes no difference to Lua */ case 'f': @@ -306,7 +288,7 @@ static void io_read (void) else { read_m(m); - result = sscanf(add_char(0), "%lf", &d); + result = sscanf(luaI_addchar(0), "%lf", &d); } if (result == 1) lua_pushnumber(d); @@ -314,6 +296,8 @@ static void io_read (void) lua_pushnil(); break; } + default: + lua_arg_error("read (format)"); } } } @@ -324,10 +308,16 @@ static void io_read (void) */ static void io_readuntil (void) { - int del = *lua_check_string(1, "readuntil"); - int c = read_until_char(del); + int del, c; + lua_Object p = lua_getparam(1); + luaI_addchar(0); /* initialize buffer */ + if (p == LUA_NOOBJECT || lua_isnil(p)) + del = EOF; + else + del = *lua_check_string(1, "readuntil"); + c = read_until_char(del); if (c != EOF) ungetc(c,in); - lua_pushstring(add_char(0)); + lua_pushstring(luaI_addchar(0)); } @@ -384,6 +374,13 @@ static int write_string (char *s, int just, int m) return status; } +static int write_quoted (int just, int m) +{ + luaI_addchar(0); + luaI_addquoted(lua_check_string(1, "write")); + return write_string(luaI_addchar(0), just, m); +} + static int write_float (int just, int m, int n) { char buffer[100]; @@ -420,15 +417,16 @@ static void io_write (void) if (lua_getparam (2) == LUA_NOOBJECT) /* free format */ { lua_Object o1 = lua_getparam(1); - if (lua_isnumber(o1)) + int t = lua_type(o1); + if (t == LUA_T_NUMBER) status = fprintf (out, "%g", lua_getnumber(o1)) >= 0; - else if (lua_isstring(o1)) + else if (t == LUA_T_STRING) status = fprintf (out, "%s", lua_getstring(o1)) >= 0; } else /* formated */ { int just, m, n; - switch (getformat (lua_check_string(2, "write"), &just, &m, &n)) + switch (getformat(lua_check_string(2, "write"), &just, &m, &n)) { case 's': { @@ -439,6 +437,9 @@ static void io_write (void) status = 0; break; } + case 'q': + status = write_quoted(just, m); + break; case 'f': status = write_float(just, m, n); break; @@ -467,59 +468,54 @@ static void io_execute (void) */ static void io_remove (void) { - if (remove(lua_check_string(1, "remove")) == 0) - lua_pushnumber (1); - else - lua_pushnil(); + pushresult(remove(lua_check_string(1, "remove")) == 0); } +static void io_rename (void) +{ + char *f1 = lua_check_string(1, "rename"); + char *f2 = lua_check_string(2, "rename"); + pushresult(rename(f1, f2) == 0); +} -/* -** To get a environment variables -*/ -static void io_getenv (void) +static void io_tmpname (void) { - char *env = getenv(lua_check_string(1, "getenv")); - if (env == NULL) lua_pushnil(); - else lua_pushstring(env); + lua_pushstring(tmpnam(NULL)); } -/* -** Return time: hour, min, sec -*/ -static void io_time (void) +static void io_errorno (void) { - time_t t; - struct tm *s; - - time(&t); - s = localtime(&t); - lua_pushnumber(s->tm_hour); - lua_pushnumber(s->tm_min); - lua_pushnumber(s->tm_sec); +/* lua_pushstring(strerror(errno));*/ } - + + /* -** Return date: dd, mm, yyyy +** To get a environment variable */ -static void io_date (void) +static void io_getenv (void) { - time_t t; - struct tm *s; - - time(&t); - s = localtime(&t); - lua_pushnumber(s->tm_mday); - lua_pushnumber(s->tm_mon+1); - lua_pushnumber(s->tm_year+1900); + char *env = getenv(lua_check_string(1, "getenv")); + lua_pushstring(env); /* if NULL push nil */ } - + /* -** Beep +** Return user formatted time stamp */ -static void io_beep (void) +static void io_date (void) { - printf("\a"); + time_t t; + struct tm *tm; + char *s; + char b[BUFSIZ]; + if (lua_getparam(1) == LUA_NOOBJECT) + s = "%c"; + else + s = lua_check_string(1, "date"); + time(&t); tm = localtime(&t); + if (strftime(b,sizeof(b),s,tm)) + lua_pushstring(b); + else + lua_error("invalid `date' format"); } /* @@ -528,9 +524,8 @@ static void io_beep (void) static void io_exit (void) { lua_Object o = lua_getparam(1); - if (lua_isstring(o)) - fprintf(stderr, "%s\n", lua_getstring(o)); - exit(1); + int code = lua_isnumber(o) ? (int)lua_getnumber(o) : 1; + exit(code); } /* @@ -543,14 +538,14 @@ static void io_debug (void) { char buffer[250]; fprintf(stderr, "lua_debug> "); - if (gets(buffer) == 0) return; + if (fgets(buffer, sizeof(buffer), stdin) == 0) return; if (strcmp(buffer, "cont") == 0) return; lua_dostring(buffer); } } -void lua_printstack (FILE *f) +static void lua_printstack (FILE *f) { int level = 0; lua_Object func; @@ -560,13 +555,13 @@ void lua_printstack (FILE *f) char *name; int currentline; fprintf(f, "\t"); - switch (*getobjname(func, &name)) + switch (*lua_getobjname(func, &name)) { case 'g': fprintf(f, "function %s", name); break; case 'f': - fprintf(f, "fallback %s", name); + fprintf(f, "`%s' fallback", name); break; default: { @@ -582,7 +577,7 @@ void lua_printstack (FILE *f) } } if ((currentline = lua_currentline(func)) > 0) - fprintf(f, " at line %d", currentline); + fprintf(f, " at line %d", currentline); fprintf(f, "\n"); } } @@ -597,26 +592,27 @@ static void errorfb (void) } -/* -** Open io library -*/ +static struct lua_reg iolib[] = { +{"readfrom", io_readfrom}, +{"writeto", io_writeto}, +{"appendto", io_appendto}, +{"read", io_read}, +{"readuntil",io_readuntil}, +{"write", io_write}, +{"execute", io_execute}, +{"remove", io_remove}, +{"rename", io_rename}, +{"tmpname", io_tmpname}, +{"ioerror", io_errorno}, +{"getenv", io_getenv}, +{"date", io_date}, +{"exit", io_exit}, +{"debug", io_debug}, +{"print_stack", errorfb} +}; + void iolib_open (void) { - lua_register ("readfrom", io_readfrom); - lua_register ("writeto", io_writeto); - lua_register ("appendto", io_appendto); - lua_register ("read", io_read); - lua_register ("readuntil",io_readuntil); - lua_register ("write", io_write); - lua_register ("execute", io_execute); - lua_register ("remove", io_remove); - lua_register ("getenv", io_getenv); - lua_register ("time", io_time); - lua_register ("date", io_date); - lua_register ("beep", io_beep); - lua_register ("exit", io_exit); - lua_register ("debug", io_debug); - lua_register ("print_stack", errorfb); - lua_setfallback("error", errorfb); + luaI_openlib(iolib, (sizeof(iolib)/sizeof(iolib[0]))); + lua_setfallback("error", errorfb); } - diff --git a/clients/lib/mathlib.c b/clients/lib/mathlib.c index 3f1e57f6..07081e48 100644 --- a/clients/lib/mathlib.c +++ b/clients/lib/mathlib.c @@ -3,9 +3,9 @@ ** Mathematics library to LUA */ -char *rcs_mathlib="$Id: mathlib.c,v 1.13 1995/11/10 17:54:31 roberto Exp $"; +char *rcs_mathlib="$Id: mathlib.c,v 1.17 1996/04/30 21:13:55 roberto Exp $"; -#include <stdio.h> /* NULL */ +#include <stdlib.h> #include <math.h> #include "lualib.h" @@ -113,7 +113,7 @@ static void math_pow (void) lua_Object op = lua_getparam(3); if (!lua_isnumber(o1) || !lua_isnumber(o2) || *(lua_getstring(op)) != 'p') { - lua_Object old = lua_getlocked(old_pow); + lua_Object old = lua_getref(old_pow); lua_pushobject(o1); lua_pushobject(o2); lua_pushobject(op); @@ -184,29 +184,47 @@ static void math_rad (void) lua_pushnumber (d/180.*PI); } +static void math_random (void) +{ + lua_pushnumber((double)(rand()%RAND_MAX) / (double)RAND_MAX); +} + +static void math_randomseed (void) +{ + srand(lua_check_number(1, "randomseed")); +} + + +static struct lua_reg mathlib[] = { +{"abs", math_abs}, +{"sin", math_sin}, +{"cos", math_cos}, +{"tan", math_tan}, +{"asin", math_asin}, +{"acos", math_acos}, +{"atan", math_atan}, +{"atan2", math_atan2}, +{"ceil", math_ceil}, +{"floor", math_floor}, +{"mod", math_mod}, +{"sqrt", math_sqrt}, +{"min", math_min}, +{"max", math_max}, +{"log", math_log}, +{"log10", math_log10}, +{"exp", math_exp}, +{"deg", math_deg}, +{"rad", math_rad}, +{"random", math_random}, +{"randomseed", math_randomseed} +}; + /* ** Open math library */ void mathlib_open (void) { - lua_register ("abs", math_abs); - lua_register ("sin", math_sin); - lua_register ("cos", math_cos); - lua_register ("tan", math_tan); - lua_register ("asin", math_asin); - lua_register ("acos", math_acos); - lua_register ("atan", math_atan); - lua_register ("atan2", math_atan2); - lua_register ("ceil", math_ceil); - lua_register ("floor", math_floor); - lua_register ("mod", math_mod); - lua_register ("sqrt", math_sqrt); - lua_register ("min", math_min); - lua_register ("max", math_max); - lua_register ("log", math_log); - lua_register ("log10", math_log10); - lua_register ("exp", math_exp); - lua_register ("deg", math_deg); - lua_register ("rad", math_rad); - old_pow = lua_lockobject(lua_setfallback("arith", math_pow)); + luaI_openlib(mathlib, (sizeof(mathlib)/sizeof(mathlib[0]))); + old_pow = lua_refobject(lua_setfallback("arith", math_pow), 1); } + diff --git a/clients/lib/strlib.c b/clients/lib/strlib.c index 0f37ab85..6a99871c 100644 --- a/clients/lib/strlib.c +++ b/clients/lib/strlib.c @@ -3,12 +3,13 @@ ** String library to LUA */ -char *rcs_strlib="$Id: strlib.c,v 1.14 1995/11/10 17:54:31 roberto Exp $"; +char *rcs_strlib="$Id: strlib.c,v 1.23 1996/04/30 21:13:55 roberto Exp $"; #include <string.h> #include <stdio.h> #include <stdlib.h> #include <ctype.h> +#include <limits.h> #include "lua.h" #include "lualib.h" @@ -24,12 +25,12 @@ void lua_arg_error(char *funcname) char *lua_check_string (int numArg, char *funcname) { lua_Object o = lua_getparam(numArg); - if (!(lua_isstring(o) || lua_isnumber(o))) + if (!lua_isstring(o)) lua_arg_error(funcname); return lua_getstring(o); } -float lua_check_number (int numArg, char *funcname) +double lua_check_number (int numArg, char *funcname) { lua_Object o = lua_getparam(numArg); if (!lua_isnumber(o)) @@ -37,13 +38,36 @@ float lua_check_number (int numArg, char *funcname) return lua_getnumber(o); } -static char *newstring (char *s) +static int lua_opt_number (int numArg, int def, char *funcname) { - char *ns = (char *)malloc(strlen(s)+1); - if (ns == 0) - lua_error("not enough memory for new string"); - strcpy(ns, s); - return ns; + return (lua_getparam(numArg) == LUA_NOOBJECT) ? def : + (int)lua_check_number(numArg, funcname); +} + +char *luaI_addchar (int c) +{ + static char *buff = NULL; + static int max = 0; + static int n = 0; + if (n >= max) + { + if (max == 0) + { + max = 100; + buff = (char *)malloc(max); + } + else + { + max *= 2; + buff = (char *)realloc(buff, max); + } + if (buff == NULL) + lua_error("memory overflow"); + } + buff[n++] = c; + if (c == 0) + n = 0; /* prepare for next string */ + return buff; } @@ -56,15 +80,12 @@ static void str_find (void) { char *s1 = lua_check_string(1, "strfind"); char *s2 = lua_check_string(2, "strfind"); - int init = (lua_getparam(3) == LUA_NOOBJECT) ? 0 : - (int)lua_check_number(3, "strfind")-1; - char *f = strstr(s1+init,s2); + int init = lua_opt_number(3, 1, "strfind") - 1; + char *f = (init>=0 && init<=strlen(s1)) ? strstr(s1+init,s2) : NULL; if (f != NULL) { int pos = f-s1+1; - if (lua_getparam (4) == LUA_NOOBJECT) - lua_pushnumber (pos); - else if ((int)lua_check_number(4, "strfind") >= pos+strlen(s2)-1) + if (lua_opt_number(4, INT_MAX, "strfind") >= pos+strlen(s2)-1) lua_pushnumber (pos); else lua_pushnil(); @@ -94,34 +115,16 @@ static void str_sub (void) { char *s = lua_check_string(1, "strsub"); int start = (int)lua_check_number(2, "strsub"); - int end = (lua_getparam(3) == LUA_NOOBJECT) ? strlen(s) : - (int)lua_check_number(3, "strsub"); + int end = lua_opt_number(3, strlen(s), "strsub"); if (end < start || start < 1 || end > strlen(s)) lua_pushliteral(""); else { - char temp = s[end]; - s[end] = 0; - lua_pushstring (&s[start-1]); - s[end] = temp; - } -} - -/* -** Convert a string according to given function. -*/ -typedef int (*strfunc)(int s); -static void str_apply (strfunc f, char *funcname) -{ - char *s, *c; - c = s = newstring(lua_check_string(1, funcname)); - while (*c != 0) - { - *c = f(*c); - c++; + luaI_addchar(0); + while (start <= end) + luaI_addchar(s[start++ - 1]); + lua_pushstring (luaI_addchar(0)); } - lua_pushstring(s); - free(s); } /* @@ -131,7 +134,11 @@ static void str_apply (strfunc f, char *funcname) */ static void str_lower (void) { - str_apply(tolower, "strlower"); + char *s = lua_check_string(1, "strlower"); + luaI_addchar(0); + while (*s) + luaI_addchar(tolower(*s++)); + lua_pushstring(luaI_addchar(0)); } @@ -142,7 +149,11 @@ static void str_lower (void) */ static void str_upper (void) { - str_apply(toupper, "strupper"); + char *s = lua_check_string(1, "strupper"); + luaI_addchar(0); + while (*s) + luaI_addchar(toupper(*s++)); + lua_pushstring(luaI_addchar(0)); } /* @@ -151,42 +162,115 @@ static void str_upper (void) static void str_ascii (void) { char *s = lua_check_string(1, "ascii"); - lua_Object o2 = lua_getparam(2); - int pos; - pos = (o2 == LUA_NOOBJECT) ? 0 : (int)lua_check_number(2, "ascii")-1; + int pos = lua_opt_number(2, 1, "ascii") - 1; if (pos<0 || pos>=strlen(s)) lua_arg_error("ascii"); lua_pushnumber(s[pos]); } -/* -** converts one or more integers to chars in a string -*/ -#define maxparams 50 -static void str_int2str (void) +void luaI_addquoted (char *s) +{ + luaI_addchar('"'); + for (; *s; s++) + { + if (*s == '"' || *s == '\\' || *s == '\n') + luaI_addchar('\\'); + luaI_addchar(*s); + } + luaI_addchar('"'); +} + +#define MAX_CONVERTION 2000 +#define MAX_FORMAT 50 + +static void str_format (void) { - char s[maxparams+1]; - int i = 0; - while (lua_getparam(++i) != LUA_NOOBJECT) + int arg = 1; + char *strfrmt = lua_check_string(arg++, "format"); + luaI_addchar(0); /* initialize */ + while (*strfrmt) { - if (i > maxparams) - lua_error("too many parameters to function `int2str'"); - s[i-1] = (int)lua_check_number(i, "int2str"); + if (*strfrmt != '%') + luaI_addchar(*strfrmt++); + else if (*++strfrmt == '%') + luaI_addchar(*strfrmt++); /* %% */ + else + { /* format item */ + char form[MAX_FORMAT]; /* store the format ('%...') */ + char buff[MAX_CONVERTION]; /* store the formated value */ + int size = 0; + int i = 0; + form[i++] = '%'; + form[i] = *strfrmt++; + while (!isalpha(form[i])) + { + if (isdigit(form[i])) + { + size = size*10 + form[i]-'0'; + if (size >= MAX_CONVERTION) + lua_error("format size/precision too long in function `format'"); + } + else if (form[i] == '.') + size = 0; /* re-start */ + if (++i >= MAX_FORMAT) + lua_error("bad format in function `format'"); + form[i] = *strfrmt++; + } + form[i+1] = 0; /* ends string */ + switch (form[i]) + { + case 'q': + luaI_addquoted(lua_check_string(arg++, "format")); + buff[0] = '\0'; /* addchar already done */ + break; + case 's': + { + char *s = lua_check_string(arg++, "format"); + if (strlen(s) >= MAX_CONVERTION) + lua_error("string argument too long in function `format'"); + sprintf(buff, form, s); + break; + } + case 'c': case 'd': case 'i': case 'o': + case 'u': case 'x': case 'X': + sprintf(buff, form, (int)lua_check_number(arg++, "format")); + break; + case 'e': case 'E': case 'f': case 'g': + sprintf(buff, form, lua_check_number(arg++, "format")); + break; + default: /* also treat cases 'pnLlh' */ + lua_error("invalid format option in function `format'"); + } + for (i=0; buff[i]; i++) /* move formated value to result */ + luaI_addchar(buff[i]); + } } - s[i-1] = 0; - lua_pushstring(s); + lua_pushstring(luaI_addchar(0)); /* push the result */ } + +void luaI_openlib (struct lua_reg *l, int n) +{ + int i; + for (i=0; i<n; i++) + lua_register(l[i].name, l[i].func); +} + +static struct lua_reg strlib[] = { +{"strfind", str_find}, +{"strlen", str_len}, +{"strsub", str_sub}, +{"strlower", str_lower}, +{"strupper", str_upper}, +{"ascii", str_ascii}, +{"format", str_format} +}; + + /* ** Open string library */ void strlib_open (void) { - lua_register ("strfind", str_find); - lua_register ("strlen", str_len); - lua_register ("strsub", str_sub); - lua_register ("strlower", str_lower); - lua_register ("strupper", str_upper); - lua_register ("ascii", str_ascii); - lua_register ("int2str", str_int2str); + luaI_openlib(strlib, (sizeof(strlib)/sizeof(strlib[0]))); } diff --git a/clients/lua/Makefile b/clients/lua/Makefile index b76dae3c..7bfde7fe 100644 --- a/clients/lua/Makefile +++ b/clients/lua/Makefile @@ -1,21 +1,18 @@ # makefile for lua interpreter -BIN= $(LUA)/bin -INC= $(LUA)/include -LIB= $(LUA)/lib +LUA= ../.. -CC= gcc -CFLAGS= $(INCS) $(DEFS) $(WARN) -O2 +include $(LUA)/config -# in SunOs /usr/5include contains prototypes for standard lib -INCS= -I/usr/5include -I$(INC) -WARN= -Wall -Wmissing-prototypes -Wshadow -ansi +EXTRA_DEFS= $(POSIX) OBJS= lua.o SRCS= lua.c T=$(BIN)/lua +all: $T + $T: $(OBJS) $(CC) -o $@ $(OBJS) -L$(LIB) -llua -llualib -lm diff --git a/clients/lua/lua.c b/clients/lua/lua.c index 33c7adcb..bae09e25 100644 --- a/clients/lua/lua.c +++ b/clients/lua/lua.c @@ -3,7 +3,7 @@ ** Linguagem para Usuarios de Aplicacao */ -char *rcs_lua="$Id: lua.c,v 1.7 1995/10/31 17:05:35 roberto Exp $"; +char *rcs_lua="$Id: lua.c,v 1.10 1996/05/03 19:20:17 roberto Exp $"; #include <stdio.h> #include <string.h> @@ -14,11 +14,15 @@ char *rcs_lua="$Id: lua.c,v 1.7 1995/10/31 17:05:35 roberto Exp $"; static int lua_argc; static char **lua_argv; +#ifdef POSIX /* ** although this function is POSIX, there is no standard header file that ** defines it */ int isatty (int fd); +#else +#define isatty(x) (x==0) /* assume stdin is a tty */ +#endif /* %F Allow Lua code to access argv strings. @@ -41,10 +45,10 @@ static void lua_getargv (void) static void manual_input (void) { - if (isatty(fileno(stdin))) + if (isatty(0)) { char buffer[250]; - while (gets(buffer) != 0) + while (fgets(buffer, sizeof(buffer), stdin) != 0) lua_dostring(buffer); } else @@ -83,7 +87,11 @@ int main (int argc, char *argv[]) printf("%s %s\n(written by %s)\n\n", LUA_VERSION, LUA_COPYRIGHT, LUA_AUTHORS); else + { result = lua_dofile (argv[i]); + if (result) + fprintf(stderr, "lua: error trying to run file %s\n", argv[i]); + } } } return result; @@ -0,0 +1,28 @@ +# configuration file for making Lua + +# you need an ANSI C compiler +CC= gcc +WARN= -Wall -Wmissing-prototypes -Wshadow -ansi + +# in SunOs 4.1.x, uncomment the following line to avoid prototypes warnings +# for standard functions +#EXTRA_INCS= -I/usr/5include + +# if you don't have popen() in your C library, comment the following line: +POPEN= -DPOPEN + +# if your C library is not POSIX compliant, comment the following line: +POSIX= -DPOSIX + +### NO NEED TO CHANGE ANYTHING BELOW THIS LINE ================================ + +VERSION= 2.4 + +INC= $(LUA)/include +LIB= $(LUA)/lib +BIN= $(LUA)/bin + +INCS= -I$(INC) $(EXTRA_INCS) +DEFS= $(EXTRA_DEFS) + +CFLAGS= -O2 $(WARN) $(INCS) $(DEFS) diff --git a/doc/Makefile b/doc/Makefile index de48bd70..b7eab0c6 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -1,16 +1,23 @@ # makefile for lua distribution all: + rm -f manual.id + touch manual.id latex manual.tex latex manual.tex + makeindex manual + sort -df manual.idx | sed -e 's/_/\\_/g' >manual.id + latex manual.tex dvips -o manual.ps manual.dvi - rm -f manual.tex manual.aux manual.log + gzip manual.ps + mv manual.ps.gz refman.ps.gz + rm -f manual.* clean: rm -f manual.tex co: - co -f -M manual.tex + co -f -M manual.tex luac.man klean: clean rm -f manual.tex manual.ps manual.dvi diff --git a/doc/luac.man b/doc/luac.man new file mode 100644 index 00000000..e64e570f --- /dev/null +++ b/doc/luac.man @@ -0,0 +1,75 @@ +.\" $Id: luac.man,v 1.3 1996/03/28 20:24:55 lhf Exp $ +.TH LUAC 1 "12 March 1996" +.SH NAME +luac \- Lua compiler +.SH SYNOPSIS +.B luac +[ +.B \-dlpv +] +[ +.B \-o +.I outputfile +] +.I sourcefile +\&.\|.\|. +.SH DESCRIPTION +.B luac +is the Lua compiler. +It translates programs written in the Lua programming language +into binary files that can be loaded and executed with +.B lua_dofile +in C or +.B dofile +in Lua. + +.BR luac +produces a single output file containing the bytecode +for all named source files. +By default, +the output file is named +.BR luac.out , +but you can change this with the +.B \-o +option. + +You can use "-" to indicate stdin as a source file. +.SH OPTIONS +.LP +.TP 1i +.B \-d +turns debugging on. +.TP +.B \-l +produces a listing of the compiled bytecode for Lua's virtual machine. +.TP +.B \-p +parses sources files but does not generate any output file. +.TP +.B \-v +prints version information. +.TP +.BI \-o " outputfile" +Name the output file +.IR output , +instead of the default +.BR luac.out . +The output file cannot be a source file. +.SH FILES +.PD 0 +.TP 20 +.B luac.out +default output file +.PD +.SH "SEE ALSO" +.BR lua (1) +.LP +.IR "Reference Manual of the Programming Language Lua" +.SH DIAGNOSTICS +Error messages should be self explanatory. +.SH BUGS +Inherits any bugs from Lua, +but Lua has no bugs... +.SH AUTHORS +W. Celes, R. Ierusalimschy & L. H. de Figueiredo +(lua@icad.puc-rio.br) diff --git a/doc/luac.ps b/doc/luac.ps new file mode 100644 index 00000000..c701ac29 --- /dev/null +++ b/doc/luac.ps @@ -0,0 +1,246 @@ +%!PS-Adobe-3.0 +%%Creator: groff version 1.09 +%%CreationDate: Fri Mar 29 10:45:53 1996 +%%DocumentNeededResources: font Times-Roman +%%+ font Times-Bold +%%+ font Times-Italic +%%DocumentSuppliedResources: procset grops 1.09 0 +%%Pages: 1 +%%PageOrder: Ascend +%%Orientation: Portrait +%%EndComments +%%BeginProlog +%%BeginResource: procset grops 1.09 0 +/setpacking where{ +pop +currentpacking +true setpacking +}if +/grops 120 dict dup begin +/SC 32 def +/A/show load def +/B{0 SC 3 -1 roll widthshow}bind def +/C{0 exch ashow}bind def +/D{0 exch 0 SC 5 2 roll awidthshow}bind def +/E{0 rmoveto show}bind def +/F{0 rmoveto 0 SC 3 -1 roll widthshow}bind def +/G{0 rmoveto 0 exch ashow}bind def +/H{0 rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def +/I{0 exch rmoveto show}bind def +/J{0 exch rmoveto 0 SC 3 -1 roll widthshow}bind def +/K{0 exch rmoveto 0 exch ashow}bind def +/L{0 exch rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def +/M{rmoveto show}bind def +/N{rmoveto 0 SC 3 -1 roll widthshow}bind def +/O{rmoveto 0 exch ashow}bind def +/P{rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def +/Q{moveto show}bind def +/R{moveto 0 SC 3 -1 roll widthshow}bind def +/S{moveto 0 exch ashow}bind def +/T{moveto 0 exch 0 SC 5 2 roll awidthshow}bind def +/SF{ +findfont exch +[exch dup 0 exch 0 exch neg 0 0]makefont +dup setfont +[exch/setfont cvx]cvx bind def +}bind def +/MF{ +findfont +[5 2 roll +0 3 1 roll +neg 0 0]makefont +dup setfont +[exch/setfont cvx]cvx bind def +}bind def +/level0 0 def +/RES 0 def +/PL 0 def +/LS 0 def +/PLG{ +gsave newpath clippath pathbbox grestore +exch pop add exch pop +}bind def +/BP{ +/level0 save def +1 setlinecap +1 setlinejoin +72 RES div dup scale +LS{ +90 rotate +}{ +0 PL translate +}ifelse +1 -1 scale +}bind def +/EP{ +level0 restore +showpage +}bind def +/DA{ +newpath arcn stroke +}bind def +/SN{ +transform +.25 sub exch .25 sub exch +round .25 add exch round .25 add exch +itransform +}bind def +/DL{ +SN +moveto +SN +lineto stroke +}bind def +/DC{ +newpath 0 360 arc closepath +}bind def +/TM matrix def +/DE{ +TM currentmatrix pop +translate scale newpath 0 0 .5 0 360 arc closepath +TM setmatrix +}bind def +/RC/rcurveto load def +/RL/rlineto load def +/ST/stroke load def +/MT/moveto load def +/CL/closepath load def +/FL{ +currentgray exch setgray fill setgray +}bind def +/BL/fill load def +/LW/setlinewidth load def +/RE{ +findfont +dup maxlength 1 index/FontName known not{1 add}if dict begin +{ +1 index/FID ne{def}{ pop pop}ifelse +}forall +/Encoding exch def +dup/FontName exch def +currentdict end definefont pop +}bind def +/DEFS 0 def +/EBEGIN{ +moveto +DEFS begin +}bind def +/EEND/end load def +/CNT 0 def +/level1 0 def +/PBEGIN{ +/level1 save def +translate +div 3 1 roll div exch scale +neg exch neg exch translate +0 setgray +0 setlinecap +1 setlinewidth +0 setlinejoin +10 setmiterlimit +[] 0 setdash +/setstrokeadjust where{ +pop +false setstrokeadjust +}if +/setoverprint where{ +pop +false setoverprint +}if +newpath +/CNT countdictstack def +userdict begin +/showpage{} def +}bind def +/PEND{ +clear +countdictstack CNT sub{end}repeat +level1 restore +}bind def +end def +/setpacking where{ +pop +setpacking +}if +%%EndResource +%%IncludeResource: font Times-Roman +%%IncludeResource: font Times-Bold +%%IncludeResource: font Times-Italic +grops begin/DEFS 1 dict def DEFS begin/u{.001 mul}bind def end/RES 72 +def/PL 792 def/LS false def/ENC0[/asciicircum/asciitilde/Scaron/Zcaron +/scaron/zcaron/Ydieresis/trademark/quotesingle/.notdef/.notdef/.notdef +/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef +/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef +/.notdef/.notdef/space/exclam/quotedbl/numbersign/dollar/percent +/ampersand/quoteright/parenleft/parenright/asterisk/plus/comma/hyphen +/period/slash/zero/one/two/three/four/five/six/seven/eight/nine/colon +/semicolon/less/equal/greater/question/at/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/Z/bracketleft/backslash/bracketright/circumflex +/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 +/z/braceleft/bar/braceright/tilde/.notdef/quotesinglbase/guillemotleft +/guillemotright/bullet/florin/fraction/perthousand/dagger/daggerdbl +/endash/emdash/ff/fi/fl/ffi/ffl/dotlessi/dotlessj/grave/hungarumlaut +/dotaccent/breve/caron/ring/ogonek/quotedblleft/quotedblright/oe/lslash +/quotedblbase/OE/Lslash/.notdef/exclamdown/cent/sterling/currency/yen +/brokenbar/section/dieresis/copyright/ordfeminine/guilsinglleft +/logicalnot/minus/registered/macron/degree/plusminus/twosuperior +/threesuperior/acute/mu/paragraph/periodcentered/cedilla/onesuperior +/ordmasculine/guilsinglright/onequarter/onehalf/threequarters +/questiondown/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE +/Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex +/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis +/multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn +/germandbls/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla +/egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis +/eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide/oslash +/ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis]def +/Times-Italic@0 ENC0/Times-Italic RE/Times-Bold@0 ENC0/Times-Bold RE +/Times-Roman@0 ENC0/Times-Roman RE +%%EndProlog +%%Page: 1 1 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF(LU)72 48 Q -.034 -.4(AC \( 1 \))-.4 H +(User Commands)157.852 E(LU)157.452 E -.034 -.4(AC \( 1 \))-.4 H/F1 9 +/Times-Bold@0 SF -.18(NA)72 96 S(ME).18 E F0(luac \255 Lua compiler)108 +108 Q F1(SYNOPSIS)72 124.8 Q/F2 10/Times-Bold@0 SF(luac)108 136.8 Q F0 +([)3.75 E F2(\255dlpv)3.75 E F0 3.75(][)3.75 G F2<ad6f>A/F3 10 +/Times-Italic@0 SF(output\214le)3.75 E F0(])3.75 E F3(sour)3.75 E +(ce\214le)-.37 E F0 1.666(...)3.75 G F1(DESCRIPTION)72 153.6 Q F2(luac) +108 165.6 Q F0 .371(is the Lua compiler)2.871 F 5.371(.I)-.55 G 2.871 +(tt)-5.371 G .37(ranslates programs written in the Lua programming lang\ +uage into binary \214les)-2.871 F(that can be loaded and e)108 177.6 Q +-.15(xe)-.15 G(cuted with).15 E F2(lua_do\214le)2.5 E F0(in C or)2.5 E +F2(do\214le)2.5 E F0(in Lua.)2.5 E F2(luac)108 201.6 Q F0 .159(produces\ + a single output \214le containing the bytecode for all named source \ +\214les.)2.658 F .159(By def)5.159 F .159(ault, the output)-.1 F +(\214le is named)108 213.6 Q F2(luac.out)2.5 E F0 2.5(,b)C +(ut you can change this with the)-2.7 E F2<ad6f>2.5 E F0(option.)2.5 E +-1.1(Yo)108 237.6 S 2.5(uc)1.1 G +(an use "-" to indicate stdin as a source \214le.)-2.5 E F1(OPTIONS)72 +254.4 Q F2<ad64>108 266.4 Q F0(turns deb)60.74 E(ugging on.)-.2 E F2 +<ad6c>108 283.2 Q F0 +(produces a listing of the compiled bytecode for Lua')63.52 E 2.5(sv) +-.55 G(irtual machine.)-2.5 E F2<ad70>108 300 Q F0 +(parses sources \214les b)60.74 E(ut does not generate an)-.2 E 2.5(yo) +-.15 G(utput \214le.)-2.5 E F2<ad76>108 316.8 Q F0(prints v)61.3 E +(ersion information.)-.15 E F2<ad6f>108 333.6 Q F3(output\214le)2.5 E F0 +.657(Name the output \214le)21.02 F F3(output)3.157 E F0 3.157(,i)C .657 +(nstead of the def)-3.157 F(ault)-.1 E F2(luac.out)3.157 E F0 5.657(.T)C +.656(he output \214le cannot be a)-5.657 F(source \214le.)180 345.6 Q F1 +(FILES)72 362.4 Q F2(luac.out)108 374.4 Q F0(def)65.83 E +(ault output \214le)-.1 E F1(SEE ALSO)72 391.2 Q F2(lua)108 403.2 Q F0 +(\(1\))A F3(Refer)108 420 Q(ence Manual of the Pr)-.37 E -.1(og)-.45 G +-.15(ra).1 G(mming Langua).15 E .2 -.1(ge L)-.1 H(ua).1 E F1(DIA)72 +436.8 Q(GNOSTICS)-.495 E F0(Error messages should be self e)108 448.8 Q +(xplanatory)-.15 E(.)-.65 E F1 -.09(BU)72 465.6 S(GS).09 E F0 +(Inherits an)108 477.6 Q 2.5(yb)-.15 G(ugs from Lua, b)-2.7 E +(ut Lua has no b)-.2 E(ugs...)-.2 E F1 -.45(AU)72 494.4 S(THORS).45 E F0 +1.84 -.92(W. C)108 506.4 T(eles, R. Ierusalimsch).92 E 2.5(y&L)-.05 G +2.5(.H)-2.5 G 2.5(.d)-2.5 G 2.5(eF)-2.5 G +(igueiredo \(lua@icad.puc-rio.br\))-2.5 E(29 March 1996)72 768 Q +(12 March 1996)142.35 E(1)198.45 E EP +%%Trailer +end +%%EOF diff --git a/doc/luac.txt b/doc/luac.txt new file mode 100644 index 00000000..d1989530 --- /dev/null +++ b/doc/luac.txt @@ -0,0 +1,66 @@ + + + +LUAC(1) User Commands LUAC(1) + + + +NAME + luac - Lua compiler + +SYNOPSIS + luac [ -dlpv ] [ -o outputfile ] sourcefile ... + +DESCRIPTION + luac is the Lua compiler. It translates programs written in + the Lua programming language into binary files that can be + loaded and executed with lua_dofile in C or dofile in Lua. + + luac produces a single output file containing the bytecode + for all named source files. By default, the output file is + named luac.out, but you can change this with the -o option. + + You can use "-" to indicate stdin as a source file. + +OPTIONS + -d turns debugging on. + + -l produces a listing of the compiled bytecode for + Lua's virtual machine. + + -p parses sources files but does not generate any + output file. + + -v prints version information. + + -o outputfile + Name the output file output, instead of the + default luac.out. The output file cannot be a + source file. + +FILES + luac.out default output file + +SEE ALSO + lua(1) + + Reference Manual of the Programming Language Lua + +DIAGNOSTICS + Error messages should be self explanatory. + +BUGS + Inherits any bugs from Lua, but Lua has no bugs... + +AUTHORS + W. Celes, R. Ierusalimschy & L. H. de Figueiredo + (lua@icad.puc-rio.br) + + + + + +Formatted 96/03/29 12 March 1996 1 + + + diff --git a/doc/manual.ps b/doc/manual.ps deleted file mode 100644 index 21271b85..00000000 --- a/doc/manual.ps +++ /dev/null @@ -1,2859 +0,0 @@ -%!PS-Adobe-2.0 -%%Creator: dvips 5.58 Copyright 1986, 1994 Radical Eye Software -%%Title: manual.dvi -%%CreationDate: Tue Nov 28 10:59:43 1995 -%%Pages: 27 -%%PageOrder: Ascend -%%BoundingBox: 0 0 612 792 -%%EndComments -%DVIPSCommandLine: /software/tex/bin/_dvips -o manual.ps manual.dvi -%DVIPSParameters: dpi=300, comments removed -%DVIPSSource: TeX output 1995.11.28:1056 -%%BeginProcSet: tex.pro -/TeXDict 250 dict def TeXDict begin /N{def}def /B{bind def}N /S{exch}N -/X{S N}B /TR{translate}N /isls false N /vsize 11 72 mul N /hsize 8.5 72 -mul N /landplus90{false}def /@rigin{isls{[0 landplus90{1 -1}{-1 1} -ifelse 0 0 0]concat}if 72 Resolution div 72 VResolution div neg scale -isls{landplus90{VResolution 72 div vsize mul 0 exch}{Resolution -72 div -hsize mul 0}ifelse TR}if Resolution VResolution vsize -72 div 1 add mul -TR[matrix currentmatrix{dup dup round sub abs 0.00001 lt{round}if} -forall round exch round exch]setmatrix}N /@landscape{/isls true N}B -/@manualfeed{statusdict /manualfeed true put}B /@copies{/#copies X}B -/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{ -/nn 8 dict N nn begin /FontType 3 N /FontMatrix fntrx N /FontBBox FBB N -string /base X array /BitMaps X /BuildChar{CharBuilder}N /Encoding IE N -end dup{/foo setfont}2 array copy cvx N load 0 nn put /ctr 0 N[}B /df{ -/sf 1 N /fntrx FMat N df-tail}B /dfs{div /sf X /fntrx[sf 0 0 sf neg 0 0] -N df-tail}B /E{pop nn dup definefont setfont}B /ch-width{ch-data dup -length 5 sub get}B /ch-height{ch-data dup length 4 sub get}B /ch-xoff{ -128 ch-data dup length 3 sub get sub}B /ch-yoff{ch-data dup length 2 sub -get 127 sub}B /ch-dx{ch-data dup length 1 sub get}B /ch-image{ch-data -dup type /stringtype ne{ctr get /ctr ctr 1 add N}if}B /id 0 N /rw 0 N -/rc 0 N /gp 0 N /cp 0 N /G 0 N /sf 0 N /CharBuilder{save 3 1 roll S dup -/base get 2 index get S /BitMaps get S get /ch-data X pop /ctr 0 N ch-dx -0 ch-xoff ch-yoff ch-height sub ch-xoff ch-width add ch-yoff -setcachedevice ch-width ch-height true[1 0 0 -1 -.1 ch-xoff sub ch-yoff -.1 sub]{ch-image}imagemask restore}B /D{/cc X dup type /stringtype ne{]} -if nn /base get cc ctr put nn /BitMaps get S ctr S sf 1 ne{dup dup -length 1 sub dup 2 index S get sf div put}if put /ctr ctr 1 add N}B /I{ -cc 1 add D}B /bop{userdict /bop-hook known{bop-hook}if /SI save N @rigin -0 0 moveto /V matrix currentmatrix dup 1 get dup mul exch 0 get dup mul -add .99 lt{/QV}{/RV}ifelse load def pop pop}N /eop{SI restore userdict -/eop-hook known{eop-hook}if showpage}N /@start{userdict /start-hook -known{start-hook}if pop /VResolution X /Resolution X 1000 div /DVImag X -/IE 256 array N 0 1 255{IE S 1 string dup 0 3 index put cvn put}for -65781.76 div /vsize X 65781.76 div /hsize X}N /p{show}N /RMat[1 0 0 -1 0 -0]N /BDot 260 string N /rulex 0 N /ruley 0 N /v{/ruley X /rulex X V}B /V -{}B /RV statusdict begin /product where{pop product dup length 7 ge{0 7 -getinterval dup(Display)eq exch 0 4 getinterval(NeXT)eq or}{pop false} -ifelse}{false}ifelse end{{gsave TR -.1 .1 TR 1 1 scale rulex ruley false -RMat{BDot}imagemask grestore}}{{gsave TR -.1 .1 TR rulex ruley scale 1 1 -false RMat{BDot}imagemask grestore}}ifelse B /QV{gsave newpath transform -round exch round exch itransform moveto rulex 0 rlineto 0 ruley neg -rlineto rulex neg 0 rlineto fill grestore}B /a{moveto}B /delta 0 N /tail -{dup /delta X 0 rmoveto}B /M{S p delta add tail}B /b{S p tail}B /c{-4 M} -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{ -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{ -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 -a}B /bos{/SS save N}B /eos{SS restore}B end -%%EndProcSet -TeXDict begin 40258431 52099146 1000 300 300 -(/home/lhf/w/doc/lua/html/save/manual.dvi) @start /Fa -7 121 df<07F8001FFE003FFF803E07C03E03C01C01E00001E0003FE003FFE00FFFE03F -C1E07C01E07801E0F001E0F001E0F001E07803E07C07E03FFFFE1FFEFE03F87E17157E94 -1A>97 D<01F80007FF000FFF801F07C03C03C07801E07801E0F000F0F000F0FFFFF0FFFF -F0FFFFF0F000007000007800007C00F03E00F01F03F00FFFE003FFC000FE0014157D941A ->101 D<7F0F8000FF7FE0007FFFF0000FF0F0000FC078000F8078000F0078000F007800 -0F0078000F0078000F0078000F0078000F0078000F0078000F0078000F0078000F007800 -0F0078007FE1FF00FFF3FF807FE1FF00191580941A>110 D<7FC1F8FFC7FC7FDFFE03FE -1E03F80C03F00003E00003E00003C00003C00003C00003C00003C00003C00003C00003C0 -0003C00003C0007FFF80FFFF807FFF8017157F941A>114 D<01C00003C00003C00003C0 -0003C00003C00003C0007FFFE0FFFFE0FFFFE003C00003C00003C00003C00003C00003C0 -0003C00003C00003C00003C00003C0F003C0F003C0F003C0F001E1E001FFE000FF80003F -00141C7F9B1A>116 D<7FC7FCFFC7FE7FC7FC0F01E00F01E00F01E00F83E00783C00783 -C00783C003C78003C78003C78001C70001EF0001EF0001EF0000FE0000FE0000FE00007C -0017157F941A>118 D<7FC7F87FCFFC7FC7F80787C007C78003EF8001FF0000FE0000FC -00007C00007C00007C0000FE0001EF0003EF0003C7800783C00F83E07FC7FCFFC7FE7FC7 -FC17157F941A>120 D E /Fb 1 122 df<1C0C2E1C4E1C8E389C381C381C383870387038 -70387018E00FE000E000C0E1C0E38047003C000E137F8C11>121 -D E /Fc 2 121 df<70F8F8F87005057C840D>58 D<07C3C00FE7E0187C603078F06079 -F06079F0C0F1E000F1C000F00000F00001E00001E00039E00079E030FBC060FBC060F3C0 -C0E7E3807CFF00383C0014147E931A>120 D E /Fd 47 121 df<0007F800007FFE0001 -FC0F0003F01F0007E03F800FC03F800FC03F800FC03F800FC01F000FC004000FC000000F -C000000FC00000FFFFFF80FFFFFF80FFFFFF800FC01F800FC01F800FC01F800FC01F800F -C01F800FC01F800FC01F800FC01F800FC01F800FC01F800FC01F800FC01F800FC01F800F -C01F800FC01F800FC01F807FF8FFF07FF8FFF07FF8FFF01C237FA21F>12 -D<3C7EFFFFFFFF7E3C08087C8710>46 D<0000180000380000380000700000700000E000 -00E00000E00001C00001C0000380000380000380000700000700000700000E00000E0000 -1C00001C00001C0000380000380000700000700000700000E00000E00001C00001C00001 -C0000380000380000700000700000700000E00000E00000E00001C00001C000038000038 -0000380000700000700000E00000E00000C0000015317DA41C>I<00180000780003F800 -FFF800FFF800FDF80001F80001F80001F80001F80001F80001F80001F80001F80001F800 -01F80001F80001F80001F80001F80001F80001F80001F80001F80001F80001F80001F800 -01F80001F8007FFFE07FFFE07FFFE013207C9F1C>49 D<03FC000FFF003FFFC0783FE07C -0FF0FE07F0FE03F8FE03F8FE03F87C03F83803F80003F80003F00007F00007E0000FC000 -1F80001F00003C0000780000F00001E03803C0380700380600380C00781FFFF03FFFF07F -FFF0FFFFF0FFFFF0FFFFF015207D9F1C>I<01FE0007FF800FFFE01E07F03F03F03F03F8 -3F83F83F03F81F03F80C03F80003F00007E00007C0001F8001FE0001FF000007E00003F0 -0001F80001FC0001FE0001FE7C01FE7C01FEFE01FEFE01FCFE01FC7C03F87C07F03FFFE0 -0FFFC003FE0017207E9F1C>I<0000E00001E00003E00007E0000FE0000FE0001FE0003F -E00077E000E7E000E7E001C7E00387E00707E00E07E00E07E01C07E03807E07007E0E007 -E0FFFFFFFFFFFFFFFFFF0007E00007E00007E00007E00007E00007E000FFFF00FFFF00FF -FF18207E9F1C>I<2000603C01E03FFFC03FFFC03FFF803FFE003FFC003FF00038000038 -000038000038000039FC003FFF003E0FC03807E03003F00003F00003F00003F80003F838 -03F87C03F8FC03F8FC03F8FC03F0F803F07007E03C0FC03FFF800FFF0003F80015207D9F -1C>I<001F8000FFE003FFF007F0F00FC1F81F81F83F01F83F01F87E00F07E00007E0000 -FE0800FE7FC0FEFFE0FF81F0FF00F8FF00FCFF00FCFE00FEFE00FEFE00FEFE00FE7E00FE -7E00FE7E00FE3E00FC3E00FC1F00F80F83F007FFE003FFC000FF0017207E9F1C>I<7000 -007C00007FFFFE7FFFFE7FFFFE7FFFFC7FFFF87FFFF0F00070E000E0E001C0E00380E007 -00000E00000E00001C00003C0000380000780000780000F80000F00001F00001F00001F0 -0001F00003F00003F00003F00003F00003F00003F00003F00001E00017227DA11C>I<00 -FE0003FFC007FFE00F83F01E01F01E00F83E00F83E00F83F00F83F80F83FE1F01FF9E01F -FFC00FFF8007FFC003FFE00FFFF01F7FF83E1FFC7C07FC7C01FEF800FEF8007EF8003EF8 -003EF8003E7C003C7E00783F01F81FFFF00FFFC001FF0017207E9F1C>I<000070000000 -00F800000000F800000000F800000001FC00000001FC00000003FE00000003FE00000003 -FE000000077F000000077F0000000F7F8000000E3F8000000E3F8000001C1FC000001C1F -C000003C1FE00000380FE00000380FE00000700FF000007007F00000F007F80000FFFFF8 -0000FFFFF80001FFFFFC0001C001FC0001C001FC00038000FE00038000FE00078000FF00 -0700007F00FFF007FFF8FFF007FFF8FFF007FFF825227EA12A>65 -D<0003FE0180001FFF838000FFFFE78001FF00FF8003F8003F8007F0001F800FE0000F80 -1FC0000F803F800007803F800007807F800003807F000003807F00000380FF00000000FF -00000000FF00000000FF00000000FF00000000FF00000000FF00000000FF000000007F00 -0000007F000003807F800003803F800003803F800007801FC00007000FE0000F0007F000 -1E0003F8003C0001FF00F80000FFFFF000001FFFC0000003FE000021227DA128>67 -D<FFFFFF8000FFFFFFF000FFFFFFFC0007F003FE0007F0007F0007F0003F8007F0001FC0 -07F0000FE007F0000FE007F0000FF007F00007F007F00007F007F00007F007F00007F807 -F00007F807F00007F807F00007F807F00007F807F00007F807F00007F807F00007F807F0 -0007F807F00007F007F00007F007F00007F007F0000FE007F0000FE007F0001FC007F000 -3F8007F0007F0007F003FE00FFFFFFFC00FFFFFFF000FFFFFF800025227EA12B>I<FFFF -FFFCFFFFFFFCFFFFFFFC07F001FC07F0007C07F0003C07F0001C07F0001E07F0001E07F0 -1C0E07F01C0E07F01C0E07F01C0E07F03C0007F07C0007FFFC0007FFFC0007FFFC0007F0 -7C0007F03C0007F01C0707F01C0707F01C0707F01C0E07F0000E07F0000E07F0001E07F0 -001E07F0003E07F0007E07F001FCFFFFFFFCFFFFFFFCFFFFFFFC20227EA125>I<FFFFFF -F8FFFFFFF8FFFFFFF807F003F807F000F807F0007807F0003807F0003C07F0003C07F01C -1C07F01C1C07F01C1C07F01C1C07F03C0007F07C0007FFFC0007FFFC0007FFFC0007F07C -0007F03C0007F01C0007F01C0007F01C0007F01C0007F0000007F0000007F0000007F000 -0007F0000007F0000007F00000FFFFC000FFFFC000FFFFC0001E227EA123>I<FFFF83FF -FEFFFF83FFFEFFFF83FFFE07F0001FC007F0001FC007F0001FC007F0001FC007F0001FC0 -07F0001FC007F0001FC007F0001FC007F0001FC007F0001FC007F0001FC007F0001FC007 -FFFFFFC007FFFFFFC007FFFFFFC007F0001FC007F0001FC007F0001FC007F0001FC007F0 -001FC007F0001FC007F0001FC007F0001FC007F0001FC007F0001FC007F0001FC007F000 -1FC007F0001FC0FFFF83FFFEFFFF83FFFEFFFF83FFFE27227EA12C>72 -D<FFFF80FFFF80FFFF8007F00007F00007F00007F00007F00007F00007F00007F00007F0 -0007F00007F00007F00007F00007F00007F00007F00007F00007F00007F00007F00007F0 -0007F00007F00007F00007F00007F00007F00007F000FFFF80FFFF80FFFF8011227EA115 ->I<FFFFC000FFFFC000FFFFC00007F0000007F0000007F0000007F0000007F0000007F0 -000007F0000007F0000007F0000007F0000007F0000007F0000007F0000007F0000007F0 -000007F0000007F0000007F0003807F0003807F0003807F0003807F0007807F0007807F0 -007807F000F007F001F007F003F007F00FF0FFFFFFF0FFFFFFF0FFFFFFF01D227EA122> -76 D<FFF800001FFFFFF800001FFFFFFC00003FFF07FC00003FE007FC00003FE0077E00 -0077E0077E000077E0073F0000E7E0073F0000E7E0071F8001C7E0071F8001C7E0071F80 -01C7E0070FC00387E0070FC00387E00707E00707E00707E00707E00703F00E07E00703F0 -0E07E00703F00E07E00701F81C07E00701F81C07E00700FC3807E00700FC3807E007007E -7007E007007E7007E007007E7007E007003FE007E007003FE007E007001FC007E007001F -C007E007000F8007E0FFF80F80FFFFFFF80F80FFFFFFF80700FFFF30227EA135>I<0007 -FC0000003FFF800000FE0FE00003F803F80007E000FC000FC0007E001FC0007F001F8000 -3F003F80003F803F80003F807F00001FC07F00001FC07F00001FC0FF00001FE0FF00001F -E0FF00001FE0FF00001FE0FF00001FE0FF00001FE0FF00001FE0FF00001FE0FF00001FE0 -7F00001FC07F80003FC07F80003FC03F80003F803FC0007F801FC0007F000FE000FE0007 -F001FC0003F803F80000FE0FE000003FFF80000007FC000023227DA12A>79 -D<FFFFFF00FFFFFFE0FFFFFFF007F007F807F001FC07F001FE07F000FE07F000FF07F000 -FF07F000FF07F000FF07F000FF07F000FF07F000FE07F001FE07F001FC07F007F807FFFF -F007FFFFC007F0000007F0000007F0000007F0000007F0000007F0000007F0000007F000 -0007F0000007F0000007F0000007F00000FFFF8000FFFF8000FFFF800020227EA126>I< -01FE0607FF8E1FFFFE3F01FE7C007E78003E78001EF8001EF8000EF8000EFC0000FF0000 -FFE0007FFF007FFFC03FFFF01FFFF80FFFFC03FFFE003FFE0003FE00007F00003F00001F -E0001FE0001FE0001FF0001EF0003EFC003CFF00FCFFFFF8E7FFE0C0FF8018227DA11F> -83 D<7FFFFFFF807FFFFFFF807FFFFFFF807E03F81F807C03F807807803F807807003F8 -0380F003F803C0F003F803C0E003F801C0E003F801C0E003F801C0E003F801C00003F800 -000003F800000003F800000003F800000003F800000003F800000003F800000003F80000 -0003F800000003F800000003F800000003F800000003F800000003F800000003F8000000 -03F800000003F800000003F8000001FFFFF00001FFFFF00001FFFFF00022227EA127>I< -FFFF001FFEFFFF001FFEFFFF001FFE07F00001C007F80003C003F800038003FC00078001 -FC00070001FC00070000FE000E0000FE000E0000FF001E00007F001C00007F803C00003F -803800003F803800001FC07000001FC07000001FE0F000000FE0E000000FF0E0000007F1 -C0000007F1C0000007FBC0000003FB80000003FF80000001FF00000001FF00000000FE00 -000000FE00000000FE000000007C000000007C0000000038000027227FA12A>86 -D<0FFE003FFF807E07E07E03F07E01F07E01F83C01F80001F80001F800FFF807FFF81FE1 -F83F01F87E01F8FC01F8FC01F8FC01F8FC01F87E03F87E0EFF1FFCFF07F03F18167E951B ->97 D<FF800000FF800000FF8000001F8000001F8000001F8000001F8000001F8000001F -8000001F8000001F8000001F8000001F8000001F8FE0001FFFF8001FF07C001FC03E001F -801F001F800F801F800F801F800FC01F800FC01F800FC01F800FC01F800FC01F800FC01F -800FC01F800FC01F800F801F801F801F801F001FC03E001FE07C001E7FF8001C0FC0001A -237EA21F>I<00FF8007FFE00F83F01F03F03E03F07E03F07C01E07C0000FC0000FC0000 -FC0000FC0000FC0000FC00007C00007E00007E00003E00381F00700FC0F007FFC000FF00 -15167E9519>I<0001FF000001FF000001FF0000003F0000003F0000003F0000003F0000 -003F0000003F0000003F0000003F0000003F0000003F0001FE3F0007FFBF000F81FF001F -007F003E003F007E003F007C003F00FC003F00FC003F00FC003F00FC003F00FC003F00FC -003F00FC003F00FC003F007C003F007C003F003E003F001F00FF000F83FFE007FFBFE001 -FC3FE01B237EA21F>I<00FE0007FF800F87C01E01E03E01F07C00F07C00F8FC00F8FC00 -F8FFFFF8FFFFF8FC0000FC0000FC00007C00007C00007E00003E00381F00700FC0F003FF -C000FF0015167E951A>I<01FE1F0007FFFF800F87E7801F03E7801E01E7003E01F0003E -01F0003E01F0003E01F0003E01F0001E01E0001F03E0000F87C0000FFF800019FE000018 -0000001C0000001C0000001FFFE0001FFFF8000FFFFE000FFFFF003FFFFF007C003F80F8 -001F80F8000F80F8000F80F8000F807C001F007E003F001F80FC000FFFF80001FFC00019 -217F951C>103 D<FF800000FF800000FF8000001F8000001F8000001F8000001F800000 -1F8000001F8000001F8000001F8000001F8000001F8000001F87E0001F9FF8001FB8FC00 -1FE07C001FC07E001FC07E001F807E001F807E001F807E001F807E001F807E001F807E00 -1F807E001F807E001F807E001F807E001F807E001F807E001F807E00FFF1FFC0FFF1FFC0 -FFF1FFC01A237EA21F>I<1E003F007F807F807F807F803F001E00000000000000000000 -000000FF80FF80FF801F801F801F801F801F801F801F801F801F801F801F801F801F801F -801F801F80FFF0FFF0FFF00C247FA30F>I<003C007E00FF00FF00FF00FF007E003C0000 -0000000000000000000003FF03FF03FF003F003F003F003F003F003F003F003F003F003F -003F003F003F003F003F003F003F003F003F003F003F003F783FFC3FFC3EFC7E78FC7FF0 -1FC0102E83A311>I<FF800000FF800000FF8000001F8000001F8000001F8000001F8000 -001F8000001F8000001F8000001F8000001F8000001F8000001F83FF801F83FF801F83FF -801F80F0001F83E0001F8780001F8F00001F9E00001FBE00001FFE00001FFF00001FFF80 -001FCFC0001F8FC0001F87E0001F83F0001F83F0001F81F8001F80FC00FFF1FFC0FFF1FF -C0FFF1FFC01A237EA21E>I<FF80FF80FF801F801F801F801F801F801F801F801F801F80 -1F801F801F801F801F801F801F801F801F801F801F801F801F801F801F801F801F801F80 -1F801F80FFF0FFF0FFF00C237FA20F>I<FF87F00FE000FF9FFC3FF800FFB87E70FC001F -E03EC07C001FC03F807E001FC03F807E001F803F007E001F803F007E001F803F007E001F -803F007E001F803F007E001F803F007E001F803F007E001F803F007E001F803F007E001F -803F007E001F803F007E001F803F007E001F803F007E00FFF1FFE3FFC0FFF1FFE3FFC0FF -F1FFE3FFC02A167E952F>I<FF87E000FF9FF800FFB8FC001FE07C001FC07E001FC07E00 -1F807E001F807E001F807E001F807E001F807E001F807E001F807E001F807E001F807E00 -1F807E001F807E001F807E001F807E00FFF1FFC0FFF1FFC0FFF1FFC01A167E951F>I<00 -FE0007FFC00F83E01E00F03E00F87C007C7C007C7C007CFC007EFC007EFC007EFC007EFC -007EFC007EFC007E7C007C7C007C3E00F81F01F00F83E007FFC000FE0017167E951C>I< -FF8FE000FFFFF800FFF07C001FC03E001F801F001F801F801F801F801F800FC01F800FC0 -1F800FC01F800FC01F800FC01F800FC01F800FC01F800FC01F801F801F801F801F803F00 -1FC03E001FE0FC001FFFF8001F8FC0001F8000001F8000001F8000001F8000001F800000 -1F8000001F800000FFF00000FFF00000FFF000001A207E951F>I<FF0F80FF1FE0FF33F0 -1F63F01FC3F01FC3F01FC1E01F80001F80001F80001F80001F80001F80001F80001F8000 -1F80001F80001F80001F8000FFF800FFF800FFF80014167F9517>114 -D<07F3001FFF00781F00700F00F00700F00700F80000FF0000FFF0007FFC003FFE001FFF -0007FF00003F80E00F80E00780F00780F00780F80700FC1E00FFFC00C7F00011167E9516 ->I<01C00001C00001C00001C00003C00003C00003C00007C00007C0000FC0003FFF00FF -FF00FFFF000FC0000FC0000FC0000FC0000FC0000FC0000FC0000FC0000FC0000FC0000F -C3800FC3800FC3800FC3800FC3800FC30007E70003FE0000FC0011207F9F16>I<FF83FE -00FF83FE00FF83FE001F807E001F807E001F807E001F807E001F807E001F807E001F807E -001F807E001F807E001F807E001F807E001F807E001F807E001F807E001F80FE001F80FE -000F83FFC007FF7FC001FC7FC01A167E951F>I<FFF03FE0FFF03FE0FFF03FE00FC00E00 -0FE01E0007E01C0007E01C0003F0380003F0380003F8780001F8700001FCF00000FCE000 -00FCE000007FC000007FC000007FC000003F8000003F8000001F0000001F0000000E0000 -1B167F951E>I<FFE3FF8FF8FFE3FF8FF8FFE3FF8FF81FC07C03C00FC0FE03800FC0FE03 -800FE0FF078007E1FF070007E1DF070003F1DF8E0003F38F8E0003F38F8E0001FB8FDC00 -01FF07DC0001FF07FC0000FF07F80000FE03F80000FE03F800007E03F000007C01F00000 -3C01E000003800E00025167F9528>I<FFF0FFE0FFF0FFE0FFF0FFE007E0780007F0F000 -03F8F00001F9E00000FFC00000FF8000007F0000003F0000001F8000003FC000007FE000 -00F7F00001E3F00001C1F80003C0FC000780FE00FFC1FFE0FFC1FFE0FFC1FFE01B167F95 -1E>I E /Fe 4 112 df<03CC0E2E183C381C301C701CE038E038E038E038C073C073C0F3 -60F263361E1C10107C8F14>97 D<383E1F006CC331804F83C1C0CF03C1C0CE0381C0CE03 -81C01C0703801C0703801C0703801C070700380E0730380E0730380E0E30380E0E60701C -0640300C03801C107D8F1F>109 D<383E006CC3004F8380CF0380CE0380CE03801C0700 -1C07001C07001C0E00380E60380E60381C60381CC0700C8030070013107D8F16>I<01F0 -06180C0C180E300E700E600EE00EE00EE00CE01CE018E030606030C01F000F107C8F14> -I E /Ff 2 104 df<003C00E001C0038003800380038003800380038003800380038003 -800380038007001E00F8001E000700038003800380038003800380038003800380038003 -800380038001C000E0003C0E257E9B13>102 D<F8001E00070003800380038003800380 -0380038003800380038003800380038001C000E0003C00E001C003800380038003800380 -0380038003800380038003800380038007001E00F8000E257E9B13>I -E /Fg 35 122 df<00FC000383000603800E07801C07801C03001C00001C00001C00001C -0000FFFF80FFFF801C03801C03801C03801C03801C03801C03801C03801C03801C03801C -03801C03801C0380FF8FF0FF8FF0141A809915>12 D<70F8FCFC7404040808102040060C -7D990B>39 D<70F0F8F87808081010102040050C7D840B>44 D<70F8F8F87005057D840B ->46 D<07E01C38381C381C700E700E700EF00FF00FF00FF00FF00FF00FF00FF00FF00FF0 -0F700E700E700E381C381C1C3807E010187F9713>48 D<07E01FF8383C781C781E781E30 -1E001E001C0038007007E00038001C000E000F000F700FF80FF80EF01E703C3FF80FE010 -187F9713>51 D<70F8F8F87000000000000070F0F8F8780808101010204005177D8F0B> -59 D<000C0000001E0000001E0000001E0000003F0000003F0000003F00000067800000 -6780000067800000C3C00000C3C00000C3C0000181E0000181E0000181E0000300F00003 -FFF00007FFF80006007800060078000E007C000C003C001E003C00FF81FFC0FF81FFC01A -1A7F991D>65 D<FFFF80FFFFE00F00F00F00780F003C0F003C0F003C0F003C0F003C0F00 -780F00700F01E00FFFC00F00F00F00380F003C0F001E0F001E0F001E0F001E0F001E0F00 -3C0F003C0F00F8FFFFF0FFFFC0171A7F991B>I<FFF000FFF0000F00000F00000F00000F -00000F00000F00000F00000F00000F00000F00000F00000F00000F00000F00000F00180F -00180F00180F00380F00380F00300F00700F01F0FFFFF0FFFFF0151A7F9918>76 -D<FFFF80FFFFE00F00F00F00780F00380F003C0F003C0F003C0F003C0F003C0F00380F00 -700F01E00FFFC00F00000F00000F00000F00000F00000F00000F00000F00000F00000F00 -00FFF000FFF000161A7F991A>80 D<07C21FF6383E701E600EE006E006E006F000F8007F -803FF01FF80FFC01FE001E000F0007C007C007C007E006F00EFC1CDFF887E0101A7E9915 ->83 D<7FFFFF007FFFFF00781E0F00601E0300601E0300E01E0380C01E0180C01E0180C0 -1E0180001E0000001E0000001E0000001E0000001E0000001E0000001E0000001E000000 -1E0000001E0000001E0000001E0000001E0000001E0000001E000003FFF00003FFF00019 -1A7F991C>I<FFC3FF0FF0FFC3FF0FF01E007803C01E007801801E007801800F00FC0300 -0F00FC03000F00FC030007819E060007819E060007819E060003C39F0C0003C30F0C0003 -C30F0C0003E30F1C0001E607980001E607980001E607980000FC03F00000FC03F00000FC -03F000007801E000007801E000007801E000003801C000003000C000241A7F9927>87 -D<FEFEC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0 -FEFE07257D9B0B>91 D<FEFE060606060606060606060606060606060606060606060606 -060606060606060606FEFE0725809B0B>93 D<1FC000707000783800781C00301C00001C -0003FC001F1C003C1C00781C00F01C00F01D80F01D80F03D80785D801F8F0011107F8F13 ->97 D<FC0000FC00001C00001C00001C00001C00001C00001C00001C00001C00001CFC00 -1F07001E03801C03C01C01C01C01E01C01E01C01E01C01E01C01E01C01E01C01C01C0380 -1E03001F060018F800131A809915>I<07F01C1C383C783C7018F000F000F000F000F000 -F0007000780C380C1C3807E00E107F8F11>I<003F00003F000007000007000007000007 -0000070000070000070000070003E7000C1F00180F00380700700700F00700F00700F007 -00F00700F00700F00700700700780700380F001C3FE007E7E0131A7F9915>I<07C01C70 -38387038701CF01CFFFCF000F000F000F0007000780C38081C3807E00E107F8F11>I<01 -F007180E3C0C3C1C181C001C001C001C001C00FFC0FFC01C001C001C001C001C001C001C -001C001C001C001C001C00FF80FF800E1A80990C>I<0FC700387B80703B80F03C00F03C -00F03C00F03C007038003870006FC0004000004000006000007FF0003FFC003FFE00600F -00C00300C00300C00300C00300600600381C0007E00011187F8F13>I<387C7C7C380000 -000000FCFC1C1C1C1C1C1C1C1C1C1C1C1CFFFF081A80990A>105 -D<FC00FC001C001C001C001C001C001C001C001C001C001C001C001C001C001C001C001C -001C001C001C001C001C001C00FF80FF80091A80990A>108 D<FC7C1F00FD8E63801E07 -81C01E0781C01C0701C01C0701C01C0701C01C0701C01C0701C01C0701C01C0701C01C07 -01C01C0701C01C0701C0FF9FE7F8FF9FE7F81D107F8F20>I<FC7C00FD87001E03801E03 -801C03801C03801C03801C03801C03801C03801C03801C03801C03801C0380FF9FF0FF9F -F01410808F15>I<07E01C38381C700E700EF00FF00FF00FF00FF00FF00F700E700E381C -1C3807E010107F8F13>I<FCFC00FF07001E03801C03C01C03C01C01E01C01E01C01E01C -01E01C01E01C01E01C03C01C03801E07001F0E001CF8001C00001C00001C00001C00001C -0000FF8000FF80001317808F15>I<FCF0FD1C1E3C1E3C1C181C001C001C001C001C001C -001C001C001C00FF80FF800E10808F0F>114 D<1F2060E04060C060C060F0007F003FC0 -1FE000F0C070C030E030E020F0408F800C107F8F0F>I<18001800180018001800180038 -007FC0FFC03800380038003800380038003800386038603860386038601CC007800B177F -960F>I<FC1F80FC1F801C03801C03801C03801C03801C03801C03801C03801C03801C03 -801C03801C07800C07800E0BF003F3F01410808F15>I<FE3F80FE3F803C0E001C0C001C -0C000E18000E18000E180007300007300007700003E00003E00001C00001C00001C00011 -107F8F14>I<FE3F80FE3F803C0E001C0C001C0C000E18000E18000E1800073000073000 -07700003E00003E00001C00001C00001C000018000018000618000F30000F30000E60000 -78000011177F8F14>121 D E /Fh 4 52 df<00C00000C00000C00000C00000C00000C0 -0000C00000C00000C000FFFF80FFFF8000C00000C00000C00000C00000C00000C00000C0 -0000C00000C00011147E8F17>43 D<0C007C009C001C001C001C001C001C001C001C001C -001C001C001C001C00FF8009107E8F0F>49 D<1F006180C0C0E0E0E0E000E000C001C001 -8003000400082010203FC07FC0FFC00B107F8F0F>I<1F00218071C071C021C001800300 -1F00018000C000E040E0E0E0E0C041803F000B107F8F0F>I E /Fi -5 107 df<03F0000FFC001FFE003FFF007FFF807FFF80FFFFC0FFFFC0FFFFC0FFFFC0FF -FFC0FFFFC07FFF807FFF803FFF001FFE000FFC0003F00012127E9317>15 -D<0000000600000000060000000006000000000300000000030000000003800000000180 -00000000C0000000006000000000700000000018FFFFFFFFFFFFFFFFFFFF000000001800 -00000070000000006000000000C000000001800000000380000000030000000003000000 -0006000000000600000000060028187E962D>33 D<001F007F00F801E003C003C003C003 -C003C003C003C003C003C003C003C003C003C003C003C007800F00FE00F800FE000F0007 -8003C003C003C003C003C003C003C003C003C003C003C003C003C003C003C001E000F800 -7F001F102D7DA117>102 D<F800FE001F00078003C003C003C003C003C003C003C003C0 -03C003C003C003C003C003C003C001E000F0007F001F007F00F001E003C003C003C003C0 -03C003C003C003C003C003C003C003C003C003C003C007801F00FE00F800102D7DA117> -I<C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0 -C0C0C0C0C0C0C0C0C0C0022D7BA10D>106 D E /Fj 3 52 df<06001E00FE00EE000E00 -0E000E000E000E000E000E000E000E000E000E000E000E00FFE0FFE00B137D9211>49 -D<1F003FC041E0C0F0E070E07000F000E000E001C00380030004000810101020307FE0FF -E0FFE00C137E9211>I<1FC03FE07070707820380078007000E00FC000700038003C003C -403CE03CE03840707FE01FC00E137F9211>I E /Fk 46 121 df<3C03C07E07E0FF0FF0 -FF8FF8FF8FF8FF8FF87F87F83D83D80180180380380300300300300600600E00E01C01C0 -38038030030015117E9F1B>34 D<3C007E00FF00FF80FF80FF807F803D80018003800300 -030006000E001C003800300009117D9F0F>39 D<3C7EFFFFFFFF7E3C08087D870F>46 -D<00380000F80007F800FFF800FFF800F9F80001F80001F80001F80001F80001F80001F8 -0001F80001F80001F80001F80001F80001F80001F80001F80001F80001F80001F80001F8 -0001F80001F8007FFFE07FFFE07FFFE0131D7D9C1A>49 D<03FC001FFF803FFFC07C1FE0 -FE07F0FE03F0FE03F8FE01F87C01F83801F80003F80003F00007E00007E0000FC0001F00 -003E00007C0000F00001E0380380380700380E00781FFFF83FFFF07FFFF0FFFFF0FFFFF0 -FFFFF0151D7E9C1A>I<03FC000FFF801FFFC03C0FE07E07F07E03F07E03F07E03F03C07 -F00007E0000FC0001F8003FE0003FC00000F800007E00003F00003F00003F83803F87C03 -F8FE03F8FE03F8FE03F0FC07F07C0FE03FFFC01FFF0003FC00151D7E9C1A>I<0001E000 -03E00003E00007E0000FE0001FE0003BE00073E000F3E001E3E001C3E00383E00703E00E -03E01C03E03803E07803E0F003E0FFFFFEFFFFFEFFFFFE0007E00007E00007E00007E000 -07E000FFFE00FFFE00FFFE171D7F9C1A>I<3800E03FFFE03FFFC03FFF803FFF003FFC00 -3FC00038000038000038000038000039FC003FFF803E07C03803E01003F00003F00003F8 -0003F87803F8FC03F8FC03F8FC03F8FC03F07807E07C0FE03FFFC00FFF0003F800151D7E -9C1A>I<003F0001FFC007FFE00FC1E01F03F01E03F03E03F07E03F07C01E07C0000FC10 -00FCFF00FDFFC0FF03E0FE01F0FE01F0FC01F8FC01F8FC01F8FC01F87C01F87C01F87C01 -F83C01F03E01F01F03E00FFFC007FF8001FC00151D7E9C1A>I<7000007FFFF87FFFF87F -FFF87FFFF07FFFE0FFFFC0F00380E00700E00E00E00E00001C0000380000780000700000 -F00000F00001F00001E00003E00003E00003E00007E00007E00007E00007E00007E00007 -E00003C000018000151E7D9D1A>I<01FE0007FF801FFFC03E07E03C03F07C01F07C01F0 -7E01F07F81F07FE3E03FF3C03FFF801FFF000FFF8007FFC01FFFE03E7FF07C1FF87807F8 -F803F8F801F8F800F8F800F8F800F07C01F07F03E03FFFC00FFF8003FC00151D7E9C1A> -I<0000E000000001F000000001F000000003F800000003F800000003F800000007FC0000 -0007FC0000000FFE0000000EFE0000000EFE0000001C7F0000001C7F0000003C7F800000 -383F800000383F800000701FC00000701FC00000F01FE00000E00FE00000FFFFE00001FF -FFF00001FFFFF00003C007F800038003F800038003F800070001FC00070001FC00FFF01F -FFE0FFF01FFFE0FFF01FFFE0231F7E9E28>65 D<FFFFFE00FFFFFFC0FFFFFFE007E007F0 -07E003F807E001FC07E001FC07E001FC07E001FC07E001FC07E001FC07E001F807E003F0 -07E00FE007FFFF8007FFFFE007E003F007E001F807E000FC07E000FC07E000FE07E000FE -07E000FE07E000FE07E000FE07E001FC07E001FC07E007F8FFFFFFF0FFFFFFE0FFFFFF00 -1F1F7E9E25>I<0007F806007FFF0E01FFFFDE03FE03FE07F000FE0FC0007E1F80003E3F -80001E3F00001E7F00000E7E00000E7E00000EFE000000FE000000FE000000FE000000FE -000000FE000000FE0000007E0000007E00000E7F00000E3F00000E3F80001C1F80001C0F -C0003807F0007803FE03F001FFFFC0007FFF800007FC001F1F7D9E26>I<FFFFFE0000FF -FFFFC000FFFFFFF00007F007F80007F001FC0007F000FE0007F0007F0007F0003F0007F0 -003F8007F0001F8007F0001F8007F0001FC007F0001FC007F0001FC007F0001FC007F000 -1FC007F0001FC007F0001FC007F0001FC007F0001FC007F0001F8007F0001F8007F0003F -8007F0003F0007F0007F0007F0007E0007F001FC0007F007F800FFFFFFF000FFFFFFC000 -FFFFFE0000221F7E9E28>I<FFFFFFE0FFFFFFE0FFFFFFE007F007E007F003E007F001E0 -07F000F007F000F007F0707007F0707007F0707007F0707007F1F00007FFF00007FFF000 -07FFF00007F1F00007F0700007F0701C07F0701C07F0701C07F0003807F0003807F00038 -07F0007807F0007807F001F807F007F8FFFFFFF0FFFFFFF0FFFFFFF01E1F7E9E22>I<FF -FFFFE0FFFFFFE0FFFFFFE007F007E007F003E007F001E007F000F007F000F007F0007007 -F0707007F0707007F0707007F0700007F1F00007FFF00007FFF00007FFF00007F1F00007 -F0700007F0700007F0700007F0700007F0000007F0000007F0000007F0000007F0000007 -F00000FFFFC000FFFFC000FFFFC0001C1F7E9E21>I<FFFF80FFFF80FFFF8007F00007F0 -0007F00007F00007F00007F00007F00007F00007F00007F00007F00007F00007F00007F0 -0007F00007F00007F00007F00007F00007F00007F00007F00007F00007F00007F000FFFF -80FFFF80FFFF80111F7F9E14>73 D<FFFFC000FFFFC000FFFFC00007F0000007F0000007 -F0000007F0000007F0000007F0000007F0000007F0000007F0000007F0000007F0000007 -F0000007F0000007F0000007F0000007F001C007F001C007F001C007F001C007F003C007 -F003C007F0078007F0078007F00F8007F03F80FFFFFF80FFFFFF80FFFFFF801A1F7E9E1F ->76 D<001FF80000FFFF0001F81F8007E007E00FC003F01F8001F81F0000F83F0000FC7F -0000FE7E00007E7E00007EFE00007FFE00007FFE00007FFE00007FFE00007FFE00007FFE -00007FFE00007FFE00007F7E00007E7F0000FE7F0000FE3F0000FC3F8001FC1F8001F80F -C003F007E007E001F81F8000FFFF00001FF800201F7D9E27>79 D<FFFFFE00FFFFFF80FF -FFFFE007F00FF007F003F807F001F807F001FC07F001FC07F001FC07F001FC07F001FC07 -F001FC07F001F807F003F007F00FF007FFFFC007FFFF0007F0000007F0000007F0000007 -F0000007F0000007F0000007F0000007F0000007F0000007F0000007F00000FFFF8000FF -FF8000FFFF80001E1F7E9E24>I<FFFFF80000FFFFFF8000FFFFFFC00007F00FF00007F0 -03F80007F001F80007F001FC0007F001FC0007F001FC0007F001FC0007F001FC0007F001 -F80007F003F00007F00FE00007FFFF800007FFFF000007F03F800007F00FC00007F00FE0 -0007F007F00007F007F00007F007F00007F007F00007F007F00007F007F00007F007F020 -07F007F07007F003F070FFFF81F8E0FFFF80FFC0FFFF803F80241F7E9E27>82 -D<03FC180FFF381FFFF83E03F87C00F8780078F80078F80038F80038FC0000FF0000FFF8 -007FFF007FFFC03FFFE01FFFF00FFFF803FFF8001FFC0001FC0000FC00007CE0007CE000 -7CE0007CF00078F800F8FE01F0FFFFE0EFFFC0C1FF00161F7D9E1D>I<7FFFFFFC7FFFFF -FC7FFFFFFC7E0FE0FC780FE03C700FE01CF00FE01EF00FE01EE00FE00EE00FE00EE00FE0 -0EE00FE00E000FE000000FE000000FE000000FE000000FE000000FE000000FE000000FE0 -00000FE000000FE000000FE000000FE000000FE000000FE000000FE00007FFFFC007FFFF -C007FFFFC01F1E7E9D24>I<0600600E00E01C01C0380380300300600600600600E00E00 -C00C00DE0DE0FF0FF0FF8FF8FF8FF8FF8FF87F87F83F03F01E01E015117D9F1B>92 -D<07FC001FFF803F0FC03F07E03F03F03F03F00C03F00003F001FFF00FFFF01F83F07E03 -F07C03F0F803F0F803F0F803F0FC07F07E0DFE3FF8FE07E07E17147F9319>97 -D<FF800000FF800000FF8000001F8000001F8000001F8000001F8000001F8000001F8000 -001F8000001F8000001F8000001F8FE0001FFFF8001FF07C001FC03E001F803F001F801F -001F801F001F801F801F801F801F801F801F801F801F801F801F801F801F801F001F801F -001F803E001FC03E001FE0FC001E7FF0001C1FC00019207F9F1D>I<01FE0007FF801F0F -C03E0FC03E0FC07C0FC07C0300FC0000FC0000FC0000FC0000FC0000FC00007C00007E00 -003E00E03F01C01F83C007FF8001FC0013147E9317>I<0007FC000007FC000007FC0000 -00FC000000FC000000FC000000FC000000FC000000FC000000FC000000FC000000FC0001 -FCFC000FFFFC001F83FC003E00FC007E00FC007C00FC007C00FC00FC00FC00FC00FC00FC -00FC00FC00FC00FC00FC00FC00FC007C00FC007C00FC007E00FC003E01FC001F07FF800F -FFFF8003F8FF8019207E9F1D>I<01FE0007FF800F83C01E01E03E00F07C00F07C00F8FC -00F8FFFFF8FFFFF8FC0000FC0000FC00007C00007C00003E00381E00380F80F007FFE000 -FF8015147F9318>I<003F8000FFC003F3E007E7E007C7E00FC7E00FC3C00FC0000FC000 -0FC0000FC0000FC000FFFC00FFFC00FFFC000FC0000FC0000FC0000FC0000FC0000FC000 -0FC0000FC0000FC0000FC0000FC0000FC0000FC0000FC0007FFC007FFC007FFC0013207F -9F10>I<03FC7C0FFFFE1E07DE3C03DE7C03EC7C03E07C03E07C03E07C03E03C03C01E07 -801FFF0033FC003000007000007800007FFF803FFFF03FFFF81FFFFC3FFFFC7C00FEF800 -3EF8003EF8003EF8003E7C007C3F01F80FFFE003FF80171E7F931A>I<FF800000FF8000 -00FF8000001F8000001F8000001F8000001F8000001F8000001F8000001F8000001F8000 -001F8000001F87F0001F9FF8001FB8FC001FE07E001FC07E001FC07E001F807E001F807E -001F807E001F807E001F807E001F807E001F807E001F807E001F807E001F807E001F807E -00FFF3FFC0FFF3FFC0FFF3FFC01A207E9F1D>I<1E003F007F807F807F807F803F001E00 -00000000000000000000FF80FF80FF801F801F801F801F801F801F801F801F801F801F80 -1F801F801F801F80FFF0FFF0FFF00C217EA00F>I<FF800000FF800000FF8000001F8000 -001F8000001F8000001F8000001F8000001F8000001F8000001F8000001F8000001F83FF -001F83FF001F83FF001F81E0001F83C0001F8780001F9E00001FBC00001FFE00001FFF00 -001FDF00001F9F80001F0FC0001F07E0001F03E0001F03F0001F01F800FFE3FF80FFE3FF -80FFE3FF8019207F9F1C>107 D<FF80FF80FF801F801F801F801F801F801F801F801F80 -1F801F801F801F801F801F801F801F801F801F801F801F801F801F801F801F801F801F80 -FFF0FFF0FFF00C207E9F0F>I<FF07F00FE000FF1FFC3FF800FF387E70FC001F603FC07E -001FC03F807E001FC03F807E001F803F007E001F803F007E001F803F007E001F803F007E -001F803F007E001F803F007E001F803F007E001F803F007E001F803F007E001F803F007E -001F803F007E00FFF1FFE3FFC0FFF1FFE3FFC0FFF1FFE3FFC02A147E932D>I<FF07F000 -FF1FF800FF38FC001F607E001FC07E001FC07E001F807E001F807E001F807E001F807E00 -1F807E001F807E001F807E001F807E001F807E001F807E001F807E00FFF3FFC0FFF3FFC0 -FFF3FFC01A147E931D>I<01FF0007FFC01F83F03E00F83E00F87C007C7C007CFC007EFC -007EFC007EFC007EFC007EFC007E7C007C7C007C3E00F83E00F81F83F007FFC001FF0017 -147F931A>I<FF8FE000FFFFF800FFF0FC001FC07E001F803F001F803F001F801F001F80 -1F801F801F801F801F801F801F801F801F801F801F801F801F001F803F001F803E001FC0 -7E001FE0FC001FFFF0001F9FC0001F8000001F8000001F8000001F8000001F8000001F80 -0000FFF00000FFF00000FFF00000191D7F931D>I<FF1F00FF3FC0FF67E01FC7E01FC7E0 -1FC7E01F81801F80001F80001F80001F80001F80001F80001F80001F80001F80001F8000 -FFF800FFF800FFF80013147F9316>114 D<0FE63FFE783E700EF00EF00EFE00FFE07FF8 -3FFC1FFE0FFF007FE01FE00FF00FF00EFC1EFFFCC7F010147E9315>I<03800380038003 -800780078007800F801F803FFCFFFCFFFC1F801F801F801F801F801F801F801F801F801F -8E1F8E1F8E1F8E1F8E0F9C07F803F00F1D7F9C14>I<FF83FE00FF83FE00FF83FE001F80 -7E001F807E001F807E001F807E001F807E001F807E001F807E001F807E001F807E001F80 -7E001F807E001F807E001F80FE001F80FE000F83FFC007FF7FC001FC7FC01A147E931D> -I<FFE7FF3FE0FFE7FF3FE0FFE7FF3FE01F80FC07000FC1FC0E000FC1FC0E000FC3FE1E00 -07E3BE1C0007E3BE1C0007F7BF3C0003F71F380003F71FB80001FE0FF00001FE0FF00001 -FE0FF00000FC07E00000FC07E00000FC07E000007803C000007803C00023147F9326> -119 D<FFF3FF00FFF3FF00FFF3FF000FE0E00007E1E00003F3C00001FF800000FF000000 -FE0000007E0000003F0000007F800000FFC00001EFE00003C7E0000383F0000781F800FF -C3FF80FFC3FF80FFC3FF8019147F931C>I E /Fl 84 127 df<70F8F8F8F8F8F8F8F8F8 -F8F8F8F8F8F8F870000000000070F8F8F870051C779B18>33 D<2008701CF83EF83EF83E -F83EF83EF83E701C701C701C701C701C30180F0E7C9C18>I<030600078F00078F00078F -00078F00078F00078F007FFFC0FFFFE0FFFFE07FFFC00F1E000F1E000F1E000F1E000F1E -000F1E007FFFC0FFFFE0FFFFE07FFFC01E3C001E3C001E3C001E3C001E3C001E3C000C18 -00131C7E9B18>I<00C00001C00001C00001C00003F0000FFC003FFE007DDF0071CF00E1 -C780E1CF80E1CF80E1CF80F1C70079C0007FC0003FF0001FFC0007FE0001FF0001CF0021 -C78071C380F9C380F9C380F1C380F1C70079C7007DDE003FFC001FF80007E00001C00001 -C00001C00000C00011247D9F18>I<3803007C07807C0780EE0F80EE0F00EE0F00EE1F00 -EE1E00EE1E00EE3E007C3C007C3C00387C0000780000780000F80000F00001F00001E000 -01E00003E00003C00003C00007C0000783800787C00F87C00F0EE00F0EE01F0EE01E0EE0 -1E0EE03E0EE03C07C03C07C018038013247E9F18>I<01C00007E0000FF0000E70001C38 -001C38001C38001C38001C73F81CF3F81CE3F80FC1C00FC3800F83800F03801F07003F87 -007B8E0071CE00F1FC00F0FC00F07C00F07870F0787078FE707FFFE03FC7E00F03C0151C -7F9B18>I<387C7C7E3E0E0E0E1C1C38F8F0C0070E789B18>I<007000F001E003C007800F -001E001E003C003C007800780078007000F000F000F000F000F000F000F000F000700078 -00780078003C003C001E001E000F00078003C001F000F000700C24799F18>I<6000F000 -78003C001E000F000780078003C003C001E001E001E000E000F000F000F000F000F000F0 -00F000F000E001E001E001E003C003C0078007800F001E003C007800F00060000C247C9F -18>I<01C00001C00001C00001C00061C300F9CF80FDDF807FFF003FFE000FF8000FF800 -3FFE007FFF00FDDF80F9CF8061C30001C00001C00001C00001C00011147D9718>I<0060 -0000F00000F00000F00000F00000F00000F00000F0007FFFC0FFFFE0FFFFE07FFFC000F0 -0000F00000F00000F00000F00000F00000F00000600013147E9718>I<1C3E7E7F3F1F07 -0E1E7CF860080C788518>I<7FFFC0FFFFE0FFFFE07FFFC013047E8F18>I<3078FCFC7830 -0606778518>I<000300000780000780000F80000F00001F00001E00001E00003E00003C -00007C0000780000780000F80000F00001F00001E00003E00003C00003C00007C0000780 -000F80000F00000F00001F00001E00003E00003C00003C00007C0000780000F80000F000 -00F0000060000011247D9F18>I<01F00007FC000FFE001F1F001E0F003C07807803C078 -03C07803C0F001E0F001E0F001E0F001E0F001E0F001E0F001E0F001E0F001E0F803E078 -03C07803C07C07C03C07801E0F001F1F000FFE0007FC0001F000131C7E9B18>I<01C001 -C003C007C007C01FC0FFC0FBC063C003C003C003C003C003C003C003C003C003C003C003 -C003C003C003C003C003C07FFEFFFF7FFE101C7C9B18>I<03F0001FFE003FFF007C0F80 -7807C0F003C0F801E0F801E07001E00001E00001E00003C00003C0000780000780000F00 -001E00003C0000F80001F00003E00007C0000F80001E01E03C01E07FFFE0FFFFE07FFFE0 -131C7E9B18>I<03F8001FFE003FFF003C0F807C07C07C03C07C03C01003C00003800007 -80000F0003FE0003FE0003FF00000F800007C00003C00001E00001E00001E07001E0F801 -E0F803C0F007C07C0F807FFF001FFE0007F000131C7E9B18>I<001F00003F00007F0000 -770000F70001E70001C70003C7000787000707000E07001E07003C0700380700780700F0 -0700FFFFF8FFFFF8FFFFF8000700000700000700000700000700000700007FF0007FF000 -7FF0151C7F9B18>I<3FFF807FFF807FFF80780000780000780000780000780000780000 -7800007800007BF8007FFE007FFF007C0F803003C00003C00001E00001E07001E0F801E0 -F801E0F803C07807C07C0F803FFF001FFC0003F000131C7E9B18>I<F00000FFFFE0FFFF -E0FFFFE0F007C0F00F80000F00001E00003C00003C0000780000780000F00000F00001E0 -0001E00001E00003C00003C00003C00003C0000780000780000780000780000780000780 -00078000030000131D7E9C18>55 D<3078FCFC783000000000000000003078FCFC783006 -14779318>58 D<183C7E7E3C180000000000000000183C7E7E3E1E0E1C3C78F060071A78 -9318>I<0000C00003E00007E0001FC0003F8000FE0001FC0007F0000FE0003F80007F00 -00FC0000FC00007F00003F80000FE00007F00001FC0000FE00003F80001FC00007E00003 -E00000C013187E9918>I<7FFFC0FFFFE0FFFFE07FFFC00000000000000000000000007F -FFC0FFFFE0FFFFE07FFFC0130C7E9318>I<600000F80000FC00007F00003F80000FE000 -07F00001FC0000FE00003F80001FC00007E00007E0001FC0003F8000FE0001FC0007F000 -0FE0003F80007F0000FC0000F8000060000013187E9918>I<0FF0003FFC007FFF00781F -00F80780F80780F80780201F00007E0000FC0001F00001E00003C00003C00003C00003C0 -0003C00003800000000000000000000000000000000003800007C00007C00007C0000380 -00111C7D9B18>I<007C0001FE0007FF000F87801E03C03C1DC0387FC070FFE071E3E071 -C1E0E1C1E0E380E0E380E0E380E0E380E0E380E0E380E0E1C1C071C1C071E3C070FF8038 -7F003C1C001E01E00F83E007FFC001FF80007E00131C7E9B18>I<00F80000F80000F800 -01FC0001DC0001DC0001DC0003DE0003DE0003DE0003DE00038E00078F00078F00078F00 -078F00078F000F07800FFF800FFF800FFF800F07801E03C01E03C01E03C07F8FF0FF8FF8 -7F8FF0151C7F9B18>I<7FFE00FFFF007FFF801E07C01E03C01E01E01E01E01E01E01E01 -E01E01E01E03C01E07C01FFF801FFF001FFFC01E03E01E01E01E00F01E00F01E00F01E00 -F01E00F01E00F01E01E01E03E07FFFC0FFFF807FFE00141C7F9B18>I<00F8E003FFE007 -FFE00F07E01E03E03C03E03C01E07801E07801E0700000F00000F00000F00000F00000F0 -0000F00000F00000F000007000007801E07801E03C01E03C01E01E03C00F07C007FF8003 -FE0000F800131C7E9B18>I<7FFC00FFFF007FFF801E07C01E03E01E01E01E01F01E00F0 -1E00F01E00F81E00781E00781E00781E00781E00781E00781E00781E00781E00781E00F0 -1E00F01E01F01E01E01E03E01E07C07FFF80FFFF007FFC00151C809B18>I<FFFFF0FFFF -F0FFFFF01E00F01E00F01E00F01E00F01E00001E00001E0F001E0F001E0F001FFF001FFF -001FFF001E0F001E0F001E0F001E00001E00001E00781E00781E00781E00781E0078FFFF -F8FFFFF8FFFFF8151C7F9B18>I<FFFFF8FFFFF8FFFFF81E00781E00781E00781E00781E -00001E00001E0F001E0F001E0F001FFF001FFF001FFF001E0F001E0F001E0F001E00001E -00001E00001E00001E00001E00001E0000FFE000FFE000FFE000151C7F9B18>I<01F1C0 -07FFC00FFFC01F0FC01E07C03C03C03803C07803C07803C0700000F00000F00000F00000 -F00000F00000F01FF0F03FF0F01FF07003C07803C07803C03807C03C07C01E0FC01F0FC0 -0FFFC007FFC001F3C0141C7E9B18>I<7FFF80FFFFC07FFF8001E00001E00001E00001E0 -0001E00001E00001E00001E00001E00001E00001E00001E00001E00001E00001E00001E0 -0001E00001E00001E00001E00001E00001E0007FFF80FFFFC07FFF80121C7D9B18>73 -D<01FFE001FFE001FFE0000F00000F00000F00000F00000F00000F00000F00000F00000F -00000F00000F00000F00000F00000F00000F00000F00000F00000F00700F00F80F00F80F -00F83E007FFC003FF8000FE000131C7E9B18>I<FFE000FFE000FFE0001E00001E00001E -00001E00001E00001E00001E00001E00001E00001E00001E00001E00001E00001E00001E -00001E00001E00001E00F01E00F01E00F01E00F01E00F0FFFFF0FFFFF0FFFFF0141C7F9B -18>76 D<FC01F8FE03F8FE03F83F07E03B06E03B06E03B06E03B8EE03B8EE0398CE0398C -E039DCE039DCE039DCE038D8E038F8E038F8E03870E03870E03800E03800E03800E03800 -E03800E03800E0FE03F8FE03F8FE03F8151C7F9B18>I<7E07F0FF0FF87F07F01F81C01D -81C01D81C01DC1C01CC1C01CC1C01CE1C01CE1C01CE1C01C61C01C71C01C71C01C31C01C -39C01C39C01C39C01C19C01C19C01C1DC01C0DC01C0DC01C0FC07F07C0FF87C07F03C015 -1C7F9B18>I<0FFE003FFF807FFFC07C07C07803C0F803E0F001E0F001E0F001E0F001E0 -F001E0F001E0F001E0F001E0F001E0F001E0F001E0F001E0F001E0F001E0F001E0F001E0 -F803E07803C07C07C07FFFC03FFF800FFE00131C7E9B18>I<FFFE00FFFF80FFFFC01E07 -C01E03E01E01E01E00F01E00F01E00F01E00F01E00F01E01E01E03E01E07C01FFFC01FFF -801FFE001E00001E00001E00001E00001E00001E00001E00001E0000FFC000FFC000FFC0 -00141C7F9B18>I<7FF800FFFE007FFF001E1F801E07801E07C01E03C01E03C01E03C01E -07C01E07801E1F801FFF001FFE001FFE001E0F001E0F001E07801E07801E07801E07801E -07801E07BC1E07BC1E07BC7F83F8FFC1F87F80F0161C7F9B18>82 -D<7FFFF8FFFFF8FFFFF8F07878F07878F07878F078780078000078000078000078000078 -000078000078000078000078000078000078000078000078000078000078000078000078 -0000780007FF8007FF8007FF80151C7F9B18>84 D<FFC7FEFFC7FEFFC7FE1E00F01E00F0 -1E00F01E00F01E00F01E00F01E00F01E00F01E00F01E00F01E00F01E00F01E00F01E00F0 -1E00F01E00F01E00F01E00F01E00F00F01E00F01E007C7C003FF8001FF00007C00171C80 -9B18>I<FF07F8FF8FF8FF07F83C01E01E03C01E03C01E03C01E03C00F07800F07800F07 -800F07800F0780078F00078F00078F00078F00038E00038E0003DE0003DE0001DC0001DC -0001DC0001FC0001FC0000F80000F800151C7F9B18>I<FE03F8FE03F8FE03F870007070 -00707000703800E03800E03800E03800E03800E038F8E039FCE039DCE039DCE019DCC019 -DCC019DCC0198CC0198CC01D8DC01D8DC01D8DC01D05C00F07800F07800F07800E038015 -1C7F9B18>I<FFFCFFFCFFFCF000F000F000F000F000F000F000F000F000F000F000F000 -F000F000F000F000F000F000F000F000F000F000F000F000F000F000F000F000F000F000 -FFFCFFFCFFFC0E24789F18>91 D<600000F00000F00000F800007800007C00003C00003C -00003E00001E00001F00000F00000F00000F800007800007C00003C00003C00003E00001 -E00001F00000F00000F800007800007800007C00003C00003E00001E00001E00001F0000 -0F00000F8000078000078000030011247D9F18>I<FFFCFFFCFFFC003C003C003C003C00 -3C003C003C003C003C003C003C003C003C003C003C003C003C003C003C003C003C003C00 -3C003C003C003C003C003C003C003CFFFCFFFCFFFC0E247F9F18>I<03800FE03FF8FFFE -FC7EF01E40040F077C9B18>I<7FFFC0FFFFE0FFFFE07FFFC013047E7F18>I<061E3E3870 -70E0E0E0F8FC7C7C38070E789E18>I<0FF0003FFC007FFE007C1F007C0F003807800007 -8000FF8007FF801FFF807F87807C0780F00780F00780F00780F807807C1F803FFFF81FFB -F807E1F815147E9318>I<7F0000FF00007F00000F00000F00000F00000F00000F00000F -3E000FFF800FFFE00FC1F00F80F00F00780F00780F003C0F003C0F003C0F003C0F003C0F -003C0F00780F80780F80F00FC1F00FFFE00FFF80073E00161C809B18>I<01FC0007FF00 -1FFF803E0F803C0F80780700780000F00000F00000F00000F00000F00000F00000780000 -7803C03C03C03E07C01FFF8007FF0001FC0012147D9318>I<001FC0003FC0001FC00003 -C00003C00003C00003C00003C001F3C007FFC01FFFC03E0FC03C07C07803C07803C0F003 -C0F003C0F003C0F003C0F003C0F003C07803C07807C03C07C03E1FC01FFFF807FBFC01F3 -F8161C7F9B18>I<01F80007FE000FFF001F0F803C03C07803C07801C0F001E0F001E0FF -FFE0FFFFE0FFFFE0F000007800007801E03C01E01F03E00FFFC007FF8000FE0013147E93 -18>I<001F80007FC000FFE000F3E001E3E001E08001E00001E0007FFFC0FFFFC0FFFFC0 -01E00001E00001E00001E00001E00001E00001E00001E00001E00001E00001E00001E000 -01E00001E0007FFF807FFF807FFF80131C7F9B18>I<03F1E00FFFF01FFFF83E1F783C0F -307807807807807807807807807807803C0F003E1F003FFE003FFC003BF0003800003800 -001FFE001FFFC03FFFE07801F0700070E00038E00038E00038E000387800F07E03F01FFF -C00FFF8001FC00151F7F9318>I<7F0000FF00007F00000F00000F00000F00000F00000F -00000F1F000F7F800FFFC00FE1C00FC1E00F81E00F01E00F01E00F01E00F01E00F01E00F -01E00F01E00F01E00F01E00F01E00F01E07FE3FCFFF3FE7FE3FC171C809B18>I<01C000 -03E00003E00003E00001C0000000000000000000000000007FE000FFE0007FE00001E000 -01E00001E00001E00001E00001E00001E00001E00001E00001E00001E00001E00001E000 -01E000FFFF80FFFF80FFFF80111D7D9C18>I<001C003E003E003E001C00000000000000 -000FFE0FFE0FFE001E001E001E001E001E001E001E001E001E001E001E001E001E001E00 -1E001E001E001E001E001E001E701CF83CF878FFF87FF01FC00F277E9C18>I<7E0000FE -00007E00000E00000E00000E00000E00000E00000E3FF00E3FF00E3FF00E07800E0F000E -1E000E3C000E78000EF0000FF8000FFC000F9C000F0E000E0F000E07000E03800E03C07F -C7F8FFC7F87FC7F8151C7F9B18>I<FFE000FFE000FFE00001E00001E00001E00001E000 -01E00001E00001E00001E00001E00001E00001E00001E00001E00001E00001E00001E000 -01E00001E00001E00001E00001E00001E000FFFFC0FFFFC0FFFFC0121C7D9B18>I<F9C1 -C0FFF7F0FFFFF03E3E383C3C383C3C383838383838383838383838383838383838383838 -38383838383838383838383838FE3E3EFE7E7EFE3E3E1714809318>I<7F1F00FF7F807F -FFC00FE1C00FC1E00F81E00F01E00F01E00F01E00F01E00F01E00F01E00F01E00F01E00F -01E00F01E00F01E07FE3FCFFF3FE7FE3FC1714809318>I<01F0000FFE001FFF003E0F80 -3C07807803C07803C0F001E0F001E0F001E0F001E0F001E0F001E07803C07803C03C0780 -3F1F801FFF000FFE0001F00013147E9318>I<7F3E00FFFF807FFFE00FC1F00F80F00F00 -780F00780F003C0F003C0F003C0F003C0F003C0F003C0F00780F80780F80F00FC1F00FFF -E00FFF800F3E000F00000F00000F00000F00000F00000F00000F00007FE000FFF0007FE0 -00161E809318>I<01F9E007FDE00FFFE01F0FE03C07E07803E07801E0F001E0F001E0F0 -01E0F001E0F001E0F001E07801E07803E03C07E03E0FE01FFFE007FDE001F1E00001E000 -01E00001E00001E00001E00001E00001E0000FFC001FFE000FFC171E7F9318>I<FF87E0 -FF9FF0FFBFF807F87807F03007E00007C00007C000078000078000078000078000078000 -078000078000078000078000FFFE00FFFF00FFFE0015147F9318>I<07FF003FFF007FFF -00700F00E00F00E00F00F000007E00007FF0001FFC0007FF00003F00700780F00380F003 -80F80380FC0F00FFFF00FFFC00E7F00011147D9318>I<03800007800007800007800007 -80007FFFC0FFFFC0FFFFC007800007800007800007800007800007800007800007800007 -80000780C00781E00781E00781E003C3C003FFC001FF00007E0013197F9818>I<7F0FE0 -FF1FE07F0FE00F01E00F01E00F01E00F01E00F01E00F01E00F01E00F01E00F01E00F01E0 -0F01E00F01E00F03E00F07E007FFFC03FFFE01F9FC1714809318>I<7F8FF0FF8FF87F8F -F01C01C00E03800E03800E0380070700070700070700078F00038E00038E0003DE0001DC -0001DC0001DC0000F80000F80000700015147F9318>I<FF07F8FF8FF8FF07F83800E038 -00E03800E03800E01C01C01C71C01CF9C01CF9C01CF9C01DDDC00DDD800DDD800DDD800F -8F800F8F800F8F8007070015147F9318>I<7F8FF07F9FF07F8FF00F0700078E00039E00 -01DC0001F80000F80000700000F00000F80001DC00039E00038E000707000E07807F8FF0 -FF8FF87F8FF015147F9318>I<7F8FF0FF8FF87F8FF00E01C00E03800E03800703800707 -00070700038700038700038E0001CE0001CE0001CC0000DC0000FC000078000078000078 -0000700000700000700000F0007CE0007DE00073C0007F80003F00001E0000151E7F9318 ->I<3FFFF07FFFF07FFFF07803E07807C0780F80001F00003E00007C0000F80001F00003 -E00007C0000F80F01F00F03E00F07C00F0FFFFF0FFFFF0FFFFF014147F9318>I<0007E0 -001FE0007FE0007C0000F00000F00000F00000F00000F00000F00000F00000F00000F000 -00F00000F00001F0007FE000FFC000FFC0007FE00001F00000F00000F00000F00000F000 -00F00000F00000F00000F00000F00000F00000F000007C00007FE0001FE00007E013247E -9F18>I<60F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0 -F0F0F0600424769F18>I<7E0000FF8000FFE00003E00000F00000F00000F00000F00000 -F00000F00000F00000F00000F00000F00000F00000F800007FC0003FE0003FE0007FC000 -F80000F00000F00000F00000F00000F00000F00000F00000F00000F00000F00000F00003 -E000FFE000FF80007E000013247E9F18>I<0E0C1F1E3FBEFBF8F1F060E00F067C9B18>I -E /Fm 34 122 df<00001FE000007FF00001C03800018078000380780007003000070000 -0007000000070000000E0000000E0000000E000000FFFFE000FFFFE0001C01C0001C01C0 -001C01C0001C01C0001C0380003803800038038000380380003807000038070000780700 -0070071800700E3000700E3000700E3000600E6000E007E000E003C000E0000000E00000 -01C0000001C00000318000007B800000F30000007E0000003C0000001D29829F1A>12 -D<00003FC0FF800000FFE3FFC00001C1E700E0000381EE01E0000380DC01E00007001C00 -C0000700180000000700380000000700380000000E00380000000E00380000000E007000 -0000FFFFFFFF8000FFFFFFFF80000E00700700001C00700700001C00700700001C00E007 -00001C00E00E00001C00E00E00003800E00E00003800E00E00003801C01C00003801C01C -00003801C01C00007001C01C60007001C038C00070038038C00070038038C00070038039 -8000E003801F8000E003000F0000E00700000000E00700000001C00700000001C00E0000 -0031860E000000798F1C000000F31E380000007E0FF00000003C07C00000002B29829F28 ->14 D<1C3E7E7E3E060C0C18183060C080070E769F0E>39 D<000200060006000E003C00 -FC03DC031C0038003800380038007000700070007000E000E000E000E001C001C001C001 -C00380038003800380FFF8FFF80F1E7B9D17>49 D<070F1F1F0E00000000000000000000 -70F8F8F0E008147B930E>58 D<0000FE020007FF06001F818C003E00DC0078007C00F000 -7C01E0003803C00038078000380F8000381F0000301F0000303E0000303E0000007C0000 -007C0000007C0000007C000000F8000000F8000000F8000000F80000C0F8000180780001 -8078000300780003003C0006003C000C001E0018000F00300007C0E00003FF800000FE00 -001F217A9F21>67 D<01FFFFFC01FFFFF8001E0078001E0038001E0038003C0018003C00 -18003C0018003C003000780C3000780C3000780C0000781C0000F0380000FFF80000FFF8 -0000F0380001E0300001E0300001E0300001E0300003C0000003C0000003C0000003C000 -0007800000078000000780000007800000FFFC0000FFF800001E1F7D9E1E>70 -D<00FF007FE001FF00FFC0001F001E00001F800C00001F800C0000378018000033C01800 -0033C018000033C018000063C030000061E030000061E030000061E0300000C0F0600000 -C0F0600000C0F0600000C0786000018078C000018078C00001803CC00001803CC0000300 -3D800003001F800003001F800003001F800006000F000006000F000006000F00000E000F -0000FFC0060000FFC0060000231F7D9E22>78 D<01FFFF8001FFFFE0001E01F0001E0078 -001E0078003C007C003C007C003C007C003C007C007800F8007800F8007800F0007801E0 -00F003C000F00F8000FFFF0000FFF80001E0000001E0000001E0000001E0000003C00000 -03C0000003C0000003C0000007800000078000000780000007800000FFF80000FFF00000 -1E1F7D9E1F>80 D<0007E040001FF8C0003C1D8000700F8000E0078001C0078001800300 -038003000380030003800300038000000380000003C0000003F8000001FF800001FFE000 -007FF000001FF0000001F800000078000000380000003800000038003000380030003800 -3000300070007000700060007800E0007801C000EE078000C7FE000081F800001A217D9F -1A>83 D<00F18003FDC0078F800E07801C07803C07803C0700780700780700780700F00E -00F00E00F00E00F00E30F01C60F03C60707C6078FCC03FCFC00F070014147C9317>97 -D<07803F803F000700070007000E000E000E000E001C001C001CF01FFC3F1E3E0E3C0F38 -0F700F700F700F700FE01EE01EE01EE03CE03CE038607071E03FC01F0010207B9F15>I< -007E0001FF000383800F07801E07801C07003C0200780000780000780000F00000F00000 -F00000F00000F00000700200700700381E001FF80007E00011147C9315>I<0000780003 -F80003F00000700000700000700000E00000E00000E00000E00001C00001C000F1C003FD -C0078F800E07801C07803C07803C0700780700780700780700F00E00F00E00F00E00F00E -30F01C60F03C60707C6078FCC03FCFC00F070015207C9F17>I<007C0001FF000783000F -01801E01803C01803C0300780E007FFC007FE000F00000F00000F00000F0000070000070 -02007807003C1E001FF80007E00011147C9315>I<0000F80001FC0003BC00033C000718 -000700000700000E00000E00000E00000E00000E0000FFE001FFE0001C00001C00001C00 -00380000380000380000380000380000700000700000700000700000700000E00000E000 -00E00000E00000E00001C00001C00001C0000180003380007B8000F300007E00003C0000 -1629829F0E>I<003C6000FF7001E3E00381E00701E00F01E00F01C01E01C01E01C01E01 -C03C03803C03803C03803C03803C07003C0F001C1F001E3F000FFE0003CE00000E00000E -00001C00001C00301C00783800F0F0007FE0003F8000141D7E9315>I<01E0000FE0000F -C00001C00001C00001C000038000038000038000038000070000070000073E00077F000E -C3800F81C00F01C00E01C01E03801C03801C03801C0380380700380700380700380E1870 -0E30700E30701C60700C60E00FC060078015207D9F17>I<006000F000F000E000000000 -000000000000000000000F001F80318031C063806380C3800700070007000E000E000E00 -1C301C601C6038C018C01F800F000C1F7D9E0E>I<0001800003C00003C0000380000000 -000000000000000000000000000000000000003C00007E0000C700018700030700030700 -060E00000E00000E00000E00001C00001C00001C00001C00003800003800003800003800 -00700000700000700000700000E00000E00030E00079C000F380007F00003C0000122882 -9E0E>I<01E0000FE0000FC00001C00001C00001C0000380000380000380000380000700 -000700000703C00707E00E0C600E18E00E31E00E61E01CC1C01F80001F00001FC00039E0 -003870003870003838607070C07070C07070C0703980E03F00601E0013207D9F15>I<03 -C01FC01F8003800380038007000700070007000E000E000E000E001C001C001C001C0038 -003800380038007000700070007180E300E300E300E6007E003C000A207C9F0C>I<1E07 -C0F8003F1FE1FC0033B8730E0063E076070063C03C07006380380700C780780E00070070 -0E000700700E000700700E000E00E01C000E00E01C000E00E01C000E00E038601C01C038 -C01C01C038C01C01C071801C01C031803803803F001801801E0023147D9325>I<1E07C0 -3F1FE033B87063E07063C038638038C780700700700700700700700E00E00E00E00E00E0 -0E01C31C01C61C01C61C038C1C018C3801F81800F018147D931A>I<007C0001FF000383 -800F01C01E01C01C01E03C01E07801E07801E07801E0F003C0F003C0F003C0F00780F007 -00700F00701E003838001FF00007C00013147C9317>I<01C1E007E7F8067E3C0C7C1C0C -781E0C701E18E01E00E01E00E01E00E01E01C03C01C03C01C03C01C07803C07803C07003 -C0E003E3C0077F80071E000700000700000E00000E00000E00000E00001C0000FFC000FF -8000171D809317>I<0E0F003F3F8033F1C063C1C063C3C06383C0C78380070000070000 -0700000E00000E00000E00000E00001C00001C00001C00001C000038000018000012147D -9313>114 D<00FC03FE07070E0F0E0F0E0E1E000F800FF007F803FC003E001E701EF01C -F01CE03860703FE01F8010147D9313>I<018001C0038003800380038007000700FFF0FF -F00E000E000E000E001C001C001C001C0038003800380038307060706070C071803F001E -000C1C7C9B0F>I<0F00601F80703180E031C0E06380E06380E0C381C00701C00701C007 -01C00E03800E03800E03800E038C0E07180E07180E0F180E1F3007F3F003E1C016147D93 -18>I<0F01C01F83C03183E031C1E06380E06380E0C380C00700C00700C00700C00E0180 -0E01800E01800E03000E03000E06000E06000F0C0007F80001E00013147D9315>I<0F00 -60E01F8071E03180E1F031C0E0F06380E0706380E070C381C0600701C0600701C0600701 -C0600E0380C00E0380C00E0380C00E0381800E0381800E0781800E078300070F860007F9 -FC0001F0F8001C147D931E>I<0787800FCFC018F8E03070E06071E06071E0C0E1C000E0 -0000E00000E00001C00001C00001C00071C060F380C0F380C0E38180C7C3007CFE00387C -0013147D9315>I<0F00601F80703180E031C0E06380E06380E0C381C00701C00701C007 -01C00E03800E03800E03800E03800E07000E07000E0F000E1F0007FE0003EE00000E0000 -0E00001C00781C0078380070700060E0003FC0001F0000141D7D9316>I -E /Fn 74 123 df<001FC1F0007FF7F801F07E7C03C0FC7C0780FC7C0F00F8380F007800 -0F0078000F0078000F0078000F0078000F007800FFFFFF80FFFFFF800F0078000F007800 -0F0078000F0078000F0078000F0078000F0078000F0078000F0078000F0078000F007800 -0F0078000F0078000F0078000F0078000F0078007FE3FF807FE3FF801E20809F1B>11 -D<001F8000FFC001E0E003C0F00781F00F01F00F00E00F00000F00000F00000F00000F00 -00FFFFF0FFFFF00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00 -F00F00F00F00F00F00F00F00F00F00F00F00F07FC3FE7FC3FE1720809F19>I<001FB000 -FFF001E1F003C1F00781F00F00F00F00F00F00F00F00F00F00F00F00F00F00F0FFFFF0FF -FFF00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F -00F00F00F00F00F00F00F00F00F07FE7FE7FE7FE1720809F19>I<001FC0FC00007FE7FE -0001F07F070003C0FE07800780FC0F800F00F80F800F007807000F007800000F00780000 -0F007800000F007800000F00780000FFFFFFFF80FFFFFFFF800F007807800F007807800F -007807800F007807800F007807800F007807800F007807800F007807800F007807800F00 -7807800F007807800F007807800F007807800F007807800F007807800F007807807FE3FF -3FF07FE3FF3FF02420809F26>I<070F1F1E3C78F0E0400809779F17>19 -D<7038F87CFC7EFC7E7C3E0C060C060C06180C180C381C3018603040200F0E7F9F17>34 -D<70F8FCFC7C0C0C0C181838306040060E7C9F0D>39 D<006000C001800380070006000E -001C001C003C003800380078007000700070007000F000F000F000F000F000F000F000F0 -00F000F000F000F00070007000700070007800380038003C001C001C000E000600070003 -80018000C000600B2E7CA112>I<C0006000300038001C000C000E000700070007800380 -038003C001C001C001C001C001E001E001E001E001E001E001E001E001E001E001E001E0 -01C001C001C001C003C0038003800780070007000E000C001C00380030006000C0000B2E -7EA112>I<70F8F8F878181818183030606040050E7C840D>44 D<FFF0FFF0FFF00C0380 -8B0F>I<70F8F8F87005057C840D>I<0000400000C0000180000180000180000300000300 -000300000600000600000C00000C00000C00001800001800001800003000003000006000 -00600000600000C00000C00000C000018000018000018000030000030000060000060000 -0600000C00000C00000C0000180000180000300000300000300000600000600000600000 -C00000C00000122D7EA117>I<03F0000FFC001E1E001C0E003807007807807003807003 -80700380F003C0F003C0F003C0F003C0F003C0F003C0F003C0F003C0F003C0F003C0F003 -C0F003C0F003C07003807003807003807807803807001C0E001E1E000FFC0003F000121F -7E9D17>I<00C001C00FC0FFC0F3C003C003C003C003C003C003C003C003C003C003C003 -C003C003C003C003C003C003C003C003C003C003C003C003C07FFF7FFF101E7D9D17>I< -07F0000FFC00383E00700F00600F80F80780FC07C0FC07C0FC03C07803C03003C00007C0 -000780000780000F00001E00001C0000380000700000E00001C0000380000300C00600C0 -0C00C01801C03FFF807FFF80FFFF80FFFF80121E7E9D17>I<03F0000FFC001C1E00300F -00780F807C0F807C07807C0F803C0F80000F00000F00001E00007C0007F00007F000003C -00000E00000F000007800007800007C03007C07807C0FC07C0FC07C0FC0780780F80700F -003C1E001FFC0007F000121F7E9D17>I<000700000700000F00001F00001F00003F0000 -7F0000EF0000CF0001CF00038F00030F00070F000E0F000C0F00180F00380F00300F0060 -0F00E00F00FFFFF0FFFFF0000F00000F00000F00000F00000F00000F0000FFF000FFF014 -1E7F9D17>I<3003003FFF003FFE003FF8003FE000300000300000300000300000300000 -30000031F00037FC003E1E00380F00380F003007800007800007C00007C00007C07807C0 -F807C0F807C0F80780F00780600F00700E00383C001FF80007E000121F7E9D17>I<007C -0001FE000783000E07800C0F801C0F80380700380000780000700000700000F1F800F3FE -00F40E00F80700F80380F80380F003C0F003C0F003C0F003C0F003C07003C07003C07003 -803803803807001C07000E1E0007FC0001F000121F7E9D17>I<6000007FFFE07FFFE07F -FFC07FFFC0E00180C00300C00300C00600000C0000180000180000300000700000600000 -E00000E00001E00001C00001C00003C00003C00003C00003C00007C00007C00007C00007 -C00007C00007C000038000131F7E9D17>I<03F0000FFC001C1E00380700300700700380 -7003807003807803807C07007F07003F8E001FFC000FF80007FC0007FE001EFF00387F80 -701F80700FC0E003C0E003C0E001C0E001C0E001C0F001807003803807001E0E000FFC00 -03F000121F7E9D17>I<03F00007F8001E1C00380E00380700700700700380F00380F003 -80F003C0F003C0F003C0F003C0F003C07007C07007C03807C01C0BC01FF3C007E3C00003 -800003800007800007003807007C0E007C0E00781C003078001FF0000FC000121F7E9D17 ->I<70F8F8F8700000000000000000000070F8F8F87005147C930D>I<70F8F8F870000000 -0000000000000070F8F8F878181818183030606040051D7C930D>I<FFFFFFFCFFFFFFFC -0000000000000000000000000000000000000000000000000000000000000000FFFFFFFC -FFFFFFFC1E0C7E9023>61 D<0003800000038000000380000007C0000007C0000007C000 -000FE000000FE000000FE0000019F0000019F0000019F0000030F8000030F8000030F800 -00607C0000607C0000607C0000C03E0000C03E0000C03E0001FFFF0001FFFF0001801F00 -03000F8003000F8003000F80060007C0060007C01F0007E0FFC03FFEFFC03FFE1F207F9F -22>65 D<FFFFE000FFFFF8000F803E000F801E000F801F000F800F800F800F800F800F80 -0F800F800F800F800F800F000F801F000F803E000F807C000FFFF8000FFFFC000F801F00 -0F800F800F8007C00F8003C00F8003E00F8003E00F8003E00F8003E00F8003E00F8007C0 -0F8007C00F800F800F803F00FFFFFE00FFFFF8001B1F7E9E20>I<000FE010007FF83000 -F80E7003E00370078001F00F0000F01F0000F01E0000703C0000703C0000707C00003078 -000030F8000030F8000000F8000000F8000000F8000000F8000000F8000000F8000000F8 -000000780000307C0000303C0000303C0000301E0000601F0000600F0000C00780018003 -E0030000F80E00007FFC00000FE0001C217E9F21>I<FFFFFF80FFFFFF800F800F800F80 -03800F8003800F8001800F8001C00F8000C00F8000C00F80C0C00F80C0C00F80C0000F80 -C0000F81C0000FFFC0000FFFC0000F81C0000F80C0000F80C0000F80C0600F80C0600F80 -00600F8000C00F8000C00F8000C00F8001C00F8001C00F8003C00F800F80FFFFFF80FFFF -FF801B1F7E9E1F>69 D<FFFFFF80FFFFFF8007C00F8007C0038007C0018007C0018007C0 -01C007C000C007C000C007C060C007C060C007C0600007C0600007C0E00007FFE00007FF -E00007C0E00007C0600007C0600007C0600007C0600007C0000007C0000007C0000007C0 -000007C0000007C0000007C0000007C00000FFFF0000FFFF00001A1F7F9E1E>I<000FE0 -10007FF83000F80E7003E00370078001F00F0000F01F0000F01E0000703C0000703C0000 -707C00003078000030F8000030F8000000F8000000F8000000F8000000F8000000F80000 -00F8007FFEF8007FFE780001F07C0001F03C0001F03C0001F01E0001F01F0001F00F0001 -F007C001F003E003F000FC0E70007FFC10000FF0001F217E9F24>I<FFF8FFF8FFF8FFF8 -0F800F800F800F800F800F800F800F800F800F800F800F800F800F800F800F800F800F80 -0F800F800F800F800F800F800FFFFF800FFFFF800F800F800F800F800F800F800F800F80 -0F800F800F800F800F800F800F800F800F800F800F800F800F800F800F800F800F800F80 -FFF8FFF8FFF8FFF81D1F7E9E22>I<FFF8FFF80F800F800F800F800F800F800F800F800F -800F800F800F800F800F800F800F800F800F800F800F800F800F800F800F800F800F800F -80FFF8FFF80D1F7F9E10>I<FFFC00FFFC000F80000F80000F80000F80000F80000F8000 -0F80000F80000F80000F80000F80000F80000F80000F80000F80000F80000F80000F8006 -0F80060F80060F80060F800E0F800E0F800C0F801C0F803C0F80FCFFFFFCFFFFFC171F7E -9E1C>76 D<FFC0000FFEFFE0001FFE07E0001FC007E0001FC006F00037C006F00037C006 -F00037C006780067C006780067C006780067C0063C00C7C0063C00C7C0063C00C7C0061E -0187C0061E0187C0060F0307C0060F0307C0060F0307C006078607C006078607C0060786 -07C00603CC07C00603CC07C00603CC07C00601F807C00601F807C00601F807C00600F007 -C00F00F007C0FFF0F0FFFEFFF060FFFE271F7F9E2A>I<FF801FF8FFC01FF80FE003C00F -E001800DF001800DF001800CF801800CFC01800C7C01800C3E01800C3F01800C1F01800C -0F81800C0FC1800C07C1800C07E1800C03E1800C01F1800C01F9800C00F9800C007D800C -007F800C003F800C001F800C001F800C000F800C000F800C0007801E000380FFC00380FF -C001801D1F7E9E22>I<001FE000007FF80001F03E0003C00F00078007800F0003C01E00 -01E03E0001F03C0000F07C0000F87C0000F878000078F800007CF800007CF800007CF800 -007CF800007CF800007CF800007CF800007CF800007C7C0000F87C0000F87C0000F83C00 -00F03E0001F01E0001E00F0003C00780078003C00F0001F03E00007FF800001FE0001E21 -7E9F23>I<FFFFE000FFFFF8000F803E000F801F000F800F800F8007800F8007C00F8007 -C00F8007C00F8007C00F8007C00F8007800F800F800F801F000F803E000FFFF8000FFFE0 -000F8000000F8000000F8000000F8000000F8000000F8000000F8000000F8000000F8000 -000F8000000F8000000F800000FFF80000FFF800001A1F7E9E1F>I<FFFF8000FFFFF000 -0F807C000F803E000F801F000F800F000F800F800F800F800F800F800F800F800F800F00 -0F801F000F803E000F807C000FFFF0000FFFE0000F81F8000F807C000F807C000F803E00 -0F803E000F803E000F803E000F803E000F803E000F803E000F803E0C0F803E0C0F801F0C -FFF80F18FFF807F8000001F01E207E9E21>82 D<03F0400FFCC01E0FC03807C07803C070 -01C0F001C0F000C0F000C0F000C0F80000FC00007F00007FF0003FFE001FFF000FFF8003 -FFC0007FE00007E00003F00001F00000F0C000F0C000F0C000F0E000E0E000E0F001E0F8 -01C0FE0780C7FF0081FC0014217E9F19>I<7FFFFFE07FFFFFE07C0F81E0700F80E0600F -8060600F8060E00F8070C00F8030C00F8030C00F8030C00F8030000F8000000F8000000F -8000000F8000000F8000000F8000000F8000000F8000000F8000000F8000000F8000000F -8000000F8000000F8000000F8000000F8000000F8000000F800003FFFE0003FFFE001C1F -7E9E21>I<FFF81FF8FFF81FF80F8003C00F8001800F8001800F8001800F8001800F8001 -800F8001800F8001800F8001800F8001800F8001800F8001800F8001800F8001800F8001 -800F8001800F8001800F8001800F8001800F8001800F8001800F80018007800300078003 -0003C0030003C0060001E00C0000F83800003FF000000FC0001D207E9E22>I<FFF807FE -FFF807FE0F8000F00F8000E007C000C007C000C007C000C003E0018003E0018003F00180 -01F0030001F0030001F8070000F8060000F8060000FC0E00007C0C00007C0C00003E1800 -003E1800003E1800001F3000001F3000001FB000000FE000000FE000000FE0000007C000 -0007C0000003800000038000000380001F207F9E22>I<FFF8FFF83FF0FFF8FFF83FF01F -800F8007800F800F8003000F8007C003000FC007C0070007C007C0060007C00FE0060007 -E00FE00E0003E00FE00C0003E01FF00C0003E019F00C0001F019F0180001F019F0180001 -F030F8180000F830F8300000F830F8300000F8607C3000007C607C6000007C607C600000 -7CC03E6000007EC03EE000003EC03EC000003FC03FC000003F801FC000001F801F800000 -1F801F8000001F000F8000000F000F0000000F000F0000000E000700000006000600002C -207F9E2F>I<FFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0 -C0C0C0C0C0C0C0C0C0C0C0C0C0FFFF082D7CA10D>91 D<0804180C3018703860306030C0 -60C060C060F87CFC7EFC7E7C3E381C0F0E7A9F17>I<FFFF030303030303030303030303 -0303030303030303030303030303030303030303030303030303030303FFFF082D80A10D ->I<0FE0003FF8007C3C007C1E007C0F00380F00000F00000F0001FF000FCF003E0F0078 -0F00780F00F00F30F00F30F00F30F01F30783FF03FC7E00F83C014147E9317>97 -D<1E0000FE0000FE00001E00001E00001E00001E00001E00001E00001E00001E00001E00 -001E3F001EFFC01FC1E01F00F01E00701E00781E00381E003C1E003C1E003C1E003C1E00 -3C1E003C1E00381E00781E00701F00F01D83E01CFF80183E0016207F9F19>I<01F80007 -FE001E1F003C1F00381F00780E00700000F00000F00000F00000F00000F00000F0000078 -00007800003C01803C03801F070007FE0001F80011147F9314>I<0001E0000FE0000FE0 -0001E00001E00001E00001E00001E00001E00001E00001E00001E003F1E007FDE01F07E0 -3C03E03801E07801E07001E0F001E0F001E0F001E0F001E0F001E0F001E07001E07801E0 -3801E03C03E01E0FE00FFDFC03F1FC16207F9F19>I<03F0000FFC001E1E003C0F003807 -00780700700380F00380FFFF80FFFF80F00000F00000F000007000007800003801803C03 -801F070007FE0001F80011147F9314>I<003E0000FF0003CF80078F80078F800F07000F -00000F00000F00000F00000F00000F0000FFF000FFF0000F00000F00000F00000F00000F -00000F00000F00000F00000F00000F00000F00000F00000F00000F00000F00000F00007F -F0007FF0001120809F0E>I<0000E003E3F00FFE701C1C70380E60780F00780F00780F00 -780F00780F00380E001C1C001FF80033E0002000003000003000003FFE003FFF801FFFC0 -1FFFE07001E06000F0E00070E00070E000707000E07801E03E07C00FFF0003FC00141F7F -9417>I<1E0000FE0000FE00001E00001E00001E00001E00001E00001E00001E00001E00 -001E00001E1F001E7F801EC3C01F81E01F01E01E01E01E01E01E01E01E01E01E01E01E01 -E01E01E01E01E01E01E01E01E01E01E01E01E01E01E0FFC7FCFFC7FC16207F9F19>I<1C -003E003E003E001C000000000000000000000000001E00FE00FE001E001E001E001E001E -001E001E001E001E001E001E001E001E001E001E00FFC0FFC00A1F7F9E0D>I<007000F8 -00F800F80070000000000000000000000000007807F807F800F800780078007800780078 -007800780078007800780078007800780078007800780078007800787078F878F8F0F9E0 -7FC03F000D28839E0E>I<1E0000FE0000FE00001E00001E00001E00001E00001E00001E -00001E00001E00001E00001E1FF01E1FF01E0F801E0E001E0C001E18001E30001E70001E -F0001FF8001F78001E3C001E3E001E1E001E1F001E0F801E07801E07C0FFCFF8FFCFF815 -207F9F18>I<1E00FE00FE001E001E001E001E001E001E001E001E001E001E001E001E00 -1E001E001E001E001E001E001E001E001E001E001E001E001E001E001E00FFC0FFC00A20 -7F9F0D>I<1E1F80FC00FE7FC3FE00FEC1E60F001F80FC07801F00F807801E00F007801E -00F007801E00F007801E00F007801E00F007801E00F007801E00F007801E00F007801E00 -F007801E00F007801E00F007801E00F007801E00F00780FFC7FE3FF0FFC7FE3FF024147F -9327>I<1E1F00FE7F80FEC3C01F81E01F01E01E01E01E01E01E01E01E01E01E01E01E01 -E01E01E01E01E01E01E01E01E01E01E01E01E01E01E0FFC7FCFFC7FC16147F9319>I<01 -F80007FE001E07803C03C03801C07000E07000E0F000F0F000F0F000F0F000F0F000F0F0 -00F07000E07801E03801C03C03C01E078007FE0001F80014147F9317>I<1E3F00FEFFC0 -FFC3E01F00F01E00701E00781E00781E003C1E003C1E003C1E003C1E003C1E003C1E0078 -1E00781E00F01F00F01F83E01EFF801E3E001E00001E00001E00001E00001E00001E0000 -1E0000FFC000FFC000161D7F9319>I<01F06007FCE01F0EE03C03E03C03E07801E07801 -E0F001E0F001E0F001E0F001E0F001E0F001E07801E07801E03803E03C03E01F0FE00FFD -E003F1E00001E00001E00001E00001E00001E00001E00001E0000FFC000FFC161D7F9318 ->I<1E78FEFCFF9E1F1E1F0C1F001E001E001E001E001E001E001E001E001E001E001E00 -1E00FFE0FFE00F147F9312>I<0FC83FF870386018E018E018F000FF807FE03FF81FFC01 -FC003EC00EC00EE00EE00CF83CDFF887E00F147F9312>I<06000600060006000E000E00 -1E003E00FFF8FFF81E001E001E001E001E001E001E001E001E001E001E0C1E0C1E0C1E0C -1E0C0F1807F003E00E1C7F9B12>I<1E01E0FE0FE0FE0FE01E01E01E01E01E01E01E01E0 -1E01E01E01E01E01E01E01E01E01E01E01E01E01E01E01E01E03E01E03E00E0DE007F9FC -03F1FC16147F9319>I<FFC7F8FFC7F81E01E01F01C00F01800F01800783000783000783 -0003C60003C60003C60001EC0001EC0001FC0000F80000F8000070000070000070001514 -7F9318>I<FF9FF3FCFF9FF3FC1E03C0F01E03C0601F03C0E00F07C0C00F07E0C00F87E1 -C0078CE180078CF18007CCF38003D8730003D87B0003F87F0001F03E0001F03E0001F03E -0000E01C0000E01C0000E01C001E147F9321>I<7FE7FC7FE7FC0F83E007838003C30003 -E70001EE0000FC00007800007800003C00007E0000FE0001CF000187800387800703C00F -03E0FF87FEFF87FE1714809318>I<FFC7F8FFC7F81E01E01F01C00F01800F0180078300 -07830007830003C60003C60003C60001EC0001EC0001FC0000F80000F800007000007000 -00700000600000600000600070C000F8C000C18000E380007F00003C0000151D7F9318> -I<7FFF7FFF781E703E603C607860F861F001E003E007C007830F831F031E073C067C0678 -1EFFFEFFFE10147F9314>I E /Fo 41 122 df<0001FF0000001FFFC000007F81E00000 -FC01E00001F807F00003F807F00007F007F00007F007F00007F007F00007F007F00007F0 -01C00007F000000007F000000007F000000007F03FF800FFFFFFF800FFFFFFF800FFFFFF -F80007F003F80007F003F80007F003F80007F003F80007F003F80007F003F80007F003F8 -0007F003F80007F003F80007F003F80007F003F80007F003F80007F003F80007F003F800 -07F003F80007F003F80007F003F80007F003F80007F003F80007F003F80007F003F8007F -FF3FFF807FFF3FFF807FFF3FFF80212A7FA925>12 D<000E00001E00007E0007FE00FFFE -00FFFE00F8FE0000FE0000FE0000FE0000FE0000FE0000FE0000FE0000FE0000FE0000FE -0000FE0000FE0000FE0000FE0000FE0000FE0000FE0000FE0000FE0000FE0000FE0000FE -0000FE0000FE0000FE0000FE0000FE0000FE0000FE00FFFFFEFFFFFEFFFFFE17277BA622 ->49 D<00FF800007FFF0001FFFFC003E07FE007E01FF807F007F80FF807FC0FF803FC0FF -803FE0FF801FE0FF801FE07F001FE03E003FE000003FE000003FC000003FC000007F8000 -007F000000FE000000FC000001F8000003F0000007C000000F8000001F0000003C000000 -7800E0007000E000E000E001C001C0030001C0060001C00FFFFFC01FFFFFC03FFFFFC07F -FFFFC0FFFFFF80FFFFFF80FFFFFF801B277DA622>I<007F800003FFF00007FFFC000F81 -FE001F00FF001F80FF003FC07F803FC07F803FC07F803FC07F801FC07F800F80FF000000 -FF000000FE000001FC000003F8000007F00000FF800000FFC0000001F8000000FE000000 -7F0000007F8000003FC000003FC000003FE01C003FE07F003FE07F003FE0FF803FE0FF80 -3FE0FF803FC0FF803FC07F007F807E00FF003F01FE001FFFFC0007FFF00000FF80001B27 -7DA622>I<00000F0000000F0000001F0000003F0000007F000000FF000001FF000001FF -000003BF0000073F00000E3F00001C3F00003C3F0000383F0000703F0000E03F0001C03F -0003803F0007803F0007003F000E003F001C003F0038003F0070003F00F0003F00FFFFFF -F8FFFFFFF8FFFFFFF800007F0000007F0000007F0000007F0000007F0000007F0000007F -0000007F00001FFFF8001FFFF8001FFFF81D277EA622>I<180003001F801F001FFFFE00 -1FFFFC001FFFF8001FFFF0001FFFE0001FFF80001FFE00001C0000001C0000001C000000 -1C0000001C0000001C0000001C7FC0001DFFF8001F80FC001E003F0008003F0000001F80 -00001FC000001FC000001FE000001FE03C001FE07E001FE0FF001FE0FF001FE0FF001FE0 -FF001FC0FE001FC07C003F8078003F803C007F001F01FE000FFFFC0003FFF00000FF8000 -1B277DA622>I<0007F800003FFE0000FFFF0001FC0F8003F00F8007E01FC00FC03FC01F -803FC01F803FC03F803FC03F001F807F000F007F0000007F000000FF020000FF1FF000FF -3FFC00FF603E00FFC03F00FF801F80FF801FC0FF801FC0FF001FC0FF001FE0FF001FE0FF -001FE07F001FE07F001FE07F001FE07F001FE03F001FE03F001FC01F801FC01F801F800F -C03F0007E07E0003FFFC0001FFF800003FC0001B277DA622>I<380000003E0000003FFF -FFF03FFFFFF03FFFFFF07FFFFFE07FFFFFC07FFFFF807FFFFF0070000E0070000E007000 -1C00E0003800E0007000E000E0000001C0000001C0000003800000078000000F8000000F -0000001F0000001F0000003F0000003F0000007E0000007E0000007E000000FE000000FE -000000FE000000FE000001FE000001FE000001FE000001FE000001FE000001FE000001FE -000000FC0000007800001C297CA822>I<00000780000000000780000000000FC0000000 -000FC0000000000FC0000000001FE0000000001FE0000000003FF0000000003FF0000000 -003FF00000000077F80000000077F800000000F7FC00000000E3FC00000000E3FC000000 -01C1FE00000001C1FE00000003C1FF0000000380FF0000000380FF00000007007F800000 -07007F8000000F007FC000000E003FC000000E003FC000001C001FE000001C001FE00000 -3FFFFFF000003FFFFFF000003FFFFFF00000700007F80000700007F80000F00007FC0000 -E00003FC0001E00003FE0001C00001FE0001C00001FE0003C00001FF00FFFE003FFFFCFF -FE003FFFFCFFFE003FFFFC2E297EA833>65 D<FFFFFFFFE0FFFFFFFFE0FFFFFFFFE003FC -001FE003FC0007F003FC0001F003FC0001F003FC0000F003FC00007003FC00007003FC00 -007003FC01C07803FC01C03803FC01C03803FC01C03803FC03C00003FC03C00003FC0FC0 -0003FFFFC00003FFFFC00003FFFFC00003FC0FC00003FC03C00003FC03C00003FC01C00E -03FC01C00E03FC01C00E03FC01C01C03FC00001C03FC00001C03FC00001C03FC00003C03 -FC00003803FC00007803FC0000F803FC0001F803FC0003F803FC001FF8FFFFFFFFF0FFFF -FFFFF0FFFFFFFFF027297EA82C>69 D<FFFFFFFFC0FFFFFFFFC0FFFFFFFFC003FC003FC0 -03FC000FE003FC0003E003FC0001E003FC0001E003FC0000E003FC0000E003FC0000E003 -FC0000F003FC01C07003FC01C07003FC01C07003FC01C00003FC03C00003FC03C00003FC -0FC00003FFFFC00003FFFFC00003FFFFC00003FC0FC00003FC03C00003FC03C00003FC01 -C00003FC01C00003FC01C00003FC01C00003FC00000003FC00000003FC00000003FC0000 -0003FC00000003FC00000003FC00000003FC00000003FC000000FFFFFC0000FFFFFC0000 -FFFFFC000024297EA82A>I<FFFFF0FFFFF0FFFFF003FC0003FC0003FC0003FC0003FC00 -03FC0003FC0003FC0003FC0003FC0003FC0003FC0003FC0003FC0003FC0003FC0003FC00 -03FC0003FC0003FC0003FC0003FC0003FC0003FC0003FC0003FC0003FC0003FC0003FC00 -03FC0003FC0003FC0003FC0003FC0003FC00FFFFF0FFFFF0FFFFF014297EA819>73 -D<FFFFFC0000FFFFFC0000FFFFFC000003FC00000003FC00000003FC00000003FC000000 -03FC00000003FC00000003FC00000003FC00000003FC00000003FC00000003FC00000003 -FC00000003FC00000003FC00000003FC00000003FC00000003FC00000003FC00000003FC -00000003FC00000003FC00000003FC0001C003FC0001C003FC0001C003FC0001C003FC00 -03C003FC00038003FC00038003FC00078003FC00078003FC000F8003FC000F8003FC001F -8003FC007F8003FC01FF00FFFFFFFF00FFFFFFFF00FFFFFFFF0022297EA828>76 -D<FFFE0000003FFF80FFFE0000003FFF80FFFF0000007FFF8003FF0000007FE00003FF00 -00007FE00003BF800000EFE00003BF800000EFE000039FC00001CFE000039FC00001CFE0 -00038FE000038FE000038FE000038FE000038FE000038FE0000387F000070FE0000387F0 -00070FE0000383F8000E0FE0000383F8000E0FE0000381FC001C0FE0000381FC001C0FE0 -000381FC001C0FE0000380FE00380FE0000380FE00380FE00003807F00700FE00003807F -00700FE00003803F80E00FE00003803F80E00FE00003803F80E00FE00003801FC1C00FE0 -0003801FC1C00FE00003800FE3800FE00003800FE3800FE000038007F7000FE000038007 -F7000FE000038007F7000FE000038003FE000FE000038003FE000FE000038001FC000FE0 -00038001FC000FE000038000F8000FE000FFFE00F803FFFF80FFFE00F803FFFF80FFFE00 -7003FFFF8039297DA840>I<FFFFFFF800FFFFFFFF00FFFFFFFFC003FC003FE003FC000F -F003FC0007F803FC0007FC03FC0003FC03FC0003FE03FC0003FE03FC0003FE03FC0003FE -03FC0003FE03FC0003FE03FC0003FE03FC0003FC03FC0007FC03FC0007F803FC000FF003 -FC003FE003FFFFFF8003FFFFFE0003FC00000003FC00000003FC00000003FC00000003FC -00000003FC00000003FC00000003FC00000003FC00000003FC00000003FC00000003FC00 -000003FC00000003FC00000003FC00000003FC000000FFFFF00000FFFFF00000FFFFF000 -0027297EA82E>80 D<00FF806003FFF0E00FFFF9E01F80FFE03F001FE03E0007E07C0003 -E07C0003E0FC0001E0FC0001E0FC0000E0FE0000E0FE0000E0FF000000FFC000007FFC00 -007FFFE0003FFFF8001FFFFE001FFFFF0007FFFF8003FFFFC000FFFFC0000FFFE000007F -E000001FF000000FF0000007F0E00003F0E00003F0E00003F0E00003F0F00003E0F00003 -E0F80007E0FC0007C0FF000F80FFE03F80F3FFFE00E1FFFC00C01FF0001C297CA825>83 -D<7FFFFFFFFF807FFFFFFFFF807FFFFFFFFF807F807F807F807C007F800F8078007F8007 -8078007F80078070007F800380F0007F8003C0F0007F8003C0E0007F8001C0E0007F8001 -C0E0007F8001C0E0007F8001C0E0007F8001C000007F80000000007F80000000007F8000 -0000007F80000000007F80000000007F80000000007F80000000007F80000000007F8000 -0000007F80000000007F80000000007F80000000007F80000000007F80000000007F8000 -0000007F80000000007F80000000007F80000000007F80000000007F80000000007F8000 -0000007F80000000FFFFFFC00000FFFFFFC00000FFFFFFC0002A287EA72F>I<FFFFF000 -7FFFFFFFF0007FFFFFFFF0007FFF03FE000001C001FE0000038001FE0000038001FF0000 -078000FF0000070000FF80000F00007F80000E00007FC0000E00003FC0001C00003FC000 -1C00003FE0003C00001FE0003800001FF0007800000FF0007000000FF80070000007F800 -E0000007F800E0000003FC01C0000003FC01C0000003FE03C0000001FE0380000001FF07 -80000000FF0700000000FF87000000007F8E000000007F8E000000007FDE000000003FDC -000000003FFC000000001FF8000000001FF8000000000FF0000000000FF0000000000FF0 -0000000007E00000000007E00000000003C00000000003C0000030297FA833>86 -D<01FF80000FFFF0001F81FC003FC0FE003FC07F003FC03F003FC03F801F803F800F003F -8000003F8000003F800000FF80007FFF8003FFFF800FF03F801FC03F803F803F807F003F -80FE003F80FE003F80FE003F80FE003F80FE007F807F00DF803F839FFC1FFF0FFC03FC03 -FC1E1B7E9A21>97 D<FFE00000FFE00000FFE000000FE000000FE000000FE000000FE000 -000FE000000FE000000FE000000FE000000FE000000FE000000FE000000FE000000FE1FE -000FEFFF800FFE0FE00FF803F00FF001F80FE001FC0FE000FC0FE000FE0FE000FE0FE000 -FF0FE000FF0FE000FF0FE000FF0FE000FF0FE000FF0FE000FF0FE000FF0FE000FE0FE000 -FE0FE000FE0FE001FC0FE001FC0FF001F80FF803F00F9C0FE00F0FFF800E01FC00202A7E -A925>I<003FE00001FFFC0003F07E000FC0FF001FC0FF003F80FF003F80FF007F007E00 -7F003C007F000000FF000000FF000000FF000000FF000000FF000000FF000000FF000000 -7F0000007F0000007F8000003F8003803F8003801FC007000FE00E0003F83C0001FFF800 -003FC000191B7E9A1E>I<00007FF000007FF000007FF0000007F0000007F0000007F000 -0007F0000007F0000007F0000007F0000007F0000007F0000007F0000007F0000007F000 -3F87F001FFF7F007F03FF00FC00FF01F8007F03F8007F03F8007F07F0007F07F0007F07F -0007F0FF0007F0FF0007F0FF0007F0FF0007F0FF0007F0FF0007F0FF0007F0FF0007F07F -0007F07F0007F03F0007F03F8007F01F800FF00FC01FF007F07FFF01FFE7FF007F87FF20 -2A7EA925>I<003FC00001FFF00003F0FC000FC03E001F803F001F801F003F801F807F00 -1F807F001FC07F000FC0FF000FC0FF000FC0FFFFFFC0FFFFFFC0FF000000FF000000FF00 -00007F0000007F0000007F0000003F8001C01F8001C00FC0038007C0070003F01E0000FF -FC00003FE0001A1B7E9A1F>I<0003F800001FFE00007E3F0001FC3F8001F87F8003F87F -8007F07F8007F03F0007F03F0007F0000007F0000007F0000007F0000007F0000007F000 -00FFFFC000FFFFC000FFFFC00007F0000007F0000007F0000007F0000007F0000007F000 -0007F0000007F0000007F0000007F0000007F0000007F0000007F0000007F0000007F000 -0007F0000007F0000007F0000007F0000007F0000007F000007FFF80007FFF80007FFF80 -00192A7EA915>I<00FF81F003FFE7F80FC1FE1C1F80FC7C3F007E7C3F007E387F007F00 -7F007F007F007F007F007F007F007F007F007F003F007E003F007E001F80FC000FC1F800 -1FFFE00018FF800038000000380000003C0000003E0000003FFFF8003FFFFF001FFFFFC0 -0FFFFFE007FFFFF01FFFFFF03E0007F07C0001F8F80000F8F80000F8F80000F8F80000F8 -7C0001F07C0001F03F0007E00FC01F8007FFFF00007FF0001E287E9A22>I<FFE00000FF -E00000FFE000000FE000000FE000000FE000000FE000000FE000000FE000000FE000000F -E000000FE000000FE000000FE000000FE000000FE0FE000FE3FF800FE70FC00FEC0FE00F -F807E00FF807F00FF007F00FF007F00FE007F00FE007F00FE007F00FE007F00FE007F00F -E007F00FE007F00FE007F00FE007F00FE007F00FE007F00FE007F00FE007F00FE007F00F -E007F00FE007F0FFFE3FFFFFFE3FFFFFFE3FFF202A7DA925>I<07000F801FC03FE03FE0 -3FE01FC00F8007000000000000000000000000000000FFE0FFE0FFE00FE00FE00FE00FE0 -0FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE0FFFE -FFFEFFFE0F2B7EAA12>I<FFE00000FFE00000FFE000000FE000000FE000000FE000000F -E000000FE000000FE000000FE000000FE000000FE000000FE000000FE000000FE000000F -E01FFC0FE01FFC0FE01FFC0FE007800FE00F000FE01E000FE03C000FE078000FE0E0000F -E3C0000FE7C0000FEFE0000FFFF0000FFFF8000FF3F8000FE1FC000FC0FE000FC07F000F -C07F000FC03F800FC01FC00FC00FE00FC00FE00FC007F0FFFC1FFFFFFC1FFFFFFC1FFF20 -2A7FA923>107 D<FFE0FFE0FFE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE0 -0FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE0 -0FE00FE00FE00FE00FE00FE00FE0FFFEFFFEFFFE0F2A7EA912>I<FFC07F001FC000FFC1 -FFC07FF000FFC707E1C1F8000FCC07F301FC000FD803F600FC000FD803FE00FE000FF003 -FC00FE000FF003FC00FE000FE003F800FE000FE003F800FE000FE003F800FE000FE003F8 -00FE000FE003F800FE000FE003F800FE000FE003F800FE000FE003F800FE000FE003F800 -FE000FE003F800FE000FE003F800FE000FE003F800FE000FE003F800FE000FE003F800FE -000FE003F800FE000FE003F800FE00FFFE3FFF8FFFE0FFFE3FFF8FFFE0FFFE3FFF8FFFE0 -331B7D9A38>I<FFC0FE00FFC3FF80FFC70FC00FCC0FE00FD807E00FD807F00FF007F00F -F007F00FE007F00FE007F00FE007F00FE007F00FE007F00FE007F00FE007F00FE007F00F -E007F00FE007F00FE007F00FE007F00FE007F00FE007F00FE007F00FE007F0FFFE3FFFFF -FE3FFFFFFE3FFF201B7D9A25>I<003FE00001FFFC0003F07E000FC01F801F800FC03F80 -0FE03F0007E07F0007F07F0007F07F0007F0FF0007F8FF0007F8FF0007F8FF0007F8FF00 -07F8FF0007F8FF0007F8FF0007F87F0007F07F0007F03F800FE03F800FE01F800FC00FC0 -1F8007F07F0001FFFC00003FE0001D1B7E9A22>I<FFE1FE00FFEFFF80FFFE0FE00FF807 -F00FF003F80FE001FC0FE001FC0FE001FE0FE000FE0FE000FF0FE000FF0FE000FF0FE000 -FF0FE000FF0FE000FF0FE000FF0FE000FF0FE000FE0FE001FE0FE001FE0FE001FC0FE003 -FC0FF003F80FF807F00FFC1FE00FEFFF800FE1FC000FE000000FE000000FE000000FE000 -000FE000000FE000000FE000000FE000000FE00000FFFE0000FFFE0000FFFE000020277E -9A25>I<FFC1F0FFC7FCFFCE3E0FDC7F0FD87F0FF07F0FF07F0FF03E0FE0000FE0000FE0 -000FE0000FE0000FE0000FE0000FE0000FE0000FE0000FE0000FE0000FE0000FE0000FE0 -000FE000FFFF00FFFF00FFFF00181B7F9A1B>114 D<03FE300FFFF03E03F07800F07000 -F0F00070F00070F80070FE0000FFE0007FFF007FFFC03FFFE01FFFF007FFF800FFF80007 -FC0000FCE0007CE0003CF0003CF00038F80038FC0070FF01E0F7FFC0C1FF00161B7E9A1B ->I<00E00000E00000E00000E00001E00001E00001E00003E00003E00007E0000FE0001F -FFE0FFFFE0FFFFE00FE0000FE0000FE0000FE0000FE0000FE0000FE0000FE0000FE0000F -E0000FE0000FE0000FE0000FE0700FE0700FE0700FE0700FE0700FE0700FE07007F0E003 -F0C001FF80007F0014267FA51A>I<FFE07FF0FFE07FF0FFE07FF00FE007F00FE007F00F -E007F00FE007F00FE007F00FE007F00FE007F00FE007F00FE007F00FE007F00FE007F00F -E007F00FE007F00FE007F00FE007F00FE007F00FE007F00FE007F00FE00FF00FE00FF007 -E01FF003F077FF01FFE7FF007F87FF201B7D9A25>I<FFFC03FFFFFC03FFFFFC03FF0FF0 -00F007F000E007F800E003F801C003F801C003FC03C001FC038001FE078000FE070000FF -0700007F0E00007F0E00007F9E00003F9C00003FFC00001FF800001FF800000FF000000F -F000000FF0000007E0000007E0000003C0000003C000201B7F9A23>I<FFFC7FFC1FFCFF -FC7FFC1FFCFFFC7FFC1FFC0FE00FE001C007F007E0038007F007E0038007F807F0078003 -F807F0070003F80FF8070003FC0FF80F0001FC0FF80E0001FC1FFC0E0000FE1CFC1C0000 -FE1CFE1C0000FF387E3C00007F387E3800007F787F3800003FF03F7000003FF03FF00000 -3FE01FF000001FE01FE000001FE01FE000000FC00FC000000FC00FC000000F8007C00000 -07800780000007800780002E1B7F9A31>I<FFFC1FFEFFFC1FFEFFFC1FFE07F0038003F8 -078003FC0F0001FE1E0000FE3C00007F3800007FF800003FF000001FE000000FE000000F -F0000007F800000FF800001FFC00003CFE000038FF0000787F0000F03F8001E01FC003C0 -1FE003800FE0FFF03FFFFFF03FFFFFF03FFF201B7F9A23>I<FFFC03FFFFFC03FFFFFC03 -FF0FF000F007F000E007F800E003F801C003F801C003FC03C001FC038001FE078000FE07 -0000FF0700007F0E00007F0E00007F9E00003F9C00003FFC00001FF800001FF800000FF0 -00000FF000000FF0000007E0000007E0000003C0000003C0000003800000038000000780 -00380700007C0F0000FE0E0000FE1E0000FE1C0000FE38000074F000003FE000000F8000 -0020277F9A23>I E /Fp 39 127 df<007E0001C1800301800703C00E03C00E01800E00 -000E00000E00000E00000E0000FFFFC0FFFFC00E01C00E01C00E01C00E01C00E01C00E01 -C00E01C00E01C00E01C00E01C00E01C00E01C00E01C00E01C07F87F87F87F8151D809C17 ->12 D<FC00FC001C001C001C001C001C001C001C001C001C001C001C001C001C001C00FF -80FF8009127F910C>16 D<070F0F1C3870E0400808789C15>19 D<1C001E000780038003 -800380FF00800009087B7E12>24 D<70F8F8F87005057D840C>46 -D<07C01FF0387C603C601EF01FF81FF80FF80F700F001F001E001E003C0038007000E000 -C00180030006000C031803100320067FFEFFFEFFFE101C7E9B15>50 -D<00060000000F0000000F0000000F0000001F8000001F8000001F8000003FC0000033C0 -000033C0000073E0000061E0000061E00000E1F00000C0F00000C0F00001C0F800018078 -0001FFF80003FFFC0003003C0003003C0007003E0006001E0006001E000E001F001E000F -00FF807FF0FF807FF01C1D7F9C1F>65 D<001F808000FFE18001F03B8007C00F800F0007 -801F0007801E0003803C0003807C0001807C00018078000180F8000000F8000000F80000 -00F8000000F8000000F8000000F8000000F8000000780001807C0001807C0001803C0001 -801E0003001F0003000F00060007C00C0001F0380000FFF000001FC000191E7E9C1E>67 -D<FFFFFCFFFFFC0F007C0F001C0F000C0F000E0F00060F03060F03060F03060F03000F07 -000FFF000FFF000F07000F03000F03000F03030F03030F00030F00060F00060F00060F00 -0E0F001E0F007CFFFFFCFFFFFC181C7E9B1C>69 D<FFF0FFF00F000F000F000F000F000F -000F000F000F000F000F000F000F000F000F000F000F000F000F000F000F000F000F000F -00FFF0FFF00C1C7F9B0F>73 D<FFF800FFF8000F00000F00000F00000F00000F00000F00 -000F00000F00000F00000F00000F00000F00000F00000F00000F00000F00180F00180F00 -180F00180F00380F00300F00700F00F00F01F0FFFFF0FFFFF0151C7E9B1A>76 -D<003F800000E0E0000380380007001C000E000E001E000F003C0007803C0007807C0007 -C0780003C0780003C0F80003E0F80003E0F80003E0F80003E0F80003E0F80003E0F80003 -E0F80003E0780003C07C0007C07C0007C03C0007803E000F801E000F000F001E0007001C -000380380000E0E000003F80001B1E7E9C20>79 D<FFFF80FFFFE00F01F00F00780F003C -0F003E0F003E0F003E0F003E0F003E0F003C0F003C0F00780F01F00FFFC00F00000F0000 -0F00000F00000F00000F00000F00000F00000F00000F00000F0000FFF000FFF000171C7E -9B1C>I<7FFFFFC07FFFFFC0780F03C0700F01C0600F00C0E00F00E0C00F0060C00F0060 -C00F0060C00F0060000F0000000F0000000F0000000F0000000F0000000F0000000F0000 -000F0000000F0000000F0000000F0000000F0000000F0000000F0000000F0000000F0000 -03FFFC0003FFFC001B1C7F9B1E>84 D<0FE0001838003C1C003C0E00180E00000E00000E -0001FE000F8E003C0E00780E00700E00F00E60F00E60F00E60701E603827C00FC3801312 -7F9115>97 D<FC0000FC00001C00001C00001C00001C00001C00001C00001C00001C0000 -1C00001CFC001F87001E03801C01C01C01E01C00E01C00F01C00F01C00F01C00F01C00F0 -1C00F01C00E01C01E01C01C01E03801B070018FC00141D7F9C17>I<03F80E0C1C1E381E -780C7000F000F000F000F000F000F0007000780638061C0C0E1803E00F127F9112>I<00 -1F80001F8000038000038000038000038000038000038000038000038000038003F3800E -0F801C0780380380780380700380F00380F00380F00380F00380F00380F0038070038078 -03803803801C07800E1BF003F3F0141D7F9C17>I<07E00C301818381C701E700EF00EFF -FEF000F000F000F000700070063806180C0E1803E00F127F9112>I<00F8018C071E061E -0E0C0E000E000E000E000E000E00FFE0FFE00E000E000E000E000E000E000E000E000E00 -0E000E000E000E000E007FE07FE00F1D809C0D>I<00038007E4C00C39C0381DC0381C00 -781E00781E00781E00781E00381C00381C001C300037E0002000003000003000003FF800 -1FFF001FFF803003806001C0C000C0C000C0C000C06001803003001C0E0007F800121C7F -9215>I<FC0000FC00001C00001C00001C00001C00001C00001C00001C00001C00001C00 -001C7C001C87001D03001E03801C03801C03801C03801C03801C03801C03801C03801C03 -801C03801C03801C03801C0380FF9FF0FF9FF0141D7F9C17>I<38007C007C007C003800 -000000000000000000000000FC00FC001C001C001C001C001C001C001C001C001C001C00 -1C001C001C001C00FF80FF80091D7F9C0C>I<01C003E003E003E001C000000000000000 -000000000007E007E000E000E000E000E000E000E000E000E000E000E000E000E000E000 -E000E000E000E000E000E060E0F0C0F1C061803E000B25839C0D>I<FC00FC001C001C00 -1C001C001C001C001C001C001C001C001C001C001C001C001C001C001C001C001C001C00 -1C001C001C001C001C00FF80FF80091D7F9C0C>108 D<FC7E07E000FC838838001D0190 -18001E01E01C001C01C01C001C01C01C001C01C01C001C01C01C001C01C01C001C01C01C -001C01C01C001C01C01C001C01C01C001C01C01C001C01C01C001C01C01C00FF8FF8FF80 -FF8FF8FF8021127F9124>I<FC7C00FC87001D03001E03801C03801C03801C03801C0380 -1C03801C03801C03801C03801C03801C03801C03801C0380FF9FF0FF9FF014127F9117> -I<03F0000E1C00180600380700700380700380F003C0F003C0F003C0F003C0F003C0F003 -C07003807003803807001C0E000E1C0003F00012127F9115>I<FCFC00FF87001E03801C -01C01C01E01C00E01C00F01C00F01C00F01C00F01C00F01C00F01C01E01C01E01C01C01E -03801F07001CFC001C00001C00001C00001C00001C00001C0000FF8000FF8000141A7F91 -17>I<03F1800E19801C0780380780780380780380F00380F00380F00380F00380F00380 -F003807003807803803807801C07800E1B8003E380000380000380000380000380000380 -000380001FF0001FF0141A7F9116>I<FCE0FD381E781E781C301C001C001C001C001C00 -1C001C001C001C001C001C00FFC0FFC00D127F9110>I<1F9020F04070C030C030E030F8 -007F803FE00FF000F8C038C018C018E018E010D0608FC00D127F9110>I<0C000C000C00 -0C000C000C001C001C003FE0FFE01C001C001C001C001C001C001C001C001C301C301C30 -1C301C300C200E6003C00C1A7F9910>I<FC1F80FC1F801C03801C03801C03801C03801C -03801C03801C03801C03801C03801C03801C03801C03801C07800C07800E1BF003E3F014 -127F9117>I<FF0FE0FF0FE01C07801C03000E06000E06000E0600070C00070C00070C00 -03980003980003F80001F00001F00000E00000E00000E00013127F9116>I<FF3FCFE0FF -3FCFE03C0F07801C0F03001C1B03001C1B87000E1B86000E3B86000E3186000731CC0007 -31CC000760CC0003E0F80003E0F80003C0780003C0780001C0700001C070001B127F911E ->I<7F8FF07F8FF00F0780070600038E0001DC0001D80000F00000700000780000F80001 -DC00038E00030E000607000F0380FF0FF8FF0FF81512809116>I<FF0FE0FF0FE01C0780 -1C03000E06000E06000E0600070C00070C00070C0003980003980003F80001F00001F000 -00E00000E00000E00000C00000C00000C000F18000F18000F300006600003C0000131A7F -9116>I<1C043F0843F080E00E047D9B15>126 D E /Fq 13 118 -df<0F001F003F803F007E00F800F000C0000908769C18>19 D<00038000000380000007 -C0000007C0000007C000000FE000000FE000001FF000001BF000003BF8000031F8000031 -F8000060FC000060FC0000E0FE0000C07E0000C07E0001803F0001FFFF0003FFFF800300 -1F8007001FC006000FC006000FC00C0007E00C0007E0FF803FFEFF803FFE1F1C7E9B24> -65 D<07F8601FFEE03C07E07801E07000E0F000E0F00060F00060F80000FE0000FFE000 -7FFE003FFF003FFF800FFFC007FFE0007FE00003F00001F00000F0C000F0C000F0C000E0 -E000E0F001C0FC03C0EFFF00C3FC00141C7D9B1B>83 D<07F8001FFE003F1F803F07803F -07C01E07C00C07C003FFC01FFFC03F87C07E07C0FC07C0FC07C0FC07C0FC0FC07E1FC03F -FBF80FE1F815127F9117>97 D<FF0000FF00001F00001F00001F00001F00001F00001F00 -001F00001F00001F00001F1FC01FFFE01FC1F81F00F81F007C1F007C1F007E1F007E1F00 -7E1F007E1F007E1F007E1F007C1F007C1F80F81FC1F01C7FE0181F80171D7F9C1B>I<03 -F8000FFE001F3F003E3F007C3F007C1E00FC0C00FC0000FC0000FC0000FC0000FC00007C -00007E01803E03801F07000FFE0003F80011127E9115>I<1C003E007F007F007F003E00 -1C00000000000000000000007F007F001F001F001F001F001F001F001F001F001F001F00 -1F001F001F001F00FFC0FFC00A1E7F9D0E>105 D<FF1FC0FE00FF7FE3FF001FE1F70F80 -1F80FC07C01F80FC07C01F00F807C01F00F807C01F00F807C01F00F807C01F00F807C01F -00F807C01F00F807C01F00F807C01F00F807C01F00F807C01F00F807C0FFE7FF3FF8FFE7 -FF3FF825127F9128>109 D<01FC000FFF801F07C03E03E07C01F07C01F0FC01F8FC01F8 -FC01F8FC01F8FC01F8FC01F87C01F07C01F03E03E01F07C00FFF8001FC0015127F9118> -111 D<FE7C00FEFF001FDF801F9F801F9F801F0F001F06001F00001F00001F00001F0000 -1F00001F00001F00001F00001F0000FFE000FFE00011127F9114>114 -D<1FD83FF87038E018E018F000FF807FE07FF01FF807FC007CC01CC01CE01CF038FFF0CF -C00E127E9113>I<030003000300070007000F000F003F00FFFCFFFC1F001F001F001F00 -1F001F001F001F001F001F0C1F0C1F0C1F0C0F9807F003E00E1A7F9913>I<FF07F8FF07 -F81F00F81F00F81F00F81F00F81F00F81F00F81F00F81F00F81F00F81F00F81F00F81F00 -F81F01F80F03F807FEFF03F8FF18127F911B>I E /Fr 19 118 df<387CFCFE7E3E0E1C -3CF8F040070C788516>44 D<FFFF80FFFF80FFFF8011037E8D16>I<3078FCFC78300606 -788516>I<00F80003FC0007FE000F07001C3B8038FF8079FF8073C7C07383C0E701C0E7 -01C0E701C0E701C0E701C0E701C0E701C073838073C78079FF0038FE001C38000F03C007 -FFC003FF0000FC0012197E9816>64 D<1FE0003FF0007FF800783C00300E00000E00003E -0007FE001FFE007FCE00780E00E00E00E00E00E00E00783E007FFFE03FF7E00FC3E01312 -7E9116>97 D<FC0000FC0000FC00001C00001C00001C00001C00001C7C001DFE001FFF00 -1F07801E03C01C01C01C00E01C00E01C00E01C00E01C00E01C00E01E01C01E03C01F0780 -1FFF001DFE000CF80013197F9816>I<03F80FFC1FFE3C1E780C7000E000E000E000E000 -E000F000700778073E0E1FFC0FF803F010127D9116>I<003F00003F00003F0000070000 -070000070000070003E7000FF7001FFF003C1F00780F00700700E00700E00700E00700E0 -0700E00700E00700700F00780F003C1F001FFFE00FF7E007C7E013197F9816>I<03F000 -0FFC001FFE003C0F00780700700380E00380FFFF80FFFF80FFFF80E00000E00000700380 -7803803E07801FFF0007FE0001F80011127E9116>I<001E00007F0001FF8001C7800383 -000380000380007FFF00FFFF00FFFF000380000380000380000380000380000380000380 -000380000380000380000380000380007FFC00FFFE007FFC0011197F9816>I<FC0000FC -0000FC00001C00001C00001C00001C00001CF8001DFC001FFE001F0F001E07001C07001C -07001C07001C07001C07001C07001C07001C07001C07001C0700FF8FE0FF9FE0FF8FE013 -197F9816>104 D<07000F800F800F800700000000000000FF80FF80FF80038003800380 -038003800380038003800380038003800380FFFCFFFEFFFC0F1A7C9916>I<7FC000FFC0 -007FC00001C00001C00001C00001C00001C00001C00001C00001C00001C00001C00001C0 -0001C00001C00001C00001C00001C00001C00001C00001C0007FFF00FFFF807FFF001119 -7E9816>108 D<03E0000FF8001FFC003C1E00780F00700700E00380E00380E00380E003 -80E00380F00780700700780F003C1E001FFC000FF80003E00011127E9116>111 -D<FC7C00FDFE00FFFF001F07801E03C01C01C01C00E01C00E01C00E01C00E01C00E01C00 -E01E01C01E03C01F07801FFF001DFE001CF8001C00001C00001C00001C00001C00001C00 -00FF8000FF8000FF8000131B7F9116>I<7F0F80FF3FC07F7FE007F1E007C0C007800007 -80000700000700000700000700000700000700000700000700007FFC00FFFC007FFC0013 -127F9116>114 D<0FEC3FFC7FFCF03CE01CE01C70007F801FF007F8003C600EE00EF00E -F81EFFFCFFF8C7E00F127D9116>I<0300000700000700000700000700007FFF00FFFF00 -FFFF00070000070000070000070000070000070000070000070100070380070380070380 -07870003FE0001FC0000F80011177F9616>I<FC3F00FC3F00FC3F001C07001C07001C07 -001C07001C07001C07001C07001C07001C07001C07001C07001C1F001FFFE00FFFE007E7 -E013127F9116>I E /Fs 40 125 df<038007800F800F001E003C0038007000E0004000 -090A77A218>19 D<70F8FCFC7404040404080810102040060F7C840E>44 -D<FFF8FFF8FFF80D03808B10>I<00C001C007C0FFC0FBC003C003C003C003C003C003C0 -03C003C003C003C003C003C003C003C003C003C003C003C003C003C003C003C003C003C0 -03C003C0FFFFFFFF10217CA018>49 D<3000803C07003FFF003FFE003FF80037E0003000 -0030000030000030000030000030000031F800360C003807003007003007800003C00003 -C00003E00003E00003E07003E0F803E0F803E0F803E0F803C0C003C0600780600780300F -001C1E000FFC0003F00013227EA018>53 D<01F00007FC000E0E001C0700380380780380 -700380F001C0F001C0F001C0F001E0F001E0F001E0F001E0F001E07001E07003E03803E0 -1805E00C05E00619E003E1E00001C00001C00003C00003803803807C03807C0700780E00 -301C003838001FF00007C00013227EA018>57 D<000FE010003FF83000F80E7001E00770 -03C001F0078001F00F0000F01E0000F03E0000703C0000707C0000707C00003078000030 -78000030F8000000F8000000F8000000F8000000F8000000F8000000F8000000F8000000 -78000000780000307C0000307C0000303C0000303E0000601E0000600F0000C0078000C0 -03C0018001E0030000FC0E00003FFC00000FE0001C247DA223>67 -D<FFFFF800FFFFFF0007C00F8007C003C007C001E007C000F007C0007807C0007C07C000 -3C07C0003E07C0001E07C0001E07C0001E07C0001F07C0001F07C0001F07C0001F07C000 -1F07C0001F07C0001F07C0001F07C0001F07C0001E07C0001E07C0003E07C0003C07C000 -3C07C0007807C000F007C001F007C003E007C00F80FFFFFF00FFFFF80020227FA125>I< -FFFFFFE0FFFFFFE007C007E007C001E007C000E007C0006007C0007007C0007007C00030 -07C0003007C0183007C0183007C0180007C0180007C0380007C0780007FFF80007FFF800 -07C0780007C0380007C0180007C0180007C0180007C0180007C0000007C0000007C00000 -07C0000007C0000007C0000007C0000007C00000FFFF0000FFFF00001C227FA120>70 -D<FFFE1FFFC0FFFE1FFFC007C000F80007C000F80007C000F80007C000F80007C000F800 -07C000F80007C000F80007C000F80007C000F80007C000F80007C000F80007C000F80007 -C000F80007FFFFF80007FFFFF80007C000F80007C000F80007C000F80007C000F80007C0 -00F80007C000F80007C000F80007C000F80007C000F80007C000F80007C000F80007C000 -F80007C000F80007C000F80007C000F800FFFE1FFFC0FFFE1FFFC022227FA125>72 -D<FFFEFFFE07C007C007C007C007C007C007C007C007C007C007C007C007C007C007C007 -C007C007C007C007C007C007C007C007C007C007C007C007C007C007C0FFFEFFFE0F227F -A112>I<FFFE0000FFFE00000F8000000F8000000F8000000F8000000F8000000F800000 -0F8000000F8000000F8000000F8000000F8000000F8000000F8000000F8000000F800000 -0F8000000F8000000F8000000F8000000F8001800F8001800F8001800F8001800F800380 -0F8003800F8003000F8007000F8007000F800F000F803F00FFFFFF00FFFFFF0019227EA1 -1E>76 D<FFC003FFC0FFE003FFC007F0003C0007F000180006F800180006FC001800067C -001800063E001800063F001800061F001800060F801800060FC018000607C018000603E0 -18000603F018000601F018000600F818000600FC180006007C180006003E180006003F18 -0006001F180006000F980006000FD800060007D800060003F800060003F800060001F800 -060000F800060000F80006000078000F00003800FFF0003800FFF000180022227FA125> -78 D<FFFFF800FFFFFE0007C01F8007C007C007C003C007C001E007C001E007C001F007 -C001F007C001F007C001F007C001F007C001E007C001E007C003C007C0078007C01F0007 -FFFC0007C0000007C0000007C0000007C0000007C0000007C0000007C0000007C0000007 -C0000007C0000007C0000007C0000007C0000007C00000FFFE0000FFFE00001C227FA121 ->80 D<FFFFF00000FFFFFE000007C01F000007C007800007C003C00007C003E00007C001 -F00007C001F00007C001F00007C001F00007C001F00007C001E00007C003E00007C003C0 -0007C007800007C01E000007FFF0000007C03C000007C01E000007C00F000007C00F8000 -07C007C00007C007C00007C007C00007C007C00007C007C00007C007C00007C007C00007 -C007C00007C007C0C007C007C0C007C003C0C0FFFE01E180FFFE00F1000000003E002223 -7FA124>82 D<FFFE03FFC0FFFE03FFC007C0003C0007C000180007C000180007C0001800 -07C000180007C000180007C000180007C000180007C000180007C000180007C000180007 -C000180007C000180007C000180007C000180007C000180007C000180007C000180007C0 -00180007C000180007C000180007C000180007C000180007C000180003C000300003E000 -300001E000300001E000600000F000C0000078018000003E070000000FFE00000003F800 -0022237FA125>85 D<FFF83FFE07FEFFF83FFE07FE1F8003F001F80F8003E000600F8003 -F000600FC003F000E007C003F000C007C003F000C007E006F800C003E006F8018003E006 -F8018003E00C7C018001F00C7C030001F00C7C030001F01C7E030001F8183E070000F818 -3E060000F8183E060000FC301F0600007C301F0C00007C301F0C00007C600F8C00003E60 -0F9800003E600F9800003EE00FD800003FC007F800001FC007F000001FC007F000001F80 -03F000000F8003E000000F8003E000000F0001E00000070001C00000070001C000000700 -01C0002F237FA132>87 D<1FF000383C007C0E007C0F007C078038078000078000078000 -FF8007C7801E07803C0780780780700780F00798F00798F00798F00F987817983C23F00F -C1E015157E9418>97 D<0F0000FF0000FF00001F00000F00000F00000F00000F00000F00 -000F00000F00000F00000F00000F00000F3F000F61C00F80600F00300F00380F003C0F00 -1C0F001E0F001E0F001E0F001E0F001E0F001E0F001E0F001C0F003C0F00380F00700F80 -600E61C00C3F0017237FA21B>I<01FE000707000C0F801C0F80380F80780700700000F0 -0000F00000F00000F00000F00000F00000F000007000007800C03800C01C01800C030007 -060001F80012157E9416>I<0001E0001FE0001FE00003E00001E00001E00001E00001E0 -0001E00001E00001E00001E00001E00001E001F9E00707E00C03E01C01E03801E07801E0 -7001E0F001E0F001E0F001E0F001E0F001E0F001E0F001E07001E07801E03801E01801E0 -0C03F0070DFE01F1FE17237EA21B>I<01FC000707000C03801C01C03801C07801E07000 -E0F000E0FFFFE0F00000F00000F00000F00000F000007000007800603800601C00C00E01 -8007070000FC0013157F9416>I<003E0000E18003C3C00387C00787C00F03800F00000F -00000F00000F00000F00000F00000F00000F0000FFF800FFF8000F00000F00000F00000F -00000F00000F00000F00000F00000F00000F00000F00000F00000F00000F00000F00000F -00000F0000FFF000FFF000122380A20F>I<0000F003F1180E1E381C0E38380730380700 -7807807807807807807807803807003807001C0E001E1C0033F000200000200000300000 -3800003FFE001FFFC00FFFE03801F0700070E00038E00038E00038E00038600030700070 -3800E00E038003FE0015217F9518>I<0F0000FF0000FF00001F00000F00000F00000F00 -000F00000F00000F00000F00000F00000F00000F00000F0F800F31C00F40E00F80F00F80 -F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00 -F00F00F00F00F0FFF3FFFFF3FF18237FA21B>I<0E001F001F001F000E00000000000000 -000000000000000000000F007F007F001F000F000F000F000F000F000F000F000F000F00 -0F000F000F000F000F000F00FFE0FFE00B2280A10D>I<0F00FF00FF001F000F000F000F -000F000F000F000F000F000F000F000F000F000F000F000F000F000F000F000F000F000F -000F000F000F000F000F000F000F000F00FFF0FFF00C2380A20D>108 -D<0F0FC07E00FF30E18700FF407203801F807C03C00F807C03C00F007803C00F007803C0 -0F007803C00F007803C00F007803C00F007803C00F007803C00F007803C00F007803C00F -007803C00F007803C00F007803C00F007803C00F007803C0FFF3FF9FFCFFF3FF9FFC2615 -7F9429>I<0F0F80FF31C0FF40E01F80F00F80F00F00F00F00F00F00F00F00F00F00F00F -00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F0FFF3FFFFF3FF18157F94 -1B>I<01FC000707000C01801800C03800E0700070700070F00078F00078F00078F00078 -F00078F00078F000787000707800F03800E01C01C00E038007070001FC0015157F9418> -I<0F3F00FF61C0FF80600F00700F00380F003C0F003C0F001E0F001E0F001E0F001E0F00 -1E0F001E0F001E0F003C0F003C0F00380F00700F80E00F61C00F3F000F00000F00000F00 -000F00000F00000F00000F00000F0000FFF000FFF000171F7F941B>I<01F860070CE00E -02E01C03E03801E07801E07801E0F001E0F001E0F001E0F001E0F001E0F001E0F001E078 -01E07801E03801E01C03E00C03E0070DE001F1E00001E00001E00001E00001E00001E000 -01E00001E00001E0001FFE001FFE171F7E941A>I<0F1E00FF2300FF47801F87800F8300 -0F80000F00000F00000F00000F00000F00000F00000F00000F00000F00000F00000F0000 -0F00000F0000FFF800FFF8001115809413>I<0FC8307860386018E018E018F000FC007F -C03FE01FF007F8007CC03CC01CC01CE01CE018F038D8708FC00E157E9413>I<06000600 -06000600060006000E000E000E001E003FFCFFFC1E001E001E001E001E001E001E001E00 -1E001E001E0C1E0C1E0C1E0C1E0C1E0C0F18071001E00E1F7F9E13>I<0F00F0FF0FF0FF -0FF01F01F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F -00F00F00F00F01F00F01F00702F80386FF00F8FF18157F941B>I<FFC1FEFFC1FE1F00F8 -0F00600F00600780C00780C00780C003C18003C18003E38001E30001E30000F60000F600 -00F600007C00007C00007C0000380000380017157F941A>I<FFC1FEFFC1FE1F00F80F00 -600F00600780C00780C00780C003C18003C18003E38001E30001E30000F60000F60000F6 -00007C00007C00007C00003800003800003000003000007000006000F86000F8C000F8C0 -00F980006300003E0000171F7F941A>121 D<3FFFC03C0780380F80300F00701E00603E -00603C0060780000F80000F00001E00003C00007C0C00780C00F00C01F01C01E01803C01 -807C0380780780FFFF8012157F9416>I<FFFFFFFFFFFF3001808C31>124 -D E /Ft 20 118 df<78FCFCFCFC7806067A8512>46 D<007F800001FFE0000781F8000E -007C0018003E0030001F0030000F8060000FC0600007C0F80007C0FC0007E0FE0007E0FE -0003E0FE0003E0FE0003E07C0007E0000007E0000007C0000007C000000FC000000F8000 -000F8000001F0000003E0000003C00000078000000F8000000F0000001E0000003C00000 -070000000E0000001C000000180000003000000060000000C00060018000600380006007 -0000C00E0000C00C0000C0180001C03FFFFFC07FFFFF80FFFFFF80FFFFFF801B2F7DAE21 ->50 D<FFFFC00000FFFFC0000007F000000003E000000003E000000003E000000003E000 -000003E000000003E000000003E000000003E000000003E000000003E000000003E00000 -0003E000000003E000000003E000000003E000000003E000000003E000000003E0000000 -03E000000003E000000003E000000003E000000003E000000003E000000003E000000003 -E000000003E000000003E000000003E000006003E000006003E000006003E000006003E0 -0000C003E00000C003E00000C003E00000C003E00001C003E00001C003E00003C003E000 -03C003E00007C003E0000F8003E0003F8007E000FF80FFFFFFFF80FFFFFFFF8023317DB0 -29>76 D<FFF00000007FF8FFF8000000FFF807F8000000FF0003F8000000FE00037C0000 -01BE00037C000001BE00037C000001BE00033E0000033E00033E0000033E00033E000003 -3E00031F0000063E00031F0000063E00031F0000063E00030F80000C3E00030F80000C3E -00030F80000C3E000307C000183E000307C000183E000307C000183E000303E000303E00 -0303E000303E000303E000303E000301F000603E000301F000603E000301F000C03E0003 -00F800C03E000300F800C03E0003007C01803E0003007C01803E0003007C01803E000300 -3E03003E0003003E03003E0003003E03003E0003001F06003E0003001F06003E0003001F -06003E0003000F8C003E0003000F8C003E0003000F8C003E00030007D8003E00030007D8 -003E00030007D8003E00030003F0003E00030003F0003E00030003F0003E00078001E000 -3E000FC001E0007F00FFFC01E00FFFF8FFFC00C00FFFF835317CB03D>I<FFFFFFE000FF -FFFFFC0007E0007F0003E0000F8003E00007C003E00003E003E00001F003E00001F803E0 -0000F803E00000F803E00000FC03E00000FC03E00000FC03E00000FC03E00000FC03E000 -00FC03E00000F803E00000F803E00001F803E00001F003E00003E003E00007C003E0000F -8003E0007F0003FFFFFC0003FFFFE00003E000000003E000000003E000000003E0000000 -03E000000003E000000003E000000003E000000003E000000003E000000003E000000003 -E000000003E000000003E000000003E000000003E000000003E000000003E000000003E0 -00000003E000000007F0000000FFFF800000FFFF80000026317DB02D>80 -D<FFFFFF000000FFFFFFF0000007E001FC000003E0003F000003E0000F800003E00007C0 -0003E00003E00003E00003F00003E00003F00003E00001F00003E00001F80003E00001F8 -0003E00001F80003E00001F80003E00001F80003E00001F00003E00003F00003E00003F0 -0003E00003E00003E00007C00003E0000F800003E0003F000003E001FC000003FFFFF000 -0003FFFFC0000003E001F0000003E0007C000003E0003E000003E0001F000003E0000F00 -0003E0000F800003E00007800003E00007C00003E00007C00003E00007C00003E00007C0 -0003E00007C00003E00007E00003E00007E00003E00007E00003E00007E00003E00007E0 -0003E00007E01803E00007F01803E00003F01803E00003F01807F00001F830FFFF8000F8 -70FFFF80007FE0000000000F802D327CB031>82 D<03FE00000FFFC0001E03E0003F00F0 -003F0078003F003C001E001C000C001E0000001E0000001E0000001E0000001E000001FE -00003FFE0001FF1E0007F01E000F801E001F001E003E001E007C001E007C001E00F8001E -0CF8001E0CF8001E0CF8003E0CF8003E0C7C007E0C3E00DF1C1F038FB80FFF07F003F803 -C01E1F7D9E21>97 D<001FF00000FFFC0001F01E0007C03F000F003F000F003F001E001E -003C000C003C0000007C00000078000000F8000000F8000000F8000000F8000000F80000 -00F8000000F8000000F8000000F80000007C0000007C0000003C0000003E0001801E0001 -800F0003000F80070007C00E0001F81C0000FFF000001FC000191F7E9E1D>99 -D<003F800000FFE00003E0F80007803C000F001E001E001E001E000F003C000F007C000F -007C000F8078000780F8000780FFFFFF80FFFFFF80F8000000F8000000F8000000F80000 -00F8000000F8000000780000007C0000003C0000003C0001801E0001800F0003000F8006 -0007C00E0001F0380000FFF000001FC000191F7E9E1D>101 D<0003F0000FF8003C3C00 -787E00F07E01E07E01E03C01C01803C00003C00003C00003C00003C00003C00003C00003 -C00003C00003C00003C000FFFFC0FFFFC003C00003C00003C00003C00003C00003C00003 -C00003C00003C00003C00003C00003C00003C00003C00003C00003C00003C00003C00003 -C00003C00003C00003C00003C00003C00003C00003C00007E0007FFF007FFF0017327FB1 -14>I<000000F0007F03F801FFCF1C03C1FC3C0780F83C0F0078181F007C001E003C003E -003E003E003E003E003E003E003E003E003E003E003E003E003E001E003C001F007C000F -0078000780F0000FC1E0000DFFC0001C7F000018000000180000001C0000001C0000001E -0000000FFFF8000FFFFF0007FFFF800FFFFFC01E0007E0380001F07000007070000078E0 -000038E0000038E0000038E0000038E000003870000070780000F03C0001E01E0003C007 -C01F0001FFFC00003FE0001E2F7E9F21>I<0780000000FF80000000FF800000000F8000 -000007800000000780000000078000000007800000000780000000078000000007800000 -000780000000078000000007800000000780000000078000000007800000000780000000 -07800000000781FE00000787FF8000078E07C000079803E00007B001E00007E000F00007 -C000F00007C000F00007C000F000078000F000078000F000078000F000078000F0000780 -00F000078000F000078000F000078000F000078000F000078000F000078000F000078000 -F000078000F000078000F000078000F000078000F000078000F000078000F000078000F0 -000FC001F800FFFC1FFF80FFFC1FFF8021327EB125>I<0F001F801F801F801F800F0000 -00000000000000000000000000000000000000000007807F807F800F8007800780078007 -800780078007800780078007800780078007800780078007800780078007800780078007 -80078007800FC0FFF8FFF80D307EAF12>I<0780FF80FF800F8007800780078007800780 -078007800780078007800780078007800780078007800780078007800780078007800780 -078007800780078007800780078007800780078007800780078007800780078007800780 -078007800FC0FFFCFFFC0E327EB112>108 D<0781FE003FC000FF87FF80FFF000FF8E07 -C1C0F8000F9803E3007C0007B001E6003C0007E000FC001E0007C000F8001E0007C000F8 -001E0007C000F8001E00078000F0001E00078000F0001E00078000F0001E00078000F000 -1E00078000F0001E00078000F0001E00078000F0001E00078000F0001E00078000F0001E -00078000F0001E00078000F0001E00078000F0001E00078000F0001E00078000F0001E00 -078000F0001E00078000F0001E00078000F0001E00078000F0001E00078000F0001E000F -C001F8003F00FFFC1FFF83FFF0FFFC1FFF83FFF0341F7E9E38>I<0781FE0000FF87FF80 -00FF8E07C0000F9803E00007B001E00007E000F00007C000F00007C000F00007C000F000 -078000F000078000F000078000F000078000F000078000F000078000F000078000F00007 -8000F000078000F000078000F000078000F000078000F000078000F000078000F0000780 -00F000078000F000078000F000078000F000078000F0000FC001F800FFFC1FFF80FFFC1F -FF80211F7E9E25>I<001FC00000FFF80001E03C0007800F000F0007801E0003C01E0003 -C03C0001E03C0001E0780000F0780000F0780000F0F80000F8F80000F8F80000F8F80000 -F8F80000F8F80000F8F80000F8F80000F8780000F07C0001F03C0001E03C0001E01E0003 -C01E0003C00F00078007C01F0001F07C0000FFF800001FC0001D1F7E9E21>I<0783E0FF -8FF8FF9C7C0FB87C07F07C07E03807E00007C00007C00007C00007800007800007800007 -800007800007800007800007800007800007800007800007800007800007800007800007 -80000780000780000FC000FFFE00FFFE00161F7E9E19>114 D<00C00000C00000C00000 -C00000C00001C00001C00001C00003C00003C00007C0000FC0001FC000FFFFE0FFFFE003 -C00003C00003C00003C00003C00003C00003C00003C00003C00003C00003C00003C00003 -C00003C00003C00003C00003C03003C03003C03003C03003C03003C03003C03003C03001 -E06001E06000F0C0007F80001F00142C7FAB19>116 D<078000F000FF801FF000FF801F -F0000F8001F000078000F000078000F000078000F000078000F000078000F000078000F0 -00078000F000078000F000078000F000078000F000078000F000078000F000078000F000 -078000F000078000F000078000F000078000F000078000F000078000F000078001F00007 -8001F000078003F000038007F00003C00EF00001F03CF80000FFF0FF80003FC0FF80211F -7E9E25>I E end -%%EndProlog -%%BeginSetup -%%Feature: *Resolution 300dpi -TeXDict begin - -%%EndSetup -%%Page: 1 1 -1 0 bop 108 381 a Ft(Reference)22 b(Man)n(ual)f(of)g(the)h(Programming) -f(Language)g(Lua)g(2.2)99 508 y Fs(Rob)q(erto)c(Ierusalimsc)o(h)o(y)49 -b(Luiz)17 b(Henrique)e(de)h(Figueiredo)50 b(W)l(aldemar)17 -b(Celes)g(Filho)563 587 y Fr(roberto,lhf,celes)o(@icad)o(.puc-)o(rio.b) -o(r)479 694 y Fs(Departamen)o(to)g(de)f(Inform\023)-24 -b(atica)17 b(|)f(PUC-Rio)763 795 y(No)o(v)o(em)o(b)q(er,)e(1995)842 -963 y Fq(Abstract)72 1039 y Fp(Lua)f(is)h(an)f(extension)i(programmi)o -(ng)c(language)h(designed)j(to)e(b)q(e)i(used)f(as)g(a)f -(con\014guration)g(language)g(for)72 1089 y(an)o(y)18 -b(program)f(that)h(needs)i(one.)31 b(This)19 b(do)q(cumen)o(t)e -(describ)q(es)k(v)o(ersion)d(2.2)g(of)f(the)i(Lua)f(programming)72 -1138 y(language)d(and)g(the)h(API)g(that)g(allo)o(ws)e(in)o(teraction)i -(b)q(et)o(w)o(een)h(Lua)e(programs)f(and)i(its)f(host)h(C)g(program.)72 -1188 y(It)e(also)f(presen)o(ts)j(some)d(examples)g(of)g(using)h(the)h -(main)c(features)k(of)f(the)g(system.)881 1404 y Fq(Sum\023)-24 -b(ario)72 1471 y Fp(Lua)15 b(\023)-20 b(e)18 b(uma)d(linguagem)f(de)j -(extens~)-21 b(ao)18 b(pro)r(jetada)f(para)f(ser)i(usada)f(como)e -(linguagem)g(de)i(con\014gura\030)-18 b(c~)d(ao)72 1521 -y(em)12 b(qualquer)g(programa)e(que)j(precise)h(de)f(uma.)j(Este)e(do)q -(cumen)o(to)d(descrev)o(e)k(a)d(v)o(ers~)-21 b(ao)13 -b(2.2)e(da)h(linguagem)72 1571 y(de)18 b(programa\030)-18 -b(c~)d(ao)16 b(Lua)i(e)g(a)g(In)o(terface)h(de)f(Programa\030)-18 -b(c~)d(ao)16 b(que)i(p)q(ermite)g(a)f(in)o(tera\030)-18 -b(c~)d(ao)18 b(en)o(tre)h(programas)72 1621 y(Lua)c(e)g(o)g(programa)e -(C)h(hosp)q(edeiro.)22 b(O)15 b(do)q(cumen)o(to)g(tam)o(b)o(\023)-20 -b(em)12 b(apresen)o(ta)k(alguns)e(exemplos)g(de)i(uso)f(das)72 -1671 y(principais)f(caracter)-5 b(\023)-16 b(\020sticas)15 -b(do)f(sistema.)-42 1814 y Fo(1)67 b(In)n(tro)r(duction)-42 -1915 y Fn(Lua)18 b(is)f(an)g(extension)g(programmi)o(ng)d(language)j -(designed)g(to)g(supp)q(ort)g(general)g(pro)q(cedural)g(programming)-42 -1972 y(features)k(with)f(data)g(description)g(facilities.)34 -b(It)21 b(is)f(supp)q(osed)i(to)e(b)q(e)h(used)h(as)e(a)g -(con\014guration)g(language)-42 2028 y(for)d(an)o(y)f(program)f(that)i -(needs)g(one.)26 b(Its)17 b(main)e(extensions)i(are)f(related)h(to)f -(ob)s(ject-orien)o(ted)g(facilities,)f(and)-42 2085 y(fallbac)o(ks,)g -(but)h(it)f(has)h(some)f(other)h(minor)e(con)o(tributions.)21 -b(Lua)16 b(has)g(b)q(een)h(designed)g(and)f(implemen)o(ted)e(b)o(y)-42 -2141 y(W.)h(Celes)g(F.,)f(L.)h(H.)g(de)h(Figueiredo)e(and)h(R.)h -(Ierusalimsc)o(h)o(y)l(.)29 2197 y(Lua)c(is)f(implemen)o(ted)f(as)h(a)g -(library)l(,)g(written)g(in)h(C.)f(Being)g(an)h(extension)g(language,)f -(Lua)h(has)f(no)h(notion)f(of)-42 2254 y(a)h(\\main")d(program:)16 -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 -(clien)o(t,)g(called)g(the)g Fm(emb)n(e)n(dding)f Fn(program.)17 -b(This)11 b(host)-42 2310 y(program)i(can)j(in)o(v)o(ok)o(e)e -(functions)h(to)f(execute)i(a)f(piece)g(of)g(co)q(de)g(in)g(Lua,)g(can) -h(write)e(and)h(read)g(Lua)h(v)m(ariables,)-42 2367 y(and)f(can)e -(register)g(C)h(functions)f(to)h(b)q(e)g(called)g(b)o(y)f(Lua)h(co)q -(de.)20 b(Through)14 b(the)g(use)g(of)g(C)f(functions,)h(Lua)g(can)g(b) -q(e)-42 2423 y(augmen)o(ted)d(to)h(cop)q(e)g(with)f(rather)h -(di\013eren)o(t)f(domains,)f(th)o(us)i(creating)f(customized)g -(programmi)o(ng)e(languages)-42 2480 y(sharing)15 b(a)g(syn)o(tactical) -e(framew)o(ork.)29 2536 y(Lua)f(is)e(free)i(distribution)e(soft)o(w)o -(are,)g(and)h(pro)o(vided)g(as)g(usual)g(with)g(no)g(guaran)o(tees.)18 -b(The)11 b(implemen)o(tatio)o(n)-42 2593 y(describ)q(ed)17 -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 -(ftp)h(from)922 2748 y(1)p eop -%%Page: 2 2 -2 1 bop 30 199 a Fl(ftp.icad.puc-rio.br:/pub/lu)o(a/lua-2)o(.2.tar.)o -(gz)-42 293 y Fn(or)15 b(b)o(y)g(WWW)g(\(W)l(orld)f(Wide)h(W)l(eb\))g -(from)30 387 y Fl(http://www.inf.puc-rio.br/~)o(roberto)o(/lua.ht)o(ml) --42 530 y Fo(2)67 b(En)n(vironmen)n(t)25 b(and)e(Mo)r(dules)-42 -632 y Fn(All)10 b(statemen)o(ts)e(in)i(Lua)h(are)f(executed)h(in)g(a)f -Fm(glob)n(al)h(envir)n(onment)p Fn(.)17 b(This)9 b(en)o(vironmen)o(t,)h -(whic)o(h)g(k)o(eeps)h(all)e(global)-42 688 y(v)m(ariables)14 -b(and)g(functions,)f(is)g(initialized)g(at)g(the)h(b)q(eginning)g(of)f -(the)h(em)o(b)q(edding)f(program)f(and)i(p)q(ersists)f(un)o(til)-42 -744 y(its)i(end.)29 801 y(The)g(global)d(en)o(vironmen)o(t)h(can)h(b)q -(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 -(edding)f(program,)e(whic)o(h)-42 857 y(can)k(read)f(and)g(write)g -(global)e(v)m(ariables)i(using)g(functions)g(in)g(the)g(library)f(that) -h(implemen)o(ts)d(Lua.)29 914 y(Global)g(v)m(ariables)h(do)h(not)f -(need)h(declaration.)k(An)o(y)c(v)m(ariable)f(is)g(assumed)g(to)g(b)q -(e)h(global)e(unless)i(explicitly)-42 970 y(declared)20 -b(lo)q(cal)e(\(see)h(lo)q(cal)f(declarations,)h(Section)g(4.4.5\).)30 -b(Before)19 b(the)g(\014rst)g(assignmen)o(t,)e(the)j(v)m(alue)f(of)g(a) --42 1027 y(global)14 b(v)m(ariable)h(is)g Fk(nil)p Fn(.)29 -1083 y(The)g(unit)g(of)g(execution)h(of)e(Lua)i(is)f(called)f(a)h -Fm(chunk)p Fn(.)20 b(The)15 b(syn)o(tax)g(for)f(c)o(h)o(unks)i(is:)1480 -1067 y Fj(1)42 1155 y Fm(chunk)50 b Fi(!)g(f)p Fm(statement)32 -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 -(con)o(tain)h(statemen)o(ts)f(and)i(function)g(de\014nitions,)g(and)g -(ma)o(y)e(b)q(e)j(in)f(a)g(\014le)g(or)f(in)h(a)g(string)f(inside)-42 -1284 y(the)k(host)f(program.)22 b(When)17 b(a)g(c)o(h)o(unk)g(is)f -(executed,)h(\014rst)g(all)e(its)h(functions)g(and)h(statemen)o(ts)e -(are)h(compiled,)-42 1340 y(then)d(the)e(statemen)o(ts)f(are)i -(executed)g(in)g(sequen)o(tial)f(order.)18 b(All)11 b(mo)q -(di\014cations)f(a)i(c)o(h)o(unk)g(e\013ects)f(on)h(the)g(global)-42 -1397 y(en)o(vironmen)o(t)k(p)q(ersist)h(after)f(its)g(end.)27 -b(Those)17 b(include)g(mo)q(di\014cations)f(to)g(global)g(v)m(ariables) -g(and)i(de\014nitions)-42 1453 y(of)d(new)h(functions)285 -1437 y Fj(2)303 1453 y Fn(.)-42 1596 y Fo(3)67 b(T)n(yp)r(es)-42 -1698 y Fn(Lua)14 b(is)g(a)f(dynamically)f(t)o(yp)q(ed)i(language.)k(V)l -(ariables)13 b(do)h(not)f(ha)o(v)o(e)g(t)o(yp)q(es;)h(only)f(v)m(alues) -h(do.)19 b(All)13 b(v)m(alues)h(carry)-42 1754 y(their)h(o)o(wn)g(t)o -(yp)q(e.)20 b(Therefore,)15 b(there)g(are)g(no)g(t)o(yp)q(e)g -(de\014nitions)g(in)g(the)g(language.)29 1811 y(There)20 -b(are)f(sev)o(en)h(basic)f(t)o(yp)q(es)h(in)g(Lua:)29 -b Fm(nil)p Fn(,)19 b Fm(numb)n(er)p Fn(,)h Fm(string)p -Fn(,)g Fm(function)p Fn(,)g Fm(CF)m(unction)p Fn(,)e -Fm(user)n(data)p Fn(,)j(and)-42 1867 y Fm(table)p Fn(.)f -Fm(Nil)14 b Fn(is)g(the)g(t)o(yp)q(e)h(of)f(the)h(v)m(alue)g -Fk(nil)p Fn(,)e(whose)h(main)f(prop)q(ert)o(y)h(is)h(to)e(b)q(e)j -(di\013eren)o(t)d(from)g(an)o(y)h(other)h(v)m(alue.)-42 -1924 y Fm(Numb)n(er)h Fn(represen)o(ts)f(real)f(\(\015oating)g(p)q(oin) -o(t\))g(n)o(um)o(b)q(ers,)h(while)f Fm(string)h Fn(has)g(the)g(usual)g -(meaning.)29 1980 y(F)l(unctions)20 b(are)f(considered)i(\014rst-class) -e(v)m(alues)h(in)g(Lua.)34 b(This)19 b(means)g(that)h(functions)f(can)h -(b)q(e)h(stored)-42 2037 y(in)c(v)m(ariables,)g(passed)g(as)g(argumen)o -(ts)f(to)g(other)h(functions)g(and)g(returned)h(as)e(results.)26 -b(When)17 b(a)g(function)g(is)-42 2093 y(de\014ned)g(in)d(Lua,)h(its)f -(b)q(o)q(dy)i(is)e(compiled)f(and)i(stored)g(in)f(a)h(giv)o(en)f(v)m -(ariable.)19 b(Lua)c(can)g(call)f(\(and)h(manipulate\))-42 -2150 y(functions)g(written)g(in)g(Lua)g(and)h(functions)f(written)f(in) -h(C;)f(the)i(latter)e(ha)o(v)o(e)g(t)o(yp)q(e)i Fm(CF)m(unction)s -Fn(.)29 2206 y(The)i(t)o(yp)q(e)f Fm(user)n(data)h Fn(is)g(pro)o(vided) -f(to)g(allo)o(w)f(arbitrary)f(C)j(p)q(oin)o(ters)f(to)g(b)q(e)h(stored) -f(in)g(Lua)h(v)m(ariables.)26 b(It)-42 2262 y(corresp)q(onds)18 -b(to)f Fl(void*)f Fn(and)i(has)f(no)g(pre-de\014ned)j(op)q(erations)c -(in)h(Lua,)h(b)q(esides)g(assignmen)o(t)d(and)j(equalit)o(y)-42 -2319 y(test.)24 b(Ho)o(w)o(ev)o(er,)16 b(b)o(y)g(using)h(fallbac)o(ks,) -e(the)i(programmer)c(ma)o(y)i(de\014ne)j(op)q(erations)e(for)g -Fm(user)n(data)h Fn(v)m(alues;)g(see)-42 2375 y(Section)f(4.7.)29 -2432 y(The)c(t)o(yp)q(e)g Fm(table)g Fn(implemen)o(ts)d(asso)q(ciativ)o -(e)i(arra)o(ys,)g(that)g(is,)h(arra)o(ys)e(whic)o(h)i(can)g(b)q(e)h -(indexed)g(not)f(only)f(with)-42 2488 y(n)o(um)o(b)q(ers,)k(but)g(with) -g(an)o(y)g(v)m(alue)h(\(except)f Fk(nil)p Fn(\).)20 b(Therefore,)15 -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 -(represen)o(t)p -42 2530 780 2 v 10 2557 a Fh(1)28 2573 -y Fg(As)e(usual,)i Ff(f)p Fe(a)s Ff(g)f Fg(means)h(0)f(or)g(more)g -Fe(a)s Fg('s,)f([)p Fe(a)s Fg(])f(means)j(an)f(optional)j -Fe(a)c Fg(and)i Ff(f)p Fe(a)s Ff(g)1179 2557 y Fh(+)1217 -2573 y Fg(means)f(one)h(or)f(more)g Fe(a)s Fg('s.)10 -2603 y Fh(2)28 2619 y Fg(Actually)m(,)h(a)f(function)h(de\014nition)i -(is)d(an)h(assignmen)o(t)h(to)d(a)h(global)j(v)n(ariable;)e(see)f -(Section)i(3.)922 2748 y Fn(2)p eop -%%Page: 3 3 -3 2 bop -42 199 a Fn(ordinary)15 b(arra)o(ys,)e(but)i(also)f(sym)o(b)q -(ol)g(tables,)g(sets,)g(records,)h(etc.)20 b(T)l(o)15 -b(represen)o(t)g(records,)f(Lua)i(uses)f(the)g(\014eld)-42 -256 y(name)k(as)f(an)h(index.)32 b(The)19 b(language)g(supp)q(orts)g -(this)f(represen)o(tation)g(b)o(y)i(pro)o(viding)e Fl(a.name)g -Fn(as)g(syn)o(tactic)-42 312 y(sugar)i(for)f Fl(a["name"])p -Fn(.)33 b(T)l(ables)20 b(ma)o(y)e(also)h(carry)g(metho)q(ds.)34 -b(Because)20 b(functions)g(are)g(\014rst)f(class)h(v)m(alues,)-42 -369 y(table)d(\014elds)g(ma)o(y)e(con)o(tain)g(functions.)25 -b(The)16 b(form)f Fl(t:f\(x\))h Fn(is)g(syn)o(tactic)g(sugar)g(for)g -Fl(t.f\(t,x\))p Fn(,)g(whic)o(h)g(calls)-42 425 y(the)g(metho)q(d)e -Fl(f)h Fn(from)f(the)h(table)g Fl(t)g Fn(passing)f(itself)g(as)h(the)g -(\014rst)g(parameter.)29 482 y(It)d(is)f(imp)q(ortan)o(t)e(to)i(notice) -g(that)g(tables)g(are)g(ob)s(jects,)g(and)h(not)f(v)m(alues.)19 -b(V)l(ariables)10 b(cannot)i(con)o(tain)e(tables,)-42 -538 y(only)15 b(references)g(to)f(them.)19 b(Assignmen)o(t,)12 -b(parameter)h(passing)i(and)f(returns)h(alw)o(a)o(ys)e(manipulate)g -(references)-42 594 y(to)k(tables,)f(and)i(do)f(not)f(imply)g(an)o(y)h -(kind)g(of)f(cop)o(y)l(.)26 b(Moreo)o(v)o(er,)16 b(tables)g(m)o(ust)f -(b)q(e)j(explicitly)e(created)h(b)q(efore)-42 651 y(used;)f(see)f -(Section)g(4.5.7.)-42 794 y Fo(4)67 b(The)23 b(Language)-42 -895 y Fn(This)15 b(section)g(describ)q(es)h(the)f(lexis,)f(syn)o(tax)h -(and)g(seman)o(tics)e(of)i(Lua.)-42 1017 y Fd(4.1)56 -b(Lexical)19 b(Con)n(v)n(en)n(tions)-42 1103 y Fn(Lua)g(is)e(a)g(case)h -(sensitiv)o(e)f(language.)27 b(Iden)o(ti\014ers)18 b(can)g(b)q(e)g(an)o -(y)f(string)g(of)g(letters,)h(digits,)e(and)i(underscores,)-42 -1159 y(not)d(b)q(eginning)h(with)e(a)h(digit.)k(The)c(follo)o(wing)e(w) -o(ords)i(are)f(reserv)o(ed,)h(and)h(cannot)f(b)q(e)h(used)f(as)g(iden)o -(ti\014ers:)173 1253 y Fl(and)143 b(do)191 b(else)142 -b(elseif)95 b(end)173 1309 y(function)23 b(if)191 b(local)118 -b(nil)167 b(not)173 1366 y(or)g(repeat)95 b(return)f(until)119 -b(then)95 b(while)29 1459 y Fn(The)15 b(follo)o(wing)e(strings)i -(denote)g(other)g(tok)o(ens:)173 1552 y Fl(~=)48 b(<=)f(>=)h(<)71 -b(>)h(==)47 b(=)71 b(..)48 b(+)71 b(-)h(*)f(/)173 1609 -y(\045)h(\()f(\))h({)f(})h([)f(])g(;)h(,)f(.)29 1702 -y Fn(Literal)17 b(strings)f(can)i(b)q(e)g(delimited)e(b)o(y)i(matc)o -(hing)d(single)i(or)g(double)h(quotes,)g(and)f(can)h(con)o(tain)f(the)h -(C-)-42 1758 y(lik)o(e)i(escap)q(e)i(sequences)g Fl('\\n')p -Fn(,)f Fl('\\t')f Fn(and)h Fl('\\r')p Fn(.)36 b(Literal)20 -b(strings)g(can)g(also)g(b)q(e)i(delimited)d(b)o(y)h(matc)o(hing)-42 -1815 y Fl([[)k(...)g(]])p Fn(.)18 b(Literals)12 b(in)h(this)f(last)g -(form)f(ma)o(y)h(run)h(for)f(sev)o(eral)g(lines,)h(ma)o(y)e(con)o(tain) -h(nested)i Fl([[)23 b(...)h(]])p Fn(,)12 b(and)-42 1871 -y(do)k(not)e(in)o(terpret)h(escap)q(e)h(sequences.)29 -1928 y(Commen)o(ts)c(start)h(an)o(ywhere)i(outside)g(a)f(string)g(with) -g(a)g(double)h(h)o(yphen)h(\()p Fl(--)p Fn(\))e(and)h(run)g(un)o(til)f -(the)g(end)i(of)-42 1984 y(the)g(line.)29 2041 y(Numerical)h(constan)o -(ts)g(ma)o(y)f(b)q(e)j(written)e(with)h(an)g(optional)e(decimal)h -(part,)h(and)g(an)g(optional)f(decimal)-42 2097 y(exp)q(onen)o(t.)k -(Examples)14 b(of)g(v)m(alid)h(n)o(umerical)f(constan)o(ts)g(are:)126 -2190 y Fl(4)119 b(4.)g(.4)g(4.57e-3)f(.3e12)-42 2312 -y Fd(4.2)56 b(Co)r(ercion)-42 2398 y Fn(Lua)19 b(pro)o(vides)f(some)f -(automatic)f(con)o(v)o(ersions.)29 b(An)o(y)19 b(arithmetic)d(op)q -(eration)i(applied)g(to)g(a)g(string)f(tries)h(to)-42 -2454 y(con)o(v)o(ert)d(that)f(string)g(to)h(a)f(n)o(um)o(b)q(er,)g -(follo)o(wing)f(the)i(usual)g(rules.)20 b(Con)o(v)o(ersely)l(,)14 -b(whenev)o(er)h(a)g(n)o(um)o(b)q(er)f(is)h(used)-42 2511 -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 -(con)o(v)o(erted)g(to)f(a)h(string,)f(according)h(to)f(the)h(follo)o -(wing)e(rule:)20 b(if)-42 2567 y(the)13 b(n)o(um)o(b)q(er)g(is)f(an)h -(in)o(teger,)f(it)g(is)g(written)g(without)g(exp)q(onen)o(t)h(or)f -(decimal)f(p)q(oin)o(t;)i(otherwise,)f(it)g(is)h(formatted)-42 -2623 y(follo)o(wing)g(the)j(\\)p Fl(\045g)p Fn(")e(con)o(v)o(ersion)g -(sp)q(eci\014cation)h(of)g(the)h(standard)e Fl(printf)h -Fn(C)g(function.)922 2748 y(3)p eop -%%Page: 4 4 -4 3 bop -42 199 a Fd(4.3)56 b(Adjustmen)n(t)-42 285 y -Fn(F)l(unctions)14 b(in)g(Lua)h(can)f(return)g(man)o(y)f(v)m(alues.)19 -b(Because)c(there)f(are)g(no)g(t)o(yp)q(e)h(declarations,)d(the)i -(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 -(alues)i(a)g(function)f(will)g(return,)g(or)h(ho)o(w)f(man)o(y)f -(parameters)g(it)h(needs.)28 b(Therefore,)-42 398 y(sometimes,)10 -b(a)i(list)g(of)g(v)m(alues)h(m)o(ust)e(b)q(e)i Fm(adjuste)n(d)5 -b Fn(,)13 b(at)f(run)g(time,)f(to)h(a)h(giv)o(en)f(length.)18 -b(If)13 b(there)g(are)f(more)f(v)m(alues)-42 454 y(than)17 -b(are)f(needed,)i(the)f(last)f(v)m(alues)h(are)f(thro)o(wn)g(a)o(w)o(a) -o(y)l(.)23 b(If)17 b(there)g(are)f(more)g(needs)h(than)g(v)m(alues,)g -(the)f(list)g(is)-42 511 y(extended)j(with)e(as)h(man)o(y)e -Fk(nil)p Fn('s)h(as)g(needed.)29 b(Adjustmen)o(t)17 b(o)q(ccurs)h(in)f -(m)o(ultiple)f(assignmen)o(t)g(and)i(function)-42 567 -y(calls.)-42 689 y Fd(4.4)56 b(Statemen)n(ts)-42 775 -y Fn(Lua)19 b(supp)q(orts)f(an)f(almost)f(con)o(v)o(en)o(tional)g(set)i -(of)f(statemen)o(ts.)26 b(The)18 b(con)o(v)o(en)o(tional)e(commands)f -(include)k(as-)-42 831 y(signmen)o(t,)d(con)o(trol)f(structures)i(and)g -(pro)q(cedure)h(calls.)24 b(Non-con)o(v)o(en)o(tional)16 -b(commands)e(include)k(table)e(con-)-42 888 y(structors,)e(explained)i -(in)f(Section)g(4.5.7,)e(and)i(lo)q(cal)g(v)m(ariable)f(declarations.) --42 1008 y Fk(4.4.1)52 b(Blo)q(c)o(ks)-42 1094 y Fn(A)15 -b(blo)q(c)o(k)f(is)f(a)h(list)f(of)h(statemen)o(ts,)e(executed)j -(sequen)o(tially)l(.)k(An)o(y)14 b(statemen)o(t)e(can)j(b)q(e)g -(optionally)d(follo)o(w)o(ed)h(b)o(y)-42 1150 y(a)i(semicolon.)42 -1209 y Fm(blo)n(ck)49 b Fi(!)h(f)p Fm(stat)16 b(sc)s -Fi(g)g Fn([)p Fm(r)n(et)f(sc)s Fn(])98 1266 y Fm(sc)49 -b Fi(!)h Fn([';'])-42 1334 y(F)l(or)13 b(syn)o(tactic)f(reasons,)g(a)h -(return)g(statemen)o(t)e(can)i(only)g(b)q(e)g(written)f(as)h(the)g -(last)f(statemen)o(t)f(of)h(a)h(blo)q(c)o(k.)19 b(This)-42 -1391 y(restriction)14 b(also)g(a)o(v)o(oids)g(some)g(\\statemen)o(t)f -(not)i(reac)o(hed")g(errors.)-42 1511 y Fk(4.4.2)52 b(Assignmen)o(t)-42 -1597 y Fn(The)18 b(language)e(allo)o(ws)f(m)o(ultiple)g(assignmen)o(t.) -23 b(Therefore,)17 b(the)g(syn)o(tax)g(de\014nes)h(a)f(list)e(of)i(v)m -(ariables)f(on)h(the)-42 1653 y(left)h(side,)g(and)h(a)e(list)g(of)h -(expressions)g(on)g(the)g(righ)o(t)f(side.)29 b(Both)18 -b(lists)f(ha)o(v)o(e)g(their)h(elemen)o(ts)f(separated)h(b)o(y)-42 -1709 y(commas.)116 1769 y Fm(stat)50 b Fi(!)g Fm(varlist1)16 -b Fn('=')g Fm(explist1)42 1825 y(varlist1)50 b Fi(!)g -Fm(var)17 b Fi(f)p Fn(',')d Fm(var)5 b Fi(g)-42 1894 -y Fn(This)15 b(statemen)o(t)d(\014rst)i(ev)m(aluates)g(all)g(v)m(alues) -g(on)h(the)f(righ)o(t)g(side)g(and)h(ev)o(en)o(tual)f(indices)g(on)h -(the)f(left)g(side,)g(and)-42 1950 y(then)i(mak)o(es)e(the)h(assignmen) -o(ts.)j(Therefore,)c(it)h(can)g(b)q(e)h(used)g(to)e(exc)o(hange)i(t)o -(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 -2138 y Fn(Before)f(the)g(assignmen)o(t,)f(the)g(list)f(of)i(v)m(alues)f -(is)g Fm(adjuste)n(d)h Fn(to)f(the)h(length)f(of)g(the)h(list)e(of)h(v) -m(ariables;)j(see)-42 2194 y(Section)16 b(4.3.)42 2266 -y Fm(var)50 b Fi(!)g Fm(name)-42 2338 y Fn(A)16 b(single)e(name)g(can)i -(denote)f(a)g(global)f(or)h(a)g(lo)q(cal)f(v)m(ariable,)g(or)h(a)g -(formal)d(parameter.)42 2410 y Fm(var)50 b Fi(!)g Fm(var)17 -b Fn('[')e Fm(exp1)i Fn(']')-42 2483 y(Square)j(brac)o(k)o(ets)f(are)h -(used)g(to)f(index)h(a)f(table.)33 b(If)20 b Fl(var)f -Fn(results)g(in)g(a)h(table)f(v)m(alue,)h(the)g(\014eld)g(indexed)h(b)o -(y)-42 2539 y(the)c(expression)f(v)m(alue)h(gets)f(the)h(assigned)f(v)m -(alue.)24 b(Otherwise,)16 b(the)h(fallbac)o(k)e Fm(settable)h -Fn(is)g(called,)g(with)f(three)922 2748 y(4)p eop -%%Page: 5 5 -5 4 bop -42 199 a Fn(parameters:)31 b(the)22 b(v)m(alue)f(of)g -Fl(var)p Fn(,)h(the)g(v)m(alue)g(of)f(expression,)h(and)g(the)f(v)m -(alue)h(b)q(eing)g(assigned)f(to)g(it;)i(see)-42 256 -y(Section)16 b(4.7.)42 328 y Fm(var)50 b Fi(!)g Fm(var)17 -b Fn('.')j Fm(name)-42 400 y Fn(The)c(syn)o(tax)e Fl(var.NAME)g -Fn(is)h(just)g(syn)o(tactic)f(sugar)h(for)f Fl(var["NAME"])p -Fn(.)-42 520 y Fk(4.4.3)52 b(Con)o(trol)17 b(Structures)-42 -606 y Fn(The)k(condition)e(expression)h(of)f(a)h(con)o(trol)e -(structure)i(can)g(return)g(an)o(y)g(v)m(alue.)34 b(All)19 -b(v)m(alues)h(di\013eren)o(t)f(from)-42 662 y Fk(nil)f -Fn(are)g(considered)g(true,)h(while)f Fk(nil)f Fn(is)h(considered)h -(false.)28 b Fl(if)p Fn('s,)18 b Fl(while)p Fn('s)f(and)h -Fl(repeat)p Fn('s)f(ha)o(v)o(e)h(the)h(usual)-42 719 -y(meaning.)70 787 y Fm(stat)50 b Fi(!)g Fk(while)15 b -Fm(exp1)i Fk(do)f Fm(blo)n(ck)g Fk(end)245 843 y Fi(j)32 -b Fk(rep)q(eat)17 b Fm(blo)n(ck)f Fk(un)o(til)f Fm(exp1)245 -900 y Fi(j)32 b Fk(if)16 b Fm(exp1)h Fk(then)g Fm(blo)n(ck)e -Fi(f)p Fm(elseif)8 b Fi(g)16 b Fn([)p Fk(else)f Fm(blo)n(ck)5 -b Fn(])15 b Fk(end)42 956 y Fm(elseif)49 b Fi(!)h Fk(elseif)15 -b Fm(exp1)i Fk(then)f Fm(blo)n(ck)29 1049 y Fn(A)g Fl(return)g -Fn(is)g(used)g(to)g(return)g(v)m(alues)h(from)d(a)i(function.)23 -b(Because)17 b(a)f(function)g(ma)o(y)f(return)h(more)f(than)-42 -1106 y(one)h(v)m(alue,)f(the)g(syn)o(tax)g(for)f(a)h(return)g(statemen) -o(t)e(is:)42 1178 y Fm(r)n(et)50 b Fi(!)g Fk(return)16 -b Fm(explist)-42 1370 y Fk(4.4.4)52 b(Expressions)16 -b(as)h(Statemen)o(ts)-42 1456 y Fn(All)h(expressions)h(with)f(p)q -(ossible)g(side-e\013ects)h(can)f(b)q(e)i(executed)f(as)g(statemen)o -(ts.)28 b(These)19 b(include)g(function)-42 1512 y(calls)c(and)g(table) -g(constructors:)42 1572 y Fm(stat)50 b Fi(!)g Fm(functionc)n(al)r(l)42 -1628 y(stat)g Fi(!)g Fm(table)n(c)n(onstructor)-42 1697 -y Fn(Ev)o(en)o(tual)14 b(returned)h(v)m(alues)g(are)g(thro)o(wn)f(a)o -(w)o(a)o(y)l(.)k(F)l(unction)c(calls)g(are)h(explained)f(in)h(Section)f -(4.5.8;)f(construc-)-42 1753 y(tors)i(are)g(the)g(sub)s(ject)g(of)g -(Section)g(4.5.7.)-42 1873 y Fk(4.4.5)52 b(Lo)q(cal)19 -b(Declarations)-42 1959 y Fn(Lo)q(cal)e(v)m(ariables)e(can)h(b)q(e)h -(declared)f(an)o(ywhere)g(inside)g(a)g(blo)q(c)o(k.)22 -b(Their)16 b(scop)q(e)h(b)q(egins)f(after)f(the)i(declaration)-42 -2015 y(and)f(lasts)e(un)o(til)g(the)i(end)f(of)g(the)g(blo)q(c)o(k.)20 -b(The)15 b(declaration)f(ma)o(y)g(include)i(an)f(initial)e(assignmen)o -(t:)92 2083 y Fm(stat)50 b Fi(!)g Fk(lo)q(cal)17 b Fm(de)n(clist)e -Fn([)p Fm(init)t Fn(])42 2140 y Fm(de)n(clist)49 b Fi(!)h -Fm(name)16 b Fi(f)p Fn(',')f Fm(name)s Fi(g)96 2196 y -Fm(init)49 b Fi(!)h Fn('=')16 b Fm(explist1)-42 2265 -y Fn(If)f(there)f(is)f(an)h(initial)e(assignmen)o(t,)g(it)h(has)h(the)g -(same)f(seman)o(tics)f(of)h(a)h(m)o(ultiple)e(assignmen)o(t.)17 -b(Otherwise,)d(all)-42 2321 y(v)m(ariables)h(are)g(initialized)e(with)i -Fk(nil)p Fn(.)-42 2443 y Fd(4.5)56 b(Expressions)-42 -2529 y Fk(4.5.1)c(Simple)15 b(Expressions)-42 2614 y -Fn(Simple)f(expressions)h(are:)922 2748 y(5)p eop -%%Page: 6 6 -6 5 bop 42 193 a Fm(exp)50 b Fi(!)g Fn('\(')16 b Fm(exp)g -Fn('\)')42 250 y Fm(exp)50 b Fi(!)g Fk(nil)42 306 y Fm(exp)g -Fi(!)g Fn('n)o(um)o(b)q(er')42 362 y Fm(exp)g Fi(!)g -Fn('literal')42 419 y Fm(exp)g Fi(!)g Fm(var)-42 490 -y Fn(Num)o(b)q(ers)22 b(\(n)o(umerical)f(constan)o(ts\))g(and)i(string) -f(literals)f(are)h(explained)h(in)f(Section)h(4.1.)41 -b(V)l(ariables)22 b(are)-42 546 y(explained)16 b(in)f(Section)g(4.4.2.) --42 665 y Fk(4.5.2)52 b(Arithmetic)15 b(Op)q(erators)-42 -751 y Fn(Lua)21 b(supp)q(orts)g(the)g(usual)f(arithmetic)e(op)q -(erators.)35 b(These)21 b(op)q(erators)f(are)g(the)g(binary)h -Fl(+)p Fn(,)g Fl(-)p Fn(,)g Fl(*)p Fn(,)h Fl(/)e Fn(and)h -Fl(^)-42 808 y Fn(\(exp)q(onen)o(tiation\),)15 b(and)h(the)g(unary)g -Fl(-)p Fn(.)22 b(If)16 b(the)g(op)q(erands)g(are)g(n)o(um)o(b)q(ers,)f -(or)g(strings)g(that)g(can)h(b)q(e)h(con)o(v)o(erted)-42 -864 y(to)d(n)o(um)o(b)q(ers,)g(according)g(to)g(the)g(rules)g(giv)o(en) -g(in)h(Section)f(4.2,)f(all)h(op)q(erations)f(but)i(exp)q(onen)o -(tiation)e(ha)o(v)o(e)h(the)-42 920 y(usual)f(meaning.)18 -b(Otherwise,)13 b(the)g(fallbac)o(k)f(\\arith")g(is)g(called;)h(see)g -(Section)g(4.7.)19 b(An)13 b(exp)q(onen)o(tiation)f(alw)o(a)o(ys)-42 -977 y(calls)k(this)f(fallbac)o(k.)22 b(The)16 b(standard)g -(mathematical)c(library)j(rede\014nes)j(this)d(fallbac)o(k,)g(giving)g -(the)h(exp)q(ected)-42 1033 y(meaning)e(to)h(exp)q(onen)o(tiation;)f -(see)h(Section)g(6.3.)-42 1152 y Fk(4.5.3)52 b(Relational)18 -b(Op)q(erators)-42 1238 y Fn(Lua)e(o\013ers)e(the)i(follo)o(wing)d -(relational)g(op)q(erators:)126 1327 y Fl(<)71 b(>)g(<=)48 -b(>=)f(~=)h(==)-42 1415 y Fn(All)15 b(return)g Fk(nil)f -Fn(as)h(false)g(and)g(1)g(as)g(true.)29 1472 y(Equalit)o(y)g(\014rst)h -(compares)f(the)i(t)o(yp)q(es)f(of)h(its)e(op)q(erands.)24 -b(If)17 b(they)g(are)f(di\013eren)o(t,)g(the)g(result)g(is)g -Fk(nil)p Fn(.)23 b(Oth-)-42 1528 y(erwise,)18 b(their)f(v)m(alues)h -(are)g(compared.)26 b(Num)o(b)q(ers)17 b(and)h(strings)f(are)h -(compared)e(in)i(the)g(usual)f(w)o(a)o(y)l(.)27 b(T)l(ables,)-42 -1585 y(CF)l(unctions,)14 b(and)g(functions)g(are)g(compared)f(b)o(y)h -(reference,)h(that)e(is,)h(t)o(w)o(o)e(tables)i(are)g(considered)g -(equal)g(only)-42 1641 y(if)h(they)g(are)g(the)h(same)d(table.)20 -b(The)15 b(op)q(erator)g Fl(~=)f Fn(is)h(exactly)g(the)g(negation)f(of) -h(equalit)o(y)f(\()p Fl(=)p Fn(\).)29 1698 y(The)19 b(other)g(op)q -(erators)f(w)o(ork)g(as)g(follo)o(ws.)29 b(If)19 b(b)q(oth)g(argumen)o -(ts)e(are)i(n)o(um)o(b)q(ers,)f(they)h(are)g(compared)f(as)-42 -1754 y(suc)o(h.)27 b(Otherwise,)17 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(strings,)f(their)h(v)m(alues)g(are)g -(compared)g(using)-42 1811 y(lexicographical)d(order.)20 -b(Otherwise,)14 b(the)i(fallbac)o(k)d(\\order")i(is)g(called;)f(see)h -(Section)h(4.7.)-42 1930 y Fk(4.5.4)52 b(Logical)18 b(Op)q(erators)-42 -2016 y Fn(All)f(logical)f(op)q(erators,)g(lik)o(e)h(con)o(trol)f -(structures,)h(consider)g Fk(nil)g Fn(as)g(false)g(and)g(an)o(ything)g -(else)g(as)g(true.)26 b(The)-42 2072 y(logical)14 b(op)q(erators)g -(are:)269 2161 y Fl(and)71 b(or)g(not)-42 2249 y Fn(The)17 -b(op)q(erators)f Fl(and)g Fn(and)h Fl(or)f Fn(use)h(short-cut)f(ev)m -(aluation,)g(that)g(is,)g(the)h(second)g(op)q(erand)g(is)f(ev)m -(aluated)h(only)-42 2306 y(if)e(necessary)l(.)-42 2425 -y Fk(4.5.5)52 b(Concatenation)-42 2511 y Fn(Lua)18 b(o\013ers)d(a)i -(string)f(concatenation)g(op)q(erator,)f(denoted)j(b)o(y)e(\\)p -Fl(..)p Fn(".)24 b(If)17 b(op)q(erands)g(are)g(strings)e(or)i(n)o(um)o -(b)q(ers,)-42 2567 y(they)c(are)g(con)o(v)o(erted)f(to)g(strings)g -(according)g(to)g(the)h(rules)f(in)h(Section)f(4.2.)18 -b(Otherwise,)13 b(the)g(fallbac)o(k)e(\\concat")-42 2623 -y(is)k(called;)g(see)g(Section)g(4.7.)922 2748 y(6)p -eop -%%Page: 7 7 -7 6 bop -42 199 a Fk(4.5.6)52 b(Precedence)-42 285 y -Fn(Op)q(erator)15 b(precedence)i(follo)o(ws)d(the)h(table)g(b)q(elo)o -(w,)f(from)f(the)j(lo)o(w)o(er)d(to)i(the)g(higher)g(priorit)o(y:)269 -379 y Fl(and)71 b(or)269 435 y(<)g(>)h(<=)47 b(>=)h(~=)f(=)269 -492 y(..)269 548 y(+)71 b(-)269 605 y(*)g(/)269 661 y(not)47 -b(-)24 b(\(unary\))269 718 y(^)-42 811 y Fn(All)15 b(binary)g(op)q -(erators)f(are)h(left)f(asso)q(ciativ)o(e,)g(except)h(for)g -Fl(^)p Fn(,)g(whic)o(h)g(is)f(righ)o(t)g(asso)q(ciativ)o(e.)-42 -931 y Fk(4.5.7)52 b(T)l(able)18 b(Constructors)-42 1017 -y Fn(T)l(able)d(constructors)f(are)h(expressions)g(that)f(create)h -(tables;)f(ev)o(ery)h(time)e(a)i(constructor)f(is)h(ev)m(aluated,)g(a)f -(new)-42 1074 y(table)f(is)g(created.)19 b(Constructors)12 -b(can)h(b)q(e)h(used)g(to)e(create)h(empt)o(y)f(tables,)g(or)h(to)g -(create)g(a)f(table)h(and)g(initialize)-42 1130 y(some)h(\014elds.)29 -1187 y(The)h(general)g(syn)o(tax)g(for)f(constructors)h(is:)42 -1255 y Fm(table)n(c)n(onstructor)49 b Fi(!)i Fn(')p Fi(f)p -Fn(')15 b Fm(\014eld)r(list)g Fn(')p Fi(g)p Fn(')212 -1311 y Fm(\014eld)r(list)48 b Fi(!)j Fm(l\014eld)r(list)31 -b Fi(j)16 b Fm(\016eld)r(list)31 b Fi(j)16 b Fm(l\014eld)r(list)f -Fn(';')g Fm(\016eld)r(list)200 1368 y(l\014eld)r(list)48 -b Fi(!)j Fn([)p Fm(l\014eld)r(list1)6 b Fn(])197 1424 -y Fm(\016eld)r(list)49 b Fi(!)i Fn([)p Fm(\016eld)r(list1)6 -b Fn(])29 1517 y(The)15 b(form)f Fm(l\014eld)r(list1)g -Fn(is)h(used)g(to)g(initialize)e(lists.)42 1589 y Fm(l\014eld)r(list1) -49 b Fi(!)h Fm(exp)16 b Fi(f)p Fn(',')f Fm(exp)s Fi(g)h -Fn([','])-42 1662 y(The)i(expressions)f(in)g(the)g(list)f(are)h -(assigned)g(to)g(consecutiv)o(e)g(n)o(umerical)f(indexes,)h(starting)f -(with)h(1.)25 b(As)18 b(an)-42 1718 y(example:)30 1812 -y Fl(a)24 b(=)g({"v1",)f("v2",)g(34})-42 1906 y Fn(is)15 -b(equiv)m(alen)o(t)g(to:)30 2000 y Fl(temp)23 b(=)h({})30 -2056 y(temp[1])f(=)h("v1")30 2112 y(temp[2])f(=)h("v2")30 -2169 y(temp[3])f(=)h(34)30 2225 y(a)g(=)g(temp)29 2319 -y Fn(The)15 b(next)h(form)d(initializes)g(named)i(\014elds)g(in)g(a)g -(table.)42 2378 y Fm(\016eld)r(list1)50 b Fi(!)g Fm(\016eld)16 -b Fi(f)p Fn(',')f Fm(\016eld)5 b Fi(g)15 b Fn([','])127 -2435 y Fm(\016eld)50 b Fi(!)g Fm(name)16 b Fn('=')g Fm(exp)-42 -2503 y Fn(As)g(an)f(example:)30 2597 y Fl(a)24 b(=)g({x)f(=)h(1,)f(y)h -(=)g(3})922 2748 y Fn(7)p eop -%%Page: 8 8 -8 7 bop -42 199 a Fn(is)15 b(equiv)m(alen)o(t)g(to:)30 -293 y Fl(temp)23 b(=)h({})30 350 y(temp.x)f(=)h(1)30 -406 y(temp.y)f(=)h(3)30 462 y(a)g(=)g(temp)-42 582 y -Fk(4.5.8)52 b(F)l(unction)18 b(Calls)-42 668 y Fn(A)e(function)f(call)f -(has)h(the)g(follo)o(wing)e(syn)o(tax:)42 740 y Fm(functionc)n(al)r(l) -49 b Fi(!)h Fm(var)17 b(r)n(e)n(alPar)n(ams)-42 813 y -Fn(Here,)i Fl(var)e Fn(can)h(b)q(e)h(an)o(y)e(v)m(ariable)h(\(global,)e -(lo)q(cal,)i(indexed,)g(etc\).)28 b(If)18 b(its)f(t)o(yp)q(e)h(is)g -Fm(function)j Fn(or)c Fm(CF)m(unction)s Fn(,)-42 869 -y(this)g(function)g(is)f(called.)25 b(Otherwise,)17 b(the)g(fallbac)o -(k)f(\\function")g(is)h(called,)g(ha)o(ving)f(as)g(\014rst)h(parameter) -e(the)-42 925 y(v)m(alue)h(of)f Fl(var)p Fn(,)f(and)h(then)h(the)f -(original)f(call)g(parameters.)29 982 y(The)h(form:)42 -1054 y Fm(functionc)n(al)r(l)49 b Fi(!)h Fm(var)17 b -Fn(':')j Fm(name)c(r)n(e)n(alPar)n(ams)-42 1126 y Fn(can)g(b)q(e)g -(used)f(to)g(call)f(\\metho)q(ds".)19 b(A)c(call)f Fl(var:name\(...\))g -Fn(is)g(syn)o(tactic)h(sugar)f(for)6 1220 y Fl(var.name\(var,)22 -b(...\))-42 1314 y Fn(except)16 b(that)f Fl(var)f Fn(is)h(ev)m(aluated) -g(only)g(once.)42 1382 y Fm(r)n(e)n(alPar)n(ams)49 b -Fi(!)h Fn('\(')16 b([)p Fm(explist1)6 b Fn(])15 b('\)')42 -1438 y Fm(r)n(e)n(alPar)n(ams)49 b Fi(!)h Fm(table)n(c)n(onstructor)115 -1495 y(explist1)f Fi(!)h Fm(exp1)17 b Fi(f)p Fn(',')e -Fm(exp1)6 b Fi(g)-42 1563 y Fn(All)18 b(argumen)o(t)e(expressions)i -(are)g(ev)m(aluated)g(b)q(efore)g(the)h(call;)f(then)g(the)g(list)f(of) -h(argumen)o(ts)e(is)i(adjusted)g(to)-42 1620 y(the)j(length)f(of)f(the) -h(list)f(of)h(parameters)e(\(see)j(Section)f(4.3\);)h(\014nally)l(,)f -(this)g(list)f(is)g(assigned)h(to)g(the)g(formal)-42 -1676 y(parameters.)g(A)15 b(call)g(of)g(the)h(form)e -Fl(f{...})h Fn(is)g(syn)o(tactic)f(sugar)h(for)g Fl(f\({...}\))p -Fn(,)f(that)h(is,)g(the)h(parameter)e(list)-42 1732 y(is)h(a)g(single)g -(new)g(table.)29 1789 y(Because)h(a)f(function)h(can)g(return)f(an)o(y) -g(n)o(um)o(b)q(er)g(of)g(results)g(\(see)h(Section)f(4.4.3\),)e(the)j -(n)o(um)o(b)q(er)f(of)g(results)-42 1845 y(m)o(ust)c(b)q(e)i(adjusted)f -(b)q(efore)h(used.)19 b(If)13 b(the)f(function)g(is)g(called)f(as)h(an) -g(statemen)o(t)e(\(see)j(Section)f(4.4.4\),)e(its)h(return)-42 -1902 y(list)18 b(is)h(adjusted)g(to)g(0.)31 b(If)20 b(the)f(function)g -(is)g(called)g(in)g(a)g(place)g(that)f(needs)i(a)f(single)f(v)m(alue)i -(\(syn)o(tactically)-42 1958 y(denoted)f(b)o(y)f(the)g(non-terminal)e -Fl(exp1)p Fn(\),)h(its)g(return)h(list)f(is)g(adjusted)h(to)g(1.)27 -b(If)18 b(the)g(function)g(is)g(called)f(in)h(a)-42 2015 -y(place)f(that)g(can)g(hold)g(man)o(y)e(v)m(alues)i(\(syn)o(tactically) -e(denoted)j(b)o(y)f(the)g(non-terminal)e Fl(exp)p Fn(\),)h(no)h -(adjustmen)o(t)-42 2071 y(is)e(done.)-42 2193 y Fd(4.6)56 -b(F)-5 b(unction)20 b(De\014nitions)-42 2279 y Fn(F)l(unctions)15 -b(in)f(Lua)g(can)h(b)q(e)g(de\014ned)h(an)o(ywhere)e(in)g(the)g(global) -f(lev)o(el)h(of)g(a)g(mo)q(dule.)19 b(The)14 b(syn)o(tax)g(for)g -(function)-42 2335 y(de\014nition)i(is:)42 2407 y Fm(function)50 -b Fi(!)g Fk(function)16 b Fm(var)h Fn('\(')e([)p Fm(p)n(arlist1)6 -b Fn(])16 b('\)')f Fm(blo)n(ck)g Fk(end)29 2536 y Fn(When)f(Lua)g -(pre-compiles)f(a)g(c)o(h)o(unk,)h(all)f(its)f(function)i(b)q(o)q(dies) -g(are)f(pre-compiled,)g(to)q(o.)19 b(Then,)14 b(when)g(Lua)-42 -2592 y(\\executes")i(the)f(function)g(de\014nition,)g(its)f(b)q(o)q(dy) -i(is)f(stored,)f(with)h(t)o(yp)q(e)g Fm(function)p Fn(,)f(in)o(to)g -(the)i(v)m(ariable)e Fl(var)p Fn(.)922 2748 y(8)p eop -%%Page: 9 9 -9 8 bop 29 199 a Fn(P)o(arameters)13 b(act)i(as)f(lo)q(cal)h(v)m -(ariables,)f(initialized)f(with)i(the)g(argumen)o(t)f(v)m(alues.)42 -271 y Fm(p)n(arlist1)50 b Fi(!)g Fm('name')16 b Fi(f)p -Fn(',')f Fm(name)s Fi(g)29 400 y Fn(Results)g(are)f(returned)h(using)f -(the)h Fl(return)f Fn(statemen)o(t)e(\(see)j(Section)f(4.4.3\).)k(If)d -(con)o(trol)e(reac)o(hes)i(the)g(end)-42 456 y(of)g(a)g(function)g -(without)f(a)h(return)g(instruction,)f(the)h(function)g(returns)h(with) -e(no)h(results.)29 513 y(There)22 b(is)f(a)g(sp)q(ecial)g(syn)o(tax)g -(for)g(de\014nition)h(of)f(metho)q(ds,)h(that)e(is,)j(functions)e(whic) -o(h)g(ha)o(v)o(e)h(an)f(extra)-42 569 y(parameter)14 -b Fm(self)p Fn(.)42 641 y Fm(function)50 b Fi(!)g Fk(function)16 -b Fm(var)h Fn(':')j Fm(name)c Fn('\(')f([)p Fm(p)n(arlist1)6 -b Fn(])16 b('\)')f Fm(blo)n(ck)g Fk(end)-42 714 y Fn(A)h(declaration)e -(lik)o(e)-42 807 y Fl(function)23 b(v:f)h(\(...\))6 864 -y(...)-42 920 y(end)-42 1014 y Fn(is)15 b(equiv)m(alen)o(t)g(to)-42 -1108 y Fl(function)23 b(v.f)h(\(self,)f(...\))6 1164 -y(...)-42 1221 y(end)-42 1315 y Fn(that)16 b(is,)g(the)g(function)g -(gets)g(an)g(extra)f(formal)f(parameter)h(called)h Fl(self)p -Fn(.)22 b(Notice)16 b(that)f(the)h(v)m(ariable)g Fl(v)g -Fn(m)o(ust)-42 1371 y(b)q(e)g(previously)f(initialized)f(with)g(a)h -(table)g(v)m(alue.)-42 1493 y Fd(4.7)56 b(F)-5 b(allbac)n(ks)-42 -1579 y Fn(Lua)17 b(pro)o(vides)f(a)g(p)q(o)o(w)o(erful)g(mec)o(hanism)e -(to)h(extend)i(its)f(seman)o(tics,)e(called)i Fm(fal)r(lb)n(acks)p -Fn(.)23 b(Basically)l(,)15 b(a)h(fallbac)o(k)-42 1635 -y(is)f(a)g(programmer)d(de\014ned)17 b(function)e(whic)o(h)g(is)f -(called)h(whenev)o(er)h(Lua)f(do)q(es)h(not)f(kno)o(w)f(ho)o(w)h(to)g -(pro)q(ceed.)29 1691 y(Lua)h(supp)q(orts)f(the)g(follo)o(wing)e -(fallbac)o(ks,)h(iden)o(ti\014ed)h(b)o(y)g(the)g(giv)o(en)g(strings:) --42 1785 y Fk(\\arith")24 b Fn(called)17 b(when)g(an)h(arithmetic)c(op) -q(eration)j(is)g(applied)g(to)f(non)i(n)o(umerical)d(op)q(erands,)j(or) -f(when)g(the)72 1842 y(binary)f Fl(^)g Fn(op)q(eration)g(is)f(called.) -23 b(It)17 b(receiv)o(es)f(three)g(argumen)o(ts:)k(the)d(t)o(w)o(o)e -(op)q(erands)h(\(the)g(second)h(one)72 1898 y(is)j(nil)g(when)h(the)g -(op)q(eration)e(is)h(unary)h(min)o(us\))e(and)h(one)h(of)f(the)g(follo) -o(wing)f(strings)g(describing)h(the)72 1955 y(o\013ended)c(op)q -(erator:)120 2067 y Fl(add)47 b(sub)g(mul)h(div)f(pow)g(unm)72 -2180 y Fn(Its)15 b(return)f(v)m(alue)h(is)f(the)h(\014nal)f(result)g -(of)g(the)h(arithmetic)d(op)q(eration.)19 b(The)c(default)f(function)g -(issues)h(an)72 2236 y(error.)-42 2330 y Fk(\\order")23 -b Fn(called)15 b(when)h(an)g(order)f(comparison)e(is)i(applied)h(to)f -(non)g(n)o(umerical)f(or)h(non)h(string)e(op)q(erands.)21 -b(It)72 2386 y(receiv)o(es)d(three)g(argumen)o(ts:)23 -b(the)18 b(t)o(w)o(o)f(op)q(erands)h(and)g(one)g(of)f(the)h(follo)o -(wing)e(strings)h(describing)g(the)72 2443 y(o\013ended)f(op)q(erator:) -120 2555 y Fl(lt)23 b(gt)h(le)g(ge)922 2748 y Fn(9)p -eop -%%Page: 10 10 -10 9 bop 72 199 a Fn(Its)17 b(return)h(v)m(alue)f(is)g(the)g(\014nal)g -(result)g(of)g(the)g(comparison)f(op)q(eration.)25 b(The)18 -b(default)e(function)i(issues)72 256 y(an)d(error.)-42 -350 y Fk(\\concat")25 b Fn(called)d(when)g(a)f(concatenation)f(is)h -(applied)h(to)f(non)h(string)e(op)q(erands.)39 b(It)22 -b(receiv)o(es)f(the)h(t)o(w)o(o)72 406 y(op)q(erands)d(as)f(argumen)o -(ts.)29 b(Its)18 b(return)h(v)m(alue)g(is)f(the)g(\014nal)h(result)f -(of)g(the)h(concatenation)f(op)q(eration.)72 462 y(The)e(default)e -(function)h(issues)g(an)h(error.)-42 556 y Fk(\\index")23 -b Fn(called)14 b(when)i(Lua)f(tries)f(to)g(retriev)o(e)g(the)h(v)m -(alue)g(of)f(an)h(index)g(not)f(presen)o(t)h(in)f(a)h(table.)k(It)c -(receiv)o(es)72 613 y(as)20 b(argumen)o(ts)e(the)i(table)g(and)g(the)g -(index.)35 b(Its)20 b(return)g(v)m(alue)g(is)f(the)h(\014nal)g(result)g -(of)f(the)i(indexing)72 669 y(op)q(eration.)e(The)d(default)e(function) -h(returns)h(nil.)-42 763 y Fk(\\gettable")25 b Fn(called)17 -b(when)i(Lua)g(tries)e(to)g(index)i(a)f(non)g(table)g(v)m(alue.)29 -b(It)18 b(receiv)o(es)g(as)g(argumen)o(ts)e(the)i(non)72 -819 y(table)d(v)m(alue)h(and)g(the)g(index.)22 b(Its)15 -b(return)h(v)m(alue)g(is)f(the)h(\014nal)g(result)f(of)g(the)h -(indexing)g(op)q(eration.)k(The)72 876 y(default)15 b(function)g -(issues)g(an)g(error.)-42 970 y Fk(\\settable")24 b Fn(called)18 -b(when)g(Lua)g(tries)f(to)h(assign)f(indexed)h(a)g(non)g(table)f(v)m -(alue.)28 b(It)18 b(receiv)o(es)g(as)f(argumen)o(ts)72 -1026 y(the)e(non)h(table)e(v)m(alue,)h(the)h(index,)f(and)g(the)h -(assigned)e(v)m(alue.)20 b(The)c(default)f(function)g(issues)g(an)g -(error.)-42 1120 y Fk(\\function")24 b Fn(called)16 b(when)h(Lua)g -(tries)f(to)g(call)f(a)h(non)h(function)f(v)m(alue.)24 -b(It)17 b(receiv)o(es)f(as)g(argumen)o(ts)f(the)h(non)72 -1176 y(function)i(v)m(alue)h(and)g(the)f(argumen)o(ts)f(giv)o(en)h(in)g -(the)h(original)d(call.)29 b(Its)19 b(return)f(v)m(alues)h(are)f(the)h -(\014nal)72 1233 y(results)c(of)f(the)i(call)e(op)q(eration.)19 -b(The)d(default)e(function)h(issues)g(an)h(error.)-42 -1327 y Fk(\\gc")24 b Fn(called)12 b(during)g(garbage)e(collection.)18 -b(It)12 b(receiv)o(es)g(as)f(argumen)o(t)f(the)i(table)f(b)q(eing)h -(collected.)19 b(After)11 b(eac)o(h)72 1383 y(run)16 -b(of)f(the)g(collector)f(this)h(function)g(is)g(called)g(with)g -(argumen)o(t)f(nil.)20 b(Because)c(this)e(function)i(op)q(erates)72 -1440 y(during)i(garbage)g(collection,)f(it)h(m)o(ust)f(b)q(e)i(used)g -(with)f(great)f(care,)i(and)f(programmers)d(should)k(a)o(v)o(oid)72 -1496 y(the)g(creation)g(of)g(new)g(ob)s(jects)g(\(tables)f(or)h -(strings\))e(in)i(this)g(function.)32 b(The)19 b(default)g(function)g -(do)q(es)72 1553 y(nothing.)-42 1646 y Fk(\\error")k -Fn(called)16 b(when)i(an)f(error)f(o)q(ccurs.)26 b(It)17 -b(receiv)o(es)g(as)g(argumen)o(t)e(a)i(string)f(describing)h(the)g -(error.)25 b(The)72 1703 y(default)15 b(function)g(prin)o(ts)f(the)i -(message)d(on)j(the)f(standard)g(error)f(output.)29 1797 -y(The)19 b(function)f Fl(setfallback)f Fn(is)g(used)i(to)f(c)o(hange)g -(a)g(fallbac)o(k)f(action.)29 b(Its)18 b(\014rst)g(argumen)o(t)f(is)g -(a)h(string)-42 1853 y(describing)f(the)g(fallbac)o(k,)e(and)i(the)f -(second)i(the)e(new)h(function)g(to)f(b)q(e)h(called.)24 -b(It)16 b(returns)h(the)f(old)h(function)-42 1910 y(for)e(the)g(giv)o -(en)g(fallbac)o(k.)29 1966 y(Section)g(7.4)f(sho)o(ws)h(an)g(example)f -(of)h(the)g(use)h(of)e(fallbac)o(ks.)-42 2088 y Fd(4.8)56 -b(Error)18 b(Handling)-42 2173 y Fn(Because)c(Lua)g(is)e(an)h -(extension)g(language,)f(all)g(Lua)i(actions)e(start)g(from)f(C)i(co)q -(de)h(calling)d(a)i(function)g(from)e(the)-42 2230 y(Lua)j(library)l(.) -k(Whenev)o(er)13 b(an)g(error)f(o)q(ccurs)i(during)f(Lua)g(compilation) -d(or)j(execution,)g(an)g(error)f(fallbac)o(k)g(func-)-42 -2286 y(tion)k(is)g(called,)f(and)i(then)f(the)g(corresp)q(onding)h -(function)f(from)e(the)i(library)f(\()p Fl(lua_dofile)p -Fn(,)g Fl(lua_dostring)p Fn(,)-42 2343 y Fl(lua_call)p -Fn(,)f(and)i Fl(lua_callfunction)p Fn(\))c(is)j(terminated)e(returning) -i(an)g(error)g(condition.)29 2399 y(The)21 b(only)g(argumen)o(t)e(to)h -(the)h(error)g(fallbac)o(k)e(function)i(is)g(a)f(string)g(describing)h -(the)g(error)g(and)g(some)-42 2456 y(extra)c(informations,)d(lik)o(e)h -(curren)o(t)i(line)g(\(when)g(the)f(error)h(is)f(at)g(compilation\))e -(or)i(curren)o(t)h(function)f(\(when)-42 2512 y(the)g(error)f(is)g(at)g -(execution\).)21 b(F)l(or)15 b(more)f(information)e(ab)q(out)k(an)f -(error,)g(the)g(Lua)h(program)e(can)h(include)h(the)-42 -2569 y(compilation)10 b(pragma)h Fl($debug)p Fn(.)18 -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) -g(itself.)18 b(When)13 b(an)f(error)g(o)q(ccurs)911 2748 -y(10)p eop -%%Page: 11 11 -11 10 bop -42 199 a Fn(in)15 b(a)g(program)e(compiled)h(with)h(this)f -(option,)g(the)i(error)e(message)g(includes)h(extra)g(information)d -(sho)o(wing)i(the)-42 256 y(stac)o(k)h(of)g(calls.)29 -312 y(The)g(standard)f(error)g(routine)g(only)g(prin)o(ts)g(the)g -(error)g(message)f(to)h Fl(stderr)p Fn(.)19 b(If)14 b(needed,)i(it)e -(is)g(p)q(ossible)g(to)-42 369 y(c)o(hange)i(the)f(error)g(fallbac)o(k) -e(routine;)i(see)g(Section)g(4.7.)29 425 y(Lua)e(co)q(de)g(can)f -(generate)g(an)g(error)g(b)o(y)g(calling)f(the)i(function)f -Fl(error)p Fn(.)18 b(Its)13 b(optional)d(parameter)h(is)h(a)g(string,) --42 482 y(whic)o(h)k(is)e(used)i(as)f(the)g(error)g(message.)-42 -624 y Fo(5)67 b(The)23 b(Application)h(Program)f(In)n(terface)-42 -725 y Fn(This)13 b(section)g(describ)q(es)h(the)f(API)g(for)g(Lua,)h -(that)e(is,)h(the)g(set)g(of)f(C)h(functions)g(a)o(v)m(ailable)f(to)h -(the)g(host)g(program)-42 782 y(to)i(comm)o(unicate)e(with)h(the)h -(library)l(.)k(The)d(API)f(functions)g(can)h(b)q(e)f(classi\014ed)g(in) -g(the)h(follo)o(wing)d(categories:)14 869 y(1.)22 b(executing)15 -b(Lua)h(co)q(de;)14 961 y(2.)22 b(con)o(v)o(erting)14 -b(v)m(alues)i(b)q(et)o(w)o(een)f(C)g(and)g(Lua;)14 1052 -y(3.)22 b(manipulating)13 b(\(reading)h(and)i(writing\))d(Lua)j(ob)s -(jects;)14 1144 y(4.)22 b(calling)14 b(Lua)i(functions;)14 -1235 y(5.)22 b(C)15 b(functions)g(to)g(b)q(e)g(called)g(b)o(y)g(Lua;)14 -1326 y(6.)22 b(lo)q(c)o(king)14 b(Lua)i(Ob)s(jects.)-42 -1414 y(All)f(API)h(functions)f(are)f(declared)i(in)f(the)g(\014le)g -Fl(lua.h)p Fn(.)-42 1535 y Fd(5.1)56 b(Executing)18 b(Lua)h(Co)r(de)-42 -1621 y Fn(A)i(host)g(program)d(can)j(execute)h(Lua)f(programs)d -(written)i(in)h(a)f(\014le)h(or)f(in)h(a)g(string,)f(using)h(the)g -(follo)o(wing)-42 1677 y(functions:)-42 1765 y Fl(int)286 -b(lua_dofile)357 b(\(char)23 b(*filename\);)-42 1821 -y(int)286 b(lua_dostring)309 b(\(char)23 b(*string\);)-42 -1909 y Fn(Both)15 b(functions)f(return)g(an)g(error)f(co)q(de:)20 -b(0,)14 b(in)g(case)g(of)g(success;)h(non)f(zero,)g(in)g(case)h(of)e -(errors.)19 b(The)c(function)-42 1965 y Fl(lua_dofile)p -Fn(,)f(if)h(called)f(with)h(argumen)o(t)e(NULL)j(\(0\),)e(executes)i -(the)f(\\\014le")g Fl(stdin)p Fn(.)-42 2086 y Fd(5.2)56 -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 -(Lua)-42 2172 y Fn(Because)13 b(Lua)g(has)f(no)g(static)f(t)o(yp)q(e)h -(system,)f(all)h(v)m(alues)g(passed)g(b)q(et)o(w)o(een)h(Lua)f(and)h(C) -f(ha)o(v)o(e)g(t)o(yp)q(e)g Fl(lua)p 1739 2172 15 2 v -17 w(Object)p Fn(,)-42 2228 y(whic)o(h)k(w)o(orks)e(lik)o(e)g(an)h -(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) -m(alue.)29 2285 y(Lua)11 b(has)f(automatic)e(memory)f(managemen)o(t,)i -(and)h(garbage)g(collection.)17 b(Because)11 b(of)f(that,)g(a)g -Fl(lua_Object)-42 2341 y Fn(has)18 b(a)f(limited)e(scop)q(e,)j(and)g -(is)f(only)g(v)m(alid)g(inside)g(the)h Fm(blo)n(ck)j -Fn(where)d(it)f(w)o(as)f(created.)27 b(A)17 b(C)h(function)f(called)-42 -2398 y(from)c(Lua)i(is)f(a)h(blo)q(c)o(k,)f(and)h(its)e(parameters)g -(are)h(v)m(alid)h(only)f(un)o(til)g(its)f(end.)21 b(A)14 -b(go)q(o)q(d)h(programmi)o(ng)d(practice)-42 2454 y(is)i(to)f(con)o(v)o -(ert)g(Lua)h(ob)s(jects)f(to)g(C)h(v)m(alues)g(as)f(so)q(on)h(as)f -(they)h(are)g(a)o(v)m(ailable,)e(and)i(nev)o(er)g(to)f(store)g -Fl(lua_Object)p Fn(s)-42 2511 y(in)j(C)e(global)g(v)m(ariables.)29 -2567 y(When)f(C)g(co)q(de)h(calls)e(Lua)h(rep)q(eatedly)l(,)g(as)g(in)g -(a)f(lo)q(op,)h(ob)s(jects)f(returned)i(b)o(y)f(these)g(calls)f(accum)o -(ulate,)f(and)-42 2623 y(ma)o(y)j(create)h(a)g(memory)d(problem.)19 -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 -(de\014ned)g(with)f(the)g(functions:)911 2748 y(11)p -eop -%%Page: 12 12 -12 11 bop -42 199 a Fl(void)262 b(lua_beginblock)f(\(void\);)-42 -256 y(void)h(lua_endblock)309 b(\(void\);)-42 350 y Fn(After)15 -b(the)h(end)f(of)g(the)g(blo)q(c)o(k,)g(all)f Fl(lua_Object)p -Fn('s)g(created)h(inside)g(it)f(are)h(released.)29 406 -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 -Fn(,)e(the)i(follo)o(wing)e(function)i(is)g(a)o(v)m(ailable:)-42 -500 y Fl(int)286 b(lua_type)405 b(\(lua_Object)22 b(object\);)-42 -594 y Fn(plus)16 b(the)f(follo)o(wing)e(macros:)-42 687 -y Fl(int)286 b(lua_isnil)381 b(\(lua_Object)22 b(object\);)-42 -744 y(int)286 b(lua_isnumber)309 b(\(lua_Object)22 b(object\);)-42 -800 y(int)286 b(lua_isstring)309 b(\(lua_Object)22 b(object\);)-42 -857 y(int)286 b(lua_istable)333 b(\(lua_Object)22 b(object\);)-42 -913 y(int)286 b(lua_iscfunction)237 b(\(lua_Object)22 -b(object\);)-42 970 y(int)286 b(lua_isuserdata)261 b(\(lua_Object)22 -b(object\);)-42 1064 y Fn(All)15 b(macros)e(return)j(1)e(if)h(the)g(ob) -s(ject)g(has)g(the)g(giv)o(en)g(t)o(yp)q(e,)g(and)g(0)g(otherwise.)29 -1120 y(The)20 b(function)g Fl(lua_type)f Fn(can)h(b)q(e)h(used)f(to)g -(distinguish)f(b)q(et)o(w)o(een)h(di\013eren)o(t)f(kinds)h(of)g(user)g -(data;)h(see)-42 1176 y(b)q(elo)o(w.)29 1233 y(T)l(o)15 -b(translate)f(a)h(v)m(alue)g(from)f(t)o(yp)q(e)h Fl(lua_Object)f -Fn(to)g(a)h(sp)q(eci\014c)h(C)f(t)o(yp)q(e,)g(the)g(programmer)d(can)k -(use:)-42 1327 y Fl(double)214 b(lua_getnumber)285 b(\(lua_Object)22 -b(object\);)-42 1383 y(char)239 b(*lua_getstring)284 -b(\(lua_Object)22 b(object\);)-42 1440 y(lua_CFunction)46 -b(lua_getcfunction)213 b(\(lua_Object)22 b(object\);)-42 -1496 y(void)239 b(*lua_getuserdata)d(\(lua_Object)22 -b(object\);)-42 1590 y(lua_getnumber)14 b Fn(con)o(v)o(erts)g(a)g -Fl(lua_Object)g Fn(to)g(a)h(\015oat.)k(This)c Fl(lua_Object)e -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 -1646 y(con)o(v)o(ertible)h(to)f(n)o(um)o(b)q(er)h(\(see)g(Section)g -(4.2\);)f(otherwise,)g(the)h(function)g(returns)g(0.)29 -1703 y Fl(lua_getstring)c Fn(con)o(v)o(erts)g(a)h Fl(lua_Object)f -Fn(to)h(a)g(string)g(\()p Fl(char)23 b(*)p Fn(\).)18 -b(This)12 b Fl(lua_Object)f Fn(m)o(ust)g(b)q(e)i(a)f(string)-42 -1759 y(or)k(a)f(n)o(um)o(b)q(er;)h(otherwise,)e(the)i(function)g -(returns)g(0)f(\(the)h(n)o(ull)f(p)q(oin)o(ter\).)21 -b(This)16 b(function)f(do)q(es)i(not)e(create)h(a)-42 -1816 y(new)f(string,)d(but)i(returns)g(a)f(p)q(oin)o(ter)g(to)h(a)f -(string)g(inside)g(the)h(Lua)g(en)o(vironmen)o(t.)k(Because)d(Lua)f -(has)f(garbage)-42 1872 y(collection,)h(there)h(is)g(no)g(guaran)o(tee) -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 -(the)i(blo)q(c)o(k)f(ends.)29 1929 y Fl(lua_getcfunction)f -Fn(con)o(v)o(erts)h(a)h Fl(lua_Object)f Fn(to)g(a)h(C)g(function.)23 -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 -1985 y Fm(CF)m(unction)s Fn(;)j(otherwise,)f(the)h(function)g(returns)g -(0)f(\(the)h(n)o(ull)f(p)q(oin)o(ter\).)27 b(The)18 b(t)o(yp)q(e)g -Fl(lua_CFunction)e Fn(is)h(ex-)-42 2042 y(plained)f(in)f(Section)g -(5.5.)29 2098 y Fl(lua_getuserdata)10 b Fn(con)o(v)o(erts)i(a)g -Fl(lua_Object)e Fn(to)i Fl(void*)p Fn(.)18 b(This)12 -b Fl(lua_Object)f Fn(m)o(ust)g(ha)o(v)o(e)h(t)o(yp)q(e)g -Fm(user)n(data)s Fn(;)-42 2154 y(otherwise,)j(the)g(function)g(returns) -g(0)g(\(the)g(n)o(ull)f(p)q(oin)o(ter\).)29 2211 y(The)j(rev)o(erse)g -(pro)q(cess,)h(that)e(is,)h(passing)f(a)h(sp)q(eci\014c)h(C)f(v)m(alue) -g(to)g(Lua,)h(is)e(done)i(b)o(y)f(using)g(the)g(follo)o(wing)-42 -2267 y(functions:)-42 2361 y Fl(void)262 b(lua_pushnumber)f(\(double)23 -b(n\);)-42 2418 y(void)262 b(lua_pushstring)f(\(char)23 -b(*s\);)-42 2474 y(void)262 b(lua_pushliteral)237 b(\(char)23 -b(*s\);)-42 2531 y(void)262 b(lua_pushcfunction)189 b(\(lua_CFunction) -22 b(f\);)-42 2587 y(void)262 b(lua_pushusertag)237 b(\(void)23 -b(*u,)h(int)f(tag\);)911 2748 y Fn(12)p eop -%%Page: 13 13 -13 12 bop -42 199 a Fn(plus)16 b(the)f(macro:)-42 293 -y Fl(void)262 b(lua_pushuserdata)213 b(\(void)23 b(*u\);)-42 -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) -o(ert)f(it)h(to)f(a)g(corresp)q(onden)o(t)i Fl(lua_Object)p -Fn(,)d(and)i(lea)o(v)o(e)f(the)h(result)g(on)-42 443 -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 -(assigned)e(to)g(a)h(Lua)g(v)m(ariable,)f(passed)h(as)g(paramen)o(ter)e -(to)h(a)-42 500 y(Lua)f(function,)g(etc)f(\(see)h(b)q(elo)o(w\).)21 -b Fl(lua_pushliteral)13 b Fn(is)i(lik)o(e)g Fl(lua_pushstring)p -Fn(,)f(but)h(also)g(puts)h(the)f(string)-42 556 y(in)h(the)g(Lua)g -(literal)e(table.)21 b(This)15 b(a)o(v)o(oids)g(the)h(string)e(to)h(b)q -(e)i(garbage)e(collected,)g(and)h(therefore)f(has)h(a)f(b)q(etter)-42 -613 y(o)o(v)o(erall)e(p)q(erformance.)19 b(As)14 b(a)h(rule,)f(when)h -(the)f(string)g(to)g(b)q(e)h(pushed)g(is)f(a)h(literal,)d -Fl(lua_pushliteral)g Fn(should)-42 669 y(b)q(e)k(used.)29 -726 y(User)10 b(data)g(can)h(ha)o(v)o(e)e(di\013eren)o(t)h(tags,)g -(whose)g(seman)o(tics)f(are)h(de\014ned)h(b)o(y)g(the)f(host)g -(program.)16 b(An)o(y)10 b(p)q(ositiv)o(e)-42 782 y(in)o(teger)15 -b(can)h(b)q(e)h(used)f(to)g(tag)e(a)i(user)g(data.)21 -b(When)16 b(a)g(user)g(data)f(is)g(retriev)o(ed,)g(the)h(function)g -Fl(lua_type)e Fn(can)-42 839 y(b)q(e)i(used)g(to)f(get)f(its)h(tag.)29 -895 y(T)l(o)g(complete)f(the)h(set,)g(the)g(v)m(alue)g -Fk(nil)g Fn(or)f(a)h Fl(lua_Object)f Fn(can)h(also)g(b)q(e)g(pushed)i -(on)o(to)d(the)h(stac)o(k,)f(with:)-42 989 y Fl(void)262 -b(lua_pushnil)333 b(\(void\);)-42 1045 y(void)262 b(lua_pushobject)f -(\(lua_Object)22 b(object\);)-42 1167 y Fd(5.3)56 b(Manipulating)22 -b(Lua)c(Ob)s(jects)-42 1253 y Fn(T)l(o)d(read)h(the)f(v)m(alue)g(of)g -(an)o(y)g(global)f(Lua)h(v)m(ariable,)f(one)i(can)f(use)h(the)f -(function:)-42 1347 y Fl(lua_Object)118 b(lua_getglobal)285 -b(\(char)23 b(*varname\);)-42 1440 y Fn(T)l(o)15 b(store)g(a)g(v)m -(alue)g(previously)g(pushed)h(on)o(to)e(the)i(stac)o(k)e(in)h(a)g -(global)f(v)m(ariable,)g(there)h(is)g(the)g(function:)-42 -1534 y Fl(void)262 b(lua_storeglobal)237 b(\(char)23 -b(*varname\);)29 1628 y Fn(T)l(ables)15 b(can)g(also)f(b)q(e)i -(manipulated)e(via)g(the)i(API.)f(The)g(function)-42 -1722 y Fl(lua_Object)118 b(lua_getsubscript)213 b(\(void\);)-42 -1816 y Fn(exp)q(ects)16 b(on)f(the)h(stac)o(k)e(a)h(table)f(and)i(an)f -(index,)g(and)g(returns)g(the)g(con)o(ten)o(ts)g(of)g(the)g(table)f(at) -h(that)f(index.)20 b(As)-42 1872 y(in)15 b(Lua,)g(if)g(the)g(\014rst)f -(ob)s(ject)h(is)f(not)h(a)f(table,)g(or)h(the)g(index)g(is)g(not)f -(presen)o(t)h(in)g(the)g(table,)f(the)h(corresp)q(onden)o(t)-42 -1929 y(fallbac)o(k)f(is)h(called.)29 1985 y(F)l(or)g(compatibilit)n(y)d -(with)j(previous)g(v)o(ersions)f(of)h(the)g(API,)g(the)h(follo)o(wing)d -(macros)g(are)i(supp)q(orted:)-42 2079 y Fl(lua_Object)118 -b(lua_getindexed)261 b(\(lua_Object)22 b(table,)h(float)h(index\);)-42 -2135 y(lua_Object)118 b(lua_getfield)309 b(\(lua_Object)22 -b(table,)h(char)h(*field\);)-42 2229 y Fn(The)16 b(\014rst)f(one)g(is)g -(used)h(for)e(n)o(umeric)g(indices,)h(while)g(the)g(second)h(can)f(b)q -(e)h(used)g(for)e(an)o(y)h(string)f(index.)29 2286 y(T)l(o)i(store)g(a) -g(v)m(alue)h(in)f(an)h(index,)g(the)f(program)e(m)o(ust)h(push)j(on)o -(to)d(the)i(stac)o(k)e(the)i(table,)f(the)h(index,)f(and)-42 -2342 y(the)g(v)m(alue,)f(and)g(then)h(call)e(the)h(function:)-42 -2436 y Fl(void)24 b(lua_storesubscript)d(\(void\);)-42 -2530 y Fn(Again,)15 b(the)g(corresp)q(onden)o(t)g(fallbac)o(k)f(is)h -(called)g(if)f(needed.)29 2586 y(Finally)l(,)g(the)h(function)911 -2748 y(13)p eop -%%Page: 14 14 -14 13 bop -42 199 a Fl(lua_Object)118 b(lua_createtable)237 -b(\(void\);)-42 293 y Fn(creates)15 b(a)g(new)h(table.)29 -349 y Fm(Ple)n(ase)22 b(Notic)n(e:)36 b Fn(Most)22 b(functions)g(from)e -(the)j(Lua)f(library)f(receiv)o(e)i(parameters)d(through)i(the)h(stac)o -(k.)-42 406 y(Because)c(other)e(functions)g(also)g(use)h(the)g(stac)o -(k,)f(it)g(is)g(imp)q(ortan)o(t)e(that)i(these)h(parameters)e(b)q(e)i -(pushed)h(just)-42 462 y(b)q(efore)d(the)f(corresp)q(onden)o(t)g(call,) -f(without)g(in)o(termediate)e(calls)i(to)h(the)g(Lua)g(library)l(.)k(F) -l(or)14 b(instance,)h(supp)q(ose)-42 519 y(the)h(user)f(w)o(an)o(ts)f -(the)h(v)m(alue)h(of)f Fl(a[i])p Fn(.)k(A)c(simplistic)e(solution)h(w)o -(ould)g(b)q(e:)6 613 y Fl(/*)24 b(Warning:)f(WRONG)g(CODE)g(*/)6 -669 y(lua_Object)g(result;)6 725 y(lua_pushobject\(lua_getglobal)o -(\("a"\)\);)44 b(/*)24 b(push)f(table)g(*/)6 782 y -(lua_pushobject\(lua_getglobal)o(\("i"\)\);)44 b(/*)24 -b(push)f(index)g(*/)6 838 y(result)g(=)h(lua_getsubscript\(\);)-42 -932 y Fn(Ho)o(w)o(ev)o(er,)c(the)f(call)g Fl(lua_getglobal\("i"\))e -Fn(mo)q(di\014es)i(the)h(stac)o(k,)f(and)h(in)o(v)m(alidates)e(the)i -(previous)f(pushed)-42 989 y(v)m(alue.)i(A)15 b(correct)g(solution)f -(could)h(b)q(e:)6 1082 y Fl(lua_Object)23 b(result;)6 -1139 y(lua_Object)g(index)g(=)h(lua_getglobal\("i"\);)6 -1195 y(lua_pushobject\(lua_getglobal)o(\("a"\)\);)44 -b(/*)24 b(push)f(table)g(*/)6 1252 y(lua_pushobject\(index\);)355 -b(/*)24 b(push)f(index)g(*/)6 1308 y(result)g(=)h -(lua_getsubscript\(\);)-42 1430 y Fd(5.4)56 b(Calling)21 -b(Lua)e(F)-5 b(unctions)-42 1516 y Fn(F)l(unctions)19 -b(de\014ned)g(in)g(Lua)f(b)o(y)h(a)f(c)o(h)o(unk)g(executed)i(with)e -Fl(dofile)f Fn(or)h Fl(dostring)f Fn(can)i(b)q(e)g(called)f(from)e(the) --42 1572 y(host)h(program.)23 b(This)16 b(is)g(done)h(using)g(the)g -(follo)o(wing)e(proto)q(col:)22 b(\014rst,)16 b(the)h(argumen)o(ts)e -(to)h(the)h(function)g(are)-42 1629 y(pushed)f(on)o(to)d(the)i(Lua)g -(stac)o(k)e(\(see)i(Section)f(5.2\),)f(in)h(direct)g(order,)g(i.e.,)g -(the)g(\014rst)g(argumen)o(t)f(is)h(pushed)h(\014rst.)-42 -1685 y(Again,)g(it)f(is)h(imp)q(ortan)o(t)e(to)h(emphasize)h(that,)f -(during)h(this)f(phase,)i(no)f(other)g(Lua)g(function)g(can)g(b)q(e)h -(called.)29 1741 y(Then,)f(the)h(function)f(is)f(called)h(using)-42 -1835 y Fl(int)286 b(lua_call)405 b(\(char)23 b(*functionname\);)-42 -1929 y Fn(or)-42 2023 y Fl(int)286 b(lua_callfunction)213 -b(\(lua_Object)22 b(function\);)-42 2116 y Fn(Both)16 -b(functions)g(return)f(an)h(error)f(co)q(de:)22 b(0,)15 -b(in)h(case)g(of)f(success;)i(non)f(zero,)f(in)h(case)g(of)f(errors.)21 -b(Finally)l(,)14 b(the)-42 2173 y(returned)i(v)m(alues)f(\(a)g(Lua)h -(function)f(ma)o(y)e(return)i(man)o(y)f(v)m(alues\))h(can)g(b)q(e)h -(retriev)o(ed)f(with)f(the)i(macro)-42 2267 y Fl(lua_Object)118 -b(lua_getresult)309 b(\(int)23 b(number\);)-42 2360 y -Fn(where)18 b Fl(number)d Fn(is)i(the)g(order)f(of)h(the)g(result,)f -(starting)f(with)h(1.)25 b(When)17 b(called)f(with)g(a)h(n)o(um)o(b)q -(er)f(larger)g(than)-42 2417 y(the)g(actual)e(n)o(um)o(b)q(er)h(of)f -(results,)h(this)f(function)h(returns)g Fl(LUA_NOOBJECT)p -Fn(.)29 2473 y(Tw)o(o)j(sp)q(ecial)g(Lua)g(functions)h(ha)o(v)o(e)e -(exclusiv)o(e)i(in)o(terfaces:)25 b Fl(error)18 b Fn(and)g -Fl(setfallback)p Fn(.)28 b(A)18 b(C)h(function)-42 2530 -y(can)d(generate)f(a)g(Lua)g(error)g(calling)f(the)h(function)-42 -2623 y Fl(void)24 b(lua_error)e(\(char)i(*message\);)911 -2748 y Fn(14)p eop -%%Page: 15 15 -15 14 bop -42 199 a Fn(This)18 b(function)g(nev)o(er)g(returns.)28 -b(If)18 b(the)g(C)f(function)h(has)g(b)q(een)h(called)f(from)e(Lua,)i -(the)g(corresp)q(onding)g(Lua)-42 256 y(execution)f(terminates,)d(as)i -(if)g(an)g(error)f(had)i(o)q(ccurred)g(inside)f(Lua)h(co)q(de.)23 -b(Otherwise,)16 b(the)h(whole)f(program)-42 312 y(terminates.)29 -369 y(F)l(allbac)o(ks)e(can)h(b)q(e)h(c)o(hanged)g(with:)-42 -460 y Fl(lua_Object)23 b(lua_setfallback)f(\(char)h(*name,)g -(lua_CFunction)f(fallback\);)-42 552 y Fn(The)12 b(\014rst)f(parameter) -f(is)g(the)i(fallbac)o(k)e(name,)h(and)g(the)h(second)f(a)h(CF)l -(unction)f(to)f(b)q(e)i(used)g(as)f(the)h(new)f(fallbac)o(k.)-42 -608 y(This)k(function)g(returns)g(a)g Fl(lua_Object)p -Fn(,)f(whic)o(h)h(is)g(the)g(old)g(fallbac)o(k)f(v)m(alue,)h(or)g(nil)f -(on)h(fail)g(\(in)o(v)m(alid)f(fallbac)o(k)-42 665 y(name\).)19 -b(This)c(old)g(v)m(alue)g(can)g(b)q(e)h(used)g(for)f(c)o(haining)f -(fallbac)o(ks.)29 721 y(An)i(example)e(of)g(C)h(co)q(de)h(calling)e(a)h -(Lua)g(function)h(is)e(sho)o(wn)h(in)g(Section)g(7.6.)-42 -842 y Fd(5.5)56 b(C)19 b(F)-5 b(unctions)-42 928 y Fn(T)l(o)15 -b(register)g(a)f(C)h(function)g(to)g(Lua,)g(there)g(is)g(the)g(follo)o -(wing)e(macro:)-42 1020 y Fl(#define)23 b(lua_register\(n,f\))165 -b(\(lua_pushcfunction\(f\),)21 b(lua_storeglobal\(n\)\))-42 -1076 y(/*)j(char)f(*n;)215 b(*/)-42 1133 y(/*)24 b(lua_CFunction)e(f;)i -(*/)-42 1224 y Fn(whic)o(h)15 b(receiv)o(es)g(the)f(name)g(the)h -(function)f(will)g(ha)o(v)o(e)g(in)g(Lua,)h(and)g(a)f(p)q(oin)o(ter)g -(to)g(the)h(function.)20 b(This)14 b(p)q(oin)o(ter)-42 -1281 y(m)o(ust)g(ha)o(v)o(e)h(t)o(yp)q(e)g Fl(lua_CFunction)p -Fn(,)e(whic)o(h)i(is)g(de\014ned)i(as)-42 1372 y Fl(typedef)23 -b(void)h(\(*lua_CFunction\))d(\(void\);)-42 1464 y Fn(that)15 -b(is,)f(a)h(p)q(oin)o(ter)g(to)f(a)h(function)g(with)g(no)g(parameters) -e(and)j(no)f(results.)29 1521 y(In)g(order)e(to)h(comm)o(unicate)d -(prop)q(erly)j(with)f(Lua,)h(a)f(C)h(function)g(m)o(ust)e(follo)o(w)g -(a)i(proto)q(col,)f(whic)o(h)g(de\014nes)-42 1577 y(the)j(w)o(a)o(y)e -(parameters)f(and)j(results)e(are)h(passed.)29 1633 y(T)l(o)g(access)g -(its)g(argumen)o(ts,)e(a)i(C)g(function)g(calls:)-42 -1725 y Fl(lua_Object)118 b(lua_getparam)309 b(\(int)23 -b(number\);)-42 1817 y Fn(where)16 b Fl(number)e Fn(starts)g(with)h(1)g -(to)f(get)h(the)h(\014rst)e(argumen)o(t.)19 b(When)c(called)g(with)g(a) -g(n)o(um)o(b)q(er)f(larger)g(than)h(the)-42 1873 y(actual)e(n)o(um)o(b) -q(er)f(of)g(argumen)o(ts,)f(this)i(function)f(returns)h -Fl(LUA)p 1029 1873 15 2 v 17 w(NOOBJECT)p Fn(.)e(In)j(this)e(w)o(a)o(y) -l(,)g(it)g(is)h(p)q(ossible)f(to)g(write)-42 1930 y(functions)j(that)g -(w)o(ork)f(with)h(a)g(v)m(ariable)f(n)o(um)o(b)q(er)h(of)f(parameters.) -29 1986 y(T)l(o)g(return)g(v)m(alues,)g(a)g(C)g(function)g(just)f -(pushes)i(them)e(on)o(to)g(the)i(stac)o(k,)e(in)h(direct)g(order;)f -(see)i(Section)f(5.2.)-42 2042 y(Lik)o(e)i(a)e(Lua)i(function,)f(a)g(C) -g(function)g(called)f(b)o(y)h(Lua)h(can)f(also)g(return)g(man)o(y)e -(results.)29 2099 y(Section)i(7.5)f(presen)o(ts)i(an)f(example)f(of)g -(a)h(CF)l(unction.)-42 2220 y Fd(5.6)56 b(Lo)r(c)n(king)19 -b(Lua)f(Ob)s(jects)-42 2306 y Fn(As)h(already)g(noted,)g -Fl(lua_Object)p Fn(s)f(are)h(v)o(olatile.)29 b(If)19 -b(the)g(C)g(co)q(de)h(needs)g(to)e(k)o(eep)h(a)g Fl(lua_Object)f -Fn(outside)-42 2363 y(blo)q(c)o(k)d(b)q(oundaries,)h(it)e(has)h(to)g -Fm(lo)n(ck)f Fn(the)h(ob)s(ject.)20 b(The)15 b(routines)g(to)f -(manipulate)g(lo)q(c)o(king)g(are)h(the)g(follo)o(wing:)-42 -2454 y Fl(int)191 b(lua_lock)23 b(\(void\);)-42 2511 -y(lua_Object)g(lua_getlocked)46 b(\(int)23 b(ref\);)-42 -2567 y(void)167 b(lua_pushlocked)22 b(\(int)h(ref\);)-42 -2623 y(void)167 b(lua_unlock)22 b(\(int)i(ref\);)911 -2748 y Fn(15)p eop -%%Page: 16 16 -16 15 bop -42 199 a Fn(The)18 b(function)e Fl(lua_lock)g -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) -h(the)g(stac)o(k,)f(and)h(returns)f(a)h(reference)-42 -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 -(needed,)i(a)e(call)g(to)g Fl(lua_getlocked)f Fn(returns)i(a)f(handle)h -(to)f(it,)g(while)-42 312 y Fl(lua_pushlocked)f Fn(pushes)i(the)f -(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 -(ject)g(is)f(no)h(longer)g(needed,)h(it)e(can)-42 369 -y(b)q(e)j(unlo)q(c)o(k)o(ed)g(with)e(a)h(call)f(to)h -Fl(lua_unlock)p Fn(.)-42 512 y Fo(6)67 b(Prede\014ned)24 -b(F)-6 b(unctions)24 b(and)f(Libraries)-42 613 y Fn(The)17 -b(set)g(of)f(prede\014ned)i(functions)e(in)h(Lua)f(is)h(small)d(but)j -(p)q(o)o(w)o(erful.)23 b(Most)15 b(of)h(them)g(pro)o(vide)g(features)g -(that)-42 670 y(allo)o(ws)d(some)g(degree)h(of)g(re\015exivit)o(y)f(in) -h(the)g(language.)19 b(Man)o(y)13 b(of)h(these)h(features)e(cannot)h(b) -q(e)h(sim)o(ulated)d(with)-42 726 y(the)k(rest)f(of)f(the)i(Language)f -(nor)g(with)f(the)i(standard)e(API.)29 783 y(The)g(libraries,)e(on)i -(the)f(other)g(hand,)h(pro)o(vide)g(useful)f(routines)g(that)g(are)h -(implemen)o(ted)d(directly)i(through)-42 839 y(the)g(standard)f(API.)h -(Therefore,)f(they)h(are)f(not)g(necessary)h(to)f(the)g(language,)g -(and)h(are)f(pro)o(vided)h(as)f(separated)-42 896 y(C)j(mo)q(dules.)k -(Curren)o(tly)c(there)g(are)g(three)g(standard)g(libraries:)27 -989 y Fi(\017)22 b Fn(string)14 b(manipulation;)27 1083 -y Fi(\017)22 b Fn(mathematical)11 b(functions)k(\(sin,)g(cos,)f(etc\);) -27 1177 y Fi(\017)22 b Fn(input)15 b(and)h(output.)-42 -1271 y(In)h(order)f(to)g(ha)o(v)o(e)g(access)g(to)g(these)g(libraries,) -f(the)h(host)g(program)e(m)o(ust)h(call)g(the)h(functions)g -Fl(strlib_open)p Fn(,)-42 1327 y Fl(mathlib_open)p Fn(,)e(and)h -Fl(iolib_open)p Fn(,)e(declared)j(in)f Fl(lualib.h)p -Fn(.)-42 1449 y Fd(6.1)56 b(Prede\014ned)18 b(F)-5 b(unctions)-42 -1535 y Fl(dofile)24 b(\(filename\))-42 1621 y Fn(This)16 -b(function)f(receiv)o(es)g(a)g(\014le)h(name,)e(op)q(ens)i(it)f(and)h -(executes)g(its)f(con)o(ten)o(ts)f(as)i(a)f(Lua)h(c)o(h)o(unk.)21 -b(It)15 b(returns)h(1)-42 1677 y(if)f(there)g(are)g(no)g(errors,)g -Fk(nil)f Fn(otherwise.)-42 1797 y Fl(dostring)23 b(\(string\))-42 -1883 y Fn(This)e(function)h(executes)g(a)f(giv)o(en)g(string)f(as)h(a)g -(Lua)h(c)o(h)o(unk.)38 b(It)22 b(returns)f(1)g(if)g(there)g(are)g(no)h -(errors,)f Fk(nil)-42 1939 y Fn(otherwise.)-42 2059 y -Fl(next)j(\(table,)f(index\))-42 2145 y Fn(This)18 b(function)f(allo)o -(ws)f(a)i(program)d(to)i(tra)o(v)o(erse)g(all)g(\014elds)h(of)f(a)g -(table.)27 b(Its)18 b(\014rst)f(argumen)o(t)f(is)i(a)f(table)g(and)-42 -2202 y(its)e(second)i(argumen)o(t)c(is)j(an)f(index)h(in)g(this)f -(table.)21 b(It)15 b(returns)h(the)g(next)f(index)h(of)g(the)f(table)h -(and)f(the)h(v)m(alue)-42 2258 y(asso)q(ciated)g(with)f(the)h(index.)23 -b(When)17 b(called)e(with)h Fk(nil)f Fn(as)g(its)h(second)g(argumen)o -(t,)e(the)j(function)e(returns)h(the)-42 2315 y(\014rst)g(index)g(of)g -(the)g(table)g(\(and)f(its)h(asso)q(ciated)f(v)m(alue\).)22 -b(When)17 b(called)e(with)h(the)g(last)f(index,)h(or)f(with)h -Fk(nil)f Fn(in)-42 2371 y(an)h(empt)o(y)e(table,)g(it)g(returns)h -Fk(nil)p Fn(.)29 2428 y(In)i(Lua)f(there)g(is)g(no)g(declaration)f(of)h -(\014elds;)g(seman)o(tically)l(,)d(there)j(is)g(no)g(di\013erence)g(b)q -(et)o(w)o(een)h(a)e(\014eld)i(not)-42 2484 y(presen)o(t)g(in)f(a)g -(table)f(or)h(a)g(\014eld)h(with)e(v)m(alue)i Fk(nil)p -Fn(.)22 b(Therefore,)16 b(the)g(function)g(only)g(considers)g(\014elds) -h(with)e(non)-42 2540 y(nil)g(v)m(alues.)20 b(The)c(order)f(the)g -(indices)g(are)g(en)o(umerated)f(is)h(not)g(sp)q(eci\014ed,)h -Fm(even)f(for)i(numeric)f(indic)n(es)p Fn(.)29 2597 y(See)g(Section)f -(7.1)f(for)h(an)g(example)f(of)h(the)g(use)h(of)e(this)h(function.)911 -2748 y(16)p eop -%%Page: 17 17 -17 16 bop -42 199 a Fl(nextvar)23 b(\(name\))-42 285 -y Fn(This)18 b(function)g(is)g(similar)d(to)i(the)i(function)f -Fl(next)p Fn(,)f(but)i(it)e(iterates)g(o)o(v)o(er)g(the)h(global)f(v)m -(ariables.)28 b(Its)18 b(single)-42 342 y(argumen)o(t)c(is)h(the)h -(name)e(of)h(a)g(global)f(v)m(ariable,)g(or)h Fk(nil)g -Fn(to)g(get)g(a)g(\014rst)g(name.)k(Similarly)13 b(to)h -Fl(next)p Fn(,)h(it)g(returns)-42 398 y(the)j(name)e(of)g(another)h(v)m -(ariable)f(and)h(its)f(v)m(alue,)i(or)e Fk(nil)g Fn(if)g(there)h(are)g -(no)g(more)e(v)m(ariables.)25 b(See)18 b(Section)e(7.1)-42 -454 y(for)f(an)g(example)f(of)h(the)g(use)h(of)f(this)f(function.)-42 -574 y Fl(print)24 b(\(e1,)f(e2,)g(...\))-42 660 y Fn(This)18 -b(function)g(receiv)o(es)g(an)o(y)g(n)o(um)o(b)q(er)g(of)f(argumen)o -(ts,)g(and)h(prin)o(ts)g(their)f(v)m(alues)i(in)f(a)g(reasonable)f -(format.)-42 717 y(Eac)o(h)i(v)m(alue)g(is)f(prin)o(ted)h(in)f(a)h(new) -g(line.)30 b(This)18 b(function)h(is)f(not)g(in)o(tended)h(for)f -(formatted)f(output,)i(but)g(as)-42 773 y(a)h(quic)o(k)f(w)o(a)o(y)g -(to)g(sho)o(w)g(a)g(v)m(alue,)i(for)e(instance)g(for)g(error)g -(messages)f(or)h(debugging.)34 b(See)20 b(Section)f(6.4)g(for)-42 -830 y(functions)c(for)g(formatted)e(output.)-42 950 y -Fl(tonumber)23 b(\(e\))-42 1036 y Fn(This)13 b(function)f(receiv)o(es)g -(one)h(argumen)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(er.)18 b(If)13 b(the)g(argumen)o(t)d(is)i(already)-42 -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 -(a)g(n)o(um)o(b)q(er)f(\(see)h(Section)h(4.2\),)d(it)i(returns)g(that)f -(n)o(um)o(b)q(er;)h(otherwise,)-42 1148 y(it)g(returns)g -Fk(nil)p Fn(.)-42 1269 y Fl(type)24 b(\(v\))-42 1354 -y Fn(This)13 b(function)h(allo)o(ws)d(Lua)j(to)e(test)h(the)g(t)o(yp)q -(e)h(of)f(a)g(v)m(alue.)19 b(It)13 b(receiv)o(es)h(one)f(argumen)o(t,)f -(and)h(returns)g(its)g(t)o(yp)q(e,)-42 1411 y(co)q(ded)21 -b(as)e(a)g(string.)31 b(The)19 b(p)q(ossible)g(results)g(of)g(this)g -(function)g(are)g Fl("nil")g Fn(\(a)f(string,)h(not)g(the)h(v)m(alue)f -Fk(nil)p Fn(\),)-42 1467 y Fl("number")p Fn(,)g Fl("string")p -Fn(,)g Fl("table")p Fn(,)h Fl("function")e Fn(\(returned)h(b)q(oth)h -(for)f(C)g(functions)g(and)h(Lua)f(functions\),)-42 1524 -y(and)d Fl("userdata")p Fn(.)29 1580 y(Besides)f(this)f(string,)f(the)i -(function)f(returns)h(a)f(second)h(result,)f(whic)o(h)g(is)g(the)h -Fm(tag)g Fn(of)f(the)g(v)m(alue.)20 b(This)14 b(tag)-42 -1637 y(can)g(b)q(e)h(used)f(to)f(distinguish)g(b)q(et)o(w)o(een)g(user) -h(data)f(with)g(di\013eren)o(t)g(tags,)g(and)h(b)q(et)o(w)o(een)f(C)h -(functions)f(and)h(Lua)-42 1693 y(functions.)-42 1813 -y Fl(error)24 b(\(message\))-42 1899 y Fn(This)e(function)f(issues)g -(an)h(error)f(message)f(and)h(terminates)f(the)h(last)g(called)g -(function)g(from)f(the)i(library)-42 1955 y(\()p Fl(lua_dofile)p -Fn(,)14 b Fl(lua_dostring)p Fn(,)f Fc(:)8 b(:)g(:)d Fn(\).)20 -b(It)15 b(nev)o(er)g(returns.)-42 2075 y Fl(setglobal)23 -b(\(name,)g(value\))-42 2161 y Fn(This)18 b(function)h(assigns)e(the)i -(giv)o(en)f(v)m(alue)g(to)g(a)g(global)f(v)m(ariable.)29 -b(The)19 b(string)e Fl(name)h Fn(do)q(es)h(not)f(need)h(to)f(b)q(e)-42 -2218 y(a)f(syn)o(tactically)d(v)m(alid)i(v)m(ariable)g(name.)22 -b(Therefore,)17 b(this)f(function)g(can)g(set)h(global)e(v)m(ariables)g -(with)h(strange)-42 2274 y(names)f(lik)o(e)f Fl(m)24 -b(v)f(1)15 b Fn(or)g Fl(34)p Fn(.)-42 2394 y Fl(getglobal)23 -b(\(name\))-42 2480 y Fn(This)e(function)g(retriev)o(es)g(the)g(v)m -(alue)h(of)f(a)g(global)f(v)m(ariable.)37 b(The)22 b(string)e -Fl(name)h Fn(do)q(es)g(not)g(need)h(to)f(b)q(e)h(a)-42 -2536 y(syn)o(tactically)14 b(v)m(alid)g(v)m(ariable)h(name.)911 -2748 y(17)p eop -%%Page: 18 18 -18 17 bop -42 199 a Fl(setfallback)23 b(\(fallbackname,)f -(newfallback\))-42 285 y Fn(This)13 b(function)f(sets)g(a)h(new)f -(fallbac)o(k)g(function)g(to)g(the)h(giv)o(en)f(fallbac)o(k.)18 -b(It)12 b(returns)h(the)g(old)f(fallbac)o(k)f(function.)-42 -407 y Fd(6.2)56 b(String)19 b(Manipulation)-42 493 y -Fn(This)j(library)e(pro)o(vides)i(generic)f(functions)h(for)f(string)g -(manipulation,)f(suc)o(h)i(as)g(\014nding)g(and)g(extracting)-42 -549 y(substrings.)29 b(When)19 b(indexing)f(a)g(string,)f(the)i -(\014rst)f(c)o(haracter)f(has)h(p)q(osition)g(1.)29 b(See)19 -b(Section)f(7.2)f(for)h(some)-42 606 y(examples)c(on)i(string)e -(manipulation)f(in)i(Lua.)-42 726 y Fl(strfind)23 b(\(str,)h(substr,)e -([init,)i([end]]\))-42 811 y Fn(Receiv)o(es)c(t)o(w)o(o)e(string)h -(argumen)o(ts,)f(and)h(returns)g(a)g(n)o(um)o(b)q(er.)32 -b(This)19 b(n)o(um)o(b)q(er)f(indicates)h(the)g(\014rst)g(p)q(osition) --42 868 y(where)13 b(the)f(second)h(argumen)o(t)e(app)q(ears)h(in)g -(the)g(\014rst)g(argumen)o(t.)17 b(If)c(the)f(second)h(argumen)o(t)d -(is)i(not)g(a)g(substring)-42 924 y(of)j(the)g(\014rst)g(one,)f(then)i -Fl(strfind)e Fn(returns)h Fk(nil)p Fn(.)j(A)e(third)e(optional)g(n)o -(umerical)f(argumen)o(t)g(sp)q(eci\014es)j(where)f(to)-42 -981 y(start)f(the)i(searc)o(h.)j(Another)d(optional)d(n)o(umerical)h -(argumen)o(t)f(sp)q(eci\014es)j(where)g(to)e(stop)h(it.)-42 -1101 y Fl(strlen)24 b(\(s\))-42 1187 y Fn(Receiv)o(es)16 -b(a)f(string)f(and)i(returns)f(its)f(length.)-42 1307 -y Fl(strsub)24 b(\(s,)f(i,)h([j]\))-42 1392 y Fn(Returns)17 -b(another)f(string,)f(whic)o(h)h(is)g(a)g(substring)g(of)g -Fl(s)p Fn(,)g(starting)e(at)i Fl(i)g Fn(and)g(runing)g(un)o(til)g -Fl(j)p Fn(.)23 b(If)16 b Fl(j)g Fn(is)g(absen)o(t,)-42 -1449 y(it)f(is)g(assumed)g(to)f(b)q(e)i(equal)g(to)e(the)i(length)f(of) -g Fl(s)p Fn(.)20 b(P)o(articularly)l(,)13 b(the)j(call)e -Fl(strsub\(s,1,j\))g Fn(returns)h(a)g(pre\014x)-42 1505 -y(of)g Fl(s)g Fn(with)g(length)g Fl(j)p Fn(,)f(while)h(the)g(call)g -Fl(strsub\(s,i\))e Fn(returns)i(a)g(su\016x)g(of)g Fl(s)p -Fn(,)g(starting)e(at)i Fl(i)p Fn(.)-42 1625 y Fl(strlower)23 -b(\(s\))-42 1711 y Fn(Receiv)o(es)14 b(a)e(string)g(and)h(returns)f(a)h -(cop)o(y)f(of)h(that)f(string)f(with)h(all)g(upp)q(er)i(case)f(letters) -e(c)o(hanged)i(to)f(lo)o(w)o(er)g(case.)-42 1768 y(All)j(other)g(c)o -(haracters)f(are)h(left)g(unc)o(hanged.)-42 1888 y Fl(strupper)23 -b(\(s\))-42 1974 y Fn(Receiv)o(es)14 b(a)e(string)g(and)h(returns)f(a)h -(cop)o(y)f(of)h(that)f(string)f(with)h(all)g(lo)o(w)o(er)f(case)i -(letters)f(c)o(hanged)h(to)f(upp)q(er)i(case.)-42 2030 -y(All)h(other)g(c)o(haracters)f(are)h(left)g(unc)o(hanged.)-42 -2150 y Fl(ascii)24 b(\(s,)f([i]\))-42 2236 y Fn(Returns)16 -b(the)f(ascii)g(co)q(de)h(of)e(the)i(c)o(haracter)e Fl(s[i])p -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 -(e)i(1.)-42 2356 y Fl(int2str)23 b(\()p Fi(f)p Fl(i)p -Fi(g)p Fl(\))-42 2442 y Fn(Receiv)o(es)e(0)f(or)g(more)f(n)o(um)o(b)q -(ers.)34 b(Returns)21 b(a)f(string)f(with)h(length)g(equal)g(to)g(the)g -(n)o(um)o(b)q(er)g(of)g(argumen)o(ts,)-42 2498 y(wherein)c(eac)o(h)f(c) -o(haracter)g(has)g(ascii)f(v)m(alue)h(equal)g(to)g(its)f(corresp)q -(onden)o(t)i(argumen)o(t.)911 2748 y(18)p eop -%%Page: 19 19 -19 18 bop -42 199 a Fd(6.3)56 b(Mathematical)20 b(F)-5 -b(unctions)-42 285 y Fn(This)13 b(library)f(is)h(an)g(in)o(terface)f -(to)h(some)e(functions)i(of)g(the)g(standard)g(C)g(math)e(library)l(.) -19 b(Moreo)o(v)o(er,)11 b(it)i(registers)-42 342 y(a)i(fallbac)o(k)f -(for)h(the)g(binary)g(op)q(erator)f Fl(^)h Fn(whic)o(h,)g(when)h -(applied)f(to)f(n)o(um)o(b)q(ers)h Fl(x^y)p Fn(,)f(returns)h -Fc(x)1619 325 y Fb(y)1639 342 y Fn(.)29 398 y(The)g(library)f(pro)o -(vides)h(the)g(follo)o(wing)e(functions:)-42 492 y Fl(abs)24 -b(acos)f(asin)h(atan)f(atan2)g(ceil)g(cos)h(floor)-42 -548 y(log)g(log10)f(max)h(min)47 b(mod)g(sin)h(sqrt)23 -b(tan)-42 642 y Fn(Most)17 b(of)g(them)g(are)g(only)g(in)o(terfaces)g -(to)g(the)g(homon)o(ymous)e(functions)j(in)f(the)h(C)f(library)l(,)g -(except)h(that,)f(for)-42 699 y(the)f(trigonometri)o(c)d(functions,)h -(all)h(angles)f(are)h(expressed)h(in)f(degrees.)29 755 -y(The)d(function)f Fl(max)g Fn(returns)g(the)g(maxim)o(um)d(v)m(alue)j -(of)g(its)f(n)o(umeric)h(argumen)o(ts.)16 b(Similarly)l(,)9 -b Fl(min)i Fn(computes)-42 811 y(the)16 b(minim)o(um)o(.)h(Both)e(can)g -(b)q(e)h(used)g(with)e(an)h(unlimited)f(n)o(um)o(b)q(er)g(of)h(argumen) -o(ts.)29 868 y(The)g(function)h Fl(mod)e Fn(is)h(equiv)m(alen)o(t)g(to) -f(the)i Fl(\045)f Fn(op)q(erator)f(in)h(C.)-42 990 y -Fd(6.4)56 b(I/O)19 b(F)-5 b(acilities)-42 1075 y Fn(All)20 -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) -f Fm(curr)n(ent)i Fn(\014les,)g(one)g(for)g(reading)f(and)h(one)g(for)f -(writing.)-42 1132 y(Initially)l(,)14 b(the)h(curren)o(t)g(input)h -(\014le)f(is)g Fl(stdin)p Fn(,)f(and)h(the)g(curren)o(t)g(output)g -(\014le)h(is)e Fl(stdout)p Fn(.)29 1188 y(Unless)h(otherwise)g(stated,) -f(all)g(I/O)i(functions)f(return)g(1)g(on)g(success)h(and)f -Fk(nil)f Fn(on)h(failure.)-42 1308 y Fl(readfrom)23 b(\(filename\))-42 -1394 y Fn(This)e(function)g(op)q(ens)g(a)g(\014le)g(named)f -Fl(filename)g Fn(and)h(sets)g(it)f(as)h(the)g Fm(curr)n(ent)f -Fn(input)h(\014le.)38 b(When)21 b(called)-42 1451 y(without)c -(parameters,)e(this)i(function)g(closes)f(the)i(curren)o(t)f(input)g -(\014le,)g(and)h(restores)e Fl(stdin)h Fn(as)f(the)i(curren)o(t)-42 -1507 y(input)e(\014le.)29 1564 y Fm(System)f(dep)n(endent:)k -Fn(if)13 b Fl(filename)h Fn(starts)e(with)i(a)g Fl(|)p -Fn(,)g(then)g(a)g(pip)q(ed)h(input)g(is)e(op)q(en,)i(via)e(function)i -Fl(popen)p Fn(.)-42 1684 y Fl(writeto)23 b(\(filename\))-42 -1769 y Fn(This)13 b(function)g(op)q(ens)h(a)e(\014le)i(named)e -Fl(filename)g Fn(and)h(sets)g(it)f(as)h(the)g Fm(curr)n(ent)g -Fn(output)g(\014le.)19 b(Notice)12 b(that,)h(if)f(the)-42 -1826 y(\014le)19 b(already)e(exists,)g(it)h(is)f(completely)f(erased)j -(with)e(this)g(op)q(eration.)28 b(When)18 b(called)g(without)f -(parameters,)-42 1882 y(this)e(function)g(closes)g(the)g(curren)o(t)g -(output)g(\014le,)g(and)h(restores)e Fl(stdout)g Fn(as)h(the)g(curren)o -(t)g(output)g(\014le.)29 1939 y Fm(System)e(dep)n(endent:)18 -b Fn(if)12 b Fl(filename)f Fn(starts)g(with)h(a)g Fl(|)p -Fn(,)g(then)h(a)f(pip)q(ed)h(output)g(is)e(op)q(en,)j(via)d(function)i -Fl(popen)p Fn(.)-42 2059 y Fl(appendto)23 b(\(filename\))-42 -2145 y Fn(This)11 b(function)g(op)q(ens)h(a)f(\014le)g(named)f -Fl(filename)g Fn(and)i(sets)f(it)f(as)h(the)g Fm(curr)n(ent)g -Fn(output)g(\014le.)19 b(Unlik)o(e)10 b(the)h Fl(writeto)-42 -2201 y Fn(op)q(eration,)16 b(this)f(function)h(do)q(es)h(not)f(erase)f -(an)o(y)h(previous)g(con)o(ten)o(t)g(of)f(the)i(\014le.)22 -b(This)16 b(function)g(returns)g(2)g(if)-42 2258 y(the)g(\014le)f -(already)f(exists,)h(1)f(if)h(it)g(creates)g(a)f(new)i(\014le,)f(and)g -Fk(nil)f Fn(on)h(failure.)-42 2378 y Fl(remove)24 b(\(filename\))-42 -2463 y Fn(This)15 b(function)g(deletes)h(the)f(\014le)g(with)g(the)g -(giv)o(en)g(name.)911 2748 y(19)p eop -%%Page: 20 20 -20 19 bop -42 199 a Fl(read)24 b(\([format]\))-42 285 -y Fn(This)17 b(function)g(returns)f(a)h(v)m(alue)g(read)g(from)e(the)i -(curren)o(t)g(input.)25 b(An)17 b(optional)f(string)g(argumen)o(t)f(sp) -q(eci\014es)-42 342 y(the)h(w)o(a)o(y)e(the)h(input)g(is)g(in)o -(terpreted.)29 398 y(Without)d(a)h(format)d(argumen)o(t,)h -Fl(read)i Fn(\014rst)f(skips)h(blanks,)g(tabs)f(and)h(newlines.)19 -b(Then)14 b(it)e(c)o(hec)o(ks)h(whether)-42 454 y(the)h(curren)o(t)f(c) -o(haracter)f(is)h Fl(")g Fn(or)f Fl(')p Fn(.)19 b(If)14 -b(so,)e(it)h(reads)g(a)f(string)g(up)i(to)f(the)g(ending)g(quotation)f -(mark,)f(and)j(returns)-42 511 y(this)h(string,)f(without)g(the)h -(quotation)f(marks.)k(Otherwise)d(it)g(reads)g(up)h(to)e(a)h(blank,)g -(tab)f(or)h(newline.)29 567 y(The)g(format)e(string)i(can)g(ha)o(v)o(e) -g(the)g(follo)o(wing)e(format:)30 658 y Fl(?[n])-42 748 -y Fn(where)j Fl(?)f Fn(can)g(b)q(e:)-42 839 y Fk('s')i(or)g('S')k -Fn(to)15 b(read)g(a)g(string;)-42 931 y Fk('f)5 b(')17 -b(or)g('F')22 b Fn(to)14 b(read)h(a)g(real)g(n)o(um)o(b)q(er;)-42 -1024 y Fk('i')h(or)i('I')j Fn(to)15 b(read)g(an)g(in)o(teger.)-42 -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 -(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 -(read)g(to)e(comp)q(ose)h(the)g(input)-42 1171 y(v)m(alue.)21 -b(P)o(articularly)l(,)12 b(the)k(format)c Fl("s1")j Fn(reads)g(a)g -(single)g(c)o(haracter.)-42 1290 y Fl(readuntil)23 b(\(char\))-42 -1376 y Fn(Reads)18 b(the)f(curren)o(t)g(input)g(un)o(til)f(the)g -(\014rst)h(o)q(currence)h(of)e(the)h(giv)o(en)f(c)o(haracter.)25 -b(Returns)17 b(the)g(string)f(read.)-42 1432 y(The)g(c)o(haracter)e -(itself)h(is)f(not)h(read.)-42 1552 y Fl(write)24 b(\(value,)f -([format]\))-42 1637 y Fn(This)d(function)g(writes)f(the)i(v)m(alue)f -(of)g(its)f(\014rst)h(argumen)o(t)e(to)i(the)g(curren)o(t)g(output.)35 -b(An)20 b(optional)f(second)-42 1694 y(argumen)o(t)13 -b(sp)q(eci\014es)i(the)f(format)e(to)i(b)q(e)h(used.)20 -b(This)14 b(format)e(is)i(giv)o(en)f(as)h(a)g(string,)f(comp)q(osed)h -(of)g(four)f(parts.)-42 1750 y(The)j(\014rst)f(part)f(is)h(the)g(only)g -(one)g(not)g(optional,)f(and)h(m)o(ust)f(b)q(e)i(one)f(of)g(the)g -(follo)o(wing)e(c)o(haracters:)-42 1841 y Fk('s')k(or)g('S')k -Fn(to)15 b(write)f(strings;)-42 1933 y Fk('f)5 b(')17 -b(or)g('F')22 b Fn(to)14 b(write)g(\015oats;)-42 2026 -y Fk('i')i(or)i('I')j Fn(to)15 b(write)f(in)o(tegers.)-42 -2116 y(These)i(c)o(haracters)e(can)i(b)q(e)g(follo)o(w)o(ed)d(b)o(y)30 -2207 y Fl([?][m][.n])-42 2297 y Fn(where:)-42 2388 y -Fl(?)23 b Fn(indicates)15 b(justi\014cation)f(inside)h(the)g(\014eld.) -100 2480 y(')p Fl(<)p Fn(')22 b(righ)o(t)14 b(justi\014cation)g -(\(default\);)100 2552 y(')p Fl(>)p Fn(')22 b(left)15 -b(justi\014cation;)100 2623 y(')p Fl(|)p Fn(')22 b(cen)o(ter)15 -b(justi\014cation.)911 2748 y(20)p eop -%%Page: 21 21 -21 20 bop -42 199 a Fl(m)23 b Fn(Indicates)16 b(the)f(\014eld)g(size)g -(in)g(c)o(haracters.)-42 293 y Fl(.n)23 b Fn(F)l(or)18 -b(reals,)h(indicates)f(the)h(n)o(um)o(b)q(er)f(of)g(digital)f(places.) -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 -(b)q(er)j(of)72 350 y(digits.)h(This)c(option)f(has)h(no)g(meaning)f -(for)h(strings.)29 443 y(When)20 b(called)e(without)g(a)h(format)e -(string,)i(this)f(function)h(writes)f(n)o(um)o(b)q(ers)h(using)f(the)i -Fl(\045g)e Fn(format)f(and)-42 500 y(strings)e(with)f -Fl(\045s)p Fn(.)-42 643 y Fo(7)67 b(Some)22 b(Examples)-42 -744 y Fn(This)17 b(section)f(giv)o(es)g(examples)g(sho)o(wing)g(some)g -(features)g(of)h(Lua.)25 b(It)17 b(do)q(es)g(not)g(in)o(tend)f(to)h(co) -o(v)o(er)f(the)h(whole)-42 801 y(language,)e(but)g(only)g(to)f -(illustrate)f(some)h(in)o(teresting)g(uses)i(of)e(the)i(system.)-42 -923 y Fd(7.1)56 b(The)18 b(F)-5 b(unctions)21 b Fa(next)c -Fd(and)i Fa(nextvar)-42 1008 y Fn(This)f(example)f(sho)o(ws)g(ho)o(w)h -(to)f(use)i(the)f(function)g Fl(next)f Fn(to)h(iterate)f(o)o(v)o(er)g -(the)h(\014elds)g(of)g(a)g(table.)28 b(F)l(unction)-42 -1065 y Fm(clone)15 b Fn(receiv)o(es)g(an)o(y)g(table)f(and)i(returns)f -(a)g(clone)g(of)g(it.)-42 1159 y Fl(function)23 b(clone)g(\(t\))263 -b(--)23 b(t)h(is)f(a)h(table)6 1215 y(local)f(new_t)h(=)f({})263 -b(--)23 b(creates)g(a)h(new)f(table)6 1272 y(local)g(i,)h(v)g(=)f -(next\(t,)g(nil\))48 b(--)23 b(i)h(is)f(an)h(index)f(of)h(t,)f(v)h(=)g -(t[i])6 1328 y(while)f(i)h(do)54 1385 y(new_t[i])f(=)g(v)54 -1441 y(i,)h(v)f(=)h(next\(t,)f(i\))191 b(--)23 b(get)h(next)f(index)6 -1497 y(end)6 1554 y(return)g(new_t)-42 1610 y(end)29 -1704 y Fn(The)15 b(next)h(example)e(prin)o(ts)g(the)i(names)e(of)g(all) -h(global)e(v)m(ariables)i(in)g(the)g(system)f(with)h(non)g(nil)g(v)m -(alues:)-42 1798 y Fl(function)23 b(printGlobalVariables)e(\(\))6 -1854 y(local)i(i,)h(v)g(=)f(nextvar\(nil\))6 1911 y(while)g(i)h(do)54 -1967 y(print\(i\))54 2024 y(i,)g(v)f(=)h(nextvar\(i\))6 -2080 y(end)-42 2137 y(end)-42 2258 y Fd(7.2)56 b(String)19 -b(Manipulation)-42 2344 y Fn(The)d(\014rst)f(example)f(is)g(a)h -(function)g(to)g(trim)e(extra)i(blanks)g(at)f(the)h(b)q(eginning)h(and) -f(end)h(of)f(a)g(string.)-42 2438 y Fl(function)23 b(trim\(s\))6 -2495 y(local)g(l)h(=)g(1)6 2551 y(while)f(strsub\(s,l,l\))f(==)i(')g(') -g(do)54 2607 y(l)g(=)f(l+1)911 2748 y Fn(21)p eop -%%Page: 22 22 -22 21 bop 6 199 a Fl(end)6 256 y(local)23 b(r)h(=)g(strlen\(s\))6 -312 y(while)f(strsub\(s,r,r\))f(==)i(')g(')g(do)54 369 -y(r)g(=)f(r-1)6 425 y(end)6 482 y(return)g(strsub\(s,l,r\))-42 -538 y(end)29 631 y Fn(The)15 b(second)h(example)e(sho)o(ws)h(a)g -(function)g(that)f(eliminates)f(all)h(blanks)h(of)g(a)g(string.)-42 -723 y Fl(function)23 b(remove_blanks)f(\(s\))6 780 y(local)h(b)h(=)g -(strfind\(s,)e(')i('\))6 836 y(while)f(b)h(do)54 893 -y(s)g(=)f(strsub\(s,)g(1,)h(b-1\))f(..)h(strsub\(s,)e(b+1\))54 -949 y(b)i(=)f(strfind\(s,)g(')h('\))6 1006 y(end)6 1062 -y(return)f(s)-42 1118 y(end)-42 1240 y Fd(7.3)56 b(P)n(ersistence)-42 -1326 y Fn(Because)21 b(of)e(its)g(re\015exiv)o(e)g(facilities,)g(p)q -(ersistence)h(in)f(Lua)h(can)g(b)q(e)g(ac)o(hiev)o(ed)g(within)f(the)g -(language.)33 b(This)-42 1382 y(section)12 b(sho)o(ws)f(some)g(w)o(a)o -(ys)g(to)g(store)g(and)h(retriev)o(e)f(v)m(alues)i(in)e(Lua,)i(using)f -(a)f(text)h(\014le)g(written)e(in)i(the)g(language)-42 -1439 y(itself)j(as)f(the)i(storage)e(media.)29 1495 y(T)l(o)h(store)f -(a)h(single)g(v)m(alue)g(with)g(a)g(name,)f(the)h(follo)o(wing)e(co)q -(de)j(is)e(enough:)-42 1588 y Fl(function)23 b(store)g(\(name,)g -(value\))6 1644 y(write\('\\n')g(..)g(name)h(..)f('='\))6 -1701 y(write_value\(value\))-42 1757 y(end)-42 1862 y(function)g -(write_value)g(\(value\))6 1918 y(local)g(t)h(=)g(type\(value\))102 -1975 y(if)f(t)h(==)g('nil')94 b(then)24 b(write\('nil'\))6 -2031 y(elseif)f(t)h(==)g('number')e(then)i(write\(value\))6 -2088 y(elseif)f(t)h(==)g('string')e(then)i(write\('[[')e(..)i(value)f -(..)h(']]'\))6 2144 y(end)-42 2200 y(end)-42 2305 y Fn(In)16 -b(order)f(to)g(restore)f(this)h(v)m(alue,)g(a)g Fl(lua_dofile)f -Fn(su\016ces.)29 2361 y(Storing)i(tables)h(is)g(a)g(little)e(more)h -(complex.)25 b(Assuming)16 b(that)g(the)h(table)g(is)g(a)g(tree,)g(and) -g(all)f(indices)i(are)-42 2418 y(iden)o(ti\014ers)13 -b(\(that)e(is,)i(the)g(tables)f(are)g(b)q(eing)h(used)g(as)g -(records\),)f(its)g(v)m(alue)h(can)g(b)q(e)g(written)f(directly)g(with) -g(table)-42 2474 y(constructors.)19 b(First,)14 b(the)h(function)g -Fl(write_value)f Fn(is)h(c)o(hanged)g(to)-42 2567 y Fl(function)23 -b(write_value)g(\(value\))6 2623 y(local)g(t)h(=)g(type\(value\))911 -2748 y Fn(22)p eop -%%Page: 23 23 -23 22 bop 102 199 a Fl(if)23 b(t)h(==)g('nil')94 b(then)24 -b(write\('nil'\))6 256 y(elseif)f(t)h(==)g('number')e(then)i -(write\(value\))6 312 y(elseif)f(t)h(==)g('string')e(then)i(write\('"') -e(..)i(value)f(..)h('"'\))6 369 y(elseif)f(t)h(==)g('table')46 -b(then)24 b(write_record\(value\))6 425 y(end)-42 482 -y(end)-42 575 y Fn(The)16 b(function)f Fl(write_record)e -Fn(is:)-42 669 y Fl(function)23 b(write_record\(t\))6 -726 y(local)g(i,)h(v)g(=)f(next\(t,)g(nil\))6 782 y(write\('{'\))47 -b(--)23 b(starts)g(constructor)6 839 y(while)g(i)h(do)54 -895 y(store\(i,)f(v\))54 951 y(write\(',)g('\))54 1008 -y(i,)h(v)f(=)h(next\(t,)f(i\))6 1064 y(end)6 1121 y(write\('}'\))47 -b(--)23 b(closes)g(constructor)-42 1177 y(end)-42 1299 -y Fd(7.4)56 b(Inheritance)-42 1385 y Fn(The)15 b(fallbac)o(k)f(for)g -(absen)o(t)g(indices)h(can)g(b)q(e)g(used)g(to)f(implemen)o(t)e(man)o -(y)h(kinds)i(of)f(inheritance)g(in)h(Lua.)20 b(As)15 -b(an)-42 1441 y(example,)f(the)h(follo)o(wing)e(co)q(de)j(implemen)o -(ts)d(single)h(inheritance:)-42 1535 y Fl(function)23 -b(Index)g(\(t,f\))6 1592 y(if)h(f)g(==)f('parent')g(then)47 -b(--)24 b(to)f(avoid)g(loop)54 1648 y(return)g(OldIndex\(t,f\))6 -1704 y(end)6 1761 y(local)g(p)h(=)g(t.parent)6 1817 y(if)g(type\(p\))f -(==)g('table')g(then)54 1874 y(return)g(p[f])6 1930 y(else)54 -1987 y(return)g(OldIndex\(t,f\))6 2043 y(end)-42 2100 -y(end)-42 2213 y(OldIndex)g(=)h(setfallback\("index",)d(Index\))-42 -2306 y Fn(Whenev)o(er)15 b(Lua)g(attempts)d(to)i(access)h(an)f(absen)o -(t)g(\014eld)h(in)f(a)g(table,)g(it)g(calls)f(the)i(fallbac)o(k)e -(function)h Fl(Index)p Fn(.)19 b(If)-42 2363 y(the)14 -b(table)e(has)h(a)g(\014eld)h Fl(parent)e Fn(with)h(a)g(table)f(v)m -(alue,)i(then)f(Lua)h(attempts)d(to)h(access)i(the)f(desired)g(\014eld) -h(in)f(this)-42 2419 y(paren)o(t)i(ob)s(ject.)k(This)c(pro)q(cess)g(is) -f(rep)q(eated)h(\\up)o(w)o(ards")f(un)o(til)g(a)h(v)m(alue)g(for)f(the) -h(\014eld)g(is)g(found)g(or)f(the)h(ob)s(ject)-42 2476 -y(has)h(no)f(paren)o(t.)k(In)d(the)f(latter)f(case,)h(the)g(previous)g -(fallbac)o(k)f(is)h(called)g(to)f(supply)i(a)e(v)m(alue)i(for)e(the)i -(\014eld.)29 2532 y(When)e(b)q(etter)g(p)q(erformance)f(is)g(needed,)i -(the)f(same)e(fallbac)o(k)h(ma)o(y)f(b)q(e)i(implemen)o(ted)e(in)i(C,)f -(as)g(illustrated)-42 2589 y(in)j(Figure)e(1.)20 b(This)14 -b(co)q(de)i(m)o(ust)e(b)q(e)i(registered)e(with:)911 -2748 y(23)p eop -%%Page: 24 24 -24 23 bop -42 317 1950 6 v -42 411 a Fl(int)24 b(lockedParentName;)45 -b(/*)24 b(stores)f(the)g(lock)h(index)f(for)g(the)h(string)f("parent")g -(*/)-42 467 y(int)h(lockedOldIndex;)93 b(/*)24 b(previous)f(fallback)f -(function)h(*/)-42 580 y(void)h(callOldFallback)e(\(lua_Object)g -(table,)h(lua_Object)g(index\))-42 637 y({)6 693 y(lua_Object)g -(oldIndex)f(=)i(lua_getlocked\(lockedOldIndex)o(\);)6 -750 y(lua_pushobject\(table\);)6 806 y(lua_pushobject\(index\);)6 -863 y(lua_callfunction\(oldIndex\);)-42 919 y(})-42 1032 -y(void)g(Index)f(\(void\))-42 1088 y({)6 1145 y(lua_Object)g(table)g(=) -h(lua_getparam\(1\);)6 1201 y(lua_Object)f(index)g(=)h -(lua_getparam\(2\);)6 1258 y(lua_Object)f(parent;)6 1314 -y(if)h(\(lua_isstring\(index\))d(&&)j(strcmp\(lua_getstring\(in)o -(dex\),)d("parent"\))h(==)i(0\))6 1371 y({)54 1427 y -(callOldFallback\(table,)d(index\);)54 1484 y(return;)6 -1540 y(})6 1597 y(lua_pushobject\(table\);)6 1653 y -(lua_pushlocked\(lockedParentN)o(ame\);)6 1709 y(parent)i(=)h -(lua_getsubscript\(\);)6 1766 y(if)g(\(lua_istable\(parent\)\))6 -1822 y({)54 1879 y(lua_pushobject\(parent\);)54 1935 -y(lua_pushobject\(index\);)54 1992 y(/*)g(return)f(result)g(from)g -(getsubscript)f(*/)54 2048 y(lua_pushobject\(lua_getsubs)o(cript\(\))o -(\);)6 2105 y(})6 2161 y(else)54 2218 y(callOldFallback\(table,)f -(index\);)-42 2274 y(})665 2409 y Fn(Figure)15 b(1:)k(Inheritance)d(in) -f(C.)p -42 2466 V 911 2748 a(24)p eop -%%Page: 25 25 -25 24 bop -42 159 1950 6 v -42 253 a Fl(void)24 b(math_max)f(\(void\)) --42 310 y({)-18 366 y(int)h(i=1;)71 b(/*)23 b(number)g(of)h(arguments)f -(*/)-18 423 y(double)g(d,)h(dmax;)-18 479 y(lua_Object)f(o;)-18 -536 y(/*)h(the)f(function)g(must)g(get)h(at)g(least)f(one)g(argument)g -(*/)-18 592 y(if)h(\(\(o)f(=)h(lua_getparam\(i++\)\))e(==)h -(LUA_NOOBJECT\))30 648 y(lua_error)g(\("too)g(few)g(arguments)g(to)h -(function)e(`max'"\);)-18 705 y(/*)i(and)f(this)h(argument)e(must)i(be) -f(a)h(number)f(*/)-18 761 y(if)h(\(!lua_isnumber\(o\)\))30 -818 y(lua_error)f(\("incorrect)f(argument)h(to)g(function)g(`max'"\);) --18 874 y(dmax)h(=)f(lua_getnumber)f(\(o\);)-18 931 y(/*)i(loops)f -(until)g(there)g(is)h(no)g(more)f(arguments)g(*/)-18 -987 y(while)h(\(\(o)f(=)h(lua_getparam\(i++\)\))d(!=)j(LUA_NOOBJECT\)) --18 1044 y({)6 1100 y(if)g(\(!lua_isnumber\(o\)\))54 -1157 y(lua_error)f(\("incorrect)f(argument)h(to)g(function)g(`max'"\);) -6 1213 y(d)h(=)g(lua_getnumber)e(\(o\);)6 1270 y(if)i(\(d)f(>)h(dmax\)) -f(dmax)h(=)f(d;)-18 1326 y(})-18 1382 y(/*)h(push)f(the)h(result)f(to)g -(be)h(returned)f(*/)-18 1439 y(lua_pushnumber)f(\(dmax\);)-42 -1495 y(})623 1631 y Fn(Figure)14 b(2:)20 b(C)15 b(function)g -Fl(math)p 1147 1631 15 2 v 16 w(max)p Fn(.)p -42 1687 -1950 6 v 6 1815 a Fl(lua_pushliteral\("parent"\);)6 1871 -y(lockedParentName)22 b(=)i(lua_lock\(\);)6 1928 y -(lua_pushobject\(lua_setfallba)o(ck\("ind)o(ex",)d(Index\)\);)6 -1984 y(lockedOldIndex)h(=)i(lua_lock\(\);)-42 2076 y -Fn(Notice)15 b(ho)o(w)g(the)g(string)f Fl("parent")g -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 -(erformance.)-42 2198 y Fd(7.5)56 b(A)19 b(CF)-5 b(unction)-42 -2284 y Fn(A)18 b(CF)l(unction)f(to)f(compute)h(the)g(maxim)o(um)c(of)k -(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) -g(in)g(Figure)f(2.)-42 2340 y(After)f(registered)g(with)-42 -2432 y Fl(lua_register)23 b(\("max",)g(math_max\);)-42 -2525 y Fn(this)15 b(function)g(is)g(a)o(v)m(ailable)f(in)h(Lua,)g(as)g -(follo)o(ws:)-42 2617 y Fl(i)24 b(=)g(max\(4,)f(5,)h(10,)f(-34\))47 -b(--)24 b(i)g(receives)e(10)911 2748 y Fn(25)p eop -%%Page: 26 26 -26 25 bop -42 199 a Fd(7.6)56 b(Calling)21 b(Lua)e(F)-5 -b(unctions)-42 285 y Fn(This)17 b(example)e(illustrates)f(ho)o(w)i(a)h -(C)f(function)g(can)h(call)e(the)i(Lua)g(function)f Fl(remove_blanks)f -Fn(presen)o(ted)i(in)-42 342 y(Section)f(7.2.)-42 435 -y Fl(void)24 b(remove_blanks)e(\(char)h(*s\))-42 492 -y({)6 548 y(lua_pushstring\(s\);)45 b(/*)24 b(prepare)f(parameter)g(*/) -6 605 y(lua_call\("remove_blanks"\);)44 b(/*)24 b(call)f(Lua)h -(function)f(*/)6 661 y(strcpy\(s,)g(lua_getstring\(lua_getresu)o -(lt\(1\)\)\))o(;)45 b(/*)24 b(copy)f(result)g(back)g(to)h('s')f(*/)-42 -718 y(})-42 861 y Fo(Ac)n(kno)n(wledgmen)n(ts)-42 962 -y Fn(The)18 b(authors)f(w)o(ould)g(lik)o(e)f(to)h(thank)h(CENPES/PETR)o -(OBR)1073 951 y(\023)1067 962 y(AS)g(whic)o(h,)g(join)o(tly)d(with)i(T) -l(eCGraf,)g(used)h(ex-)-42 1019 y(tensiv)o(ely)13 b(early)h(v)o -(ersions)f(of)g(this)g(system)g(and)h(ga)o(v)o(e)e(v)m(aluable)i -(commen)o(ts.)j(The)d(authors)f(w)o(ould)g(also)g(lik)o(e)g(to)-42 -1075 y(thank)j(Carlos)d(Henrique)j(Levy)l(,)f(who)g(found)h(the)f(name) -f(of)h(the)h(game)1204 1059 y Fj(3)1221 1075 y Fn(.)-42 -1218 y Fo(A)68 b(Incompatibiliti)q(es)24 b(with)f(Previous)h(V)-6 -b(ersions)-42 1320 y Fn(Although)15 b(great)f(care)h(has)g(b)q(een)h -(tak)o(en)f(to)f(a)o(v)o(oid)g(incompatibiliti)o(es)e(with)j(the)g -(previous)g(public)g(v)o(ersions)f(of)-42 1376 y(Lua,)i(some)e -(di\013erences)h(had)g(to)g(b)q(e)h(in)o(tro)q(duced.)k(Here)15 -b(is)g(a)g(list)f(of)h(all)f(these)h(di\013erences.)-42 -1498 y Fd(Incompatibilities)21 b(with)f(v)n(ersion)f(2.1)27 -1584 y Fi(\017)j Fn(The)16 b(function)g Fl(type)f Fn(no)o(w)h(returns)g -(the)g(string)f Fl(function)f Fn(b)q(oth)i(for)g(C)g(and)g(Lua)g -(functions.)22 b(Because)72 1640 y(Lua)c(functions)g(and)g(C)g -(functions)f(are)h(compatible,)e(this)i(b)q(eha)o(vior)f(is)g(usually)h -(more)e(useful.)28 b(When)72 1697 y(needed,)20 b(the)e(second)g(result) -g(of)f(function)h Fl(type)f Fn(ma)o(y)f(b)q(e)j(used)g(to)e -(distinguish)g(b)q(et)o(w)o(een)h(Lua)h(and)f(C)72 1753 -y(functions.)27 1847 y Fi(\017)k Fn(A)15 b(function)g(de\014nition)g -(only)g(assigns)f(the)h(function)g(v)m(alue)g(to)g(the)g(giv)o(en)f(v)m -(ariable)h(at)f(execution)h(time.)-42 1969 y Fd(Incompatibilities)21 -b(with)f(v)n(ersion)f(1.1)27 2055 y Fi(\017)j Fn(The)16 -b(equalit)o(y)e(test)g(op)q(erator)h(no)o(w)f(is)h(denoted)h(b)o(y)f -Fl(==)p Fn(,)f(instead)h(of)g Fl(=)p Fn(.)27 2148 y Fi(\017)22 -b Fn(The)13 b(syn)o(tax)f(for)g(table)g(construction)g(has)h(b)q(een)h -(greatly)d(simpli\014ed.)18 b(The)13 b(old)f Fl(@\(size\))g -Fn(has)g(b)q(een)i(sub-)72 2205 y(stituted)h(b)o(y)h -Fl({})p Fn(.)21 b(The)16 b(list)e(constructor)h(\(formerly)e -Fl(@[...])p Fn(\))i(and)h(the)f(record)h(constructor)f(\(formerly)72 -2261 y Fl(@{...})p Fn(\))f(no)o(w)g(are)h(b)q(oth)f(co)q(ded)i(lik)o(e) -e Fl({...})p Fn(.)19 b(When)c(the)g(construction)f(in)o(v)o(olv)o(es)g -(a)g(function)h(call,)e(lik)o(e)72 2318 y(in)i Fl(@func{...})p -Fn(,)e(the)i(new)g(syn)o(tax)f(do)q(es)i(not)e(use)h(the)g -Fl(@)p Fn(.)20 b(More)14 b(imp)q(ortan)o(t,)e Fm(a)17 -b(c)n(onstruction)e(function)72 2374 y(must)i(now)f(explicitly)g(r)n -(eturn)g(the)g(c)n(onstructe)n(d)g(table)p Fn(.)27 2468 -y Fi(\017)22 b Fn(The)16 b(function)f Fl(lua_call)f Fn(no)h(longer)f -(has)h(the)h(parameter)d Fl(nparam)p Fn(.)p -42 2509 -780 2 v 10 2536 a Fh(3)28 2552 y Fg(BTW,)f(Lua)i(means)f -Fe(mo)n(on)f Fg(in)i(P)o(ortuguese.)911 2748 y Fn(26)p -eop -%%Page: 27 27 -27 26 bop 27 199 a Fi(\017)22 b Fn(The)g(function)f Fl(lua_pop)g -Fn(is)g(no)h(longer)e(a)o(v)m(ailable,)i(since)g(it)f(could)g(lead)g -(to)g(strange)g(b)q(eha)o(vior.)39 b(In)72 256 y(particular,)18 -b(to)h(access)g(results)g(returned)g(from)f(a)g(Lua)i(function,)f(the)h -(new)f(macro)e Fl(lua_getresult)72 312 y Fn(should)e(b)q(e)h(used.)27 -406 y Fi(\017)22 b Fn(The)16 b(old)e(functions)h Fl(lua_storefield)f -Fn(and)h Fl(lua_storeindexed)e Fn(ha)o(v)o(e)i(b)q(een)h(replaced)f(b)o -(y)72 518 y Fl(int)24 b(lua_storesubscript)d(\(void\);)72 -631 y Fn(with)15 b(the)g(parameters)e(explicitly)h(pushed)j(on)e(the)g -(stac)o(k.)27 725 y Fi(\017)22 b Fn(The)12 b(functionalit)o(y)e(of)i -(the)g(function)f Fl(lua_errorfunction)f Fn(has)h(b)q(een)i(replaced)f -(b)o(y)g(the)g Fm(fal)r(lb)n(ack)f Fn(mec)o(h-)72 781 -y(anism;)i(see)j(Section)f(4.8.)27 875 y Fi(\017)22 b -Fn(When)16 b(calling)e(a)h(function)h(from)d(the)j(Lua)g(library)l(,)e -(parameters)g(passed)h(through)h(the)f(stac)o(k)g(m)o(ust)f(b)q(e)72 -932 y(pushed)20 b(just)f(b)q(efore)g(the)g(corresp)q(onden)o(t)g(call,) -f(with)g(no)h(in)o(termediate)e(calls)g(to)i(Lua.)31 -b(Sp)q(ecial)19 b(care)72 988 y(should)c(b)q(e)h(tak)o(en)f(with)f -(macros)g(lik)o(e)g Fl(lua_getindexed)f Fn(and)j Fl(lua_getfield)p -Fn(.)911 2748 y(27)p eop -%%Trailer -end -userdict /end-hook known{end-hook}if -%%EOF diff --git a/doc/refman.ps b/doc/refman.ps new file mode 100644 index 00000000..6d1cf314 --- /dev/null +++ b/doc/refman.ps @@ -0,0 +1,3562 @@ +%!PS-Adobe-2.0 +%%Creator: dvips 5.58 Copyright 1986, 1994 Radical Eye Software +%%Title: manual.dvi +%%CreationDate: Tue May 14 15:22:07 1996 +%%Pages: 38 +%%PageOrder: Ascend +%%BoundingBox: 0 0 612 792 +%%EndComments +%DVIPSCommandLine: _dvips -o manual.ps manual.dvi +%DVIPSParameters: dpi=300, comments removed +%DVIPSSource: TeX output 1996.05.14:1521 +%%BeginProcSet: tex.pro +/TeXDict 250 dict def TeXDict begin /N{def}def /B{bind def}N /S{exch}N +/X{S N}B /TR{translate}N /isls false N /vsize 11 72 mul N /hsize 8.5 72 +mul N /landplus90{false}def /@rigin{isls{[0 landplus90{1 -1}{-1 1} +ifelse 0 0 0]concat}if 72 Resolution div 72 VResolution div neg scale +isls{landplus90{VResolution 72 div vsize mul 0 exch}{Resolution -72 div +hsize mul 0}ifelse TR}if Resolution VResolution vsize -72 div 1 add mul +TR[matrix currentmatrix{dup dup round sub abs 0.00001 lt{round}if} +forall round exch round exch]setmatrix}N /@landscape{/isls true N}B +/@manualfeed{statusdict /manualfeed true put}B /@copies{/#copies X}B +/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{ +/nn 8 dict N nn begin /FontType 3 N /FontMatrix fntrx N /FontBBox FBB N +string /base X array /BitMaps X /BuildChar{CharBuilder}N /Encoding IE N +end dup{/foo setfont}2 array copy cvx N load 0 nn put /ctr 0 N[}B /df{ +/sf 1 N /fntrx FMat N df-tail}B /dfs{div /sf X /fntrx[sf 0 0 sf neg 0 0] +N df-tail}B /E{pop nn dup definefont setfont}B /ch-width{ch-data dup +length 5 sub get}B /ch-height{ch-data dup length 4 sub get}B /ch-xoff{ +128 ch-data dup length 3 sub get sub}B /ch-yoff{ch-data dup length 2 sub +get 127 sub}B /ch-dx{ch-data dup length 1 sub get}B /ch-image{ch-data +dup type /stringtype ne{ctr get /ctr ctr 1 add N}if}B /id 0 N /rw 0 N +/rc 0 N /gp 0 N /cp 0 N /G 0 N /sf 0 N /CharBuilder{save 3 1 roll S dup +/base get 2 index get S /BitMaps get S get /ch-data X pop /ctr 0 N ch-dx +0 ch-xoff ch-yoff ch-height sub ch-xoff ch-width add ch-yoff +setcachedevice ch-width ch-height true[1 0 0 -1 -.1 ch-xoff sub ch-yoff +.1 sub]{ch-image}imagemask restore}B /D{/cc X dup type /stringtype ne{]} +if nn /base get cc ctr put nn /BitMaps get S ctr S sf 1 ne{dup dup +length 1 sub dup 2 index S get sf div put}if put /ctr ctr 1 add N}B /I{ +cc 1 add D}B /bop{userdict /bop-hook known{bop-hook}if /SI save N @rigin +0 0 moveto /V matrix currentmatrix dup 1 get dup mul exch 0 get dup mul +add .99 lt{/QV}{/RV}ifelse load def pop pop}N /eop{SI restore userdict +/eop-hook known{eop-hook}if showpage}N /@start{userdict /start-hook +known{start-hook}if pop /VResolution X /Resolution X 1000 div /DVImag X +/IE 256 array N 0 1 255{IE S 1 string dup 0 3 index put cvn put}for +65781.76 div /vsize X 65781.76 div /hsize X}N /p{show}N /RMat[1 0 0 -1 0 +0]N /BDot 260 string N /rulex 0 N /ruley 0 N /v{/ruley X /rulex X V}B /V +{}B /RV statusdict begin /product where{pop product dup length 7 ge{0 7 +getinterval dup(Display)eq exch 0 4 getinterval(NeXT)eq or}{pop false} +ifelse}{false}ifelse end{{gsave TR -.1 .1 TR 1 1 scale rulex ruley false +RMat{BDot}imagemask grestore}}{{gsave TR -.1 .1 TR rulex ruley scale 1 1 +false RMat{BDot}imagemask grestore}}ifelse B /QV{gsave newpath transform +round exch round exch itransform moveto rulex 0 rlineto 0 ruley neg +rlineto rulex neg 0 rlineto fill grestore}B /a{moveto}B /delta 0 N /tail +{dup /delta X 0 rmoveto}B /M{S p delta add tail}B /b{S p tail}B /c{-4 M} +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{ +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{ +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 +a}B /bos{/SS save N}B /eos{SS restore}B end +%%EndProcSet +TeXDict begin 40258431 52099146 1000 300 300 +(/home/lhf/w/lua/distr/lua/doc/manual.dvi) @start /Fa +7 115 df<000FE0007FFC01FFFE03F03E07C00E0F80041F00001F00003E00003E00007C +00007C00007C0000F80000F80000F80000F80000F80000F80000F80000F800007C00007C +00007C00003E00003E00001F00001F00010F800307C00703F01F01FFFE007FF8000FE018 +227EA01D>67 D<001FF0007FFC01FFFF03F03F07C00F0F80021F00001F00003E00003C00 +007C00007C0000780000F80000F80000F80000F80000F80000F80000F801FFF801FF7801 +FF7C000F7C000F3C000F3E000F1F000F1F000F0F800F07C00F03F01F01FFFF007FFC001F +E018227EA01E>71 D<FFFFFFC0FFFFFFC0FFFFFFC0001F0000001F0000001F0000001F00 +00001F0000001F0000001F0000001F0000001F0000001F0000001F0000001F0000001F00 +00001F0000001F0000001F0000001F0000001F0000001F0000001F0000001F0000001F00 +00001F0000001F0000001F0000001F0000001F0000001F0000001F00001A207E9F1F>84 +D<07E03FF87FFC783E601F400F000F000F01FF0FFF3FFF7F0FF80FF00FF00FF00FF83F7F +FF3FFF1F8F10147E9316>97 D<03F0000FFC001FFE003E1F007C0700780700700380FFFF +80FFFF80FFFF80F00000F00000F000007000007800003C00803E07801FFF8007FF0001F8 +0011147F9314>101 D<007E01FE03FE078207000F000F000F000F000F000F000F00FFF0 +FFF0FFF00F000F000F000F000F000F000F000F000F000F000F000F000F000F000F000F00 +0F000F20809F0E>I<F0E0F3E0F7E0FFE0FF00FC00F800F800F000F000F000F000F000F0 +00F000F000F000F000F000F0000B147D9310>114 D E /Fb 7 121 +df<07F8001FFE003FFF803E07C03E03C01C01E00001E0003FE003FFE00FFFE03FC1E07C +01E07801E0F001E0F001E0F001E07803E07C07E03FFFFE1FFEFE03F87E17157E941A>97 +D<01F80007FF000FFF801F07C03C03C07801E07801E0F000F0F000F0FFFFF0FFFFF0FFFF +F0F000007000007800007C00F03E00F01F03F00FFFE003FFC000FE0014157D941A>101 +D<7F0F8000FF7FE0007FFFF0000FF0F0000FC078000F8078000F0078000F0078000F0078 +000F0078000F0078000F0078000F0078000F0078000F0078000F0078000F0078000F0078 +007FE1FF00FFF3FF807FE1FF00191580941A>110 D<7FC1F8FFC7FC7FDFFE03FE1E03F8 +0C03F00003E00003E00003C00003C00003C00003C00003C00003C00003C00003C00003C0 +0003C0007FFF80FFFF807FFF8017157F941A>114 D<01C00003C00003C00003C00003C0 +0003C00003C0007FFFE0FFFFE0FFFFE003C00003C00003C00003C00003C00003C00003C0 +0003C00003C00003C00003C0F003C0F003C0F003C0F001E1E001FFE000FF80003F00141C +7F9B1A>116 D<7FC7FCFFC7FE7FC7FC0F01E00F01E00F01E00F83E00783C00783C00783 +C003C78003C78003C78001C70001EF0001EF0001EF0000FE0000FE0000FE00007C001715 +7F941A>118 D<7FC7F87FCFFC7FC7F80787C007C78003EF8001FF0000FE0000FC00007C +00007C00007C0000FE0001EF0003EF0003C7800783C00F83E07FC7FCFFC7FE7FC7FC1715 +7F941A>120 D E /Fc 1 122 df<1E0180370380670380670380C707000E07000E07000E +07001C0E001C0E001C0E000C1E000E3C0003DC00001C0038380078380078700030C0001F +00001114808D11>121 D E /Fd 3 121 df<70F8F8F878181818183030606040050E7C84 +0D>59 D<0E07E0001F8FF00033F8780063F0380063E03C0063C03C00C780780007807800 +07807800078078000F00F0000F00F0000F00F0000F01E1801E01E3001E03C3001E03C600 +1E01CE003C01FC001800F00019147F931B>110 D<07C3C00FE7E0187C603078F06079F0 +6079F0C0F1E000F1C000F00000F00001E00001E00039E00079E030FBC060FBC060F3C0C0 +E7E3807CFF00383C0014147E931A>120 D E /Fe 51 121 df<0007F800007FFE0001FC +0F0003F01F0007E03F800FC03F800FC03F800FC03F800FC01F000FC004000FC000000FC0 +00000FC00000FFFFFF80FFFFFF80FFFFFF800FC01F800FC01F800FC01F800FC01F800FC0 +1F800FC01F800FC01F800FC01F800FC01F800FC01F800FC01F800FC01F800FC01F800FC0 +1F800FC01F800FC01F807FF8FFF07FF8FFF07FF8FFF01C237FA21F>12 +D<3C7EFFFFFFFF7E3C08087C8710>46 D<0000180000380000380000700000700000E000 +00E00000E00001C00001C0000380000380000380000700000700000700000E00000E0000 +1C00001C00001C0000380000380000700000700000700000E00000E00001C00001C00001 +C0000380000380000700000700000700000E00000E00000E00001C00001C000038000038 +0000380000700000700000E00000E00000C0000015317DA41C>I<00FE0007FFC00F83E0 +1F01F03E00F83E00F87C007C7C007C7C007CFC007CFC007EFC007EFC007EFC007EFC007E +FC007EFC007EFC007EFC007EFC007EFC007EFC007EFC007E7C007C7C007C7C007C3E00F8 +3E00F81F01F00F83E007FFC000FE0017207E9F1C>I<00180000780003F800FFF800FFF8 +00FDF80001F80001F80001F80001F80001F80001F80001F80001F80001F80001F80001F8 +0001F80001F80001F80001F80001F80001F80001F80001F80001F80001F80001F80001F8 +007FFFE07FFFE07FFFE013207C9F1C>I<03FC000FFF003FFFC0783FE07C0FF0FE07F0FE +03F8FE03F8FE03F87C03F83803F80003F80003F00007F00007E0000FC0001F80001F0000 +3C0000780000F00001E03803C0380700380600380C00781FFFF03FFFF07FFFF0FFFFF0FF +FFF0FFFFF015207D9F1C>I<01FE0007FF800FFFE01E07F03F03F03F03F83F83F83F03F8 +1F03F80C03F80003F00007E00007C0001F8001FE0001FF000007E00003F00001F80001FC +0001FE0001FE7C01FE7C01FEFE01FEFE01FCFE01FC7C03F87C07F03FFFE00FFFC003FE00 +17207E9F1C>I<0000E00001E00003E00007E0000FE0000FE0001FE0003FE00077E000E7 +E000E7E001C7E00387E00707E00E07E00E07E01C07E03807E07007E0E007E0FFFFFFFFFF +FFFFFFFF0007E00007E00007E00007E00007E00007E000FFFF00FFFF00FFFF18207E9F1C +>I<2000603C01E03FFFC03FFFC03FFF803FFE003FFC003FF00038000038000038000038 +000039FC003FFF003E0FC03807E03003F00003F00003F00003F80003F83803F87C03F8FC +03F8FC03F8FC03F0F803F07007E03C0FC03FFF800FFF0003F80015207D9F1C>I<001F80 +00FFE003FFF007F0F00FC1F81F81F83F01F83F01F87E00F07E00007E0000FE0800FE7FC0 +FEFFE0FF81F0FF00F8FF00FCFF00FCFE00FEFE00FEFE00FEFE00FE7E00FE7E00FE7E00FE +3E00FC3E00FC1F00F80F83F007FFE003FFC000FF0017207E9F1C>I<7000007C00007FFF +FE7FFFFE7FFFFE7FFFFC7FFFF87FFFF0F00070E000E0E001C0E00380E00700000E00000E +00001C00003C0000380000780000780000F80000F00001F00001F00001F00001F00003F0 +0003F00003F00003F00003F00003F00003F00001E00017227DA11C>I<00FE0003FFC007 +FFE00F83F01E01F01E00F83E00F83E00F83F00F83F80F83FE1F01FF9E01FFFC00FFF8007 +FFC003FFE00FFFF01F7FF83E1FFC7C07FC7C01FEF800FEF8007EF8003EF8003EF8003E7C +003C7E00783F01F81FFFF00FFFC001FF0017207E9F1C>I<00FE0007FF800FFFE01F83F0 +3F01F07E00F87E00F8FE00FCFE00FCFE00FCFE00FEFE00FEFE00FEFE00FE7E01FE7E01FE +3E01FE1F03FE0FFEFE07FCFE0020FE0000FC0000FC1E00FC3F01F83F01F83F01F03F03E0 +1E0FC01FFF800FFE0003F80017207E9F1C>I<00007000000000F800000000F800000000 +F800000001FC00000001FC00000003FE00000003FE00000003FE000000077F000000077F +0000000F7F8000000E3F8000000E3F8000001C1FC000001C1FC000003C1FE00000380FE0 +0000380FE00000700FF000007007F00000F007F80000FFFFF80000FFFFF80001FFFFFC00 +01C001FC0001C001FC00038000FE00038000FE00078000FF000700007F00FFF007FFF8FF +F007FFF8FFF007FFF825227EA12A>65 D<0003FE0180001FFF838000FFFFE78001FF00FF +8003F8003F8007F0001F800FE0000F801FC0000F803F800007803F800007807F80000380 +7F000003807F00000380FF00000000FF00000000FF00000000FF00000000FF00000000FF +00000000FF00000000FF000000007F000000007F000003807F800003803F800003803F80 +0007801FC00007000FE0000F0007F0001E0003F8003C0001FF00F80000FFFFF000001FFF +C0000003FE000021227DA128>67 D<FFFFFF8000FFFFFFF000FFFFFFFC0007F003FE0007 +F0007F0007F0003F8007F0001FC007F0000FE007F0000FE007F0000FF007F00007F007F0 +0007F007F00007F007F00007F807F00007F807F00007F807F00007F807F00007F807F000 +07F807F00007F807F00007F807F00007F807F00007F007F00007F007F00007F007F0000F +E007F0000FE007F0001FC007F0003F8007F0007F0007F003FE00FFFFFFFC00FFFFFFF000 +FFFFFF800025227EA12B>I<FFFFFFFCFFFFFFFCFFFFFFFC07F001FC07F0007C07F0003C +07F0001C07F0001E07F0001E07F01C0E07F01C0E07F01C0E07F01C0E07F03C0007F07C00 +07FFFC0007FFFC0007FFFC0007F07C0007F03C0007F01C0707F01C0707F01C0707F01C0E +07F0000E07F0000E07F0001E07F0001E07F0003E07F0007E07F001FCFFFFFFFCFFFFFFFC +FFFFFFFC20227EA125>I<FFFFFFF8FFFFFFF8FFFFFFF807F003F807F000F807F0007807 +F0003807F0003C07F0003C07F01C1C07F01C1C07F01C1C07F01C1C07F03C0007F07C0007 +FFFC0007FFFC0007FFFC0007F07C0007F03C0007F01C0007F01C0007F01C0007F01C0007 +F0000007F0000007F0000007F0000007F0000007F0000007F00000FFFFC000FFFFC000FF +FFC0001E227EA123>I<FFFF83FFFEFFFF83FFFEFFFF83FFFE07F0001FC007F0001FC007 +F0001FC007F0001FC007F0001FC007F0001FC007F0001FC007F0001FC007F0001FC007F0 +001FC007F0001FC007F0001FC007FFFFFFC007FFFFFFC007FFFFFFC007F0001FC007F000 +1FC007F0001FC007F0001FC007F0001FC007F0001FC007F0001FC007F0001FC007F0001F +C007F0001FC007F0001FC007F0001FC007F0001FC0FFFF83FFFEFFFF83FFFEFFFF83FFFE +27227EA12C>72 D<FFFF80FFFF80FFFF8007F00007F00007F00007F00007F00007F00007 +F00007F00007F00007F00007F00007F00007F00007F00007F00007F00007F00007F00007 +F00007F00007F00007F00007F00007F00007F00007F00007F00007F000FFFF80FFFF80FF +FF8011227EA115>I<FFFFC000FFFFC000FFFFC00007F0000007F0000007F0000007F000 +0007F0000007F0000007F0000007F0000007F0000007F0000007F0000007F0000007F000 +0007F0000007F0000007F0000007F0000007F0003807F0003807F0003807F0003807F000 +7807F0007807F0007807F000F007F001F007F003F007F00FF0FFFFFFF0FFFFFFF0FFFFFF +F01D227EA122>76 D<FFF800001FFFFFF800001FFFFFFC00003FFF07FC00003FE007FC00 +003FE0077E000077E0077E000077E0073F0000E7E0073F0000E7E0071F8001C7E0071F80 +01C7E0071F8001C7E0070FC00387E0070FC00387E00707E00707E00707E00707E00703F0 +0E07E00703F00E07E00703F00E07E00701F81C07E00701F81C07E00700FC3807E00700FC +3807E007007E7007E007007E7007E007007E7007E007003FE007E007003FE007E007001F +C007E007001FC007E007000F8007E0FFF80F80FFFFFFF80F80FFFFFFF80700FFFF30227E +A135>I<0007FC0000003FFF800000FE0FE00003F803F80007E000FC000FC0007E001FC0 +007F001F80003F003F80003F803F80003F807F00001FC07F00001FC07F00001FC0FF0000 +1FE0FF00001FE0FF00001FE0FF00001FE0FF00001FE0FF00001FE0FF00001FE0FF00001F +E0FF00001FE07F00001FC07F80003FC07F80003FC03F80003F803FC0007F801FC0007F00 +0FE000FE0007F001FC0003F803F80000FE0FE000003FFF80000007FC000023227DA12A> +79 D<FFFFFF00FFFFFFE0FFFFFFF007F007F807F001FC07F001FE07F000FE07F000FF07 +F000FF07F000FF07F000FF07F000FF07F000FF07F000FE07F001FE07F001FC07F007F807 +FFFFF007FFFFC007F0000007F0000007F0000007F0000007F0000007F0000007F0000007 +F0000007F0000007F0000007F0000007F00000FFFF8000FFFF8000FFFF800020227EA126 +>I<FFFFFE0000FFFFFFC000FFFFFFF00007F007F80007F001FC0007F001FE0007F000FE +0007F000FF0007F000FF0007F000FF0007F000FF0007F000FF0007F000FE0007F001FE00 +07F001FC0007F007F00007FFFFC00007FFFF000007F00FC00007F007E00007F007F00007 +F003F00007F003F80007F003F80007F003F80007F003F80007F003FC0007F003FC0007F0 +03FC0007F003FC0E07F001FE0EFFFF81FF1CFFFF80FFF8FFFF801FF027227EA12A>82 +D<01FE0607FF8E1FFFFE3F01FE7C007E78003E78001EF8001EF8000EF8000EFC0000FF00 +00FFE0007FFF007FFFC03FFFF01FFFF80FFFFC03FFFE003FFE0003FE00007F00003F0000 +1FE0001FE0001FE0001FF0001EF0003EFC003CFF00FCFFFFF8E7FFE0C0FF8018227DA11F +>I<7FFFFFFF807FFFFFFF807FFFFFFF807E03F81F807C03F807807803F807807003F803 +80F003F803C0F003F803C0E003F801C0E003F801C0E003F801C0E003F801C00003F80000 +0003F800000003F800000003F800000003F800000003F800000003F800000003F8000000 +03F800000003F800000003F800000003F800000003F800000003F800000003F800000003 +F800000003F800000003F8000001FFFFF00001FFFFF00001FFFFF00022227EA127>I<FF +FF001FFEFFFF001FFEFFFF001FFE07F00001C007F80003C003F800038003FC00078001FC +00070001FC00070000FE000E0000FE000E0000FF001E00007F001C00007F803C00003F80 +3800003F803800001FC07000001FC07000001FE0F000000FE0E000000FF0E0000007F1C0 +000007F1C0000007FBC0000003FB80000003FF80000001FF00000001FF00000000FE0000 +0000FE00000000FE000000007C000000007C0000000038000027227FA12A>86 +D<0FFE003FFF807E07E07E03F07E01F07E01F83C01F80001F80001F800FFF807FFF81FE1 +F83F01F87E01F8FC01F8FC01F8FC01F8FC01F87E03F87E0EFF1FFCFF07F03F18167E951B +>97 D<FF800000FF800000FF8000001F8000001F8000001F8000001F8000001F8000001F +8000001F8000001F8000001F8000001F8000001F8FE0001FFFF8001FF07C001FC03E001F +801F001F800F801F800F801F800FC01F800FC01F800FC01F800FC01F800FC01F800FC01F +800FC01F800FC01F800F801F801F801F801F001FC03E001FE07C001E7FF8001C0FC0001A +237EA21F>I<00FF8007FFE00F83F01F03F03E03F07E03F07C01E07C0000FC0000FC0000 +FC0000FC0000FC0000FC00007C00007E00007E00003E00381F00700FC0F007FFC000FF00 +15167E9519>I<0001FF000001FF000001FF0000003F0000003F0000003F0000003F0000 +003F0000003F0000003F0000003F0000003F0000003F0001FE3F0007FFBF000F81FF001F +007F003E003F007E003F007C003F00FC003F00FC003F00FC003F00FC003F00FC003F00FC +003F00FC003F00FC003F007C003F007C003F003E003F001F00FF000F83FFE007FFBFE001 +FC3FE01B237EA21F>I<00FE0007FF800F87C01E01E03E01F07C00F07C00F8FC00F8FC00 +F8FFFFF8FFFFF8FC0000FC0000FC00007C00007C00007E00003E00381F00700FC0F003FF +C000FF0015167E951A>I<001F8000FFE001F1F003E3F007E3F00FC3F00FC1E00FC0000F +C0000FC0000FC0000FC0000FC000FFFE00FFFE00FFFE000FC0000FC0000FC0000FC0000F +C0000FC0000FC0000FC0000FC0000FC0000FC0000FC0000FC0000FC0000FC0000FC0007F +FC007FFC007FFC00142380A211>I<01FE1F0007FFFF800F87E7801F03E7801E01E7003E +01F0003E01F0003E01F0003E01F0003E01F0001E01E0001F03E0000F87C0000FFF800019 +FE0000180000001C0000001C0000001FFFE0001FFFF8000FFFFE000FFFFF003FFFFF007C +003F80F8001F80F8000F80F8000F80F8000F807C001F007E003F001F80FC000FFFF80001 +FFC00019217F951C>I<FF800000FF800000FF8000001F8000001F8000001F8000001F80 +00001F8000001F8000001F8000001F8000001F8000001F8000001F87E0001F9FF8001FB8 +FC001FE07C001FC07E001FC07E001F807E001F807E001F807E001F807E001F807E001F80 +7E001F807E001F807E001F807E001F807E001F807E001F807E001F807E00FFF1FFC0FFF1 +FFC0FFF1FFC01A237EA21F>I<1E003F007F807F807F807F803F001E0000000000000000 +0000000000FF80FF80FF801F801F801F801F801F801F801F801F801F801F801F801F801F +801F801F801F80FFF0FFF0FFF00C247FA30F>I<003C007E00FF00FF00FF00FF007E003C +00000000000000000000000003FF03FF03FF003F003F003F003F003F003F003F003F003F +003F003F003F003F003F003F003F003F003F003F003F003F003F783FFC3FFC3EFC7E78FC +7FF01FC0102E83A311>I<FF800000FF800000FF8000001F8000001F8000001F8000001F +8000001F8000001F8000001F8000001F8000001F8000001F8000001F83FF801F83FF801F +83FF801F80F0001F83E0001F8780001F8F00001F9E00001FBE00001FFE00001FFF00001F +FF80001FCFC0001F8FC0001F87E0001F83F0001F83F0001F81F8001F80FC00FFF1FFC0FF +F1FFC0FFF1FFC01A237EA21E>I<FF80FF80FF801F801F801F801F801F801F801F801F80 +1F801F801F801F801F801F801F801F801F801F801F801F801F801F801F801F801F801F80 +1F801F801F80FFF0FFF0FFF00C237FA20F>I<FF87F00FE000FF9FFC3FF800FFB87E70FC +001FE03EC07C001FC03F807E001FC03F807E001F803F007E001F803F007E001F803F007E +001F803F007E001F803F007E001F803F007E001F803F007E001F803F007E001F803F007E +001F803F007E001F803F007E001F803F007E001F803F007E00FFF1FFE3FFC0FFF1FFE3FF +C0FFF1FFE3FFC02A167E952F>I<FF87E000FF9FF800FFB8FC001FE07C001FC07E001FC0 +7E001F807E001F807E001F807E001F807E001F807E001F807E001F807E001F807E001F80 +7E001F807E001F807E001F807E001F807E00FFF1FFC0FFF1FFC0FFF1FFC01A167E951F> +I<00FE0007FFC00F83E01E00F03E00F87C007C7C007C7C007CFC007EFC007EFC007EFC00 +7EFC007EFC007EFC007E7C007C7C007C3E00F81F01F00F83E007FFC000FE0017167E951C +>I<FF8FE000FFFFF800FFF07C001FC03E001F801F001F801F801F801F801F800FC01F80 +0FC01F800FC01F800FC01F800FC01F800FC01F800FC01F800FC01F801F801F801F801F80 +3F001FC03E001FE0FC001FFFF8001F8FC0001F8000001F8000001F8000001F8000001F80 +00001F8000001F800000FFF00000FFF00000FFF000001A207E951F>I<FF0F80FF1FE0FF +33F01F63F01FC3F01FC3F01FC1E01F80001F80001F80001F80001F80001F80001F80001F +80001F80001F80001F80001F8000FFF800FFF800FFF80014167F9517>114 +D<07F3001FFF00781F00700F00F00700F00700F80000FF0000FFF0007FFC003FFE001FFF +0007FF00003F80E00F80E00780F00780F00780F80700FC1E00FFFC00C7F00011167E9516 +>I<01C00001C00001C00001C00003C00003C00003C00007C00007C0000FC0003FFF00FF +FF00FFFF000FC0000FC0000FC0000FC0000FC0000FC0000FC0000FC0000FC0000FC0000F +C3800FC3800FC3800FC3800FC3800FC30007E70003FE0000FC0011207F9F16>I<FF83FE +00FF83FE00FF83FE001F807E001F807E001F807E001F807E001F807E001F807E001F807E +001F807E001F807E001F807E001F807E001F807E001F807E001F807E001F80FE001F80FE +000F83FFC007FF7FC001FC7FC01A167E951F>I<FFF03FE0FFF03FE0FFF03FE00FC00E00 +0FE01E0007E01C0007E01C0003F0380003F0380003F8780001F8700001FCF00000FCE000 +00FCE000007FC000007FC000007FC000003F8000003F8000001F0000001F0000000E0000 +1B167F951E>I<FFE3FF8FF8FFE3FF8FF8FFE3FF8FF81FC07C03C00FC0FE03800FC0FE03 +800FE0FF078007E1FF070007E1DF070003F1DF8E0003F38F8E0003F38F8E0001FB8FDC00 +01FF07DC0001FF07FC0000FF07F80000FE03F80000FE03F800007E03F000007C01F00000 +3C01E000003800E00025167F9528>I<FFF0FFE0FFF0FFE0FFF0FFE007E0780007F0F000 +03F8F00001F9E00000FFC00000FF8000007F0000003F0000001F8000003FC000007FE000 +00F7F00001E3F00001C1F80003C0FC000780FE00FFC1FFE0FFC1FFE0FFC1FFE01B167F95 +1E>I E /Ff 1 98 df<03CC0E2E183C381C301C701CE038E038E038E038C073C073C0F3 +60F263361E1C10107C8F14>97 D E /Fg 2 104 df<003C00E001C00380038003800380 +03800380038003800380038003800380038007001E00F8001E0007000380038003800380 +03800380038003800380038003800380038001C000E0003C0E257E9B13>102 +D<F8001E000700038003800380038003800380038003800380038003800380038001C000 +E0003C00E001C0038003800380038003800380038003800380038003800380038007001E +00F8000E257E9B13>I E /Fh 30 122 df<00FC000383000603800E07801C07801C0300 +1C00001C00001C00001C0000FFFF80FFFF801C03801C03801C03801C03801C03801C0380 +1C03801C03801C03801C03801C03801C0380FF8FF0FF8FF0141A809915>12 +D<70F8FCFC7404040808102040060C7D990B>39 D<70F0F8F87808081010102040050C7D +840B>44 D<70F8F8F87005057D840B>46 D<07E01C38381C381C700E700E700EF00FF00F +F00FF00FF00FF00FF00FF00FF00FF00F700E700E700E381C381C1C3807E010187F9713> +48 D<07E01FF8383C781C781E781E301E001E001C0038007007E00038001C000E000F00 +0F700FF80FF80EF01E703C3FF80FE010187F9713>51 D<70F8F8F87000000000000070F0 +F8F8780808101010204005177D8F0B>59 D<000C0000001E0000001E0000001E0000003F +0000003F0000003F000000678000006780000067800000C3C00000C3C00000C3C0000181 +E0000181E0000181E0000300F00003FFF00007FFF80006007800060078000E007C000C00 +3C001E003C00FF81FFC0FF81FFC01A1A7F991D>65 D<07C21FF6383E701E600EE006E006 +E006F000F8007F803FF01FF80FFC01FE001E000F0007C007C007C007E006F00EFC1CDFF8 +87E0101A7E9915>83 D<FEFEC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0 +C0C0C0C0C0C0C0C0C0FEFE07257D9B0B>91 D<FEFE060606060606060606060606060606 +060606060606060606060606060606060606FEFE0725809B0B>93 +D<1FC000707000783800781C00301C00001C0003FC001F1C003C1C00781C00F01C00F01D +80F01D80F03D80785D801F8F0011107F8F13>97 D<FC0000FC00001C00001C00001C0000 +1C00001C00001C00001C00001C00001CFC001F07001E03801C03C01C01C01C01E01C01E0 +1C01E01C01E01C01E01C01E01C01C01C03801E03001F060018F800131A809915>I<07F0 +1C1C383C783C7018F000F000F000F000F000F0007000780C380C1C3807E00E107F8F11> +I<003F00003F0000070000070000070000070000070000070000070000070003E7000C1F +00180F00380700700700F00700F00700F00700F00700F00700F00700700700780700380F +001C3FE007E7E0131A7F9915>I<07C01C7038387038701CF01CFFFCF000F000F000F000 +7000780C38081C3807E00E107F8F11>I<01F007180E3C0C3C1C181C001C001C001C001C +00FFC0FFC01C001C001C001C001C001C001C001C001C001C001C001C00FF80FF800E1A80 +990C>I<0FC700387B80703B80F03C00F03C00F03C00F03C007038003870006FC0004000 +004000006000007FF0003FFC003FFE00600F00C00300C00300C00300C00300600600381C +0007E00011187F8F13>I<387C7C7C380000000000FCFC1C1C1C1C1C1C1C1C1C1C1C1CFF +FF081A80990A>105 D<FC00FC001C001C001C001C001C001C001C001C001C001C001C00 +1C001C001C001C001C001C001C001C001C001C001C00FF80FF80091A80990A>108 +D<FC7C1F00FD8E63801E0781C01E0781C01C0701C01C0701C01C0701C01C0701C01C0701 +C01C0701C01C0701C01C0701C01C0701C01C0701C0FF9FE7F8FF9FE7F81D107F8F20>I< +FC7C00FD87001E03801E03801C03801C03801C03801C03801C03801C03801C03801C0380 +1C03801C0380FF9FF0FF9FF01410808F15>I<07E01C38381C700E700EF00FF00FF00FF0 +0FF00FF00F700E700E381C1C3807E010107F8F13>I<FCFC00FF07001E03801C03C01C03 +C01C01E01C01E01C01E01C01E01C01E01C01E01C03C01C03801E07001F0E001CF8001C00 +001C00001C00001C00001C0000FF8000FF80001317808F15>I<FCF0FD1C1E3C1E3C1C18 +1C001C001C001C001C001C001C001C001C00FF80FF800E10808F0F>114 +D<1F2060E04060C060C060F0007F003FC01FE000F0C070C030E030E020F0408F800C107F +8F0F>I<18001800180018001800180038007FC0FFC03800380038003800380038003800 +386038603860386038601CC007800B177F960F>I<FC1F80FC1F801C03801C03801C0380 +1C03801C03801C03801C03801C03801C03801C03801C07800C07800E0BF003F3F0141080 +8F15>I<FE3F80FE3F803C0E001C0C001C0C000E18000E18000E18000730000730000770 +0003E00003E00001C00001C00001C00011107F8F14>I<FE3F80FE3F803C0E001C0C001C +0C000E18000E18000E180007300007300007700003E00003E00001C00001C00001C00001 +8000018000618000F30000F30000E6000078000011177F8F14>121 +D E /Fi 3 51 df<00C00000C00000C00000C00000C00000C00000C00000C00000C000FF +FF80FFFF8000C00000C00000C00000C00000C00000C00000C00000C00000C00011147E8F +17>43 D<0C007C009C001C001C001C001C001C001C001C001C001C001C001C001C00FF80 +09107E8F0F>49 D<1F006180C0C0E0E0E0E000E000C001C0018003000400082010203FC0 +7FC0FFC00B107F8F0F>I E /Fj 5 107 df<03F0000FFC001FFE003FFF007FFF807FFF80 +FFFFC0FFFFC0FFFFC0FFFFC0FFFFC0FFFFC07FFF807FFF803FFF001FFE000FFC0003F000 +12127E9317>15 D<00000006000000000600000000060000000003000000000300000000 +0380000000018000000000C0000000006000000000700000000018FFFFFFFFFFFFFFFFFF +FF00000000180000000070000000006000000000C0000000018000000003800000000300 +000000030000000006000000000600000000060028187E962D>33 +D<001F007F00F801E003C003C003C003C003C003C003C003C003C003C003C003C003C003 +C003C007800F00FE00F800FE000F00078003C003C003C003C003C003C003C003C003C003 +C003C003C003C003C003C001E000F8007F001F102D7DA117>102 +D<F800FE001F00078003C003C003C003C003C003C003C003C003C003C003C003C003C003 +C003C001E000F0007F001F007F00F001E003C003C003C003C003C003C003C003C003C003 +C003C003C003C003C003C007801F00FE00F800102D7DA117>I<C0C0C0C0C0C0C0C0C0C0 +C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C002 +2D7BA10D>106 D E /Fk 2 51 df<06001E00FE00EE000E000E000E000E000E000E000E +000E000E000E000E000E000E000E000E00FFE0FFE00B157D9412>49 +D<1F803FE070F0F870F878F838703800780070007000E001C00180030006000C18101820 +387FF0FFF0FFF00D157E9412>I E /Fl 52 122 df<000FF000007FF80001F81C0003E0 +3E0007E07E000FC07E000FC07E000FC07E000FC03C000FC000000FC000000FC1FF00FFFF +FF00FFFFFF00FFFFFF000FC03F000FC03F000FC03F000FC03F000FC03F000FC03F000FC0 +3F000FC03F000FC03F000FC03F000FC03F000FC03F000FC03F000FC03F007FF9FFE07FF9 +FFE07FF9FFE01B20809F1D>12 D<3C03C07E07E0FF0FF0FF8FF8FF8FF8FF8FF87F87F83D +83D80180180380380300300300300600600E00E01C01C038038030030015117E9F1B>34 +D<3C007E00FF00FF80FF80FF807F803D80018003800300030006000E001C003800300009 +117D9F0F>39 D<3C7EFFFFFFFF7E3C08087D870F>46 D<00380000F80007F800FFF800FF +F800F9F80001F80001F80001F80001F80001F80001F80001F80001F80001F80001F80001 +F80001F80001F80001F80001F80001F80001F80001F80001F80001F8007FFFE07FFFE07F +FFE0131D7D9C1A>49 D<03FC001FFF803FFFC07C1FE0FE07F0FE03F0FE03F8FE01F87C01 +F83801F80003F80003F00007E00007E0000FC0001F00003E00007C0000F00001E0380380 +380700380E00781FFFF83FFFF07FFFF0FFFFF0FFFFF0FFFFF0151D7E9C1A>I<03FC000F +FF801FFFC03C0FE07E07F07E03F07E03F07E03F03C07F00007E0000FC0001F8003FE0003 +FC00000F800007E00003F00003F00003F83803F87C03F8FE03F8FE03F8FE03F0FC07F07C +0FE03FFFC01FFF0003FC00151D7E9C1A>I<0001E00003E00003E00007E0000FE0001FE0 +003BE00073E000F3E001E3E001C3E00383E00703E00E03E01C03E03803E07803E0F003E0 +FFFFFEFFFFFEFFFFFE0007E00007E00007E00007E00007E000FFFE00FFFE00FFFE171D7F +9C1A>I<3800E03FFFE03FFFC03FFF803FFF003FFC003FC0003800003800003800003800 +0039FC003FFF803E07C03803E01003F00003F00003F80003F87803F8FC03F8FC03F8FC03 +F8FC03F07807E07C0FE03FFFC00FFF0003F800151D7E9C1A>I<003F0001FFC007FFE00F +C1E01F03F01E03F03E03F07E03F07C01E07C0000FC1000FCFF00FDFFC0FF03E0FE01F0FE +01F0FC01F8FC01F8FC01F8FC01F87C01F87C01F87C01F83C01F03E01F01F03E00FFFC007 +FF8001FC00151D7E9C1A>I<7000007FFFF87FFFF87FFFF87FFFF07FFFE0FFFFC0F00380 +E00700E00E00E00E00001C0000380000780000700000F00000F00001F00001E00003E000 +03E00003E00007E00007E00007E00007E00007E00007E00003C000018000151E7D9D1A> +I<01FE0007FF801FFFC03E07E03C03F07C01F07C01F07E01F07F81F07FE3E03FF3C03FFF +801FFF000FFF8007FFC01FFFE03E7FF07C1FF87807F8F803F8F801F8F800F8F800F8F800 +F07C01F07F03E03FFFC00FFF8003FC00151D7E9C1A>I<0000E000000001F000000001F0 +00000003F800000003F800000003F800000007FC00000007FC0000000FFE0000000EFE00 +00000EFE0000001C7F0000001C7F0000003C7F800000383F800000383F800000701FC000 +00701FC00000F01FE00000E00FE00000FFFFE00001FFFFF00001FFFFF00003C007F80003 +8003F800038003F800070001FC00070001FC00FFF01FFFE0FFF01FFFE0FFF01FFFE0231F +7E9E28>65 D<FFFFFE00FFFFFFC0FFFFFFE007E007F007E003F807E001FC07E001FC07E0 +01FC07E001FC07E001FC07E001FC07E001F807E003F007E00FE007FFFF8007FFFFE007E0 +03F007E001F807E000FC07E000FC07E000FE07E000FE07E000FE07E000FE07E000FE07E0 +01FC07E001FC07E007F8FFFFFFF0FFFFFFE0FFFFFF001F1F7E9E25>I<0007F806007FFF +0E01FFFFDE03FE03FE07F000FE0FC0007E1F80003E3F80001E3F00001E7F00000E7E0000 +0E7E00000EFE000000FE000000FE000000FE000000FE000000FE000000FE0000007E0000 +007E00000E7F00000E3F00000E3F80001C1F80001C0FC0003807F0007803FE03F001FFFF +C0007FFF800007FC001F1F7D9E26>I<FFFFFE0000FFFFFFC000FFFFFFF00007F007F800 +07F001FC0007F000FE0007F0007F0007F0003F0007F0003F8007F0001F8007F0001F8007 +F0001FC007F0001FC007F0001FC007F0001FC007F0001FC007F0001FC007F0001FC007F0 +001FC007F0001FC007F0001F8007F0001F8007F0003F8007F0003F0007F0007F0007F000 +7E0007F001FC0007F007F800FFFFFFF000FFFFFFC000FFFFFE0000221F7E9E28>I<FFFF +FFE0FFFFFFE0FFFFFFE007F007E007F003E007F001E007F000F007F000F007F0707007F0 +707007F0707007F0707007F1F00007FFF00007FFF00007FFF00007F1F00007F0700007F0 +701C07F0701C07F0701C07F0003807F0003807F0003807F0007807F0007807F001F807F0 +07F8FFFFFFF0FFFFFFF0FFFFFFF01E1F7E9E22>I<FFFFFFE0FFFFFFE0FFFFFFE007F007 +E007F003E007F001E007F000F007F000F007F0007007F0707007F0707007F0707007F070 +0007F1F00007FFF00007FFF00007FFF00007F1F00007F0700007F0700007F0700007F070 +0007F0000007F0000007F0000007F0000007F0000007F00000FFFFC000FFFFC000FFFFC0 +001C1F7E9E21>I<FFFF80FFFF80FFFF8007F00007F00007F00007F00007F00007F00007 +F00007F00007F00007F00007F00007F00007F00007F00007F00007F00007F00007F00007 +F00007F00007F00007F00007F00007F00007F000FFFF80FFFF80FFFF80111F7F9E14>73 +D<FFFFC000FFFFC000FFFFC00007F0000007F0000007F0000007F0000007F0000007F000 +0007F0000007F0000007F0000007F0000007F0000007F0000007F0000007F0000007F000 +0007F001C007F001C007F001C007F001C007F003C007F003C007F0078007F0078007F00F +8007F03F80FFFFFF80FFFFFF80FFFFFF801A1F7E9E1F>76 D<001FF80000FFFF0001F81F +8007E007E00FC003F01F8001F81F0000F83F0000FC7F0000FE7E00007E7E00007EFE0000 +7FFE00007FFE00007FFE00007FFE00007FFE00007FFE00007FFE00007FFE00007F7E0000 +7E7F0000FE7F0000FE3F0000FC3F8001FC1F8001F80FC003F007E007E001F81F8000FFFF +00001FF800201F7D9E27>79 D<FFFFFE00FFFFFF80FFFFFFE007F00FF007F003F807F001 +F807F001FC07F001FC07F001FC07F001FC07F001FC07F001FC07F001F807F003F007F00F +F007FFFFC007FFFF0007F0000007F0000007F0000007F0000007F0000007F0000007F000 +0007F0000007F0000007F0000007F00000FFFF8000FFFF8000FFFF80001E1F7E9E24>I< +001FF80000FFFF0001F81F8007E007E00FC003F01F8001F81F8001F83F0000FC7F0000FE +7F0000FE7E00007EFE00007FFE00007FFE00007FFE00007FFE00007FFE00007FFE00007F +FE00007FFE00007F7E00007E7E00007E7F0000FE3F0000FC3F87C1FC1F8FE1F80FD833F0 +07F81FE001F81F8000FFFF00001FFE0300000E0300000F0700000FFF000007FF000007FE +000007FE000003FC000001F8000000F020287D9E27>I<FFFFF80000FFFFFF8000FFFFFF +C00007F00FF00007F003F80007F001F80007F001FC0007F001FC0007F001FC0007F001FC +0007F001FC0007F001F80007F003F00007F00FE00007FFFF800007FFFF000007F03F8000 +07F00FC00007F00FE00007F007F00007F007F00007F007F00007F007F00007F007F00007 +F007F00007F007F02007F007F07007F003F070FFFF81F8E0FFFF80FFC0FFFF803F80241F +7E9E27>I<03FC180FFF381FFFF83E03F87C00F8780078F80078F80038F80038FC0000FF +0000FFF8007FFF007FFFC03FFFE01FFFF00FFFF803FFF8001FFC0001FC0000FC00007CE0 +007CE0007CE0007CF00078F800F8FE01F0FFFFE0EFFFC0C1FF00161F7D9E1D>I<7FFFFF +FC7FFFFFFC7FFFFFFC7E0FE0FC780FE03C700FE01CF00FE01EF00FE01EE00FE00EE00FE0 +0EE00FE00EE00FE00E000FE000000FE000000FE000000FE000000FE000000FE000000FE0 +00000FE000000FE000000FE000000FE000000FE000000FE000000FE000000FE00007FFFF +C007FFFFC007FFFFC01F1E7E9D24>I<FFFF007FF8FFFF007FF8FFFF007FF807F0000700 +07F8000F0003F8000E0003FC000E0001FC001C0001FC001C0001FE003C0000FE00380000 +FF007800007F007000007F807000003F80E000003F80E000001FC1C000001FC1C000001F +E3C000000FE38000000FF780000007F700000007FF00000003FE00000003FE00000003FE +00000001FC00000001FC00000000F800000000F800000000700000251F7F9E28>86 +D<0600600E00E01C01C0380380300300600600600600E00E00C00C00DE0DE0FF0FF0FF8F +F8FF8FF8FF8FF87F87F83F03F01E01E015117D9F1B>92 D<07FC001FFF803F0FC03F07E0 +3F03F03F03F00C03F00003F001FFF00FFFF01F83F07E03F07C03F0F803F0F803F0F803F0 +FC07F07E0DFE3FF8FE07E07E17147F9319>97 D<FF800000FF800000FF8000001F800000 +1F8000001F8000001F8000001F8000001F8000001F8000001F8000001F8000001F8FE000 +1FFFF8001FF07C001FC03E001F803F001F801F001F801F001F801F801F801F801F801F80 +1F801F801F801F801F801F801F801F001F801F001F803E001FC03E001FE0FC001E7FF000 +1C1FC00019207F9F1D>I<01FE0007FF801F0FC03E0FC03E0FC07C0FC07C0300FC0000FC +0000FC0000FC0000FC0000FC00007C00007E00003E00E03F01C01F83C007FF8001FC0013 +147E9317>I<0007FC000007FC000007FC000000FC000000FC000000FC000000FC000000 +FC000000FC000000FC000000FC000000FC0001FCFC000FFFFC001F83FC003E00FC007E00 +FC007C00FC007C00FC00FC00FC00FC00FC00FC00FC00FC00FC00FC00FC00FC00FC007C00 +FC007C00FC007E00FC003E01FC001F07FF800FFFFF8003F8FF8019207E9F1D>I<01FE00 +07FF800F83C01E01E03E00F07C00F07C00F8FC00F8FFFFF8FFFFF8FC0000FC0000FC0000 +7C00007C00003E00381E00380F80F007FFE000FF8015147F9318>I<003F8000FFC003F3 +E007E7E007C7E00FC7E00FC3C00FC0000FC0000FC0000FC0000FC000FFFC00FFFC00FFFC +000FC0000FC0000FC0000FC0000FC0000FC0000FC0000FC0000FC0000FC0000FC0000FC0 +000FC0000FC0007FFC007FFC007FFC0013207F9F10>I<03FC7C0FFFFE1E07DE3C03DE7C +03EC7C03E07C03E07C03E07C03E03C03C01E07801FFF0033FC003000007000007800007F +FF803FFFF03FFFF81FFFFC3FFFFC7C00FEF8003EF8003EF8003EF8003E7C007C3F01F80F +FFE003FF80171E7F931A>I<FF800000FF800000FF8000001F8000001F8000001F800000 +1F8000001F8000001F8000001F8000001F8000001F8000001F87F0001F9FF8001FB8FC00 +1FE07E001FC07E001FC07E001F807E001F807E001F807E001F807E001F807E001F807E00 +1F807E001F807E001F807E001F807E001F807E00FFF3FFC0FFF3FFC0FFF3FFC01A207E9F +1D>I<1E003F007F807F807F807F803F001E0000000000000000000000FF80FF80FF801F +801F801F801F801F801F801F801F801F801F801F801F801F801F80FFF0FFF0FFF00C217E +A00F>I<FF800000FF800000FF8000001F8000001F8000001F8000001F8000001F800000 +1F8000001F8000001F8000001F8000001F83FF001F83FF001F83FF001F81E0001F83C000 +1F8780001F9E00001FBC00001FFE00001FFF00001FDF00001F9F80001F0FC0001F07E000 +1F03E0001F03F0001F01F800FFE3FF80FFE3FF80FFE3FF8019207F9F1C>107 +D<FF80FF80FF801F801F801F801F801F801F801F801F801F801F801F801F801F801F801F +801F801F801F801F801F801F801F801F801F801F801F80FFF0FFF0FFF00C207E9F0F>I< +FF07F00FE000FF1FFC3FF800FF387E70FC001F603FC07E001FC03F807E001FC03F807E00 +1F803F007E001F803F007E001F803F007E001F803F007E001F803F007E001F803F007E00 +1F803F007E001F803F007E001F803F007E001F803F007E001F803F007E00FFF1FFE3FFC0 +FFF1FFE3FFC0FFF1FFE3FFC02A147E932D>I<FF07F000FF1FF800FF38FC001F607E001F +C07E001FC07E001F807E001F807E001F807E001F807E001F807E001F807E001F807E001F +807E001F807E001F807E001F807E00FFF3FFC0FFF3FFC0FFF3FFC01A147E931D>I<01FF +0007FFC01F83F03E00F83E00F87C007C7C007CFC007EFC007EFC007EFC007EFC007EFC00 +7E7C007C7C007C3E00F83E00F81F83F007FFC001FF0017147F931A>I<FF8FE000FFFFF8 +00FFF0FC001FC07E001F803F001F803F001F801F001F801F801F801F801F801F801F801F +801F801F801F801F801F801F001F803F001F803E001FC07E001FE0FC001FFFF0001F9FC0 +001F8000001F8000001F8000001F8000001F8000001F800000FFF00000FFF00000FFF000 +00191D7F931D>I<01F81C0007FE3C001F87FC003F01FC003E00FC007E00FC007C00FC00 +FC00FC00FC00FC00FC00FC00FC00FC00FC00FC00FC00FC007C00FC007E00FC007E00FC00 +3F01FC001F87FC000FFEFC0003F8FC000000FC000000FC000000FC000000FC000000FC00 +0000FC000007FF800007FF800007FF80191D7E931C>I<FF1F00FF3FC0FF67E01FC7E01F +C7E01FC7E01F81801F80001F80001F80001F80001F80001F80001F80001F80001F80001F +8000FFF800FFF800FFF80013147F9316>I<0FE63FFE783E700EF00EF00EFE00FFE07FF8 +3FFC1FFE0FFF007FE01FE00FF00FF00EFC1EFFFCC7F010147E9315>I<03800380038003 +800780078007800F801F803FFCFFFCFFFC1F801F801F801F801F801F801F801F801F801F +8E1F8E1F8E1F8E1F8E0F9C07F803F00F1D7F9C14>I<FF83FE00FF83FE00FF83FE001F80 +7E001F807E001F807E001F807E001F807E001F807E001F807E001F807E001F807E001F80 +7E001F807E001F807E001F80FE001F80FE000F83FFC007FF7FC001FC7FC01A147E931D> +I<FFF0FF80FFF0FF80FFF0FF800FC038000FC038000FE0780007E0700007F0F00003F0E0 +0003F9E00001F9C00001F9C00000FF800000FF800000FF8000007F0000007F0000003E00 +00003E0000001C000019147F931C>I<FFE7FF3FE0FFE7FF3FE0FFE7FF3FE01F80FC0700 +0FC1FC0E000FC1FC0E000FC3FE1E0007E3BE1C0007E3BE1C0007F7BF3C0003F71F380003 +F71FB80001FE0FF00001FE0FF00001FE0FF00000FC07E00000FC07E00000FC07E0000078 +03C000007803C00023147F9326>I<FFF3FF00FFF3FF00FFF3FF000FE0E00007E1E00003 +F3C00001FF800000FF000000FE0000007E0000003F0000007F800000FFC00001EFE00003 +C7E0000383F0000781F800FFC3FF80FFC3FF80FFC3FF8019147F931C>I<FFF0FF80FFF0 +FF80FFF0FF800FC038000FC038000FE0780007E0700007F0F00003F0E00003F9E00001F9 +C00001F9C00000FF800000FF800000FF8000007F0000007F0000003E0000003E0000001C +0000001C00000038000078380000FC780000FC700000E0E00000F1E000007F8000001E00 +0000191D7F931C>I E /Fm 86 127 df<70F8F8F8F8F8F8F8F8F8F8F8F8F8F8F8F87000 +0000000070F8F8F870051C779B18>33 D<2008701CF83EF83EF83EF83EF83EF83E701C70 +1C701C701C701C30180F0E7C9C18>I<030600078F00078F00078F00078F00078F00078F +007FFFC0FFFFE0FFFFE07FFFC00F1E000F1E000F1E000F1E000F1E000F1E007FFFC0FFFF +E0FFFFE07FFFC01E3C001E3C001E3C001E3C001E3C001E3C000C1800131C7E9B18>I<00 +C00001C00001C00001C00003F0000FFC003FFE007DDF0071CF00E1C780E1CF80E1CF80E1 +CF80F1C70079C0007FC0003FF0001FFC0007FE0001FF0001CF0021C78071C380F9C380F9 +C380F1C380F1C70079C7007DDE003FFC001FF80007E00001C00001C00001C00000C00011 +247D9F18>I<3803007C07807C0780EE0F80EE0F00EE0F00EE1F00EE1E00EE1E00EE3E00 +7C3C007C3C00387C0000780000780000F80000F00001F00001E00001E00003E00003C000 +03C00007C0000783800787C00F87C00F0EE00F0EE01F0EE01E0EE01E0EE03E0EE03C07C0 +3C07C018038013247E9F18>I<01C00007E0000FF0000E70001C38001C38001C38001C38 +001C73F81CF3F81CE3F80FC1C00FC3800F83800F03801F07003F87007B8E0071CE00F1FC +00F0FC00F07C00F07870F0787078FE707FFFE03FC7E00F03C0151C7F9B18>I<387C7C7E +3E0E0E0E1C1C38F8F0C0070E789B18>I<007000F001E003C007800F001E001E003C003C +007800780078007000F000F000F000F000F000F000F000F00070007800780078003C003C +001E001E000F00078003C001F000F000700C24799F18>I<6000F00078003C001E000F00 +0780078003C003C001E001E001E000E000F000F000F000F000F000F000F000F000E001E0 +01E001E003C003C0078007800F001E003C007800F00060000C247C9F18>I<01C00001C0 +0001C00001C00061C300F9CF80FDDF807FFF003FFE000FF8000FF8003FFE007FFF00FDDF +80F9CF8061C30001C00001C00001C00001C00011147D9718>I<00600000F00000F00000 +F00000F00000F00000F00000F0007FFFC0FFFFE0FFFFE07FFFC000F00000F00000F00000 +F00000F00000F00000F00000600013147E9718>I<1C3E7E7F3F1F070E1E7CF860080C78 +8518>I<7FFFC0FFFFE0FFFFE07FFFC013047E8F18>I<3078FCFC78300606778518>I<00 +0300000780000780000F80000F00001F00001E00001E00003E00003C00007C0000780000 +780000F80000F00001F00001E00003E00003C00003C00007C0000780000F80000F00000F +00001F00001E00003E00003C00003C00007C0000780000F80000F00000F0000060000011 +247D9F18>I<01F00007FC000FFE001F1F001E0F003C07807803C07803C07803C0F001E0 +F001E0F001E0F001E0F001E0F001E0F001E0F001E0F001E0F803E07803C07803C07C07C0 +3C07801E0F001F1F000FFE0007FC0001F000131C7E9B18>I<01C001C003C007C007C01F +C0FFC0FBC063C003C003C003C003C003C003C003C003C003C003C003C003C003C003C003 +C003C07FFEFFFF7FFE101C7C9B18>I<03F0001FFE003FFF007C0F807807C0F003C0F801 +E0F801E07001E00001E00001E00003C00003C0000780000780000F00001E00003C0000F8 +0001F00003E00007C0000F80001E01E03C01E07FFFE0FFFFE07FFFE0131C7E9B18>I<03 +F8001FFE003FFF003C0F807C07C07C03C07C03C01003C0000380000780000F0003FE0003 +FE0003FF00000F800007C00003C00001E00001E00001E07001E0F801E0F803C0F007C07C +0F807FFF001FFE0007F000131C7E9B18>I<001F00003F00007F0000770000F70001E700 +01C70003C7000787000707000E07001E07003C0700380700780700F00700FFFFF8FFFFF8 +FFFFF8000700000700000700000700000700000700007FF0007FF0007FF0151C7F9B18> +I<3FFF807FFF807FFF807800007800007800007800007800007800007800007800007BF8 +007FFE007FFF007C0F803003C00003C00001E00001E07001E0F801E0F801E0F803C07807 +C07C0F803FFF001FFC0003F000131C7E9B18>I<F00000FFFFE0FFFFE0FFFFE0F007C0F0 +0F80000F00001E00003C00003C0000780000780000F00000F00001E00001E00001E00003 +C00003C00003C00003C00007800007800007800007800007800007800007800003000013 +1D7E9C18>55 D<3078FCFC783000000000000000003078FCFC78300614779318>58 +D<183C7E7E3C180000000000000000183C7E7E3E1E0E1C3C78F060071A789318>I<0000 +C00003E00007E0001FC0003F8000FE0001FC0007F0000FE0003F80007F0000FC0000FC00 +007F00003F80000FE00007F00001FC0000FE00003F80001FC00007E00003E00000C01318 +7E9918>I<7FFFC0FFFFE0FFFFE07FFFC00000000000000000000000007FFFC0FFFFE0FF +FFE07FFFC0130C7E9318>I<600000F80000FC00007F00003F80000FE00007F00001FC00 +00FE00003F80001FC00007E00007E0001FC0003F8000FE0001FC0007F0000FE0003F8000 +7F0000FC0000F8000060000013187E9918>I<0FF0003FFC007FFF00781F00F80780F807 +80F80780201F00007E0000FC0001F00001E00003C00003C00003C00003C00003C0000380 +0000000000000000000000000000000003800007C00007C00007C000038000111C7D9B18 +>I<007C0001FE0007FF000F87801E03C03C1DC0387FC070FFE071E3E071C1E0E1C1E0E3 +80E0E380E0E380E0E380E0E380E0E380E0E1C1C071C1C071E3C070FF80387F003C1C001E +01E00F83E007FFC001FF80007E00131C7E9B18>I<00F80000F80000F80001FC0001DC00 +01DC0001DC0003DE0003DE0003DE0003DE00038E00078F00078F00078F00078F00078F00 +0F07800FFF800FFF800FFF800F07801E03C01E03C01E03C07F8FF0FF8FF87F8FF0151C7F +9B18>I<7FFE00FFFF007FFF801E07C01E03C01E01E01E01E01E01E01E01E01E01E01E03 +C01E07C01FFF801FFF001FFFC01E03E01E01E01E00F01E00F01E00F01E00F01E00F01E00 +F01E01E01E03E07FFFC0FFFF807FFE00141C7F9B18>I<00F8E003FFE007FFE00F07E01E +03E03C03E03C01E07801E07801E0700000F00000F00000F00000F00000F00000F00000F0 +0000F000007000007801E07801E03C01E03C01E01E03C00F07C007FF8003FE0000F80013 +1C7E9B18>I<7FFC00FFFF007FFF801E07C01E03E01E01E01E01F01E00F01E00F01E00F8 +1E00781E00781E00781E00781E00781E00781E00781E00781E00781E00F01E00F01E01F0 +1E01E01E03E01E07C07FFF80FFFF007FFC00151C809B18>I<FFFFF0FFFFF0FFFFF01E00 +F01E00F01E00F01E00F01E00001E00001E0F001E0F001E0F001FFF001FFF001FFF001E0F +001E0F001E0F001E00001E00001E00781E00781E00781E00781E0078FFFFF8FFFFF8FFFF +F8151C7F9B18>I<FFFFF8FFFFF8FFFFF81E00781E00781E00781E00781E00001E00001E +0F001E0F001E0F001FFF001FFF001FFF001E0F001E0F001E0F001E00001E00001E00001E +00001E00001E00001E0000FFE000FFE000FFE000151C7F9B18>I<01F1C007FFC00FFFC0 +1F0FC01E07C03C03C03803C07803C07803C0700000F00000F00000F00000F00000F00000 +F01FF0F03FF0F01FF07003C07803C07803C03807C03C07C01E0FC01F0FC00FFFC007FFC0 +01F3C0141C7E9B18>I<7F8FF0FFDFF87F8FF01E03C01E03C01E03C01E03C01E03C01E03 +C01E03C01E03C01E03C01FFFC01FFFC01FFFC01E03C01E03C01E03C01E03C01E03C01E03 +C01E03C01E03C01E03C01E03C07F8FF0FFDFF87F8FF0151C7F9B18>I<7FFF80FFFFC07F +FF8001E00001E00001E00001E00001E00001E00001E00001E00001E00001E00001E00001 +E00001E00001E00001E00001E00001E00001E00001E00001E00001E00001E0007FFF80FF +FFC07FFF80121C7D9B18>I<01FFE001FFE001FFE0000F00000F00000F00000F00000F00 +000F00000F00000F00000F00000F00000F00000F00000F00000F00000F00000F00000F00 +000F00700F00F80F00F80F00F83E007FFC003FF8000FE000131C7E9B18>I<FFE000FFE0 +00FFE0001E00001E00001E00001E00001E00001E00001E00001E00001E00001E00001E00 +001E00001E00001E00001E00001E00001E00001E00F01E00F01E00F01E00F01E00F0FFFF +F0FFFFF0FFFFF0141C7F9B18>76 D<FC01F8FE03F8FE03F83F07E03B06E03B06E03B06E0 +3B8EE03B8EE0398CE0398CE039DCE039DCE039DCE038D8E038F8E038F8E03870E03870E0 +3800E03800E03800E03800E03800E03800E0FE03F8FE03F8FE03F8151C7F9B18>I<7E07 +F0FF0FF87F07F01F81C01D81C01D81C01DC1C01CC1C01CC1C01CE1C01CE1C01CE1C01C61 +C01C71C01C71C01C31C01C39C01C39C01C39C01C19C01C19C01C1DC01C0DC01C0DC01C0F +C07F07C0FF87C07F03C0151C7F9B18>I<0FFE003FFF807FFFC07C07C07803C0F803E0F0 +01E0F001E0F001E0F001E0F001E0F001E0F001E0F001E0F001E0F001E0F001E0F001E0F0 +01E0F001E0F001E0F001E0F803E07803C07C07C07FFFC03FFF800FFE00131C7E9B18>I< +FFFE00FFFF80FFFFC01E07C01E03E01E01E01E00F01E00F01E00F01E00F01E00F01E01E0 +1E03E01E07C01FFFC01FFF801FFE001E00001E00001E00001E00001E00001E00001E0000 +1E0000FFC000FFC000FFC000141C7F9B18>I<7FF800FFFE007FFF001E1F801E07801E07 +C01E03C01E03C01E03C01E07C01E07801E1F801FFF001FFE001FFE001E0F001E0F001E07 +801E07801E07801E07801E07801E07BC1E07BC1E07BC7F83F8FFC1F87F80F0161C7F9B18 +>82 D<7FFFF8FFFFF8FFFFF8F07878F07878F07878F07878007800007800007800007800 +007800007800007800007800007800007800007800007800007800007800007800007800 +00780000780007FF8007FF8007FF80151C7F9B18>84 D<FFC7FEFFC7FEFFC7FE1E00F01E +00F01E00F01E00F01E00F01E00F01E00F01E00F01E00F01E00F01E00F01E00F01E00F01E +00F01E00F01E00F01E00F01E00F01E00F00F01E00F01E007C7C003FF8001FF00007C0017 +1C809B18>I<FF07F8FF8FF8FF07F83C01E01E03C01E03C01E03C01E03C00F07800F0780 +0F07800F07800F0780078F00078F00078F00078F00038E00038E0003DE0003DE0001DC00 +01DC0001DC0001FC0001FC0000F80000F800151C7F9B18>I<FE03F8FE03F8FE03F87000 +707000707000703800E03800E03800E03800E03800E038F8E039FCE039DCE039DCE019DC +C019DCC019DCC0198CC0198CC01D8DC01D8DC01D8DC01D05C00F07800F07800F07800E03 +80151C7F9B18>I<7F8FE07F9FE07F8FE00F0F800F8F00079F0007DE0003FE0003FC0001 +FC0001F80000F80000F00000F00000F80001F80001FC0003FC0003DE00079E00078F0007 +8F000F07800F07801E07C07F8FF0FF8FF87F8FF0151C7F9B18>I<FFFCFFFCFFFCF000F0 +00F000F000F000F000F000F000F000F000F000F000F000F000F000F000F000F000F000F0 +00F000F000F000F000F000F000F000F000F000F000FFFCFFFCFFFC0E24789F18>91 +D<600000F00000F00000F800007800007C00003C00003C00003E00001E00001F00000F00 +000F00000F800007800007C00003C00003C00003E00001E00001F00000F00000F8000078 +00007800007C00003C00003E00001E00001E00001F00000F00000F800007800007800003 +0011247D9F18>I<FFFCFFFCFFFC003C003C003C003C003C003C003C003C003C003C003C +003C003C003C003C003C003C003C003C003C003C003C003C003C003C003C003C003C003C +003CFFFCFFFCFFFC0E247F9F18>I<03800FE03FF8FFFEFC7EF01E40040F077C9B18>I<7F +FFC0FFFFE0FFFFE07FFFC013047E7F18>I<061E3E387070E0E0E0F8FC7C7C38070E789E +18>I<0FF0003FFC007FFE007C1F007C0F0038078000078000FF8007FF801FFF807F8780 +7C0780F00780F00780F00780F807807C1F803FFFF81FFBF807E1F815147E9318>I<7F00 +00FF00007F00000F00000F00000F00000F00000F00000F3E000FFF800FFFE00FC1F00F80 +F00F00780F00780F003C0F003C0F003C0F003C0F003C0F003C0F00780F80780F80F00FC1 +F00FFFE00FFF80073E00161C809B18>I<01FC0007FF001FFF803E0F803C0F8078070078 +0000F00000F00000F00000F00000F00000F000007800007803C03C03C03E07C01FFF8007 +FF0001FC0012147D9318>I<001FC0003FC0001FC00003C00003C00003C00003C00003C0 +01F3C007FFC01FFFC03E0FC03C07C07803C07803C0F003C0F003C0F003C0F003C0F003C0 +F003C07803C07807C03C07C03E1FC01FFFF807FBFC01F3F8161C7F9B18>I<01F80007FE +000FFF001F0F803C03C07803C07801C0F001E0F001E0FFFFE0FFFFE0FFFFE0F000007800 +007801E03C01E01F03E00FFFC007FF8000FE0013147E9318>I<001F80007FC000FFE000 +F3E001E3E001E08001E00001E0007FFFC0FFFFC0FFFFC001E00001E00001E00001E00001 +E00001E00001E00001E00001E00001E00001E00001E00001E00001E0007FFF807FFF807F +FF80131C7F9B18>I<03F1E00FFFF01FFFF83E1F783C0F30780780780780780780780780 +7807803C0F003E1F003FFE003FFC003BF0003800003800001FFE001FFFC03FFFE07801F0 +700070E00038E00038E00038E000387800F07E03F01FFFC00FFF8001FC00151F7F9318> +I<7F0000FF00007F00000F00000F00000F00000F00000F00000F1F000F7F800FFFC00FE1 +C00FC1E00F81E00F01E00F01E00F01E00F01E00F01E00F01E00F01E00F01E00F01E00F01 +E00F01E07FE3FCFFF3FE7FE3FC171C809B18>I<01C00003E00003E00003E00001C00000 +00000000000000000000007FE000FFE0007FE00001E00001E00001E00001E00001E00001 +E00001E00001E00001E00001E00001E00001E00001E00001E000FFFF80FFFF80FFFF8011 +1D7D9C18>I<001C003E003E003E001C00000000000000000FFE0FFE0FFE001E001E001E +001E001E001E001E001E001E001E001E001E001E001E001E001E001E001E001E001E001E +701CF83CF878FFF87FF01FC00F277E9C18>I<7E0000FE00007E00000E00000E00000E00 +000E00000E00000E3FF00E3FF00E3FF00E07800E0F000E1E000E3C000E78000EF0000FF8 +000FFC000F9C000F0E000E0F000E07000E03800E03C07FC7F8FFC7F87FC7F8151C7F9B18 +>I<FFE000FFE000FFE00001E00001E00001E00001E00001E00001E00001E00001E00001 +E00001E00001E00001E00001E00001E00001E00001E00001E00001E00001E00001E00001 +E00001E000FFFFC0FFFFC0FFFFC0121C7D9B18>I<F9C1C0FFF7F0FFFFF03E3E383C3C38 +3C3C38383838383838383838383838383838383838383838383838383838383838383838 +FE3E3EFE7E7EFE3E3E1714809318>I<7F1F00FF7F807FFFC00FE1C00FC1E00F81E00F01 +E00F01E00F01E00F01E00F01E00F01E00F01E00F01E00F01E00F01E00F01E07FE3FCFFF3 +FE7FE3FC1714809318>I<01F0000FFE001FFF003E0F803C07807803C07803C0F001E0F0 +01E0F001E0F001E0F001E0F001E07803C07803C03C07803F1F801FFF000FFE0001F00013 +147E9318>I<7F3E00FFFF807FFFE00FC1F00F80F00F00780F00780F003C0F003C0F003C +0F003C0F003C0F003C0F00780F80780F80F00FC1F00FFFE00FFF800F3E000F00000F0000 +0F00000F00000F00000F00000F00007FE000FFF0007FE000161E809318>I<01F9E007FD +E00FFFE01F0FE03C07E07803E07801E0F001E0F001E0F001E0F001E0F001E0F001E07801 +E07803E03C07E03E0FE01FFFE007FDE001F1E00001E00001E00001E00001E00001E00001 +E00001E0000FFC001FFE000FFC171E7F9318>I<FF87E0FF9FF0FFBFF807F87807F03007 +E00007C00007C000078000078000078000078000078000078000078000078000078000FF +FE00FFFF00FFFE0015147F9318>I<07FF003FFF007FFF00700F00E00F00E00F00F00000 +7E00007FF0001FFC0007FF00003F00700780F00380F00380F80380FC0F00FFFF00FFFC00 +E7F00011147D9318>I<0380000780000780000780000780007FFFC0FFFFC0FFFFC00780 +000780000780000780000780000780000780000780000780000780C00781E00781E00781 +E003C3C003FFC001FF00007E0013197F9818>I<7F0FE0FF1FE07F0FE00F01E00F01E00F +01E00F01E00F01E00F01E00F01E00F01E00F01E00F01E00F01E00F01E00F03E00F07E007 +FFFC03FFFE01F9FC1714809318>I<7F8FF0FF8FF87F8FF01C01C00E03800E03800E0380 +070700070700070700078F00038E00038E0003DE0001DC0001DC0001DC0000F80000F800 +00700015147F9318>I<FF07F8FF8FF8FF07F83800E03800E03800E03800E01C01C01C71 +C01CF9C01CF9C01CF9C01DDDC00DDD800DDD800DDD800F8F800F8F800F8F800707001514 +7F9318>I<7F8FF07F9FF07F8FF00F0700078E00039E0001DC0001F80000F80000700000 +F00000F80001DC00039E00038E000707000E07807F8FF0FF8FF87F8FF015147F9318>I< +7F8FF0FF8FF87F8FF00E01C00E03800E0380070380070700070700038700038700038E00 +01CE0001CE0001CC0000DC0000FC0000780000780000780000700000700000700000F000 +7CE0007DE00073C0007F80003F00001E0000151E7F9318>I<3FFFF07FFFF07FFFF07803 +E07807C0780F80001F00003E00007C0000F80001F00003E00007C0000F80F01F00F03E00 +F07C00F0FFFFF0FFFFF0FFFFF014147F9318>I<0007E0001FE0007FE0007C0000F00000 +F00000F00000F00000F00000F00000F00000F00000F00000F00000F00001F0007FE000FF +C000FFC0007FE00001F00000F00000F00000F00000F00000F00000F00000F00000F00000 +F00000F00000F000007C00007FE0001FE00007E013247E9F18>I<60F0F0F0F0F0F0F0F0 +F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0600424769F18>I<7E00 +00FF8000FFE00003E00000F00000F00000F00000F00000F00000F00000F00000F00000F0 +0000F00000F00000F800007FC0003FE0003FE0007FC000F80000F00000F00000F00000F0 +0000F00000F00000F00000F00000F00000F00000F00003E000FFE000FF80007E00001324 +7E9F18>I<0E0C1F1E3FBEFBF8F1F060E00F067C9B18>I E /Fn 39 +122 df<00001FE000007FF00001C0380001807800038078000700300007000000070000 +00070000000E0000000E0000000E000000FFFFE000FFFFE0001C01C0001C01C0001C01C0 +001C01C0001C038000380380003803800038038000380700003807000078070000700718 +00700E3000700E3000700E3000600E6000E007E000E003C000E0000000E0000001C00000 +01C00000318000007B800000F30000007E0000003C0000001D29829F1A>12 +D<00003FC0FF800000FFE3FFC00001C1E700E0000381EE01E0000380DC01E00007001C00 +C0000700180000000700380000000700380000000E00380000000E00380000000E007000 +0000FFFFFFFF8000FFFFFFFF80000E00700700001C00700700001C00700700001C00E007 +00001C00E00E00001C00E00E00003800E00E00003800E00E00003801C01C00003801C01C +00003801C01C00007001C01C60007001C038C00070038038C00070038038C00070038039 +8000E003801F8000E003000F0000E00700000000E00700000001C00700000001C00E0000 +0031860E000000798F1C000000F31E380000007E0FF00000003C07C00000002B29829F28 +>14 D<00E001F001F003E003E003E003C003C003C00780078007800700070007000E000E +000E000C000C001C0018001800000000000000000000007000F800F800F000E0000C217B +A00E>33 D<1C1C3E3E7E7E7E7E3E3E06060C0C0C0C1818181830306060C0C080800F0E78 +9F17>I<70F8F8F0E005057B840E>46 D<000200060006000E003C00FC03DC031C003800 +3800380038007000700070007000E000E000E000E001C001C001C001C003800380038003 +80FFF8FFF80F1E7B9D17>49 D<0007C0001FE000386000E0E001C1E001C1E00380C00700 +000F00000E00001E10001E7C001DFE003F07003E07003C07807C07807807807807807807 +80700F00700F00F00F00F00E00F01E00701C0070380070380038F0001FC0000F8000131F +7B9D17>54 D<001F00007F8000E1C001C0E00380E00700E00700E00700E00F01C00F01C0 +0F838007C70007EE0003F80001F80003FC000E7E001C3F00381F00700F00700700E00700 +E00700E00700E00E00E00E00E01C00E0380070F0003FE0001F8000131F7B9D17>56 +D<070F1F1F0E0000000000000000000070F8F8F0E008147B930E>58 +D<0000FE020007FF06001F818C003E00DC0078007C00F0007C01E0003803C00038078000 +380F8000381F0000301F0000303E0000303E0000007C0000007C0000007C0000007C0000 +00F8000000F8000000F8000000F80000C0F80001807800018078000300780003003C0006 +003C000C001E0018000F00300007C0E00003FF800000FE00001F217A9F21>67 +D<01FFFFFC01FFFFF8001E0078001E0038001E0038003C0018003C0018003C0018003C00 +3000780C3000780C3000780C0000781C0000F0380000FFF80000FFF80000F0380001E030 +0001E0300001E0300001E0300003C0000003C0000003C0000003C0000007800000078000 +000780000007800000FFFC0000FFF800001E1F7D9E1E>70 D<00FF007FE001FF00FFC000 +1F001E00001F800C00001F800C0000378018000033C018000033C018000033C018000063 +C030000061E030000061E030000061E0300000C0F0600000C0F0600000C0F0600000C078 +6000018078C000018078C00001803CC00001803CC00003003D800003001F800003001F80 +0003001F800006000F000006000F000006000F00000E000F0000FFC0060000FFC0060000 +231F7D9E22>78 D<01FFFF8001FFFFE0001E01F0001E0078001E0078003C007C003C007C +003C007C003C007C007800F8007800F8007800F0007801E000F003C000F00F8000FFFF00 +00FFF80001E0000001E0000001E0000001E0000003C0000003C0000003C0000003C00000 +07800000078000000780000007800000FFF80000FFF000001E1F7D9E1F>80 +D<0007E040001FF8C0003C1D8000700F8000E0078001C007800180030003800300038003 +0003800300038000000380000003C0000003F8000001FF800001FFE000007FF000001FF0 +000001F80000007800000038000000380000003800300038003000380030003000700070 +00700060007800E0007801C000EE078000C7FE000081F800001A217D9F1A>83 +D<06060E0E1C1C1818303060606060C0C0C0C0F0F0F8F8F8F8F8F870700F0E749F17>92 +D<00F18003FDC0078F800E07801C07803C07803C0700780700780700780700F00E00F00E +00F00E00F00E30F01C60F03C60707C6078FCC03FCFC00F070014147C9317>97 +D<07803F803F000700070007000E000E000E000E001C001C001CF01FFC3F1E3E0E3C0F38 +0F700F700F700F700FE01EE01EE01EE03CE03CE038607071E03FC01F0010207B9F15>I< +007E0001FF000383800F07801E07801C07003C0200780000780000780000F00000F00000 +F00000F00000F00000700200700700381E001FF80007E00011147C9315>I<0000780003 +F80003F00000700000700000700000E00000E00000E00000E00001C00001C000F1C003FD +C0078F800E07801C07803C07803C0700780700780700780700F00E00F00E00F00E00F00E +30F01C60F03C60707C6078FCC03FCFC00F070015207C9F17>I<007C0001FF000783000F +01801E01803C01803C0300780E007FFC007FE000F00000F00000F00000F0000070000070 +02007807003C1E001FF80007E00011147C9315>I<0000F80001FC0003BC00033C000718 +000700000700000E00000E00000E00000E00000E0000FFE001FFE0001C00001C00001C00 +00380000380000380000380000380000700000700000700000700000700000E00000E000 +00E00000E00000E00001C00001C00001C0000180003380007B8000F300007E00003C0000 +1629829F0E>I<003C6000FF7001E3E00381E00701E00F01E00F01C01E01C01E01C01E01 +C03C03803C03803C03803C03803C07003C0F001C1F001E3F000FFE0003CE00000E00000E +00001C00001C00301C00783800F0F0007FE0003F8000141D7E9315>I<01E0000FE0000F +C00001C00001C00001C000038000038000038000038000070000070000073E00077F000E +C3800F81C00F01C00E01C01E03801C03801C03801C0380380700380700380700380E1870 +0E30700E30701C60700C60E00FC060078015207D9F17>I<006000F000F000E000000000 +000000000000000000000F001F80318031C063806380C3800700070007000E000E000E00 +1C301C601C6038C018C01F800F000C1F7D9E0E>I<0001800003C00003C0000380000000 +000000000000000000000000000000000000003C00007E0000C700018700030700030700 +060E00000E00000E00000E00001C00001C00001C00001C00003800003800003800003800 +00700000700000700000700000E00000E00030E00079C000F380007F00003C0000122882 +9E0E>I<01E0000FE0000FC00001C00001C00001C0000380000380000380000380000700 +000700000703C00707E00E0C600E18E00E31E00E61E01CC1C01F80001F00001FC00039E0 +003870003870003838607070C07070C07070C0703980E03F00601E0013207D9F15>I<03 +C01FC01F8003800380038007000700070007000E000E000E000E001C001C001C001C0038 +003800380038007000700070007180E300E300E300E6007E003C000A207C9F0C>I<1E07 +C0F8003F1FE1FC0033B8730E0063E076070063C03C07006380380700C780780E00070070 +0E000700700E000700700E000E00E01C000E00E01C000E00E01C000E00E038601C01C038 +C01C01C038C01C01C071801C01C031803803803F001801801E0023147D9325>I<1E07C0 +3F1FE033B87063E07063C038638038C780700700700700700700700E00E00E00E00E00E0 +0E01C31C01C61C01C61C038C1C018C3801F81800F018147D931A>I<007C0001FF000383 +800F01C01E01C01C01E03C01E07801E07801E07801E0F003C0F003C0F003C0F00780F007 +00700F00701E003838001FF00007C00013147C9317>I<01C1E007E7F8067E3C0C7C1C0C +781E0C701E18E01E00E01E00E01E00E01E01C03C01C03C01C03C01C07803C07803C07003 +C0E003E3C0077F80071E000700000700000E00000E00000E00000E00001C0000FFC000FF +8000171D809317>I<0E0F003F3F8033F1C063C1C063C3C06383C0C78380070000070000 +0700000E00000E00000E00000E00001C00001C00001C00001C000038000018000012147D +9313>114 D<00FC03FE07070E0F0E0F0E0E1E000F800FF007F803FC003E001E701EF01C +F01CE03860703FE01F8010147D9313>I<018001C0038003800380038007000700FFF0FF +F00E000E000E000E001C001C001C001C0038003800380038307060706070C071803F001E +000C1C7C9B0F>I<0F00601F80703180E031C0E06380E06380E0C381C00701C00701C007 +01C00E03800E03800E03800E038C0E07180E07180E0F180E1F3007F3F003E1C016147D93 +18>I<0F01C01F83C03183E031C1E06380E06380E0C380C00700C00700C00700C00E0180 +0E01800E01800E03000E03000E06000E06000F0C0007F80001E00013147D9315>I<0F00 +60E01F8071E03180E1F031C0E0F06380E0706380E070C381C0600701C0600701C0600701 +C0600E0380C00E0380C00E0380C00E0381800E0381800E0781800E078300070F860007F9 +FC0001F0F8001C147D931E>I<0787800FCFC018F8E03070E06071E06071E0C0E1C000E0 +0000E00000E00001C00001C00001C00071C060F380C0F380C0E38180C7C3007CFE00387C +0013147D9315>I<0F00601F80703180E031C0E06380E06380E0C381C00701C00701C007 +01C00E03800E03800E03800E03800E07000E07000E0F000E1F0007FE0003EE00000E0000 +0E00001C00781C0078380070700060E0003FC0001F0000141D7D9316>I +E /Fo 77 123 df<001FC1F0007FF7F801F07E7C03C0FC7C0780FC7C0F00F8380F007800 +0F0078000F0078000F0078000F0078000F007800FFFFFF80FFFFFF800F0078000F007800 +0F0078000F0078000F0078000F0078000F0078000F0078000F0078000F0078000F007800 +0F0078000F0078000F0078000F0078000F0078007FE3FF807FE3FF801E20809F1B>11 +D<001F8000FFC001E0E003C0F00781F00F01F00F00E00F00000F00000F00000F00000F00 +00FFFFF0FFFFF00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00 +F00F00F00F00F00F00F00F00F00F00F00F00F07FC3FE7FC3FE1720809F19>I<001FB000 +FFF001E1F003C1F00781F00F00F00F00F00F00F00F00F00F00F00F00F00F00F0FFFFF0FF +FFF00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F +00F00F00F00F00F00F00F00F00F07FE7FE7FE7FE1720809F19>I<001FC0FC00007FE7FE +0001F07F070003C0FE07800780FC0F800F00F80F800F007807000F007800000F00780000 +0F007800000F007800000F00780000FFFFFFFF80FFFFFFFF800F007807800F007807800F +007807800F007807800F007807800F007807800F007807800F007807800F007807800F00 +7807800F007807800F007807800F007807800F007807800F007807800F007807807FE3FF +3FF07FE3FF3FF02420809F26>I<070F1F1E3C78F0E0400809779F17>19 +D<7038F87CFC7EFC7E7C3E0C060C060C06180C180C381C3018603040200F0E7F9F17>34 +D<70F8FCFC7C0C0C0C181838306040060E7C9F0D>39 D<006000C001800380070006000E +001C001C003C003800380078007000700070007000F000F000F000F000F000F000F000F0 +00F000F000F000F00070007000700070007800380038003C001C001C000E000600070003 +80018000C000600B2E7CA112>I<C0006000300038001C000C000E000700070007800380 +038003C001C001C001C001C001E001E001E001E001E001E001E001E001E001E001E001E0 +01C001C001C001C003C0038003800780070007000E000C001C00380030006000C0000B2E +7EA112>I<00030000000300000003000000030000000300000003000000030000000300 +0000030000000300000003000000030000000300000003000000030000FFFFFFFCFFFFFF +FC0003000000030000000300000003000000030000000300000003000000030000000300 +000003000000030000000300000003000000030000000300001E207E9A23>43 +D<70F8F8F878181818183030606040050E7C840D>I<FFF0FFF0FFF00C03808B0F>I<70F8 +F8F87005057C840D>I<0000400000C00001800001800001800003000003000003000006 +00000600000C00000C00000C000018000018000018000030000030000060000060000060 +0000C00000C00000C0000180000180000180000300000300000600000600000600000C00 +000C00000C0000180000180000300000300000300000600000600000600000C00000C000 +00122D7EA117>I<03F0000FFC001E1E001C0E00380700780780700380700380700380F0 +03C0F003C0F003C0F003C0F003C0F003C0F003C0F003C0F003C0F003C0F003C0F003C0F0 +03C07003807003807003807807803807001C0E001E1E000FFC0003F000121F7E9D17>I< +00C001C00FC0FFC0F3C003C003C003C003C003C003C003C003C003C003C003C003C003C0 +03C003C003C003C003C003C003C003C003C003C07FFF7FFF101E7D9D17>I<07F0000FFC +00383E00700F00600F80F80780FC07C0FC07C0FC03C07803C03003C00007C00007800007 +80000F00001E00001C0000380000700000E00001C0000380000300C00600C00C00C01801 +C03FFF807FFF80FFFF80FFFF80121E7E9D17>I<03F0000FFC001C1E00300F00780F807C +0F807C07807C0F803C0F80000F00000F00001E00007C0007F00007F000003C00000E0000 +0F000007800007800007C03007C07807C0FC07C0FC07C0FC0780780F80700F003C1E001F +FC0007F000121F7E9D17>I<000700000700000F00001F00001F00003F00007F0000EF00 +00CF0001CF00038F00030F00070F000E0F000C0F00180F00380F00300F00600F00E00F00 +FFFFF0FFFFF0000F00000F00000F00000F00000F00000F0000FFF000FFF0141E7F9D17> +I<3003003FFF003FFE003FF8003FE00030000030000030000030000030000030000031F0 +0037FC003E1E00380F00380F003007800007800007C00007C00007C07807C0F807C0F807 +C0F80780F00780600F00700E00383C001FF80007E000121F7E9D17>I<007C0001FE0007 +83000E07800C0F801C0F80380700380000780000700000700000F1F800F3FE00F40E00F8 +0700F80380F80380F003C0F003C0F003C0F003C0F003C07003C07003C070038038038038 +07001C07000E1E0007FC0001F000121F7E9D17>I<6000007FFFE07FFFE07FFFC07FFFC0 +E00180C00300C00300C00600000C0000180000180000300000700000600000E00000E000 +01E00001C00001C00003C00003C00003C00003C00007C00007C00007C00007C00007C000 +07C000038000131F7E9D17>I<03F0000FFC001C1E003807003007007003807003807003 +807803807C07007F07003F8E001FFC000FF80007FC0007FE001EFF00387F80701F80700F +C0E003C0E003C0E001C0E001C0E001C0F001807003803807001E0E000FFC0003F000121F +7E9D17>I<03F00007F8001E1C00380E00380700700700700380F00380F00380F003C0F0 +03C0F003C0F003C0F003C07007C07007C03807C01C0BC01FF3C007E3C000038000038000 +07800007003807007C0E007C0E00781C003078001FF0000FC000121F7E9D17>I<70F8F8 +F8700000000000000000000070F8F8F87005147C930D>I<70F8F8F87000000000000000 +00000070F8F8F878181818183030606040051D7C930D>I<FFFFFFFCFFFFFFFC00000000 +00000000000000000000000000000000000000000000000000000000FFFFFFFCFFFFFFFC +1E0C7E9023>61 D<0003800000038000000380000007C0000007C0000007C000000FE000 +000FE000000FE0000019F0000019F0000019F0000030F8000030F8000030F80000607C00 +00607C0000607C0000C03E0000C03E0000C03E0001FFFF0001FFFF0001801F0003000F80 +03000F8003000F80060007C0060007C01F0007E0FFC03FFEFFC03FFE1F207F9F22>65 +D<FFFFE000FFFFF8000F803E000F801E000F801F000F800F800F800F800F800F800F800F +800F800F800F800F000F801F000F803E000F807C000FFFF8000FFFFC000F801F000F800F +800F8007C00F8003C00F8003E00F8003E00F8003E00F8003E00F8003E00F8007C00F8007 +C00F800F800F803F00FFFFFE00FFFFF8001B1F7E9E20>I<000FE010007FF83000F80E70 +03E00370078001F00F0000F01F0000F01E0000703C0000703C0000707C00003078000030 +F8000030F8000000F8000000F8000000F8000000F8000000F8000000F8000000F8000000 +780000307C0000303C0000303C0000301E0000601F0000600F0000C00780018003E00300 +00F80E00007FFC00000FE0001C217E9F21>I<FFFFF800FFFFFE0007C01F8007C007C007 +C001E007C000F007C000F007C0007807C0007807C0007C07C0003C07C0003C07C0003E07 +C0003E07C0003E07C0003E07C0003E07C0003E07C0003E07C0003E07C0003C07C0003C07 +C0007C07C0007807C000F807C000F007C001E007C007C007C01F80FFFFFE00FFFFF8001F +1F7F9E23>I<FFFFFF80FFFFFF800F800F800F8003800F8003800F8001800F8001C00F80 +00C00F8000C00F80C0C00F80C0C00F80C0000F80C0000F81C0000FFFC0000FFFC0000F81 +C0000F80C0000F80C0000F80C0600F80C0600F8000600F8000C00F8000C00F8000C00F80 +01C00F8001C00F8003C00F800F80FFFFFF80FFFFFF801B1F7E9E1F>I<FFFFFF80FFFFFF +8007C00F8007C0038007C0018007C0018007C001C007C000C007C000C007C060C007C060 +C007C0600007C0600007C0E00007FFE00007FFE00007C0E00007C0600007C0600007C060 +0007C0600007C0000007C0000007C0000007C0000007C0000007C0000007C0000007C000 +00FFFF0000FFFF00001A1F7F9E1E>I<000FE010007FF83000F80E7003E00370078001F0 +0F0000F01F0000F01E0000703C0000703C0000707C00003078000030F8000030F8000000 +F8000000F8000000F8000000F8000000F8000000F8007FFEF8007FFE780001F07C0001F0 +3C0001F03C0001F01E0001F01F0001F00F0001F007C001F003E003F000FC0E70007FFC10 +000FF0001F217E9F24>I<FFF8FFF8FFF8FFF80F800F800F800F800F800F800F800F800F +800F800F800F800F800F800F800F800F800F800F800F800F800F800F800F800FFFFF800F +FFFF800F800F800F800F800F800F800F800F800F800F800F800F800F800F800F800F800F +800F800F800F800F800F800F800F800F800F80FFF8FFF8FFF8FFF81D1F7E9E22>I<FFF8 +FFF80F800F800F800F800F800F800F800F800F800F800F800F800F800F800F800F800F80 +0F800F800F800F800F800F800F800F800F800F80FFF8FFF80D1F7F9E10>I<07FFE007FF +E0001F00001F00001F00001F00001F00001F00001F00001F00001F00001F00001F00001F +00001F00001F00001F00001F00001F00001F00001F00001F00001F00781F00FC1F00FC1F +00FC1F00F83E00703E00387C001FF0000FC0001320809E17>I<FFFC00FFFC000F80000F +80000F80000F80000F80000F80000F80000F80000F80000F80000F80000F80000F80000F +80000F80000F80000F80000F80060F80060F80060F80060F800E0F800E0F800C0F801C0F +803C0F80FCFFFFFCFFFFFC171F7E9E1C>76 D<FFC0000FFEFFE0001FFE07E0001FC007E0 +001FC006F00037C006F00037C006F00037C006780067C006780067C006780067C0063C00 +C7C0063C00C7C0063C00C7C0061E0187C0061E0187C0060F0307C0060F0307C0060F0307 +C006078607C006078607C006078607C00603CC07C00603CC07C00603CC07C00601F807C0 +0601F807C00601F807C00600F007C00F00F007C0FFF0F0FFFEFFF060FFFE271F7F9E2A> +I<FF801FF8FFC01FF80FE003C00FE001800DF001800DF001800CF801800CFC01800C7C01 +800C3E01800C3F01800C1F01800C0F81800C0FC1800C07C1800C07E1800C03E1800C01F1 +800C01F9800C00F9800C007D800C007F800C003F800C001F800C001F800C000F800C000F +800C0007801E000380FFC00380FFC001801D1F7E9E22>I<001FE000007FF80001F03E00 +03C00F00078007800F0003C01E0001E03E0001F03C0000F07C0000F87C0000F878000078 +F800007CF800007CF800007CF800007CF800007CF800007CF800007CF800007CF800007C +7C0000F87C0000F87C0000F83C0000F03E0001F01E0001E00F0003C00780078003C00F00 +01F03E00007FF800001FE0001E217E9F23>I<FFFFE000FFFFF8000F803E000F801F000F +800F800F8007800F8007C00F8007C00F8007C00F8007C00F8007C00F8007800F800F800F +801F000F803E000FFFF8000FFFE0000F8000000F8000000F8000000F8000000F8000000F +8000000F8000000F8000000F8000000F8000000F8000000F800000FFF80000FFF800001A +1F7E9E1F>I<FFFF8000FFFFF0000F807C000F803E000F801F000F800F000F800F800F80 +0F800F800F800F800F800F800F000F801F000F803E000F807C000FFFF0000FFFE0000F81 +F8000F807C000F807C000F803E000F803E000F803E000F803E000F803E000F803E000F80 +3E000F803E0C0F803E0C0F801F0CFFF80F18FFF807F8000001F01E207E9E21>82 +D<03F0400FFCC01E0FC03807C07803C07001C0F001C0F000C0F000C0F000C0F80000FC00 +007F00007FF0003FFE001FFF000FFF8003FFC0007FE00007E00003F00001F00000F0C000 +F0C000F0C000F0E000E0E000E0F001E0F801C0FE0780C7FF0081FC0014217E9F19>I<7F +FFFFE07FFFFFE07C0F81E0700F80E0600F8060600F8060E00F8070C00F8030C00F8030C0 +0F8030C00F8030000F8000000F8000000F8000000F8000000F8000000F8000000F800000 +0F8000000F8000000F8000000F8000000F8000000F8000000F8000000F8000000F800000 +0F8000000F800003FFFE0003FFFE001C1F7E9E21>I<FFF81FF8FFF81FF80F8003C00F80 +01800F8001800F8001800F8001800F8001800F8001800F8001800F8001800F8001800F80 +01800F8001800F8001800F8001800F8001800F8001800F8001800F8001800F8001800F80 +01800F8001800F800180078003000780030003C0030003C0060001E00C0000F83800003F +F000000FC0001D207E9E22>I<FFF807FEFFF807FE0F8000F00F8000E007C000C007C000 +C007C000C003E0018003E0018003F0018001F0030001F0030001F8070000F8060000F806 +0000FC0E00007C0C00007C0C00003E1800003E1800003E1800001F3000001F3000001FB0 +00000FE000000FE000000FE0000007C0000007C0000003800000038000000380001F207F +9E22>I<FFF8FFF83FF0FFF8FFF83FF01F800F8007800F800F8003000F8007C003000FC0 +07C0070007C007C0060007C00FE0060007E00FE00E0003E00FE00C0003E01FF00C0003E0 +19F00C0001F019F0180001F019F0180001F030F8180000F830F8300000F830F8300000F8 +607C3000007C607C6000007C607C6000007CC03E6000007EC03EE000003EC03EC000003F +C03FC000003F801FC000001F801F8000001F801F8000001F000F8000000F000F0000000F +000F0000000E000700000006000600002C207F9E2F>I<FFFFC0C0C0C0C0C0C0C0C0C0C0 +C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0FFFF082D7CA1 +0D>91 D<0804180C3018703860306030C060C060C060F87CFC7EFC7E7C3E381C0F0E7A9F +17>I<FFFF03030303030303030303030303030303030303030303030303030303030303 +03030303030303030303FFFF082D80A10D>I<0FE0003FF8007C3C007C1E007C0F00380F +00000F00000F0001FF000FCF003E0F00780F00780F00F00F30F00F30F00F30F01F30783F +F03FC7E00F83C014147E9317>97 D<1E0000FE0000FE00001E00001E00001E00001E0000 +1E00001E00001E00001E00001E00001E3F001EFFC01FC1E01F00F01E00701E00781E0038 +1E003C1E003C1E003C1E003C1E003C1E003C1E00381E00781E00701F00F01D83E01CFF80 +183E0016207F9F19>I<01F80007FE001E1F003C1F00381F00780E00700000F00000F000 +00F00000F00000F00000F000007800007800003C01803C03801F070007FE0001F8001114 +7F9314>I<0001E0000FE0000FE00001E00001E00001E00001E00001E00001E00001E000 +01E00001E003F1E007FDE01F07E03C03E03801E07801E07001E0F001E0F001E0F001E0F0 +01E0F001E0F001E07001E07801E03801E03C03E01E0FE00FFDFC03F1FC16207F9F19>I< +03F0000FFC001E1E003C0F00380700780700700380F00380FFFF80FFFF80F00000F00000 +F000007000007800003801803C03801F070007FE0001F80011147F9314>I<003E0000FF +0003CF80078F80078F800F07000F00000F00000F00000F00000F00000F0000FFF000FFF0 +000F00000F00000F00000F00000F00000F00000F00000F00000F00000F00000F00000F00 +000F00000F00000F00000F00007FF0007FF0001120809F0E>I<0000E003E3F00FFE701C +1C70380E60780F00780F00780F00780F00780F00380E001C1C001FF80033E00020000030 +00003000003FFE003FFF801FFFC01FFFE07001E06000F0E00070E00070E000707000E078 +01E03E07C00FFF0003FC00141F7F9417>I<1E0000FE0000FE00001E00001E00001E0000 +1E00001E00001E00001E00001E00001E00001E1F001E7F801EC3C01F81E01F01E01E01E0 +1E01E01E01E01E01E01E01E01E01E01E01E01E01E01E01E01E01E01E01E01E01E01E01E0 +FFC7FCFFC7FC16207F9F19>I<1C003E003E003E001C000000000000000000000000001E +00FE00FE001E001E001E001E001E001E001E001E001E001E001E001E001E001E001E00FF +C0FFC00A1F7F9E0D>I<007000F800F800F80070000000000000000000000000007807F8 +07F800F80078007800780078007800780078007800780078007800780078007800780078 +0078007800787078F878F8F0F9E07FC03F000D28839E0E>I<1E0000FE0000FE00001E00 +001E00001E00001E00001E00001E00001E00001E00001E00001E1FF01E1FF01E0F801E0E +001E0C001E18001E30001E70001EF0001FF8001F78001E3C001E3E001E1E001E1F001E0F +801E07801E07C0FFCFF8FFCFF815207F9F18>I<1E00FE00FE001E001E001E001E001E00 +1E001E001E001E001E001E001E001E001E001E001E001E001E001E001E001E001E001E00 +1E001E001E001E00FFC0FFC00A207F9F0D>I<1E1F80FC00FE7FC3FE00FEC1E60F001F80 +FC07801F00F807801E00F007801E00F007801E00F007801E00F007801E00F007801E00F0 +07801E00F007801E00F007801E00F007801E00F007801E00F007801E00F007801E00F007 +80FFC7FE3FF0FFC7FE3FF024147F9327>I<1E1F00FE7F80FEC3C01F81E01F01E01E01E0 +1E01E01E01E01E01E01E01E01E01E01E01E01E01E01E01E01E01E01E01E01E01E01E01E0 +FFC7FCFFC7FC16147F9319>I<01F80007FE001E07803C03C03801C07000E07000E0F000 +F0F000F0F000F0F000F0F000F0F000F07000E07801E03801C03C03C01E078007FE0001F8 +0014147F9317>I<1E3F00FEFFC0FFC3E01F00F01E00701E00781E00781E003C1E003C1E +003C1E003C1E003C1E003C1E00781E00781E00F01F00F01F83E01EFF801E3E001E00001E +00001E00001E00001E00001E00001E0000FFC000FFC000161D7F9319>I<01F06007FCE0 +1F0EE03C03E03C03E07801E07801E0F001E0F001E0F001E0F001E0F001E0F001E07801E0 +7801E03803E03C03E01F0FE00FFDE003F1E00001E00001E00001E00001E00001E00001E0 +0001E0000FFC000FFC161D7F9318>I<1E78FEFCFF9E1F1E1F0C1F001E001E001E001E00 +1E001E001E001E001E001E001E001E00FFE0FFE00F147F9312>I<0FC83FF870386018E0 +18E018F000FF807FE03FF81FFC01FC003EC00EC00EE00EE00CF83CDFF887E00F147F9312 +>I<06000600060006000E000E001E003E00FFF8FFF81E001E001E001E001E001E001E00 +1E001E001E001E0C1E0C1E0C1E0C1E0C0F1807F003E00E1C7F9B12>I<1E01E0FE0FE0FE +0FE01E01E01E01E01E01E01E01E01E01E01E01E01E01E01E01E01E01E01E01E01E01E01E +01E01E03E01E03E00E0DE007F9FC03F1FC16147F9319>I<FFC7F8FFC7F81E01E01F01C0 +0F01800F018007830007830007830003C60003C60003C60001EC0001EC0001FC0000F800 +00F80000700000700000700015147F9318>I<FF9FF3FCFF9FF3FC1E03C0F01E03C0601F +03C0E00F07C0C00F07E0C00F87E1C0078CE180078CF18007CCF38003D8730003D87B0003 +F87F0001F03E0001F03E0001F03E0000E01C0000E01C0000E01C001E147F9321>I<7FE7 +FC7FE7FC0F83E007838003C30003E70001EE0000FC00007800007800003C00007E0000FE +0001CF000187800387800703C00F03E0FF87FEFF87FE1714809318>I<FFC7F8FFC7F81E +01E01F01C00F01800F018007830007830007830003C60003C60003C60001EC0001EC0001 +FC0000F80000F80000700000700000700000600000600000600070C000F8C000C18000E3 +80007F00003C0000151D7F9318>I<7FFF7FFF781E703E603C607860F861F001E003E007 +C007830F831F031E073C067C06781EFFFEFFFE10147F9314>I E +/Fp 43 122 df<0001FF0000001FFFC000007F81E00000FC01E00001F807F00003F807F0 +0007F007F00007F007F00007F007F00007F007F00007F001C00007F000000007F0000000 +07F000000007F03FF800FFFFFFF800FFFFFFF800FFFFFFF80007F003F80007F003F80007 +F003F80007F003F80007F003F80007F003F80007F003F80007F003F80007F003F80007F0 +03F80007F003F80007F003F80007F003F80007F003F80007F003F80007F003F80007F003 +F80007F003F80007F003F80007F003F80007F003F8007FFF3FFF807FFF3FFF807FFF3FFF +80212A7FA925>12 D<000E00001E00007E0007FE00FFFE00FFFE00F8FE0000FE0000FE00 +00FE0000FE0000FE0000FE0000FE0000FE0000FE0000FE0000FE0000FE0000FE0000FE00 +00FE0000FE0000FE0000FE0000FE0000FE0000FE0000FE0000FE0000FE0000FE0000FE00 +00FE0000FE0000FE00FFFFFEFFFFFEFFFFFE17277BA622>49 D<00FF800007FFF0001FFF +FC003E07FE007E01FF807F007F80FF807FC0FF803FC0FF803FE0FF801FE0FF801FE07F00 +1FE03E003FE000003FE000003FC000003FC000007F8000007F000000FE000000FC000001 +F8000003F0000007C000000F8000001F0000003C0000007800E0007000E000E000E001C0 +01C0030001C0060001C00FFFFFC01FFFFFC03FFFFFC07FFFFFC0FFFFFF80FFFFFF80FFFF +FF801B277DA622>I<007F800003FFF00007FFFC000F81FE001F00FF001F80FF003FC07F +803FC07F803FC07F803FC07F801FC07F800F80FF000000FF000000FE000001FC000003F8 +000007F00000FF800000FFC0000001F8000000FE0000007F0000007F8000003FC000003F +C000003FE01C003FE07F003FE07F003FE0FF803FE0FF803FE0FF803FC0FF803FC07F007F +807E00FF003F01FE001FFFFC0007FFF00000FF80001B277DA622>I<00000F0000000F00 +00001F0000003F0000007F000000FF000001FF000001FF000003BF0000073F00000E3F00 +001C3F00003C3F0000383F0000703F0000E03F0001C03F0003803F0007803F0007003F00 +0E003F001C003F0038003F0070003F00F0003F00FFFFFFF8FFFFFFF8FFFFFFF800007F00 +00007F0000007F0000007F0000007F0000007F0000007F0000007F00001FFFF8001FFFF8 +001FFFF81D277EA622>I<180003001F801F001FFFFE001FFFFC001FFFF8001FFFF0001F +FFE0001FFF80001FFE00001C0000001C0000001C0000001C0000001C0000001C0000001C +7FC0001DFFF8001F80FC001E003F0008003F0000001F8000001FC000001FC000001FE000 +001FE03C001FE07E001FE0FF001FE0FF001FE0FF001FE0FF001FC0FE001FC07C003F8078 +003F803C007F001F01FE000FFFFC0003FFF00000FF80001B277DA622>I<0007F800003F +FE0000FFFF0001FC0F8003F00F8007E01FC00FC03FC01F803FC01F803FC03F803FC03F00 +1F807F000F007F0000007F000000FF020000FF1FF000FF3FFC00FF603E00FFC03F00FF80 +1F80FF801FC0FF801FC0FF001FC0FF001FE0FF001FE0FF001FE07F001FE07F001FE07F00 +1FE07F001FE03F001FE03F001FC01F801FC01F801F800FC03F0007E07E0003FFFC0001FF +F800003FC0001B277DA622>I<380000003E0000003FFFFFF03FFFFFF03FFFFFF07FFFFF +E07FFFFFC07FFFFF807FFFFF0070000E0070000E0070001C00E0003800E0007000E000E0 +000001C0000001C0000003800000078000000F8000000F0000001F0000001F0000003F00 +00003F0000007E0000007E0000007E000000FE000000FE000000FE000000FE000001FE00 +0001FE000001FE000001FE000001FE000001FE000001FE000000FC0000007800001C297C +A822>I<003FC00001FFF00003FFFC0007C07E000F003F001E001F001E000F803E000F80 +3E000F803F000F803F800F803FC00F003FF01F001FFC1E001FFE3C000FFFF80007FFE000 +03FFF00001FFFC0001FFFE0007FFFF000F0FFF801E07FFC03E01FFC07C007FE07C001FE0 +F8000FE0F80007E0F80003E0F80003E0F80003E0F80003C07C0003C07E0007803F000F00 +1FC03F000FFFFC0003FFF800007FC0001B277DA622>I<00000780000000000780000000 +000FC0000000000FC0000000000FC0000000001FE0000000001FE0000000003FF0000000 +003FF0000000003FF00000000077F80000000077F800000000F7FC00000000E3FC000000 +00E3FC00000001C1FE00000001C1FE00000003C1FF0000000380FF0000000380FF000000 +07007F80000007007F8000000F007FC000000E003FC000000E003FC000001C001FE00000 +1C001FE000003FFFFFF000003FFFFFF000003FFFFFF00000700007F80000700007F80000 +F00007FC0000E00003FC0001E00003FE0001C00001FE0001C00001FE0003C00001FF00FF +FE003FFFFCFFFE003FFFFCFFFE003FFFFC2E297EA833>65 D<00007FE0030003FFFC0700 +1FFFFF0F007FF00FDF00FF8001FF01FE0000FF03FC00007F07F000003F0FF000001F1FE0 +00001F1FE000000F3FC000000F3FC00000077FC00000077F800000077F80000000FF8000 +0000FF80000000FF80000000FF80000000FF80000000FF80000000FF80000000FF800000 +00FF800000007F800000007F800000007FC00000073FC00000073FC00000071FE0000007 +1FE000000E0FF000000E07F000001C03FC00003C01FE00007800FF8001F0007FF007C000 +1FFFFF800003FFFE0000007FF00028297CA831>67 D<FFFFFFFC0000FFFFFFFF8000FFFF +FFFFE00003FC001FF80003FC0003FC0003FC0001FE0003FC0000FF0003FC00007F8003FC +00003FC003FC00001FC003FC00001FE003FC00001FE003FC00000FF003FC00000FF003FC +00000FF003FC00000FF003FC00000FF803FC00000FF803FC00000FF803FC00000FF803FC +00000FF803FC00000FF803FC00000FF803FC00000FF803FC00000FF803FC00000FF803FC +00000FF003FC00000FF003FC00000FF003FC00001FE003FC00001FE003FC00001FC003FC +00003FC003FC00003F8003FC00007F0003FC0001FF0003FC0003FC0003FC001FF800FFFF +FFFFF000FFFFFFFF8000FFFFFFFC00002D297EA834>I<FFFFFFFFE0FFFFFFFFE0FFFFFF +FFE003FC001FE003FC0007F003FC0001F003FC0001F003FC0000F003FC00007003FC0000 +7003FC00007003FC01C07803FC01C03803FC01C03803FC01C03803FC03C00003FC03C000 +03FC0FC00003FFFFC00003FFFFC00003FFFFC00003FC0FC00003FC03C00003FC03C00003 +FC01C00E03FC01C00E03FC01C00E03FC01C01C03FC00001C03FC00001C03FC00001C03FC +00003C03FC00003803FC00007803FC0000F803FC0001F803FC0003F803FC001FF8FFFFFF +FFF0FFFFFFFFF0FFFFFFFFF027297EA82C>I<FFFFFFFFC0FFFFFFFFC0FFFFFFFFC003FC +003FC003FC000FE003FC0003E003FC0001E003FC0001E003FC0000E003FC0000E003FC00 +00E003FC0000F003FC01C07003FC01C07003FC01C07003FC01C00003FC03C00003FC03C0 +0003FC0FC00003FFFFC00003FFFFC00003FFFFC00003FC0FC00003FC03C00003FC03C000 +03FC01C00003FC01C00003FC01C00003FC01C00003FC00000003FC00000003FC00000003 +FC00000003FC00000003FC00000003FC00000003FC00000003FC000000FFFFFC0000FFFF +FC0000FFFFFC000024297EA82A>I<FFFFF0FFFFF0FFFFF003FC0003FC0003FC0003FC00 +03FC0003FC0003FC0003FC0003FC0003FC0003FC0003FC0003FC0003FC0003FC0003FC00 +03FC0003FC0003FC0003FC0003FC0003FC0003FC0003FC0003FC0003FC0003FC0003FC00 +03FC0003FC0003FC0003FC0003FC0003FC0003FC00FFFFF0FFFFF0FFFFF014297EA819> +73 D<FFFFFC0000FFFFFC0000FFFFFC000003FC00000003FC00000003FC00000003FC00 +000003FC00000003FC00000003FC00000003FC00000003FC00000003FC00000003FC0000 +0003FC00000003FC00000003FC00000003FC00000003FC00000003FC00000003FC000000 +03FC00000003FC00000003FC00000003FC0001C003FC0001C003FC0001C003FC0001C003 +FC0003C003FC00038003FC00038003FC00078003FC00078003FC000F8003FC000F8003FC +001F8003FC007F8003FC01FF00FFFFFFFF00FFFFFFFF00FFFFFFFF0022297EA828>76 +D<FFFFFFF800FFFFFFFF00FFFFFFFFC003FC003FE003FC000FF003FC0007F803FC0007FC +03FC0003FC03FC0003FE03FC0003FE03FC0003FE03FC0003FE03FC0003FE03FC0003FE03 +FC0003FE03FC0003FC03FC0007FC03FC0007F803FC000FF003FC003FE003FFFFFF8003FF +FFFE0003FC00000003FC00000003FC00000003FC00000003FC00000003FC00000003FC00 +000003FC00000003FC00000003FC00000003FC00000003FC00000003FC00000003FC0000 +0003FC00000003FC000000FFFFF00000FFFFF00000FFFFF0000027297EA82E>80 +D<00FF806003FFF0E00FFFF9E01F80FFE03F001FE03E0007E07C0003E07C0003E0FC0001 +E0FC0001E0FC0000E0FE0000E0FE0000E0FF000000FFC000007FFC00007FFFE0003FFFF8 +001FFFFE001FFFFF0007FFFF8003FFFFC000FFFFC0000FFFE000007FE000001FF000000F +F0000007F0E00003F0E00003F0E00003F0E00003F0F00003E0F00003E0F80007E0FC0007 +C0FF000F80FFE03F80F3FFFE00E1FFFC00C01FF0001C297CA825>83 +D<7FFFFFFFFF807FFFFFFFFF807FFFFFFFFF807F807F807F807C007F800F8078007F8007 +8078007F80078070007F800380F0007F8003C0F0007F8003C0E0007F8001C0E0007F8001 +C0E0007F8001C0E0007F8001C0E0007F8001C000007F80000000007F80000000007F8000 +0000007F80000000007F80000000007F80000000007F80000000007F80000000007F8000 +0000007F80000000007F80000000007F80000000007F80000000007F80000000007F8000 +0000007F80000000007F80000000007F80000000007F80000000007F80000000007F8000 +0000007F80000000FFFFFFC00000FFFFFFC00000FFFFFFC0002A287EA72F>I<FFFFF000 +7FFFFFFFF0007FFFFFFFF0007FFF03FE000001C001FE0000038001FE0000038001FF0000 +078000FF0000070000FF80000F00007F80000E00007FC0000E00003FC0001C00003FC000 +1C00003FE0003C00001FE0003800001FF0007800000FF0007000000FF80070000007F800 +E0000007F800E0000003FC01C0000003FC01C0000003FE03C0000001FE0380000001FF07 +80000000FF0700000000FF87000000007F8E000000007F8E000000007FDE000000003FDC +000000003FFC000000001FF8000000001FF8000000000FF0000000000FF0000000000FF0 +0000000007E00000000007E00000000003C00000000003C0000030297FA833>86 +D<01FF80000FFFF0001F81FC003FC0FE003FC07F003FC03F003FC03F801F803F800F003F +8000003F8000003F800000FF80007FFF8003FFFF800FF03F801FC03F803F803F807F003F +80FE003F80FE003F80FE003F80FE003F80FE007F807F00DF803F839FFC1FFF0FFC03FC03 +FC1E1B7E9A21>97 D<FFE00000FFE00000FFE000000FE000000FE000000FE000000FE000 +000FE000000FE000000FE000000FE000000FE000000FE000000FE000000FE000000FE1FE +000FEFFF800FFE0FE00FF803F00FF001F80FE001FC0FE000FC0FE000FE0FE000FE0FE000 +FF0FE000FF0FE000FF0FE000FF0FE000FF0FE000FF0FE000FF0FE000FF0FE000FE0FE000 +FE0FE000FE0FE001FC0FE001FC0FF001F80FF803F00F9C0FE00F0FFF800E01FC00202A7E +A925>I<003FE00001FFFC0003F07E000FC0FF001FC0FF003F80FF003F80FF007F007E00 +7F003C007F000000FF000000FF000000FF000000FF000000FF000000FF000000FF000000 +7F0000007F0000007F8000003F8003803F8003801FC007000FE00E0003F83C0001FFF800 +003FC000191B7E9A1E>I<00007FF000007FF000007FF0000007F0000007F0000007F000 +0007F0000007F0000007F0000007F0000007F0000007F0000007F0000007F0000007F000 +3F87F001FFF7F007F03FF00FC00FF01F8007F03F8007F03F8007F07F0007F07F0007F07F +0007F0FF0007F0FF0007F0FF0007F0FF0007F0FF0007F0FF0007F0FF0007F0FF0007F07F +0007F07F0007F03F0007F03F8007F01F800FF00FC01FF007F07FFF01FFE7FF007F87FF20 +2A7EA925>I<003FC00001FFF00003F0FC000FC03E001F803F001F801F003F801F807F00 +1F807F001FC07F000FC0FF000FC0FF000FC0FFFFFFC0FFFFFFC0FF000000FF000000FF00 +00007F0000007F0000007F0000003F8001C01F8001C00FC0038007C0070003F01E0000FF +FC00003FE0001A1B7E9A1F>I<0003F800001FFE00007E3F0001FC3F8001F87F8003F87F +8007F07F8007F03F0007F03F0007F0000007F0000007F0000007F0000007F0000007F000 +00FFFFC000FFFFC000FFFFC00007F0000007F0000007F0000007F0000007F0000007F000 +0007F0000007F0000007F0000007F0000007F0000007F0000007F0000007F0000007F000 +0007F0000007F0000007F0000007F0000007F0000007F000007FFF80007FFF80007FFF80 +00192A7EA915>I<00FF81F003FFE7F80FC1FE1C1F80FC7C3F007E7C3F007E387F007F00 +7F007F007F007F007F007F007F007F007F007F003F007E003F007E001F80FC000FC1F800 +1FFFE00018FF800038000000380000003C0000003E0000003FFFF8003FFFFF001FFFFFC0 +0FFFFFE007FFFFF01FFFFFF03E0007F07C0001F8F80000F8F80000F8F80000F8F80000F8 +7C0001F07C0001F03F0007E00FC01F8007FFFF00007FF0001E287E9A22>I<FFE00000FF +E00000FFE000000FE000000FE000000FE000000FE000000FE000000FE000000FE000000F +E000000FE000000FE000000FE000000FE000000FE0FE000FE3FF800FE70FC00FEC0FE00F +F807E00FF807F00FF007F00FF007F00FE007F00FE007F00FE007F00FE007F00FE007F00F +E007F00FE007F00FE007F00FE007F00FE007F00FE007F00FE007F00FE007F00FE007F00F +E007F00FE007F0FFFE3FFFFFFE3FFFFFFE3FFF202A7DA925>I<07000F801FC03FE03FE0 +3FE01FC00F8007000000000000000000000000000000FFE0FFE0FFE00FE00FE00FE00FE0 +0FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE0FFFE +FFFEFFFE0F2B7EAA12>I<FFE00000FFE00000FFE000000FE000000FE000000FE000000F +E000000FE000000FE000000FE000000FE000000FE000000FE000000FE000000FE000000F +E01FFC0FE01FFC0FE01FFC0FE007800FE00F000FE01E000FE03C000FE078000FE0E0000F +E3C0000FE7C0000FEFE0000FFFF0000FFFF8000FF3F8000FE1FC000FC0FE000FC07F000F +C07F000FC03F800FC01FC00FC00FE00FC00FE00FC007F0FFFC1FFFFFFC1FFFFFFC1FFF20 +2A7FA923>107 D<FFE0FFE0FFE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE0 +0FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE0 +0FE00FE00FE00FE00FE00FE00FE0FFFEFFFEFFFE0F2A7EA912>I<FFC07F001FC000FFC1 +FFC07FF000FFC707E1C1F8000FCC07F301FC000FD803F600FC000FD803FE00FE000FF003 +FC00FE000FF003FC00FE000FE003F800FE000FE003F800FE000FE003F800FE000FE003F8 +00FE000FE003F800FE000FE003F800FE000FE003F800FE000FE003F800FE000FE003F800 +FE000FE003F800FE000FE003F800FE000FE003F800FE000FE003F800FE000FE003F800FE +000FE003F800FE000FE003F800FE00FFFE3FFF8FFFE0FFFE3FFF8FFFE0FFFE3FFF8FFFE0 +331B7D9A38>I<FFC0FE00FFC3FF80FFC70FC00FCC0FE00FD807E00FD807F00FF007F00F +F007F00FE007F00FE007F00FE007F00FE007F00FE007F00FE007F00FE007F00FE007F00F +E007F00FE007F00FE007F00FE007F00FE007F00FE007F00FE007F00FE007F0FFFE3FFFFF +FE3FFFFFFE3FFF201B7D9A25>I<003FE00001FFFC0003F07E000FC01F801F800FC03F80 +0FE03F0007E07F0007F07F0007F07F0007F0FF0007F8FF0007F8FF0007F8FF0007F8FF00 +07F8FF0007F8FF0007F8FF0007F87F0007F07F0007F03F800FE03F800FE01F800FC00FC0 +1F8007F07F0001FFFC00003FE0001D1B7E9A22>I<FFE1FE00FFEFFF80FFFE0FE00FF807 +F00FF003F80FE001FC0FE001FC0FE001FE0FE000FE0FE000FF0FE000FF0FE000FF0FE000 +FF0FE000FF0FE000FF0FE000FF0FE000FF0FE000FE0FE001FE0FE001FE0FE001FC0FE003 +FC0FF003F80FF807F00FFC1FE00FEFFF800FE1FC000FE000000FE000000FE000000FE000 +000FE000000FE000000FE000000FE000000FE00000FFFE0000FFFE0000FFFE000020277E +9A25>I<FFC1F0FFC7FCFFCE3E0FDC7F0FD87F0FF07F0FF07F0FF03E0FE0000FE0000FE0 +000FE0000FE0000FE0000FE0000FE0000FE0000FE0000FE0000FE0000FE0000FE0000FE0 +000FE000FFFF00FFFF00FFFF00181B7F9A1B>114 D<03FE300FFFF03E03F07800F07000 +F0F00070F00070F80070FE0000FFE0007FFF007FFFC03FFFE01FFFF007FFF800FFF80007 +FC0000FCE0007CE0003CF0003CF00038F80038FC0070FF01E0F7FFC0C1FF00161B7E9A1B +>I<00E00000E00000E00000E00001E00001E00001E00003E00003E00007E0000FE0001F +FFE0FFFFE0FFFFE00FE0000FE0000FE0000FE0000FE0000FE0000FE0000FE0000FE0000F +E0000FE0000FE0000FE0000FE0700FE0700FE0700FE0700FE0700FE0700FE07007F0E003 +F0C001FF80007F0014267FA51A>I<FFE07FF0FFE07FF0FFE07FF00FE007F00FE007F00F +E007F00FE007F00FE007F00FE007F00FE007F00FE007F00FE007F00FE007F00FE007F00F +E007F00FE007F00FE007F00FE007F00FE007F00FE007F00FE007F00FE00FF00FE00FF007 +E01FF003F077FF01FFE7FF007F87FF201B7D9A25>I<FFFC03FFFFFC03FFFFFC03FF0FF0 +00F007F000E007F800E003F801C003F801C003FC03C001FC038001FE078000FE070000FF +0700007F0E00007F0E00007F9E00003F9C00003FFC00001FF800001FF800000FF000000F +F000000FF0000007E0000007E0000003C0000003C000201B7F9A23>I<FFFC7FFC1FFCFF +FC7FFC1FFCFFFC7FFC1FFC0FE00FE001C007F007E0038007F007E0038007F807F0078003 +F807F0070003F80FF8070003FC0FF80F0001FC0FF80E0001FC1FFC0E0000FE1CFC1C0000 +FE1CFE1C0000FF387E3C00007F387E3800007F787F3800003FF03F7000003FF03FF00000 +3FE01FF000001FE01FE000001FE01FE000000FC00FC000000FC00FC000000F8007C00000 +07800780000007800780002E1B7F9A31>I<FFFC1FFEFFFC1FFEFFFC1FFE07F0038003F8 +078003FC0F0001FE1E0000FE3C00007F3800007FF800003FF000001FE000000FE000000F +F0000007F800000FF800001FFC00003CFE000038FF0000787F0000F03F8001E01FC003C0 +1FE003800FE0FFF03FFFFFF03FFFFFF03FFF201B7F9A23>I<FFFC03FFFFFC03FFFFFC03 +FF0FF000F007F000E007F800E003F801C003F801C003FC03C001FC038001FE078000FE07 +0000FF0700007F0E00007F0E00007F9E00003F9C00003FFC00001FF800001FF800000FF0 +00000FF000000FF0000007E0000007E0000003C0000003C0000003800000038000000780 +00380700007C0F0000FE0E0000FE1E0000FE1C0000FE38000074F000003FE000000F8000 +0020277F9A23>I E /Fq 41 127 df<007E0001C1800301800703C00E03C00E01800E00 +000E00000E00000E00000E0000FFFFC0FFFFC00E01C00E01C00E01C00E01C00E01C00E01 +C00E01C00E01C00E01C00E01C00E01C00E01C00E01C00E01C07F87F87F87F8151D809C17 +>12 D<FC00FC001C001C001C001C001C001C001C001C001C001C001C001C001C001C00FF +80FF8009127F910C>16 D<070F0F1C3870E0400808789C15>19 D<1C001E000780038003 +800380FF00800009087B7E12>24 D<70F8F8F87005057D840C>46 +D<07C01FF0387C603C601EF01FF81FF80FF80F700F001F001E001E003C0038007000E000 +C00180030006000C031803100320067FFEFFFEFFFE101C7E9B15>50 +D<000C00001C00001C00003C00007C00005C0000DC00019C00031C00031C00061C000C1C +00081C00181C00301C00201C00601C00C01C00FFFFC0FFFFC0001C00001C00001C00001C +00001C00001C0001FFC001FFC0121C7F9B15>52 D<00060000000F0000000F0000000F00 +00001F8000001F8000001F8000003FC0000033C0000033C0000073E0000061E0000061E0 +0000E1F00000C0F00000C0F00001C0F8000180780001FFF80003FFFC0003003C0003003C +0007003E0006001E0006001E000E001F001E000F00FF807FF0FF807FF01C1D7F9C1F>65 +D<001F808000FFE18001F03B8007C00F800F0007801F0007801E0003803C0003807C0001 +807C00018078000180F8000000F8000000F8000000F8000000F8000000F8000000F80000 +00F8000000780001807C0001807C0001803C0001801E0003001F0003000F00060007C00C +0001F0380000FFF000001FC000191E7E9C1E>67 D<FFFFFCFFFFFC0F007C0F001C0F000C +0F000E0F00060F03060F03060F03060F03000F07000FFF000FFF000F07000F03000F0300 +0F03030F03030F00030F00060F00060F00060F000E0F001E0F007CFFFFFCFFFFFC181C7E +9B1C>69 D<FFF0FFF00F000F000F000F000F000F000F000F000F000F000F000F000F000F +000F000F000F000F000F000F000F000F000F000F00FFF0FFF00C1C7F9B0F>73 +D<FFF800FFF8000F00000F00000F00000F00000F00000F00000F00000F00000F00000F00 +000F00000F00000F00000F00000F00000F00180F00180F00180F00180F00380F00300F00 +700F00F00F01F0FFFFF0FFFFF0151C7E9B1A>76 D<003F800000E0E0000380380007001C +000E000E001E000F003C0007803C0007807C0007C0780003C0780003C0F80003E0F80003 +E0F80003E0F80003E0F80003E0F80003E0F80003E0F80003E0780003C07C0007C07C0007 +C03C0007803E000F801E000F000F001E0007001C000380380000E0E000003F80001B1E7E +9C20>79 D<FFFF80FFFFE00F01F00F00780F003C0F003E0F003E0F003E0F003E0F003E0F +003C0F003C0F00780F01F00FFFC00F00000F00000F00000F00000F00000F00000F00000F +00000F00000F00000F0000FFF000FFF000171C7E9B1C>I<7FFFFFC07FFFFFC0780F03C0 +700F01C0600F00C0E00F00E0C00F0060C00F0060C00F0060C00F0060000F0000000F0000 +000F0000000F0000000F0000000F0000000F0000000F0000000F0000000F0000000F0000 +000F0000000F0000000F0000000F0000000F000003FFFC0003FFFC001B1C7F9B1E>84 +D<FFE01FF0FFE01FF01F0007800F0003000F00030007800600078006000780060003C00C +0003C00C0003C00C0001E0180001E0180001F0180000F0300000F0300000F87000007860 +0000786000003CC000003CC000003CC000001F8000001F8000001F8000000F0000000F00 +00000F0000000600001C1D7F9B1F>86 D<0FE0001838003C1C003C0E00180E00000E0000 +0E0001FE000F8E003C0E00780E00700E00F00E60F00E60F00E60701E603827C00FC38013 +127F9115>97 D<FC0000FC00001C00001C00001C00001C00001C00001C00001C00001C00 +001C00001CFC001F87001E03801C01C01C01E01C00E01C00F01C00F01C00F01C00F01C00 +F01C00F01C00E01C01E01C01C01E03801B070018FC00141D7F9C17>I<03F80E0C1C1E38 +1E780C7000F000F000F000F000F000F0007000780638061C0C0E1803E00F127F9112>I< +001F80001F8000038000038000038000038000038000038000038000038000038003F380 +0E0F801C0780380380780380700380F00380F00380F00380F00380F00380F00380700380 +7803803803801C07800E1BF003F3F0141D7F9C17>I<07E00C301818381C701E700EF00E +FFFEF000F000F000F000700070063806180C0E1803E00F127F9112>I<00F8018C071E06 +1E0E0C0E000E000E000E000E000E00FFE0FFE00E000E000E000E000E000E000E000E000E +000E000E000E000E000E007FE07FE00F1D809C0D>I<00038007E4C00C39C0381DC0381C +00781E00781E00781E00781E00381C00381C001C300037E0002000003000003000003FF8 +001FFF001FFF803003806001C0C000C0C000C0C000C06001803003001C0E0007F800121C +7F9215>I<FC0000FC00001C00001C00001C00001C00001C00001C00001C00001C00001C +00001C7C001C87001D03001E03801C03801C03801C03801C03801C03801C03801C03801C +03801C03801C03801C03801C0380FF9FF0FF9FF0141D7F9C17>I<38007C007C007C0038 +00000000000000000000000000FC00FC001C001C001C001C001C001C001C001C001C001C +001C001C001C001C00FF80FF80091D7F9C0C>I<01C003E003E003E001C0000000000000 +00000000000007E007E000E000E000E000E000E000E000E000E000E000E000E000E000E0 +00E000E000E000E000E000E060E0F0C0F1C061803E000B25839C0D>I<FC00FC001C001C +001C001C001C001C001C001C001C001C001C001C001C001C001C001C001C001C001C001C +001C001C001C001C001C00FF80FF80091D7F9C0C>108 D<FC7E07E000FC838838001D01 +9018001E01E01C001C01C01C001C01C01C001C01C01C001C01C01C001C01C01C001C01C0 +1C001C01C01C001C01C01C001C01C01C001C01C01C001C01C01C001C01C01C00FF8FF8FF +80FF8FF8FF8021127F9124>I<FC7C00FC87001D03001E03801C03801C03801C03801C03 +801C03801C03801C03801C03801C03801C03801C03801C0380FF9FF0FF9FF014127F9117 +>I<03F0000E1C00180600380700700380700380F003C0F003C0F003C0F003C0F003C0F0 +03C07003807003803807001C0E000E1C0003F00012127F9115>I<FCFC00FF87001E0380 +1C01C01C01E01C00E01C00F01C00F01C00F01C00F01C00F01C00F01C01E01C01E01C01C0 +1E03801F07001CFC001C00001C00001C00001C00001C00001C0000FF8000FF8000141A7F +9117>I<03F1800E19801C0780380780780380780380F00380F00380F00380F00380F003 +80F003807003807803803807801C07800E1B8003E3800003800003800003800003800003 +80000380001FF0001FF0141A7F9116>I<FCE0FD381E781E781C301C001C001C001C001C +001C001C001C001C001C001C00FFC0FFC00D127F9110>I<1F9020F04070C030C030E030 +F8007F803FE00FF000F8C038C018C018E018E010D0608FC00D127F9110>I<0C000C000C +000C000C000C001C001C003FE0FFE01C001C001C001C001C001C001C001C001C301C301C +301C301C300C200E6003C00C1A7F9910>I<FC1F80FC1F801C03801C03801C03801C0380 +1C03801C03801C03801C03801C03801C03801C03801C03801C07800C07800E1BF003E3F0 +14127F9117>I<FF0FE0FF0FE01C07801C03000E06000E06000E0600070C00070C00070C +0003980003980003F80001F00001F00000E00000E00000E00013127F9116>I<FF3FCFE0 +FF3FCFE03C0F07801C0F03001C1B03001C1B87000E1B86000E3B86000E3186000731CC00 +0731CC000760CC0003E0F80003E0F80003C0780003C0780001C0700001C070001B127F91 +1E>I<7F8FF07F8FF00F0780070600038E0001DC0001D80000F00000700000780000F800 +01DC00038E00030E000607000F0380FF0FF8FF0FF81512809116>I<FF0FE0FF0FE01C07 +801C03000E06000E06000E0600070C00070C00070C0003980003980003F80001F00001F0 +0000E00000E00000E00000C00000C00000C000F18000F18000F300006600003C0000131A +7F9116>I<1C043F0843F080E00E047D9B15>126 D E /Fr 13 118 +df<0F001F003F803F007E00F800F000C0000908769C18>19 D<00038000000380000007 +C0000007C0000007C000000FE000000FE000001FF000001BF000003BF8000031F8000031 +F8000060FC000060FC0000E0FE0000C07E0000C07E0001803F0001FFFF0003FFFF800300 +1F8007001FC006000FC006000FC00C0007E00C0007E0FF803FFEFF803FFE1F1C7E9B24> +65 D<07F8601FFEE03C07E07801E07000E0F000E0F00060F00060F80000FE0000FFE000 +7FFE003FFF003FFF800FFFC007FFE0007FE00003F00001F00000F0C000F0C000F0C000E0 +E000E0F001C0FC03C0EFFF00C3FC00141C7D9B1B>83 D<07F8001FFE003F1F803F07803F +07C01E07C00C07C003FFC01FFFC03F87C07E07C0FC07C0FC07C0FC07C0FC0FC07E1FC03F +FBF80FE1F815127F9117>97 D<FF0000FF00001F00001F00001F00001F00001F00001F00 +001F00001F00001F00001F1FC01FFFE01FC1F81F00F81F007C1F007C1F007E1F007E1F00 +7E1F007E1F007E1F007E1F007C1F007C1F80F81FC1F01C7FE0181F80171D7F9C1B>I<03 +F8000FFE001F3F003E3F007C3F007C1E00FC0C00FC0000FC0000FC0000FC0000FC00007C +00007E01803E03801F07000FFE0003F80011127E9115>I<1C003E007F007F007F003E00 +1C00000000000000000000007F007F001F001F001F001F001F001F001F001F001F001F00 +1F001F001F001F00FFC0FFC00A1E7F9D0E>105 D<FF1FC0FE00FF7FE3FF001FE1F70F80 +1F80FC07C01F80FC07C01F00F807C01F00F807C01F00F807C01F00F807C01F00F807C01F +00F807C01F00F807C01F00F807C01F00F807C01F00F807C01F00F807C0FFE7FF3FF8FFE7 +FF3FF825127F9128>109 D<01FC000FFF801F07C03E03E07C01F07C01F0FC01F8FC01F8 +FC01F8FC01F8FC01F8FC01F87C01F07C01F03E03E01F07C00FFF8001FC0015127F9118> +111 D<FE7C00FEFF001FDF801F9F801F9F801F0F001F06001F00001F00001F00001F0000 +1F00001F00001F00001F00001F0000FFE000FFE00011127F9114>114 +D<1FD83FF87038E018E018F000FF807FE07FF01FF807FC007CC01CC01CE01CF038FFF0CF +C00E127E9113>I<030003000300070007000F000F003F00FFFCFFFC1F001F001F001F00 +1F001F001F001F001F001F0C1F0C1F0C1F0C0F9807F003E00E1A7F9913>I<FF07F8FF07 +F81F00F81F00F81F00F81F00F81F00F81F00F81F00F81F00F81F00F81F00F81F00F81F00 +F81F01F80F03F807FEFF03F8FF18127F911B>I E /Fs 7 115 df<000FF000007FFC0000 +FFFF0001FFFF0007F81F0007E006000F8000001F0000003F0000003E0000003E0000007C +0000007C0000007C000000F8000000F8000000F8000000F8000000F8000000F8000000F8 +000000F8000000F80000007C0000007C0000007C0000003E0000003E0000003F0000001F +0000000F80008007E0038007F80F8001FFFF8000FFFF00007FFC00000FF00019257DA31F +>67 D<000FF000003FFE0000FFFF8001FFFF8003F80F8007E003000FC000001F8000001F +0000003E0000003E0000007C0000007C0000007C000000F8000000F8000000F8000000F8 +000000F8000000F8000000F800FFC0F800FFC0F800FFC07C0003C07C0003C07C0003C03E +0003C03E0003C01F0003C01F8003C00FC003C007E003C003F807C001FFFFC000FFFFC000 +3FFF00000FF8001A257DA321>71 D<FFFFFFF0FFFFFFF0FFFFFFF0FFFFFFF0000F800000 +0F8000000F8000000F8000000F8000000F8000000F8000000F8000000F8000000F800000 +0F8000000F8000000F8000000F8000000F8000000F8000000F8000000F8000000F800000 +0F8000000F8000000F8000000F8000000F8000000F8000000F8000000F8000000F800000 +0F8000000F8000000F80001C237EA221>84 D<07F0003FFC007FFE00781F00600F004007 +8000078000078000078001FF800FFF801FFF807F0780780780F00780F00780F00780F80F +807C1F807FFF803FFF801FC78011167E9517>97 D<01F80007FE000FFF001F07803C03C0 +7801C07801C07000E0FFFFE0FFFFE0FFFFE0F00000F00000F000007000007800007C0000 +3E00401F03C00FFFC007FF8000FC0013167F9516>101 D<007F01FF03FF07C107000F00 +0F000F000F000F000F000F000F00FFF8FFF8FFF80F000F000F000F000F000F000F000F00 +0F000F000F000F000F000F000F000F000F000F000F00102380A20F>I<F0E0F3E0F7E0FF +E0FF00FC00F800F800F000F000F000F000F000F000F000F000F000F000F000F000F000F0 +000B167C9511>114 D E /Ft 30 118 df<387CFCFE7E3E0E1C3CF8F040070C788516> +44 D<FFFF80FFFF80FFFF8011037E8D16>I<3078FCFC78300606788516>I<0001800003 +80000380000700000700000E00000E00001C00001C0000380000380000700000700000E0 +0000E00001C00001C0000380000380000700000700000E00000E00001C00001C00003800 +00380000700000700000E00000E00000C0000011207E9C16>I<03E0000FF8001FFC001E +3C00380E00780F00700700700700E00380E00380E00380E00380E00380E00380E00380E0 +0380F00780700700700700780F003C1E001E3C001FFC000FF80003E00011197E9816>I< +0300070007000F001F00FF00FF00E7000700070007000700070007000700070007000700 +0700070007000700FFF8FFF8FFF80D197B9816>I<07E0001FF8003FFC00783E00E00700 +F00780F00380600380000380000380000700000700000E00001C0000380000700000E000 +01C0000380000F00001E03803803807FFF80FFFF807FFF8011197E9816>I<007C0000FC +0000FC0001DC00039C00039C00071C000F1C000E1C001E1C003C1C00381C00781C00F01C +00FFFFE0FFFFE0FFFFE0001C00001C00001C00001C00001C0001FFC001FFC001FFC01319 +7F9816>52 D<3FFE007FFE007FFE00700000700000700000700000700000700000700000 +77F0007FFC007FFE00780F00300700000380000380600380F00380F00380E00700781E00 +3FFC001FF80007E00011197E9816>I<00F80003FC0007FE000F07001C0F00380F007806 +00700000700000E7F800EFFC00FFFE00F80F00F00700F00380E00380E003807003807003 +807007803807003C1E001FFC000FF80003E00011197E9816>I<07F0001FFC003FFE007C +1F00F00780E00380E00380E003807007007C1F001FFC0007F0001FFC003C1E00700700F0 +0780E00380E00380E00380F007807007007C1F003FFE001FFC0007F00011197E9816>56 +D<03E0000FF8001FFC003C1E00700E00700700E00700E00780E00380E00380E007807007 +80780F803FFF801FFB800FF380000700000700300700780E00781C00707C003FF8001FE0 +000F800011197E9816>I<3078FCFC78300000000000003078FCFC78300612789116>I<00 +F80003FC0007FE000F07001C3B8038FF8079FF8073C7C07383C0E701C0E701C0E701C0E7 +01C0E701C0E701C0E701C073838073C78079FF0038FE001C38000F03C007FFC003FF0000 +FC0012197E9816>64 D<7FF800FFFE007FFF001C0F001C07801C03C01C01C01C01C01C01 +E01C00E01C00E01C00E01C00E01C00E01C00E01C00E01C00E01C01C01C01C01C03C01C07 +801C0F807FFF00FFFE007FF8001319809816>68 D<1FE0003FF0007FF800783C00300E00 +000E00003E0007FE001FFE007FCE00780E00E00E00E00E00E00E00783E007FFFE03FF7E0 +0FC3E013127E9116>97 D<FC0000FC0000FC00001C00001C00001C00001C00001C7C001D +FE001FFF001F07801E03C01C01C01C00E01C00E01C00E01C00E01C00E01C00E01E01C01E +03C01F07801FFF001DFE000CF80013197F9816>I<03F80FFC1FFE3C1E780C7000E000E0 +00E000E000E000F000700778073E0E1FFC0FF803F010127D9116>I<003F00003F00003F +0000070000070000070000070003E7000FF7001FFF003C1F00780F00700700E00700E007 +00E00700E00700E00700E00700700F00780F003C1F001FFFE00FF7E007C7E013197F9816 +>I<03F0000FFC001FFE003C0F00780700700380E00380FFFF80FFFF80FFFF80E00000E0 +00007003807803803E07801FFF0007FE0001F80011127E9116>I<001E00007F0001FF80 +01C7800383000380000380007FFF00FFFF00FFFF00038000038000038000038000038000 +0380000380000380000380000380000380000380007FFC00FFFE007FFC0011197F9816> +I<FC0000FC0000FC00001C00001C00001C00001C00001CF8001DFC001FFE001F0F001E07 +001C07001C07001C07001C07001C07001C07001C07001C07001C07001C0700FF8FE0FF9F +E0FF8FE013197F9816>104 D<07000F800F800F800700000000000000FF80FF80FF8003 +8003800380038003800380038003800380038003800380FFFCFFFEFFFC0F1A7C9916>I< +7FC000FFC0007FC00001C00001C00001C00001C00001C00001C00001C00001C00001C000 +01C00001C00001C00001C00001C00001C00001C00001C00001C00001C0007FFF00FFFF80 +7FFF0011197E9816>108 D<03E0000FF8001FFC003C1E00780F00700700E00380E00380 +E00380E00380E00380F00780700700780F003C1E001FFC000FF80003E00011127E9116> +111 D<FC7C00FDFE00FFFF001F07801E03C01C01C01C00E01C00E01C00E01C00E01C00E0 +1C00E01E01C01E03C01F07801FFF001DFE001CF8001C00001C00001C00001C00001C0000 +1C0000FF8000FF8000FF8000131B7F9116>I<7F0F80FF3FC07F7FE007F1E007C0C00780 +000780000700000700000700000700000700000700000700000700007FFC00FFFC007FFC +0013127F9116>114 D<0FEC3FFC7FFCF03CE01CE01C70007F801FF007F8003C600EE00E +F00EF81EFFFCFFF8C7E00F127D9116>I<0300000700000700000700000700007FFF00FF +FF00FFFF0007000007000007000007000007000007000007000007010007038007038007 +038007870003FE0001FC0000F80011177F9616>I<FC3F00FC3F00FC3F001C07001C0700 +1C07001C07001C07001C07001C07001C07001C07001C07001C07001C1F001FFFE00FFFE0 +07E7E013127F9116>I E /Fu 34 125 df<038007800F800F001E003C0038007000E000 +4000090A77A218>19 D<FFF8FFF8FFF80D03808B10>45 D<000FE010003FF83000F80E70 +01E0077003C001F0078001F00F0000F01E0000F03E0000703C0000707C0000707C000030 +7800003078000030F8000000F8000000F8000000F8000000F8000000F8000000F8000000 +F800000078000000780000307C0000307C0000303C0000303E0000601E0000600F0000C0 +078000C003C0018001E0030000FC0E00003FFC00000FE0001C247DA223>67 +D<FFFFF800FFFFFF0007C00F8007C003C007C001E007C000F007C0007807C0007C07C000 +3C07C0003E07C0001E07C0001E07C0001E07C0001F07C0001F07C0001F07C0001F07C000 +1F07C0001F07C0001F07C0001F07C0001F07C0001E07C0001E07C0003E07C0003C07C000 +3C07C0007807C000F007C001F007C003E007C00F80FFFFFF00FFFFF80020227FA125>I< +FFFFFFE0FFFFFFE007C007E007C001E007C000E007C0006007C0007007C0007007C00030 +07C0003007C0183007C0183007C0180007C0180007C0380007C0780007FFF80007FFF800 +07C0780007C0380007C0180007C0180007C0180007C0180007C0000007C0000007C00000 +07C0000007C0000007C0000007C0000007C00000FFFF0000FFFF00001C227FA120>70 +D<FFFE1FFFC0FFFE1FFFC007C000F80007C000F80007C000F80007C000F80007C000F800 +07C000F80007C000F80007C000F80007C000F80007C000F80007C000F80007C000F80007 +C000F80007FFFFF80007FFFFF80007C000F80007C000F80007C000F80007C000F80007C0 +00F80007C000F80007C000F80007C000F80007C000F80007C000F80007C000F80007C000 +F80007C000F80007C000F80007C000F800FFFE1FFFC0FFFE1FFFC022227FA125>72 +D<FFFEFFFE07C007C007C007C007C007C007C007C007C007C007C007C007C007C007C007 +C007C007C007C007C007C007C007C007C007C007C007C007C007C007C0FFFEFFFE0F227F +A112>I<FFFE0000FFFE00000F8000000F8000000F8000000F8000000F8000000F800000 +0F8000000F8000000F8000000F8000000F8000000F8000000F8000000F8000000F800000 +0F8000000F8000000F8000000F8000000F8001800F8001800F8001800F8001800F800380 +0F8003800F8003000F8007000F8007000F800F000F803F00FFFFFF00FFFFFF0019227EA1 +1E>76 D<FFFFF800FFFFFE0007C01F8007C007C007C003C007C001E007C001E007C001F0 +07C001F007C001F007C001F007C001F007C001E007C001E007C003C007C0078007C01F00 +07FFFC0007C0000007C0000007C0000007C0000007C0000007C0000007C0000007C00000 +07C0000007C0000007C0000007C0000007C0000007C00000FFFE0000FFFE00001C227FA1 +21>80 D<FFFFF00000FFFFFE000007C01F000007C007800007C003C00007C003E00007C0 +01F00007C001F00007C001F00007C001F00007C001F00007C001E00007C003E00007C003 +C00007C007800007C01E000007FFF0000007C03C000007C01E000007C00F000007C00F80 +0007C007C00007C007C00007C007C00007C007C00007C007C00007C007C00007C007C000 +07C007C00007C007C0C007C007C0C007C003C0C0FFFE01E180FFFE00F1000000003E0022 +237FA124>82 D<FFFE03FFC0FFFE03FFC007C0003C0007C000180007C000180007C00018 +0007C000180007C000180007C000180007C000180007C000180007C000180007C0001800 +07C000180007C000180007C000180007C000180007C000180007C000180007C000180007 +C000180007C000180007C000180007C000180007C000180007C000180003C000300003E0 +00300001E000300001E000600000F000C0000078018000003E070000000FFE00000003F8 +000022237FA125>85 D<FFF83FFE07FEFFF83FFE07FE1F8003F001F80F8003E000600F80 +03F000600FC003F000E007C003F000C007C003F000C007E006F800C003E006F8018003E0 +06F8018003E00C7C018001F00C7C030001F00C7C030001F01C7E030001F8183E070000F8 +183E060000F8183E060000FC301F0600007C301F0C00007C301F0C00007C600F8C00003E +600F9800003E600F9800003EE00FD800003FC007F800001FC007F000001FC007F000001F +8003F000000F8003E000000F8003E000000F0001E00000070001C00000070001C0000007 +0001C0002F237FA132>87 D<1FF000383C007C0E007C0F007C0780380780000780000780 +00FF8007C7801E07803C0780780780700780F00798F00798F00798F00F987817983C23F0 +0FC1E015157E9418>97 D<0F0000FF0000FF00001F00000F00000F00000F00000F00000F +00000F00000F00000F00000F00000F00000F3F000F61C00F80600F00300F00380F003C0F +001C0F001E0F001E0F001E0F001E0F001E0F001E0F001E0F001C0F003C0F00380F00700F +80600E61C00C3F0017237FA21B>I<01FE000707000C0F801C0F80380F80780700700000 +F00000F00000F00000F00000F00000F00000F000007000007800C03800C01C01800C0300 +07060001F80012157E9416>I<0001E0001FE0001FE00003E00001E00001E00001E00001 +E00001E00001E00001E00001E00001E00001E001F9E00707E00C03E01C01E03801E07801 +E07001E0F001E0F001E0F001E0F001E0F001E0F001E0F001E07001E07801E03801E01801 +E00C03F0070DFE01F1FE17237EA21B>I<01FC000707000C03801C01C03801C07801E070 +00E0F000E0FFFFE0F00000F00000F00000F00000F000007000007800603800601C00C00E +018007070000FC0013157F9416>I<003E0000E18003C3C00387C00787C00F03800F0000 +0F00000F00000F00000F00000F00000F00000F0000FFF800FFF8000F00000F00000F0000 +0F00000F00000F00000F00000F00000F00000F00000F00000F00000F00000F00000F0000 +0F00000F0000FFF000FFF000122380A20F>I<0000F003F1180E1E381C0E383807303807 +007807807807807807807807803807003807001C0E001E1C0033F0002000002000003000 +003800003FFE001FFFC00FFFE03801F0700070E00038E00038E00038E000386000307000 +703800E00E038003FE0015217F9518>I<0F0000FF0000FF00001F00000F00000F00000F +00000F00000F00000F00000F00000F00000F00000F00000F0F800F31C00F40E00F80F00F +80F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F +00F00F00F00F00F0FFF3FFFFF3FF18237FA21B>I<0E001F001F001F000E000000000000 +00000000000000000000000F007F007F001F000F000F000F000F000F000F000F000F000F +000F000F000F000F000F000F00FFE0FFE00B2280A10D>I<0F00FF00FF001F000F000F00 +0F000F000F000F000F000F000F000F000F000F000F000F000F000F000F000F000F000F00 +0F000F000F000F000F000F000F000F000F00FFF0FFF00C2380A20D>108 +D<0F0FC07E00FF30E18700FF407203801F807C03C00F807C03C00F007803C00F007803C0 +0F007803C00F007803C00F007803C00F007803C00F007803C00F007803C00F007803C00F +007803C00F007803C00F007803C00F007803C00F007803C0FFF3FF9FFCFFF3FF9FFC2615 +7F9429>I<0F0F80FF31C0FF40E01F80F00F80F00F00F00F00F00F00F00F00F00F00F00F +00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F0FFF3FFFFF3FF18157F94 +1B>I<01FC000707000C01801800C03800E0700070700070F00078F00078F00078F00078 +F00078F00078F000787000707800F03800E01C01C00E038007070001FC0015157F9418> +I<0F3F00FF61C0FF80600F00700F00380F003C0F003C0F001E0F001E0F001E0F001E0F00 +1E0F001E0F001E0F003C0F003C0F00380F00700F80E00F61C00F3F000F00000F00000F00 +000F00000F00000F00000F00000F0000FFF000FFF000171F7F941B>I<01F860070CE00E +02E01C03E03801E07801E07801E0F001E0F001E0F001E0F001E0F001E0F001E0F001E078 +01E07801E03801E01C03E00C03E0070DE001F1E00001E00001E00001E00001E00001E000 +01E00001E00001E0001FFE001FFE171F7E941A>I<0F1E00FF2300FF47801F87800F8300 +0F80000F00000F00000F00000F00000F00000F00000F00000F00000F00000F00000F0000 +0F00000F0000FFF800FFF8001115809413>I<0FC8307860386018E018E018F000FC007F +C03FE01FF007F8007CC03CC01CC01CE01CE018F038D8708FC00E157E9413>I<06000600 +06000600060006000E000E000E001E003FFCFFFC1E001E001E001E001E001E001E001E00 +1E001E001E0C1E0C1E0C1E0C1E0C1E0C0F18071001E00E1F7F9E13>I<0F00F0FF0FF0FF +0FF01F01F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F +00F00F00F00F01F00F01F00702F80386FF00F8FF18157F941B>I<FFC1FEFFC1FE1F00F8 +0F00600F00600780C00780C00780C003C18003C18003E38001E30001E30000F60000F600 +00F600007C00007C00007C00003800003800003000003000007000006000F86000F8C000 +F8C000F980006300003E0000171F7F941A>121 D<3FFFC03C0780380F80300F00701E00 +603E00603C0060780000F80000F00001E00003C00007C0C00780C00F00C01F01C01E0180 +3C01807C0380780780FFFF8012157F9416>I<FFFFFFFFFFFF3001808C31>124 +D E /Fv 21 118 df<78FCFCFCFC7806067A8512>46 D<007F800001FFE0000781F8000E +007C0018003E0030001F0030000F8060000FC0600007C0F80007C0FC0007E0FE0007E0FE +0003E0FE0003E0FE0003E07C0007E0000007E0000007C0000007C000000FC000000F8000 +000F8000001F0000003E0000003C00000078000000F8000000F0000001E0000003C00000 +070000000E0000001C000000180000003000000060000000C00060018000600380006007 +0000C00E0000C00C0000C0180001C03FFFFFC07FFFFF80FFFFFF80FFFFFF801B2F7DAE21 +>50 D<00001C0000001C0000003C0000003C0000007C000000FC000000FC000001BC0000 +03BC0000033C0000073C0000063C00000C3C00001C3C0000183C0000303C0000303C0000 +603C0000E03C0000C03C0001803C0003803C0003003C0007003C0006003C000C003C001C +003C0018003C0030003C0030003C0060003C00E0003C00FFFFFFF8FFFFFFF800003C0000 +003C0000003C0000003C0000003C0000003C0000003C0000003C0000003C0000003C0000 +007E00000FFFF0000FFFF01D2F7EAE21>52 D<FFFFC00000FFFFC0000007F000000003E0 +00000003E000000003E000000003E000000003E000000003E000000003E000000003E000 +000003E000000003E000000003E000000003E000000003E000000003E000000003E00000 +0003E000000003E000000003E000000003E000000003E000000003E000000003E0000000 +03E000000003E000000003E000000003E000000003E000000003E000000003E000006003 +E000006003E000006003E000006003E00000C003E00000C003E00000C003E00000C003E0 +0001C003E00001C003E00003C003E00003C003E00007C003E0000F8003E0003F8007E000 +FF80FFFFFFFF80FFFFFFFF8023317DB029>76 D<FFF00000007FF8FFF8000000FFF807F8 +000000FF0003F8000000FE00037C000001BE00037C000001BE00037C000001BE00033E00 +00033E00033E0000033E00033E0000033E00031F0000063E00031F0000063E00031F0000 +063E00030F80000C3E00030F80000C3E00030F80000C3E000307C000183E000307C00018 +3E000307C000183E000303E000303E000303E000303E000303E000303E000301F000603E +000301F000603E000301F000C03E000300F800C03E000300F800C03E0003007C01803E00 +03007C01803E0003007C01803E0003003E03003E0003003E03003E0003003E03003E0003 +001F06003E0003001F06003E0003001F06003E0003000F8C003E0003000F8C003E000300 +0F8C003E00030007D8003E00030007D8003E00030007D8003E00030003F0003E00030003 +F0003E00030003F0003E00078001E0003E000FC001E0007F00FFFC01E00FFFF8FFFC00C0 +0FFFF835317CB03D>I<FFFFFFE000FFFFFFFC0007E0007F0003E0000F8003E00007C003 +E00003E003E00001F003E00001F803E00000F803E00000F803E00000FC03E00000FC03E0 +0000FC03E00000FC03E00000FC03E00000FC03E00000F803E00000F803E00001F803E000 +01F003E00003E003E00007C003E0000F8003E0007F0003FFFFFC0003FFFFE00003E00000 +0003E000000003E000000003E000000003E000000003E000000003E000000003E0000000 +03E000000003E000000003E000000003E000000003E000000003E000000003E000000003 +E000000003E000000003E000000003E000000003E000000007F0000000FFFF800000FFFF +80000026317DB02D>80 D<FFFFFF000000FFFFFFF0000007E001FC000003E0003F000003 +E0000F800003E00007C00003E00003E00003E00003F00003E00003F00003E00001F00003 +E00001F80003E00001F80003E00001F80003E00001F80003E00001F80003E00001F00003 +E00003F00003E00003F00003E00003E00003E00007C00003E0000F800003E0003F000003 +E001FC000003FFFFF0000003FFFFC0000003E001F0000003E0007C000003E0003E000003 +E0001F000003E0000F000003E0000F800003E00007800003E00007C00003E00007C00003 +E00007C00003E00007C00003E00007C00003E00007E00003E00007E00003E00007E00003 +E00007E00003E00007E00003E00007E01803E00007F01803E00003F01803E00003F01807 +F00001F830FFFF8000F870FFFF80007FE0000000000F802D327CB031>82 +D<03FE00000FFFC0001E03E0003F00F0003F0078003F003C001E001C000C001E0000001E +0000001E0000001E0000001E000001FE00003FFE0001FF1E0007F01E000F801E001F001E +003E001E007C001E007C001E00F8001E0CF8001E0CF8001E0CF8003E0CF8003E0C7C007E +0C3E00DF1C1F038FB80FFF07F003F803C01E1F7D9E21>97 D<001FF00000FFFC0001F01E +0007C03F000F003F000F003F001E001E003C000C003C0000007C00000078000000F80000 +00F8000000F8000000F8000000F8000000F8000000F8000000F8000000F80000007C0000 +007C0000003C0000003E0001801E0001800F0003000F80070007C00E0001F81C0000FFF0 +00001FC000191F7E9E1D>99 D<003F800000FFE00003E0F80007803C000F001E001E001E +001E000F003C000F007C000F007C000F8078000780F8000780FFFFFF80FFFFFF80F80000 +00F8000000F8000000F8000000F8000000F8000000780000007C0000003C0000003C0001 +801E0001800F0003000F80060007C00E0001F0380000FFF000001FC000191F7E9E1D> +101 D<0003F0000FF8003C3C00787E00F07E01E07E01E03C01C01803C00003C00003C000 +03C00003C00003C00003C00003C00003C00003C00003C000FFFFC0FFFFC003C00003C000 +03C00003C00003C00003C00003C00003C00003C00003C00003C00003C00003C00003C000 +03C00003C00003C00003C00003C00003C00003C00003C00003C00003C00003C00003C000 +07E0007FFF007FFF0017327FB114>I<000000F0007F03F801FFCF1C03C1FC3C0780F83C +0F0078181F007C001E003C003E003E003E003E003E003E003E003E003E003E003E003E00 +3E003E001E003C001F007C000F0078000780F0000FC1E0000DFFC0001C7F000018000000 +180000001C0000001C0000001E0000000FFFF8000FFFFF0007FFFF800FFFFFC01E0007E0 +380001F07000007070000078E0000038E0000038E0000038E0000038E000003870000070 +780000F03C0001E01E0003C007C01F0001FFFC00003FE0001E2F7E9F21>I<0780000000 +FF80000000FF800000000F80000000078000000007800000000780000000078000000007 +800000000780000000078000000007800000000780000000078000000007800000000780 +0000000780000000078000000007800000000781FE00000787FF8000078E07C000079803 +E00007B001E00007E000F00007C000F00007C000F00007C000F000078000F000078000F0 +00078000F000078000F000078000F000078000F000078000F000078000F000078000F000 +078000F000078000F000078000F000078000F000078000F000078000F000078000F00007 +8000F000078000F000078000F0000FC001F800FFFC1FFF80FFFC1FFF8021327EB125>I< +0F001F801F801F801F800F00000000000000000000000000000000000000000000000780 +7F807F800F80078007800780078007800780078007800780078007800780078007800780 +0780078007800780078007800780078007800FC0FFF8FFF80D307EAF12>I<0780FF80FF +800F80078007800780078007800780078007800780078007800780078007800780078007 +800780078007800780078007800780078007800780078007800780078007800780078007 +80078007800780078007800780078007800FC0FFFCFFFC0E327EB112>108 +D<0781FE003FC000FF87FF80FFF000FF8E07C1C0F8000F9803E3007C0007B001E6003C00 +07E000FC001E0007C000F8001E0007C000F8001E0007C000F8001E00078000F0001E0007 +8000F0001E00078000F0001E00078000F0001E00078000F0001E00078000F0001E000780 +00F0001E00078000F0001E00078000F0001E00078000F0001E00078000F0001E00078000 +F0001E00078000F0001E00078000F0001E00078000F0001E00078000F0001E00078000F0 +001E00078000F0001E00078000F0001E000FC001F8003F00FFFC1FFF83FFF0FFFC1FFF83 +FFF0341F7E9E38>I<0781FE0000FF87FF8000FF8E07C0000F9803E00007B001E00007E0 +00F00007C000F00007C000F00007C000F000078000F000078000F000078000F000078000 +F000078000F000078000F000078000F000078000F000078000F000078000F000078000F0 +00078000F000078000F000078000F000078000F000078000F000078000F000078000F000 +078000F0000FC001F800FFFC1FFF80FFFC1FFF80211F7E9E25>I<001FC00000FFF80001 +E03C0007800F000F0007801E0003C01E0003C03C0001E03C0001E0780000F0780000F078 +0000F0F80000F8F80000F8F80000F8F80000F8F80000F8F80000F8F80000F8F80000F878 +0000F07C0001F03C0001E03C0001E01E0003C01E0003C00F00078007C01F0001F07C0000 +FFF800001FC0001D1F7E9E21>I<0783E0FF8FF8FF9C7C0FB87C07F07C07E03807E00007 +C00007C00007C00007800007800007800007800007800007800007800007800007800007 +80000780000780000780000780000780000780000780000780000FC000FFFE00FFFE0016 +1F7E9E19>114 D<00C00000C00000C00000C00000C00001C00001C00001C00003C00003 +C00007C0000FC0001FC000FFFFE0FFFFE003C00003C00003C00003C00003C00003C00003 +C00003C00003C00003C00003C00003C00003C00003C00003C00003C00003C03003C03003 +C03003C03003C03003C03003C03003C03001E06001E06000F0C0007F80001F00142C7FAB +19>116 D<078000F000FF801FF000FF801FF0000F8001F000078000F000078000F00007 +8000F000078000F000078000F000078000F000078000F000078000F000078000F0000780 +00F000078000F000078000F000078000F000078000F000078000F000078000F000078000 +F000078000F000078000F000078001F000078001F000078003F000038007F00003C00EF0 +0001F03CF80000FFF0FF80003FC0FF80211F7E9E25>I E end +%%EndProlog +%%BeginSetup +%%Feature: *Resolution 300dpi +TeXDict begin + +%%EndSetup +%%Page: 1 1 +1 0 bop 108 381 a Fv(Reference)22 b(Man)n(ual)f(of)g(the)h(Programming) +f(Language)g(Lua)g(2.4)99 508 y Fu(Rob)q(erto)c(Ierusalimsc)o(h)o(y)49 +b(Luiz)17 b(Henrique)e(de)h(Figueiredo)50 b(W)l(aldemar)17 +b(Celes)g(Filho)563 587 y Ft(roberto,lhf,celes)o(@icad)o(.puc-)o(rio.b) +o(r)359 694 y Fs(T)l(eC)431 709 y(Graf)534 694 y Fu(|)g(Departamen)o +(to)f(de)g(Inform\023)-24 b(atica)17 b(|)f(PUC-Rio)661 +790 y Ft(Date:)21 b(1996/04/29)f(18:50:08)842 957 y Fr(Abstract)72 +1033 y Fq(Lua)13 b(is)h(an)f(extension)i(programmi)o(ng)c(language)h +(designed)j(to)e(b)q(e)i(used)f(as)g(a)f(con\014guration)g(language)g +(for)72 1083 y(an)o(y)18 b(program)e(that)i(needs)h(one.)30 +b(This)18 b(do)q(cumen)o(t)f(describ)q(es)j(V)m(ersion)e(2.4)f(of)g +(the)i(Lua)e(programming)72 1132 y(language)e(and)g(the)h(API)g(that)g +(allo)o(ws)e(in)o(teraction)i(b)q(et)o(w)o(een)h(Lua)e(programs)f(and)i +(its)f(host)h(C)g(program.)72 1182 y(It)e(also)f(presen)o(ts)j(some)d +(examples)g(of)g(using)h(the)h(main)c(features)k(of)f(the)g(system.)881 +1397 y Fr(Sum\023)-24 b(ario)72 1465 y Fq(Lua)15 b(\023)-20 +b(e)18 b(uma)d(linguagem)f(de)j(extens~)-21 b(ao)18 b(pro)r(jetada)f +(para)f(ser)i(usada)f(como)e(linguagem)g(de)i(con\014gura\030)-18 +b(c~)d(ao)72 1515 y(em)12 b(qualquer)g(programa)e(que)j(precise)h(de)f +(uma.)j(Este)e(do)q(cumen)o(to)d(descrev)o(e)k(a)d(v)o(ers~)-21 +b(ao)13 b(2.4)e(da)h(linguagem)72 1565 y(de)18 b(programa\030)-18 +b(c~)d(ao)16 b(Lua)i(e)g(a)g(In)o(terface)h(de)f(Programa\030)-18 +b(c~)d(ao)16 b(que)i(p)q(ermite)g(a)f(in)o(tera\030)-18 +b(c~)d(ao)18 b(en)o(tre)h(programas)72 1614 y(Lua)c(e)g(o)g(programa)e +(C)h(hosp)q(edeiro.)22 b(O)15 b(do)q(cumen)o(to)g(tam)o(b)o(\023)-20 +b(em)12 b(apresen)o(ta)k(alguns)e(exemplos)g(de)i(uso)f(das)72 +1664 y(principais)f(caracter)-5 b(\023)-16 b(\020sticas)15 +b(do)f(sistema.)-42 1807 y Fp(1)67 b(In)n(tro)r(duction)-42 +1909 y Fo(Lua)18 b(is)f(an)g(extension)g(programmi)o(ng)d(language)j +(designed)g(to)g(supp)q(ort)g(general)g(pro)q(cedural)g(programming)-42 +1965 y(features)f(with)g(data)g(description)f(facilities.)22 +b(It)16 b(is)g(supp)q(osed)h(to)f(b)q(e)g(used)h(as)f(a)g +(con\014guration)g(language)f(for)-42 2022 y(an)o(y)j(program)d(that)i +(needs)i(one.)27 b(Lua)18 b(has)f(b)q(een)i(designed)f(and)g(implemen)o +(ted)d(b)o(y)j(W.)f(Celes)g(F.,)g(L.)h(H.)f(de)-42 2078 +y(Figueiredo)e(and)g(R.)g(Ierusalimsc)o(h)o(y)l(.)29 +2135 y(Lua)d(is)f(implemen)o(ted)f(as)h(a)g(library)l(,)g(written)g(in) +h(C.)f(Being)g(an)h(extension)g(language,)f(Lua)h(has)f(no)h(notion)f +(of)-42 2191 y(a)h(\\main")d(program:)16 b(it)10 b(only)h(w)o(orks)g +Fn(emb)n(e)n(dde)n(d)f Fo(in)i(a)f(host)g(clien)o(t,)g(called)g(the)g +Fn(emb)n(e)n(dding)f Fo(program.)17 b(This)11 b(host)-42 +2248 y(program)i(can)j(in)o(v)o(ok)o(e)e(functions)h(to)f(execute)i(a)f +(piece)g(of)g(co)q(de)g(in)g(Lua,)g(can)h(write)e(and)h(read)g(Lua)h(v) +m(ariables,)-42 2304 y(and)f(can)e(register)g(C)h(functions)f(to)h(b)q +(e)g(called)g(b)o(y)f(Lua)h(co)q(de.)20 b(Through)14 +b(the)g(use)g(of)g(C)f(functions,)h(Lua)g(can)g(b)q(e)-42 +2360 y(augmen)o(ted)d(to)h(cop)q(e)g(with)f(rather)h(di\013eren)o(t)f +(domains,)f(th)o(us)i(creating)f(customized)g(programmi)o(ng)e +(languages)-42 2417 y(sharing)15 b(a)g(syn)o(tactical)e(framew)o(ork.) +29 2473 y(Lua)f(is)e(free)i(distribution)e(soft)o(w)o(are,)g(and)h(pro) +o(vided)g(as)g(usual)g(with)g(no)g(guaran)o(tees.)18 +b(The)11 b(implemen)o(tatio)o(n)-42 2530 y(describ)q(ed)17 +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 +(ftp)h(from)30 2623 y Fm(ftp.icad.puc-rio.br:/pub/lu)o(a/lua.t)o(ar.gz) +922 2748 y Fo(1)p eop +%%Page: 2 2 +2 1 bop -42 199 a Fo(or)15 b(b)o(y)g(WWW)g(\(W)l(orld)f(Wide)h(W)l +(eb\))g(from)30 293 y Fm(http://www.inf.puc-rio.br/~)o(roberto)o +(/lua.ht)o(ml)-42 436 y Fp(2)67 b(En)n(vironmen)n(t)25 +b(and)e(Ch)n(unks)-42 538 y Fo(All)10 b(statemen)o(ts)e(in)i(Lua)h(are) +f(executed)h(in)g(a)f Fn(glob)n(al)h(envir)n(onment)p +Fo(.)17 b(This)9 b(en)o(vironmen)o(t,)h(whic)o(h)g(k)o(eeps)h(all)e +(global)-42 594 y(v)m(ariables)14 b(and)g(functions,)f(is)g +(initialized)g(at)g(the)h(b)q(eginning)g(of)f(the)h(em)o(b)q(edding)f +(program)f(and)i(p)q(ersists)f(un)o(til)-42 651 y(its)i(end.)29 +707 y(The)g(global)d(en)o(vironmen)o(t)h(can)h(b)q(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(edding)f(program,)e +(whic)o(h)-42 764 y(can)k(read)f(and)g(write)g(global)e(v)m(ariables)i +(using)g(functions)g(in)g(the)g(library)f(that)h(implemen)o(ts)d(Lua.) +29 820 y(Global)g(v)m(ariables)h(do)h(not)f(need)h(declaration.)k(An)o +(y)c(v)m(ariable)f(is)g(assumed)g(to)g(b)q(e)h(global)e(unless)i +(explicitly)-42 876 y(declared)20 b(lo)q(cal)e(\(see)h(lo)q(cal)f +(declarations,)h(Section)g(4.4.5\).)30 b(Before)19 b(the)g(\014rst)g +(assignmen)o(t,)e(the)j(v)m(alue)f(of)g(a)-42 933 y(global)14 +b(v)m(ariable)h(is)g Fl(nil)p Fo(.)29 989 y(The)g(unit)g(of)g +(execution)h(of)e(Lua)i(is)f(called)f(a)h Fn(chunk)p +Fo(.)20 b(The)15 b(syn)o(tax)g(for)f(c)o(h)o(unks)i(is:)1480 +973 y Fk(1)42 1062 y Fn(chunk)50 b Fj(!)g(f)p Fn(statement)32 +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 +(con)o(tain)h(statemen)o(ts)f(and)i(function)g(de\014nitions,)g(and)g +(ma)o(y)e(b)q(e)j(in)f(a)g(\014le)g(or)f(in)h(a)g(string)f(inside)-42 +1190 y(the)k(host)f(program.)22 b(When)17 b(a)g(c)o(h)o(unk)g(is)f +(executed,)h(\014rst)g(all)e(its)h(functions)g(and)h(statemen)o(ts)e +(are)h(compiled,)-42 1247 y(then)d(the)e(statemen)o(ts)f(are)i +(executed)g(in)g(sequen)o(tial)f(order.)18 b(All)11 b(mo)q +(di\014cations)f(a)i(c)o(h)o(unk)g(e\013ects)f(on)h(the)g(global)-42 +1303 y(en)o(vironmen)o(t)k(p)q(ersist)h(after)f(its)g(end.)27 +b(Those)17 b(include)g(mo)q(di\014cations)f(to)g(global)g(v)m(ariables) +g(and)i(de\014nitions)-42 1359 y(of)d(new)h(functions)285 +1343 y Fk(2)304 1359 y Fo(.)29 1416 y(Ch)o(unks)j(ma)o(y)e(b)q(e)i +(pre-compiled;)g(see)g(program)d Fm(luac)i Fo(for)g(details.)30 +b(Ascii)18 b(\014les)g(with)g(c)o(h)o(unk)h(co)q(de)g(and)-42 +1472 y(their)e(binary)g(pre-compiled)f(forms)f(are)i(in)o(terc)o +(hangeable.)25 b(Lua)17 b(automatically)d(detects)j(the)g(\014le)g(t)o +(yp)q(e)g(and)-42 1529 y(acts)e(accordingly)l(.)-42 1672 +y Fp(3)67 b(T)n(yp)r(es)-42 1773 y Fo(Lua)14 b(is)g(a)f(dynamically)f +(t)o(yp)q(ed)i(language.)k(V)l(ariables)13 b(do)h(not)f(ha)o(v)o(e)g(t) +o(yp)q(es;)h(only)f(v)m(alues)h(do.)19 b(All)13 b(v)m(alues)h(carry)-42 +1830 y(their)h(o)o(wn)g(t)o(yp)q(e.)20 b(Therefore,)15 +b(there)g(are)g(no)g(t)o(yp)q(e)g(de\014nitions)g(in)g(the)g(language.) +29 1886 y(There)20 b(are)f(sev)o(en)h(basic)f(t)o(yp)q(es)h(in)g(Lua:) +29 b Fn(nil)p Fo(,)19 b Fn(numb)n(er)p Fo(,)h Fn(string)p +Fo(,)g Fn(function)p Fo(,)g Fn(CF)m(unction)p Fo(,)e +Fn(user)n(data)p Fo(,)j(and)-42 1943 y Fn(table)p Fo(.)f +Fn(Nil)14 b Fo(is)g(the)g(t)o(yp)q(e)h(of)f(the)h(v)m(alue)g +Fl(nil)p Fo(,)e(whose)h(main)f(prop)q(ert)o(y)h(is)h(to)e(b)q(e)j +(di\013eren)o(t)d(from)g(an)o(y)h(other)h(v)m(alue.)-42 +1999 y Fn(Numb)n(er)h Fo(represen)o(ts)f(real)f(\(\015oating)g(p)q(oin) +o(t\))g(n)o(um)o(b)q(ers,)h(while)f Fn(string)h Fo(has)g(the)g(usual)g +(meaning.)29 2056 y(F)l(unctions)20 b(are)f(considered)i(\014rst-class) +e(v)m(alues)h(in)g(Lua.)34 b(This)19 b(means)g(that)h(functions)f(can)h +(b)q(e)h(stored)-42 2112 y(in)c(v)m(ariables,)g(passed)g(as)g(argumen)o +(ts)f(to)g(other)h(functions)g(and)g(returned)h(as)e(results.)26 +b(When)17 b(a)g(function)g(is)-42 2169 y(de\014ned)g(in)d(Lua,)h(its)f +(b)q(o)q(dy)i(is)e(compiled)f(and)i(stored)g(in)f(a)h(giv)o(en)f(v)m +(ariable.)19 b(Lua)c(can)g(call)f(\(and)h(manipulate\))-42 +2225 y(functions)g(written)g(in)g(Lua)g(and)h(functions)f(written)f(in) +h(C;)f(the)i(latter)e(ha)o(v)o(e)g(t)o(yp)q(e)i Fn(CF)m(unction)s +Fo(.)29 2282 y(The)i(t)o(yp)q(e)f Fn(user)n(data)h Fo(is)g(pro)o(vided) +f(to)g(allo)o(w)f(arbitrary)f(C)j(p)q(oin)o(ters)f(to)g(b)q(e)h(stored) +f(in)g(Lua)h(v)m(ariables.)26 b(It)-42 2338 y(corresp)q(onds)18 +b(to)f Fm(void*)f Fo(and)i(has)f(no)g(pre-de\014ned)j(op)q(erations)c +(in)h(Lua,)h(b)q(esides)g(assignmen)o(t)d(and)j(equalit)o(y)-42 +2394 y(test.)24 b(Ho)o(w)o(ev)o(er,)16 b(b)o(y)g(using)h(fallbac)o(ks,) +e(the)i(programmer)c(ma)o(y)i(de\014ne)j(op)q(erations)e(for)g +Fn(user)n(data)h Fo(v)m(alues;)g(see)-42 2451 y(Section)f(4.7.)p +-42 2482 780 2 v 10 2509 a Fi(1)28 2524 y Fh(As)c(usual,)i +Fg(f)p Ff(a)s Fg(g)f Fh(means)h(0)f(or)g(more)g Ff(a)s +Fh('s,)f([)p Ff(a)s Fh(])f(means)j(an)f(optional)j Ff(a)c +Fh(and)i Fg(f)p Ff(a)s Fg(g)1179 2509 y Fi(+)1217 2524 +y Fh(means)f(one)h(or)f(more)g Ff(a)s Fh('s.)10 2554 +y Fi(2)28 2570 y Fh(Actually)m(,)h(a)f(function)h(de\014nition)i(is)d +(an)h(assignmen)o(t)h(to)d(a)h(global)j(v)n(ariable;)e(see)f(Section)i +(3.)922 2748 y Fo(2)p eop +%%Page: 3 3 +3 2 bop 29 199 a Fo(The)12 b(t)o(yp)q(e)g Fn(table)g +Fo(implemen)o(ts)d(asso)q(ciativ)o(e)i(arra)o(ys,)g(that)g(is,)h(arra)o +(ys)e(whic)o(h)i(can)g(b)q(e)h(indexed)g(not)f(only)f(with)-42 +256 y(n)o(um)o(b)q(ers,)k(but)g(with)g(an)o(y)g(v)m(alue)h(\(except)f +Fl(nil)p Fo(\).)20 b(Therefore,)15 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(represen)o(t)-42 312 y(ordinary)h(arra)o +(ys,)e(but)i(also)f(sym)o(b)q(ol)g(tables,)g(sets,)g(records,)h(etc.)20 +b(T)l(o)15 b(represen)o(t)g(records,)f(Lua)i(uses)f(the)g(\014eld)-42 +369 y(name)k(as)f(an)h(index.)32 b(The)19 b(language)g(supp)q(orts)g +(this)f(represen)o(tation)g(b)o(y)i(pro)o(viding)e Fm(a.name)g +Fo(as)g(syn)o(tactic)-42 425 y(sugar)i(for)f Fm(a["name"])p +Fo(.)33 b(T)l(ables)20 b(ma)o(y)e(also)h(carry)g(metho)q(ds.)34 +b(Because)20 b(functions)g(are)g(\014rst)f(class)h(v)m(alues,)-42 +482 y(table)d(\014elds)g(ma)o(y)e(con)o(tain)g(functions.)25 +b(The)16 b(form)f Fm(t:f\(x\))h Fo(is)g(syn)o(tactic)g(sugar)g(for)g +Fm(t.f\(t,x\))p Fo(,)g(whic)o(h)g(calls)-42 538 y(the)g(metho)q(d)e +Fm(f)h Fo(from)f(the)h(table)g Fm(t)g Fo(passing)f(itself)g(as)h(the)g +(\014rst)g(parameter.)29 594 y(It)d(is)f(imp)q(ortan)o(t)e(to)i(notice) +g(that)g(tables)g(are)g(ob)s(jects,)g(and)h(not)f(v)m(alues.)19 +b(V)l(ariables)10 b(cannot)i(con)o(tain)e(tables,)-42 +651 y(only)15 b(references)g(to)f(them.)19 b(Assignmen)o(t,)12 +b(parameter)h(passing)i(and)f(returns)h(alw)o(a)o(ys)e(manipulate)g +(references)-42 707 y(to)k(tables,)f(and)i(do)f(not)f(imply)g(an)o(y)h +(kind)g(of)f(cop)o(y)l(.)26 b(Moreo)o(v)o(er,)16 b(tables)g(m)o(ust)f +(b)q(e)j(explicitly)e(created)h(b)q(efore)-42 764 y(used;)f(see)f +(Section)g(4.5.7.)-42 907 y Fp(4)67 b(The)23 b(Language)-42 +1008 y Fo(This)15 b(section)g(describ)q(es)h(the)f(lexis,)f(syn)o(tax)h +(and)g(seman)o(tics)e(of)i(Lua.)-42 1130 y Fe(4.1)56 +b(Lexical)19 b(Con)n(v)n(en)n(tions)-42 1216 y Fo(Lua)g(is)e(a)g(case)h +(sensitiv)o(e)f(language.)27 b(Iden)o(ti\014ers)18 b(can)g(b)q(e)g(an)o +(y)f(string)g(of)g(letters,)h(digits,)e(and)i(underscores,)-42 +1272 y(not)d(b)q(eginning)h(with)e(a)h(digit.)k(The)c(follo)o(wing)e(w) +o(ords)i(are)f(reserv)o(ed,)h(and)h(cannot)f(b)q(e)h(used)f(as)g(iden)o +(ti\014ers:)173 1366 y Fm(and)143 b(do)191 b(else)142 +b(elseif)95 b(end)173 1422 y(function)23 b(if)191 b(local)118 +b(nil)167 b(not)173 1478 y(or)g(repeat)95 b(return)f(until)119 +b(then)95 b(while)29 1572 y Fo(The)15 b(follo)o(wing)e(strings)i +(denote)g(other)g(tok)o(ens:)173 1665 y Fm(~=)48 b(<=)f(>=)h(<)71 +b(>)h(==)47 b(=)71 b(..)48 b(+)71 b(-)h(*)f(/)173 1721 +y(\045)h(\()f(\))h({)f(})h([)f(])g(;)h(,)f(.)29 1815 +y Fo(Literal)17 b(strings)f(can)i(b)q(e)g(delimited)e(b)o(y)i(matc)o +(hing)d(single)i(or)g(double)h(quotes,)g(and)f(can)h(con)o(tain)f(the)h +(C-)-42 1871 y(lik)o(e)i(escap)q(e)i(sequences)g Fm('\\n')p +Fo(,)f Fm('\\t')f Fo(and)h Fm('\\r')p Fo(.)36 b(Literal)20 +b(strings)g(can)g(also)g(b)q(e)i(delimited)d(b)o(y)h(matc)o(hing)-42 +1928 y Fm([[)k(...)g(]])p Fo(.)18 b(Literals)12 b(in)h(this)f(last)g +(form)f(ma)o(y)h(run)h(for)f(sev)o(eral)g(lines,)h(ma)o(y)e(con)o(tain) +h(nested)i Fm([[)23 b(...)h(]])p Fo(,)12 b(and)-42 1984 +y(do)k(not)e(in)o(terpret)h(escap)q(e)h(sequences.)29 +2041 y(Commen)o(ts)c(start)h(an)o(ywhere)i(outside)g(a)f(string)g(with) +g(a)g(double)h(h)o(yphen)h(\()p Fm(--)p Fo(\))e(and)h(run)g(un)o(til)f +(the)g(end)i(of)-42 2097 y(the)g(line.)29 2153 y(Numerical)h(constan)o +(ts)g(ma)o(y)f(b)q(e)j(written)e(with)h(an)g(optional)e(decimal)h +(part,)h(and)g(an)g(optional)f(decimal)-42 2210 y(exp)q(onen)o(t.)k +(Examples)14 b(of)g(v)m(alid)h(n)o(umerical)f(constan)o(ts)g(are:)126 +2303 y Fm(4)119 b(4.0)g(0.4)g(4.57e-3)f(0.3e12)-42 2425 +y Fe(4.2)56 b(Co)r(ercion)-42 2511 y Fo(Lua)19 b(pro)o(vides)f(some)f +(automatic)f(con)o(v)o(ersions.)29 b(An)o(y)19 b(arithmetic)d(op)q +(eration)i(applied)g(to)g(a)g(string)f(tries)h(to)-42 +2567 y(con)o(v)o(ert)d(that)f(string)g(to)h(a)f(n)o(um)o(b)q(er,)g +(follo)o(wing)f(the)i(usual)g(rules.)20 b(Con)o(v)o(ersely)l(,)14 +b(whenev)o(er)h(a)g(n)o(um)o(b)q(er)f(is)h(used)-42 2623 +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 +(con)o(v)o(erted)g(to)f(a)h(string,)f(according)h(to)f(the)h(follo)o +(wing)e(rule:)20 b(if)922 2748 y(3)p eop +%%Page: 4 4 +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 +(it)g(is)g(written)g(without)g(exp)q(onen)o(t)h(or)f(decimal)f(p)q(oin) +o(t;)i(otherwise,)f(it)g(is)h(formatted)-42 256 y(follo)o(wing)g(the)j +(\\)p Fm(\045g)p Fo(")e(con)o(v)o(ersion)g(sp)q(eci\014cation)h(of)g +(the)h(standard)e Fm(printf)h Fo(C)g(function.)-42 377 +y Fe(4.3)56 b(Adjustmen)n(t)-42 463 y Fo(F)l(unctions)14 +b(in)g(Lua)h(can)f(return)g(man)o(y)f(v)m(alues.)19 b(Because)c(there)f +(are)g(no)g(t)o(yp)q(e)h(declarations,)d(the)i(system)f(do)q(es)-42 +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 +(will)g(return,)g(or)h(ho)o(w)f(man)o(y)f(parameters)g(it)h(needs.)28 +b(Therefore,)-42 576 y(sometimes,)10 b(a)i(list)g(of)g(v)m(alues)h(m)o +(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 +(giv)o(en)f(length.)18 b(If)13 b(there)g(are)f(more)f(v)m(alues)-42 +633 y(than)17 b(are)f(needed,)i(the)f(last)f(v)m(alues)h(are)f(thro)o +(wn)g(a)o(w)o(a)o(y)l(.)23 b(If)17 b(there)g(are)f(more)g(needs)h(than) +g(v)m(alues,)g(the)f(list)g(is)-42 689 y(extended)j(with)e(as)h(man)o +(y)e Fl(nil)p Fo('s)h(as)g(needed.)29 b(Adjustmen)o(t)17 +b(o)q(ccurs)h(in)f(m)o(ultiple)f(assignmen)o(t)g(and)i(function)-42 +746 y(calls.)-42 867 y Fe(4.4)56 b(Statemen)n(ts)-42 +953 y Fo(Lua)19 b(supp)q(orts)f(an)f(almost)f(con)o(v)o(en)o(tional)g +(set)i(of)f(statemen)o(ts.)26 b(The)18 b(con)o(v)o(en)o(tional)e +(commands)f(include)k(as-)-42 1009 y(signmen)o(t,)d(con)o(trol)f +(structures)i(and)g(pro)q(cedure)h(calls.)24 b(Non-con)o(v)o(en)o +(tional)16 b(commands)e(include)k(table)e(con-)-42 1066 +y(structors,)e(explained)i(in)f(Section)g(4.5.7,)e(and)i(lo)q(cal)g(v)m +(ariable)f(declarations.)-42 1186 y Fl(4.4.1)52 b(Blo)q(c)o(ks)-42 +1272 y Fo(A)15 b(blo)q(c)o(k)f(is)f(a)h(list)f(of)h(statemen)o(ts,)e +(executed)j(sequen)o(tially)l(.)k(An)o(y)14 b(statemen)o(t)e(can)j(b)q +(e)g(optionally)d(follo)o(w)o(ed)h(b)o(y)-42 1328 y(a)i(semicolon.)42 +1388 y Fn(blo)n(ck)49 b Fj(!)h(f)p Fn(stat)16 b(sc)s +Fj(g)g Fo([)p Fn(r)n(et)f(sc)s Fo(])98 1444 y Fn(sc)49 +b Fj(!)h Fo([';'])-42 1512 y(F)l(or)13 b(syn)o(tactic)f(reasons,)g(a)h +(return)g(statemen)o(t)e(can)i(only)g(b)q(e)g(written)f(as)h(the)g +(last)f(statemen)o(t)f(of)h(a)h(blo)q(c)o(k.)19 b(This)-42 +1569 y(restriction)14 b(also)g(a)o(v)o(oids)g(some)g(\\statemen)o(t)f +(not)i(reac)o(hed")g(errors.)-42 1689 y Fl(4.4.2)52 b(Assignmen)o(t)-42 +1775 y Fo(The)18 b(language)e(allo)o(ws)f(m)o(ultiple)g(assignmen)o(t.) +23 b(Therefore,)17 b(the)g(syn)o(tax)g(de\014nes)h(a)f(list)e(of)i(v)m +(ariables)f(on)h(the)-42 1831 y(left)h(side,)g(and)h(a)e(list)g(of)h +(expressions)g(on)g(the)g(righ)o(t)f(side.)29 b(Both)18 +b(lists)f(ha)o(v)o(e)g(their)h(elemen)o(ts)f(separated)h(b)o(y)-42 +1888 y(commas.)116 1947 y Fn(stat)50 b Fj(!)g Fn(varlist1)16 +b Fo('=')g Fn(explist1)42 2003 y(varlist1)50 b Fj(!)g +Fn(var)17 b Fj(f)p Fo(',')d Fn(var)5 b Fj(g)-42 2072 +y Fo(This)15 b(statemen)o(t)d(\014rst)i(ev)m(aluates)g(all)g(v)m(alues) +g(on)h(the)f(righ)o(t)g(side)g(and)h(ev)o(en)o(tual)f(indices)g(on)h +(the)f(left)g(side,)g(and)-42 2128 y(then)i(mak)o(es)e(the)h(assignmen) +o(ts.)j(Therefore,)c(it)h(can)g(b)q(e)h(used)g(to)e(exc)o(hange)i(t)o +(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 +2316 y Fo(Before)f(the)g(assignmen)o(t,)f(the)g(list)f(of)i(v)m(alues)f +(is)g Fn(adjuste)n(d)h Fo(to)f(the)h(length)f(of)g(the)h(list)e(of)h(v) +m(ariables;)j(see)-42 2372 y(Section)16 b(4.3.)42 2444 +y Fn(var)50 b Fj(!)g Fn(name)-42 2516 y Fo(A)16 b(single)e(name)g(can)i +(denote)f(a)g(global)f(or)h(a)g(lo)q(cal)f(v)m(ariable,)g(or)h(a)g +(formal)d(parameter.)42 2589 y Fn(var)50 b Fj(!)g Fn(var)17 +b Fo('[')e Fn(exp1)i Fo(']')922 2748 y(4)p eop +%%Page: 5 5 +5 4 bop -42 199 a Fo(Square)20 b(brac)o(k)o(ets)f(are)h(used)g(to)f +(index)h(a)f(table.)33 b(If)20 b Fm(var)f Fo(results)g(in)g(a)h(table)f +(v)m(alue,)h(the)g(\014eld)g(indexed)h(b)o(y)-42 256 +y(the)c(expression)f(v)m(alue)h(gets)f(the)h(assigned)f(v)m(alue.)24 +b(Otherwise,)16 b(the)h(fallbac)o(k)e Fn(settable)h Fo(is)g(called,)g +(with)f(three)-42 312 y(parameters:)31 b(the)22 b(v)m(alue)f(of)g +Fm(var)p Fo(,)h(the)g(v)m(alue)g(of)f(expression,)h(and)g(the)f(v)m +(alue)h(b)q(eing)g(assigned)f(to)g(it;)i(see)-42 369 +y(Section)16 b(4.7.)42 441 y Fn(var)50 b Fj(!)g Fn(var)17 +b Fo('.')j Fn(name)-42 513 y Fo(The)c(syn)o(tax)e Fm(var.NAME)g +Fo(is)h(just)g(syn)o(tactic)f(sugar)h(for)f Fm(var["NAME"])p +Fo(.)-42 633 y Fl(4.4.3)52 b(Con)o(trol)17 b(Structures)-42 +719 y Fo(The)k(condition)e(expression)h(of)f(a)h(con)o(trol)e +(structure)i(can)g(return)g(an)o(y)g(v)m(alue.)34 b(All)19 +b(v)m(alues)h(di\013eren)o(t)f(from)-42 775 y Fl(nil)f +Fo(are)g(considered)g(true,)h(while)f Fl(nil)f Fo(is)h(considered)h +(false.)28 b Fm(if)p Fo('s,)18 b Fm(while)p Fo('s)f(and)h +Fm(repeat)p Fo('s)f(ha)o(v)o(e)h(the)h(usual)-42 832 +y(meaning.)70 900 y Fn(stat)50 b Fj(!)g Fl(while)15 b +Fn(exp1)i Fl(do)f Fn(blo)n(ck)g Fl(end)245 956 y Fj(j)32 +b Fl(rep)q(eat)17 b Fn(blo)n(ck)f Fl(un)o(til)f Fn(exp1)245 +1013 y Fj(j)32 b Fl(if)16 b Fn(exp1)h Fl(then)g Fn(blo)n(ck)e +Fj(f)p Fn(elseif)8 b Fj(g)16 b Fo([)p Fl(else)f Fn(blo)n(ck)5 +b Fo(])15 b Fl(end)42 1069 y Fn(elseif)49 b Fj(!)h Fl(elseif)15 +b Fn(exp1)i Fl(then)f Fn(blo)n(ck)29 1162 y Fo(A)g Fm(return)g +Fo(is)g(used)g(to)g(return)g(v)m(alues)h(from)d(a)i(function.)23 +b(Because)17 b(a)f(function)g(ma)o(y)f(return)h(more)f(than)-42 +1219 y(one)h(v)m(alue,)f(the)g(syn)o(tax)g(for)f(a)h(return)g(statemen) +o(t)e(is:)42 1291 y Fn(r)n(et)50 b Fj(!)g Fl(return)16 +b Fn(explist)-42 1483 y Fl(4.4.4)52 b(F)l(unction)18 +b(Calls)e(as)h(Statemen)o(ts)-42 1569 y Fo(Because)f(of)f(p)q(ossible)g +(side-e\013ects,)g(function)g(calls)f(can)h(b)q(e)h(executed)g(as)f +(statemen)o(ts.)42 1641 y Fn(stat)50 b Fj(!)g Fn(functionc)n(al)r(l)-42 +1713 y Fo(Ev)o(en)o(tual)15 b(returned)g(v)m(alues)h(are)f(thro)o(wn)f +(a)o(w)o(a)o(y)l(.)19 b(F)l(unction)c(calls)f(are)h(explained)g(in)g +(Section)g(4.5.8.)-42 1833 y Fl(4.4.5)52 b(Lo)q(cal)19 +b(Declarations)-42 1919 y Fo(Lo)q(cal)e(v)m(ariables)e(can)h(b)q(e)h +(declared)f(an)o(ywhere)g(inside)g(a)g(blo)q(c)o(k.)22 +b(Their)16 b(scop)q(e)h(b)q(egins)f(after)f(the)i(declaration)-42 +1975 y(and)f(lasts)e(un)o(til)g(the)i(end)f(of)g(the)g(blo)q(c)o(k.)20 +b(The)15 b(declaration)f(ma)o(y)g(include)i(an)f(initial)e(assignmen)o +(t:)92 2044 y Fn(stat)50 b Fj(!)g Fl(lo)q(cal)17 b Fn(de)n(clist)e +Fo([)p Fn(init)t Fo(])42 2100 y Fn(de)n(clist)49 b Fj(!)h +Fn(name)16 b Fj(f)p Fo(',')f Fn(name)s Fj(g)96 2157 y +Fn(init)49 b Fj(!)h Fo('=')16 b Fn(explist1)-42 2225 +y Fo(If)f(there)f(is)f(an)h(initial)e(assignmen)o(t,)g(it)h(has)h(the)g +(same)f(seman)o(tics)f(of)h(a)h(m)o(ultiple)e(assignmen)o(t.)17 +b(Otherwise,)d(all)-42 2281 y(v)m(ariables)h(are)g(initialized)e(with)i +Fl(nil)p Fo(.)-42 2403 y Fe(4.5)56 b(Expressions)-42 +2489 y Fl(4.5.1)c(Simple)15 b(Expressions)-42 2575 y +Fo(Simple)f(expressions)h(are:)922 2748 y(5)p eop +%%Page: 6 6 +6 5 bop 42 193 a Fn(exp)50 b Fj(!)g Fo('\(')16 b Fn(exp)g +Fo('\)')42 250 y Fn(exp)50 b Fj(!)g Fl(nil)42 306 y Fn(exp)g +Fj(!)g Fo('n)o(um)o(b)q(er')42 362 y Fn(exp)g Fj(!)g +Fo('literal')42 419 y Fn(exp)g Fj(!)g Fn(var)-42 490 +y Fo(Num)o(b)q(ers)22 b(\(n)o(umerical)f(constan)o(ts\))g(and)i(string) +f(literals)f(are)h(explained)h(in)f(Section)h(4.1.)41 +b(V)l(ariables)22 b(are)-42 546 y(explained)16 b(in)f(Section)g(4.4.2.) +-42 665 y Fl(4.5.2)52 b(Arithmetic)15 b(Op)q(erators)-42 +751 y Fo(Lua)21 b(supp)q(orts)g(the)g(usual)f(arithmetic)e(op)q +(erators.)35 b(These)21 b(op)q(erators)f(are)g(the)g(binary)h +Fm(+)p Fo(,)g Fm(-)p Fo(,)g Fm(*)p Fo(,)h Fm(/)e Fo(and)h +Fm(^)-42 808 y Fo(\(exp)q(onen)o(tiation\),)15 b(and)h(the)g(unary)g +Fm(-)p Fo(.)22 b(If)16 b(the)g(op)q(erands)g(are)g(n)o(um)o(b)q(ers,)f +(or)g(strings)g(that)g(can)h(b)q(e)h(con)o(v)o(erted)-42 +864 y(to)d(n)o(um)o(b)q(ers,)g(according)g(to)g(the)g(rules)g(giv)o(en) +g(in)h(Section)f(4.2,)f(all)h(op)q(erations)f(but)i(exp)q(onen)o +(tiation)e(ha)o(v)o(e)h(the)-42 920 y(usual)f(meaning.)18 +b(Otherwise,)13 b(the)g(fallbac)o(k)f(\\arith")g(is)g(called;)h(see)g +(Section)g(4.7.)19 b(An)13 b(exp)q(onen)o(tiation)f(alw)o(a)o(ys)-42 +977 y(calls)k(this)f(fallbac)o(k.)22 b(The)16 b(standard)g +(mathematical)c(library)j(rede\014nes)j(this)d(fallbac)o(k,)g(giving)g +(the)h(exp)q(ected)-42 1033 y(meaning)e(to)h(exp)q(onen)o(tiation;)f +(see)h(Section)g(6.3.)-42 1152 y Fl(4.5.3)52 b(Relational)18 +b(Op)q(erators)-42 1238 y Fo(Lua)e(o\013ers)e(the)i(follo)o(wing)d +(relational)g(op)q(erators:)126 1327 y Fm(<)71 b(>)g(<=)48 +b(>=)f(~=)h(==)-42 1415 y Fo(All)15 b(return)g Fl(nil)f +Fo(as)h(false)g(and)g(a)g(v)m(alue)g(di\013eren)o(t)g(from)e +Fl(nil)h Fo(\(actually)g(the)h(n)o(um)o(b)q(er)g(1\))g(as)f(true.)29 +1472 y(Equalit)o(y)h(\014rst)h(compares)f(the)i(t)o(yp)q(es)f(of)h(its) +e(op)q(erands.)24 b(If)17 b(they)g(are)f(di\013eren)o(t,)g(the)g +(result)g(is)g Fl(nil)p Fo(.)23 b(Oth-)-42 1528 y(erwise,)18 +b(their)f(v)m(alues)h(are)g(compared.)26 b(Num)o(b)q(ers)17 +b(and)h(strings)f(are)h(compared)e(in)i(the)g(usual)f(w)o(a)o(y)l(.)27 +b(T)l(ables,)-42 1585 y(CF)l(unctions,)14 b(and)g(functions)g(are)g +(compared)f(b)o(y)h(reference,)h(that)e(is,)h(t)o(w)o(o)e(tables)i(are) +g(considered)g(equal)g(only)-42 1641 y(if)h(they)g(are)g(the)h(same)d +(table.)20 b(The)15 b(op)q(erator)g Fm(~=)f Fo(is)h(exactly)g(the)g +(negation)f(of)h(equalit)o(y)f(\()p Fm(==)p Fo(\).)29 +1698 y(The)19 b(other)g(op)q(erators)f(w)o(ork)g(as)g(follo)o(ws.)29 +b(If)19 b(b)q(oth)g(argumen)o(ts)e(are)i(n)o(um)o(b)q(ers,)f(they)h +(are)g(compared)f(as)-42 1754 y(suc)o(h.)27 b(Otherwise,)17 +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 +(strings,)f(their)h(v)m(alues)g(are)g(compared)g(using)-42 +1811 y(lexicographical)d(order.)20 b(Otherwise,)14 b(the)i(fallbac)o(k) +d(\\order")i(is)g(called;)f(see)h(Section)h(4.7.)-42 +1930 y Fl(4.5.4)52 b(Logical)18 b(Op)q(erators)-42 2016 +y Fo(All)f(logical)f(op)q(erators,)g(lik)o(e)h(con)o(trol)f +(structures,)h(consider)g Fl(nil)g Fo(as)g(false)g(and)g(an)o(ything)g +(else)g(as)g(true.)26 b(The)-42 2072 y(logical)14 b(op)q(erators)g +(are:)269 2161 y Fm(and)71 b(or)g(not)-42 2249 y Fo(The)17 +b(op)q(erators)f Fm(and)g Fo(and)h Fm(or)f Fo(use)h(short-cut)f(ev)m +(aluation,)g(that)g(is,)g(the)h(second)g(op)q(erand)g(is)f(ev)m +(aluated)h(only)-42 2306 y(if)e(necessary)l(.)-42 2425 +y Fl(4.5.5)52 b(Concatenation)-42 2511 y Fo(Lua)18 b(o\013ers)d(a)i +(string)f(concatenation)g(op)q(erator,)f(denoted)j(b)o(y)e(\\)p +Fm(..)p Fo(".)24 b(If)17 b(op)q(erands)g(are)g(strings)e(or)i(n)o(um)o +(b)q(ers,)-42 2567 y(they)c(are)g(con)o(v)o(erted)f(to)g(strings)g +(according)g(to)g(the)h(rules)f(in)h(Section)f(4.2.)18 +b(Otherwise,)13 b(the)g(fallbac)o(k)e(\\concat")-42 2623 +y(is)k(called;)g(see)g(Section)g(4.7.)922 2748 y(6)p +eop +%%Page: 7 7 +7 6 bop -42 199 a Fl(4.5.6)52 b(Precedence)-42 285 y +Fo(Op)q(erator)15 b(precedence)i(follo)o(ws)d(the)h(table)g(b)q(elo)o +(w,)f(from)f(the)j(lo)o(w)o(er)d(to)i(the)g(higher)g(priorit)o(y:)269 +379 y Fm(and)71 b(or)269 435 y(<)g(>)h(<=)47 b(>=)h(~=)f(==)269 +492 y(..)269 548 y(+)71 b(-)269 605 y(*)g(/)269 661 y(not)47 +b(-)24 b(\(unary\))269 718 y(^)-42 811 y Fo(All)15 b(binary)g(op)q +(erators)f(are)h(left)f(asso)q(ciativ)o(e,)g(except)h(for)g +Fm(^)p Fo(,)g(whic)o(h)g(is)f(righ)o(t)g(asso)q(ciativ)o(e.)-42 +931 y Fl(4.5.7)52 b(T)l(able)18 b(Constructors)-42 1017 +y Fo(T)l(able)d(constructors)f(are)h(expressions)g(that)f(create)h +(tables;)f(ev)o(ery)h(time)e(a)i(constructor)f(is)h(ev)m(aluated,)g(a)f +(new)-42 1074 y(table)f(is)g(created.)19 b(Constructors)12 +b(can)h(b)q(e)h(used)g(to)e(create)h(empt)o(y)f(tables,)g(or)h(to)g +(create)g(a)f(table)h(and)g(initialize)-42 1130 y(some)h(\014elds.)29 +1187 y(The)h(general)g(syn)o(tax)g(for)f(constructors)h(is:)42 +1255 y Fn(table)n(c)n(onstructor)49 b Fj(!)i Fo(')p Fj(f)p +Fo(')15 b Fn(\014eld)r(list)g Fo(')p Fj(g)p Fo(')212 +1311 y Fn(\014eld)r(list)48 b Fj(!)j Fn(l\014eld)r(list)31 +b Fj(j)16 b Fn(\016eld)r(list)31 b Fj(j)16 b Fn(l\014eld)r(list)f +Fo(';')g Fn(\016eld)r(list)200 1368 y(l\014eld)r(list)48 +b Fj(!)j Fo([)p Fn(l\014eld)r(list1)6 b Fo(])197 1424 +y Fn(\016eld)r(list)49 b Fj(!)i Fo([)p Fn(\016eld)r(list1)6 +b Fo(])29 1517 y(The)15 b(form)f Fn(l\014eld)r(list1)g +Fo(is)h(used)g(to)g(initialize)e(lists.)42 1589 y Fn(l\014eld)r(list1) +49 b Fj(!)h Fn(exp)16 b Fj(f)p Fo(',')f Fn(exp)s Fj(g)h +Fo([','])-42 1662 y(The)i(expressions)f(in)g(the)g(list)f(are)h +(assigned)g(to)g(consecutiv)o(e)g(n)o(umerical)f(indexes,)h(starting)f +(with)h(1.)25 b(As)18 b(an)-42 1718 y(example:)30 1812 +y Fm(a)24 b(=)g({"v1",)f("v2",)g(34})-42 1906 y Fo(is)15 +b(equiv)m(alen)o(t)g(to:)30 2000 y Fm(temp)23 b(=)h({})30 +2056 y(temp[1])f(=)h("v1")30 2112 y(temp[2])f(=)h("v2")30 +2169 y(temp[3])f(=)h(34)30 2225 y(a)g(=)g(temp)29 2319 +y Fo(The)15 b(next)h(form)d(initializes)g(named)i(\014elds)g(in)g(a)g +(table.)42 2378 y Fn(\016eld)r(list1)50 b Fj(!)g Fn(\016eld)16 +b Fj(f)p Fo(',')f Fn(\016eld)5 b Fj(g)15 b Fo([','])127 +2435 y Fn(\016eld)50 b Fj(!)g Fn(name)16 b Fo('=')g Fn(exp)-42 +2503 y Fo(As)g(an)f(example:)30 2597 y Fm(a)24 b(=)g({x)f(=)h(1,)f(y)h +(=)g(3})922 2748 y Fo(7)p eop +%%Page: 8 8 +8 7 bop -42 199 a Fo(is)15 b(equiv)m(alen)o(t)g(to:)30 +293 y Fm(temp)23 b(=)h({})30 350 y(temp.x)f(=)h(1)30 +406 y(temp.y)f(=)h(3)30 462 y(a)g(=)g(temp)-42 582 y +Fl(4.5.8)52 b(F)l(unction)18 b(Calls)-42 668 y Fo(A)e(function)f(call)f +(has)h(the)g(follo)o(wing)e(syn)o(tax:)42 740 y Fn(functionc)n(al)r(l) +49 b Fj(!)h Fn(var)17 b(r)n(e)n(alPar)n(ams)-42 813 y +Fo(Here,)i Fm(var)e Fo(can)h(b)q(e)h(an)o(y)e(v)m(ariable)h(\(global,)e +(lo)q(cal,)i(indexed,)g(etc\).)28 b(If)18 b(its)f(t)o(yp)q(e)h(is)g +Fn(function)j Fo(or)c Fn(CF)m(unction)s Fo(,)-42 869 +y(this)g(function)g(is)f(called.)25 b(Otherwise,)17 b(the)g(fallbac)o +(k)f(\\function")g(is)h(called,)g(ha)o(ving)f(as)g(\014rst)h(parameter) +e(the)-42 925 y(v)m(alue)h(of)f Fm(var)p Fo(,)f(and)h(then)h(the)f +(original)f(call)g(parameters.)29 982 y(The)h(form:)42 +1054 y Fn(functionc)n(al)r(l)49 b Fj(!)h Fn(var)17 b +Fo(':')j Fn(name)c(r)n(e)n(alPar)n(ams)-42 1126 y Fo(can)g(b)q(e)g +(used)f(to)g(call)f(\\metho)q(ds".)19 b(A)c(call)f Fm(var:name\(...\))g +Fo(is)g(syn)o(tactic)h(sugar)f(for)6 1220 y Fm(var.name\(var,)22 +b(...\))-42 1314 y Fo(except)16 b(that)f Fm(var)f Fo(is)h(ev)m(aluated) +g(only)g(once.)42 1382 y Fn(r)n(e)n(alPar)n(ams)49 b +Fj(!)h Fo('\(')16 b([)p Fn(explist1)6 b Fo(])15 b('\)')42 +1438 y Fn(r)n(e)n(alPar)n(ams)49 b Fj(!)h Fn(table)n(c)n(onstructor)115 +1495 y(explist1)f Fj(!)h Fn(exp1)17 b Fj(f)p Fo(',')e +Fn(exp1)6 b Fj(g)-42 1563 y Fo(All)18 b(argumen)o(t)e(expressions)i +(are)g(ev)m(aluated)g(b)q(efore)g(the)h(call;)f(then)g(the)g(list)f(of) +h(argumen)o(ts)e(is)i(adjusted)g(to)-42 1620 y(the)j(length)f(of)f(the) +h(list)f(of)h(parameters)e(\(see)j(Section)f(4.3\);)h(\014nally)l(,)f +(this)g(list)f(is)g(assigned)h(to)g(the)g(formal)-42 +1676 y(parameters.)g(A)15 b(call)g(of)g(the)h(form)e +Fm(f{...})h Fo(is)g(syn)o(tactic)f(sugar)h(for)g Fm(f\({...}\))p +Fo(,)f(that)h(is,)g(the)h(parameter)e(list)-42 1732 y(is)h(a)g(single)g +(new)g(table.)29 1789 y(Because)h(a)f(function)h(can)g(return)f(an)o(y) +g(n)o(um)o(b)q(er)g(of)g(results)g(\(see)h(Section)f(4.4.3\),)e(the)j +(n)o(um)o(b)q(er)f(of)g(results)-42 1845 y(m)o(ust)e(b)q(e)h(adjusted)g +(b)q(efore)g(used.)20 b(If)14 b(the)g(function)f(is)h(called)f(as)g(a)h +(statemen)o(t)d(\(see)j(Section)g(4.4.4\),)e(its)g(return)-42 +1902 y(list)18 b(is)h(adjusted)g(to)g(0.)31 b(If)20 b(the)f(function)g +(is)g(called)g(in)g(a)g(place)g(that)f(needs)i(a)f(single)f(v)m(alue)i +(\(syn)o(tactically)-42 1958 y(denoted)f(b)o(y)f(the)g(non-terminal)e +Fm(exp1)p Fo(\),)h(its)g(return)h(list)f(is)g(adjusted)h(to)g(1.)27 +b(If)18 b(the)g(function)g(is)g(called)f(in)h(a)-42 2015 +y(place)f(that)g(can)g(hold)g(man)o(y)e(v)m(alues)i(\(syn)o(tactically) +e(denoted)j(b)o(y)f(the)g(non-terminal)e Fm(exp)p Fo(\),)h(no)h +(adjustmen)o(t)-42 2071 y(is)e(done.)-42 2193 y Fe(4.6)56 +b(F)-5 b(unction)20 b(De\014nitions)-42 2279 y Fo(F)l(unctions)c(in)g +(Lua)g(can)g(b)q(e)h(de\014ned)g(an)o(ywhere)f(in)g(the)g(global)e(lev) +o(el)i(of)f(a)h(c)o(h)o(unk.)22 b(The)16 b(syn)o(tax)f(for)h(function) +-42 2335 y(de\014nition)g(is:)42 2407 y Fn(function)50 +b Fj(!)g Fl(function)16 b Fn(var)h Fo('\(')e([)p Fn(p)n(arlist1)6 +b Fo(])16 b('\)')f Fn(blo)n(ck)g Fl(end)29 2536 y Fo(When)f(Lua)g +(pre-compiles)f(a)g(c)o(h)o(unk,)h(all)f(its)f(function)i(b)q(o)q(dies) +g(are)f(pre-compiled,)g(to)q(o.)19 b(Then,)14 b(when)g(Lua)-42 +2592 y(\\executes")i(the)f(function)g(de\014nition,)g(its)f(b)q(o)q(dy) +i(is)f(stored,)f(with)h(t)o(yp)q(e)g Fn(function)p Fo(,)f(in)o(to)g +(the)i(v)m(ariable)e Fm(var)p Fo(.)922 2748 y(8)p eop +%%Page: 9 9 +9 8 bop 29 199 a Fo(P)o(arameters)13 b(act)i(as)f(lo)q(cal)h(v)m +(ariables,)f(initialized)f(with)i(the)g(argumen)o(t)f(v)m(alues.)42 +271 y Fn(p)n(arlist1)50 b Fj(!)g Fn(name)16 b Fj(f)p +Fo(',')f Fn(name)s Fj(g)29 400 y Fo(Results)g(are)f(returned)h(using)f +(the)h Fm(return)f Fo(statemen)o(t)e(\(see)j(Section)f(4.4.3\).)k(If)d +(con)o(trol)e(reac)o(hes)i(the)g(end)-42 456 y(of)g(a)g(function)g +(without)f(a)h(return)g(instruction,)f(the)h(function)g(returns)h(with) +e(no)h(results.)29 513 y(There)22 b(is)f(a)g(sp)q(ecial)g(syn)o(tax)g +(for)g(de\014nition)h(of)f(metho)q(ds,)h(that)e(is,)j(functions)e(whic) +o(h)g(ha)o(v)o(e)h(an)f(extra)-42 569 y(parameter)14 +b Fn(self)p Fo(.)42 641 y Fn(function)50 b Fj(!)g Fl(function)16 +b Fn(var)h Fo(':')j Fn(name)c Fo('\(')f([)p Fn(p)n(arlist1)6 +b Fo(])16 b('\)')f Fn(blo)n(ck)g Fl(end)-42 714 y Fo(A)h(declaration)e +(lik)o(e)-42 807 y Fm(function)23 b(v:f)h(\(...\))6 864 +y(...)-42 920 y(end)-42 1014 y Fo(is)15 b(equiv)m(alen)o(t)g(to)-42 +1108 y Fm(function)23 b(v.f)h(\(self,)f(...\))6 1164 +y(...)-42 1221 y(end)-42 1315 y Fo(that)16 b(is,)g(the)g(function)g +(gets)g(an)g(extra)f(formal)f(parameter)h(called)h Fm(self)p +Fo(.)22 b(Notice)16 b(that)f(the)h(v)m(ariable)g Fm(v)g +Fo(m)o(ust)-42 1371 y(ha)o(v)o(e)f(b)q(een)i(previously)d(initialized)g +(with)g(a)h(table)g(v)m(alue.)-42 1493 y Fe(4.7)56 b(F)-5 +b(allbac)n(ks)-42 1579 y Fo(Lua)17 b(pro)o(vides)f(a)g(p)q(o)o(w)o +(erful)g(mec)o(hanism)e(to)h(extend)i(its)f(seman)o(tics,)e(called)i +Fn(fal)r(lb)n(acks)p Fo(.)23 b(Basically)l(,)15 b(a)h(fallbac)o(k)-42 +1635 y(is)f(a)g(programmer)d(de\014ned)17 b(function)e(whic)o(h)g(is)f +(called)h(whenev)o(er)h(Lua)f(do)q(es)h(not)f(kno)o(w)f(ho)o(w)h(to)g +(pro)q(ceed.)29 1691 y(Lua)h(supp)q(orts)f(the)g(follo)o(wing)e +(fallbac)o(ks,)h(iden)o(ti\014ed)h(b)o(y)g(the)g(giv)o(en)g(strings:) +-42 1785 y Fl(\\arith")24 b Fo(called)17 b(when)g(an)h(arithmetic)c(op) +q(eration)j(is)g(applied)g(to)f(non)i(n)o(umerical)d(op)q(erands,)j(or) +f(when)g(the)72 1842 y(binary)f Fm(^)g Fo(op)q(eration)g(is)f(called.) +23 b(It)17 b(receiv)o(es)f(three)g(argumen)o(ts:)k(the)d(t)o(w)o(o)e +(op)q(erands)h(\(the)g(second)h(one)72 1898 y(is)j(nil)g(when)h(the)g +(op)q(eration)e(is)h(unary)h(min)o(us\))e(and)h(one)h(of)f(the)g(follo) +o(wing)f(strings)g(describing)h(the)72 1955 y(o\013ended)c(op)q +(erator:)120 2067 y Fm(add)47 b(sub)g(mul)h(div)f(pow)g(unm)72 +2180 y Fo(Its)15 b(return)f(v)m(alue)h(is)f(the)h(\014nal)f(result)g +(of)g(the)h(arithmetic)d(op)q(eration.)19 b(The)c(default)f(function)g +(issues)h(an)72 2236 y(error.)-42 2330 y Fl(\\order")23 +b Fo(called)15 b(when)h(an)g(order)f(comparison)e(is)i(applied)h(to)f +(non)g(n)o(umerical)f(or)h(non)h(string)e(op)q(erands.)21 +b(It)72 2386 y(receiv)o(es)d(three)g(argumen)o(ts:)23 +b(the)18 b(t)o(w)o(o)f(op)q(erands)h(and)g(one)g(of)f(the)h(follo)o +(wing)e(strings)h(describing)g(the)72 2443 y(o\013ended)f(op)q(erator:) +120 2555 y Fm(lt)23 b(gt)h(le)g(ge)922 2748 y Fo(9)p +eop +%%Page: 10 10 +10 9 bop 72 199 a Fo(Its)17 b(return)h(v)m(alue)f(is)g(the)g(\014nal)g +(result)g(of)g(the)g(comparison)f(op)q(eration.)25 b(The)18 +b(default)e(function)i(issues)72 256 y(an)d(error.)-42 +350 y Fl(\\concat")25 b Fo(called)d(when)g(a)f(concatenation)f(is)h +(applied)h(to)f(non)h(string)e(op)q(erands.)39 b(It)22 +b(receiv)o(es)f(the)h(t)o(w)o(o)72 406 y(op)q(erands)d(as)f(argumen)o +(ts.)29 b(Its)18 b(return)h(v)m(alue)g(is)f(the)g(\014nal)h(result)f +(of)g(the)h(concatenation)f(op)q(eration.)72 462 y(The)e(default)e +(function)h(issues)g(an)h(error.)-42 556 y Fl(\\index")23 +b Fo(called)14 b(when)i(Lua)f(tries)f(to)g(retriev)o(e)g(the)h(v)m +(alue)g(of)f(an)h(index)g(not)f(presen)o(t)h(in)f(a)h(table.)k(It)c +(receiv)o(es)72 613 y(as)20 b(argumen)o(ts)e(the)i(table)g(and)g(the)g +(index.)35 b(Its)20 b(return)g(v)m(alue)g(is)f(the)h(\014nal)g(result)g +(of)f(the)i(indexing)72 669 y(op)q(eration.)e(The)d(default)e(function) +h(returns)h(nil.)-42 763 y Fl(\\getglobal")24 b Fo(called)15 +b(when)h(Lua)f(tries)f(to)h(retriev)o(e)f(the)i(v)m(alue)f(of)g(a)f +(global)g(v)m(ariable)h(whic)o(h)g(has)g(a)g(nil)f(v)m(alue)72 +819 y(\(or)k(whic)o(h)h(has)g(not)g(b)q(een)h(initialized\).)30 +b(It)19 b(receiv)o(es)g(as)f(argumen)o(t)g(the)h(name)f(of)g(the)i(v)m +(ariable.)30 b(Its)72 876 y(return)15 b(v)m(alue)h(is)e(the)i(\014nal)f +(result)f(of)h(the)g(expression.)20 b(The)c(default)e(function)h +(returns)g(nil.)-42 970 y Fl(\\gettable")25 b Fo(called)17 +b(when)i(Lua)g(tries)e(to)g(index)i(a)f(non)g(table)g(v)m(alue.)29 +b(It)18 b(receiv)o(es)g(as)g(argumen)o(ts)e(the)i(non)72 +1026 y(table)d(v)m(alue)h(and)g(the)g(index.)22 b(Its)15 +b(return)h(v)m(alue)g(is)f(the)h(\014nal)g(result)f(of)g(the)h +(indexing)g(op)q(eration.)k(The)72 1083 y(default)15 +b(function)g(issues)g(an)g(error.)-42 1176 y Fl(\\settable")24 +b Fo(called)18 b(when)g(Lua)g(tries)f(to)h(assign)f(indexed)h(a)g(non)g +(table)f(v)m(alue.)28 b(It)18 b(receiv)o(es)g(as)f(argumen)o(ts)72 +1233 y(the)e(non)h(table)e(v)m(alue,)h(the)h(index,)f(and)g(the)h +(assigned)e(v)m(alue.)20 b(The)c(default)f(function)g(issues)g(an)g +(error.)-42 1327 y Fl(\\function")24 b Fo(called)16 b(when)h(Lua)g +(tries)f(to)g(call)f(a)h(non)h(function)f(v)m(alue.)24 +b(It)17 b(receiv)o(es)f(as)g(argumen)o(ts)f(the)h(non)72 +1383 y(function)i(v)m(alue)h(and)g(the)f(argumen)o(ts)f(giv)o(en)h(in)g +(the)h(original)d(call.)29 b(Its)19 b(return)f(v)m(alues)h(are)f(the)h +(\014nal)72 1440 y(results)c(of)f(the)i(call)e(op)q(eration.)19 +b(The)d(default)e(function)h(issues)g(an)h(error.)-42 +1533 y Fl(\\gc")24 b Fo(called)12 b(during)g(garbage)e(collection.)18 +b(It)12 b(receiv)o(es)g(as)f(argumen)o(t)f(the)i(table)f(b)q(eing)h +(collected.)19 b(After)11 b(eac)o(h)72 1590 y(run)16 +b(of)f(the)g(collector)f(this)h(function)g(is)g(called)g(with)g +(argumen)o(t)f(nil.)20 b(Because)c(this)e(function)i(op)q(erates)72 +1646 y(during)i(garbage)g(collection,)f(it)h(m)o(ust)f(b)q(e)i(used)g +(with)f(great)f(care,)i(and)f(programmers)d(should)k(a)o(v)o(oid)72 +1703 y(the)g(creation)g(of)g(new)g(ob)s(jects)g(\(tables)f(or)h +(strings\))e(in)i(this)g(function.)32 b(The)19 b(default)g(function)g +(do)q(es)72 1759 y(nothing.)-42 1853 y Fl(\\error")k +Fo(called)16 b(when)i(an)f(error)f(o)q(ccurs.)26 b(It)17 +b(receiv)o(es)g(as)g(argumen)o(t)e(a)i(string)f(describing)h(the)g +(error.)25 b(The)72 1910 y(default)15 b(function)g(prin)o(ts)f(the)i +(message)d(on)j(the)f(standard)g(error)f(output.)29 2003 +y(The)19 b(function)f Fm(setfallback)f Fo(is)g(used)i(to)f(c)o(hange)g +(a)g(fallbac)o(k)f(action.)29 b(Its)18 b(\014rst)g(argumen)o(t)f(is)g +(a)h(string)-42 2060 y(describing)f(the)g(fallbac)o(k,)e(and)i(the)f +(second)i(the)e(new)h(function)g(to)f(b)q(e)h(called.)24 +b(It)16 b(returns)h(the)f(old)h(function)-42 2116 y(for)e(the)g(giv)o +(en)g(fallbac)o(k.)29 2173 y(Section)g(8.6)f(sho)o(ws)h(an)g(example)f +(of)h(the)g(use)h(of)e(fallbac)o(ks.)-42 2294 y Fe(4.8)56 +b(Error)18 b(Handling)-42 2380 y Fo(Because)c(Lua)g(is)e(an)h +(extension)g(language,)f(all)g(Lua)i(actions)e(start)g(from)f(C)i(co)q +(de)h(calling)d(a)i(function)g(from)e(the)-42 2437 y(Lua)j(library)l(.) +k(Whenev)o(er)13 b(an)g(error)f(o)q(ccurs)i(during)f(Lua)g(compilation) +d(or)j(execution,)g(an)g(error)f(fallbac)o(k)g(func-)-42 +2493 y(tion)k(is)g(called,)f(and)i(then)f(the)g(corresp)q(onding)h +(function)f(from)e(the)i(library)f(\()p Fm(lua_dofile)p +Fo(,)g Fm(lua_dostring)p Fo(,)-42 2550 y Fm(lua_call)p +Fo(,)f(and)i Fm(lua_callfunction)p Fo(\))c(is)j(terminated)e(returning) +i(an)g(error)g(condition.)911 2748 y(10)p eop +%%Page: 11 11 +11 10 bop 29 199 a Fo(The)15 b(only)f(argumen)o(t)e(to)i(the)g(error)g +(fallbac)o(k)f(function)h(is)g(a)g(string)g(describing)g(the)g(error.) +19 b(The)c(standard)-42 256 y(I/O)i(library)d(rede\014nes)j(this)e +(fallbac)o(k,)f(using)h(the)h(debug)g(facilities)e(\(see)h(Section)h +(7,)f(in)g(order)h(to)f(prin)o(t)g(some)-42 312 y(extra)h +(informations,)c(lik)o(e)j(the)h(stac)o(k)f(of)h(calls.)21 +b(F)l(or)15 b(more)f(information)f(ab)q(out)j(an)g(error,)e(the)i(Lua)h +(program)-42 369 y(can)j(include)f(the)g(compilation)d(pragma)h +Fm($debug)p Fo(.)62 b(This)18 b(pragma)f(m)o(ust)h(b)q(e)h(written)f +(in)h(a)f(line)h(b)o(y)g(itself.)-42 425 y(When)14 b(an)f(error)f(o)q +(ccurs)h(in)g(a)f(program)f(compiled)h(with)g(this)g(option,)g(the)h +(error)g(routine)f(is)g(able)h(to)f(prin)o(t)g(also)-42 +482 y(the)18 b(lines)f(where)h(the)g(calls)e(\(and)i(the)f(error\))g(w) +o(ere)g(made.)26 b(If)18 b(needed,)h(it)e(is)g(p)q(ossible)g(to)g(c)o +(hange)h(the)f(error)-42 538 y(fallbac)o(k)d(routine;)h(see)g(Section)g +(4.7.)29 594 y(Lua)e(co)q(de)g(can)f(generate)g(an)g(error)g(b)o(y)g +(calling)f(the)i(function)f Fm(error)p Fo(.)18 b(Its)13 +b(optional)d(parameter)h(is)h(a)g(string,)-42 651 y(whic)o(h)k(is)e +(used)i(as)f(the)g(error)g(message.)-42 794 y Fp(5)67 +b(The)23 b(Application)h(Program)f(In)n(terface)-42 896 +y Fo(This)13 b(section)g(describ)q(es)h(the)f(API)g(for)g(Lua,)h(that)e +(is,)h(the)g(set)g(of)f(C)h(functions)g(a)o(v)m(ailable)f(to)h(the)g +(host)g(program)-42 952 y(to)i(comm)o(unicate)e(with)h(the)h(library)l +(.)k(The)d(API)f(functions)g(can)h(b)q(e)f(classi\014ed)g(in)g(the)h +(follo)o(wing)d(categories:)14 1046 y(1.)22 b(executing)15 +b(Lua)h(co)q(de;)14 1140 y(2.)22 b(con)o(v)o(erting)14 +b(v)m(alues)i(b)q(et)o(w)o(een)f(C)g(and)g(Lua;)14 1233 +y(3.)22 b(manipulating)13 b(\(reading)h(and)i(writing\))d(Lua)j(ob)s +(jects;)14 1327 y(4.)22 b(calling)14 b(Lua)i(functions;)14 +1421 y(5.)22 b(C)15 b(functions)g(to)g(b)q(e)g(called)g(b)o(y)g(Lua;)14 +1515 y(6.)22 b(references)16 b(to)f(Lua)g(Ob)s(jects.)-42 +1609 y(All)g(API)h(functions)f(are)f(declared)i(in)f(the)g(\014le)g +Fm(lua.h)p Fo(.)-42 1730 y Fe(5.1)56 b(Executing)18 b(Lua)h(Co)r(de)-42 +1816 y Fo(A)12 b(host)f(program)f(can)i(execute)g(Lua)g(c)o(h)o(unks)g +(written)f(in)g(a)h(\014le)f(or)h(in)f(a)g(string,)g(using)h(the)g +(follo)o(wing)d(functions:)-42 1967 y Fm(int)286 b(lua_dofile)357 +b(\(char)23 b(*filename\);)-42 2023 y(int)286 b(lua_dostring)309 +b(\(char)23 b(*string\);)-42 2117 y Fo(Both)15 b(functions)f(return)g +(an)g(error)f(co)q(de:)20 b(0,)14 b(in)g(case)g(of)g(success;)h(non)f +(zero,)g(in)g(case)h(of)e(errors.)19 b(The)c(function)-42 +2173 y Fm(lua_dofile)p Fo(,)h(if)g(called)g(with)g(argumen)o(t)f(NULL)j +(\(0\),)d(executes)j(the)f(\\\014le")f Fm(stdin)p Fo(.)23 +b(F)l(unction)17 b Fm(lua_dofile)-42 2230 y Fo(is)f(also)e(able)h(to)g +(execute)h(pre-compiled)f(c)o(h)o(unks.)21 b(It)16 b(detects)f(whether) +h(the)f(\014le)h(is)f(text)g(or)g(not,)g(and)g(loads)g(it)-42 +2286 y(accordingly)g(\(see)g(program)e Fm(luac)p Fo(\).)-42 +2408 y Fe(5.2)56 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(Lua)-42 2494 y Fo(Because)13 +b(Lua)f(has)g(no)f(static)g(t)o(yp)q(e)h(system,)f(all)f(v)m(alues)i +(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 +Fm(lua_Object)p Fo(,)-42 2550 y(whic)o(h)f(w)o(orks)f(lik)o(e)g(an)h +(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) +m(alue.)19 b(V)l(alues)11 b(of)f(t)o(yp)q(e)h Fm(lua_Object)f +Fo(ha)o(v)o(e)-42 2607 y(no)16 b(meaning)d(outside)i(Lua;)g(for)g +(instance,)g(the)g(comparisson)e(of)i(t)o(w)o(o)f Fm(lua_Object's)f +Fo(is)i(of)g(no)g(signi\014cance.)911 2748 y(11)p eop +%%Page: 12 12 +12 11 bop 29 199 a Fo(Lua)11 b(has)f(automatic)e(memory)f(managemen)o +(t,)i(and)h(garbage)g(collection.)17 b(Because)11 b(of)f(that,)g(a)g +Fm(lua_Object)-42 256 y Fo(has)18 b(a)f(limited)e(scop)q(e,)j(and)g(is) +f(only)g(v)m(alid)g(inside)g(the)h Fn(blo)n(ck)j Fo(where)d(it)f(w)o +(as)f(created.)27 b(A)17 b(C)h(function)f(called)-42 +312 y(from)c(Lua)i(is)f(a)h(blo)q(c)o(k,)f(and)h(its)e(parameters)g +(are)h(v)m(alid)h(only)f(un)o(til)g(its)f(end.)21 b(A)14 +b(go)q(o)q(d)h(programmi)o(ng)d(practice)-42 369 y(is)i(to)f(con)o(v)o +(ert)g(Lua)h(ob)s(jects)f(to)g(C)h(v)m(alues)g(as)f(so)q(on)h(as)f +(they)h(are)g(a)o(v)m(ailable,)e(and)i(nev)o(er)g(to)f(store)g +Fm(lua_Object)p Fo(s)-42 425 y(in)j(C)e(global)g(v)m(ariables.)29 +482 y(When)f(C)g(co)q(de)h(calls)e(Lua)h(rep)q(eatedly)l(,)g(as)g(in)g +(a)f(lo)q(op,)h(ob)s(jects)f(returned)i(b)o(y)f(these)g(calls)f(accum)o +(ulate,)f(and)-42 538 y(ma)o(y)j(create)h(a)g(memory)d(problem.)19 +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 +(de\014ned)g(with)f(the)g(functions:)-42 629 y Fm(void)262 +b(lua_beginblock)f(\(void\);)-42 686 y(void)h(lua_endblock)309 +b(\(void\);)-42 777 y Fo(After)15 b(the)h(end)f(of)g(the)g(blo)q(c)o +(k,)g(all)f Fm(lua_Object)p Fo('s)g(created)h(inside)g(it)f(are)h +(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 +Fm(lua_Object)p Fo(,)e(the)i(follo)o(wing)e(function)i(is)g(a)o(v)m +(ailable:)-42 925 y Fm(int)286 b(lua_type)405 b(\(lua_Object)22 +b(object\);)-42 1016 y Fo(plus)16 b(the)f(follo)o(wing)e(macros)g(and)j +(functions:)-42 1108 y Fm(int)286 b(lua_isnil)381 b(\(lua_Object)22 +b(object\);)-42 1164 y(int)286 b(lua_isnumber)309 b(\(lua_Object)22 +b(object\);)-42 1220 y(int)286 b(lua_isstring)309 b(\(lua_Object)22 +b(object\);)-42 1277 y(int)286 b(lua_istable)333 b(\(lua_Object)22 +b(object\);)-42 1333 y(int)286 b(lua_isfunction)261 b(\(lua_Object)22 +b(object\);)-42 1390 y(int)286 b(lua_iscfunction)237 +b(\(lua_Object)22 b(object\);)-42 1446 y(int)286 b(lua_isuserdata)261 +b(\(lua_Object)22 b(object\);)-42 1538 y Fo(All)14 b(macros)f(return)i +(1)f(if)g(the)h(ob)s(ject)f(is)g(compatible)f(with)h(the)g(giv)o(en)g +(t)o(yp)q(e,)h(and)g(0)f(otherwise.)19 b(The)c(function)-42 +1594 y Fm(lua_isnumber)d Fo(accepts)i(n)o(um)o(b)q(ers)f(and)h(n)o +(umerical)e(strings,)g Fm(lua_isstring)g Fo(accepts)i(strings)e(and)i +(n)o(um)o(b)q(ers)-42 1650 y(\(see)i(Section)f(4.2\),)e(and)j +Fm(lua_isfunction)d Fo(accepts)i(Lua)h(and)f(C)g(functions.)29 +1707 y(The)20 b(function)g Fm(lua_type)f Fo(can)h(b)q(e)h(used)f(to)g +(distinguish)f(b)q(et)o(w)o(een)h(di\013eren)o(t)f(kinds)h(of)g(user)g +(data;)h(see)-42 1763 y(b)q(elo)o(w.)29 1820 y(T)l(o)15 +b(translate)f(a)h(v)m(alue)g(from)f(t)o(yp)q(e)h Fm(lua_Object)f +Fo(to)g(a)h(sp)q(eci\014c)h(C)f(t)o(yp)q(e,)g(the)g(programmer)d(can)k +(use:)-42 1911 y Fm(double)214 b(lua_getnumber)285 b(\(lua_Object)22 +b(object\);)-42 1968 y(char)239 b(*lua_getstring)284 +b(\(lua_Object)22 b(object\);)-42 2024 y(lua_CFunction)46 +b(lua_getcfunction)213 b(\(lua_Object)22 b(object\);)-42 +2081 y(void)239 b(*lua_getuserdata)d(\(lua_Object)22 +b(object\);)-42 2172 y(lua_getnumber)14 b Fo(con)o(v)o(erts)g(a)g +Fm(lua_Object)g Fo(to)g(a)h(\015oat.)k(This)c Fm(lua_Object)e +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 +2228 y(con)o(v)o(ertible)h(to)f(n)o(um)o(b)q(er)h(\(see)g(Section)g +(4.2\);)f(otherwise,)g(the)h(function)g(returns)g(0.)29 +2285 y Fm(lua_getstring)c Fo(con)o(v)o(erts)g(a)h Fm(lua_Object)f +Fo(to)h(a)g(string)g(\()p Fm(char)23 b(*)p Fo(\).)18 +b(This)12 b Fm(lua_Object)f Fo(m)o(ust)g(b)q(e)i(a)f(string)-42 +2341 y(or)k(a)f(n)o(um)o(b)q(er;)h(otherwise,)e(the)i(function)g +(returns)g(0)f(\(the)h(n)o(ull)f(p)q(oin)o(ter\).)21 +b(This)16 b(function)f(do)q(es)i(not)e(create)h(a)-42 +2398 y(new)f(string,)d(but)i(returns)g(a)f(p)q(oin)o(ter)g(to)h(a)f +(string)g(inside)g(the)h(Lua)g(en)o(vironmen)o(t.)k(Because)d(Lua)f +(has)f(garbage)-42 2454 y(collection,)h(there)h(is)g(no)g(guaran)o(tee) +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 +(the)i(blo)q(c)o(k)f(ends.)29 2511 y Fm(lua_getcfunction)f +Fo(con)o(v)o(erts)h(a)h Fm(lua_Object)f Fo(to)g(a)h(C)g(function.)23 +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 +2567 y Fn(CF)m(unction)s Fo(;)j(otherwise,)f(the)h(function)g(returns)g +(0)f(\(the)h(n)o(ull)f(p)q(oin)o(ter\).)27 b(The)18 b(t)o(yp)q(e)g +Fm(lua_CFunction)e Fo(is)h(ex-)-42 2623 y(plained)f(in)f(Section)g +(5.5.)911 2748 y(12)p eop +%%Page: 13 13 +13 12 bop 29 199 a Fm(lua_getuserdata)10 b Fo(con)o(v)o(erts)i(a)g +Fm(lua_Object)e Fo(to)i Fm(void*)p Fo(.)18 b(This)12 +b Fm(lua_Object)f Fo(m)o(ust)g(ha)o(v)o(e)h(t)o(yp)q(e)g +Fn(user)n(data)s Fo(;)-42 256 y(otherwise,)j(the)g(function)g(returns)g +(0)g(\(the)g(n)o(ull)f(p)q(oin)o(ter\).)29 312 y(The)j(rev)o(erse)g +(pro)q(cess,)h(that)e(is,)h(passing)f(a)h(sp)q(eci\014c)h(C)f(v)m(alue) +g(to)g(Lua,)h(is)e(done)i(b)o(y)f(using)g(the)g(follo)o(wing)-42 +369 y(functions:)-42 457 y Fm(void)262 b(lua_pushnumber)f(\(double)23 +b(n\);)-42 513 y(void)262 b(lua_pushstring)f(\(char)23 +b(*s\);)-42 570 y(void)262 b(lua_pushcfunction)189 b(\(lua_CFunction)22 +b(f\);)-42 626 y(void)262 b(lua_pushusertag)237 b(\(void)23 +b(*u,)h(int)f(tag\);)-42 714 y Fo(plus)16 b(the)f(macro:)-42 +802 y Fm(void)262 b(lua_pushuserdata)213 b(\(void)23 +b(*u\);)-42 890 y Fo(All)17 b(of)f(them)g(receiv)o(e)h(a)f(C)h(v)m +(alue,)g(con)o(v)o(ert)f(it)h(to)f(a)g(corresp)q(onden)o(t)i +Fm(lua_Object)p Fo(,)d(and)i(lea)o(v)o(e)f(the)h(result)g(on)-42 +947 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(assigned)e(to)g(a)h(Lua)g(v)m(ariable,)f(passed)h(as)g(paramen)o +(ter)e(to)h(a)-42 1003 y(Lua)f(function,)f(etc)g(\(see)g(b)q(elo)o +(w\).)29 1060 y(User)10 b(data)g(can)h(ha)o(v)o(e)e(di\013eren)o(t)h +(tags,)g(whose)g(seman)o(tics)f(are)h(de\014ned)h(b)o(y)g(the)f(host)g +(program.)16 b(An)o(y)10 b(p)q(ositiv)o(e)-42 1116 y(in)o(teger)15 +b(can)h(b)q(e)h(used)f(to)g(tag)e(a)i(user)g(data.)21 +b(When)16 b(a)g(user)g(data)f(is)g(retriev)o(ed,)g(the)h(function)g +Fm(lua_type)e Fo(can)-42 1173 y(b)q(e)i(used)g(to)f(get)f(its)h(tag.)29 +1229 y(T)l(o)g(complete)f(the)h(set,)g(the)g(v)m(alue)g +Fl(nil)g Fo(or)f(a)h Fm(lua_Object)f Fo(can)h(also)g(b)q(e)g(pushed)i +(on)o(to)d(the)h(stac)o(k,)f(with:)-42 1317 y Fm(void)262 +b(lua_pushnil)333 b(\(void\);)-42 1374 y(void)262 b(lua_pushobject)f +(\(lua_Object)22 b(object\);)-42 1494 y Fe(5.3)56 b(Manipulating)22 +b(Lua)c(Ob)s(jects)-42 1580 y Fo(T)l(o)d(read)h(the)f(v)m(alue)g(of)g +(an)o(y)g(global)f(Lua)h(v)m(ariable,)f(one)i(can)f(use)h(the)f +(function:)-42 1668 y Fm(lua_Object)118 b(lua_getglobal)285 +b(\(char)23 b(*varname\);)-42 1756 y Fo(As)16 b(in)f(Lua,)g(if)g(the)g +(v)m(alue)g(of)g(the)g(global)f(is)h Fl(nil)p Fo(,)f(the)h +Fm("getglobal")f Fo(fallbac)o(k)g(is)g(called.)29 1813 +y(T)l(o)h(store)f(a)h(v)m(alue)h(previously)e(pushed)j(on)o(to)d(the)h +(stac)o(k)g(in)g(a)f(global)g(v)m(ariable,)h(there)g(is)g(the)g +(function:)-42 1901 y Fm(void)262 b(lua_storeglobal)237 +b(\(char)23 b(*varname\);)29 1989 y Fo(T)l(ables)15 b(can)g(also)f(b)q +(e)i(manipulated)e(via)g(the)i(API.)f(The)g(function)-42 +2077 y Fm(lua_Object)118 b(lua_getsubscript)213 b(\(void\);)-42 +2165 y Fo(exp)q(ects)16 b(on)f(the)h(stac)o(k)e(a)h(table)f(and)i(an)f +(index,)g(and)g(returns)g(the)g(con)o(ten)o(ts)g(of)g(the)g(table)f(at) +h(that)f(index.)20 b(As)-42 2221 y(in)15 b(Lua,)g(if)g(the)g(\014rst)f +(ob)s(ject)h(is)f(not)h(a)f(table,)g(or)h(the)g(index)g(is)g(not)f +(presen)o(t)h(in)g(the)g(table,)f(the)h(corresp)q(onden)o(t)-42 +2278 y(fallbac)o(k)f(is)h(called.)29 2334 y(T)l(o)h(store)g(a)g(v)m +(alue)h(in)f(an)h(index,)g(the)f(program)e(m)o(ust)h(push)j(on)o(to)d +(the)i(stac)o(k)e(the)i(table,)f(the)h(index,)f(and)-42 +2391 y(the)g(v)m(alue,)f(and)g(then)h(call)e(the)h(function:)-42 +2479 y Fm(void)24 b(lua_storesubscript)d(\(void\);)-42 +2567 y Fo(Again,)15 b(the)g(corresp)q(onden)o(t)g(fallbac)o(k)f(is)h +(called)g(if)f(needed.)29 2623 y(Finally)l(,)g(the)h(function)911 +2748 y(13)p eop +%%Page: 14 14 +14 13 bop -42 199 a Fm(lua_Object)118 b(lua_createtable)237 +b(\(void\);)-42 293 y Fo(creates)15 b(a)g(new)h(table.)29 +349 y Fn(Ple)n(ase)22 b(Notic)n(e:)36 b Fo(Most)22 b(functions)g(from)e +(the)j(Lua)f(library)f(receiv)o(e)i(parameters)d(through)i(the)h(stac)o +(k.)-42 406 y(Because)c(other)e(functions)g(also)g(use)h(the)g(stac)o +(k,)f(it)g(is)g(imp)q(ortan)o(t)e(that)i(these)h(parameters)e(b)q(e)i +(pushed)h(just)-42 462 y(b)q(efore)d(the)f(corresp)q(onden)o(t)g(call,) +f(without)g(in)o(termediate)e(calls)i(to)h(the)g(Lua)g(library)l(.)k(F) +l(or)14 b(instance,)h(supp)q(ose)-42 519 y(the)h(user)f(w)o(an)o(ts)f +(the)h(v)m(alue)h(of)f Fm(a[i])p Fo(.)k(A)c(simplistic)e(solution)h(w)o +(ould)g(b)q(e:)6 613 y Fm(/*)24 b(Warning:)f(WRONG)g(CODE)g(*/)6 +669 y(lua_Object)g(result;)6 725 y(lua_pushobject\(lua_getglobal)o +(\("a"\)\);)44 b(/*)24 b(push)f(table)g(*/)6 782 y +(lua_pushobject\(lua_getglobal)o(\("i"\)\);)44 b(/*)24 +b(push)f(index)g(*/)6 838 y(result)g(=)h(lua_getsubscript\(\);)-42 +932 y Fo(Ho)o(w)o(ev)o(er,)c(the)f(call)g Fm(lua_getglobal\("i"\))e +Fo(mo)q(di\014es)i(the)h(stac)o(k,)f(and)h(in)o(v)m(alidates)e(the)i +(previous)f(pushed)-42 989 y(v)m(alue.)i(A)15 b(correct)g(solution)f +(could)h(b)q(e:)6 1082 y Fm(lua_Object)23 b(result;)6 +1139 y(lua_Object)g(index)g(=)h(lua_getglobal\("i"\);)6 +1195 y(lua_pushobject\(lua_getglobal)o(\("a"\)\);)44 +b(/*)24 b(push)f(table)g(*/)6 1252 y(lua_pushobject\(index\);)355 +b(/*)24 b(push)f(index)g(*/)6 1308 y(result)g(=)h +(lua_getsubscript\(\);)-42 1430 y Fe(5.4)56 b(Calling)21 +b(Lua)e(F)-5 b(unctions)-42 1516 y Fo(F)l(unctions)19 +b(de\014ned)g(in)g(Lua)f(b)o(y)h(a)f(c)o(h)o(unk)g(executed)i(with)e +Fm(dofile)f Fo(or)h Fm(dostring)f Fo(can)i(b)q(e)g(called)f(from)e(the) +-42 1572 y(host)h(program.)23 b(This)16 b(is)g(done)h(using)g(the)g +(follo)o(wing)e(proto)q(col:)22 b(\014rst,)16 b(the)h(argumen)o(ts)e +(to)h(the)h(function)g(are)-42 1629 y(pushed)f(on)o(to)d(the)i(Lua)g +(stac)o(k)e(\(see)i(Section)f(5.2\),)f(in)h(direct)g(order,)g(i.e.,)g +(the)g(\014rst)g(argumen)o(t)f(is)h(pushed)h(\014rst.)-42 +1685 y(Again,)g(it)f(is)h(imp)q(ortan)o(t)e(to)h(emphasize)h(that,)f +(during)h(this)f(phase,)i(no)f(other)g(Lua)g(function)g(can)g(b)q(e)h +(called.)29 1741 y(Then,)f(the)h(function)f(is)f(called)h(using)-42 +1835 y Fm(int)286 b(lua_call)405 b(\(char)23 b(*functionname\);)-42 +1929 y Fo(or)-42 2023 y Fm(int)286 b(lua_callfunction)213 +b(\(lua_Object)22 b(function\);)-42 2116 y Fo(Both)16 +b(functions)g(return)f(an)h(error)f(co)q(de:)22 b(0,)15 +b(in)h(case)g(of)f(success;)i(non)f(zero,)f(in)h(case)g(of)f(errors.)21 +b(Finally)l(,)14 b(the)-42 2173 y(returned)i(v)m(alues)f(\(a)g(Lua)h +(function)f(ma)o(y)e(return)i(man)o(y)f(v)m(alues\))h(can)g(b)q(e)h +(retriev)o(ed)f(with)f(the)i(macro)-42 2267 y Fm(lua_Object)118 +b(lua_getresult)309 b(\(int)23 b(number\);)-42 2360 y +Fo(where)18 b Fm(number)d Fo(is)i(the)g(order)f(of)h(the)g(result,)f +(starting)f(with)h(1.)25 b(When)17 b(called)f(with)g(a)h(n)o(um)o(b)q +(er)f(larger)g(than)-42 2417 y(the)g(actual)e(n)o(um)o(b)q(er)h(of)f +(results,)h(this)f(function)h(returns)g Fm(LUA_NOOBJECT)p +Fo(.)29 2473 y(Tw)o(o)j(sp)q(ecial)g(Lua)g(functions)h(ha)o(v)o(e)e +(exclusiv)o(e)i(in)o(terfaces:)25 b Fm(error)18 b Fo(and)g +Fm(setfallback)p Fo(.)28 b(A)18 b(C)h(function)-42 2530 +y(can)d(generate)f(a)g(Lua)g(error)g(calling)f(the)h(function)-42 +2623 y Fm(void)24 b(lua_error)e(\(char)i(*message\);)911 +2748 y Fo(14)p eop +%%Page: 15 15 +15 14 bop -42 199 a Fo(This)18 b(function)g(nev)o(er)g(returns.)28 +b(If)18 b(the)g(C)f(function)h(has)g(b)q(een)h(called)f(from)e(Lua,)i +(the)g(corresp)q(onding)g(Lua)-42 256 y(execution)f(terminates,)d(as)i +(if)g(an)g(error)f(had)i(o)q(ccurred)g(inside)f(Lua)h(co)q(de.)23 +b(Otherwise,)16 b(the)h(whole)f(program)-42 312 y(terminates.)29 +369 y(F)l(allbac)o(ks)e(can)h(b)q(e)h(c)o(hanged)g(with:)-42 +454 y Fm(lua_Object)23 b(lua_setfallback)f(\(char)h(*name,)g +(lua_CFunction)f(fallback\);)-42 540 y Fo(The)12 b(\014rst)f(parameter) +f(is)g(the)i(fallbac)o(k)e(name,)h(and)g(the)h(second)f(a)h(CF)l +(unction)f(to)f(b)q(e)i(used)g(as)f(the)h(new)f(fallbac)o(k.)-42 +596 y(This)k(function)f(returns)h(a)f Fm(lua_Object)p +Fo(,)g(whic)o(h)g(is)g(the)h(old)g(fallbac)o(k)e(v)m(alue,)i(or)f +Fl(nil)g Fo(on)g(fail)g(\(in)o(v)m(alid)g(fallbac)o(k)-42 +653 y(name\).)19 b(This)c(old)g(v)m(alue)g(can)g(b)q(e)h(used)g(for)f +(c)o(haining)f(fallbac)o(ks.)29 709 y(An)i(example)e(of)g(C)h(co)q(de)h +(calling)e(a)h(Lua)g(function)h(is)e(sho)o(wn)h(in)g(Section)g(8.10.) +-42 829 y Fe(5.5)56 b(C)19 b(F)-5 b(unctions)-42 915 +y Fo(T)l(o)15 b(register)g(a)f(C)h(function)g(to)g(Lua,)g(there)g(is)g +(the)g(follo)o(wing)e(macro:)-42 1001 y Fm(#define)23 +b(lua_register\(n,f\))165 b(\(lua_pushcfunction\(f\),)21 +b(lua_storeglobal\(n\)\))-42 1057 y(/*)j(char)f(*n;)215 +b(*/)-42 1114 y(/*)24 b(lua_CFunction)e(f;)i(*/)-42 1199 +y Fo(whic)o(h)15 b(receiv)o(es)g(the)f(name)g(the)h(function)f(will)g +(ha)o(v)o(e)g(in)g(Lua,)h(and)g(a)f(p)q(oin)o(ter)g(to)g(the)h +(function.)20 b(This)14 b(p)q(oin)o(ter)-42 1256 y(m)o(ust)g(ha)o(v)o +(e)h(t)o(yp)q(e)g Fm(lua_CFunction)p Fo(,)e(whic)o(h)i(is)g(de\014ned)i +(as)-42 1341 y Fm(typedef)23 b(void)h(\(*lua_CFunction\))d(\(void\);) +-42 1427 y Fo(that)15 b(is,)f(a)h(p)q(oin)o(ter)g(to)f(a)h(function)g +(with)g(no)g(parameters)e(and)j(no)f(results.)29 1483 +y(In)g(order)e(to)h(comm)o(unicate)d(prop)q(erly)j(with)f(Lua,)h(a)f(C) +h(function)g(m)o(ust)e(follo)o(w)g(a)i(proto)q(col,)f(whic)o(h)g +(de\014nes)-42 1540 y(the)j(w)o(a)o(y)e(parameters)f(and)j(results)e +(are)h(passed.)29 1596 y(T)l(o)g(access)g(its)g(argumen)o(ts,)e(a)i(C)g +(function)g(calls:)-42 1682 y Fm(lua_Object)118 b(lua_getparam)309 +b(\(int)23 b(number\);)-42 1767 y Fo(where)16 b Fm(number)e +Fo(starts)g(with)h(1)g(to)f(get)h(the)h(\014rst)e(argumen)o(t.)19 +b(When)c(called)g(with)g(a)g(n)o(um)o(b)q(er)f(larger)g(than)h(the)-42 +1824 y(actual)d(n)o(um)o(b)q(er)g(of)g(argumen)o(ts,)f(this)g(function) +i(returns)f Fm(LUA_NOOBJECT)p Fo(.)e(In)j(this)f(w)o(a)o(y)l(,)g(it)g +(is)f(p)q(ossible)i(to)e(write)-42 1880 y(functions)k(that)g(w)o(ork)f +(with)h(a)g(v)m(ariable)f(n)o(um)o(b)q(er)h(of)f(parameters.)29 +1937 y(T)l(o)g(return)g(v)m(alues,)g(a)g(C)g(function)g(just)f(pushes)i +(them)e(on)o(to)g(the)i(stac)o(k,)e(in)h(direct)g(order;)f(see)i +(Section)f(5.2.)-42 1993 y(Lik)o(e)i(a)e(Lua)i(function,)f(a)g(C)g +(function)g(called)f(b)o(y)h(Lua)h(can)f(also)g(return)g(man)o(y)e +(results.)29 2050 y(Section)i(8.9)f(presen)o(ts)i(an)f(example)f(of)g +(a)h(CF)l(unction.)-42 2170 y Fe(5.6)56 b(References)17 +b(to)i(Lua)f(Ob)s(jects)-42 2256 y Fo(As)h(already)g(noted,)g +Fm(lua_Object)p Fo(s)f(are)h(v)o(olatile.)29 b(If)19 +b(the)g(C)g(co)q(de)h(needs)g(to)e(k)o(eep)h(a)g Fm(lua_Object)f +Fo(outside)-42 2312 y(blo)q(c)o(k)f(b)q(oundaries,)g(it)e(m)o(ust)g +(create)i(a)f Fn(r)n(efer)n(enc)n(e)f Fo(to)h(the)g(ob)s(ject.)23 +b(The)17 b(routines)f(to)g(manipulate)f(references)-42 +2369 y(are)g(the)h(follo)o(wing:)-42 2454 y Fm(int)286 +b(lua_ref)23 b(\(int)h(lock\);)-42 2511 y(lua_Object)118 +b(lua_getref)47 b(\(int)23 b(ref\);)-42 2567 y(void)262 +b(lua_pushref)23 b(\(int)g(ref\);)-42 2623 y(void)262 +b(lua_unref)23 b(\(int)g(ref\);)911 2748 y Fo(15)p eop +%%Page: 16 16 +16 15 bop -42 199 a Fo(The)23 b(function)e Fm(lua_ref)g +Fo(creates)g(a)h(reference)g(to)g(the)f(ob)s(ject)h(whic)o(h)f(is)h(on) +f(the)h(top)g(of)f(the)h(stac)o(k,)g(and)-42 256 y(returns)f(this)f +(reference.)36 b(If)21 b Fm(lock)f Fo(is)g(true,)h(the)g(ob)s(ject)f +(is)g Fn(lo)n(cke)n(d)p Fo(:)30 b(that)19 b(means)h(the)h(ob)s(ject)e +(will)h(not)g(b)q(e)-42 312 y(garbage)g(collected.)35 +b(Notice)19 b(that)h(an)g(unlo)q(c)o(k)o(ed)g(reference)h(ma)o(y)e(b)q +(e)i(garbage)e(collected.)35 b(Whenev)o(er)20 b(the)-42 +369 y(referenced)15 b(ob)s(ject)e(is)f(needed,)j(a)e(call)f(to)h +Fm(lua_getref)f Fo(returns)h(a)g(handle)h(to)f(it,)f(while)h +Fm(lua_pushref)f Fo(pushes)-42 425 y(the)k(ob)s(ject)g(on)g(the)g(stac) +o(k.)21 b(If)16 b(the)g(ob)s(ject)f(has)h(b)q(een)h(collected,)e +Fm(lua_getref)g Fo(returns)g Fm(LUA_NOOBJECT)p Fo(,)f(and)-42 +482 y Fm(lua_pushobject)g Fo(issues)h(an)g(error.)29 +538 y(When)h(a)f(reference)g(is)g(no)g(longer)g(needed,)h(it)e(can)i(b) +q(e)g(freed)f(with)g(a)f(call)h(to)f Fm(lua_unref)p Fo(.)-42 +681 y Fp(6)67 b(Prede\014ned)24 b(F)-6 b(unctions)24 +b(and)f(Libraries)-42 783 y Fo(The)17 b(set)g(of)f(prede\014ned)i +(functions)e(in)h(Lua)f(is)h(small)d(but)j(p)q(o)o(w)o(erful.)23 +b(Most)15 b(of)h(them)g(pro)o(vide)g(features)g(that)-42 +839 y(allo)o(ws)d(some)h(degree)g(of)h(re\015exivit)o(y)e(in)i(the)f +(language.)19 b(Some)14 b(of)g(these)h(features)f(cannot)g(b)q(e)i(sim) +o(ulated)c(with)-42 896 y(the)21 b(rest)f(of)g(the)h(Language)g(nor)f +(with)g(the)h(standard)f(Lua)h(API.)f(Others)h(are)f(just)h(helpful)f +(in)o(terfaces)g(to)-42 952 y(common)13 b(API)j(functions.)29 +1008 y(The)e(libraries,)e(on)i(the)f(other)g(hand,)h(pro)o(vide)g +(useful)f(routines)g(that)g(are)h(implemen)o(ted)d(directly)i(through) +-42 1065 y(the)g(standard)f(API.)h(Therefore,)f(they)h(are)f(not)g +(necessary)h(to)f(the)g(language,)g(and)h(are)f(pro)o(vided)h(as)f +(separated)-42 1121 y(C)j(mo)q(dules.)k(Curren)o(tly)c(there)g(are)g +(three)g(standard)g(libraries:)27 1215 y Fj(\017)22 b +Fo(string)14 b(manipulation;)27 1309 y Fj(\017)22 b Fo(mathematical)11 +b(functions)k(\(sin,)g(cos,)f(etc\);)27 1403 y Fj(\017)22 +b Fo(input)15 b(and)h(output)f(\(plus)g(some)e(system)h(facilities\).) +-42 1497 y(In)j(order)f(to)g(ha)o(v)o(e)g(access)g(to)g(these)g +(libraries,)f(the)h(host)g(program)e(m)o(ust)h(call)g(the)h(functions)g +Fm(strlib_open)p Fo(,)-42 1553 y Fm(mathlib_open)p Fo(,)e(and)h +Fm(iolib_open)p Fo(,)e(declared)j(in)f Fm(lualib.h)p +Fo(.)-42 1675 y Fe(6.1)56 b(Prede\014ned)18 b(F)-5 b(unctions)-42 +1761 y Fm(dofile)24 b(\(filename\))-42 1846 y Fo(This)18 +b(function)g(receiv)o(es)g(a)f(\014le)h(name,)f(op)q(ens)i(it)e(and)h +(executes)h(its)e(con)o(ten)o(ts)g(as)h(a)f(Lua)i(c)o(h)o(unk,)f(or)g +(as)f(pre-)-42 1903 y(compiled)e(c)o(h)o(unks.)20 b(When)c(called)f +(without)f(argumen)o(ts,)g(it)g(executes)i(the)g(con)o(ten)o(ts)e(of)h +(the)h(standard)f(input.)-42 1959 y(It)i(returns)g(1)f(if)g(there)h +(are)f(no)h(errors,)f Fl(nil)g Fo(otherwise.)23 b(It)17 +b(issues)f(an)h(error)f(when)h(called)f(with)g(a)h(non)f(string)-42 +2016 y(argumen)o(t.)-42 2136 y Fm(dostring)23 b(\(string\))-42 +2222 y Fo(This)e(function)h(executes)g(a)f(giv)o(en)g(string)f(as)h(a)g +(Lua)h(c)o(h)o(unk.)38 b(It)22 b(returns)f(1)g(if)g(there)g(are)g(no)h +(errors,)f Fl(nil)-42 2278 y Fo(otherwise.)-42 2398 y +Fm(next)j(\(table,)f(index\))-42 2484 y Fo(This)18 b(function)f(allo)o +(ws)f(a)i(program)d(to)i(tra)o(v)o(erse)g(all)g(\014elds)h(of)f(a)g +(table.)27 b(Its)18 b(\014rst)f(argumen)o(t)f(is)i(a)f(table)g(and)-42 +2540 y(its)e(second)i(argumen)o(t)c(is)j(an)f(index)h(in)g(this)f +(table.)21 b(It)15 b(returns)h(the)g(next)f(index)h(of)g(the)f(table)h +(and)f(the)h(v)m(alue)-42 2597 y(asso)q(ciated)g(with)f(the)h(index.)23 +b(When)17 b(called)e(with)h Fl(nil)f Fo(as)g(its)h(second)g(argumen)o +(t,)e(the)j(function)e(returns)h(the)911 2748 y(16)p +eop +%%Page: 17 17 +17 16 bop -42 199 a Fo(\014rst)16 b(index)g(of)g(the)g(table)g(\(and)f +(its)h(asso)q(ciated)f(v)m(alue\).)22 b(When)17 b(called)e(with)h(the)g +(last)f(index,)h(or)f(with)h Fl(nil)f Fo(in)-42 256 y(an)h(empt)o(y)e +(table,)g(it)g(returns)h Fl(nil)p Fo(.)29 312 y(In)i(Lua)f(there)g(is)g +(no)g(declaration)f(of)h(\014elds;)g(seman)o(tically)l(,)d(there)j(is)g +(no)g(di\013erence)g(b)q(et)o(w)o(een)h(a)e(\014eld)i(not)-42 +369 y(presen)o(t)g(in)f(a)g(table)f(or)h(a)g(\014eld)h(with)e(v)m(alue) +i Fl(nil)p Fo(.)22 b(Therefore,)16 b(the)g(function)g(only)g(considers) +g(\014elds)h(with)e(non)-42 425 y(nil)g(v)m(alues.)20 +b(The)c(order)f(the)g(indices)g(are)g(en)o(umerated)f(is)h(not)g(sp)q +(eci\014ed,)h Fn(even)f(for)i(numeric)f(indic)n(es)p +Fo(.)29 482 y(See)g(Section)f(8.2)f(for)h(an)g(example)f(of)h(the)g +(use)h(of)e(this)h(function.)-42 602 y Fm(nextvar)23 +b(\(name\))-42 687 y Fo(This)18 b(function)g(is)g(similar)d(to)i(the)i +(function)f Fm(next)p Fo(,)f(but)i(it)e(iterates)g(o)o(v)o(er)g(the)h +(global)f(v)m(ariables.)28 b(Its)18 b(single)-42 744 +y(argumen)o(t)c(is)h(the)h(name)e(of)h(a)g(global)f(v)m(ariable,)g(or)h +Fl(nil)g Fo(to)g(get)g(a)g(\014rst)g(name.)k(Similarly)13 +b(to)h Fm(next)p Fo(,)h(it)g(returns)-42 800 y(the)j(name)e(of)g +(another)h(v)m(ariable)f(and)h(its)f(v)m(alue,)i(or)e +Fl(nil)g Fo(if)g(there)h(are)g(no)g(more)e(v)m(ariables.)25 +b(See)18 b(Section)e(8.2)-42 857 y(for)f(an)g(example)f(of)h(the)g(use) +h(of)f(this)f(function.)-42 977 y Fm(tostring)23 b(\(e\))-42 +1063 y Fo(This)15 b(function)g(receiv)o(es)g(an)g(argumen)o(t)f(of)h +(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 +(in)g(a)g(reasonable)f(format.)-42 1183 y Fm(print)24 +b(\(e1,)f(e2,)g(...\))-42 1269 y Fo(This)18 b(function)g(receiv)o(es)g +(an)o(y)g(n)o(um)o(b)q(er)g(of)f(argumen)o(ts,)g(and)h(prin)o(ts)g +(their)f(v)m(alues)i(in)f(a)g(reasonable)f(format.)-42 +1325 y(Eac)o(h)i(v)m(alue)g(is)f(prin)o(ted)h(in)f(a)h(new)g(line.)30 +b(This)18 b(function)h(is)f(not)g(in)o(tended)h(for)f(formatted)f +(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) +g(a)g(v)m(alue,)i(for)e(instance)g(for)g(error)g(messages)f(or)h +(debugging.)34 b(See)20 b(Section)f(6.4)g(for)-42 1438 +y(functions)c(for)g(formatted)e(output.)-42 1558 y Fm(tonumber)23 +b(\(e\))-42 1644 y Fo(This)13 b(function)f(receiv)o(es)g(one)h(argumen) +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 +(er.)18 b(If)13 b(the)g(argumen)o(t)d(is)i(already)-42 +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 +(a)g(n)o(um)o(b)q(er)f(\(see)h(Section)h(4.2\),)d(it)i(returns)g(that)f +(n)o(um)o(b)q(er;)h(otherwise,)-42 1757 y(it)g(returns)g +Fl(nil)p Fo(.)-42 1877 y Fm(type)24 b(\(v\))-42 1963 +y Fo(This)13 b(function)h(allo)o(ws)d(Lua)j(to)e(test)h(the)g(t)o(yp)q +(e)h(of)f(a)g(v)m(alue.)19 b(It)13 b(receiv)o(es)h(one)f(argumen)o(t,)f +(and)h(returns)g(its)g(t)o(yp)q(e,)-42 2019 y(co)q(ded)21 +b(as)e(a)g(string.)31 b(The)19 b(p)q(ossible)g(results)g(of)g(this)g +(function)g(are)g Fm("nil")g Fo(\(a)f(string,)h(not)g(the)h(v)m(alue)f +Fl(nil)p Fo(\),)-42 2075 y Fm("number")p Fo(,)g Fm("string")p +Fo(,)g Fm("table")p Fo(,)h Fm("function")e Fo(\(returned)h(b)q(oth)h +(for)f(C)g(functions)g(and)h(Lua)f(functions\),)-42 2132 +y(and)d Fm("userdata")p Fo(.)29 2188 y(Besides)f(this)f(string,)f(the)i +(function)f(returns)h(a)f(second)h(result,)f(whic)o(h)g(is)g(the)h +Fn(tag)g Fo(of)f(the)g(v)m(alue.)20 b(This)14 b(tag)-42 +2245 y(can)g(b)q(e)h(used)f(to)f(distinguish)g(b)q(et)o(w)o(een)g(user) +h(data)f(with)g(di\013eren)o(t)g(tags,)g(and)h(b)q(et)o(w)o(een)f(C)h +(functions)f(and)h(Lua)-42 2301 y(functions.)-42 2421 +y Fm(assert)24 b(\(v\))-42 2507 y Fo(This)15 b(function)g(issues)g(an)g +Fn(\\assertion)h(faile)n(d!")k Fo(error)15 b(when)h(its)e(argumen)o(t)f +(is)i Fl(nil)p Fo(.)911 2748 y(17)p eop +%%Page: 18 18 +18 17 bop -42 199 a Fm(error)24 b(\(message\))-42 285 +y Fo(This)e(function)f(issues)g(an)h(error)f(message)f(and)h +(terminates)f(the)h(last)g(called)g(function)g(from)f(the)i(library)-42 +342 y(\()p Fm(lua_dofile)p Fo(,)14 b Fm(lua_dostring)p +Fo(,)f(.)7 b(.)g(.)g(\).)20 b(It)15 b(nev)o(er)g(returns.)-42 +462 y Fm(setglobal)23 b(\(name,)g(value\))-42 547 y Fo(This)18 +b(function)h(assigns)e(the)i(giv)o(en)f(v)m(alue)g(to)g(a)g(global)f(v) +m(ariable.)29 b(The)19 b(string)e Fm(name)h Fo(do)q(es)h(not)f(need)h +(to)f(b)q(e)-42 604 y(a)f(syn)o(tactically)d(v)m(alid)i(v)m(ariable)g +(name.)22 b(Therefore,)17 b(this)f(function)g(can)g(set)h(global)e(v)m +(ariables)g(with)h(strange)-42 660 y(names)f(lik)o(e)f +Fm(m)24 b(v)f(1)15 b Fo(or)g Fm(34)p Fo(.)20 b(It)15 +b(returns)g(the)g(v)m(alue)h(of)e(its)h(second)h(argumen)o(t.)-42 +780 y Fm(getglobal)23 b(\(name\))-42 866 y Fo(This)e(function)g +(retriev)o(es)g(the)g(v)m(alue)h(of)f(a)g(global)f(v)m(ariable.)37 +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) +-42 923 y(syn)o(tactically)14 b(v)m(alid)g(v)m(ariable)h(name.)-42 +1043 y Fm(setfallback)23 b(\(fallbackname,)f(newfallback\))-42 +1128 y Fo(This)13 b(function)f(sets)g(a)h(new)f(fallbac)o(k)g(function) +g(to)g(the)h(giv)o(en)f(fallbac)o(k.)18 b(It)12 b(returns)h(the)g(old)f +(fallbac)o(k)f(function.)-42 1250 y Fe(6.2)56 b(String)19 +b(Manipulation)-42 1336 y Fo(This)j(library)e(pro)o(vides)i(generic)f +(functions)h(for)f(string)g(manipulation,)f(suc)o(h)i(as)g(\014nding)g +(and)g(extracting)-42 1392 y(substrings.)29 b(When)19 +b(indexing)f(a)g(string,)f(the)i(\014rst)f(c)o(haracter)f(has)h(p)q +(osition)g(1.)29 b(See)19 b(Section)f(8.3)f(for)h(some)-42 +1449 y(examples)c(on)i(string)e(manipulation)f(in)i(Lua.)-42 +1569 y Fm(strfind)23 b(\(str,)h(substr,)e([init,)i([end]]\))-42 +1655 y Fo(Receiv)o(es)c(t)o(w)o(o)e(string)h(argumen)o(ts,)f(and)h +(returns)g(a)g(n)o(um)o(b)q(er.)32 b(This)19 b(n)o(um)o(b)q(er)f +(indicates)h(the)g(\014rst)g(p)q(osition)-42 1711 y(where)13 +b(the)f(second)h(argumen)o(t)e(app)q(ears)h(in)g(the)g(\014rst)g +(argumen)o(t.)17 b(If)c(the)f(second)h(argumen)o(t)d(is)i(not)g(a)g +(substring)-42 1768 y(of)j(the)g(\014rst)g(one,)f(then)i +Fm(strfind)e Fo(returns)h Fl(nil)p Fo(.)j(A)e(third)e(optional)g(n)o +(umerical)f(argumen)o(t)g(sp)q(eci\014es)j(where)f(to)-42 +1824 y(start)f(the)i(searc)o(h.)j(Another)d(optional)d(n)o(umerical)h +(argumen)o(t)f(sp)q(eci\014es)j(where)g(to)e(stop)h(it.)-42 +1944 y Fm(strlen)24 b(\(s\))-42 2030 y Fo(Receiv)o(es)16 +b(a)f(string)f(and)i(returns)f(its)f(length.)-42 2150 +y Fm(strsub)24 b(\(s,)f(i,)h([j]\))-42 2236 y Fo(Returns)17 +b(another)f(string,)f(whic)o(h)h(is)g(a)g(substring)g(of)g +Fm(s)p Fo(,)g(starting)e(at)i Fm(i)g Fo(and)g(runing)g(un)o(til)g +Fm(j)p Fo(.)23 b(If)16 b Fm(j)g Fo(is)g(absen)o(t,)-42 +2292 y(it)f(is)g(assumed)g(to)f(b)q(e)i(equal)g(to)e(the)i(length)f(of) +g Fm(s)p Fo(.)20 b(P)o(articularly)l(,)13 b(the)j(call)e +Fm(strsub\(s,1,j\))g Fo(returns)h(a)g(pre\014x)-42 2349 +y(of)g Fm(s)g Fo(with)g(length)g Fm(j)p Fo(,)f(while)h(the)g(call)g +Fm(strsub\(s,i\))e Fo(returns)i(a)g(su\016x)g(of)g Fm(s)p +Fo(,)g(starting)e(at)i Fm(i)p Fo(.)-42 2469 y Fm(strlower)23 +b(\(s\))-42 2555 y Fo(Receiv)o(es)14 b(a)e(string)g(and)h(returns)f(a)h +(cop)o(y)f(of)h(that)f(string)f(with)h(all)g(upp)q(er)i(case)f(letters) +e(c)o(hanged)i(to)f(lo)o(w)o(er)g(case.)-42 2611 y(All)j(other)g(c)o +(haracters)f(are)h(left)g(unc)o(hanged.)911 2748 y(18)p +eop +%%Page: 19 19 +19 18 bop -42 199 a Fm(strupper)23 b(\(s\))-42 285 y +Fo(Receiv)o(es)14 b(a)e(string)g(and)h(returns)f(a)h(cop)o(y)f(of)h +(that)f(string)f(with)h(all)g(lo)o(w)o(er)f(case)i(letters)f(c)o +(hanged)h(to)f(upp)q(er)i(case.)-42 342 y(All)h(other)g(c)o(haracters)f +(are)h(left)g(unc)o(hanged.)-42 462 y Fm(ascii)24 b(\(s,)f([i]\))-42 +547 y Fo(Returns)16 b(the)f(ascii)g(co)q(de)h(of)e(the)i(c)o(haracter)e +Fm(s[i])p Fo(.)19 b(If)d Fm(i)f Fo(is)g(absen)o(t,)f(it)h(is)f(assumed) +h(to)f(b)q(e)i(1.)-42 667 y Fm(format)24 b(\(formatstring,)d(e1,)j(e2,) +f(...\))-42 753 y Fo(This)14 b(function)f(returns)g(a)h(formated)d(v)o +(ersion)i(of)g(its)g(v)m(ariable)g(n)o(um)o(b)q(er)f(of)i(argumen)o(ts) +d(follo)o(wing)g(the)j(descrip-)-42 810 y(tion)h(giv)o(en)f(in)h(its)f +(\014rst)g(argumen)o(t)f(\(whic)o(h)h(m)o(ust)g(b)q(e)h(a)g(string\).)j +(The)d(format)e(string)g(follo)o(ws)g(the)i(same)f(rules)-42 +866 y(as)g(the)h Fm(printf)e Fo(family)f(of)i(standard)g(C)g +(functions.)19 b(The)c(only)f(di\013erencies)g(are)g(that)f(the)i +(options/mo)q(di\014ers)-42 923 y Fm(*)p Fo(,)f Fm(l)p +Fo(,)g Fm(L)p Fo(,)f Fm(n)p Fo(,)h Fm(p)p Fo(,)g(and)g +Fm(h)g Fo(are)f(not)h(supp)q(orted,)g(and)g(there)g(is)g(an)g(extra)f +(option,)g Fm(q)p Fo(.)19 b(This)14 b(option)f(formats)f(a)h(string)-42 +979 y(in)19 b(a)f(form)f(suitable)h(to)g(b)q(e)i(safely)e(read)g(bac)o +(k)h(b)o(y)f(the)h(Lua)g(in)o(terpreter.)30 b(The)19 +b(string)e(is)h(written)g(b)q(et)o(w)o(een)-42 1036 y(double)g(quotes,) +f(and)h(all)e(double)i(quotes,)f(returns)g(and)g(bac)o(kslashes)g(in)g +(the)h(string)e(are)h(correctly)f(escap)q(ed)-42 1092 +y(when)g(written.)29 1148 y(The)k(options)e Fm(c)p Fo(,)i +Fm(d)p Fo(,)g Fm(E)p Fo(,)e Fm(e)p Fo(,)i Fm(f)p Fo(,)g +Fm(g)f(i)p Fo(,)h Fm(o)p Fo(,)g Fm(u)p Fo(,)g Fm(X)p +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) +o(t,)f(while)h Fm(q)g Fo(and)h Fm(s)-42 1205 y Fo(exp)q(ects)c(a)f +(string.)-42 1327 y Fe(6.3)56 b(Mathematical)20 b(F)-5 +b(unctions)-42 1412 y Fo(This)13 b(library)f(is)h(an)g(in)o(terface)f +(to)h(some)e(functions)i(of)g(the)g(standard)g(C)g(math)e(library)l(.) +19 b(Moreo)o(v)o(er,)11 b(it)i(registers)-42 1469 y(a)i(fallbac)o(k)f +(for)h(the)g(binary)g(op)q(erator)f Fm(^)h Fo(whic)o(h,)g(when)h +(applied)f(to)f(n)o(um)o(b)q(ers)h Fm(x^y)p Fo(,)f(returns)h +Fd(x)1619 1452 y Fc(y)1640 1469 y Fo(.)29 1525 y(The)g(library)f(pro)o +(vides)h(the)g(follo)o(wing)e(functions:)-42 1619 y Fm(abs)24 +b(acos)f(asin)h(atan)f(atan2)g(ceil)g(cos)h(floor)f(log)g(log10)-42 +1676 y(max)h(min)47 b(mod)h(sin)f(sqrt)23 b(tan)h(random)f(randomseed) +-42 1769 y Fo(Most)17 b(of)g(them)g(are)g(only)g(in)o(terfaces)g(to)g +(the)g(homon)o(ymous)e(functions)j(in)f(the)h(C)f(library)l(,)g(except) +h(that,)f(for)-42 1826 y(the)f(trigonometri)o(c)d(functions,)h(all)h +(angles)f(are)h(expressed)h(in)f(degrees.)29 1882 y(The)d(function)f +Fm(max)g Fo(returns)g(the)g(maxim)o(um)d(v)m(alue)j(of)g(its)f(n)o +(umeric)h(argumen)o(ts.)16 b(Similarly)l(,)9 b Fm(min)i +Fo(computes)-42 1939 y(the)16 b(minim)o(um)o(.)h(Both)e(can)g(b)q(e)h +(used)g(with)e(an)h(unlimited)f(n)o(um)o(b)q(er)g(of)h(argumen)o(ts.)29 +1995 y(The)g(function)h Fm(mod)e Fo(is)h(equiv)m(alen)o(t)g(to)f(the)i +Fm(\045)f Fo(op)q(erator)f(in)h(C.)29 2052 y(The)f(functions)g +Fm(random)f Fo(and)h Fm(randomseed)f Fo(are)h(in)o(terfaces)f(to)g(the) +h(simple)f(random)g(generator)g(functions)-42 2108 y +Fm(rand)18 b Fo(and)h Fm(srand)p Fo(,)f(pro)o(vided)g(b)o(y)g(ANSI)h +(C.)f(The)h(function)f Fm(random)f Fo(returns)h(pseudo-random)g(n)o(um) +o(b)q(ers)g(in)-42 2165 y(the)e(range)f([0)p Fd(;)8 b +Fo(1\).)-42 2286 y Fe(6.4)56 b(I/O)19 b(F)-5 b(acilities)-42 +2372 y Fo(All)20 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)f Fn(curr)n(ent)i Fo(\014les,)g(one)g(for)g(reading)f +(and)h(one)g(for)f(writing.)-42 2429 y(Initially)l(,)14 +b(the)h(curren)o(t)g(input)h(\014le)f(is)g Fm(stdin)p +Fo(,)f(and)h(the)g(curren)o(t)g(output)g(\014le)h(is)e +Fm(stdout)p Fo(.)29 2485 y(Unless)h(otherwise)g(stated,)f(all)g(I/O)i +(functions)f(return)g(1)g(on)g(success)h(and)f Fl(nil)f +Fo(on)h(failure.)911 2748 y(19)p eop +%%Page: 20 20 +20 19 bop -42 199 a Fm(readfrom)23 b(\(filename\))-42 +285 y Fo(This)e(function)g(op)q(ens)g(a)g(\014le)g(named)f +Fm(filename)g Fo(and)h(sets)g(it)f(as)h(the)g Fn(curr)n(ent)f +Fo(input)h(\014le.)38 b(When)21 b(called)-42 342 y(without)c +(parameters,)e(this)i(function)g(closes)f(the)i(curren)o(t)f(input)g +(\014le,)g(and)h(restores)e Fm(stdin)h Fo(as)f(the)i(curren)o(t)-42 +398 y(input)e(\014le.)29 454 y Fn(System)f(dep)n(endent:)k +Fo(if)13 b Fm(filename)h Fo(starts)e(with)i(a)g Fm(|)p +Fo(,)g(then)g(a)g(pip)q(ed)h(input)g(is)e(op)q(en,)i(via)e(function)i +Fm(popen)p Fo(.)-42 574 y Fm(writeto)23 b(\(filename\))-42 +660 y Fo(This)d(function)g(op)q(ens)g(a)f(\014le)h(named)f +Fm(filename)g Fo(and)h(sets)g(it)f(as)g(the)h Fn(curr)n(ent)g +Fo(output)f(\014le.)34 b(Notice)20 b(that,)-42 717 y(if)g(the)g(\014le) +f(already)h(exists,)f(it)h(will)e(b)q(e)i Fn(c)n(ompletely)g(er)n(ase)n +(d)g Fo(with)f(this)g(op)q(eration.)33 b(When)20 b(called)f(without)-42 +773 y(parameters,)13 b(this)i(function)g(closes)f(the)h(curren)o(t)g +(output)g(\014le,)g(and)g(restores)f Fm(stdout)g Fo(as)h(the)g(curren)o +(t)g(output)-42 829 y(\014le.)29 886 y Fn(System)e(dep)n(endent:)18 +b Fo(if)12 b Fm(filename)f Fo(starts)g(with)h(a)g Fm(|)p +Fo(,)g(then)h(a)f(pip)q(ed)h(output)g(is)e(op)q(en,)j(via)d(function)i +Fm(popen)p Fo(.)-42 1006 y Fm(appendto)23 b(\(filename\))-42 +1091 y Fo(This)11 b(function)g(op)q(ens)h(a)f(\014le)g(named)f +Fm(filename)g Fo(and)i(sets)f(it)f(as)h(the)g Fn(curr)n(ent)g +Fo(output)g(\014le.)19 b(Unlik)o(e)10 b(the)h Fm(writeto)-42 +1148 y Fo(op)q(eration,)k(this)f(function)h(do)q(es)h(not)f(erase)g(an) +o(y)f(previous)h(con)o(ten)o(t)g(of)g(the)g(\014le.)-42 +1268 y Fm(remove)24 b(\(filename\))-42 1354 y Fo(This)15 +b(function)g(deletes)h(the)f(\014le)g(with)g(the)g(giv)o(en)g(name.)-42 +1473 y Fm(rename)24 b(\(name1,)e(name2\))-42 1559 y Fo(This)15 +b(function)g(renames)f(\014le)i Fm(name1)e Fo(to)h Fm(name2)p +Fo(.)-42 1679 y Fm(tmpname)23 b(\(\))-42 1765 y Fo(This)15 +b(function)g(returns)g(a)g(string)f(with)h(a)g(\014le)g(name)f(that)h +(can)g(safely)g(b)q(e)g(used)h(for)f(a)g(temp)q(orary)e(\014le.)-42 +1885 y Fm(read)24 b(\([format]\))-42 1970 y Fo(This)17 +b(function)g(returns)f(a)h(v)m(alue)g(read)g(from)e(the)i(curren)o(t)g +(input.)25 b(An)17 b(optional)f(string)g(argumen)o(t)f(sp)q(eci\014es) +-42 2027 y(the)h(w)o(a)o(y)e(the)h(input)g(is)g(in)o(terpreted.)29 +2083 y(Without)d(a)h(format)d(argumen)o(t,)h Fm(read)i +Fo(\014rst)f(skips)h(blanks,)g(tabs)f(and)h(newlines.)19 +b(Then)14 b(it)e(c)o(hec)o(ks)h(whether)-42 2140 y(the)h(curren)o(t)f +(c)o(haracter)f(is)h Fm(")g Fo(or)f Fm(')p Fo(.)19 b(If)14 +b(so,)e(it)h(reads)g(a)f(string)g(up)i(to)f(the)g(ending)g(quotation)f +(mark,)f(and)j(returns)-42 2196 y(this)h(string,)f(without)g(the)h +(quotation)f(marks.)k(Otherwise)d(it)g(reads)g(up)h(to)e(a)h(blank,)g +(tab)f(or)h(newline.)29 2253 y(The)g(format)e(string)i(can)g(ha)o(v)o +(e)g(the)g(follo)o(wing)e(format:)30 2345 y Fm(?[n])-42 +2438 y Fo(where)j Fm(?)f Fo(can)g(b)q(e:)-42 2530 y Fl('s')i(or)g('S')k +Fo(to)15 b(read)g(a)g(string;)-42 2623 y Fl('f)5 b(')17 +b(or)g('F')22 b Fo(to)14 b(read)h(a)g(real)g(n)o(um)o(b)q(er;)911 +2748 y(20)p eop +%%Page: 21 21 +21 20 bop -42 199 a Fl('i')16 b(or)i('I')j Fo(to)15 b(read)g(an)g(in)o +(teger.)-42 293 y(The)e(optional)e Fm(n)h Fo(is)g(a)g(n)o(um)o(b)q(er)g +(whic)o(h)g(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(read)g(to)e(comp)q(ose)h(the)g(input)-42 +350 y(v)m(alue.)21 b(P)o(articularly)l(,)12 b(the)k(format)c +Fm("s1")j Fo(reads)g(a)g(single)g(c)o(haracter.)-42 470 +y Fm(readuntil)23 b(\(char\))-42 555 y Fo(Reads)f(the)f(curren)o(t)f +(input)h(un)o(til)f(the)h(\014rst)f(o)q(currence)i(of)e(the)h(giv)o(en) +f(c)o(haracter.)36 b(When)21 b(called)f(with)h(no)-42 +612 y(parameters,)16 b(reads)h(un)o(til)f(the)h(end)h(of)e(the)h +(curren)o(t)g(input)g(\014le.)26 b(Returns)17 b(the)h(string)e(read.)25 +b(The)17 b(c)o(haracter)-42 668 y(itself)e(is)f(not)h(read.)-42 +788 y Fm(write)24 b(\(value,)f([format]\))-42 874 y Fo(This)d(function) +g(writes)f(the)i(v)m(alue)f(of)g(its)f(\014rst)h(argumen)o(t)e(to)i +(the)g(curren)o(t)g(output.)35 b(An)20 b(optional)f(second)-42 +931 y(argumen)o(t)13 b(sp)q(eci\014es)i(the)f(format)e(to)i(b)q(e)h +(used.)20 b(This)14 b(format)e(is)i(giv)o(en)f(as)h(a)g(string,)f(comp) +q(osed)h(of)g(four)f(parts.)-42 987 y(The)j(\014rst)f(part)f(is)h(the)g +(only)g(one)g(not)g(optional,)f(and)h(m)o(ust)f(b)q(e)i(one)f(of)g(the) +g(follo)o(wing)e(c)o(haracters:)-42 1081 y Fl('s')k(or)g('S')k +Fo(to)15 b(write)f(strings;)-42 1175 y Fl('f)5 b(')17 +b(or)g('F')22 b Fo(to)14 b(write)g(\015oats;)-42 1269 +y Fl('i')i(or)i('I')j Fo(to)15 b(write)f(in)o(tegers;)-42 +1362 y Fl('q')j(or)g('Q')22 b Fo(to)17 b(write)g(quoted)g(strings.)27 +b(This)17 b(format)e(writes)i(the)h(string)f(in)g(a)h(form)e(suitable)h +(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 +(in)o(terpreter.)18 b(The)13 b(string)e(is)i(written)e(b)q(et)o(w)o +(een)i(double)g(quotes,)g(and)g(all)e(double)72 1475 +y(quotes,)k(returns)g(and)g(bac)o(kslashes)g(in)g(the)g(string)f(are)h +(correctly)g(escap)q(ed)h(when)f(written.)-42 1569 y(These)h(c)o +(haracters)e(can)i(b)q(e)g(follo)o(w)o(ed)d(b)o(y)30 +1663 y Fm([?][m][.n])-42 1757 y Fo(where:)-42 1851 y +Fm(?)23 b Fo(indicates)15 b(justi\014cation)f(inside)h(the)g(\014eld.) +100 1944 y(')p Fm(<)p Fo(')22 b(righ)o(t)14 b(justi\014cation)g +(\(default\);)100 2017 y(')p Fm(>)p Fo(')22 b(left)15 +b(justi\014cation;)100 2090 y(')p Fm(|)p Fo(')22 b(cen)o(ter)15 +b(justi\014cation.)-42 2184 y Fm(m)23 b Fo(Indicates)16 +b(the)f(\014eld)g(size)g(in)g(c)o(haracters.)-42 2278 +y Fm(.n)23 b Fo(F)l(or)18 b(reals,)h(indicates)f(the)h(n)o(um)o(b)q(er) +f(of)g(digital)f(places.)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(b)q(er)j(of)72 2335 y(digits.)h(This)c(option)f +(has)h(no)g(meaning)f(for)h(strings.)29 2428 y(When)20 +b(called)e(without)g(a)h(format)e(string,)i(this)f(function)h(writes)f +(n)o(um)o(b)q(ers)h(using)f(the)i Fm(\045g)e Fo(format)f(and)-42 +2485 y(strings)e(with)f Fm(\045s)p Fo(.)20 b(F)l(or)14 +b(b)q(etter)h(format)e(facilities,)g(the)j(function)f +Fm(format)f Fo(should)h(b)q(e)h(used)g(\(see)f(Section)g(6.2\).)911 +2748 y(21)p eop +%%Page: 22 22 +22 21 bop -42 199 a Fm(date)24 b(\([format]\))-42 285 +y Fo(This)19 b(function)f(returns)h(a)f(string)g(con)o(taining)f(date)h +(and)h(time)e(formatted)g(according)h(to)g(the)g(giv)o(en)g(string)-42 +342 y Fm(format)p Fo(,)g(follo)o(wing)e(the)i(same)f(rules)h(of)f(the)i +(ANSI)f(C)g(function)g Fm(strftime)p Fo(.)28 b(When)18 +b(called)g(without)f(argu-)-42 398 y(men)o(ts,)d(it)g(returns)h(a)g +(reasonable)g(date)g(and)g(time)f(represen)o(tation.)29 +454 y(This)h(function)g(replaces)g(functions)g Fm(date)g +Fo(and)g Fm(time)g Fo(from)e(previous)i(Lua)g(v)o(ersions.)-42 +574 y Fm(exit)24 b(\([code]\))-42 660 y Fo(This)15 b(function)g(calls)g +(the)g(C)g(function)g Fm(exit)p Fo(,)f(with)h(an)g(optional)f +Fm(code)p Fo(,)g(to)g(terminate)g(the)h(program.)-42 +804 y Fp(7)67 b(The)23 b(Debuger)f(In)n(terface)-42 905 +y Fo(Lua)c(has)e(no)h(built)f(in)g(debuger)i(facilities.)k(Instead,)17 +b(it)f(o\013ers)g(a)h(sp)q(ecial)f(in)o(terface,)g(b)o(y)h(means)e(of)i +(functions)-42 961 y(and)12 b Fn(ho)n(oks)p Fo(,)g(whic)o(h)f(allo)o +(ws)f(the)i(construction)e(of)h(di\013eren)o(t)g(kinds)h(of)f +(debugers,)h(pro\014les,)g(and)g(other)f(to)q(ols)f(that)-42 +1018 y(need)17 b(\\inside")d(information)e(from)i(the)h(in)o +(terpreter.)k(This)c(in)o(terface)f(is)h(declared)h(in)f(the)g(\014le)g +Fm(luadebug.h)p Fo(.)-42 1140 y Fe(7.1)56 b(Stac)n(k)19 +b(and)g(F)-5 b(unction)20 b(Information)-42 1225 y Fo(The)c(main)e +(function)h(to)f(get)h(information)d(ab)q(out)j(the)h(in)o(terpreter)e +(stac)o(k)g(is)-42 1319 y Fm(lua_Function)23 b(lua_stackedfunction)e +(\(int)i(level\);)-42 1413 y Fo(It)18 b(returns)f(a)g(handle)h(\()p +Fm(lua_Function)p Fo(\))d(to)h(the)i Fn(activation)g(r)n(e)n(c)n(or)n +(d)j Fo(of)c(the)h(function)f(executing)g(at)g(a)g(giv)o(en)-42 +1470 y(lev)o(el.)34 b(Lev)o(el)20 b(0)f(is)h(the)g(curren)o(t)f +(running)h(function,)h(while)e(lev)o(el)g Fd(n)14 b Fo(+)f(1)20 +b(is)f(the)h(function)g(that)f(has)h(called)-42 1526 +y(lev)o(el)g Fd(n)p Fo(.)34 b(When)21 b(called)e(with)h(a)f(lev)o(el)h +(greater)f(than)h(the)g(stac)o(k)f(depth,)i Fm(lua_stackedfunction)d +Fo(returns)-42 1582 y Fm(LUA_NOOBJECT)p Fo(.)29 1639 +y(The)k(t)o(yp)q(e)f Fm(lua_Function)f Fo(is)h(just)g(another)g(name)g +(to)g Fm(lua_Object)p Fo(.)37 b(Although,)22 b(in)f(this)g(library)l(,) +h(a)-42 1695 y Fm(lua_Function)12 b Fo(can)i(b)q(e)g(used)g(wherev)o +(er)f(a)g Fm(lua_Object)f Fo(is)h(required,)g(a)g(parameter)f +Fm(lua_Function)f Fo(accepts)-42 1752 y(only)k(a)g(handle)h(returned)f +(b)o(y)g Fm(lua_stackedfunction)p Fo(.)29 1808 y(Three)g(other)g +(functions)g(pro)q(duce)h(extra)f(information)d(ab)q(out)j(a)g +(function:)-42 1902 y Fm(void)24 b(lua_funcinfo)e(\(lua_Object)g(func,) +i(char)f(**filename,)f(int)i(*linedefined\);)-42 1959 +y(int)g(lua_currentline)e(\(lua_Function)g(func\);)-42 +2015 y(char)i(*lua_getobjname)e(\(lua_Object)g(o,)i(char)f(**name\);) +-42 2109 y(lua_funcinfo)16 b Fo(giv)o(es)g(the)h(\014le)g(name)g(and)g +(the)g(line)g(where)g(the)g(giv)o(en)g(function)g(has)g(b)q(een)h +(de\014ned.)27 b(If)17 b(the)-42 2165 y(\\function")f(is)f(in)h(fact)g +(the)g(main)f(co)q(de)h(of)g(a)g(c)o(h)o(unk,)g Fm(linedefined)f +Fo(is)g(0.)22 b(If)17 b(the)f(function)g(is)f(a)h(C)g(function,)-42 +2222 y Fm(linedefined)e Fo(is)h(-1,)g(and)g Fm(filename)f +Fo(is)h Fm("\(C\)")p Fo(.)29 2278 y(The)j(function)f +Fm(lua_currentline)f Fo(giv)o(es)g(the)i(curren)o(t)f(line)g(where)h(a) +f(giv)o(en)g(function)h(is)f(executing.)26 b(It)-42 2335 +y(only)16 b(w)o(orks)e(if)h(the)g(function)h(has)f(b)q(een)i +(pre-compiled)d(with)h(debug)h(information)d(\(see)i(Section)h(4.8\).)j +(When)-42 2391 y(no)d(line)e(information)f(is)i(a)o(v)m(ailable,)e(it)h +(returns)i(-1.)29 2448 y(F)l(unction)g Fm(lua_getobjname)e +Fo(tries)i(to)f(\014nd)i(a)f(reasonable)g(name)f(for)h(a)f(giv)o(en)h +(function.)23 b(Because)17 b(func-)-42 2504 y(tions)11 +b(in)g(Lua)g(are)g(\014rst)g(class)f(v)m(alues,)i(they)f(do)g(not)g(ha) +o(v)o(e)g(a)g(\014xed)g(name.)18 b(Some)10 b(functions)h(ma)o(y)e(b)q +(e)j(the)g(v)m(alue)f(of)-42 2560 y(man)o(y)j(global)f(v)m(ariables,)h +(while)g(others)h(ma)o(y)e(b)q(e)i(stored)f(only)h(in)f(a)h(table)f +(\014eld.)20 b(F)l(unction)14 b Fm(lua_getobjname)-42 +2617 y Fo(\014rst)j(c)o(hec)o(ks)g(whether)h(the)f(giv)o(en)f(function) +h(is)g(a)f(fallbac)o(k.)24 b(If)18 b(so,)e(it)h(returns)f(the)i(string) +e Fm("fallback")p Fo(,)f(and)911 2748 y(22)p eop +%%Page: 23 23 +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 +(the)h(fallbac)o(k)f(name.)21 b(Otherwise,)15 b(if)h(the)f(giv)o(en)h +(function)g(is)f(the)h(v)m(alue)g(of)f(a)h(global)-42 +256 y(v)m(ariable,)e Fm(lua_getobjname)f Fo(returns)i(the)g(string)e +Fm("global")p Fo(,)h(while)g Fm(name)g Fo(p)q(oin)o(ts)g(to)g(the)h(v)m +(ariable)f(name.)19 b(If)-42 312 y(the)f(giv)o(en)e(function)h(is)f +(neither)h(a)g(fallbac)o(k)f(nor)g(a)h(global)e(v)m(ariable,)i +Fm(lua_getobjname)e Fo(returns)i(the)g(empt)o(y)-42 369 +y(string,)d(and)i Fm(name)e Fo(is)h(set)g(to)f Fm(NULL)p +Fo(.)-42 487 y Fe(7.2)56 b(Manipulating)22 b(Lo)r(cal)c(V)-5 +b(ariables)-42 573 y Fo(The)17 b(follo)o(wing)d(functions)i(allo)o(w)e +(the)i(manipulation)e(of)i(the)g(lo)q(cal)f(v)m(ariables)h(of)g(a)f +(giv)o(en)h(activ)m(ation)f(record.)-42 629 y(They)h(only)f(w)o(ork)f +(if)h(the)g(function)g(has)g(b)q(een)h(pre-compiled)f(with)f(debug)i +(information)c(\(see)j(Section)h(4.8\).)-42 706 y Fm(lua_Object)23 +b(lua_getlocal)f(\(lua_Function)g(func,)h(int)h(local_number,)e(char)h +(**name\);)-42 762 y(int)h(lua_setlocal)e(\(lua_Function)g(func,)h(int) +h(local_number\);)-42 839 y Fo(The)19 b(\014rst)f(one)h(returns)g(the)f +(v)m(alue)h(of)f(a)g(lo)q(cal)g(v)m(ariable,)g(and)h(sets)f +Fm(name)g Fo(to)g(p)q(oin)o(t)g(to)g(the)h(v)m(ariable)f(name.)-42 +895 y Fm(local_number)f Fo(is)i(an)f(index)h(for)f(lo)q(cal)g(v)m +(ariables.)29 b(The)19 b(\014rst)f(parameter)f(has)i(index)f(1,)h(and)g +(so)f(on,)h(un)o(til)-42 952 y(the)k(last)e(activ)o(e)h(lo)q(cal)f(v)m +(ariable.)40 b(When)23 b(called)f(with)g(a)g Fm(local_number)e +Fo(greater)i(than)g(the)g(n)o(um)o(b)q(er)g(of)-42 1008 +y(activ)o(e)15 b(lo)q(cal)g(v)m(ariables,)f(or)h(if)g(the)h(activ)m +(ation)e(record)h(has)h(no)f(debug)h(information,)d Fm(lua_getlocal)h +Fo(returns)-42 1065 y Fm(LUA_NOOBJECT)p Fo(.)29 1121 +y(The)d(function)h Fm(lua_setlocal)d Fo(sets)i(the)g(lo)q(cal)f(v)m +(ariable)h Fm(local_number)f Fo(to)g(the)h(v)m(alue)h(previously)e +(pushed)-42 1178 y(on)19 b(the)f(stac)o(k)f(\(see)h(Section)g(5.2\).)28 +b(If)18 b(the)h(function)f(succeeds)h(it)e(returns)h(1.)29 +b(If)18 b Fm(local_number)f Fo(is)g(greater)-42 1234 +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 +(ariables,)h(or)g(if)g(the)g(activ)m(ation)f(record)i(has)f(no)g(debug) +h(information,)d(this)-42 1291 y(function)16 b(fails)d(and)j(returns)f +(0.)-42 1409 y Fe(7.3)56 b(Ho)r(oks)-42 1495 y Fo(The)16 +b(Lua)f(in)o(terpreter)g(o\013ers)f(t)o(w)o(o)g(ho)q(oks)h(for)g(debug) +g(purp)q(oses:)-42 1572 y Fm(typedef)23 b(void)h(\(*lua_CHFunction\))d +(\(lua_Function)h(func,)i(char)f(*file,)g(int)g(line\);)-42 +1628 y(extern)h(lua_CHFunction)d(lua_callhook;)-42 1741 +y(typedef)i(void)h(\(*lua_LHFunction\))d(\(int)j(line\);)-42 +1797 y(extern)g(lua_LHFunction)d(lua_linehook;)-42 1874 +y Fo(The)i(\014rst)f(one)g(is)f(called)h(whenev)o(er)h(the)f(in)o +(terpreter)f(en)o(ters)h(or)f(lea)o(v)o(es)h(a)f(function.)41 +b(When)22 b(en)o(tering)g(a)-42 1930 y(function,)c(its)f(parameters)f +(are)h(a)h(handle)g(to)f(the)g(function)h(activ)m(ation)e(record,)i +(plus)g(the)f(\014le)h(and)g(the)g(line)-42 1987 y(where)h(the)g +(function)f(is)g(de\014ned)h(\(the)f(same)f(information)f(whic)o(h)i +(is)g(pro)o(vided)g(b)o(y)g Fm(lua_funcinfo)p Fo(\);)g(when)-42 +2043 y(lea)o(ving)d(a)f(function,)h Fm(func)g Fo(is)f +Fm(LUA_NOOBJECT)p Fo(,)g Fm(file)g Fo(is)h Fm("\(return\)")p +Fo(,)e(and)j Fm(line)e Fo(is)h(0.)29 2100 y(The)24 b(other)f(ho)q(ok)g +(is)g(called)g(ev)o(ery)g(time)f(the)h(in)o(terpreter)g(c)o(hanges)g +(the)g(line)g(of)g(co)q(de)h(it)f(is)g(execut-)-42 2156 +y(ing.)31 b(Its)19 b(only)g(parameter)e(is)i(the)g(line)f(n)o(um)o(b)q +(er)h(\(the)f(same)g(information)e(whic)o(h)j(is)g(pro)o(vided)f(b)o(y) +h(the)g(call)-42 2213 y Fm(lua_currentline\(lua_stackedfun)o(ction\(0)o +(\)\))p Fo(\).)d(This)d(second)h(ho)q(ok)f(is)g(only)f(called)h(if)g +(the)g(activ)o(e)g(func-)-42 2269 y(tion)i(has)g(b)q(een)h +(pre-compiled)f(with)f(debug)i(information)c(\(see)k(Section)f(4.8\).) +29 2326 y(A)g(ho)q(ok)g(is)g(disabled)g(when)h(its)e(v)m(alue)i(is)e +(NULL)i(\(0\),)e(whic)o(h)h(is)g(the)g(initial)f(v)m(alue)h(of)g(b)q +(oth)g(ho)q(oks.)-42 2466 y Fp(8)67 b(Some)22 b(Examples)-42 +2567 y Fo(This)17 b(section)f(giv)o(es)g(examples)g(sho)o(wing)g(some)g +(features)g(of)h(Lua.)25 b(It)17 b(do)q(es)g(not)g(in)o(tend)f(to)h(co) +o(v)o(er)f(the)h(whole)-42 2623 y(language,)e(but)g(only)g(to)f +(illustrate)f(some)h(in)o(teresting)g(uses)i(of)e(the)i(system.)911 +2748 y(23)p eop +%%Page: 24 24 +24 23 bop -42 199 a Fe(8.1)56 b(Data)19 b(Structures)-42 +285 y Fo(T)l(ables)c(are)f(a)g(strong)f(unifying)h(data)g(constructor.) +19 b(They)c(directly)f(implemen)o(t)d(a)j(m)o(ultitude)f(of)h(data)g(t) +o(yp)q(es,)-42 342 y(lik)o(e)h(ordinary)f(arra)o(ys,)g(records,)g +(sets,)h(bags,)f(and)i(lists.)29 398 y(Arra)o(ys)e(need)h(no)g +(explanations.)k(In)c(Lua,)g(it)e(is)i(con)o(v)o(en)o(tional)e(to)h +(start)f(indices)i(from)e(1,)h(but)h(this)f(is)g(only)-42 +454 y(a)f(con)o(v)o(en)o(tion.)19 b(Arra)o(ys)12 b(can)h(b)q(e)h +(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 +(other)f(v)m(alue)i(\(but)f Fl(nil)p Fo(\).)18 b(Records)-42 +511 y(are)d(also)g(trivially)d(implemen)o(ted)h(b)o(y)i(the)h(syn)o +(tactic)e(sugar)g Fm(a.x)p Fo(.)29 567 y(The)j(b)q(est)g(w)o(a)o(y)f +(to)g(implemen)o(t)e(a)i(set)h(is)f(to)g(store)g(its)g(elemen)o(ts)g +(as)g(indices)h(of)f(a)h(table.)24 b(The)17 b(statemen)o(t)-42 +624 y Fm(s)24 b(=)g({})14 b Fo(creates)h(an)f(empt)o(y)g(set)g +Fm(s)p Fo(.)20 b(The)15 b(statemen)o(t)d Fm(s[x])24 b(=)f(1)15 +b Fo(inserts)f(the)h(v)m(alue)g(of)f Fm(x)h Fo(in)o(to)e(the)i(set)g +Fm(s)p Fo(.)k(The)-42 680 y(expression)e Fm(s[x])f Fo(is)h(true)f(if)g +(and)h(only)g(if)f Fm(x)h Fo(b)q(elongs)f(to)g Fm(s)p +Fo(.)25 b(Finally)l(,)15 b(the)i(statemen)o(t)e Fm(s[x])23 +b(=)h(nil)16 b Fo(erases)h Fm(x)-42 737 y Fo(from)d Fm(s)p +Fo(.)29 793 y(Bags)h(can)h(b)q(e)g(implemen)o(ted)e(similarl)o(y)f(to)i +(sets,)g(but)h(using)f(the)h(v)m(alue)f(asso)q(ciated)g(to)g(an)h +(elemen)o(t)e(as)h(its)-42 850 y(coun)o(ter.)20 b(So,)15 +b(to)f(insert)h(an)g(elemen)o(t,)f(the)h(follo)o(wing)e(co)q(de)j(is)f +(enough:)-42 943 y Fm(if)24 b(s[x])f(then)h(s[x])f(=)h(s[x]+1)-42 +1000 y(else)g(s[x])f(=)h(1)g(end)-42 1094 y Fo(and)16 +b(to)e(remo)o(v)o(e)g(an)h(elemen)o(t:)-42 1188 y Fm(if)24 +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 +(then)f(s[x])g(=)h(nil)g(end)29 1338 y Fo(Lisp-lik)o(e)d(lists)f(also)g +(ha)o(v)o(e)h(an)g(easy)g(implemen)o(tatio)o(n.)36 b(The)21 +b(\\cons")g(of)g(t)o(w)o(o)f(elemen)o(ts)g Fm(x)h Fo(and)g +Fm(y)g Fo(can)-42 1394 y(b)q(e)d(created)e(with)g(the)h(co)q(de)g +Fm(l)23 b(=)h({car=x,)f(cdr=y})p Fo(.)g(The)17 b(expression)f +Fm(l.car)g Fo(extracts)g(the)g(header,)h(while)-42 1451 +y Fm(l.cdr)d Fo(extracts)g(the)g(tail.)k(An)d(alternativ)o(e)d(w)o(a)o +(y)i(is)f(to)h(create)g(the)g(list)g(directly)f(with)h +Fm(l={x,y})p Fo(,)f(and)h(then)h(to)-42 1507 y(extract)g(the)g(header)h +(with)e Fm(l[1])h Fo(and)g(the)h(tail)d(with)i Fm(l[2])p +Fo(.)-42 1629 y Fe(8.2)56 b(The)18 b(F)-5 b(unctions)21 +b Fb(next)c Fe(and)i Fb(nextvar)-42 1715 y Fo(This)f(example)f(sho)o +(ws)g(ho)o(w)h(to)f(use)i(the)f(function)g Fm(next)f +Fo(to)h(iterate)f(o)o(v)o(er)g(the)h(\014elds)g(of)g(a)g(table.)28 +b(F)l(unction)-42 1771 y Fn(clone)15 b Fo(receiv)o(es)g(an)o(y)g(table) +f(and)i(returns)f(a)g(clone)g(of)g(it.)-42 1865 y Fm(function)23 +b(clone)g(\(t\))263 b(--)23 b(t)h(is)f(a)h(table)6 1921 +y(local)f(new_t)h(=)f({})263 b(--)23 b(create)g(a)h(new)f(table)6 +1978 y(local)g(i,)h(v)g(=)f(next\(t,)g(nil\))48 b(--)23 +b(i)h(is)f(an)h(index)f(of)h(t,)f(v)h(=)g(t[i])6 2034 +y(while)f(i)h(do)54 2091 y(new_t[i])f(=)g(v)54 2147 y(i,)h(v)f(=)h +(next\(t,)f(i\))191 b(--)23 b(get)h(next)f(index)6 2204 +y(end)6 2260 y(return)g(new_t)-42 2317 y(end)29 2410 +y Fo(The)15 b(next)h(example)e(prin)o(ts)g(the)i(names)e(of)g(all)h +(global)e(v)m(ariables)i(in)g(the)g(system)f(with)h(non)g(nil)g(v)m +(alues:)-42 2504 y Fm(function)23 b(printGlobalVariables)e(\(\))6 +2561 y(local)i(i,)h(v)g(=)f(nextvar\(nil\))6 2617 y(while)g(i)h(do)911 +2748 y Fo(24)p eop +%%Page: 25 25 +25 24 bop 54 199 a Fm(print\(i\))54 256 y(i,)24 b(v)f(=)h(nextvar\(i\)) +6 312 y(end)-42 369 y(end)-42 488 y Fe(8.3)56 b(String)19 +b(Manipulation)-42 574 y Fo(The)d(\014rst)f(example)f(is)g(a)h +(function)g(to)g(trim)e(extra)i(blanks)g(at)f(the)h(b)q(eginning)h(and) +f(end)h(of)f(a)g(string.)-42 654 y Fm(function)23 b(trim\(s\))6 +710 y(local)g(l)h(=)g(1)6 767 y(while)f(strsub\(s,l,l\))f(==)i(')g(')g +(do)54 823 y(l)g(=)f(l+1)6 880 y(end)6 936 y(local)g(r)h(=)g +(strlen\(s\))6 992 y(while)f(strsub\(s,r,r\))f(==)i(')g(')g(do)54 +1049 y(r)g(=)f(r-1)6 1105 y(end)6 1162 y(return)g(strsub\(s,l,r\))-42 +1218 y(end)29 1298 y Fo(The)15 b(second)h(example)e(sho)o(ws)h(a)g +(function)g(that)f(eliminates)f(all)h(blanks)h(of)g(a)g(string.)-42 +1379 y Fm(function)23 b(remove_blanks)f(\(s\))6 1435 +y(local)h(b)h(=)g(strfind\(s,)e(')i('\))6 1492 y(while)f(b)h(do)54 +1548 y(s)g(=)f(strsub\(s,)g(1,)h(b-1\))f(..)h(strsub\(s,)e(b+1\))54 +1604 y(b)i(=)f(strfind\(s,)g(')h('\))6 1661 y(end)6 1717 +y(return)f(s)-42 1774 y(end)-42 1893 y Fe(8.4)56 b(V)-5 +b(ariable)21 b(n)n(um)n(b)r(er)d(of)h(argumen)n(ts)-42 +1979 y Fo(Lua)14 b(do)q(es)f(not)g(pro)o(vide)f(an)o(y)h(explicit)f +(mec)o(hanism)f(to)h(deal)h(with)f(v)m(ariable)h(n)o(um)o(b)q(er)f(of)h +(argumen)o(ts.)k(Ho)o(w)o(ev)o(er,)-42 2035 y(one)f(can)g(use)g(table)f +(constructors)g(to)g(sim)o(ulate)e(this)i(mec)o(hanism.)k(As)d(an)g +(example,)e(supp)q(ose)i(a)g(function)f(to)-42 2092 y(concatenate)g +(all)g(its)f(argumen)o(ts.)k(It)d(could)g(b)q(e)h(written)f(lik)o(e)-42 +2172 y Fm(function)23 b(concat)g(\(o\))6 2228 y(local)g(i)h(=)g(1)6 +2285 y(local)f(s)h(=)g('')6 2341 y(while)f(o[i])h(do)54 +2398 y(s)g(=)f(s)h(..)g(o[i])54 2454 y(i)g(=)f(i+1)6 +2511 y(end)6 2567 y(return)g(s)-42 2623 y(end)911 2748 +y Fo(25)p eop +%%Page: 26 26 +26 25 bop -42 199 a Fo(T)l(o)15 b(call)g(it,)f(one)h(uses)h(a)e(table)h +(constructor)g(to)f(join)h(all)f(argumen)o(ts:)6 293 +y Fm(x)24 b(=)g(concat{"hello)e(",)h("john",)g(")h(and)f(",)h("mary"}) +-42 415 y Fe(8.5)56 b(P)n(ersistence)-42 501 y Fo(Because)21 +b(of)e(its)g(re\015exiv)o(e)g(facilities,)g(p)q(ersistence)h(in)f(Lua)h +(can)g(b)q(e)g(ac)o(hiev)o(ed)g(within)f(the)g(language.)33 +b(This)-42 557 y(section)12 b(sho)o(ws)f(some)g(w)o(a)o(ys)g(to)g +(store)g(and)h(retriev)o(e)f(v)m(alues)i(in)e(Lua,)i(using)f(a)f(text)h +(\014le)g(written)e(in)i(the)g(language)-42 614 y(itself)j(as)f(the)i +(storage)e(media.)29 670 y(T)l(o)h(store)f(a)h(single)g(v)m(alue)g +(with)g(a)g(name,)f(the)h(follo)o(wing)e(co)q(de)j(is)e(enough:)-42 +764 y Fm(function)23 b(store)g(\(name,)g(value\))6 820 +y(write\(format\('\\n\045s)f(=',)h(name\)\))6 877 y +(write_value\(value\))-42 933 y(end)-42 1039 y(function)g(write_value)g +(\(value\))6 1096 y(local)g(t)h(=)g(type\(value\))102 +1152 y(if)f(t)h(==)g('nil')94 b(then)24 b(write\('nil'\))6 +1209 y(elseif)f(t)h(==)g('number')e(then)i(write\(value\))6 +1265 y(elseif)f(t)h(==)g('string')e(then)i(write\(value,)e('q'\))6 +1322 y(end)-42 1378 y(end)-42 1484 y Fo(In)16 b(order)f(to)g(restore)f +(this)h(v)m(alue,)g(a)g Fm(lua_dofile)f Fo(su\016ces.)29 +1541 y(Storing)i(tables)h(is)g(a)g(little)e(more)h(complex.)25 +b(Assuming)16 b(that)g(the)h(table)g(is)g(a)g(tree,)g(and)g(all)f +(indices)i(are)-42 1597 y(iden)o(ti\014ers)13 b(\(that)e(is,)i(the)g +(tables)f(are)g(b)q(eing)h(used)g(as)g(records\),)f(its)g(v)m(alue)h +(can)g(b)q(e)g(written)f(directly)g(with)g(table)-42 +1654 y(constructors.)19 b(First,)14 b(the)h(function)g +Fm(write_value)f Fo(is)h(c)o(hanged)g(to)-42 1748 y Fm(function)23 +b(write_value)g(\(value\))6 1804 y(local)g(t)h(=)g(type\(value\))102 +1860 y(if)f(t)h(==)g('nil')94 b(then)24 b(write\('nil'\))6 +1917 y(elseif)f(t)h(==)g('number')e(then)i(write\(value\))6 +1973 y(elseif)f(t)h(==)g('string')e(then)i(write\(value,)e('q'\))6 +2030 y(elseif)h(t)h(==)g('table')46 b(then)24 b(write_record\(value\))6 +2086 y(end)-42 2143 y(end)-42 2237 y Fo(The)16 b(function)f +Fm(write_record)e Fo(is:)-42 2330 y Fm(function)23 b(write_record\(t\)) +6 2387 y(local)g(i,)h(v)g(=)f(next\(t,)g(nil\))6 2443 +y(write\('{'\))47 b(--)23 b(starts)g(constructor)6 2500 +y(while)g(i)h(do)54 2556 y(store\(i,)f(v\))54 2613 y(write\(',)g('\)) +911 2748 y Fo(26)p eop +%%Page: 27 27 +27 26 bop 54 199 a Fm(i,)24 b(v)f(=)h(next\(t,)f(i\))6 +256 y(end)6 312 y(write\('}'\))47 b(--)23 b(closes)g(constructor)-42 +369 y(end)-42 490 y Fe(8.6)56 b(Inheritance)-42 576 y +Fo(The)15 b(fallbac)o(k)f(for)g(absen)o(t)g(indices)h(can)g(b)q(e)g +(used)g(to)f(implemen)o(t)e(man)o(y)h(kinds)i(of)f(inheritance)g(in)h +(Lua.)20 b(As)15 b(an)-42 632 y(example,)f(the)h(follo)o(wing)e(co)q +(de)j(implemen)o(ts)d(single)h(inheritance:)-42 726 y +Fm(function)23 b(Index)g(\(t,f\))6 782 y(if)h(f)g(==)f('parent')g(then) +47 b(--)24 b(to)f(avoid)g(loop)54 838 y(return)g(OldIndex\(t,f\))6 +895 y(end)6 951 y(local)g(p)h(=)g(t.parent)6 1008 y(if)g(type\(p\))f +(==)g('table')g(then)54 1064 y(return)g(p[f])6 1121 y(else)54 +1177 y(return)g(OldIndex\(t,f\))6 1234 y(end)-42 1290 +y(end)-42 1403 y(OldIndex)g(=)h(setfallback\("index",)d(Index\))-42 +1496 y Fo(Whenev)o(er)15 b(Lua)g(attempts)d(to)i(access)h(an)f(absen)o +(t)g(\014eld)h(in)f(a)g(table,)g(it)g(calls)f(the)i(fallbac)o(k)e +(function)h Fm(Index)p Fo(.)19 b(If)-42 1553 y(the)14 +b(table)e(has)h(a)g(\014eld)h Fm(parent)e Fo(with)h(a)g(table)f(v)m +(alue,)i(then)f(Lua)h(attempts)d(to)h(access)i(the)f(desired)g(\014eld) +h(in)f(this)-42 1609 y(paren)o(t)i(ob)s(ject.)k(This)c(pro)q(cess)g(is) +f(rep)q(eated)h(\\up)o(w)o(ards")f(un)o(til)g(a)h(v)m(alue)g(for)f(the) +h(\014eld)g(is)g(found)g(or)f(the)h(ob)s(ject)-42 1665 +y(has)h(no)f(paren)o(t.)k(In)d(the)f(latter)f(case,)h(the)g(previous)g +(fallbac)o(k)f(is)h(called)g(to)f(supply)i(a)e(v)m(alue)i(for)e(the)i +(\014eld.)29 1722 y(When)e(b)q(etter)g(p)q(erformance)f(is)g(needed,)i +(the)f(same)e(fallbac)o(k)h(ma)o(y)f(b)q(e)i(implemen)o(ted)e(in)i(C,)f +(as)g(illustrated)-42 1778 y(in)j(Figure)e(1.)20 b(This)14 +b(co)q(de)i(m)o(ust)e(b)q(e)i(registered)e(with:)6 1871 +y Fm(lua_pushstring\("parent"\);)6 1928 y(lockedParentName)22 +b(=)i(lua_ref\(1\);)6 1984 y(lua_pushobject\(lua_setfallba)o(ck\("ind)o +(ex",)d(Index\)\);)6 2041 y(lockedOldIndex)h(=)i(lua_ref\(1\);)-42 +2134 y Fo(Notice)15 b(ho)o(w)g(the)g(string)f Fm("parent")g +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 +(erformance.)-42 2255 y Fe(8.7)56 b(Programming)19 b(with)h(Classes)-42 +2341 y Fo(There)e(are)g(man)o(y)e(di\013eren)o(t)h(w)o(a)o(ys)g(to)g +(do)h(ob)s(ject-orien)o(ted)e(programming)e(in)k(Lua.)28 +b(This)17 b(section)h(presen)o(ts)-42 2398 y(one)g(p)q(ossible)f(w)o(a) +o(y)f(to)g(implemen)o(t)f(classes,)h(using)h(the)g(inheritance)g(mec)o +(hanism)e(presen)o(ted)j(ab)q(o)o(v)o(e.)25 b Fn(Ple)n(ase)-42 +2454 y(notic)n(e:)20 b(the)d(fol)r(lowing)e(examples)g(only)h(work)g +(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 +(or)n(ding)g(to)h(Se)n(ction)e(8.6)p Fo(.)29 2511 y(As)j(one)g(could)f +(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 +(class)g(is)h(as)f(a)g(table.)24 b(This)16 b(table)g(will)g(con)o(tain) +g(all)-42 2567 y(instance)f(metho)q(ds)f(of)h(the)g(class,)f(plus)h(ev) +o(en)o(tual)f(default)h(v)m(alues)g(for)f(instance)h(v)m(ariables.)k +(An)c(instance)g(of)g(a)-42 2623 y(class)g(has)g(its)f +Fm(parent)h Fo(\014eld)g(p)q(oin)o(ting)g(to)f(the)h(class,)g(and)g(so) +g(it)f(\\inherits")g(all)g(metho)q(ds.)911 2748 y(27)p +eop +%%Page: 28 28 +28 27 bop -42 261 1950 6 v -42 355 a Fm(#include)23 b("lua.h")-42 +467 y(int)h(lockedParentName;)45 b(/*)24 b(lock)f(index)g(for)h(the)f +(string)g("parent")g(*/)-42 524 y(int)h(lockedOldIndex;)93 +b(/*)24 b(previous)f(fallback)f(function)h(*/)-42 637 +y(void)h(callOldFallback)e(\(lua_Object)g(table,)h(lua_Object)g +(index\))-42 693 y({)6 750 y(lua_Object)g(oldIndex)f(=)i +(lua_getref\(lockedOldIndex\);)6 806 y(lua_pushobject\(table\);)6 +863 y(lua_pushobject\(index\);)6 919 y(lua_callfunction\(oldIndex\);) +-42 976 y(})-42 1088 y(void)g(Index)f(\(void\))-42 1145 +y({)6 1201 y(lua_Object)g(table)g(=)h(lua_getparam\(1\);)6 +1258 y(lua_Object)f(index)g(=)h(lua_getparam\(2\);)6 +1314 y(lua_Object)f(parent;)6 1371 y(if)h(\(lua_isstring\(index\))d(&&) +j(strcmp\(lua_getstring\(in)o(dex\),)d("parent"\))h(==)i(0\))6 +1427 y({)54 1484 y(callOldFallback\(table,)d(index\);)54 +1540 y(return;)6 1597 y(})6 1653 y(lua_pushobject\(table\);)6 +1709 y(lua_pushref\(lockedParentName)o(\);)6 1766 y(parent)i(=)h +(lua_getsubscript\(\);)6 1822 y(if)g(\(lua_istable\(parent\)\))6 +1879 y({)54 1935 y(lua_pushobject\(parent\);)54 1992 +y(lua_pushobject\(index\);)54 2048 y(/*)g(return)f(result)g(from)g +(getsubscript)f(*/)54 2105 y(lua_pushobject\(lua_getsubs)o(cript\(\))o +(\);)6 2161 y(})6 2218 y(else)54 2274 y(callOldFallback\(table,)f +(index\);)-42 2330 y(})665 2466 y Fo(Figure)15 b(1:)k(Inheritance)d(in) +f(C.)p -42 2522 V 911 2748 a(28)p eop +%%Page: 29 29 +29 28 bop -42 159 1950 6 v -42 253 a Fm(Point)24 b(=)f({x)h(=)g(0,)f(y) +h(=)g(0})-42 366 y(function)f(Point:create)f(\(o\))6 +423 y(o.parent)h(=)h(self)6 479 y(return)f(o)-42 536 +y(end)-42 648 y(function)g(Point:move)g(\(p\))6 705 y(self.x)g(=)h +(self.x)f(+)h(p.x)6 761 y(self.y)f(=)h(self.y)f(+)h(p.y)-42 +818 y(end)-42 931 y(...)-42 1044 y(--)-42 1100 y(--)g(creating)f +(points)-42 1157 y(--)-42 1213 y(p1)h(=)g(Point:create{x)e(=)h(10,)h(y) +g(=)f(20})-42 1270 y(p2)h(=)g(Point:create{x)e(=)h(10})48 +b(--)23 b(y)h(will)f(be)h(inherited)f(until)g(it)g(is)h(set)-42 +1382 y(--)-42 1439 y(--)g(example)f(of)h(a)f(method)g(invocation)-42 +1495 y(--)-42 1552 y(p1:move\(p2\))690 1687 y Fo(Figure)15 +b(2:)k(A)c(Class)g(P)o(oin)o(t.)p -42 1744 V 29 1872 +a(F)l(or)e(instance,)g(a)g(class)g Fm(Point)g Fo(can)g(b)q(e)h(describ) +q(ed)h(as)e(in)g(Figure)f(2.)19 b(F)l(unction)14 b Fm(create)e +Fo(helps)i(the)f(creation)-42 1928 y(of)f(new)h(p)q(oin)o(ts,)f(adding) +g(the)g(paren)o(t)g(\014eld.)20 b(F)l(unction)12 b Fm(move)f +Fo(is)h(an)h(example)e(of)h(an)g(instance)g(metho)q(d.)18 +b(Finally)l(,)-42 1984 y(a)h(sub)q(class)f(can)h(b)q(e)h(created)e(as)g +(a)h(new)g(table,)f(with)g(the)h Fm(parent)f Fo(\014eld)h(p)q(oin)o +(ting)e(to)h(its)g(sup)q(erclass.)30 b(It)19 b(is)-42 +2041 y(in)o(teresting)d(to)g(notice)g(ho)o(w)g(the)h(use)g(of)f +Fm(self)g Fo(in)h(metho)q(d)e Fm(create)h Fo(allo)o(ws)f(this)h(metho)q +(d)g(to)g(w)o(ork)g(prop)q(erly)-42 2097 y(ev)o(en)g(when)g(inherited)f +(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 +(o)o(v)o(erwrite)f(an)o(y)i(inherited)g(metho)q(d)f(with)-42 +2154 y(its)h(o)o(wn)g(v)o(ersion.)-42 2275 y Fe(8.8)56 +b(Mo)r(dules)-42 2361 y Fo(Here)17 b(w)o(e)f(explain)f(one)i(p)q +(ossible)f(w)o(a)o(y)f(to)g(sim)o(ulate)f(mo)q(dules)h(in)h(Lua.)23 +b(The)17 b(main)d(idea)i(is)g(to)f(use)i(a)f(table)f(to)-42 +2418 y(store)g(the)g(mo)q(dule)g(functions.)29 2474 y(A)g(mo)q(dule)g +(should)g(b)q(e)h(written)e(as)h(a)g(separate)f(c)o(h)o(unk,)h +(starting)f(with:)-42 2567 y Fm(if)24 b(modulename)f(then)g(return)g +(end)47 b(--)24 b(avoid)f(loading)g(twice)g(the)h(same)f(module)-42 +2623 y(modulename)g(=)h({})47 b(--)24 b(create)f(a)h(table)f(to)g +(represent)g(the)g(module)911 2748 y Fo(29)p eop +%%Page: 30 30 +30 29 bop -42 159 1950 6 v -42 253 a Fm(function)23 b(open)h(\(mod\))6 +310 y(local)f(n,)h(f)g(=)f(next\(mod,)g(nil\))6 366 y(while)g(n)h(do)54 +423 y(setglobal\(n,)e(f\))54 479 y(n,)i(f)f(=)h(next\(mod,)f(n\))6 +536 y(end)-42 592 y(end)645 727 y Fo(Figure)14 b(3:)20 +b(Op)q(ening)c(a)f(mo)q(dule.)p -42 784 V -42 913 a(After)g(that,)f +(functions)h(can)h(b)q(e)g(directly)e(de\014ned)j(with)d(the)h(syn)o +(tax)-42 1006 y Fm(function)23 b(modulename.foo)f(\(...\))6 +1063 y(...)-42 1119 y(end)29 1213 y Fo(An)o(y)14 b(co)q(de)g(that)f +(needs)i(this)e(mo)q(dule)g(has)g(only)h(to)f(execute)h +Fm(dofile\("filename"\))p Fo(,)d(where)j Fm(filename)f +Fo(is)-42 1270 y(the)j(\014le)f(where)g(the)h(mo)q(dule)e(is)h +(written.)k(After)14 b(this,)h(an)o(y)g(function)g(can)g(b)q(e)h +(called)f(with)-42 1363 y Fm(modulename.foo\(...\))29 +1457 y Fo(If)h(a)f(mo)q(dule)g(function)h(is)f(going)g(to)g(b)q(e)h +(used)g(man)o(y)f(times,)e(the)j(program)e(can)i(giv)o(e)f(a)g(lo)q +(cal)g(name)f(to)i(it.)-42 1514 y(Because)g(functions)f(are)g(v)m +(alues,)g(it)g(is)f(enough)i(to)e(write)-42 1607 y Fm(localname)23 +b(=)h(modulename.foo)-42 1701 y Fo(Finally)l(,)15 b(a)g(mo)q(dule)g(ma) +o(y)f(b)q(e)j Fn(op)n(ene)n(d)p Fo(,)e(giving)f(direct)i(access)g(to)f +(all)g(its)g(functions,)g(as)g(sho)o(wn)h(in)f(the)h(co)q(de)h(in)-42 +1758 y(Figure)e(3.)-42 1879 y Fe(8.9)56 b(A)19 b(CF)-5 +b(unction)-42 1965 y Fo(A)18 b(CF)l(unction)f(to)f(compute)h(the)g +(maxim)o(um)c(of)k(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)g(in)g(Figure)f(4.)-42 2022 y(After)f(registered)g +(with)-42 2115 y Fm(lua_register)23 b(\("max",)g(math_max\);)-42 +2209 y Fo(this)15 b(function)g(is)g(a)o(v)m(ailable)f(in)h(Lua,)g(as)g +(follo)o(ws:)-42 2303 y Fm(i)24 b(=)g(max\(4,)f(5,)h(10,)f(-34\))47 +b(--)24 b(i)g(receives)e(10)-42 2425 y Fe(8.10)56 b(Calling)21 +b(Lua)e(F)-5 b(unctions)-42 2511 y Fo(This)17 b(example)e(illustrates)f +(ho)o(w)i(a)h(C)f(function)g(can)h(call)e(the)i(Lua)g(function)f +Fm(remove_blanks)f Fo(presen)o(ted)i(in)-42 2567 y(Section)f(8.3.)911 +2748 y(30)p eop +%%Page: 31 31 +31 30 bop -42 628 1950 6 v -42 722 a Fm(void)24 b(math_max)f(\(void\)) +-42 778 y({)-18 834 y(int)h(i=1;)71 b(/*)23 b(number)g(of)h(arguments)f +(*/)-18 891 y(double)g(d,)h(dmax;)-18 947 y(lua_Object)f(o;)-18 +1004 y(/*)h(the)f(function)g(must)g(get)h(at)g(least)f(one)g(argument)g +(*/)-18 1060 y(if)h(\(\(o)f(=)h(lua_getparam\(i++\)\))e(==)h +(LUA_NOOBJECT\))30 1117 y(lua_error)g(\("too)g(few)g(arguments)g(to)h +(function)e(`max'"\);)-18 1173 y(/*)i(and)f(this)h(argument)e(must)i +(be)f(a)h(number)f(*/)-18 1230 y(if)h(\(!lua_isnumber\(o\)\))30 +1286 y(lua_error)f(\("incorrect)f(argument)h(to)g(function)g(`max'"\);) +-18 1343 y(dmax)h(=)f(lua_getnumber)f(\(o\);)-18 1399 +y(/*)i(loops)f(until)g(there)g(is)h(no)g(more)f(arguments)g(*/)-18 +1455 y(while)h(\(\(o)f(=)h(lua_getparam\(i++\)\))d(!=)j(LUA_NOOBJECT\)) +-18 1512 y({)6 1568 y(if)g(\(!lua_isnumber\(o\)\))54 +1625 y(lua_error)f(\("incorrect)f(argument)h(to)g(function)g(`max'"\);) +6 1681 y(d)h(=)g(lua_getnumber)e(\(o\);)6 1738 y(if)i(\(d)f(>)h(dmax\)) +f(dmax)h(=)f(d;)-18 1794 y(})-18 1851 y(/*)h(push)f(the)h(result)f(to)g +(be)h(returned)f(*/)-18 1907 y(lua_pushnumber)f(\(dmax\);)-42 +1964 y(})623 2099 y Fo(Figure)14 b(4:)20 b(C)15 b(function)g +Fm(math)p 1147 2099 15 2 v 16 w(max)p Fo(.)p -42 2155 +1950 6 v 911 2748 a(31)p eop +%%Page: 32 32 +32 31 bop -42 199 a Fm(void)24 b(remove_blanks)e(\(char)h(*s\))-42 +256 y({)6 312 y(lua_pushstring\(s\);)45 b(/*)24 b(prepare)f(parameter)g +(*/)6 369 y(lua_call\("remove_blanks"\);)44 b(/*)24 b(call)f(Lua)h +(function)f(*/)6 425 y(strcpy\(s,)g(lua_getstring\(lua_getresu)o +(lt\(1\)\)\))o(;)45 b(/*)24 b(copy)f(result)g(back)g(to)h('s')f(*/)-42 +482 y(})-42 625 y Fp(Ac)n(kno)n(wledgmen)n(ts)-42 726 +y Fo(The)15 b(authors)f(w)o(ould)f(lik)o(e)h(to)f(thank)h(CENPES/PETR)o +(OBR)1053 715 y(\023)1047 726 y(AS)h(whic)o(h,)f(join)o(tly)f(with)h +Fa(T)l(eC)1574 740 y(Graf)1656 726 y Fo(,)g(used)h(exten-)-42 +783 y(siv)o(ely)i(early)g(v)o(ersions)g(of)h(this)f(system)f(and)i(ga)o +(v)o(e)f(v)m(aluable)g(commen)o(ts.)25 b(The)18 b(authors)f(w)o(ould)g +(also)g(lik)o(e)g(to)-42 839 y(thank)f(Carlos)d(Henrique)j(Levy)l(,)f +(who)g(found)h(the)f(name)f(of)h(the)h(game.)i(Lua)d(means)g +Fn(mo)n(on)g Fo(in)g(P)o(ortuguese.)-42 982 y Fp(A)68 +b(Incompatibiliti)q(es)24 b(with)f(Previous)h(V)-6 b(ersions)-42 +1084 y Fo(Although)15 b(great)f(care)h(has)g(b)q(een)h(tak)o(en)f(to)f +(a)o(v)o(oid)g(incompatibiliti)o(es)e(with)j(the)g(previous)g(public)g +(v)o(ersions)f(of)-42 1140 y(Lua,)i(some)e(di\013erences)h(had)g(to)g +(b)q(e)h(in)o(tro)q(duced.)k(Here)15 b(is)g(a)g(list)f(of)h(all)f +(these)h(di\013erences.)-42 1262 y Fe(Incompatibilities)21 +b(with)f(v)n(ersion)f(2.2)27 1348 y Fj(\017)j Fo(F)l(unctions)15 +b Fm(date)f Fo(and)h Fm(time)f Fo(\(from)f Fm(iolib)p +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 +(ersion)f(of)h(function)72 1404 y Fm(date)p Fo(.)27 1498 +y Fj(\017)22 b Fo(F)l(unction)17 b Fm(append)g Fo(\(from)e +Fm(iolib)p Fo(\))i(no)o(w)f(returns)i(1)f(whenev)o(er)h(it)e(succeeds,) +j(whether)e(the)h(\014le)f(is)g(new)72 1555 y(or)e(not.)27 +1648 y Fj(\017)22 b Fo(F)l(unction)14 b Fm(int2str)g +Fo(\(from)f Fm(strlib)p Fo(\))g(has)h(b)q(een)i(sup)q(erseded)g(b)o(y)e +(new)h(function)g Fm(format)p Fo(,)e(with)h(param-)72 +1705 y(eter)h Fm("\045c")p Fo(.)27 1799 y Fj(\017)22 +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 +(erseded)h(b)o(y)e(the)g(reference)h(mec)o(hanism.)h(Ho)o(w)o(ev)o(er,) +d Fm(lua.h)72 1855 y Fo(pro)o(vides)h(compatibilit)n(y)e(macros,)g(so)h +(there)i(is)e(no)i(need)g(to)e(c)o(hange)h(programs.)27 +1949 y Fj(\017)22 b Fo(API)16 b(function)f Fm(lua_pushliteral)e +Fo(no)o(w)i(is)f(just)h(a)g(macro)f(to)g Fm(lua_pushstring)p +Fo(.)-42 2071 y Fe(Incompatibilities)21 b(with)f(v)n(ersion)f(2.1)27 +2156 y Fj(\017)j Fo(The)13 b(function)f Fm(type)g Fo(no)o(w)g(returns)h +(the)f(string)g Fm("function")f Fo(b)q(oth)h(for)g(C)g(and)h(Lua)g +(functions.)19 b(Because)72 2213 y(Lua)f(functions)g(and)g(C)g +(functions)f(are)h(compatible,)e(this)i(b)q(eha)o(vior)f(is)g(usually)h +(more)e(useful.)28 b(When)72 2269 y(needed,)20 b(the)e(second)g(result) +g(of)f(function)h Fm(type)f Fo(ma)o(y)f(b)q(e)j(used)g(to)e +(distinguish)g(b)q(et)o(w)o(een)h(Lua)h(and)f(C)72 2326 +y(functions.)27 2420 y Fj(\017)k Fo(A)15 b(function)g(de\014nition)g +(only)g(assigns)f(the)h(function)g(v)m(alue)g(to)g(the)g(giv)o(en)f(v)m +(ariable)h(at)f(execution)h(time.)911 2748 y(32)p eop +%%Page: 33 33 +33 32 bop -42 199 a Fe(Incompatibilities)21 b(with)f(v)n(ersion)f(1.1) +27 285 y Fj(\017)j Fo(The)16 b(equalit)o(y)e(test)g(op)q(erator)h(no)o +(w)f(is)h(denoted)h(b)o(y)f Fm(==)p Fo(,)f(instead)h(of)g +Fm(=)p Fo(.)27 379 y Fj(\017)22 b Fo(The)13 b(syn)o(tax)f(for)g(table)g +(construction)g(has)h(b)q(een)h(greatly)d(simpli\014ed.)18 +b(The)13 b(old)f Fm(@\(size\))g Fo(has)g(b)q(een)i(sub-)72 +435 y(stituted)h(b)o(y)h Fm({})p Fo(.)21 b(The)16 b(list)e(constructor) +h(\(formerly)e Fm(@[...])p Fo(\))i(and)h(the)f(record)h(constructor)f +(\(formerly)72 492 y Fm(@{...})p Fo(\))f(no)o(w)g(are)h(b)q(oth)f(co)q +(ded)i(lik)o(e)e Fm({...})p Fo(.)19 b(When)c(the)g(construction)f(in)o +(v)o(olv)o(es)g(a)g(function)h(call,)e(lik)o(e)72 548 +y(in)i Fm(@func{...})p Fo(,)e(the)i(new)g(syn)o(tax)f(do)q(es)i(not)e +(use)h(the)g Fm(@)p Fo(.)20 b(More)14 b(imp)q(ortan)o(t,)e +Fn(a)17 b(c)n(onstruction)e(function)72 605 y(must)i(now)f(explicitly)g +(r)n(eturn)g(the)g(c)n(onstructe)n(d)g(table)p Fo(.)27 +699 y Fj(\017)22 b Fo(The)16 b(function)f Fm(lua_call)f +Fo(no)h(longer)f(has)h(the)h(parameter)d Fm(nparam)p +Fo(.)27 792 y Fj(\017)22 b Fo(The)g(function)f Fm(lua_pop)g +Fo(is)g(no)h(longer)e(a)o(v)m(ailable,)i(since)g(it)f(could)g(lead)g +(to)g(strange)g(b)q(eha)o(vior.)39 b(In)72 849 y(particular,)18 +b(to)h(access)g(results)g(returned)g(from)f(a)g(Lua)i(function,)f(the)h +(new)f(macro)e Fm(lua_getresult)72 905 y Fo(should)e(b)q(e)h(used.)27 +999 y Fj(\017)22 b Fo(The)16 b(old)e(functions)h Fm(lua_storefield)f +Fo(and)h Fm(lua_storeindexed)e Fo(ha)o(v)o(e)i(b)q(een)h(replaced)f(b)o +(y)72 1112 y Fm(int)24 b(lua_storesubscript)d(\(void\);)72 +1224 y Fo(with)15 b(the)g(parameters)e(explicitly)h(pushed)j(on)e(the)g +(stac)o(k.)27 1318 y Fj(\017)22 b Fo(The)12 b(functionalit)o(y)e(of)i +(the)g(function)f Fm(lua_errorfunction)f Fo(has)h(b)q(een)i(replaced)f +(b)o(y)g(the)g Fn(fal)r(lb)n(ack)f Fo(mec)o(h-)72 1374 +y(anism;)i(see)j(Section)f(4.8.)27 1468 y Fj(\017)22 +b Fo(When)16 b(calling)e(a)h(function)h(from)d(the)j(Lua)g(library)l(,) +e(parameters)g(passed)h(through)h(the)f(stac)o(k)g(m)o(ust)f(b)q(e)72 +1525 y(pushed)20 b(just)f(b)q(efore)g(the)g(corresp)q(onden)o(t)g +(call,)f(with)g(no)h(in)o(termediate)e(calls)g(to)i(Lua.)31 +b(Sp)q(ecial)19 b(care)72 1581 y(should)c(b)q(e)h(tak)o(en)f(with)f +(macros)g(lik)o(e)g Fm(lua_getindexed)f Fo(and)j Fm(lua_getfield)p +Fo(.)911 2748 y(33)p eop +%%Page: 34 34 +34 33 bop -42 264 a Fp(Index)-42 354 y Fo(..)20 b(6)-42 +411 y(abs)c(19)-42 467 y(acos)f(19)-42 524 y(Adjustmen)o(t)f(4)-42 +580 y(and)i(6)-42 637 y(app)q(endto)g(20)-42 693 y(argumen)o(ts)e(8)-42 +749 y(arithmetic)f(fallbac)o(k)h(9)-42 806 y(arithmetic)f(op)q(erators) +i(6)-42 862 y(arra)o(ys)f(3)-42 919 y(ascii)h(19)-42 +975 y(asin)g(19)-42 1032 y(assert)g(17)-42 1088 y(Assignmen)o(t)f(4)-42 +1145 y(asso)q(ciativ)o(e)g(arra)o(ys)g(3)-42 1201 y(atan)h(19)-42 +1258 y(atan2)g(19)-42 1314 y(basic)g(t)o(yp)q(es)h(2)-42 +1370 y(blo)q(c)o(k)f(4)-42 1427 y(C)g(p)q(oin)o(ters)g(2)-42 +1483 y(ceil)g(19)-42 1540 y(CF)l(unction)g(2)-42 1596 +y(c)o(h)o(unk)h(2)-42 1653 y(clone)g(24)-42 1709 y(closing)f(a)g +(\014le)g(20)-42 1766 y(Co)q(ercion)g(3)-42 1822 y(Commen)o(ts)e(3)-42 +1879 y(concatenation)i(fallbac)o(k)f(10)-42 1935 y(concatenation)h(6) +-42 1991 y(condition)g(expression)g(5)-42 2048 y(constructors)g(7)-42 +2104 y(cos)g(19)-42 2161 y(Data)f(Structures)i(24)-42 +2217 y(date)f(22)-42 2274 y(debug)h(pragma)e(11)-42 2330 +y(do\014le)i(16)-42 2387 y(dostring)f(16)-42 2443 y(error)g(fallbac)o +(k)f(10)-42 2500 y(error)h(18)-42 2556 y(exit)g(22)-42 +2612 y(exp)q(onen)o(tiation)g(6)1006 354 y(Expressions)g(5)1006 +411 y(fallbac)o(ks)f(9)1006 467 y(\015o)q(or)h(19)1006 +524 y(format)e(19)1006 580 y(function)i(call)f(8)1006 +637 y(F)l(unction)h(De\014nitions)g(8)1006 693 y(function)g(falbac)o(k) +f(10)1006 749 y(function)h(2)1006 806 y(functions)g(in)g(C)g(30)1006 +862 y(getglobal)f(18)1006 919 y(gettable)g(fallbac)o(k)g(10)1006 +975 y(global)g(en)o(vironmen)o(t)f(2)1006 1032 y(Global)h(v)m(ariables) +g(2)1006 1088 y(Iden)o(ti\014ers)i(3)1006 1145 y(if-then-else)f(5)1006 +1201 y(index)h(fallbac)o(k)e(10)1006 1258 y(index)i(getglobal)d(10)1006 +1314 y(inheritance)i(27)1006 1370 y(Literal)f(strings)g(3)1006 +1427 y(Lo)q(cal)h(v)m(ariables)g(5)1006 1483 y(log10)f(19)1006 +1540 y(log)g(19)1006 1596 y(logical)g(op)q(erators)g(6)1006 +1653 y(luac)h(11)1006 1709 y(luac)g(2)1006 1766 y(lua)p +1070 1766 14 2 v 16 w(call)f(14)1006 1822 y(lua)p 1070 +1822 V 16 w(callfunction)g(14)1006 1879 y(lua)p 1070 +1879 V 16 w(CF)l(unction)h(15)1006 1935 y(lua)p 1070 +1935 V 16 w(createtable)g(13)1006 1991 y(lua)p 1070 1991 +V 16 w(do\014le)g(11)1006 2048 y(lua)p 1070 2048 V 16 +w(dostring)f(11)1006 2104 y(lua)p 1070 2104 V 16 w(error)h(14)1006 +2161 y(lua)p 1070 2161 V 16 w(getcfunction)g(12)1006 +2217 y(lua)p 1070 2217 V 16 w(getglobal)f(13)1006 2274 +y(lua)p 1070 2274 V 16 w(getn)o(um)o(b)q(er)g(12)1006 +2330 y(lua)p 1070 2330 V 16 w(getparam)f(15)1006 2387 +y(lua)p 1070 2387 V 16 w(getref)i(15)1006 2443 y(lua)p +1070 2443 V 16 w(getresult)f(14)1006 2500 y(lua)p 1070 +2500 V 16 w(getstring)g(12)1006 2556 y(lua)p 1070 2556 +V 16 w(getsubscript)h(13)1006 2612 y(lua)p 1070 2612 +V 16 w(getuserdata)f(12)911 2748 y(34)p eop +%%Page: 35 35 +35 34 bop -42 199 a Fo(lua)p 22 199 14 2 v 16 w(iscfunction)15 +b(12)-42 256 y(lua)p 22 256 V 16 w(isfunction)g(12)-42 +312 y(lua)p 22 312 V 16 w(isnil)g(12)-42 369 y(lua)p +22 369 V 16 w(isn)o(um)o(b)q(er)g(12)-42 425 y(lua)p +22 425 V 16 w(isstring)f(12)-42 482 y(lua)p 22 482 V +16 w(istable)h(12)-42 538 y(lua)p 22 538 V 16 w(isuserdata)g(12)-42 +594 y(LUA)p 57 594 V 17 w(NOOBJECT)i(15)-42 651 y(lua)p +22 651 V 16 w(Ob)s(ject)f(11)-42 707 y(lua)p 22 707 V +16 w(pushcfunction)g(13)-42 764 y(lua)p 22 764 V 16 w(pushnil)g(13)-42 +820 y(lua)p 22 820 V 16 w(pushn)o(um)o(b)q(er)g(13)-42 +877 y(lua)p 22 877 V 16 w(pushob)s(ject)g(13)-42 933 +y(lua)p 22 933 V 16 w(pushref)g(15)-42 990 y(lua)p 22 +990 V 16 w(pushstring)f(13)-42 1046 y(lua)p 22 1046 V +16 w(push)o(userdata)h(13)-42 1103 y(lua)p 22 1103 V +16 w(push)o(usertag)f(13)-42 1159 y(lua)p 22 1159 V 16 +w(ref)h(15)-42 1215 y(lua)p 22 1215 V 16 w(register)f(15)-42 +1272 y(lua)p 22 1272 V 16 w(setfallbac)o(k)f(15)-42 1328 +y(lua)p 22 1328 V 16 w(storeglobal)g(13)-42 1385 y(lua)p +22 1385 V 16 w(storesubscript)h(13)-42 1441 y(lua)p 22 +1441 V 16 w(t)o(yp)q(e)h(12)-42 1498 y(lua)p 22 1498 +V 16 w(unref)g(15)-42 1554 y(max)e(19)-42 1611 y(metho)q(ds)h(9)-42 +1667 y(min)f(19)-42 1724 y(mo)q(d)h(19)-42 1780 y(Mo)q(dules)h(29)-42 +1836 y(m)o(ultiple)e(assignmen)o(t)f(4)-42 1893 y(next)j(16)-42 +1949 y(next)g(24)-42 2006 y(nextv)m(ar)g(17)-42 2062 +y(nextv)m(ar)g(24)-42 2119 y(nil)f(2)-42 2175 y(not)g(6)-42 +2232 y(n)o(um)o(b)q(er)g(2)-42 2288 y(Numerical)f(constan)o(ts)g(3)-42 +2345 y(Op)q(erator)h(precedence)i(7)-42 2401 y(or)e(6)-42 +2457 y(order)g(fallbac)o(k)f(9)-42 2514 y(P)o(ersistence)h(26)-42 +2570 y(pip)q(ed)h(input)g(20)1006 199 y(pip)q(ed)g(output)f(20)1006 +256 y(p)q(op)q(en)h(20)1006 312 y(p)q(op)q(en)g(20)1006 +369 y(pre-compilation)d(2)1006 425 y(prede\014ned)k(functions)e(16)1006 +482 y(prin)o(t)g(17)1006 538 y(Programmi)o(ng)d(with)j(Classes)f(27) +1006 594 y(random)g(19)1006 651 y(randomseed)h(19)1006 +707 y(read)g(20)1006 764 y(readfrom)f(20)1006 820 y(readun)o(til)g(21) +1006 877 y(records)h(3)1006 933 y(reference)h(15)1006 +990 y(re\015exivit)o(y)e(16)1006 1046 y(relational)f(op)q(erators)i(6) +1006 1103 y(remo)o(v)o(e)f(20)1006 1159 y(rename)g(20)1006 +1215 y(rep)q(eat-un)o(til)h(5)1006 1272 y(reserv)o(ed)g(w)o(ords)g(3) +1006 1328 y(return)g(statemen)o(t)e(4)1006 1385 y(return)i(statemen)o +(t)e(5)1006 1441 y(self)i(9)1006 1498 y(setfallbac)o(k)f(10)1006 +1554 y(setfallbac)o(k)g(18)1006 1611 y(setglobal)g(18)1006 +1667 y(settable)h(fallbac)o(k)f(10)1006 1724 y(short-cut)h(ev)m +(aluation)f(6)1006 1780 y(Simple)g(Expressions)h(5)1006 +1836 y(sin)g(19)1006 1893 y(sqrt)g(19)1006 1949 y(statemen)o(ts)e(4) +1006 2006 y(str\014nd)i(18)1006 2062 y(string)f(2)1006 +2119 y(strlen)h(18)1006 2175 y(strlo)o(w)o(er)e(18)1006 +2232 y(strsub)i(18)1006 2288 y(strupp)q(er)h(19)1006 +2345 y(table)f(2)1006 2401 y(tag)f(17)1006 2457 y(tan)h(19)1006 +2514 y(tmpname)e(20)1006 2570 y(tok)o(ens)i(3)911 2748 +y(35)p eop +%%Page: 36 36 +36 35 bop -42 199 a Fo(ton)o(um)o(b)q(er)14 b(17)-42 +256 y(tostring)g(17)-42 312 y(t)o(yp)q(e)i(17)-42 369 +y(T)o(yp)q(es)g(2)-42 425 y(userdata)f(2)-42 482 y(V)l(ariable)g(n)o +(um)o(b)q(er)f(of)h(argumen)o(ts)f(25)-42 538 y(v)o(ersion)h(1.1)f(33) +-42 594 y(v)o(ersion)h(2.1)f(32)-42 651 y(v)o(ersion)h(2.2)f(32)-42 +707 y(while-do)h(5)-42 764 y(write)g(21)-42 820 y(writeto)f(20)911 +2748 y(36)p eop +%%Page: 37 37 +37 36 bop -42 199 a Fp(Con)n(ten)n(ts)-42 301 y Fl(1)43 +b(In)o(tro)q(duction)1567 b(1)-42 403 y(2)43 b(En)o(vironmen)o(t)14 +b(and)k(Ch)o(unks)1268 b(2)-42 505 y(3)43 b(T)o(yp)q(es)1717 +b(2)-42 607 y(4)43 b(The)17 b(Language)1534 b(3)27 663 +y Fo(4.1)45 b(Lexical)15 b(Con)o(v)o(en)o(tions)40 b(.)22 +b(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)g +(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)g(.) +65 b(3)27 720 y(4.2)45 b(Co)q(ercion)16 b(.)23 b(.)f(.)g(.)h(.)f(.)h(.) +f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)h(.)f +(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.) +g(.)65 b(3)27 776 y(4.3)45 b(Adjustmen)o(t)28 b(.)22 +b(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g +(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) +h(.)f(.)h(.)f(.)g(.)65 b(4)27 833 y(4.4)45 b(Statemen)o(ts)40 +b(.)22 b(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.) +f(.)g(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f +(.)g(.)h(.)f(.)h(.)f(.)g(.)65 b(4)131 889 y(4.4.1)51 +b(Blo)q(c)o(ks)22 b(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f +(.)g(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.) +g(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)g(.)65 b(4)131 946 y(4.4.2)51 +b(Assignmen)o(t)27 b(.)22 b(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h +(.)f(.)g(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.) +f(.)g(.)h(.)f(.)h(.)f(.)g(.)65 b(4)131 1002 y(4.4.3)51 +b(Con)o(trol)13 b(Structures)30 b(.)22 b(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.) +f(.)g(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f +(.)g(.)h(.)f(.)h(.)f(.)g(.)65 b(5)131 1059 y(4.4.4)51 +b(F)l(unction)15 b(Calls)f(as)g(Statemen)o(ts)30 b(.)22 +b(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g +(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)g(.)65 b(5)131 1115 y(4.4.5)51 +b(Lo)q(cal)15 b(Declarations)28 b(.)22 b(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.) +f(.)g(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f +(.)g(.)h(.)f(.)h(.)f(.)g(.)65 b(5)27 1171 y(4.5)45 b(Expressions)30 +b(.)22 b(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.) +f(.)g(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f +(.)g(.)h(.)f(.)h(.)f(.)g(.)65 b(5)131 1228 y(4.5.1)51 +b(Simple)14 b(Expressions)k(.)k(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h +(.)f(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.) +f(.)h(.)f(.)g(.)65 b(5)131 1284 y(4.5.2)51 b(Arithmetic)13 +b(Op)q(erators)41 b(.)22 b(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)h(.)f +(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.) +g(.)65 b(6)131 1341 y(4.5.3)51 b(Relational)13 b(Op)q(erators)19 +b(.)k(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)g +(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)g(.)65 +b(6)131 1397 y(4.5.4)51 b(Logical)14 b(Op)q(erators)44 +b(.)22 b(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)g(.)h(.) +f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)g(.)65 +b(6)131 1454 y(4.5.5)51 b(Concatenation)40 b(.)23 b(.)f(.)g(.)h(.)f(.)g +(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) +h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)g(.)65 b(6)131 +1510 y(4.5.6)51 b(Precedence)40 b(.)22 b(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) +h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h +(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)g(.)65 b(7)131 +1567 y(4.5.7)51 b(T)l(able)15 b(Constructors)j(.)k(.)h(.)f(.)g(.)h(.)f +(.)g(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.) +g(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)g(.)65 b(7)131 1623 y(4.5.8)51 +b(F)l(unction)15 b(Calls)39 b(.)23 b(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) +h(.)f(.)g(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h +(.)f(.)g(.)h(.)f(.)h(.)f(.)g(.)65 b(8)27 1680 y(4.6)45 +b(F)l(unction)15 b(De\014nitions)35 b(.)22 b(.)h(.)f(.)g(.)h(.)f(.)g(.) +h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h +(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)g(.)65 b(8)27 +1736 y(4.7)45 b(F)l(allbac)o(ks)f(.)22 b(.)g(.)h(.)f(.)h(.)f(.)g(.)h(.) +f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)g(.)h(.)f +(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)g(.)65 +b(9)27 1792 y(4.8)45 b(Error)14 b(Handling)31 b(.)22 +b(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f +(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.) +h(.)f(.)g(.)42 b(10)-42 1894 y Fl(5)h(The)17 b(Application)g(Program)f +(In)o(terface)1020 b(11)27 1951 y Fo(5.1)45 b(Executing)15 +b(Lua)h(Co)q(de)32 b(.)22 b(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f +(.)g(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.) +g(.)h(.)f(.)h(.)f(.)g(.)42 b(11)27 2007 y(5.2)j(Con)o(v)o(erting)14 +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 +(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.) +h(.)f(.)g(.)42 b(11)27 2064 y(5.3)j(Manipulating)14 b(Lua)h(Ob)s(jects) +20 b(.)i(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)g(.)h(.) +f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)g(.)42 +b(13)27 2120 y(5.4)j(Calling)14 b(Lua)h(F)l(unctions)34 +b(.)23 b(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.) +g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)g +(.)42 b(14)27 2177 y(5.5)j(C)15 b(F)l(unctions)22 b(.)g(.)h(.)f(.)h(.)f +(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.) +g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)g +(.)42 b(15)27 2233 y(5.6)j(References)17 b(to)d(Lua)i(Ob)s(jects)21 +b(.)h(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)g(.)h(.)f +(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)g(.)42 +b(15)-42 2335 y Fl(6)h(Prede\014ned)16 b(F)l(unctions)h(and)h +(Libraries)1024 b(16)27 2391 y Fo(6.1)45 b(Prede\014ned)17 +b(F)l(unctions)k(.)h(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) +h(.)f(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h +(.)f(.)h(.)f(.)g(.)42 b(16)27 2448 y(6.2)j(String)15 +b(Manipulation)35 b(.)22 b(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f +(.)g(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.) +g(.)h(.)f(.)h(.)f(.)g(.)42 b(18)27 2504 y(6.3)j(Mathematical)12 +b(F)l(unctions)29 b(.)22 b(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h +(.)f(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.) +f(.)h(.)f(.)g(.)42 b(19)27 2561 y(6.4)j(I/O)16 b(F)l(acilities)31 +b(.)23 b(.)f(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.) +g(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g +(.)h(.)f(.)h(.)f(.)g(.)42 b(19)911 2748 y(37)p eop +%%Page: 38 38 +38 37 bop -42 199 a Fl(7)43 b(The)17 b(Debuger)h(In)o(terface)1309 +b(22)27 256 y Fo(7.1)45 b(Stac)o(k)15 b(and)g(F)l(unction)g +(Information)e(.)22 b(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)g(.)h +(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)g(.)42 +b(22)27 312 y(7.2)j(Manipulating)14 b(Lo)q(cal)h(V)l(ariables)29 +b(.)22 b(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)g(.) +h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)g(.)42 +b(23)27 369 y(7.3)j(Ho)q(oks)34 b(.)22 b(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.) +g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)g +(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)g(.) +42 b(23)-42 471 y Fl(8)h(Some)16 b(Examples)1468 b(23)27 +527 y Fo(8.1)45 b(Data)14 b(Structures)i(.)22 b(.)h(.)f(.)g(.)h(.)f(.)g +(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)g(.) +h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)g(.)42 +b(24)27 583 y(8.2)j(The)16 b(F)l(unctions)f Fm(next)f +Fo(and)i Fm(nextvar)i Fo(.)23 b(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)g +(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)g(.) +42 b(24)27 640 y(8.3)j(String)15 b(Manipulation)35 b(.)22 +b(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)g +(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)g(.) +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) +o(ts)d(.)22 b(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)g(.)h(.)f +(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)g(.)42 +b(25)27 753 y(8.5)j(P)o(ersistence)e(.)22 b(.)h(.)f(.)h(.)f(.)g(.)h(.)f +(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.) +g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)g(.)42 +b(26)27 809 y(8.6)j(Inheritance)40 b(.)22 b(.)h(.)f(.)h(.)f(.)g(.)h(.)f +(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.) +g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)g(.)42 +b(27)27 866 y(8.7)j(Programmi)o(ng)12 b(with)j(Classes)e(.)22 +b(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)g +(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)g(.)42 +b(27)27 922 y(8.8)j(Mo)q(dules)25 b(.)e(.)f(.)g(.)h(.)f(.)h(.)f(.)g(.)h +(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)g(.)h(.) +f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)g(.)42 +b(29)27 979 y(8.9)j(A)15 b(CF)l(unction)41 b(.)23 b(.)f(.)h(.)f(.)g(.)h +(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)g(.)h(.) +f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)g(.)42 +b(30)27 1035 y(8.10)22 b(Calling)14 b(Lua)h(F)l(unctions)34 +b(.)23 b(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.) +g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)g +(.)42 b(30)-42 1137 y Fl(A)29 b(Incompatibilities)14 +b(with)j(Previous)f(V)l(ersions)899 b(32)911 2748 y Fo(38)p +eop +%%Trailer +end +userdict /end-hook known{end-hook}if +%%EOF diff --git a/domake b/domake deleted file mode 100755 index 16bc8c36..00000000 --- a/domake +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh -x -# makefile for lua hierarchy - -VERSION=2.2 -LUA=`pwd` -export LUA VERSION - -cd $LUA/src; make $* -cd $LUA/include; make $* -cd $LUA/clients/lib; make $* -cd $LUA/clients/lua; make $* diff --git a/include/Makefile b/include/Makefile index e55b7717..e21de74d 100644 --- a/include/Makefile +++ b/include/Makefile @@ -1,11 +1,13 @@ -# makefile for lua distribution +# makefile for lua distribution (includes) + +LUA= .. + +include $(LUA)/config SRCS= lua.h lualib.h luadebug.h all: -dynamic: - clean: co: diff --git a/include/lua.h b/include/lua.h index 4e0a52e3..07f53209 100644 --- a/include/lua.h +++ b/include/lua.h @@ -2,14 +2,14 @@ ** LUA - Linguagem para Usuarios de Aplicacao ** Grupo de Tecnologia em Computacao Grafica ** TeCGraf - PUC-Rio -** $Id: lua.h,v 3.21 1995/11/13 15:36:52 roberto Exp $ +** $Id: lua.h,v 3.28 1996/05/06 14:32:59 roberto Exp $ */ #ifndef lua_h #define lua_h -#define LUA_VERSION "Lua 2.2" +#define LUA_VERSION "Lua 2.4" #define LUA_COPYRIGHT "Copyright (C) 1994, 1995 TeCGraf" #define LUA_AUTHORS "W. Celes, R. Ierusalimschy & L. H. de Figueiredo" @@ -52,6 +52,14 @@ void lua_endblock (void); lua_Object lua_getparam (int number); #define lua_getresult(_) lua_getparam(_) +#define lua_isnil(_) (lua_type(_)==LUA_T_NIL) +#define lua_istable(_) (lua_type(_)==LUA_T_ARRAY) +#define lua_isuserdata(_) (lua_type(_)>=LUA_T_USERDATA) +#define lua_iscfunction(_) (lua_type(_)==LUA_T_CFUNCTION) +int lua_isnumber (lua_Object object); +int lua_isstring (lua_Object object); +int lua_isfunction (lua_Object object); + float lua_getnumber (lua_Object object); char *lua_getstring (lua_Object object); lua_CFunction lua_getcfunction (lua_Object object); @@ -60,7 +68,6 @@ void *lua_getuserdata (lua_Object object); void lua_pushnil (void); void lua_pushnumber (float n); void lua_pushstring (char *s); -void lua_pushliteral (char *s); void lua_pushcfunction (lua_CFunction fn); void lua_pushusertag (void *u, int tag); void lua_pushobject (lua_Object object); @@ -73,32 +80,33 @@ lua_Object lua_getsubscript (void); int lua_type (lua_Object object); -int lua_lock (void); -lua_Object lua_getlocked (int ref); -void lua_pushlocked (int ref); -void lua_unlock (int ref); + +int lua_ref (int lock); +lua_Object lua_getref (int ref); +void lua_pushref (int ref); +void lua_unref (int ref); lua_Object lua_createtable (void); /* some useful macros */ -#define lua_lockobject(o) (lua_pushobject(o), lua_lock()) +#define lua_refobject(o,l) (lua_pushobject(o), lua_ref(l)) #define lua_register(n,f) (lua_pushcfunction(f), lua_storeglobal(n)) #define lua_pushuserdata(u) lua_pushusertag(u, LUA_T_USERDATA) -#define lua_isnil(_) (lua_type(_)==LUA_T_NIL) -#define lua_isnumber(_) (lua_type(_)==LUA_T_NUMBER) -#define lua_isstring(_) (lua_type(_)==LUA_T_STRING) -#define lua_istable(_) (lua_type(_)==LUA_T_ARRAY) -#define lua_isfunction(_) (lua_type(_)==LUA_T_FUNCTION) -#define lua_iscfunction(_) (lua_type(_)==LUA_T_CFUNCTION) -#define lua_isuserdata(_) (lua_type(_)>=LUA_T_USERDATA) +/* for compatibility with old versions. Avoid using these macros */ + +#define lua_lockobject(o) lua_refobject(o,1) +#define lua_lock() lua_ref(1) +#define lua_getlocked lua_getref +#define lua_pushlocked lua_pushref +#define lua_unlock lua_unref -/* for lua 1.1 compatibility. Avoid using these macros */ +#define lua_pushliteral(o) lua_pushstring(o) #define lua_getindexed(o,n) (lua_pushobject(o), lua_pushnumber(n), lua_getsubscript()) #define lua_getfield(o,f) (lua_pushobject(o), lua_pushliteral(f), lua_getsubscript()) diff --git a/include/luadebug.h b/include/luadebug.h index c1e26dcf..9392967c 100644 --- a/include/luadebug.h +++ b/include/luadebug.h @@ -2,7 +2,7 @@ ** LUA - Linguagem para Usuarios de Aplicacao ** Grupo de Tecnologia em Computacao Grafica ** TeCGraf - PUC-Rio -** $Id: luadebug.h,v 1.2 1995/10/26 14:21:56 roberto Exp $ +** $Id: luadebug.h,v 1.6 1996/03/20 17:05:44 roberto Exp $ */ @@ -11,10 +11,21 @@ #include "lua.h" -lua_Object lua_stackedfunction(int level); +typedef lua_Object lua_Function; + +typedef void (*lua_LHFunction) (int line); +typedef void (*lua_CHFunction) (lua_Function func, char *file, int line); + +lua_Function lua_stackedfunction (int level); void lua_funcinfo (lua_Object func, char **filename, int *linedefined); -int lua_currentline (lua_Object func); -char *getobjname (lua_Object o, char **name); +int lua_currentline (lua_Function func); +char *lua_getobjname (lua_Object o, char **name); + +lua_Object lua_getlocal (lua_Function func, int local_number, char **name); +int lua_setlocal (lua_Function func, int local_number); +extern lua_LHFunction lua_linehook; +extern lua_CHFunction lua_callhook; +extern int lua_debug; #endif diff --git a/include/lualib.h b/include/lualib.h index d250aa5b..6005d7c2 100644 --- a/include/lualib.h +++ b/include/lualib.h @@ -2,21 +2,32 @@ ** Libraries to be used in LUA programs ** Grupo de Tecnologia em Computacao Grafica ** TeCGraf - PUC-Rio -** $Id: lualib.h,v 1.4 1995/11/10 17:54:31 roberto Exp $ +** $Id: lualib.h,v 1.8 1996/04/30 21:13:55 roberto Exp $ */ #ifndef lualib_h #define lualib_h +#include "lua.h" + void iolib_open (void); void strlib_open (void); void mathlib_open (void); /* auxiliar functions (private) */ + +struct lua_reg { + char *name; + lua_CFunction func; +}; + +void luaI_openlib (struct lua_reg *l, int n); void lua_arg_error(char *funcname); char *lua_check_string (int numArg, char *funcname); -float lua_check_number (int numArg, char *funcname); +double lua_check_number (int numArg, char *funcname); +char *luaI_addchar (int c); +void luaI_addquoted (char *s); #endif diff --git a/src/Makefile b/src/Makefile index f6296781..843220dc 100644 --- a/src/Makefile +++ b/src/Makefile @@ -1,40 +1,66 @@ -# makefile for lua distribution +# makefile for lua distribution (main library) -INC= $(LUA)/include -LIB= $(LUA)/lib +LUA= .. -# in SunOs /usr/5include contains prototypes for standard lib -INCS= -I/usr/5include -I$(INC) -WARN= -Wall -Wmissing-prototypes -Wshadow -ansi +include $(LUA)/config -CC= gcc -CFLAGS= $(INCS) $(DEFS) $(WARN) -O2 +OBJS= fallback.o\ + func.o\ + hash.o\ + inout.o\ + lex.o\ + mem.o\ + opcode.o\ + parser.o\ + table.o\ + tree.o\ + undump.o -OBJS= fallback.o func.o hash.o inout.o lex.o mem.o opcode.o parser.o table.o tree.o -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 +SRCS= fallback.c\ + fallback.h\ + func.c\ + func.h\ + hash.c\ + hash.h\ + inout.c\ + inout.h\ + lex.c\ + lex.h\ + mem.c\ + mem.h\ + opcode.c\ + opcode.h\ + parser.c\ + parser.h\ + table.c\ + table.h\ + tree.c\ + tree.h\ + types.h\ + undump.c\ + undump.h\ + lua.stx SLIB= $(LIB)/liblua.a -# dynamic libraries only work for SunOs -DLIB= $(LIB)/liblua.so.$(VERSION) - all: $(SLIB) -dynamic: $(DLIB) - $(SLIB): $(OBJS) ar rcuv $@ $(OBJS) ranlib $@ -$(DLIB): $(OBJS) - ld -o $@ $(OBJS) - clean: - rm -f $(OBJS) $(SLIB) $(DLIB) + rm -f $(OBJS) $(SLIB) co: co -f -M $(SRCS) - yacc -d lua.stx ; mv -f y.tab.c parser.c ; mv -f y.tab.h parser.h + +parser: + yacc -d lua.stx + rm -f parser.c parser.h + sed -e 's/yy/luaY_/g' y.tab.c > parser.c + sed -e 's/yy/luaY_/g' y.tab.h > parser.h + rm y.tab.c y.tab.h klean: clean - rm -f $(SRCS) parser.c parser.h + rm -f $(SRCS) diff --git a/src/fallback.c b/src/fallback.c index aa9fc99d..5718f5c1 100644 --- a/src/fallback.c +++ b/src/fallback.c @@ -3,7 +3,7 @@ ** TecCGraf - PUC-Rio */ -char *rcs_fallback="$Id: fallback.c,v 1.17 1995/10/17 14:30:05 roberto Exp $"; +char *rcs_fallback="$Id: fallback.c,v 1.25 1996/04/25 14:10:00 roberto Exp $"; #include <stdio.h> #include <string.h> @@ -12,6 +12,7 @@ char *rcs_fallback="$Id: fallback.c,v 1.17 1995/10/17 14:30:05 roberto Exp $"; #include "fallback.h" #include "opcode.h" #include "lua.h" +#include "table.h" static void errorFB (void); @@ -36,8 +37,10 @@ struct FB luaI_fallBacks[] = { {"concat", {LUA_T_CFUNCTION, {concatFB}}, 2, 1}, {"settable", {LUA_T_CFUNCTION, {gettableFB}}, 3, 0}, {"gc", {LUA_T_CFUNCTION, {GDFB}}, 1, 0}, -{"function", {LUA_T_CFUNCTION, {funcFB}}, -1, -1} +{"function", {LUA_T_CFUNCTION, {funcFB}}, -1, -1}, /* no fixed number of params or results */ +{"getglobal", {LUA_T_CFUNCTION, {indexFB}}, 1, 1} + /* same default behavior of index FB */ }; #define N_FB (sizeof(luaI_fallBacks)/sizeof(struct FB)) @@ -47,7 +50,7 @@ void luaI_setfallback (void) int i; char *name = lua_getstring(lua_getparam(1)); lua_Object func = lua_getparam(2); - if (name == NULL || !(lua_isfunction(func) || lua_iscfunction(func))) + if (name == NULL || !lua_isfunction(func)) lua_error("incorrect argument to function `setfallback'"); for (i=0; i<N_FB; i++) { @@ -110,66 +113,77 @@ static void funcFB (void) /* -** Lock routines +** Reference routines */ -static Object *lockArray = NULL; -static Word lockSize = 0; +static struct ref { + Object o; + enum {LOCK, HOLD, FREE, COLLECTED} status; +} *refArray = NULL; +static int refSize = 0; -int luaI_lock (Object *object) +int luaI_ref (Object *object, int lock) { - Word i; - Word oldSize; + int i; + int oldSize; if (tag(object) == LUA_T_NIL) - return -1; - for (i=0; i<lockSize; i++) - if (tag(&lockArray[i]) == LUA_T_NIL) - { - lockArray[i] = *object; - return i; - } + return -1; /* special ref for nil */ + for (i=0; i<refSize; i++) + if (refArray[i].status == FREE) + goto found; /* no more empty spaces */ - oldSize = lockSize; - if (lockArray == NULL) - { - lockSize = 10; - lockArray = newvector(lockSize, Object); - } - else - { - lockSize = 3*oldSize/2 + 5; - lockArray = growvector(lockArray, lockSize, Object); - } - for (i=oldSize; i<lockSize; i++) - tag(&lockArray[i]) = LUA_T_NIL; - lockArray[oldSize] = *object; - return oldSize; + oldSize = refSize; + refSize = growvector(&refArray, refSize, struct ref, refEM, MAX_WORD); + for (i=oldSize; i<refSize; i++) + refArray[i].status = FREE; + i = oldSize; + found: + refArray[i].o = *object; + refArray[i].status = lock ? LOCK : HOLD; + return i; } -void lua_unlock (int ref) +void lua_unref (int ref) { - tag(&lockArray[ref]) = LUA_T_NIL; + if (ref >= 0 && ref < refSize) + refArray[ref].status = FREE; } -Object *luaI_getlocked (int ref) +Object *luaI_getref (int ref) { - return &lockArray[ref]; + static Object nul = {LUA_T_NIL, {0}}; + if (ref == -1) + return &nul; + if (ref >= 0 && ref < refSize && + (refArray[ref].status == LOCK || refArray[ref].status == HOLD)) + return &refArray[ref].o; + else + return NULL; } void luaI_travlock (int (*fn)(Object *)) { - Word i; - for (i=0; i<lockSize; i++) - fn(&lockArray[i]); + int i; + for (i=0; i<refSize; i++) + if (refArray[i].status == LOCK) + fn(&refArray[i].o); } +void luaI_invalidaterefs (void) +{ + int i; + for (i=0; i<refSize; i++) + if (refArray[i].status == HOLD && !luaI_ismarked(&refArray[i].o)) + refArray[i].status = COLLECTED; +} + char *luaI_travfallbacks (int (*fn)(Object *)) { - Word i; + int i; for (i=0; i<N_FB; i++) if (fn(&luaI_fallBacks[i].function)) return luaI_fallBacks[i].kind; diff --git a/src/fallback.h b/src/fallback.h index f4be0b6f..71f150f7 100644 --- a/src/fallback.h +++ b/src/fallback.h @@ -1,10 +1,11 @@ /* -** $Id: fallback.h,v 1.10 1995/10/17 11:52:38 roberto Exp $ +** $Id: fallback.h,v 1.13 1996/04/25 14:10:00 roberto Exp $ */ #ifndef fallback_h #define fallback_h +#include "lua.h" #include "opcode.h" extern struct FB { @@ -23,11 +24,13 @@ extern struct FB { #define FB_SETTABLE 6 #define FB_GC 7 #define FB_FUNCTION 8 +#define FB_GETGLOBAL 9 void luaI_setfallback (void); -int luaI_lock (Object *object); -Object *luaI_getlocked (int ref); +int luaI_ref (Object *object, int lock); +Object *luaI_getref (int ref); void luaI_travlock (int (*fn)(Object *)); +void luaI_invalidaterefs (void); char *luaI_travfallbacks (int (*fn)(Object *)); #endif @@ -1,4 +1,4 @@ -#include <stdio.h> +#include <stdlib.h> #include "luadebug.h" #include "table.h" @@ -6,8 +6,26 @@ #include "func.h" #include "opcode.h" + static TFunc *function_root = NULL; +static LocVar *currvars = NULL; +static int numcurrvars = 0; +static int maxcurrvars = 0; + +/* +** Initialize TFunc struct +*/ +void luaI_initTFunc (TFunc *f) +{ + f->next = NULL; + f->marked = 0; + f->size = 0; + f->code = NULL; + f->lineDefined = 0; + f->fileName = NULL; + f->locvars = NULL; +} /* ** Insert function in list for GC @@ -24,9 +42,10 @@ void luaI_insertfunction (TFunc *f) /* ** Free function */ -static void freefunc (TFunc *f) +void luaI_freefunc (TFunc *f) { luaI_free (f->code); + luaI_free (f->locvars); luaI_free (f); } @@ -48,7 +67,7 @@ Long luaI_funccollector (void) function_root = next; else prev->next = next; - freefunc (curr); + luaI_freefunc (curr); ++counter; } else @@ -77,3 +96,61 @@ void lua_funcinfo (lua_Object func, char **filename, int *linedefined) } } +/* +** Stores information to know that variable has been declared in given line +*/ +void luaI_registerlocalvar (TaggedString *varname, int line) +{ + if (numcurrvars >= maxcurrvars) + maxcurrvars = growvector(&currvars, maxcurrvars, LocVar, "", MAX_WORD); + currvars[numcurrvars].varname = varname; + currvars[numcurrvars].line = line; + numcurrvars++; +} + +/* +** Stores information to know that variable has been out of scope in given line +*/ +void luaI_unregisterlocalvar (int line) +{ + luaI_registerlocalvar(NULL, line); +} + +/* +** Copies "currvars" into a new area and store it in function header. +** The values (varname = NULL, line = -1) signal the end of vector. +*/ +void luaI_closelocalvars (TFunc *func) +{ + func->locvars = newvector (numcurrvars+1, LocVar); + memcpy (func->locvars, currvars, numcurrvars*sizeof(LocVar)); + func->locvars[numcurrvars].varname = NULL; + func->locvars[numcurrvars].line = -1; + numcurrvars = 0; /* prepares for next function */ +} + +/* +** Look for n-esim local variable at line "line" in function "func". +** Returns NULL if not found. +*/ +char *luaI_getlocalname (TFunc *func, int local_number, int line) +{ + int count = 0; + char *varname = NULL; + LocVar *lv = func->locvars; + if (lv == NULL) + return NULL; + for (; lv->line != -1 && lv->line < line; lv++) + { + if (lv->varname) /* register */ + { + if (++count == local_number) + varname = lv->varname->str; + } + else /* unregister */ + if (--count < local_number) + varname = NULL; + } + return varname; +} + @@ -1,24 +1,44 @@ +/* +** $Id: func.h,v 1.8 1996/03/14 15:54:20 roberto Exp $ +*/ + #ifndef func_h #define func_h #include "types.h" #include "lua.h" +#include "tree.h" + +typedef struct LocVar +{ + TaggedString *varname; /* NULL signals end of scope */ + int line; +} LocVar; + /* -** Header para funcoes. +** Function Headers */ typedef struct TFunc { struct TFunc *next; - char marked; + int marked; int size; Byte *code; int lineDefined; char *fileName; + LocVar *locvars; } TFunc; Long luaI_funccollector (void); void luaI_insertfunction (TFunc *f); +void luaI_initTFunc (TFunc *f); +void luaI_freefunc (TFunc *f); + +void luaI_registerlocalvar (TaggedString *varname, int line); +void luaI_unregisterlocalvar (int line); +void luaI_closelocalvars (TFunc *func); +char *luaI_getlocalname (TFunc *func, int local_number, int line); #endif @@ -3,9 +3,8 @@ ** hash manager for lua */ -char *rcs_hash="$Id: hash.c,v 2.26 1995/10/04 14:20:26 roberto Exp $"; +char *rcs_hash="$Id: hash.c,v 2.30 1996/05/06 14:30:27 roberto Exp $"; -#include <string.h> #include "mem.h" #include "opcode.h" @@ -13,7 +12,6 @@ char *rcs_hash="$Id: hash.c,v 2.26 1995/10/04 14:20:26 roberto Exp $"; #include "table.h" #include "lua.h" -#define streq(s1,s2) (s1 == s2 || (*(s1) == *(s2) && strcmp(s1,s2)==0)) #define nhash(t) ((t)->nhash) #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 $"; #define val(n) (&(n)->val) -#define REHASH_LIMIT 0.70 /* avoid more than this % full */ +#define REHASH_LIMIT 0.70 /* avoid more than this % full */ static Hash *listhead = NULL; - /* hash dimensions values */ -static Word dimensions[] = - {3, 5, 7, 11, 23, 47, 97, 197, 397, 797, 1597, 3203, 6421, - 12853, 25717, 51437, 65521, 0}; /* 65521 == last prime < MAX_WORD */ +static Long dimensions[] = + {3L, 5L, 7L, 11L, 23L, 47L, 97L, 197L, 397L, 797L, 1597L, 3203L, 6421L, + 12853L, 25717L, 51437L, 102811L, 205619L, 411233L, 822433L, + 1644817L, 3289613L, 6579211L, 13158023L, MAX_INT}; -static Word redimension (Word nhash) +int luaI_redimension (int nhash) { - Word i; - for (i=0; dimensions[i]!=0; i++) + int i; + for (i=0; dimensions[i]<MAX_INT; i++) { if (dimensions[i] > nhash) return dimensions[i]; @@ -48,7 +46,7 @@ static Word redimension (Word nhash) return 0; /* to avoid warnings */ } -static Word hashindex (Hash *t, Object *ref) /* hash function */ +static int hashindex (Hash *t, Object *ref) /* hash function */ { switch (tag(ref)) { @@ -56,19 +54,9 @@ static Word hashindex (Hash *t, Object *ref) /* hash function */ lua_error ("unexpected type to index table"); return -1; /* UNREACHEABLE */ case LUA_T_NUMBER: - return (((Word)nvalue(ref))%nhash(t)); + return (((int)nvalue(ref))%nhash(t)); case LUA_T_STRING: - { - unsigned long h = tsvalue(ref)->hash; - if (h == 0) - { - char *name = svalue(ref); - while (*name) - h = ((h<<5)-h)^(unsigned char)*(name++); - tsvalue(ref)->hash = h; - } - return (Word)h%nhash(t); /* make it a valid index */ - } + return (int)((tsvalue(ref)->hash)%nhash(t)); /* make it a valid index */ case LUA_T_FUNCTION: return (((IntPoint)ref->value.tf)%nhash(t)); case LUA_T_CFUNCTION: @@ -80,14 +68,14 @@ static Word hashindex (Hash *t, Object *ref) /* hash function */ } } -Bool lua_equalObj (Object *t1, Object *t2) +int lua_equalObj (Object *t1, Object *t2) { if (tag(t1) != tag(t2)) return 0; switch (tag(t1)) { case LUA_T_NIL: return 1; case LUA_T_NUMBER: return nvalue(t1) == nvalue(t2); - case LUA_T_STRING: return streq(svalue(t1), svalue(t2)); + case LUA_T_STRING: return svalue(t1) == svalue(t2); case LUA_T_ARRAY: return avalue(t1) == avalue(t2); case LUA_T_FUNCTION: return t1->value.tf == t2->value.tf; case LUA_T_CFUNCTION: return fvalue(t1) == fvalue(t2); @@ -95,9 +83,9 @@ Bool lua_equalObj (Object *t1, Object *t2) } } -static Word present (Hash *t, Object *ref) +static int present (Hash *t, Object *ref) { - Word h = hashindex(t, ref); + int h = hashindex(t, ref); while (tag(ref(node(t, h))) != LUA_T_NIL) { if (lua_equalObj(ref, ref(node(t, h)))) @@ -111,9 +99,9 @@ static Word present (Hash *t, Object *ref) /* ** Alloc a vector node */ -static Node *hashnodecreate (Word nhash) +static Node *hashnodecreate (int nhash) { - Word i; + int i; Node *v = newvector (nhash, Node); for (i=0; i<nhash; i++) tag(ref(&v[i])) = LUA_T_NIL; @@ -123,10 +111,10 @@ static Node *hashnodecreate (Word nhash) /* ** Create a new hash. Return the hash pointer or NULL on error. */ -static Hash *hashcreate (Word nhash) +static Hash *hashcreate (int nhash) { Hash *t = new(Hash); - nhash = redimension((Word)((float)nhash/REHASH_LIMIT)); + nhash = luaI_redimension((int)((float)nhash/REHASH_LIMIT)); nodevector(t) = hashnodecreate(nhash); nhash(t) = nhash; nuse(t) = 0; @@ -151,7 +139,7 @@ void lua_hashmark (Hash *h) { if (markarray(h) == 0) { - Word i; + int i; markarray(h) = 1; for (i=0; i<nhash(h); i++) { @@ -218,7 +206,7 @@ Long lua_hashcollector (void) ** executes garbage collection if the number of arrays created ** exceed a pre-defined range. */ -Hash *lua_createarray (Word nhash) +Hash *lua_createarray (int nhash) { Hash *array; lua_pack(); @@ -234,10 +222,10 @@ Hash *lua_createarray (Word nhash) */ static void rehash (Hash *t) { - Word i; - Word nold = nhash(t); + int i; + int nold = nhash(t); Node *vold = nodevector(t); - nhash(t) = redimension(nhash(t)); + nhash(t) = luaI_redimension(nhash(t)); nodevector(t) = hashnodecreate(nhash(t)); for (i=0; i<nold; i++) { @@ -254,7 +242,7 @@ static void rehash (Hash *t) */ Object *lua_hashget (Hash *t, Object *ref) { - Word h = present(t, ref); + int h = present(t, ref); if (tag(ref(node(t, h))) != LUA_T_NIL) return val(node(t, h)); else return NULL; } @@ -266,7 +254,7 @@ Object *lua_hashget (Hash *t, Object *ref) */ Object *lua_hashdefine (Hash *t, Object *ref) { - Word h; + int h; Node *n; h = present(t, ref); n = node(t, h); @@ -292,7 +280,7 @@ Object *lua_hashdefine (Hash *t, Object *ref) ** in the hash. ** This function pushs the element value and its reference to the stack. */ -static void hashnext (Hash *t, Word i) +static void hashnext (Hash *t, int i) { if (i >= nhash(t)) { @@ -329,7 +317,7 @@ void lua_next (void) } else { - Word h = present (t, luaI_Address(r)); + int h = present (t, luaI_Address(r)); hashnext(t, h+1); } } @@ -1,14 +1,14 @@ /* ** hash.h ** hash manager for lua -** Luiz Henrique de Figueiredo - 17 Aug 90 -** $Id: hash.h,v 2.8 1995/01/12 14:19:04 roberto Exp $ +** $Id: hash.h,v 2.12 1996/05/06 14:30:27 roberto Exp $ */ #ifndef hash_h #define hash_h #include "types.h" +#include "opcode.h" typedef struct node { @@ -19,15 +19,16 @@ typedef struct node typedef struct Hash { struct Hash *next; - char mark; - Word nhash; - Word nuse; Node *node; + int nhash; + int nuse; + char mark; } Hash; -Bool lua_equalObj (Object *t1, Object *t2); -Hash *lua_createarray (Word nhash); +int lua_equalObj (Object *t1, Object *t2); +int luaI_redimension (int nhash); +Hash *lua_createarray (int nhash); void lua_hashmark (Hash *h); Long lua_hashcollector (void); Object *lua_hashget (Hash *t, Object *ref); diff --git a/src/inout.c b/src/inout.c index c73030e3..85722c3c 100644 --- a/src/inout.c +++ b/src/inout.c @@ -5,31 +5,21 @@ ** Also provides some predefined lua functions. */ -char *rcs_inout="$Id: inout.c,v 2.25 1995/10/25 13:05:51 roberto Exp $"; +char *rcs_inout="$Id: inout.c,v 2.36 1996/03/19 22:28:37 roberto Exp $"; #include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include "mem.h" +#include "lex.h" #include "opcode.h" -#include "hash.h" #include "inout.h" #include "table.h" #include "tree.h" #include "lua.h" - - -#ifndef MAXFUNCSTACK -#define MAXFUNCSTACK 100 -#endif - -#define MAXMESSAGE MAXFUNCSTACK*80 +#include "mem.h" /* Exported variables */ Word lua_linenumber; -Bool lua_debug = 0; char *lua_parsedfile; @@ -54,9 +44,9 @@ static int stringinput (void) /* ** Function to open a file to be input unit. -** Return 0 on success or error message on error. +** Return the file. */ -char *lua_openfile (char *fn) +FILE *lua_openfile (char *fn) { lua_setinput (fileinput); if (fn == NULL) @@ -67,14 +57,10 @@ char *lua_openfile (char *fn) else fp = fopen (fn, "r"); if (fp == NULL) - { - static char buff[255]; - sprintf(buff, "unable to open file `%.200s'", fn); - return buff; - } + return NULL; lua_linenumber = 1; - lua_parsedfile = lua_constcreate(fn)->ts.str; - return NULL; + lua_parsedfile = luaI_createfixedstring(fn)->str; + return fp; } /* @@ -97,7 +83,7 @@ void lua_openstring (char *s) lua_setinput (stringinput); st = s; lua_linenumber = 1; - lua_parsedfile = lua_constcreate("(string)")->ts.str; + lua_parsedfile = luaI_createfixedstring("(string)")->str; } /* @@ -126,33 +112,57 @@ void lua_internaldostring (void) void lua_internaldofile (void) { lua_Object obj = lua_getparam (1); - if (lua_isstring(obj) && !lua_dofile(lua_getstring(obj))) + char *fname = NULL; + if (lua_isstring(obj)) + fname = lua_getstring(obj); + else if (obj != LUA_NOOBJECT) + lua_error("invalid argument to function `dofile'"); + /* else fname = NULL */ + if (!lua_dofile(fname)) lua_pushnumber(1); else lua_pushnil(); } -/* -** Internal function: print object values -*/ -void lua_print (void) + +static char *tostring (lua_Object obj) { - int i=1; - lua_Object obj; - while ((obj=lua_getparam (i++)) != LUA_NOOBJECT) - { - if (lua_isnumber(obj)) printf("%g\n",lua_getnumber(obj)); - else if (lua_isstring(obj)) printf("%s\n",lua_getstring(obj)); - else if (lua_isfunction(obj)) printf("function: %p\n",(luaI_Address(obj))->value.tf); - else if (lua_iscfunction(obj)) printf("cfunction: %p\n",lua_getcfunction(obj) -); - else if (lua_isuserdata(obj)) printf("userdata: %p\n",lua_getuserdata(obj)); - else if (lua_istable(obj)) printf("table: %p\n",avalue(luaI_Address(obj))); - else if (lua_isnil(obj)) printf("nil\n"); - else printf("invalid value to print\n"); - } + char *buff = luaI_buffer(20); + if (lua_isstring(obj)) /* get strings and numbers */ + return lua_getstring(obj); + else switch(lua_type(obj)) + { + case LUA_T_FUNCTION: + sprintf(buff, "function: %p", (luaI_Address(obj))->value.tf); + break; + case LUA_T_CFUNCTION: + sprintf(buff, "cfunction: %p", lua_getcfunction(obj)); + break; + case LUA_T_ARRAY: + sprintf(buff, "table: %p", avalue(luaI_Address(obj))); + break; + case LUA_T_NIL: + sprintf(buff, "nil"); + break; + default: + sprintf(buff, "userdata: %p", lua_getuserdata(obj)); + break; + } + return buff; } +void luaI_tostring (void) +{ + lua_pushstring(tostring(lua_getparam(1))); +} + +void luaI_print (void) +{ + int i = 1; + lua_Object obj; + while ((obj = lua_getparam(i++)) != LUA_NOOBJECT) + printf("%s\n", tostring(obj)); +} /* ** Internal function: return an object type. @@ -196,16 +206,7 @@ void lua_obj2number (void) { lua_Object o = lua_getparam(1); if (lua_isnumber(o)) - lua_pushobject(o); - else if (lua_isstring(o)) - { - char c; - float f; - if (sscanf(lua_getstring(o),"%f %c",&f,&c) == 1) - lua_pushnumber(f); - else - lua_pushnil(); - } + lua_pushnumber(lua_getnumber(o)); else lua_pushnil(); } @@ -218,3 +219,28 @@ void luaI_error (void) lua_error(s); } +void luaI_assert (void) +{ + lua_Object p = lua_getparam(1); + if (p == LUA_NOOBJECT || lua_isnil(p)) + lua_error("assertion failed!"); +} + +void luaI_setglobal (void) +{ + lua_Object name = lua_getparam(1); + lua_Object value = lua_getparam(2); + if (!lua_isstring(name)) + lua_error("incorrect argument to function `setglobal'"); + lua_pushobject(value); + lua_storeglobal(lua_getstring(name)); + lua_pushobject(value); /* return given value */ +} + +void luaI_getglobal (void) +{ + lua_Object name = lua_getparam(1); + if (!lua_isstring(name)) + lua_error("incorrect argument to function `getglobal'"); + lua_pushobject(lua_getglobal(lua_getstring(name))); +} diff --git a/src/inout.h b/src/inout.h index da9c1cc2..e5957753 100644 --- a/src/inout.h +++ b/src/inout.h @@ -1,5 +1,5 @@ /* -** $Id: inout.h,v 1.10 1995/10/17 11:58:41 roberto Exp $ +** $Id: inout.h,v 1.15 1996/03/15 18:21:58 roberto Exp $ */ @@ -7,23 +7,27 @@ #define inout_h #include "types.h" +#include <stdio.h> extern Word lua_linenumber; -extern Bool lua_debug; extern Word lua_debugline; extern char *lua_parsedfile; -char *lua_openfile (char *fn); +FILE *lua_openfile (char *fn); void lua_closefile (void); void lua_openstring (char *s); void lua_closestring (void); void lua_internaldofile (void); void lua_internaldostring (void); -void lua_print (void); +void luaI_tostring (void); +void luaI_print (void); void luaI_type (void); void lua_obj2number (void); void luaI_error (void); +void luaI_assert (void); +void luaI_setglobal (void); +void luaI_getglobal (void); #endif @@ -1,23 +1,19 @@ -char *rcs_lex = "$Id: lex.c,v 2.21 1995/11/16 20:46:24 roberto Exp $"; +char *rcs_lex = "$Id: lex.c,v 2.32 1996/03/21 16:33:47 roberto Exp $"; #include <ctype.h> -#include <stdio.h> -#include <stdlib.h> #include <string.h> #include "mem.h" #include "tree.h" #include "table.h" -#include "opcode.h" +#include "lex.h" #include "inout.h" +#include "luadebug.h" #include "parser.h" -#include "ugly.h" #define MINBUFF 260 -#define lua_strcmp(a,b) (a[0]<b[0]?(-1):(a[0]>b[0]?(1):strcmp(a,b))) - #define next() { current = input(); } #define save(x) { *yytextLast++ = (x); } #define save_and_next() { save(current); next(); } @@ -47,7 +43,6 @@ char *lua_lasttext (void) } -/* The reserved words must be listed in lexicographic order */ static struct { char *name; @@ -74,30 +69,21 @@ static struct #define RESERVEDSIZE (sizeof(reserved)/sizeof(reserved[0])) -static int findReserved (char *name) +void luaI_addReserved (void) { - int l = 0; - int h = RESERVEDSIZE - 1; - while (l <= h) + int i; + for (i=0; i<RESERVEDSIZE; i++) { - int m = (l+h)/2; - int comp = lua_strcmp(name, reserved[m].name); - if (comp < 0) - h = m-1; - else if (comp == 0) - return reserved[m].token; - else - l = m+1; + TaggedString *ts = lua_createstring(reserved[i].name); + ts->marked = reserved[i].token; /* reserved word (always > 255) */ } - return 0; } static void growtext (void) { int size = yytextLast - yytext; - textsize *= 2; - yytext = growvector(yytext, textsize, char); + textsize = growvector(&yytext, textsize, char, lexEM, MAX_WORD); yytextLast = yytext + size; } @@ -144,9 +130,9 @@ static int read_long_string (void) } -int yylex (void) +int luaY_lex (void) { - float a; + double a; static int linelasttoken = 0; if (lua_debug) luaI_codedebugline(linelasttoken); @@ -154,9 +140,6 @@ int yylex (void) while (1) { yytextLast = yytext; -#if 0 - fprintf(stderr,"'%c' %d\n",current,current); -#endif switch (current) { case EOF: @@ -174,22 +157,21 @@ int yylex (void) while (isalnum(current) || current == '_') save_and_next(); *yytextLast = 0; - if (lua_strcmp(yytext, "debug") == 0) + if (strcmp(yytext, "debug") == 0) { - yylval.vInt = 1; + luaY_lval.vInt = 1; return DEBUG; } - else if (lua_strcmp(yytext, "nodebug") == 0) + else if (strcmp(yytext, "nodebug") == 0) { - yylval.vInt = 0; + luaY_lval.vInt = 0; return DEBUG; } return WRONGTOKEN; case '-': save_and_next(); - if (current != '-') return '-'; /* else goes through */ - case '#': + if (current != '-') return '-'; do { next(); } while (current != '\n' && current != 0); continue; @@ -203,7 +185,7 @@ int yylex (void) return WRONGTOKEN; save_and_next(); /* pass the second ']' */ *(yytextLast-2) = 0; /* erases ']]' */ - yylval.vWord = luaI_findconstantbyname(yytext+2); + luaY_lval.vWord = luaI_findconstantbyname(yytext+2); return STRING; } @@ -254,6 +236,7 @@ int yylex (void) case 'n': save('\n'); next(); break; case 't': save('\t'); next(); break; case 'r': save('\r'); next(); break; + case '\n': lua_linenumber++; /* goes through */ default : save(current); next(); break; } break; @@ -263,7 +246,7 @@ int yylex (void) } next(); /* skip the delimiter */ *yytextLast = 0; - yylval.vWord = luaI_findconstantbyname(yytext); + luaY_lval.vWord = luaI_findconstantbyname(yytext); return STRING; } @@ -281,12 +264,14 @@ int yylex (void) case 'Z': case '_': { - Word res; + TaggedString *ts; do { save_and_next(); } while (isalnum(current) || current == '_'); *yytextLast = 0; - res = findReserved(yytext); - if (res) return res; - yylval.pNode = lua_constcreate(yytext); + ts = lua_createstring(yytext); + if (ts->marked > 2) + return ts->marked; /* reserved word */ + luaY_lval.pTStr = ts; + ts->marked = 2; /* avoid GC */ return NAME; } @@ -305,48 +290,32 @@ int yylex (void) case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': a=0.0; - do { a=10*a+current-'0'; save_and_next(); } while (isdigit(current)); + do { a=10.0*a+(current-'0'); save_and_next(); } while (isdigit(current)); if (current == '.') save_and_next(); fraction: - { float da=0.1; + { double da=0.1; while (isdigit(current)) {a+=(current-'0')*da; da/=10.0; save_and_next()}; if (current == 'e' || current == 'E') { int e=0; int neg; - float ea; + double ea; save_and_next(); neg=(current=='-'); if (current == '+' || current == '-') save_and_next(); if (!isdigit(current)) return WRONGTOKEN; - do { e=10*e+current-'0'; save_and_next(); } while (isdigit(current)); + do { e=10.0*e+(current-'0'); save_and_next(); } while (isdigit(current)); for (ea=neg?0.1:10.0; e>0; e>>=1) { if (e & 1) a*=ea; ea*=ea; } } - yylval.vFloat = a; + luaY_lval.vFloat = a; return NUMBER; } - case U_and: case U_do: case U_else: case U_elseif: case U_end: - case U_function: case U_if: case U_local: case U_nil: case U_not: - case U_or: case U_repeat: case U_return: case U_then: - case U_until: case U_while: - { - int old = current; - next(); - return reserved[old-U_and].token; - } - - case U_eq: next(); return EQ; - case U_le: next(); return LE; - case U_ge: next(); return GE; - case U_ne: next(); return NE; - case U_sc: next(); return CONC; - default: /* also end of file */ { save_and_next(); diff --git a/src/lex.h b/src/lex.h new file mode 100644 index 00000000..7ed6fd2d --- /dev/null +++ b/src/lex.h @@ -0,0 +1,19 @@ +/* +** lex.h +** TecCGraf - PUC-Rio +** $Id: lex.h,v 1.2 1996/02/14 13:35:51 roberto Exp $ +*/ + +#ifndef lex_h +#define lex_h + + +typedef int (*Input) (void); + +void lua_setinput (Input fn); +char *lua_lasttext (void); +int luaY_lex (void); +void luaI_addReserved (void); + + +#endif diff --git a/src/lua.stx b/src/lua.stx index 99e96179..54c5a38c 100644 --- a/src/lua.stx +++ b/src/lua.stx @@ -1,12 +1,13 @@ %{ -char *rcs_luastx = "$Id: lua.stx,v 3.25 1995/10/26 17:02:50 roberto Exp $"; +char *rcs_luastx = "$Id: lua.stx,v 3.36 1996/03/21 16:31:32 roberto Exp $"; #include <stdio.h> #include <stdlib.h> -#include <string.h> +#include "luadebug.h" #include "mem.h" +#include "lex.h" #include "opcode.h" #include "hash.h" #include "inout.h" @@ -30,7 +31,7 @@ int yyparse (void); #endif static int maxcode; static int maxmain; -static Long maxcurr; /* to allow maxcurr *= 2 without overflow */ +static int maxcurr; static Byte *funcCode = NULL; static Byte **initcode; static Byte *basepc; @@ -44,35 +45,32 @@ static Long varbuffer[MAXVAR]; /* variables in an assignment list; static int nvarbuffer=0; /* number of variables at a list */ #define MAXLOCALS 32 -static Word localvar[MAXLOCALS]; /* store local variable names */ +static TaggedString *localvar[MAXLOCALS]; /* store local variable names */ static int nlocalvar=0; /* number of local variables */ #define MAXFIELDS FIELDS_PER_FLUSH*2 static Word fields[MAXFIELDS]; /* fieldnames to be flushed */ static int nfields=0; +int lua_debug = 0; /* Internal functions */ static void yyerror (char *s) { - static char msg[256]; - sprintf (msg,"%s near \"%s\" at line %d in file `%s'", - s, lua_lasttext (), lua_linenumber, lua_parsedfile); + char msg[256]; + char *token = lua_lasttext(); + if (token[0] == 0) + token = "<eof>"; + sprintf (msg,"%s; last token read: \"%s\" at line %d in file `%s'", + s, token, lua_linenumber, lua_parsedfile); lua_error (msg); } static void code_byte (Byte c) { if (pc>maxcurr-2) /* 1 byte free to code HALT of main code */ - { - if (maxcurr >= MAX_INT) - lua_error("code size overflow"); - maxcurr *= 2; - if (maxcurr >= MAX_INT) - maxcurr = MAX_INT; - basepc = growvector(basepc, maxcurr, Byte); - } + maxcurr = growvector(&basepc, maxcurr, Byte, codeEM, MAX_INT); basepc[pc++] = c; } @@ -104,10 +102,12 @@ static void code_code (TFunc *tf) code_byte(code.m.c4); } -static void code_word_at (Byte *p, Word n) +static void code_word_at (Byte *p, int n) { CodeWord code; - code.w = n; + if ((Word)n != n) + yyerror("block too big"); + code.w = (Word)n; *p++ = code.m.c1; *p++ = code.m.c2; } @@ -117,7 +117,7 @@ static void push_field (Word name) if (nfields < MAXFIELDS) fields[nfields++] = name; else - lua_error ("too many fields in nested constructors"); + yyerror ("too many fields in nested constructors"); } static void flush_record (int n) @@ -142,24 +142,24 @@ static void flush_list (int m, int n) code_byte(m); } else - lua_error ("list constructor too long"); + yyerror ("list constructor too long"); code_byte(n); } -static void add_localvar (Word name) +static void store_localvar (TaggedString *name, int n) { - if (nlocalvar < MAXLOCALS) - localvar[nlocalvar++] = name; + if (nlocalvar+n < MAXLOCALS) + localvar[nlocalvar+n] = name; else - lua_error ("too many local variables"); + yyerror ("too many local variables"); + if (lua_debug) + luaI_registerlocalvar(name, lua_linenumber); } -static void store_localvar (Word name, int n) +static void add_localvar (TaggedString *name) { - if (nlocalvar+n < MAXLOCALS) - localvar[nlocalvar+n] = name; - else - lua_error ("too many local variables"); + store_localvar(name, 0); + nlocalvar++; } static void add_varbuffer (Long var) @@ -167,7 +167,7 @@ static void add_varbuffer (Long var) if (nvarbuffer < MAXVAR) varbuffer[nvarbuffer++] = var; else - lua_error ("variable buffer overflow"); + yyerror ("variable buffer overflow"); } static void code_number (float f) @@ -197,7 +197,7 @@ static void code_number (float f) /* ** Search a local name and if find return its index. If do not find return -1 */ -static int lua_localname (Word n) +static int lua_localname (TaggedString *n) { int i; for (i=nlocalvar-1; i >= 0; i--) @@ -388,7 +388,6 @@ static void codeIf (Long thenAdd, Long elseAdd) */ void lua_parse (TFunc *tf) { - lua_debug = 0; initcode = &(tf->code); *initcode = newvector(CODE_BLOCK, Byte); maincode = 0; @@ -416,7 +415,7 @@ void lua_parse (TFunc *tf) Word vWord; Long vLong; TFunc *pFunc; - TreeNode *pNode; + TaggedString *pTStr; } %start functionlist @@ -429,7 +428,7 @@ void lua_parse (TFunc *tf) %token FUNCTION %token <vFloat> NUMBER %token <vWord> STRING -%token <pNode> NAME +%token <pTStr> NAME %token <vInt> DEBUG %type <vLong> PrepJump @@ -481,7 +480,7 @@ funcname : var { $$ =$1; init_func(); } code_word(luaI_findconstant($3)); $$ = 0; /* indexed variable */ init_func(); - add_localvar(luaI_findsymbolbyname("self")); + add_localvar(luaI_createfixedstring("self")); } ; @@ -489,11 +488,14 @@ body : '(' parlist ')' block END { codereturn(); $$ = new(TFunc); + luaI_initTFunc($$); $$->size = pc; $$->code = newvector(pc, Byte); $$->fileName = lua_parsedfile; $$->lineDefined = $2; memcpy($$->code, basepc, pc*sizeof(Byte)); + if (lua_debug) + luaI_closelocalvars($$); /* save func values */ funcCode = basepc; maxcode=maxcurr; #if LISTING @@ -554,7 +556,11 @@ block : {$<vInt>$ = nlocalvar;} statlist ret { if (nlocalvar != $<vInt>1) { - nlocalvar = $<vInt>1; + if (lua_debug) + for (; nlocalvar > $<vInt>1; nlocalvar--) + luaI_unregisterlocalvar(lua_linenumber); + else + nlocalvar = $<vInt>1; lua_codeadjust (0); } } @@ -672,14 +678,8 @@ parlist : /* empty */ { lua_codeadjust(0); $$ = lua_linenumber; } | parlist1 { lua_codeadjust(0); $$ = lua_linenumber; } ; -parlist1 : NAME - { - add_localvar(luaI_findsymbol($1)); - } - | parlist1 ',' NAME - { - add_localvar(luaI_findsymbol($3)); - } +parlist1 : NAME { add_localvar($1); } + | parlist1 ',' NAME { add_localvar($3); } ; fieldlist : lfieldlist @@ -759,10 +759,9 @@ var : singlevar { $$ = $1; } singlevar : NAME { - Word s = luaI_findsymbol($1); - int local = lua_localname (s); + int local = lua_localname($1); if (local == -1) /* global var */ - $$ = s + 1; /* return positive value */ + $$ = luaI_findsymbol($1)+1; /* return positive value */ else $$ = -(local+1); /* return negative value */ } @@ -771,10 +770,10 @@ singlevar : NAME varexp : var { lua_pushvar($1); } ; -localdeclist : NAME {store_localvar(luaI_findsymbol($1), 0); $$ = 1;} +localdeclist : NAME {store_localvar($1, 0); $$ = 1;} | localdeclist ',' NAME { - store_localvar(luaI_findsymbol($3), $1); + store_localvar($3, $1); $$ = $1+1; } ; @@ -787,228 +786,3 @@ setdebug : DEBUG { lua_debug = $1; } ; %% - -#if LISTING - -static void PrintCode (Byte *code, Byte *end) -{ - Byte *p = code; - printf ("\n\nCODE\n"); - while (p != end) - { - switch ((OpCode)*p) - { - case PUSHNIL: printf ("%d PUSHNIL\n", (p++)-code); break; - case PUSH0: case PUSH1: case PUSH2: - printf ("%d PUSH%c\n", p-code, *p-PUSH0+'0'); - p++; - break; - case PUSHBYTE: - printf ("%d PUSHBYTE %d\n", p-code, *(++p)); - p++; - break; - case PUSHWORD: - { - CodeWord c; - int n = p-code; - p++; - get_word(c,p); - printf ("%d PUSHWORD %d\n", n, c.w); - } - break; - case PUSHFLOAT: - { - CodeFloat c; - int n = p-code; - p++; - get_float(c,p); - printf ("%d PUSHFLOAT %f\n", n, c.f); - } - break; - case PUSHSTRING: - { - CodeWord c; - int n = p-code; - p++; - get_word(c,p); - printf ("%d PUSHSTRING %d\n", n, c.w); - } - break; - case PUSHFUNCTION: - { - CodeCode c; - int n = p-code; - p++; - get_code(c,p); - printf ("%d PUSHFUNCTION %p\n", n, c.tf); - } - break; - - case PUSHLOCAL0: case PUSHLOCAL1: case PUSHLOCAL2: case PUSHLOCAL3: - case PUSHLOCAL4: case PUSHLOCAL5: case PUSHLOCAL6: case PUSHLOCAL7: - case PUSHLOCAL8: case PUSHLOCAL9: - printf ("%d PUSHLOCAL%c\n", p-code, *p-PUSHLOCAL0+'0'); - p++; - break; - case PUSHLOCAL: printf ("%d PUSHLOCAL %d\n", p-code, *(++p)); - p++; - break; - case PUSHGLOBAL: - { - CodeWord c; - int n = p-code; - p++; - get_word(c,p); - printf ("%d PUSHGLOBAL %d\n", n, c.w); - } - break; - case PUSHINDEXED: printf ("%d PUSHINDEXED\n", (p++)-code); break; - case STORELOCAL0: case STORELOCAL1: case STORELOCAL2: case STORELOCAL3: - case STORELOCAL4: case STORELOCAL5: case STORELOCAL6: case STORELOCAL7: - case STORELOCAL8: case STORELOCAL9: - printf ("%d STORELOCAL%c\n", p-code, *p-STORELOCAL0+'0'); - p++; - break; - case STORELOCAL: - printf ("%d STORELOCAL %d\n", p-code, *(++p)); - p++; - break; - case STOREGLOBAL: - { - CodeWord c; - int n = p-code; - p++; - get_word(c,p); - printf ("%d STOREGLOBAL %d\n", n, c.w); - } - break; - case PUSHSELF: - { - CodeWord c; - int n = p-code; - p++; - get_word(c,p); - printf ("%d PUSHSELF %d\n", n, c.w); - } - break; - case STOREINDEXED0: printf ("%d STOREINDEXED0\n", (p++)-code); break; - case STOREINDEXED: printf ("%d STOREINDEXED %d\n", p-code, *(++p)); - p++; - break; - case STORELIST0: - printf("%d STORELIST0 %d\n", p-code, *(++p)); - p++; - break; - case STORELIST: - printf("%d STORELIST %d %d\n", p-code, *(p+1), *(p+2)); - p+=3; - break; - case STORERECORD: - printf("%d STORERECORD %d\n", p-code, *(++p)); - p += *p*sizeof(Word) + 1; - break; - case ADJUST0: printf ("%d ADJUST0\n", (p++)-code); break; - case ADJUST: - printf ("%d ADJUST %d\n", p-code, *(++p)); - p++; - break; - case CREATEARRAY: - { - CodeWord c; - int n = p-code; - p++; - get_word(c,p); - printf ("%d CREATEARRAY %d\n", n, c.w); - break; - } - case EQOP: printf ("%d EQOP\n", (p++)-code); break; - case LTOP: printf ("%d LTOP\n", (p++)-code); break; - case LEOP: printf ("%d LEOP\n", (p++)-code); break; - case ADDOP: printf ("%d ADDOP\n", (p++)-code); break; - case SUBOP: printf ("%d SUBOP\n", (p++)-code); break; - case MULTOP: printf ("%d MULTOP\n", (p++)-code); break; - case DIVOP: printf ("%d DIVOP\n", (p++)-code); break; - case POWOP: printf ("%d POWOP\n", (p++)-code); break; - case CONCOP: printf ("%d CONCOP\n", (p++)-code); break; - case MINUSOP: printf ("%d MINUSOP\n", (p++)-code); break; - case NOTOP: printf ("%d NOTOP\n", (p++)-code); break; - case ONTJMP: - { - CodeWord c; - int n = p-code; - p++; - get_word(c,p); - printf ("%d ONTJMP %d\n", n, c.w); - } - break; - case ONFJMP: - { - CodeWord c; - int n = p-code; - p++; - get_word(c,p); - printf ("%d ONFJMP %d\n", n, c.w); - } - break; - case JMP: - { - CodeWord c; - int n = p-code; - p++; - get_word(c,p); - printf ("%d JMP %d\n", n, c.w); - } - break; - case UPJMP: - { - CodeWord c; - int n = p-code; - p++; - get_word(c,p); - printf ("%d UPJMP %d\n", n, c.w); - } - break; - case IFFJMP: - { - CodeWord c; - int n = p-code; - p++; - get_word(c,p); - printf ("%d IFFJMP %d\n", n, c.w); - } - break; - case IFFUPJMP: - { - CodeWord c; - int n = p-code; - p++; - get_word(c,p); - printf ("%d IFFUPJMP %d\n", n, c.w); - } - break; - case POP: printf ("%d POP\n", (p++)-code); break; - case CALLFUNC: - printf ("%d CALLFUNC %d %d\n", p-code, *(p+1), *(p+2)); - p+=3; - break; - case RETCODE0: printf ("%d RETCODE0\n", (p++)-code); break; - case RETCODE: - printf ("%d RETCODE %d\n", p-code, *(++p)); - p++; - break; - case SETLINE: - { - CodeWord c; - int n = p-code; - p++; - get_word(c,p); - printf ("%d SETLINE %d\n", n, c.w); - } - break; - - default: printf ("%d Cannot happen: code %d\n", (p++)-code, *(p-1)); break; - } - } -} -#endif - diff --git a/src/luac/Makefile b/src/luac/Makefile new file mode 100644 index 00000000..813393e4 --- /dev/null +++ b/src/luac/Makefile @@ -0,0 +1,24 @@ +# makefile for lua distribution (compiler) + +LUA= ../.. + +include $(LUA)/config + +INCS= -I$(INC) $(EXTRA_INCS) -I.. +OBJS= dump.o luac.o print.o +SRCS= dump.c luac.c print.c luac.h print.h +T=$(BIN)/luac + +all: $T + +$T: $(OBJS) + $(CC) -o $@ $(OBJS) -L$(LIB) -llua + +clean: + rm -f $(OBJS) $T + +co: + co -f -M $(SRCS) + +klean: clean + rm -f $(SRCS) diff --git a/src/luac/dump.c b/src/luac/dump.c new file mode 100644 index 00000000..22db5e36 --- /dev/null +++ b/src/luac/dump.c @@ -0,0 +1,247 @@ +/* +** dump.c +** thread and save bytecodes to file +*/ + +char* rcs_dump="$Id: dump.c,v 1.12 1996/03/12 20:00:03 lhf Exp $"; + +#include <stdio.h> +#include <string.h> +#include "luac.h" + +static TFunc* lastF=NULL; /* list of functions seen in code */ + +static int SawVar(int i, int at) +{ + int old=VarLoc(i); + VarLoc(i)=at; + return old; +} + +static int SawStr(int i, int at) +{ + int old=StrLoc(i); + StrLoc(i)=at; + return old; +} + +static void ThreadCode(Byte* code, Byte* end) +{ + Byte* p; + int i; + for (i=0; i<lua_ntable; i++) VarLoc(i)=0; + for (i=0; i<lua_nconstant; i++) StrLoc(i)=0; + for (p=code; p!=end;) + { + OpCode op=(OpCode)*p; + int at=p-code+1; + switch (op) + { + case PUSHNIL: + case PUSH0: + case PUSH1: + case PUSH2: + case PUSHLOCAL0: + case PUSHLOCAL1: + case PUSHLOCAL2: + case PUSHLOCAL3: + case PUSHLOCAL4: + case PUSHLOCAL5: + case PUSHLOCAL6: + case PUSHLOCAL7: + case PUSHLOCAL8: + case PUSHLOCAL9: + case PUSHINDEXED: + case STORELOCAL0: + case STORELOCAL1: + case STORELOCAL2: + case STORELOCAL3: + case STORELOCAL4: + case STORELOCAL5: + case STORELOCAL6: + case STORELOCAL7: + case STORELOCAL8: + case STORELOCAL9: + case STOREINDEXED0: + case ADJUST0: + case EQOP: + case LTOP: + case LEOP: + case GTOP: + case GEOP: + case ADDOP: + case SUBOP: + case MULTOP: + case DIVOP: + case POWOP: + case CONCOP: + case MINUSOP: + case NOTOP: + case POP: + case RETCODE0: + p++; + break; + case PUSHBYTE: + case PUSHLOCAL: + case STORELOCAL: + case STOREINDEXED: + case STORELIST0: + case ADJUST: + case RETCODE: + p+=2; + break; + case PUSHWORD: + case CREATEARRAY: + case ONTJMP: + case ONFJMP: + case JMP: + case UPJMP: + case IFFJMP: + case IFFUPJMP: + case SETLINE: + case STORELIST: + case CALLFUNC: + p+=3; + break; + case PUSHFLOAT: + p+=5; + break; + case PUSHSELF: + case PUSHSTRING: + { + CodeWord c; + p++; + get_word(c,p); + c.w=SawStr(c.w,at); + p[-2]=c.m.c1; + p[-1]=c.m.c2; + break; + } + case PUSHFUNCTION: + { + CodeCode c; + p++; + get_code(c,p); + c.tf->marked=at; + c.tf->next=NULL; /* TODO: remove? */ + lastF=lastF->next=c.tf; + break; + } + case PUSHGLOBAL: + case STOREGLOBAL: + { + CodeWord c; + p++; + get_word(c,p); + c.w=SawVar(c.w,at); + p[-2]=c.m.c1; + p[-1]=c.m.c2; + break; + } + case STORERECORD: + { + int n=*++p; + p++; + while (n--) + { + CodeWord c; + at=p-code; + get_word(c,p); + c.w=SawStr(c.w,at); + p[-2]=c.m.c1; + p[-1]=c.m.c2; + } + break; + } + default: + fprintf(stderr,"luac: cannot happen: opcode=%d",*p); + exit(1); + break; + } + } +} + +static void DumpWord(int i, FILE* D) +{ + Word w=i; + fwrite(&w,sizeof(w),1,D); +} + +static void DumpBlock(char* b, int size, FILE* D) +{ + fwrite(b,size,1,D); +} + +static void DumpSize(int i, FILE* D) +{ + Word lo=i&0x0FFFF; + Word hi=(i>>16)&0x0FFFF; + fwrite(&hi,sizeof(hi),1,D); + fwrite(&lo,sizeof(lo),1,D); + if (hi!=0) + fprintf(stderr, + "luac: warning: code too long for 16-bit machines (%d bytes)\n",i); +} + +static void DumpString(char* s, FILE* D) +{ + int n=strlen(s)+1; + if ((Word)n != n) + { + fprintf(stderr,"luac: string too long: \"%.32s...\"\n",s); + exit(1); + } + DumpWord(n,D); + DumpBlock(s,n,D); +} + +static void DumpStrings(FILE* D) +{ + int i; + for (i=0; i<lua_ntable; i++) + { + if (VarLoc(i)!=0) + { + fputc(ID_VAR,D); + DumpWord(VarLoc(i),D); + DumpString(VarStr(i),D); + } + VarLoc(i)=i; + } + for (i=0; i<lua_nconstant; i++) + { + if (StrLoc(i)!=0) + { + fputc(ID_STR,D); + DumpWord(StrLoc(i),D); + DumpString(StrStr(i),D); + } + StrLoc(i)=i; + } +} + +void DumpFunction(TFunc* tf, FILE* D) +{ + lastF=tf; + ThreadCode(tf->code,tf->code+tf->size); + fputc(ID_FUN,D); + DumpSize(tf->size,D); + DumpWord(tf->lineDefined,D); + if (IsMain(tf)) + DumpString(tf->fileName,D); + else + DumpWord(tf->marked,D); + DumpBlock(tf->code,tf->size,D); + DumpStrings(D); +} + +void DumpHeader(FILE* D) +{ + Word w=TEST_WORD; + float f=TEST_FLOAT; + fputc(ID_CHUNK,D); + fputs(SIGNATURE,D); + fputc(VERSION,D); + fwrite(&w,sizeof(w),1,D); + fwrite(&f,sizeof(f),1,D); +} diff --git a/src/luac/luac.c b/src/luac/luac.c new file mode 100644 index 00000000..aa71afcf --- /dev/null +++ b/src/luac/luac.c @@ -0,0 +1,104 @@ +/* +** luac.c +** lua compiler (saves bytecodes to files) +*/ + +char* rcs_luac="$Id: luac.c,v 1.16 1996/03/13 17:33:03 lhf Exp $"; + +#include <stdio.h> +#include <string.h> +#include "luac.h" + +static void compile(char* filename); + +static int listing=0; /* list bytecodes? */ +static int dumping=1; /* dump bytecodes? */ +static FILE* D; /* output file */ + +static void usage(void) +{ + fprintf(stderr,"usage: luac [-dlpv] [-o output] file ...\n"); + exit(0); +} + +#define IS(s) (strcmp(argv[i],s)==0) + +int main(int argc, char* argv[]) +{ + char* d="luac.out"; /* default output file */ + int i; + for (i=1; i<argc; i++) + { + if (argv[i][0]!='-') /* end of options */ + break; + else if (IS("-")) /* use stdin */ + break; + else if (IS("-d")) /* debug */ + lua_debug=1; + else if (IS("-l")) /* list */ + listing=1; + else if (IS("-o")) /* output file */ + d=argv[++i]; + else if (IS("-p")) /* parse only (for timing purposes) */ + dumping=0; + else if (IS("-v")) /* show version */ + printf("%s %s\n(written by %s)\n\n",LUA_VERSION,LUA_COPYRIGHT,LUA_AUTHORS); + else /* unknown option */ + usage(); + } + --i; /* fake new argv[0] */ + argc-=i; + argv+=i; + if (argc<2) usage(); + for (i=1; i<argc; i++) + if (IS(d)) + { + fprintf(stderr,"luac: will not overwrite input file \"%s\"\n",d); + exit(1); + } + D=(dumping) ? fopen(d,"wb") : stdout; /* must open in binary mode */ + if (D==NULL) + { + fprintf(stderr,"luac: cannot open "); + perror(d); + exit(1); + } + for (i=1; i<argc; i++) compile(IS("-")? NULL : argv[i]); + fclose(D); + return 0; +} + +static void do_dump(TFunc* tf) /* only for tf==main */ +{ + if (dumping) DumpHeader(D); + while (tf!=NULL) + { + TFunc* nf; + if (listing) PrintFunction(tf); + if (dumping) DumpFunction(tf,D); + nf=tf->next; /* list only built after first main */ + luaI_freefunc(tf); + tf=nf; + } +} + +static void do_compile(void) +{ + TFunc* tf=new(TFunc); + luaI_initTFunc(tf); + tf->fileName = lua_parsedfile; + lua_parse(tf); + do_dump(tf); +} + +static void compile(char* filename) +{ + if (lua_openfile(filename)==NULL) + { + fprintf(stderr,"luac: cannot open "); + perror(filename); + exit(1); + } + do_compile(); + lua_closefile(); +} diff --git a/src/luac/luac.h b/src/luac/luac.h new file mode 100644 index 00000000..ceb311b8 --- /dev/null +++ b/src/luac/luac.h @@ -0,0 +1,24 @@ +/* +** luac.h +** definitions for luac compiler +** $Id: luac.h,v 1.5 1996/03/08 21:41:47 lhf Exp $ +*/ + +#include "inout.h" +#include "mem.h" +#include "opcode.h" +#include "table.h" +#include "undump.h" + +#define VarStr(i) (lua_table[i].varname->str) +#define VarLoc(i) (lua_table[i].varname->varindex) +#define StrStr(i) (lua_constant[i]->str) +#define StrLoc(i) (lua_constant[i]->constindex) + +extern Word lua_ntable; +extern Word lua_nconstant; +extern int lua_debug; + +void DumpHeader(FILE* D); +void DumpFunction(TFunc* tf, FILE* D); +void PrintFunction(TFunc* tf); diff --git a/src/luac/print.c b/src/luac/print.c new file mode 100644 index 00000000..1b338931 --- /dev/null +++ b/src/luac/print.c @@ -0,0 +1,189 @@ +/* +** print.c +** print bytecodes +*/ + +char* rcs_print="$Id: print.c,v 1.6 1996/03/12 20:00:24 lhf Exp $"; + +#include <stdio.h> +#include <string.h> +#include "luac.h" +#include "print.h" + +static LocVar* V=NULL; + +static char* LocStr(int i) +{ + if (V==NULL) return ""; else return V[i].varname->str; +} + +static void PrintCode(Byte* code, Byte* end) +{ + Byte* p; + for (p=code; p!=end;) + { + OpCode op=(OpCode)*p; + if (op>SETLINE) op=SETLINE+1; + printf("%6d\t%s",p-code,OpCodeName[op]); + switch (op) + { + case PUSHNIL: + case PUSH0: + case PUSH1: + case PUSH2: + case PUSHINDEXED: + case STOREINDEXED0: + case ADJUST0: + case EQOP: + case LTOP: + case LEOP: + case GTOP: + case GEOP: + case ADDOP: + case SUBOP: + case MULTOP: + case DIVOP: + case POWOP: + case CONCOP: + case MINUSOP: + case NOTOP: + case POP: + case RETCODE0: + p++; + break; + case PUSHLOCAL0: + case PUSHLOCAL1: + case PUSHLOCAL2: + case PUSHLOCAL3: + case PUSHLOCAL4: + case PUSHLOCAL5: + case PUSHLOCAL6: + case PUSHLOCAL7: + case PUSHLOCAL8: + case PUSHLOCAL9: + { + int i=op-PUSHLOCAL0; + printf("\t%d\t; %s",i,LocStr(i)); + p++; + break; + } + case STORELOCAL0: + case STORELOCAL1: + case STORELOCAL2: + case STORELOCAL3: + case STORELOCAL4: + case STORELOCAL5: + case STORELOCAL6: + case STORELOCAL7: + case STORELOCAL8: + case STORELOCAL9: + { + int i=op-STORELOCAL0; + printf("\t%d\t; %s",i,LocStr(i)); + p++; + break; + } + case PUSHLOCAL: + case STORELOCAL: + { + int i=*(p+1); + printf("\t%d\t; %s",i,LocStr(i)); + p+=2; + break; + } + case PUSHBYTE: + case STOREINDEXED: + case STORELIST0: + case ADJUST: + case RETCODE: + printf("\t%d",*(p+1)); + p+=2; + break; + case PUSHWORD: + case CREATEARRAY: + case ONTJMP: + case ONFJMP: + case JMP: + case UPJMP: + case IFFJMP: + case IFFUPJMP: + case SETLINE: + { + CodeWord c; + p++; + get_word(c,p); + printf("\t%d",c.w); + break; + } + case PUSHFLOAT: + { + CodeFloat c; + p++; + get_float(c,p); + printf("\t%g",c.f); + break; + } + case PUSHSELF: + case PUSHSTRING: + { + CodeWord c; + p++; + get_word(c,p); + printf("\t%d\t; \"%s\"",c.w,StrStr(c.w)); + break; + } + case PUSHFUNCTION: + { + CodeCode c; + p++; + get_code(c,p); + printf("\t%p\t; \"%s\":%d",c.tf,c.tf->fileName,c.tf->lineDefined); + break; + } + case PUSHGLOBAL: + case STOREGLOBAL: + { + CodeWord c; + p++; + get_word(c,p); + printf("\t%d\t; %s",c.w,VarStr(c.w)); + break; + } + case STORELIST: + case CALLFUNC: + printf("\t%d %d",*(p+1),*(p+2)); + p+=3; + break; + case STORERECORD: + { + int n=*++p; + printf("\t%d",n); + p++; + while (n--) + { + CodeWord c; + printf("\n%6d\t FIELD",p-code); + get_word(c,p); + printf("\t%d\t; \"%s\"",c.w,StrStr(c.w)); + } + break; + } + default: + printf("\tcannot happen: opcode=%d",*p); + exit(1); + break; + } + printf("\n"); + } +} + +void PrintFunction(TFunc* tf) +{ + if (IsMain(tf)) + printf("\nmain of \"%s\" (%d bytes at %p)\n",tf->fileName,tf->size,tf); + else + printf("\nfunction \"%s\":%d (%d bytes at %p); used at main+%d\n", + tf->fileName,tf->lineDefined,tf->size,tf,tf->marked); + V=tf->locvars; + PrintCode(tf->code,tf->code+tf->size); +} diff --git a/src/luac/print.h b/src/luac/print.h new file mode 100644 index 00000000..31e2bb89 --- /dev/null +++ b/src/luac/print.h @@ -0,0 +1,76 @@ +/* +** print.h +** opcode names +** $Id: print.h,v 1.1 1996/02/23 19:04:13 lhf Exp $ +*/ + +static char* OpCodeName[]={ /* attention: same order as enum in opcode.h */ + "PUSHNIL", + "PUSH0", + "PUSH1", + "PUSH2", + "PUSHBYTE", + "PUSHWORD", + "PUSHFLOAT", + "PUSHSTRING", + "PUSHFUNCTION", + "PUSHLOCAL0", + "PUSHLOCAL1", + "PUSHLOCAL2", + "PUSHLOCAL3", + "PUSHLOCAL4", + "PUSHLOCAL5", + "PUSHLOCAL6", + "PUSHLOCAL7", + "PUSHLOCAL8", + "PUSHLOCAL9", + "PUSHLOCAL", + "PUSHGLOBAL", + "PUSHINDEXED", + "PUSHSELF", + "STORELOCAL0", + "STORELOCAL1", + "STORELOCAL2", + "STORELOCAL3", + "STORELOCAL4", + "STORELOCAL5", + "STORELOCAL6", + "STORELOCAL7", + "STORELOCAL8", + "STORELOCAL9", + "STORELOCAL", + "STOREGLOBAL", + "STOREINDEXED0", + "STOREINDEXED", + "STORELIST0", + "STORELIST", + "STORERECORD", + "ADJUST0", + "ADJUST", + "CREATEARRAY", + "EQOP", + "LTOP", + "LEOP", + "GTOP", + "GEOP", + "ADDOP", + "SUBOP", + "MULTOP", + "DIVOP", + "POWOP", + "CONCOP", + "MINUSOP", + "NOTOP", + "ONTJMP", + "ONFJMP", + "JMP", + "UPJMP", + "IFFJMP", + "IFFUPJMP", + "POP", + "CALLFUNC", + "RETCODE0", + "RETCODE", + "SETLINE", + "" +}; @@ -3,18 +3,24 @@ ** TecCGraf - PUC-Rio */ -char *rcs_mem = "$Id: mem.c,v 1.5 1995/02/06 19:34:03 roberto Exp $"; +char *rcs_mem = "$Id: mem.c,v 1.12 1996/05/06 16:59:00 roberto Exp $"; #include <stdlib.h> -#include <string.h> #include "mem.h" #include "lua.h" + +#define mem_error() lua_error(memEM) + + void luaI_free (void *block) { - *((int *)block) = -1; /* to catch errors */ - free(block); + if (block) + { + *((int *)block) = -1; /* to catch errors */ + free(block); + } } @@ -22,23 +28,40 @@ void *luaI_malloc (unsigned long size) { void *block = malloc((size_t)size); if (block == NULL) - lua_error("not enough memory"); + mem_error(); return block; } void *luaI_realloc (void *oldblock, unsigned long size) { - void *block = realloc(oldblock, (size_t)size); + void *block = oldblock ? realloc(oldblock, (size_t)size) : + malloc((size_t)size); if (block == NULL) - lua_error("not enough memory"); + mem_error(); return block; } -char *luaI_strdup (char *str) +int luaI_growvector (void **block, unsigned long nelems, int size, + char *errormsg, unsigned long limit) { - char *newstr = luaI_malloc(strlen(str)+1); - strcpy(newstr, str); - return newstr; + if (nelems >= limit) + lua_error(errormsg); + nelems = (nelems == 0) ? 20 : nelems*2; + if (nelems > limit) + nelems = limit; + *block = luaI_realloc(*block, nelems*size); + return (int) nelems; } + + +void* luaI_buffer (unsigned long size) +{ + static unsigned long buffsize = 0; + static char* buffer = NULL; + if (size > buffsize) + buffer = luaI_realloc(buffer, buffsize=size); + return buffer; +} + @@ -1,7 +1,7 @@ /* ** mem.c ** memory manager for lua -** $Id: mem.h,v 1.2 1995/01/13 22:11:12 roberto Exp $ +** $Id: mem.h,v 1.7 1996/04/22 18:00:37 roberto Exp $ */ #ifndef mem_h @@ -11,15 +11,29 @@ #define NULL 0 #endif + +/* memory error messages */ +#define codeEM "code size overflow" +#define symbolEM "symbol table overflow" +#define constantEM "constant table overflow" +#define stackEM "stack size overflow" +#define lexEM "lex buffer overflow" +#define refEM "reference table overflow" +#define tableEM "table overflow" +#define memEM "not enough memory" + + void luaI_free (void *block); void *luaI_malloc (unsigned long size); void *luaI_realloc (void *oldblock, unsigned long size); - -char *luaI_strdup (char *str); +void *luaI_buffer (unsigned long size); +int luaI_growvector (void **block, unsigned long nelems, int size, + char *errormsg, unsigned long limit); #define new(s) ((s *)luaI_malloc(sizeof(s))) #define newvector(n,s) ((s *)luaI_malloc((n)*sizeof(s))) -#define growvector(old,n,s) ((s *)luaI_realloc(old,(n)*sizeof(s))) +#define growvector(old,n,s,e,l) \ + (luaI_growvector((void**)old,n,sizeof(s),e,l)) #endif diff --git a/src/opcode.c b/src/opcode.c index e4089f01..d3f655be 100644 --- a/src/opcode.c +++ b/src/opcode.c @@ -3,10 +3,9 @@ ** TecCGraf - PUC-Rio */ -char *rcs_opcode="$Id: opcode.c,v 3.50 1995/11/16 20:46:24 roberto Exp $"; +char *rcs_opcode="$Id: opcode.c,v 3.68 1996/04/25 14:10:00 roberto Exp $"; #include <setjmp.h> -#include <stdlib.h> #include <stdio.h> #include <string.h> @@ -18,6 +17,7 @@ char *rcs_opcode="$Id: opcode.c,v 3.50 1995/11/16 20:46:24 roberto Exp $"; #include "table.h" #include "lua.h" #include "fallback.h" +#include "undump.h" #define tonumber(o) ((tag(o) != LUA_T_NUMBER) && (lua_tonumber(o) != 0)) #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 $"; #define STACK_SIZE 128 +#ifndef STACK_LIMIT +#define STACK_LIMIT 6000 +#endif + typedef int StkId; /* index to stack elements */ static Object initial_stack; @@ -53,6 +57,11 @@ static int CnResults = 0; /* when Lua calls C, has the number of parameters; */ static jmp_buf *errorJmp = NULL; /* current error recover point */ +/* Hooks */ +lua_LHFunction lua_linehook = NULL; +lua_CHFunction lua_callhook = NULL; + + static StkId lua_execute (Byte *pc, StkId base); static void do_call (StkId base, int nResults); @@ -64,7 +73,6 @@ Object *luaI_Address (lua_Object o) } - /* ** Init stack */ @@ -89,14 +97,17 @@ static void growstack (void) lua_initstack(); else { + static int limit = STACK_LIMIT; StkId t = top-stack; - Long maxstack = stackLimit - stack; - maxstack *= 2; - stack = growvector(stack, maxstack, Object); - stackLimit = stack+maxstack; + Long stacksize = stackLimit - stack; + stacksize = growvector(&stack, stacksize, Object, stackEM, limit+100); + stackLimit = stack+stacksize; top = stack + t; - if (maxstack >= MAX_WORD/2) - lua_error("stack size overflow"); + if (stacksize >= limit) + { + limit = stacksize; + lua_error(stackEM); + } } } @@ -106,18 +117,9 @@ static void growstack (void) */ static char *lua_strconc (char *l, char *r) { - static char *buffer = NULL; - static int buffer_size = 0; - int nl = strlen(l); - int n = nl+strlen(r)+1; - if (n > buffer_size) - { - buffer_size = n; - if (buffer != NULL) - luaI_free(buffer); - buffer = newvector(buffer_size, char); - } - strcpy(buffer,l); + int nl = strlen(l); + char *buffer = luaI_buffer(nl+strlen(r)+1); + strcpy(buffer, l); strcpy(buffer+nl, r); return buffer; } @@ -150,7 +152,7 @@ static int lua_tonumber (Object *obj) */ static int lua_tostring (Object *obj) { - static char s[256]; + char s[256]; if (tag(obj) != LUA_T_NUMBER) return 1; if ((int) nvalue(obj) == nvalue(obj)) @@ -158,8 +160,6 @@ static int lua_tostring (Object *obj) else sprintf (s, "%g", nvalue(obj)); tsvalue(obj) = lua_createstring(s); - if (tsvalue(obj) == NULL) - return 1; tag(obj) = LUA_T_STRING; return 0; } @@ -193,6 +193,48 @@ static void open_stack (int nelems) /* +** call Line hook +*/ +static void lineHook (int line) +{ + StkId oldBase = CBase; + int oldCnResults = CnResults; + StkId old_top = CBase = top-stack; + CnResults = 0; + (*lua_linehook)(line); + top = stack+old_top; + CnResults = oldCnResults; + CBase = oldBase; +} + + +/* +** Call hook +** The function being called is in [stack+base-1] +*/ +static void callHook (StkId base, lua_Type type, int isreturn) +{ + StkId oldBase = CBase; + int oldCnResults = CnResults; + StkId old_top = CBase = top-stack; + CnResults = 0; + if (isreturn) + (*lua_callhook)(LUA_NOOBJECT, "(return)", 0); + else + { + Object *f = stack+base-1; + if (type == LUA_T_MARK) + (*lua_callhook)(Ref(f), f->value.tf->fileName, f->value.tf->lineDefined); + else + (*lua_callhook)(Ref(f), "(C)", -1); + } + top = stack+old_top; + CnResults = oldCnResults; + CBase = oldBase; +} + + +/* ** Call a C function. CBase will point to the top of the stack, ** and CnResults is the number of parameters. Returns an index ** to the first result from C. @@ -204,8 +246,12 @@ static StkId callC (lua_CFunction func, StkId base) StkId firstResult; CnResults = (top-stack) - base; /* incorporate parameters on the stack */ - CBase = base+CnResults; + CBase = base+CnResults; /* == top-stack */ + if (lua_callhook) + callHook(base, LUA_T_CMARK, 0); (*func)(); + if (lua_callhook) /* func may have changed lua_callhook */ + callHook(base, LUA_T_CMARK, 1); firstResult = CBase; CBase = oldBase; CnResults = oldCnResults; @@ -303,6 +349,18 @@ static void storesubscript (void) } +static void getglobal (Word n) +{ + *top = lua_table[n].object; + incr_top; + if (tag(top-1) == LUA_T_NIL) + { /* must call getglobal fallback */ + tag(top-1) = LUA_T_STRING; + tsvalue(top-1) = lua_table[n].varname; + callFB(FB_GETGLOBAL); + } +} + /* ** Traverse all objects on stack */ @@ -340,7 +398,7 @@ void lua_error (char *s) } -lua_Object lua_stackedfunction (int level) +lua_Function lua_stackedfunction (int level) { Object *p = top; while (--p >= stack) @@ -351,13 +409,45 @@ lua_Object lua_stackedfunction (int level) } -int lua_currentline (lua_Object func) +int lua_currentline (lua_Function func) { Object *f = Address(func); return (f+1 < top && (f+1)->tag == LUA_T_LINE) ? (f+1)->value.i : -1; } +lua_Object lua_getlocal (lua_Function func, int local_number, char **name) +{ + Object *f = luaI_Address(func); + *name = luaI_getlocalname(f->value.tf, local_number, lua_currentline(func)); + if (*name) + { + /* if "*name", there must be a LUA_T_LINE */ + /* therefore, f+2 points to function base */ + return Ref((f+2)+(local_number-1)); + } + else + return LUA_NOOBJECT; +} + +int lua_setlocal (lua_Function func, int local_number) +{ + Object *f = Address(func); + char *name = luaI_getlocalname(f->value.tf, local_number, lua_currentline(func)); + adjustC(1); + --top; + if (name) + { + /* if "name", there must be a LUA_T_LINE */ + /* therefore, f+2 points to function base */ + *((f+2)+(local_number-1)) = *top; + return 1; + } + else + return 0; +} + + /* ** Execute a protected call. Assumes that function is at CBase and ** parameters are on top of it. Leave nResults on the stack. @@ -386,6 +476,16 @@ static int do_protectedrun (int nResults) return status; } +int luaI_dorun (TFunc *tf) +{ + int status; + adjustC(1); /* one slot for the pseudo-function */ + stack[CBase].tag = LUA_T_FUNCTION; + stack[CBase].value.tf = tf; + status = do_protectedrun(0); + adjustC(0); + return status; +} static int do_protectedmain (void) { @@ -394,16 +494,12 @@ static int do_protectedmain (void) jmp_buf myErrorJmp; jmp_buf *oldErr = errorJmp; errorJmp = &myErrorJmp; - adjustC(1); /* one slot for the pseudo-function */ - stack[CBase].tag = LUA_T_FUNCTION; - stack[CBase].value.tf = &tf; - tf.lineDefined = 0; + luaI_initTFunc(&tf); tf.fileName = lua_parsedfile; - tf.code = NULL; if (setjmp(myErrorJmp) == 0) { lua_parse(&tf); - status = do_protectedrun(0); + status = luaI_dorun(&tf); } else { @@ -411,8 +507,7 @@ static int do_protectedmain (void) adjustC(0); /* erase extra slot */ } errorJmp = oldErr; - if (tf.code) - luaI_free(tf.code); + luaI_free(tf.code); return status; } @@ -449,13 +544,13 @@ int lua_call (char *funcname) int lua_dofile (char *filename) { int status; - char *message = lua_openfile (filename); - if (message) - { - lua_message(message); + int c; + FILE *f = lua_openfile(filename); + if (f == NULL) return 1; - } - status = do_protectedmain(); + c = fgetc(f); + ungetc(c, f); + status = (c == ID_CHUNK) ? luaI_undump(f) : do_protectedmain(); lua_closefile(); return status; } @@ -514,8 +609,9 @@ static StkId Cblocks[MAX_C_BLOCKS]; */ void lua_beginblock (void) { - if (numCblocks < MAX_C_BLOCKS) - Cblocks[numCblocks] = CBase; + if (numCblocks >= MAX_C_BLOCKS) + lua_error("`lua_beginblock': too many nested blocks"); + Cblocks[numCblocks] = CBase; numCblocks++; } @@ -525,11 +621,8 @@ void lua_beginblock (void) void lua_endblock (void) { --numCblocks; - if (numCblocks < MAX_C_BLOCKS) - { - CBase = Cblocks[numCblocks]; - adjustC(0); - } + CBase = Cblocks[numCblocks]; + adjustC(0); } /* @@ -566,6 +659,23 @@ lua_Object lua_getparam (int number) return CBase-CnResults+number; } +int lua_isnumber (lua_Object object) +{ + return (object != LUA_NOOBJECT) && (tonumber(Address(object)) == 0); +} + +int lua_isstring (lua_Object object) +{ + int t = lua_type(object); + return (t == LUA_T_STRING) || (t == LUA_T_NUMBER); +} + +int lua_isfunction (lua_Object object) +{ + int t = lua_type(object); + return (t == LUA_T_FUNCTION) || (t == LUA_T_CFUNCTION); +} + /* ** Given an object handle, return its number value. On error, return 0.0. */ @@ -607,27 +717,31 @@ void *lua_getuserdata (lua_Object object) } -lua_Object lua_getlocked (int ref) +lua_Object lua_getref (int ref) { - adjustC(0); - *top = *luaI_getlocked(ref); - incr_top; - CBase++; /* incorporate object in the stack */ - return Ref(top-1); + Object *o = luaI_getref(ref); + if (o == NULL) + return LUA_NOOBJECT; + adjustC(0); + luaI_pushobject(o); + CBase++; /* incorporate object in the stack */ + return Ref(top-1); } -void lua_pushlocked (int ref) +void lua_pushref (int ref) { - *top = *luaI_getlocked(ref); - incr_top; + Object *o = luaI_getref(ref); + if (o == NULL) + lua_error("access to invalid (possibly garbage collected) reference"); + luaI_pushobject(o); } -int lua_lock (void) +int lua_ref (int lock) { adjustC(1); - return luaI_lock(--top); + return luaI_ref(--top, lock); } @@ -637,10 +751,8 @@ int lua_lock (void) */ lua_Object lua_getglobal (char *name) { - Word n = luaI_findsymbolbyname(name); adjustC(0); - *top = s_object(n); - incr_top; + getglobal(luaI_findsymbolbyname(name)); CBase++; /* incorporate object in the stack */ return Ref(top-1); } @@ -678,20 +790,17 @@ void lua_pushnumber (real n) */ void lua_pushstring (char *s) { - tsvalue(top) = lua_createstring(s); - tag(top) = LUA_T_STRING; - incr_top; -} - -/* -** Push an object (tag=string) on stack and register it on the constant table. -*/ -void lua_pushliteral (char *s) -{ - tsvalue(top) = lua_constant[luaI_findconstantbyname(s)]; - tag(top) = LUA_T_STRING; - incr_top; + if (s == NULL) + tag(top) = LUA_T_NIL; + else + { + tsvalue(top) = lua_createstring(s); + tag(top) = LUA_T_STRING; + } + incr_top; } +/*>>>>>>>>>#undef lua_pushliteral +void lua_pushliteral(char *s) { lua_pushstring(s); }*/ /* ** Push an object (tag=cfunction) to stack. @@ -707,27 +816,29 @@ void lua_pushcfunction (lua_CFunction fn) */ void lua_pushusertag (void *u, int tag) { - if (tag < LUA_T_USERDATA) return; + if (tag < LUA_T_USERDATA) + lua_error("invalid tag in `lua_pushusertag'"); tag(top) = tag; uvalue(top) = u; incr_top; } /* -** Push a lua_Object to stack. +** Push an object on the stack. */ -void lua_pushobject (lua_Object o) +void luaI_pushobject (Object *o) { - *top = *Address(o); + *top = *o; incr_top; } /* -** Push an object on the stack. +** Push a lua_Object on stack. */ -void luaI_pushobject (Object *o) +void lua_pushobject (lua_Object o) { - *top = *o; - incr_top; + if (o == LUA_NOOBJECT) + lua_error("attempt to push a NOOBJECT"); + luaI_pushobject(Address(o)); } int lua_type (lua_Object o) @@ -783,6 +894,8 @@ static void comparison (lua_Type tag_less, lua_Type tag_equal, */ static StkId lua_execute (Byte *pc, StkId base) { + if (lua_callhook) + callHook (base, LUA_T_MARK, 0); while (1) { OpCode opcode; @@ -849,8 +962,7 @@ static StkId lua_execute (Byte *pc, StkId base) { CodeWord code; get_word(code,pc); - *top = s_object(code.w); - incr_top; + getglobal(code.w); } break; @@ -1143,10 +1255,10 @@ static StkId lua_execute (Byte *pc, StkId base) break; case RETCODE0: - return base; - case RETCODE: - return base+*pc; + if (lua_callhook) + callHook (base, LUA_T_MARK, 1); + return (base + ((opcode==RETCODE0) ? 0 : *pc)); case SETLINE: { @@ -1160,6 +1272,8 @@ static StkId lua_execute (Byte *pc, StkId base) (stack+base-1)->tag = LUA_T_LINE; } (stack+base-1)->value.i = code.w; + if (lua_linehook) + lineHook (code.w); break; } @@ -1169,4 +1283,3 @@ static StkId lua_execute (Byte *pc, StkId base) } } - diff --git a/src/opcode.h b/src/opcode.h index 5e33c2cf..d42ff3ee 100644 --- a/src/opcode.h +++ b/src/opcode.h @@ -1,6 +1,6 @@ /* ** TeCGraf - PUC-Rio -** $Id: opcode.h,v 3.14 1995/10/25 13:05:51 roberto Exp $ +** $Id: opcode.h,v 3.20 1996/03/15 13:13:13 roberto Exp $ */ #ifndef opcode_h @@ -11,9 +11,6 @@ #include "tree.h" #include "func.h" -#ifndef real -#define real float -#endif #define FIELDS_PER_FLUSH 40 @@ -74,12 +71,9 @@ typedef enum #define MULT_RET 255 -typedef void (*Cfunction) (void); -typedef int (*Input) (void); - typedef union { - Cfunction f; + lua_CFunction f; real n; TaggedString *ts; TFunc *tf; @@ -94,10 +88,6 @@ typedef struct Object Value value; } Object; -typedef struct -{ - Object object; -} Symbol; /* Macros to access structure members */ #define tag(o) ((o)->tag) @@ -119,14 +109,14 @@ typedef struct typedef union { - struct {char c1; char c2;} m; + struct {Byte c1; Byte c2;} m; Word w; } CodeWord; #define get_word(code,pc) {code.m.c1 = *pc++; code.m.c2 = *pc++;} typedef union { - struct {char c1; char c2; char c3; char c4;} m; + struct {Byte c1; Byte c2; Byte c3; Byte c4;} m; float f; } CodeFloat; #define get_float(code,pc) {code.m.c1 = *pc++; code.m.c2 = *pc++;\ @@ -134,7 +124,7 @@ typedef union typedef union { - struct {char c1; char c2; char c3; char c4;} m; + struct {Byte c1; Byte c2; Byte c3; Byte c4;} m; TFunc *tf; } CodeCode; #define get_code(code,pc) {code.m.c1 = *pc++; code.m.c2 = *pc++;\ @@ -142,16 +132,12 @@ typedef union /* Exported functions */ -char *lua_strdup (char *l); - -void lua_setinput (Input fn); /* from "lex.c" module */ -char *lua_lasttext (void); /* from "lex.c" module */ -int yylex (void); /* from "lex.c" module */ void lua_parse (TFunc *tf); /* from "lua.stx" module */ void luaI_codedebugline (int line); /* from "lua.stx" module */ void lua_travstack (int (*fn)(Object *)); Object *luaI_Address (lua_Object o); void luaI_pushobject (Object *o); void luaI_gcFB (Object *o); +int luaI_dorun (TFunc *tf); #endif diff --git a/src/parser.c b/src/parser.c index 6b0dba94..1cbb3c17 100644 --- a/src/parser.c +++ b/src/parser.c @@ -1,25 +1,26 @@ #if defined (__cplusplus) || defined (c_plusplus) #include <c_varieties.h> #ifdef __EXTERN_C__ - EXTERN_FUNCTION ( extern int yylex, ()); + EXTERN_FUNCTION ( extern int luaY_lex, ()); #else - extern int yylex(); + extern int luaY_lex(); #endif - extern void yyerror(char *); - extern int yyparse(); + extern void luaY_error(char *); + extern int luaY_parse(); #endif -#include <malloc.h> +#include <stdlib.h> # line 2 "lua.stx" -char *rcs_luastx = "$Id: lua.stx,v 3.25 1995/10/26 17:02:50 roberto Exp $"; +char *rcs_luastx = "$Id: parser.c,v 1.1 1996/05/14 19:44:57 lhf Exp $"; #include <stdio.h> #include <stdlib.h> -#include <string.h> +#include "luadebug.h" #include "mem.h" +#include "lex.h" #include "opcode.h" #include "hash.h" #include "inout.h" @@ -29,7 +30,7 @@ char *rcs_luastx = "$Id: lua.stx,v 3.25 1995/10/26 17:02:50 roberto Exp $"; #include "func.h" /* to avoid warnings generated by yacc */ -int yyparse (void); +int luaY_parse (void); #define malloc luaI_malloc #define realloc luaI_realloc #define free luaI_free @@ -43,7 +44,7 @@ int yyparse (void); #endif static int maxcode; static int maxmain; -static Long maxcurr; /* to allow maxcurr *= 2 without overflow */ +static int maxcurr; static Byte *funcCode = NULL; static Byte **initcode; static Byte *basepc; @@ -57,35 +58,32 @@ static Long varbuffer[MAXVAR]; /* variables in an assignment list; static int nvarbuffer=0; /* number of variables at a list */ #define MAXLOCALS 32 -static Word localvar[MAXLOCALS]; /* store local variable names */ +static TaggedString *localvar[MAXLOCALS]; /* store local variable names */ static int nlocalvar=0; /* number of local variables */ #define MAXFIELDS FIELDS_PER_FLUSH*2 static Word fields[MAXFIELDS]; /* fieldnames to be flushed */ static int nfields=0; +int lua_debug = 0; /* Internal functions */ -static void yyerror (char *s) +static void luaY_error (char *s) { - static char msg[256]; - sprintf (msg,"%s near \"%s\" at line %d in file `%s'", - s, lua_lasttext (), lua_linenumber, lua_parsedfile); + char msg[256]; + char *token = lua_lasttext(); + if (token[0] == 0) + token = "<eof>"; + sprintf (msg,"%s; last token read: \"%s\" at line %d in file `%s'", + s, token, lua_linenumber, lua_parsedfile); lua_error (msg); } static void code_byte (Byte c) { if (pc>maxcurr-2) /* 1 byte free to code HALT of main code */ - { - if (maxcurr >= MAX_INT) - lua_error("code size overflow"); - maxcurr *= 2; - if (maxcurr >= MAX_INT) - maxcurr = MAX_INT; - basepc = growvector(basepc, maxcurr, Byte); - } + maxcurr = growvector(&basepc, maxcurr, Byte, codeEM, MAX_INT); basepc[pc++] = c; } @@ -117,10 +115,12 @@ static void code_code (TFunc *tf) code_byte(code.m.c4); } -static void code_word_at (Byte *p, Word n) +static void code_word_at (Byte *p, int n) { CodeWord code; - code.w = n; + if ((Word)n != n) + luaY_error("block too big"); + code.w = (Word)n; *p++ = code.m.c1; *p++ = code.m.c2; } @@ -130,7 +130,7 @@ static void push_field (Word name) if (nfields < MAXFIELDS) fields[nfields++] = name; else - lua_error ("too many fields in nested constructors"); + luaY_error ("too many fields in nested constructors"); } static void flush_record (int n) @@ -155,24 +155,24 @@ static void flush_list (int m, int n) code_byte(m); } else - lua_error ("list constructor too long"); + luaY_error ("list constructor too long"); code_byte(n); } -static void add_localvar (Word name) +static void store_localvar (TaggedString *name, int n) { - if (nlocalvar < MAXLOCALS) - localvar[nlocalvar++] = name; + if (nlocalvar+n < MAXLOCALS) + localvar[nlocalvar+n] = name; else - lua_error ("too many local variables"); + luaY_error ("too many local variables"); + if (lua_debug) + luaI_registerlocalvar(name, lua_linenumber); } -static void store_localvar (Word name, int n) +static void add_localvar (TaggedString *name) { - if (nlocalvar+n < MAXLOCALS) - localvar[nlocalvar+n] = name; - else - lua_error ("too many local variables"); + store_localvar(name, 0); + nlocalvar++; } static void add_varbuffer (Long var) @@ -180,7 +180,7 @@ static void add_varbuffer (Long var) if (nvarbuffer < MAXVAR) varbuffer[nvarbuffer++] = var; else - lua_error ("variable buffer overflow"); + luaY_error ("variable buffer overflow"); } static void code_number (float f) @@ -210,7 +210,7 @@ static void code_number (float f) /* ** Search a local name and if find return its index. If do not find return -1 */ -static int lua_localname (Word n) +static int lua_localname (TaggedString *n) { int i; for (i=nlocalvar-1; i >= 0; i--) @@ -401,13 +401,12 @@ static void codeIf (Long thenAdd, Long elseAdd) */ void lua_parse (TFunc *tf) { - lua_debug = 0; initcode = &(tf->code); *initcode = newvector(CODE_BLOCK, Byte); maincode = 0; maxmain = CODE_BLOCK; change2main(); - if (yyparse ()) lua_error("parse error"); + if (luaY_parse ()) lua_error("parse error"); savemain(); (*initcode)[maincode++] = RETCODE0; tf->size = maincode; @@ -419,7 +418,7 @@ void lua_parse (TFunc *tf) -# line 411 "lua.stx" +# line 410 "lua.stx" typedef union { int vInt; @@ -428,7 +427,7 @@ typedef union Word vWord; Long vLong; TFunc *pFunc; - TreeNode *pNode; + TaggedString *pTStr; } YYSTYPE; # define WRONGTOKEN 257 # define NIL 258 @@ -457,244 +456,19 @@ typedef union # define CONC 281 # define UNARY 282 # define NOT 283 -#define yyclearin yychar = -1 -#define yyerrok yyerrflag = 0 -extern int yychar; -extern int yyerrflag; +#define luaY_clearin luaY_char = -1 +#define luaY_errok luaY_errflag = 0 +extern int luaY_char; +extern int luaY_errflag; #ifndef YYMAXDEPTH #define YYMAXDEPTH 150 #endif -YYSTYPE yylval, yyval; +YYSTYPE luaY_lval, luaY_val; # define YYERRCODE 256 -# line 789 "lua.stx" - - -#if LISTING - -static void PrintCode (Byte *code, Byte *end) -{ - Byte *p = code; - printf ("\n\nCODE\n"); - while (p != end) - { - switch ((OpCode)*p) - { - case PUSHNIL: printf ("%d PUSHNIL\n", (p++)-code); break; - case PUSH0: case PUSH1: case PUSH2: - printf ("%d PUSH%c\n", p-code, *p-PUSH0+'0'); - p++; - break; - case PUSHBYTE: - printf ("%d PUSHBYTE %d\n", p-code, *(++p)); - p++; - break; - case PUSHWORD: - { - CodeWord c; - int n = p-code; - p++; - get_word(c,p); - printf ("%d PUSHWORD %d\n", n, c.w); - } - break; - case PUSHFLOAT: - { - CodeFloat c; - int n = p-code; - p++; - get_float(c,p); - printf ("%d PUSHFLOAT %f\n", n, c.f); - } - break; - case PUSHSTRING: - { - CodeWord c; - int n = p-code; - p++; - get_word(c,p); - printf ("%d PUSHSTRING %d\n", n, c.w); - } - break; - case PUSHFUNCTION: - { - CodeCode c; - int n = p-code; - p++; - get_code(c,p); - printf ("%d PUSHFUNCTION %p\n", n, c.tf); - } - break; - - case PUSHLOCAL0: case PUSHLOCAL1: case PUSHLOCAL2: case PUSHLOCAL3: - case PUSHLOCAL4: case PUSHLOCAL5: case PUSHLOCAL6: case PUSHLOCAL7: - case PUSHLOCAL8: case PUSHLOCAL9: - printf ("%d PUSHLOCAL%c\n", p-code, *p-PUSHLOCAL0+'0'); - p++; - break; - case PUSHLOCAL: printf ("%d PUSHLOCAL %d\n", p-code, *(++p)); - p++; - break; - case PUSHGLOBAL: - { - CodeWord c; - int n = p-code; - p++; - get_word(c,p); - printf ("%d PUSHGLOBAL %d\n", n, c.w); - } - break; - case PUSHINDEXED: printf ("%d PUSHINDEXED\n", (p++)-code); break; - case STORELOCAL0: case STORELOCAL1: case STORELOCAL2: case STORELOCAL3: - case STORELOCAL4: case STORELOCAL5: case STORELOCAL6: case STORELOCAL7: - case STORELOCAL8: case STORELOCAL9: - printf ("%d STORELOCAL%c\n", p-code, *p-STORELOCAL0+'0'); - p++; - break; - case STORELOCAL: - printf ("%d STORELOCAL %d\n", p-code, *(++p)); - p++; - break; - case STOREGLOBAL: - { - CodeWord c; - int n = p-code; - p++; - get_word(c,p); - printf ("%d STOREGLOBAL %d\n", n, c.w); - } - break; - case PUSHSELF: - { - CodeWord c; - int n = p-code; - p++; - get_word(c,p); - printf ("%d PUSHSELF %d\n", n, c.w); - } - break; - case STOREINDEXED0: printf ("%d STOREINDEXED0\n", (p++)-code); break; - case STOREINDEXED: printf ("%d STOREINDEXED %d\n", p-code, *(++p)); - p++; - break; - case STORELIST0: - printf("%d STORELIST0 %d\n", p-code, *(++p)); - p++; - break; - case STORELIST: - printf("%d STORELIST %d %d\n", p-code, *(p+1), *(p+2)); - p+=3; - break; - case STORERECORD: - printf("%d STORERECORD %d\n", p-code, *(++p)); - p += *p*sizeof(Word) + 1; - break; - case ADJUST0: printf ("%d ADJUST0\n", (p++)-code); break; - case ADJUST: - printf ("%d ADJUST %d\n", p-code, *(++p)); - p++; - break; - case CREATEARRAY: - { - CodeWord c; - int n = p-code; - p++; - get_word(c,p); - printf ("%d CREATEARRAY %d\n", n, c.w); - break; - } - case EQOP: printf ("%d EQOP\n", (p++)-code); break; - case LTOP: printf ("%d LTOP\n", (p++)-code); break; - case LEOP: printf ("%d LEOP\n", (p++)-code); break; - case ADDOP: printf ("%d ADDOP\n", (p++)-code); break; - case SUBOP: printf ("%d SUBOP\n", (p++)-code); break; - case MULTOP: printf ("%d MULTOP\n", (p++)-code); break; - case DIVOP: printf ("%d DIVOP\n", (p++)-code); break; - case POWOP: printf ("%d POWOP\n", (p++)-code); break; - case CONCOP: printf ("%d CONCOP\n", (p++)-code); break; - case MINUSOP: printf ("%d MINUSOP\n", (p++)-code); break; - case NOTOP: printf ("%d NOTOP\n", (p++)-code); break; - case ONTJMP: - { - CodeWord c; - int n = p-code; - p++; - get_word(c,p); - printf ("%d ONTJMP %d\n", n, c.w); - } - break; - case ONFJMP: - { - CodeWord c; - int n = p-code; - p++; - get_word(c,p); - printf ("%d ONFJMP %d\n", n, c.w); - } - break; - case JMP: - { - CodeWord c; - int n = p-code; - p++; - get_word(c,p); - printf ("%d JMP %d\n", n, c.w); - } - break; - case UPJMP: - { - CodeWord c; - int n = p-code; - p++; - get_word(c,p); - printf ("%d UPJMP %d\n", n, c.w); - } - break; - case IFFJMP: - { - CodeWord c; - int n = p-code; - p++; - get_word(c,p); - printf ("%d IFFJMP %d\n", n, c.w); - } - break; - case IFFUPJMP: - { - CodeWord c; - int n = p-code; - p++; - get_word(c,p); - printf ("%d IFFUPJMP %d\n", n, c.w); - } - break; - case POP: printf ("%d POP\n", (p++)-code); break; - case CALLFUNC: - printf ("%d CALLFUNC %d %d\n", p-code, *(p+1), *(p+2)); - p+=3; - break; - case RETCODE0: printf ("%d RETCODE0\n", (p++)-code); break; - case RETCODE: - printf ("%d RETCODE %d\n", p-code, *(++p)); - p++; - break; - case SETLINE: - { - CodeWord c; - int n = p-code; - p++; - get_word(c,p); - printf ("%d SETLINE %d\n", n, c.w); - } - break; - - default: printf ("%d Cannot happen: code %d\n", (p++)-code, *(p-1)); break; - } - } -} -#endif +# line 788 "lua.stx" -int yyexca[] ={ +int luaY_exca[] ={ -1, 1, 0, -1, -2, 0, @@ -760,7 +534,7 @@ int yyexca[] ={ }; # define YYNPROD 100 # define YYLAST 311 -int yyact[]={ +int luaY_act[]={ 61, 59, 148, 60, 141, 62, 118, 61, 59, 90, 60, 89, 62, 86, 84, 18, 42, 168, 54, 164, @@ -794,7 +568,7 @@ int yyact[]={ 0, 0, 0, 0, 0, 30, 31, 18, 30, 31, 113, 0, 0, 0, 64, 0, 0, 34, 0, 0, 34 }; -int yypact[]={ +int luaY_pact[]={ -1000, -188, -1000, -1000, 51, -1000, -258, 24, -1000, -1000, 47, -1000, -257, -1000, -1000, 93, -1000, 73, -1000, -1000, @@ -814,14 +588,14 @@ int yypact[]={ -21, -1000, -1000, -1000, 51, -1000, -1000, -248, -1000, 24, -1000, 69, -250, -1000, -1000, -1000, -42, -1000, -1000, -1000, -1000, -1000, -212, -1000 }; -int yypgo[]={ +int luaY_pgo[]={ 0, 216, 54, 44, 138, 76, 57, 212, 211, 210, 205, 202, 201, 199, 61, 198, 195, 194, 189, 159, 188, 186, 185, 184, 182, 92, 37, 181, 130, 32, 180, 88, 34, 177, 176, 175, 172, 141, 170, 168, 165, 163, 154, 134, 51, 56 }; -int yyr1[]={ +int luaY_r1[]={ 0, 1, 1, 1, 23, 23, 24, 21, 21, 22, 30, 30, 26, 26, 25, 33, 25, 34, 25, 25, @@ -833,7 +607,7 @@ int yyr1[]={ 42, 42, 43, 10, 10, 15, 15, 44, 44, 13, 13, 14, 14, 45, 16, 16, 17, 17, 7, 7, 19, 19, 19, 20, 28, 11, 11, 12, 12, 27 }; -int yyr2[]={ +int luaY_r2[]={ 0, 0, 4, 4, 4, 2, 7, 3, 7, 11, 0, 6, 0, 2, 17, 1, 17, 1, 13, 7, @@ -845,7 +619,7 @@ int yyr2[]={ 3, 7, 1, 7, 5, 1, 5, 0, 2, 1, 5, 3, 7, 7, 1, 5, 3, 7, 3, 7, 3, 9, 7, 3, 3, 3, 7, 1, 5, 3 }; -int yychk[]={ +int luaY_chk[]={ -1000, -1, -23, -24, -25, -27, 270, 259, 263, 265, -7, -5, 269, 274, -19, -9, -20, -28, 273, -26, @@ -865,7 +639,7 @@ int yychk[]={ -31, -29, -2, -26, -3, -6, 267, -32, 261, 262, -13, -14, -2, -26, 267, -29, -31, -44, 267, 260, -2, -29, -2, -32 }; -int yydef[]={ +int luaY_def[]={ 1, -2, 2, 3, 12, 5, 0, 56, 15, 17, 0, 20, 0, 99, -2, 56, 90, 59, 93, 4, @@ -885,14 +659,14 @@ int yydef[]={ 83, 29, 18, 11, 12, -2, 9, 0, 25, 56, 76, 77, 0, 28, 14, 23, 0, 80, 16, 29, 25, 29, 22, 24 }; -typedef struct { char *t_name; int t_val; } yytoktype; +typedef struct { char *t_name; int t_val; } luaY_toktype; #ifndef YYDEBUG # define YYDEBUG 0 /* don't allow debugging */ #endif #if YYDEBUG -yytoktype yytoks[] = +luaY_toktype luaY_toks[] = { "WRONGTOKEN", 257, "NIL", 258, @@ -931,7 +705,7 @@ yytoktype yytoks[] = "-unknown-", -1 /* ends search */ }; -char * yyreds[] = +char * luaY_reds[] = { "-no such reduction-", "functionlist : /* empty */", @@ -1048,24 +822,24 @@ char * yyreds[] = /* ** yacc user known macros and defines */ -#define YYERROR goto yyerrlab +#define YYERROR goto luaY_errlab #define YYACCEPT return(0) #define YYABORT return(1) #define YYBACKUP( newtoken, newvalue )\ {\ - if ( yychar >= 0 || ( yyr2[ yytmp ] >> 1 ) != 1 )\ + if ( luaY_char >= 0 || ( luaY_r2[ luaY_tmp ] >> 1 ) != 1 )\ {\ - yyerror( "syntax error - cannot backup" );\ - goto yyerrlab;\ + luaY_error( "syntax error - cannot backup" );\ + goto luaY_errlab;\ }\ - yychar = newtoken;\ - yystate = *yyps;\ - yylval = newvalue;\ - goto yynewstate;\ + luaY_char = newtoken;\ + luaY_state = *luaY_ps;\ + luaY_lval = newvalue;\ + goto luaY_newstate;\ } -#define YYRECOVERING() (!!yyerrflag) +#define YYRECOVERING() (!!luaY_errflag) #define YYCOPY(to, from, type) \ - (type *) memcpy(to, (char *) from, yynewmax * sizeof(type)) + (type *) memcpy(to, (char *) from, luaY_newmax * sizeof(type)) #ifndef YYDEBUG # define YYDEBUG 1 /* make debugging available */ #endif @@ -1085,7 +859,7 @@ EXTERN_FUNCTION ( extern void *memcpy, (void *, const void *, int) ); /* ** user known globals */ -int yydebug; /* set to 1 to get debugging */ +int luaY_debug; /* set to 1 to get debugging */ /* ** driver internal defines @@ -1095,50 +869,50 @@ int yydebug; /* set to 1 to get debugging */ /* ** static variables used by the parser */ -static YYSTYPE yy_yyv[YYMAXDEPTH], *yyv = yy_yyv; /* value stack */ -static int yy_yys[YYMAXDEPTH], *yys = yy_yys; /* state stack */ +static YYSTYPE luaY__luaY_v[YYMAXDEPTH], *luaY_v = luaY__luaY_v; /* value stack */ +static int luaY__luaY_s[YYMAXDEPTH], *luaY_s = luaY__luaY_s; /* state stack */ -static YYSTYPE *yypv; /* top of value stack */ -static int *yyps; /* top of state stack */ +static YYSTYPE *luaY_pv; /* top of value stack */ +static int *luaY_ps; /* top of state stack */ -static int yystate; /* current state */ -static int yytmp; /* extra var (lasts between blocks) */ +static int luaY_state; /* current state */ +static int luaY_tmp; /* extra var (lasts between blocks) */ #if defined(__cplusplus) || defined(__STDC__) || defined(lint) static int __yaccpar_lint_hack__ = 0; /* if you change the value from 0 to something else, make sure you know - what to do with yyerrlab reference. + what to do with luaY_errlab reference. This is a hack - to make sure C++ and lint are happy with the 4.1 yacc code. */ #endif -int yynerrs; /* number of errors */ +int luaY_nerrs; /* number of errors */ -int yyerrflag; /* error recovery flag */ -int yychar; /* current input token number */ -static unsigned yymaxdepth = YYMAXDEPTH; +int luaY_errflag; /* error recovery flag */ +int luaY_char; /* current input token number */ +static unsigned luaY_maxdepth = YYMAXDEPTH; /* -** yyparse - return 0 if worked, 1 if syntax error not recovered from +** luaY_parse - return 0 if worked, 1 if syntax error not recovered from */ int -yyparse() +luaY_parse() { - register YYSTYPE *yypvt = (YYSTYPE*)0 ; /* top of value stack for + register YYSTYPE *luaY_pvt = (YYSTYPE*)0 ; /* top of value stack for $vars */ /* - ** Initialize externals - yyparse may be called more than once + ** Initialize externals - luaY_parse may be called more than once */ - yypv = &yyv[-1]; - yyps = &yys[-1]; - yystate = 0; - yytmp = 0; - yynerrs = 0; - yyerrflag = 0; - yychar = -1; + luaY_pv = &luaY_v[-1]; + luaY_ps = &luaY_s[-1]; + luaY_state = 0; + luaY_tmp = 0; + luaY_nerrs = 0; + luaY_errflag = 0; + luaY_char = -1; #if defined(__cplusplus) || defined(__STDC__) || defined(lint) /* @@ -1147,42 +921,42 @@ $vars */ */ switch (__yaccpar_lint_hack__) { - case 1: goto yyerrlab; - case 2: goto yynewstate; + case 1: goto luaY_errlab; + case 2: goto luaY_newstate; } #endif { - register YYSTYPE *yy_pv; /* top of value stack */ - register int *yy_ps; /* top of state stack */ - register int yy_state; /* current state */ - register int yy_n; /* internal state number info */ + register YYSTYPE *luaY__pv; /* top of value stack */ + register int *luaY__ps; /* top of state stack */ + register int luaY__state; /* current state */ + register int luaY__n; /* internal state number info */ - goto yystack; + goto luaY_stack; /* ** get globals into registers. ** branch to here only if YYBACKUP was called. */ - yynewstate: - yy_pv = yypv; - yy_ps = yyps; - yy_state = yystate; - goto yy_newstate; + luaY_newstate: + luaY__pv = luaY_pv; + luaY__ps = luaY_ps; + luaY__state = luaY_state; + goto luaY__newstate; /* ** get globals into registers. ** either we just started, or we just finished a reduction */ - yystack: - yy_pv = yypv; - yy_ps = yyps; - yy_state = yystate; + luaY_stack: + luaY__pv = luaY_pv; + luaY__ps = luaY_ps; + luaY__state = luaY_state; /* ** top of for (;;) loop while no reductions done */ - yy_stack: + luaY__stack: /* ** put a state and value onto the stacks */ @@ -1193,153 +967,153 @@ $vars */ ** Note: linear search is used since time is not a real ** consideration while debugging. */ - if ( yydebug ) + if ( luaY_debug ) { - register int yy_i; + register int luaY__i; - (void)printf( "State %d, token ", yy_state ); - if ( yychar == 0 ) + (void)printf( "State %d, token ", luaY__state ); + if ( luaY_char == 0 ) (void)printf( "end-of-file\n" ); - else if ( yychar < 0 ) + else if ( luaY_char < 0 ) (void)printf( "-none-\n" ); else { - for ( yy_i = 0; yytoks[yy_i].t_val >= 0; - yy_i++ ) + for ( luaY__i = 0; luaY_toks[luaY__i].t_val >= 0; + luaY__i++ ) { - if ( yytoks[yy_i].t_val == yychar ) + if ( luaY_toks[luaY__i].t_val == luaY_char ) break; } - (void)printf( "%s\n", yytoks[yy_i].t_name ); + (void)printf( "%s\n", luaY_toks[luaY__i].t_name ); } } #endif /* YYDEBUG */ - if ( ++yy_ps >= &yys[ yymaxdepth ] ) /* room on stack? */ + if ( ++luaY__ps >= &luaY_s[ luaY_maxdepth ] ) /* room on stack? */ { /* ** reallocate and recover. Note that pointers ** have to be reset, or bad things will happen */ - int yyps_index = (yy_ps - yys); - int yypv_index = (yy_pv - yyv); - int yypvt_index = (yypvt - yyv); - int yynewmax; + int luaY_ps_index = (luaY__ps - luaY_s); + int luaY_pv_index = (luaY__pv - luaY_v); + int luaY_pvt_index = (luaY_pvt - luaY_v); + int luaY_newmax; - yynewmax = yymaxdepth + YYMAXDEPTH; - if (yymaxdepth == YYMAXDEPTH) /* first time growth */ + luaY_newmax = luaY_maxdepth + YYMAXDEPTH; + if (luaY_maxdepth == YYMAXDEPTH) /* first time growth */ { - YYSTYPE *newyyv = (YYSTYPE*)malloc(yynewmax*sizeof(YYSTYPE)); - int *newyys = (int*)malloc(yynewmax*sizeof(int)); - if (newyys != 0 && newyyv != 0) + YYSTYPE *newluaY_v = (YYSTYPE*)malloc(luaY_newmax*sizeof(YYSTYPE)); + int *newluaY_s = (int*)malloc(luaY_newmax*sizeof(int)); + if (newluaY_s != 0 && newluaY_v != 0) { - yys = YYCOPY(newyys, yys, int); - yyv = YYCOPY(newyyv, yyv, YYSTYPE); + luaY_s = YYCOPY(newluaY_s, luaY_s, int); + luaY_v = YYCOPY(newluaY_v, luaY_v, YYSTYPE); } else - yynewmax = 0; /* failed */ + luaY_newmax = 0; /* failed */ } else /* not first time */ { - yyv = (YYSTYPE*)realloc((char*)yyv, - yynewmax * sizeof(YYSTYPE)); - yys = (int*)realloc((char*)yys, - yynewmax * sizeof(int)); - if (yys == 0 || yyv == 0) - yynewmax = 0; /* failed */ + luaY_v = (YYSTYPE*)realloc((char*)luaY_v, + luaY_newmax * sizeof(YYSTYPE)); + luaY_s = (int*)realloc((char*)luaY_s, + luaY_newmax * sizeof(int)); + if (luaY_s == 0 || luaY_v == 0) + luaY_newmax = 0; /* failed */ } - if (yynewmax <= yymaxdepth) /* tables not expanded */ + if (luaY_newmax <= luaY_maxdepth) /* tables not expanded */ { - yyerror( "yacc stack overflow" ); + luaY_error( "yacc stack overflow" ); YYABORT; } - yymaxdepth = yynewmax; + luaY_maxdepth = luaY_newmax; - yy_ps = yys + yyps_index; - yy_pv = yyv + yypv_index; - yypvt = yyv + yypvt_index; + luaY__ps = luaY_s + luaY_ps_index; + luaY__pv = luaY_v + luaY_pv_index; + luaY_pvt = luaY_v + luaY_pvt_index; } - *yy_ps = yy_state; - *++yy_pv = yyval; + *luaY__ps = luaY__state; + *++luaY__pv = luaY_val; /* ** we have a new state - find out what to do */ - yy_newstate: - if ( ( yy_n = yypact[ yy_state ] ) <= YYFLAG ) - goto yydefault; /* simple state */ + luaY__newstate: + if ( ( luaY__n = luaY_pact[ luaY__state ] ) <= YYFLAG ) + goto luaY_default; /* simple state */ #if YYDEBUG /* ** if debugging, need to mark whether new token grabbed */ - yytmp = yychar < 0; + luaY_tmp = luaY_char < 0; #endif - if ( ( yychar < 0 ) && ( ( yychar = yylex() ) < 0 ) ) - yychar = 0; /* reached EOF */ + if ( ( luaY_char < 0 ) && ( ( luaY_char = luaY_lex() ) < 0 ) ) + luaY_char = 0; /* reached EOF */ #if YYDEBUG - if ( yydebug && yytmp ) + if ( luaY_debug && luaY_tmp ) { - register int yy_i; + register int luaY__i; (void)printf( "Received token " ); - if ( yychar == 0 ) + if ( luaY_char == 0 ) (void)printf( "end-of-file\n" ); - else if ( yychar < 0 ) + else if ( luaY_char < 0 ) (void)printf( "-none-\n" ); else { - for ( yy_i = 0; yytoks[yy_i].t_val >= 0; - yy_i++ ) + for ( luaY__i = 0; luaY_toks[luaY__i].t_val >= 0; + luaY__i++ ) { - if ( yytoks[yy_i].t_val == yychar ) + if ( luaY_toks[luaY__i].t_val == luaY_char ) break; } - (void)printf( "%s\n", yytoks[yy_i].t_name ); + (void)printf( "%s\n", luaY_toks[luaY__i].t_name ); } } #endif /* YYDEBUG */ - if ( ( ( yy_n += yychar ) < 0 ) || ( yy_n >= YYLAST ) ) - goto yydefault; - if ( yychk[ yy_n = yyact[ yy_n ] ] == yychar ) /*valid shift*/ + if ( ( ( luaY__n += luaY_char ) < 0 ) || ( luaY__n >= YYLAST ) ) + goto luaY_default; + if ( luaY_chk[ luaY__n = luaY_act[ luaY__n ] ] == luaY_char ) /*valid shift*/ { - yychar = -1; - yyval = yylval; - yy_state = yy_n; - if ( yyerrflag > 0 ) - yyerrflag--; - goto yy_stack; + luaY_char = -1; + luaY_val = luaY_lval; + luaY__state = luaY__n; + if ( luaY_errflag > 0 ) + luaY_errflag--; + goto luaY__stack; } - yydefault: - if ( ( yy_n = yydef[ yy_state ] ) == -2 ) + luaY_default: + if ( ( luaY__n = luaY_def[ luaY__state ] ) == -2 ) { #if YYDEBUG - yytmp = yychar < 0; + luaY_tmp = luaY_char < 0; #endif - if ( ( yychar < 0 ) && ( ( yychar = yylex() ) < 0 ) ) - yychar = 0; /* reached EOF */ + if ( ( luaY_char < 0 ) && ( ( luaY_char = luaY_lex() ) < 0 ) ) + luaY_char = 0; /* reached EOF */ #if YYDEBUG - if ( yydebug && yytmp ) + if ( luaY_debug && luaY_tmp ) { - register int yy_i; + register int luaY__i; (void)printf( "Received token " ); - if ( yychar == 0 ) + if ( luaY_char == 0 ) (void)printf( "end-of-file\n" ); - else if ( yychar < 0 ) + else if ( luaY_char < 0 ) (void)printf( "-none-\n" ); else { - for ( yy_i = 0; - yytoks[yy_i].t_val >= 0; - yy_i++ ) + for ( luaY__i = 0; + luaY_toks[luaY__i].t_val >= 0; + luaY__i++ ) { - if ( yytoks[yy_i].t_val - == yychar ) + if ( luaY_toks[luaY__i].t_val + == luaY_char ) { break; } } - (void)printf( "%s\n", yytoks[yy_i].t_name ); + (void)printf( "%s\n", luaY_toks[luaY__i].t_name ); } } #endif /* YYDEBUG */ @@ -1347,17 +1121,17 @@ $vars */ ** look through exception table */ { - register int *yyxi = yyexca; + register int *luaY_xi = luaY_exca; - while ( ( *yyxi != -1 ) || - ( yyxi[1] != yy_state ) ) + while ( ( *luaY_xi != -1 ) || + ( luaY_xi[1] != luaY__state ) ) { - yyxi += 2; + luaY_xi += 2; } - while ( ( *(yyxi += 2) >= 0 ) && - ( *yyxi != yychar ) ) + while ( ( *(luaY_xi += 2) >= 0 ) && + ( *luaY_xi != luaY_char ) ) ; - if ( ( yy_n = yyxi[1] ) < 0 ) + if ( ( luaY__n = luaY_xi[1] ) < 0 ) YYACCEPT; } } @@ -1365,42 +1139,42 @@ $vars */ /* ** check for syntax error */ - if ( yy_n == 0 ) /* have an error */ + if ( luaY__n == 0 ) /* have an error */ { /* no worry about speed here! */ - switch ( yyerrflag ) + switch ( luaY_errflag ) { case 0: /* new error */ - yyerror( "syntax error" ); + luaY_error( "syntax error" ); goto skip_init; - yyerrlab: + luaY_errlab: /* ** get globals into registers. ** we have a user generated syntax type error */ - yy_pv = yypv; - yy_ps = yyps; - yy_state = yystate; - yynerrs++; + luaY__pv = luaY_pv; + luaY__ps = luaY_ps; + luaY__state = luaY_state; + luaY_nerrs++; skip_init: case 1: case 2: /* incompletely recovered error */ /* try again... */ - yyerrflag = 3; + luaY_errflag = 3; /* ** find state where "error" is a legal ** shift action */ - while ( yy_ps >= yys ) + while ( luaY__ps >= luaY_s ) { - yy_n = yypact[ *yy_ps ] + YYERRCODE; - if ( yy_n >= 0 && yy_n < YYLAST && - yychk[yyact[yy_n]] == YYERRCODE) { + luaY__n = luaY_pact[ *luaY__ps ] + YYERRCODE; + if ( luaY__n >= 0 && luaY__n < YYLAST && + luaY_chk[luaY_act[luaY__n]] == YYERRCODE) { /* ** simulate shift of "error" */ - yy_state = yyact[ yy_n ]; - goto yy_stack; + luaY__state = luaY_act[ luaY__n ]; + goto luaY__stack; } /* ** current state has no shift on @@ -1408,13 +1182,13 @@ $vars */ */ #if YYDEBUG # define _POP_ "Error recovery pops state %d, uncovers state %d\n" - if ( yydebug ) - (void)printf( _POP_, *yy_ps, - yy_ps[-1] ); + if ( luaY_debug ) + (void)printf( _POP_, *luaY__ps, + luaY__ps[-1] ); # undef _POP_ #endif - yy_ps--; - yy_pv--; + luaY__ps--; + luaY__pv--; } /* ** there is no state on stack with "error" as @@ -1430,40 +1204,40 @@ $vars */ ** debugging, it doesn't hurt to leave the ** tests here. */ - if ( yydebug ) + if ( luaY_debug ) { - register int yy_i; + register int luaY__i; (void)printf( "Error recovery discards " ); - if ( yychar == 0 ) + if ( luaY_char == 0 ) (void)printf( "token end-of-file\n" ); - else if ( yychar < 0 ) + else if ( luaY_char < 0 ) (void)printf( "token -none-\n" ); else { - for ( yy_i = 0; - yytoks[yy_i].t_val >= 0; - yy_i++ ) + for ( luaY__i = 0; + luaY_toks[luaY__i].t_val >= 0; + luaY__i++ ) { - if ( yytoks[yy_i].t_val - == yychar ) + if ( luaY_toks[luaY__i].t_val + == luaY_char ) { break; } } (void)printf( "token %s\n", - yytoks[yy_i].t_name ); + luaY_toks[luaY__i].t_name ); } } #endif /* YYDEBUG */ - if ( yychar == 0 ) /* reached EOF. quit */ + if ( luaY_char == 0 ) /* reached EOF. quit */ YYABORT; - yychar = -1; - goto yy_newstate; + luaY_char = -1; + goto luaY__newstate; } - }/* end if ( yy_n == 0 ) */ + }/* end if ( luaY__n == 0 ) */ /* - ** reduction by production yy_n + ** reduction by production luaY__n ** put stack tops, etc. so things right after switch */ #if YYDEBUG @@ -1472,92 +1246,95 @@ $vars */ ** specification of the reduction which is just about ** to be done. */ - if ( yydebug ) + if ( luaY_debug ) (void)printf( "Reduce by (%d) \"%s\"\n", - yy_n, yyreds[ yy_n ] ); + luaY__n, luaY_reds[ luaY__n ] ); #endif - yytmp = yy_n; /* value to switch over */ - yypvt = yy_pv; /* $vars top of value stack */ + luaY_tmp = luaY__n; /* value to switch over */ + luaY_pvt = luaY__pv; /* $vars top of value stack */ /* ** Look in goto table for next state - ** Sorry about using yy_state here as temporary + ** Sorry about using luaY__state here as temporary ** register variable, but why not, if it works... - ** If yyr2[ yy_n ] doesn't have the low order bit + ** If luaY_r2[ luaY__n ] doesn't have the low order bit ** set, then there is no action to be done for ** this reduction. So, no saving & unsaving of ** registers done. The only difference between the ** code just after the if and the body of the if is - ** the goto yy_stack in the body. This way the test + ** the goto luaY__stack in the body. This way the test ** can be made before the choice of what to do is needed. */ { /* length of production doubled with extra bit */ - register int yy_len = yyr2[ yy_n ]; + register int luaY__len = luaY_r2[ luaY__n ]; - if ( !( yy_len & 01 ) ) + if ( !( luaY__len & 01 ) ) { - yy_len >>= 1; - yyval = ( yy_pv -= yy_len )[1]; /* $$ = $1 */ - yy_state = yypgo[ yy_n = yyr1[ yy_n ] ] + - *( yy_ps -= yy_len ) + 1; - if ( yy_state >= YYLAST || - yychk[ yy_state = - yyact[ yy_state ] ] != -yy_n ) + luaY__len >>= 1; + luaY_val = ( luaY__pv -= luaY__len )[1]; /* $$ = $1 */ + luaY__state = luaY_pgo[ luaY__n = luaY_r1[ luaY__n ] ] + + *( luaY__ps -= luaY__len ) + 1; + if ( luaY__state >= YYLAST || + luaY_chk[ luaY__state = + luaY_act[ luaY__state ] ] != -luaY__n ) { - yy_state = yyact[ yypgo[ yy_n ] ]; + luaY__state = luaY_act[ luaY_pgo[ luaY__n ] ]; } - goto yy_stack; + goto luaY__stack; } - yy_len >>= 1; - yyval = ( yy_pv -= yy_len )[1]; /* $$ = $1 */ - yy_state = yypgo[ yy_n = yyr1[ yy_n ] ] + - *( yy_ps -= yy_len ) + 1; - if ( yy_state >= YYLAST || - yychk[ yy_state = yyact[ yy_state ] ] != -yy_n ) + luaY__len >>= 1; + luaY_val = ( luaY__pv -= luaY__len )[1]; /* $$ = $1 */ + luaY__state = luaY_pgo[ luaY__n = luaY_r1[ luaY__n ] ] + + *( luaY__ps -= luaY__len ) + 1; + if ( luaY__state >= YYLAST || + luaY_chk[ luaY__state = luaY_act[ luaY__state ] ] != -luaY__n ) { - yy_state = yyact[ yypgo[ yy_n ] ]; + luaY__state = luaY_act[ luaY_pgo[ luaY__n ] ]; } } /* save until reenter driver code */ - yystate = yy_state; - yyps = yy_ps; - yypv = yy_pv; + luaY_state = luaY__state; + luaY_ps = luaY__ps; + luaY_pv = luaY__pv; } /* ** code supplied by user is placed in this switch */ - switch( yytmp ) + switch( luaY_tmp ) { case 6: -# line 470 "lua.stx" +# line 469 "lua.stx" { code_byte(PUSHFUNCTION); - code_code(yypvt[-0].pFunc); - storesinglevar(yypvt[-1].vLong); + code_code(luaY_pvt[-0].pFunc); + storesinglevar(luaY_pvt[-1].vLong); } break; case 7: -# line 477 "lua.stx" -{ yyval.vLong =yypvt[-0].vLong; init_func(); } break; +# line 476 "lua.stx" +{ luaY_val.vLong =luaY_pvt[-0].vLong; init_func(); } break; case 8: -# line 479 "lua.stx" +# line 478 "lua.stx" { code_byte(PUSHSTRING); - code_word(luaI_findconstant(yypvt[-0].pNode)); - yyval.vLong = 0; /* indexed variable */ + code_word(luaI_findconstant(luaY_pvt[-0].pTStr)); + luaY_val.vLong = 0; /* indexed variable */ init_func(); - add_localvar(luaI_findsymbolbyname("self")); + add_localvar(luaI_createfixedstring("self")); } break; case 9: -# line 489 "lua.stx" +# line 488 "lua.stx" { codereturn(); - yyval.pFunc = new(TFunc); - yyval.pFunc->size = pc; - yyval.pFunc->code = newvector(pc, Byte); - yyval.pFunc->fileName = lua_parsedfile; - yyval.pFunc->lineDefined = yypvt[-3].vInt; - memcpy(yyval.pFunc->code, basepc, pc*sizeof(Byte)); + luaY_val.pFunc = new(TFunc); + luaI_initTFunc(luaY_val.pFunc); + luaY_val.pFunc->size = pc; + luaY_val.pFunc->code = newvector(pc, Byte); + luaY_val.pFunc->fileName = lua_parsedfile; + luaY_val.pFunc->lineDefined = luaY_pvt[-3].vInt; + memcpy(luaY_val.pFunc->code, basepc, pc*sizeof(Byte)); + if (lua_debug) + luaI_closelocalvars(luaY_val.pFunc); /* save func values */ funcCode = basepc; maxcode=maxcurr; #if LISTING @@ -1566,346 +1343,345 @@ case 9: change2main(); /* change back to main code */ } break; case 14: -# line 513 "lua.stx" -{ codeIf(yypvt[-4].vLong, yypvt[-2].vLong); } break; -case 15: # line 515 "lua.stx" -{yyval.vLong=pc;} break; +{ codeIf(luaY_pvt[-4].vLong, luaY_pvt[-2].vLong); } break; +case 15: +# line 517 "lua.stx" +{luaY_val.vLong=pc;} break; case 16: -# line 516 "lua.stx" +# line 518 "lua.stx" { - basepc[yypvt[-3].vLong] = IFFJMP; - code_word_at(basepc+yypvt[-3].vLong+1, pc - (yypvt[-3].vLong + sizeof(Word)+1)); - basepc[yypvt[-1].vLong] = UPJMP; - code_word_at(basepc+yypvt[-1].vLong+1, pc - (yypvt[-6].vLong)); + basepc[luaY_pvt[-3].vLong] = IFFJMP; + code_word_at(basepc+luaY_pvt[-3].vLong+1, pc - (luaY_pvt[-3].vLong + sizeof(Word)+1)); + basepc[luaY_pvt[-1].vLong] = UPJMP; + code_word_at(basepc+luaY_pvt[-1].vLong+1, pc - (luaY_pvt[-6].vLong)); } break; case 17: -# line 523 "lua.stx" -{yyval.vLong=pc;} break; +# line 525 "lua.stx" +{luaY_val.vLong=pc;} break; case 18: -# line 524 "lua.stx" +# line 526 "lua.stx" { - basepc[yypvt[-0].vLong] = IFFUPJMP; - code_word_at(basepc+yypvt[-0].vLong+1, pc - (yypvt[-4].vLong)); + basepc[luaY_pvt[-0].vLong] = IFFUPJMP; + code_word_at(basepc+luaY_pvt[-0].vLong+1, pc - (luaY_pvt[-4].vLong)); } break; case 19: -# line 530 "lua.stx" +# line 532 "lua.stx" { { int i; - adjust_mult_assign(nvarbuffer, yypvt[-0].vLong, yypvt[-2].vInt * 2 + nvarbuffer); + adjust_mult_assign(nvarbuffer, luaY_pvt[-0].vLong, luaY_pvt[-2].vInt * 2 + nvarbuffer); for (i=nvarbuffer-1; i>=0; i--) lua_codestore (i); - if (yypvt[-2].vInt > 1 || (yypvt[-2].vInt == 1 && varbuffer[0] != 0)) + if (luaY_pvt[-2].vInt > 1 || (luaY_pvt[-2].vInt == 1 && varbuffer[0] != 0)) lua_codeadjust (0); } } break; case 21: -# line 542 "lua.stx" -{ nlocalvar += yypvt[-1].vInt; - adjust_mult_assign(yypvt[-1].vInt, yypvt[-0].vInt, 0); +# line 544 "lua.stx" +{ nlocalvar += luaY_pvt[-1].vInt; + adjust_mult_assign(luaY_pvt[-1].vInt, luaY_pvt[-0].vInt, 0); } break; case 24: -# line 550 "lua.stx" -{ codeIf(yypvt[-3].vLong, yypvt[-1].vLong); } break; +# line 552 "lua.stx" +{ codeIf(luaY_pvt[-3].vLong, luaY_pvt[-1].vLong); } break; case 25: -# line 553 "lua.stx" -{yyval.vInt = nlocalvar;} break; +# line 555 "lua.stx" +{luaY_val.vInt = nlocalvar;} break; case 26: -# line 554 "lua.stx" +# line 556 "lua.stx" { - if (nlocalvar != yypvt[-2].vInt) + if (nlocalvar != luaY_pvt[-2].vInt) { - nlocalvar = yypvt[-2].vInt; + if (lua_debug) + for (; nlocalvar > luaY_pvt[-2].vInt; nlocalvar--) + luaI_unregisterlocalvar(lua_linenumber); + else + nlocalvar = luaY_pvt[-2].vInt; lua_codeadjust (0); } } break; case 28: -# line 565 "lua.stx" +# line 571 "lua.stx" { - adjust_functioncall(yypvt[-1].vLong, MULT_RET); + adjust_functioncall(luaY_pvt[-1].vLong, MULT_RET); codereturn(); } break; case 29: -# line 572 "lua.stx" +# line 578 "lua.stx" { - yyval.vLong = pc; + luaY_val.vLong = pc; code_byte(0); /* open space */ code_word (0); } break; case 30: -# line 578 "lua.stx" -{ adjust_functioncall(yypvt[-0].vLong, 1); } break; +# line 584 "lua.stx" +{ adjust_functioncall(luaY_pvt[-0].vLong, 1); } break; case 31: -# line 581 "lua.stx" -{ yyval.vLong = yypvt[-1].vLong; } break; +# line 587 "lua.stx" +{ luaY_val.vLong = luaY_pvt[-1].vLong; } break; case 32: -# line 582 "lua.stx" -{ code_byte(EQOP); yyval.vLong = 0; } break; +# line 588 "lua.stx" +{ code_byte(EQOP); luaY_val.vLong = 0; } break; case 33: -# line 583 "lua.stx" -{ code_byte(LTOP); yyval.vLong = 0; } break; +# line 589 "lua.stx" +{ code_byte(LTOP); luaY_val.vLong = 0; } break; case 34: -# line 584 "lua.stx" -{ code_byte(GTOP); yyval.vLong = 0; } break; +# line 590 "lua.stx" +{ code_byte(GTOP); luaY_val.vLong = 0; } break; case 35: -# line 585 "lua.stx" -{ code_byte(EQOP); code_byte(NOTOP); yyval.vLong = 0; } break; +# line 591 "lua.stx" +{ code_byte(EQOP); code_byte(NOTOP); luaY_val.vLong = 0; } break; case 36: -# line 586 "lua.stx" -{ code_byte(LEOP); yyval.vLong = 0; } break; +# line 592 "lua.stx" +{ code_byte(LEOP); luaY_val.vLong = 0; } break; case 37: -# line 587 "lua.stx" -{ code_byte(GEOP); yyval.vLong = 0; } break; +# line 593 "lua.stx" +{ code_byte(GEOP); luaY_val.vLong = 0; } break; case 38: -# line 588 "lua.stx" -{ code_byte(ADDOP); yyval.vLong = 0; } break; +# line 594 "lua.stx" +{ code_byte(ADDOP); luaY_val.vLong = 0; } break; case 39: -# line 589 "lua.stx" -{ code_byte(SUBOP); yyval.vLong = 0; } break; +# line 595 "lua.stx" +{ code_byte(SUBOP); luaY_val.vLong = 0; } break; case 40: -# line 590 "lua.stx" -{ code_byte(MULTOP); yyval.vLong = 0; } break; +# line 596 "lua.stx" +{ code_byte(MULTOP); luaY_val.vLong = 0; } break; case 41: -# line 591 "lua.stx" -{ code_byte(DIVOP); yyval.vLong = 0; } break; +# line 597 "lua.stx" +{ code_byte(DIVOP); luaY_val.vLong = 0; } break; case 42: -# line 592 "lua.stx" -{ code_byte(POWOP); yyval.vLong = 0; } break; +# line 598 "lua.stx" +{ code_byte(POWOP); luaY_val.vLong = 0; } break; case 43: -# line 593 "lua.stx" -{ code_byte(CONCOP); yyval.vLong = 0; } break; +# line 599 "lua.stx" +{ code_byte(CONCOP); luaY_val.vLong = 0; } break; case 44: -# line 594 "lua.stx" -{ code_byte(MINUSOP); yyval.vLong = 0;} break; +# line 600 "lua.stx" +{ code_byte(MINUSOP); luaY_val.vLong = 0;} break; case 45: -# line 595 "lua.stx" -{ yyval.vLong = 0; } break; +# line 601 "lua.stx" +{ luaY_val.vLong = 0; } break; case 46: -# line 596 "lua.stx" -{ yyval.vLong = 0;} break; +# line 602 "lua.stx" +{ luaY_val.vLong = 0;} break; case 47: -# line 597 "lua.stx" -{ code_number(yypvt[-0].vFloat); yyval.vLong = 0; } break; +# line 603 "lua.stx" +{ code_number(luaY_pvt[-0].vFloat); luaY_val.vLong = 0; } break; case 48: -# line 599 "lua.stx" +# line 605 "lua.stx" { code_byte(PUSHSTRING); - code_word(yypvt[-0].vWord); - yyval.vLong = 0; + code_word(luaY_pvt[-0].vWord); + luaY_val.vLong = 0; } break; case 49: -# line 604 "lua.stx" -{code_byte(PUSHNIL); yyval.vLong = 0; } break; +# line 610 "lua.stx" +{code_byte(PUSHNIL); luaY_val.vLong = 0; } break; case 50: -# line 605 "lua.stx" -{ yyval.vLong = yypvt[-0].vLong; } break; +# line 611 "lua.stx" +{ luaY_val.vLong = luaY_pvt[-0].vLong; } break; case 51: -# line 606 "lua.stx" -{ code_byte(NOTOP); yyval.vLong = 0;} break; +# line 612 "lua.stx" +{ code_byte(NOTOP); luaY_val.vLong = 0;} break; case 52: -# line 607 "lua.stx" +# line 613 "lua.stx" {code_byte(POP); } break; case 53: -# line 608 "lua.stx" +# line 614 "lua.stx" { - basepc[yypvt[-2].vLong] = ONFJMP; - code_word_at(basepc+yypvt[-2].vLong+1, pc - (yypvt[-2].vLong + sizeof(Word)+1)); - yyval.vLong = 0; + basepc[luaY_pvt[-2].vLong] = ONFJMP; + code_word_at(basepc+luaY_pvt[-2].vLong+1, pc - (luaY_pvt[-2].vLong + sizeof(Word)+1)); + luaY_val.vLong = 0; } break; case 54: -# line 613 "lua.stx" +# line 619 "lua.stx" {code_byte(POP); } break; case 55: -# line 614 "lua.stx" +# line 620 "lua.stx" { - basepc[yypvt[-2].vLong] = ONTJMP; - code_word_at(basepc+yypvt[-2].vLong+1, pc - (yypvt[-2].vLong + sizeof(Word)+1)); - yyval.vLong = 0; + basepc[luaY_pvt[-2].vLong] = ONTJMP; + code_word_at(basepc+luaY_pvt[-2].vLong+1, pc - (luaY_pvt[-2].vLong + sizeof(Word)+1)); + luaY_val.vLong = 0; } break; case 56: -# line 622 "lua.stx" +# line 628 "lua.stx" { code_byte(CREATEARRAY); - yyval.vLong = pc; code_word(0); + luaY_val.vLong = pc; code_word(0); } break; case 57: -# line 627 "lua.stx" +# line 633 "lua.stx" { - code_word_at(basepc+yypvt[-3].vLong, yypvt[-1].vInt); + code_word_at(basepc+luaY_pvt[-3].vLong, luaY_pvt[-1].vInt); } break; case 58: -# line 633 "lua.stx" +# line 639 "lua.stx" { code_byte(CALLFUNC); - code_byte(yypvt[-1].vInt+yypvt[-0].vInt); - yyval.vLong = pc; + code_byte(luaY_pvt[-1].vInt+luaY_pvt[-0].vInt); + luaY_val.vLong = pc; code_byte(0); /* may be modified by other rules */ } break; case 59: -# line 641 "lua.stx" -{ yyval.vInt = 0; } break; +# line 647 "lua.stx" +{ luaY_val.vInt = 0; } break; case 60: -# line 643 "lua.stx" +# line 649 "lua.stx" { code_byte(PUSHSELF); - code_word(luaI_findconstant(yypvt[-0].pNode)); - yyval.vInt = 1; + code_word(luaI_findconstant(luaY_pvt[-0].pTStr)); + luaY_val.vInt = 1; } break; case 61: -# line 651 "lua.stx" -{ yyval.vInt = adjust_functioncall(yypvt[-1].vLong, 1); } break; +# line 657 "lua.stx" +{ luaY_val.vInt = adjust_functioncall(luaY_pvt[-1].vLong, 1); } break; case 62: -# line 652 "lua.stx" -{ yyval.vInt = 1; } break; +# line 658 "lua.stx" +{ luaY_val.vInt = 1; } break; case 63: -# line 655 "lua.stx" -{ yyval.vLong = 0; } break; +# line 661 "lua.stx" +{ luaY_val.vLong = 0; } break; case 64: -# line 656 "lua.stx" -{ yyval.vLong = yypvt[-0].vLong; } break; +# line 662 "lua.stx" +{ luaY_val.vLong = luaY_pvt[-0].vLong; } break; case 65: -# line 659 "lua.stx" -{ if (yypvt[-0].vLong != 0) yyval.vLong = yypvt[-0].vLong; else yyval.vLong = -1; } break; +# line 665 "lua.stx" +{ if (luaY_pvt[-0].vLong != 0) luaY_val.vLong = luaY_pvt[-0].vLong; else luaY_val.vLong = -1; } break; case 66: -# line 660 "lua.stx" -{ yyval.vLong = adjust_functioncall(yypvt[-1].vLong, 1); } break; +# line 666 "lua.stx" +{ luaY_val.vLong = adjust_functioncall(luaY_pvt[-1].vLong, 1); } break; case 67: -# line 661 "lua.stx" +# line 667 "lua.stx" { - if (yypvt[-0].vLong == 0) yyval.vLong = -(yypvt[-1].vLong + 1); /* -length */ + if (luaY_pvt[-0].vLong == 0) luaY_val.vLong = -(luaY_pvt[-1].vLong + 1); /* -length */ else { - adjust_functioncall(yypvt[-0].vLong, yypvt[-1].vLong); - yyval.vLong = yypvt[-0].vLong; + adjust_functioncall(luaY_pvt[-0].vLong, luaY_pvt[-1].vLong); + luaY_val.vLong = luaY_pvt[-0].vLong; } } break; case 68: -# line 671 "lua.stx" -{ lua_codeadjust(0); yyval.vInt = lua_linenumber; } break; +# line 677 "lua.stx" +{ lua_codeadjust(0); luaY_val.vInt = lua_linenumber; } break; case 69: -# line 672 "lua.stx" -{ lua_codeadjust(0); yyval.vInt = lua_linenumber; } break; +# line 678 "lua.stx" +{ lua_codeadjust(0); luaY_val.vInt = lua_linenumber; } break; case 70: -# line 676 "lua.stx" -{ - add_localvar(luaI_findsymbol(yypvt[-0].pNode)); - } break; +# line 681 "lua.stx" +{ add_localvar(luaY_pvt[-0].pTStr); } break; case 71: -# line 680 "lua.stx" -{ - add_localvar(luaI_findsymbol(yypvt[-0].pNode)); - } break; +# line 682 "lua.stx" +{ add_localvar(luaY_pvt[-0].pTStr); } break; case 72: # line 686 "lua.stx" -{ flush_list(yypvt[-0].vInt/FIELDS_PER_FLUSH, yypvt[-0].vInt%FIELDS_PER_FLUSH); } break; +{ flush_list(luaY_pvt[-0].vInt/FIELDS_PER_FLUSH, luaY_pvt[-0].vInt%FIELDS_PER_FLUSH); } break; case 73: # line 688 "lua.stx" -{ yyval.vInt = yypvt[-2].vInt+yypvt[-0].vInt; } break; +{ luaY_val.vInt = luaY_pvt[-2].vInt+luaY_pvt[-0].vInt; } break; case 74: # line 690 "lua.stx" -{ yyval.vInt = yypvt[-1].vInt; flush_record(yypvt[-1].vInt%FIELDS_PER_FLUSH); } break; +{ luaY_val.vInt = luaY_pvt[-1].vInt; flush_record(luaY_pvt[-1].vInt%FIELDS_PER_FLUSH); } break; case 75: # line 694 "lua.stx" -{ yyval.vInt = 0; } break; +{ luaY_val.vInt = 0; } break; case 76: # line 696 "lua.stx" -{ yyval.vInt = yypvt[-0].vInt; flush_record(yypvt[-0].vInt%FIELDS_PER_FLUSH); } break; +{ luaY_val.vInt = luaY_pvt[-0].vInt; flush_record(luaY_pvt[-0].vInt%FIELDS_PER_FLUSH); } break; case 79: # line 703 "lua.stx" -{ yyval.vInt = 0; } break; +{ luaY_val.vInt = 0; } break; case 80: # line 704 "lua.stx" -{ yyval.vInt = yypvt[-1].vInt; } break; +{ luaY_val.vInt = luaY_pvt[-1].vInt; } break; case 81: # line 707 "lua.stx" -{yyval.vInt=1;} break; +{luaY_val.vInt=1;} break; case 82: # line 709 "lua.stx" { - yyval.vInt=yypvt[-2].vInt+1; - if (yyval.vInt%FIELDS_PER_FLUSH == 0) flush_record(FIELDS_PER_FLUSH); + luaY_val.vInt=luaY_pvt[-2].vInt+1; + if (luaY_val.vInt%FIELDS_PER_FLUSH == 0) flush_record(FIELDS_PER_FLUSH); } break; case 83: # line 716 "lua.stx" { - push_field(luaI_findconstant(yypvt[-2].pNode)); + push_field(luaI_findconstant(luaY_pvt[-2].pTStr)); } break; case 84: # line 721 "lua.stx" -{ yyval.vInt = 0; } break; +{ luaY_val.vInt = 0; } break; case 85: # line 722 "lua.stx" -{ yyval.vInt = yypvt[-1].vInt; } break; +{ luaY_val.vInt = luaY_pvt[-1].vInt; } break; case 86: # line 725 "lua.stx" -{yyval.vInt=1;} break; +{luaY_val.vInt=1;} break; case 87: # line 727 "lua.stx" { - yyval.vInt=yypvt[-2].vInt+1; - if (yyval.vInt%FIELDS_PER_FLUSH == 0) - flush_list(yyval.vInt/FIELDS_PER_FLUSH - 1, FIELDS_PER_FLUSH); + luaY_val.vInt=luaY_pvt[-2].vInt+1; + if (luaY_val.vInt%FIELDS_PER_FLUSH == 0) + flush_list(luaY_val.vInt/FIELDS_PER_FLUSH - 1, FIELDS_PER_FLUSH); } break; case 88: # line 735 "lua.stx" { nvarbuffer = 0; - add_varbuffer(yypvt[-0].vLong); - yyval.vInt = (yypvt[-0].vLong == 0) ? 1 : 0; + add_varbuffer(luaY_pvt[-0].vLong); + luaY_val.vInt = (luaY_pvt[-0].vLong == 0) ? 1 : 0; } break; case 89: # line 741 "lua.stx" { - add_varbuffer(yypvt[-0].vLong); - yyval.vInt = (yypvt[-0].vLong == 0) ? yypvt[-2].vInt + 1 : yypvt[-2].vInt; + add_varbuffer(luaY_pvt[-0].vLong); + luaY_val.vInt = (luaY_pvt[-0].vLong == 0) ? luaY_pvt[-2].vInt + 1 : luaY_pvt[-2].vInt; } break; case 90: # line 747 "lua.stx" -{ yyval.vLong = yypvt[-0].vLong; } break; +{ luaY_val.vLong = luaY_pvt[-0].vLong; } break; case 91: # line 749 "lua.stx" { - yyval.vLong = 0; /* indexed variable */ + luaY_val.vLong = 0; /* indexed variable */ } break; case 92: # line 753 "lua.stx" { code_byte(PUSHSTRING); - code_word(luaI_findconstant(yypvt[-0].pNode)); - yyval.vLong = 0; /* indexed variable */ + code_word(luaI_findconstant(luaY_pvt[-0].pTStr)); + luaY_val.vLong = 0; /* indexed variable */ } break; case 93: # line 761 "lua.stx" { - Word s = luaI_findsymbol(yypvt[-0].pNode); - int local = lua_localname (s); + int local = lua_localname(luaY_pvt[-0].pTStr); if (local == -1) /* global var */ - yyval.vLong = s + 1; /* return positive value */ + luaY_val.vLong = luaI_findsymbol(luaY_pvt[-0].pTStr)+1; /* return positive value */ else - yyval.vLong = -(local+1); /* return negative value */ + luaY_val.vLong = -(local+1); /* return negative value */ } break; case 94: -# line 771 "lua.stx" -{ lua_pushvar(yypvt[-0].vLong); } break; +# line 770 "lua.stx" +{ lua_pushvar(luaY_pvt[-0].vLong); } break; case 95: -# line 774 "lua.stx" -{store_localvar(luaI_findsymbol(yypvt[-0].pNode), 0); yyval.vInt = 1;} break; +# line 773 "lua.stx" +{store_localvar(luaY_pvt[-0].pTStr, 0); luaY_val.vInt = 1;} break; case 96: -# line 776 "lua.stx" +# line 775 "lua.stx" { - store_localvar(luaI_findsymbol(yypvt[-0].pNode), yypvt[-2].vInt); - yyval.vInt = yypvt[-2].vInt+1; + store_localvar(luaY_pvt[-0].pTStr, luaY_pvt[-2].vInt); + luaY_val.vInt = luaY_pvt[-2].vInt+1; } break; case 97: -# line 782 "lua.stx" -{ yyval.vInt = 0; } break; +# line 781 "lua.stx" +{ luaY_val.vInt = 0; } break; case 98: -# line 783 "lua.stx" -{ yyval.vInt = yypvt[-0].vLong; } break; +# line 782 "lua.stx" +{ luaY_val.vInt = luaY_pvt[-0].vLong; } break; case 99: -# line 786 "lua.stx" -{ lua_debug = yypvt[-0].vInt; } break; +# line 785 "lua.stx" +{ lua_debug = luaY_pvt[-0].vInt; } break; } - goto yystack; /* reset registers in driver code */ + goto luaY_stack; /* reset registers in driver code */ } diff --git a/src/parser.h b/src/parser.h index ea815f11..d681cd66 100644 --- a/src/parser.h +++ b/src/parser.h @@ -1,3 +1,4 @@ + typedef union { int vInt; @@ -6,9 +7,9 @@ typedef union Word vWord; Long vLong; TFunc *pFunc; - TreeNode *pNode; + TaggedString *pTStr; } YYSTYPE; -extern YYSTYPE yylval; +extern YYSTYPE luaY_lval; # define WRONGTOKEN 257 # define NIL 258 # define IF 259 diff --git a/src/table.c b/src/table.c index 1a2ac96b..1d694c4e 100644 --- a/src/table.c +++ b/src/table.c @@ -3,9 +3,7 @@ ** Module to control static tables */ -char *rcs_table="$Id: table.c,v 2.38 1995/11/03 15:30:50 roberto Exp $"; - -/*#include <string.h>*/ +char *rcs_table="$Id: table.c,v 2.54 1996/05/06 14:29:35 roberto Exp $"; #include "mem.h" #include "opcode.h" @@ -21,61 +19,66 @@ char *rcs_table="$Id: table.c,v 2.38 1995/11/03 15:30:50 roberto Exp $"; #define BUFFER_BLOCK 256 Symbol *lua_table = NULL; -static Word lua_ntable = 0; +Word lua_ntable = 0; static Long lua_maxsymbol = 0; TaggedString **lua_constant = NULL; -static Word lua_nconstant = 0; +Word lua_nconstant = 0; static Long lua_maxconstant = 0; -#define GARBAGE_BLOCK 1024 -#define MIN_GARBAGE_BLOCK (GARBAGE_BLOCK/2) +#define GARBAGE_BLOCK 50 static void lua_nextvar (void); -static void setglobal (void); -static void getglobal (void); /* -** Initialise symbol table with internal functions +** Internal functions */ -static void lua_initsymbol (void) +static struct { + char *name; + lua_CFunction func; +} int_funcs[] = { + {"assert", luaI_assert}, + {"dofile", lua_internaldofile}, + {"dostring", lua_internaldostring}, + {"error", luaI_error}, + {"getglobal", luaI_getglobal}, + {"next", lua_next}, + {"nextvar", lua_nextvar}, + {"print", luaI_print}, + {"setfallback", luaI_setfallback}, + {"setglobal", luaI_setglobal}, + {"tonumber", lua_obj2number}, + {"tostring", luaI_tostring}, + {"type", luaI_type} +}; + +#define INTFUNCSIZE (sizeof(int_funcs)/sizeof(int_funcs[0])) + + +void luaI_initsymbol (void) { - Word n; - lua_maxsymbol = BUFFER_BLOCK; - lua_table = newvector(lua_maxsymbol, Symbol); - n = luaI_findsymbolbyname("next"); - s_tag(n) = LUA_T_CFUNCTION; s_fvalue(n) = lua_next; - n = luaI_findsymbolbyname("dofile"); - s_tag(n) = LUA_T_CFUNCTION; s_fvalue(n) = lua_internaldofile; - n = luaI_findsymbolbyname("setglobal"); - s_tag(n) = LUA_T_CFUNCTION; s_fvalue(n) = setglobal; - n = luaI_findsymbolbyname("getglobal"); - s_tag(n) = LUA_T_CFUNCTION; s_fvalue(n) = getglobal; - n = luaI_findsymbolbyname("nextvar"); - s_tag(n) = LUA_T_CFUNCTION; s_fvalue(n) = lua_nextvar; - n = luaI_findsymbolbyname("type"); - s_tag(n) = LUA_T_CFUNCTION; s_fvalue(n) = luaI_type; - n = luaI_findsymbolbyname("tonumber"); - s_tag(n) = LUA_T_CFUNCTION; s_fvalue(n) = lua_obj2number; - n = luaI_findsymbolbyname("print"); - s_tag(n) = LUA_T_CFUNCTION; s_fvalue(n) = lua_print; - n = luaI_findsymbolbyname("dostring"); - s_tag(n) = LUA_T_CFUNCTION; s_fvalue(n) = lua_internaldostring; - n = luaI_findsymbolbyname("setfallback"); - s_tag(n) = LUA_T_CFUNCTION; s_fvalue(n) = luaI_setfallback; - n = luaI_findsymbolbyname("error"); - s_tag(n) = LUA_T_CFUNCTION; s_fvalue(n) = luaI_error; + int i; + lua_maxsymbol = BUFFER_BLOCK; + lua_table = newvector(lua_maxsymbol, Symbol); + for (i=0; i<INTFUNCSIZE; i++) + { + Word n = luaI_findsymbolbyname(int_funcs[i].name); + s_tag(n) = LUA_T_CFUNCTION; s_fvalue(n) = int_funcs[i].func; + } } /* ** Initialise constant table with pre-defined constants */ -void lua_initconstant (void) +void luaI_initconstant (void) { lua_maxconstant = BUFFER_BLOCK; lua_constant = newvector(lua_maxconstant, TaggedString *); + /* pre-register mem error messages, to avoid loop when error arises */ + luaI_findconstantbyname(tableEM); + luaI_findconstantbyname(memEM); } @@ -83,22 +86,15 @@ void lua_initconstant (void) ** Given a name, search it at symbol table and return its index. If not ** found, allocate it. */ -Word luaI_findsymbol (TreeNode *t) +Word luaI_findsymbol (TaggedString *t) { - if (lua_table == NULL) - lua_initsymbol(); if (t->varindex == NOT_USED) { if (lua_ntable == lua_maxsymbol) - { - if (lua_maxsymbol >= MAX_WORD) - lua_error("symbol table overflow"); - lua_maxsymbol *= 2; - if (lua_maxsymbol >= MAX_WORD) - lua_maxsymbol = MAX_WORD; - lua_table = growvector(lua_table, lua_maxsymbol, Symbol); - } + lua_maxsymbol = growvector(&lua_table, lua_maxsymbol, Symbol, + symbolEM, MAX_WORD); t->varindex = lua_ntable; + lua_table[lua_ntable].varname = t; s_tag(lua_ntable) = LUA_T_NIL; lua_ntable++; } @@ -108,7 +104,7 @@ Word luaI_findsymbol (TreeNode *t) Word luaI_findsymbolbyname (char *name) { - return luaI_findsymbol(lua_constcreate(name)); + return luaI_findsymbol(luaI_createfixedstring(name)); } @@ -116,23 +112,15 @@ Word luaI_findsymbolbyname (char *name) ** Given a tree node, check it is has a correspondent constant index. If not, ** allocate it. */ -Word luaI_findconstant (TreeNode *t) +Word luaI_findconstant (TaggedString *t) { - if (lua_constant == NULL) - lua_initconstant(); if (t->constindex == NOT_USED) { if (lua_nconstant == lua_maxconstant) - { - if (lua_maxconstant >= MAX_WORD) - lua_error("constant table overflow"); - lua_maxconstant *= 2; - if (lua_maxconstant >= MAX_WORD) - lua_maxconstant = MAX_WORD; - lua_constant = growvector(lua_constant, lua_maxconstant, TaggedString *); - } + lua_maxconstant = growvector(&lua_constant, lua_maxconstant, TaggedString *, + constantEM, MAX_WORD); t->constindex = lua_nconstant; - lua_constant[lua_nconstant] = &(t->ts); + lua_constant[lua_nconstant] = t; lua_nconstant++; } return t->constindex; @@ -141,7 +129,15 @@ Word luaI_findconstant (TreeNode *t) Word luaI_findconstantbyname (char *name) { - return luaI_findconstant(lua_constcreate(name)); + return luaI_findconstant(luaI_createfixedstring(name)); +} + +TaggedString *luaI_createfixedstring (char *name) +{ + TaggedString *ts = lua_createstring(name); + if (!ts->marked) + ts->marked = 2; /* avoid GC */ + return ts; } @@ -153,7 +149,7 @@ static char *lua_travsymbol (int (*fn)(Object *)) Word i; for (i=0; i<lua_ntable; i++) if (fn(&s_object(i))) - return luaI_nodebysymbol(i)->ts.str; + return lua_table[i].varname->str; return NULL; } @@ -162,7 +158,7 @@ static char *lua_travsymbol (int (*fn)(Object *)) ** Mark an object if it is a string or a unmarked array. */ int lua_markobject (Object *o) -{ +{/* if already marked, does not change mark value */ if (tag(o) == LUA_T_STRING && !tsvalue(o)->marked) tsvalue(o)->marked = 1; else if (tag(o) == LUA_T_ARRAY) @@ -173,27 +169,52 @@ int lua_markobject (Object *o) return 0; } +/* +* returns 0 if the object is going to be (garbage) collected +*/ +int luaI_ismarked (Object *o) +{ + switch (o->tag) + { + case LUA_T_STRING: + return o->value.ts->marked; + case LUA_T_FUNCTION: + return o->value.tf->marked; + case LUA_T_ARRAY: + return o->value.a->mark; + default: /* nil, number, cfunction, or user data */ + return 1; + } +} + /* ** Garbage collection. ** Delete all unused strings and arrays. */ -void lua_pack (void) +Long luaI_collectgarbage (void) { - static Long block = GARBAGE_BLOCK; /* when garbage collector will be called */ - static Long nentity = 0; /* counter of new entities (strings and arrays) */ Long recovered = 0; - if (nentity++ < block) return; lua_travstack(lua_markobject); /* mark stack objects */ lua_travsymbol(lua_markobject); /* mark symbol table objects */ luaI_travlock(lua_markobject); /* mark locked objects */ luaI_travfallbacks(lua_markobject); /* mark fallbacks */ + luaI_invalidaterefs(); recovered += lua_strcollector(); recovered += lua_hashcollector(); recovered += luaI_funccollector(); - nentity = 0; /* reset counter */ - block=(16*block-7*recovered)/12; /* adapt block size */ - if (block < MIN_GARBAGE_BLOCK) block = MIN_GARBAGE_BLOCK; + return recovered; +} + +void lua_pack (void) +{ + static unsigned long block = GARBAGE_BLOCK; + static unsigned long nentity = 0; /* total of strings, arrays, etc */ + unsigned long recovered = 0; + if (nentity++ < block) return; + recovered = luaI_collectgarbage(); + block = block*2*(1.0 - (float)recovered/nentity); + nentity -= recovered; } @@ -225,36 +246,12 @@ static void lua_nextvar (void) } else { - TreeNode *t = luaI_nodebysymbol(next); - Object name; - tag(&name) = LUA_T_STRING; - tsvalue(&name) = &(t->ts); - luaI_pushobject(&name); + lua_pushstring(lua_table[next].varname->str); luaI_pushobject(&s_object(next)); } } -static void setglobal (void) -{ - lua_Object name = lua_getparam(1); - lua_Object value = lua_getparam(2); - if (!lua_isstring(name)) - lua_error("incorrect argument to function `setglobal'"); - lua_pushobject(value); - lua_storeglobal(lua_getstring(name)); -} - - -static void getglobal (void) -{ - lua_Object name = lua_getparam(1); - if (!lua_isstring(name)) - lua_error("incorrect argument to function `getglobal'"); - lua_pushobject(lua_getglobal(lua_getstring(name))); -} - - static Object *functofind; static int checkfunc (Object *o) { @@ -270,7 +267,7 @@ static int checkfunc (Object *o) } -char *getobjname (lua_Object o, char **name) +char *lua_getobjname (lua_Object o, char **name) { /* try to find a name for given function */ functofind = luaI_Address(o); if ((*name = luaI_travfallbacks(checkfunc)) != NULL) diff --git a/src/table.h b/src/table.h index 4e581401..d7003c96 100644 --- a/src/table.h +++ b/src/table.h @@ -1,7 +1,7 @@ /* ** Module to control static tables ** TeCGraf - PUC-Rio -** $Id: table.h,v 2.13 1995/10/26 14:21:56 roberto Exp $ +** $Id: table.h,v 2.21 1996/04/22 18:00:37 roberto Exp $ */ #ifndef table_h @@ -10,19 +10,28 @@ #include "tree.h" #include "opcode.h" -extern Symbol *lua_table; -extern TaggedString **lua_constant; +typedef struct +{ + Object object; + TaggedString *varname; +} Symbol; -extern char *lua_file[]; -extern int lua_nfile; +extern Symbol *lua_table; +extern Word lua_ntable; +extern TaggedString **lua_constant; +extern Word lua_nconstant; -void lua_initconstant (void); +void luaI_initsymbol (void); +void luaI_initconstant (void); Word luaI_findsymbolbyname (char *name); -Word luaI_findsymbol (TreeNode *t); -Word luaI_findconstant (TreeNode *t); +Word luaI_findsymbol (TaggedString *t); +Word luaI_findconstant (TaggedString *t); Word luaI_findconstantbyname (char *name); +TaggedString *luaI_createfixedstring (char *str); int lua_markobject (Object *o); +int luaI_ismarked (Object *o); +Long luaI_collectgarbage (void); void lua_pack (void); @@ -3,7 +3,7 @@ ** TecCGraf - PUC-Rio */ -char *rcs_tree="$Id: tree.c,v 1.14 1995/10/17 11:53:53 roberto Exp $"; +char *rcs_tree="$Id: tree.c,v 1.20 1996/03/14 15:56:26 roberto Exp $"; #include <string.h> @@ -11,66 +11,104 @@ char *rcs_tree="$Id: tree.c,v 1.14 1995/10/17 11:53:53 roberto Exp $"; #include "mem.h" #include "lua.h" #include "tree.h" +#include "lex.h" +#include "hash.h" #include "table.h" -#define lua_strcmp(a,b) (a[0]<b[0]?(-1):(a[0]>b[0]?(1):strcmp(a,b))) +#define NUM_HASHS 64 +typedef struct { + int size; + int nuse; /* number of elements (including EMPTYs) */ + TaggedString **hash; +} stringtable; -typedef struct StringNode { - struct StringNode *next; - TaggedString ts; -} StringNode; +static int initialized = 0; -static StringNode *string_root = NULL; +static stringtable string_root[NUM_HASHS]; -static TreeNode *constant_root = NULL; +static TaggedString EMPTY = {NOT_USED, NOT_USED, 0, 2, {0}}; -/* -** Insert a new constant/variable at the tree. -*/ -static TreeNode *tree_create (TreeNode **node, char *str) + +static unsigned long hash (char *str) { - if (*node == NULL) - { - *node = (TreeNode *) luaI_malloc(sizeof(TreeNode)+strlen(str)); - (*node)->left = (*node)->right = NULL; - strcpy((*node)->ts.str, str); - (*node)->ts.marked = 0; - (*node)->ts.hash = 0; - (*node)->varindex = (*node)->constindex = NOT_USED; - return *node; - } - else - { - int c = lua_strcmp(str, (*node)->ts.str); - if (c < 0) - return tree_create(&(*node)->left, str); - else if (c > 0) - return tree_create(&(*node)->right, str); - else - return *node; - } + unsigned long h = 0; + while (*str) + h = ((h<<5)-h)^(unsigned char)*(str++); + return h; } -TaggedString *lua_createstring (char *str) +static void initialize (void) { - StringNode *newString; - if (str == NULL) return NULL; - lua_pack(); - newString = (StringNode *)luaI_malloc(sizeof(StringNode)+strlen(str)); - newString->ts.marked = 0; - newString->ts.hash = 0; - strcpy(newString->ts.str, str); - newString->next = string_root; - string_root = newString; - return &(newString->ts); + initialized = 1; + luaI_addReserved(); + luaI_initsymbol(); + luaI_initconstant(); +} + + +static void grow (stringtable *tb) +{ + int newsize = luaI_redimension(tb->size); + TaggedString **newhash = newvector(newsize, TaggedString *); + int i; + for (i=0; i<newsize; i++) + newhash[i] = NULL; + /* rehash */ + tb->nuse = 0; + for (i=0; i<tb->size; i++) + if (tb->hash[i] != NULL && tb->hash[i] != &EMPTY) + { + int h = tb->hash[i]->hash%newsize; + while (newhash[h]) + h = (h+1)%newsize; + newhash[h] = tb->hash[i]; + tb->nuse++; + } + luaI_free(tb->hash); + tb->size = newsize; + tb->hash = newhash; } +static TaggedString *insert (char *str, stringtable *tb) +{ + TaggedString *ts; + unsigned long h = hash(str); + int i; + int j = -1; + if ((Long)tb->nuse*3 >= (Long)tb->size*2) + { + if (!initialized) + initialize(); + grow(tb); + } + i = h%tb->size; + while (tb->hash[i]) + { + if (tb->hash[i] == &EMPTY) + j = i; + else if (strcmp(str, tb->hash[i]->str) == 0) + return tb->hash[i]; + i = (i+1)%tb->size; + } + /* not found */ + lua_pack(); + if (j != -1) /* is there an EMPTY space? */ + i = j; + else + tb->nuse++; + ts = tb->hash[i] = (TaggedString *)luaI_malloc(sizeof(TaggedString)+strlen(str)); + strcpy(ts->str, str); + ts->marked = 0; + ts->hash = h; + ts->varindex = ts->constindex = NOT_USED; + return ts; +} -TreeNode *lua_constcreate (char *str) +TaggedString *lua_createstring (char *str) { - return tree_create(&constant_root, str); + return insert(str, &string_root[(unsigned)str[0]%NUM_HASHS]); } @@ -80,44 +118,28 @@ TreeNode *lua_constcreate (char *str) */ Long lua_strcollector (void) { - StringNode *curr = string_root, *prev = NULL; Long counter = 0; - while (curr) + int i; + for (i=0; i<NUM_HASHS; i++) { - StringNode *next = curr->next; - if (!curr->ts.marked) - { - if (prev == NULL) string_root = next; - else prev->next = next; - luaI_free(curr); - ++counter; - } - else + stringtable *tb = &string_root[i]; + int j; + for (j=0; j<tb->size; j++) { - curr->ts.marked = 0; - prev = curr; + TaggedString *t = tb->hash[j]; + if (t != NULL && t->marked <= 1) + { + if (t->marked) + t->marked = 0; + else + { + luaI_free(t); + tb->hash[j] = &EMPTY; + counter++; + } + } } - curr = next; } return counter; } - -/* -** Traverse the constant tree looking for a specific symbol number -*/ -static TreeNode *nodebysymbol (TreeNode *root, Word symbol) -{ - TreeNode *t; - if (root == NULL) return NULL; - if (root->varindex == symbol) return root; - t = nodebysymbol(root->left, symbol); - if (t) return t; - return nodebysymbol(root->right, symbol); -} - -TreeNode *luaI_nodebysymbol (Word symbol) -{ - return nodebysymbol(constant_root, symbol); -} - @@ -1,7 +1,7 @@ /* ** tree.h ** TecCGraf - PUC-Rio -** $Id: tree.h,v 1.10 1995/10/17 11:53:53 roberto Exp $ +** $Id: tree.h,v 1.14 1996/02/26 17:07:49 roberto Exp $ */ #ifndef tree_h @@ -14,24 +14,15 @@ typedef struct TaggedString { + Word varindex; /* != NOT_USED if this is a symbol */ + Word constindex; /* != NOT_USED if this is a constant */ unsigned long hash; /* 0 if not initialized */ - char marked; /* for garbage collection */ + int marked; /* for garbage collection; never collect (nor change) if > 1 */ char str[1]; /* \0 byte already reserved */ } TaggedString; -typedef struct TreeNode -{ - struct TreeNode *right; - struct TreeNode *left; - unsigned short varindex; /* != NOT_USED if this is a symbol */ - unsigned short constindex; /* != NOT_USED if this is a constant */ - TaggedString ts; -} TreeNode; - TaggedString *lua_createstring (char *str); -TreeNode *lua_constcreate (char *str); Long lua_strcollector (void); -TreeNode *luaI_nodebysymbol (Word symbol); #endif diff --git a/src/types.h b/src/types.h index 43684228..748ed83f 100644 --- a/src/types.h +++ b/src/types.h @@ -1,6 +1,6 @@ /* ** TeCGraf - PUC-Rio -** $Id: types.h,v 1.3 1995/02/06 19:32:43 roberto Exp $ +** $Id: types.h,v 1.4 1996/02/07 14:13:17 roberto Exp $ */ #ifndef types_h @@ -12,8 +12,6 @@ #define real float #endif -typedef int Bool; /* boolean values */ - #define Byte lua_Byte /* some systems have Byte as a predefined type */ typedef unsigned char Byte; /* unsigned 8 bits */ diff --git a/src/ugly.h b/src/ugly.h deleted file mode 100644 index c7512255..00000000 --- a/src/ugly.h +++ /dev/null @@ -1,36 +0,0 @@ -/* -** ugly.h -** TecCGraf - PUC-Rio -** $Id: ugly.h,v 1.2 1994/11/13 14:39:04 roberto Stab $ -*/ - -#ifndef ugly_h -#define ugly_h - -/* This enum must have the same order of the array 'reserved' in lex.c */ - -enum { - U_and=128, - U_do, - U_else, - U_elseif, - U_end, - U_function, - U_if, - U_local, - U_nil, - U_not, - U_or, - U_repeat, - U_return, - U_then, - U_until, - U_while, - U_eq = '='+128, - U_le = '<'+128, - U_ge = '>'+128, - U_ne = '~'+128, - U_sc = '.'+128 -}; - -#endif diff --git a/src/undump.c b/src/undump.c new file mode 100644 index 00000000..744622fc --- /dev/null +++ b/src/undump.c @@ -0,0 +1,326 @@ +/* +** undump.c +** load bytecodes from files +*/ + +char* rcs_undump="$Id: undump.c,v 1.14 1996/03/14 17:31:15 lhf Exp $"; + +#include <stdio.h> +#include <string.h> +#include "opcode.h" +#include "mem.h" +#include "table.h" +#include "undump.h" + +static int swapword=0; +static int swapfloat=0; +static TFunc* Main=NULL; /* functions in a chunk */ +static TFunc* lastF=NULL; + +static void warn(char* s) /* TODO: remove */ +{ +#if 0 + fprintf(stderr,"undump: %s\n",s); +#endif +} + +static void FixCode(Byte* code, Byte* end) /* swap words */ +{ + Byte* p; + for (p=code; p!=end;) + { + OpCode op=(OpCode)*p; + switch (op) + { + case PUSHNIL: + case PUSH0: + case PUSH1: + case PUSH2: + case PUSHLOCAL0: + case PUSHLOCAL1: + case PUSHLOCAL2: + case PUSHLOCAL3: + case PUSHLOCAL4: + case PUSHLOCAL5: + case PUSHLOCAL6: + case PUSHLOCAL7: + case PUSHLOCAL8: + case PUSHLOCAL9: + case PUSHINDEXED: + case STORELOCAL0: + case STORELOCAL1: + case STORELOCAL2: + case STORELOCAL3: + case STORELOCAL4: + case STORELOCAL5: + case STORELOCAL6: + case STORELOCAL7: + case STORELOCAL8: + case STORELOCAL9: + case STOREINDEXED0: + case ADJUST0: + case EQOP: + case LTOP: + case LEOP: + case GTOP: + case GEOP: + case ADDOP: + case SUBOP: + case MULTOP: + case DIVOP: + case POWOP: + case CONCOP: + case MINUSOP: + case NOTOP: + case POP: + case RETCODE0: + p++; + break; + case PUSHBYTE: + case PUSHLOCAL: + case STORELOCAL: + case STOREINDEXED: + case STORELIST0: + case ADJUST: + case RETCODE: + p+=2; + break; + case STORELIST: + case CALLFUNC: + p+=3; + break; + case PUSHFUNCTION: + p+=5; + break; + case PUSHWORD: + case PUSHSELF: + case CREATEARRAY: + case ONTJMP: + case ONFJMP: + case JMP: + case UPJMP: + case IFFJMP: + case IFFUPJMP: + case SETLINE: + case PUSHSTRING: + case PUSHGLOBAL: + case STOREGLOBAL: + { + Byte t; + t=p[1]; p[1]=p[2]; p[2]=t; + p+=3; + break; + } + case PUSHFLOAT: + { + Byte t; + t=p[1]; p[1]=p[4]; p[4]=t; + t=p[2]; p[2]=p[3]; p[3]=t; + p+=5; + break; + } + case STORERECORD: + { + int n=*++p; + p++; + while (n--) + { + Byte t; + t=p[0]; p[0]=p[1]; p[1]=t; + p+=2; + } + break; + } + default: + lua_error("corrupt binary file"); + break; + } + } +} + +static void Unthread(Byte* code, int i, int v) +{ + while (i!=0) + { + CodeWord c; + Byte* p=code+i; + get_word(c,p); + i=c.w; + c.w=v; + p[-2]=c.m.c1; + p[-1]=c.m.c2; + } +} + +static int LoadWord(FILE* D) +{ + Word w; + fread(&w,sizeof(w),1,D); + if (swapword) + { + Byte* p=(Byte*)&w; /* TODO: need union? */ + Byte t; + t=p[0]; p[0]=p[1]; p[1]=t; + } + return w; +} + +static int LoadSize(FILE* D) +{ + Word hi=LoadWord(D); + Word lo=LoadWord(D); + int s=(hi<<16)|lo; + if ((Word)s != s) lua_error("code too long"); + return s; +} + +static char* LoadBlock(int size, FILE* D) +{ + char* b=luaI_malloc(size); + fread(b,size,1,D); + return b; +} + +static char* LoadString(FILE* D) +{ + int size=LoadWord(D); + char *b=luaI_buffer(size); + fread(b,size,1,D); + return b; +} + +static char* LoadNewString(FILE* D) +{ + return LoadBlock(LoadWord(D),D); +} + +static void LoadFunction(FILE* D) +{ + TFunc* tf=new(TFunc); + tf->next=NULL; + tf->locvars=NULL; + tf->size=LoadSize(D); + tf->lineDefined=LoadWord(D); + if (IsMain(tf)) /* new main */ + { + tf->fileName=LoadNewString(D); + Main=lastF=tf; + } + else /* fix PUSHFUNCTION */ + { + CodeCode c; + Byte* p; + tf->marked=LoadWord(D); + tf->fileName=Main->fileName; + p=Main->code+tf->marked; + c.tf=tf; + *p++=c.m.c1; *p++=c.m.c2; *p++=c.m.c3; *p++=c.m.c4; + lastF=lastF->next=tf; + } + tf->code=LoadBlock(tf->size,D); + if (swapword || swapfloat) FixCode(tf->code,tf->code+tf->size); + while (1) /* unthread */ + { + int c=getc(D); + if (c==ID_VAR) /* global var */ + { + int i=LoadWord(D); + char* s=LoadString(D); + int v=luaI_findsymbolbyname(s); + Unthread(tf->code,i,v); + } + else if (c==ID_STR) /* constant string */ + { + int i=LoadWord(D); + char* s=LoadString(D); + int v=luaI_findconstantbyname(s); + Unthread(tf->code,i,v); + } + else + { + ungetc(c,D); + break; + } + } +} + +static void LoadSignature(FILE* D) +{ + char* s=SIGNATURE; + while (*s!=0 && getc(D)==*s) + ++s; + if (*s!=0) lua_error("bad signature"); +} + +static void LoadHeader(FILE* D) /* TODO: error handling */ +{ + Word w,tw=TEST_WORD; + float f,tf=TEST_FLOAT; + LoadSignature(D); + getc(D); /* skip version */ + fread(&w,sizeof(w),1,D); /* test word */ + if (w!=tw) + { + swapword=1; + warn("different byte order"); + } + fread(&f,sizeof(f),1,D); /* test float */ + if (f!=tf) + { + Byte* p=(Byte*)&f; /* TODO: need union? */ + Byte t; + swapfloat=1; + t=p[0]; p[0]=p[3]; p[3]=t; + t=p[1]; p[1]=p[2]; p[2]=t; + if (f!=tf) /* TODO: try another perm? */ + lua_error("different float representation"); + else + warn("different byte order in floats"); + } +} + +static void LoadChunk(FILE* D) +{ + LoadHeader(D); + while (1) + { + int c=getc(D); + if (c==ID_FUN) LoadFunction(D); else { ungetc(c,D); break; } + } +} + +/* +** load one chunk from a file. +** return list of functions found, headed by main, or NULL at EOF. +*/ +TFunc* luaI_undump1(FILE* D) +{ + while (1) + { + int c=getc(D); + if (c==ID_CHUNK) + { + LoadChunk(D); + return Main; + } + else if (c==EOF) + return NULL; + else + lua_error("not a lua binary file"); + } +} + +/* +** load and run all chunks in a file +*/ +int luaI_undump(FILE* D) +{ + TFunc* m; + while ((m=luaI_undump1(D))) + { + int status=luaI_dorun(m); + luaI_freefunc(m); + if (status!=0) return status; + } + return 0; +} diff --git a/src/undump.h b/src/undump.h new file mode 100644 index 00000000..109634ae --- /dev/null +++ b/src/undump.h @@ -0,0 +1,23 @@ +/* +** undump.h +** definitions for lua decompiler +** $Id: undump.h,v 1.2 1996/03/11 21:59:41 lhf Exp $ +*/ + +#include "func.h" + +#define IsMain(f) (f->lineDefined==0) + +/* definitions for chunk headers */ + +#define ID_CHUNK 27 /* ESC */ +#define ID_FUN 'F' +#define ID_VAR 'V' +#define ID_STR 'S' +#define SIGNATURE "Lua" +#define VERSION 0x23 /* 2.3 */ +#define TEST_WORD 0x1234 /* a word for testing byte ordering */ +#define TEST_FLOAT 0.123456789e-23 /* a float for testing representation */ + +TFunc* luaI_undump1(FILE* D); /* load one chunk */ +int luaI_undump(FILE* D); /* load all chunks */ diff --git a/test/bisect.lua b/test/bisect.lua new file mode 100644 index 00000000..cfb1bbfd --- /dev/null +++ b/test/bisect.lua @@ -0,0 +1,26 @@ +$debug +-- bisection method for solving non-linear equations + +function bisect(f,a,b,fa,fb) +print(n.." a="..a.." fa="..fa.." b="..b.." fb="..fb) + local c=(a+b)/2 + if abs(a-b)<delta then return c end + n=n+1 + local fc=f(c) + if fa*fc<0 then return bisect(f,a,c,fa,fc) else return bisect(f,c,b,fc,fb) end +end + +-- find root of f in the inverval [a,b]. bisection needs that f(a)*f(b)<0 +function solve(f,a,b) + delta=1e-6 -- tolerance + n=0 + local z=bisect(f,a,b,f(a),f(b)) + print(format("after %d steps, root is %.10g",n,z)) +end + +-- our function +function f(x) + return x*x*x-x-1 +end + +solve(f,1,2) diff --git a/test/cf.lua b/test/cf.lua new file mode 100644 index 00000000..038b5e75 --- /dev/null +++ b/test/cf.lua @@ -0,0 +1,27 @@ +-- temperature conversion table + +-- celsius to farenheit + +c0=-20 +while c0<50 do + + c1=c0+10 + write("C ") + c=c0 + while c<c1 do + write(format("%3.0f ",c)) + c=c+1 + end + write("\n") + + c=c0 + write("F ") + while c<c1 do + f=(9/5)*c+32 + write(format("%3.0f ",f)) + c=c+1 + end + write("\n\n") + + c0=c1 +end diff --git a/test/dump.lua b/test/dump.lua index fa0aa4fb..ad8d44a6 100644 --- a/test/dump.lua +++ b/test/dump.lua @@ -1,4 +1,4 @@ - +-- dump global environment function savevar (n,v) if v == nil then return end; diff --git a/test/examples/ps/ps.lua b/test/examples/ps/ps.lua index 62b4e173..0d749194 100644 --- a/test/examples/ps/ps.lua +++ b/test/examples/ps/ps.lua @@ -1,7 +1,7 @@ -- ps.lua -- lua interface to postscript -- Luiz Henrique de Figueiredo (lhf@csg.uwaterloo.ca) --- 12 Nov 95 +-- 14 May 96 PS={} @@ -12,15 +12,11 @@ end -------------------------------------------------------------------- control -- function PS.open(title) - local d,m,y=date() - local H,M,S=time() - if d<10 then d="0"..d end - if m<10 then m="0"..m end if title==nil then title="(no title)" end P("%!PS-Adobe-2.0 EPSF-1.2") P("%%Title: "..title) - P("%%Creator: ps.lua from Lua 2.2") - P("%%CreationDate: "..y..m..d.." "..H..":"..M..":"..S) + P("%%Creator: ps.lua from Lua 2.4") + P("%%CreationDate: "..date()) P("%%Pages: (atend)") P("%%BoundingBox: (atend)") P("%%EndComments") diff --git a/test/hello.lua b/test/hello.lua new file mode 100644 index 00000000..639144b6 --- /dev/null +++ b/test/hello.lua @@ -0,0 +1,3 @@ +-- the first program in every language + +print("hello world, from Lua!") diff --git a/test/long.lua b/test/long.lua deleted file mode 100644 index 5492fd50..00000000 --- a/test/long.lua +++ /dev/null @@ -1,22 +0,0 @@ -function sort(a,n) -- selection sort - local i=1 - while i<=n do - local m, j = i, i+1 - while j<=n do - if a[j]<a[m] then m=j end - j=j+1 - end - a[i],a[m]=a[m],a[i] -- swap a[i] and a[m] - i=i+1 - end -end - - -v = { } - -i=1 -while i <= 5000 do v[i] = 5000-i i=i+1 end - -sort(v,5000) - -print("v512 = ".. v[512]) diff --git a/test/sort.lua b/test/sort.lua index 14d4cf22..d665e96b 100644 --- a/test/sort.lua +++ b/test/sort.lua @@ -1,28 +1,25 @@ $debug -function quicksort(r,s) - if s<=r then return end -- caso basico da recursao - local v, i, j = x[r], r, s+1 - i=i+1; while x[i]<v do i=i+1 end - j=j-1; while x[j]>v do j=j-1 end - x[i],x[j]=x[j],x[i] - while j>i do -- separacao - i=i+1; while x[i]<v do i=i+1 end - j=j-1; while x[j]>v do j=j-1 end - x[i],x[j]=x[j],x[i] - end - x[i],x[j]=x[j],x[i] -- undo last swap - x[j],x[r]=x[r],x[j] - quicksort(r,j-1) -- recursao - quicksort(j+1,s) +function quicksort(a,r,s) + if s<=r then return end + local v, i, j = a[r], r, s+1 + repeat + i=i+1; while a[i]<v do i=i+1 end + j=j-1; while a[j]>v do j=j-1 end + a[i],a[j]=a[j],a[i] + until j<=i + a[i],a[j]=a[j],a[i] -- undo last swap + a[j],a[r]=a[r],a[j] + quicksort(a,r,j-1) + quicksort(a,j+1,s) end -function sort(a,n) -- selection sort +function selectionsort(a,n) local i=1 while i<=n do local m, j = i, i+1 while j<=n do - if a[j]<a[m] then m=j end + if a[j]>a[m] then m=j end -- reverse sort j=j+1 end a[i],a[m]=a[m],a[i] -- swap a[i] and a[m] @@ -30,25 +27,26 @@ function sort(a,n) -- selection sort end end -function main() - x={} - n=-1 - n=n+1; x[n]="a" - n=n+1; x[n]="waldemar" - n=n+1; x[n]="luiz" - n=n+1; x[n]="lula" - n=n+1; x[n]="peter" - n=n+1; x[n]="raquel" - n=n+1; x[n]="camilo" - n=n+1; x[n]="andre" - n=n+1; x[n]="marcelo" - n=n+1; x[n]="sedrez" - n=n+1; x[n]="z" - print(x[0]..","..x[1]..","..x[2]..","..x[3]..","..x[4]..","..x[5]..","..x[6]..","..x[7]..","..x[8]..","..x[9]..","..x[10]) - quicksort(1,n-1) - print(x[0]..","..x[1]..","..x[2]..","..x[3]..","..x[4]..","..x[5]..","..x[6]..","..x[7]..","..x[8]..","..x[9]..","..x[10]) - sort (x, n-1) - print(x[0]..","..x[1]..","..x[2]..","..x[3]..","..x[4]..","..x[5]..","..x[6]..","..x[7]..","..x[8]..","..x[9]..","..x[10]) +function show(m,x) + write(m.."\n\t") + local i=0 + while x[i] do + write(x[i]) + i=i+1 + if x[i] then write(",") end + end + write("\n") end -main() +x={"Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"} + +n=1 while x[n] do n=n+1 end -- count elements +x[0]="A" x[n]="Z" -- quicksort need sentinels + +show("original",x) + +quicksort(x,1,n-1) +show("after quicksort",x) + +selectionsort(x, n-1) +show("after reverse selection sort",x) |