Tamar 0.7.5 → 0.7.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (118) hide show
  1. data/.gitmodules +3 -0
  2. data/HISTORY +22 -5
  3. data/Tamar.gemspec +114 -1
  4. data/VERSION +1 -1
  5. data/src/lua/CMakeLists.txt +176 -0
  6. data/src/lua/COPYRIGHT +34 -0
  7. data/src/lua/FindReadline.cmake +25 -0
  8. data/src/lua/HISTORY +183 -0
  9. data/src/lua/INSTALL +99 -0
  10. data/src/lua/Makefile +128 -0
  11. data/src/lua/README +46 -0
  12. data/src/lua/dist.cmake +450 -0
  13. data/src/lua/dist.info +10 -0
  14. data/src/lua/doc/amazon.gif +0 -0
  15. data/src/lua/doc/contents.html +499 -0
  16. data/src/lua/doc/cover.png +0 -0
  17. data/src/lua/doc/logo.gif +0 -0
  18. data/src/lua/doc/lua.1 +163 -0
  19. data/src/lua/doc/lua.css +41 -0
  20. data/src/lua/doc/lua.html +172 -0
  21. data/src/lua/doc/luac.1 +136 -0
  22. data/src/lua/doc/luac.html +145 -0
  23. data/src/lua/doc/manual.css +13 -0
  24. data/src/lua/doc/manual.html +8801 -0
  25. data/src/lua/doc/readme.html +40 -0
  26. data/src/lua/etc/Makefile +44 -0
  27. data/src/lua/etc/README +37 -0
  28. data/src/lua/etc/all.c +38 -0
  29. data/src/lua/etc/lua.hpp +9 -0
  30. data/src/lua/etc/lua.ico +0 -0
  31. data/src/lua/etc/lua.pc +31 -0
  32. data/src/lua/etc/luavs.bat +28 -0
  33. data/src/lua/etc/min.c +39 -0
  34. data/src/lua/etc/noparser.c +50 -0
  35. data/src/lua/etc/strict.lua +41 -0
  36. data/src/lua/src/Makefile +182 -0
  37. data/src/lua/src/lapi.c +1087 -0
  38. data/src/lua/src/lapi.h +16 -0
  39. data/src/lua/src/lauxlib.c +652 -0
  40. data/src/lua/src/lauxlib.h +174 -0
  41. data/src/lua/src/lbaselib.c +653 -0
  42. data/src/lua/src/lcode.c +831 -0
  43. data/src/lua/src/lcode.h +76 -0
  44. data/src/lua/src/ldblib.c +398 -0
  45. data/src/lua/src/ldebug.c +638 -0
  46. data/src/lua/src/ldebug.h +33 -0
  47. data/src/lua/src/ldo.c +518 -0
  48. data/src/lua/src/ldo.h +57 -0
  49. data/src/lua/src/ldump.c +164 -0
  50. data/src/lua/src/lfunc.c +174 -0
  51. data/src/lua/src/lfunc.h +34 -0
  52. data/src/lua/src/lgc.c +711 -0
  53. data/src/lua/src/lgc.h +110 -0
  54. data/src/lua/src/linit.c +38 -0
  55. data/src/lua/src/liolib.c +556 -0
  56. data/src/lua/src/llex.c +463 -0
  57. data/src/lua/src/llex.h +81 -0
  58. data/src/lua/src/llimits.h +128 -0
  59. data/src/lua/src/lmathlib.c +263 -0
  60. data/src/lua/src/lmem.c +86 -0
  61. data/src/lua/src/lmem.h +49 -0
  62. data/src/lua/src/loadlib.c +666 -0
  63. data/src/lua/src/loadlib_rel.c +719 -0
  64. data/src/lua/src/lobject.c +214 -0
  65. data/src/lua/src/lobject.h +381 -0
  66. data/src/lua/src/lopcodes.c +102 -0
  67. data/src/lua/src/lopcodes.h +268 -0
  68. data/src/lua/src/loslib.c +243 -0
  69. data/src/lua/src/lparser.c +1339 -0
  70. data/src/lua/src/lparser.h +82 -0
  71. data/src/lua/src/lstate.c +214 -0
  72. data/src/lua/src/lstate.h +169 -0
  73. data/src/lua/src/lstring.c +111 -0
  74. data/src/lua/src/lstring.h +31 -0
  75. data/src/lua/src/lstrlib.c +871 -0
  76. data/src/lua/src/ltable.c +588 -0
  77. data/src/lua/src/ltable.h +40 -0
  78. data/src/lua/src/ltablib.c +287 -0
  79. data/src/lua/src/ltm.c +75 -0
  80. data/src/lua/src/ltm.h +54 -0
  81. data/src/lua/src/lua.c +392 -0
  82. data/src/lua/src/lua.def +131 -0
  83. data/src/lua/src/lua.h +388 -0
  84. data/src/lua/src/lua.rc +28 -0
  85. data/src/lua/src/lua_dll.rc +26 -0
  86. data/src/lua/src/luac.c +200 -0
  87. data/src/lua/src/luac.rc +1 -0
  88. data/src/lua/src/luaconf.h.in +724 -0
  89. data/src/lua/src/luaconf.h.orig +763 -0
  90. data/src/lua/src/lualib.h +53 -0
  91. data/src/lua/src/lundump.c +227 -0
  92. data/src/lua/src/lundump.h +36 -0
  93. data/src/lua/src/lvm.c +766 -0
  94. data/src/lua/src/lvm.h +36 -0
  95. data/src/lua/src/lzio.c +82 -0
  96. data/src/lua/src/lzio.h +67 -0
  97. data/src/lua/src/print.c +227 -0
  98. data/src/lua/test/README +26 -0
  99. data/src/lua/test/bisect.lua +27 -0
  100. data/src/lua/test/cf.lua +16 -0
  101. data/src/lua/test/echo.lua +5 -0
  102. data/src/lua/test/env.lua +7 -0
  103. data/src/lua/test/factorial.lua +32 -0
  104. data/src/lua/test/fib.lua +40 -0
  105. data/src/lua/test/fibfor.lua +13 -0
  106. data/src/lua/test/globals.lua +13 -0
  107. data/src/lua/test/hello.lua +3 -0
  108. data/src/lua/test/life.lua +111 -0
  109. data/src/lua/test/luac.lua +7 -0
  110. data/src/lua/test/printf.lua +7 -0
  111. data/src/lua/test/readonly.lua +12 -0
  112. data/src/lua/test/sieve.lua +29 -0
  113. data/src/lua/test/sort.lua +66 -0
  114. data/src/lua/test/table.lua +12 -0
  115. data/src/lua/test/trace-calls.lua +32 -0
  116. data/src/lua/test/trace-globals.lua +38 -0
  117. data/src/lua/test/xd.lua +14 -0
  118. metadata +115 -2
data/.gitmodules CHANGED
@@ -1,3 +1,6 @@
1
1
  [submodule "src/luadist"]
2
2
  path = src/luadist
3
3
  url = https://github.com/LuaDist/luadist.git
4
+ [submodule "src/lua"]
5
+ path = src/lua
6
+ url = git://github.com/LuaDist/lua.git
data/HISTORY CHANGED
@@ -1,5 +1,24 @@
1
1
  RELEASE HISTORY
2
2
 
3
+ v0.7.5 / 2011-05-23
4
+
5
+ Regenerate gemspec for version 0.7.5 (David Love david@homeunix.org.uk)
6
+
7
+ Changes:
8
+
9
+ * 3 General Enhancements
10
+
11
+ * Version bump to 0.7.5
12
+ * Update HISTORY file
13
+ * Regenerate gemspec for version 0.7.4
14
+
15
+ * 3 Patch Enhancements
16
+
17
+ * Call cmake on the LuaDist bindings to make Lua
18
+ * Call bootstrap to build the Lua integration
19
+ * Begin patching of the Ruby build process for Lua
20
+
21
+
3
22
  v0.7.4 / 2011-05-23
4
23
 
5
24
  Regenerate gemspec for version 0.7.4 (David Love david@homeunix.org.uk)
@@ -94,13 +113,11 @@ Current Development (David Love)
94
113
 
95
114
  Changes:
96
115
 
97
- * 3 Patch Enhancements
116
+ * 1 Patch Enhancements
98
117
 
99
- * Call cmake on the LuaDist bindings to make Lua
100
- * Call bootstrap to build the Lua integration
101
- * Begin patching of the Ruby build process for Lua
118
+ * Link directly to the Lua source
102
119
 
103
120
  * 1 General Enhancements
104
121
 
105
- * Regenerate gemspec for version 0.7.4
122
+ * Regenerate gemspec for version 0.7.5
106
123
 
data/Tamar.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{Tamar}
8
- s.version = "0.7.5"
8
+ s.version = "0.7.6"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Evan Wies, David Love"]
@@ -31,6 +31,119 @@ Gem::Specification.new do |s|
31
31
  "VERSION",
32
32
  "src/build/bootstrap.rb",
33
33
  "src/build/extconf.rb",
34
+ "src/lua/CMakeLists.txt",
35
+ "src/lua/COPYRIGHT",
36
+ "src/lua/FindReadline.cmake",
37
+ "src/lua/HISTORY",
38
+ "src/lua/INSTALL",
39
+ "src/lua/Makefile",
40
+ "src/lua/README",
41
+ "src/lua/dist.cmake",
42
+ "src/lua/dist.info",
43
+ "src/lua/doc/amazon.gif",
44
+ "src/lua/doc/contents.html",
45
+ "src/lua/doc/cover.png",
46
+ "src/lua/doc/logo.gif",
47
+ "src/lua/doc/lua.1",
48
+ "src/lua/doc/lua.css",
49
+ "src/lua/doc/lua.html",
50
+ "src/lua/doc/luac.1",
51
+ "src/lua/doc/luac.html",
52
+ "src/lua/doc/manual.css",
53
+ "src/lua/doc/manual.html",
54
+ "src/lua/doc/readme.html",
55
+ "src/lua/etc/Makefile",
56
+ "src/lua/etc/README",
57
+ "src/lua/etc/all.c",
58
+ "src/lua/etc/lua.hpp",
59
+ "src/lua/etc/lua.ico",
60
+ "src/lua/etc/lua.pc",
61
+ "src/lua/etc/luavs.bat",
62
+ "src/lua/etc/min.c",
63
+ "src/lua/etc/noparser.c",
64
+ "src/lua/etc/strict.lua",
65
+ "src/lua/src/Makefile",
66
+ "src/lua/src/lapi.c",
67
+ "src/lua/src/lapi.h",
68
+ "src/lua/src/lauxlib.c",
69
+ "src/lua/src/lauxlib.h",
70
+ "src/lua/src/lbaselib.c",
71
+ "src/lua/src/lcode.c",
72
+ "src/lua/src/lcode.h",
73
+ "src/lua/src/ldblib.c",
74
+ "src/lua/src/ldebug.c",
75
+ "src/lua/src/ldebug.h",
76
+ "src/lua/src/ldo.c",
77
+ "src/lua/src/ldo.h",
78
+ "src/lua/src/ldump.c",
79
+ "src/lua/src/lfunc.c",
80
+ "src/lua/src/lfunc.h",
81
+ "src/lua/src/lgc.c",
82
+ "src/lua/src/lgc.h",
83
+ "src/lua/src/linit.c",
84
+ "src/lua/src/liolib.c",
85
+ "src/lua/src/llex.c",
86
+ "src/lua/src/llex.h",
87
+ "src/lua/src/llimits.h",
88
+ "src/lua/src/lmathlib.c",
89
+ "src/lua/src/lmem.c",
90
+ "src/lua/src/lmem.h",
91
+ "src/lua/src/loadlib.c",
92
+ "src/lua/src/loadlib_rel.c",
93
+ "src/lua/src/lobject.c",
94
+ "src/lua/src/lobject.h",
95
+ "src/lua/src/lopcodes.c",
96
+ "src/lua/src/lopcodes.h",
97
+ "src/lua/src/loslib.c",
98
+ "src/lua/src/lparser.c",
99
+ "src/lua/src/lparser.h",
100
+ "src/lua/src/lstate.c",
101
+ "src/lua/src/lstate.h",
102
+ "src/lua/src/lstring.c",
103
+ "src/lua/src/lstring.h",
104
+ "src/lua/src/lstrlib.c",
105
+ "src/lua/src/ltable.c",
106
+ "src/lua/src/ltable.h",
107
+ "src/lua/src/ltablib.c",
108
+ "src/lua/src/ltm.c",
109
+ "src/lua/src/ltm.h",
110
+ "src/lua/src/lua.c",
111
+ "src/lua/src/lua.def",
112
+ "src/lua/src/lua.h",
113
+ "src/lua/src/lua.rc",
114
+ "src/lua/src/lua_dll.rc",
115
+ "src/lua/src/luac.c",
116
+ "src/lua/src/luac.rc",
117
+ "src/lua/src/luaconf.h.in",
118
+ "src/lua/src/luaconf.h.orig",
119
+ "src/lua/src/lualib.h",
120
+ "src/lua/src/lundump.c",
121
+ "src/lua/src/lundump.h",
122
+ "src/lua/src/lvm.c",
123
+ "src/lua/src/lvm.h",
124
+ "src/lua/src/lzio.c",
125
+ "src/lua/src/lzio.h",
126
+ "src/lua/src/print.c",
127
+ "src/lua/test/README",
128
+ "src/lua/test/bisect.lua",
129
+ "src/lua/test/cf.lua",
130
+ "src/lua/test/echo.lua",
131
+ "src/lua/test/env.lua",
132
+ "src/lua/test/factorial.lua",
133
+ "src/lua/test/fib.lua",
134
+ "src/lua/test/fibfor.lua",
135
+ "src/lua/test/globals.lua",
136
+ "src/lua/test/hello.lua",
137
+ "src/lua/test/life.lua",
138
+ "src/lua/test/luac.lua",
139
+ "src/lua/test/printf.lua",
140
+ "src/lua/test/readonly.lua",
141
+ "src/lua/test/sieve.lua",
142
+ "src/lua/test/sort.lua",
143
+ "src/lua/test/table.lua",
144
+ "src/lua/test/trace-calls.lua",
145
+ "src/lua/test/trace-globals.lua",
146
+ "src/lua/test/xd.lua",
34
147
  "src/luadist/CMakeLists.txt",
35
148
  "src/luadist/COPYRIGHT",
36
149
  "src/luadist/README",
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.7.5
1
+ 0.7.6
@@ -0,0 +1,176 @@
1
+ # Copyright (C) 2007-2011 LuaDist.
2
+ # Created by Peter Drahoš, Peter Kapec
3
+ # Redistribution and use of this file is allowed according to the terms of the MIT license.
4
+ # For details see the COPYRIGHT file distributed with LuaDist.
5
+ # Please note that the package source code is licensed under its own license.
6
+
7
+ project ( lua C )
8
+ cmake_minimum_required ( VERSION 2.6 )
9
+ include ( dist.cmake )
10
+
11
+ ## CONFIGURATION
12
+ # Default configuration (we assume POSIX by default)
13
+ set ( LUA_PATH "LUA_PATH" CACHE STRING "Environment variable to use as package.path." )
14
+ set ( LUA_CPATH "LUA_CPATH" CACHE STRING "Environment variable to use as package.cpath." )
15
+ set ( LUA_INIT "LUA_INIT" CACHE STRING "Environment variable for initial script." )
16
+
17
+ option ( LUA_ANSI "Use only ansi features." OFF )
18
+ option ( LUA_USE_RELATIVE_LOADLIB "Use modified loadlib.c with support for relative paths on posix systems." ON)
19
+ set ( LUA_IDSIZE 60 CACHE NUMBER "gives the maximum size for the description of the source." )
20
+ set ( LUA_PROMPT "> " CACHE STRING "Is the default prompt used by stand-alone Lua." )
21
+ set ( LUA_PROMPT2 ">> " CACHE STRING "Is the default continuation prompt used by stand-alone Lua." )
22
+ set ( LUA_MAXINPUT 512 CACHE NUMBER "Is the maximum length for an input line in the stand-alone interpreter.")
23
+
24
+ #2DO: LUAI_* and LUAL_* settings, for now defaults are used.
25
+
26
+ set ( LUA_DIRSEP "/" )
27
+ set ( LUA_MODULE_SUFFIX ${CMAKE_SHARED_MODULE_SUFFIX} )
28
+ set ( LUA_LDIR ${INSTALL_LMOD} )
29
+ set ( LUA_CDIR ${INSTALL_CMOD} )
30
+
31
+ if ( LUA_USE_RELATIVE_LOADLIB )
32
+ # This will set up relative paths to lib
33
+ string ( REGEX REPLACE "[^!/]+" ".." LUA_DIR "!/${INSTALL_BIN}/" )
34
+ else ()
35
+ # Direct path to installation
36
+ set ( LUA_DIR ${CMAKE_INSTALL_PREFIX} CACHE STRING "Destination from which modules will be resolved. See INSTALL_LMOD and INSTALL_CMOD.")
37
+ endif ()
38
+
39
+ set ( LUA_PATH_DEFAULT "./?.lua;${LUA_DIR}${LUA_LDIR}/?.lua;${LUA_DIR}${LUA_LDIR}/?/init.lua" )
40
+ set ( LUA_CPATH_DEFAULT "./?${LUA_MODULE_SUFFIX};${LUA_DIR}${LUA_CDIR}/?${LUA_MODULE_SUFFIX};${LUA_DIR}${LUA_CDIR}/loadall${LUA_MODULE_SUFFIX}" )
41
+
42
+ if ( WIN32 AND NOT CYGWIN )
43
+ # Windows systems
44
+ option ( LUA_WIN "Windows specific build." ON )
45
+ option ( LUA_BUILD_AS_DLL "Build Lua library as Dll." ON )
46
+ # Paths (Double escapes needed)
47
+ set ( LUA_DIRSEP "\\\\" )
48
+ string ( REPLACE "/" ${LUA_DIRSEP} LUA_DIR "${LUA_DIR}" )
49
+ string ( REPLACE "/" ${LUA_DIRSEP} LUA_LDIR "${LUA_LDIR}" )
50
+ string ( REPLACE "/" ${LUA_DIRSEP} LUA_CDIR "${LUA_CDIR}" )
51
+ string ( REPLACE "/" ${LUA_DIRSEP} LUA_PATH_DEFAULT "${LUA_PATH_DEFAULT}" )
52
+ string ( REPLACE "/" ${LUA_DIRSEP} LUA_CPATH_DEFAULT "${LUA_CPATH_DEFAULT}" )
53
+ else ()
54
+ # Posix systems (incl. Cygwin)
55
+ option ( LUA_USE_POSIX "Use POSIX functionality." ON )
56
+ option ( LUA_USE_DLOPEN "Use dynamic linker to load modules." ON )
57
+ option ( LUA_USE_MKSTEMP "Use mkstep." ON )
58
+ option ( LUA_USE_ISATTY "Use tty." ON )
59
+ option ( LUA_USE_POPEN "Use popen." ON )
60
+ option ( LUA_USE_ULONGJMP "Use ulongjmp" ON)
61
+ endif ()
62
+
63
+ ## SETUP
64
+ # Optional libraries
65
+ find_package ( Readline )
66
+ if ( READLINE_FOUND )
67
+ option ( LUA_USE_READLINE "Use readline in the Lua CLI." ON )
68
+ endif ()
69
+
70
+ find_package ( Curses )
71
+ if ( CURSES_FOUND )
72
+ option ( LUA_USE_CURSES "Use curses in the Lua CLI." ON )
73
+ endif ()
74
+
75
+ # Setup needed variables and libraries
76
+ if ( LUA_USE_POSIX )
77
+ # On POSIX Lua links to standard math library "m"
78
+ list ( APPEND LIBS m )
79
+ endif ()
80
+
81
+ if ( LUA_USE_DLOPEN )
82
+ # Link to dynamic linker library "dl"
83
+ list ( APPEND LIBS dl )
84
+ endif ()
85
+
86
+ if ( LUA_WIN )
87
+ # Add extra rc files to the windows build
88
+ if ( MSVC OR MINGW )
89
+ set ( LUA_DEF src/lua.def )
90
+ set ( LUA_DLL_RC src/lua_dll.rc )
91
+ set ( LUA_RC src/lua.rc )
92
+ set ( LUAC_RC src/luac.rc )
93
+ endif ()
94
+ endif ()
95
+
96
+ if ( LUA_USE_READLINE )
97
+ # Add readline
98
+ include_directories ( ${READLINE_INCLUDE_DIR} )
99
+ list ( APPEND LIBS ${READLINE_LIBRARY} )
100
+ endif ()
101
+
102
+ if ( LUA_USE_CURSES )
103
+ # Add curses
104
+ include_directories ( ${CURSES_INCLUDE_DIR} )
105
+ list ( APPEND LIBS ${CURSES_LIBRARY} )
106
+ endif ()
107
+
108
+ ## SOURCES
109
+ # Generate luaconf.h
110
+ configure_file ( src/luaconf.h.in ${CMAKE_CURRENT_BINARY_DIR}/luaconf.h )
111
+
112
+ # Sources and headers
113
+ include_directories ( src ${CMAKE_CURRENT_BINARY_DIR} )
114
+ set ( SRC_LIB src/lapi.c src/lcode.c src/ldebug.c src/ldo.c src/ldump.c src/lfunc.c src/lgc.c src/llex.c src/lmem.c src/lobject.c src/lopcodes.c src/lparser.c src/lstate.c src/lstring.c src/ltable.c src/ltm.c src/lundump.c src/lvm.c src/lzio.c src/lauxlib.c src/lbaselib.c src/ldblib.c src/liolib.c src/lmathlib.c src/loslib.c src/ltablib.c src/lstrlib.c src/linit.c )
115
+ set ( SRC_LUA src/lua.c )
116
+ set ( SRC_LUAC src/luac.c src/print.c )
117
+
118
+ if ( LUA_USE_RELATIVE_LOADLIB )
119
+ # Use modified loadlib
120
+ list ( APPEND SRC_LIB src/loadlib_rel.c )
121
+ else ()
122
+ list ( APPEND SRC_LIB src/loadlib.c )
123
+ endif ()
124
+
125
+ ## BUILD
126
+ # Create dynamic library
127
+ add_library ( liblua SHARED ${SRC_LIB} ${LUA_DLL_RC} ${LUA_DEF} )
128
+ target_link_libraries ( liblua ${LIBS} )
129
+ set_target_properties ( liblua PROPERTIES OUTPUT_NAME lua51 CLEAN_DIRECT_OUTPUT 1 )
130
+
131
+ # Create static library, this is needed to compile luac in the 5.1.x Lua series
132
+ add_library ( liblua_static STATIC ${SRC_LIB} )
133
+ target_link_libraries ( liblua_static ${LIBS} )
134
+
135
+ add_executable ( lua ${SRC_LUA} ${LUA_RC} )
136
+ target_link_libraries ( lua liblua )
137
+
138
+ add_executable ( luac ${SRC_LUAC} ${LUAC_RC} )
139
+ target_link_libraries ( luac liblua_static )
140
+
141
+ install_executable ( lua luac )
142
+ install_library ( liblua )
143
+ install_data ( README COPYRIGHT HISTORY )
144
+ install_lua_module ( strict etc/strict.lua )
145
+ install_header (src/lua.h src/lualib.h src/lauxlib.h etc/lua.hpp ${CMAKE_CURRENT_BINARY_DIR}/luaconf.h )
146
+ install_doc ( doc/ )
147
+ install_foo ( etc/ )
148
+ install_test ( test/ )
149
+
150
+ ## TESTS
151
+ set(LUA lua)
152
+
153
+ add_lua_test ( test/bisect.lua )
154
+ add_lua_test ( test/cf.lua )
155
+ add_lua_test ( test/echo.lua )
156
+ add_lua_test ( test/env.lua )
157
+ add_lua_test ( test/factorial.lua )
158
+ add_lua_test ( test/fib.lua 20 )
159
+ add_lua_test ( test/fibfor.lua )
160
+ #add_lua_test ( test/globals.lua ) # Requires input
161
+ add_lua_test ( test/hello.lua )
162
+ file(READ test/life.lua _data) # life.lua test, with reduced run-time.
163
+ string(REPLACE "40,20" "20,15" _data "${_data}")
164
+ string(REPLACE 2000 20 _data "${_data}")
165
+ file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/test/life-quick.lua "${_data}")
166
+ add_lua_test ( ${CMAKE_CURRENT_BINARY_DIR}/test/life-quick.lua )
167
+ #add_lua_test ( test/luac.lua ) # Requires input
168
+ add_lua_test ( test/printf.lua )
169
+ add_lua_test ( test/readonly.lua )
170
+ set_property ( TEST readonly PROPERTY PASS_REGULAR_EXPRESSION "cannot redefine global variable `y'" )
171
+ add_lua_test ( test/sieve.lua )
172
+ add_lua_test ( test/sort.lua )
173
+ #add_lua_test ( test/table.lua ) # Requires input
174
+ add_lua_test ( test/trace-calls.lua )
175
+ add_lua_test ( test/trace-globals.lua )
176
+ #add_lua_test ( test/xd.lua ) # Requires input
data/src/lua/COPYRIGHT ADDED
@@ -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)
@@ -0,0 +1,25 @@
1
+ # - Try to find Readline
2
+ # Once done this will define
3
+ # READLINE_FOUND - System has readline
4
+ # READLINE_INCLUDE_DIRS - The readline include directories
5
+ # READLINE_LIBRARIES - The libraries needed to use readline
6
+ # READLINE_DEFINITIONS - Compiler switches required for using readline
7
+
8
+ find_package ( PkgConfig )
9
+ pkg_check_modules ( PC_READLINE QUIET readline )
10
+ set ( READLINE_DEFINITIONS ${PC_READLINE_CFLAGS_OTHER} )
11
+
12
+ find_path ( READLINE_INCLUDE_DIR readline/readline.h
13
+ HINTS ${PC_READLINE_INCLUDEDIR} ${PC_READLINE_INCLUDE_DIRS}
14
+ PATH_SUFFIXES readline )
15
+
16
+ find_library ( READLINE_LIBRARY NAMES readline
17
+ HINTS ${PC_READLINE_LIBDIR} ${PC_READLINE_LIBRARY_DIRS} )
18
+
19
+ set ( READLINE_LIBRARIES ${READLINE_LIBRARY} )
20
+ set ( READLINE_INCLUDE_DIRS ${READLINE_INCLUDE_DIR} )
21
+
22
+ include ( FindPackageHandleStandardArgs )
23
+ # handle the QUIETLY and REQUIRED arguments and set READLINE_FOUND to TRUE
24
+ # if all listed variables are TRUE
25
+ find_package_handle_standard_args ( readline DEFAULT_MSG READLINE_LIBRARY READLINE_INCLUDE_DIR )
data/src/lua/HISTORY ADDED
@@ -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)