summaryrefslogtreecommitdiff
path: root/web/lua2dox/docs/html/index.html
blob: 2a01528d3b5098714282e1e3cd830ecf82dfda06 (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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>lua2dox: Main Page</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">lua2dox
   &#160;<span id="projectnumber">0.2  20130128</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.2 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li class="current"><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">lua2dox Documentation</div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><h2>Introduction</h2>
<p>A hack lua2dox converter Version 0.2</p>
<p>This lets us make Doxygen output some documentation to let us develop this code.</p>
<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>
<p>Improved from lua2dox to make the doxygen output more friendly. Also it runs faster in lua rather than Perl.</p>
<p>Because this Perl based system is called "lua2dox"., I have decided to add ".lua" to the name to keep the two separate.</p>
<h2>Running</h2>
<ol>
<li>
<p class="startli">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. You can experiment with the enclosed example code.</p>
<p class="endli"></p>
</li>
<li>
<p class="startli">Run "doxygen -g" to create a default Doxyfile.</p>
<p>Then alter it to let it recognise lua. Add the two following lines:</p>
<div class="fragment"><div class="line">FILE_PATTERNS   = *.lua</div>
<div class="line"></div>
<div class="line">FILTER_PATTERNS = *.lua=lua2dox_filter</div>
</div><!-- fragment --><p>Either add them to the end or find the appropriate entry in Doxyfile.</p>
<p>There are other lines that you might like to alter, but see futher documentation for details.</p>
<p class="endli"></p>
</li>
<li>
<p class="startli">When Doxyfile is edited run "doxygen"</p>
<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>
<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>
<p class="endli">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>
</li>
</ol>
<h2>Installation</h2>
<p>Here for linux or unix-like, for any other OS you need to refer to other documentation.</p>
<p>This file is "lua2dox.lua". It gets called by "lua2dox_filter"(bash). Somewhere in your path (e.g. "~/bin" or "/usr/local/bin") put a link to "lua2dox_filter".</p>
<h2>Documentation</h2>
<p>Read the external documentation that should be part of this package. For example look for the "README" and some .PDFs. </p>
</div></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Thu Feb 7 2013 10:00:59 for lua2dox by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.2
</small></address>
</body>
</html>