FreeBSD Bugzilla – Attachment 215692 Details for
Bug 247363
devel/aegis: make work with devel/bison-3.6.X
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
fixes issues with bison vs. byacc
port.diff (text/plain), 27.09 KB, created by
aryeh.friedman
on 2020-06-18 07:29:21 UTC
(
hide
)
Description:
fixes issues with bison vs. byacc
Filename:
MIME Type:
Creator:
aryeh.friedman
Created:
2020-06-18 07:29:21 UTC
Size:
27.09 KB
patch
obsolete
>Index: Makefile >=================================================================== >--- Makefile (revision 539517) >+++ Makefile (working copy) >@@ -4,7 +4,7 @@ > PORTNAME= aegis > PORTVERSION= 4.25 > DISTVERSIONSUFFIX= .D510 >-PORTREVISION= 11 >+PORTREVISION= 12 > CATEGORIES= devel > MASTER_SITES= SF > >@@ -16,7 +16,7 @@ > LIB_DEPENDS= libcurl.so:ftp/curl > RUN_DEPENDS= tkdiff:textproc/tkdiff > >-USES= gettext ghostscript gnome groff perl5 tk >+USES= gettext ghostscript gnome groff perl5 tk bison > USE_GNOME= libxml2 > GNU_CONFIGURE= yes > CPPFLAGS+= "-I${LOCALBASE}/include" >Index: files/patch-aefind_cmdline_y >=================================================================== >--- files/patch-aefind_cmdline_y (nonexistent) >+++ files/patch-aefind_cmdline_y (working copy) >@@ -0,0 +1,18 @@ >+--- aefind/cmdline.y.orig 2020-06-17 17:53:49.450461000 -0400 >++++ aefind/cmdline.y 2020-06-17 17:54:14.484267000 -0400 >+@@ -2,6 +2,7 @@ >+ * aegis - project change supervisor >+ * Copyright (C) 1997-1999, 2001-2008, 2011, 2012 Peter Miller >+ * Copyright (C) 2007 Walter Franzini >++ * Copyright (C) 2020 Aryeh M. Friedman >+ * >+ * This program is free software; you can redistribute it and/or modify >+ * it under the terms of the GNU General Public License as published by >+@@ -17,6 +18,7 @@ >+ * along with this program. If not, see <http://www.gnu.org/licenses/>. >+ */ >+ >++%define api.prefix {cmdline_} >+ %{ >+ >+ #include <common/ac/assert.h> > >Property changes on: files/patch-aefind_cmdline_y >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: files/patch-aeimport_format_rcs_gram_y >=================================================================== >--- files/patch-aeimport_format_rcs_gram_y (nonexistent) >+++ files/patch-aeimport_format_rcs_gram_y (working copy) >@@ -0,0 +1,18 @@ >+--- aeimport/format/rcs/gram.y.orig 2020-06-17 17:55:08.321101000 -0400 >++++ aeimport/format/rcs/gram.y 2020-06-17 17:55:44.146287000 -0400 >+@@ -1,6 +1,7 @@ >+ /* >+ * aegis - project change supervisor >+ * Copyright (C) 2001-2006, 2008, 2012 Peter Miller >++ * Copyright (C) 2020 Aryeh M. Friedman >+ * >+ * This program is free software; you can redistribute it and/or modify >+ * it under the terms of the GNU General Public License as published by >+@@ -17,6 +18,7 @@ >+ * <http://www.gnu.org/licenses/>. >+ */ >+ >++%define api.prefix {format_rcs_gram_} >+ %{ >+ >+ #include <common/ac/assert.h> > >Property changes on: files/patch-aeimport_format_rcs_gram_y >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: files/patch-aeimport_format_sccs_gram_y >=================================================================== >--- files/patch-aeimport_format_sccs_gram_y (nonexistent) >+++ files/patch-aeimport_format_sccs_gram_y (working copy) >@@ -0,0 +1,18 @@ >+--- aeimport/format/sccs/gram.y.orig 2020-06-17 17:56:11.007600000 -0400 >++++ aeimport/format/sccs/gram.y 2020-06-17 17:56:29.944250000 -0400 >+@@ -1,6 +1,7 @@ >+ /* >+ * aegis - project change supervisor >+ * Copyright (C) 2001-2008, 2012 Peter Miller >++ * Copyright (C) 2020 Aryeh M. Friedman >+ * >+ * This program is free software; you can redistribute it and/or modify >+ * it under the terms of the GNU General Public License as published by >+@@ -16,6 +17,7 @@ >+ * along with this program. If not, see <http://www.gnu.org/licenses/>. >+ */ >+ >++%define api.prefix {format_sccs_gram_} >+ %{ >+ >+ #include <common/ac/assert.h> > >Property changes on: files/patch-aeimport_format_sccs_gram_y >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: files/patch-common_gettime_y >=================================================================== >--- files/patch-common_gettime_y (nonexistent) >+++ files/patch-common_gettime_y (working copy) >@@ -0,0 +1,18 @@ >+--- common/gettime.y.orig 2020-06-17 17:45:06.095616000 -0400 >++++ common/gettime.y 2020-06-17 17:45:33.928740000 -0400 >+@@ -1,6 +1,7 @@ >+ /* >+ * aegis - project change supervisor >+ * Copyright (C) 1991-1995, 1997-1999, 2002-2008, 2012 Peter Miller >++ * Copyright (C) 2020 Aryeh M. Friedman >+ * >+ * This program is free software; you can redistribute it and/or modify >+ * it under the terms of the GNU General Public License as published by >+@@ -21,6 +22,7 @@ >+ * Steven Bellovin <smb@cs.unc.edu> >+ */ >+ >++%define api.prefix {gettime_} >+ %token AGO >+ %token COLON >+ %token COMMA > >Property changes on: files/patch-common_gettime_y >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: files/patch-fmtgen_lex_cc >=================================================================== >--- files/patch-fmtgen_lex_cc (nonexistent) >+++ files/patch-fmtgen_lex_cc (working copy) >@@ -0,0 +1,19 @@ >+--- fmtgen/lex.cc.orig 2020-06-17 17:44:00.521184000 -0400 >++++ fmtgen/lex.cc 2020-06-17 17:44:09.243453000 -0400 >+@@ -1,6 +1,7 @@ >+ // >+ // aegis - project change supervisor >+ // Copyright (C) 1991-1995, 1997, 1999, 2002-2008, 2012 Peter Miller >++// Copyright (C) 2020 Aryeh M. Friedman >+ // >+ // This program is free software; you can redistribute it and/or modify >+ // it under the terms of the GNU General Public License as published by >+@@ -48,7 +49,7 @@ >+ >+ static file_ty *file; >+ static int error_count; >+-extern parse_STYPE parse_lval; >++extern PARSE_STYPE parse_lval; >+ static nstring_list ifiles; >+ static nstring_list include_path; >+ static symtab<int> keyword; > >Property changes on: files/patch-fmtgen_lex_cc >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: files/patch-fmtgen_parse_y >=================================================================== >--- files/patch-fmtgen_parse_y (nonexistent) >+++ files/patch-fmtgen_parse_y (working copy) >@@ -0,0 +1,35 @@ >+--- fmtgen/parse.y.orig 2020-06-17 17:42:24.867502000 -0400 >++++ fmtgen/parse.y 2020-06-17 17:43:25.898841000 -0400 >+@@ -2,6 +2,7 @@ >+ * aegis - project change supervisor >+ * Copyright (C) 1991-1994, 1997-1999, 2001-2008, 2012 Peter Miller >+ * Copyright (C) 2007 Walter Franzini >++ * Copyright (C) 2020 Aryeh M. Friedman >+ * >+ * This program is free software; you can redistribute it and/or modify >+ * it under the terms of the GNU General Public License as published by >+@@ -17,8 +18,8 @@ >+ * along with this program. If not, see <http://www.gnu.org/licenses/>. >+ */ >+ >++%define api.prefix {parse_} >+ %{ >+- >+ #include <common/ac/ctype.h> >+ #include <common/ac/stdio.h> >+ #include <common/ac/stdlib.h> >+@@ -208,12 +209,12 @@ >+ trace(("}\n")); >+ } >+ >++int yyparse(void); >++extern int yylex(void); >+ >+ void >+ parse(const generator::pointer &g, const nstring &definition_file) >+ { >+- extern int yyparse(void); >+- >+ /* >+ * initial name is the basename of the definition file >+ */ > >Property changes on: files/patch-fmtgen_parse_y >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: files/patch-libaegis_aer_lex_cc >=================================================================== >--- files/patch-libaegis_aer_lex_cc (nonexistent) >+++ files/patch-libaegis_aer_lex_cc (working copy) >@@ -0,0 +1,19 @@ >+--- libaegis/aer/lex.cc.orig 2020-06-17 18:13:58.645709000 -0400 >++++ libaegis/aer/lex.cc 2020-06-17 18:14:15.245886000 -0400 >+@@ -1,6 +1,7 @@ >+ // >+ // aegis - project change supervisor >+ // Copyright (C) 1991-1996, 1998, 1999, 2001-2008, 2012 Peter Miller >++// Copyright (C) 2020 Aryeh M. Friedman >+ // >+ // This program is free software; you can redistribute it and/or modify >+ // it under the terms of the GNU General Public License as published by >+@@ -40,7 +41,7 @@ >+ >+ static input ip; >+ static int error_count; >+-extern aer_report_STYPE aer_report_lval; >++extern AER_REPORT_STYPE aer_report_lval; >+ static nstring_accumulator buffer; >+ static symtab_ty *stp; >+ > >Property changes on: files/patch-libaegis_aer_lex_cc >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: files/patch-libaegis_aer_report_y >=================================================================== >--- files/patch-libaegis_aer_report_y (nonexistent) >+++ files/patch-libaegis_aer_report_y (working copy) >@@ -0,0 +1,18 @@ >+--- libaegis/aer/report.y.orig 2020-06-17 17:46:55.348947000 -0400 >++++ libaegis/aer/report.y 2020-06-17 17:47:40.813660000 -0400 >+@@ -1,6 +1,7 @@ >+ /* >+ * aegis - project change supervisor >+ * Copyright (C) 1994-1996, 1999, 2002, 2005-2008, 2012 Peter Miller >++ * Copyright (C) 2020 Aryeh M. Friedman >+ * >+ * This program is free software; you can redistribute it and/or modify >+ * it under the terms of the GNU General Public License as published by >+@@ -17,6 +18,7 @@ >+ * <http://www.gnu.org/licenses/>. >+ */ >+ >++%define api.prefix {aer_report_} >+ %{ >+ >+ #include <common/ac/assert.h> > >Property changes on: files/patch-libaegis_aer_report_y >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: files/patch-libaegis_gram_y >=================================================================== >--- files/patch-libaegis_gram_y (nonexistent) >+++ files/patch-libaegis_gram_y (working copy) >@@ -0,0 +1,18 @@ >+--- libaegis/gram.y.orig 2020-06-17 17:49:20.265476000 -0400 >++++ libaegis/gram.y 2020-06-17 17:49:37.193953000 -0400 >+@@ -1,6 +1,7 @@ >+ /* >+ * aegis - project change supervisor >+ * Copyright (C) 1991-1994, 1999, 2002, 2004-2006, 2008, 2012 Peter Miller >++ * Copyright (C) 2020 Aryeh M. Friedman >+ * >+ * This program is free software; you can redistribute it and/or modify >+ * it under the terms of the GNU General Public License as published by >+@@ -17,6 +18,7 @@ >+ * <http://www.gnu.org/licenses/>. >+ */ >+ >++%define api.prefix {gram_} >+ %{ >+ >+ #include <common/ac/stdio.h> > >Property changes on: files/patch-libaegis_gram_y >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: files/patch-libaegis_meta_lex_cc >=================================================================== >--- files/patch-libaegis_meta_lex_cc (nonexistent) >+++ files/patch-libaegis_meta_lex_cc (working copy) >@@ -0,0 +1,19 @@ >+--- libaegis/meta_lex.cc.orig 2020-06-17 18:16:18.858528000 -0400 >++++ libaegis/meta_lex.cc 2020-06-17 18:16:45.666339000 -0400 >+@@ -1,6 +1,7 @@ >+ // >+ // aegis - project change supervisor >+ // Copyright (C) 1991-1996, 1998, 1999, 2001-2008, 2010, 2012 Peter Miller >++// Copyright (C) 2020 Aryeh M. Friedman >+ // >+ // This program is free software; you can redistribute it and/or modify >+ // it under the terms of the GNU General Public License as published by >+@@ -46,7 +47,7 @@ >+ static input source; >+ >+ static int error_count; >+-extern gram_STYPE gram_lval; >++extern GRAM_STYPE gram_lval; >+ static nstring_accumulator buffer; >+ >+ > >Property changes on: files/patch-libaegis_meta_lex_cc >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: files/patch-libaegis_sub_expr_gram_y >=================================================================== >--- files/patch-libaegis_sub_expr_gram_y (nonexistent) >+++ files/patch-libaegis_sub_expr_gram_y (working copy) >@@ -0,0 +1,149 @@ >+--- libaegis/sub/expr_gram.y.orig 2020-06-17 17:51:38.214116000 -0400 >++++ libaegis/sub/expr_gram.y 2020-06-17 17:52:02.149971000 -0400 >+@@ -1,22 +1,24 @@ >+ /* >+- * aegis - project change supervisor >+- * Copyright (C) 1996, 1999, 2002, 2003, 2005-2008 Peter Miller >++ * aegis - project change supervisor >++ * Copyright (C) 1996, 1999, 2002, 2003, 2005-2008 Peter Miller >++ * Copyright (C) 2020 Aryeh M. Friedman >+ * >+- * This program is free software; you can redistribute it and/or modify >+- * it under the terms of the GNU General Public License as published by >+- * the Free Software Foundation; either version 3 of the License, or >+- * (at your option) any later version. >++ * This program is free software; you can redistribute it and/or modify >++ * it under the terms of the GNU General Public License as published by >++ * the Free Software Foundation; either version 3 of the License, or >++ * (at your option) any later version. >+ * >+- * This program is distributed in the hope that it will be useful, >+- * but WITHOUT ANY WARRANTY; without even the implied warranty of >+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the >+- * GNU General Public License for more details. >++ * This program is distributed in the hope that it will be useful, >++ * but WITHOUT ANY WARRANTY; without even the implied warranty of >++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the >++ * GNU General Public License for more details. >+ * >+- * You should have received a copy of the GNU General Public License >+- * along with this program. If not, see >+- * <http://www.gnu.org/licenses/>. >++ * You should have received a copy of the GNU General Public License >++ * along with this program. If not, see >++ * <http://www.gnu.org/licenses/>. >+ */ >+ >++%define api.prefix {sub_expr_gram_} >+ %{ >+ >+ #include <common/ac/stdarg.h> >+@@ -57,7 +59,7 @@ >+ >+ %union >+ { >+- long lv_number; >++ long lv_number; >+ } >+ >+ %type <lv_number> NUMBER expr >+@@ -94,7 +96,7 @@ >+ >+ trace(("}\n")); >+ if (bad) >+- return ""; >++ return ""; >+ return nstring::format("%ld", result); >+ } >+ >+@@ -112,21 +114,21 @@ >+ /* >+ * jiggery-pokery for yacc >+ * >+- * Replace all calls to printf with a call to trace_printf. The >+- * trace_where_ is needed to set the location, and is safe, because >+- * yacc only invokes the printf with an if (be careful, the printf >+- * is not in a compound statement). >++ * Replace all calls to printf with a call to trace_printf. The >++ * trace_where_ is needed to set the location, and is safe, because >++ * yacc only invokes the printf with an if (be careful, the printf >++ * is not in a compound statement). >+ */ >+ #define printf trace_where_, trace_printf >+ >+ /* >+ * jiggery-pokery for bison >+ * >+- * Replace all calls to fprintf with a call to yydebugger. Ignore >+- * the first argument, it will be "stderr". The trace_where_ is >+- * needed to set the location, and is safe, because bison only >+- * invokes the printf with an if (be careful, the fprintf is not in >+- * a compound statement). >++ * Replace all calls to fprintf with a call to yydebugger. Ignore >++ * the first argument, it will be "stderr". The trace_where_ is >++ * needed to set the location, and is safe, because bison only >++ * invokes the printf with an if (be careful, the fprintf is not in >++ * a compound statement). >+ */ >+ #define fprintf trace_where_, yydebugger >+ >+@@ -151,40 +153,41 @@ >+ >+ grammar: >+ expr >+- { result = $1; } >++ { result = $1; } >+ ; >+ >+ expr >+ : LP expr RP >+- { $$ = $2; trace(("$$ = %ld;\n", $$)); } >++ { $$ = $2; trace(("$$ = %ld;\n", $$)); } >+ | NUMBER >+- { $$ = $1; trace(("$$ = %ld;\n", $$)); } >++ { $$ = $1; trace(("$$ = %ld;\n", $$)); } >+ | MINUS expr >+- %prec UNARY >+- { $$ = -$2; trace(("$$ = %ld;\n", $$)); } >++ %prec UNARY >++ { $$ = -$2; trace(("$$ = %ld;\n", $$)); } >+ | expr PLUS expr >+- { $$ = $1 + $3; trace(("$$ = %ld;\n", $$)); } >++ { $$ = $1 + $3; trace(("$$ = %ld;\n", $$)); } >+ | expr MINUS expr >+- { $$ = $1 - $3; trace(("$$ = %ld;\n", $$)); } >++ { $$ = $1 - $3; trace(("$$ = %ld;\n", $$)); } >+ | expr MUL expr >+- { $$ = $1 * $3; trace(("$$ = %ld;\n", $$)); } >++ { $$ = $1 * $3; trace(("$$ = %ld;\n", $$)); } >+ | expr DIV expr >+- { $$ = $3 ? $1 / $3 : 0; trace(("$$ = %ld;\n", $$)); } >++ { $$ = $3 ? $1 / $3 : 0; trace(("$$ = %ld;\n", $$)); } >+ | expr MOD expr >+- { $$ = $3 ? $1 % $3 : 0; trace(("$$ = %ld;\n", $$)); } >++ { $$ = $3 ? $1 % $3 : 0; trace(("$$ = %ld;\n", $$)); } >+ | expr EQ expr >+- { $$ = ($1 == $3); trace(("$$ = %ld;\n", $$)); } >++ { $$ = ($1 == $3); trace(("$$ = %ld;\n", $$)); } >+ | expr NE expr >+- { $$ = ($1 != $3); trace(("$$ = %ld;\n", $$)); } >++ { $$ = ($1 != $3); trace(("$$ = %ld;\n", $$)); } >+ | expr LT expr >+- { $$ = ($1 < $3); trace(("$$ = %ld;\n", $$)); } >++ { $$ = ($1 < $3); trace(("$$ = %ld;\n", $$)); } >+ | expr LE expr >+- { $$ = ($1 <= $3); trace(("$$ = %ld;\n", $$)); } >++ { $$ = ($1 <= $3); trace(("$$ = %ld;\n", $$)); } >+ | expr GT expr >+- { $$ = ($1 > $3); trace(("$$ = %ld;\n", $$)); } >++ { $$ = ($1 > $3); trace(("$$ = %ld;\n", $$)); } >+ | expr GE expr >+- { $$ = ($1 >= $3); trace(("$$ = %ld;\n", $$)); } >++ { $$ = ($1 >= $3); trace(("$$ = %ld;\n", $$)); } >+ | NOT expr >+- %prec UNARY >+- { $$ = (!$2); trace(("$$ = %ld;\n", $$)); } >++ %prec UNARY >++ { $$ = (!$2); trace(("$$ = %ld;\n", $$)); } >+ ; >++// vim: set ts=8 sw=4 et : > >Property changes on: files/patch-libaegis_sub_expr_gram_y >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: files/patch-libaegis_sub_plural_gram_y >=================================================================== >--- files/patch-libaegis_sub_plural_gram_y (nonexistent) >+++ files/patch-libaegis_sub_plural_gram_y (working copy) >@@ -0,0 +1,373 @@ >+--- libaegis/sub/plural_gram.y.orig 2020-06-17 17:52:35.548476000 -0400 >++++ libaegis/sub/plural_gram.y 2020-06-17 17:52:46.221850000 -0400 >+@@ -1,22 +1,24 @@ >+ /* >+- * aegis - project change supervisor >+- * Copyright (C) 2002-2008 Peter Miller >++ * aegis - project change supervisor >++ * Copyright (C) 2002-2008 Peter Miller >++ * Copyright (C) 2020 Aryeh M. Friedman >+ * >+- * This program is free software; you can redistribute it and/or modify >+- * it under the terms of the GNU General Public License as published by >+- * the Free Software Foundation; either version 3 of the License, or >+- * (at your option) any later version. >++ * This program is free software; you can redistribute it and/or modify >++ * it under the terms of the GNU General Public License as published by >++ * the Free Software Foundation; either version 3 of the License, or >++ * (at your option) any later version. >+ * >+- * This program is distributed in the hope that it will be useful, >+- * but WITHOUT ANY WARRANTY; without even the implied warranty of >+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the >+- * GNU General Public License for more details. >++ * This program is distributed in the hope that it will be useful, >++ * but WITHOUT ANY WARRANTY; without even the implied warranty of >++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the >++ * GNU General Public License for more details. >+ * >+- * You should have received a copy of the GNU General Public License >+- * along with this program. If not, see >+- * <http://www.gnu.org/licenses/>. >++ * You should have received a copy of the GNU General Public License >++ * along with this program. If not, see >++ * <http://www.gnu.org/licenses/>. >+ */ >+ >++%define api.prefix {sub_plural_gram_} >+ %{ >+ >+ #include <common/ac/stdarg.h> >+@@ -114,9 +116,9 @@ >+ >+ trace(("}\n")); >+ if (bad) >+- return 0; >++ return 0; >+ if (plural >= nplurals) >+- return 0; >++ return 0; >+ return plural; >+ } >+ >+@@ -132,35 +134,35 @@ >+ /* >+ * jiggery-pokery for yacc >+ * >+- * Replace all calls to printf with a call to trace_printf. The >+- * trace_where_ is needed to set the location, and is safe, because >+- * yacc only invokes the printf with an if (be careful, the printf >+- * is not in a compound statement). >++ * Replace all calls to printf with a call to trace_printf. The >++ * trace_where_ is needed to set the location, and is safe, because >++ * yacc only invokes the printf with an if (be careful, the printf >++ * is not in a compound statement). >+ */ >+ #define printf trace_where_, trace_printf >+ >+ /* >+ * jiggery-pokery for bison >+ * >+- * Replace all calls to fprintf with a call to yydebugger. Ignore >+- * the first argument, it will be "stderr". The trace_where_ is >+- * needed to set the location, and is safe, because bison only >+- * invokes the printf with an if (be careful, the fprintf is not in >+- * a compound statement). >++ * Replace all calls to fprintf with a call to yydebugger. Ignore >++ * the first argument, it will be "stderr". The trace_where_ is >++ * needed to set the location, and is safe, because bison only >++ * invokes the printf with an if (be careful, the fprintf is not in >++ * a compound statement). >+ */ >+ #define fprintf trace_where_, yydebugger >+ >+ static void >+ yydebugger(void *, const char *fmt, ...) >+ { >+- va_list ap; >+- string_ty *s; >++ va_list ap; >++ string_ty *s; >+ >+- va_start(ap, fmt); >+- s = str_vformat(fmt, ap); >+- va_end(ap); >+- trace_printf("%s", s->str_text); >+- str_free(s); >++ va_start(ap, fmt); >++ s = str_vformat(fmt, ap); >++ va_end(ap); >++ trace_printf("%s", s->str_text); >++ str_free(s); >+ } >+ >+ #endif >+@@ -170,138 +172,139 @@ >+ %% >+ >+ grammar: >+- nplurals SEMI plural >+- ; >++ nplurals SEMI plural >++ ; >+ >+ nplurals >+- : NPLURALS EQU INTEGER >+- { >+- nplurals = $3; >+- } >+- ; >++ : NPLURALS EQU INTEGER >++ { >++ nplurals = $3; >++ } >++ ; >+ >+ plural >+- : PLURAL EQU expr >+- { >+- plural = $3; >+- } >+- ; >++ : PLURAL EQU expr >++ { >++ plural = $3; >++ } >++ ; >+ >+ expr >+- : LP expr RP >+- { >+- $$ = $2; >+- trace(("$$ = %u;\n", $$)); >+- } >+- | NUMBER >+- { >+- $$ = number; >+- trace(("$$ = %u;\n", $$)); >+- } >+- | INTEGER >+- { >+- $$ = $1; >+- trace(("$$ = %u;\n", $$)); >+- } >+- | MINUS expr >+- %prec UNARY >+- { >+- $$ = -$2; >+- trace(("$$ = %u;\n", $$)); >+- } >+- | expr PLUS expr >+- { >+- $$ = $1 + $3; >+- trace(("$$ = %u;\n", $$)); >+- } >+- | expr MINUS expr >+- { >+- $$ = $1 - $3; >+- trace(("$$ = %u;\n", $$)); >+- } >+- | expr MUL expr >+- { >+- $$ = $1 * $3; >+- trace(("$$ = %u;\n", $$)); >+- } >+- | expr DIV expr >+- { >+- $$ = $3 ? $1 / $3 : 0; >+- trace(("$$ = %u;\n", $$)); >+- } >+- | expr MOD expr >+- { >+- $$ = $3 ? $1 % $3 : 0; >+- trace(("$$ = %u;\n", $$)); >+- } >+- | expr EQ expr >+- { >+- $$ = ($1 == $3); >+- trace(("$$ = %u;\n", $$)); >+- } >+- | expr NE expr >+- { >+- $$ = ($1 != $3); >+- trace(("$$ = %u;\n", $$)); >+- } >+- | expr LT expr >+- { >+- $$ = ($1 < $3); >+- trace(("$$ = %u;\n", $$)); >+- } >+- | expr LE expr >+- { >+- $$ = ($1 <= $3); >+- trace(("$$ = %u;\n", $$)); >+- } >+- | expr GT expr >+- { >+- $$ = ($1 > $3); >+- trace(("$$ = %u;\n", $$)); >+- } >+- | expr GE expr >+- { >+- $$ = ($1 >= $3); >+- trace(("$$ = %u;\n", $$)); >+- } >+- | NOT expr >+- { >+- $$ = (!$2); >+- trace(("$$ = %u;\n", $$)); >+- } >+- | BITNOT expr >+- { >+- $$ = ~$2; >+- trace(("$$ = %u;\n", $$)); >+- } >+- | expr ANDAND expr >+- { >+- $$ = $1 && $3; >+- trace(("$$ = %u;\n", $$)); >+- } >+- | expr BITAND expr >+- { >+- $$ = $1 & $3; >+- trace(("$$ = %u;\n", $$)); >+- } >+- | expr OROR expr >+- { >+- $$ = $1 || $3; >+- trace(("$$ = %u;\n", $$)); >+- } >+- | expr BITOR expr >+- { >+- $$ = $1 | $3; >+- trace(("$$ = %u;\n", $$)); >+- } >+- | expr BITXOR expr >+- { >+- $$ = $1 ^ $3; >+- trace(("$$ = %u;\n", $$)); >+- } >+- | expr QUEST expr COLON expr >+- { >+- $$ = $1 ? $3 : $5; >+- trace(("$$ = %u;\n", $$)); >+- } >+- ; >++ : LP expr RP >++ { >++ $$ = $2; >++ trace(("$$ = %u;\n", $$)); >++ } >++ | NUMBER >++ { >++ $$ = number; >++ trace(("$$ = %u;\n", $$)); >++ } >++ | INTEGER >++ { >++ $$ = $1; >++ trace(("$$ = %u;\n", $$)); >++ } >++ | MINUS expr >++ %prec UNARY >++ { >++ $$ = -$2; >++ trace(("$$ = %u;\n", $$)); >++ } >++ | expr PLUS expr >++ { >++ $$ = $1 + $3; >++ trace(("$$ = %u;\n", $$)); >++ } >++ | expr MINUS expr >++ { >++ $$ = $1 - $3; >++ trace(("$$ = %u;\n", $$)); >++ } >++ | expr MUL expr >++ { >++ $$ = $1 * $3; >++ trace(("$$ = %u;\n", $$)); >++ } >++ | expr DIV expr >++ { >++ $$ = $3 ? $1 / $3 : 0; >++ trace(("$$ = %u;\n", $$)); >++ } >++ | expr MOD expr >++ { >++ $$ = $3 ? $1 % $3 : 0; >++ trace(("$$ = %u;\n", $$)); >++ } >++ | expr EQ expr >++ { >++ $$ = ($1 == $3); >++ trace(("$$ = %u;\n", $$)); >++ } >++ | expr NE expr >++ { >++ $$ = ($1 != $3); >++ trace(("$$ = %u;\n", $$)); >++ } >++ | expr LT expr >++ { >++ $$ = ($1 < $3); >++ trace(("$$ = %u;\n", $$)); >++ } >++ | expr LE expr >++ { >++ $$ = ($1 <= $3); >++ trace(("$$ = %u;\n", $$)); >++ } >++ | expr GT expr >++ { >++ $$ = ($1 > $3); >++ trace(("$$ = %u;\n", $$)); >++ } >++ | expr GE expr >++ { >++ $$ = ($1 >= $3); >++ trace(("$$ = %u;\n", $$)); >++ } >++ | NOT expr >++ { >++ $$ = (!$2); >++ trace(("$$ = %u;\n", $$)); >++ } >++ | BITNOT expr >++ { >++ $$ = ~$2; >++ trace(("$$ = %u;\n", $$)); >++ } >++ | expr ANDAND expr >++ { >++ $$ = $1 && $3; >++ trace(("$$ = %u;\n", $$)); >++ } >++ | expr BITAND expr >++ { >++ $$ = $1 & $3; >++ trace(("$$ = %u;\n", $$)); >++ } >++ | expr OROR expr >++ { >++ $$ = $1 || $3; >++ trace(("$$ = %u;\n", $$)); >++ } >++ | expr BITOR expr >++ { >++ $$ = $1 | $3; >++ trace(("$$ = %u;\n", $$)); >++ } >++ | expr BITXOR expr >++ { >++ $$ = $1 ^ $3; >++ trace(("$$ = %u;\n", $$)); >++ } >++ | expr QUEST expr COLON expr >++ { >++ $$ = $1 ? $3 : $5; >++ trace(("$$ = %u;\n", $$)); >++ } >++ ; >++// vim: set ts=8 sw=4 et : > >Property changes on: files/patch-libaegis_sub_plural_gram_y >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
aryeh.friedman:
maintainer-approval+
Actions:
View
|
Diff
Attachments on
bug 247363
:
215680
| 215692