1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
|
Author: Andreas Beckmann <anbe@debian.org>
Description: sanitize bison usage
use
%define api.prefix {...}
instead of crude
sed -e 's/[yY][yY]/.../g'
Thanks to Akim Demaille for the hint! (#960608)
--- a/Makefile.in
+++ b/Makefile.in
@@ -474,10 +474,10 @@ common/sub/expr.$(OBJEXT): common/sub/ex
common/sub/expr_gram.yacc.c common/sub/expr_gram.yacc.h: common/sub/expr_gram.y
$(YACC) -d common/sub/expr_gram.y
- sed -e 's/[yY][yY]/sub_expr_gram_/g' -e '/<stdio.h>/d' -e \
+ sed -e '/<stdio.h>/d' -e \
'/<stdlib.h>/d' -e '/<stddef.h>/d' y.tab.c > \
common/sub/expr_gram.yacc.c
- sed -e 's/[yY][yY]/sub_expr_gram_/g' -e \
+ sed -e \
's/Y_TAB_H/SUB_EXPR_GRAM_TAB_H/g' y.tab.h > \
common/sub/expr_gram.yacc.h
rm y.tab.c y.tab.h
--- a/common/sub/expr_gram.y
+++ b/common/sub/expr_gram.y
@@ -16,6 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+%define api.prefix {sub_expr_gram_}
+
%{
#include <common/ac/stdarg.h>
|