version 1.35, 2014/02/12 12:32:41 |
version 1.36, 2014/02/14 17:15:11 |
|
|
.It Sy Incompatibilities with Lex and POSIX |
.It Sy Incompatibilities with Lex and POSIX |
How |
How |
.Nm |
.Nm |
differs from AT&T lex and the |
differs from |
|
.At |
|
.Nm lex |
|
and the |
.Tn POSIX |
.Tn POSIX |
lex standard. |
.Nm lex |
|
standard. |
.It Sy Files |
.It Sy Files |
Files used by |
Files used by |
.Nm . |
.Nm . |
|
|
.Dq %pointer , |
.Dq %pointer , |
unless the |
unless the |
.Fl l |
.Fl l |
lex compatibility option is used, in which case |
.Nm lex |
|
compatibility option is used, in which case |
.Fa yytext |
.Fa yytext |
will be an array. |
will be an array. |
The advantage of using |
The advantage of using |
|
|
.Dv YYSTATE |
.Dv YYSTATE |
as an alias for |
as an alias for |
.Dv YY_START |
.Dv YY_START |
(since that is what's used by AT&T |
(since that is what's used by |
|
.At |
.Nm lex ) . |
.Nm lex ) . |
.Pp |
.Pp |
Note that start conditions do not have their own name-space; |
Note that start conditions do not have their own name-space; |
|
|
fault \- these sorts of errors should be reported to the email address |
fault \- these sorts of errors should be reported to the email address |
given below). |
given below). |
.It Fl l |
.It Fl l |
Turns on maximum compatibility with the original AT&T |
Turns on maximum compatibility with the original |
|
.At |
.Nm lex |
.Nm lex |
implementation. |
implementation. |
Note that this does not mean full compatibility. |
Note that this does not mean full compatibility. |
|
|
.Pp |
.Pp |
In this section we discuss all of the known areas of incompatibility between |
In this section we discuss all of the known areas of incompatibility between |
.Nm , |
.Nm , |
AT&T |
.At |
.Nm lex , |
.Nm lex , |
and the |
and the |
.Tn POSIX |
.Tn POSIX |
|
|
.Pp |
.Pp |
.Nm flex Ns 's |
.Nm flex Ns 's |
.Fl l |
.Fl l |
option turns on maximum compatibility with the original AT&T |
option turns on maximum compatibility with the original |
|
.At |
.Nm lex |
.Nm lex |
implementation, at the cost of a major loss in the generated scanner's |
implementation, at the cost of a major loss in the generated scanner's |
performance. |
performance. |