<body>
<h1>RE2C</h1>
Section: User Commands (1)<br />
-Updated: 26 June 2005<br />
+Updated: 04 September 2005<br />
<a href="#index">Index</a>
<hr />
<a name="lbAB" id="lbAB"> </a>
<p>re2c - convert regular expressions to C/C++</p>
<a name="lbAC" id="lbAC"> </a>
<h2>SYNOPSIS</h2>
-<p><b>re2c</b> [<b>-efsbvhd</b>] [<b>-o output</b>] file</p>
+<p><b>re2c</b> [<b>-efsbvhdi</b>] [<b>-o output</b>] file</p>
<a name="lbAD" id="lbAD"> </a>
<h2>DESCRIPTION</h2>
<p><b>re2c</b> is a preprocessor that generates C-based recognizers from
<i>YYDEBUG</i> that is called like a function with two parameters: <i>void
YYDEBUG(int state, char current)</i>. The first parameter receives the state or
-1 and the second parameter receives the input at the current cursor.<br /><br /></dd>
+<dt><b>-i</b></dt>
+<dd>Do not output #line information. This is usefull when you want use a CMS
+tool with the re2c output which you might want if you do not require your users
+to have re2c themselves when building from your source.<br /><br /></dd>
<dt><b>-h</b></dt>
<dd><b>-?</b> Invoke a short help.<br /><br /></dd>
<dt><b>-v</b></dt>
caller, all he has to do is store that unique identifer in a variable. Later,
when the scannered is called again, it will call YYGETSTATE() and resume
execution right where it left off.<br /><br /></dd>
+<dt>YYDEBUG(<i>state</i>,<i>current</i>)</dt>
+<dd>This is only needed if the <b>-d</b> flag was specified. It allows to
+easily debug the generated parser by calling a user defined function for every
+state. The function should have the following signature: <i>void YYDEBUG(int
+state, char current)</i>. The first parameter receives the state or -1 and the
+second parameter receives the input at the current cursor.<br /><br /></dd>
+<dt>YYMAXFILL</dt>
+<dd>This will be automatically defined by /*!max:re2c */ blocks as explained
+above.<br /><br /></dd>
</dl>
<br />
<br />
<dt>[abj-oZ]</dt>
<dd>a "character class" with a range in it; matches an 'a', a 'b', any letter
from 'j' through 'o', or a 'Z'.</dd>
+<dt>[^<i>class</i>]</dt>
+<dd>an inverted "character class".</dd>
<dt><i>r</i>\<i>s</i></dt>
<dd>match any <i>r</i> which isn't an <i>s</i>. <i>r</i> and <i>s</i> must be
regular expressions which can be expressed as character classes.</dd>
<dd>matches <i>r</i> at least <i>n</i> times.</dd>
<dt><i>r</i>{<i>n</i>,<i>m</i>}</dt>
<dd>matches <i>r</i> at least <i>n</i> but not more than <i>m</i> times.</dd>
+<dt>.</dt>
+<dd>match any character except newline (\n).</dd>
+<dt><i>def</i></dt>
+<dd>matches named definition as specified by <i>def</i>.</dd>
</dl>
<br />
<br />
+<p>Character classes and string literals may contain octoal or hexadecimal
+character definitions and the following set of escape sequences (\n,<br />
+ \t, \v, \b, \r, \f, \a, \\). An octal character is defined by a backslash
+followed by its three octal digits and a hexadecimal character is defined by
+backslash, a lower cased 'x' and its two hexadecimal digits.</p>
<p>The regular expressions listed above are grouped according to precedence,
from highest precedence at the top to lowest at the bottom. Those grouped
together have equal precedence.</p>
<a name="lbAJ" id="lbAJ"> </a>
<h2>A LARGER EXAMPLE</h2>
<pre>
-#include <<a href="file:/usr/include/stdlib.h">stdlib.h</a>>
-#include <<a href="file:/usr/include/stdio.h">stdio.h</a>>
-#include <<a href="file:/usr/include/fcntl.h">fcntl.h</a>>
-#include <<a href="file:/usr/include/string.h">string.h</a>>
+#include <stdlib.h>
+#include <stdio.h>
+#include <fcntl.h>
+#include <string.h>
#define ADDEQ 257
#define ANDAND 258
recognizing such a character check to see if it is the sentinel and act
accordingly.</p>
<p><b>re2c</b> does not provide start conditions: use a separate scanner
-specification for each start condition (as illustrated in the above
-example).</p>
-No [^x]. Use difference instead. <a name="lbAL" id="lbAL"> </a>
+specification for each start condition (as illustrated in the above example).
+<a name="lbAL" id="lbAL"> </a></p>
<h2>BUGS</h2>
<p>Only fixed length trailing context can be handled.</p>
<p>Difference only works for character sets.</p>
<br />
<a name="lbAO" id="lbAO"> </a>
<h2>VERSION INFORMATION</h2>
-<p>This manpage describes <b>re2c</b>, version 0.9.8.</p>
+<p>This manpage describes <b>re2c</b>, version 0.9.10.</p>
<hr />
<a name="index" id="index"> </a>
<h2>Index</h2>
<br />
<hr />
<p>This document was created by man2html, using the manual pages.<br />
-Time: 10:30:42 GMT, June 26, 2005</p>
+Time: 11:33:44 GMT, September 04, 2005</p>
</body>
</html>