<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>ohcount: /Users/andy/dev/ohcount/src/parser_macros.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css">
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.9 -->
<div class="navigation" id="top">
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main Page</span></a></li>
<li><a href="pages.html"><span>Related Pages</span></a></li>
<li><a href="annotated.html"><span>Data Structures</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div class="tabs">
<ul>
<li><a href="files.html"><span>File List</span></a></li>
<li><a href="globals.html"><span>Globals</span></a></li>
</ul>
</div>
</div>
<div class="contents">
<h1>/Users/andy/dev/ohcount/src/parser_macros.h File Reference</h1><code>#include <stdio.h></code><br>
<code>#include <stdlib.h></code><br>
<code>#include "<a class="el" href="languages_8h_source.html">languages.h</a>"</code><br>
<p>
<a href="parser__macros_8h_source.html">Go to the source code of this file.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Data Structures</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct </td><td class="memItemRight" valign="bottom"><a class="el" href="structCallbackItem.html">CallbackItem</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Holds a series of callbacks for in a queue (linked list). <a href="structCallbackItem.html#_details">More...</a><br></td></tr>
<tr><td colspan="2"><br><h2>Defines</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="parser__macros_8h.html#6da05469a748b57f676bbf67a842b25e">dequeue</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="parser__macros_8h.html#a4df6978a0e35c95ca051f1da0dd7e86">ls</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="parser__macros_8h.html#814f6dab3b0678113d97a3684282934a">code</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="parser__macros_8h.html#43be22b7a1b528eaf759e034ec581543">comment</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="parser__macros_8h.html#e9fb722b81bbd8bb0e1de37941fab172">saw</a>(lang)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="parser__macros_8h.html#b08c3ed468f4ad3e1a9d391c1a4337d0">std_internal_newline</a>(lang)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="parser__macros_8h.html#2822d59197758531b6f4a0cc13d0257b">emb_internal_newline</a>(lang)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="parser__macros_8h.html#aaf8abebfd56b683567c15bfa3f063f1">std_newline</a>(lang)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="parser__macros_8h.html#b5304b201ce6824e3c021e245d6a5e94">emb_newline</a>(lang)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="parser__macros_8h.html#1adf47f60e418da0f0c3caa471728021">process_last_line</a>(lang)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="parser__macros_8h.html#dcdd4261cb35490ebe8f88afd0b4787c">check_blank_entry</a>(lang)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="parser__macros_8h.html#806511f4930171733227c99101dc0606">NEWLINE</a> -1</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="parser__macros_8h.html#7e82c89c9a3dc533077791088d1ee77b">INTERNAL_NL</a> -2</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="parser__macros_8h.html#a48fd5c8dbc18cdf9daaa5810227f829">CHECK_BLANK_ENTRY</a> -3</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="parser__macros_8h.html#cc0eb0fbef1d4e1ccb5cf27961af93ad">cint</a>(c) ((int) (c - <a class="el" href="parser__macros_8h.html#f127db1c17ed58547ff5125a912d02b9">buffer_start</a>))</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="parser__macros_8h.html#c1af3f499e72dfc161f2fce616dfd8e7">init</a></td></tr>
<tr><td colspan="2"><br><h2>Typedefs</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef struct <a class="el" href="structCallbackItem.html">CallbackItem</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="parser__macros_8h.html#c27bb77f57039cab3883b9e21e6c48f4">Callback</a></td></tr>
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="parser__macros_8h.html#cef933f90a0bd6318613e93f39067ac8">enqueue</a> (const char *lang, const char *<a class="el" href="parser__macros_8h.html#d4e4601988acb4a95ecd1ec380359ae5">entity</a>, int s, int e, void *udata)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="parser__macros_8h.html#666ec961128241e997f03af3ae16a2ea">free_queue</a> ()</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="parser__macros_8h.html#33c0ec8adc93c385bb9560eb42cb52e2">is_blank_entry</a> (char **<a class="el" href="parser__macros_8h.html#aa1ebe818ec1c763a776cc580551f3e6">p</a>)</td></tr>
<tr><td colspan="2"><br><h2>Variables</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="structCallbackItem.html">Callback</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="parser__macros_8h.html#55de8ae2eeb299ec915f3f3dc354476e">callback_list_head</a> = NULL</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="structCallbackItem.html">Callback</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="parser__macros_8h.html#72a0d9ad9216bded86e30678b4972814">callback_list_tail</a> = NULL</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="parser__macros_8h.html#d35c7ed2784f4fb57849237ce534f17e">cs</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="parser__macros_8h.html#534c5331d9ff060f0e653d61e72f489f">act</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">char * </td><td class="memItemRight" valign="bottom"><a class="el" href="parser__macros_8h.html#aa1ebe818ec1c763a776cc580551f3e6">p</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">char * </td><td class="memItemRight" valign="bottom"><a class="el" href="parser__macros_8h.html#46103ad966e7f0e086263030e54a2615">pe</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">char * </td><td class="memItemRight" valign="bottom"><a class="el" href="parser__macros_8h.html#0f4922f5f610d7bd7db8c21a597b3641">eof</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">char * </td><td class="memItemRight" valign="bottom"><a class="el" href="parser__macros_8h.html#366fc4d3a72013313c8b00233a5a7690">ts</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">char * </td><td class="memItemRight" valign="bottom"><a class="el" href="parser__macros_8h.html#49aa6b4212d238e0be3312cf89738b98">te</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="parser__macros_8h.html#1998d6eddc359fdb029fe1dc0b9a50b3">stack</a> [5]</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="parser__macros_8h.html#f93f4f37fc2ad9c37af4a715423b110c">top</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">char * </td><td class="memItemRight" valign="bottom"><a class="el" href="parser__macros_8h.html#f127db1c17ed58547ff5125a912d02b9">buffer_start</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="parser__macros_8h.html#6610fa10e2ad8df10bb6e04babf0bbd8">whole_line_comment</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="parser__macros_8h.html#6c107b5ead58c230e358212891737cc3">line_contains_code</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">char * </td><td class="memItemRight" valign="bottom"><a class="el" href="parser__macros_8h.html#6f5b3cc3254a82d5d28a418a40f59272">line_start</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="parser__macros_8h.html#d4e4601988acb4a95ecd1ec380359ae5">entity</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="parser__macros_8h.html#289e4572ae2214b56c963362620009ce">seen</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="parser__macros_8h.html#a38b98ec2e96f92062cc7d5fa8ece8a4">inqueue</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">char * </td><td class="memItemRight" valign="bottom"><a class="el" href="parser__macros_8h.html#207101bbc948307c92f53d6521e3e85c">last_line_start</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="parser__macros_8h.html#c85645edbf093d7ab236c9861ddcdc05">last_line_contains_code</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="parser__macros_8h.html#00405ce6c748a07e6ed3e3f91fe1d25e">last_whole_line_comment</a></td></tr>
</table>
<hr><h2>Define Documentation</h2>
<a class="anchor" name="a48fd5c8dbc18cdf9daaa5810227f829"></a><!-- doxytag: member="parser_macros.h::CHECK_BLANK_ENTRY" ref="a48fd5c8dbc18cdf9daaa5810227f829" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define CHECK_BLANK_ENTRY -3 </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Check blank entry entity. Used for embedded language transitions. If a newline follows immediately after such a transition, the line should be counted as parent code, not child code. <dl class="note" compact><dt><b>Note:</b></dt><dd>This is only used for line counting parsers. </dd></dl>
</div>
</div><p>
<a class="anchor" name="dcdd4261cb35490ebe8f88afd0b4787c"></a><!-- doxytag: member="parser_macros.h::check_blank_entry" ref="dcdd4261cb35490ebe8f88afd0b4787c" args="(lang)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define check_blank_entry </td>
<td>(</td>
<td class="paramtype">lang </td>
<td class="paramname"> </td>
<td> ) </td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
<b>Value:</b><div class="fragment"><pre class="fragment">{ \
<span class="keywordflow">if</span> (<a class="code" href="parser__macros_8h.html#33c0ec8adc93c385bb9560eb42cb52e2">is_blank_entry</a>(&<a class="code" href="parser__macros_8h.html#aa1ebe818ec1c763a776cc580551f3e6">p</a>)) { \
<a class="code" href="parser__macros_8h.html#49aa6b4212d238e0be3312cf89738b98">te</a> = <a class="code" href="parser__macros_8h.html#aa1ebe818ec1c763a776cc580551f3e6">p</a> + 1; \
<a class="code" href="parser__macros_8h.html#aaf8abebfd56b683567c15bfa3f063f1">std_newline</a>(lang) \
} \
}
</pre></div>If there is a transition into an embedded language and there is only parent language code on the line (the rest of the line is blank with no child code), count the line as a line of parent code. Moves p and te to the end of the newline and calls the std_newline macro. (p is inclusive, te is not.) This is typically used in the main action for the CHECK_BLANK_ENTRY entity. <dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>lang</em> </td><td>The language name string. </td></tr>
</table>
</dl>
<dl class="note" compact><dt><b>Note:</b></dt><dd>Applies only to line counting parsers. </dd></dl>
</div>
</div><p>
<a class="anchor" name="cc0eb0fbef1d4e1ccb5cf27961af93ad"></a><!-- doxytag: member="parser_macros.h::cint" ref="cc0eb0fbef1d4e1ccb5cf27961af93ad" args="(c)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define cint </td>
<td>(</td>
<td class="paramtype">c </td>
<td class="paramname"> </td>
<td> ) </td>
<td> ((int) (c - <a class="el" href="parser__macros_8h.html#f127db1c17ed58547ff5125a912d02b9">buffer_start</a>))</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Returns the absolute location in memory for a position relative to the start of the buffer being parsed. <dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>c</em> </td><td>Position relative to the start of the buffer. </td></tr>
</table>
</dl>
<dl class="note" compact><dt><b>Note:</b></dt><dd>This is only used for line counting parsers. </dd></dl>
</div>
</div><p>
<a class="anchor" name="814f6dab3b0678113d97a3684282934a"></a><!-- doxytag: member="parser_macros.h::code" ref="814f6dab3b0678113d97a3684282934a" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define code </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
<b>Value:</b><div class="fragment"><pre class="fragment">{ \
<span class="keywordflow">if</span> (<a class="code" href="parser__macros_8h.html#a38b98ec2e96f92062cc7d5fa8ece8a4">inqueue</a>) { <a class="code" href="parser__macros_8h.html#6da05469a748b57f676bbf67a842b25e">dequeue</a>; } \
<span class="keywordflow">if</span> (!<a class="code" href="parser__macros_8h.html#6c107b5ead58c230e358212891737cc3">line_contains_code</a> && !<a class="code" href="parser__macros_8h.html#6f5b3cc3254a82d5d28a418a40f59272">line_start</a>) <a class="code" href="parser__macros_8h.html#6f5b3cc3254a82d5d28a418a40f59272">line_start</a> = <a class="code" href="parser__macros_8h.html#366fc4d3a72013313c8b00233a5a7690">ts</a>; \
<a class="code" href="parser__macros_8h.html#6c107b5ead58c230e358212891737cc3">line_contains_code</a> = 1; \
}
</pre></div>The C equivalent of the Ragel 'code' action. This is tyically used in the main action for entities where Ragel actions cannot, for one reason or another, be used. <dl class="note" compact><dt><b>Note:</b></dt><dd>Applies only to line counting parsers. </dd></dl>
</div>
</div><p>
<a class="anchor" name="43be22b7a1b528eaf759e034ec581543"></a><!-- doxytag: member="parser_macros.h::comment" ref="43be22b7a1b528eaf759e034ec581543" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define comment </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
<b>Value:</b><div class="fragment"><pre class="fragment">{ \
<span class="keywordflow">if</span> (<a class="code" href="parser__macros_8h.html#a38b98ec2e96f92062cc7d5fa8ece8a4">inqueue</a>) { <a class="code" href="parser__macros_8h.html#6da05469a748b57f676bbf67a842b25e">dequeue</a>; } \
<span class="keywordflow">if</span> (!<a class="code" href="parser__macros_8h.html#6c107b5ead58c230e358212891737cc3">line_contains_code</a>) { \
<a class="code" href="parser__macros_8h.html#6610fa10e2ad8df10bb6e04babf0bbd8">whole_line_comment</a> = 1; \
<span class="keywordflow">if</span> (!<a class="code" href="parser__macros_8h.html#6f5b3cc3254a82d5d28a418a40f59272">line_start</a>) <a class="code" href="parser__macros_8h.html#6f5b3cc3254a82d5d28a418a40f59272">line_start</a> = <a class="code" href="parser__macros_8h.html#366fc4d3a72013313c8b00233a5a7690">ts</a>; \
} \
}
</pre></div>The C equivalent of the Ragel 'comment' action. This is typically unused, but here for consistency. <dl class="note" compact><dt><b>Note:</b></dt><dd>Applies only to line counting parsers. </dd></dl>
</div>
</div><p>
<a class="anchor" name="6da05469a748b57f676bbf67a842b25e"></a><!-- doxytag: member="parser_macros.h::dequeue" ref="6da05469a748b57f676bbf67a842b25e" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define dequeue </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
<b>Value:</b><div class="fragment"><pre class="fragment">{ \
<a class="code" href="parser__macros_8h.html#a38b98ec2e96f92062cc7d5fa8ece8a4">inqueue</a> = 0; \
<a class="code" href="parser__macros_8h.html#6f5b3cc3254a82d5d28a418a40f59272">line_start</a> = <a class="code" href="parser__macros_8h.html#207101bbc948307c92f53d6521e3e85c">last_line_start</a>; \
<a class="code" href="parser__macros_8h.html#6c107b5ead58c230e358212891737cc3">line_contains_code</a> = <a class="code" href="parser__macros_8h.html#c85645edbf093d7ab236c9861ddcdc05">last_line_contains_code</a>; \
<a class="code" href="parser__macros_8h.html#6610fa10e2ad8df10bb6e04babf0bbd8">whole_line_comment</a> = <a class="code" href="parser__macros_8h.html#00405ce6c748a07e6ed3e3f91fe1d25e">last_whole_line_comment</a>; \
}
</pre></div>Restores settings for a failed enqueued entity. This is typically used in the ls, code, and comment macros. <dl class="note" compact><dt><b>Note:</b></dt><dd>Applies only to line counting parsers. </dd></dl>
</div>
</div><p>
<a class="anchor" name="2822d59197758531b6f4a0cc13d0257b"></a><!-- doxytag: member="parser_macros.h::emb_internal_newline" ref="2822d59197758531b6f4a0cc13d0257b" args="(lang)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define emb_internal_newline </td>
<td>(</td>
<td class="paramtype">lang </td>
<td class="paramname"> </td>
<td> ) </td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
<b>Value:</b><div class="fragment"><pre class="fragment">{ \
<span class="keywordflow">if</span> (<a class="code" href="parser__macros_8h.html#289e4572ae2214b56c963362620009ce">seen</a> && <a class="code" href="parser__macros_8h.html#289e4572ae2214b56c963362620009ce">seen</a> != lang) \
<a class="code" href="parser__macros_8h.html#b08c3ed468f4ad3e1a9d391c1a4337d0">std_internal_newline</a>(<a class="code" href="parser__macros_8h.html#289e4572ae2214b56c963362620009ce">seen</a>) \
<span class="keywordflow">else</span> \
<a class="code" href="parser__macros_8h.html#b08c3ed468f4ad3e1a9d391c1a4337d0">std_internal_newline</a>(lang) \
<a class="code" href="parser__macros_8h.html#289e4572ae2214b56c963362620009ce">seen</a> = 0; \
}
</pre></div>Executes emebedded language line counting actions for INTERNAL_NL entities based on whether or not the embedded language's code has been seen in a parent line. This is typically used in the main action for the INTERNAL_NL entity. <dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>lang</em> </td><td>The language name string. </td></tr>
</table>
</dl>
<dl class="note" compact><dt><b>Note:</b></dt><dd>Applies only to line counting parsers. </dd></dl>
</div>
</div><p>
<a class="anchor" name="b5304b201ce6824e3c021e245d6a5e94"></a><!-- doxytag: member="parser_macros.h::emb_newline" ref="b5304b201ce6824e3c021e245d6a5e94" args="(lang)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define emb_newline </td>
<td>(</td>
<td class="paramtype">lang </td>
<td class="paramname"> </td>
<td> ) </td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
<b>Value:</b><div class="fragment"><pre class="fragment">{ \
<span class="keywordflow">if</span> (<a class="code" href="parser__macros_8h.html#289e4572ae2214b56c963362620009ce">seen</a> && <a class="code" href="parser__macros_8h.html#289e4572ae2214b56c963362620009ce">seen</a> != lang) \
<a class="code" href="parser__macros_8h.html#aaf8abebfd56b683567c15bfa3f063f1">std_newline</a>(<a class="code" href="parser__macros_8h.html#289e4572ae2214b56c963362620009ce">seen</a>) \
<span class="keywordflow">else</span> \
<a class="code" href="parser__macros_8h.html#aaf8abebfd56b683567c15bfa3f063f1">std_newline</a>(lang) \
<a class="code" href="parser__macros_8h.html#289e4572ae2214b56c963362620009ce">seen</a> = 0; \
}
</pre></div>Executes embedded language line counting actions for NEWLINE entities based on whether or not the embedded language's code has been seen in a parent line. This is typically used in the main action for the NEWLINE entity. <dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>lang</em> </td><td>The language name string. </td></tr>
</table>
</dl>
<dl class="note" compact><dt><b>Note:</b></dt><dd>Applies only to line counting parsers. </dd></dl>
</div>
</div><p>
<a class="anchor" name="c1af3f499e72dfc161f2fce616dfd8e7"></a><!-- doxytag: member="parser_macros.h::init" ref="c1af3f499e72dfc161f2fce616dfd8e7" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define init </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
<b>Value:</b><div class="fragment"><pre class="fragment">{ \
<a class="code" href="parser__macros_8h.html#aa1ebe818ec1c763a776cc580551f3e6">p</a> = buffer; \
<a class="code" href="parser__macros_8h.html#46103ad966e7f0e086263030e54a2615">pe</a> = buffer + length; \
<a class="code" href="parser__macros_8h.html#0f4922f5f610d7bd7db8c21a597b3641">eof</a> = <a class="code" href="parser__macros_8h.html#46103ad966e7f0e086263030e54a2615">pe</a>; \
\
<a class="code" href="parser__macros_8h.html#f127db1c17ed58547ff5125a912d02b9">buffer_start</a> = buffer; \
<a class="code" href="parser__macros_8h.html#6610fa10e2ad8df10bb6e04babf0bbd8">whole_line_comment</a> = 0; \
<a class="code" href="parser__macros_8h.html#6c107b5ead58c230e358212891737cc3">line_contains_code</a> = 0; \
<a class="code" href="parser__macros_8h.html#6f5b3cc3254a82d5d28a418a40f59272">line_start</a> = 0; \
<a class="code" href="parser__macros_8h.html#d4e4601988acb4a95ecd1ec380359ae5">entity</a> = 0; \
<a class="code" href="parser__macros_8h.html#289e4572ae2214b56c963362620009ce">seen</a> = 0; \
<a class="code" href="parser__macros_8h.html#a38b98ec2e96f92062cc7d5fa8ece8a4">inqueue</a> = 0; \
}
</pre></div>Initializes variables for parsing a buffer. Required at the beginning of every parser function.
</div>
</div><p>
<a class="anchor" name="7e82c89c9a3dc533077791088d1ee77b"></a><!-- doxytag: member="parser_macros.h::INTERNAL_NL" ref="7e82c89c9a3dc533077791088d1ee77b" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define INTERNAL_NL -2 </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Internal newline entity. Used for newlines inside patterns like strings and comments that can have newlines in them. <dl class="note" compact><dt><b>Note:</b></dt><dd>This is only used for line counting parsers. </dd></dl>
</div>
</div><p>
<a class="anchor" name="a4df6978a0e35c95ca051f1da0dd7e86"></a><!-- doxytag: member="parser_macros.h::ls" ref="a4df6978a0e35c95ca051f1da0dd7e86" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define ls </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
<b>Value:</b><div class="fragment"><pre class="fragment">{ \
<span class="keywordflow">if</span> (<a class="code" href="parser__macros_8h.html#a38b98ec2e96f92062cc7d5fa8ece8a4">inqueue</a>) { <a class="code" href="parser__macros_8h.html#6da05469a748b57f676bbf67a842b25e">dequeue</a>; } \
<span class="keywordflow">if</span> (!<a class="code" href="parser__macros_8h.html#6f5b3cc3254a82d5d28a418a40f59272">line_start</a>) <a class="code" href="parser__macros_8h.html#6f5b3cc3254a82d5d28a418a40f59272">line_start</a> = <a class="code" href="parser__macros_8h.html#366fc4d3a72013313c8b00233a5a7690">ts</a>; \
}
</pre></div>Sets the line_start variable to ts. This is typically used for the SPACE entity in the main action. <dl class="note" compact><dt><b>Note:</b></dt><dd>Applies only to line counting parsers. </dd></dl>
</div>
</div><p>
<a class="anchor" name="806511f4930171733227c99101dc0606"></a><!-- doxytag: member="parser_macros.h::NEWLINE" ref="806511f4930171733227c99101dc0606" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define NEWLINE -1 </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Newline entity. <dl class="note" compact><dt><b>Note:</b></dt><dd>This is only used for line counting parsers. </dd></dl>
</div>
</div><p>
<a class="anchor" name="1adf47f60e418da0f0c3caa471728021"></a><!-- doxytag: member="parser_macros.h::process_last_line" ref="1adf47f60e418da0f0c3caa471728021" args="(lang)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define process_last_line </td>
<td>(</td>
<td class="paramtype">lang </td>
<td class="paramname"> </td>
<td> ) </td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
<b>Value:</b><div class="fragment"><pre class="fragment">{\
<span class="keywordflow">if</span> ((<a class="code" href="parser__macros_8h.html#6610fa10e2ad8df10bb6e04babf0bbd8">whole_line_comment</a> || <a class="code" href="parser__macros_8h.html#6c107b5ead58c230e358212891737cc3">line_contains_code</a>) && callback) { \
<span class="keywordflow">if</span> (<a class="code" href="parser__macros_8h.html#6c107b5ead58c230e358212891737cc3">line_contains_code</a>) \
callback(lang, <span class="stringliteral">"lcode"</span>, <a class="code" href="parser__macros_8h.html#cc0eb0fbef1d4e1ccb5cf27961af93ad">cint</a>(<a class="code" href="parser__macros_8h.html#6f5b3cc3254a82d5d28a418a40f59272">line_start</a>), <a class="code" href="parser__macros_8h.html#cc0eb0fbef1d4e1ccb5cf27961af93ad">cint</a>(<a class="code" href="parser__macros_8h.html#46103ad966e7f0e086263030e54a2615">pe</a>), userdata); \
<span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="parser__macros_8h.html#6610fa10e2ad8df10bb6e04babf0bbd8">whole_line_comment</a>) \
callback(lang, <span class="stringliteral">"lcomment"</span>, <a class="code" href="parser__macros_8h.html#cc0eb0fbef1d4e1ccb5cf27961af93ad">cint</a>(<a class="code" href="parser__macros_8h.html#6f5b3cc3254a82d5d28a418a40f59272">line_start</a>), <a class="code" href="parser__macros_8h.html#cc0eb0fbef1d4e1ccb5cf27961af93ad">cint</a>(<a class="code" href="parser__macros_8h.html#46103ad966e7f0e086263030e54a2615">pe</a>), userdata); \
} \
}
</pre></div>Processes the last line for buffers that don't have a newline at EOF. This is typically used at the end of the parse_lang function after the Ragel parser has been executed. <dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>lang</em> </td><td>The language name string. </td></tr>
</table>
</dl>
<dl class="note" compact><dt><b>Note:</b></dt><dd>Applies only to line counting parsers. </dd></dl>
</div>
</div><p>
<a class="anchor" name="e9fb722b81bbd8bb0e1de37941fab172"></a><!-- doxytag: member="parser_macros.h::saw" ref="e9fb722b81bbd8bb0e1de37941fab172" args="(lang)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define saw </td>
<td>(</td>
<td class="paramtype">lang </td>
<td class="paramname"> </td>
<td> ) </td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
<b>Value:</b><div class="fragment"><pre class="fragment">{ \
<a class="code" href="parser__macros_8h.html#289e4572ae2214b56c963362620009ce">seen</a> = lang; \
<a class="code" href="parser__macros_8h.html#6610fa10e2ad8df10bb6e04babf0bbd8">whole_line_comment</a> = 0; \
<a class="code" href="parser__macros_8h.html#6c107b5ead58c230e358212891737cc3">line_contains_code</a> = 0; \
}
</pre></div>Sets up for having seen an embedded language. This is typically used when entering an embedded language which usually does not span multiple lines (e.g. php for <?php echo 'blah' ?> on single lines) so the line is counted as embedded code or comment, not parent code. <dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>lang</em> </td><td>The language name string. </td></tr>
</table>
</dl>
<dl class="note" compact><dt><b>Note:</b></dt><dd>Applies only to line counting parsers. </dd></dl>
</div>
</div><p>
<a class="anchor" name="b08c3ed468f4ad3e1a9d391c1a4337d0"></a><!-- doxytag: member="parser_macros.h::std_internal_newline" ref="b08c3ed468f4ad3e1a9d391c1a4337d0" args="(lang)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define std_internal_newline </td>
<td>(</td>
<td class="paramtype">lang </td>
<td class="paramname"> </td>
<td> ) </td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
<b>Value:</b><div class="fragment"><pre class="fragment">{ \
<span class="keywordflow">if</span> (callback && <a class="code" href="parser__macros_8h.html#aa1ebe818ec1c763a776cc580551f3e6">p</a> > <a class="code" href="parser__macros_8h.html#6f5b3cc3254a82d5d28a418a40f59272">line_start</a>) { \
<span class="keywordflow">if</span> (<a class="code" href="parser__macros_8h.html#6c107b5ead58c230e358212891737cc3">line_contains_code</a>) { \
<span class="keywordflow">if</span> (<a class="code" href="parser__macros_8h.html#a38b98ec2e96f92062cc7d5fa8ece8a4">inqueue</a>) \
<a class="code" href="parser__macros_8h.html#cef933f90a0bd6318613e93f39067ac8">enqueue</a>(lang, <span class="stringliteral">"lcode"</span>, <a class="code" href="parser__macros_8h.html#cc0eb0fbef1d4e1ccb5cf27961af93ad">cint</a>(<a class="code" href="parser__macros_8h.html#6f5b3cc3254a82d5d28a418a40f59272">line_start</a>), <a class="code" href="parser__macros_8h.html#cc0eb0fbef1d4e1ccb5cf27961af93ad">cint</a>(<a class="code" href="parser__macros_8h.html#aa1ebe818ec1c763a776cc580551f3e6">p</a>), userdata); \
<span class="keywordflow">else</span> \
callback(lang, <span class="stringliteral">"lcode"</span>, <a class="code" href="parser__macros_8h.html#cc0eb0fbef1d4e1ccb5cf27961af93ad">cint</a>(<a class="code" href="parser__macros_8h.html#6f5b3cc3254a82d5d28a418a40f59272">line_start</a>), <a class="code" href="parser__macros_8h.html#cc0eb0fbef1d4e1ccb5cf27961af93ad">cint</a>(<a class="code" href="parser__macros_8h.html#aa1ebe818ec1c763a776cc580551f3e6">p</a>), userdata); \
} <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="parser__macros_8h.html#6610fa10e2ad8df10bb6e04babf0bbd8">whole_line_comment</a>) { \
<span class="keywordflow">if</span> (<a class="code" href="parser__macros_8h.html#a38b98ec2e96f92062cc7d5fa8ece8a4">inqueue</a>) \
<a class="code" href="parser__macros_8h.html#cef933f90a0bd6318613e93f39067ac8">enqueue</a>(lang, <span class="stringliteral">"lcomment"</span>, <a class="code" href="parser__macros_8h.html#cc0eb0fbef1d4e1ccb5cf27961af93ad">cint</a>(<a class="code" href="parser__macros_8h.html#6f5b3cc3254a82d5d28a418a40f59272">line_start</a>), <a class="code" href="parser__macros_8h.html#cc0eb0fbef1d4e1ccb5cf27961af93ad">cint</a>(<a class="code" href="parser__macros_8h.html#aa1ebe818ec1c763a776cc580551f3e6">p</a>), userdata); \
<span class="keywordflow">else</span> \
callback(lang, <span class="stringliteral">"lcomment"</span>, <a class="code" href="parser__macros_8h.html#cc0eb0fbef1d4e1ccb5cf27961af93ad">cint</a>(<a class="code" href="parser__macros_8h.html#6f5b3cc3254a82d5d28a418a40f59272">line_start</a>), <a class="code" href="parser__macros_8h.html#cc0eb0fbef1d4e1ccb5cf27961af93ad">cint</a>(<a class="code" href="parser__macros_8h.html#aa1ebe818ec1c763a776cc580551f3e6">p</a>), userdata); \
} <span class="keywordflow">else</span> { \
<span class="keywordflow">if</span> (<a class="code" href="parser__macros_8h.html#a38b98ec2e96f92062cc7d5fa8ece8a4">inqueue</a>) \
<a class="code" href="parser__macros_8h.html#cef933f90a0bd6318613e93f39067ac8">enqueue</a>(lang, <span class="stringliteral">"lblank"</span>, <a class="code" href="parser__macros_8h.html#cc0eb0fbef1d4e1ccb5cf27961af93ad">cint</a>(<a class="code" href="parser__macros_8h.html#6f5b3cc3254a82d5d28a418a40f59272">line_start</a>), <a class="code" href="parser__macros_8h.html#cc0eb0fbef1d4e1ccb5cf27961af93ad">cint</a>(<a class="code" href="parser__macros_8h.html#aa1ebe818ec1c763a776cc580551f3e6">p</a>), userdata); \
<span class="keywordflow">else</span> \
callback(lang, <span class="stringliteral">"lblank"</span>, <a class="code" href="parser__macros_8h.html#cc0eb0fbef1d4e1ccb5cf27961af93ad">cint</a>(<a class="code" href="parser__macros_8h.html#6f5b3cc3254a82d5d28a418a40f59272">line_start</a>), <a class="code" href="parser__macros_8h.html#cc0eb0fbef1d4e1ccb5cf27961af93ad">cint</a>(<a class="code" href="parser__macros_8h.html#aa1ebe818ec1c763a776cc580551f3e6">p</a>), userdata); \
} \
} \
<a class="code" href="parser__macros_8h.html#6610fa10e2ad8df10bb6e04babf0bbd8">whole_line_comment</a> = 0; \
<a class="code" href="parser__macros_8h.html#6c107b5ead58c230e358212891737cc3">line_contains_code</a> = 0; \
<a class="code" href="parser__macros_8h.html#6f5b3cc3254a82d5d28a418a40f59272">line_start</a> = <a class="code" href="parser__macros_8h.html#aa1ebe818ec1c763a776cc580551f3e6">p</a>; \
}
</pre></div>Executes standard line counting actions for INTERNAL_NL entities. This is typically used in the main action for the INTERNAL_NL entity. <dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>lang</em> </td><td>The language name string. </td></tr>
</table>
</dl>
<dl class="note" compact><dt><b>Note:</b></dt><dd>Applies only to line counting parsers. </dd></dl>
</div>
</div><p>
<a class="anchor" name="aaf8abebfd56b683567c15bfa3f063f1"></a><!-- doxytag: member="parser_macros.h::std_newline" ref="aaf8abebfd56b683567c15bfa3f063f1" args="(lang)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define std_newline </td>
<td>(</td>
<td class="paramtype">lang </td>
<td class="paramname"> </td>
<td> ) </td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
<b>Value:</b><div class="fragment"><pre class="fragment">{\
<span class="keywordflow">if</span> (<a class="code" href="parser__macros_8h.html#a38b98ec2e96f92062cc7d5fa8ece8a4">inqueue</a>) { <a class="code" href="parser__macros_8h.html#6da05469a748b57f676bbf67a842b25e">dequeue</a>; } \
<span class="keywordflow">if</span> (callback && <a class="code" href="parser__macros_8h.html#49aa6b4212d238e0be3312cf89738b98">te</a> > <a class="code" href="parser__macros_8h.html#6f5b3cc3254a82d5d28a418a40f59272">line_start</a>) { \
<span class="keywordflow">if</span> (<a class="code" href="parser__macros_8h.html#6c107b5ead58c230e358212891737cc3">line_contains_code</a>) \
callback(lang, <span class="stringliteral">"lcode"</span>, <a class="code" href="parser__macros_8h.html#cc0eb0fbef1d4e1ccb5cf27961af93ad">cint</a>(<a class="code" href="parser__macros_8h.html#6f5b3cc3254a82d5d28a418a40f59272">line_start</a>), <a class="code" href="parser__macros_8h.html#cc0eb0fbef1d4e1ccb5cf27961af93ad">cint</a>(<a class="code" href="parser__macros_8h.html#49aa6b4212d238e0be3312cf89738b98">te</a>), userdata); \
<span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="parser__macros_8h.html#6610fa10e2ad8df10bb6e04babf0bbd8">whole_line_comment</a>) \
callback(lang, <span class="stringliteral">"lcomment"</span>, <a class="code" href="parser__macros_8h.html#cc0eb0fbef1d4e1ccb5cf27961af93ad">cint</a>(<a class="code" href="parser__macros_8h.html#6f5b3cc3254a82d5d28a418a40f59272">line_start</a>), <a class="code" href="parser__macros_8h.html#cc0eb0fbef1d4e1ccb5cf27961af93ad">cint</a>(<a class="code" href="parser__macros_8h.html#49aa6b4212d238e0be3312cf89738b98">te</a>), userdata); \
<span class="keywordflow">else</span> \
callback(lang, <span class="stringliteral">"lblank"</span>, <a class="code" href="parser__macros_8h.html#cc0eb0fbef1d4e1ccb5cf27961af93ad">cint</a>(<a class="code" href="parser__macros_8h.html#366fc4d3a72013313c8b00233a5a7690">ts</a>), <a class="code" href="parser__macros_8h.html#cc0eb0fbef1d4e1ccb5cf27961af93ad">cint</a>(<a class="code" href="parser__macros_8h.html#49aa6b4212d238e0be3312cf89738b98">te</a>), userdata); \
} \
<a class="code" href="parser__macros_8h.html#6610fa10e2ad8df10bb6e04babf0bbd8">whole_line_comment</a> = 0; \
<a class="code" href="parser__macros_8h.html#6c107b5ead58c230e358212891737cc3">line_contains_code</a> = 0; \
<a class="code" href="parser__macros_8h.html#6f5b3cc3254a82d5d28a418a40f59272">line_start</a> = 0; \
}
</pre></div>Executes standard line counting actions for NEWLINE entities. This is typically used in the main action for the NEWLINE entity. <dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>lang</em> </td><td>The language name string. </td></tr>
</table>
</dl>
<dl class="note" compact><dt><b>Note:</b></dt><dd>Applies only to line counting parsers. </dd></dl>
</div>
</div><p>
<hr><h2>Typedef Documentation</h2>
<a class="anchor" name="c27bb77f57039cab3883b9e21e6c48f4"></a><!-- doxytag: member="parser_macros.h::Callback" ref="c27bb77f57039cab3883b9e21e6c48f4" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef struct <a class="el" href="structCallbackItem.html">CallbackItem</a> <a class="el" href="structCallbackItem.html">Callback</a> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
</div>
</div><p>
<hr><h2>Function Documentation</h2>
<a class="anchor" name="cef933f90a0bd6318613e93f39067ac8"></a><!-- doxytag: member="parser_macros.h::enqueue" ref="cef933f90a0bd6318613e93f39067ac8" args="(const char *lang, const char *entity, int s, int e, void *udata)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void enqueue </td>
<td>(</td>
<td class="paramtype">const char * </td>
<td class="paramname"> <em>lang</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char * </td>
<td class="paramname"> <em>entity</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"> <em>s</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"> <em>e</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">void * </td>
<td class="paramname"> <em>udata</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Enqueues a callback for calling upon commit. This is only necessary for line counting machines. Ragel will execute actions in real-time rather than after a complete match. This is a problem for entities that contain internal newlines, since there is a callback for each internal newline whether or not the end of the entity matches. This means that if, for example, the beginning of a string entity is matched, the text following is treated as code until the ending delimiter. If there is no ending delimiter (it was not actually a string entity), Ragel will jump back to the beginning of the string and reparse the text again. This means all the callbacks called were probably not accurate. To remedy this, any entity which needs an ending delimiter that may not appear will have its callbacks enqueued and then committed when the ending delimitter is reached. If that delimitter is not reached, the callbacks are never called. <dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>lang</em> </td><td>The language name. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>entity</em> </td><td>The entity (lcode, lcomment, lblank). </td></tr>
<tr><td valign="top"></td><td valign="top"><em>s</em> </td><td>The start position of the entity in the buffer. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>e</em> </td><td>The end position of the entity in the buffer. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>udata</em> </td><td>Userdata. </td></tr>
</table>
</dl>
</div>
</div><p>
<a class="anchor" name="666ec961128241e997f03af3ae16a2ea"></a><!-- doxytag: member="parser_macros.h::free_queue" ref="666ec961128241e997f03af3ae16a2ea" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void free_queue </td>
<td>(</td>
<td class="paramname"> </td>
<td> ) </td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Frees the memory used by a queue.
</div>
</div><p>
<a class="anchor" name="33c0ec8adc93c385bb9560eb42cb52e2"></a><!-- doxytag: member="parser_macros.h::is_blank_entry" ref="33c0ec8adc93c385bb9560eb42cb52e2" args="(char **p)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int is_blank_entry </td>
<td>(</td>
<td class="paramtype">char ** </td>
<td class="paramname"> <em>p</em> </td>
<td> ) </td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Determines whether or not the rest of the line is blank. This is typically used when entering an embedded language. <dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>p</em> </td><td>The position of entry into the emebedded language. </td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>0 if the rest of the line is not blank, the position at the end of the newline otherwise (inclusive). </dd></dl>
<dl class="note" compact><dt><b>Note:</b></dt><dd>Applies only to line counting parsers. </dd></dl>
</div>
</div><p>
<hr><h2>Variable Documentation</h2>
<a class="anchor" name="534c5331d9ff060f0e653d61e72f489f"></a><!-- doxytag: member="parser_macros.h::act" ref="534c5331d9ff060f0e653d61e72f489f" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int <a class="el" href="parser__macros_8h.html#534c5331d9ff060f0e653d61e72f489f">act</a> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Required by Ragel.
</div>
</div><p>
<a class="anchor" name="f127db1c17ed58547ff5125a912d02b9"></a><!-- doxytag: member="parser_macros.h::buffer_start" ref="f127db1c17ed58547ff5125a912d02b9" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">char* <a class="el" href="parser__macros_8h.html#f127db1c17ed58547ff5125a912d02b9">buffer_start</a> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
The buffer currently being parsed.
</div>
</div><p>
<a class="anchor" name="55de8ae2eeb299ec915f3f3dc354476e"></a><!-- doxytag: member="parser_macros.h::callback_list_head" ref="55de8ae2eeb299ec915f3f3dc354476e" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="structCallbackItem.html">Callback</a>* <a class="el" href="parser__macros_8h.html#55de8ae2eeb299ec915f3f3dc354476e">callback_list_head</a> = NULL </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
The head of the Callback queue.
</div>
</div><p>
<a class="anchor" name="72a0d9ad9216bded86e30678b4972814"></a><!-- doxytag: member="parser_macros.h::callback_list_tail" ref="72a0d9ad9216bded86e30678b4972814" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="structCallbackItem.html">Callback</a>* <a class="el" href="parser__macros_8h.html#72a0d9ad9216bded86e30678b4972814">callback_list_tail</a> = NULL </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
The tail of the Callback queue.
</div>
</div><p>
<a class="anchor" name="d35c7ed2784f4fb57849237ce534f17e"></a><!-- doxytag: member="parser_macros.h::cs" ref="d35c7ed2784f4fb57849237ce534f17e" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int <a class="el" href="parser__macros_8h.html#d35c7ed2784f4fb57849237ce534f17e">cs</a> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Required by Ragel.
</div>
</div><p>
<a class="anchor" name="d4e4601988acb4a95ecd1ec380359ae5"></a><!-- doxytag: member="parser_macros.h::entity" ref="d4e4601988acb4a95ecd1ec380359ae5" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int <a class="el" href="parser__macros_8h.html#d4e4601988acb4a95ecd1ec380359ae5">entity</a> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
State variable for the current entity being matched.
</div>
</div><p>
<a class="anchor" name="0f4922f5f610d7bd7db8c21a597b3641"></a><!-- doxytag: member="parser_macros.h::eof" ref="0f4922f5f610d7bd7db8c21a597b3641" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">char* <a class="el" href="parser__macros_8h.html#0f4922f5f610d7bd7db8c21a597b3641">eof</a> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Required by Ragel.
</div>
</div><p>
<a class="anchor" name="a38b98ec2e96f92062cc7d5fa8ece8a4"></a><!-- doxytag: member="parser_macros.h::inqueue" ref="a38b98ec2e96f92062cc7d5fa8ece8a4" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int <a class="el" href="parser__macros_8h.html#a38b98ec2e96f92062cc7d5fa8ece8a4">inqueue</a> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Flag indicating whether or not to enqueue callbacks instead of calling them in real time. <dl class="note" compact><dt><b>Note:</b></dt><dd>This is only used for line counting parsers. </dd></dl>
</div>
</div><p>
<a class="anchor" name="c85645edbf093d7ab236c9861ddcdc05"></a><!-- doxytag: member="parser_macros.h::last_line_contains_code" ref="c85645edbf093d7ab236c9861ddcdc05" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int <a class="el" href="parser__macros_8h.html#c85645edbf093d7ab236c9861ddcdc05">last_line_contains_code</a> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Backup variable for 'inqueue'ing. <dl class="note" compact><dt><b>Note:</b></dt><dd>This is only used for line counting parsers. </dd></dl>
</div>
</div><p>
<a class="anchor" name="207101bbc948307c92f53d6521e3e85c"></a><!-- doxytag: member="parser_macros.h::last_line_start" ref="207101bbc948307c92f53d6521e3e85c" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">char* <a class="el" href="parser__macros_8h.html#207101bbc948307c92f53d6521e3e85c">last_line_start</a> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Backup variable for 'inqueue'ing. <dl class="note" compact><dt><b>Note:</b></dt><dd>This is only used for line counting parsers. </dd></dl>
</div>
</div><p>
<a class="anchor" name="00405ce6c748a07e6ed3e3f91fe1d25e"></a><!-- doxytag: member="parser_macros.h::last_whole_line_comment" ref="00405ce6c748a07e6ed3e3f91fe1d25e" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int <a class="el" href="parser__macros_8h.html#00405ce6c748a07e6ed3e3f91fe1d25e">last_whole_line_comment</a> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Backup variable for 'inqueue'ing. <dl class="note" compact><dt><b>Note:</b></dt><dd>This is only used for line counting parsers. </dd></dl>
</div>
</div><p>
<a class="anchor" name="6c107b5ead58c230e358212891737cc3"></a><!-- doxytag: member="parser_macros.h::line_contains_code" ref="6c107b5ead58c230e358212891737cc3" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int <a class="el" href="parser__macros_8h.html#6c107b5ead58c230e358212891737cc3">line_contains_code</a> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Flag indicating whether or not the current line contains any code. <dl class="note" compact><dt><b>Note:</b></dt><dd>This is only used for line counting parsers. </dd></dl>
</div>
</div><p>
<a class="anchor" name="6f5b3cc3254a82d5d28a418a40f59272"></a><!-- doxytag: member="parser_macros.h::line_start" ref="6f5b3cc3254a82d5d28a418a40f59272" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">char* <a class="el" href="parser__macros_8h.html#6f5b3cc3254a82d5d28a418a40f59272">line_start</a> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
The beginning of the current line in the buffer being parsed. <dl class="note" compact><dt><b>Note:</b></dt><dd>This is only used for line counting parsers. </dd></dl>
</div>
</div><p>
<a class="anchor" name="aa1ebe818ec1c763a776cc580551f3e6"></a><!-- doxytag: member="parser_macros.h::p" ref="aa1ebe818ec1c763a776cc580551f3e6" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">char* <a class="el" href="parser__macros_8h.html#aa1ebe818ec1c763a776cc580551f3e6">p</a> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Required by Ragel.
</div>
</div><p>
<a class="anchor" name="46103ad966e7f0e086263030e54a2615"></a><!-- doxytag: member="parser_macros.h::pe" ref="46103ad966e7f0e086263030e54a2615" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">char* <a class="el" href="parser__macros_8h.html#46103ad966e7f0e086263030e54a2615">pe</a> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Required by Ragel.
</div>
</div><p>
<a class="anchor" name="289e4572ae2214b56c963362620009ce"></a><!-- doxytag: member="parser_macros.h::seen" ref="289e4572ae2214b56c963362620009ce" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const char* <a class="el" href="parser__macros_8h.html#289e4572ae2214b56c963362620009ce">seen</a> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Keeps track of an embedded language. <dl class="note" compact><dt><b>Note:</b></dt><dd>This is only used for line counting parsers. </dd></dl>
</div>
</div><p>
<a class="anchor" name="1998d6eddc359fdb029fe1dc0b9a50b3"></a><!-- doxytag: member="parser_macros.h::stack" ref="1998d6eddc359fdb029fe1dc0b9a50b3" args="[5]" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int <a class="el" href="parser__macros_8h.html#1998d6eddc359fdb029fe1dc0b9a50b3">stack</a>[5] </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Required by Ragel.
</div>
</div><p>
<a class="anchor" name="49aa6b4212d238e0be3312cf89738b98"></a><!-- doxytag: member="parser_macros.h::te" ref="49aa6b4212d238e0be3312cf89738b98" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">char* <a class="el" href="parser__macros_8h.html#49aa6b4212d238e0be3312cf89738b98">te</a> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Required by Ragel.
</div>
</div><p>
<a class="anchor" name="f93f4f37fc2ad9c37af4a715423b110c"></a><!-- doxytag: member="parser_macros.h::top" ref="f93f4f37fc2ad9c37af4a715423b110c" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int <a class="el" href="parser__macros_8h.html#f93f4f37fc2ad9c37af4a715423b110c">top</a> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Required by Ragel.
</div>
</div><p>
<a class="anchor" name="366fc4d3a72013313c8b00233a5a7690"></a><!-- doxytag: member="parser_macros.h::ts" ref="366fc4d3a72013313c8b00233a5a7690" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">char* <a class="el" href="parser__macros_8h.html#366fc4d3a72013313c8b00233a5a7690">ts</a> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Required by Ragel.
</div>
</div><p>
<a class="anchor" name="6610fa10e2ad8df10bb6e04babf0bbd8"></a><!-- doxytag: member="parser_macros.h::whole_line_comment" ref="6610fa10e2ad8df10bb6e04babf0bbd8" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int <a class="el" href="parser__macros_8h.html#6610fa10e2ad8df10bb6e04babf0bbd8">whole_line_comment</a> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Flag indicating whether or not the current line contains only a comment. <dl class="note" compact><dt><b>Note:</b></dt><dd>This is only used for line counting parsers. </dd></dl>
</div>
</div><p>
</div>
<hr size="1"><address style="text-align: right;"><small>Generated on Fri Aug 28 15:20:08 2009 for ohcount by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.9 </small></address>
</body>
</html>