[PATCH 1/2] flex: Avoid REJECT name conflict.

Joakim Tjernlund joakim.tjernlund at transmode.se
Thu Apr 29 22:46:58 CEST 2010


Martin Mares <mj at ucw.cz> wrote on 2010/04/29 22:37:13:
>
> Hello!
>
> > That would only get rid of the warning, but REJECT is still
> > a reserved word(-Cf still fails).
>
> This should not be a problem as we don't use -Cf, should it?

We don't. I just made a point that %noreject doesn't solve
everything. If you one day want to use REJECT(or ECHO) in flex,
it breaks.

>
> (BTW blindly detecting every occurrence of the substring "REJECT" in the
> C code snippets smells of a bug in flex. It might very well be a non-expanded
> argument to a macro, which should not be touched by flex at all.)

Haven't you heard a word ? ECHO, REJECT and BEGIN are pre defined
actions in flex that you can use in your C code. Go read flex again.
Yes, it would have been better if they had named them YYECHO YYREJECT and
YYBEGIN but they didn't.




More information about the Bird-users mailing list