diff options
author | schmidt <douglascraigschmidt@users.noreply.github.com> | 1998-05-15 03:31:06 +0000 |
---|---|---|
committer | schmidt <douglascraigschmidt@users.noreply.github.com> | 1998-05-15 03:31:06 +0000 |
commit | 8b852ffc1bdca3ad129ad0beeb93028fa695e590 (patch) | |
tree | f4eae324dc4b6fea3a503bf1680f88edae96cf3d /ace/Svc_Conf_l.cpp | |
parent | 2fdbd9e922334cd2b39f677daabd23812a443e6c (diff) | |
download | ATCD-8b852ffc1bdca3ad129ad0beeb93028fa695e590.tar.gz |
*** empty log message ***
Diffstat (limited to 'ace/Svc_Conf_l.cpp')
-rw-r--r-- | ace/Svc_Conf_l.cpp | 63 |
1 files changed, 35 insertions, 28 deletions
diff --git a/ace/Svc_Conf_l.cpp b/ace/Svc_Conf_l.cpp index 3dc1700a3f2..5b7fa4b6271 100644 --- a/ace/Svc_Conf_l.cpp +++ b/ace/Svc_Conf_l.cpp @@ -502,6 +502,10 @@ int ace_yylineno = 1; // Keeps track of the number of errors encountered so far. int ace_yyerrno = 0; +// Used to parse service configurator directives from a string rather +// than from a svc.conf file. +char *ace_yydirective = 0; + #define token(x) x /* Macros after this point can all be overridden by user definitions in @@ -596,7 +600,7 @@ ACE_YY_DECL register char *ace_yy_cp, *ace_yy_bp; register int ace_yy_act; -# line 32 "Svc_Conf.l" +# line 36 "Svc_Conf.l" @@ -684,97 +688,97 @@ case 1: ace_yy_c_buf_p = ace_yy_cp -= 1; ACE_YY_DO_BEFORE_ACTION; /* set up ace_yytext again */ ACE_YY_USER_ACTION -# line 34 "Svc_Conf.l" +# line 38 "Svc_Conf.l" ; /* EMPTY */ ACE_YY_BREAK case 2: ACE_YY_USER_ACTION -# line 35 "Svc_Conf.l" +# line 39 "Svc_Conf.l" { return token (ACE_DYNAMIC); } /* ACE_YY_BREAK */ case 3: ACE_YY_USER_ACTION -# line 36 "Svc_Conf.l" +# line 40 "Svc_Conf.l" { return token (ACE_STATIC); } /* ACE_YY_BREAK */ case 4: ACE_YY_USER_ACTION -# line 37 "Svc_Conf.l" +# line 41 "Svc_Conf.l" { return token (ACE_SUSPEND); } /* ACE_YY_BREAK */ case 5: ACE_YY_USER_ACTION -# line 38 "Svc_Conf.l" +# line 42 "Svc_Conf.l" { return token (ACE_RESUME); } /* ACE_YY_BREAK */ case 6: ACE_YY_USER_ACTION -# line 39 "Svc_Conf.l" +# line 43 "Svc_Conf.l" { return token (ACE_REMOVE); } /* ACE_YY_BREAK */ case 7: ACE_YY_USER_ACTION -# line 40 "Svc_Conf.l" +# line 44 "Svc_Conf.l" { return token (ACE_USTREAM); } /* ACE_YY_BREAK */ case 8: ACE_YY_USER_ACTION -# line 41 "Svc_Conf.l" +# line 45 "Svc_Conf.l" { return token (ACE_MODULE_T); } /* ACE_YY_BREAK */ case 9: ACE_YY_USER_ACTION -# line 42 "Svc_Conf.l" +# line 46 "Svc_Conf.l" { return token (ACE_SVC_OBJ_T); } /* ACE_YY_BREAK */ case 10: ACE_YY_USER_ACTION -# line 43 "Svc_Conf.l" +# line 47 "Svc_Conf.l" { return token (ACE_STREAM_T); } /* ACE_YY_BREAK */ case 11: ACE_YY_USER_ACTION -# line 44 "Svc_Conf.l" +# line 48 "Svc_Conf.l" { return token (ACE_ACTIVE); } /* ACE_YY_BREAK */ case 12: ACE_YY_USER_ACTION -# line 45 "Svc_Conf.l" +# line 49 "Svc_Conf.l" { return token (ACE_INACTIVE); } /* ACE_YY_BREAK */ case 13: ACE_YY_USER_ACTION -# line 46 "Svc_Conf.l" +# line 50 "Svc_Conf.l" { return token (ACE_COLON); } /* ACE_YY_BREAK */ case 14: ACE_YY_USER_ACTION -# line 47 "Svc_Conf.l" +# line 51 "Svc_Conf.l" { return token (ACE_STAR); } /* ACE_YY_BREAK */ case 15: ACE_YY_USER_ACTION -# line 48 "Svc_Conf.l" +# line 52 "Svc_Conf.l" { return token (ACE_LPAREN); } /* ACE_YY_BREAK */ case 16: ACE_YY_USER_ACTION -# line 49 "Svc_Conf.l" +# line 53 "Svc_Conf.l" { return token (ACE_RPAREN); } /* ACE_YY_BREAK */ case 17: ACE_YY_USER_ACTION -# line 50 "Svc_Conf.l" +# line 54 "Svc_Conf.l" { return token (ACE_LBRACE); } /* ACE_YY_BREAK */ case 18: ACE_YY_USER_ACTION -# line 51 "Svc_Conf.l" +# line 55 "Svc_Conf.l" { return token (ACE_RBRACE); } /* ACE_YY_BREAK */ case 19: ACE_YY_USER_ACTION -# line 52 "Svc_Conf.l" +# line 56 "Svc_Conf.l" { // Eliminate the opening and closing double quotes *ACE_OS::strrchr (ace_yytext, '"') = '\0'; ace_yyleng -= 1; @@ -783,7 +787,7 @@ ACE_YY_USER_ACTION /* ACE_YY_BREAK */ case 20: ACE_YY_USER_ACTION -# line 57 "Svc_Conf.l" +# line 61 "Svc_Conf.l" { ace_yylval.ident_ = ace_obstack->copy (ace_yytext, ace_yyleng); return token (ACE_IDENT); @@ -791,7 +795,7 @@ ACE_YY_USER_ACTION /* ACE_YY_BREAK */ case 21: ACE_YY_USER_ACTION -# line 61 "Svc_Conf.l" +# line 65 "Svc_Conf.l" { ace_yylval.ident_ = ace_obstack->copy (ace_yytext, ace_yyleng); return token (ACE_PATHNAME); @@ -799,29 +803,29 @@ ACE_YY_USER_ACTION /* ACE_YY_BREAK */ case 22: ACE_YY_USER_ACTION -# line 65 "Svc_Conf.l" +# line 69 "Svc_Conf.l" ; /* EMPTY */ ACE_YY_BREAK case 23: ACE_YY_USER_ACTION -# line 66 "Svc_Conf.l" +# line 70 "Svc_Conf.l" { ace_yylineno++; } ACE_YY_BREAK case 24: ACE_YY_USER_ACTION -# line 67 "Svc_Conf.l" +# line 71 "Svc_Conf.l" { ACE_ERROR ((LM_ERROR, ASYS_TEXT ("unknown char = %d\n"), *ace_yytext)); } ACE_YY_BREAK case ACE_YY_STATE_EOF(INITIAL): case ACE_YY_STATE_EOF(PARAMETERS): case ACE_YY_STATE_EOF(NORMAL): -# line 68 "Svc_Conf.l" +# line 72 "Svc_Conf.l" { ACE_YY_NEW_FILE; ace_yyterminate(); } /* ACE_YY_BREAK */ case 25: ACE_YY_USER_ACTION -# line 69 "Svc_Conf.l" +# line 73 "Svc_Conf.l" ACE_SVC_CONF_ECHO; ACE_YY_BREAK @@ -1530,7 +1534,7 @@ void *ptr; { free( ACE_MALLOC_T (ptr) ); } -# line 69 "Svc_Conf.l" +# line 73 "Svc_Conf.l" int ace_yywrap (void) @@ -1538,5 +1542,8 @@ ace_yywrap (void) ::fflush (ace_yyin); ace_yytext[0] = '#'; ace_yyleng = 0; + + // This needs to be freed to prevent a memory leak. + ace_yy_delete_buffer (ace_yy_current_buffer); return 1; } |