Skip to content

Commit 4b779d2

Browse files
committed
ci
0 parents  commit 4b779d2

108 files changed

Lines changed: 29174 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

COPYRIGHT

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
Lua License
2+
-----------
3+
4+
Lua is licensed under the terms of the MIT license reproduced below.
5+
This means that Lua is free software and can be used for both academic
6+
and commercial purposes at absolutely no cost.
7+
8+
For details and rationale, see http://www.lua.org/license.html .
9+
10+
===============================================================================
11+
12+
Copyright (C) 1994-2008 Lua.org, PUC-Rio.
13+
14+
Permission is hereby granted, free of charge, to any person obtaining a copy
15+
of this software and associated documentation files (the "Software"), to deal
16+
in the Software without restriction, including without limitation the rights
17+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
18+
copies of the Software, and to permit persons to whom the Software is
19+
furnished to do so, subject to the following conditions:
20+
21+
The above copyright notice and this permission notice shall be included in
22+
all copies or substantial portions of the Software.
23+
24+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
25+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
26+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
27+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
28+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
29+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
30+
THE SOFTWARE.
31+
32+
===============================================================================
33+
34+
(end of COPYRIGHT)

HISTORY

Lines changed: 183 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,183 @@
1+
HISTORY for Lua 5.1
2+
3+
* Changes from version 5.0 to 5.1
4+
-------------------------------
5+
Language:
6+
+ new module system.
7+
+ new semantics for control variables of fors.
8+
+ new semantics for setn/getn.
9+
+ new syntax/semantics for varargs.
10+
+ new long strings and comments.
11+
+ new `mod' operator (`%')
12+
+ new length operator #t
13+
+ metatables for all types
14+
API:
15+
+ new functions: lua_createtable, lua_get(set)field, lua_push(to)integer.
16+
+ user supplies memory allocator (lua_open becomes lua_newstate).
17+
+ luaopen_* functions must be called through Lua.
18+
Implementation:
19+
+ new configuration scheme via luaconf.h.
20+
+ incremental garbage collection.
21+
+ better handling of end-of-line in the lexer.
22+
+ fully reentrant parser (new Lua function `load')
23+
+ better support for 64-bit machines.
24+
+ native loadlib support for Mac OS X.
25+
+ standard distribution in only one library (lualib.a merged into lua.a)
26+
27+
* Changes from version 4.0 to 5.0
28+
-------------------------------
29+
Language:
30+
+ lexical scoping.
31+
+ Lua coroutines.
32+
+ standard libraries now packaged in tables.
33+
+ tags replaced by metatables and tag methods replaced by metamethods,
34+
stored in metatables.
35+
+ proper tail calls.
36+
+ each function can have its own global table, which can be shared.
37+
+ new __newindex metamethod, called when we insert a new key into a table.
38+
+ new block comments: --[[ ... ]].
39+
+ new generic for.
40+
+ new weak tables.
41+
+ new boolean type.
42+
+ new syntax "local function".
43+
+ (f()) returns the first value returned by f.
44+
+ {f()} fills a table with all values returned by f.
45+
+ \n ignored in [[\n .
46+
+ fixed and-or priorities.
47+
+ more general syntax for function definition (e.g. function a.x.y:f()...end).
48+
+ more general syntax for function calls (e.g. (print or write)(9)).
49+
+ new functions (time/date, tmpfile, unpack, require, load*, etc.).
50+
API:
51+
+ chunks are loaded by using lua_load; new luaL_loadfile and luaL_loadbuffer.
52+
+ introduced lightweight userdata, a simple "void*" without a metatable.
53+
+ new error handling protocol: the core no longer prints error messages;
54+
all errors are reported to the caller on the stack.
55+
+ new lua_atpanic for host cleanup.
56+
+ new, signal-safe, hook scheme.
57+
Implementation:
58+
+ new license: MIT.
59+
+ new, faster, register-based virtual machine.
60+
+ support for external multithreading and coroutines.
61+
+ new and consistent error message format.
62+
+ the core no longer needs "stdio.h" for anything (except for a single
63+
use of sprintf to convert numbers to strings).
64+
+ lua.c now runs the environment variable LUA_INIT, if present. It can
65+
be "@filename", to run a file, or the chunk itself.
66+
+ support for user extensions in lua.c.
67+
sample implementation given for command line editing.
68+
+ new dynamic loading library, active by default on several platforms.
69+
+ safe garbage-collector metamethods.
70+
+ precompiled bytecodes checked for integrity (secure binary dostring).
71+
+ strings are fully aligned.
72+
+ position capture in string.find.
73+
+ read('*l') can read lines with embedded zeros.
74+
75+
* Changes from version 3.2 to 4.0
76+
-------------------------------
77+
Language:
78+
+ new "break" and "for" statements (both numerical and for tables).
79+
+ uniform treatment of globals: globals are now stored in a Lua table.
80+
+ improved error messages.
81+
+ no more '$debug': full speed *and* full debug information.
82+
+ new read form: read(N) for next N bytes.
83+
+ general read patterns now deprecated.
84+
(still available with -DCOMPAT_READPATTERNS.)
85+
+ all return values are passed as arguments for the last function
86+
(old semantics still available with -DLUA_COMPAT_ARGRET)
87+
+ garbage collection tag methods for tables now deprecated.
88+
+ there is now only one tag method for order.
89+
API:
90+
+ New API: fully re-entrant, simpler, and more efficient.
91+
+ New debug API.
92+
Implementation:
93+
+ faster than ever: cleaner virtual machine and new hashing algorithm.
94+
+ non-recursive garbage-collector algorithm.
95+
+ reduced memory usage for programs with many strings.
96+
+ improved treatment for memory allocation errors.
97+
+ improved support for 16-bit machines (we hope).
98+
+ code now compiles unmodified as both ANSI C and C++.
99+
+ numbers in bases other than 10 are converted using strtoul.
100+
+ new -f option in Lua to support #! scripts.
101+
+ luac can now combine text and binaries.
102+
103+
* Changes from version 3.1 to 3.2
104+
-------------------------------
105+
+ redirected all output in Lua's core to _ERRORMESSAGE and _ALERT.
106+
+ increased limit on the number of constants and globals per function
107+
(from 2^16 to 2^24).
108+
+ debugging info (lua_debug and hooks) moved into lua_state and new API
109+
functions provided to get and set this info.
110+
+ new debug lib gives full debugging access within Lua.
111+
+ new table functions "foreachi", "sort", "tinsert", "tremove", "getn".
112+
+ new io functions "flush", "seek".
113+
114+
* Changes from version 3.0 to 3.1
115+
-------------------------------
116+
+ NEW FEATURE: anonymous functions with closures (via "upvalues").
117+
+ new syntax:
118+
- local variables in chunks.
119+
- better scope control with DO block END.
120+
- constructors can now be also written: { record-part; list-part }.
121+
- more general syntax for function calls and lvalues, e.g.:
122+
f(x).y=1
123+
o:f(x,y):g(z)
124+
f"string" is sugar for f("string")
125+
+ strings may now contain arbitrary binary data (e.g., embedded zeros).
126+
+ major code re-organization and clean-up; reduced module interdependecies.
127+
+ no arbitrary limits on the total number of constants and globals.
128+
+ support for multiple global contexts.
129+
+ better syntax error messages.
130+
+ new traversal functions "foreach" and "foreachvar".
131+
+ the default for numbers is now double.
132+
changing it to use floats or longs is easy.
133+
+ complete debug information stored in pre-compiled chunks.
134+
+ sample interpreter now prompts user when run interactively, and also
135+
handles control-C interruptions gracefully.
136+
137+
* Changes from version 2.5 to 3.0
138+
-------------------------------
139+
+ NEW CONCEPT: "tag methods".
140+
Tag methods replace fallbacks as the meta-mechanism for extending the
141+
semantics of Lua. Whereas fallbacks had a global nature, tag methods
142+
work on objects having the same tag (e.g., groups of tables).
143+
Existing code that uses fallbacks should work without change.
144+
+ new, general syntax for constructors {[exp] = exp, ... }.
145+
+ support for handling variable number of arguments in functions (varargs).
146+
+ support for conditional compilation ($if ... $else ... $end).
147+
+ cleaner semantics in API simplifies host code.
148+
+ better support for writing libraries (auxlib.h).
149+
+ better type checking and error messages in the standard library.
150+
+ luac can now also undump.
151+
152+
* Changes from version 2.4 to 2.5
153+
-------------------------------
154+
+ io and string libraries are now based on pattern matching;
155+
the old libraries are still available for compatibility
156+
+ dofile and dostring can now return values (via return statement)
157+
+ better support for 16- and 64-bit machines
158+
+ expanded documentation, with more examples
159+
160+
* Changes from version 2.2 to 2.4
161+
-------------------------------
162+
+ external compiler creates portable binary files that can be loaded faster
163+
+ interface for debugging and profiling
164+
+ new "getglobal" fallback
165+
+ new functions for handling references to Lua objects
166+
+ new functions in standard lib
167+
+ only one copy of each string is stored
168+
+ expanded documentation, with more examples
169+
170+
* Changes from version 2.1 to 2.2
171+
-------------------------------
172+
+ functions now may be declared with any "lvalue" as a name
173+
+ garbage collection of functions
174+
+ support for pipes
175+
176+
* Changes from version 1.1 to 2.1
177+
-------------------------------
178+
+ object-oriented support
179+
+ fallbacks
180+
+ simplified syntax for tables
181+
+ many internal improvements
182+
183+
(end of HISTORY)

INSTALL

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
INSTALL for Lua 5.1
2+
3+
* Building Lua
4+
------------
5+
Lua is built in the src directory, but the build process can be
6+
controlled from the top-level Makefile.
7+
8+
Building Lua on Unix systems should be very easy. First do "make" and
9+
see if your platform is listed. If so, just do "make xxx", where xxx
10+
is your platform name. The platforms currently supported are:
11+
aix ansi bsd freebsd generic linux macosx mingw posix solaris
12+
13+
If your platform is not listed, try the closest one or posix, generic,
14+
ansi, in this order.
15+
16+
See below for customization instructions and for instructions on how
17+
to build with other Windows compilers.
18+
19+
If you want to check that Lua has been built correctly, do "make test"
20+
after building Lua. Also, have a look at the example programs in test.
21+
22+
* Installing Lua
23+
--------------
24+
Once you have built Lua, you may want to install it in an official
25+
place in your system. In this case, do "make install". The official
26+
place and the way to install files are defined in Makefile. You must
27+
have the right permissions to install files.
28+
29+
If you want to build and install Lua in one step, do "make xxx install",
30+
where xxx is your platform name.
31+
32+
If you want to install Lua locally, then do "make local". This will
33+
create directories bin, include, lib, man, and install Lua there as
34+
follows:
35+
36+
bin: lua luac
37+
include: lua.h luaconf.h lualib.h lauxlib.h lua.hpp
38+
lib: liblua.a
39+
man/man1: lua.1 luac.1
40+
41+
These are the only directories you need for development.
42+
43+
There are man pages for lua and luac, in both nroff and html, and a
44+
reference manual in html in doc, some sample code in test, and some
45+
useful stuff in etc. You don't need these directories for development.
46+
47+
If you want to install Lua locally, but in some other directory, do
48+
"make install INSTALL_TOP=xxx", where xxx is your chosen directory.
49+
50+
See below for instructions for Windows and other systems.
51+
52+
* Customization
53+
-------------
54+
Three things can be customized by editing a file:
55+
- Where and how to install Lua -- edit Makefile.
56+
- How to build Lua -- edit src/Makefile.
57+
- Lua features -- edit src/luaconf.h.
58+
59+
You don't actually need to edit the Makefiles because you may set the
60+
relevant variables when invoking make.
61+
62+
On the other hand, if you need to select some Lua features, you'll need
63+
to edit src/luaconf.h. The edited file will be the one installed, and
64+
it will be used by any Lua clients that you build, to ensure consistency.
65+
66+
We strongly recommend that you enable dynamic loading. This is done
67+
automatically for all platforms listed above that have this feature
68+
(and also Windows). See src/luaconf.h and also src/Makefile.
69+
70+
* Building Lua on Windows and other systems
71+
-----------------------------------------
72+
If you're not using the usual Unix tools, then the instructions for
73+
building Lua depend on the compiler you use. You'll need to create
74+
projects (or whatever your compiler uses) for building the library,
75+
the interpreter, and the compiler, as follows:
76+
77+
library: lapi.c lcode.c ldebug.c ldo.c ldump.c lfunc.c lgc.c llex.c
78+
lmem.c lobject.c lopcodes.c lparser.c lstate.c lstring.c
79+
ltable.c ltm.c lundump.c lvm.c lzio.c
80+
lauxlib.c lbaselib.c ldblib.c liolib.c lmathlib.c loslib.c
81+
ltablib.c lstrlib.c loadlib.c linit.c
82+
83+
interpreter: library, lua.c
84+
85+
compiler: library, luac.c print.c
86+
87+
If you use Visual Studio .NET, you can use etc/luavs.bat in its
88+
"Command Prompt".
89+
90+
If all you want is to build the Lua interpreter, you may put all .c files
91+
in a single project, except for luac.c and print.c. Or just use etc/all.c.
92+
93+
To use Lua as a library in your own programs, you'll need to know how to
94+
create and use libraries with your compiler.
95+
96+
As mentioned above, you may edit luaconf.h to select some features before
97+
building Lua.
98+
99+
(end of INSTALL)

0 commit comments

Comments
 (0)