summaryrefslogtreecommitdiff
path: root/TAO/TAO_IDL/fe
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/TAO_IDL/fe')
-rw-r--r--TAO/TAO_IDL/fe/Makefile285
-rw-r--r--TAO/TAO_IDL/fe/fe_declarator.cpp157
-rw-r--r--TAO/TAO_IDL/fe/fe_extern.cpp121
-rw-r--r--TAO/TAO_IDL/fe/fe_init.cpp367
-rw-r--r--TAO/TAO_IDL/fe/fe_interface_header.cpp282
-rw-r--r--TAO/TAO_IDL/fe/fe_private.cpp78
-rw-r--r--TAO/TAO_IDL/fe/idl.ll527
-rw-r--r--TAO/TAO_IDL/fe/idl.yy2265
-rw-r--r--TAO/TAO_IDL/fe/lex.yy.cpp2184
-rw-r--r--TAO/TAO_IDL/fe/y.tab.cpp3274
-rw-r--r--TAO/TAO_IDL/fe/y.tab.h76
11 files changed, 0 insertions, 9616 deletions
diff --git a/TAO/TAO_IDL/fe/Makefile b/TAO/TAO_IDL/fe/Makefile
deleted file mode 100644
index 8d0b70c7b07..00000000000
--- a/TAO/TAO_IDL/fe/Makefile
+++ /dev/null
@@ -1,285 +0,0 @@
-#----------------------------------------------------------------------------
-# $Id$
-#
-# Makefile for libfe
-#----------------------------------------------------------------------------
-
-MAKEFILE = Makefile
-LIBNAME = libfe
-LIB = $(LIBNAME).a
-SHLIB = $(LIBNAME).$(SOEXT)
-IDL_CFE_VERSION = \"1.3.0\"
-
-# These are components that are sources of
-FE_FILES = \
- fe_declarator \
- fe_private \
- fe_init \
- fe_extern \
- fe_interface_header
-
-OTHER_FILES = \
- y.tab \
- lex.yy
-
-FILES = $(FE_FILES) $(OTHER_FILES)
-
-LSRC = $(addsuffix .cpp,$(FILES))
-LHDR = $(addsuffix .h,$(HDRS))
-LOBJ = $(addsuffix .o,$(FILES))
-SHOBJ = $(addsuffix .so,$(FILES))
-
-
-LDLIBS = -lACE
-LIBS = -lACE
-VLDLIBS = $(LDLIBS:%=%$(VAR))
-
-BUILD = $(VSHLIB) #$(VLIB)
-
-
-#----------------------------------------------------------------------------
-# Include macros and targets
-#----------------------------------------------------------------------------
-
-include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU
-include $(ACE_ROOT)/include/makeinclude/macros.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.common.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.lib.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.bin.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.local.GNU
-
-#----------------------------------------------------------------------------
-# Local targets (and local hacks)
-#----------------------------------------------------------------------------
-
-CPPFLAGS += -D_REENTRANT -I../include -I. -DCPP_LOCATION=\"$(CXX)\" -DIDL_CFE_VERSION=$(IDL_CFE_VERSION)
-YACC = yacc
-LEX = flex
-YFLAGS = -t -d
-LFLAGS = -t
-
-# Create the parser and lexer
-y.tab.h y.tab.cpp: idl.yy
- @-$(RM) $@
- $(YACC) $(YFLAGS) idl.yy
- mv -f y.tab.c y.tab.cpp
-
-lex.yy.cpp: idl.ll y.tab.h
- $(LEX) $(LFLAGS) idl.ll > $@
- sed -e "s/unistd/stdio/g" -e "s@#include <@#include /**/ <@" -e "s/ECHO/TAO_ECHO/g" < $@ >> /tmp/$@
- cp /tmp/$@ $@
- $(RM) -f /tmp/$@
-
-#----------------------------------------------------------------------------
-# Dependencies
-#----------------------------------------------------------------------------
-
-# DO NOT DELETE THIS LINE -- g++dep uses it.
-# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
-
-.obj/fe_declarator.o .shobj/fe_declarator.so: fe_declarator.cpp ../include/idl.h \
- ../include/intlmacros.h ../include/idl_narrow.h \
- ../include/idl_defines.h ../include/idl_fwd.h ../include/idl_bool.h \
- ../include/utl_string.h ../include/utl_identifier.h ../include/ast.h \
- ../include/utl_scoped_name.h ../include/ast_decl.h \
- ../include/ast_expression.h ../include/utl_scope.h \
- ../include/ast_type.h ../include/ast_concrete_type.h \
- ../include/ast_predefined_type.h ../include/ast_module.h \
- ../include/ast_root.h ../include/ast_interface.h \
- ../include/ast_interface_fwd.h ../include/ast_structure.h \
- ../include/ast_exception.h ../include/ast_enum.h \
- ../include/ast_operation.h ../include/utl_list.h \
- ../include/ast_field.h ../include/ast_argument.h \
- ../include/ast_attribute.h ../include/ast_union.h \
- ../include/ast_union_branch.h ../include/ast_union_label.h \
- ../include/ast_constant.h ../include/ast_enum_val.h \
- ../include/ast_array.h ../include/ast_sequence.h \
- ../include/ast_string.h ../include/ast_typedef.h \
- ../include/utl_strlist.h ../include/utl_exprlist.h \
- ../include/ast_generator.h ../include/util.h ../include/utl_stack.h \
- ../include/utl_idlist.h ../include/utl_exceptlist.h \
- ../include/utl_namelist.h ../include/utl_labellist.h \
- ../include/utl_decllist.h ../include/idl_global.h \
- ../include/utl_error.h ../include/utl_indenter.h \
- ../include/idl_extern.h ../include/fe_extern.h ../include/be_extern.h \
- ../include/drv_extern.h ../include/ast_extern.h \
- ../include/nr_extern.h ../include/global_extern.h \
- ../include/fe_private.h ../include/fe_interface_header.h \
- ../include/fe_declarator.h
-.obj/fe_private.o .shobj/fe_private.so: fe_private.cpp ../include/idl.h ../include/intlmacros.h \
- ../include/idl_narrow.h ../include/idl_defines.h ../include/idl_fwd.h \
- ../include/idl_bool.h ../include/utl_string.h \
- ../include/utl_identifier.h ../include/ast.h \
- ../include/utl_scoped_name.h ../include/ast_decl.h \
- ../include/ast_expression.h ../include/utl_scope.h \
- ../include/ast_type.h ../include/ast_concrete_type.h \
- ../include/ast_predefined_type.h ../include/ast_module.h \
- ../include/ast_root.h ../include/ast_interface.h \
- ../include/ast_interface_fwd.h ../include/ast_structure.h \
- ../include/ast_exception.h ../include/ast_enum.h \
- ../include/ast_operation.h ../include/utl_list.h \
- ../include/ast_field.h ../include/ast_argument.h \
- ../include/ast_attribute.h ../include/ast_union.h \
- ../include/ast_union_branch.h ../include/ast_union_label.h \
- ../include/ast_constant.h ../include/ast_enum_val.h \
- ../include/ast_array.h ../include/ast_sequence.h \
- ../include/ast_string.h ../include/ast_typedef.h \
- ../include/utl_strlist.h ../include/utl_exprlist.h \
- ../include/ast_generator.h ../include/util.h ../include/utl_stack.h \
- ../include/utl_idlist.h ../include/utl_exceptlist.h \
- ../include/utl_namelist.h ../include/utl_labellist.h \
- ../include/utl_decllist.h ../include/idl_global.h \
- ../include/utl_error.h ../include/utl_indenter.h \
- ../include/idl_extern.h ../include/fe_extern.h ../include/be_extern.h \
- ../include/drv_extern.h ../include/ast_extern.h \
- ../include/nr_extern.h ../include/global_extern.h \
- ../include/fe_private.h ../include/fe_interface_header.h \
- ../include/fe_declarator.h
-.obj/fe_init.o .shobj/fe_init.so: fe_init.cpp ../include/idl.h ../include/intlmacros.h \
- ../include/idl_narrow.h ../include/idl_defines.h ../include/idl_fwd.h \
- ../include/idl_bool.h ../include/utl_string.h \
- ../include/utl_identifier.h ../include/ast.h \
- ../include/utl_scoped_name.h ../include/ast_decl.h \
- ../include/ast_expression.h ../include/utl_scope.h \
- ../include/ast_type.h ../include/ast_concrete_type.h \
- ../include/ast_predefined_type.h ../include/ast_module.h \
- ../include/ast_root.h ../include/ast_interface.h \
- ../include/ast_interface_fwd.h ../include/ast_structure.h \
- ../include/ast_exception.h ../include/ast_enum.h \
- ../include/ast_operation.h ../include/utl_list.h \
- ../include/ast_field.h ../include/ast_argument.h \
- ../include/ast_attribute.h ../include/ast_union.h \
- ../include/ast_union_branch.h ../include/ast_union_label.h \
- ../include/ast_constant.h ../include/ast_enum_val.h \
- ../include/ast_array.h ../include/ast_sequence.h \
- ../include/ast_string.h ../include/ast_typedef.h \
- ../include/utl_strlist.h ../include/utl_exprlist.h \
- ../include/ast_generator.h ../include/util.h ../include/utl_stack.h \
- ../include/utl_idlist.h ../include/utl_exceptlist.h \
- ../include/utl_namelist.h ../include/utl_labellist.h \
- ../include/utl_decllist.h ../include/idl_global.h \
- ../include/utl_error.h ../include/utl_indenter.h \
- ../include/idl_extern.h ../include/fe_extern.h ../include/be_extern.h \
- ../include/drv_extern.h ../include/ast_extern.h \
- ../include/nr_extern.h ../include/global_extern.h \
- ../include/fe_private.h ../include/fe_interface_header.h \
- ../include/fe_declarator.h
-.obj/fe_extern.o .shobj/fe_extern.so: fe_extern.cpp ../include/idl.h ../include/intlmacros.h \
- ../include/idl_narrow.h ../include/idl_defines.h ../include/idl_fwd.h \
- ../include/idl_bool.h ../include/utl_string.h \
- ../include/utl_identifier.h ../include/ast.h \
- ../include/utl_scoped_name.h ../include/ast_decl.h \
- ../include/ast_expression.h ../include/utl_scope.h \
- ../include/ast_type.h ../include/ast_concrete_type.h \
- ../include/ast_predefined_type.h ../include/ast_module.h \
- ../include/ast_root.h ../include/ast_interface.h \
- ../include/ast_interface_fwd.h ../include/ast_structure.h \
- ../include/ast_exception.h ../include/ast_enum.h \
- ../include/ast_operation.h ../include/utl_list.h \
- ../include/ast_field.h ../include/ast_argument.h \
- ../include/ast_attribute.h ../include/ast_union.h \
- ../include/ast_union_branch.h ../include/ast_union_label.h \
- ../include/ast_constant.h ../include/ast_enum_val.h \
- ../include/ast_array.h ../include/ast_sequence.h \
- ../include/ast_string.h ../include/ast_typedef.h \
- ../include/utl_strlist.h ../include/utl_exprlist.h \
- ../include/ast_generator.h ../include/util.h ../include/utl_stack.h \
- ../include/utl_idlist.h ../include/utl_exceptlist.h \
- ../include/utl_namelist.h ../include/utl_labellist.h \
- ../include/utl_decllist.h ../include/idl_global.h \
- ../include/utl_error.h ../include/utl_indenter.h \
- ../include/idl_extern.h ../include/fe_extern.h ../include/be_extern.h \
- ../include/drv_extern.h ../include/ast_extern.h \
- ../include/nr_extern.h ../include/global_extern.h \
- ../include/fe_private.h ../include/fe_interface_header.h \
- ../include/fe_declarator.h
-.obj/fe_interface_header.o .shobj/fe_interface_header.so: fe_interface_header.cpp ../include/idl.h \
- ../include/intlmacros.h ../include/idl_narrow.h \
- ../include/idl_defines.h ../include/idl_fwd.h ../include/idl_bool.h \
- ../include/utl_string.h ../include/utl_identifier.h ../include/ast.h \
- ../include/utl_scoped_name.h ../include/ast_decl.h \
- ../include/ast_expression.h ../include/utl_scope.h \
- ../include/ast_type.h ../include/ast_concrete_type.h \
- ../include/ast_predefined_type.h ../include/ast_module.h \
- ../include/ast_root.h ../include/ast_interface.h \
- ../include/ast_interface_fwd.h ../include/ast_structure.h \
- ../include/ast_exception.h ../include/ast_enum.h \
- ../include/ast_operation.h ../include/utl_list.h \
- ../include/ast_field.h ../include/ast_argument.h \
- ../include/ast_attribute.h ../include/ast_union.h \
- ../include/ast_union_branch.h ../include/ast_union_label.h \
- ../include/ast_constant.h ../include/ast_enum_val.h \
- ../include/ast_array.h ../include/ast_sequence.h \
- ../include/ast_string.h ../include/ast_typedef.h \
- ../include/utl_strlist.h ../include/utl_exprlist.h \
- ../include/ast_generator.h ../include/util.h ../include/utl_stack.h \
- ../include/utl_idlist.h ../include/utl_exceptlist.h \
- ../include/utl_namelist.h ../include/utl_labellist.h \
- ../include/utl_decllist.h ../include/idl_global.h \
- ../include/utl_error.h ../include/utl_indenter.h \
- ../include/idl_extern.h ../include/fe_extern.h ../include/be_extern.h \
- ../include/drv_extern.h ../include/ast_extern.h \
- ../include/nr_extern.h ../include/global_extern.h \
- ../include/fe_private.h ../include/fe_interface_header.h \
- ../include/fe_declarator.h
-.obj/y.tab.o .shobj/y.tab.so: y.tab.cpp ../include/idl.h ../include/intlmacros.h \
- ../include/idl_narrow.h ../include/idl_defines.h ../include/idl_fwd.h \
- ../include/idl_bool.h ../include/utl_string.h \
- ../include/utl_identifier.h ../include/ast.h \
- ../include/utl_scoped_name.h ../include/ast_decl.h \
- ../include/ast_expression.h ../include/utl_scope.h \
- ../include/ast_type.h ../include/ast_concrete_type.h \
- ../include/ast_predefined_type.h ../include/ast_module.h \
- ../include/ast_root.h ../include/ast_interface.h \
- ../include/ast_interface_fwd.h ../include/ast_structure.h \
- ../include/ast_exception.h ../include/ast_enum.h \
- ../include/ast_operation.h ../include/utl_list.h \
- ../include/ast_field.h ../include/ast_argument.h \
- ../include/ast_attribute.h ../include/ast_union.h \
- ../include/ast_union_branch.h ../include/ast_union_label.h \
- ../include/ast_constant.h ../include/ast_enum_val.h \
- ../include/ast_array.h ../include/ast_sequence.h \
- ../include/ast_string.h ../include/ast_typedef.h \
- ../include/utl_strlist.h ../include/utl_exprlist.h \
- ../include/ast_generator.h ../include/util.h ../include/utl_stack.h \
- ../include/utl_idlist.h ../include/utl_exceptlist.h \
- ../include/utl_namelist.h ../include/utl_labellist.h \
- ../include/utl_decllist.h ../include/idl_global.h \
- ../include/utl_error.h ../include/utl_indenter.h \
- ../include/idl_extern.h ../include/fe_extern.h ../include/be_extern.h \
- ../include/drv_extern.h ../include/ast_extern.h \
- ../include/nr_extern.h ../include/global_extern.h \
- ../include/fe_private.h ../include/fe_interface_header.h \
- ../include/fe_declarator.h
-.obj/lex.yy.o .shobj/lex.yy.so: lex.yy.cpp ../include/idl.h ../include/intlmacros.h \
- ../include/idl_narrow.h ../include/idl_defines.h ../include/idl_fwd.h \
- ../include/idl_bool.h ../include/utl_string.h \
- ../include/utl_identifier.h ../include/ast.h \
- ../include/utl_scoped_name.h ../include/ast_decl.h \
- ../include/ast_expression.h ../include/utl_scope.h \
- ../include/ast_type.h ../include/ast_concrete_type.h \
- ../include/ast_predefined_type.h ../include/ast_module.h \
- ../include/ast_root.h ../include/ast_interface.h \
- ../include/ast_interface_fwd.h ../include/ast_structure.h \
- ../include/ast_exception.h ../include/ast_enum.h \
- ../include/ast_operation.h ../include/utl_list.h \
- ../include/ast_field.h ../include/ast_argument.h \
- ../include/ast_attribute.h ../include/ast_union.h \
- ../include/ast_union_branch.h ../include/ast_union_label.h \
- ../include/ast_constant.h ../include/ast_enum_val.h \
- ../include/ast_array.h ../include/ast_sequence.h \
- ../include/ast_string.h ../include/ast_typedef.h \
- ../include/utl_strlist.h ../include/utl_exprlist.h \
- ../include/ast_generator.h ../include/util.h ../include/utl_stack.h \
- ../include/utl_idlist.h ../include/utl_exceptlist.h \
- ../include/utl_namelist.h ../include/utl_labellist.h \
- ../include/utl_decllist.h ../include/idl_global.h \
- ../include/utl_error.h ../include/utl_indenter.h \
- ../include/idl_extern.h ../include/fe_extern.h ../include/be_extern.h \
- ../include/drv_extern.h ../include/ast_extern.h \
- ../include/nr_extern.h ../include/global_extern.h \
- ../include/fe_private.h ../include/fe_interface_header.h \
- ../include/fe_declarator.h y.tab.h
-
-# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
diff --git a/TAO/TAO_IDL/fe/fe_declarator.cpp b/TAO/TAO_IDL/fe/fe_declarator.cpp
deleted file mode 100644
index 1c802e338e9..00000000000
--- a/TAO/TAO_IDL/fe/fe_declarator.cpp
+++ /dev/null
@@ -1,157 +0,0 @@
-/*
-
-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.
-
- */
-
-/*
- * fe_declarator.cc - Implementation of FE private declaration
- * statement class
- *
- * The FE_Declarator class is used to hold together complex declarations
- * until all the components are parsed and before they are composed into
- * an AST_Type node.
- */
-
-#include "idl.h"
-#include "idl_extern.h"
-
-#include "fe_private.h"
-
-/*
- * Constructor(s) and destructor
- */
-
-FE_Declarator::FE_Declarator(UTL_ScopedName *n, DeclaratorType dt,
- AST_Decl *cp)
- : pd_complex_part(cp),
- pd_name(n),
- pd_decl_type(dt)
-{
-}
-
-/*
- * Private operations
- */
-
-/*
- * Public operations
- */
-
-// Compose the type of the complex declarator (if any) with the base
-// type supplied in ct
-AST_Type *
-FE_Declarator::compose(AST_Decl *d)
-{
- AST_Array *arr;
- AST_Type *ct;
-
- ct = AST_Type::narrow_from_decl(d);
- if (ct == NULL) {
- idl_global->err()->not_a_type(d);
- return NULL;
- }
- if (ct->node_type() == AST_Decl::NT_except) {
- idl_global->err()->not_a_type(d);
- return NULL;
- }
- if (pd_decl_type == FD_simple || pd_complex_part == NULL) {
- return ct;
- }
- if (pd_complex_part->node_type() == AST_Decl::NT_array) {
- arr = AST_Array::narrow_from_decl(pd_complex_part);
- arr->set_base_type(ct);
-
- /*
- * Add the new array to the types defined in the global scope
- */
- idl_global->root()->fe_add_array(arr);
-
- return arr;
- }
- return NULL; // return through this statement should not happen
-}
-
-/*
- * Redefinition of inherited virtual operations
- */
-
-/*
- * Data accessors
- */
-
-AST_Decl *
-FE_Declarator::complex_part()
-{
- return pd_complex_part;
-}
-
-UTL_ScopedName *
-FE_Declarator::name()
-{
- return pd_name;
-}
-
-FE_Declarator::DeclaratorType
-FE_Declarator::decl_type()
-{
- return pd_decl_type;
-}
diff --git a/TAO/TAO_IDL/fe/fe_extern.cpp b/TAO/TAO_IDL/fe/fe_extern.cpp
deleted file mode 100644
index 03e52fbdc5f..00000000000
--- a/TAO/TAO_IDL/fe/fe_extern.cpp
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
-
-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.
-
- */
-
-/*
- * fe_extern.cc - export FE interfaces to driver
- */
-
-#include "idl.h"
-#include "idl_extern.h"
-
-#include "fe_private.h"
-
-#include "utl_error.h"
-#include "utl_indenter.h"
-#include "utl_string.h"
-
-/*
- * yacc parser interface
- */
-
-extern int yyparse();
-extern FILE * yyin;
-
-int
-FE_yyparse()
-{
- int result = yyparse();
- if (idl_global->err_count() == 0) {
- idl_global->root()->call_add();
- }
- return result;
-}
-
-void
-FE_set_yyin(File * f)
-{
- yyin = (FILE*)f;
-}
-
-/*
- * constructor interfaces
- */
-
-UTL_Error *
-FE_new_UTL_Error()
-{
- return new UTL_Error();
-}
-
-UTL_Indenter *
-FE_new_UTL_Indenter()
-{
- return new UTL_Indenter();
-}
-
-UTL_String *
-FE_new_UTL_String(char * str)
-{
- return new UTL_String(str);
-}
diff --git a/TAO/TAO_IDL/fe/fe_init.cpp b/TAO/TAO_IDL/fe/fe_init.cpp
deleted file mode 100644
index 16f6b4372d8..00000000000
--- a/TAO/TAO_IDL/fe/fe_init.cpp
+++ /dev/null
@@ -1,367 +0,0 @@
-/*
-
-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.
-
- */
-
-/*
- * fe_init.cc - Initialize the FE
- *
- * The FE initialization is carried out in two stages, with the BE
- * initialization protocol sandwiched between the two stages.
- *
- * The first stage is responsible for creating the scopes stack.
- * The second stage is run after the BE initialization has created
- * and returned an instance of AST_Generator (or a subclass). This
- * instance is used to create the root node for the AST, and to
- * populate it with AST_PredefinedType nodes which represent the
- * predefined IDL types. This AST root is then pushed on the scopes
- * stack as the outermost scope.
- */
-
-#include "idl.h"
-#include "idl_extern.h"
-
-#include "fe_private.h"
-
-/*
- * Create a scoped name
- */
-static UTL_ScopedName *
-create_scoped_name(char *s)
-{
- return new UTL_ScopedName(new Identifier(s, 1, 0, I_FALSE), NULL);
-}
-
-/*
- * Populate the global scope with all predefined entities
- */
-void
-fe_populate(AST_Module *m)
-{
- AST_PredefinedType *pdt;
-
- pdt = idl_global->gen()->create_predefined_type(AST_PredefinedType::PT_long,
- create_scoped_name("long"),
- NULL);
- m->fe_add_predefined_type(pdt);
-
- pdt =
- idl_global->gen()->create_predefined_type(AST_PredefinedType::PT_ulong,
- create_scoped_name("unsigned long"),
- NULL);
- m->fe_add_predefined_type(pdt);
- pdt =
- idl_global->gen()
- ->create_predefined_type(AST_PredefinedType::PT_longlong,
- create_scoped_name("long long"),
- NULL);
- m->fe_add_predefined_type(pdt);
- pdt =
- idl_global->gen()
- ->create_predefined_type(AST_PredefinedType::PT_ulonglong,
- create_scoped_name("unsigned long long"),
- NULL);
- m->fe_add_predefined_type(pdt);
- pdt = idl_global->gen()->create_predefined_type(AST_PredefinedType::PT_short,
- create_scoped_name("short"),
- NULL);
- m->fe_add_predefined_type(pdt);
- pdt =
- idl_global->gen()->create_predefined_type(AST_PredefinedType::PT_ushort,
- create_scoped_name("unsigned short"),
- NULL);
- m->fe_add_predefined_type(pdt);
- pdt = idl_global->gen()->create_predefined_type(AST_PredefinedType::PT_float,
- create_scoped_name("float"),
- NULL);
- m->fe_add_predefined_type(pdt);
- pdt =
- idl_global->gen()->create_predefined_type(AST_PredefinedType::PT_double,
- create_scoped_name("double"),
- NULL);
- m->fe_add_predefined_type(pdt);
- pdt =
- idl_global->gen()
- ->create_predefined_type(AST_PredefinedType::PT_longdouble,
- create_scoped_name("long double"),
- NULL);
- m->fe_add_predefined_type(pdt);
- pdt = idl_global->gen()->create_predefined_type(AST_PredefinedType::PT_char,
- create_scoped_name("char"),
- NULL);
- m->fe_add_predefined_type(pdt);
- pdt =
- idl_global->gen()
- ->create_predefined_type(AST_PredefinedType::PT_wchar,
- create_scoped_name("wchar_t"),
- NULL);
- m->fe_add_predefined_type(pdt);
- pdt = idl_global->gen()->create_predefined_type(AST_PredefinedType::PT_octet,
- create_scoped_name("octet"),
- NULL);
- m->fe_add_predefined_type(pdt);
- pdt = idl_global->gen()->create_predefined_type(AST_PredefinedType::PT_any,
- create_scoped_name("any"),
- NULL);
- m->fe_add_predefined_type(pdt);
- pdt =
- idl_global->gen()->create_predefined_type(AST_PredefinedType::PT_boolean,
- create_scoped_name("boolean"),
- NULL);
- m->fe_add_predefined_type(pdt);
- pdt = idl_global->gen()->create_predefined_type(AST_PredefinedType::PT_void,
- create_scoped_name("void"),
- NULL);
- m->fe_add_predefined_type(pdt);
- pdt = idl_global->gen()
- ->create_predefined_type(AST_PredefinedType::PT_pseudo,
- create_scoped_name("Object"),
- NULL);
- m->fe_add_predefined_type(pdt);
- pdt = idl_global->gen()
- ->create_predefined_type(AST_PredefinedType::PT_pseudo,
- create_scoped_name("TypeCode"),
- NULL);
- m->fe_add_predefined_type(pdt);
-
- /*
- * Add these to make all keywords protected even in different spellings
- */
-
- pdt = idl_global->gen()
- ->create_predefined_type(AST_PredefinedType::PT_pseudo,
- create_scoped_name("attribute"),
- NULL);
- m->fe_add_predefined_type(pdt);
- pdt = idl_global->gen()
- ->create_predefined_type(AST_PredefinedType::PT_pseudo,
- create_scoped_name("case"),
- NULL);
- m->fe_add_predefined_type(pdt);
- pdt = idl_global->gen()
- ->create_predefined_type(AST_PredefinedType::PT_pseudo,
- create_scoped_name("const"),
- NULL);
- m->fe_add_predefined_type(pdt);
- pdt = idl_global->gen()
- ->create_predefined_type(AST_PredefinedType::PT_pseudo,
- create_scoped_name("context"),
- NULL);
- m->fe_add_predefined_type(pdt);
- pdt = idl_global->gen()
- ->create_predefined_type(AST_PredefinedType::PT_pseudo,
- create_scoped_name("default"),
- NULL);
- m->fe_add_predefined_type(pdt);
- pdt = idl_global->gen()
- ->create_predefined_type(AST_PredefinedType::PT_pseudo,
- create_scoped_name("enum"),
- NULL);
- m->fe_add_predefined_type(pdt);
- pdt = idl_global->gen()
- ->create_predefined_type(AST_PredefinedType::PT_pseudo,
- create_scoped_name("exception"),
- NULL);
- m->fe_add_predefined_type(pdt);
- pdt = idl_global->gen()
- ->create_predefined_type(AST_PredefinedType::PT_pseudo,
- create_scoped_name("in"),
- NULL);
- m->fe_add_predefined_type(pdt);
- pdt = idl_global->gen()
- ->create_predefined_type(AST_PredefinedType::PT_pseudo,
- create_scoped_name("out"),
- NULL);
- m->fe_add_predefined_type(pdt);
- pdt = idl_global->gen()
- ->create_predefined_type(AST_PredefinedType::PT_pseudo,
- create_scoped_name("inout"),
- NULL);
- m->fe_add_predefined_type(pdt);
- pdt = idl_global->gen()
- ->create_predefined_type(AST_PredefinedType::PT_pseudo,
- create_scoped_name("interface"),
- NULL);
- m->fe_add_predefined_type(pdt);
- pdt = idl_global->gen()
- ->create_predefined_type(AST_PredefinedType::PT_pseudo,
- create_scoped_name("module"),
- NULL);
- m->fe_add_predefined_type(pdt);
- pdt = idl_global->gen()
- ->create_predefined_type(AST_PredefinedType::PT_pseudo,
- create_scoped_name("oneway"),
- NULL);
- m->fe_add_predefined_type(pdt);
- pdt = idl_global->gen()
- ->create_predefined_type(AST_PredefinedType::PT_pseudo,
- create_scoped_name("raises"),
- NULL);
- m->fe_add_predefined_type(pdt);
- pdt = idl_global->gen()
- ->create_predefined_type(AST_PredefinedType::PT_pseudo,
- create_scoped_name("readonly"),
- NULL);
- m->fe_add_predefined_type(pdt);
- pdt = idl_global->gen()
- ->create_predefined_type(AST_PredefinedType::PT_pseudo,
- create_scoped_name("sequence"),
- NULL);
- m->fe_add_predefined_type(pdt);
- pdt = idl_global->gen()
- ->create_predefined_type(AST_PredefinedType::PT_pseudo,
- create_scoped_name("string"),
- NULL);
- m->fe_add_predefined_type(pdt);
- pdt = idl_global->gen()
- ->create_predefined_type(AST_PredefinedType::PT_pseudo,
- create_scoped_name("wstring_t"),
- NULL);
- m->fe_add_predefined_type(pdt);
- pdt = idl_global->gen()
- ->create_predefined_type(AST_PredefinedType::PT_pseudo,
- create_scoped_name("struct"),
- NULL);
- m->fe_add_predefined_type(pdt);
- pdt = idl_global->gen()
- ->create_predefined_type(AST_PredefinedType::PT_pseudo,
- create_scoped_name("switch"),
- NULL);
- m->fe_add_predefined_type(pdt);
- pdt = idl_global->gen()
- ->create_predefined_type(AST_PredefinedType::PT_pseudo,
- create_scoped_name("typedef"),
- NULL);
- m->fe_add_predefined_type(pdt);
- pdt = idl_global->gen()
- ->create_predefined_type(AST_PredefinedType::PT_pseudo,
- create_scoped_name("union"),
- NULL);
- m->fe_add_predefined_type(pdt);
- pdt = idl_global->gen()
- ->create_predefined_type(AST_PredefinedType::PT_pseudo,
- create_scoped_name("unsigned"),
- NULL);
- m->fe_add_predefined_type(pdt);
- pdt = idl_global->gen()
- ->create_predefined_type(AST_PredefinedType::PT_pseudo,
- create_scoped_name("TRUE"),
- NULL);
- m->fe_add_predefined_type(pdt);
- pdt = idl_global->gen()
- ->create_predefined_type(AST_PredefinedType::PT_pseudo,
- create_scoped_name("FALSE"),
- NULL);
- m->fe_add_predefined_type(pdt);
-}
-
-/*
- * Initialization stage 1: create global scopes stack
- */
-void
-FE_init_stage1()
-{
- idl_global->set_scopes(new UTL_ScopeStack());
- if (idl_global->scopes() == NULL) {
- cerr << GTDEVEL("IDL: FE init failed to create scope stack, exiting\n");
- exit(99);
- }
-}
-
-/*
- * Initialization stage 2: create global scope and populate it
- */
-void
-FE_init_stage2()
-{
- AST_Root *r;
-
- /*
- * Check that the BE init created a generator object
- */
- if (idl_global->gen() == NULL) {
- cerr << GTDEVEL("IDL: BE did not initialize idl_global->gen(), exiting\n");
- exit(99);
- }
- /*
- * Create a global root for the AST. Note that the AST root has no
- * name
- */
- r = idl_global->gen()->create_root(create_scoped_name(""), NULL);
- idl_global->set_root(r);
- if (r == NULL) {
- cerr << GTDEVEL("IDL: FE init failed to create AST root, exiting\n");
- exit(99);
- }
- /*
- * Push it on the stack
- */
- idl_global->scopes()->push(idl_global->root());
- /*
- * Populate it with nodes for predefined types
- */
- fe_populate(idl_global->root());
- /*
- * Set flag to indicate we are processing the main file now
- */
- idl_global->set_in_main_file(I_TRUE);
-}
diff --git a/TAO/TAO_IDL/fe/fe_interface_header.cpp b/TAO/TAO_IDL/fe/fe_interface_header.cpp
deleted file mode 100644
index b493bde1969..00000000000
--- a/TAO/TAO_IDL/fe/fe_interface_header.cpp
+++ /dev/null
@@ -1,282 +0,0 @@
-/*
-
-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.
-
- */
-
-/*
- * fe_interface_header.cc - Implements the FE private class FE_InterfaceHeader
- *
- * FE_InterfaceHeader instances are used to store information about an
- * interface header as the interface is being parsed and before the
- * AST_Interface node used to represent this interface is created.
- */
-
-#include "idl.h"
-#include "idl_extern.h"
-
-#include "fe_private.h"
-
-/*
- * Constructor(s) and destructor
- */
-
-FE_InterfaceHeader::FE_InterfaceHeader(UTL_ScopedName *n, UTL_NameList *nl)
- : pd_interface_name(n)
-{
- compile_inheritance(nl);
-}
-
-/*
- * Private operations
- */
-
-// Compute flattened, non-repeating list of inherited interfaces
-
-#undef INCREMENT
-#define INCREMENT 512
-
-/*
- * Private storage used to store interfaces seen already in the
- * computation of the unique, flattened inheritance list
- */
-static AST_Interface **iseen = NULL;
-static long iallocated = 0;
-static long iused = 0;
-
-/*
- * Add an interface to an inheritance spec
- */
-static void
-add_inheritance(AST_Interface *i)
-{
- long oiallocated;
- long k;
- AST_Interface **oiseen;
-
- /*
- * Make sure there's space for one more
- */
- if (iallocated == iused) {
- if (iallocated == 0) {
- iallocated = INCREMENT;
- iseen = new AST_Interface *[iallocated];
- } else {
- oiallocated = iallocated;
- oiseen = iseen;
- iallocated += INCREMENT;
- iseen = new AST_Interface *[iallocated];
- for (k = 0; k < iused; k++)
- iseen[k] = oiseen[k];
- delete oiseen;
- }
- }
- /*
- * OK, now insert it
- */
- iseen[iused] = i;
- iused++;
-}
-
-/*
- * Have we already seen this interface?
- */
-static long
-already_seen(AST_Interface *ip)
-{
- long i;
-
- for (i = 0; i < iused; i++) {
- if (iseen[i] == ip)
- return I_TRUE;
- }
- return I_FALSE;
-}
-
-/*
- * Add this interface to the list of inherited if not already there
- */
-void
-FE_InterfaceHeader::compile_one_inheritance(AST_Interface *i)
-{
- /*
- * Check for badly formed interface
- */
- if (i == NULL)
- return;
- /*
- * If we've seen it already then don't expand again
- */
- if (already_seen(i))
- return;
- /*
- * OK, add i to the list of inherited interfaces
- */
- add_inheritance(i);
-}
-
-/*
- * Compute the list of top-level interfaces this one inherits from
- */
-void
-FE_InterfaceHeader::compile_inheritance(UTL_NameList *nl)
-{
- UTL_NamelistActiveIterator *l = new UTL_NamelistActiveIterator(nl);
- AST_Decl *d;
- AST_Interface *i;
- long k;
-
- iused = 0;
- /*
- * Compute expanded flattened non-repeating list of interfaces
- * which this one inherits from
- */
- while (!(l->is_done())) {
- /*
- * Check that scope stack is valid
- */
- if (idl_global->scopes()->top() == NULL) {
- idl_global->err()->lookup_error(l->item());
- return;
- }
- /*
- * Look it up
- */
- d = idl_global->scopes()->top()->lookup_by_name(l->item(), I_TRUE);
- /*
- * Not found?
- */
- if (d == NULL) {
- idl_global->err()->lookup_error(l->item());
- return;
- }
- /*
- * Not an interface?
- */
- while(d->node_type() == AST_Decl::NT_typedef)
- d = AST_Typedef::narrow_from_decl(d)->base_type();
- if (d->node_type() != AST_Decl::NT_interface) {
- idl_global->err()->inheritance_error(pd_interface_name, d);
- return;
- }
- /*
- * OK, cast to an interface
- */
- i = AST_Interface::narrow_from_decl(d);
- if (i == NULL)
- idl_global->err()->inheritance_error(pd_interface_name, d);
- /*
- * Forward declared interface?
- */
- if (!i->is_defined()) {
- idl_global->err()->inheritance_fwd_error(pd_interface_name, i);
- return;
- }
- /*
- * OK, see if we have to add this to the list of interfaces
- * inherited from
- */
- compile_one_inheritance(i);
-
- /*
- * Next element in header list
- */
- l->next();
- }
- delete l;
- /*
- * OK, install in interface header
- */
- pd_inherits = new AST_Interface *[iused];
- for (k = 0; k < iused; k++)
- pd_inherits[k] = iseen[k];
- pd_n_inherits = iused;
-}
-
-/*
- * Public operations
- */
-
-/*
- * Redefinition of inherited virtual operations
- */
-
-/*
- * Data accessors
- */
-
-UTL_ScopedName *
-FE_InterfaceHeader::interface_name()
-{
- return pd_interface_name;
-}
-
-AST_Interface **
-FE_InterfaceHeader::inherits()
-{
- return pd_inherits;
-}
-
-long
-FE_InterfaceHeader::n_inherits()
-{
- return pd_n_inherits;
-}
diff --git a/TAO/TAO_IDL/fe/fe_private.cpp b/TAO/TAO_IDL/fe/fe_private.cpp
deleted file mode 100644
index 30fe3c3cfc0..00000000000
--- a/TAO/TAO_IDL/fe/fe_private.cpp
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
-
-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.
-
- */
-
-/*
- * fe_private.cc - Declare global data which are private to the FE
- * part
- */
-
-#include "idl.h"
-#include "idl_extern.h"
-
-#include "fe_private.h"
-
-/*
- * List of pragmas
- */
-UTL_StrList *DRV_global_pragmas = NULL;
diff --git a/TAO/TAO_IDL/fe/idl.ll b/TAO/TAO_IDL/fe/idl.ll
deleted file mode 100644
index 9b41d547492..00000000000
--- a/TAO/TAO_IDL/fe/idl.ll
+++ /dev/null
@@ -1,527 +0,0 @@
-
-%{
-/*
-
-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.
-
-IDL_INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED AS IS WITH NO WARRANTIES OF
-IDL_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.
-
-IDL_INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED WITH NO SUPPORT AND WITHOUT
-IDL_ANY OBLIGATION ON THE PART OF Sun OR IDL_ANY OF ITS SUBSIDIARIES OR AFFILIATES
-TO ASSIST IDL_IN ITS USE, CORRECTION, MODIFICATION OR ENHANCEMENT.
-
-SUN OR IDL_ANY OF ITS SUBSIDIARIES OR AFFILIATES SHALL HAVE NO LIABILITY WITH
-RESPECT TO THE INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR IDL_ANY PATENTS BY
-IDL_INTERFACE DEFINITION LANGUAGE CFE OR IDL_ANY PART THEREOF.
-
-IDL_IN NO EVENT WILL SUN OR IDL_ANY OF ITS SUBSIDIARIES OR AFFILIATES BE LIABLE FOR
-IDL_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.
-
- */
-
-/*
- * idl.ll - Lexical scanner for IDL 1.1
- */
-
-#include "idl.h"
-#include "idl_extern.h"
-#include "fe_private.h"
-#include "y.tab.h"
-
-static char idl_escape_reader(char *);
-static double idl_atof(char *);
-static long idl_atoi(char *, long);
-static void idl_parse_line_and_file(char *);
-static void idl_store_pragma(char *);
-
-#if 0 /* defined (HPUX) */
-// HPUX has yytext typed to unsigned char *. We make sure here that
-// we'll always use char * static char* __yytext = (char*) yytext;
-// NOTE: This will not work under flex(1) were yytext is not a fixed
-// buffer, but a dynamically allocated one. This function should do
-// the trick for us.
-inline char *__yytext()
-{
- return (char *) yytext;
-}
-#define ace_yytext __yytext()
-#else
-#define ace_yytext yytext
-#endif /* 0 */
-%}
-
-%array
-
-%%
-
-any return IDL_ANY;
-module return IDL_MODULE;
-raises return IDL_RAISES;
-readonly return IDL_READONLY;
-attribute return IDL_ATTRIBUTE;
-exception return IDL_EXCEPTION;
-context return IDL_CONTEXT;
-interface return IDL_INTERFACE;
-const return IDL_CONST;
-typedef return IDL_TYPEDEF;
-struct return IDL_STRUCT;
-enum return IDL_ENUM;
-string return IDL_STRING;
-wstring_t return IDL_WSTRING;
-sequence return IDL_SEQUENCE;
-union return IDL_UNION;
-switch return IDL_SWITCH;
-case return IDL_CASE;
-default return IDL_DEFAULT;
-float return IDL_FLOAT;
-double return IDL_DOUBLE;
-long return IDL_LONG;
-short return IDL_SHORT;
-unsigned return IDL_UNSIGNED;
-char return IDL_CHAR;
-wchar_t return IDL_WCHAR;
-boolean return IDL_BOOLEAN;
-octet return IDL_OCTET;
-void return IDL_VOID;
-
-TRUE return IDL_TRUETOK;
-FALSE return IDL_FALSETOK;
-
-inout return IDL_INOUT;
-in return IDL_IN;
-out return IDL_OUT;
-oneway return IDL_ONEWAY;
-
-\<\< return IDL_LEFT_SHIFT;
-\>\> return IDL_RIGHT_SHIFT;
-\:\: {
- yylval.strval = "::";
- return IDL_SCOPE_DELIMITOR;
- }
-
-[a-zA-Z][a-zA-Z0-9_]* {
- char *z = (char *) malloc(strlen(ace_yytext) + 1);
- strcpy(z, ace_yytext);
- yylval.strval = z;
- return IDENTIFIER;
-}
-
--?[0-9]+"."[0-9]*([eE][+-]?[0-9]+)?[lLfF]? {
- yylval.dval = idl_atof(ace_yytext);
- return IDL_FLOATING_PT_LITERAL;
- }
--?[0-9]+[eE][+-]?[0-9]+[lLfF]? {
- yylval.dval = idl_atof(ace_yytext);
- return IDL_FLOATING_PT_LITERAL;
- }
-
--?[1-9][0-9]* {
- yylval.ival = idl_atoi(ace_yytext, 10);
- return IDL_INTEGER_LITERAL;
- }
--?0[xX][a-fA-F0-9]+ {
- yylval.ival = idl_atoi(ace_yytext, 16);
- return IDL_INTEGER_LITERAL;
- }
--?0[0-7]* {
- yylval.ival = idl_atoi(ace_yytext, 8);
- return IDL_INTEGER_LITERAL;
- }
-
-"\""[^\"]*"\"" {
- /* Skip the quotes */
- char *tmp = ace_yytext;
- tmp[strlen(tmp)-1] = '\0';
- yylval.sval = new String(tmp + 1);
- return IDL_STRING_LITERAL;
- }
-"'"."'" {
- yylval.cval = ace_yytext [1];
- return IDL_CHARACTER_LITERAL;
- }
-"'"\\([0-7]{1,3})"'" {
- // octal character constant
- yylval.cval = idl_escape_reader(ace_yytext + 1);
- return IDL_CHARACTER_LITERAL;
- }
-"'"\\."'" {
- yylval.cval = idl_escape_reader(ace_yytext + 1);
- return IDL_CHARACTER_LITERAL;
- }
-^#[ \t]*pragma[ \t].*\n {/* remember pragma */
- idl_global->set_lineno(idl_global->lineno() + 1);
- idl_store_pragma(ace_yytext);
- }
-^#[ \t]*[0-9]*" ""\""[^\"]*"\""" "[0-9]*\n {
- idl_parse_line_and_file(ace_yytext);
- }
-^#[ \t]*[0-9]*" ""\""[^\"]*"\""\n {
- idl_parse_line_and_file(ace_yytext);
- }
-^#line[ \t]*[0-9]*" ""\""[^\"]*"\""\n {
- idl_parse_line_and_file(ace_yytext);
- }
-^#[ \t]*[0-9]*\n {
- idl_parse_line_and_file(ace_yytext);
- }
-^#[ \t]*ident.*\n {
- /* ignore cpp ident */
- idl_global->set_lineno(idl_global->lineno() + 1);
- }
-\/\/.*\n {
- /* ignore comments */
- idl_global->set_lineno(idl_global->lineno() + 1);
- }
-"/*" {
- for(;;) {
- char c = yyinput();
- if (c == '*') {
- char next = yyinput();
- if (next == '/')
- break;
- else
- yyunput(c, NULL);
- if (c == '\n')
- idl_global->set_lineno(idl_global->lineno() + 1);
- }
- }
- }
-[ \t]* ;
-\n {
- idl_global->set_lineno(idl_global->lineno() + 1);
- }
-. return ace_yytext [0];
-
-%%
- /* subroutines */
-
-/*
- * Strip down a name to the last component, i.e. everything after the last
- * '/' character
- */
-static char *
-stripped_name(UTL_String *fn)
-{
- char *n = fn->get_string();
- long l;
-
- if (n == NULL)
- return NULL;
- l = strlen(n);
- for (n += l; l > 0 && *n != '/'; l--, n--);
- if (*n == '/') n++;
- return n;
-}
-
-/*
- * Parse a #line statement generated by the C preprocessor
- */
-static void
-idl_parse_line_and_file(char *buf)
-{
- char *r = buf;
- char *h;
- UTL_String *nm;
-
- /* Skip initial '#' */
- if (*r != '#')
- return;
- else
- r++;
-
- /* Check to see if we're running under the screwy Microsoft scheme */
- /* of putting #line num instead of #num. */
-
- if (ACE_OS::strncmp (r, "line", 4) == 0)
- r += 5;
-
- /* Find line number */
- while (*r == ' ' || *r == '\t')
- r++;
- h = r;
- for (; *r != '\0' && *r != ' ' && *r != '\t'; r++)
- continue;
- *r++ = 0;
- idl_global->set_lineno(idl_atoi(h, 10));
-
- /* Find file name, if present */
- for (; *r != '"'; r++)
- if (*r == '\n' || *r == '\0')
- return;
-
- h = ++r;
- for (; *r != '"'; r++)
- continue;
- *r = 0;
- if (*h == '\0')
- idl_global->set_filename(new String("standard input"));
- else
- {
- long i;
- long j;
-
- // Put Microsoft-style pathnames into a canonical form.
- for (i = 0, j = 0; h[j] != '\0'; i++, j++)
- {
- if (h[j] == '\\' && h[j + 1] == '\\')
- j++;
-
- h[i] = h[j];
- }
- h[i] = '\0';
- idl_global->set_filename(new String(h));
- }
- idl_global->set_in_main_file(
- (idl_global->filename()->compare(idl_global->real_filename())) ?
- I_TRUE :
- I_FALSE
- );
- /*
- * If it's an import file store the stripped name for the BE to use
- */
- if (!(idl_global->in_main_file()) && idl_global->import()) {
- nm = new UTL_String(stripped_name(idl_global->filename()));
- idl_global->store_include_file_name(nm);
- }
-}
-
-/*
- * Store a #pragma line into the list of pragmas
- */
-static void
-idl_store_pragma(char *buf)
-{
- char *cp = buf + 1;
- while(*cp != 'p')
- cp++;
- while(*cp != ' ' && *cp != '\t')
- cp++;
- while(*cp == ' ' || *cp == '\t')
- cp++;
- char pragma[80];
- char *pp = pragma;
- while(*cp != '\n') {
- *pp++ = *cp++;
- }
- *pp = 0;
- if (strcmp(pragma, "import") == 0) {
- idl_global->set_import(I_TRUE);
- return;
- }
- if (strcmp(pragma, "include") == 0) {
- idl_global->set_import(I_FALSE);
- return;
- }
- UTL_StrList *p = idl_global->pragmas();
- if (p == NULL)
- idl_global->set_pragmas(new UTL_StrList(new String(buf), NULL));
- else {
- p->nconc(new UTL_StrList(new String(buf), NULL));
- idl_global->set_pragmas(p);
- }
-}
-
-/*
- * idl_atoi - Convert a string of digits into an integer according to base b
- */
-static long
-idl_atoi(char *s, long b)
-{
- long r = 0;
- long negative = 0;
-
- if (*s == '-') {
- negative = 1;
- s++;
- }
- if (b == 8 && *s == '0')
- s++;
- else if (b == 16 && *s == '0' && (*(s + 1) == 'x' || *(s + 1) == 'X'))
- s += 2;
-
- for (; *s; s++)
- if (*s <= '9' && *s >= '0')
- r = (r * b) + (*s - '0');
- else if (b > 10 && *s <= 'f' && *s >= 'a')
- r = (r * b) + (*s - 'a' + 10);
- else if (b > 10 && *s <= 'F' && *s >= 'A')
- r = (r * b) + (*s - 'A' + 10);
- else
- break;
-
- if (negative)
- r *= -1;
-
- return r;
-}
-
-/*
- * Convert a string to a float; atof doesn't seem to work, always.
- */
-static double
-idl_atof(char *s)
-{
- char *h = s;
- double d = 0.0;
- double f = 0.0;
- double e, k;
- long neg = 0, negexp = 0;
-
- ACE_UNUSED_ARG (f);
- ACE_UNUSED_ARG (h);
-
- if (*s == '-') {
- neg = 1;
- s++;
- }
- while (*s >= '0' && *s <= '9') {
- d = (d * 10) + *s - '0';
- s++;
- }
- if (*s == '.') {
- s++;
- e = 10;
- while (*s >= '0' && *s <= '9') {
- d += (*s - '0') / (e * 1.0);
- e *= 10;
- s++;
- }
- }
- if (*s == 'e' || *s == 'E') {
- s++;
- if (*s == '-') {
- negexp = 1;
- s++;
- } else if (*s == '+')
- s++;
- e = 0;
- while (*s >= '0' && *s <= '9') {
- e = (e * 10) + *s - '0';
- s++;
- }
- if (e > 0) {
- for (k = 1; e > 0; k *= 10, e--);
- if (negexp)
- d /= k;
- else
- d *= k;
- }
- }
-
- if (neg) d *= -1.0;
-
- return d;
-}
-
-/*
- * Convert (some) escaped characters into their ascii values
- */
-static char
-idl_escape_reader(
- char *str
-)
-{
- if (str[0] != '\\') {
- return str[0];
- }
-
- switch (str[1]) {
- case 'n':
- return '\n';
- case 't':
- return '\t';
- case 'v':
- return '\v';
- case 'b':
- return '\b';
- case 'r':
- return '\r';
- case 'f':
- return '\f';
- case 'a':
- return '\a';
- case '\\':
- return '\\';
- case '\?':
- return '?';
- case '\'':
- return '\'';
- case '"':
- return '"';
- case 'x':
- {
- int i;
- // hex value
- for (i = 2; str[i] != '\0' && isxdigit(str[i]); i++) {
- continue;
- }
- char save = str[i];
- str[i] = '\0';
- char out = (char)idl_atoi(&str[2], 16);
- str[i] = save;
- return out;
- }
- break;
- default:
- // check for octal value
- if (str[1] >= '0' && str[1] <= '7') {
- int i;
- for (i = 1; str[i] >= '0' && str[i] <= '7'; i++) {
- continue;
- }
- char save = str[i];
- str[i] = '\0';
- char out = (char)idl_atoi(&str[1], 8);
- str[i] = save;
- return out;
- } else {
- return str[1] - 'a';
- }
- break;
- }
-}
diff --git a/TAO/TAO_IDL/fe/idl.yy b/TAO/TAO_IDL/fe/idl.yy
deleted file mode 100644
index 63ef3e24b25..00000000000
--- a/TAO/TAO_IDL/fe/idl.yy
+++ /dev/null
@@ -1,2265 +0,0 @@
-
-
-/*
-
-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.
-
-IDL_INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED AS IS WITH NO WARRANTIES OF
-IDL_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.
-
-IDL_INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED WITH NO SUPPORT AND WITHOUT
-IDL_ANY OBLIGATION ON THE PART OF Sun OR IDL_ANY OF ITS SUBSIDIARIES OR AFFILIATES
-TO ASSIST IDL_IN ITS USE, CORRECTION, MODIFICATION OR ENHANCEMENT.
-
-SUN OR IDL_ANY OF ITS SUBSIDIARIES OR AFFILIATES SHALL HAVE NO LIABILITY WITH
-RESPECT TO THE INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR IDL_ANY PATENTS BY
-IDL_INTERFACE DEFINITION LANGUAGE CFE OR IDL_ANY PART THEREOF.
-
-IDL_IN NO EVENT WILL SUN OR IDL_ANY OF ITS SUBSIDIARIES OR AFFILIATES BE LIABLE FOR
-IDL_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.
-
- */
-
-/*
- * idl.yy - YACC grammar for IDL 1.1
- */
-
-/* Declarations */
-
-%{
-#include "idl.h"
-#include "idl_extern.h"
-#include "fe_private.h"
-#include <stdio.h>
-
-#if (defined(apollo) || defined(hpux)) && defined(__cplusplus)
-extern "C" int yywrap();
-#endif // (defined(apollo) || defined(hpux)) && defined(__cplusplus)
-
-void yyerror (char *);
-int yylex (void);
-extern "C" int yywrap (void);
-extern char yytext[];
-extern int yyleng;
-#define YYDEBUG_LEXER_TEXT (yytext[yyleng] = '\0', yytext)
-// Force the pretty debugging code to compile.
-#define YYDEBUG 1
-%}
-
-/*
- * Declare the type of values in the grammar
- */
-
-%union {
- AST_Decl *dcval; /* Decl value */
- UTL_StrList *slval; /* String list */
- UTL_NameList *nlval; /* Name list */
- UTL_ExprList *elval; /* Expression list */
- UTL_LabelList *llval; /* Label list */
- UTL_DeclList *dlval; /* Declaration list */
- FE_InterfaceHeader *ihval; /* Interface header */
- AST_Expression *exval; /* Expression value */
- AST_UnionLabel *ulval; /* Union label */
- AST_Field *ffval; /* Field value */
- AST_Expression::ExprType etval; /* Expression type */
- AST_Argument::Direction dival; /* Argument direction */
- AST_Operation::Flags ofval; /* Operation flags */
- FE_Declarator *deval; /* Declarator value */
- idl_bool bval; /* Boolean value */
- long ival; /* Long value */
- double dval; /* Double value */
- float fval; /* Float value */
- char cval; /* Char value */
-
- String *sval; /* String value */
- char *strval; /* char * value */
- Identifier *idval; /* Identifier */
- UTL_IdList *idlist; /* Identifier list */
-}
-
-/*
- * Token types: These are returned by the lexer
- */
-
-%token <strval> IDENTIFIER
-
-%token IDL_CONST
-%token IDL_MODULE
-%token IDL_INTERFACE
-%token IDL_TYPEDEF
-%token IDL_LONG
-%token IDL_SHORT
-%token IDL_UNSIGNED
-%token IDL_DOUBLE
-%token IDL_FLOAT
-%token IDL_CHAR
-%token IDL_WCHAR
-%token IDL_OCTET
-%token IDL_BOOLEAN
-%token IDL_ANY
-%token IDL_STRUCT
-%token IDL_UNION
-%token IDL_SWITCH
-%token IDL_ENUM
-%token IDL_SEQUENCE
-%token IDL_STRING
-%token IDL_WSTRING
-%token IDL_EXCEPTION
-%token IDL_CASE
-%token IDL_DEFAULT
-%token IDL_READONLY
-%token IDL_ATTRIBUTE
-%token IDL_ONEWAY
-%token IDL_IDEMPOTENT
-%token IDL_VOID
-%token IDL_IN
-%token IDL_OUT
-%token IDL_INOUT
-%token IDL_RAISES
-%token IDL_CONTEXT
-
-%token <ival> IDL_INTEGER_LITERAL
-%token <sval> IDL_STRING_LITERAL
-%token <cval> IDL_CHARACTER_LITERAL
-%token <dval> IDL_FLOATING_PT_LITERAL
-%token IDL_TRUETOK
-%token IDL_FALSETOK
-
-%token <strval> IDL_SCOPE_DELIMITOR
-%token IDL_LEFT_SHIFT
-%token IDL_RIGHT_SHIFT
-
-/*
- * These are production names:
- */
-
-%type <dcval> type_spec simple_type_spec constructed_type_spec
-%type <dcval> template_type_spec sequence_type_spec string_type_spec
-%type <dcval> struct_type enum_type switch_type_spec union_type
-%type <dcval> array_declarator op_type_spec seq_head wstring_type_spec
-%type <dcval> param_type_spec
-
-%type <idlist> scoped_name
-%type <slval> opt_context at_least_one_string_literal
-%type <slval> string_literals
-
-%type <nlval> at_least_one_scoped_name scoped_names inheritance_spec
-%type <nlval> opt_raises
-
-%type <elval> at_least_one_array_dim array_dims
-
-%type <llval> at_least_one_case_label case_labels
-
-%type <dlval> at_least_one_declarator declarators
-%type <dlval> at_least_one_simple_declarator simple_declarators
-
-%type <ihval> interface_header
-
-%type <exval> expression const_expr or_expr xor_expr and_expr shift_expr
-%type <exval> add_expr mult_expr unary_expr primary_expr literal
-%type <exval> positive_int_expr array_dim
-
-%type <ulval> case_label
-
-%type <ffval> element_spec
-
-%type <etval> const_type integer_type char_type boolean_type
-%type <etval> floating_pt_type any_type signed_int
-%type <etval> unsigned_int base_type_spec octet_type
-
-%type <dival> direction
-
-%type <ofval> opt_op_attribute
-
-%type <deval> declarator simple_declarator complex_declarator
-
-%type <bval> opt_readonly
-
-%type <idval> interface_decl id
-
-%type <ival> type_dcl
-%%
-
-/*
- * Production starts here
- */
-start : definitions ;
-
-definitions
- : definition definitions
- | /* empty */
- ;
-
-definition
- : type_dcl
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_TypeDeclSeen);
- }
- ';'
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_NoState);
- }
- | const_dcl
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_ConstDeclSeen);
- }
- ';'
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_NoState);
- }
- | exception
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_ExceptDeclSeen);
- }
- ';'
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_NoState);
- }
- | interface_def
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_InterfaceDeclSeen);
- }
- ';'
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_NoState);
- }
- | module
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_ModuleDeclSeen);
- }
- ';'
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_NoState);
- }
- | error
- {
- idl_global->err()->syntax_error(idl_global->parse_state());
- }
- ';'
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_NoState);
- yyerrok;
- }
- ;
-
-module : IDL_MODULE
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_ModuleSeen);
- }
- IDENTIFIER
- {
- UTL_ScopedName *n =
- new UTL_ScopedName(new Identifier($3, 1, 0, I_FALSE), NULL);
- AST_Module *m = NULL;
- UTL_Scope *s = idl_global->scopes()->top_non_null();
- UTL_StrList *p = idl_global->pragmas();
-
- idl_global->set_parse_state(IDL_GlobalData::PS_ModuleIDSeen);
- /*
- * Make a new module and add it to the enclosing scope
- */
- if (s != NULL) {
- m = idl_global->gen()->create_module(n, p);
- (void) s->fe_add_module(m);
- }
- /*
- * Push it on the stack
- */
- idl_global->scopes()->push(m);
- }
- '{'
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_ModuleSqSeen);
- }
- definitions
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_ModuleBodySeen);
- }
- '}'
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_ModuleQsSeen);
- /*
- * Finished with this module - pop it from the scope stack
- */
- idl_global->scopes()->pop();
- }
- ;
-
-interface_def
- : interface
- | forward
- ;
-
-interface :
- interface_header
- {
- UTL_Scope *s = idl_global->scopes()->top_non_null();
- AST_Interface *i = NULL;
- AST_Decl *v = NULL;
- UTL_StrList *p = idl_global->pragmas();
- AST_Decl *d = NULL;
- AST_Interface *fd = NULL;
-
- ACE_UNUSED_ARG (v);
-
- /*
- * Make a new interface node and add it to its enclosing scope
- */
- if (s != NULL && $1 != NULL) {
- i = idl_global->gen()->create_interface($1->interface_name(),
- $1->inherits(),
- $1->n_inherits(),
- p);
- if (i != NULL &&
- (d = s->lookup_by_name(i->name(), I_FALSE)) != NULL) {
- /*
- * See if we're defining a forward declared interface.
- */
- if (d->node_type() == AST_Decl::NT_interface) {
- /*
- * Narrow to an interface
- */
- fd = AST_Interface::narrow_from_decl(d);
- /*
- * Successful?
- */
- if (fd == NULL) {
- /*
- * Should we give an error here?
- */
- }
- /*
- * If it is a forward declared interface..
- */
- else if (!fd->is_defined()) {
- /*
- * Check if redefining in same scope
- */
- if (fd->defined_in() != s) {
- idl_global->err()
- ->error3(UTL_Error::EIDL_SCOPE_CONFLICT,
- i,
- fd,
- ScopeAsDecl(s));
- }
- /*
- * All OK, do the redefinition
- */
- else {
- fd->set_inherits($1->inherits());
- fd->set_n_inherits($1->n_inherits());
- /*
- * Update place of definition
- */
- fd->set_imported(idl_global->imported());
- fd->set_in_main_file(idl_global->in_main_file());
- fd->set_line(idl_global->lineno());
- fd->set_file_name(idl_global->filename());
- fd->add_pragmas(p);
- /*
- * Use full definition node
- */
- delete i;
- i = fd;
- }
- }
- }
- }
- /*
- * Add the interface to its definition scope
- */
- (void) s->fe_add_interface(i);
- }
- /*
- * Push it on the scope stack
- */
- idl_global->scopes()->push(i);
- }
- '{'
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_InterfaceSqSeen);
- }
- exports
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_InterfaceBodySeen);
- }
- '}'
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_InterfaceQsSeen);
- /*
- * Done with this interface - pop it off the scopes stack
- */
- idl_global->scopes()->pop();
- }
- ;
-
-interface_decl:
- IDL_INTERFACE
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_InterfaceSeen);
- }
- id
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_InterfaceIDSeen);
- $$ = $3;
- }
- ;
-
-interface_header :
- interface_decl inheritance_spec
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_InheritSpecSeen);
- /*
- * Create an AST representation of the information in the header
- * part of an interface - this representation contains a computed
- * list of all interfaces which this interface inherits from,
- * recursively
- */
- $$ = new FE_InterfaceHeader(new UTL_ScopedName($1, NULL), $2);
- }
- ;
-
-inheritance_spec
- : ':'
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_InheritColonSeen);
- }
- at_least_one_scoped_name
- {
- $$ = $3;
- }
- | /* EMPTY */
- {
- $$ = NULL;
- }
- ;
-
-exports
- : exports export
- | /* EMPTY */
- ;
-
-export
- : type_dcl
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_TypeDeclSeen);
- }
- ';'
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_NoState);
- }
- | const_dcl
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_ConstDeclSeen);
- }
- ';'
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_NoState);
- }
- | exception
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_ExceptDeclSeen);
- }
- ';'
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_NoState);
- }
- | attribute
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_AttrDeclSeen);
- }
- ';'
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_NoState);
- }
- | operation
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_OpDeclSeen);
- }
- ';'
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_NoState);
- }
- | error
- {
- idl_global->err()->syntax_error(idl_global->parse_state());
- }
- ';'
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_NoState);
- yyerrok;
- }
- ;
-
-at_least_one_scoped_name :
- scoped_name scoped_names
- {
- $$ = new UTL_NameList($1, $2);
- }
- ;
-
-scoped_names
- : scoped_names
- ','
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_SNListCommaSeen);
- }
- scoped_name
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_ScopedNameSeen);
-
- if ($1 == NULL)
- $$ = new UTL_NameList($4, NULL);
- else {
- $1->nconc(new UTL_NameList($4, NULL));
- $$ = $1;
- }
- }
- | /* EMPTY */
- {
- $$ = NULL;
- }
- ;
-
-scoped_name
- : id
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_SN_IDSeen);
-
- $$ = new UTL_IdList($1, NULL);
- }
- | IDL_SCOPE_DELIMITOR
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_ScopeDelimSeen);
- }
- id
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_SN_IDSeen);
-
- $$ = new UTL_IdList(new Identifier($1, 1, 0, I_FALSE),
- new UTL_IdList($3, NULL));
- }
- | scoped_name
- IDL_SCOPE_DELIMITOR
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_ScopeDelimSeen);
- }
- id
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_SN_IDSeen);
-
- $1->nconc(new UTL_IdList($4, NULL));
- $$ = $1;
- }
- ;
-
-id: IDENTIFIER
- {
- $$ = new Identifier($1, 1, 0, I_FALSE);
- }
- ;
-
-forward :
- interface_decl
- {
- UTL_Scope *s = idl_global->scopes()->top_non_null();
- UTL_ScopedName *n = new UTL_ScopedName($1, NULL);
- AST_InterfaceFwd *f = NULL;
- UTL_StrList *p = idl_global->pragmas();
-
- idl_global->set_parse_state(IDL_GlobalData::PS_ForwardDeclSeen);
- /*
- * Create a node representing a forward declaration of an
- * interface. Store it in the enclosing scope
- */
- if (s != NULL) {
- f = idl_global->gen()->create_interface_fwd(n, p);
- (void) s->fe_add_interface_fwd(f);
- }
- }
- ;
-
-const_dcl :
- IDL_CONST
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_ConstSeen);
- }
- const_type
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_ConstTypeSeen);
- }
- id
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_ConstIDSeen);
- }
- '='
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_ConstAssignSeen);
- }
- expression
- {
- UTL_ScopedName *n = new UTL_ScopedName($5, NULL);
- UTL_Scope *s = idl_global->scopes()->top_non_null();
- AST_Constant *c = NULL;
- UTL_StrList *p = idl_global->pragmas();
- AST_Decl *v = NULL;
-
- ACE_UNUSED_ARG (v);
-
- idl_global->set_parse_state(IDL_GlobalData::PS_ConstExprSeen);
- /*
- * Create a node representing a constant declaration. Store
- * it in the enclosing scope
- */
- if ($9 != NULL && s != NULL) {
- if ($9->coerce($3) == NULL)
- idl_global->err()->coercion_error($9, $3);
- else {
- c =
- idl_global->gen()->create_constant($3, $9, n, p);
- (void) s->fe_add_constant(c);
- }
- }
- }
- ;
-
-const_type
- : integer_type
- | char_type
- | octet_type
- | boolean_type
- | floating_pt_type
- | string_type_spec
- {
- $$ = AST_Expression::EV_string;
- }
- | wstring_type_spec
- {
- $$ = AST_Expression::EV_wstring;
- }
- | scoped_name
- {
- UTL_Scope *s = idl_global->scopes()->top_non_null();
- AST_Decl *d = NULL;
- AST_PredefinedType *c = NULL;
- AST_Typedef *t = NULL;
-
- /*
- * If the constant's type is a scoped name, it must resolve
- * to a scalar constant type
- */
- if (s != NULL && (d = s->lookup_by_name($1, I_TRUE)) != NULL) {
- /*
- * Look through typedefs
- */
- while (d->node_type() == AST_Decl::NT_typedef) {
- t = AST_Typedef::narrow_from_decl(d);
- if (t == NULL)
- break;
- d = t->base_type();
- }
- if (d == NULL)
- $$ = AST_Expression::EV_any;
- else if (d->node_type() == AST_Decl::NT_pre_defined) {
- c = AST_PredefinedType::narrow_from_decl(d);
- if (c != NULL) {
- $$ = idl_global->PredefinedTypeToExprType(c->pt());
- } else {
- $$ = AST_Expression::EV_any;
- }
- } else
- $$ = AST_Expression::EV_any;
- } else
- $$ = AST_Expression::EV_any;
- }
- ;
-
-expression : const_expr ;
-
-const_expr : or_expr ;
-
-or_expr : xor_expr
- | or_expr '|' xor_expr
- {
- $$ = idl_global->gen()->create_expr(AST_Expression::EC_or, $1, $3);
- }
- ;
-
-xor_expr
- : and_expr
- | xor_expr '^' and_expr
- {
- $$ = idl_global->gen()->create_expr(AST_Expression::EC_xor, $1, $3);
- }
- ;
-
-and_expr
- : shift_expr
- | and_expr '&' shift_expr
- {
- $$ = idl_global->gen()->create_expr(AST_Expression::EC_and, $1, $3);
- }
- ;
-
-shift_expr
- : add_expr
- | shift_expr IDL_LEFT_SHIFT add_expr
- {
- $$ = idl_global->gen()->create_expr(AST_Expression::EC_right,$1,$3);
- }
- | shift_expr IDL_RIGHT_SHIFT add_expr
- {
- $$ = idl_global->gen()->create_expr(AST_Expression::EC_left,$1,$3);
- }
- ;
-
-add_expr
- : mult_expr
- | add_expr '+' mult_expr
- {
- $$ = idl_global->gen()->create_expr(AST_Expression::EC_add, $1, $3);
- }
- | add_expr '-' mult_expr
- {
- $$ = idl_global->gen()->create_expr(AST_Expression::EC_minus,$1,$3);
- }
- ;
-
-mult_expr
- : unary_expr
- | mult_expr '*' unary_expr
- {
- $$ = idl_global->gen()->create_expr(AST_Expression::EC_mul, $1, $3);
- }
- | mult_expr '/' unary_expr
- {
- $$ = idl_global->gen()->create_expr(AST_Expression::EC_div, $1, $3);
- }
- | mult_expr '%' unary_expr
- {
- $$ = idl_global->gen()->create_expr(AST_Expression::EC_mod, $1, $3);
- }
- ;
-
-unary_expr
- : primary_expr
- | '+' primary_expr
- {
- $$ = idl_global->gen()->create_expr(AST_Expression::EC_u_plus,
- $2,
- NULL);
- }
- | '-' primary_expr
- {
- $$ = idl_global->gen()->create_expr(AST_Expression::EC_u_minus,
- $2,
- NULL);
- }
- | '~' primary_expr
- {
- $$ = idl_global->gen()->create_expr(AST_Expression::EC_bit_neg,
- $2,
- NULL);
- }
- ;
-
-primary_expr
- : scoped_name
- {
- /*
- * An expression which is a scoped name is not resolved now,
- * but only when it is evaluated (such as when it is assigned
- * as a constant value)
- */
- $$ = idl_global->gen()->create_expr($1);
- }
- | literal
- | '(' const_expr ')'
- {
- $$ = $2;
- }
- ;
-
-literal
- : IDL_INTEGER_LITERAL
- {
- $$ = idl_global->gen()->create_expr($1);
- }
- | IDL_STRING_LITERAL
- {
- $$ = idl_global->gen()->create_expr($1);
- }
- | IDL_CHARACTER_LITERAL
- {
- $$ = idl_global->gen()->create_expr($1);
- }
- | IDL_FLOATING_PT_LITERAL
- {
- $$ = idl_global->gen()->create_expr($1);
- }
- | IDL_TRUETOK
- {
- $$ = idl_global->gen()->create_expr((idl_bool) I_TRUE,
- AST_Expression::EV_bool);
- }
- | IDL_FALSETOK
- {
- $$ = idl_global->gen()->create_expr((idl_bool) I_FALSE,
- AST_Expression::EV_bool);
- }
- ;
-
-positive_int_expr :
- const_expr
- {
- $1->evaluate(AST_Expression::EK_const);
- $$ = idl_global->gen()->create_expr($1, AST_Expression::EV_ulong);
- }
- ;
-
-type_dcl
- : IDL_TYPEDEF
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_TypedefSeen);
- }
- type_declarator {$$ = 0;}
- | struct_type { $$ = 0;}
- | union_type { $$ = 0;}
- | enum_type { $$ = 0;}
- ;
-
-type_declarator :
- type_spec
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_TypeSpecSeen);
- }
- at_least_one_declarator
- {
- UTL_Scope *s = idl_global->scopes()->top_non_null();
- UTL_DecllistActiveIterator *l;
- FE_Declarator *d = NULL;
- AST_Typedef *t = NULL;
- AST_Decl *v = NULL;
- UTL_StrList *p = idl_global->pragmas();
-
- ACE_UNUSED_ARG (v);
-
- idl_global->set_parse_state(IDL_GlobalData::PS_DeclaratorsSeen);
- /*
- * Create a list of type renamings. Add them to the
- * enclosing scope
- */
- if (s != NULL && $1 != NULL && $3 != NULL) {
- l = new UTL_DecllistActiveIterator($3);
- for (;!(l->is_done()); l->next()) {
- d = l->item();
- if (d == NULL)
- continue;
- AST_Type * tp = d->compose($1);
- if (tp == NULL)
- continue;
- t = idl_global->gen()->create_typedef(tp, d->name(), p);
- (void) s->fe_add_typedef(t);
- }
- delete l;
- }
- }
- ;
-
-type_spec
- : simple_type_spec
- | constructed_type_spec
- ;
-
-simple_type_spec
- : base_type_spec
- {
- $$ = idl_global->scopes()->bottom()->lookup_primitive_type($1);
- }
- | template_type_spec
- | scoped_name
- {
- UTL_Scope *s = idl_global->scopes()->top_non_null();
- AST_Decl *d = NULL;
-
- if (s != NULL)
- d = s->lookup_by_name($1, I_TRUE);
- if (d == NULL)
- idl_global->err()->lookup_error($1);
- $$ = d;
- }
- ;
-
-base_type_spec
- : integer_type
- | floating_pt_type
- | char_type
- | boolean_type
- | octet_type
- | any_type
- ;
-
-template_type_spec
- : sequence_type_spec
- | string_type_spec
- | wstring_type_spec
- ;
-
-constructed_type_spec
- : struct_type
- | union_type
- | enum_type
- ;
-
-at_least_one_declarator :
- declarator declarators
- {
- $$ = new UTL_DeclList($1, $2);
- }
- ;
-
-declarators
- : declarators
- ','
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_DeclsCommaSeen);
- }
- declarator
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_DeclsDeclSeen);
-
- if ($1 == NULL)
- $$ = new UTL_DeclList($4, NULL);
- else {
- $1->nconc(new UTL_DeclList($4, NULL));
- $$ = $1;
- }
- }
- | /* EMPTY */
- {
- $$ = NULL;
- }
- ;
-
-declarator
- : simple_declarator
- | complex_declarator
- ;
-
-at_least_one_simple_declarator :
- simple_declarator simple_declarators
- {
- $$ = new UTL_DeclList($1, $2);
- }
- ;
-
-simple_declarators
- : simple_declarators
- ','
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_DeclsCommaSeen);
- }
- simple_declarator
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_DeclsDeclSeen);
-
- if ($1 == NULL)
- $$ = new UTL_DeclList($4, NULL);
- else {
- $1->nconc(new UTL_DeclList($4, NULL));
- $$ = $1;
- }
- }
- | /* EMPTY */
- {
- $$ = NULL;
- }
- ;
-
-simple_declarator :
- id
- {
- $$ = new FE_Declarator(new UTL_ScopedName($1, NULL),
- FE_Declarator::FD_simple, NULL);
- }
- ;
-
-complex_declarator :
- array_declarator
- {
- $$ = new FE_Declarator(new UTL_ScopedName($1->local_name(), NULL),
- FE_Declarator::FD_complex,
- $1);
- }
- ;
-
-integer_type
- : signed_int
- | unsigned_int
- ;
-
-signed_int
- : IDL_LONG
- {
- $$ = AST_Expression::EV_long;
- }
- | IDL_LONG IDL_LONG
- {
- $$ = AST_Expression::EV_longlong;
- }
- | IDL_SHORT
- {
- $$ = AST_Expression::EV_short;
- }
- ;
-
-unsigned_int
- : IDL_UNSIGNED IDL_LONG
- {
- $$ = AST_Expression::EV_ulong;
- }
- | IDL_UNSIGNED IDL_LONG IDL_LONG
- {
- $$ = AST_Expression::EV_ulonglong;
- }
- | IDL_UNSIGNED IDL_SHORT
- {
- $$ = AST_Expression::EV_ushort;
- }
- ;
-
-floating_pt_type
- : IDL_DOUBLE
- {
- $$ = AST_Expression::EV_double;
- }
- | IDL_FLOAT
- {
- $$ = AST_Expression::EV_float;
- }
- | IDL_LONG IDL_DOUBLE
- {
- $$ = AST_Expression::EV_longdouble;
- }
- ;
-
-char_type
- : IDL_CHAR
- {
- $$ = AST_Expression::EV_char;
- }
- | IDL_WCHAR
- {
- $$ = AST_Expression::EV_wchar;
- }
- ;
-
-octet_type
- : IDL_OCTET
- {
- $$ = AST_Expression::EV_octet;
- }
- ;
-
-boolean_type
- : IDL_BOOLEAN
- {
- $$ = AST_Expression::EV_bool;
- }
- ;
-
-any_type
- : IDL_ANY
- {
- $$ = AST_Expression::EV_any;
- }
- ;
-
-struct_type :
- IDL_STRUCT
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_StructSeen);
- }
- id
- {
- UTL_Scope *s = idl_global->scopes()->top_non_null();
- UTL_ScopedName *n = new UTL_ScopedName($3, NULL);
- AST_Structure *d = NULL;
- UTL_StrList *p = idl_global->pragmas();
- AST_Decl *v = NULL;
-
- ACE_UNUSED_ARG (v);
-
- idl_global->set_parse_state(IDL_GlobalData::PS_StructIDSeen);
- /*
- * Create a node representing a struct declaration. Add it
- * to the enclosing scope
- */
- if (s != NULL) {
- d = idl_global->gen()->create_structure(n, p);
- (void) s->fe_add_structure(d);
- }
- /*
- * Push the scope of the struct on the scopes stack
- */
- idl_global->scopes()->push(d);
- }
- '{'
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_StructSqSeen);
- }
- at_least_one_member
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_StructBodySeen);
- }
- '}'
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_StructQsSeen);
- /*
- * Done with this struct. Pop its scope off the scopes stack
- */
- if (idl_global->scopes()->top() == NULL)
- $$ = NULL;
- else {
- $$ =
- AST_Structure::narrow_from_scope(
- idl_global->scopes()->top_non_null());
- idl_global->scopes()->pop();
- }
- }
- ;
-
-at_least_one_member : member members ;
-
-members
- : members member
- | /* EMPTY */
- ;
-
-member :
- type_spec
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_MemberTypeSeen);
- }
- at_least_one_declarator
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_MemberDeclsSeen);
- }
- ';'
- {
- UTL_Scope *s = idl_global->scopes()->top_non_null();
- UTL_DecllistActiveIterator *l = NULL;
- FE_Declarator *d = NULL;
- AST_Field *f = NULL;
- UTL_StrList *p = idl_global->pragmas();
-
- idl_global->set_parse_state(IDL_GlobalData::PS_MemberDeclsCompleted);
- /*
- * Check for illegal recursive use of type
- */
- if ($1 != NULL && AST_illegal_recursive_type($1))
- idl_global->err()->error1(UTL_Error::EIDL_RECURSIVE_TYPE, $1);
- /*
- * Create a node representing a struct or exception member
- * Add it to the enclosing scope
- */
- else if (s != NULL && $1 != NULL && $3 != NULL) {
- l = new UTL_DecllistActiveIterator($3);
- for (;!(l->is_done()); l->next()) {
- d = l->item();
- if (d == NULL)
- continue;
- AST_Type *tp = d->compose($1);
- if (tp == NULL)
- continue;
- f = idl_global->gen()->create_field(tp, d->name(), p);
- (void) s->fe_add_field(f);
- }
- delete l;
- }
- }
- | error
- {
- idl_global->err()->syntax_error(idl_global->parse_state());
- }
- ';'
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_NoState);
- yyerrok;
- }
- ;
-
-union_type :
- IDL_UNION
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_UnionSeen);
- }
- id
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_UnionIDSeen);
- }
- IDL_SWITCH
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_SwitchSeen);
- }
- '('
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_SwitchOpenParSeen);
- }
- switch_type_spec
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_SwitchTypeSeen);
- }
- ')'
- {
- UTL_Scope *s = idl_global->scopes()->top_non_null();
- UTL_ScopedName *n = new UTL_ScopedName($3, NULL);
- AST_Union *u = NULL;
- AST_Decl *v = NULL;
- UTL_StrList *p = idl_global->pragmas();
-
- ACE_UNUSED_ARG (v);
-
- idl_global->set_parse_state(IDL_GlobalData::PS_SwitchCloseParSeen);
- /*
- * Create a node representing a union. Add it to its enclosing
- * scope
- */
- if ($9 != NULL && s != NULL) {
- AST_ConcreteType *tp = AST_ConcreteType::narrow_from_decl($9);
- if (tp == NULL) {
- idl_global->err()->not_a_type($9);
- } else {
- u = idl_global->gen()->create_union(tp, n, p);
- (void) s->fe_add_union(u);
- }
- }
- /*
- * Push the scope of the union on the scopes stack
- */
- idl_global->scopes()->push(u);
- }
- '{'
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_UnionSqSeen);
- }
- at_least_one_case_branch
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_UnionBodySeen);
- }
- '}'
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_UnionQsSeen);
- /*
- * Done with this union. Pop its scope from the scopes stack
- */
- if (idl_global->scopes()->top() == NULL)
- $$ = NULL;
- else {
- $$ =
- AST_Union::narrow_from_scope(
- idl_global->scopes()->top_non_null());
- idl_global->scopes()->pop();
- }
- }
- ;
-
-switch_type_spec :
- integer_type
- {
- $$ = idl_global->scopes()->bottom()->lookup_primitive_type($1);
- }
- | char_type
- {
- $$ = idl_global->scopes()->bottom()->lookup_primitive_type($1);
- }
- | octet_type
- {
- $$ = idl_global->scopes()->bottom()->lookup_primitive_type($1);
- }
- | boolean_type
- {
- $$ = idl_global->scopes()->bottom()->lookup_primitive_type($1);
- }
- | enum_type
- | scoped_name
- {
- UTL_Scope *s = idl_global->scopes()->top_non_null();
- AST_Decl *d = NULL;
- AST_PredefinedType *p = NULL;
- AST_Typedef *t = NULL;
- long found = I_FALSE;
-
- /*
- * The discriminator is a scoped name. Try to resolve to
- * one of the scalar types or to an enum. Thread through
- * typedef's to arrive at the base type at the end of the
- * chain
- */
- if (s != NULL && (d = s->lookup_by_name($1, I_TRUE)) != NULL) {
- while (!found) {
- switch (d->node_type()) {
- case AST_Decl::NT_enum:
- $$ = d;
- found = I_TRUE;
- break;
- case AST_Decl::NT_pre_defined:
- p = AST_PredefinedType::narrow_from_decl(d);
- if (p != NULL) {
- switch (p->pt()) {
- case AST_PredefinedType::PT_long:
- case AST_PredefinedType::PT_ulong:
- case AST_PredefinedType::PT_longlong:
- case AST_PredefinedType::PT_ulonglong:
- case AST_PredefinedType::PT_short:
- case AST_PredefinedType::PT_char:
- case AST_PredefinedType::PT_wchar:
- case AST_PredefinedType::PT_octet:
- case AST_PredefinedType::PT_boolean:
- $$ = p;
- found = I_TRUE;
- break;
- default:
- $$ = NULL;
- found = I_TRUE;
- break;
- }
- }
- break;
- case AST_Decl::NT_typedef:
- t = AST_Typedef::narrow_from_decl(d);
- if (t != NULL) d = t->base_type();
- break;
- default:
- $$ = NULL;
- found = I_TRUE;
- break;
- }
- }
- } else
- $$ = NULL;
-
- if ($$ == NULL)
- idl_global->err()->lookup_error($1);
- }
- ;
-
-at_least_one_case_branch : case_branch case_branches ;
-
-case_branches
- : case_branches case_branch
- | /* empty */
- ;
-
-case_branch :
- at_least_one_case_label
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_UnionLabelSeen);
- }
- element_spec
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_UnionElemSeen);
- }
- ';'
- {
- UTL_Scope *s = idl_global->scopes()->top_non_null();
- UTL_LabellistActiveIterator *l = NULL;
- AST_UnionLabel *d = NULL;
- AST_UnionBranch *b = NULL;
- AST_Field *f = $3;
-
- idl_global->set_parse_state(IDL_GlobalData::PS_UnionElemCompleted);
- /*
- * Create several nodes representing branches of a union.
- * Add them to the enclosing scope (the union scope)
- */
- if (s != NULL && $1 != NULL && $3 != NULL) {
- l = new UTL_LabellistActiveIterator($1);
- for (;!(l->is_done()); l->next()) {
- d = l->item();
- if (d == NULL)
- continue;
- b = idl_global->gen()->create_union_branch(d,
- f->field_type(),
- f->name(),
- f->pragmas());
- (void) s->fe_add_union_branch(b);
- }
- delete l;
- }
- }
- | error
- {
- idl_global->err()->syntax_error(idl_global->parse_state());
- }
- ';'
-
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_NoState);
- yyerrok;
- }
- ;
-
-at_least_one_case_label :
- case_label case_labels
- {
- $$ = new UTL_LabelList($1, $2);
- }
- ;
-
-case_labels
- : case_labels case_label
- {
- if ($1 == NULL)
- $$ = new UTL_LabelList($2, NULL);
- else {
- $1->nconc(new UTL_LabelList($2, NULL));
- $$ = $1;
- }
- }
- | /* EMPTY */
- {
- $$ = NULL;
- }
- ;
-
-case_label
- : IDL_DEFAULT
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_DefaultSeen);
- }
- ':'
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_LabelColonSeen);
-
- $$ = idl_global->gen()->
- create_union_label(AST_UnionLabel::UL_default,
- NULL);
- }
- | IDL_CASE
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_CaseSeen);
- }
- const_expr
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_LabelExprSeen);
- }
- ':'
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_LabelColonSeen);
-
- $$ = idl_global->gen()->create_union_label(AST_UnionLabel::UL_label,
- $3);
- }
- ;
-
-element_spec :
- type_spec
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_UnionElemTypeSeen);
- }
- declarator
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_UnionElemDeclSeen);
- /*
- * Check for illegal recursive use of type
- */
- if ($1 != NULL && AST_illegal_recursive_type($1))
- idl_global->err()->error1(UTL_Error::EIDL_RECURSIVE_TYPE, $1);
- /*
- * Create a field in a union branch
- */
- else if ($1 == NULL || $3 == NULL)
- $$ = NULL;
- else {
- AST_Type *tp = $3->compose($1);
- if (tp == NULL)
- $$ = NULL;
- else
- $$ = idl_global->gen()->create_field(tp,
- $3->name(),
- idl_global->pragmas());
- }
- }
- ;
-
-enum_type :
- IDL_ENUM
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_EnumSeen);
- }
- id
- {
- UTL_Scope *s = idl_global->scopes()->top_non_null();
- UTL_ScopedName *n = new UTL_ScopedName($3, NULL);
- AST_Enum *e = NULL;
- AST_Decl *v = NULL;
- UTL_StrList *p = idl_global->pragmas();
-
- ACE_UNUSED_ARG (v);
-
- idl_global->set_parse_state(IDL_GlobalData::PS_EnumIDSeen);
- /*
- * Create a node representing an enum and add it to its
- * enclosing scope
- */
- if (s != NULL) {
- e = idl_global->gen()->create_enum(n, p);
- /*
- * Add it to its defining scope
- */
- (void) s->fe_add_enum(e);
- }
- /*
- * Push the enum scope on the scopes stack
- */
- idl_global->scopes()->push(e);
- }
- '{'
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_EnumSqSeen);
- }
- at_least_one_enumerator
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_EnumBodySeen);
- }
- '}'
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_EnumQsSeen);
- /*
- * Done with this enum. Pop its scope from the scopes stack
- */
- if (idl_global->scopes()->top() == NULL)
- $$ = NULL;
- else {
- $$ = AST_Enum::narrow_from_scope(idl_global->scopes()->top_non_null());
- idl_global->scopes()->pop();
- }
- }
- ;
-
-at_least_one_enumerator : enumerator enumerators ;
-
-enumerators
- : enumerators
- ','
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_EnumCommaSeen);
- }
- enumerator
- | /* EMPTY */
- ;
-
-enumerator :
- IDENTIFIER
- {
- UTL_Scope *s = idl_global->scopes()->top_non_null();
- UTL_ScopedName *n =
- new UTL_ScopedName(new Identifier($1, 1, 0, I_FALSE), NULL);
- AST_EnumVal *e = NULL;
- AST_Enum *c = NULL;
- UTL_StrList *p = idl_global->pragmas();
-
- /*
- * Create a node representing one enumerator in an enum
- * Add it to the enclosing scope (the enum scope)
- */
- if (s != NULL && s->scope_node_type() == AST_Decl::NT_enum) {
- c = AST_Enum::narrow_from_scope(s);
- if (c != NULL)
- e = idl_global->gen()->create_enum_val(c->next_enum_val(), n, p);
- (void) s->fe_add_enum_val(e);
- }
- }
- ;
-
-sequence_type_spec
- : seq_head
- ','
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_SequenceCommaSeen);
- }
- positive_int_expr
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_SequenceExprSeen);
- }
- '>'
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_SequenceQsSeen);
- /*
- * Remove sequence marker from scopes stack
- */
- if (idl_global->scopes()->top() == NULL)
- idl_global->scopes()->pop();
- /*
- * Create a node representing a sequence
- */
- if ($4 == NULL || $4->coerce(AST_Expression::EV_ulong) == NULL) {
- idl_global->err()->coercion_error($4, AST_Expression::EV_ulong);
- $$ = NULL;
- } else if ($1 == NULL) {
- $$ = NULL;
- } else {
- AST_Type *tp = AST_Type::narrow_from_decl($1);
- if (tp == NULL)
- $$ = NULL;
- else {
- $$ = idl_global->gen()->create_sequence($4, tp);
- /*
- * Add this AST_Sequence to the types defined in the global scope
- */
- (void) idl_global->root()
- ->fe_add_sequence(AST_Sequence::narrow_from_decl($$));
- }
- }
- }
- | seq_head
- '>'
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_SequenceQsSeen);
- /*
- * Remove sequence marker from scopes stack
- */
- if (idl_global->scopes()->top() == NULL)
- idl_global->scopes()->pop();
- /*
- * Create a node representing a sequence
- */
- if ($1 == NULL)
- $$ = NULL;
- else {
- AST_Type *tp = AST_Type::narrow_from_decl($1);
- if (tp == NULL)
- $$ = NULL;
- else {
- $$ =
- idl_global->gen()->create_sequence(
- idl_global->gen()->create_expr((unsigned long) 0),
- tp);
- /*
- * Add this AST_Sequence to the types defined in the global scope
- */
- (void) idl_global->root()
- ->fe_add_sequence(AST_Sequence::narrow_from_decl($$));
- }
- }
- }
- ;
-
-seq_head:
- IDL_SEQUENCE
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_SequenceSeen);
- /*
- * Push a sequence marker on scopes stack
- */
- idl_global->scopes()->push(NULL);
- }
- '<'
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_SequenceSqSeen);
- }
- simple_type_spec
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_SequenceTypeSeen);
- $$ = $5;
- }
- ;
-
-string_type_spec
- : string_head
- '<'
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_StringSqSeen);
- }
- positive_int_expr
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_StringExprSeen);
- }
- '>'
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_StringQsSeen);
- /*
- * Create a node representing a string
- */
- if ($4 == NULL || $4->coerce(AST_Expression::EV_ulong) == NULL) {
- idl_global->err()->coercion_error($4, AST_Expression::EV_ulong);
- $$ = NULL;
- } else {
- $$ = idl_global->gen()->create_string($4);
- /*
- * Add this AST_String to the types defined in the global scope
- */
- (void) idl_global->root()
- ->fe_add_string(AST_String::narrow_from_decl($$));
- }
- }
- | string_head
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_StringCompleted);
- /*
- * Create a node representing a string
- */
- $$ =
- idl_global->gen()->create_string(
- idl_global->gen()->create_expr((unsigned long) 0));
- /*
- * Add this AST_String to the types defined in the global scope
- */
- (void) idl_global->root()
- ->fe_add_string(AST_String::narrow_from_decl($$));
- }
- ;
-
-string_head:
- IDL_STRING
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_StringSeen);
- }
- ;
-
-wstring_type_spec
- : wstring_head
- '<'
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_StringSqSeen);
- }
- positive_int_expr
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_StringExprSeen);
- }
- '>'
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_StringQsSeen);
- /*
- * Create a node representing a string
- */
- if ($4 == NULL || $4->coerce(AST_Expression::EV_ulong) == NULL) {
- idl_global->err()->coercion_error($4, AST_Expression::EV_ulong);
- $$ = NULL;
- } else {
- $$ = idl_global->gen()->create_wstring($4);
- /*
- * Add this AST_String to the types defined in the global scope
- */
- (void) idl_global->root()
- ->fe_add_string(AST_String::narrow_from_decl($$));
- }
- }
- | wstring_head
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_StringCompleted);
- /*
- * Create a node representing a string
- */
- $$ =
- idl_global->gen()->create_wstring(
- idl_global->gen()->create_expr((unsigned long) 0));
- /*
- * Add this AST_String to the types defined in the global scope
- */
- (void) idl_global->root()
- ->fe_add_string(AST_String::narrow_from_decl($$));
- }
- ;
-
-wstring_head:
- IDL_WSTRING
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_StringSeen);
- }
- ;
-
-array_declarator :
- id
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_ArrayIDSeen);
- }
- at_least_one_array_dim
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_ArrayCompleted);
- /*
- * Create a node representing an array
- */
- if ($3 != NULL) {
- $$ = idl_global->gen()->create_array(new UTL_ScopedName($1, NULL),
- $3->length(), $3);
- }
- }
- ;
-
-at_least_one_array_dim :
- array_dim array_dims
- {
- $$ = new UTL_ExprList($1, $2);
- }
- ;
-
-array_dims
- : array_dims array_dim
- {
- if ($1 == NULL)
- $$ = new UTL_ExprList($2, NULL);
- else {
- $1->nconc(new UTL_ExprList($2, NULL));
- $$ = $1;
- }
- }
- | /* EMPTY */
- {
- $$ = NULL;
- }
- ;
-
-array_dim :
- '['
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_DimSqSeen);
- }
- positive_int_expr
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_DimExprSeen);
- }
- ']'
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_DimQsSeen);
- /*
- * Array dimensions are expressions which must be coerced to
- * positive integers
- */
- if ($3 == NULL || $3->coerce(AST_Expression::EV_ulong) == NULL) {
- idl_global->err()->coercion_error($3, AST_Expression::EV_ulong);
- $$ = NULL;
- } else
- $$ = $3;
- }
- ;
-
-attribute:
- opt_readonly
- IDL_ATTRIBUTE
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_AttrSeen);
- }
- param_type_spec
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_AttrTypeSeen);
- }
- at_least_one_simple_declarator
- {
- UTL_Scope *s = idl_global->scopes()->top_non_null();
- UTL_DecllistActiveIterator *l = NULL;
- AST_Attribute *a = NULL;
- FE_Declarator *d = NULL;
- UTL_StrList *p = idl_global->pragmas();
-
- idl_global->set_parse_state(IDL_GlobalData::PS_AttrCompleted);
- /*
- * Create nodes representing attributes and add them to the
- * enclosing scope
- */
- if (s != NULL && $4 != NULL && $6 != NULL) {
- l = new UTL_DecllistActiveIterator($6);
- for (;!(l->is_done()); l->next()) {
- d = l->item();
- if (d == NULL)
- continue;
- AST_Type *tp = d->compose($4);
- if (tp == NULL)
- continue;
- a = idl_global->gen()->create_attribute($1, tp, d->name(), p);
- /*
- * Add one attribute to the enclosing scope
- */
- (void) s->fe_add_attribute(a);
- }
- delete l;
- }
- }
- ;
-
-opt_readonly
- : IDL_READONLY
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_AttrROSeen);
- $$ = I_TRUE;
- }
- | /* EMPTY */
- {
- $$ = I_FALSE;
- }
- ;
-
-exception :
- IDL_EXCEPTION
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_ExceptSeen);
- }
- id
- {
- UTL_Scope *s = idl_global->scopes()->top_non_null();
- UTL_ScopedName *n = new UTL_ScopedName($3, NULL);
- AST_Exception *e = NULL;
- UTL_StrList *p = idl_global->pragmas();
- AST_Decl *v = NULL;
-
- ACE_UNUSED_ARG (v);
-
- idl_global->set_parse_state(IDL_GlobalData::PS_ExceptIDSeen);
- /*
- * Create a node representing an exception and add it to
- * the enclosing scope
- */
- if (s != NULL) {
- e = idl_global->gen()->create_exception(n, p);
- (void) s->fe_add_exception(e);
- }
- /*
- * Push the exception scope on the scope stack
- */
- idl_global->scopes()->push(e);
- }
- '{'
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_ExceptSqSeen);
- }
- members
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_ExceptBodySeen);
- }
- '}'
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_ExceptQsSeen);
- /*
- * Done with this exception. Pop its scope from the scope stack
- */
- idl_global->scopes()->pop();
- }
- ;
-
-operation :
- opt_op_attribute
- op_type_spec
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_OpTypeSeen);
- }
- IDENTIFIER
- {
- UTL_Scope *s = idl_global->scopes()->top_non_null();
- UTL_ScopedName *n =
- new UTL_ScopedName(new Identifier($4, 1, 0, I_FALSE), NULL);
- AST_Operation *o = NULL;
- UTL_StrList *p = idl_global->pragmas();
-
- idl_global->set_parse_state(IDL_GlobalData::PS_OpIDSeen);
- /*
- * Create a node representing an operation on an interface
- * and add it to its enclosing scope
- */
- if (s != NULL && $2 != NULL) {
- AST_Type *tp = AST_Type::narrow_from_decl($2);
- if (tp == NULL) {
- idl_global->err()->not_a_type($2);
- } else if (tp->node_type() == AST_Decl::NT_except) {
- idl_global->err()->not_a_type($2);
- } else {
- o = idl_global->gen()->create_operation(tp, $1, n, p);
- (void) s->fe_add_operation(o);
- }
- }
- /*
- * Push the operation scope onto the scopes stack
- */
- idl_global->scopes()->push(o);
- }
- parameter_list
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_OpParsCompleted);
- }
- opt_raises
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_OpRaiseCompleted);
- }
- opt_context
- {
- UTL_Scope *s = idl_global->scopes()->top_non_null();
- AST_Operation *o = NULL;
-
- idl_global->set_parse_state(IDL_GlobalData::PS_OpCompleted);
- /*
- * Add exceptions and context to the operation
- */
- if (s != NULL && s->scope_node_type() == AST_Decl::NT_op) {
- o = AST_Operation::narrow_from_scope(s);
-
- if ($8 != NULL && o != NULL)
- (void) o->fe_add_exceptions($8);
- if ($10 != NULL)
- (void) o->fe_add_context($10);
- }
- /*
- * Done with this operation. Pop its scope from the scopes stack
- */
- idl_global->scopes()->pop();
- }
- ;
-
-opt_op_attribute
- : IDL_ONEWAY
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_OpAttrSeen);
- $$ = AST_Operation::OP_oneway;
- }
- | IDL_IDEMPOTENT
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_OpAttrSeen);
- $$ = AST_Operation::OP_idempotent;
- }
- | /* EMPTY */
- {
- $$ = AST_Operation::OP_noflags;
- }
- ;
-
-op_type_spec
- : param_type_spec
- | IDL_VOID
- {
- $$ =
- idl_global->scopes()->bottom()
- ->lookup_primitive_type(AST_Expression::EV_void);
- }
- ;
-
-parameter_list
- : '('
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_OpSqSeen);
- }
- ')'
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_OpQsSeen);
- }
- | '('
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_OpSqSeen);
- }
- at_least_one_parameter
- ')'
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_OpQsSeen);
- }
- ;
-
-at_least_one_parameter : parameter parameters ;
-
-parameters
- : parameters
- ','
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_OpParCommaSeen);
- }
- parameter
- | /* EMPTY */
- ;
-
-parameter :
- direction
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_OpParDirSeen);
- }
- param_type_spec
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_OpParTypeSeen);
- }
- declarator
- {
- UTL_Scope *s = idl_global->scopes()->top_non_null();
- AST_Argument *a = NULL;
- UTL_StrList *p = idl_global->pragmas();
-
- idl_global->set_parse_state(IDL_GlobalData::PS_OpParDeclSeen);
- /*
- * Create a node representing an argument to an operation
- * Add it to the enclosing scope (the operation scope)
- */
- if ($3 != NULL && $5 != NULL && s != NULL) {
- AST_Type *tp = $5->compose($3);
- if (tp != NULL) {
- a = idl_global->gen()->create_argument($1, tp, $5->name(), p);
- (void) s->fe_add_argument(a);
- }
- }
- }
- ;
-
-param_type_spec
- : base_type_spec
- {
- $$ = idl_global->scopes()->bottom()->lookup_primitive_type($1);
- }
- | string_type_spec
- | scoped_name
- {
- UTL_Scope *s = idl_global->scopes()->top_non_null();
- AST_Decl *d = NULL;
-
- if (s != NULL)
- d = s->lookup_by_name($1, I_TRUE);
- if (d == NULL)
- idl_global->err()->lookup_error($1);
- $$ = d;
- }
- ;
-
-direction
- : IDL_IN
- {
- $$ = AST_Argument::dir_IN;
- }
- | IDL_OUT
- {
- $$ = AST_Argument::dir_OUT;
- }
- | IDL_INOUT
- {
- $$ = AST_Argument::dir_INOUT;
- }
- ;
-
-opt_raises
- : IDL_RAISES
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_OpRaiseSeen);
- }
- '('
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_OpRaiseSqSeen);
- }
- at_least_one_scoped_name
- ')'
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_OpRaiseQsSeen);
- $$ = $5;
- }
- | /* EMPTY */
- {
- $$ = NULL;
- }
- ;
-
-opt_context
- : IDL_CONTEXT
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_OpContextSeen);
- }
- '('
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_OpContextSqSeen);
- }
- at_least_one_string_literal
- ')'
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_OpContextQsSeen);
- $$ = $5;
- }
- | /* EMPTY */
- {
- $$ = NULL;
- }
- ;
-
-at_least_one_string_literal :
- IDL_STRING_LITERAL string_literals
- {
- $$ = new UTL_StrList($1, $2);
- }
- ;
-
-string_literals
- : string_literals
- ','
- {
- idl_global->set_parse_state(IDL_GlobalData::PS_OpContextCommaSeen);
- }
- IDL_STRING_LITERAL
- {
- if ($1 == NULL)
- $$ = new UTL_StrList($4, NULL);
- else {
- $1->nconc(new UTL_StrList($4, NULL));
- $$ = $1;
- }
- }
- | /* EMPTY */
- {
- $$ = NULL;
- }
- ;
-
-%%
-/* programs */
-
-/*
- * ???
- */
-int
-yywrap()
-{
- return 1;
-}
-
-/*
- * Report an error situation discovered in a production
- *
- * This does not do anything since we report all error situations through
- * idl_global->err() operations
- */
-void
-yyerror(char *)
-{
-}
diff --git a/TAO/TAO_IDL/fe/lex.yy.cpp b/TAO/TAO_IDL/fe/lex.yy.cpp
deleted file mode 100644
index ca89291620e..00000000000
--- a/TAO/TAO_IDL/fe/lex.yy.cpp
+++ /dev/null
@@ -1,2184 +0,0 @@
-/* A lexical scanner generated by flex */
-
-/* Scanner skeleton version:
- * $Header: /home/daffy/u0/vern/flex/flex-2.4.7/RCS/flex.skl,v 1.2 94/08/03 11:13:24 vern Exp $
- */
-
-#define FLEX_SCANNER
-
-#include /**/ <stdio.h>
-
-
-/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
-#ifdef c_plusplus
-#ifndef __cplusplus
-#define __cplusplus
-#endif
-#endif
-
-
-#ifdef __cplusplus
-
-#include /**/ <stdlib.h>
-#include /**/ <stdio.h>
-
-/* Use prototypes in function declarations. */
-#define YY_USE_PROTOS
-
-/* The "const" storage-class-modifier is valid. */
-#define YY_USE_CONST
-
-#else /* ! __cplusplus */
-
-#ifdef __STDC__
-
-#define YY_USE_PROTOS
-#define YY_USE_CONST
-
-#endif /* __STDC__ */
-#endif /* ! __cplusplus */
-
-
-#ifdef __TURBOC__
-#define YY_USE_CONST
-#endif
-
-
-#ifndef YY_USE_CONST
-#ifndef const
-#define const
-#endif
-#endif
-
-
-#ifdef YY_USE_PROTOS
-#define YY_PROTO(proto) proto
-#else
-#define YY_PROTO(proto) ()
-#endif
-
-/* Returned upon end-of-file. */
-#define YY_NULL 0
-
-/* Promotes a possibly negative, possibly signed char to an unsigned
- * integer for use as an array index. If the signed char is negative,
- * we want to instead treat it as an 8-bit unsigned char, hence the
- * double cast.
- */
-#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
-
-/* Enter a start condition. This macro really ought to take a parameter,
- * but we do it the disgusting crufty way forced on us by the ()-less
- * definition of BEGIN.
- */
-#define BEGIN yy_start = 1 + 2 *
-
-/* Translate the current start state into a value that can be later handed
- * to BEGIN to return to the state.
- */
-#define YY_START ((yy_start - 1) / 2)
-
-/* Action number for EOF rule of a given start state. */
-#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
-
-/* Special action meaning "start processing a new file". Now included
- * only for backward compatibility with previous versions of flex.
- */
-#define YY_NEW_FILE yyrestart( yyin )
-
-#define YY_END_OF_BUFFER_CHAR 0
-
-/* Size of default input buffer. */
-#define YY_BUF_SIZE 16384
-
-typedef struct yy_buffer_state *YY_BUFFER_STATE;
-
-extern int yyleng;
-extern FILE *yyin, *yyout;
-
-#ifdef __cplusplus
-extern "C" {
-#endif
- extern int yywrap YY_PROTO(( void ));
-#ifdef __cplusplus
- }
-#endif
-
-#define EOB_ACT_CONTINUE_SCAN 0
-#define EOB_ACT_END_OF_FILE 1
-#define EOB_ACT_LAST_MATCH 2
-
-/* The funky do-while in the following #define is used to turn the definition
- * int a single C statement (which needs a semi-colon terminator). This
- * avoids problems with code like:
- *
- * if ( condition_holds )
- * yyless( 5 );
- * else
- * do_something_else();
- *
- * Prior to using the do-while the compiler would get upset at the
- * "else" because it interpreted the "if" statement as being all
- * done when it reached the ';' after the yyless() call.
- */
-
-/* Return all but the first 'n' matched characters back to the input stream. */
-
-#define yyless(n) \
- do \
- { \
- /* Undo effects of setting up yytext. */ \
- *yy_cp = yy_hold_char; \
- yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
- YY_DO_BEFORE_ACTION; /* set up yytext again */ \
- } \
- while ( 0 )
-
-#define unput(c) yyunput( c, yytext_ptr )
-
-
-struct yy_buffer_state
- {
- FILE *yy_input_file;
-
- char *yy_ch_buf; /* input buffer */
- char *yy_buf_pos; /* current position in input buffer */
-
- /* Size of input buffer in bytes, not including room for EOB
- * characters.
- */
- int yy_buf_size;
-
- /* Number of characters read into yy_ch_buf, not including EOB
- * characters.
- */
- int yy_n_chars;
-
- /* Whether this is an "interactive" input source; if so, and
- * if we're using stdio for input, then we want to use getc()
- * instead of fread(), to make sure we stop fetching input after
- * each newline.
- */
- int yy_is_interactive;
-
- /* Whether to try to fill the input buffer when we reach the
- * end of it.
- */
- int yy_fill_buffer;
-
- int yy_buffer_status;
-#define YY_BUFFER_NEW 0
-#define YY_BUFFER_NORMAL 1
- /* When an EOF's been seen but there's still some text to process
- * then we mark the buffer as YY_EOF_PENDING, to indicate that we
- * shouldn't try reading from the input source any more. We might
- * still have a bunch of tokens to match, though, because of
- * possible backing-up.
- *
- * When we actually see the EOF, we change the status to "new"
- * (via yyrestart()), so that the user can continue scanning by
- * just pointing yyin at a new input file.
- */
-#define YY_BUFFER_EOF_PENDING 2
- };
-
-static YY_BUFFER_STATE yy_current_buffer = 0;
-
-/* We provide macros for accessing buffer states in case in the
- * future we want to put the buffer states in a more general
- * "scanner state".
- */
-#define YY_CURRENT_BUFFER yy_current_buffer
-
-
-/* yy_hold_char holds the character lost when yytext is formed. */
-static char yy_hold_char;
-
-static int yy_n_chars; /* number of characters read into yy_ch_buf */
-
-
-int yyleng;
-
-/* Points to current character in buffer. */
-static char *yy_c_buf_p = (char *) 0;
-static int yy_init = 1; /* whether we need to initialize */
-static int yy_start = 0; /* start state number */
-
-/* Flag which is used to allow yywrap()'s to do buffer switches
- * instead of setting up a fresh yyin. A bit of a hack ...
- */
-static int yy_did_buffer_switch_on_eof;
-
-static void yyunput YY_PROTO(( int c, char *buf_ptr ));
-void yyrestart YY_PROTO(( FILE *input_file ));
-void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
-void yy_load_buffer_state YY_PROTO(( void ));
-YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
-void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
-void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
-
-static int yy_start_stack_ptr = 0;
-static int yy_start_stack_depth = 0;
-static int *yy_start_stack = 0;
-static void yy_push_state YY_PROTO(( int new_state ));
-static void yy_pop_state YY_PROTO(( void ));
-static int yy_top_state YY_PROTO(( void ));
-
-static void *yy_flex_alloc YY_PROTO(( unsigned int ));
-static void *yy_flex_realloc YY_PROTO(( void *, unsigned int ));
-static void yy_flex_free YY_PROTO(( void * ));
-
-#define yy_new_buffer yy_create_buffer
-
-#define INITIAL 0
-typedef unsigned char YY_CHAR;
-typedef int yy_state_type;
-FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
-extern char yytext[];
-
-
-#ifndef yytext_ptr
-static void yy_flex_strncpy YY_PROTO(( char *, const char *, int ));
-#endif
-
-#ifdef __cplusplus
-static int yyinput YY_PROTO(( void ));
-#else
-static int input YY_PROTO(( void ));
-#endif
-
-static yy_state_type yy_get_previous_state YY_PROTO(( void ));
-static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
-static int yy_get_next_buffer YY_PROTO(( void ));
-static void yy_fatal_error YY_PROTO(( const char msg[] ));
-
-/* Done after the current pattern has been matched and before the
- * corresponding action - sets up yytext.
- */
-#define YY_DO_BEFORE_ACTION \
- yytext_ptr = yy_bp; \
- yyleng = yy_cp - yy_bp; \
- yy_hold_char = *yy_cp; \
- *yy_cp = '\0'; \
- if ( yyleng >= YYLMAX ) \
- YY_FATAL_ERROR( "token too large, exceeds YYLMAX" ); \
- yy_flex_strncpy( yytext, yytext_ptr, yyleng + 1 ); \
- yy_c_buf_p = yy_cp;
-
-#define YY_END_OF_BUFFER 61
-static const short int yy_accept[278] =
- { 0,
- 57, 57, 61, 59, 57, 58, 59, 59, 59, 59,
- 44, 42, 59, 59, 59, 39, 39, 39, 39, 39,
- 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
- 39, 39, 39, 39, 59, 57, 0, 45, 0, 0,
- 44, 42, 56, 0, 40, 44, 0, 0, 0, 42,
- 38, 36, 37, 39, 39, 39, 39, 39, 39, 39,
- 39, 39, 39, 39, 39, 39, 39, 33, 39, 39,
- 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
- 39, 39, 39, 39, 0, 53, 0, 0, 0, 0,
- 0, 46, 0, 46, 0, 0, 55, 40, 0, 40,
-
- 0, 41, 43, 39, 39, 1, 39, 39, 39, 39,
- 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
- 39, 39, 34, 39, 39, 39, 39, 39, 39, 39,
- 39, 39, 39, 39, 39, 0, 0, 0, 0, 0,
- 48, 47, 0, 0, 40, 41, 39, 30, 39, 39,
- 18, 25, 39, 39, 39, 39, 12, 39, 39, 39,
- 39, 22, 39, 39, 39, 39, 39, 39, 39, 39,
- 39, 39, 39, 39, 39, 29, 39, 39, 0, 0,
- 0, 0, 0, 47, 0, 31, 39, 39, 9, 39,
- 39, 39, 39, 20, 32, 39, 39, 28, 39, 39,
-
- 39, 39, 23, 39, 39, 39, 39, 16, 39, 39,
- 39, 51, 0, 0, 0, 0, 39, 39, 39, 39,
- 21, 39, 39, 2, 35, 3, 39, 39, 13, 11,
- 17, 39, 39, 39, 39, 50, 0, 0, 0, 0,
- 0, 0, 39, 27, 7, 19, 39, 39, 39, 39,
- 10, 39, 26, 39, 0, 54, 0, 0, 0, 39,
- 39, 39, 4, 15, 24, 39, 0, 0, 0, 5,
- 6, 8, 14, 52, 0, 49, 0
- } ;
-
-static const int yy_ec[256] =
- { 0,
- 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 4, 1, 5, 6, 1, 1, 1, 7, 1,
- 1, 8, 9, 1, 10, 11, 12, 13, 14, 14,
- 14, 14, 14, 14, 14, 15, 15, 16, 1, 17,
- 1, 18, 1, 1, 19, 20, 20, 20, 21, 22,
- 23, 23, 23, 23, 23, 24, 23, 23, 23, 23,
- 23, 25, 26, 27, 28, 23, 23, 29, 23, 23,
- 1, 30, 1, 1, 31, 1, 32, 33, 34, 35,
-
- 36, 37, 38, 39, 40, 23, 23, 41, 42, 43,
- 44, 45, 46, 47, 48, 49, 50, 51, 52, 53,
- 54, 23, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
-
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1
- } ;
-
-static const int yy_meta[55] =
- { 0,
- 1, 1, 2, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 3, 3, 3, 1, 1, 1, 3, 3,
- 3, 3, 4, 4, 4, 4, 4, 4, 4, 1,
- 4, 3, 3, 3, 3, 3, 3, 4, 4, 4,
- 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
- 4, 4, 4, 4
- } ;
-
-static const short int yy_base[288] =
- { 0,
- 0, 439, 444, 446, 53, 446, 438, 412, 45, 53,
- 53, 58, 425, 423, 421, 0, 419, 412, 13, 392,
- 31, 40, 34, 394, 391, 389, 388, 47, 56, 44,
- 377, 387, 385, 51, 105, 96, 423, 446, 420, 88,
- 100, 111, 446, 423, 141, 128, 155, 170, 0, 160,
- 446, 446, 446, 0, 401, 396, 369, 373, 377, 372,
- 387, 375, 380, 366, 365, 380, 369, 42, 369, 376,
- 361, 373, 359, 367, 374, 359, 360, 356, 362, 356,
- 64, 360, 360, 349, 184, 446, 111, 189, 362, 356,
- 348, 446, 387, 386, 120, 389, 446, 0, 196, 446,
-
- 144, 199, 0, 365, 369, 0, 342, 347, 351, 339,
- 82, 353, 351, 341, 346, 349, 330, 343, 340, 327,
- 340, 323, 0, 326, 338, 322, 324, 88, 321, 333,
- 324, 327, 331, 333, 317, 358, 357, 325, 317, 327,
- 446, 446, 187, 202, 213, 446, 337, 0, 317, 320,
- 0, 0, 306, 318, 303, 311, 0, 306, 301, 300,
- 301, 0, 306, 297, 313, 308, 299, 306, 292, 297,
- 305, 304, 302, 293, 297, 0, 287, 293, 327, 157,
- 288, 294, 291, 446, 321, 0, 294, 294, 0, 272,
- 283, 287, 273, 0, 0, 284, 284, 0, 265, 270,
-
- 274, 273, 0, 277, 265, 274, 276, 0, 268, 279,
- 266, 446, 205, 259, 228, 265, 256, 262, 255, 254,
- 0, 262, 269, 0, 0, 0, 237, 238, 0, 0,
- 0, 220, 215, 199, 201, 446, 231, 235, 245, 251,
- 248, 201, 182, 0, 0, 0, 181, 188, 153, 159,
- 0, 155, 0, 158, 169, 446, 162, 146, 101, 112,
- 101, 104, 0, 0, 0, 88, 130, 120, 114, 0,
- 0, 0, 0, 446, 107, 446, 446, 266, 270, 272,
- 276, 280, 75, 284, 288, 292, 296
- } ;
-
-static const short int yy_def[288] =
- { 0,
- 277, 1, 277, 277, 277, 277, 278, 279, 277, 277,
- 277, 277, 277, 277, 277, 280, 280, 280, 280, 280,
- 280, 280, 280, 280, 280, 280, 280, 280, 280, 280,
- 280, 280, 280, 280, 277, 277, 278, 277, 277, 281,
- 277, 277, 277, 282, 277, 277, 277, 277, 283, 277,
- 277, 277, 277, 280, 280, 280, 280, 280, 280, 280,
- 280, 280, 280, 280, 280, 280, 280, 280, 280, 280,
- 280, 280, 280, 280, 280, 280, 280, 280, 280, 280,
- 280, 280, 280, 280, 277, 277, 35, 277, 277, 277,
- 277, 277, 277, 277, 277, 282, 277, 45, 277, 277,
-
- 277, 277, 283, 280, 280, 280, 280, 280, 280, 280,
- 280, 280, 280, 280, 280, 280, 280, 280, 280, 280,
- 280, 280, 280, 280, 280, 280, 280, 280, 280, 280,
- 280, 280, 280, 280, 280, 284, 277, 277, 277, 277,
- 277, 277, 277, 277, 277, 277, 280, 280, 280, 280,
- 280, 280, 280, 280, 280, 280, 280, 280, 280, 280,
- 280, 280, 280, 280, 280, 280, 280, 280, 280, 280,
- 280, 280, 280, 280, 280, 280, 280, 280, 284, 277,
- 277, 277, 277, 277, 277, 280, 280, 280, 280, 280,
- 280, 280, 280, 280, 280, 280, 280, 280, 280, 280,
-
- 280, 280, 280, 280, 280, 280, 280, 280, 280, 280,
- 280, 277, 277, 277, 277, 277, 280, 280, 280, 280,
- 280, 280, 280, 280, 280, 280, 280, 280, 280, 280,
- 280, 280, 280, 280, 280, 277, 277, 285, 277, 277,
- 277, 277, 280, 280, 280, 280, 280, 280, 280, 280,
- 280, 280, 280, 280, 285, 277, 286, 277, 277, 280,
- 280, 280, 280, 280, 280, 280, 286, 277, 287, 280,
- 280, 280, 280, 277, 287, 277, 0, 277, 277, 277,
- 277, 277, 277, 277, 277, 277, 277
- } ;
-
-static const short int yy_nxt[501] =
- { 0,
- 4, 5, 6, 5, 7, 4, 8, 4, 4, 9,
- 4, 10, 11, 12, 12, 13, 14, 15, 16, 16,
- 16, 17, 16, 16, 16, 16, 18, 16, 16, 4,
- 4, 19, 20, 21, 22, 23, 24, 16, 16, 25,
- 26, 27, 16, 28, 16, 16, 29, 30, 31, 32,
- 33, 34, 16, 16, 36, 57, 36, 41, 42, 42,
- 43, 58, 60, 45, 44, 46, 46, 47, 45, 61,
- 50, 50, 50, 48, 62, 63, 65, 103, 48, 76,
- 71, 49, 77, 64, 83, 117, 66, 74, 48, 72,
- 118, 75, 78, 48, 94, 79, 73, 36, 84, 36,
-
- 95, 95, 269, 131, 269, 49, 85, 86, 87, 276,
- 45, 132, 46, 46, 47, 136, 276, 88, 88, 88,
- 48, 45, 274, 50, 50, 50, 142, 170, 49, 153,
- 154, 48, 143, 143, 268, 48, 273, 171, 45, 272,
- 46, 46, 47, 271, 89, 90, 48, 270, 48, 91,
- 257, 277, 49, 98, 98, 98, 102, 102, 102, 212,
- 213, 99, 100, 48, 100, 45, 268, 47, 47, 47,
- 45, 256, 50, 50, 50, 48, 99, 100, 101, 101,
- 48, 100, 102, 102, 102, 85, 86, 87, 266, 265,
- 48, 86, 137, 184, 264, 48, 88, 88, 88, 185,
-
- 185, 88, 88, 88, 144, 144, 263, 236, 145, 145,
- 145, 102, 102, 102, 145, 145, 145, 237, 237, 237,
- 146, 262, 146, 89, 261, 145, 145, 145, 91, 239,
- 260, 240, 259, 236, 100, 146, 100, 256, 254, 146,
- 241, 241, 241, 237, 237, 237, 239, 253, 240, 100,
- 252, 258, 239, 100, 240, 257, 251, 241, 241, 241,
- 241, 241, 241, 241, 241, 241, 37, 37, 37, 37,
- 39, 250, 39, 39, 54, 54, 93, 249, 93, 93,
- 96, 96, 96, 96, 179, 179, 179, 179, 255, 255,
- 255, 255, 267, 267, 267, 267, 275, 275, 275, 275,
-
- 248, 247, 246, 245, 244, 243, 242, 238, 235, 234,
- 233, 232, 231, 230, 229, 228, 227, 226, 225, 224,
- 223, 222, 221, 220, 219, 218, 217, 184, 216, 215,
- 214, 180, 211, 210, 209, 208, 207, 206, 205, 204,
- 203, 202, 201, 200, 199, 198, 197, 196, 195, 194,
- 193, 192, 191, 190, 189, 188, 187, 186, 183, 182,
- 181, 136, 180, 178, 177, 176, 175, 174, 173, 172,
- 169, 168, 167, 166, 165, 164, 163, 162, 161, 160,
- 159, 158, 157, 156, 155, 152, 151, 150, 149, 148,
- 147, 97, 141, 141, 140, 139, 138, 135, 134, 133,
-
- 130, 129, 128, 127, 126, 125, 124, 123, 122, 121,
- 120, 119, 116, 115, 114, 113, 112, 111, 110, 109,
- 108, 107, 106, 105, 104, 97, 92, 38, 82, 81,
- 80, 70, 69, 68, 67, 59, 56, 55, 53, 52,
- 51, 40, 38, 277, 35, 3, 277, 277, 277, 277,
- 277, 277, 277, 277, 277, 277, 277, 277, 277, 277,
- 277, 277, 277, 277, 277, 277, 277, 277, 277, 277,
- 277, 277, 277, 277, 277, 277, 277, 277, 277, 277,
- 277, 277, 277, 277, 277, 277, 277, 277, 277, 277,
- 277, 277, 277, 277, 277, 277, 277, 277, 277, 277
-
- } ;
-
-static const short int yy_chk[501] =
- { 0,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 5, 19, 5, 9, 9, 9,
- 10, 19, 21, 11, 10, 11, 11, 11, 12, 21,
- 12, 12, 12, 11, 21, 22, 23, 283, 12, 30,
- 28, 11, 30, 22, 34, 68, 23, 29, 11, 28,
- 68, 29, 30, 12, 40, 30, 28, 36, 34, 36,
-
- 40, 40, 259, 81, 259, 11, 35, 35, 35, 275,
- 41, 81, 41, 41, 41, 87, 269, 35, 35, 35,
- 41, 42, 268, 42, 42, 42, 95, 128, 41, 111,
- 111, 42, 95, 95, 267, 41, 266, 128, 46, 262,
- 46, 46, 46, 261, 35, 35, 42, 260, 46, 35,
- 258, 87, 41, 45, 45, 45, 101, 101, 101, 180,
- 180, 45, 45, 46, 45, 47, 257, 47, 47, 47,
- 50, 255, 50, 50, 50, 47, 45, 45, 48, 48,
- 50, 45, 48, 48, 48, 85, 85, 85, 254, 252,
- 47, 88, 88, 143, 250, 50, 85, 85, 85, 143,
-
- 143, 88, 88, 88, 99, 99, 249, 213, 99, 99,
- 99, 102, 102, 102, 144, 144, 144, 213, 213, 213,
- 102, 248, 102, 85, 247, 145, 145, 145, 85, 215,
- 243, 215, 242, 237, 145, 102, 145, 238, 235, 102,
- 215, 215, 215, 237, 237, 237, 239, 234, 239, 145,
- 233, 241, 240, 145, 240, 240, 232, 239, 239, 239,
- 241, 241, 241, 240, 240, 240, 278, 278, 278, 278,
- 279, 228, 279, 279, 280, 280, 281, 227, 281, 281,
- 282, 282, 282, 282, 284, 284, 284, 284, 285, 285,
- 285, 285, 286, 286, 286, 286, 287, 287, 287, 287,
-
- 223, 222, 220, 219, 218, 217, 216, 214, 211, 210,
- 209, 207, 206, 205, 204, 202, 201, 200, 199, 197,
- 196, 193, 192, 191, 190, 188, 187, 185, 183, 182,
- 181, 179, 178, 177, 175, 174, 173, 172, 171, 170,
- 169, 168, 167, 166, 165, 164, 163, 161, 160, 159,
- 158, 156, 155, 154, 153, 150, 149, 147, 140, 139,
- 138, 137, 136, 135, 134, 133, 132, 131, 130, 129,
- 127, 126, 125, 124, 122, 121, 120, 119, 118, 117,
- 116, 115, 114, 113, 112, 110, 109, 108, 107, 105,
- 104, 96, 94, 93, 91, 90, 89, 84, 83, 82,
-
- 80, 79, 78, 77, 76, 75, 74, 73, 72, 71,
- 70, 69, 67, 66, 65, 64, 63, 62, 61, 60,
- 59, 58, 57, 56, 55, 44, 39, 37, 33, 32,
- 31, 27, 26, 25, 24, 20, 18, 17, 15, 14,
- 13, 8, 7, 3, 2, 277, 277, 277, 277, 277,
- 277, 277, 277, 277, 277, 277, 277, 277, 277, 277,
- 277, 277, 277, 277, 277, 277, 277, 277, 277, 277,
- 277, 277, 277, 277, 277, 277, 277, 277, 277, 277,
- 277, 277, 277, 277, 277, 277, 277, 277, 277, 277,
- 277, 277, 277, 277, 277, 277, 277, 277, 277, 277
-
- } ;
-
-static yy_state_type yy_last_accepting_state;
-static char *yy_last_accepting_cpos;
-
-/* The intent behind this definition is that it'll catch
- * any uses of REJECT which flex missed.
- */
-#define REJECT reject_used_but_not_detected
-#define yymore() yymore_used_but_not_detected
-#define YY_MORE_ADJ 0
-#ifndef YYLMAX
-#define YYLMAX 8192
-#endif
-
-char yytext[YYLMAX];
-char *yytext_ptr;
-# line 1 "idl.ll"
-# line 3 "idl.ll"
-/*
-
-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.
-
-IDL_INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED AS IS WITH NO WARRANTIES OF
-IDL_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.
-
-IDL_INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED WITH NO SUPPORT AND WITHOUT
-IDL_ANY OBLIGATION ON THE PART OF Sun OR IDL_ANY OF ITS SUBSIDIARIES OR AFFILIATES
-TO ASSIST IDL_IN ITS USE, CORRECTION, MODIFICATION OR ENHANCEMENT.
-
-SUN OR IDL_ANY OF ITS SUBSIDIARIES OR AFFILIATES SHALL HAVE NO LIABILITY WITH
-RESPECT TO THE INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR IDL_ANY PATENTS BY
-IDL_INTERFACE DEFINITION LANGUAGE CFE OR IDL_ANY PART THEREOF.
-
-IDL_IN NO EVENT WILL SUN OR IDL_ANY OF ITS SUBSIDIARIES OR AFFILIATES BE LIABLE FOR
-IDL_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.
-
- */
-
-/*
- * idl.ll - Lexical scanner for IDL 1.1
- */
-
-#include "idl.h"
-#include "idl_extern.h"
-#include "fe_private.h"
-#include "y.tab.h"
-
-static char idl_escape_reader(char *);
-static double idl_atof(char *);
-static long idl_atoi(char *, long);
-static void idl_parse_line_and_file(char *);
-static void idl_store_pragma(char *);
-
-#if 0 /* defined (HPUX) */
-// HPUX has yytext typed to unsigned char *. We make sure here that
-// we'll always use char * static char* __yytext = (char*) yytext;
-// NOTE: This will not work under flex(1) were yytext is not a fixed
-// buffer, but a dynamically allocated one. This function should do
-// the trick for us.
-inline char *__yytext()
-{
- return (char *) yytext;
-}
-#define ace_yytext __yytext()
-#else
-#define ace_yytext yytext
-#endif /* 0 */
-
-/* Macros after this point can all be overridden by user definitions in
- * section 1.
- */
-
-#ifdef YY_MALLOC_DECL
-YY_MALLOC_DECL
-#else
-#if __STDC__
-#ifndef __cplusplus
-#include /**/ <stdlib.h>
-#endif
-#else
-/* Just try to get by without declaring the routines. This will fail
- * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
- * or sizeof(void*) != sizeof(int).
- */
-#endif
-#endif
-
-/* Amount of stuff to slurp up with each read. */
-#ifndef YY_READ_BUF_SIZE
-#define YY_READ_BUF_SIZE 8192
-#endif
-
-/* Copy whatever the last rule matched to the standard output. */
-
-#ifndef TAO_ECHO
-/* This used to be an fputs(), but since the string might contain NUL's,
- * we now use fwrite().
- */
-#define TAO_ECHO (void) fwrite( yytext, yyleng, 1, yyout )
-#endif
-
-/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
- * is returned in "result".
- */
-#ifndef YY_INPUT
-#define YY_INPUT(buf,result,max_size) \
- if ( yy_current_buffer->yy_is_interactive ) \
- { \
- int c = getc( yyin ); \
- result = c == EOF ? 0 : 1; \
- buf[0] = (char) c; \
- } \
- else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
- && ferror( yyin ) ) \
- YY_FATAL_ERROR( "input in flex scanner failed" );
-#endif
-
-/* No semi-colon after return; correct usage is to write "yyterminate();" -
- * we don't want an extra ';' after the "return" because that will cause
- * some compilers to complain about unreachable statements.
- */
-#ifndef yyterminate
-#define yyterminate() return YY_NULL
-#endif
-
-/* Number of entries by which start-condition stack grows. */
-#ifndef YY_START_STACK_INCR
-#define YY_START_STACK_INCR 25
-#endif
-
-/* Report a fatal error. */
-#ifndef YY_FATAL_ERROR
-#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
-#endif
-
-/* Default declaration of generated scanner - a define so the user can
- * easily add parameters.
- */
-#ifndef YY_DECL
-#define YY_DECL int yylex YY_PROTO(( void ))
-#endif
-
-/* Code executed at the beginning of each rule, after yytext and yyleng
- * have been set up.
- */
-#ifndef YY_USER_ACTION
-#define YY_USER_ACTION
-#endif
-
-/* Code executed at the end of each rule. */
-#ifndef YY_BREAK
-#define YY_BREAK break;
-#endif
-
-YY_DECL
- {
- register yy_state_type yy_current_state;
- register char *yy_cp, *yy_bp;
- register int yy_act;
-
-# line 100 "idl.ll"
-
-
-
- if ( yy_init )
- {
-#ifdef YY_USER_INIT
- YY_USER_INIT;
-#endif
-
- if ( ! yy_start )
- yy_start = 1; /* first start state */
-
- if ( ! yyin )
- yyin = stdin;
-
- if ( ! yyout )
- yyout = stdout;
-
- if ( yy_current_buffer )
- yy_init_buffer( yy_current_buffer, yyin );
- else
- yy_current_buffer =
- yy_create_buffer( yyin, YY_BUF_SIZE );
-
- yy_load_buffer_state();
-
- yy_init = 0;
- }
-
- while ( 1 ) /* loops until end-of-file is reached */
- {
- yy_cp = yy_c_buf_p;
-
- /* Support of yytext. */
- *yy_cp = yy_hold_char;
-
- /* yy_bp points to the position in yy_ch_buf of the start of
- * the current run.
- */
- yy_bp = yy_cp;
-
- yy_current_state = yy_start;
- if ( yy_bp[-1] == '\n' )
- ++yy_current_state;
-yy_match:
- do
- {
- register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
- if ( yy_accept[yy_current_state] )
- {
- yy_last_accepting_state = yy_current_state;
- yy_last_accepting_cpos = yy_cp;
- }
- while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
- {
- yy_current_state = (int) yy_def[yy_current_state];
- if ( yy_current_state >= 278 )
- yy_c = yy_meta[(unsigned int) yy_c];
- }
- yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
- ++yy_cp;
- }
- while ( yy_base[yy_current_state] != 446 );
-
-yy_find_action:
- yy_act = yy_accept[yy_current_state];
-
- YY_DO_BEFORE_ACTION;
-
-
-do_action: /* This label is used only to access EOF actions. */
-
-
- switch ( yy_act )
- { /* beginning of action switch */
- case 0: /* must back up */
- /* undo the effects of YY_DO_BEFORE_ACTION */
- *yy_cp = yy_hold_char;
- yy_cp = yy_last_accepting_cpos;
- yy_current_state = yy_last_accepting_state;
- goto yy_find_action;
-
-case 1:
-YY_USER_ACTION
-# line 102 "idl.ll"
-return IDL_ANY;
- YY_BREAK
-case 2:
-YY_USER_ACTION
-# line 103 "idl.ll"
-return IDL_MODULE;
- YY_BREAK
-case 3:
-YY_USER_ACTION
-# line 104 "idl.ll"
-return IDL_RAISES;
- YY_BREAK
-case 4:
-YY_USER_ACTION
-# line 105 "idl.ll"
-return IDL_READONLY;
- YY_BREAK
-case 5:
-YY_USER_ACTION
-# line 106 "idl.ll"
-return IDL_ATTRIBUTE;
- YY_BREAK
-case 6:
-YY_USER_ACTION
-# line 107 "idl.ll"
-return IDL_EXCEPTION;
- YY_BREAK
-case 7:
-YY_USER_ACTION
-# line 108 "idl.ll"
-return IDL_CONTEXT;
- YY_BREAK
-case 8:
-YY_USER_ACTION
-# line 109 "idl.ll"
-return IDL_INTERFACE;
- YY_BREAK
-case 9:
-YY_USER_ACTION
-# line 110 "idl.ll"
-return IDL_CONST;
- YY_BREAK
-case 10:
-YY_USER_ACTION
-# line 111 "idl.ll"
-return IDL_TYPEDEF;
- YY_BREAK
-case 11:
-YY_USER_ACTION
-# line 112 "idl.ll"
-return IDL_STRUCT;
- YY_BREAK
-case 12:
-YY_USER_ACTION
-# line 113 "idl.ll"
-return IDL_ENUM;
- YY_BREAK
-case 13:
-YY_USER_ACTION
-# line 114 "idl.ll"
-return IDL_STRING;
- YY_BREAK
-case 14:
-YY_USER_ACTION
-# line 115 "idl.ll"
-return IDL_WSTRING;
- YY_BREAK
-case 15:
-YY_USER_ACTION
-# line 116 "idl.ll"
-return IDL_SEQUENCE;
- YY_BREAK
-case 16:
-YY_USER_ACTION
-# line 117 "idl.ll"
-return IDL_UNION;
- YY_BREAK
-case 17:
-YY_USER_ACTION
-# line 118 "idl.ll"
-return IDL_SWITCH;
- YY_BREAK
-case 18:
-YY_USER_ACTION
-# line 119 "idl.ll"
-return IDL_CASE;
- YY_BREAK
-case 19:
-YY_USER_ACTION
-# line 120 "idl.ll"
-return IDL_DEFAULT;
- YY_BREAK
-case 20:
-YY_USER_ACTION
-# line 121 "idl.ll"
-return IDL_FLOAT;
- YY_BREAK
-case 21:
-YY_USER_ACTION
-# line 122 "idl.ll"
-return IDL_DOUBLE;
- YY_BREAK
-case 22:
-YY_USER_ACTION
-# line 123 "idl.ll"
-return IDL_LONG;
- YY_BREAK
-case 23:
-YY_USER_ACTION
-# line 124 "idl.ll"
-return IDL_SHORT;
- YY_BREAK
-case 24:
-YY_USER_ACTION
-# line 125 "idl.ll"
-return IDL_UNSIGNED;
- YY_BREAK
-case 25:
-YY_USER_ACTION
-# line 126 "idl.ll"
-return IDL_CHAR;
- YY_BREAK
-case 26:
-YY_USER_ACTION
-# line 127 "idl.ll"
-return IDL_WCHAR;
- YY_BREAK
-case 27:
-YY_USER_ACTION
-# line 128 "idl.ll"
-return IDL_BOOLEAN;
- YY_BREAK
-case 28:
-YY_USER_ACTION
-# line 129 "idl.ll"
-return IDL_OCTET;
- YY_BREAK
-case 29:
-YY_USER_ACTION
-# line 130 "idl.ll"
-return IDL_VOID;
- YY_BREAK
-case 30:
-YY_USER_ACTION
-# line 132 "idl.ll"
-return IDL_TRUETOK;
- YY_BREAK
-case 31:
-YY_USER_ACTION
-# line 133 "idl.ll"
-return IDL_FALSETOK;
- YY_BREAK
-case 32:
-YY_USER_ACTION
-# line 135 "idl.ll"
-return IDL_INOUT;
- YY_BREAK
-case 33:
-YY_USER_ACTION
-# line 136 "idl.ll"
-return IDL_IN;
- YY_BREAK
-case 34:
-YY_USER_ACTION
-# line 137 "idl.ll"
-return IDL_OUT;
- YY_BREAK
-case 35:
-YY_USER_ACTION
-# line 138 "idl.ll"
-return IDL_ONEWAY;
- YY_BREAK
-case 36:
-YY_USER_ACTION
-# line 140 "idl.ll"
-return IDL_LEFT_SHIFT;
- YY_BREAK
-case 37:
-YY_USER_ACTION
-# line 141 "idl.ll"
-return IDL_RIGHT_SHIFT;
- YY_BREAK
-case 38:
-YY_USER_ACTION
-# line 142 "idl.ll"
-{
- yylval.strval = "::";
- return IDL_SCOPE_DELIMITOR;
- }
- YY_BREAK
-case 39:
-YY_USER_ACTION
-# line 147 "idl.ll"
-{
- char *z = (char *) malloc(strlen(ace_yytext) + 1);
- strcpy(z, ace_yytext);
- yylval.strval = z;
- return IDENTIFIER;
-}
- YY_BREAK
-case 40:
-YY_USER_ACTION
-# line 154 "idl.ll"
-{
- yylval.dval = idl_atof(ace_yytext);
- return IDL_FLOATING_PT_LITERAL;
- }
- YY_BREAK
-case 41:
-YY_USER_ACTION
-# line 158 "idl.ll"
-{
- yylval.dval = idl_atof(ace_yytext);
- return IDL_FLOATING_PT_LITERAL;
- }
- YY_BREAK
-case 42:
-YY_USER_ACTION
-# line 163 "idl.ll"
-{
- yylval.ival = idl_atoi(ace_yytext, 10);
- return IDL_INTEGER_LITERAL;
- }
- YY_BREAK
-case 43:
-YY_USER_ACTION
-# line 167 "idl.ll"
-{
- yylval.ival = idl_atoi(ace_yytext, 16);
- return IDL_INTEGER_LITERAL;
- }
- YY_BREAK
-case 44:
-YY_USER_ACTION
-# line 171 "idl.ll"
-{
- yylval.ival = idl_atoi(ace_yytext, 8);
- return IDL_INTEGER_LITERAL;
- }
- YY_BREAK
-case 45:
-YY_USER_ACTION
-# line 176 "idl.ll"
-{
- /* Skip the quotes */
- char *tmp = ace_yytext;
- tmp[strlen(tmp)-1] = '\0';
- yylval.sval = new String(tmp + 1);
- return IDL_STRING_LITERAL;
- }
- YY_BREAK
-case 46:
-YY_USER_ACTION
-# line 183 "idl.ll"
-{
- yylval.cval = ace_yytext [1];
- return IDL_CHARACTER_LITERAL;
- }
- YY_BREAK
-case 47:
-YY_USER_ACTION
-# line 187 "idl.ll"
-{
- // octal character constant
- yylval.cval = idl_escape_reader(ace_yytext + 1);
- return IDL_CHARACTER_LITERAL;
- }
- YY_BREAK
-case 48:
-YY_USER_ACTION
-# line 192 "idl.ll"
-{
- yylval.cval = idl_escape_reader(ace_yytext + 1);
- return IDL_CHARACTER_LITERAL;
- }
- YY_BREAK
-case 49:
-YY_USER_ACTION
-# line 196 "idl.ll"
-{/* remember pragma */
- idl_global->set_lineno(idl_global->lineno() + 1);
- idl_store_pragma(ace_yytext);
- }
- YY_BREAK
-case 50:
-YY_USER_ACTION
-# line 200 "idl.ll"
-{
- idl_parse_line_and_file(ace_yytext);
- }
- YY_BREAK
-case 51:
-YY_USER_ACTION
-# line 203 "idl.ll"
-{
- idl_parse_line_and_file(ace_yytext);
- }
- YY_BREAK
-case 52:
-YY_USER_ACTION
-# line 206 "idl.ll"
-{
- idl_parse_line_and_file(ace_yytext);
- }
- YY_BREAK
-case 53:
-YY_USER_ACTION
-# line 209 "idl.ll"
-{
- idl_parse_line_and_file(ace_yytext);
- }
- YY_BREAK
-case 54:
-YY_USER_ACTION
-# line 212 "idl.ll"
-{
- /* ignore cpp ident */
- idl_global->set_lineno(idl_global->lineno() + 1);
- }
- YY_BREAK
-case 55:
-YY_USER_ACTION
-# line 216 "idl.ll"
-{
- /* ignore comments */
- idl_global->set_lineno(idl_global->lineno() + 1);
- }
- YY_BREAK
-case 56:
-YY_USER_ACTION
-# line 220 "idl.ll"
-{
- for(;;) {
- char c = yyinput();
- if (c == '*') {
- char next = yyinput();
- if (next == '/')
- break;
- else
- yyunput(c, NULL);
- if (c == '\n')
- idl_global->set_lineno(idl_global->lineno() + 1);
- }
- }
- }
- YY_BREAK
-case 57:
-YY_USER_ACTION
-# line 234 "idl.ll"
-;
- YY_BREAK
-case 58:
-YY_USER_ACTION
-# line 235 "idl.ll"
-{
- idl_global->set_lineno(idl_global->lineno() + 1);
- }
- YY_BREAK
-case 59:
-YY_USER_ACTION
-# line 238 "idl.ll"
-return ace_yytext [0];
- YY_BREAK
-case 60:
-YY_USER_ACTION
-# line 240 "idl.ll"
-TAO_ECHO;
- YY_BREAK
-case YY_STATE_EOF(INITIAL):
- yyterminate();
-
- case YY_END_OF_BUFFER:
- {
- /* Amount of text matched not including the EOB char. */
- int yy_amount_of_matched_text = yy_cp - yytext_ptr - 1;
-
- /* Undo the effects of YY_DO_BEFORE_ACTION. */
- *yy_cp = yy_hold_char;
-
- if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
- {
- /* We're scanning a new file or input source. It's
- * possible that this happened because the user
- * just pointed yyin at a new source and called
- * yylex(). If so, then we have to assure
- * consistency between yy_current_buffer and our
- * globals. Here is the right place to do so, because
- * this is the first action (other than possibly a
- * back-up) that will match for the new input source.
- */
- yy_n_chars = yy_current_buffer->yy_n_chars;
- yy_current_buffer->yy_input_file = yyin;
- yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
- }
-
- /* Note that here we test for yy_c_buf_p "<=" to the position
- * of the first EOB in the buffer, since yy_c_buf_p will
- * already have been incremented past the NUL character
- * (since all states make transitions on EOB to the
- * end-of-buffer state). Contrast this with the test
- * in input().
- */
- if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
- { /* This was really a NUL. */
- yy_state_type yy_next_state;
-
- yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
-
- yy_current_state = yy_get_previous_state();
-
- /* Okay, we're now positioned to make the NUL
- * transition. We couldn't have
- * yy_get_previous_state() go ahead and do it
- * for us because it doesn't know how to deal
- * with the possibility of jamming (and we don't
- * want to build jamming into it because then it
- * will run more slowly).
- */
-
- yy_next_state = yy_try_NUL_trans( yy_current_state );
-
- yy_bp = yytext_ptr + YY_MORE_ADJ;
-
- if ( yy_next_state )
- {
- /* Consume the NUL. */
- yy_cp = ++yy_c_buf_p;
- yy_current_state = yy_next_state;
- goto yy_match;
- }
-
- else
- {
- yy_cp = yy_c_buf_p;
- goto yy_find_action;
- }
- }
-
- else switch ( yy_get_next_buffer() )
- {
- case EOB_ACT_END_OF_FILE:
- {
- yy_did_buffer_switch_on_eof = 0;
-
- if ( yywrap() )
- {
- /* Note: because we've taken care in
- * yy_get_next_buffer() to have set up
- * yytext, we can now set up
- * yy_c_buf_p so that if some total
- * hoser (like flex itself) wants to
- * call the scanner after we return the
- * YY_NULL, it'll still work - another
- * YY_NULL will get returned.
- */
- yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
-
- yy_act = YY_STATE_EOF(YY_START);
- goto do_action;
- }
-
- else
- {
- if ( ! yy_did_buffer_switch_on_eof )
- YY_NEW_FILE;
- }
- break;
- }
-
- case EOB_ACT_CONTINUE_SCAN:
- yy_c_buf_p =
- yytext_ptr + yy_amount_of_matched_text;
-
- yy_current_state = yy_get_previous_state();
-
- yy_cp = yy_c_buf_p;
- yy_bp = yytext_ptr + YY_MORE_ADJ;
- goto yy_match;
-
- case EOB_ACT_LAST_MATCH:
- yy_c_buf_p =
- &yy_current_buffer->yy_ch_buf[yy_n_chars];
-
- yy_current_state = yy_get_previous_state();
-
- yy_cp = yy_c_buf_p;
- yy_bp = yytext_ptr + YY_MORE_ADJ;
- goto yy_find_action;
- }
- break;
- }
-
- default:
- YY_FATAL_ERROR(
- "fatal flex scanner internal error--no action found" );
- } /* end of action switch */
- } /* end of scanning one token */
- } /* end of yylex */
-
-
-/* yy_get_next_buffer - try to read in a new buffer
- *
- * Returns a code representing an action:
- * EOB_ACT_LAST_MATCH -
- * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
- * EOB_ACT_END_OF_FILE - end of file
- */
-
-static int yy_get_next_buffer()
- {
- register char *dest = yy_current_buffer->yy_ch_buf;
- register char *source = yytext_ptr - 1; /* copy prev. char, too */
- register int number_to_move, i;
- int ret_val;
-
- if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
- YY_FATAL_ERROR(
- "fatal flex scanner internal error--end of buffer missed" );
-
- if ( yy_current_buffer->yy_fill_buffer == 0 )
- { /* Don't try to fill the buffer, so this is an EOF. */
- if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
- {
- /* We matched a singled characater, the EOB, so
- * treat this as a final EOF.
- */
- return EOB_ACT_END_OF_FILE;
- }
-
- else
- {
- /* We matched some text prior to the EOB, first
- * process it.
- */
- return EOB_ACT_LAST_MATCH;
- }
- }
-
- /* Try to read more data. */
-
- /* First move last chars to start of buffer. */
- number_to_move = yy_c_buf_p - yytext_ptr;
-
- for ( i = 0; i < number_to_move; ++i )
- *(dest++) = *(source++);
-
- if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
- /* don't do the read, it's not guaranteed to return an EOF,
- * just force an EOF
- */
- yy_n_chars = 0;
-
- else
- {
- int num_to_read =
- yy_current_buffer->yy_buf_size - number_to_move - 1;
-
- while ( num_to_read <= 0 )
- { /* Not enough room in the buffer - grow it. */
-#ifdef YY_USES_REJECT
- YY_FATAL_ERROR(
-"input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
-#else
-
- /* just a shorter name for the current buffer */
- YY_BUFFER_STATE b = yy_current_buffer;
-
- int yy_c_buf_p_offset = yy_c_buf_p - b->yy_ch_buf;
-
- b->yy_buf_size *= 2;
- b->yy_ch_buf = (char *)
- yy_flex_realloc( (void *) b->yy_ch_buf,
- b->yy_buf_size );
-
- if ( ! b->yy_ch_buf )
- YY_FATAL_ERROR(
- "fatal error - scanner input buffer overflow" );
-
- yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
-
- num_to_read = yy_current_buffer->yy_buf_size -
- number_to_move - 1;
-#endif
- }
-
- if ( num_to_read > YY_READ_BUF_SIZE )
- num_to_read = YY_READ_BUF_SIZE;
-
- /* Read in more data. */
- YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
- yy_n_chars, num_to_read );
- }
-
- if ( yy_n_chars == 0 )
- {
- if ( number_to_move - YY_MORE_ADJ == 1 )
- {
- ret_val = EOB_ACT_END_OF_FILE;
- yyrestart( yyin );
- }
-
- else
- {
- ret_val = EOB_ACT_LAST_MATCH;
- yy_current_buffer->yy_buffer_status =
- YY_BUFFER_EOF_PENDING;
- }
- }
-
- else
- ret_val = EOB_ACT_CONTINUE_SCAN;
-
- yy_n_chars += number_to_move;
- yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
- yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
-
- /* yytext begins at the second character in yy_ch_buf; the first
- * character is the one which preceded it before reading in the latest
- * buffer; it needs to be kept around in case it's a newline, so
- * yy_get_previous_state() will have with '^' rules active.
- */
-
- yytext_ptr = &yy_current_buffer->yy_ch_buf[1];
-
- return ret_val;
- }
-
-
-/* yy_get_previous_state - get the state just before the EOB char was reached */
-
-static yy_state_type yy_get_previous_state()
- {
- register yy_state_type yy_current_state;
- register char *yy_cp;
-
- register char *yy_bp = yytext_ptr;
-
- yy_current_state = yy_start;
- if ( yy_bp[-1] == '\n' )
- ++yy_current_state;
-
- for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
- {
- register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
- if ( yy_accept[yy_current_state] )
- {
- yy_last_accepting_state = yy_current_state;
- yy_last_accepting_cpos = yy_cp;
- }
- while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
- {
- yy_current_state = (int) yy_def[yy_current_state];
- if ( yy_current_state >= 278 )
- yy_c = yy_meta[(unsigned int) yy_c];
- }
- yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
- }
-
- return yy_current_state;
- }
-
-
-/* yy_try_NUL_trans - try to make a transition on the NUL character
- *
- * synopsis
- * next_state = yy_try_NUL_trans( current_state );
- */
-
-#ifdef YY_USE_PROTOS
-static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
-#else
-static yy_state_type yy_try_NUL_trans( yy_current_state )
-yy_state_type yy_current_state;
-#endif
- {
- register int yy_is_jam;
- register char *yy_cp = yy_c_buf_p;
-
- register YY_CHAR yy_c = 1;
- if ( yy_accept[yy_current_state] )
- {
- yy_last_accepting_state = yy_current_state;
- yy_last_accepting_cpos = yy_cp;
- }
- while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
- {
- yy_current_state = (int) yy_def[yy_current_state];
- if ( yy_current_state >= 278 )
- yy_c = yy_meta[(unsigned int) yy_c];
- }
- yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
- yy_is_jam = (yy_current_state == 277);
-
- return yy_is_jam ? 0 : yy_current_state;
- }
-
-
-#ifdef YY_USE_PROTOS
-static void yyunput( int c, register char *yy_bp )
-#else
-static void yyunput( c, yy_bp )
-int c;
-register char *yy_bp;
-#endif
- {
- register char *yy_cp = yy_c_buf_p;
-
- /* undo effects of setting up yytext */
- *yy_cp = yy_hold_char;
-
- if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
- { /* need to shift things up to make room */
- /* +2 for EOB chars. */
- register int number_to_move = yy_n_chars + 2;
- register char *dest = &yy_current_buffer->yy_ch_buf[
- yy_current_buffer->yy_buf_size + 2];
- register char *source =
- &yy_current_buffer->yy_ch_buf[number_to_move];
-
- while ( source > yy_current_buffer->yy_ch_buf )
- *--dest = *--source;
-
- yy_cp += dest - source;
- yy_bp += dest - source;
- yy_n_chars = yy_current_buffer->yy_buf_size;
-
- if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
- YY_FATAL_ERROR( "flex scanner push-back overflow" );
- }
-
- if ( yy_cp > yy_bp && yy_cp[-1] == '\n' )
- yy_cp[-2] = '\n';
-
- *--yy_cp = (char) c;
-
-
- /* Note: the formal parameter *must* be called "yy_bp" for this
- * macro to now work correctly.
- */
- YY_DO_BEFORE_ACTION; /* set up yytext again */
- }
-
-
-#ifdef __cplusplus
-static int yyinput()
-#else
-static int input()
-#endif
- {
- int c;
-
- *yy_c_buf_p = yy_hold_char;
-
- if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
- {
- /* yy_c_buf_p now points to the character we want to return.
- * If this occurs *before* the EOB characters, then it's a
- * valid NUL; if not, then we've hit the end of the buffer.
- */
- if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
- /* This was really a NUL. */
- *yy_c_buf_p = '\0';
-
- else
- { /* need more input */
- yytext_ptr = yy_c_buf_p;
- ++yy_c_buf_p;
-
- switch ( yy_get_next_buffer() )
- {
- case EOB_ACT_END_OF_FILE:
- {
- if ( yywrap() )
- {
- yy_c_buf_p =
- yytext_ptr + YY_MORE_ADJ;
- return EOF;
- }
-
- YY_NEW_FILE;
-#ifdef __cplusplus
- return yyinput();
-#else
- return input();
-#endif
- }
-
- case EOB_ACT_CONTINUE_SCAN:
- yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
- break;
-
- case EOB_ACT_LAST_MATCH:
-#ifdef __cplusplus
- YY_FATAL_ERROR(
- "unexpected last match in yyinput()" );
-#else
- YY_FATAL_ERROR(
- "unexpected last match in input()" );
-#endif
- }
- }
- }
-
- c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */
- *yy_c_buf_p = '\0'; /* preserve yytext */
- yy_hold_char = *++yy_c_buf_p;
-
- return c;
- }
-
-
-#ifdef YY_USE_PROTOS
-void yyrestart( FILE *input_file )
-#else
-void yyrestart( input_file )
-FILE *input_file;
-#endif
- {
- if ( ! yy_current_buffer )
- yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
-
- yy_init_buffer( yy_current_buffer, input_file );
- yy_load_buffer_state();
- }
-
-
-#ifdef YY_USE_PROTOS
-void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
-#else
-void yy_switch_to_buffer( new_buffer )
-YY_BUFFER_STATE new_buffer;
-#endif
- {
- if ( yy_current_buffer == new_buffer )
- return;
-
- if ( yy_current_buffer )
- {
- /* Flush out information for old buffer. */
- *yy_c_buf_p = yy_hold_char;
- yy_current_buffer->yy_buf_pos = yy_c_buf_p;
- yy_current_buffer->yy_n_chars = yy_n_chars;
- }
-
- yy_current_buffer = new_buffer;
- yy_load_buffer_state();
-
- /* We don't actually know whether we did this switch during
- * EOF (yywrap()) processing, but the only time this flag
- * is looked at is after yywrap() is called, so it's safe
- * to go ahead and always set it.
- */
- yy_did_buffer_switch_on_eof = 1;
- }
-
-
-#ifdef YY_USE_PROTOS
-void yy_load_buffer_state( void )
-#else
-void yy_load_buffer_state()
-#endif
- {
- yy_n_chars = yy_current_buffer->yy_n_chars;
- yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
- yyin = yy_current_buffer->yy_input_file;
- yy_hold_char = *yy_c_buf_p;
- }
-
-
-#ifdef YY_USE_PROTOS
-YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
-#else
-YY_BUFFER_STATE yy_create_buffer( file, size )
-FILE *file;
-int size;
-#endif
- {
- YY_BUFFER_STATE b;
-
- b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
-
- if ( ! b )
- YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
-
- b->yy_buf_size = size;
-
- /* yy_ch_buf has to be 2 characters longer than the size given because
- * we need to put in 2 end-of-buffer characters.
- */
- b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
-
- if ( ! b->yy_ch_buf )
- YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
-
- yy_init_buffer( b, file );
-
- return b;
- }
-
-
-#ifdef YY_USE_PROTOS
-void yy_delete_buffer( YY_BUFFER_STATE b )
-#else
-void yy_delete_buffer( b )
-YY_BUFFER_STATE b;
-#endif
- {
- if ( b == yy_current_buffer )
- yy_current_buffer = (YY_BUFFER_STATE) 0;
-
- yy_flex_free( (void *) b->yy_ch_buf );
- yy_flex_free( (void *) b );
- }
-
-
-#ifdef YY_USE_PROTOS
-void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
-#else
-void yy_init_buffer( b, file )
-YY_BUFFER_STATE b;
-FILE *file;
-#endif
- {
- b->yy_input_file = file;
-
- /* We put in the '\n' and start reading from [1] so that an
- * initial match-at-newline will be true.
- */
-
- b->yy_ch_buf[0] = '\n';
- b->yy_n_chars = 1;
-
- /* We always need two end-of-buffer characters. The first causes
- * a transition to the end-of-buffer state. The second causes
- * a jam in that state.
- */
- b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
- b->yy_ch_buf[2] = YY_END_OF_BUFFER_CHAR;
-
- b->yy_buf_pos = &b->yy_ch_buf[1];
-
- b->yy_is_interactive = file ? isatty( fileno(file) ) : 0;
-
- b->yy_fill_buffer = 1;
-
- b->yy_buffer_status = YY_BUFFER_NEW;
- }
-
-
-#ifdef YY_USE_PROTOS
-static void yy_push_state( int new_state )
-#else
-static void yy_push_state( new_state )
-int new_state;
-#endif
- {
- if ( yy_start_stack_ptr >= yy_start_stack_depth )
- {
- int new_size;
-
- yy_start_stack_depth += YY_START_STACK_INCR;
- new_size = yy_start_stack_depth * sizeof( int );
-
- if ( ! yy_start_stack )
- yy_start_stack = (int *) yy_flex_alloc( new_size );
-
- else
- yy_start_stack = (int *) yy_flex_realloc(
- (void *) yy_start_stack, new_size );
-
- if ( ! yy_start_stack )
- YY_FATAL_ERROR(
- "out of memory expanding start-condition stack" );
- }
-
- yy_start_stack[yy_start_stack_ptr++] = YY_START;
-
- BEGIN(new_state);
- }
-
-
-static void yy_pop_state()
- {
- if ( --yy_start_stack_ptr < 0 )
- YY_FATAL_ERROR( "start-condition stack underflow" );
-
- BEGIN(yy_start_stack[yy_start_stack_ptr]);
- }
-
-
-static int yy_top_state()
- {
- return yy_start_stack[yy_start_stack_ptr - 1];
- }
-
-
-#ifdef YY_USE_PROTOS
-static void yy_fatal_error( const char msg[] )
-#else
-static void yy_fatal_error( msg )
-char msg[];
-#endif
- {
- (void) fprintf( stderr, "%s\n", msg );
- exit( 1 );
- }
-
-
-
-/* Redefine yyless() so it works in section 3 code. */
-
-#undef yyless
-#define yyless(n) \
- do \
- { \
- /* Undo effects of setting up yytext. */ \
- yytext[yyleng] = yy_hold_char; \
- yy_c_buf_p = yytext + n - YY_MORE_ADJ; \
- yy_hold_char = *yy_c_buf_p; \
- *yy_c_buf_p = '\0'; \
- yyleng = n; \
- } \
- while ( 0 )
-
-
-/* Internal utility routines. */
-
-#ifndef yytext_ptr
-#ifdef YY_USE_PROTOS
-static void yy_flex_strncpy( char *s1, const char *s2, int n )
-#else
-static void yy_flex_strncpy( s1, s2, n )
-char *s1;
-const char *s2;
-int n;
-#endif
- {
- register int i;
- for ( i = 0; i < n; ++i )
- s1[i] = s2[i];
- }
-#endif
-
-
-#ifdef YY_USE_PROTOS
-static void *yy_flex_alloc( unsigned int size )
-#else
-static void *yy_flex_alloc( size )
-unsigned int size;
-#endif
- {
- return (void *) malloc( size );
- }
-
-#ifdef YY_USE_PROTOS
-static void *yy_flex_realloc( void *ptr, unsigned int size )
-#else
-static void *yy_flex_realloc( ptr, size )
-void *ptr;
-unsigned int size;
-#endif
- {
- return (void *) realloc( ptr, size );
- }
-
-#ifdef YY_USE_PROTOS
-static void yy_flex_free( void *ptr )
-#else
-static void yy_flex_free( ptr )
-void *ptr;
-#endif
- {
- free( ptr );
- }
-# line 240 "idl.ll"
-
- /* subroutines */
-
-/*
- * Strip down a name to the last component, i.e. everything after the last
- * '/' character
- */
-static char *
-stripped_name(UTL_String *fn)
-{
- char *n = fn->get_string();
- long l;
-
- if (n == NULL)
- return NULL;
- l = strlen(n);
- for (n += l; l > 0 && *n != '/'; l--, n--);
- if (*n == '/') n++;
- return n;
-}
-
-/*
- * Parse a #line statement generated by the C preprocessor
- */
-static void
-idl_parse_line_and_file(char *buf)
-{
- char *r = buf;
- char *h;
- UTL_String *nm;
-
- /* Skip initial '#' */
- if (*r != '#')
- return;
- else
- r++;
-
- /* Check to see if we're running under the screwy Microsoft scheme */
- /* of putting #line num instead of #num. */
-
- if (ACE_OS::strncmp (r, "line", 4) == 0)
- r += 5;
-
- /* Find line number */
- while (*r == ' ' || *r == '\t')
- r++;
- h = r;
- for (; *r != '\0' && *r != ' ' && *r != '\t'; r++)
- continue;
- *r++ = 0;
- idl_global->set_lineno(idl_atoi(h, 10));
-
- /* Find file name, if present */
- for (; *r != '"'; r++)
- if (*r == '\n' || *r == '\0')
- return;
-
- h = ++r;
- for (; *r != '"'; r++)
- continue;
- *r = 0;
- if (*h == '\0')
- idl_global->set_filename(new String("standard input"));
- else
- {
- long i;
- long j;
-
- // Put Microsoft-style pathnames into a canonical form.
- for (i = 0, j = 0; h[j] != '\0'; i++, j++)
- {
- if (h[j] == '\\' && h[j + 1] == '\\')
- j++;
-
- h[i] = h[j];
- }
- h[i] = '\0';
- idl_global->set_filename(new String(h));
- }
- idl_global->set_in_main_file(
- (idl_global->filename()->compare(idl_global->real_filename())) ?
- I_TRUE :
- I_FALSE
- );
- /*
- * If it's an import file store the stripped name for the BE to use
- */
- if (!(idl_global->in_main_file()) && idl_global->import()) {
- nm = new UTL_String(stripped_name(idl_global->filename()));
- idl_global->store_include_file_name(nm);
- }
-}
-
-/*
- * Store a #pragma line into the list of pragmas
- */
-static void
-idl_store_pragma(char *buf)
-{
- char *cp = buf + 1;
- while(*cp != 'p')
- cp++;
- while(*cp != ' ' && *cp != '\t')
- cp++;
- while(*cp == ' ' || *cp == '\t')
- cp++;
- char pragma[80];
- char *pp = pragma;
- while(*cp != '\n') {
- *pp++ = *cp++;
- }
- *pp = 0;
- if (strcmp(pragma, "import") == 0) {
- idl_global->set_import(I_TRUE);
- return;
- }
- if (strcmp(pragma, "include") == 0) {
- idl_global->set_import(I_FALSE);
- return;
- }
- UTL_StrList *p = idl_global->pragmas();
- if (p == NULL)
- idl_global->set_pragmas(new UTL_StrList(new String(buf), NULL));
- else {
- p->nconc(new UTL_StrList(new String(buf), NULL));
- idl_global->set_pragmas(p);
- }
-}
-
-/*
- * idl_atoi - Convert a string of digits into an integer according to base b
- */
-static long
-idl_atoi(char *s, long b)
-{
- long r = 0;
- long negative = 0;
-
- if (*s == '-') {
- negative = 1;
- s++;
- }
- if (b == 8 && *s == '0')
- s++;
- else if (b == 16 && *s == '0' && (*(s + 1) == 'x' || *(s + 1) == 'X'))
- s += 2;
-
- for (; *s; s++)
- if (*s <= '9' && *s >= '0')
- r = (r * b) + (*s - '0');
- else if (b > 10 && *s <= 'f' && *s >= 'a')
- r = (r * b) + (*s - 'a' + 10);
- else if (b > 10 && *s <= 'F' && *s >= 'A')
- r = (r * b) + (*s - 'A' + 10);
- else
- break;
-
- if (negative)
- r *= -1;
-
- return r;
-}
-
-/*
- * Convert a string to a float; atof doesn't seem to work, always.
- */
-static double
-idl_atof(char *s)
-{
- char *h = s;
- double d = 0.0;
- double f = 0.0;
- double e, k;
- long neg = 0, negexp = 0;
-
- ACE_UNUSED_ARG (f);
- ACE_UNUSED_ARG (h);
-
- if (*s == '-') {
- neg = 1;
- s++;
- }
- while (*s >= '0' && *s <= '9') {
- d = (d * 10) + *s - '0';
- s++;
- }
- if (*s == '.') {
- s++;
- e = 10;
- while (*s >= '0' && *s <= '9') {
- d += (*s - '0') / (e * 1.0);
- e *= 10;
- s++;
- }
- }
- if (*s == 'e' || *s == 'E') {
- s++;
- if (*s == '-') {
- negexp = 1;
- s++;
- } else if (*s == '+')
- s++;
- e = 0;
- while (*s >= '0' && *s <= '9') {
- e = (e * 10) + *s - '0';
- s++;
- }
- if (e > 0) {
- for (k = 1; e > 0; k *= 10, e--);
- if (negexp)
- d /= k;
- else
- d *= k;
- }
- }
-
- if (neg) d *= -1.0;
-
- return d;
-}
-
-/*
- * Convert (some) escaped characters into their ascii values
- */
-static char
-idl_escape_reader(
- char *str
-)
-{
- if (str[0] != '\\') {
- return str[0];
- }
-
- switch (str[1]) {
- case 'n':
- return '\n';
- case 't':
- return '\t';
- case 'v':
- return '\v';
- case 'b':
- return '\b';
- case 'r':
- return '\r';
- case 'f':
- return '\f';
- case 'a':
- return '\a';
- case '\\':
- return '\\';
- case '\?':
- return '?';
- case '\'':
- return '\'';
- case '"':
- return '"';
- case 'x':
- {
- int i;
- // hex value
- for (i = 2; str[i] != '\0' && isxdigit(str[i]); i++) {
- continue;
- }
- char save = str[i];
- str[i] = '\0';
- char out = (char)idl_atoi(&str[2], 16);
- str[i] = save;
- return out;
- }
- break;
- default:
- // check for octal value
- if (str[1] >= '0' && str[1] <= '7') {
- int i;
- for (i = 1; str[i] >= '0' && str[i] <= '7'; i++) {
- continue;
- }
- char save = str[i];
- str[i] = '\0';
- char out = (char)idl_atoi(&str[1], 8);
- str[i] = save;
- return out;
- } else {
- return str[1] - 'a';
- }
- break;
- }
-}
diff --git a/TAO/TAO_IDL/fe/y.tab.cpp b/TAO/TAO_IDL/fe/y.tab.cpp
deleted file mode 100644
index 93e3dbf8b63..00000000000
--- a/TAO/TAO_IDL/fe/y.tab.cpp
+++ /dev/null
@@ -1,3274 +0,0 @@
-
-# line 73 "idl.yy"
-#include "idl.h"
-#include "idl_extern.h"
-#include "fe_private.h"
-#include <stdio.h>
-
-#if (defined(apollo) || defined(hpux)) && defined(__cplusplus)
-extern "C" int yywrap();
-#endif // (defined(apollo) || defined(hpux)) && defined(__cplusplus)
-
-void yyerror (char *);
-int yylex (void);
-extern "C" int yywrap (void);
-extern char yytext[];
-extern int yyleng;
-#define YYDEBUG_LEXER_TEXT (yytext[yyleng] = '\0', yytext)
-// Force the pretty debugging code to compile.
-#define YYDEBUG 1
-
-# line 96 "idl.yy"
-typedef union
-#ifdef __cplusplus
- YYSTYPE
-#endif
- {
- AST_Decl *dcval; /* Decl value */
- UTL_StrList *slval; /* String list */
- UTL_NameList *nlval; /* Name list */
- UTL_ExprList *elval; /* Expression list */
- UTL_LabelList *llval; /* Label list */
- UTL_DeclList *dlval; /* Declaration list */
- FE_InterfaceHeader *ihval; /* Interface header */
- AST_Expression *exval; /* Expression value */
- AST_UnionLabel *ulval; /* Union label */
- AST_Field *ffval; /* Field value */
- AST_Expression::ExprType etval; /* Expression type */
- AST_Argument::Direction dival; /* Argument direction */
- AST_Operation::Flags ofval; /* Operation flags */
- FE_Declarator *deval; /* Declarator value */
- idl_bool bval; /* Boolean value */
- long ival; /* Long value */
- double dval; /* Double value */
- float fval; /* Float value */
- char cval; /* Char value */
-
- String *sval; /* String value */
- char *strval; /* char * value */
- Identifier *idval; /* Identifier */
- UTL_IdList *idlist; /* Identifier list */
-} YYSTYPE;
-# define IDENTIFIER 257
-# define IDL_CONST 258
-# define IDL_MODULE 259
-# define IDL_INTERFACE 260
-# define IDL_TYPEDEF 261
-# define IDL_LONG 262
-# define IDL_SHORT 263
-# define IDL_UNSIGNED 264
-# define IDL_DOUBLE 265
-# define IDL_FLOAT 266
-# define IDL_CHAR 267
-# define IDL_WCHAR 268
-# define IDL_OCTET 269
-# define IDL_BOOLEAN 270
-# define IDL_ANY 271
-# define IDL_STRUCT 272
-# define IDL_UNION 273
-# define IDL_SWITCH 274
-# define IDL_ENUM 275
-# define IDL_SEQUENCE 276
-# define IDL_STRING 277
-# define IDL_WSTRING 278
-# define IDL_EXCEPTION 279
-# define IDL_CASE 280
-# define IDL_DEFAULT 281
-# define IDL_READONLY 282
-# define IDL_ATTRIBUTE 283
-# define IDL_ONEWAY 284
-# define IDL_IDEMPOTENT 285
-# define IDL_VOID 286
-# define IDL_IN 287
-# define IDL_OUT 288
-# define IDL_INOUT 289
-# define IDL_RAISES 290
-# define IDL_CONTEXT 291
-# define IDL_INTEGER_LITERAL 292
-# define IDL_STRING_LITERAL 293
-# define IDL_CHARACTER_LITERAL 294
-# define IDL_FLOATING_PT_LITERAL 295
-# define IDL_TRUETOK 296
-# define IDL_FALSETOK 297
-# define IDL_SCOPE_DELIMITOR 298
-# define IDL_LEFT_SHIFT 299
-# define IDL_RIGHT_SHIFT 300
-
-#ifdef __STDC__
-#include <stdlib.h>
-#else
-#include <malloc.h>
-#include <memory.h>
-#endif
-
-// #include <values.h>
-
-#ifdef __cplusplus
-
-#ifndef yyerror
- void yyerror(const char *);
-#endif
-
-#ifndef yylex
-#ifdef __EXTERN_C__
- extern "C" { int yylex(void); }
-#else
- int yylex(void);
-#endif
-#endif
- int yyparse(void);
-
-#endif
-#define yyclearin yychar = -1
-#define yyerrok yyerrflag = 0
-extern int yychar;
-extern int yyerrflag;
-YYSTYPE yylval;
-YYSTYPE yyval;
-typedef int yytabelem;
-#ifndef YYMAXDEPTH
-#define YYMAXDEPTH 150
-#endif
-#if YYMAXDEPTH > 0
-int yy_yys[YYMAXDEPTH], *yys = yy_yys;
-YYSTYPE yy_yyv[YYMAXDEPTH], *yyv = yy_yyv;
-#else /* user does initial allocation */
-int *yys;
-YYSTYPE *yyv;
-#endif
-static int yymaxdepth = YYMAXDEPTH;
-# define YYERRCODE 256
-
-# line 2242 "idl.yy"
-
-/* programs */
-
-/*
- * ???
- */
-int
-yywrap()
-{
- return 1;
-}
-
-/*
- * Report an error situation discovered in a production
- *
- * This does not do anything since we report all error situations through
- * idl_global->err() operations
- */
-void
-yyerror(char *)
-{
-}
-yytabelem yyexca[] ={
--1, 0,
- 0, 3,
- -2, 0,
--1, 1,
- 0, -1,
- -2, 0,
--1, 3,
- 0, 3,
- 125, 3,
- -2, 0,
--1, 23,
- 123, 32,
- -2, 57,
--1, 131,
- 91, 228,
- -2, 137,
--1, 146,
- 257, 253,
- 262, 253,
- 263, 253,
- 264, 253,
- 265, 253,
- 266, 253,
- 267, 253,
- 268, 253,
- 269, 253,
- 270, 253,
- 271, 253,
- 277, 253,
- 283, 240,
- 286, 253,
- 298, 253,
- 125, 25,
- -2, 0,
--1, 178,
- 125, 3,
- -2, 0,
--1, 219,
- 125, 244,
- -2, 0,
--1, 266,
- 125, 160,
- -2, 0,
--1, 317,
- 41, 256,
- -2, 258,
--1, 355,
- 125, 183,
- -2, 0,
- };
-# define YYNPROD 285
-# define YYLAST 524
-yytabelem yyact[]={
-
- 68, 128, 152, 329, 342, 125, 53, 164, 66, 238,
- 345, 224, 83, 227, 223, 129, 107, 74, 84, 85,
- 72, 73, 75, 76, 78, 77, 79, 19, 20, 391,
- 21, 86, 87, 88, 83, 98, 386, 100, 101, 102,
- 55, 97, 95, 105, 350, 166, 326, 50, 161, 83,
- 162, 204, 205, 69, 74, 84, 85, 72, 73, 75,
- 76, 78, 77, 79, 19, 20, 236, 21, 86, 87,
- 88, 144, 83, 166, 344, 69, 63, 74, 84, 85,
- 72, 73, 75, 76, 78, 77, 79, 331, 332, 333,
- 69, 86, 87, 88, 347, 346, 109, 109, 347, 346,
- 110, 115, 116, 62, 61, 59, 138, 131, 127, 134,
- 92, 83, 126, 69, 228, 83, 302, 99, 219, 140,
- 74, 84, 85, 72, 73, 75, 76, 78, 77, 79,
- 158, 163, 58, 13, 150, 87, 13, 93, 91, 90,
- 83, 198, 155, 151, 239, 74, 84, 85, 72, 73,
- 75, 76, 78, 77, 79, 156, 69, 51, 6, 154,
- 87, 365, 5, 57, 12, 83, 4, 12, 299, 214,
- 74, 84, 85, 72, 73, 75, 76, 78, 77, 157,
- 288, 69, 159, 55, 83, 87, 88, 55, 287, 298,
- 84, 85, 262, 286, 75, 76, 78, 77, 240, 242,
- 241, 229, 21, 189, 201, 14, 69, 2, 10, 56,
- 11, 25, 323, 11, 145, 143, 142, 141, 103, 19,
- 20, 202, 21, 309, 199, 69, 15, 55, 260, 192,
- 111, 193, 194, 9, 160, 14, 18, 24, 10, 259,
- 247, 218, 139, 114, 113, 131, 281, 382, 112, 19,
- 20, 280, 21, 369, 310, 290, 15, 277, 276, 275,
- 274, 273, 83, 272, 285, 48, 47, 46, 131, 45,
- 44, 43, 384, 371, 55, 41, 206, 297, 207, 13,
- 173, 174, 389, 352, 210, 240, 242, 241, 301, 208,
- 83, 387, 324, 300, 209, 196, 195, 167, 168, 169,
- 170, 171, 172, 69, 381, 186, 338, 327, 315, 185,
- 12, 13, 311, 184, 258, 373, 351, 317, 225, 203,
- 312, 60, 390, 314, 67, 167, 168, 169, 170, 171,
- 172, 69, 380, 217, 361, 362, 315, 253, 254, 337,
- 364, 266, 12, 340, 363, 249, 294, 240, 242, 241,
- 353, 348, 339, 328, 322, 94, 11, 321, 96, 250,
- 366, 248, 336, 372, 55, 131, 376, 375, 374, 370,
- 126, 368, 222, 295, 293, 292, 289, 320, 316, 131,
- 383, 308, 279, 263, 251, 252, 220, 282, 11, 177,
- 283, 255, 256, 257, 119, 34, 211, 212, 213, 307,
- 278, 303, 296, 246, 149, 216, 137, 82, 215, 136,
- 81, 175, 117, 200, 135, 306, 271, 270, 226, 181,
- 123, 38, 378, 379, 360, 359, 357, 377, 356, 355,
- 354, 341, 334, 318, 305, 269, 180, 122, 37, 268,
- 304, 267, 265, 221, 179, 121, 36, 335, 244, 106,
- 49, 32, 261, 176, 118, 33, 133, 108, 243, 235,
- 234, 188, 233, 187, 232, 231, 230, 183, 104, 42,
- 182, 146, 124, 39, 17, 16, 264, 178, 120, 35,
- 31, 30, 8, 29, 7, 28, 27, 26, 3, 1,
- 23, 190, 130, 191, 330, 71, 70, 64, 89, 367,
- 165, 153, 284, 22, 319, 313, 148, 358, 343, 245,
- 197, 325, 40, 147, 388, 385, 349, 80, 237, 132,
- 291, 65, 54, 52 };
-yytabelem yypact[]={
-
- -23,-10000000,-10000000, -23,-10000000,-10000000,-10000000,-10000000,-10000000,-10000000,
--10000000,-10000000,-10000000,-10000000,-10000000,-10000000,-10000000,-10000000,-10000000,-10000000,
--10000000,-10000000,-10000000, 217,-10000000,-10000000, 212, 211, 210, 208,
- 207, 206, -208, -92, -146, -140, -146, -146, -146, 95,
--10000000,-10000000, -146,-10000000,-10000000,-10000000,-10000000,-10000000,-10000000,-10000000,
--10000000,-10000000,-10000000,-10000000,-10000000, -282,-10000000,-10000000,-10000000,-10000000,
--10000000,-10000000,-10000000,-10000000,-10000000,-10000000,-10000000,-10000000,-10000000,-10000000,
--10000000,-10000000,-10000000,-10000000, -165,-10000000,-10000000,-10000000,-10000000,-10000000,
- 186, 184, 183,-10000000,-10000000, -161,-10000000,-10000000,-10000000,-10000000,
--10000000,-10000000,-10000000,-10000000,-10000000,-10000000,-10000000, -282,-10000000,-10000000,
--10000000,-10000000,-10000000,-10000000, -223,-10000000, -146,-10000000, -146,-10000000,
--10000000,-10000000,-10000000,-10000000,-10000000, -156,-10000000, 182, -146, 94,
- 93, 92, -203, 91,-10000000,-10000000, -282,-10000000,-10000000,-10000000,
--10000000,-10000000,-10000000, -146,-10000000, 5, 5, 5,-10000000,-10000000,
--10000000,-10000000,-10000000,-10000000,-10000000,-10000000, -53, 252, 251, 133,
--10000000,-10000000,-10000000, 80, 127, 281, -248, 233, 247,-10000000,
--10000000, 33, 33, 33, -282,-10000000, 5,-10000000,-10000000,-10000000,
--10000000,-10000000,-10000000,-10000000,-10000000, -185, 180,-10000000, -23, -245,
- 278, -143, 76,-10000000,-10000000,-10000000,-10000000,-10000000,-10000000,-10000000,
- -217, -142,-10000000,-10000000,-10000000,-10000000,-10000000,-10000000,-10000000,-10000000,
- 178, 5, 5, 5, 5, 5, 5, 5, 5, 5,
- 5,-10000000,-10000000,-10000000, 273, 177, 166,-10000000,-10000000, -245,
--10000000,-10000000,-10000000,-10000000,-10000000,-10000000,-10000000,-10000000,-10000000,-10000000,
- 204, 202, 201, 200, 199, 198,-10000000,-10000000,-10000000,-10000000,
--10000000,-10000000, -282, -223, -146, 133, 5,-10000000, 127, 281,
- -248, 233, 233, 247, 247,-10000000,-10000000,-10000000,-10000000,-10000000,
--10000000, 5,-10000000, 68, 63, 55, -245, -146, 196, -73,
- 43, 249,-10000000,-10000000,-10000000,-10000000,-10000000,-10000000, -117, -141,
- -282,-10000000,-10000000,-10000000,-10000000,-10000000,-10000000,-10000000,-10000000,-10000000,
--10000000,-10000000,-10000000,-10000000,-10000000,-10000000,-10000000, -282, -166,-10000000,
--10000000,-10000000,-10000000, 130, 195, 271, -143, -146, 277,-10000000,
--10000000,-10000000,-10000000,-10000000,-10000000,-10000000,-10000000,-10000000, 89, 248,
- -244, 266, -200,-10000000,-10000000,-10000000,-10000000,-10000000, 265,-10000000,
--10000000,-10000000,-10000000,-10000000, -182, -146, -247, 276,-10000000, 239,
- -117,-10000000,-10000000,-10000000,-10000000,-10000000,-10000000,-10000000,-10000000,-10000000,
--10000000,-10000000,-10000000,-10000000, 36, -182, -208, 194, -186, 215,
- 5, 275, -223, -200, -146,-10000000,-10000000,-10000000,-10000000,-10000000,
--10000000,-10000000,-10000000,-10000000, 263,-10000000,-10000000, 188, -146, 214,
- -257,-10000000,-10000000,-10000000,-10000000, 250,-10000000,-10000000, 238,-10000000,
- -264,-10000000 };
-yytabelem yypgo[]={
-
- 0, 14, 157, 523, 522, 521, 8, 209, 132, 520,
- 163, 519, 518, 517, 324, 9, 7, 516, 515, 514,
- 5, 513, 512, 511, 510, 509, 508, 507, 108, 506,
- 505, 504, 503, 502, 2, 501, 159, 142, 155, 179,
- 130, 182, 234, 500, 143, 141, 10, 499, 498, 105,
- 104, 103, 321, 497, 496, 495, 6, 76, 494, 493,
- 1, 15, 492, 491, 490, 0, 166, 489, 207, 488,
- 487, 162, 486, 158, 485, 484, 483, 482, 481, 480,
- 479, 478, 477, 476, 475, 474, 473, 472, 471, 470,
- 469, 468, 467, 466, 465, 464, 463, 462, 461, 460,
- 459, 458, 457, 456, 455, 454, 453, 452, 451, 450,
- 449, 448, 447, 446, 445, 444, 443, 442, 192, 118,
- 441, 440, 439, 438, 437, 436, 435, 434, 433, 432,
- 431, 430, 4, 429, 428, 427, 426, 425, 424, 423,
- 422, 421, 420, 419, 418, 417, 13, 416, 415, 414,
- 413, 412, 411, 410, 409, 408, 407, 406, 405, 404,
- 403, 401, 400, 399, 395, 394, 389, 383, 382, 381,
- 378, 377, 362, 357, 354, 353, 3, 352, 344, 343,
- 340, 339, 335, 334, 332, 322 };
-yytabelem yyr1[]={
-
- 0, 67, 68, 68, 70, 69, 72, 69, 74, 69,
- 76, 69, 78, 69, 79, 69, 80, 81, 82, 83,
- 77, 75, 75, 86, 87, 89, 84, 90, 64, 32,
- 91, 22, 22, 88, 88, 93, 92, 94, 92, 95,
- 92, 97, 92, 99, 92, 100, 92, 20, 101, 21,
- 21, 16, 102, 16, 103, 16, 65, 85, 104, 105,
- 106, 107, 71, 48, 48, 48, 48, 48, 48, 48,
- 48, 33, 34, 35, 35, 36, 36, 37, 37, 38,
- 38, 38, 39, 39, 39, 40, 40, 40, 40, 41,
- 41, 41, 41, 42, 42, 42, 43, 43, 43, 43,
- 43, 43, 44, 108, 66, 66, 66, 66, 110, 109,
- 1, 1, 2, 2, 2, 56, 56, 56, 56, 56,
- 56, 4, 4, 4, 3, 3, 3, 28, 111, 29,
- 29, 60, 60, 30, 112, 31, 31, 61, 62, 49,
- 49, 54, 54, 54, 55, 55, 55, 52, 52, 52,
- 50, 50, 57, 51, 53, 113, 114, 115, 117, 7,
- 116, 119, 119, 120, 121, 118, 122, 118, 123, 124,
- 125, 126, 127, 128, 129, 131, 10, 9, 9, 9,
- 9, 9, 9, 130, 133, 133, 134, 135, 132, 136,
- 132, 26, 27, 27, 137, 46, 138, 139, 46, 140,
- 47, 141, 142, 143, 145, 8, 144, 148, 147, 147,
- 146, 149, 150, 5, 5, 151, 152, 13, 154, 155,
- 6, 6, 153, 157, 158, 14, 14, 156, 159, 11,
- 24, 25, 25, 160, 161, 45, 162, 163, 96, 63,
- 63, 164, 165, 166, 167, 73, 168, 169, 171, 172,
- 98, 59, 59, 59, 12, 12, 173, 170, 174, 170,
- 175, 178, 177, 177, 179, 180, 176, 15, 15, 15,
- 58, 58, 58, 181, 182, 23, 23, 183, 184, 17,
- 17, 18, 185, 19, 19 };
-yytabelem yyr2[]={
-
- 0, 2, 4, 0, 1, 7, 1, 7, 1, 7,
- 1, 7, 1, 7, 1, 7, 1, 1, 1, 1,
- 19, 2, 2, 1, 1, 1, 15, 1, 7, 5,
- 1, 7, 1, 4, 0, 1, 7, 1, 7, 1,
- 7, 1, 7, 1, 7, 1, 7, 5, 1, 9,
- 1, 3, 1, 7, 1, 9, 3, 3, 1, 1,
- 1, 1, 19, 2, 2, 2, 2, 2, 3, 3,
- 3, 2, 2, 2, 7, 2, 7, 2, 7, 2,
- 7, 7, 2, 7, 7, 2, 7, 7, 7, 2,
- 5, 5, 5, 3, 2, 7, 3, 3, 3, 3,
- 3, 3, 3, 1, 7, 3, 3, 3, 1, 7,
- 2, 2, 3, 2, 3, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 5, 1, 9,
- 1, 2, 2, 5, 1, 9, 1, 3, 3, 2,
- 2, 3, 5, 3, 5, 7, 5, 3, 3, 5,
- 3, 3, 3, 3, 3, 1, 1, 1, 1, 19,
- 4, 4, 0, 1, 1, 11, 1, 7, 1, 1,
- 1, 1, 1, 1, 1, 1, 35, 3, 3, 3,
- 3, 2, 3, 4, 4, 0, 1, 1, 11, 1,
- 7, 5, 5, 1, 1, 7, 1, 1, 11, 1,
- 7, 1, 1, 1, 1, 19, 4, 1, 8, 0,
- 3, 1, 1, 13, 5, 1, 1, 11, 1, 1,
- 13, 3, 3, 1, 1, 13, 3, 3, 1, 7,
- 5, 5, 1, 1, 1, 11, 1, 1, 13, 3,
- 1, 1, 1, 1, 1, 19, 1, 1, 1, 1,
- 21, 3, 3, 1, 2, 3, 1, 7, 1, 9,
- 4, 1, 8, 0, 1, 1, 11, 3, 2, 3,
- 3, 3, 3, 1, 1, 13, 1, 1, 1, 13,
- 1, 5, 1, 9, 1 };
-yytabelem yychk[]={
-
--10000000, -67, -68, -69, -66, -71, -73, -75, -77, 256,
- 261, -7, -10, -8, 258, 279, -84, -85, 259, 272,
- 273, 275, -32, -64, 260, -68, -70, -72, -74, -76,
- -78, -79, -108, -104, -164, -80, -113, -123, -141, -86,
- -22, 58, -90, 59, 59, 59, 59, 59, 59, -109,
- -1, -2, -3, -56, -4, -16, -7, -10, -8, -49,
- -52, -50, -51, -57, -53, -5, -6, -14, -65, 298,
- -54, -55, 265, 266, 262, 267, 268, 270, 269, 271,
- -13, -153, -156, 257, 263, 264, 276, 277, 278, -48,
- -49, -50, -57, -51, -52, -6, -14, -16, -65, 257,
- -65, -65, -65, 123, -91, -65, -110, 298, -102, 262,
- 265, 44, 62, 60, 60, 262, 263, -151, -105, -165,
- -81, -114, -124, -142, -87, -20, -16, -28, -60, -61,
- -62, -65, -11, -103, -65, -149, -154, -157, 262, 60,
- -65, 123, 123, 123, 274, 123, -88, -21, -29, -159,
- -65, -44, -34, -35, -36, -37, -38, -39, -40, -41,
- -42, 43, 45, 126, -16, -43, 40, 292, 293, 294,
- 295, 296, 297, -44, -44, -152, -106, -166, -82, -115,
- -125, -143, -89, -92, -66, -71, -73, -96, -98, 256,
- -63, -59, 282, 284, 285, 44, 44, -24, -45, 91,
- -150, 124, 94, 38, 299, 300, 43, 45, 42, 47,
- 37, -42, -42, -42, -34, -155, -158, -2, 61, -119,
- -68, -116, -118, -1, 256, 40, -144, -146, 257, 125,
- -93, -94, -95, -97, -99, -100, 283, -12, -15, 286,
- -56, -6, -16, -101, -111, -25, -160, 62, -36, -37,
- -38, -39, -39, -40, -40, -41, -41, -41, 41, 62,
- 62, -107, -118, -167, -83, -117, -119, -120, -122, -126,
- -145, -147, 59, 59, 59, 59, 59, 59, -162, -168,
- -16, -60, -45, -44, -33, -34, 125, 125, 125, -28,
- 59, -9, -49, -50, -57, -51, -8, -16, 262, 125,
- 44, -15, 257, -161, -121, -127, -148, -163, -169, 93,
- 59, 41, -146, -30, -61, -65, -170, 40, -128, -31,
- -171, -173, -174, 123, 44, -23, 290, 41, -175, -176,
- -58, 287, 288, 289, -129, -112, -172, -181, 41, -177,
- -179, -130, -132, -26, 256, -46, 281, 280, -61, -17,
- 291, 40, 44, -15, -131, -133, -134, -136, -27, -137,
- -138, -183, -182, -178, -180, 125, -132, -47, -1, 59,
- -46, 58, -34, 40, -20, -176, -60, -135, -140, -139,
- -184, 41, 59, -60, 58, -18, 293, 41, -19, 44,
- -185, 293 };
-yytabelem yydef[]={
-
- -2, -2, 1, -2, 4, 6, 8, 10, 12, 14,
- 103, 105, 106, 107, 58, 241, 21, 22, 16, 155,
- 168, 201, 23, -2, 27, 2, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 29, 30, 0, 5, 7, 9, 11, 13, 15, 104,
- 108, 110, 111, 112, 113, 114, 124, 125, 126, 115,
- 116, 117, 118, 119, 120, 121, 122, 123, 51, 52,
- 139, 140, 147, 148, 141, 150, 151, 153, 152, 154,
- 0, 221, 226, 56, 143, 0, 215, 222, 227, 59,
- 63, 64, 65, 66, 67, 68, 69, 70, 242, 17,
- 156, 169, 202, 24, 0, 28, 0, 54, 0, 142,
- 149, 211, 214, 218, 223, 144, 146, 0, 0, 0,
- 0, 0, 0, 0, 34, 31, 50, 109, 130, 131,
- 132, -2, 138, 0, 53, 0, 0, 0, 145, 216,
- 60, 243, 18, 157, 170, 203, -2, 47, 127, 0,
- 55, 212, 102, 72, 73, 75, 77, 79, 82, 85,
- 89, 0, 0, 0, 93, 94, 0, 96, 97, 98,
- 99, 100, 101, 219, 224, 0, 0, 162, -2, 0,
- 0, 0, 0, 33, 35, 37, 39, 41, 43, 45,
- 0, 0, 239, 251, 252, 48, 128, 229, 232, 233,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 90, 91, 92, 0, 0, 0, 217, 61, -2,
- 19, 158, 162, 163, 166, 171, 204, 209, 210, 26,
- 0, 0, 0, 0, 0, 0, 236, 246, 254, 255,
- 267, 268, 269, 0, 0, 230, 0, 213, 74, 76,
- 78, 80, 81, 83, 84, 86, 87, 88, 95, 220,
- 225, 0, 161, 0, 0, 0, -2, 0, 0, 0,
- 0, 206, 36, 38, 40, 42, 44, 46, 0, 0,
- 49, 129, 231, 234, 62, 71, 245, 20, 159, 164,
- 167, 172, 177, 178, 179, 180, 181, 182, 141, 205,
- 207, 237, 247, 0, 0, 0, 0, 0, 0, 235,
- 165, 173, 208, 238, 136, 137, 248, -2, 0, 133,
- 276, 0, 0, 174, 134, 249, 273, 257, 0, 263,
- 264, 270, 271, 272, 0, 0, 280, 0, 259, 260,
- 0, 175, 185, 186, 189, 193, 194, 196, 135, 250,
- 277, 274, 261, 265, 0, -2, 0, 0, 191, 0,
- 0, 0, 0, 0, 0, 176, 184, 187, 199, 190,
- 192, 195, 197, 278, 0, 262, 266, 0, 0, 0,
- 0, 275, 188, 200, 198, 0, 284, 279, 281, 282,
- 0, 283 };
-typedef struct
-#ifdef __cplusplus
- yytoktype
-#endif
-{ char *t_name; int t_val; } yytoktype;
-#ifndef YYDEBUG
-# define YYDEBUG 1 /* allow debugging */
-#endif
-
-#if YYDEBUG
-
-yytoktype yytoks[] =
-{
- {"IDENTIFIER", 257},
- {"IDL_CONST", 258},
- {"IDL_MODULE", 259},
- {"IDL_INTERFACE", 260},
- {"IDL_TYPEDEF", 261},
- {"IDL_LONG", 262},
- {"IDL_SHORT", 263},
- {"IDL_UNSIGNED", 264},
- {"IDL_DOUBLE", 265},
- {"IDL_FLOAT", 266},
- {"IDL_CHAR", 267},
- {"IDL_WCHAR", 268},
- {"IDL_OCTET", 269},
- {"IDL_BOOLEAN", 270},
- {"IDL_ANY", 271},
- {"IDL_STRUCT", 272},
- {"IDL_UNION", 273},
- {"IDL_SWITCH", 274},
- {"IDL_ENUM", 275},
- {"IDL_SEQUENCE", 276},
- {"IDL_STRING", 277},
- {"IDL_WSTRING", 278},
- {"IDL_EXCEPTION", 279},
- {"IDL_CASE", 280},
- {"IDL_DEFAULT", 281},
- {"IDL_READONLY", 282},
- {"IDL_ATTRIBUTE", 283},
- {"IDL_ONEWAY", 284},
- {"IDL_IDEMPOTENT", 285},
- {"IDL_VOID", 286},
- {"IDL_IN", 287},
- {"IDL_OUT", 288},
- {"IDL_INOUT", 289},
- {"IDL_RAISES", 290},
- {"IDL_CONTEXT", 291},
- {"IDL_INTEGER_LITERAL", 292},
- {"IDL_STRING_LITERAL", 293},
- {"IDL_CHARACTER_LITERAL", 294},
- {"IDL_FLOATING_PT_LITERAL", 295},
- {"IDL_TRUETOK", 296},
- {"IDL_FALSETOK", 297},
- {"IDL_SCOPE_DELIMITOR", 298},
- {"IDL_LEFT_SHIFT", 299},
- {"IDL_RIGHT_SHIFT", 300},
- {"-unknown-", -1} /* ends search */
-};
-
-char * yyreds[] =
-{
- "-no such reduction-",
- "start : definitions",
- "definitions : definition definitions",
- "definitions : /* empty */",
- "definition : type_dcl",
- "definition : type_dcl ';'",
- "definition : const_dcl",
- "definition : const_dcl ';'",
- "definition : exception",
- "definition : exception ';'",
- "definition : interface_def",
- "definition : interface_def ';'",
- "definition : module",
- "definition : module ';'",
- "definition : error",
- "definition : error ';'",
- "module : IDL_MODULE",
- "module : IDL_MODULE IDENTIFIER",
- "module : IDL_MODULE IDENTIFIER '{'",
- "module : IDL_MODULE IDENTIFIER '{' definitions",
- "module : IDL_MODULE IDENTIFIER '{' definitions '}'",
- "interface_def : interface",
- "interface_def : forward",
- "interface : interface_header",
- "interface : interface_header '{'",
- "interface : interface_header '{' exports",
- "interface : interface_header '{' exports '}'",
- "interface_decl : IDL_INTERFACE",
- "interface_decl : IDL_INTERFACE id",
- "interface_header : interface_decl inheritance_spec",
- "inheritance_spec : ':'",
- "inheritance_spec : ':' at_least_one_scoped_name",
- "inheritance_spec : /* empty */",
- "exports : exports export",
- "exports : /* empty */",
- "export : type_dcl",
- "export : type_dcl ';'",
- "export : const_dcl",
- "export : const_dcl ';'",
- "export : exception",
- "export : exception ';'",
- "export : attribute",
- "export : attribute ';'",
- "export : operation",
- "export : operation ';'",
- "export : error",
- "export : error ';'",
- "at_least_one_scoped_name : scoped_name scoped_names",
- "scoped_names : scoped_names ','",
- "scoped_names : scoped_names ',' scoped_name",
- "scoped_names : /* empty */",
- "scoped_name : id",
- "scoped_name : IDL_SCOPE_DELIMITOR",
- "scoped_name : IDL_SCOPE_DELIMITOR id",
- "scoped_name : scoped_name IDL_SCOPE_DELIMITOR",
- "scoped_name : scoped_name IDL_SCOPE_DELIMITOR id",
- "id : IDENTIFIER",
- "forward : interface_decl",
- "const_dcl : IDL_CONST",
- "const_dcl : IDL_CONST const_type",
- "const_dcl : IDL_CONST const_type id",
- "const_dcl : IDL_CONST const_type id '='",
- "const_dcl : IDL_CONST const_type id '=' expression",
- "const_type : integer_type",
- "const_type : char_type",
- "const_type : octet_type",
- "const_type : boolean_type",
- "const_type : floating_pt_type",
- "const_type : string_type_spec",
- "const_type : wstring_type_spec",
- "const_type : scoped_name",
- "expression : const_expr",
- "const_expr : or_expr",
- "or_expr : xor_expr",
- "or_expr : or_expr '|' xor_expr",
- "xor_expr : and_expr",
- "xor_expr : xor_expr '^' and_expr",
- "and_expr : shift_expr",
- "and_expr : and_expr '&' shift_expr",
- "shift_expr : add_expr",
- "shift_expr : shift_expr IDL_LEFT_SHIFT add_expr",
- "shift_expr : shift_expr IDL_RIGHT_SHIFT add_expr",
- "add_expr : mult_expr",
- "add_expr : add_expr '+' mult_expr",
- "add_expr : add_expr '-' mult_expr",
- "mult_expr : unary_expr",
- "mult_expr : mult_expr '*' unary_expr",
- "mult_expr : mult_expr '/' unary_expr",
- "mult_expr : mult_expr '%' unary_expr",
- "unary_expr : primary_expr",
- "unary_expr : '+' primary_expr",
- "unary_expr : '-' primary_expr",
- "unary_expr : '~' primary_expr",
- "primary_expr : scoped_name",
- "primary_expr : literal",
- "primary_expr : '(' const_expr ')'",
- "literal : IDL_INTEGER_LITERAL",
- "literal : IDL_STRING_LITERAL",
- "literal : IDL_CHARACTER_LITERAL",
- "literal : IDL_FLOATING_PT_LITERAL",
- "literal : IDL_TRUETOK",
- "literal : IDL_FALSETOK",
- "positive_int_expr : const_expr",
- "type_dcl : IDL_TYPEDEF",
- "type_dcl : IDL_TYPEDEF type_declarator",
- "type_dcl : struct_type",
- "type_dcl : union_type",
- "type_dcl : enum_type",
- "type_declarator : type_spec",
- "type_declarator : type_spec at_least_one_declarator",
- "type_spec : simple_type_spec",
- "type_spec : constructed_type_spec",
- "simple_type_spec : base_type_spec",
- "simple_type_spec : template_type_spec",
- "simple_type_spec : scoped_name",
- "base_type_spec : integer_type",
- "base_type_spec : floating_pt_type",
- "base_type_spec : char_type",
- "base_type_spec : boolean_type",
- "base_type_spec : octet_type",
- "base_type_spec : any_type",
- "template_type_spec : sequence_type_spec",
- "template_type_spec : string_type_spec",
- "template_type_spec : wstring_type_spec",
- "constructed_type_spec : struct_type",
- "constructed_type_spec : union_type",
- "constructed_type_spec : enum_type",
- "at_least_one_declarator : declarator declarators",
- "declarators : declarators ','",
- "declarators : declarators ',' declarator",
- "declarators : /* empty */",
- "declarator : simple_declarator",
- "declarator : complex_declarator",
- "at_least_one_simple_declarator : simple_declarator simple_declarators",
- "simple_declarators : simple_declarators ','",
- "simple_declarators : simple_declarators ',' simple_declarator",
- "simple_declarators : /* empty */",
- "simple_declarator : id",
- "complex_declarator : array_declarator",
- "integer_type : signed_int",
- "integer_type : unsigned_int",
- "signed_int : IDL_LONG",
- "signed_int : IDL_LONG IDL_LONG",
- "signed_int : IDL_SHORT",
- "unsigned_int : IDL_UNSIGNED IDL_LONG",
- "unsigned_int : IDL_UNSIGNED IDL_LONG IDL_LONG",
- "unsigned_int : IDL_UNSIGNED IDL_SHORT",
- "floating_pt_type : IDL_DOUBLE",
- "floating_pt_type : IDL_FLOAT",
- "floating_pt_type : IDL_LONG IDL_DOUBLE",
- "char_type : IDL_CHAR",
- "char_type : IDL_WCHAR",
- "octet_type : IDL_OCTET",
- "boolean_type : IDL_BOOLEAN",
- "any_type : IDL_ANY",
- "struct_type : IDL_STRUCT",
- "struct_type : IDL_STRUCT id",
- "struct_type : IDL_STRUCT id '{'",
- "struct_type : IDL_STRUCT id '{' at_least_one_member",
- "struct_type : IDL_STRUCT id '{' at_least_one_member '}'",
- "at_least_one_member : member members",
- "members : members member",
- "members : /* empty */",
- "member : type_spec",
- "member : type_spec at_least_one_declarator",
- "member : type_spec at_least_one_declarator ';'",
- "member : error",
- "member : error ';'",
- "union_type : IDL_UNION",
- "union_type : IDL_UNION id",
- "union_type : IDL_UNION id IDL_SWITCH",
- "union_type : IDL_UNION id IDL_SWITCH '('",
- "union_type : IDL_UNION id IDL_SWITCH '(' switch_type_spec",
- "union_type : IDL_UNION id IDL_SWITCH '(' switch_type_spec ')'",
- "union_type : IDL_UNION id IDL_SWITCH '(' switch_type_spec ')' '{'",
- "union_type : IDL_UNION id IDL_SWITCH '(' switch_type_spec ')' '{' at_least_one_case_branch",
- "union_type : IDL_UNION id IDL_SWITCH '(' switch_type_spec ')' '{' at_least_one_case_branch '}'",
- "switch_type_spec : integer_type",
- "switch_type_spec : char_type",
- "switch_type_spec : octet_type",
- "switch_type_spec : boolean_type",
- "switch_type_spec : enum_type",
- "switch_type_spec : scoped_name",
- "at_least_one_case_branch : case_branch case_branches",
- "case_branches : case_branches case_branch",
- "case_branches : /* empty */",
- "case_branch : at_least_one_case_label",
- "case_branch : at_least_one_case_label element_spec",
- "case_branch : at_least_one_case_label element_spec ';'",
- "case_branch : error",
- "case_branch : error ';'",
- "at_least_one_case_label : case_label case_labels",
- "case_labels : case_labels case_label",
- "case_labels : /* empty */",
- "case_label : IDL_DEFAULT",
- "case_label : IDL_DEFAULT ':'",
- "case_label : IDL_CASE",
- "case_label : IDL_CASE const_expr",
- "case_label : IDL_CASE const_expr ':'",
- "element_spec : type_spec",
- "element_spec : type_spec declarator",
- "enum_type : IDL_ENUM",
- "enum_type : IDL_ENUM id",
- "enum_type : IDL_ENUM id '{'",
- "enum_type : IDL_ENUM id '{' at_least_one_enumerator",
- "enum_type : IDL_ENUM id '{' at_least_one_enumerator '}'",
- "at_least_one_enumerator : enumerator enumerators",
- "enumerators : enumerators ','",
- "enumerators : enumerators ',' enumerator",
- "enumerators : /* empty */",
- "enumerator : IDENTIFIER",
- "sequence_type_spec : seq_head ','",
- "sequence_type_spec : seq_head ',' positive_int_expr",
- "sequence_type_spec : seq_head ',' positive_int_expr '>'",
- "sequence_type_spec : seq_head '>'",
- "seq_head : IDL_SEQUENCE",
- "seq_head : IDL_SEQUENCE '<'",
- "seq_head : IDL_SEQUENCE '<' simple_type_spec",
- "string_type_spec : string_head '<'",
- "string_type_spec : string_head '<' positive_int_expr",
- "string_type_spec : string_head '<' positive_int_expr '>'",
- "string_type_spec : string_head",
- "string_head : IDL_STRING",
- "wstring_type_spec : wstring_head '<'",
- "wstring_type_spec : wstring_head '<' positive_int_expr",
- "wstring_type_spec : wstring_head '<' positive_int_expr '>'",
- "wstring_type_spec : wstring_head",
- "wstring_head : IDL_WSTRING",
- "array_declarator : id",
- "array_declarator : id at_least_one_array_dim",
- "at_least_one_array_dim : array_dim array_dims",
- "array_dims : array_dims array_dim",
- "array_dims : /* empty */",
- "array_dim : '['",
- "array_dim : '[' positive_int_expr",
- "array_dim : '[' positive_int_expr ']'",
- "attribute : opt_readonly IDL_ATTRIBUTE",
- "attribute : opt_readonly IDL_ATTRIBUTE param_type_spec",
- "attribute : opt_readonly IDL_ATTRIBUTE param_type_spec at_least_one_simple_declarator",
- "opt_readonly : IDL_READONLY",
- "opt_readonly : /* empty */",
- "exception : IDL_EXCEPTION",
- "exception : IDL_EXCEPTION id",
- "exception : IDL_EXCEPTION id '{'",
- "exception : IDL_EXCEPTION id '{' members",
- "exception : IDL_EXCEPTION id '{' members '}'",
- "operation : opt_op_attribute op_type_spec",
- "operation : opt_op_attribute op_type_spec IDENTIFIER",
- "operation : opt_op_attribute op_type_spec IDENTIFIER parameter_list",
- "operation : opt_op_attribute op_type_spec IDENTIFIER parameter_list opt_raises",
- "operation : opt_op_attribute op_type_spec IDENTIFIER parameter_list opt_raises opt_context",
- "opt_op_attribute : IDL_ONEWAY",
- "opt_op_attribute : IDL_IDEMPOTENT",
- "opt_op_attribute : /* empty */",
- "op_type_spec : param_type_spec",
- "op_type_spec : IDL_VOID",
- "parameter_list : '('",
- "parameter_list : '(' ')'",
- "parameter_list : '('",
- "parameter_list : '(' at_least_one_parameter ')'",
- "at_least_one_parameter : parameter parameters",
- "parameters : parameters ','",
- "parameters : parameters ',' parameter",
- "parameters : /* empty */",
- "parameter : direction",
- "parameter : direction param_type_spec",
- "parameter : direction param_type_spec declarator",
- "param_type_spec : base_type_spec",
- "param_type_spec : string_type_spec",
- "param_type_spec : scoped_name",
- "direction : IDL_IN",
- "direction : IDL_OUT",
- "direction : IDL_INOUT",
- "opt_raises : IDL_RAISES",
- "opt_raises : IDL_RAISES '('",
- "opt_raises : IDL_RAISES '(' at_least_one_scoped_name ')'",
- "opt_raises : /* empty */",
- "opt_context : IDL_CONTEXT",
- "opt_context : IDL_CONTEXT '('",
- "opt_context : IDL_CONTEXT '(' at_least_one_string_literal ')'",
- "opt_context : /* empty */",
- "at_least_one_string_literal : IDL_STRING_LITERAL string_literals",
- "string_literals : string_literals ','",
- "string_literals : string_literals ',' IDL_STRING_LITERAL",
- "string_literals : /* empty */",
-};
-#endif /* YYDEBUG */
-# line 1 "/usr/ccs/bin/yaccpar"
-/*
- * Copyright (c) 1993 by Sun Microsystems, Inc.
- */
-
-#if !defined (ACE_WIN32)
-#pragma ident "@(#)yaccpar 6.12 93/06/07 SMI"
-#endif /* ACE_WIN32 */
-
-/*
-** Skeleton parser driver for yacc output
-*/
-
-/*
-** yacc user known macros and defines
-*/
-#define YYERROR goto yyerrlab
-#define YYACCEPT return(0)
-#define YYABORT return(1)
-#define YYBACKUP( newtoken, newvalue )\
-{\
- if ( yychar >= 0 || ( yyr2[ yytmp ] >> 1 ) != 1 )\
- {\
- yyerror( "syntax error - cannot backup" );\
- goto yyerrlab;\
- }\
- yychar = newtoken;\
- yystate = *yyps;\
- yylval = newvalue;\
- goto yynewstate;\
-}
-#define YYRECOVERING() (!!yyerrflag)
-#define YYNEW(type) malloc(sizeof(type) * yynewmax)
-#define YYCOPY(to, from, type) \
- (type *) memcpy(to, (char *) from, yynewmax * sizeof(type))
-#define YYENLARGE( from, type) \
- (type *) realloc((char *) from, yynewmax * sizeof(type))
-#ifndef YYDEBUG
-# define YYDEBUG 1 /* make debugging available */
-#endif
-
-/*
-** user known globals
-*/
-int yydebug; /* set to 1 to get debugging */
-
-/*
-** driver internal defines
-*/
-#define YYFLAG (-10000000)
-
-/*
-** global variables used by the parser
-*/
-YYSTYPE *yypv; /* top of value stack */
-int *yyps; /* top of state stack */
-
-int yystate; /* current state */
-int yytmp; /* extra var (lasts between blocks) */
-
-int yynerrs; /* number of errors */
-int yyerrflag; /* error recovery flag */
-int yychar; /* current input token number */
-
-
-
-#ifdef YYNMBCHARS
-#define YYLEX() yycvtok(yylex())
-/*
-** yycvtok - return a token if i is a wchar_t value that exceeds 255.
-** If i<255, i itself is the token. If i>255 but the neither
-** of the 30th or 31st bit is on, i is already a token.
-*/
-#if defined(__STDC__) || defined(__cplusplus)
-int yycvtok(int i)
-#else
-int yycvtok(i) int i;
-#endif
-{
- int first = 0;
- int last = YYNMBCHARS - 1;
- int mid;
- wchar_t j;
-
- if(i&0x60000000){/*Must convert to a token. */
- if( yymbchars[last].character < i ){
- return i;/*Giving up*/
- }
- while ((last>=first)&&(first>=0)) {/*Binary search loop*/
- mid = (first+last)/2;
- j = yymbchars[mid].character;
- if( j==i ){/*Found*/
- return yymbchars[mid].tvalue;
- }else if( j<i ){
- first = mid + 1;
- }else{
- last = mid -1;
- }
- }
- /*No entry in the table.*/
- return i;/* Giving up.*/
- }else{/* i is already a token. */
- return i;
- }
-}
-#else/*!YYNMBCHARS*/
-#define YYLEX() yylex()
-#endif/*!YYNMBCHARS*/
-
-/*
-** yyparse - return 0 if worked, 1 if syntax error not recovered from
-*/
-#if defined(__STDC__) || defined(__cplusplus)
-int yyparse(void)
-#else
-int yyparse()
-#endif
-{
- register YYSTYPE *yypvt; /* top of value stack for $vars */
-
-#if defined(__cplusplus) || defined(lint)
-/*
- hacks to please C++ and lint - goto's inside switch should never be
- executed; yypvt is set to 0 to avoid "used before set" warning.
-*/
- static int __yaccpar_lint_hack__ = 0;
- switch (__yaccpar_lint_hack__)
- {
- case 1: goto yyerrlab;
- case 2: goto yynewstate;
- }
- yypvt = 0;
-#endif
-
- /*
- ** Initialize externals - yyparse may be called more than once
- */
- yypv = &yyv[-1];
- yyps = &yys[-1];
- yystate = 0;
- yytmp = 0;
- yynerrs = 0;
- yyerrflag = 0;
- yychar = -1;
-
-#if YYMAXDEPTH <= 0
- if (yymaxdepth <= 0)
- {
- if ((yymaxdepth = YYEXPAND(0)) <= 0)
- {
- yyerror("yacc initialization error");
- YYABORT;
- }
- }
-#endif
-
- {
- register YYSTYPE *yy_pv; /* top of value stack */
- register int *yy_ps; /* top of state stack */
- register int yy_state; /* current state */
- register int yy_n; /* internal state number info */
- goto yystack; /* moved from 6 lines above to here to please C++ */
-
- /*
- ** get globals into registers.
- ** branch to here only if YYBACKUP was called.
- */
- yynewstate:
- yy_pv = yypv;
- yy_ps = yyps;
- yy_state = yystate;
- goto yy_newstate;
-
- /*
- ** get globals into registers.
- ** either we just started, or we just finished a reduction
- */
- yystack:
- yy_pv = yypv;
- yy_ps = yyps;
- yy_state = yystate;
-
- /*
- ** top of for (;;) loop while no reductions done
- */
- yy_stack:
- /*
- ** put a state and value onto the stacks
- */
-#if YYDEBUG
- /*
- ** if debugging, look up token value in list of value vs.
- ** name pairs. 0 and negative (-1) are special values.
- ** Note: linear search is used since time is not a real
- ** consideration while debugging.
- */
- if ( yydebug )
- {
- register int yy_i;
-
- printf( "State %d, token ", yy_state );
- if ( yychar == 0 )
- printf( "end-of-file\n" );
- else if ( yychar < 0 )
- printf( "-none-\n" );
- else
- {
- for ( yy_i = 0; yytoks[yy_i].t_val >= 0;
- yy_i++ )
- {
- if ( yytoks[yy_i].t_val == yychar )
- break;
- }
- printf( "%s\n", yytoks[yy_i].t_name );
- }
- }
-#endif /* YYDEBUG */
- if ( ++yy_ps >= &yys[ yymaxdepth ] ) /* room on stack? */
- {
- /*
- ** reallocate and recover. Note that pointers
- ** have to be reset, or bad things will happen
- */
- int yyps_index = (yy_ps - yys);
- int yypv_index = (yy_pv - yyv);
- int yypvt_index = (yypvt - yyv);
- int yynewmax;
-#ifdef YYEXPAND
- yynewmax = YYEXPAND(yymaxdepth);
-#else
- yynewmax = 2 * yymaxdepth; /* double table size */
- if (yymaxdepth == YYMAXDEPTH) /* first time growth */
- {
- char *newyys = (char *)YYNEW(int);
- char *newyyv = (char *)YYNEW(YYSTYPE);
- if (newyys != 0 && newyyv != 0)
- {
- yys = YYCOPY(newyys, yys, int);
- yyv = YYCOPY(newyyv, yyv, YYSTYPE);
- }
- else
- yynewmax = 0; /* failed */
- }
- else /* not first time */
- {
- yys = YYENLARGE(yys, int);
- yyv = YYENLARGE(yyv, YYSTYPE);
- if (yys == 0 || yyv == 0)
- yynewmax = 0; /* failed */
- }
-#endif
- if (yynewmax <= yymaxdepth) /* tables not expanded */
- {
- yyerror( "yacc stack overflow" );
- YYABORT;
- }
- yymaxdepth = yynewmax;
-
- yy_ps = yys + yyps_index;
- yy_pv = yyv + yypv_index;
- yypvt = yyv + yypvt_index;
- }
- *yy_ps = yy_state;
- *++yy_pv = yyval;
-
- /*
- ** we have a new state - find out what to do
- */
- yy_newstate:
- if ( ( yy_n = yypact[ yy_state ] ) <= YYFLAG )
- goto yydefault; /* simple state */
-#if YYDEBUG
- /*
- ** if debugging, need to mark whether new token grabbed
- */
- yytmp = yychar < 0;
-#endif
- if ( ( yychar < 0 ) && ( ( yychar = YYLEX() ) < 0 ) )
- yychar = 0; /* reached EOF */
-#if YYDEBUG
- if ( yydebug && yytmp )
- {
- register int yy_i;
-
- printf( "Received token " );
- if ( yychar == 0 )
- printf( "end-of-file\n" );
- else if ( yychar < 0 )
- printf( "-none-\n" );
- else
- {
- for ( yy_i = 0; yytoks[yy_i].t_val >= 0;
- yy_i++ )
- {
- if ( yytoks[yy_i].t_val == yychar )
- break;
- }
- printf( "%s\n", yytoks[yy_i].t_name );
- }
- }
-#endif /* YYDEBUG */
- if ( ( ( yy_n += yychar ) < 0 ) || ( yy_n >= YYLAST ) )
- goto yydefault;
- if ( yychk[ yy_n = yyact[ yy_n ] ] == yychar ) /*valid shift*/
- {
- yychar = -1;
- yyval = yylval;
- yy_state = yy_n;
- if ( yyerrflag > 0 )
- yyerrflag--;
- goto yy_stack;
- }
-
- yydefault:
- if ( ( yy_n = yydef[ yy_state ] ) == -2 )
- {
-#if YYDEBUG
- yytmp = yychar < 0;
-#endif
- if ( ( yychar < 0 ) && ( ( yychar = YYLEX() ) < 0 ) )
- yychar = 0; /* reached EOF */
-#if YYDEBUG
- if ( yydebug && yytmp )
- {
- register int yy_i;
-
- printf( "Received token " );
- if ( yychar == 0 )
- printf( "end-of-file\n" );
- else if ( yychar < 0 )
- printf( "-none-\n" );
- else
- {
- for ( yy_i = 0;
- yytoks[yy_i].t_val >= 0;
- yy_i++ )
- {
- if ( yytoks[yy_i].t_val
- == yychar )
- {
- break;
- }
- }
- printf( "%s\n", yytoks[yy_i].t_name );
- }
- }
-#endif /* YYDEBUG */
- /*
- ** look through exception table
- */
- {
- register int *yyxi = yyexca;
-
- while ( ( *yyxi != -1 ) ||
- ( yyxi[1] != yy_state ) )
- {
- yyxi += 2;
- }
- while ( ( *(yyxi += 2) >= 0 ) &&
- ( *yyxi != yychar ) )
- ;
- if ( ( yy_n = yyxi[1] ) < 0 )
- YYACCEPT;
- }
- }
-
- /*
- ** check for syntax error
- */
- if ( yy_n == 0 ) /* have an error */
- {
- /* no worry about speed here! */
- switch ( yyerrflag )
- {
- case 0: /* new error */
- yyerror( "syntax error" );
- goto skip_init;
- yyerrlab:
- /*
- ** get globals into registers.
- ** we have a user generated syntax type error
- */
- yy_pv = yypv;
- yy_ps = yyps;
- yy_state = yystate;
- skip_init:
- yynerrs++;
- /* FALLTHRU */
- case 1:
- case 2: /* incompletely recovered error */
- /* try again... */
- yyerrflag = 3;
- /*
- ** find state where "error" is a legal
- ** shift action
- */
- while ( yy_ps >= yys )
- {
- yy_n = yypact[ *yy_ps ] + YYERRCODE;
- if ( yy_n >= 0 && yy_n < YYLAST &&
- yychk[yyact[yy_n]] == YYERRCODE) {
- /*
- ** simulate shift of "error"
- */
- yy_state = yyact[ yy_n ];
- goto yy_stack;
- }
- /*
- ** current state has no shift on
- ** "error", pop stack
- */
-#if YYDEBUG
-# define _POP_ "Error recovery pops state %d, uncovers state %d\n"
- if ( yydebug )
- printf( _POP_, *yy_ps,
- yy_ps[-1] );
-# undef _POP_
-#endif
- yy_ps--;
- yy_pv--;
- }
- /*
- ** there is no state on stack with "error" as
- ** a valid shift. give up.
- */
- YYABORT;
- case 3: /* no shift yet; eat a token */
-#if YYDEBUG
- /*
- ** if debugging, look up token in list of
- ** pairs. 0 and negative shouldn't occur,
- ** but since timing doesn't matter when
- ** debugging, it doesn't hurt to leave the
- ** tests here.
- */
- if ( yydebug )
- {
- register int yy_i;
-
- printf( "Error recovery discards " );
- if ( yychar == 0 )
- printf( "token end-of-file\n" );
- else if ( yychar < 0 )
- printf( "token -none-\n" );
- else
- {
- for ( yy_i = 0;
- yytoks[yy_i].t_val >= 0;
- yy_i++ )
- {
- if ( yytoks[yy_i].t_val
- == yychar )
- {
- break;
- }
- }
- printf( "token %s\n",
- yytoks[yy_i].t_name );
- }
- }
-#endif /* YYDEBUG */
- if ( yychar == 0 ) /* reached EOF. quit */
- YYABORT;
- yychar = -1;
- goto yy_newstate;
- }
- }/* end if ( yy_n == 0 ) */
- /*
- ** reduction by production yy_n
- ** put stack tops, etc. so things right after switch
- */
-#if YYDEBUG
- /*
- ** if debugging, print the string that is the user's
- ** specification of the reduction which is just about
- ** to be done.
- */
- if ( yydebug )
- printf( "Reduce by (%d) \"%s\"\n",
- yy_n, yyreds[ yy_n ] );
-#endif
- yytmp = yy_n; /* value to switch over */
- yypvt = yy_pv; /* $vars top of value stack */
- /*
- ** Look in goto table for next state
- ** Sorry about using yy_state here as temporary
- ** register variable, but why not, if it works...
- ** If yyr2[ yy_n ] doesn't have the low order bit
- ** set, then there is no action to be done for
- ** this reduction. So, no saving & unsaving of
- ** registers done. The only difference between the
- ** code just after the if and the body of the if is
- ** the goto yy_stack in the body. This way the test
- ** can be made before the choice of what to do is needed.
- */
- {
- /* length of production doubled with extra bit */
- register int yy_len = yyr2[ yy_n ];
-
- if ( !( yy_len & 01 ) )
- {
- yy_len >>= 1;
- yyval = ( yy_pv -= yy_len )[1]; /* $$ = $1 */
- yy_state = yypgo[ yy_n = yyr1[ yy_n ] ] +
- *( yy_ps -= yy_len ) + 1;
- if ( yy_state >= YYLAST ||
- yychk[ yy_state =
- yyact[ yy_state ] ] != -yy_n )
- {
- yy_state = yyact[ yypgo[ yy_n ] ];
- }
- goto yy_stack;
- }
- yy_len >>= 1;
- yyval = ( yy_pv -= yy_len )[1]; /* $$ = $1 */
- yy_state = yypgo[ yy_n = yyr1[ yy_n ] ] +
- *( yy_ps -= yy_len ) + 1;
- if ( yy_state >= YYLAST ||
- yychk[ yy_state = yyact[ yy_state ] ] != -yy_n )
- {
- yy_state = yyact[ yypgo[ yy_n ] ];
- }
- }
- /* save until reenter driver code */
- yystate = yy_state;
- yyps = yy_ps;
- yypv = yy_pv;
- }
- /*
- ** code supplied by user is placed in this switch
- */
- switch( yytmp )
- {
-
-case 4:
-# line 238 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_TypeDeclSeen);
- } break;
-case 5:
-# line 242 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_NoState);
- } break;
-case 6:
-# line 246 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_ConstDeclSeen);
- } break;
-case 7:
-# line 250 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_NoState);
- } break;
-case 8:
-# line 254 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_ExceptDeclSeen);
- } break;
-case 9:
-# line 258 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_NoState);
- } break;
-case 10:
-# line 262 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_InterfaceDeclSeen);
- } break;
-case 11:
-# line 266 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_NoState);
- } break;
-case 12:
-# line 270 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_ModuleDeclSeen);
- } break;
-case 13:
-# line 274 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_NoState);
- } break;
-case 14:
-# line 278 "idl.yy"
-{
- idl_global->err()->syntax_error(idl_global->parse_state());
- } break;
-case 15:
-# line 282 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_NoState);
- yyerrok;
- } break;
-case 16:
-# line 289 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_ModuleSeen);
- } break;
-case 17:
-# line 293 "idl.yy"
-{
- UTL_ScopedName *n =
- new UTL_ScopedName(new Identifier(yypvt[-0].strval, 1, 0, I_FALSE), NULL);
- AST_Module *m = NULL;
- UTL_Scope *s = idl_global->scopes()->top_non_null();
- UTL_StrList *p = idl_global->pragmas();
-
- idl_global->set_parse_state(IDL_GlobalData::PS_ModuleIDSeen);
- /*
- * Make a new module and add it to the enclosing scope
- */
- if (s != NULL) {
- m = idl_global->gen()->create_module(n, p);
- (void) s->fe_add_module(m);
- }
- /*
- * Push it on the stack
- */
- idl_global->scopes()->push(m);
- } break;
-case 18:
-# line 314 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_ModuleSqSeen);
- } break;
-case 19:
-# line 318 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_ModuleBodySeen);
- } break;
-case 20:
-# line 322 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_ModuleQsSeen);
- /*
- * Finished with this module - pop it from the scope stack
- */
- idl_global->scopes()->pop();
- } break;
-case 23:
-# line 338 "idl.yy"
-{
- UTL_Scope *s = idl_global->scopes()->top_non_null();
- AST_Interface *i = NULL;
- AST_Decl *v = NULL;
- UTL_StrList *p = idl_global->pragmas();
- AST_Decl *d = NULL;
- AST_Interface *fd = NULL;
-
- ACE_UNUSED_ARG (v);
-
- /*
- * Make a new interface node and add it to its enclosing scope
- */
- if (s != NULL && yypvt[-0].ihval != NULL) {
- i = idl_global->gen()->create_interface(yypvt[-0].ihval->interface_name(),
- yypvt[-0].ihval->inherits(),
- yypvt[-0].ihval->n_inherits(),
- p);
- if (i != NULL &&
- (d = s->lookup_by_name(i->name(), I_FALSE)) != NULL) {
- /*
- * See if we're defining a forward declared interface.
- */
- if (d->node_type() == AST_Decl::NT_interface) {
- /*
- * Narrow to an interface
- */
- fd = AST_Interface::narrow_from_decl(d);
- /*
- * Successful?
- */
- if (fd == NULL) {
- /*
- * Should we give an error here?
- */
- }
- /*
- * If it is a forward declared interface..
- */
- else if (!fd->is_defined()) {
- /*
- * Check if redefining in same scope
- */
- if (fd->defined_in() != s) {
- idl_global->err()
- ->error3(UTL_Error::EIDL_SCOPE_CONFLICT,
- i,
- fd,
- ScopeAsDecl(s));
- }
- /*
- * All OK, do the redefinition
- */
- else {
- fd->set_inherits(yypvt[-0].ihval->inherits());
- fd->set_n_inherits(yypvt[-0].ihval->n_inherits());
- /*
- * Update place of definition
- */
- fd->set_imported(idl_global->imported());
- fd->set_in_main_file(idl_global->in_main_file());
- fd->set_line(idl_global->lineno());
- fd->set_file_name(idl_global->filename());
- fd->add_pragmas(p);
- /*
- * Use full definition node
- */
- delete i;
- i = fd;
- }
- }
- }
- }
- /*
- * Add the interface to its definition scope
- */
- (void) s->fe_add_interface(i);
- }
- /*
- * Push it on the scope stack
- */
- idl_global->scopes()->push(i);
- } break;
-case 24:
-# line 422 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_InterfaceSqSeen);
- } break;
-case 25:
-# line 426 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_InterfaceBodySeen);
- } break;
-case 26:
-# line 430 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_InterfaceQsSeen);
- /*
- * Done with this interface - pop it off the scopes stack
- */
- idl_global->scopes()->pop();
- } break;
-case 27:
-# line 441 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_InterfaceSeen);
- } break;
-case 28:
-# line 445 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_InterfaceIDSeen);
- yyval.idval = yypvt[-0].idval;
- } break;
-case 29:
-# line 453 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_InheritSpecSeen);
- /*
- * Create an AST representation of the information in the header
- * part of an interface - this representation contains a computed
- * list of all interfaces which this interface inherits from,
- * recursively
- */
- yyval.ihval = new FE_InterfaceHeader(new UTL_ScopedName(yypvt[-1].idval, NULL), yypvt[-0].nlval);
- } break;
-case 30:
-# line 467 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_InheritColonSeen);
- } break;
-case 31:
-# line 471 "idl.yy"
-{
- yyval.nlval = yypvt[-0].nlval;
- } break;
-case 32:
-# line 475 "idl.yy"
-{
- yyval.nlval = NULL;
- } break;
-case 35:
-# line 487 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_TypeDeclSeen);
- } break;
-case 36:
-# line 491 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_NoState);
- } break;
-case 37:
-# line 495 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_ConstDeclSeen);
- } break;
-case 38:
-# line 499 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_NoState);
- } break;
-case 39:
-# line 503 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_ExceptDeclSeen);
- } break;
-case 40:
-# line 507 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_NoState);
- } break;
-case 41:
-# line 511 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_AttrDeclSeen);
- } break;
-case 42:
-# line 515 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_NoState);
- } break;
-case 43:
-# line 519 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_OpDeclSeen);
- } break;
-case 44:
-# line 523 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_NoState);
- } break;
-case 45:
-# line 527 "idl.yy"
-{
- idl_global->err()->syntax_error(idl_global->parse_state());
- } break;
-case 46:
-# line 531 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_NoState);
- yyerrok;
- } break;
-case 47:
-# line 539 "idl.yy"
-{
- yyval.nlval = new UTL_NameList(yypvt[-1].idlist, yypvt[-0].nlval);
- } break;
-case 48:
-# line 547 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_SNListCommaSeen);
- } break;
-case 49:
-# line 551 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_ScopedNameSeen);
-
- if (yypvt[-3].nlval == NULL)
- yyval.nlval = new UTL_NameList(yypvt[-0].idlist, NULL);
- else {
- yypvt[-3].nlval->nconc(new UTL_NameList(yypvt[-0].idlist, NULL));
- yyval.nlval = yypvt[-3].nlval;
- }
- } break;
-case 50:
-# line 562 "idl.yy"
-{
- yyval.nlval = NULL;
- } break;
-case 51:
-# line 569 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_SN_IDSeen);
-
- yyval.idlist = new UTL_IdList(yypvt[-0].idval, NULL);
- } break;
-case 52:
-# line 575 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_ScopeDelimSeen);
- } break;
-case 53:
-# line 579 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_SN_IDSeen);
-
- yyval.idlist = new UTL_IdList(new Identifier(yypvt[-2].strval, 1, 0, I_FALSE),
- new UTL_IdList(yypvt[-0].idval, NULL));
- } break;
-case 54:
-# line 587 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_ScopeDelimSeen);
- } break;
-case 55:
-# line 591 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_SN_IDSeen);
-
- yypvt[-3].idlist->nconc(new UTL_IdList(yypvt[-0].idval, NULL));
- yyval.idlist = yypvt[-3].idlist;
- } break;
-case 56:
-# line 600 "idl.yy"
-{
- yyval.idval = new Identifier(yypvt[-0].strval, 1, 0, I_FALSE);
- } break;
-case 57:
-# line 607 "idl.yy"
-{
- UTL_Scope *s = idl_global->scopes()->top_non_null();
- UTL_ScopedName *n = new UTL_ScopedName(yypvt[-0].idval, NULL);
- AST_InterfaceFwd *f = NULL;
- UTL_StrList *p = idl_global->pragmas();
-
- idl_global->set_parse_state(IDL_GlobalData::PS_ForwardDeclSeen);
- /*
- * Create a node representing a forward declaration of an
- * interface. Store it in the enclosing scope
- */
- if (s != NULL) {
- f = idl_global->gen()->create_interface_fwd(n, p);
- (void) s->fe_add_interface_fwd(f);
- }
- } break;
-case 58:
-# line 627 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_ConstSeen);
- } break;
-case 59:
-# line 631 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_ConstTypeSeen);
- } break;
-case 60:
-# line 635 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_ConstIDSeen);
- } break;
-case 61:
-# line 639 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_ConstAssignSeen);
- } break;
-case 62:
-# line 643 "idl.yy"
-{
- UTL_ScopedName *n = new UTL_ScopedName(yypvt[-4].idval, NULL);
- UTL_Scope *s = idl_global->scopes()->top_non_null();
- AST_Constant *c = NULL;
- UTL_StrList *p = idl_global->pragmas();
- AST_Decl *v = NULL;
-
- ACE_UNUSED_ARG (v);
-
- idl_global->set_parse_state(IDL_GlobalData::PS_ConstExprSeen);
- /*
- * Create a node representing a constant declaration. Store
- * it in the enclosing scope
- */
- if (yypvt[-0].exval != NULL && s != NULL) {
- if (yypvt[-0].exval->coerce(yypvt[-6].etval) == NULL)
- idl_global->err()->coercion_error(yypvt[-0].exval, yypvt[-6].etval);
- else {
- c =
- idl_global->gen()->create_constant(yypvt[-6].etval, yypvt[-0].exval, n, p);
- (void) s->fe_add_constant(c);
- }
- }
- } break;
-case 68:
-# line 676 "idl.yy"
-{
- yyval.etval = AST_Expression::EV_string;
- } break;
-case 69:
-# line 680 "idl.yy"
-{
- yyval.etval = AST_Expression::EV_wstring;
- } break;
-case 70:
-# line 684 "idl.yy"
-{
- UTL_Scope *s = idl_global->scopes()->top_non_null();
- AST_Decl *d = NULL;
- AST_PredefinedType *c = NULL;
- AST_Typedef *t = NULL;
-
- /*
- * If the constant's type is a scoped name, it must resolve
- * to a scalar constant type
- */
- if (s != NULL && (d = s->lookup_by_name(yypvt[-0].idlist, I_TRUE)) != NULL) {
- /*
- * Look through typedefs
- */
- while (d->node_type() == AST_Decl::NT_typedef) {
- t = AST_Typedef::narrow_from_decl(d);
- if (t == NULL)
- break;
- d = t->base_type();
- }
- if (d == NULL)
- yyval.etval = AST_Expression::EV_any;
- else if (d->node_type() == AST_Decl::NT_pre_defined) {
- c = AST_PredefinedType::narrow_from_decl(d);
- if (c != NULL) {
- yyval.etval = idl_global->PredefinedTypeToExprType(c->pt());
- } else {
- yyval.etval = AST_Expression::EV_any;
- }
- } else
- yyval.etval = AST_Expression::EV_any;
- } else
- yyval.etval = AST_Expression::EV_any;
- } break;
-case 74:
-# line 726 "idl.yy"
-{
- yyval.exval = idl_global->gen()->create_expr(AST_Expression::EC_or, yypvt[-2].exval, yypvt[-0].exval);
- } break;
-case 76:
-# line 734 "idl.yy"
-{
- yyval.exval = idl_global->gen()->create_expr(AST_Expression::EC_xor, yypvt[-2].exval, yypvt[-0].exval);
- } break;
-case 78:
-# line 742 "idl.yy"
-{
- yyval.exval = idl_global->gen()->create_expr(AST_Expression::EC_and, yypvt[-2].exval, yypvt[-0].exval);
- } break;
-case 80:
-# line 750 "idl.yy"
-{
- yyval.exval = idl_global->gen()->create_expr(AST_Expression::EC_right,yypvt[-2].exval,yypvt[-0].exval);
- } break;
-case 81:
-# line 754 "idl.yy"
-{
- yyval.exval = idl_global->gen()->create_expr(AST_Expression::EC_left,yypvt[-2].exval,yypvt[-0].exval);
- } break;
-case 83:
-# line 762 "idl.yy"
-{
- yyval.exval = idl_global->gen()->create_expr(AST_Expression::EC_add, yypvt[-2].exval, yypvt[-0].exval);
- } break;
-case 84:
-# line 766 "idl.yy"
-{
- yyval.exval = idl_global->gen()->create_expr(AST_Expression::EC_minus,yypvt[-2].exval,yypvt[-0].exval);
- } break;
-case 86:
-# line 774 "idl.yy"
-{
- yyval.exval = idl_global->gen()->create_expr(AST_Expression::EC_mul, yypvt[-2].exval, yypvt[-0].exval);
- } break;
-case 87:
-# line 778 "idl.yy"
-{
- yyval.exval = idl_global->gen()->create_expr(AST_Expression::EC_div, yypvt[-2].exval, yypvt[-0].exval);
- } break;
-case 88:
-# line 782 "idl.yy"
-{
- yyval.exval = idl_global->gen()->create_expr(AST_Expression::EC_mod, yypvt[-2].exval, yypvt[-0].exval);
- } break;
-case 90:
-# line 790 "idl.yy"
-{
- yyval.exval = idl_global->gen()->create_expr(AST_Expression::EC_u_plus,
- yypvt[-0].exval,
- NULL);
- } break;
-case 91:
-# line 796 "idl.yy"
-{
- yyval.exval = idl_global->gen()->create_expr(AST_Expression::EC_u_minus,
- yypvt[-0].exval,
- NULL);
- } break;
-case 92:
-# line 802 "idl.yy"
-{
- yyval.exval = idl_global->gen()->create_expr(AST_Expression::EC_bit_neg,
- yypvt[-0].exval,
- NULL);
- } break;
-case 93:
-# line 811 "idl.yy"
-{
- /*
- * An expression which is a scoped name is not resolved now,
- * but only when it is evaluated (such as when it is assigned
- * as a constant value)
- */
- yyval.exval = idl_global->gen()->create_expr(yypvt[-0].idlist);
- } break;
-case 95:
-# line 821 "idl.yy"
-{
- yyval.exval = yypvt[-1].exval;
- } break;
-case 96:
-# line 828 "idl.yy"
-{
- yyval.exval = idl_global->gen()->create_expr(yypvt[-0].ival);
- } break;
-case 97:
-# line 832 "idl.yy"
-{
- yyval.exval = idl_global->gen()->create_expr(yypvt[-0].sval);
- } break;
-case 98:
-# line 836 "idl.yy"
-{
- yyval.exval = idl_global->gen()->create_expr(yypvt[-0].cval);
- } break;
-case 99:
-# line 840 "idl.yy"
-{
- yyval.exval = idl_global->gen()->create_expr(yypvt[-0].dval);
- } break;
-case 100:
-# line 844 "idl.yy"
-{
- yyval.exval = idl_global->gen()->create_expr((idl_bool) I_TRUE,
- AST_Expression::EV_bool);
- } break;
-case 101:
-# line 849 "idl.yy"
-{
- yyval.exval = idl_global->gen()->create_expr((idl_bool) I_FALSE,
- AST_Expression::EV_bool);
- } break;
-case 102:
-# line 857 "idl.yy"
-{
- yypvt[-0].exval->evaluate(AST_Expression::EK_const);
- yyval.exval = idl_global->gen()->create_expr(yypvt[-0].exval, AST_Expression::EV_ulong);
- } break;
-case 103:
-# line 865 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_TypedefSeen);
- } break;
-case 104:
-# line 868 "idl.yy"
-{yyval.ival = 0;} break;
-case 105:
-# line 869 "idl.yy"
-{ yyval.ival = 0;} break;
-case 106:
-# line 870 "idl.yy"
-{ yyval.ival = 0;} break;
-case 107:
-# line 871 "idl.yy"
-{ yyval.ival = 0;} break;
-case 108:
-# line 876 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_TypeSpecSeen);
- } break;
-case 109:
-# line 880 "idl.yy"
-{
- UTL_Scope *s = idl_global->scopes()->top_non_null();
- UTL_DecllistActiveIterator *l;
- FE_Declarator *d = NULL;
- AST_Typedef *t = NULL;
- AST_Decl *v = NULL;
- UTL_StrList *p = idl_global->pragmas();
-
- ACE_UNUSED_ARG (v);
-
- idl_global->set_parse_state(IDL_GlobalData::PS_DeclaratorsSeen);
- /*
- * Create a list of type renamings. Add them to the
- * enclosing scope
- */
- if (s != NULL && yypvt[-2].dcval != NULL && yypvt[-0].dlval != NULL) {
- l = new UTL_DecllistActiveIterator(yypvt[-0].dlval);
- for (;!(l->is_done()); l->next()) {
- d = l->item();
- if (d == NULL)
- continue;
- AST_Type * tp = d->compose(yypvt[-2].dcval);
- if (tp == NULL)
- continue;
- t = idl_global->gen()->create_typedef(tp, d->name(), p);
- (void) s->fe_add_typedef(t);
- }
- delete l;
- }
- } break;
-case 112:
-# line 919 "idl.yy"
-{
- yyval.dcval = idl_global->scopes()->bottom()->lookup_primitive_type(yypvt[-0].etval);
- } break;
-case 114:
-# line 924 "idl.yy"
-{
- UTL_Scope *s = idl_global->scopes()->top_non_null();
- AST_Decl *d = NULL;
-
- if (s != NULL)
- d = s->lookup_by_name(yypvt[-0].idlist, I_TRUE);
- if (d == NULL)
- idl_global->err()->lookup_error(yypvt[-0].idlist);
- yyval.dcval = d;
- } break;
-case 127:
-# line 959 "idl.yy"
-{
- yyval.dlval = new UTL_DeclList(yypvt[-1].deval, yypvt[-0].dlval);
- } break;
-case 128:
-# line 967 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_DeclsCommaSeen);
- } break;
-case 129:
-# line 971 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_DeclsDeclSeen);
-
- if (yypvt[-3].dlval == NULL)
- yyval.dlval = new UTL_DeclList(yypvt[-0].deval, NULL);
- else {
- yypvt[-3].dlval->nconc(new UTL_DeclList(yypvt[-0].deval, NULL));
- yyval.dlval = yypvt[-3].dlval;
- }
- } break;
-case 130:
-# line 982 "idl.yy"
-{
- yyval.dlval = NULL;
- } break;
-case 133:
-# line 994 "idl.yy"
-{
- yyval.dlval = new UTL_DeclList(yypvt[-1].deval, yypvt[-0].dlval);
- } break;
-case 134:
-# line 1002 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_DeclsCommaSeen);
- } break;
-case 135:
-# line 1006 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_DeclsDeclSeen);
-
- if (yypvt[-3].dlval == NULL)
- yyval.dlval = new UTL_DeclList(yypvt[-0].deval, NULL);
- else {
- yypvt[-3].dlval->nconc(new UTL_DeclList(yypvt[-0].deval, NULL));
- yyval.dlval = yypvt[-3].dlval;
- }
- } break;
-case 136:
-# line 1017 "idl.yy"
-{
- yyval.dlval = NULL;
- } break;
-case 137:
-# line 1024 "idl.yy"
-{
- yyval.deval = new FE_Declarator(new UTL_ScopedName(yypvt[-0].idval, NULL),
- FE_Declarator::FD_simple, NULL);
- } break;
-case 138:
-# line 1032 "idl.yy"
-{
- yyval.deval = new FE_Declarator(new UTL_ScopedName(yypvt[-0].dcval->local_name(), NULL),
- FE_Declarator::FD_complex,
- yypvt[-0].dcval);
- } break;
-case 141:
-# line 1046 "idl.yy"
-{
- yyval.etval = AST_Expression::EV_long;
- } break;
-case 142:
-# line 1050 "idl.yy"
-{
- yyval.etval = AST_Expression::EV_longlong;
- } break;
-case 143:
-# line 1054 "idl.yy"
-{
- yyval.etval = AST_Expression::EV_short;
- } break;
-case 144:
-# line 1061 "idl.yy"
-{
- yyval.etval = AST_Expression::EV_ulong;
- } break;
-case 145:
-# line 1065 "idl.yy"
-{
- yyval.etval = AST_Expression::EV_ulonglong;
- } break;
-case 146:
-# line 1069 "idl.yy"
-{
- yyval.etval = AST_Expression::EV_ushort;
- } break;
-case 147:
-# line 1076 "idl.yy"
-{
- yyval.etval = AST_Expression::EV_double;
- } break;
-case 148:
-# line 1080 "idl.yy"
-{
- yyval.etval = AST_Expression::EV_float;
- } break;
-case 149:
-# line 1084 "idl.yy"
-{
- yyval.etval = AST_Expression::EV_longdouble;
- } break;
-case 150:
-# line 1091 "idl.yy"
-{
- yyval.etval = AST_Expression::EV_char;
- } break;
-case 151:
-# line 1095 "idl.yy"
-{
- yyval.etval = AST_Expression::EV_wchar;
- } break;
-case 152:
-# line 1102 "idl.yy"
-{
- yyval.etval = AST_Expression::EV_octet;
- } break;
-case 153:
-# line 1109 "idl.yy"
-{
- yyval.etval = AST_Expression::EV_bool;
- } break;
-case 154:
-# line 1116 "idl.yy"
-{
- yyval.etval = AST_Expression::EV_any;
- } break;
-case 155:
-# line 1123 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_StructSeen);
- } break;
-case 156:
-# line 1127 "idl.yy"
-{
- UTL_Scope *s = idl_global->scopes()->top_non_null();
- UTL_ScopedName *n = new UTL_ScopedName(yypvt[-0].idval, NULL);
- AST_Structure *d = NULL;
- UTL_StrList *p = idl_global->pragmas();
- AST_Decl *v = NULL;
-
- ACE_UNUSED_ARG (v);
-
- idl_global->set_parse_state(IDL_GlobalData::PS_StructIDSeen);
- /*
- * Create a node representing a struct declaration. Add it
- * to the enclosing scope
- */
- if (s != NULL) {
- d = idl_global->gen()->create_structure(n, p);
- (void) s->fe_add_structure(d);
- }
- /*
- * Push the scope of the struct on the scopes stack
- */
- idl_global->scopes()->push(d);
- } break;
-case 157:
-# line 1151 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_StructSqSeen);
- } break;
-case 158:
-# line 1155 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_StructBodySeen);
- } break;
-case 159:
-# line 1159 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_StructQsSeen);
- /*
- * Done with this struct. Pop its scope off the scopes stack
- */
- if (idl_global->scopes()->top() == NULL)
- yyval.dcval = NULL;
- else {
- yyval.dcval =
- AST_Structure::narrow_from_scope(
- idl_global->scopes()->top_non_null());
- idl_global->scopes()->pop();
- }
- } break;
-case 163:
-# line 1184 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_MemberTypeSeen);
- } break;
-case 164:
-# line 1188 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_MemberDeclsSeen);
- } break;
-case 165:
-# line 1192 "idl.yy"
-{
- UTL_Scope *s = idl_global->scopes()->top_non_null();
- UTL_DecllistActiveIterator *l = NULL;
- FE_Declarator *d = NULL;
- AST_Field *f = NULL;
- UTL_StrList *p = idl_global->pragmas();
-
- idl_global->set_parse_state(IDL_GlobalData::PS_MemberDeclsCompleted);
- /*
- * Check for illegal recursive use of type
- */
- if (yypvt[-4].dcval != NULL && AST_illegal_recursive_type(yypvt[-4].dcval))
- idl_global->err()->error1(UTL_Error::EIDL_RECURSIVE_TYPE, yypvt[-4].dcval);
- /*
- * Create a node representing a struct or exception member
- * Add it to the enclosing scope
- */
- else if (s != NULL && yypvt[-4].dcval != NULL && yypvt[-2].dlval != NULL) {
- l = new UTL_DecllistActiveIterator(yypvt[-2].dlval);
- for (;!(l->is_done()); l->next()) {
- d = l->item();
- if (d == NULL)
- continue;
- AST_Type *tp = d->compose(yypvt[-4].dcval);
- if (tp == NULL)
- continue;
- f = idl_global->gen()->create_field(tp, d->name(), p);
- (void) s->fe_add_field(f);
- }
- delete l;
- }
- } break;
-case 166:
-# line 1225 "idl.yy"
-{
- idl_global->err()->syntax_error(idl_global->parse_state());
- } break;
-case 167:
-# line 1229 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_NoState);
- yyerrok;
- } break;
-case 168:
-# line 1237 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_UnionSeen);
- } break;
-case 169:
-# line 1241 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_UnionIDSeen);
- } break;
-case 170:
-# line 1245 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_SwitchSeen);
- } break;
-case 171:
-# line 1249 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_SwitchOpenParSeen);
- } break;
-case 172:
-# line 1253 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_SwitchTypeSeen);
- } break;
-case 173:
-# line 1257 "idl.yy"
-{
- UTL_Scope *s = idl_global->scopes()->top_non_null();
- UTL_ScopedName *n = new UTL_ScopedName(yypvt[-8].idval, NULL);
- AST_Union *u = NULL;
- AST_Decl *v = NULL;
- UTL_StrList *p = idl_global->pragmas();
-
- ACE_UNUSED_ARG (v);
-
- idl_global->set_parse_state(IDL_GlobalData::PS_SwitchCloseParSeen);
- /*
- * Create a node representing a union. Add it to its enclosing
- * scope
- */
- if (yypvt[-2].dcval != NULL && s != NULL) {
- AST_ConcreteType *tp = AST_ConcreteType::narrow_from_decl(yypvt[-2].dcval);
- if (tp == NULL) {
- idl_global->err()->not_a_type(yypvt[-2].dcval);
- } else {
- u = idl_global->gen()->create_union(tp, n, p);
- (void) s->fe_add_union(u);
- }
- }
- /*
- * Push the scope of the union on the scopes stack
- */
- idl_global->scopes()->push(u);
- } break;
-case 174:
-# line 1286 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_UnionSqSeen);
- } break;
-case 175:
-# line 1290 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_UnionBodySeen);
- } break;
-case 176:
-# line 1294 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_UnionQsSeen);
- /*
- * Done with this union. Pop its scope from the scopes stack
- */
- if (idl_global->scopes()->top() == NULL)
- yyval.dcval = NULL;
- else {
- yyval.dcval =
- AST_Union::narrow_from_scope(
- idl_global->scopes()->top_non_null());
- idl_global->scopes()->pop();
- }
- } break;
-case 177:
-# line 1312 "idl.yy"
-{
- yyval.dcval = idl_global->scopes()->bottom()->lookup_primitive_type(yypvt[-0].etval);
- } break;
-case 178:
-# line 1316 "idl.yy"
-{
- yyval.dcval = idl_global->scopes()->bottom()->lookup_primitive_type(yypvt[-0].etval);
- } break;
-case 179:
-# line 1320 "idl.yy"
-{
- yyval.dcval = idl_global->scopes()->bottom()->lookup_primitive_type(yypvt[-0].etval);
- } break;
-case 180:
-# line 1324 "idl.yy"
-{
- yyval.dcval = idl_global->scopes()->bottom()->lookup_primitive_type(yypvt[-0].etval);
- } break;
-case 182:
-# line 1329 "idl.yy"
-{
- UTL_Scope *s = idl_global->scopes()->top_non_null();
- AST_Decl *d = NULL;
- AST_PredefinedType *p = NULL;
- AST_Typedef *t = NULL;
- long found = I_FALSE;
-
- /*
- * The discriminator is a scoped name. Try to resolve to
- * one of the scalar types or to an enum. Thread through
- * typedef's to arrive at the base type at the end of the
- * chain
- */
- if (s != NULL && (d = s->lookup_by_name(yypvt[-0].idlist, I_TRUE)) != NULL) {
- while (!found) {
- switch (d->node_type()) {
- case AST_Decl::NT_enum:
- yyval.dcval = d;
- found = I_TRUE;
- break;
- case AST_Decl::NT_pre_defined:
- p = AST_PredefinedType::narrow_from_decl(d);
- if (p != NULL) {
- switch (p->pt()) {
- case AST_PredefinedType::PT_long:
- case AST_PredefinedType::PT_ulong:
- case AST_PredefinedType::PT_longlong:
- case AST_PredefinedType::PT_ulonglong:
- case AST_PredefinedType::PT_short:
- case AST_PredefinedType::PT_char:
- case AST_PredefinedType::PT_wchar:
- case AST_PredefinedType::PT_octet:
- case AST_PredefinedType::PT_boolean:
- yyval.dcval = p;
- found = I_TRUE;
- break;
- default:
- yyval.dcval = NULL;
- found = I_TRUE;
- break;
- }
- }
- break;
- case AST_Decl::NT_typedef:
- t = AST_Typedef::narrow_from_decl(d);
- if (t != NULL) d = t->base_type();
- break;
- default:
- yyval.dcval = NULL;
- found = I_TRUE;
- break;
- }
- }
- } else
- yyval.dcval = NULL;
-
- if (yyval.dcval == NULL)
- idl_global->err()->lookup_error(yypvt[-0].idlist);
- } break;
-case 186:
-# line 1399 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_UnionLabelSeen);
- } break;
-case 187:
-# line 1403 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_UnionElemSeen);
- } break;
-case 188:
-# line 1407 "idl.yy"
-{
- UTL_Scope *s = idl_global->scopes()->top_non_null();
- UTL_LabellistActiveIterator *l = NULL;
- AST_UnionLabel *d = NULL;
- AST_UnionBranch *b = NULL;
- AST_Field *f = yypvt[-2].ffval;
-
- idl_global->set_parse_state(IDL_GlobalData::PS_UnionElemCompleted);
- /*
- * Create several nodes representing branches of a union.
- * Add them to the enclosing scope (the union scope)
- */
- if (s != NULL && yypvt[-4].llval != NULL && yypvt[-2].ffval != NULL) {
- l = new UTL_LabellistActiveIterator(yypvt[-4].llval);
- for (;!(l->is_done()); l->next()) {
- d = l->item();
- if (d == NULL)
- continue;
- b = idl_global->gen()->create_union_branch(d,
- f->field_type(),
- f->name(),
- f->pragmas());
- (void) s->fe_add_union_branch(b);
- }
- delete l;
- }
- } break;
-case 189:
-# line 1435 "idl.yy"
-{
- idl_global->err()->syntax_error(idl_global->parse_state());
- } break;
-case 190:
-# line 1439 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_NoState);
- yyerrok;
- } break;
-case 191:
-# line 1447 "idl.yy"
-{
- yyval.llval = new UTL_LabelList(yypvt[-1].ulval, yypvt[-0].llval);
- } break;
-case 192:
-# line 1454 "idl.yy"
-{
- if (yypvt[-1].llval == NULL)
- yyval.llval = new UTL_LabelList(yypvt[-0].ulval, NULL);
- else {
- yypvt[-1].llval->nconc(new UTL_LabelList(yypvt[-0].ulval, NULL));
- yyval.llval = yypvt[-1].llval;
- }
- } break;
-case 193:
-# line 1463 "idl.yy"
-{
- yyval.llval = NULL;
- } break;
-case 194:
-# line 1470 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_DefaultSeen);
- } break;
-case 195:
-# line 1474 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_LabelColonSeen);
-
- yyval.ulval = idl_global->gen()->
- create_union_label(AST_UnionLabel::UL_default,
- NULL);
- } break;
-case 196:
-# line 1482 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_CaseSeen);
- } break;
-case 197:
-# line 1486 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_LabelExprSeen);
- } break;
-case 198:
-# line 1490 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_LabelColonSeen);
-
- yyval.ulval = idl_global->gen()->create_union_label(AST_UnionLabel::UL_label,
- yypvt[-2].exval);
- } break;
-case 199:
-# line 1500 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_UnionElemTypeSeen);
- } break;
-case 200:
-# line 1504 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_UnionElemDeclSeen);
- /*
- * Check for illegal recursive use of type
- */
- if (yypvt[-2].dcval != NULL && AST_illegal_recursive_type(yypvt[-2].dcval))
- idl_global->err()->error1(UTL_Error::EIDL_RECURSIVE_TYPE, yypvt[-2].dcval);
- /*
- * Create a field in a union branch
- */
- else if (yypvt[-2].dcval == NULL || yypvt[-0].deval == NULL)
- yyval.ffval = NULL;
- else {
- AST_Type *tp = yypvt[-0].deval->compose(yypvt[-2].dcval);
- if (tp == NULL)
- yyval.ffval = NULL;
- else
- yyval.ffval = idl_global->gen()->create_field(tp,
- yypvt[-0].deval->name(),
- idl_global->pragmas());
- }
- } break;
-case 201:
-# line 1530 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_EnumSeen);
- } break;
-case 202:
-# line 1534 "idl.yy"
-{
- UTL_Scope *s = idl_global->scopes()->top_non_null();
- UTL_ScopedName *n = new UTL_ScopedName(yypvt[-0].idval, NULL);
- AST_Enum *e = NULL;
- AST_Decl *v = NULL;
- UTL_StrList *p = idl_global->pragmas();
-
- ACE_UNUSED_ARG (v);
-
- idl_global->set_parse_state(IDL_GlobalData::PS_EnumIDSeen);
- /*
- * Create a node representing an enum and add it to its
- * enclosing scope
- */
- if (s != NULL) {
- e = idl_global->gen()->create_enum(n, p);
- /*
- * Add it to its defining scope
- */
- (void) s->fe_add_enum(e);
- }
- /*
- * Push the enum scope on the scopes stack
- */
- idl_global->scopes()->push(e);
- } break;
-case 203:
-# line 1561 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_EnumSqSeen);
- } break;
-case 204:
-# line 1565 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_EnumBodySeen);
- } break;
-case 205:
-# line 1569 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_EnumQsSeen);
- /*
- * Done with this enum. Pop its scope from the scopes stack
- */
- if (idl_global->scopes()->top() == NULL)
- yyval.dcval = NULL;
- else {
- yyval.dcval = AST_Enum::narrow_from_scope(idl_global->scopes()->top_non_null());
- idl_global->scopes()->pop();
- }
- } break;
-case 207:
-# line 1588 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_EnumCommaSeen);
- } break;
-case 210:
-# line 1597 "idl.yy"
-{
- UTL_Scope *s = idl_global->scopes()->top_non_null();
- UTL_ScopedName *n =
- new UTL_ScopedName(new Identifier(yypvt[-0].strval, 1, 0, I_FALSE), NULL);
- AST_EnumVal *e = NULL;
- AST_Enum *c = NULL;
- UTL_StrList *p = idl_global->pragmas();
-
- /*
- * Create a node representing one enumerator in an enum
- * Add it to the enclosing scope (the enum scope)
- */
- if (s != NULL && s->scope_node_type() == AST_Decl::NT_enum) {
- c = AST_Enum::narrow_from_scope(s);
- if (c != NULL)
- e = idl_global->gen()->create_enum_val(c->next_enum_val(), n, p);
- (void) s->fe_add_enum_val(e);
- }
- } break;
-case 211:
-# line 1621 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_SequenceCommaSeen);
- } break;
-case 212:
-# line 1625 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_SequenceExprSeen);
- } break;
-case 213:
-# line 1629 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_SequenceQsSeen);
- /*
- * Remove sequence marker from scopes stack
- */
- if (idl_global->scopes()->top() == NULL)
- idl_global->scopes()->pop();
- /*
- * Create a node representing a sequence
- */
- if (yypvt[-2].exval == NULL || yypvt[-2].exval->coerce(AST_Expression::EV_ulong) == NULL) {
- idl_global->err()->coercion_error(yypvt[-2].exval, AST_Expression::EV_ulong);
- yyval.dcval = NULL;
- } else if (yypvt[-5].dcval == NULL) {
- yyval.dcval = NULL;
- } else {
- AST_Type *tp = AST_Type::narrow_from_decl(yypvt[-5].dcval);
- if (tp == NULL)
- yyval.dcval = NULL;
- else {
- yyval.dcval = idl_global->gen()->create_sequence(yypvt[-2].exval, tp);
- /*
- * Add this AST_Sequence to the types defined in the global scope
- */
- (void) idl_global->root()
- ->fe_add_sequence(AST_Sequence::narrow_from_decl(yyval.dcval));
- }
- }
- } break;
-case 214:
-# line 1660 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_SequenceQsSeen);
- /*
- * Remove sequence marker from scopes stack
- */
- if (idl_global->scopes()->top() == NULL)
- idl_global->scopes()->pop();
- /*
- * Create a node representing a sequence
- */
- if (yypvt[-1].dcval == NULL)
- yyval.dcval = NULL;
- else {
- AST_Type *tp = AST_Type::narrow_from_decl(yypvt[-1].dcval);
- if (tp == NULL)
- yyval.dcval = NULL;
- else {
- yyval.dcval =
- idl_global->gen()->create_sequence(
- idl_global->gen()->create_expr((unsigned long) 0),
- tp);
- /*
- * Add this AST_Sequence to the types defined in the global scope
- */
- (void) idl_global->root()
- ->fe_add_sequence(AST_Sequence::narrow_from_decl(yyval.dcval));
- }
- }
- } break;
-case 215:
-# line 1693 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_SequenceSeen);
- /*
- * Push a sequence marker on scopes stack
- */
- idl_global->scopes()->push(NULL);
- } break;
-case 216:
-# line 1701 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_SequenceSqSeen);
- } break;
-case 217:
-# line 1705 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_SequenceTypeSeen);
- yyval.dcval = yypvt[-0].dcval;
- } break;
-case 218:
-# line 1714 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_StringSqSeen);
- } break;
-case 219:
-# line 1718 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_StringExprSeen);
- } break;
-case 220:
-# line 1722 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_StringQsSeen);
- /*
- * Create a node representing a string
- */
- if (yypvt[-2].exval == NULL || yypvt[-2].exval->coerce(AST_Expression::EV_ulong) == NULL) {
- idl_global->err()->coercion_error(yypvt[-2].exval, AST_Expression::EV_ulong);
- yyval.dcval = NULL;
- } else {
- yyval.dcval = idl_global->gen()->create_string(yypvt[-2].exval);
- /*
- * Add this AST_String to the types defined in the global scope
- */
- (void) idl_global->root()
- ->fe_add_string(AST_String::narrow_from_decl(yyval.dcval));
- }
- } break;
-case 221:
-# line 1740 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_StringCompleted);
- /*
- * Create a node representing a string
- */
- yyval.dcval =
- idl_global->gen()->create_string(
- idl_global->gen()->create_expr((unsigned long) 0));
- /*
- * Add this AST_String to the types defined in the global scope
- */
- (void) idl_global->root()
- ->fe_add_string(AST_String::narrow_from_decl(yyval.dcval));
- } break;
-case 222:
-# line 1758 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_StringSeen);
- } break;
-case 223:
-# line 1766 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_StringSqSeen);
- } break;
-case 224:
-# line 1770 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_StringExprSeen);
- } break;
-case 225:
-# line 1774 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_StringQsSeen);
- /*
- * Create a node representing a string
- */
- if (yypvt[-2].exval == NULL || yypvt[-2].exval->coerce(AST_Expression::EV_ulong) == NULL) {
- idl_global->err()->coercion_error(yypvt[-2].exval, AST_Expression::EV_ulong);
- yyval.dcval = NULL;
- } else {
- yyval.dcval = idl_global->gen()->create_wstring(yypvt[-2].exval);
- /*
- * Add this AST_String to the types defined in the global scope
- */
- (void) idl_global->root()
- ->fe_add_string(AST_String::narrow_from_decl(yyval.dcval));
- }
- } break;
-case 226:
-# line 1792 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_StringCompleted);
- /*
- * Create a node representing a string
- */
- yyval.dcval =
- idl_global->gen()->create_wstring(
- idl_global->gen()->create_expr((unsigned long) 0));
- /*
- * Add this AST_String to the types defined in the global scope
- */
- (void) idl_global->root()
- ->fe_add_string(AST_String::narrow_from_decl(yyval.dcval));
- } break;
-case 227:
-# line 1810 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_StringSeen);
- } break;
-case 228:
-# line 1817 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_ArrayIDSeen);
- } break;
-case 229:
-# line 1821 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_ArrayCompleted);
- /*
- * Create a node representing an array
- */
- if (yypvt[-0].elval != NULL) {
- yyval.dcval = idl_global->gen()->create_array(new UTL_ScopedName(yypvt[-2].idval, NULL),
- yypvt[-0].elval->length(), yypvt[-0].elval);
- }
- } break;
-case 230:
-# line 1835 "idl.yy"
-{
- yyval.elval = new UTL_ExprList(yypvt[-1].exval, yypvt[-0].elval);
- } break;
-case 231:
-# line 1842 "idl.yy"
-{
- if (yypvt[-1].elval == NULL)
- yyval.elval = new UTL_ExprList(yypvt[-0].exval, NULL);
- else {
- yypvt[-1].elval->nconc(new UTL_ExprList(yypvt[-0].exval, NULL));
- yyval.elval = yypvt[-1].elval;
- }
- } break;
-case 232:
-# line 1851 "idl.yy"
-{
- yyval.elval = NULL;
- } break;
-case 233:
-# line 1858 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_DimSqSeen);
- } break;
-case 234:
-# line 1862 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_DimExprSeen);
- } break;
-case 235:
-# line 1866 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_DimQsSeen);
- /*
- * Array dimensions are expressions which must be coerced to
- * positive integers
- */
- if (yypvt[-2].exval == NULL || yypvt[-2].exval->coerce(AST_Expression::EV_ulong) == NULL) {
- idl_global->err()->coercion_error(yypvt[-2].exval, AST_Expression::EV_ulong);
- yyval.exval = NULL;
- } else
- yyval.exval = yypvt[-2].exval;
- } break;
-case 236:
-# line 1883 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_AttrSeen);
- } break;
-case 237:
-# line 1887 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_AttrTypeSeen);
- } break;
-case 238:
-# line 1891 "idl.yy"
-{
- UTL_Scope *s = idl_global->scopes()->top_non_null();
- UTL_DecllistActiveIterator *l = NULL;
- AST_Attribute *a = NULL;
- FE_Declarator *d = NULL;
- UTL_StrList *p = idl_global->pragmas();
-
- idl_global->set_parse_state(IDL_GlobalData::PS_AttrCompleted);
- /*
- * Create nodes representing attributes and add them to the
- * enclosing scope
- */
- if (s != NULL && yypvt[-2].dcval != NULL && yypvt[-0].dlval != NULL) {
- l = new UTL_DecllistActiveIterator(yypvt[-0].dlval);
- for (;!(l->is_done()); l->next()) {
- d = l->item();
- if (d == NULL)
- continue;
- AST_Type *tp = d->compose(yypvt[-2].dcval);
- if (tp == NULL)
- continue;
- a = idl_global->gen()->create_attribute(yypvt[-5].bval, tp, d->name(), p);
- /*
- * Add one attribute to the enclosing scope
- */
- (void) s->fe_add_attribute(a);
- }
- delete l;
- }
- } break;
-case 239:
-# line 1925 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_AttrROSeen);
- yyval.bval = I_TRUE;
- } break;
-case 240:
-# line 1930 "idl.yy"
-{
- yyval.bval = I_FALSE;
- } break;
-case 241:
-# line 1937 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_ExceptSeen);
- } break;
-case 242:
-# line 1941 "idl.yy"
-{
- UTL_Scope *s = idl_global->scopes()->top_non_null();
- UTL_ScopedName *n = new UTL_ScopedName(yypvt[-0].idval, NULL);
- AST_Exception *e = NULL;
- UTL_StrList *p = idl_global->pragmas();
- AST_Decl *v = NULL;
-
- ACE_UNUSED_ARG (v);
-
- idl_global->set_parse_state(IDL_GlobalData::PS_ExceptIDSeen);
- /*
- * Create a node representing an exception and add it to
- * the enclosing scope
- */
- if (s != NULL) {
- e = idl_global->gen()->create_exception(n, p);
- (void) s->fe_add_exception(e);
- }
- /*
- * Push the exception scope on the scope stack
- */
- idl_global->scopes()->push(e);
- } break;
-case 243:
-# line 1965 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_ExceptSqSeen);
- } break;
-case 244:
-# line 1969 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_ExceptBodySeen);
- } break;
-case 245:
-# line 1973 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_ExceptQsSeen);
- /*
- * Done with this exception. Pop its scope from the scope stack
- */
- idl_global->scopes()->pop();
- } break;
-case 246:
-# line 1985 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_OpTypeSeen);
- } break;
-case 247:
-# line 1989 "idl.yy"
-{
- UTL_Scope *s = idl_global->scopes()->top_non_null();
- UTL_ScopedName *n =
- new UTL_ScopedName(new Identifier(yypvt[-0].strval, 1, 0, I_FALSE), NULL);
- AST_Operation *o = NULL;
- UTL_StrList *p = idl_global->pragmas();
-
- idl_global->set_parse_state(IDL_GlobalData::PS_OpIDSeen);
- /*
- * Create a node representing an operation on an interface
- * and add it to its enclosing scope
- */
- if (s != NULL && yypvt[-2].dcval != NULL) {
- AST_Type *tp = AST_Type::narrow_from_decl(yypvt[-2].dcval);
- if (tp == NULL) {
- idl_global->err()->not_a_type(yypvt[-2].dcval);
- } else if (tp->node_type() == AST_Decl::NT_except) {
- idl_global->err()->not_a_type(yypvt[-2].dcval);
- } else {
- o = idl_global->gen()->create_operation(tp, yypvt[-3].ofval, n, p);
- (void) s->fe_add_operation(o);
- }
- }
- /*
- * Push the operation scope onto the scopes stack
- */
- idl_global->scopes()->push(o);
- } break;
-case 248:
-# line 2018 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_OpParsCompleted);
- } break;
-case 249:
-# line 2022 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_OpRaiseCompleted);
- } break;
-case 250:
-# line 2026 "idl.yy"
-{
- UTL_Scope *s = idl_global->scopes()->top_non_null();
- AST_Operation *o = NULL;
-
- idl_global->set_parse_state(IDL_GlobalData::PS_OpCompleted);
- /*
- * Add exceptions and context to the operation
- */
- if (s != NULL && s->scope_node_type() == AST_Decl::NT_op) {
- o = AST_Operation::narrow_from_scope(s);
-
- if (yypvt[-2].nlval != NULL && o != NULL)
- (void) o->fe_add_exceptions(yypvt[-2].nlval);
- if (yypvt[-0].slval != NULL)
- (void) o->fe_add_context(yypvt[-0].slval);
- }
- /*
- * Done with this operation. Pop its scope from the scopes stack
- */
- idl_global->scopes()->pop();
- } break;
-case 251:
-# line 2051 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_OpAttrSeen);
- yyval.ofval = AST_Operation::OP_oneway;
- } break;
-case 252:
-# line 2056 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_OpAttrSeen);
- yyval.ofval = AST_Operation::OP_idempotent;
- } break;
-case 253:
-# line 2061 "idl.yy"
-{
- yyval.ofval = AST_Operation::OP_noflags;
- } break;
-case 255:
-# line 2069 "idl.yy"
-{
- yyval.dcval =
- idl_global->scopes()->bottom()
- ->lookup_primitive_type(AST_Expression::EV_void);
- } break;
-case 256:
-# line 2078 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_OpSqSeen);
- } break;
-case 257:
-# line 2082 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_OpQsSeen);
- } break;
-case 258:
-# line 2086 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_OpSqSeen);
- } break;
-case 259:
-# line 2091 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_OpQsSeen);
- } break;
-case 261:
-# line 2101 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_OpParCommaSeen);
- } break;
-case 264:
-# line 2110 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_OpParDirSeen);
- } break;
-case 265:
-# line 2114 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_OpParTypeSeen);
- } break;
-case 266:
-# line 2118 "idl.yy"
-{
- UTL_Scope *s = idl_global->scopes()->top_non_null();
- AST_Argument *a = NULL;
- UTL_StrList *p = idl_global->pragmas();
-
- idl_global->set_parse_state(IDL_GlobalData::PS_OpParDeclSeen);
- /*
- * Create a node representing an argument to an operation
- * Add it to the enclosing scope (the operation scope)
- */
- if (yypvt[-2].dcval != NULL && yypvt[-0].deval != NULL && s != NULL) {
- AST_Type *tp = yypvt[-0].deval->compose(yypvt[-2].dcval);
- if (tp != NULL) {
- a = idl_global->gen()->create_argument(yypvt[-4].dival, tp, yypvt[-0].deval->name(), p);
- (void) s->fe_add_argument(a);
- }
- }
- } break;
-case 267:
-# line 2140 "idl.yy"
-{
- yyval.dcval = idl_global->scopes()->bottom()->lookup_primitive_type(yypvt[-0].etval);
- } break;
-case 269:
-# line 2145 "idl.yy"
-{
- UTL_Scope *s = idl_global->scopes()->top_non_null();
- AST_Decl *d = NULL;
-
- if (s != NULL)
- d = s->lookup_by_name(yypvt[-0].idlist, I_TRUE);
- if (d == NULL)
- idl_global->err()->lookup_error(yypvt[-0].idlist);
- yyval.dcval = d;
- } break;
-case 270:
-# line 2159 "idl.yy"
-{
- yyval.dival = AST_Argument::dir_IN;
- } break;
-case 271:
-# line 2163 "idl.yy"
-{
- yyval.dival = AST_Argument::dir_OUT;
- } break;
-case 272:
-# line 2167 "idl.yy"
-{
- yyval.dival = AST_Argument::dir_INOUT;
- } break;
-case 273:
-# line 2174 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_OpRaiseSeen);
- } break;
-case 274:
-# line 2178 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_OpRaiseSqSeen);
- } break;
-case 275:
-# line 2183 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_OpRaiseQsSeen);
- yyval.nlval = yypvt[-1].nlval;
- } break;
-case 276:
-# line 2188 "idl.yy"
-{
- yyval.nlval = NULL;
- } break;
-case 277:
-# line 2195 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_OpContextSeen);
- } break;
-case 278:
-# line 2199 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_OpContextSqSeen);
- } break;
-case 279:
-# line 2204 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_OpContextQsSeen);
- yyval.slval = yypvt[-1].slval;
- } break;
-case 280:
-# line 2209 "idl.yy"
-{
- yyval.slval = NULL;
- } break;
-case 281:
-# line 2216 "idl.yy"
-{
- yyval.slval = new UTL_StrList(yypvt[-1].sval, yypvt[-0].slval);
- } break;
-case 282:
-# line 2224 "idl.yy"
-{
- idl_global->set_parse_state(IDL_GlobalData::PS_OpContextCommaSeen);
- } break;
-case 283:
-# line 2228 "idl.yy"
-{
- if (yypvt[-3].slval == NULL)
- yyval.slval = new UTL_StrList(yypvt[-0].sval, NULL);
- else {
- yypvt[-3].slval->nconc(new UTL_StrList(yypvt[-0].sval, NULL));
- yyval.slval = yypvt[-3].slval;
- }
- } break;
-case 284:
-# line 2237 "idl.yy"
-{
- yyval.slval = NULL;
- } break;
-# line 532 "/usr/ccs/bin/yaccpar"
- }
- goto yystack; /* reset registers in driver code */
-}
-
diff --git a/TAO/TAO_IDL/fe/y.tab.h b/TAO/TAO_IDL/fe/y.tab.h
deleted file mode 100644
index 7752d999a11..00000000000
--- a/TAO/TAO_IDL/fe/y.tab.h
+++ /dev/null
@@ -1,76 +0,0 @@
-
-typedef union
-#ifdef __cplusplus
- YYSTYPE
-#endif
- {
- AST_Decl *dcval; /* Decl value */
- UTL_StrList *slval; /* String list */
- UTL_NameList *nlval; /* Name list */
- UTL_ExprList *elval; /* Expression list */
- UTL_LabelList *llval; /* Label list */
- UTL_DeclList *dlval; /* Declaration list */
- FE_InterfaceHeader *ihval; /* Interface header */
- AST_Expression *exval; /* Expression value */
- AST_UnionLabel *ulval; /* Union label */
- AST_Field *ffval; /* Field value */
- AST_Expression::ExprType etval; /* Expression type */
- AST_Argument::Direction dival; /* Argument direction */
- AST_Operation::Flags ofval; /* Operation flags */
- FE_Declarator *deval; /* Declarator value */
- idl_bool bval; /* Boolean value */
- long ival; /* Long value */
- double dval; /* Double value */
- float fval; /* Float value */
- char cval; /* Char value */
-
- String *sval; /* String value */
- char *strval; /* char * value */
- Identifier *idval; /* Identifier */
- UTL_IdList *idlist; /* Identifier list */
-} YYSTYPE;
-extern YYSTYPE yylval;
-# define IDENTIFIER 257
-# define IDL_CONST 258
-# define IDL_MODULE 259
-# define IDL_INTERFACE 260
-# define IDL_TYPEDEF 261
-# define IDL_LONG 262
-# define IDL_SHORT 263
-# define IDL_UNSIGNED 264
-# define IDL_DOUBLE 265
-# define IDL_FLOAT 266
-# define IDL_CHAR 267
-# define IDL_WCHAR 268
-# define IDL_OCTET 269
-# define IDL_BOOLEAN 270
-# define IDL_ANY 271
-# define IDL_STRUCT 272
-# define IDL_UNION 273
-# define IDL_SWITCH 274
-# define IDL_ENUM 275
-# define IDL_SEQUENCE 276
-# define IDL_STRING 277
-# define IDL_WSTRING 278
-# define IDL_EXCEPTION 279
-# define IDL_CASE 280
-# define IDL_DEFAULT 281
-# define IDL_READONLY 282
-# define IDL_ATTRIBUTE 283
-# define IDL_ONEWAY 284
-# define IDL_IDEMPOTENT 285
-# define IDL_VOID 286
-# define IDL_IN 287
-# define IDL_OUT 288
-# define IDL_INOUT 289
-# define IDL_RAISES 290
-# define IDL_CONTEXT 291
-# define IDL_INTEGER_LITERAL 292
-# define IDL_STRING_LITERAL 293
-# define IDL_CHARACTER_LITERAL 294
-# define IDL_FLOATING_PT_LITERAL 295
-# define IDL_TRUETOK 296
-# define IDL_FALSETOK 297
-# define IDL_SCOPE_DELIMITOR 298
-# define IDL_LEFT_SHIFT 299
-# define IDL_RIGHT_SHIFT 300