/[bison]/bison/intl/plural.c
ViewVC logotype

Diff of /bison/intl/plural.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by akim, Sat Jul 14 17:27:59 2001 UTC revision 1.1.2.1 by akim, Thu Sep 27 14:06:38 2001 UTC
# Line 23  Line 23 
23     Copyright (C) 2000, 2001 Free Software Foundation, Inc.     Copyright (C) 2000, 2001 Free Software Foundation, Inc.
24     Written by Ulrich Drepper <drepper@cygnus.com>, 2000.     Written by Ulrich Drepper <drepper@cygnus.com>, 2000.
25    
26     This program is free software; you can redistribute it and/or modify     This program is free software; you can redistribute it and/or modify it
27     it under the terms of the GNU General Public License as published by     under the terms of the GNU Library General Public License as published
28     the Free Software Foundation; either version 2, or (at your option)     by the Free Software Foundation; either version 2, or (at your option)
29     any later version.     any later version.
30    
31     This program is distributed in the hope that it will be useful,     This program is distributed in the hope that it will be useful,
32     but WITHOUT ANY WARRANTY; without even the implied warranty of     but WITHOUT ANY WARRANTY; without even the implied warranty of
33     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
34     GNU General Public License for more details.     Library General Public License for more details.
35    
36     You should have received a copy of the GNU General Public License     You should have received a copy of the GNU Library General Public
37     along with this program; if not, write to the Free Software Foundation,     License along with this program; if not, write to the Free Software
38     Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */     Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
39       USA.  */
40    
41  /* The bison generated parser uses alloca.  AIX 3 forces us to put this  /* The bison generated parser uses alloca.  AIX 3 forces us to put this
42     declaration at the beginning of the file.  The declaration in bison's     declaration at the beginning of the file.  The declaration in bison's
# Line 66  Line 67 
67  #define YYLEX_PARAM     &((struct parse_args *) arg)->cp  #define YYLEX_PARAM     &((struct parse_args *) arg)->cp
68  #define YYPARSE_PARAM   arg  #define YYPARSE_PARAM   arg
69    
70  #line 52 "plural.y"  #line 53 "plural.y"
71  typedef union {  typedef union {
72    unsigned long int num;    unsigned long int num;
73    enum operator op;    enum operator op;
74    struct expression *exp;    struct expression *exp;
75  } YYSTYPE;  } YYSTYPE;
76  #line 58 "plural.y"  #line 59 "plural.y"
77    
78  /* Prototypes for local functions.  */  /* Prototypes for local functions.  */
79  static struct expression *new_exp PARAMS ((int nargs, enum operator op,  static struct expression *new_exp PARAMS ((int nargs, enum operator op,
# Line 234  static const short yyrhs[] = {    17, Line 235  static const short yyrhs[] = {    17,
235    
236  #if YYDEBUG != 0  #if YYDEBUG != 0
237  static const short yyrline[] = { 0,  static const short yyrline[] = { 0,
238     177,   185,   189,   193,   197,   201,   205,   209,   213,   217,     178,   186,   190,   194,   198,   202,   206,   210,   214,   218,
239     221,   226     222,   227
240  };  };
241  #endif  #endif
242    
# Line 845  yyreduce: Line 846  yyreduce:
846    switch (yyn) {    switch (yyn) {
847    
848  case 1:  case 1:
849  #line 178 "plural.y"  #line 179 "plural.y"
850  {  {
851              if (yyvsp[0].exp == NULL)              if (yyvsp[0].exp == NULL)
852                YYABORT;                YYABORT;
# Line 853  case 1: Line 854  case 1:
854            ;            ;
855      break;}      break;}
856  case 2:  case 2:
857  #line 186 "plural.y"  #line 187 "plural.y"
858  {  {
859              yyval.exp = new_exp_3 (qmop, yyvsp[-4].exp, yyvsp[-2].exp, yyvsp[0].exp);              yyval.exp = new_exp_3 (qmop, yyvsp[-4].exp, yyvsp[-2].exp, yyvsp[0].exp);
860            ;            ;
861      break;}      break;}
862  case 3:  case 3:
863  #line 190 "plural.y"  #line 191 "plural.y"
864  {  {
865              yyval.exp = new_exp_2 (lor, yyvsp[-2].exp, yyvsp[0].exp);              yyval.exp = new_exp_2 (lor, yyvsp[-2].exp, yyvsp[0].exp);
866            ;            ;
867      break;}      break;}
868  case 4:  case 4:
869  #line 194 "plural.y"  #line 195 "plural.y"
870  {  {
871              yyval.exp = new_exp_2 (land, yyvsp[-2].exp, yyvsp[0].exp);              yyval.exp = new_exp_2 (land, yyvsp[-2].exp, yyvsp[0].exp);
872            ;            ;
873      break;}      break;}
874  case 5:  case 5:
875  #line 198 "plural.y"  #line 199 "plural.y"
876  {  {
877              yyval.exp = new_exp_2 (yyvsp[-1].op, yyvsp[-2].exp, yyvsp[0].exp);              yyval.exp = new_exp_2 (yyvsp[-1].op, yyvsp[-2].exp, yyvsp[0].exp);
878            ;            ;
879      break;}      break;}
880  case 6:  case 6:
881  #line 202 "plural.y"  #line 203 "plural.y"
882  {  {
883              yyval.exp = new_exp_2 (yyvsp[-1].op, yyvsp[-2].exp, yyvsp[0].exp);              yyval.exp = new_exp_2 (yyvsp[-1].op, yyvsp[-2].exp, yyvsp[0].exp);
884            ;            ;
885      break;}      break;}
886  case 7:  case 7:
887  #line 206 "plural.y"  #line 207 "plural.y"
888  {  {
889              yyval.exp = new_exp_2 (yyvsp[-1].op, yyvsp[-2].exp, yyvsp[0].exp);              yyval.exp = new_exp_2 (yyvsp[-1].op, yyvsp[-2].exp, yyvsp[0].exp);
890            ;            ;
891      break;}      break;}
892  case 8:  case 8:
893  #line 210 "plural.y"  #line 211 "plural.y"
894  {  {
895              yyval.exp = new_exp_2 (yyvsp[-1].op, yyvsp[-2].exp, yyvsp[0].exp);              yyval.exp = new_exp_2 (yyvsp[-1].op, yyvsp[-2].exp, yyvsp[0].exp);
896            ;            ;
897      break;}      break;}
898  case 9:  case 9:
899  #line 214 "plural.y"  #line 215 "plural.y"
900  {  {
901              yyval.exp = new_exp_1 (lnot, yyvsp[0].exp);              yyval.exp = new_exp_1 (lnot, yyvsp[0].exp);
902            ;            ;
903      break;}      break;}
904  case 10:  case 10:
905  #line 218 "plural.y"  #line 219 "plural.y"
906  {  {
907              yyval.exp = new_exp_0 (var);              yyval.exp = new_exp_0 (var);
908            ;            ;
909      break;}      break;}
910  case 11:  case 11:
911  #line 222 "plural.y"  #line 223 "plural.y"
912  {  {
913              if ((yyval.exp = new_exp_0 (num)) != NULL)              if ((yyval.exp = new_exp_0 (num)) != NULL)
914                yyval.exp->val.num = yyvsp[0].num;                yyval.exp->val.num = yyvsp[0].num;
915            ;            ;
916      break;}      break;}
917  case 12:  case 12:
918  #line 227 "plural.y"  #line 228 "plural.y"
919  {  {
920              yyval.exp = yyvsp[-1].exp;              yyval.exp = yyvsp[-1].exp;
921            ;            ;
# Line 1141  yyerrhandle: Line 1142  yyerrhandle:
1142      }      }
1143    return 1;    return 1;
1144  }  }
1145  #line 232 "plural.y"  #line 233 "plural.y"
1146    
1147    
1148  void  void

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.1.2.1

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26