From 9404f529bc178d75ee8003853e1fa67281cd080d Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Sat, 14 Jul 2012 09:07:52 +0200 Subject: [PATCH] tests: fix bison input file Do not provide implementations in the %{...%} section, especially if the header is included elsewhere, since then the linker will complain about multiple definitions. Reported by Stefano Lattarini, . * t/yacc-bison-skeleton.sh (zardoz.y): Define yylex and yyerror in the epilogue. --- t/yacc-bison-skeleton.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/t/yacc-bison-skeleton.sh b/t/yacc-bison-skeleton.sh index 5bf9092..9e9f514 100755 --- a/t/yacc-bison-skeleton.sh +++ b/t/yacc-bison-skeleton.sh @@ -35,11 +35,14 @@ END # Parser. cat > zardoz.y << 'END' %{ -int yylex () { return 0; } -void yyerror (const char *s) { return; } +int yylex (); +void yyerror (const char *s); %} %% foobar : 'f' 'o' 'o' 'b' 'a' 'r' {}; +%% +int yylex () { return 0; } +void yyerror (const char *s) { return; } END cat > foo.c << 'END' -- 2.7.4