version 1.4, 1998/06/11 04:15:31 |
version 1.5, 1998/08/17 03:20:23 |
|
|
instead of |
instead of |
.B lex.yy.c. |
.B lex.yy.c. |
The generated scanner includes the header file |
The generated scanner includes the header file |
.I FlexLexer.h, |
.I g++/FlexLexer.h, |
which defines the interface to two C++ classes. |
which defines the interface to two C++ classes. |
.PP |
.PP |
The first class, |
The first class, |
|
|
object pointer). |
object pointer). |
.PP |
.PP |
The second class defined in |
The second class defined in |
.I FlexLexer.h |
.I g++/FlexLexer.h |
is |
is |
.B yyFlexLexer, |
.B yyFlexLexer, |
which is derived from |
which is derived from |
|
|
to some other |
to some other |
.B xxFlexLexer. |
.B xxFlexLexer. |
You then can include |
You then can include |
.B <FlexLexer.h> |
.B <g++/FlexLexer.h> |
in your other sources once per lexer class, first renaming |
in your other sources once per lexer class, first renaming |
.B yyFlexLexer |
.B yyFlexLexer |
as follows: |
as follows: |
|
|
|
|
#undef yyFlexLexer |
#undef yyFlexLexer |
#define yyFlexLexer xxFlexLexer |
#define yyFlexLexer xxFlexLexer |
#include <FlexLexer.h> |
#include <g++/FlexLexer.h> |
|
|
#undef yyFlexLexer |
#undef yyFlexLexer |
#define yyFlexLexer zzFlexLexer |
#define yyFlexLexer zzFlexLexer |
#include <FlexLexer.h> |
#include <g++/FlexLexer.h> |
|
|
.fi |
.fi |
if, for example, you used |
if, for example, you used |
|
|
generated C++ scanner class, when using |
generated C++ scanner class, when using |
.B -+. |
.B -+. |
.TP |
.TP |
.I <FlexLexer.h> |
.I <g++/FlexLexer.h> |
header file defining the C++ scanner base class, |
header file defining the C++ scanner base class, |
.B FlexLexer, |
.B FlexLexer, |
and its derived class, |
and its derived class, |