summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorWill Estes <wlestes@users.sourceforge.net>2006-10-17 13:41:04 +0000
committerWill Estes <wlestes@users.sourceforge.net>2006-10-17 13:41:04 +0000
commit537c4462d88cb20ee32f02e572a9daed81447743 (patch)
tree95e0606d1d1660965031ad87ef15714490502ed3 /doc
parent1f4c9264ff8ec86a6642470402fb6387844b80e5 (diff)
add noyywrap option to example; use whitespace to clarify example
Diffstat (limited to 'doc')
-rw-r--r--doc/flex.texi8
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;