version 1.37, 2014/03/23 16:28:29 |
version 1.38, 2015/02/15 22:26:45 |
|
|
instead of |
instead of |
.Pa lex.yy.c . |
.Pa lex.yy.c . |
The generated scanner includes the header file |
The generated scanner includes the header file |
.Aq Pa g++/FlexLexer.h , |
.In 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 |
.Aq Pa g++/FlexLexer.h |
.In g++/FlexLexer.h |
is |
is |
.Fa yyFlexLexer , |
.Fa yyFlexLexer , |
which is derived from |
which is derived from |
|
|
.Fa yyFlexLexer |
.Fa yyFlexLexer |
to some other |
to some other |
.Fa xxFlexLexer . |
.Fa xxFlexLexer . |
.Aq Pa g++/FlexLexer.h |
.In g++/FlexLexer.h |
can then be included in other sources once per lexer class, first renaming |
can then be included in other sources once per lexer class, first renaming |
.Fa yyFlexLexer |
.Fa yyFlexLexer |
as follows: |
as follows: |
|
|
.It lex.yy.cc |
.It lex.yy.cc |
Generated C++ scanner class, when using |
Generated C++ scanner class, when using |
.Fl + . |
.Fl + . |
.It Aq g++/FlexLexer.h |
.It In g++/FlexLexer.h |
Header file defining the C++ scanner base class, |
Header file defining the C++ scanner base class, |
.Fa FlexLexer , |
.Fa FlexLexer , |
and its derived class, |
and its derived class, |
|
|
.Pp |
.Pp |
Due to both buffering of input and read-ahead, |
Due to both buffering of input and read-ahead, |
it is not possible to intermix calls to |
it is not possible to intermix calls to |
.Aq Pa stdio.h |
.In stdio.h |
routines, such as, for example, |
routines, such as, for example, |
.Fn getchar , |
.Fn getchar , |
with |
with |