]> granicus.if.org Git - flex/commitdiff
add noyywrap option to example; use whitespace to clarify example
authorWill Estes <wlestes@users.sourceforge.net>
Tue, 17 Oct 2006 13:41:04 +0000 (13:41 +0000)
committerWill Estes <wlestes@users.sourceforge.net>
Tue, 17 Oct 2006 13:41:04 +0000 (13:41 +0000)
doc/flex.texi

index 54be0731f770a8a447014e68bf5ccdfdf2178345..8d0e2e72ee34af80a1a886ceaadafda9744fe002 100644 (file)
@@ -4082,14 +4082,20 @@ First, an example of a reentrant scanner:
 @example
 @verbatim
     /* This scanner prints "//" comments. */
-    %option reentrant stack
+
+    %option reentrant stack noyywrap
     %x COMMENT
+
     %%
+
     "//"                 yy_push_state( COMMENT, yyscanner);
     .|\n
+
     <COMMENT>\n          yy_pop_state( yyscanner );
     <COMMENT>[^\n]+      fprintf( yyout, "%s\n", yytext);
+
     %%
+
     int main ( int argc, char * argv[] )
     {
         yyscan_t scanner;