From 21c147b6e5372563b7c4741deadaddb9354f4b09 Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Wed, 11 Nov 2020 08:42:16 +0100 Subject: yacc.c: provide the Bison version as an integral macro Suggested by Balazs Scheidler. https://github.com/akimd/bison/issues/55 * src/muscle-tab.c (muscle_init): Move/rename `b4_version` to/as... * src/output.c (prepare): `b4_version_string`. Also define `b4_version`. * data/skeletons/bison.m4, data/skeletons/c.m4, data/skeletons/d.m4, * data/skeletons/java.m4: Adjust. * doc/bison.texi: Document it. --- doc/bison.texi | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'doc') diff --git a/doc/bison.texi b/doc/bison.texi index 416a8ec6..d38801db 100644 --- a/doc/bison.texi +++ b/doc/bison.texi @@ -15434,6 +15434,12 @@ Macro to discard a value from the parser stack and fake a lookahead token. @xref{Action Features}. @end deffn +@deffn {Macro} YYBISON +The version of Bison as an integer, for instance 30704 for version 3.7.4. +Defined in @file{yacc.c} only. Before version 3.7.4, @code{YYBISON} was +defined to 1. +@end deffn + @deffn {Variable} yychar External integer variable that contains the integer value of the lookahead token. (In a pure parser, it is a local variable within -- cgit v1.2.1