Mercurial > octave-dspies
comparison libinterp/parse-tree/module.mk @ 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 | 813523c2b581 |
children | dcb260e7a648 7761c281aac0 |
comparison
equal
deleted
inserted
replaced
18973:625e3bb65885 | 18974:d8abf813c69f |
---|---|
84 $(SED) 's,lookup\[,gperf_lookup[,' < $@-t1 > $@-t | 84 $(SED) 's,lookup\[,gperf_lookup[,' < $@-t1 > $@-t |
85 mv $@-t $@ | 85 mv $@-t $@ |
86 rm -f $@-t1 | 86 rm -f $@-t1 |
87 | 87 |
88 parse-tree/oct-parse.yy: parse-tree/oct-parse.in.yy | 88 parse-tree/oct-parse.yy: parse-tree/oct-parse.in.yy |
89 case "$(BISON_API_PREFIX_DECL_STYLE)" in \ | |
90 *api*) api_prefix_decl='%define api.prefix "octave-"'; ;; \ | |
91 *name*) api_prefix_decl='%name-prefix="octave_"'; ;; \ | |
92 esac; \ | |
89 case "$(BISON_PUSH_PULL_DECL_STYLE)" in \ | 93 case "$(BISON_PUSH_PULL_DECL_STYLE)" in \ |
90 *quote*) quote='"' ;; \ | 94 *quote*) quote='"' ;; \ |
91 *) quote="" ;; \ | 95 *) quote="" ;; \ |
92 esac; \ | 96 esac; \ |
93 case "$(BISON_PUSH_PULL_DECL_STYLE)" in \ | 97 case "$(BISON_PUSH_PULL_DECL_STYLE)" in \ |
94 *dash*) decl="%define api.push-pull $${quote}both$${quote}"; ;; \ | 98 *dash*) push_pull_decl="%define api.push-pull $${quote}both$${quote}"; ;; \ |
95 *underscore*) decl="%define api.push_pull $${quote}both$${quote}"; ;; \ | 99 *underscore*) push_pull_decl="%define api.push_pull $${quote}both$${quote}"; ;; \ |
96 esac; \ | 100 esac; \ |
97 $(SED) "s/%PUSH_PULL_DECL%/$$decl/" $< > $@-t | 101 $(SED) -e "s/%PUSH_PULL_DECL%/$$push_pull_decl/" \ |
102 -e "s/%API_PREFIX_DECL%/$$api_prefix_decl/" $< > $@-t | |
98 mv $@-t $@ | 103 mv $@-t $@ |
99 | 104 |
100 noinst_LTLIBRARIES += \ | 105 noinst_LTLIBRARIES += \ |
101 parse-tree/libparse-tree.la \ | 106 parse-tree/libparse-tree.la \ |
102 parse-tree/libparser.la | 107 parse-tree/libparser.la |