lua2dox.lua File Reference

a hack lua2dox converter More...

Go to the source code of this file.

Functions

local function TApp_get_appname ()
 get appname
local function TApp_lua2dox (FileContents)
 hack converter from lua to a pseudoC-ish language for doxygen
local function TApp_run_doxygen (AppTimestamp, Argv, CommentaryFiles)
 run doxygen for one
local function TApp_run_filter (AppTimestamp, Filename, CommentaryFiles)
 run the filter
local function TClassList_method_add (Klass, Method)
 add a method to list of known methods
local function TClassList_method_get (Klass)
 get methods
local function TClock_GetTimeNow ()
 get the current time
local function TClock_getTimeStamp ()
 get a timestamp
local function TCommandline_getargv ()
 setup the commandline now
local function TCommandline_setup ()
 setup/parse the commandline
local function TCommentary_addMethod (Klass, Method)
 method to save file
local function TCommentary_close ()
 close the methods save file
local function TCommentary_open (Filename, InputLuaFilename)
 open the commentary save file
local function TCommentary_readFileContents (Filename)
 read stuff from save file
local function TCommentary_writeln (Str)
 write to output file
local function TConfig_get (Key, Default)
 Gets a config val.
local function TConfig_set (Key, Val)
 sets a config val
local function TIO_out2stream (Line)
 output line to stream
local function TIO_out2stream_commented (Line, Prefix, Suffix)
 suppress line
local function TIO_showError (Err, Str)
 show error to stdout
local function TIO_write (Str)
 write to stdout
local function TIO_writeln (Str)
 write to stdout
local function TOS_fileExists (Filename)
 does file exist?
local function TOS_system (Cmd)
 run system command
local function TString_removeCommentFromLine (Line)
 trim comment off end of string
local function TString_split (Str, Pattern)
 split a string
local function TString_trim (Str)
 trims a string from both ends


Detailed Description

a hack lua2dox converter

Definition in file lua2dox.lua.


Function Documentation

local function TApp_get_appname (  ) 

get appname

Definition at line 378 of file lua2dox.lua.

local function TApp_lua2dox ( FileContents   ) 

hack converter from lua to a pseudoC-ish language for doxygen

This is a hack to make lua readable to doxygen.

It works well enough to document functions/methods and classes, but not assignments. Our pseudo-C gets confused if we allow assginments to be shown. Because these are less interesting than class/functions/methods I have decided to live with this limitation.

Definition at line 391 of file lua2dox.lua.

local function TApp_run_doxygen ( AppTimestamp  ,
Argv  ,
CommentaryFiles   
)

run doxygen for one

Parameters:
AppTimestamp application + timestamp for this run
Argv commandline for this run
CommentaryFiles names of commentary files
Returns:
err or nil

Definition at line 558 of file lua2dox.lua.

local function TApp_run_filter ( AppTimestamp  ,
Filename  ,
CommentaryFiles   
)

run the filter

Parameters:
AppTimestamp application + timestamp for this run
Filename the filename or if nil stdin
CommentaryFiles names of commentary files
Returns:
err or nil

Definition at line 519 of file lua2dox.lua.

local function TClassList_method_add ( Klass  ,
Method   
)

add a method to list of known methods

Definition at line 236 of file lua2dox.lua.

local function TClassList_method_get ( Klass   ) 

get methods

Definition at line 231 of file lua2dox.lua.

local function TClock_GetTimeNow (  ) 

get the current time

Definition at line 167 of file lua2dox.lua.

local function TClock_getTimeStamp (  ) 

get a timestamp

not strictly necessary here but lets us put a timestamp on the end of the output stream. Note that doxygen won't read this, and being off the end of the true file length (num lines), it will have no effect. However it lets us check the output file tail when debugging.

Definition at line 182 of file lua2dox.lua.

local function TCommandline_getargv (  ) 

setup the commandline now

get commandline args

Definition at line 373 of file lua2dox.lua.

local function TCommandline_setup (  ) 

setup/parse the commandline

Definition at line 352 of file lua2dox.lua.

local function TCommentary_addMethod ( Klass  ,
Method   
)

method to save file

Definition at line 316 of file lua2dox.lua.

local function TCommentary_close (  ) 

close the methods save file

Definition at line 266 of file lua2dox.lua.

local function TCommentary_open ( Filename  ,
InputLuaFilename   
)

open the commentary save file

Definition at line 257 of file lua2dox.lua.

local function TCommentary_readFileContents ( Filename   ) 

read stuff from save file

Definition at line 275 of file lua2dox.lua.

local function TCommentary_writeln ( Str   ) 

write to output file

Definition at line 249 of file lua2dox.lua.

local function TConfig_get ( Key  ,
Default   
)

Gets a config val.

Definition at line 99 of file lua2dox.lua.

local function TConfig_set ( Key  ,
Val   
)

sets a config val

Definition at line 108 of file lua2dox.lua.

local function TIO_out2stream ( Line   ) 

output line to stream

Wraps IO_writeln()

Definition at line 331 of file lua2dox.lua.

local function TIO_out2stream_commented ( Line  ,
Prefix  ,
Suffix   
)

suppress line

Definition at line 336 of file lua2dox.lua.

local function TIO_showError ( Err  ,
Str   
)

show error to stdout

writelns Str (if not nil) and then an eoln.

Definition at line 134 of file lua2dox.lua.

local function TIO_write ( Str   ) 

write to stdout

writes Str (if not nil)

Definition at line 115 of file lua2dox.lua.

local function TIO_writeln ( Str   ) 

write to stdout

writelns Str (if not nil) and then an eoln.

Definition at line 124 of file lua2dox.lua.

local function TOS_fileExists ( Filename   ) 

does file exist?

Definition at line 157 of file lua2dox.lua.

local function TOS_system ( Cmd   ) 

run system command

Definition at line 146 of file lua2dox.lua.

local function TString_removeCommentFromLine ( Line   ) 

trim comment off end of string

If the string has a comment on the end, this trims it off.

Definition at line 221 of file lua2dox.lua.

local function TString_split ( Str  ,
Pattern   
)

split a string

Parameters:
Str 
Pattern 
Returns:
table of string fragments

Definition at line 198 of file lua2dox.lua.

local function TString_trim ( Str   ) 

trims a string from both ends

Definition at line 189 of file lua2dox.lua.


Generated on Wed Jul 4 18:43:04 2012 for Lua2dox.lua by  doxygen 1.5.6