summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorMariusz PluciƄski <mplucinski@mplucinski.com>2014-06-24 19:21:43 +0200
committerWill Estes <westes575@gmail.com>2014-11-30 19:22:43 -0500
commit227e731b7686d79902c31756e11e7104070f4c2b (patch)
treec417e60a930cb21a3c7dbb2616b80e10ddc7fb89 /src/main.c
parent4d6089fc838072d6a057257254107fdf84ff690f (diff)
downloadflex-git-unicode.tar.gz
Make charset support working with C++ scanners toounicode
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index 4671a08..d042809 100644
--- a/src/main.c
+++ b/src/main.c
@@ -304,6 +304,8 @@ void check_options ()
if (C_plus_plus && bison_bridge_lval)
flexerror (_("bison bridge not supported for the C++ scanner."));
+ if(C_plus_plus)
+ buf_m4_define( &m4defs_buf, "M4_YY_CXX", NULL);
if (useecs) { /* Set up doubly-linked equivalence classes. */
@@ -1663,6 +1665,9 @@ void readin ()
}
OUT_END_CODE ();
+ if(charset_enabled)
+ outn ("#define YY_CHARSET");
+
if (C_plus_plus) {
outn ("#define yytext_ptr yytext");