]> granicus.if.org Git - re2c/commitdiff
- Improve YYGETSTATE docu
authorhelly <helly@642ea486-5414-0410-9d7f-a0204ed87703>
Sun, 9 Apr 2006 02:26:28 +0000 (02:26 +0000)
committerhelly <helly@642ea486-5414-0410-9d7f-a0204ed87703>
Sun, 9 Apr 2006 02:26:28 +0000 (02:26 +0000)
htdocs/manual.html
re2c.1.in

index 6d75664753e1484561aa569259fbb83874fda18d..8a2b2be82ce794a3984e71e5df7eb6b68d2dbcc9 100755 (executable)
@@ -235,8 +235,8 @@ appropriately.</p>
 <p>5.The generated code will contain a switch block that is used to restores 
 the last state by jumping behind the corrspoding YYFILL() call. This code is
 automatically generated in the epilog of the first "/*!re2c */" block. 
-It is possible to trigger generation of the YYGETSTATE() block by placing 
-a "/*!getstate:re2c */" comment earlier. This is especially usefull when
+It is possible to trigger generation of the YYGETSTATE() block earlier by 
+placing a "/*!getstate:re2c */" comment. This is especially useful when
 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 configurations "state:abort" and "state:nextlabel".</p>
@@ -352,12 +352,14 @@ whether the normal start label is being used or not. This setting is being
 reset to <b>0</b> after a start label has been generated.</dd>
 <dt><i>re2c:state:abort</i> <b>=</b> 0 <b>;</b></dt>
 <dd>When not zero and switch -f is active then the YYGETSTATE block will 
-contain a default case that aborts and a -1 case used for initialization.</dd>
+contain a default case that aborts and a -1 case is used for initialization.</dd>
 <dt><i>re2c:state:nextlabel</i> <b>=</b> 0 <b>;</b></dt>
 <dd>Used when -f is active to control whether the YYGETSTATE block is 
 followed by a yyNext: label line. Instead of using yyNext you can 
 usually also use configuration <i>startlabel</i> to force a specific start label
-or default to yy0 as start label.
+or default to yy0 as start label. Instead of using a dedicated label it 
+is often better to separate the YYGETSTATE code from the actual scanner code by
+placing a "/*!getstate:re2c */" comment.
 </dd>
 </dl>
 <a name="lbAK" id="lbAK"> </a>
index 6b14f57fff599e6ca552a0c5b646aef26f25a545..1e1d176a3436427f19e5d9d7e4df589bc91c9922 100644 (file)
--- a/re2c.1.in
+++ b/re2c.1.in
@@ -7,6 +7,9 @@
 .ds rx regular expression
 .ds lx \fIl\fP-expression
 \"$Log$
+\"Revision 1.46  2006/04/09 02:26:28  helly
+\"- Improve YYGETSTATE docu
+\"
 \"Revision 1.45  2006/04/09 00:47:37  helly
 \"- Added /*!getstate:re2c */ which triggers generation of the YYGETSTATE()
 \"  block.
@@ -415,8 +418,8 @@ appropriately.
 5. The generated code will contain a switch block that is used to restores 
 the last state by jumping behind the corrspoding YYFILL() call. This code is
 automatically generated in the epilog of the first "\fC/*!re2c */\fP" block. 
-It is possible to trigger generation of the YYGETSTATE() block by placing 
-a "\fC/*!getstate:re2c */\fP" comment earlier. This is especially usefull when
+It is possible to trigger generation of the YYGETSTATE() block earlier by 
+placing a "\fC/*!getstate:re2c */\fP" comment. This is especially useful when
 the scanner code should be wrapped inside a loop.
 
 Please see examples/push.re for push-model scanner. The generated code can be
@@ -564,13 +567,15 @@ after a start label has been generated.
 .TP
 \fIre2c:state:abort\fP \fB=\fP 0 \fB;\fP
 When not zero and switch -f is active then the \fCYYGETSTATE\fP block will 
-contain a default case that aborts and a -1 case used for initialization.
+contain a default case that aborts and a -1 case is used for initialization.
 .TP
 \fIre2c:state:nextlabel\fP \fB=\fP 0 \fB;\fP
 Used when -f is active to control whether the \fCYYGETSTATE\fP block is 
 followed by a \fCyyNext:\fP label line. Instead of using \fCyyNext\fP you can 
 usually also use configuration \fIstartlabel\fP to force a specific start label
-or default to \fCyy0\fP as start label.
+or default to \fCyy0\fP as start label. Instead of using a dedicated label it 
+is often better to separate the YYGETSTATE code from the actual scanner code by
+placing a "\fC/*!getstate:re2c */\fP" comment.
 
 .SH "A LARGER EXAMPLE"
 .LP