Mercurial > octave
diff libinterp/corefcn/oct-tex-lexer.in.ll @ 19775:a941a65c7cb8
handle bison syntax changes in TeX parser
* oct-tex-parser.in.yy: Rename from oct-tex-parser.yy.
Substitute %API_PREFIX_DECL%.
* build-aux/common.mk (subst-bison-api-decls): New macro.
* libinterp/parse-tree/module.mk (oct-parse.yy): Use it.
* libinterp/corefcn/module.mk (oct-tex-parser.yy): New rule.
* libinterp/Makefile.am: Ensure that oct-tex-parser.yy is built early.
Search for tests in generated .yy file, not .in.yy file.
* oct-tex-lexer.in.ll: Define YYSTPE if needed.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Thu, 19 Feb 2015 18:05:07 -0500 |
parents | 4197fc428c7d |
children | a3577622952c |
line wrap: on
line diff
--- a/libinterp/corefcn/oct-tex-lexer.in.ll Thu Feb 19 17:33:59 2015 -0500 +++ b/libinterp/corefcn/oct-tex-lexer.in.ll Thu Feb 19 18:05:07 2015 -0500 @@ -47,6 +47,17 @@ #include "txt-eng.h" #include "oct-tex-parser.h" +// FIXME: with bison 3.x, OCTAVE_TEX_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_TEX_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_TEX_STYPE_IS_DECLARED) && ! defined YYSTYPE +#define YYSTYPE OCTAVE_TEX_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