Merge pull request #1551 from DOCGroup/plm_jira_333
[ACE_TAO.git] / TAO / orbsvcs / tests / Concurrency / CC_command.tab.cpp
blob044596b76b315f1f4b5163eec91a016bb620db1d
1 /* A Bison parser, made from CC_command.y
2 by GNU Bison version 1.28 */
4 #define ACE_CC_YYBISON 1 /* Identify Bison output. */
6 #define T_START_CMD 257
7 #define T_CREATE_CMD 258
8 #define T_LOCK_CMD 259
9 #define T_UNLOCK_CMD 260
10 #define T_TRYLOCK_CMD 261
11 #define T_CHANGEMODE_CMD 262
12 #define T_SLEEP_CMD 263
13 #define T_WAIT_CMD 264
14 #define T_REPEAT_CMD 265
15 #define T_EXCEP_CMD 266
16 #define T_PRINT_CMD 267
17 #define T_LOOKUP_CMD 268
18 #define T_TERM 269
19 #define T_READ 270
20 #define T_IREAD 271
21 #define T_UPGRADE 272
22 #define T_WRITE 273
23 #define T_IWRITE 274
24 #define T_IDENT 275
25 #define Q_STRING 276
26 #define T_NUM 277
29 #include "CC_command.h"
30 #include "ace/ACE.h"
31 #include "orbsvcs/CosConcurrencyControlC.h"
32 #include "ace/OS_NS_stdio.h"
34 void ace_cc_yyerror (const char* s);
35 int ace_cc_yylex(void);
37 extern int line_no;
38 extern char line_buf[500];
39 extern char *ace_cc_yytext;
40 extern CC_CommandList *cmdlist;
42 typedef union {
43 CC_Command *command;
44 CosConcurrencyControl::lock_mode lock_mode;
45 char *id;
46 int num;
47 } ACE_CC_YYSTYPE;
48 #include <stdio.h>
50 #ifndef __cplusplus
51 #ifndef __STDC__
52 #define const
53 #endif
54 #endif
58 #define ACE_CC_YYFINAL 66
59 #define ACE_CC_YYFLAG -32768
60 #define ACE_CC_YYNTBASE 24
62 #define ACE_CC_YYTRANSLATE(x) ((unsigned)(x) <= 277 ? ace_cc_yytranslate[x] : 31)
64 static const char ace_cc_yytranslate[] = { 0,
65 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
66 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
67 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
68 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
69 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
70 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
71 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
72 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
73 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
74 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
75 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
76 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
77 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
78 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
79 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
80 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
81 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
82 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
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, 2, 2, 2, 2, 2, 2, 2,
89 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
90 2, 2, 2, 2, 2, 1, 3, 4, 5, 6,
91 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
92 17, 18, 19, 20, 21, 22, 23
95 #if ACE_CC_YYDEBUG != 0
96 static const short ace_cc_yyprhs[] = { 0,
97 0, 1, 3, 6, 8, 12, 16, 19, 24, 28,
98 33, 37, 42, 46, 52, 57, 61, 64, 68, 72,
99 76, 80, 84, 86, 88, 90, 92, 94, 96, 98
102 static const short ace_cc_yyrhs[] = { -1,
103 25, 0, 25, 26, 0, 26, 0, 3, 27, 15,
104 0, 4, 28, 15, 0, 4, 15, 0, 5, 28,
105 30, 15, 0, 5, 30, 15, 0, 6, 28, 30,
106 15, 0, 6, 30, 15, 0, 7, 28, 30, 15,
107 0, 7, 30, 15, 0, 8, 28, 30, 30, 15,
108 0, 8, 30, 30, 15, 0, 9, 23, 15, 0,
109 10, 15, 0, 10, 22, 15, 0, 13, 22, 15,
110 0, 14, 28, 15, 0, 11, 23, 15, 0, 12,
111 29, 15, 0, 21, 0, 21, 0, 21, 0, 16,
112 0, 17, 0, 18, 0, 19, 0, 20, 0
115 #endif
117 #if ACE_CC_YYDEBUG != 0
118 static const short ace_cc_yyrline[] = { 0,
119 51, 52, 60, 61, 64, 66, 68, 70, 72, 74,
120 76, 78, 80, 82, 84, 86, 88, 90, 92, 94,
121 96, 99, 103, 105, 107, 109, 110, 111, 112, 113
123 #endif
126 #if ACE_CC_YYDEBUG != 0 || defined (ACE_CC_YYERROR_VERBOSE)
128 static const char * const ace_cc_yytname[] = { "$","error","$undefined.","T_START_CMD",
129 "T_CREATE_CMD","T_LOCK_CMD","T_UNLOCK_CMD","T_TRYLOCK_CMD","T_CHANGEMODE_CMD",
130 "T_SLEEP_CMD","T_WAIT_CMD","T_REPEAT_CMD","T_EXCEP_CMD","T_PRINT_CMD","T_LOOKUP_CMD",
131 "T_TERM","T_READ","T_IREAD","T_UPGRADE","T_WRITE","T_IWRITE","T_IDENT","Q_STRING",
132 "T_NUM","start","cmd_list","cmd","config_file_name","lock_set_name","exception_name",
133 "lock_mode", 0
135 #endif
137 static const short ace_cc_yyr1[] = { 0,
138 24, 24, 25, 25, 26, 26, 26, 26, 26, 26,
139 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
140 26, 26, 27, 28, 29, 30, 30, 30, 30, 30
143 static const short ace_cc_yyr2[] = { 0,
144 0, 1, 2, 1, 3, 3, 2, 4, 3, 4,
145 3, 4, 3, 5, 4, 3, 2, 3, 3, 3,
146 3, 3, 1, 1, 1, 1, 1, 1, 1, 1
149 static const short ace_cc_yydefact[] = { 1,
150 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
151 0, 0, 2, 4, 23, 0, 7, 24, 0, 26,
152 27, 28, 29, 30, 0, 0, 0, 0, 0, 0,
153 0, 0, 0, 17, 0, 0, 25, 0, 0, 0,
154 3, 5, 6, 0, 9, 0, 11, 0, 13, 0,
155 0, 16, 18, 21, 22, 19, 20, 8, 10, 12,
156 0, 15, 14, 0, 0, 0
159 static const short ace_cc_yydefgoto[] = { 64,
160 13, 14, 16, 19, 38, 26
163 static const short ace_cc_yypact[] = { 0,
164 -1, 14, 20, 20, 20, 20, 7, 4, 8, 1,
165 10, 13, 0,-32768,-32768, 18,-32768,-32768, 27,-32768,
166 -32768,-32768,-32768,-32768, 31, 28, 31, 29, 31, 30,
167 31, 31, 37,-32768, 38, 39,-32768, 40, 41, 42,
168 -32768,-32768,-32768, 43,-32768, 44,-32768, 45,-32768, 31,
169 46,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
170 47,-32768,-32768, 63, 64,-32768
173 static const short ace_cc_yypgoto[] = {-32768,
174 -32768, 52,-32768, 12,-32768, -4
178 #define ACE_CC_YYLAST 65
181 static const short ace_cc_yytable[] = { 28,
182 30, 32, 1, 2, 3, 4, 5, 6, 7, 8,
183 9, 10, 11, 12, 25, 27, 29, 31, 34, 15,
184 44, 37, 46, 40, 48, 35, 50, 51, 17, 33,
185 36, 39, 42, 18, 18, 20, 21, 22, 23, 24,
186 18, 43, 45, 47, 49, 61, 20, 21, 22, 23,
187 24, 52, 53, 54, 55, 56, 57, 58, 59, 60,
188 62, 63, 65, 66, 41
191 static const short ace_cc_yycheck[] = { 4,
192 5, 6, 3, 4, 5, 6, 7, 8, 9, 10,
193 11, 12, 13, 14, 3, 4, 5, 6, 15, 21,
194 25, 21, 27, 12, 29, 22, 31, 32, 15, 23,
195 23, 22, 15, 21, 21, 16, 17, 18, 19, 20,
196 21, 15, 15, 15, 15, 50, 16, 17, 18, 19,
197 20, 15, 15, 15, 15, 15, 15, 15, 15, 15,
198 15, 15, 0, 0, 13
200 /* -*-C-*- Note some compilers choke on comments on `#line' lines. */
202 /* This file comes from bison-1.28. */
204 /* Skeleton output parser for bison,
205 Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc.
207 This program is free software; you can redistribute it and/or modify
208 it under the terms of the GNU General Public License as published by
209 the Free Software Foundation; either version 2, or (at your option)
210 any later version.
212 This program is distributed in the hope that it will be useful,
213 but WITHOUT ANY WARRANTY; without even the implied warranty of
214 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
215 GNU General Public License for more details.
217 You should have received a copy of the GNU General Public License
218 along with this program; if not, write to the Free Software
219 Foundation, Inc., 59 Temple Place - Suite 330,
220 Boston, MA 02111-1307, USA. */
222 /* As a special exception, when this file is copied by Bison into a
223 Bison output file, you may use that output file without restriction.
224 This special exception was added by the Free Software Foundation
225 in version 1.24 of Bison. */
227 /* This is the parser code that is written into each bison parser
228 when the %semantic_parser declaration is not specified in the grammar.
229 It was written by Richard Stallman by simplifying the hairy parser
230 used when %semantic_parser is specified. */
232 #ifndef ACE_CC_YYSTACK_USE_ALLOCA
233 #ifdef alloca
234 #define ACE_CC_YYSTACK_USE_ALLOCA
235 #else /* alloca not defined */
236 #ifdef __GNUC__
237 #define ACE_CC_YYSTACK_USE_ALLOCA
238 #define alloca __builtin_alloca
239 #else /* not GNU C. */
240 #if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || (defined (__sun) && defined (__i386))
241 #define ACE_CC_YYSTACK_USE_ALLOCA
242 #include <alloca.h>
243 #else /* not sparc */
244 /* We think this test detects Watcom and Microsoft C. */
245 /* This used to test MSDOS, but that is a bad idea
246 since that symbol is in the user namespace. */
247 #if (defined (_MSDOS) || defined (_MSDOS_)) && !defined (__TURBOC__)
248 #if 0 /* No need for malloc.h, which pollutes the namespace;
249 instead, just don't use alloca. */
250 #include <malloc.h>
251 #endif
252 #else /* not MSDOS, or __TURBOC__ */
253 #if defined(_AIX)
254 /* I don't know what this was needed for, but it pollutes the namespace.
255 So I turned it off. rms, 2 May 1997. */
256 /* #include <malloc.h> */
257 #pragma alloca
258 #define ACE_CC_YYSTACK_USE_ALLOCA
259 #else /* not MSDOS, or __TURBOC__, or _AIX */
260 #if 0
261 #ifdef __hpux /* haible@ilog.fr says this works for HPUX 9.05 and up,
262 and on HPUX 10. Eventually we can turn this on. */
263 #define ACE_CC_YYSTACK_USE_ALLOCA
264 #define alloca __builtin_alloca
265 #endif /* __hpux */
266 #endif
267 #endif /* not _AIX */
268 #endif /* not MSDOS, or __TURBOC__ */
269 #endif /* not sparc */
270 #endif /* not GNU C */
271 #endif /* alloca not defined */
272 #endif /* ACE_CC_YYSTACK_USE_ALLOCA not defined */
274 #ifdef ACE_CC_YYSTACK_USE_ALLOCA
275 #define ACE_CC_YYSTACK_ALLOC alloca
276 #else
277 #define ACE_CC_YYSTACK_ALLOC malloc
278 #endif
280 /* Note: there must be only one dollar sign in this file.
281 It is replaced by the list of actions, each action
282 as one case of the switch. */
284 #define ace_cc_yyerrok (ace_cc_yyerrstatus = 0)
285 #define ace_cc_yyclearin (ace_cc_yychar = ACE_CC_YYEMPTY)
286 #define ACE_CC_YYEMPTY -2
287 #define ACE_CC_YYEOF 0
288 #define ACE_CC_YYACCEPT goto ace_cc_yyacceptlab
289 #define ACE_CC_YYABORT goto ace_cc_yyabortlab
290 #define ACE_CC_YYERROR goto ace_cc_yyerrlab1
291 /* Like ACE_CC_YYERROR except do call ace_cc_yyerror.
292 This remains here temporarily to ease the
293 transition to the new meaning of ACE_CC_YYERROR, for GCC.
294 Once GCC version 2 has supplanted version 1, this can go. */
295 #define ACE_CC_YYFAIL goto ace_cc_yyerrlab
296 #define ACE_CC_YYRECOVERING() (!!ace_cc_yyerrstatus)
297 #define ACE_CC_YYBACKUP(token, value) \
298 do \
299 if (ace_cc_yychar == ACE_CC_YYEMPTY && ace_cc_yylen == 1) \
300 { ace_cc_yychar = (token), ace_cc_yylval = (value); \
301 ace_cc_yychar1 = ACE_CC_YYTRANSLATE (ace_cc_yychar); \
302 ACE_CC_YYPOPSTACK; \
303 goto ace_cc_yybackup; \
305 else \
306 { ace_cc_yyerror ("syntax error: cannot back up"); ACE_CC_YYERROR; } \
307 while (0)
309 #define ACE_CC_YYTERROR 1
310 #define ACE_CC_YYERRCODE 256
312 #ifndef ACE_CC_YYPURE
313 #define ACE_CC_YYLEX ace_cc_yylex()
314 #endif
316 #ifdef ACE_CC_YYPURE
317 #ifdef ACE_CC_YYLSP_NEEDED
318 #ifdef ACE_CC_YYLEX_PARAM
319 #define ACE_CC_YYLEX ace_cc_yylex(&ace_cc_yylval, &ace_cc_yylloc, ACE_CC_YYLEX_PARAM)
320 #else
321 #define ACE_CC_YYLEX ace_cc_yylex(&ace_cc_yylval, &ace_cc_yylloc)
322 #endif
323 #else /* not ACE_CC_YYLSP_NEEDED */
324 #ifdef ACE_CC_YYLEX_PARAM
325 #define ACE_CC_YYLEX ace_cc_yylex(&ace_cc_yylval, ACE_CC_YYLEX_PARAM)
326 #else
327 #define ACE_CC_YYLEX ace_cc_yylex(&ace_cc_yylval)
328 #endif
329 #endif /* not ACE_CC_YYLSP_NEEDED */
330 #endif
332 /* If nonreentrant, generate the variables here */
334 #ifndef ACE_CC_YYPURE
336 int ace_cc_yychar; /* the lookahead symbol */
337 ACE_CC_YYSTYPE ace_cc_yylval; /* the semantic value of the */
338 /* lookahead symbol */
340 #ifdef ACE_CC_YYLSP_NEEDED
341 ACE_CC_YYLTYPE ace_cc_yylloc; /* location data for the lookahead */
342 /* symbol */
343 #endif
345 int ace_cc_yynerrs; /* number of parse errors so far */
346 #endif /* not ACE_CC_YYPURE */
348 #if ACE_CC_YYDEBUG != 0
349 int ace_cc_yydebug; /* nonzero means print parse trace */
350 /* Since this is uninitialized, it does not stop multiple parsers
351 from coexisting. */
352 #endif
354 /* ACE_CC_YYINITDEPTH indicates the initial size of the parser's stacks */
356 #ifndef ACE_CC_YYINITDEPTH
357 #define ACE_CC_YYINITDEPTH 200
358 #endif
360 /* ACE_CC_YYMAXDEPTH is the maximum size the stacks can grow to
361 (effective only if the built-in stack extension method is used). */
363 #if ACE_CC_YYMAXDEPTH == 0
364 #undef ACE_CC_YYMAXDEPTH
365 #endif
367 #ifndef ACE_CC_YYMAXDEPTH
368 #define ACE_CC_YYMAXDEPTH 10000
369 #endif
371 /* Define __ace_cc_yy_memcpy. Note that the size argument
372 should be passed with type unsigned int, because that is what the non-GCC
373 definitions require. With GCC, __builtin_memcpy takes an arg
374 of type size_t, but it can handle unsigned int. */
376 #if __GNUC__ > 1 /* GNU C and GNU C++ define this. */
377 #define __ace_cc_yy_memcpy(TO,FROM,COUNT) __builtin_memcpy(TO,FROM,COUNT)
378 #else /* not GNU C or C++ */
379 #ifndef __cplusplus
381 /* This is the most reliable way to avoid incompatibilities
382 in available built-in functions on various systems. */
383 static void
384 __ace_cc_yy_memcpy (to, from, count)
385 char *to;
386 char *from;
387 unsigned int count;
389 char *f = from;
390 char *t = to;
391 int i = count;
393 while (i-- > 0)
394 *t++ = *f++;
397 #else /* __cplusplus */
399 /* This is the most reliable way to avoid incompatibilities
400 in available built-in functions on various systems. */
401 static void
402 __ace_cc_yy_memcpy (char *to, char *from, unsigned int count)
404 char *t = to;
405 char *f = from;
406 int i = count;
408 while (i-- > 0)
409 *t++ = *f++;
412 #endif
413 #endif
417 /* The user can define ACE_CC_YYPARSE_PARAM as the name of an argument to be passed
418 into ace_cc_yyparse. The argument should have type void *.
419 It should actually point to an object.
420 Grammar actions can access the variable by casting it
421 to the proper pointer type. */
423 #ifdef ACE_CC_YYPARSE_PARAM
424 #ifdef __cplusplus
425 #define ACE_CC_YYPARSE_PARAM_ARG void *ACE_CC_YYPARSE_PARAM
426 #define ACE_CC_YYPARSE_PARAM_DECL
427 #else /* not __cplusplus */
428 #define ACE_CC_YYPARSE_PARAM_ARG ACE_CC_YYPARSE_PARAM
429 #define ACE_CC_YYPARSE_PARAM_DECL void *ACE_CC_YYPARSE_PARAM;
430 #endif /* not __cplusplus */
431 #else /* not ACE_CC_YYPARSE_PARAM */
432 #define ACE_CC_YYPARSE_PARAM_ARG
433 #define ACE_CC_YYPARSE_PARAM_DECL
434 #endif /* not ACE_CC_YYPARSE_PARAM */
436 /* Prevent warning if -Wstrict-prototypes. */
437 #ifdef __GNUC__
438 #ifdef ACE_CC_YYPARSE_PARAM
439 int ace_cc_yyparse (void *);
440 #else
441 int ace_cc_yyparse (void);
442 #endif
443 #endif
446 ace_cc_yyparse(ACE_CC_YYPARSE_PARAM_ARG)
447 ACE_CC_YYPARSE_PARAM_DECL
449 int ace_cc_yystate;
450 int ace_cc_yyn;
451 short *ace_cc_yyssp;
452 ACE_CC_YYSTYPE *ace_cc_yyvsp;
453 int ace_cc_yyerrstatus; /* number of tokens to shift before error messages enabled */
454 int ace_cc_yychar1 = 0; /* lookahead token as an internal (translated) token number */
456 short ace_cc_yyssa[ACE_CC_YYINITDEPTH]; /* the state stack */
457 ACE_CC_YYSTYPE ace_cc_yyvsa[ACE_CC_YYINITDEPTH]; /* the semantic value stack */
459 short *ace_cc_yyss = ace_cc_yyssa; /* refer to the stacks thru separate pointers */
460 ACE_CC_YYSTYPE *ace_cc_yyvs = ace_cc_yyvsa; /* to allow ace_cc_yyoverflow to reallocate them elsewhere */
462 #ifdef ACE_CC_YYLSP_NEEDED
463 ACE_CC_YYLTYPE ace_cc_yylsa[ACE_CC_YYINITDEPTH]; /* the location stack */
464 ACE_CC_YYLTYPE *ace_cc_yyls = ace_cc_yylsa;
465 ACE_CC_YYLTYPE *ace_cc_yylsp;
467 #define ACE_CC_YYPOPSTACK (ace_cc_yyvsp--, ace_cc_yyssp--, ace_cc_yylsp--)
468 #else
469 #define ACE_CC_YYPOPSTACK (ace_cc_yyvsp--, ace_cc_yyssp--)
470 #endif
472 int ace_cc_yystacksize = ACE_CC_YYINITDEPTH;
473 int ace_cc_yyfree_stacks = 0;
475 #ifdef ACE_CC_YYPURE
476 int ace_cc_yychar;
477 ACE_CC_YYSTYPE ace_cc_yylval;
478 int ace_cc_yynerrs;
479 #ifdef ACE_CC_YYLSP_NEEDED
480 ACE_CC_YYLTYPE ace_cc_yylloc;
481 #endif
482 #endif
484 ACE_CC_YYSTYPE ace_cc_yyval; /* the variable used to return */
485 /* semantic values from the action */
486 /* routines */
487 ace_cc_yyval.id = 0;
488 int ace_cc_yylen;
490 #if ACE_CC_YYDEBUG != 0
491 if (ace_cc_yydebug)
492 ACE_OS::fprintf(stderr, "Starting parse\n");
493 #endif
495 ace_cc_yystate = 0;
496 ace_cc_yyerrstatus = 0;
497 ace_cc_yynerrs = 0;
498 ace_cc_yychar = ACE_CC_YYEMPTY; /* Cause a token to be read. */
500 /* Initialize stack pointers.
501 Waste one element of value and location stack
502 so that they stay on the same level as the state stack.
503 The wasted elements are never initialized. */
505 ace_cc_yyssp = ace_cc_yyss - 1;
506 ace_cc_yyvsp = ace_cc_yyvs;
507 #ifdef ACE_CC_YYLSP_NEEDED
508 ace_cc_yylsp = ace_cc_yyls;
509 #endif
511 /* Push a new state, which is found in ace_cc_yystate . */
512 /* In all cases, when you get here, the value and location stacks
513 have just been pushed. so pushing a state here evens the stacks. */
514 ace_cc_yynewstate:
516 *++ace_cc_yyssp = ace_cc_yystate;
518 if (ace_cc_yyssp >= ace_cc_yyss + ace_cc_yystacksize - 1)
520 /* Give user a chance to reallocate the stack */
521 /* Use copies of these so that the &'s don't force the real ones into memory. */
522 ACE_CC_YYSTYPE *ace_cc_yyvs1 = ace_cc_yyvs;
523 short *ace_cc_yyss1 = ace_cc_yyss;
524 #ifdef ACE_CC_YYLSP_NEEDED
525 ACE_CC_YYLTYPE *ace_cc_yyls1 = ace_cc_yyls;
526 #endif
528 /* Get the current used size of the three stacks, in elements. */
529 int size = ace_cc_yyssp - ace_cc_yyss + 1;
531 #ifdef ace_cc_yyoverflow
532 /* Each stack pointer address is followed by the size of
533 the data in use in that stack, in bytes. */
534 #ifdef ACE_CC_YYLSP_NEEDED
535 /* This used to be a conditional around just the two extra args,
536 but that might be undefined if ace_cc_yyoverflow is a macro. */
537 ace_cc_yyoverflow("parser stack overflow",
538 &ace_cc_yyss1, size * sizeof (*ace_cc_yyssp),
539 &ace_cc_yyvs1, size * sizeof (*ace_cc_yyvsp),
540 &ace_cc_yyls1, size * sizeof (*ace_cc_yylsp),
541 &ace_cc_yystacksize);
542 #else
543 ace_cc_yyoverflow("parser stack overflow",
544 &ace_cc_yyss1, size * sizeof (*ace_cc_yyssp),
545 &ace_cc_yyvs1, size * sizeof (*ace_cc_yyvsp),
546 &ace_cc_yystacksize);
547 #endif
549 ace_cc_yyss = ace_cc_yyss1; ace_cc_yyvs = ace_cc_yyvs1;
550 #ifdef ACE_CC_YYLSP_NEEDED
551 ace_cc_yyls = ace_cc_yyls1;
552 #endif
553 #else /* no ace_cc_yyoverflow */
554 /* Extend the stack our own way. */
555 if (ace_cc_yystacksize >= ACE_CC_YYMAXDEPTH)
557 ace_cc_yyerror("parser stack overflow");
558 if (ace_cc_yyfree_stacks)
560 ACE_OS::free (ace_cc_yyss);
561 ACE_OS::free (ace_cc_yyvs);
562 #ifdef ACE_CC_YYLSP_NEEDED
563 ACE_OS::free (ace_cc_yyls);
564 #endif
566 return 2;
568 ace_cc_yystacksize *= 2;
569 if (ace_cc_yystacksize > ACE_CC_YYMAXDEPTH)
570 ace_cc_yystacksize = ACE_CC_YYMAXDEPTH;
571 #ifndef ACE_CC_YYSTACK_USE_ALLOCA
572 ace_cc_yyfree_stacks = 1;
573 #endif
574 ace_cc_yyss = (short *) ACE_CC_YYSTACK_ALLOC (ace_cc_yystacksize * sizeof (*ace_cc_yyssp));
575 __ace_cc_yy_memcpy ((char *)ace_cc_yyss, (char *)ace_cc_yyss1,
576 size * (unsigned int) sizeof (*ace_cc_yyssp));
577 ace_cc_yyvs = (ACE_CC_YYSTYPE *) ACE_CC_YYSTACK_ALLOC (ace_cc_yystacksize * sizeof (*ace_cc_yyvsp));
578 __ace_cc_yy_memcpy ((char *)ace_cc_yyvs, (char *)ace_cc_yyvs1,
579 size * (unsigned int) sizeof (*ace_cc_yyvsp));
580 #ifdef ACE_CC_YYLSP_NEEDED
581 ace_cc_yyls = (ACE_CC_YYLTYPE *) ACE_CC_YYSTACK_ALLOC (ace_cc_yystacksize * sizeof (*ace_cc_yylsp));
582 __ace_cc_yy_memcpy ((char *)ace_cc_yyls, (char *)ace_cc_yyls1,
583 size * (unsigned int) sizeof (*ace_cc_yylsp));
584 #endif
585 #endif /* no ace_cc_yyoverflow */
587 ace_cc_yyssp = ace_cc_yyss + size - 1;
588 ace_cc_yyvsp = ace_cc_yyvs + size - 1;
589 #ifdef ACE_CC_YYLSP_NEEDED
590 ace_cc_yylsp = ace_cc_yyls + size - 1;
591 #endif
593 #if ACE_CC_YYDEBUG != 0
594 if (ace_cc_yydebug)
595 ACE_OS::fprintf(stderr, "Stack size increased to %d\n", ace_cc_yystacksize);
596 #endif
598 if (ace_cc_yyssp >= ace_cc_yyss + ace_cc_yystacksize - 1)
599 ACE_CC_YYABORT;
602 #if ACE_CC_YYDEBUG != 0
603 if (ace_cc_yydebug)
604 ACE_OS::fprintf(stderr, "Entering state %d\n", ace_cc_yystate);
605 #endif
607 goto ace_cc_yybackup;
608 ace_cc_yybackup:
610 /* Do appropriate processing given the current state. */
611 /* Read a lookahead token if we need one and don't already have one. */
612 /* ace_cc_yyresume: */
614 /* First try to decide what to do without reference to lookahead token. */
616 ace_cc_yyn = ace_cc_yypact[ace_cc_yystate];
617 if (ace_cc_yyn == ACE_CC_YYFLAG)
618 goto ace_cc_yydefault;
620 /* Not known => get a lookahead token if don't already have one. */
622 /* ace_cc_yychar is either ACE_CC_YYEMPTY or ACE_CC_YYEOF
623 or a valid token in external form. */
625 if (ace_cc_yychar == ACE_CC_YYEMPTY)
627 #if ACE_CC_YYDEBUG != 0
628 if (ace_cc_yydebug)
629 ACE_OS::fprintf(stderr, "Reading a token: ");
630 #endif
631 ace_cc_yychar = ACE_CC_YYLEX;
634 /* Convert token to internal form (in ace_cc_yychar1) for indexing tables with */
636 if (ace_cc_yychar <= 0) /* This means end of input. */
638 ace_cc_yychar1 = 0;
639 ace_cc_yychar = ACE_CC_YYEOF; /* Don't call ACE_CC_YYLEX any more */
641 #if ACE_CC_YYDEBUG != 0
642 if (ace_cc_yydebug)
643 ACE_OS::fprintf(stderr, "Now at end of input.\n");
644 #endif
646 else
648 ace_cc_yychar1 = ACE_CC_YYTRANSLATE(ace_cc_yychar);
650 #if ACE_CC_YYDEBUG != 0
651 if (ace_cc_yydebug)
653 ACE_OS::fprintf (stderr, "Next token is %d (%s", ace_cc_yychar, ace_cc_yytname[ace_cc_yychar1]);
654 /* Give the individual parser a way to print the precise meaning
655 of a token, for further debugging info. */
656 #ifdef ACE_CC_YYPRINT
657 ACE_CC_YYPRINT (stderr, ace_cc_yychar, ace_cc_yylval);
658 #endif
659 ACE_OS::fprintf (stderr, ")\n");
661 #endif
664 ace_cc_yyn += ace_cc_yychar1;
665 if (ace_cc_yyn < 0 || ace_cc_yyn > ACE_CC_YYLAST || ace_cc_yycheck[ace_cc_yyn] != ace_cc_yychar1)
666 goto ace_cc_yydefault;
668 ace_cc_yyn = ace_cc_yytable[ace_cc_yyn];
670 /* ace_cc_yyn is what to do for this token type in this state.
671 Negative => reduce, -ace_cc_yyn is rule number.
672 Positive => shift, ace_cc_yyn is new state.
673 New state is final state => don't bother to shift,
674 just return success.
675 0, or most negative number => error. */
677 if (ace_cc_yyn < 0)
679 if (ace_cc_yyn == ACE_CC_YYFLAG)
680 goto ace_cc_yyerrlab;
681 ace_cc_yyn = -ace_cc_yyn;
682 goto ace_cc_yyreduce;
684 else if (ace_cc_yyn == 0)
685 goto ace_cc_yyerrlab;
687 if (ace_cc_yyn == ACE_CC_YYFINAL)
688 ACE_CC_YYACCEPT;
690 /* Shift the lookahead token. */
692 #if ACE_CC_YYDEBUG != 0
693 if (ace_cc_yydebug)
694 ACE_OS::fprintf(stderr, "Shifting token %d (%s), ", ace_cc_yychar, ace_cc_yytname[ace_cc_yychar1]);
695 #endif
697 /* Discard the token being shifted unless it is eof. */
698 if (ace_cc_yychar != ACE_CC_YYEOF)
699 ace_cc_yychar = ACE_CC_YYEMPTY;
701 *++ace_cc_yyvsp = ace_cc_yylval;
702 #ifdef ACE_CC_YYLSP_NEEDED
703 *++ace_cc_yylsp = ace_cc_yylloc;
704 #endif
706 /* count tokens shifted since error; after three, turn off error status. */
707 if (ace_cc_yyerrstatus) ace_cc_yyerrstatus--;
709 ace_cc_yystate = ace_cc_yyn;
710 goto ace_cc_yynewstate;
712 /* Do the default action for the current state. */
713 ace_cc_yydefault:
715 ace_cc_yyn = ace_cc_yydefact[ace_cc_yystate];
716 if (ace_cc_yyn == 0)
717 goto ace_cc_yyerrlab;
719 /* Do a reduction. ace_cc_yyn is the number of a rule to reduce with. */
720 ace_cc_yyreduce:
721 ace_cc_yylen = ace_cc_yyr2[ace_cc_yyn];
722 if (ace_cc_yylen > 0)
723 ace_cc_yyval = ace_cc_yyvsp[1-ace_cc_yylen]; /* implement default value of the action */
725 #if ACE_CC_YYDEBUG != 0
726 if (ace_cc_yydebug)
728 int i;
730 ACE_OS::fprintf (stderr, "Reducing via rule %d (line %d), ",
731 ace_cc_yyn, ace_cc_yyrline[ace_cc_yyn]);
733 /* Print the symbols being reduced, and their result. */
734 for (i = ace_cc_yyprhs[ace_cc_yyn]; ace_cc_yyrhs[i] > 0; i++)
735 ACE_OS::fprintf (stderr, "%s ", ace_cc_yytname[ace_cc_yyrhs[i]]);
736 ACE_OS::fprintf (stderr, " -> %s\n", ace_cc_yytname[ace_cc_yyr1[ace_cc_yyn]]);
738 #endif
741 switch (ace_cc_yyn) {
743 case 2:
744 { cmdlist->add(new CC_Sleep_Cmd(0));
745 /* dummy to check exeption in the last command */
746 if(cmdlist->execute()!=0) //CC_FAIL
747 { ACE_OS::printf(" ** Test succeded!!\n"); }
748 else
749 { ACE_OS::printf(" ** Test FAILED!!\n"); } ;
750 break;}
751 case 3:
752 { cmdlist->add(ace_cc_yyvsp[0].command); ;
753 break;}
754 case 4:
755 { cmdlist->add(ace_cc_yyvsp[0].command); ;
756 break;}
757 case 5:
758 { ace_cc_yyval.command = new CC_Start_Cmd(ace_cc_yyvsp[-1].id); ;
759 break;}
760 case 6:
761 { ace_cc_yyval.command = new CC_CreateLockSet_Cmd(ace_cc_yyvsp[-1].id); ;
762 break;}
763 case 7:
764 { ace_cc_yyval.command = new CC_CreateLockSet_Cmd(""); ;
765 break;}
766 case 8:
767 { ace_cc_yyval.command = new CC_Lock_Cmd(ace_cc_yyvsp[-2].id, ace_cc_yyvsp[-1].lock_mode); ;
768 break;}
769 case 9:
770 { ace_cc_yyval.command = new CC_Lock_Cmd("", ace_cc_yyvsp[-1].lock_mode); ;
771 break;}
772 case 10:
773 { ace_cc_yyval.command = new CC_UnLock_Cmd(ace_cc_yyvsp[-2].id, ace_cc_yyvsp[-1].lock_mode); ;
774 break;}
775 case 11:
776 { ace_cc_yyval.command = new CC_UnLock_Cmd("", ace_cc_yyvsp[-1].lock_mode); ;
777 break;}
778 case 12:
779 { ace_cc_yyval.command = new CC_TryLock_Cmd(ace_cc_yyvsp[-2].id, ace_cc_yyvsp[-1].lock_mode); ;
780 break;}
781 case 13:
782 { ace_cc_yyval.command = new CC_TryLock_Cmd("", ace_cc_yyvsp[-1].lock_mode); ;
783 break;}
784 case 14:
785 { ace_cc_yyval.command = new CC_ChangeMode_Cmd(ace_cc_yyvsp[-3].id, ace_cc_yyvsp[-2].lock_mode, ace_cc_yyvsp[-1].lock_mode); ;
786 break;}
787 case 15:
788 { ace_cc_yyval.command = new CC_ChangeMode_Cmd("", ace_cc_yyvsp[-2].lock_mode, ace_cc_yyvsp[-1].lock_mode); ;
789 break;}
790 case 16:
791 { ace_cc_yyval.command = new CC_Sleep_Cmd(ace_cc_yyvsp[-1].num); ;
792 break;}
793 case 17:
794 { ace_cc_yyval.command = new CC_Wait_Cmd(""); ;
795 break;}
796 case 18:
797 { ace_cc_yyval.command = new CC_Wait_Cmd(ace_cc_yyvsp[-1].id); ;
798 break;}
799 case 19:
800 { ace_cc_yyval.command = new CC_Print_Cmd(ace_cc_yyvsp[-1].id); ;
801 break;}
802 case 20:
803 { ace_cc_yyval.command = new CC_Lookup_Cmd(ace_cc_yyvsp[-1].id); ;
804 break;}
805 case 21:
806 { cmdlist->setrepeat(ace_cc_yyvsp[-1].num);
807 ace_cc_yyval.command = new CC_Dummy_Cmd();;
808 break;}
809 case 22:
810 { ace_cc_yyval.command = new CC_Excep_Cmd(ace_cc_yyvsp[-1].id); ;
811 break;}
812 case 23:
813 {ace_cc_yyval.id = ace_cc_yyvsp[0].id; ;
814 break;}
815 case 24:
816 {ace_cc_yyval.id = ace_cc_yyvsp[0].id; ;
817 break;}
818 case 25:
819 {ace_cc_yyval.id = ace_cc_yyvsp[0].id; ;
820 break;}
821 case 26:
822 { ace_cc_yyval.lock_mode = CosConcurrencyControl::read; ;
823 break;}
824 case 27:
825 { ace_cc_yyval.lock_mode = CosConcurrencyControl::intention_read; ;
826 break;}
827 case 28:
828 { ace_cc_yyval.lock_mode = CosConcurrencyControl::upgrade; ;
829 break;}
830 case 29:
831 { ace_cc_yyval.lock_mode = CosConcurrencyControl::write; ;
832 break;}
833 case 30:
834 { ace_cc_yyval.lock_mode = CosConcurrencyControl::intention_write; ;
835 break;}
837 /* the action file gets copied in in place of this dollarsign */
840 ace_cc_yyvsp -= ace_cc_yylen;
841 ace_cc_yyssp -= ace_cc_yylen;
842 #ifdef ACE_CC_YYLSP_NEEDED
843 ace_cc_yylsp -= ace_cc_yylen;
844 #endif
846 #if ACE_CC_YYDEBUG != 0
847 if (ace_cc_yydebug)
849 short *ssp1 = ace_cc_yyss - 1;
850 ACE_OS::fprintf (stderr, "state stack now");
851 while (ssp1 != ace_cc_yyssp)
852 ACE_OS::fprintf (stderr, " %d", *++ssp1);
853 ACE_OS::fprintf (stderr, "\n");
855 #endif
857 *++ace_cc_yyvsp = ace_cc_yyval;
859 #ifdef ACE_CC_YYLSP_NEEDED
860 ace_cc_yylsp++;
861 if (ace_cc_yylen == 0)
863 ace_cc_yylsp->first_line = ace_cc_yylloc.first_line;
864 ace_cc_yylsp->first_column = ace_cc_yylloc.first_column;
865 ace_cc_yylsp->last_line = (ace_cc_yylsp-1)->last_line;
866 ace_cc_yylsp->last_column = (ace_cc_yylsp-1)->last_column;
867 ace_cc_yylsp->text = 0;
869 else
871 ace_cc_yylsp->last_line = (ace_cc_yylsp+ace_cc_yylen-1)->last_line;
872 ace_cc_yylsp->last_column = (ace_cc_yylsp+ace_cc_yylen-1)->last_column;
874 #endif
876 /* Now "shift" the result of the reduction.
877 Determine what state that goes to,
878 based on the state we popped back to
879 and the rule number reduced by. */
881 ace_cc_yyn = ace_cc_yyr1[ace_cc_yyn];
883 ace_cc_yystate = ace_cc_yypgoto[ace_cc_yyn - ACE_CC_YYNTBASE] + *ace_cc_yyssp;
884 if (ace_cc_yystate >= 0 && ace_cc_yystate <= ACE_CC_YYLAST && ace_cc_yycheck[ace_cc_yystate] == *ace_cc_yyssp)
885 ace_cc_yystate = ace_cc_yytable[ace_cc_yystate];
886 else
887 ace_cc_yystate = ace_cc_yydefgoto[ace_cc_yyn - ACE_CC_YYNTBASE];
889 goto ace_cc_yynewstate;
891 ace_cc_yyerrlab: /* here on detecting error */
893 if (! ace_cc_yyerrstatus)
894 /* If not already recovering from an error, report this error. */
896 ++ace_cc_yynerrs;
898 #ifdef ACE_CC_YYERROR_VERBOSE
899 ace_cc_yyn = ace_cc_yypact[ace_cc_yystate];
901 if (ace_cc_yyn > ACE_CC_YYFLAG && ace_cc_yyn < ACE_CC_YYLAST)
903 int size = 0;
904 char *msg;
905 int x, count;
907 count = 0;
908 /* Start X at -ace_cc_yyn if nec to avoid negative indexes in ace_cc_yycheck. */
909 for (x = (ace_cc_yyn < 0 ? -ace_cc_yyn : 0);
910 x < (sizeof(ace_cc_yytname) / sizeof(char *)); x++)
911 if (ace_cc_yycheck[x + ace_cc_yyn] == x)
912 size += ACE_OS::strlen(ace_cc_yytname[x]) + 15, count++;
913 msg = (char *) ACE_OS::malloc(size + 15);
914 if (msg != 0)
916 ACE_OS::strcpy(msg, "parse error");
918 if (count < 5)
920 count = 0;
921 for (x = (ace_cc_yyn < 0 ? -ace_cc_yyn : 0);
922 x < (sizeof(ace_cc_yytname) / sizeof(char *)); x++)
923 if (ace_cc_yycheck[x + ace_cc_yyn] == x)
925 ACE_OS::strcat(msg, count == 0 ? ", expecting `" : " or `");
926 ACE_OS::strcat(msg, ace_cc_yytname[x]);
927 ACE_OS::strcat(msg, "'");
928 count++;
931 ace_cc_yyerror(msg);
932 ACE_OS::free(msg);
934 else
935 ace_cc_yyerror ("parse error; also virtual memory exceeded");
937 else
938 #endif /* ACE_CC_YYERROR_VERBOSE */
939 ace_cc_yyerror("parse error");
942 goto ace_cc_yyerrlab1;
943 ace_cc_yyerrlab1: /* here on error raised explicitly by an action */
945 if (ace_cc_yyerrstatus == 3)
947 /* if just tried and failed to reuse lookahead token after an error, discard it. */
949 /* return failure if at end of input */
950 if (ace_cc_yychar == ACE_CC_YYEOF)
951 ACE_CC_YYABORT;
953 #if ACE_CC_YYDEBUG != 0
954 if (ace_cc_yydebug)
955 ACE_OS::fprintf(stderr, "Discarding token %d (%s).\n", ace_cc_yychar, ace_cc_yytname[ace_cc_yychar1]);
956 #endif
958 ace_cc_yychar = ACE_CC_YYEMPTY;
961 /* Else will try to reuse lookahead token
962 after shifting the error token. */
964 ace_cc_yyerrstatus = 3; /* Each real token shifted decrements this */
966 goto ace_cc_yyerrhandle;
968 ace_cc_yyerrdefault: /* current state does not do anything special for the error token. */
970 #if 0
971 /* This is wrong; only states that explicitly want error tokens
972 should shift them. */
973 ace_cc_yyn = ace_cc_yydefact[ace_cc_yystate]; /* If its default is to accept any token, ok. Otherwise pop it.*/
974 if (ace_cc_yyn) goto ace_cc_yydefault;
975 #endif
977 ace_cc_yyerrpop: /* pop the current state because it cannot handle the error token */
979 if (ace_cc_yyssp == ace_cc_yyss) ACE_CC_YYABORT;
980 ace_cc_yyvsp--;
981 ace_cc_yystate = *--ace_cc_yyssp;
982 #ifdef ACE_CC_YYLSP_NEEDED
983 ace_cc_yylsp--;
984 #endif
986 #if ACE_CC_YYDEBUG != 0
987 if (ace_cc_yydebug)
989 short *ssp1 = ace_cc_yyss - 1;
990 ACE_OS::fprintf (stderr, "Error: state stack now");
991 while (ssp1 != ace_cc_yyssp)
992 ACE_OS::fprintf (stderr, " %d", *++ssp1);
993 ACE_OS::fprintf (stderr, "\n");
995 #endif
997 ace_cc_yyerrhandle:
999 ace_cc_yyn = ace_cc_yypact[ace_cc_yystate];
1000 if (ace_cc_yyn == ACE_CC_YYFLAG)
1001 goto ace_cc_yyerrdefault;
1003 ace_cc_yyn += ACE_CC_YYTERROR;
1004 if (ace_cc_yyn < 0 || ace_cc_yyn > ACE_CC_YYLAST || ace_cc_yycheck[ace_cc_yyn] != ACE_CC_YYTERROR)
1005 goto ace_cc_yyerrdefault;
1007 ace_cc_yyn = ace_cc_yytable[ace_cc_yyn];
1008 if (ace_cc_yyn < 0)
1010 if (ace_cc_yyn == ACE_CC_YYFLAG)
1011 goto ace_cc_yyerrpop;
1012 ace_cc_yyn = -ace_cc_yyn;
1013 goto ace_cc_yyreduce;
1015 else if (ace_cc_yyn == 0)
1016 goto ace_cc_yyerrpop;
1018 if (ace_cc_yyn == ACE_CC_YYFINAL)
1019 ACE_CC_YYACCEPT;
1021 #if ACE_CC_YYDEBUG != 0
1022 if (ace_cc_yydebug)
1023 ACE_OS::fprintf(stderr, "Shifting error token, ");
1024 #endif
1026 *++ace_cc_yyvsp = ace_cc_yylval;
1027 #ifdef ACE_CC_YYLSP_NEEDED
1028 *++ace_cc_yylsp = ace_cc_yylloc;
1029 #endif
1031 ace_cc_yystate = ace_cc_yyn;
1032 goto ace_cc_yynewstate;
1034 ace_cc_yyacceptlab:
1035 /* ACE_CC_YYACCEPT comes here. */
1036 if (ace_cc_yyfree_stacks)
1038 ACE_OS::free (ace_cc_yyss);
1039 ACE_OS::free (ace_cc_yyvs);
1040 #ifdef ACE_CC_YYLSP_NEEDED
1041 ACE_OS::free (ace_cc_yyls);
1042 #endif
1044 return 0;
1046 ace_cc_yyabortlab:
1047 /* ACE_CC_YYABORT comes here. */
1048 if (ace_cc_yyfree_stacks)
1050 ACE_OS::free (ace_cc_yyss);
1051 ACE_OS::free (ace_cc_yyvs);
1052 #ifdef ACE_CC_YYLSP_NEEDED
1053 ACE_OS::free (ace_cc_yyls);
1054 #endif
1056 return 1;
1060 void
1061 ace_cc_yyerror (const char *s)
1063 ACE_OS::printf ("%d: %s at %s in:\n%s\n",
1064 line_no,
1066 ace_cc_yytext,
1067 line_buf);
1068 ACE_OS::exit (-1);