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
@@ -0,0 +1,499 @@
1
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2
+ <HTML>
3
+ <HEAD>
4
+ <TITLE>Lua 5.1 Reference Manual - contents</TITLE>
5
+ <LINK REL="stylesheet" TYPE="text/css" HREF="lua.css">
6
+ <META HTTP-EQUIV="content-type" CONTENT="text/html; charset=iso-8859-1">
7
+ <STYLE TYPE="text/css">
8
+ ul {
9
+ list-style-type: none ;
10
+ list-style-position: outside ;
11
+ }
12
+ </STYLE>
13
+ </HEAD>
14
+
15
+ <BODY>
16
+
17
+ <HR>
18
+ <H1>
19
+ <A HREF="http://www.lua.org/"><IMG SRC="logo.gif" ALT="" BORDER=0></A>
20
+ Lua 5.1 Reference Manual
21
+ </H1>
22
+
23
+ This is an online version of
24
+ <BLOCKQUOTE>
25
+ <A HREF="http://www.amazon.com/exec/obidos/ASIN/8590379833/lua-indexmanual-20">
26
+ <IMG SRC="cover.png" ALT="" TITLE="buy from Amazon" BORDER=1 ALIGN="left" HSPACE=12>
27
+ </A>
28
+ <B>Lua 5.1 Reference Manual</B>
29
+ <BR>by R. Ierusalimschy, L. H. de Figueiredo, W. Celes
30
+ <BR>Lua.org, August 2006
31
+ <BR>ISBN 85-903798-3-3
32
+ <BR><A HREF="http://www.amazon.com/exec/obidos/ASIN/8590379833/lua-indexmanual-20">
33
+ <IMG SRC="amazon.gif" ALT="[Buy from Amazon]" BORDER=0></A>
34
+ <BR CLEAR="all">
35
+ </BLOCKQUOTE>
36
+ <P>
37
+
38
+ Buy a copy of this book and
39
+ <A HREF="http://www.lua.org/donations.html">help to support</A>
40
+ the Lua project.
41
+ <P>
42
+
43
+ The reference manual is the official definition of the Lua language.
44
+ For a complete introduction to Lua programming, see the book
45
+ <A HREF="http://www.lua.org/docs.html#books">Programming in Lua</A>.
46
+ <P>
47
+
48
+ <A HREF="manual.html">start</A>
49
+ &middot;
50
+ <A HREF="#contents">contents</A>
51
+ &middot;
52
+ <A HREF="#index">index</A>
53
+ &middot;
54
+ <A HREF="http://www.lua.org/manual/5.1/pt/">portugu�s</A>
55
+ &middot;
56
+ <A HREF="http://www.lua.org/manual/5.1/es/">espa�ol</A>
57
+ <HR>
58
+ <SMALL>
59
+ Copyright &copy; 2006-2008 Lua.org, PUC-Rio.
60
+ Freely available under the terms of the
61
+ <a href="http://www.lua.org/license.html#5">Lua license</a>.
62
+ </SMALL>
63
+ <P>
64
+
65
+ <H2><A NAME="contents">Contents</A></H2>
66
+ <UL style="padding: 0">
67
+ <LI><A HREF="manual.html">1 - Introduction</A>
68
+ <P>
69
+ <LI><A HREF="manual.html#2">2 - The Language</A>
70
+ <UL>
71
+ <LI><A HREF="manual.html#2.1">2.1 - Lexical Conventions</A>
72
+ <LI><A HREF="manual.html#2.2">2.2 - Values and Types</A>
73
+ <UL>
74
+ <LI><A HREF="manual.html#2.2.1">2.2.1 - Coercion</A>
75
+ </UL>
76
+ <LI><A HREF="manual.html#2.3">2.3 - Variables</A>
77
+ <LI><A HREF="manual.html#2.4">2.4 - Statements</A>
78
+ <UL>
79
+ <LI><A HREF="manual.html#2.4.1">2.4.1 - Chunks</A>
80
+ <LI><A HREF="manual.html#2.4.2">2.4.2 - Blocks</A>
81
+ <LI><A HREF="manual.html#2.4.3">2.4.3 - Assignment</A>
82
+ <LI><A HREF="manual.html#2.4.4">2.4.4 - Control Structures</A>
83
+ <LI><A HREF="manual.html#2.4.5">2.4.5 - For Statement</A>
84
+ <LI><A HREF="manual.html#2.4.6">2.4.6 - Function Calls as Statements</A>
85
+ <LI><A HREF="manual.html#2.4.7">2.4.7 - Local Declarations</A>
86
+ </UL>
87
+ <LI><A HREF="manual.html#2.5">2.5 - Expressions</A>
88
+ <UL>
89
+ <LI><A HREF="manual.html#2.5.1">2.5.1 - Arithmetic Operators</A>
90
+ <LI><A HREF="manual.html#2.5.2">2.5.2 - Relational Operators</A>
91
+ <LI><A HREF="manual.html#2.5.3">2.5.3 - Logical Operators</A>
92
+ <LI><A HREF="manual.html#2.5.4">2.5.4 - Concatenation</A>
93
+ <LI><A HREF="manual.html#2.5.5">2.5.5 - The Length Operator</A>
94
+ <LI><A HREF="manual.html#2.5.6">2.5.6 - Precedence</A>
95
+ <LI><A HREF="manual.html#2.5.7">2.5.7 - Table Constructors</A>
96
+ <LI><A HREF="manual.html#2.5.8">2.5.8 - Function Calls</A>
97
+ <LI><A HREF="manual.html#2.5.9">2.5.9 - Function Definitions</A>
98
+ </UL>
99
+ <LI><A HREF="manual.html#2.6">2.6 - Visibility Rules</A>
100
+ <LI><A HREF="manual.html#2.7">2.7 - Error Handling</A>
101
+ <LI><A HREF="manual.html#2.8">2.8 - Metatables</A>
102
+ <LI><A HREF="manual.html#2.9">2.9 - Environments</A>
103
+ <LI><A HREF="manual.html#2.10">2.10 - Garbage Collection</A>
104
+ <UL>
105
+ <LI><A HREF="manual.html#2.10.1">2.10.1 - Garbage-Collection Metamethods</A>
106
+ <LI><A HREF="manual.html#2.10.2">2.10.2 - Weak Tables</A>
107
+ </UL>
108
+ <LI><A HREF="manual.html#2.11">2.11 - Coroutines</A>
109
+ </UL>
110
+ <P>
111
+ <LI><A HREF="manual.html#3">3 - The Application Program Interface</A>
112
+ <UL>
113
+ <LI><A HREF="manual.html#3.1">3.1 - The Stack</A>
114
+ <LI><A HREF="manual.html#3.2">3.2 - Stack Size</A>
115
+ <LI><A HREF="manual.html#3.3">3.3 - Pseudo-Indices</A>
116
+ <LI><A HREF="manual.html#3.4">3.4 - C Closures</A>
117
+ <LI><A HREF="manual.html#3.5">3.5 - Registry</A>
118
+ <LI><A HREF="manual.html#3.6">3.6 - Error Handling in C</A>
119
+ <LI><A HREF="manual.html#3.7">3.7 - Functions and Types</A>
120
+ <LI><A HREF="manual.html#3.8">3.8 - The Debug Interface</A>
121
+ </UL>
122
+ <P>
123
+ <LI><A HREF="manual.html#4">4 - The Auxiliary Library</A>
124
+ <UL>
125
+ <LI><A HREF="manual.html#4.1">4.1 - Functions and Types</A>
126
+ </UL>
127
+ <P>
128
+ <LI><A HREF="manual.html#5">5 - Standard Libraries</A>
129
+ <UL>
130
+ <LI><A HREF="manual.html#5.1">5.1 - Basic Functions</A>
131
+ <LI><A HREF="manual.html#5.2">5.2 - Coroutine Manipulation</A>
132
+ <LI><A HREF="manual.html#5.3">5.3 - Modules</A>
133
+ <LI><A HREF="manual.html#5.4">5.4 - String Manipulation</A>
134
+ <UL>
135
+ <LI><A HREF="manual.html#5.4.1">5.4.1 - Patterns</A>
136
+ </UL>
137
+ <LI><A HREF="manual.html#5.5">5.5 - Table Manipulation</A>
138
+ <LI><A HREF="manual.html#5.6">5.6 - Mathematical Functions</A>
139
+ <LI><A HREF="manual.html#5.7">5.7 - Input and Output Facilities</A>
140
+ <LI><A HREF="manual.html#5.8">5.8 - Operating System Facilities</A>
141
+ <LI><A HREF="manual.html#5.9">5.9 - The Debug Library</A>
142
+ </UL>
143
+ <P>
144
+ <LI><A HREF="manual.html#6">6 - Lua Stand-alone</A>
145
+ <P>
146
+ <LI><A HREF="manual.html#7">7 - Incompatibilities with the Previous Version</A>
147
+ <UL>
148
+ <LI><A HREF="manual.html#7.1">7.1 - Changes in the Language</A>
149
+ <LI><A HREF="manual.html#7.2">7.2 - Changes in the Libraries</A>
150
+ <LI><A HREF="manual.html#7.3">7.3 - Changes in the API</A>
151
+ </UL>
152
+ <P>
153
+ <LI><A HREF="manual.html#8">8 - The Complete Syntax of Lua</A>
154
+ </UL>
155
+
156
+ <H2><A NAME="index">Index</A></H2>
157
+ <TABLE WIDTH="100%">
158
+ <TR VALIGN="top">
159
+ <TD>
160
+ <H3><A NAME="functions">Lua functions</A></H3>
161
+ <A HREF="manual.html#pdf-_G">_G</A><BR>
162
+ <A HREF="manual.html#pdf-_VERSION">_VERSION</A><BR>
163
+ <A HREF="manual.html#pdf-assert">assert</A><BR>
164
+ <A HREF="manual.html#pdf-collectgarbage">collectgarbage</A><BR>
165
+ <A HREF="manual.html#pdf-dofile">dofile</A><BR>
166
+ <A HREF="manual.html#pdf-error">error</A><BR>
167
+ <A HREF="manual.html#pdf-getfenv">getfenv</A><BR>
168
+ <A HREF="manual.html#pdf-getmetatable">getmetatable</A><BR>
169
+ <A HREF="manual.html#pdf-ipairs">ipairs</A><BR>
170
+ <A HREF="manual.html#pdf-load">load</A><BR>
171
+ <A HREF="manual.html#pdf-loadfile">loadfile</A><BR>
172
+ <A HREF="manual.html#pdf-loadstring">loadstring</A><BR>
173
+ <A HREF="manual.html#pdf-module">module</A><BR>
174
+ <A HREF="manual.html#pdf-next">next</A><BR>
175
+ <A HREF="manual.html#pdf-pairs">pairs</A><BR>
176
+ <A HREF="manual.html#pdf-pcall">pcall</A><BR>
177
+ <A HREF="manual.html#pdf-print">print</A><BR>
178
+ <A HREF="manual.html#pdf-rawequal">rawequal</A><BR>
179
+ <A HREF="manual.html#pdf-rawget">rawget</A><BR>
180
+ <A HREF="manual.html#pdf-rawset">rawset</A><BR>
181
+ <A HREF="manual.html#pdf-require">require</A><BR>
182
+ <A HREF="manual.html#pdf-select">select</A><BR>
183
+ <A HREF="manual.html#pdf-setfenv">setfenv</A><BR>
184
+ <A HREF="manual.html#pdf-setmetatable">setmetatable</A><BR>
185
+ <A HREF="manual.html#pdf-tonumber">tonumber</A><BR>
186
+ <A HREF="manual.html#pdf-tostring">tostring</A><BR>
187
+ <A HREF="manual.html#pdf-type">type</A><BR>
188
+ <A HREF="manual.html#pdf-unpack">unpack</A><BR>
189
+ <A HREF="manual.html#pdf-xpcall">xpcall</A><BR>
190
+ <P>
191
+
192
+ <A HREF="manual.html#pdf-coroutine.create">coroutine.create</A><BR>
193
+ <A HREF="manual.html#pdf-coroutine.resume">coroutine.resume</A><BR>
194
+ <A HREF="manual.html#pdf-coroutine.running">coroutine.running</A><BR>
195
+ <A HREF="manual.html#pdf-coroutine.status">coroutine.status</A><BR>
196
+ <A HREF="manual.html#pdf-coroutine.wrap">coroutine.wrap</A><BR>
197
+ <A HREF="manual.html#pdf-coroutine.yield">coroutine.yield</A><BR>
198
+ <P>
199
+
200
+ <A HREF="manual.html#pdf-debug.debug">debug.debug</A><BR>
201
+ <A HREF="manual.html#pdf-debug.getfenv">debug.getfenv</A><BR>
202
+ <A HREF="manual.html#pdf-debug.gethook">debug.gethook</A><BR>
203
+ <A HREF="manual.html#pdf-debug.getinfo">debug.getinfo</A><BR>
204
+ <A HREF="manual.html#pdf-debug.getlocal">debug.getlocal</A><BR>
205
+ <A HREF="manual.html#pdf-debug.getmetatable">debug.getmetatable</A><BR>
206
+ <A HREF="manual.html#pdf-debug.getregistry">debug.getregistry</A><BR>
207
+ <A HREF="manual.html#pdf-debug.getupvalue">debug.getupvalue</A><BR>
208
+ <A HREF="manual.html#pdf-debug.setfenv">debug.setfenv</A><BR>
209
+ <A HREF="manual.html#pdf-debug.sethook">debug.sethook</A><BR>
210
+ <A HREF="manual.html#pdf-debug.setlocal">debug.setlocal</A><BR>
211
+ <A HREF="manual.html#pdf-debug.setmetatable">debug.setmetatable</A><BR>
212
+ <A HREF="manual.html#pdf-debug.setupvalue">debug.setupvalue</A><BR>
213
+ <A HREF="manual.html#pdf-debug.traceback">debug.traceback</A><BR>
214
+
215
+ </TD>
216
+ <TD>
217
+ <H3>&nbsp;</H3>
218
+ <A HREF="manual.html#pdf-file:close">file:close</A><BR>
219
+ <A HREF="manual.html#pdf-file:flush">file:flush</A><BR>
220
+ <A HREF="manual.html#pdf-file:lines">file:lines</A><BR>
221
+ <A HREF="manual.html#pdf-file:read">file:read</A><BR>
222
+ <A HREF="manual.html#pdf-file:seek">file:seek</A><BR>
223
+ <A HREF="manual.html#pdf-file:setvbuf">file:setvbuf</A><BR>
224
+ <A HREF="manual.html#pdf-file:write">file:write</A><BR>
225
+ <P>
226
+
227
+ <A HREF="manual.html#pdf-io.close">io.close</A><BR>
228
+ <A HREF="manual.html#pdf-io.flush">io.flush</A><BR>
229
+ <A HREF="manual.html#pdf-io.input">io.input</A><BR>
230
+ <A HREF="manual.html#pdf-io.lines">io.lines</A><BR>
231
+ <A HREF="manual.html#pdf-io.open">io.open</A><BR>
232
+ <A HREF="manual.html#pdf-io.output">io.output</A><BR>
233
+ <A HREF="manual.html#pdf-io.popen">io.popen</A><BR>
234
+ <A HREF="manual.html#pdf-io.read">io.read</A><BR>
235
+ <A HREF="manual.html#pdf-io.stderr">io.stderr</A><BR>
236
+ <A HREF="manual.html#pdf-io.stdin">io.stdin</A><BR>
237
+ <A HREF="manual.html#pdf-io.stdout">io.stdout</A><BR>
238
+ <A HREF="manual.html#pdf-io.tmpfile">io.tmpfile</A><BR>
239
+ <A HREF="manual.html#pdf-io.type">io.type</A><BR>
240
+ <A HREF="manual.html#pdf-io.write">io.write</A><BR>
241
+ <P>
242
+
243
+ <A HREF="manual.html#pdf-math.abs">math.abs</A><BR>
244
+ <A HREF="manual.html#pdf-math.acos">math.acos</A><BR>
245
+ <A HREF="manual.html#pdf-math.asin">math.asin</A><BR>
246
+ <A HREF="manual.html#pdf-math.atan">math.atan</A><BR>
247
+ <A HREF="manual.html#pdf-math.atan2">math.atan2</A><BR>
248
+ <A HREF="manual.html#pdf-math.ceil">math.ceil</A><BR>
249
+ <A HREF="manual.html#pdf-math.cos">math.cos</A><BR>
250
+ <A HREF="manual.html#pdf-math.cosh">math.cosh</A><BR>
251
+ <A HREF="manual.html#pdf-math.deg">math.deg</A><BR>
252
+ <A HREF="manual.html#pdf-math.exp">math.exp</A><BR>
253
+ <A HREF="manual.html#pdf-math.floor">math.floor</A><BR>
254
+ <A HREF="manual.html#pdf-math.fmod">math.fmod</A><BR>
255
+ <A HREF="manual.html#pdf-math.frexp">math.frexp</A><BR>
256
+ <A HREF="manual.html#pdf-math.huge">math.huge</A><BR>
257
+ <A HREF="manual.html#pdf-math.ldexp">math.ldexp</A><BR>
258
+ <A HREF="manual.html#pdf-math.log">math.log</A><BR>
259
+ <A HREF="manual.html#pdf-math.log10">math.log10</A><BR>
260
+ <A HREF="manual.html#pdf-math.max">math.max</A><BR>
261
+ <A HREF="manual.html#pdf-math.min">math.min</A><BR>
262
+ <A HREF="manual.html#pdf-math.modf">math.modf</A><BR>
263
+ <A HREF="manual.html#pdf-math.pi">math.pi</A><BR>
264
+ <A HREF="manual.html#pdf-math.pow">math.pow</A><BR>
265
+ <A HREF="manual.html#pdf-math.rad">math.rad</A><BR>
266
+ <A HREF="manual.html#pdf-math.random">math.random</A><BR>
267
+ <A HREF="manual.html#pdf-math.randomseed">math.randomseed</A><BR>
268
+ <A HREF="manual.html#pdf-math.sin">math.sin</A><BR>
269
+ <A HREF="manual.html#pdf-math.sinh">math.sinh</A><BR>
270
+ <A HREF="manual.html#pdf-math.sqrt">math.sqrt</A><BR>
271
+ <A HREF="manual.html#pdf-math.tan">math.tan</A><BR>
272
+ <A HREF="manual.html#pdf-math.tanh">math.tanh</A><BR>
273
+ <P>
274
+
275
+ <A HREF="manual.html#pdf-os.clock">os.clock</A><BR>
276
+ <A HREF="manual.html#pdf-os.date">os.date</A><BR>
277
+ <A HREF="manual.html#pdf-os.difftime">os.difftime</A><BR>
278
+ <A HREF="manual.html#pdf-os.execute">os.execute</A><BR>
279
+ <A HREF="manual.html#pdf-os.exit">os.exit</A><BR>
280
+ <A HREF="manual.html#pdf-os.getenv">os.getenv</A><BR>
281
+ <A HREF="manual.html#pdf-os.remove">os.remove</A><BR>
282
+ <A HREF="manual.html#pdf-os.rename">os.rename</A><BR>
283
+ <A HREF="manual.html#pdf-os.setlocale">os.setlocale</A><BR>
284
+ <A HREF="manual.html#pdf-os.time">os.time</A><BR>
285
+ <A HREF="manual.html#pdf-os.tmpname">os.tmpname</A><BR>
286
+ <P>
287
+
288
+ <A HREF="manual.html#pdf-package.cpath">package.cpath</A><BR>
289
+ <A HREF="manual.html#pdf-package.loaded">package.loaded</A><BR>
290
+ <A HREF="manual.html#pdf-package.loaders">package.loaders</A><BR>
291
+ <A HREF="manual.html#pdf-package.loadlib">package.loadlib</A><BR>
292
+ <A HREF="manual.html#pdf-package.path">package.path</A><BR>
293
+ <A HREF="manual.html#pdf-package.preload">package.preload</A><BR>
294
+ <A HREF="manual.html#pdf-package.seeall">package.seeall</A><BR>
295
+ <P>
296
+
297
+ <A HREF="manual.html#pdf-string.byte">string.byte</A><BR>
298
+ <A HREF="manual.html#pdf-string.char">string.char</A><BR>
299
+ <A HREF="manual.html#pdf-string.dump">string.dump</A><BR>
300
+ <A HREF="manual.html#pdf-string.find">string.find</A><BR>
301
+ <A HREF="manual.html#pdf-string.format">string.format</A><BR>
302
+ <A HREF="manual.html#pdf-string.gmatch">string.gmatch</A><BR>
303
+ <A HREF="manual.html#pdf-string.gsub">string.gsub</A><BR>
304
+ <A HREF="manual.html#pdf-string.len">string.len</A><BR>
305
+ <A HREF="manual.html#pdf-string.lower">string.lower</A><BR>
306
+ <A HREF="manual.html#pdf-string.match">string.match</A><BR>
307
+ <A HREF="manual.html#pdf-string.rep">string.rep</A><BR>
308
+ <A HREF="manual.html#pdf-string.reverse">string.reverse</A><BR>
309
+ <A HREF="manual.html#pdf-string.sub">string.sub</A><BR>
310
+ <A HREF="manual.html#pdf-string.upper">string.upper</A><BR>
311
+ <P>
312
+
313
+ <A HREF="manual.html#pdf-table.concat">table.concat</A><BR>
314
+ <A HREF="manual.html#pdf-table.insert">table.insert</A><BR>
315
+ <A HREF="manual.html#pdf-table.maxn">table.maxn</A><BR>
316
+ <A HREF="manual.html#pdf-table.remove">table.remove</A><BR>
317
+ <A HREF="manual.html#pdf-table.sort">table.sort</A><BR>
318
+
319
+ </TD>
320
+ <TD>
321
+ <H3>C API</H3>
322
+ <A HREF="manual.html#lua_Alloc">lua_Alloc</A><BR>
323
+ <A HREF="manual.html#lua_CFunction">lua_CFunction</A><BR>
324
+ <A HREF="manual.html#lua_Debug">lua_Debug</A><BR>
325
+ <A HREF="manual.html#lua_Hook">lua_Hook</A><BR>
326
+ <A HREF="manual.html#lua_Integer">lua_Integer</A><BR>
327
+ <A HREF="manual.html#lua_Number">lua_Number</A><BR>
328
+ <A HREF="manual.html#lua_Reader">lua_Reader</A><BR>
329
+ <A HREF="manual.html#lua_State">lua_State</A><BR>
330
+ <A HREF="manual.html#lua_Writer">lua_Writer</A><BR>
331
+ <P>
332
+
333
+ <A HREF="manual.html#lua_atpanic">lua_atpanic</A><BR>
334
+ <A HREF="manual.html#lua_call">lua_call</A><BR>
335
+ <A HREF="manual.html#lua_checkstack">lua_checkstack</A><BR>
336
+ <A HREF="manual.html#lua_close">lua_close</A><BR>
337
+ <A HREF="manual.html#lua_concat">lua_concat</A><BR>
338
+ <A HREF="manual.html#lua_cpcall">lua_cpcall</A><BR>
339
+ <A HREF="manual.html#lua_createtable">lua_createtable</A><BR>
340
+ <A HREF="manual.html#lua_dump">lua_dump</A><BR>
341
+ <A HREF="manual.html#lua_equal">lua_equal</A><BR>
342
+ <A HREF="manual.html#lua_error">lua_error</A><BR>
343
+ <A HREF="manual.html#lua_gc">lua_gc</A><BR>
344
+ <A HREF="manual.html#lua_getallocf">lua_getallocf</A><BR>
345
+ <A HREF="manual.html#lua_getfenv">lua_getfenv</A><BR>
346
+ <A HREF="manual.html#lua_getfield">lua_getfield</A><BR>
347
+ <A HREF="manual.html#lua_getglobal">lua_getglobal</A><BR>
348
+ <A HREF="manual.html#lua_gethook">lua_gethook</A><BR>
349
+ <A HREF="manual.html#lua_gethookcount">lua_gethookcount</A><BR>
350
+ <A HREF="manual.html#lua_gethookmask">lua_gethookmask</A><BR>
351
+ <A HREF="manual.html#lua_getinfo">lua_getinfo</A><BR>
352
+ <A HREF="manual.html#lua_getlocal">lua_getlocal</A><BR>
353
+ <A HREF="manual.html#lua_getmetatable">lua_getmetatable</A><BR>
354
+ <A HREF="manual.html#lua_getstack">lua_getstack</A><BR>
355
+ <A HREF="manual.html#lua_gettable">lua_gettable</A><BR>
356
+ <A HREF="manual.html#lua_gettop">lua_gettop</A><BR>
357
+ <A HREF="manual.html#lua_getupvalue">lua_getupvalue</A><BR>
358
+ <A HREF="manual.html#lua_insert">lua_insert</A><BR>
359
+ <A HREF="manual.html#lua_isboolean">lua_isboolean</A><BR>
360
+ <A HREF="manual.html#lua_iscfunction">lua_iscfunction</A><BR>
361
+ <A HREF="manual.html#lua_isfunction">lua_isfunction</A><BR>
362
+ <A HREF="manual.html#lua_islightuserdata">lua_islightuserdata</A><BR>
363
+ <A HREF="manual.html#lua_isnil">lua_isnil</A><BR>
364
+ <A HREF="manual.html#lua_isnone">lua_isnone</A><BR>
365
+ <A HREF="manual.html#lua_isnoneornil">lua_isnoneornil</A><BR>
366
+ <A HREF="manual.html#lua_isnumber">lua_isnumber</A><BR>
367
+ <A HREF="manual.html#lua_isstring">lua_isstring</A><BR>
368
+ <A HREF="manual.html#lua_istable">lua_istable</A><BR>
369
+ <A HREF="manual.html#lua_isthread">lua_isthread</A><BR>
370
+ <A HREF="manual.html#lua_isuserdata">lua_isuserdata</A><BR>
371
+ <A HREF="manual.html#lua_lessthan">lua_lessthan</A><BR>
372
+ <A HREF="manual.html#lua_load">lua_load</A><BR>
373
+ <A HREF="manual.html#lua_newstate">lua_newstate</A><BR>
374
+ <A HREF="manual.html#lua_newtable">lua_newtable</A><BR>
375
+ <A HREF="manual.html#lua_newthread">lua_newthread</A><BR>
376
+ <A HREF="manual.html#lua_newuserdata">lua_newuserdata</A><BR>
377
+ <A HREF="manual.html#lua_next">lua_next</A><BR>
378
+ <A HREF="manual.html#lua_objlen">lua_objlen</A><BR>
379
+ <A HREF="manual.html#lua_pcall">lua_pcall</A><BR>
380
+ <A HREF="manual.html#lua_pop">lua_pop</A><BR>
381
+ <A HREF="manual.html#lua_pushboolean">lua_pushboolean</A><BR>
382
+ <A HREF="manual.html#lua_pushcclosure">lua_pushcclosure</A><BR>
383
+ <A HREF="manual.html#lua_pushcfunction">lua_pushcfunction</A><BR>
384
+ <A HREF="manual.html#lua_pushfstring">lua_pushfstring</A><BR>
385
+ <A HREF="manual.html#lua_pushinteger">lua_pushinteger</A><BR>
386
+ <A HREF="manual.html#lua_pushlightuserdata">lua_pushlightuserdata</A><BR>
387
+ <A HREF="manual.html#lua_pushliteral">lua_pushliteral</A><BR>
388
+ <A HREF="manual.html#lua_pushlstring">lua_pushlstring</A><BR>
389
+ <A HREF="manual.html#lua_pushnil">lua_pushnil</A><BR>
390
+ <A HREF="manual.html#lua_pushnumber">lua_pushnumber</A><BR>
391
+ <A HREF="manual.html#lua_pushstring">lua_pushstring</A><BR>
392
+ <A HREF="manual.html#lua_pushthread">lua_pushthread</A><BR>
393
+ <A HREF="manual.html#lua_pushvalue">lua_pushvalue</A><BR>
394
+ <A HREF="manual.html#lua_pushvfstring">lua_pushvfstring</A><BR>
395
+ <A HREF="manual.html#lua_rawequal">lua_rawequal</A><BR>
396
+ <A HREF="manual.html#lua_rawget">lua_rawget</A><BR>
397
+ <A HREF="manual.html#lua_rawgeti">lua_rawgeti</A><BR>
398
+ <A HREF="manual.html#lua_rawset">lua_rawset</A><BR>
399
+ <A HREF="manual.html#lua_rawseti">lua_rawseti</A><BR>
400
+ <A HREF="manual.html#lua_register">lua_register</A><BR>
401
+ <A HREF="manual.html#lua_remove">lua_remove</A><BR>
402
+ <A HREF="manual.html#lua_replace">lua_replace</A><BR>
403
+ <A HREF="manual.html#lua_resume">lua_resume</A><BR>
404
+ <A HREF="manual.html#lua_setallocf">lua_setallocf</A><BR>
405
+ <A HREF="manual.html#lua_setfenv">lua_setfenv</A><BR>
406
+ <A HREF="manual.html#lua_setfield">lua_setfield</A><BR>
407
+ <A HREF="manual.html#lua_setglobal">lua_setglobal</A><BR>
408
+ <A HREF="manual.html#lua_sethook">lua_sethook</A><BR>
409
+ <A HREF="manual.html#lua_setlocal">lua_setlocal</A><BR>
410
+ <A HREF="manual.html#lua_setmetatable">lua_setmetatable</A><BR>
411
+ <A HREF="manual.html#lua_settable">lua_settable</A><BR>
412
+ <A HREF="manual.html#lua_settop">lua_settop</A><BR>
413
+ <A HREF="manual.html#lua_setupvalue">lua_setupvalue</A><BR>
414
+ <A HREF="manual.html#lua_status">lua_status</A><BR>
415
+ <A HREF="manual.html#lua_toboolean">lua_toboolean</A><BR>
416
+ <A HREF="manual.html#lua_tocfunction">lua_tocfunction</A><BR>
417
+ <A HREF="manual.html#lua_tointeger">lua_tointeger</A><BR>
418
+ <A HREF="manual.html#lua_tolstring">lua_tolstring</A><BR>
419
+ <A HREF="manual.html#lua_tonumber">lua_tonumber</A><BR>
420
+ <A HREF="manual.html#lua_topointer">lua_topointer</A><BR>
421
+ <A HREF="manual.html#lua_tostring">lua_tostring</A><BR>
422
+ <A HREF="manual.html#lua_tothread">lua_tothread</A><BR>
423
+ <A HREF="manual.html#lua_touserdata">lua_touserdata</A><BR>
424
+ <A HREF="manual.html#lua_type">lua_type</A><BR>
425
+ <A HREF="manual.html#lua_typename">lua_typename</A><BR>
426
+ <A HREF="manual.html#lua_upvalueindex">lua_upvalueindex</A><BR>
427
+ <A HREF="manual.html#lua_xmove">lua_xmove</A><BR>
428
+ <A HREF="manual.html#lua_yield">lua_yield</A><BR>
429
+
430
+ </TD>
431
+ <TD>
432
+ <H3>auxiliary library</H3>
433
+ <A HREF="manual.html#luaL_Buffer">luaL_Buffer</A><BR>
434
+ <A HREF="manual.html#luaL_Reg">luaL_Reg</A><BR>
435
+ <P>
436
+
437
+ <A HREF="manual.html#luaL_addchar">luaL_addchar</A><BR>
438
+ <A HREF="manual.html#luaL_addlstring">luaL_addlstring</A><BR>
439
+ <A HREF="manual.html#luaL_addsize">luaL_addsize</A><BR>
440
+ <A HREF="manual.html#luaL_addstring">luaL_addstring</A><BR>
441
+ <A HREF="manual.html#luaL_addvalue">luaL_addvalue</A><BR>
442
+ <A HREF="manual.html#luaL_argcheck">luaL_argcheck</A><BR>
443
+ <A HREF="manual.html#luaL_argerror">luaL_argerror</A><BR>
444
+ <A HREF="manual.html#luaL_buffinit">luaL_buffinit</A><BR>
445
+ <A HREF="manual.html#luaL_callmeta">luaL_callmeta</A><BR>
446
+ <A HREF="manual.html#luaL_checkany">luaL_checkany</A><BR>
447
+ <A HREF="manual.html#luaL_checkint">luaL_checkint</A><BR>
448
+ <A HREF="manual.html#luaL_checkinteger">luaL_checkinteger</A><BR>
449
+ <A HREF="manual.html#luaL_checklong">luaL_checklong</A><BR>
450
+ <A HREF="manual.html#luaL_checklstring">luaL_checklstring</A><BR>
451
+ <A HREF="manual.html#luaL_checknumber">luaL_checknumber</A><BR>
452
+ <A HREF="manual.html#luaL_checkoption">luaL_checkoption</A><BR>
453
+ <A HREF="manual.html#luaL_checkstack">luaL_checkstack</A><BR>
454
+ <A HREF="manual.html#luaL_checkstring">luaL_checkstring</A><BR>
455
+ <A HREF="manual.html#luaL_checktype">luaL_checktype</A><BR>
456
+ <A HREF="manual.html#luaL_checkudata">luaL_checkudata</A><BR>
457
+ <A HREF="manual.html#luaL_dofile">luaL_dofile</A><BR>
458
+ <A HREF="manual.html#luaL_dostring">luaL_dostring</A><BR>
459
+ <A HREF="manual.html#luaL_error">luaL_error</A><BR>
460
+ <A HREF="manual.html#luaL_getmetafield">luaL_getmetafield</A><BR>
461
+ <A HREF="manual.html#luaL_getmetatable">luaL_getmetatable</A><BR>
462
+ <A HREF="manual.html#luaL_gsub">luaL_gsub</A><BR>
463
+ <A HREF="manual.html#luaL_loadbuffer">luaL_loadbuffer</A><BR>
464
+ <A HREF="manual.html#luaL_loadfile">luaL_loadfile</A><BR>
465
+ <A HREF="manual.html#luaL_loadstring">luaL_loadstring</A><BR>
466
+ <A HREF="manual.html#luaL_newmetatable">luaL_newmetatable</A><BR>
467
+ <A HREF="manual.html#luaL_newstate">luaL_newstate</A><BR>
468
+ <A HREF="manual.html#luaL_openlibs">luaL_openlibs</A><BR>
469
+ <A HREF="manual.html#luaL_optint">luaL_optint</A><BR>
470
+ <A HREF="manual.html#luaL_optinteger">luaL_optinteger</A><BR>
471
+ <A HREF="manual.html#luaL_optlong">luaL_optlong</A><BR>
472
+ <A HREF="manual.html#luaL_optlstring">luaL_optlstring</A><BR>
473
+ <A HREF="manual.html#luaL_optnumber">luaL_optnumber</A><BR>
474
+ <A HREF="manual.html#luaL_optstring">luaL_optstring</A><BR>
475
+ <A HREF="manual.html#luaL_prepbuffer">luaL_prepbuffer</A><BR>
476
+ <A HREF="manual.html#luaL_pushresult">luaL_pushresult</A><BR>
477
+ <A HREF="manual.html#luaL_ref">luaL_ref</A><BR>
478
+ <A HREF="manual.html#luaL_register">luaL_register</A><BR>
479
+ <A HREF="manual.html#luaL_typename">luaL_typename</A><BR>
480
+ <A HREF="manual.html#luaL_typerror">luaL_typerror</A><BR>
481
+ <A HREF="manual.html#luaL_unref">luaL_unref</A><BR>
482
+ <A HREF="manual.html#luaL_where">luaL_where</A><BR>
483
+
484
+ </TD>
485
+ </TR>
486
+ </TABLE>
487
+ <P>
488
+
489
+ <HR>
490
+ <SMALL>
491
+ Last update:
492
+ Sat Jan 19 13:24:29 BRST 2008
493
+ </SMALL>
494
+ <!--
495
+ Last change: revised for Lua 5.1.3
496
+ -->
497
+
498
+ </BODY>
499
+ </HTML>
Binary file
Binary file
data/src/lua/doc/lua.1 ADDED
@@ -0,0 +1,163 @@
1
+ .\" $Id: lua.man,v 1.11 2006/01/06 16:03:34 lhf Exp $
2
+ .TH LUA 1 "$Date: 2006/01/06 16:03:34 $"
3
+ .SH NAME
4
+ lua \- Lua interpreter
5
+ .SH SYNOPSIS
6
+ .B lua
7
+ [
8
+ .I options
9
+ ]
10
+ [
11
+ .I script
12
+ [
13
+ .I args
14
+ ]
15
+ ]
16
+ .SH DESCRIPTION
17
+ .B lua
18
+ is the stand-alone Lua interpreter.
19
+ It loads and executes Lua programs,
20
+ either in textual source form or
21
+ in precompiled binary form.
22
+ (Precompiled binaries are output by
23
+ .BR luac ,
24
+ the Lua compiler.)
25
+ .B lua
26
+ can be used as a batch interpreter and also interactively.
27
+ .LP
28
+ The given
29
+ .I options
30
+ (see below)
31
+ are executed and then
32
+ the Lua program in file
33
+ .I script
34
+ is loaded and executed.
35
+ The given
36
+ .I args
37
+ are available to
38
+ .I script
39
+ as strings in a global table named
40
+ .BR arg .
41
+ If these arguments contain spaces or other characters special to the shell,
42
+ then they should be quoted
43
+ (but note that the quotes will be removed by the shell).
44
+ The arguments in
45
+ .B arg
46
+ start at 0,
47
+ which contains the string
48
+ .RI ' script '.
49
+ The index of the last argument is stored in
50
+ .BR arg.n .
51
+ The arguments given in the command line before
52
+ .IR script ,
53
+ including the name of the interpreter,
54
+ are available in negative indices in
55
+ .BR arg .
56
+ .LP
57
+ At the very start,
58
+ before even handling the command line,
59
+ .B lua
60
+ executes the contents of the environment variable
61
+ .BR LUA_INIT ,
62
+ if it is defined.
63
+ If the value of
64
+ .B LUA_INIT
65
+ is of the form
66
+ .RI '@ filename ',
67
+ then
68
+ .I filename
69
+ is executed.
70
+ Otherwise, the string is assumed to be a Lua statement and is executed.
71
+ .LP
72
+ Options start with
73
+ .B '\-'
74
+ and are described below.
75
+ You can use
76
+ .B "'\--'"
77
+ to signal the end of options.
78
+ .LP
79
+ If no arguments are given,
80
+ then
81
+ .B "\-v \-i"
82
+ is assumed when the standard input is a terminal;
83
+ otherwise,
84
+ .B "\-"
85
+ is assumed.
86
+ .LP
87
+ In interactive mode,
88
+ .B lua
89
+ prompts the user,
90
+ reads lines from the standard input,
91
+ and executes them as they are read.
92
+ If a line does not contain a complete statement,
93
+ then a secondary prompt is displayed and
94
+ lines are read until a complete statement is formed or
95
+ a syntax error is found.
96
+ So, one way to interrupt the reading of an incomplete statement is
97
+ to force a syntax error:
98
+ adding a
99
+ .B ';'
100
+ in the middle of a statement is a sure way of forcing a syntax error
101
+ (except inside multiline strings and comments; these must be closed explicitly).
102
+ If a line starts with
103
+ .BR '=' ,
104
+ then
105
+ .B lua
106
+ displays the values of all the expressions in the remainder of the
107
+ line. The expressions must be separated by commas.
108
+ The primary prompt is the value of the global variable
109
+ .BR _PROMPT ,
110
+ if this value is a string;
111
+ otherwise, the default prompt is used.
112
+ Similarly, the secondary prompt is the value of the global variable
113
+ .BR _PROMPT2 .
114
+ So,
115
+ to change the prompts,
116
+ set the corresponding variable to a string of your choice.
117
+ You can do that after calling the interpreter
118
+ or on the command line
119
+ (but in this case you have to be careful with quotes
120
+ if the prompt string contains a space; otherwise you may confuse the shell.)
121
+ The default prompts are "> " and ">> ".
122
+ .SH OPTIONS
123
+ .TP
124
+ .B \-
125
+ load and execute the standard input as a file,
126
+ that is,
127
+ not interactively,
128
+ even when the standard input is a terminal.
129
+ .TP
130
+ .BI \-e " stat"
131
+ execute statement
132
+ .IR stat .
133
+ You need to quote
134
+ .I stat
135
+ if it contains spaces, quotes,
136
+ or other characters special to the shell.
137
+ .TP
138
+ .B \-i
139
+ enter interactive mode after
140
+ .I script
141
+ is executed.
142
+ .TP
143
+ .BI \-l " name"
144
+ call
145
+ .BI require(' name ')
146
+ before executing
147
+ .IR script .
148
+ Typically used to load libraries.
149
+ .TP
150
+ .B \-v
151
+ show version information.
152
+ .SH "SEE ALSO"
153
+ .BR luac (1)
154
+ .br
155
+ http://www.lua.org/
156
+ .SH DIAGNOSTICS
157
+ Error messages should be self explanatory.
158
+ .SH AUTHORS
159
+ R. Ierusalimschy,
160
+ L. H. de Figueiredo,
161
+ and
162
+ W. Celes
163
+ .\" EOF