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 :/


_______________________________________________
help-bison@gnu.org https://lists.gnu.org/mailman/listinfo/help-bison

Reply via email to