]> granicus.if.org Git - re2c/commitdiff
- Update docu
authorhelly <helly@642ea486-5414-0410-9d7f-a0204ed87703>
Sun, 4 Sep 2005 12:01:21 +0000 (12:01 +0000)
committerhelly <helly@642ea486-5414-0410-9d7f-a0204ed87703>
Sun, 4 Sep 2005 12:01:21 +0000 (12:01 +0000)
htdocs/manual.html

index 052d190c4a2e37c7e9b7774f9e213cd7221b725f..657f0b044e7419f4aa0abeed38ab32acd08c003e 100755 (executable)
@@ -7,7 +7,7 @@
 <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">&nbsp;</a>
@@ -15,7 +15,7 @@ Updated: 26 June 2005<br />
 <p>re2c - convert regular expressions to C/C++</p>
 <a name="lbAC" id="lbAC">&nbsp;</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">&nbsp;</a>
 <h2>DESCRIPTION</h2>
 <p><b>re2c</b> is a preprocessor that generates C-based recognizers from
@@ -111,6 +111,10 @@ parser issues and states. If you use this switch you need to define a macro
 <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>
@@ -164,6 +168,15 @@ the user wish to save the state of the scanner and have YYFILL return to the
 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 />
@@ -209,6 +222,8 @@ ANSI-C escape sequences can be used.</dd>
 <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>
@@ -236,19 +251,28 @@ context".</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 &lt;<a href="file:/usr/include/stdlib.h">stdlib.h</a>&gt;
-#include &lt;<a href="file:/usr/include/stdio.h">stdio.h</a>&gt;
-#include &lt;<a href="file:/usr/include/fcntl.h">fcntl.h</a>&gt;
-#include &lt;<a href="file:/usr/include/string.h">string.h</a>&gt;
+#include &lt;stdlib.h&gt;
+#include &lt;stdio.h&gt;
+#include &lt;fcntl.h&gt;
+#include &lt;string.h&gt;
 
 #define ADDEQ   257
 #define ANDAND  258
@@ -538,9 +562,8 @@ newline (or some other character that can't appear within another token); upon
 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>
@@ -570,7 +593,7 @@ No [^x]. Use difference instead. <a name="lbAL" id="lbAL"> </a>
 <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>
@@ -594,6 +617,6 @@ No [^x]. Use difference instead. <a name="lbAL" id="lbAL"> </a>
 <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>