pitfalls in flex 2.5.xx
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
I've seen that a lot of release critical errors come from the new
flex 2.5.xx version in unstable.
Here are some of the more common pitfalls:
1) These strings are not allowed in any flex input files, not
even in comments: "m4_" "[[" "]]"
So if you have x[i[j]] in your C code, flex will fail!
Solution: dont use m4_ prefix and put a space between [[ and ]]
see flex.info, node "M4 Dependency" for more info
2) yylineno is redefined (eg int yylineno = 0;)
Solution: Rename this variable to something else, eg mylineno.
Or use the internal line counting of flex with
"%options yylineno" and "int lineno() const" for accessing.
3) yytext_ptr is undefined
You use unput() after the second %% in your lexer file.
This is not possible anymore due to a bug in flex.
See http://bugs.debian.org/189332 for more info.
Solution: move the unput() usage in the rules or header section
(ie between or above the two %%).
Or wait until the flex people fix this :)
Cheers, Bastian
- --
Zwei Kerzen: "Was machst Du heute abend?" -- "Ich glaube ich gehe aus."
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)
iD8DBQE+u8FVeBwlBDLsbz4RAg5ZAJ4ourO6R61wrKxjPYr10fVkQlDwrgCgrh/S
OSQsDRqfsWkzSJCqTnAypXI=
=hZab
-----END PGP SIGNATURE-----
Reply to: