help-bison
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Is there a replacement for yychar


From: Matthias Simon
Subject: Re: Is there a replacement for yychar
Date: Fri, 12 Dec 2014 14:13:38 +0100
User-agent: Roundcube Webmail/0.7.1

On 2014-12-12 12:51, Hans Aberg wrote:
if [ $($BISON --version | head 1 | ...) -lt 3 ]; then
   write_header_config "#define yychar yyla.type”
fi

Right. It might suffice to put it directly in the .yy file, as later
version do not seem to have yychar.
Whereas later versions do not have yychar, older versions do not have yyla.type. Putting the above macro into .yy file will fail in at least one version.

I tried to find a define which allows switches like this:

#ifndef YY_HAS_OWN_YYCHAR
#define yychar yyla.type
#endif

But it seems, there is no macro in bison which could be used as YY_HAS_OWN_YYCHAR-trigger-thingy. Therefore I think I have to parse the bison version string :/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]