+2014-04-23 Daiki Ueno <ueno@gnu.org>
+
+ intl: Port to Bison 3.0
+ * plural.y: Don't use removed YYLEX_PARAM and YYPARSE_PARAM
+ macros; replace deprecated %pure_parser with '%define api.pure
+ full'; adjust yylex/yyerror arglist.
+ * plural-exp.h (PLURAL_PARSE): Use explicit type 'struct
+ parse_args *arg' for ARG.
+
2013-05-07 Carlos O'Donell <carlos@redhat.com>
Jeff Law <law@redhat.com>
extern void FREE_EXPRESSION (struct expression *exp)
internal_function;
-extern int PLURAL_PARSE (void *arg);
+extern int PLURAL_PARSE (struct parse_args *arg);
extern struct expression GERMANIC_PLURAL attribute_hidden;
extern void EXTRACT_PLURAL_EXPRESSION (const char *nullentry,
const struct expression **pluralp,
# define __gettextparse PLURAL_PARSE
#endif
-#define YYLEX_PARAM &((struct parse_args *) arg)->cp
-#define YYPARSE_PARAM arg
%}
-%pure_parser
+%param {struct parse_args *arg}
+%define api.pure full
%expect 7
%union {
%{
/* 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. */
{
if ($1 == NULL)
YYABORT;
- ((struct parse_args *) arg)->res = $1;
+ arg->res = $1;
}
;
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;
}
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. */
}