#include "ace/Obstack.h"
#include "ace/Service_Config.h"
#include "ace/Parse_Node.h"
#include "ace/Svc_Conf_Param.h"
Include dependency graph for Svc_Conf.h:
This graph shows which files directly or indirectly include this file:
Go to the source code of this file.
Classes | |
union | ACE_YYSTYPE |
Defines | |
#define | ACE_YY_DECL extern "C" int ace_yylex (ACE_YYSTYPE *ace_yylval, void *ACE_YYLEX_PARAM) |
Functions | |
int | ace_yyparse (void *) |
Performs the parsing. | |
void | ace_yyerror (int yyerrno, int yylineno, char const *) |
Error handling routine required by YACC or BISON. | |
ACE_Service_Type_Impl * | ace_create_service_type (const ACE_TCHAR *, int, void *, unsigned int, ACE_Service_Object_Exterminator=0) |
Factory that creates a new ACE_Service_Type_Impl. | |
Variables | |
ACE_YY_DECL | |
Performs the lexical analysis. | |
FILE * | ace_yyin |
Name of input stream. | |
ACE_TCHAR * | ace_yytext |
Holds the lexeme for the current token. | |
int | ace_yyleng |
Holds the length of the lexeme for the current token. |
Definition in file Svc_Conf.h.
|
Definition at line 45 of file Svc_Conf.h. |
|
Factory that creates a new ACE_Service_Type_Impl.
|
|
Error handling routine required by YACC or BISON.
Definition at line 1656 of file Svc_Conf_y.cpp. References ACE_ERROR, ACE_TEXT, ACE_TEXT_CHAR_TO_TCHAR, and LM_ERROR. Referenced by ace_yyparse(), ACE_Svc_Conf_Lexer::input(), ACE_Svc_Conf_Lexer::scan(), and ACE_Svc_Conf_Lexer::yylex().
01657 { 01658 #if defined (ACE_NLOGGING) 01659 ACE_UNUSED_ARG (ace_yyerrno); 01660 ACE_UNUSED_ARG (ace_yylineno); 01661 ACE_UNUSED_ARG (s); 01662 #endif /* ACE_NLOGGING */ 01663 01664 ACE_ERROR ((LM_ERROR, 01665 ACE_TEXT ("ACE (%P|%t) [error %d] on line %d: %s\n"), 01666 ace_yyerrno, 01667 ace_yylineno, 01668 ACE_TEXT_CHAR_TO_TCHAR (s))); 01669 } |
|
Performs the parsing.
Definition at line 854 of file Svc_Conf_y.cpp. References ACE_ARGV, ACE_ERROR, ace_get_module(), ACE_MODULE_T, ACE_Service_Type_Factory, ACE_STREAM_T, ACE_SVC_CONF_PARAM, ACE_SVC_OBJ_T, ACE_TCHAR, ACE_TEXT, ACE_YY_REDUCE_PRINT, ACE_YY_STACK_PRINT, ACE_YY_SYMBOL_PRINT, ACE_YYABORT, ACE_YYACCEPT, ace_yycheck, ace_yydefact, ace_yydefgoto, ace_yydestruct(), ACE_YYDPRINTF, ACE_YYEMPTY, ACE_YYEOF, ace_yyerror(), ACE_YYFINAL, ACE_YYINITDEPTH, ACE_YYLAST, ACE_YYLEX, ACE_YYMAXDEPTH, ACE_YYNTOKENS, ace_yypact, ACE_YYPACT_NINF, ACE_YYPARSE_PARAM, ace_yypgoto, ACE_YYPOPSTACK, ace_yyr1, ace_yyr2, ACE_YYSIZE_T, ACE_YYSTACK_ALLOC, ACE_YYSTACK_FREE, ace_yystos, ace_yytable, ACE_YYTABLE_NINF, ACE_YYTERROR, ACE_YYTRANSLATE, ACE_ARGV_T< CHAR_TYPE >::argc(), ACE_ARGV_T< CHAR_TYPE >::argv(), ACE_YYSTYPE::ident_, ACE_Module_Type::init(), LM_ERROR, ACE_YYSTYPE::location_node_, ACE_YYSTYPE::parse_node_, ACE_Stream_Type::push(), ACE_Stream_Type::remove(), ACE_Module_Type::resume(), ACE_YYSTYPE::static_node_, ACE_Module_Type::suspend(), ACE_YYSTYPE::svc_record_, and ACE_YYSTYPE::type_.
00869 { 00870 /* The look-ahead symbol. */ 00871 int ace_yychar; 00872 00873 /* The semantic value of the look-ahead symbol. */ 00874 ACE_YYSTYPE ace_yylval; 00875 00876 #if defined (ACE_YYSTYPE_IS_TRIVIAL) 00877 ace_yylval = 0; 00878 #else 00879 ace_yylval.type_ = 0; 00880 #endif /* ACE_YYSTYPE_IS_TRIVIAL */ 00881 00882 /* Number of syntax errors so far. */ 00883 int ace_yynerrs; 00884 00885 register int ace_yystate; 00886 register int ace_yyn; 00887 int ace_yyresult; 00888 /* Number of tokens to shift before error messages enabled. */ 00889 int ace_yyerrstatus; 00890 /* Look-ahead token as an internal (translated) token number. */ 00891 int ace_yytoken = 0; 00892 00893 /* Three stacks and their tools: 00894 `ace_yyss': related to states, 00895 `ace_yyvs': related to semantic values, 00896 `ace_yyls': related to locations. 00897 00898 Refer to the stacks thru separate pointers, to allow ace_yyoverflow 00899 to reallocate them elsewhere. */ 00900 00901 /* The state stack. */ 00902 short int ace_yyssa[ACE_YYINITDEPTH]; 00903 short int *ace_yyss = ace_yyssa; 00904 register short int *ace_yyssp; 00905 00906 /* The semantic value stack. */ 00907 ACE_YYSTYPE ace_yyvsa[ACE_YYINITDEPTH]; 00908 ACE_YYSTYPE *ace_yyvs = ace_yyvsa; 00909 register ACE_YYSTYPE *ace_yyvsp; 00910 00911 00912 00913 #define ACE_YYPOPSTACK (ace_yyvsp--, ace_yyssp--) 00914 00915 ACE_YYSIZE_T ace_yystacksize = ACE_YYINITDEPTH; 00916 00917 /* The variables used to return semantic value and location from the 00918 action routines. */ 00919 ACE_YYSTYPE ace_yyval; 00920 00921 00922 /* When reducing, the number of symbols on the RHS of the reduced 00923 rule. */ 00924 int ace_yylen; 00925 00926 ACE_YYDPRINTF ((stderr, "Starting parse\n")); 00927 00928 ace_yystate = 0; 00929 ace_yyerrstatus = 0; 00930 ace_yynerrs = 0; 00931 ace_yychar = ACE_YYEMPTY; /* Cause a token to be read. */ 00932 00933 /* Initialize stack pointers. 00934 Waste one element of value and location stack 00935 so that they stay on the same level as the state stack. 00936 The wasted elements are never initialized. */ 00937 00938 ace_yyssp = ace_yyss; 00939 ace_yyvsp = ace_yyvs; 00940 00941 00942 ace_yyvsp[0] = ace_yylval; 00943 00944 goto ace_yysetstate; 00945 00946 /*------------------------------------------------------------. 00947 | ace_yynewstate -- Push a new state, which is found in ace_yystate. | 00948 `------------------------------------------------------------*/ 00949 ace_yynewstate: 00950 /* In all cases, when you get here, the value and location stacks 00951 have just been pushed. so pushing a state here evens the stacks. 00952 */ 00953 ace_yyssp++; 00954 00955 ace_yysetstate: 00956 *ace_yyssp = ace_yystate; 00957 00958 if (ace_yyss + ace_yystacksize - 1 <= ace_yyssp) 00959 { 00960 /* Get the current used size of the three stacks, in elements. */ 00961 ACE_YYSIZE_T ace_yysize = ace_yyssp - ace_yyss + 1; 00962 00963 #ifdef ace_yyoverflow 00964 { 00965 /* Give user a chance to reallocate the stack. Use copies of 00966 these so that the &'s don't force the real ones into 00967 memory. */ 00968 ACE_YYSTYPE *ace_yyvs1 = ace_yyvs; 00969 short int *ace_yyss1 = ace_yyss; 00970 00971 00972 /* Each stack pointer address is followed by the size of the 00973 data in use in that stack, in bytes. This used to be a 00974 conditional around just the two extra args, but that might 00975 be undefined if ace_yyoverflow is a macro. */ 00976 ace_yyoverflow ("parser stack overflow", 00977 &ace_yyss1, ace_yysize * sizeof (*ace_yyssp), 00978 &ace_yyvs1, ace_yysize * sizeof (*ace_yyvsp), 00979 00980 &ace_yystacksize); 00981 00982 ace_yyss = ace_yyss1; 00983 ace_yyvs = ace_yyvs1; 00984 } 00985 #else /* no ace_yyoverflow */ 00986 # ifndef ACE_YYSTACK_RELOCATE 00987 goto ace_yyoverflowlab; 00988 # else 00989 /* Extend the stack our own way. */ 00990 if (ACE_YYMAXDEPTH <= ace_yystacksize) 00991 goto ace_yyoverflowlab; 00992 ace_yystacksize *= 2; 00993 if (ACE_YYMAXDEPTH < ace_yystacksize) 00994 ace_yystacksize = ACE_YYMAXDEPTH; 00995 00996 { 00997 short int *ace_yyss1 = ace_yyss; 00998 union ace_yyalloc *ace_yyptr = 00999 (union ace_yyalloc *) ACE_YYSTACK_ALLOC (ACE_YYSTACK_BYTES (ace_yystacksize)); 01000 if (! ace_yyptr) 01001 goto ace_yyoverflowlab; 01002 ACE_YYSTACK_RELOCATE (ace_yyss); 01003 ACE_YYSTACK_RELOCATE (ace_yyvs); 01004 01005 # undef ACE_YYSTACK_RELOCATE 01006 if (ace_yyss1 != ace_yyssa) 01007 ACE_YYSTACK_FREE (ace_yyss1); 01008 } 01009 # endif 01010 #endif /* no ace_yyoverflow */ 01011 01012 ace_yyssp = ace_yyss + ace_yysize - 1; 01013 ace_yyvsp = ace_yyvs + ace_yysize - 1; 01014 01015 01016 ACE_YYDPRINTF ((stderr, "Stack size increased to %lu\n", 01017 (unsigned long int) ace_yystacksize)); 01018 01019 if (ace_yyss + ace_yystacksize - 1 <= ace_yyssp) 01020 ACE_YYABORT; 01021 } 01022 01023 ACE_YYDPRINTF ((stderr, "Entering state %d\n", ace_yystate)); 01024 01025 goto ace_yybackup; 01026 01027 /*-----------. 01028 | ace_yybackup. | 01029 `-----------*/ 01030 ace_yybackup: 01031 01032 /* Do appropriate processing given the current state. */ 01033 /* Read a look-ahead token if we need one and don't already have one. */ 01034 /* ace_yyresume: */ 01035 01036 /* First try to decide what to do without reference to look-ahead token. */ 01037 01038 ace_yyn = ace_yypact[ace_yystate]; 01039 if (ace_yyn == ACE_YYPACT_NINF) 01040 goto ace_yydefault; 01041 01042 /* Not known => get a look-ahead token if don't already have one. */ 01043 01044 /* ACE_YYCHAR is either ACE_YYEMPTY or ACE_YYEOF or a valid look-ahead symbol. */ 01045 if (ace_yychar == ACE_YYEMPTY) 01046 { 01047 ACE_YYDPRINTF ((stderr, "Reading a token: ")); 01048 ace_yychar = ACE_YYLEX; 01049 } 01050 01051 if (ace_yychar <= ACE_YYEOF) 01052 { 01053 ace_yychar = ace_yytoken = ACE_YYEOF; 01054 ACE_YYDPRINTF ((stderr, "Now at end of input.\n")); 01055 } 01056 else 01057 { 01058 ace_yytoken = ACE_YYTRANSLATE (ace_yychar); 01059 ACE_YY_SYMBOL_PRINT ("Next token is", ace_yytoken, &ace_yylval, &ace_yylloc); 01060 } 01061 01062 /* If the proper action on seeing token ACE_YYTOKEN is to reduce or to 01063 detect an error, take that action. */ 01064 ace_yyn += ace_yytoken; 01065 if (ace_yyn < 0 || ACE_YYLAST < ace_yyn || ace_yycheck[ace_yyn] != ace_yytoken) 01066 goto ace_yydefault; 01067 ace_yyn = ace_yytable[ace_yyn]; 01068 if (ace_yyn <= 0) 01069 { 01070 if (ace_yyn == 0 || ace_yyn == ACE_YYTABLE_NINF) 01071 goto ace_yyerrlab; 01072 ace_yyn = -ace_yyn; 01073 goto ace_yyreduce; 01074 } 01075 01076 if (ace_yyn == ACE_YYFINAL) 01077 ACE_YYACCEPT; 01078 01079 /* Shift the look-ahead token. */ 01080 ACE_YY_SYMBOL_PRINT ("Shifting", ace_yytoken, &ace_yylval, &ace_yylloc); 01081 01082 /* Discard the token being shifted unless it is eof. */ 01083 if (ace_yychar != ACE_YYEOF) 01084 ace_yychar = ACE_YYEMPTY; 01085 01086 *++ace_yyvsp = ace_yylval; 01087 01088 01089 /* Count tokens shifted since error; after three, turn off error 01090 status. */ 01091 if (ace_yyerrstatus) 01092 ace_yyerrstatus--; 01093 01094 ace_yystate = ace_yyn; 01095 goto ace_yynewstate; 01096 01097 01098 /*-----------------------------------------------------------. 01099 | ace_yydefault -- do the default action for the current state. | 01100 `-----------------------------------------------------------*/ 01101 ace_yydefault: 01102 ace_yyn = ace_yydefact[ace_yystate]; 01103 if (ace_yyn == 0) 01104 goto ace_yyerrlab; 01105 goto ace_yyreduce; 01106 01107 01108 /*-----------------------------. 01109 | ace_yyreduce -- Do a reduction. | 01110 `-----------------------------*/ 01111 ace_yyreduce: 01112 /* ace_yyn is the number of a rule to reduce with. */ 01113 ace_yylen = ace_yyr2[ace_yyn]; 01114 01115 /* If ACE_YYLEN is nonzero, implement the default value of the action: 01116 `$$ = $1'. 01117 01118 Otherwise, the following line sets ACE_YYVAL to garbage. 01119 This behavior is undocumented and Bison 01120 users should not rely upon it. Assigning to ACE_YYVAL 01121 unconditionally makes the parser a bit smaller, and it avoids a 01122 GCC warning that ACE_YYVAL may be used uninitialized. */ 01123 ace_yyval = ace_yyvsp[1-ace_yylen]; 01124 01125 01126 ACE_YY_REDUCE_PRINT (ace_yyn); 01127 switch (ace_yyn) 01128 { 01129 case 2: 01130 01131 { 01132 if ((ace_yyvsp[0].parse_node_) != 0) 01133 { 01134 (ace_yyvsp[0].parse_node_)->apply (ACE_SVC_CONF_PARAM->config, ACE_SVC_CONF_PARAM->yyerrno); 01135 delete (ace_yyvsp[0].parse_node_); 01136 } 01137 ACE_SVC_CONF_PARAM->obstack.release (); 01138 ;} 01139 break; 01140 01141 case 3: 01142 01143 { 01144 ACE_SVC_CONF_PARAM->obstack.release (); 01145 ;} 01146 break; 01147 01148 case 11: 01149 01150 { 01151 if ((ace_yyvsp[-1].svc_record_) != 0) 01152 (ace_yyval.parse_node_) = new ACE_Dynamic_Node ((ace_yyvsp[-1].svc_record_), (ace_yyvsp[0].ident_)); 01153 else 01154 (ace_yyval.parse_node_) = 0; 01155 ;} 01156 break; 01157 01158 case 12: 01159 01160 { 01161 (ace_yyval.parse_node_) = new ACE_Static_Node ((ace_yyvsp[-1].ident_), (ace_yyvsp[0].ident_)); 01162 ;} 01163 break; 01164 01165 case 13: 01166 01167 { 01168 (ace_yyval.parse_node_) = new ACE_Suspend_Node ((ace_yyvsp[0].ident_)); 01169 ;} 01170 break; 01171 01172 case 14: 01173 01174 { 01175 (ace_yyval.parse_node_) = new ACE_Resume_Node ((ace_yyvsp[0].ident_)); 01176 ;} 01177 break; 01178 01179 case 15: 01180 01181 { 01182 (ace_yyval.parse_node_) = new ACE_Remove_Node ((ace_yyvsp[0].ident_)); 01183 ;} 01184 break; 01185 01186 case 16: 01187 01188 { 01189 (ace_yyval.parse_node_) = new ACE_Stream_Node ((ace_yyvsp[-1].static_node_), (ace_yyvsp[0].parse_node_)); 01190 ;} 01191 break; 01192 01193 case 17: 01194 01195 { (ace_yyval.static_node_) = new ACE_Static_Node ((ace_yyvsp[0].ident_)); ;} 01196 break; 01197 01198 case 18: 01199 01200 { 01201 (ace_yyval.parse_node_) = new ACE_Dummy_Node ((ace_yyvsp[-1].static_node_), (ace_yyvsp[0].parse_node_)); 01202 ;} 01203 break; 01204 01205 case 19: 01206 01207 { 01208 ;} 01209 break; 01210 01211 case 20: 01212 01213 { 01214 ;} 01215 break; 01216 01217 case 21: 01218 01219 { 01220 // Initialize left context... 01221 (ace_yyval.static_node_) = (ace_yyvsp[-1].static_node_); 01222 ;} 01223 break; 01224 01225 case 22: 01226 01227 { 01228 (ace_yyval.parse_node_) = (ace_yyvsp[-1].parse_node_); 01229 ;} 01230 break; 01231 01232 case 23: 01233 01234 { (ace_yyval.parse_node_) = 0; ;} 01235 break; 01236 01237 case 24: 01238 01239 { 01240 if ((ace_yyvsp[0].parse_node_) != 0) 01241 { 01242 (ace_yyvsp[0].parse_node_)->link ((ace_yyvsp[-1].parse_node_)); 01243 (ace_yyval.parse_node_) = (ace_yyvsp[0].parse_node_); 01244 } 01245 ;} 01246 break; 01247 01248 case 25: 01249 01250 { (ace_yyval.parse_node_) = 0; ;} 01251 break; 01252 01253 case 26: 01254 01255 { 01256 ACE_Static_Node *svc_type = (ace_yyvsp[0].static_node_); 01257 01258 if (svc_type != 0) 01259 { 01260 ACE_Static_Node *module = (ace_yyvsp[-2].static_node_); 01261 01262 ACE_ARGV args (svc_type->parameters ()); 01263 ACE_Module_Type *mt = ace_get_module (module->record (ACE_SVC_CONF_PARAM->config), 01264 svc_type->record (ACE_SVC_CONF_PARAM->config), 01265 ACE_SVC_CONF_PARAM->yyerrno); 01266 ACE_Stream_Type *st = 01267 dynamic_cast<ACE_Stream_Type *> (const_cast<ACE_Service_Type_Impl *> (module->record (ACE_SVC_CONF_PARAM->config)->type ())); 01268 01269 if (!st 01270 || !mt 01271 || mt->init (args.argc (), args.argv ()) == -1 01272 || st->push (mt) == -1) 01273 { 01274 ACE_ERROR ((LM_ERROR, 01275 ACE_TEXT ("dynamic initialization failed for Module %s\n"), 01276 svc_type->name ())); 01277 ACE_SVC_CONF_PARAM->yyerrno++; 01278 } 01279 } 01280 ;} 01281 break; 01282 01283 case 27: 01284 01285 { 01286 ACE_Static_Node *sn = (ace_yyvsp[-2].static_node_); 01287 ACE_Module_Type *mt = ace_get_module (sn->record (ACE_SVC_CONF_PARAM->config), 01288 (ace_yyvsp[0].static_node_)->name (), 01289 ACE_SVC_CONF_PARAM->yyerrno); 01290 01291 if (((ACE_Stream_Type *) sn->record (ACE_SVC_CONF_PARAM->config)->type ())->push (mt) == -1) 01292 { 01293 ACE_ERROR ((LM_ERROR, 01294 ACE_TEXT ("Problem with static\n"))); 01295 ACE_SVC_CONF_PARAM->yyerrno++; 01296 } 01297 ;} 01298 break; 01299 01300 case 28: 01301 01302 { 01303 ACE_Static_Node *sn = (ace_yyvsp[-2].static_node_); 01304 ACE_Module_Type *mt = ace_get_module (sn->record (ACE_SVC_CONF_PARAM->config), 01305 sn->name (), 01306 ACE_SVC_CONF_PARAM->yyerrno); 01307 if (mt != 0) 01308 mt->suspend (); 01309 ;} 01310 break; 01311 01312 case 29: 01313 01314 { 01315 ACE_Static_Node *sn = (ace_yyvsp[-2].static_node_); 01316 ACE_Module_Type *mt = ace_get_module (sn->record (ACE_SVC_CONF_PARAM->config), 01317 (ace_yyvsp[0].static_node_)->name (), 01318 ACE_SVC_CONF_PARAM->yyerrno); 01319 if (mt != 0) 01320 mt->resume (); 01321 ;} 01322 break; 01323 01324 case 30: 01325 01326 { 01327 ACE_Static_Node *stream = (ace_yyvsp[-2].static_node_); 01328 ACE_Static_Node *module = (ace_yyvsp[0].static_node_); 01329 ACE_Module_Type *mt = ace_get_module (stream->record (ACE_SVC_CONF_PARAM->config), 01330 module->name (), 01331 ACE_SVC_CONF_PARAM->yyerrno); 01332 01333 ACE_Stream_Type *st = 01334 dynamic_cast<ACE_Stream_Type *> (const_cast<ACE_Service_Type_Impl *> (stream->record (ACE_SVC_CONF_PARAM->config)->type ())); 01335 if (!st || (mt != 0 && st->remove (mt) == -1)) 01336 { 01337 ACE_ERROR ((LM_ERROR, 01338 ACE_TEXT ("cannot remove Module_Type %s from STREAM_Type %s\n"), 01339 module->name (), 01340 stream->name ())); 01341 ACE_SVC_CONF_PARAM->yyerrno++; 01342 } 01343 ;} 01344 break; 01345 01346 case 31: 01347 01348 { 01349 (ace_yyval.svc_record_) = new ACE_Service_Type_Factory ((ace_yyvsp[-3].ident_), (ace_yyvsp[-2].type_), (ace_yyvsp[-1].location_node_), (ace_yyvsp[0].type_)); 01350 ;} 01351 break; 01352 01353 case 32: 01354 01355 { 01356 (ace_yyval.type_) = 1; 01357 ;} 01358 break; 01359 01360 case 33: 01361 01362 { 01363 (ace_yyval.type_) = 0; 01364 ;} 01365 break; 01366 01367 case 34: 01368 01369 { 01370 (ace_yyval.type_) = 1; 01371 ;} 01372 break; 01373 01374 case 35: 01375 01376 { 01377 (ace_yyval.location_node_) = new ACE_Object_Node ((ace_yyvsp[-2].ident_), (ace_yyvsp[0].ident_)); 01378 ;} 01379 break; 01380 01381 case 36: 01382 01383 { 01384 (ace_yyval.location_node_) = new ACE_Function_Node ((ace_yyvsp[-4].ident_), (ace_yyvsp[-2].ident_)); 01385 ;} 01386 break; 01387 01388 case 37: 01389 01390 { 01391 (ace_yyval.location_node_) = new ACE_Static_Function_Node ((ace_yyvsp[-2].ident_)); 01392 ;} 01393 break; 01394 01395 case 38: 01396 01397 { 01398 (ace_yyval.type_) = ACE_MODULE_T; 01399 ;} 01400 break; 01401 01402 case 39: 01403 01404 { 01405 (ace_yyval.type_) = ACE_SVC_OBJ_T; 01406 ;} 01407 break; 01408 01409 case 40: 01410 01411 { 01412 (ace_yyval.type_) = ACE_STREAM_T; 01413 ;} 01414 break; 01415 01416 case 42: 01417 01418 { (ace_yyval.ident_) = 0; ;} 01419 break; 01420 01421 01422 } 01423 01424 /* Line 1037 of yacc.c. */ 01425 01426 01427 ace_yyvsp -= ace_yylen; 01428 ace_yyssp -= ace_yylen; 01429 01430 01431 ACE_YY_STACK_PRINT (ace_yyss, ace_yyssp); 01432 01433 *++ace_yyvsp = ace_yyval; 01434 01435 01436 /* Now `shift' the result of the reduction. Determine what state 01437 that goes to, based on the state we popped back to and the rule 01438 number reduced by. */ 01439 01440 ace_yyn = ace_yyr1[ace_yyn]; 01441 01442 ace_yystate = ace_yypgoto[ace_yyn - ACE_YYNTOKENS] + *ace_yyssp; 01443 if (0 <= ace_yystate && ace_yystate <= ACE_YYLAST && ace_yycheck[ace_yystate] == *ace_yyssp) 01444 ace_yystate = ace_yytable[ace_yystate]; 01445 else 01446 ace_yystate = ace_yydefgoto[ace_yyn - ACE_YYNTOKENS]; 01447 01448 goto ace_yynewstate; 01449 01450 01451 /*------------------------------------. 01452 | ace_yyerrlab -- here on detecting error | 01453 `------------------------------------*/ 01454 ace_yyerrlab: 01455 /* If not already recovering from an error, report this error. */ 01456 if (!ace_yyerrstatus) 01457 { 01458 ++ace_yynerrs; 01459 #if ACE_YYERROR_VERBOSE 01460 ace_yyn = ace_yypact[ace_yystate]; 01461 01462 if (ACE_YYPACT_NINF < ace_yyn && ace_yyn < ACE_YYLAST) 01463 { 01464 ACE_YYSIZE_T ace_yysize = 0; 01465 int ace_yytype = ACE_YYTRANSLATE (ace_yychar); 01466 const char* ace_yyprefix; 01467 char *ace_yymsg; 01468 int ace_yyx; 01469 01470 /* Start ACE_YYX at -ACE_YYN if negative to avoid negative indexes in 01471 ACE_YYCHECK. */ 01472 int ace_yyxbegin = ace_yyn < 0 ? -ace_yyn : 0; 01473 01474 /* Stay within bounds of both ace_yycheck and ace_yytname. */ 01475 int ace_yychecklim = ACE_YYLAST - ace_yyn; 01476 int ace_yyxend = ace_yychecklim < ACE_YYNTOKENS ? ace_yychecklim : ACE_YYNTOKENS; 01477 int ace_yycount = 0; 01478 01479 ace_yyprefix = ", expecting "; 01480 for (ace_yyx = ace_yyxbegin; ace_yyx < ace_yyxend; ++ace_yyx) 01481 if (ace_yycheck[ace_yyx + ace_yyn] == ace_yyx && ace_yyx != ACE_YYTERROR) 01482 { 01483 ace_yysize += ace_yystrlen (ace_yyprefix) + ace_yystrlen (ace_yytname [ace_yyx]); 01484 ace_yycount += 1; 01485 if (ace_yycount == 5) 01486 { 01487 ace_yysize = 0; 01488 break; 01489 } 01490 } 01491 ace_yysize += (sizeof ("syntax error, unexpected ") 01492 + ace_yystrlen (ace_yytname[ace_yytype])); 01493 ace_yymsg = (ACE_TCHAR *) ACE_YYSTACK_ALLOC (ace_yysize); 01494 if (ace_yymsg != 0) 01495 { 01496 char *ace_yyp = ace_yystpcpy (ace_yymsg, "syntax error, unexpected "); 01497 ace_yyp = ace_yystpcpy (ace_yyp, ace_yytname[ace_yytype]); 01498 01499 if (ace_yycount < 5) 01500 { 01501 ace_yyprefix = ", expecting "; 01502 for (ace_yyx = ace_yyxbegin; ace_yyx < ace_yyxend; ++ace_yyx) 01503 if (ace_yycheck[ace_yyx + ace_yyn] == ace_yyx && ace_yyx != ACE_YYTERROR) 01504 { 01505 ace_yyp = ace_yystpcpy (ace_yyp, ace_yyprefix); 01506 ace_yyp = ace_yystpcpy (ace_yyp, ace_yytname[ace_yyx]); 01507 ace_yyprefix = " or "; 01508 } 01509 } 01510 ace_yyerror (ACE_SVC_CONF_PARAM->yyerrno, ACE_SVC_CONF_PARAM->yylineno, ace_yymsg); 01511 ACE_YYSTACK_FREE (ace_yymsg); 01512 } 01513 else 01514 ace_yyerror (ACE_SVC_CONF_PARAM->yyerrno, ACE_SVC_CONF_PARAM->yylineno, "syntax error; also virtual memory exhausted"); 01515 } 01516 else 01517 #endif /* ACE_YYERROR_VERBOSE */ 01518 ace_yyerror (ACE_SVC_CONF_PARAM->yyerrno, ACE_SVC_CONF_PARAM->yylineno, "syntax error"); 01519 } 01520 01521 01522 01523 if (ace_yyerrstatus == 3) 01524 { 01525 /* If just tried and failed to reuse look-ahead token after an 01526 error, discard it. */ 01527 01528 if (ace_yychar <= ACE_YYEOF) 01529 { 01530 /* If at end of input, pop the error token, 01531 then the rest of the stack, then return failure. */ 01532 if (ace_yychar == ACE_YYEOF) 01533 for (;;) 01534 { 01535 01536 ACE_YYPOPSTACK; 01537 if (ace_yyssp == ace_yyss) 01538 ACE_YYABORT; 01539 ace_yydestruct ("Error: popping", 01540 ace_yystos[*ace_yyssp], ace_yyvsp); 01541 } 01542 } 01543 else 01544 { 01545 ace_yydestruct ("Error: discarding", ace_yytoken, &ace_yylval); 01546 ace_yychar = ACE_YYEMPTY; 01547 } 01548 } 01549 01550 /* Else will try to reuse look-ahead token after shifting the error 01551 token. */ 01552 goto ace_yyerrlab1; 01553 01554 01555 /*---------------------------------------------------. 01556 | ace_yyerrorlab -- error raised explicitly by ACE_YYERROR. | 01557 `---------------------------------------------------*/ 01558 ace_yyerrorlab: 01559 01560 #if defined (__GNUC__) || defined (ACE_WIN32) || defined (__HP_aCC) || defined (__DECCXX) 01561 /* Pacify GCC when the user code never invokes ACE_YYERROR and the label 01562 ace_yyerrorlab therefore never appears in user code. */ 01563 if (0) 01564 goto ace_yyerrorlab; 01565 #endif 01566 01567 ace_yyvsp -= ace_yylen; 01568 ace_yyssp -= ace_yylen; 01569 ace_yystate = *ace_yyssp; 01570 goto ace_yyerrlab1; 01571 01572 01573 /*-------------------------------------------------------------. 01574 | ace_yyerrlab1 -- common code for both syntax error and ACE_YYERROR. | 01575 `-------------------------------------------------------------*/ 01576 ace_yyerrlab1: 01577 ace_yyerrstatus = 3; /* Each real token shifted decrements this. */ 01578 01579 for (;;) 01580 { 01581 ace_yyn = ace_yypact[ace_yystate]; 01582 if (ace_yyn != ACE_YYPACT_NINF) 01583 { 01584 ace_yyn += ACE_YYTERROR; 01585 if (0 <= ace_yyn && ace_yyn <= ACE_YYLAST && ace_yycheck[ace_yyn] == ACE_YYTERROR) 01586 { 01587 ace_yyn = ace_yytable[ace_yyn]; 01588 if (0 < ace_yyn) 01589 break; 01590 } 01591 } 01592 01593 /* Pop the current state because it cannot handle the error token. */ 01594 if (ace_yyssp == ace_yyss) 01595 ACE_YYABORT; 01596 01597 01598 ace_yydestruct ("Error: popping", ace_yystos[ace_yystate], ace_yyvsp); 01599 ACE_YYPOPSTACK; 01600 ace_yystate = *ace_yyssp; 01601 ACE_YY_STACK_PRINT (ace_yyss, ace_yyssp); 01602 } 01603 01604 if (ace_yyn == ACE_YYFINAL) 01605 ACE_YYACCEPT; 01606 01607 *++ace_yyvsp = ace_yylval; 01608 01609 01610 /* Shift the error token. */ 01611 ACE_YY_SYMBOL_PRINT ("Shifting", ace_yystos[ace_yyn], ace_yyvsp, ace_yylsp); 01612 01613 ace_yystate = ace_yyn; 01614 goto ace_yynewstate; 01615 01616 01617 /*-------------------------------------. 01618 | ace_yyacceptlab -- ACE_YYACCEPT comes here. | 01619 `-------------------------------------*/ 01620 ace_yyacceptlab: 01621 ace_yyresult = 0; 01622 goto ace_yyreturn; 01623 01624 /*-----------------------------------. 01625 | ace_yyabortlab -- ACE_YYABORT comes here. | 01626 `-----------------------------------*/ 01627 ace_yyabortlab: 01628 ace_yydestruct ("Error: discarding lookahead", 01629 ace_yytoken, &ace_yylval); 01630 ace_yychar = ACE_YYEMPTY; 01631 ace_yyresult = 1; 01632 goto ace_yyreturn; 01633 01634 #ifndef ace_yyoverflow 01635 /*----------------------------------------------. 01636 | ace_yyoverflowlab -- parser overflow comes here. | 01637 `----------------------------------------------*/ 01638 ace_yyoverflowlab: 01639 ace_yyerror (ACE_SVC_CONF_PARAM->yyerrno, ACE_SVC_CONF_PARAM->yylineno, "parser stack overflow"); 01640 ace_yyresult = 2; 01641 /* Fall through. */ 01642 #endif 01643 01644 ace_yyreturn: 01645 #ifndef ace_yyoverflow 01646 if (ace_yyss != ace_yyssa) 01647 ACE_YYSTACK_FREE (ace_yyss); 01648 #endif 01649 return ace_yyresult; 01650 } |
|
Performs the lexical analysis.
Definition at line 78 of file Svc_Conf.h. |
|
Name of input stream.
Definition at line 81 of file Svc_Conf.h. |
|
Holds the length of the lexeme for the current token.
Definition at line 90 of file Svc_Conf.h. |
|
Holds the lexeme for the current token.
Definition at line 87 of file Svc_Conf.h. |