diff options
33 files changed, 198 insertions, 7128 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog index 576c8bf8387..e58010f77f6 100644 --- a/TAO/ChangeLog +++ b/TAO/ChangeLog @@ -1,3 +1,30 @@ +Tue Apr 29 19:55:12 UTC 2008 Jeff Parsons <j.parsons@vanderbilt.edu> + + * orbsvcs/orbsvcs/ETCL/*: + + Removed this directory and its contents, it is replaced + by $TAO_ROOT/tao/ETCL. Some code has been factored to + $ACE_ROOT/ace/ETCL and some identifiers have changed, + but no intentional changes have been made to the behavior. + + * MPC/config/etcl.mpb: + * TAO_ACE.mwc: + * orbsvcs/orbsvcs/Log/Log_Constraint_Visitors.cpp: + * orbsvcs/orbsvcs/Log/Log_Constraint_Interpreter.cpp: + * orbsvcs/orbsvcs/Log/Log_Constraint_Interpreter.h: + * orbsvcs/orbsvcs/Log/Log_Constraint_Visitors.h: + * orbsvcs/orbsvcs/Notify/Notify_Constraint_Interpreter.h: + * orbsvcs/orbsvcs/Notify/Notify_Constraint_Interpreter.cpp: + * orbsvcs/orbsvcs/Notify/Notify_Constraint_Visitors.cpp: + * orbsvcs/orbsvcs/Notify/Notify_Constraint_Visitors.h: + * tao/ETCL/TAO_ETCL_Constraint.cpp: + * tao/ETCL/TAO_ETCL_Constraint.h: + * tao/ETCL/TAO_ETCL.mpc: + + Changes to integrate the replacement of + $TAO_ROOT/orbsvcs/orbsvcs/ETCL with + $TAO_ROOT/tao/ETCL and $ACE_ROOT/ace/ETCL. + Tue Apr 29 15:17:52 UTC 2008 Simon McQueen <sm@prismtech.com> * TAO_IDL/ast/ast_union.cpp: diff --git a/TAO/MPC/config/etcl.mpb b/TAO/MPC/config/etcl.mpb index 95e84d4ee9a..bbfbe5b732e 100644 --- a/TAO/MPC/config/etcl.mpb +++ b/TAO/MPC/config/etcl.mpb @@ -1,8 +1,6 @@ // -*- MPC -*- // $Id$ -project : taolib { - after += ETCL - libs += TAO_ETCL +project : tao_etcl_parser { tagchecks += Notify } diff --git a/TAO/TAO_ACE.mwc b/TAO/TAO_ACE.mwc index 92d138f16ea..7aed900952f 100644 --- a/TAO/TAO_ACE.mwc +++ b/TAO/TAO_ACE.mwc @@ -7,7 +7,6 @@ workspace { $(ACE_ROOT)/ACEXML/common $(ACE_ROOT)/ACEXML/parser/parser $(ACE_ROOT)/ACEXML/apps/svcconf - $(ACE_ROOT)/ETCL/ETCL.mpc $(ACE_ROOT)/Kokyu/Kokyu.mpc $(ACE_ROOT)/MonitorControl/MonitorControl.mpc $(ACE_ROOT)/protocols diff --git a/TAO/orbsvcs/orbsvcs/ETCL.mpc b/TAO/orbsvcs/orbsvcs/ETCL.mpc deleted file mode 100644 index 7e61929abf9..00000000000 --- a/TAO/orbsvcs/orbsvcs/ETCL.mpc +++ /dev/null @@ -1,33 +0,0 @@ -// -*- MPC -*- -// $Id$ - -project(ETCL) : orbsvcslib, orbsvcs_output, install { - sharedname = TAO_ETCL - dynamicflags = TAO_ETCL_BUILD_DLL - tagchecks += Notify - pch_header = - pch_source = - - IDL_Files { - } - - Source_Files { - ETCL - } - - Header_Files { - ETCL - } - - Inline_Files { - ETCL - } - - Template_Files { - ETCL - } - - Pkgconfig_Files { - TAO_ETCL.pc.in - } -} diff --git a/TAO/orbsvcs/orbsvcs/ETCL.rc b/TAO/orbsvcs/orbsvcs/ETCL.rc deleted file mode 100644 index 4a49921ad21..00000000000 --- a/TAO/orbsvcs/orbsvcs/ETCL.rc +++ /dev/null @@ -1,30 +0,0 @@ -#include "..\..\tao\Version.h" - -1 VERSIONINFO - FILEVERSION TAO_MAJOR_VERSION,TAO_MINOR_VERSION,TAO_BETA_VERSION,0 - PRODUCTVERSION TAO_MAJOR_VERSION,TAO_MINOR_VERSION,TAO_BETA_VERSION,0 - FILEFLAGSMASK 0x3fL - FILEFLAGS 0x0L - FILEOS 0x4L - FILETYPE 0x1L - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904B0" - BEGIN - VALUE "FileDescription", "ETCL\0" - VALUE "FileVersion", TAO_VERSION "\0" - VALUE "InternalName", "TAO_ETCLDLL\0" - VALUE "LegalCopyright", "\0" - VALUE "LegalTrademarks", "\0" - VALUE "OriginalFilename", "TAO_ETCL.DLL\0" - VALUE "ProductName", "ORBSVCS\0" - VALUE "ProductVersion", TAO_VERSION "\0" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1200 - END -END diff --git a/TAO/orbsvcs/orbsvcs/ETCL/ETCL.ll b/TAO/orbsvcs/orbsvcs/ETCL/ETCL.ll deleted file mode 100644 index bfbe15ddd2a..00000000000 --- a/TAO/orbsvcs/orbsvcs/ETCL/ETCL.ll +++ /dev/null @@ -1,161 +0,0 @@ -%option noyywrap - -%{ -// ETCL.ll,v 1.5 2005/11/16 07:53:24 ossama Exp -// ======================================================================== -// -// = LIBRARY -// orbsvcs/ECTL -// -// = FILENAME -// ETCL.ll -// -// = AUTHOR -// Carlos O'Ryan <coryan@uci.edu> based on previous work by -// Seth Widoff <sbw1@cs.wustl.edu> -// -// ======================================================================== - -#include "ace/OS.h" - -#include "ETCL_Constraint.h" -#include "ETCL_y.h" - -TAO_BEGIN_VERSIONED_NAMESPACE_DECL - -static const char * extract_string(char*); - -#define TAO_YY_LEX_DEBUG - -#ifdef TAO_CONSTRAINT_DEBUG -#define TAO_YY_LEX_DEBUG TAO_OS::fprintf(stderr, "%s\n", yytext) -#endif /* TAO_CONSTRAINT_DEBUG */ - -#define YY_DECL int TAO_ETCL_yylex (TAO_ETCL_YYSTYPE *lvalp, void* state) - -#define YY_BREAK -#define YY_NO_UNPUT - -%} - -white_space [ \t] -letter [a-zA-Z] -digit [0-9] -alpha_num ({letter}|{digit}) -integer {digit}+ -float ({digit}*\.{digit}+)([eE][-+]?{digit}+)? -string '(([^'\\]*)|([^'\\]*\\')|([^'\\]*\\\\))*' -base {letter}({alpha_num}|[_])* -ident {base}|\\{base} -newline \n - -%% - -min { TAO_YY_LEX_DEBUG; return TAO_ETCL_MIN; } -max { TAO_YY_LEX_DEBUG; return TAO_ETCL_MAX; } -first { TAO_YY_LEX_DEBUG; return TAO_ETCL_FIRST; } -random { TAO_YY_LEX_DEBUG; return TAO_ETCL_RANDOM; } -with { TAO_YY_LEX_DEBUG; return TAO_ETCL_WITH; } -exist { TAO_YY_LEX_DEBUG; return TAO_ETCL_EXIST; } -not { TAO_YY_LEX_DEBUG; return TAO_ETCL_NOT; } -and { TAO_YY_LEX_DEBUG; return TAO_ETCL_AND; } -or { TAO_YY_LEX_DEBUG; return TAO_ETCL_OR; } -in { TAO_YY_LEX_DEBUG; return TAO_ETCL_IN; } -"~" { TAO_YY_LEX_DEBUG; return TAO_ETCL_TWIDDLE; } -"+" { TAO_YY_LEX_DEBUG; return TAO_ETCL_PLUS; } -"-" { TAO_YY_LEX_DEBUG; return TAO_ETCL_MINUS; } -"*" { TAO_YY_LEX_DEBUG; return TAO_ETCL_MULT; } -"/" { TAO_YY_LEX_DEBUG; return TAO_ETCL_DIV; } -"<" { TAO_YY_LEX_DEBUG; return TAO_ETCL_LT; } -"<=" { TAO_YY_LEX_DEBUG; return TAO_ETCL_LE; } -">" { TAO_YY_LEX_DEBUG; return TAO_ETCL_GT; } -">=" { TAO_YY_LEX_DEBUG; return TAO_ETCL_GE; } -"==" { TAO_YY_LEX_DEBUG; return TAO_ETCL_EQ; } -"!=" { TAO_YY_LEX_DEBUG; return TAO_ETCL_NE; } -"(" { TAO_YY_LEX_DEBUG; return TAO_ETCL_LPAREN; } -")" { TAO_YY_LEX_DEBUG; return TAO_ETCL_RPAREN; } -"$" { TAO_YY_LEX_DEBUG; return TAO_ETCL_DOLLAR; } -"." { TAO_YY_LEX_DEBUG; return TAO_ETCL_DOT; } -"default" { TAO_YY_LEX_DEBUG; return TAO_ETCL_DEFAULT; } -"_d" { TAO_YY_LEX_DEBUG; return TAO_ETCL_DISCRIMINANT; } -"_type_id" { TAO_YY_LEX_DEBUG; return TAO_ETCL_TYPE_ID; } -"_repos_id" { TAO_YY_LEX_DEBUG; return TAO_ETCL_REPOS_ID; } -"_length" { TAO_YY_LEX_DEBUG; return TAO_ETCL_LENGTH; } -"[" { TAO_YY_LEX_DEBUG; return TAO_ETCL_LBRA; } -"]" { TAO_YY_LEX_DEBUG; return TAO_ETCL_RBRA; } -TRUE { - lvalp->constraint = - new TAO_ETCL_Literal_Constraint ((CORBA::Boolean) 1); - TAO_YY_LEX_DEBUG; return TAO_ETCL_BOOLEAN; - } -FALSE { - lvalp->constraint = - new TAO_ETCL_Literal_Constraint ((CORBA::Boolean) 0); - TAO_YY_LEX_DEBUG; return TAO_ETCL_BOOLEAN; - } -{integer} { - lvalp->constraint = - new TAO_ETCL_Literal_Constraint (ACE_OS::atoi (yytext)); - TAO_YY_LEX_DEBUG; return TAO_ETCL_INTEGER; - } -{float} { - double v; - sscanf (yytext, "%lf", &v); - lvalp->constraint = - new TAO_ETCL_Literal_Constraint (v); - TAO_YY_LEX_DEBUG; return TAO_ETCL_FLOAT; - } -{string} { - lvalp->constraint = - new TAO_ETCL_Literal_Constraint (extract_string (yytext)); - TAO_YY_LEX_DEBUG; return TAO_ETCL_STRING; - } -{ident} { - lvalp->constraint = - new TAO_ETCL_Identifier (yytext); - TAO_YY_LEX_DEBUG; return TAO_ETCL_IDENT; - } -{white_space} { - TAO_YY_LEX_DEBUG; break; // Ignore - } -. { - TAO_YY_LEX_DEBUG; break; // @@ TODO - } -%% - -const char* -extract_string(char* str) -{ - char *t = str; - for (char * i = str + 1; *i != '\''; ++i, ++t) - { - if (*i == '\\') - { - ++i; - if (*i == 0) - return 0; - else if (*i == 't') - *t = '\t'; - else if (*i == 'n') - *t = '\n'; - else if (*i == '\\') - *t = '\\'; - else - *t = *i; - continue; - } - - *t = *i; - } - - *t = '\0'; - return str; -} - -int -yywrap (void) -{ - return 1; -} - -TAO_END_VERSIONED_NAMESPACE_DECL
\ No newline at end of file diff --git a/TAO/orbsvcs/orbsvcs/ETCL/ETCL.rc b/TAO/orbsvcs/orbsvcs/ETCL/ETCL.rc deleted file mode 100644 index c84d11c35db..00000000000 --- a/TAO/orbsvcs/orbsvcs/ETCL/ETCL.rc +++ /dev/null @@ -1,30 +0,0 @@ -#include "..\..\..\tao\Version.h" - -1 VERSIONINFO - FILEVERSION TAO_MAJOR_VERSION,TAO_MINOR_VERSION,TAO_BETA_VERSION,0 - PRODUCTVERSION TAO_MAJOR_VERSION,TAO_MINOR_VERSION,TAO_BETA_VERSION,0 - FILEFLAGSMASK 0x3fL - FILEFLAGS 0x0L - FILEOS 0x4L - FILETYPE 0x1L - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904B0" - BEGIN - VALUE "FileDescription", "ETCL\0" - VALUE "FileVersion", TAO_VERSION "\0" - VALUE "InternalName", "TAO_ETCLDLL\0" - VALUE "LegalCopyright", "\0" - VALUE "LegalTrademarks", "\0" - VALUE "OriginalFilename", "TAO_ETCL.DLL\0" - VALUE "ProductName", "ORBSVCS\0" - VALUE "ProductVersion", TAO_VERSION "\0" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1200 - END -END diff --git a/TAO/orbsvcs/orbsvcs/ETCL/ETCL.yy b/TAO/orbsvcs/orbsvcs/ETCL/ETCL.yy deleted file mode 100644 index 14c9eaad182..00000000000 --- a/TAO/orbsvcs/orbsvcs/ETCL/ETCL.yy +++ /dev/null @@ -1,261 +0,0 @@ -%{ -// $Id$ -// ======================================================================== -// -// = LIBRARY -// orbsvcs / Extended Trader Constraint Language parser. -// -// = FILENAME -// ETCL.yy -// -// = AUTHOR -// Carlos O'Ryan <coryan@uci.edu> based on previous work by -// Seth Widoff <sbw1@cs.wustl.edu> -// -// ======================================================================== - -#include "ETCL_y.h" -#include "ETCL_Constraint.h" -#include "ETCL_Interpreter.h" - -TAO_BEGIN_VERSIONED_NAMESPACE_DECL - -extern int yylex (void); - -static void yyerror (const char *) -{ - // @@ TODO - // Ignore error messages -} - -%} - -%token TAO_ETCL_GT -%token TAO_ETCL_GE -%token TAO_ETCL_LT -%token TAO_ETCL_LE -%token TAO_ETCL_EQ -%token TAO_ETCL_NE -%token TAO_ETCL_EXIST -%token TAO_ETCL_DEFAULT -%token TAO_ETCL_AND -%token TAO_ETCL_OR -%token TAO_ETCL_NOT -%token TAO_ETCL_IN -%token TAO_ETCL_TWIDDLE -%token TAO_ETCL_BOOLEAN -%token TAO_ETCL_PLUS -%token TAO_ETCL_MINUS -%token TAO_ETCL_MULT -%token TAO_ETCL_DIV -%token TAO_ETCL_UMINUS -%token TAO_ETCL_INTEGER -%token TAO_ETCL_FLOAT -%token TAO_ETCL_STRING -%token TAO_ETCL_RPAREN -%token TAO_ETCL_LPAREN -%token TAO_ETCL_RBRA -%token TAO_ETCL_LBRA -%token TAO_ETCL_IDENT -%token TAO_ETCL_UNSIGNED -%token TAO_ETCL_SIGNED -%token TAO_ETCL_DOUBLE -%token TAO_ETCL_CONSTRAINT -%token TAO_ETCL_COMPONENT -%token TAO_ETCL_WITH -%token TAO_ETCL_MAX -%token TAO_ETCL_MIN -%token TAO_ETCL_FIRST -%token TAO_ETCL_RANDOM -%token TAO_ETCL_DOLLAR -%token TAO_ETCL_DOT -%token TAO_ETCL_DISCRIMINANT -%token TAO_ETCL_LENGTH -%token TAO_ETCL_TYPE_ID -%token TAO_ETCL_REPOS_ID - - -%type <constraint> TAO_ETCL_IDENT -%type <constraint> TAO_ETCL_BOOLEAN -%type <constraint> TAO_ETCL_STRING -%type <constraint> TAO_ETCL_FLOAT -%type <constraint> TAO_ETCL_INTEGER -%type <constraint> expr_in -%type <constraint> constraint preference bool_or bool_and bool_compare -%type <constraint> expr_in expr_twiddle expr term factor_not factor -%type <constraint> union_pos union_val component_array -%type <constraint> component_array component_assoc component_pos -%type <constraint> component_dot component_ext component - -%start constraint - -%% - -constraint: bool_or - | preference - ; - -preference: TAO_ETCL_MIN bool_or - { $$ = new TAO_ETCL_Preference (TAO_ETCL_MIN, $2); } - | TAO_ETCL_MAX bool_or - { $$ = new TAO_ETCL_Preference (TAO_ETCL_MAX, $2); } - | TAO_ETCL_WITH bool_or - { $$ = new TAO_ETCL_Preference (TAO_ETCL_WITH, $2); } - | TAO_ETCL_FIRST - { $$ = new TAO_ETCL_Preference (TAO_ETCL_FIRST); } - | TAO_ETCL_RANDOM - { $$ = new TAO_ETCL_Preference (TAO_ETCL_RANDOM); } - ; - -bool_or: bool_or TAO_ETCL_OR bool_and - { $$ = new TAO_ETCL_Binary_Expr (TAO_ETCL_OR, $1, $3); } - | bool_and - ; - -bool_and: bool_and TAO_ETCL_AND bool_compare - { $$ = new TAO_ETCL_Binary_Expr (TAO_ETCL_AND, $1, $3); } - | bool_compare - ; - -bool_compare: expr_in TAO_ETCL_EQ expr_in - { $$ = new TAO_ETCL_Binary_Expr (TAO_ETCL_EQ, $1, $3); } - | expr_in TAO_ETCL_NE expr_in - { $$ = new TAO_ETCL_Binary_Expr (TAO_ETCL_NE, $1, $3); } - | expr_in TAO_ETCL_GT expr_in - { $$ = new TAO_ETCL_Binary_Expr (TAO_ETCL_GT, $1, $3); } - | expr_in TAO_ETCL_GE expr_in - { $$ = new TAO_ETCL_Binary_Expr (TAO_ETCL_GE, $1, $3); } - | expr_in TAO_ETCL_LT expr_in - { $$ = new TAO_ETCL_Binary_Expr (TAO_ETCL_LT, $1, $3); } - | expr_in TAO_ETCL_LE expr_in - { $$ = new TAO_ETCL_Binary_Expr (TAO_ETCL_LE, $1, $3); } - | expr_in - ; - -expr_in: expr_twiddle TAO_ETCL_IN component - { $$ = new TAO_ETCL_Binary_Expr (TAO_ETCL_IN, $1, $3); } - | expr_twiddle TAO_ETCL_IN TAO_ETCL_DOLLAR component - { $$ = new TAO_ETCL_Binary_Expr (TAO_ETCL_IN, $1, $4); } - | expr_twiddle - ; - -expr_twiddle: expr TAO_ETCL_TWIDDLE expr - { $$ = new TAO_ETCL_Binary_Expr (TAO_ETCL_TWIDDLE, $1, $3); } - | expr - ; - -expr: expr TAO_ETCL_PLUS term - { $$ = new TAO_ETCL_Binary_Expr (TAO_ETCL_PLUS, $1, $3); } - | expr TAO_ETCL_MINUS term - { $$ = new TAO_ETCL_Binary_Expr (TAO_ETCL_MINUS, $1, $3); } - | term - ; - -term: term TAO_ETCL_MULT factor_not - { $$ = new TAO_ETCL_Binary_Expr (TAO_ETCL_MULT, $1, $3); } - | term TAO_ETCL_DIV factor_not - { $$ = new TAO_ETCL_Binary_Expr (TAO_ETCL_DIV, $1, $3); } - | factor_not - ; - -factor_not: TAO_ETCL_NOT factor - { $$ = new TAO_ETCL_Unary_Expr (TAO_ETCL_NOT, $2); } - | factor - ; - -factor: TAO_ETCL_LPAREN bool_or TAO_ETCL_RPAREN - { $$ = $2; } - | TAO_ETCL_INTEGER - { $$ = $1; } - | TAO_ETCL_PLUS TAO_ETCL_INTEGER - { $$ = new TAO_ETCL_Unary_Expr (TAO_ETCL_PLUS, $2); } - | TAO_ETCL_MINUS TAO_ETCL_INTEGER - { $$ = new TAO_ETCL_Unary_Expr (TAO_ETCL_MINUS, $2); } - | TAO_ETCL_FLOAT - { $$ = $1; } - | TAO_ETCL_PLUS TAO_ETCL_FLOAT - { $$ = new TAO_ETCL_Unary_Expr (TAO_ETCL_PLUS, $2); } - | TAO_ETCL_MINUS TAO_ETCL_FLOAT - { $$ = new TAO_ETCL_Unary_Expr (TAO_ETCL_MINUS, $2); } - | TAO_ETCL_STRING - { $$ = $1; } - | TAO_ETCL_BOOLEAN - { $$ = $1; } - | TAO_ETCL_EXIST TAO_ETCL_IDENT - { $$ = new TAO_ETCL_Exist ($2); } - | TAO_ETCL_EXIST TAO_ETCL_DOLLAR component - { $$ = new TAO_ETCL_Exist ($3); } - | TAO_ETCL_DEFAULT TAO_ETCL_DOLLAR component - { $$ = new TAO_ETCL_Default ($3); } - | TAO_ETCL_DOLLAR component - { $$ = new TAO_ETCL_Eval ($2); } - | TAO_ETCL_IDENT - { $$ = $1; } - ; - -component: /* empty */ - { $$ = 0; } - | TAO_ETCL_DOT component_dot - { $$ = new TAO_ETCL_Dot ($2); } - - | TAO_ETCL_IDENT component_ext - { $$ = new TAO_ETCL_Component ($1, $2); } - - | component_array - | component_assoc - ; - -component_ext: /* empty */ - { $$ = 0; } - | TAO_ETCL_DOT component_dot - { $$ = new TAO_ETCL_Dot ($2); } - - | component_array - | component_assoc - ; - -component_dot: TAO_ETCL_IDENT component_ext - { $$ = new TAO_ETCL_Component ($1, $2); } - | TAO_ETCL_LENGTH - { $$ = new TAO_ETCL_Special (TAO_ETCL_LENGTH); } - | TAO_ETCL_DISCRIMINANT - { $$ = new TAO_ETCL_Special (TAO_ETCL_DISCRIMINANT); } - | TAO_ETCL_TYPE_ID - { $$ = new TAO_ETCL_Special (TAO_ETCL_TYPE_ID); } - | TAO_ETCL_REPOS_ID - { $$ = new TAO_ETCL_Special (TAO_ETCL_REPOS_ID); } - | component_pos - | union_pos - ; - -component_array: TAO_ETCL_LBRA TAO_ETCL_INTEGER TAO_ETCL_RBRA component_ext - { $$ = new TAO_ETCL_Component_Array ($2, $4); } - ; - -component_assoc: TAO_ETCL_LPAREN TAO_ETCL_IDENT TAO_ETCL_RPAREN component_ext - { $$ = new TAO_ETCL_Component_Assoc ($2, $4); } - ; - -component_pos: TAO_ETCL_INTEGER component_ext - { $$ = new TAO_ETCL_Component_Pos ($1, $2); } - ; - -union_pos: TAO_ETCL_LPAREN union_val TAO_ETCL_RPAREN component_ext - { $$ = new TAO_ETCL_Union_Pos ($2, $4); } - ; - -union_val: /* empty */ - { $$ = 0; } - | TAO_ETCL_INTEGER - { $$ = new TAO_ETCL_Union_Value (+1, $1); } - | TAO_ETCL_PLUS TAO_ETCL_INTEGER - { $$ = new TAO_ETCL_Union_Value (+1, $2); } - | TAO_ETCL_MINUS TAO_ETCL_INTEGER - { $$ = new TAO_ETCL_Union_Value (-1, $2); } - | TAO_ETCL_STRING - { $$ = new TAO_ETCL_Union_Value ($1); } - ; - -%% - -TAO_END_VERSIONED_NAMESPACE_DECL diff --git a/TAO/orbsvcs/orbsvcs/ETCL/ETCL_Constraint.cpp b/TAO/orbsvcs/orbsvcs/ETCL/ETCL_Constraint.cpp deleted file mode 100644 index c0a29341e9a..00000000000 --- a/TAO/orbsvcs/orbsvcs/ETCL/ETCL_Constraint.cpp +++ /dev/null @@ -1,978 +0,0 @@ -// -*- C++ -*- -// $Id$ - -#include "orbsvcs/ETCL/ETCL_Constraint.h" -#include "orbsvcs/ETCL/ETCL_Constraint_Visitor.h" -#include "orbsvcs/ETCL/ETCL_y.h" - -#include "tao/AnyTypeCode/TypeCode.h" -#include "tao/AnyTypeCode/Any_Unknown_IDL_Type.h" -#include "tao/AnyTypeCode/Any.h" -#include "tao/CDR.h" -#include "tao/SystemException.h" - -#if ! defined (__ACE_INLINE__) -#include "orbsvcs/ETCL/ETCL_Constraint.inl" -#endif /* __ACE_INLINE__ */ - -ACE_RCSID (ETCL, - ETCL_Constraint, - "$Id$") - -TAO_BEGIN_VERSIONED_NAMESPACE_DECL - -TAO_ETCL_Constraint::TAO_ETCL_Constraint (void) -{ -} - -TAO_ETCL_Constraint::~TAO_ETCL_Constraint (void) -{ -} - -// **************************************************************** - -TAO_ETCL_Literal_Constraint::TAO_ETCL_Literal_Constraint ( - const TAO_ETCL_Literal_Constraint & lit - ) - : TAO_ETCL_Constraint () -{ - this->copy (lit); -} - - -TAO_ETCL_Literal_Constraint::TAO_ETCL_Literal_Constraint (CORBA::Any * any) -{ - CORBA::Any& any_ref = *any; - CORBA::TypeCode_var type = any_ref.type (); - CORBA::TCKind corba_type = CORBA::tk_null; - - try - { - corba_type = type->kind (); - } - catch (const CORBA::Exception&) - { - // @@ Seth: Don't know what else to do. Make sure we can tell - // when this constructor fails. - return; - } - - this->type_ = - TAO_ETCL_Literal_Constraint::comparable_type (type.in ()); - - switch (this->type_) - { - case TAO_ETCL_SIGNED: - this->op_.integer_ = 0; - - if (corba_type == CORBA::tk_short) - { - CORBA::Short sh; - any_ref >>= sh; - this->op_.integer_ = (CORBA::Long) sh; - } - else - { - any_ref >>= this->op_.integer_; - } - - break; - case TAO_ETCL_UNSIGNED: - this->op_.uinteger_ = 0; - - if (corba_type == CORBA::tk_ushort) - { - CORBA::UShort sh; - any_ref >>= sh; - this->op_.uinteger_ = (CORBA::ULong) sh; - } - else if (corba_type == CORBA::tk_enum) - { - TAO::Any_Impl *impl = any->impl (); - - if (impl->encoded ()) - { - TAO::Unknown_IDL_Type *unk = - dynamic_cast<TAO::Unknown_IDL_Type *> (impl); - - if (!unk) - throw CORBA::INTERNAL (); - - // We don't want unk's rd_ptr to move, in case we are shared by - // another Any, so we use this to copy the state, not the buffer. - TAO_InputCDR for_reading (unk->_tao_get_cdr ()); - for_reading.read_ulong (this->op_.uinteger_); - } - else - { - TAO_OutputCDR out; - impl->marshal_value (out); - TAO_InputCDR in (out); - in.read_ulong (this->op_.uinteger_); - } - } - else - { - any_ref >>= this->op_.uinteger_; - } - - break; - case TAO_ETCL_DOUBLE: - if (corba_type == CORBA::tk_float) - { - CORBA::Float fl; - (*any) >>= fl; - this->op_.double_ = (CORBA::Double) fl; - } - else - { - (*any) >>= this->op_.double_; - } - - break; - case TAO_ETCL_BOOLEAN: - { - CORBA::Any::to_boolean tmp (this->op_.bool_); - (*any) >>= tmp; - } - break; - case TAO_ETCL_STRING: - { - const char* s; - any_ref >>= s; - this->op_.str_ = CORBA::string_dup (s); - } - break; - case TAO_ETCL_COMPONENT: - this->op_.any_ = any->impl (); - this->op_.any_->_add_ref (); - break; - } -} - -TAO_ETCL_Literal_Constraint::TAO_ETCL_Literal_Constraint ( - CORBA::ULong uinteger - ) - : type_ (TAO_ETCL_UNSIGNED) -{ - this->op_.uinteger_ = uinteger; -} - -TAO_ETCL_Literal_Constraint::TAO_ETCL_Literal_Constraint ( - CORBA::Long integer - ) - : type_ (TAO_ETCL_SIGNED) -{ - this->op_.integer_ = integer; -} - -TAO_ETCL_Literal_Constraint::TAO_ETCL_Literal_Constraint ( - CORBA::Boolean boolean - ) - : type_ (TAO_ETCL_BOOLEAN) -{ - this->op_.bool_ = boolean; -} - -TAO_ETCL_Literal_Constraint::TAO_ETCL_Literal_Constraint ( - CORBA::Double doub - ) - : type_ (TAO_ETCL_DOUBLE) -{ - this->op_.double_ = doub; -} - -TAO_ETCL_Literal_Constraint::TAO_ETCL_Literal_Constraint ( - const char* str - ) - : type_ (TAO_ETCL_STRING) -{ - this->op_.str_ = CORBA::string_dup (str); -} - -TAO_ETCL_Literal_Constraint::~TAO_ETCL_Literal_Constraint (void) -{ - if (this->type_ == TAO_ETCL_STRING) - { - CORBA::string_free (this->op_.str_); - } -} - -int -TAO_ETCL_Literal_Constraint::accept (TAO_ETCL_Constraint_Visitor* visitor) -{ - return visitor->visit_literal (this); -} - -TAO_Literal_Type -TAO_ETCL_Literal_Constraint::expr_type (void) const -{ - return this->type_; -} - -void -TAO_ETCL_Literal_Constraint::operator= (const TAO_ETCL_Literal_Constraint& co) -{ - this->copy (co); -} - -TAO_ETCL_Literal_Constraint::operator CORBA::Boolean (void) const -{ - return (this->type_ == TAO_ETCL_BOOLEAN) ? this->op_.bool_ : 0; -} - -TAO_ETCL_Literal_Constraint::operator CORBA::ULong (void) const -{ - switch (this->type_) - { - case TAO_ETCL_UNSIGNED: - return this->op_.uinteger_; - case TAO_ETCL_SIGNED: - case TAO_ETCL_INTEGER: - return - (this->op_.integer_ > 0) ? (CORBA::ULong) this->op_.integer_ : 0; - case TAO_ETCL_DOUBLE: - return - (this->op_.double_ > 0) ? - ((this->op_.double_ > ACE_UINT32_MAX) ? - ACE_UINT32_MAX : - (CORBA::ULong) this->op_.double_) - : 0; - case TAO_ETCL_COMPONENT: - { - CORBA::ULong retval = 0; - CORBA::Any tmp; - tmp.replace(this->op_.any_); - this->op_.any_->_add_ref (); - tmp >>= retval; - return retval; - } - default: - return 0; - } -} - -TAO_ETCL_Literal_Constraint::operator CORBA::Long (void) const -{ - switch (this->type_) - { - case TAO_ETCL_SIGNED: - case TAO_ETCL_INTEGER: - return this->op_.integer_; - case TAO_ETCL_UNSIGNED: - return - (this->op_.uinteger_ > (CORBA::ULong) ACE_INT32_MAX) ? - ACE_INT32_MAX : (CORBA::Long) this->op_.uinteger_; - case TAO_ETCL_DOUBLE: - return - (this->op_.double_ > 0) ? - ((this->op_.double_ > ACE_INT32_MAX) ? - ACE_INT32_MAX : - (CORBA::Long) this->op_.double_) : - ((this->op_.double_ < ACE_INT32_MIN) ? - ACE_INT32_MIN : - (CORBA::Long) this->op_.double_); - case TAO_ETCL_COMPONENT: - { - CORBA::Long retval = 0; - - CORBA::Any tmp; - tmp.replace(this->op_.any_); - this->op_.any_->_add_ref (); - tmp >>= retval; - - return retval; - } - default: - return 0; - } -} - -TAO_ETCL_Literal_Constraint::operator CORBA::Double (void) const -{ - switch (this->type_) - { - case TAO_ETCL_DOUBLE: - return this->op_.double_; - case TAO_ETCL_SIGNED: - case TAO_ETCL_INTEGER: - return (CORBA::Double) this->op_.integer_; - case TAO_ETCL_UNSIGNED: - return (CORBA::Double) this->op_.uinteger_; - case TAO_ETCL_COMPONENT: - { - CORBA::Double retval = 0.0; - - CORBA::Any tmp; - tmp.replace(this->op_.any_); - this->op_.any_->_add_ref (); - tmp >>= retval; - - return retval; - } - default: - return 0.0; - } -} - -TAO_ETCL_Literal_Constraint::operator const char* (void) const -{ - switch (this->type_) - { - case TAO_ETCL_STRING: - return this->op_.str_; - case TAO_ETCL_COMPONENT: - { - const char *retval = 0; - - CORBA::Any tmp; - tmp.replace(this->op_.any_); - this->op_.any_->_add_ref (); - tmp >>= retval; - - return retval; - } - default: - return 0; - } -} - -TAO_ETCL_Literal_Constraint::operator TAO::Any_Impl* (void) const -{ - return (this->type_ == TAO_ETCL_COMPONENT) ? this->op_.any_ : 0; -} - -TAO_Literal_Type -TAO_ETCL_Literal_Constraint::comparable_type (CORBA::TypeCode_ptr type) -{ - // Convert a CORBA::TCKind into a TAO_Literal_Type - TAO_Literal_Type return_value = TAO_UNKNOWN; - CORBA::TCKind kind = CORBA::tk_null; - - try - { - kind = type->kind (); - - CORBA::TypeCode_var tmp = CORBA::TypeCode::_duplicate (type); - - while (kind == CORBA::tk_alias) - { - tmp = tmp->content_type (); - - kind = tmp->kind (); - } - } - catch (const CORBA::Exception&) - { - return return_value; - } - // Since this is a "top level try block, no need to check again. - - switch (kind) - { - case CORBA::tk_ushort: - case CORBA::tk_ulong: - case CORBA::tk_enum: - case CORBA::tk_ulonglong: - return_value = TAO_ETCL_UNSIGNED; - break; - case CORBA::tk_short: - case CORBA::tk_long: - case CORBA::tk_longlong: - return_value = TAO_ETCL_SIGNED; - break; - case CORBA::tk_boolean: - return_value = TAO_ETCL_BOOLEAN; - break; - case CORBA::tk_float: - case CORBA::tk_double: - return_value = TAO_ETCL_DOUBLE; - break; - case CORBA::tk_string: - return_value = TAO_ETCL_STRING; - break; - default: - return_value = TAO_ETCL_COMPONENT; - break; - } - - return return_value; -} - -bool -TAO_ETCL_Literal_Constraint::operator== (const TAO_ETCL_Literal_Constraint & rhs) -{ - bool return_value = false; - TAO_Literal_Type widest_type = this->widest_type (rhs); - - switch (widest_type) - { - case TAO_ETCL_STRING: - return_value = (ACE_OS::strcmp ((const char*) *this, (const char*) rhs) == 0); - break; - case TAO_ETCL_DOUBLE: - return_value = (CORBA::Double) *this == (CORBA::Double) rhs; - break; - case TAO_ETCL_INTEGER: - case TAO_ETCL_SIGNED: - return_value = (CORBA::Long) *this == (CORBA::Long) rhs; - break; - case TAO_ETCL_UNSIGNED: - return_value = (CORBA::ULong) *this == (CORBA::ULong) rhs; - break; - case TAO_ETCL_BOOLEAN: - return_value = (CORBA::Boolean) *this == (CORBA::Boolean) rhs; - break; - default: - break; - } - - return return_value; -} - - -bool -TAO_ETCL_Literal_Constraint::operator!= (const TAO_ETCL_Literal_Constraint & rhs) -{ - bool return_value = false; - TAO_Literal_Type widest_type = this->widest_type (rhs); - - switch (widest_type) - { - case TAO_ETCL_STRING: - return_value = (ACE_OS::strcmp ((const char*) *this, (const char*) rhs) != 0); - break; - case TAO_ETCL_DOUBLE: - return_value = (CORBA::Double) *this != (CORBA::Double) rhs; - break; - case TAO_ETCL_INTEGER: - case TAO_ETCL_SIGNED: - return_value = (CORBA::Long) *this != (CORBA::Long) rhs; - break; - case TAO_ETCL_UNSIGNED: - return_value = (CORBA::ULong) *this != (CORBA::ULong) rhs; - break; - case TAO_ETCL_BOOLEAN: - return_value = (CORBA::Boolean) *this != (CORBA::Boolean) rhs; - break; - default: - break; - } - - return return_value; -} - -bool -TAO_ETCL_Literal_Constraint::operator< (const TAO_ETCL_Literal_Constraint & rhs) -{ - bool return_value = false; - TAO_Literal_Type widest_type = this->widest_type (rhs); - - switch (widest_type) - { - case TAO_ETCL_STRING: - return_value = (ACE_OS::strcmp ((const char*) *this, (const char*) rhs) < 0); - break; - case TAO_ETCL_DOUBLE: - return_value = (CORBA::Double) *this < (CORBA::Double) rhs; - break; - case TAO_ETCL_INTEGER: - case TAO_ETCL_SIGNED: - return_value = (CORBA::Long) *this < (CORBA::Long) rhs; - break; - case TAO_ETCL_UNSIGNED: - return_value = (CORBA::ULong) *this < (CORBA::ULong) rhs; - break; - case TAO_ETCL_BOOLEAN: - return_value = (CORBA::Boolean) *this < (CORBA::Boolean) rhs; - break; - default: - break; - } - - return return_value; -} - -bool -TAO_ETCL_Literal_Constraint::operator<= (const TAO_ETCL_Literal_Constraint & rhs) -{ - bool return_value = false; - TAO_Literal_Type widest_type = this->widest_type (rhs); - - switch (widest_type) - { - case TAO_ETCL_STRING: - return_value = (ACE_OS::strcmp ((const char*) *this, (const char*) rhs) <= 0); - break; - case TAO_ETCL_DOUBLE: - return_value = (CORBA::Double) *this <= (CORBA::Double) rhs; - break; - case TAO_ETCL_INTEGER: - case TAO_ETCL_SIGNED: - return_value = (CORBA::Long) *this <= (CORBA::Long) rhs; - break; - case TAO_ETCL_UNSIGNED: - return_value = (CORBA::ULong) *this <= (CORBA::ULong) rhs; - break; - default: - break; - } - - return return_value; -} - -bool -TAO_ETCL_Literal_Constraint::operator> (const TAO_ETCL_Literal_Constraint & rhs) -{ - bool return_value = false; - TAO_Literal_Type widest_type = this->widest_type (rhs); - - switch (widest_type) - { - case TAO_ETCL_STRING: - return_value = (ACE_OS::strcmp ((const char*) *this, (const char*) rhs) > 0); - break; - case TAO_ETCL_DOUBLE: - return_value = (CORBA::Double) *this > (CORBA::Double) rhs; - break; - case TAO_ETCL_INTEGER: - case TAO_ETCL_SIGNED: - return_value = (CORBA::Long) *this > (CORBA::Long) rhs; - break; - case TAO_ETCL_UNSIGNED: - return_value = (CORBA::ULong) *this > (CORBA::ULong) rhs; - break; - default: - break; - } - - return return_value; -} - -bool -TAO_ETCL_Literal_Constraint::operator>= (const TAO_ETCL_Literal_Constraint & rhs) -{ - bool return_value = false; - TAO_Literal_Type widest_type = this->widest_type (rhs); - - switch (widest_type) - { - case TAO_ETCL_STRING: - return_value = - (ACE_OS::strcmp ((const char*) *this, (const char*) rhs) >= 0); - break; - case TAO_ETCL_DOUBLE: - return_value = (CORBA::Double) *this >= (CORBA::Double) rhs; - break; - case TAO_ETCL_INTEGER: - case TAO_ETCL_SIGNED: - return_value = (CORBA::Long) *this >= (CORBA::Long) rhs; - break; - case TAO_ETCL_UNSIGNED: - return_value = (CORBA::ULong) *this >= (CORBA::ULong) rhs; - break; - default: - break; - } - - return return_value; -} - -TAO_ETCL_Literal_Constraint -TAO_ETCL_Literal_Constraint::operator+ (const TAO_ETCL_Literal_Constraint & rhs) -{ - TAO_Literal_Type widest_type = this->widest_type (rhs); - - switch (widest_type) - { - case TAO_ETCL_DOUBLE: - { - CORBA::Double result = (CORBA::Double) *this + (CORBA::Double) rhs; - return TAO_ETCL_Literal_Constraint ((CORBA::Double) result); - } - case TAO_ETCL_INTEGER: - case TAO_ETCL_SIGNED: - { - CORBA::Long result = (CORBA::Long) *this + (CORBA::Long) rhs; - return TAO_ETCL_Literal_Constraint ((CORBA::Long) result); - } - case TAO_ETCL_UNSIGNED: - { - CORBA::ULong result = (CORBA::ULong) *this + (CORBA::ULong) rhs; - return TAO_ETCL_Literal_Constraint ((CORBA::ULong) result); - } - default: - return TAO_ETCL_Literal_Constraint ((CORBA::Long) 0); - } -} - -TAO_ETCL_Literal_Constraint -TAO_ETCL_Literal_Constraint::operator- (const TAO_ETCL_Literal_Constraint & rhs) -{ - TAO_Literal_Type widest_type = this->widest_type (rhs); - - switch (widest_type) - { - case TAO_ETCL_DOUBLE: - { - CORBA::Double result = (CORBA::Double) *this - (CORBA::Double) rhs; - return TAO_ETCL_Literal_Constraint ((CORBA::Double) result); - } - case TAO_ETCL_INTEGER: - case TAO_ETCL_SIGNED: - { - CORBA::Long result = (CORBA::Long) *this - (CORBA::Long) rhs; - return TAO_ETCL_Literal_Constraint ((CORBA::Long) result); - } - case TAO_ETCL_UNSIGNED: - { - CORBA::ULong result = (CORBA::ULong) *this - (CORBA::ULong) rhs; - return TAO_ETCL_Literal_Constraint ((CORBA::ULong) result); - } - default: - return TAO_ETCL_Literal_Constraint ((CORBA::Long) 0); - } -} - -TAO_ETCL_Literal_Constraint -TAO_ETCL_Literal_Constraint::operator* (const TAO_ETCL_Literal_Constraint & rhs) -{ - TAO_Literal_Type widest_type = this->widest_type (rhs); - - switch (widest_type) - { - case TAO_ETCL_DOUBLE: - { - CORBA::Double result = (CORBA::Double) *this * (CORBA::Double) rhs; - return TAO_ETCL_Literal_Constraint ((CORBA::Double) result); - } - case TAO_ETCL_INTEGER: - case TAO_ETCL_SIGNED: - { - CORBA::Long result = (CORBA::Long) *this * (CORBA::Long) rhs; - return TAO_ETCL_Literal_Constraint ((CORBA::Long) result); - } - case TAO_ETCL_UNSIGNED: - { - CORBA::ULong result = (CORBA::ULong) *this * (CORBA::ULong) rhs; - return TAO_ETCL_Literal_Constraint ((CORBA::ULong) result); - } - default: - return TAO_ETCL_Literal_Constraint ((CORBA::Long) 0); - } -} - -TAO_ETCL_Literal_Constraint -TAO_ETCL_Literal_Constraint::operator/ (const TAO_ETCL_Literal_Constraint & rhs) -{ - TAO_Literal_Type widest_type = this->widest_type (rhs); - - switch (widest_type) - { - case TAO_ETCL_DOUBLE: - { - CORBA::Double result = (CORBA::Double) *this / (CORBA::Double) rhs; - return TAO_ETCL_Literal_Constraint ((CORBA::Double) result); - } - case TAO_ETCL_INTEGER: - case TAO_ETCL_SIGNED: - { - CORBA::Long result = (CORBA::Long) *this / (CORBA::Long) rhs; - return TAO_ETCL_Literal_Constraint ((CORBA::Long) result); - } - case TAO_ETCL_UNSIGNED: - { - CORBA::ULong result = (CORBA::ULong) *this / (CORBA::ULong) rhs; - return TAO_ETCL_Literal_Constraint ((CORBA::ULong) result); - } - default: - return TAO_ETCL_Literal_Constraint ((CORBA::Long) 0); - } -} - -TAO_ETCL_Literal_Constraint -TAO_ETCL_Literal_Constraint::operator- (void) -{ - switch (this->type_) - { - case TAO_ETCL_DOUBLE: - return TAO_ETCL_Literal_Constraint (- this->op_.double_); - case TAO_ETCL_INTEGER: - case TAO_ETCL_SIGNED: - return TAO_ETCL_Literal_Constraint (- this->op_.integer_); - case TAO_ETCL_UNSIGNED: - return TAO_ETCL_Literal_Constraint (- (CORBA::Long) this->op_.uinteger_); - default: - return TAO_ETCL_Literal_Constraint ((CORBA::Long) 0); - } -} - -TAO_Literal_Type -TAO_ETCL_Literal_Constraint::widest_type ( - const TAO_ETCL_Literal_Constraint & rhs - ) -{ - TAO_Literal_Type rhs_type = rhs.expr_type (); - TAO_Literal_Type return_value = rhs_type; - - if (rhs_type == TAO_ETCL_COMPONENT) - { - CORBA::TypeCode_var tc = rhs.op_.any_->type (); - rhs_type = this->comparable_type (tc.in ()); - } - else if (rhs_type != this->type_) - { - if (rhs_type > this->type_) - { - return_value = rhs_type; - } - else - { - return_value = this->type_; - } - } - - return return_value; -} - -void -TAO_ETCL_Literal_Constraint::copy (const TAO_ETCL_Literal_Constraint &lit) -{ - // save the older type_ before assignment. - unsigned short prev_type = this->type_; - - this->type_ = lit.type_; - - switch (this->type_) - { - case TAO_ETCL_STRING: - this->op_.str_ = CORBA::string_dup (lit.op_.str_); - break; - case TAO_ETCL_DOUBLE: - this->op_.double_ = lit.op_.double_; - break; - case TAO_ETCL_UNSIGNED: - this->op_.uinteger_ = lit.op_.uinteger_; - break; - case TAO_ETCL_INTEGER: - case TAO_ETCL_SIGNED: - this->op_.integer_ = lit.op_.integer_; - break; - case TAO_ETCL_BOOLEAN: - this->op_.bool_ = lit.op_.bool_; - break; - case TAO_ETCL_COMPONENT: - if(prev_type == TAO_ETCL_COMPONENT && this->op_.any_ != 0) - this->op_.any_->_remove_ref (); - this->op_.any_ = lit.op_.any_; - this->op_.any_->_add_ref (); - break; - default: - this->type_ = TAO_UNKNOWN; - break; - } -} - -// **************************************************************** - -int -TAO_ETCL_Identifier::accept (TAO_ETCL_Constraint_Visitor *visitor) -{ - return visitor->visit_identifier (this); -} - -// **************************************************************** - -TAO_ETCL_Union_Value::~TAO_ETCL_Union_Value (void) -{ - delete this->string_; - delete this->integer_; -} - -int -TAO_ETCL_Union_Value::accept (TAO_ETCL_Constraint_Visitor *visitor) -{ - return visitor->visit_union_value (this); -} - -// **************************************************************** - -TAO_ETCL_Union_Pos::~TAO_ETCL_Union_Pos (void) -{ - delete this->component_; - delete this->union_value_; -} - -int -TAO_ETCL_Union_Pos::accept (TAO_ETCL_Constraint_Visitor *visitor) -{ - return visitor->visit_union_pos (this); -} - -// **************************************************************** - -TAO_ETCL_Component_Pos::~TAO_ETCL_Component_Pos (void) -{ - delete this->component_; - delete this->integer_; -} - -int -TAO_ETCL_Component_Pos::accept (TAO_ETCL_Constraint_Visitor *visitor) -{ - return visitor->visit_component_pos (this); -} - -// **************************************************************** - -TAO_ETCL_Component_Assoc::~TAO_ETCL_Component_Assoc (void) -{ - delete this->component_; - delete this->identifier_; -} - -int -TAO_ETCL_Component_Assoc::accept (TAO_ETCL_Constraint_Visitor *visitor) -{ - return visitor->visit_component_assoc (this); -} - -// **************************************************************** - -TAO_ETCL_Component_Array::~TAO_ETCL_Component_Array (void) -{ - delete this->component_; - delete this->integer_; -} - -int -TAO_ETCL_Component_Array::accept (TAO_ETCL_Constraint_Visitor *visitor) -{ - return visitor->visit_component_array (this); -} - -// **************************************************************** - -TAO_ETCL_Special::~TAO_ETCL_Special (void) -{ -} - -int -TAO_ETCL_Special::accept (TAO_ETCL_Constraint_Visitor *visitor) -{ - return visitor->visit_special (this); -} - -// **************************************************************** - -TAO_ETCL_Component::~TAO_ETCL_Component (void) -{ - delete this->component_; - delete this->identifier_; -} - -int -TAO_ETCL_Component::accept (TAO_ETCL_Constraint_Visitor *visitor) -{ - return visitor->visit_component (this); -} - -// **************************************************************** - -TAO_ETCL_Dot::~TAO_ETCL_Dot (void) -{ - delete this->component_; -} - -int -TAO_ETCL_Dot::accept (TAO_ETCL_Constraint_Visitor *visitor) -{ - return visitor->visit_dot (this); -} - -// **************************************************************** - -TAO_ETCL_Eval::~TAO_ETCL_Eval (void) -{ - delete this->component_; -} - -int -TAO_ETCL_Eval::accept (TAO_ETCL_Constraint_Visitor *visitor) -{ - return visitor->visit_eval (this); -} - -// **************************************************************** - -TAO_ETCL_Default::~TAO_ETCL_Default (void) -{ - delete this->component_; -} - -int -TAO_ETCL_Default::accept (TAO_ETCL_Constraint_Visitor *visitor) -{ - return visitor->visit_default (this); -} - -// **************************************************************** - -TAO_ETCL_Exist::~TAO_ETCL_Exist (void) -{ - delete this->component_; -} - -int -TAO_ETCL_Exist::accept (TAO_ETCL_Constraint_Visitor *visitor) -{ - return visitor->visit_exist (this); -} - -// **************************************************************** - -TAO_ETCL_Unary_Expr::~TAO_ETCL_Unary_Expr (void) -{ - delete this->subexpr_; -} - -int -TAO_ETCL_Unary_Expr::accept (TAO_ETCL_Constraint_Visitor *visitor) -{ - return visitor->visit_unary_expr (this); -} - -// **************************************************************** - -TAO_ETCL_Binary_Expr::~TAO_ETCL_Binary_Expr (void) -{ - delete this->lhs_; - delete this->rhs_; -} - -int -TAO_ETCL_Binary_Expr::accept (TAO_ETCL_Constraint_Visitor *visitor) -{ - return visitor->visit_binary_expr (this); -} - -// **************************************************************** - -TAO_ETCL_Preference::~TAO_ETCL_Preference (void) -{ - delete this->subexpr_; -} - -int -TAO_ETCL_Preference::accept (TAO_ETCL_Constraint_Visitor *visitor) -{ - return visitor->visit_preference (this); -} - -// **************************************************************** - -TAO_ETCL_Constraint_Visitor::~TAO_ETCL_Constraint_Visitor (void) -{ -} - -TAO_END_VERSIONED_NAMESPACE_DECL diff --git a/TAO/orbsvcs/orbsvcs/ETCL/ETCL_Constraint.h b/TAO/orbsvcs/orbsvcs/ETCL/ETCL_Constraint.h deleted file mode 100644 index 7544638d40e..00000000000 --- a/TAO/orbsvcs/orbsvcs/ETCL/ETCL_Constraint.h +++ /dev/null @@ -1,427 +0,0 @@ -// -*- C++ -*- - -//============================================================================= -/** - * @file ETCL_Constraint.h - * - * $Id$ - * - * @author Carlos O'Ryan (coryan@cs.wustl.edu) - * @author Jeff Parsons (parsons@cs.wustl.edu) - */ -//============================================================================= - - -#ifndef TAO_ETCL_CONSTRAINT_H -#define TAO_ETCL_CONSTRAINT_H - -#include "orbsvcs/ETCL/etcl_export.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "ace/SString.h" - -#include "tao/Basic_Types.h" -#include "tao/AnyTypeCode/Any_Impl.h" - -TAO_BEGIN_VERSIONED_NAMESPACE_DECL - -typedef unsigned short TAO_Literal_Type; -#define TAO_UNKNOWN 999 - -class TAO_ETCL_Constraint_Visitor; - -namespace CORBA -{ - class Any; - typedef Any *Any_ptr; -} - -class TAO_ETCL_Export TAO_ETCL_Constraint -{ -public: - /// Constructor and destructor - TAO_ETCL_Constraint (void); - virtual ~TAO_ETCL_Constraint (void); - - virtual int accept (TAO_ETCL_Constraint_Visitor *visitor) = 0; -}; - -// **************************************************************** - -class TAO_ETCL_Export TAO_ETCL_Literal_Constraint - : public TAO_ETCL_Constraint -{ -public: - TAO_ETCL_Literal_Constraint (void); - - // = Constructors for each of the various types of literals. - - explicit TAO_ETCL_Literal_Constraint (CORBA::Any* any); - explicit TAO_ETCL_Literal_Constraint (CORBA::ULong uinteger); - explicit TAO_ETCL_Literal_Constraint (CORBA::Long integer); - explicit TAO_ETCL_Literal_Constraint (CORBA::Boolean boolean); - explicit TAO_ETCL_Literal_Constraint (CORBA::Double doub); - explicit TAO_ETCL_Literal_Constraint (const char* str); - - /// Copy constructor - TAO_ETCL_Literal_Constraint (const TAO_ETCL_Literal_Constraint& lit); - - /// Destructor. - ~TAO_ETCL_Literal_Constraint(void); - - /// Visitor accept method. - int accept (TAO_ETCL_Constraint_Visitor* visitor); - - TAO_Literal_Type expr_type (void) const; - - /// Assignment operator. - void operator= (const TAO_ETCL_Literal_Constraint& co); - - // Conversion routines. - operator CORBA::Boolean (void) const; - operator CORBA::ULong (void) const; - operator CORBA::Long (void) const; - operator CORBA::Double (void) const; - operator const char* (void) const; - operator TAO::Any_Impl* (void) const; - - // Return the type represented by this MysteryOperand. - - // = Boolean operators. - - bool - operator< (const TAO_ETCL_Literal_Constraint& rhs); - - bool - operator<= (const TAO_ETCL_Literal_Constraint& rhs); - - bool - operator> (const TAO_ETCL_Literal_Constraint& rhs); - - bool - operator>= (const TAO_ETCL_Literal_Constraint& rhs); - - bool - operator== (const TAO_ETCL_Literal_Constraint& rhs); - - bool - operator!= (const TAO_ETCL_Literal_Constraint& rhs); - - // = Arithmetic operators. - - TAO_ETCL_Literal_Constraint - operator+ (const TAO_ETCL_Literal_Constraint& rhs); - - TAO_ETCL_Literal_Constraint - operator- (const TAO_ETCL_Literal_Constraint& rhs); - - TAO_ETCL_Literal_Constraint - operator* (const TAO_ETCL_Literal_Constraint& rhs); - - TAO_ETCL_Literal_Constraint - operator/ (const TAO_ETCL_Literal_Constraint& rhs); - - // Unary minus. - TAO_ETCL_Literal_Constraint - operator- (void); - - /// Ensure both operands are of the same simple numeric type. - TAO_Literal_Type - widest_type (const TAO_ETCL_Literal_Constraint& rhs); - - /// Determine the comparable Expression Type from the CORBA type - static TAO_Literal_Type - comparable_type (CORBA::TypeCode_ptr type); - -private: - /// Private copy method. - void copy (const TAO_ETCL_Literal_Constraint& co); - - /// Union of the possible literal types. - union - { - char* str_; - TAO::Any_Impl* any_; - CORBA::ULong uinteger_; - CORBA::Long integer_; - CORBA::Boolean bool_; - CORBA::Double double_; - } op_; - - /// The actual types of the TAO_ETCL_Literal_Constraint. - unsigned short type_; -}; - -// **************************************************************** - -class TAO_ETCL_Export TAO_ETCL_Identifier : public TAO_ETCL_Constraint -{ -public: - TAO_ETCL_Identifier (const char *value); - - /// Get the value - const char *value (void) const; - - // = The Constraint methods. - int accept (TAO_ETCL_Constraint_Visitor *visitor); - -private: - /// The value - ACE_CString string_; -}; - -// **************************************************************** - -class TAO_ETCL_Export TAO_ETCL_Union_Value : public TAO_ETCL_Constraint -{ -public: - TAO_ETCL_Union_Value (int sign, - TAO_ETCL_Constraint *integer); - TAO_ETCL_Union_Value (TAO_ETCL_Constraint *string); - virtual ~TAO_ETCL_Union_Value (void); - - int sign (void) const; - TAO_ETCL_Literal_Constraint *integer (void) const; - TAO_ETCL_Literal_Constraint *string (void) const; - - // = The Constraint methods. - int accept (TAO_ETCL_Constraint_Visitor *visitor); - -private: - int sign_; - TAO_ETCL_Literal_Constraint *integer_; - TAO_ETCL_Literal_Constraint *string_; -}; - -class TAO_ETCL_Export TAO_ETCL_Union_Pos : public TAO_ETCL_Constraint -{ -public: - TAO_ETCL_Union_Pos (TAO_ETCL_Constraint *union_value, - TAO_ETCL_Constraint *component); - virtual ~TAO_ETCL_Union_Pos (void); - - TAO_ETCL_Union_Value *union_value (void) const; - TAO_ETCL_Constraint *component (void) const; - - // = The Constraint methods. - int accept (TAO_ETCL_Constraint_Visitor *visitor); - -private: - TAO_ETCL_Union_Value *union_value_; - TAO_ETCL_Constraint *component_; -}; - -class TAO_ETCL_Export TAO_ETCL_Component_Pos : public TAO_ETCL_Constraint -{ -public: - TAO_ETCL_Component_Pos (TAO_ETCL_Constraint *integer, - TAO_ETCL_Constraint *component); - virtual ~TAO_ETCL_Component_Pos (void); - - TAO_ETCL_Literal_Constraint *integer (void) const; - TAO_ETCL_Constraint *component (void) const; - - // = The Constraint methods. - int accept (TAO_ETCL_Constraint_Visitor *visitor); - -private: - TAO_ETCL_Literal_Constraint *integer_; - TAO_ETCL_Constraint *component_; -}; - -class TAO_ETCL_Export TAO_ETCL_Component_Assoc : public TAO_ETCL_Constraint -{ -public: - TAO_ETCL_Component_Assoc (TAO_ETCL_Constraint *identifier, - TAO_ETCL_Constraint *component); - virtual ~TAO_ETCL_Component_Assoc (void); - - TAO_ETCL_Identifier *identifier (void) const; - TAO_ETCL_Constraint *component (void) const; - - // = The Constraint methods. - int accept (TAO_ETCL_Constraint_Visitor *visitor); - -private: - TAO_ETCL_Identifier *identifier_; - TAO_ETCL_Constraint *component_; -}; - -class TAO_ETCL_Export TAO_ETCL_Component_Array : public TAO_ETCL_Constraint -{ -public: - TAO_ETCL_Component_Array (TAO_ETCL_Constraint *integer, - TAO_ETCL_Constraint *component); - virtual ~TAO_ETCL_Component_Array (void); - - TAO_ETCL_Literal_Constraint *integer (void) const; - TAO_ETCL_Constraint *component (void) const; - - // = The Constraint methods. - int accept (TAO_ETCL_Constraint_Visitor *visitor); - -private: - TAO_ETCL_Literal_Constraint *integer_; - TAO_ETCL_Constraint *component_; -}; - -class TAO_ETCL_Export TAO_ETCL_Special : public TAO_ETCL_Constraint -{ -public: - TAO_ETCL_Special (int type); - virtual ~TAO_ETCL_Special (void); - - int type (void) const; - - // = The Constraint methods. - int accept (TAO_ETCL_Constraint_Visitor *visitor); - -private: - int type_; -}; - -class TAO_ETCL_Export TAO_ETCL_Component : public TAO_ETCL_Constraint -{ -public: - TAO_ETCL_Component (TAO_ETCL_Constraint *identifier, - TAO_ETCL_Constraint *component); - virtual ~TAO_ETCL_Component (void); - - TAO_ETCL_Identifier *identifier (void) const; - TAO_ETCL_Constraint *component (void) const; - - // = The Constraint methods. - int accept (TAO_ETCL_Constraint_Visitor *visitor); - -private: - TAO_ETCL_Identifier *identifier_; - TAO_ETCL_Constraint *component_; -}; - -class TAO_ETCL_Export TAO_ETCL_Dot : public TAO_ETCL_Constraint -{ -public: - TAO_ETCL_Dot (TAO_ETCL_Constraint *component); - virtual ~TAO_ETCL_Dot (void); - - TAO_ETCL_Constraint *component (void) const; - - // = The Constraint methods. - int accept (TAO_ETCL_Constraint_Visitor *visitor); - -private: - TAO_ETCL_Constraint *component_; -}; - -class TAO_ETCL_Export TAO_ETCL_Eval : public TAO_ETCL_Constraint -{ -public: - TAO_ETCL_Eval (TAO_ETCL_Constraint *component); - virtual ~TAO_ETCL_Eval (void); - - TAO_ETCL_Constraint *component (void) const; - - // = The Constraint methods. - int accept (TAO_ETCL_Constraint_Visitor *visitor); - -private: - TAO_ETCL_Constraint *component_; -}; - -class TAO_ETCL_Export TAO_ETCL_Default : public TAO_ETCL_Constraint -{ -public: - TAO_ETCL_Default (TAO_ETCL_Constraint *component); - virtual ~TAO_ETCL_Default (void); - - TAO_ETCL_Constraint *component (void) const; - - // = The Constraint methods. - int accept (TAO_ETCL_Constraint_Visitor *visitor); - -private: - TAO_ETCL_Constraint *component_; -}; - -class TAO_ETCL_Export TAO_ETCL_Exist : public TAO_ETCL_Constraint -{ -public: - TAO_ETCL_Exist (TAO_ETCL_Constraint *component); - virtual ~TAO_ETCL_Exist (void); - - TAO_ETCL_Constraint *component (void) const; - - // = The Constraint methods. - int accept (TAO_ETCL_Constraint_Visitor *visitor); - -private: - TAO_ETCL_Constraint *component_; -}; - -class TAO_ETCL_Export TAO_ETCL_Unary_Expr : public TAO_ETCL_Constraint -{ -public: - TAO_ETCL_Unary_Expr (int type, - TAO_ETCL_Constraint *subexpr); - virtual ~TAO_ETCL_Unary_Expr (void); - - int type (void) const; - TAO_ETCL_Constraint *subexpr (void) const; - - // = The Constraint methods. - int accept (TAO_ETCL_Constraint_Visitor *visitor); - -private: - int type_; - TAO_ETCL_Constraint *subexpr_; -}; - -class TAO_ETCL_Export TAO_ETCL_Binary_Expr : public TAO_ETCL_Constraint -{ -public: - TAO_ETCL_Binary_Expr (int type, - TAO_ETCL_Constraint *lhs, - TAO_ETCL_Constraint *rhs); - virtual ~TAO_ETCL_Binary_Expr (void); - - int type (void) const; - TAO_ETCL_Constraint *rhs (void) const; - TAO_ETCL_Constraint *lhs (void) const; - - // = The Constraint methods. - int accept (TAO_ETCL_Constraint_Visitor *visitor); - -private: - int type_; - TAO_ETCL_Constraint *lhs_; - TAO_ETCL_Constraint *rhs_; -}; - -class TAO_ETCL_Export TAO_ETCL_Preference : public TAO_ETCL_Constraint -{ -public: - TAO_ETCL_Preference (int type, - TAO_ETCL_Constraint *subexpr = 0); - virtual ~TAO_ETCL_Preference (void); - - int type (void) const; - TAO_ETCL_Constraint *subexpr (void) const; - - // = The Constraint methods. - int accept (TAO_ETCL_Constraint_Visitor *visitor); - -private: - int type_; - TAO_ETCL_Constraint *subexpr_; -}; - -TAO_END_VERSIONED_NAMESPACE_DECL - -#if defined (__ACE_INLINE__) -#include "orbsvcs/ETCL/ETCL_Constraint.inl" -#endif /* __ACE_INLINE__ */ - -#endif /* TAO_ETCL_CONSTRAINT_H */ diff --git a/TAO/orbsvcs/orbsvcs/ETCL/ETCL_Constraint.inl b/TAO/orbsvcs/orbsvcs/ETCL/ETCL_Constraint.inl deleted file mode 100644 index d6414ef5131..00000000000 --- a/TAO/orbsvcs/orbsvcs/ETCL/ETCL_Constraint.inl +++ /dev/null @@ -1,330 +0,0 @@ -// -*- C++ -*- -// $Id$ - -// **************************************************************** - -ACE_INLINE -TAO_ETCL_Literal_Constraint::TAO_ETCL_Literal_Constraint (void) - : type_ (TAO_UNKNOWN) -{ -} - -// **************************************************************** - -ACE_INLINE -TAO_ETCL_Identifier::TAO_ETCL_Identifier (const char *value) - : string_ (value) -{ -} - -ACE_INLINE const char * -TAO_ETCL_Identifier::value (void) const -{ - return this->string_.c_str (); -} - - -// **************************************************************** - -ACE_INLINE -TAO_ETCL_Union_Value::TAO_ETCL_Union_Value (int sign, - TAO_ETCL_Constraint *integer) - : sign_ (sign), - string_ (0) -{ - this->integer_ = - dynamic_cast<TAO_ETCL_Literal_Constraint*> (integer); -} - -ACE_INLINE -TAO_ETCL_Union_Value::TAO_ETCL_Union_Value (TAO_ETCL_Constraint *string) - : sign_ (0), - integer_ (0) -{ - this->string_ = - dynamic_cast<TAO_ETCL_Literal_Constraint*> (string); -} - -ACE_INLINE int -TAO_ETCL_Union_Value::sign (void) const -{ - return this->sign_; -} - -ACE_INLINE TAO_ETCL_Literal_Constraint * -TAO_ETCL_Union_Value::integer (void) const -{ - return this->integer_; -} - -ACE_INLINE TAO_ETCL_Literal_Constraint * -TAO_ETCL_Union_Value::string (void) const -{ - return this->string_; -} - - -// **************************************************************** - -ACE_INLINE -TAO_ETCL_Union_Pos::TAO_ETCL_Union_Pos (TAO_ETCL_Constraint *union_value, - TAO_ETCL_Constraint *component) - : component_ (component) -{ - this->union_value_ = - dynamic_cast<TAO_ETCL_Union_Value*> (union_value); -} - -ACE_INLINE TAO_ETCL_Union_Value * -TAO_ETCL_Union_Pos::union_value (void) const -{ - return this->union_value_; -} - -ACE_INLINE TAO_ETCL_Constraint * -TAO_ETCL_Union_Pos::component (void) const -{ - return this->component_; -} - -// **************************************************************** - -ACE_INLINE -TAO_ETCL_Component_Pos::TAO_ETCL_Component_Pos ( - TAO_ETCL_Constraint *integer, - TAO_ETCL_Constraint *component - ) - : component_ (component) -{ - this->integer_ = - dynamic_cast<TAO_ETCL_Literal_Constraint*> (integer); -} - -ACE_INLINE TAO_ETCL_Literal_Constraint * -TAO_ETCL_Component_Pos::integer (void) const -{ - return this->integer_; -} - -ACE_INLINE TAO_ETCL_Constraint * -TAO_ETCL_Component_Pos::component (void) const -{ - return this->component_; -} - -// **************************************************************** - -ACE_INLINE -TAO_ETCL_Component_Assoc::TAO_ETCL_Component_Assoc ( - TAO_ETCL_Constraint *identifier, - TAO_ETCL_Constraint *component - ) - : component_ (component) -{ - this->identifier_ = - dynamic_cast<TAO_ETCL_Identifier*> (identifier); -} - -ACE_INLINE TAO_ETCL_Identifier * -TAO_ETCL_Component_Assoc::identifier (void) const -{ - return this->identifier_; -} - -ACE_INLINE TAO_ETCL_Constraint * -TAO_ETCL_Component_Assoc::component (void) const -{ - return this->component_; -} - -// **************************************************************** - -ACE_INLINE -TAO_ETCL_Component_Array::TAO_ETCL_Component_Array ( - TAO_ETCL_Constraint *integer, - TAO_ETCL_Constraint *component - ) - : component_ (component) -{ - this->integer_ = - dynamic_cast<TAO_ETCL_Literal_Constraint*> (integer); -} - -ACE_INLINE TAO_ETCL_Literal_Constraint * -TAO_ETCL_Component_Array::integer (void) const -{ - return this->integer_; -} - -ACE_INLINE TAO_ETCL_Constraint * -TAO_ETCL_Component_Array::component (void) const -{ - return this->component_; -} - -// **************************************************************** - -ACE_INLINE -TAO_ETCL_Special::TAO_ETCL_Special (int type) - : type_ (type) -{ -} - -ACE_INLINE int -TAO_ETCL_Special::type (void) const -{ - return this->type_; -} - -// **************************************************************** - -ACE_INLINE -TAO_ETCL_Component::TAO_ETCL_Component (TAO_ETCL_Constraint *identifier, - TAO_ETCL_Constraint *component) - : component_ (component) -{ - this->identifier_ = - dynamic_cast<TAO_ETCL_Identifier*> (identifier); -} - -ACE_INLINE TAO_ETCL_Identifier * -TAO_ETCL_Component::identifier (void) const -{ - return this->identifier_; -} - -ACE_INLINE TAO_ETCL_Constraint * -TAO_ETCL_Component::component (void) const -{ - return this->component_; -} - -// **************************************************************** - -ACE_INLINE -TAO_ETCL_Dot::TAO_ETCL_Dot (TAO_ETCL_Constraint *component) - : component_ (component) -{ -} - -ACE_INLINE TAO_ETCL_Constraint * -TAO_ETCL_Dot::component (void) const -{ - return this->component_; -} - -// **************************************************************** - -ACE_INLINE -TAO_ETCL_Eval::TAO_ETCL_Eval (TAO_ETCL_Constraint *component) - : component_ (component) -{ -} - -ACE_INLINE TAO_ETCL_Constraint * -TAO_ETCL_Eval::component (void) const -{ - return this->component_; -} - -// **************************************************************** - -ACE_INLINE -TAO_ETCL_Default::TAO_ETCL_Default (TAO_ETCL_Constraint *component) - : component_ (component) -{ -} - -ACE_INLINE TAO_ETCL_Constraint * -TAO_ETCL_Default::component (void) const -{ - return this->component_; -} - -// **************************************************************** - -ACE_INLINE -TAO_ETCL_Exist::TAO_ETCL_Exist (TAO_ETCL_Constraint *component) - : component_ (component) -{ -} - -ACE_INLINE TAO_ETCL_Constraint * -TAO_ETCL_Exist::component (void) const -{ - return this->component_; -} - -// **************************************************************** - -ACE_INLINE -TAO_ETCL_Unary_Expr::TAO_ETCL_Unary_Expr (int type, - TAO_ETCL_Constraint *subexpr) - : type_ (type), - subexpr_ (subexpr) -{ -} - -ACE_INLINE int -TAO_ETCL_Unary_Expr::type (void) const -{ - return this->type_; -} - -ACE_INLINE TAO_ETCL_Constraint * -TAO_ETCL_Unary_Expr::subexpr (void) const -{ - return this->subexpr_; -} - -// **************************************************************** - -ACE_INLINE -TAO_ETCL_Binary_Expr::TAO_ETCL_Binary_Expr (int type, - TAO_ETCL_Constraint *lhs, - TAO_ETCL_Constraint *rhs) - : type_ (type), - lhs_ (lhs), - rhs_ (rhs) -{ -} - -ACE_INLINE int -TAO_ETCL_Binary_Expr::type (void) const -{ - return this->type_; -} - -ACE_INLINE TAO_ETCL_Constraint * -TAO_ETCL_Binary_Expr::rhs (void) const -{ - return this->rhs_; -} - -ACE_INLINE TAO_ETCL_Constraint * -TAO_ETCL_Binary_Expr::lhs (void) const -{ - return this->lhs_; -} - -// **************************************************************** - -ACE_INLINE -TAO_ETCL_Preference::TAO_ETCL_Preference (int type, - TAO_ETCL_Constraint *subexpr) - : type_ (type), - subexpr_ (subexpr) -{ -} - -ACE_INLINE int -TAO_ETCL_Preference::type (void) const -{ - return this->type_; -} - -ACE_INLINE TAO_ETCL_Constraint * -TAO_ETCL_Preference::subexpr (void) const -{ - return this->subexpr_; -} diff --git a/TAO/orbsvcs/orbsvcs/ETCL/ETCL_Constraint_Visitor.h b/TAO/orbsvcs/orbsvcs/ETCL/ETCL_Constraint_Visitor.h deleted file mode 100644 index 0f23f7a02c0..00000000000 --- a/TAO/orbsvcs/orbsvcs/ETCL/ETCL_Constraint_Visitor.h +++ /dev/null @@ -1,70 +0,0 @@ -// -*- C++ -*- -//============================================================================= -/** - * @file ETCL_Constraint_Visitor.h - * - * $Id$ - * - * @author Carlos O'Ryan <coryan@cs.wustl.edu> - * @author Jeff Parsons <parsons@cs.wustl.edu> - */ -//============================================================================= - - -#ifndef TAO_ETCL_CONSTRAINT_VISITOR_H -#define TAO_ETCL_CONSTRAINT_VISITOR_H - -#include "orbsvcs/ETCL/etcl_export.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "tao/Versioned_Namespace.h" - -TAO_BEGIN_VERSIONED_NAMESPACE_DECL - -class TAO_ETCL_Literal_Constraint; -class TAO_ETCL_Identifier; -class TAO_ETCL_Union_Value; -class TAO_ETCL_Union_Pos; -class TAO_ETCL_Component_Pos; -class TAO_ETCL_Component_Assoc; -class TAO_ETCL_Component_Array; -class TAO_ETCL_Special; -class TAO_ETCL_Component; -class TAO_ETCL_Dot; -class TAO_ETCL_Eval; -class TAO_ETCL_Default; -class TAO_ETCL_Exist; -class TAO_ETCL_Unary_Expr; -class TAO_ETCL_Binary_Expr; -class TAO_ETCL_Preference; - -class TAO_ETCL_Export TAO_ETCL_Constraint_Visitor -{ -public: - /// Destructor - virtual ~TAO_ETCL_Constraint_Visitor (void); - - virtual int visit_literal (TAO_ETCL_Literal_Constraint *) = 0; - virtual int visit_identifier (TAO_ETCL_Identifier *) = 0; - virtual int visit_union_value (TAO_ETCL_Union_Value *) = 0; - virtual int visit_union_pos (TAO_ETCL_Union_Pos *) = 0; - virtual int visit_component_pos (TAO_ETCL_Component_Pos *) = 0; - virtual int visit_component_assoc (TAO_ETCL_Component_Assoc *) = 0; - virtual int visit_component_array (TAO_ETCL_Component_Array *) = 0; - virtual int visit_special (TAO_ETCL_Special *) = 0; - virtual int visit_component (TAO_ETCL_Component *) = 0; - virtual int visit_dot (TAO_ETCL_Dot *) = 0; - virtual int visit_eval (TAO_ETCL_Eval *) = 0; - virtual int visit_default (TAO_ETCL_Default *) = 0; - virtual int visit_exist (TAO_ETCL_Exist *) = 0; - virtual int visit_unary_expr (TAO_ETCL_Unary_Expr *) = 0; - virtual int visit_binary_expr (TAO_ETCL_Binary_Expr *) = 0; - virtual int visit_preference (TAO_ETCL_Preference *) = 0; -}; - -TAO_END_VERSIONED_NAMESPACE_DECL - -#endif /* TAO_ETCL_CONSTRAINT_VISITOR_H */ diff --git a/TAO/orbsvcs/orbsvcs/ETCL/ETCL_Interpreter.cpp b/TAO/orbsvcs/orbsvcs/ETCL/ETCL_Interpreter.cpp deleted file mode 100644 index 51f8eea646f..00000000000 --- a/TAO/orbsvcs/orbsvcs/ETCL/ETCL_Interpreter.cpp +++ /dev/null @@ -1,112 +0,0 @@ -// -*- C++ -*- -// $Id$ - -#include "orbsvcs/ETCL/ETCL_Interpreter.h" -#include "orbsvcs/ETCL/ETCL_Constraint.h" -#include "ace/Guard_T.h" -#include "ace/Thread_Mutex.h" - -ACE_RCSID(ETCL, ETCL_Interpreter, "$Id$") - - -TAO_BEGIN_VERSIONED_NAMESPACE_DECL - -TAO_SYNCH_MUTEX TAO_ETCL_Interpreter::parserMutex__; - -TAO_ETCL_Interpreter::TAO_ETCL_Interpreter (void) - : root_ (0) -{ -} - -TAO_ETCL_Interpreter::~TAO_ETCL_Interpreter (void) -{ - delete this->root_; -} - -int -TAO_ETCL_Interpreter::build_tree (const char* constraints) -{ - ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, - guard, - TAO_ETCL_Interpreter::parserMutex__, - -1); - - TAO_Lex_String_Input::reset ((char*)constraints); - - yyval.constraint = 0; - int return_value = ::yyparse (); - - if (return_value == 0 && yyval.constraint != 0) - { - this->root_ = yyval.constraint; - } - else - { - this->root_ = 0; - } - - return return_value; -} - -int -TAO_ETCL_Interpreter::is_empty_string (const char* str) -{ - int return_value = 0; - - if (str != 0) - { - int i = 0; - - while (str[i] != '\0') - { - if (str[i] != ' ') - { - break; - } - - i++; - } - - if (str[i] == '\0') - { - return_value = 1; - } - } - - return return_value; -} - -char* TAO_Lex_String_Input::string_ = 0; -char* TAO_Lex_String_Input::current_ = 0; -char* TAO_Lex_String_Input::end_ = 0; - -// Routine to have Lex read its input from the constraint string. - -int -TAO_Lex_String_Input::copy_into (char* buf, - int max_size) -{ - int chars_left = TAO_Lex_String_Input::end_ - TAO_Lex_String_Input::current_; - int n = max_size > chars_left ? chars_left : max_size; - - if (n > 0) - { - ACE_OS::memcpy (buf, - TAO_Lex_String_Input::current_, - n); - TAO_Lex_String_Input::current_ += n; - } - - return n; -} - -void -TAO_Lex_String_Input::reset (char* input_string) -{ - TAO_Lex_String_Input::string_ = input_string; - TAO_Lex_String_Input::current_ = input_string; - TAO_Lex_String_Input::end_ = - input_string + ACE_OS::strlen (TAO_Lex_String_Input::string_); -} - -TAO_END_VERSIONED_NAMESPACE_DECL diff --git a/TAO/orbsvcs/orbsvcs/ETCL/ETCL_Interpreter.h b/TAO/orbsvcs/orbsvcs/ETCL/ETCL_Interpreter.h deleted file mode 100644 index 81210143c38..00000000000 --- a/TAO/orbsvcs/orbsvcs/ETCL/ETCL_Interpreter.h +++ /dev/null @@ -1,110 +0,0 @@ -// -*- C++ -*- - -//============================================================================= -/** - * @file ETCL_Interpreter.h - * - * $Id$ - * - * @author Jeff Parsons <parsons@cs.wustl.edu> based on previous work by - * @author Seth Widoff <sbw1@cs.wustl.edu> - */ -//============================================================================= - - -#ifndef TAO_ETCL_INTERPRETER_H -#define TAO_ETCL_INTERPRETER_H -#include /**/ "ace/pre.h" - -#include "orbsvcs/ETCL/etcl_export.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "tao/orbconf.h" -#include "ace/Thread_Mutex.h" - -TAO_BEGIN_VERSIONED_NAMESPACE_DECL - -class TAO_ETCL_Constraint; - -/** - * @class TAO_ETCL_Interpreter - * - * @brief TAO_ETCL_Interpreter is the superclass for all ETCL interpreters. - * Its build tree method invokes the yacc parser to parse a constraint - * or preference string. - */ -class TAO_ETCL_Export TAO_ETCL_Interpreter -{ -protected: - // = Initialization and termination methods. - /// Constructor. - TAO_ETCL_Interpreter (void); - - /// Destructor. - ~TAO_ETCL_Interpreter (void); - - /// Using the Yacc generated parser, construct an expression tree - /// representing <constraints> from the tokens returned by it. - int build_tree (const char* constraints); - - static int is_empty_string (const char* str); - - /// The root of the expression tree, not equal to null if build_tree - /// successfully builds a tree from the constraints. - TAO_ETCL_Constraint* root_; -private: - /// This mutex protects the <build_tree> method from reentrance. - static TAO_SYNCH_MUTEX parserMutex__; -}; - - -// Functions we need for parsing. -extern int yyparse (void); -extern void yyrestart (FILE*); -extern int yylex (void); - -// Have yylex read from the constraint string, not from stdin. -#undef YY_INPUT -#define YY_INPUT(b, r, ms) (r = TAO_Lex_String_Input::copy_into(b, ms)) - -/** - * @class TAO_Lex_String_Input - * - * @brief Have Lex read from a string and not from stdin. Essentially, - * the interpreter needs to call yylex() until EOF, and call - * TAO_Lex_String_Input::reset() with the new string, prior to - * calling yyparse. - */ -class TAO_Lex_String_Input -{ -public: - /// Reset the lex input. - static void reset (char* input_string); - - /// Method lex will call to read from the input string. - static int copy_into (char* buf, int max_size); - -private: - - /// Pointers to keep track of the input string. - static char* string_; - static char* current_; - static char* end_; -}; - -/// The union used by lex and bison to build the Abstract Syntax Tree. -typedef union -{ - TAO_ETCL_Constraint* constraint; -} YYSTYPE; - -extern YYSTYPE yylval; -extern YYSTYPE yyval; - -TAO_END_VERSIONED_NAMESPACE_DECL - -#include /**/ "ace/post.h" -#endif /* TAO_ETCL_INTERPRETER_H */ diff --git a/TAO/orbsvcs/orbsvcs/ETCL/ETCL_l.cpp b/TAO/orbsvcs/orbsvcs/ETCL/ETCL_l.cpp deleted file mode 100644 index 2c10676a9d9..00000000000 --- a/TAO/orbsvcs/orbsvcs/ETCL/ETCL_l.cpp +++ /dev/null @@ -1,1886 +0,0 @@ - -/* A lexical scanner generated by flex */ - -/* Scanner skeleton version: - * $Id$ - */ - -#define FLEX_SCANNER -#define YY_FLEX_MAJOR_VERSION 2 -#define YY_FLEX_MINOR_VERSION 5 - - -/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */ -#ifdef c_plusplus -#ifndef __cplusplus -#define __cplusplus -#endif -#endif - - -#ifdef __cplusplus - -#include "tao/orbconf.h" -#include "ace/OS.h" - -/* Use prototypes in function declarations. */ -#define YY_USE_PROTOS - -/* The "const" storage-class-modifier is valid. */ -#define YY_USE_CONST - -#else /* ! __cplusplus */ - -#if __STDC__ - -#define YY_USE_PROTOS -#define YY_USE_CONST - -#endif /* __STDC__ */ -#endif /* ! __cplusplus */ - -#ifdef __TURBOC__ - #pragma warn -rch - #pragma warn -use -#include <io.h> -#include <stdlib.h> -#define YY_USE_CONST -#define YY_USE_PROTOS -#endif - -#ifdef YY_USE_CONST -#define yyconst const -#else -#define yyconst -#endif - - -#ifdef YY_USE_PROTOS -#define YY_PROTO(proto) proto -#else -#define YY_PROTO(proto) () -#endif - -/* Returned upon end-of-file. */ -#define YY_NULL 0 - -/* Promotes a possibly negative, possibly signed char to an unsigned - * integer for use as an array index. If the signed char is negative, - * we want to instead treat it as an 8-bit unsigned char, hence the - * double cast. - */ -#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) - -/* Enter a start condition. This macro really ought to take a parameter, - * but we do it the disgusting crufty way forced on us by the ()-less - * definition of BEGIN. - */ -#define BEGIN yy_start = 1 + 2 * - -/* Translate the current start state into a value that can be later handed - * to BEGIN to return to the state. The YYSTATE alias is for lex - * compatibility. - */ -#define YY_START ((yy_start - 1) / 2) -#define YYSTATE YY_START - -/* Action number for EOF rule of a given start state. */ -#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) - -/* Special action meaning "start processing a new file". */ -#define YY_NEW_FILE yyrestart( yyin ) - -#define YY_END_OF_BUFFER_CHAR 0 - -/* Size of default input buffer. */ -#define YY_BUF_SIZE 16384 - -TAO_BEGIN_VERSIONED_NAMESPACE_DECL - -typedef struct yy_buffer_state *YY_BUFFER_STATE; - -extern int yyleng; -extern FILE *yyin, *yyout; - -#define EOB_ACT_CONTINUE_SCAN 0 -#define EOB_ACT_END_OF_FILE 1 -#define EOB_ACT_LAST_MATCH 2 - -/* The funky do-while in the following #define is used to turn the definition - * int a single C statement (which needs a semi-colon terminator). This - * avoids problems with code like: - * - * if ( condition_holds ) - * 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 - * done when it reached the ';' after the yyless() call. - */ - -/* Return all but the first 'n' matched characters back to the input stream. */ - -#define yyless(n) \ - do \ - { \ - /* Undo effects of setting up yytext. */ \ - *yy_cp = yy_hold_char; \ - YY_RESTORE_YY_MORE_OFFSET \ - yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \ - YY_DO_BEFORE_ACTION; /* set up yytext again */ \ - } \ - while ( 0 ) - -#define unput(c) yyunput( c, yytext_ptr ) - -/* The following is because we cannot portably get our hands on size_t - * (without autoconf's help, which isn't available because we want - * flex-generated scanners to compile on their own). - */ -typedef unsigned int yy_size_t; - - -struct yy_buffer_state -{ - FILE *yy_input_file; - - char *yy_ch_buf; /* input buffer */ - char *yy_buf_pos; /* current position in input buffer */ - - /* Size of input buffer in bytes, not including room for EOB - * characters. - */ - yy_size_t yy_buf_size; - - /* Number of characters read into yy_ch_buf, not including EOB - * characters. - */ - int 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 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 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 yy_at_bol; - - /* Whether to try to fill the input buffer when we reach the - * end of it. - */ - int yy_fill_buffer; - - int yy_buffer_status; -#define YY_BUFFER_NEW 0 -#define YY_BUFFER_NORMAL 1 - /* When an EOF's been seen but there's still some text to process - * then we mark the buffer as 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 yyrestart()), so that the user can continue scanning by - * just pointing yyin at a new input file. - */ -#define YY_BUFFER_EOF_PENDING 2 -}; - -static YY_BUFFER_STATE yy_current_buffer = 0; - -/* We provide macros for accessing buffer states in case in the - * future we want to put the buffer states in a more general - * "scanner state". - */ -#define YY_CURRENT_BUFFER yy_current_buffer - - -/* yy_hold_char holds the character lost when yytext is formed. */ -static char yy_hold_char; - -static int yy_n_chars; /* number of characters read into yy_ch_buf */ - - -int yyleng; - -/* Points to current character in buffer. */ -static char *yy_c_buf_p = (char *) 0; -static int yy_init = 1; /* whether we need to initialize */ -static int yy_start = 0; /* start state number */ - -/* Flag which is used to allow yywrap()'s to do buffer switches - * instead of setting up a fresh yyin. A bit of a hack ... - */ -static int yy_did_buffer_switch_on_eof; - -void yyrestart YY_PROTO(( FILE *input_file )); - -void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer )); -void yy_load_buffer_state YY_PROTO(( void )); -YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size )); -void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b )); -void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file )); -void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b )); -#define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer ) - -YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size )); -YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str )); -YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len )); - -static void *yy_flex_alloc YY_PROTO(( yy_size_t )); -static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t )); -static void yy_flex_free YY_PROTO(( void * )); - -#define yy_new_buffer yy_create_buffer - -#define yy_set_interactive(is_interactive) \ - { \ - if ( ! yy_current_buffer ) \ - yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ - yy_current_buffer->yy_is_interactive = is_interactive; \ - } - -#define yy_set_bol(at_bol) \ - { \ - if ( ! yy_current_buffer ) \ - yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ - yy_current_buffer->yy_at_bol = at_bol; \ - } - -#define YY_AT_BOL() (yy_current_buffer->yy_at_bol) - - -//#define yywrap() 1 -//#define YY_SKIP_YYWRAP -typedef unsigned char YY_CHAR; -FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0; -typedef int yy_state_type; -extern char *yytext; -#define yytext_ptr yytext - -static yy_state_type yy_get_previous_state YY_PROTO(( void )); -static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state )); -static int yy_get_next_buffer YY_PROTO(( void )); -static void yy_fatal_error YY_PROTO(( yyconst char msg[] )); - -/* Done after the current pattern has been matched and before the - * corresponding action - sets up yytext. - */ -#define YY_DO_BEFORE_ACTION \ - yytext_ptr = yy_bp; \ - yyleng = (int) (yy_cp - yy_bp); \ - yy_hold_char = *yy_cp; \ - *yy_cp = '\0'; \ - yy_c_buf_p = yy_cp; - -#define YY_NUM_RULES 41 -#define YY_END_OF_BUFFER 42 -static yyconst short int yy_accept[118] = - { 0, - 0, 0, 42, 40, 39, 41, 40, 24, 40, 22, - 23, 14, 12, 13, 25, 15, 35, 16, 40, 18, - 38, 38, 38, 31, 40, 32, 40, 38, 38, 38, - 38, 38, 38, 38, 38, 38, 38, 11, 21, 0, - 37, 0, 36, 0, 35, 17, 20, 19, 38, 38, - 38, 38, 27, 0, 0, 0, 38, 38, 38, 38, - 10, 38, 38, 38, 9, 38, 38, 0, 0, 38, - 38, 38, 0, 0, 0, 8, 38, 38, 38, 2, - 1, 7, 38, 38, 0, 36, 38, 33, 0, 0, - 0, 38, 38, 38, 38, 5, 34, 0, 0, 0, - - 38, 6, 3, 38, 0, 0, 0, 38, 4, 30, - 0, 0, 26, 0, 28, 29, 0 - } ; - -static yyconst int yy_ec[256] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 2, 4, 1, 1, 5, 1, 1, 6, 7, - 8, 9, 10, 1, 11, 12, 13, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 1, 1, 15, - 16, 17, 1, 1, 18, 19, 19, 19, 20, 21, - 19, 19, 19, 19, 19, 22, 19, 19, 19, 19, - 19, 23, 24, 25, 26, 19, 19, 19, 19, 19, - 27, 28, 29, 1, 30, 1, 31, 19, 19, 32, - - 33, 34, 35, 36, 37, 19, 19, 38, 39, 40, - 41, 42, 19, 43, 44, 45, 46, 19, 47, 48, - 49, 19, 1, 1, 1, 50, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1 - } ; - -static yyconst int yy_meta[51] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 2, 1, 1, 1, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 1, 1, 1, 2, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 1 - } ; - -static yyconst short int yy_base[122] = - { 0, - 0, 0, 146, 147, 147, 147, 129, 147, 45, 147, - 147, 147, 147, 147, 130, 147, 40, 127, 126, 125, - 0, 122, 116, 147, 0, 147, 21, 98, 104, 88, - 98, 94, 24, 92, 89, 100, 93, 147, 147, 50, - 147, 51, 48, 115, 46, 147, 147, 147, 0, 106, - 101, 0, 147, 93, 92, 75, 91, 88, 84, 77, - 0, 71, 78, 72, 0, 76, 70, 57, 60, 90, - 93, 0, 72, 69, 68, 0, 78, 64, 63, 0, - 0, 0, 74, 69, 90, 89, 82, 0, 66, 59, - 66, 52, 52, 51, 54, 0, 0, 49, 49, 54, - - 45, 0, 0, 43, 44, 47, 39, 30, 0, 147, - 35, 37, 0, 35, 147, 147, 147, 85, 87, 62, - 89 - } ; - -static yyconst short int yy_def[122] = - { 0, - 117, 1, 117, 117, 117, 117, 117, 117, 118, 117, - 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, - 119, 119, 119, 117, 120, 117, 117, 119, 119, 119, - 119, 119, 119, 119, 119, 119, 119, 117, 117, 118, - 117, 117, 117, 117, 117, 117, 117, 117, 119, 119, - 119, 121, 117, 117, 117, 117, 119, 119, 119, 119, - 119, 119, 119, 119, 119, 119, 119, 118, 117, 119, - 119, 121, 117, 117, 117, 119, 119, 119, 119, 119, - 119, 119, 119, 119, 117, 117, 119, 119, 117, 117, - 117, 119, 119, 119, 119, 119, 119, 117, 117, 117, - - 119, 119, 119, 119, 117, 117, 117, 119, 119, 117, - 117, 117, 119, 117, 117, 117, 0, 117, 117, 117, - 117 - } ; - -static yyconst short int yy_nxt[198] = - { 0, - 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, - 14, 15, 16, 17, 18, 19, 20, 21, 21, 21, - 22, 21, 21, 21, 23, 21, 24, 25, 26, 27, - 28, 29, 30, 31, 21, 21, 32, 21, 33, 34, - 35, 21, 36, 21, 21, 21, 37, 21, 21, 38, - 41, 44, 53, 45, 62, 41, 68, 44, 54, 45, - 63, 43, 41, 55, 52, 56, 116, 69, 115, 85, - 85, 114, 42, 86, 113, 112, 111, 42, 68, 110, - 69, 109, 108, 107, 42, 40, 40, 40, 49, 49, - 72, 72, 106, 105, 104, 103, 102, 101, 100, 99, - - 98, 97, 86, 86, 96, 95, 94, 93, 92, 91, - 90, 89, 88, 87, 84, 83, 82, 81, 80, 79, - 78, 77, 76, 75, 74, 73, 71, 70, 43, 67, - 66, 65, 64, 61, 60, 59, 58, 57, 51, 50, - 48, 47, 46, 43, 39, 117, 3, 117, 117, 117, - 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, - 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, - 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, - 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, - 117, 117, 117, 117, 117, 117, 117 - - } ; - -static yyconst short int yy_chk[198] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 9, 17, 27, 17, 33, 40, 42, 45, 27, 45, - 33, 43, 68, 27, 120, 27, 114, 43, 112, 69, - 69, 111, 9, 69, 108, 107, 106, 40, 42, 105, - 43, 104, 101, 100, 68, 118, 118, 118, 119, 119, - 121, 121, 99, 98, 95, 94, 93, 92, 91, 90, - - 89, 87, 86, 85, 84, 83, 79, 78, 77, 75, - 74, 73, 71, 70, 67, 66, 64, 63, 62, 60, - 59, 58, 57, 56, 55, 54, 51, 50, 44, 37, - 36, 35, 34, 32, 31, 30, 29, 28, 23, 22, - 20, 19, 18, 15, 7, 3, 117, 117, 117, 117, - 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, - 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, - 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, - 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, - 117, 117, 117, 117, 117, 117, 117 - - } ; - -static yy_state_type yy_last_accepting_state; -static char *yy_last_accepting_cpos; - -/* The intent behind this definition is that it'll catch - * any uses of REJECT which flex missed. - */ -#define REJECT reject_used_but_not_detected -#define yymore() yymore_used_but_not_detected -#define YY_MORE_ADJ 0 -#define YY_RESTORE_YY_MORE_OFFSET -char *yytext; -//#line 1 "ETCL/ETCL.ll" -#define INITIAL 0 - -TAO_END_VERSIONED_NAMESPACE_DECL - -//#line 4 "ETCL/ETCL.ll" -// $Id$ -// ======================================================================== -// -// = LIBRARY -// orbsvcs/ECTL -// -// = FILENAME -// ETCL.ll -// -// = AUTHOR -// Carlos O'Ryan <coryan@uci.edu> based on previous work by -// Seth Widoff <sbw1@cs.wustl.edu> -// -// ======================================================================== - -#include "orbsvcs/ETCL/ETCL_Interpreter.h" -#include "orbsvcs/ETCL/ETCL_Constraint.h" -#include "orbsvcs/ETCL/ETCL_y.h" - -TAO_BEGIN_VERSIONED_NAMESPACE_DECL - -static const char* extract_string(char*); -//static const char * extract_string(char*); - -#define TAO_YY_LEX_DEBUG - -#ifdef TAO_CONSTRAINT_DEBUG -#define TAO_YY_LEX_DEBUG ACE_OS::fprintf(stderr, "%s\n", yytext) -#endif /* TAO_CONSTRAINT_DEBUG */ - -//#define YY_DECL int TAO_ETCL_yylex (TAO_ETCL_YYSTYPE *lvalp, void* state) - -#define YY_BREAK -#define YY_NO_UNPUT - - -/* Macros after this point can all be overridden by user definitions in - * section 1. - */ - -#ifndef YY_SKIP_YYWRAP -#ifdef __cplusplus -extern "C" int yywrap YY_PROTO(( void )); -#else -extern int yywrap YY_PROTO(( void )); -#endif -#endif - -#ifndef yytext_ptr -static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int )); -#endif - -#ifdef YY_NEED_STRLEN -static int yy_flex_strlen YY_PROTO(( yyconst char * )); -#endif - -#ifndef YY_NO_INPUT -#ifdef __cplusplus -static int yyinput YY_PROTO(( void )); -#else -static int input YY_PROTO(( void )); -#endif -#endif - -#if YY_STACK_USED -static int yy_start_stack_ptr = 0; -static int yy_start_stack_depth = 0; -static int *yy_start_stack = 0; -#ifndef YY_NO_PUSH_STATE -static void yy_push_state YY_PROTO(( int new_state )); -#endif -#ifndef YY_NO_POP_STATE -static void yy_pop_state YY_PROTO(( void )); -#endif -#ifndef YY_NO_TOP_STATE -static int yy_top_state YY_PROTO(( void )); -#endif - -#else -#define YY_NO_PUSH_STATE 1 -#define YY_NO_POP_STATE 1 -#define YY_NO_TOP_STATE 1 -#endif - -TAO_END_VERSIONED_NAMESPACE_DECL - -#ifdef YY_MALLOC_DECL -YY_MALLOC_DECL -#else -#if __STDC__ -#ifndef __cplusplus -#include <stdlib.h> -#endif -#else -/* Just try to get by without declaring the routines. This will fail - * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int) - * or sizeof(void*) != sizeof(int). - */ -#endif -#endif - -/* Amount of stuff to slurp up with each read. */ -#ifndef YY_READ_BUF_SIZE -#define YY_READ_BUF_SIZE 8192 -#endif - -/* Copy whatever the last rule matched to the standard output. */ - -//FUZZ: disable check_for_lack_ACE_OS -#ifndef TAO_ETCL_ECHO -/* This used to be an fputs(), but since the string might contain NUL's, - * we now use fwrite(). - */ -#define TAO_ETCL_ECHO (void) fwrite( yytext, yyleng, 1, yyout ) -#endif - //FUZZ: enable check_for_lack_ACE_OS - -/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, - * is returned in "result". - */ -#ifndef YY_INPUT -#define YY_INPUT(buf,result,max_size) \ - if ( yy_current_buffer->yy_is_interactive ) \ - { \ - int c = '*', n; \ - for ( n = 0; n < max_size && \ - (c = ACE_OS::getc( yyin )) != EOF && c != '\n'; ++n ) \ - buf[n] = (char) c; \ - if ( c == '\n' ) \ - buf[n++] = (char) c; \ - if ( c == EOF && ferror( yyin ) ) \ - YY_FATAL_ERROR( "input in flex scanner failed" ); \ - result = n; \ - } \ - else if ( ((result = ACE_OS::fread( buf, 1, max_size, yyin )) == 0) \ - && ferror( yyin ) ) \ - YY_FATAL_ERROR( "input in flex scanner failed" ); -#endif - -/* No semi-colon after return; correct usage is to write "yyterminate();" - - * we don't want an extra ';' after the "return" because that will cause - * some compilers to complain about unreachable statements. - */ -#ifndef yyterminate -#define yyterminate() return YY_NULL -#endif - -/* Number of entries by which start-condition stack grows. */ -#ifndef YY_START_STACK_INCR -#define YY_START_STACK_INCR 25 -#endif - -/* Report a fatal error. */ -#ifndef YY_FATAL_ERROR -#define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) -#endif - -/* Default declaration of generated scanner - a define so the user can - * easily add parameters. - */ -#ifndef YY_DECL -#define YY_DECL int yylex YY_PROTO(( void )) -#endif - -/* Code executed at the beginning of each rule, after yytext and yyleng - * have been set up. - */ -#ifndef YY_USER_ACTION -#define YY_USER_ACTION -#endif - -/* Code executed at the end of each rule. */ -#ifndef YY_BREAK -#define YY_BREAK break; -#endif - -#define YY_RULE_SETUP \ - YY_USER_ACTION - -TAO_BEGIN_VERSIONED_NAMESPACE_DECL - -YY_DECL - { - register yy_state_type yy_current_state; - register char *yy_cp = 0; - register char *yy_bp = 0; - register int yy_act; - -//#line 50 "ETCL/ETCL.ll" - - if ( yy_init ) - { - yy_init = 0; - -#ifdef YY_USER_INIT - YY_USER_INIT; -#endif - - if ( ! yy_start ) - yy_start = 1; /* first start state */ - - if ( ! yyin ) - yyin = stdin; - - if ( ! yyout ) - yyout = stdout; - - if ( ! yy_current_buffer ) - yy_current_buffer = - yy_create_buffer( yyin, YY_BUF_SIZE ); - - yy_load_buffer_state(); - } - - while ( 1 ) /* loops until end-of-file is reached */ - { - yy_cp = yy_c_buf_p; - - /* Support of yytext. */ - *yy_cp = yy_hold_char; - - /* yy_bp points to the position in yy_ch_buf of the start of - * the current run. - */ - yy_bp = yy_cp; - - yy_current_state = yy_start; -yy_match: - do - { - register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; - if ( yy_accept[yy_current_state] ) - { - yy_last_accepting_state = yy_current_state; - yy_last_accepting_cpos = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 118 ) - yy_c = yy_meta[(unsigned int) yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - ++yy_cp; - } - while ( yy_base[yy_current_state] != 147 ); - -yy_find_action: - yy_act = yy_accept[yy_current_state]; - if ( yy_act == 0 ) - { /* have to back up */ - yy_cp = yy_last_accepting_cpos; - yy_current_state = yy_last_accepting_state; - yy_act = yy_accept[yy_current_state]; - } - - YY_DO_BEFORE_ACTION; - - -do_action: /* This label is used only to access EOF actions. */ - - - switch ( yy_act ) - { /* beginning of action switch */ - case 0: /* must back up */ - /* undo the effects of YY_DO_BEFORE_ACTION */ - *yy_cp = yy_hold_char; - yy_cp = yy_last_accepting_cpos; - yy_current_state = yy_last_accepting_state; - goto yy_find_action; - -case 1: -YY_RULE_SETUP -//#line 52 "ETCL/ETCL.ll" -{ TAO_YY_LEX_DEBUG; return TAO_ETCL_MIN; } - YY_BREAK -case 2: -YY_RULE_SETUP -//#line 53 "ETCL/ETCL.ll" -{ TAO_YY_LEX_DEBUG; return TAO_ETCL_MAX; } - YY_BREAK -case 3: -YY_RULE_SETUP -//#line 54 "ETCL/ETCL.ll" -{ TAO_YY_LEX_DEBUG; return TAO_ETCL_FIRST; } - YY_BREAK -case 4: -YY_RULE_SETUP -//#line 55 "ETCL/ETCL.ll" -{ TAO_YY_LEX_DEBUG; return TAO_ETCL_RANDOM; } - YY_BREAK -case 5: -YY_RULE_SETUP -//#line 56 "ETCL/ETCL.ll" -{ TAO_YY_LEX_DEBUG; return TAO_ETCL_WITH; } - YY_BREAK -case 6: -YY_RULE_SETUP -//#line 57 "ETCL/ETCL.ll" -{ TAO_YY_LEX_DEBUG; return TAO_ETCL_EXIST; } - YY_BREAK -case 7: -YY_RULE_SETUP -//#line 58 "ETCL/ETCL.ll" -{ TAO_YY_LEX_DEBUG; return TAO_ETCL_NOT; } - YY_BREAK -case 8: -YY_RULE_SETUP -//#line 59 "ETCL/ETCL.ll" -{ TAO_YY_LEX_DEBUG; return TAO_ETCL_AND; } - YY_BREAK -case 9: -YY_RULE_SETUP -//#line 60 "ETCL/ETCL.ll" -{ TAO_YY_LEX_DEBUG; return TAO_ETCL_OR; } - YY_BREAK -case 10: -YY_RULE_SETUP -//#line 61 "ETCL/ETCL.ll" -{ TAO_YY_LEX_DEBUG; return TAO_ETCL_IN; } - YY_BREAK -case 11: -YY_RULE_SETUP -//#line 62 "ETCL/ETCL.ll" -{ TAO_YY_LEX_DEBUG; return TAO_ETCL_TWIDDLE; } - YY_BREAK -case 12: -YY_RULE_SETUP -//#line 63 "ETCL/ETCL.ll" -{ TAO_YY_LEX_DEBUG; return TAO_ETCL_PLUS; } - YY_BREAK -case 13: -YY_RULE_SETUP -//#line 64 "ETCL/ETCL.ll" -{ TAO_YY_LEX_DEBUG; return TAO_ETCL_MINUS; } - YY_BREAK -case 14: -YY_RULE_SETUP -//#line 65 "ETCL/ETCL.ll" -{ TAO_YY_LEX_DEBUG; return TAO_ETCL_MULT; } - YY_BREAK -case 15: -YY_RULE_SETUP -//#line 66 "ETCL/ETCL.ll" -{ TAO_YY_LEX_DEBUG; return TAO_ETCL_DIV; } - YY_BREAK -case 16: -YY_RULE_SETUP -//#line 67 "ETCL/ETCL.ll" -{ TAO_YY_LEX_DEBUG; return TAO_ETCL_LT; } - YY_BREAK -case 17: -YY_RULE_SETUP -//#line 68 "ETCL/ETCL.ll" -{ TAO_YY_LEX_DEBUG; return TAO_ETCL_LE; } - YY_BREAK -case 18: -YY_RULE_SETUP -//#line 69 "ETCL/ETCL.ll" -{ TAO_YY_LEX_DEBUG; return TAO_ETCL_GT; } - YY_BREAK -case 19: -YY_RULE_SETUP -//#line 70 "ETCL/ETCL.ll" -{ TAO_YY_LEX_DEBUG; return TAO_ETCL_GE; } - YY_BREAK -case 20: -YY_RULE_SETUP -//#line 71 "ETCL/ETCL.ll" -{ TAO_YY_LEX_DEBUG; return TAO_ETCL_EQ; } - YY_BREAK -case 21: -YY_RULE_SETUP -//#line 72 "ETCL/ETCL.ll" -{ TAO_YY_LEX_DEBUG; return TAO_ETCL_NE; } - YY_BREAK -case 22: -YY_RULE_SETUP -//#line 73 "ETCL/ETCL.ll" -{ TAO_YY_LEX_DEBUG; return TAO_ETCL_LPAREN; } - YY_BREAK -case 23: -YY_RULE_SETUP -//#line 74 "ETCL/ETCL.ll" -{ TAO_YY_LEX_DEBUG; return TAO_ETCL_RPAREN; } - YY_BREAK -case 24: -YY_RULE_SETUP -//#line 75 "ETCL/ETCL.ll" -{ TAO_YY_LEX_DEBUG; return TAO_ETCL_DOLLAR; } - YY_BREAK -case 25: -YY_RULE_SETUP -//#line 76 "ETCL/ETCL.ll" -{ TAO_YY_LEX_DEBUG; return TAO_ETCL_DOT; } - YY_BREAK -case 26: -YY_RULE_SETUP -//#line 77 "ETCL/ETCL.ll" -{ TAO_YY_LEX_DEBUG; return TAO_ETCL_DEFAULT; } - YY_BREAK -case 27: -YY_RULE_SETUP -//#line 78 "ETCL/ETCL.ll" -{ TAO_YY_LEX_DEBUG; return TAO_ETCL_DISCRIMINANT; } - YY_BREAK -case 28: -YY_RULE_SETUP -//#line 79 "ETCL/ETCL.ll" -{ TAO_YY_LEX_DEBUG; return TAO_ETCL_TYPE_ID; } - YY_BREAK -case 29: -YY_RULE_SETUP -//#line 80 "ETCL/ETCL.ll" -{ TAO_YY_LEX_DEBUG; return TAO_ETCL_REPOS_ID; } - YY_BREAK -case 30: -YY_RULE_SETUP -//#line 81 "ETCL/ETCL.ll" -{ TAO_YY_LEX_DEBUG; return TAO_ETCL_LENGTH; } - YY_BREAK -case 31: -YY_RULE_SETUP -//#line 82 "ETCL/ETCL.ll" -{ TAO_YY_LEX_DEBUG; return TAO_ETCL_LBRA; } - YY_BREAK -case 32: -YY_RULE_SETUP -//#line 83 "ETCL/ETCL.ll" -{ TAO_YY_LEX_DEBUG; return TAO_ETCL_RBRA; } - YY_BREAK -case 33: -YY_RULE_SETUP -//#line 84 "ETCL/ETCL.ll" -{ - yylval.constraint = - new TAO_ETCL_Literal_Constraint ((CORBA::Boolean) 1); - TAO_YY_LEX_DEBUG; return TAO_ETCL_BOOLEAN; - } - YY_BREAK -case 34: -YY_RULE_SETUP -//#line 89 "ETCL/ETCL.ll" -{ - yylval.constraint = - new TAO_ETCL_Literal_Constraint ((CORBA::Boolean) 0); - TAO_YY_LEX_DEBUG; return TAO_ETCL_BOOLEAN; - } - YY_BREAK -case 35: -YY_RULE_SETUP -//#line 94 "ETCL/ETCL.ll" -{ - yylval.constraint = - new TAO_ETCL_Literal_Constraint (ACE_OS::atoi (yytext)); - TAO_YY_LEX_DEBUG; return TAO_ETCL_INTEGER; - } - YY_BREAK -case 36: -YY_RULE_SETUP -//#line 99 "ETCL/ETCL.ll" -{ - double v; - sscanf (yytext, "%lf", &v); - yylval.constraint = - new TAO_ETCL_Literal_Constraint (v); - TAO_YY_LEX_DEBUG; return TAO_ETCL_FLOAT; - } - YY_BREAK -case 37: -YY_RULE_SETUP -//#line 106 "ETCL/ETCL.ll" -{ - yylval.constraint = - new TAO_ETCL_Literal_Constraint (extract_string(yytext)); - TAO_YY_LEX_DEBUG; return TAO_ETCL_STRING; - } - YY_BREAK -case 38: -YY_RULE_SETUP -//#line 111 "ETCL/ETCL.ll" -{ - yylval.constraint = - new TAO_ETCL_Identifier (yytext); - TAO_YY_LEX_DEBUG; return TAO_ETCL_IDENT; - } - YY_BREAK -case 39: -YY_RULE_SETUP -//#line 116 "ETCL/ETCL.ll" -{ - TAO_YY_LEX_DEBUG; break; // Ignore - } - YY_BREAK -case 40: -YY_RULE_SETUP -//#line 119 "ETCL/ETCL.ll" -{ - TAO_YY_LEX_DEBUG; break; // @@ TODO - } - YY_BREAK -case 41: -YY_RULE_SETUP -//#line 122 "ETCL/ETCL.ll" -TAO_ETCL_ECHO; - YY_BREAK -case YY_STATE_EOF(INITIAL): - yyterminate(); - - case YY_END_OF_BUFFER: - { - /* Amount of text matched not including the EOB char. */ - int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1; - - /* Undo the effects of YY_DO_BEFORE_ACTION. */ - *yy_cp = yy_hold_char; - YY_RESTORE_YY_MORE_OFFSET - - if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW ) - { - /* We're scanning a new file or input source. It's - * possible that this happened because the user - * just pointed yyin at a new source and called - * yylex(). If so, then we have to assure - * consistency between 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. - */ - yy_n_chars = yy_current_buffer->yy_n_chars; - yy_current_buffer->yy_input_file = yyin; - yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL; - } - - /* Note that here we test for yy_c_buf_p "<=" to the position - * of the first EOB in the buffer, since 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 ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] ) - { /* This was really a NUL. */ - yy_state_type yy_next_state; - - yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state(); - - /* Okay, we're now positioned to make the NUL - * transition. We couldn't have - * 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). - */ - - yy_next_state = yy_try_NUL_trans( yy_current_state ); - - yy_bp = yytext_ptr + YY_MORE_ADJ; - - if ( yy_next_state ) - { - /* Consume the NUL. */ - yy_cp = ++yy_c_buf_p; - yy_current_state = yy_next_state; - goto yy_match; - } - - else - { - yy_cp = yy_c_buf_p; - goto yy_find_action; - } - } - - else switch ( yy_get_next_buffer() ) - { - case EOB_ACT_END_OF_FILE: - { - yy_did_buffer_switch_on_eof = 0; - - if ( yywrap() ) - { - /* Note: because we've taken care in - * yy_get_next_buffer() to have set up - * yytext, we can now set up - * yy_c_buf_p so that if some total - * hoser (like flex itself) wants to - * call the scanner after we return the - * YY_NULL, it'll still work - another - * YY_NULL will get returned. - */ - yy_c_buf_p = yytext_ptr + YY_MORE_ADJ; - - yy_act = YY_STATE_EOF(YY_START); - goto do_action; - } - - else - { - if ( ! yy_did_buffer_switch_on_eof ) - YY_NEW_FILE; - } - break; - } - - case EOB_ACT_CONTINUE_SCAN: - yy_c_buf_p = - yytext_ptr + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state(); - - yy_cp = yy_c_buf_p; - yy_bp = yytext_ptr + YY_MORE_ADJ; - goto yy_match; - - case EOB_ACT_LAST_MATCH: - yy_c_buf_p = - &yy_current_buffer->yy_ch_buf[yy_n_chars]; - - yy_current_state = yy_get_previous_state(); - - yy_cp = yy_c_buf_p; - yy_bp = yytext_ptr + YY_MORE_ADJ; - goto yy_find_action; - } - break; - } - - default: - YY_FATAL_ERROR( - "fatal flex scanner internal error--no action found" ); - } /* end of action switch */ - } /* end of scanning one token */ - } /* end of yylex */ - - -/* 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 - */ - -static int yy_get_next_buffer() - { - register char *dest = yy_current_buffer->yy_ch_buf; - register char *source = yytext_ptr; - register int number_to_move, i; - int ret_val; - - if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] ) - YY_FATAL_ERROR( - "fatal flex scanner internal error--end of buffer missed" ); - - if ( yy_current_buffer->yy_fill_buffer == 0 ) - { /* Don't try to fill the buffer, so this is an EOF. */ - if ( yy_c_buf_p - yytext_ptr - 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) (yy_c_buf_p - yytext_ptr) - 1; - - for ( i = 0; i < number_to_move; ++i ) - *(dest++) = *(source++); - - if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING ) - /* don't do the read, it's not guaranteed to return an EOF, - * just force an EOF - */ - yy_current_buffer->yy_n_chars = yy_n_chars = 0; - - else - { - int num_to_read = - yy_current_buffer->yy_buf_size - number_to_move - 1; - - while ( num_to_read <= 0 ) - { /* Not enough room in the buffer - grow it. */ -#ifdef YY_USES_REJECT - YY_FATAL_ERROR( -"input buffer overflow, can't enlarge buffer because scanner uses REJECT" ); -#else - - /* just a shorter name for the current buffer */ - YY_BUFFER_STATE b = yy_current_buffer; - - int yy_c_buf_p_offset = - (int) (yy_c_buf_p - b->yy_ch_buf); - - if ( b->yy_is_our_buffer ) - { - int new_size = b->yy_buf_size * 2; - - if ( new_size <= 0 ) - b->yy_buf_size += b->yy_buf_size / 8; - else - b->yy_buf_size *= 2; - - b->yy_ch_buf = (char *) - /* Include room in for 2 EOB chars. */ - yy_flex_realloc( (void *) b->yy_ch_buf, - b->yy_buf_size + 2 ); - } - else - /* Can't grow it, we don't own it. */ - b->yy_ch_buf = 0; - - if ( ! b->yy_ch_buf ) - YY_FATAL_ERROR( - "fatal error - scanner input buffer overflow" ); - - yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; - - num_to_read = yy_current_buffer->yy_buf_size - - number_to_move - 1; -#endif - } - - if ( num_to_read > YY_READ_BUF_SIZE ) - num_to_read = YY_READ_BUF_SIZE; - - /* Read in more data. */ - YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]), - yy_n_chars, num_to_read ); - - yy_current_buffer->yy_n_chars = yy_n_chars; - } - - if ( yy_n_chars == 0 ) - { - if ( number_to_move == YY_MORE_ADJ ) - { - ret_val = EOB_ACT_END_OF_FILE; - yyrestart( yyin ); - } - - else - { - ret_val = EOB_ACT_LAST_MATCH; - yy_current_buffer->yy_buffer_status = - YY_BUFFER_EOF_PENDING; - } - } - - else - ret_val = EOB_ACT_CONTINUE_SCAN; - - yy_n_chars += number_to_move; - yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR; - yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; - - yytext_ptr = &yy_current_buffer->yy_ch_buf[0]; - - return ret_val; - } - - -/* yy_get_previous_state - get the state just before the EOB char was reached */ - -static yy_state_type yy_get_previous_state() - { - register yy_state_type yy_current_state; - register char *yy_cp; - - yy_current_state = yy_start; - - for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp ) - { - register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); - if ( yy_accept[yy_current_state] ) - { - yy_last_accepting_state = yy_current_state; - yy_last_accepting_cpos = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 118 ) - yy_c = yy_meta[(unsigned int) yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - } - - return yy_current_state; - } - - -/* yy_try_NUL_trans - try to make a transition on the NUL character - * - * synopsis - * next_state = yy_try_NUL_trans( current_state ); - */ - -#ifdef YY_USE_PROTOS -static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state ) -#else -static yy_state_type yy_try_NUL_trans( yy_current_state ) -yy_state_type yy_current_state; -#endif - { - register int yy_is_jam; - register char *yy_cp = yy_c_buf_p; - - register YY_CHAR yy_c = 1; - if ( yy_accept[yy_current_state] ) - { - yy_last_accepting_state = yy_current_state; - yy_last_accepting_cpos = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 118 ) - yy_c = yy_meta[(unsigned int) yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - yy_is_jam = (yy_current_state == 117); - - return yy_is_jam ? 0 : yy_current_state; - } - -#if 0 -#ifndef YY_NO_UNPUT -#ifdef YY_USE_PROTOS -static void yyunput( int c, register char *yy_bp ) -#else -static void yyunput( c, yy_bp ) -int c; -register char *yy_bp; -#endif - { - register char *yy_cp = yy_c_buf_p; - - /* undo effects of setting up yytext */ - *yy_cp = yy_hold_char; - - if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) - { /* need to shift things up to make room */ - /* +2 for EOB chars. */ - register int number_to_move = yy_n_chars + 2; - register char *dest = &yy_current_buffer->yy_ch_buf[ - yy_current_buffer->yy_buf_size + 2]; - register char *source = - &yy_current_buffer->yy_ch_buf[number_to_move]; - - while ( source > yy_current_buffer->yy_ch_buf ) - *--dest = *--source; - - yy_cp += (int) (dest - source); - yy_bp += (int) (dest - source); - yy_current_buffer->yy_n_chars = - yy_n_chars = yy_current_buffer->yy_buf_size; - - if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) - YY_FATAL_ERROR( "flex scanner push-back overflow" ); - } - - *--yy_cp = (char) c; - - - yytext_ptr = yy_bp; - yy_hold_char = *yy_cp; - yy_c_buf_p = yy_cp; - } -#endif /* ifndef YY_NO_UNPUT */ -#endif /* 0 */ - -#ifdef __cplusplus -static int yyinput() -#else -static int input() -#endif - { - int c; - - *yy_c_buf_p = yy_hold_char; - - if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) - { - /* 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 ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] ) - /* This was really a NUL. */ - *yy_c_buf_p = '\0'; - - else - { /* need more input */ - int offset = yy_c_buf_p - yytext_ptr; - ++yy_c_buf_p; - - switch ( yy_get_next_buffer() ) - { - case EOB_ACT_LAST_MATCH: - /* This happens because 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. */ - yyrestart( yyin ); - - /* fall through */ - - case EOB_ACT_END_OF_FILE: - { - if ( yywrap() ) - return EOF; - - if ( ! yy_did_buffer_switch_on_eof ) - YY_NEW_FILE; -#ifdef __cplusplus - return yyinput(); -#else - return input(); -#endif - } - - case EOB_ACT_CONTINUE_SCAN: - yy_c_buf_p = yytext_ptr + offset; - break; - } - } - } - - c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */ - *yy_c_buf_p = '\0'; /* preserve yytext */ - yy_hold_char = *++yy_c_buf_p; - - - return c; - } - -void yyflush_current_buffer (void) -{ - YY_FLUSH_BUFFER; -} - - -#ifdef YY_USE_PROTOS -void yyrestart( FILE *input_file ) -#else -void yyrestart( input_file ) -FILE *input_file; -#endif - { - if ( ! yy_current_buffer ) - yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); - - yy_init_buffer( yy_current_buffer, input_file ); - yy_load_buffer_state(); - } - - -#ifdef YY_USE_PROTOS -void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer ) -#else -void yy_switch_to_buffer( new_buffer ) -YY_BUFFER_STATE new_buffer; -#endif - { - if ( yy_current_buffer == new_buffer ) - return; - - if ( yy_current_buffer ) - { - /* Flush out information for old buffer. */ - *yy_c_buf_p = yy_hold_char; - yy_current_buffer->yy_buf_pos = yy_c_buf_p; - yy_current_buffer->yy_n_chars = yy_n_chars; - } - - yy_current_buffer = new_buffer; - yy_load_buffer_state(); - - /* We don't actually know whether we did this switch during - * EOF (yywrap()) processing, but the only time this flag - * is looked at is after yywrap() is called, so it's safe - * to go ahead and always set it. - */ - yy_did_buffer_switch_on_eof = 1; - } - - -#ifdef YY_USE_PROTOS -void yy_load_buffer_state( void ) -#else -void yy_load_buffer_state() -#endif - { - yy_n_chars = yy_current_buffer->yy_n_chars; - yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos; - yyin = yy_current_buffer->yy_input_file; - yy_hold_char = *yy_c_buf_p; - } - - -#ifdef YY_USE_PROTOS -YY_BUFFER_STATE yy_create_buffer( FILE *file, int size ) -#else -YY_BUFFER_STATE yy_create_buffer( file, size ) -FILE *file; -int size; -#endif - { - YY_BUFFER_STATE b; - - b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); - if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); - - b->yy_buf_size = size; - - /* 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->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 ); - if ( ! b->yy_ch_buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); - - b->yy_is_our_buffer = 1; - - yy_init_buffer( b, file ); - - return b; - } - - -#ifdef YY_USE_PROTOS -void yy_delete_buffer( YY_BUFFER_STATE b ) -#else -void yy_delete_buffer( b ) -YY_BUFFER_STATE b; -#endif - { - if ( ! b ) - return; - - if ( b == yy_current_buffer ) - yy_current_buffer = (YY_BUFFER_STATE) 0; - - if ( b->yy_is_our_buffer ) - yy_flex_free( (void *) b->yy_ch_buf ); - - yy_flex_free( (void *) b ); - } - - - -#ifdef YY_USE_PROTOS -void yy_init_buffer( YY_BUFFER_STATE b, FILE *file ) -#else -void yy_init_buffer( b, file ) -YY_BUFFER_STATE b; -FILE *file; -#endif - - - { - yy_flush_buffer( b ); - - b->yy_input_file = file; - b->yy_fill_buffer = 1; - -#if defined (ACE_HAS_WINCE) - // Mimic the behavior as WinCE does not have isatty(). - if ((file != 0) && (file == fileno(file))) { - b->yy_is_interactive = 1; - } - else { - b->yy_is_interactive = 0; - } -#else - b->yy_is_interactive = file ? (ACE_OS::isatty( fileno(file) ) > 0) : 0; -#endif // ACE_HAS_WINCE - - } - - -#ifdef YY_USE_PROTOS -void yy_flush_buffer( YY_BUFFER_STATE b ) -#else -void yy_flush_buffer( b ) -YY_BUFFER_STATE b; -#endif - - { - if ( ! b ) - return; - - b->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->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; - b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; - - b->yy_buf_pos = &b->yy_ch_buf[0]; - - b->yy_at_bol = 1; - b->yy_buffer_status = YY_BUFFER_NEW; - - if ( b == yy_current_buffer ) - yy_load_buffer_state(); - } - - -#ifndef YY_NO_SCAN_BUFFER -#ifdef YY_USE_PROTOS -YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size ) -#else -YY_BUFFER_STATE yy_scan_buffer( base, size ) -char *base; -yy_size_t size; -#endif - { - YY_BUFFER_STATE b; - - if ( size < 2 || - base[size-2] != YY_END_OF_BUFFER_CHAR || - base[size-1] != YY_END_OF_BUFFER_CHAR ) - /* They forgot to leave room for the EOB's. */ - return 0; - - b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); - if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); - - b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ - b->yy_buf_pos = b->yy_ch_buf = base; - b->yy_is_our_buffer = 0; - b->yy_input_file = 0; - b->yy_n_chars = b->yy_buf_size; - b->yy_is_interactive = 0; - b->yy_at_bol = 1; - b->yy_fill_buffer = 0; - b->yy_buffer_status = YY_BUFFER_NEW; - - yy_switch_to_buffer( b ); - - return b; - } -#endif - - -#ifndef YY_NO_SCAN_STRING -#ifdef YY_USE_PROTOS -YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str ) -#else -YY_BUFFER_STATE yy_scan_string( yy_str ) -yyconst char *yy_str; -#endif - { - int len; - for ( len = 0; yy_str[len]; ++len ) - ; - - return yy_scan_bytes( yy_str, len ); - } -#endif - - -#ifndef YY_NO_SCAN_BYTES -#ifdef YY_USE_PROTOS -YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len ) -#else -YY_BUFFER_STATE yy_scan_bytes( bytes, len ) -yyconst char *bytes; -int len; -#endif - { - YY_BUFFER_STATE b; - char *buf; - yy_size_t n; - int i; - - /* Get memory for full buffer, including space for trailing EOB's. */ - n = len + 2; - buf = (char *) yy_flex_alloc( n ); - if ( ! buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); - - for ( i = 0; i < len; ++i ) - buf[i] = bytes[i]; - - buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR; - - b = yy_scan_buffer( buf, n ); - if ( ! b ) - YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); - - /* It's okay to grow etc. this buffer, and we should throw it - * away when we're done. - */ - b->yy_is_our_buffer = 1; - - return b; - } -#endif - - -#ifndef YY_NO_PUSH_STATE -#ifdef YY_USE_PROTOS -static void yy_push_state( int new_state ) -#else -static void yy_push_state( new_state ) -int new_state; -#endif - { - if ( yy_start_stack_ptr >= yy_start_stack_depth ) - { - yy_size_t new_size; - - yy_start_stack_depth += YY_START_STACK_INCR; - new_size = yy_start_stack_depth * sizeof( int ); - - if ( ! yy_start_stack ) - yy_start_stack = (int *) yy_flex_alloc( new_size ); - - else - yy_start_stack = (int *) yy_flex_realloc( - (void *) yy_start_stack, new_size ); - - if ( ! yy_start_stack ) - YY_FATAL_ERROR( - "out of memory expanding start-condition stack" ); - } - - yy_start_stack[yy_start_stack_ptr++] = YY_START; - - BEGIN(new_state); - } -#endif - - -#ifndef YY_NO_POP_STATE -static void yy_pop_state() - { - if ( --yy_start_stack_ptr < 0 ) - YY_FATAL_ERROR( "start-condition stack underflow" ); - - BEGIN(yy_start_stack[yy_start_stack_ptr]); - } -#endif - - -#ifndef YY_NO_TOP_STATE -static int yy_top_state() - { - return yy_start_stack[yy_start_stack_ptr - 1]; - } -#endif - -#ifndef YY_EXIT_FAILURE -#define YY_EXIT_FAILURE 2 -#endif - -#ifdef YY_USE_PROTOS -static void yy_fatal_error( yyconst char msg[] ) -#else -static void yy_fatal_error( msg ) -char msg[]; -#endif - { - (void) ACE_OS::fprintf( stderr, "%s\n", msg ); - ACE_OS::exit( YY_EXIT_FAILURE ); - } - - - -/* Redefine yyless() so it works in section 3 code. */ - -#undef yyless -#define yyless(n) \ - do \ - { \ - /* Undo effects of setting up yytext. */ \ - yytext[yyleng] = yy_hold_char; \ - yy_c_buf_p = yytext + n; \ - yy_hold_char = *yy_c_buf_p; \ - *yy_c_buf_p = '\0'; \ - yyleng = n; \ - } \ - while ( 0 ) - - -/* Internal utility routines. */ - -#ifndef yytext_ptr -#ifdef YY_USE_PROTOS -static void yy_flex_strncpy( char *s1, yyconst char *s2, int n ) -#else -static void yy_flex_strncpy( s1, s2, n ) -char *s1; -yyconst char *s2; -int n; -#endif - { - register int i; - for ( i = 0; i < n; ++i ) - s1[i] = s2[i]; - } -#endif - -#ifdef YY_NEED_STRLEN -#ifdef YY_USE_PROTOS -static int yy_flex_strlen( yyconst char *s ) -#else -static int yy_flex_strlen( s ) -yyconst char *s; -#endif - { - register int n; - for ( n = 0; s[n]; ++n ) - ; - - return n; - } -#endif - - -#ifdef YY_USE_PROTOS -static void *yy_flex_alloc( yy_size_t size ) -#else -static void *yy_flex_alloc( size ) -yy_size_t size; -#endif - { - return (void *) ACE_OS::malloc( size ); - } - -#ifdef YY_USE_PROTOS -static void *yy_flex_realloc( void *ptr, yy_size_t size ) -#else -static void *yy_flex_realloc( ptr, size ) -void *ptr; -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 *) ACE_OS::realloc( (char *) ptr, size ); - } - -#ifdef YY_USE_PROTOS -static void yy_flex_free( void *ptr ) -#else -static void yy_flex_free( ptr ) -void *ptr; -#endif - { - ACE_OS::free( ptr ); - } - -#if YY_MAIN -int main() - { - yylex(); - return 0; - } -#endif -//#line 122 "ETCL/ETCL.ll" - - -const char* -extract_string(char* str) -{ - char *t = str; - for (char * i = str + 1; *i != '\''; ++i, ++t) - { - if (*i == '\\') - { - ++i; - if (*i == 0) - return 0; - else if (*i == 't') - *t = '\t'; - else if (*i == 'n') - *t = '\n'; - else if (*i == '\\') - *t = '\\'; - else - *t = *i; - continue; - } - - *t = *i; - } - - *t = '\0'; - return str; -} - -int -yywrap (void) -{ - return 1; -} - -TAO_END_VERSIONED_NAMESPACE_DECL diff --git a/TAO/orbsvcs/orbsvcs/ETCL/ETCL_l.cpp.diff b/TAO/orbsvcs/orbsvcs/ETCL/ETCL_l.cpp.diff deleted file mode 100644 index 9709c130de2..00000000000 --- a/TAO/orbsvcs/orbsvcs/ETCL/ETCL_l.cpp.diff +++ /dev/null @@ -1,511 +0,0 @@ ---- bison_gen\ETCL_l.cpp 2005-07-19 10:09:28.523824100 -0700 -+++ ETCL_l.cpp 2005-07-19 09:47:22.138585300 -0700 -@@ -1,15 +1,14 @@ -+ - /* A lexical scanner generated by flex */ - - /* Scanner skeleton version: -- * $Header$ -+ * $Id$ - */ - - #define FLEX_SCANNER - #define YY_FLEX_MAJOR_VERSION 2 - #define YY_FLEX_MINOR_VERSION 5 - --#include <stdio.h> -- - - /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */ - #ifdef c_plusplus -@@ -21,8 +20,7 @@ - - #ifdef __cplusplus - --#include <stdlib.h> --#include <unistd.h> -+#include "ace/OS.h" - - /* Use prototypes in function declarations. */ - #define YY_USE_PROTOS -@@ -262,8 +260,8 @@ - #define YY_AT_BOL() (yy_current_buffer->yy_at_bol) - - --#define yywrap() 1 --#define YY_SKIP_YYWRAP -+//#define yywrap() 1 -+//#define YY_SKIP_YYWRAP - typedef unsigned char YY_CHAR; - FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0; - typedef int yy_state_type; -@@ -444,15 +442,15 @@ - #define YY_MORE_ADJ 0 - #define YY_RESTORE_YY_MORE_OFFSET - char *yytext; --#line 1 "ETCL.ll" -+//#line 1 "ETCL/ETCL.ll" - #define INITIAL 0 --#line 4 "ETCL.ll" -+//#line 4 "ETCL/ETCL.ll" - // $Id$ - // ======================================================================== - // - // = LIBRARY - // orbsvcs/ECTL --// -+// - // = FILENAME - // ETCL.ll - // -@@ -462,12 +460,12 @@ - // - // ======================================================================== - --#include "ace/OS.h" -- -+#include "ETCL_Interpreter.h" - #include "ETCL_Constraint.h" - #include "ETCL_y.h" - --static const char * extract_string(char*); -+static const char* extract_string(char*); -+//static const char * extract_string(char*); - - #define TAO_YY_LEX_DEBUG - -@@ -475,12 +473,11 @@ - #define TAO_YY_LEX_DEBUG TAO_OS::fprintf(stderr, "%s\n", yytext) - #endif /* TAO_CONSTRAINT_DEBUG */ - --#define YY_DECL int TAO_ETCL_yylex (TAO_ETCL_YYSTYPE *lvalp, void* state) -+//#define YY_DECL int TAO_ETCL_yylex (TAO_ETCL_YYSTYPE *lvalp, void* state) - - #define YY_BREAK - #define YY_NO_UNPUT - --#line 484 "lex.yy.c" - - /* Macros after this point can all be overridden by user definitions in - * section 1. -@@ -494,10 +491,6 @@ - #endif - #endif - --#ifndef YY_NO_UNPUT --static void yyunput YY_PROTO(( int c, char *buf_ptr )); --#endif -- - #ifndef yytext_ptr - static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int )); - #endif -@@ -556,11 +549,11 @@ - - /* Copy whatever the last rule matched to the standard output. */ - --#ifndef ECHO -+#ifndef TAO_ETCL_ECHO - /* This used to be an fputs(), but since the string might contain NUL's, - * we now use fwrite(). - */ --#define ECHO (void) fwrite( yytext, yyleng, 1, yyout ) -+#define TAO_ETCL_ECHO (void) fwrite( yytext, yyleng, 1, yyout ) - #endif - - /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, -@@ -628,13 +621,11 @@ - YY_DECL - { - register yy_state_type yy_current_state; -- register char *yy_cp, *yy_bp; -+ register char *yy_cp = 0; -+ register char *yy_bp = 0; - register int yy_act; - --#line 50 "ETCL.ll" -- -- --#line 638 "lex.yy.c" -+//#line 50 "ETCL/ETCL.ll" - - if ( yy_init ) - { -@@ -719,240 +710,239 @@ - - case 1: - YY_RULE_SETUP --#line 52 "ETCL.ll" -+//#line 52 "ETCL/ETCL.ll" - { TAO_YY_LEX_DEBUG; return TAO_ETCL_MIN; } - YY_BREAK - case 2: - YY_RULE_SETUP --#line 53 "ETCL.ll" -+//#line 53 "ETCL/ETCL.ll" - { TAO_YY_LEX_DEBUG; return TAO_ETCL_MAX; } - YY_BREAK - case 3: - YY_RULE_SETUP --#line 54 "ETCL.ll" -+//#line 54 "ETCL/ETCL.ll" - { TAO_YY_LEX_DEBUG; return TAO_ETCL_FIRST; } - YY_BREAK - case 4: - YY_RULE_SETUP --#line 55 "ETCL.ll" -+//#line 55 "ETCL/ETCL.ll" - { TAO_YY_LEX_DEBUG; return TAO_ETCL_RANDOM; } - YY_BREAK - case 5: - YY_RULE_SETUP --#line 56 "ETCL.ll" -+//#line 56 "ETCL/ETCL.ll" - { TAO_YY_LEX_DEBUG; return TAO_ETCL_WITH; } - YY_BREAK - case 6: - YY_RULE_SETUP --#line 57 "ETCL.ll" -+//#line 57 "ETCL/ETCL.ll" - { TAO_YY_LEX_DEBUG; return TAO_ETCL_EXIST; } - YY_BREAK - case 7: - YY_RULE_SETUP --#line 58 "ETCL.ll" -+//#line 58 "ETCL/ETCL.ll" - { TAO_YY_LEX_DEBUG; return TAO_ETCL_NOT; } - YY_BREAK - case 8: - YY_RULE_SETUP --#line 59 "ETCL.ll" -+//#line 59 "ETCL/ETCL.ll" - { TAO_YY_LEX_DEBUG; return TAO_ETCL_AND; } - YY_BREAK - case 9: - YY_RULE_SETUP --#line 60 "ETCL.ll" -+//#line 60 "ETCL/ETCL.ll" - { TAO_YY_LEX_DEBUG; return TAO_ETCL_OR; } - YY_BREAK - case 10: - YY_RULE_SETUP --#line 61 "ETCL.ll" -+//#line 61 "ETCL/ETCL.ll" - { TAO_YY_LEX_DEBUG; return TAO_ETCL_IN; } - YY_BREAK - case 11: - YY_RULE_SETUP --#line 62 "ETCL.ll" -+//#line 62 "ETCL/ETCL.ll" - { TAO_YY_LEX_DEBUG; return TAO_ETCL_TWIDDLE; } - YY_BREAK - case 12: - YY_RULE_SETUP --#line 63 "ETCL.ll" -+//#line 63 "ETCL/ETCL.ll" - { TAO_YY_LEX_DEBUG; return TAO_ETCL_PLUS; } - YY_BREAK - case 13: - YY_RULE_SETUP --#line 64 "ETCL.ll" -+//#line 64 "ETCL/ETCL.ll" - { TAO_YY_LEX_DEBUG; return TAO_ETCL_MINUS; } - YY_BREAK - case 14: - YY_RULE_SETUP --#line 65 "ETCL.ll" -+//#line 65 "ETCL/ETCL.ll" - { TAO_YY_LEX_DEBUG; return TAO_ETCL_MULT; } - YY_BREAK - case 15: - YY_RULE_SETUP --#line 66 "ETCL.ll" -+//#line 66 "ETCL/ETCL.ll" - { TAO_YY_LEX_DEBUG; return TAO_ETCL_DIV; } - YY_BREAK - case 16: - YY_RULE_SETUP --#line 67 "ETCL.ll" -+//#line 67 "ETCL/ETCL.ll" - { TAO_YY_LEX_DEBUG; return TAO_ETCL_LT; } - YY_BREAK - case 17: - YY_RULE_SETUP --#line 68 "ETCL.ll" -+//#line 68 "ETCL/ETCL.ll" - { TAO_YY_LEX_DEBUG; return TAO_ETCL_LE; } - YY_BREAK - case 18: - YY_RULE_SETUP --#line 69 "ETCL.ll" -+//#line 69 "ETCL/ETCL.ll" - { TAO_YY_LEX_DEBUG; return TAO_ETCL_GT; } - YY_BREAK - case 19: - YY_RULE_SETUP --#line 70 "ETCL.ll" -+//#line 70 "ETCL/ETCL.ll" - { TAO_YY_LEX_DEBUG; return TAO_ETCL_GE; } - YY_BREAK - case 20: - YY_RULE_SETUP --#line 71 "ETCL.ll" -+//#line 71 "ETCL/ETCL.ll" - { TAO_YY_LEX_DEBUG; return TAO_ETCL_EQ; } - YY_BREAK - case 21: - YY_RULE_SETUP --#line 72 "ETCL.ll" -+//#line 72 "ETCL/ETCL.ll" - { TAO_YY_LEX_DEBUG; return TAO_ETCL_NE; } - YY_BREAK - case 22: - YY_RULE_SETUP --#line 73 "ETCL.ll" -+//#line 73 "ETCL/ETCL.ll" - { TAO_YY_LEX_DEBUG; return TAO_ETCL_LPAREN; } - YY_BREAK - case 23: - YY_RULE_SETUP --#line 74 "ETCL.ll" -+//#line 74 "ETCL/ETCL.ll" - { TAO_YY_LEX_DEBUG; return TAO_ETCL_RPAREN; } - YY_BREAK - case 24: - YY_RULE_SETUP --#line 75 "ETCL.ll" -+//#line 75 "ETCL/ETCL.ll" - { TAO_YY_LEX_DEBUG; return TAO_ETCL_DOLLAR; } - YY_BREAK - case 25: - YY_RULE_SETUP --#line 76 "ETCL.ll" -+//#line 76 "ETCL/ETCL.ll" - { TAO_YY_LEX_DEBUG; return TAO_ETCL_DOT; } - YY_BREAK - case 26: - YY_RULE_SETUP --#line 77 "ETCL.ll" -+//#line 77 "ETCL/ETCL.ll" - { TAO_YY_LEX_DEBUG; return TAO_ETCL_DEFAULT; } - YY_BREAK - case 27: - YY_RULE_SETUP --#line 78 "ETCL.ll" -+//#line 78 "ETCL/ETCL.ll" - { TAO_YY_LEX_DEBUG; return TAO_ETCL_DISCRIMINANT; } - YY_BREAK - case 28: - YY_RULE_SETUP --#line 79 "ETCL.ll" -+//#line 79 "ETCL/ETCL.ll" - { TAO_YY_LEX_DEBUG; return TAO_ETCL_TYPE_ID; } - YY_BREAK - case 29: - YY_RULE_SETUP --#line 80 "ETCL.ll" -+//#line 80 "ETCL/ETCL.ll" - { TAO_YY_LEX_DEBUG; return TAO_ETCL_REPOS_ID; } - YY_BREAK - case 30: - YY_RULE_SETUP --#line 81 "ETCL.ll" -+//#line 81 "ETCL/ETCL.ll" - { TAO_YY_LEX_DEBUG; return TAO_ETCL_LENGTH; } - YY_BREAK - case 31: - YY_RULE_SETUP --#line 82 "ETCL.ll" -+//#line 82 "ETCL/ETCL.ll" - { TAO_YY_LEX_DEBUG; return TAO_ETCL_LBRA; } - YY_BREAK - case 32: - YY_RULE_SETUP --#line 83 "ETCL.ll" -+//#line 83 "ETCL/ETCL.ll" - { TAO_YY_LEX_DEBUG; return TAO_ETCL_RBRA; } - YY_BREAK - case 33: - YY_RULE_SETUP --#line 84 "ETCL.ll" --{ -- lvalp->constraint = -+//#line 84 "ETCL/ETCL.ll" -+{ -+ yylval.constraint = - new TAO_ETCL_Literal_Constraint ((CORBA::Boolean) 1); - TAO_YY_LEX_DEBUG; return TAO_ETCL_BOOLEAN; - } - YY_BREAK - case 34: - YY_RULE_SETUP --#line 89 "ETCL.ll" --{ -- lvalp->constraint = -+//#line 89 "ETCL/ETCL.ll" -+{ -+ yylval.constraint = - new TAO_ETCL_Literal_Constraint ((CORBA::Boolean) 0); - TAO_YY_LEX_DEBUG; return TAO_ETCL_BOOLEAN; - } - YY_BREAK - case 35: - YY_RULE_SETUP --#line 94 "ETCL.ll" --{ -- lvalp->constraint = -+//#line 94 "ETCL/ETCL.ll" -+{ -+ yylval.constraint = - new TAO_ETCL_Literal_Constraint (ACE_OS::atoi (yytext)); -- TAO_YY_LEX_DEBUG; return TAO_ETCL_INTEGER; -+ TAO_YY_LEX_DEBUG; return TAO_ETCL_INTEGER; - } - YY_BREAK - case 36: - YY_RULE_SETUP --#line 99 "ETCL.ll" -+//#line 99 "ETCL/ETCL.ll" - { - double v; -- sscanf (yytext, "%lf", &v); -- lvalp->constraint = -+ sscanf (yytext, "%lf", &v); -+ yylval.constraint = - new TAO_ETCL_Literal_Constraint (v); -- TAO_YY_LEX_DEBUG; return TAO_ETCL_FLOAT; -+ TAO_YY_LEX_DEBUG; return TAO_ETCL_FLOAT; - } - YY_BREAK - case 37: - YY_RULE_SETUP --#line 106 "ETCL.ll" --{ -- lvalp->constraint = -- new TAO_ETCL_Literal_Constraint (extract_string (yytext)); -- TAO_YY_LEX_DEBUG; return TAO_ETCL_STRING; -+//#line 106 "ETCL/ETCL.ll" -+{ -+ yylval.constraint = -+ new TAO_ETCL_Literal_Constraint (extract_string(yytext)); -+ TAO_YY_LEX_DEBUG; return TAO_ETCL_STRING; - } - YY_BREAK - case 38: - YY_RULE_SETUP --#line 111 "ETCL.ll" --{ -- lvalp->constraint = -+//#line 111 "ETCL/ETCL.ll" -+{ -+ yylval.constraint = - new TAO_ETCL_Identifier (yytext); -- TAO_YY_LEX_DEBUG; return TAO_ETCL_IDENT; -+ TAO_YY_LEX_DEBUG; return TAO_ETCL_IDENT; - } - YY_BREAK - case 39: - YY_RULE_SETUP --#line 116 "ETCL.ll" --{ -+//#line 116 "ETCL/ETCL.ll" -+{ - TAO_YY_LEX_DEBUG; break; // Ignore - } - YY_BREAK - case 40: - YY_RULE_SETUP --#line 119 "ETCL.ll" --{ -+//#line 119 "ETCL/ETCL.ll" -+{ - TAO_YY_LEX_DEBUG; break; // @@ TODO - } - YY_BREAK - case 41: - YY_RULE_SETUP --#line 122 "ETCL.ll" --ECHO; -+//#line 122 "ETCL/ETCL.ll" -+TAO_ETCL_ECHO; - YY_BREAK --#line 956 "lex.yy.c" - case YY_STATE_EOF(INITIAL): - yyterminate(); - -@@ -1288,7 +1278,7 @@ - return yy_is_jam ? 0 : yy_current_state; - } - -- -+#if 0 - #ifndef YY_NO_UNPUT - #ifdef YY_USE_PROTOS - static void yyunput( int c, register char *yy_bp ) -@@ -1332,7 +1322,7 @@ - yy_c_buf_p = yy_cp; - } - #endif /* ifndef YY_NO_UNPUT */ -- -+#endif /* 0 */ - - #ifdef __cplusplus - static int yyinput() -@@ -1406,6 +1396,11 @@ - return c; - } - -+void yyflush_current_buffer (void) -+{ -+ YY_FLUSH_BUFFER; -+} -+ - - #ifdef YY_USE_PROTOS - void yyrestart( FILE *input_file ) -@@ -1516,11 +1511,6 @@ - } - - --#ifndef YY_ALWAYS_INTERACTIVE --#ifndef YY_NEVER_INTERACTIVE --extern int isatty YY_PROTO(( int )); --#endif --#endif - - #ifdef YY_USE_PROTOS - void yy_init_buffer( YY_BUFFER_STATE b, FILE *file ) -@@ -1537,15 +1527,18 @@ - b->yy_input_file = file; - b->yy_fill_buffer = 1; - --#if YY_ALWAYS_INTERACTIVE -- b->yy_is_interactive = 1; --#else --#if YY_NEVER_INTERACTIVE -- b->yy_is_interactive = 0; -+#if defined (ACE_HAS_WINCE) -+ // Mimic the behavior as WinCE does not have isatty(). -+ if ((file != 0) && (file == fileno(file))) { -+ b->yy_is_interactive = 1; -+ } -+ else { -+ b->yy_is_interactive = 0; -+ } - #else - b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; --#endif --#endif -+#endif // ACE_HAS_WINCE -+ - } - - -@@ -1838,7 +1831,7 @@ - return 0; - } - #endif --#line 122 "ETCL.ll" -+//#line 122 "ETCL/ETCL.ll" - - - const char* diff --git a/TAO/orbsvcs/orbsvcs/ETCL/ETCL_y.cpp b/TAO/orbsvcs/orbsvcs/ETCL/ETCL_y.cpp deleted file mode 100644 index 28315a6e32b..00000000000 --- a/TAO/orbsvcs/orbsvcs/ETCL/ETCL_y.cpp +++ /dev/null @@ -1,1295 +0,0 @@ -// $Id$ - -/* A Bison parser, made from ETCL/ETCL.yy - by GNU Bison version 1.28 */ - -#define YYBISON 1 /* Identify Bison output. */ - -#define TAO_ETCL_GT 257 -#define TAO_ETCL_GE 258 -#define TAO_ETCL_LT 259 -#define TAO_ETCL_LE 260 -#define TAO_ETCL_EQ 261 -#define TAO_ETCL_NE 262 -#define TAO_ETCL_EXIST 263 -#define TAO_ETCL_DEFAULT 264 -#define TAO_ETCL_AND 265 -#define TAO_ETCL_OR 266 -#define TAO_ETCL_NOT 267 -#define TAO_ETCL_IN 268 -#define TAO_ETCL_TWIDDLE 269 -#define TAO_ETCL_BOOLEAN 270 -#define TAO_ETCL_PLUS 271 -#define TAO_ETCL_MINUS 272 -#define TAO_ETCL_MULT 273 -#define TAO_ETCL_DIV 274 -#define TAO_ETCL_UMINUS 275 -#define TAO_ETCL_INTEGER 276 -#define TAO_ETCL_FLOAT 277 -#define TAO_ETCL_STRING 278 -#define TAO_ETCL_RPAREN 279 -#define TAO_ETCL_LPAREN 280 -#define TAO_ETCL_RBRA 281 -#define TAO_ETCL_LBRA 282 -#define TAO_ETCL_IDENT 283 -#define TAO_ETCL_UNSIGNED 284 -#define TAO_ETCL_SIGNED 285 -#define TAO_ETCL_DOUBLE 286 -#define TAO_ETCL_CONSTRAINT 287 -#define TAO_ETCL_COMPONENT 288 -#define TAO_ETCL_WITH 289 -#define TAO_ETCL_MAX 290 -#define TAO_ETCL_MIN 291 -#define TAO_ETCL_FIRST 292 -#define TAO_ETCL_RANDOM 293 -#define TAO_ETCL_DOLLAR 294 -#define TAO_ETCL_DOT 295 -#define TAO_ETCL_DISCRIMINANT 296 -#define TAO_ETCL_LENGTH 297 -#define TAO_ETCL_TYPE_ID 298 -#define TAO_ETCL_REPOS_ID 299 - -//#line 1 "ETCL/ETCL.yy" - -// $Id$ -// ======================================================================== -// -// = LIBRARY -// orbsvcs / Extended Trader Constraint Language parser. -// -// = FILENAME -// ETCL.yy -// -// = AUTHOR -// Carlos O'Ryan <coryan@uci.edu> based on previous work by -// Seth Widoff <sbw1@cs.wustl.edu> -// -// ======================================================================== - -#include "orbsvcs/ETCL/ETCL_y.h" -#include "orbsvcs/ETCL/ETCL_Constraint.h" -#include "orbsvcs/ETCL/ETCL_Interpreter.h" - -TAO_BEGIN_VERSIONED_NAMESPACE_DECL - -extern int yylex (void); -extern void yyflush_current_buffer (void); - -static void yyerror (const char *) -{ - // @@ TODO - // Ignore error messages -} - -TAO_END_VERSIONED_NAMESPACE_DECL - -#include <stdio.h> - -TAO_BEGIN_VERSIONED_NAMESPACE_DECL - -#ifndef __cplusplus -#ifndef __STDC__ -#define const -#endif -#endif - - - -#define YYFINAL 114 -#define YYFLAG -32768 -#define YYNTBASE 46 - -#define YYTRANSLATE(x) ((unsigned)(x) <= 299 ? yytranslate[x] : 65) - -static const char yytranslate[] = { 0, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 1, 3, 4, 5, 6, - 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, - 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, - 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, - 37, 38, 39, 40, 41, 42, 43, 44, 45 -}; - -#if YYDEBUG != 0 -static const short yyprhs[] = { 0, - 0, 2, 4, 7, 10, 13, 15, 17, 21, 23, - 27, 29, 33, 37, 41, 45, 49, 53, 55, 59, - 64, 66, 70, 72, 76, 80, 82, 86, 90, 92, - 95, 97, 101, 103, 106, 109, 111, 114, 117, 119, - 121, 124, 128, 132, 135, 137, 138, 141, 144, 146, - 148, 149, 152, 154, 156, 159, 161, 163, 165, 167, - 169, 171, 176, 181, 184, 189, 190, 192, 195, 198 -}; - -static const short yyrhs[] = { 48, - 0, 47, 0, 37, 48, 0, 36, 48, 0, 35, - 48, 0, 38, 0, 39, 0, 48, 12, 49, 0, - 49, 0, 49, 11, 50, 0, 50, 0, 51, 7, - 51, 0, 51, 8, 51, 0, 51, 3, 51, 0, - 51, 4, 51, 0, 51, 5, 51, 0, 51, 6, - 51, 0, 51, 0, 52, 14, 57, 0, 52, 14, - 40, 57, 0, 52, 0, 53, 15, 53, 0, 53, - 0, 53, 17, 54, 0, 53, 18, 54, 0, 54, - 0, 54, 19, 55, 0, 54, 20, 55, 0, 55, - 0, 13, 56, 0, 56, 0, 26, 48, 25, 0, - 22, 0, 17, 22, 0, 18, 22, 0, 23, 0, - 17, 23, 0, 18, 23, 0, 24, 0, 16, 0, - 9, 29, 0, 9, 40, 57, 0, 10, 40, 57, - 0, 40, 57, 0, 29, 0, 0, 41, 59, 0, - 29, 58, 0, 60, 0, 61, 0, 0, 41, 59, - 0, 60, 0, 61, 0, 29, 58, 0, 43, 0, - 42, 0, 44, 0, 45, 0, 62, 0, 63, 0, - 28, 22, 27, 58, 0, 26, 29, 25, 58, 0, - 22, 58, 0, 26, 64, 25, 58, 0, 0, 22, - 0, 17, 22, 0, 18, 22, 0, 24, 0 -}; - -#endif - -#if YYDEBUG != 0 -static const short yyrline[] = { 0, - 92, 93, 96, 98, 100, 102, 104, 108, 110, 113, - 115, 118, 120, 122, 124, 126, 128, 130, 133, 135, - 137, 140, 142, 145, 147, 149, 152, 154, 156, 159, - 161, 164, 166, 168, 170, 172, 174, 176, 178, 180, - 182, 184, 186, 188, 190, 194, 196, 199, 202, 203, - 206, 208, 211, 212, 215, 217, 219, 221, 223, 225, - 226, 229, 233, 237, 241, 245, 247, 249, 251, 253 -}; -#endif - - -#if YYDEBUG != 0 || defined (YYERROR_VERBOSE) - -static const char * const yytname[] = { "$","error","$undefined.","TAO_ETCL_GT", -"TAO_ETCL_GE","TAO_ETCL_LT","TAO_ETCL_LE","TAO_ETCL_EQ","TAO_ETCL_NE","TAO_ETCL_EXIST", -"TAO_ETCL_DEFAULT","TAO_ETCL_AND","TAO_ETCL_OR","TAO_ETCL_NOT","TAO_ETCL_IN", -"TAO_ETCL_TWIDDLE","TAO_ETCL_BOOLEAN","TAO_ETCL_PLUS","TAO_ETCL_MINUS","TAO_ETCL_MULT", -"TAO_ETCL_DIV","TAO_ETCL_UMINUS","TAO_ETCL_INTEGER","TAO_ETCL_FLOAT","TAO_ETCL_STRING", -"TAO_ETCL_RPAREN","TAO_ETCL_LPAREN","TAO_ETCL_RBRA","TAO_ETCL_LBRA","TAO_ETCL_IDENT", -"TAO_ETCL_UNSIGNED","TAO_ETCL_SIGNED","TAO_ETCL_DOUBLE","TAO_ETCL_CONSTRAINT", -"TAO_ETCL_COMPONENT","TAO_ETCL_WITH","TAO_ETCL_MAX","TAO_ETCL_MIN","TAO_ETCL_FIRST", -"TAO_ETCL_RANDOM","TAO_ETCL_DOLLAR","TAO_ETCL_DOT","TAO_ETCL_DISCRIMINANT","TAO_ETCL_LENGTH", -"TAO_ETCL_TYPE_ID","TAO_ETCL_REPOS_ID","constraint","preference","bool_or","bool_and", -"bool_compare","expr_in","expr_twiddle","expr","term","factor_not","factor", -"component","component_ext","component_dot","component_array","component_assoc", -"component_pos","union_pos","union_val", 0 -}; -#endif - -static const short yyr1[] = { 0, - 46, 46, 47, 47, 47, 47, 47, 48, 48, 49, - 49, 50, 50, 50, 50, 50, 50, 50, 51, 51, - 51, 52, 52, 53, 53, 53, 54, 54, 54, 55, - 55, 56, 56, 56, 56, 56, 56, 56, 56, 56, - 56, 56, 56, 56, 56, 57, 57, 57, 57, 57, - 58, 58, 58, 58, 59, 59, 59, 59, 59, 59, - 59, 60, 61, 62, 63, 64, 64, 64, 64, 64 -}; - -static const short yyr2[] = { 0, - 1, 1, 2, 2, 2, 1, 1, 3, 1, 3, - 1, 3, 3, 3, 3, 3, 3, 1, 3, 4, - 1, 3, 1, 3, 3, 1, 3, 3, 1, 2, - 1, 3, 1, 2, 2, 1, 2, 2, 1, 1, - 2, 3, 3, 2, 1, 0, 2, 2, 1, 1, - 0, 2, 1, 1, 2, 1, 1, 1, 1, 1, - 1, 4, 4, 2, 4, 0, 1, 2, 2, 1 -}; - -static const short yydefact[] = { 0, - 0, 0, 0, 40, 0, 0, 33, 36, 39, 0, - 45, 0, 0, 0, 6, 7, 46, 2, 1, 9, - 11, 18, 21, 23, 26, 29, 31, 41, 46, 46, - 30, 34, 37, 35, 38, 0, 5, 4, 3, 0, - 0, 51, 0, 44, 49, 50, 0, 0, 0, 0, - 0, 0, 0, 0, 46, 0, 0, 0, 0, 0, - 42, 43, 32, 0, 0, 0, 48, 53, 54, 51, - 66, 51, 57, 56, 58, 59, 47, 60, 61, 8, - 10, 14, 15, 16, 17, 12, 13, 46, 19, 22, - 24, 25, 27, 28, 51, 51, 52, 64, 0, 0, - 67, 70, 0, 55, 20, 63, 62, 68, 69, 51, - 65, 0, 0, 0 -}; - -static const short yydefgoto[] = { 112, - 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, - 44, 67, 77, 68, 69, 78, 79, 103 -}; - -static const short yypact[] = { 41, - -13, -39, 94,-32768, 38, 46,-32768,-32768,-32768, 73, --32768, 73, 73, 73,-32768,-32768, -9,-32768, -6, 7, --32768, 121, -5, 19, 55,-32768,-32768,-32768, -9, -9, --32768,-32768,-32768,-32768,-32768, 21, -6, -6, -6, 6, - 25, -2, -1,-32768,-32768,-32768, 73, 73, 73, 73, - 73, 73, 73, 73, -18, 73, 73, 73, 73, 73, --32768,-32768,-32768, 27, 29, -1,-32768,-32768,-32768, -2, - 31, -2,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 7, --32768,-32768,-32768,-32768,-32768,-32768,-32768, -9,-32768, 67, - 55, 55,-32768,-32768, -2, -2,-32768,-32768, 44, 50, --32768,-32768, 69,-32768,-32768,-32768,-32768,-32768,-32768, -2, --32768, 98, 100,-32768 -}; - -static const short yypgoto[] = {-32768, --32768, 95, 54, 58, 86,-32768, 59, 30, 33, 111, - -26, -65, 53, -17, -15,-32768,-32768,-32768 -}; - - -#define YYLAST 140 - - -static const short yytable[] = { 45, - 30, 46, 61, 62, 98, 47, 104, 40, 55, 41, - 42, 45, 45, 46, 46, 28, 40, 48, 41, 42, - 70, 88, 43, 40, 71, 41, 29, 72, 89, 106, - 107, 43, 47, 56, 64, 57, 58, 45, 66, 46, - 73, 74, 75, 76, 111, 63, 65, 99, 100, 1, - 2, 95, 101, 3, 102, 96, 4, 5, 6, 32, - 33, 105, 7, 8, 9, 108, 10, 34, 35, 11, - 45, 109, 46, 59, 60, 12, 13, 14, 15, 16, - 17, 1, 2, 57, 58, 3, 91, 92, 4, 5, - 6, 93, 94, 110, 7, 8, 9, 113, 10, 114, - 80, 11, 1, 2, 36, 81, 37, 38, 39, 4, - 5, 6, 17, 31, 90, 7, 8, 9, 97, 10, - 0, 0, 11, 49, 50, 51, 52, 53, 54, 0, - 0, 0, 0, 17, 82, 83, 84, 85, 86, 87 -}; - -static const short yycheck[] = { 17, - 40, 17, 29, 30, 70, 12, 72, 26, 14, 28, - 29, 29, 30, 29, 30, 29, 26, 11, 28, 29, - 22, 40, 41, 26, 26, 28, 40, 29, 55, 95, - 96, 41, 12, 15, 29, 17, 18, 55, 41, 55, - 42, 43, 44, 45, 110, 25, 22, 17, 18, 9, - 10, 25, 22, 13, 24, 27, 16, 17, 18, 22, - 23, 88, 22, 23, 24, 22, 26, 22, 23, 29, - 88, 22, 88, 19, 20, 35, 36, 37, 38, 39, - 40, 9, 10, 17, 18, 13, 57, 58, 16, 17, - 18, 59, 60, 25, 22, 23, 24, 0, 26, 0, - 47, 29, 9, 10, 10, 48, 12, 13, 14, 16, - 17, 18, 40, 3, 56, 22, 23, 24, 66, 26, - -1, -1, 29, 3, 4, 5, 6, 7, 8, -1, - -1, -1, -1, 40, 49, 50, 51, 52, 53, 54 -}; -/* -*-C-*- Note some compilers choke on comments on `//#line' lines. */ -//#line 3 "/pkg/gnu/share/bison.simple" -/* This file comes from bison-1.28. */ - -/* Skeleton output parser for bison, - Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -/* As a special exception, when this file is copied by Bison into a - Bison output file, you may use that output file without restriction. - This special exception was added by the Free Software Foundation - in version 1.24 of Bison. */ - -/* This is the parser code that is written into each bison parser - when the %semantic_parser declaration is not specified in the grammar. - It was written by Richard Stallman by simplifying the hairy parser - used when %semantic_parser is specified. */ - -TAO_END_VERSIONED_NAMESPACE_DECL - -#ifndef YYSTACK_USE_ALLOCA -#ifdef alloca -#define YYSTACK_USE_ALLOCA -#else /* alloca not defined */ -#ifdef __GNUC__ -#define YYSTACK_USE_ALLOCA -#define alloca __builtin_alloca -#else /* not GNU C. */ -#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) || (defined (__sun) && defined (__i386)) -#define YYSTACK_USE_ALLOCA -#include <alloca.h> -#else /* not sparc */ -/* We think this test detects Watcom and Microsoft C. */ -/* This used to test MSDOS, but that is a bad idea - since that symbol is in the user namespace. */ -#if (defined (_MSDOS) || defined (_MSDOS_)) && !defined (__TURBOC__) -#if 0 /* No need for malloc.h, which pollutes the namespace; - instead, just don't use alloca. */ -#include <malloc.h> -#endif -#else /* not MSDOS, or __TURBOC__ */ -#if defined(_AIX) -/* I don't know what this was needed for, but it pollutes the namespace. - So I turned it off. rms, 2 May 1997. */ -/* #include <malloc.h> */ - #pragma alloca -#define YYSTACK_USE_ALLOCA -#else /* not MSDOS, or __TURBOC__, or _AIX */ -#if 0 -#ifdef __hpux /* haible@ilog.fr says this works for HPUX 9.05 and up, - and on HPUX 10. Eventually we can turn this on. */ -#define YYSTACK_USE_ALLOCA -#define alloca __builtin_alloca -#endif /* __hpux */ -#endif -#endif /* not _AIX */ -#endif /* not MSDOS, or __TURBOC__ */ -#endif /* not sparc */ -#endif /* not GNU C */ -#endif /* alloca not defined */ -#endif /* YYSTACK_USE_ALLOCA not defined */ - -#ifdef YYSTACK_USE_ALLOCA -#define YYSTACK_ALLOC alloca -#else -#define YYSTACK_ALLOC malloc -#endif - -/* Note: there must be only one dollar sign in this file. - It is replaced by the list of actions, each action - as one case of the switch. */ - -#define yyerrok (yyerrstatus = 0) -#define yyclearin (yychar = YYEMPTY) -#define YYEMPTY -2 -#define YYEOF 0 -#define YYACCEPT goto yyacceptlab -#define YYABORT goto yyabortlab -#define YYERROR goto yyerrlab1 -/* Like YYERROR except do call yyerror. - This remains here temporarily to ease the - transition to the new meaning of YYERROR, for GCC. - Once GCC version 2 has supplanted version 1, this can go. */ -#define YYFAIL goto yyerrlab -#define YYRECOVERING() (!!yyerrstatus) -#define YYBACKUP(token, value) \ -do \ - if (yychar == YYEMPTY && yylen == 1) \ - { yychar = (token), yylval = (value); \ - yychar1 = YYTRANSLATE (yychar); \ - YYPOPSTACK; \ - goto yybackup; \ - } \ - else \ - { yyerror ("syntax error: cannot back up"); YYERROR; } \ -while (0) - -#define YYTERROR 1 -#define YYERRCODE 256 - -#ifndef YYPURE -#define YYLEX yylex() -#endif - -#ifdef YYPURE -#ifdef YYLSP_NEEDED -#ifdef YYLEX_PARAM -#define YYLEX yylex(&yylval, &yylloc, YYLEX_PARAM) -#else -#define YYLEX yylex(&yylval, &yylloc) -#endif -#else /* not YYLSP_NEEDED */ -#ifdef YYLEX_PARAM -#define YYLEX yylex(&yylval, YYLEX_PARAM) -#else -#define YYLEX yylex(&yylval) -#endif -#endif /* not YYLSP_NEEDED */ -#endif - -TAO_BEGIN_VERSIONED_NAMESPACE_DECL - -/* If nonreentrant, generate the variables here */ - -#ifndef YYPURE - -int yychar; /* the lookahead symbol */ -YYSTYPE yylval; /* the semantic value of the */ - /* lookahead symbol */ -YYSTYPE yyval; /* the variable used to return */ - /* semantic values from the action */ - /* routines */ - - -#ifdef YYLSP_NEEDED -YYLTYPE yylloc; /* location data for the lookahead */ - /* symbol */ -#endif - -int yynerrs; /* number of parse errors so far */ -#endif /* not YYPURE */ - -#if YYDEBUG != 0 -int yydebug; /* nonzero means print parse trace */ -/* Since this is uninitialized, it does not stop multiple parsers - from coexisting. */ -#endif - -/* YYINITDEPTH indicates the initial size of the parser's stacks */ - -#ifndef YYINITDEPTH -#define YYINITDEPTH 200 -#endif - -/* YYMAXDEPTH is the maximum size the stacks can grow to - (effective only if the built-in stack extension method is used). */ - -#if YYMAXDEPTH == 0 -#undef YYMAXDEPTH -#endif - -#ifndef YYMAXDEPTH -#define YYMAXDEPTH 10000 -#endif - -/* Define __yy_memcpy. Note that the size argument - should be passed with type unsigned int, because that is what the non-GCC - definitions require. With GCC, __builtin_memcpy takes an arg - of type size_t, but it can handle unsigned int. */ - -#if __GNUC__ > 1 /* GNU C and GNU C++ define this. */ -#define __yy_memcpy(TO,FROM,COUNT) __builtin_memcpy(TO,FROM,COUNT) -#else /* not GNU C or C++ */ -#ifndef __cplusplus - -/* This is the most reliable way to avoid incompatibilities - in available built-in functions on various systems. */ -static void -__yy_memcpy (to, from, count) - char *to; - char *from; - unsigned int count; -{ - register char *f = from; - register char *t = to; - register int i = count; - - while (i-- > 0) - *t++ = *f++; -} - -#else /* __cplusplus */ - -/* This is the most reliable way to avoid incompatibilities - in available built-in functions on various systems. */ -static void -__yy_memcpy (char *to, char *from, unsigned int count) -{ - register char *t = to; - register char *f = from; - register int i = count; - - while (i-- > 0) - *t++ = *f++; -} - -#endif -#endif - -//#line 217 "/pkg/gnu/share/bison.simple" - -/* The user can define YYPARSE_PARAM as the name of an argument to be passed - into yyparse. The argument should have type void *. - It should actually point to an object. - Grammar actions can access the variable by casting it - to the proper pointer type. */ - -#ifdef YYPARSE_PARAM -#ifdef __cplusplus -#define YYPARSE_PARAM_ARG void *YYPARSE_PARAM -#define YYPARSE_PARAM_DECL -#else /* not __cplusplus */ -#define YYPARSE_PARAM_ARG YYPARSE_PARAM -#define YYPARSE_PARAM_DECL void *YYPARSE_PARAM; -#endif /* not __cplusplus */ -#else /* not YYPARSE_PARAM */ -#define YYPARSE_PARAM_ARG -#define YYPARSE_PARAM_DECL -#endif /* not YYPARSE_PARAM */ - -/* Prevent warning if -Wstrict-prototypes. */ -#ifdef __GNUC__ -#ifdef YYPARSE_PARAM -int yyparse (void *); -#else -int yyparse (void); -#endif -#endif - -int -yyparse(YYPARSE_PARAM_ARG) - YYPARSE_PARAM_DECL -{ - register int yystate; - register int yyn; - register short *yyssp; - register YYSTYPE *yyvsp; - int yyerrstatus; /* number of tokens to shift before error messages enabled */ - int yychar1 = 0; /* lookahead token as an internal (translated) token number */ - - short yyssa[YYINITDEPTH]; /* the state stack */ - YYSTYPE yyvsa[YYINITDEPTH]; /* the semantic value stack */ - - short *yyss = yyssa; /* refer to the stacks thru separate pointers */ - YYSTYPE *yyvs = yyvsa; /* to allow yyoverflow to reallocate them elsewhere */ - -#ifdef YYLSP_NEEDED - YYLTYPE yylsa[YYINITDEPTH]; /* the location stack */ - YYLTYPE *yyls = yylsa; - YYLTYPE *yylsp; - -#define YYPOPSTACK (yyvsp--, yyssp--, yylsp--) -#else -#define YYPOPSTACK (yyvsp--, yyssp--) -#endif - - int yystacksize = YYINITDEPTH; - int yyfree_stacks = 0; - -#ifdef YYPURE - int yychar; - YYSTYPE yylval; - int yynerrs; -#ifdef YYLSP_NEEDED - YYLTYPE yylloc; -#endif -#endif - - int yylen; - -#if YYDEBUG != 0 - if (yydebug) - ACE_OS::fprintf(stderr, "Starting parse\n"); -#endif - - yystate = 0; - yyerrstatus = 0; - yynerrs = 0; - yychar = YYEMPTY; /* Cause a token to be read. */ - - /* Initialize stack pointers. - Waste one element of value and location stack - so that they stay on the same level as the state stack. - The wasted elements are never initialized. */ - - yyssp = yyss - 1; - yyvsp = yyvs; -#ifdef YYLSP_NEEDED - yylsp = yyls; -#endif - -/* Push a new state, which is found in yystate . */ -/* In all cases, when you get here, the value and location stacks - have just been pushed. so pushing a state here evens the stacks. */ -yynewstate: - - *++yyssp = yystate; - - if (yyssp >= yyss + yystacksize - 1) - { - /* Give user a chance to reallocate the stack */ - /* Use copies of these so that the &'s don't force the real ones into memory. */ - YYSTYPE *yyvs1 = yyvs; - short *yyss1 = yyss; -#ifdef YYLSP_NEEDED - YYLTYPE *yyls1 = yyls; -#endif - - /* Get the current used size of the three stacks, in elements. */ - int size = yyssp - yyss + 1; - -#ifdef yyoverflow - /* Each stack pointer address is followed by the size of - the data in use in that stack, in bytes. */ -#ifdef YYLSP_NEEDED - /* This used to be a conditional around just the two extra args, - but that might be undefined if yyoverflow is a macro. */ - yyoverflow("parser stack overflow", - &yyss1, size * sizeof (*yyssp), - &yyvs1, size * sizeof (*yyvsp), - &yyls1, size * sizeof (*yylsp), - &yystacksize); -#else - yyoverflow("parser stack overflow", - &yyss1, size * sizeof (*yyssp), - &yyvs1, size * sizeof (*yyvsp), - &yystacksize); -#endif - - yyss = yyss1; yyvs = yyvs1; -#ifdef YYLSP_NEEDED - yyls = yyls1; -#endif -#else /* no yyoverflow */ - /* Extend the stack our own way. */ - if (yystacksize >= YYMAXDEPTH) - { - yyerror("parser stack overflow"); - if (yyfree_stacks) - { - ACE_OS::free (yyss); - ACE_OS::free (yyvs); -#ifdef YYLSP_NEEDED - ACE_OS::free (yyls); -#endif - } - return 2; - } - yystacksize *= 2; - if (yystacksize > YYMAXDEPTH) - yystacksize = YYMAXDEPTH; -#ifndef YYSTACK_USE_ALLOCA - yyfree_stacks = 1; -#endif - yyss = (short *) YYSTACK_ALLOC (yystacksize * sizeof (*yyssp)); - __yy_memcpy ((char *)yyss, (char *)yyss1, - size * (unsigned int) sizeof (*yyssp)); - yyvs = (YYSTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yyvsp)); - __yy_memcpy ((char *)yyvs, (char *)yyvs1, - size * (unsigned int) sizeof (*yyvsp)); -#ifdef YYLSP_NEEDED - yyls = (YYLTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yylsp)); - __yy_memcpy ((char *)yyls, (char *)yyls1, - size * (unsigned int) sizeof (*yylsp)); -#endif -#endif /* no yyoverflow */ - - yyssp = yyss + size - 1; - yyvsp = yyvs + size - 1; -#ifdef YYLSP_NEEDED - yylsp = yyls + size - 1; -#endif - -#if YYDEBUG != 0 - if (yydebug) - ACE_OS::fprintf(stderr, "Stack size increased to %d\n", yystacksize); -#endif - - if (yyssp >= yyss + yystacksize - 1) - YYABORT; - } - -#if YYDEBUG != 0 - if (yydebug) - ACE_OS::fprintf(stderr, "Entering state %d\n", yystate); -#endif - - goto yybackup; - yybackup: - -/* Do appropriate processing given the current state. */ -/* Read a lookahead token if we need one and don't already have one. */ -/* yyresume: */ - - /* First try to decide what to do without reference to lookahead token. */ - - yyn = yypact[yystate]; - if (yyn == YYFLAG) - goto yydefault; - - /* Not known => get a lookahead token if don't already have one. */ - - /* yychar is either YYEMPTY or YYEOF - or a valid token in external form. */ - - if (yychar == YYEMPTY) - { -#if YYDEBUG != 0 - if (yydebug) - ACE_OS::fprintf(stderr, "Reading a token: "); -#endif - yychar = YYLEX; - } - - /* Convert token to internal form (in yychar1) for indexing tables with */ - - if (yychar <= 0) /* This means end of input. */ - { - yychar1 = 0; - yychar = YYEOF; /* Don't call YYLEX any more */ - -#if YYDEBUG != 0 - if (yydebug) - ACE_OS::fprintf(stderr, "Now at end of input.\n"); -#endif - } - else - { - yychar1 = YYTRANSLATE(yychar); - -#if YYDEBUG != 0 - if (yydebug) - { - ACE_OS::fprintf (stderr, "Next token is %d (%s", yychar, yytname[yychar1]); - /* Give the individual parser a way to print the precise meaning - of a token, for further debugging info. */ -#ifdef YYPRINT - YYPRINT (stderr, yychar, yylval); -#endif - ACE_OS::fprintf (stderr, ")\n"); - } -#endif - } - - yyn += yychar1; - if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1) - goto yydefault; - - yyn = yytable[yyn]; - - /* yyn is what to do for this token type in this state. - Negative => reduce, -yyn is rule number. - Positive => shift, yyn is new state. - New state is final state => don't bother to shift, - just return success. - 0, or most negative number => error. */ - - if (yyn < 0) - { - if (yyn == YYFLAG) - goto yyerrlab; - yyn = -yyn; - goto yyreduce; - } - else if (yyn == 0) - goto yyerrlab; - - if (yyn == YYFINAL) - YYACCEPT; - - /* Shift the lookahead token. */ - -#if YYDEBUG != 0 - if (yydebug) - ACE_OS::fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]); -#endif - - /* Discard the token being shifted unless it is eof. */ - if (yychar != YYEOF) - yychar = YYEMPTY; - - *++yyvsp = yylval; -#ifdef YYLSP_NEEDED - *++yylsp = yylloc; -#endif - - /* count tokens shifted since error; after three, turn off error status. */ - if (yyerrstatus) yyerrstatus--; - - yystate = yyn; - goto yynewstate; - -/* Do the default action for the current state. */ -yydefault: - - yyn = yydefact[yystate]; - if (yyn == 0) - goto yyerrlab; - -/* Do a reduction. yyn is the number of a rule to reduce with. */ -yyreduce: - yylen = yyr2[yyn]; - if (yylen > 0) - yyval = yyvsp[1-yylen]; /* implement default value of the action */ - -#if YYDEBUG != 0 - if (yydebug) - { - int i; - - ACE_OS::fprintf (stderr, "Reducing via rule %d (line %d), ", - yyn, yyrline[yyn]); - - /* Print the symbols being reduced, and their result. */ - for (i = yyprhs[yyn]; yyrhs[i] > 0; i++) - ACE_OS::fprintf (stderr, "%s ", yytname[yyrhs[i]]); - ACE_OS::fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]); - } -#endif - - - switch (yyn) { - -case 3: -//#line 97 "ETCL/ETCL.yy" -{ yyval.constraint = new TAO_ETCL_Preference (TAO_ETCL_MIN, yyvsp[0].constraint); ; - break;} -case 4: -//#line 99 "ETCL/ETCL.yy" -{ yyval.constraint = new TAO_ETCL_Preference (TAO_ETCL_MAX, yyvsp[0].constraint); ; - break;} -case 5: -//#line 101 "ETCL/ETCL.yy" -{ yyval.constraint = new TAO_ETCL_Preference (TAO_ETCL_WITH, yyvsp[0].constraint); ; - break;} -case 6: -//#line 103 "ETCL/ETCL.yy" -{ yyval.constraint = new TAO_ETCL_Preference (TAO_ETCL_FIRST); ; - break;} -case 7: -//#line 105 "ETCL/ETCL.yy" -{ yyval.constraint = new TAO_ETCL_Preference (TAO_ETCL_RANDOM); ; - break;} -case 8: -//#line 109 "ETCL/ETCL.yy" -{ yyval.constraint = new TAO_ETCL_Binary_Expr (TAO_ETCL_OR, yyvsp[-2].constraint, yyvsp[0].constraint); ; - break;} -case 10: -//#line 114 "ETCL/ETCL.yy" -{ yyval.constraint = new TAO_ETCL_Binary_Expr (TAO_ETCL_AND, yyvsp[-2].constraint, yyvsp[0].constraint); ; - break;} -case 12: -//#line 119 "ETCL/ETCL.yy" -{ yyval.constraint = new TAO_ETCL_Binary_Expr (TAO_ETCL_EQ, yyvsp[-2].constraint, yyvsp[0].constraint); ; - break;} -case 13: -//#line 121 "ETCL/ETCL.yy" -{ yyval.constraint = new TAO_ETCL_Binary_Expr (TAO_ETCL_NE, yyvsp[-2].constraint, yyvsp[0].constraint); ; - break;} -case 14: -//#line 123 "ETCL/ETCL.yy" -{ yyval.constraint = new TAO_ETCL_Binary_Expr (TAO_ETCL_GT, yyvsp[-2].constraint, yyvsp[0].constraint); ; - break;} -case 15: -//#line 125 "ETCL/ETCL.yy" -{ yyval.constraint = new TAO_ETCL_Binary_Expr (TAO_ETCL_GE, yyvsp[-2].constraint, yyvsp[0].constraint); ; - break;} -case 16: -//#line 127 "ETCL/ETCL.yy" -{ yyval.constraint = new TAO_ETCL_Binary_Expr (TAO_ETCL_LT, yyvsp[-2].constraint, yyvsp[0].constraint); ; - break;} -case 17: -//#line 129 "ETCL/ETCL.yy" -{ yyval.constraint = new TAO_ETCL_Binary_Expr (TAO_ETCL_LE, yyvsp[-2].constraint, yyvsp[0].constraint); ; - break;} -case 19: -//#line 134 "ETCL/ETCL.yy" -{ yyval.constraint = new TAO_ETCL_Binary_Expr (TAO_ETCL_IN, yyvsp[-2].constraint, yyvsp[0].constraint); ; - break;} -case 20: -//#line 136 "ETCL/ETCL.yy" -{ yyval.constraint = new TAO_ETCL_Binary_Expr (TAO_ETCL_IN, yyvsp[-3].constraint, yyvsp[0].constraint); ; - break;} -case 22: -//#line 141 "ETCL/ETCL.yy" -{ yyval.constraint = new TAO_ETCL_Binary_Expr (TAO_ETCL_TWIDDLE, yyvsp[-2].constraint, yyvsp[0].constraint); ; - break;} -case 24: -//#line 146 "ETCL/ETCL.yy" -{ yyval.constraint = new TAO_ETCL_Binary_Expr (TAO_ETCL_PLUS, yyvsp[-2].constraint, yyvsp[0].constraint); ; - break;} -case 25: -//#line 148 "ETCL/ETCL.yy" -{ yyval.constraint = new TAO_ETCL_Binary_Expr (TAO_ETCL_MINUS, yyvsp[-2].constraint, yyvsp[0].constraint); ; - break;} -case 27: -//#line 153 "ETCL/ETCL.yy" -{ yyval.constraint = new TAO_ETCL_Binary_Expr (TAO_ETCL_MULT, yyvsp[-2].constraint, yyvsp[0].constraint); ; - break;} -case 28: -//#line 155 "ETCL/ETCL.yy" -{ yyval.constraint = new TAO_ETCL_Binary_Expr (TAO_ETCL_DIV, yyvsp[-2].constraint, yyvsp[0].constraint); ; - break;} -case 30: -//#line 160 "ETCL/ETCL.yy" -{ yyval.constraint = new TAO_ETCL_Unary_Expr (TAO_ETCL_NOT, yyvsp[0].constraint); ; - break;} -case 32: -//#line 165 "ETCL/ETCL.yy" -{ yyval.constraint = yyvsp[-1].constraint; ; - break;} -case 33: -//#line 167 "ETCL/ETCL.yy" -{ yyval.constraint = yyvsp[0].constraint; ; - break;} -case 34: -//#line 169 "ETCL/ETCL.yy" -{ yyval.constraint = new TAO_ETCL_Unary_Expr (TAO_ETCL_PLUS, yyvsp[0].constraint); ; - break;} -case 35: -//#line 171 "ETCL/ETCL.yy" -{ yyval.constraint = new TAO_ETCL_Unary_Expr (TAO_ETCL_MINUS, yyvsp[0].constraint); ; - break;} -case 36: -//#line 173 "ETCL/ETCL.yy" -{ yyval.constraint = yyvsp[0].constraint; ; - break;} -case 37: -//#line 175 "ETCL/ETCL.yy" -{ yyval.constraint = new TAO_ETCL_Unary_Expr (TAO_ETCL_PLUS, yyvsp[0].constraint); ; - break;} -case 38: -//#line 177 "ETCL/ETCL.yy" -{ yyval.constraint = new TAO_ETCL_Unary_Expr (TAO_ETCL_MINUS, yyvsp[0].constraint); ; - break;} -case 39: -//#line 179 "ETCL/ETCL.yy" -{ yyval.constraint = yyvsp[0].constraint; ; - break;} -case 40: -//#line 181 "ETCL/ETCL.yy" -{ yyval.constraint = yyvsp[0].constraint; ; - break;} -case 41: -//#line 183 "ETCL/ETCL.yy" -{ yyval.constraint = new TAO_ETCL_Exist (yyvsp[0].constraint); ; - break;} -case 42: -//#line 185 "ETCL/ETCL.yy" -{ yyval.constraint = new TAO_ETCL_Exist (yyvsp[0].constraint); ; - break;} -case 43: -//#line 187 "ETCL/ETCL.yy" -{ yyval.constraint = new TAO_ETCL_Default (yyvsp[0].constraint); ; - break;} -case 44: -//#line 189 "ETCL/ETCL.yy" -{ yyval.constraint = new TAO_ETCL_Eval (yyvsp[0].constraint); ; - break;} -case 45: -//#line 191 "ETCL/ETCL.yy" -{ yyval.constraint = yyvsp[0].constraint; ; - break;} -case 46: -//#line 195 "ETCL/ETCL.yy" -{ yyval.constraint = 0; ; - break;} -case 47: -//#line 197 "ETCL/ETCL.yy" -{ yyval.constraint = new TAO_ETCL_Dot (yyvsp[0].constraint); ; - break;} -case 48: -//#line 200 "ETCL/ETCL.yy" -{ yyval.constraint = new TAO_ETCL_Component (yyvsp[-1].constraint, yyvsp[0].constraint); ; - break;} -case 51: -//#line 207 "ETCL/ETCL.yy" -{ yyval.constraint = 0; ; - break;} -case 52: -//#line 209 "ETCL/ETCL.yy" -{ yyval.constraint = new TAO_ETCL_Dot (yyvsp[0].constraint); ; - break;} -case 55: -//#line 216 "ETCL/ETCL.yy" -{ yyval.constraint = new TAO_ETCL_Component (yyvsp[-1].constraint, yyvsp[0].constraint); ; - break;} -case 56: -//#line 218 "ETCL/ETCL.yy" -{ yyval.constraint = new TAO_ETCL_Special (TAO_ETCL_LENGTH); ; - break;} -case 57: -//#line 220 "ETCL/ETCL.yy" -{ yyval.constraint = new TAO_ETCL_Special (TAO_ETCL_DISCRIMINANT); ; - break;} -case 58: -//#line 222 "ETCL/ETCL.yy" -{ yyval.constraint = new TAO_ETCL_Special (TAO_ETCL_TYPE_ID); ; - break;} -case 59: -//#line 224 "ETCL/ETCL.yy" -{ yyval.constraint = new TAO_ETCL_Special (TAO_ETCL_REPOS_ID); ; - break;} -case 62: -//#line 230 "ETCL/ETCL.yy" -{ yyval.constraint = new TAO_ETCL_Component_Array (yyvsp[-2].constraint, yyvsp[0].constraint); ; - break;} -case 63: -//#line 234 "ETCL/ETCL.yy" -{ yyval.constraint = new TAO_ETCL_Component_Assoc (yyvsp[-2].constraint, yyvsp[0].constraint); ; - break;} -case 64: -//#line 238 "ETCL/ETCL.yy" -{ yyval.constraint = new TAO_ETCL_Component_Pos (yyvsp[-1].constraint, yyvsp[0].constraint); ; - break;} -case 65: -//#line 242 "ETCL/ETCL.yy" -{ yyval.constraint = new TAO_ETCL_Union_Pos (yyvsp[-2].constraint, yyvsp[0].constraint); ; - break;} -case 66: -//#line 246 "ETCL/ETCL.yy" -{ yyval.constraint = 0; ; - break;} -case 67: -//#line 248 "ETCL/ETCL.yy" -{ yyval.constraint = new TAO_ETCL_Union_Value (+1, yyvsp[0].constraint); ; - break;} -case 68: -//#line 250 "ETCL/ETCL.yy" -{ yyval.constraint = new TAO_ETCL_Union_Value (+1, yyvsp[0].constraint); ; - break;} -case 69: -//#line 252 "ETCL/ETCL.yy" -{ yyval.constraint = new TAO_ETCL_Union_Value (-1, yyvsp[0].constraint); ; - break;} -case 70: -//#line 254 "ETCL/ETCL.yy" -{ yyval.constraint = new TAO_ETCL_Union_Value (yyvsp[0].constraint); ; - break;} -} - /* the action file gets copied in in place of this dollarsign */ -//#line 543 "/pkg/gnu/share/bison.simple" - - yyvsp -= yylen; - yyssp -= yylen; -#ifdef YYLSP_NEEDED - yylsp -= yylen; -#endif - -#if YYDEBUG != 0 - if (yydebug) - { - short *ssp1 = yyss - 1; - ACE_OS::fprintf (stderr, "state stack now"); - while (ssp1 != yyssp) - ACE_OS::fprintf (stderr, " %d", *++ssp1); - ACE_OS::fprintf (stderr, "\n"); - } -#endif - - *++yyvsp = yyval; - -#ifdef YYLSP_NEEDED - yylsp++; - if (yylen == 0) - { - yylsp->first_line = yylloc.first_line; - yylsp->first_column = yylloc.first_column; - yylsp->last_line = (yylsp-1)->last_line; - yylsp->last_column = (yylsp-1)->last_column; - yylsp->text = 0; - } - else - { - yylsp->last_line = (yylsp+yylen-1)->last_line; - yylsp->last_column = (yylsp+yylen-1)->last_column; - } -#endif - - /* Now "shift" the result of the reduction. - Determine what state that goes to, - based on the state we popped back to - and the rule number reduced by. */ - - yyn = yyr1[yyn]; - - yystate = yypgoto[yyn - YYNTBASE] + *yyssp; - if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp) - yystate = yytable[yystate]; - else - yystate = yydefgoto[yyn - YYNTBASE]; - - goto yynewstate; - -yyerrlab: /* here on detecting error */ - - if (! yyerrstatus) - /* If not already recovering from an error, report this error. */ - { - ++yynerrs; - -#ifdef YYERROR_VERBOSE - yyn = yypact[yystate]; - - if (yyn > YYFLAG && yyn < YYLAST) - { - int size = 0; - char *msg; - int x, count; - - count = 0; - /* Start X at -yyn if nec to avoid negative indexes in yycheck. */ - for (x = (yyn < 0 ? -yyn : 0); - x < (sizeof(yytname) / sizeof(char *)); x++) - if (yycheck[x + yyn] == x) - size += ACE_OS::strlen(yytname[x]) + 15, count++; - msg = (char *) ACE_OS::malloc(size + 15); - if (msg != 0) - { - ACE_OS::strcpy(msg, "parse error"); - - if (count < 5) - { - count = 0; - for (x = (yyn < 0 ? -yyn : 0); - x < (sizeof(yytname) / sizeof(char *)); x++) - if (yycheck[x + yyn] == x) - { - ACE_OS::strcat(msg, count == 0 ? ", expecting `" : " or `"); - ACE_OS::strcat(msg, yytname[x]); - ACE_OS::strcat(msg, "'"); - count++; - } - } - yyerror(msg); - ACE_OS::free(msg); - } - else - yyerror ("parse error; also virtual memory exceeded"); - } - else -#endif /* YYERROR_VERBOSE */ - yyerror("parse error"); - } - - goto yyerrlab1; -yyerrlab1: /* here on error raised explicitly by an action */ - - if (yyerrstatus == 3) - { - /* if just tried and failed to reuse lookahead token after an error, discard it. */ - - /* return failure if at end of input */ - if (yychar == YYEOF) - YYABORT; - -#if YYDEBUG != 0 - if (yydebug) - ACE_OS::fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]); -#endif - - yychar = YYEMPTY; - } - - /* Else will try to reuse lookahead token - after shifting the error token. */ - - yyerrstatus = 3; /* Each real token shifted decrements this */ - - goto yyerrhandle; - -yyerrdefault: /* current state does not do anything special for the error token. */ - -#if 0 - /* This is wrong; only states that explicitly want error tokens - should shift them. */ - yyn = yydefact[yystate]; /* If its default is to accept any token, ok. Otherwise pop it.*/ - if (yyn) goto yydefault; -#endif - -yyerrpop: /* pop the current state because it cannot handle the error token */ - - if (yyssp == yyss) YYABORT; - yyvsp--; - yystate = *--yyssp; -#ifdef YYLSP_NEEDED - yylsp--; -#endif - -#if YYDEBUG != 0 - if (yydebug) - { - short *ssp1 = yyss - 1; - ACE_OS::fprintf (stderr, "Error: state stack now"); - while (ssp1 != yyssp) - ACE_OS::fprintf (stderr, " %d", *++ssp1); - ACE_OS::fprintf (stderr, "\n"); - } -#endif - -yyerrhandle: - - yyn = yypact[yystate]; - if (yyn == YYFLAG) - goto yyerrdefault; - - yyn += YYTERROR; - if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR) - goto yyerrdefault; - - yyn = yytable[yyn]; - if (yyn < 0) - { - if (yyn == YYFLAG) - goto yyerrpop; - yyn = -yyn; - goto yyreduce; - } - else if (yyn == 0) - goto yyerrpop; - - if (yyn == YYFINAL) - YYACCEPT; - -#if YYDEBUG != 0 - if (yydebug) - ACE_OS::fprintf(stderr, "Shifting error token, "); -#endif - - *++yyvsp = yylval; -#ifdef YYLSP_NEEDED - *++yylsp = yylloc; -#endif - - yystate = yyn; - goto yynewstate; - - yyacceptlab: - /* YYACCEPT comes here. */ - if (yyfree_stacks) - { - ACE_OS::free (yyss); - ACE_OS::free (yyvs); -#ifdef YYLSP_NEEDED - ACE_OS::free (yyls); -#endif - } - return 0; - - yyabortlab: - /* YYABORT comes here. */ - - /* Flush out yy_current_buffer before next parse. Since there is - no error recovery, the buffer could still contain tokens from this - parse. */ - yyflush_current_buffer(); - - if (yyfree_stacks) - { - ACE_OS::free (yyss); - ACE_OS::free (yyvs); -#ifdef YYLSP_NEEDED - ACE_OS::free (yyls); -#endif - } - return 1; -} -//#line 257 "ETCL/ETCL.yy" - - -TAO_END_VERSIONED_NAMESPACE_DECL diff --git a/TAO/orbsvcs/orbsvcs/ETCL/ETCL_y.cpp.diff b/TAO/orbsvcs/orbsvcs/ETCL/ETCL_y.cpp.diff deleted file mode 100644 index fe123111232..00000000000 --- a/TAO/orbsvcs/orbsvcs/ETCL/ETCL_y.cpp.diff +++ /dev/null @@ -1,607 +0,0 @@ ---- bison_gen\ETCL_y.cpp 2005-07-19 09:56:06.368807400 -0700 -+++ ETCL_y.cpp 2005-07-19 09:45:00.160274900 -0700 -@@ -1,5 +1,6 @@ -+// $Id$ - --/* A Bison parser, made from ETCL.yy -+/* A Bison parser, made from ETCL/ETCL.yy - by GNU Bison version 1.28 */ - - #define YYBISON 1 /* Identify Bison output. */ -@@ -48,9 +49,9 @@ - #define TAO_ETCL_TYPE_ID 298 - #define TAO_ETCL_REPOS_ID 299 - --#line 1 "ETCL.yy" -+//#line 1 "ETCL/ETCL.yy" - --// ETCL.yy,v 1.3 2002/01/14 19:52:28 parsons Exp -+// $Id$ - // ======================================================================== - // - // = LIBRARY -@@ -70,6 +71,7 @@ - #include "ETCL_Interpreter.h" - - extern int yylex (void); -+extern void yyflush_current_buffer (void); - - static void yyerror (const char *) - { -@@ -77,9 +79,6 @@ - // Ignore error messages - } - --#ifndef YYSTYPE --#define YYSTYPE int --#endif - #include <stdio.h> - - #ifndef __cplusplus -@@ -293,8 +292,9 @@ - -1, -1, 29, 3, 4, 5, 6, 7, 8, -1, - -1, -1, -1, 40, 49, 50, 51, 52, 53, 54 - }; --/* -*-C-*- Note some compilers choke on comments on `#line' lines. */ --#line 3 "/usr/local/share/bison.simple" -+/* -*-C-*- Note some compilers choke on comments on `//#line' lines. */ -+//#line 3 "/pkg/gnu/share/bison.simple" -+/* This file comes from bison-1.28. */ - - /* Skeleton output parser for bison, - Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc. -@@ -311,46 +311,66 @@ - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software -- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -+ Foundation, Inc., 59 Temple Place - Suite 330, -+ Boston, MA 02111-1307, USA. */ - - /* As a special exception, when this file is copied by Bison into a - Bison output file, you may use that output file without restriction. - This special exception was added by the Free Software Foundation - in version 1.24 of Bison. */ - --#ifndef alloca -+/* This is the parser code that is written into each bison parser -+ when the %semantic_parser declaration is not specified in the grammar. -+ It was written by Richard Stallman by simplifying the hairy parser -+ used when %semantic_parser is specified. */ -+ -+#ifndef YYSTACK_USE_ALLOCA -+#ifdef alloca -+#define YYSTACK_USE_ALLOCA -+#else /* alloca not defined */ - #ifdef __GNUC__ -+#define YYSTACK_USE_ALLOCA - #define alloca __builtin_alloca - #else /* not GNU C. */ --#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) -+#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) || (defined (__sun) && defined (__i386)) -+#define YYSTACK_USE_ALLOCA - #include <alloca.h> - #else /* not sparc */ --#if defined (MSDOS) && !defined (__TURBOC__) -+/* We think this test detects Watcom and Microsoft C. */ -+/* This used to test MSDOS, but that is a bad idea -+ since that symbol is in the user namespace. */ -+#if (defined (_MSDOS) || defined (_MSDOS_)) && !defined (__TURBOC__) -+#if 0 /* No need for malloc.h, which pollutes the namespace; -+ instead, just don't use alloca. */ - #include <malloc.h> -+#endif - #else /* not MSDOS, or __TURBOC__ */ - #if defined(_AIX) --#include <malloc.h> -+/* I don't know what this was needed for, but it pollutes the namespace. -+ So I turned it off. rms, 2 May 1997. */ -+/* #include <malloc.h> */ - #pragma alloca --#else /* not MSDOS, __TURBOC__, or _AIX */ --#ifdef __hpux --#ifdef __cplusplus --extern "C" { --void *alloca (unsigned int); --}; --#else /* not __cplusplus */ --void *alloca (); --#endif /* not __cplusplus */ -+#define YYSTACK_USE_ALLOCA -+#else /* not MSDOS, or __TURBOC__, or _AIX */ -+#if 0 -+#ifdef __hpux /* haible@ilog.fr says this works for HPUX 9.05 and up, -+ and on HPUX 10. Eventually we can turn this on. */ -+#define YYSTACK_USE_ALLOCA -+#define alloca __builtin_alloca - #endif /* __hpux */ -+#endif - #endif /* not _AIX */ - #endif /* not MSDOS, or __TURBOC__ */ --#endif /* not sparc. */ --#endif /* not GNU C. */ --#endif /* alloca not defined. */ -+#endif /* not sparc */ -+#endif /* not GNU C */ -+#endif /* alloca not defined */ -+#endif /* YYSTACK_USE_ALLOCA not defined */ - --/* This is the parser code that is written into each bison parser -- when the %semantic_parser declaration is not specified in the grammar. -- It was written by Richard Stallman by simplifying the hairy parser -- used when %semantic_parser is specified. */ -+#ifdef YYSTACK_USE_ALLOCA -+#define YYSTACK_ALLOC alloca -+#else -+#define YYSTACK_ALLOC malloc -+#endif - - /* Note: there must be only one dollar sign in this file. - It is replaced by the list of actions, each action -@@ -360,8 +380,8 @@ - #define yyclearin (yychar = YYEMPTY) - #define YYEMPTY -2 - #define YYEOF 0 --#define YYACCEPT return(0) --#define YYABORT return(1) -+#define YYACCEPT goto yyacceptlab -+#define YYABORT goto yyabortlab - #define YYERROR goto yyerrlab1 - /* Like YYERROR except do call yyerror. - This remains here temporarily to ease the -@@ -411,6 +431,10 @@ - int yychar; /* the lookahead symbol */ - YYSTYPE yylval; /* the semantic value of the */ - /* lookahead symbol */ -+YYSTYPE yyval; /* the variable used to return */ -+ /* semantic values from the action */ -+ /* routines */ -+ - - #ifdef YYLSP_NEEDED - YYLTYPE yylloc; /* location data for the lookahead */ -@@ -443,11 +467,11 @@ - #define YYMAXDEPTH 10000 - #endif - --/* Prevent warning if -Wstrict-prototypes. */ --#ifdef __GNUC__ --int yyparse (void); --#endif -- -+/* Define __yy_memcpy. Note that the size argument -+ should be passed with type unsigned int, because that is what the non-GCC -+ definitions require. With GCC, __builtin_memcpy takes an arg -+ of type size_t, but it can handle unsigned int. */ -+ - #if __GNUC__ > 1 /* GNU C and GNU C++ define this. */ - #define __yy_memcpy(TO,FROM,COUNT) __builtin_memcpy(TO,FROM,COUNT) - #else /* not GNU C or C++ */ -@@ -459,7 +483,7 @@ - __yy_memcpy (to, from, count) - char *to; - char *from; -- int count; -+ unsigned int count; - { - register char *f = from; - register char *t = to; -@@ -474,10 +498,10 @@ - /* This is the most reliable way to avoid incompatibilities - in available built-in functions on various systems. */ - static void --__yy_memcpy (char *to, char *from, int count) -+__yy_memcpy (char *to, char *from, unsigned int count) - { -- register char *f = from; - register char *t = to; -+ register char *f = from; - register int i = count; - - while (i-- > 0) -@@ -486,8 +510,8 @@ - - #endif - #endif -- --#line 196 "/usr/local/share/bison.simple" -+ -+//#line 217 "/pkg/gnu/share/bison.simple" - - /* The user can define YYPARSE_PARAM as the name of an argument to be passed - into yyparse. The argument should have type void *. -@@ -508,6 +532,15 @@ - #define YYPARSE_PARAM_DECL - #endif /* not YYPARSE_PARAM */ - -+/* Prevent warning if -Wstrict-prototypes. */ -+#ifdef __GNUC__ -+#ifdef YYPARSE_PARAM -+int yyparse (void *); -+#else -+int yyparse (void); -+#endif -+#endif -+ - int - yyparse(YYPARSE_PARAM_ARG) - YYPARSE_PARAM_DECL -@@ -536,6 +569,7 @@ - #endif - - int yystacksize = YYINITDEPTH; -+ int yyfree_stacks = 0; - - #ifdef YYPURE - int yychar; -@@ -546,10 +580,6 @@ - #endif - #endif - -- YYSTYPE yyval; /* the variable used to return */ -- /* semantic values from the action */ -- /* routines */ -- - int yylen; - - #if YYDEBUG != 0 -@@ -620,18 +650,32 @@ - if (yystacksize >= YYMAXDEPTH) - { - yyerror("parser stack overflow"); -+ if (yyfree_stacks) -+ { -+ free (yyss); -+ free (yyvs); -+#ifdef YYLSP_NEEDED -+ free (yyls); -+#endif -+ } - return 2; - } - yystacksize *= 2; - if (yystacksize > YYMAXDEPTH) - yystacksize = YYMAXDEPTH; -- yyss = (short *) alloca (yystacksize * sizeof (*yyssp)); -- __yy_memcpy ((char *)yyss, (char *)yyss1, size * sizeof (*yyssp)); -- yyvs = (YYSTYPE *) alloca (yystacksize * sizeof (*yyvsp)); -- __yy_memcpy ((char *)yyvs, (char *)yyvs1, size * sizeof (*yyvsp)); -+#ifndef YYSTACK_USE_ALLOCA -+ yyfree_stacks = 1; -+#endif -+ yyss = (short *) YYSTACK_ALLOC (yystacksize * sizeof (*yyssp)); -+ __yy_memcpy ((char *)yyss, (char *)yyss1, -+ size * (unsigned int) sizeof (*yyssp)); -+ yyvs = (YYSTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yyvsp)); -+ __yy_memcpy ((char *)yyvs, (char *)yyvs1, -+ size * (unsigned int) sizeof (*yyvsp)); - #ifdef YYLSP_NEEDED -- yyls = (YYLTYPE *) alloca (yystacksize * sizeof (*yylsp)); -- __yy_memcpy ((char *)yyls, (char *)yyls1, size * sizeof (*yylsp)); -+ yyls = (YYLTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yylsp)); -+ __yy_memcpy ((char *)yyls, (char *)yyls1, -+ size * (unsigned int) sizeof (*yylsp)); - #endif - #endif /* no yyoverflow */ - -@@ -792,225 +836,225 @@ - switch (yyn) { - - case 3: --#line 97 "ETCL.yy" -+//#line 97 "ETCL/ETCL.yy" - { yyval.constraint = new TAO_ETCL_Preference (TAO_ETCL_MIN, yyvsp[0].constraint); ; - break;} - case 4: --#line 99 "ETCL.yy" -+//#line 99 "ETCL/ETCL.yy" - { yyval.constraint = new TAO_ETCL_Preference (TAO_ETCL_MAX, yyvsp[0].constraint); ; - break;} - case 5: --#line 101 "ETCL.yy" -+//#line 101 "ETCL/ETCL.yy" - { yyval.constraint = new TAO_ETCL_Preference (TAO_ETCL_WITH, yyvsp[0].constraint); ; - break;} - case 6: --#line 103 "ETCL.yy" -+//#line 103 "ETCL/ETCL.yy" - { yyval.constraint = new TAO_ETCL_Preference (TAO_ETCL_FIRST); ; - break;} - case 7: --#line 105 "ETCL.yy" -+//#line 105 "ETCL/ETCL.yy" - { yyval.constraint = new TAO_ETCL_Preference (TAO_ETCL_RANDOM); ; - break;} - case 8: --#line 109 "ETCL.yy" -+//#line 109 "ETCL/ETCL.yy" - { yyval.constraint = new TAO_ETCL_Binary_Expr (TAO_ETCL_OR, yyvsp[-2].constraint, yyvsp[0].constraint); ; - break;} - case 10: --#line 114 "ETCL.yy" -+//#line 114 "ETCL/ETCL.yy" - { yyval.constraint = new TAO_ETCL_Binary_Expr (TAO_ETCL_AND, yyvsp[-2].constraint, yyvsp[0].constraint); ; - break;} - case 12: --#line 119 "ETCL.yy" -+//#line 119 "ETCL/ETCL.yy" - { yyval.constraint = new TAO_ETCL_Binary_Expr (TAO_ETCL_EQ, yyvsp[-2].constraint, yyvsp[0].constraint); ; - break;} - case 13: --#line 121 "ETCL.yy" -+//#line 121 "ETCL/ETCL.yy" - { yyval.constraint = new TAO_ETCL_Binary_Expr (TAO_ETCL_NE, yyvsp[-2].constraint, yyvsp[0].constraint); ; - break;} - case 14: --#line 123 "ETCL.yy" -+//#line 123 "ETCL/ETCL.yy" - { yyval.constraint = new TAO_ETCL_Binary_Expr (TAO_ETCL_GT, yyvsp[-2].constraint, yyvsp[0].constraint); ; - break;} - case 15: --#line 125 "ETCL.yy" -+//#line 125 "ETCL/ETCL.yy" - { yyval.constraint = new TAO_ETCL_Binary_Expr (TAO_ETCL_GE, yyvsp[-2].constraint, yyvsp[0].constraint); ; - break;} - case 16: --#line 127 "ETCL.yy" -+//#line 127 "ETCL/ETCL.yy" - { yyval.constraint = new TAO_ETCL_Binary_Expr (TAO_ETCL_LT, yyvsp[-2].constraint, yyvsp[0].constraint); ; - break;} - case 17: --#line 129 "ETCL.yy" -+//#line 129 "ETCL/ETCL.yy" - { yyval.constraint = new TAO_ETCL_Binary_Expr (TAO_ETCL_LE, yyvsp[-2].constraint, yyvsp[0].constraint); ; - break;} - case 19: --#line 134 "ETCL.yy" -+//#line 134 "ETCL/ETCL.yy" - { yyval.constraint = new TAO_ETCL_Binary_Expr (TAO_ETCL_IN, yyvsp[-2].constraint, yyvsp[0].constraint); ; - break;} - case 20: --#line 136 "ETCL.yy" -+//#line 136 "ETCL/ETCL.yy" - { yyval.constraint = new TAO_ETCL_Binary_Expr (TAO_ETCL_IN, yyvsp[-3].constraint, yyvsp[0].constraint); ; - break;} - case 22: --#line 141 "ETCL.yy" -+//#line 141 "ETCL/ETCL.yy" - { yyval.constraint = new TAO_ETCL_Binary_Expr (TAO_ETCL_TWIDDLE, yyvsp[-2].constraint, yyvsp[0].constraint); ; - break;} - case 24: --#line 146 "ETCL.yy" -+//#line 146 "ETCL/ETCL.yy" - { yyval.constraint = new TAO_ETCL_Binary_Expr (TAO_ETCL_PLUS, yyvsp[-2].constraint, yyvsp[0].constraint); ; - break;} - case 25: --#line 148 "ETCL.yy" -+//#line 148 "ETCL/ETCL.yy" - { yyval.constraint = new TAO_ETCL_Binary_Expr (TAO_ETCL_MINUS, yyvsp[-2].constraint, yyvsp[0].constraint); ; - break;} - case 27: --#line 153 "ETCL.yy" -+//#line 153 "ETCL/ETCL.yy" - { yyval.constraint = new TAO_ETCL_Binary_Expr (TAO_ETCL_MULT, yyvsp[-2].constraint, yyvsp[0].constraint); ; - break;} - case 28: --#line 155 "ETCL.yy" -+//#line 155 "ETCL/ETCL.yy" - { yyval.constraint = new TAO_ETCL_Binary_Expr (TAO_ETCL_DIV, yyvsp[-2].constraint, yyvsp[0].constraint); ; - break;} - case 30: --#line 160 "ETCL.yy" -+//#line 160 "ETCL/ETCL.yy" - { yyval.constraint = new TAO_ETCL_Unary_Expr (TAO_ETCL_NOT, yyvsp[0].constraint); ; - break;} - case 32: --#line 165 "ETCL.yy" -+//#line 165 "ETCL/ETCL.yy" - { yyval.constraint = yyvsp[-1].constraint; ; - break;} - case 33: --#line 167 "ETCL.yy" -+//#line 167 "ETCL/ETCL.yy" - { yyval.constraint = yyvsp[0].constraint; ; - break;} - case 34: --#line 169 "ETCL.yy" -+//#line 169 "ETCL/ETCL.yy" - { yyval.constraint = new TAO_ETCL_Unary_Expr (TAO_ETCL_PLUS, yyvsp[0].constraint); ; - break;} - case 35: --#line 171 "ETCL.yy" -+//#line 171 "ETCL/ETCL.yy" - { yyval.constraint = new TAO_ETCL_Unary_Expr (TAO_ETCL_MINUS, yyvsp[0].constraint); ; - break;} - case 36: --#line 173 "ETCL.yy" -+//#line 173 "ETCL/ETCL.yy" - { yyval.constraint = yyvsp[0].constraint; ; - break;} - case 37: --#line 175 "ETCL.yy" -+//#line 175 "ETCL/ETCL.yy" - { yyval.constraint = new TAO_ETCL_Unary_Expr (TAO_ETCL_PLUS, yyvsp[0].constraint); ; - break;} - case 38: --#line 177 "ETCL.yy" -+//#line 177 "ETCL/ETCL.yy" - { yyval.constraint = new TAO_ETCL_Unary_Expr (TAO_ETCL_MINUS, yyvsp[0].constraint); ; - break;} - case 39: --#line 179 "ETCL.yy" -+//#line 179 "ETCL/ETCL.yy" - { yyval.constraint = yyvsp[0].constraint; ; - break;} - case 40: --#line 181 "ETCL.yy" -+//#line 181 "ETCL/ETCL.yy" - { yyval.constraint = yyvsp[0].constraint; ; - break;} - case 41: --#line 183 "ETCL.yy" -+//#line 183 "ETCL/ETCL.yy" - { yyval.constraint = new TAO_ETCL_Exist (yyvsp[0].constraint); ; - break;} - case 42: --#line 185 "ETCL.yy" -+//#line 185 "ETCL/ETCL.yy" - { yyval.constraint = new TAO_ETCL_Exist (yyvsp[0].constraint); ; - break;} - case 43: --#line 187 "ETCL.yy" -+//#line 187 "ETCL/ETCL.yy" - { yyval.constraint = new TAO_ETCL_Default (yyvsp[0].constraint); ; - break;} - case 44: --#line 189 "ETCL.yy" -+//#line 189 "ETCL/ETCL.yy" - { yyval.constraint = new TAO_ETCL_Eval (yyvsp[0].constraint); ; - break;} - case 45: --#line 191 "ETCL.yy" -+//#line 191 "ETCL/ETCL.yy" - { yyval.constraint = yyvsp[0].constraint; ; - break;} - case 46: --#line 195 "ETCL.yy" -+//#line 195 "ETCL/ETCL.yy" - { yyval.constraint = 0; ; - break;} - case 47: --#line 197 "ETCL.yy" -+//#line 197 "ETCL/ETCL.yy" - { yyval.constraint = new TAO_ETCL_Dot (yyvsp[0].constraint); ; - break;} - case 48: --#line 200 "ETCL.yy" -+//#line 200 "ETCL/ETCL.yy" - { yyval.constraint = new TAO_ETCL_Component (yyvsp[-1].constraint, yyvsp[0].constraint); ; - break;} - case 51: --#line 207 "ETCL.yy" -+//#line 207 "ETCL/ETCL.yy" - { yyval.constraint = 0; ; - break;} - case 52: --#line 209 "ETCL.yy" -+//#line 209 "ETCL/ETCL.yy" - { yyval.constraint = new TAO_ETCL_Dot (yyvsp[0].constraint); ; - break;} - case 55: --#line 216 "ETCL.yy" -+//#line 216 "ETCL/ETCL.yy" - { yyval.constraint = new TAO_ETCL_Component (yyvsp[-1].constraint, yyvsp[0].constraint); ; - break;} - case 56: --#line 218 "ETCL.yy" -+//#line 218 "ETCL/ETCL.yy" - { yyval.constraint = new TAO_ETCL_Special (TAO_ETCL_LENGTH); ; - break;} - case 57: --#line 220 "ETCL.yy" -+//#line 220 "ETCL/ETCL.yy" - { yyval.constraint = new TAO_ETCL_Special (TAO_ETCL_DISCRIMINANT); ; - break;} - case 58: --#line 222 "ETCL.yy" -+//#line 222 "ETCL/ETCL.yy" - { yyval.constraint = new TAO_ETCL_Special (TAO_ETCL_TYPE_ID); ; - break;} - case 59: --#line 224 "ETCL.yy" -+//#line 224 "ETCL/ETCL.yy" - { yyval.constraint = new TAO_ETCL_Special (TAO_ETCL_REPOS_ID); ; - break;} - case 62: --#line 230 "ETCL.yy" -+//#line 230 "ETCL/ETCL.yy" - { yyval.constraint = new TAO_ETCL_Component_Array (yyvsp[-2].constraint, yyvsp[0].constraint); ; - break;} - case 63: --#line 234 "ETCL.yy" -+//#line 234 "ETCL/ETCL.yy" - { yyval.constraint = new TAO_ETCL_Component_Assoc (yyvsp[-2].constraint, yyvsp[0].constraint); ; - break;} - case 64: --#line 238 "ETCL.yy" -+//#line 238 "ETCL/ETCL.yy" - { yyval.constraint = new TAO_ETCL_Component_Pos (yyvsp[-1].constraint, yyvsp[0].constraint); ; - break;} - case 65: --#line 242 "ETCL.yy" -+//#line 242 "ETCL/ETCL.yy" - { yyval.constraint = new TAO_ETCL_Union_Pos (yyvsp[-2].constraint, yyvsp[0].constraint); ; - break;} - case 66: --#line 246 "ETCL.yy" -+//#line 246 "ETCL/ETCL.yy" - { yyval.constraint = 0; ; - break;} - case 67: --#line 248 "ETCL.yy" -+//#line 248 "ETCL/ETCL.yy" - { yyval.constraint = new TAO_ETCL_Union_Value (+1, yyvsp[0].constraint); ; - break;} - case 68: --#line 250 "ETCL.yy" -+//#line 250 "ETCL/ETCL.yy" - { yyval.constraint = new TAO_ETCL_Union_Value (+1, yyvsp[0].constraint); ; - break;} - case 69: --#line 252 "ETCL.yy" -+//#line 252 "ETCL/ETCL.yy" - { yyval.constraint = new TAO_ETCL_Union_Value (-1, yyvsp[0].constraint); ; - break;} - case 70: --#line 254 "ETCL.yy" -+//#line 254 "ETCL/ETCL.yy" - { yyval.constraint = new TAO_ETCL_Union_Value (yyvsp[0].constraint); ; - break;} - } - /* the action file gets copied in in place of this dollarsign */ --#line 498 "/usr/local/share/bison.simple" -- -+//#line 543 "/pkg/gnu/share/bison.simple" -+ - yyvsp -= yylen; - yyssp -= yylen; - #ifdef YYLSP_NEEDED -@@ -1204,7 +1248,37 @@ - - yystate = yyn; - goto yynewstate; -+ -+ yyacceptlab: -+ /* YYACCEPT comes here. */ -+ if (yyfree_stacks) -+ { -+ free (yyss); -+ free (yyvs); -+#ifdef YYLSP_NEEDED -+ free (yyls); -+#endif -+ } -+ return 0; -+ -+ yyabortlab: -+ /* YYABORT comes here. */ -+ -+ /* Flush out yy_current_buffer before next parse. Since there is -+ no error recovery, the buffer could still contain tokens from this -+ parse. */ -+ yyflush_current_buffer(); -+ -+ if (yyfree_stacks) -+ { -+ free (yyss); -+ free (yyvs); -+#ifdef YYLSP_NEEDED -+ free (yyls); -+#endif -+ } -+ return 1; - } --#line 257 "ETCL.yy" -+//#line 257 "ETCL/ETCL.yy" - - diff --git a/TAO/orbsvcs/orbsvcs/ETCL/ETCL_y.h b/TAO/orbsvcs/orbsvcs/ETCL/ETCL_y.h deleted file mode 100644 index ce37c579583..00000000000 --- a/TAO/orbsvcs/orbsvcs/ETCL/ETCL_y.h +++ /dev/null @@ -1,45 +0,0 @@ -// $Id$ -#define TAO_ETCL_GT 257 -#define TAO_ETCL_GE 258 -#define TAO_ETCL_LT 259 -#define TAO_ETCL_LE 260 -#define TAO_ETCL_EQ 261 -#define TAO_ETCL_NE 262 -#define TAO_ETCL_EXIST 263 -#define TAO_ETCL_DEFAULT 264 -#define TAO_ETCL_AND 265 -#define TAO_ETCL_OR 266 -#define TAO_ETCL_NOT 267 -#define TAO_ETCL_IN 268 -#define TAO_ETCL_TWIDDLE 269 -#define TAO_ETCL_BOOLEAN 270 -#define TAO_ETCL_PLUS 271 -#define TAO_ETCL_MINUS 272 -#define TAO_ETCL_MULT 273 -#define TAO_ETCL_DIV 274 -#define TAO_ETCL_UMINUS 275 -#define TAO_ETCL_INTEGER 276 -#define TAO_ETCL_FLOAT 277 -#define TAO_ETCL_STRING 278 -#define TAO_ETCL_RPAREN 279 -#define TAO_ETCL_LPAREN 280 -#define TAO_ETCL_RBRA 281 -#define TAO_ETCL_LBRA 282 -#define TAO_ETCL_IDENT 283 -#define TAO_ETCL_UNSIGNED 284 -#define TAO_ETCL_SIGNED 285 -#define TAO_ETCL_DOUBLE 286 -#define TAO_ETCL_CONSTRAINT 287 -#define TAO_ETCL_COMPONENT 288 -#define TAO_ETCL_WITH 289 -#define TAO_ETCL_MAX 290 -#define TAO_ETCL_MIN 291 -#define TAO_ETCL_FIRST 292 -#define TAO_ETCL_RANDOM 293 -#define TAO_ETCL_DOLLAR 294 -#define TAO_ETCL_DOT 295 -#define TAO_ETCL_DISCRIMINANT 296 -#define TAO_ETCL_LENGTH 297 -#define TAO_ETCL_TYPE_ID 298 -#define TAO_ETCL_REPOS_ID 299 - diff --git a/TAO/orbsvcs/orbsvcs/ETCL/ETCL_y.h.diff b/TAO/orbsvcs/orbsvcs/ETCL/ETCL_y.h.diff deleted file mode 100644 index 85acf912763..00000000000 --- a/TAO/orbsvcs/orbsvcs/ETCL/ETCL_y.h.diff +++ /dev/null @@ -1,25 +0,0 @@ ---- ETCL_y.h Mon Nov 12 16:07:25 2001 -+++ ETCL_y.h.safe Thu Oct 11 20:53:13 2001 -@@ -1,7 +1,4 @@ - // $Id$ --#ifndef YYSTYPE --#define YYSTYPE int --#endif - #define TAO_ETCL_GT 257 - #define TAO_ETCL_GE 258 - #define TAO_ETCL_LT 259 -@@ -33,7 +30,7 @@ - #define TAO_ETCL_SIGNED 285 - #define TAO_ETCL_DOUBLE 286 - #define TAO_ETCL_CONSTRAINT 287 --#define TAO_ETCL_SEQUENCE 288 -+#define TAO_ETCL_COMPONENT 288 - #define TAO_ETCL_WITH 289 - #define TAO_ETCL_MAX 290 - #define TAO_ETCL_MIN 291 -@@ -46,5 +43,3 @@ - #define TAO_ETCL_TYPE_ID 298 - #define TAO_ETCL_REPOS_ID 299 - -- --extern YYSTYPE yylval; diff --git a/TAO/orbsvcs/orbsvcs/ETCL/README b/TAO/orbsvcs/orbsvcs/ETCL/README deleted file mode 100644 index dca67871f74..00000000000 --- a/TAO/orbsvcs/orbsvcs/ETCL/README +++ /dev/null @@ -1,12 +0,0 @@ -# $Id$ -# -# Implement an "Extended Trader Constraint Language" parser. -# This language was defined as part of the Notification Service -# [give URL] to define filtering constraints. It is in fact an -# extension on the "Trader Constraint Language", using in the Trading -# Service [URL] to constraint on user queries. -# -# Other services use the same language, including the Logging Service, -# parts of the Fault Tolerance services and (in the future) TAO's -# Real-time Event Service. -# diff --git a/TAO/orbsvcs/orbsvcs/ETCL/etcl_export.h b/TAO/orbsvcs/orbsvcs/ETCL/etcl_export.h deleted file mode 100644 index 5f78b57d789..00000000000 --- a/TAO/orbsvcs/orbsvcs/ETCL/etcl_export.h +++ /dev/null @@ -1,40 +0,0 @@ - -// -*- C++ -*- -// $Id$ -// Definition for Win32 Export directives. -// This file is generated automatically by generate_export_file.pl -// ------------------------------ -#ifndef TAO_ETCL_EXPORT_H -#define TAO_ETCL_EXPORT_H - -#include "ace/config-all.h" - -#if defined (TAO_AS_STATIC_LIBS) -# if !defined (TAO_ETCL_HAS_DLL) -# define TAO_ETCL_HAS_DLL 0 -# endif /* ! TAO_ETCL_HAS_DLL */ -#else -# if !defined (TAO_ETCL_HAS_DLL) -# define TAO_ETCL_HAS_DLL 1 -# endif /* ! TAO_ETCL_HAS_DLL */ -#endif - -#if defined (TAO_ETCL_HAS_DLL) && (TAO_ETCL_HAS_DLL == 1) -# if defined (TAO_ETCL_BUILD_DLL) -# define TAO_ETCL_Export ACE_Proper_Export_Flag -# define TAO_ETCL_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) -# define TAO_ETCL_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) -# else /* TAO_ETCL_BUILD_DLL */ -# define TAO_ETCL_Export ACE_Proper_Import_Flag -# define TAO_ETCL_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) -# define TAO_ETCL_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) -# endif /* TAO_ETCL_BUILD_DLL */ -#else /* TAO_ETCL_HAS_DLL == 1 */ -# define TAO_ETCL_Export -# define TAO_ETCL_SINGLETON_DECLARATION(T) -# define TAO_ETCL_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) -#endif /* TAO_ETCL_HAS_DLL == 1 */ - -#endif /* TAO_ETCL_EXPORT_H */ - -// End of auto generated file. diff --git a/TAO/orbsvcs/orbsvcs/Log/Log_Constraint_Interpreter.cpp b/TAO/orbsvcs/orbsvcs/Log/Log_Constraint_Interpreter.cpp index 33870c64cd0..7397e6e3d96 100644 --- a/TAO/orbsvcs/orbsvcs/Log/Log_Constraint_Interpreter.cpp +++ b/TAO/orbsvcs/orbsvcs/Log/Log_Constraint_Interpreter.cpp @@ -12,7 +12,7 @@ TAO_Log_Constraint_Interpreter::TAO_Log_Constraint_Interpreter ( const char *constraints ) { - if (TAO_ETCL_Interpreter::is_empty_string (constraints)) + if (ETCL_Interpreter::is_empty_string (constraints)) { // Root is deleted in the TAO_Interpreter's destructor. ACE_NEW_THROW_EX (this->root_, @@ -22,7 +22,7 @@ TAO_Log_Constraint_Interpreter::TAO_Log_Constraint_Interpreter ( else { // root_ is set in this base class call. - if (TAO_ETCL_Interpreter::build_tree (constraints) != 0) + if (ETCL_Interpreter::build_tree (constraints) != 0) throw DsLogAdmin::InvalidConstraint (); } } diff --git a/TAO/orbsvcs/orbsvcs/Log/Log_Constraint_Interpreter.h b/TAO/orbsvcs/orbsvcs/Log/Log_Constraint_Interpreter.h index 8bb542da1be..d13c4d2cfdd 100644 --- a/TAO/orbsvcs/orbsvcs/Log/Log_Constraint_Interpreter.h +++ b/TAO/orbsvcs/orbsvcs/Log/Log_Constraint_Interpreter.h @@ -19,13 +19,14 @@ #define TAO_LOG_CONSTRAINT_INTERPRETER_H #include /**/ "ace/pre.h" -#include "orbsvcs/ETCL/ETCL_Interpreter.h" + +#include "ace/ETCL/ETCL_Interpreter.h" #if !defined (ACE_LACKS_PRAGMA_ONCE) # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ -#include "orbsvcs/ETCL/ETCL_Constraint.h" +#include "ace/ETCL/ETCL_Constraint.h" #include "orbsvcs/DsLogAdminC.h" #include "orbsvcs/Log/log_serv_export.h" @@ -39,7 +40,7 @@ class TAO_Log_Constraint_Visitor; * @brief "ETCL" Interpreter for the Log queries. */ class TAO_Log_Serv_Export TAO_Log_Constraint_Interpreter : - public TAO_ETCL_Interpreter + public ETCL_Interpreter { public: diff --git a/TAO/orbsvcs/orbsvcs/Log/Log_Constraint_Visitors.cpp b/TAO/orbsvcs/orbsvcs/Log/Log_Constraint_Visitors.cpp index 5c1cbb0ed4f..215abcadae0 100644 --- a/TAO/orbsvcs/orbsvcs/Log/Log_Constraint_Visitors.cpp +++ b/TAO/orbsvcs/orbsvcs/Log/Log_Constraint_Visitors.cpp @@ -1,7 +1,7 @@ #include "orbsvcs/Log/Log_Constraint_Visitors.h" -#include "orbsvcs/ETCL/ETCL_Constraint.h" -#include "orbsvcs/ETCL/ETCL_y.h" +#include "ace/ETCL/ETCL_Constraint.h" +#include "ace/ETCL/ETCL_y.h" #include "tao/DynamicAny/DynArray_i.h" #include "tao/DynamicAny/DynSequence_i.h" @@ -54,7 +54,7 @@ TAO_Log_Constraint_Visitor::TAO_Log_Constraint_Visitor (const DsLogAdmin::LogRec } CORBA::Boolean -TAO_Log_Constraint_Visitor::evaluate_constraint (TAO_ETCL_Constraint* root) +TAO_Log_Constraint_Visitor::evaluate_constraint (ETCL_Constraint* root) { CORBA::Boolean result = 0; this->queue_.reset (); @@ -147,9 +147,9 @@ TAO_Log_Constraint_Visitor::visit_union_pos ( switch (disc_val.expr_type ()) { - case TAO_ETCL_INTEGER: - case TAO_ETCL_SIGNED: - case TAO_ETCL_UNSIGNED: + case ETCL_INTEGER: + case ETCL_SIGNED: + case ETCL_UNSIGNED: { CORBA::Any disc_any; CORBA::TypeCode_var disc_tc = @@ -216,7 +216,7 @@ TAO_Log_Constraint_Visitor::visit_union_pos ( break; } - case TAO_ETCL_STRING: + case ETCL_STRING: { const char *name = (const char *) disc_val; CORBA::ULong count = @@ -248,7 +248,7 @@ TAO_Log_Constraint_Visitor::visit_union_pos ( return -1; } - TAO_ETCL_Constraint *nested = union_pos->component (); + ETCL_Constraint *nested = union_pos->component (); // If there's no nested component, then we just want the // union member value on the queue. Otherwise, we want @@ -334,7 +334,7 @@ TAO_Log_Constraint_Visitor::visit_component_pos (TAO_ETCL_Component_Pos *pos) CORBA::Any_var value = member->to_any (); - TAO_ETCL_Constraint *comp = pos->component (); + ETCL_Constraint *comp = pos->component (); if (comp == 0) { @@ -379,7 +379,7 @@ TAO_Log_Constraint_Visitor::visit_component_assoc ( return -1; } - TAO_ETCL_Constraint *comp = assoc->component (); + ETCL_Constraint *comp = assoc->component (); CORBA::Any *any_ptr = 0; if (comp == 0) @@ -455,7 +455,7 @@ TAO_Log_Constraint_Visitor::visit_component_array ( CORBA::Any_var value = member->to_any (); - TAO_ETCL_Constraint *comp = array->component (); + ETCL_Constraint *comp = array->component (); if (comp == 0) { @@ -484,7 +484,7 @@ TAO_Log_Constraint_Visitor::visit_special (TAO_ETCL_Special *special) switch (special->type ()) { - case TAO_ETCL_LENGTH: + case ETCL_LENGTH: { // If the TCKind is not a sequence or an array, the // call to length() will raise an exception, and the @@ -495,7 +495,7 @@ TAO_Log_Constraint_Visitor::visit_special (TAO_ETCL_Special *special) this->queue_.enqueue_head (lit); return 0; } - case TAO_ETCL_DISCRIMINANT: + case ETCL_DISCRIMINANT: { // If the TCKind is not a union, the // call to init() will raise an exception, and the @@ -512,7 +512,7 @@ TAO_Log_Constraint_Visitor::visit_special (TAO_ETCL_Special *special) this->queue_.enqueue_head (lit); return 0; } - case TAO_ETCL_TYPE_ID: + case ETCL_TYPE_ID: { const char *name = tc->name (); @@ -520,7 +520,7 @@ TAO_Log_Constraint_Visitor::visit_special (TAO_ETCL_Special *special) this->queue_.enqueue_head (lit); return 0; } - case TAO_ETCL_REPOS_ID: + case ETCL_REPOS_ID: { const char *id = tc->id (); @@ -550,7 +550,7 @@ TAO_Log_Constraint_Visitor::visit_component ( // in our member _var for possible examination at a more // nested level, and visit the sub-component. - TAO_ETCL_Constraint *nested = component->component (); + ETCL_Constraint *nested = component->component (); int result = component->identifier ()->accept (this); if (nested == 0 || result != 0) @@ -591,7 +591,7 @@ TAO_Log_Constraint_Visitor::visit_eval (TAO_ETCL_Eval *eval) int TAO_Log_Constraint_Visitor::visit_default (TAO_ETCL_Default *def) { - TAO_ETCL_Constraint *comp = def->component (); + ETCL_Constraint *comp = def->component (); if (comp == 0) { @@ -635,7 +635,7 @@ TAO_Log_Constraint_Visitor::visit_default (TAO_ETCL_Default *def) int TAO_Log_Constraint_Visitor::visit_exist (TAO_ETCL_Exist *exist) { - TAO_ETCL_Constraint *component = exist->component (); + ETCL_Constraint *component = exist->component (); if (component->accept (this) == 0) { @@ -661,7 +661,7 @@ TAO_Log_Constraint_Visitor::visit_unary_expr ( TAO_ETCL_Unary_Expr *unary_expr ) { - TAO_ETCL_Constraint *subexpr = unary_expr->subexpr (); + ETCL_Constraint *subexpr = unary_expr->subexpr (); if (subexpr->accept (this) == 0) { @@ -671,19 +671,19 @@ TAO_Log_Constraint_Visitor::visit_unary_expr ( switch (op_type) { - case TAO_ETCL_NOT: + case ETCL_NOT: this->queue_.dequeue_head (subexpr_result); result = ! (CORBA::Boolean) subexpr_result; this->queue_.enqueue_head (TAO_ETCL_Literal_Constraint (result)); return 0; - case TAO_ETCL_MINUS: + case ETCL_MINUS: // The leading '-' was parsed separately, so we have to pull // the literal constraint off the queue, apply the class' own // unary minus operator, and put it back. this->queue_.dequeue_head (subexpr_result); this->queue_.enqueue_head (-subexpr_result); return 0; - case TAO_ETCL_PLUS: + case ETCL_PLUS: // Leave the literal constraint on the queue. The leading // '+' was just syntactic sugar - no action is necessary. return 0; @@ -708,25 +708,25 @@ TAO_Log_Constraint_Visitor::visit_binary_expr ( switch (bin_op_type) { - case TAO_ETCL_OR: + case ETCL_OR: return this->visit_or (binary_expr); - case TAO_ETCL_AND: + case ETCL_AND: return this->visit_and (binary_expr); - case TAO_ETCL_LT: - case TAO_ETCL_LE: - case TAO_ETCL_GT: - case TAO_ETCL_GE: - case TAO_ETCL_EQ: - case TAO_ETCL_NE: - case TAO_ETCL_PLUS: - case TAO_ETCL_MINUS: - case TAO_ETCL_MULT: - case TAO_ETCL_DIV: + case ETCL_LT: + case ETCL_LE: + case ETCL_GT: + case ETCL_GE: + case ETCL_EQ: + case ETCL_NE: + case ETCL_PLUS: + case ETCL_MINUS: + case ETCL_MULT: + case ETCL_DIV: return this->visit_binary_op (binary_expr, bin_op_type); - case TAO_ETCL_TWIDDLE: + case ETCL_TWIDDLE: return this->visit_twiddle (binary_expr); - case TAO_ETCL_IN: + case ETCL_IN: return this->visit_in (binary_expr); default: return -1; @@ -740,7 +740,7 @@ TAO_Log_Constraint_Visitor::visit_or ( { int return_value = -1; CORBA::Boolean result = 0; - TAO_ETCL_Constraint *lhs = binary->lhs (); + ETCL_Constraint *lhs = binary->lhs (); if (lhs->accept (this) == 0) { @@ -751,7 +751,7 @@ TAO_Log_Constraint_Visitor::visit_or ( // Short-circuiting OR. if (result == 0) { - TAO_ETCL_Constraint *rhs = binary->rhs (); + ETCL_Constraint *rhs = binary->rhs (); if (rhs->accept (this) == 0) { @@ -782,7 +782,7 @@ TAO_Log_Constraint_Visitor::visit_and ( { int return_value = -1; CORBA::Boolean result = 0; - TAO_ETCL_Constraint *lhs = binary->lhs (); + ETCL_Constraint *lhs = binary->lhs (); if (lhs->accept (this) == 0) { @@ -793,7 +793,7 @@ TAO_Log_Constraint_Visitor::visit_and ( // Short-circuiting AND. if (result == 1) { - TAO_ETCL_Constraint *rhs = binary->rhs (); + ETCL_Constraint *rhs = binary->rhs (); if (rhs->accept (this) == 0) { @@ -824,7 +824,7 @@ TAO_Log_Constraint_Visitor::visit_binary_op ( ) { int return_value = -1; - TAO_ETCL_Constraint *lhs = binary->lhs (); + ETCL_Constraint *lhs = binary->lhs (); CORBA::Boolean result = 0; // Evaluate the constraint @@ -836,7 +836,7 @@ TAO_Log_Constraint_Visitor::visit_binary_op ( // Evaluate the constraint TAO_ETCL_Literal_Constraint left_operand; this->queue_.dequeue_head (left_operand); - TAO_ETCL_Constraint *rhs = binary->rhs (); + ETCL_Constraint *rhs = binary->rhs (); if (rhs->accept (this) == 0) { @@ -846,40 +846,40 @@ TAO_Log_Constraint_Visitor::visit_binary_op ( switch (op_type) { - case TAO_ETCL_LT: + case ETCL_LT: result = left_operand < right_operand; this->queue_.enqueue_head (TAO_ETCL_Literal_Constraint (result)); break; - case TAO_ETCL_LE: + case ETCL_LE: result = left_operand <= right_operand; this->queue_.enqueue_head (TAO_ETCL_Literal_Constraint (result)); break; - case TAO_ETCL_GT: + case ETCL_GT: result = left_operand > right_operand; this->queue_.enqueue_head (TAO_ETCL_Literal_Constraint (result)); break; - case TAO_ETCL_GE: + case ETCL_GE: result = left_operand >= right_operand; this->queue_.enqueue_head (TAO_ETCL_Literal_Constraint (result)); break; - case TAO_ETCL_EQ: + case ETCL_EQ: result = left_operand == right_operand; this->queue_.enqueue_head (TAO_ETCL_Literal_Constraint (result)); break; - case TAO_ETCL_NE: + case ETCL_NE: result = left_operand != right_operand; this->queue_.enqueue_head (TAO_ETCL_Literal_Constraint (result)); break; - case TAO_ETCL_PLUS: + case ETCL_PLUS: this->queue_.enqueue_head (left_operand + right_operand); break; - case TAO_ETCL_MINUS: + case ETCL_MINUS: this->queue_.enqueue_head (left_operand - right_operand); break; - case TAO_ETCL_MULT: + case ETCL_MULT: this->queue_.enqueue_head (left_operand * right_operand); break; - case TAO_ETCL_DIV: + case ETCL_DIV: this->queue_.enqueue_head (left_operand / right_operand); break; default: @@ -897,14 +897,14 @@ TAO_Log_Constraint_Visitor::visit_twiddle ( ) { int return_value = -1; - TAO_ETCL_Constraint *lhs = binary->lhs (); + ETCL_Constraint *lhs = binary->lhs (); // Determine if the left operand is a substring of the right. if (lhs->accept (this) == 0) { TAO_ETCL_Literal_Constraint left; this->queue_.dequeue_head (left); - TAO_ETCL_Constraint *rhs = binary->rhs (); + ETCL_Constraint *rhs = binary->rhs (); if (rhs->accept (this) == 0) { @@ -927,7 +927,7 @@ TAO_Log_Constraint_Visitor::visit_in ( ) { int return_value = -1; - TAO_ETCL_Constraint *lhs = binary->lhs (); + ETCL_Constraint *lhs = binary->lhs (); // Determine if the left operand is contained in the right. @@ -936,14 +936,14 @@ TAO_Log_Constraint_Visitor::visit_in ( TAO_ETCL_Literal_Constraint left; this->queue_.dequeue_head (left); - TAO_ETCL_Constraint *rhs = binary->rhs (); + ETCL_Constraint *rhs = binary->rhs (); if (rhs->accept (this) == 0) { TAO_ETCL_Literal_Constraint bag; this->queue_.dequeue_head (bag); - if (bag.expr_type () == TAO_ETCL_COMPONENT) + if (bag.expr_type () == ETCL_COMPONENT) { CORBA::Any_var component = new CORBA::Any (); component->replace (bag); @@ -1212,33 +1212,33 @@ TAO_Log_Constraint_Visitor::simple_type_match (int expr_type, { switch (expr_type) { - case TAO_ETCL_STRING: + case ETCL_STRING: if (tc_kind != CORBA::tk_string) { return 0; } - case TAO_ETCL_DOUBLE: + case ETCL_DOUBLE: if (tc_kind != CORBA::tk_double && tc_kind != CORBA::tk_float) { return 0; } - case TAO_ETCL_INTEGER: - case TAO_ETCL_SIGNED: + case ETCL_INTEGER: + case ETCL_SIGNED: if (tc_kind != CORBA::tk_short && tc_kind != CORBA::tk_long && tc_kind != CORBA::tk_longlong) { return 0; } - case TAO_ETCL_UNSIGNED: + case ETCL_UNSIGNED: if (tc_kind != CORBA::tk_ushort && tc_kind != CORBA::tk_ulong && tc_kind != CORBA::tk_ulonglong) { return 0; } - case TAO_ETCL_BOOLEAN: + case ETCL_BOOLEAN: if (tc_kind != CORBA::tk_boolean) { return 0; diff --git a/TAO/orbsvcs/orbsvcs/Log/Log_Constraint_Visitors.h b/TAO/orbsvcs/orbsvcs/Log/Log_Constraint_Visitors.h index f9067132c3b..fb69ed1acf7 100644 --- a/TAO/orbsvcs/orbsvcs/Log/Log_Constraint_Visitors.h +++ b/TAO/orbsvcs/orbsvcs/Log/Log_Constraint_Visitors.h @@ -25,10 +25,13 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ -#include "orbsvcs/ETCL/ETCL_Constraint_Visitor.h" -#include "orbsvcs/DsLogAdminC.h" +#include "ace/ETCL/ETCL_Constraint_Visitor.h" #include "ace/Null_Mutex.h" +#include "tao/ETCL/TAO_ETCL_Constraint.h" + +#include "orbsvcs/DsLogAdminC.h" + #include "orbsvcs/Log/log_serv_export.h" TAO_BEGIN_VERSIONED_NAMESPACE_DECL @@ -43,7 +46,7 @@ class TAO_Log_Property_Constraint; * @brief "ETCL" Visitor for the Log queries. */ class TAO_Log_Serv_Export TAO_Log_Constraint_Visitor : - public TAO_ETCL_Constraint_Visitor + public ETCL_Constraint_Visitor { public: @@ -56,7 +59,7 @@ public: * doesn't. If an error occurs during process, the traversal * automatically fails. */ - CORBA::Boolean evaluate_constraint (TAO_ETCL_Constraint *root); + CORBA::Boolean evaluate_constraint (ETCL_Constraint *root); // = The overridden methods. int visit_literal (TAO_ETCL_Literal_Constraint *); diff --git a/TAO/orbsvcs/orbsvcs/Notify/Notify_Constraint_Interpreter.cpp b/TAO/orbsvcs/orbsvcs/Notify/Notify_Constraint_Interpreter.cpp index 01a08c99064..ed05a300f62 100644 --- a/TAO/orbsvcs/orbsvcs/Notify/Notify_Constraint_Interpreter.cpp +++ b/TAO/orbsvcs/orbsvcs/Notify/Notify_Constraint_Interpreter.cpp @@ -3,8 +3,9 @@ #include "orbsvcs/Notify/Notify_Constraint_Interpreter.h" #include "orbsvcs/Notify/Notify_Constraint_Visitors.h" -ACE_RCSID(Notify, NS_Constraint_Interpreter, "$Id$") - +ACE_RCSID (Notify, + NS_Constraint_Interpreter, + "$Id$") TAO_BEGIN_VERSIONED_NAMESPACE_DECL @@ -21,7 +22,7 @@ TAO_Notify_Constraint_Interpreter::build_tree ( const char *constraints ) { - if (TAO_ETCL_Interpreter::is_empty_string (constraints)) + if (ETCL_Interpreter::is_empty_string (constraints)) { // Root is deleted in the TAO_Interpreter's destructor. ACE_NEW_THROW_EX (this->root_, @@ -31,7 +32,7 @@ TAO_Notify_Constraint_Interpreter::build_tree ( else { // root_ is set in this base class call. - if (TAO_ETCL_Interpreter::build_tree (constraints) != 0) + if (ETCL_Interpreter::build_tree (constraints) != 0) throw CosNotifyFilter::InvalidConstraint (); } } diff --git a/TAO/orbsvcs/orbsvcs/Notify/Notify_Constraint_Interpreter.h b/TAO/orbsvcs/orbsvcs/Notify/Notify_Constraint_Interpreter.h index 632e77f348f..8b5dfc1b173 100644 --- a/TAO/orbsvcs/orbsvcs/Notify/Notify_Constraint_Interpreter.h +++ b/TAO/orbsvcs/orbsvcs/Notify/Notify_Constraint_Interpreter.h @@ -10,18 +10,19 @@ */ //============================================================================= - #ifndef TAO_NOTIFY_CONSTRAINT_INTERPRETER_H #define TAO_NOTIFY_CONSTRAINT_INTERPRETER_H #include /**/ "ace/pre.h" -#include "orbsvcs/ETCL/ETCL_Interpreter.h" + +#include "ace/ETCL/ETCL_Interpreter.h" #if !defined (ACE_LACKS_PRAGMA_ONCE) # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ -#include "orbsvcs/ETCL/ETCL_Constraint.h" +#include "tao/ETCL/TAO_ETCL_Constraint.h" + #include "orbsvcs/CosNotifyFilterC.h" #include "orbsvcs/Notify/notify_serv_export.h" @@ -34,7 +35,8 @@ class TAO_Notify_Constraint_Visitor; * * @brief "ETCL" Interpreter for the Notify queries. */ -class TAO_Notify_Serv_Export TAO_Notify_Constraint_Interpreter : public TAO_ETCL_Interpreter +class TAO_Notify_Serv_Export TAO_Notify_Constraint_Interpreter + : public ETCL_Interpreter { public: // = Initialization and termination methods. diff --git a/TAO/orbsvcs/orbsvcs/Notify/Notify_Constraint_Visitors.cpp b/TAO/orbsvcs/orbsvcs/Notify/Notify_Constraint_Visitors.cpp index a4c31c34f80..484984587ee 100644 --- a/TAO/orbsvcs/orbsvcs/Notify/Notify_Constraint_Visitors.cpp +++ b/TAO/orbsvcs/orbsvcs/Notify/Notify_Constraint_Visitors.cpp @@ -1,8 +1,10 @@ // $Id$ -#include "orbsvcs/Notify/Notify_Constraint_Visitors.h" -#include "orbsvcs/ETCL/ETCL_Constraint.h" -#include "orbsvcs/ETCL/ETCL_y.h" +#include "ace/ETCL/ETCL_y.h" + +#include "tao/CDR.h" + +#include "tao/ETCL/TAO_ETCL_Constraint.h" #include "tao/DynamicAny/DynArray_i.h" #include "tao/DynamicAny/DynSequence_i.h" @@ -13,7 +15,8 @@ #include "tao/DynamicAny/DynAnyUtils_T.h" #include "tao/AnyTypeCode/Any_Unknown_IDL_Type.h" -#include "tao/CDR.h" + +#include "orbsvcs/Notify/Notify_Constraint_Visitors.h" TAO_BEGIN_VERSIONED_NAMESPACE_DECL @@ -115,9 +118,7 @@ TAO_Notify_Constraint_Visitor::bind_structured_event (const CosNotification::Str } CORBA::Boolean -TAO_Notify_Constraint_Visitor::evaluate_constraint ( - TAO_ETCL_Constraint* root - ) +TAO_Notify_Constraint_Visitor::evaluate_constraint (ETCL_Constraint* root) { CORBA::Boolean result = 0; this->queue_.reset (); @@ -210,9 +211,9 @@ TAO_Notify_Constraint_Visitor::visit_union_pos ( switch (disc_val.expr_type ()) { - case TAO_ETCL_INTEGER: - case TAO_ETCL_SIGNED: - case TAO_ETCL_UNSIGNED: + case ETCL_INTEGER: + case ETCL_SIGNED: + case ETCL_UNSIGNED: { CORBA::Any disc_any; CORBA::TypeCode_var disc_tc = @@ -275,7 +276,7 @@ TAO_Notify_Constraint_Visitor::visit_union_pos ( break; } - case TAO_ETCL_STRING: + case ETCL_STRING: { const char *name = (const char *) disc_val; CORBA::ULong count = @@ -305,7 +306,7 @@ TAO_Notify_Constraint_Visitor::visit_union_pos ( return -1; } - TAO_ETCL_Constraint *nested = union_pos->component (); + ETCL_Constraint *nested = union_pos->component (); // If there's no nested component, then we just want the // union member value on the queue. Otherwise, we want @@ -386,7 +387,7 @@ TAO_Notify_Constraint_Visitor::visit_component_pos ( CORBA::Any_var value = member->to_any (); - TAO_ETCL_Constraint *comp = pos->component (); + ETCL_Constraint *comp = pos->component (); if (comp == 0) { @@ -434,7 +435,7 @@ TAO_Notify_Constraint_Visitor::visit_component_assoc ( return -1; } - TAO_ETCL_Constraint *comp = assoc->component (); + ETCL_Constraint *comp = assoc->component (); CORBA::Any *any_ptr = 0; if (comp == 0) @@ -516,7 +517,7 @@ TAO_Notify_Constraint_Visitor::visit_component_array (TAO_ETCL_Component_Array * CORBA::Any_var value = member->to_any (); - TAO_ETCL_Constraint *comp = array->component (); + ETCL_Constraint *comp = array->component (); if (comp == 0) { @@ -548,7 +549,7 @@ TAO_Notify_Constraint_Visitor::visit_special (TAO_ETCL_Special *special) switch (special->type ()) { - case TAO_ETCL_LENGTH: + case ETCL_LENGTH: { CORBA::ULong length; @@ -578,7 +579,7 @@ TAO_Notify_Constraint_Visitor::visit_special (TAO_ETCL_Special *special) this->queue_.enqueue_head (lit); return 0; } - case TAO_ETCL_DISCRIMINANT: + case ETCL_DISCRIMINANT: { // If the TCKind is not a union, the call to init() will // raise an exception, and the catch block will return -1; @@ -594,7 +595,7 @@ TAO_Notify_Constraint_Visitor::visit_special (TAO_ETCL_Special *special) this->queue_.enqueue_head (lit); return 0; } - case TAO_ETCL_TYPE_ID: + case ETCL_TYPE_ID: { const char *name = tc->name (); @@ -602,7 +603,7 @@ TAO_Notify_Constraint_Visitor::visit_special (TAO_ETCL_Special *special) this->queue_.enqueue_head (lit); return 0; } - case TAO_ETCL_REPOS_ID: + case ETCL_REPOS_ID: { const char *id = tc->id (); @@ -625,7 +626,7 @@ TAO_Notify_Constraint_Visitor::visit_component ( TAO_ETCL_Component *component ) { - TAO_ETCL_Constraint *nested = component->component (); + ETCL_Constraint *nested = component->component (); TAO_ETCL_Identifier *identifier = component->identifier (); ACE_CString component_name (identifier->value (), 0, @@ -732,7 +733,7 @@ TAO_Notify_Constraint_Visitor::visit_eval (TAO_ETCL_Eval *eval) int TAO_Notify_Constraint_Visitor::visit_default (TAO_ETCL_Default *def) { - TAO_ETCL_Constraint *comp = def->component (); + ETCL_Constraint *comp = def->component (); if (comp == 0) return -1; @@ -772,7 +773,7 @@ TAO_Notify_Constraint_Visitor::visit_default (TAO_ETCL_Default *def) int TAO_Notify_Constraint_Visitor::visit_exist (TAO_ETCL_Exist *exist) { - TAO_ETCL_Constraint *component = exist->component (); + ETCL_Constraint *component = exist->component (); if (component->accept (this) == 0) { @@ -839,7 +840,7 @@ TAO_Notify_Constraint_Visitor::visit_unary_expr ( TAO_ETCL_Unary_Expr *unary_expr ) { - TAO_ETCL_Constraint *subexpr = unary_expr->subexpr (); + ETCL_Constraint *subexpr = unary_expr->subexpr (); if (subexpr->accept (this) == 0) { @@ -849,19 +850,19 @@ TAO_Notify_Constraint_Visitor::visit_unary_expr ( switch (op_type) { - case TAO_ETCL_NOT: + case ETCL_NOT: this->queue_.dequeue_head (subexpr_result); result = ! (CORBA::Boolean) subexpr_result; this->queue_.enqueue_head (TAO_ETCL_Literal_Constraint (result)); return 0; - case TAO_ETCL_MINUS: + case ETCL_MINUS: // The leading '-' was parsed separately, so we have to pull // the literal constraint off the queue, apply the class' own // unary minus operator, and put it back. this->queue_.dequeue_head (subexpr_result); this->queue_.enqueue_head (-subexpr_result); return 0; - case TAO_ETCL_PLUS: + case ETCL_PLUS: // Leave the literal constraint on the queue. The leading // '+' was just syntactic sugar - no action is necessary. return 0; @@ -884,25 +885,25 @@ TAO_Notify_Constraint_Visitor::visit_binary_expr ( switch (bin_op_type) { - case TAO_ETCL_OR: + case ETCL_OR: return this->visit_or (binary_expr); - case TAO_ETCL_AND: + case ETCL_AND: return this->visit_and (binary_expr); - case TAO_ETCL_LT: - case TAO_ETCL_LE: - case TAO_ETCL_GT: - case TAO_ETCL_GE: - case TAO_ETCL_EQ: - case TAO_ETCL_NE: - case TAO_ETCL_PLUS: - case TAO_ETCL_MINUS: - case TAO_ETCL_MULT: - case TAO_ETCL_DIV: + case ETCL_LT: + case ETCL_LE: + case ETCL_GT: + case ETCL_GE: + case ETCL_EQ: + case ETCL_NE: + case ETCL_PLUS: + case ETCL_MINUS: + case ETCL_MULT: + case ETCL_DIV: return this->visit_binary_op (binary_expr, bin_op_type); - case TAO_ETCL_TWIDDLE: + case ETCL_TWIDDLE: return this->visit_twiddle (binary_expr); - case TAO_ETCL_IN: + case ETCL_IN: return this->visit_in (binary_expr); default: return -1; @@ -916,7 +917,7 @@ TAO_Notify_Constraint_Visitor::visit_or ( { int return_value = -1; CORBA::Boolean result = 0; - TAO_ETCL_Constraint *lhs = binary->lhs (); + ETCL_Constraint *lhs = binary->lhs (); if (lhs->accept (this) == 0) { @@ -927,7 +928,7 @@ TAO_Notify_Constraint_Visitor::visit_or ( // Short-circuiting OR. if (result == 0) { - TAO_ETCL_Constraint *rhs = binary->rhs (); + ETCL_Constraint *rhs = binary->rhs (); if (rhs->accept (this) == 0) { @@ -952,7 +953,7 @@ TAO_Notify_Constraint_Visitor::visit_and (TAO_ETCL_Binary_Expr *binary) { int return_value = -1; CORBA::Boolean result = 0; - TAO_ETCL_Constraint *lhs = binary->lhs (); + ETCL_Constraint *lhs = binary->lhs (); if (lhs->accept (this) == 0) { @@ -963,7 +964,7 @@ TAO_Notify_Constraint_Visitor::visit_and (TAO_ETCL_Binary_Expr *binary) // Short-circuiting AND. if (result == 1) { - TAO_ETCL_Constraint *rhs = binary->rhs (); + ETCL_Constraint *rhs = binary->rhs (); if (rhs->accept (this) == 0) { @@ -988,7 +989,7 @@ TAO_Notify_Constraint_Visitor::visit_binary_op (TAO_ETCL_Binary_Expr *binary, int op_type) { int return_value = -1; - TAO_ETCL_Constraint *lhs = binary->lhs (); + ETCL_Constraint *lhs = binary->lhs (); CORBA::Boolean result = 0; // Perform an operation on the results of evaluating the left and @@ -997,7 +998,7 @@ TAO_Notify_Constraint_Visitor::visit_binary_op (TAO_ETCL_Binary_Expr *binary, { TAO_ETCL_Literal_Constraint left_operand; this->queue_.dequeue_head (left_operand); - TAO_ETCL_Constraint *rhs = binary->rhs (); + ETCL_Constraint *rhs = binary->rhs (); if (rhs->accept (this) == 0) { @@ -1007,40 +1008,40 @@ TAO_Notify_Constraint_Visitor::visit_binary_op (TAO_ETCL_Binary_Expr *binary, switch (op_type) { - case TAO_ETCL_LT: + case ETCL_LT: result = left_operand < right_operand; this->queue_.enqueue_head (TAO_ETCL_Literal_Constraint (result)); break; - case TAO_ETCL_LE: + case ETCL_LE: result = left_operand <= right_operand; this->queue_.enqueue_head (TAO_ETCL_Literal_Constraint (result)); break; - case TAO_ETCL_GT: + case ETCL_GT: result = left_operand > right_operand; this->queue_.enqueue_head (TAO_ETCL_Literal_Constraint (result)); break; - case TAO_ETCL_GE: + case ETCL_GE: result = left_operand >= right_operand; this->queue_.enqueue_head (TAO_ETCL_Literal_Constraint (result)); break; - case TAO_ETCL_EQ: + case ETCL_EQ: result = left_operand == right_operand; this->queue_.enqueue_head (TAO_ETCL_Literal_Constraint (result)); break; - case TAO_ETCL_NE: + case ETCL_NE: result = left_operand != right_operand; this->queue_.enqueue_head (TAO_ETCL_Literal_Constraint (result)); break; - case TAO_ETCL_PLUS: + case ETCL_PLUS: this->queue_.enqueue_head (left_operand + right_operand); break; - case TAO_ETCL_MINUS: + case ETCL_MINUS: this->queue_.enqueue_head (left_operand - right_operand); break; - case TAO_ETCL_MULT: + case ETCL_MULT: this->queue_.enqueue_head (left_operand * right_operand); break; - case TAO_ETCL_DIV: + case ETCL_DIV: this->queue_.enqueue_head (left_operand / right_operand); break; default: @@ -1056,14 +1057,14 @@ int TAO_Notify_Constraint_Visitor::visit_twiddle (TAO_ETCL_Binary_Expr *binary) { int return_value = -1; - TAO_ETCL_Constraint *lhs = binary->lhs (); + ETCL_Constraint *lhs = binary->lhs (); // Determine if the left operand is a substring of the right. if (lhs->accept (this) == 0) { TAO_ETCL_Literal_Constraint left; this->queue_.dequeue_head (left); - TAO_ETCL_Constraint *rhs = binary->rhs (); + ETCL_Constraint *rhs = binary->rhs (); if (rhs->accept (this) == 0) { @@ -1084,7 +1085,7 @@ int TAO_Notify_Constraint_Visitor::visit_in (TAO_ETCL_Binary_Expr *binary) { int return_value = -1; - TAO_ETCL_Constraint *lhs = binary->lhs (); + ETCL_Constraint *lhs = binary->lhs (); // Determine if the left operand is contained in the right. if (lhs->accept (this) == 0) @@ -1092,14 +1093,14 @@ TAO_Notify_Constraint_Visitor::visit_in (TAO_ETCL_Binary_Expr *binary) TAO_ETCL_Literal_Constraint left; this->queue_.dequeue_head (left); - TAO_ETCL_Constraint *rhs = binary->rhs (); + ETCL_Constraint *rhs = binary->rhs (); if (rhs->accept (this) == 0) { TAO_ETCL_Literal_Constraint bag; this->queue_.dequeue_head (bag); - if (bag.expr_type () == TAO_ETCL_COMPONENT) + if (bag.expr_type () == ETCL_COMPONENT) { CORBA::Any_var component = new CORBA::Any (); component->replace (bag); @@ -1348,29 +1349,29 @@ TAO_Notify_Constraint_Visitor::simple_type_match (int expr_type, { switch (expr_type) { - case TAO_ETCL_STRING: + case ETCL_STRING: if (tc_kind != CORBA::tk_string) return 0; break; - case TAO_ETCL_DOUBLE: + case ETCL_DOUBLE: if (tc_kind != CORBA::tk_double && tc_kind != CORBA::tk_float) return 0; break; - case TAO_ETCL_INTEGER: - case TAO_ETCL_SIGNED: + case ETCL_INTEGER: + case ETCL_SIGNED: if (tc_kind != CORBA::tk_short && tc_kind != CORBA::tk_long && tc_kind != CORBA::tk_longlong) return 0; break; - case TAO_ETCL_UNSIGNED: + case ETCL_UNSIGNED: if (tc_kind != CORBA::tk_ushort && tc_kind != CORBA::tk_ulong && tc_kind != CORBA::tk_ulonglong) return 0; break; - case TAO_ETCL_BOOLEAN: + case ETCL_BOOLEAN: if (tc_kind != CORBA::tk_boolean) return 0; break; diff --git a/TAO/orbsvcs/orbsvcs/Notify/Notify_Constraint_Visitors.h b/TAO/orbsvcs/orbsvcs/Notify/Notify_Constraint_Visitors.h index c181313bde5..5d2b2139693 100644 --- a/TAO/orbsvcs/orbsvcs/Notify/Notify_Constraint_Visitors.h +++ b/TAO/orbsvcs/orbsvcs/Notify/Notify_Constraint_Visitors.h @@ -11,11 +11,11 @@ */ //============================================================================= - #ifndef NOTIFY_CONSTRAINT_VISITORS_H #define NOTIFY_CONSTRAINT_VISITORS_H #include /**/ "ace/pre.h" + #include "ace/Hash_Map_Manager.h" #include "ace/Unbounded_Queue.h" #include "ace/Null_Mutex.h" @@ -24,8 +24,10 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ -#include "orbsvcs/ETCL/ETCL_Constraint_Visitor.h" -#include "orbsvcs/ETCL/ETCL_Constraint.h" +#include "ace/ETCL/ETCL_Constraint_Visitor.h" + +#include "tao/ETCL/TAO_ETCL_Constraint.h" + #include "orbsvcs/CosNotificationC.h" #include "orbsvcs/Notify/notify_serv_export.h" @@ -35,7 +37,7 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL class TAO_Notify_Property_Constraint; class TAO_Notify_Serv_Export TAO_Notify_Constraint_Visitor - : public TAO_ETCL_Constraint_Visitor + : public ETCL_Constraint_Visitor { public: /// Constructor. @@ -50,7 +52,7 @@ public: * doesn't. If an error occurs during the process, the traversal * automatically fails. */ - CORBA::Boolean evaluate_constraint (TAO_ETCL_Constraint *root); + CORBA::Boolean evaluate_constraint (ETCL_Constraint *root); // The overridden methods. int visit_literal (TAO_ETCL_Literal_Constraint *); diff --git a/TAO/tao/ETCL/TAO_ETCL.mpc b/TAO/tao/ETCL/TAO_ETCL.mpc index f8f8df03aca..8f6769ea9b7 100644 --- a/TAO/tao/ETCL/TAO_ETCL.mpc +++ b/TAO/tao/ETCL/TAO_ETCL.mpc @@ -4,7 +4,6 @@ project(TAO_ETCL) : dynamicany, ace_etcl, install, tao_output { sharedname = TAO_ETCL dynamicflags = TAO_ETCL_BUILD_DLL - includes += $(ACE_ROOT)/ETCL IDL_Files { } @@ -36,14 +35,14 @@ project(TAO_ETCL_Parser) : taolib, tao_etcl, install, tao_output { includes += $(TAO_ROOT)/tao/ETCL/ETCL_include Source_Files { - $(ACE_ROOT)/ETCL/ETCL_Interpreter.cpp - $(ACE_ROOT)/ETCL/ETCL_l.cpp - $(ACE_ROOT)/ETCL/ETCL_y.cpp + $(ACE_ROOT)/ace/ETCL/ETCL_Interpreter.cpp + $(ACE_ROOT)/ace/ETCL/ETCL_l.cpp + $(ACE_ROOT)/ace/ETCL/ETCL_y.cpp } Header_Files { - $(ACE_ROOT)/ETCL/ETCL_Interpreter.h - $(ACE_ROOT)/ETCL/ETCL_y.h + $(ACE_ROOT)/ace/ETCL/ETCL_Interpreter.h + $(ACE_ROOT)/ace/ETCL/ETCL_y.h $(TAO_ROOT)/tao/ETCL/ETCL_include/ETCL_macros.h $(TAO_ROOT)/tao/ETCL/ETCL_include/ETCL_include.h $(TAO_ROOT)/tao/ETCL/ETCL_include/etcl_parser_export.h diff --git a/TAO/tao/ETCL/TAO_ETCL_Constraint.cpp b/TAO/tao/ETCL/TAO_ETCL_Constraint.cpp index ba4a2ea4023..0f3a0b8bc15 100644 --- a/TAO/tao/ETCL/TAO_ETCL_Constraint.cpp +++ b/TAO/tao/ETCL/TAO_ETCL_Constraint.cpp @@ -1,7 +1,7 @@ // -*- C++ -*- // $Id$ -#include "ETCL_Constraint_Visitor.h" +#include "ace/ETCL/ETCL_Constraint_Visitor.h" #include "tao/AnyTypeCode/AnyTypeCode_methods.h" #include "tao/AnyTypeCode/Any_Unknown_IDL_Type.h" diff --git a/TAO/tao/ETCL/TAO_ETCL_Constraint.h b/TAO/tao/ETCL/TAO_ETCL_Constraint.h index 9e046365913..43ad49effb4 100644 --- a/TAO/tao/ETCL/TAO_ETCL_Constraint.h +++ b/TAO/tao/ETCL/TAO_ETCL_Constraint.h @@ -14,13 +14,13 @@ #ifndef TAO_ETCL_CONSTRAINT_H #define TAO_ETCL_CONSTRAINT_H -#include "tao/AnyTypeCode/Any_Impl.h" +#include "ace/ETCL/ETCL_Constraint.h" #if !defined (ACE_LACKS_PRAGMA_ONCE) # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ -#include "ETCL_Constraint.h" +#include "tao/AnyTypeCode/Any_Impl.h" #include "tao_etcl_export.h" |