diff libinterp/parse-tree/lex.ll @ 19008:d8abf813c69f stable

handle changes in bison 3.x * acinclude.m4 (OCTAVE_PROG_BISON): Also check for the proper way to declare api.prefix. * build-aux/common.mk (BISON_API_PREFIX_DECL_STYLE): New variable. * lex.ll: Conditionally define YYSTYPE. * oct-parse.in.yy (%API_PREFIX_DECL%): Allow for differences in the way api.prefix is specified in different versions of bison. * libinterp/parse-tree/module.mk (parse-tree/oct-parse.yy): Also substitute %API_PREFIX_DECL% in lex.ll.
author John W. Eaton <jwe@octave.org>
date Fri, 01 Aug 2014 08:09:02 -0400
parents 4293f49795d9
children c59745865c7f 446c46af4b42
line wrap: on
line diff
--- a/libinterp/parse-tree/lex.ll	Tue Jul 01 15:56:00 2014 -0400
+++ b/libinterp/parse-tree/lex.ll	Fri Aug 01 08:09:02 2014 -0400
@@ -96,6 +96,17 @@
 #include <oct-parse.h>
 #include <oct-gperf.h>
 
+// FIXME: with bison 3.x, OCTAVE_STYPE appears in the generated
+// oct-parse.h file, but there is no definition for YYSTYPE, which is
+// needed by the code that is generated by flex.  I can't seem to find a
+// way to tell flex to use OCTAVE_STYPE instead of YYSTYPE in the code
+// it generates, or to tell bison to provide the definition of YYSTYPE
+// in the generated oct-parse.h file.
+
+#if defined (OCTAVE_STYPE_IS_DECLARED) && ! defined YYSTYPE
+#define YYSTYPE OCTAVE_STYPE
+#endif
+
 #if defined (GNULIB_NAMESPACE)
 // Calls to the following functions appear in the generated output from
 // flex without the namespace tag.  Redefine them so we will use them