diff options
author | Lua Team <team@lua.org> | 1995-02-07 12:00:00 +0000 |
---|---|---|
committer | repogen <> | 1995-02-07 12:00:00 +0000 |
commit | a8b6ba0954edb9e0e669e1f451b9a8f145ce5166 (patch) | |
tree | 35e9e9999968c4f13a25a5f647203456f044274a | |
parent | 944fc7d7d95575f2b8023c1f3d4ac19e1369fc76 (diff) | |
download | lua-github-a8b6ba0954edb9e0e669e1f451b9a8f145ce5166.tar.gz |
Lua 2.12.1
-rw-r--r-- | COPYRIGHT | 18 | ||||
-rw-r--r-- | Makefile | 11 | ||||
-rw-r--r-- | README | 47 | ||||
-rw-r--r-- | clients/lib/Makefile | 20 | ||||
-rw-r--r-- | clients/lib/iolib.c | 220 | ||||
-rw-r--r-- | clients/lib/mathlib.c | 182 | ||||
-rw-r--r-- | clients/lib/mathlib.h | 2 | ||||
-rw-r--r-- | clients/lib/strlib.c | 72 | ||||
-rw-r--r-- | clients/lib/strlib.h | 2 | ||||
-rw-r--r-- | clients/lua/Makefile | 12 | ||||
-rw-r--r-- | clients/lua/lua.c | 58 | ||||
-rw-r--r-- | doc/lua.dvi | bin | 40392 -> 0 bytes | |||
-rw-r--r-- | doc/lua.ps | 1774 | ||||
-rw-r--r-- | doc/manual.dvi | bin | 48832 -> 66972 bytes | |||
-rw-r--r-- | doc/manual.ps | 4057 | ||||
-rwxr-xr-x | domake | 6 | ||||
-rw-r--r-- | include/Makefile | 8 | ||||
-rw-r--r-- | include/lua.h | 102 | ||||
-rw-r--r-- | include/lualib.h | 2 | ||||
-rw-r--r-- | include/mm.h | 0 | ||||
-rw-r--r-- | src/Makefile | 29 | ||||
-rw-r--r-- | src/fallback.c | 171 | ||||
-rw-r--r-- | src/fallback.h | 31 | ||||
-rw-r--r-- | src/hash.c | 421 | ||||
-rw-r--r-- | src/hash.h | 17 | ||||
-rw-r--r-- | src/inout.c | 239 | ||||
-rw-r--r-- | src/inout.h | 23 | ||||
-rw-r--r-- | src/lex.c | 143 | ||||
-rw-r--r-- | src/mem.c | 44 | ||||
-rw-r--r-- | src/mem.h | 25 | ||||
-rw-r--r-- | src/opcode.c | 1623 | ||||
-rw-r--r-- | src/opcode.h | 92 | ||||
-rw-r--r-- | src/parser.c (renamed from src/y.tab.c) | 1492 | ||||
-rw-r--r-- | src/parser.h (renamed from src/y.tab.h) | 20 | ||||
-rw-r--r-- | src/table.c | 402 | ||||
-rw-r--r-- | src/table.h | 31 | ||||
-rw-r--r-- | src/tree.c | 141 | ||||
-rw-r--r-- | src/tree.h | 37 | ||||
-rw-r--r-- | src/types.h | 31 | ||||
-rw-r--r-- | src/ugly.h | 36 | ||||
-rw-r--r-- | src/yacc/Makefile | 30 | ||||
-rw-r--r-- | src/yacc/exscript | 3 | ||||
-rw-r--r-- | src/yacc/lua.lex | 85 | ||||
-rw-r--r-- | src/yacc/lua.stx | 847 | ||||
-rw-r--r-- | test/array.lua | 2 | ||||
-rw-r--r-- | test/dump.lua (renamed from test/dump) | 12 | ||||
-rw-r--r-- | test/long.lua (renamed from test/teste.lua) | 2 | ||||
-rw-r--r-- | test/save.lua | 14 | ||||
-rw-r--r-- | test/sort.lua | 2 | ||||
-rw-r--r-- | test/sort/q.lua | 51 | ||||
-rw-r--r-- | test/sort/sort.lua | 51 | ||||
-rw-r--r-- | test/type.lua | 10 |
52 files changed, 6205 insertions, 6545 deletions
diff --git a/COPYRIGHT b/COPYRIGHT new file mode 100644 index 00000000..b730ccd7 --- /dev/null +++ b/COPYRIGHT @@ -0,0 +1,18 @@ +Copyright (c) 1994-1995 +Waldemar Celes Filho, Luiz Henrique de Figueiredo, Roberto Ierusalimschy. +All rights reserved. + +Permission is hereby granted, without written agreement and without license +or royalty fees, to use, copy, modify, and distribute this software and its +documentation for any purpose, provided that the above copyright notice and +the following two paragraphs appear in all copies of this software. + +In no event shall the authors be liable to any party for direct, indirect, +special, incidental, or consequential damages arising out of the use of this +software and its documentation. + +The authors specifically disclaims any warranties, including, but not limited +to, the implied warranties of merchantability and fitness for a particular +purpose. the software provided hereunder is on an "as is" basis, and the +authors have no obligation to provide maintenance, support, updates, +enhancements, or modifications. diff --git a/Makefile b/Makefile deleted file mode 100644 index 10640e0d..00000000 --- a/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -# makefile for lua hierarchy - -all: - (cd src; make) - (cd clients/lib; make) - (cd clients/lua; make) - -clean: - (cd src; make clean) - (cd clients/lib; make clean) - (cd clients/lua; make clean) @@ -5,43 +5,46 @@ Dozens of industrial products developed by TeCGraf use Lua. * Some features of Lua - Lua has a simple, pascal-like, syntax. - Variables need no declaration, but Lua has user-controlled type constructors. - Lua has powerful data description constructs (e.g., associative arrays). - Functions can receive a variable number of arguments and can return multiple - values. - Lua programs are compiled into bytecodes, which are then interpreted to - simulate a virtual machine. - Lua is written in ANSI C and is completely portable. + + a simple, pascal-like, syntax; + + powerful data description constructs (e.g., associative arrays); + + user-controlled type constructors; + + fallbacks for extending the meaning of the language in unconventional ways; + + Lua programs are compiled into bytecodes, which are then interpreted to + simulate a virtual machine; + + portable, written in ANSI C. -* Coming soon - Object-oriented extensions. - Lazy evaluation. +* Availability + ftp://ftp.icad.puc-rio.br/pub/lua/lua-2.1.tar.gz + http://www.inf.puc-rio.br/projetos/roberto/lua.html + +* Changes since version 1.1 (current version is 2.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. The libraries are in ./lib. The include files are in ./include. You don't need the other directories for development. - There is documentation in ./doc and tests in ./test. - The documentation includes a reference manual and an article on the - design and implementation of Lua. + There is a reference manual in ./doc and tests in ./test. This distribution is biased towards SunOS 4 with gcc but it is simple to change the Makefiles for other systems. + If you are running SunOs, type also "domake dynamic" to build shared + libraries in ./lib. * Legal matters - Lua is not in the public domain; TeCGraf keeps its copyright. - Nevertheless, Lua is freely available for academic purposes by anonymous ftp - at ftp.icad.puc-rio.br:/pub/lua/lua-1.1.tar.Z. - For commercial purposes, please contact us. + Lua is now freely available for both academic and commercial purposes. + Lua is not in the public domain; TeCGraf keeps its copyright. * 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, ITS, 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 +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 -- diff --git a/clients/lib/Makefile b/clients/lib/Makefile index 4110a62f..b191b750 100644 --- a/clients/lib/Makefile +++ b/clients/lib/Makefile @@ -3,17 +3,26 @@ INC= $(LUA)/include LIB= $(LUA)/lib +# in SunOs /usr/5include contains prototypes for standard lib +INCS= -I/usr/5include -I$(INC) +WARN= -Wall -Wmissing-prototypes -Wshadow -ansi + CC= gcc -CFLAGS= -Wall -O2 -I$(INC) $(DEFS) +CFLAGS= $(INCS) $(DEFS) $(WARN) -O2 OBJS= iolib.o mathlib.o strlib.o + SLIB= $(LIB)/liblualib.a -DLIB= $(LIB)/liblualib.so.1.1 -libs: $(SLIB) $(DLIB) +# dynamic libraries only work for SunOs +DLIB= $(LIB)/liblualib.so.2.1 + +all: $(SLIB) + +dynamic: $(DLIB) $(SLIB): $(OBJS) - ar ruvl $@ $(OBJS) + ar rcuv $@ $(OBJS) ranlib $(SLIB) $(DLIB): $(OBJS) @@ -21,3 +30,6 @@ $(DLIB): $(OBJS) clean: rm -f $(OBJS) $(SLIB) $(DLIB) + +co: + co -M iolib.c mathlib.c mathlib.h strlib.c strlib.h diff --git a/clients/lib/iolib.c b/clients/lib/iolib.c index b972124b..bb3883ab 100644 --- a/clients/lib/iolib.c +++ b/clients/lib/iolib.c @@ -3,20 +3,18 @@ ** Input/output library to LUA */ -char *rcs_iolib="$Id: iolib.c,v 1.4 1994/04/25 20:11:23 celes Exp $"; +char *rcs_iolib="$Id: iolib.c,v 1.21 1995/02/06 19:36:13 roberto Exp $"; -#include <stdlib.h> -#include <string.h> #include <stdio.h> #include <ctype.h> +#include <sys/types.h> #include <sys/stat.h> -#ifdef __GNUC__ -#include <floatingpoint.h> -#endif - -#include "mm.h" +#include <string.h> +#include <time.h> +#include <stdlib.h> #include "lua.h" +#include "lualib.h" static FILE *in=stdin, *out=stdout; @@ -31,7 +29,7 @@ static FILE *in=stdin, *out=stdout; static void io_readfrom (void) { lua_Object o = lua_getparam (1); - if (o == NULL) /* restore standart input */ + if (o == LUA_NOOBJECT) /* restore standart input */ { if (in != stdin) { @@ -76,7 +74,7 @@ static void io_readfrom (void) static void io_writeto (void) { lua_Object o = lua_getparam (1); - if (o == NULL) /* restore standart output */ + if (o == LUA_NOOBJECT) /* restore standart output */ { if (out != stdout) { @@ -122,7 +120,7 @@ static void io_writeto (void) static void io_appendto (void) { lua_Object o = lua_getparam (1); - if (o == NULL) /* restore standart output */ + if (o == LUA_NOOBJECT) /* restore standart output */ { if (out != stdout) { @@ -179,7 +177,7 @@ static void io_appendto (void) static void io_read (void) { lua_Object o = lua_getparam (1); - if (o == NULL || !lua_isstring(o)) /* free format */ + if (o == LUA_NOOBJECT || !lua_isstring(o)) /* free format */ { int c; char s[256]; @@ -187,7 +185,7 @@ static void io_read (void) ; if (c == '\"') { - int c, n=0; + int n=0; while((c = fgetc(in)) != '\"') { if (c == EOF) @@ -201,7 +199,7 @@ static void io_read (void) } else if (c == '\'') { - int c, n=0; + int n=0; while((c = fgetc(in)) != '\'') { if (c == EOF) @@ -215,7 +213,6 @@ static void io_read (void) } else { - char *ptr; double d; ungetc (c, in); if (fscanf (in, "%s", s) != 1) @@ -223,8 +220,7 @@ static void io_read (void) lua_pushnil (); return; } - d = strtod (s, &ptr); - if (!(*ptr)) + if (sscanf(s, "%lf %*c", &d) == 1) { lua_pushnumber (d); return; @@ -269,9 +265,9 @@ static void io_read (void) break; case 'f': case 'g': case 'e': { - float f; - sscanf (s, "%f", &f); - lua_pushnumber(f); + float fl; + sscanf (s, "%f", &fl); + lua_pushnumber(fl); } break; default: @@ -314,6 +310,38 @@ static void io_read (void) /* +** Read characters until a given one. The delimiter is not read. +*/ +static void io_readuntil (void) +{ + int n=255,m=0; + int c,d; + char *s; + lua_Object lo = lua_getparam(1); + if (!lua_isstring(lo)) + d = EOF; + else + d = *lua_getstring(lo); + + s = (char *)malloc(n+1); + while((c = fgetc(in)) != EOF && c != d) + { + if (m==n) + { + n *= 2; + s = (char *)realloc(s, n+1); + } + s[m++] = c; + } + if (c != EOF) ungetc(c,in); + s[m] = 0; + lua_pushstring(s); + free(s); +} + + + +/* ** Write a variable. On error put 0 on stack, otherwise put 1. ** LUA interface: ** status = write (variable [,format]) @@ -341,39 +369,49 @@ static void io_read (void) */ static char *buildformat (char *e, lua_Object o) { - static char buffer[512]; + static char buffer[2048]; static char f[80]; char *string = &buffer[255]; + char *fstart=e, *fspace, *send; char t, j='r'; - int m=0, n=0, l; + int m=0, n=-1, l; while (isspace(*e)) e++; + fspace = e; t = *e++; if (*e == '<' || *e == '|' || *e == '>') j = *e++; while (isdigit(*e)) m = m*10 + (*e++ - '0'); - e++; /* skip point */ + if (*e == '.') e++; /* skip point */ while (isdigit(*e)) - n = n*10 + (*e++ - '0'); + if (n < 0) n = (*e++ - '0'); + else n = n*10 + (*e++ - '0'); sprintf(f,"%%"); if (j == '<' || j == '|') sprintf(strchr(f,0),"-"); - if (m != 0) sprintf(strchr(f,0),"%d", m); - if (n != 0) sprintf(strchr(f,0),".%d", n); - sprintf(strchr(f,0), "%c", t); - switch (tolower(t)) + if (m > 0) sprintf(strchr(f,0),"%d", m); + if (n >= 0) sprintf(strchr(f,0),".%d", n); + switch (t) { - case 'i': t = 'i'; + case 'i': case 'I': t = 'd'; + sprintf(strchr(f,0), "%c", t); sprintf (string, f, (long int)lua_getnumber(o)); break; - case 'f': case 'g': case 'e': t = 'f'; + case 'f': case 'g': case 'e': case 'G': case 'E': + sprintf(strchr(f,0), "%c", t); sprintf (string, f, (float)lua_getnumber(o)); break; - case 's': t = 's'; + case 'F': t = 'f'; + sprintf(strchr(f,0), "%c", t); + sprintf (string, f, (float)lua_getnumber(o)); + break; + case 's': case 'S': t = 's'; + sprintf(strchr(f,0), "%c", t); sprintf (string, f, lua_getstring(o)); break; default: return ""; } l = strlen(string); + send = string+l; if (m!=0 && l>m) { int i; @@ -383,25 +421,34 @@ static char *buildformat (char *e, lua_Object o) } else if (m!=0 && j=='|') { + int k; int i=l-1; - while (isspace(string[i])) i--; - string -= (m-i) / 2; - i=0; - while (string[i]==0) string[i++] = ' '; - string[l] = 0; + while (isspace(string[i]) || string[i]==0) i--; + string -= (m-i)/2; + for(k=0; k<(m-i)/2; k++) + string[k] = ' '; + } + /* add space characteres */ + while (fspace != fstart) + { + string--; + fspace--; + *string = *fspace; } + while (isspace(*e)) *send++ = *e++; + *send = 0; return string; } static void io_write (void) { lua_Object o1 = lua_getparam (1); lua_Object o2 = lua_getparam (2); - if (o1 == NULL) /* new line */ + if (o1 == LUA_NOOBJECT) /* new line */ { fprintf (out, "\n"); lua_pushnumber(1); } - else if (o2 == NULL) /* free format */ + else if (o2 == LUA_NOOBJECT) /* free format */ { int status=0; if (lua_isnumber(o1)) @@ -426,10 +473,10 @@ static void io_write (void) ** Execute a executable program using "system". ** Return the result of execution. */ -void io_execute (void) +static void io_execute (void) { lua_Object o = lua_getparam (1); - if (o == NULL || !lua_isstring (o)) + if (o == LUA_NOOBJECT || !lua_isstring (o)) { lua_error ("incorrect argument to function 'execute`"); lua_pushnumber (0); @@ -446,10 +493,10 @@ void io_execute (void) ** Remove a file. ** On error put 0 on stack, otherwise put 1. */ -void io_remove (void) +static void io_remove (void) { lua_Object o = lua_getparam (1); - if (o == NULL || !lua_isstring (o)) + if (o == LUA_NOOBJECT || !lua_isstring (o)) { lua_error ("incorrect argument to function 'execute`"); lua_pushnumber (0); @@ -464,6 +511,88 @@ void io_remove (void) return; } + +/* +** To get a environment variables +*/ +static void io_getenv (void) +{ + lua_Object s = lua_getparam(1); + if (!lua_isstring(s)) + lua_pushnil(); + else + { + char *env = getenv(lua_getstring(s)); + if (env == NULL) lua_pushnil(); + else lua_pushstring(env); + } +} + +/* +** Return time: hour, min, sec +*/ +static void io_time (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); +} + +/* +** Return date: dd, mm, yyyy +*/ +static void io_date (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); +} + +/* +** Beep +*/ +static void io_beep (void) +{ + printf("\a"); +} + +/* +** To exit +*/ +static void io_exit (void) +{ + lua_Object o = lua_getparam(1); + if (lua_isstring(o)) + printf("%s\n", lua_getstring(o)); + exit(1); +} + +/* +** To debug a lua program. Start a dialog with the user, interpreting + lua commands until an 'cont'. +*/ +static void io_debug (void) +{ + while (1) + { + char buffer[250]; + fprintf(stderr, "lua_debug> "); + if (gets(buffer) == 0) return; + if (strcmp(buffer, "cont") == 0) return; + lua_dostring(buffer); + } +} + /* ** Open io library */ @@ -473,7 +602,14 @@ void iolib_open (void) 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); } diff --git a/clients/lib/mathlib.c b/clients/lib/mathlib.c index c84af8cb..ca5ab780 100644 --- a/clients/lib/mathlib.c +++ b/clients/lib/mathlib.c @@ -3,24 +3,26 @@ ** Mathematics library to LUA */ -char *rcs_mathlib="$Id: mathlib.c,v 1.1 1993/12/17 18:41:19 celes Exp $"; +char *rcs_mathlib="$Id: mathlib.c,v 1.9 1995/02/06 19:36:43 roberto Exp $"; #include <stdio.h> /* NULL */ #include <math.h> +#include "lualib.h" #include "lua.h" -#define TODEGREE(a) ((a)*180.0/3.14159) -#define TORAD(a) ((a)*3.14159/180.0) +#define PI 3.14159265358979323846 +#define TODEGREE(a) ((a)*180.0/PI) +#define TORAD(a) ((a)*PI/180.0) static void math_abs (void) { double d; lua_Object o = lua_getparam (1); - if (o == NULL) - { lua_error ("too few arguments to function `abs'"); return; } + if (o == LUA_NOOBJECT) + lua_error ("too few arguments to function `abs'"); if (!lua_isnumber(o)) - { lua_error ("incorrect arguments to function `abs'"); return; } + lua_error ("incorrect arguments to function `abs'"); d = lua_getnumber(o); if (d < 0) d = -d; lua_pushnumber (d); @@ -31,10 +33,10 @@ static void math_sin (void) { double d; lua_Object o = lua_getparam (1); - if (o == NULL) - { lua_error ("too few arguments to function `sin'"); return; } + if (o == LUA_NOOBJECT) + lua_error ("too few arguments to function `sin'"); if (!lua_isnumber(o)) - { lua_error ("incorrect arguments to function `sin'"); return; } + lua_error ("incorrect arguments to function `sin'"); d = lua_getnumber(o); lua_pushnumber (sin(TORAD(d))); } @@ -45,10 +47,10 @@ static void math_cos (void) { double d; lua_Object o = lua_getparam (1); - if (o == NULL) - { lua_error ("too few arguments to function `cos'"); return; } + if (o == LUA_NOOBJECT) + lua_error ("too few arguments to function `cos'"); if (!lua_isnumber(o)) - { lua_error ("incorrect arguments to function `cos'"); return; } + lua_error ("incorrect arguments to function `cos'"); d = lua_getnumber(o); lua_pushnumber (cos(TORAD(d))); } @@ -59,10 +61,10 @@ static void math_tan (void) { double d; lua_Object o = lua_getparam (1); - if (o == NULL) - { lua_error ("too few arguments to function `tan'"); return; } + if (o == LUA_NOOBJECT) + lua_error ("too few arguments to function `tan'"); if (!lua_isnumber(o)) - { lua_error ("incorrect arguments to function `tan'"); return; } + lua_error ("incorrect arguments to function `tan'"); d = lua_getnumber(o); lua_pushnumber (tan(TORAD(d))); } @@ -72,10 +74,10 @@ static void math_asin (void) { double d; lua_Object o = lua_getparam (1); - if (o == NULL) - { lua_error ("too few arguments to function `asin'"); return; } + if (o == LUA_NOOBJECT) + lua_error ("too few arguments to function `asin'"); if (!lua_isnumber(o)) - { lua_error ("incorrect arguments to function `asin'"); return; } + lua_error ("incorrect arguments to function `asin'"); d = lua_getnumber(o); lua_pushnumber (TODEGREE(asin(d))); } @@ -85,10 +87,10 @@ static void math_acos (void) { double d; lua_Object o = lua_getparam (1); - if (o == NULL) - { lua_error ("too few arguments to function `acos'"); return; } + if (o == LUA_NOOBJECT) + lua_error ("too few arguments to function `acos'"); if (!lua_isnumber(o)) - { lua_error ("incorrect arguments to function `acos'"); return; } + lua_error ("incorrect arguments to function `acos'"); d = lua_getnumber(o); lua_pushnumber (TODEGREE(acos(d))); } @@ -99,10 +101,10 @@ static void math_atan (void) { double d; lua_Object o = lua_getparam (1); - if (o == NULL) - { lua_error ("too few arguments to function `atan'"); return; } + if (o == LUA_NOOBJECT) + lua_error ("too few arguments to function `atan'"); if (!lua_isnumber(o)) - { lua_error ("incorrect arguments to function `atan'"); return; } + lua_error ("incorrect arguments to function `atan'"); d = lua_getnumber(o); lua_pushnumber (TODEGREE(atan(d))); } @@ -112,10 +114,10 @@ static void math_ceil (void) { double d; lua_Object o = lua_getparam (1); - if (o == NULL) - { lua_error ("too few arguments to function `ceil'"); return; } + if (o == LUA_NOOBJECT) + lua_error ("too few arguments to function `ceil'"); if (!lua_isnumber(o)) - { lua_error ("incorrect arguments to function `ceil'"); return; } + lua_error ("incorrect arguments to function `ceil'"); d = lua_getnumber(o); lua_pushnumber (ceil(d)); } @@ -125,10 +127,10 @@ static void math_floor (void) { double d; lua_Object o = lua_getparam (1); - if (o == NULL) - { lua_error ("too few arguments to function `floor'"); return; } + if (o == LUA_NOOBJECT) + lua_error ("too few arguments to function `floor'"); if (!lua_isnumber(o)) - { lua_error ("incorrect arguments to function `floor'"); return; } + lua_error ("incorrect arguments to function `floor'"); d = lua_getnumber(o); lua_pushnumber (floor(d)); } @@ -139,7 +141,7 @@ static void math_mod (void) lua_Object o1 = lua_getparam (1); lua_Object o2 = lua_getparam (2); if (!lua_isnumber(o1) || !lua_isnumber(o2)) - { lua_error ("incorrect arguments to function `mod'"); return; } + lua_error ("incorrect arguments to function `mod'"); d1 = (int) lua_getnumber(o1); d2 = (int) lua_getnumber(o2); lua_pushnumber (d1%d2); @@ -150,24 +152,36 @@ static void math_sqrt (void) { double d; lua_Object o = lua_getparam (1); - if (o == NULL) - { lua_error ("too few arguments to function `sqrt'"); return; } + if (o == LUA_NOOBJECT) + lua_error ("too few arguments to function `sqrt'"); if (!lua_isnumber(o)) - { lua_error ("incorrect arguments to function `sqrt'"); return; } + lua_error ("incorrect arguments to function `sqrt'"); d = lua_getnumber(o); lua_pushnumber (sqrt(d)); } +static int old_pow; + static void math_pow (void) { - double d1, d2; lua_Object o1 = lua_getparam (1); lua_Object o2 = lua_getparam (2); - if (!lua_isnumber(o1) || !lua_isnumber(o2)) - { lua_error ("incorrect arguments to function `pow'"); return; } - d1 = lua_getnumber(o1); - d2 = lua_getnumber(o2); - lua_pushnumber (pow(d1,d2)); + 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_pushobject(o1); + lua_pushobject(o2); + lua_pushobject(op); + if (lua_callfunction(old) != 0) + lua_error(NULL); + } + else + { + double d1 = lua_getnumber(o1); + double d2 = lua_getnumber(o2); + lua_pushnumber (pow(d1,d2)); + } } static void math_min (void) @@ -175,15 +189,15 @@ static void math_min (void) int i=1; double d, dmin; lua_Object o; - if ((o = lua_getparam(i++)) == NULL) - { lua_error ("too few arguments to function `min'"); return; } + if ((o = lua_getparam(i++)) == LUA_NOOBJECT) + lua_error ("too few arguments to function `min'"); if (!lua_isnumber(o)) - { lua_error ("incorrect arguments to function `min'"); return; } + lua_error ("incorrect arguments to function `min'"); dmin = lua_getnumber (o); - while ((o = lua_getparam(i++)) != NULL) + while ((o = lua_getparam(i++)) != LUA_NOOBJECT) { if (!lua_isnumber(o)) - { lua_error ("incorrect arguments to function `min'"); return; } + lua_error ("incorrect arguments to function `min'"); d = lua_getnumber (o); if (d < dmin) dmin = d; } @@ -196,15 +210,15 @@ static void math_max (void) int i=1; double d, dmax; lua_Object o; - if ((o = lua_getparam(i++)) == NULL) - { lua_error ("too few arguments to function `max'"); return; } + if ((o = lua_getparam(i++)) == LUA_NOOBJECT) + lua_error ("too few arguments to function `max'"); if (!lua_isnumber(o)) - { lua_error ("incorrect arguments to function `max'"); return; } + lua_error ("incorrect arguments to function `max'"); dmax = lua_getnumber (o); - while ((o = lua_getparam(i++)) != NULL) + while ((o = lua_getparam(i++)) != LUA_NOOBJECT) { if (!lua_isnumber(o)) - { lua_error ("incorrect arguments to function `max'"); return; } + lua_error ("incorrect arguments to function `max'"); d = lua_getnumber (o); if (d > dmax) dmax = d; } @@ -212,6 +226,67 @@ static void math_max (void) } +static void math_log (void) +{ + double d; + lua_Object o = lua_getparam (1); + if (o == LUA_NOOBJECT) + lua_error ("too few arguments to function `log'"); + if (!lua_isnumber(o)) + lua_error ("incorrect arguments to function `log'"); + d = lua_getnumber(o); + lua_pushnumber (log(d)); +} + + +static void math_log10 (void) +{ + double d; + lua_Object o = lua_getparam (1); + if (o == LUA_NOOBJECT) + lua_error ("too few arguments to function `log10'"); + if (!lua_isnumber(o)) + lua_error ("incorrect arguments to function `log10'"); + d = lua_getnumber(o); + lua_pushnumber (log10(d)); +} + + +static void math_exp (void) +{ + double d; + lua_Object o = lua_getparam (1); + if (o == LUA_NOOBJECT) + lua_error ("too few arguments to function `exp'"); + if (!lua_isnumber(o)) + lua_error ("incorrect arguments to function `exp'"); + d = lua_getnumber(o); + lua_pushnumber (exp(d)); +} + +static void math_deg (void) +{ + float d; + lua_Object o = lua_getparam (1); + if (o == LUA_NOOBJECT) + lua_error ("too few arguments to function `deg'"); + if (!lua_isnumber(o)) + lua_error ("incorrect arguments to function `deg'"); + d = lua_getnumber(o); + lua_pushnumber (d*180./PI); +} + +static void math_rad (void) +{ + float d; + lua_Object o = lua_getparam (1); + if (o == LUA_NOOBJECT) + lua_error ("too few arguments to function `rad'"); + if (!lua_isnumber(o)) + lua_error ("incorrect arguments to function `rad'"); + d = lua_getnumber(o); + lua_pushnumber (d/180.*PI); +} /* ** Open math library @@ -229,7 +304,12 @@ void mathlib_open (void) lua_register ("floor", math_floor); lua_register ("mod", math_mod); lua_register ("sqrt", math_sqrt); - lua_register ("pow", math_pow); 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)); } diff --git a/clients/lib/mathlib.h b/clients/lib/mathlib.h index bdf2b4b8..7630144a 100644 --- a/clients/lib/mathlib.h +++ b/clients/lib/mathlib.h @@ -1,7 +1,7 @@ /* ** Math library to LUA ** TeCGraf - PUC-Rio -** $Id: mathlib.h,v 1.1 1993/12/17 18:41:19 celes Exp $ +** $Id: mathlib.h,v 1.1 1993/12/17 18:41:19 celes Stab $ */ diff --git a/clients/lib/strlib.c b/clients/lib/strlib.c index 037b84be..6b92a30b 100644 --- a/clients/lib/strlib.c +++ b/clients/lib/strlib.c @@ -3,34 +3,66 @@ ** String library to LUA */ -char *rcs_strlib="$Id: strlib.c,v 1.2 1994/03/28 15:14:02 celes Exp $"; +char *rcs_strlib="$Id: strlib.c,v 1.12 1995/02/06 19:37:51 roberto Exp $"; -#include <stdlib.h> #include <string.h> +#include <stdlib.h> #include <ctype.h> -#include "mm.h" +#include "lua.h" +#include "lualib.h" -#include "lua.h" +static char *newstring (lua_Object o) +{ + char *s = lua_getstring(o); + char *ns = (char *)malloc(strlen(s)+1); + if (ns == 0) + lua_error("not enough memory for new string"); + strcpy(ns, s); + return ns; +} + /* ** Return the position of the first caracter of a substring into a string ** LUA interface: -** n = strfind (string, substring) +** n = strfind (string, substring, init, end) */ static void str_find (void) { char *s1, *s2, *f; + int init; lua_Object o1 = lua_getparam (1); lua_Object o2 = lua_getparam (2); + lua_Object o3 = lua_getparam (3); + lua_Object o4 = lua_getparam (4); if (!lua_isstring(o1) || !lua_isstring(o2)) - { lua_error ("incorrect arguments to function `strfind'"); return; } + lua_error ("incorrect arguments to function `strfind'"); + if (o3 == LUA_NOOBJECT) + init = 0; + else if (lua_isnumber(o3)) + init = lua_getnumber(o3)-1; + else + { + lua_error ("incorrect arguments to function `strfind'"); + return; /* to avoid warnings */ + } s1 = lua_getstring(o1); s2 = lua_getstring(o2); - f = strstr(s1,s2); + f = strstr(s1+init,s2); if (f != NULL) - lua_pushnumber (f-s1+1); + { + int pos = f-s1+1; + if (o4 == LUA_NOOBJECT) + lua_pushnumber (pos); + else if (!lua_isnumber(o4)) + lua_error ("incorrect arguments to function `strfind'"); + else if ((int)lua_getnumber(o4) >= pos+strlen(s2)-1) + lua_pushnumber (pos); + else + lua_pushnil(); + } else lua_pushnil(); } @@ -44,7 +76,7 @@ static void str_len (void) { lua_Object o = lua_getparam (1); if (!lua_isstring(o)) - { lua_error ("incorrect arguments to function `strlen'"); return; } + lua_error ("incorrect arguments to function `strlen'"); lua_pushnumber(strlen(lua_getstring(o))); } @@ -62,20 +94,20 @@ static void str_sub (void) lua_Object o2 = lua_getparam (2); lua_Object o3 = lua_getparam (3); if (!lua_isstring(o1) || !lua_isnumber(o2)) - { lua_error ("incorrect arguments to function `strsub'"); return; } - if (o3 != NULL && !lua_isnumber(o3)) - { lua_error ("incorrect third argument to function `strsub'"); return; } - s = lua_copystring(o1); + lua_error ("incorrect arguments to function `strsub'"); + if (o3 != LUA_NOOBJECT && !lua_isnumber(o3)) + lua_error ("incorrect third argument to function `strsub'"); + s = newstring(o1); start = lua_getnumber (o2); - end = o3 == NULL ? strlen(s) : lua_getnumber (o3); + end = o3 == LUA_NOOBJECT ? strlen(s) : lua_getnumber (o3); if (end < start || start < 1 || end > strlen(s)) - lua_pushstring(""); + lua_pushliteral(""); else { s[end] = 0; lua_pushstring (&s[start-1]); } - free (s); + free(s); } /* @@ -88,8 +120,8 @@ static void str_lower (void) char *s, *c; lua_Object o = lua_getparam (1); if (!lua_isstring(o)) - { lua_error ("incorrect arguments to function `strlower'"); return; } - c = s = strdup(lua_getstring(o)); + lua_error ("incorrect arguments to function `strlower'"); + c = s = newstring(o); while (*c != 0) { *c = tolower(*c); @@ -110,8 +142,8 @@ static void str_upper (void) char *s, *c; lua_Object o = lua_getparam (1); if (!lua_isstring(o)) - { lua_error ("incorrect arguments to function `strlower'"); return; } - c = s = strdup(lua_getstring(o)); + lua_error ("incorrect arguments to function `strlower'"); + c = s = newstring(o); while (*c != 0) { *c = toupper(*c); diff --git a/clients/lib/strlib.h b/clients/lib/strlib.h index daa1f603..db3d38c5 100644 --- a/clients/lib/strlib.h +++ b/clients/lib/strlib.h @@ -1,7 +1,7 @@ /* ** String library to LUA ** TeCGraf - PUC-Rio -** $Id: strlib.h,v 1.1 1993/12/17 18:41:19 celes Exp $ +** $Id: strlib.h,v 1.1 1993/12/17 18:41:19 celes Stab $ */ diff --git a/clients/lua/Makefile b/clients/lua/Makefile index 7bb74208..10538d67 100644 --- a/clients/lua/Makefile +++ b/clients/lua/Makefile @@ -5,13 +5,23 @@ INC= $(LUA)/include LIB= $(LUA)/lib CC= gcc -CFLAGS= -g -Wall -O2 -I$(INC) +CFLAGS= $(INCS) $(DEFS) $(WARN) -O2 + +# in SunOs /usr/5include contains prototypes for standard lib +INCS= -I/usr/5include -I$(INC) +WARN= -Wall -Wmissing-prototypes -Wshadow -ansi OBJS= lua.o + T=$(BIN)/lua $T: $(OBJS) $(CC) -o $@ $(OBJS) -L$(LIB) -llua -llualib -lm +dynamic: + clean: rm -f $T $(OBJS) + +co: + co -M lua.c diff --git a/clients/lua/lua.c b/clients/lua/lua.c index c4b83cee..19836646 100644 --- a/clients/lua/lua.c +++ b/clients/lua/lua.c @@ -3,26 +3,72 @@ ** Linguagem para Usuarios de Aplicacao */ -char *rcs_lua="$Id: lua.c,v 1.1 1993/12/17 18:41:19 celes Exp $"; +char *rcs_lua="$Id: lua.c,v 1.4 1995/02/07 16:04:15 lhf Exp $"; #include <stdio.h> +#include <string.h> #include "lua.h" #include "lualib.h" -void main (int argc, char *argv[]) +static int lua_argc; +static char **lua_argv; + +/* +%F Allow Lua code to access argv strings. +%i Receive from Lua the argument number (starting with 1). +%o Return to Lua the argument, or nil if it does not exist. +*/ +static void lua_getargv (void) +{ + lua_Object lo = lua_getparam(1); + if (!lua_isnumber(lo)) + lua_pushnil(); + else + { + int n = (int)lua_getnumber(lo); + if (n < 1 || n > lua_argc) lua_pushnil(); + else lua_pushstring(lua_argv[n]); + } +} + + +int main (int argc, char *argv[]) { int i; + int result = 0; iolib_open (); strlib_open (); mathlib_open (); + + lua_register("argv", lua_getargv); + if (argc < 2) { - char buffer[2048]; + char buffer[250]; while (gets(buffer) != 0) - lua_dostring(buffer); + result = lua_dostring(buffer); } else - for (i=1; i<argc; i++) - lua_dofile (argv[i]); + { + for (i=1; i<argc; i++) + { + if (strcmp(argv[i], "--") == 0) + { + lua_argc = argc-i-1; + lua_argv = argv+i; + break; + } + } + for (i=1; i<argc; i++) + { + if (strcmp(argv[i], "--") == 0) + break; + else + result = lua_dofile (argv[i]); + } + } + return result; } + + diff --git a/doc/lua.dvi b/doc/lua.dvi Binary files differdeleted file mode 100644 index 8aa7404f..00000000 --- a/doc/lua.dvi +++ /dev/null diff --git a/doc/lua.ps b/doc/lua.ps deleted file mode 100644 index 373b082a..00000000 --- a/doc/lua.ps +++ /dev/null @@ -1,1774 +0,0 @@ -%!PS-Adobe-2.0 -%%Creator: dvips, version 5.4 (C) 1986-90 Radical Eye Software -%%Title: lua.dvi -%%Pages: 11 1 -%%BoundingBox: 0 0 612 792 -%%EndComments -%%BeginProcSet: tex.pro -/TeXDict 200 dict def TeXDict begin /N /def load def /B{bind def}N /S /exch -load def /X{S N}B /TR /translate load N /isls false N /vsize 10 N /@rigin{ -isls{[0 1 -1 0 0 0]concat}if 72 Resolution div 72 VResolution div neg scale -Resolution VResolution vsize neg mul TR}B /@letter{/vsize 10 N}B /@landscape{ -/isls true N /vsize -1 N}B /@a4{/vsize 10.6929133858 N}B /@a3{/vsize 15.5531 N -}B /@ledger{/vsize 16 N}B /@legal{/vsize 13 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 /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 /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 /E{pop nn dup definefont setfont}B /ch-image{ch-data dup type /stringtype -ne{ctr get /ctr ctr 1 add N}if}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 /ctr 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 add]{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}B /eop{clear SI restore showpage userdict /eop-hook -known{eop-hook}if}B /@start{userdict /start-hook known{start-hook}if -/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}B /p /show load N /RMat[1 0 0 -1 0 0]N -/BDot 8 string N /v{/ruley X /rulex X V}B /V{gsave TR -.1 -.1 TR rulex ruley -scale 1 1 false RMat{BDot}imagemask 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 /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 /w{0 rmoveto}B /x{0 S rmoveto}B /y{3 2 roll p a}B /bos{/SS save N}B -/eos{clear SS restore}B end -%%EndProcSet -TeXDict begin 1200 300 300 @start /Fa 8 58 df<00000C00001C00001C00003800003800 -00700000700000700000E00000E00001C00001C0000380000380000380000700000700000E0000 -0E00000E00001C00001C0000380000380000700000700000700000E00000E00001C00001C00001 -C0000380000380000700000700000700000E00000E00001C00001C000038000038000038000070 -0000700000E00000E00000C0000016317DA41D>47 D<00380000780003F800FFF800FDF80001F8 -0001F80001F80001F80001F80001F80001F80001F80001F80001F80001F80001F80001F80001F8 -0001F80001F80001F80001F80001F80001F80001F80001F80001F80001F80001F8007FFFF07FFF -F014207C9F1D>49 D<03FC000FFF803C0FE07007F07C03F8FE01F8FE01FCFE01FCFE01FC7C01FC -3801FC0001FC0001F80003F80003F00007E0000FC0000F80001E00003C0000780000E00C01C00C -03801C0300180600180FFFF81FFFF83FFFF87FFFF0FFFFF0FFFFF016207D9F1D>I<00FF0007FF -C00F03F01E01F83F01F83F01FC3F81FC3F01FC1F01FC0C01F80001F80003F00003E0000FC000FF -0000FF000003E00001F80001FC0000FE0000FE0000FF7C00FF7C00FFFE00FFFE00FFFE00FE7C01 -FC7801FC3C03F00FFFE001FF0018207E9F1D>I<0000E00001E00003E00003E00007E0000FE000 -1FE0001BE00033E00073E000E3E001C3E00183E00303E00703E00E03E00C03E01803E03803E070 -03E0E003E0FFFFFFFFFFFF0007E00007E00007E00007E00007E00007E00007E001FFFF01FFFF18 -207E9F1D>I<1000301E00F01FFFE01FFFE01FFFC01FFF001FFE001FF800180000180000180000 -18000019FE001FFF801E07E01C03F01801F00001F80001F80001FC0001FC7801FCFC01FCFC01FC -FC01FCFC01F8F801F86003F03003E01C0FC00FFF0003FC0016207D9F1D>I<001FC000FFF001F0 -3807C0780F80FC1F00FC1F00FC3F00FC7E00787E00007E0000FE0000FE3FC0FE7FF0FE80F8FF80 -7CFF007EFF007EFE007FFE007FFE007FFE007F7E007F7E007F7E007F3E007E3E007E1F007C0F00 -F807C1F003FFE000FF0018207E9F1D>I<00FF0007FFC00F83E01F00F03E00F87E007C7E007CFE -007EFE007EFE007EFE007FFE007FFE007FFE007F7E00FF7E00FF3E01FF1F017F0FFE7F03FC7F00 -007F00007E00007E1E007E3F00FC3F00FC3F00F83F01F01E03E01C0FC00FFF0003F80018207E9F -1D>57 D E /Fb 1 16 df<03F0000FFC001FFE003FFF007FFF807FFF80FFFFC0FFFFC0FFFFC0FF -FFC0FFFFC0FFFFC0FFFFC0FFFFC07FFF807FFF803FFF001FFE000FFC0003F00012147D9519>15 -D E /Fc 21 115 df<00030003000700060006000E000C001C0018001800380030003000700060 -00E000C000C001C001800180038003000300070006000E000C000C001C00180018003800300070 -0060006000E000C000C00010287E9D15>47 D<07E00FF01FF83C3C781E700E700EE007E007E007 -E007E007E007E007E007E007E007E007E007700E700E781E3C3C1FF80FF007E0101A7E9915>I< -008003803F80FF80C3800380038003800380038003800380038003800380038003800380038003 -8003800380038003807FFC7FFC0E1A7D9915>I<0FE01FF0387C701EE00EE00F400F4007000700 -0F000F000E001E001C0038007000E001C0038007000E001C0038007000FFFFFFFF101A7E9915> -I<07E03FF8783CE01E601E400E001E001E003C007C07F807E007F8003C001E001E000F000F000F -800F800FC01E601E383C1FF807E0101A7E9915>I<00780000F80000B80001B80001B800033800 -0338000738000638000E38001E38001C38003C3800383800783800703800F03800FFFFC0FFFFC0 -003800003800003800003800003800003800003800121A7F9915>I<7FFC7FFC70007000700070 -00700070007000700073E07FF87FFC7C3E781E000F000F000F000F000F400FC01E601C38781FF0 -0FC0101A7E9915>I<00F803FC0F041C0018003800700070007000E1F0E7F8EFFCFC1EF00EF00F -E007E007E007600770077007300E380C1C3C0FF003E0101A7E9915>I<FFFFFFFF0007000E001C -003C00380078007000F000E001E001C003C003C0038007800780078007800F000F000F000F000F -000F00101A7E9915>I<07E01FF8381C700EE007E007E007E007700E781E3FFC0FF00FF03E7C78 -1E700EE007E007E007E007E007700E700E3C3C1FF807E0101A7E9915>I<07E00FF01C38381C70 -0CE00EE00EE007E007E007E007F00F700F783F3FF71FE70F870006000E000E001C001C203870F0 -3FE00F80101A7E9915>I<001C0000003E0000003E0000002E0000006700000067000000E78000 -00C7800000C3800001C3C0000183C0000381E0000381E0000301E0000700F0000700F0000600F0 -000E0078000FFFF8001FFFFC001C003C0018003C0038001E0038001E0030001E0070000F007000 -0F00E0000780191C7F9B1C>65 D<003FC001FFF003C0F00700300E00001E00003C000038000078 -0000780000F00000F00000F00000F00000F00000F00000F00000F000007800007800003800003C -00001E00000E000807001803C07801FFF0003F80151C7D9B1B>67 D<FFFC00FFFF80F007C0F001 -F0F000F8F00078F0003CF0001CF0001EF0001EF0000FF0000FF0000FF0000FF0000FF0000FF000 -0FF0000FF0000EF0001EF0001EF0003CF00078F00078F001F0F007E0FFFF80FFFE00181C7C9B1F ->I<003F8001FFF003C0F80700380E00181C00003C0000380000780000780000F00000F00000F0 -0000F00000F00000F007F8F007F8F000387800387800383800383C00381C00380E003807003803 -C0F801FFF0003F80151C7D9B1C>71 D<F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0 -F0F0F0F0F0041C7C9B0C>73 D<FFFFFFFFFFFF003C00003C00003C00003C00003C00003C00003C -00003C00003C00003C00003C00003C00003C00003C00003C00003C00003C00003C00003C00003C -00003C00003C00003C00003C00003C00003C00181C7E9B1D>84 D<0FC03FF07FF87038401C001C -001C001C07FC3FFC7C1CE01CE01CE01CF07C7FFC7FDC3F1C0E127E9114>97 -D<07C01FF03FF83C3C700C700EFFFEFFFEFFFEE000E000E000700070003C061FFE0FFE07F80F12 -7E9113>101 D<00FC03FC07FC07000E000E000E000E000E000E00FFE0FFE00E000E000E000E00 -0E000E000E000E000E000E000E000E000E000E000E000E000E1C809B0D>I<E380E780EF80FC00 -F800F000F000E000E000E000E000E000E000E000E000E000E000E00009127D910E>114 -D E /Fd 24 122 df<00001FE0000070380000E01C0001C03C0001803C00038038000380000007 -000000070000000700000007000000070000000E0000000E000000FFFFE000FFFFE0000E00E000 -1E01C0001C01C0001C01C0001C01C0001C0380001C038000380380003803800038070000380700 -003807080070070C00700E1800700E1800700E180070063000E0062000E003C000E0000000E000 -0001C0000001C0000001C0000071800000F3800000F3000000620000003C0000001E2D82A21C> -12 D<0000FC060007FF0C001F839C003E00DC0078007C00F0007801E0007803C0007807800038 -0F8000301F0000301E0000303E0000303E0000607C0000007C0000007C000000F8000000F80000 -00F8000000F8000000F8000000F0000000F0000180F0000180F0000300F0000300F0000600F800 -060078000C00780018003C0030001E0060000F81C00007FF000001FC00001F2478A224>67 -D<00F180038B80070F800E07001E07001C07003C0700380E00780E00780E00780E00F01C00F01C -00F01C20F01C30F03860F0386070786070D8C03198801E0F0014157B9419>97 -D<03C03F803F800380038007000700070007000E000E000E000E001C001CF81D8C1E0E3C063C07 -3807380F700F700F700F700FE01EE01EE01EE03CE038E038607060E031C01F0010237BA217>I< -007C01C2030307070E0F1C0F3C003800780078007800F000F000F000F000F00170037006301C18 -380FC010157B9417>I<0000780007F00007F00000700000700000E00000E00000E00000E00001 -C00001C00001C00001C000038000F380038B80070F800E07001E07001C07003C0700380E00780E -00780E00780E00F01C00F01C00F01C20F01C30F03860F0386070786070D8C03198801E0F001523 -7BA219>I<00F803840E061C063C063806780CF038FFE0F000F000E000E000E000E000E002E006 -600C703830700F800F157A9417>I<00007C0000CE00019E00039E00038C000300000700000700 -000700000700000E00000E00000E00000E0001FFF001FFF0001C00001C00001C00001C00001C00 -00380000380000380000380000380000700000700000700000700000700000E00000E00000E000 -00E00001C00001C00001C00001C000038000738000F30000F300006600003C0000172D82A20F> -I<001F180031B800E0F801C0F001C0700380700780700700E00F00E00F00E00F00E01E01C01E01 -C01E01C01E01C01E03800E03800E0780060F80061F0001E700000700000700000E00000E00000E -00701C00F01800F0300060E0003F8000151F7E9417>I<00F0000FE0000FE00000E00000E00001 -C00001C00001C00001C000038000038000038000038000070000071E0007638007C1800F81C00F -01C00E01C00E01C01C03801C03801C03801C0380380700380700380E08380E0C700E18701C1870 -1C30700C20E00C6060078016237DA219>I<00E000E001E000C000000000000000000000000000 -00000000001E00330063806380C380C700C70007000E000E000E001C001C001C40386038C070C0 -7080318031001E000C227CA10F>I<0001C00003C00003C0000180000000000000000000000000 -000000000000000000000000000000003C00004600008700018700030700030700030700000E00 -000E00000E00000E00001C00001C00001C00001C00003800003800003800003800007000007000 -00700000700000E00000E00000E00071C000F18000F380006600003C0000122C82A10F>I<00F0 -000FE0000FE00000E00000E00001C00001C00001C00001C0000380000380000380000380000700 -000701E00706300708700E10F00E20F00E20600E40001D80001E00001FC0001CE0003870003830 -003838203838307070607070607070407030C0E01880600F0014237DA217>I<01E01FC01FC001 -C001C0038003800380038007000700070007000E000E000E000E001C001C001C001C0038003800 -380038007000700071007180E300E300E300620066003C000B237CA20D>I<1E07C07C00331861 -860063B033030063E03E0380C3C03C0380C3C03C0380C380380380078078070007007007000700 -70070007007007000E00E00E000E00E00E000E00E01C100E00E01C181C01C01C301C01C038301C -01C038601C01C0184038038018C01801800F0026157C9429>I<1E0780003318E00063B0600063 -E07000C3C07000C3807000C38070000700E0000700E0000700E0000700E0000E01C0000E01C000 -0E0382000E0383001C0386001C0706001C070C001C030800380318001801E00019157C941C>I< -007C0001C6000303000603800E03C01C03C03C03C03803C07803C07803C07803C0F00780F00780 -F00780F00F00F00E00701E00701C003038001860000F800012157B9419>I<03C1E00666300C7C -380C781818781C18701C18701C00E03C00E03C00E03C00E03C01C07801C07801C07801C0700380 -E003C0E003C1C003C380076700073C000700000700000E00000E00000E00000E00001C00001C00 -00FFC000FFC000161F7F9419>I<1E1F0033318063E1C063C3C0C3C3C0C38180C3800007000007 -00000700000700000E00000E00000E00000E00001C00001C00001C00001C000038000018000013 -157C9415>114 D<007801840306020E061E061E0608070007F007F803FC007C001E000E700EF0 -0CF00CE008601030601F800F157D9414>I<006000E000E000E000E001C001C001C001C00380FF -F8FFF8038007000700070007000E000E000E000E001C001C001C101C18383038303860186018C0 -0F000D1F7C9E11>I<0F003011807021C07061C0E0C1C0E0C380E0C380E00381C00701C00701C0 -0701C00E03800E03800E03840E03860E070C0C070C0E070C0E0B1806131003E1E018157C941B> -I<0F01C01183C021C3E061C1E0C1C0E0C380E0C380E00380C00700C00700C00700C00E01800E01 -800E01800E03000E03000E02000E04000E0C0006180001E00014157C9417>I<0F003011807021 -C07061C0E0C1C0E0C380E0C380E00381C00701C00701C00701C00E03800E03800E03800E03800E -07000C07000E07000E0F00061E0003EE00000E00000E00001C00301C0078380078300070600060 -C0002180001E0000151F7C9418>121 D E /Fe 33 122 df<00003C007E3C00FE3C01FE3C03C0 -00038000078000078000078000078000078000078000078000078000FFFE3CFFFE3CFFFE3C0780 -3C07803C07803C07803C07803C07803C07803C07803C07803C07803C07803C07803C07803C0780 -3C07803C07803C07803C07803C07803C162480A31B>12 D<787878781830306060E0050A7CA20E ->39 D<000F0000001F8000001F8000001B8000003BC0000039C0000079E0000071E0000070E000 -00F0F00000F0F00000E0F00001E0780001E0780001C0780003C03C0003C03C0003803C0007801E -0007801E0007001E000F000F000FFFFF001FFFFF801FFFFF801E0007803C0003C03C0003C03800 -03C0780001E0780001E0700001E0F00000F0F00000F0E00000F01D237EA221>65 -D<FFFF0000FFFFC000FFFFF000F001F800F0007C00F0003E00F0001F00F0000F00F0000780F000 -0780F00003C0F00003C0F00003C0F00001E0F00001E0F00001E0F00001E0F00001E0F00001E0F0 -0001E0F00001E0F00001E0F00001C0F00003C0F00003C0F00007C0F0000780F0000F80F0001F00 -F0003E00F0007C00F001F800FFFFF000FFFFE000FFFF00001B237BA224>68 -D<FFFFF8FFFFF8FFFFF8F00000F00000F00000F00000F00000F00000F00000F00000F00000F000 -00F00000F00000FFFFF0FFFFF0FFFFF0F00000F00000F00000F00000F00000F00000F00000F000 -00F00000F00000F00000F00000F00000F00000FFFFFCFFFFFCFFFFFC16237BA21E>I<F0F0F0F0 -F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F004237BA20E>73 -D<F00000F00000F00000F00000F00000F00000F00000F00000F00000F00000F00000F00000F000 -00F00000F00000F00000F00000F00000F00000F00000F00000F00000F00000F00000F00000F000 -00F00000F00000F00000F00000F00000F00000FFFFE0FFFFE0FFFFE013237BA21B>76 -D<FFFE00FFFFC0FFFFE0F003F0F00078F0003CF0003CF0001EF0001EF0001EF0001EF0001EF000 -1EF0003CF0003CF00078F003F0FFFFE0FFFFC0FFFE00F00000F00000F00000F00000F00000F000 -00F00000F00000F00000F00000F00000F00000F00000F00000F0000017237BA220>80 -D<00FF0003FFE007FFF00F81F01E00703C00003C00007800007800007800007800007800007C00 -003E00003F00001FE0000FFC0007FF8001FFC0003FE00003F00000F800007800007C00003C0000 -3C00003C00003C00003C00003CC00078E00078F800F07F03E01FFFC00FFF8001FE0016257EA31C ->83 D<FFFFFFF8FFFFFFF8FFFFFFF8000780000007800000078000000780000007800000078000 -000780000007800000078000000780000007800000078000000780000007800000078000000780 -000007800000078000000780000007800000078000000780000007800000078000000780000007 -80000007800000078000000780000007800000078000000780001D237EA222>I<03F0001FFC00 -3FFE00381F00200F00000780000780000780000780000F8003FF801FFF803F0780780780F00780 -F00780F00780F007807C1F807FFF803FF7801F878011167E9518>97 D<F00000F00000F00000F0 -0000F00000F00000F00000F00000F00000F00000F00000F00000F00000F0F800F3FE00FFFF00FE -1F80F80780F003C0F003C0F001E0F001E0F001E0F001E0F001E0F001E0F001E0F003E0F003C0F0 -07C0F80780FC1F00FFFE00F7FC00F1F00013237CA21A>I<01FC0007FF000FFF801F03803C0180 -780000780000780000F00000F00000F00000F00000F00000F000007800007800007800003C0040 -1F03C00FFFC007FF8001FC0012167E9516>I<0001E00001E00001E00001E00001E00001E00001 -E00001E00001E00001E00001E00001E00001E003F1E007FDE00FFFE01F07E03C03E07C01E07801 -E0F801E0F001E0F001E0F001E0F001E0F001E0F001E0F001E07801E07803E03C03E03F0FE01FFD -E00FF9E003E1E013237EA21A>I<03F00007FC001FFE003E0F003C0780780380780380F001C0FF -FFC0FFFFC0FFFFC0F00000F00000F000007000007800007800003C00801F07800FFF8007FF0001 -F80012167E9516>I<003F00FF01FF03C0038007800780078007800780078007800780FFF8FFF8 -FFF807800780078007800780078007800780078007800780078007800780078007800780078007 -80102380A20F>I<01F07C07FFFC0FFFFC1F1F001E0F003C07803C07803C07803C07803C07801E -0F001F1F000FFE001FFC0019F0003800003800003C00001FFF001FFFE01FFFF03FFFF87C01F878 -007CF0003CF0003CF0003CF8007C7C00F83F03F01FFFE00FFFC001FE0016217F9519>I<F00000 -F00000F00000F00000F00000F00000F00000F00000F00000F00000F00000F00000F00000F0F800 -F3FE00F7FF00FE1F00FC0F80F80780F80780F00780F00780F00780F00780F00780F00780F00780 -F00780F00780F00780F00780F00780F00780F00780F0078011237CA21A>I<F0F0F0F000000000 -0000000000F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F004237DA20B>I<F00000F000 -00F00000F00000F00000F00000F00000F00000F00000F00000F00000F00000F00000F00780F00F -00F01E00F03C00F07800F0F000F1E000F3C000F7C000FFC000FFE000FFE000FDF000F8F800F078 -00F07C00F03E00F01E00F01F00F00F00F00F80F007C012237CA218>107 -D<F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F004237D -A20B>I<F0FC03F0F3FF0FFCF7FF9FFEFE0FB83EFC07F01FF803E00FF803E00FF003C00FF003C0 -0FF003C00FF003C00FF003C00FF003C00FF003C00FF003C00FF003C00FF003C00FF003C00FF003 -C00FF003C00FF003C00FF003C00F20167C9529>I<F0F800F3FE00F7FF00FE1F00FC0F80F80780 -F80780F00780F00780F00780F00780F00780F00780F00780F00780F00780F00780F00780F00780 -F00780F00780F0078011167C951A>I<00FC0007FF800FFFC01F03E03E01F03C00F07800787000 -38F0003CF0003CF0003CF0003CF0003CF0003C7800787800787C00F83E01F01F03E00FFFC007FF -8000FC0016167F9519>I<F0F800F3FE00FFFF00FE1F80F80780F007C0F003C0F003E0F001E0F0 -01E0F001E0F001E0F001E0F001E0F003E0F003C0F007C0F80F80FC1F00FFFE00F7FC00F1F000F0 -0000F00000F00000F00000F00000F00000F00000F00000F00000F0000013207C951A>I<F0E0F3 -E0F7E0FF00FE00FC00F800F800F000F000F000F000F000F000F000F000F000F000F000F000F000 -F0000B167C9511>114 D<07F01FFC3FFE3C0E7806780078007C003F003FF01FF80FFC01FE001F -000F000F000FC00FF81EFFFE3FFC0FF010167F9513>I<0F000F000F000F000F000F00FFF8FFF8 -FFF80F000F000F000F000F000F000F000F000F000F000F000F000F000F000F080F1C07FC07F803 -E00E1C7F9B12>I<F00780F00780F00780F00780F00780F00780F00780F00780F00780F00780F0 -0780F00780F00780F00780F00780F00780F00780F00F80F83F807FFF807FE7801F878011167C95 -1A>I<F000F0F000F07801E07801E07801E03C03C03C03C03C03C01E07801E07800E07000F0F00 -0F0F00070E00079E00079E00039C00039C0003DC0001D80001F80001F80014167F9517>I<F007 -C01EF00FC01EF00EE01E780EE03C781CE03C781CF03C381CF0383C1C70783C3870783C3878781C -3878701E3838F01E3038F01E7038F00E703CE00E701CE00F601DE007601DC007600DC007400DC0 -07C00FC003C00F801F167F9522>I<7800F83C00F03E01E01E03C00F07C007878003CF0001FE00 -01FC0000FC0000780000F80000FC0001DE0003CF000787800F03800F03C01E01E03C00F07800F8 -F8007C1616809517>I<F000F0F800F07801E07801E03C01E03C03C03E03C01E03801E07800F07 -800F0700070F00078F00078E00038E00039C0001DC0001DC0001D80000D80000F8000070000070 -0000E00000E00000E00001C00001C0000380007F80007F00007E000014207F9517>I -E /Ff 81 127 df<001FC1F00070270C00C07E1E0180FC3E0380FC3E0700F81C07007800070038 -00070038000700380007003800070038000700380007003800FFFFFFE0FFFFFFE0070038000700 -380007003800070038000700380007003800070038000700380007003800070038000700380007 -00380007003800070038000700380007003800070038007FE1FFC07FE1FFC01F2380A21D>11 -D<000FC0000078300000E0080001803C0003807C0007007C0007007C0007003800070000000700 -000007000000070000000700000007000000FFFFFC00FFFFFC0007003C0007001C0007001C0007 -001C0007001C0007001C0007001C0007001C0007001C0007001C0007001C0007001C0007001C00 -07001C0007001C0007001C0007001C007FF1FFC07FF1FFC01A2380A21C>I<000FEC0000701C00 -00E07C0001807C0003807C0007003C0007001C0007001C0007001C0007001C0007001C0007001C -0007001C0007001C00FFFFFC00FFFFFC0007001C0007001C0007001C0007001C0007001C000700 -1C0007001C0007001C0007001C0007001C0007001C0007001C0007001C0007001C0007001C0007 -001C0007001C007FF1FFC07FF1FFC01A2380A21C>I<000FC03F00007031E0C000E00B80200180 -3E00F003807E01F007007C01F007007C01F007003C00E007001C000007001C000007001C000007 -001C000007001C000007001C0000FFFFFFFFF0FFFFFFFFF007001C00F007001C007007001C0070 -07001C007007001C007007001C007007001C007007001C007007001C007007001C007007001C00 -7007001C007007001C007007001C007007001C007007001C007007001C00707FF1FFC7FF7FF1FF -C7FF282380A22A>I<07070F0E1C383060C0080976A219>19 D<0E000F8001C000E0007000E000 -E07FC080000C097A7E16>24 D<701CF83EFC3FFC3F741D04010401040104010802080210041004 -20084010100F7EA219>34 D<0000C00C000000C00C000000C00C000001C01C0000018018000001 -801800000180180000038038000003003000000300300000030030000007007000000600600000 -060060000006006000000E00E000000C00C000FFFFFFFFE0FFFFFFFFE000180180000018018000 -001801800000380380000030030000003003000000300300000030030000FFFFFFFFE0FFFFFFFF -E0006006000000E00E000000C00C000000C00C000000C00C000001C01C00000180180000018018 -000001801800000380380000030030000003003000000300300000070070000006006000000600 -600000232D7DA22A>I<70F8FCFC7404040404080810102040060F7CA20E>39 -D<001000200040008001000300060004000C001800180018003000300030007000600060006000 -E000E000E000E000E000E000E000E000E000E000E000E000600060006000700030003000300018 -00180018000C00040006000300010000800040002000100C327DA413>I<800040002000100008 -000C0006000200030001800180018000C000C000C000E000600060006000700070007000700070 -007000700070007000700070007000600060006000E000C000C000C00180018001800300020006 -000C00080010002000400080000C327DA413>I<70F8FCFC7404040404080810102040060F7C84 -0E>44 D<FFF0FFF00C027F8B11>I<70F8F8F87005057C840E>I<01F800070E000E07001C038038 -01C03801C07801E07000E07000E07000E0F000F0F000F0F000F0F000F0F000F0F000F0F000F0F0 -00F0F000F0F000F0F000F0F000F0F000F0F000F07000E07000E07000E07801E03801C03801C01C -03800E0700070E0001F80014227EA019>48 D<004001C007C0FFC0F9C001C001C001C001C001C0 -01C001C001C001C001C001C001C001C001C001C001C001C001C001C001C001C001C001C001C001 -C001C07FFF7FFF10217CA019>I<03F8000FFE00181F802007C04003C04001E0F801E0FC01F0FC -00F0FC00F07800F03001F00001E00001E00003E00003C0000780000700000E00001C0000380000 -700000E0000080000100000200100400100800101000302000207FFFE0FFFFE0FFFFE014217EA0 -19>I<01F8000FFE001C0F803003C03803C07C03E07C01E07C01E03C03E01803E00003C0000380 -000780000E00001C0003F800000E000007800003C00003E00001E00001F00001F03001F07801F0 -FC01F0FC01F0FC01E0F803E04003C02007801C0F000FFE0003F80014227EA019>I<0003000003 -00000700000F00000F0000170000370000270000470000C7000087000107000307000207000407 -000C0700080700100700300700200700400700C00700FFFFFCFFFFFC0007000007000007000007 -0000070000070000070000FFF800FFF816217FA019>I<1800401E03801FFF801FFF001FFC0013 -F00010000010000010000010000010000010000010FC001306001403801801801001C00000E000 -00E00000F00000F00000F07000F0F800F0F800F0F800F0F800E0C001E04001C06003C03003801C -0F000FFE0003F00014227EA019>I<003E0000FF8003C0C00700E00E01E01C03E01C03E03801C0 -380000780000700000700000F0F800F30600F40300F40180F801C0F800E0F000E0F000F0F000F0 -F000F0F000F0F000F07000F07000F07800E03800E03801E01C01C01C03800F070003FE0001F800 -14227EA019>I<4000006000007FFFF07FFFF07FFFE0400020C000408000808001008001000002 -0000040000040000080000180000100000300000300000700000700000E00000E00000E00001E0 -0001E00001E00001E00003E00003E00003E00003E00003E00003E00003E00001C00014237DA119 ->I<01F80007FE000E07801801C03000C02000606000606000606000607000607800C03E00801F -81001FC60007FC0003F80001FE00067F000C1F80100FC03003E06001E0600070C00070C00030C0 -0030C00030C000306000607000403800C01E07800FFE0001F80014227EA019>I<01F80007FE00 -0E0F001C03803803807801C07001C07001E0F000E0F000E0F000F0F000F0F000F0F000F0F000F0 -7000F07001F03801F01802F00C02F0060CF001F0F00000E00000E00001E00001C03801C07C0380 -7C0380780700300E00303C001FF80007E00014227EA019>I<70F8F8F870000000000000000000 -000070F8F8F87005157C940E>I<70F8F8F870000000000000000000000070F8F8F87808080808 -101010204040051F7C940E>I<0001800000018000000180000003C0000003C0000003C0000005 -E0000005E0000005E0000008F0000008F0000008F00000107800001078000010780000203C0000 -203C0000603E0000401E0000401E0000C01F0000800F0000FFFF0001FFFF800100078001000780 -020003C0020003C0020003C0040001E0040001E00C0001E01E0001F0FFC01FFFFFC01FFF20237E -A225>65 D<FFFFF800FFFFFE0007800F80078007C0078003E0078001E0078001F0078001F00780 -01F0078001F0078001F0078001E0078003E0078007C007800F8007803E0007FFFE000780078007 -8003C0078001E0078001F0078000F0078000F8078000F8078000F8078000F8078000F8078000F8 -078001F0078003F0078007E007800FC0FFFFFF00FFFFFC001D227EA123>I<0007F008003FFC18 -00FC061801F0013803C000F8078000780F0000381E0000381E0000183C0000183C0000187C0000 -087C00000878000008F8000000F8000000F8000000F8000000F8000000F8000000F8000000F800 -0000780000007C0000087C0000083C0000083C0000081E0000101E0000100F0000200780002003 -C0004001F0018000FC0700003FFC000007F0001D247DA224>I<FFFFF800FFFFFE0007800F8007 -8003C0078001E0078000F007800078078000780780003C0780003C0780001E0780001E0780001E -0780001F0780001F0780001F0780001F0780001F0780001F0780001F0780001F0780001F078000 -1E0780001E0780003E0780003C0780003C07800078078000F0078001E0078003C007800F80FFFF -FF00FFFFF80020227EA126>I<FFFFFFE0FFFFFFE0078003E0078000E007800060078000200780 -0030078000300780001007802010078020100780201007802000078060000780E00007FFE00007 -FFE0000780E0000780600007802000078020000780200407802004078000040780000807800008 -0780000807800018078000180780003807800078078001F0FFFFFFF0FFFFFFF01E227EA122>I< -FFFFFFE0FFFFFFE0078003E0078000E00780006007800020078000300780003007800010078000 -1007802010078020100780200007802000078060000780E00007FFE00007FFE0000780E0000780 -600007802000078020000780200007802000078000000780000007800000078000000780000007 -8000000780000007800000FFFE0000FFFE00001C227EA121>I<0007F008003FFC1800FC061801 -F0013803C000F8078000780F0000381E0000381E0000183C0000183C0000187C0000087C000008 -78000008F8000000F8000000F8000000F8000000F8000000F8000000F8000000F8001FFF78001F -FF7C0000787C0000783C0000783C0000781E0000781F0000780F0000780780007803C000B801F0 -01B800FC0718003FFC080007F00020247DA227>I<FFFC3FFFFFFC3FFF078001E0078001E00780 -01E0078001E0078001E0078001E0078001E0078001E0078001E0078001E0078001E0078001E007 -8001E007FFFFE007FFFFE0078001E0078001E0078001E0078001E0078001E0078001E0078001E0 -078001E0078001E0078001E0078001E0078001E0078001E0078001E0078001E0FFFC3FFFFFFC3F -FF20227EA125>I<FFFCFFFC078007800780078007800780078007800780078007800780078007 -800780078007800780078007800780078007800780078007800780078007800780FFFCFFFC0E22 -7EA112>I<07FFF007FFF0000F00000F00000F00000F00000F00000F00000F00000F00000F0000 -0F00000F00000F00000F00000F00000F00000F00000F00000F00000F00000F00000F00000F0000 -0F00300F00780F00FC0F00FC0F00FC0E00F81E00401C0020380018700007C00014237EA11A>I< -FFFC01FF80FFFC01FF800780007800078000600007800040000780008000078001000007800200 -00078004000007800800000780100000078020000007804000000780C000000781C000000783E0 -00000784F000000788F00000079078000007A03C000007C03C000007801E000007800F00000780 -0F00000780078000078003C000078003C000078001E000078000F000078000F000078000780007 -8000FC00FFFC03FFC0FFFC03FFC022227EA127>I<FFFE0000FFFE000007800000078000000780 -000007800000078000000780000007800000078000000780000007800000078000000780000007 -800000078000000780000007800000078000000780000007800000078000400780004007800040 -07800040078000C0078000C00780008007800180078003800780078007801F80FFFFFF80FFFFFF -801A227EA11F>I<FF800001FF80FF800001FF8007800001F00005C00002F00005C00002F00004 -E00004F00004E00004F00004E00004F00004700008F00004700008F00004380010F00004380010 -F00004380010F000041C0020F000041C0020F000041C0020F000040E0040F000040E0040F00004 -070080F00004070080F00004070080F00004038100F00004038100F00004038100F0000401C200 -F0000401C200F0000400E400F0000400E400F0000400E400F00004007800F00004007800F0001F -003000F000FFE0301FFF80FFE0301FFF8029227EA12E>I<FF8007FFFFC007FF07C000F805E000 -2004F0002004F0002004780020047C0020043C0020041E0020041E0020040F0020040780200407 -80200403C0200401E0200401E0200400F0200400F8200400782004003C2004003C2004001E2004 -000F2004000F20040007A0040003E0040003E0040001E0040001E0040000E01F000060FFE00060 -FFE0002020227EA125>I<000FF00000381C0000E0070001C00380078001E0070000E00E000070 -1E0000783C00003C3C00003C7C00003E7C00003E7800001E7800001EF800001FF800001FF80000 -1FF800001FF800001FF800001FF800001FF800001FF800001F7C00003E7C00003E7C00003E3C00 -003C3E00007C1E0000780F0000F00F0000F0078001E003C003C000E0070000381C00000FF00020 -247DA227>I<FFFFF800FFFFFE0007801F00078007C0078003C0078001E0078001E0078001F007 -8001F0078001F0078001F0078001F0078001E0078003E0078003C00780078007801F0007FFFC00 -078000000780000007800000078000000780000007800000078000000780000007800000078000 -0007800000078000000780000007800000FFFC0000FFFC00001C227EA122>I<FFFFE00000FFFF -FC000007801F00000780078000078003C000078003E000078001E000078001F000078001F00007 -8001F000078001F000078001E000078003E000078003C000078007000007803E000007FFF00000 -078038000007801C000007800E000007800F000007800700000780078000078007800007800780 -000780078000078007C000078007C000078007C000078007C040078007E040078003E040FFFC01 -E080FFFC00F1000000003E0022237EA125>82 D<03F8100FFE301E07303801F07000F0700070E0 -0030E00030E00010E00010E00010F00000F000007C00007F00003FF0001FFE000FFF8003FFC000 -3FE00003F00000F0000070000078000038800038800038800038800038C00030C00070E00060F8 -00E0CF03C0C7FF0080FE0015247DA21C>I<7FFFFFFC7FFFFFFC7803C03C6003C00C4003C00440 -03C004C003C006C003C0068003C0028003C0028003C0028003C0020003C0000003C0000003C000 -0003C0000003C0000003C0000003C0000003C0000003C0000003C0000003C0000003C0000003C0 -000003C0000003C0000003C0000003C0000003C0000003C0000003C00001FFFF8001FFFF801F22 -7EA124>I<FFFC07FFFFFC07FF078000F807800020078000200780002007800020078000200780 -002007800020078000200780002007800020078000200780002007800020078000200780002007 -800020078000200780002007800020078000200780002007800020078000200380004003C00040 -03C0004001C0008000E0018000700300003C0E00001FF8000003F00020237EA125>I<FFF800FF -C0FFF800FFC00F80001E000780000800078000080003C000100003C000100003C000100001E000 -200001E000200001F000200000F000400000F0004000007800800000780080000078008000003C -010000003C010000003C010000001E020000001E020000001F060000000F040000000F04000000 -07880000000788000000078800000003D000000003D000000003F000000001E000000001E00000 -0000C000000000C000000000C0000022237FA125>I<FFF83FFE03FFFFF83FFE03FF0F8003E000 -780F0001E00030078001E00020078001E00020078001F0002003C001F0004003C001F0004003C0 -0278004001E00278008001E00278008001E0043C008000F0043C010000F0043C010000F0081E01 -0000F8081E03000078081E02000078181F02000078100F0200003C100F0400003C100F0400003C -20078400001E20078800001E20078800001E4003C800000F4003D000000F4003D000000F8001F0 -0000078001E00000078001E00000070000E00000070000E00000030000C0000002000040003023 -7FA133>I<7FFC0FFF007FFC0FFF0003E001F00003E000C00001F000800000F001000000F80200 -000078020000003C040000003E080000001E080000000F100000000FB000000007A000000003C0 -00000003E000000001E000000001F000000003F80000000278000000047C0000000C3C00000008 -1E000000101F000000300F00000020078000004007C00000C003C000008001E000010001F00003 -0000F0000F8001F800FFE007FFC0FFE007FFC022227FA125>I<FFF8007FC0FFF8007FC00F8000 -1E0007C000180003C000100003E000100001E000200001F000600000F00040000078008000007C -008000003C010000003E030000001E020000000F040000000F84000000078800000007D8000000 -03D000000003E000000001E000000001E000000001E000000001E000000001E000000001E00000 -0001E000000001E000000001E000000001E000000001E000000001E00000003FFF0000003FFF00 -0022227FA125>I<FEFEC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0 -C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0FEFE07317BA40E>91 D<08021004200820084010401080 -20802080208020B82EFC3FFC3F7C1F380E100F7AA219>I<FEFE06060606060606060606060606 -0606060606060606060606060606060606060606060606060606060606060606FEFE07317FA40E ->I<1FF000381C007C06007C07007C0380380380000380000380007F8007C3801E03803C038078 -0380780380F00384F00384F00384F00784780B843C11C80FE0F016157E9419>97 -D<0E0000FE0000FE00001E00000E00000E00000E00000E00000E00000E00000E00000E00000E00 -000E00000E1F800E60E00E80300F00380E001C0E001E0E000E0E000F0E000F0E000F0E000F0E00 -0F0E000F0E000F0E000E0E001E0E001C0F00380C80700C60E0081F8018237FA21C>I<01FE0007 -07000C0F801C0F80380F80780700700000F00000F00000F00000F00000F00000F00000F0000070 -00007800403800401C00800C010007060001F80012157E9416>I<0000700007F00007F00000F0 -00007000007000007000007000007000007000007000007000007000007001F8700706700E0170 -1C00F0380070780070700070F00070F00070F00070F00070F00070F00070F00070700070780070 -3800701C00F00C017807067F01F87F18237EA21C>I<01FC000707000C03801C01C03801C07800 -E07000E0F000E0FFFFE0F00000F00000F00000F00000F000007000007800203800201C00400E00 -8007030000FC0013157F9416>I<003E0000E30001C780038F80030F8007070007000007000007 -0000070000070000070000070000070000FFF800FFF80007000007000007000007000007000007 -00000700000700000700000700000700000700000700000700000700000700000700007FF8007F -F800112380A20F>I<00007801F08C071D1C0E0E1C1C07001C07003C07803C07803C07803C0780 -1C07001C07000E0E000F1C0019F0001000001000001800001C00001FFF000FFFE00FFFF03800F8 -60001840001CC0000CC0000CC0000C6000186000183800700E01C001FE0016217F9519>I<0E00 -0000FE000000FE0000001E0000000E0000000E0000000E0000000E0000000E0000000E0000000E -0000000E0000000E0000000E0000000E1F80000E60E0000E8070000F0038000F0038000E003800 -0E0038000E0038000E0038000E0038000E0038000E0038000E0038000E0038000E0038000E0038 -000E0038000E0038000E003800FFE3FF80FFE3FF8019237FA21C>I<1C003E003E003E001C0000 -0000000000000000000000000000000E00FE00FE001E000E000E000E000E000E000E000E000E00 -0E000E000E000E000E000E000E00FFC0FFC00A227FA10E>I<00E001F001F001F000E000000000 -00000000000000000000000000F007F007F000F000700070007000700070007000700070007000 -70007000700070007000700070007000700070007000707070F870F8E0F8C071801F000C2C82A1 -0F>I<0E0000FE0000FE00001E00000E00000E00000E00000E00000E00000E00000E00000E0000 -0E00000E00000E03FC0E03FC0E01E00E01800E02000E04000E08000E10000E38000EF8000F1C00 -0E1E000E0E000E07000E07800E03C00E01C00E01E00E01F0FFE3FEFFE3FE17237FA21A>I<0E00 -FE00FE001E000E000E000E000E000E000E000E000E000E000E000E000E000E000E000E000E000E -000E000E000E000E000E000E000E000E000E000E000E000E00FFE0FFE00B237FA20E>I<0E1FC0 -7F00FE60E18380FE807201C01F003C00E00F003C00E00E003800E00E003800E00E003800E00E00 -3800E00E003800E00E003800E00E003800E00E003800E00E003800E00E003800E00E003800E00E -003800E00E003800E00E003800E0FFE3FF8FFEFFE3FF8FFE27157F942A>I<0E1F8000FE60E000 -FE8070001F0038000F0038000E0038000E0038000E0038000E0038000E0038000E0038000E0038 -000E0038000E0038000E0038000E0038000E0038000E0038000E003800FFE3FF80FFE3FF801915 -7F941C>I<00FC000703800E01C01C00E0380070780078700038F0003CF0003CF0003CF0003CF0 -003CF0003CF0003C7000387800783800701C00E00E01C007038000FC0016157F9419>I<0E1F80 -FE60E0FE80700F00380E001C0E001E0E001E0E000F0E000F0E000F0E000F0E000F0E000F0E000F -0E001E0E001E0E001C0F00380E80700E60E00E1F800E00000E00000E00000E00000E00000E0000 -0E00000E0000FFE000FFE000181F7F941C>I<01F8200704600E02601C01603801E07800E07800 -E0F000E0F000E0F000E0F000E0F000E0F000E0F000E07000E07800E03801E01C01E00C02E0070C -E001F0E00000E00000E00000E00000E00000E00000E00000E00000E0000FFE000FFE171F7E941A ->I<0E1E00FE6300FE87801E87800F03000F00000E00000E00000E00000E00000E00000E00000E -00000E00000E00000E00000E00000E00000E0000FFF000FFF00011157F9414>I<0FC4303C600C -C00CC004C004E004F0007F803FF00FF800FC001E800E8006C006C006C004E00CD81887E00F157E -9414>I<020002000200020002000600060006000E001E003FF8FFF80E000E000E000E000E000E -000E000E000E000E000E040E040E040E040E040E040708030801F00E1F7F9E13>I<0E003800FE -03F800FE03F8001E0078000E0038000E0038000E0038000E0038000E0038000E0038000E003800 -0E0038000E0038000E0038000E0038000E0038000E0078000E0078000700BC0003833F8000FC3F -8019157F941C>I<FFC1FEFFC1FE1E00700E00200E002007004007004003808003808003808001 -C10001C10000E20000E20000E20000740000740000380000380000380000100017157F941A>I< -FF8FF87F80FF8FF87F801E01C01E000E00C00C000E00E008000E01E00800070160100007017010 -0007023030000382382000038238200001C418400001C41C400001C41C400000E80C800000E80E -800000E80E8000007007000000700700000070070000002002000021157F9424>I<FF83FEFF83 -FE0F01E007008003810003830001C20000E400007800007000003800003C00004E00008E000187 -000103800201C00601C01E00E0FF03FEFF03FE17157F941A>I<FFC1FEFFC1FE1E00700E00200E -002007004007004003808003808003808001C10001C10000E20000E20000E20000740000740000 -3800003800003800001000001000002000002000002000F84000F84000F88000B980006300003E -0000171F7F941A>I<3FFFC0380380300780200700600E00401C00403C0040380000700000E000 -01E00001C0000380400700400F00400E00C01C0080380080780180700780FFFF8012157F9416> -I<FFFFFF1801808C19>I<0E011F02318C40F8807010057CA019>126 D E -/Fg 25 121 df<F8F8F8F8F805057B8410>46 D<0003F000000003F000000007F800000007F800 -000007780000000F3C0000000F3C0000000F3C0000001E3E0000001E1E0000001E1E0000003E1F -0000003C1F0000007C0F8000007C0F800000780F800000F807C00000F807C00000F007C00001F0 -03E00001F003E00001E003E00003E001F00003E001F00003C001F00007C000F80007FFFFF80007 -FFFFF8000FFFFFFC000F80007C000F00007C001F00003E001F00003E001E00003E003E00001F00 -3E00001F003C00001F007C00000F807C00000F80F800000FC0F8000007C0F8000007C0222A7EA9 -27>65 D<0003FE00000FFFC0003FFFF000FFFFF001FE03F003F8006007E0002007C000000F8000 -001F8000001F0000003E0000003E0000007C0000007C0000007C0000007C000000F8000000F800 -0000F8000000F8000000F8000000F8000000F8000000F8000000F8000000F80000007C0000007C -0000007C0000007C0000003E0000003E0000001F0000001F8000000F80000007C0000007E00008 -03F8003801FE01F800FFFFF8003FFFF0000FFFC00003FE001D2C7CAA25>67 -D<FFFFFFC0FFFFFFC0FFFFFFC0FFFFFFC0F8000000F8000000F8000000F8000000F8000000F800 -0000F8000000F8000000F8000000F8000000F8000000F8000000F8000000F8000000FFFFFF00FF -FFFF00FFFFFF00FFFFFF00F8000000F8000000F8000000F8000000F8000000F8000000F8000000 -F8000000F8000000F8000000F8000000F8000000F8000000F8000000F8000000F8000000FFFFFF -E0FFFFFFE0FFFFFFE0FFFFFFE01B2A7BA923>69 D<F8F8F8F8F8F8F8F8F8F8F8F8F8F8F8F8F8F8 -F8F8F8F8F8F8F8F8F8F8F8F8F8F8F8F8F8F8F8F8F8F8F8F8052A7BA910>73 -D<F80000F80000F80000F80000F80000F80000F80000F80000F80000F80000F80000F80000F800 -00F80000F80000F80000F80000F80000F80000F80000F80000F80000F80000F80000F80000F800 -00F80000F80000F80000F80000F80000F80000F80000F80000F80000F80000F80000F80000FFFF -FFFFFFFFFFFFFFFFFFFF182A7BA920>76 D<FFFFE000FFFFFC00FFFFFF00F8003F80F8000FC0F8 -0003E0F80001F0F80001F0F80000F8F80000F8F80000F8F80000F8F80000F8F80000F8F80001F0 -F80001F0F80003E0F8000FE0F8003FC0FFFFFF80FFFFFE00FFFFF800FFFFE000F801F000F801F0 -00F800F800F800F800F8007C00F8003C00F8003E00F8001E00F8001F00F8000F80F8000F80F800 -07C0F80007C0F80003E0F80001E0F80001F0F80000F8F80000F8F800007C1E2A7BA926>82 -D<01FC000FFF003FFF803FFFC03C07E03003E00001F00001F00001F00001F00001F00003F001FF -F007FFF01FFFF03FC1F07E01F0FC01F0F801F0F801F0F801F0FC03F07E0FF07FFFF03FFFF01FF9 -F00FE1F0141B7E9A1C>97 D<F80000F80000F80000F80000F80000F80000F80000F80000F80000 -F80000F80000F80000F80000F80000F80000F87E00F9FF80FFFFC0FFFFE0FF07E0FC03F0F801F8 -F800F8F800F8F8007CF8007CF8007CF8007CF8007CF8007CF8007CF8007CF800FCF800F8F800F8 -F801F0FC03F0FE0FE0FFFFC0FFFF80FBFF00F8FC00162A7BA91E>I<007F8001FFE007FFF80FFF -F81FC0783F00103E00007C00007C00007C0000F80000F80000F80000F80000F80000F80000F800 -007C00007C00007C00003E00003F00181FC0780FFFF807FFF801FFE0007F80151B7E9A1A>I<00 -007C00007C00007C00007C00007C00007C00007C00007C00007C00007C00007C00007C00007C00 -007C00007C00FC7C03FF7C07FFFC0FFFFC1FC1FC3F00FC3E007C7C007C7C007CFC007CF8007CF8 -007CF8007CF8007CF8007CF8007CF8007CF8007C7C007C7C007C7E00FC3F00FC1F83FC1FFFFC0F -FF7C03FE7C01F87C162A7EA91E>I<00FC0003FF0007FF800FFFC01F87E03F01E03E00F07C00F0 -7C0070F80078FFFFF8FFFFF8FFFFF8FFFFF8F80000F80000F800007800007C00007C00003E0000 -3F00181FC0F80FFFF807FFF801FFE0007F00151B7E9A1A>I<001FC0007FC000FFC001FFC003F0 -0003E00007C00007C00007C00007C00007C00007C00007C00007C00007C000FFFE00FFFE00FFFE -0007C00007C00007C00007C00007C00007C00007C00007C00007C00007C00007C00007C00007C0 -0007C00007C00007C00007C00007C00007C00007C00007C00007C00007C00007C000122A7FA912 ->I<00F80F0003FE7F800FFFFF801FFFFF801F07C0003E03E0003E03E0007C01F0007C01F0007C -01F0007C01F0007C01F0003E03E0003E03E0001F07C0001FFFC0003FFF80003BFE000038F80000 -78000000780000007C0000003FFF80003FFFF0001FFFF8001FFFFC003FFFFE007C00FE007C003F -00F8001F00F8001F00F8001F00F8001F00FC003F007E007E003F81FC001FFFF8000FFFF00007FF -E00000FF000019287E9A1D>I<F8F8F8F8F800000000000000000000F8F8F8F8F8F8F8F8F8F8F8 -F8F8F8F8F8F8F8F8F8F8F8F8F8F8F8F8052A7CA90E>105 D<F8F8F8F8F8F8F8F8F8F8F8F8F8F8 -F8F8F8F8F8F8F8F8F8F8F8F8F8F8F8F8F8F8F8F8F8F8F8F8F8F8F8F8052A7CA90E>108 -D<F83F007E00F9FF83FF00FBFFC7FF80FFFFEFFFC0FF07FE0FC0FE03FC07E0FC01F803E0FC01F8 -03E0F801F003E0F801F003E0F801F003E0F801F003E0F801F003E0F801F003E0F801F003E0F801 -F003E0F801F003E0F801F003E0F801F003E0F801F003E0F801F003E0F801F003E0F801F003E0F8 -01F003E0F801F003E0F801F003E0F801F003E0231B7B9A2E>I<F87E00F9FF00FBFF80FFFFC0FF -0FC0FE07E0FC03E0FC03E0F803E0F803E0F803E0F803E0F803E0F803E0F803E0F803E0F803E0F8 -03E0F803E0F803E0F803E0F803E0F803E0F803E0F803E0F803E0F803E0131B7B9A1E>I<007E00 -01FF8007FFE00FFFF01F81F83F00FC3E007C7C003E7C003E78001EF8001FF8001FF8001FF8001F -F8001FF8001FF8001F7C003E7C003E7C003E3E007C3F00FC1FC3F80FFFF007FFE003FFC0007E00 -181B7E9A1D>I<F87E00F9FF80FFFFC0FFFFE0FF0FE0FC03F0F801F8F800F8F800F8F800FCF800 -7CF8007CF8007CF8007CF8007CF8007CF8007CF800FCF800F8F801F8F801F0FC03F0FE0FE0FFFF -C0FFFF80FBFF00F8FC00F80000F80000F80000F80000F80000F80000F80000F80000F80000F800 -00F80000F8000016277B9A1E>I<F838F8F8F9F8FBF8FFC0FF00FE00FE00FC00FC00F800F800F8 -00F800F800F800F800F800F800F800F800F800F800F800F800F800F8000D1B7B9A14>114 -D<07F8001FFF003FFF807FFF807C0780F80100F80000F80000F80000FC00007F00007FF0003FFC -001FFE0007FF0000FF80001FC0000FC00007C00007C04007C0E007C0FC1F80FFFF807FFF001FFE -0007F800121B7E9A16>I<07C00007C00007C00007C00007C00007C00007C000FFFF80FFFF80FF -FF8007C00007C00007C00007C00007C00007C00007C00007C00007C00007C00007C00007C00007 -C00007C00007C00007C00007C00007C00007C08007E38003FFC003FFC001FF0000FC0012227FA1 -15>I<F803E0F803E0F803E0F803E0F803E0F803E0F803E0F803E0F803E0F803E0F803E0F803E0 -F803E0F803E0F803E0F803E0F803E0F803E0F803E0F803E0F807E0F807E0FC1FE0FFFFE07FFBE0 -3FF3E01F83E0131B7B9A1E>I<7C001F803E003F003F003E001F807C000F80FC0007C0F80007E1 -F00003F3E00001F7E00000FFC000007F8000007F0000003E0000003E0000003F0000007F800000 -FFC00001F3E00003E1E00003E1F00007C0F8000F807C001F807C001F003E003E001F007C001F80 -FC000FC01A1B809A1B>120 D E /Fh 69 126 df<701CF01EF01EF01EF01EF01EF01EF01EF01E -701C701C701C701C600C0F0E7B9D1A>34 D<01818003C3C003C3C003C3C003C3C003C3C003C3C0 -7FFFF0FFFFF8FFFFF8FFFFF80787800787800787800F8F800F0F000F0F000F0F000F0F00FFFFF8 -FFFFF8FFFFF87FFFF01E1E001E1E001E1E001E1E001E1E001E1E000C0C00151E7E9D1A>I<1C3E -3E3F1F070707070E0E1C3C78F0600810789D1A>39 D<0038007800F001E003C007800F000E001C -001C0038003800700070007000E000E000E000E000E000E000E000E000E000E000700070007000 -380038001C001C000E000F00078003C001E000F8007800380D2878A21A>I<6000F00078003C00 -1E000F000780038001C001C000E000E00070007000700038003800380038003800380038003800 -38003800700070007000E000E001C001C0038007800F001E003C007800F00060000D287CA21A> -I<00E00000E00000E00000E00040E040F0E1E0F8E3E07EEFC01FFF0007FC0003F80007FC001FFF -007EEFC0F8E3E0F0E1E040E04000E00000E00000E00000E00013157D991A>I<00300000780000 -78000078000078000078000078000078000078007FFFF0FFFFF8FFFFF87FFFF000780000780000 -780000780000780000780000780000780000300015167E991A>I<183E7E7F3F1F070E0E1CFCF8 -E0080D77851A>I<7FFFC0FFFFE0FFFFE07FFFC013047D901A>I<3078FCFC7830060676851A>I< -0000C00001E00001E00003E00003C00007C0000780000F80000F00000F00001F00001E00003E00 -003C00007C0000780000780000F80000F00001F00001E00003E00003C00003C00007C000078000 -0F80000F00001F00001E00001E00003E00003C00007C0000780000F80000F00000F00000600000 -13277DA21A>I<01F00007FC000FFE001F1F001C07003803803803807001C07001C07001C0E000 -E0E000E0E000E0E000E0E000E0E000E0E000E0E000E0E000E0F001E07001C07001C07803C03803 -803C07801C07001F1F000FFE0007FC0001F000131E7D9D1A>I<00C001C001C003C007C00FC07F -C0FDC071C001C001C001C001C001C001C001C001C001C001C001C001C001C001C001C001C001C0 -01C07FFFFFFF7FFF101E7B9D1A>I<03F0000FFC001FFF003C0F807803C07001C0E000E0F000E0 -F000E06000E00000E00000E00001C00001C0000380000780000F00000E00003C00007C0000F000 -01E00003C0000780000F00001E00E03C00E07FFFE0FFFFE07FFFE0131E7D9D1A>I<01FC0007FF -001FFF801E03C03C01C03C00E03C00E00000E00000E00001C00003C000078001FF0001FF0001FF -C00003E00000F0000070000038000038000038600038F00038F00038E000707000F07E03E03FFF -C00FFF0001FC00151E7E9D1A>I<000F80001F80003F80003B80007B8000F38000E38001E38003 -C3800383800783800F03800E03801E03803C0380380380780380F00380FFFFFEFFFFFEFFFFFE00 -0380000380000380000380000380000380007FFC007FFC007FFC171E7F9D1A>I<3078FCFC7830 -0000000000000000003078FCFC7830061576941A>58 D<183C7E7E3C1800000000000000000018 -3C7E7E3E1E0E0E1C3CF8F0C0071C77941A>I<7FFFF0FFFFF8FFFFF87FFFF00000000000000000 -000000007FFFF0FFFFF8FFFFF87FFFF0150C7E941A>61 D<003E0001FF0003FF8007C3C00F01C0 -1E0EE03C3FE0387FE07071F070E0F070E0F0E1C070E1C070E1C070E1C070E1C070E1C070E1C070 -E1C07070E0E070E0E07071C0387FC03C3F801E0E000F007007C1F003FFE001FFC0003F00141E7E -9D1A>64 D<003800007C00007C00006C0000EE0000EE0000EE0000EE0000C60001C70001C70001 -C70001C7000383800383800383800383800783C00701C007FFC007FFC007FFC00E00E00E00E00E -00E00E00E01C00707F83FCFF83FE7F83FC171E7F9D1A>I<FFFE00FFFF80FFFFC01C03E01C00E0 -1C00F01C00701C00701C00701C00701C00E01C01E01C07C01FFF801FFF801FFFC01C01E01C00F0 -1C00701C00381C00381C00381C00381C00381C00781C00F01C01F0FFFFE0FFFFC0FFFF00151E7E -9D1A>I<007C3801FF3807FFF80F83F81E00F81C0078380078380038700038700038700000E000 -00E00000E00000E00000E00000E00000E00000E000007000007000387000383800383800381C00 -701E00F00F83E007FFC001FF80007C00151E7E9D1A>I<FFFE00FFFF00FFFF801C07C01C01E01C -00F01C00701C00781C00381C00381C003C1C001C1C001C1C001C1C001C1C001C1C001C1C001C1C -001C1C003C1C00381C00381C00781C00701C00F01C01E01C07C0FFFFC0FFFF00FFFE00161E7F9D -1A>I<7FFFFCFFFFFC7FFFFC0E001C0E001C0E001C0E001C0E001C0E00000E00000E07000E0700 -0E07000FFF000FFF000FFF000E07000E07000E07000E00000E00000E00000E000E0E000E0E000E -0E000E0E000E7FFFFEFFFFFE7FFFFE171E7F9D1A>I<7FFFFCFFFFFC7FFFFC0E001C0E001C0E00 -1C0E001C0E001C0E00000E00000E07000E07000E07000FFF000FFF000FFF000E07000E07000E07 -000E00000E00000E00000E00000E00000E00000E00000E00007FE000FFF0007FE000161E7F9D1A ->I<00F8E003FEE007FFE00F07E01E03E03C01E03800E07000E07000E07000E0E00000E00000E0 -0000E00000E00000E00000E00FF8E00FF8E00FF8E000E07000E07000E07001E03801E03C03E01E -03E00F07E007FFE003FEE000F8E0151E7E9D1A>I<FF8FF8FF8FF8FF8FF81C01C01C01C01C01C0 -1C01C01C01C01C01C01C01C01C01C01C01C01C01C01FFFC01FFFC01FFFC01C01C01C01C01C01C0 -1C01C01C01C01C01C01C01C01C01C01C01C01C01C01C01C0FF8FF8FF8FF8FF8FF8151E7E9D1A> -I<FFFF80FFFF80FFFF8001C00001C00001C00001C00001C00001C00001C00001C00001C00001C0 -0001C00001C00001C00001C00001C00001C00001C00001C00001C00001C00001C00001C00001C0 -0001C000FFFF80FFFF80FFFF80111E7C9D1A>I<03FFC003FFE003FFC0000E00000E00000E0000 -0E00000E00000E00000E00000E00000E00000E00000E00000E00000E00000E00000E00000E0000 -0E00000E00000E00000E00600E00F00E00F01E00F03C007FF8003FF0000FC000131E7C9D1A>I< -FF83F8FF87FCFF83F81C01E01C03C01C03801C07001C0F001C1E001C1C001C38001C78001CF000 -1CF8001DF8001FDC001F9C001F0E001E0F001E07001C07801C03801C01C01C01C01C00E01C00E0 -1C0070FF81FCFF81FEFF81FC171E7F9D1A>I<7FE000FFF0007FE0000E00000E00000E00000E00 -000E00000E00000E00000E00000E00000E00000E00000E00000E00000E00000E00000E00000E00 -000E00000E00000E00380E00380E00380E00380E00387FFFF8FFFFF87FFFF8151E7E9D1A>I<7E -003F00FF007F807F007F001D80DC001D80DC001D80DC001DC1DC001DC1DC001CC19C001CC19C00 -1CE39C001CE39C001C631C001C771C001C771C001C361C001C361C001C3E1C001C1C1C001C1C1C -001C001C001C001C001C001C001C001C001C001C001C001C001C001C007F007F00FF80FF807F00 -7F00191E809D1A>I<FE0FF8FF0FF8FF0FF81D81C01D81C01D81C01D81C01DC1C01CC1C01CC1C0 -1CE1C01CE1C01C61C01C61C01C71C01C71C01C31C01C31C01C39C01C39C01C19C01C19C01C1DC0 -1C0DC01C0DC01C0DC01C0DC0FF87C0FF87C0FF83C0151E7E9D1A>I<0FFE003FFF807FFFC07C07 -C07001C0F001E0E000E0E000E0E000E0E000E0E000E0E000E0E000E0E000E0E000E0E000E0E000 -E0E000E0E000E0E000E0E000E0E000E0E000E0F001E0F001E07001C07C07C07FFFC03FFF800FFE -00131E7D9D1A>I<7FFF00FFFFC07FFFE00E01F00E00780E00380E003C0E001C0E001C0E001C0E -001C0E003C0E00380E00780E01F00FFFE00FFFC00FFF000E00000E00000E00000E00000E00000E -00000E00000E00000E00007FC000FFE0007FC000161E7F9D1A>I<FFF000FFFC00FFFF001C0F80 -1C07801C03C01C01C01C01C01C01C01C01C01C03C01C07801C0F801FFF001FFC001FFE001C0F00 -1C07001C03801C03801C03801C03801C03801C03841C038E1C038E1C038EFF81FCFF81FCFF8070 -171E7E9D1A>82 D<03F1C00FFDC03FFFC07C0FC07003C0E003C0E001C0E001C0E001C0E0000070 -00007800003F00001FF00007FE0000FF00000F800003C00001C00000E00000E06000E0E000E0E0 -00E0E001C0F001C0FC0780FFFF80EFFE00E3F800131E7D9D1A>I<7FFFFEFFFFFEFFFFFEE0380E -E0380EE0380EE0380EE0380E003800003800003800003800003800003800003800003800003800 -00380000380000380000380000380000380000380000380000380000380003FF8007FFC003FF80 -171E7F9D1A>I<7FC1FF00FFE3FF807FC1FF000E0038000E0038000E0038000E0038000E003800 -0E0038000E0038000E0038000E0038000E0038000E0038000E0038000E0038000E0038000E0038 -000E0038000E0038000E0038000E0038000E00380007007000070070000380E00003C1E00001FF -C00000FF8000003E0000191E809D1A>I<3FFFF87FFFF87FFFF87000707000E07001E07001C070 -0380000780000700000E00001E00001C0000380000780000F00000E00001C00003C00003800007 -00000F00380E00381C00383C0038380038700038FFFFF8FFFFF8FFFFF8151E7E9D1A>90 -D<FFF8FFF8FFF8E000E000E000E000E000E000E000E000E000E000E000E000E000E000E000E000 -E000E000E000E000E000E000E000E000E000E000E000E000E000E000E000E000E000FFF8FFF8FF -F80D2776A21A>I<FFF8FFF8FFF800380038003800380038003800380038003800380038003800 -380038003800380038003800380038003800380038003800380038003800380038003800380038 -0038FFF8FFF8FFF80D277EA21A>93 D<7FFFC0FFFFE0FFFFE07FFFC013047D7E1A>95 -D<1FF0003FFC007FFE00780F00300700000380000380007F8007FF801FFF803F83807803807003 -80E00380E00380E00380700780780F803FFFFC1FFDFC07F0FC16157D941A>97 -D<FE0000FE0000FE00000E00000E00000E00000E00000E00000E00000E3E000EFF800FFFE00FC1 -F00F80700F00380E00380E001C0E001C0E001C0E001C0E001C0E001C0E001C0F00380F00780F80 -F00FC1E00FFFC00EFF80063E00161E7F9D1A>I<00FF8003FFC00FFFE01F01E03C00C078000070 -0000700000E00000E00000E00000E00000E000007000007000007800703C00701F01F00FFFE003 -FFC000FE0014157D941A>I<001FC0001FC0001FC00001C00001C00001C00001C00001C00001C0 -01F1C007FDC00FFFC01E0FC03C07C07803C07001C0E001C0E001C0E001C0E001C0E001C0E001C0 -E001C07003C07003C03807C03E0FC01FFFFC07FDFC01F1FC161E7E9D1A>I<01F80007FF000FFF -801E07C03C01C07800E07000E0E00070E00070FFFFF0FFFFF0FFFFF0E000007000007000007800 -703C00701F01F00FFFE003FFC000FE0014157D941A>I<0007E0001FF0003FF800787800F03000 -E00000E00000E00000E0007FFFF0FFFFF0FFFFF000E00000E00000E00000E00000E00000E00000 -E00000E00000E00000E00000E00000E00000E00000E00000E0007FFFC07FFFC07FFFC0151E7F9D -1A>I<00F87C03FFFE07FFFE0F078C0E03801C01C01C01C01C01C01C01C01C01C00E03800F0780 -0FFF000FFE001CF8001C00001C00000E00000FFF800FFFE03FFFF87C007C70001CE0000EE0000E -E0000EE0000E70001C78003C3E00F81FFFF007FFC001FF0017217F941A>I<FE0000FE0000FE00 -000E00000E00000E00000E00000E00000E00000E3E000EFF800FFFC00FC1C00F80E00F00E00E00 -E00E00E00E00E00E00E00E00E00E00E00E00E00E00E00E00E00E00E00E00E00E00E0FFE3FEFFE3 -FEFFE3FE171E7F9D1A>I<01C00003E00003E00003E00001C00000000000000000000000000000 -00007FE000FFE0007FE00000E00000E00000E00000E00000E00000E00000E00000E00000E00000 -E00000E00000E00000E00000E00000E000FFFFC0FFFFC0FFFFC0121F7C9E1A>I<001C003E003E -003E001C000000000000000000000FFE0FFE0FFE000E000E000E000E000E000E000E000E000E00 -0E000E000E000E000E000E000E000E000E000E000E000E000E000E001C601CF038FFF87FF01FC0 -0F2A7E9E1A>I<FFE000FFE000FFE00000E00000E00000E00000E00000E00000E00000E00000E0 -0000E00000E00000E00000E00000E00000E00000E00000E00000E00000E00000E00000E00000E0 -0000E00000E00000E000FFFFE0FFFFE0FFFFE0131E7D9D1A>108 D<7CE0E000FFFBF8007FFFF8 -001F1F1C001E1E1C001E1E1C001C1C1C001C1C1C001C1C1C001C1C1C001C1C1C001C1C1C001C1C -1C001C1C1C001C1C1C001C1C1C001C1C1C001C1C1C007F1F1F00FF9F9F807F1F1F00191580941A ->I<FE3E00FEFF80FFFFC00FC1C00F80E00F00E00E00E00E00E00E00E00E00E00E00E00E00E00E -00E00E00E00E00E00E00E00E00E00E00E0FFE3FEFFE3FEFFE3FE17157F941A>I<01F00007FC00 -1FFF003E0F803C07807803C07001C0E000E0E000E0E000E0E000E0E000E0E000E0F001E07001C0 -7803C03C07803E0F801FFF0007FC0001F00013157D941A>I<FE3E00FEFF80FFFFE00FC1F00F80 -700F00380E00380E001C0E001C0E001C0E001C0E001C0E001C0E001C0F00380F00780F80F00FC1 -E00FFFC00EFF800E3E000E00000E00000E00000E00000E00000E00000E00000E0000FFE000FFE0 -00FFE00016207F941A>I<FF83F0FF8FF8FFBFFC03FC3C03F01803E00003C00003C00003800003 -8000038000038000038000038000038000038000038000038000FFFF00FFFF80FFFF0016157E94 -1A>114 D<07FB801FFF807FFF80780780E00380E00380E003807800007FC0003FFC0007FF0000 -3F800003806001C0E001C0E001C0F003C0FC0780FFFF00EFFE00E3F80012157C941A>I<00C000 -01C00001C00001C00001C00001C00001C0007FFFE0FFFFE0FFFFE001C00001C00001C00001C000 -01C00001C00001C00001C00001C00001C00001C07001C07001C07001C07000E0E000FFE0007FC0 -001F00141C7F9B1A>I<FE0FE0FE0FE0FE0FE00E00E00E00E00E00E00E00E00E00E00E00E00E00 -E00E00E00E00E00E00E00E00E00E00E00E00E00E01E00F03E007FFFE03FFFE00FCFE17157F941A ->I<7FC7FCFFC7FE7FC7FC0E00E00E00E00F01E00701C00701C00783C003838003838003838001 -C70001C70001C70000EE0000EE0000EE00007C00007C0000380017157F941A>I<FF83FEFFC7FE -FF83FE3800381C00701C00701C00701C00701C38701C7C700C7C600E6CE00E6CE00EEEE00EEEE0 -0EEEE006C6C006C6C007C7C007C7C003838017157F941A>I<7FC7F87FCFFC7FC7F80703C00387 -8003C70001EE0000FE00007C00007800003800007C0000EE0001EE0001C7000383800783C00701 -C07FC7FCFFC7FE7FC7FC17157F941A>I<7FC7FCFFC7FE7FC7FC0E00E00F00E00701E00701C007 -81C00381C003838001C38001C38001C70000E70000E70000E600006600006E00003C00003C0000 -3C00003C0000380000380000780000700030700078E00079E0007FC0003F80001E000017207F94 -1A>I<0007E0001FE0003FE000780000F00000E00000E00000E00000E00000E00000E00000E000 -00E00000E00000E00000E00001E00003C000FF8000FF0000FF800003C00001E00000E00000E000 -00E00000E00000E00000E00000E00000E00000E00000E00000E00000F000007800003FE0001FE0 -0007E013277DA21A>123 D<7C0000FF0000FF800003C00001E00000E00000E00000E00000E000 -00E00000E00000E00000E00000E00000E00000E00000F000007800003FE0001FE0003FE0007800 -00F00000E00000E00000E00000E00000E00000E00000E00000E00000E00000E00000E00001E000 -03C000FF8000FF00007C000013277DA21A>125 D E /Fi 62 127 df<0000FE0000038100000E -0080001C03C0003807C0007007C0007007800070030000E0000000E0000000E0000000E0000000 -E0000000E000003FFFFF003FFFFF0001C00F0001C0070001C0070001C0070003800E0003800E00 -03800E0003800E0003800E0003800E0007001C0007001C0007001C0007001C0007001C0007001C -000F003C00FFE3FF80FFE3FF801A237FA21C>12 D<0380078007000E001C003800700040008000 -0A0971A219>19 D<0700078001E000F0007000E001E0FF800C087B7E16>24 -D<0001E000000003100000000C080000000C080000001808000000380800000038080000003008 -00000030100000007010000000702000000070400000007080000000710000000072000000003C -003FF00038003FF00038000F800038000600007C000800009C000800011C001000061E0020000C -0E004000180F004000380700800078078100007003820000F003C40000F001C80000F001F00080 -F800F00180F800F001007801B803003E0F1E0E001FFC0FFC0007E003F00024257DA327>38 -D<1C3E7E7E3A02020404080810204080070F78A20E>I<1C3E7E7E3A0202040408081020408007 -0F7D840E>44 D<FFF0FFF00C027D8B11>I<3078F8787005057C840E>I<001F0000E1C001C06003 -80700700300E00380E00381E00381C00381C00383C00383C003838007878007878007878007878 -0078780078F000F0F000F0F000F0F000F0F000E0F001E0F001E0F001C0F001C0F0038070038070 -0700700600380C001C380007E00015227CA019>48 D<000FC0007FF000E0FC01003E02001E0400 -1F07800F0FC00F0FC00F0FC00F0F801F03001E00001E00003C00003C0000780000F00001E00003 -C0000700000E00001C0000300000600000C0000180080200080400080800103000107FFFF0FFFF -E0FFFFE018217EA019>50 D<001FC0007FE001C0F803007C07803C07C03C0FC03C0FC03C07803C -03007C0000780000F00000E00001C000070000FE000003800001C00001E00000F00000F00000F0 -0000F81000F87C01F0FC01F0FC01F0FC01E0F803E0C007C0600780381F001FFC0007F00016227D -A019>I<0000200000600000E00001E00001E00002E00005C00009C00011C00031C00061C00041 -C00083800103800203800403800C0380080380100700200700400700800700FFFFFCFFFFFC000E -00000E00000E00000E00000E00000E00001E0003FFE003FFE016217DA019>I<00800400E03C01 -FFF801FFF001FFC0017F00010000010000020000020000020000020000023F0002C1C00500E006 -00600400700000700000780000780000780000783800787C0078FC00F0F800F0F800E08001E040 -01C0400380200700381E000FFC0007E00016227DA019>I<001FC0007FE000E07801801802000C -06000C04000C0C000C0C000C0E000C0F00180F803007E06003F0C001FF0000FE00007F00019FC0 -060FE00C03E01801F03000F0600070600030C00030C00030C00030C00020E000606000C0300180 -3C0F000FFC0003F00016227DA019>56 D<003F0000FFC001E0E00380700700700E00381E00381C -00383C00383C00383C00383C00787800787800787800783800F83800F83801781C01F00C02F006 -0CF001F0E00001E00001E00001C00003C0700380F80700F80600F00E00803C00E070007FE0001F -800015227CA019>I<060F1F1F0E00000000000000000000003078F8787008157C940E>I<000004 -0000000006000000000E000000000E000000001E000000001E000000003F000000006F00000000 -4F00000000CF000000008F000000018F000000010F800000020780000002078000000407800000 -040780000008078000000803C000001003C000001003C000002003C000003FFFC000007FFFC000 -004001E000008001E000008001E000010001E000010001E000020001F000020000F000060000F0 -001F0001F000FFC01FFF80FFC01FFF0021237EA225>65 D<07FFFFE007FFFFF8003C007C003C00 -3E003C001F003C001F003C000F0078000F0078000F0078001F0078001F0078003E0078003C00F0 -007800F001F000F007C000FFFFC000F001F000F000F801E0007C01E0007C01E0003C01E0003E01 -E0003E01E0003E03C0003C03C0007C03C0007C03C000F803C001F003C003E007C00FC0FFFFFF80 -FFFFFC0020227EA123>I<0000FE010007FF83001F81C6007C006E00F0003E01E0001E03C0001E -0780000E0F00000C1F00000C1E0000043E0000043C0000047C0000047C000000F8000000F80000 -00F8000000F8000000F8000000F8000000F0000000F0000000F0000010F8000010F8000020F800 -0020780000207C0000403C0000801E0001800F0003000780060003E0380001FFF000003F800020 -247AA224>I<07FFFFE00007FFFFF800003C007C00003C001E00003C000F00003C000780003C00 -078000780003C000780003C000780003E000780003E000780003E000780003E000F00003E000F0 -0003E000F00003E000F00003E000F00003E000F00003E001E00003C001E00007C001E00007C001 -E000078001E0000F8001E0000F0003C0001F0003C0001E0003C0003C0003C000780003C000F000 -03C003E00007C00FC000FFFFFF0000FFFFF8000023227EA126>I<07FFFFFF8007FFFFFF80003C -001F00003C000700003C000300003C000300003C00010000780001000078000100007802010000 -780201000078020100007806000000F004000000F01C000000FFFC000000FFFC000000F01C0000 -00F00C000001E008000001E008000001E008010001E008010001E000020001E000020003C00002 -0003C000040003C000040003C0000C0003C000180003C000380007C001F800FFFFFFF000FFFFFF -F00021227EA122>I<0000FE010007FF83001F81C6007C006E00F0003E01E0001E03C0001E0780 -000E0F00000C1F00000C1E0000043E0000043C0000047C0000047C000000F8000000F8000000F8 -000000F8000000F8000000F8000000F0003FFFF0003FFFF00000F0F80000F0F80000F0F80001E0 -780001E07C0001E03C0001E01E0003E00F0003E0078004C003F038C001FFF040003F800020247A -A227>71 D<07FFF007FFF0003E00003C00003C00003C00003C0000780000780000780000780000 -780000780000F00000F00000F00000F00000F00000F00001E00001E00001E00001E00001E00001 -E00003C00003C00003C00003C00003C00003C00007C000FFFE00FFFC0014227EA112>73 -D<003FFF003FFF0000F00000F00000F00000F00000F00001E00001E00001E00001E00001E00001 -E00003C00003C00003C00003C00003C00003C0000780000780000780000780000780000780300F -007C0F00FC0F00FC0F00FC1E00F81E00803C0040380030E0000F800018237DA11A>I<07FFF00F -FE07FFF00FFC003E0003E0003C000300003C000200003C000400003C0018000078002000007800 -4000007800800000780100000078020000007808000000F018000000F03C000000F07C000000F0 -9E000000F31E000000F40F000001E80F000001F00F800001E007800001E007C00001E003C00001 -E003E00003C001E00003C001F00003C000F00003C000F80003C000780003C0007C0007C0007E00 -FFFC03FFC0FFFC03FFC027227EA127>I<07FFF80007FFF800003E0000003C0000003C0000003C -0000003C000000780000007800000078000000780000007800000078000000F0000000F0000000 -F0000000F0000000F0000000F0000001E0000001E0000001E0001001E0001001E0003001E00020 -03C0002003C0006003C0006003C000C003C001C003C003C007C00FC0FFFFFF80FFFFFF801C227E -A11F>I<07FC000007FE07FC00000FFE002E00000FC0002E00001780002E00001780002E000027 -80002700002780004700004F00004700008F00004700008F00004700010F00004380010F000043 -80020F00008380021E00008380041E000081C0041E000081C0081E000081C0081E000081C0101E -000101C0203C000100E0203C000100E0403C000100E0403C000100E0803C000100E0803C000200 -7100780002007100780002007200780002007200780002003C0078000600380078000F003800F8 -00FFE0301FFF80FFE0301FFF802F227EA12E>I<07FFFFC007FFFFF0003C00FC003C003E003C00 -1E003C001F003C001F0078001F0078001F0078001F0078001F0078001E0078003E00F0003C00F0 -007800F000F000F003E000FFFF8000F0000001E0000001E0000001E0000001E0000001E0000001 -E0000003C0000003C0000003C0000003C0000003C0000003C0000007C00000FFFC0000FFFC0000 -20227EA122>80 D<07FFFF800007FFFFF000003C00F800003C003C00003C001E00003C001F0000 -3C001F000078001F000078001F000078001F000078001F000078003E000078003C0000F0007800 -00F000F00000F007C00000FFFE000000F00E000000F003000001E003800001E001C00001E001C0 -0001E001E00001E001E00001E001E00003C003E00003C003E00003C003E00003C003E00003C003 -E02003C003E04007C003E040FFFC01F080FFFC00F1800000003E0023237EA125>82 -D<000FC040003FF0C000F0398001C00F80018003800300038007000180070001800E0001000E00 -01000E0001000F0000000F0000000F80000007E0000007FE000003FFC00001FFF000007FF80000 -07FC0000007C0000003C0000001E0000001E0000001E0020001E0040001C0040001C0060001C00 -600018006000380070007000F800E000EF03C000C7FF800080FE00001A247DA21C>I<1FFFFFFF -3FFFFFFF3C01E01E3001E0062001E0026001E0024001E0024003C0024003C0028003C0028003C0 -028003C0020003C000000780000007800000078000000780000007800000078000000F0000000F -0000000F0000000F0000000F0000000F0000001E0000001E0000001E0000001E0000001E000000 -1E0000003E00001FFFF8001FFFF80020227AA124>I<FFFE07FF80FFFE07FF8007C00078000780 -0020000780002000078000200007800020000F000040000F000040000F000040000F000040000F -000040000F000040001E000080001E000080001E000080001E000080001E000080001E00008000 -3C000100003C000100003C000100003C000100003C000100003C000200003C000200003C000200 -003C000400003C000C00001C000800001E001000000E006000000781C0000003FF800000007E00 -0000212379A125>I<FFFC007FE0FFF8007FE00F80001E000780000C0007800008000780001000 -03C000100003C000200003C000200003C000400003C000C00001E000800001E001000001E00100 -0001E002000001E002000000F004000000F004000000F008000000F008000000F0100000007810 -00000078200000007860000000784000000078800000003C800000003D000000003D000000003E -000000003E000000001C000000001C0000000018000000001800000023237AA125>I<FFF81FFF -03FF80FFF81FFE03FF800F8003E00078000F8001E0003000078001E0002000078001E000200007 -8001E0004000078003F0004000078002F0008000078004F000800007C004F001000003C008F001 -000003C008F002000003C010F002000003C010F804000003C0307804000003C0207808000001E0 -207808000001E0407810000001E0407810000001E0807830000001E0803C20000001E1003C2000 -0001E1003C40000000F2003C40000000F2003C80000000F4003C80000000F4003D00000000F800 -1F00000000F8001E00000000F0001E0000000070001C0000000060001C00000000600018000000 -0040001800000031237AA133>I<03FFF03FF803FFE03FF8001F800F80000F000600000F000C00 -000780080000078010000007C020000003C040000003E0C0000001E080000001F100000000F200 -000000FC0000000078000000007C000000003C000000003E000000005E000000009F000000018F -000000030F800000020780000004078000000803C000001003C000003003E000002001E0000040 -01F000008000F000018000F80007C000F800FFF007FFC0FFF007FFC025227FA125>I<FFF8007F -E0FFF8007FE007C0001E0007C000180003C000100003C000200003E000200001E000400001F000 -800000F001000000F801000000780200000078040000007C080000003C180000003E100000001E -200000001F400000001FC00000000F800000000F000000000F000000000F000000000F00000000 -0E000000001E000000001E000000001E000000001E000000001E000000001C000000003E000000 -07FFE0000007FFE0000023227AA125>I<0100038007C00CC018603030601080080D0876A219> -94 D<03FC000E07001F01801F01C01E00C00C00E00001C00001C0003FC003E1C00F01C01E01C0 -380380780380F00384F00384F00784F00784F00B887833D01FC1E016157D9419>97 -D<0780003F80003F00000700000700000700000700000700000E00000E00000E00000E00000E00 -000E00001C3F001CC1C01D00601E00701C00381C003838003C38003C38003C38003C38003C3800 -3C7000787000787000707000F07000E06801C0E80380C60E0081F80016237BA21C>I<00FF0003 -83800607C00C07C01C0780380300780000700000F00000F00000F00000F00000F00000E00000F0 -0000F000807001007001003806001C180007E00012157C9416>I<00000F00007F00007E00000E -00000E00000E00000E00000E00001C00001C00001C00001C00001C00001C007E3803C1380700B8 -0E00781C0038380038780070700070F00070F00070F00070F00070E000E0E000E0E000E0F000E0 -7001E07003E03805E01C19FC07E1FC18237CA21C>I<007E000383800701C00C00E01C00E03800 -E07800E07000E0FFFFE0F00000F00000F00000F00000E00000E00000F000407000803000801803 -000E0C0003F00013157D9416>I<0001E0000630001C780018F80038F800707000700000700000 -E00000E00000E00000E00000E00000E0003FFE003FFE0001C00001C00001C00001C00003800003 -80000380000380000380000380000700000700000700000700000700000700000F0000FFF000FF -F00015237FA20F>I<00000380001F8CC00070D1C000E0E1C001C0700003C0700003C070000780 -F0000780F0000780F0000780E0000381E0000181C00002C30000027E0000040000000400000004 -0000000600000007FFC00007FFF00007FFF8001C007C0030000C0060000C0060000C00C0000C00 -C0000C004000180060003000300060000C03800003FE00001A21809519>I<0078000003F80000 -03F00000007000000070000000700000007000000070000000E0000000E0000000E0000000E000 -0000E0000000E0000001C1F80001C60C0001D80E0001E0070001E0070001C0070003C00E000380 -0E0003800E0003800E0003800E0003800E0007001C0007001C0007001C0007001C0007001C0007 -001C000F003C00FFE3FF80FFE3FF8019237FA21C>I<007000F001F000F000E000000000000000 -00000000000000000001C00FC01FC003C001C001C0038003800380038003800380070007000700 -0700070007000F00FFE0FFE00C227FA10E>I<0078000003F8000003F000000070000000700000 -00700000007000000070000000E0000000E0000000E0000000E0000000E0000000E0000001C07F -C001C07FC001C03C0001C0300001C0400001C080000383000003840000038E000003BE000003CF -00000387000007078000070380000701C0000701C0000700E0000700F0000F00F800FFE3FF00FF -E3FE001A237FA21A>107 D<007803F803F00070007000700070007000E000E000E000E000E000 -E001C001C001C001C001C001C00380038003800380038003800700070007000700070007000F00 -FFE0FFE00D237FA20E>I<01C1F807E01FC60C18301FD80E603803E007801C01E007801C01C007 -001C03C00F003803800E003803800E003803800E003803800E003803800E003807001C00700700 -1C007007001C007007001C007007001C007007001C00700F003C00F0FFE3FF8FFEFFE3FF8FFE27 -157F942A>I<01C1F8001FC60C001FD80E0003E0070001E0070001C0070003C00E0003800E0003 -800E0003800E0003800E0003800E0007001C0007001C0007001C0007001C0007001C0007001C00 -0F003C00FFE3FF80FFE3FF8019157F941C>I<007F0001C1C00700E00E00701C00383800387800 -3C70003CF0003CF0003CF0003CF0003CE00078E00078E00070F000F07000E07001C03803800E0E -0003F00016157D9419>I<00E1F8000FE60E000FE8070000F0038000E003C000E001C001C001E0 -01C001E001C001E001C001E001C001E001C001E0038003C0038003C0038007800380078003800F -0003C00E0007403C0007307000070FC0000700000007000000070000000E0000000E0000000E00 -00000E0000000E000000FFC00000FFC000001B1F80941C>I<00FC100382100701300E00F01C00 -F03800F07800E07800E0F000E0F000E0F000E0F000E0F001C0F001C0F001C0F001C07003C07005 -C0380B801C338007C380000380000380000380000700000700000700000700000700007FE0007F -E0141F7C941A>I<01C3E01FC4701FD8F003D0F001E06001C00003C00003800003800003800003 -80000380000700000700000700000700000700000700000F0000FFF000FFF00014157F9414>I< -01FC800603800C01801801801801801800801801001E00001FE0000FFC0003FE00007E00000700 -400700400300400300600200600600F00400C8180087E00011157E9414>I<0080008000800180 -010001000300030007000F001FF8FFF80E000E000E000E001C001C001C001C001C001C00381038 -10381038103810382038201C4007800D1F7C9E13>I<0E0038FE03F8FE03F81E00780E00380E00 -381C00701C00701C00701C00701C00701C00703800E03800E03800E03800E03801E03802E01805 -E01C19FC07E1FC16157C941C>I<FFCFFC3FC0FFCFF87F801E01E01E000E00C008000E00C00800 -0E01E010000E03E010000E02E02000070660200007046040000708704000070870800007107180 -00079031000003A033000003A03A000003C03C000003C03C000003801800000180180000010010 -000022157C9424>119 D<1FF83FC01FF87FC001E03C0000E0100000E020000070400000388000 -00390000001E0000001C0000000E0000001F0000003700000063800000C380000181C0000101C0 -000600E0001E00F000FF03FF00FF03FF001A157F941A>I<0FFC0FE00FFC0FE000E0078000E002 -0000E0040000E00400007008000070080000701000007030000038200000384000003840000038 -8000003C8000001D0000001D0000001E0000001C0000000C000000080000000800000010000000 -1000000020000078400000F8400000F8800000F1000000420000003C0000001B1F80941A>I<FF -FFFF18017E8C19>123 D<0E011F03318440F88070100577A019>126 D E -/Fj 27 123 df<70F8FCFC7404040404080810102040060F7A8410>44 D<0003F802001FFF0600 -7E038601F000CE03E0003E0780001E0F00001E1F00000E1E0000063E0000063C0000067C000002 -7C00000278000002F8000000F8000000F8000000F8000000F8000000F8000000F8000000F80000 -00780000007C0000027C0000023C0000023E0000021E0000041F0000040F0000080780001803E0 -003001F00060007E03C0001FFF000003FC001F247CA227>67 D<FFFFFFE0FFFFFFE0078003E007 -8000E0078000600780002007800030078000300780001007800010078020100780201007802000 -07802000078060000780E00007FFE00007FFE0000780E000078060000780200007802000078020 -00078020000780000007800000078000000780000007800000078000000780000007800000FFFE -0000FFFE00001C227CA123>70 D<FFFC1FFF80FFFC1FFF80078000F000078000F000078000F000 -078000F000078000F000078000F000078000F000078000F000078000F000078000F000078000F0 -00078000F000078000F00007FFFFF00007FFFFF000078000F000078000F000078000F000078000 -F000078000F000078000F000078000F000078000F000078000F000078000F000078000F0000780 -00F000078000F000078000F000078000F000FFFC1FFF80FFFC1FFF8021227CA129>72 -D<FFFCFFFC07800780078007800780078007800780078007800780078007800780078007800780 -0780078007800780078007800780078007800780078007800780FFFCFFFC0E227DA114>I<FFFE -0000FFFE0000078000000780000007800000078000000780000007800000078000000780000007 -800000078000000780000007800000078000000780000007800000078000000780000007800000 -0780000007800020078000200780002007800020078000600780006007800040078000C0078001 -C0078003C007800FC0FFFFFFC0FFFFFFC01B227CA122>76 D<FFFFE00000FFFFFC000007801F00 -000780078000078003C000078003E000078001E000078001F000078001F000078001F000078001 -F000078001E000078003E000078003C000078007000007803E000007FFF0000007807800000780 -1C000007800E000007800F00000780070000078007800007800780000780078000078007800007 -8007C000078007C000078007C000078007C020078003E020078003E020FFFC01E040FFFC00F080 -0000003F0023237CA128>82 D<FFF80FFF807FE0FFF80FFF807FE00F8000F8000F000F80007800 -0600078000780004000780007C00040007C000BC000C0003C000BC00080003C000BE00080003E0 -011E00080001E0011E00100001E0011E00100001E0020F00100000F0020F00200000F0020F0020 -0000F00407802000007804078040000078040780400000780803C04000003C0803C08000003C08 -03C08000003C1001E08000001E1001E10000001E1001E10000001E2000F10000000F2000F20000 -000F2000F20000000F40007A00000007C0007C00000007C0007C0000000780003C000000038000 -38000000038000380000000300001800000001000010000033237EA137>87 -D<00040000000E0000000E0000000E0000001F0000001F0000003F800000278000002780000043 -C0000043C0000043C0000081E0000081E0000101F0000100F0000100F00003FFF8000200780006 -007C0004003C0004003C000C001E000C001E003C003F00FF00FFE01B1A7F991F>97 -D<FFFF800F00E00F00700F00380F003C0F003C0F003C0F003C0F003C0F00780F00700F01E00FFF -C00F00F00F00380F003C0F001C0F001E0F001E0F001E0F001E0F001C0F003C0F00780F00F0FFFF -C0171A7E991D>I<003F0201C0C603002E0E001E1C000E1C0006380006780002700002700002F0 -0000F00000F00000F00000F00000F000007000027000027800023800041C00041C00080E000803 -003001C0C0003F00171A7E991D>I<FFFF80000F01E0000F0070000F0038000F001C000F000E00 -0F000E000F0007000F0007000F0007800F0007800F0007800F0007800F0007800F0007800F0007 -800F0007800F0007000F0007000F000F000F000E000F001C000F0038000F0070000F01E000FFFF -8000191A7E991F>I<FFFFF80F00380F00180F00080F000C0F00040F00040F00040F02000F0200 -0F02000F06000FFE000F06000F02000F02000F02000F00020F00020F00020F00060F00040F0004 -0F000C0F003CFFFFFC171A7E991C>I<003F810001E063000380170006000F000C0007001C0003 -0038000300780001007800010070000100F0000000F0000000F0000000F0000000F0000000F001 -FFE070001F0078000F0078000F0038000F001C000F000C000F0006000F000380170001E0630000 -3F81001B1A7E9920>103 D<FFE3FF800F0078000F0078000F0078000F0078000F0078000F0078 -000F0078000F0078000F0078000F0078000F0078000FFFF8000F0078000F0078000F0078000F00 -78000F0078000F0078000F0078000F0078000F0078000F0078000F0078000F007800FFE3FF8019 -1A7E991F>I<FFF00F000F000F000F000F000F000F000F000F000F000F000F000F000F000F000F -000F000F000F000F000F000F000F000F00FFF00C1A7F990F>I<FFF0000F80000F00000F00000F -00000F00000F00000F00000F00000F00000F00000F00000F00000F00000F00000F00000F00000F -00100F00100F00100F00300F00200F00600F00600F01E0FFFFE0141A7E991A>108 -D<FF0003FE0F0003E00F0003E00B8005E00B8005E00B8005E009C009E009C009E009C009E008E0 -11E008E011E008E011E0087021E0087021E0083841E0083841E0083841E0081C81E0081C81E008 -1C81E0080F01E0080F01E0080F01E0080601E01C0601E0FF861FFE1F1A7E9925>I<FF00FF800F -801C000F8008000BC0080009E0080009E0080008F0080008F8080008780800083C0800083C0800 -081E0800080F0800080F0800080788000803C8000803C8000801E8000800F8000800F800080078 -000800780008003800080018001C001800FF800800191A7E991F>I<007F800001C0E000070038 -000E001C001C000E003C000F0038000700780007807000038070000380F00003C0F00003C0F000 -03C0F00003C0F00003C0F00003C0F00003C07800078078000780380007003C000F001C000E000E -001C000700380001C0E000007F80001A1A7E9920>I<007F800001C0E000070038000E001C001C -000E003C000F0038000700780007807800078070000380F00003C0F00003C0F00003C0F00003C0 -F00003C0F00003C0F00003C07000038078000780380007003C1E0F001C310E000E209C000720B8 -0001E0E000007FC0400000404000006040000070C000007F8000003F8000003F0000001E001A21 -7E9920>113 D<FFFE00000F03C0000F00E0000F00F0000F0078000F0078000F0078000F007800 -0F0078000F00F0000F00E0000F03C0000FFE00000F0380000F01E0000F00E0000F00F0000F00F0 -000F00F0000F00F0000F00F0000F00F0000F00F0400F0070400F003880FFF01F001A1A7E991E> -I<07E100181B00300700600300600300E00100E00100E00100F00000F800007F80003FF8001FFC -000FFE0000FF00000F00000780000780800380800380800380C00300C00700E00600DC0C0083F0 -00111A7E9917>I<7FFFFF00701E0700601E0100401E0100C01E0180801E0080801E0080801E00 -80001E0000001E0000001E0000001E0000001E0000001E0000001E0000001E0000001E0000001E -0000001E0000001E0000001E0000001E0000001E0000001E0000003F000003FFF000191A7F991D ->I<FFF0FF800F001C000F0008000F0008000F0008000F0008000F0008000F0008000F0008000F -0008000F0008000F0008000F0008000F0008000F0008000F0008000F0008000F0008000F000800 -0F00080007001000078010000380200001C0600000E08000003F0000191A7E991F>I<FFC00FF0 -1F0007801F0003000F8002000780040007C0040003E0080001E0080001F0100000F83000007820 -00007C4000003E4000001E8000001F8000000F0000000F0000000F0000000F0000000F0000000F -0000000F0000000F0000000F0000000F000000FFE0001C1A7F991F>121 -D<7FFFE07803C07003C0600780400780400F00401E00401E00003C00003C0000780000F00000F0 -0001E00001E00003C0000780200780200F00200F00201E00603C00403C00C07801C07803C0FFFF -C0131A7E9919>I E /Fk 19 121 df<FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF -FFFFFFFFFFFFFFFFFFFFFFFFFF000007F00000000007F00000000007F00000000007F000000000 -07F00000000007F00000000007F00000000007F00000000007F00000000007F00000000007F000 -00000007F00000000007F00000000007F00000000007F00000000007F00000000007F000000000 -07F00000000007F00000000007F00000000007F00000000007F00000000007F00000000007F000 -00000007F00000000007F00000000007F00000000007F00000000007F00000000007F000000000 -07F00000000007F00000000007F00000000007F00000000007F00000000007F00000000007F000 -00000007F00000000007F00000000007F00000000007F00000000007F00000000007F000000000 -07F00000000007F00000000007F00000000007F00000000007F00000000007F00000000007F000 -00000007F00000000007F00000000007F00000000007F00000303C7DBB37>84 -D<003FF00001FFFC0007FFFF001FFFFF801FFFFFC01FC01FE01E000FE0180007F0100007F00000 -03F8000003F8000003F8000003F8000003F8000003F8000003F80007FFF8007FFFF801FFFFF807 -FFFFF81FFF03F83FF003F87FC003F87F0003F8FF0003F8FE0003F8FE0003F8FE0003F8FE0003F8 -FF0007F87F800FF87FE07FF83FFFFFF83FFFFFF81FFFFBF807FFE3F803FE03F81D257DA427>97 -D<0007FE00003FFFC000FFFFF001FFFFF803FFFFF807FC03F80FF000701FE000301FC000003F80 -00003F8000007F0000007F0000007F000000FE000000FE000000FE000000FE000000FE000000FE -000000FE000000FE000000FE0000007F0000007F0000007F0000003F8000003F8000001FC00004 -1FE0001C0FF0007C07FC03FC03FFFFFC01FFFFFC00FFFFF0003FFFC00007FC001E257DA424>99 -D<0000007F0000007F0000007F0000007F0000007F0000007F0000007F0000007F0000007F0000 -007F0000007F0000007F0000007F0000007F0000007F0000007F0000007F0000007F0000007F00 -00007F0000007F0000007F0000007F001FE07F007FF87F01FFFE7F03FFFFFF07FFFFFF0FFE07FF -0FF001FF1FE000FF3FC0007F3F80007F7F80007F7F00007F7F00007F7F00007FFE00007FFE0000 -7FFE00007FFE00007FFE00007FFE00007FFE00007FFE00007FFE00007F7F00007F7F00007F7F00 -007F7F80007F3F80007F3FC000FF1FE001FF1FF003FF0FFC0FFF07FFFFFF03FFFF7F01FFFC7F00 -7FF87F001FC07F203C7DBB2A>I<0007F800003FFE0000FFFF8001FFFFC003FFFFE007FC1FF00F -F007F01FE003F81FC001F83F8000FC3F8000FC7F0000FC7F00007E7FFFFFFEFFFFFFFEFFFFFFFE -FFFFFFFEFFFFFFFEFE000000FE000000FE000000FE000000FE0000007E0000007F0000007F0000 -003F8000003F8000001FC000041FE0001C0FF8007C07FE03FC03FFFFFC01FFFFF8007FFFE0001F -FF800003FC001F257EA424>I<0000FFC00003FFC00007FFC0001FFFC0003FFFC0003F8040007F -000000FE000000FC000000FC000001FC000001FC000001FC000001FC000001FC000001FC000001 -FC000001FC000001FC000001FC000001FC000001FC000001FC0000FFFFFC00FFFFFC00FFFFFC00 -FFFFFC00FFFFFC0001FC000001FC000001FC000001FC000001FC000001FC000001FC000001FC00 -0001FC000001FC000001FC000001FC000001FC000001FC000001FC000001FC000001FC000001FC -000001FC000001FC000001FC000001FC000001FC000001FC000001FC000001FC000001FC000001 -FC000001FC000001FC000001FC000001FC00001A3C7FBB19>I<001FE007E0007FF83FE001FFFF -FFF003FFFFFFF007FFFFFFF00FF87FE0000FE01FC0001FC00FE0001FC00FE0003F8007F0003F80 -07F0003F8007F0003F8007F0003F8007F0003F8007F0003F8007F0001F8007E0001FC00FE0001F -C00FE0000FE01FC0000FF87FC00007FFFF80000FFFFF00001FFFFE00001E7FF800001E1FE00000 -3E000000003E000000003E000000003F000000001F800000001FFFFF00001FFFFFF0000FFFFFFC -000FFFFFFE000FFFFFFF001FFFFFFF803FFFFFFFC03F8000FFC07E00001FC07E00000FE0FC0000 -07E0FC000007E0FC000007E0FC000007E0FC000007E07E00000FC07F00001FC03FC0007F801FF8 -03FF000FFFFFFE0007FFFFFC0001FFFFF000007FFFC000000FFE000024377EA428>I<FE000000 -FE000000FE000000FE000000FE000000FE000000FE000000FE000000FE000000FE000000FE0000 -00FE000000FE000000FE000000FE000000FE000000FE000000FE000000FE000000FE000000FE00 -0000FE000000FE000000FE03FC00FE0FFF00FE3FFFC0FE7FFFE0FEFFFFE0FFF01FF0FFE00FF0FF -C007F8FF8007F8FF0003F8FF0003F8FF0003F8FE0003F8FE0003F8FE0003F8FE0003F8FE0003F8 -FE0003F8FE0003F8FE0003F8FE0003F8FE0003F8FE0003F8FE0003F8FE0003F8FE0003F8FE0003 -F8FE0003F8FE0003F8FE0003F8FE0003F8FE0003F8FE0003F8FE0003F8FE0003F8FE0003F8FE00 -03F81D3C7ABB2A>I<FEFEFEFEFEFEFE0000000000000000000000000000FEFEFEFEFEFEFEFEFE -FEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFE073A7AB914>I<FEFEFEFE -FEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFE -FEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFE073C7ABB14>108 D<FE03FC000FF000FE0FFF003FFC -00FE3FFFC0FFFF00FE7FFFE1FFFF80FEFFFFE3FFFF80FFF01FF7C07FC0FFE00FFF803FC0FFC007 -FF001FE0FF8007FE001FE0FF0003FC000FE0FF0003FC000FE0FF0003FC000FE0FE0003F8000FE0 -FE0003F8000FE0FE0003F8000FE0FE0003F8000FE0FE0003F8000FE0FE0003F8000FE0FE0003F8 -000FE0FE0003F8000FE0FE0003F8000FE0FE0003F8000FE0FE0003F8000FE0FE0003F8000FE0FE -0003F8000FE0FE0003F8000FE0FE0003F8000FE0FE0003F8000FE0FE0003F8000FE0FE0003F800 -0FE0FE0003F8000FE0FE0003F8000FE0FE0003F8000FE0FE0003F8000FE0FE0003F8000FE0FE00 -03F8000FE0FE0003F8000FE033257AA440>I<FE03FC00FE0FFF00FE3FFFC0FE7FFFE0FEFFFFE0 -FFF01FF0FFE00FF0FFC007F8FF8007F8FF0003F8FF0003F8FF0003F8FE0003F8FE0003F8FE0003 -F8FE0003F8FE0003F8FE0003F8FE0003F8FE0003F8FE0003F8FE0003F8FE0003F8FE0003F8FE00 -03F8FE0003F8FE0003F8FE0003F8FE0003F8FE0003F8FE0003F8FE0003F8FE0003F8FE0003F8FE -0003F8FE0003F8FE0003F81D257AA42A>I<0007FC0000001FFF0000007FFFC00001FFFFF00003 -FFFFF80007FC07FC000FF001FE001FE000FF001FC0007F003F80003F803F80003F807F00001FC0 -7F00001FC07E00000FC0FE00000FE0FE00000FE0FE00000FE0FE00000FE0FE00000FE0FE00000F -E0FE00000FE0FE00000FE0FE00000FE07F00001FC07F00001FC07F00001FC03F80003F803F8000 -3F801FC0007F001FE000FF000FF001FE0007FE0FFC0003FFFFF80001FFFFF000007FFFC000001F -FF00000007FC000023257EA428>I<FE03FC00FE1FFF00FE7FFF80FEFFFFC0FFFFFFE0FFF03FF0 -FFC00FF8FF0007F8FE0003FCFE0001FCFE0001FEFE0000FEFE0000FEFE0000FFFE00007FFE0000 -7FFE00007FFE00007FFE00007FFE00007FFE00007FFE00007FFE00007FFE0000FEFE0000FEFE00 -01FEFE0001FCFE0003FCFF0003FCFF0007F8FF801FF0FFE07FE0FFFFFFC0FEFFFF80FE7FFF00FE -1FFE00FE07F000FE000000FE000000FE000000FE000000FE000000FE000000FE000000FE000000 -FE000000FE000000FE000000FE000000FE000000FE000000FE000000FE000000FE00000020367A -A42A>I<FE00F0FE07F0FE1FF0FE3FF0FE7FF0FEFFF0FFFF00FFF800FFF000FFE000FFC000FF80 -00FF8000FF0000FF0000FE0000FE0000FE0000FE0000FE0000FE0000FE0000FE0000FE0000FE00 -00FE0000FE0000FE0000FE0000FE0000FE0000FE0000FE0000FE0000FE0000FE0000FE00001425 -7AA41C>114 D<007FC00003FFFC0007FFFF000FFFFF801FFFFF803F803F803F000F007E000300 -7E0000007E0000007E0000007E0000007F0000007FC000003FFC00003FFFC0001FFFF0000FFFFC -0007FFFE0001FFFF00007FFF000007FF8000007F8000001FC000001FC000000FC000000FC04000 -0FC060000FC078001F80FC001F80FF807F80FFFFFF007FFFFE001FFFFC0007FFF000007FC0001A -257EA41F>I<01FC000001FC000001FC000001FC000001FC000001FC000001FC000001FC000001 -FC000001FC000001FC0000FFFFFE00FFFFFE00FFFFFE00FFFFFE00FFFFFE0001FC000001FC0000 -01FC000001FC000001FC000001FC000001FC000001FC000001FC000001FC000001FC000001FC00 -0001FC000001FC000001FC000001FC000001FC000001FC000001FC000001FC000001FC000001FC -000001FC000001FC000001FC010001FE030001FE0F8000FFFF8000FFFF80007FFE00003FF80000 -1FC00019307FAF1D>I<FE0003F8FE0003F8FE0003F8FE0003F8FE0003F8FE0003F8FE0003F8FE -0003F8FE0003F8FE0003F8FE0003F8FE0003F8FE0003F8FE0003F8FE0003F8FE0003F8FE0003F8 -FE0003F8FE0003F8FE0003F8FE0003F8FE0003F8FE0003F8FE0003F8FE0003F8FE0003F8FE0003 -F8FE0007F8FE0007F8FE000FF8FF001FF8FF807FF87FFFFFF87FFFFBF83FFFE3F81FFF83F807FC -03F81D257AA42A>I<7F80003FC03FC0003FC03FC0007F801FE000FF000FF001FE0007F801FC00 -03F803FC0003FC07F80001FE07F00000FF0FE000007F1FE000003FBFC000003FFF8000001FFF00 -00000FFF00000007FE00000007FC00000003F800000003F800000007FC00000007FE0000000FFF -0000001FFF8000003F9F8000003F1FC000007F0FE00000FE07F00001FC07F80003FC03F80003F8 -01FC0007F001FE000FF000FF001FE0007F001FC0003F803FC0003FC07F80001FE0FF00000FF024 -2580A425>120 D E end -%%EndProlog -%%BeginSetup -%%Feature: *Resolution 300 -TeXDict begin @letter /letter where {pop letter} if -%%EndSetup -%%Page: 1 1 -bop -5 173 a Fk(The)27 b(design)f(and)g(implementation)e(of)-5 -255 y(a)j(language)f(fo)n(r)h(extending)e(applications)-5 370 -y Fj(Luiz)18 b(Henrique)e(de)i(Figueiredo,)f(R)o(ober)m(to)f(Ier)o -(usalimschy,)g(W)-6 b(aldemar)17 b(Celes)g(Filho)-5 454 y Fi(T)l(eCGraf{Grup) -q(o)f(de)g(T)l(ecnologia)g(em)g(Computa\030)-22 b(c~)d(ao)16 -b(Gr\023)-25 b(a\014ca,)15 b(ITS,)h(PUC-Rio)-5 514 y(Pr)o(\023)-24 -b(edio)16 b(do)g(ITS,)g(Rua)g(Marqu)o(^)-24 b(es)15 b(de)i(S~)-25 -b(ao)16 b(Vicen)o(te)h(225,)f(22453-900)f(Rio)h(de)h(Janeiro,)e(RJ,)h(Brasil) --5 574 y Fh({lhf,roberto,celes}@ic)q(ad.puc)q(-rio.br)-5 779 -y Fg(Abstract.)26 b Ff(W)l(e)16 b(describ)q(e)g(the)h(design)e(and)h(the)h -(implemen)o(tation)d(of)j Fe(Lua)p Ff(,)f(a)g(simple,)f(y)o(et)i(p)q(o)o(w)o -(erful,)-5 839 y(language)i(for)g(extending)g(applications.)29 -b(Although)19 b Fe(Lua)g Ff(is)g(a)h(pro)q(cedural)d(language,)i(it)h(has)f -(data)-5 899 y(description)11 b(facilities,)h(and)g(has)f(b)q(een)h(extensiv) -o(ely)g(used)f(in)h(pro)q(duction)f(for)g(sev)o(eral)h(tasks)f(including)-5 -959 y(user)i(con\014guration,)g(general-purp)q(ose)e(data-en)o(try)l(,)i -(description)g(of)h(user)f(in)o(terfaces,)g(description)g(of)-5 -1019 y(application)j(ob)s(jects,)g(and)g(storage)g(of)h(structured)e -(graphical)g(meta\014les.)-5 1133 y Fg(Resumo.)26 b Ff(Descrev)o(emos)11 -b(o)g(pro)s(jeto)h(e)f(a)h(implemen)o(ta\030)-22 b(c~)d(ao)10 -b(de)i Fe(Lua)p Ff(,)g(uma)f(linguagem)f(simples,)h(p)q(or)o(\023)-24 -b(em)-5 1193 y(p)q(o)q(derosa,)17 b(para)f(extens~)-25 b(ao)18 -b(de)f(aplica\030)-22 b(c~)d(oes.)24 b(Em)o(b)q(ora)16 b(pro)q(cedural,)f -Fe(Lua)j Ff(con)o(t)o(\023)-24 b(em)16 b(mecanismos)g(para)-5 -1253 y(descri\030)-22 b(c~)d(ao)20 b(de)g(dados)f(e)i(tem)g(sido)e(largamen)o -(te)g(utilizada)h(em)g(pro)q(du\030)-22 b(c~)d(ao)19 b(para)h -(con\014gura\030)-22 b(c~)d(ao)19 b(p)q(elo)-5 1313 y(usu\023)-25 -b(ario,)24 b(en)o(trada)e(de)i(dados,)g(descri\030)-22 b(c~)d(ao)23 -b(de)h(in)o(terfaces,)g(descri\030)-22 b(c~)d(ao)23 b(de)h(ob)s(jetos)f(da)h -(aplica\030)-22 b(c~)d(ao)23 b(e)-5 1373 y(armazenagem)15 b(de)i -Fd(meta\014les)f Ff(gr\023)-25 b(a\014cos)15 b(estruturados.)-5 -1553 y Fg(Intro)r(duction)-5 1638 y Ff(There)k(is)h(increasing)e(demand)g -(for)i(customizable)e(applications.)30 b(As)20 b(applications)e(b)q(ecame)i -(more)-5 1698 y(complex,)k(customization)e(with)g(simple)g(parameters)f(b)q -(ecame)i(imp)q(ossible:)32 b(users)22 b(no)o(w)f(w)o(an)o(t)h(to)-5 -1758 y(mak)o(e)14 b(con\014guration)e(decisions)g(at)i(execution)g(time;)h -(users)d(also)h(w)o(an)o(t)g(to)i(write)e(macros)g(and)g(scripts)-5 -1817 y(to)18 b(increase)d(pro)q(ductivit)o(y)i(\(Ry)o(an)f(1990\).)24 -b(Therefore,)16 b(no)o(w)o(ada)o(ys,)e(larger)i(applications)f(almost)i(in-) --5 1877 y(v)m(ariably)j(carry)g(their)h(o)o(wn)f(con\014guration)e(or)i -(scripting)g(languages)f(for)h(end-user)f(programming.)-5 1937 -y(These)g(languages)f(are)h(usually)f(simple,)g(but)h(eac)o(h)g(has)f(its)h -(o)o(wn)g(particular)f(syn)o(tax.)29 b(As)19 b(a)h(conse-)-5 -1997 y(quence,)e(users)f(ha)o(v)o(e)g(to)h(learn)f(\(and)h(dev)o(elop)q(ers)f -(ha)o(v)o(e)g(to)h(design,)f(implemen)o(t)g(and)g(debug\))g(a)h(new)-5 -2056 y(language)e(for)g(eac)o(h)g(application.)-5 2141 y(Our)c(\014rst)g(exp) -q(erience)h(with)g(a)g(proprietary)e(scripting)g(language)h(arose)g(in)g(a)h -(data-en)o(try)f(application,)-5 2201 y(for)23 b(whic)o(h)f(a)h(v)o(ery)g -(simple)f(declarativ)o(e)h(language)f(w)o(as)g(designed)g -(\(Figueiredo{Souza{Gattass{)-5 2261 y(Co)q(elho)h(1992\).)41 -b(\(Data-en)o(try)23 b(is)f(an)h(area)f(where)h(user)f(de\014ned)g(actions)g -(are)g(esp)q(ecially)h(needed)-5 2320 y(b)q(ecause)13 b(pre-co)q(ded)e(v)m -(alidation)i(tests)g(can)f(hardly)g(b)q(e)h(adequate)f(for)h(all)f -(applications.\))20 b(When)12 b(users)-5 2380 y(b)q(egan)i(to)g(demand)f -(increasingly)f(more)h(p)q(o)o(w)o(er)g(in)g(this)g(language,)h(w)o(e)f -(decided)h(that)g(a)g(more)f(general)-5 2440 y(approac)o(h)i(w)o(as)h(needed) -h(and)f(started)g(the)h(design)f(of)h(a)g(general-purp)q(ose)d(em)o(b)q -(edded)i(language.)21 b(A)o(t)-5 2500 y(the)16 b(same)f(time,)g(another)g -(declarativ)o(e)g(language)f(w)o(as)h(b)q(eing)g(added)g(to)h(a)f(di\013eren) -o(t)g(application)f(for)-5 2560 y(data)h(description.)k(Therefore,)14 -b(w)o(e)h(decided)e(to)i(merge)f(the)h(t)o(w)o(o)f(languages)f(in)o(to)h -(one,)g(and)g(designed)-5 2619 y Fe(Lua)19 b Ff(to)g(b)q(e)g(a)g(pro)q -(cedural)f(language)g(with)h(data)f(description)g(facilities.)29 -b Fe(Lua)18 b Ff(has)h(since)f(outgro)o(wn)-5 2679 y(its)f(original)e(ro)q -(ots)h(and)g(is)g(b)q(eing)g(used)g(in)g(sev)o(eral)g(other)g(industrial)f -(pro)s(jects.)-5 2764 y(This)h(pap)q(er)g(describ)q(es)f(the)i(design)f -(decisions)f(and)h(the)g(details)g(of)h(our)f(implemen)o(tation)e(of)j -Fe(Lua)p Ff(.)-5 2883 y Fc(T)l(eCGraf/ICAD)1674 b(1)p eop -%%Page: 2 2 -bop -5 163 a Fg(Extension)20 b(languages)-5 248 y Ff(The)d(use)g(of)g -(languages)f(for)g(extending)h(applications)f(is)g(no)o(w)h(recognized)f(as)g -(an)h(imp)q(ortan)o(t)f(design)-5 308 y(tec)o(hnique:)k(it)13 -b(allo)o(ws)f(a)h(cleaner)f(design)g(for)h(the)g(application)f(and)g(it)h -(pro)o(vides)f(con\014guration)f(b)o(y)i(the)-5 367 y(user.)26 -b(Because)18 b(most)f(extension)h(languages)f(are)g(simple,)g(sp)q(ecialized) -h(to)g(a)g(task,)h(they)f(ha)o(v)o(e)g(b)q(een)-5 427 y(called)d(\\little)h -(languages")d(\(Ben)o(tley)j(1986;)f(V)l(ald)o(\023)-24 b(es)15 -b(1991\),)g(in)g(con)o(trast)f(to)i(the)f(\\big",)g(mainstream)-5 -487 y(languages,)k(in)h(whic)o(h)e(applications)h(are)g(written.)32 -b(This)19 b(distinction)f(is)i(not)f(so)h(sharp)e(no)o(w)o(ada)o(ys,)-5 -547 y(since)f(a)g(ma)s(jor)f(part)g(of)h(sev)o(eral)g(applications)e(is)i -(actually)g(written)g(using)f(an)g(extension)h(language.)-5 -607 y(Extension)f(languages)g(come)g(in)g(sev)o(eral)g(\015a)o(v)o(ors:)-5 -741 y Fb(\017)25 b Fi(con\014guration)d(languages)r Ff(:)34 -b(for)23 b(selecting)g(preferences,)g(usually)g(implemen)o(ted)e(as)i -(parameter)45 801 y(lists)13 b(in)f(command)g(lines)g(or)g(as)h(v)m -(ariable-v)m(alue)f(pairs)g(read)g(from)g(con\014guration)g(\014les)g -(\(e.g.,)i(DOS's)45 861 y Fh(config.sys)p Ff(,)k(MS-Windo)o(ws')c -Fh(.ini)j Ff(\014les,)f(X11)h(resource)e(\014les,)h(Motif)t('s)g(UIL)h -(\014les\);)-5 930 y Fb(\017)25 b Fi(scripting)19 b(languages)r -Ff(:)29 b(for)20 b(automating)f(tasks,)i(with)g(limited)e(\015o)o(w)h(con)o -(trol,)g(suc)o(h)g(as)g(the)g(ones)45 990 y(used)c(in)g(DOS's)g(batc)o(h)f -(\014les)h(or)g(in)h(the)f(v)m(arious)g(Unix)h(shells;)-5 1060 -y Fb(\017)25 b Fi(macro)15 b(languages)r Ff(:)21 b(also)15 -b(for)h(automating)g(tasks,)g(but)g(usually)f(only)h(as)f(a)i(sequence)f(of)g -(primitiv)o(e)45 1120 y(op)q(erations,)f(with)i(no)f(\015o)o(w)g(con)o(trol;) --5 1190 y Fb(\017)25 b Fi(em)o(b)q(edded)20 b(languages)r Ff(:)29 -b(for)21 b(extending)f(applications)f(with)i(user)f(de\014ned)g(functions)g -(based)g(on)45 1249 y(primitiv)o(es)h(pro)o(vided)g(b)o(y)h(the)g -(applications.)38 b(These)22 b(languages)f(are)h(usually)g(quite)g(p)q(o)o(w) -o(erful,)45 1309 y(b)q(eing)16 b(simpli\014ed)f(v)m(arian)o(ts)g(of)i -(mainstream)e(programming)e(languages)i(suc)o(h)h(as)g(LISP)g(and)g(C.)-5 -1459 y(What)21 b(mak)o(es)f(em)o(b)q(edded)f(languages)g(di\013eren)o(t)h -(from)g(standalone)f(languages)g(is)h(that)h(em)o(b)q(edded)-5 -1518 y(languages)c(only)i(w)o(ork)e Fd(emb)m(e)m(dde)m(d)k -Ff(in)d(a)h(host)f(clien)o(t,)g(called)g(the)h Fd(emb)m(e)m(dding)h -Ff(program.)26 b(Moreo)o(v)o(er,)-5 1578 y(the)e(host)e(program)f(can)i -(usually)f(pro)o(vide)g(domain-sp)q(eci\014c)f(extensions)h(to)i(the)f(em)o -(b)q(edded)f(lan-)-5 1638 y(guage,)16 b(th)o(us)f(creating)h(a)g(v)o(ersion)f -(of)i(the)f(em)o(b)q(edded)f(language)h(customized)f(for)h(its)g(o)o(wn)g -(purp)q(oses,)-5 1698 y(p)q(ossibly)g(b)o(y)h(pro)o(viding)f(higher)g(lev)o -(el)h(abstractions.)22 b(F)l(or)16 b(this,)h(an)g(em)o(b)q(edded)f(language)g -(has)h(b)q(oth)-5 1758 y(a)h(syn)o(tax)f(for)h(its)f(o)o(wn)g(programs)e(and) -i(an)h(application)e(program)g(in)o(terface)h(\(API\))i(for)e(in)o(terfacing) --5 1817 y(with)i(hosts.)30 b(Th)o(us,)18 b(unlik)o(e)g(simpler)g(extension)h -(languages,)f(whic)o(h)h(are)f(used)h(to)g(supply)f(parame-)-5 -1877 y(ter)i(v)m(alues)g(and)f(sequences)h(of)g(actions)f(to)i(hosts,)f -(there)f(is)h(a)g(t)o(w)o(o-w)o(a)o(y)e(comm)o(unication)g(b)q(et)o(w)o(een) --5 1937 y(em)o(b)q(edded)d(languages)f(and)i(host)f(programs.)20 -b(Note)c(that)h(the)f(application)e(programmer)g(in)o(terfaces)-5 -1997 y(with)j(an)g(em)o(b)q(edded)f(language)g(in)h(the)g(mainstream)f -(language)g(used)g(for)h(host)g(programs,)e(whereas)-5 2056 -y(the)i(user)f(in)o(terfaces)f(with)i(the)g(application)e(using)g(solely)i -(the)f(em)o(b)q(edded)g(language.)-5 2141 y(LISP)e(has)f(alw)o(a)o(ys)f(b)q -(een)i(a)g(p)q(opular)e(c)o(hoice)h(for)h(extension)f(languages,)g(for)g(its) -h(simple,)f(easily)g(parsed)-5 2201 y(syn)o(tax)j(and)g(built-in)f -(extensibilit)o(y)h(\(Bec)o(kman)g(1991;)g(Nahab)q(o)q(o\).)22 -b(F)l(or)16 b(instance,)f(a)i(ma)s(jor)e(part)h(of)-5 2261 -y(Emacs)h(is)g(actually)g(written)h(in)f(its)g(o)o(wn)g(v)m(arian)o(t)g(of)h -(LISP;)f(sev)o(eral)f(other)h(text)i(editors)e(follo)o(w)g(the)-5 -2320 y(same)e(path.)22 b(Ho)o(w)o(ev)o(er,)15 b(LISP)h(cannot)f(b)q(e)h -(called)g(user-friendly)e(when)h(it)h(comes)g(to)g(customization.)-5 -2380 y(Neither)f(can)f(C)g(and)g(the)g(shell)g(languages;)f(the)i(latter)f -(ev)o(en)h(ha)o(v)o(e)e(a)i(more)e(complicated,)h(unfamiliar)-5 -2440 y(syn)o(tax.)-5 2525 y(One)g(of)g(the)h(fundamen)o(tal)d(decisions)h -(made)g(in)h(the)g(design)f(of)h Fe(Lua)g Ff(w)o(as)f(that)i(it)f(should)f -(ha)o(v)o(e)g(a)h(clean)-5 2584 y(but)d(familiar)f(syn)o(tax:)20 -b(w)o(e)11 b(quic)o(kly)g(settled)h(for)f(a)g(simpli\014ed)f(P)o(ascal-lik)o -(e)f(syn)o(tax.)20 b(W)l(e)12 b(a)o(v)o(oided)e(a)i(syn-)-5 -2644 y(tax)j(based)f(on)g(LISP)g(or)g(C)h(b)q(ecause)f(it)h(could)f(b)q(e)g -(discouraging)f(to)h(outsiders)f(or)h(non-programmer)o(s.)-5 -2704 y(Th)o(us,)22 b Fe(Lua)f Ff(is)h(primarily)d(a)j(pro)q(cedural)e -(language.)37 b(Nev)o(ertheless,)22 b(as)g(already)f(men)o(tioned,)g -Fe(Lua)-5 2764 y Ff(acquired)16 b(data)h(description)e(facilities)h(to)h -(increase)e(its)i(expression)e(p)q(o)o(w)o(er.)-5 2883 y Fc(T)l(eCGraf/ICAD) -1674 b(2)p eop -%%Page: 3 3 -bop -5 163 a Fg(Lua)19 b(concepts)-5 248 y Fe(Lua)c Ff(is)g(a)g(general)g -(purp)q(ose)f(em)o(b)q(edded)g(programming)e(language)i(designed)h(to)g(supp) -q(ort)f(pro)q(cedural)-5 308 y(programming)k(with)i(data)h(description)e -(facilities.)34 b(Being)21 b(an)f(em)o(b)q(edded)f(language,)i -Fe(Lua)f Ff(has)g(no)-5 367 y(notion)e(of)g(a)h(\\main")e(program;)g(it)h -(only)g(w)o(orks)f(em)o(b)q(edded)g(in)h(a)h(host)e(clien)o(t)h(\()p -Fe(Lua)h Ff(is)f(pro)o(vided)e(as)-5 427 y(a)i(library)e(of)i(C)f(functions)g -(to)h(b)q(e)g(link)o(ed)f(to)h(host)f(applications\).)24 b(The)17 -b(host)h(can)f(in)o(v)o(ok)o(e)g(functions)-5 487 y(to)k(execute)h(a)f(piece) -g(of)g(co)q(de)g(in)g Fe(Lua)p Ff(,)g(can)g(write)f(and)g(read)h -Fe(Lua)f Ff(v)m(ariables,)h(and)f(can)h(register)f(C)-5 547 -y(functions)f(to)h(b)q(e)g(called)g(b)o(y)f Fe(Lua)g Ff(co)q(de.)32 -b(With)20 b(registered)f(C)h(functions,)f Fe(Lua)h Ff(can)f(b)q(e)h(augmen)o -(ted)-5 607 y(to)h(cop)q(e)f(with)g(rather)g(di\013eren)o(t)f(domains,)g(th)o -(us)g(creating)h(customized)f(programming)e(languages)-5 666 -y(sharing)e(a)i(syn)o(tactical)f(framew)o(ork)f(\(Bec)o(kman)i(1991\).)-5 -751 y(This)23 b(section)g(con)o(tains)f(a)h(brief)g(description)f(of)h(the)h -(main)e(concepts)h(in)g Fe(Lua)p Ff(.)42 b(Some)23 b(examples)-5 -811 y(of)e(actual)f(co)q(de)g(are)g(included,)f(to)i(giv)o(e)f(a)g(\015a)o(v) -o(or)f(of)h(the)h(language.)31 b(A)21 b(precise)e(de\014nition)g(of)i(the)-5 -871 y(language)16 b(can)g(b)q(e)h(found)f(in)g(its)g(reference)h(man)o(ual)d -(\(Ierusalimsc)o(h)o(y{Figu)o(eiredo{Celes)f(1994\).)-5 990 -y Fe(Syntax)-5 1075 y Ff(As)g(men)o(tioned)d(b)q(efore,)j(w)o(e)f(explicitly) -h(designed)e Fe(Lua)h Ff(to)g(ha)o(v)o(e)g(a)g(simple,)g(familiar)f(syn)o -(tax.)20 b(As)12 b(a)g(con-)-5 1135 y(sequence,)17 b Fe(Lua)f -Ff(supp)q(orts)g(an)g(almost)g(con)o(v)o(en)o(tional)f(set)i(of)g(statemen)o -(ts,)f(with)h(implicit,)f(but)g(expli-)-5 1194 y(citly)g(terminated,)f(blo)q -(c)o(k)h(structure.)21 b(The)15 b(con)o(v)o(en)o(tional)f(statemen)o(ts)h -(include)g(simple)f(assignmen)o(t;)-5 1254 y(con)o(trol)f(structures)g(suc)o -(h)g(as)h Fh(while-do-end)p Ff(,)i Fh(repeat-until)p Ff(,)g -Fh(if-then-elseif-else-en)q(d)p Ff(;)h(and)-5 1314 y(function)22 -b(calls.)40 b(Non-con)o(v)o(en)o(tional)20 b(statemen)o(ts)i(include)g(m)o -(ultiple)f(assignmen)o(t;)j(lo)q(cal)e(v)m(ariable)-5 1374 -y(declarations,)17 b(whic)o(h)g(can)h(b)q(e)g(placed)f(an)o(ywhere)g(inside)g -(a)h(blo)q(c)o(k;)g(and)f(table)h(constructors,)f(whic)o(h)-5 -1434 y(ma)o(y)f(con)o(tain)g(user)f(de\014ned)h(v)m(alidation)g(functions)g -(\(see)g(b)q(elo)o(w\).)22 b(Moreo)o(v)o(er,)15 b(functions)h(in)g -Fe(Lua)g Ff(can)-5 1493 y(tak)o(e)j(a)g(v)m(ariable)f(n)o(um)o(b)q(er)e(of)j -(parameters)e(and)h(can)g(return)g(man)o(y)f(v)m(alues.)28 -b(This)18 b(a)o(v)o(oids)f(the)i(need)-5 1553 y(for)e(passing)d(parameters)h -(b)o(y)i(reference)f(when)g(more)f(than)i(one)f(result)g(need)g(to)h(b)q(e)g -(returned.)-5 1673 y Fe(Environment)e(and)h(mo)q(dules)-5 1757 -y Ff(All)e(statemen)o(ts)e(in)h Fe(Lua)g Ff(are)g(executed)h(in)f(a)g(global) -g(en)o(vironmen)o(t.)19 b(This)12 b(en)o(vironmen)o(t,)g(whic)o(h)g(k)o(eeps) --5 1817 y(all)j(global)f(v)m(ariables)g(and)g(functions,)g(is)h(initialized)f -(at)h(the)h(b)q(eginning)d(of)i(the)h(em)o(b)q(edding)d(program)-5 -1877 y(and)k(p)q(ersists)f(un)o(til)g(its)h(end.)23 b(The)17 -b(global)f(en)o(vironmen)o(t)f(can)i(b)q(e)g(manipulated)f(b)o(y)g -Fe(Lua)h Ff(co)q(de)h(or)e(b)o(y)-5 1937 y(the)i(em)o(b)q(edding)e(program,)g -(whic)o(h)g(can)i(read)e(and)h(write)h(global)f(v)m(ariables)f(using)h -(functions)f(in)i(the)-5 1997 y(library)d(that)i(implemen)o(ts)e -Fe(Lua)p Ff(.)-5 2081 y(The)20 b(unit)f(of)h(execution)g(of)g -Fe(Lua)f Ff(is)h(called)f(a)h Fd(mo)m(dule)t Ff(.)31 b(A)20 -b(mo)q(dule)f(ma)o(y)g(con)o(tain)g(statemen)o(ts)g(and)-5 -2141 y(function)f(de\014nitions,)f(and)g(ma)o(y)h(b)q(e)g(in)g(a)g(\014le)g -(or)f(in)h(a)g(string)f(inside)g(the)i(host)e(program.)25 b(When)18 -b(a)-5 2201 y(mo)q(dule)g(is)f(executed,)i(\014rst)f(all)f(its)h(functions)g -(and)f(statemen)o(ts)h(are)g(compiled,)f(and)g(the)i(functions)-5 -2261 y(added)14 b(to)g(the)h(global)f(en)o(vironmen)o(t;)f(then)h(the)g -(statemen)o(ts)g(are)g(executed)h(in)f(sequen)o(tial)g(order.)20 -b(All)-5 2320 y(mo)q(di\014cations)10 b(a)h(mo)q(dule)g(e\013ects)g(on)g(the) -h(global)e(en)o(vironmen)o(t)f(p)q(ersist)i(after)g(its)g(end.)20 -b(Those)11 b(include)-5 2380 y(mo)q(di\014cations)17 b(to)h(global)f(v)m -(ariables)g(and)g(de\014nitions)g(of)h(new)g(functions)f(\(a)h(function)f -(de\014nition)g(is)-5 2440 y(actually)g(an)f(assignmen)o(t)f(to)h(a)h(global) -f(v)m(ariable;)f(see)i(b)q(elo)o(w\).)-5 2560 y Fe(Data)g(t)o(yp)q(es)f(and)g -(va)o(riables)-5 2644 y(Lua)22 b Ff(is)f(a)h(dynamically)f(t)o(yp)q(ed)h -(language:)31 b(v)m(ariables)21 b(do)h(not)f(ha)o(v)o(e)h(t)o(yp)q(es;)i -(only)e(v)m(alues)f(do.)38 b(All)-5 2704 y(v)m(alues)16 b(carry)g(their)g(o)o -(wn)g(t)o(yp)q(e.)22 b(Therefore,)16 b(there)g(are)g(no)g(t)o(yp)q(e)h -(de\014nitions)e(in)h(the)h(language.)k(The)-5 2764 y(absence)d(of)h(v)m -(ariable)f(t)o(yp)q(e)g(declarations,)g(apparen)o(tly)f(a)h(minor)f(p)q(oin)o -(t,)h(is)g(actually)h(an)f(imp)q(ortan)o(t)-5 2883 y Fc(T)l(eCGraf/ICAD)1674 -b(3)p eop -%%Page: 4 4 -bop -5 163 a Ff(factor)20 b(in)f(simplifying)f(the)i(language;)g(it)g(is)f -(frequen)o(tly)h(presen)o(ted)e(as)i(a)f(ma)s(jor)g(feature)g(in)h(man)o(y)-5 -223 y(v)m(arian)o(ts)14 b(of)g(t)o(yp)q(ed)h(languages)e(mo)q(di\014ed)h(to)h -(b)q(e)f(used)g(as)g(extension)g(languages.)20 b(Moreo)o(v)o(er,)13 -b Fe(Lua)h Ff(has)-5 283 y(garbage)g(collection:)20 b(it)15 -b(k)o(eeps)f(trac)o(k)g(of)g(whic)o(h)g(v)m(alues)g(are)g(b)q(eing)g(used)f -(and)h(discards)e(the)j(ones)e(that)-5 343 y(are)k(not.)23 -b(This)17 b(a)o(v)o(oids)e(the)j(need)e(for)h(explicit)g(managing)f(memory)g -(allo)q(cation,)h(a)g(ma)s(jor)e(source)i(of)-5 402 y(programming)d(errors.) -20 b(There)c(are)g(sev)o(en)g(basic)g(data)h(t)o(yp)q(es)f(in)g -Fe(Lua)p Ff(:)-5 492 y Fb(\017)25 b Fi(nil)r Ff(:)c(the)c(t)o(yp)q(e)g(of)g -(a)f(single)g(v)m(alue)h(called)f Fh(nil)p Ff(;)-5 552 y Fb(\017)25 -b Fi(n)o(um)o(b)q(er)t Ff(:)19 b(\015oating)d(p)q(oin)o(t)g(n)o(um)o(b)q -(ers;)-5 612 y Fb(\017)25 b Fi(string)t Ff(:)c(arra)o(ys)15 -b(of)i(c)o(haracters;)-5 671 y Fb(\017)25 b Fi(function)p Ff(:)d(user)15 -b(de\014ned)h(functions;)-5 731 y Fb(\017)25 b Fi(Cfunction)p -Ff(:)d(functions)15 b(pro)o(vided)g(b)o(y)h(the)h(host)f(program;)-5 -791 y Fb(\017)25 b Fi(userdata)p Ff(:)c(p)q(oin)o(ters)15 b(to)i(host)f -(data;)-5 851 y Fb(\017)25 b Fi(table)s Ff(:)d(asso)q(ciativ)o(e)16 -b(arra)o(ys.)-5 966 y Fe(Lua)24 b Ff(pro)o(vides)f(some)g(automatic)h(t)o(yp) -q(e)h(con)o(v)o(ersions.)42 b(A)25 b(string)e(taking)h(part)g(in)g(an)f -(arithmetic)-5 1025 y(op)q(eration)d(is)g(con)o(v)o(erted)g(to)g(a)h(n)o(um)o -(b)q(er,)e(if)h(p)q(ossible.)33 b(Con)o(v)o(ersely)l(,)19 b(whenev)o(er)h(a)g -(n)o(um)o(b)q(er)f(is)h(used)-5 1085 y(when)g(a)g(string)f(is)h(exp)q(ected,) -i(that)e(n)o(um)o(b)q(er)e(is)i(con)o(v)o(erted)f(to)h(a)g(string.)32 -b(This)19 b(co)q(ercion)h(is)g(useful)-5 1145 y(b)q(ecause)d(it)f -(simpli\014es)f(programs)f(and)i(a)o(v)o(oids)f(the)i(need)f(for)g(explicit)h -(con)o(v)o(ersion)e(functions.)-5 1230 y(Global)h(v)m(ariables)f(do)h(not)h -(need)f(declaration;)f(only)h(lo)q(cal)h(v)m(ariables)e(do.)21 -b(An)o(y)c(v)m(ariable)f(is)g(assumed)-5 1289 y(to)24 b(b)q(e)f(global)f -(unless)g(explicitly)h(declared)f(lo)q(cal.)42 b(Lo)q(cal)23 -b(v)m(ariable)g(declarations)e(can)i(b)q(e)g(placed)-5 1349 -y(an)o(ywhere)c(inside)f(a)i(blo)q(c)o(k.)31 b(Therefore,)20 -b(b)q(ecause)f(only)h(lo)q(cal)f(v)m(ariables)g(are)g(declared,)h(and)f -(these)-5 1409 y(declarations)h(can)h(b)q(e)g(made)f(close)h(to)g(the)h(use)e -(of)i(the)f(v)m(ariable,)g(it)g(is)g(usually)f(simple)g(to)h(decide)-5 -1469 y(whether)16 b(a)h(giv)o(en)f(v)m(ariable)g(is)g(lo)q(cal)h(or)f -(global.)-5 1553 y(Before)j(the)g(\014rst)e(assignmen)o(t,)g(the)i(v)m(alue)g -(of)f(a)h(v)m(ariable)f(is)g Fh(nil)p Ff(.)28 b(Therefore,)18 -b(there)g(are)g(no)g(unini-)-5 1613 y(tialized)h(v)m(ariables)g(in)g -Fe(Lua)p Ff(,)g(another)g(ma)s(jor)f(source)g(of)i(programming)c(errors.)28 -b(Nev)o(ertheless,)20 b(the)-5 1673 y(only)f(v)m(alid)f(op)q(erations)g(on)h -Fh(nil)g Ff(are)f(assignmen)o(t)f(and)h(equalit)o(y)h(test)g(\(the)h(main)d -(prop)q(ert)o(y)h(of)h Fh(nil)-5 1733 y Ff(is)f(to)h(b)q(e)g(di\013eren)o(t)e -(from)h(an)o(y)g(other)g(v)m(alue\).)28 b(Therefore,)18 b(using)f(an)h -(\\uninitialized")f(v)m(ariable)h(in)g(a)-5 1792 y(con)o(text)k(where)f(an)g -(\\actual")g(v)m(alue)g(is)g(needed)f(\(e.g.,)j(an)e(arithmetic)f -(expression\))g(results)g(in)h(an)-5 1852 y(execution)h(error,)g(alerting)f -(the)h(programmer)c(that)k(the)g(v)m(ariable)g(w)o(as)e(not)i(prop)q(erly)f -(initialized.)-5 1912 y(Th)o(us,)c(the)g(purp)q(ose)f(of)i(automatically)f -(initializing)g(v)m(ariables)f(with)h Fh(nil)i Ff(is)e(not)g(to)h(encourage)f -(the)-5 1972 y(programmer)h(to)i(a)o(v)o(oid)g(initializing)f(v)m(ariables,)h -(but)g(rather)f(to)i(enable)e Fe(Lua)h Ff(to)h(signal)e(the)i(use)f(of)-5 -2032 y(actually)d(uninitialized)e(v)m(ariables.)-5 2116 y(F)l(unctions)d(are) -i(considered)e(\014rst-class)g(v)m(alues)h(in)h Fe(Lua)p Ff(:)20 -b(they)14 b(can)g(b)q(e)g(stored)f(in)g(v)m(ariables,)h(passed)e(as)-5 -2176 y(argumen)o(ts)k(to)i(other)g(functions)f(and)g(returned)g(as)g -(results.)25 b(When)17 b(a)h(function)g(in)f Fe(Lua)h Ff(is)f(de\014ned,)-5 -2236 y(its)e(b)q(o)q(dy)g(is)f(compiled)f(and)h(stored)g(in)g(a)g(global)g(v) -m(ariable)g(with)g(the)h(giv)o(en)f(name.)20 b Fe(Lua)15 b -Ff(can)f(call)g(\(and)-5 2296 y(manipulate\))i(functions)g(written)g(in)g(b)q -(oth)h Fe(Lua)f Ff(and)g(C;)g(the)h(latter)g(ha)o(v)o(e)f(t)o(yp)q(e)h -Fd(Cfunction)t Ff(.)-5 2380 y(The)j(t)o(yp)q(e)g Fd(user)m(data)h -Ff(is)e(pro)o(vided)f(to)i(allo)o(w)f(arbitrary)f(\()p Fh(void*)p -Ff(\))k(C)d(p)q(oin)o(ters)g(to)h(b)q(e)g(stored)f(in)g Fe(Lua)-5 -2440 y Ff(v)m(ariables;)d(its)g(only)g(v)m(alid)h(op)q(erations)e(in)i -Fe(Lua)f Ff(are)g(assignmen)o(t)e(and)i(equalit)o(y)h(test.)-5 -2525 y(The)d(t)o(yp)q(e)g Fd(table)g Ff(implemen)o(ts)e(asso)q(ciativ)o(e)h -(arra)o(ys,)g(that)h(is,)g(arra)o(ys)e(that)j(can)e(b)q(e)i(indexed)e(with)h -(b)q(oth)-5 2584 y(n)o(um)o(b)q(ers)20 b(and)h(strings.)37 -b(Therefore,)23 b(this)f(t)o(yp)q(e)g(ma)o(y)g(b)q(e)g(used)f(not)i(only)e -(to)i(represen)o(t)d(ordinary)-5 2644 y(arra)o(ys,)j(but)g(also)g(sym)o(b)q -(ol)f(tables,)i(sets,)h(records,)e(etc.)43 b(T)l(o)23 b(represen)o(t)e(a)j -(record,)f Fe(Lua)g Ff(uses)g(the)-5 2704 y(\014eld)15 b(name)g(as)h(an)f -(index.)21 b(The)16 b(language)e(supp)q(orts)h(this)g(represen)o(tation)f(b)o -(y)h(pro)o(viding)f Fh(a.name)i Ff(as)-5 2764 y(syn)o(tactic)h(sugar)e(for)h -Fh(a["name"])p Ff(.)-5 2883 y Fc(T)l(eCGraf/ICAD)1674 b(4)p -eop -%%Page: 5 5 -bop -5 163 a Ff(Asso)q(ciativ)o(e)21 b(arra)o(ys)e(are)h(a)h(p)q(o)o(w)o -(erful)e(language)h(construct;)i(man)o(y)e(algorithms)f(are)h(simpli\014ed)e -(to)-5 223 y(the)j(p)q(oin)o(t)f(of)h(trivialit)o(y)f(b)q(ecause)g(the)h -(required)e(data)i(structures)e(and)h(algorithms)e(for)j(searc)o(hing)-5 -283 y(them)13 b(are)f(pro)o(vided)f(b)o(y)h(the)h(language)f -(\(Aho{Kerninghan{W)l(ein)o(b)q(erg)o(er)e(1988;)j(Ben)o(tley)g(1988\).)21 -b(F)l(or)-5 343 y(example,)c(the)g(core)f(of)h(a)g(program)e(that)i(coun)o -(ts)f(the)h(o)q(ccurrences)f(of)h(eac)o(h)g(w)o(ord)e(in)i(a)g(text)h(can)f -(b)q(e)-5 402 y(written)195 499 y Fh(table[word])27 b(=)g(table[word])g(+)g -(1)-5 583 y Ff(without)22 b(ha)o(ving)f(to)h(searc)o(h)e(the)i(list)g(of)g(w) -o(ords.)36 b(\(Ho)o(w)o(ev)o(er,)22 b(an)g(alphab)q(etically)f(ordered)f(rep) -q(ort)-5 643 y(requires)c(some)f(real)h(w)o(ork,)g(b)q(ecause)g(the)h -(indices)f(in)g(a)g(table)h(are)f(ordered)f(arbitrarily)g(inside)h -Fe(Lua)p Ff(.\))-5 728 y(T)l(ables)g(can)g(b)q(e)h(created)g(in)f(man)o(y)f -(w)o(a)o(ys.)21 b(The)c(simplest)e(w)o(a)o(y)h(corresp)q(onds)e(to)j -(ordinary)e(arra)o(ys:)195 824 y Fh(t)26 b(=)g(@\(100\))-5 -909 y Ff(Suc)o(h)12 b(an)g(expression)f(results)g(in)h(a)h(new)f(empt)o(y)g -(table.)21 b(The)12 b(dimension)e(\(100)j(in)f(the)h(example)f(ab)q(o)o(v)o -(e\))-5 969 y(is)j(optional)g(and)g(ma)o(y)f(b)q(e)i(giv)o(en)f(as)g(a)g(hin) -o(t)g(to)h(the)f(initial)g(table)g(size.)22 b(Indep)q(enden)o(tly)14 -b(of)i(the)f(initial)-5 1028 y(dimension,)i(all)i(tables)f(in)g -Fe(Lua)h Ff(expand)f(dynamically)f(as)i(needed.)28 b(Th)o(us,)17 -b(it)i(is)f(p)q(erfectly)i(v)m(alid)e(to)-5 1088 y(refer)e(to)h -Fh(t[200])h Ff(or)e(ev)o(en)g(to)h Fh(t["day"])p Ff(.)-5 1173 -y(There)f(are)g(t)o(w)o(o)g(alternativ)o(e)g(syn)o(taxes)g(for)g(creating)g -(tables)g(without)g(explicitly)g(\014lling)f(eac)o(h)h(en)o(try:)-5 -1233 y(one)f(for)h(lists)e(\()p Fh(@[])p Ff(\))j(and)e(one)g(for)g(records)f -(\()p Fh(@{})p Ff(\).)23 b(F)l(or)14 b(instance,)h(it)h(is)f(m)o(uc)o(h)f -(easier)g(to)i(create)g(a)f(list)-5 1293 y(b)o(y)h(pro)o(viding)f(its)h -(elemen)o(ts,)g(as)g(in)195 1389 y Fh(t)26 b(=)g(@["red",)i("green",)f -("blue",)g(3])-5 1474 y Ff(than)17 b(with)f(the)h(equiv)m(alen)o(t)f -(explicit)h(co)q(de)195 1559 y Fh(t)26 b(=)g(@\(\))195 1619 -y(t[1])g(=)h("red")195 1679 y(t[2])f(=)h("green")195 1739 y(t[3])f(=)h -("blue")195 1799 y(t[4])f(=)h(3)-5 1883 y Ff(Moreo)o(v)o(er,)15 -b(it)i(is)f(p)q(ossible)f(to)i(pro)o(vide)e(user)h(functions)g(when)g -(creating)g(lists)g(and)g(records,)f(as)h(in)195 1969 y Fh(t)26 -b(=)g(@colors["red",)i("green",)g("blue",)f("yellow"])195 2029 -y(t)f(=)g(@employee{name="john)j(smith",)f(age=34})-5 2114 -y Ff(Here,)15 b Fh(colors)g Ff(and)f Fh(employee)h Ff(are)f(user)f(functions) -h(that)g(are)g(automatically)g(called)g(after)g(the)h(table)-5 -2173 y(is)i(created.)22 b(Suc)o(h)16 b(functions)g(can)h(b)q(e)g(used)f(to)h -(c)o(hec)o(k)f(\014eld)h(v)m(alues,)f(to)h(create)g(default)g(\014elds,)f(or) -g(for)-5 2233 y(an)o(y)g(other)h(side-e\013ect.)k(Th)o(us,)15 -b(the)i(co)q(de)g(for)f(the)h Fh(employee)h Ff(record)d(is)h(equiv)m(alen)o -(t)h(to:)195 2320 y Fh(t)26 b(=)g(@\(\))195 2380 y(t.name)h(=)f("john)h -(smith")195 2440 y(t.age)53 b(=)26 b(34)195 2500 y(employee\(t\))-5 -2584 y Ff(Note)17 b(that,)g(ev)o(en)f(though)f Fe(Lua)h Ff(do)q(es)g(not)g -(ha)o(v)o(e)f(t)o(yp)q(e)i(declarations,)d(the)j(p)q(ossibilit)o(y)d(of)j(ha) -o(ving)e(user)-5 2644 y(functions)c(called)g(automatically)g(after)g(table)h -(creation)e(actually)i(pro)o(vides)d Fe(Lua)i Ff(with)h(user)e(con)o(trolled) --5 2704 y Fd(typ)m(e)21 b(c)m(onstructors)p Ff(.)30 b(This)19 -b(non-con)o(v)o(en)o(tional)d(construct)j(is)f(a)h(v)o(ery)g(p)q(o)o(w)o -(erful)f(feature,)h(and)g(is)g(the)-5 2764 y(expression)c(of)i(declarativ)o -(e)f(programming)e(using)h Fe(Lua)p Ff(.)-5 2883 y Fc(T)l(eCGraf/ICAD)1674 -b(5)p eop -%%Page: 6 6 -bop -5 163 a Fe(The)17 b(application)h(p)o(rogram)c(interface)-5 -248 y Ff(The)24 b(library)e(that)i(implemen)o(ts)e Fe(Lua)h -Ff(has)g(an)g(API,)h(i.e.,)h(a)e(set)h(of)g(C)g(functions)f(for)g(in)o -(terfacing)-5 308 y Fe(Lua)h Ff(with)f(host)h(programs)d(\(there)j(are)f -(appro)o(ximately)f(30)i(suc)o(h)e(functions\).)43 b(These)24 -b(functions)-5 367 y(c)o(haracterize)16 b Fe(Lua)h Ff(as)f(an)h(em)o(b)q -(edded)f(language,)f(and)i(handle)f(the)h(follo)o(wing)e(tasks:)23 -b(executing)17 b Fe(Lua)-5 427 y Ff(co)q(de)25 b(con)o(tained)e(in)h(a)g -(\014le)g(or)g(in)g(a)g(string;)j(con)o(v)o(erting)c(v)m(alues)h(b)q(et)o(w)o -(een)g(C)g(and)f Fe(Lua)p Ff(;)28 b(reading)-5 487 y(and)17 -b(writing)g Fe(Lua)h Ff(ob)s(jects)g(con)o(tained)f(in)g(global)g(v)m -(ariables;)g(calling)g Fe(Lua)h Ff(functions;)f(registering)g(C)-5 -547 y(functions)i(to)h(b)q(e)g(called)f(b)o(y)g Fe(Lua)p Ff(,)h(including)e -(error)g(handlers.)29 b(A)20 b(simple)e Fe(Lua)h Ff(in)o(terpreter)f(can)i(b) -q(e)-5 607 y(written)d(as)f(follo)o(ws:)195 668 y Fh(#include)27 -b("lua.h")195 728 y(int)f(main\(void\))195 787 y({)221 847 -y(char)g(s[1000];)221 907 y(while)h(\(gets\(s\)\))273 967 y -(lua_dostring\(s\);)221 1026 y(return)g(0;)195 1086 y(})-5 -1171 y Ff(This)15 b(simple)f(in)o(terpreter)g(can)h(b)q(e)h(augmen)o(ted)e -(with)i(domain)e(sp)q(eci\014c)h(functions)g(written)g(in)g(C)g(and)-5 -1231 y(made)h(a)o(v)m(ailable)g(to)h Fe(Lua)g Ff(with)f(the)h(API)g(function) -f Fh(lua_register)p Ff(.)25 b(Extension)16 b(functions)g(follo)o(w)g(a)-5 -1290 y(proto)q(col)h(to)f(receiv)o(e)h(and)f(return)f(v)m(alues)h(to)h -Fe(Lua)p Ff(.)-5 1402 y Fe(Prede\014ned)f(functions)h(and)f(lib)o(ra)o(ries) --5 1486 y Ff(The)e(set)g(of)h(prede\014ned)d(functions)h(in)h -Fe(Lua)g Ff(is)f(small)g(but)h(p)q(o)o(w)o(erful.)20 b(Most)13 -b(of)i(them)e(pro)o(vide)g(features)-5 1546 y(that)20 b(allo)o(w)e(some)g -(degree)g(of)h(re\015exivit)o(y)g(in)g(the)g(language.)28 b(Suc)o(h)17 -b(features)i(cannot)f(b)q(e)i(sim)o(ulated)-5 1606 y(with)c(the)h(rest)f(of)g -(the)h(language)e(nor)g(with)h(the)h(standard)d(API.)j(The)f(prede\014ned)e -(functions)i(handle)-5 1666 y(the)j(follo)o(wing)d(tasks:)25 -b(executing)19 b(a)f Fe(Lua)f Ff(mo)q(dule)h(con)o(tained)f(in)g(a)h(\014le)g -(or)f(string;)h(en)o(umerating)e(all)-5 1726 y(\014elds)g(of)h(a)f(table;)g -(en)o(umerating)f(all)h(global)g(v)m(ariables;)f(t)o(yp)q(e)i(querying)f(and) -g(con)o(v)o(ersion.)-5 1810 y(The)j(libraries,)f(on)g(the)i(other)e(hand,)h -(pro)o(vide)f(useful)g(routines)g(whic)o(h)g(are)h(implemen)o(ted)e(directly) --5 1870 y(through)22 b(the)h(standard)e(API.)h(Therefore,)i(they)f(are)f(not) -h(necessary)e(to)i(the)g(language,)g(and)f(are)-5 1930 y(pro)o(vided)14 -b(as)g(separate)h(C)g(mo)q(dules,)f(whic)o(h)g(can)h(b)q(e)g(link)o(ed)f(to)h -(applications)f(as)h(needed.)20 b(Curren)o(tly)l(,)-5 1990 -y(there)c(are)g(libraries)d(for)j(string)f(manipulation,)f(mathematical)h -(functions,)g(and)g(input)g(and)g(output.)-5 2101 y Fe(P)o(ersistence)-5 -2186 y Ff(The)k(en)o(umeration)e(functions)h(can)g(b)q(e)i(used)e(to)h(pro)o -(vide)e(p)q(ersistency)i(of)g(the)g(global)f(en)o(vironmen)o(t)-5 -2245 y(within)e Fe(Lua)p Ff(,)h(i.e.,)f(it)h(is)f(p)q(ossible)f(to)i(write)g -Fe(Lua)f Ff(co)q(de)h(that)g(writes)f Fe(Lua)g Ff(co)q(de)h(that,)g(when)f -(executed,)-5 2305 y(restores)i(the)h(v)m(alues)g(of)g(all)g(global)f(v)m -(ariables.)28 b(W)l(e)20 b(no)o(w)e(sho)o(w)g(some)g(w)o(a)o(ys)g(to)h(store) -g(and)f(retriev)o(e)-5 2365 y(v)m(alues)k(in)g Fe(Lua)p Ff(,)h(using)e(a)h -(text)h(\014le)f(written)g(in)g(the)g(language)f(itself)i(as)e(the)i(storage) -e(media.)38 b(T)l(o)-5 2425 y(restore)16 b(v)m(alues)g(sa)o(v)o(ed)g(in)g -(this)g(w)o(a)o(y)l(,)g(it)h(is)f(enough)f(to)i(execute)h(the)f(output)f -(\014le.)-5 2509 y(T)l(o)h(store)f(a)g(single)g(v)m(alue)h(with)f(a)h(name,)e -(the)i(follo)o(wing)e(co)q(de)i(is)f(enough:)195 2584 y Fh(function)27 -b(store\(name,)h(value\))247 2644 y(write\(name)g(..)e('='\))247 -2704 y(write_value\(value\))195 2764 y(end)-5 2883 y Fc(T)l(eCGraf/ICAD)1674 -b(6)p eop -%%Page: 7 7 -bop -5 163 a Ff(Here,)15 b(\\)p Fh(..)p Ff(")22 b(is)15 b(the)g(string)e -(concatenation)i(op)q(erator)f(and)g Fh(write)i Ff(is)e(a)h(library)e -(function)i(for)f(output.)-5 223 y(The)j(function)g Fh(write_value)i -Ff(outputs)e(a)g(suitable)f(represen)o(tation)f(of)j(a)f(v)m(alue)g(based)f -(on)h(its)g(t)o(yp)q(e,)-5 283 y(using)f(a)g(string)g(returned)f(b)o(y)h(the) -h(prede\014ned)e(function)h Fh(type)p Ff(:)195 359 y Fh(function)27 -b(write_value\(value\))247 419 y(local)g(t)f(=)g(type\(value\))351 -478 y(if)h(t)f(=)h('nil')105 b(then)27 b(write\('nil'\))247 -538 y(elseif)g(t)f(=)h('number')g(then)g(write\(value\))247 -598 y(elseif)g(t)f(=)h('string')g(then)g(write\('"')g(..)g(value)g(..)f -('"'\))247 658 y(end)195 718 y(end)-5 802 y Ff(Storing)16 b(tables)g(is)g(a)h -(little)g(more)e(complex.)22 b(First,)15 b Fh(write_value)j -Ff(is)e(augmen)o(ted)g(with)247 888 y Fh(elseif)27 b(t)f(=)h('table')g(then)f -(write_record\(value\))-5 972 y Ff(Assuming)13 b(that)h(tables)g(are)f(b)q -(eing)h(used)f(as)h(records)e(\(i.e.,)j(there)f(are)f(no)h(circular)f -(references)g(and)g(all)-5 1032 y(indices)h(are)h(iden)o(ti\014ers\),)f(the)h -(v)m(alue)h(of)f(a)g(table)g(can)g(b)q(e)g(written)g(directly)g(with)g(table) -g(constructors:)195 1110 y Fh(function)27 b(write_record\(t\))247 -1169 y(local)g(i,)f(v)h(=)f(next\(t,)h(nil\))79 b(--)27 b("next")g -(enumerates)g(the)g(fields)g(of)f(t)247 1229 y(write\('@{'\))446 -b(--)27 b(starts)g(constructor)247 1289 y(while)g(i)f(do)299 -1349 y(store\(i,v\))299 1408 y(i,)h(v)f(=)g(next\(t,)h(i\))299 -1468 y(if)g(i)f(then)h(write\(',)g('\))f(end)247 1528 y(end)247 -1588 y(write\('}'\))472 b(--)27 b(closes)g(constructor)195 -1648 y(end)-5 1810 y Fg(Implementation)-5 1894 y Ff(Extension)22 -b(languages)f(are)g(alw)o(a)o(ys)g(in)o(terpreted,)i(in)e(one)h(w)o(a)o(y)g -(or)f(another,)i(b)o(y)f(the)g(application.)-5 1954 y(Simple)e(extension)h -(languages)f(can)h(b)q(e)g(in)o(terpreted)f(directly)h(from)g(source)f(co)q -(de.)36 b(On)21 b(the)g(other)-5 2014 y(hand,)j(em)o(b)q(edded)e(languages)f -(are)i(usually)f(p)q(o)o(w)o(erful)g(programming)e(languages,)j(with)g -(complex)-5 2074 y(syn)o(tax)11 b(and)g(seman)o(tics.)18 b(A)12 -b(more)e(e\016cien)o(t)g(implemen)o(tation)f(tec)o(hnique)i(for)g(em)o(b)q -(edded)f(languages)f(is)-5 2133 y(to)k(design)f(a)h Fd(virtual)h(machine)g -Ff(suited)e(to)i(the)f(needs)f(of)h(the)g(language,)g(compile)f(extension)g -(programs)-5 2193 y(in)o(to)23 b Fd(byte)m(c)m(o)m(des)j Ff(for)d(this)h(mac) -o(hine,)f(and)g(then)h(sim)o(ulate)e(the)i(virtual)f(mac)o(hine)f(b)o(y)h(in) -o(terpreting)-5 2253 y(b)o(yteco)q(des)e(\(Betz)i(1988,)f(1991;)h(F)l(ranks)c -(1991\).)36 b(W)l(e)21 b(ha)o(v)o(e)g(c)o(hosen)f(this)g(h)o(ybrid)g(arc)o -(hitecture)g(for)-5 2313 y(implemen)o(ting)12 b Fe(Lua)p Ff(;)i(it)f(has)g -(the)h(follo)o(wing)e(adv)m(an)o(tages)h(o)o(v)o(er)g(direct)g(in)o -(terpretation)f(of)i(source)f(co)q(de:)-5 2395 y Fb(\017)25 -b Ff(b)q(ecause)19 b(lexical)g(and)g(syn)o(tactical)g(analysis)f(are)h(done)f -(only)h(once,)h(p)q(ossibly)e(using)g(an)h(external)45 2455 -y(parser)j(b)q(efore)i(the)g(actual)g(em)o(b)q(edding,)g(simple)e(errors)g -(are)i(iden)o(ti\014ed)e(early)l(,)j(resulting)d(in)i(a)45 -2515 y(shorter)15 b(dev)o(elopmen)o(t)h(cycle)h(and)f(faster)g(execution;)-5 -2584 y Fb(\017)25 b Ff(if)18 b(an)g(external)g(compiler)f(is)h(used,)f(there) -h(is)g(the)g(p)q(ossibilit)o(y)f(of)h(pro)o(viding)e(extension)i(programs)45 -2644 y(in)f(b)o(yteco)q(de)g(form)f(only)l(,)h(i.e.,)f(pre-compiled,)f -(resulting)h(in)g(faster)h(loading,)f(safer)g(en)o(vironmen)o(ts)45 -2704 y(and)e(smaller)e(run-time)h(supp)q(ort)g(\(ho)o(w)o(ev)o(er,)h(linking) -f(sev)o(eral)g(pre-compiled)f(extension)i(programs)45 2764 -y(can)i(b)q(e)h(a)g(di\016cult)e(task\).)-5 2883 y Fc(T)l(eCGraf/ICAD)1674 -b(7)p eop -%%Page: 8 8 -bop -5 163 a Ff(This)18 b(arc)o(hitecture)g(w)o(as)g(pioneered)g(in)h -(Smalltalk)f(\(Goldb)q(erg{Robson)e(1983;)k(Budd)e(1987\))h(\(from)-5 -223 y(whic)o(h)k(the)h(term)f Fd(byte)m(c)m(o)m(des)j Ff(w)o(as)d(b)q(orro)o -(w)o(ed\))f(and)h(also)g(used)f(in)i(the)g(successful)e(UCSD)i(P)o(ascal)-5 -283 y(system)e(based)g(on)f(P-co)q(de)h(\(Clark{Ko)q(ehler)g(1982\).)39 -b(In)22 b(these)g(systems,)h(b)o(yteco)q(des)f(for)g(virtual)-5 -343 y(mac)o(hines)14 b(w)o(ere)g(used)h(b)q(oth)g(for)g(reducing)e(complexit) -o(y)i(and)g(for)g(increasing)e(p)q(ortabilit)o(y)l(.)21 b(This)14 -b(path)-5 402 y(w)o(as)i(also)g(used)g(in)g(p)q(orting)g(the)g(BCPL)h -(compiler)f(\(Ric)o(hards{Whitb)o(y-S)o(trev)o(ens)d(1980\).)-5 -487 y(Co)q(de)19 b(for)e(compilation)g(of)h(extension)g(programs)e(can)i(b)q -(e)g(built)g(with)g(standard)f(to)q(ols,)h(suc)o(h)f(as)h Fe(lex)-5 -547 y Ff(and)e Fe(y)o(acc)g Ff(\(Levine{Mason{Bro)o(wn)e(1992\).)22 -b(The)16 b(existence)h(of)f(go)q(o)q(d)g(to)q(ols)g(for)g(compiler)f -(construc-)-5 607 y(tion,)25 b(whic)o(h)c(b)q(ecame)i(widely)g(a)o(v)m -(ailable)f(in)h(the)g(late)g(sev)o(en)o(ties,)h(w)o(as)e(the)h(main)f(reason) -g(for)h(the)-5 666 y(sprouting)16 b(of)h(sev)o(eral)f(little)i(languages,)e -(sp)q(ecially)h(in)g(Unix)g(en)o(vironmen)o(ts.)22 b(Our)16 -b(implemen)o(tation)-5 726 y(of)i Fe(Lua)f Ff(uses)g Fe(y)o(acc)h -Ff(for)f(syn)o(tactical)g(analysis.)24 b(Initially)l(,)17 b(w)o(e)g(wrote)h -(the)g(lexical)f(analyzer)h(using)e Fe(lex)p Ff(.)-5 786 y(After)21 -b(p)q(erformance)e(pro\014les)f(with)i(pro)q(duction)f(programs,)g(w)o(e)g -(detected)i(that)g(this)e(mo)q(dule)h(w)o(as)-5 846 y(resp)q(onsible)e(for)h -(almost)g(half)g(of)g(the)h(time)f(required)f(for)h(loading)g(and)f -(executing)i(extension)f(pro-)-5 905 y(grams.)24 b(W)l(e)18 -b(then)g(rewrote)f(this)h(mo)q(dule)f(directly)g(in)h(C;)f(the)h(new)g -(lexical)g(analyzer)f(is)g(more)g(than)-5 965 y(t)o(wice)g(as)f(fast)h(as)f -(the)h(old)f(one.)-5 1135 y Fe(Lua's)g(virtual)j(machine)-5 -1219 y Ff(The)h(virtual)f(mac)o(hine)f(used)h(in)g(our)g(implemen)o(tation)f -(of)i Fe(Lua)f Ff(is)g(a)h Fd(stack)h(machine)p Ff(.)32 b(This)19 -b(means)-5 1279 y(that)e(it)f(do)q(es)g(not)g(ha)o(v)o(e)g(random)e(access)i -(memory:)21 b(all)16 b(temp)q(orary)f(v)m(alues)h(and)g(lo)q(cal)g(v)m -(ariables)f(are)-5 1339 y(k)o(ept)j(in)e(a)i(stac)o(k.)24 b(Moreo)o(v)o(er,) -15 b(it)j(do)q(es)f(not)g(ha)o(v)o(e)g(general)f(purp)q(ose)g(registers,)g -(only)h(sp)q(ecial)g(con)o(trol)-5 1399 y(registers,)f(whic)o(h)g(con)o(trol) -h(the)g(stac)o(k)g(and)g(the)g(execution)h(of)f(programs.)22 -b(These)17 b(registers)f(are)h Fd(b)m(ase)-5 1458 y(of)i(stack)p -Ff(,)d Fd(top)j(of)f(stack)f Ff(and)f Fd(pr)m(o)m(gr)m(am)k(c)m(ounter)p -Ff(.)-5 1543 y(Programs)j(for)h(the)g(virtual)g(mac)o(hine)f(are)h(sequences) -g(of)h(instructions,)f(called)g Fd(byte)m(c)m(o)m(des)p Ff(.)48 -b(The)-5 1603 y(execution)24 b(of)g(programs)d(is)i(ac)o(hiev)o(ed)g(b)o(y)g -(in)o(terpreting)f(b)o(yteco)q(des,)k(eac)o(h)d(corresp)q(onding)e(to)j(an)-5 -1663 y(instruction)16 b(that)g(op)q(erates)h(on)f(the)h(top)f(p)q(ortion)g -(of)h(the)g(stac)o(k.)22 b(F)l(or)15 b(example,)h(the)h(statemen)o(t)195 -1777 y Fh(a)26 b(=)g(b)g(+)h(f\(c\))-5 1862 y Ff(is)16 b(compiled)g(in)o(to) -195 1962 y Fh(PUSHGLOBAL)80 b("b")195 2022 y(PUSHGLOBAL)g("f")195 -2081 y(PUSHMARK)195 2141 y(PUSHGLOBAL)g("c")195 2201 y(CALLFUNC)195 -2261 y(ADJUST)210 b(2)195 2320 y(ADD)195 2380 y(STOREGLOBAL)54 -b("a")-5 2465 y Fe(Lua)p Ff('s)13 b(virtual)f(mac)o(hine)g(has)g(ab)q(out)h -(60)g(instructions;)g(accordingly)l(,)f(it)i(is)e(p)q(ossible)g(to)i(use)e -(8-bit)h(b)o(yte-)-5 2525 y(co)q(des.)22 b(Man)o(y)15 b(instructions)f -(\(e.g.,)h Fh(ADD)p Ff(\))i(do)e(not)h(need)f(additional)g(parameters;)f -(these)h(instructions)-5 2584 y(op)q(erate)d(directly)g(on)f(the)h(stac)o(k)g -(and)f(tak)o(e)h(exactly)h(one)f(b)o(yte)g(in)f(compiled)g(co)q(de.)20 -b(Other)11 b(instructions)-5 2644 y(\(e.g.,)16 b Fh(PUSHGLOBAL)i -Ff(and)d Fh(STOREGLOBAL)p Ff(\))j(need)d(additional)g(parameters,)f(and)h -(tak)o(e)h(more)f(than)h(one)-5 2704 y(b)o(yte.)22 b(Since)16 -b(parameters)e(tak)o(e)i(either)g(one,)f(t)o(w)o(o)h(or)f(four)g(b)o(ytes,)h -(this)g(creates)f(alignmen)o(t)g(problems)-5 2764 y(in)h(some)g(arc)o -(hitectures,)f(whic)o(h)h(are)g(solv)o(ed)g(b)o(y)g(padding)f(with)h -Fh(NOP)p Ff(s)h(to)g(the)g(alignmen)o(t)e(b)q(oundary)l(.)-5 -2883 y Fc(T)l(eCGraf/ICAD)1674 b(8)p eop -%%Page: 9 9 -bop -5 163 a Ff(Man)o(y)15 b(of)i(the)f(instructions)e(exist)i(for)g -(optimization)f(only)l(.)21 b(F)l(or)15 b(instance,)g(there)h(is)g(a)g -Fh(PUSH)g Ff(instruc-)-5 223 y(tion,)f(whic)o(h)g(tak)o(es)g(a)g(n)o(um)o(b)q -(er)e(as)i(a)g(parameter)f(and)g(pushes)g(it)h(on)o(to)g(the)g(stac)o(k,)h -(but)f(there)g(are)f(also)-5 283 y(single-b)o(yte)i(optimized)f(v)o(ersions)g -(for)h(pushing)f(common)g(v)m(alues)h(suc)o(h)f(as)h(zero)h(and)e(one.)22 -b(Th)o(us,)15 b(w)o(e)-5 343 y(ha)o(v)o(e)k Fh(PUSHNIL)p Ff(,)h -Fh(PUSH0)p Ff(,)h Fh(PUSH1)p Ff(,)g Fh(PUSH2)p Ff(.)31 b(Suc)o(h)18 -b(optimizations)g(reduce)h(b)q(oth)g(the)h(space)f(required)-5 -402 y(for)e(compiled)e(b)o(yteco)q(des)h(and)g(the)h(time)g(required)e(for)h -(in)o(terpreting)f(instructions.)-5 487 y(Recall)k(that)h Fe(Lua)f -Ff(supp)q(orts)f(m)o(ultiple)f(assignmen)o(t)h(and)g(m)o(ultiple)g(return)g -(v)m(alues)h(from)g(functions.)-5 547 y(Therefore,)e(sometimes,)g(a)g(list)h -(of)g(v)m(alues)f(m)o(ust)g(b)q(e)g Fd(adjuste)m(d)5 b Ff(,)20 -b(at)e(run)f(time,)g(to)h(a)g(giv)o(en)f(length:)24 b(if)-5 -607 y(there)c(are)g(more)f(v)m(alues)h(than)g(are)f(needed,)h(then)g(the)h -(excess)f(v)m(alues)f(are)h(thro)o(wn)f(a)o(w)o(a)o(y;)i(if)f(more)-5 -666 y(v)m(alues)15 b(are)f(needed)g(than)g(are)g(presen)o(t,)g(then)g(the)h -(list)f(is)g(extended)h(with)f(as)g(man)o(y)g Fh(nil)p Ff('s)g(as)g(needed.) --5 726 y(Adjustmen)o(t)i(is)g(done)g(on)g(the)h(stac)o(k)g(with)f(the)h -Fh(ADJUST)h Ff(instruction.)-5 811 y(Although)g(m)o(ultiple)f(assignmen)o(t)f -(and)i(returns)e(are)i(a)g(p)q(o)o(w)o(erful)f(feature)i(of)f -Fe(Lua)p Ff(,)g(they)h(are)f(an)g(im-)-5 871 y(p)q(ortan)o(t)g(source)e(of)i -(complexit)o(y)g(in)f(b)q(oth)h(the)g(compiler)e(and)i(the)g(in)o(terpreter.) -24 b(Because)17 b(there)h(are)-5 930 y(no)c(t)o(yp)q(e)h(declarations)e(for)h -(functions,)g(the)h(compiler)d(do)q(es)j(not)f(kno)o(w)g(ho)o(w)f(man)o(y)h -(v)m(alues)g(a)g(function)-5 990 y(will)j(return.)k(Th)o(us,)15 -b(adjustmen)o(t)h(m)o(ust)g(b)q(e)h(done)f(at)h(run)f(time.)22 -b(Similarly)l(,)15 b(the)i(compiler)e(do)q(es)i(not)-5 1050 -y(kno)o(w)f(ho)o(w)g(man)o(y)f(parameters)g(a)h(function)g(tak)o(es.)22 -b(Because)16 b(this)g(n)o(um)o(b)q(er)f(ma)o(y)g(v)m(ary)i(at)g(run)e(time,) --5 1110 y(the)i(list)f(of)h(parameters)e(is)h(brac)o(k)o(eted)g(b)q(et)o(w)o -(een)g(a)h Fh(PUSHMARK)g Ff(and)f(a)h Fh(CALLFUNC)h Ff(instruction.)-5 -1194 y(One)e(w)o(a)o(y)f(to)h(extend)g Fe(Lua)f Ff(with)h(functions)f(pro)o -(vided)f(b)o(y)h(the)h(host)f(w)o(ould)g(b)q(e)g(to)h(assign)f(a)g(b)o(yteco) -q(de)-5 1254 y(to)j(eac)o(h)f(suc)o(h)g(function)g(\(Betz)i(1988\).)25 -b(Although)17 b(this)g(strategy)h(w)o(ould)e(simplify)h(the)g(in)o -(terpreter,)-5 1314 y(it)k(has)g(the)g(disadv)m(an)o(tage)e(that)i(few)o(er)g -(than)g(200)f(external)h(functions)f(could)g(b)q(e)h(added,)g(b)q(ecause)-5 -1374 y Fe(Lua)e Ff(has)f(8-bit)g(b)o(yteco)q(des)h(and)f(already)g(uses)g(ab) -q(out)g(60)h(of)g(them)f(for)h(its)f(primitiv)o(e)g(instructions.)-5 -1433 y(W)l(e)f(ha)o(v)o(e)f(c)o(hosen)g(to)h(ha)o(v)o(e)f(the)h(host)f -(explicitly)h(register)f(external)h(functions,)f(and)g(handling)f(these)-5 -1493 y(functions)24 b(lik)o(e)g(nativ)o(e)h Fe(Lua)f Ff(functions.)45 -b(Th)o(us,)25 b(there)f(is)h(a)f(single)g Fh(CALLFUNC)h Ff(instruction;)j -(the)-5 1553 y(in)o(terpreter)15 b(decides)h(what)h(to)g(do)f(based)f(on)i -(the)f(t)o(yp)q(e)i(of)e(the)h(function)f(b)q(eing)g(called.)-5 -1638 y(A)21 b(rather)e(di\013eren)o(t)g(strategy)h(w)o(as)f(prop)q(osed)g(b)o -(y)g(F)l(ranks)f(\(1991\):)30 b Fd(al)s(l)19 b Ff(external)h(functions)f(in)h -(the)-5 1697 y(host)f(can)g(b)q(e)h(called)f(b)o(y)g(the)g(em)o(b)q(edded)f -(language;)i(no)f(explicit)g(registration)f(is)h(needed.)30 -b(This)18 b(is)-5 1757 y(done)h(b)o(y)g(reading)f(and)g(in)o(terpreting)g -(the)h(map)g(generated)f(b)o(y)h(the)h(link)o(er.)29 b(This)18 -b(solution)g(is)h(v)o(ery)-5 1817 y(con)o(v)o(enien)o(t)g(for)h(the)g -(application)e(programmer,)g(but)i(is)f(not)h(p)q(ortable,)g(b)q(eing)g(dep)q -(enden)o(t)f(on)h(the)-5 1877 y(format)14 b(of)g(the)h(map)e(\014le)h(and)g -(on)g(the)g(relo)q(cation)g(strategy)h(used)e(b)o(y)h(the)g(op)q(erating)g -(system)g(\(F)l(ranks)-5 1937 y(used)i(a)h(sp)q(eci\014c)f(compiler)f(for)h -(DOS\).)-5 2091 y Fe(Internal)h(data)f(structures)-5 2176 y -Ff(As)22 b(men)o(tioned)e(b)q(efore,)i(v)m(ariables)f(in)f -Fe(Lua)i Ff(are)f(not)g(t)o(yp)q(ed;)j(only)d(v)m(alues)g(are.)36 -b(Th)o(us,)21 b(v)m(alues)g(are)-5 2236 y(implemen)o(ted)15 -b(in)g(a)h Fh(struct)i Ff(with)e(t)o(w)o(o)f(\014elds:)21 b(a)16 -b(t)o(yp)q(e)h(and)e(a)i Fh(union)g Ff(con)o(taining)d(the)j(actual)f(v)m -(alue.)-5 2296 y(These)g Fh(struct)p Ff(s)g(o)q(ccur)g(in)g(the)g(stac)o(k)g -(and)f(in)g(the)h(sym)o(b)q(ol)f(table,)h(whic)o(h)f(holds)g(all)g(global)g -(sym)o(b)q(ols.)-5 2380 y(Num)o(b)q(ers)j(are)h(stored)f(directly)h(in)o(to)g -(the)g Fh(union)p Ff(.)31 b(Strings)18 b(are)g(k)o(ept)i(in)e(a)h(single)g -(arra)o(y;)g(v)m(alues)g(of)-5 2440 y(t)o(yp)q(e)i Fd(string)g -Ff(con)o(tain)e(p)q(oin)o(ters)h(to)g(this)g(arra)o(y)l(.)32 -b(V)l(alues)20 b(of)h(t)o(yp)q(e)g Fd(function)f Ff(con)o(tain)g(p)q(oin)o -(ters)f(to)i(a)-5 2500 y(b)o(yteco)q(de)d(arra)o(y)l(.)23 b(V)l(alues)17 -b(of)g(t)o(yp)q(e)h Fd(Cfunction)f Ff(con)o(tain)g(the)g(actual)g(p)q(oin)o -(ter)g(to)g(the)h(C)f(function,)g(as)-5 2560 y(pro)o(vided)e(b)o(y)h(the)h -(host)f(program;)f(the)i(same)e(happ)q(ens)h(for)g(v)m(alues)g(of)h(t)o(yp)q -(e)g Fd(user)m(data)p Ff(.)-5 2644 y(T)l(ables)g(are)g(implemen)o(ted)f(as)h -(hash)g(tables,)g(with)h(collisions)d(handled)i(b)o(y)g(separate)g(c)o -(haining)f(\(this)-5 2704 y(explains)23 b(wh)o(y)g(indices)g(in)g(a)g(table)h -(are)f(ordered)f(arbitrarily\).)41 b(If)24 b(a)g(dimension)d(is)i(giv)o(en)g -(when)-5 2764 y(a)f(table)g(is)g(created,)h(then)f(this)g(dimension)e(is)i -(used)f(as)h(the)g(size)g(of)g(the)h(hash)e(table.)38 b(Th)o(us,)22 -b(b)o(y)-5 2883 y Fc(T)l(eCGraf/ICAD)1674 b(9)p eop -%%Page: 10 10 -bop -5 163 a Ff(pro)o(viding)13 b(a)i(dimension)e(appro)o(ximately)h(equal)h -(to)g(the)g(exp)q(ected)h(n)o(um)o(b)q(er)d(of)i(indices)f(in)h(the)g(table,) --5 223 y(few)i(collisions)d(will)i(o)q(ccur,)g(resulting)e(in)i(v)o(ery)g -(e\016cien)o(t)g(index)f(lo)q(cation.)22 b(Moreo)o(v)o(er,)15 -b(if)h(the)g(table)g(is)-5 283 y(used)g(as)g(an)g(arra)o(y)l(,)e(with)j(n)o -(umeric)d(indices)h(only)l(,)h(then)g(c)o(ho)q(osing)g(the)g(righ)o(t)f -(dimension)g(at)h(creation)-5 343 y(time)h(guaran)o(tees)e(that)i(no)f -(collisions)f(will)h(o)q(ccur.)-5 427 y(All)k(in)o(ternal)e(data)h -(structures)f(in)h Fe(Lua)h Ff(are)f(dynamically)f(allo)q(cated)i(arra)o(ys.) -29 b(When)19 b(there)g(are)g(no)-5 487 y(more)13 b(free)h(slots)g(in)f(one)h -(of)g(these)g(arra)o(ys,)e(garbage)h(collection)h(is)f(automatically)h(p)q -(erformed)e(using)h(a)-5 547 y(standard)i(mark-and-sw)n(eep)e(algorithm.)21 -b(If)16 b(no)f(space)h(is)f(reco)o(v)o(ered)g(\(b)q(ecause)h(all)f(v)m(alues) -h(are)f(b)q(eing)-5 607 y(referenced\),)h(then)h(the)g(arra)o(y)e(is)h -(reallo)q(cated)g(with)h(double)e(its)i(curren)o(t)e(size.)-5 -691 y(Garbage)h(collection)h(is)g(v)o(ery)g(con)o(v)o(enien)o(t)e(for)i(the)g -(programmer)d(b)q(ecause)j(it)g(a)o(v)o(oids)f(explicit)h(mem-)-5 -751 y(ory)d(managemen)o(t.)20 b(When)14 b Fe(Lua)g Ff(is)g(used)g(as)g(a)g -(standalone)f(language)h(\(whic)o(h)f(it)i(frequen)o(tly)f(is\),)h(then)-5 -811 y(garbage)20 b(collection)g(is)g(an)g(asset.)34 b(Ho)o(w)o(ev)o(er,)20 -b(when)g Fe(Lua)g Ff(is)g(used)g(em)o(b)q(edded)f(in)h(a)h(host)f(program)-5 -871 y(\(whic)o(h)13 b(is)g(its)h(main)e(purp)q(ose\),)h(then)h(garbage)e -(collection)h(creates)h(a)f(new)h(w)o(orry)e(for)h(the)h(application)-5 -930 y(programmer)f(who)i(needs)g(to)h(in)o(terface)g(with)f -Fe(Lua)p Ff(:)21 b(care)16 b(should)e(b)q(e)i(tak)o(en)g(not)f(to)h(store)g -Fe(Lua)f Ff(tables)-5 990 y(and)g(strings)f(in)o(to)i(C)f(v)m(ariables,)g(b)q -(ecause)g(these)h(v)m(alues)f(ma)o(y)g(b)q(e)h(reclaimed)f(during)e(garbage)i -(collec-)-5 1050 y(tion,)i(if)g(they)h(do)f(not)g(ha)o(v)o(e)f(an)o(y)h -(further)f(references)h(within)f Fe(Lua)p Ff('s)h(en)o(vironmen)o(t.)k(More)c -(precisely)l(,)-5 1110 y(the)d(programmer)d(m)o(ust)i(explicitly)h(cop)o(y)f -(these)h(v)m(alues)f(in)o(to)g(C)h(v)m(ariables,)f(b)q(efore)h(returning)e -(con)o(trol)-5 1169 y(to)i Fe(Lua)p Ff(.)21 b(Although)12 b(this)h(is)g(a)h -(di\013eren)o(t)e(paradigm,)g(it)h(is)g(not)h(w)o(orse)e(than)h(the)h -(familiar)e Fh(malloc)p Ff(-)p Fh(free)-5 1229 y Ff(proto)q(col)17 -b(for)f(memory)f(managemen)o(t)g(using)h(the)g(standard)f(C)i(library)l(.)-5 -1397 y Fg(Conclusion)-5 1482 y Fe(Lua)g Ff(has)e(b)q(een)i(extensiv)o(ely)g -(used)f(in)g(pro)q(duction)f(since)h(mid)g(93,)g(for)g(the)h(follo)o(wing)e -(tasks:)-5 1560 y Fb(\017)25 b Ff(user)16 b(con\014guration)e(of)j -(application)f(en)o(vironmen)o(t;)-5 1625 y Fb(\017)25 b Ff(general-purp)q -(ose)14 b(data-en)o(try)l(,)h(with)i(user)e(de\014ned)h(dialogs)f(and)h(v)m -(alidation)g(pro)q(cedures;)-5 1690 y Fb(\017)25 b Ff(description)15 -b(of)i(user)e(in)o(terfaces;)-5 1755 y Fb(\017)25 b Ff(programmer)14 -b(description)h(of)i(application)e(ob)s(jects;)-5 1819 y Fb(\017)25 -b Ff(storage)f(of)h(structured)e(graphical)g(meta\014les,)i(used)f(for)g -(comm)o(unication)e(b)q(et)o(w)o(een)i(graphical)45 1879 y(editors)16 -b(and)g(application)f(programs.)-5 1977 y(Moreo)o(v)o(er,)g -Fe(Lua)g Ff(is)h(curren)o(tly)e(b)q(eing)i(considered)e(as)i(the)g(basis)f -(for)g(a)h(visual)f(programming)e(system.)-5 2062 y(The)k(abilit)o(y)g(to)g -(load)f(and)h(execute)h Fe(Lua)f Ff(programs)d(at)k(run-time)d(has)h(pro)o(v) -o(ed)g(to)h(b)q(e)h(a)f(ma)s(jor)f(com-)-5 2122 y(p)q(onen)o(t)g(in)f(making) -g(con\014guration)f(an)i(easy)g(task)g(for)g(b)q(oth)g(users)e(and)i(dev)o -(elop)q(ers.)k(Moreo)o(v)o(er,)15 b(the)-5 2182 y(existence)i(of)g(a)f -(single)g(general)g(purp)q(ose)f(em)o(b)q(edded)g(language)h(discourages)e -(the)j(m)o(ultiplication)e(of)-5 2241 y(incompatible)d(languages)g(and)h -(encourages)f(a)h(b)q(etter)h(design,)f(one)g(that)h(clearly)f(separates)f -(the)i(main)-5 2301 y(tec)o(hnology)i(con)o(tained)g(in)g(an)g(application)g -(from)f(its)i(con\014guration)e(issues.)-5 2386 y(The)21 b(implemen)o(tation) -e(of)i Fe(Lua)f Ff(describ)q(ed)g(in)g(this)h(pap)q(er)f(is)g(a)o(v)m -(ailable)g(b)o(y)h(anon)o(ymous)d Fh(ftp)k Ff(from)-5 2446 -y Fh(ftp.icad.puc-rio.br:/p)q(ub/lua)q(/lua-1.)q(1.tar.Z)q -Ff(.)-5 2560 y Fe(Ackno)o(wledgments)-5 2644 y Ff(W)l(e)f(w)o(ould)d(lik)o(e) -i(to)h(thank)f(the)g(sta\013)g(at)h(ICAD)f(and)g(T)l(eCGraf)f(for)h(using)f -(and)h(testing)g Fe(Lua)p Ff(.)32 b(The)-5 2704 y(industrial)16 -b(applications)g(men)o(tioned)g(in)h(the)h(text)h(are)e(b)q(eing)h(dev)o -(elop)q(ed)f(in)g(patternship)f(with)i(the)-5 2764 y(researc)o(h)d(cen)o -(ters)h(at)h(PETR)o(OBR)674 2751 y(\023)668 2764 y(AS)e(\(CENPES\))i(and)f -(at)h(ELETR)o(OBR)1452 2751 y(\023)1446 2764 y(AS)f(\(CEPEL\).)-5 -2883 y Fc(T)l(eCGraf/ICAD)1652 b(10)p eop -%%Page: 11 11 -bop -5 163 a Fg(References)-5 268 y Ff(M.)14 b(Abrash,)g(D.)g(Illo)o(wsky)l -(,)g(\\Roll)g(y)o(our)f(o)o(wn)h(minilanguages)e(with)j(mini-in)o(terpreters) -o(",)d Fi(Dr.)i(Dobb's)70 328 y(Journal)h Fa(14)h Ff(\(9\))h(\(Sep)f(1989\))h -(52{72.)-5 402 y(A.)27 b(V.)h(Aho,)e(B.)i(W.)f(Kerninghan,)d(P)l(.)j(J.)f(W)l -(ein)o(b)q(erger,)g Fi(The)g(A)-6 b(WK)28 b(programming)c(language)p -Ff(,)70 462 y(Addison-W)l(esley)l(,)15 b(1988.)-5 537 y(B.)i(Bec)o(kman,)f -(\\A)h(Sc)o(heme)f(for)g(little)h(languages)f(in)g(in)o(teractiv)o(e)g -(graphics",)f Fi(Soft)o(w)o(are,)h(practice)g(&)70 597 y(exp)q(erience)h -Fa(21)f Ff(\(1991\))h(187{207.)-5 671 y(J.)c(Ben)o(tley)l(,)f(\\Programming)e -(p)q(earls:)i(little)h(languages",)f Fi(Comm)o(unications)e(of)j(the)g(A)o -(CM)f Fa(29)g Ff(\(1986\))70 731 y(711{721.)-5 806 y(J.)k(Ben)o(tley)l(,)h -Fi(More)f(programming)d(p)q(earls)p Ff(,)j(Addison-W)l(esley)l(,)f(1988.)-5 -881 y(D.)i(Betz,)g(\\Em)o(b)q(edded)e(languages",)g Fi(Byte)j -Fa(13)e Ff(#12)f(\(No)o(v)j(1988\))e(409{416.)-5 955 y(D.)g(Betz,)h(\\Y)l -(our)f(o)o(wn)f(tin)o(y)h(ob)s(ject-orien)o(ted)f(language",)g -Fi(Dr.)h(Dobb's)f(Journal)f Fa(16)i Ff(\(9\))h(\(Sep)f(1991\))70 -1015 y(26{33.)-5 1090 y(T.)h(Budd,)e Fi(A)i(Little)h(Smalltalk)p -Ff(,)d(Addison-W)l(esley)l(,)g(1987.)-5 1164 y(R.)e(Clark,)h(S.)f(Ko)q -(ehler,)g Fi(The)g(UCSD)h(P)o(ascal)f(handb)q(o)q(ok:)g(a)g(reference)g(and)g -(guideb)q(o)q(ok)h(for)f(program-)70 1224 y(mers)p Ff(,)i(Pren)o(tice-Hall,)h -(1982.)-5 1299 y(M.)g(Co)o(wlisha)o(w,)f Fi(The)h(REXX)h(programming)d -(language)p Ff(,)h(Pren)o(tice-Hall,)g(1990.)-5 1374 y(L.)j(H.)f(de)g -(Figueiredo,)f(C.)h(S.)g(de)g(Souza,)g(M.)f(Gattass,)i(L.)f(C.)g(G.)g(Co)q -(elho,)g(\\Gera\030)-22 b(c~)d(ao)17 b(de)h(in)o(terfaces)70 -1433 y(para)k(captura)g(de)h(dados)f(sobre)f(desenhos",)h Fi(Anais)g(do)h -(SIBGRAPI)f(V)i Ff(\(1992\))f(169{175)f([in)70 1493 y(P)o(ortuguese].)-5 -1568 y(N.)e(F)l(ranks,)d(\\Adding)h(an)h(extension)g(language)f(to)i(y)o(our) -e(soft)o(w)o(are",)g Fi(Dr.)g(Dobb's)g(Journal)g Fa(16)g Ff(\(9\))70 -1628 y(\(Sep)e(1991\))h(34{43.)-5 1702 y(A.)24 b(Goldb)q(erg,)f(D.)h(Robson,) -e Fi(Smalltalk-80:)g(the)i(language)f(and)g(its)h(implemen)o(tation)p -Ff(,)d(Addison-)70 1762 y(W)l(esley)l(,)16 b(1983.)-5 1837 -y(R.)g(Ierusalimsc)o(h)o(y)l(,)d(L.)j(H.)g(de)g(Figueiredo,)e(W.)i(Celes)f -(Filho,)g(\\Reference)h(man)o(ual)e(of)i(the)g(program-)70 -1897 y(ming)g(language)f Fe(Lua)p Ff(",)h Fi(Monogra\014as)e(em)j(Ci)o(^)-24 -b(encia)16 b(da)g(Computa\030)-22 b(c~)d(ao)16 b Fa(4/94)p -Ff(,)f(Departamen)o(to)g(de)70 1956 y(Inform\023)-25 b(atica,)15 -b(PUC-Rio,)h(1994.)-5 2031 y(J.)g(R.)g(Levine,)h(T.)f(Mason,)g(D.)g(Bro)o -(wn,)g Fi(Lex)h(&)f(Y)l(acc)p Ff(,)h(O'Reilly)f(and)g(Asso)q(ciates,)g(1992.) --5 2106 y(C.)h(Nahab)q(o)q(o,)f Fi(A)h(catalog)g(of)g(em)o(b)q(edded)e -(languages)p Ff(,)g(a)o(v)m(ailable)h(from)f Fh(colas@indri.inria.fr)p -Ff(.)-5 2181 y(M.)i(Ric)o(hards,)e(C.)j(Whitb)o(y-Strev)o(ens,)d -Fi(BCPL:)j(the)g(language)e(and)h(its)g(compiler)p Ff(,)f(Cam)o(bridge)f -(Uni-)70 2240 y(v)o(ersit)o(y)h(Press,)f(1980.)-5 2315 y(B.)i(Ry)o(an,)f -(\\Scripts)f(un)o(b)q(ounded",)f Fi(Byte)k Fa(15)e Ff(\(8\))h(\(Aug)g(1990\)) -f(235{240.)-5 2390 y(R.)g(V)l(ald)o(\023)-24 b(es,)16 b(\\Little)h -(languages,)e(big)i(questions",)e Fi(Dr.)h(Dobb's)f(Journal)g -Fa(16)h Ff(\(9\))h(\(Sep)g(1991\))f(16{25.)-5 2883 y Fc(T)l(eCGraf/ICAD)1652 -b(11)p eop -%%Trailer -end -userdict /end-hook known{end-hook}if -%%EOF diff --git a/doc/manual.dvi b/doc/manual.dvi Binary files differindex 5baa7132..7ab7e9bc 100644 --- a/doc/manual.dvi +++ b/doc/manual.dvi diff --git a/doc/manual.ps b/doc/manual.ps index c507ae37..bfd0730c 100644 --- a/doc/manual.ps +++ b/doc/manual.ps @@ -1,7 +1,7 @@ %!PS-Adobe-2.0 %%Creator: dvips, version 5.4 (C) 1986-90 Radical Eye Software %%Title: manual.dvi -%%Pages: 19 1 +%%Pages: 24 1 %%BoundingBox: 0 0 596 843 %%EndComments %%BeginProcSet: tex.pro @@ -53,157 +53,169 @@ E0007FC0001F00141C7F9B1A>116 D<7F83FCFFC7FE7F83FC0E00E00E00E00E00E00701C00701 C00701C003838003838003838001C70001C70001C70000EE0000EE0000EE00007C00007C000038 0017157F941A>118 D<7FC7F87FCFFC7FC7F80703C003838003C70001EF0000FE00007C000078 00003800007C0000EE0001EE0001C7000383800783C00F01C07FC7FCFFC7FE7FC7FC17157F941A ->120 D E /Fb 46 121 df<000FF000007FFC0001F80E0003E01F0007C03F000F803F000F803F -000F801E000F800C000F8000000F8000000F8000000F800000FFFFFF00FFFFFF000F801F000F80 -1F000F801F000F801F000F801F000F801F000F801F000F801F000F801F000F801F000F801F000F -801F000F801F000F801F000F801F000F801F000F801F000F801F007FF0FFE07FF0FFE01B237FA2 -1F>12 D<387CFEFEFE7C3807077C8610>46 D<0000180000380000380000700000700000E00000 -E00000E00001C00001C0000380000380000380000700000700000700000E00000E00001C00001C -00001C0000380000380000700000700000700000E00000E00001C00001C00001C0000380000380 -000700000700000700000E00000E00000E00001C00001C00003800003800003800007000007000 -00E00000E00000C0000015317DA41C>I<00180000780001F800FFF800FFF80001F80001F80001 +>120 D E /Fb 1 122 df<1C02260646064606860C0C0C0C0C0C0C18181818181818380C7007B0 +00300060706070C021801E000F147F8D11>121 D E /Fc 2 121 df<70F8F8F87005057C840D> +58 D<03C1C00C62201034701038F02038F020386040700000700000700000700000E00000E000 +00E00000E02061C040F1C040F1C080E2C080446300383C0014147E931A>120 +D E /Fd 47 121 df<000FF000007FFC0001F80E0003E01F0007C03F000F803F000F803F000F80 +1E000F800C000F8000000F8000000F8000000F800000FFFFFF00FFFFFF000F801F000F801F000F +801F000F801F000F801F000F801F000F801F000F801F000F801F000F801F000F801F000F801F00 +0F801F000F801F000F801F000F801F000F801F000F801F007FF0FFE07FF0FFE01B237FA21F>12 +D<387CFEFEFE7C3807077C8610>46 D<0000180000380000380000700000700000E00000E00000 +E00001C00001C0000380000380000380000700000700000700000E00000E00001C00001C00001C +0000380000380000700000700000700000E00000E00001C00001C00001C0000380000380000700 +000700000700000E00000E00000E00001C00001C0000380000380000380000700000700000E000 +00E00000C0000015317DA41C>I<00180000780001F800FFF800FFF80001F80001F80001F80001 F80001F80001F80001F80001F80001F80001F80001F80001F80001F80001F80001F80001F80001 -F80001F80001F80001F80001F80001F80001F80001F80001F80001F8007FFFE07FFFE013207C9F -1C>49 D<03FC000FFF003C1FC07007E07C07F0FE03F0FE03F8FE03F8FE01F87C01F83803F80003 -F80003F00003F00007E00007C0000F80001F00003E0000380000700000E01801C0180380180700 -180E00380FFFF01FFFF03FFFF07FFFF0FFFFF0FFFFF015207D9F1C>I<00FE0007FFC00F07E01E -03F03F03F03F81F83F81F83F81F81F03F81F03F00003F00003E00007C0001F8001FE0001FF0000 -07C00001F00001F80000FC0000FC3C00FE7E00FEFF00FEFF00FEFF00FEFF00FC7E01FC7801F81E -07F00FFFC001FE0017207E9F1C>I<0000E00001E00003E00003E00007E0000FE0001FE0001FE0 -0037E00077E000E7E001C7E00187E00307E00707E00E07E00C07E01807E03807E07007E0E007E0 -FFFFFEFFFFFE0007E00007E00007E00007E00007E00007E00007E000FFFE00FFFE17207E9F1C> -I<1000201E01E01FFFC01FFF801FFF001FFE001FF8001BC00018000018000018000018000019FC -001FFF001E0FC01807E01803E00003F00003F00003F80003F83803F87C03F8FE03F8FE03F8FC03 -F0FC03F07007E03007C01C1F800FFF0003F80015207D9F1C>I<001F8000FFE003F07007C0F00F -01F81F01F83E01F83E01F87E00F07C00007C0000FC0800FC7FC0FCFFE0FD80F0FF00F8FE007CFE -007CFC007EFC007EFC007EFC007E7C007E7C007E7C007E3C007C3E007C1E00F80F00F00783E003 -FFC000FF0017207E9F1C>I<6000007800007FFFFE7FFFFE7FFFFC7FFFF87FFFF87FFFF0E00060 -E000C0C00180C00300C00300000600000C00001C0000180000380000780000780000F00000F000 -00F00001F00001F00001F00003F00003F00003F00003F00003F00003F00003F00001E00017227D -A11C>I<000070000000007000000000F800000000F800000000F800000001FC00000001FC0000 -0003FE00000003FE00000003FE00000006FF000000067F0000000E7F8000000C3F8000000C3F80 -0000183FC00000181FC00000381FE00000300FE00000300FE00000600FF000006007F00000E007 -F80000FFFFF80000FFFFF800018001FC00018001FC00038001FE00030000FE00030000FE000600 -007F000600007F00FFE00FFFF8FFE00FFFF825227EA12A>65 D<0003FE0080001FFF818000FF01 -E38001F8003F8003E0001F8007C0000F800F800007801F800007803F000003803F000003807F00 -0001807E000001807E00000180FE00000000FE00000000FE00000000FE00000000FE00000000FE -00000000FE00000000FE000000007E000000007E000001807F000001803F000001803F00000380 -1F800003000F8000030007C000060003F0000C0001F800380000FF00F000001FFFC0000003FE00 -0021227DA128>67 D<FFFFFF8000FFFFFFF00007F003FC0007F0007E0007F0003F0007F0001F80 -07F0000FC007F00007E007F00007E007F00007F007F00003F007F00003F007F00003F007F00003 -F807F00003F807F00003F807F00003F807F00003F807F00003F807F00003F807F00003F807F000 -03F807F00003F007F00003F007F00003F007F00007E007F00007E007F0000FC007F0001F8007F0 -003F0007F0007E0007F003FC00FFFFFFF000FFFFFF800025227EA12B>I<FFFFFFFCFFFFFFFC07 -F000FC07F0003C07F0001C07F0000C07F0000E07F0000E07F0000607F0180607F0180607F01806 -07F0180007F0380007F0780007FFF80007FFF80007F0780007F0380007F0180007F0180007F018 -0307F0180307F0000307F0000607F0000607F0000607F0000E07F0000E07F0001E07F0003E07F0 -01FCFFFFFFFCFFFFFFFC20227EA125>I<FFFFFFF8FFFFFFF807F001F807F0007807F0003807F0 -001807F0001C07F0001C07F0000C07F0000C07F0180C07F0180C07F0180007F0180007F0380007 -F0780007FFF80007FFF80007F0780007F0380007F0180007F0180007F0180007F0180007F00000 -07F0000007F0000007F0000007F0000007F0000007F0000007F00000FFFFE000FFFFE0001E227E -A123>I<FFFF83FFFEFFFF83FFFE07F0001FC007F0001FC007F0001FC007F0001FC007F0001FC0 -07F0001FC007F0001FC007F0001FC007F0001FC007F0001FC007F0001FC007F0001FC007F0001F -C007FFFFFFC007FFFFFFC007F0001FC007F0001FC007F0001FC007F0001FC007F0001FC007F000 -1FC007F0001FC007F0001FC007F0001FC007F0001FC007F0001FC007F0001FC007F0001FC007F0 -001FC007F0001FC0FFFF83FFFEFFFF83FFFE27227EA12C>72 D<FFFFE0FFFFE003F80003F80003 -F80003F80003F80003F80003F80003F80003F80003F80003F80003F80003F80003F80003F80003 -F80003F80003F80003F80003F80003F80003F80003F80003F80003F80003F80003F80003F80003 -F80003F800FFFFE0FFFFE013227FA115>I<FFFFE000FFFFE00007F0000007F0000007F0000007 +F80001F80001F80001F80001F80001F80001F80001F80001F8007FFFE07FFFE013207C9F1C>49 +D<03FC000FFF003C1FC07007E07C07F0FE03F0FE03F8FE03F8FE01F87C01F83803F80003F80003 +F00003F00007E00007C0000F80001F00003E0000380000700000E01801C0180380180700180E00 +380FFFF01FFFF03FFFF07FFFF0FFFFF0FFFFF015207D9F1C>I<00FE0007FFC00F07E01E03F03F +03F03F81F83F81F83F81F81F03F81F03F00003F00003E00007C0001F8001FE0001FF000007C000 +01F00001F80000FC0000FC3C00FE7E00FEFF00FEFF00FEFF00FEFF00FC7E01FC7801F81E07F00F +FFC001FE0017207E9F1C>I<0000E00001E00003E00003E00007E0000FE0001FE0001FE00037E0 +0077E000E7E001C7E00187E00307E00707E00E07E00C07E01807E03807E07007E0E007E0FFFFFE +FFFFFE0007E00007E00007E00007E00007E00007E00007E000FFFE00FFFE17207E9F1C>I<1000 +201E01E01FFFC01FFF801FFF001FFE001FF8001BC00018000018000018000018000019FC001FFF +001E0FC01807E01803E00003F00003F00003F80003F83803F87C03F8FE03F8FE03F8FC03F0FC03 +F07007E03007C01C1F800FFF0003F80015207D9F1C>I<001F8000FFE003F07007C0F00F01F81F +01F83E01F83E01F87E00F07C00007C0000FC0800FC7FC0FCFFE0FD80F0FF00F8FE007CFE007CFC +007EFC007EFC007EFC007E7C007E7C007E7C007E3C007C3E007C1E00F80F00F00783E003FFC000 +FF0017207E9F1C>I<6000007800007FFFFE7FFFFE7FFFFC7FFFF87FFFF87FFFF0E00060E000C0 +C00180C00300C00300000600000C00001C0000180000380000780000780000F00000F00000F000 +01F00001F00001F00003F00003F00003F00003F00003F00003F00003F00001E00017227DA11C> +I<00FE0003FFC00601E00C00701800701800383800383C00383F00383F80783FE0701FF8E01FFF +C00FFF8007FFC003FFE007FFF01E7FF83C1FFC7807FC7801FEF000FEF0003EF0001EF0001EF000 +1CF8001C7800383C00381F01F00FFFC001FF0017207E9F1C>I<000070000000007000000000F8 +00000000F800000000F800000001FC00000001FC00000003FE00000003FE00000003FE00000006 +FF000000067F0000000E7F8000000C3F8000000C3F800000183FC00000181FC00000381FE00000 +300FE00000300FE00000600FF000006007F00000E007F80000FFFFF80000FFFFF800018001FC00 +018001FC00038001FE00030000FE00030000FE000600007F000600007F00FFE00FFFF8FFE00FFF +F825227EA12A>65 D<0003FE0080001FFF818000FF01E38001F8003F8003E0001F8007C0000F80 +0F800007801F800007803F000003803F000003807F000001807E000001807E00000180FE000000 +00FE00000000FE00000000FE00000000FE00000000FE00000000FE00000000FE000000007E0000 +00007E000001807F000001803F000001803F000003801F800003000F8000030007C000060003F0 +000C0001F800380000FF00F000001FFFC0000003FE000021227DA128>67 +D<FFFFFF8000FFFFFFF00007F003FC0007F0007E0007F0003F0007F0001F8007F0000FC007F000 +07E007F00007E007F00007F007F00003F007F00003F007F00003F007F00003F807F00003F807F0 +0003F807F00003F807F00003F807F00003F807F00003F807F00003F807F00003F807F00003F007 +F00003F007F00003F007F00007E007F00007E007F0000FC007F0001F8007F0003F0007F0007E00 +07F003FC00FFFFFFF000FFFFFF800025227EA12B>I<FFFFFFFCFFFFFFFC07F000FC07F0003C07 +F0001C07F0000C07F0000E07F0000E07F0000607F0180607F0180607F0180607F0180007F03800 +07F0780007FFF80007FFF80007F0780007F0380007F0180007F0180007F0180307F0180307F000 +0307F0000607F0000607F0000607F0000E07F0000E07F0001E07F0003E07F001FCFFFFFFFCFFFF +FFFC20227EA125>I<FFFFFFF8FFFFFFF807F001F807F0007807F0003807F0001807F0001C07F0 +001C07F0000C07F0000C07F0180C07F0180C07F0180007F0180007F0380007F0780007FFF80007 +FFF80007F0780007F0380007F0180007F0180007F0180007F0180007F0000007F0000007F00000 +07F0000007F0000007F0000007F0000007F00000FFFFE000FFFFE0001E227EA123>I<FFFF83FF +FEFFFF83FFFE07F0001FC007F0001FC007F0001FC007F0001FC007F0001FC007F0001FC007F000 +1FC007F0001FC007F0001FC007F0001FC007F0001FC007F0001FC007F0001FC007FFFFFFC007FF +FFFFC007F0001FC007F0001FC007F0001FC007F0001FC007F0001FC007F0001FC007F0001FC007 +F0001FC007F0001FC007F0001FC007F0001FC007F0001FC007F0001FC007F0001FC007F0001FC0 +FFFF83FFFEFFFF83FFFE27227EA12C>72 D<FFFFE0FFFFE003F80003F80003F80003F80003F800 +03F80003F80003F80003F80003F80003F80003F80003F80003F80003F80003F80003F80003F800 +03F80003F80003F80003F80003F80003F80003F80003F80003F80003F80003F80003F800FFFFE0 +FFFFE013227FA115>I<FFFFE000FFFFE00007F0000007F0000007F0000007F0000007F0000007 F0000007F0000007F0000007F0000007F0000007F0000007F0000007F0000007F0000007F00000 -07F0000007F0000007F0000007F0000007F0000007F0000007F0001807F0001807F0001807F000 -1807F0003807F0003807F0007007F0007007F000F007F001F007F007F0FFFFFFF0FFFFFFF01D22 -7EA122>76 D<FFF000000FFFFFF800001FFF07F800001FE006FC000037E006FC000037E006FC00 -0037E0067E000067E0067E000067E0063F0000C7E0063F0000C7E0061F800187E0061F800187E0 -060FC00307E0060FC00307E0060FC00307E00607E00607E00607E00607E00603F00C07E00603F0 -0C07E00601F81807E00601F81807E00601F81807E00600FC3007E00600FC3007E006007E6007E0 -06007E6007E006003FC007E006003FC007E006001F8007E006001F8007E006001F8007E006000F -0007E0FFF00F00FFFFFFF00600FFFF30227EA135>I<0007FC0000003FFF800000FC07E00003F0 -01F80007E000FC000FC0007E001F80003F001F80003F003F00001F803F00001F807F00001FC07E -00000FC07E00000FC0FE00000FE0FE00000FE0FE00000FE0FE00000FE0FE00000FE0FE00000FE0 -FE00000FE0FE00000FE0FE00000FE07E00000FC07F00001FC07F00001FC03F00001F803F80003F -801F80003F000FC0007E0007E000FC0003F001F80000FC07E000003FFF80000007FC000023227D -A12A>79 D<FFFFFF00FFFFFFE007F007F007F001FC07F000FC07F0007E07F0007E07F0007F07F0 -007F07F0007F07F0007F07F0007F07F0007E07F0007E07F000FC07F001FC07F007F007FFFFE007 -FFFF0007F0000007F0000007F0000007F0000007F0000007F0000007F0000007F0000007F00000 -07F0000007F0000007F0000007F00000FFFF8000FFFF800020227EA126>I<01FC0407FF8C1F03 -FC3C007C7C003C78001C78001CF8000CF8000CFC000CFC0000FF0000FFE0007FFF007FFFC03FFF -F01FFFF80FFFFC03FFFE003FFE0003FF00007F00003F00003FC0001FC0001FC0001FE0001EE000 -1EF0003CFC003CFF00F8C7FFE080FF8018227DA11F>83 D<7FFFFFFF807FFFFFFF807E03F80F80 -7803F807807003F803806003F80180E003F801C0E003F801C0C003F800C0C003F800C0C003F800 -C0C003F800C00003F800000003F800000003F800000003F800000003F800000003F800000003F8 -00000003F800000003F800000003F800000003F800000003F800000003F800000003F800000003 -F800000003F800000003F800000003F800000003F800000003F8000003FFFFF80003FFFFF80022 -227EA127>I<FFFF800FFEFFFF800FFE07F00000C007F80000C003F800018003F800018001FC00 -030001FC00030001FE00070000FE00060000FF000600007F000C00007F800C00003F801800003F -801800003FC03800001FC03000001FE03000000FE06000000FF060000007F0C0000007F0C00000 -07F9C0000003F980000003FD80000001FF00000001FF00000000FE00000000FE00000000FE0000 -00007C000000007C00000000380000000038000027227FA12A>86 D<07FC001FFF803F07C03F03 -E03F01E03F01F01E01F00001F00001F0003FF003FDF01FC1F03F01F07E01F0FC01F0FC01F0FC01 -F0FC01F07E02F07E0CF81FF87F07E03F18167E951B>97 D<FF000000FF0000001F0000001F0000 -001F0000001F0000001F0000001F0000001F0000001F0000001F0000001F0000001F0000001F0F -E0001F3FF8001FF07C001F801E001F001F001F000F801F000F801F000FC01F000FC01F000FC01F -000FC01F000FC01F000FC01F000FC01F000FC01F000F801F001F801F801F001FC03E001EE07C00 -1C3FF800180FC0001A237EA21F>I<00FF8007FFE00F83F01F03F03E03F07E03F07C01E07C0000 -FC0000FC0000FC0000FC0000FC0000FC00007C00007E00007E00003E00301F00600FC0E007FF80 -00FE0014167E9519>I<0001FE000001FE0000003E0000003E0000003E0000003E0000003E0000 -003E0000003E0000003E0000003E0000003E0000003E0001FC3E0007FFBE000F81FE001F007E00 -3E003E007E003E007C003E00FC003E00FC003E00FC003E00FC003E00FC003E00FC003E00FC003E -00FC003E007C003E007C003E003E007E001E00FE000F83BE0007FF3FC001FC3FC01A237EA21F> -I<00FE0007FF800F87C01E01E03E01F07C00F07C00F8FC00F8FC00F8FFFFF8FFFFF8FC0000FC00 -00FC00007C00007C00007E00003E00181F00300FC07003FFC000FF0015167E951A>I<003F8000 -FFC001E3E003C7E007C7E00F87E00F83C00F80000F80000F80000F80000F80000F8000FFFC00FF -FC000F80000F80000F80000F80000F80000F80000F80000F80000F80000F80000F80000F80000F -80000F80000F80000F80000F80000F80007FF8007FF80013237FA211>I<03FC1E0FFF7F1F0F8F -3E07CF3C03C07C03E07C03E07C03E07C03E07C03E03C03C03E07C01F0F801FFF0013FC00300000 -3000003800003FFF801FFFF00FFFF81FFFFC3800FC70003EF0001EF0001EF0001EF0001E78003C -7C007C3F01F80FFFE001FF0018217E951C>I<FF000000FF0000001F0000001F0000001F000000 -1F0000001F0000001F0000001F0000001F0000001F0000001F0000001F0000001F07E0001F1FF8 -001F307C001F403C001F803E001F803E001F003E001F003E001F003E001F003E001F003E001F00 -3E001F003E001F003E001F003E001F003E001F003E001F003E001F003E001F003E00FFE1FFC0FF -E1FFC01A237EA21F>I<1C003F007F007F007F003F001C000000000000000000000000000000FF -00FF001F001F001F001F001F001F001F001F001F001F001F001F001F001F001F001F001F001F00 -FFE0FFE00B247EA310>I<0038007C00FE00FE00FE007C00380000000000000000000000000000 -03FE03FE003E003E003E003E003E003E003E003E003E003E003E003E003E003E003E003E003E00 -3E003E003E003E003E003E783EFC3EFC3CFC7C78F87FE01F800F2E83A311>I<FF00FF001F001F +07F0000007F0000007F0000007F0000007F0001807F0001807F0001807F0001807F0003807F000 +3807F0007007F0007007F000F007F001F007F007F0FFFFFFF0FFFFFFF01D227EA122>76 +D<FFF000000FFFFFF800001FFF07F800001FE006FC000037E006FC000037E006FC000037E0067E +000067E0067E000067E0063F0000C7E0063F0000C7E0061F800187E0061F800187E0060FC00307 +E0060FC00307E0060FC00307E00607E00607E00607E00607E00603F00C07E00603F00C07E00601 +F81807E00601F81807E00601F81807E00600FC3007E00600FC3007E006007E6007E006007E6007 +E006003FC007E006003FC007E006001F8007E006001F8007E006001F8007E006000F0007E0FFF0 +0F00FFFFFFF00600FFFF30227EA135>I<0007FC0000003FFF800000FC07E00003F001F80007E0 +00FC000FC0007E001F80003F001F80003F003F00001F803F00001F807F00001FC07E00000FC07E +00000FC0FE00000FE0FE00000FE0FE00000FE0FE00000FE0FE00000FE0FE00000FE0FE00000FE0 +FE00000FE0FE00000FE07E00000FC07F00001FC07F00001FC03F00001F803F80003F801F80003F +000FC0007E0007E000FC0003F001F80000FC07E000003FFF80000007FC000023227DA12A>79 +D<FFFFFF00FFFFFFE007F007F007F001FC07F000FC07F0007E07F0007E07F0007F07F0007F07F0 +007F07F0007F07F0007F07F0007E07F0007E07F000FC07F001FC07F007F007FFFFE007FFFF0007 +F0000007F0000007F0000007F0000007F0000007F0000007F0000007F0000007F0000007F00000 +07F0000007F0000007F00000FFFF8000FFFF800020227EA126>I<01FC0407FF8C1F03FC3C007C +7C003C78001C78001CF8000CF8000CFC000CFC0000FF0000FFE0007FFF007FFFC03FFFF01FFFF8 +0FFFFC03FFFE003FFE0003FF00007F00003F00003FC0001FC0001FC0001FE0001EE0001EF0003C +FC003CFF00F8C7FFE080FF8018227DA11F>83 D<7FFFFFFF807FFFFFFF807E03F80F807803F807 +807003F803806003F80180E003F801C0E003F801C0C003F800C0C003F800C0C003F800C0C003F8 +00C00003F800000003F800000003F800000003F800000003F800000003F800000003F800000003 +F800000003F800000003F800000003F800000003F800000003F800000003F800000003F8000000 +03F800000003F800000003F800000003F800000003F8000003FFFFF80003FFFFF80022227EA127 +>I<FFFF800FFEFFFF800FFE07F00000C007F80000C003F800018003F800018001FC00030001FC +00030001FE00070000FE00060000FF000600007F000C00007F800C00003F801800003F80180000 +3FC03800001FC03000001FE03000000FE06000000FF060000007F0C0000007F0C0000007F9C000 +0003F980000003FD80000001FF00000001FF00000000FE00000000FE00000000FE000000007C00 +0000007C00000000380000000038000027227FA12A>86 D<07FC001FFF803F07C03F03E03F01E0 +3F01F01E01F00001F00001F0003FF003FDF01FC1F03F01F07E01F0FC01F0FC01F0FC01F0FC01F0 +7E02F07E0CF81FF87F07E03F18167E951B>97 D<FF000000FF0000001F0000001F0000001F0000 +001F0000001F0000001F0000001F0000001F0000001F0000001F0000001F0000001F0FE0001F3F +F8001FF07C001F801E001F001F001F000F801F000F801F000FC01F000FC01F000FC01F000FC01F +000FC01F000FC01F000FC01F000FC01F000F801F001F801F801F001FC03E001EE07C001C3FF800 +180FC0001A237EA21F>I<00FF8007FFE00F83F01F03F03E03F07E03F07C01E07C0000FC0000FC +0000FC0000FC0000FC0000FC00007C00007E00007E00003E00301F00600FC0E007FF8000FE0014 +167E9519>I<0001FE000001FE0000003E0000003E0000003E0000003E0000003E0000003E0000 +003E0000003E0000003E0000003E0000003E0001FC3E0007FFBE000F81FE001F007E003E003E00 +7E003E007C003E00FC003E00FC003E00FC003E00FC003E00FC003E00FC003E00FC003E00FC003E +007C003E007C003E003E007E001E00FE000F83BE0007FF3FC001FC3FC01A237EA21F>I<00FE00 +07FF800F87C01E01E03E01F07C00F07C00F8FC00F8FC00F8FFFFF8FFFFF8FC0000FC0000FC0000 +7C00007C00007E00003E00181F00300FC07003FFC000FF0015167E951A>I<03FC1E0FFF7F1F0F +8F3E07CF3C03C07C03E07C03E07C03E07C03E07C03E03C03C03E07C01F0F801FFF0013FC003000 +003000003800003FFF801FFFF00FFFF81FFFFC3800FC70003EF0001EF0001EF0001EF0001E7800 +3C7C007C3F01F80FFFE001FF0018217E951C>103 D<FF000000FF0000001F0000001F0000001F +0000001F0000001F0000001F0000001F0000001F0000001F0000001F0000001F0000001F07E000 +1F1FF8001F307C001F403C001F803E001F803E001F003E001F003E001F003E001F003E001F003E +001F003E001F003E001F003E001F003E001F003E001F003E001F003E001F003E001F003E00FFE1 +FFC0FFE1FFC01A237EA21F>I<1C003F007F007F007F003F001C00000000000000000000000000 +0000FF00FF001F001F001F001F001F001F001F001F001F001F001F001F001F001F001F001F001F +001F00FFE0FFE00B247EA310>I<0038007C00FE00FE00FE007C00380000000000000000000000 +00000003FE03FE003E003E003E003E003E003E003E003E003E003E003E003E003E003E003E003E +003E003E003E003E003E003E003E783EFC3EFC3CFC7C78F87FE01F800F2E83A311>I<FF000000 +FF0000001F0000001F0000001F0000001F0000001F0000001F0000001F0000001F0000001F0000 +001F0000001F0000001F00FF801F00FF801F0038001F0060001F01C0001F0380001F0700001F0E +00001F1C00001F7E00001FFF00001FCF00001F0F80001F07C0001F03E0001F01E0001F01F0001F +00F8001F007C001F003C00FFE0FFC0FFE0FFC01A237EA21E>I<FF00FF001F001F001F001F001F 001F001F001F001F001F001F001F001F001F001F001F001F001F001F001F001F001F001F001F00 -1F001F001F001F001F001F001F001F001F001F00FFE0FFE00B237EA210>108 -D<FF07F007F000FF1FFC1FFC001F303E303E001F403E403E001F801F801F001F801F801F001F00 -1F001F001F001F001F001F001F001F001F001F001F001F001F001F001F001F001F001F001F001F +1F001F001F001F001F001F001F00FFE0FFE00B237EA210>I<FF07F007F000FF1FFC1FFC001F30 +3E303E001F403E403E001F801F801F001F801F801F001F001F001F001F001F001F001F001F001F 001F001F001F001F001F001F001F001F001F001F001F001F001F001F001F001F001F001F001F00 -1F001F00FFE0FFE0FFE0FFE0FFE0FFE02B167E9530>I<FF07E000FF1FF8001F307C001F403C00 -1F803E001F803E001F003E001F003E001F003E001F003E001F003E001F003E001F003E001F003E -001F003E001F003E001F003E001F003E001F003E001F003E00FFE1FFC0FFE1FFC01A167E951F> -I<00FE0007FFC00F83E01E00F03E00F87C007C7C007C7C007CFC007EFC007EFC007EFC007EFC00 -7EFC007EFC007E7C007C7C007C3E00F81F01F00F83E007FFC000FE0017167E951C>I<FF0FE000 -FF3FF8001FF07C001F803E001F001F001F001F801F001F801F000FC01F000FC01F000FC01F000F -C01F000FC01F000FC01F000FC01F000FC01F001F801F001F801F803F001FC03E001FE0FC001F3F -F8001F0FC0001F0000001F0000001F0000001F0000001F0000001F0000001F0000001F000000FF -E00000FFE000001A207E951F>I<FE1F00FE3FC01E67E01EC7E01E87E01E87E01F83C01F00001F -00001F00001F00001F00001F00001F00001F00001F00001F00001F00001F00001F0000FFF000FF -F00013167E9517>114 D<0FF3003FFF00781F00600700E00300E00300F00300FC00007FE0007F -F8003FFE000FFF0001FF00000F80C00780C00380E00380E00380F00700FC0E00EFFC00C7F00011 -167E9516>I<0180000180000180000180000380000380000780000780000F80003F8000FFFF00 -FFFF000F80000F80000F80000F80000F80000F80000F80000F80000F80000F80000F80000F8180 -0F81800F81800F81800F81800F830007C30003FE0000F80011207F9F16>I<FF01FE00FF01FE00 -1F003E001F003E001F003E001F003E001F003E001F003E001F003E001F003E001F003E001F003E -001F003E001F003E001F003E001F003E001F003E001F007E001F00FE000F81BE0007FF3FC001FC -3FC01A167E951F>I<FFE01FE0FFE01FE00F8006000F8006000FC00E0007C00C0007E01C0003E0 -180003E0180001F0300001F0300000F8600000F86000007CC000007CC000007FC000003F800000 -3F8000001F0000001F0000000E0000000E00001B167F951E>I<FFE7FF07F8FFE7FF07F81F0078 -00C00F807801800F807C01800F807C018007C07E030007C0DE030007E0DE070003E0DF060003E1 -8F060001F18F0C0001F38F8C0001FB079C0000FB07D80000FE03D800007E03F000007E03F00000 -7C01F000003C01E000003800E000001800C00025167F9528>I<FFE07FC0FFE07FC00F801C0007 -C0380003E0700003F0600001F8C00000F98000007F8000003F0000001F0000001F8000003FC000 -0037C0000063E00000C1F00001C0F8000380FC0007007E000E003E00FF80FFE0FF80FFE01B167F -951E>I E /Fc 1 98 df<03CC0E2E181C381C301C701CE038E038E038E038C072C072C07260F2 -61341E180F107C8F14>97 D E /Fd 2 104 df<007001C0038007000700070007000700070007 -000700070007000700070007000E001C00F0001C000E0007000700070007000700070007000700 -07000700070007000700038001C000700C257D9B13>102 D<F0001C000E000700070007000700 -070007000700070007000700070007000700038001C0007001C003800700070007000700070007 -0007000700070007000700070007000E001C00F0000C257D9B13>I E /Fe -34 122 df<00FC000182000703000607000E02000E00000E00000E00000E00000E0000FFFF000E -07000E07000E07000E07000E07000E07000E07000E07000E07000E07000E07000E07000E07000E -07007F0FE0131A809915>12 D<60F0F868080808101020C0050B7D990B>39 +1F001F001F001F001F001F001F001F001F001F001F001F001F001F00FFE0FFE0FFE0FFE0FFE0FF +E02B167E9530>I<FF07E000FF1FF8001F307C001F403C001F803E001F803E001F003E001F003E +001F003E001F003E001F003E001F003E001F003E001F003E001F003E001F003E001F003E001F00 +3E001F003E001F003E00FFE1FFC0FFE1FFC01A167E951F>I<00FE0007FFC00F83E01E00F03E00 +F87C007C7C007C7C007CFC007EFC007EFC007EFC007EFC007EFC007EFC007E7C007C7C007C3E00 +F81F01F00F83E007FFC000FE0017167E951C>I<FF0FE000FF3FF8001FF07C001F803E001F001F +001F001F801F001F801F000FC01F000FC01F000FC01F000FC01F000FC01F000FC01F000FC01F00 +0FC01F001F801F001F801F803F001FC03E001FE0FC001F3FF8001F0FC0001F0000001F0000001F +0000001F0000001F0000001F0000001F0000001F000000FFE00000FFE000001A207E951F>I<FE +1F00FE3FC01E67E01EC7E01E87E01E87E01F83C01F00001F00001F00001F00001F00001F00001F +00001F00001F00001F00001F00001F00001F0000FFF000FFF00013167E9517>114 +D<0FF3003FFF00781F00600700E00300E00300F00300FC00007FE0007FF8003FFE000FFF0001FF +00000F80C00780C00380E00380E00380F00700FC0E00EFFC00C7F00011167E9516>I<01800001 +80000180000180000380000380000780000780000F80003F8000FFFF00FFFF000F80000F80000F +80000F80000F80000F80000F80000F80000F80000F80000F80000F81800F81800F81800F81800F +81800F830007C30003FE0000F80011207F9F16>I<FF01FE00FF01FE001F003E001F003E001F00 +3E001F003E001F003E001F003E001F003E001F003E001F003E001F003E001F003E001F003E001F +003E001F003E001F003E001F007E001F00FE000F81BE0007FF3FC001FC3FC01A167E951F>I<FF +E01FE0FFE01FE00F8006000F8006000FC00E0007C00C0007E01C0003E0180003E0180001F03000 +01F0300000F8600000F86000007CC000007CC000007FC000003F8000003F8000001F0000001F00 +00000E0000000E00001B167F951E>I<FFE7FF07F8FFE7FF07F81F007800C00F807801800F807C +01800F807C018007C07E030007C0DE030007E0DE070003E0DF060003E18F060001F18F0C0001F3 +8F8C0001FB079C0000FB07D80000FE03D800007E03F000007E03F000007C01F000003C01E00000 +3800E000001800C00025167F9528>I<FFE07FC0FFE07FC00F801C0007C0380003E0700003F060 +0001F8C00000F98000007F8000003F0000001F0000001F8000003FC0000037C0000063E00000C1 +F00001C0F8000380FC0007007E000E003E00FF80FFE0FF80FFE01B167F951E>I +E /Fe 4 112 df<03CC0E2E181C381C301C701CE038E038E038E038C072C072C07260F261341E +180F107C8F14>97 D<307C1E00598663009E0783809E0703809C0703809C070380380E0700380E +0700380E0700380E0E00701C0E40701C0E40701C1C40701C1C80E0380C80601807001A107C8F1F +>109 D<307C005986009E07009E07009C07009C0700380E00380E00380E00381C00701C80701C +80703880703900E01900600E0011107C8F16>I<01F006180C0C180E300E700E600EE00EE00EE0 +0CE01CE018E030606030C01F000F107C8F14>I E /Ff 2 104 df<007001C00380070007000700 +07000700070007000700070007000700070007000E001C00F0001C000E00070007000700070007 +0007000700070007000700070007000700038001C000700C257D9B13>102 +D<F0001C000E000700070007000700070007000700070007000700070007000700038001C00070 +01C0038007000700070007000700070007000700070007000700070007000E001C00F0000C257D +9B13>I E /Fg 35 122 df<00FC000182000703000607000E02000E00000E00000E00000E0000 +0E0000FFFF000E07000E07000E07000E07000E07000E07000E07000E07000E07000E07000E0700 +0E07000E07000E07007F0FE0131A809915>12 D<60F0F868080808101020C0050B7D990B>39 D<60F0F07010101020204080040B7D830B>44 D<60F0F06004047D830B>46 D<078018603030303060186018E01CE01CE01CE01CE01CE01CE01CE01CE01CE01CE01CE01C6018 601870383030186007800E187E9713>48 D<0F8010E02070607870382038007800700070006000 @@ -214,419 +226,640 @@ D<000C0000000C0000000C0000001E0000001E0000003F00000027000000270000004380000043 007800040038000400380008001C0008001C001C001E00FF00FFC01A1A7F991D>65 D<FFFF000E01C00E00E00E00700E00780E00780E00780E00780E00780E00F00E00E00E03C00FFF 800E01E00E00700E00780E003C0E003C0E003C0E003C0E003C0E00380E00780E00F00E01E0FFFF -80161A7E991B>I<FFFFE00E00E00E00600E00200E00300E00100E00100E00100E04000E04000E -04000E0C000FFC000E0C000E04000E04000E04000E00000E00000E00000E00000E00000E00000E -00000E0000FFF000141A7E9919>70 D<FE01FF0F00380F00100B80100B801009C01008E01008E0 -10087010087010083810081C10081C10080E10080E100807100803900803900801D00801D00800 -F00800700800700800301C0030FF8010181A7E991D>78 D<0FC21836200E6006C006C002C002C0 +80161A7E991B>I<FFF0000E00000E00000E00000E00000E00000E00000E00000E00000E00000E +00000E00000E00000E00000E00000E00000E00000E00200E00200E00200E00600E00400E00400E +00C00E03C0FFFFC0131A7E9918>76 D<FFFF000E03C00E00E00E00700E00700E00780E00780E00 +780E00780E00700E00700E00E00E03C00FFF000E00000E00000E00000E00000E00000E00000E00 +000E00000E00000E00000E0000FFE000151A7E991A>80 D<0FC21836200E6006C006C002C002C0 02E00070007E003FE01FF807FC003E000E00070003800380038003C002C006E004D81887E0101A -7E9915>83 D<FEFEC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0 -C0C0FEFE07257D9B0B>91 D<FEFE06060606060606060606060606060606060606060606060606 -0606060606060606FEFE0725809B0B>93 D<3F8070C070E020700070007007F01C7030707070E0 -70E071E071E0F171FB1E3C10107E8F13>97 D<FC00001C00001C00001C00001C00001C00001C00 -001C00001C00001C00001CF8001F0E001E07001C03801C01801C01C01C01C01C01C01C01C01C01 -C01C01C01C03801C03001E07001B0C0010F000121A7F9915>I<07F80C1C381C30087000E000E0 -00E000E000E000E0007000300438080C1807E00E107F8F11>I<007E00000E00000E00000E0000 -0E00000E00000E00000E00000E00000E0003CE000C3E00380E00300E00700E00E00E00E00E00E0 -0E00E00E00E00E00E00E00600E00700E00381E001C2E0007CFC0121A7F9915>I<07C01C303018 -7018600CE00CFFFCE000E000E000E0006000300438080C1807E00E107F8F11>I<01F003180738 -0E100E000E000E000E000E000E00FFC00E000E000E000E000E000E000E000E000E000E000E000E -000E000E007FE00D1A80990C>I<0FCE187330307038703870387038303018602FC02000600070 -003FF03FFC1FFE600FC003C003C003C0036006381C07E010187F8F13>I<18003C003C00180000 -0000000000000000000000FC001C001C001C001C001C001C001C001C001C001C001C001C001C00 -1C00FF80091A80990A>105 D<FC001C001C001C001C001C001C001C001C001C001C001C001C00 -1C001C001C001C001C001C001C001C001C001C001C001C00FF80091A80990A>108 -D<FC7C1F001D8E63801E0781C01E0781C01C0701C01C0701C01C0701C01C0701C01C0701C01C07 -01C01C0701C01C0701C01C0701C01C0701C01C0701C0FF9FE7F81D107F8F20>I<FCF8001D0C00 -1E0E001E0E001C0E001C0E001C0E001C0E001C0E001C0E001C0E001C0E001C0E001C0E001C0E00 -FF9FC012107F8F15>I<07E01C38300C700E6006E007E007E007E007E007E0076006700E381C1C -3807E010107F8F13>I<FCF8001F0E001E07001C03801C03801C01C01C01C01C01C01C01C01C01 -C01C01C01C03801C03001E07001F0C001CF0001C00001C00001C00001C00001C00001C0000FF80 -0012177F8F15>I<FCE01D701E701E201C001C001C001C001C001C001C001C001C001C001C00FF -C00C107F8F0F>114 D<1F2060E04020C020C020F0007F003FC01FE000F080708030C030C020F0 -408F800C107F8F0F>I<0400040004000C000C001C003C00FFC01C001C001C001C001C001C001C -001C001C201C201C201C201C200E4003800B177F960F>I<FC7E001C0E001C0E001C0E001C0E00 -1C0E001C0E001C0E001C0E001C0E001C0E001C0E001C0E001C1E000C2E0007CFC012107F8F15> -I<FF1F803C06001C04001C04001E0C000E08000E080007100007100007900003A00003A00001C0 -0001C00001C00000800011107F8F14>I<FF3F803C1C001C18000E100007200007600003C00001 -C00001E00003E000027000043800083800181C00381E00FC3FC012107F8F14>120 -D<FF1F803C06001C04001C04001E0C000E08000E080007100007100007900003A00003A00001C0 -0001C00001C000008000008000010000010000E10000E20000E4000078000011177F8F14>I -E /Ff 3 51 df<00C00000C00000C00000C00000C00000C00000C00000C00000C000FFFF80FFFF -8000C00000C00000C00000C00000C00000C00000C00000C00000C00011147E8F17>43 -D<0C003C00CC000C000C000C000C000C000C000C000C000C000C000C000C00FF8009107E8F0F> -49 D<1F00618040C08060C0600060006000C00180030006000C00102020207FC0FFC00B107F8F -0F>I E /Fg 5 107 df<07E01FF83FFC7FFE7FFEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7FFE7F -FE3FFC1FF807E010127D9317>15 D<000000040000000002000000000200000000010000000000 -8000000000400000000020FFFFFFFFFCFFFFFFFFFC000000002000000000400000000080000000 -010000000002000000000200000000040026107D922D>33 D<000F0038006000E001C001C001C0 -01C001C001C001C001C001C001C001C001C001C001C001C0038007001E00F8001E000700038001 -C001C001C001C001C001C001C001C001C001C001C001C001C001C001C000E000600038000F102D -7DA117>102 D<F8001E000700038001C001C001C001C001C001C001C001C001C001C001C001C0 -01C001C001C000E000600038000F0038006000E001C001C001C001C001C001C001C001C001C001 -C001C001C001C001C001C0038007001E00F800102D7DA117>I<C0C0C0C0C0C0C0C0C0C0C0C0C0 -C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0022D7BA10D> -106 D E /Fh 2 51 df<03000700FF000700070007000700070007000700070007000700070007 -00070007000700070007007FF00C157E9412>49 D<0F8030E040708030C038E038403800380070 -0070006000C00180030006000C08080810183FF07FF0FFF00D157E9412>I -E /Fi 44 121 df<387CFEFFFF7F3B030306060E0C18702008107C9F0F>39 -D<387CFEFEFE7C3807077C860F>46 D<00E00001E0000FE000FFE000F3E00003E00003E00003E0 -0003E00003E00003E00003E00003E00003E00003E00003E00003E00003E00003E00003E00003E0 -0003E00003E00003E00003E00003E00003E000FFFF80FFFF80111D7C9C1A>49 -D<07F0001FFE00383F007C1F80FE0FC0FE0FC0FE0FE0FE07E07C07E03807E0000FE0000FC0000F -C0001F80001F00003E0000780000F00000E00001C0000380600700600E00601C00E01FFFC03FFF -C07FFFC0FFFFC0FFFFC0131D7D9C1A>I<01FC0007FF000E0F801E0FC03F07E03F07E03F07E03F -07E01E0FC0000FC0000F80001F0001FC0001FC00000F800007C00003E00003F00003F83803F87C -03F8FE03F8FE03F8FE03F0FC03F07807E03C0FC01FFF8003FC00151D7E9C1A>I<0001C00003C0 -0007C00007C0000FC0001FC0003BC00073C00063C000C3C00183C00383C00703C00E03C00C03C0 -1803C03803C07003C0E003C0FFFFFEFFFFFE0007C00007C00007C00007C00007C00007C000FFFE -00FFFE171D7F9C1A>I<3803803FFF803FFF003FFE003FFC003FF0003F80003000003000003000 -0030000033F8003FFE003C1F00380F803007C00007C00007E00007E07807E0FC07E0FC07E0FC07 -E0FC07C0780FC0600F80381F001FFC0007F000131D7D9C1A>I<003F0001FFC007E0E00F81E01F -03F01E03F03E03F07C03F07C01E07C0000FC1000FCFF00FDFFC0FD03E0FE01F0FE01F0FC01F8FC -01F8FC01F8FC01F87C01F87C01F87C01F83C01F03E01F01E03E00F07C007FF8001FE00151D7E9C -1A>I<6000007FFFF87FFFF87FFFF07FFFE07FFFE0E001C0C00380C00700C00E00000C00001C00 -00380000780000780000F00000F00000F00001F00001F00001F00003F00003F00003F00003F000 -03F00003F00003F00003F00001E000151E7D9D1A>I<01FC0007FF000E07801C01C01800E03800 -E03800E03C00E03F00E03FC1C01FE3801FFF000FFE0007FF8007FFC01FFFE03C3FF0780FF07803 -F8F001F8F000F8F00078F00078F000707800707C00E03E03C00FFF8003FC00151D7E9C1A>I<00 -00E000000000E000000001F000000001F000000001F000000003F800000003F800000006FC0000 -0006FC0000000EFE0000000C7E0000000C7E000000183F000000183F000000303F800000301F80 -0000701FC00000600FC00000600FC00000C007E00000FFFFE00001FFFFF000018003F000018003 -F000030001F800030001F800060001FC00060000FC000E0000FE00FFE00FFFE0FFE00FFFE0231F -7E9E28>65 D<FFFFFE00FFFFFFC007C007E007C003F007C001F807C001FC07C001FC07C001FC07 -C001FC07C001FC07C001F807C003F807C007F007C00FE007FFFF8007FFFFC007C003F007C001F8 -07C001FC07C000FC07C000FE07C000FE07C000FE07C000FE07C000FE07C000FC07C001FC07C003 -F807C007F0FFFFFFE0FFFFFF001F1F7E9E25>I<0007FC02003FFF0E00FE03DE03F000FE07E000 -3E0FC0001E1F80001E3F00000E3F00000E7F0000067E0000067E000006FE000000FE000000FE00 -0000FE000000FE000000FE000000FE0000007E0000007E0000067F0000063F0000063F00000C1F -80000C0FC0001807E0003803F0007000FE01C0003FFF800007FC001F1F7D9E26>I<FFFFFE0000 -FFFFFFC00007E007F00007E001F80007E000FC0007E0007E0007E0003F0007E0003F0007E0001F -8007E0001F8007E0001F8007E0001FC007E0001FC007E0001FC007E0001FC007E0001FC007E000 -1FC007E0001FC007E0001FC007E0001FC007E0001F8007E0001F8007E0001F8007E0003F0007E0 -003F0007E0007E0007E000FC0007E001F80007E007F000FFFFFFC000FFFFFE0000221F7E9E28> -I<FFFFFFE0FFFFFFE007E007E007E001E007E000E007E0006007E0007007E0003007E0003007E0 -603007E0603007E0600007E0E00007E1E00007FFE00007FFE00007E1E00007E0E00007E0600007 -E0600C07E0600C07E0000C07E0001807E0001807E0001807E0003807E0007807E000F807E003F0 -FFFFFFF0FFFFFFF01E1F7E9E22>I<FFFFFFE0FFFFFFE007E007E007E001E007E000E007E00060 -07E0007007E0003007E0003007E0603007E0603007E0600007E0E00007E1E00007FFE00007FFE0 -0007E1E00007E0E00007E0600007E0600007E0600007E0000007E0000007E0000007E0000007E0 -000007E0000007E0000007E00000FFFF8000FFFF80001C1F7E9E21>I<FFFFFFFF07E007E007E0 +7E9915>83 D<7FFFFF00701C0700401C0100401C0100C01C0180801C0080801C0080801C008000 +1C0000001C0000001C0000001C0000001C0000001C0000001C0000001C0000001C0000001C0000 +001C0000001C0000001C0000001C0000001C0000001C0000001C000003FFE000191A7F991C>I< +FF83FF0FF03C007801C01C007800801C007800800E007801000E007801000E009C010007009C02 +0007009C020007010E020007010E020003810E04000382070400038207040001C207080001C403 +880001C403880000E403900000E403900000E801D000007801E000007801E000007000E0000070 +00E000003000C0000020004000241A7F9927>87 D<FEFEC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0 +C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0FEFE07257D9B0B>91 D<FEFE06060606060606060606 +0606060606060606060606060606060606060606060606FEFE0725809B0B>93 +D<3F8070C070E020700070007007F01C7030707070E070E071E071E0F171FB1E3C10107E8F13> +97 D<FC00001C00001C00001C00001C00001C00001C00001C00001C00001C00001CF8001F0E00 +1E07001C03801C01801C01C01C01C01C01C01C01C01C01C01C01C01C03801C03001E07001B0C00 +10F000121A7F9915>I<07F80C1C381C30087000E000E000E000E000E000E0007000300438080C +1807E00E107F8F11>I<007E00000E00000E00000E00000E00000E00000E00000E00000E00000E +0003CE000C3E00380E00300E00700E00E00E00E00E00E00E00E00E00E00E00E00E00600E00700E +00381E001C2E0007CFC0121A7F9915>I<07C01C3030187018600CE00CFFFCE000E000E000E000 +6000300438080C1807E00E107F8F11>I<01F0031807380E100E000E000E000E000E000E00FFC0 +0E000E000E000E000E000E000E000E000E000E000E000E000E000E007FE00D1A80990C>I<0FCE +187330307038703870387038303018602FC02000600070003FF03FFC1FFE600FC003C003C003C0 +036006381C07E010187F8F13>I<18003C003C001800000000000000000000000000FC001C001C +001C001C001C001C001C001C001C001C001C001C001C001C00FF80091A80990A>105 +D<FC001C001C001C001C001C001C001C001C001C001C001C001C001C001C001C001C001C001C00 +1C001C001C001C001C001C00FF80091A80990A>108 D<FC7C1F001D8E63801E0781C01E0781C0 +1C0701C01C0701C01C0701C01C0701C01C0701C01C0701C01C0701C01C0701C01C0701C01C0701 +C01C0701C0FF9FE7F81D107F8F20>I<FCF8001D0C001E0E001E0E001C0E001C0E001C0E001C0E +001C0E001C0E001C0E001C0E001C0E001C0E001C0E00FF9FC012107F8F15>I<07E01C38300C70 +0E6006E007E007E007E007E007E0076006700E381C1C3807E010107F8F13>I<FCF8001F0E001E +07001C03801C03801C01C01C01C01C01C01C01C01C01C01C01C01C03801C03001E07001F0C001C +F0001C00001C00001C00001C00001C00001C0000FF800012177F8F15>I<FCE01D701E701E201C +001C001C001C001C001C001C001C001C001C001C00FFC00C107F8F0F>114 +D<1F2060E04020C020C020F0007F003FC01FE000F080708030C030C020F0408F800C107F8F0F> +I<0400040004000C000C001C003C00FFC01C001C001C001C001C001C001C001C001C201C201C20 +1C201C200E4003800B177F960F>I<FC7E001C0E001C0E001C0E001C0E001C0E001C0E001C0E00 +1C0E001C0E001C0E001C0E001C0E001C1E000C2E0007CFC012107F8F15>I<FF1F803C06001C04 +001C04001E0C000E08000E080007100007100007900003A00003A00001C00001C00001C0000080 +0011107F8F14>I<FF1F803C06001C04001C04001E0C000E08000E080007100007100007900003 +A00003A00001C00001C00001C000008000008000010000010000E10000E20000E4000078000011 +177F8F14>121 D E /Fh 4 52 df<00C00000C00000C00000C00000C00000C00000C00000C000 +00C000FFFF80FFFF8000C00000C00000C00000C00000C00000C00000C00000C00000C00011147E +8F17>43 D<0C003C00CC000C000C000C000C000C000C000C000C000C000C000C000C00FF800910 +7E8F0F>49 D<1F00618040C08060C0600060006000C00180030006000C00102020207FC0FFC00B +107F8F0F>I<1F00218060C060C000C0008001800F00008000400060C060C060804060801F000B +107F8F0F>I E /Fi 5 107 df<07E01FF83FFC7FFE7FFEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF +7FFE7FFE3FFC1FF807E010127D9317>15 D<000000040000000002000000000200000000010000 +0000008000000000400000000020FFFFFFFFFCFFFFFFFFFC000000002000000000400000000080 +000000010000000002000000000200000000040026107D922D>33 D<000F0038006000E001C001 +C001C001C001C001C001C001C001C001C001C001C001C001C001C0038007001E00F8001E000700 +038001C001C001C001C001C001C001C001C001C001C001C001C001C001C001C000E00060003800 +0F102D7DA117>102 D<F8001E000700038001C001C001C001C001C001C001C001C001C001C001 +C001C001C001C001C000E000600038000F0038006000E001C001C001C001C001C001C001C001C0 +01C001C001C001C001C001C001C0038007001E00F800102D7DA117>I<C0C0C0C0C0C0C0C0C0C0 +C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0022D7BA1 +0D>106 D E /Fj 3 52 df<03000700FF00070007000700070007000700070007000700070007 +000700070007000700070007007FF00C157E9412>49 D<0F8030E040708030C038E03840380038 +00700070006000C00180030006000C08080810183FF07FF0FFF00D157E9412>I<0FE030306018 +701C701C001C00180038006007E000300018000C000E000EE00EE00EC00C401830300FE00F157F +9412>I E /Fk 46 121 df<3807007C0F80FE1FC0FF1FE0FF1FE07F0FE03B0760030060030060 +0600C00600C00E01C00C0180180300700E0020040013107E9F1B>34 D<387CFEFFFF7F3B030306 +060E0C18702008107C9F0F>39 D<387CFEFEFE7C3807077C860F>46 D<00E00001E0000FE000FF +E000F3E00003E00003E00003E00003E00003E00003E00003E00003E00003E00003E00003E00003 +E00003E00003E00003E00003E00003E00003E00003E00003E00003E00003E000FFFF80FFFF8011 +1D7C9C1A>49 D<07F0001FFE00383F007C1F80FE0FC0FE0FC0FE0FE0FE07E07C07E03807E0000F +E0000FC0000FC0001F80001F00003E0000780000F00000E00001C0000380600700600E00601C00 +E01FFFC03FFFC07FFFC0FFFFC0FFFFC0131D7D9C1A>I<01FC0007FF000E0F801E0FC03F07E03F +07E03F07E03F07E01E0FC0000FC0000F80001F0001FC0001FC00000F800007C00003E00003F000 +03F83803F87C03F8FE03F8FE03F8FE03F0FC03F07807E03C0FC01FFF8003FC00151D7E9C1A>I< +0001C00003C00007C00007C0000FC0001FC0003BC00073C00063C000C3C00183C00383C00703C0 +0E03C00C03C01803C03803C07003C0E003C0FFFFFEFFFFFE0007C00007C00007C00007C00007C0 +0007C000FFFE00FFFE171D7F9C1A>I<3803803FFF803FFF003FFE003FFC003FF0003F80003000 +0030000030000030000033F8003FFE003C1F00380F803007C00007C00007E00007E07807E0FC07 +E0FC07E0FC07E0FC07C0780FC0600F80381F001FFC0007F000131D7D9C1A>I<003F0001FFC007 +E0E00F81E01F03F01E03F03E03F07C03F07C01E07C0000FC1000FCFF00FDFFC0FD03E0FE01F0FE +01F0FC01F8FC01F8FC01F8FC01F87C01F87C01F87C01F83C01F03E01F01E03E00F07C007FF8001 +FE00151D7E9C1A>I<6000007FFFF87FFFF87FFFF07FFFE07FFFE0E001C0C00380C00700C00E00 +000C00001C0000380000780000780000F00000F00000F00001F00001F00001F00003F00003F000 +03F00003F00003F00003F00003F00003F00001E000151E7D9D1A>I<01FC0007FF000E07801C01 +C01800E03800E03800E03C00E03F00E03FC1C01FE3801FFF000FFE0007FF8007FFC01FFFE03C3F +F0780FF07803F8F001F8F000F8F00078F00078F000707800707C00E03E03C00FFF8003FC00151D +7E9C1A>I<0000E000000000E000000001F000000001F000000001F000000003F800000003F800 +000006FC00000006FC0000000EFE0000000C7E0000000C7E000000183F000000183F000000303F +800000301F800000701FC00000600FC00000600FC00000C007E00000FFFFE00001FFFFF0000180 +03F000018003F000030001F800030001F800060001FC00060000FC000E0000FE00FFE00FFFE0FF +E00FFFE0231F7E9E28>65 D<FFFFFE00FFFFFFC007C007E007C003F007C001F807C001FC07C001 +FC07C001FC07C001FC07C001FC07C001F807C003F807C007F007C00FE007FFFF8007FFFFC007C0 +03F007C001F807C001FC07C000FC07C000FE07C000FE07C000FE07C000FE07C000FE07C000FC07 +C001FC07C003F807C007F0FFFFFFE0FFFFFF001F1F7E9E25>I<0007FC02003FFF0E00FE03DE03 +F000FE07E0003E0FC0001E1F80001E3F00000E3F00000E7F0000067E0000067E000006FE000000 +FE000000FE000000FE000000FE000000FE000000FE0000007E0000007E0000067F0000063F0000 +063F00000C1F80000C0FC0001807E0003803F0007000FE01C0003FFF800007FC001F1F7D9E26> +I<FFFFFE0000FFFFFFC00007E007F00007E001F80007E000FC0007E0007E0007E0003F0007E000 +3F0007E0001F8007E0001F8007E0001F8007E0001FC007E0001FC007E0001FC007E0001FC007E0 +001FC007E0001FC007E0001FC007E0001FC007E0001FC007E0001F8007E0001F8007E0001F8007 +E0003F0007E0003F0007E0007E0007E000FC0007E001F80007E007F000FFFFFFC000FFFFFE0000 +221F7E9E28>I<FFFFFFE0FFFFFFE007E007E007E001E007E000E007E0006007E0007007E00030 +07E0003007E0603007E0603007E0600007E0E00007E1E00007FFE00007FFE00007E1E00007E0E0 +0007E0600007E0600C07E0600C07E0000C07E0001807E0001807E0001807E0003807E0007807E0 +00F807E003F0FFFFFFF0FFFFFFF01E1F7E9E22>I<FFFFFFE0FFFFFFE007E007E007E001E007E0 +00E007E0006007E0007007E0003007E0003007E0603007E0603007E0600007E0E00007E1E00007 +FFE00007FFE00007E1E00007E0E00007E0600007E0600007E0600007E0000007E0000007E00000 +07E0000007E0000007E0000007E0000007E00000FFFF8000FFFF80001C1F7E9E21>I<FFFFFFFF 07E007E007E007E007E007E007E007E007E007E007E007E007E007E007E007E007E007E007E007 -E007E007E007E007E0FFFFFFFF101F7E9E14>73 D<FFFF8000FFFF800007E0000007E0000007E0 -000007E0000007E0000007E0000007E0000007E0000007E0000007E0000007E0000007E0000007 -E0000007E0000007E0000007E0000007E0000007E000C007E000C007E000C007E001C007E001C0 -07E001C007E0038007E0038007E00F8007E01F80FFFFFF80FFFFFF801A1F7E9E1F>76 -D<001FF80000FFFF0001F81F8007E007E00FC003F01F8001F81F0000F83F0000FC7F0000FE7E00 -007E7E00007EFE00007FFE00007FFE00007FFE00007FFE00007FFE00007FFE00007FFE00007FFE -00007F7E00007E7F0000FE7F0000FE3F0000FC3F8001FC1F8001F80FC003F007E007E001F81F80 -00FFFF00001FF800201F7D9E27>79 D<FFFFFE00FFFFFF8007E00FE007E003F007E001F807E001 -F807E001FC07E001FC07E001FC07E001FC07E001FC07E001F807E001F807E003F007E00FE007FF -FF8007FFFE0007E0000007E0000007E0000007E0000007E0000007E0000007E0000007E0000007 -E0000007E0000007E0000007E00000FFFF0000FFFF00001E1F7E9E24>I<FFFFF80000FFFFFF00 -0007E01FC00007E007E00007E003F00007E003F00007E003F80007E003F80007E003F80007E003 -F80007E003F00007E003F00007E007E00007E01FC00007FFFF000007FFFC000007E03E000007E0 -1F000007E01F800007E00FC00007E00FC00007E00FC00007E00FE00007E00FE00007E00FE00007 -E00FE03007E00FF03007E00FF07007E007F860FFFF01FFE0FFFF007F80241F7E9E27>82 +E007E007E007E007E007E007E007E0FFFFFFFF101F7E9E14>73 D<FFFF8000FFFF800007E00000 +07E0000007E0000007E0000007E0000007E0000007E0000007E0000007E0000007E0000007E000 +0007E0000007E0000007E0000007E0000007E0000007E0000007E000C007E000C007E000C007E0 +01C007E001C007E001C007E0038007E0038007E00F8007E01F80FFFFFF80FFFFFF801A1F7E9E1F +>76 D<001FF80000FFFF0001F81F8007E007E00FC003F01F8001F81F0000F83F0000FC7F0000FE +7E00007E7E00007EFE00007FFE00007FFE00007FFE00007FFE00007FFE00007FFE00007FFE0000 +7FFE00007F7E00007E7F0000FE7F0000FE3F0000FC3F8001FC1F8001F80FC003F007E007E001F8 +1F8000FFFF00001FF800201F7D9E27>79 D<FFFFFE00FFFFFF8007E00FE007E003F007E001F807 +E001F807E001FC07E001FC07E001FC07E001FC07E001FC07E001F807E001F807E003F007E00FE0 +07FFFF8007FFFE0007E0000007E0000007E0000007E0000007E0000007E0000007E0000007E000 +0007E0000007E0000007E0000007E00000FFFF0000FFFF00001E1F7E9E24>I<FFFFF80000FFFF +FF000007E01FC00007E007E00007E003F00007E003F00007E003F80007E003F80007E003F80007 +E003F80007E003F00007E003F00007E007E00007E01FC00007FFFF000007FFFC000007E03E0000 +07E01F000007E01F800007E00FC00007E00FC00007E00FC00007E00FE00007E00FE00007E00FE0 +0007E00FE03007E00FF03007E00FF07007E007F860FFFF01FFE0FFFF007F80241F7E9E27>82 D<03FC080FFF381E03F83800F8700078700038F00038F00018F00018F80000FC00007FC0007FFE 003FFF801FFFE00FFFF007FFF000FFF80007F80000FC00007C00003CC0003CC0003CC0003CE000 38E00078F80070FE01E0E7FFC081FF00161F7D9E1D>I<7FFFFFFC7FFFFFFC7C07E07C7007E01C 6007E00C6007E00CE007E00EC007E006C007E006C007E006C007E0060007E0000007E0000007E0 000007E0000007E0000007E0000007E0000007E0000007E0000007E0000007E0000007E0000007 -E0000007E0000007E0000007E0000007E00003FFFFC003FFFFC01F1E7E9D24>I<07FC001FFF00 -3F0F803F07C03F03E03F03E00C03E00003E0007FE007FBE01F03E03C03E07C03E0F803E0F803E0 -F803E0FC05E07E0DE03FF9FE0FE07E17147F9319>97 D<FF0000FF00001F00001F00001F00001F -00001F00001F00001F00001F00001F00001F00001F1FC01F7FF01FE0F81F807C1F007E1F003E1F -003E1F003F1F003F1F003F1F003F1F003F1F003F1F003E1F003E1F007C1F807C1EC1F81C7FE018 -1F8018207E9F1D>I<01FE0007FF801F0FC03E0FC03E0FC07C0FC07C0300FC0000FC0000FC0000 -FC0000FC0000FC00007C00007E00003E00603F00C01F81C007FF0001FC0013147E9317>I<0007 -F80007F80000F80000F80000F80000F80000F80000F80000F80000F80000F80000F801F8F80FFE -F81F83F83E01F87E00F87C00F87C00F8FC00F8FC00F8FC00F8FC00F8FC00F8FC00F87C00F87C00 -F87E00F83E01F81F07F80FFEFF03F8FF18207E9F1D>I<01FE0007FF801F83E03F01F07E00F07E -00F8FC00F8FC00F8FFFFF8FFFFF8FC0000FC0000FC00007C00007E00003E00183F00380F807007 -FFE000FF8015147F9318>I<001F8000FFC001F3E003E7E003C7E007C7E007C3C007C00007C000 -07C00007C00007C000FFFC00FFFC0007C00007C00007C00007C00007C00007C00007C00007C000 -07C00007C00007C00007C00007C00007C00007C00007C0003FFC003FFC0013207F9F10>I<01FC -3C07FFFE0F079E1E03DE3E03E03E03E03E03E03E03E03E03E01E03C00F07800FFF0009FC001800 -001800001C00001FFF800FFFF007FFF81FFFFC3C007C70003EF0001EF0001EF0001E78003C7800 -3C3F01F80FFFE001FF00171E7F931A>I<FF0000FF00001F00001F00001F00001F00001F00001F -00001F00001F00001F00001F00001F0FC01F3FE01F61F01FC0F81F80F81F00F81F00F81F00F81F -00F81F00F81F00F81F00F81F00F81F00F81F00F81F00F81F00F81F00F8FFE3FFFFE3FF18207D9F -1D>I<1C003F007F007F007F003F001C00000000000000000000000000FF00FF001F001F001F00 -1F001F001F001F001F001F001F001F001F001F001F001F001F00FFE0FFE00B217EA00E>I<FF00 -00FF00001F00001F00001F00001F00001F00001F00001F00001F00001F00001F00001F01FE1F01 -FE1F00F01F01C01F03801F07001F1E001F38001F7C001FFE001FFF001F1F001E0F801E07C01E07 -E01E03F01E01F01E00F8FFC3FFFFC3FF18207E9F1C>107 D<FF00FF001F001F001F001F001F00 -1F001F001F001F001F001F001F001F001F001F001F001F001F001F001F001F001F001F001F001F -001F001F001F00FFE0FFE00B207E9F0E>I<FE0FE03F80FE1FF07FC01E70F9C3E01E407D01F01E -807E01F01F807E01F01F007C01F01F007C01F01F007C01F01F007C01F01F007C01F01F007C01F0 -1F007C01F01F007C01F01F007C01F01F007C01F01F007C01F01F007C01F0FFE3FF8FFEFFE3FF8F -FE27147D932E>I<FE0FC0FE3FE01E61F01EC0F81E80F81F00F81F00F81F00F81F00F81F00F81F -00F81F00F81F00F81F00F81F00F81F00F81F00F81F00F8FFE3FFFFE3FF18147D931D>I<01FF00 -07FFC01F83F03E00F83E00F87C007C7C007CFC007EFC007EFC007EFC007EFC007EFC007E7C007C -7C007C3E00F83E00F81F83F007FFC001FF0017147F931A>I<FF1FC0FF7FF01FE1F81F80FC1F00 -7E1F007E1F003E1F003F1F003F1F003F1F003F1F003F1F003F1F003E1F007E1F007C1F80FC1FC1 -F81F7FE01F1F801F00001F00001F00001F00001F00001F00001F0000FFE000FFE000181D7E931D ->I<FE3E00FE7F801ECFC01E8FC01E8FC01F8FC01F03001F00001F00001F00001F00001F00001F -00001F00001F00001F00001F00001F0000FFF000FFF00012147E9316>114 -D<0FE63FFE701E600EE006E006F800FFC07FF83FFC1FFE03FE001FC007C007E007F006F81EFFFC -C7F010147E9315>I<01800180018003800380038007800F803F80FFFCFFFC0F800F800F800F80 -0F800F800F800F800F800F800F860F860F860F860F8607CC03F801F00F1D7F9C14>I<FF07F8FF -07F81F00F81F00F81F00F81F00F81F00F81F00F81F00F81F00F81F00F81F00F81F00F81F00F81F -00F81F01F81F01F80F06F807FCFF03F8FF18147D931D>I<FFE7FE1FE0FFE7FE1FE01F00F00700 -1F00F803000F80F806000F80F8060007C1BC0C0007C1BC0C0007C1BE0C0003E31E180003E31E18 -0001F60F300001F60F300001F60FB00000FC07E00000FC07E000007803C000007803C000007803 -C000003001800023147F9326>119 D<FFE1FF00FFE1FF000F80700007C0E00007E0C00003E180 -0001F3800000FF0000007E0000003E0000003F0000007F8000006F800000C7C0000183E0000381 -F0000701F8000E00FC00FF81FF80FF81FF8019147F931C>I E /Fj 73 127 -df<70F8F8F8F8F8F8F8F8F8F8F8F8F8F8F8F870000000000070F8F8F870051C779B18>33 -D<4010E038F078E038E038E038E038E038E038E038E038E038E03860300D0E7B9C18>I<030600 -078F00078F00078F00078F00078F00078F007FFFC0FFFFE0FFFFE07FFFC00F1E000F1E000F1E00 -0F1E000F1E000F1E007FFFC0FFFFE0FFFFE07FFFC01E3C001E3C001E3C001E3C001E3C001E3C00 -0C1800131C7E9B18>I<3803007C07807C0780EE0F80EE0F00EE0F00EE1F00EE1E00EE1E00EE3E -007C3C007C3C00387C0000780000780000F80000F00001F00001E00001E00003E00003C00003C0 -0007C0000783800787C00F87C00F0EE00F0EE01F0EE01E0EE01E0EE03E0EE03C07C03C07C01803 -8013247E9F18>37 D<387C7C7E3E0E0E0E1C1C38F8F0C0070E789B18>39 -D<007000F001E003C007800F001E001C00380038007000700070007000E000E000E000E000E000 -E000E000E0007000700070007000380038001C001E000F00078003C001F000F000700C24799F18 ->I<6000F00078003C001E000F000780038001C001C000E000E000E000E0007000700070007000 -7000700070007000E000E000E000E001C001C0038007800F001E003C007800F00060000C247C9F -18>I<01C00001C00001C00001C000C1C180F1C780F9CF807FFF001FFC0007F00007F0001FFC00 -7FFF00F9CF80F1C780C1C18001C00001C00001C00001C00011147D9718>I<00600000F00000F0 -0000F00000F00000F00000F00000F0007FFFC0FFFFE0FFFFE07FFFC000F00000F00000F00000F0 -0000F00000F00000F00000600013147E9718>I<1C3E7E7F3F1F070E1E7CF860080C788518>I<7F -FF00FFFF80FFFF807FFF0011047D8F18>I<3078FCFC78300606778518>I<000300000780000780 -000F80000F00001F00001E00001E00003E00003C00007C0000780000780000F80000F00001F000 -01E00003E00003C00003C00007C0000780000F80000F00000F00001F00001E00003E00003C0000 -3C00007C0000780000F80000F00000F0000060000011247D9F18>I<01F00007FC000FFE001F1F -001C07003803807803C07001C07001C0E000E0E000E0E000E0E000E0E000E0E000E0E000E0E000 -E0E000E0F001E07001C07001C07803C03803801C07001F1F000FFE0007FC0001F000131C7E9B18 ->I<01800380038007800F803F80FF80FB80438003800380038003800380038003800380038003 -800380038003800380038003807FFCFFFE7FFC0F1C7B9B18>I<03F0000FFE003FFF007C0F8070 -03C0E001C0F000E0F000E06000E00000E00000E00001C00001C00003C0000780000F00001E0000 -3C0000780000F00001E00007C0000F80001E00E03C00E07FFFE0FFFFE07FFFE0131C7E9B18>I< -07F8001FFE003FFF007807807803C07801C03001C00001C00003C0000380000F0003FF0003FE00 -03FF000007800003C00001C00000E00000E00000E0F000E0F000E0F001C0F003C07C07803FFF00 -1FFE0003F800131C7E9B18>I<001F00003F0000770000770000E70001E70001C7000387000787 -000707000E07001E07003C0700380700780700F00700FFFFF8FFFFF8FFFFF80007000007000007 -00000700000700000700007FF000FFF8007FF0151C7F9B18>I<1FFF803FFF803FFF8038000038 -00003800003800003800003800003800003800003BF8003FFE003FFF003C07801803C00001C000 -00E00000E06000E0F000E0F000E0E001C07003C07C0F803FFF001FFC0003F000131C7E9B18>I< -E00000FFFFE0FFFFE0FFFFE0E003C0E00780000700000E00001E00001C00003800003800007000 -00700000E00000E00000E00001C00001C00001C00001C00003C000038000038000038000038000 -038000038000038000131D7E9C18>55 D<3078FCFC783000000000000000003078FCFC78300614 -779318>58 D<183C7E7E3C180000000000000000183C7E7E3E1E0E1C3C78F060071A789318>I< -000300000780001F80003F00007E0001FC0003F00007E0001FC0003F00007E0000FC0000FC0000 -7E00003F00001FC00007E00003F00001FC00007E00003F00001F8000078000030011187D9918> -I<7FFFC0FFFFE0FFFFE0FFFFE0000000000000000000000000FFFFE0FFFFE0FFFFE07FFFC0130C -7E9318>I<600000F00000FC00007E00003F00001FC00007E00003F00001FC00007E00003F0000 -1F80001F80003F00007E0001FC0003F00007E0001FC0003F00007E0000FC0000F0000060000011 -187D9918>I<0FF0003FFC007FFF00700F00F00380F00380600780000F00003E00007C0001F000 -01E00003C00003C00003C00003C00003C000038000000000000000000000000000000000038000 -07C00007C00007C000038000111C7D9B18>I<007C0001FE0007FF000F87801E03C03C1DC0387F -C070FFE071E3E071C1E0E1C1E0E380E0E380E0E380E0E380E0E380E0E380E0E1C1C071C1C071E3 -C070FF80387F003C1C001E00E00F83E007FFC001FF80007E00131C7E9B18>I<00700000F80000 -F80000D80000D80001DC0001DC0001DC00018C00038E00038E00038E00038E0003060007070007 -07000707000707000FFF800FFF800FFF800E03800E03801C01C01C01C07F07F0FF8FF87F07F015 -1C7F9B18>I<00F8E003FEE007FFE00F07E01E03E03C01E03800E07000E07000E0700000E00000 -E00000E00000E00000E00000E00000E00000E000007000007000E07000E03800E03C00E01E01C0 -0F07C007FF8003FE0000F800131C7E9B18>67 D<FFFFF0FFFFF0FFFFF01C00701C00701C00701C -00701C00001C00001C0E001C0E001C0E001FFE001FFE001FFE001C0E001C0E001C0E001C00001C -00001C00381C00381C00381C00381C0038FFFFF8FFFFF8FFFFF8151C7F9B18>69 -D<FFFFE0FFFFE0FFFFE01C00E01C00E01C00E01C00E01C00001C00001C1C001C1C001C1C001FFC -001FFC001FFC001C1C001C1C001C1C001C00001C00001C00001C00001C00001C00001C0000FFC0 -00FFC000FFC000131C7E9B18>I<01F1C003FDC00FFFC01F0FC01C03C03803C03801C07001C070 -01C0700000E00000E00000E00000E00000E00000E00FF0E01FF0E00FF07001C07001C07003C038 -03C03803C01C07C01F0FC00FFFC003FDC001F1C0141C7E9B18>I<7FFF00FFFF807FFF0001C000 -01C00001C00001C00001C00001C00001C00001C00001C00001C00001C00001C00001C00001C000 -01C00001C00001C00001C00001C00001C00001C00001C0007FFF00FFFF807FFF00111C7D9B18> -73 D<7FE000FFE0007FE0000E00000E00000E00000E00000E00000E00000E00000E00000E0000 -0E00000E00000E00000E00000E00000E00000E00000E00000E00700E00700E00700E00700E0070 -7FFFF0FFFFF07FFFF0141C7F9B18>76 D<FC01F8FE03F8FE03F83B06E03B06E03B06E03B06E03B -8EE03B8EE0398CE0398CE039DCE039DCE039DCE038D8E038D8E038F8E03870E03870E03800E038 -00E03800E03800E03800E03800E0FE03F8FE03F8FE03F8151C7F9B18>I<7E07F0FF0FF87F07F0 -1D81C01D81C01D81C01DC1C01CC1C01CC1C01CE1C01CE1C01CE1C01C61C01C71C01C71C01C31C0 -1C39C01C39C01C39C01C19C01C19C01C1DC01C0DC01C0DC01C0DC07F07C0FF87C07F03C0151C7F -9B18>I<0FF8003FFE007FFF00780F00700700F00780E00380E00380E00380E00380E00380E003 -80E00380E00380E00380E00380E00380E00380E00380E00380E00380E00380F00780700700780F -007FFF003FFE000FF800111C7D9B18>I<FF07F8FF07F8FF07F81C01C01C01C01C01C01C01C00E -03800E03800E03800E03800F0780070700070700070700070700038E00038E00038E00038E0001 -8C0001DC0001DC0001DC0000D80000F80000F800007000151C7F9B18>86 -D<3FFFE07FFFE07FFFE07001C07003C0700780700700000F00001E00001C00003C000078000070 -0000F00001E00001C00003C0000780000700000F00001E00E01C00E03C00E07800E07000E0FFFF -E0FFFFE0FFFFE0131C7E9B18>90 D<FFF8FFF8FFF8E000E000E000E000E000E000E000E000E000 +E0000007E0000007E0000007E0000007E00003FFFFC003FFFFC01F1E7E9D24>I<0400800E01C0 +180300300600700E00600C00600C00C01800C01800DC1B80FE1FC0FF1FE0FF1FE07F0FE03E07C0 +1C038013107B9F1B>92 D<07FC001FFF003F0F803F07C03F03E03F03E00C03E00003E0007FE007 +FBE01F03E03C03E07C03E0F803E0F803E0F803E0FC05E07E0DE03FF9FE0FE07E17147F9319>97 +D<FF0000FF00001F00001F00001F00001F00001F00001F00001F00001F00001F00001F00001F1F +C01F7FF01FE0F81F807C1F007E1F003E1F003E1F003F1F003F1F003F1F003F1F003F1F003F1F00 +3E1F003E1F007C1F807C1EC1F81C7FE0181F8018207E9F1D>I<01FE0007FF801F0FC03E0FC03E +0FC07C0FC07C0300FC0000FC0000FC0000FC0000FC0000FC00007C00007E00003E00603F00C01F +81C007FF0001FC0013147E9317>I<0007F80007F80000F80000F80000F80000F80000F80000F8 +0000F80000F80000F80000F801F8F80FFEF81F83F83E01F87E00F87C00F87C00F8FC00F8FC00F8 +FC00F8FC00F8FC00F8FC00F87C00F87C00F87E00F83E01F81F07F80FFEFF03F8FF18207E9F1D> +I<01FE0007FF801F83E03F01F07E00F07E00F8FC00F8FC00F8FFFFF8FFFFF8FC0000FC0000FC00 +007C00007E00003E00183F00380F807007FFE000FF8015147F9318>I<001F8000FFC001F3E003 +E7E003C7E007C7E007C3C007C00007C00007C00007C00007C000FFFC00FFFC0007C00007C00007 +C00007C00007C00007C00007C00007C00007C00007C00007C00007C00007C00007C00007C00007 +C0003FFC003FFC0013207F9F10>I<01FC3C07FFFE0F079E1E03DE3E03E03E03E03E03E03E03E0 +3E03E01E03C00F07800FFF0009FC001800001800001C00001FFF800FFFF007FFF81FFFFC3C007C +70003EF0001EF0001EF0001E78003C78003C3F01F80FFFE001FF00171E7F931A>I<FF0000FF00 +001F00001F00001F00001F00001F00001F00001F00001F00001F00001F00001F0FC01F3FE01F61 +F01FC0F81F80F81F00F81F00F81F00F81F00F81F00F81F00F81F00F81F00F81F00F81F00F81F00 +F81F00F81F00F8FFE3FFFFE3FF18207D9F1D>I<1C003F007F007F007F003F001C000000000000 +00000000000000FF00FF001F001F001F001F001F001F001F001F001F001F001F001F001F001F00 +1F001F00FFE0FFE00B217EA00E>I<FF0000FF00001F00001F00001F00001F00001F00001F0000 +1F00001F00001F00001F00001F01FE1F01FE1F00F01F01C01F03801F07001F1E001F38001F7C00 +1FFE001FFF001F1F001E0F801E07C01E07E01E03F01E01F01E00F8FFC3FFFFC3FF18207E9F1C> +107 D<FF00FF001F001F001F001F001F001F001F001F001F001F001F001F001F001F001F001F00 +1F001F001F001F001F001F001F001F001F001F001F001F00FFE0FFE00B207E9F0E>I<FE0FE03F +80FE1FF07FC01E70F9C3E01E407D01F01E807E01F01F807E01F01F007C01F01F007C01F01F007C +01F01F007C01F01F007C01F01F007C01F01F007C01F01F007C01F01F007C01F01F007C01F01F00 +7C01F01F007C01F0FFE3FF8FFEFFE3FF8FFE27147D932E>I<FE0FC0FE3FE01E61F01EC0F81E80 +F81F00F81F00F81F00F81F00F81F00F81F00F81F00F81F00F81F00F81F00F81F00F81F00F81F00 +F8FFE3FFFFE3FF18147D931D>I<01FF0007FFC01F83F03E00F83E00F87C007C7C007CFC007EFC +007EFC007EFC007EFC007EFC007E7C007C7C007C3E00F83E00F81F83F007FFC001FF0017147F93 +1A>I<FF1FC0FF7FF01FE1F81F80FC1F007E1F007E1F003E1F003F1F003F1F003F1F003F1F003F +1F003F1F003E1F007E1F007C1F80FC1FC1F81F7FE01F1F801F00001F00001F00001F00001F0000 +1F00001F0000FFE000FFE000181D7E931D>I<FE3E00FE7F801ECFC01E8FC01E8FC01F8FC01F03 +001F00001F00001F00001F00001F00001F00001F00001F00001F00001F00001F0000FFF000FFF0 +0012147E9316>114 D<0FE63FFE701E600EE006E006F800FFC07FF83FFC1FFE03FE001FC007C0 +07E007F006F81EFFFCC7F010147E9315>I<01800180018003800380038007800F803F80FFFCFF +FC0F800F800F800F800F800F800F800F800F800F800F860F860F860F860F8607CC03F801F00F1D +7F9C14>I<FF07F8FF07F81F00F81F00F81F00F81F00F81F00F81F00F81F00F81F00F81F00F81F +00F81F00F81F00F81F00F81F01F81F01F80F06F807FCFF03F8FF18147D931D>I<FFE7FE1FE0FF +E7FE1FE01F00F007001F00F803000F80F806000F80F8060007C1BC0C0007C1BC0C0007C1BE0C00 +03E31E180003E31E180001F60F300001F60F300001F60FB00000FC07E00000FC07E000007803C0 +00007803C000007803C000003001800023147F9326>119 D<FFE1FF00FFE1FF000F80700007C0 +E00007E0C00003E1800001F3800000FF0000007E0000003E0000003F0000007F8000006F800000 +C7C0000183E0000381F0000701F8000E00FC00FF81FF80FF81FF8019147F931C>I +E /Fl 85 127 df<70F8F8F8F8F8F8F8F8F8F8F8F8F8F8F8F870000000000070F8F8F870051C77 +9B18>33 D<4010E038F078E038E038E038E038E038E038E038E038E038E03860300D0E7B9C18> +I<030600078F00078F00078F00078F00078F00078F007FFFC0FFFFE0FFFFE07FFFC00F1E000F1E +000F1E000F1E000F1E000F1E007FFFC0FFFFE0FFFFE07FFFC01E3C001E3C001E3C001E3C001E3C +001E3C000C1800131C7E9B18>I<00C00001C00001C00001C00003F0000FFC003FFE007DCF0071 +C700E1C380E1C780E1C780E1C780F1C00079C0003DC0001FE0000FF80003FC0001DE0001CF0001 +C70061C380F1C380F1C380E1C380E1C70071C70079DE003FFE001FF80007E00001C00001C00001 +C00000C00011247D9F18>I<3803007C07807C0780EE0F80EE0F00EE0F00EE1F00EE1E00EE1E00 +EE3E007C3C007C3C00387C0000780000780000F80000F00001F00001E00001E00003E00003C000 +03C00007C0000783800787C00F87C00F0EE00F0EE01F0EE01E0EE01E0EE03E0EE03C07C03C07C0 +18038013247E9F18>I<01C00007E0000FF0000E70001C38001C38001C38001C38001C73F01C73 +F01CE3F00FE3800FC7000F87000F07001F0E003F0E007B8E0073DC00E1DC00E0F800E0F800E070 +70E0787070FC707FFFE03FCFE00F03C0141C7F9B18>I<387C7C7E3E0E0E0E1C1C38F8F0C0070E +789B18>I<007000F001E003C007800F001E001C00380038007000700070007000E000E000E000 +E000E000E000E000E0007000700070007000380038001C001E000F00078003C001F000F000700C +24799F18>I<6000F00078003C001E000F000780038001C001C000E000E000E000E00070007000 +700070007000700070007000E000E000E000E001C001C0038007800F001E003C007800F0006000 +0C247C9F18>I<01C00001C00001C00001C000C1C180F1C780F9CF807FFF001FFC0007F00007F0 +001FFC007FFF00F9CF80F1C780C1C18001C00001C00001C00001C00011147D9718>I<00600000 +F00000F00000F00000F00000F00000F00000F0007FFFC0FFFFE0FFFFE07FFFC000F00000F00000 +F00000F00000F00000F00000F00000600013147E9718>I<1C3E7E7F3F1F070E1E7CF860080C78 +8518>I<7FFF00FFFF80FFFF807FFF0011047D8F18>I<3078FCFC78300606778518>I<00030000 +0780000780000F80000F00001F00001E00001E00003E00003C00007C0000780000780000F80000 +F00001F00001E00003E00003C00003C00007C0000780000F80000F00000F00001F00001E00003E +00003C00003C00007C0000780000F80000F00000F0000060000011247D9F18>I<01F00007FC00 +0FFE001F1F001C07003803807803C07001C07001C0E000E0E000E0E000E0E000E0E000E0E000E0 +E000E0E000E0E000E0F001E07001C07001C07803C03803801C07001F1F000FFE0007FC0001F000 +131C7E9B18>I<01800380038007800F803F80FF80FB8043800380038003800380038003800380 +0380038003800380038003800380038003807FFCFFFE7FFC0F1C7B9B18>I<03F0000FFE003FFF +007C0F807003C0E001C0F000E0F000E06000E00000E00000E00001C00001C00003C0000780000F +00001E00003C0000780000F00001E00007C0000F80001E00E03C00E07FFFE0FFFFE07FFFE0131C +7E9B18>I<07F8001FFE003FFF007807807803C07801C03001C00001C00003C0000380000F0003 +FF0003FE0003FF000007800003C00001C00000E00000E00000E0F000E0F000E0F001C0F003C07C +07803FFF001FFE0003F800131C7E9B18>I<001F00003F0000770000770000E70001E70001C700 +0387000787000707000E07001E07003C0700380700780700F00700FFFFF8FFFFF8FFFFF8000700 +000700000700000700000700000700007FF000FFF8007FF0151C7F9B18>I<1FFF803FFF803FFF +803800003800003800003800003800003800003800003800003BF8003FFE003FFF003C07801803 +C00001C00000E00000E06000E0F000E0F000E0E001C07003C07C0F803FFF001FFC0003F000131C +7E9B18>I<E00000FFFFE0FFFFE0FFFFE0E003C0E00780000700000E00001E00001C0000380000 +380000700000700000E00000E00000E00001C00001C00001C00001C00003C00003800003800003 +8000038000038000038000038000131D7E9C18>55 D<3078FCFC783000000000000000003078FC +FC78300614779318>58 D<183C7E7E3C180000000000000000183C7E7E3E1E0E1C3C78F060071A +789318>I<000300000780001F80003F00007E0001FC0003F00007E0001FC0003F00007E0000FC +0000FC00007E00003F00001FC00007E00003F00001FC00007E00003F00001F8000078000030011 +187D9918>I<7FFFC0FFFFE0FFFFE0FFFFE0000000000000000000000000FFFFE0FFFFE0FFFFE0 +7FFFC0130C7E9318>I<600000F00000FC00007E00003F00001FC00007E00003F00001FC00007E +00003F00001F80001F80003F00007E0001FC0003F00007E0001FC0003F00007E0000FC0000F000 +0060000011187D9918>I<0FF0003FFC007FFF00700F00F00380F00380600780000F00003E0000 +7C0001F00001E00003C00003C00003C00003C00003C00003800000000000000000000000000000 +000003800007C00007C00007C000038000111C7D9B18>I<007C0001FE0007FF000F87801E03C0 +3C1DC0387FC070FFE071E3E071C1E0E1C1E0E380E0E380E0E380E0E380E0E380E0E380E0E1C1C0 +71C1C071E3C070FF80387F003C1C001E00E00F83E007FFC001FF80007E00131C7E9B18>I<0070 +0000F80000F80000D80000D80001DC0001DC0001DC00018C00038E00038E00038E00038E000306 +000707000707000707000707000FFF800FFF800FFF800E03800E03801C01C01C01C07F07F0FF8F +F87F07F0151C7F9B18>I<FFFC00FFFF00FFFF801C03C01C01C01C00E01C00E01C00E01C00E01C +01E01C01C01C07C01FFF801FFF001FFFC01C03C01C00E01C00F01C00701C00701C00701C00701C +00F01C00E01C03E0FFFFC0FFFF80FFFE00141C7F9B18>I<00F8E003FEE007FFE00F07E01E03E0 +3C01E03800E07000E07000E0700000E00000E00000E00000E00000E00000E00000E00000E00000 +7000007000E07000E03800E03C00E01E01C00F07C007FF8003FE0000F800131C7E9B18>I<7FF8 +00FFFE007FFF001C0F801C03C01C03C01C01E01C00E01C00E01C00F01C00701C00701C00701C00 +701C00701C00701C00701C00701C00F01C00E01C00E01C01E01C01C01C03C01C0F807FFF00FFFE +007FF800141C7F9B18>I<FFFFF0FFFFF0FFFFF01C00701C00701C00701C00701C00001C00001C +0E001C0E001C0E001FFE001FFE001FFE001C0E001C0E001C0E001C00001C00001C00381C00381C +00381C00381C0038FFFFF8FFFFF8FFFFF8151C7F9B18>I<FFFFE0FFFFE0FFFFE01C00E01C00E0 +1C00E01C00E01C00001C00001C1C001C1C001C1C001FFC001FFC001FFC001C1C001C1C001C1C00 +1C00001C00001C00001C00001C00001C00001C0000FFC000FFC000FFC000131C7E9B18>I<01F1 +C003FDC00FFFC01F0FC01C03C03803C03801C07001C07001C0700000E00000E00000E00000E000 +00E00000E00FF0E01FF0E00FF07001C07001C07003C03803C03803C01C07C01F0FC00FFFC003FD +C001F1C0141C7E9B18>I<7FFF00FFFF807FFF0001C00001C00001C00001C00001C00001C00001 +C00001C00001C00001C00001C00001C00001C00001C00001C00001C00001C00001C00001C00001 +C00001C00001C0007FFF00FFFF807FFF00111C7D9B18>73 D<01FFC003FFC001FFC0000E00000E +00000E00000E00000E00000E00000E00000E00000E00000E00000E00000E00000E00000E00000E +00000E00000E00000E00000E00F00E00F00E00F03C007FFC003FF0000FC000121C7D9B18>I<7F +E000FFE0007FE0000E00000E00000E00000E00000E00000E00000E00000E00000E00000E00000E +00000E00000E00000E00000E00000E00000E00000E00700E00700E00700E00700E00707FFFF0FF +FFF07FFFF0141C7F9B18>76 D<FC01F8FE03F8FE03F83B06E03B06E03B06E03B06E03B8EE03B8E +E0398CE0398CE039DCE039DCE039DCE038D8E038D8E038F8E03870E03870E03800E03800E03800 +E03800E03800E03800E0FE03F8FE03F8FE03F8151C7F9B18>I<7E07F0FF0FF87F07F01D81C01D +81C01D81C01DC1C01CC1C01CC1C01CE1C01CE1C01CE1C01C61C01C71C01C71C01C31C01C39C01C +39C01C39C01C19C01C19C01C1DC01C0DC01C0DC01C0DC07F07C0FF87C07F03C0151C7F9B18>I< +0FF8003FFE007FFF00780F00700700F00780E00380E00380E00380E00380E00380E00380E00380 +E00380E00380E00380E00380E00380E00380E00380E00380E00380F00780700700780F007FFF00 +3FFE000FF800111C7D9B18>I<FFFE00FFFF80FFFFC01C03C01C01E01C00E01C00701C00701C00 +701C00701C00701C00E01C01E01C03C01FFFC01FFF801FFE001C00001C00001C00001C00001C00 +001C00001C00001C0000FF8000FF8000FF8000141C7F9B18>I<7FF800FFFE007FFF001C0F801C +03801C03C01C01C01C01C01C01C01C03C01C03801C0F801FFF001FFE001FFE001C0F001C07001C +03801C03801C03801C03801C03801C039C1C039C1C039C7F01F8FF81F87F00F0161C7F9B18>82 +D<7FFFF8FFFFF8FFFFF8E07038E07038E07038E070380070000070000070000070000070000070 +0000700000700000700000700000700000700000700000700000700000700000700000700007FF +0007FF0007FF00151C7F9B18>84 D<FF83FEFF83FEFF83FE1C00701C00701C00701C00701C0070 +1C00701C00701C00701C00701C00701C00701C00701C00701C00701C00701C00701C00701C0070 +1C00700E00E00F01E00783C003FF8001FF00007C00171C809B18>I<FF07F8FF07F8FF07F81C01 +C01C01C01C01C01C01C00E03800E03800E03800E03800F0780070700070700070700070700038E +00038E00038E00038E00018C0001DC0001DC0001DC0000D80000F80000F800007000151C7F9B18 +>I<FE03F8FE03F8FE03F87000707000707000703800E03800E03800E03800E03800E038F8E038 +F8E039DCE039DCE019DCC019DCC019DCC0198CC01D8DC01D8DC01D8DC01D8DC00D8D800D05800F +07800F07800E0380151C7F9B18>I<3FFFE07FFFE07FFFE07001C07003C0700780700700000F00 +001E00001C00003C0000780000700000F00001E00001C00003C0000780000700000F00001E00E0 +1C00E03C00E07800E07000E0FFFFE0FFFFE0FFFFE0131C7E9B18>90 D<FFF8FFF8FFF8E000E000 E000E000E000E000E000E000E000E000E000E000E000E000E000E000E000E000E000E000E000E0 -00E000FFF8FFF8FFF80D24779F18>I<600000F00000F00000F800007800007C00003C00003C00 -003E00001E00001F00000F00000F00000F800007800007C00003C00003C00003E00001E00001F0 -0000F00000F800007800007800007C00003C00003E00001E00001E00001F00000F00000F800007 -8000078000030011247D9F18>I<FFF8FFF8FFF800380038003800380038003800380038003800 +00E000E000E000E000E000E000E000E000FFF8FFF8FFF80D24779F18>I<600000F00000F00000 +F800007800007C00003C00003C00003E00001E00001F00000F00000F00000F800007800007C000 +03C00003C00003E00001E00001F00000F00000F800007800007800007C00003C00003E00001E00 +001E00001F00000F00000F8000078000078000030011247D9F18>I<FFF8FFF8FFF80038003800 380038003800380038003800380038003800380038003800380038003800380038003800380038 -0038FFF8FFF8FFF80D247F9F18>I<7FFF00FFFF80FFFF807FFF0011047D7F18>95 -D<061E3E387070E0E0E0F8FC7C7C38070E789E18>I<1FE0003FF8007FFC00781E00300E000007 -0000070000FF0007FF001FFF007F0700780700E00700E00700E00700F00F00781F003FFFF01FFB -F007E1F014147D9318>I<7E0000FE00007E00000E00000E00000E00000E00000E00000E3E000E -FF800FFFC00FC1E00F80E00F00700E00700E00380E00380E00380E00380E00380E00380F00700F -00700F80E00FC1E00FFFC00EFF80063E00151C809B18>I<01FE0007FF001FFF803E0780380300 -700000700000E00000E00000E00000E00000E00000E000007000007001C03801C03E03C01FFF80 -07FF0001FC0012147D9318>I<001F80003F80001F8000038000038000038000038000038003E3 -800FFB801FFF803C1F80380F80700780700380E00380E00380E00380E00380E00380E003807007 -80700780380F803C1F801FFFF00FFBF803E3F0151C7E9B18>I<01F00007FC001FFE003E0F0038 -0780700380700380E001C0E001C0FFFFC0FFFFC0FFFFC0E000007000007001C03801C03E03C01F -FF8007FF0001FC0012147D9318>I<001F80007FC000FFE000E1E001C0C001C00001C00001C000 -7FFFC0FFFFC0FFFFC001C00001C00001C00001C00001C00001C00001C00001C00001C00001C000 -01C00001C00001C00001C0007FFF007FFF007FFF00131C7F9B18>I<01E1F007FFF80FFFF81E1E -301C0E003807003807003807003807003807001C0E001E1E001FFC001FF80039E0003800001C00 -001FFE001FFFC03FFFE07801F0700070E00038E00038E00038E000387800F07E03F01FFFC00FFF -8001FC00151F7F9318>I<7E0000FE00007E00000E00000E00000E00000E00000E00000E3E000E -FF800FFFC00FC1C00F80E00F00E00E00E00E00E00E00E00E00E00E00E00E00E00E00E00E00E00E -00E00E00E00E00E07FC3FCFFE7FE7FC3FC171C809B18>I<03800007C00007C00007C000038000 -0000000000000000000000007FC000FFC0007FC00001C00001C00001C00001C00001C00001C000 -01C00001C00001C00001C00001C00001C00001C00001C000FFFF00FFFF80FFFF00111D7C9C18> -I<0038007C007C007C003800000000000000000FFC1FFC0FFC001C001C001C001C001C001C001C -001C001C001C001C001C001C001C001C001C001C001C001C001C001C001C6038F078FFF07FE03F -800E277E9C18>I<FE0000FE0000FE00000E00000E00000E00000E00000E00000E3FF00E7FF00E -3FF00E07800E0F000E1E000E3C000E78000EF0000FF8000FFC000F9C000F0E000E0F000E07000E -03800E03C0FFC7F8FFC7F8FFC7F8151C7F9B18>I<7FE000FFE0007FE00000E00000E00000E000 -00E00000E00000E00000E00000E00000E00000E00000E00000E00000E00000E00000E00000E000 -00E00000E00000E00000E00000E00000E0007FFFC0FFFFE07FFFC0131C7E9B18>I<7CE0E000FF -FBF8007FFFF8001F1F1C001E1E1C001E1E1C001C1C1C001C1C1C001C1C1C001C1C1C001C1C1C00 -1C1C1C001C1C1C001C1C1C001C1C1C001C1C1C001C1C1C007F1F1F00FFBFBF807F1F1F00191481 -9318>I<7E3E00FEFF807FFFC00FC1C00F80E00F00E00E00E00E00E00E00E00E00E00E00E00E00 -E00E00E00E00E00E00E00E00E00E00E07FC3FCFFE7FE7FC3FC1714809318>I<01F0000FFE001F -FF003E0F803803807001C07001C0E000E0E000E0E000E0E000E0E000E0F001E07001C07803C03C -07803E0F801FFF000FFE0001F00013147E9318>I<7E3E00FEFF807FFFC00FC1E00F80E00F0070 -0E00700E00380E00380E00380E00380E00380E00380F00700F00700F80E00FC1E00FFFC00EFF80 -0E3E000E00000E00000E00000E00000E00000E00000E00007FC000FFE0007FC000151E809318> -I<01E38007FB801FFF803E1F80380F80700780700780E00380E00380E00380E00380E00380E003 -80700780700780380F803C1F801FFF800FFB8003E3800003800003800003800003800003800003 -80000380003FF8003FF8003FF8151E7E9318>I<7F87E0FF9FF07FBFF803F87803F03003E00003 -C00003C0000380000380000380000380000380000380000380000380000380007FFE00FFFF007F -FE0015147F9318>I<07F7003FFF007FFF00780F00E00700E00700E007007C00007FE0001FFC00 -03FE00001F00600780E00380E00380F00380F80F00FFFF00FFFC00E7F00011147D9318>I<0180 -000380000380000380000380007FFFC0FFFFC0FFFFC00380000380000380000380000380000380 -000380000380000380000380400380E00380E00380E001C1C001FFC000FF80003E0013197F9818 ->I<7E07E0FE0FE07E07E00E00E00E00E00E00E00E00E00E00E00E00E00E00E00E00E00E00E00E -00E00E00E00E00E00E01E00F03E007FFFC03FFFE01FCFC1714809318>I<7F8FF0FF8FF87F8FF0 -1E03C00E03800E03800E0380070700070700070700038E00038E00038E00038E0001DC0001DC00 -01DC0000F80000F80000700015147F9318>I<FF8FF8FF8FF8FF8FF83800E03800E03800E01C01 -C01C01C01C71C01CF9C01CF9C01CD9C01CD9C00DDD800DDD800DDD800D8D800F8F800F8F800707 -0015147F9318>I<7F8FF07F9FF07F8FF0070700078E00039E0001DC0001F80000F80000700000 -F00000F80001DC00039E00038E000707000F07807F8FF0FF8FF87F8FF015147F9318>I<7F8FF0 -FF8FF87F8FF00E01C00E03800E0380070380070700070700038700038600038E0001CE0001CE00 -00CC0000CC0000DC0000780000780000780000700000700000700000F00000E00079E0007BC000 -7F80003F00001E0000151E7F9318>I<0007E0001FE0007FE000780000E00000E00000E00000E0 -0000E00000E00000E00000E00000E00000E00000E00001E0007FC000FF8000FF80007FC00001E0 -0000E00000E00000E00000E00000E00000E00000E00000E00000E00000E00000E000007800007F -E0001FE00007E013247E9F18>123 D<60F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0 -F0F0F0F0F0F0F0F0F0F0F0F0600424769F18>I<7C0000FF0000FFC00003C00000E00000E00000 -E00000E00000E00000E00000E00000E00000E00000E00000E00000F000007FC0003FE0003FE000 -7FC000F00000E00000E00000E00000E00000E00000E00000E00000E00000E00000E00000E00003 -C000FFC000FF00007C000013247E9F18>I<060C1F1E3FBEFBF8F1F060C00F067C9B18>I -E /Fk 27 121 df<00003FE00000E0100001803800038078000300780007003000070000000700 -0000070000000E0000000E0000000E000000FFFFE0000E00E0001C01C0001C01C0001C01C0001C -01C0001C03800038038000380380003803800038070000380700007007000070071000700E2000 -700E2000700E2000E00E2000E0064000E0038000E0000000C0000001C0000001C0000031800000 -79800000F3000000620000003C0000001D29829F1A>12 D<00003FC0FF800000E0E38040000181 -E600E0000381EC01E0000300DC01E00007001C00C0000700180000000700380000000E00380000 -000E00380000000E00380000000E0070000000FFFFFFFF80001C00700380001C00700700001C00 -700700001C00700700001C00E00700001C00E00E00003800E00E00003800E00E00003800E00E00 -003801C01C00003801C01C00007001C01C00007001C01C40007001C03880007003803880007003 -80388000E00380388000E00380190000E003000E0000E00700000000C00700000001C006000000 -01C00600000031860E000000798F0C000000F31E18000000620C300000003C07C00000002B2982 -9F28>14 D<0E1F3F3F1D0102020404081020C0080E779F0E>39 D<000200020006000E003C00DC -031C001C0038003800380038007000700070007000E000E000E000E001C001C001C001C0038003 -80038003800780FFF80F1E7B9D17>49 D<0000FE0200078186001C004C0038003C0060003C00C0 -001C01C0001803800018070000180F0000181E0000101E0000103C0000003C0000007800000078 -0000007800000078000000F0000000F0000000F0000000F0000000F00000807000008070000080 -700001003800010038000200180004000C001800060020000381C00000FE00001F217A9F21>67 -D<01FF007FE0001F000F00001F0004000017800400001780040000278008000023C008000023C0 -08000023C008000041E010000041E010000041F010000040F010000080F0200000807820000080 -782000008078200001003C400001003C400001003C400001001E400002001E800002001E800002 -000F800002000F800004000F0000040007000004000700000C000700001C00020000FF80020000 -231F7D9E22>78 D<00F1800389C00707800E03801C03803C0380380700780700780700780700F0 -0E00F00E00F00E00F00E20F01C40F01C40703C40705C40308C800F070013147C9317>97 -D<07803F8007000700070007000E000E000E000E001C001C001CF01D0C3A0E3C0E380F380F700F -700F700F700FE01EE01EE01EE01CE03CE038607060E031C01F0010207B9F15>I<007E0001C100 -0300800E07801E07801C07003C0200780000780000780000F00000F00000F00000F00000F00000 -70010070020030040018380007C00011147C9315>I<0000780003F80000700000700000700000 -700000E00000E00000E00000E00001C00001C000F1C00389C00707800E03801C03803C03803807 -00780700780700780700F00E00F00E00F00E00F00E20F01C40F01C40703C40705C40308C800F07 -0015207C9F17>I<007C01C207010E011C013C013802780C7BF07C00F000F000F000F000700070 -0170023804183807C010147C9315>I<00007800019C00033C00033C000718000700000700000E -00000E00000E00000E00000E0001FFE0001C00001C00001C00001C000038000038000038000038 -0000380000700000700000700000700000700000700000E00000E00000E00000E00000C00001C0 -0001C0000180003180007B0000F300006600003C00001629829F0E>I<003C6000E27001C1E003 -80E00700E00F00E00E01C01E01C01E01C01E01C03C03803C03803C03803C03803C07003C07001C -0F001C17000C2E0003CE00000E00000E00001C00001C00301C00783800F0700060E0003F800014 -1D7E9315>I<00C001E001E001C000000000000000000000000000000E00330023004380430047 -0087000E000E000E001C001C001C003840388030807080310033001C000B1F7C9E0E>105 -D<0001800003C00003C0000380000000000000000000000000000000000000000000003C000046 -00008700008700010700010700020E00000E00000E00000E00001C00001C00001C00001C000038 -0000380000380000380000700000700000700000700000E00000E00030E00079C000F180006300 -003C00001228829E0E>I<01E0000FE00001C00001C00001C00001C00003800003800003800003 -80000700000700000703C00704200E08E00E11E00E21E00E40C01C80001D00001E00001FC00038 -E000387000387000383840707080707080707080703100E03100601E0013207D9F15>I<03C01F -C0038003800380038007000700070007000E000E000E000E001C001C001C001C00380038003800 -38007000700070007100E200E200E200E200640038000A207C9F0C>I<1C0F80F0002630C31800 -4740640C004780680E004700700E004700700E008E00E01C000E00E01C000E00E01C000E00E01C -001C01C038001C01C038001C01C038001C01C0708038038071003803806100380380E100380380 -62007007006600300300380021147C9325>I<1C0F802630C04740604780604700704700708E00 -E00E00E00E00E00E00E01C01C01C01C01C01C01C03843803883803083807083803107003303001 -C016147C931A>I<007C0001C3000301800E01C01E01C01C01E03C01E07801E07801E07801E0F0 -03C0F003C0F003C0F00780F00700700F00700E0030180018700007C00013147C9317>I<01C1E0 -02621804741C04781C04701E04701E08E01E00E01E00E01E00E01E01C03C01C03C01C03C01C038 -0380780380700380E003C1C0072380071E000700000700000E00000E00000E00000E00001C0000 -1C0000FFC000171D809317>I<1C1E002661004783804787804707804703008E00000E00000E00 -000E00001C00001C00001C00001C000038000038000038000038000070000030000011147C9313 ->114 D<00FC030206010C030C070C060C000F800FF007F803FC003E000E700EF00CF00CE00840 -1020601F8010147D9313>I<018001C0038003800380038007000700FFF007000E000E000E000E -001C001C001C001C003800380038003820704070407080708031001E000C1C7C9B0F>I<0E00C0 -3300E02301C04381C04301C04701C08703800E03800E03800E03801C07001C07001C07001C0710 -1C0E20180E20180E201C1E200C264007C38014147C9318>I<0E03803307802307C04383C04301 -C04700C08700800E00800E00800E00801C01001C01001C01001C02001C02001C04001C04001C08 -000E300003C00012147C9315>I<0383800CC4401068E01071E02071E02070C040E00000E00000 -E00000E00001C00001C00001C00001C040638080F38080F38100E5810084C60078780013147D93 -15>120 D E /Fl 40 122 df<0001FF0000001FFFC000007F80F00000FE00F80003FC01FC0003 -F803FC0007F003FC0007F003FC0007F003FC0007F001F80007F000F00007F000000007F0000000 -07F000000007F0000000FFFFFFFC00FFFFFFFC00FFFFFFFC0007F001FC0007F001FC0007F001FC +00380038003800380038003800380038FFF8FFF8FFF80D247F9F18>I<018007C01FF07EFCF83E +E00E0F067C9B18>I<7FFF00FFFF80FFFF807FFF0011047D7F18>I<061E3E387070E0E0E0F8FC7C +7C38070E789E18>I<1FE0003FF8007FFC00781E00300E0000070000070000FF0007FF001FFF00 +7F0700780700E00700E00700E00700F00F00781F003FFFF01FFBF007E1F014147D9318>I<7E00 +00FE00007E00000E00000E00000E00000E00000E00000E3E000EFF800FFFC00FC1E00F80E00F00 +700E00700E00380E00380E00380E00380E00380E00380F00700F00700F80E00FC1E00FFFC00EFF +80063E00151C809B18>I<01FE0007FF001FFF803E0780380300700000700000E00000E00000E0 +0000E00000E00000E000007000007001C03801C03E03C01FFF8007FF0001FC0012147D9318>I< +001F80003F80001F8000038000038000038000038000038003E3800FFB801FFF803C1F80380F80 +700780700380E00380E00380E00380E00380E00380E00380700780700780380F803C1F801FFFF0 +0FFBF803E3F0151C7E9B18>I<01F00007FC001FFE003E0F00380780700380700380E001C0E001 +C0FFFFC0FFFFC0FFFFC0E000007000007001C03801C03E03C01FFF8007FF0001FC0012147D9318 +>I<001F80007FC000FFE000E1E001C0C001C00001C00001C0007FFFC0FFFFC0FFFFC001C00001 +C00001C00001C00001C00001C00001C00001C00001C00001C00001C00001C00001C00001C0007F +FF007FFF007FFF00131C7F9B18>I<01E1F007FFF80FFFF81E1E301C0E00380700380700380700 +3807003807001C0E001E1E001FFC001FF80039E0003800001C00001FFE001FFFC03FFFE07801F0 +700070E00038E00038E00038E000387800F07E03F01FFFC00FFF8001FC00151F7F9318>I<7E00 +00FE00007E00000E00000E00000E00000E00000E00000E3E000EFF800FFFC00FC1C00F80E00F00 +E00E00E00E00E00E00E00E00E00E00E00E00E00E00E00E00E00E00E00E00E00E00E07FC3FCFFE7 +FE7FC3FC171C809B18>I<03800007C00007C00007C0000380000000000000000000000000007F +C000FFC0007FC00001C00001C00001C00001C00001C00001C00001C00001C00001C00001C00001 +C00001C00001C00001C000FFFF00FFFF80FFFF00111D7C9C18>I<0038007C007C007C00380000 +0000000000000FFC1FFC0FFC001C001C001C001C001C001C001C001C001C001C001C001C001C00 +1C001C001C001C001C001C001C001C001C6038F078FFF07FE03F800E277E9C18>I<FE0000FE00 +00FE00000E00000E00000E00000E00000E00000E3FF00E7FF00E3FF00E07800E0F000E1E000E3C +000E78000EF0000FF8000FFC000F9C000F0E000E0F000E07000E03800E03C0FFC7F8FFC7F8FFC7 +F8151C7F9B18>I<7FE000FFE0007FE00000E00000E00000E00000E00000E00000E00000E00000 +E00000E00000E00000E00000E00000E00000E00000E00000E00000E00000E00000E00000E00000 +E00000E0007FFFC0FFFFE07FFFC0131C7E9B18>I<7CE0E000FFFBF8007FFFF8001F1F1C001E1E +1C001E1E1C001C1C1C001C1C1C001C1C1C001C1C1C001C1C1C001C1C1C001C1C1C001C1C1C001C +1C1C001C1C1C001C1C1C007F1F1F00FFBFBF807F1F1F001914819318>I<7E3E00FEFF807FFFC0 +0FC1C00F80E00F00E00E00E00E00E00E00E00E00E00E00E00E00E00E00E00E00E00E00E00E00E0 +0E00E07FC3FCFFE7FE7FC3FC1714809318>I<01F0000FFE001FFF003E0F803803807001C07001 +C0E000E0E000E0E000E0E000E0E000E0F001E07001C07803C03C07803E0F801FFF000FFE0001F0 +0013147E9318>I<7E3E00FEFF807FFFC00FC1E00F80E00F00700E00700E00380E00380E00380E +00380E00380E00380F00700F00700F80E00FC1E00FFFC00EFF800E3E000E00000E00000E00000E +00000E00000E00000E00007FC000FFE0007FC000151E809318>I<01E38007FB801FFF803E1F80 +380F80700780700780E00380E00380E00380E00380E00380E00380700780700780380F803C1F80 +1FFF800FFB8003E380000380000380000380000380000380000380000380003FF8003FF8003FF8 +151E7E9318>I<7F87E0FF9FF07FBFF803F87803F03003E00003C00003C0000380000380000380 +000380000380000380000380000380000380007FFE00FFFF007FFE0015147F9318>I<07F7003F +FF007FFF00780F00E00700E00700E007007C00007FE0001FFC0003FE00001F00600780E00380E0 +0380F00380F80F00FFFF00FFFC00E7F00011147D9318>I<018000038000038000038000038000 +7FFFC0FFFFC0FFFFC0038000038000038000038000038000038000038000038000038000038040 +0380E00380E00380E001C1C001FFC000FF80003E0013197F9818>I<7E07E0FE0FE07E07E00E00 +E00E00E00E00E00E00E00E00E00E00E00E00E00E00E00E00E00E00E00E00E00E00E00E01E00F03 +E007FFFC03FFFE01FCFC1714809318>I<7F8FF0FF8FF87F8FF01E03C00E03800E03800E038007 +0700070700070700038E00038E00038E00038E0001DC0001DC0001DC0000F80000F80000700015 +147F9318>I<FF8FF8FF8FF8FF8FF83800E03800E03800E01C01C01C01C01C71C01CF9C01CF9C0 +1CD9C01CD9C00DDD800DDD800DDD800D8D800F8F800F8F8007070015147F9318>I<7F8FF07F9F +F07F8FF0070700078E00039E0001DC0001F80000F80000700000F00000F80001DC00039E00038E +000707000F07807F8FF0FF8FF87F8FF015147F9318>I<7F8FF0FF8FF87F8FF00E01C00E03800E +0380070380070700070700038700038600038E0001CE0001CE0000CC0000CC0000DC0000780000 +780000780000700000700000700000F00000E00079E0007BC0007F80003F00001E0000151E7F93 +18>I<3FFFF07FFFF07FFFF07001E07003C0700780000F00001E00003C0000F80001F00003C000 +0780000F00701E00703C0070780070FFFFF0FFFFF0FFFFF014147F9318>I<0007E0001FE0007F +E000780000E00000E00000E00000E00000E00000E00000E00000E00000E00000E00000E00001E0 +007FC000FF8000FF80007FC00001E00000E00000E00000E00000E00000E00000E00000E00000E0 +0000E00000E00000E000007800007FE0001FE00007E013247E9F18>I<60F0F0F0F0F0F0F0F0F0 +F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0600424769F18>I<7C0000FF0000 +FFC00003C00000E00000E00000E00000E00000E00000E00000E00000E00000E00000E00000E000 +00F000007FC0003FE0003FE0007FC000F00000E00000E00000E00000E00000E00000E00000E000 +00E00000E00000E00000E00003C000FFC000FF00007C000013247E9F18>I<060C1F1E3FBEFBF8 +F1F060C00F067C9B18>I E /Fm 33 122 df<00003FE00000E010000180380003807800030078 +00070030000700000007000000070000000E0000000E0000000E000000FFFFE0000E00E0001C01 +C0001C01C0001C01C0001C01C0001C038000380380003803800038038000380700003807000070 +07000070071000700E2000700E2000700E2000E00E2000E0064000E0038000E0000000C0000001 +C0000001C000003180000079800000F3000000620000003C0000001D29829F1A>12 +D<00003FC0FF800000E0E38040000181E600E0000381EC01E0000300DC01E00007001C00C00007 +00180000000700380000000E00380000000E00380000000E00380000000E0070000000FFFFFFFF +80001C00700380001C00700700001C00700700001C00700700001C00E00700001C00E00E000038 +00E00E00003800E00E00003800E00E00003801C01C00003801C01C00007001C01C00007001C01C +40007001C0388000700380388000700380388000E00380388000E00380190000E003000E0000E0 +0700000000C00700000001C00600000001C00600000031860E000000798F0C000000F31E180000 +00620C300000003C07C00000002B29829F28>14 D<0E1F3F3F1D0102020404081020C0080E779F +0E>39 D<000200020006000E003C00DC031C001C0038003800380038007000700070007000E000 +E000E000E001C001C001C001C003800380038003800780FFF80F1E7B9D17>49 +D<070F1F1F0E0000000000000000000070F8F8F0E008147B930E>58 D<0000FE0200078186001C +004C0038003C0060003C00C0001C01C0001803800018070000180F0000181E0000101E0000103C +0000003C00000078000000780000007800000078000000F0000000F0000000F0000000F0000000 +F00000807000008070000080700001003800010038000200180004000C001800060020000381C0 +0000FE00001F217A9F21>67 D<01FFFFFC001E0038001E0018001E0008001E0008003C0008003C +0008003C0008003C00080078001000780800007808000078080000F0100000F0300000FFF00000 +F0300001E0200001E0200001E0200001E0200003C0000003C0000003C0000003C0000007800000 +0780000007800000078000000F800000FFF800001E1F7D9E1E>70 D<01FF007FE0001F000F0000 +1F0004000017800400001780040000278008000023C008000023C008000023C008000041E01000 +0041E010000041F010000040F010000080F0200000807820000080782000008078200001003C40 +0001003C400001003C400001001E400002001E800002001E800002000F800002000F800004000F +0000040007000004000700000C000700001C00020000FF80020000231F7D9E22>78 +D<01FFFF80001E00E0001E0070001E0038001E003C003C003C003C003C003C003C003C003C0078 +007800780078007800F0007800E000F003C000F00F0000FFFC0000F0000001E0000001E0000001 +E0000001E0000003C0000003C0000003C0000003C0000007800000078000000780000007800000 +0F800000FFF000001E1F7D9E1F>80 D<00F1800389C00707800E03801C03803C03803807007807 +00780700780700F00E00F00E00F00E00F00E20F01C40F01C40703C40705C40308C800F07001314 +7C9317>97 D<07803F8007000700070007000E000E000E000E001C001C001CF01D0C3A0E3C0E38 +0F380F700F700F700F700FE01EE01EE01EE01CE03CE038607060E031C01F0010207B9F15>I<00 +7E0001C1000300800E07801E07801C07003C0200780000780000780000F00000F00000F00000F0 +0000F0000070010070020030040018380007C00011147C9315>I<0000780003F8000070000070 +0000700000700000E00000E00000E00000E00001C00001C000F1C00389C00707800E03801C0380 +3C0380380700780700780700780700F00E00F00E00F00E00F00E20F01C40F01C40703C40705C40 +308C800F070015207C9F17>I<007C01C207010E011C013C013802780C7BF07C00F000F000F000 +F0007000700170023804183807C010147C9315>I<00007800019C00033C00033C000718000700 +000700000E00000E00000E00000E00000E0001FFE0001C00001C00001C00001C00003800003800 +00380000380000380000700000700000700000700000700000700000E00000E00000E00000E000 +00C00001C00001C0000180003180007B0000F300006600003C00001629829F0E>I<003C6000E2 +7001C1E00380E00700E00F00E00E01C01E01C01E01C01E01C03C03803C03803C03803C03803C07 +003C07001C0F001C17000C2E0003CE00000E00000E00001C00001C00301C00783800F0700060E0 +003F8000141D7E9315>I<01E0000FE00001C00001C00001C00001C00003800003800003800003 +8000070000070000071E000763000E81800F01C00E01C00E01C01C03801C03801C03801C038038 +0700380700380700380E10700E20700C20701C20700C40E00CC060070014207D9F17>I<00C001 +E001E001C000000000000000000000000000000E003300230043804300470087000E000E000E00 +1C001C001C003840388030807080310033001C000B1F7C9E0E>I<0001800003C00003C0000380 +000000000000000000000000000000000000000000003C00004600008700008700010700010700 +020E00000E00000E00000E00001C00001C00001C00001C00003800003800003800003800007000 +00700000700000700000E00000E00030E00079C000F180006300003C00001228829E0E>I<01E0 +000FE00001C00001C00001C00001C0000380000380000380000380000700000700000703C00704 +200E08E00E11E00E21E00E40C01C80001D00001E00001FC00038E0003870003870003838407070 +80707080707080703100E03100601E0013207D9F15>I<03C01FC0038003800380038007000700 +070007000E000E000E000E001C001C001C001C0038003800380038007000700070007100E200E2 +00E200E200640038000A207C9F0C>I<1C0F80F0002630C318004740640C004780680E00470070 +0E004700700E008E00E01C000E00E01C000E00E01C000E00E01C001C01C038001C01C038001C01 +C038001C01C0708038038071003803806100380380E10038038062007007006600300300380021 +147C9325>I<1C0F802630C04740604780604700704700708E00E00E00E00E00E00E00E01C01C0 +1C01C01C01C01C03843803883803083807083803107003303001C016147C931A>I<007C0001C3 +000301800E01C01E01C01C01E03C01E07801E07801E07801E0F003C0F003C0F003C0F00780F007 +00700F00700E0030180018700007C00013147C9317>I<01C1E002621804741C04781C04701E04 +701E08E01E00E01E00E01E00E01E01C03C01C03C01C03C01C0380380780380700380E003C1C007 +2380071E000700000700000E00000E00000E00000E00001C00001C0000FFC000171D809317>I< +1C1E002661004783804787804707804703008E00000E00000E00000E00001C00001C00001C0000 +1C000038000038000038000038000070000030000011147C9313>114 D<00FC030206010C030C +070C060C000F800FF007F803FC003E000E700EF00CF00CE008401020601F8010147D9313>I<01 +8001C0038003800380038007000700FFF007000E000E000E000E001C001C001C001C0038003800 +38003820704070407080708031001E000C1C7C9B0F>I<0E00C03300E02301C04381C04301C047 +01C08703800E03800E03800E03801C07001C07001C07001C07101C0E20180E20180E201C1E200C +264007C38014147C9318>I<0E03803307802307C04383C04301C04700C08700800E00800E0080 +0E00801C01001C01001C01001C02001C02001C04001C04001C08000E300003C00012147C9315> +I<0E00C1C03300E3C02301C3E04381C1E04301C0E04701C060870380400E0380400E0380400E03 +80401C0700801C0700801C0700801C0701001C0701001C0602001C0F02000C0F04000E13080003 +E1F0001B147C931E>I<0383800CC4401068E01071E02071E02070C040E00000E00000E00000E0 +0001C00001C00001C00001C040638080F38080F38100E5810084C60078780013147D9315>I<0E +00C03300E02301C04381C04301C04701C08703800E03800E03800E03801C07001C07001C07001C +07001C0E00180E00180E001C1E000C3C0007DC00001C00001C00003800F03800F07000E06000C0 +C0004380003E0000131D7C9316>I E /Fn 74 123 df<001F83E000F06E3001C078780380F878 +0300F03007007000070070000700700007007000070070000700700007007000FFFFFF80070070 +000700700007007000070070000700700007007000070070000700700007007000070070000700 +7000070070000700700007007000070070000700700007007000070070007FE3FF001D20809F1B +>11 D<003F0000E0C001C0C00381E00701E00701E0070000070000070000070000070000070000 +FFFFE00700E00700E00700E00700E00700E00700E00700E00700E00700E00700E00700E00700E0 +0700E00700E00700E00700E00700E00700E07FC3FE1720809F19>I<003FE000E0E001C1E00381 +E00700E00700E00700E00700E00700E00700E00700E00700E0FFFFE00700E00700E00700E00700 +E00700E00700E00700E00700E00700E00700E00700E00700E00700E00700E00700E00700E00700 +E00700E07FE7FE1720809F19>I<001F81F80000F04F040001C07C06000380F80F000300F00F00 +0700F00F00070070000007007000000700700000070070000007007000000700700000FFFFFFFF +000700700700070070070007007007000700700700070070070007007007000700700700070070 +070007007007000700700700070070070007007007000700700700070070070007007007000700 +700700070070070007007007007FE3FE3FF02420809F26>I<07070F1C383060C00808779F17> +19 D<7038F87CFC7EFC7E743A0402040204020804080410081008201040200F0E7E9F17>34 +D<70F8FCFC74040404080810102040060E7C9F0D>39 D<0020004000800100020006000C000C00 +180018003000300030007000600060006000E000E000E000E000E000E000E000E000E000E000E0 +00E0006000600060007000300030003000180018000C000C000600020001000080004000200B2E +7DA112>I<800040002000100008000C00060006000300030001800180018001C000C000C000C0 +00E000E000E000E000E000E000E000E000E000E000E000E000C000C000C001C001800180018003 +000300060006000C00080010002000400080000B2E7DA112>I<70F8FCFC740404040808101020 +40060E7C840D>44 D<FFC0FFC00A027F8A0F>I<70F8F8F87005057C840D>I<0003000300070006 +0006000E000C000C001C0018001800380030003000700060006000E000C000C001C00180018001 +800380030003000700060006000E000C000C001C0018001800380030003000700060006000E000 +C000C000102D7DA117>I<03F0000E1C001C0E00180600380700700380700380700380700380F0 +03C0F003C0F003C0F003C0F003C0F003C0F003C0F003C0F003C0F003C0F003C0F003C0F003C070 +03807003807003807807803807001806001C0E000E1C0003F000121F7E9D17>I<018003800F80 +F38003800380038003800380038003800380038003800380038003800380038003800380038003 +800380038003800380038007C0FFFE0F1E7C9D17>I<03F0000C1C00100E002007004007808007 +80F007C0F803C0F803C0F803C02007C00007C0000780000780000F00000E00001C000038000070 +0000600000C0000180000300000600400C00401800401000803FFF807FFF80FFFF80121E7E9D17 +>I<03F0000C1C00100E00200F00780F80780780780780380F80000F80000F00000F00000E0000 +1C0000380003F000003C00000E00000F000007800007800007C02007C0F807C0F807C0F807C0F0 +0780400780400F00200E001C3C0003F000121F7E9D17>I<000600000600000E00000E00001E00 +002E00002E00004E00008E00008E00010E00020E00020E00040E00080E00080E00100E00200E00 +200E00400E00C00E00FFFFF0000E00000E00000E00000E00000E00000E00000E0000FFE0141E7F +9D17>I<1803001FFE001FFC001FF8001FE00010000010000010000010000010000010000011F0 +00161C00180E001007001007800003800003800003C00003C00003C07003C0F003C0F003C0E003 +80400380400700200600100E000C380003E000121F7E9D17>I<007C000182000701000E03800C +07801C0780380300380000780000700000700000F1F000F21C00F40600F80700F80380F80380F0 +03C0F003C0F003C0F003C0F003C07003C07003C07003803803803807001807000C0E00061C0001 +F000121F7E9D17>I<4000007FFFC07FFF807FFF80400100800200800200800400000800000800 +00100000200000200000400000400000C00000C00001C000018000038000038000038000038000 +078000078000078000078000078000078000078000030000121F7D9D17>I<03F0000C0C001006 +003003002001806001806001806001807001807803003E03003F06001FC8000FF00003F80007FC +000C7E00103F00300F806003804001C0C001C0C000C0C000C0C000C0C000806001802001001002 +000C0C0003F000121F7E9D17>I<03F0000E18001C0C00380600380700700700700380F00380F0 +0380F003C0F003C0F003C0F003C0F003C07007C07007C03807C0180BC00E13C003E3C000038000 +0380000380000700300700780600780E00700C002018001070000FC000121F7E9D17>I<70F8F8 +F8700000000000000000000070F8F8F87005147C930D>I<70F8F8F87000000000000000000000 +70F0F8F878080808101010202040051D7C930D>I<7FFFFFE0FFFFFFF000000000000000000000 +00000000000000000000000000000000000000000000FFFFFFF07FFFFFE01C0C7D9023>61 +D<000100000003800000038000000380000007C0000007C0000007C0000009E0000009E0000009 +E0000010F0000010F0000010F00000207800002078000020780000403C0000403C0000403C0000 +801E0000801E0000FFFE0001000F0001000F0001000F00020007800200078002000780040003C0 +0E0003C01F0007E0FFC03FFE1F207F9F22>65 D<FFFFE0000F80380007801E0007801F0007800F +0007800F8007800F8007800F8007800F8007800F8007800F0007801F0007801E0007803C0007FF +F00007803C0007801E0007800F0007800F8007800780078007C0078007C0078007C0078007C007 +8007C00780078007800F8007800F0007801F000F803C00FFFFF0001A1F7E9E20>I<000FC04000 +7030C001C009C0038005C0070003C00E0001C01E0000C01C0000C03C0000C07C0000407C000040 +78000040F8000000F8000000F8000000F8000000F8000000F8000000F8000000F8000000F80000 +00780000007C0000407C0000403C0000401C0000401E0000800E000080070001000380020001C0 +040000703800000FC0001A217D9F21>I<FFFFFF000F800F000780030007800300078001000780 +0180078000800780008007800080078080800780800007808000078080000781800007FF800007 +818000078080000780800007808000078080000780002007800020078000200780004007800040 +07800040078000C0078000C0078001800F800F80FFFFFF801B1F7E9E1F>69 +D<FFFFFF000F800F00078003000780030007800100078001800780008007800080078000800780 +0080078080000780800007808000078080000781800007FF800007818000078080000780800007 +808000078080000780000007800000078000000780000007800000078000000780000007800000 +0FC00000FFFE0000191F7E9E1E>I<000FE0200078186000E004E0038002E0070001E00F0000E0 +1E0000601E0000603C0000603C0000207C00002078000020F8000000F8000000F8000000F80000 +00F8000000F8000000F8000000F8007FFCF80003E0780001E07C0001E03C0001E03C0001E01E00 +01E01E0001E00F0001E0070001E0038002E000E0046000781820000FE0001E217D9F24>I<FFF8 +FFF80F800F8007800F0007800F0007800F0007800F0007800F0007800F0007800F0007800F0007 +800F0007800F0007800F0007800F0007FFFF0007800F0007800F0007800F0007800F0007800F00 +07800F0007800F0007800F0007800F0007800F0007800F0007800F0007800F0007800F000F800F +80FFF8FFF81D1F7E9E22>I<FFFC0FC00780078007800780078007800780078007800780078007 +800780078007800780078007800780078007800780078007800780078007800FC0FFFC0E1F7F9E +10>I<FFFE000FC000078000078000078000078000078000078000078000078000078000078000 +078000078000078000078000078000078000078000078000078002078002078002078002078006 +07800407800407800C07801C0F807CFFFFFC171F7E9E1C>76 D<FF80001FF80F80001F80078000 +1F0005C0002F0005C0002F0005C0002F0004E0004F0004E0004F000470008F000470008F000470 +008F000438010F000438010F000438010F00041C020F00041C020F00041C020F00040E040F0004 +0E040F00040E040F000407080F000407080F000407080F000403900F000403900F000401E00F00 +0401E00F000401E00F000E00C00F001F00C01F80FFE0C1FFF8251F7E9E2A>I<FF803FF807C007 +C007C0038005E0010005E0010004F001000478010004780100043C0100043C0100041E0100040F +0100040F010004078100040781000403C1000401E1000401E1000400F1000400F1000400790004 +003D0004003D0004001F0004001F0004000F0004000700040007000E0003001F000300FFE00100 +1D1F7E9E22>I<001F800000F0F00001C0380007801E000F000F000E0007001E0007803C0003C0 +3C0003C07C0003E0780001E0780001E0F80001F0F80001F0F80001F0F80001F0F80001F0F80001 +F0F80001F0F80001F0F80001F0780001E07C0003E07C0003E03C0003C03C0003C01E0007800E00 +07000F000F0007801E0001C0380000F0F000001F80001C217D9F23>I<FFFFE0000F8078000780 +1C0007801E0007800F0007800F8007800F8007800F8007800F8007800F8007800F8007800F0007 +801E0007801C000780780007FFE000078000000780000007800000078000000780000007800000 +078000000780000007800000078000000780000007800000078000000FC00000FFFC0000191F7E +9E1F>I<FFFF80000F80F0000780780007803C0007801E0007801E0007801F0007801F0007801F +0007801F0007801E0007801E0007803C00078078000780F00007FF80000781C0000780E0000780 +F0000780700007807800078078000780780007807C0007807C0007807C0007807C0407807E0407 +803E040FC01E08FFFC0F10000003E01E207E9E21>82 D<07E0800C198010078030038060018060 +0180E00180E00080E00080E00080F00000F000007800007F00003FF0001FFC000FFE0003FF0000 +1F800007800003C00003C00001C08001C08001C08001C08001C0C00180C00380E00300F00600CE +0C0081F80012217D9F19>I<7FFFFFE0780F01E0600F0060400F0020400F0020C00F0030800F00 +10800F0010800F0010800F0010000F0000000F0000000F0000000F0000000F0000000F0000000F +0000000F0000000F0000000F0000000F0000000F0000000F0000000F0000000F0000000F000000 +0F0000000F0000000F0000001F800007FFFE001C1F7E9E21>I<FFFC3FF80FC007C00780038007 +800100078001000780010007800100078001000780010007800100078001000780010007800100 +078001000780010007800100078001000780010007800100078001000780010007800100078001 +0007800100038002000380020001C0020001C0040000E008000070180000382000000FC0001D20 +7E9E22>I<FFF003FE1F8000F80F0000600F800060078000400780004003C0008003C0008003C0 +008001E0010001E0010001F0010000F0020000F0020000F806000078040000780400003C080000 +3C0800003C0800001E1000001E1000001F3000000F2000000F20000007C0000007C0000007C000 +000380000003800000038000000100001F207F9E22>I<FFF07FF81FF01F800FC007C00F000780 +03800F00078001000F0007C00100078007C00200078007C00200078007C0020003C009E0040003 +C009E0040003C009E0040003E010F00C0001E010F0080001E010F0080001F02078080000F02078 +100000F02078100000F0403C10000078403C20000078403C20000078C03E2000003C801E400000 +3C801E4000003C801E4000001F000F8000001F000F8000001F000F8000001E00078000000E0007 +0000000E00070000000C000300000004000200002C207F9E2F>I<FEFEC0C0C0C0C0C0C0C0C0C0 +C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0FEFE072D7CA10D> +91 D<080410082010201040204020804080408040B85CFC7EFC7E7C3E381C0F0E7B9F17>I<FEFE +060606060606060606060606060606060606060606060606060606060606060606060606060606 +0606FEFE072D7FA10D>I<1FE000303000781800781C00300E00000E00000E00000E0000FE0007 +8E001E0E00380E00780E00F00E10F00E10F00E10F01E10781E103867200F83C014147E9317>97 +D<0E0000FE00000E00000E00000E00000E00000E00000E00000E00000E00000E00000E00000E3E +000EC3800F01C00F00E00E00E00E00700E00700E00780E00780E00780E00780E00780E00780E00 +700E00700E00E00F00E00D01C00CC300083E0015207F9F19>I<03F80E0C1C1E381E380C700070 +00F000F000F000F000F000F00070007000380138011C020E0C03F010147E9314>I<000380003F +8000038000038000038000038000038000038000038000038000038000038003E380061B801C07 +80380380380380700380700380F00380F00380F00380F00380F00380F003807003807003803803 +803807801C07800E1B8003E3F815207E9F19>I<03F0000E1C001C0E0038070038070070070070 +0380F00380F00380FFFF80F00000F00000F000007000007000003800801800800C010007060001 +F80011147F9314>I<007C00C6018F038F07060700070007000700070007000700FFF007000700 +07000700070007000700070007000700070007000700070007000700070007007FF01020809F0E +>I<0000E003E3300E3C301C1C30380E00780F00780F00780F00780F00780F00380E001C1C001E +380033E0002000002000003000003000003FFE001FFF800FFFC03001E0600070C00030C00030C0 +0030C000306000603000C01C038003FC00141F7F9417>I<0E0000FE00000E00000E00000E0000 +0E00000E00000E00000E00000E00000E00000E00000E3E000E43000E81800F01C00F01C00E01C0 +0E01C00E01C00E01C00E01C00E01C00E01C00E01C00E01C00E01C00E01C00E01C00E01C00E01C0 +FFE7FC16207F9F19>I<1C001E003E001E001C000000000000000000000000000E007E000E000E +000E000E000E000E000E000E000E000E000E000E000E000E000E000E000E00FFC00A1F809E0C> +I<00E001F001F001F000E0000000000000000000000000007007F000F000700070007000700070 +00700070007000700070007000700070007000700070007000700070007000706070F060F0C061 +803F000C28829E0E>I<0E0000FE00000E00000E00000E00000E00000E00000E00000E00000E00 +000E00000E00000E0FF00E03C00E03000E02000E04000E08000E10000E30000E70000EF8000F38 +000E1C000E1E000E0E000E07000E07800E03800E03C00E03E0FFCFF815207F9F18>I<0E00FE00 +0E000E000E000E000E000E000E000E000E000E000E000E000E000E000E000E000E000E000E000E +000E000E000E000E000E000E000E000E000E00FFE00B20809F0C>I<0E1F01F000FE618618000E +81C81C000F00F00E000F00F00E000E00E00E000E00E00E000E00E00E000E00E00E000E00E00E00 +0E00E00E000E00E00E000E00E00E000E00E00E000E00E00E000E00E00E000E00E00E000E00E00E +000E00E00E00FFE7FE7FE023147F9326>I<0E3E00FE43000E81800F01C00F01C00E01C00E01C0 +0E01C00E01C00E01C00E01C00E01C00E01C00E01C00E01C00E01C00E01C00E01C00E01C0FFE7FC +16147F9319>I<01F800070E001C03803801C03801C07000E07000E0F000F0F000F0F000F0F000 +F0F000F0F000F07000E07000E03801C03801C01C0380070E0001F80014147F9317>I<0E3E00FE +C3800F01C00F00E00E00E00E00F00E00700E00780E00780E00780E00780E00780E00780E00700E +00F00E00E00F01E00F01C00EC3000E3E000E00000E00000E00000E00000E00000E00000E00000E +0000FFE000151D7F9319>I<03E0800619801C05803C0780380380780380700380F00380F00380 +F00380F00380F00380F003807003807803803803803807801C0B800E138003E380000380000380 +000380000380000380000380000380000380003FF8151D7E9318>I<0E78FE8C0F1E0F1E0F0C0E +000E000E000E000E000E000E000E000E000E000E000E000E000E00FFE00F147F9312>I<1F9030 +704030C010C010C010E00078007F803FE00FF00070803880188018C018C018E030D0608F800D14 +7E9312>I<020002000200060006000E000E003E00FFF80E000E000E000E000E000E000E000E00 +0E000E000E000E080E080E080E080E080610031001E00D1C7F9B12>I<0E01C0FE1FC00E01C00E +01C00E01C00E01C00E01C00E01C00E01C00E01C00E01C00E01C00E01C00E01C00E01C00E01C00E +03C00603C0030DC001F1FC16147F9319>I<FF83F81E01E01C00C00E00800E00800E0080070100 +07010003820003820003820001C40001C40001EC0000E80000E800007000007000007000002000 +15147F9318>I<FF9FE1FC3C0780701C0300601C0380200E0380400E0380400E03C0400707C080 +0704C0800704E080038861000388710003C8730001D0320001D03A0000F03C0000E01C0000E01C +0000601800004008001E147F9321>I<7FC3FC0F01E00701C007018003810001C20000E40000EC +00007800003800003C00007C00004E000087000107000303800201C00601E01E01E0FF07FE1714 +809318>I<FF83F81E01E01C00C00E00800E00800E008007010007010003820003820003820001 +C40001C40001EC0000E80000E800007000007000007000002000002000004000004000004000F0 +8000F08000F100006200003C0000151D7F9318>I<3FFF380E200E201C40384078407000E001E0 +01C00380078007010E011E011C0338027006700EFFFE10147F9314>I E +/Fo 41 122 df<0001FF0000001FFFC000007F80F00000FE00F80003FC01FC0003F803FC0007F0 +03FC0007F003FC0007F003FC0007F001F80007F000F00007F000000007F000000007F000000007 +F0000000FFFFFFFC00FFFFFFFC00FFFFFFFC0007F001FC0007F001FC0007F001FC0007F001FC00 +07F001FC0007F001FC0007F001FC0007F001FC0007F001FC0007F001FC0007F001FC0007F001FC 0007F001FC0007F001FC0007F001FC0007F001FC0007F001FC0007F001FC0007F001FC0007F001 -FC0007F001FC0007F001FC0007F001FC0007F001FC0007F001FC0007F001FC0007F001FC0007F0 -01FC0007F001FC0007F001FC007FFF1FFFC07FFF1FFFC07FFF1FFFC0222A7FA926>12 -D<000E00001E00007E0007FE00FFFE00FFFE00F8FE0000FE0000FE0000FE0000FE0000FE0000FE -0000FE0000FE0000FE0000FE0000FE0000FE0000FE0000FE0000FE0000FE0000FE0000FE0000FE -0000FE0000FE0000FE0000FE0000FE0000FE0000FE0000FE0000FE0000FE007FFFFE7FFFFE7FFF -FE17277BA622>49 D<00FF800003FFF0000FFFFC003F03FF007C00FF807C007FC0FE007FC0FF00 -3FE0FF003FE0FF003FE0FF001FE07E001FE03C003FE000003FE000003FC000003FC000007F8000 -007F800000FF000001FE000001FC000003F0000007E000000FC000001F0000003E0000007C00E0 -007800E000F000E001E001C0038001C0070001C00FFFFFC01FFFFFC03FFFFFC07FFFFFC0FFFFFF -80FFFFFF80FFFFFF801B277DA622>I<007F800003FFF00007FFFC001F81FE001F00FF003F80FF -003F807F803FC07F803F807F803F807F801F007F800000FF800000FF000000FF000001FE000003 -F8000007F00000FFC00000FFF0000001FC000000FF0000007F8000007FC000003FC000003FE000 -003FE000003FE03C003FE07E003FE0FF003FE0FF003FE0FF003FC0FF007FC0FE007F807C00FF80 -3F01FF001FFFFC0007FFF00000FF80001B277DA622>I<00000E0000001E0000003E0000007E00 -0000FE000000FE000001FE000003FE0000077E00000E7E00000E7E00001C7E0000387E0000707E -0000E07E0000E07E0001C07E0003807E0007007E000E007E000E007E001C007E0038007E007000 -7E00E0007E00FFFFFFF8FFFFFFF8FFFFFFF80000FE000000FE000000FE000000FE000000FE0000 -00FE000000FE000000FE00007FFFF8007FFFF8007FFFF81D277EA622>I<0C0003000F803F000F -FFFE000FFFFE000FFFFC000FFFF8000FFFE0000FFFC0000FFE00000E0000000E0000000E000000 -0E0000000E0000000E0000000E7FC0000FFFF8000F80FE000E007F000C003F8000003F8000001F -C000001FC000001FE000001FE018001FE07E001FE0FE001FE0FE001FE0FE001FE0FE001FE0FE00 -1FC078003FC078003F803C007F001F01FE000FFFFC0003FFF00000FF80001B277DA622>I<0007 -F000003FFC0000FFFF0001FC0F0007F01F800FE03F800FC03F801FC03F803F803F803F801F007F -8000007F0000007F0000007F000000FF000000FF0FC000FF3FF800FF70FE00FFE03F00FFC03F80 -FF801FC0FF801FC0FF801FC0FF001FE0FF001FE0FF001FE0FF001FE07F001FE07F001FE07F001F -E07F001FE03F801FC03F801FC01F803F800FC03F8007E0FF0003FFFC0000FFF000003FC0001B27 -7DA622>I<380000003E0000003FFFFFF03FFFFFF03FFFFFF07FFFFFE07FFFFFC07FFFFFC07FFF -FF8070000F0070001E0070003C00E0003800E0007800E000F0000001E0000003C0000003C00000 -07800000078000000F0000001F0000001F0000001F0000003F0000003F0000003E0000007E0000 -007E0000007E0000007E000000FE000000FE000000FE000000FE000000FE000000FE000000FE00 -0000FE000000FE0000003800001C297CA822>I<000003800000000007C00000000007C0000000 -000FE0000000000FE0000000000FE0000000001FF0000000001FF0000000003FF8000000003FF8 -000000003FF80000000073FC0000000073FC00000000F3FE00000000E1FE00000000E1FE000000 -01C0FF00000001C0FF00000003C0FF80000003807F80000007807FC0000007003FC0000007003F -C000000E003FE000000E001FE000001E001FF000001C000FF000001FFFFFF000003FFFFFF80000 -3FFFFFF80000780007FC0000700003FC0000700003FC0000E00001FE0000E00001FE0001E00001 -FF0001C00000FF0001C00000FF00FFFE001FFFFEFFFE001FFFFEFFFE001FFFFE2F297EA834>65 +FC0007F001FC007FFF1FFFC07FFF1FFFC07FFF1FFFC0222A7FA926>12 D<000E00001E00007E00 +07FE00FFFE00FFFE00F8FE0000FE0000FE0000FE0000FE0000FE0000FE0000FE0000FE0000FE00 +00FE0000FE0000FE0000FE0000FE0000FE0000FE0000FE0000FE0000FE0000FE0000FE0000FE00 +00FE0000FE0000FE0000FE0000FE0000FE0000FE007FFFFE7FFFFE7FFFFE17277BA622>49 +D<00FF800003FFF0000FFFFC003F03FF007C00FF807C007FC0FE007FC0FF003FE0FF003FE0FF00 +3FE0FF001FE07E001FE03C003FE000003FE000003FC000003FC000007F8000007F800000FF0000 +01FE000001FC000003F0000007E000000FC000001F0000003E0000007C00E0007800E000F000E0 +01E001C0038001C0070001C00FFFFFC01FFFFFC03FFFFFC07FFFFFC0FFFFFF80FFFFFF80FFFFFF +801B277DA622>I<007F800003FFF00007FFFC001F81FE001F00FF003F80FF003F807F803FC07F +803F807F803F807F801F007F800000FF800000FF000000FF000001FE000003F8000007F00000FF +C00000FFF0000001FC000000FF0000007F8000007FC000003FC000003FE000003FE000003FE03C +003FE07E003FE0FF003FE0FF003FE0FF003FC0FF007FC0FE007F807C00FF803F01FF001FFFFC00 +07FFF00000FF80001B277DA622>I<00000E0000001E0000003E0000007E000000FE000000FE00 +0001FE000003FE0000077E00000E7E00000E7E00001C7E0000387E0000707E0000E07E0000E07E +0001C07E0003807E0007007E000E007E000E007E001C007E0038007E0070007E00E0007E00FFFF +FFF8FFFFFFF8FFFFFFF80000FE000000FE000000FE000000FE000000FE000000FE000000FE0000 +00FE00007FFFF8007FFFF8007FFFF81D277EA622>I<0C0003000F803F000FFFFE000FFFFE000F +FFFC000FFFF8000FFFE0000FFFC0000FFE00000E0000000E0000000E0000000E0000000E000000 +0E0000000E7FC0000FFFF8000F80FE000E007F000C003F8000003F8000001FC000001FC000001F +E000001FE018001FE07E001FE0FE001FE0FE001FE0FE001FE0FE001FE0FE001FC078003FC07800 +3F803C007F001F01FE000FFFFC0003FFF00000FF80001B277DA622>I<0007F000003FFC0000FF +FF0001FC0F0007F01F800FE03F800FC03F801FC03F803F803F803F801F007F8000007F0000007F +0000007F000000FF000000FF0FC000FF3FF800FF70FE00FFE03F00FFC03F80FF801FC0FF801FC0 +FF801FC0FF001FE0FF001FE0FF001FE0FF001FE07F001FE07F001FE07F001FE07F001FE03F801F +C03F801FC01F803F800FC03F8007E0FF0003FFFC0000FFF000003FC0001B277DA622>I<380000 +003E0000003FFFFFF03FFFFFF03FFFFFF07FFFFFE07FFFFFC07FFFFFC07FFFFF8070000F007000 +1E0070003C00E0003800E0007800E000F0000001E0000003C0000003C000000780000007800000 +0F0000001F0000001F0000001F0000003F0000003F0000003E0000007E0000007E0000007E0000 +007E000000FE000000FE000000FE000000FE000000FE000000FE000000FE000000FE000000FE00 +00003800001C297CA822>I<000003800000000007C00000000007C0000000000FE0000000000F +E0000000000FE0000000001FF0000000001FF0000000003FF8000000003FF8000000003FF80000 +000073FC0000000073FC00000000F3FE00000000E1FE00000000E1FE00000001C0FF00000001C0 +FF00000003C0FF80000003807F80000007807FC0000007003FC0000007003FC000000E003FE000 +000E001FE000001E001FF000001C000FF000001FFFFFF000003FFFFFF800003FFFFFF800007800 +07FC0000700003FC0000700003FC0000E00001FE0000E00001FE0001E00001FF0001C00000FF00 +01C00000FF00FFFE001FFFFEFFFE001FFFFEFFFE001FFFFE2F297EA834>65 D<FFFFFFFFE0FFFFFFFFE0FFFFFFFFE003FC001FE003FC0007F003FC0001F003FC0001F003FC00 00F003FC00007003FC00007003FC00007003FC01C07803FC01C03803FC01C03803FC01C03803FC 03C00003FC03C00003FC0FC00003FFFFC00003FFFFC00003FFFFC00003FC0FC00003FC03C00003 @@ -671,270 +904,103 @@ E00001F8E00001F8E00001F8F00001F8F00001F0F80003F0FC0003E0FF0007E0FFE01FC0FFFFFF 000000003FC0000000003FC0000000003FC0000000003FC0000000003FC0000000003FC0000000 003FC0000000003FC0000000003FC0000000003FC0000000003FC0000000003FC0000000003FC0 000000003FC0000000003FC0000000003FC0000000003FC0000000003FC0000000003FC0000000 -003FC00000007FFFFFE000007FFFFFE000007FFFFFE0002B287EA730>I<01FF800007FFF0000F -81FC001FC0FE001FC07F001FC07F001FC03F800F803F8000003F8000003F8000003F80000FFF80 -00FFFF8007FC3F801FE03F803F803F807F803F807F003F80FE003F80FE003F80FE003F80FE007F -80FF007F807F00FFC03F83DFFC0FFF0FFC01FC03FC1E1B7E9A21>97 D<FFE0000000FFE0000000 -FFE00000000FE00000000FE00000000FE00000000FE00000000FE00000000FE00000000FE00000 -000FE00000000FE00000000FE00000000FE00000000FE00000000FE1FE00000FE7FF80000FFE07 -E0000FF803F8000FF001FC000FE000FE000FE000FE000FE0007F000FE0007F000FE0007F800FE0 -007F800FE0007F800FE0007F800FE0007F800FE0007F800FE0007F800FE0007F800FE0007F800F -E0007F000FE000FF000FE000FE000FF000FE000FF001FC000FF803F8000F9E07E0000F0FFF8000 -0E01FC0000212A7EA926>I<001FF80000FFFE0003F01F000FE03F801FC03F803F803F803F803F -807F801F007F000000FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF00 -0000FF0000007F0000007F8000003F8001C03FC001C01FC003C00FE0078003F01F0000FFFC0000 -1FE0001A1B7E9A1F>I<00003FF80000003FF80000003FF800000003F800000003F800000003F8 -00000003F800000003F800000003F800000003F800000003F800000003F800000003F800000003 -F800000003F800001FE3F80000FFFBF80003F03FF8000FE00FF8001FC007F8003F8003F8003F80 -03F8007F8003F8007F0003F800FF0003F800FF0003F800FF0003F800FF0003F800FF0003F800FF -0003F800FF0003F800FF0003F800FF0003F8007F0003F8007F0003F8003F8003F8003F8007F800 -1FC00FF8000FE01FF80003F03FFF8000FFF3FF80003FC3FF80212A7EA926>I<003FE00001FFF8 -0003F07E000FE03F001FC01F803F800FC03F800FC07F000FC07F0007E0FF0007E0FF0007E0FF00 -07E0FFFFFFE0FFFFFFE0FF000000FF000000FF000000FF0000007F0000007F8000003F8000E03F -8001E01FC001C00FE003C003F81F8000FFFE00001FF0001B1B7E9A20>I<0007F0003FFC00FE3E -01FC7F03F87F03F87F07F07F07F03E07F00007F00007F00007F00007F00007F00007F000FFFFC0 -FFFFC0FFFFC007F00007F00007F00007F00007F00007F00007F00007F00007F00007F00007F000 -07F00007F00007F00007F00007F00007F00007F00007F00007F00007F0007FFF807FFF807FFF80 -182A7EA915>I<00FF81F003FFE7FC0FC1FE7C1F80FC7C3F80FE7C3F007E107F007F007F007F00 -7F007F007F007F007F007F007F007F003F007E003F80FE001F80FC000FC1F8001FFFE00018FF80 -00380000003C0000003C0000003E0000003FFFF8003FFFFF001FFFFFC00FFFFFE007FFFFF01FFF -FFF07E0007F87C0001F8F80001F8F80000F8F80000F8F80000F8FC0001F87E0003F03F0007E00F -C01F8003FFFE00007FF0001E287E9A22>I<FFE0000000FFE0000000FFE00000000FE00000000F -E00000000FE00000000FE00000000FE00000000FE00000000FE00000000FE00000000FE0000000 -0FE00000000FE00000000FE00000000FE07F00000FE1FFC0000FE787E0000FEE07F0000FFC03F8 -000FF803F8000FF003F8000FF003F8000FF003F8000FE003F8000FE003F8000FE003F8000FE003 -F8000FE003F8000FE003F8000FE003F8000FE003F8000FE003F8000FE003F8000FE003F8000FE0 -03F8000FE003F8000FE003F8000FE003F800FFFE3FFF80FFFE3FFF80FFFE3FFF80212A7DA926> -I<07001FC01FE03FE03FE03FE01FE01FC007000000000000000000000000000000FFE0FFE0FFE0 -0FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00F -E00FE0FFFEFFFEFFFE0F2B7DAA14>I<FFE00000FFE00000FFE000000FE000000FE000000FE000 -000FE000000FE000000FE000000FE000000FE000000FE000000FE000000FE000000FE000000FE0 -1FFC0FE01FFC0FE01FFC0FE007C00FE00F800FE01E000FE07C000FE0F8000FE1F0000FE3E0000F -E7C0000FEFE0000FFFF0000FFFF0000FFFF8000FF3FC000FE1FE000FC0FE000FC0FF000FC07F80 -0FC03F800FC03FC00FC01FE00FC00FF0FFFC3FFEFFFC3FFEFFFC3FFE1F2A7EA924>107 -D<FFE0FFE0FFE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE0 -0FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00F -E0FFFEFFFEFFFE0F2A7DA914>I<FFC07F800FF000FFC1FFE03FFC00FFC783F0F07E000FCE03F9 -C07F000FDC01FB803F000FF801FF003F800FF001FE003F800FF001FE003F800FF001FE003F800F -E001FC003F800FE001FC003F800FE001FC003F800FE001FC003F800FE001FC003F800FE001FC00 -3F800FE001FC003F800FE001FC003F800FE001FC003F800FE001FC003F800FE001FC003F800FE0 -01FC003F800FE001FC003F800FE001FC003F800FE001FC003F80FFFE1FFFC3FFF8FFFE1FFFC3FF -F8FFFE1FFFC3FFF8351B7D9A3C>I<FFC07F0000FFC1FFC000FFC787E0000FCE07F0000FDC03F8 -000FF803F8000FF003F8000FF003F8000FF003F8000FE003F8000FE003F8000FE003F8000FE003 +003FC00000007FFFFFE000007FFFFFE000007FFFFFE0002B287EA730>I<FFFFF0003FFF80FFFF +F0003FFF80FFFFF0003FFF8003FE000001E00001FE000001C00001FF000003C00000FF00000380 +0000FF0000038000007F8000070000007F8000070000007FC0000F0000003FC0000E0000003FE0 +001E0000001FE0001C0000001FF0001C0000000FF000380000000FF0003800000007F800700000 +0007F8007000000007FC00F000000003FC00E000000003FE01E000000001FE01C000000001FF01 +C000000000FF038000000000FF038000000000FF8780000000007F8700000000007FCF00000000 +003FCE00000000003FFE00000000001FFC00000000001FFC00000000000FF800000000000FF800 +000000000FF8000000000007F0000000000007F0000000000003E0000000000003E00000000000 +01C000000031297FA834>86 D<01FF800007FFF0000F81FC001FC0FE001FC07F001FC07F001FC0 +3F800F803F8000003F8000003F8000003F80000FFF8000FFFF8007FC3F801FE03F803F803F807F +803F807F003F80FE003F80FE003F80FE003F80FE007F80FF007F807F00FFC03F83DFFC0FFF0FFC +01FC03FC1E1B7E9A21>97 D<FFE0000000FFE0000000FFE00000000FE00000000FE00000000FE0 +0000000FE00000000FE00000000FE00000000FE00000000FE00000000FE00000000FE00000000F +E00000000FE00000000FE1FE00000FE7FF80000FFE07E0000FF803F8000FF001FC000FE000FE00 +0FE000FE000FE0007F000FE0007F000FE0007F800FE0007F800FE0007F800FE0007F800FE0007F +800FE0007F800FE0007F800FE0007F800FE0007F800FE0007F000FE000FF000FE000FE000FF000 +FE000FF001FC000FF803F8000F9E07E0000F0FFF80000E01FC0000212A7EA926>I<001FF80000 +FFFE0003F01F000FE03F801FC03F803F803F803F803F807F801F007F000000FF000000FF000000 +FF000000FF000000FF000000FF000000FF000000FF000000FF0000007F0000007F8000003F8001 +C03FC001C01FC003C00FE0078003F01F0000FFFC00001FE0001A1B7E9A1F>I<00003FF8000000 +3FF80000003FF800000003F800000003F800000003F800000003F800000003F800000003F80000 +0003F800000003F800000003F800000003F800000003F800000003F800001FE3F80000FFFBF800 +03F03FF8000FE00FF8001FC007F8003F8003F8003F8003F8007F8003F8007F0003F800FF0003F8 +00FF0003F800FF0003F800FF0003F800FF0003F800FF0003F800FF0003F800FF0003F800FF0003 +F8007F0003F8007F0003F8003F8003F8003F8007F8001FC00FF8000FE01FF80003F03FFF8000FF +F3FF80003FC3FF80212A7EA926>I<003FE00001FFF80003F07E000FE03F001FC01F803F800FC0 +3F800FC07F000FC07F0007E0FF0007E0FF0007E0FF0007E0FFFFFFE0FFFFFFE0FF000000FF0000 +00FF000000FF0000007F0000007F8000003F8000E03F8001E01FC001C00FE003C003F81F8000FF +FE00001FF0001B1B7E9A20>I<0007F0003FFC00FE3E01FC7F03F87F03F87F07F07F07F03E07F0 +0007F00007F00007F00007F00007F00007F000FFFFC0FFFFC0FFFFC007F00007F00007F00007F0 +0007F00007F00007F00007F00007F00007F00007F00007F00007F00007F00007F00007F00007F0 +0007F00007F00007F00007F0007FFF807FFF807FFF80182A7EA915>I<00FF81F003FFE7FC0FC1 +FE7C1F80FC7C3F80FE7C3F007E107F007F007F007F007F007F007F007F007F007F007F007F003F +007E003F80FE001F80FC000FC1F8001FFFE00018FF8000380000003C0000003C0000003E000000 +3FFFF8003FFFFF001FFFFFC00FFFFFE007FFFFF01FFFFFF07E0007F87C0001F8F80001F8F80000 +F8F80000F8F80000F8FC0001F87E0003F03F0007E00FC01F8003FFFE00007FF0001E287E9A22> +I<FFE0000000FFE0000000FFE00000000FE00000000FE00000000FE00000000FE00000000FE000 +00000FE00000000FE00000000FE00000000FE00000000FE00000000FE00000000FE00000000FE0 +7F00000FE1FFC0000FE787E0000FEE07F0000FFC03F8000FF803F8000FF003F8000FF003F8000F +F003F8000FE003F8000FE003F8000FE003F8000FE003F8000FE003F8000FE003F8000FE003F800 +0FE003F8000FE003F8000FE003F8000FE003F8000FE003F8000FE003F8000FE003F8000FE003F8 +00FFFE3FFF80FFFE3FFF80FFFE3FFF80212A7DA926>I<07001FC01FE03FE03FE03FE01FE01FC0 +07000000000000000000000000000000FFE0FFE0FFE00FE00FE00FE00FE00FE00FE00FE00FE00F +E00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE0FFFEFFFEFFFE0F2B7DAA14>I<FF +E00000FFE00000FFE000000FE000000FE000000FE000000FE000000FE000000FE000000FE00000 +0FE000000FE000000FE000000FE000000FE000000FE01FFC0FE01FFC0FE01FFC0FE007C00FE00F +800FE01E000FE07C000FE0F8000FE1F0000FE3E0000FE7C0000FEFE0000FFFF0000FFFF0000FFF +F8000FF3FC000FE1FE000FC0FE000FC0FF000FC07F800FC03F800FC03FC00FC01FE00FC00FF0FF +FC3FFEFFFC3FFEFFFC3FFE1F2A7EA924>107 D<FFE0FFE0FFE00FE00FE00FE00FE00FE00FE00F +E00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE0 +0FE00FE00FE00FE00FE00FE00FE00FE00FE00FE0FFFEFFFEFFFE0F2A7DA914>I<FFC07F800FF0 +00FFC1FFE03FFC00FFC783F0F07E000FCE03F9C07F000FDC01FB803F000FF801FF003F800FF001 +FE003F800FF001FE003F800FF001FE003F800FE001FC003F800FE001FC003F800FE001FC003F80 +0FE001FC003F800FE001FC003F800FE001FC003F800FE001FC003F800FE001FC003F800FE001FC +003F800FE001FC003F800FE001FC003F800FE001FC003F800FE001FC003F800FE001FC003F800F +E001FC003F80FFFE1FFFC3FFF8FFFE1FFFC3FFF8FFFE1FFFC3FFF8351B7D9A3C>I<FFC07F0000 +FFC1FFC000FFC787E0000FCE07F0000FDC03F8000FF803F8000FF003F8000FF003F8000FF003F8 +000FE003F8000FE003F8000FE003F8000FE003F8000FE003F8000FE003F8000FE003F8000FE003 +F8000FE003F8000FE003F8000FE003F8000FE003F8000FE003F8000FE003F8000FE003F800FFFE +3FFF80FFFE3FFF80FFFE3FFF80211B7D9A26>I<003FE00001FFFC0003F07E000FC01F801F800F +C03F800FE03F0007E07F0007F07F0007F07F0007F0FF0007F8FF0007F8FF0007F8FF0007F8FF00 +07F8FF0007F8FF0007F8FF0007F87F0007F07F0007F03F800FE03F800FE01F800FC00FC01F8007 +F07F0001FFFC00003FE0001D1B7E9A22>I<FFE1FE0000FFE7FF8000FFFE07E0000FF803F8000F +F001FC000FE001FE000FE000FE000FE000FF000FE000FF000FE0007F800FE0007F800FE0007F80 +0FE0007F800FE0007F800FE0007F800FE0007F800FE0007F800FE0007F800FE000FF000FE000FF +000FE000FE000FF001FE000FF003FC000FF803F8000FFE0FE0000FEFFF80000FE1FC00000FE000 +00000FE00000000FE00000000FE00000000FE00000000FE00000000FE00000000FE00000000FE0 +000000FFFE000000FFFE000000FFFE00000021277E9A26>I<FFC1F0FFC7FCFFCE3E0FDC7F0FD8 +7F0FF87F0FF07F0FF03E0FF0000FE0000FE0000FE0000FE0000FE0000FE0000FE0000FE0000FE0 +000FE0000FE0000FE0000FE0000FE0000FE000FFFF00FFFF00FFFF00181B7E9A1C>114 +D<03FE300FFFF03E03F07800F07000F0F00070F00070F80070FC0000FFE000FFFE007FFFC03FFF +E01FFFF007FFF800FFFC0003FC0000FCE0007CE0003CF0003CF0003CF80078FC0078FF01F0F7FF +C0C1FF00161B7E9A1B>I<00700000700000700000700000F00000F00000F00001F00003F00003 +F00007F0001FFFF0FFFFF0FFFFF007F00007F00007F00007F00007F00007F00007F00007F00007 +F00007F00007F00007F00007F00007F03807F03807F03807F03807F03807F03807F03803F87001 +F8F000FFE0001F8015267FA51B>I<FFE03FF800FFE03FF800FFE03FF8000FE003F8000FE003F8 +000FE003F8000FE003F8000FE003F8000FE003F8000FE003F8000FE003F8000FE003F8000FE003 F8000FE003F8000FE003F8000FE003F8000FE003F8000FE003F8000FE003F8000FE003F8000FE0 -03F8000FE003F8000FE003F8000FE003F800FFFE3FFF80FFFE3FFF80FFFE3FFF80211B7D9A26> -I<003FE00001FFFC0003F07E000FC01F801F800FC03F800FE03F0007E07F0007F07F0007F07F00 -07F0FF0007F8FF0007F8FF0007F8FF0007F8FF0007F8FF0007F8FF0007F8FF0007F87F0007F07F -0007F03F800FE03F800FE01F800FC00FC01F8007F07F0001FFFC00003FE0001D1B7E9A22>I<FF -E1FE0000FFE7FF8000FFFE07E0000FF803F8000FF001FC000FE001FE000FE000FE000FE000FF00 -0FE000FF000FE0007F800FE0007F800FE0007F800FE0007F800FE0007F800FE0007F800FE0007F -800FE0007F800FE0007F800FE000FF000FE000FF000FE000FE000FF001FE000FF003FC000FF803 -F8000FFE0FE0000FEFFF80000FE1FC00000FE00000000FE00000000FE00000000FE00000000FE0 -0000000FE00000000FE00000000FE00000000FE0000000FFFE000000FFFE000000FFFE00000021 -277E9A26>I<FFC1F0FFC7FCFFCE3E0FDC7F0FD87F0FF87F0FF07F0FF03E0FF0000FE0000FE000 -0FE0000FE0000FE0000FE0000FE0000FE0000FE0000FE0000FE0000FE0000FE0000FE0000FE000 -FFFF00FFFF00FFFF00181B7E9A1C>114 D<03FE300FFFF03E03F07800F07000F0F00070F00070 -F80070FC0000FFE000FFFE007FFFC03FFFE01FFFF007FFF800FFFC0003FC0000FCE0007CE0003C -F0003CF0003CF80078FC0078FF01F0F7FFC0C1FF00161B7E9A1B>I<0070000070000070000070 -0000F00000F00000F00001F00003F00003F00007F0001FFFF0FFFFF0FFFFF007F00007F00007F0 -0007F00007F00007F00007F00007F00007F00007F00007F00007F00007F00007F03807F03807F0 -3807F03807F03807F03807F03803F87001F8F000FFE0001F8015267FA51B>I<FFE03FF800FFE0 -3FF800FFE03FF8000FE003F8000FE003F8000FE003F8000FE003F8000FE003F8000FE003F8000F -E003F8000FE003F8000FE003F8000FE003F8000FE003F8000FE003F8000FE003F8000FE003F800 -0FE003F8000FE003F8000FE003F8000FE007F8000FE007F8000FE00FF80007E01FF80003F03BFF -8001FFF3FF80003FC3FF80211B7D9A26>I<FFFE03FF80FFFE03FF80FFFE03FF8007F000700007 -F000700007F800F00003F800E00003FC01E00001FC01C00001FC01C00000FE03800000FE038000 -007F070000007F070000007F8F0000003F8E0000003FDE0000001FDC0000001FDC0000000FF800 -00000FF80000000FF800000007F000000007F000000003E000000003E000000001C00000211B7F -9A24>I<FFFE7FFC0FFEFFFE7FFC0FFEFFFE7FFC0FFE0FE007E000E007F003F001C007F003F001 -C007F807F803C003F807F8038003F807F8038001FC0EFC070001FC0EFC070001FE1EFC0F0000FE -1C7E0E0000FE1C7E0E0000FF383F1E00007F383F1C00007F783F3C00003FF01FB800003FF01FB8 -00003FF01FF800001FE00FF000001FE00FF000000FC007E000000FC007E000000FC007E0000007 -8003C00000078003C0002F1B7F9A32>I<FFFC0FFF00FFFC0FFF00FFFC0FFF0007F003C00003F8 -07800001FC07800000FE0F000000FF1E0000007F3C0000003FF80000001FF00000000FF0000000 -0FF000000007F000000007F80000000FFC0000001FFE0000001EFE0000003C7F000000783F8000 -00F01FC00001E01FE00001C00FE00003C007F000FFF01FFF80FFF01FFF80FFF01FFF80211B7F9A -24>I<FFFE03FF80FFFE03FF80FFFE03FF8007F000700007F000700007F800F00003F800E00003 -FC01E00001FC01C00001FC01C00000FE03800000FE038000007F070000007F070000007F8F0000 -003F8E0000003FDE0000001FDC0000001FDC0000000FF80000000FF80000000FF800000007F000 -000007F000000003E000000003E000000001C000000001C0000000038000000003800000380780 -00007C07000000FE0F000000FE0E000000FE1E000000FE3C0000007C780000003FE00000000FC0 -00000021277F9A24>I E /Fm 75 123 df<001F83E000F06E3001C078780380F8780300F03007 -007000070070000700700007007000070070000700700007007000FFFFFF800700700007007000 -070070000700700007007000070070000700700007007000070070000700700007007000070070 -000700700007007000070070000700700007007000070070007FE3FF001D20809F1B>11 -D<003F0000E0C001C0C00381E00701E00701E0070000070000070000070000070000070000FFFF -E00700E00700E00700E00700E00700E00700E00700E00700E00700E00700E00700E00700E00700 -E00700E00700E00700E00700E00700E07FC3FE1720809F19>I<003FE000E0E001C1E00381E007 -00E00700E00700E00700E00700E00700E00700E00700E0FFFFE00700E00700E00700E00700E007 -00E00700E00700E00700E00700E00700E00700E00700E00700E00700E00700E00700E00700E007 -00E07FE7FE1720809F19>I<001F81F80000F04F040001C07C06000380F80F000300F00F000700 -F00F00070070000007007000000700700000070070000007007000000700700000FFFFFFFF0007 -007007000700700700070070070007007007000700700700070070070007007007000700700700 -070070070007007007000700700700070070070007007007000700700700070070070007007007 -00070070070007007007007FE3FE3FF02420809F26>I<07070F1C383060C00808779F17>19 -D<7038F87CFC7EFC7E743A0402040204020804080410081008201040200F0E7E9F17>34 -D<70F8FCFC74040404080810102040060E7C9F0D>39 D<0020004000800100020006000C000C00 -180018003000300030007000600060006000E000E000E000E000E000E000E000E000E000E000E0 -00E0006000600060007000300030003000180018000C000C000600020001000080004000200B2E -7DA112>I<800040002000100008000C00060006000300030001800180018001C000C000C000C0 -00E000E000E000E000E000E000E000E000E000E000E000E000C000C000C001C001800180018003 -000300060006000C00080010002000400080000B2E7DA112>I<70F8FCFC740404040808101020 -40060E7C840D>44 D<FFC0FFC00A027F8A0F>I<70F8F8F87005057C840D>I<0003000300070006 -0006000E000C000C001C0018001800380030003000700060006000E000C000C001C00180018001 -800380030003000700060006000E000C000C001C0018001800380030003000700060006000E000 -C000C000102D7DA117>I<03F0000E1C001C0E00180600380700700380700380700380700380F0 -03C0F003C0F003C0F003C0F003C0F003C0F003C0F003C0F003C0F003C0F003C0F003C0F003C070 -03807003807003807807803807001806001C0E000E1C0003F000121F7E9D17>I<018003800F80 -F38003800380038003800380038003800380038003800380038003800380038003800380038003 -800380038003800380038007C0FFFE0F1E7C9D17>I<03F0000C1C00100E002007004007808007 -80F007C0F803C0F803C0F803C02007C00007C0000780000780000F00000E00001C000038000070 -0000600000C0000180000300000600400C00401800401000803FFF807FFF80FFFF80121E7E9D17 ->I<03F0000C1C00100E00200F00780F80780780780780380F80000F80000F00000F00000E0000 -1C0000380003F000003C00000E00000F000007800007800007C02007C0F807C0F807C0F807C0F0 -0780400780400F00200E001C3C0003F000121F7E9D17>I<000600000600000E00000E00001E00 -002E00002E00004E00008E00008E00010E00020E00020E00040E00080E00080E00100E00200E00 -200E00400E00C00E00FFFFF0000E00000E00000E00000E00000E00000E00000E0000FFE0141E7F -9D17>I<1803001FFE001FFC001FF8001FE00010000010000010000010000010000010000011F0 -00161C00180E001007001007800003800003800003C00003C00003C07003C0F003C0F003C0E003 -80400380400700200600100E000C380003E000121F7E9D17>I<007C000182000701000E03800C -07801C0780380300380000780000700000700000F1F000F21C00F40600F80700F80380F80380F0 -03C0F003C0F003C0F003C0F003C07003C07003C07003803803803807001807000C0E00061C0001 -F000121F7E9D17>I<4000007FFFC07FFF807FFF80400100800200800200800400000800000800 -00100000200000200000400000400000C00000C00001C000018000038000038000038000038000 -078000078000078000078000078000078000078000030000121F7D9D17>I<03F0000C0C001006 -003003002001806001806001806001807001807803003E03003F06001FC8000FF00003F80007FC -000C7E00103F00300F806003804001C0C001C0C000C0C000C0C000C0C000806001802001001002 -000C0C0003F000121F7E9D17>I<03F0000E18001C0C00380600380700700700700380F00380F0 -0380F003C0F003C0F003C0F003C0F003C07007C07007C03807C0180BC00E13C003E3C000038000 -0380000380000700300700780600780E00700C002018001070000FC000121F7E9D17>I<70F8F8 -F8700000000000000000000070F8F8F87005147C930D>I<70F8F8F87000000000000000000000 -70F0F8F878080808101010202040051D7C930D>I<7FFFFFE0FFFFFFF000000000000000000000 -00000000000000000000000000000000000000000000FFFFFFF07FFFFFE01C0C7D9023>61 -D<001F800000E0700001000800060006000800010008000100100F00802030C0402060404040C0 -202041C01C2041C01C2081801C1083801C1083801C1083801C1083801C1083801C1083801C1081 -801C1041C01C1041C01C1040C03C2020605C202030CC40100F0780080000000800000006000070 -010001C000E01F00001FF0001C207D9F23>64 D<000100000003800000038000000380000007C0 -000007C0000007C0000009E0000009E0000009E0000010F0000010F0000010F000002078000020 -78000020780000403C0000403C0000403C0000801E0000801E0000FFFE0001000F0001000F0001 -000F00020007800200078002000780040003C00E0003C01F0007E0FFC03FFE1F207F9F22>I<FF -FFE0000F80380007801E0007801F0007800F0007800F8007800F8007800F8007800F8007800F80 -07800F0007801F0007801E0007803C0007FFF00007803C0007801E0007800F0007800F80078007 -80078007C0078007C0078007C0078007C0078007C00780078007800F8007800F0007801F000F80 -3C00FFFFF0001A1F7E9E20>I<000FC040007030C001C009C0038005C0070003C00E0001C01E00 -00C01C0000C03C0000C07C0000407C00004078000040F8000000F8000000F8000000F8000000F8 -000000F8000000F8000000F8000000F8000000780000007C0000407C0000403C0000401C000040 -1E0000800E000080070001000380020001C0040000703800000FC0001A217D9F21>I<FFFFFF00 -0F800F000780030007800300078001000780018007800080078000800780008007808080078080 -0007808000078080000781800007FF800007818000078080000780800007808000078080000780 -00200780002007800020078000400780004007800040078000C0078000C0078001800F800F80FF -FFFF801B1F7E9E1F>69 D<FFFFFF000F800F000780030007800300078001000780018007800080 -078000800780008007800080078080000780800007808000078080000781800007FF8000078180 -000780800007808000078080000780800007800000078000000780000007800000078000000780 -000007800000078000000FC00000FFFE0000191F7E9E1E>I<000FE0200078186000E004E00380 -02E0070001E00F0000E01E0000601E0000603C0000603C0000207C00002078000020F8000000F8 -000000F8000000F8000000F8000000F8000000F8000000F8007FFCF80003E0780001E07C0001E0 -3C0001E03C0001E01E0001E01E0001E00F0001E0070001E0038002E000E0046000781820000FE0 -001E217D9F24>I<FFF8FFF80F800F8007800F0007800F0007800F0007800F0007800F0007800F -0007800F0007800F0007800F0007800F0007800F0007800F0007FFFF0007800F0007800F000780 -0F0007800F0007800F0007800F0007800F0007800F0007800F0007800F0007800F0007800F0007 -800F0007800F000F800F80FFF8FFF81D1F7E9E22>I<FFFC0FC007800780078007800780078007 -800780078007800780078007800780078007800780078007800780078007800780078007800780 -07800FC0FFFC0E1F7F9E10>I<FFFE000FC0000780000780000780000780000780000780000780 -000780000780000780000780000780000780000780000780000780000780000780000780020780 -0207800207800207800607800407800407800C07801C0F807CFFFFFC171F7E9E1C>76 -D<FF80001FF80F80001F800780001F0005C0002F0005C0002F0005C0002F0004E0004F0004E000 -4F000470008F000470008F000470008F000438010F000438010F000438010F00041C020F00041C -020F00041C020F00040E040F00040E040F00040E040F000407080F000407080F000407080F0004 -03900F000403900F000401E00F000401E00F000401E00F000E00C00F001F00C01F80FFE0C1FFF8 -251F7E9E2A>I<FF803FF807C007C007C0038005E0010005E0010004F001000478010004780100 -043C0100043C0100041E0100040F0100040F010004078100040781000403C1000401E1000401E1 -000400F1000400F1000400790004003D0004003D0004001F0004001F0004000F00040007000400 -07000E0003001F000300FFE001001D1F7E9E22>I<001F800000F0F00001C0380007801E000F00 -0F000E0007001E0007803C0003C03C0003C07C0003E0780001E0780001E0F80001F0F80001F0F8 -0001F0F80001F0F80001F0F80001F0F80001F0F80001F0F80001F0780001E07C0003E07C0003E0 -3C0003C03C0003C01E0007800E0007000F000F0007801E0001C0380000F0F000001F80001C217D -9F23>I<FFFFE0000F80780007801C0007801E0007800F0007800F8007800F8007800F8007800F -8007800F8007800F8007800F0007801E0007801C000780780007FFE00007800000078000000780 -000007800000078000000780000007800000078000000780000007800000078000000780000007 -8000000FC00000FFFC0000191F7E9E1F>I<FFFF80000F80F0000780780007803C0007801E0007 -801E0007801F0007801F0007801F0007801F0007801E0007801E0007803C00078078000780F000 -07FF80000781C0000780E0000780F0000780700007807800078078000780780007807C0007807C -0007807C0007807C0407807E0407803E040FC01E08FFFC0F10000003E01E207E9E21>82 -D<07E0800C1980100780300380600180600180E00180E00080E00080E00080F00000F000007800 -007F00003FF0001FFC000FFE0003FF00001F800007800003C00003C00001C08001C08001C08001 -C08001C0C00180C00380E00300F00600CE0C0081F80012217D9F19>I<7FFFFFE0780F01E0600F -0060400F0020400F0020C00F0030800F0010800F0010800F0010800F0010000F0000000F000000 -0F0000000F0000000F0000000F0000000F0000000F0000000F0000000F0000000F0000000F0000 -000F0000000F0000000F0000000F0000000F0000000F0000000F0000001F800007FFFE001C1F7E -9E21>I<FFFC3FF80FC007C0078003800780010007800100078001000780010007800100078001 -000780010007800100078001000780010007800100078001000780010007800100078001000780 -01000780010007800100078001000780010007800100038002000380020001C0020001C0040000 -E008000070180000382000000FC0001D207E9E22>I<FFF003FE1F8000F80F0000600F80006007 -8000400780004003C0008003C0008003C0008001E0010001E0010001F0010000F0020000F00200 -00F806000078040000780400003C0800003C0800003C0800001E1000001E1000001F3000000F20 -00000F20000007C0000007C0000007C000000380000003800000038000000100001F207F9E22> -I<FFF07FF81FF01F800FC007C00F00078003800F00078001000F0007C00100078007C002000780 -07C00200078007C0020003C009E0040003C009E0040003C009E0040003E010F00C0001E010F008 -0001E010F0080001F02078080000F02078100000F02078100000F0403C10000078403C20000078 -403C20000078C03E2000003C801E4000003C801E4000003C801E4000001F000F8000001F000F80 -00001F000F8000001E00078000000E00070000000E00070000000C000300000004000200002C20 -7F9E2F>I<FEFEC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0 -C0C0C0C0C0C0C0C0C0FEFE072D7CA10D>91 D<080410082010201040204020804080408040B85C -FC7EFC7E7C3E381C0F0E7B9F17>I<FEFE06060606060606060606060606060606060606060606 -06060606060606060606060606060606060606FEFE072D7FA10D>I<1FE000303000781800781C -00300E00000E00000E00000E0000FE00078E001E0E00380E00780E00F00E10F00E10F00E10F01E -10781E103867200F83C014147E9317>97 D<0E0000FE00000E00000E00000E00000E00000E0000 -0E00000E00000E00000E00000E00000E3E000EC3800F01C00F00E00E00E00E00700E00700E0078 -0E00780E00780E00780E00780E00780E00700E00700E00E00F00E00D01C00CC300083E0015207F -9F19>I<03F80E0C1C1E381E380C70007000F000F000F000F000F000F00070007000380138011C -020E0C03F010147E9314>I<000380003F80000380000380000380000380000380000380000380 -00038000038000038003E380061B801C0780380380380380700380700380F00380F00380F00380 -F00380F00380F003807003807003803803803807801C07800E1B8003E3F815207E9F19>I<03F0 -000E1C001C0E00380700380700700700700380F00380F00380FFFF80F00000F00000F000007000 -007000003800801800800C010007060001F80011147F9314>I<007C00C6018F038F0706070007 -0007000700070007000700FFF00700070007000700070007000700070007000700070007000700 -070007000700070007007FF01020809F0E>I<0000E003E3300E3C301C1C30380E00780F00780F -00780F00780F00780F00380E001C1C001E380033E0002000002000003000003000003FFE001FFF -800FFFC03001E0600070C00030C00030C00030C000306000603000C01C038003FC00141F7F9417 ->I<0E0000FE00000E00000E00000E00000E00000E00000E00000E00000E00000E00000E00000E -3E000E43000E81800F01C00F01C00E01C00E01C00E01C00E01C00E01C00E01C00E01C00E01C00E -01C00E01C00E01C00E01C00E01C00E01C0FFE7FC16207F9F19>I<1C001E003E001E001C000000 -000000000000000000000E007E000E000E000E000E000E000E000E000E000E000E000E000E000E -000E000E000E000E00FFC00A1F809E0C>I<00E001F001F001F000E00000000000000000000000 -00007007F000F00070007000700070007000700070007000700070007000700070007000700070 -007000700070007000706070F060F0C061803F000C28829E0E>I<0E0000FE00000E00000E0000 -0E00000E00000E00000E00000E00000E00000E00000E00000E0FF00E03C00E03000E02000E0400 -0E08000E10000E30000E70000EF8000F38000E1C000E1E000E0E000E07000E07800E03800E03C0 -0E03E0FFCFF815207F9F18>I<0E00FE000E000E000E000E000E000E000E000E000E000E000E00 -0E000E000E000E000E000E000E000E000E000E000E000E000E000E000E000E000E000E00FFE00B -20809F0C>I<0E1F01F000FE618618000E81C81C000F00F00E000F00F00E000E00E00E000E00E0 -0E000E00E00E000E00E00E000E00E00E000E00E00E000E00E00E000E00E00E000E00E00E000E00 -E00E000E00E00E000E00E00E000E00E00E000E00E00E00FFE7FE7FE023147F9326>I<0E3E00FE -43000E81800F01C00F01C00E01C00E01C00E01C00E01C00E01C00E01C00E01C00E01C00E01C00E -01C00E01C00E01C00E01C00E01C0FFE7FC16147F9319>I<01F800070E001C03803801C03801C0 -7000E07000E0F000F0F000F0F000F0F000F0F000F0F000F07000E07000E03801C03801C01C0380 -070E0001F80014147F9317>I<0E3E00FEC3800F01C00F00E00E00E00E00F00E00700E00780E00 -780E00780E00780E00780E00780E00700E00F00E00E00F01E00F01C00EC3000E3E000E00000E00 -000E00000E00000E00000E00000E00000E0000FFE000151D7F9319>I<03E0800619801C05803C -0780380380780380700380F00380F00380F00380F00380F00380F0038070038078038038038038 -07801C0B800E138003E380000380000380000380000380000380000380000380000380003FF815 -1D7E9318>I<0E78FE8C0F1E0F1E0F0C0E000E000E000E000E000E000E000E000E000E000E000E -000E000E00FFE00F147F9312>I<1F9030704030C010C010C010E00078007F803FE00FF0007080 -3880188018C018C018E030D0608F800D147E9312>I<020002000200060006000E000E003E00FF -F80E000E000E000E000E000E000E000E000E000E000E000E080E080E080E080E080610031001E0 -0D1C7F9B12>I<0E01C0FE1FC00E01C00E01C00E01C00E01C00E01C00E01C00E01C00E01C00E01 -C00E01C00E01C00E01C00E01C00E01C00E03C00603C0030DC001F1FC16147F9319>I<FF83F81E -01E01C00C00E00800E00800E008007010007010003820003820003820001C40001C40001EC0000 -E80000E80000700000700000700000200015147F9318>I<FF9FE1FC3C0780701C0300601C0380 -200E0380400E0380400E03C0400707C0800704C0800704E080038861000388710003C8730001D0 -320001D03A0000F03C0000E01C0000E01C0000601800004008001E147F9321>I<7FC3FC0F01E0 -0701C007018003810001C20000E40000EC00007800003800003C00007C00004E00008700010700 -0303800201C00601E01E01E0FF07FE1714809318>I<FF83F81E01E01C00C00E00800E00800E00 -8007010007010003820003820003820001C40001C40001EC0000E80000E8000070000070000070 -00002000002000004000004000004000F08000F08000F100006200003C0000151D7F9318>I<3F -FF380E200E201C40384078407000E001E001C00380078007010E011E011C0338027006700EFFFE -10147F9314>I E /Fn 13 118 df<0F001F003F803F007E00F800F000C0000A08769C18>19 +07F8000FE007F8000FE00FF80007E01FF80003F03BFF8001FFF3FF80003FC3FF80211B7D9A26> +I<FFFE03FF80FFFE03FF80FFFE03FF8007F000700007F000700007F800F00003F800E00003FC01 +E00001FC01C00001FC01C00000FE03800000FE038000007F070000007F070000007F8F0000003F +8E0000003FDE0000001FDC0000001FDC0000000FF80000000FF80000000FF800000007F0000000 +07F000000003E000000003E000000001C00000211B7F9A24>I<FFFE7FFC0FFEFFFE7FFC0FFEFF +FE7FFC0FFE0FE007E000E007F003F001C007F003F001C007F807F803C003F807F8038003F807F8 +038001FC0EFC070001FC0EFC070001FE1EFC0F0000FE1C7E0E0000FE1C7E0E0000FF383F1E0000 +7F383F1C00007F783F3C00003FF01FB800003FF01FB800003FF01FF800001FE00FF000001FE00F +F000000FC007E000000FC007E000000FC007E00000078003C00000078003C0002F1B7F9A32>I< +FFFC0FFF00FFFC0FFF00FFFC0FFF0007F003C00003F807800001FC07800000FE0F000000FF1E00 +00007F3C0000003FF80000001FF00000000FF00000000FF000000007F000000007F80000000FFC +0000001FFE0000001EFE0000003C7F000000783F800000F01FC00001E01FE00001C00FE00003C0 +07F000FFF01FFF80FFF01FFF80FFF01FFF80211B7F9A24>I<FFFE03FF80FFFE03FF80FFFE03FF +8007F000700007F000700007F800F00003F800E00003FC01E00001FC01C00001FC01C00000FE03 +800000FE038000007F070000007F070000007F8F0000003F8E0000003FDE0000001FDC0000001F +DC0000000FF80000000FF80000000FF800000007F000000007F000000003E000000003E0000000 +01C000000001C000000003800000000380000038078000007C07000000FE0F000000FE0E000000 +FE1E000000FE3C0000007C780000003FE00000000FC000000021277F9A24>I +E /Fp 13 118 df<0F001F003F803F007E00F800F000C0000A08769C18>19 D<00038000000380000007C0000007C0000007C000000FE000000FE000001FF000001BF000001B F0000031F8000031F8000061FC000060FC0000E0FE0000C07E0000C07E0001803F0001FFFF0003 FFFF8003001F8003001F8006000FC006000FC00E000FE00C0007E0FFC07FFEFFC07FFE1F1C7E9B @@ -958,35 +1024,61 @@ D<1FD830786018E018E018F000FF807FE07FF01FF807FC007CC01CC01CE01CE018F830CFC00E12 7E9113>I<0300030003000300070007000F000F003FFCFFFC1F001F001F001F001F001F001F00 1F001F001F0C1F0C1F0C1F0C0F08079803F00E1A7F9913>I<FF07F8FF07F81F00F81F00F81F00 F81F00F81F00F81F00F81F00F81F00F81F00F81F00F81F00F81F00F81F01F80F01F80786FF01F8 -FF18127F911B>I E /Fo 45 127 df<007E0001C1800301800703C00E03C00E01800E00000E00 -000E00000E00000E0000FFFFC00E01C00E01C00E01C00E01C00E01C00E01C00E01C00E01C00E01 -C00E01C00E01C00E01C00E01C00E01C00E01C00E01C07F87F8151D809C17>12 -D<FC001C001C001C001C001C001C001C001C001C001C001C001C001C001C001C001C00FF800912 -7F910C>16 D<1C1C3C3870C0800707779C15>19 D<1C001E00078003C001C00380FF000A077B7E -12>24 D<60F0F0701010101020204080040C7C830C>44 D<FFE0FFE00B0280890E>I<60F0F060 -04047C830C>I<003F800000C0600003001800040004000800020010000100201F008020708080 -40E0404040C0384041C03840818038208380382083803820838038208380382083803820818038 -2041C0382040C0384040E0784020709880201F0F00100000000800000004000000030001E000C0 -1F80003FF0001B1D7E9C20>64 D<000600000006000000060000000F0000000F0000000F000000 -17800000178000001780000023C0000023C0000023C0000041E0000041E0000041E0000080F000 -0080F0000180F8000100780001FFF80003007C0002003C0002003C0006003E0004001E0004001E -000C001F001E001F00FF80FFF01C1D7F9C1F>I<001F808000E0618001801980070007800E0003 -801C0003801C00018038000180780000807800008070000080F0000000F0000000F0000000F000 -0000F0000000F0000000F0000000F0000000700000807800008078000080380000801C0001001C -0001000E000200070004000180080000E03000001FC000191E7E9C1E>67 -D<FFFFFC0F003C0F000C0F00040F00040F00060F00020F00020F02020F02000F02000F02000F06 -000FFE000F06000F02000F02000F02000F02010F00010F00020F00020F00020F00060F00060F00 -0C0F003CFFFFFC181C7E9B1C>69 D<001F808000E0618001801980070007800E0003801C000380 -1C00018038000180780000807800008070000080F0000000F0000000F0000000F0000000F00000 -00F0000000F000FFF0F0000F80700007807800078078000780380007801C0007801C0007800E00 -078007000B800180118000E06080001F80001C1E7E9C21>71 D<FFF00F000F000F000F000F000F +FF18127F911B>I E /Fq 19 118 df<387C7E7E3E0E1E3C7CF860070B798416>44 +D<FFFF80FFFF80FFFF8011037E8D16>I<70F8F8F8700505788416>I<00F80003FE000FFF001F0F +803E3F803C7F8078FFC071E7C0F1C3C0E3C3C0E381C0E381C0E381C0E381C0E381C0E3C3C0F1C3 +8071E78078FF003C7E003E3C001F03C00FFFC003FF0000FC0012197E9816>64 +D<1FE0007FF8007FFC00783C00301E00000E00000E0003FE001FFE007E0E00F00E00E00E00E00E +00F01E00F83E007FFFE03FE7E00F83E013127E9116>97 D<7E0000FE00007E00000E00000E0000 +0E00000E00000E3E000EFF800FFFC00F83E00F01E00E00F00E00F00E00700E00700E00700E0070 +0E00F00F00E00F01E00F83C00FFFC00EFF00063C001419809816>I<03F80FFE1FFE3C1E780C70 +00F000E000E000E000E000F000700778073E0F1FFE0FFC03F010127D9116>I<003F00007F0000 +3F0000070000070000070000070003C7000FF7003FFF003C1F00780F00F00700F00700E00700E0 +0700E00700E00700F00700F00F00781F007C3F003FFFE01FF7F007C7E014197F9816>I<03E00F +F81FFC3C1E780E7007E007FFFFFFFFFFFFE000E000700778073C0F1FFE0FFC03F010127D9116> +I<001F00007F8000FF8001E78001C30001C00001C0007FFF00FFFF00FFFF0001C00001C00001C0 +0001C00001C00001C00001C00001C00001C00001C00001C00001C0003FFE007FFF003FFE001119 +7F9816>I<7E0000FE00007E00000E00000E00000E00000E00000E3C000EFF000FFF800F87800F +03800F03800E03800E03800E03800E03800E03800E03800E03800E03800E03807FC7F0FFE7F87F +C7F01519809816>104 D<018003C003C0018000000000000000007FC07FC07FC001C001C001C0 +01C001C001C001C001C001C001C001C001C07FFFFFFF7FFF101A7D9916>I<FFC000FFC000FFC0 +0001C00001C00001C00001C00001C00001C00001C00001C00001C00001C00001C00001C00001C0 +0001C00001C00001C00001C00001C00001C000FFFF80FFFF80FFFF8011197E9816>108 +D<03E0000FF8001FFC003C1E00780F00700700E00380E00380E00380E00380E00380F007807007 +00780F003C1E001FFC000FF80003E00011127E9116>111 D<7E3E00FEFF807FFFC00F83E00F01 +E00E00F00E00F00E00700E00700E00700E00700E00F00F00E00F01E00F83C00FFFC00EFF000E3C +000E00000E00000E00000E00000E00000E00007FC000FFE0007FC000141B809116>I<FF0FC0FF +3FE0FF7FE007F04007E00007C00007800007800007000007000007000007000007000007000007 +0000FFFC00FFFC00FFFC0013127F9116>114 D<0FEC3FFC7FFCF03CE01CE01CF0007F801FF007 +FC003EE00EE00EF00EF81EFFFCFFF8C7E00F127D9116>I<030000070000070000070000070000 +7FFF00FFFF00FFFF00070000070000070000070000070000070000070000070100070380070380 +07078007878003FF0003FE0000F80011177F9616>I<7E1F80FE3F807E1F800E03800E03800E03 +800E03800E03800E03800E03800E03800E03800E03800E07800F0F800FFFF007FFF803E3F01512 +809116>I E /Fr 44 127 df<007E0001C1800301800703C00E03C00E01800E00000E00000E00 +000E00000E0000FFFFC00E01C00E01C00E01C00E01C00E01C00E01C00E01C00E01C00E01C00E01 +C00E01C00E01C00E01C00E01C00E01C00E01C07F87F8151D809C17>12 D<FC001C001C001C001C +001C001C001C001C001C001C001C001C001C001C001C001C00FF8009127F910C>16 +D<1C1C3C3870C0800707779C15>19 D<1C001E00078003C001C00380FF000A077B7E12>24 +D<FFE0FFE00B0280890E>45 D<60F0F06004047C830C>I<030007003F00C70007000700070007 +000700070007000700070007000700070007000700070007000700070007000700070007000F80 +FFF80D1C7C9B15>49 D<07C01830201C400C400EF00FF80FF807F8077007000F000E000E001C00 +1C00380070006000C00180030006010C01180110023FFE7FFEFFFE101C7E9B15>I<0006000000 +06000000060000000F0000000F0000000F00000017800000178000001780000023C0000023C000 +0023C0000041E0000041E0000041E0000080F0000080F0000180F8000100780001FFF80003007C +0002003C0002003C0006003E0004001E0004001E000C001F001E001F00FF80FFF01C1D7F9C1F> +65 D<001F808000E0618001801980070007800E0003801C0003801C0001803800018078000080 +7800008070000080F0000000F0000000F0000000F0000000F0000000F0000000F0000000F00000 +00700000807800008078000080380000801C0001001C0001000E000200070004000180080000E0 +3000001FC000191E7E9C1E>67 D<FFFFFC0F003C0F000C0F00040F00040F00060F00020F00020F +02020F02000F02000F02000F06000FFE000F06000F02000F02000F02000F02010F00010F00020F +00020F00020F00060F00060F000C0F003CFFFFFC181C7E9B1C>69 D<FFF00F000F000F000F000F 000F000F000F000F000F000F000F000F000F000F000F000F000F000F000F000F000F000F000F00 -0F00FFF00C1C7F9B0F>73 D<FFF8000F80000F00000F00000F00000F00000F00000F00000F0000 -0F00000F00000F00000F00000F00000F00000F00000F00000F00000F00080F00080F00080F0018 -0F00180F00100F00300F00700F01F0FFFFF0151C7E9B1A>76 D<003F800000E0E0000380380007 -001C000E000E001C0007003C00078038000380780003C0780003C0700001C0F00001E0F00001E0 -F00001E0F00001E0F00001E0F00001E0F00001E0F00001E0700001C0780003C0780003C0380003 -803C0007801C0007000E000E0007001C000380380000E0E000003F80001B1E7E9C20>79 +0F000F00FFF00C1C7F9B0F>73 D<FFF8000F80000F00000F00000F00000F00000F00000F00000F +00000F00000F00000F00000F00000F00000F00000F00000F00000F00000F00080F00080F00080F +00180F00180F00100F00300F00700F01F0FFFFF0151C7E9B1A>76 D<003F800000E0E000038038 +0007001C000E000E001C0007003C00078038000380780003C0780003C0700001C0F00001E0F000 +01E0F00001E0F00001E0F00001E0F00001E0F00001E0F00001E0700001C0780003C0780003C038 +0003803C0007801C0007000E000E0007001C000380380000E0E000003F80001B1E7E9C20>79 D<FFFF800F00E00F00780F003C0F001C0F001E0F001E0F001E0F001E0F001E0F001C0F003C0F00 780F00E00FFF800F00000F00000F00000F00000F00000F00000F00000F00000F00000F00000F00 000F0000FFF000171C7E9B1C>I<FFFF00000F01E0000F0078000F003C000F001C000F001E000F @@ -1042,53 +1134,59 @@ C018C018E010D0608FC00D127F9110>I<04000400040004000C000C001C003C00FFE01C001C00 00010E00020E000607000403801E07C0FF0FF81512809116>I<FF07E03C03801C01001C01000E 02000E020007040007040007040003880003880003D80001D00001D00000E00000E00000E00000 4000004000008000008000F08000F10000F300006600003C0000131A7F9116>I<FFFFFFFFFF80 -2901808B2A>124 D<1C043F0843F080E00E047D9B15>126 D E /Fp 33 -123 df<70F8FCFC7404040404080810102040060F7C840E>44 D<008003800F80F38003800380 -038003800380038003800380038003800380038003800380038003800380038003800380038003 -800380038003800380038007C0FFFE0F217CA018>49 D<03F0000C1C001007002007804003C040 -03C08003E0F003E0F801E0F801E0F801E02003E00003E00003C00003C0000780000700000E0000 -1C0000180000300000600000C0000180000100000200200400200800201800603000403FFFC07F -FFC0FFFFC013217EA018>I<000200000600000E00000E00001E00001E00002E00004E00004E00 -008E00008E00010E00020E00020E00040E00040E00080E00100E00100E00200E00200E00400E00 -800E00FFFFF8000E00000E00000E00000E00000E00000E00000E00001F0001FFF015217FA018> -52 D<4000006000007FFFE07FFFC07FFFC0400080C00100800100800200800200000400000800 -00080000100000300000200000600000600000600000E00000C00000C00001C00001C00001C000 -01C00003C00003C00003C00003C00003C00003C00003C00003C00001800013237DA118>55 +2901808B2A>124 D<1C043F0843F080E00E047D9B15>126 D E /Fs 7 115 +df<003FC000FFF003C0F00780300F00001E00003C00003C0000780000780000780000F00000F0 +0000F00000F00000F00000F00000F00000F00000F000007800007800007800003C00003C00001E +00000F000807801803C07800FFF0003F80151F7D9D1B>67 D<003F8001FFF003C0F80780380F00 +181E00003C00003C0000780000780000780000F00000F00000F00000F00000F00000F00000F007 +F8F007F8F000387800387800387800383C00383C00381E00380F003807803803C0F801FFF0003F +80151F7D9D1C>71 D<FFFFFF80FFFFFF80001E0000001E0000001E0000001E0000001E0000001E +0000001E0000001E0000001E0000001E0000001E0000001E0000001E0000001E0000001E000000 +1E0000001E0000001E0000001E0000001E0000001E0000001E0000001E0000001E0000001E0000 +001E0000001E0000191D7F9C1C>84 D<0FC03FF07FF87038401C001C001C00FC0FFC3FFC781CE0 +1CE01CE01CF07C7FFC7FDC3F1C0E127E9114>97 D<07C01FE03FF078787018601CFFFCFFFCFFFC +E000E000E000700070043C1C3FFC1FF807E00E127E9112>101 D<00FC01FC03FC07000E000E00 +0E000E000E000E000E00FFE0FFE00E000E000E000E000E000E000E000E000E000E000E000E000E +000E000E000E000E1D809C0D>I<E380E780EF80FC00F800F000F000E000E000E000E000E000E0 +00E000E000E000E000E00009127D910E>114 D E /Ft 31 123 df<70F8FCFC74040404040808 +10102040060F7C840E>44 D<008003800F80F38003800380038003800380038003800380038003 +800380038003800380038003800380038003800380038003800380038003800380038007C0FFFE +0F217CA018>49 D<1000801E07001FFF001FFE001FF80013E00010000010000010000010000010 +000010000010F800130E001407001803801003800001C00001C00001E00001E00001E00001E070 +01E0F001E0F001E0E001C08001C04003C04003802007001006000C1C0003F00013227EA018>53 +D<01F800060E000803001001802001802000C06000C06000C06000C07000C07801803E01003F02 +001FC4000FF80003F80003FC00067F00083F80100F803007C06001C06000E0C000E0C00060C000 +60C00060C000606000406000C03000801803000E0E0003F00013227EA018>56 D<01F000060C000C0600180700380380700380700380F001C0F001C0F001C0F001E0F001E0F001 E0F001E0F001E07001E07003E03803E01805E00C05E00619E003E1E00001C00001C00001C00003 -80000380300300780700780600700C002018001030000FC00013227EA018>57 -D<0007E0100038183000E0063001C00170038000F0070000F00E0000701E0000701C0000303C00 -00303C0000307C0000107800001078000010F8000000F8000000F8000000F8000000F8000000F8 -000000F8000000F800000078000000780000107C0000103C0000103C0000101C0000201E000020 -0E000040070000400380008001C0010000E0020000381C000007E0001C247DA223>67 -D<FFFFFFC00F8007C0078001C0078000C007800040078000400780006007800020078000200780 -002007802020078020000780200007802000078060000780E00007FFE0000780E0000780600007 -802000078020000780200007802000078000000780000007800000078000000780000007800000 -0780000007800000078000000FC00000FFFE00001B227EA120>70 D<FFFC3FFF0FC003F0078001 +80000380300300780700780600700C002018001030000FC00013227EA018>I<0007E010003818 +3000E0063001C00170038000F0070000F00E0000701E0000701C0000303C0000303C0000307C00 +00107800001078000010F8000000F8000000F8000000F8000000F8000000F8000000F8000000F8 +00000078000000780000107C0000103C0000103C0000101C0000201E0000200E00004007000040 +0380008001C0010000E0020000381C000007E0001C247DA223>67 D<FFFFFFC00F8007C0078001 +C0078000C007800040078000400780006007800020078000200780002007802020078020000780 +200007802000078060000780E00007FFE0000780E0000780600007802000078020000780200007 +802000078000000780000007800000078000000780000007800000078000000780000007800000 +0FC00000FFFE00001B227EA120>70 D<FFFC3FFF0FC003F0078001E0078001E0078001E0078001 E0078001E0078001E0078001E0078001E0078001E0078001E0078001E0078001E0078001E00780 -01E0078001E0078001E0078001E007FFFFE0078001E0078001E0078001E0078001E0078001E007 -8001E0078001E0078001E0078001E0078001E0078001E0078001E0078001E0078001E0078001E0 -0FC003F0FFFC3FFF20227EA125>72 D<FFFC0FC007800780078007800780078007800780078007 -800780078007800780078007800780078007800780078007800780078007800780078007800780 -07800FC0FFFC0E227EA112>I<FFFE00000FC00000078000000780000007800000078000000780 +01E007FFFFE0078001E0078001E0078001E0078001E0078001E0078001E0078001E0078001E007 +8001E0078001E0078001E0078001E0078001E0078001E0078001E00FC003F0FFFC3FFF20227EA1 +25>72 D<FFFC0FC007800780078007800780078007800780078007800780078007800780078007 +80078007800780078007800780078007800780078007800780078007800FC0FFFC0E227EA112> +I<FFFE00000FC00000078000000780000007800000078000000780000007800000078000000780 000007800000078000000780000007800000078000000780000007800000078000000780000007 -800000078000000780000007800000078000000780000007800080078000800780008007800080 -078001800780018007800100078003000780030007800F000F803F00FFFFFF0019227EA11E>76 -D<FFC00003FF0FC00003F007C00003E005E00005E005E00005E004F00009E004F00009E004F000 -09E004780011E004780011E004780011E0043C0021E0043C0021E0043C0021E0041E0041E0041E -0041E0040F0081E0040F0081E0040F0081E004078101E004078101E004078101E00403C201E004 -03C201E00401E401E00401E401E00401E401E00400F801E00400F801E00400F801E004007001E0 -0E007001E01F007003F0FFE0203FFF28227EA12D>I<FFFFE000000F803C000007800E00000780 -078000078007C000078003C000078003E000078003E000078003E000078003E000078003E00007 -8003C000078007C000078007800007800E000007803C000007FFE0000007807000000780380000 -07801C000007801E000007800E000007800F000007800F000007800F000007800F000007800F80 -0007800F800007800F800007800F808007800FC080078007C0800FC003C100FFFC01E200000000 -7C0021237EA124>82 D<FFF03FFC03FE1F8007E000F80F0003C000700F0003C000200F0003C000 -20078001E00040078001E00040078001E0004003C002F0008003C002F0008003C002F0008001E0 -0478010001E00478010001E00478010000F0083C020000F0083C020000F0083C020000F8183E06 -000078101E04000078101E0400007C101E0400003C200F0800003C200F0800003C200F0800001E -40079000001E40079000001E40079000000F8003E000000F8003E000000F8003E00000070001C0 -0000070001C00000070001C0000003000180000002000080002F237FA132>87 +800000078000000780000007800080078000800780008007800080078001800780018007800100 +078003000780030007800F000F803F00FFFFFF0019227EA11E>76 D<FFFFE000000F803C000007 +800E00000780078000078007C000078003C000078003E000078003E000078003E000078003E000 +078003E000078003C000078007C000078007800007800E000007803C000007FFE0000007807000 +00078038000007801C000007801E000007800E000007800F000007800F000007800F000007800F +000007800F800007800F800007800F800007800F808007800FC080078007C0800FC003C100FFFC +01E2000000007C0021237EA124>82 D<FFF03FFC03FE1F8007E000F80F0003C000700F0003C000 +200F0003C00020078001E00040078001E00040078001E0004003C002F0008003C002F0008003C0 +02F0008001E00478010001E00478010001E00478010000F0083C020000F0083C020000F0083C02 +0000F8183E06000078101E04000078101E0400007C101E0400003C200F0800003C200F0800003C +200F0800001E40079000001E40079000001E40079000000F8003E000000F8003E000000F8003E0 +0000070001C00000070001C00000070001C0000003000180000002000080002F237FA132>87 D<0FE0001838003C0C003C0E0018070000070000070000070000FF0007C7001E07003C07007807 00700700F00708F00708F00708F00F087817083C23900FC1E015157E9418>97 D<0E0000FE00001E00000E00000E00000E00000E00000E00000E00000E00000E00000E00000E00 @@ -1130,995 +1228,1344 @@ E001F0E00000E00000E00000E00000E00000E00000E00000E00000E00000E0000FFE171F7E941A 00002000004000F04000F08000F180004300003C0000171F7F941A>121 D<3FFFC0380380300780200700600E00401C00403C0040380000700000E00001E00001C0000380 400700400F00400E00C01C0080380080780180700780FFFF8012157F9416>I -E /Fq 18 118 df<FFFFC00000FFFFC0000007F000000003E000000003E000000003E000000003 -E000000003E000000003E000000003E000000003E000000003E000000003E000000003E0000000 -03E000000003E000000003E000000003E000000003E000000003E000000003E000000003E00000 +E /Fu 21 118 df<78FCFCFCFC7806067A8512>46 D<00080000380000780001F8003FF800FE78 +00C078000078000078000078000078000078000078000078000078000078000078000078000078 +000078000078000078000078000078000078000078000078000078000078000078000078000078 +0000780000780000780000780000780000780000780000780000780000780000780000780000FC +007FFFF87FFFF8152F7AAE21>49 D<007F800001FFF0000701F8000C007E0018003F0010001F00 +20000F8040000FC0400007C0400007E0B00007E0F80003E0FC0003E0FC0003E0FC0003E0780007 +E0000007E0000007C0000007C000000F8000000F8000001F0000001F0000003E0000003C000000 +78000000F0000000E0000001C0000003800000070000000E0000001C0000001800000030000000 +60000000C000200180002003000020060000400C00004008000040100000C03FFFFFC07FFFFF80 +FFFFFF80FFFFFF801B2F7DAE21>I<FFFFC00000FFFFC0000007F000000003E000000003E00000 0003E000000003E000000003E000000003E000000003E000000003E000000003E000000003E000 -000003E000000003E000004003E000004003E000004003E000004003E000008003E000008003E0 -00008003E000008003E000018003E000018003E000038003E000038003E000078003E0000F0003 -E0003F0007E000FF00FFFFFFFF00FFFFFFFF0022317CB029>76 D<FFF00000007FF8FFF0000000 -7FF807F00000007F0002F8000000BE0002F8000000BE0002F8000000BE00027C0000013E00027C -0000013E00023E0000023E00023E0000023E00023E0000023E00021F0000043E00021F0000043E -00021F0000043E00020F8000083E00020F8000083E00020F8000083E000207C000103E000207C0 -00103E000207C000103E000203E000203E000203E000203E000201F000403E000201F000403E00 -0201F000403E000200F800803E000200F800803E000200F800803E0002007C01003E0002007C01 -003E0002007C01003E0002003E02003E0002003E02003E0002003E02003E0002001F04003E0002 -001F04003E0002000F88003E0002000F88003E0002000F88003E00020007D0003E00020007D000 -3E00020007D0003E00020003E0003E00020003E0003E00020003E0003E00070001C0003E000F80 -01C0007F00FFF801C00FFFF8FFF800800FFFF835317CB03D>I<FFFFFFC000FFFFFFF80007E000 -FE0003E0001F0003E0000F8003E00007C003E00003E003E00003F003E00001F003E00001F003E0 -0001F803E00001F803E00001F803E00001F803E00001F803E00001F803E00001F003E00001F003 -E00003E003E00003E003E00007C003E0000F8003E0001F0003E000FC0003FFFFF00003E0000000 -03E000000003E000000003E000000003E000000003E000000003E000000003E000000003E00000 -0003E000000003E000000003E000000003E000000003E000000003E000000003E000000003E000 -000003E000000003E000000003E000000003E000000007F0000000FFFF800000FFFF8000002531 -7CB02D>80 D<FFFFFF000000FFFFFFF0000007E001FC000003E0003E000003E0001F800003E000 -07C00003E00007E00003E00003E00003E00003F00003E00001F00003E00001F80003E00001F800 -03E00001F80003E00001F80003E00001F80003E00001F80003E00001F00003E00003F00003E000 -03E00003E00007C00003E0000F800003E0001F000003E0003C000003E001F0000003FFFF000000 -03E003E0000003E00078000003E0003C000003E0001E000003E0000F000003E0000F800003E000 -07800003E00007C00003E00007C00003E00007C00003E00007C00003E00007C00003E00007E000 -03E00007E00003E00007E00003E00007E00003E00007E00003E00007E00803E00007F00803E000 -03F00803E00003F00807F00001F010FFFF8000F810FFFF80007C60000000000F802D327CB031> -82 D<00FE00000303C0000C00E00010007000100038003C003C003E001C003E001E003E001E00 -08001E0000001E0000001E0000001E00000FFE0000FC1E0003E01E000F801E001F001E003E001E -003C001E007C001E00F8001E04F8001E04F8001E04F8003E04F8003E0478003E047C005E043E00 -8F080F0307F003FC03E01E1F7D9E21>97 D<003F8000E0600380180700040F00041E001E1C003E -3C003E7C003E7C0008780000F80000F80000F80000F80000F80000F80000F80000F80000F80000 -7800007C00007C00003C00011E00011E00020F000207000403801800E060003F80181F7D9E1D> -99 D<003F800000E0E0000380380007003C000E001E001E001E001C000F003C000F007C000F00 -78000F8078000780F8000780F8000780FFFFFF80F8000000F8000000F8000000F8000000F80000 -00F8000000780000007C0000003C0000003C0000801E0000800E0001000F0002000780020001C0 -0C0000F03000001FC000191F7E9E1D>101 D<0007E0001C1000383800707C00E07C01E07C01C0 -3803C00003C00003C00003C00003C00003C00003C00003C00003C00003C00003C00003C000FFFF -C0FFFFC003C00003C00003C00003C00003C00003C00003C00003C00003C00003C00003C00003C0 -0003C00003C00003C00003C00003C00003C00003C00003C00003C00003C00003C00003C00003C0 -0003C00007E0007FFF007FFF0016327FB114>I<000000F0007F030801C1C41C0380E81C070070 -080F0078001E003C001E003C003E003E003E003E003E003E003E003E003E003E003E003E001E00 -3C001E003C000F007800070070000780E00009C1C000087F000018000000180000001800000018 -000000180000001C0000000E0000000FFFF80007FFFF0003FFFF800E000FC0180001E0300000F0 -70000070E0000038E0000038E0000038E0000038E00000387000007070000070380000E01C0001 -C00700070001C01C00003FE0001E2F7E9F21>I<01800000003F80000000FF80000000FF800000 -000F80000000078000000007800000000780000000078000000007800000000780000000078000 -000007800000000780000000078000000007800000000780000000078000000007800000000780 -FE00000783078000078C03C000079001E00007A001E00007A000F00007C000F00007C000F00007 -8000F000078000F000078000F000078000F000078000F000078000F000078000F000078000F000 -078000F000078000F000078000F000078000F000078000F000078000F000078000F000078000F0 -00078000F000078000F000078000F000078000F0000FC001F800FFFC1FFF80FFFC1FFF8021327E -B125>I<07000F801F801F800F8007000000000000000000000000000000000000000000000001 -801F80FF80FF800F80078007800780078007800780078007800780078007800780078007800780 -078007800780078007800780078007800FC0FFF8FFF80D307EAF12>I<01803F80FF80FF800F80 +000003E000000003E000000003E000000003E000000003E000000003E000000003E000000003E0 +00000003E000000003E000000003E000000003E000000003E000000003E000000003E000000003 +E000000003E000000003E000000003E000004003E000004003E000004003E000004003E0000080 +03E000008003E000008003E000008003E000018003E000018003E000038003E000038003E00007 +8003E0000F0003E0003F0007E000FF00FFFFFFFF00FFFFFFFF0022317CB029>76 +D<FFF00000007FF8FFF00000007FF807F00000007F0002F8000000BE0002F8000000BE0002F800 +0000BE00027C0000013E00027C0000013E00023E0000023E00023E0000023E00023E0000023E00 +021F0000043E00021F0000043E00021F0000043E00020F8000083E00020F8000083E00020F8000 +083E000207C000103E000207C000103E000207C000103E000203E000203E000203E000203E0002 +01F000403E000201F000403E000201F000403E000200F800803E000200F800803E000200F80080 +3E0002007C01003E0002007C01003E0002007C01003E0002003E02003E0002003E02003E000200 +3E02003E0002001F04003E0002001F04003E0002000F88003E0002000F88003E0002000F88003E +00020007D0003E00020007D0003E00020007D0003E00020003E0003E00020003E0003E00020003 +E0003E00070001C0003E000F8001C0007F00FFF801C00FFFF8FFF800800FFFF835317CB03D>I< +FFFFFFC000FFFFFFF80007E000FE0003E0001F0003E0000F8003E00007C003E00003E003E00003 +F003E00001F003E00001F003E00001F803E00001F803E00001F803E00001F803E00001F803E000 +01F803E00001F003E00001F003E00003E003E00003E003E00007C003E0000F8003E0001F0003E0 +00FC0003FFFFF00003E000000003E000000003E000000003E000000003E000000003E000000003 +E000000003E000000003E000000003E000000003E000000003E000000003E000000003E0000000 +03E000000003E000000003E000000003E000000003E000000003E000000003E000000007F00000 +00FFFF800000FFFF80000025317CB02D>80 D<FFFFFF000000FFFFFFF0000007E001FC000003E0 +003E000003E0001F800003E00007C00003E00007E00003E00003E00003E00003F00003E00001F0 +0003E00001F80003E00001F80003E00001F80003E00001F80003E00001F80003E00001F80003E0 +0001F00003E00003F00003E00003E00003E00007C00003E0000F800003E0001F000003E0003C00 +0003E001F0000003FFFF00000003E003E0000003E00078000003E0003C000003E0001E000003E0 +000F000003E0000F800003E00007800003E00007C00003E00007C00003E00007C00003E00007C0 +0003E00007C00003E00007E00003E00007E00003E00007E00003E00007E00003E00007E00003E0 +0007E00803E00007F00803E00003F00803E00003F00807F00001F010FFFF8000F810FFFF80007C +60000000000F802D327CB031>82 D<00FE00000303C0000C00E00010007000100038003C003C00 +3E001C003E001E003E001E0008001E0000001E0000001E0000001E00000FFE0000FC1E0003E01E +000F801E001F001E003E001E003C001E007C001E00F8001E04F8001E04F8001E04F8003E04F800 +3E0478003E047C005E043E008F080F0307F003FC03E01E1F7D9E21>97 D<003F8000E060038018 +0700040F00041E001E1C003E3C003E7C003E7C0008780000F80000F80000F80000F80000F80000 +F80000F80000F80000F800007800007C00007C00003C00011E00011E00020F0002070004038018 +00E060003F80181F7D9E1D>99 D<003F800000E0E0000380380007003C000E001E001E001E001C +000F003C000F007C000F0078000F8078000780F8000780F8000780FFFFFF80F8000000F8000000 +F8000000F8000000F8000000F8000000780000007C0000003C0000003C0000801E0000800E0001 +000F0002000780020001C00C0000F03000001FC000191F7E9E1D>101 D<0007E0001C10003838 +00707C00E07C01E07C01C03803C00003C00003C00003C00003C00003C00003C00003C00003C000 +03C00003C00003C000FFFFC0FFFFC003C00003C00003C00003C00003C00003C00003C00003C000 +03C00003C00003C00003C00003C00003C00003C00003C00003C00003C00003C00003C00003C000 +03C00003C00003C00003C00003C00007E0007FFF007FFF0016327FB114>I<000000F0007F0308 +01C1C41C0380E81C070070080F0078001E003C001E003C003E003E003E003E003E003E003E003E +003E003E003E003E001E003C001E003C000F007800070070000780E00009C1C000087F00001800 +0000180000001800000018000000180000001C0000000E0000000FFFF80007FFFF0003FFFF800E +000FC0180001E0300000F070000070E0000038E0000038E0000038E0000038E000003870000070 +70000070380000E01C0001C00700070001C01C00003FE0001E2F7E9F21>I<01800000003F8000 +0000FF80000000FF800000000F8000000007800000000780000000078000000007800000000780 +000000078000000007800000000780000000078000000007800000000780000000078000000007 +8000000007800000000780FE00000783078000078C03C000079001E00007A001E00007A000F000 +07C000F00007C000F000078000F000078000F000078000F000078000F000078000F000078000F0 +00078000F000078000F000078000F000078000F000078000F000078000F000078000F000078000 +F000078000F000078000F000078000F000078000F000078000F000078000F0000FC001F800FFFC +1FFF80FFFC1FFF8021327EB125>I<07000F801F801F800F800700000000000000000000000000 +0000000000000000000001801F80FF80FF800F8007800780078007800780078007800780078007 +8007800780078007800780078007800780078007800780078007800FC0FFF8FFF80D307EAF12> +I<01803F80FF80FF800F8007800780078007800780078007800780078007800780078007800780 078007800780078007800780078007800780078007800780078007800780078007800780078007 -800780078007800780078007800780078007800780078007800780078007800780078007800780 -0780078007800FC0FFFCFFFC0E327EB112>108 D<0180FE001FC0003F83078060F000FF8C03C1 -807800FF9001E2003C000FA001E4003C0007A000F4001E0007C000F8001E0007C000F8001E0007 +80078007800780078007800780078007800FC0FFFCFFFC0E327EB112>108 +D<0180FE001FC0003F83078060F000FF8C03C1807800FF9001E2003C000FA001E4003C0007A000 +F4001E0007C000F8001E0007C000F8001E00078000F0001E00078000F0001E00078000F0001E00 +078000F0001E00078000F0001E00078000F0001E00078000F0001E00078000F0001E00078000F0 +001E00078000F0001E00078000F0001E00078000F0001E00078000F0001E00078000F0001E0007 8000F0001E00078000F0001E00078000F0001E00078000F0001E00078000F0001E00078000F000 -1E00078000F0001E00078000F0001E00078000F0001E00078000F0001E00078000F0001E000780 -00F0001E00078000F0001E00078000F0001E00078000F0001E00078000F0001E00078000F0001E -00078000F0001E00078000F0001E00078000F0001E000FC001F8003F00FFFC1FFF83FFF0FFFC1F -FF83FFF0341F7E9E38>I<0180FE00003F83078000FF8C03C000FF9001E0000FA001E00007A000 -F00007C000F00007C000F000078000F000078000F000078000F000078000F000078000F0000780 -00F000078000F000078000F000078000F000078000F000078000F000078000F000078000F00007 -8000F000078000F000078000F000078000F000078000F000078000F000078000F0000FC001F800 -FFFC1FFF80FFFC1FFF80211F7E9E25>I<001FC00000F0780001C01C00070007000F0007801E00 -03C01C0001C03C0001E03C0001E0780000F0780000F0780000F0F80000F8F80000F8F80000F8F8 -0000F8F80000F8F80000F8F80000F8F80000F8780000F07C0001F03C0001E03C0001E01E0003C0 -1E0003C00F00078007800F0001C01C0000F07800001FC0001D1F7E9E21>I<0183E03F8C18FF90 -7CFF907C0FA07C07C03807C00007C00007C0000780000780000780000780000780000780000780 -000780000780000780000780000780000780000780000780000780000780000780000780000FC0 -00FFFE00FFFE00161F7E9E19>114 D<00400000400000400000400000400000C00000C00000C0 -0001C00001C00003C00007C0000FC0001FFFE0FFFFE003C00003C00003C00003C00003C00003C0 -0003C00003C00003C00003C00003C00003C00003C00003C00003C00003C00003C01003C01003C0 -1003C01003C01003C01003C01003C01001C02001E02000E0400078C0001F00142C7FAB19>116 -D<01800030003F8007F000FF801FF000FF801FF0000F8001F000078000F000078000F000078000 +1E000FC001F8003F00FFFC1FFF83FFF0FFFC1FFF83FFF0341F7E9E38>I<0180FE00003F830780 +00FF8C03C000FF9001E0000FA001E00007A000F00007C000F00007C000F000078000F000078000 F000078000F000078000F000078000F000078000F000078000F000078000F000078000F0000780 00F000078000F000078000F000078000F000078000F000078000F000078000F000078000F00007 -8001F000078001F000078001F000038002F00003C004F00001C008F800007030FF80001FC0FF80 -211F7E9E25>I E end +8000F000078000F000078000F0000FC001F800FFFC1FFF80FFFC1FFF80211F7E9E25>I<001FC0 +0000F0780001C01C00070007000F0007801E0003C01C0001C03C0001E03C0001E0780000F07800 +00F0780000F0F80000F8F80000F8F80000F8F80000F8F80000F8F80000F8F80000F8F80000F878 +0000F07C0001F03C0001E03C0001E01E0003C01E0003C00F00078007800F0001C01C0000F07800 +001FC0001D1F7E9E21>I<0183E03F8C18FF907CFF907C0FA07C07C03807C00007C00007C00007 +800007800007800007800007800007800007800007800007800007800007800007800007800007 +80000780000780000780000780000780000FC000FFFE00FFFE00161F7E9E19>114 +D<00400000400000400000400000400000C00000C00000C00001C00001C00003C00007C0000FC0 +001FFFE0FFFFE003C00003C00003C00003C00003C00003C00003C00003C00003C00003C00003C0 +0003C00003C00003C00003C00003C00003C01003C01003C01003C01003C01003C01003C01003C0 +1001C02001E02000E0400078C0001F00142C7FAB19>116 D<01800030003F8007F000FF801FF0 +00FF801FF0000F8001F000078000F000078000F000078000F000078000F000078000F000078000 +F000078000F000078000F000078000F000078000F000078000F000078000F000078000F0000780 +00F000078000F000078000F000078000F000078000F000078001F000078001F000078001F00003 +8002F00003C004F00001C008F800007030FF80001FC0FF80211F7E9E25>I +E end %%EndProlog %%BeginSetup %%Feature: *Resolution 300 TeXDict begin @a4 /a4 where {pop a4} if %%EndSetup %%Page: 1 1 -bop 149 342 a Fq(Reference)22 b(Man)n(ual)e(of)i(the)g(Programming)e -(Language)h(Lua)683 468 y Fp(Rob)q(erto)c(Ierusalimsc)o(h)o(y)618 -526 y(Luiz)f(Henrique)e(de)j(Figueiredo)678 584 y(W)l(aldemar)e(Celes)g -(Filho)725 664 y Fo(T)m(eCGraf)e(|)g(PUC-Rio)616 722 y(rob)q(erto,)i(lhf,)d -(celes@icad.puc-rio.br)778 823 y Fp(Ma)o(y)k(27,)h(1994)830 -991 y Fn(Abstract)164 1067 y Fo(Lua)j(is)g(an)g(em)o(b)q(edded)g(programming) -c(language)k(designed)g(to)g(b)q(e)h(used)g(as)f(a)g(con\014guration)102 -1117 y(language)13 b(for)h(an)o(y)f(program)f(that)j(needs)g(one.)j(This)c -(do)q(cumen)o(t)g(describ)q(es)i(the)f(Lua)e(programming)102 -1166 y(language)c(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.)102 -1216 y(It)k(also)f(presen)o(ts)j(some)d(examples)g(of)g(using)h(the)g(main)e -(features)j(of)e(the)i(system.)869 1471 y Fn(Sum\023)-24 b(ario)102 -1538 y Fo(Lua)9 b(\023)-20 b(e)11 b(uma)d(linguagem)g(de)j(extens~)-21 -b(ao)11 b(pro)r(jetada)f(para)h(ser)g(usada)f(como)f(linguagem)f(de)j -(con\014gura\030)-18 b(c~)d(ao)102 1588 y(em)19 b(qualquer)i(programa)d(que)j -(precise)h(de)f(uma.)37 b(Este)21 b(do)q(cumen)o(to)f(descrev)o(e)j(a)d -(linguagem)e(de)102 1638 y(programa\030)-18 b(c~)d(ao)14 b(Lua)h(e)h(a)g(In)o -(terface)h(de)f(Programa\030)-18 b(c~)d(ao)14 b(que)i(p)q(ermite)g(a)f(in)o -(tera\030)-18 b(c~)d(ao)16 b(en)o(tre)h(programas)102 1688 -y(Lua)d(e)h(o)f(programa)e(C)i(hosp)q(edeiro.)20 b(O)15 b(do)q(cumen)o(to)e -(tam)o(b)o(\023)-20 b(em)12 b(apresen)o(ta)k(alguns)d(exemplos)h(de)h(uso)102 -1737 y(das)f(principais)f(caracter)-5 b(\023)-16 b(\020sticas)16 -b(do)d(sistema.)910 2976 y Fm(1)p eop -%%Page: 2 2 -bop -12 160 a Fl(1)69 b(In)n(tro)r(duction)-12 261 y Fm(Lua)16 -b(is)h(an)f(em)o(b)q(edded)h(programming)e(language)h(designed)i(to)d(supp)q -(ort)h(general)g(pro)q(cedural)h(program-)-12 318 y(ming)k(features)f(with)g -(data)g(description)h(facilities.)37 b(It)20 b(is)h(supp)q(osed)g(to)f(b)q(e) -h(used)f(as)g(a)g(con\014guration)-12 374 y(language)g(for)f(an)o(y)g -(program)f(that)g(needs)j(one.)32 b(Lua)20 b(w)o(as)e(designed)j(b)o(y)f(R.)f -(Ierusalimsc)o(h)o(y)l(,)i(L.)f(H.)f(de)-12 430 y(Figueiredo)d(and)g(W.)e -(Celes,)i(and)f(implemen)o(ted)i(b)o(y)e(W.)g(Celes.)59 487 -y(Lua)j(is)g(implemen)o(ted)h(as)e(a)h(library)l(,)h(written)e(in)i(C.)e -(Being)h(an)g(em)o(b)q(edded)h(language,)f(Lua)g(has)f(no)-12 -543 y(notion)j(of)f(a)g(\\main")g(program:)28 b(it)19 b(only)h(w)o(orks)f -Fk(emb)n(e)n(dde)n(d)g Fm(in)h(a)f(host)g(clien)o(t,)j(called)f(the)e -Fk(emb)n(e)n(dding)-12 600 y Fm(program.)g(This)c(host)g(program)e(can)i(in)o -(v)o(ok)o(e)g(functions)h(to)e(execute)h(a)g(piece)h(of)e(co)q(de)i(in)f -(Lua,)g(can)g(write)-12 656 y(and)i(read)g(Lua)h(v)m(ariables,)g(and)f(can)g +bop 96 342 a Fu(Reference)22 b(Man)n(ual)f(of)g(the)h(Programming)e(Language) +h(Lua)h(2.1)87 468 y Ft(Rob)q(erto)17 b(Ierusalimsc)o(h)o(y)46 +b(Luiz)16 b(Henrique)e(de)i(Figueiredo)48 b(W)l(aldemar)15 +b(Celes)h(Filho)736 548 y Fs(T)m(eC)797 561 y(Graf)885 548 +y Fr(|)e(PUC-Rio)562 606 y Fq(roberto,lhf,cele)o(s@ica)o(d.puc)o(-rio)o(.br) +741 720 y Ft(F)l(ebruary)i(8,)h(1995)830 888 y Fp(Abstract)102 +963 y Fr(Lua)12 b(is)g(an)f(extension)i(programming)c(language)i(designed)h +(to)g(b)q(e)h(used)g(as)f(a)g(con\014guration)g(language)102 +1013 y(for)h(an)o(y)g(program)f(that)i(needs)h(one.)j(This)13 +b(do)q(cumen)o(t)g(describ)q(es)j(v)o(ersion)e(2.1)e(of)h(the)h(Lua)f +(program-)102 1063 y(ming)g(language)h(and)g(the)i(API)f(that)g(allo)o(ws)f +(in)o(teraction)g(b)q(et)o(w)o(een)j(Lua)d(programs)g(and)h(its)g(host)g(C) +102 1113 y(program.)h(It)e(also)f(presen)o(ts)j(some)d(examples)g(of)h(using) +f(the)i(main)c(features)k(of)f(the)g(system.)869 1328 y Fp(Sum\023)-24 +b(ario)102 1396 y Fr(Lua)9 b(\023)-20 b(e)11 b(uma)d(linguagem)g(de)j +(extens~)-21 b(ao)11 b(pro)r(jetada)f(para)h(ser)g(usada)f(como)f(linguagem)f +(de)j(con\014gura\030)-18 b(c~)d(ao)102 1446 y(em)19 b(qualquer)h(programa)f +(que)h(precise)i(de)f(uma.)35 b(Este)21 b(do)q(cumen)o(to)f(descrev)o(e)i(a)e +(v)o(ers~)-21 b(ao)21 b(2.1)e(da)102 1496 y(linguagem)f(de)i(programa\030)-18 +b(c~)d(ao)19 b(Lua)h(e)h(a)f(In)o(terface)h(de)g(Programa\030)-18 +b(c~)d(ao)19 b(que)i(p)q(ermite)f(a)g(in)o(tera\030)-18 b(c~)d(ao)102 +1545 y(en)o(tre)15 b(programas)e(Lua)h(e)h(o)f(programa)e(C)j(hosp)q(edeiro.) +20 b(O)14 b(do)q(cumen)o(to)g(tam)o(b)o(\023)-20 b(em)12 b(apresen)o(ta)j +(alguns)102 1595 y(exemplos)e(de)h(uso)g(das)g(principais)g(caracter)-5 +b(\023)-16 b(\020sticas)15 b(do)f(sistema.)-12 1738 y Fo(1)69 +b(In)n(tro)r(duction)-12 1840 y Fn(Lua)18 b(is)f(an)g(extension)h +(programming)f(language)g(designed)i(to)d(supp)q(ort)h(general)h(pro)q +(cedural)g(program-)-12 1896 y(ming)j(features)f(with)g(data)g(description)h +(facilities.)37 b(It)20 b(is)h(supp)q(osed)g(to)f(b)q(e)h(used)f(as)g(a)g +(con\014guration)-12 1953 y(language)e(for)f(an)o(y)g(program)f(that)h(needs) +h(one.)27 b(Its)18 b(main)g(extensions)g(are)f(related)h(to)f(ob)s +(ject-orien)o(ted)-12 2009 y(facilities,)f(and)e(fallbac)o(ks,)g(but)g(it)g +(has)g(some)g(other)f(minor)h(con)o(tributions.)20 b(Lua)14 +b(has)g(b)q(een)h(designed)g(and)-12 2066 y(implemen)o(ted)i(b)o(y)e(W.)g +(Celes)h(F.,)e(L.)h(H.)g(de)g(Figueiredo)i(and)e(R.)g(Ierusalimsc)o(h)o(y)l +(.)59 2122 y(Lua)k(is)g(implemen)o(ted)h(as)e(a)g(library)l(,)i(written)f(in) +g(C.)f(Being)h(an)g(extension)g(language,)g(Lua)g(has)f(no)-12 +2179 y(notion)i(of)f(a)g(\\main")g(program:)28 b(it)19 b(only)h(w)o(orks)f +Fm(emb)n(e)n(dde)n(d)g Fn(in)h(a)f(host)g(clien)o(t,)j(called)f(the)e +Fm(emb)n(e)n(dding)-12 2235 y Fn(program.)g(This)c(host)g(program)e(can)i(in) +o(v)o(ok)o(e)g(functions)h(to)e(execute)h(a)g(piece)h(of)e(co)q(de)i(in)f +(Lua,)g(can)g(write)-12 2291 y(and)i(read)g(Lua)h(v)m(ariables,)g(and)f(can)g (register)g(C)g(functions)h(to)e(b)q(e)i(called)g(b)o(y)f(Lua)h(co)q(de.)25 -b(Through)17 b(the)-12 713 y(use)d(of)g(C)f(functions,)i(Lua)f(can)g(b)q(e)h +b(Through)17 b(the)-12 2348 y(use)d(of)g(C)f(functions,)i(Lua)f(can)g(b)q(e)h (augmen)o(ted)e(to)g(cop)q(e)i(with)f(rather)f(di\013eren)o(t)h(domains,)g -(th)o(us)g(creating)-12 769 y(customized)i(programming)f(languages)g(sharing) -h(a)f(syn)o(tactical)g(framew)o(ork.)59 826 y(Lua)k(is)g(free)g(distribution) -h(soft)o(w)o(are,)e(and)h(pro)o(vided)g(as)g(usual)g(with)g(no)g(guaran)o -(tees.)30 b(The)19 b(imple-)-12 882 y(men)o(tation)c(describ)q(ed)i(in)f -(this)g(man)o(ual)f(is)h(a)o(v)m(ailable)h(b)o(y)e(anon)o(ymous)g(ftp)g(from) -60 976 y Fj(ftp.icad.puc-rio.br:/pub)o(/lua/lua)o(_1.0.ta)o(r.Z)-12 -1119 y Fl(2)69 b(En)n(vironmen)n(t)21 b(and)i(Mo)r(dules)-12 -1221 y Fm(All)15 b(statemen)o(ts)d(in)j(Lua)e(are)h(executed)g(in)g(a)f -Fk(glob)n(al)h(envir)n(onment)t Fm(.)k(This)d(en)o(vironmen)o(t,)e(whic)o(h)i -(k)o(eeps)e(all)-12 1277 y(global)19 b(v)m(ariables)g(and)f(functions,)g(is)h +(th)o(us)g(creating)-12 2404 y(customized)i(programming)f(languages)g +(sharing)h(a)f(syn)o(tactical)g(framew)o(ork.)59 2461 y(Lua)k(is)g(free)g +(distribution)h(soft)o(w)o(are,)e(and)h(pro)o(vided)g(as)g(usual)g(with)g(no) +g(guaran)o(tees.)30 b(The)19 b(imple-)-12 2517 y(men)o(tation)c(describ)q(ed) +i(in)f(this)g(man)o(ual)f(is)h(a)o(v)m(ailable)h(b)o(y)e(anon)o(ymous)g(ftp)g +(from)60 2611 y Fl(ftp.icad.puc-rio.br:/pub)o(/lua/lua)o(-2.1.ta)o(r.Z)-12 +2705 y Fn(or)g(b)o(y)g(WWW)f(\(W)l(orld)h(Wide)h(W)l(eb\))g(from)60 +2799 y Fl(http://www.inf.puc-rio.b)o(r/projet)o(os/robe)o(rto/lua)o(.html)910 +2976 y Fn(1)p eop +%%Page: 2 2 +bop -12 160 a Fo(2)69 b(En)n(vironmen)n(t)21 b(and)i(Mo)r(dules)-12 +261 y Fn(All)15 b(statemen)o(ts)d(in)j(Lua)e(are)h(executed)g(in)g(a)f +Fm(glob)n(al)h(envir)n(onment)t Fn(.)k(This)d(en)o(vironmen)o(t,)e(whic)o(h)i +(k)o(eeps)e(all)-12 318 y(global)19 b(v)m(ariables)g(and)f(functions,)g(is)h (initialized)i(at)c(the)h(b)q(eginning)i(of)d(the)h(em)o(b)q(edding)h -(program)e(and)-12 1334 y(p)q(ersists)f(un)o(til)g(its)g(end.)59 -1390 y(The)i(global)g(en)o(vironmen)o(t)g(can)g(b)q(e)g(manipulated)i(b)o(y)d +(program)e(and)-12 374 y(p)q(ersists)f(un)o(til)g(its)g(end.)59 +430 y(The)i(global)g(en)o(vironmen)o(t)g(can)g(b)q(e)g(manipulated)i(b)o(y)d (Lua)h(co)q(de)h(or)e(b)o(y)h(the)f(em)o(b)q(edding)j(program,)-12 -1446 y(whic)o(h)c(can)g(read)f(and)g(write)g(global)h(v)m(ariables)h(using)f +487 y(whic)o(h)c(can)g(read)f(and)g(write)g(global)h(v)m(ariables)h(using)f (functions)g(in)g(the)f(library)h(that)e(implemen)o(ts)j(Lua.)59 -1503 y(Global)22 b(v)m(ariables)g(do)f(not)g(need)h(declaration.)39 +543 y(Global)22 b(v)m(ariables)g(do)f(not)g(need)h(declaration.)39 b(An)o(y)22 b(v)m(ariable)g(is)g(assumed)g(to)e(b)q(e)i(global)g(unless)-12 -1559 y(explicitly)17 b(declared)f(lo)q(cal)g(\(see)e(lo)q(cal)h -(declarations,)g(Section)h(4.4.5\).)h(Before)e(the)f(\014rst)g(assignmen)o -(t,)g(the)-12 1616 y(v)m(alue)j(of)d(a)h(global)h(v)m(ariable)h(is)e -Fi(nil)p Fm(.)59 1672 y(The)g(unit)h(of)f(execution)h(of)f(Lua)h(is)f(called) -i(a)e Fk(mo)n(dule)s Fm(.)20 b(The)c(syn)o(tax)e(for)h(mo)q(dules)h(is:)1563 -1656 y Fh(1)72 1744 y Fk(mo)n(dule)50 b Fg(!)g(f)p Fk(statement)32 -b Fg(j)16 b Fk(function)s Fg(g)-1 1816 y Fm(A)10 b(mo)q(dule)i(ma)o(y)e(con)o -(tain)h(statemen)o(ts)e(and/or)h(function)i(de\014nitions,)g(and)f(ma)o(y)f -(b)q(e)h(in)h(a)e(\014le)i(or)e(in)h(a)f(string)-12 1873 y(inside)16 -b(the)f(host)f(program.)k(When)d(a)f(mo)q(dule)i(is)f(executed,)g(\014rst)f -(all)h(its)g(functions)g(and)f(statemen)o(ts)g(are)-12 1929 -y(compiled,)g(and)f(the)f(functions)h(added)g(to)f(the)g(global)h(en)o -(vironmen)o(t;)g(then)g(the)f(statemen)o(ts)f(are)h(executed)-12 -1986 y(in)k(sequen)o(tial)g(order.)k(All)d(mo)q(di\014cations)f(a)f(mo)q -(dule)h(e\013ects)f(on)g(the)g(global)h(en)o(vironmen)o(t)f(p)q(ersist)h -(after)-12 2042 y(its)g(end.)k(Those)15 b(include)j(mo)q(di\014cations)e(to)f -(global)g(v)m(ariables)i(and)e(de\014nitions)i(of)e(new)g(functions)1736 -2026 y Fh(2)1757 2042 y Fm(.)-12 2185 y Fl(3)69 b(T)n(yp)r(es)-12 -2287 y Fm(Lua)16 b(is)h(a)e(dynamically)j(t)o(yp)q(ed)e(language.)22 -b(V)l(ariables)17 b(do)f(not)f(ha)o(v)o(e)g(t)o(yp)q(es;)h(only)g(v)m(alues)h -(do.)22 b(All)17 b(v)m(alues)-12 2343 y(carry)e(their)h(o)o(wn)e(t)o(yp)q(e.) -20 b(Therefore,)15 b(there)g(are)g(no)g(t)o(yp)q(e)g(de\014nitions)i(in)f -(the)g(language.)59 2400 y(There)f(are)g(sev)o(en)g(basic)g(t)o(yp)q(es)g(in) -h(Lua:)k Fk(nil)p Fm(,)14 b Fk(numb)n(er)p Fm(,)g Fk(string)p -Fm(,)g Fk(function)p Fm(,)g Fk(Cfunction)p Fm(,)g Fk(user)n(data)p -Fm(,)h(and)-12 2456 y Fk(table)p Fm(.)25 b Fk(Nil)16 b Fm(is)h(the)g(t)o(yp)q -(e)g(of)g(the)g(v)m(alue)h Fi(nil)p Fm(,)g(whose)f(main)g(prop)q(ert)o(y)g +600 y(explicitly)17 b(declared)f(lo)q(cal)g(\(see)e(lo)q(cal)h(declarations,) +g(Section)h(4.4.5\).)h(Before)e(the)f(\014rst)g(assignmen)o(t,)g(the)-12 +656 y(v)m(alue)j(of)d(a)h(global)h(v)m(ariable)h(is)e Fk(nil)p +Fn(.)59 713 y(The)g(unit)h(of)f(execution)h(of)f(Lua)h(is)f(called)i(a)e +Fm(mo)n(dule)s Fn(.)20 b(The)c(syn)o(tax)e(for)h(mo)q(dules)h(is:)1563 +696 y Fj(1)72 785 y Fm(mo)n(dule)50 b Fi(!)g(f)p Fm(statement)32 +b Fi(j)16 b Fm(function)s Fi(g)-12 857 y Fn(A)f(mo)q(dule)h(ma)o(y)f(con)o +(tain)g(statemen)o(ts)f(and)h(function)g(de\014nitions,)i(and)e(ma)o(y)f(b)q +(e)i(in)g(a)e(\014le)i(or)f(in)h(a)e(string)-12 913 y(inside)i(the)f(host)f +(program.)k(When)d(a)f(mo)q(dule)i(is)f(executed,)g(\014rst)f(all)h(its)g +(functions)g(and)f(statemen)o(ts)g(are)-12 970 y(compiled,)g(and)f(the)f +(functions)h(added)g(to)f(the)g(global)h(en)o(vironmen)o(t;)g(then)g(the)f +(statemen)o(ts)f(are)h(executed)-12 1026 y(in)k(sequen)o(tial)g(order.)k(All) +d(mo)q(di\014cations)f(a)f(mo)q(dule)h(e\013ects)f(on)g(the)g(global)h(en)o +(vironmen)o(t)f(p)q(ersist)h(after)-12 1083 y(its)g(end.)k(Those)15 +b(include)j(mo)q(di\014cations)e(to)f(global)g(v)m(ariables)i(and)e +(de\014nitions)i(of)e(new)g(functions)1736 1066 y Fj(2)1757 +1083 y Fn(.)-12 1226 y Fo(3)69 b(T)n(yp)r(es)-12 1327 y Fn(Lua)16 +b(is)h(a)e(dynamically)j(t)o(yp)q(ed)e(language.)22 b(V)l(ariables)17 +b(do)f(not)f(ha)o(v)o(e)g(t)o(yp)q(es;)h(only)g(v)m(alues)h(do.)22 +b(All)17 b(v)m(alues)-12 1384 y(carry)e(their)h(o)o(wn)e(t)o(yp)q(e.)20 +b(Therefore,)15 b(there)g(are)g(no)g(t)o(yp)q(e)g(de\014nitions)i(in)f(the)g +(language.)59 1440 y(There)e(are)f(sev)o(en)i(basic)f(t)o(yp)q(es)g(in)h +(Lua:)k Fm(nil)p Fn(,)13 b Fm(numb)n(er)p Fn(,)g Fm(string)p +Fn(,)g Fm(function)p Fn(,)h Fm(CF)m(unction)p Fn(,)e Fm(user)n(data)p +Fn(,)i(and)-12 1497 y Fm(table)p Fn(.)25 b Fm(Nil)16 b Fn(is)h(the)g(t)o(yp)q +(e)g(of)g(the)g(v)m(alue)h Fk(nil)p Fn(,)g(whose)f(main)g(prop)q(ert)o(y)g (is)g(to)f(b)q(e)i(di\013eren)o(t)f(from)f(an)o(y)h(other)-12 -2513 y(v)m(alue.)k Fk(Numb)n(er)15 b Fm(represen)o(ts)h(real)f(\(\015oating)g -(p)q(oin)o(t\))g(n)o(um)o(b)q(ers,)g(while)i Fk(string)d Fm(has)i(the)f -(usual)h(meaning.)59 2569 y(F)l(unctions)f(are)e(considered)j(\014rst-class)e +1553 y(v)m(alue.)k Fm(Numb)n(er)15 b Fn(represen)o(ts)h(real)f(\(\015oating)g +(p)q(oin)o(t\))g(n)o(um)o(b)q(ers,)g(while)i Fm(string)d Fn(has)i(the)f +(usual)h(meaning.)59 1610 y(F)l(unctions)f(are)e(considered)j(\014rst-class)e (v)m(alues)i(in)f(Lua.)k(This)c(means)f(that)g(functions)h(can)f(b)q(e)h -(stored)-12 2626 y(in)h(v)m(ariables,)g(passed)f(as)f(argumen)o(ts)g(to)h +(stored)-12 1666 y(in)h(v)m(ariables,)g(passed)f(as)f(argumen)o(ts)g(to)h (other)f(functions)i(and)f(returned)g(as)g(results.)20 b(When)15 -b(a)f(function)-12 2682 y(in)19 b(Lua)g(is)f(de\014ned,)i(its)f(b)q(o)q(dy)f -(is)h(compiled)h(and)e(stored)g(in)h(a)f(global)h(v)m(ariable)g(with)g(the)f -(giv)o(en)h(name.)p -12 2722 747 2 v 40 2749 a Ff(1)57 2764 -y Fe(As)12 b(usual)i(in)g(extended)f(BNF,)f Fd(f)p Fc(a)s Fd(g)g -Fe(means)h(0)g(or)f(more)h Fc(a)s Fe('s,)e([)p Fc(a)s Fe(])g(means)i(an)g -(optional)h Fc(a)e Fe(and)h Fd(f)p Fc(a)s Fd(g)1500 2749 y -Ff(+)1538 2764 y Fe(means)g(one)g(or)f(more)-12 2810 y Fc(a)s -Fe('s.)40 2840 y Ff(2)57 2856 y Fe(Actually)m(,)i(a)f(function)i +b(a)f(function)-12 1723 y(is)j(de\014ned)h(in)g(Lua,)e(its)h(b)q(o)q(dy)h(is) +f(compiled)h(and)f(stored)f(in)h(a)f(giv)o(en)h(v)m(ariable.)26 +b(Lua)17 b(can)f(call)i(\(and)f(ma-)-12 1779 y(nipulate\))e(functions)g +(written)f(in)h(Lua)f(and)g(functions)h(written)f(in)g(C;)g(the)g(latter)f +(ha)o(v)o(e)h(t)o(yp)q(e)g Fm(CF)m(unction)s Fn(.)59 1836 y(The)i(t)o(yp)q(e) +g Fm(user)n(data)h Fn(is)f(pro)o(vided)h(to)e(allo)o(w)i(arbitrary)e(C)h(p)q +(oin)o(ters)g(to)g(b)q(e)h(stored)e(in)i(Lua)f(v)m(ariables.)-12 +1892 y(It)21 b(corresp)q(onds)f(to)g Fl(void*)g Fn(and)g(has)g(no)h +(pre-de\014ned)h(op)q(erations)e(in)h(Lua,)h(b)q(esides)g(assignmen)o(t)e +(and)-12 1948 y(equalit)o(y)15 b(test.)k(Ho)o(w)o(ev)o(er,)13 +b(b)o(y)h(using)h(fallbac)o(ks,)f(the)h(programmer)d(ma)o(y)i(de\014ne)h(op)q +(erations)f(for)g Fm(user)n(data)-12 2005 y Fn(v)m(alues;)i(see)g(Section)g +(4.7.)59 2061 y(The)d(t)o(yp)q(e)h Fm(table)e Fn(implemen)o(ts)j(asso)q +(ciativ)o(e)e(arra)o(ys,)f(that)h(is,)h(arra)o(ys)e(whic)o(h)i(can)f(b)q(e)h +(indexed)h(not)e(only)-12 2118 y(with)20 b(n)o(um)o(b)q(ers,)g(but)f(with)g +(an)o(y)g(v)m(alue)h(\(except)g Fk(nil)p Fn(\).)32 b(Therefore,)19 +b(this)h(t)o(yp)q(e)f(ma)o(y)g(b)q(e)g(used)h(not)f(only)-12 +2174 y(to)c(represen)o(t)h(ordinary)g(arra)o(ys,)e(but)h(also)h(sym)o(b)q(ol) +g(tables,)g(sets,)f(records,)g(etc.)21 b(T)l(o)16 b(represen)o(t)f(a)h +(record,)-12 2231 y(Lua)h(uses)f(the)g(\014eld)i(name)e(as)g(an)g(index.)24 +b(The)17 b(language)f(supp)q(orts)g(this)h(represen)o(tation)f(b)o(y)g(pro)o +(viding)-12 2287 y Fl(a.name)f Fn(as)h(syn)o(tactic)g(sugar)g(for)f +Fl(a["name"])p Fn(.)22 b(T)l(ables)17 b(ma)o(y)e(also)h(carry)g(metho)q(ds.) +23 b(Because)17 b(functions)-12 2344 y(are)g(\014rst)g(class)h(v)m(alues,)h +(table)f(\014elds)g(ma)o(y)f(con)o(tain)h(functions.)27 b(The)17 +b(form)g Fl(t:f\(x\))g Fn(is)h(syn)o(tactic)f(sugar)-12 2400 +y(for)e Fl(t.f\(t,x\))p Fn(,)e(whic)o(h)j(calls)h(the)e(metho)q(d)g +Fl(f)g Fn(from)g(the)g(table)h Fl(t)f Fn(passing)g(itself)i(as)d(the)i +(\014rst)e(parameter.)59 2457 y(It)i(is)g(imp)q(ortan)o(t)f(to)g(notice)i +(that)e(tables)h(are)f(ob)s(jects,)g(and)h(not)f(v)m(alues.)23 +b(V)l(ariables)17 b(cannot)e(con)o(tain)-12 2513 y(tables,)e(only)h +(references)f(to)f(them.)19 b(Assignmen)o(t,)13 b(parameter)f(passing)i(and)e +(returns)h(alw)o(a)o(ys)f(manipulate)-12 2569 y(references)18 +b(to)f(tables,)h(and)f(do)h(not)f(imply)h(an)o(y)f(kind)i(of)e(cop)o(y)l(.)26 +b(Moreo)o(v)o(er,)16 b(tables)i(m)o(ust)e(b)q(e)j(explicitly)-12 +2626 y(created)c(b)q(efore)h(used;)f(see)h(Section)g(4.5.7.)p +-12 2665 747 2 v 40 2692 a Fh(1)57 2708 y Fg(As)d(usual,)h +Ff(f)p Fe(a)s Ff(g)f Fg(means)g(0)g(or)h(more)f Fe(a)s Fg('s,)e([)p +Fe(a)s Fg(])h(means)i(an)f(optional)i Fe(a)e Fg(and)g Ff(f)p +Fe(a)s Ff(g)1208 2692 y Fh(+)1247 2708 y Fg(means)g(one)g(or)g(more)h +Fe(a)s Fg('s.)40 2738 y Fh(2)57 2754 y Fg(Actually)m(,)g(a)f(function)i (de\014nition)h(is)d(an)g(assignmen)o(t)i(to)e(a)g(global)i(v)n(ariable;)g -(see)e(Section)i(3.)910 2976 y Fm(2)p eop +(see)e(Section)i(3.)910 2976 y Fn(2)p eop %%Page: 3 3 -bop -12 160 a Fm(Lua)16 b(can)f(call)i(\(and)e(manipulate\))h(functions)h -(written)e(in)h(Lua)g(and)g(functions)g(written)f(in)h(C;)f(the)h(latter)-12 -216 y(ha)o(v)o(e)f(t)o(yp)q(e)g Fk(Cfunction)s Fm(.)59 273 -y(The)h(t)o(yp)q(e)g Fk(user)n(data)h Fm(is)f(pro)o(vided)h(to)e(allo)o(w)i -(arbitrary)e(C)h(p)q(oin)o(ters)g(to)g(b)q(e)h(stored)e(in)i(Lua)f(v)m -(ariables.)-12 329 y(It)h(corresp)q(onds)g(to)f Fj(void*)g -Fm(and)g(has)h(no)g(v)m(alid)h(op)q(erations)f(in)g(Lua,)g(b)q(esides)h -(assignmen)o(t)f(and)g(equalit)o(y)-12 385 y(test.)59 442 y(The)c(t)o(yp)q(e) -h Fk(table)f Fm(implemen)o(ts)h(asso)q(ciativ)o(e)g(arra)o(ys,)e(that)h(is,)g -(arra)o(ys)f(that)h(can)g(b)q(e)h(indexed)h(b)q(oth)f(with)-12 -498 y(n)o(um)o(b)q(ers)19 b(and)f(with)h(strings.)29 b(Therefore,)19 -b(this)g(t)o(yp)q(e)f(ma)o(y)g(b)q(e)h(used)g(not)f(only)h(to)f(represen)o(t) -g(ordinary)-12 555 y(arra)o(ys,)h(but)h(also)f(sym)o(b)q(ol)h(tables,)g -(sets,)g(records,)g(etc.)33 b(T)l(o)19 b(represen)o(t)h(a)f(record,)h(Lua)g -(uses)f(the)h(\014eld)-12 611 y(name)13 b(as)g(an)g(index.)21 -b(The)13 b(language)g(supp)q(orts)g(this)h(represen)o(tation)f(b)o(y)g(pro)o -(viding)h Fj(a.name)f Fm(as)f(syn)o(tactic)-12 668 y(sugar)j(for)f -Fj(a["name"])p Fm(.)59 724 y(It)i(is)g(imp)q(ortan)o(t)f(to)g(notice)i(that)e -(tables)h(are)f(ob)s(jects,)g(and)h(not)f(v)m(alues.)23 b(V)l(ariables)17 -b(cannot)e(con)o(tain)-12 781 y(tables,)e(only)h(references)f(to)f(them.)19 -b(Assignmen)o(t,)13 b(parameter)f(passing)i(and)e(returns)h(alw)o(a)o(ys)f -(manipulate)-12 837 y(references)18 b(to)f(tables,)h(and)f(do)h(not)f(imply)h -(an)o(y)f(kind)i(of)e(cop)o(y)l(.)26 b(Moreo)o(v)o(er,)16 b(tables)i(m)o(ust) -e(b)q(e)j(explicitly)-12 894 y(created)c(b)q(efore)h(used;)f(see)h(Section)g -(4.5.7.)-12 1037 y Fl(4)69 b(The)23 b(Language)-12 1138 y Fm(This)16 +bop -12 160 a Fo(4)69 b(The)23 b(Language)-12 261 y Fn(This)16 b(section)g(describ)q(es)h(the)e(lexis,)h(syn)o(tax)e(and)i(seman)o(tics)f -(of)g(Lua.)-12 1260 y Fb(4.1)56 b(Lexical)17 b(Con)n(v)n(en)n(tions)-12 -1346 y Fm(Lua)c(is)g(a)f(case)g(sensitiv)o(e)i(language.)19 +(of)g(Lua.)-12 383 y Fd(4.1)56 b(Lexical)17 b(Con)n(v)n(en)n(tions)-12 +469 y Fn(Lua)c(is)g(a)f(case)g(sensitiv)o(e)i(language.)19 b(Iden)o(ti\014ers)14 b(can)e(b)q(e)h(an)o(y)f(string)h(of)f(letters,)g -(digits,)i(and)e(underscores,)-12 1402 y(not)h(b)q(eginning)h(with)f(a)g +(digits,)i(and)e(underscores,)-12 525 y(not)h(b)q(eginning)h(with)f(a)g (digit.)20 b(The)13 b(follo)o(wing)g(w)o(ords)f(are)h(reserv)o(ed,)g(and)g -(cannot)f(b)q(e)h(used)h(as)e(iden)o(ti\014ers:)203 1496 y -Fj(and)143 b(do)190 b(else)143 b(elseif)95 b(end)203 1552 y(function)23 -b(if)190 b(local)119 b(nil)167 b(not)203 1609 y(or)g(repeat)94 -b(return)h(until)119 b(then)95 b(while)59 1703 y Fm(The)15 -b(follo)o(wing)h(strings)f(denote)h(other)e(tok)o(ens:)203 -1797 y Fj(~=)47 b(<=)h(>=)f(<)72 b(>)f(=)h(..)47 b(+)72 b(-)f(*)g(/)h(\045) -203 1853 y(\()f(\))h({)f(})h([)f(])h(@)f(;)h(,)f(.)59 1947 -y Fm(Literal)17 b(strings)f(can)h(b)q(e)g(delimited)h(b)o(y)f(matc)o(hing)f -(single)i(or)d(double)j(quotes,)e(and)g(can)h(con)o(tain)f(the)-12 -2003 y(C-lik)o(e)f(escap)q(e)g(sequences)g Fj('\\n')p Fm(,)e -Fj('\\t')h Fm(and)g Fj('\\r')p Fm(.)19 b(Commen)o(ts)13 b(start)g(an)o -(ywhere)h(outside)g(a)g(string)g(with)-12 2060 y(a)h(double)i(h)o(yphen)f(\() -p Fj(--)p Fm(\))e(and)h(run)h(un)o(til)g(the)f(end)h(of)f(the)g(line.)59 -2116 y(Numerical)e(constan)o(ts)e(ma)o(y)g(b)q(e)h(written)g(with)g(an)f -(optional)h(decimal)i(part,)d(and)h(an)g(optional)g(decimal)-12 -2173 y(exp)q(onen)o(t.)21 b(Examples)15 b(of)g(v)m(alid)i(n)o(umerical)f -(constan)o(ts)f(are:)155 2266 y Fj(4)119 b(4.)g(.4)g(4.57e-3)g(.3e12)-12 -2388 y Fb(4.2)56 b(Co)r(ercion)-12 2474 y Fm(Lua)17 b(pro)o(vides)g(some)g -(automatic)f(con)o(v)o(ersions.)24 b(An)o(y)17 b(arithmetic)g(op)q(eration)g -(applied)i(to)d(a)g(string)h(tries)-12 2530 y(to)g(con)o(v)o(ert)g(that)g -(string)g(to)g(a)g(n)o(um)o(b)q(er,)h(follo)o(wing)h(the)e(usual)h(rules.)28 -b(More)17 b(sp)q(eci\014cally)l(,)k(the)c(string)h(is)-12 2587 -y(con)o(v)o(erted)c(to)f(a)h(n)o(um)o(b)q(er)g(using)h(the)f(standard)g -Fj(strtod)f Fm(C)h(function.)20 b(Con)o(v)o(ersely)l(,)14 b(whenev)o(er)g(a)g -(n)o(um)o(b)q(er)-12 2643 y(is)22 b(used)h(when)f(a)g(string)f(is)i(exp)q -(ected,)h(that)d(n)o(um)o(b)q(er)h(is)h(con)o(v)o(erted)e(to)g(a)h(string,)h -(according)f(to)f(the)-12 2700 y(follo)o(wing)e(rule:)28 b(if)19 -b(the)g(n)o(um)o(b)q(er)f(is)h(an)g(in)o(teger,)g(it)g(is)g(written)g -(without)f(exp)q(onen)o(t)h(or)f(decimal)i(p)q(oin)o(t;)-12 -2756 y(otherwise,)e(it)g(is)g(formatted)e(follo)o(wing)i(the)f(\\)p -Fj(\045g)p Fm(")g(con)o(v)o(ersion)g(sp)q(eci\014cation)j(of)d(the)g -(standard)g Fj(printf)-12 2813 y Fm(C)e(function.)910 2976 -y(3)p eop +(cannot)f(b)q(e)h(used)h(as)e(iden)o(ti\014ers:)203 619 y Fl(and)143 +b(do)190 b(else)143 b(elseif)95 b(end)203 675 y(function)23 +b(if)190 b(local)119 b(nil)167 b(not)203 732 y(or)g(repeat)94 +b(return)h(until)119 b(then)95 b(while)59 826 y Fn(The)15 b(follo)o(wing)h +(strings)f(denote)h(other)e(tok)o(ens:)203 919 y Fl(~=)47 b(<=)h(>=)f(<)72 +b(>)f(==)48 b(=)71 b(..)48 b(+)71 b(-)g(*)h(/)203 976 y(\045)f(\()h(\))f({)h +(})f([)h(])f(;)h(,)f(.)59 1070 y Fn(Literal)17 b(strings)f(can)h(b)q(e)g +(delimited)h(b)o(y)f(matc)o(hing)f(single)i(or)d(double)j(quotes,)e(and)g +(can)h(con)o(tain)f(the)-12 1126 y(C-lik)o(e)f(escap)q(e)g(sequences)g +Fl('\\n')p Fn(,)e Fl('\\t')h Fn(and)g Fl('\\r')p Fn(.)19 b(Commen)o(ts)13 +b(start)g(an)o(ywhere)h(outside)g(a)g(string)g(with)-12 1183 +y(a)h(double)i(h)o(yphen)f(\()p Fl(--)p Fn(\))e(and)h(run)h(un)o(til)g(the)f +(end)h(of)f(the)g(line.)59 1239 y(Numerical)e(constan)o(ts)e(ma)o(y)g(b)q(e)h +(written)g(with)g(an)f(optional)h(decimal)i(part,)d(and)h(an)g(optional)g +(decimal)-12 1296 y(exp)q(onen)o(t.)21 b(Examples)15 b(of)g(v)m(alid)i(n)o +(umerical)f(constan)o(ts)f(are:)155 1389 y Fl(4)119 b(4.)g(.4)g(4.57e-3)g +(.3e12)-12 1511 y Fd(4.2)56 b(Co)r(ercion)-12 1597 y Fn(Lua)17 +b(pro)o(vides)g(some)g(automatic)f(con)o(v)o(ersions.)24 b(An)o(y)17 +b(arithmetic)g(op)q(eration)g(applied)i(to)d(a)g(string)h(tries)-12 +1653 y(to)12 b(con)o(v)o(ert)g(that)g(string)g(to)g(a)g(n)o(um)o(b)q(er,)h +(follo)o(wing)g(the)g(usual)g(rules.)20 b(Con)o(v)o(ersely)l(,)13 +b(whenev)o(er)g(a)f(n)o(um)o(b)q(er)h(is)-12 1710 y(used)h(when)f(a)f(string) +h(is)g(exp)q(ected,)i(that)d(n)o(um)o(b)q(er)h(is)g(con)o(v)o(erted)g(to)f(a) +g(string,)h(according)h(to)e(the)h(follo)o(wing)-12 1766 y(rule:)20 +b(if)15 b(the)f(n)o(um)o(b)q(er)h(is)g(an)f(in)o(teger,)g(it)h(is)f(written)h +(without)f(exp)q(onen)o(t)h(or)e(decimal)j(p)q(oin)o(t;)f(otherwise,)f(it)-12 +1823 y(is)i(formatted)e(follo)o(wing)i(the)f(\\)p Fl(\045g)p +Fn(")f(con)o(v)o(ersion)i(sp)q(eci\014cation)h(of)e(the)g(standard)g +Fl(printf)f Fn(C)h(function.)-12 1944 y Fd(4.3)56 b(Adjustmen)n(t)-12 +2030 y Fn(F)l(unctions)16 b(in)h(Lua)e(can)h(return)f(man)o(y)g(v)m(alues.)22 +b(Because)16 b(there)f(are)h(no)f(t)o(yp)q(e)g(declarations,)h(the)g(system) +-12 2087 y(do)q(es)21 b(not)f(kno)o(w)g(ho)o(w)g(man)o(y)g(v)m(alues)i(a)e +(function)h(will)h(return,)g(or)e(ho)o(w)g(man)o(y)g(parameters)f(it)i +(needs.)-12 2143 y(Therefore,)14 b(sometimes,)f(a)h(list)g(of)f(v)m(alues)i +(m)o(ust)e(b)q(e)h Fm(adjuste)n(d)5 b Fn(,)14 b(at)f(run)h(time,)g(to)f(a)g +(giv)o(en)h(length.)20 b(If)14 b(there)-12 2200 y(are)19 b(more)g(v)m(alues)i +(than)e(are)g(needed,)i(the)f(last)f(v)m(alues)i(are)e(thro)o(wn)f(a)o(w)o(a) +o(y)l(.)31 b(If)20 b(there)f(are)h(more)e(needs)-12 2256 y(than)d(v)m(alues,) +h(the)g(list)g(is)g(extended)g(with)g(as)f(man)o(y)f Fk(nil)p +Fn('s)i(as)f(needed.)22 b(Adjustmen)o(t)15 b(o)q(ccurs)g(in)h(m)o(ultiple)-12 +2312 y(assignmen)o(t)f(and)h(function)g(calls.)-12 2434 y Fd(4.4)56 +b(Statemen)n(ts)-12 2520 y Fn(Lua)18 b(supp)q(orts)f(an)g(almost)f(con)o(v)o +(en)o(tional)i(set)e(of)h(statemen)o(ts.)24 b(The)18 b(con)o(v)o(en)o(tional) +f(commands)g(include)-12 2576 y(assignmen)o(t,)d(con)o(trol)h(structures)f +(and)h(pro)q(cedure)g(calls.)21 b(Non-con)o(v)o(en)o(tional)15 +b(commands)g(include)i(table)-12 2633 y(constructors,)d(explained)j(in)f +(Section)h(4.5.7,)c(and)i(lo)q(cal)h(v)m(ariable)h(declarations.)910 +2976 y(3)p eop %%Page: 4 4 -bop -12 160 a Fb(4.3)56 b(Adjustmen)n(t)-12 245 y Fm(F)l(unctions)16 -b(in)h(Lua)e(can)h(return)f(man)o(y)g(v)m(alues.)22 b(Because)16 -b(there)f(are)h(no)f(t)o(yp)q(e)g(declarations,)h(the)g(system)-12 -302 y(do)q(es)h(not)e(kno)o(w)h(ho)o(w)f(man)o(y)h(v)m(alues)h(a)f(function)g -(will)i(return.)k(Therefore,)16 b(sometimes,)g(a)g(list)h(of)e(v)m(alues)-12 -358 y(m)o(ust)f(b)q(e)g Fk(adjuste)n(d)5 b Fm(,)14 b(at)f(run)h(time,)h(to)e -(a)h(giv)o(en)g(length.)20 b(If)14 b(there)g(are)g(more)g(v)m(alues)h(than)e -(are)h(needed,)h(the)-12 415 y(last)h(v)m(alues)i(are)e(thro)o(wn)f(a)o(w)o -(a)o(y)l(.)21 b(If)c(there)f(are)g(more)g(needs)h(than)f(v)m(alues,)h(the)f -(list)h(is)g(extended)g(with)g(as)-12 471 y(man)o(y)e Fi(nil)p -Fm('s)h(as)f(needed.)21 b(Adjustmen)o(t)15 b(also)g(o)q(ccurs)g(in)h(other)f -(con)o(texts,)f(suc)o(h)i(as)f(m)o(ultiple)i(assignmen)o(t.)-12 -593 y Fb(4.4)56 b(Statemen)n(ts)-12 679 y Fm(Lua)18 b(supp)q(orts)f(an)g -(almost)f(con)o(v)o(en)o(tional)i(set)e(of)h(statemen)o(ts.)24 -b(The)18 b(con)o(v)o(en)o(tional)f(commands)g(include)-12 735 -y(assignmen)o(t,)d(con)o(trol)h(structures)f(and)h(pro)q(cedure)g(calls.)21 -b(Non-con)o(v)o(en)o(tional)15 b(commands)g(include)i(table)-12 -792 y(constructors,)d(explained)j(in)f(Section)h(4.5.7,)c(and)i(lo)q(cal)h(v) -m(ariable)h(declarations.)-12 912 y Fi(4.4.1)52 b(Blo)q(c)o(ks)-12 -998 y Fm(A)13 b(blo)q(c)o(k)g(is)g(a)f(list)i(of)e(statemen)o(ts,)g(executed) -h(sequen)o(tially)l(.)21 b(An)o(y)13 b(statemen)o(t)e(can)i(b)q(e)g -(optionally)h(follo)o(w)o(ed)-12 1054 y(b)o(y)h(a)g(semicolon.)72 -1122 y Fk(blo)n(ck)49 b Fg(!)h(f)p Fk(stat)16 b(sc)s Fg(g)f -Fm([)p Fk(r)n(et)h(sc)s Fm(])128 1179 y Fk(sc)49 b Fg(!)h Fm([';'])2 -1247 y(F)l(or)13 b(syn)o(tactic)g(reasons,)h(a)f(return)h(statemen)o(t)e(can) -i(only)g(b)q(e)g(written)g(as)f(the)h(last)g(statemen)o(t)e(of)i(a)f(blo)q(c) -o(k.)-12 1303 y(This)j(restriction)g(also)f(a)o(v)o(oids)g(some)g(\\statemen) -o(t)e(not)i(reac)o(hed")g(errors.)-12 1423 y Fi(4.4.2)52 b(Assignmen)n(t)-12 -1509 y Fm(The)17 b(language)g(allo)o(ws)g(m)o(ultiple)i(assignmen)o(t.)24 +bop -12 160 a Fk(4.4.1)52 b(Blo)q(c)o(ks)-12 245 y Fn(A)13 +b(blo)q(c)o(k)g(is)g(a)f(list)i(of)e(statemen)o(ts,)g(executed)h(sequen)o +(tially)l(.)21 b(An)o(y)13 b(statemen)o(t)e(can)i(b)q(e)g(optionally)h(follo) +o(w)o(ed)-12 302 y(b)o(y)h(a)g(semicolon.)72 370 y Fm(blo)n(ck)49 +b Fi(!)h(f)p Fm(stat)16 b(sc)s Fi(g)f Fn([)p Fm(r)n(et)h(sc)s +Fn(])128 427 y Fm(sc)49 b Fi(!)h Fn([';'])-12 495 y(F)l(or)14 +b(syn)o(tactic)h(reasons,)e(a)i(return)f(statemen)o(t)g(can)g(only)h(b)q(e)g +(written)g(as)f(the)h(last)f(statemen)o(t)g(of)g(a)g(blo)q(c)o(k.)-12 +551 y(This)i(restriction)g(also)f(a)o(v)o(oids)g(some)g(\\statemen)o(t)e(not) +i(reac)o(hed")g(errors.)-12 671 y Fk(4.4.2)52 b(Assignmen)n(t)-12 +757 y Fn(The)17 b(language)g(allo)o(ws)g(m)o(ultiple)i(assignmen)o(t.)24 b(Therefore,)17 b(the)g(syn)o(tax)f(de\014nes)i(a)e(list)i(of)e(v)m(ariables) -i(on)-12 1566 y(the)13 b(left)g(side,)g(and)g(a)f(list)i(of)e(expressions)h +i(on)-12 814 y(the)13 b(left)g(side,)g(and)g(a)f(list)i(of)e(expressions)h (on)g(the)f(righ)o(t)h(side.)20 b(Both)12 b(lists)h(ha)o(v)o(e)f(their)h -(elemen)o(ts)h(separated)-12 1622 y(b)o(y)h(commas.)146 1690 -y Fk(stat)49 b Fg(!)i Fk(varlist1)16 b Fm('=')g Fk(explist1)72 -1747 y(varlist1)49 b Fg(!)i Fk(var)16 b Fg(f)p Fm(',')f Fk(var)5 -b Fg(g)2 1815 y Fm(This)14 b(statemen)o(t)f(\014rst)h(ev)m(aluates)g(all)h(v) -m(alues)g(on)f(the)g(righ)o(t)g(side)g(and)h(ev)o(en)o(tual)f(indices)i(on)e -(the)f(left)i(side,)-12 1872 y(and)h(then)f(mak)o(es)g(the)g(assignmen)o(ts.) -20 b(Therefore,)14 b(it)i(can)f(b)q(e)h(used)g(to)e(exc)o(hange)i(t)o(w)o(o)e -(v)m(alues,)i(as)e(in)60 1965 y Fj(x,)23 b(y)h(=)g(y,)f(x)-12 -2059 y Fm(Before)18 b(the)f(assignmen)o(t,)h(the)g(list)g(of)f(v)m(alues)i -(is)f Fk(adjuste)n(d)g Fm(to)f(the)h(length)g(of)f(the)h(list)g(of)f(v)m -(ariables)i(\(see)-12 2116 y(Section)d(4.3\).)59 2172 y(A)f(single)i(name)e -(can)g(denote)h(a)e(global)i(or)f(a)g(lo)q(cal)h(v)m(ariable.)72 -2240 y Fk(var)50 b Fg(!)g Fk(name)72 2297 y(var)g Fg(!)g Fk(var)17 -b Fm('[')e Fk(exp1)i Fm(']')31 b Fg(j)16 b Fk(var)g Fm('.')k -Fk(name)4 2365 y Fm(Brac)o(k)o(ets)c(are)g(used)h(to)f(index)h(a)f(table.)24 -b(In)17 b(this)g(case,)f Fj(var)g Fm(m)o(ust)g(result)h(in)g(a)f(table)h(v)m -(alue;)g(otherwise,)-12 2421 y(there)e(is)h(an)f(execution)i(error.)i(The)c -(syn)o(tax)g Fj(var.NAME)f Fm(is)h(just)g(syn)o(tactic)g(sugar)g(for)g -Fj(var["NAME"])p Fm(.)-12 2542 y Fi(4.4.3)52 b(Con)o(trol)17 -b(Structures)-12 2627 y Fm(The)e(condition)h(expression)f(of)f(a)h(con)o -(trol)f(structure)g(can)h(return)g(an)o(y)f(v)m(alue.)21 b(All)16 -b(v)m(alues)f(di\013eren)o(t)g(from)-12 2684 y Fi(nil)i Fm(are)e(considered)i -(true,)f(while)h Fi(nil)f Fm(is)h(considered)g(false.)k Fj(If)p -Fm(s,)15 b Fj(while)p Fm(s)g(and)h Fj(repeat)p Fm(s)f(ha)o(v)o(e)g(the)h -(usual)-12 2740 y(meaning.)910 2976 y(4)p eop +(elemen)o(ts)h(separated)-12 870 y(b)o(y)h(commas.)146 938 +y Fm(stat)49 b Fi(!)i Fm(varlist1)16 b Fn('=')g Fm(explist1)72 +995 y(varlist1)49 b Fi(!)i Fm(var)16 b Fi(f)p Fn(',')f Fm(var)5 +b Fi(g)-12 1063 y Fn(This)16 b(statemen)o(t)d(\014rst)i(ev)m(aluates)g(all)h +(v)m(alues)g(on)e(the)h(righ)o(t)g(side)g(and)g(ev)o(en)o(tual)g(indices)i +(on)e(the)g(left)g(side,)-12 1119 y(and)h(then)f(mak)o(es)g(the)g(assignmen)o +(ts.)20 b(Therefore,)14 b(it)i(can)f(b)q(e)h(used)g(to)e(exc)o(hange)i(t)o(w) +o(o)e(v)m(alues,)i(as)e(in)60 1213 y Fl(x,)23 b(y)h(=)g(y,)f(x)-12 +1307 y Fn(Before)18 b(the)g(assignmen)o(t,)g(the)g(list)g(of)g(v)m(alues)h +(is)f Fm(adjuste)n(d)g Fn(to)f(the)h(length)h(of)e(the)h(list)h(of)e(v)m +(ariables;)j(see)-12 1364 y(Section)c(4.3.)72 1436 y Fm(var)50 +b Fi(!)g Fm(name)-12 1508 y Fn(A)15 b(single)i(name)e(can)g(denote)h(a)f +(global)h(or)e(a)h(lo)q(cal)i(v)m(ariable,)f(or)e(a)h(formal)g(parameter.)72 +1580 y Fm(var)50 b Fi(!)g Fm(var)17 b Fn('[')e Fm(exp1)i Fn(']')-12 +1652 y(Square)f(brac)o(k)o(ets)f(are)g(used)h(to)f(index)i(a)e(table.)21 +b(If)16 b Fl(var)f Fn(results)h(in)g(a)f(table)h(v)m(alue,)h(the)e(\014eld)i +(indexed)g(b)o(y)-12 1708 y(the)i(expression)g(v)m(alue)h(gets)e(the)h +(assigned)g(v)m(alue.)32 b(Otherwise,)20 b(the)f(fallbac)o(k)g +Fm(settable)f Fn(is)h(called,)i(with)-12 1765 y(three)15 b(parameters:)j(the) +c(v)m(alue)i(of)e Fl(var)p Fn(,)f(the)i(v)m(alue)g(of)f(expression,)h(and)g +(the)f(v)m(alue)h(b)q(eing)h(assigned)f(to)e(it;)-12 1821 y(see)j(Section)g +(4.7.)72 1893 y Fm(var)50 b Fi(!)g Fm(var)17 b Fn('.')j Fm(name)-12 +1966 y Fn(The)c(syn)o(tax)e Fl(var.NAME)g Fn(is)i(just)f(syn)o(tactic)g +(sugar)g(for)f Fl(var["NAME"])p Fn(.)-12 2086 y Fk(4.4.3)52 +b(Con)o(trol)17 b(Structures)-12 2171 y Fn(The)e(condition)h(expression)f(of) +f(a)h(con)o(trol)f(structure)g(can)h(return)g(an)o(y)f(v)m(alue.)21 +b(All)16 b(v)m(alues)f(di\013eren)o(t)g(from)-12 2228 y Fk(nil)f +Fn(are)f(considered)h(true,)f(while)i Fk(nil)f Fn(is)g(considered)g(false.)20 +b Fl(if)p Fn('s,)12 b Fl(while)p Fn('s)g(and)h Fl(repeat)p +Fn('s)f(ha)o(v)o(e)g(the)i(usual)-12 2284 y(meaning.)100 2352 +y Fm(stat)50 b Fi(!)g Fk(while)17 b Fm(exp1)g Fk(do)f Fm(blo)n(ck)g +Fk(end)275 2409 y Fi(j)32 b Fk(rep)q(eat)17 b Fm(blo)n(ck)f +Fk(un)o(til)h Fm(exp1)275 2465 y Fi(j)32 b Fk(if)17 b Fm(exp1)g +Fk(then)f Fm(blo)n(ck)g Fi(f)p Fm(elseif)8 b Fi(g)16 b Fn([)p +Fk(else)g Fm(blo)n(ck)5 b Fn(])15 b Fk(end)72 2522 y Fm(elseif)49 +b Fi(!)h Fk(elseif)17 b Fm(exp1)f Fk(then)h Fm(blo)n(ck)59 +2615 y Fn(A)g Fl(return)g Fn(is)h(used)h(to)e(return)g(v)m(alues)i(from)e(a)g +(function.)28 b(Because)18 b(a)g(function)g(ma)o(y)f(return)h(more)-12 +2672 y(than)d(one)h(v)m(alue,)g(the)f(syn)o(tax)f(for)h(a)g(return)g +(statemen)o(t)f(is:)72 2744 y Fm(r)n(et)49 b Fi(!)i Fk(return)15 +b Fm(explist)910 2976 y Fn(4)p eop %%Page: 5 5 -bop 100 158 a Fk(stat)50 b Fg(!)g Fi(while)17 b Fk(exp1)g Fi(do)f -Fk(blo)n(ck)g Fi(end)100 214 y Fk(stat)50 b Fg(!)g Fi(rep)q(eat)17 -b Fk(blo)n(ck)e Fi(un)o(til)i Fk(exp1)100 271 y(stat)50 b Fg(!)g -Fi(if)17 b Fk(exp1)f Fi(then)h Fk(blo)n(ck)e Fg(f)p Fk(elseif)9 -b Fg(g)16 b Fm([)p Fi(else)g Fk(blo)n(ck)5 b Fm(])15 b Fi(end)72 -327 y Fk(elseif)49 b Fg(!)h Fi(elseif)17 b Fk(exp1)f Fi(then)h -Fk(blo)n(ck)59 420 y Fm(A)g Fj(return)g Fm(is)h(used)h(to)e(return)g(v)m -(alues)i(from)e(a)g(function.)28 b(Because)18 b(a)g(function)g(ma)o(y)f -(return)h(more)-12 477 y(than)d(one)h(v)m(alue,)g(the)f(syn)o(tax)f(for)h(a)g -(return)g(statemen)o(t)f(is:)72 549 y Fk(r)n(et)49 b Fg(!)i -Fi(return)15 b Fk(explist)-12 741 y Fi(4.4.4)52 b(Expressions)16 -b(as)i(Statemen)o(ts)-12 827 y Fm(All)c(expressions)e(with)h(p)q(ossible)h -(side-e\013ects)e(can)h(b)q(e)f(executed)h(as)f(statemen)o(ts.)18 -b(These)12 b(include)i(function)-12 883 y(calls)i(and)g(table)f -(constructors:)72 943 y Fk(stat)50 b Fg(!)g Fk(functionc)n(al)r(l)72 -999 y(stat)g Fg(!)g Fk(table)n(c)n(onstructor)1 1067 y Fm(Ev)o(en)o(tual)14 -b(returned)f(v)m(alues)i(are)d(thro)o(wn)h(a)o(w)o(a)o(y)l(.)18 -b(F)l(unction)c(calls)g(are)f(explained)i(in)f(Section)g(4.5.8,)e(while)-12 -1124 y(constructors)j(are)f(the)i(sub)s(ject)f(of)g(Section)h(4.5.7.)-12 -1244 y Fi(4.4.5)52 b(Lo)q(cal)20 b(Declarations)-12 1330 y -Fm(Lo)q(cal)h(v)m(ariables)g(can)e(b)q(e)h(declared)h(an)o(ywhere)f(inside)h -(a)e(blo)q(c)o(k.)34 b(Their)20 b(scop)q(e)g(b)q(egins)h(after)e(the)h(dec-) --12 1386 y(laration)h(and)g(lasts)g(un)o(til)h(the)f(blo)q(c)o(k)h(end.)38 -b(The)21 b(declaration)g(ma)o(y)g(include)i(an)e(initial)i(assignmen)o(t:)122 -1502 y Fk(stat)50 b Fg(!)g Fi(lo)q(cal)18 b Fk(de)n(clist)e -Fm([)p Fk(init)t Fm(])72 1558 y Fk(de)n(clist)49 b Fg(!)h Fk(name)16 -b Fg(f)p Fm(',')f Fk(name)s Fg(g)125 1615 y Fk(init)50 b Fg(!)g -Fm('=')16 b Fk(explist1)0 1683 y Fm(If)c(there)f(is)h(an)g(initial)i -(assignmen)o(t,)d(it)h(has)g(the)f(same)h(seman)o(tics)f(of)h(a)f(m)o -(ultiple)i(assignmen)o(t.)19 b(Otherwise,)-12 1740 y(all)d(v)m(ariables)h -(are)e(initialized)j(with)e Fi(nil)p Fm(.)-12 1861 y Fb(4.5)56 -b(Expressions)-12 1947 y Fi(4.5.1)c(Simple)16 b(Expressions)-12 -2033 y Fm(Simple)h(expressions)f(are:)72 2101 y Fk(exp)50 b -Fg(!)g Fm('\(')15 b Fk(exp)i Fm('\)')72 2157 y Fk(exp)50 b -Fg(!)g Fi(nil)72 2214 y Fk(exp)g Fg(!)g Fm('n)o(um)o(b)q(er')72 -2270 y Fk(exp)g Fg(!)g Fm('literal')72 2327 y Fk(exp)g Fg(!)g -Fk(var)4 2398 y Fm(Num)o(b)q(ers)16 b(\(n)o(umerical)g(constan)o(ts\))e(and)i -(string)g(literals)g(are)g(explained)h(in)g(Section)f(4.1.)k(V)l(ariables)d -(are)-12 2454 y(explained)g(in)g(Section)f(4.4.2.)-12 2574 -y Fi(4.5.2)52 b(Arithmetic)16 b(Op)q(erators)-12 2660 y Fm(Lua)f(supp)q(orts) -f(the)g(usual)g(arithmetic)h(op)q(erators,)e(with)h(the)g(usual)h(meaning.)20 -b(These)14 b(op)q(erators)g(are)f(the)-12 2716 y(binary)k Fj(+)p -Fm(,)e Fj(-)p Fm(,)h Fj(*)g Fm(and)g Fj(/)p Fm(,)f(and)h(the)h(unary)e -Fj(+)h Fm(and)g Fj(-)p Fm(.)22 b(The)16 b(op)q(erands)h(m)o(ust)e(b)q(e)i(n)o -(um)o(b)q(ers,)f(or)f(strings)h(that)-12 2773 y(can)g(b)q(e)f(con)o(v)o -(erted)g(to)g(n)o(um)o(b)q(ers,)g(according)h(to)e(the)h(rules)h(giv)o(en)g -(in)g(Section)g(4.2.)910 2976 y(5)p eop -%%Page: 6 6 -bop -12 160 a Fi(4.5.3)52 b(Relational)20 b(Op)q(erators)-12 -245 y Fm(Lua)c(o\013ers)e(the)h(follo)o(wing)h(relational)g(op)q(erators:)155 -339 y Fj(<)72 b(>)f(<=)48 b(>=)f(~=)g(=)-12 433 y Fm(All)17 -b(return)e Fi(nil)h Fm(as)f(false)g(and)h(1)f(as)f(true.)59 -490 y(Equalit)o(y)19 b(\014rst)f(compares)g(the)g(t)o(yp)q(es)h(of)f(its)h +bop -12 160 a Fk(4.4.4)52 b(Expressions)16 b(as)i(Statemen)o(ts)-12 +245 y Fn(All)c(expressions)e(with)h(p)q(ossible)h(side-e\013ects)e(can)h(b)q +(e)f(executed)h(as)f(statemen)o(ts.)18 b(These)12 b(include)i(function)-12 +302 y(calls)i(and)g(table)f(constructors:)72 361 y Fm(stat)50 +b Fi(!)g Fm(functionc)n(al)r(l)72 418 y(stat)g Fi(!)g Fm(table)n(c)n +(onstructor)-12 486 y Fn(Ev)o(en)o(tual)16 b(returned)g(v)m(alues)h(are)f +(thro)o(wn)f(a)o(w)o(a)o(y)l(.)20 b(F)l(unction)c(calls)h(are)f(explained)i +(in)e(Section)h(4.5.8;)d(con-)-12 542 y(structors)g(are)h(the)h(sub)s(ject)f +(of)f(Section)i(4.5.7.)-12 662 y Fk(4.4.5)52 b(Lo)q(cal)20 +b(Declarations)-12 748 y Fn(Lo)q(cal)c(v)m(ariables)g(can)f(b)q(e)g(declared) +h(an)o(ywhere)f(inside)h(a)f(blo)q(c)o(k.)20 b(Their)c(scop)q(e)f(b)q(egins)h +(after)e(the)h(declara-)-12 805 y(tion)i(and)h(lasts)f(un)o(til)h(the)f(end)h +(of)e(the)h(blo)q(c)o(k.)27 b(The)17 b(declaration)h(ma)o(y)e(include)k(an)d +(initial)i(assignmen)o(t:)122 921 y Fm(stat)50 b Fi(!)g Fk(lo)q(cal)18 +b Fm(de)n(clist)e Fn([)p Fm(init)t Fn(])72 977 y Fm(de)n(clist)49 +b Fi(!)h Fm(name)16 b Fi(f)p Fn(',')f Fm(name)s Fi(g)125 1033 +y Fm(init)50 b Fi(!)g Fn('=')16 b Fm(explist1)-12 1102 y Fn(If)d(there)f(is)h +(an)g(initial)h(assignmen)o(t,)f(it)f(has)h(the)f(same)g(seman)o(tics)h(of)f +(a)g(m)o(ultiple)i(assignmen)o(t.)19 b(Otherwise,)-12 1158 +y(all)d(v)m(ariables)h(are)e(initialized)j(with)e Fk(nil)p +Fn(.)-12 1280 y Fd(4.5)56 b(Expressions)-12 1366 y Fk(4.5.1)c(Simple)16 +b(Expressions)-12 1452 y Fn(Simple)h(expressions)f(are:)72 +1520 y Fm(exp)50 b Fi(!)g Fn('\(')15 b Fm(exp)i Fn('\)')72 +1576 y Fm(exp)50 b Fi(!)g Fk(nil)72 1633 y Fm(exp)g Fi(!)g +Fn('n)o(um)o(b)q(er')72 1689 y Fm(exp)g Fi(!)g Fn('literal')72 +1746 y Fm(exp)g Fi(!)g Fm(var)-12 1816 y Fn(Num)o(b)q(ers)17 +b(\(n)o(umerical)h(constan)o(ts\))d(and)i(string)g(literals)g(are)g +(explained)i(in)e(Section)h(4.1.)23 b(V)l(ariables)18 b(are)-12 +1873 y(explained)f(in)g(Section)f(4.4.2.)-12 1993 y Fk(4.5.2)52 +b(Arithmetic)16 b(Op)q(erators)-12 2079 y Fn(Lua)j(supp)q(orts)f(the)h(usual) +g(arithmetic)g(op)q(erators.)28 b(These)19 b(op)q(erators)e(are)h(the)g +(binary)h Fl(+)p Fn(,)g Fl(-)p Fn(,)f Fl(*)p Fn(,)h Fl(/)f +Fn(and)-12 2135 y Fl(^)j Fn(\(exp)q(onen)o(tiation\),)h(and)f(the)f(unary)h +Fl(-)p Fn(.)36 b(If)21 b(the)g(op)q(erands)g(are)f(n)o(um)o(b)q(ers,)i(or)e +(strings)h(that)f(can)h(b)q(e)-12 2192 y(con)o(v)o(erted)15 +b(to)f(n)o(um)o(b)q(ers,)h(according)h(to)e(the)h(rules)h(giv)o(en)f(in)h +(Section)g(4.2,)e(all)i(op)q(erations)f(but)g(exp)q(onen-)-12 +2248 y(tiation)i(ha)o(v)o(e)e(the)i(usual)f(meaning.)24 b(Otherwise,)17 +b(the)f(fallbac)o(k)h(\\arith")e(is)i(called;)h(see)e(Section)h(4.7.)22 +b(An)-12 2305 y(exp)q(onen)o(tiation)17 b(alw)o(a)o(ys)d(calls)i(this)g +(fallbac)o(k.)-12 2425 y Fk(4.5.3)52 b(Relational)20 b(Op)q(erators)-12 +2510 y Fn(Lua)c(o\013ers)e(the)h(follo)o(wing)h(relational)g(op)q(erators:) +155 2604 y Fl(<)72 b(>)f(<=)48 b(>=)f(~=)g(==)-12 2698 y Fn(All)17 +b(return)e Fk(nil)h Fn(as)f(false)g(and)h(1)f(as)f(true.)59 +2754 y(Equalit)o(y)19 b(\014rst)f(compares)g(the)g(t)o(yp)q(es)h(of)f(its)h (op)q(erands.)30 b(If)18 b(they)h(are)f(di\013eren)o(t,)h(the)g(result)g(is)g -Fi(nil)p Fm(.)-12 546 y(Otherwise,)h(their)e(v)m(alues)i(are)d(compared.)29 +Fk(nil)p Fn(.)-12 2811 y(Otherwise,)h(their)e(v)m(alues)i(are)d(compared.)29 b(Num)o(b)q(ers)19 b(and)f(strings)g(are)g(compared)g(in)h(the)g(usual)f(w)o -(a)o(y)l(.)-12 602 y(T)l(ables,)c(Cfunctions,)g(and)g(functions)g(are)f -(compared)g(b)o(y)h(reference,)g(that)e(is,)i(t)o(w)o(o)e(tables)i(are)f -(considered)-12 659 y(equal)j(only)g(if)g(they)f(are)g(the)g(same)g(table.)20 -b(The)c(op)q(erator)e Fj(~=)h Fm(is)h(exactly)f(the)g(negation)h(of)f -(equalit)o(y)g(\()p Fj(=)p Fm(\).)59 715 y(The)f(other)f(op)q(erators)f(can)i -(only)g(b)q(e)g(applied)i(to)d(strings)g(and)h(n)o(um)o(b)q(ers.)20 -b(If)14 b(one)f(of)g(the)h(argumen)o(ts)f(is)-12 772 y(a)g(string,)h(the)f -(other)g(is)h(con)o(v)o(erted)f(to)g(a)g(string,)g(and)h(their)g(v)m(alues)g -(are)f(compared)h(using)g(lexicographical)-12 828 y(order.)20 -b(Otherwise,)15 b(b)q(oth)h(are)f(n)o(um)o(b)q(ers)g(and)h(are)e(compared)i -(as)e(suc)o(h.)-12 948 y Fi(4.5.4)52 b(Logical)20 b(Op)q(erators)-12 -1034 y Fm(All)g(logical)g(op)q(erators,)f(lik)o(e)h(con)o(trol)e(structures,) -h(consider)h Fi(nil)g Fm(as)e(false)i(and)f(an)o(ything)g(else)g(as)g(true.) --12 1091 y(Lik)o(e)d(relational)g(op)q(erators,)e(they)i(return)f -Fi(nil)h Fm(as)f(false)g(and)h(1)f(as)f(true.)20 b(The)c(logical)g(op)q -(erators)e(are:)298 1184 y Fj(and)72 b(or)f(not)-12 1278 y -Fm(The)18 b(op)q(erators)f Fj(and)g Fm(and)h Fj(or)g Fm(use)g(short-cut)f(ev) -m(aluation,)j(that)d(is,)h(the)g(second)h(op)q(erand)f(is)g(ev)m(aluated)-12 -1335 y(only)e(if)g(necessary)l(.)-12 1455 y Fi(4.5.5)52 b(Concatenation)-12 -1541 y Fm(Lua)15 b(o\013ers)f(a)g(string)g(concatenation)h(op)q(erator,)e -(denoted)i(b)o(y)g(\\)p Fj(..)p Fm(".)k(The)14 b(op)q(erands)h(m)o(ust)f(b)q -(e)h(strings)g(or)-12 1597 y(n)o(um)o(b)q(ers,)g(whic)o(h)h(are)f(con)o(v)o -(erted)g(to)g(strings)g(according)g(to)g(the)g(rules)h(in)g(Section)g(4.2.) --12 1717 y Fi(4.5.6)52 b(Precedence)-12 1803 y Fm(Op)q(erator)15 +(a)o(y)l(.)910 2976 y(5)p eop +%%Page: 6 6 +bop -12 160 a Fn(T)l(ables,)13 b(CF)l(unctions,)h(and)e(functions)h(are)f +(compared)h(b)o(y)f(reference,)h(that)f(is,)h(t)o(w)o(o)e(tables)i(are)f +(considered)-12 216 y(equal)k(only)g(if)g(they)f(are)g(the)g(same)g(table.)20 +b(The)c(op)q(erator)e Fl(~=)h Fn(is)h(exactly)f(the)g(negation)h(of)f +(equalit)o(y)g(\()p Fl(=)p Fn(\).)59 273 y(The)i(other)g(op)q(erators)g(w)o +(ork)f(as)h(follo)o(ws.)26 b(If)17 b(b)q(oth)h(argumen)o(ts)e(are)h(n)o(um)o +(b)q(ers,)h(they)f(are)g(compared)-12 329 y(as)f(suc)o(h.)23 +b(Otherwise,)16 b(if)h(b)q(oth)f(argumen)o(ts)f(can)h(b)q(e)h(con)o(v)o +(erted)f(to)f(strings,)h(their)g(v)m(alues)i(are)d(compared)-12 +385 y(using)h(lexicographical)i(order.)h(Otherwise,)d(the)f(fallbac)o(k)h +(\\order")e(is)i(called;)h(see)e(Section)h(4.7.)-12 505 y Fk(4.5.4)52 +b(Logical)20 b(Op)q(erators)-12 590 y Fn(All)g(logical)g(op)q(erators,)f(lik) +o(e)h(con)o(trol)e(structures,)h(consider)h Fk(nil)g Fn(as)e(false)i(and)f +(an)o(ything)g(else)g(as)g(true.)-12 647 y(Lik)o(e)d(relational)g(op)q +(erators,)e(they)i(return)f Fk(nil)h Fn(as)f(false)g(and)h(1)f(as)f(true.)20 +b(The)c(logical)g(op)q(erators)e(are:)298 736 y Fl(and)72 b(or)f(not)-12 +825 y Fn(The)18 b(op)q(erators)f Fl(and)g Fn(and)h Fl(or)g +Fn(use)g(short-cut)f(ev)m(aluation,)j(that)d(is,)h(the)g(second)h(op)q(erand) +f(is)g(ev)m(aluated)-12 881 y(only)e(if)g(necessary)l(.)-12 +1000 y Fk(4.5.5)52 b(Concatenation)-12 1086 y Fn(Lua)11 b(o\013ers)f(a)h +(string)f(concatenation)h(op)q(erator,)g(denoted)g(b)o(y)g(\\)p +Fl(..)p Fn(".)17 b(If)11 b(op)q(erands)g(are)g(strings)f(or)g(n)o(um)o(b)q +(ers,)-12 1142 y(they)20 b(are)f(con)o(v)o(erted)g(to)g(strings)h(according)g +(to)e(the)i(rules)g(in)h(Section)f(4.2.)32 b(Otherwise,)21 +b(the)f(fallbac)o(k)-12 1199 y(\\concat")15 b(is)g(called;)i(see)e(Section)h +(4.7.)-12 1318 y Fk(4.5.6)52 b(Precedence)-12 1404 y Fn(Op)q(erator)15 b(precedence)i(follo)o(ws)e(the)h(table)f(b)q(elo)o(w,)h(from)e(the)h(lo)o(w) -o(er)g(to)g(the)g(higher)h(priorit)o(y:)298 1897 y Fj(and)72 -b(or)298 1953 y(<)g(>)f(<=)48 b(>=)f(~=)h(=)298 2010 y(..)298 -2066 y(+)72 b(-)298 2122 y(*)g(/)298 2179 y(not)48 b(+)23 b(\(unary\))47 -b(-)24 b(\(unary\))-12 2273 y Fm(All)17 b(binary)e(op)q(erators)g(are)g(left) -g(asso)q(ciativ)o(e.)-12 2393 y Fi(4.5.7)52 b(T)l(able)18 b(Constructors)-12 -2479 y Fm(T)l(able)13 b(constructors)e(are)h(expressions)h(that)e(create)h -(tables.)19 b(T)l(able)13 b(constructors)e(are)h(o\013ered)f(in)i(di\013eren) -o(t)-12 2535 y(\015a)o(v)o(ors.)19 b(The)c(simplest)i(one)e(is:)72 -2607 y Fk(table)n(c)n(onstructor)49 b Fg(!)h Fm('@')16 b('\(')f([)p -Fk(exp1)6 b Fm(])17 b('\)')5 2679 y(Suc)o(h)h(an)f(expression)h(results)f(in) -h(a)f(new)g(empt)o(y)g(table.)26 b(An)18 b(optional)f(dimension)i(ma)o(y)e(b) -q(e)g(giv)o(en)h(as)f(a)-12 2736 y(hin)o(t)g(to)f(the)h(initial)h(table)f -(size.)25 b(Indep)q(enden)o(tly)19 b(of)d(the)g(initial)j(dimension,)f(all)g -(arra)o(ys)d(in)i(Lua)g(stretc)o(h)-12 2792 y(dynamically)g(as)e(needed.)59 -2849 y(T)l(o)g(construct)g(a)f(table)i(and)f(initialize)k(some)c(\014elds,)h -(the)f(follo)o(wing)h(syn)o(tax)e(is)i(a)o(v)m(ailable:)910 -2976 y(6)p eop +o(er)g(to)g(the)g(higher)h(priorit)o(y:)298 1493 y Fl(and)72 +b(or)298 1549 y(<)g(>)f(<=)48 b(>=)f(~=)h(=)298 1606 y(..)298 +1662 y(+)72 b(-)298 1718 y(*)g(/)298 1775 y(not)48 b(-)23 b(\(unary\))298 +1831 y(^)-12 1920 y Fn(All)17 b(binary)e(op)q(erators)g(are)g(left)g(asso)q +(ciativ)o(e,)g(except)h(for)f Fl(^)p Fn(,)f(whic)o(h)i(is)g(righ)o(t)f(asso)q +(ciativ)o(e.)-12 2039 y Fk(4.5.7)52 b(T)l(able)18 b(Constructors)-12 +2125 y Fn(T)l(able)c(constructors)d(are)h(expressions)i(that)e(create)g +(tables.)19 b(They)13 b(can)g(b)q(e)g(used)g(to)f(create)g(empt)o(y)g +(tables,)-12 2182 y(or)j(to)f(create)h(a)g(table)h(and)f(initialize)k(some)c +(\014elds.)59 2238 y(The)g(general)h(syn)o(tax)e(for)h(constructors)f(is:)72 +2306 y Fm(table)n(c)n(onstructor)49 b Fi(!)h Fn(')p Fi(f)p +Fn(')16 b([)p Fm(\014eld)r(list)t Fn(])e(')p Fi(g)p Fn(')241 +2363 y Fm(\014eld)r(list)49 b Fi(!)h Fm(l\014eld)r(list1)15 +b Fn([','])241 2419 y Fm(\014eld)r(list)49 b Fi(!)h Fm(\016eld)r(list1)16 +b Fn([','])241 2476 y Fm(\014eld)r(list)49 b Fi(!)h Fm(l\014eld)r(list1)15 +b Fn(';')g Fm(\016eld)r(list1)h Fn([','])59 2569 y(The)f(form)g +Fm(l\014eld)r(list1)f Fn(is)h(used)h(to)f(initialize)j(lists.)72 +2641 y Fm(l\014eld)r(list1)48 b Fi(!)j Fm(exp)16 b Fi(f)p Fn(',')f +Fm(exp)s Fi(g)-12 2713 y Fn(The)i(expressions)f(in)h(the)g(list)f(are)g +(assigned)h(to)e(consecutiv)o(e)i(n)o(umerical)h(indexes,)f(starting)f(with)g +(1.)22 b(As)-12 2769 y(an)15 b(example:)60 2858 y Fl(a)24 b(=)f({"v1",)g +("v2",)g(34})910 2976 y Fn(6)p eop %%Page: 7 7 -bop 72 160 a Fk(table)n(c)n(onstructor)49 b Fg(!)h Fm('@')16 -b([)p Fk(name)s Fm(])g Fk(\014eld)r(list)8 232 y Fm(Suc)o(h)k(an)g -(expression)g(creates)g(a)f(new)h(table,)h(whic)o(h)g(will)g(b)q(e)f(its)g -(\014nal)h(v)m(alue,)h(initialize)g(some)e(of)f(its)-12 288 -y(\014elds)i(according)g(to)e Fj(fieldlist)g Fm(\(see)h(b)q(elo)o(w\),)h -(and,)g(if)f Fj(name)g Fm(is)g(giv)o(en,)h(calls)g(a)f(function)h(with)f -(that)-12 345 y(name)14 b(passing)f(the)h(table)g(as)f(parameter.)18 -b(This)c(function)g(can)g(b)q(e)g(used)g(to)f(c)o(hec)o(k)h(\014eld)g(v)m -(alues,)h(to)e(create)-12 401 y(default)j(\014elds,)g(or)f(for)f(an)o(y)h -(other)g(side-e\013ect.)110 469 y Fk(\014eld)r(list)48 b Fg(!)j -Fm(')p Fg(f)p Fm(')15 b([)p Fk(\016eld)r(list1)6 b Fm(])15 -b(')p Fg(g)p Fm(')72 526 y Fk(\016eld)r(list1)49 b Fg(!)i Fk(\016eld)16 -b Fg(f)p Fm(',')e Fk(\016eld)5 b Fg(g)157 582 y Fk(\016eld)49 -b Fg(!)i Fk(name)16 b Fm('=')g Fk(exp)3 650 y Fm(This)g(\014eld)h(list)f -(initializes)i(named)d(\014elds)i(in)f(a)f(table.)20 b(As)15 -b(an)g(example:)60 730 y Fj(a)24 b(=)f(@f{x)h(=)f(1,)h(y)g(=)f(3})-12 -809 y Fm(is)16 b(equiv)m(alen)o(t)h(to:)60 888 y Fj(temp)23 -b(=)h(@\(2\))60 945 y(temp.x)f(=)h(1)60 1001 y(temp.y)f(=)h(3)60 -1058 y(f\(temp\))60 1114 y(a)g(=)f(temp)59 1193 y Fm(In)16 -b(order)f(to)f(initialize)k(a)d(list,)h(one)f(can)h(use)f(the)g(follo)o(wing) -h(syn)o(tax:)107 1261 y Fk(\014eld)r(list)48 b Fg(!)j Fm('[')15 -b([)p Fk(l\014eld)r(list1)6 b Fm(])14 b(']')72 1318 y Fk(l\014eld)r(list1)48 -b Fg(!)j Fk(exp)16 b Fg(f)p Fm(',')f Fk(exp)s Fg(g)3 1386 y -Fm(As)h(an)f(example:)60 1465 y Fj(a)24 b(=)f(@["v1",)g("vv"])-12 -1545 y Fm(is)16 b(equiv)m(alen)o(t)h(to:)60 1624 y Fj(temp)23 -b(=)h(@\(2\))60 1680 y(temp[1])f(=)g("v1")60 1737 y(temp[2])g(=)g("v2")60 -1793 y(a)h(=)f(temp)59 1872 y Fm(As)15 b(particular)h(cases,)f(the)g(follo)o -(wing)h(t)o(w)o(o)e(expressions)i(are)e(completely)j(equiv)m(alen)o(t:)84 -1952 y Fj(@f{)23 b(})215 b(@f[)23 b(])-12 2069 y Fi(4.5.8)52 -b(F)l(unction)18 b(Calls)-12 2155 y Fm(A)d(function)h(call)h(has)e(the)g -(follo)o(wing)h(syn)o(tax:)72 2223 y Fk(functionc)n(al)r(l)49 -b Fg(!)h Fk(var)16 b Fm('\(')g([)p Fk(explist1)6 b Fm(])15 -b('\)')154 2279 y Fk(explist1)50 b Fg(!)g(f)p Fk(exp1)16 b -Fm(',')p Fg(g)f Fk(exp)5 2350 y Fm(Here,)i Fj(var)g Fm(can)g(b)q(e)h(an)o(y)e -(v)m(ariable)j(\(global,)e(lo)q(cal,)h(indexed,)h(etc\))e(whose)g(v)m(alue)h -(has)f(t)o(yp)q(e)g Fk(function)j Fm(or)-12 2407 y Fk(Cfunction)s -Fm(.)g(All)c(argumen)o(t)e(expressions)i(are)f(ev)m(aluated)h(b)q(efore)f -(the)g(call,)h(from)f(left)g(to)f(righ)o(t;)h(then)g(the)-12 -2463 y(list)k(of)f(argumen)o(ts)f(is)h(adjusted)g(to)g(the)g(length)g(of)g -(the)g(list)h(of)e(parameters)g(\(see)h(Section)h(4.3\);)f(\014nally)-12 -2520 y(this)e(list)g(is)g(assigned)f(to)g(the)g(parameters.)59 -2576 y(Because)20 b(a)g(function)g(can)g(return)g(an)o(y)g(n)o(um)o(b)q(er)g -(of)f(results)h(\(see)g(Section)h(4.4.3\),)e(the)h(n)o(um)o(b)q(er)g(of)-12 -2632 y(results)11 b(m)o(ust)f(b)q(e)h(adjusted)f(b)q(efore)h(used.)19 -b(If)10 b(the)h(function)g(is)g(called)h(as)e(an)g(statemen)o(t)f(\(see)h -(Section)i(4.4.4\),)-12 2689 y(its)19 b(return)g(list)g(is)h(adjusted)f(to)f -(0.)30 b(If)19 b(the)g(function)g(is)h(called)g(in)g(a)e(place)i(that)e -(needs)i(a)e(single)i(v)m(alue)-12 2745 y(\(syn)o(tactically)13 -b(denoted)f(b)o(y)g(the)g(non-terminal)h Fj(exp1)p Fm(\),)f(its)g(return)g -(list)h(is)f(adjusted)g(to)g(1.)18 b(If)12 b(the)g(function)-12 -2802 y(is)i(called)h(in)g(a)e(place)i(that)d(can)i(hold)h(man)o(y)e(v)m -(alues)h(\(syn)o(tactically)h(denoted)f(b)o(y)f(the)h(non-terminal)g -Fj(exp)p Fm(\),)-12 2858 y(no)h(adjustmen)o(t)g(is)h(done.)910 -2976 y(7)p eop +bop -12 160 a Fn(is)16 b(equiv)m(alen)o(t)h(to:)60 253 y Fl(temp)23 +b(=)h({})60 310 y(temp[1])f(=)g("v1")60 366 y(temp[2])g(=)g("v2")60 +423 y(temp[3])g(=)g(34)60 479 y(a)h(=)f(temp)59 573 y Fn(The)15 +b(next)g(form)g(initializes)j(named)e(\014elds)g(in)g(a)f(table.)72 +632 y Fm(\016eld)r(list1)49 b Fi(!)i Fm(\016eld)16 b Fi(f)p +Fn(',')e Fm(\016eld)5 b Fi(g)157 689 y Fm(\016eld)49 b Fi(!)i +Fm(name)16 b Fn('=')g Fm(exp)-12 757 y Fn(As)f(an)g(example:)60 +851 y Fl(a)24 b(=)f({x)h(=)g(1,)f(y)h(=)g(3})-12 945 y Fn(is)16 +b(equiv)m(alen)o(t)h(to:)60 1039 y Fl(temp)23 b(=)h({})60 1095 +y(temp.x)f(=)h(1)60 1152 y(temp.y)f(=)h(3)60 1208 y(a)g(=)f(temp)-12 +1328 y Fk(4.5.8)52 b(F)l(unction)18 b(Calls)-12 1414 y Fn(A)d(function)h +(call)h(has)e(the)g(follo)o(wing)h(syn)o(tax:)72 1486 y Fm(functionc)n(al)r +(l)49 b Fi(!)h Fm(var)16 b(r)n(e)n(alPar)n(ams)-12 1558 y Fn(Here,)d +Fl(var)g Fn(can)g(b)q(e)h(an)o(y)e(v)m(ariable)j(\(global,)e(lo)q(cal,)h +(indexed,)h(etc\).)k(If)13 b(its)g(t)o(yp)q(e)g(is)g Fm(function)j +Fn(or)d Fm(CF)m(unction)s Fn(,)-12 1615 y(this)k(function)h(is)f(called.)27 +b(Otherwise,)17 b(the)g(fallbac)o(k)g(\\function")h(is)f(called,)h(ha)o(ving) +f(as)g(\014rst)f(parameter)-12 1671 y(the)f(v)m(alue)i(of)e +Fl(var)p Fn(,)f(and)h(then)h(the)f(original)i(call)f(parameters.)59 +1727 y(The)f(form:)72 1800 y Fm(functionc)n(al)r(l)49 b Fi(!)h +Fm(var)16 b Fn(':')k Fm(name)c(r)n(e)n(alPar)n(ams)-12 1872 +y Fn(can)g(b)q(e)f(used)h(to)f(call)h(\\metho)q(ds".)k(A)15 +b(call)h Fl(var:name\(...\))d Fn(is)j(syn)o(tactic)f(sugar)g(for)36 +1965 y Fl(var.name\(var,)22 b(...\))-12 2059 y Fn(except)16 +b(that)e Fl(var)h Fn(is)h(ev)m(aluated)g(only)g(once.)72 2127 +y Fm(r)n(e)n(alPar)n(ams)49 b Fi(!)h Fn('\(')15 b([)p Fm(explist1)6 +b Fn(])16 b('\)')72 2184 y Fm(r)n(e)n(alPar)n(ams)49 b Fi(!)h +Fm(table)n(c)n(onstructor)144 2240 y(explist1)g Fi(!)g Fm(exp1)17 +b Fi(f)p Fn(',')e Fm(exp1)6 b Fi(g)-12 2309 y Fn(All)14 b(argumen)o(t)e +(expressions)h(are)f(ev)m(aluated)i(b)q(efore)f(the)f(call;)j(then)d(the)h +(list)g(of)g(argumen)o(ts)e(is)i(adjusted)g(to)-12 2365 y(the)j(length)g(of)f +(the)g(list)i(of)e(parameters)f(\(see)h(Section)i(4.3\);)d(\014nally)l(,)i +(this)g(list)g(is)g(assigned)g(to)f(the)h(formal)-12 2422 y(parameters.)j(A)c +(call)i(of)d(the)i(form)e Fl(f{...})g Fn(is)i(syn)o(tactic)f(sugar)g(for)f +Fl(f\({...}\))p Fn(,)g(that)g(is,)i(the)f(parameter)-12 2478 +y(list)h(is)g(a)f(single)h(new)g(table.)59 2534 y(Because)k(a)g(function)g +(can)g(return)g(an)o(y)g(n)o(um)o(b)q(er)g(of)f(results)h(\(see)g(Section)h +(4.4.3\),)e(the)h(n)o(um)o(b)q(er)g(of)-12 2591 y(results)11 +b(m)o(ust)f(b)q(e)h(adjusted)f(b)q(efore)h(used.)19 b(If)10 +b(the)h(function)g(is)g(called)h(as)e(an)g(statemen)o(t)f(\(see)h(Section)i +(4.4.4\),)-12 2647 y(its)19 b(return)g(list)g(is)h(adjusted)f(to)f(0.)30 +b(If)19 b(the)g(function)g(is)h(called)g(in)g(a)e(place)i(that)e(needs)i(a)e +(single)i(v)m(alue)-12 2704 y(\(syn)o(tactically)13 b(denoted)f(b)o(y)g(the)g +(non-terminal)h Fl(exp1)p Fn(\),)f(its)g(return)g(list)h(is)f(adjusted)g(to)g +(1.)18 b(If)12 b(the)g(function)-12 2760 y(is)i(called)h(in)g(a)e(place)i +(that)d(can)i(hold)h(man)o(y)e(v)m(alues)h(\(syn)o(tactically)h(denoted)f(b)o +(y)f(the)h(non-terminal)g Fl(exp)p Fn(\),)-12 2817 y(no)h(adjustmen)o(t)g(is) +h(done.)910 2976 y(7)p eop %%Page: 8 8 -bop -12 160 a Fb(4.6)56 b(F)-5 b(unction)19 b(De\014nitions)-12 -245 y Fm(F)l(unctions)c(in)g(Lua)g(can)g(b)q(e)g(de\014ned)g(an)o(ywhere)g -(in)g(the)f(global)h(lev)o(el)h(of)e(a)g(mo)q(dule;)h(functions)g(cannot)g(b) -q(e)-12 302 y(de\014ned)i(inside)g(other)e(functions.)20 b(The)c(syn)o(tax)e -(for)h(function)h(de\014nition)h(is:)72 374 y Fk(function)49 -b Fg(!)i Fi(function)17 b Fk(name)f Fm('\(')f([)p Fk(p)n(arlist1)6 -b Fm(])16 b('\)')f Fk(blo)n(ck)h Fi(end)59 503 y Fm(When)d(Lua)g(\014nds)h(a) -f(function)g(de\014nition,)i(its)e(b)q(o)q(dy)h(is)g(compiled)g(to)f(in)o -(termediate)g(co)q(de)h(and)f(stored,)-12 559 y(with)j(t)o(yp)q(e)f -Fk(function)p Fm(,)f(in)o(to)i(the)f(global)h(v)m(ariable)g -Fj(name)p Fm(.)59 615 y(P)o(arameters)e(act)g(as)h(lo)q(cal)h(v)m(ariables,)h -(initialized)h(with)e(the)f(argumen)o(t)f(v)m(alues.)72 688 -y Fk(p)n(arlist1)49 b Fg(!)i Fk('name')16 b Fg(f)p Fm(',')f -Fk(name)s Fg(g)59 816 y Fm(Results)h(are)e(returned)h(using)h(the)e -Fj(return)g Fm(statemen)o(t)g(\(see)h(Section)g(4.4.3\).)j(If)d(the)g(con)o -(trol)f(reac)o(hes)-12 873 y(the)h(end)h(of)f(a)g(function)h(without)f(a)g -(return)g(instruction,)h(the)f(function)h(returns)f(with)h(no)f(results.)-12 -1016 y Fl(5)69 b(The)23 b(Application)e(Program)h(In)n(terface)-12 -1117 y Fm(This)e(section)f(describ)q(es)h(the)f(API)g(for)f(Lua,)i(that)e -(is,)i(the)f(set)f(of)g(C)h(functions)g(a)o(v)m(ailable)i(to)d(the)h(host)-12 -1174 y(program)13 b(to)g(comm)o(unicate)h(with)g(the)f(library)l(.)21 -b(The)14 b(API)g(functions)g(can)g(b)q(e)g(classi\014ed)h(in)g(the)f(follo)o -(wing)-12 1230 y(categories:)44 1324 y(1.)22 b(executing)16 -b(Lua)g(co)q(de;)44 1418 y(2.)22 b(con)o(v)o(erting)15 b(v)m(alues)h(b)q(et)o -(w)o(een)g(C)f(and)g(Lua;)44 1512 y(3.)22 b(manipulating)17 -b(\(reading)e(and)g(writing\))h(Lua)f(ob)s(jects;)44 1605 y(4.)22 -b(calling)17 b(Lua)e(functions;)44 1699 y(5.)22 b(C)15 b(functions)h(to)e(b)q -(e)i(called)h(b)o(y)e(Lua;)44 1793 y(6.)22 b(error)14 b(handling.)-12 -1887 y(All)h(API)f(functions)g(are)f(declared)h(in)g(the)g(\014le)g -Fj(lua.h)p Fm(.)19 b(Unless)14 b(stated)f(otherwise,)g(API)h(functions)g -(return)-12 1943 y(an)h(error)g(co)q(de:)20 b(0)15 b(in)h(case)f(of)g -(success,)h(non)f(0)g(in)h(case)f(of)g(errors.)-12 2065 y Fb(5.1)56 -b(Executing)17 b(Lua)i(Co)r(de)-12 2151 y Fm(A)d(host)g(program)e(can)i -(execute)h(Lua)f(programs)f(written)h(in)h(a)e(\014le)i(or)f(in)h(a)e -(string,)h(using)h(the)f(follo)o(wing)-12 2207 y(functions:)-12 -2301 y Fj(int)286 b(lua_dofile)357 b(\(char)23 b(*filename\);)-12 -2358 y(int)286 b(lua_dostring)309 b(\(char)23 b(*string\);)-12 -2479 y Fb(5.2)56 b(Con)n(v)n(erting)19 b(V)-5 b(alues)19 b(b)r(et)n(w)n(een)f -(C)h(and)g(Lua)-12 2565 y Fm(Because)24 b(Lua)g(has)g(no)g(static)f(t)o(yp)q -(e)h(system,)h(all)f(v)m(alues)h(passed)f(b)q(et)o(w)o(een)g(Lua)g(and)g(C)f -(ha)o(v)o(e)g(t)o(yp)q(e)-12 2622 y Fj(lua_Object)p Fm(,)12 -b(whic)o(h)j(w)o(orks)e(lik)o(e)i(an)e(abstract)g(t)o(yp)q(e)h(in)h(C)e(that) -g(can)h(hold)h(an)o(y)e(Lua)h(v)m(alue.)21 b Fj(lua_Object)-12 -2678 y Fm(is)16 b(declared)g(as:)-12 2772 y Fj(typedef)23 b(struct)g(Object)g -(*lua_Object;)910 2976 y Fm(8)p eop +bop -12 160 a Fd(4.6)56 b(F)-5 b(unction)19 b(De\014nitions)-12 +245 y Fn(F)l(unctions)i(in)f(Lua)g(can)g(b)q(e)g(de\014ned)h(an)o(ywhere)f +(in)g(the)g(global)g(lev)o(el)h(of)e(a)h(mo)q(dule.)34 b(The)20 +b(syn)o(tax)f(for)-12 302 y(function)d(de\014nition)h(is:)72 +374 y Fm(function)49 b Fi(!)i Fk(function)17 b Fm(name)f Fn('\(')f([)p +Fm(p)n(arlist1)6 b Fn(])16 b('\)')f Fm(blo)n(ck)h Fk(end)59 +503 y Fn(When)d(Lua)g(\014nds)h(a)f(function)g(de\014nition,)i(its)e(b)q(o)q +(dy)h(is)g(compiled)g(to)f(in)o(termediate)g(co)q(de)h(and)f(stored,)-12 +559 y(with)j(t)o(yp)q(e)f Fm(function)p Fn(,)f(in)o(to)i(the)f(global)h(v)m +(ariable)g Fl(name)p Fn(.)59 615 y(P)o(arameters)e(act)g(as)h(lo)q(cal)h(v)m +(ariables,)h(initialized)h(with)e(the)f(argumen)o(t)f(v)m(alues.)72 +688 y Fm(p)n(arlist1)49 b Fi(!)i Fm('name')16 b Fi(f)p Fn(',')f +Fm(name)s Fi(g)59 816 y Fn(Results)h(are)e(returned)h(using)h(the)e +Fl(return)g Fn(statemen)o(t)g(\(see)h(Section)g(4.4.3\).)j(If)d(con)o(trol)f +(reac)o(hes)h(the)-12 873 y(end)h(of)f(a)g(function)h(without)f(a)g(return)g +(instruction,)h(the)f(function)h(returns)f(with)h(no)f(results.)59 +929 y(There)e(is)h(a)f(sp)q(ecial)i(syn)o(tax)e(for)f(de\014nition)j(of)e +(metho)q(ds,)h(that)e(is,)i(functions)g(whic)o(h)g(are)f(to)g(b)q(e)h(stored) +-12 986 y(in)i(table)g(\014elds.)72 1058 y Fm(function)49 b +Fi(!)i Fk(function)17 b Fm(name)f Fn(':')k Fm(name)c Fn('\(')f([)p +Fm(p)n(arlist1)6 b Fn(])16 b('\)')f Fm(blo)n(ck)g Fk(end)-12 +1130 y Fn(A)g(declaration)h(lik)o(e)-12 1224 y Fl(function)23 +b(t:f)g(\(...\))36 1280 y(...)-12 1336 y(end)-12 1430 y Fn(is)16 +b(equiv)m(alen)o(t)h(to)-12 1524 y Fl(function)23 b(temp)g(\(self,)g(...\))36 +1581 y(...)-12 1637 y(end)-12 1693 y(t.f)h(=)f(temp)-12 1787 +y Fn(that)18 b(is,)i(the)f(function)g(is)g(created)g(with)g(a)f(dumm)o(y)h +(name)g(and)f(then)h(assigned)h(to)e(the)h(\014eld)g Fl(f)g +Fn(of)f(the)-12 1844 y(table)g Fl(t)p Fn(.)24 b(Moreo)o(v)o(er,)16 +b(the)h(function)h(gets)e(an)h(extra)f(formal)h(parameter)f(called)i +Fl(self)p Fn(.)25 b(Notice)17 b(that)f(the)-12 1900 y(v)m(ariable)h +Fl(t)e Fn(m)o(ust)f(b)q(e)i(previously)h(initialized)h(with)e(a)f(table)g(v)m +(alue.)-12 2022 y Fd(4.7)56 b(F)-5 b(allbac)n(ks)-12 2108 y +Fn(Lua)23 b(pro)o(vides)f(a)g(p)q(o)o(w)o(erful)h(mec)o(hanism)g(to)e(extend) +i(its)g(seman)o(tics,)g(called)h Fm(fal)r(lb)n(acks)p Fn(.)40 +b(Basically)l(,)26 b(a)-12 2164 y(fallbac)o(k)15 b(is)g(a)g(programmer)e +(de\014ned)j(function)f(whic)o(h)g(is)g(called)h(whenev)o(er)f(Lua)g(do)q(es) +g(not)f(kno)o(w)g(ho)o(w)g(to)-12 2221 y(pro)q(ceed.)59 2277 +y(Lua)h(supp)q(orts)h(the)f(follo)o(wing)h(fallbac)o(ks,)f(iden)o(ti\014ed)i +(b)o(y)f(the)f(giv)o(en)h(strings:)-12 2371 y Fk(\\arith")25 +b Fn(called)18 b(when)g(an)e(arithmetic)i(op)q(eration)f(is)h(applied)g(to)f +(non)g(n)o(umerical)h(op)q(erands,)f(or)g(when)102 2427 y(the)c(binary)g +Fl(^)g Fn(op)q(eration)g(is)h(called.)21 b(Receiv)o(es)14 b(three)f(argumen)o +(ts:)18 b(the)13 b(t)o(w)o(o)f(op)q(erands)h(\(the)g(second)102 +2484 y(one)i(is)g(nil)h(when)f(the)f(op)q(eration)h(is)g(unary)g(min)o(us\))g +(and)f(one)h(of)f(the)h(follo)o(wing)g(strings)f(describing)102 +2540 y(the)h(o\013ended)h(op)q(erator:)150 2653 y Fl(add)47 +b(sub)g(mul)h(div)f(pow)g(unm)102 2765 y Fn(Its)13 b(return)g(v)m(alue)h(is)f +(the)g(\014nal)h(result)f(of)g(the)g(arithmetic)h(op)q(eration.)19 +b(The)13 b(default)h(function)f(issues)102 2822 y(an)i(error.)910 +2976 y(8)p eop %%Page: 9 9 -bop -12 160 a Fm(where)16 b Fj(Object)e Fm(is)i(not)e(declared)j(in)f -Fj(lua.h)p Fm(.)59 216 y(Lua)j(has)g(garbage)f(collection.)34 -b(Therefore,)19 b(there)g(is)h(no)f(guaran)o(tee)f(that)g(a)h -Fj(lua_Object)f Fm(will)j(b)q(e)-12 273 y(v)m(alid)f(after)e(another)g -(execution)h(of)f(Lua)h(co)q(de.)30 b(A)19 b(go)q(o)q(d)f(programming)g -(practice)h(is)g(to)e(con)o(v)o(ert)h(suc)o(h)-12 329 y(ob)s(jects)d(to)f(C)h -(v)m(alues)i(as)d(so)q(on)h(as)g(they)h(are)e(a)o(v)m(ailable,)j(and)e(nev)o -(er)h(store)e(them)h(in)h(global)g(v)m(ariables.)59 385 y(T)l(o)f(c)o(hec)o -(k)g(the)g(t)o(yp)q(e)h(of)e(a)h Fj(lua_Object)p Fm(,)f(the)h(follo)o(wing)h -(functions)g(are)f(a)o(v)m(ailable:)-12 479 y Fj(int)286 b(lua_isnil)381 -b(\(lua_Object)22 b(object\);)-12 536 y(int)286 b(lua_isnumber)309 -b(\(lua_Object)22 b(object\);)-12 592 y(int)286 b(lua_isstring)309 -b(\(lua_Object)22 b(object\);)-12 649 y(int)286 b(lua_istable)333 -b(\(lua_Object)22 b(object\);)-12 705 y(int)286 b(lua_iscfunction)237 -b(\(lua_Object)22 b(object\);)-12 762 y(int)286 b(lua_isuserdata)261 -b(\(lua_Object)22 b(object\);)-12 855 y Fm(All)17 b(return)e(1)g(if)g(the)h -(ob)s(ject)e(has)h(the)h(giv)o(en)f(t)o(yp)q(e,)g(0)g(otherwise.)59 -912 y(T)l(o)g(translate)f(a)h(v)m(alue)i(from)d(t)o(yp)q(e)h -Fj(lua_Object)f Fm(to)h(a)g(sp)q(eci\014c)i(C)e(t)o(yp)q(e,)g(the)g -(programmer)f(can)h(use:)-12 1006 y Fj(float)238 b(lua_getnumber)285 -b(\(lua_Object)22 b(object\);)-12 1062 y(char)238 b(*lua_getstring)285 -b(\(lua_Object)22 b(object\);)-12 1119 y(char)238 b(*lua_copystring)261 -b(\(lua_Object)22 b(object\);)-12 1175 y(lua_CFunction)46 b(lua_getcfunction) -213 b(\(lua_Object)22 b(object\);)-12 1231 y(void)238 b(*lua_getuserdata)f -(\(lua_Object)22 b(object\);)-12 1325 y(lua_getnumber)16 b -Fm(con)o(v)o(erts)h(a)h Fj(lua_Object)e Fm(to)h(a)h(\015oat.)27 -b(This)18 b Fj(lua_Object)f Fm(m)o(ust)g(b)q(e)i(a)e(n)o(um)o(b)q(er)h(or)g -(a)-12 1382 y(string)d(con)o(v)o(ertible)i(to)d(n)o(um)o(b)q(er)i(\(see)f +bop -12 160 a Fk(\\order")23 b Fn(called)15 b(when)f(an)f(order)g(comparison) +g(is)h(applied)h(to)e(non)g(n)o(umerical)i(or)e(non)g(string)g(op)q(erands.) +102 216 y(Receiv)o(es)18 b(three)e(argumen)o(ts:)22 b(the)16 +b(t)o(w)o(o)f(op)q(erands)i(and)g(one)f(of)g(the)h(follo)o(wing)g(strings)f +(describing)102 273 y(the)f(o\013ended)h(op)q(erator:)150 383 +y Fl(lt)23 b(gt)h(le)f(ge)102 494 y Fn(Its)d(return)g(v)m(alue)i(is)f(the)f +(\014nal)h(result)g(of)f(the)g(comparison)h(op)q(eration.)35 +b(The)21 b(default)f(function)102 551 y(issues)c(an)f(error.)-12 +644 y Fk(\\concat")25 b Fn(called)20 b(when)f(a)f(concatenation)h(is)g +(applied)h(to)e(non)g(string)g(op)q(erands.)30 b(Receiv)o(es)20 +b(the)f(t)o(w)o(o)102 700 y(op)q(erands)13 b(as)f(argumen)o(ts.)18 +b(Its)13 b(return)f(v)m(alue)i(is)f(the)g(\014nal)g(result)g(of)f(the)h +(concatenation)f(op)q(eration.)102 757 y(The)j(default)h(function)g(issues)g +(an)f(error.)-12 850 y Fk(\\index")24 b Fn(called)13 b(when)f(Lua)g(tries)f +(to)g(retriev)o(e)h(the)f(v)m(alue)i(of)e(an)g(index)i(not)e(presen)o(t)g(in) +i(a)e(table.)19 b(Receiv)o(es)102 907 y(as)c(argumen)o(ts)f(the)i(table)g +(and)f(the)h(index.)21 b(Its)16 b(return)f(v)m(alue)i(is)f(the)f(\014nal)h +(result)g(of)f(the)g(indexing)102 963 y(op)q(eration.)20 b(The)15 +b(default)h(function)g(returns)f(nil.)-12 1056 y Fk(\\gettable")25 +b Fn(called)17 b(when)f(Lua)f(tries)h(to)e(index)j(a)e(non)g(table)h(v)m +(alue.)21 b(Receiv)o(es)c(as)d(argumen)o(ts)h(the)g(non)102 +1113 y(table)i(v)m(alue)h(and)f(the)f(index.)26 b(Its)17 b(return)f(v)m(alue) +i(is)f(the)g(\014nal)h(result)f(of)f(the)h(indexing)h(op)q(eration.)102 +1169 y(The)d(default)h(function)g(issues)g(an)f(error.)-12 +1263 y Fk(\\settable")25 b Fn(called)16 b(when)f(Lua)g(tries)g(to)f(assign)h +(indexed)h(a)e(non)h(table)g(v)m(alue.)21 b(Receiv)o(es)16 +b(as)e(argumen)o(ts)102 1319 y(the)k(non)g(table)h(v)m(alue,)h(the)e(index,)h +(and)g(the)f(assigned)h(v)m(alue.)29 b(The)19 b(default)f(function)h(issues)g +(an)102 1375 y(error.)-12 1469 y Fk(\\function")25 b Fn(called)15 +b(when)e(Lua)h(tries)f(to)f(call)i(a)f(non)g(function)h(v)m(alue.)21 +b(Receiv)o(es)14 b(as)f(argumen)o(ts)f(the)h(non)102 1525 y(function)h(v)m +(alue)g(and)g(the)f(argumen)o(ts)g(giv)o(en)g(in)h(the)g(original)g(call.)20 +b(Its)14 b(return)f(v)m(alues)h(are)f(the)g(\014nal)102 1582 +y(results)i(of)g(the)g(call)i(op)q(eration.)j(The)15 b(default)h(function)g +(issues)g(an)f(error.)-12 1675 y Fk(\\gc")24 b Fn(called)18 +b(during)f(garbage)e(collection.)24 b(Receiv)o(es)18 b(as)d(argumen)o(t)h +(the)g(table)g(b)q(eing)i(collected.)24 b(After)102 1731 y(eac)o(h)15 +b(run)g(of)g(the)g(collector)h(this)f(function)h(is)g(called)g(with)g +(argumen)o(t)e(nil.)21 b(Because)16 b(this)f(function)102 1788 +y(op)q(erates)j(during)i(garbage)d(collection,)k(it)e(m)o(ust)f(b)q(e)h(used) +g(with)g(great)f(care,)h(and)g(programmers)102 1844 y(should)d(a)o(v)o(oid)e +(the)i(creation)f(of)f(new)h(ob)s(jects)g(\(tables)g(or)f(strings\))h(in)g +(this)h(function.)21 b(The)15 b(default)102 1901 y(function)h(do)q(es)f +(nothing.)-12 1994 y Fk(\\error")22 b Fn(called)16 b(when)e(an)g(error)f(o)q +(ccurs.)20 b(Receiv)o(es)15 b(as)e(argumen)o(t)h(a)f(string)h(describing)h +(the)f(error.)19 b(The)102 2050 y(default)d(function)g(prin)o(ts)f(the)g +(message)g(on)g(the)h(standard)e(error)h(output.)59 2143 y(The)e(function)h +Fl(setfallback)d Fn(is)j(used)g(to)e(c)o(hange)h(a)g(fallbac)o(k)h(action.)19 +b(Its)13 b(\014rst)g(argumen)o(t)f(is)i(a)e(string)-12 2199 +y(describing)h(the)f(fallbac)o(k,)g(and)g(the)f(second)h(the)g(new)f +(function)h(to)f(b)q(e)h(called.)20 b(It)12 b(returns)f(the)h(old)f(function) +-12 2256 y(for)k(the)g(giv)o(en)h(fallbac)o(k,)f(or)g(nil)i(on)e(error.)59 +2312 y(Section)h(7.4)e(sho)o(ws)h(an)g(example)h(of)f(the)g(use)g(of)g +(fallbac)o(ks.)-12 2434 y Fd(4.8)56 b(Error)18 b(Handling)-12 +2520 y Fn(Because)i(Lua)g(is)g(an)g(extension)g(language,)h(all)f(Lua)g +(actions)f(start)g(from)g(C)g(co)q(de)h(calling)h(a)e(function)-12 +2576 y(from)13 b(the)i(Lua)f(library)l(.)20 b(Whenev)o(er)15 +b(an)f(error)f(o)q(ccurs)h(during)h(Lua)f(compilation)i(or)d(execution,)i(an) +f(error)-12 2632 y(fallbac)o(k)h(function)g(is)g(called,)h(and)e(then)h(the)f +(corresp)q(onden)o(t)g(function)i(from)d(the)h(library)h(\()p +Fl(lua_dofile)p Fn(,)-12 2689 y Fl(lua_dostring)p Fn(,)d Fl(lua_call)p +Fn(,)f(and)j Fl(lua_callfunction)p Fn(\))c(is)j(terminated)h(returning)f(an)g +(error)f(condition.)59 2745 y(The)j(only)h(argumen)o(t)f(to)g(the)g(error)g +(fallbac)o(k)h(function)g(is)g(a)f(string)h(describing)h(the)e(error)g(and)h +(some)-12 2802 y(extra)k(informations,)i(lik)o(e)g(curren)o(t)f(line)i +(\(when)e(the)g(error)f(is)h(at)g(compilation\))g(or)g(curren)o(t)f(function) +-12 2858 y(\(when)d(the)f(error)g(is)h(at)f(execution\).)24 +b(F)l(or)16 b(more)g(information)g(ab)q(out)h(an)f(error,)g(the)g(Lua)h +(program)e(can)910 2976 y(9)p eop +%%Page: 10 10 +bop -12 160 a Fn(include)24 b(the)d(compilation)h(pragma)e +Fl($debug)p Fn(.)37 b(This)22 b(pragma)e(m)o(ust)g(b)q(e)i(written)f(in)h(a)f +(line)i(b)o(y)e(itself.)-12 216 y(When)13 b(an)g(error)f(o)q(ccurs)i(in)f(a)g +(program)f(compiled)i(with)g(this)f(option,)g(the)g(error)f(message)h +(includes)i(extra)-12 273 y(information)h(sho)o(wing)f(the)g(stac)o(k)f(of)h +(calls.)59 329 y(The)d(standard)g(error)g(routine)h(only)g(prin)o(ts)g(the)f +(error)g(message)g(to)g Fl(stderr)p Fn(.)18 b(If)13 b(needed,)h(it)f(is)g(p)q +(ossible)-12 385 y(to)i(c)o(hange)g(the)g(error)g(fallbac)o(k)h(routine;)f +(see)h(Section)g(4.7.)59 442 y(Lua)g(co)q(de)h(can)f(generate)g(an)g(error)f +(b)o(y)h(calling)i(the)e(function)h Fl(error)p Fn(.)k(Its)16 +b(optional)h(parameter)e(is)i(a)-12 498 y(string,)e(whic)o(h)h(is)g(used)g +(as)e(the)i(error)e(message.)-12 641 y Fo(5)69 b(The)23 b(Application)e +(Program)h(In)n(terface)-12 742 y Fn(This)e(section)f(describ)q(es)h(the)f +(API)g(for)f(Lua,)i(that)e(is,)i(the)f(set)f(of)g(C)h(functions)g(a)o(v)m +(ailable)i(to)d(the)h(host)-12 799 y(program)13 b(to)g(comm)o(unicate)h(with) +g(the)f(library)l(.)21 b(The)14 b(API)g(functions)g(can)g(b)q(e)g +(classi\014ed)h(in)g(the)f(follo)o(wing)-12 855 y(categories:)44 +945 y(1.)22 b(executing)16 b(Lua)g(co)q(de;)44 1038 y(2.)22 +b(con)o(v)o(erting)15 b(v)m(alues)h(b)q(et)o(w)o(een)g(C)f(and)g(Lua;)44 +1130 y(3.)22 b(manipulating)17 b(\(reading)e(and)g(writing\))h(Lua)f(ob)s +(jects;)44 1222 y(4.)22 b(calling)17 b(Lua)e(functions;)44 +1315 y(5.)22 b(C)15 b(functions)h(to)e(b)q(e)i(called)h(b)o(y)e(Lua;)44 +1407 y(6.)22 b(lo)q(c)o(king)16 b(Lua)g(Ob)s(jects.)-12 1497 +y(All)h(API)e(functions)h(are)f(declared)i(in)f(the)f(\014le)h +Fl(lua.h)p Fn(.)-12 1618 y Fd(5.1)56 b(Executing)17 b(Lua)i(Co)r(de)-12 +1704 y Fn(A)d(host)g(program)e(can)i(execute)h(Lua)f(programs)f(written)h(in) +h(a)e(\014le)i(or)f(in)h(a)e(string,)h(using)h(the)f(follo)o(wing)-12 +1760 y(functions:)-12 1850 y Fl(int)286 b(lua_dofile)357 b(\(char)23 +b(*filename\);)-12 1907 y(int)286 b(lua_dostring)309 b(\(char)23 +b(*string\);)-12 1997 y Fn(Both)15 b(functions)h(return)f(an)g(error)g(co)q +(de:)20 b(0,)15 b(in)h(case)f(of)g(success;)g(non)h(zero,)e(in)i(case)g(of)e +(errors.)-12 2118 y Fd(5.2)56 b(Con)n(v)n(erting)19 b(V)-5 +b(alues)19 b(b)r(et)n(w)n(een)f(C)h(and)g(Lua)-12 2204 y Fn(Because)24 +b(Lua)g(has)g(no)g(static)f(t)o(yp)q(e)h(system,)h(all)f(v)m(alues)h(passed)f +(b)q(et)o(w)o(een)g(Lua)g(and)g(C)f(ha)o(v)o(e)g(t)o(yp)q(e)-12 +2260 y Fl(lua_Object)p Fn(,)14 b(whic)o(h)i(w)o(orks)e(lik)o(e)i(an)f +(abstract)f(t)o(yp)q(e)i(in)g(C)f(that)f(can)i(hold)g(an)o(y)e(Lua)i(v)m +(alue.)59 2317 y(Lua)24 b(has)g(automatic)f(memory)g(managemen)o(t,)i(and)f +(garbage)f(collection.)48 b(Because)24 b(of)g(that,)h(a)-12 +2373 y Fl(lua_Object)15 b Fn(has)h(a)f(limited)j(scop)q(e,)e(and)g(is)h(only) +f(v)m(alid)i(inside)g(the)e Fm(blo)n(ck)k Fn(where)c(it)g(w)o(as)f(created.) +23 b(A)16 b(C)-12 2429 y(function)j(called)g(from)f(Lua)g(is)g(a)g(blo)q(c)o +(k,)h(and)f(its)g(parameters)f(are)h(v)m(alid)h(only)g(un)o(til)g(its)f(end.) +28 b(A)18 b(go)q(o)q(d)-12 2486 y(programming)d(practice)g(is)h(to)e(con)o(v) +o(ert)h(Lua)g(ob)s(jects)g(to)f(C)h(v)m(alues)h(as)f(so)q(on)g(as)g(they)g +(are)g(a)o(v)m(ailable,)h(and)-12 2542 y(nev)o(er)g(to)e(store)h +Fl(lua_Object)p Fn(s)e(in)j(global)g(v)m(ariables.)59 2599 +y(When)h(C)f(co)q(de)i(calls)f(Lua)g(rep)q(eatedly)l(,)h(as)f(in)g(a)g(lo)q +(op,)g(ob)s(jects)f(returned)h(b)o(y)g(there)f(calls)i(ma)o(y)e(acu-)-12 +2655 y(m)o(ulate,)21 b(creating)g(a)f(memory)g(problem.)36 +b(T)l(o)20 b(a)o(v)o(oid)g(this,)i(nested)e(blo)q(c)o(ks)h(can)g(b)q(e)g +(de\014ned)h(with)e(the)-12 2712 y(functions:)-12 2802 y Fl(void)262 +b(lua_beginblock)f(\(void\);)-12 2858 y(void)h(lua_endblock)309 +b(\(void\);)899 2976 y Fn(10)p eop +%%Page: 11 11 +bop -12 160 a Fn(After)15 b(the)g(end)h(of)f(the)g(blo)q(c)o(k,)h(all)g +Fl(lua_Object)p Fn('s)d(created)i(inside)i(it)f(are)f(released.)59 +216 y(T)l(o)g(c)o(hec)o(k)g(the)g(t)o(yp)q(e)h(of)e(a)h Fl(lua_Object)p +Fn(,)f(the)h(follo)o(wing)h(function)g(is)g(a)o(v)m(ailable:)-12 +310 y Fl(int)286 b(lua_type)405 b(\(lua_Object)22 b(object\);)-12 +404 y Fn(plus)16 b(the)g(follo)o(wing)g(macros:)-12 498 y Fl(int)286 +b(lua_isnil)381 b(\(lua_Object)22 b(object\);)-12 554 y(int)286 +b(lua_isnumber)309 b(\(lua_Object)22 b(object\);)-12 610 y(int)286 +b(lua_isstring)309 b(\(lua_Object)22 b(object\);)-12 667 y(int)286 +b(lua_istable)333 b(\(lua_Object)22 b(object\);)-12 723 y(int)286 +b(lua_iscfunction)237 b(\(lua_Object)22 b(object\);)-12 780 +y(int)286 b(lua_isuserdata)261 b(\(lua_Object)22 b(object\);)-12 +874 y Fn(All)17 b(macros)d(return)h(1)g(if)h(the)f(ob)s(ject)g(has)g(the)g +(giv)o(en)h(t)o(yp)q(e,)f(and)g(0)g(otherwise.)59 930 y(The)f(function)h +Fl(lua_type)e Fn(can)h(b)q(e)h(used)g(to)e(distinguish)k(b)q(et)o(w)o(een)d +(di\013eren)o(t)g(kinds)i(of)d(user)i(data;)e(see)-12 987 y(b)q(elo)o(w.)59 +1043 y(T)l(o)i(translate)f(a)h(v)m(alue)i(from)d(t)o(yp)q(e)h +Fl(lua_Object)f Fn(to)h(a)g(sp)q(eci\014c)i(C)e(t)o(yp)q(e,)g(the)g +(programmer)f(can)h(use:)-12 1137 y Fl(double)214 b(lua_getnumber)285 +b(\(lua_Object)22 b(object\);)-12 1193 y(char)238 b(*lua_getstring)285 +b(\(lua_Object)22 b(object\);)-12 1250 y(lua_CFunction)46 b(lua_getcfunction) +213 b(\(lua_Object)22 b(object\);)-12 1306 y(void)238 b(*lua_getuserdata)f +(\(lua_Object)22 b(object\);)-12 1400 y(lua_getnumber)16 b +Fn(con)o(v)o(erts)h(a)h Fl(lua_Object)e Fn(to)h(a)h(\015oat.)27 +b(This)18 b Fl(lua_Object)f Fn(m)o(ust)g(b)q(e)i(a)e(n)o(um)o(b)q(er)h(or)g +(a)-12 1456 y(string)d(con)o(v)o(ertible)i(to)d(n)o(um)o(b)q(er)i(\(see)f (Section)h(4.2\);)d(otherwise,)i(the)h(function)g(returns)f(0.)59 -1438 y Fj(lua_getstring)f Fm(con)o(v)o(erts)h(a)h Fj(lua_Object)e -Fm(to)i(a)g(string)f(\()p Fj(char)23 b(*)p Fm(\).)f(This)17 -b Fj(lua_Object)d Fm(m)o(ust)i(b)q(e)h(a)-12 1495 y(string)h(or)g(a)g(n)o(um) +1513 y Fl(lua_getstring)f Fn(con)o(v)o(erts)h(a)h Fl(lua_Object)e +Fn(to)i(a)g(string)f(\()p Fl(char)23 b(*)p Fn(\).)f(This)17 +b Fl(lua_Object)d Fn(m)o(ust)i(b)q(e)h(a)-12 1569 y(string)h(or)g(a)g(n)o(um) o(b)q(er;)i(otherwise,)f(the)f(function)i(returns)e(0)g(\(the)g(n)o(ull)i(p)q -(oin)o(ter\).)29 b(This)19 b(function)g(do)q(es)-12 1551 y(not)14 +(oin)o(ter\).)29 b(This)19 b(function)g(do)q(es)-12 1626 y(not)14 b(create)g(a)g(new)g(string,)g(but)g(returns)g(a)g(p)q(oin)o(ter)h(to)e(a)h (string)g(inside)i(the)e(Lua)h(en)o(vironmen)o(t.)20 b(Because)-12 -1608 y(Lua)c(has)f(garbage)f(collection,)j(there)f(is)f(no)h(guaran)o(tee)e -(that)h(suc)o(h)g(p)q(oin)o(ter)h(will)h(b)q(e)f(v)m(alid)h(after)e(another) --12 1664 y(execution)20 b(of)f(Lua)g(co)q(de.)31 b(The)19 b(function)h -Fj(lua_copystring)d Fm(b)q(eha)o(v)o(es)i(exactly)g(lik)o(e)h -Fj(lua_getstring)p Fm(,)-12 1720 y(but)c(returns)f(a)f(fresh)i(cop)o(y)f(of)g -(the)g(string.)59 1777 y Fj(lua_getcfunction)g Fm(con)o(v)o(erts)i(a)g -Fj(lua_Object)g Fm(to)f(a)i(C)f(function.)28 b(This)18 b Fj(lua_Object)f -Fm(m)o(ust)g(ha)o(v)o(e)-12 1833 y(t)o(yp)q(e)d Fk(Cfunction)s -Fm(;)g(otherwise,)g(the)g(function)h(returns)f(0)g(\(the)g(n)o(ull)h(p)q(oin) -o(ter\).)20 b(The)14 b(t)o(yp)q(e)g Fj(lua_CFunction)-12 1890 -y Fm(is)i(explained)h(in)f(Section)g(5.5.)59 1946 y Fj(lua_getuserdata)k -Fm(con)o(v)o(erts)h(a)h Fj(lua_Object)e Fm(to)i Fj(void*)p -Fm(.)40 b(This)22 b Fj(lua_Object)f Fm(m)o(ust)h(ha)o(v)o(e)f(t)o(yp)q(e)-12 -2003 y Fk(user)n(data)s Fm(;)16 b(otherwise,)f(the)g(function)h(returns)f(0)g -(\(the)g(n)o(ull)i(p)q(oin)o(ter\).)59 2059 y(The)d(rev)o(erse)g(pro)q(cess,) -g(that)f(is,)h(the)g(con)o(v)o(ersion)g(from)g(a)f(sp)q(eci\014c)j(C)e(t)o -(yp)q(e)g(to)f(the)h(t)o(yp)q(e)g Fj(lua_Object)p Fm(,)-12 -2116 y(is)i(done)f(b)o(y)h(using)g(the)f(follo)o(wing)h(functions:)-12 -2209 y Fj(int)286 b(lua_pushnumber)261 b(\(float)23 b(n\);)-12 -2266 y(int)286 b(lua_pushstring)261 b(\(char)23 b(*s\);)-12 -2322 y(int)286 b(lua_pushcfunction)189 b(\(lua_CFunction)22 -b(f\);)-12 2379 y(int)286 b(lua_pushuserdata)213 b(\(void)23 -b(*u\);)-12 2473 y Fm(All)16 b(of)d(them)h(receiv)o(e)h(a)f(C)g(v)m(alue,)h -(con)o(v)o(ert)f(it)g(to)g(a)f Fj(lua_Object)p Fm(,)g(and)h(lea)o(v)o(e)h -(their)f(results)h(on)f(the)g(top)g(of)-12 2529 y(the)h(Lua)f(stac)o(k,)g -(where)g(it)h(can)g(b)q(e)g(assigned)g(to)e(a)h(v)m(ariable,)i(passed)f(as)f -(paramen)o(ter)f(to)h(a)g(Lua)h(function,)-12 2586 y(etc)i(\(see)f(b)q(elo)o -(w\).)24 b(T)l(o)16 b(complete)h(the)f(set,)g(the)h(v)m(alue)g -Fi(nil)h Fm(or)e(a)g Fj(lua_Object)f Fm(can)h(also)h(b)q(e)g(pushed)g(on)o -(to)-12 2642 y(the)e(stac)o(k,)g(with:)-12 2736 y Fj(int)286 -b(lua_pushnil)333 b(\(void\);)-12 2792 y(int)286 b(lua_pushobject)261 -b(\(lua_Object)22 b(object\);)910 2976 y Fm(9)p eop -%%Page: 10 10 -bop -12 160 a Fb(5.3)56 b(Manipulating)18 b(Lua)h(Ob)s(jects)-12 -245 y Fm(T)l(o)c(read)g(the)h(v)m(alue)g(of)f(an)o(y)g(global)g(Lua)h(v)m -(ariable,)g(one)f(can)h(use)f(the)h(function:)-12 338 y Fj(lua_Object)118 -b(lua_getglobal)285 b(\(char)23 b(*varname\);)-12 430 y Fm(T)l(o)15 +1682 y(Lua)14 b(has)f(garbage)f(collection,)k(there)d(is)h(no)f(guaran)o(tee) +g(that)f(suc)o(h)i(p)q(oin)o(ter)g(will)h(b)q(e)f(v)m(alid)h(after)d(the)i +(blo)q(c)o(k)-12 1739 y(ends.)59 1795 y Fl(lua_getcfunction)h +Fn(con)o(v)o(erts)i(a)g Fl(lua_Object)g Fn(to)f(a)i(C)f(function.)28 +b(This)18 b Fl(lua_Object)f Fn(m)o(ust)g(ha)o(v)o(e)-12 1852 +y(t)o(yp)q(e)c Fm(CF)m(unction)s Fn(;)f(otherwise,)i(the)f(function)g +(returns)g(0)g(\(the)f(n)o(ull)j(p)q(oin)o(ter\).)k(The)13 +b(t)o(yp)q(e)g Fl(lua_CFunction)-12 1908 y Fn(is)j(explained)h(in)f(Section)g +(5.5.)59 1965 y Fl(lua_getuserdata)k Fn(con)o(v)o(erts)h(a)h +Fl(lua_Object)e Fn(to)i Fl(void*)p Fn(.)40 b(This)22 b Fl(lua_Object)f +Fn(m)o(ust)h(ha)o(v)o(e)f(t)o(yp)q(e)-12 2021 y Fm(user)n(data)s +Fn(;)16 b(otherwise,)f(the)g(function)h(returns)f(0)g(\(the)g(n)o(ull)i(p)q +(oin)o(ter\).)59 2077 y(The)12 b(rev)o(erse)g(pro)q(cess,)h(that)e(is,)i +(passing)g(a)f(sp)q(eci\014c)i(C)d(v)m(alue)j(to)d(Lua,)i(is)g(done)f(b)o(y)g +(using)h(the)g(follo)o(wing)-12 2134 y(functions:)-12 2228 +y Fl(void)262 b(lua_pushnumber)f(\(double)23 b(n\);)-12 2284 +y(void)262 b(lua_pushstring)f(\(char)23 b(*s\);)-12 2341 y(void)262 +b(lua_pushliteral)237 b(\(char)23 b(*s\);)-12 2397 y(void)262 +b(lua_pushcfunction)189 b(\(lua_CFunction)22 b(f\);)-12 2454 +y(void)262 b(lua_pushusertag)237 b(\(void)23 b(*u,)g(int)h(tag\);)-12 +2547 y Fn(plus)16 b(the)g(macro:)-12 2641 y Fl(void)262 b(lua_pushuserdata) +213 b(\(void)23 b(*u\);)-12 2735 y Fn(All)16 b(of)d(them)h(receiv)o(e)h(a)f +(C)g(v)m(alue,)h(con)o(v)o(ert)f(it)g(to)g(a)f Fl(lua_Object)p +Fn(,)g(and)h(lea)o(v)o(e)h(their)f(results)h(on)f(the)g(top)g(of)-12 +2791 y(the)h(Lua)f(stac)o(k,)g(where)g(it)h(can)g(b)q(e)g(assigned)g(to)e(a)h +(v)m(ariable,)i(passed)f(as)f(paramen)o(ter)f(to)h(a)g(Lua)h(function,)-12 +2848 y(etc)f(\(see)g(b)q(elo)o(w\).)20 b Fl(lua_pushliteral)11 +b Fn(is)k(lik)o(e)g Fl(lua_pushstring)p Fn(,)d(but)i(also)g(puts)f(the)h +(string)g(in)h(the)f(Lua)899 2976 y(11)p eop +%%Page: 12 12 +bop -12 160 a Fn(literal)17 b(table.)k(This)16 b(a)o(v)o(oids)f(the)h(string) +f(to)g(b)q(e)h(garbage)f(collected,)h(and)g(therefore)f(has)h(a)f(b)q(etter)g +(o)o(v)o(erall)-12 216 y(p)q(erformance.)20 b(As)14 b(a)h(rule,)g(when)g(the) +f(string)h(to)e(b)q(e)j(pushed)f(is)g(a)f(literal,)i Fl(lua_pushliteral)c +Fn(should)k(b)q(e)-12 273 y(used.)59 329 y(User)g(data)f(can)i(ha)o(v)o(e)e +(di\013eren)o(t)i(tags,)e(whose)h(seman)o(tics)g(are)g(de\014ned)i(b)o(y)e +(the)g(host)g(program.)21 b(An)o(y)-12 385 y(p)q(ositiv)o(e)e(in)o(teger)f +(can)g(b)q(e)g(used)h(to)e(tag)g(a)g(user)h(data.)27 b(When)18 +b(a)g(user)g(data)f(is)h(retriev)o(ed,)h(the)e(function)-12 +442 y Fl(lua_type)d Fn(can)i(b)q(e)f(used)h(to)f(get)g(its)g(tag.)59 +498 y(T)l(o)d(complete)h(the)g(set,)g(the)f(v)m(alue)i Fk(nil)g +Fn(or)e(a)g Fl(lua_Object)g Fn(can)g(also)h(b)q(e)g(pushed)h(on)o(to)e(the)g +(stac)o(k,)g(with:)-12 588 y Fl(void)262 b(lua_pushnil)333 +b(\(void\);)-12 644 y(void)262 b(lua_pushobject)f(\(lua_Object)22 +b(object\);)-12 765 y Fd(5.3)56 b(Manipulating)18 b(Lua)h(Ob)s(jects)-12 +851 y Fn(T)l(o)c(read)g(the)h(v)m(alue)g(of)f(an)o(y)g(global)g(Lua)h(v)m +(ariable,)g(one)f(can)h(use)f(the)h(function:)-12 940 y Fl(lua_Object)118 +b(lua_getglobal)285 b(\(char)23 b(*varname\);)-12 1029 y Fn(T)l(o)15 b(store)g(a)f(v)m(alue)j(previously)f(pushed)h(on)o(to)d(the)h(stac)o(k)g(in) h(a)f(global)g(v)m(ariable,)i(there)e(is)h(the)f(function:)-12 -523 y Fj(int)286 b(lua_storeglobal)237 b(\(char)23 b(*varname\);)59 -615 y Fm(T)l(ables)16 b(can)f(also)g(b)q(e)h(manipulated)h(via)e(the)g(API.)h -(Giv)o(en)f(a)g(table,)g(the)h(functions)-12 708 y Fj(lua_Object)118 -b(lua_getindexed)261 b(\(lua_Object)22 b(table,)h(float)g(index\);)-12 -764 y(lua_Object)118 b(lua_getfield)309 b(\(lua_Object)22 b(table,)h(char)g -(*field\);)-12 857 y Fm(return)c(the)f(con)o(ten)o(ts)g(of)g(an)h(index.)31 -b(The)19 b(\014rst)f(one)h(is)g(used)g(for)f(n)o(umeric)h(indices,)i(while)f -(the)f(second)-12 913 y(can)d(b)q(e)h(used)f(for)g(an)o(y)f(string)h(index.) -24 b(As)15 b(in)i(Lua,)f(if)h(the)f(index)h(is)f(not)g(presen)o(t)g(in)h(the) -f(table,)g(then)g(the)-12 970 y(returned)g Fj(lua_Object)e -Fm(has)h(v)m(alue)h Fi(nil)p Fm(.)59 1026 y(T)l(o)h(store)f(a)h(v)m(alue,)h -(previously)h(pushed)f(on)o(to)e(the)i(stac)o(k,)e(in)i(a)f(p)q(osition)h(of) -f(a)g(table,)g(the)h(follo)o(wing)-12 1083 y(functions)e(are)f(a)o(v)m -(ailable:)-12 1175 y Fj(int)286 b(lua_storeindexed)213 b(\(lua_Object)22 -b(object,)h(float)g(index\);)-12 1232 y(int)286 b(lua_storefield)261 -b(\(lua_Object)22 b(object,)h(char)g(*field\);)-12 1324 y Fm(Again,)c(the)f -(\014rst)g(one)g(is)g(used)h(for)e(n)o(umeric)i(indices,)i(while)e(the)f -(second)h(can)f(b)q(e)h(used)f(for)g(an)o(y)f(string)-12 1381 -y(index.)-12 1502 y Fb(5.4)56 b(Calling)18 b(Lua)h(F)-5 b(unctions)-12 -1588 y Fm(F)l(unctions)12 b(de\014ned)h(in)f(Lua)g(b)o(y)f(a)h(mo)q(dule)g -(executed)g(with)g Fj(dofile)f Fm(or)g Fj(dostring)f Fm(can)h(b)q(e)i(called) -g(from)d(the)-12 1644 y(host)16 b(program.)23 b(This)17 b(is)g(done)g(using)g -(the)f(follo)o(wing)i(proto)q(col:)k(\014rst,)16 b(the)g(argumen)o(ts)g(to)g -(the)g(function)-12 1701 y(are)k(pushed)i(on)o(to)d(the)i(Lua)g(stac)o(k)e -(\(see)i(Section)g(5.2\),)f(in)i(direct)f(order,)g(i.e.,)g(the)g(\014rst)f -(argumen)o(t)g(is)-12 1757 y(pushed)c(\014rst.)k(Then,)15 b(the)h(function)g -(is)f(called)i(using:)-12 1850 y Fj(int)286 b(lua_call)405 -b(\(char)23 b(*functionname,)f(int)h(nparam\);)-12 1942 y Fm(where)17 -b(the)f(second)h(argumen)o(t)f(\()p Fj(nparam)p Fm(\))f(is)h(the)h(n)o(um)o -(b)q(er)g(of)f(v)m(alues)h(pushed)g(on)o(to)f(the)g(stac)o(k.)23 -b(Finally)l(,)-12 1999 y(the)c(returned)g(v)m(alues)h(\(a)e(Lua)g(function)i -(ma)o(y)e(return)g(man)o(y)g(v)m(alues\))i(are)e(p)q(opp)q(ed)i(from)e(the)h -(stac)o(k)e(in)-12 2055 y(rev)o(erse)e(order,)g(i.e.,)g(the)g(last)g(result)h -(is)f(p)q(opp)q(ed)i(\014rst.)i(P)o(opping)d(is)g(done)f(with)h(the)f -(function)-12 2148 y Fj(lua_Object)118 b(lua_pop)429 b(\(void\);)-12 -2240 y Fm(When)16 b(there)f(are)g(no)g(more)g(results)g(to)g(b)q(e)h(p)q(opp) -q(ed,)g(this)g(function)g(returns)f(0.)59 2297 y(An)g(example)h(of)f(C)g(co)q -(de)h(calling)h(a)e(Lua)g(function)h(is)g(sho)o(wn)f(in)h(7.5.)-12 -2418 y Fb(5.5)56 b(C)19 b(F)-5 b(unctions)-12 2504 y Fm(T)l(o)15 -b(register)g(a)g(C)g(function)h(to)f(Lua,)g(there)g(is)h(the)f(follo)o(wing)h -(macro:)-12 2596 y Fj(#define)23 b(lua_register\(n,f\))165 +1119 y Fl(void)262 b(lua_storeglobal)237 b(\(char)23 b(*varname\);)59 +1208 y Fn(T)l(ables)16 b(can)f(also)g(b)q(e)h(manipulated)h(via)e(the)g(API.) +h(The)f(function)-12 1297 y Fl(lua_Object)118 b(lua_getsubscript)213 +b(\(void\);)-12 1386 y Fn(exp)q(ects)15 b(on)g(the)f(stac)o(k)g(a)g(table)h +(and)g(an)f(index,)i(and)e(returns)h(the)f(con)o(ten)o(ts)g(of)g(the)h(table) +g(at)f(that)f(index.)-12 1443 y(As)22 b(in)h(Lua,)g(if)f(the)g(\014rst)g(ob)s +(ject)f(is)h(not)g(a)f(table,)j(or)d(the)h(index)h(is)g(not)e(presen)o(t)h +(in)h(the)f(table,)h(the)-12 1499 y(corresp)q(onden)o(t)16 +b(fallbac)o(k)g(is)f(called.)59 1556 y(F)l(or)f(compatibilit)o(y)j(with)f +(previous)g(v)o(ersions)f(of)g(the)g(API,)g(the)g(follo)o(wing)h(macros)f +(are)g(supp)q(orted:)-12 1645 y Fl(lua_Object)118 b(lua_getindexed)261 +b(\(lua_Object)22 b(table,)h(float)g(index\);)-12 1702 y(lua_Object)118 +b(lua_getfield)309 b(\(lua_Object)22 b(table,)h(char)g(*field\);)-12 +1791 y Fn(The)16 b(\014rst)e(one)i(is)f(used)h(for)f(n)o(umeric)h(indices,)h +(while)f(the)g(second)f(can)h(b)q(e)g(used)f(for)g(an)o(y)g(string)g(index.) +59 1847 y(T)l(o)h(store)g(a)h(v)m(alue)h(in)g(an)f(index,)h(the)f(program)e +(m)o(ust)i(push)g(on)o(to)f(the)h(stac)o(k)f(the)h(table,)g(the)g(index,)-12 +1904 y(and)f(the)f(v)m(alue,)h(and)f(then)h(call)g(the)f(function:)-12 +1993 y Fl(void)24 b(lua_storesubscript)d(\(void\);)-12 2082 +y Fn(Again,)15 b(the)h(corresp)q(onden)o(t)f(fallbac)o(k)h(is)g(called)h(if)e +(needed.)59 2139 y(Finally)l(,)h(the)g(function)-12 2228 y +Fl(lua_Object)118 b(lua_createtable)237 b(\(void\);)-12 2317 +y Fn(creates)15 b(a)g(new)g(table.)59 2374 y Fm(Ple)n(ase)g(Notic)n(e:)24 +b Fn(Most)15 b(functions)h(from)g(the)f(Lua)i(library)f(receiv)o(e)h +(parameters)e(through)h(the)f(stac)o(k.)-12 2430 y(Because)k(other)f +(functions)h(also)f(use)h(the)f(stac)o(k,)g(it)g(is)h(imp)q(ortan)o(t)f(that) +f(these)i(parameters)e(b)q(e)i(pushed)-12 2487 y(just)c(b)q(efore)g(the)f +(corresp)q(onden)o(t)h(call,)h(without)f(in)o(termediate)g(calls)h(to)e(the)h +(Lua)g(library)l(.)21 b(F)l(or)14 b(instance,)-12 2543 y(supp)q(ose)i(the)f +(user)h(w)o(an)o(ts)e(the)h(v)m(alue)i(of)d Fl(a[i])p Fn(.)20 +b(A)15 b(simplistic)i(solution)f(w)o(ould)g(b)q(e:)36 2632 +y Fl(/*)24 b(Warning:)e(WRONG)h(CODE)h(*/)36 2689 y(lua_Object)e(result;)36 +2745 y(lua_pushobject\(lua_getglo)o(bal\("a"\))o(\);)45 b(/*)23 +b(push)h(table)f(*/)36 2802 y(lua_pushobject\(lua_getglo)o(bal\("i"\))o(\);) +45 b(/*)23 b(push)h(index)f(*/)36 2858 y(result)g(=)h(lua_getsubscript\(\);) +899 2976 y Fn(12)p eop +%%Page: 13 13 +bop -12 160 a Fn(Ho)o(w)o(ev)o(er,)12 b(the)g(call)h Fl(lua_getglobal\("i"\)) +c Fn(mo)q(di\014es)14 b(the)e(stac)o(k,)f(and)h(in)o(v)m(alidates)i(the)e +(previous)h(pushed)-12 216 y(v)m(alue.)21 b(A)16 b(correct)e(solution)i +(could)g(b)q(e:)36 310 y Fl(lua_Object)22 b(index,)h(result;)36 +366 y(index)g(=)h(lua_getglobal\("i"\);)36 423 y(lua_pushobject\(lua_getglo)o +(bal\("a"\))o(\);)45 b(/*)23 b(push)h(table)f(*/)36 479 y +(lua_pushobject\(index\);)355 b(/*)23 b(push)h(index)f(*/)36 +536 y(result)g(=)h(lua_getsubscript\(\);)-12 657 y Fd(5.4)56 +b(Calling)18 b(Lua)h(F)-5 b(unctions)-12 743 y Fn(F)l(unctions)12 +b(de\014ned)h(in)f(Lua)g(b)o(y)f(a)h(mo)q(dule)g(executed)g(with)g +Fl(dofile)f Fn(or)g Fl(dostring)f Fn(can)h(b)q(e)i(called)g(from)d(the)-12 +800 y(host)h(program.)17 b(This)12 b(is)g(done)g(using)g(the)f(follo)o(wing)h +(proto)q(col:)18 b(\014rst,)11 b(the)g(argumen)o(ts)g(to)f(the)i(function)g +(are)-12 856 y(pushed)17 b(on)o(to)e(the)h(Lua)g(stac)o(k)f(\(see)h(Section)g +(5.2\),)f(in)h(direct)h(order,)e(i.e.,)h(the)f(\014rst)h(argumen)o(t)f(is)h +(pushed)-12 913 y(\014rst.)24 b(Again,)18 b(it)f(is)g(imp)q(ortan)o(t)f(to)g +(emphasize)i(that,)e(during)i(this)f(phase,)g(no)g(other)f(Lua)i(function)f +(can)-12 969 y(b)q(e)f(called.)59 1026 y(Then,)f(the)g(function)h(is)g +(called)h(using)-12 1119 y Fl(int)286 b(lua_call)405 b(\(char)23 +b(*functionname\);)-12 1213 y Fn(or)-12 1307 y Fl(int)286 b(lua_callfunction) +213 b(\(lua_Object)22 b(function\);)-12 1401 y Fn(Both)16 b(functions)g +(return)g(an)f(error)g(co)q(de:)21 b(0,)15 b(in)i(case)e(of)g(success;)h(non) +g(zero,)f(in)i(case)f(of)f(errors.)20 b(Finally)l(,)-12 1457 +y(the)15 b(returned)g(v)m(alues)g(\(a)f(Lua)h(function)h(ma)o(y)e(return)g +(man)o(y)g(v)m(alues\))i(can)e(b)q(e)h(retriev)o(ed)g(with)g(the)g(macro)-12 +1551 y Fl(lua_Object)118 b(lua_getresult)309 b(\(int)23 b(number\);)-12 +1645 y(number)15 b Fn(is)g(the)h(order)f(of)f(the)i(result,)f(starting)f +(with)i(1.)k(When)15 b(called)i(with)f(a)f(n)o(um)o(b)q(er)g(larger)g(than)g +(the)-12 1701 y(actual)h(n)o(um)o(b)q(er)f(of)g(results,)g(this)h(function)g +(returns)f Fl(LUA_NOOBJECT)p Fn(.)59 1758 y(Tw)o(o)c(sp)q(ecial)i(Lua)g +(functions)f(ha)o(v)o(e)g(exclusiv)o(e)h(in)o(terfaces:)19 +b Fl(error)11 b Fn(and)h Fl(setfallback)p Fn(.)17 b(A)12 b(C)f(function)-12 +1814 y(can)16 b(generate)e(a)h(Lua)h(error)e(calling)j(the)f(function)-12 +1908 y Fl(void)24 b(lua_error)e(\(char)h(*message\);)-12 2002 +y Fn(This)c(function)h(nev)o(er)e(returns.)30 b(If)19 b(the)g(C)f(function)h +(has)g(b)q(een)g(called)i(from)c(Lua,)j(the)e(corresp)q(onding)-12 +2058 y(Lua)g(execution)h(terminates,)f(as)f(if)i(an)e(error)g(had)h(o)q +(ccured)h(inside)h(Lua)e(co)q(de.)28 b(Otherwise,)19 b(the)f(whole)-12 +2115 y(program)c(terminates.)59 2171 y(F)l(allbac)o(ks)i(can)f(b)q(e)h(c)o +(hanged)f(with:)-12 2265 y Fl(lua_Object)23 b(lua_setfallback)e(\(char)j +(*name,)f(lua_CFunction)f(fallback\);)-12 2359 y Fn(The)17 +b(\014rst)g(parameter)f(is)h(the)g(fallbac)o(k)h(name,)e(and)h(the)g(second)h +(a)e(CF)l(unction)i(to)e(b)q(e)h(used)h(as)e(the)h(new)-12 +2415 y(fallbac)o(k.)32 b(This)19 b(function)h(returns)e(a)h +Fl(lua_Object)p Fn(,)f(whic)o(h)h(is)h(the)f(old)g(fallbac)o(k)h(v)m(alue,)g +(or)e(nil)j(on)d(fail)-12 2472 y(\(in)o(v)m(alid)f(fallbac)o(k)f(name\).)k +(This)c(old)f(v)m(alue)i(can)e(b)q(e)h(used)g(for)e(c)o(haining)j(fallbac)o +(ks.)59 2528 y(An)e(example)h(of)f(C)g(co)q(de)h(calling)h(a)e(Lua)g +(function)h(is)g(sho)o(wn)f(in)h(Section)g(7.6.)899 2976 y(13)p +eop +%%Page: 14 14 +bop -12 160 a Fd(5.5)56 b(C)19 b(F)-5 b(unctions)-12 245 y +Fn(T)l(o)15 b(register)g(a)g(C)g(function)h(to)f(Lua,)g(there)g(is)h(the)f +(follo)o(wing)h(macro:)-12 322 y Fl(#define)23 b(lua_register\(n,f\))165 b(\(lua_pushcfunction\(f\),)21 b(lua_storeglobal\(n\)\))-12 -2653 y(/*)j(char)f(*n;)214 b(*/)-12 2709 y(/*)24 b(lua_CFunction)e(f;)h(*/) --12 2802 y Fm(whic)o(h)d(receiv)o(es)f(the)g(name)g(the)g(function)g(will)i -(ha)o(v)o(e)d(in)h(Lua,)h(and)f(a)f(p)q(oin)o(ter)i(to)e(the)g(function.)32 -b(This)-12 2858 y(p)q(oin)o(ter)16 b(m)o(ust)f(ha)o(v)o(e)f(t)o(yp)q(e)i -Fj(lua_CFunction)p Fm(,)d(whic)o(h)j(is)f(de\014ned)i(as)899 -2976 y(10)p eop -%%Page: 11 11 -bop -12 160 a Fj(typedef)23 b(void)g(\(*lua_CFunction\))f(\(void\);)-12 -253 y Fm(that)15 b(is,)g(a)g(p)q(oin)o(ter)h(to)e(a)h(function)h(with)g(no)f -(parameters)f(and)h(no)h(results.)59 310 y(In)j(order)f(to)g(comm)o(unicate)g +378 y(/*)j(char)f(*n;)214 b(*/)-12 435 y(/*)24 b(lua_CFunction)e(f;)h(*/)-12 +511 y Fn(whic)o(h)d(receiv)o(es)f(the)g(name)g(the)g(function)g(will)i(ha)o +(v)o(e)d(in)h(Lua,)h(and)f(a)f(p)q(oin)o(ter)i(to)e(the)g(function.)32 +b(This)-12 567 y(p)q(oin)o(ter)16 b(m)o(ust)f(ha)o(v)o(e)f(t)o(yp)q(e)i +Fl(lua_CFunction)p Fn(,)d(whic)o(h)j(is)f(de\014ned)i(as)-12 +644 y Fl(typedef)23 b(void)g(\(*lua_CFunction\))f(\(void\);)-12 +720 y Fn(that)15 b(is,)g(a)g(p)q(oin)o(ter)h(to)e(a)h(function)h(with)g(no)f +(parameters)f(and)h(no)h(results.)59 776 y(In)j(order)f(to)g(comm)o(unicate)g (prop)q(erly)i(with)e(Lua,)i(a)e(C)g(function)h(m)o(ust)f(follo)o(w)h(a)f -(proto)q(col,)g(whic)o(h)-12 366 y(de\014nes)e(the)g(w)o(a)o(y)e(parameters)g -(and)i(results)f(are)g(passed.)59 423 y(T)l(o)g(access)g(its)g(argumen)o(ts,) -f(a)h(C)g(function)h(calls:)-12 517 y Fj(lua_Object)118 b(lua_getparam)309 -b(\(int)23 b(number\);)-12 610 y(number)17 b Fm(starts)g(with)h(1)g(to)f(get) -g(the)h(\014rst)g(argumen)o(t.)27 b(When)18 b(called)i(with)e(a)f(n)o(um)o(b) -q(er)i(larger)e(than)h(the)-12 667 y(actual)11 b(n)o(um)o(b)q(er)h(of)e -(argumen)o(ts,)h(this)h(function)f(returns)g(0.)18 b(In)12 -b(this)g(w)o(a)o(y)l(,)e(it)i(is)f(p)q(ossible)i(to)d(write)i(functions)-12 -723 y(that)j(w)o(ork)f(with)h(a)g(v)m(ariable)i(n)o(um)o(b)q(er)e(of)g -(parameters.)59 780 y(T)l(o)i(return)h(v)m(alues,)i(a)d(C)h(function)h(just)f -(pushes)g(them)g(on)o(to)f(the)i(stac)o(k,)e(in)i(direct)g(order;)f(see)h -(Sec-)-12 836 y(tion)d(5.2.)j(Lik)o(e)d(a)f(Lua)g(function,)h(a)f(C)g -(function)h(called)g(b)o(y)g(Lua)f(can)g(also)h(return)f(man)o(y)f(results.) -59 893 y(Section)i(7.4)e(presen)o(ts)h(an)g(example)h(of)f(a)g(Cfunction.)-12 -1014 y Fb(5.6)56 b(Error)18 b(Handling)-12 1100 y Fm(Whenev)o(er)d(an)g -(error)e(o)q(ccurs)i(during)h(Lua)f(compilation)g(or)f(execution,)i(an)e -(error)g(routine)h(is)g(called,)h(and)-12 1157 y(the)f(corresp)q(onding)i -Fj(lua_dofile)c Fm(or)i Fj(lua_dostring)f Fm(is)h(terminated)h(returning)g -(an)f(error)f(condition.)59 1213 y(The)20 b(only)h(argumen)o(t)e(to)h(the)g -(error)g(routine)g(is)h(a)f(string)g(describing)i(the)e(error)g(and)g(some)g -(extra)-12 1270 y(informations,)14 b(lik)o(e)h(curren)o(t)e(line)i(\(when)f -(the)g(error)f(is)h(at)f(compilation\))h(or)f(curren)o(t)h(function)g(\(when) -g(the)-12 1326 y(error)19 b(is)g(at)g(execution\).)33 b(The)19 -b(standard)g(error)f(routine)i(only)g(prin)o(ts)f(this)h(message)e(in)i(the)g -(standard)-12 1383 y(error)15 b(output.)k(If)d(needed,)g(it)f(is)h(p)q -(ossible)h(to)e(set)g(another)f(error)h(routine,)g(using)h(the)f(function:) --12 1476 y Fj(void)262 b(lua_errorfunction)189 b(\(void)23 -b(\(*fn\))g(\(char)g(*s\)\);)-12 1570 y Fm(whose)15 b(argumen)o(t)g(is)g(the) -h(address)f(of)g(the)g(new)g(error)g(function.)-12 1713 y Fl(6)69 -b(Prede\014ned)23 b(F)-6 b(unctions)23 b(and)g(Libraries)-12 -1815 y Fm(The)18 b(set)f(of)g(prede\014ned)i(functions)g(in)f(Lua)g(is)g -(small)g(but)g(p)q(o)o(w)o(erful.)27 b(Most)16 b(of)h(them)h(pro)o(vide)g -(features)-12 1871 y(that)c(allo)o(ws)g(some)g(degree)h(of)f(re\015exivit)o -(y)h(in)g(the)g(language.)20 b(Suc)o(h)15 b(features)f(cannot)g(b)q(e)h(sim)o -(ulated)g(with)-12 1928 y(the)g(rest)g(of)g(the)g(Language)g(nor)g(with)h -(the)f(standard)g(API.)59 1984 y(The)21 b(libraries,)i(on)d(the)h(other)f +(proto)q(col,)g(whic)o(h)-12 833 y(de\014nes)e(the)g(w)o(a)o(y)e(parameters)g +(and)i(results)f(are)g(passed.)59 889 y(T)l(o)g(access)g(its)g(argumen)o(ts,) +f(a)h(C)g(function)h(calls:)-12 965 y Fl(lua_Object)118 b(lua_getparam)309 +b(\(int)23 b(number\);)-12 1042 y(number)17 b Fn(starts)g(with)h(1)g(to)f +(get)g(the)h(\014rst)g(argumen)o(t.)27 b(When)18 b(called)i(with)e(a)f(n)o +(um)o(b)q(er)i(larger)e(than)h(the)-12 1098 y(actual)d(n)o(um)o(b)q(er)g(of)f +(argumen)o(ts,)f(this)j(function)f(returns)f Fl(LUA_NOOBJECT)p +Fn(.)f(In)i(this)g(w)o(a)o(y)l(,)f(it)g(is)i(p)q(ossible)g(to)-12 +1155 y(write)f(functions)h(that)f(w)o(ork)f(with)i(a)f(v)m(ariable)h(n)o(um)o +(b)q(er)g(of)e(parameters.)59 1211 y(T)l(o)j(return)h(v)m(alues,)i(a)d(C)h +(function)h(just)f(pushes)g(them)g(on)o(to)f(the)i(stac)o(k,)e(in)i(direct)g +(order;)f(see)h(Sec-)-12 1268 y(tion)d(5.2.)j(Lik)o(e)d(a)f(Lua)g(function,)h +(a)f(C)g(function)h(called)g(b)o(y)g(Lua)f(can)g(also)h(return)f(man)o(y)f +(results.)59 1324 y(Section)i(7.5)e(presen)o(ts)h(an)g(example)h(of)f(a)g(CF) +l(unction.)-12 1442 y Fd(5.6)56 b(Lo)r(c)n(king)17 b(Lua)i(Ob)s(jects)-12 +1528 y Fn(As)14 b(already)g(noted,)g Fl(lua_Object)p Fn(s)f(are)g(v)o +(olatile.)21 b(If)14 b(the)g(C)g(co)q(de)g(needs)h(to)e(k)o(eep)i(a)e +Fl(lua_Object)g Fn(outside)-12 1585 y(blo)q(c)o(k)f(b)q(oundaries,)g(it)f +(has)g(to)f Fm(lo)n(ck)g Fn(the)h(ob)s(ject.)18 b(The)11 b(routines)g(to)f +(manipulate)i(lo)q(c)o(king)g(are)e(the)h(follo)o(wing:)-12 +1661 y Fl(int)191 b(lua_lock)22 b(\(void\);)-12 1717 y(lua_Object)h +(lua_getlocked)46 b(\(int)23 b(ref\);)-12 1774 y(void)167 b(lua_pushlocked)22 +b(\(int)h(ref\);)-12 1830 y(void)167 b(lua_unlock)22 b(\(int)h(ref\);)-12 +1907 y Fn(The)f(function)h Fl(lua_lock)d Fn(lo)q(c)o(ks)i(the)g(ob)s(ject)f +(whic)o(h)h(are)g(on)f(the)h(top)f(of)g(the)h(stac)o(k,)g(and)g(returns)g(a) +-12 1963 y(reference)g(to)f(it.)37 b(Whenev)o(er)22 b(the)f(lo)q(c)o(k)o(ed)h +(ob)s(ject)f(is)g(needed,)j(a)d(call)h(to)e Fl(lua_getlocked)g +Fn(returns)h(a)-12 2019 y(handle)c(to)f(it,)g(while)h Fl(lua_pushlocked)d +Fn(pushes)j(the)f(handle)h(on)f(the)g(stac)o(k.)22 b(When)16 +b(a)g(lo)q(c)o(k)o(ed)g(ob)s(ject)g(is)-12 2076 y(no)f(longer)h(needed,)g(it) +f(can)h(b)q(e)g(unlo)q(c)o(k)o(ed)g(with)g(a)e(call)j(to)d +Fl(lua_unlock)p Fn(.)-12 2216 y Fo(6)69 b(Prede\014ned)23 b(F)-6 +b(unctions)23 b(and)g(Libraries)-12 2317 y Fn(The)12 b(set)f(of)g +(prede\014ned)i(functions)f(in)g(Lua)g(is)f(small)h(but)g(p)q(o)o(w)o(erful.) +19 b(Most)10 b(of)h(them)g(pro)o(vide)h(features)f(that)-12 +2374 y(allo)o(ws)16 b(some)f(degree)h(of)f(re\015exivit)o(y)h(in)h(the)e +(language.)21 b(Man)o(y)15 b(of)g(these)h(features)f(cannot)g(b)q(e)h(sim)o +(ulated)-12 2430 y(with)g(the)f(rest)g(of)g(the)g(Language)g(nor)g(with)g +(the)h(standard)f(API.)59 2487 y(The)21 b(libraries,)i(on)d(the)h(other)f (hand,)i(pro)o(vide)g(useful)f(routines)g(that)f(are)h(implemen)o(ted)h -(directly)-12 2041 y(through)13 b(the)f(standard)h(API.)f(Therefore,)h(they)g +(directly)-12 2543 y(through)13 b(the)f(standard)h(API.)f(Therefore,)h(they)g (are)f(not)g(necessary)h(to)f(the)h(language,)g(and)g(are)f(pro)o(vided)-12 -2097 y(as)j(separated)g(C)g(mo)q(dules.)21 b(Curren)o(tly)15 -b(there)g(are)g(three)h(libraries:)56 2191 y Fg(\017)23 b Fm(string)15 -b(manipulation;)56 2285 y Fg(\017)23 b Fm(mathematical)15 b(functions)h -(\(sin,)f(cos,)g(etc\);)56 2379 y Fg(\017)23 b Fm(input)16 -b(and)f(output;)-12 2500 y Fb(6.1)56 b(Prede\014ned)18 b(F)-5 -b(unctions)-12 2586 y Fj(dofile)23 b(\(filename\))-12 2672 -y Fm(This)e(function)g(receiv)o(es)g(a)f(\014le)h(name,)g(op)q(ens)f(it)h -(and)f(executes)h(its)f(con)o(ten)o(ts)g(as)f(a)h(Lua)g(mo)q(dule.)36 -b(It)-12 2728 y(returns)15 b(1)g(if)h(there)f(are)g(no)g(errors,)f -Fi(nil)i Fm(otherwise.)899 2976 y(11)p eop -%%Page: 12 12 -bop -12 160 a Fj(dostring)23 b(\(string\))-12 245 y Fm(This)17 -b(function)f(executes)h(a)e(giv)o(en)i(string)e(as)h(a)f(Lua)i(mo)q(dule.)23 -b(It)16 b(returns)f(1)h(if)g(there)g(are)g(no)f(errors,)g Fi(nil)-12 -302 y Fm(otherwise.)-12 422 y Fj(next)24 b(\(table,)e(index\))-12 -508 y Fm(This)16 b(function)h(allo)o(ws)e(a)g(program)g(to)g(en)o(umerate)g -(all)h(\014elds)h(of)e(a)g(table.)21 b(Its)16 b(\014rst)f(argumen)o(t)g(is)h -(a)f(table)-12 564 y(and)i(its)g(second)g(argumen)o(t)f(is)h(an)g(index)g(in) -h(this)f(table;)g(this)g(index)h(can)f(b)q(e)g(a)g(n)o(um)o(b)q(er)g(or)f(a)g -(string.)24 b(It)-12 621 y(returns)15 b(the)f(next)h(index)h(of)e(the)g -(table)h(and)g(the)g(v)m(alue)h(asso)q(ciated)e(with)h(the)g(index.)21 -b(When)15 b(called)h(with)-12 677 y Fi(nil)g Fm(as)e(its)g(second)h(argumen)o -(t,)f(the)g(function)i(returns)e(the)h(\014rst)f(index)i(of)e(the)g(table)h -(\(and)f(its)h(asso)q(ciated)-12 734 y(v)m(alue\).)21 b(When)16 -b(called)g(with)g(the)f(last)g(index,)h(or)f(with)h Fi(nil)g -Fm(in)g(an)f(empt)o(y)g(table,)g(it)h(returns)f Fi(nil)p Fm(.)59 -790 y(In)h(Lua)h(there)f(is)g(no)g(declaration)h(of)e(\014elds;)i(seman)o -(tically)l(,)h(there)e(is)g(no)g(di\013erence)h(b)q(et)o(w)o(een)f(a)g -(\014eld)-12 846 y(not)i(presen)o(t)f(in)i(a)f(table)g(or)f(a)h(\014eld)h -(with)f(v)m(alue)h Fi(nil)p Fm(.)29 b(Therefore,)18 b(the)f(function)i(only)f -(considers)h(\014elds)-12 903 y(with)d(non)f(nil)i(v)m(alues.)k(The)16 -b(order)f(the)g(indices)j(are)d(en)o(umerated)g(are)g(not)g(sp)q(eci\014ed,)i -Fk(even)f(for)g(numeric)-12 959 y(indic)n(es)p Fm(.)59 1016 -y(See)g(Section)g(7.1)e(for)g(an)i(example)g(of)e(the)i(use)f(of)g(this)h -(function.)-12 1136 y Fj(nextvar)23 b(\(name\))-12 1222 y Fm(This)14 -b(function)g(is)g(similar)g(to)e(the)i(function)g Fj(next)p -Fm(,)e(but)i(it)f(iterates)g(o)o(v)o(er)f(the)i(global)f(v)m(ariables.)21 -b(Its)13 b(single)-12 1278 y(argumen)o(t)18 b(is)i(the)f(name)g(of)g(a)f -(global)i(v)m(ariable,)h(or)d Fi(nil)i Fm(to)f(get)f(a)h(\014rst)f(name.)32 -b(Similarly)21 b(to)d Fj(next)p Fm(,)h(it)-12 1335 y(returns)e(the)f(name)h -(of)f(another)g(v)m(ariable)i(and)f(its)g(v)m(alue,)h(or)e -Fi(nil)h Fm(if)h(there)e(are)h(no)f(more)g(v)m(ariables.)26 -b(See)-12 1391 y(Section)16 b(7.1)f(for)f(an)h(example)h(of)f(the)g(use)h(of) -f(this)g(function.)-12 1511 y Fj(print)23 b(\(e1,)h(e2,)f(...\))-12 -1597 y Fm(This)13 b(function)g(receiv)o(es)g(an)o(y)f(n)o(um)o(b)q(er)g(of)g +2600 y(as)j(separated)g(C)g(mo)q(dules.)21 b(Curren)o(tly)15 +b(there)g(are)g(three)h(standard)e(libraries:)56 2676 y Fi(\017)23 +b Fn(string)15 b(manipulation;)56 2763 y Fi(\017)23 b Fn(mathematical)15 +b(functions)h(\(sin,)f(cos,)g(etc\);)56 2849 y Fi(\017)23 b +Fn(input)16 b(and)f(output;)899 2976 y(14)p eop +%%Page: 15 15 +bop -12 160 a Fd(6.1)56 b(Prede\014ned)18 b(F)-5 b(unctions)-12 +245 y Fl(dofile)23 b(\(filename\))-12 331 y Fn(This)e(function)g(receiv)o(es) +g(a)f(\014le)h(name,)g(op)q(ens)f(it)h(and)f(executes)h(its)f(con)o(ten)o(ts) +g(as)f(a)h(Lua)g(mo)q(dule.)36 b(It)-12 388 y(returns)15 b(1)g(if)h(there)f +(are)g(no)g(errors,)f Fk(nil)i Fn(otherwise.)-12 508 y Fl(dostring)23 +b(\(string\))-12 594 y Fn(This)17 b(function)f(executes)h(a)e(giv)o(en)i +(string)e(as)h(a)f(Lua)i(mo)q(dule.)23 b(It)16 b(returns)f(1)h(if)g(there)g +(are)g(no)f(errors,)g Fk(nil)-12 650 y Fn(otherwise.)-12 770 +y Fl(next)24 b(\(table,)e(index\))-12 856 y Fn(This)16 b(function)h(allo)o +(ws)e(a)g(program)g(to)g(en)o(umerate)g(all)h(\014elds)h(of)e(a)g(table.)21 +b(Its)16 b(\014rst)f(argumen)o(t)g(is)h(a)f(table)-12 912 y(and)i(its)g +(second)g(argumen)o(t)f(is)h(an)g(index)g(in)h(this)f(table;)g(this)g(index)h +(can)f(b)q(e)g(a)g(n)o(um)o(b)q(er)g(or)f(a)g(string.)24 b(It)-12 +969 y(returns)15 b(the)f(next)h(index)h(of)e(the)g(table)h(and)g(the)g(v)m +(alue)h(asso)q(ciated)e(with)h(the)g(index.)21 b(When)15 b(called)h(with)-12 +1025 y Fk(nil)g Fn(as)e(its)g(second)h(argumen)o(t,)f(the)g(function)i +(returns)e(the)h(\014rst)f(index)i(of)e(the)g(table)h(\(and)f(its)h(asso)q +(ciated)-12 1082 y(v)m(alue\).)21 b(When)16 b(called)g(with)g(the)f(last)g +(index,)h(or)f(with)h Fk(nil)g Fn(in)g(an)f(empt)o(y)g(table,)g(it)h(returns) +f Fk(nil)p Fn(.)59 1138 y(In)h(Lua)h(there)f(is)g(no)g(declaration)h(of)e +(\014elds;)i(seman)o(tically)l(,)h(there)e(is)g(no)g(di\013erence)h(b)q(et)o +(w)o(een)f(a)g(\014eld)-12 1195 y(not)i(presen)o(t)f(in)i(a)f(table)g(or)f(a) +h(\014eld)h(with)f(v)m(alue)h Fk(nil)p Fn(.)29 b(Therefore,)18 +b(the)f(function)i(only)f(considers)h(\014elds)-12 1251 y(with)d(non)f(nil)i +(v)m(alues.)k(The)16 b(order)f(the)g(indices)j(are)d(en)o(umerated)g(are)g +(not)g(sp)q(eci\014ed,)i Fm(even)f(for)g(numeric)-12 1308 y(indic)n(es)p +Fn(.)59 1364 y(See)g(Section)g(7.1)e(for)g(an)i(example)g(of)e(the)i(use)f +(of)g(this)h(function.)-12 1484 y Fl(nextvar)23 b(\(name\))-12 +1570 y Fn(This)14 b(function)g(is)g(similar)g(to)e(the)i(function)g +Fl(next)p Fn(,)e(but)i(it)f(iterates)g(o)o(v)o(er)f(the)i(global)f(v)m +(ariables.)21 b(Its)13 b(single)-12 1626 y(argumen)o(t)18 b(is)i(the)f(name)g +(of)g(a)f(global)i(v)m(ariable,)h(or)d Fk(nil)i Fn(to)f(get)f(a)h(\014rst)f +(name.)32 b(Similarly)21 b(to)d Fl(next)p Fn(,)h(it)-12 1683 +y(returns)e(the)f(name)h(of)f(another)g(v)m(ariable)i(and)f(its)g(v)m(alue,)h +(or)e Fk(nil)h Fn(if)h(there)e(are)h(no)f(more)g(v)m(ariables.)26 +b(See)-12 1739 y(Section)16 b(7.1)f(for)f(an)h(example)h(of)f(the)g(use)h(of) +f(this)g(function.)-12 1859 y Fl(print)23 b(\(e1,)h(e2,)f(...\))-12 +1945 y Fn(This)13 b(function)g(receiv)o(es)g(an)o(y)f(n)o(um)o(b)q(er)g(of)g (argumen)o(ts,)g(and)g(prin)o(ts)g(their)h(v)m(alues)h(in)f(a)e(reasonable)i -(format.)-12 1653 y(Eac)o(h)h(v)m(alue)i(is)e(prin)o(ted)h(in)g(a)f(new)h +(format.)-12 2002 y(Eac)o(h)h(v)m(alue)i(is)e(prin)o(ted)h(in)g(a)f(new)h (line.)21 b(This)15 b(function)g(is)f(not)g(in)o(tended)i(for)e(formatted)f -(output,)g(but)i(as)-12 1710 y(a)g(quic)o(k)h(w)o(a)o(y)e(to)h(sho)o(w)g(a)g +(output,)g(but)i(as)-12 2058 y(a)g(quic)o(k)h(w)o(a)o(y)e(to)h(sho)o(w)g(a)g (v)m(alue,)h(for)f(instance)h(for)e(error)h(messages)g(or)f(debugging.)22 -b(See)15 b(Section)i(6.4)d(for)-12 1766 y(functions)i(for)f(formatted)f -(output.)-12 1886 y Fj(tonumber)23 b(\(e\))-12 1972 y Fm(This)18 +b(See)15 b(Section)i(6.4)d(for)-12 2114 y(functions)i(for)f(formatted)f +(output.)-12 2235 y Fl(tonumber)23 b(\(e\))-12 2320 y Fn(This)18 b(function)g(receiv)o(es)f(one)g(argumen)o(t,)g(and)g(tries)g(to)f(con)o(v)o (ert)h(it)g(to)f(a)h(n)o(um)o(b)q(er.)25 b(If)18 b(the)f(argumen)o(t)f(is)-12 -2029 y(already)e(a)f(n)o(um)o(b)q(er)h(or)f(a)g(string)g(con)o(v)o(ertible)h +2377 y(already)e(a)f(n)o(um)o(b)q(er)h(or)f(a)g(string)g(con)o(v)o(ertible)h (to)f(a)g(n)o(um)o(b)q(er)h(\(see)f(Section)i(4.2\),)d(it)h(returns)h(that)e -(n)o(um)o(b)q(er;)-12 2085 y(otherwise,)j(it)h(returns)f Fi(nil)p -Fm(.)-12 2205 y Fj(type)24 b(\(v\))-12 2291 y Fm(This)16 b(function)g(allo)o +(n)o(um)o(b)q(er;)-12 2433 y(otherwise,)j(it)h(returns)f Fk(nil)p +Fn(.)-12 2553 y Fl(type)24 b(\(v\))-12 2639 y Fn(This)16 b(function)g(allo)o (ws)f(Lua)h(to)e(test)h(the)g(t)o(yp)q(e)g(of)g(a)f(v)m(alue.)21 b(It)16 b(receiv)o(es)g(one)f(argumen)o(t,)f(and)h(returns)g(its)-12 -2347 y(t)o(yp)q(e,)g(co)q(ded)h(as)f(a)g(string.)20 b(The)15 -b(p)q(ossible)i(results)f(of)e(this)i(function)g(are:)56 2441 -y Fg(\017)23 b Fj('nil')56 2535 y Fg(\017)g Fj('number')56 -2629 y Fg(\017)g Fj('string')56 2723 y Fg(\017)g Fj('table')56 -2817 y Fg(\017)g Fj('cfunction')899 2976 y Fm(12)p eop -%%Page: 13 13 -bop 56 160 a Fg(\017)23 b Fj('function')56 253 y Fg(\017)g -Fj('userdata')-12 375 y Fb(6.2)56 b(String)18 b(Manipulation)-12 -461 y Fm(This)e(library)f(pro)o(vides)h(generic)g(functions)f(for)f(string)h -(manipulation,)h(suc)o(h)g(as)e(\014nding)i(and)f(extracting)-12 -517 y(substrings.)20 b(When)14 b(indexing)h(a)e(string,)g(the)h(\014rst)f(c)o -(haracter)f(has)i(p)q(osition)g(1.)19 b(See)14 b(Section)g(7.2)f(for)g(some) --12 574 y(examples)j(on)f(string)g(manipulation)i(in)f(Lua.)-12 -694 y Fj(strfind)23 b(\(str,)g(substr\))-12 780 y Fm(Receiv)o(es)15 -b(t)o(w)o(o)d(string)i(argumen)o(ts,)e(and)i(returns)f(a)g(n)o(um)o(b)q(er.) -20 b(This)14 b(n)o(um)o(b)q(er)g(indicates)h(the)e(\014rst)g(p)q(osition)-12 -836 y(where)20 b(the)f(second)h(argumen)o(t)e(app)q(ears)i(in)g(the)f +2696 y(t)o(yp)q(e,)h(co)q(ded)g(as)g(a)f(string.)21 b(The)16 +b(p)q(ossible)i(results)e(of)f(this)h(function)g(are)g Fl('nil')p +Fn(,)f Fl('number')p Fn(,)f Fl('string')p Fn(,)-12 2752 y Fl('table')p +Fn(,)g Fl('cfunction')p Fn(,)f Fl('function')p Fn(,)h(and)h +Fl('userdata')p Fn(.)899 2976 y(15)p eop +%%Page: 16 16 +bop -12 160 a Fl(error)23 b(\(message\))-12 245 y Fn(This)16 +b(function)h(issues)f(an)f(error)g(message)g(and)h(terminates)g(the)f(last)h +(called)h(function)f(from)f(the)h(library)-12 302 y(\()p Fl(lua_dofile)p +Fn(,)d Fl(lua_dostring)p Fn(,)g Fc(:)8 b(:)g(:)e Fn(\).)20 +b(It)15 b(nev)o(er)g(returns.)-12 422 y Fl(setglobal)23 b(\(name,)g(value\)) +-12 508 y Fn(This)18 b(function)g(assigns)g(the)f(giv)o(en)h(v)m(alue)h(to)d +(a)h(global)i(v)m(ariable.)27 b(The)18 b(string)f Fl(name)g +Fn(do)q(es)h(not)f(need)h(to)-12 564 y(b)q(e)g(a)f(syn)o(tactically)h(v)m +(alid)h(v)m(ariable)g(name.)26 b(Therefore,)18 b(this)g(function)g(can)f(set) +g(global)h(v)m(ariables)h(with)-12 621 y(strange)c(names)g(lik)o(e)h +Fl(m)24 b(v)g(1)15 b Fn(or)f Fl(34)p Fn(.)-12 741 y Fl(getglobal)23 +b(\(name\))-12 827 y Fn(This)18 b(function)f(retriev)o(es)g(the)g(v)m(alue)h +(of)f(a)f(global)i(v)m(ariable.)26 b(The)17 b(string)g Fl(name)f +Fn(do)q(es)i(not)e(need)i(to)e(b)q(e)i(a)-12 883 y(syn)o(tactically)e(v)m +(alid)h(v)m(ariable)g(name.)-12 1003 y Fl(setfallback)23 b(\(fallbackname,)e +(newfallback\))-12 1089 y Fn(This)f(function)g(sets)f(a)g(new)g(fallbac)o(k)h +(function)g(to)e(the)h(giv)o(en)h(fallbac)o(k.)32 b(It)20 b(returns)f(the)g +(old)h(fallbac)o(k)-12 1145 y(function,)c(or)f(nil)h(in)g(case)f(of)g(error)g +(\(in)o(v)m(alid)i(fallbac)o(k)f(name,)f(or)f Fl(newfallback)g +Fn(is)i(not)e(a)h(function\).)-12 1267 y Fd(6.2)56 b(String)18 +b(Manipulation)-12 1353 y Fn(This)e(library)f(pro)o(vides)h(generic)g +(functions)f(for)f(string)h(manipulation,)h(suc)o(h)g(as)e(\014nding)i(and)f +(extracting)-12 1409 y(substrings.)20 b(When)14 b(indexing)h(a)e(string,)g +(the)h(\014rst)f(c)o(haracter)f(has)i(p)q(osition)g(1.)19 b(See)14 +b(Section)g(7.2)f(for)g(some)-12 1466 y(examples)j(on)f(string)g +(manipulation)i(in)f(Lua.)-12 1586 y Fl(strfind)23 b(\(str,)g(substr,)g +([init,)g([end]]\))-12 1672 y Fn(Receiv)o(es)15 b(t)o(w)o(o)d(string)i +(argumen)o(ts,)e(and)i(returns)f(a)g(n)o(um)o(b)q(er.)20 b(This)14 +b(n)o(um)o(b)q(er)g(indicates)h(the)e(\014rst)g(p)q(osition)-12 +1728 y(where)20 b(the)f(second)h(argumen)o(t)e(app)q(ears)i(in)g(the)f (\014rst)g(argumen)o(t.)31 b(If)19 b(the)h(second)g(argumen)o(t)e(is)i(not)f -(a)-12 893 y(substring)d(of)f(the)g(\014rst)g(one,)g(then)g -Fj(strfind)f Fm(returns)h Fi(nil)p Fm(.)-12 1013 y Fj(strlen)23 -b(\(s\))-12 1099 y Fm(Receiv)o(es)17 b(a)e(string)g(and)g(returns)g(its)h -(length.)-12 1219 y Fj(strsub)23 b(\(s,)h(i,)f(j\))-12 1304 -y Fm(Returns)13 b(another)f(string,)h(whic)o(h)g(is)g(a)f(substring)h(of)f -Fj(s)p Fm(,)h(starting)f(at)g Fj(i)g Fm(and)h(runing)g(un)o(til)h -Fj(j)p Fm(.)k(If)13 b Fj(j)g Fm(is)g(absen)o(t)-12 1361 y(or)18 -b(is)g Fi(nil)p Fm(,)i(it)e(is)g(assumed)h(to)e(b)q(e)i(equal)g(to)e(the)h -(length)h(of)e Fj(s)p Fm(.)29 b(P)o(articularly)l(,)19 b(the)f(call)h -Fj(strsub\(s,1,j\))-12 1417 y Fm(returns)c(a)g(pre\014x)h(of)f -Fj(s)g Fm(with)g(length)h Fj(j)p Fm(,)f(while)h(the)g(call)g -Fj(strsub\(s,i\))e Fm(returns)h(a)g(su\014x)g(of)g Fj(s)p Fm(.)-12 -1537 y Fj(strlower)23 b(\(s\))-12 1623 y Fm(Receiv)o(es)16 -b(a)d(string)i(and)f(returns)g(a)f(cop)o(y)h(of)g(that)f(string)h(with)h(all) -g(upp)q(er)g(case)f(letters)g(c)o(hanged)g(to)g(lo)o(w)o(er)-12 -1680 y(case.)20 b(All)d(other)d(c)o(haracters)h(are)g(left)g(unc)o(hanged.) --12 1800 y Fj(strupper)23 b(\(s\))-12 1886 y Fm(Receiv)o(es)16 +(a)-12 1785 y(substring)i(of)f(the)g(\014rst)g(one,)i(then)e +Fl(strfind)g Fn(returns)g Fk(nil)p Fn(.)36 b(A)21 b(third)g(optional)f(n)o +(umerical)i(argumen)o(t)-12 1841 y(sp)q(eci\014es)e(where)f(to)f(start)f(the) +i(searc)o(h.)29 b(Another)19 b(optional)g(n)o(umerical)g(argumen)o(t)f(sp)q +(eci\014es)i(where)f(to)-12 1897 y(stop)c(it.)-12 2018 y Fl(strlen)23 +b(\(s\))-12 2103 y Fn(Receiv)o(es)17 b(a)e(string)g(and)g(returns)g(its)h +(length.)-12 2223 y Fl(strsub)23 b(\(s,)h(i,)f(j\))-12 2309 +y Fn(Returns)13 b(another)f(string,)h(whic)o(h)g(is)g(a)f(substring)h(of)f +Fl(s)p Fn(,)h(starting)f(at)g Fl(i)g Fn(and)h(runing)g(un)o(til)h +Fl(j)p Fn(.)k(If)13 b Fl(j)g Fn(is)g(absen)o(t)-12 2366 y(or)18 +b(is)g Fk(nil)p Fn(,)i(it)e(is)g(assumed)h(to)e(b)q(e)i(equal)g(to)e(the)h +(length)h(of)e Fl(s)p Fn(.)29 b(P)o(articularly)l(,)19 b(the)f(call)h +Fl(strsub\(s,1,j\))-12 2422 y Fn(returns)e(a)f(pre\014x)i(of)e +Fl(s)h Fn(with)g(length)g Fl(j)p Fn(,)g(while)h(the)f(call)h +Fl(strsub\(s,i\))d Fn(returns)i(a)f(su\016x)h(of)f Fl(s)p Fn(,)h(starting)-12 +2479 y(at)e Fl(i)p Fn(..)-12 2599 y Fl(strlower)23 b(\(s\))-12 +2684 y Fn(Receiv)o(es)16 b(a)d(string)i(and)f(returns)g(a)f(cop)o(y)h(of)g +(that)f(string)h(with)h(all)g(upp)q(er)g(case)f(letters)g(c)o(hanged)g(to)g +(lo)o(w)o(er)-12 2741 y(case.)20 b(All)d(other)d(c)o(haracters)h(are)g(left)g +(unc)o(hanged.)899 2976 y(16)p eop +%%Page: 17 17 +bop -12 160 a Fl(strupper)23 b(\(s\))-12 245 y Fn(Receiv)o(es)16 b(a)d(string)i(and)f(returns)g(a)f(cop)o(y)h(of)g(that)f(string)h(with)h(all) g(lo)o(w)o(er)e(case)h(letters)h(c)o(hanged)f(to)f(upp)q(er)-12 -1942 y(case.)20 b(All)d(other)d(c)o(haracters)h(are)g(left)g(unc)o(hanged.) --12 2064 y Fb(6.3)56 b(Mathematical)16 b(F)-5 b(unctions)-12 -2149 y Fm(This)17 b(library)g(is)f(an)g(in)o(terface)h(to)e(some)h(functions) -g(of)g(the)g(standard)g(C)g(math)f(library)l(.)24 b(It)16 b(pro)o(vides)g -(the)-12 2206 y(follo)o(wing)g(functions:)-12 2300 y Fj(abs)48 -b(acos)23 b(asin)g(atan)g(ceil)h(cos)f(floor)g(max)h(min)-12 -2356 y(mod)48 b(pow)f(sin)g(sqrt)23 b(tan)59 2450 y Fm(The)f(functions)h -Fj(floor)p Fm(,)f Fj(sqrt)p Fm(,)h Fj(pow)p Fm(,)f Fj(ceil)p -Fm(,)h Fj(sin)p Fm(,)g Fj(cos)p Fm(,)g Fj(tan)p Fm(,)f Fj(asin)p -Fm(,)h Fj(acos)p Fm(,)g(and)f Fj(atan)f Fm(are)h(only)-12 2506 -y(in)o(terfaces)h(to)f(the)h(homon)o(ymous)f(functions)i(in)f(the)g(C)g -(library)l(,)i(with)e(the)g(di\013erence)h(that,)g(in)f(the)-12 -2563 y(trigonometric)15 b(functions,)h(all)g(angles)g(are)e(expressed)i(in)g -(degrees.)59 2619 y(The)d(function)g Fj(max)g Fm(returns)f(the)h(maxim)o(um)g -(v)m(alue)h(in)f(a)g(list)g(of)g(n)o(umeric)g(argumen)o(ts.)19 -b(Similarly)l(,)c Fj(min)-12 2676 y Fm(computes)g(the)h(minim)o(um.)21 -b(Both)15 b(can)g(b)q(e)h(used)g(with)f(an)g(unlimited)j(n)o(um)o(b)q(er)d -(of)g(argumen)o(ts.)59 2732 y(The)g(function)h Fj(mod)f Fm(is)h(equiv)m(alen) -o(t)h(to)d(the)h Fj(\045)g Fm(op)q(erator)g(in)h(C.)899 2976 -y(13)p eop -%%Page: 14 14 -bop -12 160 a Fb(6.4)56 b(I/O)18 b(F)-5 b(acilities)-12 245 -y Fm(All)16 b(I/O)g(op)q(erations)f(in)h(Lua)f(are)g(done)g(o)o(v)o(er)f(t)o -(w)o(o)g Fk(curr)n(ent)h Fm(\014les,)g(one)h(for)e(reading)i(and)f(one)g(for) -f(writing.)-12 302 y(Initially)l(,)k(the)d(curren)o(t)g(input)h(\014le)h(is)e -Fj(stdin)p Fm(,)f(and)i(the)f(curren)o(t)g(output)g(\014le)h(is)g -Fj(stdout)p Fm(.)59 358 y(Unless)g(otherwised)g(stated,)e(all)i(I/O)g -(functions)g(return)f(1)g(on)g(success)h(and)f Fi(nil)h Fm(on)f(failure.)-12 -477 y Fj(readfrom)23 b(\(filename\))-12 563 y Fm(This)17 b(function)g(op)q -(ens)g(a)f(\014le)h(named)g Fj(filename)e Fm(and)i(sets)f(it)g(as)g(the)g -Fk(curr)n(ent)h Fm(input)g(\014le.)24 b(When)17 b(called)-12 -620 y(without)e(parameters,)f(this)i(function)g(restores)e -Fj(stdin)h Fm(as)g(the)g(curren)o(t)g(input)h(\014le.)-12 739 -y Fj(writeto)23 b(\(filename\))-12 825 y Fm(This)16 b(function)g(op)q(ens)g -(a)f(\014le)h(named)f Fj(filename)f Fm(and)i(sets)e(it)i(as)f(the)g -Fk(curr)n(ent)g Fm(output)g(\014le.)21 b(Notice)15 b(that,)-12 -881 y(if)21 b(the)g(\014le)g(already)g(exists,)h(it)f(is)g(completely)h +302 y(case.)20 b(All)d(other)d(c)o(haracters)h(are)g(left)g(unc)o(hanged.)-12 +424 y Fd(6.3)56 b(Mathematical)16 b(F)-5 b(unctions)-12 509 +y Fn(This)20 b(library)f(is)h(an)f(in)o(terface)g(to)f(some)h(functions)h(of) +e(the)h(standard)g(C)f(math)h(library)l(.)32 b(Moreo)o(v)o(er,)18 +b(it)-12 566 y(registers)d(a)f(fallbac)o(k)h(for)f(the)h(binary)g(op)q +(erator)f Fl(^)h Fn(whic)o(h,)g(when)g(applied)i(to)d(n)o(um)o(b)q(ers)h +Fl(x^y)p Fn(,)e(returns)i Fc(x)1821 549 y Fb(y)1842 566 y Fn(.)59 +622 y(The)g(library)h(pro)o(vides)g(the)f(follo)o(wing)h(functions:)-12 +716 y Fl(abs)24 b(acos)f(asin)g(atan)h(ceil)f(cos)g(floor)h(log)f(log10)-12 +773 y(max)h(min)47 b(mod)g(sin)h(sqrt)23 b(tan)-12 866 y Fn(Most)16 +b(of)g(them)h(are)g(only)g(in)o(terfaces)g(to)f(the)h(homon)o(ymous)f +(functions)i(in)g(the)f(C)f(library)l(,)i(except)f(that,)-12 +923 y(for)e(the)g(trigonometric)g(functions,)h(all)g(angles)f(are)g +(expressed)h(in)g(degrees.)59 979 y(The)d(function)g Fl(max)g +Fn(returns)f(the)h(maxim)o(um)g(v)m(alue)h(in)f(a)g(list)g(of)g(n)o(umeric)g +(argumen)o(ts.)19 b(Similarly)l(,)c Fl(min)-12 1036 y Fn(computes)g(the)h +(minim)o(um.)21 b(Both)15 b(can)g(b)q(e)h(used)g(with)f(an)g(unlimited)j(n)o +(um)o(b)q(er)d(of)g(argumen)o(ts.)59 1092 y(The)g(function)h +Fl(mod)f Fn(is)h(equiv)m(alen)o(t)h(to)d(the)h Fl(\045)g Fn(op)q(erator)g(in) +h(C.)-12 1214 y Fd(6.4)56 b(I/O)18 b(F)-5 b(acilities)-12 1300 +y Fn(All)16 b(I/O)g(op)q(erations)f(in)h(Lua)f(are)g(done)g(o)o(v)o(er)f(t)o +(w)o(o)g Fm(curr)n(ent)h Fn(\014les,)g(one)h(for)e(reading)i(and)f(one)g(for) +f(writing.)-12 1356 y(Initially)l(,)k(the)d(curren)o(t)g(input)h(\014le)h(is) +e Fl(stdin)p Fn(,)f(and)i(the)f(curren)o(t)g(output)g(\014le)h(is)g +Fl(stdout)p Fn(.)59 1413 y(Unless)g(otherwised)g(stated,)e(all)i(I/O)g +(functions)g(return)f(1)g(on)g(success)h(and)f Fk(nil)h Fn(on)f(failure.)-12 +1533 y Fl(readfrom)23 b(\(filename\))-12 1619 y Fn(This)17 +b(function)g(op)q(ens)g(a)f(\014le)h(named)g Fl(filename)e +Fn(and)i(sets)f(it)g(as)g(the)g Fm(curr)n(ent)h Fn(input)g(\014le.)24 +b(When)17 b(called)-12 1675 y(without)e(parameters,)f(this)i(function)g +(restores)e Fl(stdin)h Fn(as)g(the)g(curren)o(t)g(input)h(\014le.)-12 +1795 y Fl(writeto)23 b(\(filename\))-12 1881 y Fn(This)16 b(function)g(op)q +(ens)g(a)f(\014le)h(named)f Fl(filename)f Fn(and)i(sets)e(it)i(as)f(the)g +Fm(curr)n(ent)g Fn(output)g(\014le.)21 b(Notice)15 b(that,)-12 +1937 y(if)21 b(the)g(\014le)g(already)g(exists,)h(it)f(is)g(completely)h (erased)e(with)h(this)g(op)q(eration.)36 b(When)21 b(called)h(without)-12 -938 y(parameters,)14 b(this)i(function)g(restores)e Fj(stdout)h -Fm(as)f(the)i(curren)o(t)f(output)g(\014le.)-12 1057 y Fj(appendto)23 -b(\(filename\))-12 1143 y Fm(This)18 b(function)g(op)q(ens)f(a)g(\014le)h -(named)f Fj(filename)f Fm(and)h(sets)g(it)g(as)g(the)g Fk(curr)n(ent)g -Fm(output)f(\014le.)27 b(Unlik)o(e)18 b(the)-12 1199 y Fj(writeto)d -Fm(op)q(eration,)h(this)g(function)g(do)q(es)g(not)g(erase)f(an)o(y)h +1994 y(parameters,)14 b(this)i(function)g(restores)e Fl(stdout)h +Fn(as)f(the)i(curren)o(t)f(output)g(\014le.)-12 2114 y Fl(appendto)23 +b(\(filename\))-12 2200 y Fn(This)18 b(function)g(op)q(ens)f(a)g(\014le)h +(named)f Fl(filename)f Fn(and)h(sets)g(it)g(as)g(the)g Fm(curr)n(ent)g +Fn(output)f(\014le.)27 b(Unlik)o(e)18 b(the)-12 2256 y Fl(writeto)d +Fn(op)q(eration,)h(this)g(function)g(do)q(es)g(not)g(erase)f(an)o(y)h (previous)g(con)o(ten)o(t)f(of)g(the)h(\014le.)23 b(When)16 -b(called)-12 1255 y(without)j(parameters,)g(this)h(function)g(restores)f -Fj(stdout)f Fm(as)h(the)g(curren)o(t)g(output)h(\014le.)33 -b(This)19 b(function)-12 1312 y(returns)c(2)g(if)h(the)f(\014le)h(already)g +b(called)-12 2313 y(without)j(parameters,)g(this)h(function)g(restores)f +Fl(stdout)f Fn(as)h(the)g(curren)o(t)g(output)h(\014le.)33 +b(This)19 b(function)-12 2369 y(returns)c(2)g(if)h(the)f(\014le)h(already)g (exists,)f(1)g(if)g(it)h(creates)f(a)g(new)g(\014le,)h(and)f -Fi(nil)i Fm(on)e(failure.)-12 1431 y Fj(read)24 b(\([format]\))-12 -1517 y Fm(This)12 b(function)g(returns)e(a)h(v)m(alue)h(read)f(from)f(the)h +Fk(nil)i Fn(on)e(failure.)-12 2489 y Fl(read)24 b(\([format]\))-12 +2575 y Fn(This)12 b(function)g(returns)e(a)h(v)m(alue)h(read)f(from)f(the)h (curren)o(t)g(input.)20 b(An)11 b(optional)g(string)g(argumen)o(t)f(sp)q -(eci\014es)-12 1573 y(the)15 b(w)o(a)o(y)g(the)g(input)h(is)g(in)o -(terpreted.)59 1630 y(Without)j(a)g(format)e(argumen)o(t,)i -Fj(read)g Fm(\014rst)g(skips)h(blanks,)g(tabs)f(and)g(newlines.)34 -b(Then)20 b(it)f(c)o(hec)o(ks)-12 1686 y(whether)g(the)h(curren)o(t)e(c)o -(haracter)h(is)g Fj(")g Fm(or)g Fj(')p Fm(.)31 b(If)19 b(so,)g(it)h(reads)f -(a)f(string)h(up)h(to)e(the)h(ending)i(quotation)-12 1743 y(mark,)14 +(eci\014es)-12 2631 y(the)15 b(w)o(a)o(y)g(the)g(input)h(is)g(in)o +(terpreted.)59 2688 y(Without)j(a)g(format)e(argumen)o(t,)i +Fl(read)g Fn(\014rst)g(skips)h(blanks,)g(tabs)f(and)g(newlines.)34 +b(Then)20 b(it)f(c)o(hec)o(ks)-12 2744 y(whether)g(the)h(curren)o(t)e(c)o +(haracter)h(is)g Fl(")g Fn(or)g Fl(')p Fn(.)31 b(If)19 b(so,)g(it)h(reads)f +(a)f(string)h(up)h(to)e(the)h(ending)i(quotation)-12 2801 y(mark,)14 b(and)h(returns)f(this)h(string,)g(without)f(the)h(quotation)f(marks.)19 -b(Otherwise)d(it)f(reads)f(up)h(to)g(a)f(blank,)-12 1799 y(tab)h(or)g -(newline.)59 1856 y(The)g(format)f(string)h(can)h(ha)o(v)o(e)e(the)i(follo)o -(wing)g(format:)60 1945 y Fj(?[n])-12 2033 y Fm(where)g Fj(?)f -Fm(can)g(b)q(e:)-12 2122 y Fi('s')h(or)h('S')22 b Fm(to)15 -b(read)g(a)g(string;)-12 2214 y Fi('f)5 b(')17 b(or)g('F')k -Fm(to)15 b(read)g(a)g(real)g(n)o(um)o(b)q(er;)-12 2306 y Fi('i')i(or)g('I')22 -b Fm(to)14 b(read)i(an)f(in)o(teger.)-12 2395 y(The)g(optional)g -Fj(n)f Fm(is)h(a)g(n)o(um)o(b)q(er)f(whic)o(h)i(sp)q(eci\014es)g(ho)o(w)e -(man)o(y)g(c)o(haracters)g(m)o(ust)g(b)q(e)h(read)g(to)f(comp)q(ose)g(the)-12 -2451 y(input)i(v)m(alue.)-12 2571 y Fj(write)23 b(\(value,)g([format]\))-12 -2656 y Fm(This)16 b(function)g(writes)f(the)h(v)m(alue)g(of)f(its)g(\014rst)g +b(Otherwise)d(it)f(reads)f(up)h(to)g(a)f(blank,)-12 2857 y(tab)h(or)g +(newline.)899 2976 y(17)p eop +%%Page: 18 18 +bop 59 160 a Fn(The)15 b(format)f(string)h(can)h(ha)o(v)o(e)e(the)i(follo)o +(wing)g(format:)60 253 y Fl(?[n])-12 347 y Fn(where)g Fl(?)f +Fn(can)g(b)q(e:)-12 441 y Fk('s')h(or)h('S')22 b Fn(to)15 b(read)g(a)g +(string;)-12 535 y Fk('f)5 b(')17 b(or)g('F')k Fn(to)15 b(read)g(a)g(real)g +(n)o(um)o(b)q(er;)-12 629 y Fk('i')i(or)g('I')22 b Fn(to)14 +b(read)i(an)f(in)o(teger.)-12 723 y(The)g(optional)g Fl(n)f +Fn(is)h(a)g(n)o(um)o(b)q(er)f(whic)o(h)i(sp)q(eci\014es)g(ho)o(w)e(man)o(y)g +(c)o(haracters)g(m)o(ust)g(b)q(e)h(read)g(to)f(comp)q(ose)g(the)-12 +779 y(input)i(v)m(alue.)-12 899 y Fl(write)23 b(\(value,)g([format]\))-12 +985 y Fn(This)16 b(function)g(writes)f(the)h(v)m(alue)g(of)f(its)g(\014rst)g (argumen)o(t)g(to)f(the)i(curren)o(t)f(output.)k(An)d(optional)g(second)-12 -2713 y(argumen)o(t)g(sp)q(eci\014es)j(the)e(format)e(to)i(b)q(e)g(used.)26 +1041 y(argumen)o(t)g(sp)q(eci\014es)j(the)e(format)e(to)i(b)q(e)g(used.)26 b(This)17 b(format)e(is)j(giv)o(en)f(as)g(a)f(string,)h(comp)q(osed)g(of)g -(four)-12 2769 y(parts.)i(The)d(\014rst)f(part)f(is)i(the)f(only)h(not)f +(four)-12 1098 y(parts.)i(The)d(\014rst)f(part)f(is)i(the)f(only)h(not)f (optional,)g(and)h(m)o(ust)e(b)q(e)i(one)f(of)g(the)g(follo)o(wing)h(c)o -(haracters:)-12 2858 y Fi('s')g(or)h('S')22 b Fm(to)15 b(write)g(strings;)899 -2976 y(14)p eop -%%Page: 15 15 -bop -12 160 a Fi('f)5 b(')17 b(or)g('F')k Fm(to)15 b(write)g(\015oats;)-12 -253 y Fi('i')i(or)g('I')22 b Fm(to)14 b(write)i(in)o(tegers.)-12 -347 y(These)g(c)o(haracters)e(can)i(b)q(e)f(follo)o(w)o(ed)h(b)o(y)60 -441 y Fj([?][m][.n])-12 535 y Fm(where:)-12 629 y Fj(?)23 b -Fm(indicates)16 b(justi\014cation)g(inside)h(the)f(\014eld.)130 -723 y(')p Fj(<)p Fm(')22 b(righ)o(t)15 b(justi\014cation;)130 -796 y(')p Fj(>)p Fm(')22 b(left)15 b(justi\014cation;)130 869 -y(')p Fj(|)p Fm(')22 b(cen)o(ter)15 b(justi\014cation.)-12 -962 y Fj(m)23 b Fm(Indicates)16 b(the)f(\014eld)i(size)f(in)g(c)o(haracters.) --12 1056 y Fj(.n)23 b Fm(F)l(or)16 b(reals,)i(indicates)g(the)f(n)o(um)o(b)q -(er)h(of)e(digital)j(places.)26 b(F)l(or)16 b(in)o(tegers,)i(it)f(is)h(the)f -(minim)o(um)h(n)o(um)o(b)q(er)102 1113 y(of)d(digits.)20 b(This)c(option)f -(has)h(no)f(meaning)g(for)g(strings.)59 1207 y(When)e(called)i(without)e(a)g -(format)f(string,)h(this)h(function)g(writes)f(n)o(um)o(b)q(ers)g(using)h -(the)f Fj(\045g)g Fm(format)f(and)-12 1263 y(strings)j(with)h -Fj(\045s)p Fm(.)-12 1406 y Fl(7)69 b(Some)21 b(Examples)-12 -1508 y Fm(This)f(section)h(giv)o(es)e(examples)i(sho)o(wing)e(some)h -(features)f(of)g(Lua.)34 b(It)19 b(do)q(es)h(not)g(in)o(tend)g(to)f(co)o(v)o -(er)g(the)-12 1564 y(whole)d(language,)f(but)g(only)h(to)f(illustrate)h(some) -f(in)o(teresting)h(uses)f(of)g(the)g(system.)-12 1686 y Fb(7.1)56 -b(The)18 b(F)-5 b(unctions)19 b Fa(next)e Fb(and)j Fa(nextvar)-12 -1772 y Fm(This)c(example)g(sho)o(ws)f(ho)o(w)f(to)h(use)g(the)h(function)g -Fj(next)e Fm(to)h(iterate)g(o)o(v)o(er)f(the)i(\014elds)g(of)f(a)g(table.)-12 -1865 y Fj(function)23 b(f)h(\(t\))357 b(--)24 b(t)g(is)f(a)h(table)36 -1922 y(local)f(i,)h(v)f(=)h(next\(t,)f(nil\))47 b(--)24 b(i)g(is)f(an)h -(index)f(of)g(t,)h(v)g(=)g(t[i])36 1978 y(while)f(i)h(do)84 -2035 y(--)f(do)h(something)e(with)i(i)f(and)h(v)84 2091 y(i,)f(v)h(=)g -(next\(t,)f(i\))190 b(--)24 b(get)f(next)h(index)36 2148 y(end)-12 -2204 y(end)59 2298 y Fm(The)13 b(next)g(example)h(prin)o(ts)f(the)g(names)g -(of)f(all)i(global)g(v)m(ariables)g(in)g(the)f(system)g(with)g(non)g(nil)i(v) -m(alues:)-12 2392 y Fj(function)23 b(printGlobalVariables)e(\(\))36 -2448 y(local)i(i,)h(v)f(=)h(nextvar\(nil\))36 2505 y(while)f(i)h(do)84 -2561 y(print\(i\))84 2618 y(i,)f(v)h(=)g(nextvar\(i\))36 2674 -y(end)-12 2731 y(end)899 2976 y Fm(15)p eop -%%Page: 16 16 -bop -12 160 a Fb(7.2)56 b(String)18 b(Manipulation)-12 245 -y Fm(The)e(\014rst)e(example)i(is)g(a)f(function)h(to)f(trim)g(extra)f +(haracters:)-12 1192 y Fk('s')g(or)h('S')22 b Fn(to)15 b(write)g(strings;)-12 +1285 y Fk('f)5 b(')17 b(or)g('F')k Fn(to)15 b(write)g(\015oats;)-12 +1379 y Fk('i')i(or)g('I')22 b Fn(to)14 b(write)i(in)o(tegers.)-12 +1473 y(These)g(c)o(haracters)e(can)i(b)q(e)f(follo)o(w)o(ed)h(b)o(y)60 +1567 y Fl([?][m][.n])-12 1661 y Fn(where:)-12 1754 y Fl(?)23 +b Fn(indicates)16 b(justi\014cation)g(inside)h(the)f(\014eld.)130 +1848 y(')p Fl(<)p Fn(')22 b(righ)o(t)15 b(justi\014cation;)130 +1921 y(')p Fl(>)p Fn(')22 b(left)15 b(justi\014cation;)130 +1994 y(')p Fl(|)p Fn(')22 b(cen)o(ter)15 b(justi\014cation.)-12 +2088 y Fl(m)23 b Fn(Indicates)16 b(the)f(\014eld)i(size)f(in)g(c)o +(haracters.)-12 2182 y Fl(.n)23 b Fn(F)l(or)16 b(reals,)i(indicates)g(the)f +(n)o(um)o(b)q(er)h(of)e(digital)j(places.)26 b(F)l(or)16 b(in)o(tegers,)i(it) +f(is)h(the)f(minim)o(um)h(n)o(um)o(b)q(er)102 2238 y(of)d(digits.)20 +b(This)c(option)f(has)h(no)f(meaning)g(for)g(strings.)59 2332 +y(When)e(called)i(without)e(a)g(format)f(string,)h(this)h(function)g(writes)f +(n)o(um)o(b)q(ers)g(using)h(the)f Fl(\045g)g Fn(format)f(and)-12 +2389 y(strings)j(with)h Fl(\045s)p Fn(.)-12 2509 y Fl(debug)23 +b(\(\))-12 2595 y Fn(This)e(function,)g(when)g(called,)h(rep)q(eatedly)f +(presen)o(ts)f(a)g(prompt)f Fl(lua_debug>)42 b Fn(in)21 b(the)f(error)f +(output)-12 2651 y(stream)h(\()p Fl(stderr)p Fn(\),)f(reads)i(a)f(line)i +(from)d(the)i(standard)f(input,)i(and)e(executes)h(\(\\dostring"\))f(the)g +(line.)-12 2708 y(The)e(lo)q(op)g(ends)f(when)h(the)g(user)f(t)o(yp)q(es)g +Fl(cont)g Fn(to)g(the)g(prompt.)26 b(This)18 b(function)g(then)g(returns)f +(and)g(the)-12 2764 y(execution)f(of)f(the)h(program)e(con)o(tin)o(ues.)899 +2976 y(18)p eop +%%Page: 19 19 +bop -12 160 a Fo(7)69 b(Some)21 b(Examples)-12 261 y Fn(This)f(section)h(giv) +o(es)e(examples)i(sho)o(wing)e(some)h(features)f(of)g(Lua.)34 +b(It)19 b(do)q(es)h(not)g(in)o(tend)g(to)f(co)o(v)o(er)g(the)-12 +318 y(whole)d(language,)f(but)g(only)h(to)f(illustrate)h(some)f(in)o +(teresting)h(uses)f(of)g(the)g(system.)-12 437 y Fd(7.1)56 +b(The)18 b(F)-5 b(unctions)19 b Fa(next)e Fd(and)j Fa(nextvar)-12 +523 y Fn(This)c(example)g(sho)o(ws)f(ho)o(w)f(to)h(use)g(the)h(function)g +Fl(next)e Fn(to)h(iterate)g(o)o(v)o(er)f(the)i(\014elds)g(of)f(a)g(table.)-12 +605 y Fl(function)23 b(f)h(\(t\))357 b(--)24 b(t)g(is)f(a)h(table)36 +661 y(local)f(i,)h(v)f(=)h(next\(t,)f(nil\))47 b(--)24 b(i)g(is)f(an)h(index) +f(of)g(t,)h(v)g(=)g(t[i])36 718 y(while)f(i)h(do)84 774 y(...)524 +b(--)24 b(do)f(something)g(with)g(i)h(and)g(v)84 831 y(i,)f(v)h(=)g(next\(t,) +f(i\))190 b(--)24 b(get)f(next)h(index)36 887 y(end)-12 944 +y(end)59 1026 y Fn(The)13 b(next)g(example)h(prin)o(ts)f(the)g(names)g(of)f +(all)i(global)g(v)m(ariables)g(in)g(the)f(system)g(with)g(non)g(nil)i(v)m +(alues:)-12 1108 y Fl(function)23 b(printGlobalVariables)e(\(\))36 +1164 y(local)i(i,)h(v)f(=)h(nextvar\(nil\))36 1221 y(while)f(i)h(do)84 +1277 y(print\(i\))84 1334 y(i,)f(v)h(=)g(nextvar\(i\))36 1390 +y(end)-12 1447 y(end)-12 1566 y Fd(7.2)56 b(String)18 b(Manipulation)-12 +1652 y Fn(The)e(\014rst)e(example)i(is)g(a)f(function)h(to)f(trim)g(extra)f (blanks)i(at)f(the)g(b)q(eginning)i(and)f(end)g(of)e(a)h(string.)-12 -339 y Fj(function)23 b(trim\(s\))36 396 y(local)g(i)h(=)g(1)36 -452 y(while)f(strsub\(s,i,i\))f(=)i(')g(')f(do)84 509 y(i)g(=)h(i+1)36 -565 y(end)36 622 y(local)f(l)h(=)g(strlen\(s\))36 678 y(while)f -(strsub\(s,l,l\))f(=)i(')g(')f(do)84 734 y(l)g(=)h(l-1)36 791 -y(end)36 847 y(return)f(strsub\(s,i,l\))-12 904 y(end)59 998 -y Fm(The)15 b(second)h(example)g(sho)o(ws)e(a)h(function)h(that)f(eliminates) -i(all)f(blanks)g(of)f(a)f(string.)899 2976 y(16)p eop -%%Page: 17 17 -bop -12 160 a Fj(function)23 b(remove_blanks)f(\(s\))36 216 -y(local)h(b)h(=)g(strfind\(s,)e(')i('\))36 273 y(while)f(b)h(do)84 -329 y(s)f(=)h(strsub\(s,)f(1,)g(b-1\))h(..)f(strsub\(s,)g(b+1\))84 -385 y(b)g(=)h(strfind\(s,)f(')g('\))36 442 y(end)36 498 y(return)g(s)-12 -555 y(end)-12 677 y Fb(7.3)56 b(P)n(ersistence)-12 762 y Fm(Because)19 +1734 y Fl(function)23 b(trim\(s\))36 1791 y(local)g(l)h(=)g(1)36 +1847 y(while)f(strsub\(s,l,l\))f(==)i(')f(')h(do)84 1904 y(l)f(=)h(l+1)36 +1960 y(end)36 2017 y(local)f(r)h(=)g(strlen\(s\))36 2073 y(while)f +(strsub\(s,r,r\))f(==)i(')f(')h(do)84 2129 y(r)f(=)h(r-1)36 +2186 y(end)36 2242 y(return)f(strsub\(s,l,r\))-12 2299 y(end)59 +2381 y Fn(The)15 b(second)h(example)g(sho)o(ws)e(a)h(function)h(that)f +(eliminates)i(all)f(blanks)g(of)f(a)f(string.)-12 2463 y Fl(function)23 +b(remove_blanks)f(\(s\))36 2520 y(local)h(b)h(=)g(strfind\(s,)e(')i('\))36 +2576 y(while)f(b)h(do)84 2632 y(s)f(=)h(strsub\(s,)f(1,)g(b-1\))h(..)f +(strsub\(s,)g(b+1\))84 2689 y(b)g(=)h(strfind\(s,)f(')g('\))36 +2745 y(end)36 2802 y(return)g(s)-12 2858 y(end)899 2976 y Fn(19)p +eop +%%Page: 20 20 +bop -12 160 a Fd(7.3)56 b(P)n(ersistence)-12 245 y Fn(Because)19 b(of)f(its)h(re\015exiv)o(e)g(facilities,)i(p)q(ersistence)e(in)g(Lua)g(can)g (b)q(e)f(ac)o(hiev)o(ed)i(with)e(Lua.)30 b(This)19 b(section)-12 -819 y(sho)o(ws)c(some)h(w)o(a)o(ys)e(to)i(store)f(and)h(retriev)o(e)f(v)m +302 y(sho)o(ws)c(some)h(w)o(a)o(ys)e(to)i(store)f(and)h(retriev)o(e)f(v)m (alues)i(in)g(Lua,)f(using)g(a)g(text)f(\014le)i(written)f(in)g(the)g -(language)-12 875 y(itself)g(as)f(the)g(storage)f(media.)59 -932 y(T)l(o)h(store)f(a)h(single)i(v)m(alue)f(with)g(a)e(name,)h(the)h(follo) -o(wing)f(co)q(de)h(is)g(enough:)-12 1026 y Fj(function)23 b(store)g(\(name,)g -(value\))36 1082 y(write\('\\n')f(..)i(name)f(..)h('='\))36 -1138 y(write_value\(value\))-12 1195 y(end)-12 1301 y(function)f(write_value) -f(\(value\))36 1358 y(local)h(t)h(=)g(type\(value\))131 1414 -y(if)g(t)g(=)f('nil')95 b(then)23 b(write\('nil'\))36 1471 -y(elseif)g(t)h(=)f('number')g(then)g(write\(value\))36 1527 -y(elseif)g(t)h(=)f('string')g(then)g(write\('"')g(..)h(value)f(..)g('"'\))36 -1583 y(end)-12 1640 y(end)-12 1746 y Fm(In)16 b(order)f(to)g(restore)f(this)i -(v)m(alue,)g(a)f Fj(lua_dofile)e Fm(su\016ces.)59 1803 y(Storing)k(tables)g -(is)g(a)g(little)h(more)f(complex.)25 b(Assuming)18 b(that)e(the)h(table)h -(is)f(a)g(tree,)f(and)h(all)h(indices)-12 1859 y(are)e(iden)o(ti\014ers)i -(\(that)d(is,)h(the)h(tables)f(are)g(b)q(eing)i(used)e(as)g(records\),)g(its) -g(v)m(alue)i(can)e(b)q(e)h(written)f(directly)-12 1916 y(with)g(table)f -(constructors.)k(First,)c(the)g(function)h Fj(write_value)e -Fm(is)i(c)o(hanged)f(to)-12 2009 y Fj(function)23 b(write_value)f(\(value\)) -36 2066 y(local)h(t)h(=)g(type\(value\))131 2122 y(if)g(t)g(=)f('nil')95 -b(then)23 b(write\('nil'\))36 2179 y(elseif)g(t)h(=)f('number')g(then)g -(write\(value\))36 2235 y(elseif)g(t)h(=)f('string')g(then)g(write\('"')g(..) -h(value)f(..)g('"'\))36 2292 y(elseif)g(t)h(=)f('table')47 -b(then)23 b(write_record\(value\))36 2348 y(end)-12 2405 y(end)-12 -2498 y Fm(The)16 b(function)g Fj(write_record)d Fm(is:)899 -2976 y(17)p eop -%%Page: 18 18 -bop -12 160 a Fj(function)23 b(write_record\(t\))36 216 y(local)g(i,)h(v)f(=) -h(next\(t,)f(nil\))36 273 y(write\('@{'\))46 b(--)24 b(starts)f(constructor) -36 329 y(while)g(i)h(do)84 385 y(store\(i,)e(v\))84 442 y(i,)h(v)h(=)g -(next\(t,)f(i\))84 498 y(if)g(i)h(then)f(write\(',)g('\))h(end)36 -555 y(end)36 611 y(write\('}'\))46 b(--)24 b(closes)f(constructor)-12 -668 y(end)-12 789 y Fb(7.4)56 b(A)19 b(Cfunction)-12 875 y -Fm(A)c(Cfunction)h(to)f(compute)g(the)g(maxim)o(um)h(of)e(a)h(v)m(ariable)i -(n)o(um)o(b)q(er)e(of)g(argumen)o(ts)f(ma)o(y)h(b)q(e)h(written)f(as:)-12 -969 y Fj(void)24 b(math_max)e(\(void\))-12 1026 y({)12 1082 -y(int)i(i=1;)71 b(/*)23 b(number)g(of)h(arguments)e(*/)12 1138 -y(double)h(d,)h(dmax;)12 1195 y(lua_Object)f(o;)12 1251 y(/*)h(the)f -(function)g(must)g(get)h(at)f(least)g(one)h(argument)f(*/)12 -1308 y(if)h(\(\(o)f(=)h(lua_getparam\(i++\)\))d(==)j(0\))12 -1364 y({)g(lua_error)e(\("too)i(few)f(arguments)g(to)g(function)g(`max'"\);)g -(return;)g(})12 1421 y(/*)h(and)f(this)g(argument)g(must)g(be)h(a)g(number)f -(*/)12 1477 y(if)h(\(!lua_isnumber\(o\)\))12 1534 y({)g(lua_error)e -(\("incorrect)h(arguments)f(to)i(function)f(`max'"\);)g(return;)f(})12 -1590 y(dmax)h(=)h(lua_getnumber)e(\(o\);)12 1647 y(/*)i(loops)f(until)g -(there)g(is)h(no)f(more)h(arguments)e(*/)12 1703 y(while)h(\(\(o)h(=)f -(lua_getparam\(i++\)\))f(!=)h(0\))12 1759 y({)36 1816 y(if)h -(\(!lua_isnumber\(o\)\))36 1872 y({)g(lua_error)e(\("incorrect)h(arguments)f -(to)i(function)f(`max'"\);)f(return;)h(})36 1929 y(d)h(=)f(lua_getnumber)f -(\(o\);)36 1985 y(if)i(\(d)f(>)h(dmax\))f(dmax)g(=)h(d;)12 -2042 y(})12 2098 y(/*)g(push)f(the)g(result)g(to)h(be)g(returned)e(*/)12 -2155 y(lua_pushnumber)g(\(dmax\);)-12 2211 y(})59 2305 y Fm(After)15 -b(registered)g(with)-12 2399 y Fj(lua_register)22 b(\("max",)71 -b(math_max\);)-12 2493 y Fm(this)16 b(function)g(is)g(a)o(v)m(ailable)g(in)g -(Lua,)g(as)e(follo)o(ws:)-12 2586 y Fj(i)24 b(=)g(max\(4,)f(5,)g(10,)h(-34\)) -47 b(--)23 b(i)h(receives)f(10)-12 2708 y Fb(7.5)56 b(Calling)18 -b(Lua)h(F)-5 b(unctions)-12 2794 y Fm(This)15 b(example)g(illustrates)g(ho)o -(w)f(a)g(C)g(function)h(can)f(call)i(the)e(Lua)g(function)h -Fj(remove_blanks)e Fm(presen)o(ted)-12 2850 y(in)j(Section)g(7.2.)899 -2976 y(18)p eop -%%Page: 19 19 -bop -12 160 a Fj(void)24 b(remove_blanks)e(\(char)h(*s\))-12 -216 y({)36 273 y(lua_pushstring\(s\);)45 b(/*)24 b(prepare)f(parameter)f(*/) -36 329 y(lua_call\("remove_blanks",)e(1\);)48 b(/*)23 b(call)h(Lua)f -(function)g(with)g(1)h(parameter)e(*/)36 385 y(strcpy\(s,)h -(lua_getstring\(lua_pop\(\))o(\)\);)45 b(/*)23 b(copy)h(result)f(back)g(to)h -('s')f(*/)-12 442 y(})-12 585 y Fl(Ac)n(kno)n(wledgme)o(n)n(ts)-12 -687 y Fm(The)17 b(authors)f(w)o(ould)i(lik)o(e)g(to)e(thank)h(CENPES/PETR)o -(OBR)1099 675 y(\023)1093 687 y(AS)g(whic)o(h,)h(join)o(tly)f(with)h(T)l -(eCGraf,)e(used)-12 743 y(extensiv)o(ely)g(early)f(v)o(ersions)f(of)g(this)h -(system)f(and)h(ga)o(v)o(e)f(v)m(aluable)i(commen)o(ts.)j(The)c(authors)e(w)o -(ould)i(also)-12 799 y(lik)o(e)i(to)d(thank)h(Carlos)g(Henrique)h(Levy)l(,)g -(who)f(found)h(the)f(name)g(of)g(the)g(game.)899 2976 y(19)p +(language)-12 358 y(itself)g(as)f(the)g(storage)f(media.)59 +415 y(T)l(o)h(store)f(a)h(single)i(v)m(alue)f(with)g(a)e(name,)h(the)h(follo) +o(wing)f(co)q(de)h(is)g(enough:)-12 509 y Fl(function)23 b(store)g(\(name,)g +(value\))36 565 y(write\('\\n')f(..)i(name)f(..)h('='\))36 +622 y(write_value\(value\))-12 678 y(end)-12 784 y(function)f(write_value)f +(\(value\))36 841 y(local)h(t)h(=)g(type\(value\))131 897 y(if)g(t)g(==)f +('nil')95 b(then)23 b(write\('nil'\))36 954 y(elseif)g(t)h(==)f('number')g +(then)g(write\(value\))36 1010 y(elseif)g(t)h(==)f('string')g(then)g +(write\('"')g(..)h(value)f(..)g('"'\))36 1067 y(end)-12 1123 +y(end)-12 1229 y Fn(In)16 b(order)f(to)g(restore)f(this)i(v)m(alue,)g(a)f +Fl(lua_dofile)e Fn(su\016ces.)59 1286 y(Storing)k(tables)g(is)g(a)g(little)h +(more)f(complex.)25 b(Assuming)18 b(that)e(the)h(table)h(is)f(a)g(tree,)f +(and)h(all)h(indices)-12 1342 y(are)e(iden)o(ti\014ers)i(\(that)d(is,)h(the)h +(tables)f(are)g(b)q(eing)i(used)e(as)g(records\),)g(its)g(v)m(alue)i(can)e(b) +q(e)h(written)f(directly)-12 1399 y(with)g(table)f(constructors.)k(First,)c +(the)g(function)h Fl(write_value)e Fn(is)i(c)o(hanged)f(to)-12 +1492 y Fl(function)23 b(write_value)f(\(value\))36 1549 y(local)h(t)h(=)g +(type\(value\))131 1605 y(if)g(t)g(==)f('nil')95 b(then)23 +b(write\('nil'\))36 1662 y(elseif)g(t)h(==)f('number')g(then)g +(write\(value\))36 1718 y(elseif)g(t)h(==)f('string')g(then)g(write\('"')g +(..)h(value)f(..)g('"'\))36 1775 y(elseif)g(t)h(==)f('table')47 +b(then)23 b(write_record\(value\))36 1831 y(end)-12 1888 y(end)-12 +1981 y Fn(The)16 b(function)g Fl(write_record)d Fn(is:)-12 +2075 y Fl(function)23 b(write_record\(t\))36 2132 y(local)g(i,)h(v)f(=)h +(next\(t,)f(nil\))36 2188 y(write\('{'\))46 b(--)24 b(starts)f(constructor)36 +2245 y(while)g(i)h(do)84 2301 y(store\(i,)e(v\))84 2358 y(write\(',)g('\))84 +2414 y(i,)h(v)h(=)g(next\(t,)f(i\))36 2470 y(end)36 2527 y(write\('}'\))46 +b(--)24 b(closes)f(constructor)-12 2583 y(end)-12 2705 y Fd(7.4)56 +b(Inheritance)-12 2791 y Fn(The)18 b(fallbac)o(k)h(for)f(absen)o(t)f(indices) +j(can)f(b)q(e)f(used)h(to)e(implemen)o(t)j(man)o(y)d(kinds)i(of)f +(inheritance)h(in)g(Lua.)-12 2847 y(As)c(an)g(example,)h(the)f(follo)o(wing)h +(co)q(de)g(implemen)o(ts)h(single)f(inheritance:)899 2976 y(20)p +eop +%%Page: 21 21 +bop -12 160 a Fl(function)23 b(Index)g(\(t,f\))36 216 y(if)h(f)f(==)h +('parent')f(then)47 b(--)23 b(to)h(avoid)f(loop)84 273 y(return)g +(OldIndex\(t,f\))36 329 y(end)36 385 y(local)g(p)h(=)g(t.parent)36 +442 y(if)g(type\(p\))e(==)i('table')f(then)84 498 y(return)g(p[f])36 +555 y(else)84 611 y(return)g(OldIndex\(t,f\))36 668 y(end)-12 +724 y(end)-12 837 y(OldIndex)g(=)h(setfallback\("index",)d(Index\))-12 +931 y Fn(Whenev)o(er)13 b(Lua)f(attempts)g(to)f(access)i(an)f(absen)o(t)g +(\014eld)i(in)f(a)f(table,)h(it)f(calls)i(the)e(fallbac)o(k)h(function)g +Fl(Index)p Fn(.)-12 987 y(If)h(the)g(table)g(has)g(a)f(\014eld)i +Fl(parent)e Fn(with)h(a)g(table)g(v)m(alue,)h(then)f(Lua)g(attempts)f(to)g +(access)h(the)g(desired)h(\014eld)-12 1044 y(in)g(this)g(paren)o(t)f(ob)s +(ject.)19 b(This)c(pro)q(cess)f(is)h(rep)q(eated)g(\\up)o(w)o(ards")e(un)o +(til)i(a)f(v)m(alue)i(for)e(the)g(\014eld)h(is)g(found)g(or)-12 +1100 y(the)i(ob)s(ject)g(has)g(no)g(paren)o(t.)24 b(In)18 b(the)f(latter)g +(case,)g(the)g(previous)h(fallbac)o(k)g(is)f(called)i(to)d(supply)i(a)f(v)m +(alue)-12 1157 y(for)e(the)g(\014eld.)59 1213 y(When)h(b)q(etter)h(p)q +(erformance)f(is)h(needed,)g(the)g(same)f(fallbac)o(k)h(ma)o(y)e(b)q(e)i +(implemen)o(ted)h(in)f(C,)f(as)g(ilus-)-12 1270 y(trated)f(in)h(Figure)f(1.) +20 b(This)15 b(co)q(de)h(m)o(ust)f(b)q(e)h(registered)f(with:)36 +1363 y Fl(lua_pushliteral\("parent"\))o(;)36 1420 y(lockedParentName)22 +b(=)h(lua_lock\(\);)36 1476 y(lua_pushobject\(lua_setfal)o(lback\("i)o +(ndex",)d(Index\)\);)36 1533 y(lockedOldIndex)i(=)i(lua_lock\(\);)-12 +1627 y Fn(Notice)16 b(that)e(the)i(string)f Fl("parent")f Fn(is)i(k)o(ept)f +(lo)q(c)o(k)o(ed)g(in)h(Lua)g(for)f(optimal)g(p)q(erformace.)-12 +1748 y Fd(7.5)56 b(A)19 b(CF)-5 b(unction)-12 1834 y Fn(A)12 +b(CF)l(unction)h(to)e(compute)i(the)f(maxim)o(um)g(of)f(a)h(v)m(ariable)h(n)o +(um)o(b)q(er)g(of)e(argumen)o(ts)h(is)g(sho)o(wn)g(in)h(Figure)f(2.)-12 +1891 y(After)j(registered)h(with)-12 1984 y Fl(lua_register)22 +b(\("max",)h(math_max\);)-12 2078 y Fn(this)16 b(function)g(is)g(a)o(v)m +(ailable)g(in)g(Lua,)g(as)e(follo)o(ws:)-12 2172 y Fl(i)24 +b(=)g(max\(4,)f(5,)g(10,)h(-34\))47 b(--)23 b(i)h(receives)f(10)-12 +2294 y Fd(7.6)56 b(Calling)18 b(Lua)h(F)-5 b(unctions)-12 2380 +y Fn(This)15 b(example)g(illustrates)g(ho)o(w)f(a)g(C)g(function)h(can)f +(call)i(the)e(Lua)g(function)h Fl(remove_blanks)e Fn(presen)o(ted)-12 +2436 y(in)j(Section)g(7.2.)-12 2530 y Fl(void)24 b(remove_blanks)e(\(char)h +(*s\))-12 2586 y({)36 2643 y(lua_pushstring\(s\);)45 b(/*)24 +b(prepare)f(parameter)f(*/)36 2699 y(lua_call\("remove_blanks"\))o(;)45 +b(/*)24 b(call)f(Lua)g(function)g(*/)36 2756 y(strcpy\(s,)g +(lua_getstring\(lua_getre)o(sult\(1\))o(\)\);)45 b(/*)23 b(copy)h(result)f +(back)g(to)h('s')f(*/)-12 2812 y(})899 2976 y Fn(21)p eop +%%Page: 22 22 +bop -12 417 1867 6 v -12 511 a Fl(int)24 b(lockedParentName;)45 +b(/*)24 b(stores)f(the)g(lock)g(index)h(for)f(the)h(string)f("parent")f(*/) +-12 567 y(int)i(lockedOldIndex;)93 b(/*)24 b(previous)e(fallback)h(function)g +(*/)-12 680 y(void)h(callOldFallback)d(\(lua_Object)i(table,)g(lua_Object)f +(index\))-12 736 y({)36 793 y(lua_Object)g(oldIndex)h(=)h +(lua_getlocked\(lockedOldIn)o(dex\);)36 849 y(lua_pushobject\(table\);)36 +906 y(lua_pushobject\(index\);)36 962 y(lua_callfunction\(oldIndex)o(\);)-12 +1019 y(})-12 1132 y(void)g(Index)f(\(void\))-12 1188 y({)36 +1245 y(lua_Object)f(table)i(=)f(lua_getparam\(1\);)36 1301 +y(lua_Object)f(index)i(=)f(lua_getparam\(2\);)36 1357 y(lua_Object)f(parent;) +36 1414 y(if)i(\(lua_isstring\(index\))d(&&)i +(strcmp\(lua_getstring\(index\),)d("parent"\))j(==)g(0\))36 +1470 y({)84 1527 y(callOldFallback\(table,)d(index\);)84 1583 +y(return;)36 1640 y(})36 1696 y(lua_pushobject\(table\);)36 +1753 y(lua_pushlocked\(lockedPare)o(ntName\);)36 1809 y(parent)j(=)h +(lua_getsubscript\(\);)36 1866 y(if)g(\(lua_istable\(parent\)\))36 +1922 y({)84 1978 y(lua_pushobject\(parent\);)84 2035 y +(lua_pushobject\(index\);)84 2091 y(/*)f(return)g(result)g(from)h +(getsubscript)e(*/)84 2148 y(lua_pushobject\(lua_gets)o(ubscript)o(\(\)\);)36 +2204 y(})36 2261 y(else)84 2317 y(callOldFallback\(table,)e(index\);)-12 +2374 y(})653 2509 y Fn(Figure)c(1:)j(Inheritance)e(in)f(C.)p +-12 2565 V 899 2976 a(22)p eop +%%Page: 23 23 +bop -12 727 1867 6 v -12 821 a Fl(void)24 b(math_max)e(\(void\))-12 +878 y({)12 934 y(int)i(i=1;)71 b(/*)23 b(number)g(of)h(arguments)e(*/)12 +991 y(double)h(d,)h(dmax;)12 1047 y(lua_Object)f(o;)12 1103 +y(/*)h(the)f(function)g(must)g(get)h(at)f(least)g(one)h(argument)f(*/)12 +1160 y(if)h(\(\(o)f(=)h(lua_getparam\(i++\)\))d(==)j(LUA_NOOBJECT\))60 +1216 y(lua_error)e(\("too)i(few)f(arguments)g(to)g(function)g(`max'"\);)12 +1273 y(/*)h(and)f(this)g(argument)g(must)g(be)h(a)g(number)f(*/)12 +1329 y(if)h(\(!lua_isnumber\(o\)\))60 1386 y(lua_error)e(\("incorrect)h +(argument)g(to)g(function)g(`max'"\);)12 1442 y(dmax)g(=)h(lua_getnumber)e +(\(o\);)12 1499 y(/*)i(loops)f(until)g(there)g(is)h(no)f(more)h(arguments)e +(*/)12 1555 y(while)h(\(\(o)h(=)f(lua_getparam\(i++\)\))f(!=)h +(LUA_NOOBJECT\))12 1612 y({)36 1668 y(if)h(\(!lua_isnumber\(o\)\))84 +1724 y(lua_error)e(\("incorrect)h(argument)f(to)i(function)f(`max'"\);)36 +1781 y(d)h(=)f(lua_getnumber)f(\(o\);)36 1837 y(if)i(\(d)f(>)h(dmax\))f(dmax) +g(=)h(d;)12 1894 y(})12 1950 y(/*)g(push)f(the)g(result)g(to)h(be)g(returned) +e(*/)12 2007 y(lua_pushnumber)g(\(dmax\);)-12 2063 y(})610 +2198 y Fn(Figure)16 b(2:)j(C)c(function)h Fl(math)p 1134 2198 +15 2 v 17 w(max)p Fn(.)p -12 2255 1867 6 v 899 2976 a(23)p eop +%%Page: 24 24 +bop -12 160 a Fo(Ac)n(kno)n(wledgme)o(n)n(ts)-12 261 y Fn(The)17 +b(authors)f(w)o(ould)i(lik)o(e)g(to)e(thank)h(CENPES/PETR)o(OBR)1099 +250 y(\023)1093 261 y(AS)g(whic)o(h,)h(join)o(tly)f(with)h(T)l(eCGraf,)e +(used)-12 318 y(extensiv)o(ely)g(early)f(v)o(ersions)f(of)g(this)h(system)f +(and)h(ga)o(v)o(e)f(v)m(aluable)i(commen)o(ts.)j(The)c(authors)e(w)o(ould)i +(also)-12 374 y(lik)o(e)i(to)d(thank)h(Carlos)g(Henrique)h(Levy)l(,)g(who)f +(found)h(the)f(name)g(of)g(the)g(game)1371 358 y Fj(3)1390 +374 y Fn(.)-12 517 y Fo(A)69 b(Incompatibi)o(l)o(i)o(ti)o(es)20 +b(with)h(Previous)i(V)-6 b(ersions)-12 619 y Fn(Although)13 +b(great)f(care)g(has)h(b)q(een)g(tak)o(en)f(to)g(a)o(v)o(oid)h +(incompatibilities)j(with)d(the)f(previous)h(public)i(v)o(ersions)-12 +675 y(of)g(Lua,)g(some)g(di\013erences)h(had)g(to)e(b)q(e)i(in)o(tro)q +(duced.)21 b(Here)16 b(is)f(a)g(list)h(of)f(all)h(these)g(di\013erences.)-12 +797 y Fd(Incompatibilitie)o(s)g(in)i(the)h(Language)56 883 +y Fi(\017)k Fn(The)15 b(equalit)o(y)h(test)f(op)q(erator)f(no)o(w)h(is)h +(denoted)f(b)o(y)g Fl(==)p Fn(,)g(instead)h(of)f Fl(=)p Fn(.)56 +976 y Fi(\017)23 b Fn(The)14 b(syn)o(tax)f(for)g(table)h(construction)g(has)f +(b)q(een)i(greatly)f(simpli\014ed.)22 b(The)14 b(old)g Fl(@\(size\))f +Fn(has)g(b)q(een)102 1033 y(substituted)20 b(b)o(y)f Fl({})p +Fn(.)32 b(The)20 b(list)g(constructor)f(\(formerly)g Fl(@[...])p +Fn(\))f(and)h(the)h(record)f(constructor)102 1089 y(\(formerly)g +Fl(@{...})p Fn(\))g(no)o(w)h(are)g(b)q(oth)g(co)q(ded)h(lik)o(e)g +Fl({...})p Fn(.)34 b(When)20 b(the)h(construction)f(in)o(v)o(olv)o(es)h(a)102 +1146 y(function)15 b(call,)h(lik)o(e)g(in)f Fl(@func{...})p +Fn(,)e(the)i(new)g(syn)o(tax)f(do)q(es)h(not)g(use)g(the)f +Fl(@)p Fn(.)20 b(More)14 b(imp)q(ortan)o(t,)g Fm(a)102 1202 +y(c)n(onstruction)h(function)h(must)h(now)f(explicitly)g(r)n(eturn)g(the)h(c) +n(onstructe)n(d)e(table)p Fn(.)-12 1324 y Fd(Incompatibilitie)o(s)h(in)i(the) +h(API)56 1410 y Fi(\017)k Fn(The)15 b(function)h Fl(lua_call)e +Fn(no)h(longer)h(has)f(the)g(parameter)g Fl(nparam)p Fn(.)56 +1504 y Fi(\017)23 b Fn(The)16 b(function)i Fl(lua_pop)d Fn(is)i(no)f(longer)h +(a)o(v)m(ailable,)h(since)g(it)e(could)i(lead)f(to)f(strange)g(b)q(eha)o +(vior.)24 b(In)102 1560 y(particular,)13 b(to)e(access)i(results)f(returned)h +(from)e(a)h(Lua)h(function,)g(the)f(new)h(macro)e Fl(lua_getresult)102 +1617 y Fn(should)16 b(b)q(e)g(used.)56 1710 y Fi(\017)23 b +Fn(The)15 b(old)h(functions)g Fl(lua_storefield)d Fn(and)j +Fl(lua_storeindexed)d Fn(ha)o(v)o(e)h(b)q(een)j(replaced)f(b)o(y)102 +1823 y Fl(int)23 b(lua_storesubscript)f(\(void\);)102 1935 +y Fn(with)15 b(the)h(parameters)e(explicitly)k(pushed)e(on)f(the)h(stac)o(k.) +56 2029 y Fi(\017)23 b Fn(The)16 b(functionalit)o(y)h(of)f(the)g(function)g +Fl(lua_errorfunction)e Fn(has)i(b)q(een)h(replaced)g(b)o(y)f(the)g +Fm(fal)r(lb)n(ack)102 2086 y Fn(mec)o(hanism;)f(see)h(Section)g(4.8.)56 +2179 y Fi(\017)23 b Fn(When)14 b(calling)i(a)d(function)i(from)e(the)h(Lua)g +(library)l(,)g(parameters)f(passed)h(through)g(the)g(stac)o(k)f(m)o(ust)102 +2236 y(b)q(e)j(pushed)h(just)e(b)q(efore)h(the)f(corresp)q(onden)o(t)h(call,) +h(with)f(no)f(in)o(termediate)h(calls)h(to)e(Lua.)21 b(Sp)q(ecial)102 +2292 y(care)15 b(should)h(b)q(e)g(tak)o(en)f(with)g(macros)g(lik)o(e)h +Fl(lua_getindexed)d Fn(and)j Fl(lua_getfield)p Fn(.)p -12 2815 +747 2 v 40 2842 a Fh(3)57 2858 y Fg(BTW,)d(Lua)g(means)h Fe(mo)n(on)e +Fg(in)i(P)o(ortuguese.)899 2976 y Fn(24)p eop %%Trailer end userdict /end-hook known{end-hook}if @@ -1,6 +1,10 @@ #!/bin/sh +# makefile for lua hierarchy LUA=`pwd` export LUA -make $* +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 new file mode 100644 index 00000000..5ef4d4b5 --- /dev/null +++ b/include/Makefile @@ -0,0 +1,8 @@ +# makefile for lua distribution + +all: + +clean: + +co: + co -M lua.h lualib.h diff --git a/include/lua.h b/include/lua.h index 2bafd209..09a0909e 100644 --- a/include/lua.h +++ b/include/lua.h @@ -2,53 +2,99 @@ ** LUA - Linguagem para Usuarios de Aplicacao ** Grupo de Tecnologia em Computacao Grafica ** TeCGraf - PUC-Rio -** $Id: lua.h,v 1.1 1993/12/17 18:41:19 celes Exp $ +** $Id: lua.h,v 3.16 1995/01/27 17:19:06 celes Exp $ */ #ifndef lua_h #define lua_h -typedef void (*lua_CFunction) (void); -typedef struct Object *lua_Object; +/* Private Part */ + +typedef enum +{ + LUA_T_NIL = -1, + LUA_T_NUMBER = -2, + LUA_T_STRING = -3, + LUA_T_ARRAY = -4, + LUA_T_FUNCTION = -5, + LUA_T_CFUNCTION= -6, + LUA_T_USERDATA = 0 +} lua_Type; + -#define lua_register(n,f) (lua_pushcfunction(f), lua_storeglobal(n)) +/* Public Part */ + +#define LUA_NOOBJECT 0 +typedef void (*lua_CFunction) (void); +typedef unsigned int lua_Object; + +lua_Object lua_setfallback (char *name, lua_CFunction fallback); -void lua_errorfunction (void (*fn) (char *s)); void lua_error (char *s); int lua_dofile (char *filename); int lua_dostring (char *string); -int lua_call (char *functionname, int nparam); +int lua_callfunction (lua_Object function); +int lua_call (char *funcname); + +void lua_beginblock (void); +void lua_endblock (void); lua_Object lua_getparam (int number); +#define lua_getresult(_) lua_getparam(_) + float lua_getnumber (lua_Object object); char *lua_getstring (lua_Object object); -char *lua_copystring (lua_Object object); lua_CFunction lua_getcfunction (lua_Object object); void *lua_getuserdata (lua_Object object); -lua_Object lua_getfield (lua_Object object, char *field); -lua_Object lua_getindexed (lua_Object object, float index); + +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); + lua_Object lua_getglobal (char *name); +void lua_storeglobal (char *name); + +void lua_storesubscript (void); +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); + +lua_Object lua_createtable (void); + + +/* some useful macros */ + +#define lua_lockobject(o) (lua_pushobject(o), lua_lock()) + +#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 lua 1.1 compatibility. Avoid using these macros */ + +#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()) -lua_Object lua_pop (void); - -int lua_pushnil (void); -int lua_pushnumber (float n); -int lua_pushstring (char *s); -int lua_pushcfunction (lua_CFunction fn); -int lua_pushuserdata (void *u); -int lua_pushobject (lua_Object object); - -int lua_storeglobal (char *name); -int lua_storefield (lua_Object object, char *field); -int lua_storeindexed (lua_Object object, float index); - -int lua_isnil (lua_Object object); -int lua_isnumber (lua_Object object); -int lua_isstring (lua_Object object); -int lua_istable (lua_Object object); -int lua_iscfunction (lua_Object object); -int lua_isuserdata (lua_Object object); +#define lua_copystring(o) (strdup(lua_getstring(o))) #endif diff --git a/include/lualib.h b/include/lualib.h index 37b23094..9ce7e44a 100644 --- a/include/lualib.h +++ b/include/lualib.h @@ -2,7 +2,7 @@ ** Libraries to be used in LUA programs ** Grupo de Tecnologia em Computacao Grafica ** TeCGraf - PUC-Rio -** $Id: lualib.h,v 1.1 1993/12/17 19:01:46 celes Exp $ +** $Id: lualib.h,v 1.3 1994/12/13 15:59:16 roberto Exp $ */ #ifndef lualib_h diff --git a/include/mm.h b/include/mm.h deleted file mode 100644 index e69de29b..00000000 --- a/include/mm.h +++ /dev/null diff --git a/src/Makefile b/src/Makefile index 7e833d4f..6d1f1bb1 100644 --- a/src/Makefile +++ b/src/Makefile @@ -1,24 +1,35 @@ -# makefile for lua +# makefile for lua distribution -LIB= $(LUA)/lib INC= $(LUA)/include +LIB= $(LUA)/lib + +# in SunOs /usr/5include contains prototypes for standard lib +INCS= -I/usr/5include -I$(INC) +WARN= -Wall -Wmissing-prototypes -Wshadow -ansi CC= gcc -CFLAGS= -g -Wall -O2 -I$(INC) $(DEFS) -DEFS= -DMAXCODE=64000 -DMAXCONSTANT=1024 -DMAXSYMBOL=1024 -DMAXARRAY=1024 +CFLAGS= $(INCS) $(DEFS) $(WARN) -O2 + +OBJS= fallback.o hash.o inout.o lex.o mem.o opcode.o parser.o table.o tree.o -OBJS= hash.o inout.o lex.o opcode.o table.o y.tab.o SLIB= $(LIB)/liblua.a -DLIB= $(LIB)/liblua.so.1.1 -libs: $(SLIB) $(DLIB) +# dynamic libraries only work for SunOs +DLIB= $(LIB)/liblua.so.2.1 + +all: $(SLIB) + +dynamic: $(DLIB) $(SLIB): $(OBJS) - ar ruvl $@ $(OBJS) - ranlib $(SLIB) + ar rcuv $@ $(OBJS) + ranlib $@ $(DLIB): $(OBJS) ld -o $@ $(OBJS) clean: rm -f $(OBJS) $(SLIB) $(DLIB) + +co: + co -M fallback.c hash.c inout.c lex.c mem.c opcode.c table.c tree.c fallback.h hash.h inout.h mem.h opcode.h table.h tree.h types.h ugly.h diff --git a/src/fallback.c b/src/fallback.c new file mode 100644 index 00000000..d5bbbba1 --- /dev/null +++ b/src/fallback.c @@ -0,0 +1,171 @@ +/* +** fallback.c +** TecCGraf - PUC-Rio +*/ + +char *rcs_fallback="$Id: fallback.c,v 1.11 1995/02/06 19:34:03 roberto Exp $"; + +#include <stdio.h> +#include <string.h> + +#include "mem.h" +#include "fallback.h" +#include "opcode.h" +#include "inout.h" +#include "lua.h" + + +static void errorFB (void); +static void indexFB (void); +static void gettableFB (void); +static void arithFB (void); +static void concatFB (void); +static void orderFB (void); +static void GDFB (void); +static void funcFB (void); + + +/* +** Warning: This list must be in the same order as the #define's +*/ +struct FB luaI_fallBacks[] = { +{"error", {LUA_T_CFUNCTION, errorFB}}, +{"index", {LUA_T_CFUNCTION, indexFB}}, +{"gettable", {LUA_T_CFUNCTION, gettableFB}}, +{"arith", {LUA_T_CFUNCTION, arithFB}}, +{"order", {LUA_T_CFUNCTION, orderFB}}, +{"concat", {LUA_T_CFUNCTION, concatFB}}, +{"settable", {LUA_T_CFUNCTION, gettableFB}}, +{"gc", {LUA_T_CFUNCTION, GDFB}}, +{"function", {LUA_T_CFUNCTION, funcFB}} +}; + +#define N_FB (sizeof(luaI_fallBacks)/sizeof(struct FB)) + +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))) + { + lua_pushnil(); + return; + } + for (i=0; i<N_FB; i++) + { + if (strcmp(luaI_fallBacks[i].kind, name) == 0) + { + luaI_pushobject(&luaI_fallBacks[i].function); + luaI_fallBacks[i].function = *luaI_Address(func); + return; + } + } + /* name not found */ + lua_pushnil(); +} + + +static void errorFB (void) +{ + lua_Object o = lua_getparam(1); + if (lua_isstring(o)) + fprintf (stderr, "lua: %s\n", lua_getstring(o)); + else + fprintf(stderr, "lua: unknown error\n"); +} + + +static void indexFB (void) +{ + lua_pushnil(); +} + + +static void gettableFB (void) +{ + lua_reportbug("indexed expression not a table"); +} + + +static void arithFB (void) +{ + lua_reportbug("unexpected type at conversion to number"); +} + +static void concatFB (void) +{ + lua_reportbug("unexpected type at conversion to string"); +} + + +static void orderFB (void) +{ + lua_reportbug("unexpected type at comparison"); +} + +static void GDFB (void) { } + +static void funcFB (void) +{ + lua_reportbug("call expression not a function"); +} + + +/* +** Lock routines +*/ + +static Object *lockArray = NULL; +static Word lockSize = 0; + +int luaI_lock (Object *object) +{ + Word i; + Word 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; + } + /* 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; +} + + +void lua_unlock (int ref) +{ + tag(&lockArray[ref]) = LUA_T_NIL; +} + + +Object *luaI_getlocked (int ref) +{ + return &lockArray[ref]; +} + + +void luaI_travlock (void (*fn)(Object *)) +{ + Word i; + for (i=0; i<lockSize; i++) + fn(&lockArray[i]); +} + diff --git a/src/fallback.h b/src/fallback.h new file mode 100644 index 00000000..225a9063 --- /dev/null +++ b/src/fallback.h @@ -0,0 +1,31 @@ +/* +** $Id: fallback.h,v 1.7 1994/11/21 18:22:58 roberto Stab $ +*/ + +#ifndef fallback_h +#define fallback_h + +#include "opcode.h" + +extern struct FB { + char *kind; + Object function; +} luaI_fallBacks[]; + +#define FB_ERROR 0 +#define FB_INDEX 1 +#define FB_GETTABLE 2 +#define FB_ARITH 3 +#define FB_ORDER 4 +#define FB_CONCAT 5 +#define FB_SETTABLE 6 +#define FB_GC 7 +#define FB_FUNCTION 8 + +void luaI_setfallback (void); +int luaI_lock (Object *object); +Object *luaI_getlocked (int ref); +void luaI_travlock (void (*fn)(Object *)); + +#endif + @@ -1,138 +1,147 @@ /* ** hash.c ** hash manager for lua -** Luiz Henrique de Figueiredo - 17 Aug 90 */ -char *rcs_hash="$Id: hash.c,v 2.1 1994/04/20 22:07:57 celes Exp $"; +char *rcs_hash="$Id: hash.c,v 2.24 1995/02/06 19:34:03 roberto Exp $"; #include <string.h> -#include <stdlib.h> - -#include "mm.h" +#include "mem.h" #include "opcode.h" #include "hash.h" #include "inout.h" #include "table.h" #include "lua.h" -#define streq(s1,s2) (strcmp(s1,s2)==0) -#define strneq(s1,s2) (strcmp(s1,s2)!=0) - -#define new(s) ((s *)malloc(sizeof(s))) -#define newvector(n,s) ((s *)calloc(n,sizeof(s))) +#define streq(s1,s2) (s1 == s2 || (*(s1) == *(s2) && strcmp(s1,s2)==0)) #define nhash(t) ((t)->nhash) -#define nodelist(t) ((t)->list) -#define list(t,i) ((t)->list[i]) +#define nuse(t) ((t)->nuse) #define markarray(t) ((t)->mark) -#define ref_tag(n) (tag(&(n)->ref)) -#define ref_nvalue(n) (nvalue(&(n)->ref)) -#define ref_svalue(n) (svalue(&(n)->ref)) +#define nodevector(t) ((t)->node) +#define node(t,i) (&(t)->node[i]) +#define ref(n) (&(n)->ref) +#define val(n) (&(n)->val) -#ifndef ARRAYBLOCK -#define ARRAYBLOCK 50 -#endif -typedef struct ArrayList -{ - Hash *array; - struct ArrayList *next; -} ArrayList; +#define REHASH_LIMIT 0.70 /* avoid more than this % full */ + -static ArrayList *listhead = NULL; +static Hash *listhead = NULL; -static int head (Hash *t, Object *ref) /* hash function */ + + +/* 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 Word redimension (Word nhash) { - if (tag(ref) == T_NUMBER) return (((int)nvalue(ref))%nhash(t)); - else if (tag(ref) == T_STRING) + Word i; + for (i=0; dimensions[i]!=0; i++) { - int h; - char *name = svalue(ref); - for (h=0; *name!=0; name++) /* interpret name as binary number */ - { - h <<= 8; - h += (unsigned char) *name; /* avoid sign extension */ - h %= nhash(t); /* make it a valid index */ - } - return h; - } - else - { - lua_reportbug ("unexpected type to index table"); - return -1; + if (dimensions[i] > nhash) + return dimensions[i]; } + lua_error("table overflow"); + return 0; /* to avoid warnings */ } -static Node *present(Hash *t, Object *ref, int h) +static Word hashindex (Hash *t, Object *ref) /* hash function */ { - Node *n=NULL, *p; - if (tag(ref) == T_NUMBER) - { - for (p=NULL,n=list(t,h); n!=NULL; p=n, n=n->next) - if (ref_tag(n) == T_NUMBER && nvalue(ref) == ref_nvalue(n)) break; - } - else if (tag(ref) == T_STRING) - { - for (p=NULL,n=list(t,h); n!=NULL; p=n, n=n->next) - if (ref_tag(n) == T_STRING && streq(svalue(ref),ref_svalue(n))) break; - } - if (n==NULL) /* name not present */ - return NULL; -#if 0 - if (p!=NULL) /* name present but not first */ + switch (tag(ref)) { - p->next=n->next; /* move-to-front self-organization */ - n->next=list(t,h); - list(t,h)=n; + case LUA_T_NIL: + lua_reportbug ("unexpected type to index table"); + return -1; /* UNREACHEABLE */ + case LUA_T_NUMBER: + return (((Word)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 */ + } + case LUA_T_FUNCTION: + return (((IntPoint)bvalue(ref))%nhash(t)); + case LUA_T_CFUNCTION: + return (((IntPoint)fvalue(ref))%nhash(t)); + case LUA_T_ARRAY: + return (((IntPoint)avalue(ref))%nhash(t)); + default: /* user data */ + return (((IntPoint)uvalue(ref))%nhash(t)); } -#endif - return n; } -static void freelist (Node *n) +Bool lua_equalObj (Object *t1, Object *t2) { - while (n) + 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_ARRAY: return avalue(t1) == avalue(t2); + case LUA_T_FUNCTION: return bvalue(t1) == bvalue(t2); + case LUA_T_CFUNCTION: return fvalue(t1) == fvalue(t2); + default: return uvalue(t1) == uvalue(t2); + } +} + +static Word present (Hash *t, Object *ref) +{ + Word h = hashindex(t, ref); + while (tag(ref(node(t, h))) != LUA_T_NIL) { - Node *next = n->next; - free (n); - n = next; + if (lua_equalObj(ref, ref(node(t, h)))) + return h; + h = (h+1) % nhash(t); } + return h; +} + + +/* +** Alloc a vector node +*/ +static Node *hashnodecreate (Word nhash) +{ + Word i; + Node *v = newvector (nhash, Node); + for (i=0; i<nhash; i++) + tag(ref(&v[i])) = LUA_T_NIL; + return v; } /* ** Create a new hash. Return the hash pointer or NULL on error. */ -static Hash *hashcreate (unsigned int nhash) +static Hash *hashcreate (Word nhash) { - Hash *t = new (Hash); - if (t == NULL) - { - lua_error ("not enough memory"); - return NULL; - } + Hash *t = new(Hash); + nhash = redimension((Word)((float)nhash/REHASH_LIMIT)); + nodevector(t) = hashnodecreate(nhash); nhash(t) = nhash; + nuse(t) = 0; markarray(t) = 0; - nodelist(t) = newvector (nhash, Node*); - if (nodelist(t) == NULL) - { - lua_error ("not enough memory"); - return NULL; - } return t; } /* ** Delete a hash */ -static void hashdelete (Hash *h) +static void hashdelete (Hash *t) { - int i; - for (i=0; i<nhash(h); i++) - freelist (list(h,i)); - free (nodelist(h)); - free(h); + luaI_free (nodevector(t)); + luaI_free(t); } @@ -143,12 +152,12 @@ void lua_hashmark (Hash *h) { if (markarray(h) == 0) { - int i; + Word i; markarray(h) = 1; for (i=0; i<nhash(h); i++) { - Node *n; - for (n = list(h,i); n != NULL; n = n->next) + Node *n = node(h,i); + if (tag(ref(n)) != LUA_T_NIL) { lua_markobject(&n->ref); lua_markobject(&n->val); @@ -156,92 +165,125 @@ void lua_hashmark (Hash *h) } } } + + +static void call_fallbacks (void) +{ + Hash *curr_array; + Object t; + tag(&t) = LUA_T_ARRAY; + for (curr_array = listhead; curr_array; curr_array = curr_array->next) + if (markarray(curr_array) != 1) + { + avalue(&t) = curr_array; + luaI_gcFB(&t); + } + tag(&t) = LUA_T_NIL; + luaI_gcFB(&t); /* end of list */ +} + /* ** Garbage collection to arrays ** Delete all unmarked arrays. */ -void lua_hashcollector (void) +Long lua_hashcollector (void) { - ArrayList *curr = listhead, *prev = NULL; - while (curr != NULL) + Hash *curr_array = listhead, *prev = NULL; + Long counter = 0; + call_fallbacks(); + while (curr_array != NULL) { - ArrayList *next = curr->next; - if (markarray(curr->array) != 1) + Hash *next = curr_array->next; + if (markarray(curr_array) != 1) { if (prev == NULL) listhead = next; else prev->next = next; - hashdelete(curr->array); - free(curr); + hashdelete(curr_array); + ++counter; } else { - markarray(curr->array) = 0; - prev = curr; + markarray(curr_array) = 0; + prev = curr_array; } - curr = next; + curr_array = next; } + return counter; } /* ** Create a new array -** This function insert the new array at array list. It also -** execute garbage collection if the number of array created +** This function inserts the new array in the array list. It also +** executes garbage collection if the number of arrays created ** exceed a pre-defined range. */ -Hash *lua_createarray (int nhash) +Hash *lua_createarray (Word nhash) { - ArrayList *new = new(ArrayList); - if (new == NULL) - { - lua_error ("not enough memory"); - return NULL; - } - new->array = hashcreate(nhash); - if (new->array == NULL) + Hash *array; + lua_pack(); + array = hashcreate(nhash); + array->next = listhead; + listhead = array; + return array; +} + + +/* +** Re-hash +*/ +static void rehash (Hash *t) +{ + Word i; + Word nold = nhash(t); + Node *vold = nodevector(t); + nhash(t) = redimension(nhash(t)); + nodevector(t) = hashnodecreate(nhash(t)); + for (i=0; i<nold; i++) { - lua_error ("not enough memory"); - return NULL; + Node *n = vold+i; + if (tag(ref(n)) != LUA_T_NIL && tag(val(n)) != LUA_T_NIL) + *node(t, present(t, ref(n))) = *n; /* copy old node to new hahs */ } + luaI_free(vold); +} - if (lua_nentity == lua_block) - lua_pack(); - - lua_nentity++; - new->next = listhead; - listhead = new; - return new->array; +/* +** If the hash node is present, return its pointer, otherwise return +** null. +*/ +Object *lua_hashget (Hash *t, Object *ref) +{ + Word h = present(t, ref); + if (tag(ref(node(t, h))) != LUA_T_NIL) return val(node(t, h)); + else return NULL; } /* ** If the hash node is present, return its pointer, otherwise create a new ** node for the given reference and also return its pointer. -** On error, return NULL. */ Object *lua_hashdefine (Hash *t, Object *ref) { - int h; + Word h; Node *n; - h = head (t, ref); - if (h < 0) return NULL; - - n = present(t, ref, h); - if (n == NULL) + h = present(t, ref); + n = node(t, h); + if (tag(ref(n)) == LUA_T_NIL) { - n = new(Node); - if (n == NULL) + nuse(t)++; + if ((float)nuse(t) > (float)nhash(t)*REHASH_LIMIT) { - lua_error ("not enough memory"); - return NULL; + rehash(t); + h = present(t, ref); + n = node(t, h); } - n->ref = *ref; - tag(&n->val) = T_NIL; - n->next = list(t,h); /* link node to head of list */ - list(t,h) = n; + *ref(n) = *ref; + tag(val(n)) = LUA_T_NIL; } - return (&n->val); + return (val(n)); } @@ -251,97 +293,44 @@ Object *lua_hashdefine (Hash *t, Object *ref) ** in the hash. ** This function pushs the element value and its reference to the stack. */ -static void firstnode (Hash *a, int h) +static void hashnext (Hash *t, Word i) { - if (h < nhash(a)) - { - int i; - for (i=h; i<nhash(a); i++) + if (i >= nhash(t)) + { + lua_pushnil(); lua_pushnil(); + return; + } + while (tag(ref(node(t,i))) == LUA_T_NIL || tag(val(node(t,i))) == LUA_T_NIL) + { + if (++i >= nhash(t)) { - if (list(a,i) != NULL) - { - if (tag(&list(a,i)->val) != T_NIL) - { - lua_pushobject (&list(a,i)->ref); - lua_pushobject (&list(a,i)->val); - return; - } - else - { - Node *next = list(a,i)->next; - while (next != NULL && tag(&next->val) == T_NIL) next = next->next; - if (next != NULL) - { - lua_pushobject (&next->ref); - lua_pushobject (&next->val); - return; - } - } - } + lua_pushnil(); lua_pushnil(); + return; } } - lua_pushnil(); - lua_pushnil(); + luaI_pushobject(ref(node(t,i))); + luaI_pushobject(val(node(t,i))); } + void lua_next (void) { - Hash *a; - Object *o = lua_getparam (1); - Object *r = lua_getparam (2); - if (o == NULL || r == NULL) - { lua_error ("too few arguments to function `next'"); return; } - if (lua_getparam (3) != NULL) - { lua_error ("too many arguments to function `next'"); return; } - if (tag(o) != T_ARRAY) - { lua_error ("first argument of function `next' is not a table"); return; } - a = avalue(o); - if (tag(r) == T_NIL) + Hash *t; + lua_Object o = lua_getparam(1); + lua_Object r = lua_getparam(2); + if (o == LUA_NOOBJECT || r == LUA_NOOBJECT) + lua_error ("too few arguments to function `next'"); + if (lua_getparam(3) != LUA_NOOBJECT) + lua_error ("too many arguments to function `next'"); + if (!lua_istable(o)) + lua_error ("first argument of function `next' is not a table"); + t = avalue(luaI_Address(o)); + if (lua_isnil(r)) { - firstnode (a, 0); - return; + hashnext(t, 0); } else { - int h = head (a, r); - if (h >= 0) - { - Node *n = list(a,h); - while (n) - { - if (memcmp(&n->ref,r,sizeof(Object)) == 0) - { - if (n->next == NULL) - { - firstnode (a, h+1); - return; - } - else if (tag(&n->next->val) != T_NIL) - { - lua_pushobject (&n->next->ref); - lua_pushobject (&n->next->val); - return; - } - else - { - Node *next = n->next->next; - while (next != NULL && tag(&next->val) == T_NIL) next = next->next; - if (next == NULL) - { - firstnode (a, h+1); - return; - } - else - { - lua_pushobject (&next->ref); - lua_pushobject (&next->val); - } - return; - } - } - n = n->next; - } - if (n == NULL) - lua_error ("error in function 'next': reference not found"); - } + Word h = present (t, luaI_Address(r)); + hashnext(t, h+1); } } @@ -2,30 +2,35 @@ ** hash.h ** hash manager for lua ** Luiz Henrique de Figueiredo - 17 Aug 90 -** $Id: hash.h,v 2.1 1994/04/20 22:07:57 celes Exp $ +** $Id: hash.h,v 2.8 1995/01/12 14:19:04 roberto Exp $ */ #ifndef hash_h #define hash_h +#include "types.h" + typedef struct node { Object ref; Object val; - struct node *next; } Node; typedef struct Hash { + struct Hash *next; char mark; - unsigned int nhash; - Node **list; + Word nhash; + Word nuse; + Node *node; } Hash; -Hash *lua_createarray (int nhash); +Bool lua_equalObj (Object *t1, Object *t2); +Hash *lua_createarray (Word nhash); void lua_hashmark (Hash *h); -void lua_hashcollector (void); +Long lua_hashcollector (void); +Object *lua_hashget (Hash *t, Object *ref); Object *lua_hashdefine (Hash *t, Object *ref); void lua_next (void); diff --git a/src/inout.c b/src/inout.c index d985c1b7..7bd7c235 100644 --- a/src/inout.c +++ b/src/inout.c @@ -2,49 +2,54 @@ ** inout.c ** Provide function to realise the input/output function and debugger ** facilities. +** Also provides some predefined lua functions. */ -char *rcs_inout="$Id: inout.c,v 1.2 1993/12/22 21:15:16 roberto Exp $"; +char *rcs_inout="$Id: inout.c,v 2.16 1994/12/20 21:20:36 roberto Exp $"; #include <stdio.h> +#include <stdlib.h> #include <string.h> +#include "mem.h" #include "opcode.h" #include "hash.h" #include "inout.h" #include "table.h" +#include "tree.h" +#include "lua.h" /* Exported variables */ -int lua_linenumber; -int lua_debug; -int lua_debugline; +Word lua_linenumber; +Bool lua_debug; +Word lua_debugline = 0; + /* Internal variables */ + #ifndef MAXFUNCSTACK -#define MAXFUNCSTACK 32 +#define MAXFUNCSTACK 100 #endif -static struct { int file; int function; } funcstack[MAXFUNCSTACK]; -static int nfuncstack=0; + +typedef struct FuncStackNode { + struct FuncStackNode *next; + char *file; + Word function; + Word line; +} FuncStackNode; + +static FuncStackNode *funcStack = NULL; +static Word nfuncstack=0; static FILE *fp; static char *st; -static void (*usererror) (char *s); - -/* -** Function to set user function to handle errors. -*/ -void lua_errorfunction (void (*fn) (char *s)) -{ - usererror = fn; -} /* ** Function to get the next character from the input file */ static int fileinput (void) { - int c = fgetc (fp); - return (c == EOF ? 0 : c); + return fgetc (fp); } /* @@ -52,22 +57,25 @@ static int fileinput (void) */ static int stringinput (void) { - st++; - return (*(st-1)); + return *st++; } /* ** Function to open a file to be input unit. -** Return 0 on success or 1 on error. +** Return 0 on success or error message on error. */ -int lua_openfile (char *fn) +char *lua_openfile (char *fn) { lua_linenumber = 1; lua_setinput (fileinput); fp = fopen (fn, "r"); - if (fp == NULL) return 1; - if (lua_addfile (fn)) return 1; - return 0; + if (fp == NULL) + { + static char buff[32]; + sprintf(buff, "unable to open file %.10s", fn); + return buff; + } + return lua_addfile (fn); } /* @@ -86,7 +94,7 @@ void lua_closefile (void) /* ** Function to open a string to be input unit */ -int lua_openstring (char *s) +char *lua_openstring (char *s) { lua_linenumber = 1; lua_setinput (stringinput); @@ -94,9 +102,8 @@ int lua_openstring (char *s) { char sn[64]; sprintf (sn, "String: %10.10s...", s); - if (lua_addfile (sn)) return 1; + return lua_addfile (sn); } - return 0; } /* @@ -107,40 +114,38 @@ void lua_closestring (void) lua_delfile(); } -/* -** Call user function to handle error messages, if registred. Or report error -** using standard function (fprintf). -*/ -void lua_error (char *s) -{ - if (usererror != NULL) usererror (s); - else fprintf (stderr, "lua: %s\n", s); -} /* ** Called to execute SETFUNCTION opcode, this function pushs a function into -** function stack. Return 0 on success or 1 on error. +** function stack. */ -int lua_pushfunction (int file, int function) +void lua_pushfunction (char *file, Word function) { - if (nfuncstack >= MAXFUNCSTACK-1) + FuncStackNode *newNode; + if (nfuncstack++ >= MAXFUNCSTACK) { - lua_error ("function stack overflow"); - return 1; + lua_reportbug("function stack overflow"); } - funcstack[nfuncstack].file = file; - funcstack[nfuncstack].function = function; - nfuncstack++; - return 0; + newNode = new(FuncStackNode); + newNode->function = function; + newNode->file = file; + newNode->line= lua_debugline; + newNode->next = funcStack; + funcStack = newNode; } /* -** Called to execute RESET opcode, this function pops a function from +** Called to execute RESET opcode, this function pops a function from ** function stack. */ void lua_popfunction (void) { - nfuncstack--; + FuncStackNode *temp = funcStack; + if (temp == NULL) return; + --nfuncstack; + lua_debugline = temp->line; + funcStack = temp->next; + luaI_free(temp); } /* @@ -148,30 +153,142 @@ void lua_popfunction (void) */ void lua_reportbug (char *s) { - char msg[1024]; + char msg[MAXFUNCSTACK*80]; strcpy (msg, s); if (lua_debugline != 0) { - int i; - if (nfuncstack > 0) + if (funcStack) { - sprintf (strchr(msg,0), - "\n\tin statement begining at line %d in function \"%s\" of file \"%s\"", - lua_debugline, s_name(funcstack[nfuncstack-1].function), - lua_file[funcstack[nfuncstack-1].file]); - sprintf (strchr(msg,0), "\n\tactive stack\n"); - for (i=nfuncstack-1; i>=0; i--) - sprintf (strchr(msg,0), "\t-> function \"%s\" of file \"%s\"\n", - s_name(funcstack[i].function), - lua_file[funcstack[i].file]); + FuncStackNode *func = funcStack; + int line = lua_debugline; + sprintf (strchr(msg,0), "\n\tactive stack:\n"); + do + { + sprintf (strchr(msg,0), + "\t-> function \"%s\" at file \"%s\":%u\n", + lua_constant[func->function]->str, func->file, line); + line = func->line; + func = func->next; + lua_popfunction(); + } while (func); } else { sprintf (strchr(msg,0), - "\n\tin statement begining at line %d of file \"%s\"", + "\n\tin statement begining at line %u of file \"%s\"", lua_debugline, lua_filename()); } } lua_error (msg); } + +/* +** Internal function: do a string +*/ +void lua_internaldostring (void) +{ + lua_Object obj = lua_getparam (1); + if (lua_isstring(obj) && !lua_dostring(lua_getstring(obj))) + lua_pushnumber(1); + else + lua_pushnil(); +} + +/* +** Internal function: do a file +*/ +void lua_internaldofile (void) +{ + lua_Object obj = lua_getparam (1); + if (lua_isstring(obj) && !lua_dofile(lua_getstring(obj))) + lua_pushnumber(1); + else + lua_pushnil(); +} + +/* +** Internal function: print object values +*/ +void lua_print (void) +{ + 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",bvalue(luaI_Address(obj))); + 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"); + } +} + + +/* +** Internal function: return an object type. +*/ +void luaI_type (void) +{ + lua_Object o = lua_getparam(1); + if (o == LUA_NOOBJECT) + lua_error("no parameter to function 'type'"); + switch (lua_type(o)) + { + case LUA_T_NIL : + lua_pushliteral("nil"); + break; + case LUA_T_NUMBER : + lua_pushliteral("number"); + break; + case LUA_T_STRING : + lua_pushliteral("string"); + break; + case LUA_T_ARRAY : + lua_pushliteral("table"); + break; + case LUA_T_FUNCTION : + lua_pushliteral("function"); + break; + case LUA_T_CFUNCTION : + lua_pushliteral("cfunction"); + break; + default : + lua_pushliteral("userdata"); + break; + } +} + +/* +** Internal function: convert an object to a number +*/ +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(); + } + else + lua_pushnil(); +} + + +void luaI_error (void) +{ + char *s = lua_getstring(lua_getparam(1)); + if (s == NULL) s = "(no message)"; + lua_reportbug(s); +} + diff --git a/src/inout.h b/src/inout.h index ca5920ca..22093020 100644 --- a/src/inout.h +++ b/src/inout.h @@ -1,21 +1,30 @@ /* -** $Id: inout.h,v 1.1 1993/12/17 18:41:19 celes Exp $ +** $Id: inout.h,v 1.7 1994/12/20 21:20:36 roberto Exp $ */ #ifndef inout_h #define inout_h -extern int lua_linenumber; -extern int lua_debug; -extern int lua_debugline; +#include "types.h" -int lua_openfile (char *fn); +extern Word lua_linenumber; +extern Bool lua_debug; +extern Word lua_debugline; + +char *lua_openfile (char *fn); void lua_closefile (void); -int lua_openstring (char *s); +char *lua_openstring (char *s); void lua_closestring (void); -int lua_pushfunction (int file, int function); +void lua_pushfunction (char *file, Word function); void lua_popfunction (void); void lua_reportbug (char *s); +void lua_internaldofile (void); +void lua_internaldostring (void); +void lua_print (void); +void luaI_type (void); +void lua_obj2number (void); +void luaI_error (void); + #endif @@ -1,30 +1,20 @@ -char *rcs_lex = "$Id: lex.c,v 2.1 1994/04/15 19:00:28 celes Exp $"; -/*$Log: lex.c,v $ - * Revision 2.1 1994/04/15 19:00:28 celes - * Retirar chamada da funcao lua_findsymbol associada a cada - * token NAME. A decisao de chamar lua_findsymbol ou lua_findconstant - * fica a cargo do modulo "lua.stx". - * - * Revision 1.3 1993/12/28 16:42:29 roberto - * "include"s de string.h e stdlib.h para evitar warnings - * - * Revision 1.2 1993/12/22 21:39:15 celes - * Tratamento do token $debug e $nodebug - * - * Revision 1.1 1993/12/22 21:15:16 roberto - * Initial revision - **/ +char *rcs_lex = "$Id: lex.c,v 2.14 1994/12/27 20:50:38 celes Exp $"; + #include <ctype.h> #include <math.h> +#include <stdio.h> #include <stdlib.h> #include <string.h> +#include "tree.h" +#include "table.h" #include "opcode.h" -#include "hash.h" #include "inout.h" -#include "table.h" -#include "y.tab.h" +#include "parser.h" +#include "ugly.h" + +#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); } @@ -49,7 +39,8 @@ char *lua_lasttext (void) } -static struct +/* The reserved words must be listed in lexicographic order */ +static struct { char *name; int token; @@ -71,17 +62,18 @@ static struct {"until", UNTIL}, {"while", WHILE} }; + #define RESERVEDSIZE (sizeof(reserved)/sizeof(reserved[0])) -int findReserved (char *name) +static int findReserved (char *name) { int l = 0; int h = RESERVEDSIZE - 1; while (l <= h) { int m = (l+h)/2; - int comp = strcmp(name, reserved[m].name); + int comp = lua_strcmp(name, reserved[m].name); if (comp < 0) h = m-1; else if (comp == 0) @@ -93,13 +85,20 @@ int findReserved (char *name) } -int yylex () +int yylex (void) { + float a; while (1) { yytextLast = yytext; +#if 0 + fprintf(stderr,"'%c' %d\n",current,current); +#endif switch (current) { + case EOF: + case 0: + return 0; case '\n': lua_linenumber++; case ' ': case '\t': @@ -111,34 +110,39 @@ int yylex () while (isalnum(current) || current == '_') save_and_next(); *yytextLast = 0; - if (strcmp(yytext, "debug") == 0) + if (lua_strcmp(yytext, "debug") == 0) { yylval.vInt = 1; return DEBUG; } - else if (strcmp(yytext, "nodebug") == 0) + else if (lua_strcmp(yytext, "nodebug") == 0) { yylval.vInt = 0; return DEBUG; } return WRONGTOKEN; - + case '-': save_and_next(); if (current != '-') return '-'; do { next(); } while (current != '\n' && current != 0); continue; - + + case '=': + save_and_next(); + if (current != '=') return '='; + else { save_and_next(); return EQ; } + case '<': save_and_next(); if (current != '=') return '<'; else { save_and_next(); return LE; } - + case '>': save_and_next(); if (current != '=') return '>'; else { save_and_next(); return GE; } - + case '~': save_and_next(); if (current != '=') return '~'; @@ -149,12 +153,13 @@ int yylex () { int del = current; next(); /* skip the delimiter */ - while (current != del) + while (current != del) { switch (current) { - case 0: - case '\n': + case EOF: + case 0: + case '\n': return WRONGTOKEN; case '\\': next(); /* do not save the '\' */ @@ -163,16 +168,16 @@ int yylex () case 'n': save('\n'); next(); break; case 't': save('\t'); next(); break; case 'r': save('\r'); next(); break; - default : save('\\'); break; + default : save(current); next(); break; } break; - default: + default: save_and_next(); } } next(); /* skip the delimiter */ *yytextLast = 0; - yylval.vWord = lua_findconstant (yytext); + yylval.vWord = luaI_findconstant(lua_constcreate(yytext)); return STRING; } @@ -190,49 +195,77 @@ int yylex () case 'Z': case '_': { - int res; + Word res; do { save_and_next(); } while (isalnum(current) || current == '_'); *yytextLast = 0; res = findReserved(yytext); if (res) return res; - yylval.pChar = yytext; + yylval.pNode = lua_constcreate(yytext); return NAME; } - + case '.': save_and_next(); - if (current == '.') - { - save_and_next(); + if (current == '.') + { + save_and_next(); return CONC; } else if (!isdigit(current)) return '.'; /* current is a digit: goes through to number */ + a=0.0; goto fraction; case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': - - do { save_and_next(); } while (isdigit(current)); + a=0.0; + do { a=10*a+current-'0'; save_and_next(); } while (isdigit(current)); if (current == '.') save_and_next(); -fraction: while (isdigit(current)) save_and_next(); - if (current == 'e' || current == 'E') - { - save_and_next(); - if (current == '+' || current == '-') save_and_next(); - if (!isdigit(current)) return WRONGTOKEN; - do { save_and_next(); } while (isdigit(current)); +fraction: + { float 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; + 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)); + for (ea=neg?0.1:10.0; e>0; e>>=1) + { + if (e & 1) a*=ea; + ea*=ea; + } + } + yylval.vFloat = a; + return NUMBER; } - *yytextLast = 0; - yylval.vFloat = atof(yytext); - 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(); - return *yytext; + return yytext[0]; } } } } - diff --git a/src/mem.c b/src/mem.c new file mode 100644 index 00000000..90369720 --- /dev/null +++ b/src/mem.c @@ -0,0 +1,44 @@ +/* +** mem.c +** TecCGraf - PUC-Rio +*/ + +char *rcs_mem = "$Id: mem.c,v 1.5 1995/02/06 19:34:03 roberto Exp $"; + +#include <stdlib.h> +#include <string.h> + +#include "mem.h" +#include "lua.h" + +void luaI_free (void *block) +{ + *((int *)block) = -1; /* to catch errors */ + free(block); +} + + +void *luaI_malloc (unsigned long size) +{ + void *block = malloc((size_t)size); + if (block == NULL) + lua_error("not enough memory"); + return block; +} + + +void *luaI_realloc (void *oldblock, unsigned long size) +{ + void *block = realloc(oldblock, (size_t)size); + if (block == NULL) + lua_error("not enough memory"); + return block; +} + + +char *luaI_strdup (char *str) +{ + char *newstr = luaI_malloc(strlen(str)+1); + strcpy(newstr, str); + return newstr; +} diff --git a/src/mem.h b/src/mem.h new file mode 100644 index 00000000..bae5b4d3 --- /dev/null +++ b/src/mem.h @@ -0,0 +1,25 @@ +/* +** mem.c +** memory manager for lua +** $Id: mem.h,v 1.2 1995/01/13 22:11:12 roberto Exp $ +*/ + +#ifndef mem_h +#define mem_h + +#ifndef NULL +#define NULL 0 +#endif + +void luaI_free (void *block); +void *luaI_malloc (unsigned long size); +void *luaI_realloc (void *oldblock, unsigned long size); + +char *luaI_strdup (char *str); + +#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))) + +#endif + diff --git a/src/opcode.c b/src/opcode.c index 6006f7ac..7ce5b2a6 100644 --- a/src/opcode.c +++ b/src/opcode.c @@ -3,171 +3,763 @@ ** TecCGraf - PUC-Rio */ -char *rcs_opcode="$Id: opcode.c,v 2.1 1994/04/20 22:07:57 celes Exp $"; +char *rcs_opcode="$Id: opcode.c,v 3.34 1995/02/06 19:35:09 roberto Exp $"; -#include <stdio.h> +#include <setjmp.h> #include <stdlib.h> +#include <stdio.h> #include <string.h> +#include <math.h> -/* stdlib.h does not have this in SunOS */ -extern double strtod(const char *, char **); - -#include "mm.h" - +#include "mem.h" #include "opcode.h" #include "hash.h" #include "inout.h" #include "table.h" #include "lua.h" +#include "fallback.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)) + + +#define STACK_BUFFER (STACKGAP+128) + +typedef int StkId; /* index to stack elements */ + +static Long maxstack = 0L; +static Object *stack = NULL; +static Object *top = NULL; + + +/* macros to convert from lua_Object to (Object *) and back */ + +#define Address(lo) ((lo)+stack-1) +#define Ref(st) ((st)-stack+1) + + +static StkId CBase = 0; /* when Lua calls C or C calls Lua, points to */ + /* the first slot after the last parameter. */ +static int CnResults = 0; /* when Lua calls C, has the number of parameters; */ + /* when C calls Lua, has the number of results. */ -#define tonumber(o) ((tag(o) != T_NUMBER) && (lua_tonumber(o) != 0)) -#define tostring(o) ((tag(o) != T_STRING) && (lua_tostring(o) != 0)) +static jmp_buf *errorJmp = NULL; /* current error recover point */ -#ifndef MAXSTACK -#define MAXSTACK 256 -#endif -static Object stack[MAXSTACK] = {{T_MARK, {NULL}}}; -static Object *top=stack+1, *base=stack+1; + +static StkId lua_execute (Byte *pc, StkId base); +static void do_call (Object *func, StkId base, int nResults, StkId whereRes); + + + +Object *luaI_Address (lua_Object o) +{ + return Address(o); +} /* -** Concatenate two given string, creating a mark space at the beginning. -** Return the new string pointer. +** Error messages */ -static char *lua_strconc (char *l, char *r) + +static void lua_message (char *s) { - char *s = calloc (strlen(l)+strlen(r)+2, sizeof(char)); - if (s == NULL) - { - lua_error ("not enough memory"); - return NULL; - } - *s++ = 0; /* create mark space */ - return strcat(strcpy(s,l),r); + lua_pushstring(s); + do_call(&luaI_fallBacks[FB_ERROR].function, (top-stack)-1, 0, (top-stack)-1); } /* -** Duplicate a string, creating a mark space at the beginning. -** Return the new string pointer. +** Reports an error, and jumps up to the available recover label */ -char *lua_strdup (char *l) +void lua_error (char *s) { - char *s = calloc (strlen(l)+2, sizeof(char)); - if (s == NULL) - { - lua_error ("not enough memory"); - return NULL; - } - *s++ = 0; /* create mark space */ - return strcpy(s,l); + if (s) lua_message(s); + if (errorJmp) + longjmp(*errorJmp, 1); + else + { + fprintf (stderr, "lua: exit(1). Unable to recover\n"); + exit(1); + } } + /* -** Convert, if possible, to a number tag. -** Return 0 in success or not 0 on error. -*/ -static int lua_tonumber (Object *obj) +** Init stack +*/ +static void lua_initstack (void) { - char *ptr; - if (tag(obj) != T_STRING) - { - lua_reportbug ("unexpected type at conversion to number"); - return 1; - } - nvalue(obj) = strtod(svalue(obj), &ptr); - if (*ptr) - { - lua_reportbug ("string to number convertion failed"); - return 2; - } - tag(obj) = T_NUMBER; - return 0; + maxstack = STACK_BUFFER; + stack = newvector(maxstack, Object); + top = stack; } + /* -** Test if is possible to convert an object to a number one. -** If possible, return the converted object, otherwise return nil object. -*/ -static Object *lua_convtonumber (Object *obj) +** Check stack overflow and, if necessary, realloc vector +*/ +#define lua_checkstack(n) if ((Long)(n) > maxstack) checkstack(n) + +static void checkstack (StkId n) { - static Object cvt; - - if (tag(obj) == T_NUMBER) - { - cvt = *obj; - return &cvt; - } - - tag(&cvt) = T_NIL; - if (tag(obj) == T_STRING) + StkId t; + if (stack == NULL) + lua_initstack(); + if (maxstack >= MAX_INT) + lua_error("stack size overflow"); + t = top-stack; + maxstack *= 2; + if (maxstack >= MAX_INT) + maxstack = MAX_INT; + stack = growvector(stack, maxstack, Object); + top = stack + t; +} + + +/* +** Concatenate two given strings. Return the new string pointer. +*/ +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); + strcpy(buffer+nl, r); + return buffer; +} + + +/* +** Convert, if possible, to a number object. +** Return 0 if success, not 0 if error. +*/ +static int lua_tonumber (Object *obj) +{ + float t; + char c; + if (tag(obj) != LUA_T_STRING) + return 1; + else if (sscanf(svalue(obj), "%f %c",&t, &c) == 1) { - char *ptr; - nvalue(&cvt) = strtod(svalue(obj), &ptr); - if (*ptr == 0) - tag(&cvt) = T_NUMBER; + nvalue(obj) = t; + tag(obj) = LUA_T_NUMBER; + return 0; } - return &cvt; + else + return 2; } - /* ** Convert, if possible, to a string tag ** Return 0 in success or not 0 on error. -*/ +*/ static int lua_tostring (Object *obj) { static char s[256]; - if (tag(obj) != T_NUMBER) - { - lua_reportbug ("unexpected type at conversion to string"); - return 1; - } + if (tag(obj) != LUA_T_NUMBER) + return 1; if ((int) nvalue(obj) == nvalue(obj)) - sprintf (s, "%d", (int) nvalue(obj)); + sprintf (s, "%d", (int) nvalue(obj)); else - sprintf (s, "%g", nvalue(obj)); - svalue(obj) = lua_createstring(lua_strdup(s)); - if (svalue(obj) == NULL) + sprintf (s, "%g", nvalue(obj)); + tsvalue(obj) = lua_createstring(s); + if (tsvalue(obj) == NULL) return 1; - tag(obj) = T_STRING; + tag(obj) = LUA_T_STRING; return 0; } /* -** Execute the given opcode. Return 0 in success or 1 on error. +** Adjust stack. Set top to the given value, pushing NILs if needed. +*/ +static void adjust_top (StkId newtop) +{ + Object *nt = stack+newtop; + while (top < nt) tag(top++) = LUA_T_NIL; + top = nt; /* top could be bigger than newtop */ +} + + +static void adjustC (int nParams) +{ + adjust_top(CBase+nParams); +} + + +/* +** 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. +*/ +static StkId callC (lua_CFunction func, StkId base) +{ + StkId oldBase = CBase; + int oldCnResults = CnResults; + StkId firstResult; + CnResults = (top-stack) - base; + /* incorporate parameters on the stack */ + CBase = base+CnResults; + (*func)(); + firstResult = CBase; + CBase = oldBase; + CnResults = oldCnResults; + return firstResult; +} + +/* +** Call the fallback for invalid functions (see do_call) +*/ +static void call_funcFB (Object *func, StkId base, int nResults, StkId whereRes) +{ + StkId i; + /* open space for first parameter (func) */ + for (i=top-stack; i>base; i--) + stack[i] = stack[i-1]; + top++; + stack[base] = *func; + do_call(&luaI_fallBacks[FB_FUNCTION].function, base, nResults, whereRes); +} + + +/* +** Call a function (C or Lua). The parameters must be on the stack, +** between [stack+base,top). When returns, the results are on the stack, +** between [stack+whereRes,top). The number of results is nResults, unless +** nResults=MULT_RET. +*/ +static void do_call (Object *func, StkId base, int nResults, StkId whereRes) +{ + StkId firstResult; + if (tag(func) == LUA_T_CFUNCTION) + firstResult = callC(fvalue(func), base); + else if (tag(func) == LUA_T_FUNCTION) + firstResult = lua_execute(bvalue(func), base); + else + { /* func is not a function */ + call_funcFB(func, base, nResults, whereRes); + return; + } + /* adjust the number of results */ + if (nResults != MULT_RET && top - (stack+firstResult) != nResults) + adjust_top(firstResult+nResults); + /* move results to the given position */ + if (firstResult != whereRes) + { + int i; + nResults = top - (stack+firstResult); /* actual number of results */ + for (i=0; i<nResults; i++) + *(stack+whereRes+i) = *(stack+firstResult+i); + top -= firstResult-whereRes; + } +} + + +/* +** Function to index a table. Receives the table at top-2 and the index +** at top-1. +*/ +static void pushsubscript (void) +{ + if (tag(top-2) != LUA_T_ARRAY) + do_call(&luaI_fallBacks[FB_GETTABLE].function, (top-stack)-2, 1, (top-stack)-2); + else + { + Object *h = lua_hashget(avalue(top-2), top-1); + if (h == NULL || tag(h) == LUA_T_NIL) + do_call(&luaI_fallBacks[FB_INDEX].function, (top-stack)-2, 1, (top-stack)-2); + else + { + --top; + *(top-1) = *h; + } + } +} + + +/* +** Function to store indexed based on values at the top +*/ +static void storesubscript (void) +{ + if (tag(top-3) != LUA_T_ARRAY) + do_call(&luaI_fallBacks[FB_SETTABLE].function, (top-stack)-3, 0, (top-stack)-3); + else + { + Object *h = lua_hashdefine (avalue(top-3), top-2); + *h = *(top-1); + top -= 3; + } +} + + +/* +** Traverse all objects on stack +*/ +void lua_travstack (void (*fn)(Object *)) +{ + Object *o; + for (o = top-1; o >= stack; o--) + fn (o); +} + + +/* +** Execute a protected call. If function is null compiles the pre-set input. +** Leave nResults on the stack. +*/ +static int do_protectedrun (Object *function, int nResults) +{ + jmp_buf myErrorJmp; + int status; + StkId oldCBase = CBase; + jmp_buf *oldErr = errorJmp; + errorJmp = &myErrorJmp; + if (setjmp(myErrorJmp) == 0) + { + do_call(function, CBase, nResults, CBase); + CnResults = (top-stack) - CBase; /* number of results */ + CBase += CnResults; /* incorporate results on the stack */ + status = 0; + } + else + { + CBase = oldCBase; + top = stack+CBase; + status = 1; + } + errorJmp = oldErr; + return status; +} + + +static int do_protectedmain (void) +{ + Byte *code = NULL; + int status; + StkId oldCBase = CBase; + jmp_buf myErrorJmp; + jmp_buf *oldErr = errorJmp; + errorJmp = &myErrorJmp; + if (setjmp(myErrorJmp) == 0) + { + Object f; + lua_parse(&code); + tag(&f) = LUA_T_FUNCTION; bvalue(&f) = code; + do_call(&f, CBase, 0, CBase); + status = 0; + } + else + status = 1; + if (code) + luaI_free(code); + errorJmp = oldErr; + CBase = oldCBase; + top = stack+CBase; + return status; +} + + +/* +** Execute the given lua function. Return 0 on success or 1 on error. +*/ +int lua_callfunction (lua_Object function) +{ + if (function == LUA_NOOBJECT) + return 1; + else + return do_protectedrun (Address(function), MULT_RET); +} + + +int lua_call (char *funcname) +{ + Word n = luaI_findsymbolbyname(funcname); + return do_protectedrun(&s_object(n), MULT_RET); +} + + +/* +** Open file, generate opcode and execute global statement. Return 0 on +** success or 1 on error. +*/ +int lua_dofile (char *filename) +{ + int status; + char *message = lua_openfile (filename); + if (message) + { + lua_message(message); + return 1; + } + status = do_protectedmain(); + lua_closefile(); + return status; +} + +/* +** Generate opcode stored on string and execute global statement. Return 0 on +** success or 1 on error. +*/ +int lua_dostring (char *string) +{ + int status; + char *message = lua_openstring(string); + if (message) + { + lua_message(message); + return 1; + } + status = do_protectedmain(); + lua_closestring(); + return status; +} + + +/* +** API: set a function as a fallback +*/ +lua_Object lua_setfallback (char *name, lua_CFunction fallback) +{ + static Object func = {LUA_T_CFUNCTION, luaI_setfallback}; + adjustC(0); + lua_pushstring(name); + lua_pushcfunction(fallback); + do_protectedrun(&func, 1); + return (Ref(top-1)); +} + + +/* +** API: receives on the stack the table and the index. +** returns the value. +*/ +lua_Object lua_getsubscript (void) +{ + adjustC(2); + pushsubscript(); + CBase++; /* incorporate object in the stack */ + return (Ref(top-1)); +} + + +#define MAX_C_BLOCKS 10 + +static int numCblocks = 0; +static StkId Cblocks[MAX_C_BLOCKS]; + +/* +** API: starts a new block +*/ +void lua_beginblock (void) +{ + if (numCblocks < MAX_C_BLOCKS) + Cblocks[numCblocks] = CBase; + numCblocks++; +} + +/* +** API: ends a block +*/ +void lua_endblock (void) +{ + --numCblocks; + if (numCblocks < MAX_C_BLOCKS) + { + CBase = Cblocks[numCblocks]; + adjustC(0); + } +} + +/* +** API: receives on the stack the table, the index, and the new value. +*/ +void lua_storesubscript (void) +{ + adjustC(3); + storesubscript(); +} + +/* +** API: creates a new table +*/ +lua_Object lua_createtable (void) +{ + adjustC(0); + avalue(top) = lua_createarray(0); + tag(top) = LUA_T_ARRAY; + top++; + CBase++; /* incorporate object in the stack */ + return Ref(top-1); +} + +/* +** Get a parameter, returning the object handle or LUA_NOOBJECT on error. +** 'number' must be 1 to get the first parameter. +*/ +lua_Object lua_getparam (int number) +{ + if (number <= 0 || number > CnResults) return LUA_NOOBJECT; + /* Ref(stack+(CBase-CnResults+number-1)) == + stack+(CBase-CnResults+number-1)-stack+1 == */ + return CBase-CnResults+number; +} + +/* +** Given an object handle, return its number value. On error, return 0.0. +*/ +real lua_getnumber (lua_Object object) +{ + if (object == LUA_NOOBJECT || tag(Address(object)) == LUA_T_NIL) return 0.0; + if (tonumber (Address(object))) return 0.0; + else return (nvalue(Address(object))); +} + +/* +** Given an object handle, return its string pointer. On error, return NULL. +*/ +char *lua_getstring (lua_Object object) +{ + if (object == LUA_NOOBJECT || tag(Address(object)) == LUA_T_NIL) return NULL; + if (tostring (Address(object))) return NULL; + else return (svalue(Address(object))); +} + +/* +** Given an object handle, return its cfuntion pointer. On error, return NULL. +*/ +lua_CFunction lua_getcfunction (lua_Object object) +{ + if (object == LUA_NOOBJECT || tag(Address(object)) != LUA_T_CFUNCTION) + return NULL; + else return (fvalue(Address(object))); +} + +/* +** Given an object handle, return its user data. On error, return NULL. +*/ +void *lua_getuserdata (lua_Object object) +{ + if (object == LUA_NOOBJECT || tag(Address(object)) < LUA_T_USERDATA) + return NULL; + else return (uvalue(Address(object))); +} + + +lua_Object lua_getlocked (int ref) +{ + adjustC(0); + *top = *luaI_getlocked(ref); + top++; + CBase++; /* incorporate object in the stack */ + return Ref(top-1); +} + + +void lua_pushlocked (int ref) +{ + lua_checkstack(top-stack+1); + *top = *luaI_getlocked(ref); + top++; +} + + +int lua_lock (void) +{ + adjustC(1); + return luaI_lock(--top); +} + + +/* +** Get a global object. Return the object handle or NULL on error. +*/ +lua_Object lua_getglobal (char *name) +{ + Word n = luaI_findsymbolbyname(name); + adjustC(0); + *top = s_object(n); + top++; + CBase++; /* incorporate object in the stack */ + return Ref(top-1); +} + +/* +** Store top of the stack at a global variable array field. +*/ +void lua_storeglobal (char *name) +{ + Word n = luaI_findsymbolbyname(name); + adjustC(1); + s_object(n) = *(--top); +} + +/* +** Push a nil object +*/ +void lua_pushnil (void) +{ + lua_checkstack(top-stack+1); + tag(top++) = LUA_T_NIL; +} + +/* +** Push an object (tag=number) to stack. +*/ +void lua_pushnumber (real n) +{ + lua_checkstack(top-stack+1); + tag(top) = LUA_T_NUMBER; nvalue(top++) = n; +} + +/* +** Push an object (tag=string) to stack. +*/ +void lua_pushstring (char *s) +{ + lua_checkstack(top-stack+1); + tsvalue(top) = lua_createstring(s); + tag(top) = LUA_T_STRING; + top++; +} + +/* +** Push an object (tag=string) on stack and register it on the constant table. +*/ +void lua_pushliteral (char *s) +{ + lua_checkstack(top-stack+1); + tsvalue(top) = lua_constant[luaI_findconstant(lua_constcreate(s))]; + tag(top) = LUA_T_STRING; + top++; +} + +/* +** Push an object (tag=cfunction) to stack. +*/ +void lua_pushcfunction (lua_CFunction fn) +{ + lua_checkstack(top-stack+1); + tag(top) = LUA_T_CFUNCTION; fvalue(top++) = fn; +} + +/* +** Push an object (tag=userdata) to stack. +*/ +void lua_pushusertag (void *u, int tag) +{ + if (tag < LUA_T_USERDATA) return; + lua_checkstack(top-stack+1); + tag(top) = tag; uvalue(top++) = u; +} + +/* +** Push a lua_Object to stack. +*/ +void lua_pushobject (lua_Object o) +{ + lua_checkstack(top-stack+1); + *top++ = *Address(o); +} + +/* +** Push an object on the stack. +*/ +void luaI_pushobject (Object *o) +{ + lua_checkstack(top-stack+1); + *top++ = *o; +} + +int lua_type (lua_Object o) +{ + if (o == LUA_NOOBJECT) + return LUA_T_NIL; + else + return tag(Address(o)); +} + + +void luaI_gcFB (Object *o) +{ + *(top++) = *o; + do_call(&luaI_fallBacks[FB_GC].function, (top-stack)-1, 0, (top-stack)-1); +} + + +static void call_arith (char *op) +{ + lua_pushstring(op); + do_call(&luaI_fallBacks[FB_ARITH].function, (top-stack)-3, 1, (top-stack)-3); +} + +static void comparison (lua_Type tag_less, lua_Type tag_equal, + lua_Type tag_great, char *op) +{ + Object *l = top-2; + Object *r = top-1; + int result; + if (tag(l) == LUA_T_NUMBER && tag(r) == LUA_T_NUMBER) + result = (nvalue(l) < nvalue(r)) ? -1 : (nvalue(l) == nvalue(r)) ? 0 : 1; + else if (tostring(l) || tostring(r)) + { + lua_pushstring(op); + do_call(&luaI_fallBacks[FB_ORDER].function, (top-stack)-3, 1, (top-stack)-3); + return; + } + else + result = strcmp(svalue(l), svalue(r)); + top--; + nvalue(top-1) = 1; + tag(top-1) = (result < 0) ? tag_less : (result == 0) ? tag_equal : tag_great; +} + + + +/* +** Execute the given opcode, until a RET. Parameters are between +** [stack+base,top). Returns n such that the the results are between +** [stack+n,top). */ -int lua_execute (Byte *pc) +static StkId lua_execute (Byte *pc, StkId base) { - Object *oldbase = base; - base = top; + lua_checkstack(STACKGAP+MAX_TEMPS+base); while (1) { OpCode opcode; switch (opcode = (OpCode)*pc++) { - case PUSHNIL: tag(top++) = T_NIL; break; - - case PUSH0: tag(top) = T_NUMBER; nvalue(top++) = 0; break; - case PUSH1: tag(top) = T_NUMBER; nvalue(top++) = 1; break; - case PUSH2: tag(top) = T_NUMBER; nvalue(top++) = 2; break; - - case PUSHBYTE: tag(top) = T_NUMBER; nvalue(top++) = *pc++; break; - - case PUSHWORD: + case PUSHNIL: tag(top++) = LUA_T_NIL; break; + + case PUSH0: case PUSH1: case PUSH2: + tag(top) = LUA_T_NUMBER; + nvalue(top++) = opcode-PUSH0; + break; + + case PUSHBYTE: tag(top) = LUA_T_NUMBER; nvalue(top++) = *pc++; break; + + case PUSHWORD: { CodeWord code; get_word(code,pc); - tag(top) = T_NUMBER; nvalue(top++) = code.w; + tag(top) = LUA_T_NUMBER; nvalue(top++) = code.w; } break; - + case PUSHFLOAT: { CodeFloat code; get_float(code,pc); - tag(top) = T_NUMBER; nvalue(top++) = code.f; + tag(top) = LUA_T_NUMBER; nvalue(top++) = code.f; } break; @@ -175,50 +767,57 @@ int lua_execute (Byte *pc) { CodeWord code; get_word(code,pc); - tag(top) = T_STRING; svalue(top++) = lua_constant[code.w]; + tag(top) = LUA_T_STRING; tsvalue(top++) = lua_constant[code.w]; } break; - + + case PUSHFUNCTION: + { + CodeCode code; + get_code(code,pc); + tag(top) = LUA_T_FUNCTION; bvalue(top++) = code.b; + } + break; + case PUSHLOCAL0: case PUSHLOCAL1: case PUSHLOCAL2: case PUSHLOCAL3: case PUSHLOCAL4: case PUSHLOCAL5: case PUSHLOCAL6: case PUSHLOCAL7: case PUSHLOCAL8: - case PUSHLOCAL9: *top++ = *(base + (int)(opcode-PUSHLOCAL0)); break; - - case PUSHLOCAL: *top++ = *(base + (*pc++)); break; - - case PUSHGLOBAL: + case PUSHLOCAL9: *top++ = *((stack+base) + (int)(opcode-PUSHLOCAL0)); break; + + case PUSHLOCAL: *top++ = *((stack+base) + (*pc++)); break; + + case PUSHGLOBAL: { CodeWord code; get_word(code,pc); *top++ = s_object(code.w); } break; - + case PUSHINDEXED: - --top; - if (tag(top-1) != T_ARRAY) - { - lua_reportbug ("indexed expression not a table"); - return 1; - } - { - Object *h = lua_hashdefine (avalue(top-1), top); - if (h == NULL) return 1; - *(top-1) = *h; - } - break; - - case PUSHMARK: tag(top++) = T_MARK; break; - - case PUSHOBJECT: *top = *(top-3); top++; break; - + pushsubscript(); + break; + + case PUSHSELF: + { + Object receiver = *(top-1); + CodeWord code; + get_word(code,pc); + tag(top) = LUA_T_STRING; tsvalue(top++) = lua_constant[code.w]; + pushsubscript(); + *(top++) = receiver; + break; + } + case STORELOCAL0: case STORELOCAL1: case STORELOCAL2: case STORELOCAL3: case STORELOCAL4: case STORELOCAL5: case STORELOCAL6: case STORELOCAL7: case STORELOCAL8: - case STORELOCAL9: *(base + (int)(opcode-STORELOCAL0)) = *(--top); break; - - case STORELOCAL: *(base + (*pc++)) = *(--top); break; - + case STORELOCAL9: + *((stack+base) + (int)(opcode-STORELOCAL0)) = *(--top); + break; + + case STORELOCAL: *((stack+base) + (*pc++)) = *(--top); break; + case STOREGLOBAL: { CodeWord code; @@ -228,36 +827,29 @@ int lua_execute (Byte *pc) break; case STOREINDEXED0: - if (tag(top-3) != T_ARRAY) - { - lua_reportbug ("indexed expression not a table"); - return 1; - } - { - Object *h = lua_hashdefine (avalue(top-3), top-2); - if (h == NULL) return 1; - *h = *(top-1); - } - top -= 3; - break; - + storesubscript(); + break; + case STOREINDEXED: { int n = *pc++; - if (tag(top-3-n) != T_ARRAY) + if (tag(top-3-n) != LUA_T_ARRAY) { - lua_reportbug ("indexed expression not a table"); - return 1; + *(top+1) = *(top-1); + *(top) = *(top-2-n); + *(top-1) = *(top-3-n); + top += 2; + do_call(&luaI_fallBacks[FB_SETTABLE].function, (top-stack)-3, 0, (top-stack)-3); } + else { Object *h = lua_hashdefine (avalue(top-3-n), top-2-n); - if (h == NULL) return 1; *h = *(top-1); + top--; } - top--; } break; - + case STORELIST0: case STORELIST: { @@ -267,206 +859,180 @@ int lua_execute (Byte *pc) else m = *(pc++) * FIELDS_PER_FLUSH; n = *(pc++); arr = top-n-1; - if (tag(arr) != T_ARRAY) - { - lua_reportbug ("internal error - table expected"); - return 1; - } while (n) { - tag(top) = T_NUMBER; nvalue(top) = n+m; + tag(top) = LUA_T_NUMBER; nvalue(top) = n+m; *(lua_hashdefine (avalue(arr), top)) = *(top-1); top--; n--; } } break; - + case STORERECORD: { int n = *(pc++); Object *arr = top-n-1; - if (tag(arr) != T_ARRAY) - { - lua_reportbug ("internal error - table expected"); - return 1; - } while (n) { CodeWord code; get_word(code,pc); - tag(top) = T_STRING; svalue(top) = lua_constant[code.w]; + tag(top) = LUA_T_STRING; tsvalue(top) = lua_constant[code.w]; *(lua_hashdefine (avalue(arr), top)) = *(top-1); top--; n--; } } break; - + + case ADJUST0: + adjust_top(base); + break; + case ADJUST: + adjust_top(base + *(pc++)); + break; + + case CREATEARRAY: { - Object *newtop = base + *(pc++); - while (top < newtop) tag(top++) = T_NIL; - top = newtop; /* top could be bigger than newtop */ + CodeWord size; + get_word(size,pc); + avalue(top) = lua_createarray(size.w); + tag(top) = LUA_T_ARRAY; + top++; } break; - - case CREATEARRAY: - if (tag(top-1) == T_NIL) - nvalue(top-1) = 101; - else - { - if (tonumber(top-1)) return 1; - if (nvalue(top-1) <= 0) nvalue(top-1) = 101; - } - avalue(top-1) = lua_createarray(nvalue(top-1)); - if (avalue(top-1) == NULL) - return 1; - tag(top-1) = T_ARRAY; - break; - + case EQOP: { - Object *l = top-2; - Object *r = top-1; + int res = lua_equalObj(top-2, top-1); --top; - if (tag(l) != tag(r)) - tag(top-1) = T_NIL; - else - { - switch (tag(l)) - { - case T_NIL: tag(top-1) = T_NUMBER; break; - case T_NUMBER: tag(top-1) = (nvalue(l) == nvalue(r)) ? T_NUMBER : T_NIL; break; - case T_ARRAY: tag(top-1) = (avalue(l) == avalue(r)) ? T_NUMBER : T_NIL; break; - case T_FUNCTION: tag(top-1) = (bvalue(l) == bvalue(r)) ? T_NUMBER : T_NIL; break; - case T_CFUNCTION: tag(top-1) = (fvalue(l) == fvalue(r)) ? T_NUMBER : T_NIL; break; - case T_USERDATA: tag(top-1) = (uvalue(l) == uvalue(r)) ? T_NUMBER : T_NIL; break; - case T_STRING: tag(top-1) = (strcmp (svalue(l), svalue(r)) == 0) ? T_NUMBER : T_NIL; break; - case T_MARK: return 1; - } - } + tag(top-1) = res ? LUA_T_NUMBER : LUA_T_NIL; nvalue(top-1) = 1; } break; - - case LTOP: + + case LTOP: + comparison(LUA_T_NUMBER, LUA_T_NIL, LUA_T_NIL, "lt"); + break; + + case LEOP: + comparison(LUA_T_NUMBER, LUA_T_NUMBER, LUA_T_NIL, "le"); + break; + + case GTOP: + comparison(LUA_T_NIL, LUA_T_NIL, LUA_T_NUMBER, "gt"); + break; + + case GEOP: + comparison(LUA_T_NIL, LUA_T_NUMBER, LUA_T_NUMBER, "ge"); + break; + + case ADDOP: { Object *l = top-2; Object *r = top-1; - --top; - if (tag(l) == T_NUMBER && tag(r) == T_NUMBER) - tag(top-1) = (nvalue(l) < nvalue(r)) ? T_NUMBER : T_NIL; + if (tonumber(r) || tonumber(l)) + call_arith("add"); else { - if (tostring(l) || tostring(r)) - return 1; - tag(top-1) = (strcmp (svalue(l), svalue(r)) < 0) ? T_NUMBER : T_NIL; + nvalue(l) += nvalue(r); + --top; } - nvalue(top-1) = 1; } break; - - case LEOP: + + case SUBOP: { Object *l = top-2; Object *r = top-1; - --top; - if (tag(l) == T_NUMBER && tag(r) == T_NUMBER) - tag(top-1) = (nvalue(l) <= nvalue(r)) ? T_NUMBER : T_NIL; + if (tonumber(r) || tonumber(l)) + call_arith("sub"); else { - if (tostring(l) || tostring(r)) - return 1; - tag(top-1) = (strcmp (svalue(l), svalue(r)) <= 0) ? T_NUMBER : T_NIL; + nvalue(l) -= nvalue(r); + --top; } - nvalue(top-1) = 1; } break; - - case ADDOP: - { - Object *l = top-2; - Object *r = top-1; - if (tonumber(r) || tonumber(l)) - return 1; - nvalue(l) += nvalue(r); - --top; - } - break; - - case SUBOP: - { - Object *l = top-2; - Object *r = top-1; - if (tonumber(r) || tonumber(l)) - return 1; - nvalue(l) -= nvalue(r); - --top; - } - break; - + case MULTOP: { Object *l = top-2; Object *r = top-1; if (tonumber(r) || tonumber(l)) - return 1; - nvalue(l) *= nvalue(r); - --top; + call_arith("mul"); + else + { + nvalue(l) *= nvalue(r); + --top; + } } - break; - + break; + case DIVOP: { Object *l = top-2; Object *r = top-1; if (tonumber(r) || tonumber(l)) - return 1; - nvalue(l) /= nvalue(r); - --top; + call_arith("div"); + else + { + nvalue(l) /= nvalue(r); + --top; + } } - break; - + break; + + case POWOP: + call_arith("pow"); + break; + case CONCOP: { Object *l = top-2; Object *r = top-1; if (tostring(r) || tostring(l)) - return 1; - svalue(l) = lua_createstring (lua_strconc(svalue(l),svalue(r))); - if (svalue(l) == NULL) - return 1; - --top; + do_call(&luaI_fallBacks[FB_CONCAT].function, (top-stack)-2, 1, (top-stack)-2); + else + { + tsvalue(l) = lua_createstring (lua_strconc(svalue(l),svalue(r))); + --top; + } } - break; - + break; + case MINUSOP: if (tonumber(top-1)) - return 1; - nvalue(top-1) = - nvalue(top-1); - break; - + { + tag(top++) = LUA_T_NIL; + call_arith("unm"); + } + else + nvalue(top-1) = - nvalue(top-1); + break; + case NOTOP: - tag(top-1) = tag(top-1) == T_NIL ? T_NUMBER : T_NIL; - break; - + tag(top-1) = (tag(top-1) == LUA_T_NIL) ? LUA_T_NUMBER : LUA_T_NIL; + nvalue(top-1) = 1; + break; + case ONTJMP: { CodeWord code; get_word(code,pc); - if (tag(top-1) != T_NIL) pc += code.w; + if (tag(top-1) != LUA_T_NIL) pc += code.w; } break; - - case ONFJMP: + + case ONFJMP: { CodeWord code; get_word(code,pc); - if (tag(top-1) == T_NIL) pc += code.w; + if (tag(top-1) == LUA_T_NIL) pc += code.w; } break; - + case JMP: { CodeWord code; @@ -474,7 +1040,7 @@ int lua_execute (Byte *pc) pc += code.w; } break; - + case UPJMP: { CodeWord code; @@ -482,13 +1048,13 @@ int lua_execute (Byte *pc) pc -= code.w; } break; - + case IFFJMP: { CodeWord code; get_word(code,pc); top--; - if (tag(top) == T_NIL) pc += code.w; + if (tag(top) == LUA_T_NIL) pc += code.w; } break; @@ -497,91 +1063,38 @@ int lua_execute (Byte *pc) CodeWord code; get_word(code,pc); top--; - if (tag(top) == T_NIL) pc -= code.w; + if (tag(top) == LUA_T_NIL) pc -= code.w; } break; case POP: --top; break; - + case CALLFUNC: { - Byte *newpc; - Object *b = top-1; - while (tag(b) != T_MARK) b--; - if (tag(b-1) == T_FUNCTION) - { - lua_debugline = 0; /* always reset debug flag */ - newpc = bvalue(b-1); - bvalue(b-1) = pc; /* store return code */ - nvalue(b) = (base-stack); /* store base value */ - base = b+1; - pc = newpc; - if (MAXSTACK-(base-stack) < STACKGAP) - { - lua_error ("stack overflow"); - return 1; - } - } - else if (tag(b-1) == T_CFUNCTION) - { - int nparam; - lua_debugline = 0; /* always reset debug flag */ - nvalue(b) = (base-stack); /* store base value */ - base = b+1; - nparam = top-base; /* number of parameters */ - (fvalue(b-1))(); /* call C function */ - - /* shift returned values */ - { - int i; - int nretval = top - base - nparam; - top = base - 2; - base = stack + (int) nvalue(base-1); - for (i=0; i<nretval; i++) - { - *top = *(top+nparam+2); - ++top; - } - } - } - else - { - lua_reportbug ("call expression not a function"); - return 1; - } + int nParams = *(pc++); + int nResults = *(pc++); + Object *func = top-1-nParams; /* function is below parameters */ + StkId newBase = (top-stack)-nParams; + do_call(func, newBase, nResults, newBase-1); } break; - + + case RETCODE0: + return base; + case RETCODE: - { - int i; - int shift = *pc++; - int nretval = top - base - shift; - top = base - 2; - pc = bvalue(base-2); - base = stack + (int) nvalue(base-1); - for (i=0; i<nretval; i++) - { - *top = *(top+shift+2); - ++top; - } - } - break; - - case HALT: - base = oldbase; - return 0; /* success */ - + return base+*pc; + case SETFUNCTION: { - CodeWord file, func; - get_word(file,pc); + CodeCode file; + CodeWord func; + get_code(file,pc); get_word(func,pc); - if (lua_pushfunction (file.w, func.w)) - return 1; + lua_pushfunction ((char *)file.b, func.w); } break; - + case SETLINE: { CodeWord code; @@ -589,433 +1102,15 @@ int lua_execute (Byte *pc) lua_debugline = code.w; } break; - + case RESET: lua_popfunction (); break; - + default: - lua_error ("internal error - opcode didn't match"); - return 1; + lua_error ("internal error - opcode doesn't match"); } } } -/* -** Traverse all objects on stack -*/ -void lua_travstack (void (*fn)(Object *)) -{ - Object *o; - for (o = top-1; o >= stack; o--) - fn (o); -} - -/* -** Open file, generate opcode and execute global statement. Return 0 on -** success or 1 on error. -*/ -int lua_dofile (char *filename) -{ - if (lua_openfile (filename)) return 1; - if (lua_parse ()) { lua_closefile (); return 1; } - lua_closefile (); - return 0; -} - -/* -** Generate opcode stored on string and execute global statement. Return 0 on -** success or 1 on error. -*/ -int lua_dostring (char *string) -{ - if (lua_openstring (string)) return 1; - if (lua_parse ()) return 1; - lua_closestring(); - return 0; -} - -/* -** Execute the given function. Return 0 on success or 1 on error. -*/ -int lua_call (char *functionname, int nparam) -{ - static Byte startcode[] = {CALLFUNC, HALT}; - int i; - Object func = s_object(lua_findsymbol(functionname)); - if (tag(&func) != T_FUNCTION) return 1; - for (i=1; i<=nparam; i++) - *(top-i+2) = *(top-i); - top += 2; - tag(top-nparam-1) = T_MARK; - *(top-nparam-2) = func; - return (lua_execute (startcode)); -} - -/* -** Get a parameter, returning the object handle or NULL on error. -** 'number' must be 1 to get the first parameter. -*/ -Object *lua_getparam (int number) -{ - if (number <= 0 || number > top-base) return NULL; - return (base+number-1); -} - -/* -** Given an object handle, return its number value. On error, return 0.0. -*/ -real lua_getnumber (Object *object) -{ - if (object == NULL || tag(object) == T_NIL) return 0.0; - if (tonumber (object)) return 0.0; - else return (nvalue(object)); -} - -/* -** Given an object handle, return its string pointer. On error, return NULL. -*/ -char *lua_getstring (Object *object) -{ - if (object == NULL || tag(object) == T_NIL) return NULL; - if (tostring (object)) return NULL; - else return (svalue(object)); -} - -/* -** Given an object handle, return a copy of its string. On error, return NULL. -*/ -char *lua_copystring (Object *object) -{ - if (object == NULL || tag(object) == T_NIL) return NULL; - if (tostring (object)) return NULL; - else return (strdup(svalue(object))); -} - -/* -** Given an object handle, return its cfuntion pointer. On error, return NULL. -*/ -lua_CFunction lua_getcfunction (Object *object) -{ - if (object == NULL) return NULL; - if (tag(object) != T_CFUNCTION) return NULL; - else return (fvalue(object)); -} - -/* -** Given an object handle, return its user data. On error, return NULL. -*/ -void *lua_getuserdata (Object *object) -{ - if (object == NULL) return NULL; - if (tag(object) != T_USERDATA) return NULL; - else return (uvalue(object)); -} - -/* -** Given an object handle and a field name, return its field object. -** On error, return NULL. -*/ -Object *lua_getfield (Object *object, char *field) -{ - if (object == NULL) return NULL; - if (tag(object) != T_ARRAY) - return NULL; - else - { - Object ref; - tag(&ref) = T_STRING; - svalue(&ref) = lua_createstring(lua_strdup(field)); - return (lua_hashdefine(avalue(object), &ref)); - } -} - -/* -** Given an object handle and an index, return its indexed object. -** On error, return NULL. -*/ -Object *lua_getindexed (Object *object, float index) -{ - if (object == NULL) return NULL; - if (tag(object) != T_ARRAY) - return NULL; - else - { - Object ref; - tag(&ref) = T_NUMBER; - nvalue(&ref) = index; - return (lua_hashdefine(avalue(object), &ref)); - } -} - -/* -** Get a global object. Return the object handle or NULL on error. -*/ -Object *lua_getglobal (char *name) -{ - int n = lua_findsymbol(name); - if (n < 0) return NULL; - return &s_object(n); -} - -/* -** Pop and return an object -*/ -Object *lua_pop (void) -{ - if (top <= base) return NULL; - top--; - return top; -} - -/* -** Push a nil object -*/ -int lua_pushnil (void) -{ - if ((top-stack) >= MAXSTACK-1) - { - lua_error ("stack overflow"); - return 1; - } - tag(top) = T_NIL; - return 0; -} - -/* -** Push an object (tag=number) to stack. Return 0 on success or 1 on error. -*/ -int lua_pushnumber (real n) -{ - if ((top-stack) >= MAXSTACK-1) - { - lua_error ("stack overflow"); - return 1; - } - tag(top) = T_NUMBER; nvalue(top++) = n; - return 0; -} - -/* -** Push an object (tag=string) to stack. Return 0 on success or 1 on error. -*/ -int lua_pushstring (char *s) -{ - if ((top-stack) >= MAXSTACK-1) - { - lua_error ("stack overflow"); - return 1; - } - tag(top) = T_STRING; - svalue(top++) = lua_createstring(lua_strdup(s)); - return 0; -} - -/* -** Push an object (tag=cfunction) to stack. Return 0 on success or 1 on error. -*/ -int lua_pushcfunction (lua_CFunction fn) -{ - if ((top-stack) >= MAXSTACK-1) - { - lua_error ("stack overflow"); - return 1; - } - tag(top) = T_CFUNCTION; fvalue(top++) = fn; - return 0; -} - -/* -** Push an object (tag=userdata) to stack. Return 0 on success or 1 on error. -*/ -int lua_pushuserdata (void *u) -{ - if ((top-stack) >= MAXSTACK-1) - { - lua_error ("stack overflow"); - return 1; - } - tag(top) = T_USERDATA; uvalue(top++) = u; - return 0; -} - -/* -** Push an object to stack. -*/ -int lua_pushobject (Object *o) -{ - if ((top-stack) >= MAXSTACK-1) - { - lua_error ("stack overflow"); - return 1; - } - *top++ = *o; - return 0; -} - -/* -** Store top of the stack at a global variable array field. -** Return 1 on error, 0 on success. -*/ -int lua_storeglobal (char *name) -{ - int n = lua_findsymbol (name); - if (n < 0) return 1; - if (tag(top-1) == T_MARK) return 1; - s_object(n) = *(--top); - return 0; -} - -/* -** Store top of the stack at an array field. Return 1 on error, 0 on success. -*/ -int lua_storefield (lua_Object object, char *field) -{ - if (tag(object) != T_ARRAY) - return 1; - else - { - Object ref, *h; - tag(&ref) = T_STRING; - svalue(&ref) = lua_createstring(lua_strdup(field)); - h = lua_hashdefine(avalue(object), &ref); - if (h == NULL) return 1; - if (tag(top-1) == T_MARK) return 1; - *h = *(--top); - } - return 0; -} - - -/* -** Store top of the stack at an array index. Return 1 on error, 0 on success. -*/ -int lua_storeindexed (lua_Object object, float index) -{ - if (tag(object) != T_ARRAY) - return 1; - else - { - Object ref, *h; - tag(&ref) = T_NUMBER; - nvalue(&ref) = index; - h = lua_hashdefine(avalue(object), &ref); - if (h == NULL) return 1; - if (tag(top-1) == T_MARK) return 1; - *h = *(--top); - } - return 0; -} - - -/* -** Given an object handle, return if it is nil. -*/ -int lua_isnil (Object *object) -{ - return (object != NULL && tag(object) == T_NIL); -} - -/* -** Given an object handle, return if it is a number one. -*/ -int lua_isnumber (Object *object) -{ - return (object != NULL && tag(object) == T_NUMBER); -} - -/* -** Given an object handle, return if it is a string one. -*/ -int lua_isstring (Object *object) -{ - return (object != NULL && tag(object) == T_STRING); -} - -/* -** Given an object handle, return if it is an array one. -*/ -int lua_istable (Object *object) -{ - return (object != NULL && tag(object) == T_ARRAY); -} - -/* -** Given an object handle, return if it is a cfunction one. -*/ -int lua_iscfunction (Object *object) -{ - return (object != NULL && tag(object) == T_CFUNCTION); -} - -/* -** Given an object handle, return if it is an user data one. -*/ -int lua_isuserdata (Object *object) -{ - return (object != NULL && tag(object) == T_USERDATA); -} - -/* -** Internal function: return an object type. -*/ -void lua_type (void) -{ - Object *o = lua_getparam(1); - lua_pushstring (lua_constant[tag(o)]); -} - -/* -** Internal function: convert an object to a number -*/ -void lua_obj2number (void) -{ - Object *o = lua_getparam(1); - lua_pushobject (lua_convtonumber(o)); -} - -/* -** Internal function: print object values -*/ -void lua_print (void) -{ - int i=1; - void *obj; - while ((obj=lua_getparam (i++)) != NULL) - { - if (lua_isnumber(obj)) printf("%g\n",lua_getnumber (obj)); - else if (lua_isstring(obj)) printf("%s\n",lua_getstring (obj)); - 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",obj); - else if (lua_isnil(obj)) printf("nil\n"); - else printf("invalid value to print\n"); - } -} - -/* -** Internal function: do a file -*/ -void lua_internaldofile (void) -{ - lua_Object obj = lua_getparam (1); - if (lua_isstring(obj) && !lua_dofile(lua_getstring(obj))) - lua_pushnumber(1); - else - lua_pushnil(); -} - -/* -** Internal function: do a string -*/ -void lua_internaldostring (void) -{ - lua_Object obj = lua_getparam (1); - if (lua_isstring(obj) && !lua_dostring(lua_getstring(obj))) - lua_pushnumber(1); - else - lua_pushnil(); -} - - diff --git a/src/opcode.h b/src/opcode.h index abf284c4..e3a6d37c 100644 --- a/src/opcode.h +++ b/src/opcode.h @@ -1,11 +1,15 @@ /* ** TeCGraf - PUC-Rio -** $Id: opcode.h,v 2.1 1994/04/20 22:07:57 celes Exp $ +** $Id: opcode.h,v 3.10 1994/12/20 21:20:36 roberto Exp $ */ #ifndef opcode_h #define opcode_h +#include "lua.h" +#include "types.h" +#include "tree.h" + #ifndef STACKGAP #define STACKGAP 128 #endif @@ -16,21 +20,8 @@ #define FIELDS_PER_FLUSH 40 -typedef unsigned char Byte; - -typedef unsigned short Word; - -typedef union -{ - struct {char c1; char c2;} m; - Word w; -} CodeWord; +#define MAX_TEMPS 20 -typedef union -{ - struct {char c1; char c2; char c3; char c4;} m; - float f; -} CodeFloat; typedef enum { @@ -40,13 +31,13 @@ typedef enum PUSHWORD, PUSHFLOAT, PUSHSTRING, + PUSHFUNCTION, PUSHLOCAL0, PUSHLOCAL1, PUSHLOCAL2, PUSHLOCAL3, PUSHLOCAL4, PUSHLOCAL5, PUSHLOCAL6, PUSHLOCAL7, PUSHLOCAL8, PUSHLOCAL9, PUSHLOCAL, PUSHGLOBAL, PUSHINDEXED, - PUSHMARK, - PUSHOBJECT, + PUSHSELF, STORELOCAL0, STORELOCAL1, STORELOCAL2, STORELOCAL3, STORELOCAL4, STORELOCAL5, STORELOCAL6, STORELOCAL7, STORELOCAL8, STORELOCAL9, STORELOCAL, @@ -56,15 +47,19 @@ typedef enum STORELIST0, STORELIST, STORERECORD, + ADJUST0, ADJUST, CREATEARRAY, EQOP, LTOP, LEOP, + GTOP, + GEOP, ADDOP, SUBOP, MULTOP, DIVOP, + POWOP, CONCOP, MINUSOP, NOTOP, @@ -76,61 +71,51 @@ typedef enum IFFUPJMP, POP, CALLFUNC, + RETCODE0, RETCODE, - HALT, SETFUNCTION, SETLINE, RESET } OpCode; -typedef enum -{ - T_MARK, - T_NIL, - T_NUMBER, - T_STRING, - T_ARRAY, - T_FUNCTION, - T_CFUNCTION, - T_USERDATA -} Type; +#define MULT_RET 255 + typedef void (*Cfunction) (void); typedef int (*Input) (void); typedef union { - Cfunction f; - real n; - char *s; - Byte *b; + Cfunction f; + real n; + TaggedString *ts; + Byte *b; struct Hash *a; void *u; } Value; typedef struct Object { - Type tag; + lua_Type tag; Value value; } Object; typedef struct { - char *name; Object object; } Symbol; /* Macros to access structure members */ #define tag(o) ((o)->tag) #define nvalue(o) ((o)->value.n) -#define svalue(o) ((o)->value.s) +#define svalue(o) ((o)->value.ts->str) +#define tsvalue(o) ((o)->value.ts) #define bvalue(o) ((o)->value.b) #define avalue(o) ((o)->value.a) #define fvalue(o) ((o)->value.f) #define uvalue(o) ((o)->value.u) /* Macros to access symbol table */ -#define s_name(i) (lua_table[i].name) #define s_object(i) (lua_table[i].object) #define s_tag(i) (tag(&s_object(i))) #define s_nvalue(i) (nvalue(&s_object(i))) @@ -140,25 +125,40 @@ typedef struct #define s_fvalue(i) (fvalue(&s_object(i))) #define s_uvalue(i) (uvalue(&s_object(i))) +typedef union +{ + struct {char c1; char 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; + float f; +} CodeFloat; #define get_float(code,pc) {code.m.c1 = *pc++; code.m.c2 = *pc++;\ code.m.c3 = *pc++; code.m.c4 = *pc++;} - + +typedef union +{ + struct {char c1; char c2; char c3; char c4;} m; + Byte *b; +} CodeCode; +#define get_code(code,pc) {code.m.c1 = *pc++; code.m.c2 = *pc++;\ + code.m.c3 = *pc++; code.m.c4 = *pc++;} /* Exported functions */ -int lua_execute (Byte *pc); -void lua_markstack (void); char *lua_strdup (char *l); void lua_setinput (Input fn); /* from "lex.c" module */ char *lua_lasttext (void); /* from "lex.c" module */ -int lua_parse (void); /* from "lua.stx" module */ -void lua_type (void); -void lua_obj2number (void); -void lua_print (void); -void lua_internaldofile (void); -void lua_internaldostring (void); +int yylex (void); /* from "lex.c" module */ +void lua_parse (Byte **code); /* from "lua.stx" module */ void lua_travstack (void (*fn)(Object *)); +Object *luaI_Address (lua_Object o); +void luaI_pushobject (Object *o); +void luaI_gcFB (Object *o); #endif diff --git a/src/y.tab.c b/src/parser.c index 70dbd3cd..47b77fb0 100644 --- a/src/y.tab.c +++ b/src/parser.c @@ -1,36 +1,56 @@ +#if defined (__cplusplus) || defined (c_plusplus) +#include <c_varieties.h> +#ifdef __EXTERN_C__ + EXTERN_FUNCTION ( extern int yylex, ()); +#else + extern int yylex(); +#endif + extern void yyerror(char *); + extern int yyparse(); +#endif + +#include <malloc.h> # line 2 "lua.stx" -char *rcs_luastx = "$Id: lua.stx,v 2.4 1994/04/20 16:22:21 celes Exp $"; +char *rcs_luastx = "$Id: lua.stx,v 3.17 1995/01/13 22:11:12 roberto Exp $"; #include <stdio.h> #include <stdlib.h> #include <string.h> -#include "mm.h" - +#include "mem.h" #include "opcode.h" #include "hash.h" #include "inout.h" +#include "tree.h" #include "table.h" #include "lua.h" +/* to avoid warnings generated by yacc */ +int yyparse (void); +#define malloc luaI_malloc +#define realloc luaI_realloc +#define free luaI_free + +#ifndef LISTING #define LISTING 0 +#endif -#ifndef GAPCODE -#define GAPCODE 50 +#ifndef CODE_BLOCK +#define CODE_BLOCK 256 #endif -static Word maxcode; -static Word maxmain; -static Word maxcurr ; -static Byte *code = NULL; -static Byte *initcode; +static int maxcode; +static int maxmain; +static Long maxcurr; /* to allow maxcurr *= 2 without overflow */ +static Byte *funcCode = NULL; +static Byte **initcode; static Byte *basepc; -static Word maincode; -static Word pc; +static int maincode; +static int pc; #define MAXVAR 32 -static long varbuffer[MAXVAR]; /* variables in an assignment list; +static Long varbuffer[MAXVAR]; /* variables in an assignment list; it's long to store negative Word values */ static int nvarbuffer=0; /* number of variables at a list */ @@ -40,8 +60,7 @@ 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; -static int ntemp; /* number of temporary var into stack */ -static int err; /* flag to indicate error */ + /* Internal functions */ @@ -49,13 +68,12 @@ static void code_byte (Byte c) { if (pc>maxcurr-2) /* 1 byte free to code HALT of main code */ { - maxcurr += GAPCODE; - basepc = (Byte *)realloc(basepc, maxcurr*sizeof(Byte)); - if (basepc == NULL) - { - lua_error ("not enough memory"); - err = 1; - } + if (maxcurr >= MAX_INT) + lua_error("code size overflow"); + maxcurr *= 2; + if (maxcurr >= MAX_INT) + maxcurr = MAX_INT; + basepc = growvector(basepc, maxcurr, Byte); } basepc[pc++] = c; } @@ -78,6 +96,16 @@ static void code_float (float n) code_byte(code.m.c4); } +static void code_code (Byte *b) +{ + CodeCode code; + code.b = b; + code_byte(code.m.c1); + code_byte(code.m.c2); + code_byte(code.m.c3); + code_byte(code.m.c4); +} + static void code_word_at (Byte *p, Word n) { CodeWord code; @@ -91,10 +119,7 @@ static void push_field (Word name) if (nfields < STACKGAP-1) fields[nfields++] = name; else - { lua_error ("too many fields in a constructor"); - err = 1; - } } static void flush_record (int n) @@ -105,7 +130,6 @@ static void flush_record (int n) code_byte(n); for (i=0; i<n; i++) code_word(fields[--nfields]); - ntemp -= n; } static void flush_list (int m, int n) @@ -114,34 +138,22 @@ static void flush_list (int m, int n) if (m == 0) code_byte(STORELIST0); else + if (m < 255) { code_byte(STORELIST); code_byte(m); } + else + lua_error ("list constructor too long"); code_byte(n); - ntemp-=n; -} - -static void incr_ntemp (void) -{ - if (ntemp+nlocalvar+MAXVAR+1 < STACKGAP) - ntemp++; - else - { - lua_error ("stack overflow"); - err = 1; - } } static void add_nlocalvar (int n) { - if (ntemp+nlocalvar+MAXVAR+n < STACKGAP) + if (MAX_TEMPS+nlocalvar+MAXVAR+n < STACKGAP) nlocalvar += n; else - { - lua_error ("too many local variables or expression too complicate"); - err = 1; - } + lua_error ("too many local variables"); } static void incr_nvarbuffer (void) @@ -149,14 +161,12 @@ static void incr_nvarbuffer (void) if (nvarbuffer < MAXVAR-1) nvarbuffer++; else - { lua_error ("variable buffer overflow"); - err = 1; - } } static void code_number (float f) -{ Word i = (Word)f; +{ + Word i = (Word)f; if (f == (float)i) /* f has an (short) integer value */ { if (i <= 2) code_byte(PUSH0 + i); @@ -176,59 +186,8 @@ static void code_number (float f) code_byte(PUSHFLOAT); code_float(f); } - incr_ntemp(); } - -# line 184 "lua.stx" -typedef union -{ - int vInt; - long vLong; - float vFloat; - char *pChar; - Word vWord; - Byte *pByte; -} YYSTYPE; -# define WRONGTOKEN 257 -# define NIL 258 -# define IF 259 -# define THEN 260 -# define ELSE 261 -# define ELSEIF 262 -# define WHILE 263 -# define DO 264 -# define REPEAT 265 -# define UNTIL 266 -# define END 267 -# define RETURN 268 -# define LOCAL 269 -# define NUMBER 270 -# define FUNCTION 271 -# define STRING 272 -# define NAME 273 -# define DEBUG 274 -# define AND 275 -# define OR 276 -# define NE 277 -# define LE 278 -# define GE 279 -# define CONC 280 -# define UNARY 281 -# define NOT 282 -#define yyclearin yychar = -1 -#define yyerrok yyerrflag = 0 -extern int yychar; -extern int yyerrflag; -#ifndef YYMAXDEPTH -#define YYMAXDEPTH 150 -#endif -YYSTYPE yylval, yyval; -# define YYERRCODE 256 - -# line 622 "lua.stx" - - /* ** Search a local name and if find return its index. If do not find return -1 */ @@ -245,13 +204,12 @@ static int lua_localname (Word n) ** indexed by (number -1). If negative, push local indexed by ABS(number)-1. ** Otherwise, if zero, push indexed variable (record). */ -static void lua_pushvar (long number) +static void lua_pushvar (Long number) { if (number > 0) /* global var */ { code_byte(PUSHGLOBAL); code_word(number-1); - incr_ntemp(); } else if (number < 0) /* local var */ { @@ -262,19 +220,77 @@ static void lua_pushvar (long number) code_byte(PUSHLOCAL); code_byte(number); } - incr_ntemp(); } else { code_byte(PUSHINDEXED); - ntemp--; } } static void lua_codeadjust (int n) { - code_byte(ADJUST); - code_byte(n + nlocalvar); + if (n+nlocalvar == 0) + code_byte(ADJUST0); + else + { + code_byte(ADJUST); + code_byte(n+nlocalvar); + } +} + +static void init_function (TreeNode *func) +{ + if (funcCode == NULL) /* first function */ + { + funcCode = newvector(CODE_BLOCK, Byte); + maxcode = CODE_BLOCK; + } + pc=0; basepc=funcCode; maxcurr=maxcode; + nlocalvar=0; + if (lua_debug) + { + code_byte(SETFUNCTION); + code_code((Byte *)luaI_strdup(lua_file[lua_nfile-1])); + code_word(luaI_findconstant(func)); + } +} + +static void codereturn (void) +{ + if (lua_debug) code_byte(RESET); + if (nlocalvar == 0) + code_byte(RETCODE0); + else + { + code_byte(RETCODE); + code_byte(nlocalvar); + } +} + +static void codedebugline (void) +{ + if (lua_debug) + { + code_byte(SETLINE); + code_word(lua_linenumber); + } +} + +static void adjust_mult_assign (int vars, int exps, int temps) +{ + if (exps < 0) + { + int r = vars - (-exps-1); + if (r >= 0) + code_byte(r); + else + { + code_byte(0); + lua_codeadjust(temps); + } + } + else if (vars != exps) + lua_codeadjust(temps); } static void lua_codestore (int i) @@ -312,48 +328,102 @@ static void lua_codestore (int i) } } -void yyerror (char *s) +static void codeIf (Long thenAdd, Long elseAdd) +{ + Long elseinit = elseAdd+sizeof(Word)+1; + if (pc == elseinit) /* no else */ + { + pc -= sizeof(Word)+1; + elseinit = pc; + } + else + { + basepc[elseAdd] = JMP; + code_word_at(basepc+elseAdd+1, pc-elseinit); + } + basepc[thenAdd] = IFFJMP; + code_word_at(basepc+thenAdd+1,elseinit-(thenAdd+sizeof(Word)+1)); +} + +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_filename()); lua_error (msg); - err = 1; -} - -int yywrap (void) -{ - return 1; } /* -** Parse LUA code and execute global statement. -** Return 0 on success or 1 on error. +** Parse LUA code. */ -int lua_parse (void) +void lua_parse (Byte **code) { - Byte *init = initcode = (Byte *) calloc(GAPCODE, sizeof(Byte)); + initcode = code; + *initcode = newvector(CODE_BLOCK, Byte); maincode = 0; - maxmain = GAPCODE; - if (init == NULL) - { - lua_error("not enough memory"); - return 1; - } - err = 0; - if (yyparse () || (err==1)) return 1; - initcode[maincode++] = HALT; - init = initcode; + maxmain = CODE_BLOCK; + if (yyparse ()) lua_error("parse error"); + (*initcode)[maincode++] = RETCODE0; #if LISTING - PrintCode(init,init+maincode); +{ static void PrintCode (Byte *c, Byte *end); + PrintCode(*initcode,*initcode+maincode); } #endif - if (lua_execute (init)) return 1; - free(init); - return 0; } + +# line 365 "lua.stx" +typedef union +{ + int vInt; + float vFloat; + char *pChar; + Word vWord; + Long vLong; + Byte *pByte; + TreeNode *pNode; +} YYSTYPE; +# define WRONGTOKEN 257 +# define NIL 258 +# define IF 259 +# define THEN 260 +# define ELSE 261 +# define ELSEIF 262 +# define WHILE 263 +# define DO 264 +# define REPEAT 265 +# define UNTIL 266 +# define END 267 +# define RETURN 268 +# define LOCAL 269 +# define FUNCTION 270 +# define NUMBER 271 +# define STRING 272 +# define NAME 273 +# define DEBUG 274 +# define AND 275 +# define OR 276 +# define EQ 277 +# define NE 278 +# define LE 279 +# define GE 280 +# define CONC 281 +# define UNARY 282 +# define NOT 283 +#define yyclearin yychar = -1 +#define yyerrok yyerrflag = 0 +extern int yychar; +extern int yyerrflag; +#ifndef YYMAXDEPTH +#define YYMAXDEPTH 150 +#endif +YYSTYPE yylval, yyval; +# define YYERRCODE 256 + +# line 737 "lua.stx" + + #if LISTING static void PrintCode (Byte *code, Byte *end) @@ -400,6 +470,16 @@ static void PrintCode (Byte *code, Byte *end) 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.b); + } + break; + case PUSHLOCAL0: case PUSHLOCAL1: case PUSHLOCAL2: case PUSHLOCAL3: case PUSHLOCAL4: case PUSHLOCAL5: case PUSHLOCAL6: case PUSHLOCAL7: case PUSHLOCAL8: case PUSHLOCAL9: @@ -419,8 +499,6 @@ static void PrintCode (Byte *code, Byte *end) } break; case PUSHINDEXED: printf ("%d PUSHINDEXED\n", (p++)-code); break; - case PUSHMARK: printf ("%d PUSHMARK\n", (p++)-code); break; - case PUSHOBJECT: printf ("%d PUSHOBJECT\n", (p++)-code); break; case STORELOCAL0: case STORELOCAL1: case STORELOCAL2: case STORELOCAL3: case STORELOCAL4: case STORELOCAL5: case STORELOCAL6: case STORELOCAL7: case STORELOCAL8: case STORELOCAL9: @@ -440,6 +518,15 @@ static void PrintCode (Byte *code, Byte *end) 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++; @@ -456,11 +543,20 @@ static void PrintCode (Byte *code, Byte *end) 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: printf ("%d CREATEARRAY\n", (p++)-code); 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; @@ -468,6 +564,7 @@ static void PrintCode (Byte *code, Byte *end) 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; @@ -526,20 +623,24 @@ static void PrintCode (Byte *code, Byte *end) } break; case POP: printf ("%d POP\n", (p++)-code); break; - case CALLFUNC: printf ("%d CALLFUNC\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 HALT: printf ("%d HALT\n", (p++)-code); break; case SETFUNCTION: { - CodeWord c1, c2; + CodeCode c1; + CodeWord c2; int n = p-code; p++; - get_word(c1,p); + get_code(c1,p); get_word(c2,p); - printf ("%d SETFUNCTION %d %d\n", n, c1.w, c2.w); + printf ("%d SETFUNCTION %s %d\n", n, (char *)c1.b, c2.w); } break; case SETLINE: @@ -564,194 +665,201 @@ int yyexca[] ={ 0, -1, -2, 2, -1, 20, - 40, 67, - 91, 94, - 46, 96, - -2, 91, + 61, 91, + 44, 91, + -2, 97, -1, 32, - 40, 67, - 91, 94, - 46, 96, - -2, 51, --1, 73, - 275, 34, - 276, 34, - 61, 34, - 277, 34, - 62, 34, - 60, 34, - 278, 34, - 279, 34, - 280, 34, - 43, 34, - 45, 34, - 42, 34, - 47, 34, + 40, 66, + 123, 66, + -2, 53, +-1, 47, + 123, 63, -2, 70, -1, 74, - 91, 94, - 46, 96, - -2, 92, --1, 105, - 261, 28, - 262, 28, - 266, 28, - 267, 28, - 268, 28, - -2, 11, --1, 125, - 268, 31, - -2, 30, --1, 146, - 275, 34, - 276, 34, - 61, 34, - 277, 34, - 62, 34, - 60, 34, - 278, 34, - 279, 34, - 280, 34, - 43, 34, - 45, 34, - 42, 34, - 47, 34, + 125, 79, + -2, 63, +-1, 79, + 275, 37, + 276, 37, + 277, 37, + 278, 37, + 62, 37, + 60, 37, + 279, 37, + 280, 37, + 281, 37, + 43, 37, + 45, 37, + 42, 37, + 47, 37, + 94, 37, -2, 72, +-1, 80, + 91, 97, + 46, 97, + -2, 92, +-1, 118, + 261, 33, + 262, 33, + 266, 33, + 267, 33, + -2, 16, +-1, 133, + 125, 85, + -2, 63, +-1, 158, + 123, 63, + -2, 70, +-1, 159, + 275, 37, + 276, 37, + 277, 37, + 278, 37, + 62, 37, + 60, 37, + 279, 37, + 280, 37, + 281, 37, + 43, 37, + 45, 37, + 42, 37, + 47, 37, + 94, 37, + -2, 74, }; # define YYNPROD 103 -# define YYLAST 364 +# define YYLAST 351 int yyact[]={ - 58, 56, 22, 57, 132, 59, 58, 56, 137, 57, - 110, 59, 58, 56, 107, 57, 85, 59, 51, 50, - 52, 82, 23, 43, 51, 50, 52, 58, 56, 9, - 57, 157, 59, 58, 56, 165, 57, 5, 59, 162, - 6, 161, 104, 154, 155, 51, 50, 52, 64, 153, - 70, 51, 50, 52, 26, 58, 56, 127, 57, 10, - 59, 111, 25, 78, 27, 58, 56, 28, 57, 29, - 59, 131, 147, 51, 50, 52, 7, 65, 66, 115, - 150, 112, 63, 51, 50, 52, 68, 69, 31, 159, - 11, 79, 58, 76, 128, 73, 41, 59, 151, 87, - 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, - 77, 114, 148, 40, 58, 56, 102, 57, 106, 59, - 117, 32, 72, 121, 116, 100, 80, 109, 67, 48, - 20, 36, 73, 30, 45, 73, 44, 118, 149, 84, - 17, 126, 18, 46, 21, 47, 120, 119, 101, 145, - 144, 125, 71, 123, 75, 39, 38, 12, 8, 108, - 105, 136, 83, 74, 135, 24, 4, 3, 139, 140, - 2, 81, 134, 141, 133, 130, 129, 42, 113, 16, - 1, 146, 124, 0, 143, 0, 0, 152, 0, 0, - 0, 86, 0, 0, 0, 0, 0, 13, 0, 0, - 160, 14, 0, 15, 164, 163, 0, 19, 167, 0, - 0, 23, 73, 0, 0, 0, 0, 0, 168, 166, - 158, 171, 173, 0, 0, 0, 169, 0, 0, 0, - 0, 0, 0, 61, 62, 53, 54, 55, 60, 61, - 62, 53, 54, 55, 60, 0, 0, 0, 0, 103, - 60, 49, 0, 98, 99, 0, 0, 0, 0, 0, - 61, 62, 53, 54, 55, 60, 61, 62, 53, 54, - 55, 60, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 35, 0, 0, 0, 0, 0, 61, 62, - 53, 54, 55, 60, 33, 122, 34, 23, 0, 0, - 53, 54, 55, 60, 0, 0, 37, 0, 0, 0, - 138, 0, 0, 0, 0, 142, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 156, 0, 0, 0, 0, 0, 0, + 64, 62, 6, 63, 152, 65, 7, 64, 62, 145, + 63, 120, 65, 92, 64, 62, 89, 63, 57, 65, + 58, 64, 62, 87, 63, 57, 65, 58, 64, 62, + 24, 63, 57, 65, 58, 64, 62, 54, 63, 57, + 65, 58, 45, 10, 29, 142, 57, 171, 58, 30, + 29, 123, 66, 167, 14, 30, 160, 117, 15, 66, + 16, 162, 163, 173, 19, 131, 66, 138, 24, 28, + 112, 114, 130, 66, 74, 71, 8, 64, 66, 52, + 66, 86, 65, 51, 161, 83, 51, 66, 43, 136, + 27, 12, 64, 62, 26, 63, 133, 65, 49, 70, + 135, 119, 84, 125, 124, 42, 72, 122, 109, 32, + 53, 132, 79, 73, 85, 39, 75, 79, 47, 23, + 149, 91, 143, 31, 78, 20, 88, 38, 50, 66, + 11, 50, 95, 96, 97, 98, 99, 100, 101, 102, + 103, 104, 105, 106, 66, 48, 36, 129, 128, 158, + 113, 141, 94, 81, 79, 77, 18, 41, 40, 80, + 139, 13, 9, 118, 90, 93, 121, 25, 5, 4, + 3, 2, 22, 126, 111, 76, 82, 44, 134, 110, + 21, 46, 17, 1, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 140, 0, 0, 0, 0, + 0, 0, 0, 0, 147, 148, 0, 151, 0, 150, + 0, 0, 153, 159, 0, 156, 0, 0, 0, 0, + 164, 107, 108, 0, 0, 0, 0, 0, 79, 116, + 170, 169, 55, 68, 69, 56, 59, 60, 61, 67, + 68, 69, 56, 59, 60, 61, 67, 68, 69, 56, + 59, 60, 61, 67, 68, 69, 56, 59, 60, 61, + 67, 177, 35, 56, 59, 60, 61, 67, 35, 137, + 127, 157, 0, 166, 67, 33, 34, 24, 0, 0, + 146, 33, 34, 115, 0, 0, 0, 37, 0, 0, + 0, 155, 0, 37, 0, 0, 0, 172, 0, 0, + 144, 0, 0, 0, 0, 0, 0, 165, 0, 0, + 0, 0, 0, 154, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 174, 0, 176, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 168, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 170, 0, 0, 172 }; + 175 }; int yypact[]={ - -1000, -234, -1000, -1000, -1000, -244, -1000, 31, -62, -1000, - -1000, -1000, -1000, 24, -1000, -1000, 52, -1000, -1000, -250, - -1000, -1000, -1000, -1000, 89, -9, -1000, 24, 24, 24, - -1000, 88, -1000, -1000, -1000, -1000, -1000, 24, 24, -1000, - 24, -251, 49, -1000, -28, 45, 86, -252, -257, -1000, - 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, - 24, -1000, -1000, 84, 13, -1000, -1000, 24, -1000, -15, - -224, -1000, 74, -1000, -1000, -1000, -259, 24, 24, -263, - 24, -12, -1000, 83, 76, -1000, -1000, -30, -30, -30, - -30, -30, -30, 50, 50, -1000, -1000, 72, -1000, -1000, - -1000, 82, 13, -1000, 24, -1000, -1000, -1000, 74, -36, - -1000, 53, 74, -1000, -269, 24, -1000, -265, -1000, 24, - 24, -1000, -1000, 13, 31, -1000, 24, -1000, -1000, -53, - 68, -1000, -1000, -13, 54, 13, -1000, -1000, -218, 23, - 23, -1000, -1000, -1000, -1000, -237, -1000, -1000, -269, 28, - -1000, 24, -226, -228, -1000, 24, -232, 24, -1000, 24, - 13, -1000, -1000, -1000, -42, -1000, 31, 13, -1000, -1000, - -1000, -1000, -218, -1000 }; + -1000, -268, -1000, -1000, -1000, -1000, -230, -1000, 32, -205, + 36, -1000, -1000, -1000, 4, -1000, -1000, 44, -1000, -231, + -1000, 78, -1000, 40, -1000, 70, -236, -28, -1000, 4, + 4, -1000, 40, -1000, -1000, -1000, -1000, 4, -49, -1000, + 4, -1000, 4, -243, 41, -1000, -1000, 4, -1000, -250, + 4, -257, -1000, -260, -1000, -1000, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, -1000, -1000, + 67, -21, -16, -16, 10, -35, -209, -1000, 57, -1000, + -1000, 37, -1000, -262, 4, 66, 57, -1000, -42, -1000, + 63, 59, -1000, 70, -1000, -7, -7, -7, -7, -7, + -7, 35, 35, -16, -16, -16, 50, -1000, -1000, -1000, + -53, 52, 56, -21, -1000, 28, -1000, -1000, -223, -1000, + -1000, 57, -1000, -1000, -1000, -264, -1000, -1000, 4, 4, + -1000, -1000, -1000, 4, -1000, -269, 4, -1000, -1000, 4, + 32, -1000, -1000, 4, -211, -1000, -200, -14, -14, -269, + -21, -1000, 28, -21, -1000, -1000, -21, -1000, 4, -1000, + -1000, -214, -1000, -1000, 56, -220, 32, -1000, -1000, -197, + -1000, -1000, -1000, -1000, -1000, -1000, -200, -1000 }; int yypgo[]={ - 0, 180, 191, 54, 61, 81, 179, 133, 178, 177, - 176, 175, 174, 172, 121, 171, 170, 76, 59, 167, - 166, 165, 162, 161, 50, 160, 158, 157, 48, 49, - 156, 155, 131, 154, 152, 151, 150, 149, 148, 147, - 146, 145, 144, 143, 141, 139, 71, 138, 136, 134 }; + 0, 183, 152, 69, 114, 81, 182, 181, 180, 179, + 177, 176, 70, 174, 115, 172, 79, 171, 76, 130, + 170, 169, 168, 167, 165, 164, 175, 163, 162, 161, + 67, 160, 75, 84, 158, 157, 146, 155, 151, 149, + 123, 109, 148, 147, 127, 122, 121, 65, 120, 71 }; int yyr1[]={ - 0, 1, 16, 1, 1, 1, 21, 23, 19, 25, - 25, 26, 17, 18, 18, 27, 30, 27, 31, 27, - 27, 27, 27, 27, 29, 29, 29, 34, 35, 24, - 36, 37, 36, 2, 28, 3, 3, 3, 3, 3, + 0, 1, 17, 1, 1, 1, 1, 23, 20, 24, + 21, 16, 27, 27, 19, 19, 28, 18, 31, 30, + 29, 34, 29, 35, 29, 29, 29, 29, 33, 33, + 33, 37, 26, 38, 39, 38, 2, 32, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 39, 3, 40, - 3, 41, 7, 38, 38, 43, 32, 42, 4, 4, - 5, 44, 5, 22, 22, 45, 45, 15, 15, 8, - 8, 10, 10, 11, 11, 47, 46, 12, 12, 13, - 13, 6, 6, 14, 48, 14, 49, 14, 9, 9, - 33, 33, 20 }; + 3, 3, 3, 3, 3, 3, 3, 3, 3, 42, + 3, 43, 3, 44, 40, 36, 8, 8, 7, 7, + 4, 4, 5, 45, 5, 25, 25, 46, 46, 9, + 9, 9, 48, 9, 47, 47, 12, 12, 49, 13, + 13, 6, 6, 14, 14, 14, 15, 41, 10, 10, + 11, 11, 22 }; int yyr2[]={ - 0, 0, 1, 9, 4, 4, 1, 1, 19, 0, - 6, 1, 4, 0, 2, 17, 1, 17, 1, 13, - 7, 3, 3, 7, 0, 4, 15, 1, 1, 9, - 0, 1, 9, 1, 3, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 5, 5, 3, - 9, 3, 3, 3, 3, 3, 5, 1, 11, 1, - 11, 1, 9, 1, 2, 1, 11, 3, 1, 3, - 3, 1, 9, 0, 2, 3, 7, 1, 3, 7, - 7, 1, 3, 3, 7, 1, 9, 1, 3, 3, - 7, 3, 7, 3, 1, 11, 1, 9, 3, 7, - 0, 4, 3 }; + 0, 0, 1, 9, 4, 4, 4, 1, 9, 1, + 13, 11, 0, 6, 0, 2, 1, 4, 1, 4, + 17, 1, 17, 1, 13, 7, 3, 7, 0, 4, + 15, 1, 7, 0, 1, 9, 1, 3, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 5, 3, 3, 3, 3, 3, 3, 5, 1, + 11, 1, 11, 1, 9, 5, 3, 7, 7, 3, + 1, 3, 3, 1, 9, 1, 3, 3, 7, 1, + 5, 5, 1, 11, 0, 2, 3, 7, 7, 3, + 7, 3, 7, 3, 9, 7, 3, 3, 3, 7, + 1, 5, 3 }; int yychk[]={ - -1000, -1, -16, -19, -20, 271, 274, -17, -26, 273, - -18, 59, -27, 259, 263, 265, -6, -32, -7, 269, - -14, -42, 64, 273, -21, -28, -3, 40, 43, 45, - -7, 64, -14, 270, 272, 258, -32, 282, -30, -31, - 61, 44, -9, 273, -48, -49, -43, -41, 40, 260, - 61, 60, 62, 277, 278, 279, 43, 45, 42, 47, - 280, 275, 276, -3, -28, -28, -28, 40, -28, -28, - -24, -34, -5, -3, -14, -33, 44, 61, 91, 46, - 40, -15, 273, -22, -45, 273, -2, -28, -28, -28, - -28, -28, -28, -28, -28, -28, -28, -28, -2, -2, - 41, -38, -28, 264, 266, -25, 44, 273, -5, -28, - 273, -4, -5, -8, 123, 91, 41, 44, -24, -39, - -40, 41, -2, -28, -17, -35, -44, 93, 41, -10, - -11, -46, 273, -12, -13, -28, -23, 273, -2, -28, - -28, -24, -2, -18, -36, -37, -3, 125, 44, -47, - 93, 44, -24, -29, 261, 262, -2, 268, -46, 61, - -28, 267, 267, -24, -28, 267, -4, -28, 260, -18, - -2, -24, -2, -29 }; + -1000, -1, -17, -20, -21, -22, 270, 274, -18, -28, + 273, -19, 59, -29, 259, 263, 265, -6, -36, 269, + -14, -8, -15, -41, 273, -23, 58, -32, -3, 40, + 45, -40, -41, 271, 272, 258, -36, 283, -44, -14, + -34, -35, 61, 44, -10, 273, -7, 40, -40, 58, + 91, 46, -16, 40, 273, 260, 277, 60, 62, 278, + 279, 280, 43, 45, 42, 47, 94, 281, 275, 276, + -3, -32, -32, -32, 123, -32, -26, -37, -5, -3, + -14, -41, -11, 44, 61, -4, -5, 273, -32, 273, + -25, -46, 273, -24, -2, -32, -32, -32, -32, -32, + -32, -32, -32, -32, -32, -32, -32, -2, -2, 41, + -9, -13, -12, -32, -49, 273, 264, 266, -27, 44, + 273, -5, 41, 93, 41, 44, -16, -26, -42, -43, + 125, -47, 59, 44, -47, 44, 61, -2, -30, -31, + -18, -38, 268, -45, -26, 273, -2, -32, -32, -48, + -32, -49, 273, -32, -26, -2, -32, -19, -39, -3, + 267, -33, 261, 262, -12, -2, -4, 267, -26, -30, + -47, 267, -19, 260, -2, -26, -2, -33 }; int yydef[]={ - 1, -2, 11, 4, 5, 0, 102, 13, 0, 6, - 3, 14, 12, 0, 16, 18, 0, 21, 22, 0, - -2, 65, 61, 93, 0, 0, 34, 0, 0, 0, - 49, 61, -2, 52, 53, 54, 55, 0, 0, 27, - 0, 0, 100, 98, 0, 0, 0, 77, 73, 33, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 33, 33, 34, 0, 47, 48, 63, 56, 0, - 0, 9, 20, -2, -2, 23, 0, 0, 0, 0, - 68, 0, 78, 0, 74, 75, 27, 36, 37, 38, - 39, 40, 41, 42, 43, 44, 45, 46, 57, 59, - 35, 0, 64, 33, 0, -2, 71, 99, 101, 0, - 97, 0, 69, 62, 81, 87, 7, 0, 33, 0, - 0, 50, 27, 33, 13, -2, 0, 95, 66, 0, - 82, 83, 85, 0, 88, 89, 27, 76, 24, 58, - 60, 33, 19, 10, 29, 0, -2, 79, 0, 0, - 80, 0, 0, 0, 27, 0, 0, 68, 84, 0, - 90, 8, 15, 25, 0, 17, 13, 86, 33, 32, - 27, 33, 24, 26 }; + 1, -2, 16, 4, 5, 6, 0, 102, 14, 0, + 7, 3, 15, 17, 63, 21, 23, 0, 26, 0, + -2, 63, 93, 66, 96, 0, 0, 0, 37, 63, + 63, 52, -2, 54, 55, 56, 57, 63, 0, 97, + 63, 31, 63, 0, 100, 98, 65, -2, 69, 0, + 63, 0, 8, 75, 9, 36, 63, 63, 63, 63, + 63, 63, 63, 63, 63, 63, 63, 63, 36, 36, + 37, 0, 51, 58, -2, 0, 0, 12, 25, -2, + -2, 0, 27, 0, 63, 0, 71, 67, 0, 95, + 0, 76, 77, 0, 31, 39, 40, 41, 42, 43, + 44, 45, 46, 47, 48, 49, 50, 59, 61, 38, + 0, 84, 84, 89, 86, 96, 36, 18, -2, 73, + 99, 101, 68, 94, 31, 0, 10, 36, 63, 63, + 64, 80, 82, -2, 81, 85, 63, 31, 36, 63, + 14, 32, 34, 63, 0, 78, 28, 60, 62, 0, + 90, 87, 0, 88, 36, 24, 19, 13, -2, -2, + 11, 0, 31, 18, 84, 0, 14, 20, 29, 0, + 83, 22, 35, 36, 31, 36, 28, 30 }; typedef struct { char *t_name; int t_val; } yytoktype; #ifndef YYDEBUG # define YYDEBUG 0 /* don't allow debugging */ @@ -774,26 +882,27 @@ yytoktype yytoks[] = "END", 267, "RETURN", 268, "LOCAL", 269, - "NUMBER", 270, - "FUNCTION", 271, + "FUNCTION", 270, + "NUMBER", 271, "STRING", 272, "NAME", 273, "DEBUG", 274, "AND", 275, "OR", 276, - "=", 61, - "NE", 277, + "EQ", 277, + "NE", 278, ">", 62, "<", 60, - "LE", 278, - "GE", 279, - "CONC", 280, + "LE", 279, + "GE", 280, + "CONC", 281, "+", 43, "-", 45, "*", 42, "/", 47, - "UNARY", 281, - "NOT", 282, + "UNARY", 282, + "NOT", 283, + "^", 94, "-unknown-", -1 /* ends search */ }; @@ -804,38 +913,41 @@ char * yyreds[] = "functionlist : functionlist", "functionlist : functionlist stat sc", "functionlist : functionlist function", + "functionlist : functionlist method", "functionlist : functionlist setdebug", "function : FUNCTION NAME", - "function : FUNCTION NAME '(' parlist ')'", - "function : FUNCTION NAME '(' parlist ')' block END", + "function : FUNCTION NAME body", + "method : FUNCTION NAME ':' NAME", + "method : FUNCTION NAME ':' NAME body", + "body : '(' parlist ')' block END", "statlist : /* empty */", "statlist : statlist stat sc", - "stat : /* empty */", - "stat : stat1", "sc : /* empty */", "sc : ';'", + "stat : /* empty */", + "stat : stat1", + "cond : /* empty */", + "cond : expr1", "stat1 : IF expr1 THEN PrepJump block PrepJump elsepart END", "stat1 : WHILE", "stat1 : WHILE expr1 DO PrepJump block PrepJump END", "stat1 : REPEAT", - "stat1 : REPEAT block UNTIL expr1 PrepJump", + "stat1 : REPEAT block UNTIL cond PrepJump", "stat1 : varlist1 '=' exprlist1", "stat1 : functioncall", - "stat1 : typeconstructor", "stat1 : LOCAL localdeclist decinit", "elsepart : /* empty */", "elsepart : ELSE block", - "elsepart : ELSEIF expr1 THEN PrepJump block PrepJump elsepart", + "elsepart : ELSEIF cond THEN PrepJump block PrepJump elsepart", "block : /* empty */", - "block : statlist", "block : statlist ret", "ret : /* empty */", - "ret : /* empty */", + "ret : RETURN", "ret : RETURN exprlist sc", "PrepJump : /* empty */", "expr1 : expr", "expr : '(' expr ')'", - "expr : expr1 '=' expr1", + "expr : expr1 EQ expr1", "expr : expr1 '<' expr1", "expr : expr1 '>' expr1", "expr : expr1 NE expr1", @@ -845,12 +957,11 @@ char * yyreds[] = "expr : expr1 '-' expr1", "expr : expr1 '*' expr1", "expr : expr1 '/' expr1", + "expr : expr1 '^' expr1", "expr : expr1 CONC expr1", - "expr : '+' expr1", "expr : '-' expr1", - "expr : typeconstructor", - "expr : '@' '(' dimension ')'", - "expr : var", + "expr : table", + "expr : varexp", "expr : NUMBER", "expr : STRING", "expr : NIL", @@ -860,13 +971,13 @@ char * yyreds[] = "expr : expr1 AND PrepJump expr1", "expr : expr1 OR PrepJump", "expr : expr1 OR PrepJump expr1", - "typeconstructor : '@'", - "typeconstructor : '@' objectname fieldlist", - "dimension : /* empty */", - "dimension : expr1", - "functioncall : functionvalue", - "functioncall : functionvalue '(' exprlist ')'", - "functionvalue : var", + "table : /* empty */", + "table : '{' fieldlist '}'", + "functioncall : funcvalue funcParams", + "funcvalue : varexp", + "funcvalue : varexp ':' NAME", + "funcParams : '(' exprlist ')'", + "funcParams : table", "exprlist : /* empty */", "exprlist : exprlist1", "exprlist1 : expr", @@ -876,27 +987,25 @@ char * yyreds[] = "parlist : parlist1", "parlist1 : NAME", "parlist1 : parlist1 ',' NAME", - "objectname : /* empty */", - "objectname : NAME", - "fieldlist : '{' ffieldlist '}'", - "fieldlist : '[' lfieldlist ']'", - "ffieldlist : /* empty */", - "ffieldlist : ffieldlist1", + "fieldlist : /* empty */", + "fieldlist : lfieldlist1 lastcomma", + "fieldlist : ffieldlist1 lastcomma", + "fieldlist : lfieldlist1 ';'", + "fieldlist : lfieldlist1 ';' ffieldlist1 lastcomma", + "lastcomma : /* empty */", + "lastcomma : ','", "ffieldlist1 : ffield", "ffieldlist1 : ffieldlist1 ',' ffield", - "ffield : NAME", "ffield : NAME '=' expr1", - "lfieldlist : /* empty */", - "lfieldlist : lfieldlist1", "lfieldlist1 : expr1", "lfieldlist1 : lfieldlist1 ',' expr1", "varlist1 : var", "varlist1 : varlist1 ',' var", - "var : NAME", - "var : var", - "var : var '[' expr1 ']'", - "var : var", - "var : var '.' NAME", + "var : singlevar", + "var : varexp '[' expr1 ']'", + "var : varexp '.' NAME", + "singlevar : NAME", + "varexp : var", "localdeclist : NAME", "localdeclist : localdeclist ',' NAME", "decinit : /* empty */", @@ -904,19 +1013,22 @@ char * yyreds[] = "setdebug : DEBUG", }; #endif /* YYDEBUG */ -#line 1 "/usr/lib/yaccpar" +#line 1 "/usr/lang/SC1.0/yaccpar" /* @(#)yaccpar 1.10 89/04/04 SMI; from S5R3 1.10 */ /* ** Skeleton parser driver for yacc output */ +/* + @(#)RELEASE SC1.0 C++ 2.1 1Mar1991 +*/ /* ** yacc user known macros and defines */ #define YYERROR goto yyerrlab -#define YYACCEPT { free(yys); free(yyv); return(0); } -#define YYABORT { free(yys); free(yyv); return(1); } +#define YYACCEPT return(0) +#define YYABORT return(1) #define YYBACKUP( newtoken, newvalue )\ {\ if ( yychar >= 0 || ( yyr2[ yytmp ] >> 1 ) != 1 )\ @@ -930,10 +1042,24 @@ char * yyreds[] = goto yynewstate;\ } #define YYRECOVERING() (!!yyerrflag) +#define YYCOPY(to, from, type) \ + (type *) memcpy(to, (char *) from, yynewmax * sizeof(type)) #ifndef YYDEBUG # define YYDEBUG 1 /* make debugging available */ #endif + +/* +** extern declarations for C++ - check your own code for correctness +** if you have function redefined error messages here. +*/ + +#ifdef __cplusplus +EXTERN_FUNCTION ( extern int printf, (const char*, DOTDOTDOT) ); +EXTERN_FUNCTION ( extern void *memcpy, (void *, const void *, int) ); +#endif + + /* ** user known globals */ @@ -947,8 +1073,8 @@ int yydebug; /* set to 1 to get debugging */ /* ** static variables used by the parser */ -static YYSTYPE *yyv; /* value stack */ -static int *yys; /* state stack */ +static YYSTYPE yy_yyv[YYMAXDEPTH], *yyv = yy_yyv; /* value stack */ +static int yy_yys[YYMAXDEPTH], *yys = yy_yys; /* state stack */ static YYSTYPE *yypv; /* top of value stack */ static int *yyps; /* top of state stack */ @@ -956,10 +1082,20 @@ static int *yyps; /* top of state stack */ static int yystate; /* current state */ static int yytmp; /* 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. + 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 yyerrflag; /* error recovery flag */ int yychar; /* current input token number */ +static unsigned yymaxdepth = YYMAXDEPTH; /* @@ -968,19 +1104,12 @@ int yychar; /* current input token number */ int yyparse() { - register YYSTYPE *yypvt; /* top of value stack for $vars */ - unsigned yymaxdepth = YYMAXDEPTH; + register YYSTYPE *yypvt = (YYSTYPE*)0 ; /* top of value stack for +$vars */ /* ** Initialize externals - yyparse may be called more than once */ - yyv = (YYSTYPE*)malloc(yymaxdepth*sizeof(YYSTYPE)); - yys = (int*)malloc(yymaxdepth*sizeof(int)); - if (!yyv || !yys) - { - yyerror( "out of memory" ); - return(1); - } yypv = &yyv[-1]; yyps = &yys[-1]; yystate = 0; @@ -989,13 +1118,26 @@ yyparse() yyerrflag = 0; yychar = -1; - goto yystack; +#if defined(__cplusplus) || defined(__STDC__) || defined(lint) +/* + Note that the following can never be executed but simply to please + lint and C++ + */ + switch (__yaccpar_lint_hack__) + { + case 1: goto yyerrlab; + case 2: goto yynewstate; + } +#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 */ + goto yystack; + /* ** get globals into registers. ** branch to here only if YYBACKUP was called. @@ -1052,26 +1194,47 @@ yyparse() #endif /* YYDEBUG */ if ( ++yy_ps >= &yys[ yymaxdepth ] ) /* 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); - yymaxdepth += YYMAXDEPTH; - yyv = (YYSTYPE*)realloc((char*)yyv, - yymaxdepth * sizeof(YYSTYPE)); - yys = (int*)realloc((char*)yys, - yymaxdepth * sizeof(int)); - if (!yyv || !yys) + /* + ** 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; + + yynewmax = yymaxdepth + YYMAXDEPTH; + if (yymaxdepth == YYMAXDEPTH) /* first time growth */ + { + YYSTYPE *newyyv = (YYSTYPE*)malloc(yynewmax*sizeof(YYSTYPE)); + int *newyys = (int*)malloc(yynewmax*sizeof(int)); + if (newyys != 0 && newyyv != 0) + { + yys = YYCOPY(newyys, yys, int); + yyv = YYCOPY(newyyv, yyv, YYSTYPE); + } + else + yynewmax = 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 */ + } + if (yynewmax <= yymaxdepth) /* tables not expanded */ { yyerror( "yacc stack overflow" ); - return(1); + YYABORT; } - yy_ps = yys + yyps_index; - yy_pv = yyv + yypv_index; - yypvt = yyv + yypvt_index; + yymaxdepth = yynewmax; + + yy_ps = yys + yyps_index; + yy_pv = yyv + yypv_index; + yypvt = yyv + yypvt_index; } *yy_ps = yy_state; *++yy_pv = yyval; @@ -1292,7 +1455,7 @@ yyparse() yy_n, yyreds[ yy_n ] ); #endif yytmp = yy_n; /* value to switch over */ - yypvt = yy_pv; /* $vars top of value stack */ + yypvt = yy_pv; /* $vars top of value stack */ /* ** Look in goto table for next state ** Sorry about using yy_state here as temporary @@ -1345,466 +1508,393 @@ yyparse() { case 2: -# line 227 "lua.stx" +# line 411 "lua.stx" { - pc=maincode; basepc=initcode; maxcurr=maxmain; + pc=maincode; basepc=*initcode; maxcurr=maxmain; nlocalvar=0; } break; case 3: -# line 232 "lua.stx" +# line 416 "lua.stx" { - maincode=pc; initcode=basepc; maxmain=maxcurr; + maincode=pc; *initcode=basepc; maxmain=maxcurr; } break; -case 6: -# line 240 "lua.stx" -{ - if (code == NULL) /* first function */ - { - code = (Byte *) calloc(GAPCODE, sizeof(Byte)); - if (code == NULL) - { - lua_error("not enough memory"); - err = 1; - } - maxcode = GAPCODE; - } - pc=0; basepc=code; maxcurr=maxcode; - nlocalvar=0; - yyval.vWord = lua_findsymbol(yypvt[-0].pChar); - } break; case 7: -# line 256 "lua.stx" +# line 425 "lua.stx" { - if (lua_debug) - { - code_byte(SETFUNCTION); - code_word(lua_nfile-1); - code_word(yypvt[-3].vWord); - } - lua_codeadjust (0); + init_function(yypvt[-0].pNode); } break; case 8: -# line 267 "lua.stx" +# line 429 "lua.stx" { - if (lua_debug) code_byte(RESET); - code_byte(RETCODE); code_byte(nlocalvar); - s_tag(yypvt[-6].vWord) = T_FUNCTION; - s_bvalue(yypvt[-6].vWord) = calloc (pc, sizeof(Byte)); - if (s_bvalue(yypvt[-6].vWord) == NULL) - { - lua_error("not enough memory"); - err = 1; - } - memcpy (s_bvalue(yypvt[-6].vWord), basepc, pc*sizeof(Byte)); - code = basepc; maxcode=maxcurr; -#if LISTING -PrintCode(code,code+pc); -#endif + Word func = luaI_findsymbol(yypvt[-2].pNode); + s_tag(func) = LUA_T_FUNCTION; + s_bvalue(func) = yypvt[-0].pByte; } break; -case 11: -# line 289 "lua.stx" +case 9: +# line 437 "lua.stx" { - ntemp = 0; - if (lua_debug) - { - code_byte(SETLINE); code_word(lua_linenumber); - } - } break; -case 15: -# line 302 "lua.stx" + init_function(yypvt[-0].pNode); + localvar[nlocalvar]=luaI_findsymbolbyname("self"); + add_nlocalvar(1); + } break; +case 10: +# line 443 "lua.stx" { - { - Word elseinit = yypvt[-2].vWord+sizeof(Word)+1; - if (pc - elseinit == 0) /* no else */ - { - pc -= sizeof(Word)+1; - elseinit = pc; - } - else - { - basepc[yypvt[-2].vWord] = JMP; - code_word_at(basepc+yypvt[-2].vWord+1, pc - elseinit); - } - basepc[yypvt[-4].vWord] = IFFJMP; - code_word_at(basepc+yypvt[-4].vWord+1,elseinit-(yypvt[-4].vWord+sizeof(Word)+1)); - } - } break; + /* assign function to table field */ + pc=maincode; basepc=*initcode; maxcurr=maxmain; + nlocalvar=0; + lua_pushvar(luaI_findsymbol(yypvt[-4].pNode)+1); + code_byte(PUSHSTRING); + code_word(luaI_findconstant(yypvt[-2].pNode)); + code_byte(PUSHFUNCTION); + code_code(yypvt[-0].pByte); + code_byte(STOREINDEXED0); + maincode=pc; *initcode=basepc; maxmain=maxcurr; + } break; +case 11: +# line 458 "lua.stx" +{ + codereturn(); + yyval.pByte = newvector(pc, Byte); + memcpy(yyval.pByte, basepc, pc*sizeof(Byte)); + funcCode = basepc; maxcode=maxcurr; +#if LISTING + PrintCode(funcCode,funcCode+pc); +#endif + } break; case 16: -# line 320 "lua.stx" -{yyval.vWord=pc;} break; -case 17: -# line 322 "lua.stx" +# line 475 "lua.stx" +{ codedebugline(); } break; +case 18: +# line 477 "lua.stx" +{ codedebugline(); } break; +case 20: +# line 480 "lua.stx" +{ codeIf(yypvt[-4].vLong, yypvt[-2].vLong); } break; +case 21: +# line 482 "lua.stx" +{yyval.vLong=pc;} break; +case 22: +# line 483 "lua.stx" { - basepc[yypvt[-3].vWord] = IFFJMP; - code_word_at(basepc+yypvt[-3].vWord+1, pc - (yypvt[-3].vWord + sizeof(Word)+1)); - - basepc[yypvt[-1].vWord] = UPJMP; - code_word_at(basepc+yypvt[-1].vWord+1, pc - (yypvt[-6].vWord)); + 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)); } break; -case 18: -# line 330 "lua.stx" -{yyval.vWord=pc;} break; -case 19: -# line 332 "lua.stx" +case 23: +# line 490 "lua.stx" +{yyval.vLong=pc;} break; +case 24: +# line 491 "lua.stx" { - basepc[yypvt[-0].vWord] = IFFUPJMP; - code_word_at(basepc+yypvt[-0].vWord+1, pc - (yypvt[-4].vWord)); + basepc[yypvt[-0].vLong] = IFFUPJMP; + code_word_at(basepc+yypvt[-0].vLong+1, pc - (yypvt[-4].vLong)); } break; -case 20: -# line 339 "lua.stx" +case 25: +# line 497 "lua.stx" { { int i; - if (yypvt[-0].vInt == 0 || nvarbuffer != ntemp - yypvt[-2].vInt * 2) - lua_codeadjust (yypvt[-2].vInt * 2 + nvarbuffer); + adjust_mult_assign(nvarbuffer, yypvt[-0].vInt, yypvt[-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)) lua_codeadjust (0); } } break; -case 21: -# line 350 "lua.stx" -{ lua_codeadjust (0); } break; -case 22: -# line 351 "lua.stx" -{ lua_codeadjust (0); } break; -case 23: -# line 352 "lua.stx" -{ add_nlocalvar(yypvt[-1].vInt); lua_codeadjust (0); } break; case 26: -# line 358 "lua.stx" -{ - { - Word elseinit = yypvt[-1].vWord+sizeof(Word)+1; - if (pc - elseinit == 0) /* no else */ - { - pc -= sizeof(Word)+1; - elseinit = pc; - } - else - { - basepc[yypvt[-1].vWord] = JMP; - code_word_at(basepc+yypvt[-1].vWord+1, pc - elseinit); - } - basepc[yypvt[-3].vWord] = IFFJMP; - code_word_at(basepc+yypvt[-3].vWord+1, elseinit - (yypvt[-3].vWord + sizeof(Word)+1)); - } - } break; +# line 507 "lua.stx" +{ code_byte(0); } break; case 27: -# line 377 "lua.stx" +# line 509 "lua.stx" +{ add_nlocalvar(yypvt[-1].vInt); + adjust_mult_assign(yypvt[-1].vInt, yypvt[-0].vInt, 0); + } break; +case 30: +# line 517 "lua.stx" +{ codeIf(yypvt[-3].vLong, yypvt[-1].vLong); } break; +case 31: +# line 520 "lua.stx" {yyval.vInt = nlocalvar;} break; -case 28: -# line 377 "lua.stx" -{ntemp = 0;} break; -case 29: -# line 378 "lua.stx" +case 32: +# line 521 "lua.stx" { - if (nlocalvar != yypvt[-3].vInt) + if (nlocalvar != yypvt[-2].vInt) { - nlocalvar = yypvt[-3].vInt; + nlocalvar = yypvt[-2].vInt; lua_codeadjust (0); } } break; -case 31: -# line 388 "lua.stx" -{ if (lua_debug){code_byte(SETLINE);code_word(lua_linenumber);}} break; -case 32: -# line 390 "lua.stx" -{ - if (lua_debug) code_byte(RESET); - code_byte(RETCODE); code_byte(nlocalvar); +case 34: +# line 531 "lua.stx" +{ codedebugline(); } break; +case 35: +# line 532 "lua.stx" +{ + if (yypvt[-1].vInt < 0) code_byte(MULT_RET); + codereturn(); } break; -case 33: -# line 397 "lua.stx" +case 36: +# line 539 "lua.stx" { - yyval.vWord = pc; + yyval.vLong = pc; code_byte(0); /* open space */ code_word (0); } break; -case 34: -# line 403 "lua.stx" -{ if (yypvt[-0].vInt == 0) {lua_codeadjust (ntemp+1); incr_ntemp();}} break; -case 35: -# line 406 "lua.stx" -{ yyval.vInt = yypvt[-1].vInt; } break; -case 36: -# line 407 "lua.stx" -{ code_byte(EQOP); yyval.vInt = 1; ntemp--;} break; case 37: -# line 408 "lua.stx" -{ code_byte(LTOP); yyval.vInt = 1; ntemp--;} break; +# line 545 "lua.stx" +{ if (yypvt[-0].vInt == 0) code_byte(1); } break; case 38: -# line 409 "lua.stx" -{ code_byte(LEOP); code_byte(NOTOP); yyval.vInt = 1; ntemp--;} break; +# line 548 "lua.stx" +{ yyval.vInt = yypvt[-1].vInt; } break; case 39: -# line 410 "lua.stx" -{ code_byte(EQOP); code_byte(NOTOP); yyval.vInt = 1; ntemp--;} break; +# line 549 "lua.stx" +{ code_byte(EQOP); yyval.vInt = 1; } break; case 40: -# line 411 "lua.stx" -{ code_byte(LEOP); yyval.vInt = 1; ntemp--;} break; +# line 550 "lua.stx" +{ code_byte(LTOP); yyval.vInt = 1; } break; case 41: -# line 412 "lua.stx" -{ code_byte(LTOP); code_byte(NOTOP); yyval.vInt = 1; ntemp--;} break; +# line 551 "lua.stx" +{ code_byte(GTOP); yyval.vInt = 1; } break; case 42: -# line 413 "lua.stx" -{ code_byte(ADDOP); yyval.vInt = 1; ntemp--;} break; +# line 552 "lua.stx" +{ code_byte(EQOP); code_byte(NOTOP); yyval.vInt = 1; } break; case 43: -# line 414 "lua.stx" -{ code_byte(SUBOP); yyval.vInt = 1; ntemp--;} break; +# line 553 "lua.stx" +{ code_byte(LEOP); yyval.vInt = 1; } break; case 44: -# line 415 "lua.stx" -{ code_byte(MULTOP); yyval.vInt = 1; ntemp--;} break; +# line 554 "lua.stx" +{ code_byte(GEOP); yyval.vInt = 1; } break; case 45: -# line 416 "lua.stx" -{ code_byte(DIVOP); yyval.vInt = 1; ntemp--;} break; +# line 555 "lua.stx" +{ code_byte(ADDOP); yyval.vInt = 1; } break; case 46: -# line 417 "lua.stx" -{ code_byte(CONCOP); yyval.vInt = 1; ntemp--;} break; +# line 556 "lua.stx" +{ code_byte(SUBOP); yyval.vInt = 1; } break; case 47: -# line 418 "lua.stx" -{ yyval.vInt = 1; } break; +# line 557 "lua.stx" +{ code_byte(MULTOP); yyval.vInt = 1; } break; case 48: -# line 419 "lua.stx" -{ code_byte(MINUSOP); yyval.vInt = 1;} break; +# line 558 "lua.stx" +{ code_byte(DIVOP); yyval.vInt = 1; } break; case 49: -# line 420 "lua.stx" -{ yyval.vInt = yypvt[-0].vInt; } break; +# line 559 "lua.stx" +{ code_byte(POWOP); yyval.vInt = 1; } break; case 50: -# line 422 "lua.stx" -{ - code_byte(CREATEARRAY); - yyval.vInt = 1; - } break; +# line 560 "lua.stx" +{ code_byte(CONCOP); yyval.vInt = 1; } break; case 51: -# line 426 "lua.stx" -{ lua_pushvar (yypvt[-0].vLong); yyval.vInt = 1;} break; +# line 561 "lua.stx" +{ code_byte(MINUSOP); yyval.vInt = 1;} break; case 52: -# line 427 "lua.stx" -{ code_number(yypvt[-0].vFloat); yyval.vInt = 1; } break; +# line 562 "lua.stx" +{ yyval.vInt = 1; } break; case 53: -# line 429 "lua.stx" +# line 563 "lua.stx" +{ yyval.vInt = 1;} break; +case 54: +# line 564 "lua.stx" +{ code_number(yypvt[-0].vFloat); yyval.vInt = 1; } break; +case 55: +# line 566 "lua.stx" { code_byte(PUSHSTRING); code_word(yypvt[-0].vWord); yyval.vInt = 1; - incr_ntemp(); - } break; -case 54: -# line 435 "lua.stx" -{code_byte(PUSHNIL); yyval.vInt = 1; incr_ntemp();} break; -case 55: -# line 437 "lua.stx" -{ - yyval.vInt = 0; - if (lua_debug) - { - code_byte(SETLINE); code_word(lua_linenumber); - } } break; case 56: -# line 444 "lua.stx" -{ code_byte(NOTOP); yyval.vInt = 1;} break; +# line 571 "lua.stx" +{code_byte(PUSHNIL); yyval.vInt = 1; } break; case 57: -# line 445 "lua.stx" -{code_byte(POP); ntemp--;} break; +# line 572 "lua.stx" +{ yyval.vInt = 0; } break; case 58: -# line 446 "lua.stx" -{ - basepc[yypvt[-2].vWord] = ONFJMP; - code_word_at(basepc+yypvt[-2].vWord+1, pc - (yypvt[-2].vWord + sizeof(Word)+1)); - yyval.vInt = 1; - } break; +# line 573 "lua.stx" +{ code_byte(NOTOP); yyval.vInt = 1;} break; case 59: -# line 451 "lua.stx" -{code_byte(POP); ntemp--;} break; +# line 574 "lua.stx" +{code_byte(POP); } break; case 60: -# line 452 "lua.stx" +# line 575 "lua.stx" { - basepc[yypvt[-2].vWord] = ONTJMP; - code_word_at(basepc+yypvt[-2].vWord+1, pc - (yypvt[-2].vWord + sizeof(Word)+1)); + basepc[yypvt[-2].vLong] = ONFJMP; + code_word_at(basepc+yypvt[-2].vLong+1, pc - (yypvt[-2].vLong + sizeof(Word)+1)); yyval.vInt = 1; } break; case 61: -# line 460 "lua.stx" +# line 580 "lua.stx" +{code_byte(POP); } break; +case 62: +# line 581 "lua.stx" +{ + basepc[yypvt[-2].vLong] = ONTJMP; + code_word_at(basepc+yypvt[-2].vLong+1, pc - (yypvt[-2].vLong + sizeof(Word)+1)); + yyval.vInt = 1; + } break; +case 63: +# line 589 "lua.stx" { - code_byte(PUSHBYTE); - yyval.vWord = pc; code_byte(0); - incr_ntemp(); code_byte(CREATEARRAY); + yyval.vLong = pc; code_word(0); } break; -case 62: -# line 467 "lua.stx" +case 64: +# line 594 "lua.stx" { - basepc[yypvt[-2].vWord] = yypvt[-0].vInt; - if (yypvt[-1].vLong < 0) /* there is no function to be called */ - { - yyval.vInt = 1; - } - else - { - lua_pushvar (yypvt[-1].vLong+1); - code_byte(PUSHMARK); - incr_ntemp(); - code_byte(PUSHOBJECT); - incr_ntemp(); - code_byte(CALLFUNC); - ntemp -= 4; - yyval.vInt = 0; - if (lua_debug) - { - code_byte(SETLINE); code_word(lua_linenumber); - } - } + code_word_at(basepc+yypvt[-3].vLong, yypvt[-1].vInt); } break; -case 63: -# line 491 "lua.stx" -{ code_byte(PUSHNIL); incr_ntemp();} break; case 65: -# line 495 "lua.stx" -{code_byte(PUSHMARK); yyval.vInt = ntemp; incr_ntemp();} break; +# line 600 "lua.stx" +{ code_byte(CALLFUNC); code_byte(yypvt[-1].vInt+yypvt[-0].vInt); } break; case 66: -# line 496 "lua.stx" -{ code_byte(CALLFUNC); ntemp = yypvt[-3].vInt-1;} break; +# line 603 "lua.stx" +{ yyval.vInt = 0; } break; case 67: -# line 498 "lua.stx" -{lua_pushvar (yypvt[-0].vLong); } break; +# line 605 "lua.stx" +{ + code_byte(PUSHSELF); + code_word(luaI_findconstant(yypvt[-0].pNode)); + yyval.vInt = 1; + } break; case 68: -# line 501 "lua.stx" -{ yyval.vInt = 1; } break; +# line 613 "lua.stx" +{ if (yypvt[-1].vInt<0) { code_byte(1); yyval.vInt = -yypvt[-1].vInt; } else yyval.vInt = yypvt[-1].vInt; } break; case 69: -# line 502 "lua.stx" -{ yyval.vInt = yypvt[-0].vInt; } break; +# line 614 "lua.stx" +{ yyval.vInt = 1; } break; case 70: -# line 505 "lua.stx" -{ yyval.vInt = yypvt[-0].vInt; } break; +# line 617 "lua.stx" +{ yyval.vInt = 0; } break; case 71: -# line 506 "lua.stx" -{if (!yypvt[-1].vInt){lua_codeadjust (ntemp+1); incr_ntemp();}} break; +# line 618 "lua.stx" +{ yyval.vInt = yypvt[-0].vInt; } break; case 72: -# line 507 "lua.stx" -{yyval.vInt = yypvt[-0].vInt;} break; +# line 621 "lua.stx" +{ if (yypvt[-0].vInt == 0) yyval.vInt = -1; else yyval.vInt = 1; } break; +case 73: +# line 622 "lua.stx" +{ if (yypvt[-1].vInt < 0) code_byte(1); } break; +case 74: +# line 623 "lua.stx" +{ + int r = yypvt[-3].vInt < 0 ? -yypvt[-3].vInt : yypvt[-3].vInt; + yyval.vInt = (yypvt[-0].vInt == 0) ? -(r+1) : r+1; + } break; case 75: -# line 515 "lua.stx" +# line 629 "lua.stx" +{ lua_codeadjust(0); } break; +case 76: +# line 630 "lua.stx" +{ lua_codeadjust(0); } break; +case 77: +# line 634 "lua.stx" { - localvar[nlocalvar]=lua_findsymbol(yypvt[-0].pChar); + localvar[nlocalvar]=luaI_findsymbol(yypvt[-0].pNode); add_nlocalvar(1); } break; -case 76: -# line 520 "lua.stx" +case 78: +# line 639 "lua.stx" { - localvar[nlocalvar]=lua_findsymbol(yypvt[-0].pChar); + localvar[nlocalvar]=luaI_findsymbol(yypvt[-0].pNode); add_nlocalvar(1); } break; -case 77: -# line 526 "lua.stx" -{yyval.vLong=-1;} break; -case 78: -# line 527 "lua.stx" -{yyval.vLong=lua_findsymbol(yypvt[-0].pChar);} break; case 79: -# line 531 "lua.stx" -{ - flush_record(yypvt[-1].vInt%FIELDS_PER_FLUSH); - yyval.vInt = yypvt[-1].vInt; - } break; +# line 645 "lua.stx" +{ yyval.vInt = 0; } break; case 80: -# line 536 "lua.stx" -{ - flush_list(yypvt[-1].vInt/FIELDS_PER_FLUSH, yypvt[-1].vInt%FIELDS_PER_FLUSH); - yyval.vInt = yypvt[-1].vInt; - } break; +# line 647 "lua.stx" +{ yyval.vInt = yypvt[-1].vInt; flush_list(yypvt[-1].vInt/FIELDS_PER_FLUSH, yypvt[-1].vInt%FIELDS_PER_FLUSH); } break; case 81: -# line 542 "lua.stx" -{ yyval.vInt = 0; } break; +# line 649 "lua.stx" +{ yyval.vInt = yypvt[-1].vInt; flush_record(yypvt[-1].vInt%FIELDS_PER_FLUSH); } break; case 82: -# line 543 "lua.stx" -{ yyval.vInt = yypvt[-0].vInt; } break; +# line 651 "lua.stx" +{ flush_list(yypvt[-1].vInt/FIELDS_PER_FLUSH, yypvt[-1].vInt%FIELDS_PER_FLUSH); } break; case 83: -# line 546 "lua.stx" +# line 653 "lua.stx" +{ yyval.vInt = yypvt[-4].vInt+yypvt[-1].vInt; flush_record(yypvt[-1].vInt%FIELDS_PER_FLUSH); } break; +case 86: +# line 660 "lua.stx" {yyval.vInt=1;} break; -case 84: -# line 548 "lua.stx" +case 87: +# line 662 "lua.stx" { yyval.vInt=yypvt[-2].vInt+1; if (yyval.vInt%FIELDS_PER_FLUSH == 0) flush_record(FIELDS_PER_FLUSH); } break; -case 85: -# line 554 "lua.stx" -{yyval.vWord = lua_findconstant(yypvt[-0].pChar);} break; -case 86: -# line 555 "lua.stx" +case 88: +# line 669 "lua.stx" { - push_field(yypvt[-2].vWord); + push_field(luaI_findconstant(yypvt[-2].pNode)); } break; -case 87: -# line 560 "lua.stx" -{ yyval.vInt = 0; } break; -case 88: -# line 561 "lua.stx" -{ yyval.vInt = yypvt[-0].vInt; } break; case 89: -# line 564 "lua.stx" +# line 674 "lua.stx" {yyval.vInt=1;} break; case 90: -# line 566 "lua.stx" +# line 676 "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); } break; case 91: -# line 574 "lua.stx" +# line 684 "lua.stx" { nvarbuffer = 0; varbuffer[nvarbuffer] = yypvt[-0].vLong; incr_nvarbuffer(); yyval.vInt = (yypvt[-0].vLong == 0) ? 1 : 0; } break; case 92: -# line 580 "lua.stx" +# line 690 "lua.stx" { varbuffer[nvarbuffer] = yypvt[-0].vLong; incr_nvarbuffer(); yyval.vInt = (yypvt[-0].vLong == 0) ? yypvt[-2].vInt + 1 : yypvt[-2].vInt; } break; case 93: -# line 587 "lua.stx" +# line 696 "lua.stx" +{ yyval.vLong = yypvt[-0].vLong; } break; +case 94: +# line 698 "lua.stx" { - Word s = lua_findsymbol(yypvt[-0].pChar); - int local = lua_localname (s); - if (local == -1) /* global var */ - yyval.vLong = s + 1; /* return positive value */ - else - yyval.vLong = -(local+1); /* return negative value */ + yyval.vLong = 0; /* indexed variable */ } break; -case 94: -# line 596 "lua.stx" -{lua_pushvar (yypvt[-0].vLong);} break; case 95: -# line 597 "lua.stx" +# line 702 "lua.stx" { + code_byte(PUSHSTRING); + code_word(luaI_findconstant(yypvt[-0].pNode)); yyval.vLong = 0; /* indexed variable */ } break; case 96: -# line 600 "lua.stx" -{lua_pushvar (yypvt[-0].vLong);} break; -case 97: -# line 601 "lua.stx" +# line 710 "lua.stx" { - code_byte(PUSHSTRING); - code_word(lua_findconstant(yypvt[-0].pChar)); incr_ntemp(); - yyval.vLong = 0; /* indexed variable */ + Word s = luaI_findsymbol(yypvt[-0].pNode); + int local = lua_localname (s); + if (local == -1) /* global var */ + yyval.vLong = s + 1; /* return positive value */ + else + yyval.vLong = -(local+1); /* return negative value */ } break; +case 97: +# line 720 "lua.stx" +{ lua_pushvar(yypvt[-0].vLong); } break; case 98: -# line 608 "lua.stx" -{localvar[nlocalvar]=lua_findsymbol(yypvt[-0].pChar); yyval.vInt = 1;} break; +# line 723 "lua.stx" +{localvar[nlocalvar]=luaI_findsymbol(yypvt[-0].pNode); yyval.vInt = 1;} break; case 99: -# line 610 "lua.stx" +# line 725 "lua.stx" { - localvar[nlocalvar+yypvt[-2].vInt]=lua_findsymbol(yypvt[-0].pChar); + localvar[nlocalvar+yypvt[-2].vInt]=luaI_findsymbol(yypvt[-0].pNode); yyval.vInt = yypvt[-2].vInt+1; } break; +case 100: +# line 731 "lua.stx" +{ yyval.vInt = 0; } break; +case 101: +# line 732 "lua.stx" +{ yyval.vInt = yypvt[-0].vInt; } break; case 102: -# line 620 "lua.stx" +# line 735 "lua.stx" {lua_debug = yypvt[-0].vInt;} break; } goto yystack; /* reset registers in driver code */ diff --git a/src/y.tab.h b/src/parser.h index 5bee29f9..4c125dad 100644 --- a/src/y.tab.h +++ b/src/parser.h @@ -2,11 +2,12 @@ typedef union { int vInt; - long vLong; float vFloat; char *pChar; Word vWord; + Long vLong; Byte *pByte; + TreeNode *pNode; } YYSTYPE; extern YYSTYPE yylval; # define WRONGTOKEN 257 @@ -22,16 +23,17 @@ extern YYSTYPE yylval; # define END 267 # define RETURN 268 # define LOCAL 269 -# define NUMBER 270 -# define FUNCTION 271 +# define FUNCTION 270 +# define NUMBER 271 # define STRING 272 # define NAME 273 # define DEBUG 274 # define AND 275 # define OR 276 -# define NE 277 -# define LE 278 -# define GE 279 -# define CONC 280 -# define UNARY 281 -# define NOT 282 +# define EQ 277 +# define NE 278 +# define LE 279 +# define GE 280 +# define CONC 281 +# define UNARY 282 +# define NOT 283 diff --git a/src/table.c b/src/table.c index 7b93df76..cedbf31c 100644 --- a/src/table.c +++ b/src/table.c @@ -3,159 +3,144 @@ ** Module to control static tables */ -char *rcs_table="$Id: table.c,v 2.1 1994/04/20 22:07:57 celes Exp $"; +char *rcs_table="$Id: table.c,v 2.28 1995/01/18 20:15:54 celes Exp $"; -#include <stdlib.h> #include <string.h> -#include "mm.h" - +#include "mem.h" #include "opcode.h" +#include "tree.h" #include "hash.h" #include "inout.h" #include "table.h" #include "lua.h" +#include "fallback.h" + + +#define BUFFER_BLOCK 256 + +Symbol *lua_table; +static Word lua_ntable = 0; +static Long lua_maxsymbol = 0; + +TaggedString **lua_constant; +static Word lua_nconstant = 0; +static Long lua_maxconstant = 0; + -#define streq(s1,s2) (s1[0]==s2[0]&&strcmp(s1+1,s2+1)==0) - -#ifndef MAXSYMBOL -#define MAXSYMBOL 512 -#endif -static Symbol tablebuffer[MAXSYMBOL] = { - {"type",{T_CFUNCTION,{lua_type}}}, - {"tonumber",{T_CFUNCTION,{lua_obj2number}}}, - {"next",{T_CFUNCTION,{lua_next}}}, - {"nextvar",{T_CFUNCTION,{lua_nextvar}}}, - {"print",{T_CFUNCTION,{lua_print}}}, - {"dofile",{T_CFUNCTION,{lua_internaldofile}}}, - {"dostring",{T_CFUNCTION,{lua_internaldostring}}} - }; -Symbol *lua_table=tablebuffer; -Word lua_ntable=7; - -struct List -{ - Symbol *s; - struct List *next; -}; - -static struct List o6={ tablebuffer+6, 0}; -static struct List o5={ tablebuffer+5, &o6 }; -static struct List o4={ tablebuffer+4, &o5 }; -static struct List o3={ tablebuffer+3, &o4 }; -static struct List o2={ tablebuffer+2, &o3 }; -static struct List o1={ tablebuffer+1, &o2 }; -static struct List o0={ tablebuffer+0, &o1 }; -static struct List *searchlist=&o0; - -#ifndef MAXCONSTANT -#define MAXCONSTANT 256 -#endif -/* pre-defined constants need garbage collection extra byte */ -static char tm[] = " mark"; -static char ti[] = " nil"; -static char tn[] = " number"; -static char ts[] = " string"; -static char tt[] = " table"; -static char tf[] = " function"; -static char tc[] = " cfunction"; -static char tu[] = " userdata"; -static char *constantbuffer[MAXCONSTANT] = {tm+1, ti+1, - tn+1, ts+1, - tt+1, tf+1, - tc+1, tu+1 - }; -char **lua_constant = constantbuffer; -Word lua_nconstant=T_USERDATA+1; - -#ifndef MAXSTRING -#define MAXSTRING 512 -#endif -static char *stringbuffer[MAXSTRING]; -char **lua_string = stringbuffer; -Word lua_nstring=0; #define MAXFILE 20 char *lua_file[MAXFILE]; int lua_nfile; +#define GARBAGE_BLOCK 256 +#define MIN_GARBAGE_BLOCK 10 -#define markstring(s) (*((s)-1)) +static void lua_nextvar (void); +static void setglobal (void); +static void getglobal (void); + +/* +** Initialise symbol table with internal functions +*/ +static void lua_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; +} -/* Variables to controll garbage collection */ -Word lua_block=10; /* to check when garbage collector will be called */ -Word lua_nentity; /* counter of new entities (strings and arrays) */ +/* +** Initialise constant table with pre-defined constants +*/ +void lua_initconstant (void) +{ + lua_maxconstant = BUFFER_BLOCK; + lua_constant = newvector(lua_maxconstant, TaggedString *); +} /* ** Given a name, search it at symbol table and return its index. If not -** found, allocate at end of table, checking oveflow and return its index. -** On error, return -1. +** found, allocate it. */ -int lua_findsymbol (char *s) +Word luaI_findsymbol (TreeNode *t) { - struct List *l, *p; - for (p=NULL, l=searchlist; l!=NULL; p=l, l=l->next) - if (streq(s,l->s->name)) + if (lua_table == NULL) + lua_initsymbol(); + if (t->varindex == NOT_USED) + { + if (lua_ntable == lua_maxsymbol) { - if (p!=NULL) - { - p->next = l->next; - l->next = searchlist; - searchlist = l; - } - return (l->s-lua_table); + 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); } - - if (lua_ntable >= MAXSYMBOL-1) - { - lua_error ("symbol table overflow"); - return -1; + t->varindex = lua_ntable; + s_tag(lua_ntable) = LUA_T_NIL; + lua_ntable++; } - s_name(lua_ntable) = strdup(s); - if (s_name(lua_ntable) == NULL) - { - lua_error ("not enough memory"); - return -1; - } - s_tag(lua_ntable) = T_NIL; - p = malloc(sizeof(*p)); - p->s = lua_table+lua_ntable; - p->next = searchlist; - searchlist = p; + return t->varindex; +} - return lua_ntable++; + +Word luaI_findsymbolbyname (char *name) +{ + return luaI_findsymbol(lua_constcreate(name)); } + /* -** Given a constant string, search it at constant table and return its index. -** If not found, allocate at end of the table, checking oveflow and return -** its index. -** -** For each allocation, the function allocate a extra char to be used to -** mark used string (it's necessary to deal with constant and string -** uniformily). The function store at the table the second position allocated, -** that represents the beginning of the real string. On error, return -1. -** +** Given a name, search it at constant table and return its index. If not +** found, allocate it. +** On error, return -1. */ -int lua_findconstant (char *s) +Word luaI_findconstant (TreeNode *t) { - int i; - for (i=0; i<lua_nconstant; i++) - if (streq(s,lua_constant[i])) - return i; - if (lua_nconstant >= MAXCONSTANT-1) + if (lua_constant == NULL) + lua_initconstant(); + if (t->constindex == NOT_USED) { - lua_error ("lua: constant string table overflow"); - return -1; - } - { - char *c = calloc(strlen(s)+2,sizeof(char)); - c++; /* create mark space */ - lua_constant[lua_nconstant++] = strcpy(c,s); + 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 *); + } + t->constindex = lua_nconstant; + lua_constant[lua_nconstant] = &(t->ts); + lua_nconstant++; } - return (lua_nconstant-1); + return t->constindex; } @@ -164,7 +149,7 @@ int lua_findconstant (char *s) */ void lua_travsymbol (void (*fn)(Object *)) { - int i; + Word i; for (i=0; i<lua_ntable; i++) fn(&s_object(i)); } @@ -175,9 +160,9 @@ void lua_travsymbol (void (*fn)(Object *)) */ void lua_markobject (Object *o) { - if (tag(o) == T_STRING) - markstring (svalue(o)) = 1; - else if (tag(o) == T_ARRAY) + if (tag(o) == LUA_T_STRING && !tsvalue(o)->marked) + tsvalue(o)->marked = 1; + else if (tag(o) == LUA_T_ARRAY) lua_hashmark (avalue(o)); } @@ -188,87 +173,33 @@ void lua_markobject (Object *o) */ void lua_pack (void) { - /* mark stack strings */ - lua_travstack(lua_markobject); - - /* mark symbol table strings */ - lua_travsymbol(lua_markobject); - - lua_stringcollector(); - lua_hashcollector(); - - lua_nentity = 0; /* reset counter */ + 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 */ + recovered += lua_strcollector(); + recovered += lua_hashcollector(); + nentity = 0; /* reset counter */ + block=(16*block-7*recovered)/12; /* adapt block size */ + if (block < MIN_GARBAGE_BLOCK) block = MIN_GARBAGE_BLOCK; } -/* -** Garbage collection to atrings. -** Delete all unmarked strings -*/ -void lua_stringcollector (void) -{ - int i, j; - for (i=j=0; i<lua_nstring; i++) - if (markstring(lua_string[i]) == 1) - { - lua_string[j++] = lua_string[i]; - markstring(lua_string[i]) = 0; - } - else - { - free (lua_string[i]-1); - } - lua_nstring = j; -} - -/* -** Allocate a new string at string table. The given string is already -** allocated with mark space and the function puts it at the end of the -** table, checking overflow, and returns its own pointer, or NULL on error. -*/ -char *lua_createstring (char *s) -{ - int i; - if (s == NULL) return NULL; - - for (i=0; i<lua_nstring; i++) - if (streq(s,lua_string[i])) - { - free(s-1); - return lua_string[i]; - } - - if (lua_nentity == lua_block || lua_nstring >= MAXSTRING-1) - { - lua_pack (); - if (lua_nstring >= MAXSTRING-1) - { - lua_error ("string table overflow"); - return NULL; - } - } - lua_string[lua_nstring++] = s; - lua_nentity++; - return s; -} /* ** Add a file name at file table, checking overflow. This function also set ** the external variable "lua_filename" with the function filename set. -** Return 0 on success or 1 on error. +** Return 0 on success or error message on error. */ -int lua_addfile (char *fn) +char *lua_addfile (char *fn) { - if (lua_nfile >= MAXFILE-1) - { - lua_error ("too many files"); - return 1; - } - if ((lua_file[lua_nfile++] = strdup (fn)) == NULL) - { - lua_error ("not enough memory"); - return 1; - } - return 0; + if (lua_nfile >= MAXFILE) + return "too many files"; + if ((lua_file[lua_nfile++] = luaI_strdup (fn)) == NULL) + return "not enough memory"; + return NULL; } /* @@ -276,7 +207,7 @@ int lua_addfile (char *fn) */ int lua_delfile (void) { - lua_nfile--; + luaI_free(lua_file[--lua_nfile]); return 1; } @@ -291,47 +222,56 @@ char *lua_filename (void) /* ** Internal function: return next global variable */ -void lua_nextvar (void) +static void lua_nextvar (void) { - int index; - Object *o = lua_getparam (1); - if (o == NULL) - { lua_error ("too few arguments to function `nextvar'"); return; } - if (lua_getparam (2) != NULL) - { lua_error ("too many arguments to function `nextvar'"); return; } - if (tag(o) == T_NIL) + char *varname; + TreeNode *next; + lua_Object o = lua_getparam(1); + if (o == LUA_NOOBJECT) + lua_reportbug("too few arguments to function `nextvar'"); + if (lua_getparam(2) != LUA_NOOBJECT) + lua_reportbug("too many arguments to function `nextvar'"); + if (lua_isnil(o)) + varname = NULL; + else if (!lua_isstring(o)) { - index = 0; - } - else if (tag(o) != T_STRING) - { - lua_error ("incorrect argument to function `nextvar'"); - return; + lua_reportbug("incorrect argument to function `nextvar'"); + return; /* to avoid warnings */ } else + varname = lua_getstring(o); + next = lua_varnext(varname); + if (next == NULL) { - for (index=0; index<lua_ntable; index++) - if (streq(s_name(index),svalue(o))) break; - if (index == lua_ntable) - { - lua_error ("name not found in function `nextvar'"); - return; - } - index++; - while (index < lua_ntable && tag(&s_object(index)) == T_NIL) index++; - - if (index == lua_ntable) - { - lua_pushnil(); - lua_pushnil(); - return; - } + lua_pushnil(); + lua_pushnil(); } + else { Object name; - tag(&name) = T_STRING; - svalue(&name) = lua_createstring(lua_strdup(s_name(index))); - if (lua_pushobject (&name)) return; - if (lua_pushobject (&s_object(index))) return; + tag(&name) = LUA_T_STRING; + tsvalue(&name) = &(next->ts); + luaI_pushobject(&name); + luaI_pushobject(&s_object(next->varindex)); } } + + +static void setglobal (void) +{ + lua_Object name = lua_getparam(1); + lua_Object value = lua_getparam(2); + if (!lua_isstring(name)) + lua_reportbug("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_reportbug("incorrect argument to function `getglobal'"); + lua_pushobject(lua_getglobal(lua_getstring(name))); +} diff --git a/src/table.h b/src/table.h index a1da6639..c25075c0 100644 --- a/src/table.h +++ b/src/table.h @@ -1,42 +1,31 @@ /* ** Module to control static tables ** TeCGraf - PUC-Rio -** $Id: table.h,v 2.1 1994/04/20 22:07:57 celes Exp $ +** $Id: table.h,v 2.10 1994/12/20 21:20:36 roberto Exp $ */ #ifndef table_h #define table_h -extern Symbol *lua_table; -extern Word lua_ntable; - -extern char **lua_constant; -extern Word lua_nconstant; - -extern char **lua_string; -extern Word lua_nstring; +#include "tree.h" +#include "opcode.h" -extern Hash **lua_array; -extern Word lua_narray; +extern Symbol *lua_table; +extern TaggedString **lua_constant; extern char *lua_file[]; extern int lua_nfile; -extern Word lua_block; -extern Word lua_nentity; - - -int lua_findsymbol (char *s); -int lua_findconstant (char *s); +void lua_initconstant (void); +Word luaI_findsymbolbyname (char *name); +Word luaI_findsymbol (TreeNode *t); +Word luaI_findconstant (TreeNode *t); void lua_travsymbol (void (*fn)(Object *)); void lua_markobject (Object *o); void lua_pack (void); -void lua_stringcollector (void); -char *lua_createstring (char *s); -int lua_addfile (char *fn); +char *lua_addfile (char *fn); int lua_delfile (void); char *lua_filename (void); -void lua_nextvar (void); #endif diff --git a/src/tree.c b/src/tree.c new file mode 100644 index 00000000..5dd9d78e --- /dev/null +++ b/src/tree.c @@ -0,0 +1,141 @@ +/* +** tree.c +** TecCGraf - PUC-Rio +*/ + +char *rcs_tree="$Id: tree.c,v 1.13 1995/01/12 14:19:04 roberto Exp $"; + + +#include <string.h> + +#include "mem.h" +#include "lua.h" +#include "tree.h" +#include "table.h" + + +#define lua_strcmp(a,b) (a[0]<b[0]?(-1):(a[0]>b[0]?(1):strcmp(a,b))) + + +typedef struct StringNode { + struct StringNode *next; + TaggedString ts; +} StringNode; + +static StringNode *string_root = NULL; + +static TreeNode *constant_root = NULL; + +/* +** Insert a new constant/variable at the tree. +*/ +static TreeNode *tree_create (TreeNode **node, 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; + } +} + +TaggedString *lua_createstring (char *str) +{ + 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); +} + + +TreeNode *lua_constcreate (char *str) +{ + return tree_create(&constant_root, str); +} + + +/* +** Garbage collection function. +** This function traverse the string list freeing unindexed strings +*/ +Long lua_strcollector (void) +{ + StringNode *curr = string_root, *prev = NULL; + Long counter = 0; + while (curr) + { + StringNode *next = curr->next; + if (!curr->ts.marked) + { + if (prev == NULL) string_root = next; + else prev->next = next; + luaI_free(curr); + ++counter; + } + else + { + curr->ts.marked = 0; + prev = curr; + } + curr = next; + } + return counter; +} + +/* +** Return next variable. +*/ +static TreeNode *tree_next (TreeNode *node, char *str) +{ + if (node == NULL) return NULL; + else if (str == NULL) return node; + else + { + int c = lua_strcmp(str, node->ts.str); + if (c == 0) + return node->left != NULL ? node->left : node->right; + else if (c < 0) + { + TreeNode *result = tree_next(node->left, str); + return result != NULL ? result : node->right; + } + else + return tree_next(node->right, str); + } +} + +TreeNode *lua_varnext (char *n) +{ + TreeNode *result; + char *name = n; + while (1) + { /* repeat until a valid (non nil) variable */ + result = tree_next(constant_root, name); + if (result == NULL) return NULL; + if (result->varindex != NOT_USED && + s_tag(result->varindex) != LUA_T_NIL) + return result; + name = result->ts.str; + } +} + diff --git a/src/tree.h b/src/tree.h new file mode 100644 index 00000000..849cd5a9 --- /dev/null +++ b/src/tree.h @@ -0,0 +1,37 @@ +/* +** tree.h +** TecCGraf - PUC-Rio +** $Id: tree.h,v 1.9 1995/01/12 14:19:04 roberto Exp $ +*/ + +#ifndef tree_h +#define tree_h + +#include "types.h" + +#define NOT_USED 0xFFFE + + +typedef struct TaggedString +{ + unsigned long hash; /* 0 if not initialized */ + char marked; /* for garbage collection */ + 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 *lua_varnext (char *n); + +#endif diff --git a/src/types.h b/src/types.h new file mode 100644 index 00000000..43684228 --- /dev/null +++ b/src/types.h @@ -0,0 +1,31 @@ +/* +** TeCGraf - PUC-Rio +** $Id: types.h,v 1.3 1995/02/06 19:32:43 roberto Exp $ +*/ + +#ifndef types_h +#define types_h + +#include <limits.h> + +#ifndef real +#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 */ + +#define Word lua_Word /* some systems have Word as a predefined type */ +typedef unsigned short Word; /* unsigned 16 bits */ + +#define MAX_WORD (USHRT_MAX-2) /* maximum value of a word (-2 for safety) */ +#define MAX_INT (INT_MAX-2) /* maximum value of a int (-2 for safety) */ + +#define Long lua_Long /* some systems have Long as a predefined type */ +typedef signed long Long; /* 32 bits */ + +typedef unsigned int IntPoint; /* unsigned with same size as a pointer (for hashing) */ + +#endif diff --git a/src/ugly.h b/src/ugly.h new file mode 100644 index 00000000..c7512255 --- /dev/null +++ b/src/ugly.h @@ -0,0 +1,36 @@ +/* +** 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/yacc/Makefile b/src/yacc/Makefile index 1d887e10..284d4ab5 100644 --- a/src/yacc/Makefile +++ b/src/yacc/Makefile @@ -1,27 +1,3 @@ -# makefile for lua - -LIB= $(LUA)/lib -INC= $(LUA)/inc - -CC= gcc -CFLAGS= -g -Wall -O2 -I$(INC) $(DEFS) -DEFS= -DMAXCODE=64000 -DMAXCONSTANT=1024 -DMAXSYMBOL=1024 -DMAXARRAY=1024 - -OBJS= hash.o inout.o lex.o opcode.o table.o y.tab.o -SLIB= $(LIB)/lua.a -DLIB= $(LIB)/liblua.so.1.1 - -libs: $(SLIB) $(DLIB) - -$(SLIB): y.tab.c $(OBJS) - ar ruvl $@ $(OBJS) - ranlib $(SLIB) - -$(DLIB): $(OBJS) - ld -o $@ $(OBJS) - -y.tab.c: lua.stx exscript - yacc -d lua.stx ; ex y.tab.c <exscript - -clean: - rm -f $(OBJS) $(SLIB) $(DLIB) +parser.c: + co -M lua.stx + yacc -d lua.stx ; mv -f y.tab.c ../parser.c ; mv -f y.tab.h ../parser.h diff --git a/src/yacc/exscript b/src/yacc/exscript deleted file mode 100644 index 0a0f2a9f..00000000 --- a/src/yacc/exscript +++ /dev/null @@ -1,3 +0,0 @@ -1d -x - diff --git a/src/yacc/lua.lex b/src/yacc/lua.lex deleted file mode 100644 index cbb0232a..00000000 --- a/src/yacc/lua.lex +++ /dev/null @@ -1,85 +0,0 @@ -%{ - -char *rcs_lualex = "$Id: lua.lex,v 1.1 1993/12/17 18:53:41 celes Exp $"; - -#include <stdlib.h> -#include <string.h> - -#include "opcode.h" -#include "hash.h" -#include "inout.h" -#include "table.h" -#include "y.tab.h" - -#undef input -#undef unput - -static Input input; -static Unput unput; - -void lua_setinput (Input fn) -{ - input = fn; -} - -void lua_setunput (Unput fn) -{ - unput = fn; -} - -char *lua_lasttext (void) -{ - return yytext; -} - -%} - - -%% -[ \t]* ; -^"$debug" {yylval.vInt = 1; return DEBUG;} -^"$nodebug" {yylval.vInt = 0; return DEBUG;} -\n lua_linenumber++; -"--".* ; -"local" return LOCAL; -"if" return IF; -"then" return THEN; -"else" return ELSE; -"elseif" return ELSEIF; -"while" return WHILE; -"do" return DO; -"repeat" return REPEAT; -"until" return UNTIL; -"function" { - yylval.vWord = lua_nfile-1; - return FUNCTION; - } -"end" return END; -"return" return RETURN; -"local" return LOCAL; -"nil" return NIL; -"and" return AND; -"or" return OR; -"not" return NOT; -"~=" return NE; -"<=" return LE; -">=" return GE; -".." return CONC; -\"[^\"]*\" | -\'[^\']*\' { - yylval.vWord = lua_findenclosedconstant (yytext); - return STRING; - } -[0-9]+("."[0-9]*)? | -([0-9]+)?"."[0-9]+ | -[0-9]+("."[0-9]*)?[dDeEgG][+-]?[0-9]+ | -([0-9]+)?"."[0-9]+[dDeEgG][+-]?[0-9]+ { - yylval.vFloat = atof(yytext); - return NUMBER; - } -[a-zA-Z_][a-zA-Z0-9_]* { - yylval.vWord = lua_findsymbol (yytext); - return NAME; - } -. return *yytext; - diff --git a/src/yacc/lua.stx b/src/yacc/lua.stx index 118a240c..9c818708 100644 --- a/src/yacc/lua.stx +++ b/src/yacc/lua.stx @@ -1,35 +1,43 @@ %{ -char *rcs_luastx = "$Id: lua.stx,v 2.4 1994/04/20 16:22:21 celes Exp $"; +char *rcs_luastx = "$Id: lua.stx,v 3.17 1995/01/13 22:11:12 roberto Exp $"; #include <stdio.h> #include <stdlib.h> #include <string.h> -#include "mm.h" - +#include "mem.h" #include "opcode.h" #include "hash.h" #include "inout.h" +#include "tree.h" #include "table.h" #include "lua.h" +/* to avoid warnings generated by yacc */ +int yyparse (void); +#define malloc luaI_malloc +#define realloc luaI_realloc +#define free luaI_free + +#ifndef LISTING #define LISTING 0 +#endif -#ifndef GAPCODE -#define GAPCODE 50 +#ifndef CODE_BLOCK +#define CODE_BLOCK 256 #endif -static Word maxcode; -static Word maxmain; -static Word maxcurr ; -static Byte *code = NULL; -static Byte *initcode; +static int maxcode; +static int maxmain; +static Long maxcurr; /* to allow maxcurr *= 2 without overflow */ +static Byte *funcCode = NULL; +static Byte **initcode; static Byte *basepc; -static Word maincode; -static Word pc; +static int maincode; +static int pc; #define MAXVAR 32 -static long varbuffer[MAXVAR]; /* variables in an assignment list; +static Long varbuffer[MAXVAR]; /* variables in an assignment list; it's long to store negative Word values */ static int nvarbuffer=0; /* number of variables at a list */ @@ -39,8 +47,7 @@ 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; -static int ntemp; /* number of temporary var into stack */ -static int err; /* flag to indicate error */ + /* Internal functions */ @@ -48,13 +55,12 @@ static void code_byte (Byte c) { if (pc>maxcurr-2) /* 1 byte free to code HALT of main code */ { - maxcurr += GAPCODE; - basepc = (Byte *)realloc(basepc, maxcurr*sizeof(Byte)); - if (basepc == NULL) - { - lua_error ("not enough memory"); - err = 1; - } + if (maxcurr >= MAX_INT) + lua_error("code size overflow"); + maxcurr *= 2; + if (maxcurr >= MAX_INT) + maxcurr = MAX_INT; + basepc = growvector(basepc, maxcurr, Byte); } basepc[pc++] = c; } @@ -77,6 +83,16 @@ static void code_float (float n) code_byte(code.m.c4); } +static void code_code (Byte *b) +{ + CodeCode code; + code.b = b; + code_byte(code.m.c1); + code_byte(code.m.c2); + code_byte(code.m.c3); + code_byte(code.m.c4); +} + static void code_word_at (Byte *p, Word n) { CodeWord code; @@ -90,10 +106,7 @@ static void push_field (Word name) if (nfields < STACKGAP-1) fields[nfields++] = name; else - { lua_error ("too many fields in a constructor"); - err = 1; - } } static void flush_record (int n) @@ -104,7 +117,6 @@ static void flush_record (int n) code_byte(n); for (i=0; i<n; i++) code_word(fields[--nfields]); - ntemp -= n; } static void flush_list (int m, int n) @@ -113,34 +125,22 @@ static void flush_list (int m, int n) if (m == 0) code_byte(STORELIST0); else + if (m < 255) { code_byte(STORELIST); code_byte(m); } + else + lua_error ("list constructor too long"); code_byte(n); - ntemp-=n; -} - -static void incr_ntemp (void) -{ - if (ntemp+nlocalvar+MAXVAR+1 < STACKGAP) - ntemp++; - else - { - lua_error ("stack overflow"); - err = 1; - } } static void add_nlocalvar (int n) { - if (ntemp+nlocalvar+MAXVAR+n < STACKGAP) + if (MAX_TEMPS+nlocalvar+MAXVAR+n < STACKGAP) nlocalvar += n; else - { - lua_error ("too many local variables or expression too complicate"); - err = 1; - } + lua_error ("too many local variables"); } static void incr_nvarbuffer (void) @@ -148,14 +148,12 @@ static void incr_nvarbuffer (void) if (nvarbuffer < MAXVAR-1) nvarbuffer++; else - { lua_error ("variable buffer overflow"); - err = 1; - } } static void code_number (float f) -{ Word i = (Word)f; +{ + Word i = (Word)f; if (f == (float)i) /* f has an (short) integer value */ { if (i <= 2) code_byte(PUSH0 + i); @@ -175,20 +173,204 @@ static void code_number (float f) code_byte(PUSHFLOAT); code_float(f); } - incr_ntemp(); } +/* +** Search a local name and if find return its index. If do not find return -1 +*/ +static int lua_localname (Word n) +{ + int i; + for (i=nlocalvar-1; i >= 0; i--) + if (n == localvar[i]) return i; /* local var */ + return -1; /* global var */ +} + +/* +** Push a variable given a number. If number is positive, push global variable +** indexed by (number -1). If negative, push local indexed by ABS(number)-1. +** Otherwise, if zero, push indexed variable (record). +*/ +static void lua_pushvar (Long number) +{ + if (number > 0) /* global var */ + { + code_byte(PUSHGLOBAL); + code_word(number-1); + } + else if (number < 0) /* local var */ + { + number = (-number) - 1; + if (number < 10) code_byte(PUSHLOCAL0 + number); + else + { + code_byte(PUSHLOCAL); + code_byte(number); + } + } + else + { + code_byte(PUSHINDEXED); + } +} + +static void lua_codeadjust (int n) +{ + if (n+nlocalvar == 0) + code_byte(ADJUST0); + else + { + code_byte(ADJUST); + code_byte(n+nlocalvar); + } +} + +static void init_function (TreeNode *func) +{ + if (funcCode == NULL) /* first function */ + { + funcCode = newvector(CODE_BLOCK, Byte); + maxcode = CODE_BLOCK; + } + pc=0; basepc=funcCode; maxcurr=maxcode; + nlocalvar=0; + if (lua_debug) + { + code_byte(SETFUNCTION); + code_code((Byte *)luaI_strdup(lua_file[lua_nfile-1])); + code_word(luaI_findconstant(func)); + } +} + +static void codereturn (void) +{ + if (lua_debug) code_byte(RESET); + if (nlocalvar == 0) + code_byte(RETCODE0); + else + { + code_byte(RETCODE); + code_byte(nlocalvar); + } +} + +static void codedebugline (void) +{ + if (lua_debug) + { + code_byte(SETLINE); + code_word(lua_linenumber); + } +} + +static void adjust_mult_assign (int vars, int exps, int temps) +{ + if (exps < 0) + { + int r = vars - (-exps-1); + if (r >= 0) + code_byte(r); + else + { + code_byte(0); + lua_codeadjust(temps); + } + } + else if (vars != exps) + lua_codeadjust(temps); +} + +static void lua_codestore (int i) +{ + if (varbuffer[i] > 0) /* global var */ + { + code_byte(STOREGLOBAL); + code_word(varbuffer[i]-1); + } + else if (varbuffer[i] < 0) /* local var */ + { + int number = (-varbuffer[i]) - 1; + if (number < 10) code_byte(STORELOCAL0 + number); + else + { + code_byte(STORELOCAL); + code_byte(number); + } + } + else /* indexed var */ + { + int j; + int upper=0; /* number of indexed variables upper */ + int param; /* number of itens until indexed expression */ + for (j=i+1; j <nvarbuffer; j++) + if (varbuffer[j] == 0) upper++; + param = upper*2 + i; + if (param == 0) + code_byte(STOREINDEXED0); + else + { + code_byte(STOREINDEXED); + code_byte(param); + } + } +} + +static void codeIf (Long thenAdd, Long elseAdd) +{ + Long elseinit = elseAdd+sizeof(Word)+1; + if (pc == elseinit) /* no else */ + { + pc -= sizeof(Word)+1; + elseinit = pc; + } + else + { + basepc[elseAdd] = JMP; + code_word_at(basepc+elseAdd+1, pc-elseinit); + } + basepc[thenAdd] = IFFJMP; + code_word_at(basepc+thenAdd+1,elseinit-(thenAdd+sizeof(Word)+1)); +} + +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_filename()); + lua_error (msg); +} + + +/* +** Parse LUA code. +*/ +void lua_parse (Byte **code) +{ + initcode = code; + *initcode = newvector(CODE_BLOCK, Byte); + maincode = 0; + maxmain = CODE_BLOCK; + if (yyparse ()) lua_error("parse error"); + (*initcode)[maincode++] = RETCODE0; +#if LISTING +{ static void PrintCode (Byte *c, Byte *end); + PrintCode(*initcode,*initcode+maincode); } +#endif +} + + %} %union { int vInt; - long vLong; float vFloat; char *pChar; Word vWord; + Long vLong; Byte *pByte; + TreeNode *pNode; } %start functionlist @@ -198,25 +380,27 @@ static void code_number (float f) %token IF THEN ELSE ELSEIF WHILE DO REPEAT UNTIL END %token RETURN %token LOCAL +%token FUNCTION %token <vFloat> NUMBER -%token <vWord> FUNCTION STRING -%token <pChar> NAME +%token <vWord> STRING +%token <pNode> NAME %token <vInt> DEBUG -%type <vWord> PrepJump -%type <vInt> expr, exprlist, exprlist1, varlist1, typeconstructor -%type <vInt> fieldlist, localdeclist -%type <vInt> ffieldlist, ffieldlist1 -%type <vInt> lfieldlist, lfieldlist1 -%type <vLong> var, objectname - +%type <vLong> PrepJump +%type <vInt> expr, exprlist, exprlist1, varlist1, funcParams, funcvalue +%type <vInt> fieldlist, localdeclist, decinit +%type <vInt> ffieldlist1 +%type <vInt> lfieldlist1 +%type <vLong> var, singlevar +%type <pByte> body %left AND OR -%left '=' NE '>' '<' LE GE +%left EQ NE '>' '<' LE GE %left CONC %left '+' '-' %left '*' '/' %left UNARY NOT +%right '^' %% /* beginning of rules section */ @@ -225,156 +409,115 @@ static void code_number (float f) functionlist : /* empty */ | functionlist { - pc=maincode; basepc=initcode; maxcurr=maxmain; + pc=maincode; basepc=*initcode; maxcurr=maxmain; nlocalvar=0; } stat sc { - maincode=pc; initcode=basepc; maxmain=maxcurr; + maincode=pc; *initcode=basepc; maxmain=maxcurr; } | functionlist function + | functionlist method | functionlist setdebug ; - + function : FUNCTION NAME + { + init_function($2); + } + body + { + Word func = luaI_findsymbol($2); + s_tag(func) = LUA_T_FUNCTION; + s_bvalue(func) = $4; + } + ; + +method : FUNCTION NAME ':' NAME { - if (code == NULL) /* first function */ - { - code = (Byte *) calloc(GAPCODE, sizeof(Byte)); - if (code == NULL) - { - lua_error("not enough memory"); - err = 1; - } - maxcode = GAPCODE; - } - pc=0; basepc=code; maxcurr=maxcode; - nlocalvar=0; - $<vWord>$ = lua_findsymbol($2); + init_function($4); + localvar[nlocalvar]=luaI_findsymbolbyname("self"); + add_nlocalvar(1); } - '(' parlist ')' + body { - if (lua_debug) - { - code_byte(SETFUNCTION); - code_word(lua_nfile-1); - code_word($<vWord>3); - } - lua_codeadjust (0); + /* assign function to table field */ + pc=maincode; basepc=*initcode; maxcurr=maxmain; + nlocalvar=0; + lua_pushvar(luaI_findsymbol($2)+1); + code_byte(PUSHSTRING); + code_word(luaI_findconstant($4)); + code_byte(PUSHFUNCTION); + code_code($6); + code_byte(STOREINDEXED0); + maincode=pc; *initcode=basepc; maxmain=maxcurr; } - block - END - { - if (lua_debug) code_byte(RESET); - code_byte(RETCODE); code_byte(nlocalvar); - s_tag($<vWord>3) = T_FUNCTION; - s_bvalue($<vWord>3) = calloc (pc, sizeof(Byte)); - if (s_bvalue($<vWord>3) == NULL) - { - lua_error("not enough memory"); - err = 1; - } - memcpy (s_bvalue($<vWord>3), basepc, pc*sizeof(Byte)); - code = basepc; maxcode=maxcurr; + ; + +body : '(' parlist ')' block END + { + codereturn(); + $$ = newvector(pc, Byte); + memcpy($$, basepc, pc*sizeof(Byte)); + funcCode = basepc; maxcode=maxcurr; #if LISTING -PrintCode(code,code+pc); + PrintCode(funcCode,funcCode+pc); #endif - } - ; + } + ; statlist : /* empty */ | statlist stat sc ; -stat : { - ntemp = 0; - if (lua_debug) - { - code_byte(SETLINE); code_word(lua_linenumber); - } - } - stat1 - sc : /* empty */ | ';' ; +stat : { codedebugline(); } stat1 ; + +cond : { codedebugline(); } expr1 ; stat1 : IF expr1 THEN PrepJump block PrepJump elsepart END - { - { - Word elseinit = $6+sizeof(Word)+1; - if (pc - elseinit == 0) /* no else */ - { - pc -= sizeof(Word)+1; - elseinit = pc; - } - else - { - basepc[$6] = JMP; - code_word_at(basepc+$6+1, pc - elseinit); - } - basepc[$4] = IFFJMP; - code_word_at(basepc+$4+1,elseinit-($4+sizeof(Word)+1)); - } - } - - | WHILE {$<vWord>$=pc;} expr1 DO PrepJump block PrepJump END - + { codeIf($4, $6); } + + | WHILE {$<vLong>$=pc;} expr1 DO PrepJump block PrepJump END { basepc[$5] = IFFJMP; code_word_at(basepc+$5+1, pc - ($5 + sizeof(Word)+1)); - basepc[$7] = UPJMP; - code_word_at(basepc+$7+1, pc - ($<vWord>2)); + code_word_at(basepc+$7+1, pc - ($<vLong>2)); } - | REPEAT {$<vWord>$=pc;} block UNTIL expr1 PrepJump - + | REPEAT {$<vLong>$=pc;} block UNTIL cond PrepJump { basepc[$6] = IFFUPJMP; - code_word_at(basepc+$6+1, pc - ($<vWord>2)); + code_word_at(basepc+$6+1, pc - ($<vLong>2)); } - | varlist1 '=' exprlist1 { { int i; - if ($3 == 0 || nvarbuffer != ntemp - $1 * 2) - lua_codeadjust ($1 * 2 + nvarbuffer); + adjust_mult_assign(nvarbuffer, $3, $1 * 2 + nvarbuffer); for (i=nvarbuffer-1; i>=0; i--) lua_codestore (i); if ($1 > 1 || ($1 == 1 && varbuffer[0] != 0)) lua_codeadjust (0); } } - | functioncall { lua_codeadjust (0); } - | typeconstructor { lua_codeadjust (0); } - | LOCAL localdeclist decinit { add_nlocalvar($2); lua_codeadjust (0); } + | functioncall { code_byte(0); } + | LOCAL localdeclist decinit + { add_nlocalvar($2); + adjust_mult_assign($2, $3, 0); + } ; elsepart : /* empty */ | ELSE block - | ELSEIF expr1 THEN PrepJump block PrepJump elsepart - { - { - Word elseinit = $6+sizeof(Word)+1; - if (pc - elseinit == 0) /* no else */ - { - pc -= sizeof(Word)+1; - elseinit = pc; - } - else - { - basepc[$6] = JMP; - code_word_at(basepc+$6+1, pc - elseinit); - } - basepc[$4] = IFFJMP; - code_word_at(basepc+$4+1, elseinit - ($4 + sizeof(Word)+1)); - } - } + | ELSEIF cond THEN PrepJump block PrepJump elsepart + { codeIf($4, $6); } ; -block : {$<vInt>$ = nlocalvar;} statlist {ntemp = 0;} ret +block : {$<vInt>$ = nlocalvar;} statlist ret { if (nlocalvar != $<vInt>1) { @@ -385,11 +528,10 @@ block : {$<vInt>$ = nlocalvar;} statlist {ntemp = 0;} ret ; ret : /* empty */ - | { if (lua_debug){code_byte(SETLINE);code_word(lua_linenumber);}} - RETURN exprlist sc - { - if (lua_debug) code_byte(RESET); - code_byte(RETCODE); code_byte(nlocalvar); + | RETURN { codedebugline(); } exprlist sc + { + if ($3 < 0) code_byte(MULT_RET); + codereturn(); } ; @@ -400,55 +542,42 @@ PrepJump : /* empty */ code_word (0); } -expr1 : expr { if ($1 == 0) {lua_codeadjust (ntemp+1); incr_ntemp();}} +expr1 : expr { if ($1 == 0) code_byte(1); } ; -expr : '(' expr ')' { $$ = $2; } - | expr1 '=' expr1 { code_byte(EQOP); $$ = 1; ntemp--;} - | expr1 '<' expr1 { code_byte(LTOP); $$ = 1; ntemp--;} - | expr1 '>' expr1 { code_byte(LEOP); code_byte(NOTOP); $$ = 1; ntemp--;} - | expr1 NE expr1 { code_byte(EQOP); code_byte(NOTOP); $$ = 1; ntemp--;} - | expr1 LE expr1 { code_byte(LEOP); $$ = 1; ntemp--;} - | expr1 GE expr1 { code_byte(LTOP); code_byte(NOTOP); $$ = 1; ntemp--;} - | expr1 '+' expr1 { code_byte(ADDOP); $$ = 1; ntemp--;} - | expr1 '-' expr1 { code_byte(SUBOP); $$ = 1; ntemp--;} - | expr1 '*' expr1 { code_byte(MULTOP); $$ = 1; ntemp--;} - | expr1 '/' expr1 { code_byte(DIVOP); $$ = 1; ntemp--;} - | expr1 CONC expr1 { code_byte(CONCOP); $$ = 1; ntemp--;} - | '+' expr1 %prec UNARY { $$ = 1; } +expr : '(' expr ')' { $$ = $2; } + | expr1 EQ expr1 { code_byte(EQOP); $$ = 1; } + | expr1 '<' expr1 { code_byte(LTOP); $$ = 1; } + | expr1 '>' expr1 { code_byte(GTOP); $$ = 1; } + | expr1 NE expr1 { code_byte(EQOP); code_byte(NOTOP); $$ = 1; } + | expr1 LE expr1 { code_byte(LEOP); $$ = 1; } + | expr1 GE expr1 { code_byte(GEOP); $$ = 1; } + | expr1 '+' expr1 { code_byte(ADDOP); $$ = 1; } + | expr1 '-' expr1 { code_byte(SUBOP); $$ = 1; } + | expr1 '*' expr1 { code_byte(MULTOP); $$ = 1; } + | expr1 '/' expr1 { code_byte(DIVOP); $$ = 1; } + | expr1 '^' expr1 { code_byte(POWOP); $$ = 1; } + | expr1 CONC expr1 { code_byte(CONCOP); $$ = 1; } | '-' expr1 %prec UNARY { code_byte(MINUSOP); $$ = 1;} - | typeconstructor { $$ = $1; } - | '@' '(' dimension ')' - { - code_byte(CREATEARRAY); - $$ = 1; - } - | var { lua_pushvar ($1); $$ = 1;} - | NUMBER { code_number($1); $$ = 1; } - | STRING + | table { $$ = 1; } + | varexp { $$ = 1;} + | NUMBER { code_number($1); $$ = 1; } + | STRING { code_byte(PUSHSTRING); code_word($1); $$ = 1; - incr_ntemp(); - } - | NIL {code_byte(PUSHNIL); $$ = 1; incr_ntemp();} - | functioncall - { - $$ = 0; - if (lua_debug) - { - code_byte(SETLINE); code_word(lua_linenumber); - } } + | NIL {code_byte(PUSHNIL); $$ = 1; } + | functioncall { $$ = 0; } | NOT expr1 { code_byte(NOTOP); $$ = 1;} - | expr1 AND PrepJump {code_byte(POP); ntemp--;} expr1 + | expr1 AND PrepJump {code_byte(POP); } expr1 { basepc[$3] = ONFJMP; code_word_at(basepc+$3+1, pc - ($3 + sizeof(Word)+1)); $$ = 1; } - | expr1 OR PrepJump {code_byte(POP); ntemp--;} expr1 + | expr1 OR PrepJump {code_byte(POP); } expr1 { basepc[$3] = ONTJMP; code_word_at(basepc+$3+1, pc - ($3 + sizeof(Word)+1)); @@ -456,92 +585,77 @@ expr : '(' expr ')' { $$ = $2; } } ; -typeconstructor: '@' +table : { - code_byte(PUSHBYTE); - $<vWord>$ = pc; code_byte(0); - incr_ntemp(); code_byte(CREATEARRAY); + $<vLong>$ = pc; code_word(0); } - objectname fieldlist + '{' fieldlist '}' { - basepc[$<vWord>2] = $4; - if ($3 < 0) /* there is no function to be called */ - { - $$ = 1; - } - else - { - lua_pushvar ($3+1); - code_byte(PUSHMARK); - incr_ntemp(); - code_byte(PUSHOBJECT); - incr_ntemp(); - code_byte(CALLFUNC); - ntemp -= 4; - $$ = 0; - if (lua_debug) - { - code_byte(SETLINE); code_word(lua_linenumber); - } - } + code_word_at(basepc+$<vLong>1, $3); } ; -dimension : /* empty */ { code_byte(PUSHNIL); incr_ntemp();} - | expr1 +functioncall : funcvalue funcParams + { code_byte(CALLFUNC); code_byte($1+$2); } ; - -functioncall : functionvalue {code_byte(PUSHMARK); $<vInt>$ = ntemp; incr_ntemp();} - '(' exprlist ')' { code_byte(CALLFUNC); ntemp = $<vInt>2-1;} -functionvalue : var {lua_pushvar ($1); } - ; - -exprlist : /* empty */ { $$ = 1; } +funcvalue : varexp { $$ = 0; } + | varexp ':' NAME + { + code_byte(PUSHSELF); + code_word(luaI_findconstant($3)); + $$ = 1; + } + ; + +funcParams : '(' exprlist ')' + { if ($2<0) { code_byte(1); $$ = -$2; } else $$ = $2; } + | table { $$ = 1; } + ; + +exprlist : /* empty */ { $$ = 0; } | exprlist1 { $$ = $1; } ; -exprlist1 : expr { $$ = $1; } - | exprlist1 ',' {if (!$1){lua_codeadjust (ntemp+1); incr_ntemp();}} - expr {$$ = $4;} +exprlist1 : expr { if ($1 == 0) $$ = -1; else $$ = 1; } + | exprlist1 ',' { if ($1 < 0) code_byte(1); } expr + { + int r = $1 < 0 ? -$1 : $1; + $$ = ($4 == 0) ? -(r+1) : r+1; + } ; -parlist : /* empty */ - | parlist1 +parlist : /* empty */ { lua_codeadjust(0); } + | parlist1 { lua_codeadjust(0); } ; parlist1 : NAME { - localvar[nlocalvar]=lua_findsymbol($1); + localvar[nlocalvar]=luaI_findsymbol($1); add_nlocalvar(1); } | parlist1 ',' NAME { - localvar[nlocalvar]=lua_findsymbol($3); + localvar[nlocalvar]=luaI_findsymbol($3); add_nlocalvar(1); } ; -objectname : /* empty */ {$$=-1;} - | NAME {$$=lua_findsymbol($1);} - ; - -fieldlist : '{' ffieldlist '}' - { - flush_record($2%FIELDS_PER_FLUSH); - $$ = $2; - } - | '[' lfieldlist ']' - { - flush_list($2/FIELDS_PER_FLUSH, $2%FIELDS_PER_FLUSH); - $$ = $2; - } +fieldlist : /* empty */ { $$ = 0; } + | lfieldlist1 lastcomma + { $$ = $1; flush_list($1/FIELDS_PER_FLUSH, $1%FIELDS_PER_FLUSH); } + | ffieldlist1 lastcomma + { $$ = $1; flush_record($1%FIELDS_PER_FLUSH); } + | lfieldlist1 ';' + { flush_list($1/FIELDS_PER_FLUSH, $1%FIELDS_PER_FLUSH); } + ffieldlist1 lastcomma + { $$ = $1+$4; flush_record($4%FIELDS_PER_FLUSH); } ; -ffieldlist : /* empty */ { $$ = 0; } - | ffieldlist1 { $$ = $1; } - ; +lastcomma : /* empty */ + | ',' + ; ffieldlist1 : ffield {$$=1;} | ffieldlist1 ',' ffield @@ -551,16 +665,12 @@ ffieldlist1 : ffield {$$=1;} } ; -ffield : NAME {$<vWord>$ = lua_findconstant($1);} '=' expr1 +ffield : NAME '=' expr1 { - push_field($<vWord>2); + push_field(luaI_findconstant($1)); } ; -lfieldlist : /* empty */ { $$ = 0; } - | lfieldlist1 { $$ = $1; } - ; - lfieldlist1 : expr1 {$$=1;} | lfieldlist1 ',' expr1 { @@ -583,169 +693,49 @@ varlist1 : var } ; -var : NAME - { - Word s = lua_findsymbol($1); - int local = lua_localname (s); - if (local == -1) /* global var */ - $$ = s + 1; /* return positive value */ - else - $$ = -(local+1); /* return negative value */ - } - - | var {lua_pushvar ($1);} '[' expr1 ']' +var : singlevar { $$ = $1; } + | varexp '[' expr1 ']' { $$ = 0; /* indexed variable */ } - | var {lua_pushvar ($1);} '.' NAME + | varexp '.' NAME { code_byte(PUSHSTRING); - code_word(lua_findconstant($4)); incr_ntemp(); + code_word(luaI_findconstant($3)); $$ = 0; /* indexed variable */ } ; -localdeclist : NAME {localvar[nlocalvar]=lua_findsymbol($1); $$ = 1;} +singlevar : NAME + { + Word s = luaI_findsymbol($1); + int local = lua_localname (s); + if (local == -1) /* global var */ + $$ = s + 1; /* return positive value */ + else + $$ = -(local+1); /* return negative value */ + } + ; + +varexp : var { lua_pushvar($1); } + ; + +localdeclist : NAME {localvar[nlocalvar]=luaI_findsymbol($1); $$ = 1;} | localdeclist ',' NAME { - localvar[nlocalvar+$1]=lua_findsymbol($3); + localvar[nlocalvar+$1]=luaI_findsymbol($3); $$ = $1+1; } ; -decinit : /* empty */ - | '=' exprlist1 +decinit : /* empty */ { $$ = 0; } + | '=' exprlist1 { $$ = $2; } ; setdebug : DEBUG {lua_debug = $1;} %% -/* -** Search a local name and if find return its index. If do not find return -1 -*/ -static int lua_localname (Word n) -{ - int i; - for (i=nlocalvar-1; i >= 0; i--) - if (n == localvar[i]) return i; /* local var */ - return -1; /* global var */ -} - -/* -** Push a variable given a number. If number is positive, push global variable -** indexed by (number -1). If negative, push local indexed by ABS(number)-1. -** Otherwise, if zero, push indexed variable (record). -*/ -static void lua_pushvar (long number) -{ - if (number > 0) /* global var */ - { - code_byte(PUSHGLOBAL); - code_word(number-1); - incr_ntemp(); - } - else if (number < 0) /* local var */ - { - number = (-number) - 1; - if (number < 10) code_byte(PUSHLOCAL0 + number); - else - { - code_byte(PUSHLOCAL); - code_byte(number); - } - incr_ntemp(); - } - else - { - code_byte(PUSHINDEXED); - ntemp--; - } -} - -static void lua_codeadjust (int n) -{ - code_byte(ADJUST); - code_byte(n + nlocalvar); -} - -static void lua_codestore (int i) -{ - if (varbuffer[i] > 0) /* global var */ - { - code_byte(STOREGLOBAL); - code_word(varbuffer[i]-1); - } - else if (varbuffer[i] < 0) /* local var */ - { - int number = (-varbuffer[i]) - 1; - if (number < 10) code_byte(STORELOCAL0 + number); - else - { - code_byte(STORELOCAL); - code_byte(number); - } - } - else /* indexed var */ - { - int j; - int upper=0; /* number of indexed variables upper */ - int param; /* number of itens until indexed expression */ - for (j=i+1; j <nvarbuffer; j++) - if (varbuffer[j] == 0) upper++; - param = upper*2 + i; - if (param == 0) - code_byte(STOREINDEXED0); - else - { - code_byte(STOREINDEXED); - code_byte(param); - } - } -} - -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_filename()); - lua_error (msg); - err = 1; -} - -int yywrap (void) -{ - return 1; -} - - -/* -** Parse LUA code and execute global statement. -** Return 0 on success or 1 on error. -*/ -int lua_parse (void) -{ - Byte *init = initcode = (Byte *) calloc(GAPCODE, sizeof(Byte)); - maincode = 0; - maxmain = GAPCODE; - if (init == NULL) - { - lua_error("not enough memory"); - return 1; - } - err = 0; - if (yyparse () || (err==1)) return 1; - initcode[maincode++] = HALT; - init = initcode; -#if LISTING - PrintCode(init,init+maincode); -#endif - if (lua_execute (init)) return 1; - free(init); - return 0; -} - - #if LISTING static void PrintCode (Byte *code, Byte *end) @@ -792,6 +782,16 @@ static void PrintCode (Byte *code, Byte *end) 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.b); + } + break; + case PUSHLOCAL0: case PUSHLOCAL1: case PUSHLOCAL2: case PUSHLOCAL3: case PUSHLOCAL4: case PUSHLOCAL5: case PUSHLOCAL6: case PUSHLOCAL7: case PUSHLOCAL8: case PUSHLOCAL9: @@ -811,8 +811,6 @@ static void PrintCode (Byte *code, Byte *end) } break; case PUSHINDEXED: printf ("%d PUSHINDEXED\n", (p++)-code); break; - case PUSHMARK: printf ("%d PUSHMARK\n", (p++)-code); break; - case PUSHOBJECT: printf ("%d PUSHOBJECT\n", (p++)-code); break; case STORELOCAL0: case STORELOCAL1: case STORELOCAL2: case STORELOCAL3: case STORELOCAL4: case STORELOCAL5: case STORELOCAL6: case STORELOCAL7: case STORELOCAL8: case STORELOCAL9: @@ -832,6 +830,15 @@ static void PrintCode (Byte *code, Byte *end) 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++; @@ -848,11 +855,20 @@ static void PrintCode (Byte *code, Byte *end) 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: printf ("%d CREATEARRAY\n", (p++)-code); 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; @@ -860,6 +876,7 @@ static void PrintCode (Byte *code, Byte *end) 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; @@ -918,20 +935,24 @@ static void PrintCode (Byte *code, Byte *end) } break; case POP: printf ("%d POP\n", (p++)-code); break; - case CALLFUNC: printf ("%d CALLFUNC\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 HALT: printf ("%d HALT\n", (p++)-code); break; case SETFUNCTION: { - CodeWord c1, c2; + CodeCode c1; + CodeWord c2; int n = p-code; p++; - get_word(c1,p); + get_code(c1,p); get_word(c2,p); - printf ("%d SETFUNCTION %d %d\n", n, c1.w, c2.w); + printf ("%d SETFUNCTION %s %d\n", n, (char *)c1.b, c2.w); } break; case SETLINE: diff --git a/test/array.lua b/test/array.lua index 349fb818..7caca888 100644 --- a/test/array.lua +++ b/test/array.lua @@ -1,6 +1,6 @@ $debug -a = @() +a = {} i=0 while i<10 do diff --git a/test/dump b/test/dump.lua index d5feb2b4..fa0aa4fb 100644 --- a/test/dump +++ b/test/dump.lua @@ -1,20 +1,20 @@ function savevar (n,v) - if v = nil then return end; - if type(v) = "number" then print(n.."="..v) return end - if type(v) = "string" then print(n.."='"..v.."'") return end - if type(v) = "table" then + if v == nil then return end; + if type(v) == "number" then print(n.."="..v) return end + if type(v) == "string" then print(n.."='"..v.."'") return end + if type(v) == "table" then if v.__visited__ ~= nil then print(n .. "=" .. v.__visited__); else - print(n.."=@()") + print(n.."={}") v.__visited__ = n; local r,f; r,f = next(v,nil); while r ~= nil do if r ~= "__visited__" then - if type(r) = 'string' then + if type(r) == 'string' then savevar(n.."."..r,f) else savevar(n.."["..r.."]",f) diff --git a/test/teste.lua b/test/long.lua index 467ce122..5492fd50 100644 --- a/test/teste.lua +++ b/test/long.lua @@ -12,7 +12,7 @@ function sort(a,n) -- selection sort end -v = @(5000) +v = { } i=1 while i <= 5000 do v[i] = 5000-i i=i+1 end diff --git a/test/save.lua b/test/save.lua index 3eb91086..8c64c568 100644 --- a/test/save.lua +++ b/test/save.lua @@ -1,10 +1,10 @@ function savevar (n,v) - if v = nil then return end; - if type(v) = "number" then print(n.."="..v) return end - if type(v) = "string" then print(n.."='"..v.."'") return end - if type(v) = "table" then + if v == nil then return end; + if type(v) == "number" then print(n.."="..v) return end + if type(v) == "string" then print(n.."='"..v.."'") return end + if type(v) == "table" then if v.__visited__ ~= nil then print(n .. "=" .. v.__visited__); else @@ -14,7 +14,7 @@ function savevar (n,v) r,f = next(v,nil); while r ~= nil do if r ~= "__visited__" then - if type(r) = 'string' then + if type(r) == 'string' then savevar(n.."['"..r.."']",f) else savevar(n.."["..r.."]",f) @@ -36,9 +36,9 @@ local n,v end a = 3 -x = @{a = 4, b = "name", l=@[4,5,67]} +x = {a = 4, b = "name", l={4,5,67}} -b = @{t=5} +b = {t=5} x.next = b diff --git a/test/sort.lua b/test/sort.lua index 6d0d9a0d..14d4cf22 100644 --- a/test/sort.lua +++ b/test/sort.lua @@ -31,7 +31,7 @@ function sort(a,n) -- selection sort end function main() - x=@() + x={} n=-1 n=n+1; x[n]="a" n=n+1; x[n]="waldemar" diff --git a/test/sort/q.lua b/test/sort/q.lua deleted file mode 100644 index 8d9a20d4..00000000 --- a/test/sort/q.lua +++ /dev/null @@ -1,51 +0,0 @@ -function quicksort(r,s) - if s<=r then return end -- caso basico da recursao - local v=x[r] - local i=r - local j=s+1 - repeat - repeat i=i+1 until x[i]>=v - repeat j=j-1 until x[j]<=v - x[i],x[j]=x[j],x[i] - until j<=i -- separacao - 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) -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" --- sort(x,n) - 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]) -end - -function sort(a,n) -- selection sort - local i=1 - while i<=n do - local m=i - local j=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] - print (i, a[i]) - i=i+1 - end -end - -main() diff --git a/test/sort/sort.lua b/test/sort/sort.lua deleted file mode 100644 index ba2e273c..00000000 --- a/test/sort/sort.lua +++ /dev/null @@ -1,51 +0,0 @@ -$debug -function quicksort(r,s) - if s<=r then return end -- caso basico da recursao - local v=x[r] - local i=r - local j=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) -end - -function sort(a,n) -- selection sort - local i=1 - while i<=n do - local m=i - local j=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] - print (i, a[i]) - i=i+1 - end -end - -x=@(20) -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" --- sort(x,n) -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]) diff --git a/test/type.lua b/test/type.lua index 5078920b..3079391d 100644 --- a/test/type.lua +++ b/test/type.lua @@ -3,7 +3,7 @@ $debug function check (object, class) local v = next(object,nil); while v ~= nil do - if class[v] = nil then + if class[v] == nil then print("unknown field: " .. v) elseif type(object[v]) ~= class[v].type then print("wrong type for field " .. v) @@ -12,7 +12,7 @@ function check (object, class) end v = next(class,nil); while v ~= nil do - if object[v] = nil then + if object[v] == nil then if class[v].default ~= nil then object[v] = class[v].default else @@ -23,9 +23,9 @@ function check (object, class) end end -typeblock = @{x = @{default = 0, type = "number"}, - y = @{default = 0, type = "number"}, - name = @{type = "string"} +typeblock = {x = {default = 0, type = "number"}, + y = {default = 0, type = "number"}, + name = {type = "string"} } function block(t) check(t,typeblock) end |