From owner-svn-soc-all@FreeBSD.ORG Mon Jun 2 20:24:52 2014 Return-Path: Delivered-To: svn-soc-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 98B9064B for ; Mon, 2 Jun 2014 20:24:52 +0000 (UTC) Received: from socsvn.freebsd.org (socsvn.freebsd.org [IPv6:2001:1900:2254:206a::50:2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 820F120EB for ; Mon, 2 Jun 2014 20:24:52 +0000 (UTC) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.14.8/8.14.8) with ESMTP id s52KOq42073730 for ; Mon, 2 Jun 2014 20:24:52 GMT (envelope-from pedrosouza@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.14.8/8.14.8/Submit) id s52KOojD073291 for svn-soc-all@FreeBSD.org; Mon, 2 Jun 2014 20:24:50 GMT (envelope-from pedrosouza@FreeBSD.org) Date: Mon, 2 Jun 2014 20:24:50 GMT Message-Id: <201406022024.s52KOojD073291@socsvn.freebsd.org> X-Authentication-Warning: socsvn.freebsd.org: www set sender to pedrosouza@FreeBSD.org using -f From: pedrosouza@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r268970 - in soc2014/pedrosouza/lua_loader/head/sys/lua: . doc src MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jun 2014 20:24:52 -0000 Author: pedrosouza Date: Mon Jun 2 20:24:49 2014 New Revision: 268970 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=268970 Log: Added missing lua src Added: soc2014/pedrosouza/lua_loader/head/sys/lua/ soc2014/pedrosouza/lua_loader/head/sys/lua/README soc2014/pedrosouza/lua_loader/head/sys/lua/doc/ soc2014/pedrosouza/lua_loader/head/sys/lua/doc/contents.html soc2014/pedrosouza/lua_loader/head/sys/lua/doc/logo.gif (contents, props changed) soc2014/pedrosouza/lua_loader/head/sys/lua/doc/lua.1 soc2014/pedrosouza/lua_loader/head/sys/lua/doc/lua.css soc2014/pedrosouza/lua_loader/head/sys/lua/doc/luac.1 soc2014/pedrosouza/lua_loader/head/sys/lua/doc/manual.css soc2014/pedrosouza/lua_loader/head/sys/lua/doc/manual.html soc2014/pedrosouza/lua_loader/head/sys/lua/doc/osi-certified-72x60.png (contents, props changed) soc2014/pedrosouza/lua_loader/head/sys/lua/doc/readme.html soc2014/pedrosouza/lua_loader/head/sys/lua/src/ soc2014/pedrosouza/lua_loader/head/sys/lua/src/lapi.c soc2014/pedrosouza/lua_loader/head/sys/lua/src/lapi.h soc2014/pedrosouza/lua_loader/head/sys/lua/src/lcode.c soc2014/pedrosouza/lua_loader/head/sys/lua/src/lcode.h soc2014/pedrosouza/lua_loader/head/sys/lua/src/lctype.c soc2014/pedrosouza/lua_loader/head/sys/lua/src/lctype.h soc2014/pedrosouza/lua_loader/head/sys/lua/src/ldebug.c soc2014/pedrosouza/lua_loader/head/sys/lua/src/ldebug.h soc2014/pedrosouza/lua_loader/head/sys/lua/src/ldo.c soc2014/pedrosouza/lua_loader/head/sys/lua/src/ldo.h soc2014/pedrosouza/lua_loader/head/sys/lua/src/ldump.c soc2014/pedrosouza/lua_loader/head/sys/lua/src/lfunc.c soc2014/pedrosouza/lua_loader/head/sys/lua/src/lfunc.h soc2014/pedrosouza/lua_loader/head/sys/lua/src/lgc.c soc2014/pedrosouza/lua_loader/head/sys/lua/src/lgc.h soc2014/pedrosouza/lua_loader/head/sys/lua/src/llex.c soc2014/pedrosouza/lua_loader/head/sys/lua/src/llex.h soc2014/pedrosouza/lua_loader/head/sys/lua/src/llimits.h soc2014/pedrosouza/lua_loader/head/sys/lua/src/lmem.c soc2014/pedrosouza/lua_loader/head/sys/lua/src/lmem.h soc2014/pedrosouza/lua_loader/head/sys/lua/src/lobject.c soc2014/pedrosouza/lua_loader/head/sys/lua/src/lobject.h soc2014/pedrosouza/lua_loader/head/sys/lua/src/lopcodes.c soc2014/pedrosouza/lua_loader/head/sys/lua/src/lopcodes.h soc2014/pedrosouza/lua_loader/head/sys/lua/src/lparser.c soc2014/pedrosouza/lua_loader/head/sys/lua/src/lparser.h soc2014/pedrosouza/lua_loader/head/sys/lua/src/lstate.c soc2014/pedrosouza/lua_loader/head/sys/lua/src/lstate.h soc2014/pedrosouza/lua_loader/head/sys/lua/src/lstd.c soc2014/pedrosouza/lua_loader/head/sys/lua/src/lstd.h soc2014/pedrosouza/lua_loader/head/sys/lua/src/lstring.c soc2014/pedrosouza/lua_loader/head/sys/lua/src/lstring.h soc2014/pedrosouza/lua_loader/head/sys/lua/src/ltable.c soc2014/pedrosouza/lua_loader/head/sys/lua/src/ltable.h soc2014/pedrosouza/lua_loader/head/sys/lua/src/ltm.c soc2014/pedrosouza/lua_loader/head/sys/lua/src/ltm.h soc2014/pedrosouza/lua_loader/head/sys/lua/src/lua.h soc2014/pedrosouza/lua_loader/head/sys/lua/src/luaconf.h soc2014/pedrosouza/lua_loader/head/sys/lua/src/lundump.c soc2014/pedrosouza/lua_loader/head/sys/lua/src/lundump.h soc2014/pedrosouza/lua_loader/head/sys/lua/src/lvm.c soc2014/pedrosouza/lua_loader/head/sys/lua/src/lvm.h soc2014/pedrosouza/lua_loader/head/sys/lua/src/lzio.c soc2014/pedrosouza/lua_loader/head/sys/lua/src/lzio.h Added: soc2014/pedrosouza/lua_loader/head/sys/lua/README ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ soc2014/pedrosouza/lua_loader/head/sys/lua/README Mon Jun 2 20:24:49 2014 (r268970) @@ -0,0 +1,6 @@ + +This is Lua 5.2.3, released on 11 Nov 2013. + +For installation instructions, license details, and +further information about Lua, see doc/readme.html. + Added: soc2014/pedrosouza/lua_loader/head/sys/lua/doc/contents.html ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ soc2014/pedrosouza/lua_loader/head/sys/lua/doc/contents.html Mon Jun 2 20:24:49 2014 (r268970) @@ -0,0 +1,533 @@ + + + +Lua 5.2 Reference Manual - contents + + + + + + + +
+

+ +Lua 5.2 Reference Manual +

+ +

+The reference manual is the official definition of the Lua language. +For a complete introduction to Lua programming, see the book +Programming in Lua. + +

+start +· +contents +· +index +


+ +Copyright © 2011–2013 Lua.org, PUC-Rio. +Freely available under the terms of the +Lua license. + + +

Contents

+ + +

Index

+ + + + + + + +
+

Lua functions

+

+_G
+_VERSION
+ +

+assert
+collectgarbage
+dofile
+error
+getmetatable
+ipairs
+load
+loadfile
+next
+pairs
+pcall
+print
+rawequal
+rawget
+rawlen
+rawset
+require
+select
+setmetatable
+tonumber
+tostring
+type
+xpcall
+ +

+bit32.arshift
+bit32.band
+bit32.bnot
+bit32.bor
+bit32.btest
+bit32.bxor
+bit32.extract
+bit32.lrotate
+bit32.lshift
+bit32.replace
+bit32.rrotate
+bit32.rshift
+ +

+coroutine.create
+coroutine.resume
+coroutine.running
+coroutine.status
+coroutine.wrap
+coroutine.yield
+ +

+debug.debug
+debug.getuservalue
+debug.gethook
+debug.getinfo
+debug.getlocal
+debug.getmetatable
+debug.getregistry
+debug.getupvalue
+debug.setuservalue
+debug.sethook
+debug.setlocal
+debug.setmetatable
+debug.setupvalue
+debug.traceback
+debug.upvalueid
+debug.upvaluejoin
+ +

+file:close
+file:flush
+file:lines
+file:read
+file:seek
+file:setvbuf
+file:write
+ +

+io.close
+io.flush
+io.input
+io.lines
+io.open
+io.output
+io.popen
+io.read
+io.stderr
+io.stdin
+io.stdout
+io.tmpfile
+io.type
+io.write
+ +

+

 

+

+math.abs
+math.acos
+math.asin
+math.atan
+math.atan2
+math.ceil
+math.cos
+math.cosh
+math.deg
+math.exp
+math.floor
+math.fmod
+math.frexp
+math.huge
+math.ldexp
+math.log
+math.max
+math.min
+math.modf
+math.pi
+math.pow
+math.rad
+math.random
+math.randomseed
+math.sin
+math.sinh
+math.sqrt
+math.tan
+math.tanh
+ +

+os.clock
+os.date
+os.difftime
+os.execute
+os.exit
+os.getenv
+os.remove
+os.rename
+os.setlocale
+os.time
+os.tmpname
+ +

+package.config
+package.cpath
+package.loaded
+package.loadlib
+package.path
+package.preload
+package.searchers
+package.searchpath
+ +

+string.byte
+string.char
+string.dump
+string.find
+string.format
+string.gmatch
+string.gsub
+string.len
+string.lower
+string.match
+string.rep
+string.reverse
+string.sub
+string.upper
+ +

+table.concat
+table.insert
+table.pack
+table.remove
+table.sort
+table.unpack
+ +

+

C API

+

+lua_Alloc
+lua_CFunction
+lua_Debug
+lua_Hook
+lua_Integer
+lua_Number
+lua_Reader
+lua_State
+lua_Unsigned
+lua_Writer
+ +

+lua_absindex
+lua_arith
+lua_atpanic
+lua_call
+lua_callk
+lua_checkstack
+lua_close
+lua_compare
+lua_concat
+lua_copy
+lua_createtable
+lua_dump
+lua_error
+lua_gc
+lua_getallocf
+lua_getctx
+lua_getfield
+lua_getglobal
+lua_gethook
+lua_gethookcount
+lua_gethookmask
+lua_getinfo
+lua_getlocal
+lua_getmetatable
+lua_getstack
+lua_gettable
+lua_gettop
+lua_getupvalue
+lua_getuservalue
+lua_insert
+lua_isboolean
+lua_iscfunction
+lua_isfunction
+lua_islightuserdata
+lua_isnil
+lua_isnone
+lua_isnoneornil
+lua_isnumber
+lua_isstring
+lua_istable
+lua_isthread
+lua_isuserdata
+lua_len
+lua_load
+lua_newstate
+lua_newtable
+lua_newthread
+lua_newuserdata
+lua_next
+lua_pcall
+lua_pcallk
+lua_pop
+lua_pushboolean
+lua_pushcclosure
+lua_pushcfunction
+lua_pushfstring
+lua_pushglobaltable
+lua_pushinteger
+lua_pushlightuserdata
+lua_pushliteral
+lua_pushlstring
+lua_pushnil
+lua_pushnumber
+lua_pushstring
+lua_pushthread
+lua_pushunsigned
+lua_pushvalue
+lua_pushvfstring
+lua_rawequal
+lua_rawget
+lua_rawgeti
+lua_rawgetp
+lua_rawlen
+lua_rawset
+lua_rawseti
+lua_rawsetp
+lua_register
+lua_remove
+lua_replace
+lua_resume
+lua_setallocf
+lua_setfield
+lua_setglobal
+lua_sethook
+lua_setlocal
+lua_setmetatable
+lua_settable
+lua_settop
+lua_setupvalue
+lua_setuservalue
+lua_status
+lua_toboolean
+lua_tocfunction
+lua_tointeger
+lua_tointegerx
+lua_tolstring
+lua_tonumber
+lua_tonumberx
+lua_topointer
+lua_tostring
+lua_tothread
+lua_tounsigned
+lua_tounsignedx
+lua_touserdata
+lua_type
+lua_typename
+lua_upvalueid
+lua_upvalueindex
+lua_upvaluejoin
+lua_version
+lua_xmove
+lua_yield
+lua_yieldk
+ +

+

auxiliary library

+

+luaL_Buffer
+luaL_Reg
+ +

+luaL_addchar
+luaL_addlstring
+luaL_addsize
+luaL_addstring
+luaL_addvalue
+luaL_argcheck
+luaL_argerror
+luaL_buffinit
+luaL_buffinitsize
+luaL_callmeta
+luaL_checkany
+luaL_checkint
+luaL_checkinteger
+luaL_checklong
+luaL_checklstring
+luaL_checknumber
+luaL_checkoption
+luaL_checkstack
+luaL_checkstring
+luaL_checktype
+luaL_checkudata
+luaL_checkunsigned
+luaL_checkversion
+luaL_dofile
+luaL_dostring
+luaL_error
+luaL_execresult
+luaL_fileresult
+luaL_getmetafield
+luaL_getmetatable
+luaL_getsubtable
+luaL_gsub
+luaL_len
+luaL_loadbuffer
+luaL_loadbufferx
+luaL_loadfile
+luaL_loadfilex
+luaL_loadstring
+luaL_newlib
+luaL_newlibtable
+luaL_newmetatable
+luaL_newstate
+luaL_openlibs
+luaL_optint
+luaL_optinteger
+luaL_optlong
+luaL_optlstring
+luaL_optnumber
+luaL_optstring
+luaL_optunsigned
+luaL_prepbuffer
+luaL_prepbuffsize
+luaL_pushresult
+luaL_pushresultsize
+luaL_ref
+luaL_requiref
+luaL_setfuncs
+luaL_setmetatable
+luaL_testudata
+luaL_tolstring
+luaL_traceback
+luaL_typename
+luaL_unref
+luaL_where
+ +

+ +
+ +Last update: +Tue Mar 12 11:22:18 BRT 2013 + + + + + Added: soc2014/pedrosouza/lua_loader/head/sys/lua/doc/logo.gif ============================================================================== Binary file. No diff available. Added: soc2014/pedrosouza/lua_loader/head/sys/lua/doc/lua.1 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ soc2014/pedrosouza/lua_loader/head/sys/lua/doc/lua.1 Mon Jun 2 20:24:49 2014 (r268970) @@ -0,0 +1,116 @@ +.\" $Id: lua.man,v 1.13 2011/11/16 17:16:53 lhf Exp $ +.TH LUA 1 "$Date: 2011/11/16 17:16:53 $" +.SH NAME +lua \- Lua interpreter +.SH SYNOPSIS +.B lua +[ +.I options +] +[ +.I script +[ +.I args +] +] +.SH DESCRIPTION +.B lua +is the standalone Lua interpreter. +It loads and executes Lua programs, +either in textual source form or +in precompiled binary form. +(Precompiled binaries are output by +.BR luac , +the Lua compiler.) +.B lua +can be used as a batch interpreter and also interactively. +.LP +The given +.I options +are handled in order and then +the Lua program in file +.I script +is loaded and executed. +The given +.I args +are available to +.I script +as strings in a global table named +.BR arg . +If no options or arguments are given, +then +.B "\-v \-i" +is assumed when the standard input is a terminal; +otherwise, +.B "\-" +is assumed. +.LP +In interactive mode, +.B lua +prompts the user, +reads lines from the standard input, +and executes them as they are read. +If a line does not contain a complete statement, +then a secondary prompt is displayed and +lines are read until a complete statement is formed or +a syntax error is found. +If a line starts with +.BR '=' , +then +.B lua +evaluates and displays +the values of the expressions in the remainder of the line. +.LP +At the very start, +before even handling the command line, +.B lua +checks the contents of the environment variables +.B LUA_INIT_5_2 +or +.BR LUA_INIT , +in that order. +If the contents is of the form +.RI '@ filename ', +then +.I filename +is executed. +Otherwise, the string is assumed to be a Lua statement and is executed. +.SH OPTIONS +.TP +.BI \-e " stat" +execute statement +.IR stat . +.TP +.B \-i +enter interactive mode after executing +.IR script . +.TP +.BI \-l " name" +execute the equivalent of +.IB name =require(' name ') +before executing +.IR script . +.TP +.B \-v +show version information. +.TP +.B \-E +ignore environment variables. +.TP +.B \-\- +stop handling options. +.TP +.B \- +stop handling options and execute the standard input as a file. +.SH "SEE ALSO" +.BR luac (1) +.br +The documentation at lua.org, +especially section 7 of the reference manual. +.SH DIAGNOSTICS +Error messages should be self explanatory. +.SH AUTHORS +R. Ierusalimschy, +L. H. de Figueiredo, +W. Celes +.\" EOF Added: soc2014/pedrosouza/lua_loader/head/sys/lua/doc/lua.css ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ soc2014/pedrosouza/lua_loader/head/sys/lua/doc/lua.css Mon Jun 2 20:24:49 2014 (r268970) @@ -0,0 +1,96 @@ +html { + background-color: #F8F8F8 ; +} + +body { + border: solid #a0a0a0 1px ; + border-radius: 20px ; + padding: 26px ; + margin: 16px ; + color: #000000 ; + background-color: #FFFFFF ; + font-family: Helvetica, Arial, sans-serif ; + text-align: justify ; +} + +h1, h2, h3, h4 { + font-family: Verdana, Geneva, sans-serif ; + font-weight: normal ; + font-style: normal ; +} + +h2 { + padding-top: 0.4em ; + padding-bottom: 0.4em ; + padding-left: 0.8em ; + padding-right: 0.8em ; + background-color: #D0D0FF ; + border-radius: 8px ; + border: solid #a0a0a0 1px ; +} + +h3 { + padding-left: 0.5em ; + border-left: solid #D0D0FF 1em ; +} + +table h3 { + padding-left: 0px ; + border-left: none ; +} + +a:link { + color: #000080 ; + background-color: inherit ; + text-decoration: none ; +} + +a:visited { + background-color: inherit ; + text-decoration: none ; +} + +a:link:hover, a:visited:hover { + color: #000080 ; + background-color: #D0D0FF ; +} + +a:link:active, a:visited:active { + color: #FF0000 ; +} + +hr { + border: 0 ; + height: 1px ; + color: #a0a0a0 ; + background-color: #a0a0a0 ; + display: none ; +} + +table hr { + display: block ; +} + +:target { + background-color: #F8F8F8 ; + padding: 8px ; + border: solid #a0a0a0 2px ; + border-radius: 8px ; +} + +.footer { + color: gray ; + font-size: x-small ; +} + +input[type=text] { + border: solid #a0a0a0 2px ; + border-radius: 2em ; + -moz-border-radius: 2em ; + background-image: url('images/search.png') ; + background-repeat: no-repeat; + background-position: 4px center ; + padding-left: 20px ; + height: 2em ; +} + Added: soc2014/pedrosouza/lua_loader/head/sys/lua/doc/luac.1 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ soc2014/pedrosouza/lua_loader/head/sys/lua/doc/luac.1 Mon Jun 2 20:24:49 2014 (r268970) @@ -0,0 +1,118 @@ +.\" $Id: luac.man,v 1.29 2011/11/16 13:53:40 lhf Exp $ +.TH LUAC 1 "$Date: 2011/11/16 13:53:40 $" +.SH NAME +luac \- Lua compiler +.SH SYNOPSIS +.B luac +[ +.I options +] [ +.I filenames +] +.SH DESCRIPTION +.B luac +is the Lua compiler. +It translates programs written in the Lua programming language +into binary files containing precompiled chunks +that can be later loaded and executed. +.LP +The main advantages of precompiling chunks are: +faster loading, +protecting source code from accidental user changes, +and +off-line syntax checking. +Precompiling does not imply faster execution +because in Lua chunks are always compiled into bytecodes before being executed. +.B luac +simply allows those bytecodes to be saved in a file for later execution. +Precompiled chunks are not necessarily smaller than the corresponding source. +The main goal in precompiling is faster loading. +.LP +In the command line, +you can mix +text files containing Lua source and +binary files containing precompiled chunks. +.B luac +produces a single output file containing the combined bytecodes +for all files given. +Executing the combined file is equivalent to executing the given files. +By default, +the output file is named +.BR luac.out , +but you can change this with the +.B \-o +option. +.LP +Precompiled chunks are +.I not +portable across different architectures. +Moreover, +the internal format of precompiled chunks +is likely to change when a new version of Lua is released. +Make sure you save the source files of all Lua programs that you precompile. +.LP +.SH OPTIONS +.TP +.B \-l +produce a listing of the compiled bytecode for Lua's virtual machine. +Listing bytecodes is useful to learn about Lua's virtual machine. +If no files are given, then +.B luac +loads +.B luac.out +and lists its contents. +Use +.B \-l \-l +for a full listing. +.TP +.BI \-o " file" +output to +.IR file , +instead of the default +.BR luac.out . +(You can use +.B "'\-'" +for standard output, +but not on platforms that open standard output in text mode.) +The output file may be one of the given files because +all files are loaded before the output file is written. +Be careful not to overwrite precious files. +.TP +.B \-p +load files but do not generate any output file. +Used mainly for syntax checking and for testing precompiled chunks: +corrupted files will probably generate errors when loaded. +If no files are given, then +.B luac +loads +.B luac.out +and tests its contents. +No messages are displayed if the file loads without errors. +.TP +.B \-s +strip debug information before writing the output file. +This saves some space in very large chunks, +but if errors occur when running a stripped chunk, +then the error messages may not contain the full information they usually do. +In particular, +line numbers and names of local variables are lost. +.TP +.B \-v +show version information. +.TP +.B \-\- +stop handling options. +.TP +.B \- +stop handling options and process standard input. +.SH "SEE ALSO" +.BR lua (1) +.br +The documentation at lua.org. +.SH DIAGNOSTICS +Error messages should be self explanatory. +.SH AUTHORS +R. Ierusalimschy, +L. H. de Figueiredo, +W. Celes +.\" EOF Added: soc2014/pedrosouza/lua_loader/head/sys/lua/doc/manual.css ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ soc2014/pedrosouza/lua_loader/head/sys/lua/doc/manual.css Mon Jun 2 20:24:49 2014 (r268970) @@ -0,0 +1,27 @@ +h3 code { + font-family: inherit ; + font-size: inherit ; +} + +pre, code { + font-size: 12pt ; +} + +span.apii { + float: right ; + font-family: inherit ; + font-style: normal ; + font-size: small ; + color: gray ; +} + +p+h1, ul+h1 { + font-style: normal ; + padding-top: 0.4em ; + padding-bottom: 0.4em ; + padding-left: 16px ; + margin-left: -16px ; + background-color: #D0D0FF ; + border-radius: 8px ; + border: solid #000080 1px ; +} Added: soc2014/pedrosouza/lua_loader/head/sys/lua/doc/manual.html ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ soc2014/pedrosouza/lua_loader/head/sys/lua/doc/manual.html Mon Jun 2 20:24:49 2014 (r268970) @@ -0,0 +1,10507 @@ + + + + +Lua 5.2 Reference Manual + + + + + + + +
+

+ +Lua 5.2 Reference Manual +

+ +by Roberto Ierusalimschy, Luiz Henrique de Figueiredo, Waldemar Celes +

+ +Copyright © 2011–2013 Lua.org, PUC-Rio. +Freely available under the terms of the +Lua license. + +


+

+ +contents +· +index + + +

+ + + + + + +

1 – Introduction

+ +

+Lua is an extension programming language designed to support +general procedural programming with data description +facilities. +It also offers good support for object-oriented programming, +functional programming, and data-driven programming. +Lua is intended to be used as a powerful, lightweight, +embeddable scripting language for any program that needs one. +Lua is implemented as a library, written in clean C, +the common subset of Standard C and C++. + + +

+Being an extension language, Lua has no notion of a "main" program: +it only works embedded in a host client, +called the embedding program or simply the host. +The host program can invoke functions to execute a piece of Lua code, +can write and read Lua variables, +and can register C functions to be called by Lua code. +Through the use of C functions, Lua can be augmented to cope with +a wide range of different domains, +thus creating customized programming languages sharing a syntactical framework. +The Lua distribution includes a sample host program called lua, +which uses the Lua library to offer a complete, standalone Lua interpreter, +for interactive or batch use. + + +

+Lua is free software, +and is provided as usual with no guarantees, +as stated in its license. +The implementation described in this manual is available +at Lua's official web site, www.lua.org. + + +

+Like any other reference manual, +this document is dry in places. +For a discussion of the decisions behind the design of Lua, +see the technical papers available at Lua's web site. +For a detailed introduction to programming in Lua, *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***