From dac20b845caec4572d30925f364d494e257f0e43 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Thu, 11 Jul 2013 23:22:08 +0000 Subject: listings (11jul13) git-svn-id: svn://tug.org/texlive/trunk@31161 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/tex/latex/listings/lstlang2.sty | 121 +++++++++++++++++++++- 1 file changed, 119 insertions(+), 2 deletions(-) (limited to 'Master/texmf-dist/tex/latex/listings/lstlang2.sty') diff --git a/Master/texmf-dist/tex/latex/listings/lstlang2.sty b/Master/texmf-dist/tex/latex/listings/lstlang2.sty index aea935ae1df..ab296a3e372 100644 --- a/Master/texmf-dist/tex/latex/listings/lstlang2.sty +++ b/Master/texmf-dist/tex/latex/listings/lstlang2.sty @@ -21,7 +21,7 @@ %% programming languages to Brooks Moses at . %% \ProvidesFile{lstlang2.sty} - [2004/09/05 1.3 listings language file] + [2013/06/27 1.5pre1 listings language file] %% %% Abap definition by Knut Lickert %% @@ -423,7 +423,7 @@ static,supporter,switchable,talkable,transparent,visited,% workflag,worn},% % - % Libary properties + % Library properties morekeywords=[5]{n_to,s_to,e_to,w_to,ne_to,nw_to,se_to,sw_to,in_to,% out_to,u_to,d_to,add_to_scope,after,article,articles,before,% cant_go,capacity,daemon,describe,description,door_dir,door_to,% @@ -619,6 +619,123 @@ morestring=[b]"% }[keywords,comments,strings]% %% +%% Lua definitions (c) 2013 Stephan Hennig +%% +\lst@definelanguage[5.0]{Lua}{% + alsoletter={.},% + morekeywords=[1]{% + and, break, do, else, elseif, end, false, for, function, if, in,% + local, nil, not, or, repeat, return, then, true, until, while,% + },% + morekeywords=[2]{% + _G, _LOADED, _REQUIREDNAME, _VERSION, LUA_PATH,% + assert, collectgarbage, dofile, error, gcinfo, getfenv,% + getmetatable, ipairs, loadfile, loadlib, loadstring, newproxy,% + next, pairs, pcall, print, rawequal, rawget, rawset, require,% + setfenv, setmetatable, tonumber, tostring, type, unpack, xpcall,% + coroutine, coroutine.create, coroutine.resume,% + coroutine.status, coroutine.wrap, coroutine.yield,% + _TRACEBACK, debug, debug.debug, debug.gethook, debug.getinfo,% + debug.getlocal, debug.getupvalue, debug.sethook, debug.setlocal,% + debug.setupvalue,debug.traceback,% + io, 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,% + __pow, math, math.abs, math.acos, math.asin, math.atan, math.atan2,% + math.ceil, math.cos, math.deg, math.exp, math.floor, math.frexp,% + math.ldexp, math.log, math.log10, math.max, math.min, math.mod,% + math.pi, math.pow, math.rad, math.random, math.randomseed, math.sin,% + math.sqrt, math.tan,% + os, os.clock, os.date, os.difftime, os.execute, os.exit, os.getenv,% + os.remove, os.rename, os.setlocale, os.time, os.tmpname,% + string, string.byte, string.char, string.dump, string.find,% + string.format, string.gfind, string.gsub, string.len, string.lower,% + string.rep, string.sub, string.upper,% + table, table.concat, table.foreach, table.foreachi, table.getn,% + table.insert, table.remove, table.setn, table.sort,% + },% + morekeywords=[2]{% + _PROMPT, _PROMPT2, arg,% + },% + sensitive=true,% + % single line comments + morecomment=[l]{--},% + % multi line comments + morecomment=[s]{--[[}{]]},% + % backslash escaped strings + morestring=[b]",% + morestring=[b]',% + % multi line strings + morestring=[s]{[[}{]]},% +}[keywords,comments,strings]% +\lst@definelanguage[5.1]{Lua}[5.0]{Lua}{% + deletekeywords=[2]{% + _LOADED, _REQUIREDNAME, LUA_PATH, gcinfo, loadlib,% + _TRACEBACK,% + __pow, math.mod,% + string.gfind,% + table.foreach, table.foreachi, table.getn, table.setn,% + },% + morekeywords=[2]{% + load, select,% + coroutine.running,% + debug.getfenv, debug.getmetatable, debug.getregistry, debug.setfenv,% + debug.setmetatable,% + math.cosh, math.fmod, math.huge, math.modf, math.sinh, math.tanh,% + module, package, package.config, package.cpath, package.loaded,% + package.loaders, package.loadlib, package.path, package.preload,% + package.seeall,% + string.gmatch, string.match, string.reverse,% + table.maxn,% + },% + morecomment=[s]{--[=[}{]=]},% + morecomment=[s]{--[==[}{]==]},% + morecomment=[s]{--[===[}{]===]},% + morecomment=[s]{--[====[}{]====]},% + morecomment=[s]{--[=====[}{]=====]},% + morecomment=[s]{--[======[}{]======]},% + morecomment=[s]{--[=======[}{]=======]},% + morecomment=[s]{--[========[}{]========]},% + morecomment=[s]{--[=========[}{]=========]},% + morecomment=[s]{--[==========[}{]==========]},% + morestring=[s]{[=[}{]=]},% + morestring=[s]{[==[}{]==]},% + morestring=[s]{[===[}{]===]},% + morestring=[s]{[====[}{]====]},% + morestring=[s]{[=====[}{]=====]},% + morestring=[s]{[======[}{]======]},% + morestring=[s]{[=======[}{]=======]},% + morestring=[s]{[========[}{]========]},% + morestring=[s]{[=========[}{]=========]},% + morestring=[s]{[==========[}{]==========]},% +}[keywords,comments,strings]% +\lst@definelanguage[5.2]{Lua}[5.1]{Lua}{% + morekeywords=[1]{% + goto,% + },% + deletekeywords=[2]{% + getfenv, loadstring, module, newproxy, setfenv, unpack,% + debug.getfenv, debug.setfenv,% + math.log10,% + package.loaders, package.seeall,% + table.maxn,% + },% + morekeywords=[2]{% + rawlen,% + bit32, bit32.arshift, bit32.band, bit32.bnot, bit32.bor,% + bit32.btest, bit32.bxor, bit32.extract, bit32.lrotate,% + bit32.lshift, bit32.replace, bit32.rrotate, bit32.rshift,% + debug.getuservalue, debug.setuservalue, debug.upvalueid,% + debug.upvaluejoin,% + package.searchers, package.searchpath,% + table.pack, table.unpack,% + },% + morekeywords=[2]{% + _ENV,% + },% + moredelim=[s][keywordstyle3]{::}{::},% +}[keywords,comments,strings]% +%% %% Make definitions (c) 2000 Rolf Niepraschk %% \lst@definelanguage[gnu]{make}% -- cgit v1.2.3