1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
3 <title>ohcount: /Users/andy/dev/ohcount/src/parser.h File Reference</title>
4 <link href="tabs.css" rel="stylesheet" type="text/css">
5 <link href="doxygen.css" rel="stylesheet" type="text/css">
7 <!-- Generated by Doxygen 1.5.9 -->
8 <div class="navigation" id="top">
11 <li><a href="index.html"><span>Main Page</span></a></li>
12 <li><a href="pages.html"><span>Related Pages</span></a></li>
13 <li><a href="annotated.html"><span>Data Structures</span></a></li>
14 <li class="current"><a href="files.html"><span>Files</span></a></li>
19 <li><a href="files.html"><span>File List</span></a></li>
20 <li><a href="globals.html"><span>Globals</span></a></li>
24 <div class="contents">
25 <h1>/Users/andy/dev/ohcount/src/parser.h File Reference</h1><code>#include "<a class="el" href="sourcefile_8h_source.html">sourcefile.h</a>"</code><br>
28 <a href="parser_8h_source.html">Go to the source code of this file.</a><table border="0" cellpadding="0" cellspacing="0">
30 <tr><td colspan="2"><br><h2>Functions</h2></td></tr>
31 <tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="parser_8h.html#acda938796750ee86c517ff486d1ca93">ohcount_parse</a> (<a class="el" href="structSourceFile.html">SourceFile</a> *sourcefile, int count, void(*callback)(const char *, const char *, int, int, void *), void *userdata)</td></tr>
34 <hr><h2>Function Documentation</h2>
35 <a class="anchor" name="acda938796750ee86c517ff486d1ca93"></a><!-- doxytag: member="parser.h::ohcount_parse" ref="acda938796750ee86c517ff486d1ca93" args="(SourceFile *sourcefile, int count, void(*callback)(const char *, const char *, int, int, void *), void *userdata)" -->
37 <div class="memproto">
38 <table class="memname">
40 <td class="memname">int ohcount_parse </td>
42 <td class="paramtype"><a class="el" href="structSourceFile.html">SourceFile</a> * </td>
43 <td class="paramname"> <em>sourcefile</em>, </td>
46 <td class="paramkey"></td>
48 <td class="paramtype">int </td>
49 <td class="paramname"> <em>count</em>, </td>
52 <td class="paramkey"></td>
54 <td class="paramtype">void(*)(const char *, const char *, int, int, void *) </td>
55 <td class="paramname"> <em>callback</em>, </td>
58 <td class="paramkey"></td>
60 <td class="paramtype">void * </td>
61 <td class="paramname"> <em>userdata</em></td><td> </td>
66 <td></td><td></td><td></td>
73 Tries to use an existing Ragel parser for the given language. <dl compact><dt><b>Parameters:</b></dt><dd>
74 <table border="0" cellspacing="2" cellpadding="0">
75 <tr><td valign="top"></td><td valign="top"><em>sourcefile</em> </td><td>A <a class="el" href="structSourceFile.html" title="Represents a single source code file.">SourceFile</a> created by <a class="el" href="sourcefile_8h.html#a2a2f198bc5d0cae789b7efc92717ea1">ohcount_sourcefile_new()</a>. </td></tr>
76 <tr><td valign="top"></td><td valign="top"><em>count</em> </td><td>An integer flag indicating whether to count lines or parse entities. </td></tr>
77 <tr><td valign="top"></td><td valign="top"><em>callback</em> </td><td>A callback to use for every line or entity in the source file discovered (depends on count). </td></tr>
78 <tr><td valign="top"></td><td valign="top"><em>userdata</em> </td><td>Pointer to userdata used by callback (if any). </td></tr>
81 <dl class="return" compact><dt><b>Returns:</b></dt><dd>1 if a Ragel parser is found, 0 otherwise. </dd></dl>
86 <hr size="1"><address style="text-align: right;"><small>Generated on Fri Aug 28 15:20:08 2009 for ohcount by
87 <a href="http://www.doxygen.org/index.html">
88 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.9 </small></address>