Some trailing context patterns cannot be properly matched and generate warning messages (`Dangerous trailing context'). These are patterns where the ending of the first part of the rule matches the beginning of the second part, such as `zx*/xy*', where the `x*' matches the `x' at the beginning of the trailing context. (Note that the POSIX draft states that the text matched by such patterns is undefined.)
For some trailing context rules, parts which are actually fixed-length are not recognized as such, leading to the abovementioned performance loss. In particular, parts using `|' or {n} (such as `foo{3}') are always considered variable-length.
Combining trailing context with the special `|' action can result in fixed trailing context being turned into the more expensive variable trailing context. For example, this happens in the following example:
%% abc | xyz/def
Use of unput
invalidates yytext
and yyleng
.
Use of unput
to push back more text than was matched can
result in the pushed-back text matching a beginning-of-line
(`^') rule even though it didn't come at the beginning of
the line (though this is rare!).
Pattern-matching of NUL
's is substantially slower than matching
other characters.
flex
does not generate correct #line
directives for code
internal to the scanner; thus, bugs in `flex.skel' yield bogus line
numbers.
Due to both buffering of input and read-ahead, you cannot intermix calls
to `stdio.h' routines, such as, for example, getchar
, with
flex
rules and expect it to work. Call input
instead.
The total table entries listed by the `-v' flag excludes the number
of table entries needed to determine what rule has been matched. The
number of entries is equal to the number of DFA states if the scanner
does not use REJECT
, and somewhat greater than the number of
states if it does.
REJECT
cannot be used with the `-f' or `-F' options.
Some of the macros, such as yywrap
, may in the future become
functions which live in the -lfl
library. This will doubtless
break a lot of code, but may be required for POSIX compliance.
The flex
internal algorithms need documentation.