2 /* A Bison parser, made from ETCL/ETCL.yy
3 by GNU Bison version 1.28 */
5 #define YYBISON 1 /* Identify Bison output. */
13 #define ETCL_EXIST 263
14 #define ETCL_DEFAULT 264
19 #define ETCL_TWIDDLE 269
20 #define ETCL_BOOLEAN 270
22 #define ETCL_MINUS 272
25 #define ETCL_UMINUS 275
26 #define ETCL_INTEGER 276
27 #define ETCL_FLOAT 277
28 #define ETCL_STRING 278
29 #define ETCL_RPAREN 279
30 #define ETCL_LPAREN 280
33 #define ETCL_IDENT 283
34 #define ETCL_UNSIGNED 284
35 #define ETCL_SIGNED 285
36 #define ETCL_DOUBLE 286
37 #define ETCL_CONSTRAINT 287
38 #define ETCL_COMPONENT 288
42 #define ETCL_FIRST 292
43 #define ETCL_RANDOM 293
44 #define ETCL_DOLLAR 294
46 #define ETCL_DISCRIMINANT 296
47 #define ETCL_LENGTH 297
48 #define ETCL_TYPE_ID 298
49 #define ETCL_REPOS_ID 299
52 //=============================================================================
56 * @author Carlos O'Ryan <coryan@uci.edu> based on previous work by Seth Widoff <sbw1@cs.wustl.edu>
58 //=============================================================================
61 #include "ace/ETCL/ETCL_y.h"
62 #include "ace/ETCL/ETCL_Constraint.h"
63 #include "ace/ETCL/ETCL_Interpreter.h"
65 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
68 extern void yyflush_current_buffer ();
70 static void yyerror (const char *)
73 // Ignore error messages
76 ACE_END_VERSIONED_NAMESPACE_DECL
80 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
93 #define YYTRANSLATE(x) ((unsigned)(x) <= 299 ? yytranslate[x] : 65)
95 static const char yytranslate
[] = { 0,
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, 2, 2, 2, 2, 2,
108 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
109 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
110 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
111 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
112 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
113 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
114 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
115 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
116 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
117 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
118 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
119 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
120 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
121 2, 2, 2, 2, 2, 1, 3, 4, 5, 6,
122 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
123 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
124 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
125 37, 38, 39, 40, 41, 42, 43, 44, 45
129 static const short yyprhs
[] = { 0,
130 0, 2, 4, 7, 10, 13, 15, 17, 21, 23,
131 27, 29, 33, 37, 41, 45, 49, 53, 55, 59,
132 64, 66, 70, 72, 76, 80, 82, 86, 90, 92,
133 95, 97, 101, 103, 106, 109, 111, 114, 117, 119,
134 121, 124, 128, 132, 135, 137, 138, 141, 144, 146,
135 148, 149, 152, 154, 156, 159, 161, 163, 165, 167,
136 169, 171, 176, 181, 184, 189, 190, 192, 195, 198
139 static const short yyrhs
[] = { 48,
140 0, 47, 0, 37, 48, 0, 36, 48, 0, 35,
141 48, 0, 38, 0, 39, 0, 48, 12, 49, 0,
142 49, 0, 49, 11, 50, 0, 50, 0, 51, 7,
143 51, 0, 51, 8, 51, 0, 51, 3, 51, 0,
144 51, 4, 51, 0, 51, 5, 51, 0, 51, 6,
145 51, 0, 51, 0, 52, 14, 57, 0, 52, 14,
146 40, 57, 0, 52, 0, 53, 15, 53, 0, 53,
147 0, 53, 17, 54, 0, 53, 18, 54, 0, 54,
148 0, 54, 19, 55, 0, 54, 20, 55, 0, 55,
149 0, 13, 56, 0, 56, 0, 26, 48, 25, 0,
150 22, 0, 17, 22, 0, 18, 22, 0, 23, 0,
151 17, 23, 0, 18, 23, 0, 24, 0, 16, 0,
152 9, 29, 0, 9, 40, 57, 0, 10, 40, 57,
153 0, 40, 57, 0, 29, 0, 0, 41, 59, 0,
154 29, 58, 0, 60, 0, 61, 0, 0, 41, 59,
155 0, 60, 0, 61, 0, 29, 58, 0, 43, 0,
156 42, 0, 44, 0, 45, 0, 62, 0, 63, 0,
157 28, 22, 27, 58, 0, 26, 29, 25, 58, 0,
158 22, 58, 0, 26, 64, 25, 58, 0, 0, 22,
159 0, 17, 22, 0, 18, 22, 0, 24, 0
165 static const short yyrline
[] = { 0,
166 92, 93, 96, 98, 100, 102, 104, 108, 110, 113,
167 115, 118, 120, 122, 124, 126, 128, 130, 133, 135,
168 137, 140, 142, 145, 147, 149, 152, 154, 156, 159,
169 161, 164, 166, 168, 170, 172, 174, 176, 178, 180,
170 182, 184, 186, 188, 190, 194, 196, 199, 202, 203,
171 206, 208, 211, 212, 215, 217, 219, 221, 223, 225,
172 226, 229, 233, 237, 241, 245, 247, 249, 251, 253
177 #if YYDEBUG != 0 || defined (YYERROR_VERBOSE)
179 static const char * const yytname
[] = { "$","error","$undefined.","ETCL_GT",
180 "ETCL_GE","ETCL_LT","ETCL_LE","ETCL_EQ","ETCL_NE","ETCL_EXIST",
181 "ETCL_DEFAULT","ETCL_AND","ETCL_OR","ETCL_NOT","ETCL_IN",
182 "ETCL_TWIDDLE","ETCL_BOOLEAN","ETCL_PLUS","ETCL_MINUS","ETCL_MULT",
183 "ETCL_DIV","ETCL_UMINUS","ETCL_INTEGER","ETCL_FLOAT","ETCL_STRING",
184 "ETCL_RPAREN","ETCL_LPAREN","ETCL_RBRA","ETCL_LBRA","ETCL_IDENT",
185 "ETCL_UNSIGNED","ETCL_SIGNED","ETCL_DOUBLE","ETCL_CONSTRAINT",
186 "ETCL_COMPONENT","ETCL_WITH","ETCL_MAX","ETCL_MIN","ETCL_FIRST",
187 "ETCL_RANDOM","ETCL_DOLLAR","ETCL_DOT","ETCL_DISCRIMINANT","ETCL_LENGTH",
188 "ETCL_TYPE_ID","ETCL_REPOS_ID","constraint","preference","bool_or","bool_and",
189 "bool_compare","expr_in","expr_twiddle","expr","term","factor_not","factor",
190 "component","component_ext","component_dot","component_array","component_assoc",
191 "component_pos","union_pos","union_val", 0
195 static const short yyr1
[] = { 0,
196 46, 46, 47, 47, 47, 47, 47, 48, 48, 49,
197 49, 50, 50, 50, 50, 50, 50, 50, 51, 51,
198 51, 52, 52, 53, 53, 53, 54, 54, 54, 55,
199 55, 56, 56, 56, 56, 56, 56, 56, 56, 56,
200 56, 56, 56, 56, 56, 57, 57, 57, 57, 57,
201 58, 58, 58, 58, 59, 59, 59, 59, 59, 59,
202 59, 60, 61, 62, 63, 64, 64, 64, 64, 64
205 static const short yyr2
[] = { 0,
206 1, 1, 2, 2, 2, 1, 1, 3, 1, 3,
207 1, 3, 3, 3, 3, 3, 3, 1, 3, 4,
208 1, 3, 1, 3, 3, 1, 3, 3, 1, 2,
209 1, 3, 1, 2, 2, 1, 2, 2, 1, 1,
210 2, 3, 3, 2, 1, 0, 2, 2, 1, 1,
211 0, 2, 1, 1, 2, 1, 1, 1, 1, 1,
212 1, 4, 4, 2, 4, 0, 1, 2, 2, 1
215 static const short yydefact
[] = { 0,
216 0, 0, 0, 40, 0, 0, 33, 36, 39, 0,
217 45, 0, 0, 0, 6, 7, 46, 2, 1, 9,
218 11, 18, 21, 23, 26, 29, 31, 41, 46, 46,
219 30, 34, 37, 35, 38, 0, 5, 4, 3, 0,
220 0, 51, 0, 44, 49, 50, 0, 0, 0, 0,
221 0, 0, 0, 0, 46, 0, 0, 0, 0, 0,
222 42, 43, 32, 0, 0, 0, 48, 53, 54, 51,
223 66, 51, 57, 56, 58, 59, 47, 60, 61, 8,
224 10, 14, 15, 16, 17, 12, 13, 46, 19, 22,
225 24, 25, 27, 28, 51, 51, 52, 64, 0, 0,
226 67, 70, 0, 55, 20, 63, 62, 68, 69, 51,
230 static const short yydefgoto
[] = { 112,
231 18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
232 44, 67, 77, 68, 69, 78, 79, 103
235 static const short yypact
[] = { 41,
236 -13, -39, 94,-32768, 38, 46,-32768,-32768,-32768, 73,
237 -32768, 73, 73, 73,-32768,-32768, -9,-32768, -6, 7,
238 -32768, 121, -5, 19, 55,-32768,-32768,-32768, -9, -9,
239 -32768,-32768,-32768,-32768,-32768, 21, -6, -6, -6, 6,
240 25, -2, -1,-32768,-32768,-32768, 73, 73, 73, 73,
241 73, 73, 73, 73, -18, 73, 73, 73, 73, 73,
242 -32768,-32768,-32768, 27, 29, -1,-32768,-32768,-32768, -2,
243 31, -2,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 7,
244 -32768,-32768,-32768,-32768,-32768,-32768,-32768, -9,-32768, 67,
245 55, 55,-32768,-32768, -2, -2,-32768,-32768, 44, 50,
246 -32768,-32768, 69,-32768,-32768,-32768,-32768,-32768,-32768, -2,
247 -32768, 98, 100,-32768
250 static const short yypgoto
[] = {-32768,
251 -32768, 95, 54, 58, 86,-32768, 59, 30, 33, 111,
252 -26, -65, 53, -17, -15,-32768,-32768,-32768
259 static const short yytable
[] = { 45,
260 30, 46, 61, 62, 98, 47, 104, 40, 55, 41,
261 42, 45, 45, 46, 46, 28, 40, 48, 41, 42,
262 70, 88, 43, 40, 71, 41, 29, 72, 89, 106,
263 107, 43, 47, 56, 64, 57, 58, 45, 66, 46,
264 73, 74, 75, 76, 111, 63, 65, 99, 100, 1,
265 2, 95, 101, 3, 102, 96, 4, 5, 6, 32,
266 33, 105, 7, 8, 9, 108, 10, 34, 35, 11,
267 45, 109, 46, 59, 60, 12, 13, 14, 15, 16,
268 17, 1, 2, 57, 58, 3, 91, 92, 4, 5,
269 6, 93, 94, 110, 7, 8, 9, 113, 10, 114,
270 80, 11, 1, 2, 36, 81, 37, 38, 39, 4,
271 5, 6, 17, 31, 90, 7, 8, 9, 97, 10,
272 0, 0, 11, 49, 50, 51, 52, 53, 54, 0,
273 0, 0, 0, 17, 82, 83, 84, 85, 86, 87
276 static const short yycheck
[] = { 17,
277 40, 17, 29, 30, 70, 12, 72, 26, 14, 28,
278 29, 29, 30, 29, 30, 29, 26, 11, 28, 29,
279 22, 40, 41, 26, 26, 28, 40, 29, 55, 95,
280 96, 41, 12, 15, 29, 17, 18, 55, 41, 55,
281 42, 43, 44, 45, 110, 25, 22, 17, 18, 9,
282 10, 25, 22, 13, 24, 27, 16, 17, 18, 22,
283 23, 88, 22, 23, 24, 22, 26, 22, 23, 29,
284 88, 22, 88, 19, 20, 35, 36, 37, 38, 39,
285 40, 9, 10, 17, 18, 13, 57, 58, 16, 17,
286 18, 59, 60, 25, 22, 23, 24, 0, 26, 0,
287 47, 29, 9, 10, 10, 48, 12, 13, 14, 16,
288 17, 18, 40, 3, 56, 22, 23, 24, 66, 26,
289 -1, -1, 29, 3, 4, 5, 6, 7, 8, -1,
290 -1, -1, -1, 40, 49, 50, 51, 52, 53, 54
292 /* -*-C-*- Note some compilers choke on comments on `//#line' lines. */
293 //#line 3 "/pkg/gnu/share/bison.simple"
294 /* This file comes from bison-1.28. */
296 /* Skeleton output parser for bison,
297 Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc.
299 This program is free software; you can redistribute it and/or modify
300 it under the terms of the GNU General Public License as published by
301 the Free Software Foundation; either version 2, or (at your option)
304 This program is distributed in the hope that it will be useful,
305 but WITHOUT ANY WARRANTY; without even the implied warranty of
306 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
307 GNU General Public License for more details.
309 You should have received a copy of the GNU General Public License
310 along with this program; if not, write to the Free Software
311 Foundation, Inc., 59 Temple Place - Suite 330,
312 Boston, MA 02111-1307, USA. */
314 /* As a special exception, when this file is copied by Bison into a
315 Bison output file, you may use that output file without restriction.
316 This special exception was added by the Free Software Foundation
317 in version 1.24 of Bison. */
319 /* This is the parser code that is written into each bison parser
320 when the %semantic_parser declaration is not specified in the grammar.
321 It was written by Richard Stallman by simplifying the hairy parser
322 used when %semantic_parser is specified. */
324 ACE_END_VERSIONED_NAMESPACE_DECL
326 #ifndef YYSTACK_USE_ALLOCA
328 #define YYSTACK_USE_ALLOCA
329 #else /* alloca not defined */
331 #define YYSTACK_USE_ALLOCA
332 #define alloca __builtin_alloca
333 #else /* not GNU C. */
334 #if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || (defined (__sun) && defined (__i386))
335 #define YYSTACK_USE_ALLOCA
337 #else /* not sparc */
338 /* We think this test detects Watcom and Microsoft C. */
339 /* This used to test MSDOS, but that is a bad idea
340 since that symbol is in the user namespace. */
341 #if (defined (_MSDOS) || defined (_MSDOS_)) && !defined (__TURBOC__)
342 #if 0 /* No need for malloc.h, which pollutes the namespace;
343 instead, just don't use alloca. */
346 #else /* not MSDOS, or __TURBOC__ */
348 /* I don't know what this was needed for, but it pollutes the namespace.
349 So I turned it off. rms, 2 May 1997. */
350 /* #include <malloc.h> */
352 #define YYSTACK_USE_ALLOCA
353 #else /* not MSDOS, or __TURBOC__, or _AIX */
354 #endif /* not _AIX */
355 #endif /* not MSDOS, or __TURBOC__ */
356 #endif /* not sparc */
357 #endif /* not GNU C */
358 #endif /* alloca not defined */
359 #endif /* YYSTACK_USE_ALLOCA not defined */
361 #ifdef YYSTACK_USE_ALLOCA
362 #define YYSTACK_ALLOC alloca
364 #define YYSTACK_ALLOC malloc
367 /* Note: there must be only one dollar sign in this file.
368 It is replaced by the list of actions, each action
369 as one case of the switch. */
371 #define yyerrok (yyerrstatus = 0)
372 #define yyclearin (yychar = YYEMPTY)
375 #define YYACCEPT goto yyacceptlab
376 #define YYABORT goto yyabortlab
377 #define YYERROR goto yyerrlab1
378 /* Like YYERROR except do call yyerror.
379 This remains here temporarily to ease the
380 transition to the new meaning of YYERROR, for GCC.
381 Once GCC version 2 has supplanted version 1, this can go. */
382 #define YYFAIL goto yyerrlab
383 #define YYRECOVERING() (!!yyerrstatus)
384 #define YYBACKUP(token, value) \
386 if (yychar == YYEMPTY && yylen == 1) \
387 { yychar = (token), yylval = (value); \
388 yychar1 = YYTRANSLATE (yychar); \
393 { yyerror ("syntax error: cannot back up"); YYERROR; } \
397 #define YYERRCODE 256
400 #define YYLEX yylex()
406 #define YYLEX yylex(&yylval, &yylloc, YYLEX_PARAM)
408 #define YYLEX yylex(&yylval, &yylloc)
410 #else /* not YYLSP_NEEDED */
412 #define YYLEX yylex(&yylval, YYLEX_PARAM)
414 #define YYLEX yylex(&yylval)
416 #endif /* not YYLSP_NEEDED */
419 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
421 /* If nonreentrant, generate the variables here */
425 int yychar
; /* the lookahead symbol */
426 YYSTYPE yylval
; /* the semantic value of the */
427 /* lookahead symbol */
428 YYSTYPE yyval
; /* the variable used to return */
429 /* semantic values from the action */
434 YYLTYPE yylloc
; /* location data for the lookahead */
438 int yynerrs
; /* number of parse errors so far */
439 #endif /* not YYPURE */
442 int yydebug
; /* nonzero means print parse trace */
443 /* Since this is uninitialized, it does not stop multiple parsers
447 /* YYINITDEPTH indicates the initial size of the parser's stacks */
450 #define YYINITDEPTH 200
453 /* YYMAXDEPTH is the maximum size the stacks can grow to
454 (effective only if the built-in stack extension method is used). */
461 #define YYMAXDEPTH 10000
464 /* Define __yy_memcpy. Note that the size argument
465 should be passed with type unsigned int, because that is what the non-GCC
466 definitions require. With GCC, __builtin_memcpy takes an arg
467 of type size_t, but it can handle unsigned int. */
469 #if __GNUC__ > 1 /* GNU C and GNU C++ define this. */
470 #define __yy_memcpy(TO,FROM,COUNT) __builtin_memcpy(TO,FROM,COUNT)
471 #else /* not GNU C or C++ */
474 /* This is the most reliable way to avoid incompatibilities
475 in available built-in functions on various systems. */
477 __yy_memcpy (to
, from
, count
)
490 #else /* __cplusplus */
492 /* This is the most reliable way to avoid incompatibilities
493 in available built-in functions on various systems. */
495 __yy_memcpy (char *to
, char *from
, unsigned int count
)
508 //#line 217 "/pkg/gnu/share/bison.simple"
510 /* The user can define YYPARSE_PARAM as the name of an argument to be passed
511 into yyparse. The argument should have type void *.
512 It should actually point to an object.
513 Grammar actions can access the variable by casting it
514 to the proper pointer type. */
518 #define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
519 #define YYPARSE_PARAM_DECL
520 #else /* not __cplusplus */
521 #define YYPARSE_PARAM_ARG YYPARSE_PARAM
522 #define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
523 #endif /* not __cplusplus */
524 #else /* not YYPARSE_PARAM */
525 #define YYPARSE_PARAM_ARG
526 #define YYPARSE_PARAM_DECL
527 #endif /* not YYPARSE_PARAM */
529 /* Prevent warning if -Wstrict-prototypes. */
532 int yyparse (void *);
539 yyparse(YYPARSE_PARAM_ARG
)
546 int yyerrstatus
; /* number of tokens to shift before error messages enabled */
547 int yychar1
= 0; /* lookahead token as an internal (translated) token number */
549 short yyssa
[YYINITDEPTH
]; /* the state stack */
550 YYSTYPE yyvsa
[YYINITDEPTH
]; /* the semantic value stack */
552 short *yyss
= yyssa
; /* refer to the stacks thru separate pointers */
553 YYSTYPE
*yyvs
= yyvsa
; /* to allow yyoverflow to reallocate them elsewhere */
556 YYLTYPE yylsa
[YYINITDEPTH
]; /* the location stack */
557 YYLTYPE
*yyls
= yylsa
;
560 #define YYPOPSTACK (yyvsp--, yyssp--, yylsp--)
562 #define YYPOPSTACK (yyvsp--, yyssp--)
565 int yystacksize
= YYINITDEPTH
;
566 int yyfree_stacks
= 0;
581 ACE_OS::fprintf(stderr
, "Starting parse\n");
587 yychar
= YYEMPTY
; /* Cause a token to be read. */
589 /* Initialize stack pointers.
590 Waste one element of value and location stack
591 so that they stay on the same level as the state stack.
592 The wasted elements are never initialized. */
600 /* Push a new state, which is found in yystate . */
601 /* In all cases, when you get here, the value and location stacks
602 have just been pushed. so pushing a state here evens the stacks. */
607 if (yyssp
>= yyss
+ yystacksize
- 1)
609 /* Give user a chance to reallocate the stack */
610 /* Use copies of these so that the &'s don't force the real ones into memory. */
611 YYSTYPE
*yyvs1
= yyvs
;
614 YYLTYPE
*yyls1
= yyls
;
617 /* Get the current used size of the three stacks, in elements. */
618 int size
= (int)(yyssp
- yyss
+ 1);
621 /* Each stack pointer address is followed by the size of
622 the data in use in that stack, in bytes. */
624 /* This used to be a conditional around just the two extra args,
625 but that might be undefined if yyoverflow is a macro. */
626 yyoverflow("parser stack overflow",
627 &yyss1
, size
* sizeof (*yyssp
),
628 &yyvs1
, size
* sizeof (*yyvsp
),
629 &yyls1
, size
* sizeof (*yylsp
),
632 yyoverflow("parser stack overflow",
633 &yyss1
, size
* sizeof (*yyssp
),
634 &yyvs1
, size
* sizeof (*yyvsp
),
638 yyss
= yyss1
; yyvs
= yyvs1
;
642 #else /* no yyoverflow */
643 /* Extend the stack our own way. */
644 if (yystacksize
>= YYMAXDEPTH
)
646 yyerror("parser stack overflow");
658 if (yystacksize
> YYMAXDEPTH
)
659 yystacksize
= YYMAXDEPTH
;
660 #ifndef YYSTACK_USE_ALLOCA
663 yyss
= (short *) YYSTACK_ALLOC (yystacksize
* sizeof (*yyssp
));
664 __yy_memcpy ((char *)yyss
, (char *)yyss1
,
665 size
* (unsigned int) sizeof (*yyssp
));
666 yyvs
= (YYSTYPE
*) YYSTACK_ALLOC (yystacksize
* sizeof (*yyvsp
));
667 __yy_memcpy ((char *)yyvs
, (char *)yyvs1
,
668 size
* (unsigned int) sizeof (*yyvsp
));
670 yyls
= (YYLTYPE
*) YYSTACK_ALLOC (yystacksize
* sizeof (*yylsp
));
671 __yy_memcpy ((char *)yyls
, (char *)yyls1
,
672 size
* (unsigned int) sizeof (*yylsp
));
674 #endif /* no yyoverflow */
676 yyssp
= yyss
+ size
- 1;
677 yyvsp
= yyvs
+ size
- 1;
679 yylsp
= yyls
+ size
- 1;
684 ACE_OS::fprintf(stderr
, "Stack size increased to %d\n", yystacksize
);
687 if (yyssp
>= yyss
+ yystacksize
- 1)
693 ACE_OS::fprintf(stderr
, "Entering state %d\n", yystate
);
699 /* Do appropriate processing given the current state. */
700 /* Read a lookahead token if we need one and don't already have one. */
703 /* First try to decide what to do without reference to lookahead token. */
705 yyn
= yypact
[yystate
];
709 /* Not known => get a lookahead token if don't already have one. */
711 /* yychar is either YYEMPTY or YYEOF
712 or a valid token in external form. */
714 if (yychar
== YYEMPTY
)
718 ACE_OS::fprintf(stderr
, "Reading a token: ");
723 /* Convert token to internal form (in yychar1) for indexing tables with */
725 if (yychar
<= 0) /* This means end of input. */
728 yychar
= YYEOF
; /* Don't call YYLEX any more */
732 ACE_OS::fprintf(stderr
, "Now at end of input.\n");
737 yychar1
= YYTRANSLATE(yychar
);
742 ACE_OS::fprintf (stderr
, "Next token is %d (%s", yychar
, yytname
[yychar1
]);
743 /* Give the individual parser a way to print the precise meaning
744 of a token, for further debugging info. */
746 YYPRINT (stderr
, yychar
, yylval
);
748 ACE_OS::fprintf (stderr
, ")\n");
754 if (yyn
< 0 || yyn
> YYLAST
|| yycheck
[yyn
] != yychar1
)
759 /* yyn is what to do for this token type in this state.
760 Negative => reduce, -yyn is rule number.
761 Positive => shift, yyn is new state.
762 New state is final state => don't bother to shift,
764 0, or most negative number => error. */
779 /* Shift the lookahead token. */
783 ACE_OS::fprintf(stderr
, "Shifting token %d (%s), ", yychar
, yytname
[yychar1
]);
786 /* Discard the token being shifted unless it is eof. */
795 /* count tokens shifted since error; after three, turn off error status. */
796 if (yyerrstatus
) yyerrstatus
--;
801 /* Do the default action for the current state. */
804 yyn
= yydefact
[yystate
];
808 /* Do a reduction. yyn is the number of a rule to reduce with. */
812 yyval
= yyvsp
[1-yylen
]; /* implement default value of the action */
819 ACE_OS::fprintf (stderr
, "Reducing via rule %d (line %d), ",
822 /* Print the symbols being reduced, and their result. */
823 for (i
= yyprhs
[yyn
]; yyrhs
[i
] > 0; i
++)
824 ACE_OS::fprintf (stderr
, "%s ", yytname
[yyrhs
[i
]]);
825 ACE_OS::fprintf (stderr
, " -> %s\n", yytname
[yyr1
[yyn
]]);
832 //#line 97 "ETCL/ETCL.yy"
833 { yyval
.constraint
= new ETCL_Preference (ETCL_MIN
, yyvsp
[0].constraint
); ;
836 //#line 99 "ETCL/ETCL.yy"
837 { yyval
.constraint
= new ETCL_Preference (ETCL_MAX
, yyvsp
[0].constraint
); ;
840 //#line 101 "ETCL/ETCL.yy"
841 { yyval
.constraint
= new ETCL_Preference (ETCL_WITH
, yyvsp
[0].constraint
); ;
844 //#line 103 "ETCL/ETCL.yy"
845 { yyval
.constraint
= new ETCL_Preference (ETCL_FIRST
); ;
848 //#line 105 "ETCL/ETCL.yy"
849 { yyval
.constraint
= new ETCL_Preference (ETCL_RANDOM
); ;
852 //#line 109 "ETCL/ETCL.yy"
853 { yyval
.constraint
= new ETCL_Binary_Expr (ETCL_OR
, yyvsp
[-2].constraint
, yyvsp
[0].constraint
); ;
856 //#line 114 "ETCL/ETCL.yy"
857 { yyval
.constraint
= new ETCL_Binary_Expr (ETCL_AND
, yyvsp
[-2].constraint
, yyvsp
[0].constraint
); ;
860 //#line 119 "ETCL/ETCL.yy"
861 { yyval
.constraint
= new ETCL_Binary_Expr (ETCL_EQ
, yyvsp
[-2].constraint
, yyvsp
[0].constraint
); ;
864 //#line 121 "ETCL/ETCL.yy"
865 { yyval
.constraint
= new ETCL_Binary_Expr (ETCL_NE
, yyvsp
[-2].constraint
, yyvsp
[0].constraint
); ;
868 //#line 123 "ETCL/ETCL.yy"
869 { yyval
.constraint
= new ETCL_Binary_Expr (ETCL_GT
, yyvsp
[-2].constraint
, yyvsp
[0].constraint
); ;
872 //#line 125 "ETCL/ETCL.yy"
873 { yyval
.constraint
= new ETCL_Binary_Expr (ETCL_GE
, yyvsp
[-2].constraint
, yyvsp
[0].constraint
); ;
876 //#line 127 "ETCL/ETCL.yy"
877 { yyval
.constraint
= new ETCL_Binary_Expr (ETCL_LT
, yyvsp
[-2].constraint
, yyvsp
[0].constraint
); ;
880 //#line 129 "ETCL/ETCL.yy"
881 { yyval
.constraint
= new ETCL_Binary_Expr (ETCL_LE
, yyvsp
[-2].constraint
, yyvsp
[0].constraint
); ;
884 //#line 134 "ETCL/ETCL.yy"
885 { yyval
.constraint
= new ETCL_Binary_Expr (ETCL_IN
, yyvsp
[-2].constraint
, yyvsp
[0].constraint
); ;
888 //#line 136 "ETCL/ETCL.yy"
889 { yyval
.constraint
= new ETCL_Binary_Expr (ETCL_IN
, yyvsp
[-3].constraint
, yyvsp
[0].constraint
); ;
892 //#line 141 "ETCL/ETCL.yy"
893 { yyval
.constraint
= new ETCL_Binary_Expr (ETCL_TWIDDLE
, yyvsp
[-2].constraint
, yyvsp
[0].constraint
); ;
896 //#line 146 "ETCL/ETCL.yy"
897 { yyval
.constraint
= new ETCL_Binary_Expr (ETCL_PLUS
, yyvsp
[-2].constraint
, yyvsp
[0].constraint
); ;
900 //#line 148 "ETCL/ETCL.yy"
901 { yyval
.constraint
= new ETCL_Binary_Expr (ETCL_MINUS
, yyvsp
[-2].constraint
, yyvsp
[0].constraint
); ;
904 //#line 153 "ETCL/ETCL.yy"
905 { yyval
.constraint
= new ETCL_Binary_Expr (ETCL_MULT
, yyvsp
[-2].constraint
, yyvsp
[0].constraint
); ;
908 //#line 155 "ETCL/ETCL.yy"
909 { yyval
.constraint
= new ETCL_Binary_Expr (ETCL_DIV
, yyvsp
[-2].constraint
, yyvsp
[0].constraint
); ;
912 //#line 160 "ETCL/ETCL.yy"
913 { yyval
.constraint
= new ETCL_Unary_Expr (ETCL_NOT
, yyvsp
[0].constraint
); ;
916 //#line 165 "ETCL/ETCL.yy"
917 { yyval
.constraint
= yyvsp
[-1].constraint
; ;
920 //#line 167 "ETCL/ETCL.yy"
921 { yyval
.constraint
= yyvsp
[0].constraint
; ;
924 //#line 169 "ETCL/ETCL.yy"
925 { yyval
.constraint
= new ETCL_Unary_Expr (ETCL_PLUS
, yyvsp
[0].constraint
); ;
928 //#line 171 "ETCL/ETCL.yy"
929 { yyval
.constraint
= new ETCL_Unary_Expr (ETCL_MINUS
, yyvsp
[0].constraint
); ;
932 //#line 173 "ETCL/ETCL.yy"
933 { yyval
.constraint
= yyvsp
[0].constraint
; ;
936 //#line 175 "ETCL/ETCL.yy"
937 { yyval
.constraint
= new ETCL_Unary_Expr (ETCL_PLUS
, yyvsp
[0].constraint
); ;
940 //#line 177 "ETCL/ETCL.yy"
941 { yyval
.constraint
= new ETCL_Unary_Expr (ETCL_MINUS
, yyvsp
[0].constraint
); ;
944 //#line 179 "ETCL/ETCL.yy"
945 { yyval
.constraint
= yyvsp
[0].constraint
; ;
948 //#line 181 "ETCL/ETCL.yy"
949 { yyval
.constraint
= yyvsp
[0].constraint
; ;
952 //#line 183 "ETCL/ETCL.yy"
953 { yyval
.constraint
= new ETCL_Exist (yyvsp
[0].constraint
); ;
956 //#line 185 "ETCL/ETCL.yy"
957 { yyval
.constraint
= new ETCL_Exist (yyvsp
[0].constraint
); ;
960 //#line 187 "ETCL/ETCL.yy"
961 { yyval
.constraint
= new ETCL_Default (yyvsp
[0].constraint
); ;
964 //#line 189 "ETCL/ETCL.yy"
965 { yyval
.constraint
= new ETCL_Eval (yyvsp
[0].constraint
); ;
968 //#line 191 "ETCL/ETCL.yy"
969 { yyval
.constraint
= yyvsp
[0].constraint
; ;
972 //#line 195 "ETCL/ETCL.yy"
973 { yyval
.constraint
= 0; ;
976 //#line 197 "ETCL/ETCL.yy"
977 { yyval
.constraint
= new ETCL_Dot (yyvsp
[0].constraint
); ;
980 //#line 200 "ETCL/ETCL.yy"
981 { yyval
.constraint
= new ETCL_Component (yyvsp
[-1].constraint
, yyvsp
[0].constraint
); ;
984 //#line 207 "ETCL/ETCL.yy"
985 { yyval
.constraint
= 0; ;
988 //#line 209 "ETCL/ETCL.yy"
989 { yyval
.constraint
= new ETCL_Dot (yyvsp
[0].constraint
); ;
992 //#line 216 "ETCL/ETCL.yy"
993 { yyval
.constraint
= new ETCL_Component (yyvsp
[-1].constraint
, yyvsp
[0].constraint
); ;
996 //#line 218 "ETCL/ETCL.yy"
997 { yyval
.constraint
= new ETCL_Special (ETCL_LENGTH
); ;
1000 //#line 220 "ETCL/ETCL.yy"
1001 { yyval
.constraint
= new ETCL_Special (ETCL_DISCRIMINANT
); ;
1004 //#line 222 "ETCL/ETCL.yy"
1005 { yyval
.constraint
= new ETCL_Special (ETCL_TYPE_ID
); ;
1008 //#line 224 "ETCL/ETCL.yy"
1009 { yyval
.constraint
= new ETCL_Special (ETCL_REPOS_ID
); ;
1012 //#line 230 "ETCL/ETCL.yy"
1013 { yyval
.constraint
= new ETCL_Component_Array (yyvsp
[-2].constraint
, yyvsp
[0].constraint
); ;
1016 //#line 234 "ETCL/ETCL.yy"
1017 { yyval
.constraint
= new ETCL_Component_Assoc (yyvsp
[-2].constraint
, yyvsp
[0].constraint
); ;
1020 //#line 238 "ETCL/ETCL.yy"
1021 { yyval
.constraint
= new ETCL_Component_Pos (yyvsp
[-1].constraint
, yyvsp
[0].constraint
); ;
1024 //#line 242 "ETCL/ETCL.yy"
1025 { yyval
.constraint
= new ETCL_Union_Pos (yyvsp
[-2].constraint
, yyvsp
[0].constraint
); ;
1028 //#line 246 "ETCL/ETCL.yy"
1029 { yyval
.constraint
= 0; ;
1032 //#line 248 "ETCL/ETCL.yy"
1033 { yyval
.constraint
= new ETCL_Union_Value (+1, yyvsp
[0].constraint
); ;
1036 //#line 250 "ETCL/ETCL.yy"
1037 { yyval
.constraint
= new ETCL_Union_Value (+1, yyvsp
[0].constraint
); ;
1040 //#line 252 "ETCL/ETCL.yy"
1041 { yyval
.constraint
= new ETCL_Union_Value (-1, yyvsp
[0].constraint
); ;
1044 //#line 254 "ETCL/ETCL.yy"
1045 { yyval
.constraint
= new ETCL_Union_Value (yyvsp
[0].constraint
); ;
1048 /* the action file gets copied in in place of this dollarsign */
1049 //#line 543 "/pkg/gnu/share/bison.simple"
1060 short *ssp1
= yyss
- 1;
1061 ACE_OS::fprintf (stderr
, "state stack now");
1062 while (ssp1
!= yyssp
)
1063 ACE_OS::fprintf (stderr
, " %d", *++ssp1
);
1064 ACE_OS::fprintf (stderr
, "\n");
1074 yylsp
->first_line
= yylloc
.first_line
;
1075 yylsp
->first_column
= yylloc
.first_column
;
1076 yylsp
->last_line
= (yylsp
-1)->last_line
;
1077 yylsp
->last_column
= (yylsp
-1)->last_column
;
1082 yylsp
->last_line
= (yylsp
+yylen
-1)->last_line
;
1083 yylsp
->last_column
= (yylsp
+yylen
-1)->last_column
;
1087 /* Now "shift" the result of the reduction.
1088 Determine what state that goes to,
1089 based on the state we popped back to
1090 and the rule number reduced by. */
1094 yystate
= yypgoto
[yyn
- YYNTBASE
] + *yyssp
;
1095 if (yystate
>= 0 && yystate
<= YYLAST
&& yycheck
[yystate
] == *yyssp
)
1096 yystate
= yytable
[yystate
];
1098 yystate
= yydefgoto
[yyn
- YYNTBASE
];
1102 yyerrlab
: /* here on detecting error */
1105 /* If not already recovering from an error, report this error. */
1109 #ifdef YYERROR_VERBOSE
1110 yyn
= yypact
[yystate
];
1112 if (yyn
> YYFLAG
&& yyn
< YYLAST
)
1119 /* Start X at -yyn if nec to avoid negative indexes in yycheck. */
1120 for (x
= (yyn
< 0 ? -yyn
: 0);
1121 x
< (sizeof(yytname
) / sizeof(char *)); x
++)
1122 if (yycheck
[x
+ yyn
] == x
)
1123 size
+= ACE_OS::strlen(yytname
[x
]) + 15, count
++;
1124 msg
= (char *) ACE_OS::malloc(size
+ 15);
1127 ACE_OS::strcpy(msg
, "parse error");
1132 for (x
= (yyn
< 0 ? -yyn
: 0);
1133 x
< (sizeof(yytname
) / sizeof(char *)); x
++)
1134 if (yycheck
[x
+ yyn
] == x
)
1136 ACE_OS::strcat(msg
, count
== 0 ? ", expecting `" : " or `");
1137 ACE_OS::strcat(msg
, yytname
[x
]);
1138 ACE_OS::strcat(msg
, "'");
1146 yyerror ("parse error; also virtual memory exceeded");
1149 #endif /* YYERROR_VERBOSE */
1150 yyerror("parse error");
1154 yyerrlab1
: /* here on error raised explicitly by an action */
1156 if (yyerrstatus
== 3)
1158 /* if just tried and failed to reuse lookahead token after an error, discard it. */
1160 /* return failure if at end of input */
1161 if (yychar
== YYEOF
)
1166 ACE_OS::fprintf(stderr
, "Discarding token %d (%s).\n", yychar
, yytname
[yychar1
]);
1172 /* Else will try to reuse lookahead token
1173 after shifting the error token. */
1175 yyerrstatus
= 3; /* Each real token shifted decrements this */
1179 yyerrdefault
: /* current state does not do anything special for the error token. */
1182 /* This is wrong; only states that explicitly want error tokens
1183 should shift them. */
1184 yyn
= yydefact
[yystate
]; /* If its default is to accept any token, ok. Otherwise pop it.*/
1185 if (yyn
) goto yydefault
;
1188 yyerrpop
: /* pop the current state because it cannot handle the error token */
1190 if (yyssp
== yyss
) YYABORT
;
1200 short *ssp1
= yyss
- 1;
1201 ACE_OS::fprintf (stderr
, "Error: state stack now");
1202 while (ssp1
!= yyssp
)
1203 ACE_OS::fprintf (stderr
, " %d", *++ssp1
);
1204 ACE_OS::fprintf (stderr
, "\n");
1210 yyn
= yypact
[yystate
];
1215 if (yyn
< 0 || yyn
> YYLAST
|| yycheck
[yyn
] != YYTERROR
)
1234 ACE_OS::fprintf(stderr
, "Shifting error token, ");
1246 /* YYACCEPT comes here. */
1249 ACE_OS::free (yyss
);
1250 ACE_OS::free (yyvs
);
1252 ACE_OS::free (yyls
);
1258 /* YYABORT comes here. */
1260 /* Flush out yy_current_buffer before next parse. Since there is
1261 no error recovery, the buffer could still contain tokens from this
1263 yyflush_current_buffer();
1267 ACE_OS::free (yyss
);
1268 ACE_OS::free (yyvs
);
1270 ACE_OS::free (yyls
);
1275 //#line 257 "ETCL/ETCL.yy"
1277 ACE_END_VERSIONED_NAMESPACE_DECL