Repository navigation
Noteworthy changes in release 2.6.15 (2026-11-15) [stable]
scanner
-
A program can define YY_BREAK again, as it could with flex 2.6.4.
YY_BREAK is the code that ends each rule's action, and a program can
define it, for example to leave out the break and avoid warnings
about unreachable code. Flex 2.6.5 and later no longer used it, so
such a definition was ignored without any message. The default back
end uses it again. The post-action option still replaces it. -
A program can declare yyinput() itself again, as it could with
flex 2.6.4. Flex 2.6.5 named the function that reads the next
character in a C scanner yyinput(), so a declaration such as
"extern int yyinput(void);" in a program's own header no longer
compiled, which stopped VirtualBox from building. The function is
called input() in a C scanner again, as in 2.6.4. In a rule's
action, yyinput() is still accepted and works as input(); anywhere
else in a C scanner, use input(). A C scanner that is compiled as
C++ keeps the name yyinput(), as in 2.6.4, and a C++ scanner is
unchanged. (#863) -
Flex no longer writes past the end of a buffer on its stack when a
rule's action in a c99 or go scanner has a call to yypanic() or a
similar function that is as long as the C library's BUFSIZ or
longer (8192 bytes with glibc). Before, flex wrote the scanner
without the end of the call, so the C did not compile. (#864)Thanks to anshal ossaimi.