diff options
Diffstat (limited to 'doc')
-rw-r--r-- | doc/flex.texi | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/doc/flex.texi b/doc/flex.texi index 54be073..8d0e2e7 100644 --- a/doc/flex.texi +++ b/doc/flex.texi @@ -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; |