~ubuntu-branches/ubuntu/maverick/texinfo/maverick

« back to all changes in this revision

Viewing changes to intl/plural.y

  • Committer: Bazaar Package Importer
  • Author(s): Norbert Preining
  • Date: 2005-10-28 15:10:30 UTC
  • mto: (2.1.1 dapper) (3.1.4 hardy)
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20051028151030-9nsf2s2k2z3fktjt
Tags: upstream-4.8
ImportĀ upstreamĀ versionĀ 4.8

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
%{
2
2
/* Expression parsing for plural form selection.
3
 
   Copyright (C) 2000, 2001 Free Software Foundation, Inc.
 
3
   Copyright (C) 2000-2001, 2003 Free Software Foundation, Inc.
4
4
   Written by Ulrich Drepper <drepper@cygnus.com>, 2000.
5
5
 
6
6
   This program is free software; you can redistribute it and/or modify it
54
54
 
55
55
%{
56
56
/* Prototypes for local functions.  */
57
 
static struct expression *new_exp PARAMS ((int nargs, enum operator op,
58
 
                                           struct expression * const *args));
59
 
static inline struct expression *new_exp_0 PARAMS ((enum operator op));
60
 
static inline struct expression *new_exp_1 PARAMS ((enum operator op,
61
 
                                                   struct expression *right));
62
 
static struct expression *new_exp_2 PARAMS ((enum operator op,
63
 
                                             struct expression *left,
64
 
                                             struct expression *right));
65
 
static inline struct expression *new_exp_3 PARAMS ((enum operator op,
66
 
                                                   struct expression *bexp,
67
 
                                                   struct expression *tbranch,
68
 
                                                   struct expression *fbranch));
69
 
static int yylex PARAMS ((YYSTYPE *lval, const char **pexp));
70
 
static void yyerror PARAMS ((const char *str));
 
57
static int yylex (YYSTYPE *lval, const char **pexp);
 
58
static void yyerror (const char *str);
71
59
 
72
60
/* Allocation of expressions.  */
73
61
 
74
62
static struct expression *
75
 
new_exp (nargs, op, args)
76
 
     int nargs;
77
 
     enum operator op;
78
 
     struct expression * const *args;
 
63
new_exp (int nargs, enum operator op, struct expression * const *args)
79
64
{
80
65
  int i;
81
66
  struct expression *newp;
104
89
}
105
90
 
106
91
static inline struct expression *
107
 
new_exp_0 (op)
108
 
     enum operator op;
 
92
new_exp_0 (enum operator op)
109
93
{
110
94
  return new_exp (0, op, NULL);
111
95
}
112
96
 
113
97
static inline struct expression *
114
 
new_exp_1 (op, right)
115
 
     enum operator op;
116
 
     struct expression *right;
 
98
new_exp_1 (enum operator op, struct expression *right)
117
99
{
118
100
  struct expression *args[1];
119
101
 
122
104
}
123
105
 
124
106
static struct expression *
125
 
new_exp_2 (op, left, right)
126
 
     enum operator op;
127
 
     struct expression *left;
128
 
     struct expression *right;
 
107
new_exp_2 (enum operator op, struct expression *left, struct expression *right)
129
108
{
130
109
  struct expression *args[2];
131
110
 
135
114
}
136
115
 
137
116
static inline struct expression *
138
 
new_exp_3 (op, bexp, tbranch, fbranch)
139
 
     enum operator op;
140
 
     struct expression *bexp;
141
 
     struct expression *tbranch;
142
 
     struct expression *fbranch;
 
117
new_exp_3 (enum operator op, struct expression *bexp,
 
118
           struct expression *tbranch, struct expression *fbranch)
143
119
{
144
120
  struct expression *args[3];
145
121
 
230
206
 
231
207
void
232
208
internal_function
233
 
FREE_EXPRESSION (exp)
234
 
     struct expression *exp;
 
209
FREE_EXPRESSION (struct expression *exp)
235
210
{
236
211
  if (exp == NULL)
237
212
    return;
257
232
 
258
233
 
259
234
static int
260
 
yylex (lval, pexp)
261
 
     YYSTYPE *lval;
262
 
     const char **pexp;
 
235
yylex (YYSTYPE *lval, const char **pexp)
263
236
{
264
237
  const char *exp = *pexp;
265
238
  int result;
402
375
 
403
376
 
404
377
static void
405
 
yyerror (str)
406
 
     const char *str;
 
378
yyerror (const char *str)
407
379
{
408
380
  /* Do nothing.  We don't print error messages here.  */
409
381
}