summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2002-04-01 20:55:40 +0000
committerparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2002-04-01 20:55:40 +0000
commit940deed04db8d44fd53047f7c62c50c398c9e98c (patch)
treee02ace1d6456a4ba4d58e33af98c3fada5c7965f
parentc17d713596b661dfca3a7b9d1e4dbf52639910ae (diff)
downloadATCD-940deed04db8d44fd53047f7c62c50c398c9e98c.tar.gz
ChangeLogTag: Mon Apr 1 14:42:45 2002 Jeff Parsons <parsons@cs.wustl.edu>
-rw-r--r--TAO/TAO_IDL/Makefile.FE2
-rw-r--r--TAO/TAO_IDL/TAO_IDL_FE.bor2
-rw-r--r--TAO/TAO_IDL/TAO_IDL_FE_DLL.dsp20
-rw-r--r--TAO/TAO_IDL/TAO_IDL_FE_LIB.dsp16
-rw-r--r--TAO/TAO_IDL/ast/Makefile.am4
-rw-r--r--TAO/TAO_IDL/ast/ast_decl.cpp2
-rw-r--r--TAO/TAO_IDL/ast/ast_generator.cpp94
-rw-r--r--TAO/TAO_IDL/ast/ast_interface.cpp191
-rw-r--r--TAO/TAO_IDL/ast/ast_interface_fwd.cpp52
-rw-r--r--TAO/TAO_IDL/ast/ast_module.cpp160
-rw-r--r--TAO/TAO_IDL/ast/ast_redef.cpp2
-rw-r--r--TAO/TAO_IDL/ast/ast_valuetype.cpp228
-rw-r--r--TAO/TAO_IDL/ast/ast_valuetype_fwd.cpp61
-rw-r--r--TAO/TAO_IDL/be/Makefile.am2
-rw-r--r--TAO/TAO_IDL/be/be_generator.cpp41
-rw-r--r--TAO/TAO_IDL/be/be_scope.cpp6
-rw-r--r--TAO/TAO_IDL/be/be_sequence.cpp33
-rw-r--r--TAO/TAO_IDL/be/be_valuetype.cpp94
-rw-r--r--TAO/TAO_IDL/be/be_valuetype_fwd.cpp18
-rw-r--r--TAO/TAO_IDL/be/be_visitor_amh_pre_proc.cpp18
-rw-r--r--TAO/TAO_IDL/be/be_visitor_ami_pre_proc.cpp25
-rw-r--r--TAO/TAO_IDL/be/be_visitor_argument/post_upcall_ss.cpp2
-rw-r--r--TAO/TAO_IDL/be/be_visitor_exception/exception_ctor.cpp7
-rw-r--r--TAO/TAO_IDL/be/be_visitor_sequence/gen_bounded_obj_sequence_ch.cpp39
-rw-r--r--TAO/TAO_IDL/be/be_visitor_sequence/gen_bounded_obj_sequence_ci.cpp33
-rw-r--r--TAO/TAO_IDL/be/be_visitor_sequence/gen_bounded_obj_sequence_cs.cpp19
-rw-r--r--TAO/TAO_IDL/be/be_visitor_sequence/gen_unbounded_obj_sequence_ch.cpp39
-rw-r--r--TAO/TAO_IDL/be/be_visitor_sequence/gen_unbounded_obj_sequence_ci.cpp31
-rw-r--r--TAO/TAO_IDL/be/be_visitor_sequence/gen_unbounded_obj_sequence_cs.cpp27
-rw-r--r--TAO/TAO_IDL/be/be_visitor_typecode/typecode_defn.cpp51
-rw-r--r--TAO/TAO_IDL/be/be_visitor_valuetype/cdr_op_ch.cpp2
-rw-r--r--TAO/TAO_IDL/be/be_visitor_valuetype/cdr_op_cs.cpp2
-rw-r--r--TAO/TAO_IDL/be/be_visitor_valuetype/valuetype.cpp83
-rw-r--r--TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_ch.cpp46
-rw-r--r--TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_cs.cpp53
-rw-r--r--TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_init_ch.cpp2
-rw-r--r--TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_init_cs.cpp2
-rw-r--r--TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_obv_ch.cpp12
-rw-r--r--TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_obv_ci.cpp6
-rw-r--r--TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_obv_cs.cpp9
-rw-r--r--TAO/TAO_IDL/be_include/Makefile.am2
-rw-r--r--TAO/TAO_IDL/be_include/be_generator.h19
-rw-r--r--TAO/TAO_IDL/be_include/be_valuetype.h33
-rw-r--r--TAO/TAO_IDL/be_include/be_valuetype_fwd.h11
-rw-r--r--TAO/TAO_IDL/be_include/be_visitor_argument.h2
-rw-r--r--TAO/TAO_IDL/be_include/be_visitor_argument/post_upcall_ss.h2
-rw-r--r--TAO/TAO_IDL/driver/Makefile.am5
-rw-r--r--TAO/TAO_IDL/fe/Makefile.am1
-rw-r--r--TAO/TAO_IDL/fe/fe_interface_header.cpp578
-rw-r--r--TAO/TAO_IDL/fe/idl.yy359
-rw-r--r--TAO/TAO_IDL/fe/y.tab.cpp1978
-rw-r--r--TAO/TAO_IDL/include/Makefile.am4
-rw-r--r--TAO/TAO_IDL/include/ast_component.h14
-rw-r--r--TAO/TAO_IDL/include/ast_decl.h2
-rw-r--r--TAO/TAO_IDL/include/ast_generator.h28
-rw-r--r--TAO/TAO_IDL/include/ast_interface.h36
-rw-r--r--TAO/TAO_IDL/include/ast_interface_fwd.h1
-rw-r--r--TAO/TAO_IDL/include/ast_module.h6
-rw-r--r--TAO/TAO_IDL/include/ast_valuetype.h62
-rw-r--r--TAO/TAO_IDL/include/ast_valuetype_fwd.h34
-rw-r--r--TAO/TAO_IDL/include/fe_interface_header.h112
-rw-r--r--TAO/TAO_IDL/include/idl_global.h4
-rw-r--r--TAO/TAO_IDL/include/utl_err.h25
-rw-r--r--TAO/TAO_IDL/include/utl_scope.h14
-rw-r--r--TAO/TAO_IDL/narrow/narrow.cpp6
-rw-r--r--TAO/TAO_IDL/util/utl_err.cpp124
-rw-r--r--TAO/TAO_IDL/util/utl_scope.cpp57
67 files changed, 3091 insertions, 1964 deletions
diff --git a/TAO/TAO_IDL/Makefile.FE b/TAO/TAO_IDL/Makefile.FE
index 2f27990c38e..2bf15cf0436 100644
--- a/TAO/TAO_IDL/Makefile.FE
+++ b/TAO/TAO_IDL/Makefile.FE
@@ -60,6 +60,8 @@ FILES = fe/fe_declarator \
ast/ast_union_fwd \
ast/ast_union_branch \
ast/ast_union_label \
+ ast/ast_valuetype \
+ ast/ast_valuetype_fwd \
ast/ast_generator \
ast/ast_redef \
ast/ast_recursive \
diff --git a/TAO/TAO_IDL/TAO_IDL_FE.bor b/TAO/TAO_IDL/TAO_IDL_FE.bor
index b761bfe6c2c..11e97596cfd 100644
--- a/TAO/TAO_IDL/TAO_IDL_FE.bor
+++ b/TAO/TAO_IDL/TAO_IDL_FE.bor
@@ -38,6 +38,8 @@ OBJFILES = \
$(OBJDIR)\ast_union_fwd.obj \
$(OBJDIR)\ast_union_branch.obj \
$(OBJDIR)\ast_union_label.obj \
+ $(OBJDIR)\ast_valuetype.obj \
+ $(OBJDIR)\ast_valuetype_fwd.obj \
$(OBJDIR)\ast_visitor.obj \
$(OBJDIR)\fe_declarator.obj \
$(OBJDIR)\fe_extern.obj \
diff --git a/TAO/TAO_IDL/TAO_IDL_FE_DLL.dsp b/TAO/TAO_IDL/TAO_IDL_FE_DLL.dsp
index f6d2bbcd759..224706cea4f 100644
--- a/TAO/TAO_IDL/TAO_IDL_FE_DLL.dsp
+++ b/TAO/TAO_IDL/TAO_IDL_FE_DLL.dsp
@@ -238,6 +238,14 @@ SOURCE=.\ast\ast_union_label.cpp
# End Source File
# Begin Source File
+SOURCE=.\ast\ast_valuetype.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\ast\ast_valuetype_fwd.cpp
+# End Source File
+# Begin Source File
+
SOURCE=.\ast\ast_visitor.cpp
# End Source File
# Begin Source File
@@ -478,6 +486,14 @@ SOURCE=.\include\ast_union_label.h
# End Source File
# Begin Source File
+SOURCE=.\include\ast_valuetype.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\include\ast_valuetype_fwd.h
+# End Source File
+# Begin Source File
+
SOURCE=.\include\ast_visitor.h
# End Source File
# Begin Source File
@@ -584,6 +600,10 @@ SOURCE=.\include\utl_string.h
SOURCE=.\include\utl_strlist.h
# End Source File
+# Begin Source File
+
+SOURCE=.\fe\y.tab.h
+# End Source File
# End Group
# End Target
# End Project
diff --git a/TAO/TAO_IDL/TAO_IDL_FE_LIB.dsp b/TAO/TAO_IDL/TAO_IDL_FE_LIB.dsp
index 17218ba107c..6c405b4a07e 100644
--- a/TAO/TAO_IDL/TAO_IDL_FE_LIB.dsp
+++ b/TAO/TAO_IDL/TAO_IDL_FE_LIB.dsp
@@ -227,6 +227,14 @@ SOURCE=.\ast\ast_union_label.cpp
# End Source File
# Begin Source File
+SOURCE=.\ast\ast_valuetype.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\ast\ast_valuetype_fwd.cpp
+# End Source File
+# Begin Source File
+
SOURCE=.\ast\ast_visitor.cpp
# End Source File
# Begin Source File
@@ -463,6 +471,14 @@ SOURCE=.\include\ast_union_label.h
# End Source File
# Begin Source File
+SOURCE=.\include\ast_valuetype.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\include\ast_valuetype_fwd.h
+# End Source File
+# Begin Source File
+
SOURCE=.\include\ast_visitor.h
# End Source File
# Begin Source File
diff --git a/TAO/TAO_IDL/ast/Makefile.am b/TAO/TAO_IDL/ast/Makefile.am
index 2be4f1bcb08..2df04da5765 100644
--- a/TAO/TAO_IDL/ast/Makefile.am
+++ b/TAO/TAO_IDL/ast/Makefile.am
@@ -43,11 +43,15 @@ libast_la_SOURCES = \
ast_sequence.cpp \
ast_string.cpp \
ast_structure.cpp \
+ ast_structure_fwd.cpp \
ast_type.cpp \
ast_typedef.cpp \
ast_union.cpp \
+ ast_union_fwd.cpp \
ast_union_branch.cpp \
ast_union_label.cpp \
+ ast_valuetype.cpp \
+ ast_valuetype_fwd.cpp \
ast_visitor.cpp
diff --git a/TAO/TAO_IDL/ast/ast_decl.cpp b/TAO/TAO_IDL/ast/ast_decl.cpp
index a897bce2a24..c9409ac9cdf 100644
--- a/TAO/TAO_IDL/ast/ast_decl.cpp
+++ b/TAO/TAO_IDL/ast/ast_decl.cpp
@@ -741,7 +741,7 @@ AST_Decl::set_id_with_typeid (char *value)
AST_Interface *iface =
AST_Interface::narrow_from_scope (this->defined_in ());
- if (iface == 0 || iface->is_valuetype () == 0)
+ if (iface == 0 || iface->node_type () == AST_Decl::NT_valuetype == 0)
{
idl_global->err ()->error1 (UTL_Error::EIDL_INVALID_TYPEID,
this);
diff --git a/TAO/TAO_IDL/ast/ast_generator.cpp b/TAO/TAO_IDL/ast/ast_generator.cpp
index 1dbf2f2d2d4..55aae1c2f2b 100644
--- a/TAO/TAO_IDL/ast/ast_generator.cpp
+++ b/TAO/TAO_IDL/ast/ast_generator.cpp
@@ -71,8 +71,8 @@ trademarks or registered trademarks of Sun Microsystems, Inc.
// of every AST class.
#include "ast_root.h"
-#include "ast_interface.h"
-#include "ast_interface_fwd.h"
+#include "ast_valuetype.h"
+#include "ast_valuetype_fwd.h"
#include "ast_exception.h"
#include "ast_enum.h"
#include "ast_attribute.h"
@@ -198,22 +198,22 @@ AST_Generator::create_root (UTL_ScopedName *n)
AST_Interface *
AST_Generator::create_interface (UTL_ScopedName *n,
- AST_Interface **ih,
- long nih,
- AST_Interface **ih_flat,
- long nih_flat,
- idl_bool l,
- idl_bool a)
+ AST_Interface **inherits,
+ long n_inherits,
+ AST_Interface **inherits_flat,
+ long n_inherits_flat,
+ idl_bool local,
+ idl_bool abstract)
{
AST_Interface *retval = 0;
ACE_NEW_RETURN (retval,
AST_Interface (n,
- ih,
- nih,
- ih_flat,
- nih_flat,
- l,
- a),
+ inherits,
+ n_inherits,
+ inherits_flat,
+ n_inherits_flat,
+ local,
+ abstract),
0);
return retval;
@@ -239,29 +239,34 @@ AST_Generator::create_interface_fwd (UTL_ScopedName *n,
return retval;
}
-AST_Interface *
+AST_ValueType *
AST_Generator::create_valuetype (UTL_ScopedName *n,
- AST_Interface **ih,
- long nih)
-{
- AST_Interface *retval = 0;
- ACE_NEW_RETURN (retval,
- AST_Interface (n,
- ih,
- nih,
- 0,
- 0,
- 0,
- 0),
+ AST_Interface **inherits,
+ long n_inherits,
+ AST_ValueType *inherits_concrete,
+ AST_Interface **inherits_flat,
+ long n_inherits_flat,
+ AST_Interface **supports,
+ long n_supports,
+ AST_Interface *supports_concrete,
+ idl_bool abstract,
+ idl_bool truncatable)
+{
+ AST_ValueType *retval = 0;
+ ACE_NEW_RETURN (retval,
+ AST_ValueType (n,
+ inherits,
+ n_inherits,
+ inherits_concrete,
+ inherits_flat,
+ n_inherits_flat,
+ supports,
+ n_supports,
+ supports_concrete,
+ abstract,
+ truncatable),
0);
- // Valuetypes are represented as be_valuetype derived from be_interface,
- // which derives from AST_Interface. If you construct a backend which
- // utilizes only the AST_... classes, you must instantiate an object that
- // returns true from AST_Interface::is_valuetype().
- // (@@@ (JP) implemented 2000/10/4)
- retval->set_valuetype ();
-
// The following helps with OBV_ namespace generation.
AST_Module *m = AST_Module::narrow_from_scope (retval->defined_in ());
@@ -273,19 +278,28 @@ AST_Generator::create_valuetype (UTL_ScopedName *n,
return retval;
}
-AST_InterfaceFwd *
-AST_Generator::create_valuetype_fwd (UTL_ScopedName *n)
+AST_ValueTypeFwd *
+AST_Generator::create_valuetype_fwd (UTL_ScopedName *n,
+ idl_bool abstract)
{
// See note in create_valuetype().
// Dummy placeholder must return true from is_valuetype().
- AST_Interface *dummy = this->create_valuetype (n,
+ AST_ValueType *dummy = this->create_valuetype (n,
+ 0,
+ -1,
+ 0,
+ 0,
0,
- -1);
+ 0,
+ 0,
+ 0,
+ abstract,
+ I_FALSE);
- AST_InterfaceFwd *retval = 0;
+ AST_ValueTypeFwd *retval = 0;
ACE_NEW_RETURN (retval,
- AST_InterfaceFwd (dummy,
+ AST_ValueTypeFwd (dummy,
n),
0);
diff --git a/TAO/TAO_IDL/ast/ast_interface.cpp b/TAO/TAO_IDL/ast/ast_interface.cpp
index 6670d175ca5..e060355f1d4 100644
--- a/TAO/TAO_IDL/ast/ast_interface.cpp
+++ b/TAO/TAO_IDL/ast/ast_interface.cpp
@@ -84,7 +84,6 @@ trademarks or registered trademarks of Sun Microsystems, Inc.
#include "ast_union_fwd.h"
#include "ast_structure_fwd.h"
#include "ast_native.h"
-#include "ast_factory.h"
#include "ast_visitor.h"
#include "ast_extern.h"
#include "utl_err.h"
@@ -98,8 +97,7 @@ ACE_RCSID (ast,
"$Id$")
AST_Interface::AST_Interface (void)
- : is_valuetype_ (0),
- pd_inherits (0),
+ : pd_inherits (0),
pd_n_inherits (0),
pd_inherits_flat (0),
pd_n_inherits_flat (0)
@@ -120,7 +118,6 @@ AST_Interface::AST_Interface (UTL_ScopedName *n,
UTL_Scope (AST_Decl::NT_interface),
COMMON_Base (local,
abstract),
- is_valuetype_ (0),
pd_inherits (ih),
pd_n_inherits (nih),
pd_inherits_flat (ih_flat),
@@ -134,40 +131,15 @@ AST_Interface::~AST_Interface (void)
// Public operations.
-idl_bool
-AST_Interface::is_valuetype (void)
-{
- return this->is_valuetype_;
-}
-
-void
-AST_Interface::set_valuetype (void)
-{
- this->is_valuetype_ = 1;
-}
-
-idl_bool
-AST_Interface::is_abstract_valuetype (void)
-{
- return this->is_valuetype_ && this->is_abstract_;
-}
-
-void
-AST_Interface::set_abstract_valuetype (void)
-{
- this->is_valuetype_ = 1;
- this->is_abstract_ = 1;
-}
-
void
AST_Interface::be_replace_operation (AST_Decl *old_op,
AST_Decl *new_op)
{
- replace_scope (old_op,
- new_op);
+ this->replace_scope (old_op,
+ new_op);
- replace_referenced (old_op,
- new_op);
+ this->replace_referenced (old_op,
+ new_op);
}
void
@@ -981,87 +953,21 @@ AST_Interface::fe_add_native (AST_Native *t)
return t;
}
-AST_Factory *
-AST_Interface::fe_add_factory (AST_Factory *f)
-{
- AST_Decl *d = 0;
-
- // Can't add to interface which was not yet defined.
- if (!this->is_defined ())
- {
- idl_global->err ()->error2 (UTL_Error::EIDL_DECL_NOT_DEFINED,
- this,
- f);
- return 0;
- }
-
- // Already defined and cannot be redefined? Or already used?
- if ((d = this->lookup_for_add (f, I_FALSE)) != 0)
- {
- if (!can_be_redefined (d))
- {
- idl_global->err ()->error3 (UTL_Error::EIDL_REDEF,
- f,
- this,
- d);
- return 0;
- }
-
- if (this->referenced (d, f->local_name ()))
- {
- idl_global->err ()->error3 (UTL_Error::EIDL_DEF_USE,
- f,
- this,
- d);
- return 0;
- }
-
- if (f->has_ancestor (d))
- {
- idl_global->err ()->redefinition_in_scope (f,
- d);
- return 0;
- }
- }
-
- // Add it to scope.
- this->add_to_scope (f);
-
- // Add it to set of locally referenced symbols.
- this->add_to_referenced (f,
- I_FALSE,
- f->local_name ());
-
- return f;
-}
-
// Dump this AST_Interface node to the ostream o.
void
AST_Interface::dump (ACE_OSTREAM_TYPE &o)
{
- if (this->is_valuetype ())
+ if (this->is_abstract ())
{
- if (this->is_abstract_valuetype ())
- {
- o << "abstract ";
- }
-
- o << "valuetype ";
+ o << "abstract ";
}
- else
+ else if (this->is_local ())
{
- if (this->is_abstract ())
- {
- o << "abstract ";
- }
- else if (this->is_local ())
- {
- o << "local ";
- }
-
- o << "interface ";
+ o << "local ";
}
+ o << "interface ";
+
this->local_name ()->dump (o);
o << " ";
@@ -1069,7 +975,7 @@ AST_Interface::dump (ACE_OSTREAM_TYPE &o)
{
o << ": ";
- for (long i = 0; i < this->pd_n_inherits; i++)
+ for (long i = 0; i < this->pd_n_inherits; ++i)
{
this->pd_inherits[i]->local_name ()->dump (o);
@@ -1081,11 +987,14 @@ AST_Interface::dump (ACE_OSTREAM_TYPE &o)
}
o << " {\n";
+
UTL_Scope::dump (o);
idl_global->indent ()->skip_to (o);
+
o << "}";
}
+// This serves for both interfaces and valuetypes.
void
AST_Interface::fwd_redefinition_helper (AST_Interface *&i,
UTL_Scope *s)
@@ -1113,10 +1022,13 @@ AST_Interface::fwd_redefinition_helper (AST_Interface *&i,
return;
}
+ AST_Decl::NodeType nt = d->node_type ();
+
// If this interface has been forward declared in a previous opening
// of the module it's defined in, the lookup will find the
// forward declaration.
- if (d->node_type () == AST_Decl::NT_interface_fwd)
+ if (nt == AST_Decl::NT_interface_fwd
+ || nt == AST_Decl::NT_valuetype_fwd)
{
AST_InterfaceFwd *fwd_def =
AST_InterfaceFwd::narrow_from_decl (d);
@@ -1124,7 +1036,8 @@ AST_Interface::fwd_redefinition_helper (AST_Interface *&i,
fd = fwd_def->full_definition ();
}
// In all other cases, the lookup will find an interface node.
- else if (d->node_type () == AST_Decl::NT_interface)
+ else if (nt == AST_Decl::NT_interface
+ || nt == AST_Decl::NT_valuetype)
{
fd = AST_Interface::narrow_from_decl (d);
}
@@ -1151,11 +1064,12 @@ AST_Interface::fwd_redefinition_helper (AST_Interface *&i,
// All OK, do the redefinition.
else
{
+ AST_Decl::NodeType fd_nt = fd->node_type ();
+ AST_Decl::NodeType i_nt = i->node_type ();
+
// Only redefinition of the same kind.
if (i->is_local () != fd->is_local ()
- || i->is_valuetype () != fd->is_valuetype ()
- || i->is_abstract_valuetype () !=
- fd->is_abstract_valuetype ()
+ || i_nt != fd_nt
|| i->is_abstract () != fd->is_abstract ()
)
{
@@ -1175,8 +1089,8 @@ AST_Interface::fwd_redefinition_helper (AST_Interface *&i,
}
}
-// Data accessors.
-
+// This serves only for interfaces. AST_ValueType has its
+// own redefine() function which calls this one.
void
AST_Interface::redefine (AST_Interface *from)
{
@@ -1185,10 +1099,10 @@ AST_Interface::redefine (AST_Interface *from)
// definition, which may be in a different scope.
// Since 'this' will replace 'from' upon returning
// from here, we have to update the scope now.
- this->set_inherits (from->inherits ());
- this->set_n_inherits (from->n_inherits ());
- this->set_inherits_flat (from->inherits_flat ());
- this->set_n_inherits_flat (from->n_inherits_flat ());
+ this->pd_inherits = from->pd_inherits;
+ this->pd_n_inherits = from->pd_n_inherits;
+ this->pd_inherits_flat = from->pd_inherits_flat;
+ this->pd_n_inherits_flat = from->pd_n_inherits_flat;
// We've already checked for inconsistent prefixes.
this->prefix (ACE::strnew (from->prefix ()));
@@ -1202,55 +1116,33 @@ AST_Interface::redefine (AST_Interface *from)
this->ifr_fwd_added_ = from->ifr_fwd_added_;
}
+// Data accessors.
+
AST_Interface **
-AST_Interface::inherits (void)
+AST_Interface::inherits (void) const
{
return this->pd_inherits;
}
-void
-AST_Interface::set_inherits (AST_Interface **i)
-{
- this->pd_inherits = i;
-}
-
long
-AST_Interface::n_inherits (void)
+AST_Interface::n_inherits (void) const
{
return this->pd_n_inherits;
}
-void
-AST_Interface::set_n_inherits (long i)
-{
- this->pd_n_inherits = i;
-}
-
AST_Interface **
-AST_Interface::inherits_flat (void)
+AST_Interface::inherits_flat (void) const
{
return this->pd_inherits_flat;
}
-void
-AST_Interface::set_inherits_flat (AST_Interface **i)
-{
- this->pd_inherits_flat = i;
-}
-
long
-AST_Interface::n_inherits_flat (void)
+AST_Interface::n_inherits_flat (void) const
{
return pd_n_inherits_flat;
}
void
-AST_Interface::set_n_inherits_flat (long i)
-{
- this->pd_n_inherits_flat = i;
-}
-
-void
AST_Interface::inherited_name_clash (void)
{
AST_Decl *my_member = 0;
@@ -1403,14 +1295,7 @@ AST_Interface::destroy (void)
int
AST_Interface::ast_accept (ast_visitor *visitor)
{
- if (this->is_valuetype_)
- {
- return visitor->visit_valuetype (this);
- }
- else
- {
- return visitor->visit_interface (this);
- }
+ return visitor->visit_interface (this);
}
// Narrowing methods.
diff --git a/TAO/TAO_IDL/ast/ast_interface_fwd.cpp b/TAO/TAO_IDL/ast/ast_interface_fwd.cpp
index 48b302b418b..3163ac7ee9f 100644
--- a/TAO/TAO_IDL/ast/ast_interface_fwd.cpp
+++ b/TAO/TAO_IDL/ast/ast_interface_fwd.cpp
@@ -85,8 +85,12 @@ AST_InterfaceFwd::AST_InterfaceFwd (void)
AST_InterfaceFwd::AST_InterfaceFwd (AST_Interface *dummy,
UTL_ScopedName *n)
- : AST_Decl (AST_Decl::NT_interface_fwd,
- n)
+ : AST_Type (AST_Decl::NT_interface_fwd,
+ n),
+ AST_Decl (AST_Decl::NT_interface_fwd,
+ n),
+ COMMON_Base (I_FALSE,
+ I_FALSE)
{
// Create a dummy placeholder for the forward declared interface. This
// interface node is not yet defined (n_inherits < 0), so some operations
@@ -108,19 +112,14 @@ AST_InterfaceFwd::is_local (void)
idl_bool AST_InterfaceFwd::is_valuetype (void)
{
- return this->full_definition ()->is_valuetype ();
+ return this->full_definition ()->node_type () == AST_Decl::NT_valuetype;
}
idl_bool
AST_InterfaceFwd::is_abstract_valuetype (void)
{
- return this->full_definition ()->is_abstract_valuetype ();
-}
-
-void
-AST_InterfaceFwd::set_abstract_valuetype (void)
-{
- this->full_definition ()->set_abstract_valuetype ();
+ return (this->full_definition ()->is_abstract ()
+ && this->is_valuetype ());
}
// Redefinition of inherited virtual operations.
@@ -129,43 +128,24 @@ AST_InterfaceFwd::set_abstract_valuetype (void)
void
AST_InterfaceFwd::dump (ACE_OSTREAM_TYPE &o)
{
- if (this->is_valuetype ())
+ if (this->is_abstract ())
{
- if (this->is_abstract_valuetype ())
- {
- o << "abstract ";
- }
-
- o << "valuetype ";
+ o << "abstract ";
}
- else
+ else if (this->is_local ())
{
- if (this->is_abstract ())
- {
- o << "abstract ";
- }
- else if (this->is_local ())
- {
- o << "local ";
- }
-
- o << "interface ";
+ o << "local ";
}
+ o << "interface ";
+
this->local_name ()->dump (o);
}
int
AST_InterfaceFwd::ast_accept (ast_visitor *visitor)
{
- if (this->is_valuetype ())
- {
- return visitor->visit_valuetype_fwd (this);
- }
- else
- {
- return visitor->visit_interface_fwd (this);
- }
+ return visitor->visit_interface_fwd (this);
}
// Data accessors.
diff --git a/TAO/TAO_IDL/ast/ast_module.cpp b/TAO/TAO_IDL/ast/ast_module.cpp
index d063e6501d5..cbfc2b9b858 100644
--- a/TAO/TAO_IDL/ast/ast_module.cpp
+++ b/TAO/TAO_IDL/ast/ast_module.cpp
@@ -70,8 +70,8 @@ trademarks or registered trademarks of Sun Microsystems, Inc.
#include "ast_module.h"
#include "ast_predefined_type.h"
-#include "ast_interface.h"
-#include "ast_interface_fwd.h"
+#include "ast_valuetype.h"
+#include "ast_valuetype_fwd.h"
#include "ast_constant.h"
#include "ast_exception.h"
#include "ast_union.h"
@@ -315,6 +315,88 @@ AST_Module::fe_add_interface (AST_Interface *t)
return t;
}
+// Add this AST_ValueType node (a value type declaration) to this scope.
+AST_ValueType *
+AST_Module::fe_add_valuetype (AST_ValueType *t)
+{
+ AST_Decl *predef = 0;
+ AST_ValueType *fwd = 0;
+
+ // Already defined?
+ if ((predef = this->lookup_for_add (t, I_FALSE)) != 0)
+ {
+ // Treat fwd declared interfaces specially
+ if (predef->node_type () == AST_Decl::NT_valuetype)
+ {
+ fwd = AST_ValueType::narrow_from_decl (predef);
+
+ if (fwd == 0)
+ {
+ return 0;
+ }
+
+ // Forward declared and not defined yet.
+ if (!fwd->is_defined ())
+ {
+ if (fwd->defined_in () != this)
+ {
+ idl_global->err ()->error3 (UTL_Error::EIDL_SCOPE_CONFLICT,
+ fwd,
+ t,
+ this);
+
+ return 0;
+ }
+ }
+ // OK, not illegal redef of forward declaration. Now check whether.
+ // it has been referenced already.
+ else if (this->referenced (predef, t->local_name ()))
+ {
+ idl_global->err ()->error3 (UTL_Error::EIDL_DEF_USE,
+ t,
+ this,
+ predef);
+
+ return 0;
+ }
+ }
+ else if (!can_be_redefined (predef))
+ {
+ idl_global->err ()->error3 (UTL_Error::EIDL_REDEF,
+ t,
+ this,
+ predef);
+
+ return 0;
+ }
+ else if (referenced (predef, t->local_name ()) && !t->is_defined ())
+ {
+ idl_global->err ()->error3 (UTL_Error::EIDL_DEF_USE,
+ t,
+ this,
+ predef);
+
+ return 0;
+ }
+ else if (t->has_ancestor (predef))
+ {
+ idl_global->err ()->redefinition_in_scope (t,
+ predef);
+
+ return 0;
+ }
+ }
+
+ // Add it to scope
+ this->add_to_scope (t);
+
+ // Add it to set of locally referenced symbols
+ this->add_to_referenced (t,
+ I_FALSE,
+ t->local_name ());
+ return t;
+}
+
// Add this AST_InterfaceFwd node (a forward declaration of an IDL
// interface) to this scope.
AST_InterfaceFwd *
@@ -389,6 +471,80 @@ AST_Module::fe_add_interface_fwd (AST_InterfaceFwd *i)
return i;
}
+// Add this AST_ValueTypeFwd node (a forward declaration of an IDL
+// value type) to this scope.
+AST_ValueTypeFwd *
+AST_Module::fe_add_valuetype_fwd (AST_ValueTypeFwd *v)
+{
+ AST_Decl *d = 0;
+ AST_ValueType *vtf = 0;
+
+ // Already defined and cannot be redefined? Or already used?
+ if ((d = this->lookup_for_add (v, I_FALSE)) != 0)
+ {
+ // There used to be another check here ANDed with the one below:
+ // d->defined_in () == this. But lookup_for_add calls only
+ // lookup_by_name_local(), which does not bump up the scope,
+ // and look_in_previous() for modules. If look_in_previous()
+ // finds something, the scopes will NOT be the same pointer
+ // value, but the result is what we want.
+ if (d->node_type () == AST_Decl::NT_valuetype)
+ {
+ vtf = AST_ValueType::narrow_from_decl (d);
+
+ if (vtf == 0)
+ {
+ return 0;
+ }
+
+ if (v->added () == 0)
+ {
+ v->set_added (1);
+ this->add_to_scope (v);
+ }
+
+ // @@ Redefinition of forward. Type check not implemented.
+ v->set_full_definition (vtf); // @@ Memory leak.
+ return v;
+ }
+
+ if (!can_be_redefined (d)) {
+
+ idl_global->err ()->error3 (UTL_Error::EIDL_REDEF,
+ v,
+ this,
+ d);
+ return 0;
+ }
+
+ if (this->referenced (d, v->local_name ()))
+ {
+ idl_global->err ()->error3 (UTL_Error::EIDL_DEF_USE,
+ v,
+ this,
+ d);
+ return 0;
+ }
+
+ if (v->has_ancestor (d))
+ {
+ idl_global->err ()->redefinition_in_scope (v,
+ d);
+ return 0;
+ }
+ }
+
+ // Add it to scope
+ this->add_to_scope (v);
+
+ // Add it to set of locally referenced symbols
+ this->add_to_referenced (v,
+ I_FALSE,
+ v->local_name ());
+
+ return v;
+}
+
// Add this AST_Constant node (a constant declaration) to this scope.
AST_Constant *
AST_Module::fe_add_constant (AST_Constant *t)
diff --git a/TAO/TAO_IDL/ast/ast_redef.cpp b/TAO/TAO_IDL/ast/ast_redef.cpp
index 73a49b00a6b..7310ca8a8db 100644
--- a/TAO/TAO_IDL/ast/ast_redef.cpp
+++ b/TAO/TAO_IDL/ast/ast_redef.cpp
@@ -80,6 +80,8 @@ can_be_redefined (AST_Decl *d)
case AST_Decl::NT_module:
case AST_Decl::NT_interface:
case AST_Decl::NT_interface_fwd:
+ case AST_Decl::NT_valuetype:
+ case AST_Decl::NT_valuetype_fwd:
case AST_Decl::NT_const:
case AST_Decl::NT_except:
case AST_Decl::NT_argument:
diff --git a/TAO/TAO_IDL/ast/ast_valuetype.cpp b/TAO/TAO_IDL/ast/ast_valuetype.cpp
new file mode 100644
index 00000000000..00725591849
--- /dev/null
+++ b/TAO/TAO_IDL/ast/ast_valuetype.cpp
@@ -0,0 +1,228 @@
+// This may look like C, but it's really -*- C++ -*-
+// $Id$
+
+#include "ast_valuetype.h"
+#include "ast_factory.h"
+#include "ast_visitor.h"
+#include "ast_extern.h"
+#include "utl_err.h"
+#include "utl_identifier.h"
+#include "utl_indenter.h"
+#include "global_extern.h"
+#include "nr_extern.h"
+
+ACE_RCSID (ast,
+ ast_valuetype,
+ "$Id$")
+
+AST_ValueType::AST_ValueType (void)
+ : pd_supports (0),
+ pd_n_supports (0),
+ pd_inherits_concrete (0),
+ pd_supports_concrete (0),
+ pd_truncatable (I_FALSE)
+{
+}
+
+AST_ValueType::AST_ValueType (UTL_ScopedName *n,
+ AST_Interface **inherits,
+ long n_inherits,
+ AST_ValueType *inherits_concrete,
+ AST_Interface **inherits_flat,
+ long n_inherits_flat,
+ AST_Interface **supports,
+ long n_supports,
+ AST_Interface *supports_concrete,
+ idl_bool abstract,
+ idl_bool truncatable)
+ : AST_Interface (n,
+ inherits,
+ n_inherits,
+ inherits_flat,
+ n_inherits_flat,
+ I_FALSE,
+ abstract),
+ AST_Type (AST_Decl::NT_valuetype,
+ n),
+ AST_Decl (AST_Decl::NT_valuetype,
+ n),
+ UTL_Scope (AST_Decl::NT_valuetype),
+ COMMON_Base (I_FALSE,
+ abstract),
+ pd_supports (supports),
+ pd_n_supports (n_supports),
+ pd_inherits_concrete (inherits_concrete),
+ pd_supports_concrete (supports_concrete),
+ pd_truncatable (truncatable)
+{
+}
+
+AST_ValueType::~AST_ValueType (void)
+{
+}
+
+void
+AST_ValueType::redefine (AST_Interface *from)
+{
+ AST_ValueType *vt = AST_ValueType::narrow_from_decl (from);
+
+ if (vt == 0)
+ {
+ idl_global->err ()->redef_error (from->local_name ()->get_string (),
+ this->local_name ()->get_string ());
+ return;
+ }
+
+ // Copy over all the base class members.
+ this->AST_Interface::redefine (from);
+
+ this->pd_inherits_concrete = vt->pd_inherits_concrete;
+ this->pd_supports_concrete = vt->pd_supports_concrete;
+ this->pd_truncatable = vt->pd_truncatable;
+}
+
+AST_ValueType *
+AST_ValueType::inherits_concrete (void) const
+{
+ return this->pd_inherits_concrete;
+}
+
+AST_Interface *
+AST_ValueType::supports_concrete (void) const
+{
+ return this->pd_supports_concrete;
+}
+
+idl_bool
+AST_ValueType::truncatable (void) const
+{
+ return this->pd_truncatable;
+}
+
+void
+AST_ValueType::destroy (void)
+{
+}
+
+void
+AST_ValueType::dump (ACE_OSTREAM_TYPE &o)
+{
+ if (this->is_abstract ())
+ {
+ o << "abstract ";
+ }
+ else if (this->pd_truncatable)
+ {
+ o << "truncatable ";
+ }
+
+ o << "valuetype ";
+
+ this->local_name ()->dump (o);
+ o << " ";
+
+ if (this->pd_n_inherits > 0)
+ {
+ o << ": ";
+
+ for (long i = 0; i < this->pd_n_inherits; ++i)
+ {
+ this->pd_inherits[i]->local_name ()->dump (o);
+
+ if (i < this->pd_n_inherits - 1)
+ {
+ o << ", ";
+ }
+ }
+ }
+
+ o << "\n\n";
+
+ if (this->pd_n_supports > 0)
+ {
+ o << ": ";
+
+ for (long i = 0; i < this->pd_n_supports; ++i)
+ {
+ this->pd_supports[i]->local_name ()->dump (o);
+
+ if (i < this->pd_n_supports - 1)
+ {
+ o << ", ";
+ }
+ }
+ }
+
+ o << " {\n";
+
+ UTL_Scope::dump (o);
+ idl_global->indent ()->skip_to (o);
+
+ o << "}";
+}
+
+int
+AST_ValueType::ast_accept (ast_visitor *visitor)
+{
+ return visitor->visit_valuetype (this);
+}
+
+AST_Factory *
+AST_ValueType::fe_add_factory (AST_Factory *f)
+{
+ AST_Decl *d = 0;
+
+ // Can't add to interface which was not yet defined.
+ if (!this->is_defined ())
+ {
+ idl_global->err ()->error2 (UTL_Error::EIDL_DECL_NOT_DEFINED,
+ this,
+ f);
+ return 0;
+ }
+
+ // Already defined and cannot be redefined? Or already used?
+ if ((d = this->lookup_for_add (f, I_FALSE)) != 0)
+ {
+ if (!can_be_redefined (d))
+ {
+ idl_global->err ()->error3 (UTL_Error::EIDL_REDEF,
+ f,
+ this,
+ d);
+ return 0;
+ }
+
+ if (this->referenced (d, f->local_name ()))
+ {
+ idl_global->err ()->error3 (UTL_Error::EIDL_DEF_USE,
+ f,
+ this,
+ d);
+ return 0;
+ }
+
+ if (f->has_ancestor (d))
+ {
+ idl_global->err ()->redefinition_in_scope (f,
+ d);
+ return 0;
+ }
+ }
+
+ // Add it to scope.
+ this->add_to_scope (f);
+
+ // Add it to set of locally referenced symbols.
+ this->add_to_referenced (f,
+ I_FALSE,
+ f->local_name ());
+
+ return f;
+}
+
+ // Narrowing.
+IMPL_NARROW_METHODS1(AST_ValueType, AST_Interface);
+IMPL_NARROW_FROM_DECL(AST_ValueType);
+IMPL_NARROW_FROM_SCOPE(AST_ValueType);
+
diff --git a/TAO/TAO_IDL/ast/ast_valuetype_fwd.cpp b/TAO/TAO_IDL/ast/ast_valuetype_fwd.cpp
new file mode 100644
index 00000000000..95e1e633dae
--- /dev/null
+++ b/TAO/TAO_IDL/ast/ast_valuetype_fwd.cpp
@@ -0,0 +1,61 @@
+// $Id$
+
+#include "ast_valuetype_fwd.h"
+#include "ast_visitor.h"
+#include "utl_identifier.h"
+
+ACE_RCSID( ast,
+ ast_valuetype_fwd,
+ "$Id$")
+
+AST_ValueTypeFwd::AST_ValueTypeFwd (void)
+{
+}
+
+AST_ValueTypeFwd::AST_ValueTypeFwd (AST_Interface *dummy,
+ UTL_ScopedName *n)
+ : AST_InterfaceFwd (dummy,
+ n),
+ AST_Type (AST_Decl::NT_valuetype_fwd,
+ n),
+ AST_Decl (AST_Decl::NT_valuetype_fwd,
+ n),
+ COMMON_Base (I_FALSE,
+ I_FALSE)
+{
+}
+
+AST_ValueTypeFwd::~AST_ValueTypeFwd (void)
+{
+}
+
+// Redefinition of inherited virtual operations.
+
+// Dump this AST_InterfaceFwd node to the ostream o.
+void
+AST_ValueTypeFwd::dump (ACE_OSTREAM_TYPE &o)
+{
+ if (this->is_abstract ())
+ {
+ o << "abstract ";
+ }
+
+ o << "valuetype ";
+
+ this->local_name ()->dump (o);
+}
+
+int
+AST_ValueTypeFwd::ast_accept (ast_visitor *visitor)
+{
+ return visitor->visit_valuetype_fwd (this);
+}
+
+void
+AST_ValueTypeFwd::destroy (void)
+{
+}
+
+// Narrowing methods.
+IMPL_NARROW_METHODS1 (AST_ValueTypeFwd, AST_InterfaceFwd)
+IMPL_NARROW_FROM_DECL (AST_ValueTypeFwd)
diff --git a/TAO/TAO_IDL/be/Makefile.am b/TAO/TAO_IDL/be/Makefile.am
index 39e7c1f3b71..0eb1656f442 100644
--- a/TAO/TAO_IDL/be/Makefile.am
+++ b/TAO/TAO_IDL/be/Makefile.am
@@ -49,10 +49,12 @@ libbe_la_SOURCES = \
be_stream_factory.cpp \
be_string.cpp \
be_structure.cpp \
+ be_structure_fwd.cpp \
be_sunsoft.cpp \
be_type.cpp \
be_typedef.cpp \
be_union.cpp \
+ be_union_fwd.cpp \
be_union_branch.cpp \
be_union_label.cpp \
be_valuetype.cpp \
diff --git a/TAO/TAO_IDL/be/be_generator.cpp b/TAO/TAO_IDL/be/be_generator.cpp
index e6933d003ff..031057968c1 100644
--- a/TAO/TAO_IDL/be/be_generator.cpp
+++ b/TAO/TAO_IDL/be/be_generator.cpp
@@ -245,29 +245,54 @@ be_generator::create_interface_fwd (UTL_ScopedName *n,
return retval;
}
-AST_Interface *
+AST_ValueType *
be_generator::create_valuetype (UTL_ScopedName *n,
- AST_Interface **ih,
- long nih)
+ AST_Interface **inherits,
+ long n_inherits,
+ AST_ValueType *inherits_concrete,
+ AST_Interface **inherits_flat,
+ long n_inherits_flat,
+ AST_Interface **supports,
+ long n_supports,
+ AST_Interface *supports_concrete,
+ idl_bool abstract,
+ idl_bool truncatable)
{
be_valuetype *retval = 0;
ACE_NEW_RETURN (retval,
be_valuetype (n,
- ih,
- nih),
+ inherits,
+ n_inherits,
+ inherits_concrete,
+ inherits_flat,
+ n_inherits_flat,
+ supports,
+ n_supports,
+ supports_concrete,
+ abstract,
+ truncatable),
0);
return retval;
}
-AST_InterfaceFwd *
-be_generator::create_valuetype_fwd (UTL_ScopedName *n)
+AST_ValueTypeFwd *
+be_generator::create_valuetype_fwd (UTL_ScopedName *n,
+ idl_bool abstract)
{
be_valuetype_fwd *retval = 0;
ACE_NEW_RETURN (retval,
be_valuetype_fwd (this->create_valuetype (n,
0,
- -1),
+ -1,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ abstract,
+ 0),
n),
0);
diff --git a/TAO/TAO_IDL/be/be_scope.cpp b/TAO/TAO_IDL/be/be_scope.cpp
index 6cf689f7db5..326200a43b8 100644
--- a/TAO/TAO_IDL/be/be_scope.cpp
+++ b/TAO/TAO_IDL/be/be_scope.cpp
@@ -2,7 +2,7 @@
// $Id$
//
#include "be_scope.h"
-#include "be_interface.h"
+#include "be_valuetype.h"
#include "be_module.h"
#include "be_exception.h"
#include "be_union.h"
@@ -52,10 +52,12 @@ be_scope::comma (void) const
be_decl *
be_scope::decl (void)
{
- switch (this->scope_node_type())
+ switch (this->scope_node_type ())
{
case AST_Decl::NT_interface:
return be_interface::narrow_from_scope (this);
+ case AST_Decl::NT_valuetype:
+ return be_valuetype::narrow_from_scope (this);
case AST_Decl::NT_module:
return be_module::narrow_from_scope (this);
case AST_Decl::NT_root:
diff --git a/TAO/TAO_IDL/be/be_sequence.cpp b/TAO/TAO_IDL/be/be_sequence.cpp
index 3109ab84b1c..2bb0214b0fc 100644
--- a/TAO/TAO_IDL/be/be_sequence.cpp
+++ b/TAO/TAO_IDL/be/be_sequence.cpp
@@ -237,35 +237,12 @@ be_sequence::managed_type (void)
{
case AST_Decl::NT_interface:
case AST_Decl::NT_interface_fwd:
- {
- int is_valuetype = 0;
- be_interface *bf = be_interface::narrow_from_decl (prim_type);
-
- if (bf != 0)
- {
- is_valuetype = bf->is_valuetype ();
- }
- else
- {
- be_interface_fwd *bff =
- be_interface_fwd::narrow_from_decl (prim_type);
-
- if (bff != 0)
- {
- is_valuetype = bff->is_valuetype ();
- }
- }
- if (is_valuetype)
- {
- this->mt_ = be_sequence::MNG_VALUE;
- }
- else
- {
- this->mt_ = be_sequence::MNG_OBJREF;
- }
-
+ this->mt_ = be_sequence::MNG_OBJREF;
+ break;
+ case AST_Decl::NT_valuetype:
+ case AST_Decl::NT_valuetype_fwd:
+ this->mt_ = be_sequence::MNG_VALUE;
break;
- }
case AST_Decl::NT_string:
this->mt_ = be_sequence::MNG_STRING;
break;
diff --git a/TAO/TAO_IDL/be/be_valuetype.cpp b/TAO/TAO_IDL/be/be_valuetype.cpp
index a282735b5f4..d83ad98d746 100644
--- a/TAO/TAO_IDL/be/be_valuetype.cpp
+++ b/TAO/TAO_IDL/be/be_valuetype.cpp
@@ -45,35 +45,50 @@ be_valuetype::be_valuetype (void)
// Always the case.
this->has_constructor (I_TRUE);
-
- // Set the base (AST_Interface) class member.
- this->set_valuetype ();
}
// Constructor used to build the AST.
be_valuetype::be_valuetype (UTL_ScopedName *n,
- AST_Interface **ih,
- long nih,
- idl_bool set_abstract)
+ AST_Interface **inherits,
+ long n_inherits,
+ AST_ValueType *inherits_concrete,
+ AST_Interface **inherits_flat,
+ long n_inherits_flat,
+ AST_Interface **supports,
+ long n_supports,
+ AST_Interface *supports_concrete,
+ idl_bool abstract,
+ idl_bool truncatable)
: be_interface (n,
- ih,
- nih,
- 0,
- 0,
+ inherits,
+ n_inherits,
+ inherits_flat,
+ n_inherits_flat,
0,
- set_abstract),
+ abstract),
+ AST_ValueType (n,
+ inherits,
+ n_inherits,
+ inherits_concrete,
+ inherits_flat,
+ n_inherits_flat,
+ supports,
+ n_supports,
+ supports_concrete,
+ abstract,
+ truncatable),
AST_Interface (n,
- ih,
- nih,
+ inherits,
+ n_inherits,
+ inherits_flat,
+ n_inherits_flat,
0,
- 0,
- 0,
- set_abstract),
- AST_Decl (AST_Decl::NT_interface, // It's like an interface.
+ abstract),
+ AST_Decl (AST_Decl::NT_valuetype,
n),
- UTL_Scope (AST_Decl::NT_interface),
+ UTL_Scope (AST_Decl::NT_valuetype),
COMMON_Base (0,
- set_abstract),
+ abstract),
full_obv_skel_name_ (0)
{
// Check that redefine() copies all members.
@@ -90,22 +105,16 @@ be_valuetype::be_valuetype (UTL_ScopedName *n,
// Always the case.
this->has_constructor (I_TRUE);
-
- // Set the base (AST_Interface) class member.
- this->set_valuetype ();
}
be_valuetype::~be_valuetype (void)
{
-
}
void
-be_valuetype::redefine (AST_Interface *from)
+be_valuetype::redefine (AST_ValueType *from)
{
- this->AST_Interface::redefine (from);
-
- this->is_abstract_ = from->is_abstract_valuetype ();
+ this->AST_ValueType::redefine (from);
}
// Is true if non-virtual accessor and modifier should be generated
@@ -718,35 +727,29 @@ be_valuetype::gen_helper_stubs (char* ,
}
// For building the pre and postfix of private data fields.
-const char*
+const char *
be_valuetype::field_pd_prefix (void)
{
return "_pd_";
}
-const char*
+const char *
be_valuetype::field_pd_postfix (void)
{
return "";
}
-be_valuetype*
+be_valuetype *
be_valuetype::statefull_inherit (void)
{
- be_valuetype *rval = 0;
-
- if (this->n_inherits () > 0)
+ if (this->pd_inherits_concrete != 0)
{
- rval = be_valuetype::narrow_from_decl (this->inherits ()[0]);
-
- if (rval && (rval->is_valuetype ())
- && (!rval->is_abstract_valuetype ()))
- {
- return rval;
- }
+ return be_valuetype::narrow_from_decl (this->pd_inherits_concrete);
+ }
+ else
+ {
+ return 0;
}
-
- return 0;
}
// Accept a visitor.
@@ -756,6 +759,11 @@ be_valuetype::accept (be_visitor *visitor)
return visitor->visit_valuetype (this);
}
+void
+be_valuetype::destroy (void)
+{
+}
+
ACE_CDR::ULong
be_valuetype::data_members_count (AST_Field::Visibility vis)
{
@@ -864,6 +872,6 @@ be_valuetype::in_recursion (AST_Type *node)
// Narrowing.
-IMPL_NARROW_METHODS1 (be_valuetype, be_interface)
+IMPL_NARROW_METHODS2 (be_valuetype, be_interface, AST_ValueType)
IMPL_NARROW_FROM_DECL (be_valuetype)
IMPL_NARROW_FROM_SCOPE (be_valuetype)
diff --git a/TAO/TAO_IDL/be/be_valuetype_fwd.cpp b/TAO/TAO_IDL/be/be_valuetype_fwd.cpp
index eaa95e923fe..3460d54c5e8 100644
--- a/TAO/TAO_IDL/be/be_valuetype_fwd.cpp
+++ b/TAO/TAO_IDL/be/be_valuetype_fwd.cpp
@@ -37,9 +37,11 @@ be_valuetype_fwd::be_valuetype_fwd (AST_Interface *dummy,
UTL_ScopedName *n)
: be_interface_fwd (dummy,
n),
+ AST_ValueTypeFwd (dummy,
+ n),
AST_InterfaceFwd (dummy,
n),
- AST_Decl (AST_Decl::NT_interface_fwd,
+ AST_Decl (AST_Decl::NT_valuetype_fwd,
n)
{
}
@@ -48,20 +50,18 @@ be_valuetype_fwd::~be_valuetype_fwd (void)
{
}
-
-void
-be_valuetype_fwd::set_abstract_valuetype (void)
-{
- this->full_definition ()->set_abstract_valuetype ();
-}
-
int
be_valuetype_fwd::accept (be_visitor *visitor)
{
return visitor->visit_valuetype_fwd (this);
}
+void
+be_valuetype_fwd::destroy (void)
+{
+}
+
// Narrowing.
-IMPL_NARROW_METHODS1 (be_valuetype_fwd, be_interface_fwd)
+IMPL_NARROW_METHODS2 (be_valuetype_fwd, be_interface_fwd, AST_ValueTypeFwd)
IMPL_NARROW_FROM_DECL (be_valuetype_fwd)
diff --git a/TAO/TAO_IDL/be/be_visitor_amh_pre_proc.cpp b/TAO/TAO_IDL/be/be_visitor_amh_pre_proc.cpp
index ae948fc61a1..7b02d063232 100644
--- a/TAO/TAO_IDL/be/be_visitor_amh_pre_proc.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_amh_pre_proc.cpp
@@ -622,14 +622,22 @@ be_visitor_amh_pre_proc::create_exception_holder (be_interface *node)
AST_Interface **p_intf = 0;
UTL_ScopedName *excep_holder_name =
- node->compute_name ("AMH_", "ExceptionHolder");
+ node->compute_name ("AMH_",
+ "ExceptionHolder");
be_valuetype *excep_holder = 0;
ACE_NEW_RETURN (excep_holder,
- be_valuetype (excep_holder_name, // name
- p_intf, // list of inherited
- inherit_count, // number of inherited
- 0), // set abstract
+ be_valuetype (excep_holder_name,
+ p_intf,
+ inherit_count,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0),
0);
excep_holder->set_name (excep_holder_name);
diff --git a/TAO/TAO_IDL/be/be_visitor_ami_pre_proc.cpp b/TAO/TAO_IDL/be/be_visitor_ami_pre_proc.cpp
index ccbe13d8ef7..75ae636e316 100644
--- a/TAO/TAO_IDL/be/be_visitor_ami_pre_proc.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_ami_pre_proc.cpp
@@ -323,6 +323,13 @@ be_visitor_ami_pre_proc::create_exception_holder (be_interface *node)
be_valuetype (inherit_name,
0,
0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
0),
0);
@@ -364,15 +371,21 @@ be_visitor_ami_pre_proc::create_exception_holder (be_interface *node)
AST_Interface_ptr[1],
0);
- p_intf[0] = ACE_static_cast (AST_Interface *,
- inherit_vt);
+ p_intf[0] = inherit_vt;
be_valuetype *excep_holder = 0;
ACE_NEW_RETURN (excep_holder,
- be_valuetype (excep_holder_name, // name
- p_intf, // list of inherited
- 1, // number of inherited
- 0), // set abstract
+ be_valuetype (0,
+ p_intf,
+ 1,
+ inherit_vt,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0),
0);
excep_holder->set_name (excep_holder_name);
diff --git a/TAO/TAO_IDL/be/be_visitor_argument/post_upcall_ss.cpp b/TAO/TAO_IDL/be/be_visitor_argument/post_upcall_ss.cpp
index e07bbc41fb7..41c9e5b9d10 100644
--- a/TAO/TAO_IDL/be/be_visitor_argument/post_upcall_ss.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_argument/post_upcall_ss.cpp
@@ -30,7 +30,7 @@ ACE_RCSID (be_visitor_argument,
be_visitor_args_post_upcall_ss::be_visitor_args_post_upcall_ss (
be_visitor_context *ctx
)
- : be_visitor_args (ctx)
+ : be_visitor_scope (ctx)
{
}
diff --git a/TAO/TAO_IDL/be/be_visitor_exception/exception_ctor.cpp b/TAO/TAO_IDL/be/be_visitor_exception/exception_ctor.cpp
index 3b6c3bcda07..677b50c3a22 100644
--- a/TAO/TAO_IDL/be/be_visitor_exception/exception_ctor.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_exception/exception_ctor.cpp
@@ -114,6 +114,7 @@ int be_visitor_exception_ctor::visit_field (be_field *node)
}
*os << " _tao_" << node->local_name ();
+
return 0;
}
@@ -253,10 +254,11 @@ int be_visitor_exception_ctor::visit_predefined_type (be_predefined_type *node)
}
else
{
- *os << "const " << bt->name () << "_ptr ";
+ *os << "const " << bt->name ();
}
*os << " &";
+
return 0;
}
else if (pt == AST_PredefinedType::PT_pseudo
@@ -311,6 +313,7 @@ int be_visitor_exception_ctor::visit_sequence (be_sequence *node)
}
*os << " &";
+
return 0;
}
@@ -354,6 +357,7 @@ int be_visitor_exception_ctor::visit_structure (be_structure *node)
}
*os << " &";
+
return 0;
}
@@ -381,6 +385,7 @@ int be_visitor_exception_ctor::visit_union (be_union *node)
}
*os << " &";
+
return 0;
}
diff --git a/TAO/TAO_IDL/be/be_visitor_sequence/gen_bounded_obj_sequence_ch.cpp b/TAO/TAO_IDL/be/be_visitor_sequence/gen_bounded_obj_sequence_ch.cpp
index b4ecd5ee2cb..0265a1210fe 100644
--- a/TAO/TAO_IDL/be/be_visitor_sequence/gen_bounded_obj_sequence_ch.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_sequence/gen_bounded_obj_sequence_ch.cpp
@@ -101,45 +101,25 @@ be_visitor_sequence_ch::gen_bounded_obj_sequence (be_sequence *node)
*os << "// = Accessors." << be_nl;
be_predefined_type *prim = be_predefined_type::narrow_from_decl (pt);
+ AST_Decl::NodeType nt = pt->node_type ();
int is_pseudo_object =
- pt->node_type () == AST_Decl::NT_pre_defined
+ nt == AST_Decl::NT_pre_defined
&& prim
&& prim->pt () == AST_PredefinedType::PT_object;
- int is_valuetype = 0;
-
// operator[]
if (is_pseudo_object)
{
*os << "TAO_Pseudo_Object_Manager<";
}
- else
+ else if (nt == AST_Decl::NT_valuetype)
{
- be_interface *bf = be_interface::narrow_from_decl (pt);
-
- if (bf != 0)
- {
- is_valuetype = bf->is_valuetype ();
- }
- else
- {
- be_interface_fwd *bff = be_interface_fwd::narrow_from_decl (pt);
-
- if (bff != 0)
- {
- is_valuetype = bff->is_valuetype ();
- }
- }
-
- if (is_valuetype)
- {
- *os << "TAO_Valuetype_Manager<";
- }
- else
- {
- *os << "TAO_Object_Manager<";
- }
+ *os << "TAO_Valuetype_Manager<";
+ }
+ else if (nt == AST_Decl::NT_interface)
+ {
+ *os << "TAO_Object_Manager<";
}
*os << bt->name () << ","
@@ -174,6 +154,7 @@ be_visitor_sequence_ch::gen_bounded_obj_sequence (be_sequence *node)
// get_buffer
bt->accept (&visitor);
+
*os << "* *get_buffer (CORBA::Boolean orphan = 0);" << be_nl;
// get_buffer
@@ -189,7 +170,7 @@ be_visitor_sequence_ch::gen_bounded_obj_sequence (be_sequence *node)
<< "CORBA::ULong ol" << be_uidt_nl
<< ");" << be_uidt_nl << be_nl;
- if (! (is_pseudo_object || is_valuetype))
+ if (! (is_pseudo_object || nt == AST_Decl::NT_valuetype))
{
// Pseudo objects do not require these methods.
*os << "virtual void _downcast (" << be_idt << be_idt_nl
diff --git a/TAO/TAO_IDL/be/be_visitor_sequence/gen_bounded_obj_sequence_ci.cpp b/TAO/TAO_IDL/be/be_visitor_sequence/gen_bounded_obj_sequence_ci.cpp
index b98f1ef2b0c..8666f781c07 100644
--- a/TAO/TAO_IDL/be/be_visitor_sequence/gen_bounded_obj_sequence_ci.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_sequence/gen_bounded_obj_sequence_ci.cpp
@@ -39,7 +39,7 @@ be_visitor_sequence_ci::gen_bounded_obj_sequence (be_sequence *node)
}
// Generate the class name.
- be_type *pt;
+ be_type *pt;
if (bt->node_type () == AST_Decl::NT_typedef)
{
@@ -146,24 +146,7 @@ be_visitor_sequence_ci::gen_bounded_obj_sequence (be_sequence *node)
<< "{" << be_idt_nl
<< "buf[i] = ";
- int is_valuetype = 0;
- be_interface *bf = be_interface::narrow_from_decl (pt);
-
- if (bf != 0)
- {
- is_valuetype = bf->is_valuetype ();
- }
- else
- {
- be_interface_fwd *bff = be_interface_fwd::narrow_from_decl (pt);
-
- if (bff != 0)
- {
- is_valuetype = bff->is_valuetype ();
- }
- }
-
- if (is_valuetype)
+ if (pt->node_type () == AST_Decl::NT_valuetype)
{
*os << "0;";
}
@@ -196,7 +179,7 @@ be_visitor_sequence_ci::gen_bounded_obj_sequence (be_sequence *node)
<< "{" << be_idt_nl
<< "if (buffer[i] != ";
- if (is_valuetype)
+ if (pt->node_type () == AST_Decl::NT_valuetype)
{
*os << "0)" << be_idt_nl
<< "{" << be_idt_nl
@@ -281,7 +264,7 @@ be_visitor_sequence_ci::gen_bounded_obj_sequence (be_sequence *node)
<< "for (CORBA::ULong i = 0; i < rhs.length_; i++)" << be_idt_nl
<< "{" << be_idt_nl;
- if (is_valuetype)
+ if (pt->node_type () == AST_Decl::NT_valuetype)
{
*os << "if (tmp2[i] != 0)" << be_idt_nl
<< "tmp2[i]->_add_ref ();" << be_uidt_nl
@@ -337,7 +320,7 @@ be_visitor_sequence_ci::gen_bounded_obj_sequence (be_sequence *node)
<< "for (CORBA::ULong i = 0; i < this->length_; ++i)" << be_idt_nl
<< "{" << be_idt_nl;
- if (is_valuetype)
+ if (pt->node_type () == AST_Decl::NT_valuetype)
{
*os << "if (tmp[i] != 0)" << be_idt_nl
<< "tmp[i]->_remove_ref ();" << be_uidt_nl
@@ -387,7 +370,7 @@ be_visitor_sequence_ci::gen_bounded_obj_sequence (be_sequence *node)
<< "for (CORBA::ULong i=0; i < rhs.length_; ++i)" << be_idt_nl
<< "{" << be_idt_nl;
- if (is_valuetype)
+ if (pt->node_type () == AST_Decl::NT_valuetype)
{
*os << "if (tmp2[i] != 0)" << be_idt_nl
<< "tmp2[i]->_add_ref ();" << be_uidt_nl
@@ -430,7 +413,7 @@ be_visitor_sequence_ci::gen_bounded_obj_sequence (be_sequence *node)
}
else
{
- if (is_valuetype)
+ if (pt->node_type () == AST_Decl::NT_valuetype)
{
*os << "TAO_Valuetype_Manager<";
}
@@ -461,7 +444,7 @@ be_visitor_sequence_ci::gen_bounded_obj_sequence (be_sequence *node)
}
else
{
- if (is_valuetype)
+ if (pt->node_type () == AST_Decl::NT_valuetype)
{
*os << "return TAO_Valuetype_Manager<";
}
diff --git a/TAO/TAO_IDL/be/be_visitor_sequence/gen_bounded_obj_sequence_cs.cpp b/TAO/TAO_IDL/be/be_visitor_sequence/gen_bounded_obj_sequence_cs.cpp
index cc7a8f74a82..e76a92ccafc 100644
--- a/TAO/TAO_IDL/be/be_visitor_sequence/gen_bounded_obj_sequence_cs.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_sequence/gen_bounded_obj_sequence_cs.cpp
@@ -74,23 +74,6 @@ be_visitor_sequence_cs::gen_bounded_obj_sequence (be_sequence *node)
bt_is_defined = ibt->is_defined ();
}
- int is_valuetype = 0;
- be_interface *bf = be_interface::narrow_from_decl (pt);
-
- if (bf != 0)
- {
- is_valuetype = bf->is_valuetype ();
- }
- else
- {
- be_interface_fwd *bff = be_interface_fwd::narrow_from_decl (pt);
-
- if (bff != 0)
- {
- is_valuetype = bff->is_valuetype ();
- }
- }
-
const char * class_name = node->instance_name ();
static char full_class_name [NAMEBUFSIZE];
@@ -191,7 +174,7 @@ be_visitor_sequence_cs::gen_bounded_obj_sequence (be_sequence *node)
<< "for (CORBA::ULong i = nl; i < ol; ++i)" << be_nl
<< "{" << be_idt_nl;
- if (is_valuetype)
+ if (pt->node_type () == AST_Decl::NT_valuetype)
{
*os << "if (tmp[i] != 0)" << be_idt_nl
<< "tmp[i]->_remove_ref ();" << be_uidt_nl
diff --git a/TAO/TAO_IDL/be/be_visitor_sequence/gen_unbounded_obj_sequence_ch.cpp b/TAO/TAO_IDL/be/be_visitor_sequence/gen_unbounded_obj_sequence_ch.cpp
index bae4ab0f4c6..d5b4289f389 100644
--- a/TAO/TAO_IDL/be/be_visitor_sequence/gen_unbounded_obj_sequence_ch.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_sequence/gen_unbounded_obj_sequence_ch.cpp
@@ -103,46 +103,27 @@ be_visitor_sequence_ch::gen_unbounded_obj_sequence (be_sequence *node)
// Accessors
*os << "// = Accessors." << be_nl;
+ AST_Decl::NodeType nt = pt->node_type ();
+
// operator[]
be_predefined_type *prim = be_predefined_type::narrow_from_decl (pt);
int is_pseudo_object =
- pt->node_type () == AST_Decl::NT_pre_defined
+ nt == AST_Decl::NT_pre_defined
&& prim
&& prim->pt () == AST_PredefinedType::PT_object;
- int is_valuetype = 0;
-
if (is_pseudo_object)
{
*os << "TAO_Pseudo_Object_Manager<";
}
- else
+ else if (nt == AST_Decl::NT_valuetype)
+ {
+ *os << "TAO_Valuetype_Manager<";
+ }
+ else if (nt == AST_Decl::NT_interface)
{
- be_interface *bf = be_interface::narrow_from_decl (pt);
-
- if (bf != 0)
- {
- is_valuetype = bf->is_valuetype ();
- }
- else
- {
- be_interface_fwd *bff = be_interface_fwd::narrow_from_decl (pt);
-
- if (bff != 0)
- {
- is_valuetype = bff->is_valuetype ();
- }
- }
-
- if (is_valuetype)
- {
- *os << "TAO_Valuetype_Manager<";
- }
- else
- {
- *os << "TAO_Object_Manager<";
- }
+ *os << "TAO_Object_Manager<";
}
*os << bt->name () << ","
@@ -193,7 +174,7 @@ be_visitor_sequence_ch::gen_unbounded_obj_sequence (be_sequence *node)
<< "CORBA::ULong ol" << be_uidt_nl
<< ");" << be_uidt_nl << be_nl;
- if (! (is_pseudo_object || is_valuetype))
+ if (! (is_pseudo_object || nt == AST_Decl::NT_valuetype))
{
// Pseudo objects do not require these methods.
*os << "virtual void _downcast (" << be_idt << be_idt_nl
diff --git a/TAO/TAO_IDL/be/be_visitor_sequence/gen_unbounded_obj_sequence_ci.cpp b/TAO/TAO_IDL/be/be_visitor_sequence/gen_unbounded_obj_sequence_ci.cpp
index 92cce284eab..b37b5072346 100644
--- a/TAO/TAO_IDL/be/be_visitor_sequence/gen_unbounded_obj_sequence_ci.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_sequence/gen_unbounded_obj_sequence_ci.cpp
@@ -144,26 +144,7 @@ be_visitor_sequence_ci::gen_unbounded_obj_sequence (be_sequence *node)
<< "{" << be_idt_nl
<< "buf[i] = ";
- int is_valuetype = 0;
- {
- be_interface *bf = be_interface::narrow_from_decl (pt);
-
- if (bf != 0)
- {
- is_valuetype = bf->is_valuetype ();
- }
- else
- {
- be_interface_fwd *bff = be_interface_fwd::narrow_from_decl (pt);
-
- if (bff != 0)
- {
- is_valuetype = bff->is_valuetype ();
- }
- }
- }
-
- if (is_valuetype)
+ if (pt->node_type () == AST_Decl::NT_valuetype)
{
*os << "0;";
}
@@ -255,7 +236,7 @@ be_visitor_sequence_ci::gen_unbounded_obj_sequence (be_sequence *node)
<< "for (CORBA::ULong i = 0; i < rhs.length_; ++i)" << be_idt_nl
<< "{" << be_idt_nl;
- if (is_valuetype)
+ if (pt->node_type () == AST_Decl::NT_valuetype)
{
*os << "if (tmp2[i] != 0)" << be_idt_nl
<< "tmp2[i]->_add_ref ();" << be_uidt_nl
@@ -310,7 +291,7 @@ be_visitor_sequence_ci::gen_unbounded_obj_sequence (be_sequence *node)
<< "for (CORBA::ULong i = 0; i < this->length_; ++i)" << be_nl
<< "{" << be_idt_nl;
- if (is_valuetype)
+ if (pt->node_type () == AST_Decl::NT_valuetype)
{
*os << "if (tmp[i] != 0)" << be_idt_nl
<< "tmp[i]->_remove_ref ();" << be_uidt_nl
@@ -367,7 +348,7 @@ be_visitor_sequence_ci::gen_unbounded_obj_sequence (be_sequence *node)
<< "for (CORBA::ULong i = 0; i < rhs.length_; ++i)" << be_idt_nl
<< "{" << be_idt_nl;
- if (is_valuetype)
+ if (pt->node_type () == AST_Decl::NT_valuetype)
{
*os << "if (tmp2[i] != 0)" << be_idt_nl
<< "tmp2[i]->_add_ref ();" << be_uidt_nl
@@ -409,7 +390,7 @@ be_visitor_sequence_ci::gen_unbounded_obj_sequence (be_sequence *node)
}
else
{
- if (is_valuetype)
+ if (pt->node_type () == AST_Decl::NT_valuetype)
{
*os << "ACE_INLINE TAO_Valuetype_Manager<";
}
@@ -441,7 +422,7 @@ be_visitor_sequence_ci::gen_unbounded_obj_sequence (be_sequence *node)
}
else
{
- if (is_valuetype)
+ if (pt->node_type () == AST_Decl::NT_valuetype)
{
*os << "return TAO_Valuetype_Manager<";
}
diff --git a/TAO/TAO_IDL/be/be_visitor_sequence/gen_unbounded_obj_sequence_cs.cpp b/TAO/TAO_IDL/be/be_visitor_sequence/gen_unbounded_obj_sequence_cs.cpp
index 7660cfb5a2a..431a23c2280 100644
--- a/TAO/TAO_IDL/be/be_visitor_sequence/gen_unbounded_obj_sequence_cs.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_sequence/gen_unbounded_obj_sequence_cs.cpp
@@ -72,25 +72,6 @@ be_visitor_sequence_cs::gen_unbounded_obj_sequence (be_sequence *node)
bt_is_defined = ibt->is_defined ();
}
- int is_valuetype = 0;
- {
- be_interface *bf = be_interface::narrow_from_decl (pt);
-
- if (bf != 0)
- {
- is_valuetype = bf->is_valuetype ();
- }
- else
- {
- be_interface_fwd *bff = be_interface_fwd::narrow_from_decl (pt);
-
- if (bff != 0)
- {
- is_valuetype = bff->is_valuetype ();
- }
- }
- }
-
const char * class_name = node->instance_name ();
static char full_class_name [NAMEBUFSIZE];
@@ -153,7 +134,7 @@ be_visitor_sequence_cs::gen_unbounded_obj_sequence (be_sequence *node)
<< "if (!this->release_)" << be_idt_nl
<< "{" << be_idt_nl;
- if (is_valuetype)
+ if (pt->node_type () == AST_Decl::NT_valuetype)
{
*os << "if (old[i] != 0)" << be_idt_nl
<< "old[i]->_add_ref ();" << be_uidt_nl
@@ -208,7 +189,7 @@ be_visitor_sequence_cs::gen_unbounded_obj_sequence (be_sequence *node)
<< "for (CORBA::ULong i = 0; i < this->length_; ++i)" << be_idt_nl
<< "{" << be_idt_nl;
- if (is_valuetype)
+ if (pt->node_type () == AST_Decl::NT_valuetype)
{
*os << "if (tmp[i] != 0)" << be_idt_nl
<< "tmp[i]->_remove_ref ();" << be_uidt_nl
@@ -260,7 +241,7 @@ be_visitor_sequence_cs::gen_unbounded_obj_sequence (be_sequence *node)
<< "for (CORBA::ULong i = nl; i < ol; ++i)" << be_idt_nl
<< "{" << be_idt_nl;
- if (is_valuetype)
+ if (pt->node_type () == AST_Decl::NT_valuetype)
{
*os << "if (tmp[i] != 0)" << be_idt_nl
<< "tmp[i]->_remove_ref ();" << be_uidt_nl
@@ -289,7 +270,7 @@ be_visitor_sequence_cs::gen_unbounded_obj_sequence (be_sequence *node)
be_predefined_type *prim = be_predefined_type::narrow_from_decl (pt);
- if (!is_valuetype
+ if (pt->node_type () != AST_Decl::NT_valuetype
&& (pt->node_type () != AST_Decl::NT_pre_defined)
|| (prim &&
prim->pt () == AST_PredefinedType::PT_object))
diff --git a/TAO/TAO_IDL/be/be_visitor_typecode/typecode_defn.cpp b/TAO/TAO_IDL/be/be_visitor_typecode/typecode_defn.cpp
index 47b164b60d5..bf100e3b665 100644
--- a/TAO/TAO_IDL/be/be_visitor_typecode/typecode_defn.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_typecode/typecode_defn.cpp
@@ -329,19 +329,11 @@ be_visitor_typecode_defn::visit_type (be_type *node)
*os << "CORBA::tk_except";
break;
case AST_Decl::NT_interface:
- {
- // Yet another fruit of interface being a valuetype sometimes :-(
- AST_Interface* iface = AST_Interface::narrow_from_decl (node);
- if (iface != 0 && iface->is_valuetype ())
- {
- *os << "CORBA::tk_value";
- }
- else
- {
- *os << "CORBA::tk_objref";
- }
- break;
- }
+ *os << "CORBA::tk_objref";
+ break;
+ case AST_Decl::NT_valuetype:
+ *os << "CORBA::tk_value";
+ break;
case AST_Decl::NT_sequence:
*os << "CORBA::tk_sequence";
break;
@@ -2317,7 +2309,7 @@ be_visitor_typecode_defn::gen_encapsulation (be_valuetype *node)
// TAO doesn't support neither CUSTOM nor TRUNCATABLE
// valuetypes. So basically need to choose between
// VM_NONE = 0 and VM_ABSTRACT = 2
- ACE_CDR::ULong value_modifier = node->is_abstract_valuetype () ? 2 : 0;
+ ACE_CDR::ULong value_modifier = node->is_abstract () ? 2 : 0;
*os << value_modifier << ", // value modifier" << "\n";
@@ -2325,19 +2317,14 @@ be_visitor_typecode_defn::gen_encapsulation (be_valuetype *node)
//STEP 4: generate TypeCode of concrete base
- AST_Interface *inherited = 0;
- if (node->n_inherits () > 0 &&
- ( // Statefull base valuetype is always first
- inherited =
- AST_Interface::narrow_from_decl(node->inherits ()[0])
- ) != 0 &&
- inherited->is_valuetype () &&
- !inherited->is_abstract ()
- )
+ AST_ValueType *concrete_inherited = node->inherits_concrete ();
+
+ if (concrete_inherited != 0)
{
// Got non-abstract base valuetype. Now emit its typecode
- be_valuetype *vt = be_valuetype::narrow_from_decl(node->inherits ()[0]);
+ be_valuetype *vt = be_valuetype::narrow_from_decl(concrete_inherited);
this->ctx_->sub_state (TAO_CodeGen::TAO_TC_DEFN_TYPECODE_NESTED);
+
if (!vt || vt->accept (this) == -1)
{
ACE_ERROR_RETURN ((LM_ERROR,
@@ -2346,6 +2333,7 @@ be_visitor_typecode_defn::gen_encapsulation (be_valuetype *node)
ACE_TEXT ("failed to generate typecode\n")),
-1);
}
+
// revert the state to what it was before
this->ctx_->sub_state (TAO_CodeGen::TAO_TC_DEFN_SCOPE);
}
@@ -3260,22 +3248,17 @@ be_visitor_typecode_defn::compute_encap_length (be_valuetype *node)
// STEP 5: get encapsulation length for concrete base valuetype
- AST_Interface *inherited = 0;
- if (node->n_inherits () > 0 &&
- ( // Statefull abse valuetype is always first
- inherited =
- AST_Interface::narrow_from_decl(node->inherits ()[0])
- ) != 0 &&
- inherited->is_valuetype () &&
- !inherited->is_abstract ()
- )
+ AST_ValueType *concrete_inherited = node->inherits_concrete ();
+
+ if (concrete_inherited != 0)
{
// Got non-abstract base valuetype.
this->computed_encap_len_ = 0;
- be_valuetype *vt = be_valuetype::narrow_from_decl(node->inherits ()[0]);
+ be_valuetype *vt = be_valuetype::narrow_from_decl (concrete_inherited);
this->ctx_->sub_state (TAO_CodeGen::TAO_TC_DEFN_TC_SIZE);
+
if (!vt || vt->accept (this) == -1)
{
ACE_ERROR_RETURN ((LM_ERROR,
diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype/cdr_op_ch.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype/cdr_op_ch.cpp
index 7b4bae8219d..0f7a3aeb599 100644
--- a/TAO/TAO_IDL/be/be_visitor_valuetype/cdr_op_ch.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_valuetype/cdr_op_ch.cpp
@@ -83,7 +83,7 @@ be_visitor_valuetype_cdr_op_ch::visit_valuetype (be_valuetype *node)
-1);
}
- if (!node->is_abstract_valuetype ())
+ if (!node->is_abstract ())
{
// Functions that marshal state.
be_visitor_context new_ctx (*this->ctx_);
diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype/cdr_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype/cdr_op_cs.cpp
index 0e66fd2ca60..2b77fb44e69 100644
--- a/TAO/TAO_IDL/be/be_visitor_valuetype/cdr_op_cs.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_valuetype/cdr_op_cs.cpp
@@ -103,7 +103,7 @@ be_visitor_valuetype_cdr_op_cs::visit_valuetype (be_valuetype *node)
<< be_uidt_nl
<< "}\n\n";
- if (!node->is_abstract_valuetype ())
+ if (!node->is_abstract ())
{
// Functions that marshal state.
be_visitor_context new_ctx (*this->ctx_);
diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype.cpp
index f4345a6c608..1fd15085a81 100644
--- a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype.cpp
@@ -162,15 +162,15 @@ be_visitor_valuetype::visit_attribute (be_attribute *node)
this->ctx_->node (node);
this->ctx_->attribute (node);
- be_operation op (node->field_type (),
- AST_Operation::OP_noflags,
- node->name (),
- 0,
- 0);
+ be_operation get_op (node->field_type (),
+ AST_Operation::OP_noflags,
+ node->name (),
+ 0,
+ 0);
- op.set_name ((UTL_IdList *) node->name ()->copy ());
+ get_op.set_name ((UTL_IdList *) node->name ()->copy ());
- if (this->visit_operation (&op) == -1)
+ if (this->visit_operation (&get_op) == -1)
{
ACE_ERROR_RETURN ((LM_ERROR,
"(%N:%l) be_visitor_attribute::"
@@ -201,16 +201,16 @@ be_visitor_valuetype::visit_attribute (be_attribute *node)
arg.set_name ((UTL_IdList *) node->name ()->copy ());
// Create the operation.
- be_operation op2 (&rt,
- AST_Operation::OP_noflags,
- node->name (),
- 0,
- 0);
+ be_operation set_op (&rt,
+ AST_Operation::OP_noflags,
+ node->name (),
+ 0,
+ 0);
- op.set_name ((UTL_IdList *) node->name ()->copy ());
- op.add_argument_to_scope (&arg);
+ set_op.set_name ((UTL_IdList *) node->name ()->copy ());
+ set_op.add_argument_to_scope (&arg);
- if (this->visit_operation (&op2) == -1)
+ if (this->visit_operation (&set_op) == -1)
{
ACE_ERROR_RETURN ((LM_ERROR,
"(%N:%l) be_visitor_attribute::"
@@ -1004,7 +1004,7 @@ be_visitor_valuetype::gen_field_pd (be_field *node)
int
be_visitor_valuetype::gen_init_defn (be_valuetype *node)
{
- if (node->is_abstract_valuetype ())
+ if (node->is_abstract ())
{
return 0;
}
@@ -1030,7 +1030,7 @@ be_visitor_valuetype::gen_init_defn (be_valuetype *node)
int
be_visitor_valuetype::gen_init_impl (be_valuetype *node)
{
- if (node->is_abstract_valuetype ())
+ if (node->is_abstract ())
{
return 0;
}
@@ -1135,7 +1135,7 @@ be_visitor_valuetype::determine_factory_style (be_valuetype* node)
}
idl_bool
-be_visitor_valuetype::have_operation(be_valuetype* node)
+be_visitor_valuetype::have_operation (be_valuetype* node)
{
// Check whatever scope we get for operations/attributes.
@@ -1200,35 +1200,26 @@ be_visitor_valuetype::have_operation(be_valuetype* node)
} // end of for loop
} // end of if
- //Now traverse inheritance tree.
- int i; // loop index
+ // Now traverse inheritance tree.
+ long i; // loop index
+ long n_inherits = node->n_inherits ();
+ AST_Interface **inherits = node->inherits ();
- AST_Interface *iface =
- AST_Interface::narrow_from_scope (node);
-
- for (i = 0; i < iface->n_inherits (); ++i)
+ for (i = 0; i < n_inherits; ++i)
{
- AST_Interface *inherited =
- AST_Interface::narrow_from_decl (iface->inherits ()[i]);
-
- if (!inherited || !inherited->is_valuetype())
- {
- continue;
- }
-
- be_valuetype *vt = be_valuetype::narrow_from_decl(node->inherits ()[i]);
+ be_valuetype *vt = be_valuetype::narrow_from_decl (inherits[i]);
if (vt != 0)
{
have_operation = have_operation ||
- be_visitor_valuetype::have_operation(vt);
+ be_visitor_valuetype::have_operation (vt);
- if(have_operation)
+ if (have_operation)
{
break;
}
}
- } // end of for loop
+ }
return have_operation;
}
@@ -1239,7 +1230,7 @@ be_visitor_valuetype::obv_need_ref_counter (be_valuetype* node)
// VT needs RefCounter if it has concrete factory and
// none of its base VT has ref_counter
- if (determine_factory_style(node) != FS_CONCRETE_FACTORY)
+ if (determine_factory_style (node) != FS_CONCRETE_FACTORY)
{
return 0;
}
@@ -1247,14 +1238,6 @@ be_visitor_valuetype::obv_need_ref_counter (be_valuetype* node)
// Now go thru our base VTs and see if one has already.
for (int i = 0; i < node->n_inherits (); ++i)
{
- AST_Interface *inherited =
- AST_Interface::narrow_from_decl (node->inherits ()[i]);
-
- if (!inherited || !inherited->is_valuetype ())
- {
- continue;
- }
-
be_valuetype *vt = be_valuetype::narrow_from_decl (node->inherits ()[i]);
if (vt != 0)
@@ -1274,7 +1257,7 @@ be_visitor_valuetype::obv_have_ref_counter (be_valuetype* node)
{
// Just try to find a VT with concrete factory in inheritance tree.
- if(node == 0)
+ if (node == 0)
{
return 0;
}
@@ -1287,14 +1270,6 @@ be_visitor_valuetype::obv_have_ref_counter (be_valuetype* node)
// Now go thru our base VTs.
for (int i = 0; i < node->n_inherits (); ++i)
{
- AST_Interface *inherited =
- AST_Interface::narrow_from_decl (node->inherits ()[i]);
-
- if (!inherited || !inherited->is_valuetype ())
- {
- continue;
- }
-
be_valuetype *vt = be_valuetype::narrow_from_decl (node->inherits ()[i]);
if (vt != 0)
diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_ch.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_ch.cpp
index 6cc7011d832..bd294a2f35c 100644
--- a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_ch.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_ch.cpp
@@ -112,32 +112,16 @@ be_visitor_valuetype_ch::visit_valuetype (be_valuetype *node)
*os << be_idt_nl <<": ";
int i; // loop index
- int n_inherits_valuetypes = 0;
- idl_bool valuebase_inherited = 0;
+ be_valuetype *inherited = 0;
if (node->n_inherits () > 0)
{
for (i = 0; i < node->n_inherits (); ++i)
{
- // %! move is_nested() and nested_type_name() to
- // AST_Interface, then type AST_Interface can be used
- be_interface *inherited =
- be_interface::narrow_from_decl (node->inherits ()[i]);
+ inherited =
+ be_valuetype::narrow_from_decl (node->inherits ()[i]);
- if (!inherited->is_valuetype ()
- && !inherited->is_abstract ())
- {
- continue;
- }
-
- ++ n_inherits_valuetypes;
-
- if (inherited->is_valuetype())
- {
- valuebase_inherited = 1;
- }
-
- if (n_inherits_valuetypes > 1)
+ if (i > 0)
{
*os << ",";
@@ -165,26 +149,18 @@ be_visitor_valuetype_ch::visit_valuetype (be_valuetype *node)
*os << inherited->nested_type_name (scope);
} // end of for loop
- if (n_inherits_valuetypes > 0)
+ if (i > 0)
{
- if (n_inherits_valuetypes > 1)
+ if (i > 1)
{
*os << be_uidt;
}
*os << be_uidt_nl;
- }
- }
-
- if (!valuebase_inherited)
- {
- // We do not inherit from any valuetype, hence we do so from the base
- // CORBA::ValueBase class.
- if (n_inherits_valuetypes > 1)
- {
- *os << ", ";
}
-
+ }
+ else
+ {
*os << "public virtual CORBA_ValueBase" << be_uidt_nl;
}
@@ -245,7 +221,7 @@ be_visitor_valuetype_ch::visit_valuetype (be_valuetype *node)
<< "virtual void *_tao_obv_narrow (ptr_arith_t);" << be_nl;
// Support for marshalling.
- if (!node->is_abstract_valuetype ())
+ if (!node->is_abstract ())
{
*os << "virtual CORBA::Boolean "
<< "_tao_marshal_v (TAO_OutputCDR &);" << be_nl;
@@ -281,7 +257,7 @@ be_visitor_valuetype_ch::visit_valuetype (be_valuetype *node)
}
else // Need a way to access the state of derived OBV_ classes.
{
- if (!node->is_abstract_valuetype ())
+ if (!node->is_abstract ())
{
*os << be_uidt_nl << "protected:" << be_idt_nl;
*os << "virtual CORBA::Boolean _tao_marshal__"
diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_cs.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_cs.cpp
index d9f91efc5c2..bfbecf388bd 100644
--- a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_cs.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_cs.cpp
@@ -113,39 +113,36 @@ be_visitor_valuetype_cs::visit_valuetype (be_valuetype *node)
// Find the possible base classes.
int n_inherits_downcastable = 0;
+ AST_Interface *inherited = 0;
for (int i = 0; i < node->n_inherits (); ++i)
{
- AST_Interface *inherited =
- AST_Interface::narrow_from_decl (node->inherits ()[i]);
+ inherited = node->inherits ()[i];
- if (inherited->is_valuetype())
+ ++n_inherits_downcastable;
+
+ *os << "if (rval == 0)" << be_idt_nl
+ << "rval = ";
+
+ AST_Decl::NodeType nt =
+ inherited->defined_in ()->scope_node_type ();
+
+ if (nt == AST_Decl::NT_module)
{
- ++n_inherits_downcastable;
-
- *os << "if (rval == 0)" << be_idt_nl
- << "rval = ";
-
- AST_Decl::NodeType nt =
- inherited->defined_in ()->scope_node_type ();
-
- if (nt == AST_Decl::NT_module)
- {
- be_scope *scope =
- be_scope::narrow_from_scope (inherited->defined_in ());
- be_decl *scope_decl = scope->decl ();
-
- *os << "ACE_NESTED_CLASS ("
- << scope_decl->name () << ","
- << inherited->local_name () << ")";
- }
- else
- {
- *os << inherited->name ();
- }
-
- *os << "::_tao_obv_narrow (type_id);" << be_uidt_nl;
+ be_scope *scope =
+ be_scope::narrow_from_scope (inherited->defined_in ());
+ be_decl *scope_decl = scope->decl ();
+
+ *os << "ACE_NESTED_CLASS ("
+ << scope_decl->name () << ","
+ << inherited->local_name () << ")";
}
+ else
+ {
+ *os << inherited->name ();
+ }
+
+ *os << "::_tao_obv_narrow (type_id);" << be_uidt_nl;
}
*os << "return rval;" << be_uidt_nl
@@ -162,7 +159,7 @@ be_visitor_valuetype_cs::visit_valuetype (be_valuetype *node)
// Nothing to marshal if abstract valuetype.
- if (!node->is_abstract_valuetype ())
+ if (!node->is_abstract ())
{
// The virtual _tao_marshal_v method.
*os << "CORBA::Boolean " << node->name ()
diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_init_ch.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_init_ch.cpp
index 707cabb3623..ecf8f6fc3d7 100644
--- a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_init_ch.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_init_ch.cpp
@@ -39,7 +39,7 @@ int
be_visitor_valuetype_init_ch::visit_valuetype (be_valuetype *node)
{
- if (node->is_abstract_valuetype ())
+ if (node->is_abstract ())
{
return 0;
}
diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_init_cs.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_init_cs.cpp
index dd7ae161ebd..21980d94e69 100644
--- a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_init_cs.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_init_cs.cpp
@@ -38,7 +38,7 @@ be_visitor_valuetype_init_cs::~be_visitor_valuetype_init_cs (void)
int
be_visitor_valuetype_init_cs::visit_valuetype (be_valuetype *node)
{
- if (node->is_abstract_valuetype ())
+ if (node->is_abstract ())
{
return 0;
}
diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_obv_ch.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_obv_ch.cpp
index 99b0503444b..d347f2c1fce 100644
--- a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_obv_ch.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_obv_ch.cpp
@@ -45,7 +45,7 @@ int
be_visitor_valuetype_obv_ch::visit_valuetype (be_valuetype *node)
{
// Only visit non-abstract non-imported valuetype.
- if (node->is_abstract_valuetype () || node->imported ())
+ if (node->is_abstract () || node->imported ())
{
return 0;
}
@@ -99,14 +99,14 @@ be_visitor_valuetype_obv_ch::visit_valuetype (be_valuetype *node)
//
int i = 0;
+ AST_Interface *inherited = 0;
+
for (; i < node->n_inherits (); ++i)
{
- AST_Interface *inherited =
- AST_Interface::narrow_from_decl(node->inherits ()[i]);
+ inherited = node->inherits ()[i];
- // we need only concrete valuetypes
- if (!inherited->is_valuetype ()
- || inherited->is_abstract ())
+ // We need only concrete valuetypes.
+ if (inherited->is_abstract ())
{
continue;
}
diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_obv_ci.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_obv_ci.cpp
index 6a202046cf0..40067e536c2 100644
--- a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_obv_ci.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_obv_ci.cpp
@@ -45,8 +45,10 @@ int
be_visitor_valuetype_obv_ci::visit_valuetype (be_valuetype *node)
{
// only visit non-abstract valuetype
- if (node->is_abstract_valuetype ())
- return 0;
+ if (node->is_abstract ())
+ {
+ return 0;
+ }
TAO_OutStream *os; // output stream
diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_obv_cs.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_obv_cs.cpp
index c118abf5898..405d204cb0f 100644
--- a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_obv_cs.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_obv_cs.cpp
@@ -45,16 +45,19 @@ int
be_visitor_valuetype_obv_cs::visit_valuetype (be_valuetype *node)
{
// only visit non-abstract non-imported valuetype
- if (node->is_abstract_valuetype () || node->imported ())
- return 0;
+ if (node->is_abstract () || node->imported ())
+ {
+ return 0;
+ }
TAO_OutStream *os = this->ctx_->stream ();
// OBV_ class has no accessors or modifiers if we are optimizing
// or the valuetype is abstract.
- if (!(node->opt_accessor () || node->is_abstract_valuetype () ))
+ if (!(node->opt_accessor () || node->is_abstract ()))
{
os->indent ();
+
*os << "CORBA::Boolean " << be_nl
<< node->full_obv_skel_name ()
<< "::_tao_marshal__" << node->flat_name ()
diff --git a/TAO/TAO_IDL/be_include/Makefile.am b/TAO/TAO_IDL/be_include/Makefile.am
index 86d6a401dbd..95fe395700a 100644
--- a/TAO/TAO_IDL/be_include/Makefile.am
+++ b/TAO/TAO_IDL/be_include/Makefile.am
@@ -41,10 +41,12 @@ noinst_HEADERS = \
be_stream_factory.h \
be_string.h \
be_structure.h \
+ be_structure_fwd.h \
be_sunsoft.h \
be_type.h \
be_typedef.h \
be_union.h \
+ be_union_fwd.h \
be_union_branch.h \
be_union_label.h \
be_valuetype.h \
diff --git a/TAO/TAO_IDL/be_include/be_generator.h b/TAO/TAO_IDL/be_include/be_generator.h
index a42f89107d8..1815a129786 100644
--- a/TAO/TAO_IDL/be_include/be_generator.h
+++ b/TAO/TAO_IDL/be_include/be_generator.h
@@ -102,11 +102,20 @@ public:
idl_bool local,
idl_bool abstract);
- virtual AST_Interface *create_valuetype (UTL_ScopedName *n,
- AST_Interface **ih,
- long nih);
-
- virtual AST_InterfaceFwd *create_valuetype_fwd (UTL_ScopedName *n);
+ virtual AST_ValueType *create_valuetype (UTL_ScopedName *n,
+ AST_Interface **inherits,
+ long n_inherits,
+ AST_ValueType *inherits_concrete,
+ AST_Interface **inherits_flat,
+ long n_inherits_flat,
+ AST_Interface **supports,
+ long n_supports,
+ AST_Interface *supports_concrete,
+ idl_bool abstract,
+ idl_bool truncatable);
+
+ virtual AST_ValueTypeFwd *create_valuetype_fwd (UTL_ScopedName *n,
+ idl_bool abstract);
virtual AST_Exception *create_exception (UTL_ScopedName *n,
idl_bool local,
diff --git a/TAO/TAO_IDL/be_include/be_valuetype.h b/TAO/TAO_IDL/be_include/be_valuetype.h
index 80cd1429a1c..322f298f69a 100644
--- a/TAO/TAO_IDL/be_include/be_valuetype.h
+++ b/TAO/TAO_IDL/be_include/be_valuetype.h
@@ -19,11 +19,13 @@
#define TAO_BE_VALUETYPE_H
#include "be_interface.h"
+#include "ast_valuetype.h"
#include "ast_field.h"
class TAO_OutStream;
-class be_valuetype : public virtual be_interface
+class be_valuetype : public virtual be_interface,
+ public virtual AST_ValueType
{
// = TITLE
// Backend-class for valuetypes
@@ -37,17 +39,23 @@ public:
// Default constructor.
be_valuetype (UTL_ScopedName *n,
- AST_Interface **ih,
- long nih,
- idl_bool set_abstract = 0);
+ AST_Interface **inherits,
+ long n_inherits,
+ AST_ValueType *inherits_concrete,
+ AST_Interface **inherits_flat,
+ long n_inherits_flat,
+ AST_Interface **supports,
+ long n_supports,
+ AST_Interface *supports_concrete,
+ idl_bool abstract,
+ idl_bool truncatable);
// Constructor that sets its scoped name <n>, a list of inherited valuetypes
- // and supported interfaces <ih>, the number of inherited interfaces <nih>,
- // and any pragmas <p>.
+ // and supported interfaces <ih>, and the number of inherited interfaces <nih>
~be_valuetype (void);
// Destructor.
- virtual void redefine (AST_Interface *from);
+ virtual void redefine (AST_ValueType *from);
idl_bool opt_accessor (void);
// Should generate optimized form?
@@ -67,15 +75,15 @@ public:
// Generate the _out implementation.
virtual int gen_helper_header (char *local_name = 0,
- char *full_name = 0);
+ char *full_name = 0);
// Generate the helper functions definition.
virtual int gen_helper_inline (char *local_name = 0,
- char *full_name = 0);
+ char *full_name = 0);
// Generate the helper functions inline implementation.
virtual int gen_helper_stubs (char *local_name = 0,
- char *full_name = 0);
+ char *full_name = 0);
// Generate the helper functions implementation.
const char *full_obv_skel_name (void);
@@ -91,8 +99,11 @@ public:
// Visiting.
virtual int accept (be_visitor *visitor);
+ // Cleanup.
+ virtual void destroy (void);
+
// Narrowing.
- DEF_NARROW_METHODS1 (be_valuetype, be_interface);
+ DEF_NARROW_METHODS2 (be_valuetype, be_interface, AST_ValueType);
DEF_NARROW_FROM_DECL (be_valuetype);
DEF_NARROW_FROM_SCOPE (be_valuetype);
diff --git a/TAO/TAO_IDL/be_include/be_valuetype_fwd.h b/TAO/TAO_IDL/be_include/be_valuetype_fwd.h
index 61f483a8892..1de0fc25b44 100644
--- a/TAO/TAO_IDL/be_include/be_valuetype_fwd.h
+++ b/TAO/TAO_IDL/be_include/be_valuetype_fwd.h
@@ -25,8 +25,10 @@
#define BE_VALUETYPE_FWD_H
#include "be_interface_fwd.h"
+#include "ast_valuetype_fwd.h"
-class be_valuetype_fwd : public virtual be_interface_fwd
+class be_valuetype_fwd : public virtual be_interface_fwd,
+ public virtual AST_ValueTypeFwd
{
// =TITLE
// be_valuetype_fwd
@@ -44,13 +46,14 @@ public:
virtual ~be_valuetype_fwd (void);
// Destructor.
- virtual void set_abstract_valuetype (void);
-
// Visiting.
virtual int accept (be_visitor* visitor);
+ // Cleanup
+ virtual void destroy (void);
+
// Narrowing.
- DEF_NARROW_METHODS1 (be_valuetype_fwd, be_interface_fwd);
+ DEF_NARROW_METHODS2 (be_valuetype_fwd, be_interface_fwd, AST_ValueTypeFwd);
DEF_NARROW_FROM_DECL (be_valuetype_fwd);
};
diff --git a/TAO/TAO_IDL/be_include/be_visitor_argument.h b/TAO/TAO_IDL/be_include/be_visitor_argument.h
index 4a5e57a4c2c..9de37aa8bba 100644
--- a/TAO/TAO_IDL/be_include/be_visitor_argument.h
+++ b/TAO/TAO_IDL/be_include/be_visitor_argument.h
@@ -22,7 +22,7 @@
#ifndef _BE_VISITOR_ARGUMENT_H
#define _BE_VISITOR_ARGUMENT_H
-#include "be_visitor_decl.h"
+#include "be_visitor_scope.h"
#include "be_visitor_argument/argument.h"
#include "be_visitor_argument/arglist.h"
#include "be_visitor_argument/vardecl_ss.h"
diff --git a/TAO/TAO_IDL/be_include/be_visitor_argument/post_upcall_ss.h b/TAO/TAO_IDL/be_include/be_visitor_argument/post_upcall_ss.h
index 19a700546c8..32ff63812a7 100644
--- a/TAO/TAO_IDL/be_include/be_visitor_argument/post_upcall_ss.h
+++ b/TAO/TAO_IDL/be_include/be_visitor_argument/post_upcall_ss.h
@@ -27,7 +27,7 @@
// class be_visitor_args_post_upcall_ss
// ************************************************************
-class be_visitor_args_post_upcall_ss : public be_visitor_args
+class be_visitor_args_post_upcall_ss : public be_visitor_scope
{
//
// = TITLE
diff --git a/TAO/TAO_IDL/driver/Makefile.am b/TAO/TAO_IDL/driver/Makefile.am
index 0a03613982e..9dfb189c2ab 100644
--- a/TAO/TAO_IDL/driver/Makefile.am
+++ b/TAO/TAO_IDL/driver/Makefile.am
@@ -22,11 +22,8 @@ noinst_LTLIBRARIES = libdriver.la
libdriver_la_SOURCES = \
drv_args.cpp \
- drv_fork.cpp \
- drv_init.cpp \
- drv_link.cpp \
drv_preproc.cpp \
- drv_private.cpp
+ tao_idl.cpp
## Additional C++ preprocessor flags to define for the TAO IDL compiler.
AM_CPPFLAGS = \
diff --git a/TAO/TAO_IDL/fe/Makefile.am b/TAO/TAO_IDL/fe/Makefile.am
index f7074e41070..728634a90a1 100644
--- a/TAO/TAO_IDL/fe/Makefile.am
+++ b/TAO/TAO_IDL/fe/Makefile.am
@@ -20,6 +20,7 @@ noinst_LTLIBRARIES = libfe.la
libfe_la_SOURCES = \
fe_declarator.cpp \
fe_extern.cpp \
+ fe_global.cpp \
fe_init.cpp \
fe_interface_header.cpp \
fe_lookup.cpp \
diff --git a/TAO/TAO_IDL/fe/fe_interface_header.cpp b/TAO/TAO_IDL/fe/fe_interface_header.cpp
index 169ec4da8eb..c95346a5434 100644
--- a/TAO/TAO_IDL/fe/fe_interface_header.cpp
+++ b/TAO/TAO_IDL/fe/fe_interface_header.cpp
@@ -67,9 +67,10 @@ trademarks or registered trademarks of Sun Microsystems, Inc.
// FE_InterfaceHeader instances are used to store information about an
// interface header as the interface is being parsed and before the
// AST_Interface node used to represent this interface is created.
+// Same for FE_obv_header.
#include "fe_interface_header.h"
-#include "ast_interface.h"
+#include "ast_valuetype.h"
#include "ast_module.h"
#include "utl_namelist.h"
#include "utl_err.h"
@@ -80,29 +81,6 @@ ACE_RCSID (fe,
fe_interface_header,
"$Id$")
-FE_InterfaceHeader::FE_InterfaceHeader (UTL_ScopedName *n,
- UTL_NameList *nl,
- UTL_NameList *supports,
- idl_bool compile_now)
- : pd_interface_name (n),
- pd_inherits (0),
- pd_n_inherits (0),
- pd_inherits_flat (0),
- pd_n_inherits_flat (0)
-{
- if (compile_now)
- {
- compile_inheritance (nl,
- supports);
- }
-}
-
-FE_InterfaceHeader::~FE_InterfaceHeader (void)
-{
-}
-
-// Compute flattened, non-repeating list of inherited interfaces
-
#undef INCREMENT
#define INCREMENT 512
@@ -142,7 +120,7 @@ add_inheritance (AST_Interface *i)
ACE_NEW (iseen,
AST_Interface *[iallocated]);
- for (long k = 0; k < iused; k++)
+ for (long k = 0; k < iused; ++k)
{
iseen[k] = oiseen[k];
}
@@ -196,7 +174,7 @@ add_inheritance_flat (AST_Interface *i)
static long
already_seen (AST_Interface *ip)
{
- for (long i = 0; i < iused; i++)
+ for (long i = 0; i < iused; ++i)
{
if (iseen[i] == ip)
{
@@ -211,7 +189,7 @@ already_seen (AST_Interface *ip)
static long
already_seen_flat (AST_Interface *ip)
{
- for (long i = 0; i < iused_flat; i++)
+ for (long i = 0; i < iused_flat; ++i)
{
if (iseen_flat[i] == ip)
{
@@ -222,16 +200,85 @@ already_seen_flat (AST_Interface *ip)
return I_FALSE;
}
+// @@@ (JP) Here are the rules for interface inheritance and
+// value type inheritance and supports, straight from Jonathan
+// Biggar <jon@floorboard.com> as of 3/28/02. The following was
+// resolved by the OMG, but is not yet part of an official spec.
+
+/*
+An interface can inherit from any number of other interfaces, abstract
+or not.
+
+An abstract interface can only inherit from other abstract interfaces.
+
+An abstract valuetype can inherit from any number of abstract
+valuetypes. It may support one interface, and in addition, any number
+of abstract interfaces.
+
+A concrete valuetype can inherit from only one concrete valuetype. It
+may inherit from any number of abstract valuetypes. It may support one
+interface, and any number of abstract interfaces.
+
+The single concrete inherited valuetype must be the first one in the
+inheritance list.
+
+The single supported interface (for valuetypes) must also be the first
+in the "supports" list.
+
+And one more important clarification, if a base valuetype supports an
+interface, a derived valuetype may also be declared to support an
+interface, as long as it is derived from all interfaces that are
+supported by any base valuetypes. Here is an example:
+
+interface I1 { };
+interface I2 { };
+interface I3: I1, I2 { };
+
+abstract valuetype V1 supports I1 { };
+abstract valuetype V2 supports I2 { };
+valuetype V3: V1, V2 supports I3 { }; // legal
+valuetype V4: V1 supports I2 { }; // illegal
+
+This last rule was made to guarantee that any given valuetype supported
+at most one most-derived interface. We didn't want valuetypes to extend
+the OMG model through the backdoor by providing multiple non-related
+interfaces.
+*/
+
+FE_InterfaceHeader::FE_InterfaceHeader (UTL_ScopedName *n,
+ UTL_NameList *inherits,
+ idl_bool is_local,
+ idl_bool is_abstract,
+ idl_bool compile_now)
+ : pd_interface_name (n),
+ pd_inherits (0),
+ pd_n_inherits (0),
+ pd_inherits_flat (0),
+ pd_n_inherits_flat (0),
+ pd_is_local (is_local),
+ pd_is_abstract (is_abstract)
+{
+ if (compile_now)
+ {
+ this->compile_inheritance (inherits,
+ I_FALSE);
+ }
+}
+
+FE_InterfaceHeader::~FE_InterfaceHeader (void)
+{
+}
+
idl_bool
-FE_InterfaceHeader::is_local (void)
+FE_InterfaceHeader::is_local (void) const
{
- return 0;
+ return this->pd_is_local;
}
idl_bool
-FE_InterfaceHeader::is_abstract (void)
+FE_InterfaceHeader::is_abstract (void) const
{
- return 0;
+ return this->pd_is_abstract;
}
// Add this interface to the list of inherited if not already there.
@@ -263,7 +310,7 @@ FE_InterfaceHeader::compile_one_inheritance (AST_Interface *i)
AST_Interface **parents = i->inherits ();
long num_parents = i->n_inherits ();
- for (long j = 0; j < num_parents; j++)
+ for (long j = 0; j < num_parents; ++j)
{
AST_Interface *tmp = parents[j];
@@ -279,16 +326,19 @@ FE_InterfaceHeader::compile_one_inheritance (AST_Interface *i)
// Compute the list of top-level interfaces this one inherits from.
void
FE_InterfaceHeader::compile_inheritance (UTL_NameList *ifaces,
- UTL_NameList *supports)
+ idl_bool for_valuetype)
{
+ if (ifaces == 0)
+ {
+ return;
+ }
+
AST_Decl *d = 0;
- UTL_ScopedName *item;
+ UTL_ScopedName *item = 0;;
AST_Interface *i = 0;
- long j, k;
- UTL_NameList *nl = ifaces;
- long ichecked = 0;
+ long j = 0;
+ long k = 0;
idl_bool inh_err = 0;
- idl_bool in_supports = 0;
iused = 0;
iused_flat = 0;
@@ -296,111 +346,85 @@ FE_InterfaceHeader::compile_inheritance (UTL_NameList *ifaces,
// Compute expanded flattened non-repeating list of interfaces
// which this one inherits from.
- // Loop twice if nl and supports are nonempty.
- for (int loops = 0; loops < 2; ++loops)
+ for (UTL_NamelistActiveIterator l (ifaces); !l.is_done (); l.next ())
{
- if (nl != 0)
- {
- for (UTL_NamelistActiveIterator l (nl); !l.is_done (); l.next ())
- {
- item = l.item ();
+ item = l.item ();
- // Check that scope stack is valid.
- if (idl_global->scopes ().top () == 0)
- {
- idl_global->err ()->lookup_error (item);
- return;
- }
-
- // Look it up.
- UTL_Scope *s = idl_global->scopes ().top ();
+ // Check that scope stack is valid.
+ if (idl_global->scopes ().top () == 0)
+ {
+ idl_global->err ()->lookup_error (item);
+ return;
+ }
- d = s->lookup_by_name (item,
- I_TRUE);
+ // Look it up.
+ UTL_Scope *s = idl_global->scopes ().top ();
- if (d == 0)
- {
- AST_Decl *sad = ScopeAsDecl (s);
+ d = s->lookup_by_name (item,
+ I_TRUE);
- if (sad->node_type () == AST_Decl::NT_module)
- {
- AST_Module *m = AST_Module::narrow_from_decl (sad);
+ if (d == 0)
+ {
+ AST_Decl *sad = ScopeAsDecl (s);
- d = m->look_in_previous (item->last_component ());
- }
- }
+ if (sad->node_type () == AST_Decl::NT_module)
+ {
+ AST_Module *m = AST_Module::narrow_from_decl (sad);
- // Not found?
- if (d == 0)
- {
- idl_global->err ()->lookup_error (item);
- return;
- }
+ d = m->look_in_previous (item->last_component ());
+ }
+ }
- // Not an appropriate interface?
- while (d->node_type () == AST_Decl::NT_typedef)
- {
- d = AST_Typedef::narrow_from_decl (d)->base_type ();
- }
+ // Not found?
+ if (d == 0)
+ {
+ idl_global->err ()->lookup_error (item);
+ return;
+ }
- if (d->node_type () == AST_Decl::NT_interface)
- {
- i = AST_Interface::narrow_from_decl (d);
- }
- else
- {
- i = 0;
- }
+ // Not an appropriate interface?
+ while (d->node_type () == AST_Decl::NT_typedef)
+ {
+ d = AST_Typedef::narrow_from_decl (d)->base_type ();
+ }
- if (i != 0)
- {
- if (in_supports)
- {
- inh_err = !this->check_supports (i);
- }
- else
- {
- if (ichecked == 0)
- {
- inh_err = !this->check_first (i);
- }
- else
- {
- inh_err = !this->check_further (i);
- }
- }
- }
- else
- {
- inh_err = 1;
- }
+ i = AST_Interface::narrow_from_decl (d);
- if (inh_err)
- {
- idl_global->err ()->inheritance_error (pd_interface_name,
- d);
- return; // @@ really ? inh_err=0; and test the remaining...?
- }
+ if (i != 0)
+ {
+ inh_err = !this->check_inherit (i,
+ for_valuetype);
+ }
+ else
+ {
+ inh_err = 1;
+ }
- // Forward declared interface?
- if (!i->is_defined ())
- {
- idl_global->err ()->inheritance_fwd_error (pd_interface_name,
- i);
- return;
- }
+ if (inh_err)
+ {
+ idl_global->err ()->inheritance_error (this->pd_interface_name,
+ d);
+ inh_err = 0;
+ continue;
+ }
- // OK, see if we have to add this to the list of interfaces
- // inherited from.
- this->compile_one_inheritance (i);
+ // Forward declared interface?
+ if (!i->is_defined ())
+ {
+ idl_global->err ()->inheritance_fwd_error (this->pd_interface_name,
+ i);
+ continue;
+ }
- // Next element in header list.
- ++ichecked;
- }
+ if (!for_valuetype && this->pd_is_abstract && !i->is_abstract ())
+ {
+ idl_global->err ()->abstract_inheritance_error (this->name (),
+ i->name ());
}
- in_supports = 1;
- nl = supports;
+ // OK, see if we have to add this to the list of interfaces
+ // inherited from.
+ this->compile_one_inheritance (i);
}
// OK, install in interface header.
@@ -408,9 +432,9 @@ FE_InterfaceHeader::compile_inheritance (UTL_NameList *ifaces,
if (iused_flat > 0)
{
ACE_NEW (this->pd_inherits_flat,
- AST_Interface *[iused_flat]);;
+ AST_Interface *[iused_flat]);
- for (j = 0; j < iused_flat; j++)
+ for (j = 0; j < iused_flat; ++j)
{
this->pd_inherits_flat[j] = iseen_flat[j];
}
@@ -424,7 +448,7 @@ FE_InterfaceHeader::compile_inheritance (UTL_NameList *ifaces,
ACE_NEW (this->pd_inherits,
AST_Interface *[iused]);
- for (k = 0; k < iused; k++)
+ for (k = 0; k < iused; ++k)
{
this->pd_inherits[k] = iseen[k];
}
@@ -433,21 +457,15 @@ FE_InterfaceHeader::compile_inheritance (UTL_NameList *ifaces,
}
}
-// check_ methods called from compile_inheritance()
-// overridden in derived classes.
idl_bool
-FE_InterfaceHeader::check_first (AST_Interface *i)
+FE_InterfaceHeader::check_inherit (AST_Interface *i,
+ idl_bool for_valuetype)
{
- // Nothing special for the first.
- return this->check_further (i);
-}
+ idl_bool is_valuetype = (i->node_type () == AST_Decl::NT_valuetype);
-idl_bool
-FE_InterfaceHeader::check_further (AST_Interface *i)
-{
if (i != 0
- && !i->is_valuetype ()
- && (this->is_local () || !i->is_local ()))
+ && !(for_valuetype ^ is_valuetype)
+ && (this->pd_is_local || !i->is_local ()))
{
return 1;
}
@@ -457,148 +475,256 @@ FE_InterfaceHeader::check_further (AST_Interface *i)
}
}
-idl_bool
-FE_InterfaceHeader::check_supports (AST_Interface *)
-{
- return 0;
-}
-
// Data accessors.
UTL_ScopedName *
-FE_InterfaceHeader::interface_name (void)
+FE_InterfaceHeader::name (void) const
{
return this->pd_interface_name;
}
AST_Interface **
-FE_InterfaceHeader::inherits (void)
+FE_InterfaceHeader::inherits (void) const
{
return this->pd_inherits;
}
long
-FE_InterfaceHeader::n_inherits (void)
+FE_InterfaceHeader::n_inherits (void) const
{
return this->pd_n_inherits;
}
AST_Interface **
-FE_InterfaceHeader::inherits_flat (void)
+FE_InterfaceHeader::inherits_flat (void) const
{
return this->pd_inherits_flat;
}
long
-FE_InterfaceHeader::n_inherits_flat (void)
+FE_InterfaceHeader::n_inherits_flat (void) const
{
return this->pd_n_inherits_flat;
}
-FE_Local_InterfaceHeader::FE_Local_InterfaceHeader (UTL_ScopedName *n,
- UTL_NameList *nl,
- UTL_NameList *supports)
+FE_obv_header::FE_obv_header (UTL_ScopedName *n,
+ UTL_NameList *inherits,
+ UTL_NameList *supports,
+ idl_bool truncatable)
: FE_InterfaceHeader (n,
- nl,
- supports,
- 0)
+ inherits,
+ I_FALSE,
+ I_FALSE,
+ I_FALSE),
+ pd_supports (0),
+ pd_inherits_concrete (0),
+ pd_supports_concrete (0),
+ pd_truncatable (truncatable)
{
- compile_inheritance (nl,
- supports);
+ this->compile_inheritance (inherits,
+ I_TRUE);
+
+ if (this->pd_n_inherits > 0)
+ {
+ AST_Interface *iface = this->pd_inherits[0];
+
+ if (!iface->is_abstract ())
+ {
+ this->pd_inherits_concrete =
+ AST_ValueType::narrow_from_decl (iface);
+ }
+
+ for (long i = 1; i < this->pd_n_inherits; ++i)
+ {
+ iface = this->pd_inherits[i];
+
+ if (!iface->is_abstract ())
+ {
+ idl_global->err ()->abstract_inheritance_error (
+ this->name (),
+ iface->name ()
+ );
+ }
+ }
+ }
+
+ if (idl_global->err_count () == 0)
+ {
+ this->compile_supports (supports);
+ }
}
-idl_bool
-FE_Local_InterfaceHeader::is_local (void)
+FE_obv_header::~FE_obv_header (void)
{
- return 1;
}
-FE_Abstract_InterfaceHeader::FE_Abstract_InterfaceHeader (UTL_ScopedName *n,
- UTL_NameList *nl,
- UTL_NameList *supports)
-
- : FE_InterfaceHeader (n,
- nl,
- supports,
- 0)
+AST_Interface **
+FE_obv_header::supports (void) const
{
- compile_inheritance (nl,
- supports);
+ return this->pd_supports;
}
-idl_bool
-FE_Abstract_InterfaceHeader::is_abstract (void)
+long
+FE_obv_header::n_supports (void) const
{
- return 1;
+ return this->pd_n_supports;
}
-// FE_obv_header.
+AST_ValueType *
+FE_obv_header::inherits_concrete (void) const
+{
+ return this->pd_inherits_concrete;
+}
-FE_obv_header::FE_obv_header (UTL_ScopedName *n,
- UTL_NameList *nl,
- UTL_NameList *supports)
- : FE_InterfaceHeader (n,
- nl,
- supports,
- 0),
- truncatable_ (0),
- n_concrete_ (0)
+AST_Interface *
+FE_obv_header::supports_concrete (void) const
{
- compile_inheritance (nl,
- supports);
+ return this->pd_supports_concrete;
}
-// check_ methods called from compile_inheritance().
idl_bool
-FE_obv_header::check_first (AST_Interface *i)
+FE_obv_header::truncatable (void) const
{
- if (i != 0 && i->is_valuetype ())
- {
- if (!i->is_abstract_valuetype ())
- {
- ++this->n_concrete_;
- }
-
- return 1;
- }
- else
- {
- return 0;
- }
+ return this->pd_truncatable;
}
-idl_bool
-FE_obv_header::check_further (AST_Interface *i)
+void
+FE_obv_header::compile_supports (UTL_NameList *supports)
{
- if (i != 0
- && i->is_valuetype ()
- && i->is_abstract_valuetype ())
+ if (supports == 0)
{
- return 1;
+ this->pd_supports = 0;
+ this->pd_n_supports = 0;
+ return;
}
- else
+
+ long length = supports->length ();
+ this->pd_n_supports = length;
+ ACE_NEW (this->pd_supports,
+ AST_Interface *[length]);
+
+ AST_Decl *d = 0;
+ UTL_ScopedName *item = 0;;
+ AST_Interface *iface = 0;
+ int i = 0;
+
+ for (UTL_NamelistActiveIterator l (supports); !l.is_done (); l.next ())
{
- return 0;
+ item = l.item ();
+
+ // Check that scope stack is valid.
+ if (idl_global->scopes ().top () == 0)
+ {
+ idl_global->err ()->lookup_error (item);
+ return;
+ }
+
+ // Look it up.
+ UTL_Scope *s = idl_global->scopes ().top ();
+
+ d = s->lookup_by_name (item,
+ I_TRUE);
+
+ if (d == 0)
+ {
+ AST_Decl *sad = ScopeAsDecl (s);
+
+ if (sad->node_type () == AST_Decl::NT_module)
+ {
+ AST_Module *m = AST_Module::narrow_from_decl (sad);
+
+ d = m->look_in_previous (item->last_component ());
+ }
+ }
+
+ // Not found?
+ if (d == 0)
+ {
+ idl_global->err ()->lookup_error (item);
+ return;
+ }
+
+ // Remove typedefs, if any.
+ while (d->node_type () == AST_Decl::NT_typedef)
+ {
+ d = AST_Typedef::narrow_from_decl (d)->base_type ();
+ }
+
+ if (d->node_type () == AST_Decl::NT_interface)
+ {
+ iface = AST_Interface::narrow_from_decl (d);
+ }
+ else
+ {
+ idl_global->err ()->supports_error (pd_interface_name,
+ d);
+ continue;
+ }
+
+ // Forward declared interface?
+ if (!iface->is_defined ())
+ {
+ idl_global->err ()->supports_fwd_error (pd_interface_name,
+ iface);
+ continue;
+ }
+
+ if (!iface->is_abstract ())
+ {
+ if (i == 0)
+ {
+ this->pd_supports_concrete = iface;
+
+ if (this->check_concrete_supported_inheritance (iface) != 0)
+ {
+ idl_global->err ()->concrete_supported_inheritance_error (
+ this->name (),
+ iface->name ()
+ );
+ }
+ }
+ else
+ {
+ idl_global->err ()->abstract_support_error (this->name (),
+ iface->name ());
+ continue;
+ }
+ }
+
+ this->pd_supports[i++] = iface;
}
}
-idl_bool
-FE_obv_header::check_supports (AST_Interface *i)
+idl_bool
+FE_obv_header::check_concrete_supported_inheritance (AST_Interface *d)
{
- if (i && !i->is_valuetype ())
- {
- return 1;
- }
- else
+ AST_ValueType *vt = 0;
+ AST_Interface *concrete = 0;
+ AST_Interface **ancestors = 0;
+ AST_Interface *ancestor = 0;
+ long n_ancestors = 0;
+
+ for (long i = 0; i < this->pd_n_inherits; ++i)
{
- return 0;
- }
-}
+ vt = AST_ValueType::narrow_from_decl (this->pd_inherits[i]);
+ concrete = vt->supports_concrete ();
+ if (concrete != 0)
+ {
+ ancestors = concrete->inherits_flat ();
+ n_ancestors = concrete->n_inherits_flat ();
-long
-FE_obv_header::n_concrete (void)
-{
- return this->n_concrete_;
-}
+ for (long j = 0; j < n_ancestors; ++j)
+ {
+ ancestor = ancestors[j];
+ if (!d->is_child (ancestor))
+ {
+ return 1;
+ }
+ }
+ }
+ }
+
+ return 0;
+}
diff --git a/TAO/TAO_IDL/fe/idl.yy b/TAO/TAO_IDL/fe/idl.yy
index 27f5d493517..5c8bece4c6b 100644
--- a/TAO/TAO_IDL/fe/idl.yy
+++ b/TAO/TAO_IDL/fe/idl.yy
@@ -86,8 +86,8 @@ trademarks or registered trademarks of Sun Microsystems, Inc.
#include "utl_err.h"
#include "ast_generator.h"
#include "ast_module.h"
-#include "ast_interface.h"
-#include "ast_interface_fwd.h"
+#include "ast_valuetype.h"
+#include "ast_valuetype_fwd.h"
#include "utl_string.h"
#include "ast_constant.h"
#include "fe_declarator.h"
@@ -384,6 +384,36 @@ definition
// ';'
idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
}
+ | component
+ {
+// | component
+ idl_global->set_parse_state (IDL_GlobalData::PS_ComponentSeen);
+ }
+ ';'
+ {
+// ';'
+ idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
+ }
+ | home_decl
+ {
+// | home_decl
+ idl_global->set_parse_state (IDL_GlobalData::PS_HomeDeclSeen);
+ }
+ ';'
+ {
+// ';'
+ idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
+ }
+ | event
+ {
+// | event
+ idl_global->set_parse_state (IDL_GlobalData::PS_EventSeen);
+ }
+ ';'
+ {
+// ';'
+ idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
+ }
| error
{
// | error
@@ -466,7 +496,7 @@ interface :
{
i =
idl_global->gen ()->create_interface (
- $1->interface_name (),
+ $1->name (),
$1->inherits (),
$1->n_inherits (),
$1->inherits_flat (),
@@ -488,7 +518,7 @@ interface :
idl_global->scopes ().push (i);
// This FE_InterfaceHeader class isn't destroyed with the AST.
- $1->interface_name ()->destroy ();
+ $1->name ()->destroy ();
delete $1;
$1 = 0;
}
@@ -544,7 +574,10 @@ interface_header :
0);
ACE_NEW_RETURN ($$,
FE_InterfaceHeader (&n,
- $2),
+ $2,
+ I_FALSE,
+ I_FALSE,
+ I_TRUE),
1);
}
|
@@ -563,7 +596,10 @@ interface_header :
0);
ACE_NEW_RETURN ($$,
FE_InterfaceHeader (&n,
- $3),
+ $3,
+ I_TRUE,
+ I_FALSE,
+ I_TRUE),
1);
}
|
@@ -625,28 +661,39 @@ value_concrete_decl :
{
// value_concrete_decl : value_header
UTL_Scope *s = idl_global->scopes ().top_non_null ();
+ AST_ValueType *v = 0;
AST_Interface *i = 0;
if (s != 0 && $1 != 0)
{
- i =
+ v =
idl_global->gen ()->create_valuetype (
- $1->interface_name (),
- $1->inherits (),
- $1->n_inherits ()
- );
+ $1->name (),
+ $1->inherits (),
+ $1->n_inherits (),
+ $1->inherits_concrete (),
+ $1->inherits_flat (),
+ $1->n_inherits_flat (),
+ $1->supports (),
+ $1->n_supports (),
+ $1->supports_concrete (),
+ I_FALSE,
+ $1->truncatable ()
+ );
+ i = AST_Interface::narrow_from_decl (v);
AST_Interface::fwd_redefinition_helper (i,
s);
+ v = AST_ValueType::narrow_from_decl (i);
/*
* Add the valuetype to its definition scope
*/
- (void) s->fe_add_interface (i);
+ (void) s->fe_add_valuetype (v);
}
/*
* Push it on the scope stack
*/
- idl_global->scopes ().push (i);
+ idl_global->scopes ().push (v);
}
'{'
{
@@ -679,36 +726,39 @@ value_abs_decl :
{
// value_abs_decl : IDL_ABSTRACT value_header
UTL_Scope *s = idl_global->scopes ().top_non_null ();
+ AST_Valuetype *v = 0;
AST_Interface *i = 0;
if (s != 0 && $2 != 0)
{
- if ($2->n_concrete() > 0)
- {
- idl_global->err ()->abstract_inheritance_error (
- $2->interface_name ()
- );
- }
-
- i =
+ v =
idl_global->gen ()->create_valuetype (
- $2->interface_name (),
- $2->inherits (),
- $2->n_inherits ()
- );
- i->set_abstract_valuetype ();
+ $2->name (),
+ $2->inherits (),
+ $2->n_inherits (),
+ $2->inherits_concrete (),
+ $2->inherits_flat (),
+ $2->n_inherits_flat (),
+ $2->supports (),
+ $2->n_supports (),
+ $2->supports_concrete (),
+ I_TRUE,
+ I_FALSE
+ );
+ i = AST_Interface::narrow_from_decl (v);
AST_Interface::fwd_redefinition_helper (i,
s);
+ v = AST_ValueType::narrow_from_decl (i);
/*
* Add the valuetype to its definition scope
*/
- (void) s->fe_add_interface (i);
+ (void) s->fe_add_valuetype (v);
}
/*
* Push it on the scope stack.
*/
- idl_global->scopes ().push (i);
+ idl_global->scopes ().push (v);
}
'{'
{
@@ -750,7 +800,8 @@ value_header :
ACE_NEW_RETURN ($$,
FE_obv_header (sn,
$3,
- $4),
+ $4,
+ $2),
1);
}
;
@@ -791,13 +842,10 @@ opt_truncatable :
supports_spec :
IDL_SUPPORTS
- scoped_name
+ at_least_one_scoped_name
{
-// supports_spec : IDL_SUPPORTS scoped_name
- ACE_NEW_RETURN ($$,
- UTL_NameList ($2,
- 0),
- 1);
+// supports_spec : IDL_SUPPORTS at_least_one_scoped_name
+ $$ = $2;
}
| /* EMPTY */
{
@@ -814,8 +862,8 @@ value_forward_decl :
UTL_Scope *s = idl_global->scopes ().top_non_null ();
UTL_ScopedName n ($2,
0);
- AST_InterfaceFwd *f = 0;
- idl_global->set_parse_state (IDL_GlobalData::PS_InterfaceForwardSeen);
+ AST_ValueTypeFwd *f = 0;
+ idl_global->set_parse_state (IDL_GlobalData::PS_ValuetypeForwardSeen);
/*
* Create a node representing a forward declaration of an
@@ -823,9 +871,9 @@ value_forward_decl :
*/
if (s != 0)
{
- f = idl_global->gen()->create_valuetype_fwd (&n);
- f->set_abstract_valuetype ();
- (void) s->fe_add_interface_fwd (f);
+ f = idl_global->gen ()->create_valuetype_fwd (&n,
+ I_TRUE);
+ (void) s->fe_add_valuetype_fwd (f);
}
}
|
@@ -835,8 +883,8 @@ value_forward_decl :
UTL_Scope *s = idl_global->scopes ().top_non_null ();
UTL_ScopedName n ($1,
0);
- AST_InterfaceFwd *f = 0;
- idl_global->set_parse_state (IDL_GlobalData::PS_InterfaceForwardSeen);
+ AST_ValueTypeFwd *f = 0;
+ idl_global->set_parse_state (IDL_GlobalData::PS_ValuetypeForwardSeen);
/*
* Create a node representing a forward declaration of an
@@ -844,8 +892,9 @@ value_forward_decl :
*/
if (s != 0)
{
- f = idl_global->gen ()->create_valuetype_fwd (&n);
- (void) s->fe_add_interface_fwd (f);
+ f = idl_global->gen ()->create_valuetype_fwd (&n,
+ I_FALSE);
+ (void) s->fe_add_valuetype_fwd (f);
}
}
;
@@ -1086,7 +1135,7 @@ scoped_name
}
;
-id: IDENTIFIER
+id : IDENTIFIER
{
// id: IDENTIFIER
ACE_NEW_RETURN ($$,
@@ -2661,7 +2710,7 @@ element_spec :
struct_forward_type
: struct_decl
{
-// struct_forward_type : struct_header
+// struct_forward_type : struct_decl
UTL_Scope *s = idl_global->scopes ().top_non_null ();
UTL_ScopedName n ($1,
0);
@@ -2681,6 +2730,7 @@ struct_forward_type
union_forward_type
: union_decl
{
+// union_forward_type : union_decl
UTL_Scope *s = idl_global->scopes ().top_non_null ();
UTL_ScopedName n ($1,
0);
@@ -3878,6 +3928,223 @@ typeprefix_dcl
}
;
+component
+ : component_decl
+ | component_forward_decl
+ ;
+
+component_forward_decl :
+ IDL_COMPONENT
+ id
+ ;
+
+component_decl :
+ component_header
+ '{'
+ component_exports
+ '}'
+ ;
+
+component_header :
+ IDL_COMPONENT
+ id
+ component_inheritance_spec
+ supports_spec
+ ;
+
+component_inheritance_spec
+ : ':'
+ scoped_name
+ | /* EMPTY */
+ ;
+
+component_exports
+ : component_exports component_export
+ | /* EMPTY */
+ ;
+
+component_export
+ : provides_decl
+ ';'
+ | uses_decl
+ ';'
+ | emits_decl
+ ';'
+ | publishes_decl
+ ';'
+ | consumes_decl
+ ';'
+ | attribute
+ ';'
+ ;
+
+provides_decl :
+ IDL_PROVIDES
+ interface_type
+ id
+ ;
+
+interface_type
+ : scoped_name
+ | IDL_OBJECT
+ ;
+
+uses_decl :
+ IDL_USES
+ opt_multiple
+ interface_type
+ id
+ ;
+
+opt_multiple
+ : IDL_MULTIPLE
+ | /* EMPTY */
+ ;
+
+emits_decl :
+ IDL_EMITS
+ scoped_name
+ id
+ ;
+
+publishes_decl :
+ IDL_PUBLISHES
+ scoped_name
+ id
+ ;
+
+consumes_decl :
+ IDL_CONSUMES
+ scoped_name
+ id
+ ;
+
+home_decl :
+ home_header
+ home_body
+ ;
+
+home_header :
+ IDL_HOME
+ id
+ home_inheritance_spec
+ supports_spec
+ IDL_MANAGES
+ scoped_name
+ primary_key_spec
+ ;
+
+home_inheritance_spec
+ : ':'
+ scoped_name
+ | /* EMPTY */
+ ;
+
+primary_key_spec
+ : IDL_PRIMARYKEY
+ scoped_name
+ | /* EMPTY */
+ ;
+
+home_body :
+ '{'
+ home_exports
+ '}'
+ ;
+
+home_exports
+ : home_exports home_export
+ | /* EMPTY */
+ ;
+
+home_export
+ : export
+ | factory_decl
+ ';'
+ | finder_decl
+ ';'
+ ;
+
+factory_decl :
+ IDL_FACTORY
+ id
+ init_parameter_list
+ opt_raises
+ ;
+
+finder_decl :
+ IDL_FINDER
+ id
+ init_parameter_list
+ opt_raises
+ ;
+
+event
+ : event_decl
+ | event_abs_decl
+ | event_forward_decl
+ ;
+
+event_forward_decl
+ : event_abs_forward_decl
+ | event_concrete_forward_decl
+ ;
+
+event_concrete_forward_decl :
+ IDL_EVENTTYPE
+ id
+ ;
+
+event_abs_forward_decl :
+ IDL_ABSTRACT
+ IDL_EVENTTYPE
+ id
+ ;
+
+event_abs_decl :
+ event_abs_header
+ event_rest_of_header
+ '{'
+ exports
+ '}'
+ ;
+
+event_abs_header :
+ IDL_ABSTRACT
+ IDL_EVENTTYPE
+ id
+ ;
+
+event_custom_header :
+ IDL_CUSTOM
+ IDL_EVENTTYPE
+ id
+ ;
+
+event_plain_header :
+ IDL_EVENTTYPE
+ id
+ ;
+
+event_rest_of_header :
+ opt_truncatable
+ inheritance_spec
+ supports_spec
+ ;
+
+event_decl :
+ event_header
+ event_rest_of_header
+ '{'
+ value_elements
+ '}'
+ ;
+
+event_header
+ : event_custom_header
+ | event_plain_header
+ ;
+
%%
/* programs */
diff --git a/TAO/TAO_IDL/fe/y.tab.cpp b/TAO/TAO_IDL/fe/y.tab.cpp
index c74013ced4b..ce77354aec5 100644
--- a/TAO/TAO_IDL/fe/y.tab.cpp
+++ b/TAO/TAO_IDL/fe/y.tab.cpp
@@ -18,8 +18,8 @@ char tao_yysccsid[] = "@(#)yaccpar 1.4 (Berkeley) 02/25/90 \n\
#include "utl_err.h"
#include "ast_generator.h"
#include "ast_module.h"
-#include "ast_interface.h"
-#include "ast_interface_fwd.h"
+#include "ast_valuetype.h"
+#include "ast_valuetype_fwd.h"
#include "utl_string.h"
#include "ast_constant.h"
#include "fe_declarator.h"
@@ -158,511 +158,596 @@ typedef union {
#define TAO_YYERRCODE 256
short tao_yylhs[] = { -1,
0, 75, 75, 77, 76, 79, 76, 81, 76, 83,
- 76, 85, 76, 87, 76, 89, 76, 91, 76, 92,
- 76, 93, 94, 95, 96, 88, 86, 86, 99, 101,
- 102, 97, 103, 69, 33, 33, 33, 104, 22, 22,
- 90, 90, 90, 90, 105, 105, 110, 112, 113, 109,
- 114, 115, 116, 106, 34, 117, 70, 68, 68, 24,
- 24, 107, 107, 108, 111, 111, 118, 118, 118, 123,
- 119, 124, 119, 100, 100, 125, 120, 126, 120, 127,
- 120, 128, 120, 129, 120, 131, 120, 133, 120, 134,
- 120, 20, 135, 21, 21, 16, 136, 16, 137, 16,
- 73, 98, 98, 98, 138, 139, 140, 141, 82, 50,
- 50, 50, 50, 50, 50, 50, 50, 50, 35, 36,
- 37, 37, 38, 38, 39, 39, 40, 40, 40, 41,
- 41, 41, 42, 42, 42, 42, 43, 43, 43, 43,
- 44, 44, 44, 45, 45, 45, 45, 45, 45, 45,
- 45, 45, 46, 143, 74, 74, 74, 74, 74, 74,
- 145, 142, 1, 1, 2, 2, 2, 59, 59, 59,
- 59, 59, 59, 59, 59, 4, 4, 4, 3, 3,
- 3, 144, 144, 29, 148, 30, 30, 64, 64, 31,
- 149, 32, 32, 65, 66, 51, 51, 57, 57, 57,
- 58, 58, 58, 54, 54, 54, 55, 52, 52, 60,
- 53, 56, 61, 150, 72, 151, 153, 154, 7, 152,
- 156, 156, 157, 155, 158, 159, 122, 160, 122, 161,
- 71, 162, 163, 164, 165, 167, 168, 10, 9, 9,
- 9, 9, 9, 9, 166, 170, 170, 171, 172, 169,
- 173, 169, 27, 28, 28, 174, 48, 175, 176, 48,
- 177, 49, 146, 147, 178, 179, 181, 182, 8, 180,
- 185, 184, 184, 183, 186, 187, 5, 5, 188, 189,
- 13, 191, 192, 6, 6, 190, 194, 195, 14, 14,
- 193, 196, 11, 25, 26, 26, 197, 198, 47, 199,
- 200, 130, 67, 67, 201, 202, 203, 204, 84, 205,
- 207, 208, 209, 132, 63, 63, 63, 12, 12, 210,
- 212, 121, 213, 211, 215, 211, 214, 218, 217, 217,
- 219, 220, 216, 221, 206, 223, 206, 222, 226, 225,
- 225, 227, 228, 224, 15, 15, 15, 15, 62, 62,
- 62, 229, 230, 23, 23, 231, 232, 17, 17, 18,
- 233, 19, 19, 78, 80,
+ 76, 85, 76, 87, 76, 89, 76, 91, 76, 93,
+ 76, 95, 76, 97, 76, 98, 76, 99, 100, 101,
+ 102, 88, 86, 86, 105, 107, 108, 103, 109, 69,
+ 33, 33, 33, 110, 22, 22, 90, 90, 90, 90,
+ 111, 111, 116, 118, 119, 115, 120, 121, 122, 112,
+ 34, 123, 70, 68, 68, 24, 24, 113, 113, 114,
+ 117, 117, 124, 124, 124, 129, 125, 130, 125, 106,
+ 106, 131, 126, 132, 126, 133, 126, 134, 126, 135,
+ 126, 137, 126, 139, 126, 140, 126, 20, 141, 21,
+ 21, 16, 142, 16, 143, 16, 73, 104, 104, 104,
+ 144, 145, 146, 147, 82, 50, 50, 50, 50, 50,
+ 50, 50, 50, 50, 35, 36, 37, 37, 38, 38,
+ 39, 39, 40, 40, 40, 41, 41, 41, 42, 42,
+ 42, 42, 43, 43, 43, 43, 44, 44, 44, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 46, 149,
+ 74, 74, 74, 74, 74, 74, 151, 148, 1, 1,
+ 2, 2, 2, 59, 59, 59, 59, 59, 59, 59,
+ 59, 4, 4, 4, 3, 3, 3, 150, 150, 29,
+ 154, 30, 30, 64, 64, 31, 155, 32, 32, 65,
+ 66, 51, 51, 57, 57, 57, 58, 58, 58, 54,
+ 54, 54, 55, 52, 52, 60, 53, 56, 61, 156,
+ 72, 157, 159, 160, 7, 158, 162, 162, 163, 161,
+ 164, 165, 128, 166, 128, 167, 71, 168, 169, 170,
+ 171, 173, 174, 10, 9, 9, 9, 9, 9, 9,
+ 172, 176, 176, 177, 178, 175, 179, 175, 27, 28,
+ 28, 180, 48, 181, 182, 48, 183, 49, 152, 153,
+ 184, 185, 187, 188, 8, 186, 191, 190, 190, 189,
+ 192, 193, 5, 5, 194, 195, 13, 197, 198, 6,
+ 6, 196, 200, 201, 14, 14, 199, 202, 11, 25,
+ 26, 26, 203, 204, 47, 205, 206, 136, 67, 67,
+ 207, 208, 209, 210, 84, 211, 213, 214, 215, 138,
+ 63, 63, 63, 12, 12, 216, 218, 127, 219, 217,
+ 221, 217, 220, 224, 223, 223, 225, 226, 222, 227,
+ 212, 229, 212, 228, 232, 231, 231, 233, 234, 230,
+ 15, 15, 15, 15, 62, 62, 62, 235, 236, 23,
+ 23, 237, 238, 17, 17, 18, 239, 19, 19, 78,
+ 80, 92, 92, 241, 240, 242, 244, 244, 243, 243,
+ 245, 245, 245, 245, 245, 245, 246, 251, 251, 247,
+ 252, 252, 248, 249, 250, 94, 253, 255, 255, 256,
+ 256, 254, 257, 257, 258, 258, 258, 259, 260, 96,
+ 96, 96, 263, 263, 265, 264, 262, 266, 268, 269,
+ 267, 261, 270, 270,
};
short tao_yylen[] = { 2,
1, 2, 0, 0, 3, 0, 3, 0, 3, 0,
3, 0, 3, 0, 3, 0, 3, 0, 3, 0,
- 3, 0, 0, 0, 0, 9, 1, 1, 0, 0,
- 0, 7, 0, 3, 2, 3, 3, 0, 3, 0,
- 1, 1, 1, 1, 2, 1, 0, 0, 0, 7,
- 0, 0, 0, 8, 4, 0, 3, 1, 0, 2,
- 0, 2, 1, 2, 2, 0, 1, 1, 2, 0,
- 3, 0, 3, 2, 0, 0, 3, 0, 3, 0,
- 3, 0, 3, 0, 3, 0, 3, 0, 3, 0,
- 3, 2, 0, 4, 0, 1, 0, 3, 0, 4,
- 1, 1, 2, 2, 0, 0, 0, 0, 9, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 3, 1, 3, 1, 3, 1, 3, 3, 1,
- 3, 3, 1, 3, 3, 3, 1, 2, 2, 2,
- 1, 1, 3, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 0, 3, 1, 1, 1, 2, 1,
- 0, 3, 1, 1, 1, 1, 1, 1, 1, 1,
+ 3, 0, 3, 0, 3, 0, 3, 0, 0, 0,
+ 0, 9, 1, 1, 0, 0, 0, 7, 0, 3,
+ 2, 3, 3, 0, 3, 0, 1, 1, 1, 1,
+ 2, 1, 0, 0, 0, 7, 0, 0, 0, 8,
+ 4, 0, 3, 1, 0, 2, 0, 2, 1, 2,
+ 2, 0, 1, 1, 2, 0, 3, 0, 3, 2,
+ 0, 0, 3, 0, 3, 0, 3, 0, 3, 0,
+ 3, 0, 3, 0, 3, 0, 3, 2, 0, 4,
+ 0, 1, 0, 3, 0, 4, 1, 1, 2, 2,
+ 0, 0, 0, 0, 9, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 3, 1, 3,
+ 1, 3, 1, 3, 3, 1, 3, 3, 1, 3,
+ 3, 3, 1, 2, 2, 2, 1, 1, 3, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 0,
+ 3, 1, 1, 1, 2, 1, 0, 3, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 2, 0, 4, 0, 1, 1, 2,
- 0, 4, 0, 1, 1, 1, 1, 1, 2, 1,
- 2, 3, 2, 1, 1, 2, 1, 1, 1, 1,
- 1, 1, 1, 0, 3, 0, 0, 0, 7, 2,
- 2, 0, 0, 2, 0, 0, 5, 0, 3, 0,
- 3, 0, 0, 0, 0, 0, 0, 14, 1, 1,
- 1, 1, 1, 1, 2, 2, 0, 0, 0, 5,
- 0, 3, 2, 2, 0, 0, 3, 0, 0, 5,
- 0, 3, 1, 1, 0, 0, 0, 0, 9, 2,
- 0, 4, 0, 1, 0, 0, 6, 2, 0, 0,
- 5, 0, 0, 6, 1, 1, 0, 0, 6, 1,
- 1, 0, 3, 2, 2, 0, 0, 0, 5, 0,
- 0, 6, 1, 0, 0, 0, 0, 0, 9, 0,
- 0, 0, 0, 10, 1, 1, 0, 1, 1, 0,
- 0, 5, 0, 3, 0, 4, 2, 0, 4, 0,
- 0, 0, 5, 0, 3, 0, 4, 2, 0, 4,
- 0, 0, 0, 5, 1, 1, 1, 1, 1, 1,
- 1, 0, 0, 6, 0, 0, 0, 6, 0, 2,
- 0, 4, 0, 3, 3,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
+ 0, 4, 0, 1, 1, 2, 0, 4, 0, 1,
+ 1, 1, 1, 1, 2, 1, 2, 3, 2, 1,
+ 1, 2, 1, 1, 1, 1, 1, 1, 1, 0,
+ 3, 0, 0, 0, 7, 2, 2, 0, 0, 2,
+ 0, 0, 5, 0, 3, 0, 3, 0, 0, 0,
+ 0, 0, 0, 14, 1, 1, 1, 1, 1, 1,
+ 2, 2, 0, 0, 0, 5, 0, 3, 2, 2,
+ 0, 0, 3, 0, 0, 5, 0, 3, 1, 1,
+ 0, 0, 0, 0, 9, 2, 0, 4, 0, 1,
+ 0, 0, 6, 2, 0, 0, 5, 0, 0, 6,
+ 1, 1, 0, 0, 6, 1, 1, 0, 3, 2,
+ 2, 0, 0, 0, 5, 0, 0, 6, 1, 0,
+ 0, 0, 0, 0, 9, 0, 0, 0, 0, 10,
+ 1, 1, 0, 1, 1, 0, 0, 5, 0, 3,
+ 0, 4, 2, 0, 4, 0, 0, 0, 5, 0,
+ 3, 0, 4, 2, 0, 4, 0, 0, 0, 5,
+ 1, 1, 1, 1, 1, 1, 1, 0, 0, 6,
+ 0, 0, 0, 6, 0, 2, 0, 4, 0, 3,
+ 3, 1, 1, 2, 4, 4, 2, 0, 2, 0,
+ 2, 2, 2, 2, 2, 2, 3, 1, 1, 4,
+ 1, 0, 3, 3, 3, 2, 7, 2, 0, 2,
+ 0, 3, 2, 0, 1, 2, 2, 4, 4, 1,
+ 1, 1, 1, 1, 2, 3, 5, 3, 3, 2,
+ 3, 5, 1, 1,
};
short tao_yydefred[] = { 3,
- 0, 0, 20, 105, 22, 33, 154, 214, 230, 265,
- 305, 0, 0, 0, 0, 56, 0, 0, 156, 158,
- 157, 29, 47, 0, 0, 0, 0, 4, 2, 6,
- 8, 10, 12, 14, 16, 18, 27, 28, 41, 42,
- 43, 44, 46, 160, 182, 183, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 101, 159, 194, 0, 51,
- 0, 0, 0, 45, 0, 97, 0, 96, 0, 0,
- 0, 38, 35, 0, 200, 0, 204, 205, 208, 209,
- 210, 211, 207, 212, 213, 279, 286, 291, 58, 64,
- 163, 164, 166, 176, 177, 179, 181, 180, 0, 178,
- 0, 168, 170, 171, 169, 173, 174, 196, 197, 165,
- 172, 175, 0, 0, 216, 0, 0, 232, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 21, 116, 117,
- 0, 106, 110, 111, 113, 114, 115, 112, 23, 34,
- 161, 155, 215, 231, 266, 306, 36, 0, 37, 57,
- 0, 364, 99, 365, 30, 48, 0, 199, 206, 0,
- 203, 0, 275, 278, 0, 282, 287, 0, 217, 5,
- 7, 9, 11, 13, 15, 17, 19, 0, 0, 0,
- 0, 0, 52, 98, 0, 75, 66, 0, 39, 202,
- 280, 0, 0, 55, 0, 0, 233, 223, 107, 24,
- 195, 162, 187, 188, 189, 0, 267, 307, 75, 100,
- 0, 0, 0, 0, 144, 145, 146, 148, 150, 151,
- 152, 149, 147, 0, 0, 0, 0, 0, 153, 0,
- 0, 0, 0, 0, 0, 133, 137, 142, 276, 0,
- 283, 288, 0, 218, 222, 0, 0, 3, 0, 0,
- 0, 222, 0, 90, 303, 315, 316, 0, 0, 76,
- 78, 80, 82, 84, 0, 74, 86, 88, 320, 72,
- 70, 0, 65, 67, 68, 0, 93, 281, 138, 139,
- 140, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 243, 234, 0, 239,
- 240, 242, 241, 0, 0, 228, 225, 224, 108, 0,
- 185, 297, 293, 296, 274, 268, 273, 0, 0, 0,
- 319, 346, 310, 347, 318, 0, 345, 300, 0, 0,
- 0, 0, 0, 32, 0, 0, 0, 0, 0, 50,
- 69, 0, 143, 0, 0, 0, 0, 0, 0, 0,
- 134, 135, 136, 277, 284, 289, 0, 219, 221, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 54,
- 91, 0, 0, 77, 79, 81, 83, 85, 87, 89,
- 321, 73, 71, 0, 235, 229, 226, 109, 119, 26,
- 186, 298, 295, 269, 271, 309, 311, 301, 0, 0,
- 0, 0, 0, 0, 0, 0, 322, 236, 227, 299,
- 272, 0, 312, 302, 193, 0, 0, 0, 0, 0,
- 0, 0, 324, 331, 0, 330, 251, 258, 256, 248,
- 255, 237, 247, 335, 349, 350, 351, 342, 0, 341,
- 352, 313, 191, 0, 326, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 337, 0, 0, 0, 0, 332,
- 328, 252, 259, 257, 261, 249, 254, 238, 246, 343,
- 339, 353, 356, 314, 192, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 333, 329, 260, 262, 250, 344,
- 340, 0, 357, 354, 0, 363, 0, 0, 358, 361,
- 0, 362,
+ 0, 0, 26, 111, 28, 39, 160, 220, 236, 271,
+ 311, 0, 0, 0, 0, 62, 0, 0, 0, 0,
+ 0, 162, 164, 163, 35, 53, 0, 0, 0, 0,
+ 4, 2, 6, 8, 10, 12, 14, 16, 18, 20,
+ 22, 24, 33, 34, 47, 48, 49, 50, 52, 166,
+ 188, 189, 372, 373, 0, 0, 410, 411, 412, 413,
+ 414, 0, 423, 424, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 107, 165, 200, 0, 0, 57,
+ 0, 0, 0, 0, 51, 0, 0, 0, 0, 103,
+ 0, 102, 0, 0, 0, 44, 41, 0, 206, 0,
+ 210, 211, 214, 215, 216, 217, 213, 218, 219, 285,
+ 292, 297, 64, 70, 169, 170, 172, 182, 183, 185,
+ 187, 186, 0, 184, 0, 174, 176, 177, 175, 179,
+ 180, 202, 203, 171, 178, 181, 0, 0, 222, 0,
+ 0, 238, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 380, 404, 396, 0, 0, 0,
+ 27, 122, 123, 0, 112, 116, 117, 119, 120, 121,
+ 118, 29, 40, 167, 161, 221, 237, 272, 312, 42,
+ 0, 0, 43, 419, 63, 0, 0, 0, 0, 0,
+ 370, 105, 371, 36, 54, 0, 205, 212, 0, 209,
+ 0, 281, 284, 0, 288, 293, 0, 223, 5, 7,
+ 9, 11, 13, 15, 17, 19, 21, 23, 25, 0,
+ 0, 0, 81, 72, 0, 0, 0, 0, 0, 58,
+ 0, 0, 376, 0, 0, 104, 0, 81, 72, 0,
+ 45, 208, 286, 0, 61, 0, 0, 239, 229, 309,
+ 0, 0, 0, 0, 0, 375, 0, 0, 379, 0,
+ 0, 0, 0, 0, 96, 321, 322, 0, 0, 402,
+ 0, 82, 84, 86, 88, 90, 405, 92, 94, 403,
+ 0, 0, 421, 0, 0, 113, 30, 201, 168, 193,
+ 194, 195, 0, 273, 313, 81, 66, 0, 106, 0,
+ 0, 0, 0, 150, 151, 152, 154, 156, 157, 158,
+ 155, 153, 0, 0, 0, 0, 0, 159, 0, 0,
+ 0, 0, 0, 0, 139, 143, 148, 282, 289, 294,
+ 0, 224, 228, 0, 0, 0, 389, 0, 0, 0,
+ 391, 0, 306, 386, 381, 382, 383, 384, 385, 0,
+ 0, 0, 325, 352, 316, 353, 324, 0, 351, 0,
+ 0, 0, 0, 0, 0, 0, 406, 407, 417, 80,
+ 326, 78, 76, 422, 71, 73, 74, 0, 0, 3,
+ 0, 0, 0, 228, 0, 0, 0, 0, 99, 287,
+ 144, 145, 146, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 249, 240,
+ 0, 245, 246, 248, 247, 0, 0, 234, 231, 230,
+ 395, 393, 387, 394, 0, 0, 97, 0, 0, 0,
+ 0, 83, 85, 87, 89, 91, 93, 95, 0, 0,
+ 0, 75, 114, 0, 191, 303, 299, 302, 280, 274,
+ 279, 0, 0, 0, 397, 38, 56, 0, 149, 0,
+ 0, 0, 0, 0, 0, 0, 140, 141, 142, 283,
+ 290, 295, 0, 225, 227, 0, 0, 390, 307, 0,
+ 0, 358, 408, 409, 317, 327, 79, 77, 0, 0,
+ 0, 0, 0, 0, 0, 0, 60, 0, 0, 241,
+ 235, 232, 0, 330, 337, 0, 336, 0, 0, 0,
+ 115, 125, 32, 192, 304, 301, 275, 277, 315, 0,
+ 0, 308, 199, 0, 332, 0, 359, 0, 318, 328,
+ 0, 0, 242, 233, 0, 338, 334, 0, 0, 0,
+ 0, 305, 278, 0, 197, 0, 0, 0, 341, 355,
+ 356, 357, 348, 0, 347, 319, 257, 264, 262, 254,
+ 261, 243, 253, 0, 339, 335, 360, 0, 343, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 198, 349,
+ 345, 362, 320, 258, 265, 263, 267, 255, 260, 244,
+ 252, 0, 0, 0, 0, 0, 0, 350, 346, 363,
+ 266, 268, 256, 0, 369, 0, 0, 364, 367, 0,
+ 368,
};
short tao_yydgoto[] = { 1,
- 307, 91, 92, 93, 94, 95, 96, 97, 298, 98,
- 201, 323, 99, 100, 325, 228, 474, 497, 498, 189,
- 213, 73, 442, 194, 313, 366, 430, 451, 202, 249,
- 414, 422, 22, 23, 388, 229, 230, 231, 232, 233,
- 234, 235, 236, 237, 238, 239, 314, 431, 466, 132,
- 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
- 112, 438, 258, 203, 204, 205, 259, 113, 24, 25,
- 114, 115, 68, 260, 2, 29, 120, 261, 121, 262,
- 122, 263, 123, 264, 124, 34, 125, 35, 126, 36,
- 127, 47, 49, 179, 248, 363, 37, 38, 70, 211,
- 186, 265, 50, 157, 39, 40, 41, 42, 43, 71,
- 212, 187, 272, 148, 209, 319, 65, 273, 274, 266,
- 276, 308, 339, 338, 329, 330, 331, 332, 333, 267,
- 335, 268, 336, 320, 342, 151, 185, 48, 178, 247,
- 362, 142, 51, 44, 180, 45, 46, 364, 459, 52,
- 119, 244, 198, 304, 359, 305, 246, 361, 401, 360,
- 53, 168, 243, 357, 400, 432, 418, 452, 433, 453,
- 450, 480, 447, 449, 448, 478, 479, 54, 181, 316,
- 251, 367, 317, 368, 403, 192, 293, 162, 214, 116,
- 195, 294, 117, 196, 295, 250, 365, 402, 373, 405,
- 55, 182, 252, 369, 372, 413, 404, 421, 458, 337,
- 407, 399, 416, 425, 417, 426, 446, 477, 444, 476,
- 419, 439, 420, 440, 456, 482, 454, 481, 457, 483,
- 484, 495, 501,
+ 419, 115, 116, 117, 118, 119, 22, 23, 410, 24,
+ 288, 355, 123, 124, 357, 317, 583, 606, 607, 241,
+ 302, 97, 483, 233, 447, 493, 560, 576, 289, 381,
+ 522, 535, 25, 26, 511, 318, 319, 320, 321, 322,
+ 323, 324, 325, 326, 327, 328, 448, 561, 588, 165,
+ 126, 127, 128, 129, 130, 131, 132, 133, 134, 135,
+ 136, 553, 271, 290, 291, 292, 257, 137, 27, 28,
+ 29, 30, 92, 272, 2, 32, 144, 273, 145, 274,
+ 146, 275, 147, 276, 148, 37, 149, 38, 150, 39,
+ 151, 40, 152, 41, 153, 42, 154, 66, 68, 226,
+ 380, 490, 43, 44, 94, 284, 238, 387, 69, 196,
+ 45, 46, 47, 48, 49, 95, 285, 239, 388, 182,
+ 296, 453, 86, 375, 376, 370, 378, 420, 441, 440,
+ 360, 361, 362, 363, 364, 278, 365, 279, 366, 350,
+ 458, 190, 237, 67, 225, 379, 489, 175, 70, 50,
+ 227, 51, 52, 491, 564, 71, 143, 332, 249, 416,
+ 475, 417, 334, 477, 521, 476, 72, 207, 331, 473,
+ 520, 562, 544, 577, 563, 578, 575, 597, 572, 574,
+ 573, 595, 596, 73, 228, 450, 383, 494, 451, 495,
+ 532, 244, 405, 201, 303, 140, 246, 406, 141, 247,
+ 407, 382, 492, 531, 426, 503, 74, 229, 384, 496,
+ 431, 529, 509, 541, 571, 439, 429, 510, 480, 506,
+ 481, 507, 526, 547, 524, 546, 539, 554, 540, 555,
+ 570, 593, 568, 592, 508, 538, 594, 604, 610, 53,
+ 54, 55, 220, 187, 259, 260, 261, 262, 263, 264,
+ 339, 342, 56, 157, 189, 455, 221, 280, 281, 282,
+ 57, 58, 59, 60, 61, 62, 159, 63, 64, 65,
};
short tao_yysindex[] = { 0,
- 0, 675, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, -192, -186, -203, -226, 0, -194, -194, 0, 0,
- 0, 0, 0, 68, 464, -143, 0, 0, 0, 0,
+ 0, 828, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, -187, -220, -218, -130, 0, -187, -187, -187, -206,
+ -206, 0, 0, 0, 0, 0, 88, 620, -110, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 76, 636, -110, -192,
- 483, -192, -192, -192, -192, 0, 0, 0, 68, 0,
- 68, -145, -145, 0, -192, 0, -204, 0, -201, 37,
- 41, 0, 0, -189, 0, -152, 0, 0, 0, 0,
+ 0, 0, 0, 0, 64, 85, 0, 0, 0, 0,
+ 0, -119, 0, 0, -119, 188, 811, 6, -187, 662,
+ -187, -187, -187, -187, 0, 0, 0, 88, -187, 0,
+ 88, -119, -187, -119, 0, -187, 212, 0, 220, 0,
+ -68, 0, -61, 160, 170, 0, 0, -157, 0, -31,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 126, 0,
- -161, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 68, -143, 0, 111, 127, 0, 75, 146,
- 154, 160, 173, 178, 191, 199, 202, 0, 0, 0,
- -161, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 163, 0, 0,
- -192, 0, 0, 0, 0, 0, -194, 0, 0, 27,
- 0, 209, 0, 0, -14, 0, 0, 254, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, -192, 169, -192,
- 189, 190, 0, 0, -192, 0, 0, -161, 0, 0,
- 0, -24, -194, 0, -24, -24, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 748, 721, 274, 515, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 38, 38, 38, -24, -161, 0, 172,
- 236, 295, -199, -8, 144, 0, 0, 0, 0, -161,
- 0, 0, 655, 0, 0, 445, 273, 0, 291, 245,
- 80, 0, 748, 0, 0, 0, 0, 582, 53, 0,
- 0, 0, 0, 0, 214, 0, 0, 0, 0, 0,
- 0, 216, 0, 0, 0, 288, 0, 0, 0, 0,
- 0, 307, -24, -24, -24, -24, -24, -24, -24, -24,
- -24, -24, 293, 294, 305, 95, 0, 0, -161, 0,
- 0, 0, 0, 243, 0, 0, 0, 0, 0, 675,
- 0, 0, 0, 0, 0, 0, 0, 0, 248, 313,
- 0, 0, 0, 0, 0, -161, 0, 0, 316, 318,
- 319, 322, 323, 0, 325, 326, 129, 445, 445, 0,
- 0, -194, 0, 236, 295, -199, -8, -8, 144, 144,
- 0, 0, 0, 0, 0, 0, 342, 0, 0, 330,
- -192, -24, 267, -192, -24, 245, 271, 347, 272, 0,
- 0, 141, 617, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, -161, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 359, 278,
- 344, 311, 80, 365, -192, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 366, 119, -120, 368, -43,
- 114, 367, 0, 0, 372, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 373, 0,
- 0, 0, 0, 617, 0, 371, 357, -24, 360, 483,
- -80, 292, -120, 617, 0, 375, 383, 132, -192, 0,
+ 0, 0, 37, 0, -19, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 88, -110, 0, 246,
+ 255, 0, 194, 262, 266, 274, 280, 293, 298, 303,
+ 313, 329, 337, 347, 0, 0, 0, 88, 284, 285,
+ 0, 0, 0, -19, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, -192, 119, 369, -192, 374,
- -192, -43, -194, 384, 0, 0, 0, 0, 0, 0,
- 0, 385, 0, 0, 105, 0, 390, 388, 0, 0,
- 113, 0,
+ 0, 286, 0, 0, 0, -206, 109, -206, 109, -187,
+ 0, 0, 0, 0, 0, -206, 0, 0, 150, 0,
+ 358, 0, 0, 109, 0, 0, 387, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 264,
+ 485, 109, 0, 0, -187, 296, -187, 307, 308, 0,
+ -19, -206, 0, -19, 114, 0, -187, 0, 0, -19,
+ 0, 0, 0, 55, 0, 55, 55, 0, 0, 0,
+ -206, -206, -132, -206, 123, 0, 148, 381, 0, 384,
+ 385, 386, 388, 389, 0, 0, 0, -187, -187, 0,
+ 738, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 390, 395, 0, 520, 450, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, -206, 0, 913,
+ 886, 402, 773, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 23, 23, 23, 55, -19, 0, 336, 367,
+ 424, -76, 257, 248, 0, 0, 0, 0, 0, 0,
+ 369, 0, 0, 590, -193, -193, 0, -19, -187, -193,
+ 0, -132, 0, 0, 0, 0, 0, 0, 0, 405,
+ 426, 426, 0, 0, 0, 0, 0, -19, 0, 409,
+ 411, 415, 418, 421, 425, 427, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 428, 417, 0,
+ 439, 394, 232, 0, 913, -124, 365, 393, 0, 0,
+ 0, 0, 0, 464, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 444, 452, 458, 250, 0, 0,
+ -19, 0, 0, 0, 0, 396, 0, 0, 0, 0,
+ 0, 0, 0, 0, -187, 792, 0, 0, 233, 233,
+ 267, 0, 0, 0, 0, 0, 0, 0, 269, 590,
+ 590, 0, 0, 828, 0, 0, 0, 0, 0, 0,
+ 0, 0, 398, -206, 0, 0, 0, -206, 0, 367,
+ 424, -76, 257, 257, 248, 248, 0, 0, 0, 0,
+ 0, 0, 486, 0, 0, 469, -187, 0, 0, 488,
+ 241, 0, 0, 0, 0, 0, 0, 0, 55, 406,
+ -187, 55, 394, 407, 489, 410, 0, -19, -19, 0,
+ 0, 0, -187, 0, 0, 496, 0, 499, 500, 426,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 420,
+ 482, 0, 0, 792, 0, 498, 0, 0, 0, 0,
+ 453, 232, 0, 0, 501, 0, 0, -206, 506, 47,
+ 233, 0, 0, 48, 0, -187, 241, 513, 0, 0,
+ 0, 0, 0, 515, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, -187, 0, 0, 0, 792, 0, 514,
+ 268, 503, 55, 505, 662, 60, 440, 48, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, -187, 47, 524, 509, -187, 512, 0, 0, 0,
+ 0, 0, 0, 245, 0, 531, 530, 0, 0, 253,
+ 0,
};
short tao_yyrindex[] = { 0,
- 0, 434, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 577, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 78, 62, 526, 105,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, -25, -10, 378, 2, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 23, 0,
- 25, 31, -31, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 8, 0, 0, 0, 0, 0, 0,
+ 0, 21, 0, 0, 21, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 106, 0, 0,
+ 121, 84, 0, 21, 0, 0, -22, 33, -262, 0,
+ 0, 0, 0, 0, 0, 0, 0, 96, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 96, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, -91, 0, 0, 117, 133, 0, 0, 0,
+ 0, 0, 0, 0, 101, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, -82, 0, 0, 113,
+ 180, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, -82, 0, 0,
+ 0, 0, 0, 344, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 181, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 65, 0, 0, 0, 0, 0, 463, 0, 288, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 25, 0,
+ 0, 0, 0, 463, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 324,
+ 706, 463, 0, 0, 0, 0, 0, 0, 0, 0,
+ -75, 0, 0, -245, 0, 0, 0, 0, 0, -13,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 97,
- 0, 0, 0, 0, 317, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, -126, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, -19, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 153, 0, 0, 0, 0,
- 270, 297, -26, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 13, 0, 247,
- 576, 569, 252, 91, 21, 0, 0, 0, 0, 320,
- 0, 0, 0, 0, 0, 0, 0, 0, 382, 0,
- 0, 0, 324, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 706, 706, 0, 0, 0, 0, 0,
+ 0, 0, 168, 0, 0, 0, 0, 0, 0, 231,
+ 392, -7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 35, 0, 370, 343,
+ 715, 141, 112, 45, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 354, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 377, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 401, 0, 0, 403, 0,
- 0, 0, 0, 0, 219, 0, 0, 0, 0, 321,
- 0, 0, 0, 0, 0, 0, 0, 246, 0, 0,
- 0, 0, 0, 0, 0, 188, 0, 0, 0, 0,
+ 576, 0, 0, 0, 419, 517, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 581, 574, 561, 131, 142, 50, 58,
+ 0, 0, 0, 0, 0, 0, 0, 600, 0, 0,
+ 601, 0, 0, 0, 0, 0, 325, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, -5, 584, 584,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 201, 0, 327, 0, 0,
+ 0, 0, 0, 519, 0, 0, 0, 0, 0, 0,
+ 0, 350, 0, 0, 0, 0, 0, 0, 0, 414,
+ 757, 664, 152, 179, 68, 74, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, -18, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, -13, 0, 0, 0, 0,
- 0, -17, 0, 0, 0, 0, 0, 0, 0, 0,
- -30, 391, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 199, 0, 522, 0, 0, 525, -9, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 410, 0, 0, 0, 0,
- 550, 0, 328, 0, 0, 413, 0, 396, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 609, 0, 8, 0, 0,
+ 0, 0, 0, 0, 592, 0, 0, 0, 0, 0,
+ -16, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 611,
+ 607, 0, 0, 0, 0, 687, 0, 542, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 415, 0, 0,
- 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 627, 0, 0, 0,
+ 0,
};
short tao_yygindex[] = { 0,
- -20, 244, 0, 0, 0, -44, 9, 6, 0, 11,
- 0, 0, 0, -42, -326, -15, 0, 0, 0, -21,
- 0, 62, 0, 0, 0, 0, 0, 0, 98, 0,
- 0, 0, 0, 443, 0, -197, 0, 180, 182, 185,
- -79, -32, -205, 28, 0, -127, 99, 22, 0, 0,
- -9, -4, -3, 426, 429, 0, 0, 0, -177, -2,
- 0, 0, 0, -270, -11, 0, 0, 0, 265, 266,
- 15, 18, -12, 5, 230, 0, 0, 7, 0, 10,
- 0, 12, 0, 16, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 286,
- 0, 0, 0, 0, 0, 0, 0, 0, 465, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 289,
- 0, -54, 0, 0, 0, 0, 0, 0, 0, 0,
+ -25, 366, 0, 0, 0, -55, -24, -26, 0, -20,
+ 0, 0, 0, -53, -373, -2, 0, 0, 0, -212,
+ 0, 183, -392, 44, 0, 0, 0, 0, 193, 0,
+ 0, 0, 0, 659, 0, -292, 0, 279, 283, 278,
+ -30, -10, -181, 46, 0, -217, 200, 118, 0, 0,
+ -45, -44, -42, 628, 629, 0, 0, 0, -250, -40,
+ 0, 0, 0, -444, -11, 0, 0, 206, 379, 380,
+ -18, -15, -12, 7, 320, 0, 0, 9, 0, 13,
+ 0, 14, 0, 15, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, -142, 0, 0, 0, 0,
+ 0, 0, 0, 0, 686, 0, 470, 0, 0, 0,
+ 0, 0, 0, 0, 0, -167, 0, -41, 0, 0,
+ 0, 0, 0, 0, 0, 483, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 461, 328, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 135, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 182, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 281, 253, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 47, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 101, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, -319, 0, 0, 0,
+ 0, 169, 0, 0, 0, 0, 0, 0, 0, 122,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 29, 0, 0, 0, 0,
- 0, 0, 0, 40, 0, 0, 0, 0, 0, 0,
- 0, 0, 0,
+ 375, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 653, 0, 0, 0,
};
-#define TAO_YYTABLESIZE 1066
-short tao_yytable[] = { 58,
- 57, 67, 69, 129, 90, 130, 28, 20, 30, 101,
- 19, 31, 21, 32, 92, 227, 26, 33, 224, 27,
- 225, 95, 94, 334, 95, 94, 59, 323, 355, 282,
- 141, 40, 131, 102, 288, 101, 289, 140, 133, 143,
- 144, 145, 146, 134, 135, 138, 398, 59, 63, 141,
- 141, 198, 150, 141, 141, 141, 6, 141, 130, 141,
- 263, 130, 56, 130, 56, 130, 198, 241, 242, 198,
- 141, 141, 158, 6, 141, 159, 16, 227, 130, 130,
- 327, 103, 130, 104, 351, 352, 353, 131, 59, 62,
- 131, 59, 131, 391, 131, 132, 92, 40, 132, 16,
- 132, 226, 132, 95, 94, 141, 141, 131, 131, 160,
- 161, 131, 59, 130, 130, 132, 132, 460, 152, 132,
- 147, 154, 149, 153, 216, 72, 153, 470, 127, 286,
- 287, 127, 118, 66, 128, 427, 141, 201, 184, 167,
- 201, 188, 131, 131, 130, 40, 139, 40, 127, 127,
- 132, 132, 127, 59, 167, 201, 89, 167, 201, 155,
- 285, 428, 429, 156, 389, 199, 153, 206, 128, 163,
- 166, 128, 210, 131, 165, 285, 290, 240, 285, 129,
- 292, 132, 129, 127, 127, 290, 167, 164, 128, 128,
- 291, 290, 128, 194, 290, 327, 194, 169, 101, 129,
- 129, 428, 429, 129, 170, 485, 347, 348, 488, 40,
- 490, 194, 171, 322, 127, 324, 20, 20, 172, 19,
- 19, 21, 21, 128, 128, 26, 26, 299, 27, 27,
- 101, 173, 56, 300, 129, 129, 174, 392, 301, 302,
- 303, 294, 326, 292, 294, 435, 436, 437, 297, 175,
- 463, 279, 280, 281, 128, 349, 350, 176, 20, 294,
- 177, 19, 355, 21, 198, 129, 327, 26, 191, 59,
- 27, 336, 336, 336, 92, 325, 327, 59, 61, 62,
- 63, 95, 94, 382, 383, 183, 193, 120, 190, 125,
- 59, 200, 125, 197, 56, 283, 215, 216, 217, 218,
- 219, 220, 221, 66, 120, 120, 222, 223, 120, 125,
- 125, 207, 208, 125, 28, 20, 30, 277, 19, 31,
- 21, 32, 101, 101, 26, 33, 384, 27, 322, 284,
- 324, 59, 285, 309, 311, 312, 315, 328, 334, 120,
- 340, 141, 141, 220, 125, 125, 341, 343, 206, 130,
- 130, 206, 167, 201, 354, 355, 158, 326, 215, 216,
- 217, 218, 219, 220, 221, 66, 356, 358, 222, 223,
- 308, 371, 370, 285, 374, 125, 375, 376, 131, 131,
- 377, 378, 385, 379, 380, 381, 132, 132, 386, 290,
- 395, 390, 58, 415, 31, 394, 396, 397, 406, 322,
- 408, 324, 409, 410, 412, 441, 423, 424, 434, 322,
- 443, 324, 445, 455, 461, 462, 468, 464, 471, 127,
- 127, 49, 472, 493, 473, 494, 487, 496, 326, 465,
- 499, 500, 489, 1, 101, 502, 264, 118, 326, 61,
- 184, 198, 60, 244, 348, 25, 58, 475, 53, 190,
- 327, 270, 245, 338, 359, 360, 60, 278, 387, 128,
- 128, 492, 344, 206, 393, 345, 206, 188, 206, 346,
- 129, 129, 467, 136, 223, 223, 137, 310, 245, 64,
- 223, 223, 223, 223, 223, 223, 223, 223, 223, 223,
- 223, 223, 223, 223, 253, 223, 223, 223, 223, 469,
- 275, 223, 223, 411, 318, 486, 0, 223, 223, 223,
- 223, 223, 223, 223, 223, 223, 223, 223, 223, 223,
- 223, 491, 223, 223, 223, 223, 317, 0, 0, 0,
- 0, 317, 317, 317, 317, 317, 317, 317, 317, 317,
- 317, 317, 317, 0, 0, 0, 223, 0, 317, 317,
- 0, 0, 0, 317, 304, 0, 0, 317, 317, 317,
- 317, 317, 317, 317, 317, 317, 317, 317, 317, 317,
- 0, 0, 0, 223, 0, 317, 317, 0, 0, 0,
- 317, 304, 0, 0, 317, 317, 317, 317, 317, 317,
- 317, 317, 317, 317, 317, 317, 317, 317, 126, 0,
- 0, 126, 317, 317, 0, 0, 0, 0, 304, 123,
- 0, 317, 0, 0, 124, 0, 121, 0, 126, 126,
- 0, 122, 126, 0, 317, 0, 123, 123, 0, 0,
- 123, 124, 124, 121, 121, 124, 0, 121, 122, 122,
- 0, 0, 122, 0, 0, 0, 0, 0, 0, 0,
- 0, 317, 0, 126, 126, 0, 0, 0, 0, 0,
- 0, 123, 123, 0, 0, 0, 124, 124, 121, 0,
- 0, 0, 0, 122, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 126, 0, 0, 0, 0, 0,
- 0, 0, 123, 0, 0, 0, 0, 124, 0, 121,
- 306, 56, 0, 0, 122, 0, 74, 75, 76, 77,
- 78, 79, 80, 81, 82, 83, 84, 85, 8, 9,
- 56, 10, 86, 87, 88, 74, 75, 76, 77, 78,
- 79, 80, 81, 82, 83, 84, 85, 8, 9, 56,
- 10, 86, 87, 88, 74, 75, 76, 77, 78, 79,
- 80, 81, 82, 83, 84, 85, 8, 9, 0, 10,
- 86, 87, 88, 0, 0, 89, 0, 0, 0, 0,
- 0, 56, 66, 0, 0, 0, 74, 75, 76, 77,
- 78, 79, 80, 81, 82, 83, 84, 85, 0, 0,
- 0, 66, 86, 87, 88, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 253, 0, 0, 0,
- 66, 253, 253, 253, 253, 253, 253, 253, 253, 253,
- 253, 253, 253, 253, 253, 0, 253, 253, 253, 253,
- 0, 0, 0, 0, 0, 0, 0, 0, 56, 0,
- 0, 0, 66, 74, 75, 76, 77, 78, 79, 80,
- 81, 82, 83, 84, 85, 0, 0, 0, 0, 0,
- 87, 88, 0, 0, 0, 0, 0, 0, 0, 321,
- 0, 0, 0, 56, 0, 0, 0, 253, 74, 75,
- 76, 77, 78, 79, 80, 81, 82, 83, 84, 85,
- 0, 0, 56, 0, 0, 87, 88, 74, 75, 76,
- 77, 78, 79, 80, 81, 82, 83, 0, 0, 66,
- 0, 56, 0, 0, 87, 88, 296, 75, 76, 0,
- 0, 79, 80, 81, 82, 0, 0, 0, 0, 0,
- 3, 10, 4, 5, 6, 7, 0, 0, 0, 0,
- 0, 0, 0, 0, 66, 0, 0, 0, 8, 9,
- 0, 10, 0, 0, 0, 11, 0, 0, 0, 0,
- 0, 0, 0, 66, 0, 0, 0, 0, 12, 13,
- 14, 15, 0, 0, 0, 0, 254, 16, 4, 0,
- 0, 7, 66, 0, 0, 0, 0, 0, 0, 0,
- 0, 17, 18, 0, 8, 9, 0, 10, 0, 0,
- 0, 11, 0, 254, 255, 4, 256, 257, 7, 0,
- 0, 0, 0, 0, 12, 0, 0, 0, 269, 270,
- 271, 8, 9, 0, 10, 0, 0, 0, 11, 0,
- 0, 255, 0, 256, 257, 0, 0, 17, 18, 0,
- 0, 12, 0, 0, 0, 0, 0, 0, 0, 0,
+#define TAO_YYTABLESIZE 1231
+short tao_yytable[] = { 77,
+ 76, 121, 114, 120, 87, 88, 89, 122, 31, 138,
+ 33, 162, 139, 163, 34, 35, 36, 91, 93, 297,
+ 359, 166, 167, 394, 168, 125, 171, 101, 329, 330,
+ 101, 100, 430, 98, 100, 329, 374, 484, 399, 6,
+ 46, 6, 361, 121, 174, 120, 514, 377, 340, 122,
+ 75, 138, 479, 277, 139, 398, 173, 399, 176, 177,
+ 178, 179, 316, 75, 164, 207, 181, 125, 207, 75,
+ 184, 147, 147, 185, 398, 147, 147, 147, 65, 147,
+ 202, 147, 136, 207, 16, 136, 207, 136, 79, 136,
+ 420, 415, 147, 147, 316, 300, 147, 313, 203, 314,
+ 378, 565, 136, 136, 197, 137, 136, 198, 137, 101,
+ 137, 138, 137, 100, 138, 98, 138, 377, 138, 65,
+ 69, 90, 418, 416, 75, 137, 137, 147, 147, 137,
+ 392, 138, 138, 377, 192, 138, 108, 136, 136, 204,
+ 337, 65, 68, 65, 173, 96, 392, 598, 556, 133,
+ 536, 602, 133, 385, 204, 420, 291, 204, 147, 173,
+ 137, 137, 173, 269, 109, 142, 138, 138, 136, 133,
+ 133, 291, 16, 133, 291, 359, 83, 236, 131, 110,
+ 315, 131, 113, 231, 65, 234, 155, 418, 454, 134,
+ 530, 137, 134, 240, 580, 90, 512, 138, 131, 131,
+ 46, 392, 131, 192, 133, 133, 65, 156, 200, 134,
+ 134, 200, 286, 134, 293, 354, 135, 356, 46, 135,
+ 467, 468, 469, 296, 299, 377, 200, 222, 46, 240,
+ 199, 200, 235, 131, 131, 133, 135, 135, 296, 300,
+ 135, 296, 300, 46, 134, 134, 161, 245, 335, 336,
+ 338, 340, 398, 399, 191, 351, 352, 300, 298, 192,
+ 180, 193, 172, 183, 131, 283, 192, 158, 358, 186,
+ 158, 135, 135, 359, 515, 134, 361, 188, 378, 75,
+ 585, 207, 194, 331, 404, 412, 413, 101, 414, 402,
+ 415, 100, 195, 98, 403, 386, 342, 342, 342, 400,
+ 125, 401, 135, 557, 409, 205, 101, 121, 192, 120,
+ 100, 75, 98, 122, 206, 138, 208, 359, 139, 204,
+ 209, 65, 421, 422, 210, 548, 423, 424, 411, 558,
+ 559, 125, 211, 420, 420, 550, 551, 552, 212, 338,
+ 222, 558, 559, 304, 305, 306, 307, 308, 309, 310,
+ 90, 213, 204, 311, 312, 37, 214, 173, 391, 392,
+ 393, 215, 65, 147, 147, 418, 418, 463, 464, 291,
+ 354, 216, 356, 136, 136, 304, 305, 306, 307, 308,
+ 309, 310, 90, 127, 65, 311, 312, 217, 256, 465,
+ 466, 78, 81, 82, 84, 218, 137, 137, 487, 488,
+ 127, 127, 138, 138, 127, 219, 223, 224, 230, 232,
+ 126, 242, 478, 121, 121, 120, 120, 243, 287, 122,
+ 122, 138, 138, 358, 139, 139, 248, 126, 126, 294,
+ 295, 126, 343, 298, 341, 127, 296, 125, 125, 344,
+ 133, 133, 345, 346, 347, 389, 348, 349, 367, 226,
+ 31, 498, 33, 368, 128, 499, 34, 35, 36, 395,
+ 396, 397, 126, 427, 293, 428, 127, 432, 354, 433,
+ 356, 128, 128, 434, 314, 128, 435, 443, 293, 436,
+ 134, 134, 445, 437, 446, 438, 442, 323, 449, 456,
+ 77, 523, 323, 323, 323, 323, 323, 323, 323, 323,
+ 323, 323, 323, 323, 459, 470, 128, 135, 135, 323,
+ 323, 197, 354, 471, 356, 310, 55, 457, 323, 472,
+ 474, 358, 497, 485, 482, 486, 500, 501, 504, 505,
+ 513, 517, 518, 293, 519, 240, 525, 128, 527, 528,
+ 534, 537, 533, 59, 545, 542, 549, 250, 121, 587,
+ 120, 77, 579, 567, 122, 569, 138, 581, 323, 139,
+ 582, 584, 586, 600, 590, 358, 601, 605, 251, 252,
+ 603, 608, 125, 609, 374, 611, 1, 253, 254, 293,
+ 229, 229, 255, 293, 270, 67, 229, 229, 229, 229,
+ 229, 229, 229, 229, 229, 229, 229, 229, 229, 229,
+ 124, 229, 229, 229, 229, 229, 229, 67, 310, 270,
+ 388, 229, 229, 229, 229, 229, 229, 229, 229, 229,
+ 229, 229, 229, 229, 229, 75, 229, 229, 229, 229,
+ 408, 99, 100, 354, 190, 103, 104, 105, 106, 401,
+ 204, 250, 361, 31, 369, 10, 276, 400, 323, 333,
+ 196, 344, 229, 323, 323, 323, 323, 323, 323, 323,
+ 323, 323, 323, 323, 323, 365, 251, 366, 390, 502,
+ 323, 323, 80, 460, 462, 323, 310, 229, 461, 323,
+ 323, 323, 323, 323, 323, 323, 323, 323, 323, 323,
+ 323, 323, 516, 589, 169, 170, 90, 323, 323, 444,
+ 85, 132, 258, 310, 132, 265, 323, 4, 301, 333,
+ 7, 452, 591, 543, 599, 566, 425, 160, 0, 323,
+ 0, 132, 132, 8, 9, 132, 10, 0, 0, 0,
+ 11, 0, 0, 250, 0, 266, 267, 0, 0, 0,
+ 265, 0, 4, 12, 0, 7, 323, 371, 372, 373,
+ 0, 0, 0, 0, 0, 129, 132, 132, 8, 9,
+ 0, 10, 0, 0, 0, 11, 20, 21, 250, 0,
+ 266, 267, 129, 129, 0, 265, 129, 4, 12, 0,
+ 7, 0, 268, 0, 0, 0, 0, 132, 0, 0,
+ 0, 0, 269, 8, 9, 0, 10, 130, 0, 0,
+ 11, 20, 21, 250, 0, 266, 267, 129, 129, 0,
+ 0, 0, 0, 12, 130, 130, 0, 0, 130, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 20, 21, 129, 0,
+ 0, 0, 0, 0, 0, 418, 75, 0, 0, 130,
+ 130, 98, 99, 100, 101, 102, 103, 104, 105, 106,
+ 107, 108, 109, 8, 9, 0, 10, 110, 111, 112,
+ 0, 0, 0, 0, 0, 0, 75, 0, 0, 0,
+ 130, 98, 99, 100, 101, 102, 103, 104, 105, 106,
+ 107, 108, 109, 8, 9, 0, 10, 110, 111, 112,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 90, 75, 0,
+ 0, 113, 0, 98, 99, 100, 101, 102, 103, 104,
+ 105, 106, 107, 108, 109, 8, 9, 0, 10, 110,
+ 111, 112, 0, 259, 0, 0, 0, 90, 259, 259,
+ 259, 259, 259, 259, 259, 259, 259, 259, 259, 259,
+ 259, 259, 323, 259, 259, 259, 259, 323, 323, 323,
+ 323, 323, 323, 323, 323, 323, 323, 323, 323, 0,
+ 0, 0, 0, 0, 323, 323, 0, 0, 0, 90,
+ 310, 0, 0, 323, 75, 0, 0, 0, 0, 98,
+ 99, 100, 101, 102, 103, 104, 105, 106, 107, 108,
+ 109, 0, 0, 0, 259, 0, 111, 112, 0, 0,
+ 0, 0, 0, 0, 0, 353, 0, 0, 0, 75,
+ 0, 0, 0, 323, 98, 99, 100, 101, 102, 103,
+ 104, 105, 106, 107, 108, 109, 0, 0, 75, 0,
+ 110, 111, 112, 98, 99, 100, 101, 102, 103, 104,
+ 105, 106, 107, 108, 109, 90, 0, 75, 0, 0,
+ 111, 112, 98, 99, 100, 101, 102, 103, 104, 105,
+ 106, 107, 0, 3, 0, 4, 5, 6, 7, 111,
+ 112, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 90, 8, 9, 0, 10, 0, 0, 0, 11, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 90,
+ 0, 12, 13, 14, 15, 0, 0, 0, 0, 0,
+ 16, 17, 0, 0, 18, 0, 0, 19, 90, 0,
+ 0, 265, 0, 4, 20, 21, 7, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 8,
+ 9, 0, 10, 0, 0, 0, 11, 0, 265, 250,
+ 4, 266, 267, 7, 0, 0, 0, 0, 0, 12,
+ 0, 0, 0, 371, 372, 373, 8, 9, 0, 10,
+ 0, 0, 0, 11, 0, 0, 250, 0, 266, 267,
+ 0, 0, 20, 21, 0, 0, 12, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 17, 18,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 20,
+ 21,
};
short tao_yycheck[] = { 12,
- 12, 17, 18, 48, 25, 48, 2, 2, 2, 25,
- 2, 2, 2, 2, 41, 40, 2, 2, 43, 2,
- 45, 41, 41, 41, 44, 44, 58, 41, 59, 227,
- 51, 123, 48, 59, 43, 51, 45, 50, 48, 52,
- 53, 54, 55, 48, 48, 48, 373, 58, 59, 37,
- 38, 44, 65, 41, 42, 43, 260, 45, 38, 47,
- 59, 41, 257, 43, 257, 45, 59, 195, 196, 62,
- 58, 59, 262, 260, 62, 265, 303, 40, 58, 59,
- 258, 59, 62, 59, 290, 291, 292, 38, 58, 59,
- 41, 123, 43, 364, 45, 38, 123, 123, 41, 303,
- 43, 126, 45, 123, 123, 93, 94, 58, 59, 262,
- 263, 62, 123, 93, 94, 58, 59, 444, 323, 62,
- 59, 323, 61, 328, 123, 58, 328, 454, 38, 329,
- 330, 41, 276, 328, 59, 256, 124, 41, 151, 44,
- 44, 157, 93, 94, 124, 123, 257, 123, 58, 59,
- 93, 94, 62, 123, 59, 59, 302, 62, 62, 123,
- 44, 282, 283, 123, 362, 178, 328, 180, 38, 44,
- 60, 41, 185, 124, 113, 59, 44, 193, 62, 38,
- 37, 124, 41, 93, 94, 42, 60, 62, 58, 59,
- 47, 59, 62, 41, 62, 373, 44, 123, 214, 58,
- 59, 282, 283, 62, 59, 476, 286, 287, 479, 301,
- 481, 59, 59, 258, 124, 258, 211, 212, 59, 211,
- 212, 211, 212, 93, 94, 211, 212, 243, 211, 212,
- 246, 59, 257, 243, 93, 94, 59, 365, 243, 243,
- 243, 41, 258, 91, 44, 289, 290, 291, 243, 59,
- 448, 224, 225, 226, 124, 288, 289, 59, 253, 59,
- 59, 253, 293, 253, 257, 124, 444, 253, 60, 301,
- 253, 289, 290, 291, 301, 289, 454, 13, 14, 14,
- 15, 301, 301, 338, 339, 123, 301, 41, 262, 38,
- 301, 123, 41, 40, 257, 124, 321, 322, 323, 324,
- 325, 326, 327, 328, 58, 59, 331, 332, 62, 58,
- 59, 123, 123, 62, 310, 310, 310, 44, 310, 310,
- 310, 310, 338, 339, 310, 310, 342, 310, 373, 94,
- 373, 301, 38, 61, 44, 91, 257, 285, 125, 93,
- 125, 329, 330, 125, 93, 94, 59, 41, 361, 329,
- 330, 364, 257, 257, 62, 62, 262, 373, 321, 322,
- 323, 324, 325, 326, 327, 328, 62, 125, 331, 332,
- 125, 59, 125, 257, 59, 124, 59, 59, 329, 330,
- 59, 59, 41, 59, 59, 257, 329, 330, 59, 257,
- 44, 125, 405, 405, 125, 125, 125, 257, 40, 444,
- 123, 444, 59, 93, 40, 292, 41, 289, 41, 454,
- 44, 454, 41, 41, 44, 59, 125, 58, 44, 329,
- 330, 125, 40, 40, 293, 41, 58, 323, 444, 450,
- 41, 44, 59, 0, 450, 323, 59, 257, 454, 123,
- 59, 41, 123, 41, 257, 125, 459, 459, 125, 59,
- 41, 125, 125, 41, 59, 41, 14, 214, 361, 329,
- 330, 483, 283, 476, 366, 284, 479, 483, 481, 285,
- 329, 330, 451, 48, 256, 257, 48, 248, 198, 15,
- 262, 263, 264, 265, 266, 267, 268, 269, 270, 271,
- 272, 273, 274, 275, 209, 277, 278, 279, 280, 453,
- 212, 256, 257, 403, 252, 477, -1, 262, 263, 264,
- 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
- 275, 482, 277, 278, 279, 280, 257, -1, -1, -1,
- -1, 262, 263, 264, 265, 266, 267, 268, 269, 270,
- 271, 272, 273, -1, -1, -1, 328, -1, 279, 280,
- -1, -1, -1, 257, 285, -1, -1, 288, 262, 263,
- 264, 265, 266, 267, 268, 269, 270, 271, 272, 273,
- -1, -1, -1, 328, -1, 279, 280, -1, -1, -1,
- 257, 285, -1, -1, 288, 262, 263, 264, 265, 266,
- 267, 268, 269, 270, 271, 272, 273, 328, 38, -1,
- -1, 41, 279, 280, -1, -1, -1, -1, 285, 41,
- -1, 288, -1, -1, 41, -1, 41, -1, 58, 59,
- -1, 41, 62, -1, 328, -1, 58, 59, -1, -1,
- 62, 58, 59, 58, 59, 62, -1, 62, 58, 59,
- -1, -1, 62, -1, -1, -1, -1, -1, -1, -1,
- -1, 328, -1, 93, 94, -1, -1, -1, -1, -1,
- -1, 93, 94, -1, -1, -1, 93, 94, 93, -1,
- -1, -1, -1, 93, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 124, -1, -1, -1, -1, -1,
- -1, -1, 124, -1, -1, -1, -1, 124, -1, 124,
- 256, 257, -1, -1, 124, -1, 262, 263, 264, 265,
+ 12, 28, 28, 28, 17, 18, 19, 28, 2, 28,
+ 2, 67, 28, 67, 2, 2, 2, 20, 21, 232,
+ 271, 67, 67, 316, 67, 28, 67, 41, 246, 247,
+ 44, 41, 352, 41, 44, 41, 59, 430, 301, 260,
+ 123, 260, 59, 70, 70, 70, 491, 123, 41, 70,
+ 257, 70, 426, 221, 70, 301, 69, 320, 71, 72,
+ 73, 74, 40, 257, 67, 41, 79, 70, 44, 257,
+ 83, 37, 38, 86, 320, 41, 42, 43, 58, 45,
+ 44, 47, 38, 59, 303, 41, 62, 43, 307, 45,
+ 58, 59, 58, 59, 40, 238, 62, 43, 62, 45,
+ 123, 546, 58, 59, 262, 38, 62, 265, 41, 123,
+ 43, 38, 45, 123, 41, 123, 43, 285, 45, 58,
+ 59, 328, 58, 59, 257, 58, 59, 93, 94, 62,
+ 257, 58, 59, 301, 328, 62, 59, 93, 94, 44,
+ 273, 58, 59, 123, 44, 58, 273, 592, 541, 38,
+ 524, 596, 41, 296, 59, 123, 44, 62, 124, 59,
+ 93, 94, 62, 59, 59, 276, 93, 94, 124, 58,
+ 59, 59, 303, 62, 62, 426, 307, 190, 38, 59,
+ 126, 41, 302, 186, 123, 188, 123, 123, 313, 38,
+ 510, 124, 41, 196, 568, 328, 489, 124, 58, 59,
+ 123, 328, 62, 328, 93, 94, 123, 123, 41, 58,
+ 59, 44, 225, 62, 227, 271, 38, 271, 301, 41,
+ 402, 403, 404, 44, 237, 301, 59, 123, 123, 232,
+ 262, 263, 189, 93, 94, 124, 58, 59, 59, 41,
+ 62, 62, 44, 123, 93, 94, 59, 204, 251, 252,
+ 253, 254, 329, 330, 323, 268, 269, 59, 91, 328,
+ 78, 323, 257, 81, 124, 222, 328, 62, 271, 58,
+ 65, 93, 94, 524, 492, 124, 293, 58, 301, 257,
+ 573, 257, 123, 289, 37, 331, 331, 301, 331, 42,
+ 331, 301, 123, 301, 47, 298, 289, 290, 291, 43,
+ 303, 45, 124, 256, 331, 60, 320, 334, 328, 334,
+ 320, 257, 320, 334, 60, 334, 123, 568, 334, 137,
+ 59, 301, 335, 336, 59, 538, 339, 340, 331, 282,
+ 283, 334, 59, 301, 302, 289, 290, 291, 59, 342,
+ 158, 282, 283, 321, 322, 323, 324, 325, 326, 327,
+ 328, 59, 257, 331, 332, 125, 59, 257, 313, 314,
+ 315, 59, 301, 329, 330, 301, 302, 398, 399, 257,
+ 426, 59, 426, 329, 330, 321, 322, 323, 324, 325,
+ 326, 327, 328, 41, 301, 331, 332, 59, 125, 400,
+ 401, 13, 14, 14, 15, 59, 329, 330, 440, 441,
+ 58, 59, 329, 330, 62, 59, 123, 123, 123, 301,
+ 41, 262, 425, 440, 441, 440, 441, 60, 123, 440,
+ 441, 440, 441, 426, 440, 441, 40, 58, 59, 123,
+ 123, 62, 285, 320, 312, 93, 257, 440, 441, 59,
+ 329, 330, 59, 59, 59, 44, 59, 59, 59, 125,
+ 444, 454, 444, 59, 41, 458, 444, 444, 444, 124,
+ 94, 38, 93, 59, 477, 40, 124, 59, 524, 59,
+ 524, 58, 59, 59, 125, 62, 59, 61, 491, 59,
+ 329, 330, 44, 59, 91, 59, 59, 257, 257, 125,
+ 503, 503, 262, 263, 264, 265, 266, 267, 268, 269,
+ 270, 271, 272, 273, 41, 62, 93, 329, 330, 279,
+ 280, 262, 568, 62, 568, 285, 125, 125, 288, 62,
+ 125, 524, 125, 257, 292, 257, 41, 59, 41, 289,
+ 125, 125, 44, 546, 125, 538, 41, 124, 40, 40,
+ 59, 44, 123, 125, 44, 93, 41, 284, 575, 575,
+ 575, 564, 564, 41, 575, 41, 575, 44, 328, 575,
+ 293, 59, 58, 40, 125, 568, 58, 323, 305, 306,
+ 59, 41, 575, 44, 125, 323, 0, 314, 315, 592,
+ 256, 257, 319, 596, 59, 123, 262, 263, 264, 265,
266, 267, 268, 269, 270, 271, 272, 273, 274, 275,
- 257, 277, 278, 279, 280, 262, 263, 264, 265, 266,
- 267, 268, 269, 270, 271, 272, 273, 274, 275, 257,
- 277, 278, 279, 280, 262, 263, 264, 265, 266, 267,
- 268, 269, 270, 271, 272, 273, 274, 275, -1, 277,
- 278, 279, 280, -1, -1, 302, -1, -1, -1, -1,
- -1, 257, 328, -1, -1, -1, 262, 263, 264, 265,
- 266, 267, 268, 269, 270, 271, 272, 273, -1, -1,
- -1, 328, 278, 279, 280, -1, -1, -1, -1, -1,
+ 257, 277, 278, 279, 280, 256, 257, 320, 285, 125,
+ 257, 262, 263, 264, 265, 266, 267, 268, 269, 270,
+ 271, 272, 273, 274, 275, 257, 277, 278, 279, 280,
+ 262, 263, 264, 257, 59, 267, 268, 269, 270, 123,
+ 41, 41, 59, 125, 125, 277, 125, 123, 257, 41,
+ 59, 41, 328, 262, 263, 264, 265, 266, 267, 268,
+ 269, 270, 271, 272, 273, 59, 125, 41, 303, 477,
+ 279, 280, 14, 395, 397, 257, 285, 328, 396, 288,
+ 262, 263, 264, 265, 266, 267, 268, 269, 270, 271,
+ 272, 273, 493, 576, 67, 67, 328, 279, 280, 380,
+ 15, 38, 220, 285, 41, 256, 288, 258, 239, 249,
+ 261, 384, 578, 532, 593, 547, 342, 65, -1, 328,
+ -1, 58, 59, 274, 275, 62, 277, -1, -1, -1,
+ 281, -1, -1, 284, -1, 286, 287, -1, -1, -1,
+ 256, -1, 258, 294, -1, 261, 328, 298, 299, 300,
+ -1, -1, -1, -1, -1, 41, 93, 94, 274, 275,
+ -1, 277, -1, -1, -1, 281, 317, 318, 284, -1,
+ 286, 287, 58, 59, -1, 256, 62, 258, 294, -1,
+ 261, -1, 298, -1, -1, -1, -1, 124, -1, -1,
+ -1, -1, 308, 274, 275, -1, 277, 41, -1, -1,
+ 281, 317, 318, 284, -1, 286, 287, 93, 94, -1,
+ -1, -1, -1, 294, 58, 59, -1, -1, 62, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 317, 318, 124, -1,
+ -1, -1, -1, -1, -1, 256, 257, -1, -1, 93,
+ 94, 262, 263, 264, 265, 266, 267, 268, 269, 270,
+ 271, 272, 273, 274, 275, -1, 277, 278, 279, 280,
-1, -1, -1, -1, -1, -1, 257, -1, -1, -1,
- 328, 262, 263, 264, 265, 266, 267, 268, 269, 270,
+ 124, 262, 263, 264, 265, 266, 267, 268, 269, 270,
271, 272, 273, 274, 275, -1, 277, 278, 279, 280,
- -1, -1, -1, -1, -1, -1, -1, -1, 257, -1,
- -1, -1, 328, 262, 263, 264, 265, 266, 267, 268,
- 269, 270, 271, 272, 273, -1, -1, -1, -1, -1,
- 279, 280, -1, -1, -1, -1, -1, -1, -1, 288,
- -1, -1, -1, 257, -1, -1, -1, 328, 262, 263,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 328, 257, -1,
+ -1, 302, -1, 262, 263, 264, 265, 266, 267, 268,
+ 269, 270, 271, 272, 273, 274, 275, -1, 277, 278,
+ 279, 280, -1, 257, -1, -1, -1, 328, 262, 263,
264, 265, 266, 267, 268, 269, 270, 271, 272, 273,
- -1, -1, 257, -1, -1, 279, 280, 262, 263, 264,
- 265, 266, 267, 268, 269, 270, 271, -1, -1, 328,
- -1, 257, -1, -1, 279, 280, 262, 263, 264, -1,
- -1, 267, 268, 269, 270, -1, -1, -1, -1, -1,
- 256, 277, 258, 259, 260, 261, -1, -1, -1, -1,
- -1, -1, -1, -1, 328, -1, -1, -1, 274, 275,
- -1, 277, -1, -1, -1, 281, -1, -1, -1, -1,
- -1, -1, -1, 328, -1, -1, -1, -1, 294, 295,
- 296, 297, -1, -1, -1, -1, 256, 303, 258, -1,
- -1, 261, 328, -1, -1, -1, -1, -1, -1, -1,
- -1, 317, 318, -1, 274, 275, -1, 277, -1, -1,
- -1, 281, -1, 256, 284, 258, 286, 287, 261, -1,
- -1, -1, -1, -1, 294, -1, -1, -1, 298, 299,
- 300, 274, 275, -1, 277, -1, -1, -1, 281, -1,
- -1, 284, -1, 286, 287, -1, -1, 317, 318, -1,
- -1, 294, -1, -1, -1, -1, -1, -1, -1, -1,
+ 274, 275, 257, 277, 278, 279, 280, 262, 263, 264,
+ 265, 266, 267, 268, 269, 270, 271, 272, 273, -1,
+ -1, -1, -1, -1, 279, 280, -1, -1, -1, 328,
+ 285, -1, -1, 288, 257, -1, -1, -1, -1, 262,
+ 263, 264, 265, 266, 267, 268, 269, 270, 271, 272,
+ 273, -1, -1, -1, 328, -1, 279, 280, -1, -1,
+ -1, -1, -1, -1, -1, 288, -1, -1, -1, 257,
+ -1, -1, -1, 328, 262, 263, 264, 265, 266, 267,
+ 268, 269, 270, 271, 272, 273, -1, -1, 257, -1,
+ 278, 279, 280, 262, 263, 264, 265, 266, 267, 268,
+ 269, 270, 271, 272, 273, 328, -1, 257, -1, -1,
+ 279, 280, 262, 263, 264, 265, 266, 267, 268, 269,
+ 270, 271, -1, 256, -1, 258, 259, 260, 261, 279,
+ 280, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 328, 274, 275, -1, 277, -1, -1, -1, 281, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 328,
+ -1, 294, 295, 296, 297, -1, -1, -1, -1, -1,
+ 303, 304, -1, -1, 307, -1, -1, 310, 328, -1,
+ -1, 256, -1, 258, 317, 318, 261, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 274,
+ 275, -1, 277, -1, -1, -1, 281, -1, 256, 284,
+ 258, 286, 287, 261, -1, -1, -1, -1, -1, 294,
+ -1, -1, -1, 298, 299, 300, 274, 275, -1, 277,
+ -1, -1, -1, 281, -1, -1, 284, -1, 286, 287,
+ -1, -1, 317, 318, -1, -1, 294, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 317, 318,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 317,
+ 318,
};
#define TAO_YYFINAL 1
#ifndef TAO_YYDEBUG
@@ -717,25 +802,31 @@ const char *tao_yyrule[] = {
"$$8 :",
"definition : value_def $$8 ';'",
"$$9 :",
-"definition : error $$9 ';'",
+"definition : component $$9 ';'",
"$$10 :",
+"definition : home_decl $$10 ';'",
"$$11 :",
+"definition : event $$11 ';'",
"$$12 :",
+"definition : error $$12 ';'",
"$$13 :",
-"module : IDL_MODULE $$10 IDENTIFIER $$11 '{' $$12 definitions $$13 '}'",
-"interface_def : interface",
-"interface_def : interface_forward",
"$$14 :",
"$$15 :",
"$$16 :",
-"interface : interface_header $$14 '{' $$15 exports $$16 '}'",
+"module : IDL_MODULE $$13 IDENTIFIER $$14 '{' $$15 definitions $$16 '}'",
+"interface_def : interface",
+"interface_def : interface_forward",
"$$17 :",
-"interface_decl : IDL_INTERFACE $$17 id",
+"$$18 :",
+"$$19 :",
+"interface : interface_header $$17 '{' $$18 exports $$19 '}'",
+"$$20 :",
+"interface_decl : IDL_INTERFACE $$20 id",
"interface_header : interface_decl inheritance_spec",
"interface_header : IDL_LOCAL interface_decl inheritance_spec",
"interface_header : IDL_ABSTRACT interface_decl inheritance_spec",
-"$$18 :",
-"inheritance_spec : ':' $$18 at_least_one_scoped_name",
+"$$21 :",
+"inheritance_spec : ':' $$21 at_least_one_scoped_name",
"inheritance_spec :",
"value_def : valuetype",
"value_def : value_abs_decl",
@@ -743,20 +834,20 @@ const char *tao_yyrule[] = {
"value_def : value_box_decl",
"valuetype : IDL_CUSTOM value_concrete_decl",
"valuetype : value_concrete_decl",
-"$$19 :",
-"$$20 :",
-"$$21 :",
-"value_concrete_decl : value_header $$19 '{' $$20 value_elements $$21 '}'",
"$$22 :",
"$$23 :",
"$$24 :",
-"value_abs_decl : IDL_ABSTRACT value_header $$22 '{' $$23 exports $$24 '}'",
-"value_header : value_decl opt_truncatable inheritance_spec supports_spec",
+"value_concrete_decl : value_header $$22 '{' $$23 value_elements $$24 '}'",
"$$25 :",
-"value_decl : IDL_VALUETYPE $$25 id",
+"$$26 :",
+"$$27 :",
+"value_abs_decl : IDL_ABSTRACT value_header $$25 '{' $$26 exports $$27 '}'",
+"value_header : value_decl opt_truncatable inheritance_spec supports_spec",
+"$$28 :",
+"value_decl : IDL_VALUETYPE $$28 id",
"opt_truncatable : IDL_TRUNCATABLE",
"opt_truncatable :",
-"supports_spec : IDL_SUPPORTS scoped_name",
+"supports_spec : IDL_SUPPORTS at_least_one_scoped_name",
"supports_spec :",
"value_forward_decl : IDL_ABSTRACT value_decl",
"value_forward_decl : value_decl",
@@ -766,46 +857,46 @@ const char *tao_yyrule[] = {
"value_element : state_member",
"value_element : export",
"value_element : init_decl ';'",
-"$$26 :",
-"state_member : IDL_PUBLIC $$26 member_i",
-"$$27 :",
-"state_member : IDL_PRIVATE $$27 member_i",
-"exports : exports export",
-"exports :",
-"$$28 :",
-"export : type_dcl $$28 ';'",
"$$29 :",
-"export : typeid_dcl $$29 ';'",
+"state_member : IDL_PUBLIC $$29 member_i",
"$$30 :",
-"export : typeprefix_dcl $$30 ';'",
+"state_member : IDL_PRIVATE $$30 member_i",
+"exports : exports export",
+"exports :",
"$$31 :",
-"export : const_dcl $$31 ';'",
+"export : type_dcl $$31 ';'",
"$$32 :",
-"export : exception $$32 ';'",
+"export : typeid_dcl $$32 ';'",
"$$33 :",
-"export : attribute $$33 ';'",
+"export : typeprefix_dcl $$33 ';'",
"$$34 :",
-"export : operation $$34 ';'",
+"export : const_dcl $$34 ';'",
"$$35 :",
-"export : error $$35 ';'",
-"at_least_one_scoped_name : scoped_name scoped_names",
+"export : exception $$35 ';'",
"$$36 :",
-"scoped_names : scoped_names ',' $$36 scoped_name",
-"scoped_names :",
-"scoped_name : id",
+"export : attribute $$36 ';'",
"$$37 :",
-"scoped_name : IDL_SCOPE_DELIMITOR $$37 id",
+"export : operation $$37 ';'",
"$$38 :",
-"scoped_name : scoped_name IDL_SCOPE_DELIMITOR $$38 id",
+"export : error $$38 ';'",
+"at_least_one_scoped_name : scoped_name scoped_names",
+"$$39 :",
+"scoped_names : scoped_names ',' $$39 scoped_name",
+"scoped_names :",
+"scoped_name : id",
+"$$40 :",
+"scoped_name : IDL_SCOPE_DELIMITOR $$40 id",
+"$$41 :",
+"scoped_name : scoped_name IDL_SCOPE_DELIMITOR $$41 id",
"id : IDENTIFIER",
"interface_forward : interface_decl",
"interface_forward : IDL_LOCAL interface_decl",
"interface_forward : IDL_ABSTRACT interface_decl",
-"$$39 :",
-"$$40 :",
-"$$41 :",
"$$42 :",
-"const_dcl : IDL_CONST $$39 const_type $$40 id $$41 '=' $$42 expression",
+"$$43 :",
+"$$44 :",
+"$$45 :",
+"const_dcl : IDL_CONST $$42 const_type $$43 id $$44 '=' $$45 expression",
"const_type : integer_type",
"const_type : char_type",
"const_type : octet_type",
@@ -850,15 +941,15 @@ const char *tao_yyrule[] = {
"literal : IDL_TRUETOK",
"literal : IDL_FALSETOK",
"positive_int_expr : const_expr",
-"$$43 :",
-"type_dcl : IDL_TYPEDEF $$43 type_declarator",
+"$$46 :",
+"type_dcl : IDL_TYPEDEF $$46 type_declarator",
"type_dcl : struct_type",
"type_dcl : union_type",
"type_dcl : enum_type",
"type_dcl : IDL_NATIVE simple_declarator",
"type_dcl : constructed_forward_type_spec",
-"$$44 :",
-"type_declarator : type_spec $$44 at_least_one_declarator",
+"$$47 :",
+"type_declarator : type_spec $$47 at_least_one_declarator",
"type_spec : simple_type_spec",
"type_spec : constructed_type_spec",
"simple_type_spec : base_type_spec",
@@ -881,14 +972,14 @@ const char *tao_yyrule[] = {
"constructed_forward_type_spec : struct_forward_type",
"constructed_forward_type_spec : union_forward_type",
"at_least_one_declarator : declarator declarators",
-"$$45 :",
-"declarators : declarators ',' $$45 declarator",
+"$$48 :",
+"declarators : declarators ',' $$48 declarator",
"declarators :",
"declarator : simple_declarator",
"declarator : complex_declarator",
"at_least_one_simple_declarator : simple_declarator simple_declarators",
-"$$46 :",
-"simple_declarators : simple_declarators ',' $$46 simple_declarator",
+"$$49 :",
+"simple_declarators : simple_declarators ',' $$49 simple_declarator",
"simple_declarators :",
"simple_declarator : id",
"complex_declarator : array_declarator",
@@ -910,31 +1001,31 @@ const char *tao_yyrule[] = {
"boolean_type : IDL_BOOLEAN",
"any_type : IDL_ANY",
"object_type : IDL_OBJECT",
-"$$47 :",
-"struct_decl : IDL_STRUCT $$47 id",
-"$$48 :",
-"$$49 :",
"$$50 :",
-"struct_type : struct_decl $$48 '{' $$49 at_least_one_member $$50 '}'",
-"at_least_one_member : member members",
-"members : members member",
-"members :",
+"struct_decl : IDL_STRUCT $$50 id",
"$$51 :",
-"member : $$51 member_i",
"$$52 :",
"$$53 :",
-"member_i : type_spec $$52 at_least_one_declarator $$53 ';'",
+"struct_type : struct_decl $$51 '{' $$52 at_least_one_member $$53 '}'",
+"at_least_one_member : member members",
+"members : members member",
+"members :",
"$$54 :",
-"member_i : error $$54 ';'",
+"member : $$54 member_i",
"$$55 :",
-"union_decl : IDL_UNION $$55 id",
"$$56 :",
+"member_i : type_spec $$55 at_least_one_declarator $$56 ';'",
"$$57 :",
+"member_i : error $$57 ';'",
"$$58 :",
+"union_decl : IDL_UNION $$58 id",
"$$59 :",
"$$60 :",
"$$61 :",
-"union_type : union_decl IDL_SWITCH $$56 '(' $$57 switch_type_spec $$58 ')' $$59 '{' $$60 at_least_one_case_branch $$61 '}'",
+"$$62 :",
+"$$63 :",
+"$$64 :",
+"union_type : union_decl IDL_SWITCH $$59 '(' $$60 switch_type_spec $$61 ')' $$62 '{' $$63 at_least_one_case_branch $$64 '}'",
"switch_type_spec : integer_type",
"switch_type_spec : char_type",
"switch_type_spec : octet_type",
@@ -944,103 +1035,103 @@ const char *tao_yyrule[] = {
"at_least_one_case_branch : case_branch case_branches",
"case_branches : case_branches case_branch",
"case_branches :",
-"$$62 :",
-"$$63 :",
-"case_branch : at_least_one_case_label $$62 element_spec $$63 ';'",
-"$$64 :",
-"case_branch : error $$64 ';'",
-"at_least_one_case_label : case_label case_labels",
-"case_labels : case_labels case_label",
-"case_labels :",
"$$65 :",
-"case_label : IDL_DEFAULT $$65 ':'",
"$$66 :",
+"case_branch : at_least_one_case_label $$65 element_spec $$66 ';'",
"$$67 :",
-"case_label : IDL_CASE $$66 const_expr $$67 ':'",
+"case_branch : error $$67 ';'",
+"at_least_one_case_label : case_label case_labels",
+"case_labels : case_labels case_label",
+"case_labels :",
"$$68 :",
-"element_spec : type_spec $$68 declarator",
-"struct_forward_type : struct_decl",
-"union_forward_type : union_decl",
+"case_label : IDL_DEFAULT $$68 ':'",
"$$69 :",
"$$70 :",
+"case_label : IDL_CASE $$69 const_expr $$70 ':'",
"$$71 :",
+"element_spec : type_spec $$71 declarator",
+"struct_forward_type : struct_decl",
+"union_forward_type : union_decl",
"$$72 :",
-"enum_type : IDL_ENUM $$69 id $$70 '{' $$71 at_least_one_enumerator $$72 '}'",
-"at_least_one_enumerator : enumerator enumerators",
"$$73 :",
-"enumerators : enumerators ',' $$73 enumerator",
-"enumerators :",
-"enumerator : IDENTIFIER",
"$$74 :",
"$$75 :",
-"sequence_type_spec : seq_head ',' $$74 positive_int_expr $$75 '>'",
-"sequence_type_spec : seq_head '>'",
+"enum_type : IDL_ENUM $$72 id $$73 '{' $$74 at_least_one_enumerator $$75 '}'",
+"at_least_one_enumerator : enumerator enumerators",
"$$76 :",
+"enumerators : enumerators ',' $$76 enumerator",
+"enumerators :",
+"enumerator : IDENTIFIER",
"$$77 :",
-"seq_head : IDL_SEQUENCE $$76 '<' $$77 simple_type_spec",
"$$78 :",
+"sequence_type_spec : seq_head ',' $$77 positive_int_expr $$78 '>'",
+"sequence_type_spec : seq_head '>'",
"$$79 :",
-"string_type_spec : string_head '<' $$78 positive_int_expr $$79 '>'",
-"string_type_spec : string_head",
-"string_head : IDL_STRING",
"$$80 :",
+"seq_head : IDL_SEQUENCE $$79 '<' $$80 simple_type_spec",
"$$81 :",
-"wstring_type_spec : wstring_head '<' $$80 positive_int_expr $$81 '>'",
+"$$82 :",
+"string_type_spec : string_head '<' $$81 positive_int_expr $$82 '>'",
+"string_type_spec : string_head",
+"string_head : IDL_STRING",
+"$$83 :",
+"$$84 :",
+"wstring_type_spec : wstring_head '<' $$83 positive_int_expr $$84 '>'",
"wstring_type_spec : wstring_head",
"wstring_head : IDL_WSTRING",
-"$$82 :",
-"array_declarator : id $$82 at_least_one_array_dim",
+"$$85 :",
+"array_declarator : id $$85 at_least_one_array_dim",
"at_least_one_array_dim : array_dim array_dims",
"array_dims : array_dims array_dim",
"array_dims :",
-"$$83 :",
-"$$84 :",
-"array_dim : '[' $$83 positive_int_expr $$84 ']'",
-"$$85 :",
"$$86 :",
-"attribute : opt_readonly IDL_ATTRIBUTE $$85 param_type_spec $$86 at_least_one_simple_declarator",
-"opt_readonly : IDL_READONLY",
-"opt_readonly :",
"$$87 :",
+"array_dim : '[' $$86 positive_int_expr $$87 ']'",
"$$88 :",
"$$89 :",
+"attribute : opt_readonly IDL_ATTRIBUTE $$88 param_type_spec $$89 at_least_one_simple_declarator",
+"opt_readonly : IDL_READONLY",
+"opt_readonly :",
"$$90 :",
-"exception : IDL_EXCEPTION $$87 id $$88 '{' $$89 members $$90 '}'",
"$$91 :",
"$$92 :",
"$$93 :",
+"exception : IDL_EXCEPTION $$90 id $$91 '{' $$92 members $$93 '}'",
"$$94 :",
-"operation : opt_op_attribute op_type_spec $$91 IDENTIFIER $$92 parameter_list $$93 opt_raises $$94 opt_context",
+"$$95 :",
+"$$96 :",
+"$$97 :",
+"operation : opt_op_attribute op_type_spec $$94 IDENTIFIER $$95 parameter_list $$96 opt_raises $$97 opt_context",
"opt_op_attribute : IDL_ONEWAY",
"opt_op_attribute : IDL_IDEMPOTENT",
"opt_op_attribute :",
"op_type_spec : param_type_spec",
"op_type_spec : IDL_VOID",
-"$$95 :",
-"$$96 :",
-"init_decl : IDL_FACTORY $$95 IDENTIFIER $$96 init_parameter_list",
-"$$97 :",
-"init_parameter_list : '(' $$97 ')'",
"$$98 :",
-"init_parameter_list : '(' $$98 at_least_one_in_parameter ')'",
-"at_least_one_in_parameter : in_parameter in_parameters",
"$$99 :",
-"in_parameters : in_parameters ',' $$99 in_parameter",
-"in_parameters :",
+"init_decl : IDL_FACTORY $$98 IDENTIFIER $$99 init_parameter_list",
"$$100 :",
+"init_parameter_list : '(' $$100 ')'",
"$$101 :",
-"in_parameter : IDL_IN $$100 param_type_spec $$101 declarator",
+"init_parameter_list : '(' $$101 at_least_one_in_parameter ')'",
+"at_least_one_in_parameter : in_parameter in_parameters",
"$$102 :",
-"parameter_list : '(' $$102 ')'",
+"in_parameters : in_parameters ',' $$102 in_parameter",
+"in_parameters :",
"$$103 :",
-"parameter_list : '(' $$103 at_least_one_parameter ')'",
-"at_least_one_parameter : parameter parameters",
"$$104 :",
-"parameters : parameters ',' $$104 parameter",
-"parameters :",
+"in_parameter : IDL_IN $$103 param_type_spec $$104 declarator",
"$$105 :",
+"parameter_list : '(' $$105 ')'",
"$$106 :",
-"parameter : direction $$105 param_type_spec $$106 declarator",
+"parameter_list : '(' $$106 at_least_one_parameter ')'",
+"at_least_one_parameter : parameter parameters",
+"$$107 :",
+"parameters : parameters ',' $$107 parameter",
+"parameters :",
+"$$108 :",
+"$$109 :",
+"parameter : direction $$108 param_type_spec $$109 declarator",
"param_type_spec : base_type_spec",
"param_type_spec : string_type_spec",
"param_type_spec : wstring_type_spec",
@@ -1048,20 +1139,73 @@ const char *tao_yyrule[] = {
"direction : IDL_IN",
"direction : IDL_OUT",
"direction : IDL_INOUT",
-"$$107 :",
-"$$108 :",
-"opt_raises : IDL_RAISES $$107 '(' $$108 at_least_one_scoped_name ')'",
-"opt_raises :",
-"$$109 :",
"$$110 :",
-"opt_context : IDL_CONTEXT $$109 '(' $$110 at_least_one_string_literal ')'",
+"$$111 :",
+"opt_raises : IDL_RAISES $$110 '(' $$111 at_least_one_scoped_name ')'",
+"opt_raises :",
+"$$112 :",
+"$$113 :",
+"opt_context : IDL_CONTEXT $$112 '(' $$113 at_least_one_string_literal ')'",
"opt_context :",
"at_least_one_string_literal : IDL_STRING_LITERAL string_literals",
-"$$111 :",
-"string_literals : string_literals ',' $$111 IDL_STRING_LITERAL",
+"$$114 :",
+"string_literals : string_literals ',' $$114 IDL_STRING_LITERAL",
"string_literals :",
"typeid_dcl : IDL_TYPEID scoped_name IDL_STRING_LITERAL",
"typeprefix_dcl : IDL_TYPEPREFIX scoped_name IDL_STRING_LITERAL",
+"component : component_decl",
+"component : component_forward_decl",
+"component_forward_decl : IDL_COMPONENT id",
+"component_decl : component_header '{' component_exports '}'",
+"component_header : IDL_COMPONENT id component_inheritance_spec supports_spec",
+"component_inheritance_spec : ':' scoped_name",
+"component_inheritance_spec :",
+"component_exports : component_exports component_export",
+"component_exports :",
+"component_export : provides_decl ';'",
+"component_export : uses_decl ';'",
+"component_export : emits_decl ';'",
+"component_export : publishes_decl ';'",
+"component_export : consumes_decl ';'",
+"component_export : attribute ';'",
+"provides_decl : IDL_PROVIDES interface_type id",
+"interface_type : scoped_name",
+"interface_type : IDL_OBJECT",
+"uses_decl : IDL_USES opt_multiple interface_type id",
+"opt_multiple : IDL_MULTIPLE",
+"opt_multiple :",
+"emits_decl : IDL_EMITS scoped_name id",
+"publishes_decl : IDL_PUBLISHES scoped_name id",
+"consumes_decl : IDL_CONSUMES scoped_name id",
+"home_decl : home_header home_body",
+"home_header : IDL_HOME id home_inheritance_spec supports_spec IDL_MANAGES scoped_name primary_key_spec",
+"home_inheritance_spec : ':' scoped_name",
+"home_inheritance_spec :",
+"primary_key_spec : IDL_PRIMARYKEY scoped_name",
+"primary_key_spec :",
+"home_body : '{' home_exports '}'",
+"home_exports : home_exports home_export",
+"home_exports :",
+"home_export : export",
+"home_export : factory_decl ';'",
+"home_export : finder_decl ';'",
+"factory_decl : IDL_FACTORY id init_parameter_list opt_raises",
+"finder_decl : IDL_FINDER id init_parameter_list opt_raises",
+"event : event_decl",
+"event : event_abs_decl",
+"event : event_forward_decl",
+"event_forward_decl : event_abs_forward_decl",
+"event_forward_decl : event_concrete_forward_decl",
+"event_concrete_forward_decl : IDL_EVENTTYPE id",
+"event_abs_forward_decl : IDL_ABSTRACT IDL_EVENTTYPE id",
+"event_abs_decl : event_abs_header event_rest_of_header '{' exports '}'",
+"event_abs_header : IDL_ABSTRACT IDL_EVENTTYPE id",
+"event_custom_header : IDL_CUSTOM IDL_EVENTTYPE id",
+"event_plain_header : IDL_EVENTTYPE id",
+"event_rest_of_header : opt_truncatable inheritance_spec supports_spec",
+"event_decl : event_header event_rest_of_header '{' value_elements '}'",
+"event_header : event_custom_header",
+"event_header : event_plain_header",
};
#endif
#define tao_yyclearin (tao_yychar=(-1))
@@ -1507,24 +1651,60 @@ case 19:
break;
case 20:
{
+/* | component*/
+ idl_global->set_parse_state (IDL_GlobalData::PS_ComponentSeen);
+ }
+break;
+case 21:
+{
+/* ';'*/
+ idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
+ }
+break;
+case 22:
+{
+/* | home_decl*/
+ idl_global->set_parse_state (IDL_GlobalData::PS_HomeDeclSeen);
+ }
+break;
+case 23:
+{
+/* ';'*/
+ idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
+ }
+break;
+case 24:
+{
+/* | event*/
+ idl_global->set_parse_state (IDL_GlobalData::PS_EventSeen);
+ }
+break;
+case 25:
+{
+/* ';'*/
+ idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
+ }
+break;
+case 26:
+{
/* | error*/
idl_global->err()->syntax_error (idl_global->parse_state());
}
break;
-case 21:
+case 27:
{
/* ';'*/
idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
tao_yyerrok;
}
break;
-case 22:
+case 28:
{
/* module : IDL_MODULE*/
idl_global->set_parse_state (IDL_GlobalData::PS_ModuleSeen);
}
break;
-case 23:
+case 29:
{
/* IDENTIFIER*/
Identifier id (tao_yyvsp[0].strval);
@@ -1549,19 +1729,19 @@ case 23:
idl_global->scopes ().push (m);
}
break;
-case 24:
+case 30:
{
/* '{'*/
idl_global->set_parse_state (IDL_GlobalData::PS_ModuleSqSeen);
}
break;
-case 25:
+case 31:
{
/* definitions*/
idl_global->set_parse_state (IDL_GlobalData::PS_ModuleBodySeen);
}
break;
-case 26:
+case 32:
{
/* '}'*/
idl_global->set_parse_state (IDL_GlobalData::PS_ModuleQsSeen);
@@ -1571,7 +1751,7 @@ case 26:
idl_global->scopes ().pop ();
}
break;
-case 29:
+case 35:
{
/* interface : interface_header */
UTL_Scope *s = idl_global->scopes ().top_non_null ();
@@ -1584,7 +1764,7 @@ case 29:
{
i =
idl_global->gen ()->create_interface (
- tao_yyvsp[0].ihval->interface_name (),
+ tao_yyvsp[0].ihval->name (),
tao_yyvsp[0].ihval->inherits (),
tao_yyvsp[0].ihval->n_inherits (),
tao_yyvsp[0].ihval->inherits_flat (),
@@ -1606,24 +1786,24 @@ case 29:
idl_global->scopes ().push (i);
/* This FE_InterfaceHeader class isn't destroyed with the AST.*/
- tao_yyvsp[0].ihval->interface_name ()->destroy ();
+ tao_yyvsp[0].ihval->name ()->destroy ();
delete tao_yyvsp[0].ihval;
tao_yyvsp[0].ihval = 0;
}
break;
-case 30:
+case 36:
{
/* '{'*/
idl_global->set_parse_state (IDL_GlobalData::PS_InterfaceSqSeen);
}
break;
-case 31:
+case 37:
{
/* exports*/
idl_global->set_parse_state (IDL_GlobalData::PS_InterfaceBodySeen);
}
break;
-case 32:
+case 38:
{
/* '}'*/
idl_global->set_parse_state (IDL_GlobalData::PS_InterfaceQsSeen);
@@ -1634,20 +1814,20 @@ case 32:
idl_global->scopes ().pop ();
}
break;
-case 33:
+case 39:
{
/* interface_decl : IDL_INTERFACE*/
idl_global->set_parse_state (IDL_GlobalData::PS_InterfaceSeen);
}
break;
-case 34:
+case 40:
{
/* id*/
idl_global->set_parse_state (IDL_GlobalData::PS_InterfaceIDSeen);
tao_yyval.idval = tao_yyvsp[0].idval;
}
break;
-case 35:
+case 41:
{
/* interface_header : interface_decl inheritance_spec*/
idl_global->set_parse_state (IDL_GlobalData::PS_InheritSpecSeen);
@@ -1662,11 +1842,14 @@ case 35:
0);
ACE_NEW_RETURN (tao_yyval.ihval,
FE_InterfaceHeader (&n,
- tao_yyvsp[0].nlval),
+ tao_yyvsp[0].nlval,
+ I_FALSE,
+ I_FALSE,
+ I_TRUE),
1);
}
break;
-case 36:
+case 42:
{
/* | IDL_LOCAL interface_decl inheritance_spec*/
idl_global->set_parse_state (IDL_GlobalData::PS_InheritSpecSeen);
@@ -1681,11 +1864,14 @@ case 36:
0);
ACE_NEW_RETURN (tao_yyval.ihval,
FE_InterfaceHeader (&n,
- tao_yyvsp[0].nlval),
+ tao_yyvsp[0].nlval,
+ I_TRUE,
+ I_FALSE,
+ I_TRUE),
1);
}
break;
-case 37:
+case 43:
{
/* | IDL_ABSTRACT interface_decl inheritance_spec*/
ACE_DEBUG ((LM_DEBUG,
@@ -1697,25 +1883,25 @@ case 37:
ACE_TEXT (" interfaces yet\n")));
}
break;
-case 38:
+case 44:
{
/* inheritance_spec : ':'*/
idl_global->set_parse_state (IDL_GlobalData::PS_InheritColonSeen);
}
break;
-case 39:
+case 45:
{
/* at_least_one_scoped_name*/
tao_yyval.nlval = tao_yyvsp[0].nlval;
}
break;
-case 40:
+case 46:
{
/* | /* EMPTY * /*/
tao_yyval.nlval = 0;
}
break;
-case 45:
+case 51:
{
/* valuetype : IDL_CUSTOM value_concrete_decl*/
ACE_DEBUG ((LM_DEBUG,
@@ -1727,47 +1913,58 @@ case 45:
ACE_TEXT (" custom yet\n")));
}
break;
-case 47:
+case 53:
{
/* value_concrete_decl : value_header*/
UTL_Scope *s = idl_global->scopes ().top_non_null ();
+ AST_ValueType *v = 0;
AST_Interface *i = 0;
if (s != 0 && tao_yyvsp[0].vhval != 0)
{
- i =
+ v =
idl_global->gen ()->create_valuetype (
- tao_yyvsp[0].vhval->interface_name (),
- tao_yyvsp[0].vhval->inherits (),
- tao_yyvsp[0].vhval->n_inherits ()
- );
+ tao_yyvsp[0].vhval->name (),
+ tao_yyvsp[0].vhval->inherits (),
+ tao_yyvsp[0].vhval->n_inherits (),
+ tao_yyvsp[0].vhval->inherits_concrete (),
+ tao_yyvsp[0].vhval->inherits_flat (),
+ tao_yyvsp[0].vhval->n_inherits_flat (),
+ tao_yyvsp[0].vhval->supports (),
+ tao_yyvsp[0].vhval->n_supports (),
+ tao_yyvsp[0].vhval->supports_concrete (),
+ I_FALSE,
+ tao_yyvsp[0].vhval->truncatable ()
+ );
+ i = AST_Interface::narrow_from_decl (v);
AST_Interface::fwd_redefinition_helper (i,
s);
+ v = AST_ValueType::narrow_from_decl (i);
/*
* Add the valuetype to its definition scope
*/
- (void) s->fe_add_interface (i);
+ (void) s->fe_add_valuetype (v);
}
/*
* Push it on the scope stack
*/
- idl_global->scopes ().push (i);
+ idl_global->scopes ().push (v);
}
break;
-case 48:
+case 54:
{
/* '{'*/
idl_global->set_parse_state (IDL_GlobalData::PS_InterfaceSqSeen);
}
break;
-case 49:
+case 55:
{
/* value_elements*/
idl_global->set_parse_state (IDL_GlobalData::PS_InterfaceBodySeen);
}
break;
-case 50:
+case 56:
{
/* '}'*/
idl_global->set_parse_state (IDL_GlobalData::PS_InterfaceQsSeen);
@@ -1781,55 +1978,58 @@ case 50:
idl_global->scopes ().pop ();
}
break;
-case 51:
+case 57:
{
/* value_abs_decl : IDL_ABSTRACT value_header*/
UTL_Scope *s = idl_global->scopes ().top_non_null ();
+ AST_ValueType *v = 0;
AST_Interface *i = 0;
if (s != 0 && tao_yyvsp[0].vhval != 0)
{
- if (tao_yyvsp[0].vhval->n_concrete() > 0)
- {
- idl_global->err ()->abstract_inheritance_error (
- tao_yyvsp[0].vhval->interface_name ()
- );
- }
-
- i =
+ v =
idl_global->gen ()->create_valuetype (
- tao_yyvsp[0].vhval->interface_name (),
- tao_yyvsp[0].vhval->inherits (),
- tao_yyvsp[0].vhval->n_inherits ()
- );
- i->set_abstract_valuetype ();
+ tao_yyvsp[0].vhval->name (),
+ tao_yyvsp[0].vhval->inherits (),
+ tao_yyvsp[0].vhval->n_inherits (),
+ tao_yyvsp[0].vhval->inherits_concrete (),
+ tao_yyvsp[0].vhval->inherits_flat (),
+ tao_yyvsp[0].vhval->n_inherits_flat (),
+ tao_yyvsp[0].vhval->supports (),
+ tao_yyvsp[0].vhval->n_supports (),
+ tao_yyvsp[0].vhval->supports_concrete (),
+ I_TRUE,
+ I_FALSE
+ );
+ i = AST_Interface::narrow_from_decl (v);
AST_Interface::fwd_redefinition_helper (i,
s);
+ v = AST_ValueType::narrow_from_decl (i);
/*
* Add the valuetype to its definition scope
*/
- (void) s->fe_add_interface (i);
+ (void) s->fe_add_valuetype (v);
}
/*
* Push it on the scope stack.
*/
- idl_global->scopes ().push (i);
+ idl_global->scopes ().push (v);
}
break;
-case 52:
+case 58:
{
/* '{'*/
idl_global->set_parse_state (IDL_GlobalData::PS_InterfaceSqSeen);
}
break;
-case 53:
+case 59:
{
/* exports*/
idl_global->set_parse_state (IDL_GlobalData::PS_InterfaceBodySeen);
}
break;
-case 54:
+case 60:
{
/* '}'*/
idl_global->set_parse_state (IDL_GlobalData::PS_InterfaceQsSeen);
@@ -1843,7 +2043,7 @@ case 54:
idl_global->scopes ().pop ();
}
break;
-case 55:
+case 61:
{
/* value_header : value_decl opt_truncatable inheritance_spec supports_spec*/
UTL_ScopedName *sn = 0;
@@ -1854,24 +2054,25 @@ case 55:
ACE_NEW_RETURN (tao_yyval.vhval,
FE_obv_header (sn,
tao_yyvsp[-1].nlval,
- tao_yyvsp[0].nlval),
+ tao_yyvsp[0].nlval,
+ tao_yyvsp[-2].bval),
1);
}
break;
-case 56:
+case 62:
{
/* value_decl : IDL_VALUETYPE*/
idl_global->set_parse_state (IDL_GlobalData::PS_ValuetypeSeen);
}
break;
-case 57:
+case 63:
{
/* id*/
idl_global->set_parse_state (IDL_GlobalData::PS_ValuetypeIDSeen);
tao_yyval.idval = tao_yyvsp[0].idval;
}
break;
-case 58:
+case 64:
{
/* opt_truncatable : IDL_TRUNCATABLE*/
ACE_DEBUG ((LM_DEBUG,
@@ -1881,38 +2082,35 @@ case 58:
ACE_DEBUG ((LM_DEBUG,
ACE_TEXT ("truncatable modifier not supported ")
ACE_TEXT ("and is ignored\n")));
- tao_yyval.bval = I_FALSE;
+ tao_yyval.bval = I_TRUE;
}
break;
-case 59:
+case 65:
{
/* | /* EMPTY * /*/
tao_yyval.bval = I_FALSE;
}
break;
-case 60:
+case 66:
{
-/* supports_spec : IDL_SUPPORTS scoped_name*/
- ACE_NEW_RETURN (tao_yyval.nlval,
- UTL_NameList (tao_yyvsp[0].idlist,
- 0),
- 1);
+/* supports_spec : IDL_SUPPORTS at_least_one_scoped_name*/
+ tao_yyval.nlval = tao_yyvsp[0].nlval;
}
break;
-case 61:
+case 67:
{
/* | /* EMPTY * /*/
tao_yyval.nlval = 0;
}
break;
-case 62:
+case 68:
{
/* value_forward_decl : IDL_ABSTRACT value_decl*/
UTL_Scope *s = idl_global->scopes ().top_non_null ();
UTL_ScopedName n (tao_yyvsp[0].idval,
0);
- AST_InterfaceFwd *f = 0;
- idl_global->set_parse_state (IDL_GlobalData::PS_InterfaceForwardSeen);
+ AST_ValueTypeFwd *f = 0;
+ idl_global->set_parse_state (IDL_GlobalData::PS_ValuetypeForwardSeen);
/*
* Create a node representing a forward declaration of an
@@ -1920,20 +2118,20 @@ case 62:
*/
if (s != 0)
{
- f = idl_global->gen()->create_valuetype_fwd (&n);
- f->set_abstract_valuetype ();
- (void) s->fe_add_interface_fwd (f);
+ f = idl_global->gen ()->create_valuetype_fwd (&n,
+ I_TRUE);
+ (void) s->fe_add_valuetype_fwd (f);
}
}
break;
-case 63:
+case 69:
{
/* | value_decl*/
UTL_Scope *s = idl_global->scopes ().top_non_null ();
UTL_ScopedName n (tao_yyvsp[0].idval,
0);
- AST_InterfaceFwd *f = 0;
- idl_global->set_parse_state (IDL_GlobalData::PS_InterfaceForwardSeen);
+ AST_ValueTypeFwd *f = 0;
+ idl_global->set_parse_state (IDL_GlobalData::PS_ValuetypeForwardSeen);
/*
* Create a node representing a forward declaration of an
@@ -1941,12 +2139,13 @@ case 63:
*/
if (s != 0)
{
- f = idl_global->gen ()->create_valuetype_fwd (&n);
- (void) s->fe_add_interface_fwd (f);
+ f = idl_global->gen ()->create_valuetype_fwd (&n,
+ I_FALSE);
+ (void) s->fe_add_valuetype_fwd (f);
}
}
break;
-case 64:
+case 70:
{
/* value_box_decl : value_decl type_spec*/
ACE_DEBUG ((LM_DEBUG,
@@ -1958,118 +2157,118 @@ case 64:
ACE_TEXT (" boxes yet\n")));
}
break;
-case 70:
+case 76:
{
/* state_member : IDL_PUBLIC*/
/* is $0 to member_i */
tao_yyval.vival = AST_Field::vis_PUBLIC;
}
break;
-case 72:
+case 78:
{
/* IDL_PRIVATE*/
/* is $0 to member_i */
tao_yyval.vival = AST_Field::vis_PRIVATE;
}
break;
-case 76:
+case 82:
{
/* export : type_dcl*/
idl_global->set_parse_state (IDL_GlobalData::PS_TypeDeclSeen);
}
break;
-case 77:
+case 83:
{
/* ';'*/
idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
}
break;
-case 78:
+case 84:
{
/* | typeid_dcl*/
idl_global->set_parse_state (IDL_GlobalData::PS_TypeIdDeclSeen);
}
break;
-case 79:
+case 85:
{
/* ';'*/
idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
}
break;
-case 80:
+case 86:
{
/* | typeprefix_dcl*/
idl_global->set_parse_state (IDL_GlobalData::PS_TypePrefixDeclSeen);
}
break;
-case 81:
+case 87:
{
/* ';'*/
idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
}
break;
-case 82:
+case 88:
{
/* | const_dcl*/
idl_global->set_parse_state (IDL_GlobalData::PS_ConstDeclSeen);
}
break;
-case 83:
+case 89:
{
/* ';'*/
idl_global->set_parse_state(IDL_GlobalData::PS_NoState);
}
break;
-case 84:
+case 90:
{
/* | exception*/
idl_global->set_parse_state (IDL_GlobalData::PS_ExceptDeclSeen);
}
break;
-case 85:
+case 91:
{
/* ';'*/
idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
}
break;
-case 86:
+case 92:
{
/* | attribute*/
idl_global->set_parse_state (IDL_GlobalData::PS_AttrDeclSeen);
}
break;
-case 87:
+case 93:
{
/* ';'*/
idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
}
break;
-case 88:
+case 94:
{
/* | operation*/
idl_global->set_parse_state (IDL_GlobalData::PS_OpDeclSeen);
}
break;
-case 89:
+case 95:
{
/* ';'*/
idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
}
break;
-case 90:
+case 96:
{
/* | error*/
idl_global->err()->syntax_error (idl_global->parse_state());
}
break;
-case 91:
+case 97:
{
/* ';'*/
idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
tao_yyerrok;
}
break;
-case 92:
+case 98:
{
/* at_least_one_scoped_name : scoped_name scoped_names*/
ACE_NEW_RETURN (tao_yyval.nlval,
@@ -2078,13 +2277,13 @@ case 92:
1);
}
break;
-case 93:
+case 99:
{
/* scoped_names : scoped_names ','*/
idl_global->set_parse_state (IDL_GlobalData::PS_SNListCommaSeen);
}
break;
-case 94:
+case 100:
{
/* scoped_name*/
idl_global->set_parse_state (IDL_GlobalData::PS_ScopedNameSeen);
@@ -2108,13 +2307,13 @@ case 94:
}
}
break;
-case 95:
+case 101:
{
/* | /* EMPTY * /*/
tao_yyval.nlval = 0;
}
break;
-case 96:
+case 102:
{
/* scoped_name : id*/
idl_global->set_parse_state (IDL_GlobalData::PS_SN_IDSeen);
@@ -2125,13 +2324,13 @@ case 96:
1);
}
break;
-case 97:
+case 103:
{
/* | IDL_SCOPE_DELIMITOR*/
idl_global->set_parse_state (IDL_GlobalData::PS_ScopeDelimSeen);
}
break;
-case 98:
+case 104:
{
/* id*/
idl_global->set_parse_state (IDL_GlobalData::PS_SN_IDSeen);
@@ -2151,13 +2350,13 @@ case 98:
1);
}
break;
-case 99:
+case 105:
{
/* | scoped_name IDL_SCOPE_DELIMITOR*/
idl_global->set_parse_state (IDL_GlobalData::PS_ScopeDelimSeen);
}
break;
-case 100:
+case 106:
{
/* id*/
idl_global->set_parse_state (IDL_GlobalData::PS_SN_IDSeen);
@@ -2171,7 +2370,7 @@ case 100:
tao_yyval.idlist = tao_yyvsp[-3].idlist;
}
break;
-case 101:
+case 107:
{
/* id: IDENTIFIER*/
ACE_NEW_RETURN (tao_yyval.idval,
@@ -2180,7 +2379,7 @@ case 101:
ACE_OS::free (tao_yyvsp[0].strval);
}
break;
-case 102:
+case 108:
{
/* interface_forward : interface_decl*/
UTL_Scope *s = idl_global->scopes ().top_non_null ();
@@ -2202,7 +2401,7 @@ case 102:
}
}
break;
-case 103:
+case 109:
{
/* | IDL_LOCAL interface_decl*/
UTL_Scope *s = idl_global->scopes ().top_non_null ();
@@ -2226,7 +2425,7 @@ case 103:
}
}
break;
-case 104:
+case 110:
{
/* | IDL_ABSTRACT interface_decl*/
UTL_Scope *s = idl_global->scopes ().top_non_null ();
@@ -2250,31 +2449,31 @@ case 104:
}
}
break;
-case 105:
+case 111:
{
/* const_dcl : IDL_CONST*/
idl_global->set_parse_state (IDL_GlobalData::PS_ConstSeen);
}
break;
-case 106:
+case 112:
{
/* const_type*/
idl_global->set_parse_state (IDL_GlobalData::PS_ConstTypeSeen);
}
break;
-case 107:
+case 113:
{
/* id*/
idl_global->set_parse_state (IDL_GlobalData::PS_ConstIDSeen);
}
break;
-case 108:
+case 114:
{
/* '='*/
idl_global->set_parse_state (IDL_GlobalData::PS_ConstAssignSeen);
}
break;
-case 109:
+case 115:
{
/* expression*/
UTL_ScopedName n (tao_yyvsp[-4].idval,
@@ -2315,7 +2514,7 @@ case 109:
}
}
break;
-case 116:
+case 122:
{
/* const_type*/
/* : integer_type*/
@@ -2328,13 +2527,13 @@ case 116:
tao_yyval.etval = AST_Expression::EV_string;
}
break;
-case 117:
+case 123:
{
/* | wstring_type_spec*/
tao_yyval.etval = AST_Expression::EV_wstring;
}
break;
-case 118:
+case 124:
{
/* | scoped_name*/
UTL_Scope *s = idl_global->scopes ().top_non_null ();
@@ -2402,7 +2601,7 @@ case 118:
}
}
break;
-case 122:
+case 128:
{
/* or_expr : xor_expr*/
/* | or_expr '|' xor_expr*/
@@ -2414,7 +2613,7 @@ case 122:
);
}
break;
-case 124:
+case 130:
{
/* xor_expr : and_expr*/
/* | xor_expr '^' and_expr*/
@@ -2426,7 +2625,7 @@ case 124:
);
}
break;
-case 126:
+case 132:
{
/* and_expr : shift_expr | and_expr '&' shift_expr*/
tao_yyval.exval =
@@ -2437,7 +2636,7 @@ case 126:
);
}
break;
-case 128:
+case 134:
{
/* shift_expr : add_expr | shift_expr IDL_LEFT_SHIFT add_expr*/
tao_yyval.exval =
@@ -2448,7 +2647,7 @@ case 128:
);
}
break;
-case 129:
+case 135:
{
/* | shift_expr IDL_RIGHT_SHIFT add_expr*/
tao_yyval.exval =
@@ -2459,7 +2658,7 @@ case 129:
);
}
break;
-case 131:
+case 137:
{
/* add_expr : mult_expr | add_expr '+' mult_expr*/
tao_yyval.exval =
@@ -2470,7 +2669,7 @@ case 131:
);
}
break;
-case 132:
+case 138:
{
/* | add_expr '-' mult_expr*/
tao_yyval.exval =
@@ -2481,7 +2680,7 @@ case 132:
);
}
break;
-case 134:
+case 140:
{
/* mult_expr : unary_expr | mult_expr '*' unary_expr*/
tao_yyval.exval =
@@ -2492,7 +2691,7 @@ case 134:
);
}
break;
-case 135:
+case 141:
{
/* | mult_expr '/' unary_expr*/
tao_yyval.exval =
@@ -2503,7 +2702,7 @@ case 135:
);
}
break;
-case 136:
+case 142:
{
/* | mult_expr '%' unary_expr*/
tao_yyval.exval =
@@ -2514,7 +2713,7 @@ case 136:
);
}
break;
-case 138:
+case 144:
{
/* unary_expr : primary_expr | '+' primary_expr*/
tao_yyval.exval =
@@ -2525,7 +2724,7 @@ case 138:
);
}
break;
-case 139:
+case 145:
{
/* | '-' primary_expr*/
tao_yyval.exval =
@@ -2536,7 +2735,7 @@ case 139:
);
}
break;
-case 140:
+case 146:
{
/* | '~' primary_expr*/
tao_yyval.exval =
@@ -2547,7 +2746,7 @@ case 140:
);
}
break;
-case 141:
+case 147:
{
/* primary_expr : scoped_name*/
/*
@@ -2578,71 +2777,71 @@ case 141:
}
}
break;
-case 143:
+case 149:
{
/* | literal*/
/* | '(' const_expr ')'*/
tao_yyval.exval = tao_yyvsp[-1].exval;
}
break;
-case 144:
+case 150:
{
/* literal : IDL_INTEGER_LITERAL*/
tao_yyval.exval = idl_global->gen ()->create_expr (tao_yyvsp[0].ival);
}
break;
-case 145:
+case 151:
{
/* | IDL_UINTEGER_LITERAL*/
tao_yyval.exval = idl_global->gen ()->create_expr (tao_yyvsp[0].uival);
}
break;
-case 146:
+case 152:
{
/* | IDL_STRING_LITERAL*/
tao_yyval.exval = idl_global->gen ()->create_expr (tao_yyvsp[0].sval);
}
break;
-case 147:
+case 153:
{
/* | IDL_WSTRING_LITERAL*/
tao_yyval.exval = idl_global->gen ()->create_expr (tao_yyvsp[0].wsval);
}
break;
-case 148:
+case 154:
{
/* | IDL_CHARACTER_LITERAL*/
tao_yyval.exval = idl_global->gen ()->create_expr (tao_yyvsp[0].cval);
}
break;
-case 149:
+case 155:
{
/* | IDL_WCHAR_LITERAL*/
ACE_OutputCDR::from_wchar wc (tao_yyvsp[0].wcval);
tao_yyval.exval = idl_global->gen ()->create_expr (wc);
}
break;
-case 150:
+case 156:
{
/* | IDL_FLOATING_PT_LITERAL*/
tao_yyval.exval = idl_global->gen ()->create_expr (tao_yyvsp[0].dval);
}
break;
-case 151:
+case 157:
{
/* | IDL_TRUETOK*/
tao_yyval.exval = idl_global->gen ()->create_expr ((idl_bool) I_TRUE,
AST_Expression::EV_bool);
}
break;
-case 152:
+case 158:
{
/* | IDL_FALSETOK*/
tao_yyval.exval = idl_global->gen ()->create_expr ((idl_bool) I_FALSE,
AST_Expression::EV_bool);
}
break;
-case 153:
+case 159:
{
/* positive_int_expr : const_expr*/
int good_expression = 1;
@@ -2711,37 +2910,37 @@ case 153:
}
}
break;
-case 154:
+case 160:
{
/* type_dcl : IDL_TYPEDEF*/
idl_global->set_parse_state (IDL_GlobalData::PS_TypedefSeen);
}
break;
-case 155:
+case 161:
{
/* type_declarator */
tao_yyval.ival = 0;
}
break;
-case 156:
+case 162:
{
/* | struct_type */
tao_yyval.ival = 0;
}
break;
-case 157:
+case 163:
{
/* | union_type */
tao_yyval.ival = 0;
}
break;
-case 158:
+case 164:
{
/* | enum_type */
tao_yyval.ival = 0;
}
break;
-case 159:
+case 165:
{
/* | IDL_NATIVE simple_declarator*/
UTL_Scope *s = idl_global->scopes ().top_non_null ();
@@ -2765,19 +2964,19 @@ case 159:
}
}
break;
-case 160:
+case 166:
{
/* | constructed_forward_type_spec*/
tao_yyval.ival = 0;
}
break;
-case 161:
+case 167:
{
/* type_declarator : type_spec*/
idl_global->set_parse_state (IDL_GlobalData::PS_TypeSpecSeen);
}
break;
-case 162:
+case 168:
{
/* at_least_one_declarator*/
UTL_Scope *s = idl_global->scopes ().top_non_null ();
@@ -2823,7 +3022,7 @@ case 162:
}
}
break;
-case 165:
+case 171:
{
/* simple_type_spec : base_type_spec*/
tao_yyval.dcval =
@@ -2832,7 +3031,7 @@ case 165:
);
}
break;
-case 167:
+case 173:
{
/* | template_type_spec*/
/* | scoped_name*/
@@ -2853,7 +3052,7 @@ case 167:
tao_yyval.dcval = d;
}
break;
-case 184:
+case 190:
{
/* at_least_one_declarator : declarator declarators*/
ACE_NEW_RETURN (tao_yyval.dlval,
@@ -2862,13 +3061,13 @@ case 184:
1);
}
break;
-case 185:
+case 191:
{
/* declarators : declarators ','*/
idl_global->set_parse_state (IDL_GlobalData::PS_DeclsCommaSeen);
}
break;
-case 186:
+case 192:
{
/* declarator*/
idl_global->set_parse_state (IDL_GlobalData::PS_DeclsDeclSeen);
@@ -2892,13 +3091,13 @@ case 186:
}
}
break;
-case 187:
+case 193:
{
/* | /* EMPTY * /*/
tao_yyval.dlval = 0;
}
break;
-case 190:
+case 196:
{
/* at_least_one_simple_declarator : simple_declarator simple_declarators*/
ACE_NEW_RETURN (tao_yyval.dlval,
@@ -2907,13 +3106,13 @@ case 190:
1);
}
break;
-case 191:
+case 197:
{
/* simple_declarators : simple_declarators ','*/
idl_global->set_parse_state (IDL_GlobalData::PS_DeclsCommaSeen);
}
break;
-case 192:
+case 198:
{
/* simple_declarator*/
idl_global->set_parse_state (IDL_GlobalData::PS_DeclsDeclSeen);
@@ -2937,13 +3136,13 @@ case 192:
}
}
break;
-case 193:
+case 199:
{
/* | /* EMPTY * /*/
tao_yyval.dlval = 0;
}
break;
-case 194:
+case 200:
{
/* simple_declarator : id*/
UTL_ScopedName *sn = 0;
@@ -2958,7 +3157,7 @@ case 194:
1);
}
break;
-case 195:
+case 201:
{
/* complex_declarator : array_declarator*/
UTL_ScopedName *sn = 0;
@@ -2975,61 +3174,61 @@ case 195:
1);
}
break;
-case 198:
+case 204:
{
/* signed_int : IDL_LONG*/
tao_yyval.etval = AST_Expression::EV_long;
}
break;
-case 199:
+case 205:
{
/* | IDL_LONG IDL_LONG*/
tao_yyval.etval = AST_Expression::EV_longlong;
}
break;
-case 200:
+case 206:
{
/* | IDL_SHORT*/
tao_yyval.etval = AST_Expression::EV_short;
}
break;
-case 201:
+case 207:
{
/* unsigned_int : IDL_UNSIGNED IDL_LONG*/
tao_yyval.etval = AST_Expression::EV_ulong;
}
break;
-case 202:
+case 208:
{
/* | IDL_UNSIGNED IDL_LONG IDL_LONG*/
tao_yyval.etval = AST_Expression::EV_ulonglong;
}
break;
-case 203:
+case 209:
{
/* | IDL_UNSIGNED IDL_SHORT*/
tao_yyval.etval = AST_Expression::EV_ushort;
}
break;
-case 204:
+case 210:
{
/* floating_pt_type : IDL_DOUBLE*/
tao_yyval.etval = AST_Expression::EV_double;
}
break;
-case 205:
+case 211:
{
/* | IDL_FLOAT*/
tao_yyval.etval = AST_Expression::EV_float;
}
break;
-case 206:
+case 212:
{
/* | IDL_LONG IDL_DOUBLE*/
tao_yyval.etval = AST_Expression::EV_longdouble;
}
break;
-case 207:
+case 213:
{
/* fixed_type : IDL_FIXED*/
ACE_DEBUG ((LM_DEBUG,
@@ -3041,56 +3240,56 @@ case 207:
ACE_TEXT (" fixed types yet\n")));
}
break;
-case 208:
+case 214:
{
/* char_type : IDL_CHAR*/
tao_yyval.etval = AST_Expression::EV_char;
}
break;
-case 209:
+case 215:
{
/* | IDL_WCHAR*/
tao_yyval.etval = AST_Expression::EV_wchar;
}
break;
-case 210:
+case 216:
{
/* octet_type : IDL_OCTET*/
tao_yyval.etval = AST_Expression::EV_octet;
}
break;
-case 211:
+case 217:
{
/* boolean_type : IDL_BOOLEAN*/
tao_yyval.etval = AST_Expression::EV_bool;
}
break;
-case 212:
+case 218:
{
/* any_type : IDL_ANY*/
tao_yyval.etval = AST_Expression::EV_any;
}
break;
-case 213:
+case 219:
{
/* object_type : IDL_OBJECT*/
tao_yyval.etval = AST_Expression::EV_object;
}
break;
-case 214:
+case 220:
{
/* struct_decl : IDL_STRUCT*/
idl_global->set_parse_state (IDL_GlobalData::PS_StructSeen);
}
break;
-case 215:
+case 221:
{
/* id*/
idl_global->set_parse_state (IDL_GlobalData::PS_StructIDSeen);
tao_yyval.idval = tao_yyvsp[0].idval;
}
break;
-case 216:
+case 222:
{
/* struct_type : struct_header*/
UTL_Scope *s = idl_global->scopes ().top_non_null ();
@@ -3119,19 +3318,19 @@ case 216:
idl_global->scopes ().push (d);
}
break;
-case 217:
+case 223:
{
/* '{'*/
idl_global->set_parse_state (IDL_GlobalData::PS_StructSqSeen);
}
break;
-case 218:
+case 224:
{
/* at_least_one_member*/
idl_global->set_parse_state (IDL_GlobalData::PS_StructBodySeen);
}
break;
-case 219:
+case 225:
{
/* '}'*/
idl_global->set_parse_state (IDL_GlobalData::PS_StructQsSeen);
@@ -3145,26 +3344,26 @@ case 219:
idl_global->scopes ().pop ();
}
break;
-case 223:
+case 229:
{
/* member :*/
/* is $0 to member_i */
tao_yyval.vival = AST_Field::vis_NA;
}
break;
-case 225:
+case 231:
{
/* member_i : type_spec*/
idl_global->set_parse_state (IDL_GlobalData::PS_MemberTypeSeen);
}
break;
-case 226:
+case 232:
{
/* at_least_one_declarator*/
idl_global->set_parse_state (IDL_GlobalData::PS_MemberDeclsSeen);
}
break;
-case 227:
+case 233:
{
/* ';'*/
UTL_Scope *s = idl_global->scopes ().top_non_null ();
@@ -3219,51 +3418,51 @@ case 227:
}
}
break;
-case 228:
+case 234:
{
/* | error*/
idl_global->err()->syntax_error (idl_global->parse_state ());
}
break;
-case 229:
+case 235:
{
/* ';'*/
idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
tao_yyerrok;
}
break;
-case 230:
+case 236:
{
/* union_decl : IDL_UNION*/
idl_global->set_parse_state (IDL_GlobalData::PS_UnionSeen);
}
break;
-case 231:
+case 237:
{
/* id*/
idl_global->set_parse_state (IDL_GlobalData::PS_UnionIDSeen);
tao_yyval.idval = tao_yyvsp[0].idval;
}
break;
-case 232:
+case 238:
{
/* union_type : union_decl IDL_SWITCH*/
idl_global->set_parse_state (IDL_GlobalData::PS_SwitchSeen);
}
break;
-case 233:
+case 239:
{
/* '('*/
idl_global->set_parse_state (IDL_GlobalData::PS_SwitchOpenParSeen);
}
break;
-case 234:
+case 240:
{
/* switch_type_spec*/
idl_global->set_parse_state (IDL_GlobalData::PS_SwitchTypeSeen);
}
break;
-case 235:
+case 241:
{
/* ')'*/
UTL_Scope *s = idl_global->scopes ().top_non_null ();
@@ -3303,19 +3502,19 @@ case 235:
idl_global->scopes ().push (u);
}
break;
-case 236:
+case 242:
{
/* '{'*/
idl_global->set_parse_state (IDL_GlobalData::PS_UnionSqSeen);
}
break;
-case 237:
+case 243:
{
/* at_least_one_case_branch*/
idl_global->set_parse_state (IDL_GlobalData::PS_UnionBodySeen);
}
break;
-case 238:
+case 244:
{
/* '}'*/
idl_global->set_parse_state (IDL_GlobalData::PS_UnionQsSeen);
@@ -3333,7 +3532,7 @@ case 238:
}
}
break;
-case 239:
+case 245:
{
/* switch_type_spec : integer_type*/
tao_yyval.dcval =
@@ -3342,7 +3541,7 @@ case 239:
);
}
break;
-case 240:
+case 246:
{
/* | char_type*/
/* wchars are not allowed. */
@@ -3357,7 +3556,7 @@ case 240:
);
}
break;
-case 241:
+case 247:
{
/* | octet_type*/
/* octets are not allowed. */
@@ -3368,7 +3567,7 @@ case 241:
);
}
break;
-case 242:
+case 248:
{
/* | boolean_type*/
tao_yyval.dcval =
@@ -3377,7 +3576,7 @@ case 242:
);
}
break;
-case 244:
+case 250:
{
/* | enum_type*/
/* | scoped_name*/
@@ -3473,19 +3672,19 @@ case 244:
}
}
break;
-case 248:
+case 254:
{
/* case_branch : at_least_one_case_label*/
idl_global->set_parse_state (IDL_GlobalData::PS_UnionLabelSeen);
}
break;
-case 249:
+case 255:
{
/* element_spec*/
idl_global->set_parse_state (IDL_GlobalData::PS_UnionElemSeen);
}
break;
-case 250:
+case 256:
{
/* ';'*/
UTL_Scope *s = idl_global->scopes ().top_non_null ();
@@ -3511,20 +3710,20 @@ case 250:
}
}
break;
-case 251:
+case 257:
{
/* | error*/
idl_global->err()->syntax_error (idl_global->parse_state());
}
break;
-case 252:
+case 258:
{
/* ';'*/
idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
tao_yyerrok;
}
break;
-case 253:
+case 259:
{
/* at_least_one_case_label : case_label case_labels*/
ACE_NEW_RETURN (tao_yyval.llval,
@@ -3533,7 +3732,7 @@ case 253:
1);
}
break;
-case 254:
+case 260:
{
/* case_labels : case_labels case_label*/
if (tao_yyvsp[-1].llval == 0)
@@ -3555,19 +3754,19 @@ case 254:
}
}
break;
-case 255:
+case 261:
{
/* | /* EMPTY * /*/
tao_yyval.llval = 0;
}
break;
-case 256:
+case 262:
{
/* case_label : IDL_DEFAULT*/
idl_global->set_parse_state (IDL_GlobalData::PS_DefaultSeen);
}
break;
-case 257:
+case 263:
{
/* ':'*/
idl_global->set_parse_state (IDL_GlobalData::PS_LabelColonSeen);
@@ -3578,18 +3777,18 @@ case 257:
);
}
break;
-case 258:
+case 264:
{
/* | IDL_CASE*/
idl_global->set_parse_state (IDL_GlobalData::PS_CaseSeen);
}
break;
-case 259:
+case 265:
{
idl_global->set_parse_state (IDL_GlobalData::PS_LabelExprSeen);
}
break;
-case 260:
+case 266:
{
/* const_expr*/
idl_global->set_parse_state (IDL_GlobalData::PS_LabelColonSeen);
@@ -3600,13 +3799,13 @@ case 260:
);
}
break;
-case 261:
+case 267:
{
/* element_spec : type_spec*/
idl_global->set_parse_state (IDL_GlobalData::PS_UnionElemTypeSeen);
}
break;
-case 262:
+case 268:
{
/* declarator*/
idl_global->set_parse_state (IDL_GlobalData::PS_UnionElemDeclSeen);
@@ -3646,9 +3845,9 @@ case 262:
}
}
break;
-case 263:
+case 269:
{
-/* struct_forward_type : struct_header*/
+/* struct_forward_type : struct_decl*/
UTL_Scope *s = idl_global->scopes ().top_non_null ();
UTL_ScopedName n (tao_yyvsp[0].idval,
0);
@@ -3664,8 +3863,9 @@ case 263:
}
}
break;
-case 264:
+case 270:
{
+/* union_forward_type : union_decl*/
UTL_Scope *s = idl_global->scopes ().top_non_null ();
UTL_ScopedName n (tao_yyvsp[0].idval,
0);
@@ -3681,13 +3881,13 @@ case 264:
}
}
break;
-case 265:
+case 271:
{
/* enum_type : IDL_ENUM*/
idl_global->set_parse_state (IDL_GlobalData::PS_EnumSeen);
}
break;
-case 266:
+case 272:
{
/* id*/
UTL_Scope *s = idl_global->scopes ().top_non_null ();
@@ -3717,19 +3917,19 @@ case 266:
idl_global->scopes ().push (e);
}
break;
-case 267:
+case 273:
{
/* '{'*/
idl_global->set_parse_state (IDL_GlobalData::PS_EnumSqSeen);
}
break;
-case 268:
+case 274:
{
/* at_least_one_enumerator*/
idl_global->set_parse_state (IDL_GlobalData::PS_EnumBodySeen);
}
break;
-case 269:
+case 275:
{
/* '}'*/
idl_global->set_parse_state (IDL_GlobalData::PS_EnumQsSeen);
@@ -3750,13 +3950,13 @@ case 269:
}
}
break;
-case 271:
+case 277:
{
/* enumerators : enumerators ','*/
idl_global->set_parse_state (IDL_GlobalData::PS_EnumCommaSeen);
}
break;
-case 274:
+case 280:
{
/* enumerator : IDENTIFIER*/
UTL_Scope *s = idl_global->scopes ().top_non_null ();
@@ -3787,19 +3987,19 @@ case 274:
}
}
break;
-case 275:
+case 281:
{
/* sequence_type_spec : seq_head ','*/
idl_global->set_parse_state (IDL_GlobalData::PS_SequenceCommaSeen);
}
break;
-case 276:
+case 282:
{
/* positive_int_expr*/
idl_global->set_parse_state (IDL_GlobalData::PS_SequenceExprSeen);
}
break;
-case 277:
+case 283:
{
/* '>'*/
idl_global->set_parse_state (IDL_GlobalData::PS_SequenceQsSeen);
@@ -3853,7 +4053,7 @@ case 277:
}
}
break;
-case 278:
+case 284:
{
/* | seq_head '>'*/
idl_global->set_parse_state (IDL_GlobalData::PS_SequenceQsSeen);
@@ -3901,7 +4101,7 @@ case 278:
}
}
break;
-case 279:
+case 285:
{
/* seq_head : IDL_SEQUENCE*/
idl_global->set_parse_state (IDL_GlobalData::PS_SequenceSeen);
@@ -3912,32 +4112,32 @@ case 279:
idl_global->scopes ().push (0);
}
break;
-case 280:
+case 286:
{
/* '<'*/
idl_global->set_parse_state (IDL_GlobalData::PS_SequenceSqSeen);
}
break;
-case 281:
+case 287:
{
/* simple_type_spec*/
idl_global->set_parse_state (IDL_GlobalData::PS_SequenceTypeSeen);
tao_yyval.dcval = tao_yyvsp[0].dcval;
}
break;
-case 282:
+case 288:
{
/* string_type_spec : string_head '<'*/
idl_global->set_parse_state (IDL_GlobalData::PS_StringSqSeen);
}
break;
-case 283:
+case 289:
{
/* positive_int_expr*/
idl_global->set_parse_state (IDL_GlobalData::PS_StringExprSeen);
}
break;
-case 284:
+case 290:
{
/* '>'*/
idl_global->set_parse_state (IDL_GlobalData::PS_StringQsSeen);
@@ -3966,7 +4166,7 @@ case 284:
}
}
break;
-case 285:
+case 291:
{
/* | string_head*/
idl_global->set_parse_state (IDL_GlobalData::PS_StringCompleted);
@@ -3987,25 +4187,25 @@ case 285:
);
}
break;
-case 286:
+case 292:
{
/* string_head : IDL_STRING*/
idl_global->set_parse_state (IDL_GlobalData::PS_StringSeen);
}
break;
-case 287:
+case 293:
{
/* wstring_type_spec : wstring_head '<'*/
idl_global->set_parse_state (IDL_GlobalData::PS_StringSqSeen);
}
break;
-case 288:
+case 294:
{
/* positive_int_expr*/
idl_global->set_parse_state (IDL_GlobalData::PS_StringExprSeen);
}
break;
-case 289:
+case 295:
{
/* '>'*/
idl_global->set_parse_state (IDL_GlobalData::PS_StringQsSeen);
@@ -4032,7 +4232,7 @@ case 289:
}
}
break;
-case 290:
+case 296:
{
/* | wstring_head*/
idl_global->set_parse_state (IDL_GlobalData::PS_StringCompleted);
@@ -4052,19 +4252,19 @@ case 290:
);
}
break;
-case 291:
+case 297:
{
/* wstring_head : IDL_WSTRING*/
idl_global->set_parse_state (IDL_GlobalData::PS_StringSeen);
}
break;
-case 292:
+case 298:
{
/* array_declarator : id*/
idl_global->set_parse_state (IDL_GlobalData::PS_ArrayIDSeen);
}
break;
-case 293:
+case 299:
{
/* at_least_one_array_dim*/
idl_global->set_parse_state (IDL_GlobalData::PS_ArrayCompleted);
@@ -4087,7 +4287,7 @@ case 293:
}
}
break;
-case 294:
+case 300:
{
/* at_least_one_array_dim : array_dim array_dims*/
ACE_NEW_RETURN (tao_yyval.elval,
@@ -4096,7 +4296,7 @@ case 294:
1);
}
break;
-case 295:
+case 301:
{
/* array_dims : array_dims array_dim*/
if (tao_yyvsp[-1].elval == 0)
@@ -4118,25 +4318,25 @@ case 295:
}
}
break;
-case 296:
+case 302:
{
/* | /* EMPTY * /*/
tao_yyval.elval = 0;
}
break;
-case 297:
+case 303:
{
/* array_dim : '['*/
idl_global->set_parse_state (IDL_GlobalData::PS_DimSqSeen);
}
break;
-case 298:
+case 304:
{
/* positive_int_expr*/
idl_global->set_parse_state (IDL_GlobalData::PS_DimExprSeen);
}
break;
-case 299:
+case 305:
{
/* ']'*/
idl_global->set_parse_state (IDL_GlobalData::PS_DimQsSeen);
@@ -4158,19 +4358,19 @@ case 299:
}
}
break;
-case 300:
+case 306:
{
/* attribute : opt_readonly IDL_ATTRIBUTE*/
idl_global->set_parse_state (IDL_GlobalData::PS_AttrSeen);
}
break;
-case 301:
+case 307:
{
/* param_type_spec*/
idl_global->set_parse_state (IDL_GlobalData::PS_AttrTypeSeen);
}
break;
-case 302:
+case 308:
{
/* at_least_one_simple_declarator*/
UTL_Scope *s = idl_global->scopes ().top_non_null ();
@@ -4220,26 +4420,26 @@ case 302:
}
}
break;
-case 303:
+case 309:
{
/* opt_readonly : IDL_READONLY*/
idl_global->set_parse_state (IDL_GlobalData::PS_AttrROSeen);
tao_yyval.bval = I_TRUE;
}
break;
-case 304:
+case 310:
{
/* | /* EMPTY * /*/
tao_yyval.bval = I_FALSE;
}
break;
-case 305:
+case 311:
{
/* exception : IDL_EXCEPTION*/
idl_global->set_parse_state (IDL_GlobalData::PS_ExceptSeen);
}
break;
-case 306:
+case 312:
{
/* id*/
UTL_Scope *s = idl_global->scopes ().top_non_null ();
@@ -4266,19 +4466,19 @@ case 306:
idl_global->scopes ().push (e);
}
break;
-case 307:
+case 313:
{
/* '{'*/
idl_global->set_parse_state (IDL_GlobalData::PS_ExceptSqSeen);
}
break;
-case 308:
+case 314:
{
/* members*/
idl_global->set_parse_state (IDL_GlobalData::PS_ExceptBodySeen);
}
break;
-case 309:
+case 315:
{
/* '}'*/
idl_global->set_parse_state (IDL_GlobalData::PS_ExceptQsSeen);
@@ -4288,13 +4488,13 @@ case 309:
idl_global->scopes ().pop ();
}
break;
-case 310:
+case 316:
{
/* operation : opt_op_attribute op_type_spec*/
idl_global->set_parse_state (IDL_GlobalData::PS_OpTypeSeen);
}
break;
-case 311:
+case 317:
{
/* IDENTIFIER*/
UTL_Scope *s = idl_global->scopes ().top_non_null ();
@@ -4341,19 +4541,19 @@ case 311:
idl_global->scopes ().push (o);
}
break;
-case 312:
+case 318:
{
/* parameter_list*/
idl_global->set_parse_state (IDL_GlobalData::PS_OpParsCompleted);
}
break;
-case 313:
+case 319:
{
/* opt_raises*/
idl_global->set_parse_state (IDL_GlobalData::PS_OpRaiseCompleted);
}
break;
-case 314:
+case 320:
{
/* opt_context*/
UTL_Scope *s = idl_global->scopes ().top_non_null ();
@@ -4384,27 +4584,27 @@ case 314:
idl_global->scopes ().pop ();
}
break;
-case 315:
+case 321:
{
/* opt_op_attribute : IDL_ONEWAY*/
idl_global->set_parse_state (IDL_GlobalData::PS_OpAttrSeen);
tao_yyval.ofval = AST_Operation::OP_oneway;
}
break;
-case 316:
+case 322:
{
/* | IDL_IDEMPOTENT*/
idl_global->set_parse_state (IDL_GlobalData::PS_OpAttrSeen);
tao_yyval.ofval = AST_Operation::OP_idempotent;
}
break;
-case 317:
+case 323:
{
/* | /* EMPTY * /*/
tao_yyval.ofval = AST_Operation::OP_noflags;
}
break;
-case 319:
+case 325:
{
/* op_type_spec : param_type_spec | IDL_VOID*/
tao_yyval.dcval =
@@ -4413,14 +4613,14 @@ case 319:
);
}
break;
-case 320:
+case 326:
{
/* init_decl : IDL_FACTORY */
/*@@ PS_FactorySeen?*/
idl_global->set_parse_state (IDL_GlobalData::PS_OpTypeSeen);
}
break;
-case 321:
+case 327:
{
/* IDENTIFIER */
UTL_Scope *s = idl_global->scopes ().top_non_null ();
@@ -4458,7 +4658,7 @@ case 321:
idl_global->scopes ().push (factory);
}
break;
-case 322:
+case 328:
{
/* init_parameter_list*/
/* TODO: replace parameter_list with rule that accepts only IN args */
@@ -4467,49 +4667,49 @@ case 322:
idl_global->scopes ().pop ();
}
break;
-case 323:
+case 329:
{
/* init_parameter_list : '('*/
idl_global->set_parse_state (IDL_GlobalData::PS_OpSqSeen);
}
break;
-case 324:
+case 330:
{
/* ')'*/
idl_global->set_parse_state (IDL_GlobalData::PS_OpQsSeen);
}
break;
-case 325:
+case 331:
{
/* | '('*/
idl_global->set_parse_state (IDL_GlobalData::PS_OpSqSeen);
}
break;
-case 326:
+case 332:
{
/* at_least_one_in_parameter ')'*/
idl_global->set_parse_state (IDL_GlobalData::PS_OpQsSeen);
}
break;
-case 328:
+case 334:
{
/* in_parameters : in_parameters ','*/
idl_global->set_parse_state (IDL_GlobalData::PS_OpParCommaSeen);
}
break;
-case 331:
+case 337:
{
/* in_parameter : IDL_IN*/
idl_global->set_parse_state (IDL_GlobalData::PS_OpParDirSeen);
}
break;
-case 332:
+case 338:
{
/* param_type_spec*/
idl_global->set_parse_state (IDL_GlobalData::PS_OpParTypeSeen);
}
break;
-case 333:
+case 339:
{
/* declarator*/
UTL_Scope *s = idl_global->scopes ().top_non_null ();
@@ -4539,49 +4739,49 @@ case 333:
}
}
break;
-case 334:
+case 340:
{
/* parameter_list : '('*/
idl_global->set_parse_state (IDL_GlobalData::PS_OpSqSeen);
}
break;
-case 335:
+case 341:
{
/* ')'*/
idl_global->set_parse_state (IDL_GlobalData::PS_OpQsSeen);
}
break;
-case 336:
+case 342:
{
/* | '('*/
idl_global->set_parse_state (IDL_GlobalData::PS_OpSqSeen);
}
break;
-case 337:
+case 343:
{
/* at_least_one_parameter ')'*/
idl_global->set_parse_state (IDL_GlobalData::PS_OpQsSeen);
}
break;
-case 339:
+case 345:
{
/* parameters : parameters ','*/
idl_global->set_parse_state (IDL_GlobalData::PS_OpParCommaSeen);
}
break;
-case 342:
+case 348:
{
/* parameter : direction*/
idl_global->set_parse_state (IDL_GlobalData::PS_OpParDirSeen);
}
break;
-case 343:
+case 349:
{
/* param_type_spec*/
idl_global->set_parse_state (IDL_GlobalData::PS_OpParTypeSeen);
}
break;
-case 344:
+case 350:
{
/* declarator*/
UTL_Scope *s = idl_global->scopes ().top_non_null ();
@@ -4625,7 +4825,7 @@ case 344:
}
}
break;
-case 345:
+case 351:
{
/* param_type_spec : base_type_spec*/
tao_yyval.dcval =
@@ -4634,7 +4834,7 @@ case 345:
);
}
break;
-case 348:
+case 354:
{
/* | string_type_spec*/
/* | wstring_type_spec*/
@@ -4671,75 +4871,75 @@ case 348:
tao_yyval.dcval = d;
}
break;
-case 349:
+case 355:
{
/* direction : IDL_IN*/
tao_yyval.dival = AST_Argument::dir_IN;
}
break;
-case 350:
+case 356:
{
/* | IDL_OUT*/
tao_yyval.dival = AST_Argument::dir_OUT;
}
break;
-case 351:
+case 357:
{
/* | IDL_INOUT*/
tao_yyval.dival = AST_Argument::dir_INOUT;
}
break;
-case 352:
+case 358:
{
/* opt_raises : IDL_RAISES*/
idl_global->set_parse_state (IDL_GlobalData::PS_OpRaiseSeen);
}
break;
-case 353:
+case 359:
{
/* '('*/
idl_global->set_parse_state (IDL_GlobalData::PS_OpRaiseSqSeen);
}
break;
-case 354:
+case 360:
{
/* at_least_one_scoped_name ')'*/
idl_global->set_parse_state (IDL_GlobalData::PS_OpRaiseQsSeen);
tao_yyval.nlval = tao_yyvsp[-1].nlval;
}
break;
-case 355:
+case 361:
{
tao_yyval.nlval = 0;
/* | /* EMPTY * /*/
}
break;
-case 356:
+case 362:
{
/* opt_context : IDL_CONTEXT*/
idl_global->set_parse_state (IDL_GlobalData::PS_OpContextSeen);
}
break;
-case 357:
+case 363:
{
idl_global->set_parse_state (IDL_GlobalData::PS_OpContextSqSeen);
/* '('*/
}
break;
-case 358:
+case 364:
{
/* at_least_one_string_literal ')'*/
idl_global->set_parse_state (IDL_GlobalData::PS_OpContextQsSeen);
tao_yyval.slval = tao_yyvsp[-1].slval;
}
break;
-case 359:
+case 365:
{
/* | /* EMPTY * /*/
tao_yyval.slval = 0;
}
break;
-case 360:
+case 366:
{
/* at_least_one_string_literal : IDL_STRING_LITERAL string_literals*/
ACE_NEW_RETURN (tao_yyval.slval,
@@ -4748,13 +4948,13 @@ case 360:
1);
}
break;
-case 361:
+case 367:
{
/* string_literals : string_literals ','*/
idl_global->set_parse_state (IDL_GlobalData::PS_OpContextCommaSeen);
}
break;
-case 362:
+case 368:
{
/* IDL_STRING_LITERAL*/
if (tao_yyvsp[-3].slval == 0)
@@ -4776,13 +4976,13 @@ case 362:
}
}
break;
-case 363:
+case 369:
{
/* | /* EMPTY * /*/
tao_yyval.slval = 0;
}
break;
-case 364:
+case 370:
{
/* typeid_dcl : IDL_TYPEID scoped_name IDL_STRING_LITERAL*/
UTL_Scope *s = idl_global->scopes ().top_non_null ();
@@ -4801,7 +5001,7 @@ case 364:
}
}
break;
-case 365:
+case 371:
{
/* typeprefix_dcl : IDL_TYPEPREFIX scoped_name IDL_STRING_LITERAL*/
UTL_Scope *s = idl_global->scopes ().top_non_null ();
diff --git a/TAO/TAO_IDL/include/Makefile.am b/TAO/TAO_IDL/include/Makefile.am
index af596bc04f3..6887949dd8c 100644
--- a/TAO/TAO_IDL/include/Makefile.am
+++ b/TAO/TAO_IDL/include/Makefile.am
@@ -39,11 +39,15 @@ noinst_HEADERS = \
ast_sequence.h \
ast_string.h \
ast_structure.h \
+ ast_structure_fwd.h \
ast_type.h \
ast_typedef.h \
ast_union.h \
+ ast_union_fwd.h \
ast_union_branch.h \
ast_union_label.h \
+ ast_valuetype.h \
+ ast_valuetype_fwd.h \
be_extern.h \
drv_extern.h \
drv_link.h \
diff --git a/TAO/TAO_IDL/include/ast_component.h b/TAO/TAO_IDL/include/ast_component.h
index f69f159a651..750f44981b2 100644
--- a/TAO/TAO_IDL/include/ast_component.h
+++ b/TAO/TAO_IDL/include/ast_component.h
@@ -20,10 +20,20 @@ public:
virtual ~AST_Component (void);
- AST_Component *parent (void);
+ // Accessors.
+
+ AST_Component *parent (void) const;
+ AST_Interface **supports (void) const;
+ long n_supports (void) const;
+ AST_Interface **supports_flat (void) const;
+ long n_supports_flat (void) const;
private:
- AST_Component *parent_;
+ AST_Component *pd_parent;
+ AST_Interface **pd_supports;
+ long pd_n_supports;
+ AST_Interface **pd_supports_flat;
+ long pd_n_supports_flat;
};
#endif // _AST_INTERFACE_AST_COMPONENT_HH
diff --git a/TAO/TAO_IDL/include/ast_decl.h b/TAO/TAO_IDL/include/ast_decl.h
index 40889f9cca7..16b38868f91 100644
--- a/TAO/TAO_IDL/include/ast_decl.h
+++ b/TAO/TAO_IDL/include/ast_decl.h
@@ -120,6 +120,8 @@ public:
, NT_root // Denotes the root of AST
, NT_interface // Denotes an interface
, NT_interface_fwd // Fwd declared interface
+ , NT_valuetype // Denotes a valuetype
+ , NT_valuetype_fwd // Fwd declared valuetype
, NT_const // Denotes a constant
, NT_except // Denotes an exception
, NT_attr // Denotes an attribute
diff --git a/TAO/TAO_IDL/include/ast_generator.h b/TAO/TAO_IDL/include/ast_generator.h
index 1d89f6d5b26..a6cbcfde62c 100644
--- a/TAO/TAO_IDL/include/ast_generator.h
+++ b/TAO/TAO_IDL/include/ast_generator.h
@@ -77,6 +77,7 @@ class UTL_LabelList;
class UTL_ExprList;
class AST_StructureFwd;
class AST_UnionFwd;
+class AST_ValueTypeFwd;
// Defines base class for node generators.
@@ -101,10 +102,10 @@ public:
// Create a node representing an interface.
virtual AST_Interface *create_interface (
UTL_ScopedName *n,
- AST_Interface **ih,
- long nih,
- AST_Interface **ih_flat,
- long nih_flat,
+ AST_Interface **inherits,
+ long n_inherits,
+ AST_Interface **inherits_flat,
+ long n_inherits_flat,
idl_bool local,
idl_bool abstract
);
@@ -117,15 +118,24 @@ public:
);
// Create a node representing a valuetype.
- virtual AST_Interface *create_valuetype (
+ virtual AST_ValueType *create_valuetype (
UTL_ScopedName *n,
- AST_Interface **ih,
- long nih
+ AST_Interface **inherits,
+ long n_inherits,
+ AST_ValueType *inherits_concrete,
+ AST_Interface **inherits_flat,
+ long n_inherits_flat,
+ AST_Interface **supports,
+ long n_supports,
+ AST_Interface *supports_concrete,
+ idl_bool abstract,
+ idl_bool truncatable
);
// Create a node representing a forward declaration of a valuetype.
- virtual AST_InterfaceFwd *create_valuetype_fwd (
- UTL_ScopedName *n
+ virtual AST_ValueTypeFwd *create_valuetype_fwd (
+ UTL_ScopedName *n,
+ idl_bool abstract
);
// Create a node representing an exception.
diff --git a/TAO/TAO_IDL/include/ast_interface.h b/TAO/TAO_IDL/include/ast_interface.h
index 06ce7622a12..38f49479eba 100644
--- a/TAO/TAO_IDL/include/ast_interface.h
+++ b/TAO/TAO_IDL/include/ast_interface.h
@@ -90,26 +90,21 @@ public:
virtual ~AST_Interface (void);
+ // This serves for both interfaces and value types.
static void fwd_redefinition_helper (AST_Interface *&i,
UTL_Scope *s);
+ // This serves only for interfaces, but it is called
+ // from the corresponding AST_ValueType function().
virtual void redefine (AST_Interface *from);
- AST_Interface **inherits (void);
+ AST_Interface **inherits (void) const;
- void set_inherits (AST_Interface **i);
+ long n_inherits (void) const;
- long n_inherits (void);
+ AST_Interface **inherits_flat (void) const;
- void set_n_inherits (long i);
-
- AST_Interface **inherits_flat (void);
-
- void set_inherits_flat (AST_Interface **i);
-
- long n_inherits_flat (void);
-
- void set_n_inherits_flat (long i);
+ long n_inherits_flat (void) const;
void be_add_operation (AST_Operation *);
@@ -119,19 +114,11 @@ public:
// Is this interface defined? This predicate returns FALSE when an
// interface was forward declared but not defined yet, and TRUE in
// all other cases.
- virtual idl_bool is_defined (void)
+ idl_bool is_defined (void)
{
return (pd_n_inherits < 0) ? I_FALSE : I_TRUE;
}
- idl_bool is_valuetype (void);
-
- void set_valuetype (void);
-
- idl_bool is_abstract_valuetype (void);
-
- void set_abstract_valuetype (void);
-
// Check if any member's name clashes with a parent's
// member's name, or if any parents' members' names
// clash with each other.
@@ -152,11 +139,6 @@ public:
virtual int ast_accept (ast_visitor *visitor);
protected:
-
- idl_bool is_valuetype_;
- //
-
-private:
// Data.
// Immediate ancestors.
@@ -195,8 +177,6 @@ private:
virtual AST_Typedef *fe_add_typedef (AST_Typedef *t);
virtual AST_Native *fe_add_native (AST_Native *n);
-
- virtual AST_Factory *fe_add_factory (AST_Factory *f);
};
#endif // _AST_INTERFACE_AST_INTERFACE_HH
diff --git a/TAO/TAO_IDL/include/ast_interface_fwd.h b/TAO/TAO_IDL/include/ast_interface_fwd.h
index 3b15b0461bb..dd7db4a8060 100644
--- a/TAO/TAO_IDL/include/ast_interface_fwd.h
+++ b/TAO/TAO_IDL/include/ast_interface_fwd.h
@@ -91,7 +91,6 @@ public:
virtual idl_bool is_local (void);
virtual idl_bool is_valuetype (void);
virtual idl_bool is_abstract_valuetype (void);
- virtual void set_abstract_valuetype (void);
// Cleanup function.
virtual void destroy (void);
diff --git a/TAO/TAO_IDL/include/ast_module.h b/TAO/TAO_IDL/include/ast_module.h
index ba4fef1ffa4..5998808cfd0 100644
--- a/TAO/TAO_IDL/include/ast_module.h
+++ b/TAO/TAO_IDL/include/ast_module.h
@@ -136,10 +136,14 @@ private:
virtual AST_Module *fe_add_module (AST_Module *m);
- virtual AST_Interface *fe_add_interface (AST_Interface *i);
+ virtual AST_Interface *fe_add_interface (AST_Interface *i);
virtual AST_InterfaceFwd *fe_add_interface_fwd (AST_InterfaceFwd *i);
+ virtual AST_ValueType *fe_add_valuetype (AST_ValueType *i);
+
+ virtual AST_ValueTypeFwd *fe_add_valuetype_fwd (AST_ValueTypeFwd *i);
+
virtual AST_Constant *fe_add_constant (AST_Constant *c);
virtual AST_Exception *fe_add_exception (AST_Exception *e);
diff --git a/TAO/TAO_IDL/include/ast_valuetype.h b/TAO/TAO_IDL/include/ast_valuetype.h
new file mode 100644
index 00000000000..cbf0f4e2caf
--- /dev/null
+++ b/TAO/TAO_IDL/include/ast_valuetype.h
@@ -0,0 +1,62 @@
+// This may look like C, but it's really -*- C++ -*-
+// $Id$
+
+#ifndef _AST_INTERFACE_AST_VALUETYPE_HH
+#define _AST_INTERFACE_AST_VALUETYPE_HH
+
+#include "ast_interface.h"
+
+class TAO_IDL_FE_Export AST_ValueType : public virtual AST_Interface
+{
+public:
+ AST_ValueType (void);
+
+ AST_ValueType (UTL_ScopedName *n,
+ AST_Interface **inherits,
+ long n_inherits,
+ AST_ValueType *inherits_concrete,
+ AST_Interface **inherits_flat,
+ long n_inherits_flat,
+ AST_Interface **supports,
+ long n_supports,
+ AST_Interface *supports_concrete,
+ idl_bool abstract,
+ idl_bool truncatable);
+
+ virtual ~AST_ValueType (void);
+
+ // This also calls the base class version.
+ virtual void redefine (AST_Interface *from);
+
+ AST_ValueType *inherits_concrete (void) const;
+
+ AST_Interface *supports_concrete (void) const;
+
+ idl_bool truncatable (void) const;
+
+ // Cleanup function.
+ virtual void destroy (void);
+
+ // Narrowing.
+ DEF_NARROW_METHODS1(AST_ValueType, AST_Interface);
+ DEF_NARROW_FROM_DECL(AST_ValueType);
+ DEF_NARROW_FROM_SCOPE(AST_ValueType);
+
+ // AST Dumping.
+ virtual void dump (ACE_OSTREAM_TYPE &o);
+
+ // Visiting.
+ virtual int ast_accept (ast_visitor *visitor);
+
+protected:
+ AST_Interface **pd_supports;
+ long pd_n_supports;
+ AST_ValueType *pd_inherits_concrete;
+ AST_Interface *pd_supports_concrete;
+
+ idl_bool pd_truncatable;
+
+ virtual AST_Factory *fe_add_factory (AST_Factory *f);
+};
+
+#endif // _AST_INTERFACE_AST_VALUETYPE_HH
diff --git a/TAO/TAO_IDL/include/ast_valuetype_fwd.h b/TAO/TAO_IDL/include/ast_valuetype_fwd.h
new file mode 100644
index 00000000000..b3906ae49b7
--- /dev/null
+++ b/TAO/TAO_IDL/include/ast_valuetype_fwd.h
@@ -0,0 +1,34 @@
+// This may look like C, but it's really -*- C++ -*-
+// $Id$
+#ifndef _AST_INTERFACE_FWD_AST_VALUETYPE_FWD_HH
+#define _AST_INTERFACE_FWD_AST_VALUETYPE_FWD_HH
+
+#include "ast_interface_fwd.h"
+
+// Representation of a forward valuetype declaration.
+
+class TAO_IDL_FE_Export AST_ValueTypeFwd : public virtual AST_InterfaceFwd
+{
+public:
+ AST_ValueTypeFwd (void);
+
+ AST_ValueTypeFwd (AST_Interface *dummy,
+ UTL_ScopedName *n);
+
+ virtual ~AST_ValueTypeFwd (void);
+
+ // Cleanup function.
+ virtual void destroy (void);
+
+ // Narrowing.
+ DEF_NARROW_METHODS1(AST_ValueTypeFwd, AST_InterfaceFwd);
+ DEF_NARROW_FROM_DECL(AST_ValueTypeFwd);
+
+ // AST Dumping.
+ virtual void dump (ACE_OSTREAM_TYPE &);
+
+ // Visiting.
+ virtual int ast_accept (ast_visitor *visitor);
+};
+
+#endif // _AST_INTERFACE_FWD_AST_VALUETYPE_FWD_HH
diff --git a/TAO/TAO_IDL/include/fe_interface_header.h b/TAO/TAO_IDL/include/fe_interface_header.h
index 5b1b3e46ef1..550aa92f952 100644
--- a/TAO/TAO_IDL/include/fe_interface_header.h
+++ b/TAO/TAO_IDL/include/fe_interface_header.h
@@ -72,6 +72,7 @@ trademarks or registered trademarks of Sun Microsystems, Inc.
class UTL_NameList;
class AST_Interface;
+class AST_ValueType;
// Internal class for FE to describe interface headers
//
@@ -83,97 +84,88 @@ class TAO_IDL_FE_Export FE_InterfaceHeader
{
public:
FE_InterfaceHeader (UTL_ScopedName *n,
- UTL_NameList *l,
- UTL_NameList *supports = 0,
- idl_bool compile_now = 1);
+ UTL_NameList *inherits,
+ idl_bool is_local,
+ idl_bool is_abstract,
+ idl_bool compile_now);
virtual ~FE_InterfaceHeader (void);
// Data Accessors
- UTL_ScopedName *interface_name (void);
- AST_Interface **inherits (void);
- long n_inherits (void);
- AST_Interface **inherits_flat (void);
- long n_inherits_flat (void);
+ UTL_ScopedName *name (void) const;
+ AST_Interface **inherits (void) const;
+ long n_inherits (void) const;
+ AST_Interface **inherits_flat (void) const;
+ long n_inherits_flat (void) const;
- virtual idl_bool is_local (void);
+ idl_bool is_local (void) const;
// See if we are a local interface.
- virtual idl_bool is_abstract (void);
+ idl_bool is_abstract (void) const;
// See if we are an abstract interface.
// Data
protected:
- UTL_ScopedName *pd_interface_name; // Interface name
-private:
- // Used for eventual code generation
- AST_Interface **pd_inherits; // Inherited interfaces
- long pd_n_inherits; // How many
+ UTL_ScopedName *pd_interface_name;
+
+ // Inherited interfaces.
+ AST_Interface **pd_inherits;
+ long pd_n_inherits;
+
+ // Used for name clash checking.
+ AST_Interface **pd_inherits_flat;
+ long pd_n_inherits_flat;
- // Used for name clash checking
- AST_Interface **pd_inherits_flat; // All ancestors
- long pd_n_inherits_flat; // How many
+ idl_bool pd_is_local;
+ idl_bool pd_is_abstract;
// Operations
// Compile the flattened unique list of interfaces which this
- // interface inherits from
+ // interface inherits from.
protected:
- void compile_inheritance(UTL_NameList *l,
- UTL_NameList *supports);
-private:
- void compile_one_inheritance(AST_Interface *i);
+ void compile_inheritance (UTL_NameList *ifaces,
+ idl_bool for_valuetype);
- // called from compile_inheritance()
- virtual idl_bool check_first (AST_Interface *i);
- virtual idl_bool check_further (AST_Interface *i);
- virtual idl_bool check_supports (AST_Interface *i);
-};
-
-
-class FE_Local_InterfaceHeader : public FE_InterfaceHeader
-{
-public:
- FE_Local_InterfaceHeader (UTL_ScopedName *n,
- UTL_NameList *l,
- UTL_NameList *supports = 0);
+ void compile_one_inheritance (AST_Interface *i);
- virtual idl_bool is_local (void);
- // See if we are a local interface.
+ // Called from compile_inheritance().
+ idl_bool check_inherit (AST_Interface *i,
+ idl_bool for_valuetype);
};
-class FE_Abstract_InterfaceHeader : public FE_InterfaceHeader
-{
-public:
- FE_Abstract_InterfaceHeader (UTL_ScopedName *n,
- UTL_NameList *l,
- UTL_NameList *supports = 0);
-
- virtual idl_bool is_abstract (void);
- // See if we are an abstract interface.
-};
class FE_obv_header : public FE_InterfaceHeader
{
public:
- // Constructor(s)
- FE_obv_header(UTL_ScopedName *n, UTL_NameList *l, UTL_NameList *supports);
- virtual ~FE_obv_header() {}
+ FE_obv_header (UTL_ScopedName *n,
+ UTL_NameList *inherits,
+ UTL_NameList *supports,
+ idl_bool truncatable);
+ virtual ~FE_obv_header (void);
// Data Accessors
- void valuetype_name (UTL_ScopedName *n);
- long n_concrete ();
+ AST_Interface **supports (void) const;
+ long n_supports (void) const;
+ AST_ValueType *inherits_concrete (void) const;
+ AST_Interface *supports_concrete (void) const;
+ idl_bool truncatable (void) const;
+
+private:
+ // Supported interfaces.
+ AST_Interface **pd_supports;
+ long pd_n_supports;
- private:
+ AST_ValueType *pd_inherits_concrete;
+ AST_Interface *pd_supports_concrete;
- // called from compile_inheritance()
- virtual idl_bool check_first (AST_Interface *i);
- virtual idl_bool check_further (AST_Interface *i);
- virtual idl_bool check_supports (AST_Interface *i);
+ // Currently ignored.
+ idl_bool pd_truncatable;
- idl_bool truncatable_; /* currently 0, ignored */
- long n_concrete_;
+private:
+ void compile_supports (UTL_NameList *supports);
+ idl_bool check_concrete_supported_inheritance (AST_Interface *d);
};
#endif // _FE_INTERFACE_HEADER_FE_INTERFACE_HH
diff --git a/TAO/TAO_IDL/include/idl_global.h b/TAO/TAO_IDL/include/idl_global.h
index fcbbfaa558a..d2e9272a0ec 100644
--- a/TAO/TAO_IDL/include/idl_global.h
+++ b/TAO/TAO_IDL/include/idl_global.h
@@ -114,6 +114,7 @@ public:
, PS_InterfaceIDSeen // Seen the interface ID
, PS_InheritSpecSeen // Seen a complete inheritance spec
, PS_InterfaceForwardSeen // Forward interface decl seen
+ , PS_ValuetypeForwardSeen // Forward valuetype decl seen
, PS_InterfaceSqSeen // '{' seen for interface
, PS_InterfaceQsSeen // '}' seen for interface
, PS_InterfaceBodySeen // Seen an interface body
@@ -216,6 +217,9 @@ public:
, PS_DeclsDeclSeen // Seen complete decl in decls list
, PS_NativeSeen // Seen a native declaration
, PS_PragmaPrefixSyntax // Could not parse the #pragma prefix
+ , PS_EventSeen // Seen an event declaration
+ , PS_ComponentSeen // Seen a component declaration
+ , PS_HomeDeclSeen // Seen a home declaration
};
// Constructor
diff --git a/TAO/TAO_IDL/include/utl_err.h b/TAO/TAO_IDL/include/utl_err.h
index 2da173f6a75..2d294c676d2 100644
--- a/TAO/TAO_IDL/include/utl_err.h
+++ b/TAO/TAO_IDL/include/utl_err.h
@@ -106,8 +106,10 @@ public:
EIDL_ILLEGAL_RAISES, // Error in "raises" clause
EIDL_ILLEGAL_CONTEXT, // Error in "context" clause
EIDL_CANT_INHERIT, // Cannot inherit from non-interface
+ EIDL_CANT_SUPPORT, // Cannot support a non-interface
EIDL_LOOKUP_ERROR, // Identifier not found
EIDL_INHERIT_FWD_ERROR, // Cannot inherit from fwd decl interface
+ EIDL_SUPPORTS_FWD_ERROR, // Cannot support a fwd decl interface
EIDL_CONSTANT_EXPECTED, // We got something else..
EIDL_NAME_CASE_ERROR, // Identifier spellings differ only in case
EIDL_NAME_CASE_WARNING, // Same as above, but only a warning
@@ -201,7 +203,28 @@ public:
void inheritance_error (UTL_ScopedName *n,
AST_Decl *d);
- void abstract_inheritance_error (UTL_ScopedName *n);
+ // Report an attempt to use a forward declared interface which
+ // hasn't been defined yet in an inheritance spec
+ void supports_fwd_error (UTL_ScopedName *n,
+ AST_Interface *f);
+
+ // Report an attempt to inherit from something other than an interface
+ void supports_error (UTL_ScopedName *n,
+ AST_Decl *d);
+
+ // Report an attempt to illegally inherit from an abstract type.
+ void abstract_inheritance_error (UTL_ScopedName *v,
+ UTL_ScopedName *i);
+
+ // Report an attempt to support more then one abstract type.
+ void abstract_support_error (UTL_ScopedName *v,
+ UTL_ScopedName *i);
+
+ // A concrete supported interface must inherit from all concrete
+ // interfaces supported by the valuetype's ancestors, and all of
+ // those conrete interfaces' ancestors.
+ void concrete_supported_inheritance_error (UTL_ScopedName *v,
+ UTL_ScopedName *i);
// Report an error while evaluating an expression (division by zero, etc.)
void eval_error (AST_Expression *d);
diff --git a/TAO/TAO_IDL/include/utl_scope.h b/TAO/TAO_IDL/include/utl_scope.h
index a0695c4971e..7751cdfe26e 100644
--- a/TAO/TAO_IDL/include/utl_scope.h
+++ b/TAO/TAO_IDL/include/utl_scope.h
@@ -93,6 +93,8 @@ class AST_PredefinedType;
class AST_Module;
class AST_Interface;
class AST_InterfaceFwd;
+class AST_ValueType;
+class AST_ValueTypeFwd;
class AST_Constant;
class AST_Exception;
class AST_Attribute;
@@ -145,6 +147,10 @@ public:
virtual AST_InterfaceFwd *add_interface_fwd (AST_InterfaceFwd *i);
+ virtual AST_ValueType *add_valuetype (AST_ValueType *i);
+
+ virtual AST_ValueTypeFwd *add_valuetype_fwd (AST_ValueTypeFwd *i);
+
virtual AST_Constant *add_constant (AST_Constant *c);
virtual AST_Exception *add_exception (AST_Exception *e);
@@ -334,9 +340,13 @@ private:
virtual AST_Interface *fe_add_interface (AST_Interface *i);
- virtual AST_InterfaceFwd *fe_add_interface_fwd (AST_InterfaceFwd *i);
+ virtual AST_InterfaceFwd *fe_add_interface_fwd (AST_InterfaceFwd *i);
+
+ virtual AST_ValueType *fe_add_valuetype (AST_ValueType *i);
+
+ virtual AST_ValueTypeFwd *fe_add_valuetype_fwd (AST_ValueTypeFwd *i);
- virtual AST_Constant *fe_add_constant (AST_Constant *c);
+ virtual AST_Constant *fe_add_constant (AST_Constant *i);
virtual AST_Exception *fe_add_exception (AST_Exception *e);
diff --git a/TAO/TAO_IDL/narrow/narrow.cpp b/TAO/TAO_IDL/narrow/narrow.cpp
index c086e46614e..ac5d36211b0 100644
--- a/TAO/TAO_IDL/narrow/narrow.cpp
+++ b/TAO/TAO_IDL/narrow/narrow.cpp
@@ -66,7 +66,7 @@ trademarks or registered trademarks of Sun Microsystems, Inc.
#include "ast_module.h"
#include "ast_root.h"
-#include "ast_interface.h"
+#include "ast_valuetype.h"
#include "ast_operation.h"
#include "ast_factory.h"
#include "ast_exception.h"
@@ -94,6 +94,8 @@ ScopeAsDecl (UTL_Scope *s)
return AST_Root::narrow_from_scope (s);
case AST_Decl::NT_interface:
return AST_Interface::narrow_from_scope (s);
+ case AST_Decl::NT_valuetype:
+ return AST_ValueType::narrow_from_scope (s);
case AST_Decl::NT_op:
return AST_Operation::narrow_from_scope (s);
case AST_Decl::NT_factory:
@@ -132,6 +134,8 @@ DeclAsScope (AST_Decl *d)
*/
case AST_Decl::NT_interface:
return AST_Interface::narrow_from_decl (d);
+ case AST_Decl::NT_valuetype:
+ return AST_ValueType::narrow_from_decl (d);
case AST_Decl::NT_module:
return AST_Module::narrow_from_decl (d);
case AST_Decl::NT_root:
diff --git a/TAO/TAO_IDL/util/utl_err.cpp b/TAO/TAO_IDL/util/utl_err.cpp
index 47c8b77e76c..c5e50103d8e 100644
--- a/TAO/TAO_IDL/util/utl_err.cpp
+++ b/TAO/TAO_IDL/util/utl_err.cpp
@@ -135,11 +135,18 @@ error_string (UTL_Error::ErrorCode c)
case UTL_Error::EIDL_ILLEGAL_CONTEXT:
return "error in context(..) clause, ";
case UTL_Error::EIDL_CANT_INHERIT:
+ // More intelligible message printed by error routine.
+ return "";
+ case UTL_Error::EIDL_CANT_SUPPORT:
+ // More intelligible message printed by error routine.
return "";
case UTL_Error::EIDL_LOOKUP_ERROR:
return "error in lookup of symbol: ";
case UTL_Error::EIDL_INHERIT_FWD_ERROR:
- /* More intelligible message printed by error routine */
+ // More intelligible message printed by error routine.
+ return "";
+ case UTL_Error::EIDL_SUPPORTS_FWD_ERROR:
+ // More intelligible message printed by error routine.
return "";
case UTL_Error::EIDL_CONSTANT_EXPECTED:
return "constant expected: ";
@@ -252,19 +259,17 @@ parse_state_to_error_message (IDL_GlobalData::ParseState ps)
case IDL_GlobalData::PS_ConstDeclSeen:
return "Malformed const declaration";
case IDL_GlobalData::PS_ExceptDeclSeen:
- return
- "Malformed exception declaration";
+ return "Malformed exception declaration";
case IDL_GlobalData::PS_InterfaceDeclSeen:
- return
- "Malformed interface declaration";
+ return "Malformed interface declaration";
+ case IDL_GlobalData::PS_ValuetypeDeclSeen:
+ return "Malformed value type declaration";
case IDL_GlobalData::PS_ModuleDeclSeen:
return "Malformed module declaration";
case IDL_GlobalData::PS_AttrDeclSeen:
- return
- "Malformed attribute declaration";
+ return "Malformed attribute declaration";
case IDL_GlobalData::PS_OpDeclSeen:
- return
- "Malformed operation declaration";
+ return "Malformed operation declaration";
case IDL_GlobalData::PS_ModuleSeen:
return "Missing module identifier following MODULE keyword";
case IDL_GlobalData::PS_ModuleIDSeen:
@@ -277,12 +282,22 @@ parse_state_to_error_message (IDL_GlobalData::ParseState ps)
return "Illegal syntax following module body statement(s)";
case IDL_GlobalData::PS_InterfaceSeen:
return "Missing interface identifier following INTERFACE keyword";
+ case IDL_GlobalData::PS_ValuetypeSeen:
+ return "Missing interface identifier following VALUETYPE keyword";
case IDL_GlobalData::PS_InterfaceIDSeen:
return "Illegal syntax following interface identifier";
+ case IDL_GlobalData::PS_ValuetypeIDSeen:
+ return "Illegal syntax following value type identifier";
case IDL_GlobalData::PS_InheritSpecSeen:
return "Missing '{' or illegal syntax following inheritance spec";
case IDL_GlobalData::PS_InterfaceForwardSeen:
return "Missing ';' following forward interface declaration";
+ case IDL_GlobalData::PS_ValuetypeForwardSeen:
+ return "Missing ';' following forward value type declaration";
+ case IDL_GlobalData::PS_StructForwardSeen:
+ return "Missing ';' following forward struct declaration";
+ case IDL_GlobalData::PS_UnionForwardSeen:
+ return "Missing ';' following forward union declaration";
case IDL_GlobalData::PS_InterfaceSqSeen:
return "Illegal syntax following interface '{' opener";
case IDL_GlobalData::PS_InterfaceQsSeen:
@@ -696,7 +711,7 @@ UTL_Error::inheritance_fwd_error (UTL_ScopedName *n,
f->file_name ());
ACE_ERROR ((LM_ERROR,
"interface "));
- n->dump (*ACE_DEFAULT_LOG_STREAM);;
+ n->dump (*ACE_DEFAULT_LOG_STREAM);
ACE_ERROR ((LM_ERROR,
" cannot inherit from forward declared interface "));
f->local_name ()->dump (*ACE_DEFAULT_LOG_STREAM);
@@ -716,27 +731,106 @@ UTL_Error::inheritance_error (UTL_ScopedName *n,
n->dump (*ACE_DEFAULT_LOG_STREAM);;
ACE_ERROR ((LM_ERROR,
" attempts to inherit from "));
+ d->name ()->dump (*ACE_DEFAULT_LOG_STREAM);
+ ACE_ERROR ((LM_ERROR,
+ "\n"));
+ idl_global->set_err_count (idl_global->err_count () + 1);
+}
+
+// Report an attempt to support an interface which was only
+// declared forward but not yet defined.
+void
+UTL_Error::supports_fwd_error (UTL_ScopedName *n,
+ AST_Interface *f)
+{
+ idl_error_header (EIDL_SUPPORTS_FWD_ERROR,
+ f->line (),
+ f->file_name ());
+ ACE_ERROR ((LM_ERROR,
+ "interface "));
+ n->dump (*ACE_DEFAULT_LOG_STREAM);
+ ACE_ERROR ((LM_ERROR,
+ " cannot support forward declared interface "));
+ f->local_name ()->dump (*ACE_DEFAULT_LOG_STREAM);
+ ACE_ERROR ((LM_ERROR,
+ "\n"));
+ idl_global->set_err_count (idl_global->err_count () + 1);
+}
+
+// Report an attempt to support something other than an interface.
+void
+UTL_Error::supports_error (UTL_ScopedName *n,
+ AST_Decl *d)
+{
+ idl_error_header (EIDL_CANT_SUPPORT,
+ idl_global->lineno (),
+ idl_global->filename ());
+ n->dump (*ACE_DEFAULT_LOG_STREAM);
+ ACE_ERROR ((LM_ERROR,
+ " attempts to support "));
d->name ()->dump (*ACE_DEFAULT_LOG_STREAM);;
ACE_ERROR ((LM_ERROR,
"\n"));
idl_global->set_err_count (idl_global->err_count () + 1);
}
-// Report inheritance from non-abstract valuetype.
+// Report illegal inheritance from non-abstract valuetype or interface.
void
-UTL_Error::abstract_inheritance_error (UTL_ScopedName *n)
+UTL_Error::abstract_inheritance_error (UTL_ScopedName *v,
+ UTL_ScopedName *i)
{
idl_error_header (EIDL_CANT_INHERIT,
idl_global->lineno (),
idl_global->filename ());
ACE_ERROR ((LM_ERROR,
" abstract valuetype "));
- n->dump (*ACE_DEFAULT_LOG_STREAM);;
+ v->dump (*ACE_DEFAULT_LOG_STREAM);
+ ACE_ERROR ((LM_ERROR,
+ " attempts to inherit from nonabstract type: "));
+ i->dump (*ACE_DEFAULT_LOG_STREAM);
+ ACE_ERROR ((LM_ERROR,
+ "\n"));
+ idl_global->set_err_count (idl_global->err_count () + 1);
+}
+
+// Report illegal support of non-abstract interface.
+void
+UTL_Error::abstract_support_error (UTL_ScopedName *v,
+ UTL_ScopedName *i)
+{
+ idl_error_header (EIDL_CANT_SUPPORT,
+ idl_global->lineno (),
+ idl_global->filename ());
+ ACE_ERROR ((LM_ERROR,
+ " valuetype "));
+ v->dump (*ACE_DEFAULT_LOG_STREAM);
ACE_ERROR ((LM_ERROR,
- " attempts to inherit from nonabstract type\n"));
+ " attempts to support more than one concrete type: "));
+ i->dump (*ACE_DEFAULT_LOG_STREAM);
+ ACE_ERROR ((LM_ERROR,
+ "\n"));
idl_global->set_err_count (idl_global->err_count () + 1);
}
+void
+UTL_Error::concrete_supported_inheritance_error (UTL_ScopedName *v,
+ UTL_ScopedName *i)
+{
+ idl_error_header (EIDL_CANT_SUPPORT,
+ idl_global->lineno (),
+ idl_global->filename ());
+ ACE_ERROR ((LM_ERROR,
+ " valuetype "));
+ v->dump (*ACE_DEFAULT_LOG_STREAM);
+ ACE_ERROR ((LM_ERROR,
+ " supports concrete interface that does not inherit from"
+ " all ancestors of valuetype's ancestor's concrete supported"
+ " interface: "));
+ i->dump (*ACE_DEFAULT_LOG_STREAM);
+ ACE_ERROR ((LM_ERROR,
+ "\n"));
+ idl_global->set_err_count (idl_global->err_count () + 1);
+}
// Report an error while evaluating an expression.
void
@@ -807,7 +901,7 @@ UTL_Error::enum_val_lookup_failure (AST_Union *u,
" union %s, enum %s, enumerator ",
u->local_name ()->get_string (),
e->local_name ()->get_string ()));
- n->dump (*ACE_DEFAULT_LOG_STREAM);;
+ n->dump (*ACE_DEFAULT_LOG_STREAM);
ACE_ERROR ((LM_ERROR,
"\n"));
idl_global->set_err_count (idl_global->err_count () + 1);
diff --git a/TAO/TAO_IDL/util/utl_scope.cpp b/TAO/TAO_IDL/util/utl_scope.cpp
index f84a11cdaa9..20e635f5023 100644
--- a/TAO/TAO_IDL/util/utl_scope.cpp
+++ b/TAO/TAO_IDL/util/utl_scope.cpp
@@ -69,8 +69,8 @@ trademarks or registered trademarks of Sun Microsystems, Inc.
#include "utl_err.h"
#include "utl_indenter.h"
#include "utl_string.h"
-#include "ast_interface.h"
-#include "ast_interface_fwd.h"
+#include "ast_valuetype.h"
+#include "ast_valuetype_fwd.h"
#include "ast_typedef.h"
#include "ast_type.h"
#include "ast_root.h"
@@ -411,6 +411,11 @@ UTL_Scope::redef_clash (AST_Decl::NodeType new_nt,
case AST_Decl::NT_interface_fwd:
return (scope_elem_nt != AST_Decl::NT_interface_fwd
&& scope_elem_nt != AST_Decl::NT_interface);
+ case AST_Decl::NT_valuetype:
+ return scope_elem_nt != AST_Decl::NT_valuetype_fwd;
+ case AST_Decl::NT_valuetype_fwd:
+ return (scope_elem_nt != AST_Decl::NT_valuetype_fwd
+ && scope_elem_nt != AST_Decl::NT_valuetype);
default:
return I_TRUE;
}
@@ -472,6 +477,30 @@ UTL_Scope::add_interface_fwd (AST_InterfaceFwd *i)
return i;
}
+AST_ValueType *
+UTL_Scope::add_valuetype (AST_ValueType *i)
+{
+ if (i == 0)
+ {
+ return 0;
+ }
+
+ i->set_added (I_TRUE);
+ return i;
+}
+
+AST_ValueTypeFwd *
+UTL_Scope::add_valuetype_fwd (AST_ValueTypeFwd *i)
+{
+ if (i == 0)
+ {
+ return 0;
+ }
+
+ i->set_added (I_TRUE);
+ return i;
+}
+
AST_Exception *
UTL_Scope::add_exception (AST_Exception *e)
{
@@ -807,6 +836,18 @@ UTL_Scope::fe_add_interface_fwd (AST_InterfaceFwd *)
return 0;
}
+AST_ValueType *
+UTL_Scope::fe_add_valuetype (AST_ValueType *)
+{
+ return 0;
+}
+
+AST_ValueTypeFwd *
+UTL_Scope::fe_add_valuetype_fwd (AST_ValueTypeFwd *)
+{
+ return 0;
+}
+
AST_Exception *
UTL_Scope::fe_add_exception (AST_Exception *)
{
@@ -1337,7 +1378,8 @@ UTL_Scope::lookup_by_name_local (Identifier *e,
// Special case for forward declared interfaces,
// In this case, we want to return
// the full definition member, whether defined yet or not
- if (d->node_type () == AST_Decl::NT_interface_fwd)
+ if (nt == AST_Decl::NT_interface_fwd
+ || nt == AST_Decl::NT_valuetype_fwd)
{
d = AST_InterfaceFwd::narrow_from_decl (d)->full_definition ();
}
@@ -1443,10 +1485,11 @@ UTL_Scope::lookup_by_name (UTL_ScopedName *e,
if (d == 0)
{
- // Special case for scope which is an interface. We have to look
- // in the inherited interfaces as well.
- // Look before parent scopes.
- if (pd_scope_node_type == AST_Decl::NT_interface)
+ // Special case for scope which is an interface or value type.
+ // We have to look in the inherited interfaces as well.
+ // Look before parent scopes.
+ if (pd_scope_node_type == AST_Decl::NT_interface
+ || pd_scope_node_type == AST_Decl::NT_valuetype)
{
d = look_in_inherited (e,
treat_as_ref);