summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/support/lua2dox/docs/html/index.html
blob: 4a3774bdb250a29939f13aee06c192147ab0d1bf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>Lua2dox.lua: Main Page</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.6 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li class="current"><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
</div>
<div class="contents">
<h1>Lua2dox.lua Documentation</h1>
<p>
<h3 align="center">0.1 20120704 </h3>A hack lua2dox converter Version 0.1<p>
This lets us make Doxygen output some documentation to let us develop this code.<p>
It is partially cribbed from the functionality of lua2dox (<a href="http://search.cpan.org/~alec/Doxygen-Lua-0.02/lib/Doxygen/Lua.pm">http://search.cpan.org/~alec/Doxygen-Lua-0.02/lib/Doxygen/Lua.pm</a>). Found on CPAN when looking for something else; kinda handy.<p>
Improved from lua2dox to make the doxygen output more friendly. Also it runs faster in lua rather than Perl.<p>
Because this Perl based system is called "lua2dox"., I have decided to add ".lua" to the name to keep the two separate.<p>
0. Ensure doxygen is installed on your system and that you are familiar with its use. Best is to try to make and document some simple C/C++/PHP to see what it produces.<p>
1. Run "lua2dox_lua -g" to create a default Doxyfile.<p>
Then alter it to let it recognise lua. Add the two following lines:<p>
FILE_PATTERNS = *.lua<p>
FILTER_PATTERNS = *.lua=lua2dox_filter<p>
Either add them to the end or find the appropriate entry in Doxyfile.<p>
2. When Doxyfile is edited run as "lua2dox_lua"<p>
When reading source with classes multiple passes are needed. Each pass generates a list of member functions (as a file) that were found on this pass. This list is read in on the next pass. If the class+methods haven't changed this time then you only need to run it once, else run twice.<p>
The core function reads the input file (filename or stdin) and outputs some pseudo C-ish language. It only has to be good enough for doxygen to see it as legal. Therefore our lua interpreter is fairly limited, but "good enough".<p>
One limitation is that each line is treated separately (except for long comments). The implication is that class and function declarations must be on the same line. Some functions can have their parameter lists extended over multiple lines to make it look neat. Managing this where there are also some comments is a bit more coding than I want to do at this stage, so it will probably not document accurately if we do do this.<p>
However I have put in a hack that will insert the "missing" close paren. The effect is that you will get the function documented, but not with the parameter list you might expect.<p>
Installation:<p>
Here for linux or unix-like, for any other OS you need to refer to other documentation.<p>
This file is "lua2dox.lua". It gets called by "lua2dox_lua". Somewhere in your path (e.g. "~/bin" or "/usr/local/bin") put two links to "lua2dox_lua". Names to use are "lua2dox_lua" and "lua2dox_filter".<p>
Call it as "lua2dox_lua" and the filter that gets called by doxygen is "lua2dox_filter". </div>
<hr size="1"><address style="text-align: right;"><small>Generated on Wed Jul 4 18:43:04 2012 for Lua2dox.lua by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6 </small></address>
</body>
</html>