summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoroci <oci@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2001-08-20 13:42:04 +0000
committeroci <oci@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2001-08-20 13:42:04 +0000
commitc0f2a9f22b5683a8e3a4d666c8435583f9af0b01 (patch)
treeb94715ca40d002c25a8e6797a291894606f66f73
parent123be6228568ea46b93e79af7ea3126525d631d8 (diff)
downloadATCD-c0f2a9f22b5683a8e3a4d666c8435583f9af0b01.tar.gz
ChangeLogTag: Mon Aug 20 08:37:00 2001 Chad Elliott <elliott_c@ociweb.com>
-rw-r--r--TAO/ChangeLogs/ChangeLog-02a8
-rw-r--r--TAO/orbsvcs/orbsvcs/Trader/Constraint_l.cpp192
-rw-r--r--TAO/orbsvcs/orbsvcs/Trader/constraint.l7
3 files changed, 109 insertions, 98 deletions
diff --git a/TAO/ChangeLogs/ChangeLog-02a b/TAO/ChangeLogs/ChangeLog-02a
index 15368f94029..8fa951d736d 100644
--- a/TAO/ChangeLogs/ChangeLog-02a
+++ b/TAO/ChangeLogs/ChangeLog-02a
@@ -1,3 +1,11 @@
+Mon Aug 20 08:37:00 2001 Chad Elliott <elliott_c@ociweb.com>
+
+ * orbsvcs/orbsvcs/Trader/constraint.l:
+ * orbsvcs/orbsvcs/Trader/Constraint_l.cpp:
+
+ Explicitly allow a leading sign on integers as specified by
+ section B.2.5 of the OMG Trading Service specification.
+
Sun Aug 19 13:41:07 2001 Ossama Othman <ossama@uci.edu>
* tests/DLL_ORB/Test_i.cpp (shutdown):
diff --git a/TAO/orbsvcs/orbsvcs/Trader/Constraint_l.cpp b/TAO/orbsvcs/orbsvcs/Trader/Constraint_l.cpp
index 7572d7eca87..8d5e7c18a68 100644
--- a/TAO/orbsvcs/orbsvcs/Trader/Constraint_l.cpp
+++ b/TAO/orbsvcs/orbsvcs/Trader/Constraint_l.cpp
@@ -271,16 +271,17 @@ static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
#define YY_NUM_RULES 31
#define YY_END_OF_BUFFER 32
-static yyconst short int yy_accept[81] =
+static yyconst short int yy_accept[82] =
{ 0,
0, 0, 32, 30, 31, 30, 30, 22, 23, 14,
12, 13, 30, 15, 26, 16, 30, 18, 29, 29,
29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
- 11, 21, 0, 28, 0, 27, 0, 26, 17, 20,
- 19, 29, 29, 29, 29, 29, 29, 10, 29, 29,
- 29, 9, 29, 29, 0, 0, 29, 29, 8, 29,
- 29, 2, 1, 7, 29, 29, 0, 27, 29, 24,
- 29, 29, 29, 5, 25, 6, 3, 29, 4, 0
+ 11, 21, 0, 28, 0, 26, 27, 0, 26, 17,
+ 20, 19, 29, 29, 29, 29, 29, 29, 10, 29,
+ 29, 29, 9, 29, 29, 0, 0, 29, 29, 8,
+ 29, 29, 2, 1, 7, 29, 29, 0, 27, 29,
+ 24, 29, 29, 29, 5, 25, 6, 3, 29, 4,
+ 0
} ;
static yyconst int yy_ec[256] =
@@ -324,70 +325,70 @@ static yyconst int yy_meta[42] =
1
} ;
-static yyconst short int yy_base[83] =
+static yyconst short int yy_base[84] =
{ 0,
- 0, 0, 104, 105, 105, 89, 38, 105, 105, 105,
- 105, 105, 90, 105, 33, 87, 86, 85, 0, 82,
- 76, 62, 55, 62, 59, 17, 57, 55, 63, 57,
- 105, 105, 42, 105, 43, 36, 76, 40, 105, 105,
- 105, 0, 67, 62, 57, 52, 47, 0, 42, 47,
- 42, 0, 45, 40, 47, 47, 55, 58, 0, 38,
- 34, 0, 0, 0, 42, 38, 54, 52, 44, 0,
- 23, 22, 23, 0, 0, 0, 0, 24, 0, 105,
- 72, 51
+ 0, 0, 107, 108, 108, 92, 38, 108, 108, 108,
+ 93, 92, 91, 108, 33, 88, 87, 86, 0, 83,
+ 77, 63, 56, 63, 60, 17, 58, 56, 64, 58,
+ 108, 108, 42, 108, 43, 77, 36, 76, 40, 108,
+ 108, 108, 0, 67, 62, 57, 52, 47, 0, 42,
+ 47, 42, 0, 45, 40, 47, 47, 55, 58, 0,
+ 38, 34, 0, 0, 0, 42, 38, 54, 52, 44,
+ 0, 23, 22, 23, 0, 0, 0, 0, 24, 0,
+ 108, 72, 51
} ;
-static yyconst short int yy_def[83] =
+static yyconst short int yy_def[84] =
{ 0,
- 80, 1, 80, 80, 80, 80, 81, 80, 80, 80,
- 80, 80, 80, 80, 80, 80, 80, 80, 82, 82,
- 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
- 80, 80, 81, 80, 80, 80, 80, 80, 80, 80,
- 80, 82, 82, 82, 82, 82, 82, 82, 82, 82,
- 82, 82, 82, 82, 81, 80, 82, 82, 82, 82,
- 82, 82, 82, 82, 82, 82, 80, 80, 82, 82,
- 82, 82, 82, 82, 82, 82, 82, 82, 82, 0,
- 80, 80
+ 81, 1, 81, 81, 81, 81, 82, 81, 81, 81,
+ 81, 81, 81, 81, 81, 81, 81, 81, 83, 83,
+ 83, 83, 83, 83, 83, 83, 83, 83, 83, 83,
+ 81, 81, 82, 81, 81, 81, 81, 81, 81, 81,
+ 81, 81, 83, 83, 83, 83, 83, 83, 83, 83,
+ 83, 83, 83, 83, 83, 82, 81, 83, 83, 83,
+ 83, 83, 83, 83, 83, 83, 83, 81, 81, 83,
+ 83, 83, 83, 83, 83, 83, 83, 83, 83, 83,
+ 0, 81, 81
} ;
-static yyconst short int yy_nxt[147] =
+static yyconst short int yy_nxt[150] =
{ 0,
4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
14, 15, 16, 17, 18, 19, 19, 19, 20, 19,
19, 19, 21, 19, 4, 4, 22, 19, 23, 24,
19, 25, 26, 27, 28, 29, 19, 19, 30, 19,
- 31, 34, 37, 49, 38, 34, 55, 36, 50, 37,
- 34, 38, 42, 56, 67, 67, 79, 78, 68, 77,
- 76, 75, 35, 68, 56, 68, 35, 55, 74, 73,
- 72, 35, 33, 33, 71, 70, 69, 66, 65, 64,
- 63, 62, 61, 60, 59, 58, 57, 36, 54, 53,
- 52, 51, 48, 47, 46, 45, 44, 43, 41, 40,
-
- 39, 36, 32, 80, 3, 80, 80, 80, 80, 80,
- 80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
- 80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
- 80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
- 80, 80, 80, 80, 80, 80
+ 31, 34, 38, 50, 39, 34, 56, 37, 51, 38,
+ 34, 39, 43, 57, 68, 68, 80, 79, 69, 78,
+ 77, 76, 35, 69, 57, 69, 35, 56, 75, 74,
+ 73, 35, 33, 33, 72, 71, 70, 67, 66, 65,
+ 64, 63, 62, 61, 60, 59, 58, 37, 36, 55,
+ 54, 53, 52, 49, 48, 47, 46, 45, 44, 42,
+
+ 41, 40, 37, 36, 36, 32, 81, 3, 81, 81,
+ 81, 81, 81, 81, 81, 81, 81, 81, 81, 81,
+ 81, 81, 81, 81, 81, 81, 81, 81, 81, 81,
+ 81, 81, 81, 81, 81, 81, 81, 81, 81, 81,
+ 81, 81, 81, 81, 81, 81, 81, 81, 81
} ;
-static yyconst short int yy_chk[147] =
+static yyconst short int yy_chk[150] =
{ 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, 7, 15, 26, 15, 33, 35, 36, 26, 38,
- 55, 38, 82, 36, 56, 56, 78, 73, 56, 72,
- 71, 69, 7, 68, 36, 67, 33, 35, 66, 65,
- 61, 55, 81, 81, 60, 58, 57, 54, 53, 51,
- 50, 49, 47, 46, 45, 44, 43, 37, 30, 29,
- 28, 27, 25, 24, 23, 22, 21, 20, 18, 17,
-
- 16, 13, 6, 3, 80, 80, 80, 80, 80, 80,
- 80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
- 80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
- 80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
- 80, 80, 80, 80, 80, 80
+ 1, 7, 15, 26, 15, 33, 35, 37, 26, 39,
+ 56, 39, 83, 37, 57, 57, 79, 74, 57, 73,
+ 72, 70, 7, 69, 37, 68, 33, 35, 67, 66,
+ 62, 56, 82, 82, 61, 59, 58, 55, 54, 52,
+ 51, 50, 48, 47, 46, 45, 44, 38, 36, 30,
+ 29, 28, 27, 25, 24, 23, 22, 21, 20, 18,
+
+ 17, 16, 13, 12, 11, 6, 3, 81, 81, 81,
+ 81, 81, 81, 81, 81, 81, 81, 81, 81, 81,
+ 81, 81, 81, 81, 81, 81, 81, 81, 81, 81,
+ 81, 81, 81, 81, 81, 81, 81, 81, 81, 81,
+ 81, 81, 81, 81, 81, 81, 81, 81, 81
} ;
static yy_state_type yy_last_accepting_state;
@@ -431,7 +432,7 @@ static TAO_Literal_Constraint* extract_string(const char*);
#endif /* TAO_CONSTRAINT_DEBUG */
-#line 448 "lex.yy.c"
+#line 451 "lex.yy.c"
/* Macros after this point can all be overridden by user definitions in
* section 1.
@@ -581,13 +582,13 @@ YY_MALLOC_DECL
YY_DECL
{
register yy_state_type yy_current_state;
- register char *yy_cp, *yy_bp;
+ register char *yy_cp = 0, *yy_bp = 0;
register int yy_act;
-#line 42 "Trader/constraint.l"
+#line 43 "Trader/constraint.l"
-#line 602 "lex.yy.c"
+#line 605 "lex.yy.c"
if ( yy_init )
{
@@ -638,13 +639,13 @@ yy_match:
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 >= 81 )
+ if ( yy_current_state >= 82 )
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] != 105 );
+ while ( yy_base[yy_current_state] != 108 );
yy_find_action:
yy_act = yy_accept[yy_current_state];
@@ -672,122 +673,122 @@ do_action: /* This label is used only to access EOF actions. */
case 1:
YY_RULE_SETUP
-#line 44 "Trader/constraint.l"
+#line 45 "Trader/constraint.l"
{ TAO_YY_LEX_DEBUG; return TAO_MIN; }
ACE_NOTREACHED (YY_BREAK)
case 2:
YY_RULE_SETUP
-#line 45 "Trader/constraint.l"
+#line 46 "Trader/constraint.l"
{ TAO_YY_LEX_DEBUG; return TAO_MAX; }
ACE_NOTREACHED (YY_BREAK)
case 3:
YY_RULE_SETUP
-#line 46 "Trader/constraint.l"
+#line 47 "Trader/constraint.l"
{ TAO_YY_LEX_DEBUG; return TAO_FIRST; }
ACE_NOTREACHED (YY_BREAK)
case 4:
YY_RULE_SETUP
-#line 47 "Trader/constraint.l"
+#line 48 "Trader/constraint.l"
{ TAO_YY_LEX_DEBUG; return TAO_RANDOM; }
ACE_NOTREACHED (YY_BREAK)
case 5:
YY_RULE_SETUP
-#line 48 "Trader/constraint.l"
+#line 49 "Trader/constraint.l"
{ TAO_YY_LEX_DEBUG; return TAO_WITH; }
ACE_NOTREACHED (YY_BREAK)
case 6:
YY_RULE_SETUP
-#line 49 "Trader/constraint.l"
+#line 50 "Trader/constraint.l"
{ TAO_YY_LEX_DEBUG; return TAO_EXIST; }
ACE_NOTREACHED (YY_BREAK)
case 7:
YY_RULE_SETUP
-#line 50 "Trader/constraint.l"
+#line 51 "Trader/constraint.l"
{ TAO_YY_LEX_DEBUG; return TAO_NOT; }
ACE_NOTREACHED (YY_BREAK)
case 8:
YY_RULE_SETUP
-#line 51 "Trader/constraint.l"
+#line 52 "Trader/constraint.l"
{ TAO_YY_LEX_DEBUG; return TAO_AND; }
ACE_NOTREACHED (YY_BREAK)
case 9:
YY_RULE_SETUP
-#line 52 "Trader/constraint.l"
+#line 53 "Trader/constraint.l"
{ TAO_YY_LEX_DEBUG; return TAO_OR; }
ACE_NOTREACHED (YY_BREAK)
case 10:
YY_RULE_SETUP
-#line 53 "Trader/constraint.l"
+#line 54 "Trader/constraint.l"
{ TAO_YY_LEX_DEBUG; return TAO_IN; }
ACE_NOTREACHED (YY_BREAK)
case 11:
YY_RULE_SETUP
-#line 54 "Trader/constraint.l"
+#line 55 "Trader/constraint.l"
{ TAO_YY_LEX_DEBUG; return TAO_TWIDDLE; }
ACE_NOTREACHED (YY_BREAK)
case 12:
YY_RULE_SETUP
-#line 55 "Trader/constraint.l"
+#line 56 "Trader/constraint.l"
{ TAO_YY_LEX_DEBUG; return TAO_PLUS; }
ACE_NOTREACHED (YY_BREAK)
case 13:
YY_RULE_SETUP
-#line 56 "Trader/constraint.l"
+#line 57 "Trader/constraint.l"
{ TAO_YY_LEX_DEBUG; return TAO_MINUS; }
ACE_NOTREACHED (YY_BREAK)
case 14:
YY_RULE_SETUP
-#line 57 "Trader/constraint.l"
+#line 58 "Trader/constraint.l"
{ TAO_YY_LEX_DEBUG; return TAO_MULT; }
ACE_NOTREACHED (YY_BREAK)
case 15:
YY_RULE_SETUP
-#line 58 "Trader/constraint.l"
+#line 59 "Trader/constraint.l"
{ TAO_YY_LEX_DEBUG; return TAO_DIV; }
ACE_NOTREACHED (YY_BREAK)
case 16:
YY_RULE_SETUP
-#line 59 "Trader/constraint.l"
+#line 60 "Trader/constraint.l"
{ TAO_YY_LEX_DEBUG; return TAO_LT; }
ACE_NOTREACHED (YY_BREAK)
case 17:
YY_RULE_SETUP
-#line 60 "Trader/constraint.l"
+#line 61 "Trader/constraint.l"
{ TAO_YY_LEX_DEBUG; return TAO_LE; }
ACE_NOTREACHED (YY_BREAK)
case 18:
YY_RULE_SETUP
-#line 61 "Trader/constraint.l"
+#line 62 "Trader/constraint.l"
{ TAO_YY_LEX_DEBUG; return TAO_GT; }
ACE_NOTREACHED (YY_BREAK)
case 19:
YY_RULE_SETUP
-#line 62 "Trader/constraint.l"
+#line 63 "Trader/constraint.l"
{ TAO_YY_LEX_DEBUG; return TAO_GE; }
ACE_NOTREACHED (YY_BREAK)
case 20:
YY_RULE_SETUP
-#line 63 "Trader/constraint.l"
+#line 64 "Trader/constraint.l"
{ TAO_YY_LEX_DEBUG; return TAO_EQ; }
ACE_NOTREACHED (YY_BREAK)
case 21:
YY_RULE_SETUP
-#line 64 "Trader/constraint.l"
+#line 65 "Trader/constraint.l"
{ TAO_YY_LEX_DEBUG; return TAO_NE; }
ACE_NOTREACHED (YY_BREAK)
case 22:
YY_RULE_SETUP
-#line 65 "Trader/constraint.l"
+#line 66 "Trader/constraint.l"
{ TAO_YY_LEX_DEBUG; return TAO_LPAREN; }
ACE_NOTREACHED (YY_BREAK)
case 23:
YY_RULE_SETUP
-#line 66 "Trader/constraint.l"
+#line 67 "Trader/constraint.l"
{ TAO_YY_LEX_DEBUG; return TAO_RPAREN; }
ACE_NOTREACHED (YY_BREAK)
case 24:
YY_RULE_SETUP
-#line 67 "Trader/constraint.l"
+#line 68 "Trader/constraint.l"
{
yylval.constraint_ =
new TAO_Literal_Constraint((CORBA::Boolean) 1);
@@ -796,7 +797,7 @@ YY_RULE_SETUP
ACE_NOTREACHED (YY_BREAK)
case 25:
YY_RULE_SETUP
-#line 72 "Trader/constraint.l"
+#line 73 "Trader/constraint.l"
{
yylval.constraint_ =
new TAO_Literal_Constraint((CORBA::Boolean) 0);
@@ -805,16 +806,17 @@ YY_RULE_SETUP
ACE_NOTREACHED (YY_BREAK)
case 26:
YY_RULE_SETUP
-#line 77 "Trader/constraint.l"
+#line 78 "Trader/constraint.l"
{
yylval.constraint_ =
- new TAO_Literal_Constraint((CORBA::Long)atoi(yytext));
+ new TAO_Literal_Constraint((yytext[0] == '-' ?
+ (CORBA::Long)atoi(yytext) : (CORBA::ULong)atoi(yytext)));
TAO_YY_LEX_DEBUG; return TAO_NUMBER;
}
ACE_NOTREACHED (YY_BREAK)
case 27:
YY_RULE_SETUP
-#line 82 "Trader/constraint.l"
+#line 84 "Trader/constraint.l"
{
yylval.constraint_ =
new TAO_Literal_Constraint((CORBA::Double)atof(yytext));
@@ -823,7 +825,7 @@ YY_RULE_SETUP
ACE_NOTREACHED (YY_BREAK)
case 28:
YY_RULE_SETUP
-#line 87 "Trader/constraint.l"
+#line 89 "Trader/constraint.l"
{
yylval.constraint_ = extract_string(yytext);
TAO_YY_LEX_DEBUG; return TAO_STRING;
@@ -831,7 +833,7 @@ YY_RULE_SETUP
ACE_NOTREACHED (YY_BREAK)
case 29:
YY_RULE_SETUP
-#line 91 "Trader/constraint.l"
+#line 93 "Trader/constraint.l"
{
yylval.constraint_ =
new TAO_Property_Constraint(yytext);
@@ -840,17 +842,17 @@ YY_RULE_SETUP
ACE_NOTREACHED (YY_BREAK)
case 30:
YY_RULE_SETUP
-#line 96 "Trader/constraint.l"
+#line 98 "Trader/constraint.l"
{
TAO_YY_LEX_DEBUG; return TAO_UNKNOWN;
}
ACE_NOTREACHED (YY_BREAK)
case 31:
YY_RULE_SETUP
-#line 99 "Trader/constraint.l"
+#line 101 "Trader/constraint.l"
TAO_TRADER_ECHO;
YY_BREAK
-#line 865 "lex.yy.c"
+#line 869 "lex.yy.c"
case YY_STATE_EOF(INITIAL):
yyterminate();
@@ -1142,7 +1144,7 @@ static yy_state_type yy_get_previous_state()
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 >= 81 )
+ if ( yy_current_state >= 82 )
yy_c = yy_meta[(unsigned int) yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
@@ -1177,11 +1179,11 @@ yy_state_type yy_current_state;
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 >= 81 )
+ if ( yy_current_state >= 82 )
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 == 80);
+ yy_is_jam = (yy_current_state == 81);
return yy_is_jam ? 0 : yy_current_state;
}
@@ -1724,7 +1726,7 @@ int main()
return 0;
}
#endif
-#line 99 "Trader/constraint.l"
+#line 101 "Trader/constraint.l"
TAO_Literal_Constraint*
diff --git a/TAO/orbsvcs/orbsvcs/Trader/constraint.l b/TAO/orbsvcs/orbsvcs/Trader/constraint.l
index c4476bacce1..955d62f9cfc 100644
--- a/TAO/orbsvcs/orbsvcs/Trader/constraint.l
+++ b/TAO/orbsvcs/orbsvcs/Trader/constraint.l
@@ -23,7 +23,7 @@ static TAO_Literal_Constraint* extract_string(const char*);
#define TAO_YY_LEX_DEBUG
#ifdef TAO_CONSTRAINT_DEBUG
-#define TAO_YY_LEX_DEBUG TAO_OS::fprintf(stderr, "%s\n", yytext)
+#define TAO_YY_LEX_DEBUG ACE_OS::fprintf(stderr, "%s\n", yytext)
#endif /* TAO_CONSTRAINT_DEBUG */
@@ -33,7 +33,7 @@ white_space [ \t]
letter [a-zA-Z]
digit [0-9]
alpha_num ({letter}|{digit})
-integer {digit}+
+integer [-+]?{digit}+
float ({digit}*\.{digit}+)([eE][-+]?{digit}+)?
string '(([^'\\]*)|([^'\\]*\\')|([^'\\]*\\\\))*'
ident {letter}({alpha_num}|[_])*
@@ -77,7 +77,8 @@ FALSE {
}
{integer} {
yylval.constraint_ =
- new TAO_Literal_Constraint((CORBA::Long)atoi(yytext));
+ new TAO_Literal_Constraint((yytext[0] == '-' ?
+ (CORBA::Long)atoi(yytext) : (CORBA::ULong)atoi(yytext)));
TAO_YY_LEX_DEBUG; return TAO_NUMBER;
}
{float} {