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

Joakim Tjernlund joakim.tjernlund at transmode.se
Tue Apr 27 12:08:30 CEST 2010


>
> Ondrej Filip <feela at network.cz> wrote on 2010/04/27 11:34:18:
> >
> > On 27.4.2010 11:21, Joakim Tjernlund wrote:
> > > REJECT is a reserved word in flex and REJECT is also used
> > > as %token in bison grammar. Rename REJECT to Reject in bison
> > > grammar to avoid name conflict. Same thing for ECHO but
> > > that does not seem to cause any conflicts ATM so leave as is.
> >
> > Hmm, interesting. What king of problems does it cause to you?
>
> I noticed the compile warning caused by it and looked for the
> reason. I didn't notice any problem but such conflicts are a bug
> waiting to happen so I tried to fix it.
> The best fix would be to prefix all tokens(say TOK_) so
> one doesn't risk conflicts but that was too much work and need
> to change the *.m4 files which I don't speak.

BTW, the only warning I see ATM is
  cf-lex.c:1874: warning: 'yy_fatal_error' defined but not used
and that one is impossible to get rid of(unless flex changes)

Do you really need the
 #define YY_FATAL_ERROR(msg) cf_error(msg)
in cf_flex.l?




More information about the Bird-users mailing list