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
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
29 #include "CC_command.h"
31 #include "orbsvcs/CosConcurrencyControlC.h"
32 #include "ace/OS_NS_stdio.h"
34 void ace_cc_yyerror (const char* s
);
38 extern char line_buf
[500];
39 extern char *ace_cc_yytext
;
40 extern CC_CommandList
*cmdlist
;
44 CosConcurrencyControl::lock_mode lock_mode
;
57 #define ACE_CC_YYFINAL 66
58 #define ACE_CC_YYFLAG -32768
59 #define ACE_CC_YYNTBASE 24
61 #define ACE_CC_YYTRANSLATE(x) ((unsigned)(x) <= 277 ? ace_cc_yytranslate[x] : 31)
63 static const char ace_cc_yytranslate
[] = { 0,
64 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
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, 1, 3, 4, 5, 6,
90 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
91 17, 18, 19, 20, 21, 22, 23
94 #if ACE_CC_YYDEBUG != 0
95 static const short ace_cc_yyprhs
[] = { 0,
96 0, 1, 3, 6, 8, 12, 16, 19, 24, 28,
97 33, 37, 42, 46, 52, 57, 61, 64, 68, 72,
98 76, 80, 84, 86, 88, 90, 92, 94, 96, 98
101 static const short ace_cc_yyrhs
[] = { -1,
102 25, 0, 25, 26, 0, 26, 0, 3, 27, 15,
103 0, 4, 28, 15, 0, 4, 15, 0, 5, 28,
104 30, 15, 0, 5, 30, 15, 0, 6, 28, 30,
105 15, 0, 6, 30, 15, 0, 7, 28, 30, 15,
106 0, 7, 30, 15, 0, 8, 28, 30, 30, 15,
107 0, 8, 30, 30, 15, 0, 9, 23, 15, 0,
108 10, 15, 0, 10, 22, 15, 0, 13, 22, 15,
109 0, 14, 28, 15, 0, 11, 23, 15, 0, 12,
110 29, 15, 0, 21, 0, 21, 0, 21, 0, 16,
111 0, 17, 0, 18, 0, 19, 0, 20, 0
116 #if ACE_CC_YYDEBUG != 0
117 static const short ace_cc_yyrline
[] = { 0,
118 51, 52, 60, 61, 64, 66, 68, 70, 72, 74,
119 76, 78, 80, 82, 84, 86, 88, 90, 92, 94,
120 96, 99, 103, 105, 107, 109, 110, 111, 112, 113
125 #if ACE_CC_YYDEBUG != 0 || defined (ACE_CC_YYERROR_VERBOSE)
127 static const char * const ace_cc_yytname
[] = { "$","error","$undefined.","T_START_CMD",
128 "T_CREATE_CMD","T_LOCK_CMD","T_UNLOCK_CMD","T_TRYLOCK_CMD","T_CHANGEMODE_CMD",
129 "T_SLEEP_CMD","T_WAIT_CMD","T_REPEAT_CMD","T_EXCEP_CMD","T_PRINT_CMD","T_LOOKUP_CMD",
130 "T_TERM","T_READ","T_IREAD","T_UPGRADE","T_WRITE","T_IWRITE","T_IDENT","Q_STRING",
131 "T_NUM","start","cmd_list","cmd","config_file_name","lock_set_name","exception_name",
136 static const short ace_cc_yyr1
[] = { 0,
137 24, 24, 25, 25, 26, 26, 26, 26, 26, 26,
138 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
139 26, 26, 27, 28, 29, 30, 30, 30, 30, 30
142 static const short ace_cc_yyr2
[] = { 0,
143 0, 1, 2, 1, 3, 3, 2, 4, 3, 4,
144 3, 4, 3, 5, 4, 3, 2, 3, 3, 3,
145 3, 3, 1, 1, 1, 1, 1, 1, 1, 1
148 static const short ace_cc_yydefact
[] = { 1,
149 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
150 0, 0, 2, 4, 23, 0, 7, 24, 0, 26,
151 27, 28, 29, 30, 0, 0, 0, 0, 0, 0,
152 0, 0, 0, 17, 0, 0, 25, 0, 0, 0,
153 3, 5, 6, 0, 9, 0, 11, 0, 13, 0,
154 0, 16, 18, 21, 22, 19, 20, 8, 10, 12,
158 static const short ace_cc_yydefgoto
[] = { 64,
159 13, 14, 16, 19, 38, 26
162 static const short ace_cc_yypact
[] = { 0,
163 -1, 14, 20, 20, 20, 20, 7, 4, 8, 1,
164 10, 13, 0,-32768,-32768, 18,-32768,-32768, 27,-32768,
165 -32768,-32768,-32768,-32768, 31, 28, 31, 29, 31, 30,
166 31, 31, 37,-32768, 38, 39,-32768, 40, 41, 42,
167 -32768,-32768,-32768, 43,-32768, 44,-32768, 45,-32768, 31,
168 46,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
169 47,-32768,-32768, 63, 64,-32768
172 static const short ace_cc_yypgoto
[] = {-32768,
173 -32768, 52,-32768, 12,-32768, -4
177 #define ACE_CC_YYLAST 65
180 static const short ace_cc_yytable
[] = { 28,
181 30, 32, 1, 2, 3, 4, 5, 6, 7, 8,
182 9, 10, 11, 12, 25, 27, 29, 31, 34, 15,
183 44, 37, 46, 40, 48, 35, 50, 51, 17, 33,
184 36, 39, 42, 18, 18, 20, 21, 22, 23, 24,
185 18, 43, 45, 47, 49, 61, 20, 21, 22, 23,
186 24, 52, 53, 54, 55, 56, 57, 58, 59, 60,
190 static const short ace_cc_yycheck
[] = { 4,
191 5, 6, 3, 4, 5, 6, 7, 8, 9, 10,
192 11, 12, 13, 14, 3, 4, 5, 6, 15, 21,
193 25, 21, 27, 12, 29, 22, 31, 32, 15, 23,
194 23, 22, 15, 21, 21, 16, 17, 18, 19, 20,
195 21, 15, 15, 15, 15, 50, 16, 17, 18, 19,
196 20, 15, 15, 15, 15, 15, 15, 15, 15, 15,
199 /* -*-C-*- Note some compilers choke on comments on `#line' lines. */
201 /* This file comes from bison-1.28. */
203 /* Skeleton output parser for bison,
204 Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc.
206 This program is free software; you can redistribute it and/or modify
207 it under the terms of the GNU General Public License as published by
208 the Free Software Foundation; either version 2, or (at your option)
211 This program is distributed in the hope that it will be useful,
212 but WITHOUT ANY WARRANTY; without even the implied warranty of
213 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
214 GNU General Public License for more details.
216 You should have received a copy of the GNU General Public License
217 along with this program; if not, write to the Free Software
218 Foundation, Inc., 59 Temple Place - Suite 330,
219 Boston, MA 02111-1307, USA. */
221 /* As a special exception, when this file is copied by Bison into a
222 Bison output file, you may use that output file without restriction.
223 This special exception was added by the Free Software Foundation
224 in version 1.24 of Bison. */
226 /* This is the parser code that is written into each bison parser
227 when the %semantic_parser declaration is not specified in the grammar.
228 It was written by Richard Stallman by simplifying the hairy parser
229 used when %semantic_parser is specified. */
231 #ifndef ACE_CC_YYSTACK_USE_ALLOCA
233 #define ACE_CC_YYSTACK_USE_ALLOCA
234 #else /* alloca not defined */
236 #define ACE_CC_YYSTACK_USE_ALLOCA
237 #define alloca __builtin_alloca
238 #else /* not GNU C. */
239 #if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || (defined (__sun) && defined (__i386))
240 #define ACE_CC_YYSTACK_USE_ALLOCA
242 #else /* not sparc */
243 /* We think this test detects Watcom and Microsoft C. */
244 /* This used to test MSDOS, but that is a bad idea
245 since that symbol is in the user namespace. */
246 #if (defined (_MSDOS) || defined (_MSDOS_)) && !defined (__TURBOC__)
247 #if 0 /* No need for malloc.h, which pollutes the namespace;
248 instead, just don't use alloca. */
251 #else /* not MSDOS, or __TURBOC__ */
253 /* I don't know what this was needed for, but it pollutes the namespace.
254 So I turned it off. rms, 2 May 1997. */
255 /* #include <malloc.h> */
257 #define ACE_CC_YYSTACK_USE_ALLOCA
258 #else /* not MSDOS, or __TURBOC__, or _AIX */
259 #endif /* not _AIX */
260 #endif /* not MSDOS, or __TURBOC__ */
261 #endif /* not sparc */
262 #endif /* not GNU C */
263 #endif /* alloca not defined */
264 #endif /* ACE_CC_YYSTACK_USE_ALLOCA not defined */
266 #ifdef ACE_CC_YYSTACK_USE_ALLOCA
267 #define ACE_CC_YYSTACK_ALLOC alloca
269 #define ACE_CC_YYSTACK_ALLOC malloc
272 /* Note: there must be only one dollar sign in this file.
273 It is replaced by the list of actions, each action
274 as one case of the switch. */
276 #define ace_cc_yyerrok (ace_cc_yyerrstatus = 0)
277 #define ace_cc_yyclearin (ace_cc_yychar = ACE_CC_YYEMPTY)
278 #define ACE_CC_YYEMPTY -2
279 #define ACE_CC_YYEOF 0
280 #define ACE_CC_YYACCEPT goto ace_cc_yyacceptlab
281 #define ACE_CC_YYABORT goto ace_cc_yyabortlab
282 #define ACE_CC_YYERROR goto ace_cc_yyerrlab1
283 /* Like ACE_CC_YYERROR except do call ace_cc_yyerror.
284 This remains here temporarily to ease the
285 transition to the new meaning of ACE_CC_YYERROR, for GCC.
286 Once GCC version 2 has supplanted version 1, this can go. */
287 #define ACE_CC_YYFAIL goto ace_cc_yyerrlab
288 #define ACE_CC_YYRECOVERING() (!!ace_cc_yyerrstatus)
289 #define ACE_CC_YYBACKUP(token, value) \
291 if (ace_cc_yychar == ACE_CC_YYEMPTY && ace_cc_yylen == 1) \
292 { ace_cc_yychar = (token), ace_cc_yylval = (value); \
293 ace_cc_yychar1 = ACE_CC_YYTRANSLATE (ace_cc_yychar); \
295 goto ace_cc_yybackup; \
298 { ace_cc_yyerror ("syntax error: cannot back up"); ACE_CC_YYERROR; } \
301 #define ACE_CC_YYTERROR 1
302 #define ACE_CC_YYERRCODE 256
304 #ifndef ACE_CC_YYPURE
305 #define ACE_CC_YYLEX ace_cc_yylex()
309 #ifdef ACE_CC_YYLSP_NEEDED
310 #ifdef ACE_CC_YYLEX_PARAM
311 #define ACE_CC_YYLEX ace_cc_yylex(&ace_cc_yylval, &ace_cc_yylloc, ACE_CC_YYLEX_PARAM)
313 #define ACE_CC_YYLEX ace_cc_yylex(&ace_cc_yylval, &ace_cc_yylloc)
315 #else /* not ACE_CC_YYLSP_NEEDED */
316 #ifdef ACE_CC_YYLEX_PARAM
317 #define ACE_CC_YYLEX ace_cc_yylex(&ace_cc_yylval, ACE_CC_YYLEX_PARAM)
319 #define ACE_CC_YYLEX ace_cc_yylex(&ace_cc_yylval)
321 #endif /* not ACE_CC_YYLSP_NEEDED */
324 /* If nonreentrant, generate the variables here */
326 #ifndef ACE_CC_YYPURE
328 int ace_cc_yychar
; /* the lookahead symbol */
329 ACE_CC_YYSTYPE ace_cc_yylval
; /* the semantic value of the */
330 /* lookahead symbol */
332 #ifdef ACE_CC_YYLSP_NEEDED
333 ACE_CC_YYLTYPE ace_cc_yylloc
; /* location data for the lookahead */
337 int ace_cc_yynerrs
; /* number of parse errors so far */
338 #endif /* not ACE_CC_YYPURE */
340 #if ACE_CC_YYDEBUG != 0
341 int ace_cc_yydebug
; /* nonzero means print parse trace */
342 /* Since this is uninitialized, it does not stop multiple parsers
346 /* ACE_CC_YYINITDEPTH indicates the initial size of the parser's stacks */
348 #ifndef ACE_CC_YYINITDEPTH
349 #define ACE_CC_YYINITDEPTH 200
352 /* ACE_CC_YYMAXDEPTH is the maximum size the stacks can grow to
353 (effective only if the built-in stack extension method is used). */
355 #if ACE_CC_YYMAXDEPTH == 0
356 #undef ACE_CC_YYMAXDEPTH
359 #ifndef ACE_CC_YYMAXDEPTH
360 #define ACE_CC_YYMAXDEPTH 10000
363 /* Define __ace_cc_yy_memcpy. Note that the size argument
364 should be passed with type unsigned int, because that is what the non-GCC
365 definitions require. With GCC, __builtin_memcpy takes an arg
366 of type size_t, but it can handle unsigned int. */
368 #if __GNUC__ > 1 /* GNU C and GNU C++ define this. */
369 #define __ace_cc_yy_memcpy(TO,FROM,COUNT) __builtin_memcpy(TO,FROM,COUNT)
370 #else /* not GNU C or C++ */
373 /* This is the most reliable way to avoid incompatibilities
374 in available built-in functions on various systems. */
376 __ace_cc_yy_memcpy (to
, from
, count
)
389 #else /* __cplusplus */
391 /* This is the most reliable way to avoid incompatibilities
392 in available built-in functions on various systems. */
394 __ace_cc_yy_memcpy (char *to
, char *from
, unsigned int count
)
408 /* The user can define ACE_CC_YYPARSE_PARAM as the name of an argument to be passed
409 into ace_cc_yyparse. The argument should have type void *.
410 It should actually point to an object.
411 Grammar actions can access the variable by casting it
412 to the proper pointer type. */
414 #ifdef ACE_CC_YYPARSE_PARAM
416 #define ACE_CC_YYPARSE_PARAM_ARG void *ACE_CC_YYPARSE_PARAM
417 #define ACE_CC_YYPARSE_PARAM_DECL
418 #else /* not __cplusplus */
419 #define ACE_CC_YYPARSE_PARAM_ARG ACE_CC_YYPARSE_PARAM
420 #define ACE_CC_YYPARSE_PARAM_DECL void *ACE_CC_YYPARSE_PARAM;
421 #endif /* not __cplusplus */
422 #else /* not ACE_CC_YYPARSE_PARAM */
423 #define ACE_CC_YYPARSE_PARAM_ARG
424 #define ACE_CC_YYPARSE_PARAM_DECL
425 #endif /* not ACE_CC_YYPARSE_PARAM */
427 /* Prevent warning if -Wstrict-prototypes. */
429 #ifdef ACE_CC_YYPARSE_PARAM
430 int ace_cc_yyparse (void *);
432 int ace_cc_yyparse ();
437 ace_cc_yyparse(ACE_CC_YYPARSE_PARAM_ARG
)
438 ACE_CC_YYPARSE_PARAM_DECL
443 ACE_CC_YYSTYPE
*ace_cc_yyvsp
;
444 int ace_cc_yyerrstatus
; /* number of tokens to shift before error messages enabled */
445 int ace_cc_yychar1
= 0; /* lookahead token as an internal (translated) token number */
447 short ace_cc_yyssa
[ACE_CC_YYINITDEPTH
]; /* the state stack */
448 ACE_CC_YYSTYPE ace_cc_yyvsa
[ACE_CC_YYINITDEPTH
]; /* the semantic value stack */
450 short *ace_cc_yyss
= ace_cc_yyssa
; /* refer to the stacks thru separate pointers */
451 ACE_CC_YYSTYPE
*ace_cc_yyvs
= ace_cc_yyvsa
; /* to allow ace_cc_yyoverflow to reallocate them elsewhere */
453 #ifdef ACE_CC_YYLSP_NEEDED
454 ACE_CC_YYLTYPE ace_cc_yylsa
[ACE_CC_YYINITDEPTH
]; /* the location stack */
455 ACE_CC_YYLTYPE
*ace_cc_yyls
= ace_cc_yylsa
;
456 ACE_CC_YYLTYPE
*ace_cc_yylsp
;
458 #define ACE_CC_YYPOPSTACK (ace_cc_yyvsp--, ace_cc_yyssp--, ace_cc_yylsp--)
460 #define ACE_CC_YYPOPSTACK (ace_cc_yyvsp--, ace_cc_yyssp--)
463 int ace_cc_yystacksize
= ACE_CC_YYINITDEPTH
;
464 int ace_cc_yyfree_stacks
= 0;
468 ACE_CC_YYSTYPE ace_cc_yylval
;
470 #ifdef ACE_CC_YYLSP_NEEDED
471 ACE_CC_YYLTYPE ace_cc_yylloc
;
475 ACE_CC_YYSTYPE ace_cc_yyval
; /* the variable used to return */
476 /* semantic values from the action */
481 #if ACE_CC_YYDEBUG != 0
483 ACE_OS::fprintf(stderr
, "Starting parse\n");
487 ace_cc_yyerrstatus
= 0;
489 ace_cc_yychar
= ACE_CC_YYEMPTY
; /* Cause a token to be read. */
491 /* Initialize stack pointers.
492 Waste one element of value and location stack
493 so that they stay on the same level as the state stack.
494 The wasted elements are never initialized. */
496 ace_cc_yyssp
= ace_cc_yyss
- 1;
497 ace_cc_yyvsp
= ace_cc_yyvs
;
498 #ifdef ACE_CC_YYLSP_NEEDED
499 ace_cc_yylsp
= ace_cc_yyls
;
502 /* Push a new state, which is found in ace_cc_yystate . */
503 /* In all cases, when you get here, the value and location stacks
504 have just been pushed. so pushing a state here evens the stacks. */
507 *++ace_cc_yyssp
= ace_cc_yystate
;
509 if (ace_cc_yyssp
>= ace_cc_yyss
+ ace_cc_yystacksize
- 1)
511 /* Give user a chance to reallocate the stack */
512 /* Use copies of these so that the &'s don't force the real ones into memory. */
513 ACE_CC_YYSTYPE
*ace_cc_yyvs1
= ace_cc_yyvs
;
514 short *ace_cc_yyss1
= ace_cc_yyss
;
515 #ifdef ACE_CC_YYLSP_NEEDED
516 ACE_CC_YYLTYPE
*ace_cc_yyls1
= ace_cc_yyls
;
519 /* Get the current used size of the three stacks, in elements. */
520 int size
= ace_cc_yyssp
- ace_cc_yyss
+ 1;
522 #ifdef ace_cc_yyoverflow
523 /* Each stack pointer address is followed by the size of
524 the data in use in that stack, in bytes. */
525 #ifdef ACE_CC_YYLSP_NEEDED
526 /* This used to be a conditional around just the two extra args,
527 but that might be undefined if ace_cc_yyoverflow is a macro. */
528 ace_cc_yyoverflow("parser stack overflow",
529 &ace_cc_yyss1
, size
* sizeof (*ace_cc_yyssp
),
530 &ace_cc_yyvs1
, size
* sizeof (*ace_cc_yyvsp
),
531 &ace_cc_yyls1
, size
* sizeof (*ace_cc_yylsp
),
532 &ace_cc_yystacksize
);
534 ace_cc_yyoverflow("parser stack overflow",
535 &ace_cc_yyss1
, size
* sizeof (*ace_cc_yyssp
),
536 &ace_cc_yyvs1
, size
* sizeof (*ace_cc_yyvsp
),
537 &ace_cc_yystacksize
);
540 ace_cc_yyss
= ace_cc_yyss1
; ace_cc_yyvs
= ace_cc_yyvs1
;
541 #ifdef ACE_CC_YYLSP_NEEDED
542 ace_cc_yyls
= ace_cc_yyls1
;
544 #else /* no ace_cc_yyoverflow */
545 /* Extend the stack our own way. */
546 if (ace_cc_yystacksize
>= ACE_CC_YYMAXDEPTH
)
548 ace_cc_yyerror("parser stack overflow");
549 if (ace_cc_yyfree_stacks
)
551 ACE_OS::free (ace_cc_yyss
);
552 ACE_OS::free (ace_cc_yyvs
);
553 #ifdef ACE_CC_YYLSP_NEEDED
554 ACE_OS::free (ace_cc_yyls
);
559 ace_cc_yystacksize
*= 2;
560 if (ace_cc_yystacksize
> ACE_CC_YYMAXDEPTH
)
561 ace_cc_yystacksize
= ACE_CC_YYMAXDEPTH
;
562 #ifndef ACE_CC_YYSTACK_USE_ALLOCA
563 ace_cc_yyfree_stacks
= 1;
565 ace_cc_yyss
= (short *) ACE_CC_YYSTACK_ALLOC (ace_cc_yystacksize
* sizeof (*ace_cc_yyssp
));
566 __ace_cc_yy_memcpy ((char *)ace_cc_yyss
, (char *)ace_cc_yyss1
,
567 size
* (unsigned int) sizeof (*ace_cc_yyssp
));
568 ace_cc_yyvs
= (ACE_CC_YYSTYPE
*) ACE_CC_YYSTACK_ALLOC (ace_cc_yystacksize
* sizeof (*ace_cc_yyvsp
));
569 __ace_cc_yy_memcpy ((char *)ace_cc_yyvs
, (char *)ace_cc_yyvs1
,
570 size
* (unsigned int) sizeof (*ace_cc_yyvsp
));
571 #ifdef ACE_CC_YYLSP_NEEDED
572 ace_cc_yyls
= (ACE_CC_YYLTYPE
*) ACE_CC_YYSTACK_ALLOC (ace_cc_yystacksize
* sizeof (*ace_cc_yylsp
));
573 __ace_cc_yy_memcpy ((char *)ace_cc_yyls
, (char *)ace_cc_yyls1
,
574 size
* (unsigned int) sizeof (*ace_cc_yylsp
));
576 #endif /* no ace_cc_yyoverflow */
578 ace_cc_yyssp
= ace_cc_yyss
+ size
- 1;
579 ace_cc_yyvsp
= ace_cc_yyvs
+ size
- 1;
580 #ifdef ACE_CC_YYLSP_NEEDED
581 ace_cc_yylsp
= ace_cc_yyls
+ size
- 1;
584 #if ACE_CC_YYDEBUG != 0
586 ACE_OS::fprintf(stderr
, "Stack size increased to %d\n", ace_cc_yystacksize
);
589 if (ace_cc_yyssp
>= ace_cc_yyss
+ ace_cc_yystacksize
- 1)
593 #if ACE_CC_YYDEBUG != 0
595 ACE_OS::fprintf(stderr
, "Entering state %d\n", ace_cc_yystate
);
598 goto ace_cc_yybackup
;
601 /* Do appropriate processing given the current state. */
602 /* Read a lookahead token if we need one and don't already have one. */
603 /* ace_cc_yyresume: */
605 /* First try to decide what to do without reference to lookahead token. */
607 ace_cc_yyn
= ace_cc_yypact
[ace_cc_yystate
];
608 if (ace_cc_yyn
== ACE_CC_YYFLAG
)
609 goto ace_cc_yydefault
;
611 /* Not known => get a lookahead token if don't already have one. */
613 /* ace_cc_yychar is either ACE_CC_YYEMPTY or ACE_CC_YYEOF
614 or a valid token in external form. */
616 if (ace_cc_yychar
== ACE_CC_YYEMPTY
)
618 #if ACE_CC_YYDEBUG != 0
620 ACE_OS::fprintf(stderr
, "Reading a token: ");
622 ace_cc_yychar
= ACE_CC_YYLEX
;
625 /* Convert token to internal form (in ace_cc_yychar1) for indexing tables with */
627 if (ace_cc_yychar
<= 0) /* This means end of input. */
630 ace_cc_yychar
= ACE_CC_YYEOF
; /* Don't call ACE_CC_YYLEX any more */
632 #if ACE_CC_YYDEBUG != 0
634 ACE_OS::fprintf(stderr
, "Now at end of input.\n");
639 ace_cc_yychar1
= ACE_CC_YYTRANSLATE(ace_cc_yychar
);
641 #if ACE_CC_YYDEBUG != 0
644 ACE_OS::fprintf (stderr
, "Next token is %d (%s", ace_cc_yychar
, ace_cc_yytname
[ace_cc_yychar1
]);
645 /* Give the individual parser a way to print the precise meaning
646 of a token, for further debugging info. */
647 #ifdef ACE_CC_YYPRINT
648 ACE_CC_YYPRINT (stderr
, ace_cc_yychar
, ace_cc_yylval
);
650 ACE_OS::fprintf (stderr
, ")\n");
655 ace_cc_yyn
+= ace_cc_yychar1
;
656 if (ace_cc_yyn
< 0 || ace_cc_yyn
> ACE_CC_YYLAST
|| ace_cc_yycheck
[ace_cc_yyn
] != ace_cc_yychar1
)
657 goto ace_cc_yydefault
;
659 ace_cc_yyn
= ace_cc_yytable
[ace_cc_yyn
];
661 /* ace_cc_yyn is what to do for this token type in this state.
662 Negative => reduce, -ace_cc_yyn is rule number.
663 Positive => shift, ace_cc_yyn is new state.
664 New state is final state => don't bother to shift,
666 0, or most negative number => error. */
670 if (ace_cc_yyn
== ACE_CC_YYFLAG
)
671 goto ace_cc_yyerrlab
;
672 ace_cc_yyn
= -ace_cc_yyn
;
673 goto ace_cc_yyreduce
;
675 else if (ace_cc_yyn
== 0)
676 goto ace_cc_yyerrlab
;
678 if (ace_cc_yyn
== ACE_CC_YYFINAL
)
681 /* Shift the lookahead token. */
683 #if ACE_CC_YYDEBUG != 0
685 ACE_OS::fprintf(stderr
, "Shifting token %d (%s), ", ace_cc_yychar
, ace_cc_yytname
[ace_cc_yychar1
]);
688 /* Discard the token being shifted unless it is eof. */
689 if (ace_cc_yychar
!= ACE_CC_YYEOF
)
690 ace_cc_yychar
= ACE_CC_YYEMPTY
;
692 *++ace_cc_yyvsp
= ace_cc_yylval
;
693 #ifdef ACE_CC_YYLSP_NEEDED
694 *++ace_cc_yylsp
= ace_cc_yylloc
;
697 /* count tokens shifted since error; after three, turn off error status. */
698 if (ace_cc_yyerrstatus
) ace_cc_yyerrstatus
--;
700 ace_cc_yystate
= ace_cc_yyn
;
701 goto ace_cc_yynewstate
;
703 /* Do the default action for the current state. */
706 ace_cc_yyn
= ace_cc_yydefact
[ace_cc_yystate
];
708 goto ace_cc_yyerrlab
;
710 /* Do a reduction. ace_cc_yyn is the number of a rule to reduce with. */
712 ace_cc_yylen
= ace_cc_yyr2
[ace_cc_yyn
];
713 if (ace_cc_yylen
> 0)
714 ace_cc_yyval
= ace_cc_yyvsp
[1-ace_cc_yylen
]; /* implement default value of the action */
716 #if ACE_CC_YYDEBUG != 0
721 ACE_OS::fprintf (stderr
, "Reducing via rule %d (line %d), ",
722 ace_cc_yyn
, ace_cc_yyrline
[ace_cc_yyn
]);
724 /* Print the symbols being reduced, and their result. */
725 for (i
= ace_cc_yyprhs
[ace_cc_yyn
]; ace_cc_yyrhs
[i
] > 0; i
++)
726 ACE_OS::fprintf (stderr
, "%s ", ace_cc_yytname
[ace_cc_yyrhs
[i
]]);
727 ACE_OS::fprintf (stderr
, " -> %s\n", ace_cc_yytname
[ace_cc_yyr1
[ace_cc_yyn
]]);
732 switch (ace_cc_yyn
) {
734 { cmdlist
->add(new CC_Sleep_Cmd(0));
735 /* dummy to check exeption in the last command */
736 if(cmdlist
->execute()!=0) //CC_FAIL
737 { ACE_OS::printf(" ** Test succeded!!\n"); }
739 { ACE_OS::printf(" ** Test FAILED!!\n"); } ;
742 { cmdlist
->add(ace_cc_yyvsp
[0].command
); ;
745 { cmdlist
->add(ace_cc_yyvsp
[0].command
); ;
748 { ace_cc_yyval
.command
= new CC_Start_Cmd(ace_cc_yyvsp
[-1].id
); ;
751 { ace_cc_yyval
.command
= new CC_CreateLockSet_Cmd(ace_cc_yyvsp
[-1].id
); ;
754 { ace_cc_yyval
.command
= new CC_CreateLockSet_Cmd(""); ;
757 { ace_cc_yyval
.command
= new CC_Lock_Cmd(ace_cc_yyvsp
[-2].id
, ace_cc_yyvsp
[-1].lock_mode
); ;
760 { ace_cc_yyval
.command
= new CC_Lock_Cmd("", ace_cc_yyvsp
[-1].lock_mode
); ;
763 { ace_cc_yyval
.command
= new CC_UnLock_Cmd(ace_cc_yyvsp
[-2].id
, ace_cc_yyvsp
[-1].lock_mode
); ;
766 { ace_cc_yyval
.command
= new CC_UnLock_Cmd("", ace_cc_yyvsp
[-1].lock_mode
); ;
769 { ace_cc_yyval
.command
= new CC_TryLock_Cmd(ace_cc_yyvsp
[-2].id
, ace_cc_yyvsp
[-1].lock_mode
); ;
772 { ace_cc_yyval
.command
= new CC_TryLock_Cmd("", ace_cc_yyvsp
[-1].lock_mode
); ;
775 { 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
); ;
778 { ace_cc_yyval
.command
= new CC_ChangeMode_Cmd("", ace_cc_yyvsp
[-2].lock_mode
, ace_cc_yyvsp
[-1].lock_mode
); ;
781 { ace_cc_yyval
.command
= new CC_Sleep_Cmd(ace_cc_yyvsp
[-1].num
); ;
784 { ace_cc_yyval
.command
= new CC_Wait_Cmd(""); ;
787 { ace_cc_yyval
.command
= new CC_Wait_Cmd(ace_cc_yyvsp
[-1].id
); ;
790 { ace_cc_yyval
.command
= new CC_Print_Cmd(ace_cc_yyvsp
[-1].id
); ;
793 { ace_cc_yyval
.command
= new CC_Lookup_Cmd(ace_cc_yyvsp
[-1].id
); ;
796 { cmdlist
->setrepeat(ace_cc_yyvsp
[-1].num
);
797 ace_cc_yyval
.command
= new CC_Dummy_Cmd();
800 { ace_cc_yyval
.command
= new CC_Excep_Cmd(ace_cc_yyvsp
[-1].id
); ;
803 {ace_cc_yyval
.id
= ace_cc_yyvsp
[0].id
; ;
806 {ace_cc_yyval
.id
= ace_cc_yyvsp
[0].id
; ;
809 {ace_cc_yyval
.id
= ace_cc_yyvsp
[0].id
; ;
812 { ace_cc_yyval
.lock_mode
= CosConcurrencyControl::read
; ;
815 { ace_cc_yyval
.lock_mode
= CosConcurrencyControl::intention_read
; ;
818 { ace_cc_yyval
.lock_mode
= CosConcurrencyControl::upgrade
; ;
821 { ace_cc_yyval
.lock_mode
= CosConcurrencyControl::write
; ;
824 { ace_cc_yyval
.lock_mode
= CosConcurrencyControl::intention_write
; ;
827 /* the action file gets copied in in place of this dollarsign */
830 ace_cc_yyvsp
-= ace_cc_yylen
;
831 ace_cc_yyssp
-= ace_cc_yylen
;
832 #ifdef ACE_CC_YYLSP_NEEDED
833 ace_cc_yylsp
-= ace_cc_yylen
;
836 #if ACE_CC_YYDEBUG != 0
839 short *ssp1
= ace_cc_yyss
- 1;
840 ACE_OS::fprintf (stderr
, "state stack now");
841 while (ssp1
!= ace_cc_yyssp
)
842 ACE_OS::fprintf (stderr
, " %d", *++ssp1
);
843 ACE_OS::fprintf (stderr
, "\n");
847 *++ace_cc_yyvsp
= ace_cc_yyval
;
849 #ifdef ACE_CC_YYLSP_NEEDED
851 if (ace_cc_yylen
== 0)
853 ace_cc_yylsp
->first_line
= ace_cc_yylloc
.first_line
;
854 ace_cc_yylsp
->first_column
= ace_cc_yylloc
.first_column
;
855 ace_cc_yylsp
->last_line
= (ace_cc_yylsp
-1)->last_line
;
856 ace_cc_yylsp
->last_column
= (ace_cc_yylsp
-1)->last_column
;
857 ace_cc_yylsp
->text
= 0;
861 ace_cc_yylsp
->last_line
= (ace_cc_yylsp
+ace_cc_yylen
-1)->last_line
;
862 ace_cc_yylsp
->last_column
= (ace_cc_yylsp
+ace_cc_yylen
-1)->last_column
;
866 /* Now "shift" the result of the reduction.
867 Determine what state that goes to,
868 based on the state we popped back to
869 and the rule number reduced by. */
871 ace_cc_yyn
= ace_cc_yyr1
[ace_cc_yyn
];
873 ace_cc_yystate
= ace_cc_yypgoto
[ace_cc_yyn
- ACE_CC_YYNTBASE
] + *ace_cc_yyssp
;
874 if (ace_cc_yystate
>= 0 && ace_cc_yystate
<= ACE_CC_YYLAST
&& ace_cc_yycheck
[ace_cc_yystate
] == *ace_cc_yyssp
)
875 ace_cc_yystate
= ace_cc_yytable
[ace_cc_yystate
];
877 ace_cc_yystate
= ace_cc_yydefgoto
[ace_cc_yyn
- ACE_CC_YYNTBASE
];
879 goto ace_cc_yynewstate
;
881 ace_cc_yyerrlab
: /* here on detecting error */
883 if (! ace_cc_yyerrstatus
)
884 /* If not already recovering from an error, report this error. */
888 #ifdef ACE_CC_YYERROR_VERBOSE
889 ace_cc_yyn
= ace_cc_yypact
[ace_cc_yystate
];
891 if (ace_cc_yyn
> ACE_CC_YYFLAG
&& ace_cc_yyn
< ACE_CC_YYLAST
)
898 /* Start X at -ace_cc_yyn if nec to avoid negative indexes in ace_cc_yycheck. */
899 for (x
= (ace_cc_yyn
< 0 ? -ace_cc_yyn
: 0);
900 x
< (sizeof(ace_cc_yytname
) / sizeof(char *)); x
++)
901 if (ace_cc_yycheck
[x
+ ace_cc_yyn
] == x
)
902 size
+= ACE_OS::strlen(ace_cc_yytname
[x
]) + 15, count
++;
903 msg
= (char *) ACE_OS::malloc(size
+ 15);
906 ACE_OS::strcpy(msg
, "parse error");
911 for (x
= (ace_cc_yyn
< 0 ? -ace_cc_yyn
: 0);
912 x
< (sizeof(ace_cc_yytname
) / sizeof(char *)); x
++)
913 if (ace_cc_yycheck
[x
+ ace_cc_yyn
] == x
)
915 ACE_OS::strcat(msg
, count
== 0 ? ", expecting `" : " or `");
916 ACE_OS::strcat(msg
, ace_cc_yytname
[x
]);
917 ACE_OS::strcat(msg
, "'");
925 ace_cc_yyerror ("parse error; also virtual memory exceeded");
928 #endif /* ACE_CC_YYERROR_VERBOSE */
929 ace_cc_yyerror("parse error");
932 goto ace_cc_yyerrlab1
;
933 ace_cc_yyerrlab1
: /* here on error raised explicitly by an action */
935 if (ace_cc_yyerrstatus
== 3)
937 /* if just tried and failed to reuse lookahead token after an error, discard it. */
939 /* return failure if at end of input */
940 if (ace_cc_yychar
== ACE_CC_YYEOF
)
943 #if ACE_CC_YYDEBUG != 0
945 ACE_OS::fprintf(stderr
, "Discarding token %d (%s).\n", ace_cc_yychar
, ace_cc_yytname
[ace_cc_yychar1
]);
948 ace_cc_yychar
= ACE_CC_YYEMPTY
;
951 /* Else will try to reuse lookahead token
952 after shifting the error token. */
954 ace_cc_yyerrstatus
= 3; /* Each real token shifted decrements this */
956 goto ace_cc_yyerrhandle
;
958 ace_cc_yyerrdefault
: /* current state does not do anything special for the error token. */
961 /* This is wrong; only states that explicitly want error tokens
962 should shift them. */
963 ace_cc_yyn
= ace_cc_yydefact
[ace_cc_yystate
]; /* If its default is to accept any token, ok. Otherwise pop it.*/
964 if (ace_cc_yyn
) goto ace_cc_yydefault
;
967 ace_cc_yyerrpop
: /* pop the current state because it cannot handle the error token */
969 if (ace_cc_yyssp
== ace_cc_yyss
) ACE_CC_YYABORT
;
971 ace_cc_yystate
= *--ace_cc_yyssp
;
972 #ifdef ACE_CC_YYLSP_NEEDED
976 #if ACE_CC_YYDEBUG != 0
979 short *ssp1
= ace_cc_yyss
- 1;
980 ACE_OS::fprintf (stderr
, "Error: state stack now");
981 while (ssp1
!= ace_cc_yyssp
)
982 ACE_OS::fprintf (stderr
, " %d", *++ssp1
);
983 ACE_OS::fprintf (stderr
, "\n");
989 ace_cc_yyn
= ace_cc_yypact
[ace_cc_yystate
];
990 if (ace_cc_yyn
== ACE_CC_YYFLAG
)
991 goto ace_cc_yyerrdefault
;
993 ace_cc_yyn
+= ACE_CC_YYTERROR
;
994 if (ace_cc_yyn
< 0 || ace_cc_yyn
> ACE_CC_YYLAST
|| ace_cc_yycheck
[ace_cc_yyn
] != ACE_CC_YYTERROR
)
995 goto ace_cc_yyerrdefault
;
997 ace_cc_yyn
= ace_cc_yytable
[ace_cc_yyn
];
1000 if (ace_cc_yyn
== ACE_CC_YYFLAG
)
1001 goto ace_cc_yyerrpop
;
1002 ace_cc_yyn
= -ace_cc_yyn
;
1003 goto ace_cc_yyreduce
;
1005 else if (ace_cc_yyn
== 0)
1006 goto ace_cc_yyerrpop
;
1008 if (ace_cc_yyn
== ACE_CC_YYFINAL
)
1011 #if ACE_CC_YYDEBUG != 0
1013 ACE_OS::fprintf(stderr
, "Shifting error token, ");
1016 *++ace_cc_yyvsp
= ace_cc_yylval
;
1017 #ifdef ACE_CC_YYLSP_NEEDED
1018 *++ace_cc_yylsp
= ace_cc_yylloc
;
1021 ace_cc_yystate
= ace_cc_yyn
;
1022 goto ace_cc_yynewstate
;
1025 /* ACE_CC_YYACCEPT comes here. */
1026 if (ace_cc_yyfree_stacks
)
1028 ACE_OS::free (ace_cc_yyss
);
1029 ACE_OS::free (ace_cc_yyvs
);
1030 #ifdef ACE_CC_YYLSP_NEEDED
1031 ACE_OS::free (ace_cc_yyls
);
1037 /* ACE_CC_YYABORT comes here. */
1038 if (ace_cc_yyfree_stacks
)
1040 ACE_OS::free (ace_cc_yyss
);
1041 ACE_OS::free (ace_cc_yyvs
);
1042 #ifdef ACE_CC_YYLSP_NEEDED
1043 ACE_OS::free (ace_cc_yyls
);
1051 ace_cc_yyerror (const char *s
)
1053 ACE_OS::printf ("%d: %s at %s in:\n%s\n",