dub 0.2.2 → 0.6.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of dub might be problematic. Click here for more details.

Files changed (266) hide show
  1. data/.gitignore +8 -0
  2. data/History.txt +48 -0
  3. data/LICENSE +20 -0
  4. data/README.rdoc +50 -0
  5. data/Rakefile +58 -0
  6. data/dub.gemspec +197 -0
  7. data/lib/dub/argument.rb +275 -0
  8. data/lib/dub/entities_unescape.rb +16 -0
  9. data/lib/dub/function.rb +163 -0
  10. data/lib/dub/function_group.rb +72 -0
  11. data/lib/dub/generator.rb +15 -0
  12. data/lib/dub/group.rb +24 -0
  13. data/lib/dub/klass.rb +244 -0
  14. data/lib/dub/lua/class.cpp.erb +84 -0
  15. data/lib/dub/lua/class_gen.rb +97 -0
  16. data/lib/dub/lua/function.cpp.erb +18 -0
  17. data/lib/dub/lua/function_gen.rb +265 -0
  18. data/lib/dub/lua/group.cpp.erb +9 -0
  19. data/lib/dub/lua/lua_cpp_helper.h +141 -0
  20. data/lib/dub/lua/namespace.cpp.erb +40 -0
  21. data/lib/dub/lua/namespace_gen.rb +88 -0
  22. data/lib/dub/lua.rb +24 -0
  23. data/lib/dub/member_extraction.rb +92 -0
  24. data/lib/dub/namespace.rb +277 -0
  25. data/lib/dub/parser.rb +46 -0
  26. data/lib/dub/templates/lua_template.erb +21 -0
  27. data/lib/dub/version.rb +3 -0
  28. data/lib/dub.rb +23 -20
  29. data/test/argument_test.rb +547 -0
  30. data/test/fixtures/app/CMakeLists.txt +54 -0
  31. data/test/fixtures/app/Doxyfile +1600 -0
  32. data/test/fixtures/app/bindings/all_lua.cpp +299 -0
  33. data/test/fixtures/app/include/matrix.h +157 -0
  34. data/test/fixtures/app/make_lua_bindings.rb +13 -0
  35. data/test/fixtures/app/vendor/lua/CMakeLists.txt +25 -0
  36. data/test/fixtures/app/vendor/lua/COPYRIGHT +34 -0
  37. data/test/fixtures/app/vendor/lua/HISTORY +183 -0
  38. data/test/fixtures/app/vendor/lua/INSTALL +99 -0
  39. data/test/fixtures/app/vendor/lua/Makefile +183 -0
  40. data/test/fixtures/app/vendor/lua/README +37 -0
  41. data/test/fixtures/app/vendor/lua/lapi.c +1080 -0
  42. data/test/fixtures/app/vendor/lua/lapi.h +16 -0
  43. data/test/fixtures/app/vendor/lua/lauxlib.c +653 -0
  44. data/test/fixtures/app/vendor/lua/lauxlib.h +174 -0
  45. data/test/fixtures/app/vendor/lua/lbaselib.c +643 -0
  46. data/test/fixtures/app/vendor/lua/lcode.c +839 -0
  47. data/test/fixtures/app/vendor/lua/lcode.h +76 -0
  48. data/test/fixtures/app/vendor/lua/ldblib.c +397 -0
  49. data/test/fixtures/app/vendor/lua/ldebug.c +622 -0
  50. data/test/fixtures/app/vendor/lua/ldebug.h +33 -0
  51. data/test/fixtures/app/vendor/lua/ldo.c +516 -0
  52. data/test/fixtures/app/vendor/lua/ldo.h +57 -0
  53. data/test/fixtures/app/vendor/lua/ldump.c +164 -0
  54. data/test/fixtures/app/vendor/lua/lfunc.c +174 -0
  55. data/test/fixtures/app/vendor/lua/lfunc.h +34 -0
  56. data/test/fixtures/app/vendor/lua/lgc.c +711 -0
  57. data/test/fixtures/app/vendor/lua/lgc.h +110 -0
  58. data/test/fixtures/app/vendor/lua/liblua.a +0 -0
  59. data/test/fixtures/app/vendor/lua/linit.c +38 -0
  60. data/test/fixtures/app/vendor/lua/liolib.c +532 -0
  61. data/test/fixtures/app/vendor/lua/llex.c +461 -0
  62. data/test/fixtures/app/vendor/lua/llex.h +81 -0
  63. data/test/fixtures/app/vendor/lua/llimits.h +128 -0
  64. data/test/fixtures/app/vendor/lua/lmathlib.c +263 -0
  65. data/test/fixtures/app/vendor/lua/lmem.c +86 -0
  66. data/test/fixtures/app/vendor/lua/lmem.h +49 -0
  67. data/test/fixtures/app/vendor/lua/loadlib.c +664 -0
  68. data/test/fixtures/app/vendor/lua/lobject.c +214 -0
  69. data/test/fixtures/app/vendor/lua/lobject.h +381 -0
  70. data/test/fixtures/app/vendor/lua/lopcodes.c +102 -0
  71. data/test/fixtures/app/vendor/lua/lopcodes.h +268 -0
  72. data/test/fixtures/app/vendor/lua/loslib.c +244 -0
  73. data/test/fixtures/app/vendor/lua/lparser.c +1337 -0
  74. data/test/fixtures/app/vendor/lua/lparser.h +82 -0
  75. data/test/fixtures/app/vendor/lua/lstate.c +214 -0
  76. data/test/fixtures/app/vendor/lua/lstate.h +168 -0
  77. data/test/fixtures/app/vendor/lua/lstring.c +111 -0
  78. data/test/fixtures/app/vendor/lua/lstring.h +31 -0
  79. data/test/fixtures/app/vendor/lua/lstrlib.c +868 -0
  80. data/test/fixtures/app/vendor/lua/ltable.c +588 -0
  81. data/test/fixtures/app/vendor/lua/ltable.h +40 -0
  82. data/test/fixtures/app/vendor/lua/ltablib.c +278 -0
  83. data/test/fixtures/app/vendor/lua/ltm.c +75 -0
  84. data/test/fixtures/app/vendor/lua/ltm.h +54 -0
  85. data/test/fixtures/app/vendor/lua/lua.c +695 -0
  86. data/test/fixtures/app/vendor/lua/lua.h +385 -0
  87. data/test/fixtures/app/vendor/lua/lua_dub_helper.h +77 -0
  88. data/test/fixtures/app/vendor/lua/luac +0 -0
  89. data/test/fixtures/app/vendor/lua/luac.c +200 -0
  90. data/test/fixtures/app/vendor/lua/luaconf.h +762 -0
  91. data/test/fixtures/app/vendor/lua/lualib.h +53 -0
  92. data/test/fixtures/app/vendor/lua/lundump.c +223 -0
  93. data/test/fixtures/app/vendor/lua/lundump.h +36 -0
  94. data/test/fixtures/app/vendor/lua/lvm.c +765 -0
  95. data/test/fixtures/app/vendor/lua/lvm.h +36 -0
  96. data/test/fixtures/app/vendor/lua/lzio.c +82 -0
  97. data/test/fixtures/app/vendor/lua/lzio.h +67 -0
  98. data/test/fixtures/app/vendor/lua/matrix.h +102 -0
  99. data/test/fixtures/app/vendor/lua/print.c +227 -0
  100. data/test/fixtures/app/vendor/lua/test/README +26 -0
  101. data/test/fixtures/app/vendor/lua/test/bisect.lua +27 -0
  102. data/test/fixtures/app/vendor/lua/test/cf.lua +16 -0
  103. data/test/fixtures/app/vendor/lua/test/echo.lua +5 -0
  104. data/test/fixtures/app/vendor/lua/test/env.lua +7 -0
  105. data/test/fixtures/app/vendor/lua/test/factorial.lua +32 -0
  106. data/test/fixtures/app/vendor/lua/test/fib.lua +40 -0
  107. data/test/fixtures/app/vendor/lua/test/fibfor.lua +13 -0
  108. data/test/fixtures/app/vendor/lua/test/globals.lua +13 -0
  109. data/test/fixtures/app/vendor/lua/test/hello.lua +3 -0
  110. data/test/fixtures/app/vendor/lua/test/life.lua +111 -0
  111. data/test/fixtures/app/vendor/lua/test/luac.lua +7 -0
  112. data/test/fixtures/app/vendor/lua/test/printf.lua +7 -0
  113. data/test/fixtures/app/vendor/lua/test/readonly.lua +12 -0
  114. data/test/fixtures/app/vendor/lua/test/sieve.lua +29 -0
  115. data/test/fixtures/app/vendor/lua/test/sort.lua +66 -0
  116. data/test/fixtures/app/vendor/lua/test/table.lua +12 -0
  117. data/test/fixtures/app/vendor/lua/test/trace-calls.lua +32 -0
  118. data/test/fixtures/app/vendor/lua/test/trace-globals.lua +38 -0
  119. data/test/fixtures/app/vendor/lua/test/xd.lua +14 -0
  120. data/test/fixtures/app/xml/classdub_1_1_matrix.xml +339 -0
  121. data/test/fixtures/app/xml/classdub_1_1_t_mat.xml +252 -0
  122. data/test/fixtures/app/xml/combine.xslt +15 -0
  123. data/test/fixtures/app/xml/compound.xsd +814 -0
  124. data/test/fixtures/app/xml/dir_53661a2bdeb1d55e60581a7e15deb763.xml +12 -0
  125. data/test/fixtures/app/xml/index.xml +48 -0
  126. data/test/fixtures/app/xml/index.xsd +66 -0
  127. data/test/fixtures/app/xml/matrix_8h.xml +179 -0
  128. data/test/fixtures/app/xml/namespacedub.xml +41 -0
  129. data/test/fixtures/classcv_1_1_mat.xml +1996 -0
  130. data/test/fixtures/classcv_1_1_point__.xml +341 -0
  131. data/test/fixtures/classcv_1_1_scalar__.xml +269 -0
  132. data/test/fixtures/classcv_1_1_size__.xml +270 -0
  133. data/test/fixtures/dummy_class.cpp.erb +1 -0
  134. data/test/fixtures/dummy_function.cpp.erb +1 -0
  135. data/test/fixtures/group___magic_type.xml +406 -0
  136. data/test/fixtures/namespacecv.xml +12659 -0
  137. data/test/function_group_test.rb +24 -0
  138. data/test/function_test.rb +395 -0
  139. data/test/group_test.rb +155 -0
  140. data/test/helper.rb +34 -0
  141. data/test/klass_test.rb +416 -0
  142. data/test/lua_function_gen_test.rb +215 -0
  143. data/test/namespace_test.rb +220 -0
  144. data/test/parser_test.rb +36 -0
  145. metadata +219 -276
  146. checksums.yaml +0 -7
  147. data/lib/open_api_sdk/analytics.rb +0 -99
  148. data/lib/open_api_sdk/domains.rb +0 -353
  149. data/lib/open_api_sdk/dub.rb +0 -88
  150. data/lib/open_api_sdk/links.rb +0 -766
  151. data/lib/open_api_sdk/metatags.rb +0 -54
  152. data/lib/open_api_sdk/models/operations/bulkcreatelinks_response.rb +0 -60
  153. data/lib/open_api_sdk/models/operations/bulkupdatelinks_requestbody.rb +0 -27
  154. data/lib/open_api_sdk/models/operations/bulkupdatelinks_response.rb +0 -60
  155. data/lib/open_api_sdk/models/operations/color.rb +0 -24
  156. data/lib/open_api_sdk/models/operations/createdomain_requestbody.rb +0 -33
  157. data/lib/open_api_sdk/models/operations/createdomain_response.rb +0 -60
  158. data/lib/open_api_sdk/models/operations/createlink_requestbody.rb +0 -95
  159. data/lib/open_api_sdk/models/operations/createlink_response.rb +0 -60
  160. data/lib/open_api_sdk/models/operations/createtag_requestbody.rb +0 -32
  161. data/lib/open_api_sdk/models/operations/createtag_response.rb +0 -60
  162. data/lib/open_api_sdk/models/operations/data.rb +0 -83
  163. data/lib/open_api_sdk/models/operations/deletedomain_request.rb +0 -24
  164. data/lib/open_api_sdk/models/operations/deletedomain_response.rb +0 -60
  165. data/lib/open_api_sdk/models/operations/deletedomain_responsebody.rb +0 -24
  166. data/lib/open_api_sdk/models/operations/deletelink_request.rb +0 -24
  167. data/lib/open_api_sdk/models/operations/deletelink_response.rb +0 -60
  168. data/lib/open_api_sdk/models/operations/deletelink_responsebody.rb +0 -24
  169. data/lib/open_api_sdk/models/operations/event.rb +0 -21
  170. data/lib/open_api_sdk/models/operations/getlinkinfo_request.rb +0 -33
  171. data/lib/open_api_sdk/models/operations/getlinkinfo_response.rb +0 -60
  172. data/lib/open_api_sdk/models/operations/getlinks_request.rb +0 -51
  173. data/lib/open_api_sdk/models/operations/getlinks_response.rb +0 -60
  174. data/lib/open_api_sdk/models/operations/getlinkscount_request.rb +0 -48
  175. data/lib/open_api_sdk/models/operations/getlinkscount_response.rb +0 -60
  176. data/lib/open_api_sdk/models/operations/getmetatags_request.rb +0 -24
  177. data/lib/open_api_sdk/models/operations/getmetatags_response.rb +0 -33
  178. data/lib/open_api_sdk/models/operations/getmetatags_responsebody.rb +0 -30
  179. data/lib/open_api_sdk/models/operations/getqrcode_request.rb +0 -39
  180. data/lib/open_api_sdk/models/operations/getqrcode_response.rb +0 -60
  181. data/lib/open_api_sdk/models/operations/gettags_response.rb +0 -60
  182. data/lib/open_api_sdk/models/operations/getworkspace_request.rb +0 -24
  183. data/lib/open_api_sdk/models/operations/getworkspace_response.rb +0 -60
  184. data/lib/open_api_sdk/models/operations/groupby.rb +0 -28
  185. data/lib/open_api_sdk/models/operations/interval.rb +0 -25
  186. data/lib/open_api_sdk/models/operations/level.rb +0 -21
  187. data/lib/open_api_sdk/models/operations/listdomains_response.rb +0 -60
  188. data/lib/open_api_sdk/models/operations/paymentprocessor.rb +0 -20
  189. data/lib/open_api_sdk/models/operations/requestbody.rb +0 -95
  190. data/lib/open_api_sdk/models/operations/retrieveanalytics_request.rb +0 -81
  191. data/lib/open_api_sdk/models/operations/retrieveanalytics_response.rb +0 -60
  192. data/lib/open_api_sdk/models/operations/sort.rb +0 -20
  193. data/lib/open_api_sdk/models/operations/trackcustomer_requestbody.rb +0 -33
  194. data/lib/open_api_sdk/models/operations/trackcustomer_response.rb +0 -60
  195. data/lib/open_api_sdk/models/operations/trackcustomer_responsebody.rb +0 -33
  196. data/lib/open_api_sdk/models/operations/tracklead_requestbody.rb +0 -42
  197. data/lib/open_api_sdk/models/operations/tracklead_response.rb +0 -60
  198. data/lib/open_api_sdk/models/operations/tracklead_responsebody.rb +0 -42
  199. data/lib/open_api_sdk/models/operations/tracksale_requestbody.rb +0 -42
  200. data/lib/open_api_sdk/models/operations/tracksale_response.rb +0 -60
  201. data/lib/open_api_sdk/models/operations/tracksale_responsebody.rb +0 -42
  202. data/lib/open_api_sdk/models/operations/updatedomain_request.rb +0 -27
  203. data/lib/open_api_sdk/models/operations/updatedomain_requestbody.rb +0 -33
  204. data/lib/open_api_sdk/models/operations/updatedomain_response.rb +0 -60
  205. data/lib/open_api_sdk/models/operations/updatelink_request.rb +0 -27
  206. data/lib/open_api_sdk/models/operations/updatelink_requestbody.rb +0 -95
  207. data/lib/open_api_sdk/models/operations/updatelink_response.rb +0 -60
  208. data/lib/open_api_sdk/models/operations/updatetag_color.rb +0 -24
  209. data/lib/open_api_sdk/models/operations/updatetag_request.rb +0 -27
  210. data/lib/open_api_sdk/models/operations/updatetag_requestbody.rb +0 -32
  211. data/lib/open_api_sdk/models/operations/updatetag_response.rb +0 -60
  212. data/lib/open_api_sdk/models/operations/updateworkspace_request.rb +0 -27
  213. data/lib/open_api_sdk/models/operations/updateworkspace_requestbody.rb +0 -27
  214. data/lib/open_api_sdk/models/operations/updateworkspace_response.rb +0 -60
  215. data/lib/open_api_sdk/models/operations/upsertlink_requestbody.rb +0 -95
  216. data/lib/open_api_sdk/models/operations/upsertlink_response.rb +0 -60
  217. data/lib/open_api_sdk/models/operations.rb +0 -74
  218. data/lib/open_api_sdk/models/shared/badrequest.rb +0 -24
  219. data/lib/open_api_sdk/models/shared/code.rb +0 -18
  220. data/lib/open_api_sdk/models/shared/color.rb +0 -24
  221. data/lib/open_api_sdk/models/shared/conflict.rb +0 -24
  222. data/lib/open_api_sdk/models/shared/conflict_code.rb +0 -18
  223. data/lib/open_api_sdk/models/shared/conflict_error.rb +0 -30
  224. data/lib/open_api_sdk/models/shared/countrycode.rb +0 -267
  225. data/lib/open_api_sdk/models/shared/domains.rb +0 -27
  226. data/lib/open_api_sdk/models/shared/domainschema.rb +0 -48
  227. data/lib/open_api_sdk/models/shared/error.rb +0 -30
  228. data/lib/open_api_sdk/models/shared/forbidden.rb +0 -24
  229. data/lib/open_api_sdk/models/shared/forbidden_code.rb +0 -18
  230. data/lib/open_api_sdk/models/shared/forbidden_error.rb +0 -30
  231. data/lib/open_api_sdk/models/shared/geo.rb +0 -771
  232. data/lib/open_api_sdk/models/shared/internalservererror.rb +0 -24
  233. data/lib/open_api_sdk/models/shared/internalservererror_code.rb +0 -18
  234. data/lib/open_api_sdk/models/shared/internalservererror_error.rb +0 -30
  235. data/lib/open_api_sdk/models/shared/inviteexpired.rb +0 -24
  236. data/lib/open_api_sdk/models/shared/inviteexpired_code.rb +0 -18
  237. data/lib/open_api_sdk/models/shared/inviteexpired_error.rb +0 -30
  238. data/lib/open_api_sdk/models/shared/linkgeotargeting.rb +0 -771
  239. data/lib/open_api_sdk/models/shared/linkschema.rb +0 -142
  240. data/lib/open_api_sdk/models/shared/notfound.rb +0 -24
  241. data/lib/open_api_sdk/models/shared/notfound_code.rb +0 -18
  242. data/lib/open_api_sdk/models/shared/notfound_error.rb +0 -30
  243. data/lib/open_api_sdk/models/shared/plan.rb +0 -24
  244. data/lib/open_api_sdk/models/shared/ratelimitexceeded.rb +0 -24
  245. data/lib/open_api_sdk/models/shared/ratelimitexceeded_code.rb +0 -18
  246. data/lib/open_api_sdk/models/shared/ratelimitexceeded_error.rb +0 -30
  247. data/lib/open_api_sdk/models/shared/role.rb +0 -19
  248. data/lib/open_api_sdk/models/shared/security.rb +0 -24
  249. data/lib/open_api_sdk/models/shared/tagschema.rb +0 -30
  250. data/lib/open_api_sdk/models/shared/unauthorized.rb +0 -24
  251. data/lib/open_api_sdk/models/shared/unauthorized_code.rb +0 -18
  252. data/lib/open_api_sdk/models/shared/unauthorized_error.rb +0 -30
  253. data/lib/open_api_sdk/models/shared/unprocessableentity.rb +0 -24
  254. data/lib/open_api_sdk/models/shared/unprocessableentity_code.rb +0 -18
  255. data/lib/open_api_sdk/models/shared/unprocessableentity_error.rb +0 -30
  256. data/lib/open_api_sdk/models/shared/users.rb +0 -24
  257. data/lib/open_api_sdk/models/shared/workspaceschema.rb +0 -81
  258. data/lib/open_api_sdk/models/shared.rb +0 -49
  259. data/lib/open_api_sdk/qr_codes.rb +0 -97
  260. data/lib/open_api_sdk/sdkconfiguration.rb +0 -52
  261. data/lib/open_api_sdk/tags.rb +0 -272
  262. data/lib/open_api_sdk/track.rb +0 -276
  263. data/lib/open_api_sdk/utils/metadata_fields.rb +0 -150
  264. data/lib/open_api_sdk/utils/t.rb +0 -59
  265. data/lib/open_api_sdk/utils/utils.rb +0 -772
  266. data/lib/open_api_sdk/workspaces.rb +0 -192
@@ -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)
@@ -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,0 +1,183 @@
1
+ # makefile for building Lua
2
+ # see ../INSTALL for installation instructions
3
+ # see ../Makefile and luaconf.h for further customization
4
+
5
+ # == CHANGE THE SETTINGS BELOW TO SUIT YOUR ENVIRONMENT =======================
6
+
7
+ # Your platform. See PLATS for possible values.
8
+ PLAT= none
9
+
10
+ CC= g++
11
+ CFLAGS= -g -O2 -Wall $(MYCFLAGS)
12
+ AR= ar rcu
13
+ RANLIB= ranlib
14
+ RM= rm -f
15
+ LIBS= -lm $(MYLIBS)
16
+
17
+ MYCFLAGS=
18
+ MYLDFLAGS=
19
+ MYLIBS=
20
+
21
+ # == END OF USER SETTINGS. NO NEED TO CHANGE ANYTHING BELOW THIS LINE =========
22
+
23
+ PLATS= aix ansi bsd freebsd generic linux macosx mingw posix solaris
24
+
25
+ LUA_A= liblua.a
26
+ CORE_O= lapi.o lcode.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o lmem.o \
27
+ lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o ltm.o \
28
+ lundump.o lvm.o lzio.o
29
+ LIB_O= lauxlib.o lbaselib.o ldblib.o liolib.o lmathlib.o loslib.o ltablib.o \
30
+ lstrlib.o loadlib.o linit.o
31
+
32
+ LUA_T= lua
33
+ LUA_O= lua.o
34
+
35
+ LUAC_T= luac
36
+ LUAC_O= luac.o print.o
37
+
38
+ ALL_O= $(CORE_O) $(LIB_O) $(LUA_O) $(LUAC_O)
39
+ ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T)
40
+ ALL_A= $(LUA_A)
41
+
42
+ default: $(PLAT)
43
+
44
+ all: $(ALL_T)
45
+
46
+ o: $(ALL_O)
47
+
48
+ a: $(ALL_A)
49
+
50
+ $(LUA_A): $(CORE_O) $(LIB_O)
51
+ $(AR) $@ $?
52
+ $(RANLIB) $@
53
+
54
+ $(LUA_T): $(LUA_O) $(LUA_A)
55
+ $(CC) -o $@ $(MYLDFLAGS) $(LUA_O) $(LUA_A) $(LIBS)
56
+
57
+ $(LUAC_T): $(LUAC_O) $(LUA_A)
58
+ $(CC) -o $@ $(MYLDFLAGS) $(LUAC_O) $(LUA_A) $(LIBS)
59
+
60
+ clean:
61
+ $(RM) $(ALL_T) $(ALL_O)
62
+
63
+ depend:
64
+ @$(CC) $(CFLAGS) -MM l*.c print.c
65
+
66
+ echo:
67
+ @echo "PLAT = $(PLAT)"
68
+ @echo "CC = $(CC)"
69
+ @echo "CFLAGS = $(CFLAGS)"
70
+ @echo "AR = $(AR)"
71
+ @echo "RANLIB = $(RANLIB)"
72
+ @echo "RM = $(RM)"
73
+ @echo "MYCFLAGS = $(MYCFLAGS)"
74
+ @echo "MYLDFLAGS = $(MYLDFLAGS)"
75
+ @echo "MYLIBS = $(MYLIBS)"
76
+
77
+ # convenience targets for popular platforms
78
+
79
+ none:
80
+ @echo "Please choose a platform:"
81
+ @echo " $(PLATS)"
82
+
83
+ aix:
84
+ $(MAKE) all CC="xlc" CFLAGS="-O2 -DLUA_USE_POSIX -DLUA_USE_DLOPEN" MYLIBS="-ldl" MYLDFLAGS="-brtl -bexpall"
85
+
86
+ ansi:
87
+ $(MAKE) all MYCFLAGS=-DLUA_ANSI
88
+
89
+ bsd:
90
+ $(MAKE) all MYCFLAGS="-DLUA_USE_POSIX -DLUA_USE_DLOPEN" MYLIBS="-Wl,-E"
91
+
92
+ freebsd:
93
+ $(MAKE) all MYCFLAGS="-DLUA_USE_LINUX" MYLIBS="-Wl,-E -lreadline"
94
+
95
+ generic:
96
+ $(MAKE) all MYCFLAGS=
97
+
98
+ linux:
99
+ $(MAKE) all MYCFLAGS=-DLUA_USE_LINUX MYLIBS="-Wl,-E -ldl -lreadline -lhistory -lncurses"
100
+
101
+ macosx:
102
+ $(MAKE) all MYCFLAGS=-DLUA_USE_MACOSX
103
+ # use this on Mac OS X 10.4
104
+ # $(MAKE) all MYCFLAGS="-DLUA_USE_MACOSX -DLUA_USE_READLINE" MYLIBS="-lreadline"
105
+
106
+ mingw:
107
+ $(MAKE) "LUA_A=lua51.dll" "LUA_T=lua.exe" \
108
+ "AR=$(CC) -shared -o" "RANLIB=strip --strip-unneeded" \
109
+ "MYCFLAGS=-DLUA_BUILD_AS_DLL" "MYLIBS=" "MYLDFLAGS=-s" lua.exe
110
+ $(MAKE) "LUAC_T=luac.exe" luac.exe
111
+
112
+ posix:
113
+ $(MAKE) all MYCFLAGS=-DLUA_USE_POSIX
114
+
115
+ solaris:
116
+ $(MAKE) all MYCFLAGS="-DLUA_USE_POSIX -DLUA_USE_DLOPEN" MYLIBS="-ldl"
117
+
118
+ # list targets that do not create files (but not all makes understand .PHONY)
119
+ .PHONY: all $(PLATS) default o a clean depend echo none
120
+
121
+ # DO NOT DELETE
122
+
123
+ lapi.o: lapi.c lua.h luaconf.h lapi.h lobject.h llimits.h ldebug.h \
124
+ lstate.h ltm.h lzio.h lmem.h ldo.h lfunc.h lgc.h lstring.h ltable.h \
125
+ lundump.h lvm.h
126
+ lauxlib.o: lauxlib.c lua.h luaconf.h lauxlib.h
127
+ lbaselib.o: lbaselib.c lua.h luaconf.h lauxlib.h lualib.h
128
+ lcode.o: lcode.c lua.h luaconf.h lcode.h llex.h lobject.h llimits.h \
129
+ lzio.h lmem.h lopcodes.h lparser.h ldebug.h lstate.h ltm.h ldo.h lgc.h \
130
+ ltable.h
131
+ ldblib.o: ldblib.c lua.h luaconf.h lauxlib.h lualib.h
132
+ ldebug.o: ldebug.c lua.h luaconf.h lapi.h lobject.h llimits.h lcode.h \
133
+ llex.h lzio.h lmem.h lopcodes.h lparser.h ldebug.h lstate.h ltm.h ldo.h \
134
+ lfunc.h lstring.h lgc.h ltable.h lvm.h
135
+ ldo.o: ldo.c lua.h luaconf.h ldebug.h lstate.h lobject.h llimits.h ltm.h \
136
+ lzio.h lmem.h ldo.h lfunc.h lgc.h lopcodes.h lparser.h lstring.h \
137
+ ltable.h lundump.h lvm.h
138
+ ldump.o: ldump.c lua.h luaconf.h lobject.h llimits.h lstate.h ltm.h \
139
+ lzio.h lmem.h lundump.h
140
+ lfunc.o: lfunc.c lua.h luaconf.h lfunc.h lobject.h llimits.h lgc.h lmem.h \
141
+ lstate.h ltm.h lzio.h
142
+ lgc.o: lgc.c lua.h luaconf.h ldebug.h lstate.h lobject.h llimits.h ltm.h \
143
+ lzio.h lmem.h ldo.h lfunc.h lgc.h lstring.h ltable.h
144
+ linit.o: linit.c lua.h luaconf.h lualib.h lauxlib.h
145
+ liolib.o: liolib.c lua.h luaconf.h lauxlib.h lualib.h
146
+ llex.o: llex.c lua.h luaconf.h ldo.h lobject.h llimits.h lstate.h ltm.h \
147
+ lzio.h lmem.h llex.h lparser.h lstring.h lgc.h ltable.h
148
+ lmathlib.o: lmathlib.c lua.h luaconf.h lauxlib.h lualib.h
149
+ lmem.o: lmem.c lua.h luaconf.h ldebug.h lstate.h lobject.h llimits.h \
150
+ ltm.h lzio.h lmem.h ldo.h
151
+ loadlib.o: loadlib.c lauxlib.h lua.h luaconf.h lobject.h llimits.h \
152
+ lualib.h
153
+ lobject.o: lobject.c lua.h luaconf.h ldo.h lobject.h llimits.h lstate.h \
154
+ ltm.h lzio.h lmem.h lstring.h lgc.h lvm.h
155
+ lopcodes.o: lopcodes.c lopcodes.h llimits.h lua.h luaconf.h
156
+ loslib.o: loslib.c lua.h luaconf.h lauxlib.h lualib.h
157
+ lparser.o: lparser.c lua.h luaconf.h lcode.h llex.h lobject.h llimits.h \
158
+ lzio.h lmem.h lopcodes.h lparser.h ldebug.h lstate.h ltm.h ldo.h \
159
+ lfunc.h lstring.h lgc.h ltable.h
160
+ lstate.o: lstate.c lua.h luaconf.h ldebug.h lstate.h lobject.h llimits.h \
161
+ ltm.h lzio.h lmem.h ldo.h lfunc.h lgc.h llex.h lstring.h ltable.h
162
+ lstring.o: lstring.c lua.h luaconf.h lmem.h llimits.h lobject.h lstate.h \
163
+ ltm.h lzio.h lstring.h lgc.h
164
+ lstrlib.o: lstrlib.c lua.h luaconf.h lauxlib.h lualib.h
165
+ ltable.o: ltable.c lua.h luaconf.h ldebug.h lstate.h lobject.h llimits.h \
166
+ ltm.h lzio.h lmem.h ldo.h lgc.h ltable.h
167
+ ltablib.o: ltablib.c lua.h luaconf.h lauxlib.h lualib.h
168
+ ltm.o: ltm.c lua.h luaconf.h lobject.h llimits.h lstate.h ltm.h lzio.h \
169
+ lmem.h lstring.h lgc.h ltable.h
170
+ lua.o: lua.c lua.h luaconf.h lauxlib.h lualib.h
171
+ luac.o: luac.c lua.h luaconf.h lauxlib.h ldo.h lobject.h llimits.h \
172
+ lstate.h ltm.h lzio.h lmem.h lfunc.h lopcodes.h lstring.h lgc.h \
173
+ lundump.h
174
+ lundump.o: lundump.c lua.h luaconf.h ldebug.h lstate.h lobject.h \
175
+ llimits.h ltm.h lzio.h lmem.h ldo.h lfunc.h lstring.h lgc.h lundump.h
176
+ lvm.o: lvm.c lua.h luaconf.h ldebug.h lstate.h lobject.h llimits.h ltm.h \
177
+ lzio.h lmem.h ldo.h lfunc.h lgc.h lopcodes.h lstring.h ltable.h lvm.h
178
+ lzio.o: lzio.c lua.h luaconf.h llimits.h lmem.h lstate.h lobject.h ltm.h \
179
+ lzio.h
180
+ print.o: print.c ldebug.h lstate.h lua.h luaconf.h lobject.h llimits.h \
181
+ ltm.h lzio.h lmem.h lopcodes.h lundump.h
182
+
183
+ # (end of Makefile)
@@ -0,0 +1,37 @@
1
+ README for Lua 5.1
2
+
3
+ See INSTALL for installation instructions.
4
+ See HISTORY for a summary of changes since the last released version.
5
+
6
+ * What is Lua?
7
+ ------------
8
+ Lua is a powerful, light-weight programming language designed for extending
9
+ applications. Lua is also frequently used as a general-purpose, stand-alone
10
+ language. Lua is free software.
11
+
12
+ For complete information, visit Lua's web site at http://www.lua.org/ .
13
+ For an executive summary, see http://www.lua.org/about.html .
14
+
15
+ Lua has been used in many different projects around the world.
16
+ For a short list, see http://www.lua.org/uses.html .
17
+
18
+ * Availability
19
+ ------------
20
+ Lua is freely available for both academic and commercial purposes.
21
+ See COPYRIGHT and http://www.lua.org/license.html for details.
22
+ Lua can be downloaded at http://www.lua.org/download.html .
23
+
24
+ * Installation
25
+ ------------
26
+ Lua is implemented in pure ANSI C, and compiles unmodified in all known
27
+ platforms that have an ANSI C compiler. In most Unix-like platforms, simply
28
+ do "make" with a suitable target. See INSTALL for detailed instructions.
29
+
30
+ * Origin
31
+ ------
32
+ Lua is developed at Lua.org, a laboratory of the Department of Computer
33
+ Science of PUC-Rio (the Pontifical Catholic University of Rio de Janeiro
34
+ in Brazil).
35
+ For more information about the authors, see http://www.lua.org/authors.html .
36
+
37
+ (end of README)