summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/tests/Concurrency/CC_command.tab.cpp
blob: 3926230dd5c245077291d79268f7c304dfa1306e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
// $Id$
# line 19 "CC_command.y"
#include "CC_command.h"
#include "ace/ACE.h"
#include "orbsvcs/CosConcurrencyControlC.h"

int CC_commanderror(char *s);
int CC_commandlex(void);

extern int line_no;
extern char line_buf[500];
extern char *ace_cc_yytext;
extern CC_CommandList *cmdlist;

# line 32 "CC_command.y"
typedef union
#ifdef __cplusplus
	ACE_CC_YYSTYPE
#endif
 {
  CC_Command *command;
  CosConcurrencyControl::lock_mode lock_mode;
  char *id;
  int num;
} ACE_CC_YYSTYPE;
# define T_START_CMD 257
# define T_CREATE_CMD 258
# define T_LOCK_CMD 259
# define T_UNLOCK_CMD 260
# define T_TRYLOCK_CMD 261
# define T_CHANGEMODE_CMD 262
# define T_SLEEP_CMD 263
# define T_WAIT_CMD 264
# define T_REPEAT_CMD 265
# define T_EXCEP_CMD 266
# define T_PRINT_CMD 267
# define T_LOOKUP_CMD 268
# define T_TERM 269
# define T_READ 270
# define T_IREAD 271
# define T_UPGRADE 272
# define T_WRITE 273
# define T_IWRITE 274
# define T_IDENT 275
# define Q_STRING 276
# define T_NUM 277

#ifdef __STDC__
#include <stdlib.h>
#include <string.h>
#else
#include <malloc.h>
#include <memory.h>
#endif

/* #include <values.h> */

#ifdef __cplusplus

#ifndef ace_cc_yyerror
	void ace_cc_yyerror(const char *);
#endif

#ifndef ace_cc_yylex
#ifdef __EXTERN_C__
	extern "C" { int ace_cc_yylex(void); }
#else
	int ace_cc_yylex(void);
#endif
#endif
	int ace_cc_yyparse(void);

#endif
#define ace_cc_yyclearin ace_cc_yychar = -1
#define ace_cc_yyerrok ace_cc_yyerrflag = 0
extern int ace_cc_yychar;
extern int ace_cc_yyerrflag;
ACE_CC_YYSTYPE ace_cc_yylval;
ACE_CC_YYSTYPE ace_cc_yyval;
typedef int ace_cc_yytabelem;
#ifndef ACE_CC_YYMAXDEPTH
#define ACE_CC_YYMAXDEPTH 150
#endif
#if ACE_CC_YYMAXDEPTH > 0
int ace_cc_yy_ace_cc_yys[ACE_CC_YYMAXDEPTH], *ace_cc_yys = ace_cc_yy_ace_cc_yys;
ACE_CC_YYSTYPE ace_cc_yy_ace_cc_yyv[ACE_CC_YYMAXDEPTH], *ace_cc_yyv = ace_cc_yy_ace_cc_yyv;
#else	/* user does initial allocation */
int *ace_cc_yys;
ACE_CC_YYSTYPE *ace_cc_yyv;
#endif
static int ace_cc_yymaxdepth = ACE_CC_YYMAXDEPTH;
# define ACE_CC_YYERRCODE 256

# line 115 "CC_command.y"


int ace_cc_yyerror(char *s)
{
  printf("%d: %s at %s in:\n%s\n",
         line_no, s, ace_cc_yytext, line_buf);
  ACE_OS::exit(-1);
  return 0;
}
ace_cc_yytabelem ace_cc_yyexca[] ={
-1, 1,
	0, -1,
	-2, 0,
	};
# define ACE_CC_YYNPROD 31
# define ACE_CC_YYLAST 102
ace_cc_yytabelem ace_cc_yyact[]={

    24,    25,    26,    27,    28,    21,     4,     5,     6,     7,
     8,     9,    10,    11,    14,    15,    12,    13,    24,    25,
    26,    27,    28,    40,    36,    64,    20,    35,    38,    42,
    63,    37,    21,    21,    18,    61,    60,    59,    58,    57,
    56,    55,    54,    53,    50,    48,    46,    44,    43,    23,
     2,     3,     1,    19,    16,    41,    17,    30,    32,    34,
    22,    29,    31,    33,     0,     0,     0,    39,     0,     0,
     0,     0,    45,     0,     0,     0,     0,     0,     0,    47,
     0,    49,     0,    51,    52,     0,     0,     0,     0,     0,
     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
     0,    62 };
ace_cc_yytabelem ace_cc_yypact[]={

  -251,-10000000,  -251,-10000000,  -241,  -243,  -270,  -270,  -270,  -270,
  -250,  -245,  -248,  -242,  -254,  -246,-10000000,  -221,-10000000,  -222,
-10000000,-10000000,  -252,  -223,-10000000,-10000000,-10000000,-10000000,-10000000,  -252,
  -224,  -252,  -225,  -252,  -252,  -226,-10000000,  -227,  -228,  -229,
  -230,  -231,-10000000,-10000000,-10000000,  -232,-10000000,  -233,-10000000,  -234,
-10000000,  -252,  -239,-10000000,-10000000,-10000000,-10000000,-10000000,-10000000,-10000000,
-10000000,-10000000,  -244,-10000000,-10000000 };
ace_cc_yytabelem ace_cc_yypgo[]={

     0,    51,    56,    53,    55,    49,    52,    50 };
ace_cc_yytabelem ace_cc_yyr1[]={

     0,     6,     6,     7,     7,     1,     1,     1,     1,     1,
     1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
     1,     1,     1,     2,     3,     4,     5,     5,     5,     5,
     5 };
ace_cc_yytabelem ace_cc_yyr2[]={

     0,     0,     3,     5,     3,     7,     7,     5,     9,     7,
     9,     7,     9,     7,    11,     9,     7,     5,     7,     7,
     7,     7,     7,     3,     3,     3,     3,     3,     3,     3,
     3 };
ace_cc_yytabelem ace_cc_yychk[]={

-10000000,    -6,    -7,    -1,   257,   258,   259,   260,   261,   262,
   263,   264,   267,   268,   265,   266,    -1,    -2,   275,    -3,
   269,   275,    -3,    -5,   270,   271,   272,   273,   274,    -3,
    -5,    -3,    -5,    -3,    -5,   277,   269,   276,   276,    -3,
   277,    -4,   275,   269,   269,    -5,   269,    -5,   269,    -5,
   269,    -5,    -5,   269,   269,   269,   269,   269,   269,   269,
   269,   269,    -5,   269,   269 };
ace_cc_yytabelem ace_cc_yydef[]={

     1,    -2,     2,     4,     0,     0,     0,     0,     0,     0,
     0,     0,     0,     0,     0,     0,     3,     0,    23,     0,
     7,    24,     0,     0,    26,    27,    28,    29,    30,     0,
     0,     0,     0,     0,     0,     0,    17,     0,     0,     0,
     0,     0,    25,     5,     6,     0,     9,     0,    11,     0,
    13,     0,     0,    16,    18,    19,    20,    21,    22,     8,
    10,    12,     0,    15,    14 };
typedef struct
#ifdef __cplusplus
	ace_cc_yytoktype
#endif
{ char *t_name; int t_val; } ace_cc_yytoktype;
#ifndef ACE_CC_YYDEBUG
#	define ACE_CC_YYDEBUG	0	/* don't allow debugging */
#endif

#if ACE_CC_YYDEBUG

ace_cc_yytoktype ace_cc_yytoks[] =
{
	"T_START_CMD",	257,
	"T_CREATE_CMD",	258,
	"T_LOCK_CMD",	259,
	"T_UNLOCK_CMD",	260,
	"T_TRYLOCK_CMD",	261,
	"T_CHANGEMODE_CMD",	262,
	"T_SLEEP_CMD",	263,
	"T_WAIT_CMD",	264,
	"T_REPEAT_CMD",	265,
	"T_EXCEP_CMD",	266,
	"T_PRINT_CMD",	267,
	"T_LOOKUP_CMD",	268,
	"T_TERM",	269,
	"T_READ",	270,
	"T_IREAD",	271,
	"T_UPGRADE",	272,
	"T_WRITE",	273,
	"T_IWRITE",	274,
	"T_IDENT",	275,
	"Q_STRING",	276,
	"T_NUM",	277,
	"-unknown-",	-1	/* ends search */
};

char * ace_cc_yyreds[] =
{
	"-no such reduction-",
	"start : /* empty */",
	"start : cmd_list",
	"cmd_list : cmd_list cmd",
	"cmd_list : cmd",
	"cmd : T_START_CMD config_file_name T_TERM",
	"cmd : T_CREATE_CMD lock_set_name T_TERM",
	"cmd : T_CREATE_CMD T_TERM",
	"cmd : T_LOCK_CMD lock_set_name lock_mode T_TERM",
	"cmd : T_LOCK_CMD lock_mode T_TERM",
	"cmd : T_UNLOCK_CMD lock_set_name lock_mode T_TERM",
	"cmd : T_UNLOCK_CMD lock_mode T_TERM",
	"cmd : T_TRYLOCK_CMD lock_set_name lock_mode T_TERM",
	"cmd : T_TRYLOCK_CMD lock_mode T_TERM",
	"cmd : T_CHANGEMODE_CMD lock_set_name lock_mode lock_mode T_TERM",
	"cmd : T_CHANGEMODE_CMD lock_mode lock_mode T_TERM",
	"cmd : T_SLEEP_CMD T_NUM T_TERM",
	"cmd : T_WAIT_CMD T_TERM",
	"cmd : T_WAIT_CMD Q_STRING T_TERM",
	"cmd : T_PRINT_CMD Q_STRING T_TERM",
	"cmd : T_LOOKUP_CMD lock_set_name T_TERM",
	"cmd : T_REPEAT_CMD T_NUM T_TERM",
	"cmd : T_EXCEP_CMD exception_name T_TERM",
	"config_file_name : T_IDENT",
	"lock_set_name : T_IDENT",
	"exception_name : T_IDENT",
	"lock_mode : T_READ",
	"lock_mode : T_IREAD",
	"lock_mode : T_UPGRADE",
	"lock_mode : T_WRITE",
	"lock_mode : T_IWRITE",
};
#endif /* ACE_CC_YYDEBUG */
# line	1 "/usr/ccs/bin/yaccpar"
/*
 * Copyright (c) 1993 by Sun Microsystems, Inc.
 */

/* #pragma ident	"@(#)yaccpar	6.12	93/06/07 SMI" */

/*
** Skeleton parser driver for yacc output
*/

/*
** yacc user known macros and defines
*/
#define ACE_CC_YYERROR		goto ace_cc_yyerrlab
#define ACE_CC_YYACCEPT	return(0)
#define ACE_CC_YYABORT		return(1)
#define ACE_CC_YYBACKUP( newtoken, newvalue )\
{\
	if ( ace_cc_yychar >= 0 || ( ace_cc_yyr2[ ace_cc_yytmp ] >> 1 ) != 1 )\
	{\
		ace_cc_yyerror( "syntax error - cannot backup" );\
		goto ace_cc_yyerrlab;\
	}\
	ace_cc_yychar = newtoken;\
	ace_cc_yystate = *ace_cc_yyps;\
	ace_cc_yylval = newvalue;\
	goto ace_cc_yynewstate;\
}
#define ACE_CC_YYRECOVERING()	(!!ace_cc_yyerrflag)
#define ACE_CC_YYNEW(type)	malloc(sizeof(type) * ace_cc_yynewmax)
#define ACE_CC_YYCOPY(to, from, type) \
	(type *) memcpy(to, (char *) from, ace_cc_yynewmax * sizeof(type))
#define ACE_CC_YYENLARGE( from, type) \
	(type *) realloc((char *) from, ace_cc_yynewmax * sizeof(type))
#ifndef ACE_CC_YYDEBUG
#	define ACE_CC_YYDEBUG	1	/* make debugging available */
#endif

/*
** user known globals
*/
int ace_cc_yydebug;			/* set to 1 to get debugging */

/*
** driver internal defines
*/
#define ACE_CC_YYFLAG		(-10000000)

/*
** global variables used by the parser
*/
ACE_CC_YYSTYPE *ace_cc_yypv;			/* top of value stack */
int *ace_cc_yyps;			/* top of state stack */

int ace_cc_yystate;			/* current state */
int ace_cc_yytmp;			/* extra var (lasts between blocks) */

int ace_cc_yynerrs;			/* number of errors */
int ace_cc_yyerrflag;			/* error recovery flag */
int ace_cc_yychar;			/* current input token number */



#ifdef ACE_CC_YYNMBCHARS
#define ACE_CC_YYLEX()		ace_cc_yycvtok(ace_cc_yylex())
/*
** ace_cc_yycvtok - return a token if i is a wchar_t value that exceeds 255.
**	If i<255, i itself is the token.  If i>255 but the neither
**	of the 30th or 31st bit is on, i is already a token.
*/
#if defined(__STDC__) || defined(__cplusplus)
int ace_cc_yycvtok(int i)
#else
int ace_cc_yycvtok(i) int i;
#endif
{
	int first = 0;
	int last = ACE_CC_YYNMBCHARS - 1;
	int mid;
	wchar_t j;

	if(i&0x60000000){/*Must convert to a token. */
		if( ace_cc_yymbchars[last].character < i ){
			return i;/*Giving up*/
		}
		while ((last>=first)&&(first>=0)) {/*Binary search loop*/
			mid = (first+last)/2;
			j = ace_cc_yymbchars[mid].character;
			if( j==i ){/*Found*/
				return ace_cc_yymbchars[mid].tvalue;
			}else if( j<i ){
				first = mid + 1;
			}else{
				last = mid -1;
			}
		}
		/*No entry in the table.*/
		return i;/* Giving up.*/
	}else{/* i is already a token. */
		return i;
	}
}
#else/*!ACE_CC_YYNMBCHARS*/
#define ACE_CC_YYLEX()		ace_cc_yylex()
#endif/*!ACE_CC_YYNMBCHARS*/

/*
** ace_cc_yyparse - return 0 if worked, 1 if syntax error not recovered from
*/
#if defined(__STDC__) || defined(__cplusplus)
int ace_cc_yyparse(void)
#else
int ace_cc_yyparse()
#endif
{
	register ACE_CC_YYSTYPE *ace_cc_yypvt;	/* top of value stack for $vars */

#if defined(__cplusplus) || defined(lint)
/*
	hacks to please C++ and lint - goto's inside switch should never be
	executed; ace_cc_yypvt is set to 0 to avoid "used before set" warning.
*/
	static int __yaccpar_lint_hack__ = 0;
	switch (__yaccpar_lint_hack__)
	{
		case 1: goto ace_cc_yyerrlab;
		case 2: goto ace_cc_yynewstate;
	}
	ace_cc_yypvt = 0;
#endif

	/*
	** Initialize externals - ace_cc_yyparse may be called more than once
	*/
	ace_cc_yypv = &ace_cc_yyv[-1];
	ace_cc_yyps = &ace_cc_yys[-1];
	ace_cc_yystate = 0;
	ace_cc_yytmp = 0;
	ace_cc_yynerrs = 0;
	ace_cc_yyerrflag = 0;
	ace_cc_yychar = -1;

#if ACE_CC_YYMAXDEPTH <= 0
	if (ace_cc_yymaxdepth <= 0)
	{
		if ((ace_cc_yymaxdepth = ACE_CC_YYEXPAND(0)) <= 0)
		{
			ace_cc_yyerror("yacc initialization error");
			ACE_CC_YYABORT;
		}
	}
#endif

	{
		register ACE_CC_YYSTYPE *ace_cc_yy_pv;	/* top of value stack */
		register int *ace_cc_yy_ps;		/* top of state stack */
		register int ace_cc_yy_state;		/* current state */
		register int  ace_cc_yy_n;		/* internal state number info */
	goto ace_cc_yystack;	/* moved from 6 lines above to here to please C++ */

		/*
		** get globals into registers.
		** branch to here only if ACE_CC_YYBACKUP was called.
		*/
	ace_cc_yynewstate:
		ace_cc_yy_pv = ace_cc_yypv;
		ace_cc_yy_ps = ace_cc_yyps;
		ace_cc_yy_state = ace_cc_yystate;
		goto ace_cc_yy_newstate;

		/*
		** get globals into registers.
		** either we just started, or we just finished a reduction
		*/
	ace_cc_yystack:
		ace_cc_yy_pv = ace_cc_yypv;
		ace_cc_yy_ps = ace_cc_yyps;
		ace_cc_yy_state = ace_cc_yystate;

		/*
		** top of for (;;) loop while no reductions done
		*/
	ace_cc_yy_stack:
		/*
		** put a state and value onto the stacks
		*/
#if ACE_CC_YYDEBUG
		/*
		** if debugging, look up token value in list of value vs.
		** name pairs.  0 and negative (-1) are special values.
		** Note: linear search is used since time is not a real
		** consideration while debugging.
		*/
		if ( ace_cc_yydebug )
		{
			register int ace_cc_yy_i;

			printf( "State %d, token ", ace_cc_yy_state );
			if ( ace_cc_yychar == 0 )
				printf( "end-of-file\n" );
			else if ( ace_cc_yychar < 0 )
				printf( "-none-\n" );
			else
			{
				for ( ace_cc_yy_i = 0; ace_cc_yytoks[ace_cc_yy_i].t_val >= 0;
					ace_cc_yy_i++ )
				{
					if ( ace_cc_yytoks[ace_cc_yy_i].t_val == ace_cc_yychar )
						break;
				}
				printf( "%s\n", ace_cc_yytoks[ace_cc_yy_i].t_name );
			}
		}
#endif /* ACE_CC_YYDEBUG */
		if ( ++ace_cc_yy_ps >= &ace_cc_yys[ ace_cc_yymaxdepth ] )	/* room on stack? */
		{
			/*
			** reallocate and recover.  Note that pointers
			** have to be reset, or bad things will happen
			*/
			int ace_cc_yyps_index = (ace_cc_yy_ps - ace_cc_yys);
			int ace_cc_yypv_index = (ace_cc_yy_pv - ace_cc_yyv);
			int ace_cc_yypvt_index = (ace_cc_yypvt - ace_cc_yyv);
			int ace_cc_yynewmax;
#ifdef ACE_CC_YYEXPAND
			ace_cc_yynewmax = ACE_CC_YYEXPAND(ace_cc_yymaxdepth);
#else
			ace_cc_yynewmax = 2 * ace_cc_yymaxdepth;	/* double table size */
			if (ace_cc_yymaxdepth == ACE_CC_YYMAXDEPTH)	/* first time growth */
			{
				char *newace_cc_yys = (char *)ACE_CC_YYNEW(int);
				char *newace_cc_yyv = (char *)ACE_CC_YYNEW(ACE_CC_YYSTYPE);
				if (newace_cc_yys != 0 && newace_cc_yyv != 0)
				{
					ace_cc_yys = ACE_CC_YYCOPY(newace_cc_yys, ace_cc_yys, int);
					ace_cc_yyv = ACE_CC_YYCOPY(newace_cc_yyv, ace_cc_yyv, ACE_CC_YYSTYPE);
				}
				else
					ace_cc_yynewmax = 0;	/* failed */
			}
			else				/* not first time */
			{
				ace_cc_yys = ACE_CC_YYENLARGE(ace_cc_yys, int);
				ace_cc_yyv = ACE_CC_YYENLARGE(ace_cc_yyv, ACE_CC_YYSTYPE);
				if (ace_cc_yys == 0 || ace_cc_yyv == 0)
					ace_cc_yynewmax = 0;	/* failed */
			}
#endif
			if (ace_cc_yynewmax <= ace_cc_yymaxdepth)	/* tables not expanded */
			{
				ace_cc_yyerror( "yacc stack overflow" );
				ACE_CC_YYABORT;
			}
			ace_cc_yymaxdepth = ace_cc_yynewmax;

			ace_cc_yy_ps = ace_cc_yys + ace_cc_yyps_index;
			ace_cc_yy_pv = ace_cc_yyv + ace_cc_yypv_index;
			ace_cc_yypvt = ace_cc_yyv + ace_cc_yypvt_index;
		}
		*ace_cc_yy_ps = ace_cc_yy_state;
		*++ace_cc_yy_pv = ace_cc_yyval;

		/*
		** we have a new state - find out what to do
		*/
	ace_cc_yy_newstate:
		if ( ( ace_cc_yy_n = ace_cc_yypact[ ace_cc_yy_state ] ) <= ACE_CC_YYFLAG )
			goto ace_cc_yydefault;		/* simple state */
#if ACE_CC_YYDEBUG
		/*
		** if debugging, need to mark whether new token grabbed
		*/
		ace_cc_yytmp = ace_cc_yychar < 0;
#endif
		if ( ( ace_cc_yychar < 0 ) && ( ( ace_cc_yychar = ACE_CC_YYLEX() ) < 0 ) )
			ace_cc_yychar = 0;		/* reached EOF */
#if ACE_CC_YYDEBUG
		if ( ace_cc_yydebug && ace_cc_yytmp )
		{
			register int ace_cc_yy_i;

			printf( "Received token " );
			if ( ace_cc_yychar == 0 )
				printf( "end-of-file\n" );
			else if ( ace_cc_yychar < 0 )
				printf( "-none-\n" );
			else
			{
				for ( ace_cc_yy_i = 0; ace_cc_yytoks[ace_cc_yy_i].t_val >= 0;
					ace_cc_yy_i++ )
				{
					if ( ace_cc_yytoks[ace_cc_yy_i].t_val == ace_cc_yychar )
						break;
				}
				printf( "%s\n", ace_cc_yytoks[ace_cc_yy_i].t_name );
			}
		}
#endif /* ACE_CC_YYDEBUG */
		if ( ( ( ace_cc_yy_n += ace_cc_yychar ) < 0 ) || ( ace_cc_yy_n >= ACE_CC_YYLAST ) )
			goto ace_cc_yydefault;
		if ( ace_cc_yychk[ ace_cc_yy_n = ace_cc_yyact[ ace_cc_yy_n ] ] == ace_cc_yychar )	/*valid shift*/
		{
			ace_cc_yychar = -1;
			ace_cc_yyval = ace_cc_yylval;
			ace_cc_yy_state = ace_cc_yy_n;
			if ( ace_cc_yyerrflag > 0 )
				ace_cc_yyerrflag--;
			goto ace_cc_yy_stack;
		}

	ace_cc_yydefault:
		if ( ( ace_cc_yy_n = ace_cc_yydef[ ace_cc_yy_state ] ) == -2 )
		{
#if ACE_CC_YYDEBUG
			ace_cc_yytmp = ace_cc_yychar < 0;
#endif
			if ( ( ace_cc_yychar < 0 ) && ( ( ace_cc_yychar = ACE_CC_YYLEX() ) < 0 ) )
				ace_cc_yychar = 0;		/* reached EOF */
#if ACE_CC_YYDEBUG
			if ( ace_cc_yydebug && ace_cc_yytmp )
			{
				register int ace_cc_yy_i;

				printf( "Received token " );
				if ( ace_cc_yychar == 0 )
					printf( "end-of-file\n" );
				else if ( ace_cc_yychar < 0 )
					printf( "-none-\n" );
				else
				{
					for ( ace_cc_yy_i = 0;
						ace_cc_yytoks[ace_cc_yy_i].t_val >= 0;
						ace_cc_yy_i++ )
					{
						if ( ace_cc_yytoks[ace_cc_yy_i].t_val
							== ace_cc_yychar )
						{
							break;
						}
					}
					printf( "%s\n", ace_cc_yytoks[ace_cc_yy_i].t_name );
				}
			}
#endif /* ACE_CC_YYDEBUG */
			/*
			** look through exception table
			*/
			{
				register int *ace_cc_yyxi = ace_cc_yyexca;

				while ( ( *ace_cc_yyxi != -1 ) ||
					( ace_cc_yyxi[1] != ace_cc_yy_state ) )
				{
					ace_cc_yyxi += 2;
				}
				while ( ( *(ace_cc_yyxi += 2) >= 0 ) &&
					( *ace_cc_yyxi != ace_cc_yychar ) )
					;
				if ( ( ace_cc_yy_n = ace_cc_yyxi[1] ) < 0 )
					ACE_CC_YYACCEPT;
			}
		}

		/*
		** check for syntax error
		*/
		if ( ace_cc_yy_n == 0 )	/* have an error */
		{
			/* no worry about speed here! */
			switch ( ace_cc_yyerrflag )
			{
			case 0:		/* new error */
				ace_cc_yyerror( "syntax error" );
				goto skip_init;
			ace_cc_yyerrlab:
				/*
				** get globals into registers.
				** we have a user generated syntax type error
				*/
				ace_cc_yy_pv = ace_cc_yypv;
				ace_cc_yy_ps = ace_cc_yyps;
				ace_cc_yy_state = ace_cc_yystate;
			skip_init:
				ace_cc_yynerrs++;
				/* FALLTHRU */
			case 1:
			case 2:		/* incompletely recovered error */
					/* try again... */
				ace_cc_yyerrflag = 3;
				/*
				** find state where "error" is a legal
				** shift action
				*/
				while ( ace_cc_yy_ps >= ace_cc_yys )
				{
					ace_cc_yy_n = ace_cc_yypact[ *ace_cc_yy_ps ] + ACE_CC_YYERRCODE;
					if ( ace_cc_yy_n >= 0 && ace_cc_yy_n < ACE_CC_YYLAST &&
						ace_cc_yychk[ace_cc_yyact[ace_cc_yy_n]] == ACE_CC_YYERRCODE)					{
						/*
						** simulate shift of "error"
						*/
						ace_cc_yy_state = ace_cc_yyact[ ace_cc_yy_n ];
						goto ace_cc_yy_stack;
					}
					/*
					** current state has no shift on
					** "error", pop stack
					*/
#if ACE_CC_YYDEBUG
#	define _POP_ "Error recovery pops state %d, uncovers state %d\n"
					if ( ace_cc_yydebug )
						printf( _POP_, *ace_cc_yy_ps,
							ace_cc_yy_ps[-1] );
#	undef _POP_
#endif
					ace_cc_yy_ps--;
					ace_cc_yy_pv--;
				}
				/*
				** there is no state on stack with "error" as
				** a valid shift.  give up.
				*/
				ACE_CC_YYABORT;
			case 3:		/* no shift yet; eat a token */
#if ACE_CC_YYDEBUG
				/*
				** if debugging, look up token in list of
				** pairs.  0 and negative shouldn't occur,
				** but since timing doesn't matter when
				** debugging, it doesn't hurt to leave the
				** tests here.
				*/
				if ( ace_cc_yydebug )
				{
					register int ace_cc_yy_i;

					printf( "Error recovery discards " );
					if ( ace_cc_yychar == 0 )
						printf( "token end-of-file\n" );
					else if ( ace_cc_yychar < 0 )
						printf( "token -none-\n" );
					else
					{
						for ( ace_cc_yy_i = 0;
							ace_cc_yytoks[ace_cc_yy_i].t_val >= 0;
							ace_cc_yy_i++ )
						{
							if ( ace_cc_yytoks[ace_cc_yy_i].t_val
								== ace_cc_yychar )
							{
								break;
							}
						}
						printf( "token %s\n",
							ace_cc_yytoks[ace_cc_yy_i].t_name );
					}
				}
#endif /* ACE_CC_YYDEBUG */
				if ( ace_cc_yychar == 0 )	/* reached EOF. quit */
					ACE_CC_YYABORT;
				ace_cc_yychar = -1;
				goto ace_cc_yy_newstate;
			}
		}/* end if ( ace_cc_yy_n == 0 ) */
		/*
		** reduction by production ace_cc_yy_n
		** put stack tops, etc. so things right after switch
		*/
#if ACE_CC_YYDEBUG
		/*
		** if debugging, print the string that is the user's
		** specification of the reduction which is just about
		** to be done.
		*/
		if ( ace_cc_yydebug )
			printf( "Reduce by (%d) \"%s\"\n",
				ace_cc_yy_n, ace_cc_yyreds[ ace_cc_yy_n ] );
#endif
		ace_cc_yytmp = ace_cc_yy_n;			/* value to switch over */
		ace_cc_yypvt = ace_cc_yy_pv;			/* $vars top of value stack */
		/*
		** Look in goto table for next state
		** Sorry about using ace_cc_yy_state here as temporary
		** register variable, but why not, if it works...
		** If ace_cc_yyr2[ ace_cc_yy_n ] doesn't have the low order bit
		** set, then there is no action to be done for
		** this reduction.  So, no saving & unsaving of
		** registers done.  The only difference between the
		** code just after the if and the body of the if is
		** the goto ace_cc_yy_stack in the body.  This way the test
		** can be made before the choice of what to do is needed.
		*/
		{
			/* length of production doubled with extra bit */
			register int ace_cc_yy_len = ace_cc_yyr2[ ace_cc_yy_n ];

			if ( !( ace_cc_yy_len & 01 ) )
			{
				ace_cc_yy_len >>= 1;
				ace_cc_yyval = ( ace_cc_yy_pv -= ace_cc_yy_len )[1];	/* $$ = $1 */
				ace_cc_yy_state = ace_cc_yypgo[ ace_cc_yy_n = ace_cc_yyr1[ ace_cc_yy_n ] ] +
					*( ace_cc_yy_ps -= ace_cc_yy_len ) + 1;
				if ( ace_cc_yy_state >= ACE_CC_YYLAST ||
					ace_cc_yychk[ ace_cc_yy_state =
					ace_cc_yyact[ ace_cc_yy_state ] ] != -ace_cc_yy_n )
				{
					ace_cc_yy_state = ace_cc_yyact[ ace_cc_yypgo[ ace_cc_yy_n ] ];
				}
				goto ace_cc_yy_stack;
			}
			ace_cc_yy_len >>= 1;
			ace_cc_yyval = ( ace_cc_yy_pv -= ace_cc_yy_len )[1];	/* $$ = $1 */
			ace_cc_yy_state = ace_cc_yypgo[ ace_cc_yy_n = ace_cc_yyr1[ ace_cc_yy_n ] ] +
				*( ace_cc_yy_ps -= ace_cc_yy_len ) + 1;
			if ( ace_cc_yy_state >= ACE_CC_YYLAST ||
				ace_cc_yychk[ ace_cc_yy_state = ace_cc_yyact[ ace_cc_yy_state ] ] != -ace_cc_yy_n )
			{
				ace_cc_yy_state = ace_cc_yyact[ ace_cc_yypgo[ ace_cc_yy_n ] ];
			}
		}
					/* save until reenter driver code */
		ace_cc_yystate = ace_cc_yy_state;
		ace_cc_yyps = ace_cc_yy_ps;
		ace_cc_yypv = ace_cc_yy_pv;
	}
	/*
	** code supplied by user is placed in this switch
	*/
	switch( ace_cc_yytmp )
	{

case 2:
# line 52 "CC_command.y"
{ cmdlist->add(new CC_Sleep_Cmd(0));
			   /* dummy to check exeption in the last command */
		  if(cmdlist->execute()!=0) //CC_FAIL
                    { printf(" ** Test succeded!!\n"); }
                  else
                    { printf(" ** Test FAILED!!\n"); } } break;
case 3:
# line 60 "CC_command.y"
{ cmdlist->add(ace_cc_yypvt[-0].command); } break;
case 4:
# line 61 "CC_command.y"
{ cmdlist->add(ace_cc_yypvt[-0].command); } break;
case 5:
# line 65 "CC_command.y"
{ ace_cc_yyval.command = new CC_Start_Cmd(ace_cc_yypvt[-1].id); } break;
case 6:
# line 67 "CC_command.y"
{ ace_cc_yyval.command = new CC_CreateLockSet_Cmd(ace_cc_yypvt[-1].id); } break;
case 7:
# line 69 "CC_command.y"
{ ace_cc_yyval.command = new CC_CreateLockSet_Cmd(""); } break;
case 8:
# line 71 "CC_command.y"
{ ace_cc_yyval.command = new CC_Lock_Cmd(ace_cc_yypvt[-2].id, ace_cc_yypvt[-1].lock_mode); } break;
case 9:
# line 73 "CC_command.y"
{ ace_cc_yyval.command = new CC_Lock_Cmd("", ace_cc_yypvt[-1].lock_mode); } break;
case 10:
# line 75 "CC_command.y"
{ ace_cc_yyval.command = new CC_UnLock_Cmd(ace_cc_yypvt[-2].id, ace_cc_yypvt[-1].lock_mode); } break;
case 11:
# line 77 "CC_command.y"
{ ace_cc_yyval.command = new CC_UnLock_Cmd("", ace_cc_yypvt[-1].lock_mode); } break;
case 12:
# line 79 "CC_command.y"
{ ace_cc_yyval.command = new CC_TryLock_Cmd(ace_cc_yypvt[-2].id, ace_cc_yypvt[-1].lock_mode); } break;
case 13:
# line 81 "CC_command.y"
{ ace_cc_yyval.command = new CC_TryLock_Cmd("", ace_cc_yypvt[-1].lock_mode); } break;
case 14:
# line 83 "CC_command.y"
{ ace_cc_yyval.command = new CC_ChangeMode_Cmd(ace_cc_yypvt[-3].id, ace_cc_yypvt[-2].lock_mode, ace_cc_yypvt[-1].lock_mode); } break;
case 15:
# line 85 "CC_command.y"
{ ace_cc_yyval.command = new CC_ChangeMode_Cmd("", ace_cc_yypvt[-2].lock_mode, ace_cc_yypvt[-1].lock_mode); } break;
case 16:
# line 87 "CC_command.y"
{ ace_cc_yyval.command = new CC_Sleep_Cmd(ace_cc_yypvt[-1].num); } break;
case 17:
# line 89 "CC_command.y"
{ ace_cc_yyval.command = new CC_Wait_Cmd(""); } break;
case 18:
# line 91 "CC_command.y"
{ ace_cc_yyval.command = new CC_Wait_Cmd(ace_cc_yypvt[-1].id); } break;
case 19:
# line 93 "CC_command.y"
{ ace_cc_yyval.command = new CC_Print_Cmd(ace_cc_yypvt[-1].id); } break;
case 20:
# line 95 "CC_command.y"
{ ace_cc_yyval.command = new CC_Lookup_Cmd(ace_cc_yypvt[-1].id); } break;
case 21:
# line 97 "CC_command.y"
{ cmdlist->setrepeat(ace_cc_yypvt[-1].num);
                          ace_cc_yyval.command = new CC_Dummy_Cmd();} break;
case 22:
# line 100 "CC_command.y"
{ ace_cc_yyval.command = new CC_Excep_Cmd(ace_cc_yypvt[-1].id); } break;
case 23:
# line 103 "CC_command.y"
{ace_cc_yyval.id = ace_cc_yypvt[-0].id; } break;
case 24:
# line 105 "CC_command.y"
{ace_cc_yyval.id = ace_cc_yypvt[-0].id; } break;
case 25:
# line 107 "CC_command.y"
{ace_cc_yyval.id = ace_cc_yypvt[-0].id; } break;
case 26:
# line 109 "CC_command.y"
{ ace_cc_yyval.lock_mode = CosConcurrencyControl::read; } break;
case 27:
# line 110 "CC_command.y"
{ ace_cc_yyval.lock_mode = CosConcurrencyControl::intention_read; } break;
case 28:
# line 111 "CC_command.y"
{ ace_cc_yyval.lock_mode = CosConcurrencyControl::upgrade; } break;
case 29:
# line 112 "CC_command.y"
{ ace_cc_yyval.lock_mode = CosConcurrencyControl::write; } break;
case 30:
# line 113 "CC_command.y"
{ ace_cc_yyval.lock_mode = CosConcurrencyControl::intention_write; } break;
# line	532 "/usr/ccs/bin/yaccpar"
	}
	goto ace_cc_yystack;		/* reset registers in driver code */
}