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
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
|
/* A Bison parser, made from Svc_Conf.y
by GNU Bison version 1.28 */
#if (ACE_USES_CLASSIC_SVC_CONF == 1)
#define ACE_YYBISON 1 /* Identify Bison output. */
#define ACE_DYNAMIC 257
#define ACE_STATIC 258
#define ACE_SUSPEND 259
#define ACE_RESUME 260
#define ACE_REMOVE 261
#define ACE_USTREAM 262
#define ACE_MODULE_T 263
#define ACE_STREAM_T 264
#define ACE_SVC_OBJ_T 265
#define ACE_ACTIVE 266
#define ACE_INACTIVE 267
#define ACE_PATHNAME 268
#define ACE_IDENT 269
#define ACE_STRING 270
#endif /* ACE_USES_CLASSIC_SVC_CONF == 1 */
// $Id$
#include "ace/ARGV.h"
#include "ace/Svc_Conf.h"
#include "ace/Module.h"
#include "ace/Stream.h"
ACE_RCSID (ace,
Svc_Conf_y,
"$Id$")
#if (ACE_USES_CLASSIC_SVC_CONF == 1)
// Prototypes.
static ACE_Module_Type *ace_get_module (ACE_Static_Node *str_rec,
ACE_Static_Node *svc_type);
static ACE_Module_Type *ace_get_module (ACE_Static_Node *str_rec,
const ACE_TCHAR *svc_name);
#define ACE_YYDEBUG_LEXER_TEXT (ace_yytext[ace_yyleng] = '\0', ace_yytext)
// Force the pretty debugging code to compile.
// #define ACE_YYDEBUG 1
// Keeps track of the number of errors encountered so far.
int ace_yyerrno = 0;
#include <stdio.h>
#ifndef __cplusplus
#ifndef __STDC__
#define const
#endif
#endif
#define ACE_YYFINAL 66
#define ACE_YYFLAG -32768
#define ACE_YYNTBASE 23
#define ACE_YYTRANSLATE(x) ((unsigned)(x) <= 270 ? ace_yytranslate[x] : 43)
static const ACE_TCHAR ace_yytranslate[] = { 0,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 20,
21, 22, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 19, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 17, 2, 18, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 1, 3, 4, 5, 6,
7, 8, 9, 10, 11, 12, 13, 14, 15, 16
};
#if ACE_YYDEBUG != 0
static const short ace_yyprhs[] = { 0,
0, 3, 6, 7, 9, 11, 13, 15, 17, 19,
23, 27, 30, 33, 36, 40, 41, 46, 48, 50,
51, 56, 57, 60, 61, 63, 65, 67, 69, 71,
76, 78, 80, 81, 85, 91, 96, 99, 102, 105,
107, 108, 110, 112
};
static const short ace_yyrhs[] = { 23,
24, 0, 23, 1, 0, 0, 25, 0, 26, 0,
27, 0, 28, 0, 29, 0, 30, 0, 3, 37,
41, 0, 4, 15, 41, 0, 5, 15, 0, 6,
15, 0, 7, 15, 0, 8, 32, 33, 0, 0,
8, 15, 31, 33, 0, 25, 0, 26, 0, 0,
17, 34, 35, 18, 0, 0, 35, 36, 0, 0,
25, 0, 26, 0, 27, 0, 28, 0, 29, 0,
15, 40, 39, 38, 0, 12, 0, 13, 0, 0,
42, 19, 15, 0, 42, 19, 15, 20, 21, 0,
19, 15, 20, 21, 0, 9, 22, 0, 11, 22,
0, 10, 22, 0, 16, 0, 0, 14, 0, 15,
0, 16, 0
};
#endif
#if ACE_YYDEBUG != 0
static const short ace_yyrline[] = { 0,
49, 57, 61, 65, 66, 67, 68, 69, 70, 74,
84, 91, 98, 105, 112, 116, 117, 123, 126, 132,
137, 141, 145, 153, 157, 183, 194, 201, 208, 231,
265, 269, 273, 280, 284, 288, 295, 299, 303, 310,
311, 315, 316, 317
};
#endif
#if ACE_YYDEBUG != 0 || defined (ACE_YYERROR_VERBOSE)
static const ACE_TCHAR * const ace_yytname[] = { ACE_LIB_TEXT("$"),
ACE_LIB_TEXT("error"),
ACE_LIB_TEXT("$undefined."),
ACE_LIB_TEXT("ACE_DYNAMIC"),
ACE_LIB_TEXT("ACE_STATIC"),
ACE_LIB_TEXT("ACE_SUSPEND"),
ACE_LIB_TEXT("ACE_RESUME"),
ACE_LIB_TEXT("ACE_REMOVE"),
ACE_LIB_TEXT("ACE_USTREAM"),
ACE_LIB_TEXT("ACE_MODULE_T"),
ACE_LIB_TEXT("ACE_STREAM_T"),
ACE_LIB_TEXT("ACE_SVC_OBJ_T"),
ACE_LIB_TEXT("ACE_ACTIVE"),
ACE_LIB_TEXT("ACE_INACTIVE"),
ACE_LIB_TEXT("ACE_PATHNAME"),
ACE_LIB_TEXT("ACE_IDENT"),
ACE_LIB_TEXT("ACE_STRING"),
ACE_LIB_TEXT("'{'"),
ACE_LIB_TEXT("'}'"),
ACE_LIB_TEXT("':'"),
ACE_LIB_TEXT("'('"),
ACE_LIB_TEXT("')'"),
ACE_LIB_TEXT("'*'"),
ACE_LIB_TEXT("svc_config_entries"),
ACE_LIB_TEXT("svc_config_entry"),
ACE_LIB_TEXT("dynamic"),
ACE_LIB_TEXT("static"),
ACE_LIB_TEXT("suspend"),
ACE_LIB_TEXT("resume"),
ACE_LIB_TEXT("remove"),
ACE_LIB_TEXT("stream"),
ACE_LIB_TEXT("@1"),
ACE_LIB_TEXT("stream_ops"),
ACE_LIB_TEXT("stream_modules"),
ACE_LIB_TEXT("@2"),
ACE_LIB_TEXT("module_list"),
ACE_LIB_TEXT("module"),
ACE_LIB_TEXT("svc_location"),
ACE_LIB_TEXT("status"),
ACE_LIB_TEXT("svc_initializer"),
ACE_LIB_TEXT("type"),
ACE_LIB_TEXT("parameters_opt"),
ACE_LIB_TEXT("pathname"),
NULL
};
#endif
static const short ace_yyr1[] = { 0,
23, 23, 23, 24, 24, 24, 24, 24, 24, 25,
26, 27, 28, 29, 30, 31, 30, 32, 32, 34,
33, 33, 35, 35, 36, 36, 36, 36, 36, 37,
38, 38, 38, 39, 39, 39, 40, 40, 40, 41,
41, 42, 42, 42
};
static const short ace_yyr2[] = { 0,
2, 2, 0, 1, 1, 1, 1, 1, 1, 3,
3, 2, 2, 2, 3, 0, 4, 1, 1, 0,
4, 0, 2, 0, 1, 1, 1, 1, 1, 4,
1, 1, 0, 3, 5, 4, 2, 2, 2, 1,
0, 1, 1, 1
};
static const short ace_yydefact[] = { 3,
0, 2, 0, 0, 0, 0, 0, 0, 1, 4,
5, 6, 7, 8, 9, 0, 41, 41, 12, 13,
14, 16, 18, 19, 22, 0, 0, 0, 0, 40,
10, 11, 22, 20, 15, 37, 39, 38, 42, 43,
44, 0, 33, 0, 17, 24, 0, 31, 32, 30,
0, 0, 0, 34, 21, 25, 26, 27, 28, 29,
23, 36, 0, 35, 0, 0
};
static const short ace_yydefgoto[] = { 1,
9, 10, 11, 12, 13, 14, 15, 33, 25, 35,
46, 52, 61, 17, 50, 43, 29, 31, 44
};
static const short ace_yypact[] = {-32768,
20,-32768, 1, 3, 7, 14, 18, 4,-32768,-32768,
-32768,-32768,-32768,-32768,-32768, 21, 19, 19,-32768,-32768,
-32768,-32768,-32768,-32768, -2, 12, 15, 16, -5,-32768,
-32768,-32768, -2,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
-32768, 24, 0, 17,-32768,-32768, 22,-32768,-32768,-32768,
25, -1, 26, 23,-32768,-32768,-32768,-32768,-32768,-32768,
-32768,-32768, 27,-32768, 41,-32768
};
static const short ace_yypgoto[] = {-32768,
-32768, -8, -7, -6, -3, 2,-32768,-32768,-32768, 28,
-32768,-32768,-32768,-32768,-32768,-32768,-32768, 32,-32768
};
#define ACE_YYLAST 61
static const short ace_yytable[] = { 23,
24, 3, 4, 5, 6, 7, 3, 4, 39, 40,
41, 48, 49, 42, 34, 16, 55, 18, 22, 65,
2, 19, 3, 4, 5, 6, 7, 8, 20, 26,
27, 28, 21, 36, 30, 51, 37, 38, 47, 54,
66, 53, 63, 56, 57, 58, 62, 64, 59, 32,
0, 0, 0, 60, 0, 0, 0, 0, 0, 0,
45
};
static const short ace_yycheck[] = { 8,
8, 3, 4, 5, 6, 7, 3, 4, 14, 15,
16, 12, 13, 19, 17, 15, 18, 15, 15, 0,
1, 15, 3, 4, 5, 6, 7, 8, 15, 9,
10, 11, 15, 22, 16, 19, 22, 22, 15, 15,
0, 20, 20, 52, 52, 52, 21, 21, 52, 18,
-1, -1, -1, 52, -1, -1, -1, -1, -1, -1,
33
};
#define ACE_YYPURE 1
/* -*-C-*- Note some compilers choke on comments on `#line' lines. */
/* This file comes from bison-1.28. */
/* Skeleton output parser for bison,
Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* As a special exception, when this file is copied by Bison into a
Bison output file, you may use that output file without restriction.
This special exception was added by the Free Software Foundation
in version 1.24 of Bison. */
/* This is the parser code that is written into each bison parser
when the %semantic_parser declaration is not specified in the grammar.
It was written by Richard Stallman by simplifying the hairy parser
used when %semantic_parser is specified. */
#ifndef ACE_YYSTACK_USE_ALLOCA
#ifdef alloca
#define ACE_YYSTACK_USE_ALLOCA
#else /* alloca not defined */
#ifdef __GNUC__
#define ACE_YYSTACK_USE_ALLOCA
#define alloca __builtin_alloca
#else /* not GNU C. */
#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) || (defined (__sun) && defined (__i386))
#define ACE_YYSTACK_USE_ALLOCA
#include <alloca.h>
#else /* not sparc */
/* We think this test detects Watcom and Microsoft C. */
/* This used to test MSDOS, but that is a bad idea
since that symbol is in the user namespace. */
#if (defined (_MSDOS) || defined (_MSDOS_)) && !defined (__TURBOC__)
#if 0 /* No need for malloc.h, which pollutes the namespace;
instead, just don't use alloca. */
#include <malloc.h>
#endif
#else /* not MSDOS, or __TURBOC__ */
#if defined(_AIX)
/* I don't know what this was needed for, but it pollutes the namespace.
So I turned it off. rms, 2 May 1997. */
/* #include <malloc.h> */
#pragma alloca
#define ACE_YYSTACK_USE_ALLOCA
#else /* not MSDOS, or __TURBOC__, or _AIX */
#if 0
#ifdef __hpux /* haible@ilog.fr says this works for HPUX 9.05 and up,
and on HPUX 10. Eventually we can turn this on. */
#define ACE_YYSTACK_USE_ALLOCA
#define alloca __builtin_alloca
#endif /* __hpux */
#endif
#endif /* not _AIX */
#endif /* not MSDOS, or __TURBOC__ */
#endif /* not sparc */
#endif /* not GNU C */
#endif /* alloca not defined */
#endif /* ACE_YYSTACK_USE_ALLOCA not defined */
#ifdef ACE_YYSTACK_USE_ALLOCA
#define ACE_YYSTACK_ALLOC alloca
#else
#define ACE_YYSTACK_ALLOC malloc
#endif
/* Note: there must be only one dollar sign in this file.
It is replaced by the list of actions, each action
as one case of the switch. */
#define ace_yyerrok (ace_yyerrstatus = 0)
#define ace_yyclearin (ace_yychar = ACE_YYEMPTY)
#define ACE_YYEMPTY -2
#define ACE_YYEOF 0
#define ACE_YYACCEPT goto ace_yyacceptlab
#define ACE_YYABORT goto ace_yyabortlab
#define ACE_YYERROR goto ace_yyerrlab1
/* Like ACE_YYERROR except do call ace_yyerror.
This remains here temporarily to ease the
transition to the new meaning of ACE_YYERROR, for GCC.
Once GCC version 2 has supplanted version 1, this can go. */
#define ACE_YYFAIL goto ace_yyerrlab
#define ACE_YYRECOVERING() (!!ace_yyerrstatus)
#define ACE_YYBACKUP(token, value) \
do \
if (ace_yychar == ACE_YYEMPTY && ace_yylen == 1) \
{ ace_yychar = (token), ace_yylval = (value); \
ace_yychar1 = ACE_YYTRANSLATE (ace_yychar); \
ACE_YYPOPSTACK; \
goto ace_yybackup; \
} \
else \
{ ace_yyerror (ACE_LIB_TEXT("syntax error: cannot back up")); ACE_YYERROR; } \
while (0)
#define ACE_YYTERROR 1
#define ACE_YYERRCODE 256
#ifndef ACE_YYPURE
#define ACE_YYLEX ace_yylex()
#endif
#ifdef ACE_YYPURE
#ifdef ACE_YYLSP_NEEDED
#ifdef ACE_YYLEX_PARAM
#define ACE_YYLEX ace_yylex(&ace_yylval, &ace_yylloc, ACE_YYLEX_PARAM)
#else
#define ACE_YYLEX ace_yylex(&ace_yylval, &ace_yylloc)
#endif
#else /* not ACE_YYLSP_NEEDED */
#ifdef ACE_YYLEX_PARAM
#define ACE_YYLEX ace_yylex(&ace_yylval, ACE_YYLEX_PARAM)
#else
#define ACE_YYLEX ace_yylex(&ace_yylval)
#endif
#endif /* not ACE_YYLSP_NEEDED */
#endif
/* If nonreentrant, generate the variables here */
#ifndef ACE_YYPURE
int ace_yychar; /* the lookahead symbol */
ACE_YYSTYPE ace_yylval; /* the semantic value of the */
/* lookahead symbol */
#ifdef ACE_YYLSP_NEEDED
ACE_YYLTYPE ace_yylloc; /* location data for the lookahead */
/* symbol */
#endif
int ace_yynerrs; /* number of parse errors so far */
#endif /* not ACE_YYPURE */
#if ACE_YYDEBUG != 0
int ace_yydebug; /* nonzero means print parse trace */
/* Since this is uninitialized, it does not stop multiple parsers
from coexisting. */
#endif
/* ACE_YYINITDEPTH indicates the initial size of the parser's stacks */
#ifndef ACE_YYINITDEPTH
#define ACE_YYINITDEPTH 200
#endif
/* ACE_YYMAXDEPTH is the maximum size the stacks can grow to
(effective only if the built-in stack extension method is used). */
#if ACE_YYMAXDEPTH == 0
#undef ACE_YYMAXDEPTH
#endif
#ifndef ACE_YYMAXDEPTH
#define ACE_YYMAXDEPTH 10000
#endif
/* Define __ace_yy_memcpy. Note that the size argument
should be passed with type unsigned int, because that is what the non-GCC
definitions require. With GCC, __builtin_memcpy takes an arg
of type size_t, but it can handle unsigned int. */
#if __GNUC__ > 1 /* GNU C and GNU C++ define this. */
#define __ace_yy_memcpy(TO,FROM,COUNT) __builtin_memcpy(TO,FROM,COUNT)
#else /* not GNU C or C++ */
#ifndef __cplusplus
/* This is the most reliable way to avoid incompatibilities
in available built-in functions on various systems. */
static void
__ace_yy_memcpy (to, from, count)
ACE_TCHAR *to;
ACE_TCHAR *from;
unsigned int count;
{
register ACE_TCHAR *f = from;
register ACE_TCHAR *t = to;
register int i = count;
while (i-- > 0)
*t++ = *f++;
}
#else /* __cplusplus */
/* This is the most reliable way to avoid incompatibilities
in available built-in functions on various systems. */
static void
__ace_yy_memcpy (ACE_TCHAR *to, ACE_TCHAR *from, unsigned int count)
{
register ACE_TCHAR *t = to;
register ACE_TCHAR *f = from;
register int i = count;
while (i-- > 0)
*t++ = *f++;
}
#endif
#endif
/* The user can define ACE_YYPARSE_PARAM as the name of an argument to be passed
into ace_yyparse. The argument should have type void *.
It should actually point to an object.
Grammar actions can access the variable by casting it
to the proper pointer type. */
#ifdef ACE_YYPARSE_PARAM
#ifdef __cplusplus
#define ACE_YYPARSE_PARAM_ARG void *ACE_YYPARSE_PARAM
#define ACE_YYPARSE_PARAM_DECL
#else /* not __cplusplus */
#define ACE_YYPARSE_PARAM_ARG ACE_YYPARSE_PARAM
#define ACE_YYPARSE_PARAM_DECL void *ACE_YYPARSE_PARAM;
#endif /* not __cplusplus */
#else /* not ACE_YYPARSE_PARAM */
#define ACE_YYPARSE_PARAM_ARG
#define ACE_YYPARSE_PARAM_DECL
#endif /* not ACE_YYPARSE_PARAM */
/* Prevent warning if -Wstrict-prototypes. */
#ifdef __GNUC__
#ifdef ACE_YYPARSE_PARAM
int ace_yyparse (void *);
#else
int ace_yyparse (void);
#endif
#endif
int
ace_yyparse(ACE_YYPARSE_PARAM_ARG)
ACE_YYPARSE_PARAM_DECL
{
register int ace_yystate;
register int ace_yyn;
register short *ace_yyssp;
register ACE_YYSTYPE *ace_yyvsp;
int ace_yyerrstatus; /* number of tokens to shift before error messages enabled */
int ace_yychar1 = 0; /* lookahead token as an internal (translated) token number */
short ace_yyssa[ACE_YYINITDEPTH]; /* the state stack */
ACE_YYSTYPE ace_yyvsa[ACE_YYINITDEPTH]; /* the semantic value stack */
short *ace_yyss = ace_yyssa; /* refer to the stacks thru separate pointers */
ACE_YYSTYPE *ace_yyvs = ace_yyvsa; /* to allow ace_yyoverflow to reallocate them elsewhere */
#ifdef ACE_YYLSP_NEEDED
ACE_YYLTYPE ace_yylsa[ACE_YYINITDEPTH]; /* the location stack */
ACE_YYLTYPE *ace_yyls = ace_yylsa;
ACE_YYLTYPE *ace_yylsp;
#define ACE_YYPOPSTACK (ace_yyvsp--, ace_yyssp--, ace_yylsp--)
#else
#define ACE_YYPOPSTACK (ace_yyvsp--, ace_yyssp--)
#endif
int ace_yystacksize = ACE_YYINITDEPTH;
int ace_yyfree_stacks = 0;
#ifdef ACE_YYPURE
int ace_yychar;
ACE_YYSTYPE ace_yylval;
int ace_yynerrs;
#ifdef ACE_YYLSP_NEEDED
ACE_YYLTYPE ace_yylloc;
#endif
#endif
ACE_YYSTYPE ace_yyval; /* the variable used to return */
/* semantic values from the action */
/* routines */
int ace_yylen;
#if ACE_YYDEBUG != 0
if (ace_yydebug)
ACE_OS::fprintf(stderr, ACE_LIB_TEXT("Starting parse\n"));
#endif
ace_yystate = 0;
ace_yyerrstatus = 0;
ace_yynerrs = 0;
ace_yychar = ACE_YYEMPTY; /* Cause a token to be read. */
/* Initialize stack pointers.
Waste one element of value and location stack
so that they stay on the same level as the state stack.
The wasted elements are never initialized. */
ace_yyssp = ace_yyss - 1;
ace_yyvsp = ace_yyvs;
#ifdef ACE_YYLSP_NEEDED
ace_yylsp = ace_yyls;
#endif
/* Push a new state, which is found in ace_yystate . */
/* In all cases, when you get here, the value and location stacks
have just been pushed. so pushing a state here evens the stacks. */
ace_yynewstate:
*++ace_yyssp = ace_yystate;
if (ace_yyssp >= ace_yyss + ace_yystacksize - 1)
{
/* Give user a chance to reallocate the stack */
/* Use copies of these so that the &'s don't force the real ones into memory. */
ACE_YYSTYPE *ace_yyvs1 = ace_yyvs;
short *ace_yyss1 = ace_yyss;
#ifdef ACE_YYLSP_NEEDED
ACE_YYLTYPE *ace_yyls1 = ace_yyls;
#endif
/* Get the current used size of the three stacks, in elements. */
int size = ace_yyssp - ace_yyss + 1;
#ifdef ace_yyoverflow
/* Each stack pointer address is followed by the size of
the data in use in that stack, in bytes. */
#ifdef ACE_YYLSP_NEEDED
/* This used to be a conditional around just the two extra args,
but that might be undefined if ace_yyoverflow is a macro. */
ace_yyoverflow(ACE_LIB_TEXT("parser stack overflow"),
&ace_yyss1, size * sizeof (*ace_yyssp),
&ace_yyvs1, size * sizeof (*ace_yyvsp),
&ace_yyls1, size * sizeof (*ace_yylsp),
&ace_yystacksize);
#else
ace_yyoverflow(ACE_LIB_TEXT("parser stack overflow"),
&ace_yyss1, size * sizeof (*ace_yyssp),
&ace_yyvs1, size * sizeof (*ace_yyvsp),
&ace_yystacksize);
#endif
ace_yyss = ace_yyss1; ace_yyvs = ace_yyvs1;
#ifdef ACE_YYLSP_NEEDED
ace_yyls = ace_yyls1;
#endif
#else /* no ace_yyoverflow */
/* Extend the stack our own way. */
if (ace_yystacksize >= ACE_YYMAXDEPTH)
{
ace_yyerror(ACE_LIB_TEXT("parser stack overflow"));
if (ace_yyfree_stacks)
{
free (ace_yyss);
free (ace_yyvs);
#ifdef ACE_YYLSP_NEEDED
free (ace_yyls);
#endif
}
return 2;
}
ace_yystacksize *= 2;
if (ace_yystacksize > ACE_YYMAXDEPTH)
ace_yystacksize = ACE_YYMAXDEPTH;
#ifndef ACE_YYSTACK_USE_ALLOCA
ace_yyfree_stacks = 1;
#endif
ace_yyss = (short *) ACE_YYSTACK_ALLOC (ace_yystacksize * sizeof (*ace_yyssp));
__ace_yy_memcpy ((ACE_TCHAR *)ace_yyss, (ACE_TCHAR *)ace_yyss1,
size * (unsigned int) sizeof (*ace_yyssp));
ace_yyvs = (ACE_YYSTYPE *) ACE_YYSTACK_ALLOC (ace_yystacksize * sizeof (*ace_yyvsp));
__ace_yy_memcpy ((ACE_TCHAR *)ace_yyvs, (ACE_TCHAR *)ace_yyvs1,
size * (unsigned int) sizeof (*ace_yyvsp));
#ifdef ACE_YYLSP_NEEDED
ace_yyls = (ACE_YYLTYPE *) ACE_YYSTACK_ALLOC (ace_yystacksize * sizeof (*ace_yylsp));
__ace_yy_memcpy ((ACE_TCHAR *)ace_yyls, (ACE_TCHAR *)ace_yyls1,
size * (unsigned int) sizeof (*ace_yylsp));
#endif
#endif /* no ace_yyoverflow */
ace_yyssp = ace_yyss + size - 1;
ace_yyvsp = ace_yyvs + size - 1;
#ifdef ACE_YYLSP_NEEDED
ace_yylsp = ace_yyls + size - 1;
#endif
#if ACE_YYDEBUG != 0
if (ace_yydebug)
ACE_OS::fprintf(stderr, ACE_LIB_TEXT("Stack size increased to %d\n"), ace_yystacksize);
#endif
if (ace_yyssp >= ace_yyss + ace_yystacksize - 1)
ACE_YYABORT;
}
#if ACE_YYDEBUG != 0
if (ace_yydebug)
ACE_OS::fprintf(stderr, ACE_LIB_TEXT("Entering state %d\n"), ace_yystate);
#endif
goto ace_yybackup;
ace_yybackup:
/* Do appropriate processing given the current state. */
/* Read a lookahead token if we need one and don't already have one. */
/* ace_yyresume: */
/* First try to decide what to do without reference to lookahead token. */
ace_yyn = ace_yypact[ace_yystate];
if (ace_yyn == ACE_YYFLAG)
goto ace_yydefault;
/* Not known => get a lookahead token if don't already have one. */
/* ace_yychar is either ACE_YYEMPTY or ACE_YYEOF
or a valid token in external form. */
if (ace_yychar == ACE_YYEMPTY)
{
#if ACE_YYDEBUG != 0
if (ace_yydebug)
ACE_OS::fprintf(stderr, ACE_LIB_TEXT("Reading a token: "));
#endif
ace_yychar = ACE_YYLEX;
}
/* Convert token to internal form (in ace_yychar1) for indexing tables with */
if (ace_yychar <= 0) /* This means end of input. */
{
ace_yychar1 = 0;
ace_yychar = ACE_YYEOF; /* Don't call ACE_YYLEX any more */
#if ACE_YYDEBUG != 0
if (ace_yydebug)
ACE_OS::fprintf(stderr, ACE_LIB_TEXT("Now at end of input.\n"));
#endif
}
else
{
ace_yychar1 = ACE_YYTRANSLATE(ace_yychar);
#if ACE_YYDEBUG != 0
if (ace_yydebug)
{
ACE_OS::fprintf (stderr, ACE_LIB_TEXT("Next token is %d (%s"), ace_yychar, ace_yytname[ace_yychar1]);
/* Give the individual parser a way to print the precise meaning
of a token, for further debugging info. */
#ifdef ACE_YYPRINT
ACE_YYPRINT (stderr, ace_yychar, ace_yylval);
#endif
ACE_OS::fprintf (stderr, ACE_LIB_TEXT(")\n"));
}
#endif
}
ace_yyn += ace_yychar1;
if (ace_yyn < 0 || ace_yyn > ACE_YYLAST || ace_yycheck[ace_yyn] != ace_yychar1)
goto ace_yydefault;
ace_yyn = ace_yytable[ace_yyn];
/* ace_yyn is what to do for this token type in this state.
Negative => reduce, -ace_yyn is rule number.
Positive => shift, ace_yyn is new state.
New state is final state => don't bother to shift,
just return success.
0, or most negative number => error. */
if (ace_yyn < 0)
{
if (ace_yyn == ACE_YYFLAG)
goto ace_yyerrlab;
ace_yyn = -ace_yyn;
goto ace_yyreduce;
}
else if (ace_yyn == 0)
goto ace_yyerrlab;
if (ace_yyn == ACE_YYFINAL)
ACE_YYACCEPT;
/* Shift the lookahead token. */
#if ACE_YYDEBUG != 0
if (ace_yydebug)
ACE_OS::fprintf(stderr, ACE_LIB_TEXT("Shifting token %d (%s), "), ace_yychar, ace_yytname[ace_yychar1]);
#endif
/* Discard the token being shifted unless it is eof. */
if (ace_yychar != ACE_YYEOF)
ace_yychar = ACE_YYEMPTY;
*++ace_yyvsp = ace_yylval;
#ifdef ACE_YYLSP_NEEDED
*++ace_yylsp = ace_yylloc;
#endif
/* count tokens shifted since error; after three, turn off error status. */
if (ace_yyerrstatus) ace_yyerrstatus--;
ace_yystate = ace_yyn;
goto ace_yynewstate;
/* Do the default action for the current state. */
ace_yydefault:
ace_yyn = ace_yydefact[ace_yystate];
if (ace_yyn == 0)
goto ace_yyerrlab;
/* Do a reduction. ace_yyn is the number of a rule to reduce with. */
ace_yyreduce:
ace_yylen = ace_yyr2[ace_yyn];
if (ace_yylen > 0)
ace_yyval = ace_yyvsp[1-ace_yylen]; /* implement default value of the action */
#if ACE_YYDEBUG != 0
if (ace_yydebug)
{
int i;
ACE_OS::fprintf (stderr, ACE_LIB_TEXT("Reducing via rule %d (line %d), "),
ace_yyn, ace_yyrline[ace_yyn]);
/* Print the symbols being reduced, and their result. */
for (i = ace_yyprhs[ace_yyn]; ace_yyrhs[i] > 0; i++)
ACE_OS::fprintf (stderr, ACE_LIB_TEXT("%s "), ace_yytname[ace_yyrhs[i]]);
ACE_OS::fprintf (stderr, ACE_LIB_TEXT(" -> %s\n"), ace_yytname[ace_yyr1[ace_yyn]]);
}
#endif
switch (ace_yyn) {
case 1:
{
if (ace_yyvsp[0].parse_node_ != 0)
{
ace_yyvsp[0].parse_node_->apply (); delete ace_yyvsp[0].parse_node_;
}
ACE_SVC_CONF_PARAM->obstack.release ();
;
break;}
case 2:
{
ACE_SVC_CONF_PARAM->obstack.release ();
;
break;}
case 10:
{
if (ace_yyvsp[-1].svc_record_ != 0)
ace_yyval.parse_node_ = new ACE_Dynamic_Node (ace_yyvsp[-1].svc_record_, ace_yyvsp[0].ident_);
else
ace_yyval.parse_node_ = 0;
;
break;}
case 11:
{
ace_yyval.parse_node_ = new ACE_Static_Node (ace_yyvsp[-1].ident_, ace_yyvsp[0].ident_);
;
break;}
case 12:
{
ace_yyval.parse_node_ = new ACE_Suspend_Node (ace_yyvsp[0].ident_);
;
break;}
case 13:
{
ace_yyval.parse_node_ = new ACE_Resume_Node (ace_yyvsp[0].ident_);
;
break;}
case 14:
{
ace_yyval.parse_node_ = new ACE_Remove_Node (ace_yyvsp[0].ident_);
;
break;}
case 15:
{
ace_yyval.parse_node_ = new ACE_Stream_Node (ace_yyvsp[-1].static_node_, ace_yyvsp[0].parse_node_);
;
break;}
case 16:
{ ace_yyval.static_node_ = new ACE_Static_Node (ace_yyvsp[0].ident_); ;
break;}
case 17:
{
ace_yyval.parse_node_ = new ACE_Dummy_Node (ace_yyvsp[-1].static_node_, ace_yyvsp[0].parse_node_);
;
break;}
case 18:
{
;
break;}
case 19:
{
;
break;}
case 20:
{
// Initialize left context...
ace_yyval.static_node_ = ace_yyvsp[-1].static_node_;
;
break;}
case 21:
{
ace_yyval.parse_node_ = ace_yyvsp[-1].parse_node_;
;
break;}
case 22:
{ ace_yyval.parse_node_ = 0; ;
break;}
case 23:
{
if (ace_yyvsp[0].parse_node_ != 0)
{
ace_yyvsp[0].parse_node_->link (ace_yyvsp[-1].parse_node_);
ace_yyval.parse_node_ = ace_yyvsp[0].parse_node_;
}
;
break;}
case 24:
{ ace_yyval.parse_node_ = 0; ;
break;}
case 25:
{
ACE_Static_Node *svc_type = ace_yyvsp[0].static_node_;
if (svc_type != 0)
{
ACE_Static_Node *module = ace_yyvsp[-2].static_node_;
ACE_ARGV args (svc_type->parameters ());
ACE_Module_Type *mt = ace_get_module (module,
svc_type);
ACE_Stream_Type *st =
ACE_dynamic_cast (ACE_Stream_Type *,
ACE_const_cast (ACE_Service_Type_Impl *,
module->record ()->type ()));
if (mt->init (args.argc (), args.argv ()) == -1
|| st->push (mt) == -1)
{
ACE_ERROR ((LM_ERROR,
ACE_LIB_TEXT ("dynamic initialization failed for Module %s\n"),
svc_type->name ()));
ACE_SVC_CONF_PARAM->yyerrno++;
}
}
;
break;}
case 26:
{
ACE_Module_Type *mt = ace_get_module (ace_yyvsp[-2].static_node_, ace_yyvsp[0].static_node_->name ());
if (((ACE_Stream_Type *) (ace_yyvsp[-2].static_node_)->record ()->type ())->push (mt) == -1)
{
ACE_ERROR ((LM_ERROR,
ACE_LIB_TEXT ("Problem with static\n")));
ACE_SVC_CONF_PARAM->yyerrno++;
}
;
break;}
case 27:
{
ACE_Module_Type *mt = ace_get_module (ace_yyvsp[-2].static_node_,
ace_yyvsp[0].static_node_->name ());
if (mt != 0)
mt->suspend ();
;
break;}
case 28:
{
ACE_Module_Type *mt = ace_get_module (ace_yyvsp[-2].static_node_,
ace_yyvsp[0].static_node_->name ());
if (mt != 0)
mt->resume ();
;
break;}
case 29:
{
ACE_Static_Node *stream = ace_yyvsp[-2].static_node_;
ACE_Static_Node *module = ace_yyvsp[0].static_node_;
ACE_Module_Type *mt = ace_get_module (stream,
module->name ());
ACE_Stream_Type *st =
ACE_dynamic_cast (ACE_Stream_Type *,
ACE_const_cast (ACE_Service_Type_Impl *,
stream->record ()->type ()));
if (mt != 0 && st->remove (mt) == -1)
{
ACE_ERROR ((LM_ERROR,
ACE_LIB_TEXT ("cannot remove Module_Type %s from STREAM_Type %s\n"),
module->name (),
stream->name ()));
ACE_SVC_CONF_PARAM->yyerrno++;
}
;
break;}
case 30:
{
u_int flags
= ACE_Service_Type::DELETE_THIS
| (ace_yyvsp[-1].location_node_->dispose () == 0 ? 0 : ACE_Service_Type::DELETE_OBJ);
ACE_Service_Object_Exterminator gobbler = 0;
void *sym = ace_yyvsp[-1].location_node_->symbol (&gobbler);
if (sym != 0)
{
ACE_Service_Type_Impl *stp
= ace_create_service_type (ace_yyvsp[-3].ident_,
ace_yyvsp[-2].type_,
sym,
flags,
gobbler);
ace_yyval.svc_record_ = new ACE_Service_Type (ace_yyvsp[-3].ident_,
stp,
ace_yyvsp[-1].location_node_->handle (),
ace_yyvsp[0].type_);
}
else
{
ACE_ERROR ((LM_ERROR,
ACE_LIB_TEXT ("Unable to find service: %s\n"),
ace_yyvsp[-3].ident_));
++ACE_SVC_CONF_PARAM->yyerrno;
ace_yyval.svc_record_ = 0;
}
delete ace_yyvsp[-1].location_node_;
;
break;}
case 31:
{
ace_yyval.type_ = 1;
;
break;}
case 32:
{
ace_yyval.type_ = 0;
;
break;}
case 33:
{
ace_yyval.type_ = 1;
;
break;}
case 34:
{
ace_yyval.location_node_ = new ACE_Object_Node (ace_yyvsp[-2].ident_, ace_yyvsp[0].ident_);
;
break;}
case 35:
{
ace_yyval.location_node_ = new ACE_Function_Node (ace_yyvsp[-4].ident_, ace_yyvsp[-2].ident_);
;
break;}
case 36:
{
ace_yyval.location_node_ = new ACE_Static_Function_Node (ace_yyvsp[-2].ident_);
;
break;}
case 37:
{
ace_yyval.type_ = ACE_MODULE_T;
;
break;}
case 38:
{
ace_yyval.type_ = ACE_SVC_OBJ_T;
;
break;}
case 39:
{
ace_yyval.type_ = ACE_STREAM_T;
;
break;}
case 41:
{ ace_yyval.ident_ = 0; ;
break;}
}
/* the action file gets copied in in place of this dollarsign */
ace_yyvsp -= ace_yylen;
ace_yyssp -= ace_yylen;
#ifdef ACE_YYLSP_NEEDED
ace_yylsp -= ace_yylen;
#endif
#if ACE_YYDEBUG != 0
if (ace_yydebug)
{
short *ssp1 = ace_yyss - 1;
ACE_OS::fprintf (stderr, ACE_LIB_TEXT("state stack now"));
while (ssp1 != ace_yyssp)
ACE_OS::fprintf (stderr, ACE_LIB_TEXT(" %d"), *++ssp1);
ACE_OS::fprintf (stderr, ACE_LIB_TEXT("\n"));
}
#endif
*++ace_yyvsp = ace_yyval;
#ifdef ACE_YYLSP_NEEDED
ace_yylsp++;
if (ace_yylen == 0)
{
ace_yylsp->first_line = ace_yylloc.first_line;
ace_yylsp->first_column = ace_yylloc.first_column;
ace_yylsp->last_line = (ace_yylsp-1)->last_line;
ace_yylsp->last_column = (ace_yylsp-1)->last_column;
ace_yylsp->text = 0;
}
else
{
ace_yylsp->last_line = (ace_yylsp+ace_yylen-1)->last_line;
ace_yylsp->last_column = (ace_yylsp+ace_yylen-1)->last_column;
}
#endif
/* Now "shift" the result of the reduction.
Determine what state that goes to,
based on the state we popped back to
and the rule number reduced by. */
ace_yyn = ace_yyr1[ace_yyn];
ace_yystate = ace_yypgoto[ace_yyn - ACE_YYNTBASE] + *ace_yyssp;
if (ace_yystate >= 0 && ace_yystate <= ACE_YYLAST && ace_yycheck[ace_yystate] == *ace_yyssp)
ace_yystate = ace_yytable[ace_yystate];
else
ace_yystate = ace_yydefgoto[ace_yyn - ACE_YYNTBASE];
goto ace_yynewstate;
ace_yyerrlab: /* here on detecting error */
if (! ace_yyerrstatus)
/* If not already recovering from an error, report this error. */
{
++ace_yynerrs;
#ifdef ACE_YYERROR_VERBOSE
ace_yyn = ace_yypact[ace_yystate];
if (ace_yyn > ACE_YYFLAG && ace_yyn < ACE_YYLAST)
{
int size = 0;
ACE_TCHAR *msg;
int x, count;
count = 0;
/* Start X at -ace_yyn if nec to avoid negative indexes in ace_yycheck. */
for (x = (ace_yyn < 0 ? -ace_yyn : 0);
x < (sizeof(ace_yytname) / sizeof(ACE_TCHAR *)); x++)
if (ace_yycheck[x + ace_yyn] == x)
size += ACE_OS::strlen(ace_yytname[x]) + 15, count++;
msg = new ACE_TCHAR[size + 15];
if (msg != 0)
{
ACE_OS::strcpy(msg, ACE_LIB_TEXT("parse error"));
if (count < 5)
{
count = 0;
for (x = (ace_yyn < 0 ? -ace_yyn : 0);
x < (sizeof(ace_yytname) / sizeof(ACE_TCHAR *)); x++)
if (ace_yycheck[x + ace_yyn] == x)
{
ACE_OS::strcat(msg, count == 0 ? ACE_LIB_TEXT(", expecting `") : ACE_LIB_TEXT(" or `"));
ACE_OS::strcat(msg, ACE_TEXT_CHAR_TO_TCHAR (ace_yytname[x]));
ACE_OS::strcat(msg, ACE_LIB_TEXT("'"));
count++;
}
}
ace_yyerror(msg);
delete [] msg;
}
else
ace_yyerror (ACE_LIB_TEXT("parse error; also virtual memory exceeded"));
}
else
#endif /* ACE_YYERROR_VERBOSE */
ace_yyerror(ACE_LIB_TEXT("parse error"));
}
goto ace_yyerrlab1;
ace_yyerrlab1: /* here on error raised explicitly by an action */
if (ace_yyerrstatus == 3)
{
/* if just tried and failed to reuse lookahead token after an error, discard it. */
/* return failure if at end of input */
if (ace_yychar == ACE_YYEOF)
ACE_YYABORT;
#if ACE_YYDEBUG != 0
if (ace_yydebug)
ACE_OS::fprintf(stderr, ACE_LIB_TEXT("Discarding token %d (%s).\n"), ace_yychar, ace_yytname[ace_yychar1]);
#endif
ace_yychar = ACE_YYEMPTY;
}
/* Else will try to reuse lookahead token
after shifting the error token. */
ace_yyerrstatus = 3; /* Each real token shifted decrements this */
goto ace_yyerrhandle;
ace_yyerrdefault: /* current state does not do anything special for the error token. */
#if 0
/* This is wrong; only states that explicitly want error tokens
should shift them. */
ace_yyn = ace_yydefact[ace_yystate]; /* If its default is to accept any token, ok. Otherwise pop it.*/
if (ace_yyn) goto ace_yydefault;
#endif
ace_yyerrpop: /* pop the current state because it cannot handle the error token */
if (ace_yyssp == ace_yyss) ACE_YYABORT;
ace_yyvsp--;
ace_yystate = *--ace_yyssp;
#ifdef ACE_YYLSP_NEEDED
ace_yylsp--;
#endif
#if ACE_YYDEBUG != 0
if (ace_yydebug)
{
short *ssp1 = ace_yyss - 1;
ACE_OS::fprintf (stderr, ACE_LIB_TEXT("Error: state stack now"));
while (ssp1 != ace_yyssp)
ACE_OS::fprintf (stderr, ACE_LIB_TEXT(" %d"), *++ssp1);
ACE_OS::fprintf (stderr, ACE_LIB_TEXT("\n"));
}
#endif
ace_yyerrhandle:
ace_yyn = ace_yypact[ace_yystate];
if (ace_yyn == ACE_YYFLAG)
goto ace_yyerrdefault;
ace_yyn += ACE_YYTERROR;
if (ace_yyn < 0 || ace_yyn > ACE_YYLAST || ace_yycheck[ace_yyn] != ACE_YYTERROR)
goto ace_yyerrdefault;
ace_yyn = ace_yytable[ace_yyn];
if (ace_yyn < 0)
{
if (ace_yyn == ACE_YYFLAG)
goto ace_yyerrpop;
ace_yyn = -ace_yyn;
goto ace_yyreduce;
}
else if (ace_yyn == 0)
goto ace_yyerrpop;
if (ace_yyn == ACE_YYFINAL)
ACE_YYACCEPT;
#if ACE_YYDEBUG != 0
if (ace_yydebug)
ACE_OS::fprintf(stderr, ACE_LIB_TEXT("Shifting error token, "));
#endif
*++ace_yyvsp = ace_yylval;
#ifdef ACE_YYLSP_NEEDED
*++ace_yylsp = ace_yylloc;
#endif
ace_yystate = ace_yyn;
goto ace_yynewstate;
ace_yyacceptlab:
/* ACE_YYACCEPT comes here. */
if (ace_yyfree_stacks)
{
free (ace_yyss);
free (ace_yyvs);
#ifdef ACE_YYLSP_NEEDED
free (ace_yyls);
#endif
}
return 0;
ace_yyabortlab:
/* ACE_YYABORT comes here. */
if (ace_yyfree_stacks)
{
free (ace_yyss);
free (ace_yyvs);
#ifdef ACE_YYLSP_NEEDED
free (ace_yyls);
#endif
}
return 1;
}
// Prints the error string to standard output. Cleans up the error
// messages.
void
ace_yyerror (const ACE_TCHAR *s)
{
#if defined (ACE_NLOGGING)
ACE_UNUSED_ARG (s);
#endif /* ACE_NLOGGING */
ACE_ERROR ((LM_ERROR,
ACE_LIB_TEXT ("[error %d] on line %d: %s\n"),
ace_yyerrno,
ace_yylineno,
s));
}
// Note that SRC_REC represents left context, which is the STREAM *
// record.
static ACE_Module_Type *
ace_get_module (ACE_Static_Node *str_rec,
const ACE_TCHAR *svc_name)
{
const ACE_Service_Type *sr = str_rec->record ();
const ACE_Service_Type_Impl *type = sr->type ();
ACE_Stream_Type *st = sr == 0
? 0
: ACE_dynamic_cast (ACE_Stream_Type *,
ACE_const_cast (ACE_Service_Type_Impl *,
type));
ACE_Module_Type *mt = st == 0 ? 0 : st->find (svc_name);
if (sr == 0 || st == 0 || mt == 0)
{
ACE_ERROR ((LM_ERROR,
ACE_LIB_TEXT ("cannot locate Module_Type %s in STREAM_Type %s\n"),
svc_name,
str_rec->name ()));
ace_yyerrno++;
}
return mt;
}
static ACE_Module_Type *
ace_get_module (ACE_Static_Node *str_rec,
ACE_Static_Node *svc_type)
{
const ACE_Service_Type *sr = str_rec->record ();
const ACE_Service_Type_Impl *type = sr->type ();
ACE_Stream_Type *st = sr == 0 ? 0 : (ACE_Stream_Type *) type;
const ACE_Service_Type *sv = svc_type->record ();
type = sv->type ();
ACE_Module_Type *mt = (ACE_Module_Type *) type;
const ACE_TCHAR *module_type_name = svc_type->name ();
if (sr == 0 || st == 0 || mt == 0)
{
ACE_ERROR ((LM_ERROR,
ACE_LIB_TEXT ("cannot locate Module_Type %s or STREAM_Type %s\n"),
module_type_name,
str_rec->name ()));
ace_yyerrno++;
}
// Make sure that the Module has the same name as the
// Module_Type object from the svc.conf file.
ACE_Module<ACE_SYNCH> *mp = (ACE_Module<ACE_SYNCH> *) mt->object ();
if (ACE_OS::strcmp (mp->name (), module_type_name) != 0)
{
ACE_DEBUG ((LM_DEBUG,
ACE_LIB_TEXT ("warning: assigning Module_Type name %s to Module %s since names differ\n"),
module_type_name,
mp->name ()));
mp->name (module_type_name);
}
return mt;
}
ACE_Service_Type_Impl *
ace_create_service_type (const ACE_TCHAR *name,
int type,
void *symbol,
u_int flags,
ACE_Service_Object_Exterminator gobbler)
{
ACE_Service_Type_Impl *stp = 0;
// Note, the only place we need to put a case statement. This is
// also the place where we'd put the RTTI tests, if the compiler
// actually supported them!
switch (type)
{
case ACE_SVC_OBJ_T:
ACE_NEW_RETURN (stp,
ACE_Service_Object_Type ((ACE_Service_Object *) symbol,
name, flags,
gobbler),
0);
break;
case ACE_MODULE_T:
ACE_NEW_RETURN (stp,
ACE_Module_Type (symbol, name, flags),
0);
break;
case ACE_STREAM_T:
ACE_NEW_RETURN (stp,
ACE_Stream_Type (symbol, name, flags),
0);
break;
default:
ACE_ERROR ((LM_ERROR,
ACE_LIB_TEXT ("unknown case\n")));
ace_yyerrno++;
break;
}
return stp;
}
#if defined (DEBUGGING)
// Current line number.
int ace_yylineno = 1;
// Name given on the command-line to envoke the program.
ACE_TCHAR *program_name;
// Main driver program.
int
ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
ACE_Svc_Conf_Param param (stdin);
// Try to reopen any filename argument to use ACE_YYIN.
if (argc > 1 && (ace_yyin = freopen (argv[1], ACE_LIB_TEXT("r"), stdin)) == 0)
ACE_OS::fprintf (stderr, ACE_LIB_TEXT("usage: %s [file]\n"), argv[0]), ACE_OS::exit (1);
return ace_yyparse (¶m);
}
#endif /* DEBUGGING */
#endif /* ACE_USES_CLASSIC_SVC_CONF == 1 */
|