diff options
author | Will Estes <wlestes@users.sourceforge.net> | 2006-10-22 22:17:38 +0000 |
---|---|---|
committer | Will Estes <wlestes@users.sourceforge.net> | 2006-10-22 22:17:38 +0000 |
commit | a4fa510851cb409efe296caf2abf17c613baaff9 (patch) | |
tree | 8f3c972101b6853965a9b76c5be02a27453d04f3 /main.c | |
parent | 6ca8e33dbcb2960da332f6d1af0728d0a3e9b1be (diff) |
make yywrap work with c++ scanners as per sf bug report
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -1571,7 +1571,9 @@ void readin () } if (!do_yywrap) { - outn ("\n#define yywrap(n) 1"); + if (!C_plus_plus) { + outn ("\n#define yywrap(n) 1"); + } outn ("#define YY_SKIP_YYWRAP"); } @@ -1644,6 +1646,10 @@ void readin () if (C_plus_plus) { outn ("\n#include <FlexLexer.h>"); + if (!do_yywrap) { + outn("\nint yyFlexLexer::yywrap() { return 1; }"); + } + if (yyclass) { outn ("int yyFlexLexer::yylex()"); outn ("\t{"); |