]> granicus.if.org Git - re2c/commitdiff
- Update docu
authorhelly <helly@642ea486-5414-0410-9d7f-a0204ed87703>
Sun, 22 Apr 2007 19:51:00 +0000 (19:51 +0000)
committerhelly <helly@642ea486-5414-0410-9d7f-a0204ed87703>
Sun, 22 Apr 2007 19:51:00 +0000 (19:51 +0000)
re2c/CHANGELOG
re2c/htdocs/index.html
re2c/htdocs/manual.html
re2c/re2c.1.in

index 6921f9be6302fec88af3f88416d25975db41cf5e..f41d3e410fcb94af96416c048397ca996d2b1e18 100644 (file)
@@ -1,5 +1,6 @@
 Version 0.13.0 (2007-??-??)
 ---------------------------
+- Add -c and -t to generate scanners with (f)lex-like condition support.
 - Fix issue with short form of switches and parameter if not first switch.
 
 Version 0.12.0 (2007-??-??)
index b027ce9b8411dc399aaccbde41b029069deea7c8..8cc2339bb8053e79c5d7bbb397e2c6f15ab0bcd8 100755 (executable)
@@ -81,6 +81,7 @@ fixes which were incorporated. <a href=
 <h1>Changelog</h1>
 <h2>2007-??-??: 0.13.0</h2>
 <ul>
+<li>Add -c and -t to generate scanners with (f)lex-like condition support.</li>
 <li>Fix issue with short form of switches and parameter if not first switch.</li>
 </ul>
 <h2>2007-??-??: 0.12.0</h2>
index 59dc99e7f12f2364350d861860ca6b007815488a..fa04370d130895ee132b8b0f4db56d093852867a 100755 (executable)
@@ -7,7 +7,7 @@
 <body>
 <h1>RE2C</h1>
 Section: User Commands (1)<br />
-Updated: 01 Apr 2007<br />
+Updated: 22 Apr 2007<br />
 <a href="#index">Index</a>
 <hr />
 <a name="lbAB" id="lbAB">&nbsp;</a>
@@ -15,7 +15,7 @@ Updated: 01 Apr 2007<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>-bdefghisuvVw1</b>] [<b>-o output</b>] file</p>
+<p><b>re2c</b> [<b>-bdefghisuvVw1</b>] [<b>-o output</b>] [<b>-c</b> [<b>-t header</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
@@ -91,6 +91,8 @@ scanner code and will not be part of the output.</p>
 <dd>Implies <b>-s</b>. Use bit vectors as well in the attempt to coax better
 code out of the compiler. Most useful for specifications with more than a few
 keywords (e.g. for most programming languages).<br /><br /></dd>
+<dt><b>-c</b></dt>
+<dd>Used to support (f)lex-like condition support.<br /><br /></dd>
 <dt><b>-d</b></dt>
 <dd>Creates a parser that dumps information about the current position and in
 which state the parser is while parsing the input. This is useful to debug
@@ -98,9 +100,6 @@ 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>--no-generation-date</b></dt>
-<dd>Suppress date output in the generated output so that it only shows the re2c
-version.</dd>
 <dt><b>-e</b></dt>
 <dd>Cross-compile from an ASCII platform to an EBCDIC one.<br /><br /></dd>
 <dt><b>-f</b></dt>
@@ -121,6 +120,9 @@ Specify the output file.<br /><br /></dd>
 <dt><b>-s</b></dt>
 <dd>Generate nested ifs for some switches. Many compilers need this assist to
 generate better code.<br /><br /></dd>
+<dt><b>-t</b></dt>
+<dd>Create a header file that contains types for the (f)lex-like condition support.
+This can only be activated when <b>-c</b> is in use.<br /><br /></dd>
 <dt><b>-u</b></dt>
 <dd>Generate a parser that supports Unicode chars (UTF-32). This means the 
 generated code can deal with any valid Unicode character up to 0x10FFFF. When
@@ -136,6 +138,9 @@ and cannot be used together with <b>-e</b> switch.<br /><br /></dd>
 <dt><b>-1</b></dt>
 <dd>Force single pass generation, this cannot be combined with -f and disables 
 YYMAXFILL generation prior to last re2c block.<br /><br /></dd>
+<dt><b>--no-generation-date</b></dt>
+<dd>Suppress date output in the generated output so that it only shows the re2c
+version.<br /><br /></dd>
 </dl>
 <br />
 <br />
@@ -146,6 +151,20 @@ scanners: the user must supply some interface code. In particular, the user
 must define the following macros or use the 
 corresponding inplace configurations:</p>
 <dl compact="compact">
+<dt>YYCONDITION</dt>
+<dd>
+This variable holdes the condition prior to entering the scanner code when using 
+<b>-c</b> switch. The value must be initialized with a value from the enumeration
+YYCONDTYPE type.</dd>
+<dt>YYCONDTYPE</dt>
+<dd>In <b>-c</b> mode you can use <b>-t</b> to generate a file that contains the 
+enumeration used as conditions. Each of the values refers to a condition of
+a rule set.</dd>
+<dt>YYCTXMARKER</dt>
+<dd><i>l</i>-expression of type *YYCTYPE. The generated code saves context 
+backtracking information in YYCTXMARKER. The user only  needs to define this 
+macro if a scanner specification uses trailing context in one or more of its 
+regular expressions.<br /><br /></dd>
 <dt>YYCTYPE</dt>
 <dd>Type used to hold an input symbol. Usually char or unsigned char.<br /><br /></dd>
 <dt>YYCURSOR</dt>
@@ -153,18 +172,12 @@ corresponding inplace configurations:</p>
 symbol. The generated code advances YYCURSOR as symbols are matched. On entry,
 YYCURSOR is assumed to point to the first character of the current token. On
 exit, YYCURSOR will point to the first character of the following token.<br /><br /></dd>
-<dt>YYLIMIT</dt>
-<dd>Expression of type *YYCTYPE that marks the end of the buffer (YYLIMIT[-1] is
-the last character in the buffer). The generated code repeatedly compares
-YYCURSOR to YYLIMIT to determine when the buffer needs (re)filling.<br /><br /></dd>
-<dt>YYMARKER</dt>
-<dd><i>l</i>-expression of type *YYCTYPE. The generated code saves backtracking
-information in YYMARKER. Some easy scanners might not use this.<br /><br /></dd>
-<dt>YYCTXMARKER</dt>
-<dd><i>l</i>-expression of type *YYCTYPE. The generated code saves context 
-backtracking information in YYCTXMARKER. The user only  needs to define this 
-macro if a scanner specification uses trailing context in one or more of its 
-regular expressions.<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>YYFILL(<i>n</i>)</dt>
 <dd>The generated code "calls" YYFILL(n) when the buffer needs (re)filling: at
 least <i>n</i> additional characters should be provided. YYFILL(n) should adjust
@@ -182,6 +195,16 @@ return a signed integer. The value must be either -1, indicating that the
 scanner is entered for the first time, or a value previously saved by
 YYSETSTATE(s). In the second case, the scanner will resume operations right after
 where the last YYFILL(n) was called.<br /><br /></dd>
+<dt>YYLIMIT</dt>
+<dd>Expression of type *YYCTYPE that marks the end of the buffer (YYLIMIT[-1] is
+the last character in the buffer). The generated code repeatedly compares
+YYCURSOR to YYLIMIT to determine when the buffer needs (re)filling.<br /><br /></dd>
+<dt>YYMARKER</dt>
+<dd><i>l</i>-expression of type *YYCTYPE. The generated code saves backtracking
+information in YYMARKER. Some easy scanners might not use this.<br /><br /></dd>
+<dt>YYMAXFILL</dt>
+<dd>This will be automatically defined by /*!max:re2c */ blocks as explained
+above.<br /><br /></dd>
 <dt>YYSETSTATE(<i>s</i>)</dt>
 <dd>The user only needs to define this macro if the <b>-f</b> flag was
 specified. In that case, the generated code "calls" YYSETSTATE just before
@@ -193,15 +216,6 @@ when the scanner is called again, it will call YYGETSTATE() and resume
 execution right where it left off. The generated code will contain 
 both YYSETSTATE(s) and YYGETSTATE() even if YYFILL(n) is being
 disabled.<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 />
@@ -253,6 +267,20 @@ the scanner code should be wrapped inside a loop.</p>
 <p>Please see examples/push.re for push-model scanner. The generated code can be
 tweaked using inplace configurations "state:abort" and "state:nextlabel".</p>
 <a name="lbAH" id="lbAH"> </a>
+<h2>SCANNER WITH CONDITION SUPPORT</h2>
+<p>
+You can preceed regular-expressions with a list of condition names when using the <b>-c</b>
+switch. In this case <b>re2c</b> generates scanners for each conditon. Each of the
+generated scanners has its own precondition. The precondition is given by the 
+interface variable <b>YYCONDITON</b> and must be of type <b>YYCONDTYPE</b>.
+</p><p>
+There are two special conditons. First the rules of the condition '*' are 
+merged to all  conditions. And second the empty condition list allows to 
+provide a code block that does not have a scanner part. Meaning it does not 
+allow any regular expression. The condition value referring to this special 
+block is always the one with the enumeration value 0.
+</p>
+<a name="lbAI" id="lbAI"> </a>
 <h2>SCANNER SPECIFICATIONS</h2>
 <p>Each scanner specification consists of a set of <i>rules</i>, <i>named
 definitions</i> and <i>configurations</i>.</p>
@@ -260,7 +288,18 @@ definitions</i> and <i>configurations</i>.</p>
 code that is to be executed when the associated <i>regular expression</i> is
 matched.</p>
 <dl compact="compact">
-<dd><i>regular expression</i> { <i>C/C++ code</i> }</dd>
+<dd><i>regular-expression</i> { <i>C/C++ code</i> }</dd>
+</dl>
+<p>
+If <b>-c</b> is active then each regular expression is preceeded by a list of 
+comma separated condition names. Besides normal naming rules there are two 
+special cases. A rule may contain the single condition name '*' and no contition 
+name at all. In the latter case the rule cannot have a regular expression.
+</p>
+<dl compact="compact">
+<dd>&lt;<i>condition-list</i>&gt; <i>regular-expression</i> { <i>C/C++ code</i> }</dd>
+<dd>&lt;<i>*</i>&gt; <i>regular-expression</i> { <i>C/C++ code</i> }</dd>
+<dd>&lt;&gt; { <i>C/C++ code</i> }</dd>
 </dl>
 <p>Named definitions are of the form:</p>
 <dl compact="compact">
@@ -272,7 +311,7 @@ matched.</p>
 <dd>re2c:<i>name</i> = <i>value</i>;</dd>
 <dd>re2c:<i>name</i> = <b>"</b><i>value</i><b>"</b>;</dd>
 </dl>
-<a name="lbAI" id="lbAI"> </a>
+<a name="lbAJ" id="lbAJ"> </a>
 <h2>SUMMARY OF RE2C REGULAR EXPRESSIONS</h2>
 <dl compact="compact">
 <dt>"foo"</dt>
@@ -340,7 +379,7 @@ the only portable "<b>any</b>" rules are <b>(.|"\n")</b> and <b>[^]</b>.</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>
+<a name="lbAK" id="lbAK"> </a>
 <h2>INPLACE CONFIGURATION</h2>
 <p>It is possible to configure code generation inside re2c blocks. The
 following lists the available configurations:</p>
@@ -401,6 +440,10 @@ and changes to that configuration are  no longer possible. When this setting is
 a string the braces must be specified. Now assuming your input is a <b>char*</b>
 buffer and you are using above mentioned switches you can set <b>YYCTYPE</b> to
 <b>unsigned char</b> and this setting to either <b>1</b> or <b>"(unsigned char)"</b>.</dd>
+<dt><i>re2c:define:define:YYCONDITION</i> <b>=</b> YYCONDITION <b>;</b></dt>
+<dd>Variable or function of type YYCONDTYPE used in <b>-c</b> mode.</dd>
+<dt><i>re2c:define:define:YYCONDTYPE</i> <b>=</b> YYCONDTYPE <b>;</b></dt>
+<dd>Enumeration used for condition support with <b>-c</b> mode.</dd>
 <dt><i>re2c:define:YYCTXMARKER</i> <b>=</b> YYCTXMARKER <b>;</b></dt>
 <dd>Allows to overwrite the define YYCTXMARKER and thus avoiding it by setting the
 value to the actual code needed.</dd>
@@ -438,15 +481,18 @@ value to the actual code needed.</dd>
 <dd>Allows to overwrite the name of the variable yybm.</dd>
 <dt><i>re2c:variable:yych</i> <b>=</b> yych <b>;</b></dt>
 <dd>Allows to overwrite the name of the variable yych.</dd>
+<dt><i>re2c:variable:yyctable</i> <b>=</b> yyctable <b>;</b></dt>
+<dd>When both <b>-c</b> and <b>-g</b> are active then <b>re2c</b> uses this variable to 
+generate a static jump table for conditions.</dd>
 <dt><i>re2c:variable:yytarget</i> <b>=</b> yytarget <b>;</b></dt>
 <dd>Allows to overwrite the name of the variable yytarget.</dd>
 </dl>
-<a name="lbAK" id="lbAK"> </a>
+<a name="lbAL" id="lbAL"> </a>
 <h2>UNDERSTANDING RE2C</h2>
 <p>The subdirectory lessons of the re2c distribution contains a few step by step
 lessons to get you started with re2c. All examples in the lessons subdirectory
 can be compiled and actually work.</p>
-<a name="lbAK" id="lbAK"> </a>
+<a name="lbAM" id="lbAM"> </a>
 <h2>FEATURES</h2>
 <p><b>re2c</b> does not provide a default action: the generated code assumes
 that the input will consist of a sequence of tokens. Typically this can be
@@ -463,16 +509,16 @@ to end the scanner in case not enough characters are available which is nothing
 else then e detection of end of data/file.</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).
-<a name="lbAL" id="lbAL"> </a></p>
+<a name="lbAN" id="lbAN"> </a></p>
 <h2>BUGS</h2>
 <p>Difference only works for character sets.</p>
 <p>The <b>re2c</b> internal algorithms need documentation.</p>
-<a name="lbAM" id="lbAM"> </a>
+<a name="lbAO" id="lbAO"> </a>
 <h2>SEE ALSO</h2>
 <p>flex(1), lex(1). More information on <b>re2c</b> can be found here:
 <b><a href=
 "http://re2c.org/">http://re2c.org/</a></b></p>
-<a name="lbAN" id="lbAN"> </a>
+<a name="lbAP" id="lbAP"> </a>
 <h2>AUTHORS</h2>
 <ul>
 <li>Peter Bumbulis &lt;<a href=
@@ -490,7 +536,7 @@ specification for each start condition (as illustrated in the above example).
 </ul>
 <br />
 <br />
-<a name="lbAO" id="lbAO"> </a>
+<a name="lbAQ" id="lbAQ"> </a>
 <h2>VERSION INFORMATION</h2>
 <p>This manpage describes <b>re2c</b>, version 0.13.0.</p>
 <hr />
@@ -503,19 +549,21 @@ specification for each start condition (as illustrated in the above example).
 <dt><a href="#lbAE">OPTIONS</a><br /></dt>
 <dt><a href="#lbAF">INTERFACE CODE</a><br /></dt>
 <dt><a href="#lbAG">SCANNER WITH STORABLE STATES</a><br /></dt>
-<dt><a href="#lbAH">SCANNER SPECIFICATIONS</a><br /></dt>
-<dt><a href="#lbAI">SUMMARY OF RE2C REGULAR EXPRESSIONS</a><br /></dt>
-<dt><a href="#lbAJ">A LARGER EXAMPLE</a><br /></dt>
-<dt><a href="#lbAK">FEATURES</a><br /></dt>
-<dt><a href="#lbAL">BUGS</a><br /></dt>
-<dt><a href="#lbAM">SEE ALSO</a><br /></dt>
-<dt><a href="#lbAN">AUTHORS</a><br /></dt>
-<dt><a href="#lbAO">VERSION INFORMATION</a><br /></dt>
+<dt><a href="#lbAH">SCANNER WITH CONDITION SUPPORT</a><br /></dt>
+<dt><a href="#lbAI">SCANNER SPECIFICATIONS</a><br /></dt>
+<dt><a href="#lbAJ">SUMMARY OF RE2C REGULAR EXPRESSIONS</a><br /></dt>
+<dt><a href="#lbAK">INPLACE CONFIGURATION</a><br /></dt>
+<dt><a href="#lbAL">UNDERSTANDING RE2C</a><br /></dt>
+<dt><a href="#lbAM">FEATURES</a><br /></dt>
+<dt><a href="#lbAN">BUGS</a><br /></dt>
+<dt><a href="#lbAO">SEE ALSO</a><br /></dt>
+<dt><a href="#lbAP">AUTHORS</a><br /></dt>
+<dt><a href="#lbAQ">VERSION INFORMATION</a><br /></dt>
 </dl>
 <br />
 <br />
 <hr />
 <p>This document was created by man2html, using the manual pages.<br />
-Time: 00:00:00 GMT, April 01, 2007</p>
+Date: 22 Apr, 2007</p>
 </body>
 </html>
index edc68e067561e8dbcb1de8783683734cdfd01828..7d2b31762b286f2eef83770ce3d079eb39ec9689 100644 (file)
@@ -4,13 +4,13 @@
 .TH RE2C 1 "22 April 2005" "Version @PACKAGE_VERSION@"
 .ds re \fBre2c\fP
 .ds le \fBlex\fP
-.ds rx regular expression
+.ds rx regular-expression
 .ds lx \fIl\fP-expression
 .SH NAME
-re2c \- convert regular expressions to C/C++
+re2c \- convert \*(rxs to C/C++
 
 .SH SYNOPSIS
-\*(re [\fB-bdefghisuvVw1\fP] [\fB-o output\fP] file\fP
+\*(re [\fB-bdefghisuvVw1\fP] [\fB-o output\fP] [\fB-c\fP [\fB-t header\fP]] file\fP
 
 .SH DESCRIPTION
 \*(re is a preprocessor that generates C-based recognizers from regular
@@ -97,6 +97,9 @@ Implies \fB-s\fP.  Use bit vectors as well in the attempt to coax better
 code out of the compiler.  Most useful for specifications with more than a
 few keywords (e.g. for most programming languages).
 .TP
+\fB-c\fP
+Used to support (f)lex-like condition support.
+.TP
 \fB-d\fP
 Creates a parser that dumps information about the current position and in 
 which state the parser is while parsing the input. This is useful to debug 
@@ -131,6 +134,10 @@ Specify the output file.
 Generate nested \fCif\fPs for some \fCswitch\fPes.  Many compilers need this
 assist to generate better code.
 .TP
+\fB-t\fP
+Create a header file that contains types for the (f)lex-like condition support.
+This can only be activated when \fB-c\fP is in use.
+.TP
 \fB-u\fP
 Generate a parser that supports Unicode chars (UTF-32). This means the 
 generated code can deal with any valid Unicode character up to 0x10FFFF. When
@@ -151,7 +158,7 @@ cannot be used together with \fB-e\fP switch.
 Force single pass generation, this cannot be combined with -f and disables 
 YYMAXFILL generation prior to last \*(re block.
 .TP
-\fb--no-generation-date\fP
+\fB--no-generation-date\fP
 Suppress date output in the generated output so that it only shows the re2c
 version.
 .SH "INTERFACE CODE"
@@ -160,6 +167,22 @@ the user must supply some interface code.
 In particular, the user must define the following macros or use the 
 corresponding inplace configurations:
 .TP
+\fCYYCONDITION\fP
+This variable holdes the condition prior to entering the scanner code when using 
+\fB-c\fP switch. The value must be initialized with a value from the enumeration
+\fCYYCONDTYPE\fP type.
+.TP
+\fCYYCONDTYPE\fP
+In \fB-c\fP mode you can use \fB-t\fP to generate a file that contains the 
+enumeration used as conditions. Each of the values refers to a condition of
+a rule set.
+.TP
+\fCYYCTXMARKER\fP
+\*(lx of type \fC*YYCTYPE\fP.
+The generated code saves trailing context backtracking information in \fCYYCTXMARKER\fP.
+The user only needs to define this macro if a scanner specification uses trailing
+context in one or more of its \*(rxs.
+.TP
 \fCYYCTYPE\fP
 Type used to hold an input symbol.
 Usually \fCchar\fP or \fCunsigned char\fP.
@@ -171,27 +194,17 @@ On entry, \fCYYCURSOR\fP is assumed to point to the first character of the
 current token.  On exit, \fCYYCURSOR\fP will point to the first character of
 the following token.
 .TP
-\fCYYLIMIT\fP
-Expression of type \fC*YYCTYPE\fP that marks the end of the buffer
-(\fCYYLIMIT[-1]\fP is the last character in the buffer).
-The generated code repeatedly compares \fCYYCURSOR\fP to \fCYYLIMIT\fP
-to determine when the buffer needs (re)filling.
-.TP
-\fCYYMARKER\fP
-\*(lx of type \fC*YYCTYPE\fP.
-The generated code saves backtracking information in \fCYYMARKER\fP. Some easy
-scanners might not use this.
-.TP
-\fCYYCTXMARKER\fP
-\*(lx of type \fC*YYCTYPE\fP.
-The generated code saves trailing context backtracking information in \fCYYCTXMARKER\fP.
-The user only needs to define this macro if a scanner specification uses trailing
-context in one or more of its regular expressions.
+\fCYYDEBUG(\fP\fIstate\fP,\fIcurrent\fC)\fP
+This is only needed if the \fB-d\fP 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: \fIvoid YYDEBUG(int state, char current)\fP. 
+The first parameter receives the state or -1 and the second parameter receives the 
+input at the current cursor.
 .TP
 \fCYYFILL\fP(\fIn\fP\fC\fP)
 The generated code "calls" \fCYYFILL\fP(n) when the buffer needs
 (re)filling:  at least \fIn\fP additional characters should
-be provided.  \fCYYFILL\fP(n) should adjust \fCYYCURSOR\fP, \fCYYLIMIT\fP,
+be provided. \fCYYFILL\fP(n) should adjust \fCYYCURSOR\fP, \fCYYLIMIT\fP,
 \fCYYMARKER\fP and \fCYYCTXMARKER\fP as needed.  Note that for typical 
 programming languages \fIn\fP will be the length of the longest keyword plus one.
 The user can place a comment of the form \fC/*!max:re2c */\fP once to insert 
@@ -208,6 +221,20 @@ integer. The value must be either -1, indicating that the scanner is entered for
 first time, or a value previously saved by \fCYYSETSTATE\fP(s).  In the second case, the
 scanner will resume operations right after where the last \fCYYFILL\fP(n) was called.
 .TP
+\fCYYLIMIT\fP
+Expression of type \fC*YYCTYPE\fP that marks the end of the buffer
+(\fCYYLIMIT[-1]\fP is the last character in the buffer).
+The generated code repeatedly compares \fCYYCURSOR\fP to \fCYYLIMIT\fP
+to determine when the buffer needs (re)filling.
+.TP
+\fCYYMARKER\fP
+\*(lx of type \fC*YYCTYPE\fP.
+The generated code saves backtracking information in \fCYYMARKER\fP. Some easy
+scanners might not use this.
+.TP
+\fCYYMAXFILL
+This will be automatically defined by \fC/*!max:re2c */\fP blocks as explained above.
+.TP
 \fCYYSETSTATE(\fP\fIs\fP\fC)\fP
 The user only needs to define this macro if the \fB-f\fP flag was specified.
 In that case, the generated code "calls" \fCYYSETSTATE\fP just before calling
@@ -219,16 +246,6 @@ Later, when the scannered is called again, it will call \fCYYGETSTATE()\fP and
 resume execution right where it left off. The generated code will contain 
 both \fCYYSETSTATE\fP(s) and \fCYYGETSTATE\fP even if \fCYYFILL\fP(n) is being
 disabled.
-.TP
-\fCYYDEBUG(\fP\fIstate\fP,\fIcurrent\fC)\fP
-This is only needed if the \fB-d\fP 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: \fIvoid YYDEBUG(int state, char current)\fP. 
-The first parameter receives the state or -1 and the second parameter receives the 
-input at the current cursor.
-.TP
-\fCYYMAXFILL
-This will be automatically defined by \fC/*!max:re2c */\fP blocks as explained above.
 
 .SH "SCANNER WITH STORABLE STATES"
 When the \fB-f\fP flag is specified, \*(re generates a scanner that
@@ -289,21 +306,46 @@ the scanner code should be wrapped inside a loop.
 Please see examples/push.re for push-model scanner. The generated code can be
 tweaked using inplace configurations "\fBstate:abort\fP" and "\fBstate:nextlabel\fP".
 
+.SH "SCANNER WITH CONDITION SUPPORT"
+You can preceed \*(rxs with a list of condition names when using the \fB-c\fP 
+switch. In this case \*(re generates scanners for each conditon. Each of the
+generated scanners has its own precondition. The precondition is given by the 
+interface variable \fBYYCONDITON\fP and must be of type \fBYYCONDTYPE\fP.
+.LP
+There are two special conditons. First the rules of the condition '*' are 
+merged to all  conditions. And second the empty condition list allows to 
+provide a code block that does not have a scanner part. Meaning it does not 
+allow any regular expression. The condition value referring to this special 
+block is always the one with the enumeration value 0.
+
 .SH "SCANNER SPECIFICATIONS"
 Each scanner specification consists of a set of \fIrules\fP, \fInamed
 definitions\fP and \fIconfigurations\fP.
 .LP
-\fIRules\fP consist of a regular expression along with a block of C/C++ code that
-is to be executed when the associated \fIregular expression\fP is matched.
+\fIRules\fP consist of a \*(rx along with a block of C/C++ code that
+is to be executed when the associated \fI\*(rx\fP is matched.
+.P
+.RS
+\fI\*(rx\fP \fC{\fP \fIC/C++ code\fP \fC}\fP
+.RE
+.P
+If \fB-c\fP is active then each \*(rx is preceeded by a list of 
+comma separated condition names. Besides normal naming rules there are two 
+special cases. A rule may contain the single condition name '*' and no contition 
+name at all. In the latter case the rule cannot have a \*(rx.
 .P
 .RS
-\fIregular expression\fP \fC{\fP \fIC/C++ code\fP \fC}\fP
+\fC<\fP\fIcondition-list\fP\fC>\fP \fI\*(rx\fP \fC{\fP \fIC/C++ code\fP \fC}\fP
+.P
+\fC<\fP\fI*\fP\fC>\fP \fI\*(rx\fP \fC{\fP \fIC/C++ code\fP \fC}\fP
+.P
+\fC<>\fP \fC{\fP \fIC/C++ code\fP \fC}\fP
 .RE
 .LP
 Named definitions are of the form:
 .P
 .RS
-\fIname\fP \fC=\fP \fIregular expression\fP\fC;\fP
+\fIname\fP \fC=\fP \fI\*(rx\fP\fC;\fP
 .RE
 .LP
 Configurations look like named definitions whose names start 
@@ -316,7 +358,7 @@ with "\fBre2c:\fP":
 \fCre2c:\fP\fIname\fP \fC=\fP \fB"\fP\fIvalue\fP\fB"\fP\fC;\fP
 .RE
 
-.SH "SUMMARY OF RE2C REGULAR EXPRESSIONS"
+.SH "SUMMARY OF RE2C REGULAR-EXPRESSIONS"
 .TP
 \fC"foo"\fP
 the literal string \fCfoo\fP.
@@ -339,11 +381,11 @@ or a '\fCZ\fP'.
 an inverted "character class".
 .TP
 \fIr\fP\fC\e\fP\fIs\fP
-match any \fIr\fP which isn't an \fIs\fP. \fIr\fP and \fIs\fP must be regular expressions
+match any \fIr\fP which isn't an \fIs\fP. \fIr\fP and \fIs\fP must be \*(rxs
 which can be expressed as character classes.
 .TP
 \fIr\fP\fC*\fP
-zero or more \fIr\fP's, where \fIr\fP is any regular expression
+zero or more \fIr\fP's, where \fIr\fP is any \*(rx
 .TP
 \fC\fIr\fP\fC+\fP
 one or more \fIr\fP's
@@ -400,7 +442,7 @@ generated code can deal with any valid Unicode character up to 0x10FFFF.
 Since characters greater \fB\\X00FF\fP are not allowed in non unicode mode, the 
 only portable "\fBany\fP" rules are \fB(.|"\\n")\fP and \fB[^]\fP.
 .LP
-The regular expressions listed above are grouped according to
+The \*(rxs listed above are grouped according to
 precedence, from highest precedence at the top to lowest at the bottom.
 Those grouped together have equal precedence.
 
@@ -476,6 +518,12 @@ a string the braces must be specified. Now assuming your input is a \fBchar*\fP
 buffer and you are using above mentioned switches you can set \fBYYCTYPE\fP to
 \fBunsigned char\fP and this setting to either \fB1\fP or \fB"(unsigned char)"\fP.
 .TP
+\fIre2c:define:define:YYCONDITION\fP \fB=\fP YYCONDITION \fB;\fP
+Variable or function of type YYCONDTYPE used in \fB-c\fP mode.
+.TP
+\fIre2c:define:define:YYCONDTYPE\fP \fB=\fP YYCONDTYPE \fB;\fP
+Enumeration used for condition support with \fB-c\fP mode.
+.TP
 \fIre2c:define:YYCTXMARKER\fP \fB=\fP YYCTXMARKER \fB;\fP
 Allows to overwrite the define YYCTXMARKER and thus avoiding it by setting the
 value to the actual code needed.
@@ -527,6 +575,10 @@ Allows to overwrite the name of the variable yybm.
 \fIre2c:variable:yych\fP \fB=\fP yych \fB;\fP
 Allows to overwrite the name of the variable yych.
 .TP
+\fIre2c:variable:yyctable\fP \fB=\fP yyctable \fB;\fP
+When both \fB-c\fP and \fB-g\fP are active then \*(re uses this variable to 
+generate a static jump table for conditions.
+.TP
 \fIre2c:variable:yytarget\fP \fB=\fP yytarget \fB;\fP
 Allows to overwrite the name of the variable yytarget.