pax_global_header00006660000000000000000000000064116416607240014521gustar00rootroot0000000000000052 comment=db9e86822651fffed696b75a4ffcc7878231ffa0 lua-doc-3.0.1+gitdb9e868/000077500000000000000000000000001164166072400146375ustar00rootroot00000000000000lua-doc-3.0.1+gitdb9e868/.cvsignore000066400000000000000000000000231164166072400166320ustar00rootroot00000000000000.cproject .project lua-doc-3.0.1+gitdb9e868/Makefile000066400000000000000000000026011164166072400162760ustar00rootroot00000000000000# $Id: Makefile,v 1.4 2008/02/17 06:42:51 jasonsantos Exp $ CONFIG= ./config include $(CONFIG) LUADOC_DIR= $(LUA_DIR)/luadoc DOCLET_DIR= $(LUADOC_DIR)/doclet HTML_DIR= $(DOCLET_DIR)/html TAGLET_DIR= $(LUADOC_DIR)/taglet STANDARD_DIR= $(TAGLET_DIR)/standard LUADOC_REFMAN= doc/refman LUADOC_LUAS= src/luadoc/config.lua \ src/luadoc/init.lua \ src/luadoc/lp.lua \ src/luadoc/util.lua DOCLET_LUAS= src/luadoc/doclet/debug.lua \ src/luadoc/doclet/formatter.lua \ src/luadoc/doclet/html.lua \ src/luadoc/doclet/raw.lua HTML_LUAS= src/luadoc/doclet/html/file.lp \ src/luadoc/doclet/html/function.lp \ src/luadoc/doclet/html/index.lp \ src/luadoc/doclet/html/luadoc.css \ src/luadoc/doclet/html/menu.lp \ src/luadoc/doclet/html/module.lp \ src/luadoc/doclet/html/table.lp TAGLET_LUAS= src/luadoc/taglet/standard.lua STANDARD_LUAS= src/luadoc/taglet/standard/tags.lua LAUNCHER= $(SYS_BINDIR)/luadoc LAUNCHER_SRC= src/luadoc.lua.in build clean: install: mkdir -p $(LUADOC_DIR) cp $(LUADOC_LUAS) $(LUADOC_DIR) mkdir -p $(DOCLET_DIR) cp $(DOCLET_LUAS) $(DOCLET_DIR) mkdir -p $(HTML_DIR) cp $(HTML_LUAS) $(HTML_DIR) mkdir -p $(TAGLET_DIR) cp $(TAGLET_LUAS) $(TAGLET_DIR) mkdir -p $(STANDARD_DIR) cp $(STANDARD_LUAS) $(STANDARD_DIR) mkdir -p $(SYS_BINDIR) cp $(LAUNCHER_SRC) $(LAUNCHER) chmod a+x $(LAUNCHER) refman: mkdir -p $(LUADOC_REFMAN) $(LAUNCHER) -d $(LUADOC_REFMAN) src/luadoc lua-doc-3.0.1+gitdb9e868/Makefile.win000066400000000000000000000034401164166072400170740ustar00rootroot00000000000000# $Id: Makefile.win,v 1.3 2008/02/18 23:00:42 jasonsantos Exp $ include config.win LUADOC_DIR= $(LUA_DIR)\luadoc DOCLET_DIR= $(LUADOC_DIR)\doclet HTML_DIR= $(DOCLET_DIR)\html TAGLET_DIR= $(LUADOC_DIR)\taglet STANDARD_DIR= $(TAGLET_DIR)\standard LAUNCHER_DIR= c:\lua5.1 LUADOC_REFMAN= doc\refman LUADOC_LUAS= src\luadoc\config.lua \ src\luadoc\init.lua \ src\luadoc\lp.lua \ src\luadoc\util.lua DOCLET_LUAS= src\luadoc\doclet\debug.lua \ src\luadoc\doclet\formatter.lua \ src\luadoc\doclet\html.lua \ src\luadoc\doclet\raw.lua HTML_LUAS= src\luadoc\doclet\html\file.lp \ src\luadoc\doclet\html\function.lp \ src\luadoc\doclet\html\index.lp \ src\luadoc\doclet\html\luadoc.css \ src\luadoc\doclet\html\menu.lp \ src\luadoc\doclet\html\module.lp \ src\luadoc\doclet\html\table.lp TAGLET_LUAS= src\luadoc\taglet\standard.lua STANDARD_LUAS= src\luadoc\taglet\standard\tags.lua LAUNCHER= src\luadoc.bat LAUNCHER_SRC= src\luadoc.lua.in LAUNCHER_START= luadoc_start.lua build clean: install: IF NOT EXIST "$(LUADOC_DIR)" mkdir "$(LUADOC_DIR)" FOR %F IN ($(LUADOC_LUAS)) DO copy "%F" "$(LUADOC_DIR)" IF NOT EXIST "$(DOCLET_DIR)" mkdir "$(DOCLET_DIR)" FOR %F IN ($(DOCLET_LUAS)) DO copy "%F" "$(DOCLET_DIR)" IF NOT EXIST "$(HTML_DIR)" mkdir "$(HTML_DIR)" FOR %F IN ($(HTML_LUAS)) DO copy "%F" "$(HTML_DIR)" IF NOT EXIST "$(TAGLET_DIR)" mkdir "$(TAGLET_DIR)" FOR %F IN ($(TAGLET_LUAS)) DO copy "%F" "$(TAGLET_DIR)" IF NOT EXIST "$(STANDARD_DIR)" mkdir "$(STANDARD_DIR)" FOR %F IN ($(STANDARD_LUAS)) DO copy "%F" "$(STANDARD_DIR)" IF NOT EXIST "$(LAUNCHER_DIR)" mkdir "$(LAUNCHER_DIR)" copy "$(LAUNCHER)" "$(LAUNCHER_DIR)" copy "$(LAUNCHER_SRC)" "$(LAUNCHER_DIR)\$(LAUNCHER_START)" refman: IF NOT EXIST "$(LUADOC_REFMAN)" mkdir "$(LUADOC_REFMAN)" "$(LAUNCHER)" -d "$(LUADOC_REFMAN)" src\luadoc lua-doc-3.0.1+gitdb9e868/README000066400000000000000000000041301164166072400155150ustar00rootroot00000000000000LuaDoc, version 3.0 Tomas Guisasola (tomas@tecgraf.puc-rio.br) http://luadoc.luaforge.net 13/aug/2007 What is it? LuaDoc is a documentation generator tool for Lua source code. It parses the declarations and documentation comments in a set of Lua source files and produces a set of XHTML pages describing the commented declarations and functions. The output is not limited to XHTML. Other formats can be generated by implementing new doclets. The format of the documentation comments is also flexible and can be customized by implementing new taglets. Please refer to customizing section for further information. LuaDoc is free software and uses the same license as Lua. Distribution: This distribution includes a set of Lua files and this README. It requires Lua 5.1. Installation: LuaDoc tool is composed by two parts, a library, and a launcher script. The library follows the package model for Lua 5.1, therefore it should be "installed". The launcher script, namely luadoc.lua for Unix and luadoc.bat for Windows, should be installed in your system PATH, so that it can be executed. LuaDoc also depends on two external packages: LuaFileSystem and LuaLogging, and you'll need to install them accordingly. On Unix boxes, the file luadoc.lua could be used as a script; it's the same as: lua5.1 luadoc.lua [options|files] This is the main script: it will load LuaDoc library and process the specified files. Try luadoc.lua --help, it will show you all available options. How does it work? LuaDoc works in two phases: analysis and synthesis. On the first one, all input files are analyzed and an intermediate structure is made with this information. The second phase is responsible for cross-reference and the composition of the output. Each phase has an engine file and one or more description files, that describe the source format and the output format. This distribution only have a description of Lua source files and another for HTML output files. Some technical documentation can be built running LuaDoc over its files. Please send any comments and bug reports to tomas@tecgraf.puc-rio.br lua-doc-3.0.1+gitdb9e868/config000066400000000000000000000007701164166072400160330ustar00rootroot00000000000000# $Id: config,v 1.1 2008/02/17 06:42:51 jasonsantos Exp $ # Default installation prefix PREFIX=/usr/local # System's libraries directory (where binary libraries are installed) LUA_LIBDIR= $(PREFIX)/lib/lua/5.1 # System's lua directory (where Lua libraries are installed) LUA_DIR= $(PREFIX)/share/lua/5.1 # System's executables directory (where binary or script executables are installed) SYS_BINDIR= $(PREFIX)/bin # Complete path to Lua command line interpreter LUA_INTERPRETER= $(PREFIX)/bin/lua5.1lua-doc-3.0.1+gitdb9e868/config.win000066400000000000000000000006561164166072400166320ustar00rootroot00000000000000# $Id: config.win,v 1.1 2008/02/17 06:42:51 jasonsantos Exp $ # System's libraries directory (where binary libraries are installed) LUA_LIBDIR= c:\lua5.1 # System's lua directory (where Lua libraries are installed) LUA_DIR= c:\lua5.1\lua # System's executables directory (where binary or script executables are installed) SYS_BINDIR= c:\lua5.1 # Complete path to Lua command line interpreter LUA_INTERPRETER= c:\lua5.1\lua5.1 lua-doc-3.0.1+gitdb9e868/doc/000077500000000000000000000000001164166072400154045ustar00rootroot00000000000000lua-doc-3.0.1+gitdb9e868/doc/us/000077500000000000000000000000001164166072400160335ustar00rootroot00000000000000lua-doc-3.0.1+gitdb9e868/doc/us/architecture.html000066400000000000000000000152671164166072400214160ustar00rootroot00000000000000 LuaDoc: Documentation Generator Tool for the Lua language
LuaDoc
Documentation Generator Tool for the Lua language

Architecture

LuaDoc's processing can be divided in two distinct steps: parsing and generation. The parsing step take as input a set of .lua files and must produce a Documentation object. A generator takes a Documentation object as input and produces a set of output files. It's up to the generator to decide which output format it will generate.

The parsing step is executed by a component called taglet, while the generation is handled by a component called doclet. This architecture is shown below.

Architecture

Taglet

LuaDoc does not impose a documentation format. Instead, it relies on an internal representation of the documentation. This representation is described in the Documentation section. If the developer wants to use a custom documentation format the taglet component can be replaced.

Writing a new taglet is a matter a implementing a single method:

function start (files, doc)
files
a list of file (or directory) names.
doc
a preprocessed documentation object.

LuaDoc comes bundled with a standard taglet implementation. This implementation takes all file names in the list and produce the documentation object using a set of tags described in the section How To. If an item in the list is a directory it iterates recursively through all files in the directory looking for filenames with .lua or .luadoc extensions.

Documentation

Instead of defining a documentation format LuaDoc defines an internal representation of a documentation object. Taglets and doclets must conform with this format.

The documentation object is described below. Some description elements are explained below:

List
table indexed by number. Example: List<string> { [1] = "x", [2] = "y", [3] = "z", }
HashMap
table whose numerical indices are the key values for objects. Example: HashMap<string, string>
{
		[1] = "x",
		[2] = "y";
		[3] = "z";
		["x"] = "x coord",
		["y"] = "y coord",
		["z"] = "z coord",
	}

DOCUMENTATION

{
	files = HashMap<string, DOCUMENTATION_ELEMENT>, -- indexed by file name
	modules = HashMap<string, DOCUMENTATION_ELEMENT>, -- indexed by module name
}

DOCUMENTATION_ELEMENT

{
	type = ["file" | "module"],
	name = <string>, -- full path of file or name of module
	doc = List<BLOCK>, -- all documentation blocks
	functions = HashMap<string, BLOCK>, -- only functions, indexed by function name
	tables = HashMap<string, BLOCK>, -- only table definitions, indexed by table name
	},
}

BLOCK

{
	class = ["module" | "function" | "table"],
	name = <string>,
	summary = <string>,
	description = <string>,
	comment = List<string>,
	code = List<string>,
	param = HashMap<string, string>,
},

Doclet

The primary job of an doclet is to take a Documentation object and generate some kind of output. LuaDoc is bundled with an implementation that generates HTML files.

Writing a new doclet is a matter a implementing a single method:

function start (doc)
doc
a documentation object.

Valid XHTML 1.0!

$Id: architecture.html,v 1.5 2007/08/13 15:32:45 carregal Exp $

lua-doc-3.0.1+gitdb9e868/doc/us/architecture.vsd000066400000000000000000002630001164166072400212340ustar00rootroot00000000000000ࡱ> 2Root EntryRoot EntryFP6VisioDocument3SummaryInformation(SDocumentSummaryInformation8  !"#$%&'()*+,-./01456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~VisioInformation" ՜.+,D՜.+, `ht  `Ideais  Page-1aPage-2aFlowchart shapes0Tagged documentBidet d Copy center DocumenterDataentProcess45 degree single0 PagesMasters0|_PID_LINKBASE_VPID_ALTERNATENAMES _TemplateIDATC010497521033Oh+'0S `h@ XdLuaDoc ArchitectureLuaDocDanilo Tuler de OliveiraDC:\Arquivos de programas\Microsoft Office\Visio11\1033\BLOCK_M.VSTDanilo Tuler de OliveiraMicrosoft Visio@p06G\REa} EMFTRl`@VISIODrawingLQEaFb ??d((Q(Fb(Qχ000000xxxppp(((HHHAAAXXX```>>>@@@@@@hhhUUUhhh000```]]]<<<```WWWccc`````` `````` `````` <<<444@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@(((hhh``` ׏$$$HHH @@@((((((@@@@@@@@@@@@@@@"##!#">>>@@@@@@@@@@@@@@@@@@@@@ @@@576}/10{{{::: p{y+,,ߏ7;:OWUxxx7;:OWU7;:OWU7;:OWU7;:OWU~~|yw`_^```ppp```珏?==^[Zxxx```?==^[Z```?==^[Z```___,+*OOO```@@@{{{CCC???wwwPPP````````````````````````@@@ggggggPPP``````ooo/..321ggg```'''```0//?=<^[Z(''```?==^[Z```?==^[Z```?==^[Z```XXXxxx```PPP ```000ppp```PPP ```000```ppp```@@@@@@@@@@@@@@@@@@%%$$$#>>>@@@@@@@@@@@@@@@@@@@@@hhh````_^OON```|yw`__```?==^[Zxxx```?==^[Z```?==^[Z```___,+*OOO```@@@GGGCCC{{{PPP```````````````````````` @@@@@@000222@@@@@@(((hhh```987IGF```¼``````?==^[ZPPP```?==^[Z```?==^[Z``````,++DBAwwwxxx```@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@:::444@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\^]LMMooou}NOOߏ7;:OWUxxx7;:OWU߿7;:OWUXXX @@@xxx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sq p} od cy ik nq t s"m n gu mu$,u"g nu |!1gq bJ s4s(#s>!e^E r kUGoVY?k?BI!I!2I%` )F.| <`>!kbs{kqqTFzkq qB "O4B lZ'9 H U?c_pu wx  {07~&Z"8vz{RtDrawg hesaponodwipe..flw>cr:g9bK&d2ٿ~??iٿa??Lo =J1?&rпUGDF %P# h>8/T 6D UugU@z?@h9Vc?@K&d2?@~?P} $J JbZJn G& GJ+ ! ^ PFUFZZnUnU""u`h?F"u)]b5 6I 1U*2L@!2ؒ33m1r49;1`Vis_SWF.cPm#50462`?Copyr0UgPtg(0)g]2003gM0uc0o0of2R1r0Aa0i0un0 gAl@U 8sBe0e0%v1@d04g7 30AEK39*36z2 y7?=:2W b4 6533l]d6<)5g&_)6ejAad UG2UHQ*5T [^5T[MET[wETWTWpTdaoT\7RTQ*2'8@`F\.o_\C"b/t!.rrZGsNs3 6 1arش")2`R1@As0 E T1@x04q(^iUwE]oCQ#}" 0!2+*57Rbt+qp^57ɏ)s~/q'ME7.'uL0 o~o+c@Q@Q*2'^2qqMB'8`hu1m5A  GUB`1ssbB`G!2<^5ALbAktDuJMEArlG22` q1ءc1B4ӟPoo(4'8q?R?8#3 % &2p5B A:f}Vtb R5BXaD!@G=WgQMExqrX[8Hr&@ATRUHLuD" %# >h0JTlaaPM A'MU@g4F?@>OS?@x<]?P >ktA`  3o?t U*fD raM>u enxuUm >b% J>U >`eN($O`?CopyrigXt (c)Z 2d03Z MR cP osJ fX"I!rL !aX iJ n.Z Al P(s"ex eP v d  #%B2rS@0 !Iy0#?|6 e?MA5Ul,JUl@ V5I A!/4w >aB%E@!jZVx~xe` hFN@BMB=tYOkOEEEOzKOI$HOM3rM2S1A87? a? OO/OAE@QO?_LQ HbOh0JTlaaPM A'MU@xOS]?P >ktA`  3o?t* U* _vJ>u; enxu!m >b% J>U >`eN($O`?CopyrigXt (c)Z 2d03Z MR cP osJ fX"I!rL !aX iJ n.Z Al P(s"ex eP v d  #%B2r:S@0 !Iy0#?|6 e?MA5Ul,JUl@ V5I A!/4w >aB%E@!jZVx~*xenK hFN@BMB=tYOkOEEEOzKOI$HO3rM 2S1A87? an?O O2OQO?_Ln HbOh0JTlaaPM A'MU@K&d2?@~?@xOS?P >tA`  3?tT U*J DM>u]nxu!] V>b J>Un >`eJN($O`?CopyrigXtB(c)B2d03BMR cP oKsJ fX"I!rL !aX iJ n.B Al P(s"ex eP v d  #%JB2rS@S0,!Iy0#?|6 ?MUA5l,JUl V5I A!/4 >aBE@!jZ[x~)xe hFN@BMB=t#YOkOCEEEOzKOI4$HO3rM2S1A87C? a? OO/OAEQO?_LQ HbOh0JTlaaPM A'MU@ BP(?@(??@xOS?P >tA`  3?tT U*E ժ_ nJ>uU enxu! >b J>U >`eN($O`?CopyrigXt (c)Z ]2d03Z MR ]cP osJ fX"RI!rL !aX iJ n.Z AUl P(s"ex eP v d  T#%B2rS@0b!ᆑIy0#?|6 ?MA5l, JUl V5I h A!/4nU BE@!joZx~xXeB hFN@BMBЏ=tYOkOEEEOzKOI$HO3rTM2S1A87 ? a? OO/OAEQO?_LQ HbOOS?RP} kt`  3o?tU" Ӫ.m f gf^$jffz+u Su]zbI U `)] "B#)d'#!$U*G`?CopyrigPt (cu) 2\03 uM c os If"!r !a i n. WAl (s"Ue e v0d Pf- 2%2#jT+?S@o0 "醉L#Iy#?06 ?[At5eg^O-G?YUfHUHLuD " %# >h0JTlaaTM>'MU@xOS?P V>tA`  o?t( ? J J>u]nfxu!]] bI J>U >`)eN($O`?CopyrigXt(c)2d03MR c.P osJ fX"I!rL !aX iJ n. Al P(s"ex e P v d n *%B2rSO@0!_Iy0#?|6 MUA5l,JUlV5I A!/4 >aBE@!jZ[x~xh,n hFN@BMB=GtYOkOEEEOzKOIh$HO3rM* 2S1A87?a? OO/OAEQO?_LQ HbO T$]]9 I#BgAU@K&d2?F?F\.?P6 hp!ZAu"u`b,֑t#`uL*4A-#]u@ u 4uIu_?2k b .2nAnJ'J+U'\;#?/&M??u4;# `0$'!%45 !`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M?AUZ#v<@9:P?]UhzAdQ2Jw0\P2JZf$%wBOH "3'Mg83f${ EE+rr$7 2A5Q?'z#xetb na7@swB҉ES숟t)Hh$e2NChY@eM9hz=xە32edtAb9 6};|HF@JuIvBIu?bZ1(1 -?wBR@b-?Q՚J RR C"X"bMB85e yB8geqeݿ71TA)j2g8ܓT&@7cb\.h4F??lD??Huý %O=~ IF\]#4M? tT]cԓ@"D<\&P+,dT>A?U* !"U#$%&'()t4 Y,b'@"H$ @ f\_$C-O@@7"AU&!"'U()+,-t4 Y,b'@"H$ @ d\C-B*7 AU2!")U3456U789:t4 Y,b'@"H$ @ yY'C~-ԗ@& AU!&'U()-<t4Y,b'@"H$ @ ZpC-[*7 AU!&'()=t4Y,b'@"H$ @ &^C>-@7"AU!&'()>t4Y,b'@"H$ @ $'^DC>-L@[7"AU!&'()?t4Y,b'@"H$ @ d'^C>-@7"A)At4Y,b'@"H$ @ [_ A-,@7A @zYBGR@xYNR@,|Y(HR@{YNR@d|YIR@yY]IR@|YIR@\~YHRH<(H<(H<(H<(H<(H<(H<(H<( EL{Y REyY+ RETyY8 REzYE RE{YR RE{Y_ RE{Yl RE}Yy R_F(T lI_.$ݟSWS+:B!]_W?/"$[_SS\rS5\|SLm_S-\S\O,\\PDtxYS5*] Z,b@#H$@g( "*^p1?4 k #5GYk}D C:\Arquivos duepogWamsMucsftUOfeV]so12\2w03<\BCKGR_.(SVk7"4FXj| D C:\Arquivos depogamsMcsftOfeVso12\203<\BRDEF_j.(SVk"4FXj|D C:\Arquivos depogamsMcsftOfeVso12\203<\BLCK<_j.(SVi"4FXj|D C:\Arquivos depogamsMcsftOfeVso12\203<\BLCK_.(STk"4FXj|D C:\Arquivos depogamsMcsftOfeVso12\203<\BSFL_.(SFk"4FXj| C:\Arquivos depogamsMcsftOfeVso12\203<RDOWWS_.(SL(*BPNXC!)]+/*][2+]> d-]aR.]|/]?3/U` ,? `@P( B@ LFDNTyB@ uh(TBW UF"H$ @FY,b'@FoxҔ[Q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rp Lh6?%?ncf6R?e?'9KfC 666߅$./O#q=1~9Xj|F-!hP/ASew$] WbI 0Got 0G _tn Po(:L^p qS$qq ////A/S/e/w//bX v֠f//j, vhl6 ?pэ{?òAߖ˟ޟ???]qs XXXOh)TOfOxOOO5q=GOOO__+_=_O_a_s_ D"H$”______ڏo$o6oZoƅo oI )t 1 9\ϒŲQrQG@`P,ķҹRRtma[!@@#jܞ?@Ѱғ?P6'CMU@@ .ʺ."@@k‚A5̟!pRE1T@S@+=6Z ͯ߯'9RD෿ɿۿZ y -B?@0(:L^JϔϦϸI倦&(.H?*JR0m5?f%.?&/ /ASe鄸숣Iz+%pA#!%UEpA•AIfZ|>@@ W@@qP?@QqU?TU9up@`5$?Ru YABRVR%<"@LM!_"ˏݏ/!-:qgRYPSYa-eVoWUo<~U'9w?=nvoj=o D0(.TUELuaDoc i4RHX''2R3ЇUE!Na*2QmEvtOm#ZF?4O;vTDOvTt\I U1( UO"D&aUAUNj )h"T} U+U |ɉB&Q- -H*=(XiwEQ//,/fGArial UncodeMS{ (  R$fSymbol$67fWingds*7 fEArial"z@D/ R$fGSwimun{a (  R$fGPMingLU{a (  R$fGMS PGothic{a (  R$fGDotum|"{a (  R$fESylaen  $fEstrangeloU dsa@`9$fGVrinda{ (  R$fEShrut1i$&<fEM_angl$$%>fETungaH"@&>fGSendya{ (  R$fERavi"&5<fGDhenu|"{a (  R$fELath#&<fEGautmi &<fGCordia New{ (  R$fGMS Farsi{{ ( _ R$fGulim"{a (  R$fETimes NwRoanz@D$SwLB,S.B<S%BLS5B\SK9BlS=B|SCBS9B S=7B St=B S8B S'B S"BS2#BSU9B S"BS9B,S&B<S'BLS6CB\Sy>BlS8B|SGBGuideTheDocPage-1"Gestur Fom aFlow NrmaSchemN aViso 90Co}nectrVi}so 0Viso 01Viso 02Viso 03Viso 10Vi}so 1Viso 12Viso 13Viso 20Viso 21Vi}so 2Viso 23Viso 50Viso 51Viso 52Viso 53Viso 70Viso 80$Block HightBlock ShadwBlock }Nrma DotCnecor$Co}nect_r ArwLocalRw0&Flowchart spe Row_1Row_2Row_3Row_4Row_5CostDurationResour c visVerionFlow Marke$Ta}ged ocumntScaleScaleFctor,Black 1pixue in White 5fl8pt ce]nerd,8pt ce]nerd}oaquBidet(IFCPropsnviible3D_type3D_modeliSolSHShapeC5lsShapeT ySubhapeTyTopElevatin&Work FlwNm aCopy c_entrDocumentDataProcesBasic&45 degresi5nl*45 degresiunl.9,45 degresiunl.1,45 degresinl.16Page-2*45 degresiunl.1Proces.7Document.12Document.13Document.14Document.1Document.1Proces.6,45 degresinl.18OO3,L E3\LG3L/G3 eKD%G3d^iG3DRG3RG3RG3RG3DRG3RG3R!G3R:G3DRSG3RlG3RG3RG3DRG3RG3RG3RG3DRG3R4G3RMG3RfG3DRG3\eK$G3eK"G3eK"G3LfK G3fK %G3REG3d\`(G3-LE3-LE3 .LE3$.LE3<.LE3T.LE3d^G3^G3^G3$_7!G3/ZX&G3-L~E3_G3tE\.G3\G3,Z G3DE\.G3l%LFE3N\V,G3%LG3YZG3<%LE3ZZG3[ZG3ZG3.Z"G3v\A&G3)agG3bG3lGbE3<4LG3$"LE3dC\(G3ti\+G3e\).G3F\W.G3HbG3Da+G3alG3$cl!G3cl!G3Dcl"!G3dclCG3cla!G3clG3a.G  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNUU U UUUU*U./01;@t4"Y,b'@"H$ @ IoC-DgB( A%t4 gB_ A-\k7AJ@O2PR@tO6RH<(H<(JEtS RES R{  g"4FX ,h(?\-@(`,;.=w pgK@PF}LOXU T |\O`}.,OU6dG֔v|OHwV$֏ Tx!1O*)'wm]]sΚ׷f7kٿp…vu~߾}o(G`ɒ%SSSg6rGb p};vlbM0J={)U|7sꇱyUZ#6PԤT{IϽFBTrJOaUk*RAB &sq%wF*Z=o"LF4AId`\\f' r) Et _ m0䅄lU HքJ'Jj2Rir$CE[p,_ϩwOIe?c=-4h4R鄎TWJZ@; o<766v5ׄ<7-d&ւ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Vcqq1ZY^… [nʕ+4Yε %Jһk~l\]v-ÇY\V/ßy5rlledK!4dQ:\]"`OWdxh\ ~655X>JK”Al؟:ugX |$㓗:P7/2"J ! K^ H*L 9E,;8[:YQqT_z06(X6,Fd4WY`Ho8Kl6lU<ࠦRˁkO2e /:KsAe Jx)eWMTY#].w-^J]SY܀Bv(:(KjgYzo"M"Zc H 0` 8>uY $3Vg |e:4PĿH s_b,,[Ol&1Bݴݳg_WHwܣx%hf9:::000<< l `3E`ʲXȈ!,%M'QX5vfgg+uX@YjRz>JYzh%=tB)K{#GWڼ^U1` E D)4GOƒՓhya#E">7>,)\VIJA)V(.W7oWo@EO$,Mʍoaa!͛78t %JkPH_P/vmdr }i!,8"њggا+s# LuaDoc: Documentation Generator Tool for the Lua language
LuaDoc
Documentation Generator Tool for the Lua language

Examples

A documentation example is LuaDoc own source code and the generated documentation. The source code can be browsed from the CVS repository. The generated documentation can be browsed online.

You can also document a Lua library which is written in C. To do that simply write a file with the .luadoc extension and define the function prototypes with the documentation comments. This file will be parsed by LuaDoc and the documentation will be generated.

As an example the LuaFileSystem API was defined in a file called lfs.luadoc. The generated documentation can be browsed online.




















Valid XHTML 1.0!

$Id: examples.html,v 1.3 2007/08/13 15:32:45 carregal Exp $

lua-doc-3.0.1+gitdb9e868/doc/us/examples/000077500000000000000000000000001164166072400176515ustar00rootroot00000000000000lua-doc-3.0.1+gitdb9e868/doc/us/examples/lfs/000077500000000000000000000000001164166072400204355ustar00rootroot00000000000000lua-doc-3.0.1+gitdb9e868/doc/us/examples/lfs/lfs.luadoc000066400000000000000000000077201164166072400224200ustar00rootroot00000000000000 --- LuaFileSystem is a Lua library developed to complement the set of functions -- related to file systems offered by the standard Lua distribution. -- LuaFileSystem offers a portable way to access the underlying directory -- structure and file attributes. module "lfs" --- Returns a table with the file attributes corresponding to -- filepath (or nil followed by an error message -- in case of error). -- If the second optional argument is given, then only the value of the -- named attribute is returned (this use is equivalent to -- lfs.attributes(filepath).aname, but the table is not created -- and only one attribute is retrieved from the O.S.). -- The attributes are described as follows; -- attribute mode is a string, all the others are numbers, -- and the time related attributes use the same time reference of -- os.time. function attributes (filepath, aname) --- Changes the current working directory to the given -- path.
-- Returns true in case of success or nil plus an -- error string. function chdir (path) --- Returns a string with the current working directory or nil -- plus an error string. function currentdir () --- Lua iterator over the entries of a given directory. -- Each time the iterator is called it returns a string with an entry of the -- directory; nil is returned when there is no more entries. -- Raises an error if path is not a directory. function dir (path) --- Locks a file or a part of it. This function works on open files; the -- file handle should be specified as the first argument. -- The string mode could be either -- r (for a read/shared lock) or w (for a -- write/exclusive lock). The optional arguments start -- and length can be used to specify a starting point and -- its length; both should be numbers.
-- Returns true if the operation was successful; in -- case of error, it returns nil plus an error string. function lock (filehandle, mode, start, length) --- Creates a new directory. The argument is the name of the new -- directory.
-- Returns true if the operation was successful; -- in case of error, it returns nil plus an error string. function mkdir (dirname) --- Removes an existing directory. The argument is the name of the directory.
-- Returns true if the operation was successful; -- in case of error, it returns nil plus an error string. function rmdir (dirname) --- Set access and modification times of a file. This function is -- a bind to utime function. The first argument is the -- filename, the second argument (atime) is the access time, -- and the third argument (mtime) is the modification time. -- Both times are provided in seconds (which should be generated with -- Lua standard function os.date). -- If the modification time is omitted, the access time provided is used; -- if both times are omitted, the current time is used.
-- Returns true if the operation was successful; -- in case of error, it returns nil plus an error string. function touch (filepath, atime, mtime) --- Unlocks a file or a part of it. This function works on -- open files; the file handle should be specified as the first -- argument. The optional arguments start and -- length can be used to specify a starting point and its -- length; both should be numbers.
-- Returns true if the operation was successful; -- in case of error, it returns nil plus an error string. function unlock (filehandle, start, length) lua-doc-3.0.1+gitdb9e868/doc/us/index.html000066400000000000000000000131061164166072400200310ustar00rootroot00000000000000 LuaDoc: Documentation Generator Tool for the Lua language
LuaDoc
Documentation Generator Tool for the Lua language

Overview

LuaDoc is a documentation generator tool for Lua source code. It parses the declarations and documentation comments in a set of Lua source files and produces a set of XHTML pages describing the commented declarations and functions.

The output is not limited to XHTML. Other formats can be generated by implementing new doclets. The format of the documentation comments is also flexible and can be customized by implementing new taglets. Please refer to customizing section for further information.

LuaDoc is free software and uses the same license as Lua.

Status

Current version is 3.0.1. It was developed for Lua 5.1.

Download

LuaDoc can be downloaded from its Lua Forge page.

Dependencies

LuaDoc depends on two external packages:

History

Version 3.0.1 [17/Feb/2008]
  • added support to @usage tags (thanks to Rafael Sabbagh Armony)
  • makefile improved to follow kepler standards
  • lualogging dependency is now optional
  • added a rockspec file
Version 3.0.0 [13/Aug/2007]
  • update to Lua 5.1
  • major internal refactoring
Version 2.0 [14/Aug/2002]
  • update to Lua 4.0
Version 1.1 [31/Mar/1999]
  • "DOS/Windows"-safe sources (no problems with "\r\n" line-breaks)
  • new usage subsection
Version 1.0 [15/Mar/1999]

Credits

LuaDoc codebase was designed and developed by Tomás Guisasola. Version 3.0 was refactored by Danilo Tuler and Tomás Guisasola as part of the Kepler Project, which holds its copyright.

Contact us

For more information please contact us or join the Kepler mailing list. Comments are welcome!

Valid XHTML 1.0!

$Id: index.html,v 1.19 2008/02/17 06:42:51 jasonsantos Exp $

lua-doc-3.0.1+gitdb9e868/doc/us/license.html000066400000000000000000000114531164166072400203470ustar00rootroot00000000000000 LuaDoc: Documentation Generator Tool for the Lua language
LuaDoc
Documentation Generator Tool for the Lua language

License

LuaDoc is free software: it can be used for both academic and commercial purposes at absolutely no cost. There are no royalties or GNU-like "copyleft" restrictions. LuaDoc qualifies as Open Source software. Its licenses are compatible with GPL. LuaDoc is not in the public domain and the Kepler Project keep its copyright. The legal details are below.

The spirit of the license is that you are free to use LuaDoc for any purpose at no cost without having to ask us. The only requirement is that if you do use LuaDoc, then you should give us credit by including the appropriate copyright notice somewhere in your product or its documentation.

The LuaDoc is designed and implemented by Danilo Tuler and Tomás Guisasola. The implementation is not derived from licensed software.


Copyright © 2004-2007 The Kepler Project.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Valid XHTML 1.0!

$Id: license.html,v 1.6 2007/08/13 15:32:45 carregal Exp $

lua-doc-3.0.1+gitdb9e868/doc/us/lua.png000066400000000000000000000236561164166072400173360ustar00rootroot00000000000000PNG  IHDR>abKGD pHYsHHFk>'IDATxwXTGneei"AQ)F(Xbb4yI5o Qc vQRD@"edt{?H/e<>0gf;s (x u+;xygo9 -3wraX0Lyݺ6[E@Q/;;{@ PWWWϜ9[¨6<00pQzNN7nd2sΑVK@0an^4VOOLKK0Bhm0ڄ]]u`E L:;; ts2 (>|'GGH[UԛW,ې䊾(P(:^J $x<COz|~ww6 1en+O\\hnQnb9me8^ @ $XFfH$NHH8^PP0a}6DB߽{w|@e0Lꀢ(N"趶Z CCìɇ|uKK$Uv0B:vѺmRbȒVw9sg yPGEQpڵ<bɒ%sttt*rssBP:H$a{{e|R| !H;vlDHHH_WW=[wX;0l))Փ- Ox֭[x|mg@=zsɒ%󭬬|sPMMH$| &l6UH{hsPJTEg i8 #w̙[vuο*cllL$AccU?8@XMMMpJRSj]e#a_pssWQQ1֭[?ݥ%}ӥR)A@&.0aB F>ջGBϙ3g^v- Ar@$eXqí4:tJSEQbNN7pMM s~q[LT*HII%333< `'FSw<.vv [T P B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Nۯ ]F#?4="4y&%%'?2No})^bfM|)555 6Q(FyWHR H9>Aソٳ罷oرw͸T:.\\ 999SfͲ9uE%Xooﯭ#d0,-22>u۸qJhj궊|?.ol ޽rVMHS)=:SNfnn~MzpgϞbffd3DҎDR͘OxT9Q,xbH!9aacOٟPg(eEˣEEE]~ᇳT*Wu47ŕ_^rrOssR/UL ȾOe1sΝfgg8c ^*0Z\EEMNmuu]C!q Ғ^=f~IL3N)׺:o''T7I`OO)Dj'IR .77 R JF/tJ;Whk׮n`` é1dT~i0{FFR77K6wpy-(BiiiMMM^.O>|qPPЗgpH$:gΜIu:4eʔ[G(B|>˕|bD/c~F5͝;w9t`4(D:p( e;VZj``P AЈMYx</&8q"Y U1bC(@CLHOOZXXo``PHh/yxx쳰A _7O$G灩[^pssL&(^ź$1B Ũ1^sG55ש˖/~zS2p\`@/0 E/)**>̢RUsѣGDf:::aٗxu,Z菊655`iii}xX,fxh"ðzGGâݢ՚N׹TsUU<Efff ù,(E$չ׻XYYYjC$[ ڵkx!&GFF555Nvpp©iCrgvuuD"T*5J`ҤI;IRJKKxVMP nU[i7nxgo9 -bR0 LuaDoc: Documentation Generator Tool for the Lua language
LuaDoc
Documentation Generator Tool for the Lua language

Introduction

LuaDoc is a documentation generation tool for lua source files. It does not impose a documentation format, but suggests one (XHTML) and implements it. The produced documentation can be of any type.

LuaDoc can be used out-of-the-box, provided that the source code is documented in the proposed format.

Installation

LuaDoc tool is composed by two parts, a library, and a launcher script.

The library follows the package model for Lua 5.1 and therefore should be "installed" in your package.path.

The launcher script, namely luadoc.lua for Unix and luadoc.bat for Windows, should be installed in your system PATH, so that it can be executed.

LuaDoc also depends on two external packages: LuaFileSystem and LuaLogging, and you'll need to install them accordingly.

On Unix boxes, the file luadoc.lua could be used as a script; it's the same as:

lua5.1 luadoc.lua [options|files]

This is the main script: it will load LuaDoc library and process the specified files. Try luadoc.lua --help, it will show you all available options.

How to comment

LuaDoc looks for the sequence of three minus signs (---). This sequence of characters indicates the beginning of a documented comment. The documentation ends with the first line of code found.

The following code defines a function and its documentation.

--- Define special sequences of characters.
-- For each pair (find, subs), the function will create a field named with
-- find which has the value of subs.
-- It also creates an index for the table, according to the order of insertion.
-- @param subs The replacement pattern.
-- @param find The pattern to find.
function def_escapes (find, subs)
   local special = { t = "\t", n = "\n", ['"'] = '"', ['\\'] = '\\', }
   find = gsub (find, "\\(.)", function (x) return %special[x] or x end)
   subs = gsub (subs, "\\(.)", function (x) return %special[x] or x end)
   escape_sequences.n = escape_sequences.n+1
   escape_sequences[escape_sequences.n] = find
   escape_sequences[find] = subs
end

The first sentence (until the first period) will be the resume. The last two, which begins with -- @param, will compound the parameters section. The other lines will complete the description of the function. The corresponding documentation should be something like:

def_escapes (find, subs)
Define special sequences of characters. For each pair (find, subs), the function will create a field named with find which has the value of subs. It also creates an index for the table, according to the order of insertion.

Parameters

  • find: The pattern to find.
  • subs: The replacement pattern.

A good example is the LuaDoc system itself. You can build the documentation by executing the following line from the LuaDoc directory:

luadoc.lua *.lua

It will produce one HTML file for each Lua file and an index file. You can browse them here.

Tags

LuaDoc can parse some tags at each function or table documentation. Tags are indicated in the source code with a `@' character followed by the name of the tag:

@author <text>
An author of the module or file.
@copyright <text>
The copyright notice of the module or file. LuaDoc adds a © sign between the label (Copyright) and the given text (e.g. 2004-2007 Kepler Project).
@field
Describe a table field definition.
@param <word> <text>
Describe function parameters. It requires the name of the parameter and its description.
@release <text>
Free format string to describe the module or file release.
@return <text>
Describe a returning value of the function. Since Lua can return multiple values, this tag should appear more than once.
@see <text>
Refers to other descriptions of functions or tables.
@usage <text>
Describe the usage of the function or variable.

Infered Tags

The following tags would be normally infered by LuaDoc, but they can be used to override the infered value.

@class <word>
If LuaDoc cannot infer the type of documentation (function, table or module definition), the programmer can specify it explicitly.
@description
The description of the function or table. This is usually infered automatically.
@name <word>
The name of the function or table definition. This is usually infered from the code analysis, and the programmer does not need to define it. If LuaDoc can infer the name of the function automatically it's even not recomended to define the name explicitly, to avoid redundancy.

Text indentation and linebreaks

LuaDoc parses text in such a way that it concatenates text on individual lines and removes trailing and leading whitespace in the process. To prevent LuaDoc from doing this and to retain the original linebreaks and indentation end the tag with a `#' character, for example '@usage#'. This is especially usefull for multiline code examples in the usage tag, where you want the example code to remain properly indented for readability. Run LuaDoc on the included test file to see the results. Warning; you must make sure that the doclet you are using supports this format.

Command line options

The luadoc command line script has some options:

-d <path>
Defines the output directory path. Default is the current dir.
-h, --help
Show help instructions
--noindexpage
Do not generate the index page.
--nofiles
Do not generate documentation focused on files.
--nomodules
Do not generate documentation focused on modules.
--doclet <doclet_module>
Doclet module used to generate output
--taglet <taglet_module>
Taglet module used to parse input code
-q, --quiet
Suppress info output
-v, --version
Print version information

Valid XHTML 1.0!

$Id: manual.html,v 1.10 2007/10/12 13:33:45 tomas Exp $

lua-doc-3.0.1+gitdb9e868/rockspecs/000077500000000000000000000000001164166072400166335ustar00rootroot00000000000000lua-doc-3.0.1+gitdb9e868/rockspecs/luadoc-3.0.1-1.rockspec000066400000000000000000000016621164166072400224350ustar00rootroot00000000000000package = "LuaDoc" version = "3.0.1-1" source = { url = "http://luaforge.net/frs/download.php/2557/luadoc-3.0.1.tar.gz" } description = { summary = "LuaDoc is a documentation tool for Lua source code", detailed = [[ LuaDoc is a documentation generator tool for Lua source code. It parses the declarations and documentation comments in a set of Lua source files and produces a set of XHTML pages describing the commented declarations and functions. The output is not limited to XHTML. Other formats can be generated by implementing new doclets. The format of the documentation comments is also flexible and can be customized by implementing new taglets. ]], license = "MIT/X11", homepage = "http://luadoc.luaforge.net/" } dependencies = { "lualogging >= 1.1.3", "luafilesystem >= 1.2.1", } build = { type = "make", variables = { LUA_DIR = "$(LUADIR)", SYS_BINDIR = "$(BINDIR)" } } lua-doc-3.0.1+gitdb9e868/rockspecs/luadoc-cvs-1.rockspec000066400000000000000000000017031164166072400225650ustar00rootroot00000000000000package = "LuaDoc" version = "cvs-1" source = { url = "cvs://:pserver:anonymous:@cvs.luaforge.net:/cvsroot/luadoc", cvs_tag = "HEAD", } description = { summary = "LuaDoc is a documentation tool for Lua source code", detailed = [[ LuaDoc is a documentation generator tool for Lua source code. It parses the declarations and documentation comments in a set of Lua source files and produces a set of XHTML pages describing the commented declarations and functions. The output is not limited to XHTML. Other formats can be generated by implementing new doclets. The format of the documentation comments is also flexible and can be customized by implementing new taglets. ]], license = "MIT/X11", homepage = "http://luadoc.luaforge.net/" } dependencies = { "lualogging >= 1.1.3", "luafilesystem >= 1.2.1", } build = { type = "make", variables = { LUA_DIR = "$(LUADIR)", SYS_BINDIR = "$(BINDIR)" } } lua-doc-3.0.1+gitdb9e868/src/000077500000000000000000000000001164166072400154265ustar00rootroot00000000000000lua-doc-3.0.1+gitdb9e868/src/luadoc.bat000066400000000000000000000001061164166072400173620ustar00rootroot00000000000000@echo off lua5.1 c:\lua5.1\luadoc_start.lua %1 %2 %3 %4 %5 %6 %7 %8 %9lua-doc-3.0.1+gitdb9e868/src/luadoc.lua.in000066400000000000000000000062411164166072400200100ustar00rootroot00000000000000#!/usr/bin/env lua ------------------------------------------------------------------------------- -- LuaDoc launcher. -- @release $Id: luadoc.lua.in,v 1.1 2008/02/17 06:42:51 jasonsantos Exp $ ------------------------------------------------------------------------------- require "luadoc" ------------------------------------------------------------------------------- -- Print version number. local function print_version () print (string.format("%s\n%s\n%s", luadoc._VERSION, luadoc._DESCRIPTION, luadoc._COPYRIGHT)) end ------------------------------------------------------------------------------- -- Print usage message. local function print_help () print ("Usage: "..arg[0]..[[ [options|files] Generate documentation from files. Available options are: -d path output directory path -t path template directory path -h, --help print this help and exit --noindexpage do not generate global index page --nofiles do not generate documentation for files --nomodules do not generate documentation for modules --doclet doclet_module doclet module to generate output --taglet taglet_module taglet module to parse input code -q, --quiet suppress all normal output -v, --version print version information]]) end local function off_messages (arg, i, options) options.verbose = nil end ------------------------------------------------------------------------------- -- Process options. TODO: use getopts. -- @class table -- @name OPTIONS local OPTIONS = { d = function (arg, i, options) local dir = arg[i+1] if string.sub (dir, -2) ~= "/" then dir = dir..'/' end options.output_dir = dir return 1 end, t = function (arg, i, options) local dir = arg[i+1] if string.sub (dir, -2) ~= "/" then dir = dir..'/' end options.template_dir = dir return 1 end, h = print_help, help = print_help, q = off_messages, quiet = off_messages, v = print_version, version = print_version, doclet = function (arg, i, options) options.doclet = arg[i+1] return 1 end, taglet = function (arg, i, options) options.taglet = arg[i+1] return 1 end, } ------------------------------------------------------------------------------- local function process_options (arg) local files = {} local options = require "luadoc.config" local i = 1 while i <= #arg do local argi = arg[i] if string.sub (argi, 1, 1) ~= '-' then table.insert (files, argi) else local opt = string.sub (argi, 2) if string.sub (opt, 1, 1) == '-' then opt = string.gsub (opt, "%-", "") end if OPTIONS[opt] then if OPTIONS[opt] (arg, i, options) then i = i + 1 end else options[opt] = 1 end end i = i+1 end return files, options end ------------------------------------------------------------------------------- -- Main function. Process command-line parameters and call luadoc processor. function main (arg) -- Process options local argc = #arg if argc < 1 then print_help () return end local files, options = process_options (arg) return luadoc.main(files, options) end main(arg) lua-doc-3.0.1+gitdb9e868/src/luadoc/000077500000000000000000000000001164166072400166755ustar00rootroot00000000000000lua-doc-3.0.1+gitdb9e868/src/luadoc/config.lua000066400000000000000000000023221164166072400206440ustar00rootroot00000000000000------------------------------------------------------------------------------- -- LuaDoc configuration file. This file contains the default options for -- luadoc operation. These options can be overriden by the command line tool -- @see luadoc.print_help -- @release $Id: config.lua,v 1.6 2007/04/18 14:28:39 tomas Exp $ ------------------------------------------------------------------------------- module "luadoc.config" ------------------------------------------------------------------------------- -- Default options -- @class table -- @name default_options -- @field output_dir default output directory for generated documentation, used -- by several doclets -- @field taglet parser used to analyze source code input -- @field doclet documentation generator -- @field template_dir directory with documentation templates, used by the html -- doclet -- @field verbose command line tool configuration to output processing -- information local default_options = { output_dir = "", taglet = "luadoc.taglet.standard", doclet = "luadoc.doclet.html", -- TODO: find a way to define doclet specific options template_dir = "luadoc/doclet/html/", nomodules = false, nofiles = false, verbose = true, } return default_options lua-doc-3.0.1+gitdb9e868/src/luadoc/doclet/000077500000000000000000000000001164166072400201475ustar00rootroot00000000000000lua-doc-3.0.1+gitdb9e868/src/luadoc/doclet/debug.lua000066400000000000000000000020301164166072400217330ustar00rootroot00000000000000----------------------------------------------------------------- -- LuaDoc debugging facilities. -- @release $Id: debug.lua,v 1.3 2007/04/18 14:28:39 tomas Exp $ ----------------------------------------------------------------- module "luadoc.doclet.debug" function printline() print(string.rep('-', 79)) end ----------------------------------------------------------------- -- Print debug information about document -- @param doc Table with the structured documentation. function start (doc) print("Files:") for _, filepath in ipairs(doc.files) do print('\t', filepath) end printline() print("Modules:") for _, modulename in ipairs(doc.modules) do print('\t', modulename) end printline() for i, v in pairs(doc.files) do print('\t', i, v) end printline() for i, v in pairs(doc.files[doc.files[1]]) do print(i, v) end printline() for i, v in pairs(doc.files[doc.files[1]].doc[1]) do print(i, v) end printline() print("Params") for i, v in pairs(doc.files[doc.files[1]].doc[1].param) do print(i, v) end end lua-doc-3.0.1+gitdb9e868/src/luadoc/doclet/formatter.lua000066400000000000000000000047721164166072400226670ustar00rootroot00000000000000------------------------------------------------------------------------------- -- Doclet to format source code according to LuaDoc standard tags. This doclet -- (re)write .lua files adding missing standard tags. Texts are formatted to -- 80 columns and function parameters are added based on code analysis. -- -- @release $Id: formatter.lua,v 1.5 2007/04/18 14:28:39 tomas Exp $ ------------------------------------------------------------------------------- local util = require "luadoc.util" local assert, ipairs, pairs, type = assert, ipairs, pairs, type local string = require"string" local table = require"table" module "luadoc.doclet.formatter" options = { output_dir = "./", } ------------------------------------------------------------------------------- -- Assembly the output filename for an input file. -- TODO: change the name of this function function out_file (filename) local h = filename h = options.output_dir..h return h end ------------------------------------------------------------------------------- -- Generate a new lua file for each input lua file. If the user does not -- specify a different output directory input files will be rewritten. -- @param doc documentation table function start (doc) local todo = "" -- Process files for i, file_doc in ipairs(doc.files) do -- assembly the filename local filename = out_file(file_doc.name) luadoc.logger:info(string.format("generating file `%s'", filename)) -- TODO: confirm file overwrite local f = lfs.open(filename, "w") assert(f, string.format("could not open `%s' for writing", filename)) for _, block in ipairs(file_doc.doc) do -- write reorganized comments f:write(string.rep("-", 80).."\n") -- description f:write(util.comment(util.wrap(block.description, 77))) f:write("\n") if block.class == "function" then -- parameters table.foreachi(block.param, function (_, param_name) f:write(util.comment(util.wrap(string.format("@param %s %s", param_name, block.param[param_name] or todo), 77))) f:write("\n") end) -- return if type(block.ret) == "table" then table.foreachi(block.ret, function (_, ret) f:write(util.comment(util.wrap(string.format("@return %s", ret), 77)).."\n") end) else f:write(util.comment(util.wrap(string.format("@return %s", block.ret or todo), 77)).."\n") end end -- TODO: usage -- TODO: see -- write code for _, line in ipairs(block.code) do f:write(line.."\n") end end f:close() end end lua-doc-3.0.1+gitdb9e868/src/luadoc/doclet/html.lua000066400000000000000000000222761164166072400216270ustar00rootroot00000000000000------------------------------------------------------------------------------- -- Doclet that generates HTML output. This doclet generates a set of html files -- based on a group of templates. The main templates are: --
    --
  • index.lp: index of modules and files;
  • --
  • file.lp: documentation for a lua file;
  • --
  • module.lp: documentation for a lua module;
  • --
  • function.lp: documentation for a lua function. This is a -- sub-template used by the others.
  • --
-- -- @release $Id: html.lua,v 1.29 2007/12/21 17:50:48 tomas Exp $ ------------------------------------------------------------------------------- local assert, getfenv, ipairs, loadstring, pairs, setfenv, tostring, tonumber, type = assert, getfenv, ipairs, loadstring, pairs, setfenv, tostring, tonumber, type local io = require"io" local lfs = require "lfs" local lp = require "luadoc.lp" local luadoc = require"luadoc" local package = package local string = require"string" local table = require"table" module "luadoc.doclet.html" ------------------------------------------------------------------------------- -- Looks for a file `name' in given path. Removed from compat-5.1 -- @param path String with the path. -- @param name String with the name to look for. -- @return String with the complete path of the file found -- or nil in case the file is not found. local function search (path, name) for c in string.gfind(path, "[^;]+") do c = string.gsub(c, "%?", name) local f = io.open(c) if f then -- file exist? f:close() return c end end return nil -- file not found end ------------------------------------------------------------------------------- -- Include the result of a lp template into the current stream. function include (template, env) -- template_dir is relative to package.path local templatepath = options.template_dir .. template -- search using package.path (modified to search .lp instead of .lua local search_path = string.gsub(package.path, "%.lua", "") local templatepath = search(search_path, templatepath) assert(templatepath, string.format("template `%s' not found", template)) env = env or {} env.table = table env.io = io env.lp = lp env.ipairs = ipairs env.tonumber = tonumber env.tostring = tostring env.type = type env.luadoc = luadoc env.options = options return lp.include(templatepath, env) end ------------------------------------------------------------------------------- -- Returns a link to a html file, appending "../" to the link to make it right. -- @param html Name of the html file to link to -- @return link to the html file function link (html, from) local h = html from = from or "" string.gsub(from, "/", function () h = "../" .. h end) return h end ------------------------------------------------------------------------------- -- Returns the name of the html file to be generated from a module. -- Files with "lua" or "luadoc" extensions are replaced by "html" extension. -- @param modulename Name of the module to be processed, may be a .lua file or -- a .luadoc file. -- @return name of the generated html file for the module function module_link (modulename, doc, from) -- TODO: replace "." by "/" to create directories? -- TODO: how to deal with module names with "/"? assert(modulename) assert(doc) from = from or "" if doc.modules[modulename] == nil then -- logger:error(string.format("unresolved reference to module `%s'", modulename)) return end local href = "modules/" .. modulename .. ".html" string.gsub(from, "/", function () href = "../" .. href end) return href end ------------------------------------------------------------------------------- -- Returns the name of the html file to be generated from a lua(doc) file. -- Files with "lua" or "luadoc" extensions are replaced by "html" extension. -- @param to Name of the file to be processed, may be a .lua file or -- a .luadoc file. -- @param from path of where am I, based on this we append ..'s to the -- beginning of path -- @return name of the generated html file function file_link (to, from) assert(to) from = from or "" local href = to href = string.gsub(href, "lua$", "html") href = string.gsub(href, "luadoc$", "html") href = "files/" .. href string.gsub(from, "/", function () href = "../" .. href end) return href end ------------------------------------------------------------------------------- -- Returns a link to a function or to a table -- @param fname name of the function or table to link to. -- @param doc documentation table -- @param kind String specying the kinf of element to link ("functions" or "tables"). function link_to (fname, doc, module_doc, file_doc, from, kind) assert(fname) assert(doc) from = from or "" kind = kind or "functions" if file_doc then for _, func_name in pairs(file_doc[kind]) do if func_name == fname then return file_link(file_doc.name, from) .. "#" .. fname end end end local _, _, modulename, fname = string.find(fname, "^(.-)[%.%:]?([^%.%:]*)$") assert(fname) -- if fname does not specify a module, use the module_doc if string.len(modulename) == 0 and module_doc then modulename = module_doc.name end local module_doc = doc.modules[modulename] if not module_doc then -- logger:error(string.format("unresolved reference to function `%s': module `%s' not found", fname, modulename)) return end for _, func_name in pairs(module_doc[kind]) do if func_name == fname then return module_link(modulename, doc, from) .. "#" .. fname end end -- logger:error(string.format("unresolved reference to function `%s' of module `%s'", fname, modulename)) end ------------------------------------------------------------------------------- -- Make a link to a file, module or function function symbol_link (symbol, doc, module_doc, file_doc, from) assert(symbol) assert(doc) local href = -- file_link(symbol, from) or module_link(symbol, doc, from) or link_to(symbol, doc, module_doc, file_doc, from, "functions") or link_to(symbol, doc, module_doc, file_doc, from, "tables") if not href then logger:error(string.format("unresolved reference to symbol `%s'", symbol)) end return href or "" end ------------------------------------------------------------------------------- -- Assembly the output filename for an input file. -- TODO: change the name of this function function out_file (filename) local h = filename h = string.gsub(h, "lua$", "html") h = string.gsub(h, "luadoc$", "html") h = "files/" .. h -- h = options.output_dir .. string.gsub (h, "^.-([%w_]+%.html)$", "%1") h = options.output_dir .. h return h end ------------------------------------------------------------------------------- -- Assembly the output filename for a module. -- TODO: change the name of this function function out_module (modulename) local h = modulename .. ".html" h = "modules/" .. h h = options.output_dir .. h return h end ------------------------------------------------------------------------------- -- Update a table to make all string values refelect html tags for linebreaks -- a leading spaces. function fixhtmltable (doc) for k,v in pairs(doc) do if type(v) == "string" then -- update string value local s = string.gsub(v, "\n", "
") s = string.gsub(s, "
", "
 ") while string.find(s, "  ") do s = string.gsub(s, "  ", "  ") end doc[k] = s elseif type(v) == "table" then -- recurse update table fixhtmltable(v) end end end ----------------------------------------------------------------- -- Generate the output. -- @param doc Table with the structured documentation. function start (doc) -- Pre proces doc table, replacing linebreaks and leading space by html equiv. fixhtmltable(doc) -- Generate index file if (#doc.files > 0 or #doc.modules > 0) and (not options.noindexpage) then local filename = options.output_dir.."index.html" logger:info(string.format("generating file `%s'", filename)) local f = lfs.open(filename, "w") assert(f, string.format("could not open `%s' for writing", filename)) io.output(f) include("index.lp", { doc = doc }) f:close() end -- Process modules if not options.nomodules then for _, modulename in ipairs(doc.modules) do local module_doc = doc.modules[modulename] -- assembly the filename local filename = out_module(modulename) logger:info(string.format("generating file `%s'", filename)) local f = lfs.open(filename, "w") assert(f, string.format("could not open `%s' for writing", filename)) io.output(f) include("module.lp", { doc = doc, module_doc = module_doc }) f:close() end end -- Process files if not options.nofiles then for _, filepath in ipairs(doc.files) do local file_doc = doc.files[filepath] -- assembly the filename local filename = out_file(file_doc.name) logger:info(string.format("generating file `%s'", filename)) local f = lfs.open(filename, "w") assert(f, string.format("could not open `%s' for writing", filename)) io.output(f) include("file.lp", { doc = doc, file_doc = file_doc} ) f:close() end end -- copy extra files local f = lfs.open(options.output_dir.."luadoc.css", "w") io.output(f) include("luadoc.css") f:close() end lua-doc-3.0.1+gitdb9e868/src/luadoc/doclet/html/000077500000000000000000000000001164166072400211135ustar00rootroot00000000000000lua-doc-3.0.1+gitdb9e868/src/luadoc/doclet/html/file.lp000066400000000000000000000057071164166072400224000ustar00rootroot00000000000000 Luadocs for <%= file_doc.name %>

File <%=file_doc.name%>

<%if file_doc.description then%>

<%=file_doc.description%>

<%end%> <%if file_doc.author then%>

<%= #file_doc.author>1 and "Authors" or "Author" %>: <%for _, author in ipairs(file_doc.author) do%> <%end%>
<%= author %>

<%end%> <%if file_doc.copyright then%>

Copyright ©<%=file_doc.copyright%>

<%end%> <%if file_doc.release then%>

Release: <%=file_doc.release%>

<%end%> <%if #file_doc.functions > 0 then%>

Functions

<%for _, func_name in ipairs(file_doc.functions) do local func_data = file_doc.functions[func_name]%> <%end%>
<%=func_data.private and "local " or ""%><%=func_name%> (<%=table.concat(func_data.param, ", ")%>) <%=func_data.summary%>
<%end%> <%if #file_doc.tables > 0 then%>

Tables

<%for _, tab_name in ipairs(file_doc.tables) do%> <%end%>
<%=tab_name%> <%=file_doc.tables[tab_name].summary%>
<%end%>

<%if #file_doc.functions > 0 then%>

Functions

<%for _, func_name in ipairs(file_doc.functions) do%> <%=luadoc.doclet.html.include("function.lp", { doc=doc, file_doc=file_doc, func=file_doc.functions[func_name] })%> <%end%>
<%end%> <%if #file_doc.tables > 0 then%>

Tables

<%for _, tab_name in ipairs(file_doc.tables) do%> <%=luadoc.doclet.html.include("table.lp", { doc=doc, file_doc=file_doc, tab=file_doc.tables[tab_name] })%> <%end%>
<%end%>

Valid XHTML 1.0!

lua-doc-3.0.1+gitdb9e868/src/luadoc/doclet/html/function.lp000066400000000000000000000025061164166072400233000ustar00rootroot00000000000000<% if module_doc then from = "modules/"..module_doc.name elseif file_doc then from = "files/.."..file_doc.name else from = "" end %>
<%=func.private and "local " or ""%><%=func.name%> (<%=table.concat(func.param, ", ")%>)
<%=func.description or ""%> <%if type(func.param) == "table" and #func.param > 0 then%>

Parameters

    <%for p = 1, #func.param do%>
  • <%=func.param[p]%>: <%=func.param[func.param[p]] or ""%>
  • <%end%>
<%end%> <%if type(func.usage) == "string" then%>

Usage:

<%=func.usage%> <%elseif type(func.usage) == "table" then%>

Usage

    <%for _, usage in ipairs(func.usage) do%>
  • <%= usage %> <%end%>
<%end%> <%if type(func.ret) == "string" then%>

Return value:

<%=func.ret%> <%elseif type(func.ret) == "table" then%>

Return values:

    <%for _, ret in ipairs(func.ret) do%>
  1. <%= ret %> <%end%>
<%end%> <%if type(func.see) == "string" then %>

See also:

<%=func.see%> <%elseif type(func.see) == "table" and #func.see > 0 then %>

See also:

<%end%>
lua-doc-3.0.1+gitdb9e868/src/luadoc/doclet/html/index.lp000066400000000000000000000036321164166072400225630ustar00rootroot00000000000000 <% if not options.nomodules and doc.modules[1] then %> <%= ("%s: "):format(doc.modules[1]) %> <% end %> Luadocs Index " type="text/css" />
<%if not options.nomodules and #doc.modules > 0 then%>

Modules

<%for _, modulename in ipairs(doc.modules) do%> <%end%>
<%=modulename%> <%=doc.modules[modulename].summary%>
<%end%> <%if not options.nofiles and #doc.files > 0 then%>

Files

<%for _, filepath in ipairs(doc.files) do%> <%end%>
<%=filepath%>
<%end%>

Valid XHTML 1.0!

lua-doc-3.0.1+gitdb9e868/src/luadoc/doclet/html/luadoc.css000066400000000000000000000124001164166072400230710ustar00rootroot00000000000000body { margin-left: 1em; margin-right: 1em; font-family: arial, helvetica, geneva, sans-serif; background-color:#ffffff; margin:0px; } code { font-family: "Andale Mono", monospace; } tt { font-family: "Andale Mono", monospace; } body, td, th { font-size: 11pt; } h1, h2, h3, h4 { margin-left: 0em; } textarea, pre, tt { font-size:10pt; } body, td, th { color:#000000; } small { font-size:0.85em; } h1 { font-size:1.5em; } h2 { font-size:1.25em; } h3 { font-size:1.15em; } h4 { font-size:1.06em; } a:link { font-weight:bold; color: #004080; text-decoration: none; } a:visited { font-weight:bold; color: #006699; text-decoration: none; } a:link:hover { text-decoration:underline; } hr { color:#cccccc } img { border-width: 0px; } h3 { padding-top: 1em; } p { margin-left: 1em; } p.name { font-family: "Andale Mono", monospace; padding-top: 1em; margin-left: 0em; } blockquote { margin-left: 3em; } pre.example { background-color: rgb(245, 245, 245); border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: silver; border-right-color: silver; border-bottom-color: silver; border-left-color: silver; padding: 1em; margin-left: 1em; margin-right: 1em; font-family: "Andale Mono", monospace; font-size: smaller; } hr { margin-left: 0em; background: #00007f; border: 0px; height: 1px; } ul { list-style-type: disc; } table.index { border: 1px #00007f; } table.index td { text-align: left; vertical-align: top; } table.index ul { padding-top: 0em; margin-top: 0em; } table { border: 1px solid black; border-collapse: collapse; margin-left: auto; margin-right: auto; } th { border: 1px solid black; padding: 0.5em; } td { border: 1px solid black; padding: 0.5em; } div.header, div.footer { margin-left: 0em; } #container { margin-left: 1em; margin-right: 1em; background-color: #f0f0f0; } #product { text-align: center; border-bottom: 1px solid #cccccc; background-color: #ffffff; } #product big { font-size: 2em; } #product_logo { } #product_name { } #product_description { } #main { background-color: #f0f0f0; border-left: 2px solid #cccccc; } #navigation { float: left; width: 18em; margin: 0; vertical-align: top; background-color: #f0f0f0; overflow:visible; } #navigation h1 { background-color:#e7e7e7; font-size:1.1em; color:#000000; text-align:left; margin:0px; padding:0.2em; border-top:1px solid #dddddd; border-bottom:1px solid #dddddd; } #navigation ul { font-size:1em; list-style-type: none; padding: 0; margin: 1px; } #navigation li { text-indent: -1em; margin: 0em 0em 0em 0.5em; display: block; padding: 3px 0px 0px 12px; } #navigation li li a { padding: 0px 3px 0px -1em; } #content { margin-left: 18em; padding: 1em; border-left: 2px solid #cccccc; border-right: 2px solid #cccccc; background-color: #ffffff; } #about { clear: both; margin: 0; padding: 5px; border-top: 2px solid #cccccc; background-color: #ffffff; } @media print { body { font: 12pt "Times New Roman", "TimeNR", Times, serif; } a { font-weight:bold; color: #004080; text-decoration: underline; } #main { background-color: #ffffff; border-left: 0px; } #container { margin-left: 2%; margin-right: 2%; background-color: #ffffff; } #content { margin-left: 0px; padding: 1em; border-left: 0px; border-right: 0px; background-color: #ffffff; } #navigation { display: none; } pre.example { font-family: "Andale Mono", monospace; font-size: 10pt; page-break-inside: avoid; } } table.module_list td { border-width: 1px; padding: 3px; border-style: solid; border-color: #cccccc; } table.module_list td.name { background-color: #f0f0f0; } table.module_list td.summary { width: 100%; } table.file_list { border-width: 1px; border-style: solid; border-color: #cccccc; border-collapse: collapse; } table.file_list td { border-width: 1px; padding: 3px; border-style: solid; border-color: #cccccc; } table.file_list td.name { background-color: #f0f0f0; } table.file_list td.summary { width: 100%; } table.function_list { border-width: 1px; border-style: solid; border-color: #cccccc; border-collapse: collapse; } table.function_list td { border-width: 1px; padding: 3px; border-style: solid; border-color: #cccccc; } table.function_list td.name { background-color: #f0f0f0; } table.function_list td.summary { width: 100%; } table.table_list { border-width: 1px; border-style: solid; border-color: #cccccc; border-collapse: collapse; } table.table_list td { border-width: 1px; padding: 3px; border-style: solid; border-color: #cccccc; } table.table_list td.name { background-color: #f0f0f0; } table.table_list td.summary { width: 100%; } dl.function dt {border-top: 1px solid #ccc; padding-top: 1em;} dl.function dd {padding-bottom: 1em;} dl.function h3 {padding: 0; margin: 0; font-size: medium;} dl.table dt {border-top: 1px solid #ccc; padding-top: 1em;} dl.table dd {padding-bottom: 1em;} dl.table h3 {padding: 0; margin: 0; font-size: medium;} #TODO: make module_list, file_list, function_list, table_list inherit from a list lua-doc-3.0.1+gitdb9e868/src/luadoc/doclet/html/menu.lp000066400000000000000000000020741164166072400224170ustar00rootroot00000000000000<% if module_doc then from = "modules/"..module_doc.name elseif file_doc then from = "files/.."..file_doc.name else from = "" end %>

LuaDoc

    <%if not module_doc and not file_doc then%>
  • Index
  • <%else%>
  • ">Index
  • <%end%>
<%if not options.nomodules and #doc.modules > 0 then%>

Modules

    <%for _, modulename in ipairs(doc.modules) do if module_doc and module_doc.name == modulename then%>
  • <%=modulename%>
  • <%else%>
  • <%=modulename%>
  • <% end end%>
<%end%> <%if not options.nofiles and #doc.files > 0 then%>

Files

    <%for _, filepath in ipairs(doc.files) do if file_doc and file_doc.name == filepath then%>
  • <%=filepath%>
  • <%else%>
  • <%=filepath%>
  • <% end end%>
<%end%> lua-doc-3.0.1+gitdb9e868/src/luadoc/doclet/html/module.lp000066400000000000000000000060071164166072400227400ustar00rootroot00000000000000 <%= module_doc.name %>: Module Index

Module <%=module_doc.name%>

<%=module_doc.description%>

<%if module_doc.author then%>

<%= #module_doc.author>1 and "Authors" or "Author" %>: <%for _, author in ipairs(module_doc.author) do%> <%end%>
<%= author %>

<%end%> <%if module_doc.copyright then%>

Copyright© <%=module_doc.copyright%>

<%end%> <%if module_doc.release then%>

Release: <%=module_doc.release%>

<%end%> <%if #module_doc.functions > 0 then%>

Functions

<%for _, func_name in ipairs(module_doc.functions) do local func_data = module_doc.functions[func_name]%> <%end%>
<%=func_data.private and "local " or ""%><%=func_name%> (<%=table.concat(module_doc.functions[func_name].param, ", ")%>) <%=module_doc.functions[func_name].summary%>
<%end%> <%if #module_doc.tables > 0 then%>

Tables

<%for _, tab_name in ipairs(module_doc.tables) do%> <%end%>
<%=tab_name%> <%=module_doc.tables[tab_name].summary%>
<%end%>

<%if #module_doc.functions > 0 then%>

Functions

<%for _, func_name in ipairs(module_doc.functions) do%> <%=luadoc.doclet.html.include("function.lp", { doc=doc, module_doc=module_doc, func=module_doc.functions[func_name] })%> <%end%>
<%end%> <%if #module_doc.tables > 0 then%>

Tables

<%for _, tab_name in ipairs(module_doc.tables) do%> <%=luadoc.doclet.html.include("table.lp", { doc=doc, module_doc=module_doc, tab=module_doc.tables[tab_name] })%> <%end%>
<%end%>

Valid XHTML 1.0!

lua-doc-3.0.1+gitdb9e868/src/luadoc/doclet/html/table.lp000066400000000000000000000004571164166072400225450ustar00rootroot00000000000000
<%=tab.name%>
<%=tab.description%> <%if type(tab.field) == "table" and #tab.field > 0 then%>

Fields

    <%for p = 1, #tab.field do%>
  • <%=tab.field[p]%>: <%=tab.field[tab.field[p]] or ""%>
  • <%end%>
<%end%>
lua-doc-3.0.1+gitdb9e868/src/luadoc/doclet/raw.lua000066400000000000000000000006131164166072400214430ustar00rootroot00000000000000----------------------------------------------------------------- -- @release $Id: raw.lua,v 1.5 2007/04/18 14:28:39 tomas Exp $ ----------------------------------------------------------------- module "luadoc.doclet.raw" ----------------------------------------------------------------- -- Generate the output. -- @param doc Table with the structured documentation. function start (doc) end lua-doc-3.0.1+gitdb9e868/src/luadoc/init.lua000066400000000000000000000030631164166072400203450ustar00rootroot00000000000000------------------------------------------------------------------------------- -- LuaDoc main function. -- @release $Id: init.lua,v 1.4 2008/02/17 06:42:51 jasonsantos Exp $ ------------------------------------------------------------------------------- local require, pairs, string = require, pairs, string local util = require "luadoc.util" logger = {} module ("luadoc") ------------------------------------------------------------------------------- -- LuaDoc version number. _COPYRIGHT = "Copyright (c) 2003-2007 The Kepler Project" _DESCRIPTION = "Documentation Generator Tool for the Lua language" _VERSION = "LuaDoc 3.0.1" ------------------------------------------------------------------------------- -- Main function -- @see luadoc.doclet.html, luadoc.doclet.formatter, luadoc.doclet.raw -- @see luadoc.taglet.standard function main (files, options) logger = util.loadlogengine(options) -- load config file if options.config ~= nil then -- load specified config file dofile(options.config) else -- load default config file require("luadoc.config") end local taglet = require(options.taglet) local doclet = require(options.doclet) -- fix bad windows paths (mix of / and \ in a path) -- standardize on forward slash if util.iswindows then for k, v in pairs(files) do files[k] = string.gsub(v, "\\", "/") end end -- analyze input taglet.options = options taglet.logger = logger local doc = taglet.start(files) -- generate output doclet.options = options doclet.logger = logger doclet.start(doc) end lua-doc-3.0.1+gitdb9e868/src/luadoc/lp.lua000066400000000000000000000104451164166072400200170ustar00rootroot00000000000000---------------------------------------------------------------------------- -- Lua Pages Template Preprocessor. -- -- @release $Id: lp.lua,v 1.7 2007/04/18 14:28:39 tomas Exp $ ---------------------------------------------------------------------------- local assert, error, getfenv, loadstring, setfenv = assert, error, getfenv, loadstring, setfenv local find, format, gsub, strsub = string.find, string.format, string.gsub, string.sub local concat, tinsert = table.concat, table.insert local open = io.open module (...) ---------------------------------------------------------------------------- -- function to do output local outfunc = "io.write" -- accepts the old expression field: `$| |$' local compatmode = true -- -- Builds a piece of Lua code which outputs the (part of the) given string. -- @param s String. -- @param i Number with the initial position in the string. -- @param f Number with the final position in the string (default == -1). -- @return String with the correspondent Lua code which outputs the part of the string. -- local function out (s, i, f) s = strsub(s, i, f or -1) if s == "" then return s end -- we could use `%q' here, but this way we have better control s = gsub(s, "([\\\n\'])", "\\%1") -- substitute '\r' by '\'+'r' and let `loadstring' reconstruct it s = gsub(s, "\r", "\\r") return format(" %s('%s'); ", outfunc, s) end ---------------------------------------------------------------------------- -- Translate the template to Lua code. -- @param s String to translate. -- @return String with translated code. ---------------------------------------------------------------------------- function translate (s) if compatmode then s = gsub(s, "$|(.-)|%$", "") s = gsub(s, "", "") end s = gsub(s, "<%%(.-)%%>", "") local res = {} local start = 1 -- start of untranslated part in `s' while true do local ip, fp, target, exp, code = find(s, "<%?(%w*)[ \t]*(=?)(.-)%?>", start) if not ip then break end tinsert(res, out(s, start, ip-1)) if target ~= "" and target ~= "lua" then -- not for Lua; pass whole instruction to the output tinsert(res, out(s, ip, fp)) else if exp == "=" then -- expression? tinsert(res, format(" %s(%s);", outfunc, code)) else -- command tinsert(res, format(" %s ", code)) end end start = fp + 1 end tinsert(res, out(s, start)) return concat(res) end ---------------------------------------------------------------------------- -- Defines the name of the output function. -- @param f String with the name of the function which produces output. function setoutfunc (f) outfunc = f end ---------------------------------------------------------------------------- -- Turns on or off the compatibility with old CGILua 3.X behavior. -- @param c Boolean indicating if the compatibility mode should be used. function setcompatmode (c) compatmode = c end ---------------------------------------------------------------------------- -- Internal compilation cache. local cache = {} ---------------------------------------------------------------------------- -- Translates a template into a Lua function. -- Does NOT execute the resulting function. -- Uses a cache of templates. -- @param string String with the template to be translated. -- @param chunkname String with the name of the chunk, for debugging purposes. -- @return Function with the resulting translation. function compile (string, chunkname) local f, err = cache[string] if f then return f end f, err = loadstring (translate (string), chunkname) if not f then error (err, 3) end cache[string] = f return f end ---------------------------------------------------------------------------- -- Translates and executes a template in a given file. -- The translation creates a Lua function which will be executed in an -- optionally given environment. -- @param filename String with the name of the file containing the template. -- @param env Table with the environment to run the resulting function. function include (filename, env) -- read the whole contents of the file local fh = assert (open (filename)) local src = fh:read("*a") fh:close() -- translates the file into a function local prog = compile (src, '@'..filename) local _env if env then _env = getfenv (prog) setfenv (prog, env) end prog () end lua-doc-3.0.1+gitdb9e868/src/luadoc/taglet/000077500000000000000000000000001164166072400201555ustar00rootroot00000000000000lua-doc-3.0.1+gitdb9e868/src/luadoc/taglet/standard.lua000066400000000000000000000347451164166072400224750ustar00rootroot00000000000000------------------------------------------------------------------------------- -- @release $Id: standard.lua,v 1.39 2007/12/21 17:50:48 tomas Exp $ ------------------------------------------------------------------------------- local assert, pairs, tostring, type = assert, pairs, tostring, type local io = require "io" local lfs = require "lfs" local luadoc = require "luadoc" local util = require "luadoc.util" local tags = require "luadoc.taglet.standard.tags" local string = require "string" local table = require "table" module 'luadoc.taglet.standard' ------------------------------------------------------------------------------- -- Creates an iterator for an array base on a class type. -- @param t array to iterate over -- @param class name of the class to iterate over function class_iterator (t, class) return function () local i = 1 return function () while t[i] and t[i].class ~= class do i = i + 1 end local v = t[i] i = i + 1 return v end end end -- Patterns for function recognition local identifiers_list_pattern = "%s*(.-)%s*" local identifier_pattern = "[^%(%s]+" local function_patterns = { "^()%s*function%s*("..identifier_pattern..")%s*%("..identifiers_list_pattern.."%)", "^%s*(local%s)%s*function%s*("..identifier_pattern..")%s*%("..identifiers_list_pattern.."%)", "^()%s*("..identifier_pattern..")%s*%=%s*function%s*%("..identifiers_list_pattern.."%)", } ------------------------------------------------------------------------------- -- Checks if the line contains a function definition -- @param line string with line text -- @return function information or nil if no function definition found local function check_function (line) line = util.trim(line) local info = table.foreachi(function_patterns, function (_, pattern) local r, _, l, id, param = string.find(line, pattern) if r ~= nil then return { name = id, private = (l == "local"), param = util.split("%s*,%s*", param), } end end) -- TODO: remove these assert's? if info ~= nil then assert(info.name, "function name undefined") assert(info.param, string.format("undefined parameter list for function `%s'", info.name)) end return info end ------------------------------------------------------------------------------- -- Checks if the line contains a module definition. -- @param line string with line text -- @param currentmodule module already found, if any -- @return the name of the defined module, or nil if there is no module -- definition local function check_module (line, currentmodule) line = util.trim(line) -- module"x.y" -- module'x.y' -- module[[x.y]] -- module("x.y") -- module('x.y') -- module([[x.y]]) -- module(...) local r, _, modulename = string.find(line, "^module%s*[%s\"'(%[]+([^,\"')%]]+)") if r then -- found module definition logger:debug(string.format("found module `%s'", modulename)) return modulename end return currentmodule end ------------------------------------------------------------------------------- -- Extracts summary information from a description. The first sentence of each -- doc comment should be a summary sentence, containing a concise but complete -- description of the item. It is important to write crisp and informative -- initial sentences that can stand on their own -- @param description text with item description -- @return summary string or nil if description is nil local function parse_summary (description) -- summary is never nil... description = description or "" -- append an " " at the end to make the pattern work in all cases description = description.." " -- read until the first period followed by a space or tab local summary = string.match(description, "(.-%.)[%s\t]") -- if pattern did not find the first sentence, summary is the whole description summary = summary or description return summary end ------------------------------------------------------------------------------- -- @param f file handle -- @param line current line being parsed -- @param modulename module already found, if any -- @return current line -- @return code block -- @return modulename if found local function parse_code (f, line, modulename) local code = {} while line ~= nil do if string.find(line, "^[\t ]*%-%-%-") then -- reached another luadoc block, end this parsing return line, code, modulename else -- look for a module definition modulename = check_module(line, modulename) table.insert(code, line) line = f:read() end end -- reached end of file return line, code, modulename end ------------------------------------------------------------------------------- -- Parses the information inside a block comment -- @param block block with comment field -- @return block parameter local function parse_comment (block, first_line) -- get the first non-empty line of code local code = table.foreachi(block.code, function(_, line) if not util.line_empty(line) then -- `local' declarations are ignored in two cases: -- when the `nolocals' option is turned on; and -- when the first block of a file is parsed (this is -- necessary to avoid confusion between the top -- local declarations and the `module' definition. if (options.nolocals or first_line) and line:find"^%s*local" then return end return line end end) -- parse first line of code if code ~= nil then local func_info = check_function(code) local module_name = check_module(code) if func_info then block.class = "function" block.name = func_info.name block.param = func_info.param block.private = func_info.private elseif module_name then block.class = "module" block.name = module_name block.param = {} else block.param = {} end else -- TODO: comment without any code. Does this means we are dealing -- with a file comment? end -- parse @ tags local currenttag = "description" local currenttext -- trimmed and concatenated lines local ocurrenttext -- concatenated lines with linebreaks (eg. original non-stripped text format) local currenttagpostfix -- postfix '#' for current tag table.foreachi(block.comment, function (_, line) tline = util.trim_comment(line) oline = util.no_trim_comment(line) local r, _, tag, tagpostfix, text = string.find(tline, "@([_%w%.]+)(#?)%s+(.*)") if r ~= nil then -- found new tag, add previous one, and start a new one -- TODO: what to do with invalid tags? issue an error? or log a warning? tags.handle(currenttag, block, currenttext) currenttag = tag currenttext = text ocurrenttext = text currenttagpostfix = tagpostfix else currenttext = util.concat(currenttext, tline) ocurrenttext = util.no_concat(ocurrenttext, oline) assert(string.sub(currenttext, 1, 1) ~= " ", string.format("`%s', `%s'", currenttext, tline)) end end) if currenttagpostfix == "#" then tags.handle(currenttag, block, ocurrenttext) -- dispatch text with original linebreaks and indentations else tags.handle(currenttag, block, currenttext) -- dispatch text with trimmed and concatenated end -- extracts summary information from the description block.summary = parse_summary(block.description) assert(string.sub(block.description, 1, 1) ~= " ", string.format("`%s'", block.description)) return block end ------------------------------------------------------------------------------- -- Parses a block of comment, started with ---. Read until the next block of -- comment. -- @param f file handle -- @param line being parsed -- @param modulename module already found, if any -- @return line -- @return block parsed -- @return modulename if found local function parse_block (f, line, modulename, first) local block = { comment = {}, code = {}, } while line ~= nil do if string.find(line, "^[\t ]*%-%-") == nil then -- reached end of comment, read the code below it -- TODO: allow empty lines line, block.code, modulename = parse_code(f, line, modulename) -- parse information in block comment block = parse_comment(block, first) return line, block, modulename else table.insert(block.comment, line) line = f:read() end end -- reached end of file -- parse information in block comment block = parse_comment(block, first) return line, block, modulename end ------------------------------------------------------------------------------- -- Parses a file documented following luadoc format. -- @param filepath full path of file to parse -- @param doc table with documentation -- @return table with documentation function parse_file (filepath, doc) local blocks = {} local modulename = nil -- read each line local f = io.open(filepath, "r") local i = 1 local line = f:read() local first = true while line ~= nil do if string.find(line, "^[\t ]*%-%-%-") then -- reached a luadoc block local block line, block, modulename = parse_block(f, line, modulename, first) table.insert(blocks, block) else -- look for a module definition modulename = check_module(line, modulename) -- TODO: keep beginning of file somewhere line = f:read() end first = false i = i + 1 end f:close() -- store blocks in file hierarchy assert(doc.files[filepath] == nil, string.format("doc for file `%s' already defined", filepath)) table.insert(doc.files, filepath) doc.files[filepath] = { type = "file", name = filepath, doc = blocks, -- functions = class_iterator(blocks, "function"), -- tables = class_iterator(blocks, "table"), } -- local first = doc.files[filepath].doc[1] if first and modulename then doc.files[filepath].author = first.author doc.files[filepath].copyright = first.copyright doc.files[filepath].description = first.description doc.files[filepath].release = first.release doc.files[filepath].summary = first.summary end -- if module definition is found, store in module hierarchy if modulename ~= nil then if modulename == "..." then modulename = string.gsub (filepath, "%.lua$", "") modulename = string.gsub (modulename, "/", ".") end if doc.modules[modulename] ~= nil then -- module is already defined, just add the blocks table.foreachi(blocks, function (_, v) table.insert(doc.modules[modulename].doc, v) end) else -- TODO: put this in a different module table.insert(doc.modules, modulename) doc.modules[modulename] = { type = "module", name = modulename, doc = blocks, -- functions = class_iterator(blocks, "function"), -- tables = class_iterator(blocks, "table"), author = first and first.author, copyright = first and first.copyright, description = "", release = first and first.release, summary = "", } -- find module description for m in class_iterator(blocks, "module")() do doc.modules[modulename].description = util.concat( doc.modules[modulename].description, m.description) doc.modules[modulename].summary = util.concat( doc.modules[modulename].summary, m.summary) if m.author then doc.modules[modulename].author = m.author end if m.copyright then doc.modules[modulename].copyright = m.copyright end if m.release then doc.modules[modulename].release = m.release end if m.name then doc.modules[modulename].name = m.name end end doc.modules[modulename].description = doc.modules[modulename].description or (first and first.description) or "" doc.modules[modulename].summary = doc.modules[modulename].summary or (first and first.summary) or "" end -- make functions table doc.modules[modulename].functions = {} for f in class_iterator(blocks, "function")() do table.insert(doc.modules[modulename].functions, f.name) doc.modules[modulename].functions[f.name] = f end -- make tables table doc.modules[modulename].tables = {} for t in class_iterator(blocks, "table")() do table.insert(doc.modules[modulename].tables, t.name) doc.modules[modulename].tables[t.name] = t end end -- make functions table doc.files[filepath].functions = {} for f in class_iterator(blocks, "function")() do table.insert(doc.files[filepath].functions, f.name) doc.files[filepath].functions[f.name] = f end -- make tables table doc.files[filepath].tables = {} for t in class_iterator(blocks, "table")() do table.insert(doc.files[filepath].tables, t.name) doc.files[filepath].tables[t.name] = t end return doc end ------------------------------------------------------------------------------- -- Checks if the file is terminated by ".lua" or ".luadoc" and calls the -- function that does the actual parsing -- @param filepath full path of the file to parse -- @param doc table with documentation -- @return table with documentation -- @see parse_file function file (filepath, doc) local patterns = { "%.lua$", "%.luadoc$" } local valid = table.foreachi(patterns, function (_, pattern) if string.find(filepath, pattern) ~= nil then return true end end) if valid then logger:info(string.format("processing file `%s'", filepath)) doc = parse_file(filepath, doc) end return doc end ------------------------------------------------------------------------------- -- Recursively iterates through a directory, parsing each file -- @param path directory to search -- @param doc table with documentation -- @return table with documentation function directory (path, doc) for f in lfs.dir(path) do local fullpath = path .. "/" .. f local attr = lfs.attributes(fullpath) assert(attr, string.format("error stating file `%s'", fullpath)) if attr.mode == "file" then doc = file(fullpath, doc) elseif attr.mode == "directory" and f ~= "." and f ~= ".." then doc = directory(fullpath, doc) end end return doc end -- Recursively sorts the documentation table local function recsort (tab) table.sort (tab) -- sort list of functions by name alphabetically for f, doc in pairs(tab) do if doc.functions then table.sort(doc.functions) end if doc.tables then table.sort(doc.tables) end end end ------------------------------------------------------------------------------- function start (files, doc) assert(files, "file list not specified") -- Create an empty document, or use the given one doc = doc or { files = {}, modules = {}, } assert(doc.files, "undefined `files' field") assert(doc.modules, "undefined `modules' field") table.foreachi(files, function (_, path) local attr = lfs.attributes(path) assert(attr, string.format("error stating path `%s'", path)) if attr.mode == "file" then doc = file(path, doc) elseif attr.mode == "directory" then doc = directory(path, doc) end end) -- order arrays alphabetically recsort(doc.files) recsort(doc.modules) return doc end lua-doc-3.0.1+gitdb9e868/src/luadoc/taglet/standard/000077500000000000000000000000001164166072400217555ustar00rootroot00000000000000lua-doc-3.0.1+gitdb9e868/src/luadoc/taglet/standard/tags.lua000066400000000000000000000117001164166072400234150ustar00rootroot00000000000000------------------------------------------------------------------------------- -- Handlers for several tags -- @release $Id: tags.lua,v 1.8 2007/09/05 12:39:09 tomas Exp $ ------------------------------------------------------------------------------- local luadoc = require "luadoc" local util = require "luadoc.util" local string = require "string" local table = require "table" local assert, type, tostring = assert, type, tostring module "luadoc.taglet.standard.tags" ------------------------------------------------------------------------------- local function author (tag, block, text) block[tag] = block[tag] or {} if not text then luadoc.logger:warn("author `name' not defined [["..text.."]]: skipping") return end table.insert (block[tag], text) end ------------------------------------------------------------------------------- -- Set the class of a comment block. Classes can be "module", "function", -- "table". The first two classes are automatic, extracted from the source code local function class (tag, block, text) block[tag] = text end ------------------------------------------------------------------------------- local function copyright (tag, block, text) block[tag] = text end ------------------------------------------------------------------------------- local function description (tag, block, text) block[tag] = text end ------------------------------------------------------------------------------- local function field (tag, block, text) if block["class"] ~= "table" then luadoc.logger:warn("documenting `field' for block that is not a `table'") end block[tag] = block[tag] or {} local _, _, name, desc = string.find(text, "^([_%w%.]+)%s+(.*)") assert(name, "field name not defined") table.insert(block[tag], name) block[tag][name] = desc end ------------------------------------------------------------------------------- -- Set the name of the comment block. If the block already has a name, issue -- an error and do not change the previous value local function name (tag, block, text) if block[tag] and block[tag] ~= text then luadoc.logger:error(string.format("block name conflict: `%s' -> `%s'", block[tag], text)) end block[tag] = text end ------------------------------------------------------------------------------- -- Processes a parameter documentation. -- @param tag String with the name of the tag (it must be "param" always). -- @param block Table with previous information about the block. -- @param text String with the current line beeing processed. local function param (tag, block, text) block[tag] = block[tag] or {} -- TODO: make this pattern more flexible, accepting empty descriptions local _, _, name, desc = string.find(text, "^([_%w%.]+)%s+(.*)") if not name then luadoc.logger:warn("parameter `name' not defined [["..text.."]]: skipping") return end local i = table.foreachi(block[tag], function (i, v) if v == name then return i end end) if i == nil then luadoc.logger:warn(string.format("documenting undefined parameter `%s'", name)) table.insert(block[tag], name) end block[tag][name] = desc end ------------------------------------------------------------------------------- local function release (tag, block, text) block[tag] = text end ------------------------------------------------------------------------------- local function ret (tag, block, text) tag = "ret" if type(block[tag]) == "string" then block[tag] = { block[tag], text } elseif type(block[tag]) == "table" then table.insert(block[tag], text) else block[tag] = text end end ------------------------------------------------------------------------------- -- @see ret local function see (tag, block, text) -- see is always an array block[tag] = block[tag] or {} -- remove trailing "." text = string.gsub(text, "(.*)%.$", "%1") local s = util.split("%s*,%s*", text) table.foreachi(s, function (_, v) table.insert(block[tag], v) end) end ------------------------------------------------------------------------------- -- @see ret local function usage (tag, block, text) if type(block[tag]) == "string" then block[tag] = { block[tag], text } elseif type(block[tag]) == "table" then table.insert(block[tag], text) else block[tag] = text end end ------------------------------------------------------------------------------- local handlers = {} handlers["author"] = author handlers["class"] = class handlers["copyright"] = copyright handlers["description"] = description handlers["field"] = field handlers["name"] = name handlers["param"] = param handlers["release"] = release handlers["return"] = ret handlers["see"] = see handlers["usage"] = usage ------------------------------------------------------------------------------- function handle (tag, block, text) if not handlers[tag] then luadoc.logger:error(string.format("undefined handler for tag `%s'", tag)) return end -- assert(handlers[tag], string.format("undefined handler for tag `%s'", tag)) return handlers[tag](tag, block, text) end lua-doc-3.0.1+gitdb9e868/src/luadoc/util.lua000066400000000000000000000154061164166072400203630ustar00rootroot00000000000000------------------------------------------------------------------------------- -- General utilities. -- @release $Id: util.lua,v 1.16 2008/02/17 06:42:51 jasonsantos Exp $ ------------------------------------------------------------------------------- local lfs = require "lfs" local type, table, string, io, assert, tostring, setmetatable, pcall = type, table, string, io, assert, tostring, setmetatable, pcall ------------------------------------------------------------------------------- -- Module with several utilities that could not fit in a specific module module "luadoc.util" ------------------------------------------------------------------------------- -- Removes spaces from the begining and end of a given string -- @param s string to be trimmed -- @return trimmed string function trim (s) return (string.gsub(s, "^%s*(.-)%s*$", "%1")) end ------------------------------------------------------------------------------- -- Removes spaces from the begining and end of a given string, considering the -- string is inside a lua comment. -- @param s string to be trimmed -- @return trimmed string -- @see trim -- @see string.gsub function trim_comment (s) s = string.gsub(s, "%-%-+(.*)$", "%1") return trim(s) end ------------------------------------------------------------------------------- -- Checks if a given line is empty -- @param line string with a line -- @return true if line is empty, false otherwise function line_empty (line) return (string.len(trim(line)) == 0) end ------------------------------------------------------------------------------- -- Appends two string, but if the first one is nil, use to second one -- @param str1 first string, can be nil -- @param str2 second string -- @return str1 .. " " .. str2, or str2 if str1 is nil function concat (str1, str2) if str1 == nil or string.len(str1) == 0 then return str2 else return str1 .. " " .. str2 end end ------------------------------------------------------------------------------- -- Split text into a list consisting of the strings in text, -- separated by strings matching delim (which may be a pattern). -- @param delim if delim is "" then action is the same as %s+ except that -- field 1 may be preceeded by leading whitespace -- @usage split(",%s*", "Anna, Bob, Charlie,Dolores") -- @usage split(""," x y") gives {"x","y"} -- @usage split("%s+"," x y") gives {"", "x","y"} -- @return array with strings -- @see table.concat function split(delim, text) local list = {} if string.len(text) > 0 then delim = delim or "" local pos = 1 -- if delim matches empty string then it would give an endless loop if string.find("", delim, 1) and delim ~= "" then error("delim matches empty string!") end local first, last while 1 do if delim ~= "" then first, last = string.find(text, delim, pos) else first, last = string.find(text, "%s+", pos) if first == 1 then pos = last+1 first, last = string.find(text, "%s+", pos) end end if first then -- found? table.insert(list, string.sub(text, pos, first-1)) pos = last+1 else table.insert(list, string.sub(text, pos)) break end end end return list end ------------------------------------------------------------------------------- -- Comments a paragraph. -- @param text text to comment with "--", may contain several lines -- @return commented text function comment (text) text = string.gsub(text, "\n", "\n-- ") return "-- " .. text end ------------------------------------------------------------------------------- -- Wrap a string into a paragraph. -- @param s string to wrap -- @param w width to wrap to [80] -- @param i1 indent of first line [0] -- @param i2 indent of subsequent lines [0] -- @return wrapped paragraph function wrap(s, w, i1, i2) w = w or 80 i1 = i1 or 0 i2 = i2 or 0 assert(i1 < w and i2 < w, "the indents must be less than the line width") s = string.rep(" ", i1) .. s local lstart, len = 1, string.len(s) while len - lstart > w do local i = lstart + w while i > lstart and string.sub(s, i, i) ~= " " do i = i - 1 end local j = i while j > lstart and string.sub(s, j, j) == " " do j = j - 1 end s = string.sub(s, 1, j) .. "\n" .. string.rep(" ", i2) .. string.sub(s, i + 1, -1) local change = i2 + 1 - (i - j) lstart = j + change len = len + change end return s end ------------------------------------------------------------------------------- -- Opens a file, creating the directories if necessary -- @param filename full path of the file to open (or create) -- @param mode mode of opening -- @return file handle function lfs.open (filename, mode) local f = io.open(filename, mode) if f == nil then filename = string.gsub(filename, "\\", "/") local dir = "" for d in string.gfind(filename, ".-/") do dir = dir .. d lfs.mkdir(dir) end f = io.open(filename, mode) end return f end ---------------------------------------------------------------------------------- -- Creates a Logger with LuaLogging, if present. Otherwise, creates a mock logger. -- @param options a table with options for the logging mechanism -- @return logger object that will implement log methods function loadlogengine(options) local logenabled = pcall(function() require "logging" require "logging.console" end) local logging = logenabled and logging if logenabled then if options.filelog then logger = logging.file("luadoc.log") -- use this to get a file log else logger = logging.console("[%level] %message\n") end if options.verbose then logger:setLevel(logging.INFO) else logger:setLevel(logging.WARN) end else noop = {__index=function(...) return function(...) -- noop end end} logger = {} setmetatable(logger, noop) end return logger end ------------------------------------------------------------------------------- -- Check if the current executing platform is windows -- @return true if execution platform is windows function iswindows() return string.find(_G.package.config:sub(1,1), "\\") end ------------------------------------------------------------------------------- -- Removes comment markers from the beginning of a string, leaves spaces alone. -- @param s string to be trimmed -- @return trimmed string -- @see trim_comment function no_trim_comment (s) s = string.gsub(trim(s), "%-%-+ (.*)$", "%1") return s end ------------------------------------------------------------------------------- -- Appends two strings using original line-end, but if the first one is nil, use to second one. -- to be used when using the text without removal of line ends and indentation -- @param str1 first string, can be nil -- @param str2 second string -- @return str1 .. "\n" .. str2, or str2 if str1 is nil function no_concat (str1, str2) if str1 == nil or string.len(str1) == 0 then return str2 else return str1 .. "\n" .. str2 end end lua-doc-3.0.1+gitdb9e868/test/000077500000000000000000000000001164166072400156165ustar00rootroot00000000000000lua-doc-3.0.1+gitdb9e868/test/trailing_hash_test.lua000066400000000000000000000012711164166072400221750ustar00rootroot00000000000000-- Run LuaDoc on this file to test the results of the tag-trailing '#' -------------------------- -- Usage tag should be the original usage tag, concatenated and trimmed -- @usage for k,v in pairs(sometable) do -- print(k,v) -- end function JustATest() end -------------------------- -- Usage tag includes trailing '#', should be the new format, not trimmed and linebreaks retained -- @usage# for k,v in pairs(sometable) do -- print(k,v) -- end function JustAnotherTest() end -------------------------- -- Usage tags contains # in the middle, shouldn't be recognized as a tag -- @usage#forsome test1 -- test2 -- test3 function JustOneLastTest() end