> On 12 Dec 2014, at 14:13, Matthias Simon <m...@5nord.de> wrote: > > 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.
So it seems. > 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 :/ When a new Bison version has been released, the older ones become deprecated. So it is best to stick with the latest version, and include the parser generated files in the distribution. _______________________________________________ help-bison@gnu.org https://lists.gnu.org/mailman/listinfo/help-bison