]> granicus.if.org Git - re2c/commitdiff
- Drop non working links wrong YYFILL
authorhelly <helly@642ea486-5414-0410-9d7f-a0204ed87703>
Sun, 16 Apr 2006 13:54:50 +0000 (13:54 +0000)
committerhelly <helly@642ea486-5414-0410-9d7f-a0204ed87703>
Sun, 16 Apr 2006 13:54:50 +0000 (13:54 +0000)
- Unify all YYFILL usages to YYFILL(n)

htdocs/manual.html

index 63cf977f58ca45b8537b1647e2a074e066c846de..9744b97270934f73ea0acede376260d65bdbf375 100755 (executable)
@@ -84,7 +84,7 @@ yy7:    if(yych &lt;= '/') goto yy3;
 <br />
 <p>After the /*!re2c */ blocks you can place a /*!max:re2c */ block that will
 output a define (YYMAXFILL) that holds the maximum number of characters required to parse
-the input. That is the maximum value YYFILL() will receive.</p>
+the input. That is the maximum value YYFILL(n) will receive.</p>
 <p>You can also use /*!ignore:re2c */ blocks that allows to document the
 scanner code and will not be part of the output.</p>
 <a name="lbAE" id="lbAE"> </a>
@@ -153,8 +153,8 @@ 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>YYFILL(<i>n</i>)</dt>
-<dd>The generated code "calls" YYFILL when the buffer needs (re)filling: at
-least <i>n</i> additional characters should be provided. YYFILL should adjust
+<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
 YYCURSOR, YYLIMIT, YYMARKER and YYCTXMARKER as needed. Note that for typical 
 programming languages <i>n</i> will be the length of the longest keyword plus 
 one. The user can place a comment of the form /*!max:re2c */ after the 
@@ -167,13 +167,13 @@ beginning of the scanner in order to obtain the saved state. YYGETSTATE must
 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. In the second case, the scanner will resume operations right after
-where the last YYFILL was called.<br /><br /></dd>
+where the last YYFILL(n) was called.<br /><br /></dd>
 <dt>YYSETSTATE(<i>n</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
-calling YYFILL. The parameter to YYSETSTATE is a signed integer that uniquely
-identifies the specific instance of YYFILL that is about to be called. Should
-the user wish to save the state of the scanner and have YYFILL return to the
+calling YYFILL(n). The parameter to YYSETSTATE is a signed integer that uniquely
+identifies the specific instance of YYFILL(n) that is about to be called. Should
+the user wish to save the state of the scanner and have YYFILL(n) 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>
@@ -218,22 +218,18 @@ and restore these. In the example <i>examples/push.re</i> these are declared as
 fields of the (C++) class of which the scanner is a method, so they do not need
 to be saved/restored explicitly. For C they could e.g. be made macros that
 select fields from a structure passed in as parameter. Alternatively, they
-could be declared as local variables, saved with <a href=
-"http://localhost/cgi-bin/man/man2html?n+YYFILL">YYFILL</a>(n) when it decides
+could be declared as local variables, saved with YYFILL(n) when it decides
 to return and restored at entry to the function. Also, it could be more
-efficient to save the state from <a href=
-"http://localhost/cgi-bin/man/man2html?n+YYFILL">YYFILL</a>(n) because
-YYSETSTATE(state) is called unconditionally. <a href=
-"http://localhost/cgi-bin/man/man2html?n+YYFILL">YYFILL</a>(n) however does not
+efficient to save the state from YYFILL(n) because
+YYSETSTATE(state) is called unconditionally. YYFILL(n) however does not
 get <i>state</i> as parameter, so we would have to store state in a local
 variable by YYSETSTATE(state).</p>
-<p>3. Modify <a href=
-"http://localhost/cgi-bin/man/man2html?n+YYFILL">YYFILL</a>(n) to return (from
+<p>3. Modify YYFILL(n) to return (from
 the function calling it) if more input is needed.</p>
 <p>4. Modify caller to recognise "more input is needed" and respond
 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
+the last state by jumping behind the corrspoding YYFILL(n) call. This code is
 automatically generated in the epilog of the first "/*!re2c */" block. 
 It is possible to trigger generation of the YYGETSTATE() block earlier by 
 placing a "/*!getstate:re2c */" comment. This is especially useful when
@@ -344,7 +340,7 @@ not want any indendation at all you can simply set this to <b>""</b>.</dd>
 <dd>If set to zero then a decimal table is being used else a hexadecimal table
 will be generated.</dd>
 <dt><i>re2c:yyfill:enable</i> <b>=</b> 1 <b>;</b></dt>
-<dd>Set this to zero to suppress generation of YYFILL(). When using this be sure
+<dd>Set this to zero to suppress generation of YYFILL(n). When using this be sure
 to verify that the generated scanner does not read behind input. Allowing
 this behavior might introduce sever security issues to you programs.</dd>
 <dt><i>re2c:startlabel</i> <b>=</b> 0 <b>;</b></dt>
@@ -383,7 +379,7 @@ example above.</p>
 string, a rule matching a null character will suffice. If the source is from a
 file then you could pad the input with a newline (or some other character that 
 cannot appear within another token); upon recognizing such a character check 
-to see if it is the sentinel and act accordingly. And you can also use YYFILL
+to see if it is the sentinel and act accordingly. And you can also use YYFILL(n)
 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