diff options
author | nanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2002-02-11 04:15:59 +0000 |
---|---|---|
committer | nanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2002-02-11 04:15:59 +0000 |
commit | a693b0a723f2ba166bbb7272edf7e84d97f10229 (patch) | |
tree | c28db7fd1df3dfbea94a2ca3bdd44552e61a49c4 | |
parent | afa7fc5f659e645396fed26a034a28f586000304 (diff) | |
download | ATCD-a693b0a723f2ba166bbb7272edf7e84d97f10229.tar.gz |
ChangeLogTag:Sun Feb 10 22:11:43 2002 Nanbor Wang <nanbor@cs.wustl.edu>
-rw-r--r-- | ChangeLog | 12 | ||||
-rw-r--r-- | ChangeLogs/ChangeLog-02a | 12 | ||||
-rw-r--r-- | ChangeLogs/ChangeLog-03a | 12 | ||||
-rw-r--r-- | ace/Parse_Node.cpp | 2 | ||||
-rw-r--r-- | ace/Parse_Node.h | 2 | ||||
-rw-r--r-- | ace/Service_Config.cpp | 8 | ||||
-rw-r--r-- | ace/Service_Config.h | 4 | ||||
-rw-r--r-- | ace/Svc_Conf.h | 4 | ||||
-rw-r--r-- | ace/Svc_Conf.y | 4 | ||||
-rw-r--r-- | ace/Svc_Conf_Lexer_Guard.cpp | 2 | ||||
-rw-r--r-- | ace/Svc_Conf_l.cpp | 6 | ||||
-rw-r--r-- | ace/Svc_Conf_y.cpp | 52 |
12 files changed, 94 insertions, 26 deletions
diff --git a/ChangeLog b/ChangeLog index 19e4e3f361b..ed97944c761 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +Sun Feb 10 22:11:43 2002 Nanbor Wang <nanbor@cs.wustl.edu> + + * ace/Parse_Node.cpp: + * ace/Parse_Node.h: + * ace/Service_Config.cpp: + * ace/Service_Config.h: + * ace/Svc_Conf.h: + * ace/Svc_Conf.y: + * ace/Svc_Conf_Lexer_Guard.cpp: + * ace/Svc_Conf_l.cpp: + * ace/Svc_Conf_y.cpp: Decoupled old Service_Config parser from ACE. + Thu Feb 07 01:48:06 2002 Nanbor Wang <nanbor@cs.wustl.edu> * XML/examples/SAXPrint/main.cpp: Added a new test to try the new diff --git a/ChangeLogs/ChangeLog-02a b/ChangeLogs/ChangeLog-02a index 19e4e3f361b..ed97944c761 100644 --- a/ChangeLogs/ChangeLog-02a +++ b/ChangeLogs/ChangeLog-02a @@ -1,3 +1,15 @@ +Sun Feb 10 22:11:43 2002 Nanbor Wang <nanbor@cs.wustl.edu> + + * ace/Parse_Node.cpp: + * ace/Parse_Node.h: + * ace/Service_Config.cpp: + * ace/Service_Config.h: + * ace/Svc_Conf.h: + * ace/Svc_Conf.y: + * ace/Svc_Conf_Lexer_Guard.cpp: + * ace/Svc_Conf_l.cpp: + * ace/Svc_Conf_y.cpp: Decoupled old Service_Config parser from ACE. + Thu Feb 07 01:48:06 2002 Nanbor Wang <nanbor@cs.wustl.edu> * XML/examples/SAXPrint/main.cpp: Added a new test to try the new diff --git a/ChangeLogs/ChangeLog-03a b/ChangeLogs/ChangeLog-03a index 19e4e3f361b..ed97944c761 100644 --- a/ChangeLogs/ChangeLog-03a +++ b/ChangeLogs/ChangeLog-03a @@ -1,3 +1,15 @@ +Sun Feb 10 22:11:43 2002 Nanbor Wang <nanbor@cs.wustl.edu> + + * ace/Parse_Node.cpp: + * ace/Parse_Node.h: + * ace/Service_Config.cpp: + * ace/Service_Config.h: + * ace/Svc_Conf.h: + * ace/Svc_Conf.y: + * ace/Svc_Conf_Lexer_Guard.cpp: + * ace/Svc_Conf_l.cpp: + * ace/Svc_Conf_y.cpp: Decoupled old Service_Config parser from ACE. + Thu Feb 07 01:48:06 2002 Nanbor Wang <nanbor@cs.wustl.edu> * XML/examples/SAXPrint/main.cpp: Added a new test to try the new diff --git a/ace/Parse_Node.cpp b/ace/Parse_Node.cpp index 899398bae90..37ad2d1b4d0 100644 --- a/ace/Parse_Node.cpp +++ b/ace/Parse_Node.cpp @@ -7,6 +7,7 @@ // Provide the class hierarchy that defines the parse tree of Service // Nodes. +#if defined (ACE_HAS_LEGACY_SERVICE_CONFIG) #if !defined (__ACE_INLINE__) #include "ace/Parse_Node.i" @@ -650,3 +651,4 @@ ACE_Static_Function_Node::~ACE_Static_Function_Node (void) #if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ +#endif /* ACE_HAS_LEGACY_SERVICE_CONFIG */ diff --git a/ace/Parse_Node.h b/ace/Parse_Node.h index 6df9def1915..288b2a42210 100644 --- a/ace/Parse_Node.h +++ b/ace/Parse_Node.h @@ -22,6 +22,7 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ +#if defined (ACE_HAS_LEGACY_SERVICE_CONFIG) /** * @class ACE_Parse_Node * @@ -338,6 +339,7 @@ extern int ace_yyerrno; // Global variable used to communicate between the parser and the main // program. extern ACE_Service_Config *ace_this_svc; +#endif /* ACE_HAS_LEGACY_SERVICE_CONFIG */ #include "ace/post.h" #endif /* ACE_PARSE_NODE_H */ diff --git a/ace/Service_Config.cpp b/ace/Service_Config.cpp index 9274fe72b5a..a40f54eb946 100644 --- a/ace/Service_Config.cpp +++ b/ace/Service_Config.cpp @@ -298,6 +298,7 @@ ACE_Service_Config::initialize (const ACE_Service_Type *sr, } } +#if defined (ACE_HAS_LEGACY_SERVICE_CONFIG) int ACE_Service_Config::process_directives_i (ACE_Svc_Conf_Param *param) { @@ -322,6 +323,7 @@ ACE_Service_Config::process_directives_i (ACE_Svc_Conf_Param *param) else return 0; } +#endif /* ACE_HAS_LEGACY_SERVICE_CONFIG */ int ACE_Service_Config::process_file (const ACE_TCHAR file[]) @@ -330,6 +332,7 @@ ACE_Service_Config::process_file (const ACE_TCHAR file[]) int result = 0; +#if defined (ACE_HAS_LEGACY_SERVICE_CONFIG) FILE *fp = ACE_OS::fopen (file, ACE_LIB_TEXT ("r")); @@ -354,6 +357,7 @@ ACE_Service_Config::process_file (const ACE_TCHAR file[]) (void) ACE_OS::fclose (fp); } +#endif /* ACE_HAS_LEGACY_SERVICE_CONFIG */ return result; } @@ -368,6 +372,7 @@ ACE_Service_Config::process_directive (const ACE_TCHAR directive[]) ACE_LIB_TEXT ("Service_Config::process_directive - %s\n"), directive)); +#if defined (ACE_HAS_LEGACY_SERVICE_CONFIG) ACE_UNUSED_ARG (directive); ACE_Svc_Conf_Param d (directive); @@ -375,6 +380,9 @@ ACE_Service_Config::process_directive (const ACE_TCHAR directive[]) int result = ACE_Service_Config::process_directives_i (&d); return result; +#else + return -1; +#endif /* ACE_HAS_LEGACY_SERVICE_CONFIG */ } // Process service configuration requests as indicated in the queue of diff --git a/ace/Service_Config.h b/ace/Service_Config.h index 2942816d6dd..f84ff86b7c3 100644 --- a/ace/Service_Config.h +++ b/ace/Service_Config.h @@ -31,7 +31,9 @@ class ACE_Service_Type; class ACE_Allocator; class ACE_Reactor; class ACE_Thread_Manager; +#if defined (ACE_HAS_LEGACY_SERVICE_CONFIG) class ACE_Svc_Conf_Param; +#endif /* ACE_HAS_LEGACY_SERVICE_CONFIG */ extern "C" { @@ -355,10 +357,12 @@ protected: /// command-line. Returns the number of errors that occurred. static int process_commandline_directives (void); +#if defined (ACE_HAS_LEGACY_SERVICE_CONFIG) /// This is the implementation function that process_directives() /// and process_directive() both call. Returns the number of errors /// that occurred. static int process_directives_i (ACE_Svc_Conf_Param *param); +#endif /* ACE_HAS_LEGACY_SERVICE_CONFIG */ /// Become a daemon. static int start_daemon (void); diff --git a/ace/Svc_Conf.h b/ace/Svc_Conf.h index ecf285baebf..971699fc9af 100644 --- a/ace/Svc_Conf.h +++ b/ace/Svc_Conf.h @@ -28,6 +28,8 @@ #include "ace/Service_Config.h" #include "ace/Parse_Node.h" +#if defined (ACE_HAS_LEGACY_SERVICE_CONFIG) + // Forward declarations. struct ace_yy_buffer_state; @@ -194,6 +196,8 @@ extern ACE_TCHAR *ace_yytext; /// Holds the length of the lexeme for the current token extern int ace_yyleng; +#endif /* ACE_HAS_LEGACY_SERVICE_CONFIG */ + /// Factory that creates a new ACE_Service_Type_Impl. extern ACE_Service_Type_Impl * ace_create_service_type (const ACE_TCHAR *, diff --git a/ace/Svc_Conf.y b/ace/Svc_Conf.y index 326c9d9b442..dfb44e6fc7e 100644 --- a/ace/Svc_Conf.y +++ b/ace/Svc_Conf.y @@ -244,6 +244,9 @@ svc_location sym, flags, gobbler); + if (stp == 0) + ace_yyerrno++; + $$ = new ACE_Service_Type ($1, stp, $3->handle (), @@ -435,7 +438,6 @@ ace_create_service_type (const ACE_TCHAR *name, default: ACE_ERROR ((LM_ERROR, ACE_LIB_TEXT ("unknown case\n"))); - yyerrno++; break; } return stp; diff --git a/ace/Svc_Conf_Lexer_Guard.cpp b/ace/Svc_Conf_Lexer_Guard.cpp index 13848feaac9..74e4db70461 100644 --- a/ace/Svc_Conf_Lexer_Guard.cpp +++ b/ace/Svc_Conf_Lexer_Guard.cpp @@ -1,5 +1,6 @@ // -*- C++ -*- +#if defined (ACE_HAS_LEGACY_SERVICE_CONFIG) #include "ace/Svc_Conf.h" #include "ace/Svc_Conf_Lexer_Guard.h" @@ -34,3 +35,4 @@ ACE_Svc_Conf_Lexer_Guard::~ACE_Svc_Conf_Lexer_Guard (void) ::ace_yy_pop_buffer (this->buffer_); } +#endif /* ACE_HAS_LEGACY_SERVICE_CONFIG */ diff --git a/ace/Svc_Conf_l.cpp b/ace/Svc_Conf_l.cpp index be53770e146..5dcfda2d7f0 100644 --- a/ace/Svc_Conf_l.cpp +++ b/ace/Svc_Conf_l.cpp @@ -1,3 +1,4 @@ +#if defined (ACE_HAS_LEGACY_SERVICE_CONFIG) #define ACE_YY_NO_UNPUT /* A lexical scanner generated by flex */ @@ -846,7 +847,7 @@ case 19: ACE_YY_RULE_SETUP { // Check for first type of string, i.e., - // "double quotes" delimited. + // "double quotes" delimited. ACE_TCHAR *s = ACE_OS::strrchr (ace_yytext, '"'); if (s == 0) // Check for second type of string, i.e., @@ -887,7 +888,7 @@ case 24: ACE_YY_RULE_SETUP { ACE_ERROR ((LM_ERROR, - ACE_LIB_TEXT ("unknown character = (%d"), + ACE_LIB_TEXT ("unknown character = (%d"), *ace_yytext)); if (ACE_OS::ace_isprint (*ace_yytext)) ACE_ERROR ((LM_ERROR, ACE_LIB_TEXT ("|%c"), *ace_yytext)); @@ -1839,3 +1840,4 @@ ace_yy_pop_buffer (ace_yy_buffer_state *buffer) ace_yy_switch_to_buffer (buffer); } +#endif /* ACE_HAS_LEGACY_SERVICE_CONFIG */ diff --git a/ace/Svc_Conf_y.cpp b/ace/Svc_Conf_y.cpp index 5c76230b920..e64cc1ace3d 100644 --- a/ace/Svc_Conf_y.cpp +++ b/ace/Svc_Conf_y.cpp @@ -2,6 +2,7 @@ /* A Bison parser, made from Svc_Conf.y by GNU Bison version 1.28 */ +#if defined (ACE_HAS_LEGACY_SERVICE_CONFIG) #define ACE_YYBISON 1 /* Identify Bison output. */ #define ACE_DYNAMIC 257 @@ -18,6 +19,7 @@ #define ACE_PATHNAME 268 #define ACE_IDENT 269 #define ACE_STRING 270 +#endif /* ACE_HAS_LEGACY_SERVICE_CONFIG */ // $Id$ @@ -31,6 +33,7 @@ ACE_RCSID (ace, Svc_Conf_y, "$Id$") +#if defined (ACE_HAS_LEGACY_SERVICE_CONFIG) // Prototypes. static ACE_Module_Type *ace_get_module (ACE_Static_Node *str_rec, ACE_Static_Node *svc_type); @@ -973,6 +976,9 @@ case 30: sym, flags, gobbler); + if (stp == 0) + ace_yyerrno++; + ace_yyval.svc_record_ = new ACE_Service_Type (ace_yyvsp[-3].ident_, stp, ace_yyvsp[-1].location_node_->handle (), @@ -1342,6 +1348,29 @@ ace_get_module (ACE_Static_Node *str_rec, return mt; } +#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 +main (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_HAS_LEGACY_SERVICE_CONFIG */ + ACE_Service_Type_Impl * ace_create_service_type (const ACE_TCHAR *name, int type, @@ -1377,30 +1406,7 @@ ace_create_service_type (const ACE_TCHAR *name, 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 -main (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 */ |