1 --- bison_gen\ETCL_y.cpp 2005-07-19 09:56:06.368807400 -0700
2 +++ ETCL_y.cpp 2005-07-19 09:45:00.160274900 -0700
5 -/* A Bison parser, made from ETCL.yy
6 +/* A Bison parser, made from ETCL/ETCL.yy
7 by GNU Bison version 1.28 */
9 #define YYBISON 1 /* Identify Bison output. */
11 #define TAO_ETCL_TYPE_ID 298
12 #define TAO_ETCL_REPOS_ID 299
15 +//#line 1 "ETCL/ETCL.yy"
17 -// ETCL.yy,v 1.3 2002/01/14 19:52:28 parsons Exp
18 // ========================================================================
22 #include "ETCL_Interpreter.h"
24 extern int yylex (void);
25 +extern void yyflush_current_buffer (void);
27 static void yyerror (const char *)
30 // Ignore error messages
40 -1, -1, 29, 3, 4, 5, 6, 7, 8, -1,
41 -1, -1, -1, 40, 49, 50, 51, 52, 53, 54
43 -/* -*-C-*- Note some compilers choke on comments on `#line' lines. */
44 -#line 3 "/usr/local/share/bison.simple"
45 +/* -*-C-*- Note some compilers choke on comments on `//#line' lines. */
46 +//#line 3 "/pkg/gnu/share/bison.simple"
47 +/* This file comes from bison-1.28. */
49 /* Skeleton output parser for bison,
50 Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc.
53 You should have received a copy of the GNU General Public License
54 along with this program; if not, write to the Free Software
55 - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
56 + Foundation, Inc., 59 Temple Place - Suite 330,
57 + Boston, MA 02111-1307, USA. */
59 /* As a special exception, when this file is copied by Bison into a
60 Bison output file, you may use that output file without restriction.
61 This special exception was added by the Free Software Foundation
62 in version 1.24 of Bison. */
65 +/* This is the parser code that is written into each bison parser
66 + when the %semantic_parser declaration is not specified in the grammar.
67 + It was written by Richard Stallman by simplifying the hairy parser
68 + used when %semantic_parser is specified. */
70 +#ifndef YYSTACK_USE_ALLOCA
72 +#define YYSTACK_USE_ALLOCA
73 +#else /* alloca not defined */
75 +#define YYSTACK_USE_ALLOCA
76 #define alloca __builtin_alloca
77 #else /* not GNU C. */
78 -#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi)
79 +#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) || (defined (__sun) && defined (__i386))
80 +#define YYSTACK_USE_ALLOCA
83 -#if defined (MSDOS) && !defined (__TURBOC__)
84 +/* We think this test detects Watcom and Microsoft C. */
85 +/* This used to test MSDOS, but that is a bad idea
86 + since that symbol is in the user namespace. */
87 +#if (defined (_MSDOS) || defined (_MSDOS_)) && !defined (__TURBOC__)
88 +#if 0 /* No need for malloc.h, which pollutes the namespace;
89 + instead, just don't use alloca. */
92 #else /* not MSDOS, or __TURBOC__ */
95 +/* I don't know what this was needed for, but it pollutes the namespace.
96 + So I turned it off. rms, 2 May 1997. */
97 +/* #include <malloc.h> */
99 -#else /* not MSDOS, __TURBOC__, or _AIX */
103 -void *alloca (unsigned int);
105 -#else /* not __cplusplus */
107 -#endif /* not __cplusplus */
108 +#define YYSTACK_USE_ALLOCA
109 +#else /* not MSDOS, or __TURBOC__, or _AIX */
111 +#ifdef __hpux /* haible@ilog.fr says this works for HPUX 9.05 and up,
112 + and on HPUX 10. Eventually we can turn this on. */
113 +#define YYSTACK_USE_ALLOCA
114 +#define alloca __builtin_alloca
117 #endif /* not _AIX */
118 #endif /* not MSDOS, or __TURBOC__ */
119 -#endif /* not sparc. */
120 -#endif /* not GNU C. */
121 -#endif /* alloca not defined. */
122 +#endif /* not sparc */
123 +#endif /* not GNU C */
124 +#endif /* alloca not defined */
125 +#endif /* YYSTACK_USE_ALLOCA not defined */
127 -/* This is the parser code that is written into each bison parser
128 - when the %semantic_parser declaration is not specified in the grammar.
129 - It was written by Richard Stallman by simplifying the hairy parser
130 - used when %semantic_parser is specified. */
131 +#ifdef YYSTACK_USE_ALLOCA
132 +#define YYSTACK_ALLOC alloca
134 +#define YYSTACK_ALLOC malloc
137 /* Note: there must be only one dollar sign in this file.
138 It is replaced by the list of actions, each action
140 #define yyclearin (yychar = YYEMPTY)
143 -#define YYACCEPT return(0)
144 -#define YYABORT return(1)
145 +#define YYACCEPT goto yyacceptlab
146 +#define YYABORT goto yyabortlab
147 #define YYERROR goto yyerrlab1
148 /* Like YYERROR except do call yyerror.
149 This remains here temporarily to ease the
151 int yychar; /* the lookahead symbol */
152 YYSTYPE yylval; /* the semantic value of the */
153 /* lookahead symbol */
154 +YYSTYPE yyval; /* the variable used to return */
155 + /* semantic values from the action */
160 YYLTYPE yylloc; /* location data for the lookahead */
161 @@ -443,11 +467,11 @@
162 #define YYMAXDEPTH 10000
165 -/* Prevent warning if -Wstrict-prototypes. */
170 +/* Define __yy_memcpy. Note that the size argument
171 + should be passed with type unsigned int, because that is what the non-GCC
172 + definitions require. With GCC, __builtin_memcpy takes an arg
173 + of type size_t, but it can handle unsigned int. */
175 #if __GNUC__ > 1 /* GNU C and GNU C++ define this. */
176 #define __yy_memcpy(TO,FROM,COUNT) __builtin_memcpy(TO,FROM,COUNT)
177 #else /* not GNU C or C++ */
179 __yy_memcpy (to, from, count)
183 + unsigned int count;
185 ACE_REGISTER char *f = from;
186 ACE_REGISTER char *t = to;
187 @@ -474,10 +498,10 @@
188 /* This is the most reliable way to avoid incompatibilities
189 in available built-in functions on various systems. */
191 -__yy_memcpy (char *to, char *from, int count)
192 +__yy_memcpy (char *to, char *from, unsigned int count)
194 - ACE_REGISTER char *f = from;
195 ACE_REGISTER char *t = to;
196 + ACE_REGISTER char *f = from;
197 ACE_REGISTER int i = count;
205 -#line 196 "/usr/local/share/bison.simple"
207 +//#line 217 "/pkg/gnu/share/bison.simple"
209 /* The user can define YYPARSE_PARAM as the name of an argument to be passed
210 into yyparse. The argument should have type void *.
212 #define YYPARSE_PARAM_DECL
213 #endif /* not YYPARSE_PARAM */
215 +/* Prevent warning if -Wstrict-prototypes. */
217 +#ifdef YYPARSE_PARAM
218 +int yyparse (void *);
225 yyparse(YYPARSE_PARAM_ARG)
230 int yystacksize = YYINITDEPTH;
231 + int yyfree_stacks = 0;
239 - YYSTYPE yyval; /* the variable used to return */
240 - /* semantic values from the action */
246 @@ -620,18 +650,32 @@
247 if (yystacksize >= YYMAXDEPTH)
249 yyerror("parser stack overflow");
261 if (yystacksize > YYMAXDEPTH)
262 yystacksize = YYMAXDEPTH;
263 - yyss = (short *) alloca (yystacksize * sizeof (*yyssp));
264 - __yy_memcpy ((char *)yyss, (char *)yyss1, size * sizeof (*yyssp));
265 - yyvs = (YYSTYPE *) alloca (yystacksize * sizeof (*yyvsp));
266 - __yy_memcpy ((char *)yyvs, (char *)yyvs1, size * sizeof (*yyvsp));
267 +#ifndef YYSTACK_USE_ALLOCA
270 + yyss = (short *) YYSTACK_ALLOC (yystacksize * sizeof (*yyssp));
271 + __yy_memcpy ((char *)yyss, (char *)yyss1,
272 + size * (unsigned int) sizeof (*yyssp));
273 + yyvs = (YYSTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yyvsp));
274 + __yy_memcpy ((char *)yyvs, (char *)yyvs1,
275 + size * (unsigned int) sizeof (*yyvsp));
277 - yyls = (YYLTYPE *) alloca (yystacksize * sizeof (*yylsp));
278 - __yy_memcpy ((char *)yyls, (char *)yyls1, size * sizeof (*yylsp));
279 + yyls = (YYLTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yylsp));
280 + __yy_memcpy ((char *)yyls, (char *)yyls1,
281 + size * (unsigned int) sizeof (*yylsp));
283 #endif /* no yyoverflow */
285 @@ -792,225 +836,225 @@
290 +//#line 97 "ETCL/ETCL.yy"
291 { yyval.constraint = new TAO_ETCL_Preference (TAO_ETCL_MIN, yyvsp[0].constraint); ;
295 +//#line 99 "ETCL/ETCL.yy"
296 { yyval.constraint = new TAO_ETCL_Preference (TAO_ETCL_MAX, yyvsp[0].constraint); ;
300 +//#line 101 "ETCL/ETCL.yy"
301 { yyval.constraint = new TAO_ETCL_Preference (TAO_ETCL_WITH, yyvsp[0].constraint); ;
305 +//#line 103 "ETCL/ETCL.yy"
306 { yyval.constraint = new TAO_ETCL_Preference (TAO_ETCL_FIRST); ;
310 +//#line 105 "ETCL/ETCL.yy"
311 { yyval.constraint = new TAO_ETCL_Preference (TAO_ETCL_RANDOM); ;
315 +//#line 109 "ETCL/ETCL.yy"
316 { yyval.constraint = new TAO_ETCL_Binary_Expr (TAO_ETCL_OR, yyvsp[-2].constraint, yyvsp[0].constraint); ;
320 +//#line 114 "ETCL/ETCL.yy"
321 { yyval.constraint = new TAO_ETCL_Binary_Expr (TAO_ETCL_AND, yyvsp[-2].constraint, yyvsp[0].constraint); ;
325 +//#line 119 "ETCL/ETCL.yy"
326 { yyval.constraint = new TAO_ETCL_Binary_Expr (TAO_ETCL_EQ, yyvsp[-2].constraint, yyvsp[0].constraint); ;
330 +//#line 121 "ETCL/ETCL.yy"
331 { yyval.constraint = new TAO_ETCL_Binary_Expr (TAO_ETCL_NE, yyvsp[-2].constraint, yyvsp[0].constraint); ;
335 +//#line 123 "ETCL/ETCL.yy"
336 { yyval.constraint = new TAO_ETCL_Binary_Expr (TAO_ETCL_GT, yyvsp[-2].constraint, yyvsp[0].constraint); ;
340 +//#line 125 "ETCL/ETCL.yy"
341 { yyval.constraint = new TAO_ETCL_Binary_Expr (TAO_ETCL_GE, yyvsp[-2].constraint, yyvsp[0].constraint); ;
345 +//#line 127 "ETCL/ETCL.yy"
346 { yyval.constraint = new TAO_ETCL_Binary_Expr (TAO_ETCL_LT, yyvsp[-2].constraint, yyvsp[0].constraint); ;
350 +//#line 129 "ETCL/ETCL.yy"
351 { yyval.constraint = new TAO_ETCL_Binary_Expr (TAO_ETCL_LE, yyvsp[-2].constraint, yyvsp[0].constraint); ;
355 +//#line 134 "ETCL/ETCL.yy"
356 { yyval.constraint = new TAO_ETCL_Binary_Expr (TAO_ETCL_IN, yyvsp[-2].constraint, yyvsp[0].constraint); ;
360 +//#line 136 "ETCL/ETCL.yy"
361 { yyval.constraint = new TAO_ETCL_Binary_Expr (TAO_ETCL_IN, yyvsp[-3].constraint, yyvsp[0].constraint); ;
365 +//#line 141 "ETCL/ETCL.yy"
366 { yyval.constraint = new TAO_ETCL_Binary_Expr (TAO_ETCL_TWIDDLE, yyvsp[-2].constraint, yyvsp[0].constraint); ;
370 +//#line 146 "ETCL/ETCL.yy"
371 { yyval.constraint = new TAO_ETCL_Binary_Expr (TAO_ETCL_PLUS, yyvsp[-2].constraint, yyvsp[0].constraint); ;
375 +//#line 148 "ETCL/ETCL.yy"
376 { yyval.constraint = new TAO_ETCL_Binary_Expr (TAO_ETCL_MINUS, yyvsp[-2].constraint, yyvsp[0].constraint); ;
380 +//#line 153 "ETCL/ETCL.yy"
381 { yyval.constraint = new TAO_ETCL_Binary_Expr (TAO_ETCL_MULT, yyvsp[-2].constraint, yyvsp[0].constraint); ;
385 +//#line 155 "ETCL/ETCL.yy"
386 { yyval.constraint = new TAO_ETCL_Binary_Expr (TAO_ETCL_DIV, yyvsp[-2].constraint, yyvsp[0].constraint); ;
390 +//#line 160 "ETCL/ETCL.yy"
391 { yyval.constraint = new TAO_ETCL_Unary_Expr (TAO_ETCL_NOT, yyvsp[0].constraint); ;
395 +//#line 165 "ETCL/ETCL.yy"
396 { yyval.constraint = yyvsp[-1].constraint; ;
400 +//#line 167 "ETCL/ETCL.yy"
401 { yyval.constraint = yyvsp[0].constraint; ;
405 +//#line 169 "ETCL/ETCL.yy"
406 { yyval.constraint = new TAO_ETCL_Unary_Expr (TAO_ETCL_PLUS, yyvsp[0].constraint); ;
410 +//#line 171 "ETCL/ETCL.yy"
411 { yyval.constraint = new TAO_ETCL_Unary_Expr (TAO_ETCL_MINUS, yyvsp[0].constraint); ;
415 +//#line 173 "ETCL/ETCL.yy"
416 { yyval.constraint = yyvsp[0].constraint; ;
420 +//#line 175 "ETCL/ETCL.yy"
421 { yyval.constraint = new TAO_ETCL_Unary_Expr (TAO_ETCL_PLUS, yyvsp[0].constraint); ;
425 +//#line 177 "ETCL/ETCL.yy"
426 { yyval.constraint = new TAO_ETCL_Unary_Expr (TAO_ETCL_MINUS, yyvsp[0].constraint); ;
430 +//#line 179 "ETCL/ETCL.yy"
431 { yyval.constraint = yyvsp[0].constraint; ;
435 +//#line 181 "ETCL/ETCL.yy"
436 { yyval.constraint = yyvsp[0].constraint; ;
440 +//#line 183 "ETCL/ETCL.yy"
441 { yyval.constraint = new TAO_ETCL_Exist (yyvsp[0].constraint); ;
445 +//#line 185 "ETCL/ETCL.yy"
446 { yyval.constraint = new TAO_ETCL_Exist (yyvsp[0].constraint); ;
450 +//#line 187 "ETCL/ETCL.yy"
451 { yyval.constraint = new TAO_ETCL_Default (yyvsp[0].constraint); ;
455 +//#line 189 "ETCL/ETCL.yy"
456 { yyval.constraint = new TAO_ETCL_Eval (yyvsp[0].constraint); ;
460 +//#line 191 "ETCL/ETCL.yy"
461 { yyval.constraint = yyvsp[0].constraint; ;
465 +//#line 195 "ETCL/ETCL.yy"
466 { yyval.constraint = 0; ;
470 +//#line 197 "ETCL/ETCL.yy"
471 { yyval.constraint = new TAO_ETCL_Dot (yyvsp[0].constraint); ;
475 +//#line 200 "ETCL/ETCL.yy"
476 { yyval.constraint = new TAO_ETCL_Component (yyvsp[-1].constraint, yyvsp[0].constraint); ;
480 +//#line 207 "ETCL/ETCL.yy"
481 { yyval.constraint = 0; ;
485 +//#line 209 "ETCL/ETCL.yy"
486 { yyval.constraint = new TAO_ETCL_Dot (yyvsp[0].constraint); ;
490 +//#line 216 "ETCL/ETCL.yy"
491 { yyval.constraint = new TAO_ETCL_Component (yyvsp[-1].constraint, yyvsp[0].constraint); ;
495 +//#line 218 "ETCL/ETCL.yy"
496 { yyval.constraint = new TAO_ETCL_Special (TAO_ETCL_LENGTH); ;
500 +//#line 220 "ETCL/ETCL.yy"
501 { yyval.constraint = new TAO_ETCL_Special (TAO_ETCL_DISCRIMINANT); ;
505 +//#line 222 "ETCL/ETCL.yy"
506 { yyval.constraint = new TAO_ETCL_Special (TAO_ETCL_TYPE_ID); ;
510 +//#line 224 "ETCL/ETCL.yy"
511 { yyval.constraint = new TAO_ETCL_Special (TAO_ETCL_REPOS_ID); ;
515 +//#line 230 "ETCL/ETCL.yy"
516 { yyval.constraint = new TAO_ETCL_Component_Array (yyvsp[-2].constraint, yyvsp[0].constraint); ;
520 +//#line 234 "ETCL/ETCL.yy"
521 { yyval.constraint = new TAO_ETCL_Component_Assoc (yyvsp[-2].constraint, yyvsp[0].constraint); ;
525 +//#line 238 "ETCL/ETCL.yy"
526 { yyval.constraint = new TAO_ETCL_Component_Pos (yyvsp[-1].constraint, yyvsp[0].constraint); ;
530 +//#line 242 "ETCL/ETCL.yy"
531 { yyval.constraint = new TAO_ETCL_Union_Pos (yyvsp[-2].constraint, yyvsp[0].constraint); ;
535 +//#line 246 "ETCL/ETCL.yy"
536 { yyval.constraint = 0; ;
540 +//#line 248 "ETCL/ETCL.yy"
541 { yyval.constraint = new TAO_ETCL_Union_Value (+1, yyvsp[0].constraint); ;
545 +//#line 250 "ETCL/ETCL.yy"
546 { yyval.constraint = new TAO_ETCL_Union_Value (+1, yyvsp[0].constraint); ;
550 +//#line 252 "ETCL/ETCL.yy"
551 { yyval.constraint = new TAO_ETCL_Union_Value (-1, yyvsp[0].constraint); ;
555 +//#line 254 "ETCL/ETCL.yy"
556 { yyval.constraint = new TAO_ETCL_Union_Value (yyvsp[0].constraint); ;
559 /* the action file gets copied in in place of this dollarsign */
560 -#line 498 "/usr/local/share/bison.simple"
562 +//#line 543 "/pkg/gnu/share/bison.simple"
567 @@ -1204,7 +1248,37 @@
573 + /* YYACCEPT comes here. */
585 + /* YYABORT comes here. */
587 + /* Flush out yy_current_buffer before next parse. Since there is
588 + no error recovery, the buffer could still contain tokens from this
590 + yyflush_current_buffer();
603 +//#line 257 "ETCL/ETCL.yy"