diff options
Diffstat (limited to 'intl/plural.y')
-rw-r--r-- | intl/plural.y | 40 |
1 files changed, 19 insertions, 21 deletions
diff --git a/intl/plural.y b/intl/plural.y index ec36a09b8..c19634efd 100644 --- a/intl/plural.y +++ b/intl/plural.y @@ -3,20 +3,18 @@ Copyright (C) 2000-2001, 2003, 2005-2006 Free Software Foundation, Inc. Written by Ulrich Drepper <[email protected]>, 2000. - This program is free software; you can redistribute it and/or modify it - under the terms of the GNU Library General Public License as published - by the Free Software Foundation; either version 2, 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 Lesser General Public License as published by + the Free Software Foundation; either version 2.1 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 - Library General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, - USA. */ + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. */ /* For bison < 2.0, the bison generated parser uses alloca. AIX 3 forces us to put this declaration at the beginning of the file. The declaration in @@ -42,10 +40,10 @@ # define __gettextparse PLURAL_PARSE #endif -#define YYLEX_PARAM &((struct parse_args *) arg)->cp -#define YYPARSE_PARAM arg %} -%pure_parser +%parse-param {struct parse_args *arg} +%lex-param {struct parse_args *arg} +%define api.pure full %expect 7 %union { @@ -56,8 +54,8 @@ %{ /* Prototypes for local functions. */ -static int yylex (YYSTYPE *lval, const char **pexp); -static void yyerror (const char *str); +static int yylex (YYSTYPE *lval, struct parse_args *arg); +static void yyerror (struct parse_args *arg, const char *str); /* Allocation of expressions. */ @@ -155,7 +153,7 @@ start: exp { if ($1 == NULL) YYABORT; - ((struct parse_args *) arg)->res = $1; + arg->res = $1; } ; @@ -236,16 +234,16 @@ FREE_EXPRESSION (struct expression *exp) static int -yylex (YYSTYPE *lval, const char **pexp) +yylex (YYSTYPE *lval, struct parse_args *arg) { - const char *exp = *pexp; + const char *exp = arg->cp; int result; while (1) { if (exp[0] == '\0') { - *pexp = exp; + arg->cp = exp; return YYEOF; } @@ -372,14 +370,14 @@ yylex (YYSTYPE *lval, const char **pexp) break; } - *pexp = exp; + arg->cp = exp; return result; } static void -yyerror (const char *str) +yyerror (struct parse_args *arg, const char *str) { /* Do nothing. We don't print error messages here. */ } |