From 9a9c8c22176b1661755b84c9e9937acb5b3d11ba Mon Sep 17 00:00:00 2001 From: nanbor Date: Wed, 8 May 2002 05:24:21 +0000 Subject: ChangeLogTag:Wed May 8 00:11:54 2002 Nanbor Wang --- ChangeLog | 13 + ChangeLogs/ChangeLog-02a | 13 + ChangeLogs/ChangeLog-03a | 13 + ace/OS.h | 12 +- ace/Parse_Node.cpp | 4 +- ace/Parse_Node.h | 4 +- ace/Service_Config.cpp | 16 +- ace/Service_Config.h | 12 +- ace/Svc_Conf.h | 4 +- ace/Svc_Conf_Lexer_Guard.cpp | 4 +- ace/Svc_Conf_l.cpp | 1554 +++++++++++++++++++++--------------------- ace/Svc_Conf_y.cpp | 304 ++++----- tests/Service_Config_DLL.cpp | 4 +- 13 files changed, 998 insertions(+), 959 deletions(-) diff --git a/ChangeLog b/ChangeLog index 41166911a4c..40a548cfe0f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +Wed May 8 00:11:54 2002 Nanbor Wang + + * ace/OS.h: + * ace/Parse_Node.cpp: + * ace/Parse_Node.h: + * ace/Service_Config.cpp: + * ace/Service_Config.h: + * ace/Svc_Conf.h: + * ace/Svc_Conf_Lexer_Guard.cpp: + * ace/Svc_Conf_l.cpp: + * ace/Svc_Conf_y.cpp: + * tests/Service_Config_DLL.cpp: Simplified the macro check. + Fri May 3 15:48:11 2002 Nanbor Wang * ace/Service_Config.h: diff --git a/ChangeLogs/ChangeLog-02a b/ChangeLogs/ChangeLog-02a index 41166911a4c..40a548cfe0f 100644 --- a/ChangeLogs/ChangeLog-02a +++ b/ChangeLogs/ChangeLog-02a @@ -1,3 +1,16 @@ +Wed May 8 00:11:54 2002 Nanbor Wang + + * ace/OS.h: + * ace/Parse_Node.cpp: + * ace/Parse_Node.h: + * ace/Service_Config.cpp: + * ace/Service_Config.h: + * ace/Svc_Conf.h: + * ace/Svc_Conf_Lexer_Guard.cpp: + * ace/Svc_Conf_l.cpp: + * ace/Svc_Conf_y.cpp: + * tests/Service_Config_DLL.cpp: Simplified the macro check. + Fri May 3 15:48:11 2002 Nanbor Wang * ace/Service_Config.h: diff --git a/ChangeLogs/ChangeLog-03a b/ChangeLogs/ChangeLog-03a index 41166911a4c..40a548cfe0f 100644 --- a/ChangeLogs/ChangeLog-03a +++ b/ChangeLogs/ChangeLog-03a @@ -1,3 +1,16 @@ +Wed May 8 00:11:54 2002 Nanbor Wang + + * ace/OS.h: + * ace/Parse_Node.cpp: + * ace/Parse_Node.h: + * ace/Service_Config.cpp: + * ace/Service_Config.h: + * ace/Svc_Conf.h: + * ace/Svc_Conf_Lexer_Guard.cpp: + * ace/Svc_Conf_l.cpp: + * ace/Svc_Conf_y.cpp: + * tests/Service_Config_DLL.cpp: Simplified the macro check. + Fri May 3 15:48:11 2002 Nanbor Wang * ace/Service_Config.h: diff --git a/ace/OS.h b/ace/OS.h index 58e8432eae6..3446800d94c 100644 --- a/ace/OS.h +++ b/ace/OS.h @@ -389,11 +389,11 @@ typedef struct // Used for dynamic linking. # if !defined (ACE_DEFAULT_SVC_CONF) -# if defined (ACE_USES_CLASSIC_SVC_CONF) && (ACE_USES_CLASSIC_SVC_CONF == 1) +# if (ACE_USES_CLASSIC_SVC_CONF == 1) # define ACE_DEFAULT_SVC_CONF "./svc.conf" # else # define ACE_DEFAULT_SVC_CONF "./svc.conf.xml" -# endif /* ACE_USES_CLASSIC_SVC_CONF && ACE_USES_CLASSIC_SVC_CONF ==1 */ +# endif /* ACE_USES_CLASSIC_SVC_CONF ==1 */ # endif /* ACE_DEFAULT_SVC_CONF */ # if !defined (ACE_DEFAULT_SEM_KEY) @@ -2949,11 +2949,11 @@ typedef void (*ACE_SignalHandlerV)(...); // Used for dynamic linking # if !defined (ACE_DEFAULT_SVC_CONF) -# if defined (ACE_USES_CLASSIC_SVC_CONF) && (ACE_USES_CLASSIC_SVC_CONF == 1) +# if (ACE_USES_CLASSIC_SVC_CONF == 1) # define ACE_DEFAULT_SVC_CONF ACE_LIB_TEXT (".\\svc.conf") # else # define ACE_DEFAULT_SVC_CONF ACE_LIB_TEXT (".\\svc.conf.xml") -# endif /* ACE_USES_CLASSIC_SVC_CONF && ACE_USES_CLASSIC_SVC_CONF ==1 */ +# endif /* ACE_USES_CLASSIC_SVC_CONF ==1 */ # endif /* ACE_DEFAULT_SVC_CONF */ // The following are #defines and #includes that are specific to @@ -3288,11 +3288,11 @@ typedef ACE_UINT64 ACE_hrtime_t; // Used for dynamic linking. # if !defined (ACE_DEFAULT_SVC_CONF) -# if defined (ACE_USES_CLASSIC_SVC_CONF) && (ACE_USES_CLASSIC_SVC_CONF == 1) +# if (ACE_USES_CLASSIC_SVC_CONF == 1) # define ACE_DEFAULT_SVC_CONF ACE_LIB_TEXT ("./svc.conf") # else # define ACE_DEFAULT_SVC_CONF ACE_LIB_TEXT ("./svc.conf.xml") -# endif /* ACE_USES_CLASSIC_SVC_CONF && ACE_USES_CLASSIC_SVC_CONF ==1 */ +# endif /* ACE_USES_CLASSIC_SVC_CONF ==1 */ # endif /* ACE_DEFAULT_SVC_CONF */ // The following are #defines and #includes that are specific to UNIX. diff --git a/ace/Parse_Node.cpp b/ace/Parse_Node.cpp index a2b168ccfdd..3cf9be2ef12 100644 --- a/ace/Parse_Node.cpp +++ b/ace/Parse_Node.cpp @@ -7,7 +7,7 @@ // Provide the class hierarchy that defines the parse tree of Service // Nodes. -#if defined (ACE_USES_CLASSIC_SVC_CONF) && (ACE_USES_CLASSIC_SVC_CONF == 1) +#if (ACE_USES_CLASSIC_SVC_CONF == 1) #if !defined (__ACE_INLINE__) #include "ace/Parse_Node.i" @@ -651,4 +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_USES_CLASSIC_SVC_CONF && ACE_USES_CLASSIC_SVC_CONF == 1 */ +#endif /* ACE_USES_CLASSIC_SVC_CONF == 1 */ diff --git a/ace/Parse_Node.h b/ace/Parse_Node.h index e94dcd68ca5..d626a52270b 100644 --- a/ace/Parse_Node.h +++ b/ace/Parse_Node.h @@ -22,7 +22,7 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ -#if defined (ACE_USES_CLASSIC_SVC_CONF) && (ACE_USES_CLASSIC_SVC_CONF == 1) +#if (ACE_USES_CLASSIC_SVC_CONF == 1) /** * @class ACE_Parse_Node * @@ -339,7 +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_USES_CLASSIC_SVC_CONF && ACE_USES_CLASSIC_SVC_CONF == 1 */ +#endif /* ACE_USES_CLASSIC_SVC_CONF == 1 */ #include "ace/post.h" #endif /* ACE_PARSE_NODE_H */ diff --git a/ace/Service_Config.cpp b/ace/Service_Config.cpp index be58c86edde..72e982f5ebe 100644 --- a/ace/Service_Config.cpp +++ b/ace/Service_Config.cpp @@ -227,7 +227,7 @@ ACE_Service_Config::parse_args (int argc, ACE_TCHAR *argv[]) return 0; } -#if ! defined (ACE_USES_CLASSIC_SVC_CONF) || (ACE_USES_CLASSIC_SVC_CONF == 0) +#if (ACE_USES_CLASSIC_SVC_CONF == 0) ACE_Service_Type * ACE_Service_Config::create_service_type (const ACE_TCHAR *n, ACE_Service_Type_Impl *o, @@ -281,7 +281,7 @@ ACE_Service_Config::create_service_type_impl (const ACE_TCHAR *name, return stp; } -#endif /* !ACE_USES_CLASSIC_SVC_CONF && ACE_USES_CLASSIC_SVC_CONF == 0 */ +#endif /* ACE_USES_CLASSIC_SVC_CONF == 0 */ // Initialize and activate a statically linked service. int @@ -355,7 +355,7 @@ ACE_Service_Config::initialize (const ACE_Service_Type *sr, } } -#if defined (ACE_USES_CLASSIC_SVC_CONF) && (ACE_USES_CLASSIC_SVC_CONF == 1) +#if (ACE_USES_CLASSIC_SVC_CONF == 1) int ACE_Service_Config::process_directives_i (ACE_Svc_Conf_Param *param) { @@ -408,14 +408,14 @@ ACE_Service_Config::get_xml_svc_conf (ACE_DLL &xmldll) return factory (); } -#endif /* ACE_USES_CLASSIC_SVC_CONF && ACE_USES_CLASSIC_SVC_CONF == 1 */ +#endif /* ACE_USES_CLASSIC_SVC_CONF == 1 */ int ACE_Service_Config::process_file (const ACE_TCHAR file[]) { ACE_TRACE ("ACE_Service_Config::process_file"); -#if defined (ACE_USES_CLASSIC_SVC_CONF) && (ACE_USES_CLASSIC_SVC_CONF == 1) +#if (ACE_USES_CLASSIC_SVC_CONF == 1) int result = 0; FILE *fp = ACE_OS::fopen (file, @@ -452,7 +452,7 @@ ACE_Service_Config::process_file (const ACE_TCHAR file[]) return -1; return xml_svc_conf->parse_file (file); -#endif /* ACE_USES_CLASSIC_SVC_CONF && ACE_USES_CLASSIC_SVC_CONF == 1 */ +#endif /* ACE_USES_CLASSIC_SVC_CONF == 1 */ } int @@ -465,7 +465,7 @@ ACE_Service_Config::process_directive (const ACE_TCHAR directive[]) ACE_LIB_TEXT ("Service_Config::process_directive - %s\n"), directive)); -#if defined (ACE_USES_CLASSIC_SVC_CONF) && (ACE_USES_CLASSIC_SVC_CONF == 1) +#if (ACE_USES_CLASSIC_SVC_CONF == 1) ACE_UNUSED_ARG (directive); ACE_Svc_Conf_Param d (directive); @@ -482,7 +482,7 @@ ACE_Service_Config::process_directive (const ACE_TCHAR directive[]) return -1; return xml_svc_conf->parse_string (directive); -#endif /* ACE_USES_CLASSIC_SVC_CONF && ACE_USES_CLASSIC_SVC_CONF == 1 */ +#endif /* ACE_USES_CLASSIC_SVC_CONF == 1 */ } // Process service configuration requests as indicated in the queue of diff --git a/ace/Service_Config.h b/ace/Service_Config.h index 64305340b1f..2b8da8c37b9 100644 --- a/ace/Service_Config.h +++ b/ace/Service_Config.h @@ -32,9 +32,9 @@ class ACE_Service_Repository; class ACE_Allocator; class ACE_Reactor; class ACE_Thread_Manager; -#if defined (ACE_USES_CLASSIC_SVC_CONF) && (ACE_USES_CLASSIC_SVC_CONF == 1) +#if (ACE_USES_CLASSIC_SVC_CONF == 1) class ACE_Svc_Conf_Param; -#endif /* ACE_USES_CLASSIC_SVC_CONF && ACE_USES_CLASSIC_SVC_CONF ==1 */ +#endif /* ACE_USES_CLASSIC_SVC_CONF ==1 */ extern "C" { @@ -353,7 +353,7 @@ public: * for a list of files and here a list of services. */ static int parse_args (int, ACE_TCHAR *argv[]); -#if ! defined (ACE_USES_CLASSIC_SVC_CONF) || (ACE_USES_CLASSIC_SVC_CONF == 0) +#if (ACE_USES_CLASSIC_SVC_CONF == 0) static ACE_Service_Type *create_service_type (const ACE_TCHAR *n, ACE_Service_Type_Impl *o, const ACE_SHLIB_HANDLE handle, @@ -364,13 +364,13 @@ public: void *symbol, u_int flags, ACE_Service_Object_Exterminator gobbler); -#endif /* !ACE_USES_CLASSIC_SVC_CONF && ACE_USES_CLASSIC_SVC_CONF == 0 */ +#endif /* ACE_USES_CLASSIC_SVC_CONF == 0 */ protected: /// Process service configuration requests that were provided on the /// command-line. Returns the number of errors that occurred. static int process_commandline_directives (void); -#if defined (ACE_USES_CLASSIC_SVC_CONF) && (ACE_USES_CLASSIC_SVC_CONF == 1) +#if (ACE_USES_CLASSIC_SVC_CONF == 1) /// This is the implementation function that process_directives() /// and process_directive() both call. Returns the number of errors /// that occurred. @@ -378,7 +378,7 @@ protected: #else /// Helper function to dynamically link in the XML Service Configurator parser. static ACE_XML_Svc_Conf *get_xml_svc_conf (ACE_DLL &d); -#endif /* ACE_USES_CLASSIC_SVC_CONF && ACE_USES_CLASSIC_SVC_CONF == 1 */ +#endif /* ACE_USES_CLASSIC_SVC_CONF == 1 */ /// Become a daemon. static int start_daemon (void); diff --git a/ace/Svc_Conf.h b/ace/Svc_Conf.h index 5791dbc23e8..291fe3defca 100644 --- a/ace/Svc_Conf.h +++ b/ace/Svc_Conf.h @@ -28,7 +28,7 @@ #include "ace/Service_Config.h" #include "ace/Parse_Node.h" -#if defined (ACE_USES_CLASSIC_SVC_CONF) && (ACE_USES_CLASSIC_SVC_CONF == 1) +#if (ACE_USES_CLASSIC_SVC_CONF == 1) // Forward declarations. struct ace_yy_buffer_state; @@ -196,7 +196,7 @@ extern ACE_TCHAR *ace_yytext; /// Holds the length of the lexeme for the current token extern int ace_yyleng; -#endif /* ACE_USES_CLASSIC_SVC_CONF && ACE_USES_CLASSIC_SVC_CONF == 1 */ +#endif /* ACE_USES_CLASSIC_SVC_CONF == 1 */ /// Factory that creates a new ACE_Service_Type_Impl. extern ACE_Service_Type_Impl * diff --git a/ace/Svc_Conf_Lexer_Guard.cpp b/ace/Svc_Conf_Lexer_Guard.cpp index 7144baf1398..980d899d064 100644 --- a/ace/Svc_Conf_Lexer_Guard.cpp +++ b/ace/Svc_Conf_Lexer_Guard.cpp @@ -2,7 +2,7 @@ #include "ace/Svc_Conf.h" -#if defined (ACE_USES_CLASSIC_SVC_CONF) && (ACE_USES_CLASSIC_SVC_CONF == 1) +#if (ACE_USES_CLASSIC_SVC_CONF == 1) #include "ace/Svc_Conf_Lexer_Guard.h" ACE_RCSID (ace, @@ -35,4 +35,4 @@ ACE_Svc_Conf_Lexer_Guard::~ACE_Svc_Conf_Lexer_Guard (void) ::ace_yy_pop_buffer (this->buffer_); } -#endif /* ACE_USES_CLASSIC_SVC_CONF && ACE_USES_CLASSIC_SVC_CONF == 1 */ +#endif /* ACE_USES_CLASSIC_SVC_CONF == 1 */ diff --git a/ace/Svc_Conf_l.cpp b/ace/Svc_Conf_l.cpp index 30e0ef4a7bb..0e8813fbfa0 100644 --- a/ace/Svc_Conf_l.cpp +++ b/ace/Svc_Conf_l.cpp @@ -28,17 +28,17 @@ /* The "const" storage-class-modifier is valid. */ #define ACE_YY_USE_CONST -#else /* ! __cplusplus */ +#else /* ! __cplusplus */ #if __STDC__ #define ACE_YY_USE_PROTOS #define ACE_YY_USE_CONST -#endif /* __STDC__ */ -#endif /* ! __cplusplus */ +#endif /* __STDC__ */ +#endif /* ! __cplusplus */ -#if defined (ACE_USES_CLASSIC_SVC_CONF) && (ACE_USES_CLASSIC_SVC_CONF == 1) +#if (ACE_USES_CLASSIC_SVC_CONF == 1) #ifdef __TURBOC__ #pragma warn -rch @@ -109,10 +109,10 @@ extern FILE *ace_yyin, *ace_yyout; * int a single C statement (which needs a semi-colon terminator). This * avoids problems with code like: * - * if ( condition_holds ) - * ace_yyless( 5 ); - * else - * do_something_else(); + * if ( condition_holds ) + * ace_yyless( 5 ); + * else + * do_something_else(); * * Prior to using the do-while the compiler would get upset at the * "else" because it interpreted the "if" statement as being all @@ -122,15 +122,15 @@ extern FILE *ace_yyin, *ace_yyout; /* Return all but the first 'n' matched characters back to the input stream. */ #define ace_yyless(n) \ - do \ - { \ - /* Undo effects of setting up ace_yytext. */ \ - *ace_yy_cp = ace_yy_hold_char; \ - ACE_YY_RESTORE_ACE_YY_MORE_OFFSET \ - ace_yy_c_buf_p = ace_yy_cp = ace_yy_bp + n - ACE_YY_MORE_ADJ; \ - ACE_YY_DO_BEFORE_ACTION; /* set up ace_yytext again */ \ - } \ - while ( 0 ) + do \ + { \ + /* Undo effects of setting up ace_yytext. */ \ + *ace_yy_cp = ace_yy_hold_char; \ + ACE_YY_RESTORE_ACE_YY_MORE_OFFSET \ + ace_yy_c_buf_p = ace_yy_cp = ace_yy_bp + n - ACE_YY_MORE_ADJ; \ + ACE_YY_DO_BEFORE_ACTION; /* set up ace_yytext again */ \ + } \ + while ( 0 ) #if 0 #define unput(c) ace_yyunput( c, ace_yytext_ptr ) @@ -144,61 +144,61 @@ typedef unsigned int ace_yy_size_t; struct ace_yy_buffer_state - { - FILE *ace_yy_input_file; - - ACE_TCHAR *ace_yy_ch_buf; /* input buffer */ - ACE_TCHAR *ace_yy_buf_pos; /* current position in input buffer */ - - /* Size of input buffer in bytes, not including room for EOB - * characters. - */ - ace_yy_size_t ace_yy_buf_size; - - /* Number of characters read into ace_yy_ch_buf, not including EOB - * characters. - */ - int ace_yy_n_chars; - - /* Whether we "own" the buffer - i.e., we know we created it, - * and can realloc() it to grow it, and should free() it to - * delete it. - */ - int ace_yy_is_our_buffer; - - /* Whether this is an "interactive" input source; if so, and - * if we're using stdio for input, then we want to use getc() - * instead of fread(), to make sure we stop fetching input after - * each newline. - */ - int ace_yy_is_interactive; - - /* Whether we're considered to be at the beginning of a line. - * If so, '^' rules will be active on the next match, otherwise - * not. - */ - int ace_yy_at_bol; - - /* Whether to try to fill the input buffer when we reach the - * end of it. - */ - int ace_yy_fill_buffer; - - int ace_yy_buffer_status; + { + FILE *ace_yy_input_file; + + ACE_TCHAR *ace_yy_ch_buf; /* input buffer */ + ACE_TCHAR *ace_yy_buf_pos; /* current position in input buffer */ + + /* Size of input buffer in bytes, not including room for EOB + * characters. + */ + ace_yy_size_t ace_yy_buf_size; + + /* Number of characters read into ace_yy_ch_buf, not including EOB + * characters. + */ + int ace_yy_n_chars; + + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to + * delete it. + */ + int ace_yy_is_our_buffer; + + /* Whether this is an "interactive" input source; if so, and + * if we're using stdio for input, then we want to use getc() + * instead of fread(), to make sure we stop fetching input after + * each newline. + */ + int ace_yy_is_interactive; + + /* Whether we're considered to be at the beginning of a line. + * If so, '^' rules will be active on the next match, otherwise + * not. + */ + int ace_yy_at_bol; + + /* Whether to try to fill the input buffer when we reach the + * end of it. + */ + int ace_yy_fill_buffer; + + int ace_yy_buffer_status; #define ACE_YY_BUFFER_NEW 0 #define ACE_YY_BUFFER_NORMAL 1 - /* When an EOF's been seen but there's still some text to process - * then we mark the buffer as ACE_YY_EOF_PENDING, to indicate that we - * shouldn't try reading from the input source any more. We might - * still have a bunch of tokens to match, though, because of - * possible backing-up. - * - * When we actually see the EOF, we change the status to "new" - * (via ace_yyrestart()), so that the user can continue scanning by - * just pointing ace_yyin at a new input file. - */ + /* When an EOF's been seen but there's still some text to process + * then we mark the buffer as ACE_YY_EOF_PENDING, to indicate that we + * shouldn't try reading from the input source any more. We might + * still have a bunch of tokens to match, though, because of + * possible backing-up. + * + * When we actually see the EOF, we change the status to "new" + * (via ace_yyrestart()), so that the user can continue scanning by + * just pointing ace_yyin at a new input file. + */ #define ACE_YY_BUFFER_EOF_PENDING 2 - }; + }; static ACE_YY_BUFFER_STATE ace_yy_current_buffer = 0; @@ -212,15 +212,15 @@ static ACE_YY_BUFFER_STATE ace_yy_current_buffer = 0; /* ace_yy_hold_char holds the character lost when ace_yytext is formed. */ static ACE_TCHAR ace_yy_hold_char; -static int ace_yy_n_chars; /* number of characters read into ace_yy_ch_buf */ +static int ace_yy_n_chars; /* number of characters read into ace_yy_ch_buf */ int ace_yyleng; /* Points to current character in buffer. */ static ACE_TCHAR *ace_yy_c_buf_p = (ACE_TCHAR *) 0; -static int ace_yy_init = 1; /* whether we need to initialize */ -static int ace_yy_start = 0; /* start state number */ +static int ace_yy_init = 1; /* whether we need to initialize */ +static int ace_yy_start = 0; /* start state number */ /* Flag which is used to allow ace_yywrap()'s to do buffer switches * instead of setting up a fresh ace_yyin. A bit of a hack ... @@ -248,18 +248,18 @@ static void ace_yy_flex_free ACE_YY_PROTO(( void * )); #define ace_yy_new_buffer ace_yy_create_buffer #define ace_yy_set_interactive(is_interactive) \ - { \ - if ( ! ace_yy_current_buffer ) \ - ace_yy_current_buffer = ace_yy_create_buffer( ace_yyin, ACE_YY_BUF_SIZE ); \ - ace_yy_current_buffer->ace_yy_is_interactive = is_interactive; \ - } + { \ + if ( ! ace_yy_current_buffer ) \ + ace_yy_current_buffer = ace_yy_create_buffer( ace_yyin, ACE_YY_BUF_SIZE ); \ + ace_yy_current_buffer->ace_yy_is_interactive = is_interactive; \ + } #define ace_yy_set_bol(at_bol) \ - { \ - if ( ! ace_yy_current_buffer ) \ - ace_yy_current_buffer = ace_yy_create_buffer( ace_yyin, ACE_YY_BUF_SIZE ); \ - ace_yy_current_buffer->ace_yy_at_bol = at_bol; \ - } + { \ + if ( ! ace_yy_current_buffer ) \ + ace_yy_current_buffer = ace_yy_create_buffer( ace_yyin, ACE_YY_BUF_SIZE ); \ + ace_yy_current_buffer->ace_yy_at_bol = at_bol; \ + } #define ACE_YY_AT_BOL() (ace_yy_current_buffer->ace_yy_at_bol) @@ -278,11 +278,11 @@ static void ace_yy_fatal_error ACE_YY_PROTO(( ace_yyconst ACE_TCHAR msg[] )); * corresponding action - sets up ace_yytext. */ #define ACE_YY_DO_BEFORE_ACTION \ - ace_yytext_ptr = ace_yy_bp; \ - ace_yyleng = (int) (ace_yy_cp - ace_yy_bp); \ - ace_yy_hold_char = *ace_yy_cp; \ - *ace_yy_cp = '\0'; \ - ace_yy_c_buf_p = ace_yy_cp; + ace_yytext_ptr = ace_yy_bp; \ + ace_yyleng = (int) (ace_yy_cp - ace_yy_bp); \ + ace_yy_hold_char = *ace_yy_cp; \ + *ace_yy_cp = '\0'; \ + ace_yy_c_buf_p = ace_yy_cp; #define ACE_YY_NUM_RULES 25 #define ACE_YY_END_OF_BUFFER 26 @@ -513,8 +513,8 @@ ACE_TCHAR *ace_yytext; #include "ace/Svc_Conf_Lexer_Guard.h" ACE_RCSID (ace, - Svc_Conf_l, - "$Id$") + Svc_Conf_l, + "$Id$") // Keeps track of the current line for debugging output. int ace_yylineno = 1; @@ -611,21 +611,21 @@ ACE_YY_MALLOC_DECL */ #ifndef ACE_YY_INPUT #define ACE_YY_INPUT(buf,result,max_size) \ - if ( ace_yy_current_buffer->ace_yy_is_interactive ) \ - { \ - int c = '*', n; \ - for ( n = 0; n < max_size && \ - (c = getc( ace_yyin )) != EOF && c != '\n'; ++n ) \ - buf[n] = (ACE_TCHAR) c; \ - if ( c == '\n' ) \ - buf[n++] = (ACE_TCHAR) c; \ - if ( c == EOF && ferror( ace_yyin ) ) \ - ACE_YY_FATAL_ERROR(ACE_LIB_TEXT( "input in flex scanner failed") ); \ - result = n; \ - } \ - else if ( ((result = fread( buf, sizeof (ACE_TCHAR), max_size, ace_yyin )) == 0) \ - && ferror( ace_yyin ) ) \ - ACE_YY_FATAL_ERROR(ACE_LIB_TEXT("input in flex scanner failed") ); + if ( ace_yy_current_buffer->ace_yy_is_interactive ) \ + { \ + int c = '*', n; \ + for ( n = 0; n < max_size && \ + (c = getc( ace_yyin )) != EOF && c != '\n'; ++n ) \ + buf[n] = (ACE_TCHAR) c; \ + if ( c == '\n' ) \ + buf[n++] = (ACE_TCHAR) c; \ + if ( c == EOF && ferror( ace_yyin ) ) \ + ACE_YY_FATAL_ERROR(ACE_LIB_TEXT( "input in flex scanner failed") ); \ + result = n; \ + } \ + else if ( ((result = fread( buf, sizeof (ACE_TCHAR), max_size, ace_yyin )) == 0) \ + && ferror( ace_yyin ) ) \ + ACE_YY_FATAL_ERROR(ACE_LIB_TEXT("input in flex scanner failed") ); #endif /* No semi-colon after return; correct usage is to write "ace_yyterminate();" - @@ -666,13 +666,13 @@ ACE_YY_MALLOC_DECL #endif #define ACE_YY_RULE_SETUP \ - if ( ace_yyleng > 0 ) \ - ace_yy_current_buffer->ace_yy_at_bol = \ - (ace_yytext[ace_yyleng - 1] == '\n'); \ - ACE_YY_USER_ACTION + if ( ace_yyleng > 0 ) \ + ace_yy_current_buffer->ace_yy_at_bol = \ + (ace_yytext[ace_yyleng - 1] == '\n'); \ + ACE_YY_USER_ACTION ACE_YY_DECL - { + { ACE_MT (ACE_GUARD_RETURN (ACE_SYNCH_RECURSIVE_MUTEX, ace_mon, *ACE_Static_Object_Lock::instance (), @@ -680,94 +680,94 @@ ACE_YY_DECL ACE_Svc_Conf_Lexer_Guard ace_lexer_guard (ACE_SVC_CONF_PARAM); - register ace_yy_state_type ace_yy_current_state; - register ACE_TCHAR *ace_yy_cp=0, *ace_yy_bp=0; - register int ace_yy_act; + register ace_yy_state_type ace_yy_current_state; + register ACE_TCHAR *ace_yy_cp=0, *ace_yy_bp=0; + register int ace_yy_act; - if ( ace_yy_init ) - { - ace_yy_init = 0; + if ( ace_yy_init ) + { + ace_yy_init = 0; #ifdef ACE_YY_USER_INIT - ACE_YY_USER_INIT; + ACE_YY_USER_INIT; #endif - if ( ! ace_yy_start ) - ace_yy_start = 1; /* first start state */ + if ( ! ace_yy_start ) + ace_yy_start = 1; /* first start state */ - if ( ! ace_yyin ) - ace_yyin = stdin; + if ( ! ace_yyin ) + ace_yyin = stdin; - if ( ! ace_yyout ) - ace_yyout = stdout; + if ( ! ace_yyout ) + ace_yyout = stdout; - if ( ! ace_yy_current_buffer ) - ace_yy_current_buffer = - ace_yy_create_buffer( ace_yyin, ACE_YY_BUF_SIZE ); + if ( ! ace_yy_current_buffer ) + ace_yy_current_buffer = + ace_yy_create_buffer( ace_yyin, ACE_YY_BUF_SIZE ); - ace_yy_load_buffer_state(); - } + ace_yy_load_buffer_state(); + } - while ( 1 ) /* loops until end-of-file is reached */ - { - ace_yy_cp = ace_yy_c_buf_p; + while ( 1 ) /* loops until end-of-file is reached */ + { + ace_yy_cp = ace_yy_c_buf_p; - /* Support of ace_yytext. */ - *ace_yy_cp = ace_yy_hold_char; + /* Support of ace_yytext. */ + *ace_yy_cp = ace_yy_hold_char; - /* ace_yy_bp points to the position in ace_yy_ch_buf of the start of - * the current run. - */ - ace_yy_bp = ace_yy_cp; + /* ace_yy_bp points to the position in ace_yy_ch_buf of the start of + * the current run. + */ + ace_yy_bp = ace_yy_cp; - ace_yy_current_state = ace_yy_start; - ace_yy_current_state += ACE_YY_AT_BOL(); + ace_yy_current_state = ace_yy_start; + ace_yy_current_state += ACE_YY_AT_BOL(); ace_yy_match: - do - { - register ACE_YY_CHAR ace_yy_c = ace_yy_ec[ACE_YY_SC_TO_UI(*ace_yy_cp)]; - if ( ace_yy_accept[ace_yy_current_state] ) - { - ace_yy_last_accepting_state = ace_yy_current_state; - ace_yy_last_accepting_cpos = ace_yy_cp; - } - while ( ace_yy_chk[ace_yy_base[ace_yy_current_state] + ace_yy_c] != ace_yy_current_state ) - { - ace_yy_current_state = (int) ace_yy_def[ace_yy_current_state]; - if ( ace_yy_current_state >= 107 ) - ace_yy_c = ace_yy_meta[(unsigned int) ace_yy_c]; - } - ace_yy_current_state = ace_yy_nxt[ace_yy_base[ace_yy_current_state] + (unsigned int) ace_yy_c]; - ++ace_yy_cp; - } - while ( ace_yy_base[ace_yy_current_state] != 437 ); + do + { + register ACE_YY_CHAR ace_yy_c = ace_yy_ec[ACE_YY_SC_TO_UI(*ace_yy_cp)]; + if ( ace_yy_accept[ace_yy_current_state] ) + { + ace_yy_last_accepting_state = ace_yy_current_state; + ace_yy_last_accepting_cpos = ace_yy_cp; + } + while ( ace_yy_chk[ace_yy_base[ace_yy_current_state] + ace_yy_c] != ace_yy_current_state ) + { + ace_yy_current_state = (int) ace_yy_def[ace_yy_current_state]; + if ( ace_yy_current_state >= 107 ) + ace_yy_c = ace_yy_meta[(unsigned int) ace_yy_c]; + } + ace_yy_current_state = ace_yy_nxt[ace_yy_base[ace_yy_current_state] + (unsigned int) ace_yy_c]; + ++ace_yy_cp; + } + while ( ace_yy_base[ace_yy_current_state] != 437 ); ace_yy_find_action: - ace_yy_act = ace_yy_accept[ace_yy_current_state]; - if ( ace_yy_act == 0 ) - { /* have to back up */ - ace_yy_cp = ace_yy_last_accepting_cpos; - ace_yy_current_state = ace_yy_last_accepting_state; - ace_yy_act = ace_yy_accept[ace_yy_current_state]; - } + ace_yy_act = ace_yy_accept[ace_yy_current_state]; + if ( ace_yy_act == 0 ) + { /* have to back up */ + ace_yy_cp = ace_yy_last_accepting_cpos; + ace_yy_current_state = ace_yy_last_accepting_state; + ace_yy_act = ace_yy_accept[ace_yy_current_state]; + } - ACE_YY_DO_BEFORE_ACTION; + ACE_YY_DO_BEFORE_ACTION; -do_action: /* This label is used only to access EOF actions. */ +do_action: /* This label is used only to access EOF actions. */ - switch ( ace_yy_act ) - { /* beginning of action switch */ - case 0: /* must back up */ - /* undo the effects of ACE_YY_DO_BEFORE_ACTION */ - *ace_yy_cp = ace_yy_hold_char; - ace_yy_cp = ace_yy_last_accepting_cpos; - ace_yy_current_state = ace_yy_last_accepting_state; - goto ace_yy_find_action; + switch ( ace_yy_act ) + { /* beginning of action switch */ + case 0: /* must back up */ + /* undo the effects of ACE_YY_DO_BEFORE_ACTION */ + *ace_yy_cp = ace_yy_hold_char; + ace_yy_cp = ace_yy_last_accepting_cpos; + ace_yy_current_state = ace_yy_last_accepting_state; + goto ace_yy_find_action; case 1: *ace_yy_cp = ace_yy_hold_char; /* undo effects of setting up ace_yytext */ @@ -775,75 +775,75 @@ ace_yy_c_buf_p = ace_yy_cp -= 1; ACE_YY_DO_BEFORE_ACTION; /* set up ace_yytext again */ ACE_YY_RULE_SETUP ; /* EMPTY */ - ACE_YY_BREAK + ACE_YY_BREAK case 2: ACE_YY_RULE_SETUP { return token (ACE_DYNAMIC); } - // ACE_YY_BREAK + // ACE_YY_BREAK case 3: ACE_YY_RULE_SETUP { return token (ACE_STATIC); } - // ACE_YY_BREAK + // ACE_YY_BREAK case 4: ACE_YY_RULE_SETUP { return token (ACE_SUSPEND); } - // ACE_YY_BREAK + // ACE_YY_BREAK case 5: ACE_YY_RULE_SETUP { return token (ACE_RESUME); } - // ACE_YY_BREAK + // ACE_YY_BREAK case 6: ACE_YY_RULE_SETUP { return token (ACE_REMOVE); } - // ACE_YY_BREAK + // ACE_YY_BREAK case 7: ACE_YY_RULE_SETUP { return token (ACE_USTREAM); } - // ACE_YY_BREAK + // ACE_YY_BREAK case 8: ACE_YY_RULE_SETUP { return token (ACE_MODULE_T); } - // ACE_YY_BREAK + // ACE_YY_BREAK case 9: ACE_YY_RULE_SETUP { return token (ACE_SVC_OBJ_T); } - // ACE_YY_BREAK + // ACE_YY_BREAK case 10: ACE_YY_RULE_SETUP { return token (ACE_STREAM_T); } - // ACE_YY_BREAK + // ACE_YY_BREAK case 11: ACE_YY_RULE_SETUP { return token (ACE_ACTIVE); } - // ACE_YY_BREAK + // ACE_YY_BREAK case 12: ACE_YY_RULE_SETUP { return token (ACE_INACTIVE); } - // ACE_YY_BREAK + // ACE_YY_BREAK case 13: ACE_YY_RULE_SETUP { return token (':'); } - // ACE_YY_BREAK + // ACE_YY_BREAK case 14: ACE_YY_RULE_SETUP { return token ('*'); } - // ACE_YY_BREAK + // ACE_YY_BREAK case 15: ACE_YY_RULE_SETUP { return token ('('); } - // ACE_YY_BREAK + // ACE_YY_BREAK case 16: ACE_YY_RULE_SETUP { return token (')'); } - // ACE_YY_BREAK + // ACE_YY_BREAK case 17: ACE_YY_RULE_SETUP { return token ('{'); } - // ACE_YY_BREAK + // ACE_YY_BREAK case 18: ACE_YY_RULE_SETUP { return token ('}'); } - // ACE_YY_BREAK + // ACE_YY_BREAK case 19: ACE_YY_RULE_SETUP { @@ -859,32 +859,32 @@ ACE_YY_RULE_SETUP // Eliminate the opening and closing double or // single quotes. *s = '\0'; - ace_yyleng -= 1; + ace_yyleng -= 1; ace_yylval->ident_ = ACE_SVC_CONF_PARAM->obstack.copy (ace_yytext + 1, ace_yyleng); - return token (ACE_STRING); } - // ACE_YY_BREAK + return token (ACE_STRING); } + // ACE_YY_BREAK case 20: ACE_YY_RULE_SETUP { - ace_yylval->ident_ = ACE_SVC_CONF_PARAM->obstack.copy (ace_yytext, ace_yyleng); - return token (ACE_IDENT); - } - // ACE_YY_BREAK + ace_yylval->ident_ = ACE_SVC_CONF_PARAM->obstack.copy (ace_yytext, ace_yyleng); + return token (ACE_IDENT); + } + // ACE_YY_BREAK case 21: ACE_YY_RULE_SETUP { - ace_yylval->ident_ = ACE_SVC_CONF_PARAM->obstack.copy (ace_yytext, ace_yyleng); - return token (ACE_PATHNAME); - } - // ACE_YY_BREAK + ace_yylval->ident_ = ACE_SVC_CONF_PARAM->obstack.copy (ace_yytext, ace_yyleng); + return token (ACE_PATHNAME); + } + // ACE_YY_BREAK case 22: ACE_YY_RULE_SETUP ; /* EMPTY */ - ACE_YY_BREAK + ACE_YY_BREAK case 23: ACE_YY_RULE_SETUP { ACE_SVC_CONF_PARAM->yylineno++; ace_yylineno++; } - ACE_YY_BREAK + ACE_YY_BREAK case 24: ACE_YY_RULE_SETUP { @@ -895,7 +895,7 @@ ACE_YY_RULE_SETUP ACE_ERROR ((LM_ERROR, ACE_LIB_TEXT ("|%c"), *ace_yytext)); ACE_ERROR ((LM_ERROR, ACE_LIB_TEXT (")\n"))); } - ACE_YY_BREAK + ACE_YY_BREAK case ACE_YY_STATE_EOF(INITIAL): case ACE_YY_STATE_EOF(PARAMETERS): case ACE_YY_STATE_EOF(NORMAL): @@ -904,311 +904,311 @@ case ACE_YY_STATE_EOF(NORMAL): case 25: ACE_YY_RULE_SETUP ACE_SVC_CONF_ECHO; - ACE_YY_BREAK - - case ACE_YY_END_OF_BUFFER: - { - /* Amount of text matched not including the EOB ACE_TCHAR. */ - int ace_yy_amount_of_matched_text = (int) (ace_yy_cp - ace_yytext_ptr) - 1; - - /* Undo the effects of ACE_YY_DO_BEFORE_ACTION. */ - *ace_yy_cp = ace_yy_hold_char; - ACE_YY_RESTORE_ACE_YY_MORE_OFFSET - - if ( ace_yy_current_buffer->ace_yy_buffer_status == ACE_YY_BUFFER_NEW ) - { - /* We're scanning a new file or input source. It's - * possible that this happened because the user - * just pointed ace_yyin at a new source and called - * ace_yylex(). If so, then we have to assure - * consistency between ace_yy_current_buffer and our - * globals. Here is the right place to do so, because - * this is the first action (other than possibly a - * back-up) that will match for the new input source. - */ - ace_yy_n_chars = ace_yy_current_buffer->ace_yy_n_chars; - ace_yy_current_buffer->ace_yy_input_file = ace_yyin; - ace_yy_current_buffer->ace_yy_buffer_status = ACE_YY_BUFFER_NORMAL; - } - - /* Note that here we test for ace_yy_c_buf_p "<=" to the position - * of the first EOB in the buffer, since ace_yy_c_buf_p will - * already have been incremented past the NUL character - * (since all states make transitions on EOB to the - * end-of-buffer state). Contrast this with the test - * in input(). - */ - if ( ace_yy_c_buf_p <= &ace_yy_current_buffer->ace_yy_ch_buf[ace_yy_n_chars] ) - { /* This was really a NUL. */ - ace_yy_state_type ace_yy_next_state; - - ace_yy_c_buf_p = ace_yytext_ptr + ace_yy_amount_of_matched_text; - - ace_yy_current_state = ace_yy_get_previous_state(); - - /* Okay, we're now positioned to make the NUL - * transition. We couldn't have - * ace_yy_get_previous_state() go ahead and do it - * for us because it doesn't know how to deal - * with the possibility of jamming (and we don't - * want to build jamming into it because then it - * will run more slowly). - */ - - ace_yy_next_state = ace_yy_try_NUL_trans( ace_yy_current_state ); - - ace_yy_bp = ace_yytext_ptr + ACE_YY_MORE_ADJ; - - if ( ace_yy_next_state ) - { - /* Consume the NUL. */ - ace_yy_cp = ++ace_yy_c_buf_p; - ace_yy_current_state = ace_yy_next_state; - goto ace_yy_match; - } - - else - { - ace_yy_cp = ace_yy_c_buf_p; - goto ace_yy_find_action; - } - } - - else switch ( ace_yy_get_next_buffer() ) - { - case EOB_ACT_END_OF_FILE: - { - ace_yy_did_buffer_switch_on_eof = 0; - - if ( ace_yywrap() ) - { - /* Note: because we've taken care in - * ace_yy_get_next_buffer() to have set up - * ace_yytext, we can now set up - * ace_yy_c_buf_p so that if some total - * hoser (like flex itself) wants to - * call the scanner after we return the - * ACE_YY_NULL, it'll still work - another - * ACE_YY_NULL will get returned. - */ - ace_yy_c_buf_p = ace_yytext_ptr + ACE_YY_MORE_ADJ; - - ace_yy_act = ACE_YY_STATE_EOF(ACE_YY_START); - goto do_action; - } - - else - { - if ( ! ace_yy_did_buffer_switch_on_eof ) - ACE_YY_NEW_FILE; - } - break; - } - - case EOB_ACT_CONTINUE_SCAN: - ace_yy_c_buf_p = - ace_yytext_ptr + ace_yy_amount_of_matched_text; - - ace_yy_current_state = ace_yy_get_previous_state(); - - ace_yy_cp = ace_yy_c_buf_p; - ace_yy_bp = ace_yytext_ptr + ACE_YY_MORE_ADJ; - goto ace_yy_match; - - case EOB_ACT_LAST_MATCH: - ace_yy_c_buf_p = - &ace_yy_current_buffer->ace_yy_ch_buf[ace_yy_n_chars]; - - ace_yy_current_state = ace_yy_get_previous_state(); - - ace_yy_cp = ace_yy_c_buf_p; - ace_yy_bp = ace_yytext_ptr + ACE_YY_MORE_ADJ; - goto ace_yy_find_action; - } - break; - } - - default: - ACE_YY_FATAL_ERROR( - ACE_LIB_TEXT("fatal flex scanner internal error--no action found") ); - } /* end of action switch */ - } /* end of scanning one token */ - } /* end of ace_yylex */ + ACE_YY_BREAK + + case ACE_YY_END_OF_BUFFER: + { + /* Amount of text matched not including the EOB ACE_TCHAR. */ + int ace_yy_amount_of_matched_text = (int) (ace_yy_cp - ace_yytext_ptr) - 1; + + /* Undo the effects of ACE_YY_DO_BEFORE_ACTION. */ + *ace_yy_cp = ace_yy_hold_char; + ACE_YY_RESTORE_ACE_YY_MORE_OFFSET + + if ( ace_yy_current_buffer->ace_yy_buffer_status == ACE_YY_BUFFER_NEW ) + { + /* We're scanning a new file or input source. It's + * possible that this happened because the user + * just pointed ace_yyin at a new source and called + * ace_yylex(). If so, then we have to assure + * consistency between ace_yy_current_buffer and our + * globals. Here is the right place to do so, because + * this is the first action (other than possibly a + * back-up) that will match for the new input source. + */ + ace_yy_n_chars = ace_yy_current_buffer->ace_yy_n_chars; + ace_yy_current_buffer->ace_yy_input_file = ace_yyin; + ace_yy_current_buffer->ace_yy_buffer_status = ACE_YY_BUFFER_NORMAL; + } + + /* Note that here we test for ace_yy_c_buf_p "<=" to the position + * of the first EOB in the buffer, since ace_yy_c_buf_p will + * already have been incremented past the NUL character + * (since all states make transitions on EOB to the + * end-of-buffer state). Contrast this with the test + * in input(). + */ + if ( ace_yy_c_buf_p <= &ace_yy_current_buffer->ace_yy_ch_buf[ace_yy_n_chars] ) + { /* This was really a NUL. */ + ace_yy_state_type ace_yy_next_state; + + ace_yy_c_buf_p = ace_yytext_ptr + ace_yy_amount_of_matched_text; + + ace_yy_current_state = ace_yy_get_previous_state(); + + /* Okay, we're now positioned to make the NUL + * transition. We couldn't have + * ace_yy_get_previous_state() go ahead and do it + * for us because it doesn't know how to deal + * with the possibility of jamming (and we don't + * want to build jamming into it because then it + * will run more slowly). + */ + + ace_yy_next_state = ace_yy_try_NUL_trans( ace_yy_current_state ); + + ace_yy_bp = ace_yytext_ptr + ACE_YY_MORE_ADJ; + + if ( ace_yy_next_state ) + { + /* Consume the NUL. */ + ace_yy_cp = ++ace_yy_c_buf_p; + ace_yy_current_state = ace_yy_next_state; + goto ace_yy_match; + } + + else + { + ace_yy_cp = ace_yy_c_buf_p; + goto ace_yy_find_action; + } + } + + else switch ( ace_yy_get_next_buffer() ) + { + case EOB_ACT_END_OF_FILE: + { + ace_yy_did_buffer_switch_on_eof = 0; + + if ( ace_yywrap() ) + { + /* Note: because we've taken care in + * ace_yy_get_next_buffer() to have set up + * ace_yytext, we can now set up + * ace_yy_c_buf_p so that if some total + * hoser (like flex itself) wants to + * call the scanner after we return the + * ACE_YY_NULL, it'll still work - another + * ACE_YY_NULL will get returned. + */ + ace_yy_c_buf_p = ace_yytext_ptr + ACE_YY_MORE_ADJ; + + ace_yy_act = ACE_YY_STATE_EOF(ACE_YY_START); + goto do_action; + } + + else + { + if ( ! ace_yy_did_buffer_switch_on_eof ) + ACE_YY_NEW_FILE; + } + break; + } + + case EOB_ACT_CONTINUE_SCAN: + ace_yy_c_buf_p = + ace_yytext_ptr + ace_yy_amount_of_matched_text; + + ace_yy_current_state = ace_yy_get_previous_state(); + + ace_yy_cp = ace_yy_c_buf_p; + ace_yy_bp = ace_yytext_ptr + ACE_YY_MORE_ADJ; + goto ace_yy_match; + + case EOB_ACT_LAST_MATCH: + ace_yy_c_buf_p = + &ace_yy_current_buffer->ace_yy_ch_buf[ace_yy_n_chars]; + + ace_yy_current_state = ace_yy_get_previous_state(); + + ace_yy_cp = ace_yy_c_buf_p; + ace_yy_bp = ace_yytext_ptr + ACE_YY_MORE_ADJ; + goto ace_yy_find_action; + } + break; + } + + default: + ACE_YY_FATAL_ERROR( + ACE_LIB_TEXT("fatal flex scanner internal error--no action found") ); + } /* end of action switch */ + } /* end of scanning one token */ + } /* end of ace_yylex */ /* ace_yy_get_next_buffer - try to read in a new buffer * * Returns a code representing an action: - * EOB_ACT_LAST_MATCH - - * EOB_ACT_CONTINUE_SCAN - continue scanning from current position - * EOB_ACT_END_OF_FILE - end of file + * EOB_ACT_LAST_MATCH - + * EOB_ACT_CONTINUE_SCAN - continue scanning from current position + * EOB_ACT_END_OF_FILE - end of file */ static int ace_yy_get_next_buffer() - { - register ACE_TCHAR *dest = ace_yy_current_buffer->ace_yy_ch_buf; - register ACE_TCHAR *source = ace_yytext_ptr; - register int number_to_move, i; - int ret_val; - - if ( ace_yy_c_buf_p > &ace_yy_current_buffer->ace_yy_ch_buf[ace_yy_n_chars + 1] ) - ACE_YY_FATAL_ERROR( - ACE_LIB_TEXT("fatal flex scanner internal error--end of buffer missed") ); - - if ( ace_yy_current_buffer->ace_yy_fill_buffer == 0 ) - { /* Don't try to fill the buffer, so this is an EOF. */ - if ( ace_yy_c_buf_p - ace_yytext_ptr - ACE_YY_MORE_ADJ == 1 ) - { - /* We matched a single character, the EOB, so - * treat this as a final EOF. - */ - return EOB_ACT_END_OF_FILE; - } - - else - { - /* We matched some text prior to the EOB, first - * process it. - */ - return EOB_ACT_LAST_MATCH; - } - } - - /* Try to read more data. */ - - /* First move last chars to start of buffer. */ - number_to_move = (int) (ace_yy_c_buf_p - ace_yytext_ptr) - 1; - - for ( i = 0; i < number_to_move; ++i ) - *(dest++) = *(source++); - - if ( ace_yy_current_buffer->ace_yy_buffer_status == ACE_YY_BUFFER_EOF_PENDING ) - /* don't do the read, it's not guaranteed to return an EOF, - * just force an EOF - */ - ace_yy_current_buffer->ace_yy_n_chars = ace_yy_n_chars = 0; - - else - { - int num_to_read = - ace_yy_current_buffer->ace_yy_buf_size - number_to_move - 1; - - while ( num_to_read <= 0 ) - { /* Not enough room in the buffer - grow it. */ + { + register ACE_TCHAR *dest = ace_yy_current_buffer->ace_yy_ch_buf; + register ACE_TCHAR *source = ace_yytext_ptr; + register int number_to_move, i; + int ret_val; + + if ( ace_yy_c_buf_p > &ace_yy_current_buffer->ace_yy_ch_buf[ace_yy_n_chars + 1] ) + ACE_YY_FATAL_ERROR( + ACE_LIB_TEXT("fatal flex scanner internal error--end of buffer missed") ); + + if ( ace_yy_current_buffer->ace_yy_fill_buffer == 0 ) + { /* Don't try to fill the buffer, so this is an EOF. */ + if ( ace_yy_c_buf_p - ace_yytext_ptr - ACE_YY_MORE_ADJ == 1 ) + { + /* We matched a single character, the EOB, so + * treat this as a final EOF. + */ + return EOB_ACT_END_OF_FILE; + } + + else + { + /* We matched some text prior to the EOB, first + * process it. + */ + return EOB_ACT_LAST_MATCH; + } + } + + /* Try to read more data. */ + + /* First move last chars to start of buffer. */ + number_to_move = (int) (ace_yy_c_buf_p - ace_yytext_ptr) - 1; + + for ( i = 0; i < number_to_move; ++i ) + *(dest++) = *(source++); + + if ( ace_yy_current_buffer->ace_yy_buffer_status == ACE_YY_BUFFER_EOF_PENDING ) + /* don't do the read, it's not guaranteed to return an EOF, + * just force an EOF + */ + ace_yy_current_buffer->ace_yy_n_chars = ace_yy_n_chars = 0; + + else + { + int num_to_read = + ace_yy_current_buffer->ace_yy_buf_size - number_to_move - 1; + + while ( num_to_read <= 0 ) + { /* Not enough room in the buffer - grow it. */ #ifdef ACE_YY_USES_REJECT ACE_YY_FATAL_ERROR(ACE_LIB_TEXT( "input buffer overflow, can't enlarge buffer because scanner uses REJECT") ); #else - /* just a shorter name for the current buffer */ - ACE_YY_BUFFER_STATE b = ace_yy_current_buffer; + /* just a shorter name for the current buffer */ + ACE_YY_BUFFER_STATE b = ace_yy_current_buffer; - int ace_yy_c_buf_p_offset = - (int) (ace_yy_c_buf_p - b->ace_yy_ch_buf); + int ace_yy_c_buf_p_offset = + (int) (ace_yy_c_buf_p - b->ace_yy_ch_buf); - if ( b->ace_yy_is_our_buffer ) - { - int new_size = b->ace_yy_buf_size * 2; + if ( b->ace_yy_is_our_buffer ) + { + int new_size = b->ace_yy_buf_size * 2; - if ( new_size <= 0 ) - b->ace_yy_buf_size += b->ace_yy_buf_size / 8; - else - b->ace_yy_buf_size *= 2; + if ( new_size <= 0 ) + b->ace_yy_buf_size += b->ace_yy_buf_size / 8; + else + b->ace_yy_buf_size *= 2; - b->ace_yy_ch_buf = (ACE_TCHAR *) - /* Include room in for 2 EOB chars. */ - ace_yy_flex_realloc( (void *) b->ace_yy_ch_buf, + b->ace_yy_ch_buf = (ACE_TCHAR *) + /* Include room in for 2 EOB chars. */ + ace_yy_flex_realloc( (void *) b->ace_yy_ch_buf, (b->ace_yy_buf_size + 2)*sizeof(ACE_TCHAR)); - } - else - /* Can't grow it, we don't own it. */ - b->ace_yy_ch_buf = 0; + } + else + /* Can't grow it, we don't own it. */ + b->ace_yy_ch_buf = 0; - if ( ! b->ace_yy_ch_buf ) + if ( ! b->ace_yy_ch_buf ) ACE_YY_FATAL_ERROR(ACE_LIB_TEXT( - "fatal error - scanner input buffer overflow") ); + "fatal error - scanner input buffer overflow") ); - ace_yy_c_buf_p = &b->ace_yy_ch_buf[ace_yy_c_buf_p_offset]; + ace_yy_c_buf_p = &b->ace_yy_ch_buf[ace_yy_c_buf_p_offset]; - num_to_read = ace_yy_current_buffer->ace_yy_buf_size - - number_to_move - 1; + num_to_read = ace_yy_current_buffer->ace_yy_buf_size - + number_to_move - 1; #endif - } + } - if ( num_to_read * sizeof (ACE_TCHAR) > ACE_YY_READ_BUF_SIZE ) - num_to_read = ACE_YY_READ_BUF_SIZE/sizeof (ACE_TCHAR); + if ( num_to_read * sizeof (ACE_TCHAR) > ACE_YY_READ_BUF_SIZE ) + num_to_read = ACE_YY_READ_BUF_SIZE/sizeof (ACE_TCHAR); - /* Read in more data. */ - ACE_YY_INPUT( (&ace_yy_current_buffer->ace_yy_ch_buf[number_to_move]), - ace_yy_n_chars, num_to_read ); + /* Read in more data. */ + ACE_YY_INPUT( (&ace_yy_current_buffer->ace_yy_ch_buf[number_to_move]), + ace_yy_n_chars, num_to_read ); - ace_yy_current_buffer->ace_yy_n_chars = ace_yy_n_chars; - } + ace_yy_current_buffer->ace_yy_n_chars = ace_yy_n_chars; + } - if ( ace_yy_n_chars == 0 ) - { - if ( number_to_move == ACE_YY_MORE_ADJ ) - { - ret_val = EOB_ACT_END_OF_FILE; - ace_yyrestart( ace_yyin ); - } + if ( ace_yy_n_chars == 0 ) + { + if ( number_to_move == ACE_YY_MORE_ADJ ) + { + ret_val = EOB_ACT_END_OF_FILE; + ace_yyrestart( ace_yyin ); + } - else - { - ret_val = EOB_ACT_LAST_MATCH; - ace_yy_current_buffer->ace_yy_buffer_status = - ACE_YY_BUFFER_EOF_PENDING; - } - } + else + { + ret_val = EOB_ACT_LAST_MATCH; + ace_yy_current_buffer->ace_yy_buffer_status = + ACE_YY_BUFFER_EOF_PENDING; + } + } - else - ret_val = EOB_ACT_CONTINUE_SCAN; + else + ret_val = EOB_ACT_CONTINUE_SCAN; - ace_yy_n_chars += number_to_move; - ace_yy_current_buffer->ace_yy_ch_buf[ace_yy_n_chars] = ACE_YY_END_OF_BUFFER_CHAR; - ace_yy_current_buffer->ace_yy_ch_buf[ace_yy_n_chars + 1] = ACE_YY_END_OF_BUFFER_CHAR; + ace_yy_n_chars += number_to_move; + ace_yy_current_buffer->ace_yy_ch_buf[ace_yy_n_chars] = ACE_YY_END_OF_BUFFER_CHAR; + ace_yy_current_buffer->ace_yy_ch_buf[ace_yy_n_chars + 1] = ACE_YY_END_OF_BUFFER_CHAR; - ace_yytext_ptr = &ace_yy_current_buffer->ace_yy_ch_buf[0]; + ace_yytext_ptr = &ace_yy_current_buffer->ace_yy_ch_buf[0]; - return ret_val; - } + return ret_val; + } /* ace_yy_get_previous_state - get the state just before the EOB ACE_TCHAR was reached */ static ace_yy_state_type ace_yy_get_previous_state() - { - register ace_yy_state_type ace_yy_current_state; - register ACE_TCHAR *ace_yy_cp; - - ace_yy_current_state = ace_yy_start; - ace_yy_current_state += ACE_YY_AT_BOL(); - - for ( ace_yy_cp = ace_yytext_ptr + ACE_YY_MORE_ADJ; ace_yy_cp < ace_yy_c_buf_p; ++ace_yy_cp ) - { - register ACE_YY_CHAR ace_yy_c = (*ace_yy_cp ? ace_yy_ec[ACE_YY_SC_TO_UI(*ace_yy_cp)] : 1); - if ( ace_yy_accept[ace_yy_current_state] ) - { - ace_yy_last_accepting_state = ace_yy_current_state; - ace_yy_last_accepting_cpos = ace_yy_cp; - } - while ( ace_yy_chk[ace_yy_base[ace_yy_current_state] + ace_yy_c] != ace_yy_current_state ) - { - ace_yy_current_state = (int) ace_yy_def[ace_yy_current_state]; - if ( ace_yy_current_state >= 107 ) - ace_yy_c = ace_yy_meta[(unsigned int) ace_yy_c]; - } - ace_yy_current_state = ace_yy_nxt[ace_yy_base[ace_yy_current_state] + (unsigned int) ace_yy_c]; - } - - return ace_yy_current_state; - } + { + register ace_yy_state_type ace_yy_current_state; + register ACE_TCHAR *ace_yy_cp; + + ace_yy_current_state = ace_yy_start; + ace_yy_current_state += ACE_YY_AT_BOL(); + + for ( ace_yy_cp = ace_yytext_ptr + ACE_YY_MORE_ADJ; ace_yy_cp < ace_yy_c_buf_p; ++ace_yy_cp ) + { + register ACE_YY_CHAR ace_yy_c = (*ace_yy_cp ? ace_yy_ec[ACE_YY_SC_TO_UI(*ace_yy_cp)] : 1); + if ( ace_yy_accept[ace_yy_current_state] ) + { + ace_yy_last_accepting_state = ace_yy_current_state; + ace_yy_last_accepting_cpos = ace_yy_cp; + } + while ( ace_yy_chk[ace_yy_base[ace_yy_current_state] + ace_yy_c] != ace_yy_current_state ) + { + ace_yy_current_state = (int) ace_yy_def[ace_yy_current_state]; + if ( ace_yy_current_state >= 107 ) + ace_yy_c = ace_yy_meta[(unsigned int) ace_yy_c]; + } + ace_yy_current_state = ace_yy_nxt[ace_yy_base[ace_yy_current_state] + (unsigned int) ace_yy_c]; + } + + return ace_yy_current_state; + } /* ace_yy_try_NUL_trans - try to make a transition on the NUL character * * synopsis - * next_state = ace_yy_try_NUL_trans( current_state ); + * next_state = ace_yy_try_NUL_trans( current_state ); */ #ifdef ACE_YY_USE_PROTOS @@ -1217,27 +1217,27 @@ static ace_yy_state_type ace_yy_try_NUL_trans( ace_yy_state_type ace_yy_current_ static ace_yy_state_type ace_yy_try_NUL_trans( ace_yy_current_state ) ace_yy_state_type ace_yy_current_state; #endif - { - register int ace_yy_is_jam; - register ACE_TCHAR *ace_yy_cp = ace_yy_c_buf_p; - - register ACE_YY_CHAR ace_yy_c = 1; - if ( ace_yy_accept[ace_yy_current_state] ) - { - ace_yy_last_accepting_state = ace_yy_current_state; - ace_yy_last_accepting_cpos = ace_yy_cp; - } - while ( ace_yy_chk[ace_yy_base[ace_yy_current_state] + ace_yy_c] != ace_yy_current_state ) - { - ace_yy_current_state = (int) ace_yy_def[ace_yy_current_state]; - if ( ace_yy_current_state >= 107 ) - ace_yy_c = ace_yy_meta[(unsigned int) ace_yy_c]; - } - ace_yy_current_state = ace_yy_nxt[ace_yy_base[ace_yy_current_state] + (unsigned int) ace_yy_c]; - ace_yy_is_jam = (ace_yy_current_state == 106); - - return ace_yy_is_jam ? 0 : ace_yy_current_state; - } + { + register int ace_yy_is_jam; + register ACE_TCHAR *ace_yy_cp = ace_yy_c_buf_p; + + register ACE_YY_CHAR ace_yy_c = 1; + if ( ace_yy_accept[ace_yy_current_state] ) + { + ace_yy_last_accepting_state = ace_yy_current_state; + ace_yy_last_accepting_cpos = ace_yy_cp; + } + while ( ace_yy_chk[ace_yy_base[ace_yy_current_state] + ace_yy_c] != ace_yy_current_state ) + { + ace_yy_current_state = (int) ace_yy_def[ace_yy_current_state]; + if ( ace_yy_current_state >= 107 ) + ace_yy_c = ace_yy_meta[(unsigned int) ace_yy_c]; + } + ace_yy_current_state = ace_yy_nxt[ace_yy_base[ace_yy_current_state] + (unsigned int) ace_yy_c]; + ace_yy_is_jam = (ace_yy_current_state == 106); + + return ace_yy_is_jam ? 0 : ace_yy_current_state; + } #ifndef ACE_YY_NO_UNPUT @@ -1248,41 +1248,41 @@ static void ace_yyunput( c, ace_yy_bp ) int c; register ACE_TCHAR *ace_yy_bp; #endif - { - register ACE_TCHAR *ace_yy_cp = ace_yy_c_buf_p; + { + register ACE_TCHAR *ace_yy_cp = ace_yy_c_buf_p; - /* undo effects of setting up ace_yytext */ - *ace_yy_cp = ace_yy_hold_char; + /* undo effects of setting up ace_yytext */ + *ace_yy_cp = ace_yy_hold_char; - if ( ace_yy_cp < ace_yy_current_buffer->ace_yy_ch_buf + 2 ) - { /* need to shift things up to make room */ - /* +2 for EOB chars. */ - register int number_to_move = ace_yy_n_chars + 2; - register ACE_TCHAR *dest = &ace_yy_current_buffer->ace_yy_ch_buf[ - ace_yy_current_buffer->ace_yy_buf_size + 2]; - register ACE_TCHAR *source = - &ace_yy_current_buffer->ace_yy_ch_buf[number_to_move]; + if ( ace_yy_cp < ace_yy_current_buffer->ace_yy_ch_buf + 2 ) + { /* need to shift things up to make room */ + /* +2 for EOB chars. */ + register int number_to_move = ace_yy_n_chars + 2; + register ACE_TCHAR *dest = &ace_yy_current_buffer->ace_yy_ch_buf[ + ace_yy_current_buffer->ace_yy_buf_size + 2]; + register ACE_TCHAR *source = + &ace_yy_current_buffer->ace_yy_ch_buf[number_to_move]; - while ( source > ace_yy_current_buffer->ace_yy_ch_buf ) - *--dest = *--source; + while ( source > ace_yy_current_buffer->ace_yy_ch_buf ) + *--dest = *--source; - ace_yy_cp += (int) (dest - source); - ace_yy_bp += (int) (dest - source); - ace_yy_current_buffer->ace_yy_n_chars = - ace_yy_n_chars = ace_yy_current_buffer->ace_yy_buf_size; + ace_yy_cp += (int) (dest - source); + ace_yy_bp += (int) (dest - source); + ace_yy_current_buffer->ace_yy_n_chars = + ace_yy_n_chars = ace_yy_current_buffer->ace_yy_buf_size; - if ( ace_yy_cp < ace_yy_current_buffer->ace_yy_ch_buf + 2 ) - ACE_YY_FATAL_ERROR(ACE_LIB_TEXT( "flex scanner push-back overflow") ); - } + if ( ace_yy_cp < ace_yy_current_buffer->ace_yy_ch_buf + 2 ) + ACE_YY_FATAL_ERROR(ACE_LIB_TEXT( "flex scanner push-back overflow") ); + } - *--ace_yy_cp = (ACE_TCHAR) c; + *--ace_yy_cp = (ACE_TCHAR) c; - ace_yytext_ptr = ace_yy_bp; - ace_yy_hold_char = *ace_yy_cp; - ace_yy_c_buf_p = ace_yy_cp; - } -#endif /* ifndef ACE_YY_NO_UNPUT */ + ace_yytext_ptr = ace_yy_bp; + ace_yy_hold_char = *ace_yy_cp; + ace_yy_c_buf_p = ace_yy_cp; + } +#endif /* ifndef ACE_YY_NO_UNPUT */ #ifdef __cplusplus @@ -1290,73 +1290,73 @@ static int ace_yyinput() #else static int input() #endif - { - int c; - - *ace_yy_c_buf_p = ace_yy_hold_char; - - if ( *ace_yy_c_buf_p == ACE_YY_END_OF_BUFFER_CHAR ) - { - /* ace_yy_c_buf_p now points to the character we want to return. - * If this occurs *before* the EOB characters, then it's a - * valid NUL; if not, then we've hit the end of the buffer. - */ - if ( ace_yy_c_buf_p < &ace_yy_current_buffer->ace_yy_ch_buf[ace_yy_n_chars] ) - /* This was really a NUL. */ - *ace_yy_c_buf_p = '\0'; - - else - { /* need more input */ - int offset = ace_yy_c_buf_p - ace_yytext_ptr; - ++ace_yy_c_buf_p; - - switch ( ace_yy_get_next_buffer() ) - { - case EOB_ACT_LAST_MATCH: - /* This happens because ace_yy_g_n_b() - * sees that we've accumulated a - * token and flags that we need to - * try matching the token before - * proceeding. But for input(), - * there's no matching to consider. - * So convert the EOB_ACT_LAST_MATCH - * to EOB_ACT_END_OF_FILE. - */ - - /* Reset buffer status. */ - ace_yyrestart( ace_yyin ); - - /* fall through */ - - case EOB_ACT_END_OF_FILE: - { - if ( ace_yywrap() ) - return EOF; - - if ( ! ace_yy_did_buffer_switch_on_eof ) - ACE_YY_NEW_FILE; + { + int c; + + *ace_yy_c_buf_p = ace_yy_hold_char; + + if ( *ace_yy_c_buf_p == ACE_YY_END_OF_BUFFER_CHAR ) + { + /* ace_yy_c_buf_p now points to the character we want to return. + * If this occurs *before* the EOB characters, then it's a + * valid NUL; if not, then we've hit the end of the buffer. + */ + if ( ace_yy_c_buf_p < &ace_yy_current_buffer->ace_yy_ch_buf[ace_yy_n_chars] ) + /* This was really a NUL. */ + *ace_yy_c_buf_p = '\0'; + + else + { /* need more input */ + int offset = ace_yy_c_buf_p - ace_yytext_ptr; + ++ace_yy_c_buf_p; + + switch ( ace_yy_get_next_buffer() ) + { + case EOB_ACT_LAST_MATCH: + /* This happens because ace_yy_g_n_b() + * sees that we've accumulated a + * token and flags that we need to + * try matching the token before + * proceeding. But for input(), + * there's no matching to consider. + * So convert the EOB_ACT_LAST_MATCH + * to EOB_ACT_END_OF_FILE. + */ + + /* Reset buffer status. */ + ace_yyrestart( ace_yyin ); + + /* fall through */ + + case EOB_ACT_END_OF_FILE: + { + if ( ace_yywrap() ) + return EOF; + + if ( ! ace_yy_did_buffer_switch_on_eof ) + ACE_YY_NEW_FILE; #ifdef __cplusplus - return ace_yyinput(); + return ace_yyinput(); #else - return input(); + return input(); #endif - } + } - case EOB_ACT_CONTINUE_SCAN: - ace_yy_c_buf_p = ace_yytext_ptr + offset; - break; - } - } - } + case EOB_ACT_CONTINUE_SCAN: + ace_yy_c_buf_p = ace_yytext_ptr + offset; + break; + } + } + } - c = *(unsigned char *) ace_yy_c_buf_p; /* cast for 8-bit char's */ - *ace_yy_c_buf_p = '\0'; /* preserve ace_yytext */ - ace_yy_hold_char = *++ace_yy_c_buf_p; + c = *(unsigned char *) ace_yy_c_buf_p; /* cast for 8-bit char's */ + *ace_yy_c_buf_p = '\0'; /* preserve ace_yytext */ + ace_yy_hold_char = *++ace_yy_c_buf_p; - ace_yy_current_buffer->ace_yy_at_bol = (c == '\n'); + ace_yy_current_buffer->ace_yy_at_bol = (c == '\n'); - return c; - } + return c; + } #ifdef ACE_YY_USE_PROTOS @@ -1365,13 +1365,13 @@ void ace_yyrestart( FILE *input_file ) void ace_yyrestart( input_file ) FILE *input_file; #endif - { - if ( ! ace_yy_current_buffer ) - ace_yy_current_buffer = ace_yy_create_buffer( ace_yyin, ACE_YY_BUF_SIZE ); + { + if ( ! ace_yy_current_buffer ) + ace_yy_current_buffer = ace_yy_create_buffer( ace_yyin, ACE_YY_BUF_SIZE ); - ace_yy_init_buffer( ace_yy_current_buffer, input_file ); - ace_yy_load_buffer_state(); - } + ace_yy_init_buffer( ace_yy_current_buffer, input_file ); + ace_yy_load_buffer_state(); + } #ifdef ACE_YY_USE_PROTOS @@ -1380,28 +1380,28 @@ void ace_yy_switch_to_buffer( ACE_YY_BUFFER_STATE new_buffer ) void ace_yy_switch_to_buffer( new_buffer ) ACE_YY_BUFFER_STATE new_buffer; #endif - { - if ( ace_yy_current_buffer == new_buffer ) - return; + { + if ( ace_yy_current_buffer == new_buffer ) + return; - if ( ace_yy_current_buffer ) - { - /* Flush out information for old buffer. */ - *ace_yy_c_buf_p = ace_yy_hold_char; - ace_yy_current_buffer->ace_yy_buf_pos = ace_yy_c_buf_p; - ace_yy_current_buffer->ace_yy_n_chars = ace_yy_n_chars; - } + if ( ace_yy_current_buffer ) + { + /* Flush out information for old buffer. */ + *ace_yy_c_buf_p = ace_yy_hold_char; + ace_yy_current_buffer->ace_yy_buf_pos = ace_yy_c_buf_p; + ace_yy_current_buffer->ace_yy_n_chars = ace_yy_n_chars; + } - ace_yy_current_buffer = new_buffer; - ace_yy_load_buffer_state(); + ace_yy_current_buffer = new_buffer; + ace_yy_load_buffer_state(); - /* We don't actually know whether we did this switch during - * EOF (ace_yywrap()) processing, but the only time this flag - * is looked at is after ace_yywrap() is called, so it's safe - * to go ahead and always set it. - */ - ace_yy_did_buffer_switch_on_eof = 1; - } + /* We don't actually know whether we did this switch during + * EOF (ace_yywrap()) processing, but the only time this flag + * is looked at is after ace_yywrap() is called, so it's safe + * to go ahead and always set it. + */ + ace_yy_did_buffer_switch_on_eof = 1; + } #ifdef ACE_YY_USE_PROTOS @@ -1409,12 +1409,12 @@ void ace_yy_load_buffer_state( void ) #else void ace_yy_load_buffer_state() #endif - { - ace_yy_n_chars = ace_yy_current_buffer->ace_yy_n_chars; - ace_yytext_ptr = ace_yy_c_buf_p = ace_yy_current_buffer->ace_yy_buf_pos; - ace_yyin = ace_yy_current_buffer->ace_yy_input_file; - ace_yy_hold_char = *ace_yy_c_buf_p; - } + { + ace_yy_n_chars = ace_yy_current_buffer->ace_yy_n_chars; + ace_yytext_ptr = ace_yy_c_buf_p = ace_yy_current_buffer->ace_yy_buf_pos; + ace_yyin = ace_yy_current_buffer->ace_yy_input_file; + ace_yy_hold_char = *ace_yy_c_buf_p; + } #ifdef ACE_YY_USE_PROTOS @@ -1424,28 +1424,28 @@ ACE_YY_BUFFER_STATE ace_yy_create_buffer( file, size ) FILE *file; int size; #endif - { - ACE_YY_BUFFER_STATE b; + { + ACE_YY_BUFFER_STATE b; - b = (ACE_YY_BUFFER_STATE) ace_yy_flex_alloc( sizeof( struct ace_yy_buffer_state ) ); - if ( ! b ) - ACE_YY_FATAL_ERROR(ACE_LIB_TEXT( "out of dynamic memory in ace_yy_create_buffer()") ); + b = (ACE_YY_BUFFER_STATE) ace_yy_flex_alloc( sizeof( struct ace_yy_buffer_state ) ); + if ( ! b ) + ACE_YY_FATAL_ERROR(ACE_LIB_TEXT( "out of dynamic memory in ace_yy_create_buffer()") ); - b->ace_yy_buf_size = size; + b->ace_yy_buf_size = size; - /* ace_yy_ch_buf has to be 2 characters longer than the size given because - * we need to put in 2 end-of-buffer characters. - */ - b->ace_yy_ch_buf = (ACE_TCHAR *) ace_yy_flex_alloc( (b->ace_yy_buf_size + 2 ) * sizeof (ACE_TCHAR)); - if ( ! b->ace_yy_ch_buf ) - ACE_YY_FATAL_ERROR(ACE_LIB_TEXT( "out of dynamic memory in ace_yy_create_buffer()") ); + /* ace_yy_ch_buf has to be 2 characters longer than the size given because + * we need to put in 2 end-of-buffer characters. + */ + b->ace_yy_ch_buf = (ACE_TCHAR *) ace_yy_flex_alloc( (b->ace_yy_buf_size + 2 ) * sizeof (ACE_TCHAR)); + if ( ! b->ace_yy_ch_buf ) + ACE_YY_FATAL_ERROR(ACE_LIB_TEXT( "out of dynamic memory in ace_yy_create_buffer()") ); - b->ace_yy_is_our_buffer = 1; + b->ace_yy_is_our_buffer = 1; - ace_yy_init_buffer( b, file ); + ace_yy_init_buffer( b, file ); - return b; - } + return b; + } #ifdef ACE_YY_USE_PROTOS @@ -1454,18 +1454,18 @@ void ace_yy_delete_buffer( ACE_YY_BUFFER_STATE b ) void ace_yy_delete_buffer( b ) ACE_YY_BUFFER_STATE b; #endif - { - if ( ! b ) - return; + { + if ( ! b ) + return; - if ( b == ace_yy_current_buffer ) - ace_yy_current_buffer = (ACE_YY_BUFFER_STATE) 0; + if ( b == ace_yy_current_buffer ) + ace_yy_current_buffer = (ACE_YY_BUFFER_STATE) 0; - if ( b->ace_yy_is_our_buffer ) - ace_yy_flex_free( (void *) b->ace_yy_ch_buf ); + if ( b->ace_yy_is_our_buffer ) + ace_yy_flex_free( (void *) b->ace_yy_ch_buf ); - ace_yy_flex_free( (void *) b ); - } + ace_yy_flex_free( (void *) b ); + } #ifndef ACE_YY_ALWAYS_INTERACTIVE @@ -1483,22 +1483,22 @@ FILE *file; #endif - { - ace_yy_flush_buffer( b ); + { + ace_yy_flush_buffer( b ); - b->ace_yy_input_file = file; - b->ace_yy_fill_buffer = 1; + b->ace_yy_input_file = file; + b->ace_yy_fill_buffer = 1; #if ACE_YY_ALWAYS_INTERACTIVE - b->ace_yy_is_interactive = 1; + b->ace_yy_is_interactive = 1; #else #if ACE_YY_NEVER_INTERACTIVE - b->ace_yy_is_interactive = 0; + b->ace_yy_is_interactive = 0; #else - b->ace_yy_is_interactive = file ? (ACE_OS::isatty( fileno (file) ) > 0) : 0; + b->ace_yy_is_interactive = file ? (ACE_OS::isatty( fileno (file) ) > 0) : 0; #endif #endif - } + } #ifdef ACE_YY_USE_PROTOS @@ -1508,27 +1508,27 @@ void ace_yy_flush_buffer( b ) ACE_YY_BUFFER_STATE b; #endif - { - if ( ! b ) - return; + { + if ( ! b ) + return; - b->ace_yy_n_chars = 0; + b->ace_yy_n_chars = 0; - /* We always need two end-of-buffer characters. The first causes - * a transition to the end-of-buffer state. The second causes - * a jam in that state. - */ - b->ace_yy_ch_buf[0] = ACE_YY_END_OF_BUFFER_CHAR; - b->ace_yy_ch_buf[1] = ACE_YY_END_OF_BUFFER_CHAR; + /* We always need two end-of-buffer characters. The first causes + * a transition to the end-of-buffer state. The second causes + * a jam in that state. + */ + b->ace_yy_ch_buf[0] = ACE_YY_END_OF_BUFFER_CHAR; + b->ace_yy_ch_buf[1] = ACE_YY_END_OF_BUFFER_CHAR; - b->ace_yy_buf_pos = &b->ace_yy_ch_buf[0]; + b->ace_yy_buf_pos = &b->ace_yy_ch_buf[0]; - b->ace_yy_at_bol = 1; - b->ace_yy_buffer_status = ACE_YY_BUFFER_NEW; + b->ace_yy_at_bol = 1; + b->ace_yy_buffer_status = ACE_YY_BUFFER_NEW; - if ( b == ace_yy_current_buffer ) - ace_yy_load_buffer_state(); - } + if ( b == ace_yy_current_buffer ) + ace_yy_load_buffer_state(); + } #ifndef ACE_YY_NO_SCAN_BUFFER @@ -1539,33 +1539,33 @@ ACE_YY_BUFFER_STATE ace_yy_scan_buffer( base, size ) ACE_TCHAR *base; ace_yy_size_t size; #endif - { - ACE_YY_BUFFER_STATE b; + { + ACE_YY_BUFFER_STATE b; - if ( size < 2 || - base[size-2] != ACE_YY_END_OF_BUFFER_CHAR || - base[size-1] != ACE_YY_END_OF_BUFFER_CHAR ) - /* They forgot to leave room for the EOB's. */ - return 0; + if ( size < 2 || + base[size-2] != ACE_YY_END_OF_BUFFER_CHAR || + base[size-1] != ACE_YY_END_OF_BUFFER_CHAR ) + /* They forgot to leave room for the EOB's. */ + return 0; - b = (ACE_YY_BUFFER_STATE) ace_yy_flex_alloc( sizeof( struct ace_yy_buffer_state ) ); - if ( ! b ) - ACE_YY_FATAL_ERROR(ACE_LIB_TEXT( "out of dynamic memory in ace_yy_scan_buffer()" )); + b = (ACE_YY_BUFFER_STATE) ace_yy_flex_alloc( sizeof( struct ace_yy_buffer_state ) ); + if ( ! b ) + ACE_YY_FATAL_ERROR(ACE_LIB_TEXT( "out of dynamic memory in ace_yy_scan_buffer()" )); - b->ace_yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ - b->ace_yy_buf_pos = b->ace_yy_ch_buf = base; - b->ace_yy_is_our_buffer = 0; - b->ace_yy_input_file = 0; - b->ace_yy_n_chars = b->ace_yy_buf_size; - b->ace_yy_is_interactive = 0; - b->ace_yy_at_bol = 1; - b->ace_yy_fill_buffer = 0; - b->ace_yy_buffer_status = ACE_YY_BUFFER_NEW; + b->ace_yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ + b->ace_yy_buf_pos = b->ace_yy_ch_buf = base; + b->ace_yy_is_our_buffer = 0; + b->ace_yy_input_file = 0; + b->ace_yy_n_chars = b->ace_yy_buf_size; + b->ace_yy_is_interactive = 0; + b->ace_yy_at_bol = 1; + b->ace_yy_fill_buffer = 0; + b->ace_yy_buffer_status = ACE_YY_BUFFER_NEW; - ace_yy_switch_to_buffer( b ); + ace_yy_switch_to_buffer( b ); - return b; - } + return b; + } #endif @@ -1576,13 +1576,13 @@ ACE_YY_BUFFER_STATE ace_yy_scan_string( ace_yyconst ACE_TCHAR *ace_yy_str ) ACE_YY_BUFFER_STATE ace_yy_scan_string( ace_yy_str ) ace_yyconst ACE_TCHAR *ace_yy_str; #endif - { - int len; - for ( len = 0; ace_yy_str[len]; ++len ) - ; + { + int len; + for ( len = 0; ace_yy_str[len]; ++len ) + ; - return ace_yy_scan_bytes( ace_yy_str, len ); - } + return ace_yy_scan_bytes( ace_yy_str, len ); + } #endif @@ -1594,34 +1594,34 @@ ACE_YY_BUFFER_STATE ace_yy_scan_bytes( bytes, len ) ace_yyconst ACE_TCHAR *bytes; int len; #endif - { - ACE_YY_BUFFER_STATE b; - ACE_TCHAR *buf; - ace_yy_size_t n; - int i; + { + ACE_YY_BUFFER_STATE b; + ACE_TCHAR *buf; + ace_yy_size_t n; + int i; - /* Get memory for full buffer, including space for trailing EOB's. */ - n = len + 2; - buf = (ACE_TCHAR *) ace_yy_flex_alloc( n * sizeof (ACE_TCHAR)); - if ( ! buf ) - ACE_YY_FATAL_ERROR(ACE_LIB_TEXT( "out of dynamic memory in ace_yy_scan_bytes()" )); + /* Get memory for full buffer, including space for trailing EOB's. */ + n = len + 2; + buf = (ACE_TCHAR *) ace_yy_flex_alloc( n * sizeof (ACE_TCHAR)); + if ( ! buf ) + ACE_YY_FATAL_ERROR(ACE_LIB_TEXT( "out of dynamic memory in ace_yy_scan_bytes()" )); - for ( i = 0; i < len; ++i ) - buf[i] = bytes[i]; + for ( i = 0; i < len; ++i ) + buf[i] = bytes[i]; - buf[len] = buf[len+1] = ACE_YY_END_OF_BUFFER_CHAR; + buf[len] = buf[len+1] = ACE_YY_END_OF_BUFFER_CHAR; - b = ace_yy_scan_buffer( buf, n ); - if ( ! b ) - ACE_YY_FATAL_ERROR(ACE_LIB_TEXT( "bad buffer in ace_yy_scan_bytes()") ); + b = ace_yy_scan_buffer( buf, n ); + if ( ! b ) + ACE_YY_FATAL_ERROR(ACE_LIB_TEXT( "bad buffer in ace_yy_scan_bytes()") ); - /* It's okay to grow etc. this buffer, and we should throw it - * away when we're done. - */ - b->ace_yy_is_our_buffer = 1; + /* It's okay to grow etc. this buffer, and we should throw it + * away when we're done. + */ + b->ace_yy_is_our_buffer = 1; - return b; - } + return b; + } #endif @@ -1632,49 +1632,49 @@ static void ace_yy_push_state( int new_state ) static void ace_yy_push_state( new_state ) int new_state; #endif - { - if ( ace_yy_start_stack_ptr >= ace_yy_start_stack_depth ) - { - ace_yy_size_t new_size; + { + if ( ace_yy_start_stack_ptr >= ace_yy_start_stack_depth ) + { + ace_yy_size_t new_size; - ace_yy_start_stack_depth += ACE_YY_START_STACK_INCR; - new_size = ace_yy_start_stack_depth * sizeof( int ); + ace_yy_start_stack_depth += ACE_YY_START_STACK_INCR; + new_size = ace_yy_start_stack_depth * sizeof( int ); - if ( ! ace_yy_start_stack ) - ace_yy_start_stack = (int *) ace_yy_flex_alloc( new_size ); + if ( ! ace_yy_start_stack ) + ace_yy_start_stack = (int *) ace_yy_flex_alloc( new_size ); - else - ace_yy_start_stack = (int *) ace_yy_flex_realloc( - (void *) ace_yy_start_stack, new_size ); + else + ace_yy_start_stack = (int *) ace_yy_flex_realloc( + (void *) ace_yy_start_stack, new_size ); - if ( ! ace_yy_start_stack ) + if ( ! ace_yy_start_stack ) ACE_YY_FATAL_ERROR(ACE_LIB_TEXT( - "out of memory expanding start-condition stack" )); - } + "out of memory expanding start-condition stack" )); + } - ace_yy_start_stack[ace_yy_start_stack_ptr++] = ACE_YY_START; + ace_yy_start_stack[ace_yy_start_stack_ptr++] = ACE_YY_START; - BEGIN(new_state); - } + BEGIN(new_state); + } #endif #ifndef ACE_YY_NO_POP_STATE static void ace_yy_pop_state() - { - if ( --ace_yy_start_stack_ptr < 0 ) - ACE_YY_FATAL_ERROR(ACE_LIB_TEXT( "start-condition stack underflow" )); + { + if ( --ace_yy_start_stack_ptr < 0 ) + ACE_YY_FATAL_ERROR(ACE_LIB_TEXT( "start-condition stack underflow" )); - BEGIN(ace_yy_start_stack[ace_yy_start_stack_ptr]); - } + BEGIN(ace_yy_start_stack[ace_yy_start_stack_ptr]); + } #endif #ifndef ACE_YY_NO_TOP_STATE static int ace_yy_top_state() - { - return ace_yy_start_stack[ace_yy_start_stack_ptr - 1]; - } + { + return ace_yy_start_stack[ace_yy_start_stack_ptr - 1]; + } #endif #ifndef ACE_YY_EXIT_FAILURE @@ -1687,10 +1687,10 @@ static void ace_yy_fatal_error( ace_yyconst ACE_TCHAR msg[] ) static void ace_yy_fatal_error( msg ) ACE_TCHAR msg[]; #endif - { - (void) ACE_OS::fprintf( stderr, ACE_LIB_TEXT("%s\n"), msg ); - exit( ACE_YY_EXIT_FAILURE ); - } + { + (void) ACE_OS::fprintf( stderr, ACE_LIB_TEXT("%s\n"), msg ); + exit( ACE_YY_EXIT_FAILURE ); + } @@ -1698,16 +1698,16 @@ ACE_TCHAR msg[]; #undef ace_yyless #define ace_yyless(n) \ - do \ - { \ - /* Undo effects of setting up ace_yytext. */ \ - ace_yytext[ace_yyleng] = ace_yy_hold_char; \ - ace_yy_c_buf_p = ace_yytext + n; \ - ace_yy_hold_char = *ace_yy_c_buf_p; \ - *ace_yy_c_buf_p = '\0'; \ - ace_yyleng = n; \ - } \ - while ( 0 ) + do \ + { \ + /* Undo effects of setting up ace_yytext. */ \ + ace_yytext[ace_yyleng] = ace_yy_hold_char; \ + ace_yy_c_buf_p = ace_yytext + n; \ + ace_yy_hold_char = *ace_yy_c_buf_p; \ + *ace_yy_c_buf_p = '\0'; \ + ace_yyleng = n; \ + } \ + while ( 0 ) /* Internal utility routines. */ @@ -1721,11 +1721,11 @@ ACE_TCHAR *s1; ace_yyconst ACE_TCHAR *s2; int n; #endif - { - register int i; - for ( i = 0; i < n; ++i ) - s1[i] = s2[i]; - } + { + register int i; + for ( i = 0; i < n; ++i ) + s1[i] = s2[i]; + } #endif #ifdef ACE_YY_NEED_STRLEN @@ -1735,13 +1735,13 @@ static int ace_yy_flex_strlen( ace_yyconst ACE_TCHAR *s ) static int ace_yy_flex_strlen( s ) ace_yyconst ACE_TCHAR *s; #endif - { - register int n; - for ( n = 0; s[n]; ++n ) - ; + { + register int n; + for ( n = 0; s[n]; ++n ) + ; - return n; - } + return n; + } #endif @@ -1751,9 +1751,9 @@ static void *ace_yy_flex_alloc( ace_yy_size_t size ) static void *ace_yy_flex_alloc( size ) ace_yy_size_t size; #endif - { - return (void *) malloc( size ); - } + { + return (void *) malloc( size ); + } #ifdef ACE_YY_USE_PROTOS static void *ace_yy_flex_realloc( void *ptr, ace_yy_size_t size ) @@ -1762,16 +1762,16 @@ static void *ace_yy_flex_realloc( ptr, size ) void *ptr; ace_yy_size_t size; #endif - { - /* The cast to (char *) in the following accommodates both - * implementations that use char* generic pointers, and those - * that use void* generic pointers. It works with the latter - * because both ANSI C and C++ allow castless assignment from - * any pointer type to void*, and deal with argument conversions - * as though doing an assignment. - */ - return (void *) realloc( (char *) ptr, size ); - } + { + /* The cast to (char *) in the following accommodates both + * implementations that use char* generic pointers, and those + * that use void* generic pointers. It works with the latter + * because both ANSI C and C++ allow castless assignment from + * any pointer type to void*, and deal with argument conversions + * as though doing an assignment. + */ + return (void *) realloc( (char *) ptr, size ); + } #ifdef ACE_YY_USE_PROTOS static void ace_yy_flex_free( void *ptr ) @@ -1779,16 +1779,16 @@ static void ace_yy_flex_free( void *ptr ) static void ace_yy_flex_free( ptr ) void *ptr; #endif - { - free( ACE_MALLOC_T (ptr) ); - } + { + free( ACE_MALLOC_T (ptr) ); + } #if ACE_YY_MAIN int main() - { - ace_yylex(); - return 0; - } + { + ace_yylex(); + return 0; + } #endif int @@ -1841,4 +1841,4 @@ ace_yy_pop_buffer (ace_yy_buffer_state *buffer) ace_yy_switch_to_buffer (buffer); } -#endif /* ACE_USES_CLASSIC_SVC_CONF && ACE_USES_CLASSIC_SVC_CONF == 1 */ +#endif /* ACE_USES_CLASSIC_SVC_CONF == 1 */ diff --git a/ace/Svc_Conf_y.cpp b/ace/Svc_Conf_y.cpp index 33f3e022b82..19118c02ba3 100644 --- a/ace/Svc_Conf_y.cpp +++ b/ace/Svc_Conf_y.cpp @@ -2,24 +2,24 @@ /* A Bison parser, made from Svc_Conf.y by GNU Bison version 1.28 */ -#if defined (ACE_USES_CLASSIC_SVC_CONF) && (ACE_USES_CLASSIC_SVC_CONF == 1) +#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 && ACE_USES_CLASSIC_SVC_CONF == 1 */ +#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$ @@ -33,7 +33,7 @@ ACE_RCSID (ace, Svc_Conf_y, "$Id$") -#if defined (ACE_USES_CLASSIC_SVC_CONF) && (ACE_USES_CLASSIC_SVC_CONF == 1) +#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); @@ -58,9 +58,9 @@ int ace_yyerrno = 0; -#define ACE_YYFINAL 66 -#define ACE_YYFLAG -32768 -#define ACE_YYNTBASE 23 +#define ACE_YYFINAL 66 +#define ACE_YYFLAG -32768 +#define ACE_YYNTBASE 23 #define ACE_YYTRANSLATE(x) ((unsigned)(x) <= 270 ? ace_yytranslate[x] : 43) @@ -228,7 +228,7 @@ static const short ace_yypgoto[] = {-32768, }; -#define ACE_YYLAST 61 +#define ACE_YYLAST 61 static const short ace_yytable[] = { 23, @@ -301,7 +301,7 @@ static const short ace_yycheck[] = { 8, 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. */ + instead, just don't use alloca. */ #include #endif #else /* not MSDOS, or __TURBOC__ */ @@ -314,7 +314,7 @@ static const short ace_yycheck[] = { 8, #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. */ + and on HPUX 10. Eventually we can turn this on. */ #define ACE_YYSTACK_USE_ALLOCA #define alloca __builtin_alloca #endif /* __hpux */ @@ -336,50 +336,50 @@ static const short ace_yycheck[] = { 8, 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 +#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_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; } \ +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 +#define ACE_YYTERROR 1 +#define ACE_YYERRCODE 256 #ifndef ACE_YYPURE -#define ACE_YYLEX ace_yylex() +#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) +#define ACE_YYLEX ace_yylex(&ace_yylval, &ace_yylloc, ACE_YYLEX_PARAM) #else -#define ACE_YYLEX ace_yylex(&ace_yylval, &ace_yylloc) +#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) +#define ACE_YYLEX ace_yylex(&ace_yylval, ACE_YYLEX_PARAM) #else -#define ACE_YYLEX ace_yylex(&ace_yylval) +#define ACE_YYLEX ace_yylex(&ace_yylval) #endif #endif /* not ACE_YYLSP_NEEDED */ #endif @@ -388,27 +388,27 @@ while (0) #ifndef ACE_YYPURE -int ace_yychar; /* the lookahead symbol */ -ACE_YYSTYPE ace_yylval; /* the semantic value of the */ - /* lookahead symbol */ +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 */ +ACE_YYLTYPE ace_yylloc; /* location data for the lookahead */ + /* symbol */ #endif -int ace_yynerrs; /* number of parse errors so far */ +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 */ +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 */ +/* ACE_YYINITDEPTH indicates the initial size of the parser's stacks */ -#ifndef ACE_YYINITDEPTH +#ifndef ACE_YYINITDEPTH #define ACE_YYINITDEPTH 200 #endif @@ -428,9 +428,9 @@ int ace_yydebug; /* nonzero means print parse trace */ 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++ */ +#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 @@ -505,17 +505,17 @@ ace_yyparse(ACE_YYPARSE_PARAM_ARG) 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 */ + 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_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 */ + 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_yylsa[ACE_YYINITDEPTH]; /* the location stack */ ACE_YYLTYPE *ace_yyls = ace_yylsa; ACE_YYLTYPE *ace_yylsp; @@ -536,9 +536,9 @@ ace_yyparse(ACE_YYPARSE_PARAM_ARG) #endif #endif - ACE_YYSTYPE ace_yyval; /* the variable used to return */ - /* semantic values from the action */ - /* routines */ + ACE_YYSTYPE ace_yyval; /* the variable used to return */ + /* semantic values from the action */ + /* routines */ int ace_yylen; @@ -550,7 +550,7 @@ ace_yyparse(ACE_YYPARSE_PARAM_ARG) ace_yystate = 0; ace_yyerrstatus = 0; ace_yynerrs = 0; - ace_yychar = ACE_YYEMPTY; /* Cause a token to be read. */ + ace_yychar = ACE_YYEMPTY; /* Cause a token to be read. */ /* Initialize stack pointers. Waste one element of value and location stack @@ -585,20 +585,20 @@ ace_yynewstate: #ifdef ace_yyoverflow /* Each stack pointer address is followed by the size of - the data in use in that stack, in bytes. */ + 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. */ + 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); + &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); + &ace_yyss1, size * sizeof (*ace_yyssp), + &ace_yyvs1, size * sizeof (*ace_yyvsp), + &ace_yystacksize); #endif ace_yyss = ace_yyss1; ace_yyvs = ace_yyvs1; @@ -608,34 +608,34 @@ ace_yynewstate: #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); + { + 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); + free (ace_yyls); #endif - } - return 2; - } + } + return 2; + } ace_yystacksize *= 2; if (ace_yystacksize > ACE_YYMAXDEPTH) - 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)); + 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)); + 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)); + size * (unsigned int) sizeof (*ace_yylsp)); #endif #endif /* no ace_yyoverflow */ @@ -647,11 +647,11 @@ ace_yynewstate: #if ACE_YYDEBUG != 0 if (ace_yydebug) - ACE_OS::fprintf(stderr, ACE_LIB_TEXT("Stack size increased to %d\n"), ace_yystacksize); + 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; + ACE_YYABORT; } #if ACE_YYDEBUG != 0 @@ -681,21 +681,21 @@ ace_yynewstate: { #if ACE_YYDEBUG != 0 if (ace_yydebug) - ACE_OS::fprintf(stderr, ACE_LIB_TEXT("Reading a token: ")); + 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. */ + if (ace_yychar <= 0) /* This means end of input. */ { ace_yychar1 = 0; - ace_yychar = ACE_YYEOF; /* Don't call ACE_YYLEX any more */ + 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")); + ACE_OS::fprintf(stderr, ACE_LIB_TEXT("Now at end of input.\n")); #endif } else @@ -704,15 +704,15 @@ ace_yynewstate: #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. */ + { + 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); + ACE_YYPRINT (stderr, ace_yychar, ace_yylval); #endif - ACE_OS::fprintf (stderr, ACE_LIB_TEXT(")\n")); - } + ACE_OS::fprintf (stderr, ACE_LIB_TEXT(")\n")); + } #endif } @@ -732,7 +732,7 @@ ace_yynewstate: if (ace_yyn < 0) { if (ace_yyn == ACE_YYFLAG) - goto ace_yyerrlab; + goto ace_yyerrlab; ace_yyn = -ace_yyn; goto ace_yyreduce; } @@ -783,11 +783,11 @@ ace_yyreduce: int i; ACE_OS::fprintf (stderr, ACE_LIB_TEXT("Reducing via rule %d (line %d), "), - ace_yyn, ace_yyrline[ace_yyn]); + 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 "), ace_yytname[ace_yyrhs[i]]); ACE_OS::fprintf (stderr, ACE_LIB_TEXT(" -> %s\n"), ace_yytname[ace_yyr1[ace_yyn]]); } #endif @@ -1059,7 +1059,7 @@ case 41: 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(" %d"), *++ssp1); ACE_OS::fprintf (stderr, ACE_LIB_TEXT("\n")); } #endif @@ -1109,44 +1109,44 @@ ace_yyerrlab: /* here on detecting error */ 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")); - } + { + 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")); + ace_yyerror(ACE_LIB_TEXT("parse error")); } goto ace_yyerrlab1; @@ -1158,11 +1158,11 @@ ace_yyerrlab1: /* here on error raised explicitly by an action */ /* return failure if at end of input */ if (ace_yychar == ACE_YYEOF) - ACE_YYABORT; + 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]); + ACE_OS::fprintf(stderr, ACE_LIB_TEXT("Discarding token %d (%s).\n"), ace_yychar, ace_yytname[ace_yychar1]); #endif ace_yychar = ACE_YYEMPTY; @@ -1171,7 +1171,7 @@ ace_yyerrlab1: /* here on error raised explicitly by an action */ /* Else will try to reuse lookahead token after shifting the error token. */ - ace_yyerrstatus = 3; /* Each real token shifted decrements this */ + ace_yyerrstatus = 3; /* Each real token shifted decrements this */ goto ace_yyerrhandle; @@ -1199,7 +1199,7 @@ ace_yyerrpop: /* pop the current state because it cannot handle the error toke 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(" %d"), *++ssp1); ACE_OS::fprintf (stderr, ACE_LIB_TEXT("\n")); } #endif @@ -1218,7 +1218,7 @@ ace_yyerrhandle: if (ace_yyn < 0) { if (ace_yyn == ACE_YYFLAG) - goto ace_yyerrpop; + goto ace_yyerrpop; ace_yyn = -ace_yyn; goto ace_yyreduce; } @@ -1369,7 +1369,6 @@ main (int argc, ACE_TCHAR *argv[]) return ace_yyparse (¶m); } #endif /* DEBUGGING */ -#endif /* ACE_USES_CLASSIC_SVC_CONF && ACE_USES_CLASSIC_SVC_CONF == 1 */ ACE_Service_Type_Impl * ace_create_service_type (const ACE_TCHAR *name, @@ -1410,3 +1409,4 @@ ace_create_service_type (const ACE_TCHAR *name, } return stp; } +#endif /* ACE_USES_CLASSIC_SVC_CONF == 1 */ diff --git a/tests/Service_Config_DLL.cpp b/tests/Service_Config_DLL.cpp index fe23c91ba79..d63bf011fe2 100644 --- a/tests/Service_Config_DLL.cpp +++ b/tests/Service_Config_DLL.cpp @@ -42,7 +42,7 @@ Service_Config_DLL::init (int argc, ACE_TCHAR *argv[]) argv[1])); ACE_OS::sprintf (this->directive_[0], -#if defined (ACE_USES_CLASSIC_SVC_CONF) && (ACE_USES_CLASSIC_SVC_CONF == 1) +#if (ACE_USES_CLASSIC_SVC_CONF == 1) ACE_TEXT ("dynamic Test_Object_%s Service_Object * Service_Config_DLL:_make_Service_Config_DLL() \"Test_Object_%s\""), #else ACE_TEXT (" "), @@ -51,7 +51,7 @@ Service_Config_DLL::init (int argc, ACE_TCHAR *argv[]) argv[0]); ACE_OS::sprintf (this->directive_[1], -#if defined (ACE_USES_CLASSIC_SVC_CONF) && (ACE_USES_CLASSIC_SVC_CONF == 1) +#if (ACE_USES_CLASSIC_SVC_CONF == 1) ACE_TEXT ("dynamic Test_Object_%s Service_Object * Service_Config_DLL:_make_Service_Config_DLL() \"Test_Object_%s\""), #else ACE_TEXT (" "), -- cgit v1.2.1