Lua 5.1 中文手册
    1 - 简介
    2 - 语言
       2.1 - 语法约定
       2.2 - 值与类型
          2.2.1 - 强制转换
       2.3 - 变量
       2.4 - 语句
          2.4.1 - Chunks
          2.4.2 - Blocks
          2.4.3 - Assignment
          2.4.4 - Control Structures
          2.4.5 - For Statement
          2.4.6 - Function Calls as Statements
          2.4.7 - Local Declarations
       2.5 - 表达式
          2.5.1 - Arithmetic Operators
          2.5.2 - Relational Operators
          2.5.3 - Logical Operators
          2.5.4 - Concatenation
          2.5.5 - The Length Operator
          2.5.6 - Precedence
          2.5.7 - Table Constructors
          2.5.8 - Function Calls
          2.5.9 - Function Definitions
       2.6 - 可视规则
       2.7 - 错误处理
       2.8 - 元表
       2.9 - 环境
       2.10 - 垃圾收集
          2.10.1 - 垃圾收集的元方法
          2.10.2 - 弱表
       2.11 - 协同
    3 - 程序接口(API)
       3.1 - The Stack
       3.2 - Stack Size
       3.3 - Pseudo-Indices
       3.4 - C Closures
       3.5 - Registry
       3.6 - Error Handling in C
       3.7 - Functions and Types
          lua_Alloc
          lua_atpanic
          lua_call
          lua_CFunction
          lua_checkstack
          lua_close
          lua_concat
          lua_cpcall
          lua_createtable
          lua_dump
          lua_equal
          lua_error
          lua_gc
          lua_getallocf
          lua_getfenv
          lua_getfield
          lua_getglobal
          lua_getmetatable
          lua_gettable
          lua_gettop
          lua_insert
          lua_Integer
          lua_isboolean
          lua_iscfunction
          lua_isfunction
          lua_islightuserdata
          lua_isnil
          lua_isnumber
          lua_isstring
          lua_istable
          lua_isthread
          lua_isuserdata
          lua_lessthan
          lua_load
          lua_newstate
          lua_newtable
          lua_newthread
          lua_newuserdata
          lua_next
          lua_Number
          lua_objlen
          lua_pcall
          lua_pop
          lua_pushboolean
          lua_pushcclosure
          lua_pushcfunction
          lua_pushfstring
          lua_pushinteger
          lua_pushlightuserdata
          lua_pushlstring
          lua_pushnil
          lua_pushnumber
          lua_pushstring
          lua_pushthread
          lua_pushvalue
          lua_pushvfstring
          lua_rawequal
          lua_rawget
          lua_rawgeti
          lua_rawset
          lua_rawseti
          lua_Reader
          lua_register
          lua_remove
          lua_replace
          lua_resume
          lua_setallocf
          lua_setfenv
          lua_setfield
          lua_setglobal
          lua_setmetatable
          lua_settable
          lua_settop
          lua_State
          lua_status
          lua_toboolean
          lua_tocfunction
          lua_tointeger
          lua_tolstring
          lua_tonumber
          lua_topointer
          lua_tostring
          lua_tothread
          lua_touserdata
          lua_type
          lua_typename
          lua_Writer
          lua_xmove
          lua_yield
       3.8 - The Debug Interface
          lua_Debug
          lua_gethook
          lua_gethookcount
          lua_gethookmask
          lua_getinfo
          lua_getlocal
          lua_getstack
          lua_getupvalue
          lua_Hook
          lua_sethook
          lua_setlocal
          lua_setupvalue
    4 - The Auxiliary Library
       4.1 - Functions and Types
          luaL_addchar
          luaL_addlstring
          luaL_addsize
          luaL_addstring
          luaL_addvalue
          luaL_argcheck
          luaL_argerror
          luaL_Buffer
          luaL_buffinit
          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_dofile
          luaL_dostring
          luaL_error
          luaL_getmetafield
          luaL_getmetatable
          luaL_gsub
          luaL_loadbuffer
          luaL_loadfile
          luaL_loadstring
          luaL_newmetatable
          luaL_newstate
          luaL_openlibs
          luaL_optint
          luaL_optinteger
          luaL_optlong
          luaL_optlstring
          luaL_optnumber
          luaL_optstring
          luaL_prepbuffer
          luaL_pushresult
          luaL_ref
          luaL_Reg
          luaL_register
          luaL_typename
          luaL_typerror
          luaL_unref
          luaL_where
    5 - Standard Libraries
       5.1 - Basic Functions
          assert (v [, message])
          collectgarbage (opt [, arg])
          dofile (filename)
          error (message [, level])
          _G
          getfenv (f)
          getmetatable (object)
          ipairs (t)
          load (func [, chunkname])
          loadfile ([filename])
          loadstring (string [, chunkname])
          next (table [, index])
          pairs (t)
          pcall (f, arg1, ···)
          print (···)
          rawequal (v1, v2)
          rawget (table, index)
          rawset (table, index, value)
          select (index, ···)
          setfenv (f, table)
          setmetatable (table, metatable)
          tonumber (e [, base])
          tostring (e)
          type (v)
          unpack (list [, i [, j]])
          _VERSION
          xpcall (f, err)
       5.2 - Coroutine Manipulation
          coroutine.create (f)
          coroutine.resume (co [, val1, ···])
          coroutine.running ()
          coroutine.status (co)
          coroutine.wrap (f)
          coroutine.yield (···)
       5.3 - Modules
          module (name [, ···])
          require (modname)
          package.cpath
          package.loaded
          package.loadlib (libname, funcname)
          package.path
          package.preload
          package.seeall (module)
       5.4 - String Manipulation
          string.byte (s [, i [, j]])
          string.char (···)
          string.dump (function)
          string.find (s, pattern [, init [, plain]])
          string.format (formatstring, ···)
          string.gmatch (s, pattern)
          string.gsub (s, pattern, repl [, n])
          string.len (s)
          string.lower (s)
          string.match (s, pattern [, init])
          string.rep (s, n)
          string.reverse (s)
          string.sub (s, i [, j])
          string.upper (s)
          5.4.1 - Patterns
             Character Class:
             Pattern Item:
             Pattern:
             Captures:
       5.5 - Table Manipulation
          table.concat (table [, sep [, i [, j]]])
          table.insert (table, [pos,] value)
          table.maxn (table)
          table.remove (table [, pos])
          table.sort (table [, comp])
       5.6 - Mathematical Functions
          math.abs (x)
          math.acos (x)
          math.asin (x)
          math.atan (x)
          math.atan2 (x, y)
          math.ceil (x)
          math.cos (x)
          math.cosh (x)
          math.deg (x)
          math.exp (x)
          math.floor (x)
          math.fmod (x, y)
          math.frexp (x)
          math.huge
          math.ldexp (m, e)
          math.log (x)
          math.log10 (x)
          math.max (x, ···)
          math.min (x, ···)
          math.modf (x)
          math.pi
          math.pow (x, y)
          math.rad (x)
          math.random ([m [, n]])
          math.randomseed (x)
          math.sin (x)
          math.sinh (x)
          math.sqrt (x)
          math.tan (x)
          math.tanh (x)
       5.7 - Input and Output Facilities
          io.close ([file])
          io.flush ()
          io.input ([file])
          io.lines ([filename])
          io.open (filename [, mode])
          io.output ([file])
          io.popen ([prog [, mode]])
          io.read (···)
          io.tmpfile ()
          io.type (obj)
          io.write (···)
          file:close ()
          file:flush ()
          file:lines ()
          file:read (···)
          file:seek ([whence] [, offset])
          file:setvbuf (mode [, size])
          file:write (···)
       5.8 - Operating System Facilities
          os.clock ()
          os.date ([format [, time]])
          os.difftime (t2, t1)
          os.execute ([command])
          os.exit ([code])
          os.getenv (varname)
          os.remove (filename)
          os.rename (oldname, newname)
          os.setlocale (locale [, category])
          os.time ([table])
          os.tmpname ()
       5.9 - The Debug Library
          debug.debug ()
          debug.getfenv (o)
          debug.gethook ([thread])
          debug.getinfo ([thread,] function [, what])
          debug.getlocal ([thread,] level, local)
          debug.getmetatable (object)
          debug.getregistry ()
          debug.getupvalue (func, up)
          debug.setfenv (object, table)
          debug.sethook ([thread,] hook, mask [, count])
          debug.setlocal ([thread,] level, local, value)
          debug.setmetatable (object, table)
          debug.setupvalue (func, up, value)
          debug.traceback ([thread,] [message])
    6 - Lua Stand-alone
    7 - Incompatibilities with the Previous Version
       7.1 - Changes in the Language
       7.2 - Changes in the Libraries
       7.3 - Changes in the API
    8 - The Complete Syntax of Lua