summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgokhale <asgokhale@users.noreply.github.com>1997-05-16 21:23:39 +0000
committergokhale <asgokhale@users.noreply.github.com>1997-05-16 21:23:39 +0000
commit1d4e8a2e6ee8d507d59715c9c2e96a646336db26 (patch)
tree636eacbe72f129eccae33b76255c9c3a02aacdb5
parent5d08d7e33e7346ee2eb85497c5ba091e2b571181 (diff)
downloadATCD-1d4e8a2e6ee8d507d59715c9c2e96a646336db26.tar.gz
TAO IDL Compiler: Header files
-rw-r--r--TAO/TAO_IDL/include/ast.h119
-rw-r--r--TAO/TAO_IDL/include/ast_argument.h115
-rw-r--r--TAO/TAO_IDL/include/ast_array.h117
-rw-r--r--TAO/TAO_IDL/include/ast_attribute.h109
-rw-r--r--TAO/TAO_IDL/include/ast_concrete_type.h95
-rw-r--r--TAO/TAO_IDL/include/ast_constant.h117
-rw-r--r--TAO/TAO_IDL/include/ast_decl.h188
-rw-r--r--TAO/TAO_IDL/include/ast_enum.h115
-rw-r--r--TAO/TAO_IDL/include/ast_enum_val.h99
-rw-r--r--TAO/TAO_IDL/include/ast_exception.h118
-rw-r--r--TAO/TAO_IDL/include/ast_expression.h231
-rw-r--r--TAO/TAO_IDL/include/ast_extern.h93
-rw-r--r--TAO/TAO_IDL/include/ast_field.h119
-rw-r--r--TAO/TAO_IDL/include/ast_generator.h214
-rw-r--r--TAO/TAO_IDL/include/ast_interface.h146
-rw-r--r--TAO/TAO_IDL/include/ast_interface_fwd.h106
-rw-r--r--TAO/TAO_IDL/include/ast_module.h120
-rw-r--r--TAO/TAO_IDL/include/ast_operation.h139
-rw-r--r--TAO/TAO_IDL/include/ast_predefined_type.h127
-rw-r--r--TAO/TAO_IDL/include/ast_root.h107
-rw-r--r--TAO/TAO_IDL/include/ast_sequence.h108
-rw-r--r--TAO/TAO_IDL/include/ast_string.h108
-rw-r--r--TAO/TAO_IDL/include/ast_structure.h118
-rw-r--r--TAO/TAO_IDL/include/ast_type.h101
-rw-r--r--TAO/TAO_IDL/include/ast_typedef.h105
-rw-r--r--TAO/TAO_IDL/include/ast_union.h143
-rw-r--r--TAO/TAO_IDL/include/ast_union_branch.h109
-rw-r--r--TAO/TAO_IDL/include/ast_union_label.h110
-rw-r--r--TAO/TAO_IDL/include/be_extern.h82
-rw-r--r--TAO/TAO_IDL/include/drv_extern.h86
-rw-r--r--TAO/TAO_IDL/include/drv_link.h122
-rw-r--r--TAO/TAO_IDL/include/drv_private.h83
-rw-r--r--TAO/TAO_IDL/include/fe_declarator.h113
-rw-r--r--TAO/TAO_IDL/include/fe_extern.h109
-rw-r--r--TAO/TAO_IDL/include/fe_interface_header.h109
-rw-r--r--TAO/TAO_IDL/include/fe_private.h90
-rw-r--r--TAO/TAO_IDL/include/global_extern.h80
-rw-r--r--TAO/TAO_IDL/include/idl.h97
-rw-r--r--TAO/TAO_IDL/include/idl_bool.h94
-rw-r--r--TAO/TAO_IDL/include/idl_defines.h84
-rw-r--r--TAO/TAO_IDL/include/idl_extern.h81
-rw-r--r--TAO/TAO_IDL/include/idl_fwd.h147
-rw-r--r--TAO/TAO_IDL/include/idl_global.h324
-rw-r--r--TAO/TAO_IDL/include/idl_narrow.h264
-rw-r--r--TAO/TAO_IDL/include/intlmacros.h87
-rw-r--r--TAO/TAO_IDL/include/nr_extern.h76
-rw-r--r--TAO/TAO_IDL/include/util.h87
-rw-r--r--TAO/TAO_IDL/include/utl_decllist.h121
-rw-r--r--TAO/TAO_IDL/include/utl_err.h183
-rw-r--r--TAO/TAO_IDL/include/utl_error.h183
-rw-r--r--TAO/TAO_IDL/include/utl_exceptlist.h121
-rw-r--r--TAO/TAO_IDL/include/utl_exprlist.h121
-rw-r--r--TAO/TAO_IDL/include/utl_identifier.h103
-rw-r--r--TAO/TAO_IDL/include/utl_idlist.h134
-rw-r--r--TAO/TAO_IDL/include/utl_indenter.h102
-rw-r--r--TAO/TAO_IDL/include/utl_labellist.h121
-rw-r--r--TAO/TAO_IDL/include/utl_list.h150
-rw-r--r--TAO/TAO_IDL/include/utl_namelist.h121
-rw-r--r--TAO/TAO_IDL/include/utl_scope.h290
-rw-r--r--TAO/TAO_IDL/include/utl_scoped_name.h82
-rw-r--r--TAO/TAO_IDL/include/utl_stack.h150
-rw-r--r--TAO/TAO_IDL/include/utl_string.h120
-rw-r--r--TAO/TAO_IDL/include/utl_strlist.h135
63 files changed, 7948 insertions, 0 deletions
diff --git a/TAO/TAO_IDL/include/ast.h b/TAO/TAO_IDL/include/ast.h
new file mode 100644
index 00000000000..a4c7280e6e9
--- /dev/null
+++ b/TAO/TAO_IDL/include/ast.h
@@ -0,0 +1,119 @@
+/*
+
+COPYRIGHT
+
+Copyright 1992, 1993, 1994 Sun Microsystems, Inc. Printed in the United
+States of America. All Rights Reserved.
+
+This product is protected by copyright and distributed under the following
+license restricting its use.
+
+The Interface Definition Language Compiler Front End (CFE) is made
+available for your use provided that you include this license and copyright
+notice on all media and documentation and the software program in which
+this product is incorporated in whole or part. You may copy and extend
+functionality (but may not remove functionality) of the Interface
+Definition Language CFE without charge, but you are not authorized to
+license or distribute it to anyone else except as part of a product or
+program developed by you or with the express written consent of Sun
+Microsystems, Inc. ("Sun").
+
+The names of Sun Microsystems, Inc. and any of its subsidiaries or
+affiliates may not be used in advertising or publicity pertaining to
+distribution of Interface Definition Language CFE as permitted herein.
+
+This license is effective until terminated by Sun for failure to comply
+with this license. Upon termination, you shall destroy or return all code
+and documentation for the Interface Definition Language CFE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED AS IS WITH NO WARRANTIES OF
+ANY KIND INCLUDING THE WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS
+FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR ARISING FROM A COURSE OF
+DEALING, USAGE OR TRADE PRACTICE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED WITH NO SUPPORT AND WITHOUT
+ANY OBLIGATION ON THE PART OF Sun OR ANY OF ITS SUBSIDIARIES OR AFFILIATES
+TO ASSIST IN ITS USE, CORRECTION, MODIFICATION OR ENHANCEMENT.
+
+SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES SHALL HAVE NO LIABILITY WITH
+RESPECT TO THE INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY
+INTERFACE DEFINITION LANGUAGE CFE OR ANY PART THEREOF.
+
+IN NO EVENT WILL SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES BE LIABLE FOR
+ANY LOST REVENUE OR PROFITS OR OTHER SPECIAL, INDIRECT AND CONSEQUENTIAL
+DAMAGES, EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+Use, duplication, or disclosure by the government is subject to
+restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in
+Technical Data and Computer Software clause at DFARS 252.227-7013 and FAR
+52.227-19.
+
+Sun, Sun Microsystems and the Sun logo are trademarks or registered
+trademarks of Sun Microsystems, Inc.
+
+SunSoft, Inc.
+2550 Garcia Avenue
+Mountain View, California 94043
+
+NOTE:
+
+SunOS, SunSoft, Sun, Solaris, Sun Microsystems or the Sun logo are
+trademarks or registered trademarks of Sun Microsystems, Inc.
+
+ */
+
+#ifndef _AST_AST_HH
+#define _AST_AST_HH
+
+#pragma ident "%@(#)ast.h 1.41% %92/06/10% Sun Microsystems"
+
+// ast.h
+//
+// Defines the classes which constitute the agreement between the CFE
+// and BEs.
+
+/*
+** DEPENDENCIES: NONE
+**
+** USE: Included from idl.hh
+*/
+
+#include "utl_scoped_name.h" // Define UTL_ScopedName
+
+#include "ast_decl.h" // class AST_Decl
+
+#include "ast_expression.h" // class AST_Expression
+
+#include "utl_scope.h" // class UTL_Scope
+
+#include "ast_type.h" // class AST_Type
+#include "ast_concrete_type.h" // class AST_ConcreteType
+#include "ast_predefined_type.h"// class AST_PredefinedType
+#include "ast_module.h" // class AST_Module
+#include "ast_root.h" // class AST_Root
+#include "ast_interface.h" // class AST_Interface
+#include "ast_interface_fwd.h" // class AST_InterfaceFwd
+#include "ast_structure.h" // class AST_Structure
+#include "ast_exception.h" // class AST_Exception
+#include "ast_enum.h" // class AST_Enum
+#include "ast_operation.h" // class AST_Operation
+#include "ast_field.h" // class AST_Field
+#include "ast_argument.h" // class AST_Argument
+#include "ast_attribute.h" // class AST_Attribute
+#include "ast_union.h" // class AST_Union
+#include "ast_union_branch.h" // class AST_UnionBranch
+#include "ast_union_label.h" // class AST_UnionLabel
+#include "ast_constant.h" // class AST_Constant
+#include "ast_enum_val.h" // class AST_EnumVal
+#include "ast_array.h" // class AST_Array
+#include "ast_sequence.h" // class AST_Sequence
+#include "ast_string.h" // class AST_String
+#include "ast_typedef.h" // class AST_Typedef
+
+#include "utl_list.h" // class UTL_List
+#include "utl_strlist.h" // class UTL_StrList
+#include "utl_exprlist.h" // class UTL_ExprList
+
+#include "ast_generator.h" // class AST_Generator
+
+#endif // _AST_AST_HH
diff --git a/TAO/TAO_IDL/include/ast_argument.h b/TAO/TAO_IDL/include/ast_argument.h
new file mode 100644
index 00000000000..fa8a3c6d42d
--- /dev/null
+++ b/TAO/TAO_IDL/include/ast_argument.h
@@ -0,0 +1,115 @@
+/*
+
+COPYRIGHT
+
+Copyright 1992, 1993, 1994 Sun Microsystems, Inc. Printed in the United
+States of America. All Rights Reserved.
+
+This product is protected by copyright and distributed under the following
+license restricting its use.
+
+The Interface Definition Language Compiler Front End (CFE) is made
+available for your use provided that you include this license and copyright
+notice on all media and documentation and the software program in which
+this product is incorporated in whole or part. You may copy and extend
+functionality (but may not remove functionality) of the Interface
+Definition Language CFE without charge, but you are not authorized to
+license or distribute it to anyone else except as part of a product or
+program developed by you or with the express written consent of Sun
+Microsystems, Inc. ("Sun").
+
+The names of Sun Microsystems, Inc. and any of its subsidiaries or
+affiliates may not be used in advertising or publicity pertaining to
+distribution of Interface Definition Language CFE as permitted herein.
+
+This license is effective until terminated by Sun for failure to comply
+with this license. Upon termination, you shall destroy or return all code
+and documentation for the Interface Definition Language CFE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED AS IS WITH NO WARRANTIES OF
+ANY KIND INCLUDING THE WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS
+FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR ARISING FROM A COURSE OF
+DEALING, USAGE OR TRADE PRACTICE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED WITH NO SUPPORT AND WITHOUT
+ANY OBLIGATION ON THE PART OF Sun OR ANY OF ITS SUBSIDIARIES OR AFFILIATES
+TO ASSIST IN ITS USE, CORRECTION, MODIFICATION OR ENHANCEMENT.
+
+SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES SHALL HAVE NO LIABILITY WITH
+RESPECT TO THE INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY
+INTERFACE DEFINITION LANGUAGE CFE OR ANY PART THEREOF.
+
+IN NO EVENT WILL SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES BE LIABLE FOR
+ANY LOST REVENUE OR PROFITS OR OTHER SPECIAL, INDIRECT AND CONSEQUENTIAL
+DAMAGES, EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+Use, duplication, or disclosure by the government is subject to
+restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in
+Technical Data and Computer Software clause at DFARS 252.227-7013 and FAR
+52.227-19.
+
+Sun, Sun Microsystems and the Sun logo are trademarks or registered
+trademarks of Sun Microsystems, Inc.
+
+SunSoft, Inc.
+2550 Garcia Avenue
+Mountain View, California 94043
+
+NOTE:
+
+SunOS, SunSoft, Sun, Solaris, Sun Microsystems or the Sun logo are
+trademarks or registered trademarks of Sun Microsystems, Inc.
+
+ */
+
+#ifndef _AST_ARGUMENT_AST_ARGUMENT_HH
+#define _AST_ARGUMENT_AST_ARGUMENT_HH
+
+#pragma ident "%@(#)AST_Argument.h 1.37% %92/06/10% Sun Microsystems"
+
+// Representation of argument to operation:
+//
+// An argument is a field with a direction attached
+
+/*
+** DEPENDENCIES: ast_field.hh, utl_scoped_name.hh, ast_type.hh
+** utl_strlist.hh, ast_decl.hh
+**
+** USE: Included from ast.hh
+*/
+
+#include "idl_fwd.h"
+#include "idl_narrow.h"
+#include "ast_field.h"
+
+
+class AST_Argument : public virtual AST_Field
+{
+public:
+ // Define enum with values denoting argument passing directions
+ enum Direction {dir_IN, dir_OUT, dir_INOUT};
+
+ // Operations
+
+ // Constructor(s)
+ AST_Argument();
+ AST_Argument(Direction direction, AST_Type *ft, UTL_ScopedName *n,
+ UTL_StrList *p);
+ virtual ~AST_Argument() {}
+
+ // Data Accessors
+ const Direction direction();
+
+ // Narrowing
+ DEF_NARROW_METHODS1(AST_Argument, AST_Field);
+ DEF_NARROW_FROM_DECL(AST_Argument);
+
+ // AST Dumping
+ virtual void dump(ostream &o);
+
+private:
+ // Data
+ const Direction pd_direction; // Argument direction
+};
+
+#endif // _AST_ARGUMENT_AST_ARGUMENT_HH
diff --git a/TAO/TAO_IDL/include/ast_array.h b/TAO/TAO_IDL/include/ast_array.h
new file mode 100644
index 00000000000..6dd890e7209
--- /dev/null
+++ b/TAO/TAO_IDL/include/ast_array.h
@@ -0,0 +1,117 @@
+/*
+
+COPYRIGHT
+
+Copyright 1992, 1993, 1994 Sun Microsystems, Inc. Printed in the United
+States of America. All Rights Reserved.
+
+This product is protected by copyright and distributed under the following
+license restricting its use.
+
+The Interface Definition Language Compiler Front End (CFE) is made
+available for your use provided that you include this license and copyright
+notice on all media and documentation and the software program in which
+this product is incorporated in whole or part. You may copy and extend
+functionality (but may not remove functionality) of the Interface
+Definition Language CFE without charge, but you are not authorized to
+license or distribute it to anyone else except as part of a product or
+program developed by you or with the express written consent of Sun
+Microsystems, Inc. ("Sun").
+
+The names of Sun Microsystems, Inc. and any of its subsidiaries or
+affiliates may not be used in advertising or publicity pertaining to
+distribution of Interface Definition Language CFE as permitted herein.
+
+This license is effective until terminated by Sun for failure to comply
+with this license. Upon termination, you shall destroy or return all code
+and documentation for the Interface Definition Language CFE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED AS IS WITH NO WARRANTIES OF
+ANY KIND INCLUDING THE WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS
+FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR ARISING FROM A COURSE OF
+DEALING, USAGE OR TRADE PRACTICE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED WITH NO SUPPORT AND WITHOUT
+ANY OBLIGATION ON THE PART OF Sun OR ANY OF ITS SUBSIDIARIES OR AFFILIATES
+TO ASSIST IN ITS USE, CORRECTION, MODIFICATION OR ENHANCEMENT.
+
+SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES SHALL HAVE NO LIABILITY WITH
+RESPECT TO THE INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY
+INTERFACE DEFINITION LANGUAGE CFE OR ANY PART THEREOF.
+
+IN NO EVENT WILL SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES BE LIABLE FOR
+ANY LOST REVENUE OR PROFITS OR OTHER SPECIAL, INDIRECT AND CONSEQUENTIAL
+DAMAGES, EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+Use, duplication, or disclosure by the government is subject to
+restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in
+Technical Data and Computer Software clause at DFARS 252.227-7013 and FAR
+52.227-19.
+
+Sun, Sun Microsystems and the Sun logo are trademarks or registered
+trademarks of Sun Microsystems, Inc.
+
+SunSoft, Inc.
+2550 Garcia Avenue
+Mountain View, California 94043
+
+NOTE:
+
+SunOS, SunSoft, Sun, Solaris, Sun Microsystems or the Sun logo are
+trademarks or registered trademarks of Sun Microsystems, Inc.
+
+ */
+
+#ifndef _AST_ARRAY_AST_ARRAY_HH
+#define _AST_ARRAY_AST_ARRAY_HH
+
+#pragma ident "%@(#)AST_Array.h 1.37% %92/06/10% Sun Microsystems"
+
+// Representation of array declaration:
+//
+// An array is a combination of a list of dimensions and a base type
+
+/*
+** DEPENDENCIES: ast_concrete_type.hh, utl_exprlist.hh, ast_type.hh,
+** ast_decl.hh
+**
+** USE: Included from ast.hh
+*/
+
+class AST_Array : public virtual AST_ConcreteType {
+public:
+ // Operations
+
+ // Constructor(s)
+ AST_Array();
+ AST_Array(UTL_ScopedName *n, unsigned long ndims, UTL_ExprList *dims);
+ virtual ~AST_Array() {}
+
+ // Data Accessors
+ const unsigned long n_dims();
+ AST_Expression **dims();
+ void set_dims(AST_Expression **, unsigned long);
+ AST_Type *base_type();
+ void set_base_type(AST_Type *nbt);
+
+ // Narrowing
+ DEF_NARROW_METHODS1(AST_Array, AST_ConcreteType);
+ DEF_NARROW_FROM_DECL(AST_Array);
+
+ // AST Dumping
+ virtual void dump(ostream &o);
+
+private:
+ // Data
+ unsigned long pd_n_dims; // How many dimensions?
+ AST_Expression **pd_dims; // Their expressions
+ AST_Type *pd_base_type; // Base type of array
+
+ // Operations
+
+ // Compute how many dimensions
+ AST_Expression **compute_dims(UTL_ExprList *dims,
+ unsigned long ndims);
+};
+
+#endif // _AST_ARRAY_AST_ARRAY_HH
diff --git a/TAO/TAO_IDL/include/ast_attribute.h b/TAO/TAO_IDL/include/ast_attribute.h
new file mode 100644
index 00000000000..b3037eacf7b
--- /dev/null
+++ b/TAO/TAO_IDL/include/ast_attribute.h
@@ -0,0 +1,109 @@
+/*
+
+COPYRIGHT
+
+Copyright 1992, 1993, 1994 Sun Microsystems, Inc. Printed in the United
+States of America. All Rights Reserved.
+
+This product is protected by copyright and distributed under the following
+license restricting its use.
+
+The Interface Definition Language Compiler Front End (CFE) is made
+available for your use provided that you include this license and copyright
+notice on all media and documentation and the software program in which
+this product is incorporated in whole or part. You may copy and extend
+functionality (but may not remove functionality) of the Interface
+Definition Language CFE without charge, but you are not authorized to
+license or distribute it to anyone else except as part of a product or
+program developed by you or with the express written consent of Sun
+Microsystems, Inc. ("Sun").
+
+The names of Sun Microsystems, Inc. and any of its subsidiaries or
+affiliates may not be used in advertising or publicity pertaining to
+distribution of Interface Definition Language CFE as permitted herein.
+
+This license is effective until terminated by Sun for failure to comply
+with this license. Upon termination, you shall destroy or return all code
+and documentation for the Interface Definition Language CFE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED AS IS WITH NO WARRANTIES OF
+ANY KIND INCLUDING THE WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS
+FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR ARISING FROM A COURSE OF
+DEALING, USAGE OR TRADE PRACTICE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED WITH NO SUPPORT AND WITHOUT
+ANY OBLIGATION ON THE PART OF Sun OR ANY OF ITS SUBSIDIARIES OR AFFILIATES
+TO ASSIST IN ITS USE, CORRECTION, MODIFICATION OR ENHANCEMENT.
+
+SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES SHALL HAVE NO LIABILITY WITH
+RESPECT TO THE INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY
+INTERFACE DEFINITION LANGUAGE CFE OR ANY PART THEREOF.
+
+IN NO EVENT WILL SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES BE LIABLE FOR
+ANY LOST REVENUE OR PROFITS OR OTHER SPECIAL, INDIRECT AND CONSEQUENTIAL
+DAMAGES, EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+Use, duplication, or disclosure by the government is subject to
+restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in
+Technical Data and Computer Software clause at DFARS 252.227-7013 and FAR
+52.227-19.
+
+Sun, Sun Microsystems and the Sun logo are trademarks or registered
+trademarks of Sun Microsystems, Inc.
+
+SunSoft, Inc.
+2550 Garcia Avenue
+Mountain View, California 94043
+
+NOTE:
+
+SunOS, SunSoft, Sun, Solaris, Sun Microsystems or the Sun logo are
+trademarks or registered trademarks of Sun Microsystems, Inc.
+
+ */
+
+#ifndef _AST_ATTRIBUTE_AST_ATTRIBUTE_HH
+#define _AST_ATTRIBUTE_AST_ATTRIBUTE_HH
+
+#pragma ident "%@(#)AST_Attribute.h 1.37% %92/06/10% Sun Microsystems"
+
+// Representation of attribute declaration:
+//
+// An attribute is a field with a readonly property
+
+/*
+** DEPENDENCIES: ast_field.hh, ast_type.hh, utl_scoped_name.hh,
+** utl_strlist.hh, ast_decl.hh
+**
+** USE: Included from ast.h
+*/
+
+class AST_Attribute : public virtual AST_Field
+{
+public:
+ // Operations
+
+ // Constructor(s)
+ AST_Attribute();
+ AST_Attribute(idl_bool readonly,
+ AST_Type *ft,
+ UTL_ScopedName *n,
+ UTL_StrList *p);
+ virtual ~AST_Attribute() {}
+
+ // Data Accessors
+ const idl_bool readonly();
+
+ // Narrowing
+ DEF_NARROW_METHODS1(AST_Attribute, AST_Field);
+ DEF_NARROW_FROM_DECL(AST_Attribute);
+
+ // AST Dumping
+ virtual void dump(ostream &o);
+
+private:
+ // Data
+ const idl_bool pd_readonly; // Is attribute read-only?
+};
+
+#endif // _AST_ATTRIBUTE_AST_ATTRIBUTE_HH
diff --git a/TAO/TAO_IDL/include/ast_concrete_type.h b/TAO/TAO_IDL/include/ast_concrete_type.h
new file mode 100644
index 00000000000..65514646d0f
--- /dev/null
+++ b/TAO/TAO_IDL/include/ast_concrete_type.h
@@ -0,0 +1,95 @@
+/*
+
+COPYRIGHT
+
+Copyright 1992, 1993, 1994 Sun Microsystems, Inc. Printed in the United
+States of America. All Rights Reserved.
+
+This product is protected by copyright and distributed under the following
+license restricting its use.
+
+The Interface Definition Language Compiler Front End (CFE) is made
+available for your use provided that you include this license and copyright
+notice on all media and documentation and the software program in which
+this product is incorporated in whole or part. You may copy and extend
+functionality (but may not remove functionality) of the Interface
+Definition Language CFE without charge, but you are not authorized to
+license or distribute it to anyone else except as part of a product or
+program developed by you or with the express written consent of Sun
+Microsystems, Inc. ("Sun").
+
+The names of Sun Microsystems, Inc. and any of its subsidiaries or
+affiliates may not be used in advertising or publicity pertaining to
+distribution of Interface Definition Language CFE as permitted herein.
+
+This license is effective until terminated by Sun for failure to comply
+with this license. Upon termination, you shall destroy or return all code
+and documentation for the Interface Definition Language CFE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED AS IS WITH NO WARRANTIES OF
+ANY KIND INCLUDING THE WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS
+FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR ARISING FROM A COURSE OF
+DEALING, USAGE OR TRADE PRACTICE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED WITH NO SUPPORT AND WITHOUT
+ANY OBLIGATION ON THE PART OF Sun OR ANY OF ITS SUBSIDIARIES OR AFFILIATES
+TO ASSIST IN ITS USE, CORRECTION, MODIFICATION OR ENHANCEMENT.
+
+SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES SHALL HAVE NO LIABILITY WITH
+RESPECT TO THE INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY
+INTERFACE DEFINITION LANGUAGE CFE OR ANY PART THEREOF.
+
+IN NO EVENT WILL SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES BE LIABLE FOR
+ANY LOST REVENUE OR PROFITS OR OTHER SPECIAL, INDIRECT AND CONSEQUENTIAL
+DAMAGES, EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+Use, duplication, or disclosure by the government is subject to
+restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in
+Technical Data and Computer Software clause at DFARS 252.227-7013 and FAR
+52.227-19.
+
+Sun, Sun Microsystems and the Sun logo are trademarks or registered
+trademarks of Sun Microsystems, Inc.
+
+SunSoft, Inc.
+2550 Garcia Avenue
+Mountain View, California 94043
+
+NOTE:
+
+SunOS, SunSoft, Sun, Solaris, Sun Microsystems or the Sun logo are
+trademarks or registered trademarks of Sun Microsystems, Inc.
+
+ */
+
+#ifndef _AST_CONCRETE_TYPE_AST_CONCRETE_TYPE_HH
+#define _AST_CONCRETE_TYPE_AST_CONCRETE_TYPE_HH
+
+#pragma ident "%@(#)AST_ConcreteType.h 1.37% %92/06/10% Sun Microsystems"
+
+// Class for all concrete types
+//
+// This is useful to group together IDL types other than objects
+
+/*
+** DEPENDENCIES: ast_type.hh, ast_decl.hh, utl_scoped_name.hh, utl_strlist.hh
+**
+** USE: Included from ast.hh
+*/
+
+class AST_ConcreteType : public virtual AST_Type
+{
+public:
+ // Operations
+
+ // Constructor(s)
+ AST_ConcreteType();
+ AST_ConcreteType(AST_Decl::NodeType nt, UTL_ScopedName *n, UTL_StrList *p);
+ virtual ~AST_ConcreteType() {}
+
+ // Narrowing
+ DEF_NARROW_METHODS1(AST_ConcreteType, AST_Type);
+ DEF_NARROW_FROM_DECL(AST_ConcreteType);
+};
+
+#endif // _AST_CONCRETE_TYPE_AST_CONCRETE_TYPE_HH
diff --git a/TAO/TAO_IDL/include/ast_constant.h b/TAO/TAO_IDL/include/ast_constant.h
new file mode 100644
index 00000000000..b35ed025827
--- /dev/null
+++ b/TAO/TAO_IDL/include/ast_constant.h
@@ -0,0 +1,117 @@
+/*
+
+COPYRIGHT
+
+Copyright 1992, 1993, 1994 Sun Microsystems, Inc. Printed in the United
+States of America. All Rights Reserved.
+
+This product is protected by copyright and distributed under the following
+license restricting its use.
+
+The Interface Definition Language Compiler Front End (CFE) is made
+available for your use provided that you include this license and copyright
+notice on all media and documentation and the software program in which
+this product is incorporated in whole or part. You may copy and extend
+functionality (but may not remove functionality) of the Interface
+Definition Language CFE without charge, but you are not authorized to
+license or distribute it to anyone else except as part of a product or
+program developed by you or with the express written consent of Sun
+Microsystems, Inc. ("Sun").
+
+The names of Sun Microsystems, Inc. and any of its subsidiaries or
+affiliates may not be used in advertising or publicity pertaining to
+distribution of Interface Definition Language CFE as permitted herein.
+
+This license is effective until terminated by Sun for failure to comply
+with this license. Upon termination, you shall destroy or return all code
+and documentation for the Interface Definition Language CFE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED AS IS WITH NO WARRANTIES OF
+ANY KIND INCLUDING THE WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS
+FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR ARISING FROM A COURSE OF
+DEALING, USAGE OR TRADE PRACTICE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED WITH NO SUPPORT AND WITHOUT
+ANY OBLIGATION ON THE PART OF Sun OR ANY OF ITS SUBSIDIARIES OR AFFILIATES
+TO ASSIST IN ITS USE, CORRECTION, MODIFICATION OR ENHANCEMENT.
+
+SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES SHALL HAVE NO LIABILITY WITH
+RESPECT TO THE INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY
+INTERFACE DEFINITION LANGUAGE CFE OR ANY PART THEREOF.
+
+IN NO EVENT WILL SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES BE LIABLE FOR
+ANY LOST REVENUE OR PROFITS OR OTHER SPECIAL, INDIRECT AND CONSEQUENTIAL
+DAMAGES, EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+Use, duplication, or disclosure by the government is subject to
+restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in
+Technical Data and Computer Software clause at DFARS 252.227-7013 and FAR
+52.227-19.
+
+Sun, Sun Microsystems and the Sun logo are trademarks or registered
+trademarks of Sun Microsystems, Inc.
+
+SunSoft, Inc.
+2550 Garcia Avenue
+Mountain View, California 94043
+
+NOTE:
+
+SunOS, SunSoft, Sun, Solaris, Sun Microsystems or the Sun logo are
+trademarks or registered trademarks of Sun Microsystems, Inc.
+
+ */
+
+#ifndef _AST_CONSTANT_AST_CONSTANT_HH
+#define _AST_CONSTANT_AST_CONSTANT_HH
+
+#pragma ident "%@(#)AST_Constant.h 1.37% %92/06/10% Sun Microsystems"
+
+// Representation of constant declaration:
+//
+// NOTE: Part of the job of the constructor is to convert
+// the AST_Constant_val it received to the type denoted by
+// the ConstantType it received.
+//
+// NOTE: There are two constructors here, one that gets a NodeType
+// parameter. This constructor is used from AST_EnumVal, which is
+// just a glorified AST_Constant
+
+/*
+** DEPENDENCIES: ast_decl.hh, ast_expression.hh, utl_scoped_name.hh,
+** utl_strlist.hh
+**
+** USE: Included from ast.hh
+*/
+
+class AST_Constant : public virtual AST_Decl
+{
+public:
+ // Operations
+
+ // Constructor(s)
+ AST_Constant();
+ AST_Constant(AST_Expression::ExprType et, AST_Decl::NodeType nt,
+ AST_Expression *ev, UTL_ScopedName *n, UTL_StrList *p);
+ AST_Constant(AST_Expression::ExprType et, AST_Expression *ev,
+ UTL_ScopedName *n, UTL_StrList *p);
+ virtual ~AST_Constant() {}
+
+ // Data Accessors
+ AST_Expression *constant_value();
+ AST_Expression::ExprType et();
+
+ // Narrowing
+ DEF_NARROW_METHODS1(AST_Constant, AST_Decl);
+ DEF_NARROW_FROM_DECL(AST_Constant);
+
+ // AST Dumping
+ virtual void dump(ostream &o);
+
+private:
+ // Data
+ AST_Expression *pd_constant_value; // The value
+ AST_Expression::ExprType pd_et; // Its expr type
+};
+
+#endif // _AST_CONSTANT_AST_CONSTANT_HH
diff --git a/TAO/TAO_IDL/include/ast_decl.h b/TAO/TAO_IDL/include/ast_decl.h
new file mode 100644
index 00000000000..74ca5b88079
--- /dev/null
+++ b/TAO/TAO_IDL/include/ast_decl.h
@@ -0,0 +1,188 @@
+/*
+
+COPYRIGHT
+
+Copyright 1992, 1993, 1994 Sun Microsystems, Inc. Printed in the United
+States of America. All Rights Reserved.
+
+This product is protected by copyright and distributed under the following
+license restricting its use.
+
+The Interface Definition Language Compiler Front End (CFE) is made
+available for your use provided that you include this license and copyright
+notice on all media and documentation and the software program in which
+this product is incorporated in whole or part. You may copy and extend
+functionality (but may not remove functionality) of the Interface
+Definition Language CFE without charge, but you are not authorized to
+license or distribute it to anyone else except as part of a product or
+program developed by you or with the express written consent of Sun
+Microsystems, Inc. ("Sun").
+
+The names of Sun Microsystems, Inc. and any of its subsidiaries or
+affiliates may not be used in advertising or publicity pertaining to
+distribution of Interface Definition Language CFE as permitted herein.
+
+This license is effective until terminated by Sun for failure to comply
+with this license. Upon termination, you shall destroy or return all code
+and documentation for the Interface Definition Language CFE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED AS IS WITH NO WARRANTIES OF
+ANY KIND INCLUDING THE WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS
+FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR ARISING FROM A COURSE OF
+DEALING, USAGE OR TRADE PRACTICE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED WITH NO SUPPORT AND WITHOUT
+ANY OBLIGATION ON THE PART OF Sun OR ANY OF ITS SUBSIDIARIES OR AFFILIATES
+TO ASSIST IN ITS USE, CORRECTION, MODIFICATION OR ENHANCEMENT.
+
+SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES SHALL HAVE NO LIABILITY WITH
+RESPECT TO THE INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY
+INTERFACE DEFINITION LANGUAGE CFE OR ANY PART THEREOF.
+
+IN NO EVENT WILL SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES BE LIABLE FOR
+ANY LOST REVENUE OR PROFITS OR OTHER SPECIAL, INDIRECT AND CONSEQUENTIAL
+DAMAGES, EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+Use, duplication, or disclosure by the government is subject to
+restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in
+Technical Data and Computer Software clause at DFARS 252.227-7013 and FAR
+52.227-19.
+
+Sun, Sun Microsystems and the Sun logo are trademarks or registered
+trademarks of Sun Microsystems, Inc.
+
+SunSoft, Inc.
+2550 Garcia Avenue
+Mountain View, California 94043
+
+NOTE:
+
+SunOS, SunSoft, Sun, Solaris, Sun Microsystems or the Sun logo are
+trademarks or registered trademarks of Sun Microsystems, Inc.
+
+ */
+
+#ifndef _AST_DECL_AST_DECL_HH
+#define _AST_DECL_AST_DECL_HH
+
+#pragma ident "%@(#)AST_Decl.h 1.38% %92/06/10% Sun Microsystems"
+
+// Rock bottom of AST class hierarchy
+//
+// This class is inherited by all classes which represent named entities
+// in IDL. It implements the line and file recording mechanism and also
+// records the type of the node. This may be useful for BEs to be able
+// to distinguish the real type of a node given only a superclass.
+
+/*
+** DEPENDENCIES: utl_scope.hh, utl_scoped_name.hh, utl_strlist.hh
+**
+** USE: Included from ast.hh
+*/
+
+#include <iostream.h>
+#include "idl_fwd.h"
+#include "idl_narrow.h"
+#include "idl_bool.h"
+#include "utl_scoped_name.h"
+#include "utl_string.h"
+
+// This class is needed (only for g++) to get around a bug in g++ which
+// causes virtual operations to not be looked up correctly if an operation
+// is defined in more than one virtual public base class. This class makes
+// the hierarchy rooted in a single class, thereby eliminating the situation
+// that causes the bug to appear
+
+class COMMON_Base
+{
+ public:
+ // Narrowing
+ DEF_NARROW_METHODS0(COMMON_Base);
+};
+
+class AST_Decl : public virtual COMMON_Base
+{
+public:
+ // Enum defining the different kinds of AST nodes
+ enum NodeType {
+ NT_module // Denotes a module
+ , NT_root // Denotes the root of AST
+ , NT_interface // Denotes an interface
+ , NT_interface_fwd // Fwd declared interface
+ , NT_const // Denotes a constant
+ , NT_except // Denotes an exception
+ , NT_attr // Denotes an attribute
+ , NT_op // Denotes an operation
+ , NT_argument // Denotes an op. argument
+ , NT_union // Denotes a union
+ , NT_union_branch // Denotes a union branch
+ , NT_struct // Denotes a structure
+ , NT_field // Denotes a field in structure
+ , NT_enum // Denotes an enumeration
+ , NT_enum_val // Denotes an enum. value
+ , NT_string // Denotes an IDL string
+ , NT_array // Denotes an IDL array
+ , NT_sequence // Denotes an IDL sequence
+ , NT_typedef // Denotes a typedef
+ , NT_pre_defined // Denotes a predefined type
+ };
+
+ // Operations
+
+ // Constructor(s)
+ AST_Decl();
+ AST_Decl(NodeType type, UTL_ScopedName *n, UTL_StrList *pragmas);
+ virtual ~AST_Decl() {}
+
+ // Data Accessors
+ idl_bool imported();
+ void set_imported(idl_bool is_it);
+ idl_bool in_main_file();
+ void set_in_main_file(idl_bool is_it);
+ UTL_Scope *defined_in();
+ void set_defined_in(UTL_Scope *);
+ NodeType node_type();
+ long line();
+ void set_line(long l);
+ String *file_name();
+ void set_file_name(String *s);
+ UTL_ScopedName *name();
+ void set_name(UTL_ScopedName *n);
+ Identifier *local_name();
+ void add_pragmas(UTL_StrList *p);
+ UTL_StrList *pragmas();
+ idl_bool added();
+ void set_added(idl_bool is_it);
+
+ // Narrowing
+ DEF_NARROW_METHODS0(AST_Decl);
+ DEF_NARROW_FROM_DECL(AST_Decl);
+
+ // AST Dumping
+ virtual void dump(ostream &o);
+
+ // Other operations
+
+ // Return TRUE if "this" has "s" as an ancestor
+ idl_bool has_ancestor(AST_Decl *s);
+
+private:
+ // Data
+ idl_bool pd_imported; // Imported?
+ idl_bool pd_in_main_file; // Defined in main file?
+ UTL_Scope *pd_defined_in; // Scope
+ NodeType pd_node_type; // What kind of node
+ long pd_line; // Line defined in
+ String *pd_file_name; // What file defined in
+ UTL_ScopedName *pd_name; // As given
+ Identifier *pd_local_name; // Name in scope
+ UTL_StrList *pd_pragmas; // Pragmas
+ idl_bool pd_added; // already added
+
+ // Operations
+
+ // Compute the full name of an AST node
+ void compute_full_name(UTL_ScopedName *n);
+};
+
+#endif // _AST_DECL_AST_DECL_HH
diff --git a/TAO/TAO_IDL/include/ast_enum.h b/TAO/TAO_IDL/include/ast_enum.h
new file mode 100644
index 00000000000..f948ccc82e2
--- /dev/null
+++ b/TAO/TAO_IDL/include/ast_enum.h
@@ -0,0 +1,115 @@
+/*
+
+COPYRIGHT
+
+Copyright 1992, 1993, 1994 Sun Microsystems, Inc. Printed in the United
+States of America. All Rights Reserved.
+
+This product is protected by copyright and distributed under the following
+license restricting its use.
+
+The Interface Definition Language Compiler Front End (CFE) is made
+available for your use provided that you include this license and copyright
+notice on all media and documentation and the software program in which
+this product is incorporated in whole or part. You may copy and extend
+functionality (but may not remove functionality) of the Interface
+Definition Language CFE without charge, but you are not authorized to
+license or distribute it to anyone else except as part of a product or
+program developed by you or with the express written consent of Sun
+Microsystems, Inc. ("Sun").
+
+The names of Sun Microsystems, Inc. and any of its subsidiaries or
+affiliates may not be used in advertising or publicity pertaining to
+distribution of Interface Definition Language CFE as permitted herein.
+
+This license is effective until terminated by Sun for failure to comply
+with this license. Upon termination, you shall destroy or return all code
+and documentation for the Interface Definition Language CFE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED AS IS WITH NO WARRANTIES OF
+ANY KIND INCLUDING THE WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS
+FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR ARISING FROM A COURSE OF
+DEALING, USAGE OR TRADE PRACTICE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED WITH NO SUPPORT AND WITHOUT
+ANY OBLIGATION ON THE PART OF Sun OR ANY OF ITS SUBSIDIARIES OR AFFILIATES
+TO ASSIST IN ITS USE, CORRECTION, MODIFICATION OR ENHANCEMENT.
+
+SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES SHALL HAVE NO LIABILITY WITH
+RESPECT TO THE INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY
+INTERFACE DEFINITION LANGUAGE CFE OR ANY PART THEREOF.
+
+IN NO EVENT WILL SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES BE LIABLE FOR
+ANY LOST REVENUE OR PROFITS OR OTHER SPECIAL, INDIRECT AND CONSEQUENTIAL
+DAMAGES, EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+Use, duplication, or disclosure by the government is subject to
+restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in
+Technical Data and Computer Software clause at DFARS 252.227-7013 and FAR
+52.227-19.
+
+Sun, Sun Microsystems and the Sun logo are trademarks or registered
+trademarks of Sun Microsystems, Inc.
+
+SunSoft, Inc.
+2550 Garcia Avenue
+Mountain View, California 94043
+
+NOTE:
+
+SunOS, SunSoft, Sun, Solaris, Sun Microsystems or the Sun logo are
+trademarks or registered trademarks of Sun Microsystems, Inc.
+
+ */
+
+#ifndef _AST_ENUM_AST_ENUM_HH
+#define _AST_ENUM_AST_ENUM_HH
+
+#pragma ident "%@(#)AST_Enum.h 1.37% %92/06/10% Sun Microsystems"
+
+// Representation of enum:
+
+/*
+** DEPENDENCIES: ast_concrete_type.hh, utl_scope.hh, ast_enum_val.hh,
+** utl_scoped_name.hh, utl_strlist.hh, ast_expression.hh,
+**
+** USE: Included from ast.hh
+*/
+
+class AST_Enum : public virtual AST_ConcreteType, public virtual UTL_Scope
+{
+public:
+ // Operations
+
+ // Constructor(s)
+ AST_Enum();
+ AST_Enum(UTL_ScopedName *n, UTL_StrList *p);
+ virtual ~AST_Enum() {}
+
+ // Narrowing
+ DEF_NARROW_METHODS2(AST_Enum, AST_ConcreteType, UTL_Scope);
+ DEF_NARROW_FROM_DECL(AST_Enum);
+ DEF_NARROW_FROM_SCOPE(AST_Enum);
+
+ // AST Dumping
+ virtual void dump(ostream &);
+
+ // Other operations
+
+ // Look up an AST_EnumVal by value
+ virtual AST_EnumVal *lookup_by_value(const AST_Expression *v);
+
+ // Get value to be assigned to next enumerator
+ virtual unsigned long next_enum_val();
+
+private:
+ // Data
+ unsigned long pd_enum_counter; // Value for next
+ // enumerator
+ // Scope management
+ friend int yyparse();
+ virtual AST_EnumVal *fe_add_enum_val(AST_EnumVal *v);
+
+};
+
+#endif // _AST_ENUM_AST_ENUM_HH
diff --git a/TAO/TAO_IDL/include/ast_enum_val.h b/TAO/TAO_IDL/include/ast_enum_val.h
new file mode 100644
index 00000000000..415856e98d8
--- /dev/null
+++ b/TAO/TAO_IDL/include/ast_enum_val.h
@@ -0,0 +1,99 @@
+/*
+
+COPYRIGHT
+
+Copyright 1992, 1993, 1994 Sun Microsystems, Inc. Printed in the United
+States of America. All Rights Reserved.
+
+This product is protected by copyright and distributed under the following
+license restricting its use.
+
+The Interface Definition Language Compiler Front End (CFE) is made
+available for your use provided that you include this license and copyright
+notice on all media and documentation and the software program in which
+this product is incorporated in whole or part. You may copy and extend
+functionality (but may not remove functionality) of the Interface
+Definition Language CFE without charge, but you are not authorized to
+license or distribute it to anyone else except as part of a product or
+program developed by you or with the express written consent of Sun
+Microsystems, Inc. ("Sun").
+
+The names of Sun Microsystems, Inc. and any of its subsidiaries or
+affiliates may not be used in advertising or publicity pertaining to
+distribution of Interface Definition Language CFE as permitted herein.
+
+This license is effective until terminated by Sun for failure to comply
+with this license. Upon termination, you shall destroy or return all code
+and documentation for the Interface Definition Language CFE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED AS IS WITH NO WARRANTIES OF
+ANY KIND INCLUDING THE WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS
+FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR ARISING FROM A COURSE OF
+DEALING, USAGE OR TRADE PRACTICE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED WITH NO SUPPORT AND WITHOUT
+ANY OBLIGATION ON THE PART OF Sun OR ANY OF ITS SUBSIDIARIES OR AFFILIATES
+TO ASSIST IN ITS USE, CORRECTION, MODIFICATION OR ENHANCEMENT.
+
+SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES SHALL HAVE NO LIABILITY WITH
+RESPECT TO THE INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY
+INTERFACE DEFINITION LANGUAGE CFE OR ANY PART THEREOF.
+
+IN NO EVENT WILL SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES BE LIABLE FOR
+ANY LOST REVENUE OR PROFITS OR OTHER SPECIAL, INDIRECT AND CONSEQUENTIAL
+DAMAGES, EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+Use, duplication, or disclosure by the government is subject to
+restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in
+Technical Data and Computer Software clause at DFARS 252.227-7013 and FAR
+52.227-19.
+
+Sun, Sun Microsystems and the Sun logo are trademarks or registered
+trademarks of Sun Microsystems, Inc.
+
+SunSoft, Inc.
+2550 Garcia Avenue
+Mountain View, California 94043
+
+NOTE:
+
+SunOS, SunSoft, Sun, Solaris, Sun Microsystems or the Sun logo are
+trademarks or registered trademarks of Sun Microsystems, Inc.
+
+ */
+
+#ifndef _AST_ENUM_VAL_AST_ENUM_VAL_HH
+#define _AST_ENUM_VAL_AST_ENUM_VAL_HH
+
+#pragma ident "%@(#)AST_EnumVal.h 1.37% %92/06/10% Sun Microsystems"
+
+// Representation of enumerator in enum:
+//
+// An enumerator is a constant of type unsigned long
+
+/*
+** DEPENDENCIES: ast_constant.hh, utl_scoped_name.hh, utl_strlist.hh,
+** ast_decl.hh
+**
+** USE: Included from ast.hh
+*/
+
+class AST_EnumVal : public virtual AST_Constant
+{
+public:
+ // Operations
+
+ // Constructor(s)
+ AST_EnumVal();
+ AST_EnumVal(unsigned long v, UTL_ScopedName *n, UTL_StrList *p);
+ virtual ~AST_EnumVal() {}
+
+ // Narrowing
+ DEF_NARROW_METHODS1(AST_EnumVal, AST_Constant);
+ DEF_NARROW_FROM_DECL(AST_EnumVal);
+
+ // AST Dumping
+ virtual void dump(ostream &);
+};
+
+#endif // _AST_ENUM_VAL_AST_ENUM_VAL_HH
diff --git a/TAO/TAO_IDL/include/ast_exception.h b/TAO/TAO_IDL/include/ast_exception.h
new file mode 100644
index 00000000000..61b24b6f1d4
--- /dev/null
+++ b/TAO/TAO_IDL/include/ast_exception.h
@@ -0,0 +1,118 @@
+/*
+
+COPYRIGHT
+
+Copyright 1992, 1993, 1994 Sun Microsystems, Inc. Printed in the United
+States of America. All Rights Reserved.
+
+This product is protected by copyright and distributed under the following
+license restricting its use.
+
+The Interface Definition Language Compiler Front End (CFE) is made
+available for your use provided that you include this license and copyright
+notice on all media and documentation and the software program in which
+this product is incorporated in whole or part. You may copy and extend
+functionality (but may not remove functionality) of the Interface
+Definition Language CFE without charge, but you are not authorized to
+license or distribute it to anyone else except as part of a product or
+program developed by you or with the express written consent of Sun
+Microsystems, Inc. ("Sun").
+
+The names of Sun Microsystems, Inc. and any of its subsidiaries or
+affiliates may not be used in advertising or publicity pertaining to
+distribution of Interface Definition Language CFE as permitted herein.
+
+This license is effective until terminated by Sun for failure to comply
+with this license. Upon termination, you shall destroy or return all code
+and documentation for the Interface Definition Language CFE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED AS IS WITH NO WARRANTIES OF
+ANY KIND INCLUDING THE WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS
+FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR ARISING FROM A COURSE OF
+DEALING, USAGE OR TRADE PRACTICE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED WITH NO SUPPORT AND WITHOUT
+ANY OBLIGATION ON THE PART OF Sun OR ANY OF ITS SUBSIDIARIES OR AFFILIATES
+TO ASSIST IN ITS USE, CORRECTION, MODIFICATION OR ENHANCEMENT.
+
+SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES SHALL HAVE NO LIABILITY WITH
+RESPECT TO THE INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY
+INTERFACE DEFINITION LANGUAGE CFE OR ANY PART THEREOF.
+
+IN NO EVENT WILL SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES BE LIABLE FOR
+ANY LOST REVENUE OR PROFITS OR OTHER SPECIAL, INDIRECT AND CONSEQUENTIAL
+DAMAGES, EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+Use, duplication, or disclosure by the government is subject to
+restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in
+Technical Data and Computer Software clause at DFARS 252.227-7013 and FAR
+52.227-19.
+
+Sun, Sun Microsystems and the Sun logo are trademarks or registered
+trademarks of Sun Microsystems, Inc.
+
+SunSoft, Inc.
+2550 Garcia Avenue
+Mountain View, California 94043
+
+NOTE:
+
+SunOS, SunSoft, Sun, Solaris, Sun Microsystems or the Sun logo are
+trademarks or registered trademarks of Sun Microsystems, Inc.
+
+ */
+
+#ifndef _AST_EXCEPTION_AST_EXCEPTION_HH
+#define _AST_EXCEPTION_AST_EXCEPTION_HH
+
+#pragma ident "%@(#)AST_Exception.h 1.37% %92/06/10% Sun Microsystems"
+
+// Representation of exception
+//
+// NOTE: An exception is not a type according to the CORBAS 1.1
+//
+// NOTE: add(AST_ConcreteType *) is defined here because an exception
+// can contain locally defined types in addition to fields.
+//
+// NOTE: add(AST_EnumValue *) is defined here because enums can
+// be defined manifest locally; the constants defined in these
+// enums are inserted in the enclosing scope. It is unlikely that
+// a BE writer will need to overload this function in AST_Exception.
+
+/*
+** DEPENDENCIES: ast_decl.hh, ast_structure.hh, utl_scope.hh, utl_strlist.hh
+**
+** USE: Included from ast.hh
+*/
+
+class AST_Exception : public virtual AST_Structure
+{
+public:
+ // Operations
+
+ // Constructor(s)
+ AST_Exception();
+ AST_Exception(UTL_ScopedName *n, UTL_StrList *p);
+ virtual ~AST_Exception() {}
+
+ // Narrowing
+ DEF_NARROW_METHODS1(AST_Exception, AST_Structure);
+ DEF_NARROW_FROM_DECL(AST_Exception);
+ DEF_NARROW_FROM_SCOPE(AST_Exception);
+
+ // AST Dumping
+ virtual void dump(ostream &o);
+
+private:
+ friend int yyparse();
+ // Scope Management Protocol
+
+ virtual AST_Field *fe_add_field(AST_Field *f);
+ virtual AST_Union *fe_add_union(AST_Union *u);
+ virtual AST_Structure *fe_add_structure(AST_Structure *s);
+ virtual AST_Enum *fe_add_enum(AST_Enum *e);
+ virtual AST_EnumVal *fe_add_enum_val(AST_EnumVal *v);
+
+};
+
+#endif // _AST_EXCEPTION_AST_EXCEPTION_HH
diff --git a/TAO/TAO_IDL/include/ast_expression.h b/TAO/TAO_IDL/include/ast_expression.h
new file mode 100644
index 00000000000..10c9ce2705a
--- /dev/null
+++ b/TAO/TAO_IDL/include/ast_expression.h
@@ -0,0 +1,231 @@
+/*
+
+COPYRIGHT
+
+Copyright 1992, 1993, 1994 Sun Microsystems, Inc. Printed in the United
+States of America. All Rights Reserved.
+
+This product is protected by copyright and distributed under the following
+license restricting its use.
+
+The Interface Definition Language Compiler Front End (CFE) is made
+available for your use provided that you include this license and copyright
+notice on all media and documentation and the software program in which
+this product is incorporated in whole or part. You may copy and extend
+functionality (but may not remove functionality) of the Interface
+Definition Language CFE without charge, but you are not authorized to
+license or distribute it to anyone else except as part of a product or
+program developed by you or with the express written consent of Sun
+Microsystems, Inc. ("Sun").
+
+The names of Sun Microsystems, Inc. and any of its subsidiaries or
+affiliates may not be used in advertising or publicity pertaining to
+distribution of Interface Definition Language CFE as permitted herein.
+
+This license is effective until terminated by Sun for failure to comply
+with this license. Upon termination, you shall destroy or return all code
+and documentation for the Interface Definition Language CFE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED AS IS WITH NO WARRANTIES OF
+ANY KIND INCLUDING THE WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS
+FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR ARISING FROM A COURSE OF
+DEALING, USAGE OR TRADE PRACTICE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED WITH NO SUPPORT AND WITHOUT
+ANY OBLIGATION ON THE PART OF Sun OR ANY OF ITS SUBSIDIARIES OR AFFILIATES
+TO ASSIST IN ITS USE, CORRECTION, MODIFICATION OR ENHANCEMENT.
+
+SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES SHALL HAVE NO LIABILITY WITH
+RESPECT TO THE INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY
+INTERFACE DEFINITION LANGUAGE CFE OR ANY PART THEREOF.
+
+IN NO EVENT WILL SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES BE LIABLE FOR
+ANY LOST REVENUE OR PROFITS OR OTHER SPECIAL, INDIRECT AND CONSEQUENTIAL
+DAMAGES, EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+Use, duplication, or disclosure by the government is subject to
+restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in
+Technical Data and Computer Software clause at DFARS 252.227-7013 and FAR
+52.227-19.
+
+Sun, Sun Microsystems and the Sun logo are trademarks or registered
+trademarks of Sun Microsystems, Inc.
+
+SunSoft, Inc.
+2550 Garcia Avenue
+Mountain View, California 94043
+
+NOTE:
+
+SunOS, SunSoft, Sun, Solaris, Sun Microsystems or the Sun logo are
+trademarks or registered trademarks of Sun Microsystems, Inc.
+
+ */
+
+#ifndef _AST_EXPRESSION_AST_EXPRESSION_HH
+#define _AST_EXPRESSION_AST_EXPRESSION_HH
+
+#pragma ident "%@(#)AST_Expression.h 1.39% %92/06/10% Sun Microsystems"
+
+// Representation of expression values
+
+/*
+** DEPENDENCIES: NONE
+**
+** USE: Included from ast.hh
+*/
+
+// An expression (and maybe its value, if computed)
+class AST_Expression {
+public:
+ // Enum to define all the different operators to combine expressions
+ enum ExprComb {
+ EC_add // '+'
+ , EC_minus // '-'
+ , EC_mul // '*'
+ , EC_div // '/'
+ , EC_mod // '%'
+ , EC_or // '|'
+ , EC_xor // '^'
+ , EC_and // '&'
+ , EC_left // '<<'
+ , EC_right // '>>'
+ , EC_u_plus // unary '+'
+ , EC_u_minus // unary '-'
+ , EC_bit_neg // '~'
+ , EC_none // No operator (missing)
+ , EC_symbol // a symbol (function or constant name)
+ };
+
+ // Enum to define the different kinds of evaluation possible
+ // Extend this for more kinds of evaluation as required
+ enum EvalKind {
+ EK_const // Must evaluate to constant
+ , EK_positive_int // Must evaluate to positive integer
+ };
+
+ // Enum to define expression type
+ enum ExprType {
+ EV_short // Expression value is short
+ , EV_ushort // Expression value is unsigned short
+ , EV_long // Expression value is long
+ , EV_ulong // Expression value is unsigned long
+ , EV_longlong // Expression value is long long
+ , EV_ulonglong // Expression value is unsigned long long
+ , EV_float // Expression value is 32-bit float
+ , EV_double // Expression value is 64-bit float
+ , EV_longdouble // Expression value is 128-bit float
+ , EV_char // Expression value is char
+ , EV_wchar // Expression value is wide char
+ , EV_octet // Expression value is unsigned char
+ , EV_bool // Expression value is boolean
+ , EV_string // Expression value is char *
+ , EV_wstring // Expression value is wchar_t *
+ , EV_any // Expression value is any of above
+ , EV_void // Expression value is void (absent)
+ , EV_none // Expression value is missing
+ };
+
+ // Structure to descrive value of constant expression and its type
+ struct AST_ExprValue {
+ union {
+ short sval; // Contains short expression value
+ unsigned short usval; // Contains unsigned short expr value
+ long lval; // Contains long expression value
+ unsigned long ulval; // Contains unsigned long expr value
+ unsigned long bval; // Contains boolean expression value
+ float fval; // Contains 32-bit float expr value
+ double dval; // Contains 64-bit float expr value
+ char cval; // Contains char expression value
+ unsigned char oval; // Contains unsigned char expr value
+ String *strval; // Contains String * expr value
+ unsigned long eval; // Contains enumeration value
+ } u;
+ ExprType et;
+ };
+
+ // Operations
+
+ // Constructor(s)
+ AST_Expression(AST_Expression *v, ExprType t);
+
+ AST_Expression(ExprComb c, AST_Expression *v1, AST_Expression *v2);
+
+ AST_Expression(short s);
+ AST_Expression(unsigned short us);
+ AST_Expression(long l);
+ AST_Expression(long l, ExprType t);
+ AST_Expression(unsigned long ul);
+ AST_Expression(float f);
+ AST_Expression(double d);
+ AST_Expression(char c);
+ AST_Expression(unsigned char uc);
+ AST_Expression(String *s);
+ AST_Expression(UTL_ScopedName *n);
+ virtual ~AST_Expression () {}
+
+ // Data Accessors
+ UTL_Scope *defined_in();
+ void set_defined_in(UTL_Scope *d);
+ long line();
+ void set_line(long l);
+ String *file_name();
+ void set_file_name(String *f);
+ ExprComb ec();
+ void set_ec(ExprComb new_ec);
+ AST_ExprValue *ev();
+ void set_ev(AST_ExprValue *new_ev);
+ AST_Expression *v1();
+ void set_v1(AST_Expression *e);
+ AST_Expression *v2();
+ void set_v2(AST_Expression *e);
+ UTL_ScopedName *n();
+ void set_n(UTL_ScopedName *new_n);
+
+ // AST Dumping
+ virtual void dump(ostream &o);
+
+ // Other operations
+
+ // Evaluation and value coercion
+ virtual AST_ExprValue *eval(EvalKind ek);
+ virtual AST_ExprValue *coerce(ExprType t);
+
+ // Evaluate then store value inside this AST_Expression
+ virtual void evaluate(EvalKind ek);
+
+ // Compare to AST_Expressions
+ virtual long operator==(AST_Expression *vc);
+ virtual long compare(AST_Expression *vc);
+
+protected:
+ // Evaluate different sets of operators
+ virtual AST_ExprValue *eval_bin_op(EvalKind ek);
+ virtual AST_ExprValue *eval_bit_op(EvalKind ek);
+ virtual AST_ExprValue *eval_un_op(EvalKind ek);
+ virtual AST_ExprValue *eval_symbol(EvalKind ek);
+
+private:
+ // Data
+ UTL_Scope *pd_defined_in; // Scope
+ long pd_line; // Line defined in
+ String *pd_file_name; // What file defined in
+
+ ExprComb pd_ec; // What combinator
+ AST_ExprValue *pd_ev; // computed value
+ AST_Expression *pd_v1; // 1st sub-expression
+ AST_Expression *pd_v2; // 2nd sub-expression
+ UTL_ScopedName *pd_n; // symbolic name (if any)
+
+ // Operations
+
+ // Fill out the lineno, filename and definition scope details
+ void fill_definition_details();
+
+ // Internal evaluation
+ virtual AST_ExprValue *eval_internal(EvalKind ek);
+};
+
+#endif // _AST_EXPR_VAL_AST_EXPR_VAL_HH
+
+
diff --git a/TAO/TAO_IDL/include/ast_extern.h b/TAO/TAO_IDL/include/ast_extern.h
new file mode 100644
index 00000000000..ff0c00208d8
--- /dev/null
+++ b/TAO/TAO_IDL/include/ast_extern.h
@@ -0,0 +1,93 @@
+/*
+
+COPYRIGHT
+
+Copyright 1992, 1993, 1994 Sun Microsystems, Inc. Printed in the United
+States of America. All Rights Reserved.
+
+This product is protected by copyright and distributed under the following
+license restricting its use.
+
+The Interface Definition Language Compiler Front End (CFE) is made
+available for your use provided that you include this license and copyright
+notice on all media and documentation and the software program in which
+this product is incorporated in whole or part. You may copy and extend
+functionality (but may not remove functionality) of the Interface
+Definition Language CFE without charge, but you are not authorized to
+license or distribute it to anyone else except as part of a product or
+program developed by you or with the express written consent of Sun
+Microsystems, Inc. ("Sun").
+
+The names of Sun Microsystems, Inc. and any of its subsidiaries or
+affiliates may not be used in advertising or publicity pertaining to
+distribution of Interface Definition Language CFE as permitted herein.
+
+This license is effective until terminated by Sun for failure to comply
+with this license. Upon termination, you shall destroy or return all code
+and documentation for the Interface Definition Language CFE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED AS IS WITH NO WARRANTIES OF
+ANY KIND INCLUDING THE WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS
+FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR ARISING FROM A COURSE OF
+DEALING, USAGE OR TRADE PRACTICE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED WITH NO SUPPORT AND WITHOUT
+ANY OBLIGATION ON THE PART OF Sun OR ANY OF ITS SUBSIDIARIES OR AFFILIATES
+TO ASSIST IN ITS USE, CORRECTION, MODIFICATION OR ENHANCEMENT.
+
+SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES SHALL HAVE NO LIABILITY WITH
+RESPECT TO THE INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY
+INTERFACE DEFINITION LANGUAGE CFE OR ANY PART THEREOF.
+
+IN NO EVENT WILL SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES BE LIABLE FOR
+ANY LOST REVENUE OR PROFITS OR OTHER SPECIAL, INDIRECT AND CONSEQUENTIAL
+DAMAGES, EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+Use, duplication, or disclosure by the government is subject to
+restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in
+Technical Data and Computer Software clause at DFARS 252.227-7013 and FAR
+52.227-19.
+
+Sun, Sun Microsystems and the Sun logo are trademarks or registered
+trademarks of Sun Microsystems, Inc.
+
+SunSoft, Inc.
+2550 Garcia Avenue
+Mountain View, California 94043
+
+NOTE:
+
+SunOS, SunSoft, Sun, Solaris, Sun Microsystems or the Sun logo are
+trademarks or registered trademarks of Sun Microsystems, Inc.
+
+ */
+
+#ifndef _AST_EXTERN_AST_EXTERN_HH
+#define _AST_EXTERN_AST_EXTERN_HH
+
+#pragma ident "%@(#)ast_extern.h 1.40% %92/06/10% Sun Microsystems"
+
+// ast_extern.hh
+//
+// Declares all global functions for the AST
+
+/*
+** DEPENDENCIES: none
+**
+** USE: Included from idl_extern.hh
+*/
+
+// Functions:
+
+// Two functions are provided for storing AST nodes representing fwd
+// declared interfaces, and for checking the stored nodes after parsing
+// the entire AST. The check ensures that for each fwd declared interface
+// the full definition was also seen.
+
+extern void AST_record_fwd_interface(AST_InterfaceFwd *i);
+extern void AST_check_fwd_interface();
+
+extern idl_bool AST_illegal_recursive_type(AST_Decl *t);
+
+#endif // _AST_EXTERN_AST_EXTERN_HH
+
diff --git a/TAO/TAO_IDL/include/ast_field.h b/TAO/TAO_IDL/include/ast_field.h
new file mode 100644
index 00000000000..97f96a99299
--- /dev/null
+++ b/TAO/TAO_IDL/include/ast_field.h
@@ -0,0 +1,119 @@
+/*
+
+COPYRIGHT
+
+Copyright 1992, 1993, 1994 Sun Microsystems, Inc. Printed in the United
+States of America. All Rights Reserved.
+
+This product is protected by copyright and distributed under the following
+license restricting its use.
+
+The Interface Definition Language Compiler Front End (CFE) is made
+available for your use provided that you include this license and copyright
+notice on all media and documentation and the software program in which
+this product is incorporated in whole or part. You may copy and extend
+functionality (but may not remove functionality) of the Interface
+Definition Language CFE without charge, but you are not authorized to
+license or distribute it to anyone else except as part of a product or
+program developed by you or with the express written consent of Sun
+Microsystems, Inc. ("Sun").
+
+The names of Sun Microsystems, Inc. and any of its subsidiaries or
+affiliates may not be used in advertising or publicity pertaining to
+distribution of Interface Definition Language CFE as permitted herein.
+
+This license is effective until terminated by Sun for failure to comply
+with this license. Upon termination, you shall destroy or return all code
+and documentation for the Interface Definition Language CFE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED AS IS WITH NO WARRANTIES OF
+ANY KIND INCLUDING THE WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS
+FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR ARISING FROM A COURSE OF
+DEALING, USAGE OR TRADE PRACTICE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED WITH NO SUPPORT AND WITHOUT
+ANY OBLIGATION ON THE PART OF Sun OR ANY OF ITS SUBSIDIARIES OR AFFILIATES
+TO ASSIST IN ITS USE, CORRECTION, MODIFICATION OR ENHANCEMENT.
+
+SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES SHALL HAVE NO LIABILITY WITH
+RESPECT TO THE INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY
+INTERFACE DEFINITION LANGUAGE CFE OR ANY PART THEREOF.
+
+IN NO EVENT WILL SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES BE LIABLE FOR
+ANY LOST REVENUE OR PROFITS OR OTHER SPECIAL, INDIRECT AND CONSEQUENTIAL
+DAMAGES, EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+Use, duplication, or disclosure by the government is subject to
+restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in
+Technical Data and Computer Software clause at DFARS 252.227-7013 and FAR
+52.227-19.
+
+Sun, Sun Microsystems and the Sun logo are trademarks or registered
+trademarks of Sun Microsystems, Inc.
+
+SunSoft, Inc.
+2550 Garcia Avenue
+Mountain View, California 94043
+
+NOTE:
+
+SunOS, SunSoft, Sun, Solaris, Sun Microsystems or the Sun logo are
+trademarks or registered trademarks of Sun Microsystems, Inc.
+
+ */
+
+#ifndef _AST_FIELD_AST_FIELD_HH
+#define _AST_FIELD_AST_FIELD_HH
+
+#pragma ident "%@(#)AST_Field.h 1.37% %92/06/10% Sun Microsystems"
+
+// Representation of a generic field
+//
+// Used as member in structures, exceptions and unions, and as a base
+// type for attributes and arguments to operations
+//
+// NOTE: There are two constructors here, the first is used when field
+// is used directly inside a structure, the second when it is used as
+// the base type for attributes and operations.
+
+/*
+** DEPENDENCIES: ast_decl.hh, ast_type.hh, utl_scoped_name.hh, utl_strlist.hh
+**
+** USE: Included from ast.hh
+*/
+
+#include "idl_fwd.h"
+#include "idl_narrow.h"
+#include "ast_decl.h"
+
+
+class AST_Field : public virtual AST_Decl
+{
+public:
+ // Operations
+
+ // Constructor(s)
+ AST_Field();
+ AST_Field(AST_Type *field_type,
+ UTL_ScopedName *n, UTL_StrList *p);
+ AST_Field(AST_Decl::NodeType nt, AST_Type *field_type,
+ UTL_ScopedName *n, UTL_StrList *p);
+ virtual ~AST_Field() {}
+
+ // Data Accessors
+ AST_Type *field_type();
+
+ // Narrowing
+ DEF_NARROW_METHODS1(AST_Field, AST_Decl);
+ DEF_NARROW_FROM_DECL(AST_Field);
+
+ // AST Dumping
+ virtual void dump(ostream &o);
+
+private:
+ // Data
+ AST_Type *pd_field_type; // Base type for field
+
+};
+
+#endif // _AST_FIELD_AST_FIELD_HH
diff --git a/TAO/TAO_IDL/include/ast_generator.h b/TAO/TAO_IDL/include/ast_generator.h
new file mode 100644
index 00000000000..88395133a3d
--- /dev/null
+++ b/TAO/TAO_IDL/include/ast_generator.h
@@ -0,0 +1,214 @@
+/*
+
+COPYRIGHT
+
+Copyright 1992, 1993, 1994 Sun Microsystems, Inc. Printed in the United
+States of America. All Rights Reserved.
+
+This product is protected by copyright and distributed under the following
+license restricting its use.
+
+The Interface Definition Language Compiler Front End (CFE) is made
+available for your use provided that you include this license and copyright
+notice on all media and documentation and the software program in which
+this product is incorporated in whole or part. You may copy and extend
+functionality (but may not remove functionality) of the Interface
+Definition Language CFE without charge, but you are not authorized to
+license or distribute it to anyone else except as part of a product or
+program developed by you or with the express written consent of Sun
+Microsystems, Inc. ("Sun").
+
+The names of Sun Microsystems, Inc. and any of its subsidiaries or
+affiliates may not be used in advertising or publicity pertaining to
+distribution of Interface Definition Language CFE as permitted herein.
+
+This license is effective until terminated by Sun for failure to comply
+with this license. Upon termination, you shall destroy or return all code
+and documentation for the Interface Definition Language CFE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED AS IS WITH NO WARRANTIES OF
+ANY KIND INCLUDING THE WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS
+FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR ARISING FROM A COURSE OF
+DEALING, USAGE OR TRADE PRACTICE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED WITH NO SUPPORT AND WITHOUT
+ANY OBLIGATION ON THE PART OF Sun OR ANY OF ITS SUBSIDIARIES OR AFFILIATES
+TO ASSIST IN ITS USE, CORRECTION, MODIFICATION OR ENHANCEMENT.
+
+SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES SHALL HAVE NO LIABILITY WITH
+RESPECT TO THE INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY
+INTERFACE DEFINITION LANGUAGE CFE OR ANY PART THEREOF.
+
+IN NO EVENT WILL SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES BE LIABLE FOR
+ANY LOST REVENUE OR PROFITS OR OTHER SPECIAL, INDIRECT AND CONSEQUENTIAL
+DAMAGES, EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+Use, duplication, or disclosure by the government is subject to
+restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in
+Technical Data and Computer Software clause at DFARS 252.227-7013 and FAR
+52.227-19.
+
+Sun, Sun Microsystems and the Sun logo are trademarks or registered
+trademarks of Sun Microsystems, Inc.
+
+SunSoft, Inc.
+2550 Garcia Avenue
+Mountain View, California 94043
+
+NOTE:
+
+SunOS, SunSoft, Sun, Solaris, Sun Microsystems or the Sun logo are
+trademarks or registered trademarks of Sun Microsystems, Inc.
+
+ */
+
+#ifndef _AST_GENERATOR_AST_GENERATOR_HH
+#define _AST_GENERATOR_AST_GENERATOR_HH
+
+#pragma ident "%@(#)AST_Generator.h 1.22% %92/06/10% Sun Microsystems"
+
+// ast_generator.h
+//
+// Defines base class for generators
+
+/*
+** DEPENDENCIES: ast_predefined_type.hh utl_scoped_name.hh utl_strlist.hh
+** ast_module.hh ast_root.hh ast_interface.hh
+** ast_interface_fwd.hh ast_exception.hh ast_structure.hh
+** ast_enum.hh ast_operation.hh ast_type.hh ast_field.hh
+** ast_argument.hh ast_attribute.hh ast_union.hh
+** ast_concrete_type.hh ast_union_branch.hh ast_union_label.hh
+** ast_expression.hh ast_enum_val.hh ast_array.hh
+** ast_sequence.hh ast_string.hh ast_typedef.hh
+**
+** USE: Included from ast.hh
+*/
+
+class AST_Generator
+{
+public:
+ // Operations
+
+ // Create a node representing a predefined type
+ virtual AST_PredefinedType
+ *create_predefined_type(AST_PredefinedType::PredefinedType t,
+ UTL_ScopedName *n,
+ UTL_StrList *p);
+
+ // Create a node representing a module
+ virtual AST_Module *create_module(UTL_ScopedName *n,
+ UTL_StrList *p);
+
+ // Create a node representing a module which is the root of an AST
+ virtual AST_Root *create_root(UTL_ScopedName *n,
+ UTL_StrList *p);
+
+ // Create a node representing an interface
+ virtual AST_Interface *create_interface(UTL_ScopedName *n,
+ AST_Interface **ih,
+ long nih,
+ UTL_StrList *p);
+
+ // Create a node representing a forward declaration of an interface
+ virtual AST_InterfaceFwd *create_interface_fwd(UTL_ScopedName *n,
+ UTL_StrList *p);
+
+ // Create a node representing an exception
+ virtual AST_Exception *create_exception(UTL_ScopedName *n,
+ UTL_StrList *p);
+
+ // Create a node representing a structure
+ virtual AST_Structure *create_structure(UTL_ScopedName *n,
+ UTL_StrList *p);
+
+ // Create a node representing an enum
+ virtual AST_Enum *create_enum(UTL_ScopedName *n,
+ UTL_StrList *p);
+
+ // Create a node representing an operation on an interface
+ virtual AST_Operation *create_operation(AST_Type *rt,
+ AST_Operation::Flags fl,
+ UTL_ScopedName *n,
+ UTL_StrList *p);
+
+ // Create a node representing a field in a structure, exception or
+ // union
+ virtual AST_Field *create_field(AST_Type *ft,
+ UTL_ScopedName *n,
+ UTL_StrList *p);
+
+ // Create a node representing an argument to an operation
+ virtual AST_Argument *create_argument(AST_Argument::Direction d,
+ AST_Type *ft,
+ UTL_ScopedName *n,
+ UTL_StrList *p);
+
+ // Create a node representing an attribute
+ virtual AST_Attribute *create_attribute(idl_bool ro,
+ AST_Type *ft,
+ UTL_ScopedName *n,
+ UTL_StrList *p);
+
+ // Create a node representing a union
+ virtual AST_Union *create_union(AST_ConcreteType *dt,
+ UTL_ScopedName *n,
+ UTL_StrList *p);
+
+ // Create a node representing one branch in a union
+ virtual AST_UnionBranch *create_union_branch(AST_UnionLabel *lab,
+ AST_Type *ft,
+ UTL_ScopedName *n,
+ UTL_StrList *p);
+
+ // Create a node representing a label on a union branch
+ virtual AST_UnionLabel *create_union_label(AST_UnionLabel::UnionLabel ul,
+ AST_Expression *lv);
+
+ // Create a node representing a constant
+ virtual AST_Constant *create_constant(AST_Expression::ExprType et,
+ AST_Expression *ev,
+ UTL_ScopedName *n,
+ UTL_StrList *p);
+
+ // Create various kinds of nodes representing expressions
+ virtual AST_Expression *create_expr(UTL_ScopedName *n);
+ virtual AST_Expression *create_expr(AST_Expression *v,
+ AST_Expression::ExprType t);
+ virtual AST_Expression *create_expr(AST_Expression::ExprComb c,
+ AST_Expression *v1,
+ AST_Expression *v2);
+ virtual AST_Expression *create_expr(long v);
+ virtual AST_Expression *create_expr(long v,
+ AST_Expression::ExprType t);
+ virtual AST_Expression *create_expr(unsigned long v);
+ virtual AST_Expression *create_expr(String *s);
+ virtual AST_Expression *create_expr(char c);
+ virtual AST_Expression *create_expr(double d);
+
+ // Create a node representing an enumerator
+ virtual AST_EnumVal *create_enum_val(unsigned long v,
+ UTL_ScopedName *n,
+ UTL_StrList *p);
+
+ // Create a node representing an array type
+ virtual AST_Array *create_array(UTL_ScopedName *n,
+ unsigned long ndims,
+ UTL_ExprList *dims);
+
+ // Create a node representing a sequence type
+ virtual AST_Sequence *create_sequence(AST_Expression *v,
+ AST_Type *bt);
+
+ // Create a node representing a string type
+ virtual AST_String *create_string(AST_Expression *v);
+
+ // Create a node representing a wide string type
+ virtual AST_String *create_wstring(AST_Expression *v);
+
+ // Create a node representing a type renaming (typedef)
+ virtual AST_Typedef *create_typedef(AST_Type *bt,
+ UTL_ScopedName *n,
+ UTL_StrList *p);
+};
+
+#endif // _AST_GENERATOR_AST_GENERATOR_HH
diff --git a/TAO/TAO_IDL/include/ast_interface.h b/TAO/TAO_IDL/include/ast_interface.h
new file mode 100644
index 00000000000..6fef5aace6f
--- /dev/null
+++ b/TAO/TAO_IDL/include/ast_interface.h
@@ -0,0 +1,146 @@
+/*
+
+COPYRIGHT
+
+Copyright 1992, 1993, 1994 Sun Microsystems, Inc. Printed in the United
+States of America. All Rights Reserved.
+
+This product is protected by copyright and distributed under the following
+license restricting its use.
+
+The Interface Definition Language Compiler Front End (CFE) is made
+available for your use provided that you include this license and copyright
+notice on all media and documentation and the software program in which
+this product is incorporated in whole or part. You may copy and extend
+functionality (but may not remove functionality) of the Interface
+Definition Language CFE without charge, but you are not authorized to
+license or distribute it to anyone else except as part of a product or
+program developed by you or with the express written consent of Sun
+Microsystems, Inc. ("Sun").
+
+The names of Sun Microsystems, Inc. and any of its subsidiaries or
+affiliates may not be used in advertising or publicity pertaining to
+distribution of Interface Definition Language CFE as permitted herein.
+
+This license is effective until terminated by Sun for failure to comply
+with this license. Upon termination, you shall destroy or return all code
+and documentation for the Interface Definition Language CFE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED AS IS WITH NO WARRANTIES OF
+ANY KIND INCLUDING THE WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS
+FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR ARISING FROM A COURSE OF
+DEALING, USAGE OR TRADE PRACTICE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED WITH NO SUPPORT AND WITHOUT
+ANY OBLIGATION ON THE PART OF Sun OR ANY OF ITS SUBSIDIARIES OR AFFILIATES
+TO ASSIST IN ITS USE, CORRECTION, MODIFICATION OR ENHANCEMENT.
+
+SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES SHALL HAVE NO LIABILITY WITH
+RESPECT TO THE INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY
+INTERFACE DEFINITION LANGUAGE CFE OR ANY PART THEREOF.
+
+IN NO EVENT WILL SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES BE LIABLE FOR
+ANY LOST REVENUE OR PROFITS OR OTHER SPECIAL, INDIRECT AND CONSEQUENTIAL
+DAMAGES, EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+Use, duplication, or disclosure by the government is subject to
+restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in
+Technical Data and Computer Software clause at DFARS 252.227-7013 and FAR
+52.227-19.
+
+Sun, Sun Microsystems and the Sun logo are trademarks or registered
+trademarks of Sun Microsystems, Inc.
+
+SunSoft, Inc.
+2550 Garcia Avenue
+Mountain View, California 94043
+
+NOTE:
+
+SunOS, SunSoft, Sun, Solaris, Sun Microsystems or the Sun logo are
+trademarks or registered trademarks of Sun Microsystems, Inc.
+
+ */
+
+#ifndef _AST_INTERFACE_AST_INTERFACE_HH
+#define _AST_INTERFACE_AST_INTERFACE_HH
+
+#pragma ident "%@(#)AST_Interface.h 1.37% %92/06/10% Sun Microsystems"
+
+// Representation of interface:
+//
+// NOTE: add(AST_EnumValue *) is defined here because enums can
+// be defined manifest locally; the constants defined in these
+// enums are inserted in the enclosing scope.
+
+/*
+** DEPENDENCIES: ast_type.hh, utl_scope.hh, ast_decl.hh, utl_strlist.hh
+**
+** USE: Included from ast.hh
+*/
+
+#include "idl_fwd.h"
+#include "idl_narrow.h"
+#include "ast_type.h"
+#include "utl_scope.h"
+#include "ast_decl.h"
+
+
+class AST_Interface : public virtual AST_Type, public virtual UTL_Scope
+{
+public:
+ // Operations
+
+ // Constructor(s)
+ AST_Interface();
+ AST_Interface(UTL_ScopedName *n,
+ AST_Interface **ih,
+ long nih,
+ UTL_StrList *p);
+ virtual ~AST_Interface() {}
+
+ // Data Accessors
+ AST_Interface **inherits();
+ void set_inherits(AST_Interface **i);
+ long n_inherits();
+ void set_n_inherits(long i);
+
+ // Is this interface defined? This predicate returns FALSE when an
+ // interface was forward declared but not defined yet, and TRUE in
+ // all other cases.
+ idl_bool is_defined()
+ {
+ return (pd_n_inherits < 0) ? I_FALSE : I_TRUE;
+ }
+
+ // Narrowing
+ DEF_NARROW_METHODS2(AST_Interface, AST_Type, UTL_Scope);
+ DEF_NARROW_FROM_DECL(AST_Interface);
+ DEF_NARROW_FROM_SCOPE(AST_Interface);
+
+ // AST Dumping
+ virtual void dump(ostream &o);
+
+private:
+ // Data
+ AST_Interface **pd_inherits; // Inherited interfaces
+ // This is an array of pointers
+ // to the inherited interfaces
+ long pd_n_inherits; // How many of them?
+
+ // Scope Management Protocol
+ friend int yyparse();
+
+ virtual AST_Constant *fe_add_constant(AST_Constant *c);
+ virtual AST_Exception *fe_add_exception(AST_Exception *e);
+ virtual AST_Attribute *fe_add_attribute(AST_Attribute *a);
+ virtual AST_Operation *fe_add_operation(AST_Operation *o);
+ virtual AST_Union *fe_add_union(AST_Union *u);
+ virtual AST_Structure *fe_add_structure(AST_Structure *s);
+ virtual AST_Enum *fe_add_enum(AST_Enum *e);
+ virtual AST_EnumVal *fe_add_enum_val(AST_EnumVal *v);
+ virtual AST_Typedef *fe_add_typedef(AST_Typedef *t);
+
+};
+
+#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
new file mode 100644
index 00000000000..5c89410a8bd
--- /dev/null
+++ b/TAO/TAO_IDL/include/ast_interface_fwd.h
@@ -0,0 +1,106 @@
+/*
+
+COPYRIGHT
+
+Copyright 1992, 1993, 1994 Sun Microsystems, Inc. Printed in the United
+States of America. All Rights Reserved.
+
+This product is protected by copyright and distributed under the following
+license restricting its use.
+
+The Interface Definition Language Compiler Front End (CFE) is made
+available for your use provided that you include this license and copyright
+notice on all media and documentation and the software program in which
+this product is incorporated in whole or part. You may copy and extend
+functionality (but may not remove functionality) of the Interface
+Definition Language CFE without charge, but you are not authorized to
+license or distribute it to anyone else except as part of a product or
+program developed by you or with the express written consent of Sun
+Microsystems, Inc. ("Sun").
+
+The names of Sun Microsystems, Inc. and any of its subsidiaries or
+affiliates may not be used in advertising or publicity pertaining to
+distribution of Interface Definition Language CFE as permitted herein.
+
+This license is effective until terminated by Sun for failure to comply
+with this license. Upon termination, you shall destroy or return all code
+and documentation for the Interface Definition Language CFE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED AS IS WITH NO WARRANTIES OF
+ANY KIND INCLUDING THE WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS
+FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR ARISING FROM A COURSE OF
+DEALING, USAGE OR TRADE PRACTICE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED WITH NO SUPPORT AND WITHOUT
+ANY OBLIGATION ON THE PART OF Sun OR ANY OF ITS SUBSIDIARIES OR AFFILIATES
+TO ASSIST IN ITS USE, CORRECTION, MODIFICATION OR ENHANCEMENT.
+
+SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES SHALL HAVE NO LIABILITY WITH
+RESPECT TO THE INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY
+INTERFACE DEFINITION LANGUAGE CFE OR ANY PART THEREOF.
+
+IN NO EVENT WILL SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES BE LIABLE FOR
+ANY LOST REVENUE OR PROFITS OR OTHER SPECIAL, INDIRECT AND CONSEQUENTIAL
+DAMAGES, EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+Use, duplication, or disclosure by the government is subject to
+restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in
+Technical Data and Computer Software clause at DFARS 252.227-7013 and FAR
+52.227-19.
+
+Sun, Sun Microsystems and the Sun logo are trademarks or registered
+trademarks of Sun Microsystems, Inc.
+
+SunSoft, Inc.
+2550 Garcia Avenue
+Mountain View, California 94043
+
+NOTE:
+
+SunOS, SunSoft, Sun, Solaris, Sun Microsystems or the Sun logo are
+trademarks or registered trademarks of Sun Microsystems, Inc.
+
+ */
+
+#ifndef _AST_INTERFACE_FWD_AST_INTERFACE_FWD_HH
+#define _AST_INTERFACE_FWD_AST_INTERFACE_FWD_HH
+
+#pragma ident "%@(#)AST_InterfaceFwd.h 1.37% %92/06/10% Sun Microsystems"
+
+// Representation of a forward interface declaration
+
+/*
+** DEPENDENCIES: ast_decl.hh, ast_interface.hh, utl_scoped_name.hh,
+** utl_strlist.hh
+**
+** USE: Included from ast.hh
+*/
+
+class AST_InterfaceFwd : public virtual AST_Type
+{
+public:
+ // Operations
+
+ // Constructor(s)
+ AST_InterfaceFwd();
+ AST_InterfaceFwd(UTL_ScopedName *n, UTL_StrList *p);
+ virtual ~AST_InterfaceFwd() {}
+
+ // Data Accessors
+ AST_Interface *full_definition();
+ void set_full_definition(AST_Interface *nfd);
+
+ // Narrowing
+ DEF_NARROW_METHODS1(AST_InterfaceFwd, AST_Type);
+ DEF_NARROW_FROM_DECL(AST_InterfaceFwd);
+
+ // AST Dumping
+ virtual void dump(ostream &);
+
+private:
+ // Data
+ AST_Interface *pd_full_definition; // The interface this is a
+ // forward declaration of
+};
+
+#endif // _AST_INTERFACE_FWD_AST_INTERFACE_FWD_HH
diff --git a/TAO/TAO_IDL/include/ast_module.h b/TAO/TAO_IDL/include/ast_module.h
new file mode 100644
index 00000000000..09829b1cc23
--- /dev/null
+++ b/TAO/TAO_IDL/include/ast_module.h
@@ -0,0 +1,120 @@
+/*
+
+COPYRIGHT
+
+Copyright 1992, 1993, 1994 Sun Microsystems, Inc. Printed in the United
+States of America. All Rights Reserved.
+
+This product is protected by copyright and distributed under the following
+license restricting its use.
+
+The Interface Definition Language Compiler Front End (CFE) is made
+available for your use provided that you include this license and copyright
+notice on all media and documentation and the software program in which
+this product is incorporated in whole or part. You may copy and extend
+functionality (but may not remove functionality) of the Interface
+Definition Language CFE without charge, but you are not authorized to
+license or distribute it to anyone else except as part of a product or
+program developed by you or with the express written consent of Sun
+Microsystems, Inc. ("Sun").
+
+The names of Sun Microsystems, Inc. and any of its subsidiaries or
+affiliates may not be used in advertising or publicity pertaining to
+distribution of Interface Definition Language CFE as permitted herein.
+
+This license is effective until terminated by Sun for failure to comply
+with this license. Upon termination, you shall destroy or return all code
+and documentation for the Interface Definition Language CFE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED AS IS WITH NO WARRANTIES OF
+ANY KIND INCLUDING THE WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS
+FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR ARISING FROM A COURSE OF
+DEALING, USAGE OR TRADE PRACTICE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED WITH NO SUPPORT AND WITHOUT
+ANY OBLIGATION ON THE PART OF Sun OR ANY OF ITS SUBSIDIARIES OR AFFILIATES
+TO ASSIST IN ITS USE, CORRECTION, MODIFICATION OR ENHANCEMENT.
+
+SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES SHALL HAVE NO LIABILITY WITH
+RESPECT TO THE INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY
+INTERFACE DEFINITION LANGUAGE CFE OR ANY PART THEREOF.
+
+IN NO EVENT WILL SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES BE LIABLE FOR
+ANY LOST REVENUE OR PROFITS OR OTHER SPECIAL, INDIRECT AND CONSEQUENTIAL
+DAMAGES, EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+Use, duplication, or disclosure by the government is subject to
+restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in
+Technical Data and Computer Software clause at DFARS 252.227-7013 and FAR
+52.227-19.
+
+Sun, Sun Microsystems and the Sun logo are trademarks or registered
+trademarks of Sun Microsystems, Inc.
+
+SunSoft, Inc.
+2550 Garcia Avenue
+Mountain View, California 94043
+
+NOTE:
+
+SunOS, SunSoft, Sun, Solaris, Sun Microsystems or the Sun logo are
+trademarks or registered trademarks of Sun Microsystems, Inc.
+
+ */
+
+#ifndef _AST_MODULE_AST_MODULE_HH
+#define _AST_MODULE_AST_MODULE_HH
+
+#pragma ident "%@(#)AST_Module.h 1.37% %92/06/10% Sun Microsystems"
+
+// Representation of module
+//
+// NOTE: add(AST_EnumValue *) is defined here because enums can
+// be defined manifest locally; the constants defined in these
+// enums are inserted in the enclosing scope.
+
+/*
+** DEPENDENCIES: ast_decl.hh, utl_scope.hh, utl_scoped_name.hh, utl_strlist.hh
+**
+** USE: Included from ast.hh
+*/
+
+class AST_Module : public virtual AST_Decl, public virtual UTL_Scope
+{
+public:
+ // Operations
+
+ // Constructor(s)
+ AST_Module();
+ AST_Module(UTL_ScopedName *n, UTL_StrList *p);
+ virtual ~AST_Module() {}
+
+ // Narrowing
+ DEF_NARROW_METHODS2(AST_Module, AST_Decl, UTL_Scope);
+ DEF_NARROW_FROM_DECL(AST_Module);
+ DEF_NARROW_FROM_SCOPE(AST_Module);
+
+ // AST Dumping
+ virtual void dump(ostream &o);
+
+private:
+ friend void fe_populate(AST_Module *m);
+ friend int yyparse();
+
+ // Scope Management Protocol
+
+ virtual AST_PredefinedType *fe_add_predefined_type(AST_PredefinedType *t);
+ virtual AST_Module *fe_add_module(AST_Module *m);
+ virtual AST_Interface *fe_add_interface(AST_Interface *i);
+ virtual AST_InterfaceFwd *fe_add_interface_fwd(AST_InterfaceFwd *i);
+ virtual AST_Constant *fe_add_constant(AST_Constant *c);
+ virtual AST_Exception *fe_add_exception(AST_Exception *e);
+ virtual AST_Union *fe_add_union(AST_Union *u);
+ virtual AST_Structure *fe_add_structure(AST_Structure *s);
+ virtual AST_Enum *fe_add_enum(AST_Enum *e);
+ virtual AST_EnumVal *fe_add_enum_val(AST_EnumVal *v);
+ virtual AST_Typedef *fe_add_typedef(AST_Typedef *t);
+
+};
+
+#endif // _AST_MODULE_AST_MODULE_HH
diff --git a/TAO/TAO_IDL/include/ast_operation.h b/TAO/TAO_IDL/include/ast_operation.h
new file mode 100644
index 00000000000..cdb198afa75
--- /dev/null
+++ b/TAO/TAO_IDL/include/ast_operation.h
@@ -0,0 +1,139 @@
+/*
+
+COPYRIGHT
+
+Copyright 1992, 1993, 1994 Sun Microsystems, Inc. Printed in the United
+States of America. All Rights Reserved.
+
+This product is protected by copyright and distributed under the following
+license restricting its use.
+
+The Interface Definition Language Compiler Front End (CFE) is made
+available for your use provided that you include this license and copyright
+notice on all media and documentation and the software program in which
+this product is incorporated in whole or part. You may copy and extend
+functionality (but may not remove functionality) of the Interface
+Definition Language CFE without charge, but you are not authorized to
+license or distribute it to anyone else except as part of a product or
+program developed by you or with the express written consent of Sun
+Microsystems, Inc. ("Sun").
+
+The names of Sun Microsystems, Inc. and any of its subsidiaries or
+affiliates may not be used in advertising or publicity pertaining to
+distribution of Interface Definition Language CFE as permitted herein.
+
+This license is effective until terminated by Sun for failure to comply
+with this license. Upon termination, you shall destroy or return all code
+and documentation for the Interface Definition Language CFE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED AS IS WITH NO WARRANTIES OF
+ANY KIND INCLUDING THE WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS
+FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR ARISING FROM A COURSE OF
+DEALING, USAGE OR TRADE PRACTICE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED WITH NO SUPPORT AND WITHOUT
+ANY OBLIGATION ON THE PART OF Sun OR ANY OF ITS SUBSIDIARIES OR AFFILIATES
+TO ASSIST IN ITS USE, CORRECTION, MODIFICATION OR ENHANCEMENT.
+
+SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES SHALL HAVE NO LIABILITY WITH
+RESPECT TO THE INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY
+INTERFACE DEFINITION LANGUAGE CFE OR ANY PART THEREOF.
+
+IN NO EVENT WILL SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES BE LIABLE FOR
+ANY LOST REVENUE OR PROFITS OR OTHER SPECIAL, INDIRECT AND CONSEQUENTIAL
+DAMAGES, EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+Use, duplication, or disclosure by the government is subject to
+restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in
+Technical Data and Computer Software clause at DFARS 252.227-7013 and FAR
+52.227-19.
+
+Sun, Sun Microsystems and the Sun logo are trademarks or registered
+trademarks of Sun Microsystems, Inc.
+
+SunSoft, Inc.
+2550 Garcia Avenue
+Mountain View, California 94043
+
+NOTE:
+
+SunOS, SunSoft, Sun, Solaris, Sun Microsystems or the Sun logo are
+trademarks or registered trademarks of Sun Microsystems, Inc.
+
+ */
+
+#ifndef _AST_OPERATION_AST_OPERATION_HH
+#define _AST_OPERATION_AST_OPERATION_HH
+
+#pragma ident "%@(#)AST_Operation.h 1.37% %92/06/10% Sun Microsystems"
+
+// Representation of operation declaration:
+
+/*
+** DEPENDENCIES: ast_decl.hh, utl_scope.hh, ast_type.hh, utl_strlist.hh,
+** utl_exceptlist.hh, utl_scoped_name.hh
+**
+** USE: included from ast.hh
+*/
+
+#include "idl_fwd.h"
+#include "idl_narrow.h"
+#include "utl_list.h"
+#include "ast_decl.h"
+#include "utl_scope.h"
+#include "utl_scoped_name.h"
+
+
+class AST_Operation : public virtual AST_Decl, public virtual UTL_Scope
+{
+public:
+ // Define enum with flags for operation attributes
+ enum Flags {
+ OP_noflags // No flags present
+ , OP_oneway // Operation is oneway
+ , OP_idempotent // Operation is idempotent
+ };
+
+ // Operations
+
+ // Constructor(s)
+ AST_Operation();
+ AST_Operation(AST_Type *return_type,
+ Flags flags,
+ UTL_ScopedName *n,
+ UTL_StrList *p);
+ virtual ~AST_Operation() {}
+
+ // Data Accessors
+ AST_Type *return_type();
+ Flags flags();
+ UTL_StrList *context();
+ UTL_ExceptList *exceptions();
+
+ // Narrowing
+ DEF_NARROW_METHODS2(AST_Operation, AST_Decl, UTL_Scope);
+ DEF_NARROW_FROM_DECL(AST_Operation);
+ DEF_NARROW_FROM_SCOPE(AST_Operation);
+
+ // AST Dumping
+ virtual void dump(ostream &o);
+
+private:
+ // Data
+ AST_Type *pd_return_type; // Return type
+ Flags pd_flags; // Operation flags
+ UTL_StrList *pd_context; // Context
+ UTL_ExceptList *pd_exceptions; // Exceptions raised
+
+ // Scope Management Protocol
+ friend int yyparse();
+
+ virtual AST_Argument *fe_add_argument(AST_Argument *a);
+ virtual UTL_StrList *fe_add_context(UTL_StrList *c);
+ // Add context
+ virtual UTL_NameList *fe_add_exceptions(UTL_NameList *e);
+ // exceptions
+
+};
+
+#endif // _AST_OPERATION_AST_OPERATION_HH
diff --git a/TAO/TAO_IDL/include/ast_predefined_type.h b/TAO/TAO_IDL/include/ast_predefined_type.h
new file mode 100644
index 00000000000..684f3565e4e
--- /dev/null
+++ b/TAO/TAO_IDL/include/ast_predefined_type.h
@@ -0,0 +1,127 @@
+/*
+
+COPYRIGHT
+
+Copyright 1992, 1993, 1994 Sun Microsystems, Inc. Printed in the United
+States of America. All Rights Reserved.
+
+This product is protected by copyright and distributed under the following
+license restricting its use.
+
+The Interface Definition Language Compiler Front End (CFE) is made
+available for your use provided that you include this license and copyright
+notice on all media and documentation and the software program in which
+this product is incorporated in whole or part. You may copy and extend
+functionality (but may not remove functionality) of the Interface
+Definition Language CFE without charge, but you are not authorized to
+license or distribute it to anyone else except as part of a product or
+program developed by you or with the express written consent of Sun
+Microsystems, Inc. ("Sun").
+
+The names of Sun Microsystems, Inc. and any of its subsidiaries or
+affiliates may not be used in advertising or publicity pertaining to
+distribution of Interface Definition Language CFE as permitted herein.
+
+This license is effective until terminated by Sun for failure to comply
+with this license. Upon termination, you shall destroy or return all code
+and documentation for the Interface Definition Language CFE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED AS IS WITH NO WARRANTIES OF
+ANY KIND INCLUDING THE WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS
+FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR ARISING FROM A COURSE OF
+DEALING, USAGE OR TRADE PRACTICE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED WITH NO SUPPORT AND WITHOUT
+ANY OBLIGATION ON THE PART OF Sun OR ANY OF ITS SUBSIDIARIES OR AFFILIATES
+TO ASSIST IN ITS USE, CORRECTION, MODIFICATION OR ENHANCEMENT.
+
+SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES SHALL HAVE NO LIABILITY WITH
+RESPECT TO THE INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY
+INTERFACE DEFINITION LANGUAGE CFE OR ANY PART THEREOF.
+
+IN NO EVENT WILL SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES BE LIABLE FOR
+ANY LOST REVENUE OR PROFITS OR OTHER SPECIAL, INDIRECT AND CONSEQUENTIAL
+DAMAGES, EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+Use, duplication, or disclosure by the government is subject to
+restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in
+Technical Data and Computer Software clause at DFARS 252.227-7013 and FAR
+52.227-19.
+
+Sun, Sun Microsystems and the Sun logo are trademarks or registered
+trademarks of Sun Microsystems, Inc.
+
+SunSoft, Inc.
+2550 Garcia Avenue
+Mountain View, California 94043
+
+NOTE:
+
+SunOS, SunSoft, Sun, Solaris, Sun Microsystems or the Sun logo are
+trademarks or registered trademarks of Sun Microsystems, Inc.
+
+ */
+
+#ifndef _AST_PREDEFINED_TYPE_AST_PREDEFINED_TYPE_HH
+#define _AST_PREDEFINED_TYPE_AST_PREDEFINED_TYPE_HH
+
+#pragma ident "%@(#)AST_PredefinedType.h 1.37% %92/06/10% Sun Microsystems"
+
+// Representation of predefined types:
+//
+// Instances of this class are inserted into the global context by
+// the front end before the start of parsing.
+
+/*
+** DEPENDENCIES: ast_concrete_type.hh, utl_scoped_name.hh, utl_strlist.hh,
+** ast_decl.hh
+**
+** USE: Included from ast.hh
+*/
+
+class AST_PredefinedType : public virtual AST_ConcreteType
+{
+public:
+ // Enum for all the different predefined types
+ enum PredefinedType {
+ PT_long // Predefined type "long"
+ , PT_ulong // Predefined type "unsigned long"
+ , PT_longlong // Predefined type "long long"
+ , PT_ulonglong // Predefined type "unsigned long long"
+ , PT_short // Predefined type "short"
+ , PT_ushort // Predefined type "unsigned short"
+ , PT_float // Predefined type "float"
+ , PT_double // Predefined type "double"
+ , PT_longdouble // Predefined type "long double"
+ , PT_char // Predefined type "char"
+ , PT_wchar // Predefined type "wchar_t"
+ , PT_boolean // Predefined type "boolean"
+ , PT_octet // Predefined type "octet"
+ , PT_any // Predefined type "any"
+ , PT_void // Predefined type "void"
+ , PT_pseudo // Predefined type for pseudo objects
+ };
+
+ // Operations
+
+ // Constructor(s)
+ AST_PredefinedType();
+ AST_PredefinedType(PredefinedType t, UTL_ScopedName *n, UTL_StrList *p);
+ virtual ~AST_PredefinedType() {}
+
+ // Data Accessors
+ const PredefinedType pt();
+
+ // Narrowing
+ DEF_NARROW_METHODS1(AST_PredefinedType, AST_ConcreteType);
+ DEF_NARROW_FROM_DECL(AST_PredefinedType);
+
+ // AST Dumping
+ virtual void dump(ostream &o);
+
+private:
+ // Data
+ const PredefinedType pd_pt; // The specific predefined type
+};
+
+#endif // _AST_PREDEFINED_TYPE_AST_PREDEFINED_TYPE_HH
diff --git a/TAO/TAO_IDL/include/ast_root.h b/TAO/TAO_IDL/include/ast_root.h
new file mode 100644
index 00000000000..808ae39ada8
--- /dev/null
+++ b/TAO/TAO_IDL/include/ast_root.h
@@ -0,0 +1,107 @@
+/*
+
+COPYRIGHT
+
+Copyright 1992, 1993, 1994 Sun Microsystems, Inc. Printed in the United
+States of America. All Rights Reserved.
+
+This product is protected by copyright and distributed under the following
+license restricting its use.
+
+The Interface Definition Language Compiler Front End (CFE) is made
+available for your use provided that you include this license and copyright
+notice on all media and documentation and the software program in which
+this product is incorporated in whole or part. You may copy and extend
+functionality (but may not remove functionality) of the Interface
+Definition Language CFE without charge, but you are not authorized to
+license or distribute it to anyone else except as part of a product or
+program developed by you or with the express written consent of Sun
+Microsystems, Inc. ("Sun").
+
+The names of Sun Microsystems, Inc. and any of its subsidiaries or
+affiliates may not be used in advertising or publicity pertaining to
+distribution of Interface Definition Language CFE as permitted herein.
+
+This license is effective until terminated by Sun for failure to comply
+with this license. Upon termination, you shall destroy or return all code
+and documentation for the Interface Definition Language CFE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED AS IS WITH NO WARRANTIES OF
+ANY KIND INCLUDING THE WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS
+FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR ARISING FROM A COURSE OF
+DEALING, USAGE OR TRADE PRACTICE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED WITH NO SUPPORT AND WITHOUT
+ANY OBLIGATION ON THE PART OF Sun OR ANY OF ITS SUBSIDIARIES OR AFFILIATES
+TO ASSIST IN ITS USE, CORRECTION, MODIFICATION OR ENHANCEMENT.
+
+SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES SHALL HAVE NO LIABILITY WITH
+RESPECT TO THE INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY
+INTERFACE DEFINITION LANGUAGE CFE OR ANY PART THEREOF.
+
+IN NO EVENT WILL SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES BE LIABLE FOR
+ANY LOST REVENUE OR PROFITS OR OTHER SPECIAL, INDIRECT AND CONSEQUENTIAL
+DAMAGES, EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+Use, duplication, or disclosure by the government is subject to
+restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in
+Technical Data and Computer Software clause at DFARS 252.227-7013 and FAR
+52.227-19.
+
+Sun, Sun Microsystems and the Sun logo are trademarks or registered
+trademarks of Sun Microsystems, Inc.
+
+SunSoft, Inc.
+2550 Garcia Avenue
+Mountain View, California 94043
+
+NOTE:
+
+SunOS, SunSoft, Sun, Solaris, Sun Microsystems or the Sun logo are
+trademarks or registered trademarks of Sun Microsystems, Inc.
+
+ */
+
+#ifndef _AST_ROOT_AST_ROOT_HH
+#define _AST_ROOT_AST_ROOT_HH
+
+#pragma ident "%@(#)AST_Root.h 1.1% %92/06/23% Sun Microsystems"
+
+// Representation of root of AST
+
+/*
+** DEPENDENCIES: ast_module.hh, utl_scoped_name.hh, utl_strlist.hh
+**
+** USE: Included from ast.hh
+*/
+
+class AST_Root : public virtual AST_Module
+{
+public:
+ // Operations
+
+ // Constructor(s)
+ AST_Root();
+ AST_Root(UTL_ScopedName *n, UTL_StrList *p);
+ virtual ~AST_Root() {}
+
+ // Narrowing
+ DEF_NARROW_METHODS1(AST_Root, AST_Module);
+ DEF_NARROW_FROM_DECL(AST_Root);
+ DEF_NARROW_FROM_SCOPE(AST_Root);
+
+ // AST Dumping
+ virtual void dump(ostream &o);
+
+private:
+ friend class FE_Declarator;
+ friend int yyparse();
+ // Add protocol
+
+ virtual AST_Sequence *fe_add_sequence(AST_Sequence *s);
+ virtual AST_String *fe_add_string(AST_String *s);
+ virtual AST_Array *fe_add_array(AST_Array *a);
+
+};
+
+#endif // _AST_ROOT_AST_ROOT_HH
diff --git a/TAO/TAO_IDL/include/ast_sequence.h b/TAO/TAO_IDL/include/ast_sequence.h
new file mode 100644
index 00000000000..68d291d6813
--- /dev/null
+++ b/TAO/TAO_IDL/include/ast_sequence.h
@@ -0,0 +1,108 @@
+/*
+
+COPYRIGHT
+
+Copyright 1992, 1993, 1994 Sun Microsystems, Inc. Printed in the United
+States of America. All Rights Reserved.
+
+This product is protected by copyright and distributed under the following
+license restricting its use.
+
+The Interface Definition Language Compiler Front End (CFE) is made
+available for your use provided that you include this license and copyright
+notice on all media and documentation and the software program in which
+this product is incorporated in whole or part. You may copy and extend
+functionality (but may not remove functionality) of the Interface
+Definition Language CFE without charge, but you are not authorized to
+license or distribute it to anyone else except as part of a product or
+program developed by you or with the express written consent of Sun
+Microsystems, Inc. ("Sun").
+
+The names of Sun Microsystems, Inc. and any of its subsidiaries or
+affiliates may not be used in advertising or publicity pertaining to
+distribution of Interface Definition Language CFE as permitted herein.
+
+This license is effective until terminated by Sun for failure to comply
+with this license. Upon termination, you shall destroy or return all code
+and documentation for the Interface Definition Language CFE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED AS IS WITH NO WARRANTIES OF
+ANY KIND INCLUDING THE WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS
+FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR ARISING FROM A COURSE OF
+DEALING, USAGE OR TRADE PRACTICE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED WITH NO SUPPORT AND WITHOUT
+ANY OBLIGATION ON THE PART OF Sun OR ANY OF ITS SUBSIDIARIES OR AFFILIATES
+TO ASSIST IN ITS USE, CORRECTION, MODIFICATION OR ENHANCEMENT.
+
+SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES SHALL HAVE NO LIABILITY WITH
+RESPECT TO THE INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY
+INTERFACE DEFINITION LANGUAGE CFE OR ANY PART THEREOF.
+
+IN NO EVENT WILL SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES BE LIABLE FOR
+ANY LOST REVENUE OR PROFITS OR OTHER SPECIAL, INDIRECT AND CONSEQUENTIAL
+DAMAGES, EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+Use, duplication, or disclosure by the government is subject to
+restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in
+Technical Data and Computer Software clause at DFARS 252.227-7013 and FAR
+52.227-19.
+
+Sun, Sun Microsystems and the Sun logo are trademarks or registered
+trademarks of Sun Microsystems, Inc.
+
+SunSoft, Inc.
+2550 Garcia Avenue
+Mountain View, California 94043
+
+NOTE:
+
+SunOS, SunSoft, Sun, Solaris, Sun Microsystems or the Sun logo are
+trademarks or registered trademarks of Sun Microsystems, Inc.
+
+ */
+
+#ifndef _AST_SEQUENCE_AST_SEQUENCE_HH
+#define _AST_SEQUENCE_AST_SEQUENCE_HH
+
+#pragma ident "%@(#)AST_Sequence.h 1.37% %92/06/10% Sun Microsystems"
+
+// Representation of sequence declaration:
+//
+// A sequence is a combination of a maximum size and a base type
+
+/*
+** DEPENDENCIES: ast_concrete_type.hh, ast_type.hh, ast_decl.hh,
+** ast_expression.hh
+**
+** USE: Included from ast.hh
+*/
+
+class AST_Sequence : public virtual AST_ConcreteType
+{
+public:
+ // Operations
+
+ // Constructor(s)
+ AST_Sequence();
+ AST_Sequence(AST_Expression *max_size, AST_Type *bt);
+ virtual ~AST_Sequence() {}
+
+ // Data Accessors
+ AST_Expression *max_size();
+ AST_Type *base_type();
+
+ // Narrowing
+ DEF_NARROW_METHODS1(AST_Sequence, AST_ConcreteType);
+ DEF_NARROW_FROM_DECL(AST_Sequence);
+
+ // AST Dumping
+ virtual void dump(ostream &o);
+
+private:
+ // Data
+ AST_Expression *pd_max_size; // Maximum sequence size
+ AST_Type *pd_base_type; // Sequence base type
+};
+
+#endif // _AST_SEQUENCE_AST_SEQUENCE_HH
diff --git a/TAO/TAO_IDL/include/ast_string.h b/TAO/TAO_IDL/include/ast_string.h
new file mode 100644
index 00000000000..cca2e58c651
--- /dev/null
+++ b/TAO/TAO_IDL/include/ast_string.h
@@ -0,0 +1,108 @@
+/*
+
+COPYRIGHT
+
+Copyright 1992, 1993, 1994 Sun Microsystems, Inc. Printed in the United
+States of America. All Rights Reserved.
+
+This product is protected by copyright and distributed under the following
+license restricting its use.
+
+The Interface Definition Language Compiler Front End (CFE) is made
+available for your use provided that you include this license and copyright
+notice on all media and documentation and the software program in which
+this product is incorporated in whole or part. You may copy and extend
+functionality (but may not remove functionality) of the Interface
+Definition Language CFE without charge, but you are not authorized to
+license or distribute it to anyone else except as part of a product or
+program developed by you or with the express written consent of Sun
+Microsystems, Inc. ("Sun").
+
+The names of Sun Microsystems, Inc. and any of its subsidiaries or
+affiliates may not be used in advertising or publicity pertaining to
+distribution of Interface Definition Language CFE as permitted herein.
+
+This license is effective until terminated by Sun for failure to comply
+with this license. Upon termination, you shall destroy or return all code
+and documentation for the Interface Definition Language CFE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED AS IS WITH NO WARRANTIES OF
+ANY KIND INCLUDING THE WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS
+FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR ARISING FROM A COURSE OF
+DEALING, USAGE OR TRADE PRACTICE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED WITH NO SUPPORT AND WITHOUT
+ANY OBLIGATION ON THE PART OF Sun OR ANY OF ITS SUBSIDIARIES OR AFFILIATES
+TO ASSIST IN ITS USE, CORRECTION, MODIFICATION OR ENHANCEMENT.
+
+SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES SHALL HAVE NO LIABILITY WITH
+RESPECT TO THE INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY
+INTERFACE DEFINITION LANGUAGE CFE OR ANY PART THEREOF.
+
+IN NO EVENT WILL SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES BE LIABLE FOR
+ANY LOST REVENUE OR PROFITS OR OTHER SPECIAL, INDIRECT AND CONSEQUENTIAL
+DAMAGES, EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+Use, duplication, or disclosure by the government is subject to
+restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in
+Technical Data and Computer Software clause at DFARS 252.227-7013 and FAR
+52.227-19.
+
+Sun, Sun Microsystems and the Sun logo are trademarks or registered
+trademarks of Sun Microsystems, Inc.
+
+SunSoft, Inc.
+2550 Garcia Avenue
+Mountain View, California 94043
+
+NOTE:
+
+SunOS, SunSoft, Sun, Solaris, Sun Microsystems or the Sun logo are
+trademarks or registered trademarks of Sun Microsystems, Inc.
+
+ */
+
+#ifndef _AST_STRING_AST_STRING_HH
+#define _AST_STRING_AST_STRING_HH
+
+#pragma ident "%@(#)AST_String.h 1.37% %92/06/10% Sun Microsystems"
+
+// Representation of string declaration
+//
+// A string type is represented by a maximum size
+
+/*
+** DEPENDENCIES: ast_concrete_type.hh, ast_decl.hh, ast_expression.hh
+**
+** USE: Included from ast.hh
+*/
+
+class AST_String : public virtual AST_ConcreteType
+{
+public:
+ // Operations
+
+ // Constructor(s)
+ AST_String();
+ AST_String(AST_Expression *max_size);
+ AST_String(AST_Expression *max_size, long wide);
+ virtual ~AST_String() {}
+
+ // Data Accessors
+ AST_Expression *max_size();
+ long width();
+
+ // Narrowing
+ DEF_NARROW_METHODS1(AST_String, AST_ConcreteType);
+ DEF_NARROW_FROM_DECL(AST_String);
+
+ // AST Dumping
+ virtual void dump(ostream &o);
+
+private:
+ // Data
+ AST_Expression *pd_max_size; // String maximum size
+ long pd_width; // Width of string
+};
+
+#endif // _AST_STRING_AST_STRING_HH
diff --git a/TAO/TAO_IDL/include/ast_structure.h b/TAO/TAO_IDL/include/ast_structure.h
new file mode 100644
index 00000000000..a9c3163ed4f
--- /dev/null
+++ b/TAO/TAO_IDL/include/ast_structure.h
@@ -0,0 +1,118 @@
+/*
+
+COPYRIGHT
+
+Copyright 1992, 1993, 1994 Sun Microsystems, Inc. Printed in the United
+States of America. All Rights Reserved.
+
+This product is protected by copyright and distributed under the following
+license restricting its use.
+
+The Interface Definition Language Compiler Front End (CFE) is made
+available for your use provided that you include this license and copyright
+notice on all media and documentation and the software program in which
+this product is incorporated in whole or part. You may copy and extend
+functionality (but may not remove functionality) of the Interface
+Definition Language CFE without charge, but you are not authorized to
+license or distribute it to anyone else except as part of a product or
+program developed by you or with the express written consent of Sun
+Microsystems, Inc. ("Sun").
+
+The names of Sun Microsystems, Inc. and any of its subsidiaries or
+affiliates may not be used in advertising or publicity pertaining to
+distribution of Interface Definition Language CFE as permitted herein.
+
+This license is effective until terminated by Sun for failure to comply
+with this license. Upon termination, you shall destroy or return all code
+and documentation for the Interface Definition Language CFE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED AS IS WITH NO WARRANTIES OF
+ANY KIND INCLUDING THE WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS
+FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR ARISING FROM A COURSE OF
+DEALING, USAGE OR TRADE PRACTICE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED WITH NO SUPPORT AND WITHOUT
+ANY OBLIGATION ON THE PART OF Sun OR ANY OF ITS SUBSIDIARIES OR AFFILIATES
+TO ASSIST IN ITS USE, CORRECTION, MODIFICATION OR ENHANCEMENT.
+
+SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES SHALL HAVE NO LIABILITY WITH
+RESPECT TO THE INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY
+INTERFACE DEFINITION LANGUAGE CFE OR ANY PART THEREOF.
+
+IN NO EVENT WILL SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES BE LIABLE FOR
+ANY LOST REVENUE OR PROFITS OR OTHER SPECIAL, INDIRECT AND CONSEQUENTIAL
+DAMAGES, EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+Use, duplication, or disclosure by the government is subject to
+restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in
+Technical Data and Computer Software clause at DFARS 252.227-7013 and FAR
+52.227-19.
+
+Sun, Sun Microsystems and the Sun logo are trademarks or registered
+trademarks of Sun Microsystems, Inc.
+
+SunSoft, Inc.
+2550 Garcia Avenue
+Mountain View, California 94043
+
+NOTE:
+
+SunOS, SunSoft, Sun, Solaris, Sun Microsystems or the Sun logo are
+trademarks or registered trademarks of Sun Microsystems, Inc.
+
+ */
+
+#ifndef _AST_STRUCTURE_AST_STRUCTURE_HH
+#define _AST_STRUCTURE_AST_STRUCTURE_HH
+
+#pragma ident "%@(#)AST_Structure.h 1.37% %92/06/10% Sun Microsystems"
+
+// Representation of structure:
+//
+// NOTE: add(AST_ConcreteType *) is defined here because a structure
+// can contain locally defined types in addition to fields.
+//
+// NOTE: add(AST_EnumValue *) is defined here because enums can
+// be defined manifest locally; the constants defined in these
+// enums are inserted in the enclosing scope. It is unlikely that
+// a BE writer will need to overload this function in AST_Structure.
+
+/*
+** DEPENDENCIES: ast_concrete_type.hh, utl_scope.hh, utl_scoped_name.hh,
+** utl_strlist.hh
+**
+** USE: Included from ast.hh
+*/
+
+class AST_Structure : public virtual AST_ConcreteType,
+ public virtual UTL_Scope
+{
+public:
+ // Operations
+
+ // Constructor(s)
+ AST_Structure();
+ AST_Structure(UTL_ScopedName *n, UTL_StrList *p);
+ AST_Structure(AST_Decl::NodeType nt, UTL_ScopedName *n, UTL_StrList *p);
+ virtual ~AST_Structure() {}
+
+ // Narrowing
+ DEF_NARROW_METHODS2(AST_Structure, AST_ConcreteType, UTL_Scope);
+ DEF_NARROW_FROM_DECL(AST_Structure);
+ DEF_NARROW_FROM_SCOPE(AST_Structure);
+
+ // AST Dumping
+ virtual void dump(ostream &o);
+
+private:
+ friend int yyparse();
+ // Scope Management Protocol
+
+ virtual AST_Union *fe_add_union(AST_Union *u);
+ virtual AST_Structure *fe_add_structure(AST_Structure *s);
+ virtual AST_Field *fe_add_field(AST_Field *f);
+ virtual AST_Enum *fe_add_enum(AST_Enum *e);
+ virtual AST_EnumVal *fe_add_enum_val(AST_EnumVal *v);
+};
+
+#endif // _AST_STRUCTURE_AST_STRUCTURE_HH
diff --git a/TAO/TAO_IDL/include/ast_type.h b/TAO/TAO_IDL/include/ast_type.h
new file mode 100644
index 00000000000..67c455efdbc
--- /dev/null
+++ b/TAO/TAO_IDL/include/ast_type.h
@@ -0,0 +1,101 @@
+/*
+
+COPYRIGHT
+
+Copyright 1992, 1993, 1994 Sun Microsystems, Inc. Printed in the United
+States of America. All Rights Reserved.
+
+This product is protected by copyright and distributed under the following
+license restricting its use.
+
+The Interface Definition Language Compiler Front End (CFE) is made
+available for your use provided that you include this license and copyright
+notice on all media and documentation and the software program in which
+this product is incorporated in whole or part. You may copy and extend
+functionality (but may not remove functionality) of the Interface
+Definition Language CFE without charge, but you are not authorized to
+license or distribute it to anyone else except as part of a product or
+program developed by you or with the express written consent of Sun
+Microsystems, Inc. ("Sun").
+
+The names of Sun Microsystems, Inc. and any of its subsidiaries or
+affiliates may not be used in advertising or publicity pertaining to
+distribution of Interface Definition Language CFE as permitted herein.
+
+This license is effective until terminated by Sun for failure to comply
+with this license. Upon termination, you shall destroy or return all code
+and documentation for the Interface Definition Language CFE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED AS IS WITH NO WARRANTIES OF
+ANY KIND INCLUDING THE WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS
+FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR ARISING FROM A COURSE OF
+DEALING, USAGE OR TRADE PRACTICE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED WITH NO SUPPORT AND WITHOUT
+ANY OBLIGATION ON THE PART OF Sun OR ANY OF ITS SUBSIDIARIES OR AFFILIATES
+TO ASSIST IN ITS USE, CORRECTION, MODIFICATION OR ENHANCEMENT.
+
+SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES SHALL HAVE NO LIABILITY WITH
+RESPECT TO THE INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY
+INTERFACE DEFINITION LANGUAGE CFE OR ANY PART THEREOF.
+
+IN NO EVENT WILL SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES BE LIABLE FOR
+ANY LOST REVENUE OR PROFITS OR OTHER SPECIAL, INDIRECT AND CONSEQUENTIAL
+DAMAGES, EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+Use, duplication, or disclosure by the government is subject to
+restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in
+Technical Data and Computer Software clause at DFARS 252.227-7013 and FAR
+52.227-19.
+
+Sun, Sun Microsystems and the Sun logo are trademarks or registered
+trademarks of Sun Microsystems, Inc.
+
+SunSoft, Inc.
+2550 Garcia Avenue
+Mountain View, California 94043
+
+NOTE:
+
+SunOS, SunSoft, Sun, Solaris, Sun Microsystems or the Sun logo are
+trademarks or registered trademarks of Sun Microsystems, Inc.
+
+ */
+
+#ifndef _AST_TYPE_AST_TYPE_HH
+#define _AST_TYPE_AST_TYPE_HH
+
+#pragma ident "%@(#)AST_Type.h 1.37% %92/06/10% Sun Microsystems"
+
+// Class for all IDL types
+//
+// This is useful wherever any IDL type defining construct can appear
+// such as the base type for a typedef or array
+
+/*
+** DEPENDENCIES: ast_decl.hh, utl_scoped_name.hh, utl_strlist.hh
+**
+** USE: Included from ast.hh
+*/
+
+#include "idl_fwd.h"
+#include "idl_narrow.h"
+#include "ast_decl.h"
+
+
+class AST_Type : public virtual AST_Decl
+{
+public:
+ // Operations
+
+ // Constructor(s)
+ AST_Type();
+ AST_Type(AST_Decl::NodeType nt, UTL_ScopedName *n, UTL_StrList *p);
+ virtual ~AST_Type() {}
+
+ // Narrowing
+ DEF_NARROW_METHODS1(AST_Type, AST_Decl);
+ DEF_NARROW_FROM_DECL(AST_Type);
+};
+
+#endif // _AST_TYPE_AST_TYPE_HH
diff --git a/TAO/TAO_IDL/include/ast_typedef.h b/TAO/TAO_IDL/include/ast_typedef.h
new file mode 100644
index 00000000000..2cbd5e1bb39
--- /dev/null
+++ b/TAO/TAO_IDL/include/ast_typedef.h
@@ -0,0 +1,105 @@
+/*
+
+COPYRIGHT
+
+Copyright 1992, 1993, 1994 Sun Microsystems, Inc. Printed in the United
+States of America. All Rights Reserved.
+
+This product is protected by copyright and distributed under the following
+license restricting its use.
+
+The Interface Definition Language Compiler Front End (CFE) is made
+available for your use provided that you include this license and copyright
+notice on all media and documentation and the software program in which
+this product is incorporated in whole or part. You may copy and extend
+functionality (but may not remove functionality) of the Interface
+Definition Language CFE without charge, but you are not authorized to
+license or distribute it to anyone else except as part of a product or
+program developed by you or with the express written consent of Sun
+Microsystems, Inc. ("Sun").
+
+The names of Sun Microsystems, Inc. and any of its subsidiaries or
+affiliates may not be used in advertising or publicity pertaining to
+distribution of Interface Definition Language CFE as permitted herein.
+
+This license is effective until terminated by Sun for failure to comply
+with this license. Upon termination, you shall destroy or return all code
+and documentation for the Interface Definition Language CFE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED AS IS WITH NO WARRANTIES OF
+ANY KIND INCLUDING THE WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS
+FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR ARISING FROM A COURSE OF
+DEALING, USAGE OR TRADE PRACTICE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED WITH NO SUPPORT AND WITHOUT
+ANY OBLIGATION ON THE PART OF Sun OR ANY OF ITS SUBSIDIARIES OR AFFILIATES
+TO ASSIST IN ITS USE, CORRECTION, MODIFICATION OR ENHANCEMENT.
+
+SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES SHALL HAVE NO LIABILITY WITH
+RESPECT TO THE INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY
+INTERFACE DEFINITION LANGUAGE CFE OR ANY PART THEREOF.
+
+IN NO EVENT WILL SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES BE LIABLE FOR
+ANY LOST REVENUE OR PROFITS OR OTHER SPECIAL, INDIRECT AND CONSEQUENTIAL
+DAMAGES, EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+Use, duplication, or disclosure by the government is subject to
+restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in
+Technical Data and Computer Software clause at DFARS 252.227-7013 and FAR
+52.227-19.
+
+Sun, Sun Microsystems and the Sun logo are trademarks or registered
+trademarks of Sun Microsystems, Inc.
+
+SunSoft, Inc.
+2550 Garcia Avenue
+Mountain View, California 94043
+
+NOTE:
+
+SunOS, SunSoft, Sun, Solaris, Sun Microsystems or the Sun logo are
+trademarks or registered trademarks of Sun Microsystems, Inc.
+
+ */
+
+#ifndef _AST_TYPEDEF_AST_TYPEDEF_HH
+#define _AST_TYPEDEF_AST_TYPEDEF_HH
+
+#pragma ident "%@(#)AST_Typedef.h 1.37% %92/06/10% Sun Microsystems"
+
+// Representation of typedef declaration
+//
+// A typedef declaration is a renaming of a base type
+
+/*
+** DEPENDENCIES: ast_decl.hh, ast_type.hh, utl_scoped_name.hh, utl_strlist.hh
+**
+** USE: Included from ast.hh
+*/
+
+class AST_Typedef : public virtual AST_Type
+{
+public:
+ // Operations
+
+ // Constructor(s)
+ AST_Typedef();
+ AST_Typedef(AST_Type *base_type, UTL_ScopedName *n, UTL_StrList *p);
+ virtual ~AST_Typedef() {}
+
+ // Data Accessors
+ AST_Type *base_type();
+
+ // Narrowing
+ DEF_NARROW_METHODS1(AST_Typedef, AST_Type);
+ DEF_NARROW_FROM_DECL(AST_Typedef);
+
+ // AST Dumping
+ virtual void dump(ostream &o);
+
+private:
+ // Data
+ AST_Type *pd_base_type; // typedef base type
+};
+
+#endif // _AST_TYPEDEF_AST_TYPEDEF_HH
diff --git a/TAO/TAO_IDL/include/ast_union.h b/TAO/TAO_IDL/include/ast_union.h
new file mode 100644
index 00000000000..f70d6812113
--- /dev/null
+++ b/TAO/TAO_IDL/include/ast_union.h
@@ -0,0 +1,143 @@
+/*
+
+COPYRIGHT
+
+Copyright 1992, 1993, 1994 Sun Microsystems, Inc. Printed in the United
+States of America. All Rights Reserved.
+
+This product is protected by copyright and distributed under the following
+license restricting its use.
+
+The Interface Definition Language Compiler Front End (CFE) is made
+available for your use provided that you include this license and copyright
+notice on all media and documentation and the software program in which
+this product is incorporated in whole or part. You may copy and extend
+functionality (but may not remove functionality) of the Interface
+Definition Language CFE without charge, but you are not authorized to
+license or distribute it to anyone else except as part of a product or
+program developed by you or with the express written consent of Sun
+Microsystems, Inc. ("Sun").
+
+The names of Sun Microsystems, Inc. and any of its subsidiaries or
+affiliates may not be used in advertising or publicity pertaining to
+distribution of Interface Definition Language CFE as permitted herein.
+
+This license is effective until terminated by Sun for failure to comply
+with this license. Upon termination, you shall destroy or return all code
+and documentation for the Interface Definition Language CFE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED AS IS WITH NO WARRANTIES OF
+ANY KIND INCLUDING THE WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS
+FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR ARISING FROM A COURSE OF
+DEALING, USAGE OR TRADE PRACTICE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED WITH NO SUPPORT AND WITHOUT
+ANY OBLIGATION ON THE PART OF Sun OR ANY OF ITS SUBSIDIARIES OR AFFILIATES
+TO ASSIST IN ITS USE, CORRECTION, MODIFICATION OR ENHANCEMENT.
+
+SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES SHALL HAVE NO LIABILITY WITH
+RESPECT TO THE INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY
+INTERFACE DEFINITION LANGUAGE CFE OR ANY PART THEREOF.
+
+IN NO EVENT WILL SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES BE LIABLE FOR
+ANY LOST REVENUE OR PROFITS OR OTHER SPECIAL, INDIRECT AND CONSEQUENTIAL
+DAMAGES, EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+Use, duplication, or disclosure by the government is subject to
+restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in
+Technical Data and Computer Software clause at DFARS 252.227-7013 and FAR
+52.227-19.
+
+Sun, Sun Microsystems and the Sun logo are trademarks or registered
+trademarks of Sun Microsystems, Inc.
+
+SunSoft, Inc.
+2550 Garcia Avenue
+Mountain View, California 94043
+
+NOTE:
+
+SunOS, SunSoft, Sun, Solaris, Sun Microsystems or the Sun logo are
+trademarks or registered trademarks of Sun Microsystems, Inc.
+
+ */
+
+#ifndef _AST_UNION_AST_UNION_HH
+#define _AST_UNION_AST_UNION_HH
+
+#pragma ident "%@(#)AST_Union.h 1.37% %92/06/10% Sun Microsystems"
+
+// Representation of union declaration:
+//
+// NOTE: add(AST_ConcreteType *) is defined here because a union
+// can contain locally defined types in addition to fields.
+//
+// NOTE: add(AST_EnumValue *) is defined here because enums can
+// be defined manifest locally; the constants defined in these
+// enums are inserted in the enclosing scope. It is unlikely that
+// a BE writer will need to overload this function in AST_Union.
+
+/*
+** DEPENDENCIES: ast_concrete_type.hh, utl_scope.hh, ast_union_branch.hh,
+** ast_union_label.hh, utl_scoped_name.hh, utl_strlist.hh
+**
+** USE: Included from ast.hh
+*/
+
+class AST_Union : public virtual AST_Structure
+{
+public:
+ // Operations
+
+ // Constructor(s)
+ AST_Union();
+ AST_Union(AST_ConcreteType *disc_type, UTL_ScopedName *n, UTL_StrList *p);
+ virtual ~AST_Union() {}
+
+ // Data Accessors
+ AST_ConcreteType *disc_type();
+ AST_Expression::ExprType udisc_type();
+
+ // Narrowing
+ DEF_NARROW_METHODS1(AST_Union, AST_Structure);
+ DEF_NARROW_FROM_DECL(AST_Union);
+ DEF_NARROW_FROM_SCOPE(AST_Union);
+
+ // AST Dumping
+ virtual void dump(ostream &);
+
+private:
+ // Data
+ AST_ConcreteType *pd_disc_type; // Discriminator type
+ AST_Expression::ExprType pd_udisc_type; // Its expression type
+ /* Convention: udisc_type == EV_any denotes an enum value */
+
+ // Operations
+
+ // Look up a branch by node pointer
+ AST_UnionBranch *lookup_branch(AST_UnionBranch *branch);
+
+ // Look up the branch with the "default" label
+ AST_UnionBranch *lookup_default();
+
+ // Look up a branch given a branch with a label. This is used to
+ // check for duplicate labels
+ AST_UnionBranch *lookup_label(AST_UnionBranch *b);
+
+ // Look up a union branch given an enumerator. This is used to
+ // check for duplicate enum labels
+ AST_UnionBranch *lookup_enum(AST_UnionBranch *b);
+
+private:
+ friend int yyparse();
+ // Scope Management Protocol
+
+ virtual AST_Union *fe_add_union(AST_Union *u);
+ virtual AST_UnionBranch *fe_add_union_branch(AST_UnionBranch *b);
+ virtual AST_Structure *fe_add_structure(AST_Structure *s);
+ virtual AST_Enum *fe_add_enum(AST_Enum *e);
+ virtual AST_EnumVal *fe_add_enum_val(AST_EnumVal *v);
+
+};
+
+#endif // _AST_UNION_AST_UNION_HH
diff --git a/TAO/TAO_IDL/include/ast_union_branch.h b/TAO/TAO_IDL/include/ast_union_branch.h
new file mode 100644
index 00000000000..b6f00b569b3
--- /dev/null
+++ b/TAO/TAO_IDL/include/ast_union_branch.h
@@ -0,0 +1,109 @@
+/*
+
+COPYRIGHT
+
+Copyright 1992, 1993, 1994 Sun Microsystems, Inc. Printed in the United
+States of America. All Rights Reserved.
+
+This product is protected by copyright and distributed under the following
+license restricting its use.
+
+The Interface Definition Language Compiler Front End (CFE) is made
+available for your use provided that you include this license and copyright
+notice on all media and documentation and the software program in which
+this product is incorporated in whole or part. You may copy and extend
+functionality (but may not remove functionality) of the Interface
+Definition Language CFE without charge, but you are not authorized to
+license or distribute it to anyone else except as part of a product or
+program developed by you or with the express written consent of Sun
+Microsystems, Inc. ("Sun").
+
+The names of Sun Microsystems, Inc. and any of its subsidiaries or
+affiliates may not be used in advertising or publicity pertaining to
+distribution of Interface Definition Language CFE as permitted herein.
+
+This license is effective until terminated by Sun for failure to comply
+with this license. Upon termination, you shall destroy or return all code
+and documentation for the Interface Definition Language CFE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED AS IS WITH NO WARRANTIES OF
+ANY KIND INCLUDING THE WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS
+FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR ARISING FROM A COURSE OF
+DEALING, USAGE OR TRADE PRACTICE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED WITH NO SUPPORT AND WITHOUT
+ANY OBLIGATION ON THE PART OF Sun OR ANY OF ITS SUBSIDIARIES OR AFFILIATES
+TO ASSIST IN ITS USE, CORRECTION, MODIFICATION OR ENHANCEMENT.
+
+SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES SHALL HAVE NO LIABILITY WITH
+RESPECT TO THE INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY
+INTERFACE DEFINITION LANGUAGE CFE OR ANY PART THEREOF.
+
+IN NO EVENT WILL SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES BE LIABLE FOR
+ANY LOST REVENUE OR PROFITS OR OTHER SPECIAL, INDIRECT AND CONSEQUENTIAL
+DAMAGES, EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+Use, duplication, or disclosure by the government is subject to
+restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in
+Technical Data and Computer Software clause at DFARS 252.227-7013 and FAR
+52.227-19.
+
+Sun, Sun Microsystems and the Sun logo are trademarks or registered
+trademarks of Sun Microsystems, Inc.
+
+SunSoft, Inc.
+2550 Garcia Avenue
+Mountain View, California 94043
+
+NOTE:
+
+SunOS, SunSoft, Sun, Solaris, Sun Microsystems or the Sun logo are
+trademarks or registered trademarks of Sun Microsystems, Inc.
+
+ */
+
+#ifndef _AST_UNION_BRANCH_AST_UNION_BRAN_HH
+#define _AST_UNION_BRANCH_AST_UNION_BRAN_HH
+
+#pragma ident "%@(#)AST_UnionBranch.h 1.37% %92/06/10% Sun Microsystems"
+
+// Representation of union branch declaration:
+//
+// A branch of a union is a field with a label
+
+/*
+** DEPEndencies: ast_field.hh, ast_union_label.hh, ast_type.hh,
+** utl_scoped_name.hh, utl_strlist.h, ast_decl.h
+**
+** USE: Included from ast.hh
+*/
+
+class AST_UnionBranch : public virtual AST_Field
+{
+public:
+ // Operations
+
+ // Constructor(s)
+ AST_UnionBranch();
+ AST_UnionBranch(AST_UnionLabel *label,
+ AST_Type *ft,
+ UTL_ScopedName *n,
+ UTL_StrList *p);
+ virtual ~AST_UnionBranch() {}
+
+ // Data Accessors
+ AST_UnionLabel *label();
+
+ // Narrowing
+ DEF_NARROW_METHODS1(AST_UnionBranch, AST_Field);
+ DEF_NARROW_FROM_DECL(AST_UnionBranch);
+
+ // AST Dumping
+ virtual void dump(ostream &o);
+
+private:
+ // Data
+ AST_UnionLabel *pd_label; // Label of this branch
+};
+
+#endif // _AST_UNION_BRANCH_AST_UNION_BRAN_HH
diff --git a/TAO/TAO_IDL/include/ast_union_label.h b/TAO/TAO_IDL/include/ast_union_label.h
new file mode 100644
index 00000000000..c184afee774
--- /dev/null
+++ b/TAO/TAO_IDL/include/ast_union_label.h
@@ -0,0 +1,110 @@
+/*
+
+COPYRIGHT
+
+Copyright 1992, 1993, 1994 Sun Microsystems, Inc. Printed in the United
+States of America. All Rights Reserved.
+
+This product is protected by copyright and distributed under the following
+license restricting its use.
+
+The Interface Definition Language Compiler Front End (CFE) is made
+available for your use provided that you include this license and copyright
+notice on all media and documentation and the software program in which
+this product is incorporated in whole or part. You may copy and extend
+functionality (but may not remove functionality) of the Interface
+Definition Language CFE without charge, but you are not authorized to
+license or distribute it to anyone else except as part of a product or
+program developed by you or with the express written consent of Sun
+Microsystems, Inc. ("Sun").
+
+The names of Sun Microsystems, Inc. and any of its subsidiaries or
+affiliates may not be used in advertising or publicity pertaining to
+distribution of Interface Definition Language CFE as permitted herein.
+
+This license is effective until terminated by Sun for failure to comply
+with this license. Upon termination, you shall destroy or return all code
+and documentation for the Interface Definition Language CFE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED AS IS WITH NO WARRANTIES OF
+ANY KIND INCLUDING THE WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS
+FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR ARISING FROM A COURSE OF
+DEALING, USAGE OR TRADE PRACTICE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED WITH NO SUPPORT AND WITHOUT
+ANY OBLIGATION ON THE PART OF Sun OR ANY OF ITS SUBSIDIARIES OR AFFILIATES
+TO ASSIST IN ITS USE, CORRECTION, MODIFICATION OR ENHANCEMENT.
+
+SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES SHALL HAVE NO LIABILITY WITH
+RESPECT TO THE INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY
+INTERFACE DEFINITION LANGUAGE CFE OR ANY PART THEREOF.
+
+IN NO EVENT WILL SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES BE LIABLE FOR
+ANY LOST REVENUE OR PROFITS OR OTHER SPECIAL, INDIRECT AND CONSEQUENTIAL
+DAMAGES, EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+Use, duplication, or disclosure by the government is subject to
+restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in
+Technical Data and Computer Software clause at DFARS 252.227-7013 and FAR
+52.227-19.
+
+Sun, Sun Microsystems and the Sun logo are trademarks or registered
+trademarks of Sun Microsystems, Inc.
+
+SunSoft, Inc.
+2550 Garcia Avenue
+Mountain View, California 94043
+
+NOTE:
+
+SunOS, SunSoft, Sun, Solaris, Sun Microsystems or the Sun logo are
+trademarks or registered trademarks of Sun Microsystems, Inc.
+
+ */
+
+#ifndef _AST_UNION_LABEL_AST_UNION_LABEL_HH
+#define _AST_UNION_LABEL_AST_UNION_LABEL_HH
+
+#pragma ident "%@(#)AST_UnionLabel.h 1.25% %92/06/10% Sun Microsystems"
+
+// AST_UnionLabel.h
+//
+// Defines labels for unions
+
+/*
+** DEPENDENCIES: ast_expression.hh
+**
+** USE: included from ast.hh
+*/
+
+class AST_UnionLabel
+{
+public:
+ // Define kind of label
+ enum UnionLabel {
+ UL_default // Label is "default"
+ , UL_label // Regular label
+ };
+
+ // Operations
+
+ // Constructor(s)
+ AST_UnionLabel();
+ AST_UnionLabel(UnionLabel lk, AST_Expression *lv);
+ virtual ~AST_UnionLabel() {}
+
+ // Data Accessors
+ UnionLabel label_kind();
+ AST_Expression *label_val();
+
+ // AST Dumping
+ virtual void dump(ostream &o);
+
+private:
+ // Data
+ UnionLabel pd_label_kind; // Label kind
+ AST_Expression *pd_label_val; // Label expression
+
+};
+
+#endif // _AST_UNION_LABEL_AST_UNION_LABEL_HH
diff --git a/TAO/TAO_IDL/include/be_extern.h b/TAO/TAO_IDL/include/be_extern.h
new file mode 100644
index 00000000000..169d68c1f2c
--- /dev/null
+++ b/TAO/TAO_IDL/include/be_extern.h
@@ -0,0 +1,82 @@
+/*
+
+COPYRIGHT
+
+Copyright 1992, 1993, 1994 Sun Microsystems, Inc. Printed in the United
+States of America. All Rights Reserved.
+
+This product is protected by copyright and distributed under the following
+license restricting its use.
+
+The Interface Definition Language Compiler Front End (CFE) is made
+available for your use provided that you include this license and copyright
+notice on all media and documentation and the software program in which
+this product is incorporated in whole or part. You may copy and extend
+functionality (but may not remove functionality) of the Interface
+Definition Language CFE without charge, but you are not authorized to
+license or distribute it to anyone else except as part of a product or
+program developed by you or with the express written consent of Sun
+Microsystems, Inc. ("Sun").
+
+The names of Sun Microsystems, Inc. and any of its subsidiaries or
+affiliates may not be used in advertising or publicity pertaining to
+distribution of Interface Definition Language CFE as permitted herein.
+
+This license is effective until terminated by Sun for failure to comply
+with this license. Upon termination, you shall destroy or return all code
+and documentation for the Interface Definition Language CFE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED AS IS WITH NO WARRANTIES OF
+ANY KIND INCLUDING THE WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS
+FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR ARISING FROM A COURSE OF
+DEALING, USAGE OR TRADE PRACTICE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED WITH NO SUPPORT AND WITHOUT
+ANY OBLIGATION ON THE PART OF Sun OR ANY OF ITS SUBSIDIARIES OR AFFILIATES
+TO ASSIST IN ITS USE, CORRECTION, MODIFICATION OR ENHANCEMENT.
+
+SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES SHALL HAVE NO LIABILITY WITH
+RESPECT TO THE INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY
+INTERFACE DEFINITION LANGUAGE CFE OR ANY PART THEREOF.
+
+IN NO EVENT WILL SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES BE LIABLE FOR
+ANY LOST REVENUE OR PROFITS OR OTHER SPECIAL, INDIRECT AND CONSEQUENTIAL
+DAMAGES, EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+Use, duplication, or disclosure by the government is subject to
+restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in
+Technical Data and Computer Software clause at DFARS 252.227-7013 and FAR
+52.227-19.
+
+Sun, Sun Microsystems and the Sun logo are trademarks or registered
+trademarks of Sun Microsystems, Inc.
+
+SunSoft, Inc.
+2550 Garcia Avenue
+Mountain View, California 94043
+
+NOTE:
+
+SunOS, SunSoft, Sun, Solaris, Sun Microsystems or the Sun logo are
+trademarks or registered trademarks of Sun Microsystems, Inc.
+
+ */
+
+#ifndef _BE_EXTERN_BE_EXTERN_HH
+#define _BE_EXTERN_BE_EXTERN_HH
+
+#pragma ident "%@(#)be_extern.h 1.17% %92/06/10% Sun Microsystems"
+
+// be_extern.h - Defines the BE part of the BE<->FE protocol
+
+// Functions:
+
+extern "C" AST_Generator *BE_init();
+
+extern "C" void BE_produce();
+extern "C" void BE_abort();
+extern "C" void BE_prep_arg(char *, idl_bool);
+
+extern "C" void BE_version();
+
+#endif // _BE_EXTERN_BE_EXTERN_HH
diff --git a/TAO/TAO_IDL/include/drv_extern.h b/TAO/TAO_IDL/include/drv_extern.h
new file mode 100644
index 00000000000..31a54434a5b
--- /dev/null
+++ b/TAO/TAO_IDL/include/drv_extern.h
@@ -0,0 +1,86 @@
+/*
+
+COPYRIGHT
+
+Copyright 1992, 1993, 1994 Sun Microsystems, Inc. Printed in the United
+States of America. All Rights Reserved.
+
+This product is protected by copyright and distributed under the following
+license restricting its use.
+
+The Interface Definition Language Compiler Front End (CFE) is made
+available for your use provided that you include this license and copyright
+notice on all media and documentation and the software program in which
+this product is incorporated in whole or part. You may copy and extend
+functionality (but may not remove functionality) of the Interface
+Definition Language CFE without charge, but you are not authorized to
+license or distribute it to anyone else except as part of a product or
+program developed by you or with the express written consent of Sun
+Microsystems, Inc. ("Sun").
+
+The names of Sun Microsystems, Inc. and any of its subsidiaries or
+affiliates may not be used in advertising or publicity pertaining to
+distribution of Interface Definition Language CFE as permitted herein.
+
+This license is effective until terminated by Sun for failure to comply
+with this license. Upon termination, you shall destroy or return all code
+and documentation for the Interface Definition Language CFE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED AS IS WITH NO WARRANTIES OF
+ANY KIND INCLUDING THE WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS
+FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR ARISING FROM A COURSE OF
+DEALING, USAGE OR TRADE PRACTICE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED WITH NO SUPPORT AND WITHOUT
+ANY OBLIGATION ON THE PART OF Sun OR ANY OF ITS SUBSIDIARIES OR AFFILIATES
+TO ASSIST IN ITS USE, CORRECTION, MODIFICATION OR ENHANCEMENT.
+
+SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES SHALL HAVE NO LIABILITY WITH
+RESPECT TO THE INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY
+INTERFACE DEFINITION LANGUAGE CFE OR ANY PART THEREOF.
+
+IN NO EVENT WILL SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES BE LIABLE FOR
+ANY LOST REVENUE OR PROFITS OR OTHER SPECIAL, INDIRECT AND CONSEQUENTIAL
+DAMAGES, EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+Use, duplication, or disclosure by the government is subject to
+restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in
+Technical Data and Computer Software clause at DFARS 252.227-7013 and FAR
+52.227-19.
+
+Sun, Sun Microsystems and the Sun logo are trademarks or registered
+trademarks of Sun Microsystems, Inc.
+
+SunSoft, Inc.
+2550 Garcia Avenue
+Mountain View, California 94043
+
+NOTE:
+
+SunOS, SunSoft, Sun, Solaris, Sun Microsystems or the Sun logo are
+trademarks or registered trademarks of Sun Microsystems, Inc.
+
+ */
+
+#ifndef _DRV_EXTERN_DRV_EXTERN_HH
+#define _DRV_EXTERN_DRV_EXTERN_HH
+
+#pragma ident "%@(#)drv_extern.h 1.17% %92/06/10% Sun Microsystems"
+
+// drv_extern.h - External functions for the IDL compiler driver program
+
+// Functions
+
+extern void DRV_init();
+extern void DRV_parse_args(long, char **);
+extern void DRV_usage();
+
+extern void DRV_pre_proc(char *myfile);
+
+extern void DRV_cpp_init();
+extern void DRV_cpp_putarg(char *str);
+extern void DRV_cpp_new_location(char *new_loc);
+
+extern void DRV_fork();
+
+#endif // _DRV_EXTERN_DRV_EXTERN_HH
diff --git a/TAO/TAO_IDL/include/drv_link.h b/TAO/TAO_IDL/include/drv_link.h
new file mode 100644
index 00000000000..daea5b77b88
--- /dev/null
+++ b/TAO/TAO_IDL/include/drv_link.h
@@ -0,0 +1,122 @@
+/*
+
+COPYRIGHT
+
+Copyright 1992, 1993, 1994 Sun Microsystems, Inc. Printed in the United
+States of America. All Rights Reserved.
+
+This product is protected by copyright and distributed under the following
+license restricting its use.
+
+The Interface Definition Language Compiler Front End (CFE) is made
+available for your use provided that you include this license and copyright
+notice on all media and documentation and the software program in which
+this product is incorporated in whole or part. You may copy and extend
+functionality (but may not remove functionality) of the Interface
+Definition Language CFE without charge, but you are not authorized to
+license or distribute it to anyone else except as part of a product or
+program developed by you or with the express written consent of Sun
+Microsystems, Inc. ("Sun").
+
+The names of Sun Microsystems, Inc. and any of its subsidiaries or
+affiliates may not be used in advertising or publicity pertaining to
+distribution of Interface Definition Language CFE as permitted herein.
+
+This license is effective until terminated by Sun for failure to comply
+with this license. Upon termination, you shall destroy or return all code
+and documentation for the Interface Definition Language CFE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED AS IS WITH NO WARRANTIES OF
+ANY KIND INCLUDING THE WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS
+FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR ARISING FROM A COURSE OF
+DEALING, USAGE OR TRADE PRACTICE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED WITH NO SUPPORT AND WITHOUT
+ANY OBLIGATION ON THE PART OF Sun OR ANY OF ITS SUBSIDIARIES OR AFFILIATES
+TO ASSIST IN ITS USE, CORRECTION, MODIFICATION OR ENHANCEMENT.
+
+SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES SHALL HAVE NO LIABILITY WITH
+RESPECT TO THE INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY
+INTERFACE DEFINITION LANGUAGE CFE OR ANY PART THEREOF.
+
+IN NO EVENT WILL SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES BE LIABLE FOR
+ANY LOST REVENUE OR PROFITS OR OTHER SPECIAL, INDIRECT AND CONSEQUENTIAL
+DAMAGES, EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+Use, duplication, or disclosure by the government is subject to
+restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in
+Technical Data and Computer Software clause at DFARS 252.227-7013 and FAR
+52.227-19.
+
+Sun, Sun Microsystems and the Sun logo are trademarks or registered
+trademarks of Sun Microsystems, Inc.
+
+SunSoft, Inc.
+2550 Garcia Avenue
+Mountain View, California 94043
+
+NOTE:
+
+SunOS, SunSoft, Sun, Solaris, Sun Microsystems or the Sun logo are
+trademarks or registered trademarks of Sun Microsystems, Inc.
+
+ */
+
+#ifndef _DRV_LINK_DRV_LINK_HH
+#define _DRV_LINK_DRV_LINK_HH
+
+// drv_link.hh - Define data and functions which are used to
+// link in the back end functions
+
+/*
+ * Front end interface
+ */
+
+class File;
+typedef void (* DRV_PF_FE_init_stage1)();
+typedef void (* DRV_PF_FE_init_stage2)();
+typedef int (* DRV_PF_FE_yyparse)();
+typedef void (* DRV_PF_FE_set_yyin)(File *);
+
+class UTL_Error;
+class UTL_Indenter;
+class UTL_String;
+typedef UTL_Error * (* DRV_PF_FE_new_UTL_Error)();
+typedef UTL_Indenter * (* DRV_PF_FE_new_UTL_Indenter)();
+typedef UTL_String * (* DRV_PF_FE_new_UTL_String)(char *);
+
+extern DRV_PF_FE_init_stage1 DRV_FE_init_stage1;
+extern DRV_PF_FE_init_stage2 DRV_FE_init_stage2;
+extern DRV_PF_FE_yyparse DRV_FE_yyparse;
+extern DRV_PF_FE_set_yyin DRV_FE_set_yyin;
+
+extern DRV_PF_FE_new_UTL_Error DRV_FE_new_UTL_Error;
+extern DRV_PF_FE_new_UTL_Indenter DRV_FE_new_UTL_Indenter;
+extern DRV_PF_FE_new_UTL_String DRV_FE_new_UTL_String;
+
+/*
+ * Back end interface
+ */
+
+class AST_Generator;
+typedef AST_Generator * (* DRV_PF_BE_init)();
+typedef void (* DRV_PF_BE_produce)();
+typedef void (* DRV_PF_BE_abort)();
+typedef void (* DRV_PF_BE_prep_arg)(char *, idl_bool);
+typedef void (* DRV_PF_BE_version)();
+
+extern DRV_PF_BE_init DRV_BE_init;
+extern DRV_PF_BE_produce DRV_BE_produce;
+extern DRV_PF_BE_abort DRV_BE_abort;
+extern DRV_PF_BE_prep_arg DRV_BE_prep_arg;
+extern DRV_PF_BE_version DRV_BE_version;
+
+// Functions
+
+extern void DRV_FE_open();
+extern void DRV_FE_close();
+
+extern void DRV_BE_open();
+extern void DRV_BE_close();
+
+#endif // _DRV_LINK_DRV_LINK_HH
diff --git a/TAO/TAO_IDL/include/drv_private.h b/TAO/TAO_IDL/include/drv_private.h
new file mode 100644
index 00000000000..d68ca7f2f65
--- /dev/null
+++ b/TAO/TAO_IDL/include/drv_private.h
@@ -0,0 +1,83 @@
+/*
+
+COPYRIGHT
+
+Copyright 1992, 1993, 1994 Sun Microsystems, Inc. Printed in the United
+States of America. All Rights Reserved.
+
+This product is protected by copyright and distributed under the following
+license restricting its use.
+
+The Interface Definition Language Compiler Front End (CFE) is made
+available for your use provided that you include this license and copyright
+notice on all media and documentation and the software program in which
+this product is incorporated in whole or part. You may copy and extend
+functionality (but may not remove functionality) of the Interface
+Definition Language CFE without charge, but you are not authorized to
+license or distribute it to anyone else except as part of a product or
+program developed by you or with the express written consent of Sun
+Microsystems, Inc. ("Sun").
+
+The names of Sun Microsystems, Inc. and any of its subsidiaries or
+affiliates may not be used in advertising or publicity pertaining to
+distribution of Interface Definition Language CFE as permitted herein.
+
+This license is effective until terminated by Sun for failure to comply
+with this license. Upon termination, you shall destroy or return all code
+and documentation for the Interface Definition Language CFE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED AS IS WITH NO WARRANTIES OF
+ANY KIND INCLUDING THE WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS
+FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR ARISING FROM A COURSE OF
+DEALING, USAGE OR TRADE PRACTICE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED WITH NO SUPPORT AND WITHOUT
+ANY OBLIGATION ON THE PART OF Sun OR ANY OF ITS SUBSIDIARIES OR AFFILIATES
+TO ASSIST IN ITS USE, CORRECTION, MODIFICATION OR ENHANCEMENT.
+
+SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES SHALL HAVE NO LIABILITY WITH
+RESPECT TO THE INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY
+INTERFACE DEFINITION LANGUAGE CFE OR ANY PART THEREOF.
+
+IN NO EVENT WILL SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES BE LIABLE FOR
+ANY LOST REVENUE OR PROFITS OR OTHER SPECIAL, INDIRECT AND CONSEQUENTIAL
+DAMAGES, EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+Use, duplication, or disclosure by the government is subject to
+restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in
+Technical Data and Computer Software clause at DFARS 252.227-7013 and FAR
+52.227-19.
+
+Sun, Sun Microsystems and the Sun logo are trademarks or registered
+trademarks of Sun Microsystems, Inc.
+
+SunSoft, Inc.
+2550 Garcia Avenue
+Mountain View, California 94043
+
+NOTE:
+
+SunOS, SunSoft, Sun, Solaris, Sun Microsystems or the Sun logo are
+trademarks or registered trademarks of Sun Microsystems, Inc.
+
+ */
+
+#ifndef _DRV_PRIVATE_DRV_PRIVATE_HH
+#define _DRV_PRIVATE_DRV_PRIVATE_HH
+
+#pragma ident "%@(#)drv_private.hh 1.17% %92/06/10% Sun Microsystems"
+
+// drv_private.hh - Define data and functions which are private to
+// the DRV but which must be accessible througout the DRV
+
+// Data
+
+extern char *DRV_files[]; // All files to be processed
+extern long DRV_nfiles; // How many are there?
+extern long DRV_file_index; // What's the file I am responsible
+ // for?
+
+// Functions
+extern void DRV_drive(char *);// Compiler driver for single file
+
+#endif // _DRV_PRIVATE_DRV_PRIVATE_HH
diff --git a/TAO/TAO_IDL/include/fe_declarator.h b/TAO/TAO_IDL/include/fe_declarator.h
new file mode 100644
index 00000000000..44cd0b4c7af
--- /dev/null
+++ b/TAO/TAO_IDL/include/fe_declarator.h
@@ -0,0 +1,113 @@
+/*
+
+COPYRIGHT
+
+Copyright 1992, 1993, 1994 Sun Microsystems, Inc. Printed in the United
+States of America. All Rights Reserved.
+
+This product is protected by copyright and distributed under the following
+license restricting its use.
+
+The Interface Definition Language Compiler Front End (CFE) is made
+available for your use provided that you include this license and copyright
+notice on all media and documentation and the software program in which
+this product is incorporated in whole or part. You may copy and extend
+functionality (but may not remove functionality) of the Interface
+Definition Language CFE without charge, but you are not authorized to
+license or distribute it to anyone else except as part of a product or
+program developed by you or with the express written consent of Sun
+Microsystems, Inc. ("Sun").
+
+The names of Sun Microsystems, Inc. and any of its subsidiaries or
+affiliates may not be used in advertising or publicity pertaining to
+distribution of Interface Definition Language CFE as permitted herein.
+
+This license is effective until terminated by Sun for failure to comply
+with this license. Upon termination, you shall destroy or return all code
+and documentation for the Interface Definition Language CFE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED AS IS WITH NO WARRANTIES OF
+ANY KIND INCLUDING THE WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS
+FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR ARISING FROM A COURSE OF
+DEALING, USAGE OR TRADE PRACTICE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED WITH NO SUPPORT AND WITHOUT
+ANY OBLIGATION ON THE PART OF Sun OR ANY OF ITS SUBSIDIARIES OR AFFILIATES
+TO ASSIST IN ITS USE, CORRECTION, MODIFICATION OR ENHANCEMENT.
+
+SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES SHALL HAVE NO LIABILITY WITH
+RESPECT TO THE INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY
+INTERFACE DEFINITION LANGUAGE CFE OR ANY PART THEREOF.
+
+IN NO EVENT WILL SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES BE LIABLE FOR
+ANY LOST REVENUE OR PROFITS OR OTHER SPECIAL, INDIRECT AND CONSEQUENTIAL
+DAMAGES, EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+Use, duplication, or disclosure by the government is subject to
+restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in
+Technical Data and Computer Software clause at DFARS 252.227-7013 and FAR
+52.227-19.
+
+Sun, Sun Microsystems and the Sun logo are trademarks or registered
+trademarks of Sun Microsystems, Inc.
+
+SunSoft, Inc.
+2550 Garcia Avenue
+Mountain View, California 94043
+
+NOTE:
+
+SunOS, SunSoft, Sun, Solaris, Sun Microsystems or the Sun logo are
+trademarks or registered trademarks of Sun Microsystems, Inc.
+
+ */
+
+#ifndef _FE_DECLARATOR_FE_DECLARATOR_HH
+#define _FE_DECLARATOR_FE_DECLARATOR_HH
+
+#pragma ident "%@(#)FE_Declarator.h 1.30% %92/06/10% Sun Microsystems"
+
+// FE_Declarator.h
+//
+// FE internal class for storing interim declaration statements
+
+/*
+** DEPENDENCIES: utl_scoped_name.hh, ast_decl.hh
+**
+** USE: Included from fe.hh
+*/
+
+class FE_Declarator
+{
+public:
+ // Enum to denote types of declarators
+ enum DeclaratorType {
+ FD_simple // Simple declarator
+ , FD_complex // Complex declarator (complex_part field used)
+ };
+
+ // Operations
+
+ // Constructor(s)
+ FE_Declarator(UTL_ScopedName *n, DeclaratorType dt, AST_Decl *cp);
+ virtual ~FE_Declarator() {}
+
+ // Data Accessors
+ AST_Decl *complex_part();
+ UTL_ScopedName *name();
+ DeclaratorType decl_type();
+
+ // Other Operations
+
+ // Compose an FE_Declarator into an AST_Type once all the needed information
+ // is available
+ AST_Type *compose(AST_Decl* tc);
+
+private:
+ // Data
+ AST_Decl *pd_complex_part; // If a complex declarator
+ UTL_ScopedName *pd_name; // The name if complex
+ DeclaratorType pd_decl_type; // Whether complex or simple
+};
+
+#endif // _FE_DECLARATOR_FE_DECLARATOR_HH
diff --git a/TAO/TAO_IDL/include/fe_extern.h b/TAO/TAO_IDL/include/fe_extern.h
new file mode 100644
index 00000000000..0dacefd503f
--- /dev/null
+++ b/TAO/TAO_IDL/include/fe_extern.h
@@ -0,0 +1,109 @@
+/*
+
+COPYRIGHT
+
+Copyright 1992, 1993, 1994 Sun Microsystems, Inc. Printed in the United
+States of America. All Rights Reserved.
+
+This product is protected by copyright and distributed under the following
+license restricting its use.
+
+The Interface Definition Language Compiler Front End (CFE) is made
+available for your use provided that you include this license and copyright
+notice on all media and documentation and the software program in which
+this product is incorporated in whole or part. You may copy and extend
+functionality (but may not remove functionality) of the Interface
+Definition Language CFE without charge, but you are not authorized to
+license or distribute it to anyone else except as part of a product or
+program developed by you or with the express written consent of Sun
+Microsystems, Inc. ("Sun").
+
+The names of Sun Microsystems, Inc. and any of its subsidiaries or
+affiliates may not be used in advertising or publicity pertaining to
+distribution of Interface Definition Language CFE as permitted herein.
+
+This license is effective until terminated by Sun for failure to comply
+with this license. Upon termination, you shall destroy or return all code
+and documentation for the Interface Definition Language CFE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED AS IS WITH NO WARRANTIES OF
+ANY KIND INCLUDING THE WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS
+FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR ARISING FROM A COURSE OF
+DEALING, USAGE OR TRADE PRACTICE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED WITH NO SUPPORT AND WITHOUT
+ANY OBLIGATION ON THE PART OF Sun OR ANY OF ITS SUBSIDIARIES OR AFFILIATES
+TO ASSIST IN ITS USE, CORRECTION, MODIFICATION OR ENHANCEMENT.
+
+SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES SHALL HAVE NO LIABILITY WITH
+RESPECT TO THE INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY
+INTERFACE DEFINITION LANGUAGE CFE OR ANY PART THEREOF.
+
+IN NO EVENT WILL SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES BE LIABLE FOR
+ANY LOST REVENUE OR PROFITS OR OTHER SPECIAL, INDIRECT AND CONSEQUENTIAL
+DAMAGES, EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+Use, duplication, or disclosure by the government is subject to
+restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in
+Technical Data and Computer Software clause at DFARS 252.227-7013 and FAR
+52.227-19.
+
+Sun, Sun Microsystems and the Sun logo are trademarks or registered
+trademarks of Sun Microsystems, Inc.
+
+SunSoft, Inc.
+2550 Garcia Avenue
+Mountain View, California 94043
+
+NOTE:
+
+SunOS, SunSoft, Sun, Solaris, Sun Microsystems or the Sun logo are
+trademarks or registered trademarks of Sun Microsystems, Inc.
+
+ */
+
+#ifndef _FE_EXTERN_FE_EXTERN_HH
+#define _FE_EXTERN_FE_EXTERN_HH
+
+#pragma ident "%@(#)fe_extern.h 1.40% %92/06/10% Sun Microsystems"
+
+// fe_extern.hh
+//
+// Declares all global functions for the FE
+
+/*
+** DEPENDENCIES: none
+**
+** USE: Included from idl_extern.hh
+*/
+
+// Functions:
+
+// Initialization:
+//
+// FE initialization is done in two stages, with the BE initialization
+// occurring in between. The first stage is responsible for creating
+// the sope stack. The BE initialization creates the generator object
+// which is then used in the second stage to create the global scope
+// and to populate it with nodes for the predefined types
+
+extern "C" void FE_init_stage1(); // Initialize stage 1
+extern "C" void FE_init_stage2(); // Initialize stage 2
+
+// Interface to Yacc parser
+
+class File;
+extern "C" int FE_yyparse(); // Invode yyparse
+extern "C" void FE_set_yyin(File *); // Set yyin
+
+// Interface to constructors for objects need by the driver
+
+class UTL_Error;
+class UTL_Indenter;
+class UTL_String;
+
+extern "C" UTL_Error * FE_new_UTL_Error();
+extern "C" UTL_Indenter * FE_new_UTL_Indenter();
+extern "C" UTL_String * FE_new_UTL_String(char *);
+
+#endif // _FE_EXTERN_FE_EXTERN_HH
diff --git a/TAO/TAO_IDL/include/fe_interface_header.h b/TAO/TAO_IDL/include/fe_interface_header.h
new file mode 100644
index 00000000000..495bcb9567e
--- /dev/null
+++ b/TAO/TAO_IDL/include/fe_interface_header.h
@@ -0,0 +1,109 @@
+/*
+
+COPYRIGHT
+
+Copyright 1992, 1993, 1994 Sun Microsystems, Inc. Printed in the United
+States of America. All Rights Reserved.
+
+This product is protected by copyright and distributed under the following
+license restricting its use.
+
+The Interface Definition Language Compiler Front End (CFE) is made
+available for your use provided that you include this license and copyright
+notice on all media and documentation and the software program in which
+this product is incorporated in whole or part. You may copy and extend
+functionality (but may not remove functionality) of the Interface
+Definition Language CFE without charge, but you are not authorized to
+license or distribute it to anyone else except as part of a product or
+program developed by you or with the express written consent of Sun
+Microsystems, Inc. ("Sun").
+
+The names of Sun Microsystems, Inc. and any of its subsidiaries or
+affiliates may not be used in advertising or publicity pertaining to
+distribution of Interface Definition Language CFE as permitted herein.
+
+This license is effective until terminated by Sun for failure to comply
+with this license. Upon termination, you shall destroy or return all code
+and documentation for the Interface Definition Language CFE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED AS IS WITH NO WARRANTIES OF
+ANY KIND INCLUDING THE WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS
+FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR ARISING FROM A COURSE OF
+DEALING, USAGE OR TRADE PRACTICE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED WITH NO SUPPORT AND WITHOUT
+ANY OBLIGATION ON THE PART OF Sun OR ANY OF ITS SUBSIDIARIES OR AFFILIATES
+TO ASSIST IN ITS USE, CORRECTION, MODIFICATION OR ENHANCEMENT.
+
+SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES SHALL HAVE NO LIABILITY WITH
+RESPECT TO THE INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY
+INTERFACE DEFINITION LANGUAGE CFE OR ANY PART THEREOF.
+
+IN NO EVENT WILL SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES BE LIABLE FOR
+ANY LOST REVENUE OR PROFITS OR OTHER SPECIAL, INDIRECT AND CONSEQUENTIAL
+DAMAGES, EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+Use, duplication, or disclosure by the government is subject to
+restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in
+Technical Data and Computer Software clause at DFARS 252.227-7013 and FAR
+52.227-19.
+
+Sun, Sun Microsystems and the Sun logo are trademarks or registered
+trademarks of Sun Microsystems, Inc.
+
+SunSoft, Inc.
+2550 Garcia Avenue
+Mountain View, California 94043
+
+NOTE:
+
+SunOS, SunSoft, Sun, Solaris, Sun Microsystems or the Sun logo are
+trademarks or registered trademarks of Sun Microsystems, Inc.
+
+ */
+
+#ifndef _FE_INTERFACE_HEADER_FE_INTERFACE_HH
+#define _FE_INTERFACE_HEADER_FE_INTERFACE_HH
+
+#pragma ident "%@(#)FE_InterfaceHeader.h 1.32% %92/06/10% Sun Microsystems"
+
+// FE_InterfaceHeader
+//
+// Internal class for FE to describe interface headers
+
+/*
+** DEPENDENCIES: utl_scoped_name.hh, ast_interface.hh, utl_scope.hh,
+** ast_decl.hh
+**
+** USE: Included from fe.hh
+*/
+
+class FE_InterfaceHeader
+{
+public:
+ // Operations
+
+ // Constructor(s)
+ FE_InterfaceHeader(UTL_ScopedName *n, UTL_NameList *l);
+ virtual ~FE_InterfaceHeader() {}
+
+ // Data Accessors
+ UTL_ScopedName *interface_name();
+ AST_Interface **inherits();
+ long n_inherits();
+
+private:
+ // Data
+ UTL_ScopedName *pd_interface_name; // Interface name
+ AST_Interface **pd_inherits; // Inherited interfaces
+ long pd_n_inherits; // How many
+
+ // Operations
+
+ // Compile the flattened unique list of interfaces which this
+ // interface inherits from
+ void compile_one_inheritance(AST_Interface *i);
+ void compile_inheritance(UTL_NameList *l);
+};
+
+#endif // _FE_INTERFACE_HEADER_FE_INTERFACE_HH
diff --git a/TAO/TAO_IDL/include/fe_private.h b/TAO/TAO_IDL/include/fe_private.h
new file mode 100644
index 00000000000..4d3c2fcfc20
--- /dev/null
+++ b/TAO/TAO_IDL/include/fe_private.h
@@ -0,0 +1,90 @@
+/*
+
+COPYRIGHT
+
+Copyright 1992, 1993, 1994 Sun Microsystems, Inc. Printed in the United
+States of America. All Rights Reserved.
+
+This product is protected by copyright and distributed under the following
+license restricting its use.
+
+The Interface Definition Language Compiler Front End (CFE) is made
+available for your use provided that you include this license and copyright
+notice on all media and documentation and the software program in which
+this product is incorporated in whole or part. You may copy and extend
+functionality (but may not remove functionality) of the Interface
+Definition Language CFE without charge, but you are not authorized to
+license or distribute it to anyone else except as part of a product or
+program developed by you or with the express written consent of Sun
+Microsystems, Inc. ("Sun").
+
+The names of Sun Microsystems, Inc. and any of its subsidiaries or
+affiliates may not be used in advertising or publicity pertaining to
+distribution of Interface Definition Language CFE as permitted herein.
+
+This license is effective until terminated by Sun for failure to comply
+with this license. Upon termination, you shall destroy or return all code
+and documentation for the Interface Definition Language CFE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED AS IS WITH NO WARRANTIES OF
+ANY KIND INCLUDING THE WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS
+FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR ARISING FROM A COURSE OF
+DEALING, USAGE OR TRADE PRACTICE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED WITH NO SUPPORT AND WITHOUT
+ANY OBLIGATION ON THE PART OF Sun OR ANY OF ITS SUBSIDIARIES OR AFFILIATES
+TO ASSIST IN ITS USE, CORRECTION, MODIFICATION OR ENHANCEMENT.
+
+SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES SHALL HAVE NO LIABILITY WITH
+RESPECT TO THE INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY
+INTERFACE DEFINITION LANGUAGE CFE OR ANY PART THEREOF.
+
+IN NO EVENT WILL SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES BE LIABLE FOR
+ANY LOST REVENUE OR PROFITS OR OTHER SPECIAL, INDIRECT AND CONSEQUENTIAL
+DAMAGES, EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+Use, duplication, or disclosure by the government is subject to
+restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in
+Technical Data and Computer Software clause at DFARS 252.227-7013 and FAR
+52.227-19.
+
+Sun, Sun Microsystems and the Sun logo are trademarks or registered
+trademarks of Sun Microsystems, Inc.
+
+SunSoft, Inc.
+2550 Garcia Avenue
+Mountain View, California 94043
+
+NOTE:
+
+SunOS, SunSoft, Sun, Solaris, Sun Microsystems or the Sun logo are
+trademarks or registered trademarks of Sun Microsystems, Inc.
+
+ */
+
+#ifndef _FE_FE_HH
+#define _FE_FE_HH
+
+#pragma ident "%@(#)fe.h 1.47% %92/06/10% Sun Microsystems"
+
+// fe_private.hh - Defines data which is private to the FE but
+// which must be accessible throughout the FE
+
+/*
+** DEPENDENCIES: NONE
+**
+** USE: Included from source files
+*/
+
+/*
+ * FE includes
+ */
+
+#include "fe_interface_header.h"// class FE_InterfaceHeader
+#include "fe_declarator.h" // class FE_Declarator
+
+/*
+ * FE Operations
+ */
+
+#endif // _FE_FE_HH
diff --git a/TAO/TAO_IDL/include/global_extern.h b/TAO/TAO_IDL/include/global_extern.h
new file mode 100644
index 00000000000..84e90840604
--- /dev/null
+++ b/TAO/TAO_IDL/include/global_extern.h
@@ -0,0 +1,80 @@
+/*
+
+COPYRIGHT
+
+Copyright 1992, 1993, 1994 Sun Microsystems, Inc. Printed in the United
+States of America. All Rights Reserved.
+
+This product is protected by copyright and distributed under the following
+license restricting its use.
+
+The Interface Definition Language Compiler Front End (CFE) is made
+available for your use provided that you include this license and copyright
+notice on all media and documentation and the software program in which
+this product is incorporated in whole or part. You may copy and extend
+functionality (but may not remove functionality) of the Interface
+Definition Language CFE without charge, but you are not authorized to
+license or distribute it to anyone else except as part of a product or
+program developed by you or with the express written consent of Sun
+Microsystems, Inc. ("Sun").
+
+The names of Sun Microsystems, Inc. and any of its subsidiaries or
+affiliates may not be used in advertising or publicity pertaining to
+distribution of Interface Definition Language CFE as permitted herein.
+
+This license is effective until terminated by Sun for failure to comply
+with this license. Upon termination, you shall destroy or return all code
+and documentation for the Interface Definition Language CFE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED AS IS WITH NO WARRANTIES OF
+ANY KIND INCLUDING THE WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS
+FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR ARISING FROM A COURSE OF
+DEALING, USAGE OR TRADE PRACTICE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED WITH NO SUPPORT AND WITHOUT
+ANY OBLIGATION ON THE PART OF Sun OR ANY OF ITS SUBSIDIARIES OR AFFILIATES
+TO ASSIST IN ITS USE, CORRECTION, MODIFICATION OR ENHANCEMENT.
+
+SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES SHALL HAVE NO LIABILITY WITH
+RESPECT TO THE INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY
+INTERFACE DEFINITION LANGUAGE CFE OR ANY PART THEREOF.
+
+IN NO EVENT WILL SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES BE LIABLE FOR
+ANY LOST REVENUE OR PROFITS OR OTHER SPECIAL, INDIRECT AND CONSEQUENTIAL
+DAMAGES, EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+Use, duplication, or disclosure by the government is subject to
+restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in
+Technical Data and Computer Software clause at DFARS 252.227-7013 and FAR
+52.227-19.
+
+Sun, Sun Microsystems and the Sun logo are trademarks or registered
+trademarks of Sun Microsystems, Inc.
+
+SunSoft, Inc.
+2550 Garcia Avenue
+Mountain View, California 94043
+
+NOTE:
+
+SunOS, SunSoft, Sun, Solaris, Sun Microsystems or the Sun logo are
+trademarks or registered trademarks of Sun Microsystems, Inc.
+
+ */
+
+#ifndef _GLOBAL_EXTERN_GLOBAL_EXTERN_HH
+#define _GLOBAL_EXTERN_GLOBAL_EXTERN_HH
+
+#pragma ident "%@(#)global_extern.hh 1.18% %92/06/10% Sun Microsystems"
+
+// global_extern.hh - Global data for the IDL compiler
+
+extern IDL_GlobalData *idl_global; // Contains all "global" data
+
+// Global functions for the IDL compiler
+
+// Return TRUE when the name of this AST_Decl can be reused in
+// a definition in this scope
+extern idl_bool can_be_redefined(AST_Decl *);
+
+#endif // _GLOBAL_EXTERN_GLOBAL_EXTERN_HH
diff --git a/TAO/TAO_IDL/include/idl.h b/TAO/TAO_IDL/include/idl.h
new file mode 100644
index 00000000000..75a87888ca6
--- /dev/null
+++ b/TAO/TAO_IDL/include/idl.h
@@ -0,0 +1,97 @@
+/*
+
+COPYRIGHT
+
+Copyright 1992, 1993, 1994 Sun Microsystems, Inc. Printed in the United
+States of America. All Rights Reserved.
+
+This product is protected by copyright and distributed under the following
+license restricting its use.
+
+The Interface Definition Language Compiler Front End (CFE) is made
+available for your use provided that you include this license and copyright
+notice on all media and documentation and the software program in which
+this product is incorporated in whole or part. You may copy and extend
+functionality (but may not remove functionality) of the Interface
+Definition Language CFE without charge, but you are not authorized to
+license or distribute it to anyone else except as part of a product or
+program developed by you or with the express written consent of Sun
+Microsystems, Inc. ("Sun").
+
+The names of Sun Microsystems, Inc. and any of its subsidiaries or
+affiliates may not be used in advertising or publicity pertaining to
+distribution of Interface Definition Language CFE as permitted herein.
+
+This license is effective until terminated by Sun for failure to comply
+with this license. Upon termination, you shall destroy or return all code
+and documentation for the Interface Definition Language CFE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED AS IS WITH NO WARRANTIES OF
+ANY KIND INCLUDING THE WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS
+FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR ARISING FROM A COURSE OF
+DEALING, USAGE OR TRADE PRACTICE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED WITH NO SUPPORT AND WITHOUT
+ANY OBLIGATION ON THE PART OF Sun OR ANY OF ITS SUBSIDIARIES OR AFFILIATES
+TO ASSIST IN ITS USE, CORRECTION, MODIFICATION OR ENHANCEMENT.
+
+SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES SHALL HAVE NO LIABILITY WITH
+RESPECT TO THE INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY
+INTERFACE DEFINITION LANGUAGE CFE OR ANY PART THEREOF.
+
+IN NO EVENT WILL SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES BE LIABLE FOR
+ANY LOST REVENUE OR PROFITS OR OTHER SPECIAL, INDIRECT AND CONSEQUENTIAL
+DAMAGES, EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+Use, duplication, or disclosure by the government is subject to
+restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in
+Technical Data and Computer Software clause at DFARS 252.227-7013 and FAR
+52.227-19.
+
+Sun, Sun Microsystems and the Sun logo are trademarks or registered
+trademarks of Sun Microsystems, Inc.
+
+SunSoft, Inc.
+2550 Garcia Avenue
+Mountain View, California 94043
+
+NOTE:
+
+SunOS, SunSoft, Sun, Solaris, Sun Microsystems or the Sun logo are
+trademarks or registered trademarks of Sun Microsystems, Inc.
+
+ */
+
+#ifndef _IDL_IDL_HH
+#define _IDL_IDL_HH
+
+#pragma ident "%@(#)idl.hh 1.18% %92/06/10% Sun Microsystems"
+
+// idl.hh
+//
+// Main include file for IDL compiler. Includes the rest of the
+// files defining the different units of the compiler
+
+#include "intlmacros.h" // Define macros for intl'ion
+
+#include <stdlib.h> // POSIX standard defns
+#include <string.h> // POSIX string funcs
+#include <ctype.h> // External functions
+
+#include <iostream.h> // Standard IO library
+
+#include <sys/types.h> // POSIX standard types
+
+#include "idl_narrow.h" // IDL Narrowing mechanism
+
+#include "idl_defines.h" // Constants for IDL compiler
+#include "idl_fwd.h" // Forward decls of classes
+
+#include "idl_bool.h" // Defines boolean for IDL
+
+#include "utl_string.h" // Defines utility string class
+#include "utl_identifier.h" // Defines utility identifier class
+#include "ast.h" // AST classes
+#include "util.h" // Utility classes
+
+#endif // _IDL_IDL_HH
diff --git a/TAO/TAO_IDL/include/idl_bool.h b/TAO/TAO_IDL/include/idl_bool.h
new file mode 100644
index 00000000000..dfd4ae357a2
--- /dev/null
+++ b/TAO/TAO_IDL/include/idl_bool.h
@@ -0,0 +1,94 @@
+/*
+
+COPYRIGHT
+
+Copyright 1992, 1993, 1994 Sun Microsystems, Inc. Printed in the United
+States of America. All Rights Reserved.
+
+This product is protected by copyright and distributed under the following
+license restricting its use.
+
+The Interface Definition Language Compiler Front End (CFE) is made
+available for your use provided that you include this license and copyright
+notice on all media and documentation and the software program in which
+this product is incorporated in whole or part. You may copy and extend
+functionality (but may not remove functionality) of the Interface
+Definition Language CFE without charge, but you are not authorized to
+license or distribute it to anyone else except as part of a product or
+program developed by you or with the express written consent of Sun
+Microsystems, Inc. ("Sun").
+
+The names of Sun Microsystems, Inc. and any of its subsidiaries or
+affiliates may not be used in advertising or publicity pertaining to
+distribution of Interface Definition Language CFE as permitted herein.
+
+This license is effective until terminated by Sun for failure to comply
+with this license. Upon termination, you shall destroy or return all code
+and documentation for the Interface Definition Language CFE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED AS IS WITH NO WARRANTIES OF
+ANY KIND INCLUDING THE WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS
+FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR ARISING FROM A COURSE OF
+DEALING, USAGE OR TRADE PRACTICE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED WITH NO SUPPORT AND WITHOUT
+ANY OBLIGATION ON THE PART OF Sun OR ANY OF ITS SUBSIDIARIES OR AFFILIATES
+TO ASSIST IN ITS USE, CORRECTION, MODIFICATION OR ENHANCEMENT.
+
+SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES SHALL HAVE NO LIABILITY WITH
+RESPECT TO THE INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY
+INTERFACE DEFINITION LANGUAGE CFE OR ANY PART THEREOF.
+
+IN NO EVENT WILL SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES BE LIABLE FOR
+ANY LOST REVENUE OR PROFITS OR OTHER SPECIAL, INDIRECT AND CONSEQUENTIAL
+DAMAGES, EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+Use, duplication, or disclosure by the government is subject to
+restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in
+Technical Data and Computer Software clause at DFARS 252.227-7013 and FAR
+52.227-19.
+
+Sun, Sun Microsystems and the Sun logo are trademarks or registered
+trademarks of Sun Microsystems, Inc.
+
+SunSoft, Inc.
+2550 Garcia Avenue
+Mountain View, California 94043
+
+NOTE:
+
+SunOS, SunSoft, Sun, Solaris, Sun Microsystems or the Sun logo are
+trademarks or registered trademarks of Sun Microsystems, Inc.
+
+ */
+
+#ifndef _IDL_BOOL_IDL_BOOL_HH
+#define _IDL_BOOL_IDL_BOOL_HH
+
+#pragma ident "%@(#)idl_bool.hh 1.43% %92/06/10% Sun Microsystems"
+
+/*
+ * idl_bool.hh - Boolean definitions for IDL CFE
+ *
+ * This is interim. When porting to a new platform, this file will be
+ * modified to incorporate definitions for the boolean type suitable
+ * for the new platform.
+ */
+
+/*
+** DEPENDENCIES: NONE
+**
+** USE: Included from idl.hh
+*/
+
+#ifndef I_TRUE
+#define I_TRUE 1
+#endif
+
+#ifndef I_FALSE
+#define I_FALSE 0
+#endif
+
+typedef long idl_bool;
+
+#endif // _IDL_BOOL_IDL_BOOL_HH
diff --git a/TAO/TAO_IDL/include/idl_defines.h b/TAO/TAO_IDL/include/idl_defines.h
new file mode 100644
index 00000000000..48a63857661
--- /dev/null
+++ b/TAO/TAO_IDL/include/idl_defines.h
@@ -0,0 +1,84 @@
+/*
+
+COPYRIGHT
+
+Copyright 1992, 1993, 1994 Sun Microsystems, Inc. Printed in the United
+States of America. All Rights Reserved.
+
+This product is protected by copyright and distributed under the following
+license restricting its use.
+
+The Interface Definition Language Compiler Front End (CFE) is made
+available for your use provided that you include this license and copyright
+notice on all media and documentation and the software program in which
+this product is incorporated in whole or part. You may copy and extend
+functionality (but may not remove functionality) of the Interface
+Definition Language CFE without charge, but you are not authorized to
+license or distribute it to anyone else except as part of a product or
+program developed by you or with the express written consent of Sun
+Microsystems, Inc. ("Sun").
+
+The names of Sun Microsystems, Inc. and any of its subsidiaries or
+affiliates may not be used in advertising or publicity pertaining to
+distribution of Interface Definition Language CFE as permitted herein.
+
+This license is effective until terminated by Sun for failure to comply
+with this license. Upon termination, you shall destroy or return all code
+and documentation for the Interface Definition Language CFE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED AS IS WITH NO WARRANTIES OF
+ANY KIND INCLUDING THE WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS
+FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR ARISING FROM A COURSE OF
+DEALING, USAGE OR TRADE PRACTICE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED WITH NO SUPPORT AND WITHOUT
+ANY OBLIGATION ON THE PART OF Sun OR ANY OF ITS SUBSIDIARIES OR AFFILIATES
+TO ASSIST IN ITS USE, CORRECTION, MODIFICATION OR ENHANCEMENT.
+
+SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES SHALL HAVE NO LIABILITY WITH
+RESPECT TO THE INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY
+INTERFACE DEFINITION LANGUAGE CFE OR ANY PART THEREOF.
+
+IN NO EVENT WILL SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES BE LIABLE FOR
+ANY LOST REVENUE OR PROFITS OR OTHER SPECIAL, INDIRECT AND CONSEQUENTIAL
+DAMAGES, EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+Use, duplication, or disclosure by the government is subject to
+restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in
+Technical Data and Computer Software clause at DFARS 252.227-7013 and FAR
+52.227-19.
+
+Sun, Sun Microsystems and the Sun logo are trademarks or registered
+trademarks of Sun Microsystems, Inc.
+
+SunSoft, Inc.
+2550 Garcia Avenue
+Mountain View, California 94043
+
+NOTE:
+
+SunOS, SunSoft, Sun, Solaris, Sun Microsystems or the Sun logo are
+trademarks or registered trademarks of Sun Microsystems, Inc.
+
+ */
+
+#ifndef _IDL_DEFINES_IDL_DEFINES_HH
+#define _IDL_DEFINES_IDL_DEFINES_HH
+
+#pragma ident "%@(#)idl_defines.hh 1.15% %92/06/10% Sun Microsystems"
+
+/*
+ * idl_defines.hh - Defines global compiler flags
+ */
+
+// This cannot be an enum since more than one value may be active at
+// a given time, hence bitflags are #define'd instead
+
+#define IDL_CF_VERSION (1 << 0)
+#define IDL_CF_DUMP_AST (1 << 1)
+#define IDL_CF_ONLY_PREPROC (1 << 2)
+#define IDL_CF_ONLY_USAGE (1 << 3)
+#define IDL_CF_INFORMATIVE (1 << 4)
+#define IDL_CF_NOWARNINGS (1 << 5)
+
+#endif // _IDL_DEFINES_IDL_DEFINES_HH
diff --git a/TAO/TAO_IDL/include/idl_extern.h b/TAO/TAO_IDL/include/idl_extern.h
new file mode 100644
index 00000000000..f1d059fe6a7
--- /dev/null
+++ b/TAO/TAO_IDL/include/idl_extern.h
@@ -0,0 +1,81 @@
+/*
+
+COPYRIGHT
+
+Copyright 1992, 1993, 1994 Sun Microsystems, Inc. Printed in the United
+States of America. All Rights Reserved.
+
+This product is protected by copyright and distributed under the following
+license restricting its use.
+
+The Interface Definition Language Compiler Front End (CFE) is made
+available for your use provided that you include this license and copyright
+notice on all media and documentation and the software program in which
+this product is incorporated in whole or part. You may copy and extend
+functionality (but may not remove functionality) of the Interface
+Definition Language CFE without charge, but you are not authorized to
+license or distribute it to anyone else except as part of a product or
+program developed by you or with the express written consent of Sun
+Microsystems, Inc. ("Sun").
+
+The names of Sun Microsystems, Inc. and any of its subsidiaries or
+affiliates may not be used in advertising or publicity pertaining to
+distribution of Interface Definition Language CFE as permitted herein.
+
+This license is effective until terminated by Sun for failure to comply
+with this license. Upon termination, you shall destroy or return all code
+and documentation for the Interface Definition Language CFE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED AS IS WITH NO WARRANTIES OF
+ANY KIND INCLUDING THE WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS
+FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR ARISING FROM A COURSE OF
+DEALING, USAGE OR TRADE PRACTICE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED WITH NO SUPPORT AND WITHOUT
+ANY OBLIGATION ON THE PART OF Sun OR ANY OF ITS SUBSIDIARIES OR AFFILIATES
+TO ASSIST IN ITS USE, CORRECTION, MODIFICATION OR ENHANCEMENT.
+
+SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES SHALL HAVE NO LIABILITY WITH
+RESPECT TO THE INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY
+INTERFACE DEFINITION LANGUAGE CFE OR ANY PART THEREOF.
+
+IN NO EVENT WILL SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES BE LIABLE FOR
+ANY LOST REVENUE OR PROFITS OR OTHER SPECIAL, INDIRECT AND CONSEQUENTIAL
+DAMAGES, EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+Use, duplication, or disclosure by the government is subject to
+restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in
+Technical Data and Computer Software clause at DFARS 252.227-7013 and FAR
+52.227-19.
+
+Sun, Sun Microsystems and the Sun logo are trademarks or registered
+trademarks of Sun Microsystems, Inc.
+
+SunSoft, Inc.
+2550 Garcia Avenue
+Mountain View, California 94043
+
+NOTE:
+
+SunOS, SunSoft, Sun, Solaris, Sun Microsystems or the Sun logo are
+trademarks or registered trademarks of Sun Microsystems, Inc.
+
+ */
+
+#ifndef _IDL_EXTERN_IDL_EXTERN_HH
+#define _IDL_EXTERN_IDL_EXTERN_HH
+
+#pragma ident "%@(#)idl_extern.hh 1.18% %92/06/10% Sun Microsystems"
+
+// idl_extern.hh
+//
+// Global variables and functions for IDL compiler
+
+#include "fe_extern.h" // External API of FE
+#include "be_extern.h" // External API of BE
+#include "drv_extern.h" // External API of DRV
+#include "ast_extern.h" // External API of AST
+#include "nr_extern.h" // External API of NR
+#include "global_extern.h" // Global data
+
+#endif // _IDL_EXTERN_IDL_EXTERN_HH
diff --git a/TAO/TAO_IDL/include/idl_fwd.h b/TAO/TAO_IDL/include/idl_fwd.h
new file mode 100644
index 00000000000..5fe63be9396
--- /dev/null
+++ b/TAO/TAO_IDL/include/idl_fwd.h
@@ -0,0 +1,147 @@
+/*
+
+COPYRIGHT
+
+Copyright 1992, 1993, 1994 Sun Microsystems, Inc. Printed in the United
+States of America. All Rights Reserved.
+
+This product is protected by copyright and distributed under the following
+license restricting its use.
+
+The Interface Definition Language Compiler Front End (CFE) is made
+available for your use provided that you include this license and copyright
+notice on all media and documentation and the software program in which
+this product is incorporated in whole or part. You may copy and extend
+functionality (but may not remove functionality) of the Interface
+Definition Language CFE without charge, but you are not authorized to
+license or distribute it to anyone else except as part of a product or
+program developed by you or with the express written consent of Sun
+Microsystems, Inc. ("Sun").
+
+The names of Sun Microsystems, Inc. and any of its subsidiaries or
+affiliates may not be used in advertising or publicity pertaining to
+distribution of Interface Definition Language CFE as permitted herein.
+
+This license is effective until terminated by Sun for failure to comply
+with this license. Upon termination, you shall destroy or return all code
+and documentation for the Interface Definition Language CFE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED AS IS WITH NO WARRANTIES OF
+ANY KIND INCLUDING THE WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS
+FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR ARISING FROM A COURSE OF
+DEALING, USAGE OR TRADE PRACTICE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED WITH NO SUPPORT AND WITHOUT
+ANY OBLIGATION ON THE PART OF Sun OR ANY OF ITS SUBSIDIARIES OR AFFILIATES
+TO ASSIST IN ITS USE, CORRECTION, MODIFICATION OR ENHANCEMENT.
+
+SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES SHALL HAVE NO LIABILITY WITH
+RESPECT TO THE INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY
+INTERFACE DEFINITION LANGUAGE CFE OR ANY PART THEREOF.
+
+IN NO EVENT WILL SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES BE LIABLE FOR
+ANY LOST REVENUE OR PROFITS OR OTHER SPECIAL, INDIRECT AND CONSEQUENTIAL
+DAMAGES, EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+Use, duplication, or disclosure by the government is subject to
+restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in
+Technical Data and Computer Software clause at DFARS 252.227-7013 and FAR
+52.227-19.
+
+Sun, Sun Microsystems and the Sun logo are trademarks or registered
+trademarks of Sun Microsystems, Inc.
+
+SunSoft, Inc.
+2550 Garcia Avenue
+Mountain View, California 94043
+
+NOTE:
+
+SunOS, SunSoft, Sun, Solaris, Sun Microsystems or the Sun logo are
+trademarks or registered trademarks of Sun Microsystems, Inc.
+
+ */
+
+#ifndef _IDL_FWD_IDL_FWD_HH
+#define _IDL_FWD_IDL_FWD_HH
+
+#pragma ident "%@(#)idl_fwd.hh 1.18% %92/06/10% Sun Microsystems"
+
+// idl_fwd.hh
+//
+// Forward declaration of all class names in CFE-BEs contract
+
+/*
+** DEPENDENCIES: NONE
+**
+** USE: Included from idl.hh
+*/
+
+// Class for global data representation:
+
+class IDL_GlobalData; // Global data is stored in an
+ // instance of this
+
+// Classes for utility of the IDL compiler:
+
+class UTL_ScopeStack; // Stack of scopes
+class UTL_Scope; // A definition scope (mixin)
+
+class UTL_LongList; // List of longs
+class UTL_StrList; // List of strings
+class UTL_StrlistActiveIterator; // Active iterator for list of strings
+class UTL_IdList; // List of identifiers
+class UTL_IdListActiveIterator; // Active iterator for list of id's
+class UTL_ExceptList; // List of exceptions
+class UTL_NameList; // List of scoped names
+class UTL_ExprList; // List of expressions
+class UTL_InterfList; // List of interfaces
+class UTL_LabelList; // List of union branch labels
+class UTL_DeclList; // List of declarators
+class UTL_String; // String class
+class UTL_Identifier; // Identifier class
+
+class UTL_Error; // Error class
+class UTL_Indenter; // Indenter class
+
+// Classes for utility of the FE. These classes are used only
+// by the FE but their forward declaration is needed because lists
+// of them are constructed by classes in UTL
+
+class FE_InterfaceHeader; // Interface header
+class FE_Declarator; // Declarator
+
+// Generator class for the AST
+
+class AST_Generator; // Generate nodes of various types
+
+// Classes for AST:
+
+class AST_Decl; // The rock bottom base class
+
+class AST_PredefinedType; // A predefined type
+class AST_Type; // An IDL type
+class AST_ConcreteType; // An IDL concrete type
+class AST_Module; // A module
+class AST_Root; // The root of an AST (a module)
+class AST_Interface; // An interface
+class AST_InterfaceFwd; // A forward interface decl
+class AST_Constant; // A constant declaration
+class AST_Expression; // Value of an expression
+class AST_Exception; // An exception declaration
+class AST_Attribute; // An attribute declaration
+class AST_Operation; // An operation declaration
+class AST_Argument; // An argument to an operation
+class AST_Union; // A union declaration
+class AST_UnionBranch; // A branch in a union
+class AST_UnionLabel; // A union branch label
+class AST_Structure; // A structure declaration
+class AST_Field; // A field in a structure or union
+class AST_Enum; // An enum declaration
+class AST_EnumVal; // An enumerator in an enum
+class AST_Sequence; // A sequence declaration
+class AST_String; // A string declaration
+class AST_Array; // An array declaration
+class AST_Typedef; // A typedef declaration
+
+#endif // _IDL_FWD_IDL_FWD_HH
diff --git a/TAO/TAO_IDL/include/idl_global.h b/TAO/TAO_IDL/include/idl_global.h
new file mode 100644
index 00000000000..4a2c723027a
--- /dev/null
+++ b/TAO/TAO_IDL/include/idl_global.h
@@ -0,0 +1,324 @@
+/*
+
+COPYRIGHT
+
+Copyright 1992, 1993, 1994 Sun Microsystems, Inc. Printed in the United
+States of America. All Rights Reserved.
+
+This product is protected by copyright and distributed under the following
+license restricting its use.
+
+The Interface Definition Language Compiler Front End (CFE) is made
+available for your use provided that you include this license and copyright
+notice on all media and documentation and the software program in which
+this product is incorporated in whole or part. You may copy and extend
+functionality (but may not remove functionality) of the Interface
+Definition Language CFE without charge, but you are not authorized to
+license or distribute it to anyone else except as part of a product or
+program developed by you or with the express written consent of Sun
+Microsystems, Inc. ("Sun").
+
+The names of Sun Microsystems, Inc. and any of its subsidiaries or
+affiliates may not be used in advertising or publicity pertaining to
+distribution of Interface Definition Language CFE as permitted herein.
+
+This license is effective until terminated by Sun for failure to comply
+with this license. Upon termination, you shall destroy or return all code
+and documentation for the Interface Definition Language CFE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED AS IS WITH NO WARRANTIES OF
+ANY KIND INCLUDING THE WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS
+FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR ARISING FROM A COURSE OF
+DEALING, USAGE OR TRADE PRACTICE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED WITH NO SUPPORT AND WITHOUT
+ANY OBLIGATION ON THE PART OF Sun OR ANY OF ITS SUBSIDIARIES OR AFFILIATES
+TO ASSIST IN ITS USE, CORRECTION, MODIFICATION OR ENHANCEMENT.
+
+SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES SHALL HAVE NO LIABILITY WITH
+RESPECT TO THE INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY
+INTERFACE DEFINITION LANGUAGE CFE OR ANY PART THEREOF.
+
+IN NO EVENT WILL SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES BE LIABLE FOR
+ANY LOST REVENUE OR PROFITS OR OTHER SPECIAL, INDIRECT AND CONSEQUENTIAL
+DAMAGES, EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+Use, duplication, or disclosure by the government is subject to
+restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in
+Technical Data and Computer Software clause at DFARS 252.227-7013 and FAR
+52.227-19.
+
+Sun, Sun Microsystems and the Sun logo are trademarks or registered
+trademarks of Sun Microsystems, Inc.
+
+SunSoft, Inc.
+2550 Garcia Avenue
+Mountain View, California 94043
+
+NOTE:
+
+SunOS, SunSoft, Sun, Solaris, Sun Microsystems or the Sun logo are
+trademarks or registered trademarks of Sun Microsystems, Inc.
+
+ */
+
+#ifndef _IDL_IDL_GLOBAL_HH
+#define _IDL_IDL_GLOBAL_HH
+
+#pragma ident "%@(#)idl_global.hh 1.1% %92/06/23% Sun Microsystems"
+
+// idl_global.hh
+//
+// Defines a class containing all global data for the compiler.
+// Can be subclassed in BEs to store more data
+
+class IDL_GlobalData
+{
+public:
+ // Types
+
+ // The ParseState type encodes the state of the Yacc parser so that
+ // better error messages can be produced, and for use by BEs in situations
+ // where context sensitive behavior is required
+ enum ParseState {
+ PS_NoState // No state
+ , PS_TypeDeclSeen // Seen complete typedef declaration
+ , PS_ConstDeclSeen // Seen complete const declaration
+ , PS_ExceptDeclSeen // Seen complete exception declaration
+ , PS_InterfaceDeclSeen // Seen complete interface declaration
+ , PS_ModuleDeclSeen // Seen complete module declaration
+ , PS_AttrDeclSeen // Seen complete attribute declaration
+ , PS_OpDeclSeen // Seen complete operation declaration
+ , PS_ModuleSeen // Seen a MODULE keyword
+ , PS_ModuleIDSeen // Seen the module ID
+ , PS_ModuleSqSeen // '{' seen for module
+ , PS_ModuleQsSeen // '}' seen for module
+ , PS_ModuleBodySeen // Seen complete module body
+ , PS_InterfaceSeen // Seen an INTERFACE keyword
+ , PS_InterfaceIDSeen // Seen the interface ID
+ , PS_InheritSpecSeen // Seen a complete inheritance spec
+ , PS_ForwardDeclSeen // Forward interface decl seen
+ , PS_InterfaceSqSeen // '{' seen for interface
+ , PS_InterfaceQsSeen // '}' seen for interface
+ , PS_InterfaceBodySeen // Seen an interface body
+ , PS_InheritColonSeen // Seen ':' in inheritance list
+ , PS_SNListCommaSeen // Seen ',' in list of scoped names
+ , PS_ScopedNameSeen // Seen a complete scoped name
+ , PS_SN_IDSeen // Seen an identifier as part of a scoped name
+ , PS_ScopeDelimSeen // Seen a scope delim as party of a scoped name
+ , PS_ConstSeen // Seen a CONST keyword
+ , PS_ConstTypeSeen // Parsed the type of a constant
+ , PS_ConstIDSeen // Seen the constant ID
+ , PS_ConstAssignSeen // Seen the '='
+ , PS_ConstExprSeen // Seen the constant value expression
+ , PS_TypedefSeen // Seen a TYPEDEF keyword
+ , PS_TypeSpecSeen // Seen a complete type specification
+ , PS_DeclaratorsSeen // Seen a complete list of declarators
+ , PS_StructSeen // Seen a STRUCT keyword
+ , PS_StructIDSeen // Seen the struct ID
+ , PS_StructSqSeen // '{' seen for struct
+ , PS_StructQsSeen // '}' seen for struct
+ , PS_StructBodySeen // Seen complete body of struct decl
+ , PS_MemberTypeSeen // Seen type of struct or except member
+ , PS_MemberDeclsSeen // Seen decls of struct or except members
+ , PS_MemberDeclsCompleted // Completed one struct or except member to ';'
+ , PS_UnionSeen // Seen a UNION keyword
+ , PS_UnionIDSeen // Seen the union ID
+ , PS_SwitchSeen // Seen the SWITCH keyword
+ , PS_SwitchOpenParSeen // Seen the switch open par.
+ , PS_SwitchTypeSeen // Seen the switch type spec
+ , PS_SwitchCloseParSeen // Seen the switch close par.
+ , PS_UnionSqSeen // '{' seen for union
+ , PS_UnionQsSeen // '}' seen for union
+ , PS_DefaultSeen // Seen DEFAULT keyword
+ , PS_UnionLabelSeen // Seen label of union element
+ , PS_LabelColonSeen // Seen ':' of union branch label
+ , PS_LabelExprSeen // Seen expression of union branch label
+ , PS_UnionElemSeen // Seen a union element
+ , PS_UnionElemCompleted // Completed one union member up to ';'
+ , PS_CaseSeen // Seen a CASE keyword
+ , PS_UnionElemTypeSeen // Seen type spec for union element
+ , PS_UnionElemDeclSeen // Seen declarator for union element
+ , PS_UnionBodySeen // Seen completed union body
+ , PS_EnumSeen // Seen an ENUM keyword
+ , PS_EnumIDSeen // Seen the enum ID
+ , PS_EnumSqSeen // Seen '{' for enum
+ , PS_EnumQsSeen // Seen '}' for enum
+ , PS_EnumBodySeen // Seen complete enum body
+ , PS_EnumCommaSeen // Seen ',' in list of enumerators
+ , PS_SequenceSeen // Seen a SEQUENCE keyword
+ , PS_SequenceSqSeen // Seen '<' for sequence
+ , PS_SequenceQsSeen // Seen '>' for sequence
+ , PS_SequenceTypeSeen // Seen type decl for sequence
+ , PS_SequenceCommaSeen // Seen comma for sequence
+ , PS_SequenceExprSeen // Seen size expression for sequence
+ , PS_StringSeen // Seen a STRING keyword
+ , PS_StringSqSeen // Seen '<' for string
+ , PS_StringQsSeen // Seen '>' for string
+ , PS_StringExprSeen // Seen size expression for string
+ , PS_StringCompleted // Seen a string decl without size spec
+ , PS_ArrayIDSeen // Seen array ID
+ , PS_ArrayCompleted // Seen completed array declaration
+ , PS_DimSqSeen // Seen '[' for array dimension
+ , PS_DimQsSeen // Seen ']' for array dimension
+ , PS_DimExprSeen // Seen size expression for array dimension
+ , PS_AttrROSeen // Seen READONLY keyword
+ , PS_AttrSeen // Seen ATTRIBUTE keyword
+ , PS_AttrTypeSeen // Seen type decl for attribute
+ , PS_AttrDeclsSeen // Seen declarators for attribute
+ , PS_AttrCompleted // Seen complete attribute declaration
+ , PS_ExceptSeen // Seen EXCEPTION keyword
+ , PS_ExceptIDSeen // Seen exception identifier
+ , PS_ExceptSqSeen // Seen '{' for exception
+ , PS_ExceptQsSeen // Seen '}' for exception
+ , PS_ExceptBodySeen // Seen complete exception body
+ , PS_OpAttrSeen // Seen operation attribute
+ , PS_OpTypeSeen // Seen operation return type
+ , PS_OpIDSeen // Seen operation ID
+ , PS_OpParsCompleted // Completed operation param list
+ , PS_OpRaiseCompleted // Completed operation except list
+ , PS_OpContextCompleted // Completed operation context spec
+ , PS_OpCompleted // Completed operation statement
+ , PS_OpSqSeen // Seen '(' for operation
+ , PS_OpQsSeen // Seen ')' for operation
+ , PS_OpParCommaSeen // Seen ',' in list of op params
+ , PS_OpParDirSeen // Seen parameter direction
+ , PS_OpParTypeSeen // Seen parameter type
+ , PS_OpParDeclSeen // Seen parameter declaration
+ , PS_OpRaiseSeen // Seen RAISES keyword
+ , PS_OpRaiseSqSeen // Seen '(' for RAISES
+ , PS_OpRaiseQsSeen // Seen ')' for RAISES
+ , PS_OpContextSeen // Seen CONTEXT keyword
+ , PS_OpContextSqSeen // Seen '(' for CONTEXT
+ , PS_OpContextQsSeen // Seen ')' for CONTEXT
+ , PS_OpContextCommaSeen // Seen ',' for CONTEXT
+ , PS_DeclsCommaSeen // Seen ',' in declarators list
+ , PS_DeclsDeclSeen // Seen complete decl in decls list
+ };
+
+ // Constructor
+ IDL_GlobalData();
+ virtual ~IDL_GlobalData() {}
+
+ // Operations
+ virtual UTL_ScopeStack *scopes(); // Scopes stack
+ virtual void set_scopes(UTL_ScopeStack *);
+ // Set it
+
+ virtual AST_Root *root(); // Root of AST
+ virtual void set_root(AST_Root *); // Set it
+
+ virtual AST_Generator *gen(); // Generator
+ virtual void set_gen(AST_Generator *);// Set it
+
+ virtual UTL_Error *err(); // Error reporter
+ virtual void set_err(UTL_Error *); // Set it
+
+ virtual long err_count(); // How many errors?
+ virtual void set_err_count(long); // Set it
+
+ virtual long lineno(); // Where in file?
+ virtual void set_lineno(long); // Set it
+
+ virtual String *filename(); // What file?
+ virtual void set_filename(String *); // Set it
+
+ virtual String *main_filename(); // What's the main
+ // file name?
+ virtual void set_main_filename(String *);
+ // Set it
+
+ virtual String *real_filename(); // What's the real
+ // file name?
+ virtual void set_real_filename(String *);
+ // Set it
+
+ virtual String *stripped_filename(); // Stripped filename
+ virtual void set_stripped_filename(String *);
+ // Set it
+
+ virtual idl_bool imported(); // Are we imported?
+ virtual idl_bool import(); // Is import on?
+ virtual void set_import(idl_bool); // Set it
+
+ virtual idl_bool in_main_file(); // Are we?
+ virtual void set_in_main_file(idl_bool); // Set it
+
+ virtual char *prog_name(); // Invoked as..
+ virtual void set_prog_name(char *); // Set it
+
+ virtual char *cpp_location(); // Where's CPP?
+ virtual void set_cpp_location(char *);// Set it
+
+ virtual long compile_flags(); // What flags are on?
+ virtual void set_compile_flags(long);// Turn some on or off
+
+ virtual char *be(); // Get BE to use
+ virtual void set_be(char *); // Set it
+
+ virtual char *local_escapes(); // Get local escapes
+ virtual void set_local_escapes(char *);// Set it
+
+ virtual UTL_Indenter *indent(); // Get indenter
+ virtual void set_indent(UTL_Indenter *);
+ // Set it
+
+ virtual UTL_StrList *pragmas(); // Get pragmas
+ virtual void set_pragmas(UTL_StrList *);// Set it
+
+ virtual idl_bool read_from_stdin(); // Reading from stdin?
+ virtual void set_read_from_stdin(idl_bool); // Set it
+
+ virtual void store_include_file_name(String *);
+
+ virtual String **include_file_names(); // Array of file names
+ virtual void set_include_file_names(String **); // Set it
+
+ virtual unsigned long n_include_file_names(); // How many
+ virtual void set_n_include_file_names(unsigned long n);
+
+ virtual ParseState parse_state(); // What state we're in
+ virtual void set_parse_state(ParseState s); // Set it
+
+ // Convert from a predefined type to an expression type
+ virtual AST_Expression::ExprType
+ PredefinedTypeToExprType(
+ AST_PredefinedType::PredefinedType
+ );
+
+private:
+ // Data
+ UTL_ScopeStack *pd_scopes; // Store scopes stack
+ AST_Root *pd_root; // Store AST root
+ AST_Generator *pd_gen; // Store generator
+ UTL_Error *pd_err; // Error object
+ long pd_err_count; // Count of errors
+ long pd_lineno; // What line #
+ String *pd_filename; // What file
+ String *pd_main_filename; // What main filename
+ String *pd_real_filename; // What real filename
+ String *pd_stripped_filename; // Stripped filename
+ idl_bool pd_import; // Is import on?
+ idl_bool pd_in_main_file; // Are we in it?
+ char *pd_prog_name; // Argv[0]
+ char *pd_cpp_location; // Where to find CPP
+ long pd_compile_flags; // Compile flags
+ char *pd_be; // BE name to use
+ char *pd_local_escapes; // Trapdoor argument
+ UTL_Indenter *pd_indent; // Indent object
+ UTL_StrList *pd_pragmas; // List of pragmas
+ // as its being built
+ idl_bool pd_read_from_stdin; // Reading from stdin?
+ String **pd_include_file_names;// Array of file names
+ unsigned long pd_n_include_file_names;// How many
+ unsigned long pd_n_alloced_file_names;// How many alloced
+
+ ParseState pd_parse_state; // Parse state we're in
+
+ // Operations
+ long seen_include_file_before(String *);
+ // Seen this include
+ // before?
+};
+
+#endif //_IDL_IDL_GLOBAL_HH
diff --git a/TAO/TAO_IDL/include/idl_narrow.h b/TAO/TAO_IDL/include/idl_narrow.h
new file mode 100644
index 00000000000..9b42babae6b
--- /dev/null
+++ b/TAO/TAO_IDL/include/idl_narrow.h
@@ -0,0 +1,264 @@
+/*
+
+COPYRIGHT
+
+Copyright 1992, 1993, 1994 Sun Microsystems, Inc. Printed in the United
+States of America. All Rights Reserved.
+
+This product is protected by copyright and distributed under the following
+license restricting its use.
+
+The Interface Definition Language Compiler Front End (CFE) is made
+available for your use provided that you include this license and copyright
+notice on all media and documentation and the software program in which
+this product is incorporated in whole or part. You may copy and extend
+functionality (but may not remove functionality) of the Interface
+Definition Language CFE without charge, but you are not authorized to
+license or distribute it to anyone else except as part of a product or
+program developed by you or with the express written consent of Sun
+Microsystems, Inc. ("Sun").
+
+The names of Sun Microsystems, Inc. and any of its subsidiaries or
+affiliates may not be used in advertising or publicity pertaining to
+distribution of Interface Definition Language CFE as permitted herein.
+
+This license is effective until terminated by Sun for failure to comply
+with this license. Upon termination, you shall destroy or return all code
+and documentation for the Interface Definition Language CFE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED AS IS WITH NO WARRANTIES OF
+ANY KIND INCLUDING THE WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS
+FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR ARISING FROM A COURSE OF
+DEALING, USAGE OR TRADE PRACTICE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED WITH NO SUPPORT AND WITHOUT
+ANY OBLIGATION ON THE PART OF Sun OR ANY OF ITS SUBSIDIARIES OR AFFILIATES
+TO ASSIST IN ITS USE, CORRECTION, MODIFICATION OR ENHANCEMENT.
+
+SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES SHALL HAVE NO LIABILITY WITH
+RESPECT TO THE INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY
+INTERFACE DEFINITION LANGUAGE CFE OR ANY PART THEREOF.
+
+IN NO EVENT WILL SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES BE LIABLE FOR
+ANY LOST REVENUE OR PROFITS OR OTHER SPECIAL, INDIRECT AND CONSEQUENTIAL
+DAMAGES, EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+Use, duplication, or disclosure by the government is subject to
+restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in
+Technical Data and Computer Software clause at DFARS 252.227-7013 and FAR
+52.227-19.
+
+Sun, Sun Microsystems and the Sun logo are trademarks or registered
+trademarks of Sun Microsystems, Inc.
+
+SunSoft, Inc.
+2550 Garcia Avenue
+Mountain View, California 94043
+
+NOTE:
+
+SunOS, SunSoft, Sun, Solaris, Sun Microsystems or the Sun logo are
+trademarks or registered trademarks of Sun Microsystems, Inc.
+
+ */
+
+#ifndef _IDL_NARROW_IDL_NARROW_HH
+#define _IDL_NARROW_IDL_NARROW_HH
+
+#pragma ident "%@(#)idl_narrow.hh 1.1% %92/06/12% Sun Microsystems"
+
+// idl_narrow.hh
+//
+// Implement IDL narrowing mechanism. Not intended to be read by humans..
+//
+// Logic:
+//
+// The DEF_xxx macros are used in class declarations.
+// The IMPL_xxx macros are used in class implementations.
+//
+// The DEF_xxx macros come in two flavors. The first one, DEF_NARROW_METHODSn,
+// defines the narrowing mechanism. It declares a static class function whose
+// address is used as the class identifier. Then, it declares a narrow op
+// with an implementation suitable for narrowing from exactly 'n' superclasses.
+// The names of the superclass types are given as arguments. The second flavor
+// implements specific narrowing mechanisms from AST_decl and from UTL_scope.
+// These macros are named DEF_NARROW_FROM_DECL and DEF_NARROW_FROM_SCOPE
+// respectively.
+//
+// The IMPL_xxx macros also come in two flavors, corresponding to the two
+// flavors of DEF_xxx macros. The IMPL_NARROW_METHODSn macros implement the
+// narrowing mechanism for classes which must be narrowed from 'n' ancestors.
+// The IMPL_NARROW_FROM_DECL and IMPL_NARROW_FROM_SCOPE macros implement
+// the narrowing mechanisms for narrowing from instances of AST_decl and
+// UTL_scope.
+//
+// IMPL_NARROW_METHODSn where n is 0,1,2 and 3 are provided.
+// DEF_NARROW_METHODSn where n is 0,1,2 and 3 are provided.
+
+extern char *type_id_to_string(long);
+
+#define DEF_NARROW_METHODS0(TYPE)\
+static int type_id(); \
+virtual void *narrow(long type_const)
+
+
+#define IMPL_NARROW_METHODS0(TYPE)\
+int \
+TYPE::type_id()\
+{\
+ return 0;\
+}\
+void * \
+TYPE::narrow(long type_const) {\
+ void *rval = NULL; \
+ if (type_const == (long)&TYPE::type_id) \
+ rval = this; \
+ return rval; \
+}
+
+#define DEF_NARROW_METHODS1(TYPE,PARENT) \
+static int type_id(); \
+virtual void *narrow(long type_const)
+
+
+#define IMPL_NARROW_METHODS1(TYPE,PARENT) \
+int \
+TYPE::type_id() \
+{\
+ return 0;\
+}\
+void * \
+TYPE::narrow(long type_const) {\
+ void *rval = NULL; \
+ if (type_const == (long)&TYPE::type_id) \
+ rval = this; \
+ if (rval == NULL) \
+ rval = PARENT::narrow(type_const);\
+ return rval;\
+}
+
+#define DEF_NARROW_METHODS2(TYPE,PARENT1,PARENT2) \
+static int type_id(); \
+virtual void *narrow(long type_const)
+
+
+#define IMPL_NARROW_METHODS2(TYPE,PARENT1,PARENT2) \
+int \
+TYPE::type_id() \
+{\
+ return 0;\
+}\
+void * \
+TYPE::narrow(long type_const) { \
+ void *rval = NULL; \
+ if (type_const == (long)&TYPE::type_id) \
+ rval = this; \
+ if (rval == NULL) \
+ rval = PARENT1::narrow(type_const);\
+ if (rval == NULL) \
+ rval = PARENT2::narrow(type_const);\
+ return rval;\
+}
+
+#define DEF_NARROW_METHODS3(TYPE,PARENT1,PARENT2,PARENT3) \
+static int type_id(); \
+virtual void *narrow(long type_const)
+
+
+#define IMPL_NARROW_METHODS3(TYPE,PARENT1,PARENT2,PARENT3) \
+int \
+TYPE::type_id() \
+{\
+ return 0;\
+}\
+void * \
+TYPE::narrow(long type_const) {\
+ void *rval = NULL; \
+ if (type_const == (long)&TYPE::type_id) \
+ rval = this; \
+ if (rval == NULL) \
+ rval = PARENT1::narrow(type_const);\
+ if (rval == NULL) \
+ rval = PARENT2::narrow(type_const);\
+ if (rval == NULL) \
+ rval = PARENT3::narrow(type_const);\
+ return rval;\
+}
+
+#define DEF_NARROW_METHODS4(TYPE,PARENT1,PARENT2,PARENT3,PARENT4) \
+static int type_id(); \
+virtual void *narrow(long type_const)
+
+
+#define IMPL_NARROW_METHODS4(TYPE,PARENT1,PARENT2,PARENT3,PARENT4) \
+int \
+TYPE::type_id() \
+{\
+ return 0;\
+}\
+void * \
+TYPE::narrow(long type_const) {\
+ void *rval = NULL; \
+ if (type_const == (long)&TYPE::type_id) \
+ rval = this; \
+ if (rval == NULL) \
+ rval = PARENT1::narrow(type_const);\
+ if (rval == NULL) \
+ rval = PARENT2::narrow(type_const);\
+ if (rval == NULL) \
+ rval = PARENT3::narrow(type_const);\
+ if (rval == NULL) \
+ rval = PARENT4::narrow(type_const);\
+ return rval;\
+}
+
+#define DEF_NARROW_METHODS5(TYPE,PARENT1,PARENT2,PARENT3,PARENT4,PARENT5) \
+static int type_id(); \
+virtual void *narrow(long type_const)
+
+
+#define IMPL_NARROW_METHODS5(TYPE,PARENT1,PARENT2,PARENT3,PARENT4,PARENT5) \
+int \
+TYPE::type_id() \
+{\
+ return 0;\
+}\
+void * \
+TYPE::narrow(long type_const) {\
+ void *rval = NULL; \
+ if (type_const == (long)&TYPE::type_id) \
+ rval = this; \
+ if (rval == NULL) \
+ rval = PARENT1::narrow(type_const);\
+ if (rval == NULL) \
+ rval = PARENT2::narrow(type_const);\
+ if (rval == NULL) \
+ rval = PARENT3::narrow(type_const);\
+ if (rval == NULL) \
+ rval = PARENT4::narrow(type_const);\
+ if (rval == NULL) \
+ rval = PARENT5::narrow(type_const);\
+ return rval;\
+}
+
+#define DEF_NARROW_FROM_DECL(TYPE)\
+static TYPE *narrow_from_decl(AST_Decl *t)
+
+
+#define IMPL_NARROW_FROM_DECL(TYPE)\
+TYPE * \
+TYPE::narrow_from_decl(AST_Decl *t) { \
+ return (TYPE *)t->narrow((long)&TYPE::type_id);\
+}
+
+#define DEF_NARROW_FROM_SCOPE(TYPE)\
+static TYPE *narrow_from_scope(UTL_Scope *t)
+
+
+#define IMPL_NARROW_FROM_SCOPE(TYPE)\
+TYPE * \
+TYPE::narrow_from_scope(UTL_Scope *t) { \
+ return (TYPE *)t->narrow((long)&TYPE::type_id);\
+}
+
+#endif // _IDL_NARROW_IDL_NARROW_HH
diff --git a/TAO/TAO_IDL/include/intlmacros.h b/TAO/TAO_IDL/include/intlmacros.h
new file mode 100644
index 00000000000..93221da3018
--- /dev/null
+++ b/TAO/TAO_IDL/include/intlmacros.h
@@ -0,0 +1,87 @@
+/*
+
+COPYRIGHT
+
+Copyright 1992, 1993, 1994 Sun Microsystems, Inc. Printed in the United
+States of America. All Rights Reserved.
+
+This product is protected by copyright and distributed under the following
+license restricting its use.
+
+The Interface Definition Language Compiler Front End (CFE) is made
+available for your use provided that you include this license and copyright
+notice on all media and documentation and the software program in which
+this product is incorporated in whole or part. You may copy and extend
+functionality (but may not remove functionality) of the Interface
+Definition Language CFE without charge, but you are not authorized to
+license or distribute it to anyone else except as part of a product or
+program developed by you or with the express written consent of Sun
+Microsystems, Inc. ("Sun").
+
+The names of Sun Microsystems, Inc. and any of its subsidiaries or
+affiliates may not be used in advertising or publicity pertaining to
+distribution of Interface Definition Language CFE as permitted herein.
+
+This license is effective until terminated by Sun for failure to comply
+with this license. Upon termination, you shall destroy or return all code
+and documentation for the Interface Definition Language CFE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED AS IS WITH NO WARRANTIES OF
+ANY KIND INCLUDING THE WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS
+FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR ARISING FROM A COURSE OF
+DEALING, USAGE OR TRADE PRACTICE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED WITH NO SUPPORT AND WITHOUT
+ANY OBLIGATION ON THE PART OF Sun OR ANY OF ITS SUBSIDIARIES OR AFFILIATES
+TO ASSIST IN ITS USE, CORRECTION, MODIFICATION OR ENHANCEMENT.
+
+SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES SHALL HAVE NO LIABILITY WITH
+RESPECT TO THE INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY
+INTERFACE DEFINITION LANGUAGE CFE OR ANY PART THEREOF.
+
+IN NO EVENT WILL SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES BE LIABLE FOR
+ANY LOST REVENUE OR PROFITS OR OTHER SPECIAL, INDIRECT AND CONSEQUENTIAL
+DAMAGES, EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+Use, duplication, or disclosure by the government is subject to
+restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in
+Technical Data and Computer Software clause at DFARS 252.227-7013 and FAR
+52.227-19.
+
+Sun, Sun Microsystems and the Sun logo are trademarks or registered
+trademarks of Sun Microsystems, Inc.
+
+SunSoft, Inc.
+2550 Garcia Avenue
+Mountain View, California 94043
+
+NOTE:
+
+SunOS, SunSoft, Sun, Solaris, Sun Microsystems or the Sun logo are
+trademarks or registered trademarks of Sun Microsystems, Inc.
+
+ */
+
+#ifndef _IDL_INTLMACROS_HH
+#define _IDL_INTLMACROS_HH
+
+#pragma ident "%@(#)intlmacros.hh 1.18% %92/06/10% Sun Microsystems"
+
+// intlmacros.hh
+//
+// Define macros which conditionalize string internationalization
+
+#ifndef DOMF_TEXT_DEVEL_DOMAIN
+#define DOMF_TEXT_DEVEL_DOMAIN "SUNW_DOE_DOMF_DEVEL"
+#endif // DOMF_TEXT_DEVEL_DOMAIN
+
+#define GTDEVEL(s) s
+
+#if defined(__STDC__)
+#define CONV(p) #p
+#define MKSTR(p) CONV(p)
+#else
+#define MKSTR(p) "p"
+#endif
+
+#endif // _IDL_INTLMACROS_HH
diff --git a/TAO/TAO_IDL/include/nr_extern.h b/TAO/TAO_IDL/include/nr_extern.h
new file mode 100644
index 00000000000..6b0eda1ffd4
--- /dev/null
+++ b/TAO/TAO_IDL/include/nr_extern.h
@@ -0,0 +1,76 @@
+/*
+
+COPYRIGHT
+
+Copyright 1992, 1993, 1994 Sun Microsystems, Inc. Printed in the United
+States of America. All Rights Reserved.
+
+This product is protected by copyright and distributed under the following
+license restricting its use.
+
+The Interface Definition Language Compiler Front End (CFE) is made
+available for your use provided that you include this license and copyright
+notice on all media and documentation and the software program in which
+this product is incorporated in whole or part. You may copy and extend
+functionality (but may not remove functionality) of the Interface
+Definition Language CFE without charge, but you are not authorized to
+license or distribute it to anyone else except as part of a product or
+program developed by you or with the express written consent of Sun
+Microsystems, Inc. ("Sun").
+
+The names of Sun Microsystems, Inc. and any of its subsidiaries or
+affiliates may not be used in advertising or publicity pertaining to
+distribution of Interface Definition Language CFE as permitted herein.
+
+This license is effective until terminated by Sun for failure to comply
+with this license. Upon termination, you shall destroy or return all code
+and documentation for the Interface Definition Language CFE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED AS IS WITH NO WARRANTIES OF
+ANY KIND INCLUDING THE WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS
+FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR ARISING FROM A COURSE OF
+DEALING, USAGE OR TRADE PRACTICE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED WITH NO SUPPORT AND WITHOUT
+ANY OBLIGATION ON THE PART OF Sun OR ANY OF ITS SUBSIDIARIES OR AFFILIATES
+TO ASSIST IN ITS USE, CORRECTION, MODIFICATION OR ENHANCEMENT.
+
+SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES SHALL HAVE NO LIABILITY WITH
+RESPECT TO THE INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY
+INTERFACE DEFINITION LANGUAGE CFE OR ANY PART THEREOF.
+
+IN NO EVENT WILL SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES BE LIABLE FOR
+ANY LOST REVENUE OR PROFITS OR OTHER SPECIAL, INDIRECT AND CONSEQUENTIAL
+DAMAGES, EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+Use, duplication, or disclosure by the government is subject to
+restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in
+Technical Data and Computer Software clause at DFARS 252.227-7013 and FAR
+52.227-19.
+
+Sun, Sun Microsystems and the Sun logo are trademarks or registered
+trademarks of Sun Microsystems, Inc.
+
+SunSoft, Inc.
+2550 Garcia Avenue
+Mountain View, California 94043
+
+NOTE:
+
+SunOS, SunSoft, Sun, Solaris, Sun Microsystems or the Sun logo are
+trademarks or registered trademarks of Sun Microsystems, Inc.
+
+ */
+
+#ifndef _NR_EXTERN_NR_EXTERN_HH
+#define _NR_EXTERN_NR_EXTERN_HH
+
+#pragma ident "%@(#)nr_extern.hh 1.1% %92/06/15% Sun Microsystems"
+
+// nr_extern.hh - Defines entry points provided by narrowing
+
+// Convert between an UTL_Scope and an AST_Decl
+extern AST_Decl *ScopeAsDecl(UTL_Scope *s);
+extern UTL_Scope *DeclAsScope(AST_Decl *d);
+
+#endif // _NR_EXTERN_NR_EXTERN_HH
diff --git a/TAO/TAO_IDL/include/util.h b/TAO/TAO_IDL/include/util.h
new file mode 100644
index 00000000000..a6e27bef1a6
--- /dev/null
+++ b/TAO/TAO_IDL/include/util.h
@@ -0,0 +1,87 @@
+/*
+
+COPYRIGHT
+
+Copyright 1992, 1993, 1994 Sun Microsystems, Inc. Printed in the United
+States of America. All Rights Reserved.
+
+This product is protected by copyright and distributed under the following
+license restricting its use.
+
+The Interface Definition Language Compiler Front End (CFE) is made
+available for your use provided that you include this license and copyright
+notice on all media and documentation and the software program in which
+this product is incorporated in whole or part. You may copy and extend
+functionality (but may not remove functionality) of the Interface
+Definition Language CFE without charge, but you are not authorized to
+license or distribute it to anyone else except as part of a product or
+program developed by you or with the express written consent of Sun
+Microsystems, Inc. ("Sun").
+
+The names of Sun Microsystems, Inc. and any of its subsidiaries or
+affiliates may not be used in advertising or publicity pertaining to
+distribution of Interface Definition Language CFE as permitted herein.
+
+This license is effective until terminated by Sun for failure to comply
+with this license. Upon termination, you shall destroy or return all code
+and documentation for the Interface Definition Language CFE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED AS IS WITH NO WARRANTIES OF
+ANY KIND INCLUDING THE WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS
+FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR ARISING FROM A COURSE OF
+DEALING, USAGE OR TRADE PRACTICE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED WITH NO SUPPORT AND WITHOUT
+ANY OBLIGATION ON THE PART OF Sun OR ANY OF ITS SUBSIDIARIES OR AFFILIATES
+TO ASSIST IN ITS USE, CORRECTION, MODIFICATION OR ENHANCEMENT.
+
+SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES SHALL HAVE NO LIABILITY WITH
+RESPECT TO THE INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY
+INTERFACE DEFINITION LANGUAGE CFE OR ANY PART THEREOF.
+
+IN NO EVENT WILL SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES BE LIABLE FOR
+ANY LOST REVENUE OR PROFITS OR OTHER SPECIAL, INDIRECT AND CONSEQUENTIAL
+DAMAGES, EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+Use, duplication, or disclosure by the government is subject to
+restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in
+Technical Data and Computer Software clause at DFARS 252.227-7013 and FAR
+52.227-19.
+
+Sun, Sun Microsystems and the Sun logo are trademarks or registered
+trademarks of Sun Microsystems, Inc.
+
+SunSoft, Inc.
+2550 Garcia Avenue
+Mountain View, California 94043
+
+NOTE:
+
+SunOS, SunSoft, Sun, Solaris, Sun Microsystems or the Sun logo are
+trademarks or registered trademarks of Sun Microsystems, Inc.
+
+ */
+
+#ifndef _UTIL_UTIL_HH
+#define _UTIL_UTIL_HH
+
+#pragma ident "%@(#)util.hh 1.20% %92/06/10% Sun Microsystems"
+
+// util.hh - Includes commonly used things defined in the util directory
+
+#include "utl_stack.h" // class fe_stack
+#include "utl_exprlist.h" // class UTL_ExprList
+#include "utl_strlist.h" // class UTL_StrList
+#include "utl_idlist.h" // class UTL_IdList
+#include "utl_exceptlist.h" // class UTL_ExceptList
+#include "utl_namelist.h" // class UTL_NameList
+#include "utl_labellist.h" // class UTL_LabelList
+#include "utl_decllist.h" // class UTL_DeclList
+
+#include "idl_global.h" // Class IDL_GlobalData
+
+#include "utl_error.h" // class UTL_Error
+
+#include "utl_indenter.h" // class UTL_Indenter
+
+#endif // _UTIL_UTIL_HH
diff --git a/TAO/TAO_IDL/include/utl_decllist.h b/TAO/TAO_IDL/include/utl_decllist.h
new file mode 100644
index 00000000000..728047a9090
--- /dev/null
+++ b/TAO/TAO_IDL/include/utl_decllist.h
@@ -0,0 +1,121 @@
+/*
+
+COPYRIGHT
+
+Copyright 1992, 1993, 1994 Sun Microsystems, Inc. Printed in the United
+States of America. All Rights Reserved.
+
+This product is protected by copyright and distributed under the following
+license restricting its use.
+
+The Interface Definition Language Compiler Front End (CFE) is made
+available for your use provided that you include this license and copyright
+notice on all media and documentation and the software program in which
+this product is incorporated in whole or part. You may copy and extend
+functionality (but may not remove functionality) of the Interface
+Definition Language CFE without charge, but you are not authorized to
+license or distribute it to anyone else except as part of a product or
+program developed by you or with the express written consent of Sun
+Microsystems, Inc. ("Sun").
+
+The names of Sun Microsystems, Inc. and any of its subsidiaries or
+affiliates may not be used in advertising or publicity pertaining to
+distribution of Interface Definition Language CFE as permitted herein.
+
+This license is effective until terminated by Sun for failure to comply
+with this license. Upon termination, you shall destroy or return all code
+and documentation for the Interface Definition Language CFE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED AS IS WITH NO WARRANTIES OF
+ANY KIND INCLUDING THE WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS
+FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR ARISING FROM A COURSE OF
+DEALING, USAGE OR TRADE PRACTICE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED WITH NO SUPPORT AND WITHOUT
+ANY OBLIGATION ON THE PART OF Sun OR ANY OF ITS SUBSIDIARIES OR AFFILIATES
+TO ASSIST IN ITS USE, CORRECTION, MODIFICATION OR ENHANCEMENT.
+
+SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES SHALL HAVE NO LIABILITY WITH
+RESPECT TO THE INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY
+INTERFACE DEFINITION LANGUAGE CFE OR ANY PART THEREOF.
+
+IN NO EVENT WILL SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES BE LIABLE FOR
+ANY LOST REVENUE OR PROFITS OR OTHER SPECIAL, INDIRECT AND CONSEQUENTIAL
+DAMAGES, EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+Use, duplication, or disclosure by the government is subject to
+restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in
+Technical Data and Computer Software clause at DFARS 252.227-7013 and FAR
+52.227-19.
+
+Sun, Sun Microsystems and the Sun logo are trademarks or registered
+trademarks of Sun Microsystems, Inc.
+
+SunSoft, Inc.
+2550 Garcia Avenue
+Mountain View, California 94043
+
+NOTE:
+
+SunOS, SunSoft, Sun, Solaris, Sun Microsystems or the Sun logo are
+trademarks or registered trademarks of Sun Microsystems, Inc.
+
+ */
+
+#ifndef _UTL_DECLLIST_UTL_DECLLIST_HH
+#define _UTL_DECLLIST_UTL_DECLLIST_HH
+
+#pragma ident "%@(#)utl_decllist.hh 1.27% %92/06/10% Sun Microsystems"
+
+// utl_decllist.hh
+//
+// List of FE_Declarator nodes
+
+// NOTE: This list class only works correctly because we use single public
+// inheritance, as opposed to multiple inheritance or public virtual.
+// It relies on a type-unsafe cast from UTL_List to subclasses, which
+// will cease to operate correctly if you use either multiple or
+// public virtual inheritance.
+//
+// For portability reasons we have decided to provide both this and
+// an implementation of the list classes in terms of templates. If
+// your compiler supports templates, please use the files in the
+// include/utl_tmpl and util/utl_tmpl directories instead of the
+// files by the same names in the include and util directories.
+
+/*
+** DEPENDENCIES: utl_list.hh, fe_declarator.hh
+**
+** USE: Included from util.hh
+*/
+
+class UTL_DeclList : public UTL_List
+{
+public:
+ // Operations
+
+ // Constructor(s)
+ UTL_DeclList(FE_Declarator *s, UTL_DeclList *cdr);
+
+ // Get element
+ FE_Declarator *head();
+
+private:
+ // Data
+ FE_Declarator *pd_car_data; // The element this list stores
+};
+
+// Active iterator fooor UTL_DeclList
+class UTL_DecllistActiveIterator : public UTL_ListActiveIterator
+{
+public:
+ // Operations
+
+ // Constructor(s)
+ UTL_DecllistActiveIterator(UTL_DeclList *s);
+
+ // Get current item
+ FE_Declarator *item();
+};
+
+#endif // _UTL_DECLLIST_UTL_DECLLIST_HH
diff --git a/TAO/TAO_IDL/include/utl_err.h b/TAO/TAO_IDL/include/utl_err.h
new file mode 100644
index 00000000000..b6bf1f9cc15
--- /dev/null
+++ b/TAO/TAO_IDL/include/utl_err.h
@@ -0,0 +1,183 @@
+/*
+
+COPYRIGHT
+
+Copyright 1992, 1993, 1994 Sun Microsystems, Inc. Printed in the United
+States of America. All Rights Reserved.
+
+This product is protected by copyright and distributed under the following
+license restricting its use.
+
+The Interface Definition Language Compiler Front End (CFE) is made
+available for your use provided that you include this license and copyright
+notice on all media and documentation and the software program in which
+this product is incorporated in whole or part. You may copy and extend
+functionality (but may not remove functionality) of the Interface
+Definition Language CFE without charge, but you are not authorized to
+license or distribute it to anyone else except as part of a product or
+program developed by you or with the express written consent of Sun
+Microsystems, Inc. ("Sun").
+
+The names of Sun Microsystems, Inc. and any of its subsidiaries or
+affiliates may not be used in advertising or publicity pertaining to
+distribution of Interface Definition Language CFE as permitted herein.
+
+This license is effective until terminated by Sun for failure to comply
+with this license. Upon termination, you shall destroy or return all code
+and documentation for the Interface Definition Language CFE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED AS IS WITH NO WARRANTIES OF
+ANY KIND INCLUDING THE WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS
+FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR ARISING FROM A COURSE OF
+DEALING, USAGE OR TRADE PRACTICE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED WITH NO SUPPORT AND WITHOUT
+ANY OBLIGATION ON THE PART OF Sun OR ANY OF ITS SUBSIDIARIES OR AFFILIATES
+TO ASSIST IN ITS USE, CORRECTION, MODIFICATION OR ENHANCEMENT.
+
+SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES SHALL HAVE NO LIABILITY WITH
+RESPECT TO THE INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY
+INTERFACE DEFINITION LANGUAGE CFE OR ANY PART THEREOF.
+
+IN NO EVENT WILL SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES BE LIABLE FOR
+ANY LOST REVENUE OR PROFITS OR OTHER SPECIAL, INDIRECT AND CONSEQUENTIAL
+DAMAGES, EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+Use, duplication, or disclosure by the government is subject to
+restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in
+Technical Data and Computer Software clause at DFARS 252.227-7013 and FAR
+52.227-19.
+
+Sun, Sun Microsystems and the Sun logo are trademarks or registered
+trademarks of Sun Microsystems, Inc.
+
+SunSoft, Inc.
+2550 Garcia Avenue
+Mountain View, California 94043
+
+NOTE:
+
+SunOS, SunSoft, Sun, Solaris, Sun Microsystems or the Sun logo are
+trademarks or registered trademarks of Sun Microsystems, Inc.
+
+ */
+
+#ifndef _UTL_ERROR_UTL_ERROR_HH
+#define _UTL_ERROR_UTL_ERROR_HH
+
+#pragma ident "%@(#)utl_error.hh 1.41% %92/06/10% Sun Microsystems"
+
+// utl_error.hh
+//
+// Defines error codes and error handling class for UTL
+// This will change as a result of internationalization
+
+/*
+** DEPENDENCIES: ast.hh
+**
+** USE: Included from util.hh
+*/
+
+class UTL_Error
+{
+public:
+ enum ErrorCode {
+ EIDL_SYNTAX_ERROR, // Syntax error in IDL input
+ // More details will be gleaned from examining
+ // idl_global->parse_state()
+ EIDL_REDEF, // Redefinition
+ EIDL_REDEF_SCOPE, // Redefinition inside defining scope
+ EIDL_DEF_USE, // Definition after use
+ EIDL_MULTIPLE_BRANCH, // More than one union branch with this
+ // label
+ EIDL_COERCION_FAILURE, // Coercion failure
+ EIDL_SCOPE_CONFLICT, // Between fwd declare and full declare
+ EIDL_ONEWAY_CONFLICT, // Between op decl and argument direction
+ EIDL_DISC_TYPE, // Illegal discriminator type in union
+ EIDL_LABEL_TYPE, // Mismatch with discriminator type in union
+ EIDL_ILLEGAL_ADD, // Illegal add action
+ EIDL_ILLEGAL_USE, // Illegal type used in expression
+ EIDL_ILLEGAL_RAISES, // Error in "raises" clause
+ EIDL_ILLEGAL_CONTEXT, // Error in "context" clause
+ EIDL_CANT_INHERIT, // Cannot inherit from non-interface
+ EIDL_LOOKUP_ERROR, // Identifier not found
+ EIDL_INHERIT_FWD_ERROR, // Cannot inherit from fwd decl interface
+ EIDL_CONSTANT_EXPECTED, // We got something else..
+ EIDL_NAME_CASE_ERROR, // Spelling differences found
+ EIDL_ENUM_VAL_EXPECTED, // Expected an enumerator
+ EIDL_ENUM_VAL_NOT_FOUND, // Didnt find an enumerator with that name
+ EIDL_EVAL_ERROR, // Error in evaluating expression
+ EIDL_AMBIGUOUS, // Ambiguous name definition
+ EIDL_DECL_NOT_DEFINED, // Forward declared but never defined
+ EIDL_FWD_DECL_LOOKUP, // Tried to lookup in fwd declared intf
+ EIDL_RECURSIVE_TYPE, // Illegal recursive use of type
+ EIDL_NONVOID_ONEWAY, // Non-void return type in oneway operation
+ EIDL_NOT_A_TYPE, // Not a type
+ EIDL_BACK_END, // Back end error
+ EIDL_OK // No error
+ };
+
+ // Operations
+
+ // Report errors with varying numbers of arguments
+ void error0(ErrorCode e);
+ void error1(ErrorCode e, AST_Decl *t);
+ void error2(ErrorCode e, AST_Decl *t1, AST_Decl *t2);
+ void error3(ErrorCode e, AST_Decl *t1, AST_Decl *t2, AST_Decl *t3);
+
+ // Report a syntax error in IDL input
+ void syntax_error(IDL_GlobalData::ParseState ps);
+
+ // Report a name being used with different spellings
+ void name_case_error(char *n, char *t);
+
+ // Report an unsuccesful coercion attempt
+ void coercion_error(AST_Expression *v, AST_Expression::ExprType t);
+
+ // Report a failed name lookup attempt
+ void lookup_error(UTL_ScopedName *n);
+
+ // Report an attempt to use a forward declared interface which
+ // hasn't been defined yet in an inheritance spec
+ void inheritance_fwd_error(UTL_ScopedName *n, AST_Interface *f);
+
+ // Report an attempt to inherit from something other than an interface
+ void inheritance_error(UTL_ScopedName *n, AST_Decl *d);
+
+ // Report an error while evaluating an expression (division by zero, etc.)
+ void eval_error(AST_Expression *d);
+
+ // Report a situation where a constant was expected but we got
+ // something else instead. This most likely is a case where a union
+ // label did not evaluate to a constant
+ void constant_expected(UTL_ScopedName *n, AST_Decl *d);
+
+ // Report a situation where an enumerator was expected but we got
+ // something else instead. This occurs when a union with an enum
+ // discriminator is being parsed and one of the branch labels is
+ // not an enumerator in that enum
+ void enum_val_expected(AST_Union *t, AST_UnionLabel *l);
+
+ // Report a failed enumerator lookup in an enum
+ void enum_val_lookup_failure(AST_Union *t, AST_Enum *e, UTL_ScopedName *n);
+
+ // Report an ambiguous name definition
+ void ambiguous(UTL_Scope *s, AST_Decl *l, AST_Decl *d);
+
+ // Report a forward declared interface which was never defined
+ void fwd_decl_not_defined(AST_Interface *d);
+
+ // Report attempt to lookup in forward declared interface
+ void fwd_decl_lookup(AST_Interface *d, UTL_ScopedName *n);
+
+ // Report a redefinition in scope
+ void redefinition_in_scope(AST_Decl *t, AST_Decl *s);
+
+ // Report not a type error
+ void not_a_type(AST_Decl *d);
+
+ // Report back-end error
+ void back_end(long lineno, String *s);
+};
+
+#endif // _UTL_ERROR_UTL_ERROR_HH
diff --git a/TAO/TAO_IDL/include/utl_error.h b/TAO/TAO_IDL/include/utl_error.h
new file mode 100644
index 00000000000..b6bf1f9cc15
--- /dev/null
+++ b/TAO/TAO_IDL/include/utl_error.h
@@ -0,0 +1,183 @@
+/*
+
+COPYRIGHT
+
+Copyright 1992, 1993, 1994 Sun Microsystems, Inc. Printed in the United
+States of America. All Rights Reserved.
+
+This product is protected by copyright and distributed under the following
+license restricting its use.
+
+The Interface Definition Language Compiler Front End (CFE) is made
+available for your use provided that you include this license and copyright
+notice on all media and documentation and the software program in which
+this product is incorporated in whole or part. You may copy and extend
+functionality (but may not remove functionality) of the Interface
+Definition Language CFE without charge, but you are not authorized to
+license or distribute it to anyone else except as part of a product or
+program developed by you or with the express written consent of Sun
+Microsystems, Inc. ("Sun").
+
+The names of Sun Microsystems, Inc. and any of its subsidiaries or
+affiliates may not be used in advertising or publicity pertaining to
+distribution of Interface Definition Language CFE as permitted herein.
+
+This license is effective until terminated by Sun for failure to comply
+with this license. Upon termination, you shall destroy or return all code
+and documentation for the Interface Definition Language CFE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED AS IS WITH NO WARRANTIES OF
+ANY KIND INCLUDING THE WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS
+FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR ARISING FROM A COURSE OF
+DEALING, USAGE OR TRADE PRACTICE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED WITH NO SUPPORT AND WITHOUT
+ANY OBLIGATION ON THE PART OF Sun OR ANY OF ITS SUBSIDIARIES OR AFFILIATES
+TO ASSIST IN ITS USE, CORRECTION, MODIFICATION OR ENHANCEMENT.
+
+SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES SHALL HAVE NO LIABILITY WITH
+RESPECT TO THE INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY
+INTERFACE DEFINITION LANGUAGE CFE OR ANY PART THEREOF.
+
+IN NO EVENT WILL SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES BE LIABLE FOR
+ANY LOST REVENUE OR PROFITS OR OTHER SPECIAL, INDIRECT AND CONSEQUENTIAL
+DAMAGES, EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+Use, duplication, or disclosure by the government is subject to
+restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in
+Technical Data and Computer Software clause at DFARS 252.227-7013 and FAR
+52.227-19.
+
+Sun, Sun Microsystems and the Sun logo are trademarks or registered
+trademarks of Sun Microsystems, Inc.
+
+SunSoft, Inc.
+2550 Garcia Avenue
+Mountain View, California 94043
+
+NOTE:
+
+SunOS, SunSoft, Sun, Solaris, Sun Microsystems or the Sun logo are
+trademarks or registered trademarks of Sun Microsystems, Inc.
+
+ */
+
+#ifndef _UTL_ERROR_UTL_ERROR_HH
+#define _UTL_ERROR_UTL_ERROR_HH
+
+#pragma ident "%@(#)utl_error.hh 1.41% %92/06/10% Sun Microsystems"
+
+// utl_error.hh
+//
+// Defines error codes and error handling class for UTL
+// This will change as a result of internationalization
+
+/*
+** DEPENDENCIES: ast.hh
+**
+** USE: Included from util.hh
+*/
+
+class UTL_Error
+{
+public:
+ enum ErrorCode {
+ EIDL_SYNTAX_ERROR, // Syntax error in IDL input
+ // More details will be gleaned from examining
+ // idl_global->parse_state()
+ EIDL_REDEF, // Redefinition
+ EIDL_REDEF_SCOPE, // Redefinition inside defining scope
+ EIDL_DEF_USE, // Definition after use
+ EIDL_MULTIPLE_BRANCH, // More than one union branch with this
+ // label
+ EIDL_COERCION_FAILURE, // Coercion failure
+ EIDL_SCOPE_CONFLICT, // Between fwd declare and full declare
+ EIDL_ONEWAY_CONFLICT, // Between op decl and argument direction
+ EIDL_DISC_TYPE, // Illegal discriminator type in union
+ EIDL_LABEL_TYPE, // Mismatch with discriminator type in union
+ EIDL_ILLEGAL_ADD, // Illegal add action
+ EIDL_ILLEGAL_USE, // Illegal type used in expression
+ EIDL_ILLEGAL_RAISES, // Error in "raises" clause
+ EIDL_ILLEGAL_CONTEXT, // Error in "context" clause
+ EIDL_CANT_INHERIT, // Cannot inherit from non-interface
+ EIDL_LOOKUP_ERROR, // Identifier not found
+ EIDL_INHERIT_FWD_ERROR, // Cannot inherit from fwd decl interface
+ EIDL_CONSTANT_EXPECTED, // We got something else..
+ EIDL_NAME_CASE_ERROR, // Spelling differences found
+ EIDL_ENUM_VAL_EXPECTED, // Expected an enumerator
+ EIDL_ENUM_VAL_NOT_FOUND, // Didnt find an enumerator with that name
+ EIDL_EVAL_ERROR, // Error in evaluating expression
+ EIDL_AMBIGUOUS, // Ambiguous name definition
+ EIDL_DECL_NOT_DEFINED, // Forward declared but never defined
+ EIDL_FWD_DECL_LOOKUP, // Tried to lookup in fwd declared intf
+ EIDL_RECURSIVE_TYPE, // Illegal recursive use of type
+ EIDL_NONVOID_ONEWAY, // Non-void return type in oneway operation
+ EIDL_NOT_A_TYPE, // Not a type
+ EIDL_BACK_END, // Back end error
+ EIDL_OK // No error
+ };
+
+ // Operations
+
+ // Report errors with varying numbers of arguments
+ void error0(ErrorCode e);
+ void error1(ErrorCode e, AST_Decl *t);
+ void error2(ErrorCode e, AST_Decl *t1, AST_Decl *t2);
+ void error3(ErrorCode e, AST_Decl *t1, AST_Decl *t2, AST_Decl *t3);
+
+ // Report a syntax error in IDL input
+ void syntax_error(IDL_GlobalData::ParseState ps);
+
+ // Report a name being used with different spellings
+ void name_case_error(char *n, char *t);
+
+ // Report an unsuccesful coercion attempt
+ void coercion_error(AST_Expression *v, AST_Expression::ExprType t);
+
+ // Report a failed name lookup attempt
+ void lookup_error(UTL_ScopedName *n);
+
+ // Report an attempt to use a forward declared interface which
+ // hasn't been defined yet in an inheritance spec
+ void inheritance_fwd_error(UTL_ScopedName *n, AST_Interface *f);
+
+ // Report an attempt to inherit from something other than an interface
+ void inheritance_error(UTL_ScopedName *n, AST_Decl *d);
+
+ // Report an error while evaluating an expression (division by zero, etc.)
+ void eval_error(AST_Expression *d);
+
+ // Report a situation where a constant was expected but we got
+ // something else instead. This most likely is a case where a union
+ // label did not evaluate to a constant
+ void constant_expected(UTL_ScopedName *n, AST_Decl *d);
+
+ // Report a situation where an enumerator was expected but we got
+ // something else instead. This occurs when a union with an enum
+ // discriminator is being parsed and one of the branch labels is
+ // not an enumerator in that enum
+ void enum_val_expected(AST_Union *t, AST_UnionLabel *l);
+
+ // Report a failed enumerator lookup in an enum
+ void enum_val_lookup_failure(AST_Union *t, AST_Enum *e, UTL_ScopedName *n);
+
+ // Report an ambiguous name definition
+ void ambiguous(UTL_Scope *s, AST_Decl *l, AST_Decl *d);
+
+ // Report a forward declared interface which was never defined
+ void fwd_decl_not_defined(AST_Interface *d);
+
+ // Report attempt to lookup in forward declared interface
+ void fwd_decl_lookup(AST_Interface *d, UTL_ScopedName *n);
+
+ // Report a redefinition in scope
+ void redefinition_in_scope(AST_Decl *t, AST_Decl *s);
+
+ // Report not a type error
+ void not_a_type(AST_Decl *d);
+
+ // Report back-end error
+ void back_end(long lineno, String *s);
+};
+
+#endif // _UTL_ERROR_UTL_ERROR_HH
diff --git a/TAO/TAO_IDL/include/utl_exceptlist.h b/TAO/TAO_IDL/include/utl_exceptlist.h
new file mode 100644
index 00000000000..2901bc09e42
--- /dev/null
+++ b/TAO/TAO_IDL/include/utl_exceptlist.h
@@ -0,0 +1,121 @@
+/*
+
+COPYRIGHT
+
+Copyright 1992, 1993, 1994 Sun Microsystems, Inc. Printed in the United
+States of America. All Rights Reserved.
+
+This product is protected by copyright and distributed under the following
+license restricting its use.
+
+The Interface Definition Language Compiler Front End (CFE) is made
+available for your use provided that you include this license and copyright
+notice on all media and documentation and the software program in which
+this product is incorporated in whole or part. You may copy and extend
+functionality (but may not remove functionality) of the Interface
+Definition Language CFE without charge, but you are not authorized to
+license or distribute it to anyone else except as part of a product or
+program developed by you or with the express written consent of Sun
+Microsystems, Inc. ("Sun").
+
+The names of Sun Microsystems, Inc. and any of its subsidiaries or
+affiliates may not be used in advertising or publicity pertaining to
+distribution of Interface Definition Language CFE as permitted herein.
+
+This license is effective until terminated by Sun for failure to comply
+with this license. Upon termination, you shall destroy or return all code
+and documentation for the Interface Definition Language CFE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED AS IS WITH NO WARRANTIES OF
+ANY KIND INCLUDING THE WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS
+FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR ARISING FROM A COURSE OF
+DEALING, USAGE OR TRADE PRACTICE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED WITH NO SUPPORT AND WITHOUT
+ANY OBLIGATION ON THE PART OF Sun OR ANY OF ITS SUBSIDIARIES OR AFFILIATES
+TO ASSIST IN ITS USE, CORRECTION, MODIFICATION OR ENHANCEMENT.
+
+SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES SHALL HAVE NO LIABILITY WITH
+RESPECT TO THE INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY
+INTERFACE DEFINITION LANGUAGE CFE OR ANY PART THEREOF.
+
+IN NO EVENT WILL SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES BE LIABLE FOR
+ANY LOST REVENUE OR PROFITS OR OTHER SPECIAL, INDIRECT AND CONSEQUENTIAL
+DAMAGES, EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+Use, duplication, or disclosure by the government is subject to
+restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in
+Technical Data and Computer Software clause at DFARS 252.227-7013 and FAR
+52.227-19.
+
+Sun, Sun Microsystems and the Sun logo are trademarks or registered
+trademarks of Sun Microsystems, Inc.
+
+SunSoft, Inc.
+2550 Garcia Avenue
+Mountain View, California 94043
+
+NOTE:
+
+SunOS, SunSoft, Sun, Solaris, Sun Microsystems or the Sun logo are
+trademarks or registered trademarks of Sun Microsystems, Inc.
+
+ */
+
+#ifndef _UTL_EXCEPTLIST_UTL_EXCEPTLIST_HH
+#define _UTL_EXCEPTLIST_UTL_EXCEPTLIST_HH
+
+#pragma ident "%@(#)utl_exceptlist.hh 1.33% %92/06/10% Sun Microsystems"
+
+// utl_exceptlist.hh
+//
+// List of AST_Exception nodes
+
+// NOTE: This list class only works correctly because we use single public
+// inheritance, as opposed to multiple inheritance or public virtual.
+// It relies on a type-unsafe cast from UTL_List to subclasses, which
+// will cease to operate correctly if you use either multiple or
+// public virtual inheritance.
+//
+// For portability reasons we have decided to provide both this and
+// an implementation of the list classes in terms of templates. If
+// your compiler supports templates, please use the files in the
+// include/utl_tmpl and util/utl_tmpl directories instead of the
+// files by the same names in the include and util directories.
+
+/*
+** DEPENDENCIES: utl_list.hh, ast_exception.hh
+**
+** USE: Included from util.hh
+*/
+
+class UTL_ExceptList : public UTL_List
+{
+public:
+ // Operations
+
+ // Constructor(s)
+ UTL_ExceptList(AST_Exception *s, UTL_ExceptList *cdr);
+
+ // Get list item
+ AST_Exception *head();
+
+private:
+ // Data
+ AST_Exception *pd_car_data; // Item of this list
+};
+
+// Active iterator for UTL_ExceptList
+class UTL_ExceptlistActiveIterator : public UTL_ListActiveIterator
+{
+public:
+ // Operations
+
+ // Constructor(s)
+ UTL_ExceptlistActiveIterator(UTL_ExceptList *s);
+
+ // Get current item
+ AST_Exception *item();
+};
+
+#endif // _UTL_EXCEPTLIST_UTL_EXCEPTLIST_HH
diff --git a/TAO/TAO_IDL/include/utl_exprlist.h b/TAO/TAO_IDL/include/utl_exprlist.h
new file mode 100644
index 00000000000..e8042393e26
--- /dev/null
+++ b/TAO/TAO_IDL/include/utl_exprlist.h
@@ -0,0 +1,121 @@
+/*
+
+COPYRIGHT
+
+Copyright 1992, 1993, 1994 Sun Microsystems, Inc. Printed in the United
+States of America. All Rights Reserved.
+
+This product is protected by copyright and distributed under the following
+license restricting its use.
+
+The Interface Definition Language Compiler Front End (CFE) is made
+available for your use provided that you include this license and copyright
+notice on all media and documentation and the software program in which
+this product is incorporated in whole or part. You may copy and extend
+functionality (but may not remove functionality) of the Interface
+Definition Language CFE without charge, but you are not authorized to
+license or distribute it to anyone else except as part of a product or
+program developed by you or with the express written consent of Sun
+Microsystems, Inc. ("Sun").
+
+The names of Sun Microsystems, Inc. and any of its subsidiaries or
+affiliates may not be used in advertising or publicity pertaining to
+distribution of Interface Definition Language CFE as permitted herein.
+
+This license is effective until terminated by Sun for failure to comply
+with this license. Upon termination, you shall destroy or return all code
+and documentation for the Interface Definition Language CFE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED AS IS WITH NO WARRANTIES OF
+ANY KIND INCLUDING THE WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS
+FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR ARISING FROM A COURSE OF
+DEALING, USAGE OR TRADE PRACTICE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED WITH NO SUPPORT AND WITHOUT
+ANY OBLIGATION ON THE PART OF Sun OR ANY OF ITS SUBSIDIARIES OR AFFILIATES
+TO ASSIST IN ITS USE, CORRECTION, MODIFICATION OR ENHANCEMENT.
+
+SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES SHALL HAVE NO LIABILITY WITH
+RESPECT TO THE INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY
+INTERFACE DEFINITION LANGUAGE CFE OR ANY PART THEREOF.
+
+IN NO EVENT WILL SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES BE LIABLE FOR
+ANY LOST REVENUE OR PROFITS OR OTHER SPECIAL, INDIRECT AND CONSEQUENTIAL
+DAMAGES, EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+Use, duplication, or disclosure by the government is subject to
+restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in
+Technical Data and Computer Software clause at DFARS 252.227-7013 and FAR
+52.227-19.
+
+Sun, Sun Microsystems and the Sun logo are trademarks or registered
+trademarks of Sun Microsystems, Inc.
+
+SunSoft, Inc.
+2550 Garcia Avenue
+Mountain View, California 94043
+
+NOTE:
+
+SunOS, SunSoft, Sun, Solaris, Sun Microsystems or the Sun logo are
+trademarks or registered trademarks of Sun Microsystems, Inc.
+
+ */
+
+#ifndef _UTL_EXPRLIST_UTL_EXPRLIST_HH
+#define _UTL_EXPRLIST_UTL_EXPRLIST_HH
+
+#pragma ident "%@(#)utl_exprlist.hh 1.23% %92/06/10% Sun Microsystems"
+
+// utl_exprlist.hh
+//
+// List of strings
+
+// NOTE: This list class only works correctly because we use single public
+// inheritance, as opposed to multiple inheritance or public virtual.
+// It relies on a type-unsafe cast from UTL_List to subclasses, which
+// will cease to operate correctly if you use either multiple or
+// public virtual inheritance.
+//
+// For portability reasons we have decided to provide both this and
+// an implementation of the list classes in terms of templates. If
+// your compiler supports templates, please use the files in the
+// include/utl_tmpl and util/utl_tmpl directories instead of the
+// files by the same names in the include and util directories.
+
+/*
+** DEPENDENCIES: ast_expression.hh, utl_list.hh
+**
+** USE: Included from util.hh
+*/
+
+class UTL_ExprList : public UTL_List
+{
+public:
+ // Operations
+
+ // Constructor(s)
+ UTL_ExprList(AST_Expression *s, UTL_ExprList *cdr);
+
+ // Get list item
+ AST_Expression *head();
+
+private:
+ // Data
+ AST_Expression *pd_car_data; // List item
+};
+
+// Active iterator for UTL_ExprList
+class UTL_ExprlistActiveIterator : public UTL_ListActiveIterator
+{
+public:
+ // Operations
+
+ // Constructor(s)
+ UTL_ExprlistActiveIterator(UTL_ExprList *s);
+
+ // Get current item
+ AST_Expression *item();
+};
+
+#endif // _UTL_EXPRLIST_UTL_EXPRLIST_HH
diff --git a/TAO/TAO_IDL/include/utl_identifier.h b/TAO/TAO_IDL/include/utl_identifier.h
new file mode 100644
index 00000000000..a360ba675c4
--- /dev/null
+++ b/TAO/TAO_IDL/include/utl_identifier.h
@@ -0,0 +1,103 @@
+/*
+
+COPYRIGHT
+
+Copyright 1992, 1993, 1994 Sun Microsystems, Inc. Printed in the United
+States of America. All Rights Reserved.
+
+This product is protected by copyright and distributed under the following
+license restricting its use.
+
+The Interface Definition Language Compiler Front End (CFE) is made
+available for your use provided that you include this license and copyright
+notice on all media and documentation and the software program in which
+this product is incorporated in whole or part. You may copy and extend
+functionality (but may not remove functionality) of the Interface
+Definition Language CFE without charge, but you are not authorized to
+license or distribute it to anyone else except as part of a product or
+program developed by you or with the express written consent of Sun
+Microsystems, Inc. ("Sun").
+
+The names of Sun Microsystems, Inc. and any of its subsidiaries or
+affiliates may not be used in advertising or publicity pertaining to
+distribution of Interface Definition Language CFE as permitted herein.
+
+This license is effective until terminated by Sun for failure to comply
+with this license. Upon termination, you shall destroy or return all code
+and documentation for the Interface Definition Language CFE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED AS IS WITH NO WARRANTIES OF
+ANY KIND INCLUDING THE WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS
+FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR ARISING FROM A COURSE OF
+DEALING, USAGE OR TRADE PRACTICE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED WITH NO SUPPORT AND WITHOUT
+ANY OBLIGATION ON THE PART OF Sun OR ANY OF ITS SUBSIDIARIES OR AFFILIATES
+TO ASSIST IN ITS USE, CORRECTION, MODIFICATION OR ENHANCEMENT.
+
+SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES SHALL HAVE NO LIABILITY WITH
+RESPECT TO THE INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY
+INTERFACE DEFINITION LANGUAGE CFE OR ANY PART THEREOF.
+
+IN NO EVENT WILL SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES BE LIABLE FOR
+ANY LOST REVENUE OR PROFITS OR OTHER SPECIAL, INDIRECT AND CONSEQUENTIAL
+DAMAGES, EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+Use, duplication, or disclosure by the government is subject to
+restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in
+Technical Data and Computer Software clause at DFARS 252.227-7013 and FAR
+52.227-19.
+
+Sun, Sun Microsystems and the Sun logo are trademarks or registered
+trademarks of Sun Microsystems, Inc.
+
+SunSoft, Inc.
+2550 Garcia Avenue
+Mountain View, California 94043
+
+NOTE:
+
+SunOS, SunSoft, Sun, Solaris, Sun Microsystems or the Sun logo are
+trademarks or registered trademarks of Sun Microsystems, Inc.
+
+ */
+
+#ifndef _UTL_IDENTIFIER_UTL_IDENTIFIER_HH
+#define _UTL_IDENTIFIER_UTL_IDENTIFIER_HH
+
+#pragma ident "%@(#)UTL_Identifier.hh 1.1% %93/12/06% Sun Microsystems"
+
+// utl_identifier.hh
+//
+// Identifier
+
+/*
+** DEPENDENCIES: utl_string.hh
+**
+** USE: Included from util.hh
+*/
+
+#include <iostream.h>
+#include "idl_fwd.h"
+#include "utl_string.h"
+
+class Identifier {
+ public:
+ // Constructor(s)
+ Identifier();
+ Identifier(char *s, long x=1, long y=0, long z=I_FALSE);
+ virtual ~Identifier();
+
+ // Operations
+ char *get_string();
+ long compare(Identifier *other);
+
+ // Dumping
+ virtual void dump(ostream &o);
+
+ private:
+ // Storage for data
+ char *pv_string;
+};
+
+#endif // _UTL_IDENTIFIER_UTL_IDENTIFIER_HH
diff --git a/TAO/TAO_IDL/include/utl_idlist.h b/TAO/TAO_IDL/include/utl_idlist.h
new file mode 100644
index 00000000000..2949ec59710
--- /dev/null
+++ b/TAO/TAO_IDL/include/utl_idlist.h
@@ -0,0 +1,134 @@
+/*
+
+COPYRIGHT
+
+Copyright 1992, 1993, 1994 Sun Microsystems, Inc. Printed in the United
+States of America. All Rights Reserved.
+
+This product is protected by copyright and distributed under the following
+license restricting its use.
+
+The Interface Definition Language Compiler Front End (CFE) is made
+available for your use provided that you include this license and copyright
+notice on all media and documentation and the software program in which
+this product is incorporated in whole or part. You may copy and extend
+functionality (but may not remove functionality) of the Interface
+Definition Language CFE without charge, but you are not authorized to
+license or distribute it to anyone else except as part of a product or
+program developed by you or with the express written consent of Sun
+Microsystems, Inc. ("Sun").
+
+The names of Sun Microsystems, Inc. and any of its subsidiaries or
+affiliates may not be used in advertising or publicity pertaining to
+distribution of Interface Definition Language CFE as permitted herein.
+
+This license is effective until terminated by Sun for failure to comply
+with this license. Upon termination, you shall destroy or return all code
+and documentation for the Interface Definition Language CFE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED AS IS WITH NO WARRANTIES OF
+ANY KIND INCLUDING THE WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS
+FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR ARISING FROM A COURSE OF
+DEALING, USAGE OR TRADE PRACTICE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED WITH NO SUPPORT AND WITHOUT
+ANY OBLIGATION ON THE PART OF Sun OR ANY OF ITS SUBSIDIARIES OR AFFILIATES
+TO ASSIST IN ITS USE, CORRECTION, MODIFICATION OR ENHANCEMENT.
+
+SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES SHALL HAVE NO LIABILITY WITH
+RESPECT TO THE INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY
+INTERFACE DEFINITION LANGUAGE CFE OR ANY PART THEREOF.
+
+IN NO EVENT WILL SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES BE LIABLE FOR
+ANY LOST REVENUE OR PROFITS OR OTHER SPECIAL, INDIRECT AND CONSEQUENTIAL
+DAMAGES, EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+Use, duplication, or disclosure by the government is subject to
+restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in
+Technical Data and Computer Software clause at DFARS 252.227-7013 and FAR
+52.227-19.
+
+Sun, Sun Microsystems and the Sun logo are trademarks or registered
+trademarks of Sun Microsystems, Inc.
+
+SunSoft, Inc.
+2550 Garcia Avenue
+Mountain View, California 94043
+
+NOTE:
+
+SunOS, SunSoft, Sun, Solaris, Sun Microsystems or the Sun logo are
+trademarks or registered trademarks of Sun Microsystems, Inc.
+
+ */
+
+#ifndef _UTL_IDLIST_UTL_IDLIST_HH
+#define _UTL_IDLIST_UTL_IDLIST_HH
+
+#pragma ident "%@(#)UTL_IdList.hh 1.1% %93/12/06% Sun Microsystems"
+
+// utl_idlist.hh
+//
+// List of Identifiers
+
+// NOTE: This list class only works correctly because we use single public
+// inheritance, as opposed to multiple inheritance or public virtual.
+// It relies on a type-unsafe cast from UTL_List to subclasses, which
+// will cease to operate correctly if you use either multiple or
+// public virtual inheritance.
+//
+// For portability reasons we have decided to provide both this and
+// an implementation of the list classes in terms of templates. If
+// your compiler supports templates, please use the files in the
+// include/utl_tmpl and util/utl_tmpl directories instead of the
+// files by the same names in the include and util directories.
+
+/*
+** DEPENDENCIES: utl_list.hh, utl_identifier.hh
+**
+** USE: Included from util.hh
+*/
+
+#include <iostream.h>
+#include "idl_fwd.h"
+#include "utl_list.h"
+#include "utl_identifier.h"
+#include "utl_string.h"
+
+class UTL_IdList : public UTL_List
+{
+ public:
+ // Constructor(s)
+ UTL_IdList(Identifier *car, UTL_IdList *cdr);
+ virtual ~UTL_IdList() {}
+
+ // AST Dumping
+ virtual void dump(ostream &o);
+
+ // Other operations
+
+ // Copy the list
+ UTL_List *copy();
+
+ // get element
+ Identifier *head();
+
+ // Get last element in this list
+ Identifier *last_component();
+ private:
+ Identifier *pd_car_data;
+};
+
+// Active iterator for UTL_IdList
+
+class UTL_IdListActiveIterator :
+ public UTL_ListActiveIterator
+{
+ public:
+ // Constructor(s)
+ UTL_IdListActiveIterator(UTL_IdList *s);
+
+ Identifier *item();
+};
+
+#endif // _UTL_IDLIST_UTL_IDLIST_HH
diff --git a/TAO/TAO_IDL/include/utl_indenter.h b/TAO/TAO_IDL/include/utl_indenter.h
new file mode 100644
index 00000000000..36efa1dfed0
--- /dev/null
+++ b/TAO/TAO_IDL/include/utl_indenter.h
@@ -0,0 +1,102 @@
+/*
+
+COPYRIGHT
+
+Copyright 1992, 1993, 1994 Sun Microsystems, Inc. Printed in the United
+States of America. All Rights Reserved.
+
+This product is protected by copyright and distributed under the following
+license restricting its use.
+
+The Interface Definition Language Compiler Front End (CFE) is made
+available for your use provided that you include this license and copyright
+notice on all media and documentation and the software program in which
+this product is incorporated in whole or part. You may copy and extend
+functionality (but may not remove functionality) of the Interface
+Definition Language CFE without charge, but you are not authorized to
+license or distribute it to anyone else except as part of a product or
+program developed by you or with the express written consent of Sun
+Microsystems, Inc. ("Sun").
+
+The names of Sun Microsystems, Inc. and any of its subsidiaries or
+affiliates may not be used in advertising or publicity pertaining to
+distribution of Interface Definition Language CFE as permitted herein.
+
+This license is effective until terminated by Sun for failure to comply
+with this license. Upon termination, you shall destroy or return all code
+and documentation for the Interface Definition Language CFE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED AS IS WITH NO WARRANTIES OF
+ANY KIND INCLUDING THE WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS
+FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR ARISING FROM A COURSE OF
+DEALING, USAGE OR TRADE PRACTICE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED WITH NO SUPPORT AND WITHOUT
+ANY OBLIGATION ON THE PART OF Sun OR ANY OF ITS SUBSIDIARIES OR AFFILIATES
+TO ASSIST IN ITS USE, CORRECTION, MODIFICATION OR ENHANCEMENT.
+
+SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES SHALL HAVE NO LIABILITY WITH
+RESPECT TO THE INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY
+INTERFACE DEFINITION LANGUAGE CFE OR ANY PART THEREOF.
+
+IN NO EVENT WILL SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES BE LIABLE FOR
+ANY LOST REVENUE OR PROFITS OR OTHER SPECIAL, INDIRECT AND CONSEQUENTIAL
+DAMAGES, EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+Use, duplication, or disclosure by the government is subject to
+restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in
+Technical Data and Computer Software clause at DFARS 252.227-7013 and FAR
+52.227-19.
+
+Sun, Sun Microsystems and the Sun logo are trademarks or registered
+trademarks of Sun Microsystems, Inc.
+
+SunSoft, Inc.
+2550 Garcia Avenue
+Mountain View, California 94043
+
+NOTE:
+
+SunOS, SunSoft, Sun, Solaris, Sun Microsystems or the Sun logo are
+trademarks or registered trademarks of Sun Microsystems, Inc.
+
+ */
+
+#ifndef _UTL_INDENTER_UTL_INDENTER_HH
+#define _UTL_INDENTER_UTL_INDENTER_HH
+
+#pragma ident "%@(#)utl_indenter.hh 1.10% %92/06/10% Sun Microsystems"
+
+// UTL indenter:
+//
+// Utility class for control of indentation level during dumping
+// May also be useful for BEs that want to produce nicely formatted
+// output
+
+/*
+** DEPENDENCIES: NONE
+**
+** USE: in CFE in dumping the AST
+*/
+
+class UTL_Indenter
+{
+public:
+ // Operations
+
+ // Constructor(s)
+ UTL_Indenter(); // constructor
+ virtual ~UTL_Indenter() {}
+
+ void reset(); // Reset indentation level to 0
+ void increase(); // Increase indentation level
+ void decrease(); // Decrease indentation level
+
+ void skip_to(ostream &o); // Skip to indentation level stop
+
+private:
+ // Data
+ long pd_indent_level; // How far to indent
+};
+
+#endif // _UTL_INDENTER_UTL_INDENTER_HH
diff --git a/TAO/TAO_IDL/include/utl_labellist.h b/TAO/TAO_IDL/include/utl_labellist.h
new file mode 100644
index 00000000000..12891df9e00
--- /dev/null
+++ b/TAO/TAO_IDL/include/utl_labellist.h
@@ -0,0 +1,121 @@
+/*
+
+COPYRIGHT
+
+Copyright 1992, 1993, 1994 Sun Microsystems, Inc. Printed in the United
+States of America. All Rights Reserved.
+
+This product is protected by copyright and distributed under the following
+license restricting its use.
+
+The Interface Definition Language Compiler Front End (CFE) is made
+available for your use provided that you include this license and copyright
+notice on all media and documentation and the software program in which
+this product is incorporated in whole or part. You may copy and extend
+functionality (but may not remove functionality) of the Interface
+Definition Language CFE without charge, but you are not authorized to
+license or distribute it to anyone else except as part of a product or
+program developed by you or with the express written consent of Sun
+Microsystems, Inc. ("Sun").
+
+The names of Sun Microsystems, Inc. and any of its subsidiaries or
+affiliates may not be used in advertising or publicity pertaining to
+distribution of Interface Definition Language CFE as permitted herein.
+
+This license is effective until terminated by Sun for failure to comply
+with this license. Upon termination, you shall destroy or return all code
+and documentation for the Interface Definition Language CFE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED AS IS WITH NO WARRANTIES OF
+ANY KIND INCLUDING THE WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS
+FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR ARISING FROM A COURSE OF
+DEALING, USAGE OR TRADE PRACTICE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED WITH NO SUPPORT AND WITHOUT
+ANY OBLIGATION ON THE PART OF Sun OR ANY OF ITS SUBSIDIARIES OR AFFILIATES
+TO ASSIST IN ITS USE, CORRECTION, MODIFICATION OR ENHANCEMENT.
+
+SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES SHALL HAVE NO LIABILITY WITH
+RESPECT TO THE INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY
+INTERFACE DEFINITION LANGUAGE CFE OR ANY PART THEREOF.
+
+IN NO EVENT WILL SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES BE LIABLE FOR
+ANY LOST REVENUE OR PROFITS OR OTHER SPECIAL, INDIRECT AND CONSEQUENTIAL
+DAMAGES, EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+Use, duplication, or disclosure by the government is subject to
+restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in
+Technical Data and Computer Software clause at DFARS 252.227-7013 and FAR
+52.227-19.
+
+Sun, Sun Microsystems and the Sun logo are trademarks or registered
+trademarks of Sun Microsystems, Inc.
+
+SunSoft, Inc.
+2550 Garcia Avenue
+Mountain View, California 94043
+
+NOTE:
+
+SunOS, SunSoft, Sun, Solaris, Sun Microsystems or the Sun logo are
+trademarks or registered trademarks of Sun Microsystems, Inc.
+
+ */
+
+#ifndef _UTL_LABELLIST_UTL_LABELLIST_HH
+#define _UTL_LABELLIST_UTL_LABELLIST_HH
+
+#pragma ident "%@(#)utl_labellist.hh 1.27% %92/06/10% Sun Microsystems"
+
+// utl_labellist.hh
+//
+// List of AST_UnionBranch nodes
+
+// NOTE: This list class only works correctly because we use single public
+// inheritance, as opposed to multiple inheritance or public virtual.
+// It relies on a type-unsafe cast from UTL_List to subclasses, which
+// will cease to operate correctly if you use either multiple or
+// public virtual inheritance.
+//
+// For portability reasons we have decided to provide both this and
+// an implementation of the list classes in terms of templates. If
+// your compiler supports templates, please use the files in the
+// include/utl_tmpl and util/utl_tmpl directories instead of the
+// files by the same names in the include and util directories.
+
+/*
+** DEPENDENCIES: utl_list.hh, ast_union_label.hh
+**
+** USE: Included from util.hh
+*/
+
+class UTL_LabelList : public UTL_List
+{
+public:
+ // Operations
+
+ // Constructor(s)
+ UTL_LabelList(AST_UnionLabel *s, UTL_LabelList *cdr);
+
+ // Get list item
+ AST_UnionLabel *head();
+
+private:
+ // Data
+ AST_UnionLabel *pd_car_data; // List item
+};
+
+// Active iterator for UTL_LabelList
+class UTL_LabellistActiveIterator : public UTL_ListActiveIterator
+{
+public:
+ // Operations
+
+ // Constructor(s)
+ UTL_LabellistActiveIterator(UTL_LabelList *source);
+
+ // Get current item
+ AST_UnionLabel *item();
+};
+
+#endif // _UTL_LABELLIST_UTL_LABELLIST_HH
diff --git a/TAO/TAO_IDL/include/utl_list.h b/TAO/TAO_IDL/include/utl_list.h
new file mode 100644
index 00000000000..ed45d09010f
--- /dev/null
+++ b/TAO/TAO_IDL/include/utl_list.h
@@ -0,0 +1,150 @@
+/*
+
+COPYRIGHT
+
+Copyright 1992, 1993, 1994 Sun Microsystems, Inc. Printed in the United
+States of America. All Rights Reserved.
+
+This product is protected by copyright and distributed under the following
+license restricting its use.
+
+The Interface Definition Language Compiler Front End (CFE) is made
+available for your use provided that you include this license and copyright
+notice on all media and documentation and the software program in which
+this product is incorporated in whole or part. You may copy and extend
+functionality (but may not remove functionality) of the Interface
+Definition Language CFE without charge, but you are not authorized to
+license or distribute it to anyone else except as part of a product or
+program developed by you or with the express written consent of Sun
+Microsystems, Inc. ("Sun").
+
+The names of Sun Microsystems, Inc. and any of its subsidiaries or
+affiliates may not be used in advertising or publicity pertaining to
+distribution of Interface Definition Language CFE as permitted herein.
+
+This license is effective until terminated by Sun for failure to comply
+with this license. Upon termination, you shall destroy or return all code
+and documentation for the Interface Definition Language CFE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED AS IS WITH NO WARRANTIES OF
+ANY KIND INCLUDING THE WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS
+FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR ARISING FROM A COURSE OF
+DEALING, USAGE OR TRADE PRACTICE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED WITH NO SUPPORT AND WITHOUT
+ANY OBLIGATION ON THE PART OF Sun OR ANY OF ITS SUBSIDIARIES OR AFFILIATES
+TO ASSIST IN ITS USE, CORRECTION, MODIFICATION OR ENHANCEMENT.
+
+SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES SHALL HAVE NO LIABILITY WITH
+RESPECT TO THE INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY
+INTERFACE DEFINITION LANGUAGE CFE OR ANY PART THEREOF.
+
+IN NO EVENT WILL SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES BE LIABLE FOR
+ANY LOST REVENUE OR PROFITS OR OTHER SPECIAL, INDIRECT AND CONSEQUENTIAL
+DAMAGES, EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+Use, duplication, or disclosure by the government is subject to
+restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in
+Technical Data and Computer Software clause at DFARS 252.227-7013 and FAR
+52.227-19.
+
+Sun, Sun Microsystems and the Sun logo are trademarks or registered
+trademarks of Sun Microsystems, Inc.
+
+SunSoft, Inc.
+2550 Garcia Avenue
+Mountain View, California 94043
+
+NOTE:
+
+SunOS, SunSoft, Sun, Solaris, Sun Microsystems or the Sun logo are
+trademarks or registered trademarks of Sun Microsystems, Inc.
+
+ */
+
+#ifndef _UTL_LIST_UTL_LIST_HH
+#define _UTL_LIST_UTL_LIST_HH
+
+#pragma ident "%@(#)utl_list.hh 1.33% %92/06/10% Sun Microsystems"
+
+// utl_list.hh
+//
+// General single-linked lists
+
+/*
+** DEPENDENCIES: NONE
+**
+** USE: Included from util.hh
+*/
+
+// NOTE: This list class only works correctly because we use single public
+// inheritance, as opposed to multiple inheritance or public virtual.
+// It relies on a type-unsafe cast from UTL_List to subclasses, which
+// will cease to operate correctly if you use either multiple or
+// public virtual inheritance.
+//
+// For portability reasons we have decided to provide both this and
+// an implementation of the list classes in terms of templates. If
+// your compiler supports templates, please use the files in the
+// include/utl_tmpl and util/utl_tmpl directories instead of the
+// files by the same names in the include and util directories.
+
+// Forward declare active iterator for UTL_List
+class UTL_ListActiveIterator;
+
+class UTL_List
+{
+public:
+ // Operations
+
+ // Constructor(s)
+ UTL_List(UTL_List *c);
+
+ // Smash last cdr pointer in "this" with l
+ void nconc(UTL_List *l);
+
+ // Copy the list starting at "this"
+ virtual UTL_List *copy();
+
+ // Get next list
+ UTL_List *tail();
+
+ // Set next list
+ void set_tail(UTL_List *l);
+
+ // How long is this list?
+ long length();
+
+private:
+ // Data
+ UTL_List *pd_cdr_data; // The next list
+
+ // Operations
+ long list_length(long n); // How long is it?
+
+ // Friend class
+ friend class UTL_ListActiveIterator; // Friend class
+
+};
+
+// Active iterator for lists
+class UTL_ListActiveIterator
+{
+public:
+ // Operations
+
+ // Constructor(s)
+ UTL_ListActiveIterator(UTL_List *s);
+
+ // Get next list
+ virtual void next();
+
+ // Are we at the end of this list?
+ virtual long is_done();
+
+protected:
+ // Data
+ UTL_List *source; // On what to iterate?
+};
+
+#endif // _UTL_LIST_UTL_LIST_HH
diff --git a/TAO/TAO_IDL/include/utl_namelist.h b/TAO/TAO_IDL/include/utl_namelist.h
new file mode 100644
index 00000000000..d4af135b646
--- /dev/null
+++ b/TAO/TAO_IDL/include/utl_namelist.h
@@ -0,0 +1,121 @@
+/*
+
+COPYRIGHT
+
+Copyright 1992, 1993, 1994 Sun Microsystems, Inc. Printed in the United
+States of America. All Rights Reserved.
+
+This product is protected by copyright and distributed under the following
+license restricting its use.
+
+The Interface Definition Language Compiler Front End (CFE) is made
+available for your use provided that you include this license and copyright
+notice on all media and documentation and the software program in which
+this product is incorporated in whole or part. You may copy and extend
+functionality (but may not remove functionality) of the Interface
+Definition Language CFE without charge, but you are not authorized to
+license or distribute it to anyone else except as part of a product or
+program developed by you or with the express written consent of Sun
+Microsystems, Inc. ("Sun").
+
+The names of Sun Microsystems, Inc. and any of its subsidiaries or
+affiliates may not be used in advertising or publicity pertaining to
+distribution of Interface Definition Language CFE as permitted herein.
+
+This license is effective until terminated by Sun for failure to comply
+with this license. Upon termination, you shall destroy or return all code
+and documentation for the Interface Definition Language CFE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED AS IS WITH NO WARRANTIES OF
+ANY KIND INCLUDING THE WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS
+FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR ARISING FROM A COURSE OF
+DEALING, USAGE OR TRADE PRACTICE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED WITH NO SUPPORT AND WITHOUT
+ANY OBLIGATION ON THE PART OF Sun OR ANY OF ITS SUBSIDIARIES OR AFFILIATES
+TO ASSIST IN ITS USE, CORRECTION, MODIFICATION OR ENHANCEMENT.
+
+SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES SHALL HAVE NO LIABILITY WITH
+RESPECT TO THE INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY
+INTERFACE DEFINITION LANGUAGE CFE OR ANY PART THEREOF.
+
+IN NO EVENT WILL SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES BE LIABLE FOR
+ANY LOST REVENUE OR PROFITS OR OTHER SPECIAL, INDIRECT AND CONSEQUENTIAL
+DAMAGES, EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+Use, duplication, or disclosure by the government is subject to
+restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in
+Technical Data and Computer Software clause at DFARS 252.227-7013 and FAR
+52.227-19.
+
+Sun, Sun Microsystems and the Sun logo are trademarks or registered
+trademarks of Sun Microsystems, Inc.
+
+SunSoft, Inc.
+2550 Garcia Avenue
+Mountain View, California 94043
+
+NOTE:
+
+SunOS, SunSoft, Sun, Solaris, Sun Microsystems or the Sun logo are
+trademarks or registered trademarks of Sun Microsystems, Inc.
+
+ */
+
+#ifndef _UTL_NAMELIST_UTL_NAMELIST_HH
+#define _UTL_NAMELIST_UTL_NAMELIST_HH
+
+#pragma ident "%@(#)utl_namelist.hh 1.33% %92/06/10% Sun Microsystems"
+
+// utl_namelist.hh
+//
+// List of UTL_ScopedName nodes
+
+// NOTE: This list class only works correctly because we use single public
+// inheritance, as opposed to multiple inheritance or public virtual.
+// It relies on a type-unsafe cast from UTL_List to subclasses, which
+// will cease to operate correctly if you use either multiple or
+// public virtual inheritance.
+//
+// For portability reasons we have decided to provide both this and
+// an implementation of the list classes in terms of templates. If
+// your compiler supports templates, please use the files in the
+// include/utl_tmpl and util/utl_tmpl directories instead of the
+// files by the same names in the include and util directories.
+
+/*
+** DEPENDENCIES: utl_list.hh, utl_scoped_name.hh
+**
+** USE: Included from util.hh
+*/
+
+class UTL_NameList : public UTL_List
+{
+public:
+ // Operations
+
+ // Constructor(s)
+ UTL_NameList(UTL_ScopedName *s, UTL_NameList *cdr);
+
+ // Get list item
+ UTL_ScopedName *head();
+
+private:
+ // Data
+ UTL_ScopedName *pd_car_data; // List item
+};
+
+// Active iterator for UTL_NameList
+class UTL_NamelistActiveIterator : public UTL_ListActiveIterator
+{
+public:
+ // Operations
+
+ // Constructor(s)
+ UTL_NamelistActiveIterator(UTL_NameList *source);
+
+ // Get current item
+ UTL_ScopedName *item();
+};
+
+#endif // _UTL_NAMELIST_UTL_NAMELIST_HH
diff --git a/TAO/TAO_IDL/include/utl_scope.h b/TAO/TAO_IDL/include/utl_scope.h
new file mode 100644
index 00000000000..0e902ed3872
--- /dev/null
+++ b/TAO/TAO_IDL/include/utl_scope.h
@@ -0,0 +1,290 @@
+/*
+
+COPYRIGHT
+
+Copyright 1992, 1993, 1994 Sun Microsystems, Inc. Printed in the United
+States of America. All Rights Reserved.
+
+This product is protected by copyright and distributed under the following
+license restricting its use.
+
+The Interface Definition Language Compiler Front End (CFE) is made
+available for your use provided that you include this license and copyright
+notice on all media and documentation and the software program in which
+this product is incorporated in whole or part. You may copy and extend
+functionality (but may not remove functionality) of the Interface
+Definition Language CFE without charge, but you are not authorized to
+license or distribute it to anyone else except as part of a product or
+program developed by you or with the express written consent of Sun
+Microsystems, Inc. ("Sun").
+
+The names of Sun Microsystems, Inc. and any of its subsidiaries or
+affiliates may not be used in advertising or publicity pertaining to
+distribution of Interface Definition Language CFE as permitted herein.
+
+This license is effective until terminated by Sun for failure to comply
+with this license. Upon termination, you shall destroy or return all code
+and documentation for the Interface Definition Language CFE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED AS IS WITH NO WARRANTIES OF
+ANY KIND INCLUDING THE WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS
+FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR ARISING FROM A COURSE OF
+DEALING, USAGE OR TRADE PRACTICE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED WITH NO SUPPORT AND WITHOUT
+ANY OBLIGATION ON THE PART OF Sun OR ANY OF ITS SUBSIDIARIES OR AFFILIATES
+TO ASSIST IN ITS USE, CORRECTION, MODIFICATION OR ENHANCEMENT.
+
+SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES SHALL HAVE NO LIABILITY WITH
+RESPECT TO THE INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY
+INTERFACE DEFINITION LANGUAGE CFE OR ANY PART THEREOF.
+
+IN NO EVENT WILL SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES BE LIABLE FOR
+ANY LOST REVENUE OR PROFITS OR OTHER SPECIAL, INDIRECT AND CONSEQUENTIAL
+DAMAGES, EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+Use, duplication, or disclosure by the government is subject to
+restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in
+Technical Data and Computer Software clause at DFARS 252.227-7013 and FAR
+52.227-19.
+
+Sun, Sun Microsystems and the Sun logo are trademarks or registered
+trademarks of Sun Microsystems, Inc.
+
+SunSoft, Inc.
+2550 Garcia Avenue
+Mountain View, California 94043
+
+NOTE:
+
+SunOS, SunSoft, Sun, Solaris, Sun Microsystems or the Sun logo are
+trademarks or registered trademarks of Sun Microsystems, Inc.
+
+ */
+
+#ifndef _UTL_SCOPE_UTL_SCOPE_HH
+#define _UTL_SCOPE_UTL_SCOPE_HH
+
+#pragma ident "%@(#)utl_scope.hh 1.37% %92/06/10% Sun Microsystems"
+
+// UTL_Scope - Provide scoping mechanism
+//
+// This is the base class for name scoping. Each entity which can
+// be directly contained in a naming scope has an add() function
+// defined for it. The functions defined on the base scoping class
+// all return FALSE. Each subclass of UTL_Scope should
+// define its own add() functions for those types which are legal
+// in that context. Then, for those types for which no local functions
+// have been defined the function on the base class will be called to
+// return FALSE.
+//
+// The "AST_" classes may redefine add() functions to implement any
+// name binding mechanisms needed for their own functionality. It is
+// the responsibility of those functions then to call the add()
+// function defined in the parent "AST_" class.
+
+/*
+** DEPENDENCIES: ast_decl.hh, utl_scoped_name.hh
+**
+** USE: Included from ast.hh
+*/
+
+#include "idl_fwd.h"
+#include "idl_narrow.h"
+#include "ast_decl.h"
+#include "ast_expression.h"
+#include "utl_scoped_name.h"
+
+// Forward declaration of active iterator for UTL_Scope
+class UTL_ScopeActiveIterator;
+
+class UTL_Scope : public virtual COMMON_Base
+{
+public:
+ // Enum to denote the kind of iteration desired
+ enum ScopeIterationKind {
+ IK_both // Iterate through both decls and local types
+ , IK_decls // Iterate only through decls
+ , IK_localtypes // Iterate only through local types
+ };
+
+ // Operations
+
+ // Constructor(s)
+ UTL_Scope();
+ UTL_Scope(AST_Decl::NodeType nt);
+ virtual ~UTL_Scope() {}
+
+ // Scope Management Protocol
+ virtual AST_PredefinedType *add_predefined_type(AST_PredefinedType *t);
+ virtual AST_Module *add_module(AST_Module *m);
+ virtual AST_Interface *add_interface(AST_Interface *i);
+ virtual AST_InterfaceFwd *add_interface_fwd(AST_InterfaceFwd *i);
+ virtual AST_Constant *add_constant(AST_Constant *c);
+ virtual AST_Exception *add_exception(AST_Exception *e);
+ virtual AST_Attribute *add_attribute(AST_Attribute *a);
+ virtual AST_Operation *add_operation(AST_Operation *o);
+ virtual AST_Argument *add_argument(AST_Argument *a);
+ virtual AST_Union *add_union(AST_Union *u);
+ virtual AST_UnionBranch *add_union_branch(AST_UnionBranch *b);
+ virtual AST_Structure *add_structure(AST_Structure *s);
+ virtual AST_Field *add_field(AST_Field *f);
+ virtual AST_Enum *add_enum(AST_Enum *e);
+ virtual AST_EnumVal *add_enum_val(AST_EnumVal *v);
+ virtual AST_Typedef *add_typedef(AST_Typedef *t);
+ virtual UTL_StrList *add_context(UTL_StrList *c);
+ virtual UTL_NameList *add_exceptions(UTL_NameList *e);
+ virtual AST_Sequence *add_sequence(AST_Sequence *s);
+ virtual AST_String *add_string(AST_String *s);
+ virtual AST_Array *add_array(AST_Array *a);
+
+ // Call back end add_XXX functions for this scope
+ virtual AST_Decl *call_add();
+
+ // Data Accessors
+ const AST_Decl::NodeType scope_node_type()
+ {
+ return pd_scope_node_type;
+ }
+
+ // Narrowing
+ DEF_NARROW_METHODS0(UTL_Scope);
+ DEF_NARROW_FROM_SCOPE(UTL_Scope);
+
+ // AST Dumping
+ virtual void dump(ostream &o);
+
+ // Other Operations
+
+ // Name Lookup Mechanism
+ virtual AST_Decl *lookup_by_name(UTL_ScopedName *,
+ idl_bool treat_as_ref);
+
+ // Look up the Identifier * specified only in the local scope
+ virtual AST_Decl *lookup_by_name_local(Identifier *,
+ idl_bool treat_as_ref);
+
+ // Look up a predefined type by its ExprType
+ virtual AST_Decl
+ *lookup_primitive_type(AST_Expression::ExprType);
+
+ // How many entries are used?
+ virtual unsigned long nmembers();
+
+protected:
+ // UTL_Scope protected addition protocol. This protocol is
+ // used from sub-classes of UTL_Scope to insert nodes directly
+ // into the specified node table (either decls or local_types)
+ // Additionally, UTL_Scope also maintains a record of what nodes
+ // defined elsewhere were referenced in this scope
+
+ // Add to decls. Node represents a local declaration
+ void add_to_scope(AST_Decl *e);
+
+ // Add to local types. Node represents a local manifest type
+ void add_to_local_types(AST_Decl *e);
+
+ // Add to referenced nodes set.
+ void add_to_referenced(AST_Decl *e,
+ idl_bool recursive);
+
+ // Has this node been referenced here already?
+ idl_bool referenced(AST_Decl *e);
+
+ // Look up a scoped name in the inherited interfaces of an
+ // interface
+ virtual AST_Decl *look_in_inherited(UTL_ScopedName *,
+ idl_bool treat_as_ref);
+protected:
+ // Operations
+
+ // Lookup based on the local name
+ virtual AST_Decl *lookup_for_add(AST_Decl *d,
+ idl_bool treat_as_ref);
+
+private:
+ // Data
+
+ // What type is this node? This is a cache of the information
+ // in AST_Decl
+ const AST_Decl::NodeType pd_scope_node_type;
+
+ // Storage for declarations in this scope:
+ AST_Decl **pd_decls; // Store declarations
+ long pd_decls_allocated; // How many allocated?
+ long pd_decls_used; // How many used?
+
+ // Storage for local manifest types in this scope:
+ AST_Decl **pd_local_types; // Store types
+ long pd_locals_allocated; // How many allocated?
+ long pd_locals_used; // How many used?
+
+ // Storage for referenced nodes in this scope:
+ AST_Decl **pd_referenced; // Store references
+ long pd_referenced_allocated;// How many allocated?
+ long pd_referenced_used; // How many used?
+
+ // Friend class UTL_ScopeActiveIterator defines active iterator for
+ // UTL_Scope. Definition follows below.
+ friend class UTL_ScopeActiveIterator;
+
+private:
+ friend int yyparse();
+ friend class AST_Enum;
+
+ // Scope Management Protocol
+ virtual AST_PredefinedType *fe_add_predefined_type(AST_PredefinedType *t);
+ virtual AST_Module *fe_add_module(AST_Module *m);
+ virtual AST_Interface *fe_add_interface(AST_Interface *i);
+ virtual AST_InterfaceFwd *fe_add_interface_fwd(AST_InterfaceFwd *i);
+ virtual AST_Constant *fe_add_constant(AST_Constant *c);
+ virtual AST_Exception *fe_add_exception(AST_Exception *e);
+ virtual AST_Attribute *fe_add_attribute(AST_Attribute *a);
+ virtual AST_Operation *fe_add_operation(AST_Operation *o);
+ virtual AST_Argument *fe_add_argument(AST_Argument *a);
+ virtual AST_Union *fe_add_union(AST_Union *u);
+ virtual AST_UnionBranch *fe_add_union_branch(AST_UnionBranch *b);
+ virtual AST_Structure *fe_add_structure(AST_Structure *s);
+ virtual AST_Field *fe_add_field(AST_Field *f);
+ virtual AST_Enum *fe_add_enum(AST_Enum *e);
+ virtual AST_EnumVal *fe_add_enum_val(AST_EnumVal *v);
+ virtual AST_Typedef *fe_add_typedef(AST_Typedef *t);
+ virtual UTL_StrList *fe_add_context(UTL_StrList *c);
+ virtual UTL_NameList *fe_add_exceptions(UTL_NameList *e);
+ virtual AST_Sequence *fe_add_sequence(AST_Sequence *s);
+ virtual AST_String *fe_add_string(AST_String *s);
+ virtual AST_Array *fe_add_array(AST_Array *a);
+};
+
+// Active iterator for a UTL_Scope node
+class UTL_ScopeActiveIterator {
+public:
+ // Operations
+
+ // Constructor(s)
+ UTL_ScopeActiveIterator(UTL_Scope *s, UTL_Scope::ScopeIterationKind ik);
+
+ // Advance to next item
+ virtual void next();
+
+ // Get current item
+ virtual AST_Decl *item();
+
+ // Have we iterated over entire scope?
+ virtual idl_bool is_done();
+
+ // What kind of iterator is this?
+ virtual UTL_Scope::ScopeIterationKind iteration_kind();
+
+ // What stage are we in with this iterator?
+ virtual UTL_Scope::ScopeIterationKind iteration_stage();
+
+private:
+ // Data
+ UTL_Scope *iter_source; // Scope to iterate over
+ UTL_Scope::ScopeIterationKind ik; // What kind of iteration
+ UTL_Scope::ScopeIterationKind stage; // What stage
+ long il; // What location in stage
+};
+
+#endif // _UTL_SCOPE_UTL_SCOPE_HH
diff --git a/TAO/TAO_IDL/include/utl_scoped_name.h b/TAO/TAO_IDL/include/utl_scoped_name.h
new file mode 100644
index 00000000000..e00f967a6e2
--- /dev/null
+++ b/TAO/TAO_IDL/include/utl_scoped_name.h
@@ -0,0 +1,82 @@
+/*
+
+COPYRIGHT
+
+Copyright 1992, 1993, 1994 Sun Microsystems, Inc. Printed in the United
+States of America. All Rights Reserved.
+
+This product is protected by copyright and distributed under the following
+license restricting its use.
+
+The Interface Definition Language Compiler Front End (CFE) is made
+available for your use provided that you include this license and copyright
+notice on all media and documentation and the software program in which
+this product is incorporated in whole or part. You may copy and extend
+functionality (but may not remove functionality) of the Interface
+Definition Language CFE without charge, but you are not authorized to
+license or distribute it to anyone else except as part of a product or
+program developed by you or with the express written consent of Sun
+Microsystems, Inc. ("Sun").
+
+The names of Sun Microsystems, Inc. and any of its subsidiaries or
+affiliates may not be used in advertising or publicity pertaining to
+distribution of Interface Definition Language CFE as permitted herein.
+
+This license is effective until terminated by Sun for failure to comply
+with this license. Upon termination, you shall destroy or return all code
+and documentation for the Interface Definition Language CFE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED AS IS WITH NO WARRANTIES OF
+ANY KIND INCLUDING THE WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS
+FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR ARISING FROM A COURSE OF
+DEALING, USAGE OR TRADE PRACTICE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED WITH NO SUPPORT AND WITHOUT
+ANY OBLIGATION ON THE PART OF Sun OR ANY OF ITS SUBSIDIARIES OR AFFILIATES
+TO ASSIST IN ITS USE, CORRECTION, MODIFICATION OR ENHANCEMENT.
+
+SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES SHALL HAVE NO LIABILITY WITH
+RESPECT TO THE INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY
+INTERFACE DEFINITION LANGUAGE CFE OR ANY PART THEREOF.
+
+IN NO EVENT WILL SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES BE LIABLE FOR
+ANY LOST REVENUE OR PROFITS OR OTHER SPECIAL, INDIRECT AND CONSEQUENTIAL
+DAMAGES, EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+Use, duplication, or disclosure by the government is subject to
+restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in
+Technical Data and Computer Software clause at DFARS 252.227-7013 and FAR
+52.227-19.
+
+Sun, Sun Microsystems and the Sun logo are trademarks or registered
+trademarks of Sun Microsystems, Inc.
+
+SunSoft, Inc.
+2550 Garcia Avenue
+Mountain View, California 94043
+
+NOTE:
+
+SunOS, SunSoft, Sun, Solaris, Sun Microsystems or the Sun logo are
+trademarks or registered trademarks of Sun Microsystems, Inc.
+
+ */
+
+#ifndef _AST_SCOPED_NAME_AST_SCOPED_NAME_HH
+#define _AST_SCOPED_NAME_AST_SCOPED_NAME_HH
+
+#pragma ident "%@(#)utl_scoped_name.h 1.32% %92/06/10% Sun Microsystems"
+
+// Define UTL_ScopedName as a list of strings
+
+/*
+** DEPENDENCIES: utl_strlist.hh
+**
+** USE: Included from ast.hh
+*/
+
+typedef UTL_IdList UTL_ScopedName;
+
+typedef UTL_IdListActiveIterator UTL_ScopedNameActiveIterator;
+
+#endif // _AST_SCOPED_NAME_AST_SCOPED_NAME_HH
diff --git a/TAO/TAO_IDL/include/utl_stack.h b/TAO/TAO_IDL/include/utl_stack.h
new file mode 100644
index 00000000000..0ecb23575a8
--- /dev/null
+++ b/TAO/TAO_IDL/include/utl_stack.h
@@ -0,0 +1,150 @@
+/*
+
+COPYRIGHT
+
+Copyright 1992, 1993, 1994 Sun Microsystems, Inc. Printed in the United
+States of America. All Rights Reserved.
+
+This product is protected by copyright and distributed under the following
+license restricting its use.
+
+The Interface Definition Language Compiler Front End (CFE) is made
+available for your use provided that you include this license and copyright
+notice on all media and documentation and the software program in which
+this product is incorporated in whole or part. You may copy and extend
+functionality (but may not remove functionality) of the Interface
+Definition Language CFE without charge, but you are not authorized to
+license or distribute it to anyone else except as part of a product or
+program developed by you or with the express written consent of Sun
+Microsystems, Inc. ("Sun").
+
+The names of Sun Microsystems, Inc. and any of its subsidiaries or
+affiliates may not be used in advertising or publicity pertaining to
+distribution of Interface Definition Language CFE as permitted herein.
+
+This license is effective until terminated by Sun for failure to comply
+with this license. Upon termination, you shall destroy or return all code
+and documentation for the Interface Definition Language CFE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED AS IS WITH NO WARRANTIES OF
+ANY KIND INCLUDING THE WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS
+FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR ARISING FROM A COURSE OF
+DEALING, USAGE OR TRADE PRACTICE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED WITH NO SUPPORT AND WITHOUT
+ANY OBLIGATION ON THE PART OF Sun OR ANY OF ITS SUBSIDIARIES OR AFFILIATES
+TO ASSIST IN ITS USE, CORRECTION, MODIFICATION OR ENHANCEMENT.
+
+SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES SHALL HAVE NO LIABILITY WITH
+RESPECT TO THE INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY
+INTERFACE DEFINITION LANGUAGE CFE OR ANY PART THEREOF.
+
+IN NO EVENT WILL SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES BE LIABLE FOR
+ANY LOST REVENUE OR PROFITS OR OTHER SPECIAL, INDIRECT AND CONSEQUENTIAL
+DAMAGES, EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+Use, duplication, or disclosure by the government is subject to
+restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in
+Technical Data and Computer Software clause at DFARS 252.227-7013 and FAR
+52.227-19.
+
+Sun, Sun Microsystems and the Sun logo are trademarks or registered
+trademarks of Sun Microsystems, Inc.
+
+SunSoft, Inc.
+2550 Garcia Avenue
+Mountain View, California 94043
+
+NOTE:
+
+SunOS, SunSoft, Sun, Solaris, Sun Microsystems or the Sun logo are
+trademarks or registered trademarks of Sun Microsystems, Inc.
+
+ */
+
+#ifndef _UTL_STACK_UTL_STACK_HH
+#define _UTL_STACK_UTL_STACK_HH
+
+#pragma ident "%@(#)utl_stack.hh 1.36% %92/06/10% Sun Microsystems"
+
+// utl_stack.hh - Defines the UTL_ScopeStack class - a stack of scopes
+//
+// UTL_ScopeStack implements scope nesting
+
+/*
+** DEPENDENCIES: utl_scope.hh
+**
+** USE: Included from util.hh
+*/
+
+// Forward declaration of active iterator for UTL_ScopeStack
+class UTL_ScopeStackActiveIterator;
+
+class UTL_ScopeStack
+{
+public:
+ // Operations
+
+ // Constructor and destructor
+ UTL_ScopeStack();
+ virtual ~UTL_ScopeStack();
+
+ // Return top element
+ virtual UTL_Scope *top();
+
+ // Pop top element
+ virtual void pop();
+
+ // Clear entire stack
+ virtual void clear();
+
+ // Push an element on the stack and return stack
+ virtual UTL_ScopeStack *push(UTL_Scope *el);
+
+ // How deep is the stack now?
+ virtual unsigned long depth();
+
+ // Return bottom element
+ virtual UTL_Scope *bottom();
+
+ // Return (top - 1) element
+ virtual UTL_Scope *next_to_top();
+
+ // return topmost non-NULL element
+ virtual UTL_Scope *top_non_null();
+
+private:
+ // Data
+ UTL_Scope **pd_stack_data; // Store scopes stack
+ unsigned long pd_stack_data_nalloced; // How many allocated?
+ unsigned long pd_stack_top; // How many used?
+
+ // Friend active iterator class for UTL_ScopeStack
+ friend class UTL_ScopeStackActiveIterator;
+};
+
+// Active iterator for UTL_ScopeStack
+class UTL_ScopeStackActiveIterator
+{
+public:
+ // Operations
+
+ // Constructor
+ UTL_ScopeStackActiveIterator(UTL_ScopeStack *s);
+
+ // Advance to next element
+ virtual void next();
+
+ // Get current item
+ virtual UTL_Scope *item();
+
+ // Is the iteration finished?
+ virtual long is_done();
+
+private:
+ // Data
+ UTL_ScopeStack *source; // On what to iterate?
+ long il; // Where are we in iteration?
+};
+
+#endif // _UTL_STACK_UTL_STACK_HH
diff --git a/TAO/TAO_IDL/include/utl_string.h b/TAO/TAO_IDL/include/utl_string.h
new file mode 100644
index 00000000000..9def38d0927
--- /dev/null
+++ b/TAO/TAO_IDL/include/utl_string.h
@@ -0,0 +1,120 @@
+/*
+
+COPYRIGHT
+
+Copyright 1992, 1993, 1994 Sun Microsystems, Inc. Printed in the United
+States of America. All Rights Reserved.
+
+This product is protected by copyright and distributed under the following
+license restricting its use.
+
+The Interface Definition Language Compiler Front End (CFE) is made
+available for your use provided that you include this license and copyright
+notice on all media and documentation and the software program in which
+this product is incorporated in whole or part. You may copy and extend
+functionality (but may not remove functionality) of the Interface
+Definition Language CFE without charge, but you are not authorized to
+license or distribute it to anyone else except as part of a product or
+program developed by you or with the express written consent of Sun
+Microsystems, Inc. ("Sun").
+
+The names of Sun Microsystems, Inc. and any of its subsidiaries or
+affiliates may not be used in advertising or publicity pertaining to
+distribution of Interface Definition Language CFE as permitted herein.
+
+This license is effective until terminated by Sun for failure to comply
+with this license. Upon termination, you shall destroy or return all code
+and documentation for the Interface Definition Language CFE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED AS IS WITH NO WARRANTIES OF
+ANY KIND INCLUDING THE WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS
+FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR ARISING FROM A COURSE OF
+DEALING, USAGE OR TRADE PRACTICE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED WITH NO SUPPORT AND WITHOUT
+ANY OBLIGATION ON THE PART OF Sun OR ANY OF ITS SUBSIDIARIES OR AFFILIATES
+TO ASSIST IN ITS USE, CORRECTION, MODIFICATION OR ENHANCEMENT.
+
+SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES SHALL HAVE NO LIABILITY WITH
+RESPECT TO THE INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY
+INTERFACE DEFINITION LANGUAGE CFE OR ANY PART THEREOF.
+
+IN NO EVENT WILL SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES BE LIABLE FOR
+ANY LOST REVENUE OR PROFITS OR OTHER SPECIAL, INDIRECT AND CONSEQUENTIAL
+DAMAGES, EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+Use, duplication, or disclosure by the government is subject to
+restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in
+Technical Data and Computer Software clause at DFARS 252.227-7013 and FAR
+52.227-19.
+
+Sun, Sun Microsystems and the Sun logo are trademarks or registered
+trademarks of Sun Microsystems, Inc.
+
+SunSoft, Inc.
+2550 Garcia Avenue
+Mountain View, California 94043
+
+NOTE:
+
+SunOS, SunSoft, Sun, Solaris, Sun Microsystems or the Sun logo are
+trademarks or registered trademarks of Sun Microsystems, Inc.
+
+ */
+
+#ifndef _STRING_STRING_HH
+#define _STRING_STRING_HH
+
+#pragma ident "%@(#)utl_string.h 1.21% %92/06/10% Sun Microsystems"
+
+// utl_string.hh - contains a quick and dirty TEMPORARY string implementation
+
+/*
+** DEPENDENCIES: NONE
+**
+** USE: Included from util.hh
+*/
+
+#ifndef String
+#define String UTL_String
+#endif // String
+
+class UTL_String
+{
+public:
+ // Operations
+
+ // Constructor(s)
+ UTL_String();
+ UTL_String(char *str);
+ UTL_String(unsigned long maxlen);
+ UTL_String(UTL_String *s);
+ virtual ~UTL_String() {}
+
+ // AST Dumping
+ virtual void dump(ostream &o);
+
+ // Other Operations
+
+ // Get contents of utl_string
+ char *get_string();
+
+ // Get canonical representation. This is (implemented as) the all upper
+ // case corresponding string
+ char *get_canonical_rep();
+
+ // Compare two String *
+ virtual long compare(UTL_String *s);
+
+private:
+ // Data
+ char *p_str; // Storage for characters
+ char *c_str; // Canonicalized string
+ unsigned long len; // How long is string
+ unsigned long alloced; // How much allocated
+
+ // Operations
+ void canonicalize(); // Compute canonical representation
+};
+
+#endif // _STRING_STRING_HH
diff --git a/TAO/TAO_IDL/include/utl_strlist.h b/TAO/TAO_IDL/include/utl_strlist.h
new file mode 100644
index 00000000000..5c85ee82a71
--- /dev/null
+++ b/TAO/TAO_IDL/include/utl_strlist.h
@@ -0,0 +1,135 @@
+/*
+
+COPYRIGHT
+
+Copyright 1992, 1993, 1994 Sun Microsystems, Inc. Printed in the United
+States of America. All Rights Reserved.
+
+This product is protected by copyright and distributed under the following
+license restricting its use.
+
+The Interface Definition Language Compiler Front End (CFE) is made
+available for your use provided that you include this license and copyright
+notice on all media and documentation and the software program in which
+this product is incorporated in whole or part. You may copy and extend
+functionality (but may not remove functionality) of the Interface
+Definition Language CFE without charge, but you are not authorized to
+license or distribute it to anyone else except as part of a product or
+program developed by you or with the express written consent of Sun
+Microsystems, Inc. ("Sun").
+
+The names of Sun Microsystems, Inc. and any of its subsidiaries or
+affiliates may not be used in advertising or publicity pertaining to
+distribution of Interface Definition Language CFE as permitted herein.
+
+This license is effective until terminated by Sun for failure to comply
+with this license. Upon termination, you shall destroy or return all code
+and documentation for the Interface Definition Language CFE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED AS IS WITH NO WARRANTIES OF
+ANY KIND INCLUDING THE WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS
+FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR ARISING FROM A COURSE OF
+DEALING, USAGE OR TRADE PRACTICE.
+
+INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED WITH NO SUPPORT AND WITHOUT
+ANY OBLIGATION ON THE PART OF Sun OR ANY OF ITS SUBSIDIARIES OR AFFILIATES
+TO ASSIST IN ITS USE, CORRECTION, MODIFICATION OR ENHANCEMENT.
+
+SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES SHALL HAVE NO LIABILITY WITH
+RESPECT TO THE INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY
+INTERFACE DEFINITION LANGUAGE CFE OR ANY PART THEREOF.
+
+IN NO EVENT WILL SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES BE LIABLE FOR
+ANY LOST REVENUE OR PROFITS OR OTHER SPECIAL, INDIRECT AND CONSEQUENTIAL
+DAMAGES, EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+Use, duplication, or disclosure by the government is subject to
+restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in
+Technical Data and Computer Software clause at DFARS 252.227-7013 and FAR
+52.227-19.
+
+Sun, Sun Microsystems and the Sun logo are trademarks or registered
+trademarks of Sun Microsystems, Inc.
+
+SunSoft, Inc.
+2550 Garcia Avenue
+Mountain View, California 94043
+
+NOTE:
+
+SunOS, SunSoft, Sun, Solaris, Sun Microsystems or the Sun logo are
+trademarks or registered trademarks of Sun Microsystems, Inc.
+
+ */
+
+#ifndef _UTL_STRLIST_UTL_STRLIST_HH
+#define _UTL_STRLIST_UTL_STRLIST_HH
+
+#pragma ident "%@(#)UTL_StrList.h 1.33% %92/06/10% Sun Microsystems"
+
+// utl_strlist.hh
+//
+// List of String nodes
+
+// NOTE: This list class only works correctly because we use single public
+// inheritance, as opposed to multiple inheritance or public virtual.
+// It relies on a type-unsafe cast from UTL_List to subclasses, which
+// will cease to operate correctly if you use either multiple or
+// public virtual inheritance.
+//
+// For portability reasons we have decided to provide both this and
+// an implementation of the list classes in terms of templates. If
+// your compiler supports templates, please use the files in the
+// include/utl_tmpl and util/utl_tmpl directories instead of the
+// files by the same names in the include and util directories.
+
+/*
+** DEPENDENCIES: utl_list.hh, utl_string.hh
+**
+** USE: Included from util.hh
+*/
+
+class UTL_StrList : public UTL_List
+{
+public:
+ // Operations
+
+ // Constructor(s)
+ UTL_StrList(String *s, UTL_StrList *cdr);
+
+ // AST Dumping
+ virtual void dump(ostream &o);
+
+ // Other Operations
+
+ // Copy a list of strings
+ virtual UTL_List *copy();
+
+ // Get list element
+ String *head();
+
+ // Set the list element
+ void set_head(String *);
+
+ // Get last element in this list
+ String *last_component();
+
+private:
+ // Data
+ String *pd_car_data; // The list item
+};
+
+// Active iterator for UTL_StrList
+class UTL_StrlistActiveIterator : public UTL_ListActiveIterator
+{
+public:
+ // Operations
+
+ // Constructor(s)
+ UTL_StrlistActiveIterator(UTL_StrList *s);
+
+ // Get current item
+ String *item();
+};
+
+#endif // _UTL_STRLIST_UTL_STRLIST_HH