comparison libinterp/parse-tree/lex.ll @ 18974: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
comparison
equal deleted inserted replaced
18973:625e3bb65885 18974:d8abf813c69f
93 #include "toplev.h" 93 #include "toplev.h"
94 #include "utils.h" 94 #include "utils.h"
95 #include "variables.h" 95 #include "variables.h"
96 #include <oct-parse.h> 96 #include <oct-parse.h>
97 #include <oct-gperf.h> 97 #include <oct-gperf.h>
98
99 // FIXME: with bison 3.x, OCTAVE_STYPE appears in the generated
100 // oct-parse.h file, but there is no definition for YYSTYPE, which is
101 // needed by the code that is generated by flex. I can't seem to find a
102 // way to tell flex to use OCTAVE_STYPE instead of YYSTYPE in the code
103 // it generates, or to tell bison to provide the definition of YYSTYPE
104 // in the generated oct-parse.h file.
105
106 #if defined (OCTAVE_STYPE_IS_DECLARED) && ! defined YYSTYPE
107 #define YYSTYPE OCTAVE_STYPE
108 #endif
98 109
99 #if defined (GNULIB_NAMESPACE) 110 #if defined (GNULIB_NAMESPACE)
100 // Calls to the following functions appear in the generated output from 111 // Calls to the following functions appear in the generated output from
101 // flex without the namespace tag. Redefine them so we will use them 112 // flex without the namespace tag. Redefine them so we will use them
102 // via the gnulib namespace. 113 // via the gnulib namespace.