--[[  LUA脚本的关键字配置表  ]]--



--语法关键字
Lua_SyntaxWord=
{
	"and", 
	"break", 
	"do", 
	"else", 
	"elseif",
	"end", 
	"false",
	"for",
	"function",
	"if",
	"in",
	"local",
	"nil",
	"not",
	"or",
	"repeat",
	"return",
	"then",
	"true",
	"until",
	"while",
	"__index",
	"__newindex",
	"self"
}


--保留函数关键字
Lua_GlobleFuncWord=
{
	"assert",
	"tostring",
	"tonumber",
	"rawget",
	"xpcall",
	"ipairs",
	"print",
	"pcall",
	"gcinfo",
	"module",
	"setfenv",
	"rawset",
	"error",
	"loadfile",
	"rawequal",
	"load",
	"unpack",
	"pairs",
	"require",
	"_VERSION",
	"newproxy",
	"collectgarbage",
	"dofile",
	"next",
	"loadstring",
	"select",
	"type",
	"getmetatable",
	"getfenv",
	"setmetatable"
}

--保留函数关键字
Lua_BaseLibFuncWord=
{
	table = 
	{
		"foreach", 
		"sort",
		"remove",
		"foreachi",
		"maxn",
		"getn",
		"setn",
		"concat",
		"insert"
	},
	string = 
	{
		"find",
		"lower",
		"format",
		"rep",
		"gsub",
		"len",
		"gmatch",
		"dump",
		"match",
		"reverse",
		"byte",
		"char",
		"upper",
		"gfind",
		"sub"
	},
	package = 
	{
		"preload",
		"loadlib",
		"loaded",
		"loaders",
		"cpath",
		"config",
		"path",
		"seeall"
	},
	os = 
	{
		"exit",
		"setlocale",
		"date",
		"getenv",
		"difftime",
		"remove",
		"time",
		"clock",
		"tmpname",
		"rename",
		"execute"
	},
	io = 
	{
		"lines",
		"write",
		"close",
		"flush",
		"open",
		"output",
		"type",
		"read",
		"stderr",
		"stdin",
		"input",
		"stdout",
		"popen",
		"tmpfile"
	},
	debug = 
	{
		"getupvalue",
		"debug",
		"sethook",
		"getmetatable",
		"gethook",
		"setmetatable",
		"setlocal",
		"traceback",
		"setfenv",
		"getinfo",
		"setupvalue",
		"getlocal",
		"getregistry",
		"getfenv"
	},
	math = 
	{
		"log",
		"max",
		"acos",
		"huge",
		"ldexp",
		"pi",
		"cos",
		"tanh",
		"pow",
		"deg",
		"tan",
		"cosh",
		"sinh",
		"random",
		"randomseed",
		"frexp",
		"ceil",
		"floor",
		"rad",
		"abs",
		"sqrt",
		"modf",
		"asin",
		"min",
		"mod",
		"fmod",
		"log10",
		"atan2",
		"atan",
		"exp",
		"sin"
	},
	coroutine = 
	{
		"resume",
		"yield",
		"status",
		"wrap",
		"create",
		"running"
	}
}

--LUA基本库函数提示, 提示不要用逗号、要用<、>
Lua_BaseLibFuncTip = 
{
	concat="table.concat(table [,sep [,i[,j]]])\n\n连接表内成员 可以指定 i j  可以使用负索引  sep 可选",
	insert="table.insert(table, [pos,] value)\n\n插入成员到指定pos  默认:pos为 #table+1",
	assert="assert(v [, message])\n如果 <v> 为 nil 或者 false ,则抛出错误<message>,否则 返回 <v>:error if v nil or false, otherwise returns v",
	arshift="bit.arshift(x, n)\narithmetic right-shift",
	band="bit.band(x1 [,x2...])\n位与\nbitwise 'and' of arguments",
	bnot="bit.bnot(x)\n取反\nbitwise 'not' of argument",
	bor="bit.bor(x1 [,x2...])\n位或\nbitwise 'or' of arguments",
	bswap="bit.bswap(x)\n交换高低位\nswaps the bytes of the argument (32-bit little-endian/big-endian)",
	bxor="bit.bxor(x1 [,x2...])\n位异或\nbitwise 'xor' of arguments",
	lshift="bit.lshift(x, n)\n左移\nlogical left-shift",
	rol="bit.rol(x, n)\nbitwise left rotation",
	ror="bit.ror(x, n)\nbitwise right rotation",
	rshift="bit.rshift(x, n)\n右移\nlogical right-shift",
	tohex="bit.tohex(x [,n])\n转换为16进制字符串 n为限制字符串长度\nConverts its first argument to a hex string",
	collectgarbage="collectgarbage([limit])\nset threshold to limit KBytes, default 0, may run GC",
	create="coroutine.create(f)\ncreates coroutine from function f, returns coroutine",
	resume="coroutine.resume (co, val1, ...)\ncontinues execution of co, returns bool status plus any values",
	status="coroutine.status (co)\nreturns co status: \"running\", \"suspended\" or \"dead\"",
	wrap="coroutine.wrap (f)\ncreates coroutine with body f, returns function that resumes co",
	yield="coroutine.yield (val1, ...)\nsuspend execution of calling coroutine",
	debug="debug.debug ()\nenters interactive debug mode, line with only \"cont\" terminates",
	gethook="debug.gethook ()\nreturns current hook function, hook mask, hook count",
	getinfo="debug.getinfo (function [, what])\nreturns table with information about a function",
	getlocal="debug.getlocal (level, local)\nreturns name and value of local variable with index local at stack level",
	getupvalue="debug.getupvalue (func, up)\nreturns name and value of upvalue with index up of function func",
	sethook="debug.sethook (hook, mask [, count])\nsets given function as a hook, mask=\"[crl]\"",
	setlocal="debug.setlocal (level, local, value)\nsets local variable with index local at stack level with value",
	setupvalue="debug.setupvalue (func, up, value)\nsets upvalue with index up of function func with value",
	traceback="debug.traceback ([message])\nreturns a string with a traceback of the call stack",
	dofile="dofile (filename)\nexecutes as Lua chunk, default stdin, returns value",
	error="error (message [, level])\nterminates protected func, never returns, level 1 (default), 2=parent",
	close="file:close ()\ncloses file",
	flush="file:flush ()\nsaves any written data to file",
	lines="file:lines ()\nreturns iterator function to return lines, nil ends",
	read="file:read (format1, ...)\nreads file according to given formats, returns read values or nil",
	seek="file:seek ([whence] [, offset])\nsets file pos, whence=\"set\"|\"cur\"|\"end\", defaults \"curr\",0, returns file pos",
	write="file:write (value1, ...)\nwrites strings or numbers to file",
	gcinfo="gcinfo ()\nreturns dynamic mem in use (KB), and current GC threshold (KB)",
	getfenv="getfenv (f)\ngets env, f can be a function or number (stack level, default=1), 0=global env",
	getmetatable="getmetatable (object)\nreturns metatable of given object, otherwise nil",
	close="io.close ([file])\ncloses file, or the default output file",
	flush="io.flush ()\nflushes the default output file",
	input="io.input ([file])\nopens file in text mode, sets as default input file, or returns current default input file",
	lines="io.lines ([filename])\nopen file in read mode, returns iterator function to return lines, nil ends",
	open="io.open (filename [, mode])\nopens file in specified mode \"[rawb+]\", returns handle or nil",
	output="io.output ([file])\nopens file in text mode, sets as default output file, or returns current default output file",
	read="io.read (format1, ...)\nreads file according to given formats, returns read values or nil",
	tmpfile="io.tmpfile ()\nreturns a handle for a temporary file, opened in update mode",
	type="io.type (obj)\nreturns \"file\" if obj is an open file handle, \"close file\" if closed, or nil if not a file handle",
	write="io.write (value1, ...)\nwrites strings or numbers to file",
	ipairs="ipairs (t)\nreturns an iterator function, table t and 0",
	loadfile="loadfile (filename)\nloads chunk without execution, returns chunk as function, else nil plus error",
	loadlib="loadlib (libname, funcname)\nlinks to dynamic library libname, returns funcname as a C function",
	loadstring="loadstring (string [, chunkname])\nloads string as chunk, returns chunk as function, else nil plus error",
	abs="math.abs (v)\nreturns absolute value of v",
	acos="math.acos (v)\nreturns arc cosine value of v in radians",
	asin="math.asin (v)\nreturns arc sine value of v in radians",
	atan="math.atan (v)\nreturns arc tangent value of v in radians",
	atan2="math.atan2 (v1, v2)\nreturns arc tangent value of v1/v2 in radians",
	ceil="math.ceil (v)\nreturns smallest integer >= v",
	cos="math.cos (rad)\nreturns cosine value of angle rad",
	deg="math.deg (rad)\nreturns angle in degrees of radians rad",
	exp="math.exp (v)\nreturns e^v",
	floor="math.floor (v)\nreturns largest integer <= v",
	frexp="math.frexp (v)\nreturns mantissa [0.5,1)\nand exponent values of v",
	ldexp="math.ldexp (v1, v2)\nreturns v1*2^v2",
	log="math.log (v)\nreturns natural logarithm of v",
	log10="math.log10 (v)\nreturns logarithm 10 of v",
	max="math.max (v1, ...)\nreturns maximum in a list of one or more values",
	min="math.min (v1, ...)\nreturns minimum in a list of one or more values",
	mod="math.mod (v1, v2)\nreturns remainder of v1/v2 which is v1 - iV2 for some integer i",
	pow="math.pow (v1, v2)\nreturns v1 raised to the power of v2",
	rad="math.rad (deg)\nreturns angle in radians of degrees deg",
	random="math.random ([n [, u]])\nreturns random real [0,1), integer [1,n] or real [1,u] (with n=1)",
	randomseed="math.randomseed (seed)\nsets seed for pseudo-random number generator",
	sin="math.sin (rad)\nreturns sine value of angle rad",
	sqrt="math.sqrt (v)\nreturns square root of v",
	tan="math.tan (rad)\nreturns tangent value of angle rad",
	next="next (table [, index])\nreturns next index,value pair, if index=nil (default), returns first index",
	clock="os.clock ()\nreturns CPU time used by program in seconds",
	date="os.date ([format [, time]])\nreturns a string or table containing date and time, \"*t\" returns a table",
	difftime="os.difftime (t2, t1)\nreturns number of seconds from time t1 to time t2",
	execute="os.execute (command)\nexecutes command using C function system, returns status code",
	exit="os.exit ([code])\nterminates host program with optional code, default is success code",
	getenv="os.getenv (varname)\nreturns value of environment variable varname. nil if not defined",
	remove="os.remove (filename)\ndeletes file with given name, nil if fails",
	rename="os.rename (oldname, newname)\nrenames file oldname to newname, nil if fails",
	setenv="os.setenv(name,value)\nset an environment variable (ex)",
	setlocale="os.setlocale (locale [, category])\nset current locale of program, returns name of new locate or nil",
	sleep="os.sleep(seconds)\npause for the given amount of seconds (can be fraction)\n(ex)",
	spawn="os.spawn(filename)\ncreate a child process (ex)",
	time="os.time ([table])\nreturns current time (usually seconds)\nor time as represented by table",
	tmpname="os.tmpname ()\nreturns a string with a filename for a temporary file (dangerous! tmpfile is better)",
	pairs="pairs (t)\nreturns the next function and table t plus a nil, iterates over all key-value pairs",
	pcall="pcall (f, arg1, arg2, ...)\nprotected mode call, catches errors, returns status code first (true=success)",
	print="print (e1, e2, ...)\nprints values to stdout using tostring",
	rawequal="rawequal (v1, v2)\nnon-metamethod v1==v2, returns boolean",
	rawget="rawget (table, index)\nnon-metamethod get value of table[index], index != nil",
	rawset="rawset (table, index, value)\nnon-metamethod set value of table[index], index != nil",
	require="require (packagename)\nloads package, updates _LOADED, returns boolean",
	setfenv="setfenv (f, table)\nsets env, f can be a function or number (stack level, default=1), 0=global env",
	setmetatable="setmetatable (table, metatable)\nsets metatable, nil to remove metatable",
	byte="string.byte (s [, i])\nreturns numerical code, nil if index out of range, default i=1",
	char="string.char (i1, i2, ...)\nreturns a string built from 0 or more integers",
	dump="string.dump (function)\nreturns binary representation of function, used with loadstring",
	find="string.find (s, pattern [, init [, plain]])\nmatches pattern in s, returns start,end indices, else nil",
	format="string.format (formatstring, e1, e2, ...)\nreturns formatted string, printf-style",
	gfind="string.gfind (s, pat)\nreturns iterator function that returns next captures from pattern pat on s",
	gsub="string.gsub (s, pat, repl [, n])\nreturns copy of s with pat replaced by repl, and substitutions made",
	len="string.len (s)\nreturns string length",
	lower="string.lower (s)\nreturns string with letters in lower case",
	pack="string.pack (fmt,...)\npack arguments as a binary string using 'fmt' (pack)",
	rep="string.rep (s, n)\nreturns string with n copies of string s",
	sub="string.sub (s, i [, j])\nreturns substring from index i to j of s, default j=-1 (string length)",
	unpack="string.unpack (s,fmt)\nunpack arguments from binary string according to 'fmt' (pack)",
	upper="string.upper (s)\nreturns string with letters in upper case",
	concat="table.concat (table [, sep [, i [, j]]])\nreturns concatenated table elements i to j separated by sep",
	foreach="table.foreach (table, f)\nexecutes f(index,value)\nover all elements of table, returns first non-nil of f",
	foreachi="table.foreachi (table, f)\nexecutes f(index,value)\nin sequential order 1 to n, returns first non-nil of f",
	getn="table.getn (table)\nreturns size of table, or n field, or table.setn value, or 1 less first index with nil value",
	insert="table.insert (table, [pos,] value)\ninsert value at location pos in table, default pos=n+1",
	remove="table.remove (table [, pos])\nremoves element at pos from table, default pos=n",
	setn="table.setn (table, n)\nsets size of table, n field of table if it exists",
	sort="table.sort (table [, comp])\nsorts in-place elements 1 to n, comp(v1,v2)\ntrue if v1<v2, default <",
	tonumber="tonumber (e [, base])\nconvert to number, returns number, nil if non-convertible, 2<=base<=36",
	tostring="tostring (e)\nconvert to string, returns string",
	type="type (v)\nreturns type of v as a string",
	unpack="unpack (list)\nreturns all elements from list",
	xpcall="xpcall (f, err)\npcall function f with new error handler err",

}
