diff options
author | wlestes <wlestes> | 2012-02-05 23:28:54 +0000 |
---|---|---|
committer | wlestes <wlestes> | 2012-02-05 23:28:54 +0000 |
commit | 134574b9bc3365e70e4d2b08428fc5d21036d6d3 (patch) | |
tree | 7d3ecd8bf0695f9497b14626f272d1b56dff7bb0 | |
parent | e65dfc5f7c5180308a90f460f8270af326d5dc80 (diff) | |
download | flex-134574b9bc3365e70e4d2b08428fc5d21036d6d3.tar.gz |
fix yywrap behavior for reentrant scanners
-rw-r--r-- | main.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -1578,9 +1578,11 @@ void readin () } if (!do_yywrap) { - if (!C_plus_plus) { - outn ("\n#define yywrap() 1"); - } + if (!C_plus_plus) + if (reentrant) + outn ("\n#define yywrap(yyscanner) 1"); + else + outn ("\n#define yywrap() 1"); outn ("#define YY_SKIP_YYWRAP"); } |