summaryrefslogtreecommitdiff
path: root/TAO/TAO_IDL/fe/idl.yy
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/TAO_IDL/fe/idl.yy')
-rw-r--r--TAO/TAO_IDL/fe/idl.yy74
1 files changed, 27 insertions, 47 deletions
diff --git a/TAO/TAO_IDL/fe/idl.yy b/TAO/TAO_IDL/fe/idl.yy
index 46eb5e1ac98..826830b48fb 100644
--- a/TAO/TAO_IDL/fe/idl.yy
+++ b/TAO/TAO_IDL/fe/idl.yy
@@ -533,7 +533,7 @@ interface :
(void) s->fe_add_interface (i);
// This FE_InterfaceHeader class isn't destroyed with the AST.
- $1->destroy ();
+ $1->name ()->destroy ();
delete $1;
$1 = 0;
}
@@ -598,12 +598,10 @@ interface_header :
* list of all interfaces which this interface inherits from,
* recursively
*/
- UTL_ScopedName *n = 0;
- ACE_NEW_RETURN (n,
- UTL_ScopedName ($1, 0),
- 1);
+ UTL_ScopedName n ($1,
+ 0);
ACE_NEW_RETURN ($$,
- FE_InterfaceHeader (n,
+ FE_InterfaceHeader (&n,
$2,
I_FALSE,
I_FALSE,
@@ -622,12 +620,10 @@ interface_header :
* list of all interfaces which this interface inherits from,
* recursively
*/
- UTL_ScopedName *n = 0;
- ACE_NEW_RETURN (n,
- UTL_ScopedName ($2, 0),
- 1);
+ UTL_ScopedName n ($2,
+ 0);
ACE_NEW_RETURN ($$,
- FE_InterfaceHeader (n,
+ FE_InterfaceHeader (&n,
$3,
I_TRUE,
I_FALSE,
@@ -646,12 +642,10 @@ interface_header :
* list of all interfaces which this interface inherits from,
* recursively
*/
- UTL_ScopedName *n = 0;
- ACE_NEW_RETURN (n,
- UTL_ScopedName ($2, 0),
- 1);
+ UTL_ScopedName n ($2,
+ 0);
ACE_NEW_RETURN ($$,
- FE_InterfaceHeader (n,
+ FE_InterfaceHeader (&n,
$3,
I_FALSE,
I_TRUE,
@@ -734,11 +728,6 @@ value_concrete_decl :
*/
v = AST_ValueType::narrow_from_decl (i);
(void) s->fe_add_valuetype (v);
-
- // FE_OBVHeader is not automatically destroyed in the AST
- $1->destroy ();
- delete $1;
- $1 = 0;
}
/*
@@ -866,7 +855,8 @@ value_header :
UTL_ScopedName *sn = 0;
ACE_NEW_RETURN (sn,
- UTL_ScopedName ($1, 0),
+ UTL_ScopedName ($1,
+ 0),
1);
ACE_NEW_RETURN ($$,
FE_OBVHeader (sn,
@@ -936,7 +926,7 @@ value_forward_decl :
if (s != 0)
{
f = idl_global->gen ()->create_valuetype_fwd (&n,
- I_TRUE);
+ I_TRUE);
(void) s->fe_add_valuetype_fwd (f);
}
}
@@ -968,7 +958,7 @@ value_box_decl
{
// value_box_decl : value_decl type_spec
idl_global->set_parse_state (IDL_GlobalData::PS_ValueBoxDeclSeen);
-
+
UTL_Scope *s = idl_global->scopes ().top_non_null ();
UTL_ScopedName n ($1,
0);
@@ -977,7 +967,7 @@ value_box_decl
{
/*
* Get the type_spec associated with the valuebox
- */
+ */
AST_Type *tp = 0;
AST_Typedef *td
= AST_Typedef::narrow_from_decl ($2);
@@ -1740,12 +1730,14 @@ literal
| IDL_TRUETOK
{
// | IDL_TRUETOK
- $$ = idl_global->gen ()->create_expr (true);
+ $$ = idl_global->gen ()->create_expr ((idl_bool) I_TRUE,
+ AST_Expression::EV_bool);
}
| IDL_FALSETOK
{
// | IDL_FALSETOK
- $$ = idl_global->gen ()->create_expr (false);
+ $$ = idl_global->gen ()->create_expr ((idl_bool) I_FALSE,
+ AST_Expression::EV_bool);
}
;
@@ -2658,9 +2650,6 @@ switch_type_spec :
if ($$ == 0)
{
idl_global->err ()->lookup_error ($1);
-
- /* If we don't return here, we'll crash later.*/
- return 1;
}
}
;
@@ -4293,7 +4282,7 @@ component_decl :
(void) s->fe_add_component (c);
// This FE_ComponentHeader class isn't destroyed with the AST.
- $1->destroy ();
+ $1->name ()->destroy ();
delete $1;
$1 = 0;
}
@@ -4346,12 +4335,10 @@ component_header :
* Create an AST representation of the information in the header
* part of a component.
*/
- UTL_ScopedName *n = 0;
- ACE_NEW_RETURN (n,
- UTL_ScopedName ($2, 0),
- 1);
+ UTL_ScopedName n ($2,
+ 0);
ACE_NEW_RETURN ($$,
- FE_ComponentHeader (n,
+ FE_ComponentHeader (&n,
$4,
$6,
I_FALSE),
@@ -4724,7 +4711,7 @@ home_decl :
(void) s->fe_add_home (h);
// This FE_HomeHeader class isn't destroyed with the AST.
- $1->destroy ();
+ $1->name ()->destroy ();
delete $1;
$1 = 0;
}
@@ -4784,12 +4771,10 @@ home_header :
* Create an AST representation of the information in the header
* part of a component home.
*/
- UTL_ScopedName *n = 0;
- ACE_NEW_RETURN (n,
- UTL_ScopedName ($3, 0),
- 1);
+ UTL_ScopedName n ($3,
+ 0);
ACE_NEW_RETURN ($$,
- FE_HomeHeader (n,
+ FE_HomeHeader (&n,
$5,
$7,
$11,
@@ -5247,11 +5232,6 @@ event_decl :
*/
e = AST_EventType::narrow_from_decl (i);
(void) s->fe_add_eventtype (e);
-
- // FE_EventHeader is not automatically destroyed in the AST
- $2->destroy ();
- delete $2;
- $2 = 0;
}
/*