2 /* A Bison parser, made from /windows/build/xemacs/xemacs/netinstall/iniparse.y
3 by GNU Bison version 1.28 */
5 #define YYBISON 1 /* Identify Bison output. */
8 #define SETUP_TIMESTAMP 258
9 #define SETUP_VERSION 259
21 #line 1 "/windows/build/xemacs/xemacs/netinstall/iniparse.y"
24 * Copyright (c) 2000, Red Hat, Inc.
26 * This program is free software; you can redistribute it and/or modify
27 * it under the terms of the GNU General Public License as published by
28 * the Free Software Foundation; either version 2 of the License, or
29 * (at your option) any later version.
31 * A copy of the GNU General Public License can be found at
34 * Written by DJ Delorie <dj@cygnus.com>
38 /* Parse the setup.ini files. inilex.l provides the tokens for this. */
50 #define YYERROR_VERBOSE 1
55 extern unsigned int setup_timestamp;
56 extern char *setup_version;
58 extern int CDECL yyerror (char *s, ...);
60 #define cpt (cp->info+trust)
79 #define YYTRANSLATE(x) ((unsigned)(x) <= 269 ? yytranslate[x] : 27)
81 static const char yytranslate[] = { 0,
82 2, 2, 2, 2, 2, 2, 2, 2, 2, 16,
83 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
84 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
85 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
86 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
87 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
88 2, 2, 2, 17, 2, 2, 2, 2, 2, 2,
89 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
90 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
91 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
92 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
93 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
94 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
95 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
96 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
97 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
98 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
99 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
100 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
101 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
102 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
103 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
104 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
105 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
106 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
107 2, 2, 2, 2, 2, 1, 3, 4, 5, 6,
108 7, 8, 9, 10, 11, 12, 13, 14, 15
112 static const short yyprhs[] = { 0,
113 0, 3, 6, 7, 11, 15, 17, 18, 22, 25,
114 26, 27, 33, 37, 39, 42, 45, 48, 52, 56,
115 59, 61, 63, 65, 67, 68
118 static const short yyrhs[] = { 19,
119 22, 0, 20, 19, 0, 0, 4, 3, 16, 0,
120 5, 3, 16, 0, 16, 0, 0, 1, 21, 16,
121 0, 23, 22, 0, 0, 0, 17, 3, 16, 24,
122 25, 0, 26, 16, 25, 0, 26, 0, 6, 3,
123 0, 9, 3, 0, 10, 3, 0, 7, 3, 3,
124 0, 8, 3, 3, 0, 11, 3, 0, 12, 0,
125 13, 0, 14, 0, 15, 0, 0, 1, 16, 0
131 static const short yyrline[] = { 0,
132 50, 54, 55, 59, 60, 61, 62, 63, 66, 67,
133 71, 73, 76, 77, 81, 82, 83, 84, 86, 88,
134 94, 95, 96, 97, 98, 99
139 #if YYDEBUG != 0 || defined (YYERROR_VERBOSE)
141 static const char * const yytname[] = { "$","error","$undefined.","STRING",
142 "SETUP_TIMESTAMP","SETUP_VERSION","VERSION","INSTALL","SOURCE","SDESC","LDESC",
143 "TYPE","T_PREV","T_CURR","T_TEST","T_UNKNOWN","'\\n'","'@'","whole_file","setup_headers",
144 "setup_header","@1","packages","package","@2","lines","simple_line", NULL
148 static const short yyr1[] = { 0,
149 18, 19, 19, 20, 20, 20, 21, 20, 22, 22,
150 24, 23, 25, 25, 26, 26, 26, 26, 26, 26,
151 26, 26, 26, 26, 26, 26
154 static const short yyr2[] = { 0,
155 2, 2, 0, 3, 3, 1, 0, 3, 2, 0,
156 0, 5, 3, 1, 2, 2, 2, 3, 3, 2,
160 static const short yydefact[] = { 0,
161 7, 0, 0, 6, 10, 0, 0, 0, 0, 0,
162 1, 10, 2, 8, 4, 5, 0, 9, 11, 0,
163 0, 0, 0, 0, 0, 0, 0, 21, 22, 23,
164 24, 12, 14, 26, 15, 0, 0, 16, 17, 20,
165 0, 18, 19, 13, 0, 0, 0
168 static const short yydefgoto[] = { 45,
169 5, 6, 7, 11, 12, 20, 32, 33
172 static const short yypact[] = { 18,
173 -32768, -1, 1,-32768, -14, 18, -11, 4, 5, 21,
174 -32768, -14,-32768,-32768,-32768,-32768, 9,-32768,-32768, 0,
175 10, 24, 25, 26, 27, 28, 29,-32768,-32768,-32768,
176 -32768,-32768, 17,-32768,-32768, 33, 34,-32768,-32768,-32768,
177 0,-32768,-32768,-32768, 38, 39,-32768
180 static const short yypgoto[] = {-32768,
181 35,-32768,-32768, 30,-32768,-32768, 2,-32768
188 static const short yytable[] = { -25,
189 21, 8, 10, 9, 14, 22, 23, 24, 25, 26,
190 27, 28, 29, 30, 31, -25, -25, -3, 1, 15,
191 16, 2, 3, 17, 19, 34, 35, 36, 37, 38,
192 39, 40, 41, 4, -3, 42, 43, 46, 47, 0,
196 static const short yycheck[] = { 0,
197 1, 3, 17, 3, 16, 6, 7, 8, 9, 10,
198 11, 12, 13, 14, 15, 16, 17, 0, 1, 16,
199 16, 4, 5, 3, 16, 16, 3, 3, 3, 3,
200 3, 3, 16, 16, 17, 3, 3, 0, 0, -1,
203 /* -*-C-*- Note some compilers choke on comments on `#line' lines. */
204 #line 3 "/usr/share/bison.simple"
205 /* This file comes from bison-1.28. */
207 /* Skeleton output parser for bison,
208 Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc.
210 This program is free software; you can redistribute it and/or modify
211 it under the terms of the GNU General Public License as published by
212 the Free Software Foundation; either version 2, or (at your option)
215 This program is distributed in the hope that it will be useful,
216 but WITHOUT ANY WARRANTY; without even the implied warranty of
217 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
218 GNU General Public License for more details.
220 You should have received a copy of the GNU General Public License
221 along with this program; if not, write to the Free Software
222 Foundation, Inc., 59 Temple Place - Suite 330,
223 Boston, MA 02111-1307, USA. */
225 /* As a special exception, when this file is copied by Bison into a
226 Bison output file, you may use that output file without restriction.
227 This special exception was added by the Free Software Foundation
228 in version 1.24 of Bison. */
230 /* This is the parser code that is written into each bison parser
231 when the %semantic_parser declaration is not specified in the grammar.
232 It was written by Richard Stallman by simplifying the hairy parser
233 used when %semantic_parser is specified. */
235 #ifndef YYSTACK_USE_ALLOCA
237 #define YYSTACK_USE_ALLOCA
238 #else /* alloca not defined */
240 #define YYSTACK_USE_ALLOCA
241 #define alloca __builtin_alloca
242 #else /* not GNU C. */
243 #if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) || (defined (__sun) && defined (__i386))
244 #define YYSTACK_USE_ALLOCA
246 #else /* not sparc */
247 /* We think this test detects Watcom and Microsoft C. */
248 /* This used to test MSDOS, but that is a bad idea
249 since that symbol is in the user namespace. */
250 #if (defined (_MSDOS) || defined (_MSDOS_)) && !defined (__TURBOC__)
251 #if 0 /* No need for malloc.h, which pollutes the namespace;
252 instead, just don't use alloca. */
255 #else /* not MSDOS, or __TURBOC__ */
257 /* I don't know what this was needed for, but it pollutes the namespace.
258 So I turned it off. rms, 2 May 1997. */
259 /* #include <malloc.h> */
261 #define YYSTACK_USE_ALLOCA
262 #else /* not MSDOS, or __TURBOC__, or _AIX */
264 #ifdef __hpux /* haible@ilog.fr says this works for HPUX 9.05 and up,
265 and on HPUX 10. Eventually we can turn this on. */
266 #define YYSTACK_USE_ALLOCA
267 #define alloca __builtin_alloca
270 #endif /* not _AIX */
271 #endif /* not MSDOS, or __TURBOC__ */
272 #endif /* not sparc */
273 #endif /* not GNU C */
274 #endif /* alloca not defined */
275 #endif /* YYSTACK_USE_ALLOCA not defined */
277 #ifdef YYSTACK_USE_ALLOCA
278 #define YYSTACK_ALLOC alloca
280 #define YYSTACK_ALLOC malloc
283 /* Note: there must be only one dollar sign in this file.
284 It is replaced by the list of actions, each action
285 as one case of the switch. */
287 #define yyerrok (yyerrstatus = 0)
288 #define yyclearin (yychar = YYEMPTY)
291 #define YYACCEPT goto yyacceptlab
292 #define YYABORT goto yyabortlab
293 #define YYERROR goto yyerrlab1
294 /* Like YYERROR except do call yyerror.
295 This remains here temporarily to ease the
296 transition to the new meaning of YYERROR, for GCC.
297 Once GCC version 2 has supplanted version 1, this can go. */
298 #define YYFAIL goto yyerrlab
299 #define YYRECOVERING() (!!yyerrstatus)
300 #define YYBACKUP(token, value) \
302 if (yychar == YYEMPTY && yylen == 1) \
303 { yychar = (token), yylval = (value); \
304 yychar1 = YYTRANSLATE (yychar); \
309 { yyerror ("syntax error: cannot back up"); YYERROR; } \
313 #define YYERRCODE 256
316 #define YYLEX yylex()
322 #define YYLEX yylex(&yylval, &yylloc, YYLEX_PARAM)
324 #define YYLEX yylex(&yylval, &yylloc)
326 #else /* not YYLSP_NEEDED */
328 #define YYLEX yylex(&yylval, YYLEX_PARAM)
330 #define YYLEX yylex(&yylval)
332 #endif /* not YYLSP_NEEDED */
335 /* If nonreentrant, generate the variables here */
339 int yychar; /* the lookahead symbol */
340 YYSTYPE yylval; /* the semantic value of the */
341 /* lookahead symbol */
344 YYLTYPE yylloc; /* location data for the lookahead */
348 int yynerrs; /* number of parse errors so far */
349 #endif /* not YYPURE */
352 int yydebug; /* nonzero means print parse trace */
353 /* Since this is uninitialized, it does not stop multiple parsers
357 /* YYINITDEPTH indicates the initial size of the parser's stacks */
360 #define YYINITDEPTH 200
363 /* YYMAXDEPTH is the maximum size the stacks can grow to
364 (effective only if the built-in stack extension method is used). */
371 #define YYMAXDEPTH 10000
374 /* Define __yy_memcpy. Note that the size argument
375 should be passed with type unsigned int, because that is what the non-GCC
376 definitions require. With GCC, __builtin_memcpy takes an arg
377 of type size_t, but it can handle unsigned int. */
379 #if __GNUC__ > 1 /* GNU C and GNU C++ define this. */
380 #define __yy_memcpy(TO,FROM,COUNT) __builtin_memcpy(TO,FROM,COUNT)
381 #else /* not GNU C or C++ */
384 /* This is the most reliable way to avoid incompatibilities
385 in available built-in functions on various systems. */
387 __yy_memcpy (to, from, count)
392 register char *f = from;
393 register char *t = to;
394 register int i = count;
400 #else /* __cplusplus */
402 /* This is the most reliable way to avoid incompatibilities
403 in available built-in functions on various systems. */
405 __yy_memcpy (char *to, char *from, unsigned int count)
407 register char *t = to;
408 register char *f = from;
409 register int i = count;
418 #line 217 "/usr/share/bison.simple"
420 /* The user can define YYPARSE_PARAM as the name of an argument to be passed
421 into yyparse. The argument should have type void *.
422 It should actually point to an object.
423 Grammar actions can access the variable by casting it
424 to the proper pointer type. */
428 #define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
429 #define YYPARSE_PARAM_DECL
430 #else /* not __cplusplus */
431 #define YYPARSE_PARAM_ARG YYPARSE_PARAM
432 #define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
433 #endif /* not __cplusplus */
434 #else /* not YYPARSE_PARAM */
435 #define YYPARSE_PARAM_ARG
436 #define YYPARSE_PARAM_DECL
437 #endif /* not YYPARSE_PARAM */
439 /* Prevent warning if -Wstrict-prototypes. */
442 int yyparse (void *);
449 yyparse(YYPARSE_PARAM_ARG)
452 register int yystate;
454 register short *yyssp;
455 register YYSTYPE *yyvsp;
456 int yyerrstatus; /* number of tokens to shift before error messages enabled */
457 int yychar1 = 0; /* lookahead token as an internal (translated) token number */
459 short yyssa[YYINITDEPTH]; /* the state stack */
460 YYSTYPE yyvsa[YYINITDEPTH]; /* the semantic value stack */
462 short *yyss = yyssa; /* refer to the stacks thru separate pointers */
463 YYSTYPE *yyvs = yyvsa; /* to allow yyoverflow to reallocate them elsewhere */
466 YYLTYPE yylsa[YYINITDEPTH]; /* the location stack */
467 YYLTYPE *yyls = yylsa;
470 #define YYPOPSTACK (yyvsp--, yyssp--, yylsp--)
472 #define YYPOPSTACK (yyvsp--, yyssp--)
475 int yystacksize = YYINITDEPTH;
476 int yyfree_stacks = 0;
487 YYSTYPE yyval; /* the variable used to return */
488 /* semantic values from the action */
495 fprintf(stderr, "Starting parse\n");
501 yychar = YYEMPTY; /* Cause a token to be read. */
503 /* Initialize stack pointers.
504 Waste one element of value and location stack
505 so that they stay on the same level as the state stack.
506 The wasted elements are never initialized. */
514 /* Push a new state, which is found in yystate . */
515 /* In all cases, when you get here, the value and location stacks
516 have just been pushed. so pushing a state here evens the stacks. */
521 if (yyssp >= yyss + yystacksize - 1)
523 /* Give user a chance to reallocate the stack */
524 /* Use copies of these so that the &'s don't force the real ones into memory. */
525 YYSTYPE *yyvs1 = yyvs;
528 YYLTYPE *yyls1 = yyls;
531 /* Get the current used size of the three stacks, in elements. */
532 int size = yyssp - yyss + 1;
535 /* Each stack pointer address is followed by the size of
536 the data in use in that stack, in bytes. */
538 /* This used to be a conditional around just the two extra args,
539 but that might be undefined if yyoverflow is a macro. */
540 yyoverflow("parser stack overflow",
541 &yyss1, size * sizeof (*yyssp),
542 &yyvs1, size * sizeof (*yyvsp),
543 &yyls1, size * sizeof (*yylsp),
546 yyoverflow("parser stack overflow",
547 &yyss1, size * sizeof (*yyssp),
548 &yyvs1, size * sizeof (*yyvsp),
552 yyss = yyss1; yyvs = yyvs1;
556 #else /* no yyoverflow */
557 /* Extend the stack our own way. */
558 if (yystacksize >= YYMAXDEPTH)
560 yyerror("parser stack overflow");
572 if (yystacksize > YYMAXDEPTH)
573 yystacksize = YYMAXDEPTH;
574 #ifndef YYSTACK_USE_ALLOCA
577 yyss = (short *) YYSTACK_ALLOC (yystacksize * sizeof (*yyssp));
578 __yy_memcpy ((char *)yyss, (char *)yyss1,
579 size * (unsigned int) sizeof (*yyssp));
580 yyvs = (YYSTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yyvsp));
581 __yy_memcpy ((char *)yyvs, (char *)yyvs1,
582 size * (unsigned int) sizeof (*yyvsp));
584 yyls = (YYLTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yylsp));
585 __yy_memcpy ((char *)yyls, (char *)yyls1,
586 size * (unsigned int) sizeof (*yylsp));
588 #endif /* no yyoverflow */
590 yyssp = yyss + size - 1;
591 yyvsp = yyvs + size - 1;
593 yylsp = yyls + size - 1;
598 fprintf(stderr, "Stack size increased to %d\n", yystacksize);
601 if (yyssp >= yyss + yystacksize - 1)
607 fprintf(stderr, "Entering state %d\n", yystate);
613 /* Do appropriate processing given the current state. */
614 /* Read a lookahead token if we need one and don't already have one. */
617 /* First try to decide what to do without reference to lookahead token. */
619 yyn = yypact[yystate];
623 /* Not known => get a lookahead token if don't already have one. */
625 /* yychar is either YYEMPTY or YYEOF
626 or a valid token in external form. */
628 if (yychar == YYEMPTY)
632 fprintf(stderr, "Reading a token: ");
637 /* Convert token to internal form (in yychar1) for indexing tables with */
639 if (yychar <= 0) /* This means end of input. */
642 yychar = YYEOF; /* Don't call YYLEX any more */
646 fprintf(stderr, "Now at end of input.\n");
651 yychar1 = YYTRANSLATE(yychar);
656 fprintf (stderr, "Next token is %d (%s", yychar, yytname[yychar1]);
657 /* Give the individual parser a way to print the precise meaning
658 of a token, for further debugging info. */
660 YYPRINT (stderr, yychar, yylval);
662 fprintf (stderr, ")\n");
668 if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
673 /* yyn is what to do for this token type in this state.
674 Negative => reduce, -yyn is rule number.
675 Positive => shift, yyn is new state.
676 New state is final state => don't bother to shift,
678 0, or most negative number => error. */
693 /* Shift the lookahead token. */
697 fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]);
700 /* Discard the token being shifted unless it is eof. */
709 /* count tokens shifted since error; after three, turn off error status. */
710 if (yyerrstatus) yyerrstatus--;
715 /* Do the default action for the current state. */
718 yyn = yydefact[yystate];
722 /* Do a reduction. yyn is the number of a rule to reduce with. */
726 yyval = yyvsp[1-yylen]; /* implement default value of the action */
733 fprintf (stderr, "Reducing via rule %d (line %d), ",
736 /* Print the symbols being reduced, and their result. */
737 for (i = yyprhs[yyn]; yyrhs[i] > 0; i++)
738 fprintf (stderr, "%s ", yytname[yyrhs[i]]);
739 fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]);
747 #line 59 "/windows/build/xemacs/xemacs/netinstall/iniparse.y"
748 { setup_timestamp = strtoul (yyvsp[-1], 0, 0); ;
751 #line 60 "/windows/build/xemacs/xemacs/netinstall/iniparse.y"
752 { setup_version = strdup (yyvsp[-1]); ;
755 #line 62 "/windows/build/xemacs/xemacs/netinstall/iniparse.y"
756 { yyerror ("unrecognized line in setup.ini headers (do you have the latest setup?)"); ;
759 #line 71 "/windows/build/xemacs/xemacs/netinstall/iniparse.y"
760 { new_package(yyvsp[-1]); ;
763 #line 81 "/windows/build/xemacs/xemacs/netinstall/iniparse.y"
764 { cpt->version = yyvsp[0]; ;
767 #line 82 "/windows/build/xemacs/xemacs/netinstall/iniparse.y"
768 { cp->sdesc = yyvsp[0]; ;
771 #line 83 "/windows/build/xemacs/xemacs/netinstall/iniparse.y"
772 { cp->ldesc = yyvsp[0]; ;
775 #line 84 "/windows/build/xemacs/xemacs/netinstall/iniparse.y"
776 { cpt->install = yyvsp[-1];
777 cpt->install_size = atoi(yyvsp[0]); ;
780 #line 86 "/windows/build/xemacs/xemacs/netinstall/iniparse.y"
781 { cpt->source = yyvsp[-1];
782 cpt->source_size = atoi(yyvsp[0]); ;
785 #line 88 "/windows/build/xemacs/xemacs/netinstall/iniparse.y"
786 { if (!strcmp (yyvsp[0], "cygwin"))
787 cp->type = TY_CYGWIN;
788 else if (!strcmp (yyvsp[0], "native"))
789 cp->type = TY_NATIVE;
791 cp->type = TY_GENERIC; ;
794 #line 94 "/windows/build/xemacs/xemacs/netinstall/iniparse.y"
795 { trust = TRUST_PREV; ;
798 #line 95 "/windows/build/xemacs/xemacs/netinstall/iniparse.y"
799 { trust = TRUST_CURR; ;
802 #line 96 "/windows/build/xemacs/xemacs/netinstall/iniparse.y"
803 { trust = TRUST_TEST; ;
806 #line 97 "/windows/build/xemacs/xemacs/netinstall/iniparse.y"
807 { trust = TRUST_UNKNOWN; ;
810 #line 99 "/windows/build/xemacs/xemacs/netinstall/iniparse.y"
812 yyerror ("unrecognized line in package %s (do you have the latest setup?)", cp->name);
817 /* the action file gets copied in in place of this dollarsign */
818 #line 543 "/usr/share/bison.simple"
829 short *ssp1 = yyss - 1;
830 fprintf (stderr, "state stack now");
831 while (ssp1 != yyssp)
832 fprintf (stderr, " %d", *++ssp1);
833 fprintf (stderr, "\n");
843 yylsp->first_line = yylloc.first_line;
844 yylsp->first_column = yylloc.first_column;
845 yylsp->last_line = (yylsp-1)->last_line;
846 yylsp->last_column = (yylsp-1)->last_column;
851 yylsp->last_line = (yylsp+yylen-1)->last_line;
852 yylsp->last_column = (yylsp+yylen-1)->last_column;
856 /* Now "shift" the result of the reduction.
857 Determine what state that goes to,
858 based on the state we popped back to
859 and the rule number reduced by. */
863 yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
864 if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
865 yystate = yytable[yystate];
867 yystate = yydefgoto[yyn - YYNTBASE];
871 yyerrlab: /* here on detecting error */
874 /* If not already recovering from an error, report this error. */
878 #ifdef YYERROR_VERBOSE
879 yyn = yypact[yystate];
881 if (yyn > YYFLAG && yyn < YYLAST)
888 /* Start X at -yyn if nec to avoid negative indexes in yycheck. */
889 for (x = (yyn < 0 ? -yyn : 0);
890 x < (sizeof(yytname) / sizeof(char *)); x++)
891 if (yycheck[x + yyn] == x)
892 size += strlen(yytname[x]) + 15, count++;
893 msg = (char *) malloc(size + 15);
896 strcpy(msg, "parse error");
901 for (x = (yyn < 0 ? -yyn : 0);
902 x < (sizeof(yytname) / sizeof(char *)); x++)
903 if (yycheck[x + yyn] == x)
905 strcat(msg, count == 0 ? ", expecting `" : " or `");
906 strcat(msg, yytname[x]);
915 yyerror ("parse error; also virtual memory exceeded");
918 #endif /* YYERROR_VERBOSE */
919 yyerror("parse error");
923 yyerrlab1: /* here on error raised explicitly by an action */
925 if (yyerrstatus == 3)
927 /* if just tried and failed to reuse lookahead token after an error, discard it. */
929 /* return failure if at end of input */
935 fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]);
941 /* Else will try to reuse lookahead token
942 after shifting the error token. */
944 yyerrstatus = 3; /* Each real token shifted decrements this */
948 yyerrdefault: /* current state does not do anything special for the error token. */
951 /* This is wrong; only states that explicitly want error tokens
952 should shift them. */
953 yyn = yydefact[yystate]; /* If its default is to accept any token, ok. Otherwise pop it.*/
954 if (yyn) goto yydefault;
957 yyerrpop: /* pop the current state because it cannot handle the error token */
959 if (yyssp == yyss) YYABORT;
969 short *ssp1 = yyss - 1;
970 fprintf (stderr, "Error: state stack now");
971 while (ssp1 != yyssp)
972 fprintf (stderr, " %d", *++ssp1);
973 fprintf (stderr, "\n");
979 yyn = yypact[yystate];
984 if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
1003 fprintf(stderr, "Shifting error token, ");
1015 /* YYACCEPT comes here. */
1027 /* YYABORT comes here. */
1038 #line 105 "/windows/build/xemacs/xemacs/netinstall/iniparse.y"
1041 Package *package = 0;
1042 Package *xemacs_package = 0;
1044 static int maxpackages = 0;
1047 new_package (char *name)
1050 maxpackages = npackages = 0;
1051 if (npackages >= maxpackages)
1055 package = (Package *) realloc (package, maxpackages * sizeof (Package));
1057 package = (Package *) malloc (maxpackages * sizeof (Package));
1059 cp = package + npackages;
1062 memset (cp, 0, sizeof (Package));