We now also work with byacc (version tested:
20130925) which some people
prefer, perhaps due to its license (public domain) or performance
(haven't compared).
When using byacc, currently the following warning comes up:
src/xkbcomp/parser.c:954:14: warning: declaration shadows a variable in the global scope [-Wshadow]
YYSTYPE yylval;
^
src/xkbcomp/parser.c:37:20: note: expanded from macro 'yylval'
#define yylval _xkbcommon_lval
^
./src/xkbcomp/parser.h:96:16: note: previous declaration is here
extern YYSTYPE _xkbcommon_lval;
This is due to a bug in byacc - it shouldn't output that extern line in
%pure-parser mode. So the warning stays.
Signed-off-by: Ran Benita <ran234@gmail.com>
AC_PROG_MKDIR_P
PKG_PROG_PKG_CONFIG
+# Note: we use some yacc extensions, which work with either GNU bison
+# (preferred) or byacc. Other yacc's may or may not work.
AC_PROG_YACC
AC_PATH_PROG([YACC_INST], $YACC)
if test ! -f "src/xkbcomp/parser.c"; then
********************************************************/
+/*
+ * The parser should work with reasonably recent versions of either
+ * bison or byacc. So if you make changes, try to make sure it works
+ * in both!
+ */
+
%{
#include "xkbcomp-priv.h"
#include "ast-build.h"