-Changes between release 2.5.0.1 (05Dec94) and release 2.4.7:
+Changes between release 2.5.0.2 (28Dec94) and release 2.4.7:
- A new concept of "start condition" scope has been introduced.
A start condition scope is begun with:
considers its input "interactive" (no call to isatty()
will be made when the scanner runs)
main supply a main program for the scanner, which
- simply calls yylex(). Implies %option yywrap.
+ simply calls yylex(). Implies %option noyywrap.
never-interactive generate a scanner which never
considers its input "interactive" (no call to isatty()
will be made when the scanner runs)
To use start condition stacks, your scanner must include
a "%option stack" directive.
+ - flex now supports POSIX character class expressions. These
+ are expressions enclosed inside "[:" and ":]" delimiters (which
+ themselves must appear between the '[' and ']' of a character
+ class; other elements may occur inside the character class, too).
+ The expressions flex recognizes are:
+
+ [:alnum:] [:alpha:] [:blank:] [:cntrl:] [:digit:] [:graph:]
+ [:lower:] [:print:] [:punct:] [:space:] [:upper:] [:xdigit:]
+
+ These expressions all designate a set of characters equivalent to
+ the corresponding isXXX function (for example, [:alnum:] designates
+ those characters for which isalnum() returns true - i.e., any
+ alphabetic or numeric). Some systems don't provide isblank(),
+ so flex defines [:blank:] as a blank or a tab.
+
+ For example, the following character classes are all equivalent:
+
+ [[:alnum:]]
+ [[:alpha:][:digit:]
+ [[:alpha:]0-9]
+ [a-zA-Z0-9]
+
+ If your scanner is case-insensitive (-i flag), then [:upper:]
+ and [:lower:] are equivalent to [:alpha:].
+
- The promised rewrite of the C++ FlexLexer class has not yet
been done. Support for FlexLexer is limited at the moment to
fixing show-stopper bugs, so, for example, the new functions
- input() no longer trashes yytext.
+ - C++ scanner objects now work with the -P option. You include
+ <FlexLexer.h> once per scanner - see comments in <FlexLexer.h>
+ (or flexdoc) for details.
+
- C++ FlexLexer objects now use the "cerr" stream to report -d output
instead of stdio.
- The -c flag now has its full glorious POSIX interpretation (do
nothing), rather than being interpreted as an old-style -C flag.
- - Scanners generated using -l lex compatiblity now have the symbol
+ - Scanners generated by flex now include two #define's giving
+ the major and minor version numbers (YY_FLEX_MAJOR_VERSION,
+ YY_FLEX_MINOR_VERSION). These can then be tested to see
+ whether certain flex features are available.
+
+ - Scanners generated using -l lex compatibility now have the symbol
YY_FLEX_LEX_COMPAT #define'd.
- Documentation now clarifies that start conditions persist across
- A bug was fixed in which dynamically-expanded buffers were
reallocated a couple of bytes too small.
- - -S will not be going away.
+ - A bug was fixed which could cause flex to read and write beyond
+ the end of the input buffer.
- - With the 2.6 release, I am considering dropping support for non-ANSI
- C compilers (in particular, non-prototyping C compilers). If this
- puts you in a panic, drop me a line at flex-ansi@ee.lbl.gov. If
- your mail bounces with "no such user", then enough people have
- already complained that I've rescinded my decision.
+ - -S will not be going away.
Changes between release 2.4.7 (03Aug94) and release 2.4.6: