diff options
Diffstat (limited to 'TAO/TAO_IDL/fe')
-rw-r--r-- | TAO/TAO_IDL/fe/Makefile | 397 | ||||
-rw-r--r-- | TAO/TAO_IDL/fe/fe_declarator.cpp | 157 | ||||
-rw-r--r-- | TAO/TAO_IDL/fe/fe_extern.cpp | 121 | ||||
-rw-r--r-- | TAO/TAO_IDL/fe/fe_init.cpp | 367 | ||||
-rw-r--r-- | TAO/TAO_IDL/fe/fe_interface_header.cpp | 282 | ||||
-rw-r--r-- | TAO/TAO_IDL/fe/fe_private.cpp | 78 | ||||
-rw-r--r-- | TAO/TAO_IDL/fe/idl.ll | 528 | ||||
-rw-r--r-- | TAO/TAO_IDL/fe/idl.yy | 2297 | ||||
-rw-r--r-- | TAO/TAO_IDL/fe/lex.yy.cpp | 2196 | ||||
-rw-r--r-- | TAO/TAO_IDL/fe/lex.yy.cpp.diff | 34 | ||||
-rw-r--r-- | TAO/TAO_IDL/fe/y.tab.cpp | 3345 | ||||
-rw-r--r-- | TAO/TAO_IDL/fe/y.tab.cpp.diff | 127 | ||||
-rw-r--r-- | TAO/TAO_IDL/fe/y.tab.h | 77 |
13 files changed, 0 insertions, 10006 deletions
diff --git a/TAO/TAO_IDL/fe/Makefile b/TAO/TAO_IDL/fe/Makefile deleted file mode 100644 index 31d8eb90e9e..00000000000 --- a/TAO/TAO_IDL/fe/Makefile +++ /dev/null @@ -1,397 +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) -f $@ - $(YACC) $(YFLAGS) idl.yy - @mv -f y.tab.c y.tab.cpp - @patch < y.tab.cpp.diff - @-$(RM) -f y.tab.cpp.orig - -lex.yy.cpp: idl.ll y.tab.h - $(LEX) $(LFLAGS) idl.ll > /tmp/$@ - @#### Replace #includes of standard headers with #include of ace/OS.h, - @#### so that ace/config.h is #included first. - @sed -e 's%#include.*<stdio.h>%#include "ace/OS.h"%g' \ - -e '/#include.*stdlib.h/D' \ - -e '/#include.*unistd.h/D' \ - -e 's/ECHO/TAO_ECHO/g' < /tmp/$@ > $@ - @patch < lex.yy.cpp.diff - @-$(RM) -f /tmp/$@ lex.yy.cpp.orig - -#---------------------------------------------------------------------------- -# 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 .obj/fe_declarator.so .shobj/fe_declarator.o .shobj/fe_declarator.so: fe_declarator.cpp ../include/idl.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/Log_Record.i \ - $(ACE_ROOT)/ace/Version.h \ - $(ACE_ROOT)/ace/ACE.i \ - ../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/ast_native.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 .obj/fe_private.so .shobj/fe_private.o .shobj/fe_private.so: fe_private.cpp ../include/idl.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/Log_Record.i \ - $(ACE_ROOT)/ace/Version.h \ - $(ACE_ROOT)/ace/ACE.i \ - ../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/ast_native.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 .obj/fe_init.so .shobj/fe_init.o .shobj/fe_init.so: fe_init.cpp ../include/idl.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/Log_Record.i \ - $(ACE_ROOT)/ace/Version.h \ - $(ACE_ROOT)/ace/ACE.i \ - ../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/ast_native.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 .obj/fe_extern.so .shobj/fe_extern.o .shobj/fe_extern.so: fe_extern.cpp ../include/idl.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/Log_Record.i \ - $(ACE_ROOT)/ace/Version.h \ - $(ACE_ROOT)/ace/ACE.i \ - ../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/ast_native.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 .obj/fe_interface_header.so .shobj/fe_interface_header.o .shobj/fe_interface_header.so: fe_interface_header.cpp ../include/idl.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/Log_Record.i \ - $(ACE_ROOT)/ace/Version.h \ - $(ACE_ROOT)/ace/ACE.i \ - ../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/ast_native.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 .obj/y.tab.so .shobj/y.tab.o .shobj/y.tab.so: y.tab.cpp ../include/idl.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/Log_Record.i \ - $(ACE_ROOT)/ace/Version.h \ - $(ACE_ROOT)/ace/ACE.i \ - ../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/ast_native.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 .obj/lex.yy.so .shobj/lex.yy.o .shobj/lex.yy.so: lex.yy.cpp ../include/idl.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/Log_Record.i \ - $(ACE_ROOT)/ace/Version.h \ - $(ACE_ROOT)/ace/ACE.i \ - ../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/ast_native.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 17f11b8fb21..00000000000 --- a/TAO/TAO_IDL/fe/idl.ll +++ /dev/null @@ -1,528 +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; -native return IDL_NATIVE; - -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 ba695d1b8d8..00000000000 --- a/TAO/TAO_IDL/fe/idl.yy +++ /dev/null @@ -1,2297 +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 IDL_NATIVE - -%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;} - | IDL_NATIVE simple_declarator - { - UTL_Scope *s = idl_global->scopes()->top_non_null(); - AST_Native *node = NULL; - AST_Decl *v = NULL; - UTL_StrList *p = idl_global->pragmas(); - - ACE_UNUSED_ARG (v); - - idl_global->set_parse_state(IDL_GlobalData::PS_NativeSeen); - /* - * Create a node representing a Native and add it to its - * enclosing scope - */ - if (s != NULL) { - node = idl_global->gen()->create_native ($2->name (), p); - /* - * Add it to its defining scope - */ - (void) s->fe_add_native (node); - } - } - ; - -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); - // if this is a sequence, it is a named one and hence we - // set its name to the same as the declarator. However - // @@ (ASG) note that if we had a scenario of the kind - // typedef sequence<...> X, Y, Z; then we must make a - // new sequence node for each name. Not handled currently. - if (tp->node_type () == AST_Decl::NT_sequence) - { - tp->set_name (d->name ()); - } - (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 39fc0908496..00000000000 --- a/TAO/TAO_IDL/fe/lex.yy.cpp +++ /dev/null @@ -1,2196 +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 "ace/OS.h" - - -/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */ -#ifdef c_plusplus -#ifndef __cplusplus -#define __cplusplus -#endif -#endif - - -#ifdef __cplusplus - - -/* 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 )); - -#if 0 -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 )); -#endif /* 0 */ - -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 62 -static const short int yy_accept[284] = - { 0, - 58, 58, 62, 60, 58, 59, 60, 60, 60, 60, - 45, 43, 60, 60, 60, 40, 40, 40, 40, 40, - 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, - 40, 40, 40, 40, 40, 60, 58, 0, 46, 0, - 0, 45, 43, 57, 0, 41, 45, 0, 0, 0, - 43, 39, 37, 38, 40, 40, 40, 40, 40, 40, - 40, 40, 40, 40, 40, 40, 40, 40, 34, 40, - 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, - 40, 40, 40, 40, 40, 40, 0, 54, 0, 0, - 0, 0, 0, 47, 0, 47, 0, 0, 56, 41, - - 0, 41, 0, 42, 44, 40, 40, 1, 40, 40, - 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, - 40, 40, 40, 40, 40, 35, 40, 40, 40, 40, - 40, 40, 40, 40, 40, 40, 40, 40, 0, 0, - 0, 0, 0, 49, 48, 0, 0, 41, 42, 40, - 31, 40, 40, 18, 25, 40, 40, 40, 40, 12, - 40, 40, 40, 40, 22, 40, 40, 40, 40, 40, - 40, 40, 40, 40, 40, 40, 40, 40, 40, 29, - 40, 40, 0, 0, 0, 0, 0, 48, 0, 32, - 40, 40, 9, 40, 40, 40, 40, 20, 33, 40, - - 40, 40, 28, 40, 40, 40, 40, 23, 40, 40, - 40, 40, 16, 40, 40, 40, 52, 0, 0, 0, - 0, 40, 40, 40, 40, 21, 40, 40, 2, 30, - 36, 3, 40, 40, 13, 11, 17, 40, 40, 40, - 40, 51, 0, 0, 0, 0, 0, 0, 40, 27, - 7, 19, 40, 40, 40, 40, 10, 40, 26, 40, - 0, 55, 0, 0, 0, 40, 40, 40, 4, 15, - 24, 40, 0, 0, 0, 5, 6, 8, 14, 53, - 0, 50, 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[294] = - { 0, - 0, 444, 449, 451, 53, 451, 443, 417, 45, 53, - 53, 58, 430, 428, 426, 0, 424, 417, 13, 397, - 31, 40, 34, 399, 396, 394, 393, 404, 47, 56, - 44, 381, 391, 389, 51, 105, 96, 427, 451, 424, - 88, 100, 111, 451, 427, 141, 128, 155, 170, 0, - 160, 451, 451, 451, 0, 405, 400, 373, 377, 381, - 376, 391, 379, 384, 370, 369, 384, 373, 42, 373, - 380, 365, 364, 376, 362, 370, 377, 362, 363, 359, - 365, 359, 64, 363, 363, 352, 184, 451, 111, 189, - 365, 359, 351, 451, 390, 389, 120, 392, 451, 0, - - 196, 451, 144, 199, 0, 368, 372, 0, 345, 350, - 354, 342, 82, 356, 354, 344, 349, 352, 333, 346, - 343, 330, 339, 342, 325, 0, 328, 340, 324, 326, - 88, 323, 335, 326, 329, 333, 335, 319, 360, 359, - 327, 319, 329, 451, 451, 187, 202, 213, 451, 339, - 0, 319, 322, 0, 0, 308, 320, 305, 313, 0, - 308, 303, 302, 303, 0, 308, 297, 298, 314, 309, - 300, 307, 293, 298, 306, 305, 303, 294, 298, 0, - 288, 294, 328, 157, 289, 295, 292, 451, 322, 0, - 295, 295, 0, 273, 284, 288, 274, 0, 0, 285, - - 285, 284, 0, 265, 270, 274, 273, 0, 277, 265, - 274, 276, 0, 268, 279, 266, 451, 205, 259, 228, - 265, 256, 262, 255, 254, 0, 262, 269, 0, 0, - 0, 0, 237, 238, 0, 0, 0, 220, 215, 199, - 201, 451, 231, 235, 245, 251, 248, 201, 182, 0, - 0, 0, 181, 188, 153, 159, 0, 155, 0, 158, - 169, 451, 162, 146, 101, 112, 101, 104, 0, 0, - 0, 88, 130, 120, 114, 0, 0, 0, 0, 451, - 107, 451, 451, 266, 270, 272, 276, 280, 75, 284, - 288, 292, 296 - - } ; - -static const short int yy_def[294] = - { 0, - 283, 1, 283, 283, 283, 283, 284, 285, 283, 283, - 283, 283, 283, 283, 283, 286, 286, 286, 286, 286, - 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, - 286, 286, 286, 286, 286, 283, 283, 284, 283, 283, - 287, 283, 283, 283, 288, 283, 283, 283, 283, 289, - 283, 283, 283, 283, 286, 286, 286, 286, 286, 286, - 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, - 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, - 286, 286, 286, 286, 286, 286, 283, 283, 36, 283, - 283, 283, 283, 283, 283, 283, 283, 288, 283, 46, - - 283, 283, 283, 283, 289, 286, 286, 286, 286, 286, - 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, - 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, - 286, 286, 286, 286, 286, 286, 286, 286, 290, 283, - 283, 283, 283, 283, 283, 283, 283, 283, 283, 286, - 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, - 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, - 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, - 286, 286, 290, 283, 283, 283, 283, 283, 283, 286, - 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, - - 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, - 286, 286, 286, 286, 286, 286, 283, 283, 283, 283, - 283, 286, 286, 286, 286, 286, 286, 286, 286, 286, - 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, - 286, 283, 283, 291, 283, 283, 283, 283, 286, 286, - 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, - 291, 283, 292, 283, 283, 286, 286, 286, 286, 286, - 286, 286, 292, 283, 293, 286, 286, 286, 286, 283, - 293, 283, 0, 283, 283, 283, 283, 283, 283, 283, - 283, 283, 283 - - } ; - -static const short int yy_nxt[506] = - { 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, 28, 29, 16, 16, 30, 31, 32, 33, - 34, 35, 16, 16, 37, 58, 37, 42, 43, 43, - 44, 59, 61, 46, 45, 47, 47, 48, 46, 62, - 51, 51, 51, 49, 63, 64, 66, 105, 49, 78, - 73, 50, 79, 65, 85, 119, 67, 76, 49, 74, - 120, 77, 80, 49, 96, 81, 75, 37, 86, 37, - - 97, 97, 275, 134, 275, 50, 87, 88, 89, 282, - 46, 135, 47, 47, 48, 139, 282, 90, 90, 90, - 49, 46, 280, 51, 51, 51, 145, 174, 50, 156, - 157, 49, 146, 146, 274, 49, 279, 175, 46, 278, - 47, 47, 48, 277, 91, 92, 49, 276, 49, 93, - 263, 283, 50, 100, 100, 100, 104, 104, 104, 217, - 218, 101, 102, 49, 102, 46, 274, 48, 48, 48, - 46, 262, 51, 51, 51, 49, 101, 102, 103, 103, - 49, 102, 104, 104, 104, 87, 88, 89, 272, 271, - 49, 88, 140, 188, 270, 49, 90, 90, 90, 189, - - 189, 90, 90, 90, 147, 147, 269, 242, 148, 148, - 148, 104, 104, 104, 148, 148, 148, 243, 243, 243, - 149, 268, 149, 91, 267, 148, 148, 148, 93, 245, - 266, 246, 265, 242, 102, 149, 102, 262, 260, 149, - 247, 247, 247, 243, 243, 243, 245, 259, 246, 102, - 258, 264, 245, 102, 246, 263, 257, 247, 247, 247, - 247, 247, 247, 247, 247, 247, 38, 38, 38, 38, - 40, 256, 40, 40, 55, 55, 95, 255, 95, 95, - 98, 98, 98, 98, 183, 183, 183, 183, 261, 261, - 261, 261, 273, 273, 273, 273, 281, 281, 281, 281, - - 254, 253, 252, 251, 250, 249, 248, 244, 241, 240, - 239, 238, 237, 236, 235, 234, 233, 232, 231, 230, - 229, 228, 227, 226, 225, 224, 223, 222, 188, 221, - 220, 219, 184, 216, 215, 214, 213, 212, 211, 210, - 209, 208, 207, 206, 205, 204, 203, 202, 201, 200, - 199, 198, 197, 196, 195, 194, 193, 192, 191, 190, - 187, 186, 185, 139, 184, 182, 181, 180, 179, 178, - 177, 176, 173, 172, 171, 170, 169, 168, 167, 166, - 165, 164, 163, 162, 161, 160, 159, 158, 155, 154, - 153, 152, 151, 150, 99, 144, 144, 143, 142, 141, - - 138, 137, 136, 133, 132, 131, 130, 129, 128, 127, - 126, 125, 124, 123, 122, 121, 118, 117, 116, 115, - 114, 113, 112, 111, 110, 109, 108, 107, 106, 99, - 94, 39, 84, 83, 82, 72, 71, 70, 69, 68, - 60, 57, 56, 54, 53, 52, 41, 39, 283, 36, - 3, 283, 283, 283, 283, 283, 283, 283, 283, 283, - 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, - 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, - 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, - 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, - - 283, 283, 283, 283, 283 - } ; - -static const short int yy_chk[506] = - { 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, 289, 12, 31, - 29, 11, 31, 22, 35, 69, 23, 30, 11, 29, - 69, 30, 31, 12, 41, 31, 29, 37, 35, 37, - - 41, 41, 265, 83, 265, 11, 36, 36, 36, 281, - 42, 83, 42, 42, 42, 89, 275, 36, 36, 36, - 42, 43, 274, 43, 43, 43, 97, 131, 42, 113, - 113, 43, 97, 97, 273, 42, 272, 131, 47, 268, - 47, 47, 47, 267, 36, 36, 43, 266, 47, 36, - 264, 89, 42, 46, 46, 46, 103, 103, 103, 184, - 184, 46, 46, 47, 46, 48, 263, 48, 48, 48, - 51, 261, 51, 51, 51, 48, 46, 46, 49, 49, - 51, 46, 49, 49, 49, 87, 87, 87, 260, 258, - 48, 90, 90, 146, 256, 51, 87, 87, 87, 146, - - 146, 90, 90, 90, 101, 101, 255, 218, 101, 101, - 101, 104, 104, 104, 147, 147, 147, 218, 218, 218, - 104, 254, 104, 87, 253, 148, 148, 148, 87, 220, - 249, 220, 248, 243, 148, 104, 148, 244, 241, 104, - 220, 220, 220, 243, 243, 243, 245, 240, 245, 148, - 239, 247, 246, 148, 246, 246, 238, 245, 245, 245, - 247, 247, 247, 246, 246, 246, 284, 284, 284, 284, - 285, 234, 285, 285, 286, 286, 287, 233, 287, 287, - 288, 288, 288, 288, 290, 290, 290, 290, 291, 291, - 291, 291, 292, 292, 292, 292, 293, 293, 293, 293, - - 228, 227, 225, 224, 223, 222, 221, 219, 216, 215, - 214, 212, 211, 210, 209, 207, 206, 205, 204, 202, - 201, 200, 197, 196, 195, 194, 192, 191, 189, 187, - 186, 185, 183, 182, 181, 179, 178, 177, 176, 175, - 174, 173, 172, 171, 170, 169, 168, 167, 166, 164, - 163, 162, 161, 159, 158, 157, 156, 153, 152, 150, - 143, 142, 141, 140, 139, 138, 137, 136, 135, 134, - 133, 132, 130, 129, 128, 127, 125, 124, 123, 122, - 121, 120, 119, 118, 117, 116, 115, 114, 112, 111, - 110, 109, 107, 106, 98, 96, 95, 93, 92, 91, - - 86, 85, 84, 82, 81, 80, 79, 78, 77, 76, - 75, 74, 73, 72, 71, 70, 68, 67, 66, 65, - 64, 63, 62, 61, 60, 59, 58, 57, 56, 45, - 40, 38, 34, 33, 32, 28, 27, 26, 25, 24, - 20, 18, 17, 15, 14, 13, 8, 7, 3, 2, - 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, - 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, - 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, - 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, - 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, - - 283, 283, 283, 283, 283 - } ; - -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 -#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 >= 284 ) - 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] != 451 ); - -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 131 "idl.ll" -return IDL_NATIVE; - YY_BREAK -case 31: -YY_USER_ACTION -# line 133 "idl.ll" -return IDL_TRUETOK; - YY_BREAK -case 32: -YY_USER_ACTION -# line 134 "idl.ll" -return IDL_FALSETOK; - YY_BREAK -case 33: -YY_USER_ACTION -# line 136 "idl.ll" -return IDL_INOUT; - YY_BREAK -case 34: -YY_USER_ACTION -# line 137 "idl.ll" -return IDL_IN; - YY_BREAK -case 35: -YY_USER_ACTION -# line 138 "idl.ll" -return IDL_OUT; - YY_BREAK -case 36: -YY_USER_ACTION -# line 139 "idl.ll" -return IDL_ONEWAY; - YY_BREAK -case 37: -YY_USER_ACTION -# line 141 "idl.ll" -return IDL_LEFT_SHIFT; - YY_BREAK -case 38: -YY_USER_ACTION -# line 142 "idl.ll" -return IDL_RIGHT_SHIFT; - YY_BREAK -case 39: -YY_USER_ACTION -# line 143 "idl.ll" -{ - yylval.strval = "::"; - return IDL_SCOPE_DELIMITOR; - } - YY_BREAK -case 40: -YY_USER_ACTION -# line 148 "idl.ll" -{ - char *z = (char *) malloc(strlen(ace_yytext) + 1); - strcpy(z, ace_yytext); - yylval.strval = z; - return IDENTIFIER; -} - YY_BREAK -case 41: -YY_USER_ACTION -# line 155 "idl.ll" -{ - yylval.dval = idl_atof(ace_yytext); - return IDL_FLOATING_PT_LITERAL; - } - YY_BREAK -case 42: -YY_USER_ACTION -# line 159 "idl.ll" -{ - yylval.dval = idl_atof(ace_yytext); - return IDL_FLOATING_PT_LITERAL; - } - YY_BREAK -case 43: -YY_USER_ACTION -# line 164 "idl.ll" -{ - yylval.ival = idl_atoi(ace_yytext, 10); - return IDL_INTEGER_LITERAL; - } - YY_BREAK -case 44: -YY_USER_ACTION -# line 168 "idl.ll" -{ - yylval.ival = idl_atoi(ace_yytext, 16); - return IDL_INTEGER_LITERAL; - } - YY_BREAK -case 45: -YY_USER_ACTION -# line 172 "idl.ll" -{ - yylval.ival = idl_atoi(ace_yytext, 8); - return IDL_INTEGER_LITERAL; - } - YY_BREAK -case 46: -YY_USER_ACTION -# line 177 "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 47: -YY_USER_ACTION -# line 184 "idl.ll" -{ - yylval.cval = ace_yytext [1]; - return IDL_CHARACTER_LITERAL; - } - YY_BREAK -case 48: -YY_USER_ACTION -# line 188 "idl.ll" -{ - // octal character constant - yylval.cval = idl_escape_reader(ace_yytext + 1); - return IDL_CHARACTER_LITERAL; - } - YY_BREAK -case 49: -YY_USER_ACTION -# line 193 "idl.ll" -{ - yylval.cval = idl_escape_reader(ace_yytext + 1); - return IDL_CHARACTER_LITERAL; - } - YY_BREAK -case 50: -YY_USER_ACTION -# line 197 "idl.ll" -{/* remember pragma */ - idl_global->set_lineno(idl_global->lineno() + 1); - idl_store_pragma(ace_yytext); - } - YY_BREAK -case 51: -YY_USER_ACTION -# line 201 "idl.ll" -{ - idl_parse_line_and_file(ace_yytext); - } - YY_BREAK -case 52: -YY_USER_ACTION -# line 204 "idl.ll" -{ - idl_parse_line_and_file(ace_yytext); - } - YY_BREAK -case 53: -YY_USER_ACTION -# line 207 "idl.ll" -{ - idl_parse_line_and_file(ace_yytext); - } - YY_BREAK -case 54: -YY_USER_ACTION -# line 210 "idl.ll" -{ - idl_parse_line_and_file(ace_yytext); - } - YY_BREAK -case 55: -YY_USER_ACTION -# line 213 "idl.ll" -{ - /* ignore cpp ident */ - idl_global->set_lineno(idl_global->lineno() + 1); - } - YY_BREAK -case 56: -YY_USER_ACTION -# line 217 "idl.ll" -{ - /* ignore comments */ - idl_global->set_lineno(idl_global->lineno() + 1); - } - YY_BREAK -case 57: -YY_USER_ACTION -# line 221 "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 58: -YY_USER_ACTION -# line 235 "idl.ll" -; - YY_BREAK -case 59: -YY_USER_ACTION -# line 236 "idl.ll" -{ - idl_global->set_lineno(idl_global->lineno() + 1); - } - YY_BREAK -case 60: -YY_USER_ACTION -# line 239 "idl.ll" -return ace_yytext [0]; - YY_BREAK -case 61: -YY_USER_ACTION -# line 241 "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 >= 284 ) - 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 >= 284 ) - 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 == 283); - - 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; - } - - -#if 0 -#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]; - } -#endif /* 0 */ - -#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 241 "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/lex.yy.cpp.diff b/TAO/TAO_IDL/fe/lex.yy.cpp.diff deleted file mode 100644 index bd03e464bb7..00000000000 --- a/TAO/TAO_IDL/fe/lex.yy.cpp.diff +++ /dev/null @@ -1,34 +0,0 @@ ---- lex.yy.cpp.orig Mon Mar 23 15:30:42 1998 -+++ lex.yy.cpp Mon Mar 23 15:30:42 1998 -@@ -215,12 +215,14 @@ - void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b )); - void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file )); - -+#if 0 - 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 )); -+#endif /* 0 */ - - static void *yy_flex_alloc YY_PROTO(( unsigned int )); - static void *yy_flex_realloc YY_PROTO(( void *, unsigned int )); -@@ -1777,6 +1779,7 @@ - } - - -+#if 0 - #ifdef YY_USE_PROTOS - static void yy_push_state( int new_state ) - #else -@@ -1822,7 +1825,7 @@ - { - return yy_start_stack[yy_start_stack_ptr - 1]; - } -- -+#endif /* 0 */ - - #ifdef YY_USE_PROTOS - static void yy_fatal_error( const char msg[] ) diff --git a/TAO/TAO_IDL/fe/y.tab.cpp b/TAO/TAO_IDL/fe/y.tab.cpp deleted file mode 100644 index f9e59cce461..00000000000 --- a/TAO/TAO_IDL/fe/y.tab.cpp +++ /dev/null @@ -1,3345 +0,0 @@ -#ifndef lint -char yysccsid[] = "@(#)yaccpar 1.4 (Berkeley) 02/25/90 \n\ - Modified 5/2/90 by J. Roskind to support graphic debugging modes"; -#endif -#line 74 "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 97 "idl.yy" -typedef 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 */ -} YYSTYPE; -#line 51 "y.tab.c" -#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_NATIVE 292 -#define IDL_INTEGER_LITERAL 293 -#define IDL_STRING_LITERAL 294 -#define IDL_CHARACTER_LITERAL 295 -#define IDL_FLOATING_PT_LITERAL 296 -#define IDL_TRUETOK 297 -#define IDL_FALSETOK 298 -#define IDL_SCOPE_DELIMITOR 299 -#define IDL_LEFT_SHIFT 300 -#define IDL_RIGHT_SHIFT 301 -#define YYERRCODE 256 -short yylhs[] = { -1, - 0, 67, 67, 69, 68, 71, 68, 73, 68, 75, - 68, 77, 68, 78, 68, 79, 80, 81, 82, 76, - 74, 74, 85, 87, 88, 83, 89, 64, 32, 90, - 22, 22, 86, 86, 92, 91, 93, 91, 94, 91, - 96, 91, 98, 91, 99, 91, 20, 100, 21, 21, - 16, 101, 16, 102, 16, 65, 84, 103, 104, 105, - 106, 70, 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, 66, 109, 107, - 1, 1, 2, 2, 2, 56, 56, 56, 56, 56, - 56, 4, 4, 4, 3, 3, 3, 28, 110, 29, - 29, 60, 60, 30, 111, 31, 31, 61, 62, 49, - 49, 54, 54, 54, 55, 55, 55, 52, 52, 52, - 50, 50, 57, 51, 53, 112, 113, 115, 116, 7, - 114, 118, 118, 119, 120, 117, 121, 117, 122, 123, - 124, 125, 126, 127, 129, 130, 10, 9, 9, 9, - 9, 9, 9, 128, 132, 132, 133, 134, 131, 135, - 131, 26, 27, 27, 136, 46, 137, 138, 46, 139, - 47, 140, 141, 143, 144, 8, 142, 147, 146, 146, - 145, 148, 149, 5, 5, 150, 151, 13, 153, 154, - 6, 6, 152, 156, 157, 14, 14, 155, 158, 11, - 24, 25, 25, 159, 160, 45, 161, 162, 95, 63, - 63, 163, 164, 165, 166, 72, 167, 169, 170, 171, - 97, 59, 59, 59, 12, 12, 172, 168, 174, 168, - 173, 177, 176, 176, 178, 179, 175, 15, 15, 15, - 58, 58, 58, 180, 181, 23, 23, 182, 183, 17, - 17, 18, 184, 19, 19, -}; -short yylen[] = { 2, - 1, 2, 0, 0, 3, 0, 3, 0, 3, 0, - 3, 0, 3, 0, 3, 0, 0, 0, 0, 9, - 1, 1, 0, 0, 0, 7, 0, 3, 2, 0, - 3, 0, 2, 0, 0, 3, 0, 3, 0, 3, - 0, 3, 0, 3, 0, 3, 2, 0, 4, 0, - 1, 0, 3, 0, 4, 1, 1, 0, 0, 0, - 0, 9, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 3, 1, 3, 1, 3, 1, 3, - 3, 1, 3, 3, 1, 3, 3, 3, 1, 2, - 2, 2, 1, 1, 3, 1, 1, 1, 1, 1, - 1, 1, 0, 3, 1, 1, 1, 2, 0, 3, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 2, 0, 4, - 0, 1, 1, 2, 0, 4, 0, 1, 1, 1, - 1, 1, 2, 1, 2, 3, 2, 1, 1, 2, - 1, 1, 1, 1, 1, 0, 0, 0, 0, 9, - 2, 2, 0, 0, 0, 5, 0, 3, 0, 0, - 0, 0, 0, 0, 0, 0, 17, 1, 1, 1, - 1, 1, 1, 2, 2, 0, 0, 0, 5, 0, - 3, 2, 2, 0, 0, 3, 0, 0, 5, 0, - 3, 0, 0, 0, 0, 9, 2, 0, 4, 0, - 1, 0, 0, 6, 2, 0, 0, 5, 0, 0, - 6, 1, 1, 0, 0, 6, 1, 1, 0, 3, - 2, 2, 0, 0, 0, 5, 0, 0, 6, 1, - 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, - 10, 1, 1, 0, 1, 1, 0, 3, 0, 4, - 2, 0, 4, 0, 0, 0, 5, 1, 1, 1, - 1, 1, 1, 0, 0, 6, 0, 0, 0, 6, - 0, 2, 0, 4, 0, -}; -short yydefred[] = { 0, - 14, 58, 16, 27, 103, 156, 169, 202, 242, 0, - 0, 105, 107, 106, 23, 0, 4, 1, 0, 6, - 8, 10, 12, 21, 22, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 56, 108, 138, 0, 30, 29, - 0, 2, 0, 0, 0, 0, 15, 0, 144, 0, - 148, 149, 151, 152, 153, 154, 223, 228, 52, 68, - 69, 0, 59, 63, 64, 66, 67, 140, 141, 65, - 51, 0, 0, 17, 28, 155, 216, 109, 111, 112, - 114, 122, 123, 125, 127, 126, 0, 124, 0, 116, - 118, 119, 117, 121, 113, 120, 104, 157, 170, 203, - 243, 24, 0, 5, 7, 9, 11, 13, 143, 150, - 0, 147, 0, 54, 0, 219, 224, 0, 0, 0, - 212, 215, 0, 0, 0, 0, 34, 0, 31, 146, - 53, 0, 60, 0, 0, 18, 217, 139, 110, 131, - 132, 133, 0, 0, 158, 171, 204, 244, 0, 0, - 55, 0, 96, 97, 98, 99, 100, 101, 0, 0, - 0, 0, 0, 102, 0, 0, 0, 0, 0, 0, - 85, 89, 94, 220, 225, 0, 0, 0, 0, 213, - 0, 0, 0, 163, 45, 240, 252, 253, 0, 0, - 35, 37, 39, 0, 33, 41, 43, 48, 61, 90, - 91, 92, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 19, 218, 129, 234, 230, - 233, 0, 167, 164, 159, 163, 172, 211, 205, 210, - 0, 0, 256, 269, 247, 255, 0, 268, 237, 0, - 0, 0, 26, 0, 0, 0, 0, 95, 0, 0, - 0, 0, 0, 0, 0, 86, 87, 88, 221, 226, - 0, 0, 0, 0, 214, 0, 0, 0, 0, 0, - 0, 0, 162, 0, 46, 0, 0, 36, 38, 40, - 42, 44, 0, 62, 71, 20, 130, 235, 232, 168, - 165, 160, 0, 182, 173, 0, 178, 179, 181, 180, - 206, 208, 246, 248, 238, 0, 0, 0, 0, 0, - 0, 236, 166, 174, 209, 0, 249, 239, 137, 0, - 0, 0, 0, 0, 175, 258, 271, 272, 273, 265, - 0, 264, 274, 250, 135, 0, 0, 260, 0, 0, - 0, 0, 190, 197, 195, 187, 194, 176, 186, 266, - 262, 275, 278, 251, 136, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 191, 198, 196, 200, - 188, 193, 177, 185, 267, 263, 0, 279, 0, 0, - 0, 276, 0, 199, 201, 189, 285, 0, 0, 280, - 283, 0, 284, -}; -short yydgoto[] = { 11, - 224, 79, 80, 81, 82, 83, 84, 85, 295, 86, - 138, 235, 87, 88, 236, 163, 354, 388, 389, 129, - 150, 40, 334, 220, 264, 346, 360, 139, 178, 318, - 324, 15, 284, 164, 165, 166, 167, 168, 169, 170, - 171, 172, 173, 174, 221, 347, 371, 63, 90, 91, - 92, 93, 94, 68, 69, 95, 96, 330, 189, 140, - 141, 142, 190, 16, 71, 17, 18, 19, 41, 20, - 43, 21, 44, 22, 45, 23, 46, 26, 28, 118, - 176, 261, 24, 25, 38, 149, 127, 194, 29, 103, - 195, 240, 241, 242, 196, 244, 197, 245, 232, 246, - 113, 132, 27, 115, 152, 247, 97, 30, 120, 262, - 342, 31, 123, 225, 181, 268, 273, 231, 267, 307, - 266, 32, 124, 182, 270, 308, 320, 348, 336, 361, - 349, 362, 359, 381, 356, 358, 357, 379, 380, 33, - 125, 229, 183, 271, 230, 272, 309, 144, 222, 119, - 177, 72, 134, 214, 73, 135, 215, 179, 263, 306, - 277, 311, 34, 126, 184, 274, 276, 317, 310, 323, - 341, 321, 331, 322, 332, 339, 364, 337, 363, 340, - 365, 366, 383, 392, -}; -short yysindex[] = { 333, - 0, 0, 0, 0, 0, 0, 0, 0, 0, -194, - 0, 0, 0, 0, 0, 10, 0, 0, 333, 0, - 0, 0, 0, 0, 0, 25, 254, -177, -194, 162, - -194, -194, -194, -194, 0, 0, 0, -34, 0, 0, - 47, 0, 52, 61, 78, 103, 0, -54, 0, -187, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, -131, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 126, 150, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 77, 0, -131, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, -183, 0, 0, 0, 0, 0, 0, 0, - -90, 0, -194, 0, -194, 0, 0, 72, 152, -194, - 0, 0, 95, -53, 119, 122, 0, -131, 0, 0, - 0, -194, 0, 26, 26, 0, 0, 0, 0, 0, - 0, 0, 0, 26, 0, 0, 0, 0, 303, 212, - 0, 209, 0, 0, 0, 0, 0, 0, -30, -30, - -30, 26, -131, 0, 156, 182, 246, -154, 159, 89, - 0, 0, 0, 0, 0, 333, 211, 242, 196, 0, - 137, 248, 32, 0, 0, 0, 0, 0, 228, 13, - 0, 0, 0, 165, 0, 0, 0, 0, 0, 0, - 0, 0, 250, 26, 26, 26, 26, 26, 26, 26, - 26, 26, 26, 230, 235, 0, 0, 0, 0, 0, - 0, 236, 0, 0, 0, 0, 0, 0, 0, 0, - 137, 243, 0, 0, 0, 0, -131, 0, 0, 245, - 247, 249, 0, 251, 253, -183, 26, 0, 182, 246, - -154, 159, 159, 89, 89, 0, 0, 0, 0, 0, - 180, -194, 26, 196, 0, 257, -194, 188, 137, 287, - 192, 263, 0, 193, 0, 71, 271, 0, 0, 0, - 0, 0, -131, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 67, 0, 0, -131, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 238, 277, 296, 32, 298, - -194, 0, 0, 0, 0, 0, 0, 0, 0, 219, - 302, -63, 55, 300, 0, 0, 0, 0, 0, 0, - 305, 0, 0, 0, 0, -74, 271, 0, 304, 307, - 58, -194, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 293, 26, 297, 162, -102, - 229, -74, -194, -63, -183, 318, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 319, 0, 301, -194, - 306, 0, 69, 0, 0, 0, 0, 323, 324, 0, - 0, 79, 0, -}; -short yyrindex[] = { 371, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, -27, 0, 0, 17, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, -19, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 115, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 28, 38, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 57, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 94, 0, 0, 0, 0, 0, 112, 9, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, -29, 0, 99, 129, 155, 107, 50, -7, - 0, 0, 0, 0, 0, 259, 0, 326, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 261, 0, 0, 0, 0, 0, 130, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 157, 268, - 135, 56, 66, -1, 40, 0, 0, 0, 0, 0, - 0, 0, 0, 140, 0, 0, 0, 0, 265, 0, - 0, 266, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 18, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 347, 0, 0, 355, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, -14, 0, 0, 0, 0, - 0, 0, -56, 338, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 375, 0, - 251, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 187, - 0, 292, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 377, 0, - 0, 0, 0, -}; -short yygindex[] = { 0, - -24, 244, 0, 0, 0, -22, 54, 7, 0, 60, - 0, 0, 0, 393, -207, -26, 0, 0, 0, 76, - 0, 0, 0, 0, 0, 0, 0, 175, 0, 0, - 0, 0, 0, -134, 0, 218, 240, 217, 39, 51, - 21, 80, 0, -88, 179, 86, 0, 0, -16, -12, - 8, 420, 0, 0, 0, -148, 12, 0, 0, -209, - -8, 0, 0, 0, -10, 299, 1, 0, 0, 317, - 0, 320, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 286, 258, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 108, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 163, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 136, 0, 0, 0, 0, 0, - 0, 0, 0, 0, -}; -#define YYTABLESIZE 625 -short yytable[] = { 37, - 62, 36, 277, 89, 60, 78, 13, 93, 93, 162, - 64, 93, 93, 93, 65, 93, 3, 93, 75, 42, - 98, 99, 100, 101, 142, 13, 257, 203, 93, 93, - 82, 57, 93, 82, 66, 82, 83, 82, 70, 83, - 238, 83, 142, 83, 50, 145, 175, 50, 145, 47, - 82, 82, 287, 12, 82, 180, 83, 83, 49, 14, - 83, 49, 35, 93, 93, 162, 145, 39, 159, 305, - 160, 222, 12, 35, 111, 112, 128, 84, 14, 74, - 84, 227, 84, 47, 84, 82, 82, 79, 102, 222, - 79, 83, 83, 80, 93, 32, 80, 84, 84, 227, - 115, 84, 131, 81, 133, 104, 81, 79, 79, 143, - 105, 79, 285, 80, 80, 59, 82, 80, 115, 106, - 121, 151, 83, 81, 81, 213, 50, 81, 238, 350, - 211, 47, 84, 84, 138, 212, 107, 138, 122, 72, - 49, 3, 79, 79, 77, 207, 208, 77, 80, 80, - 89, 161, 138, 375, 89, 13, 72, 72, 81, 81, - 72, 108, 237, 84, 77, 77, 234, 114, 77, 73, - 385, 130, 78, 79, 288, 78, 216, 344, 345, 80, - 231, 343, 13, 231, 229, 116, 73, 73, 238, 81, - 73, 72, 78, 78, 136, 75, 78, 74, 231, 77, - 77, 209, 12, 210, 89, 344, 345, 109, 14, 117, - 110, 137, 75, 75, 74, 74, 75, 145, 74, 283, - 146, 73, 368, 327, 328, 329, 35, 78, 78, 12, - 77, 256, 257, 258, 277, 14, 25, 142, 200, 201, - 202, 147, 89, 296, 148, 252, 253, 75, 75, 74, - 237, 143, 73, 297, 234, 198, 143, 298, 78, 254, - 255, 145, 153, 154, 155, 156, 157, 158, 59, 199, - 93, 93, 259, 259, 259, 205, 294, 299, 75, 204, - 74, 300, 35, 206, 222, 218, 219, 227, 228, 243, - 248, 259, 82, 82, 227, 239, 260, 265, 83, 83, - 37, 275, 319, 278, 286, 279, 302, 280, 76, 281, - 237, 282, 292, 115, 234, 290, 301, 303, 153, 154, - 155, 156, 157, 158, 59, 76, 76, 304, 109, 76, - 312, 37, 89, 355, 370, 313, 314, 316, 128, 84, - 84, 325, 326, 335, 333, 338, 352, 351, 353, 79, - 79, 367, 143, 373, 369, 80, 80, 378, 384, 382, - 76, 76, 387, 390, 386, 81, 81, 391, 254, 143, - 3, 70, 393, 254, 254, 254, 254, 254, 254, 254, - 254, 254, 254, 3, 128, 245, 270, 142, 254, 161, - 207, 76, 223, 35, 241, 183, 134, 254, 48, 49, - 50, 51, 52, 53, 54, 55, 56, 76, 6, 7, - 254, 8, 77, 57, 58, 261, 184, 282, 35, 61, - 217, 249, 251, 48, 49, 50, 51, 52, 53, 54, - 55, 56, 76, 6, 7, 59, 8, 77, 57, 58, - 377, 291, 289, 192, 250, 372, 67, 191, 192, 192, - 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, - 59, 192, 192, 192, 192, 192, 226, 35, 193, 374, - 0, 315, 48, 49, 50, 51, 52, 53, 54, 55, - 56, 76, 0, 269, 35, 192, 77, 57, 58, 48, - 49, 50, 51, 52, 53, 54, 55, 56, 76, 376, - 0, 0, 0, 0, 57, 0, 0, 0, 0, 59, - 35, 0, 0, 233, 0, 48, 49, 50, 51, 52, - 53, 54, 55, 56, 0, 0, 59, 35, 0, 0, - 57, 58, 48, 49, 50, 51, 52, 53, 54, 55, - 56, 76, 0, 35, 0, 0, 0, 57, 293, 49, - 50, 0, 59, 53, 54, 55, 56, 0, 185, 0, - 2, 8, 0, 5, 0, 0, 0, 0, 0, 59, - 0, 0, 0, 0, 6, 7, 0, 8, 0, 0, - 0, 9, 0, 0, 186, 59, 187, 188, 1, 0, - 2, 3, 4, 5, 10, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 6, 7, 0, 8, 0, 0, - 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 10, -}; -short yycheck[] = { 10, - 27, 10, 59, 30, 27, 30, 0, 37, 38, 40, - 27, 41, 42, 43, 27, 45, 0, 47, 29, 19, - 31, 32, 33, 34, 44, 19, 41, 162, 58, 59, - 38, 59, 62, 41, 27, 43, 38, 45, 27, 41, - 189, 43, 62, 45, 41, 41, 135, 44, 44, 41, - 58, 59, 262, 0, 62, 144, 58, 59, 41, 0, - 62, 44, 257, 93, 94, 40, 62, 58, 43, 277, - 45, 44, 19, 257, 262, 263, 103, 38, 19, 257, - 41, 44, 43, 59, 45, 93, 94, 38, 123, 62, - 41, 93, 94, 38, 124, 123, 41, 58, 59, 62, - 44, 62, 113, 38, 115, 59, 41, 58, 59, 120, - 59, 62, 247, 58, 59, 299, 124, 62, 62, 59, - 44, 132, 124, 58, 59, 37, 123, 62, 277, 337, - 42, 123, 93, 94, 41, 47, 59, 44, 62, 41, - 123, 125, 93, 94, 38, 300, 301, 41, 93, 94, - 177, 126, 59, 363, 181, 149, 58, 59, 93, 94, - 62, 59, 189, 124, 58, 59, 189, 299, 62, 41, - 380, 262, 38, 124, 263, 41, 176, 280, 281, 124, - 41, 256, 176, 44, 91, 60, 58, 59, 337, 124, - 62, 93, 58, 59, 123, 41, 62, 41, 59, 93, - 94, 43, 149, 45, 231, 280, 281, 262, 149, 60, - 265, 60, 58, 59, 58, 59, 62, 123, 62, 246, - 274, 93, 357, 287, 288, 289, 257, 93, 94, 176, - 124, 211, 212, 213, 291, 176, 125, 257, 159, 160, - 161, 123, 269, 270, 123, 207, 208, 93, 94, 93, - 277, 262, 124, 270, 277, 44, 267, 270, 124, 209, - 210, 257, 293, 294, 295, 296, 297, 298, 299, 61, - 300, 301, 287, 288, 289, 94, 270, 270, 124, 124, - 124, 270, 257, 38, 257, 44, 91, 40, 257, 125, - 41, 62, 300, 301, 257, 283, 62, 62, 300, 301, - 311, 59, 311, 59, 125, 59, 44, 59, 41, 59, - 337, 59, 125, 257, 337, 59, 125, 125, 293, 294, - 295, 296, 297, 298, 299, 58, 59, 257, 262, 62, - 93, 342, 359, 342, 359, 59, 41, 40, 365, 300, - 301, 123, 41, 44, 290, 41, 40, 44, 291, 300, - 301, 59, 363, 125, 58, 300, 301, 40, 58, 41, - 93, 94, 294, 41, 59, 300, 301, 44, 257, 380, - 0, 257, 294, 262, 263, 264, 265, 266, 267, 268, - 269, 270, 271, 125, 59, 125, 257, 41, 277, 125, - 125, 124, 256, 257, 283, 41, 59, 286, 262, 263, - 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, - 299, 275, 276, 277, 278, 41, 125, 41, 257, 27, - 177, 204, 206, 262, 263, 264, 265, 266, 267, 268, - 269, 270, 271, 272, 273, 299, 275, 276, 277, 278, - 365, 267, 264, 257, 205, 360, 27, 149, 262, 263, - 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, - 299, 275, 276, 277, 278, 149, 181, 257, 149, 362, - -1, 309, 262, 263, 264, 265, 266, 267, 268, 269, - 270, 271, -1, 226, 257, 299, 276, 277, 278, 262, - 263, 264, 265, 266, 267, 268, 269, 270, 271, 364, - -1, -1, -1, -1, 277, -1, -1, -1, -1, 299, - 257, -1, -1, 286, -1, 262, 263, 264, 265, 266, - 267, 268, 269, 270, -1, -1, 299, 257, -1, -1, - 277, 278, 262, 263, 264, 265, 266, 267, 268, 269, - 270, 271, -1, 257, -1, -1, -1, 277, 262, 263, - 264, -1, 299, 267, 268, 269, 270, -1, 256, -1, - 258, 275, -1, 261, -1, -1, -1, -1, -1, 299, - -1, -1, -1, -1, 272, 273, -1, 275, -1, -1, - -1, 279, -1, -1, 282, 299, 284, 285, 256, -1, - 258, 259, 260, 261, 292, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 272, 273, -1, 275, -1, -1, - -1, 279, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 292, -}; -#define YYFINAL 11 -#ifndef YYDEBUG -#define YYDEBUG 0 -#endif -#define YYMAXTOKEN 301 -#if YYDEBUG -char *yyname[] = { -"end-of-file",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,"'%'","'&'",0,"'('","')'","'*'","'+'","','","'-'",0,"'/'",0,0,0,0,0,0,0,0, -0,0,"':'","';'","'<'","'='","'>'",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,"'['",0,"']'","'^'",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,"'{'","'|'","'}'","'~'",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"IDENTIFIER","IDL_CONST", -"IDL_MODULE","IDL_INTERFACE","IDL_TYPEDEF","IDL_LONG","IDL_SHORT", -"IDL_UNSIGNED","IDL_DOUBLE","IDL_FLOAT","IDL_CHAR","IDL_WCHAR","IDL_OCTET", -"IDL_BOOLEAN","IDL_ANY","IDL_STRUCT","IDL_UNION","IDL_SWITCH","IDL_ENUM", -"IDL_SEQUENCE","IDL_STRING","IDL_WSTRING","IDL_EXCEPTION","IDL_CASE", -"IDL_DEFAULT","IDL_READONLY","IDL_ATTRIBUTE","IDL_ONEWAY","IDL_IDEMPOTENT", -"IDL_VOID","IDL_IN","IDL_OUT","IDL_INOUT","IDL_RAISES","IDL_CONTEXT", -"IDL_NATIVE","IDL_INTEGER_LITERAL","IDL_STRING_LITERAL","IDL_CHARACTER_LITERAL", -"IDL_FLOATING_PT_LITERAL","IDL_TRUETOK","IDL_FALSETOK","IDL_SCOPE_DELIMITOR", -"IDL_LEFT_SHIFT","IDL_RIGHT_SHIFT", -}; -char *yyrule[] = { -"$accept : start", -"start : definitions", -"definitions : definition definitions", -"definitions :", -"$$1 :", -"definition : type_dcl $$1 ';'", -"$$2 :", -"definition : const_dcl $$2 ';'", -"$$3 :", -"definition : exception $$3 ';'", -"$$4 :", -"definition : interface_def $$4 ';'", -"$$5 :", -"definition : module $$5 ';'", -"$$6 :", -"definition : error $$6 ';'", -"$$7 :", -"$$8 :", -"$$9 :", -"$$10 :", -"module : IDL_MODULE $$7 IDENTIFIER $$8 '{' $$9 definitions $$10 '}'", -"interface_def : interface", -"interface_def : forward", -"$$11 :", -"$$12 :", -"$$13 :", -"interface : interface_header $$11 '{' $$12 exports $$13 '}'", -"$$14 :", -"interface_decl : IDL_INTERFACE $$14 id", -"interface_header : interface_decl inheritance_spec", -"$$15 :", -"inheritance_spec : ':' $$15 at_least_one_scoped_name", -"inheritance_spec :", -"exports : exports export", -"exports :", -"$$16 :", -"export : type_dcl $$16 ';'", -"$$17 :", -"export : const_dcl $$17 ';'", -"$$18 :", -"export : exception $$18 ';'", -"$$19 :", -"export : attribute $$19 ';'", -"$$20 :", -"export : operation $$20 ';'", -"$$21 :", -"export : error $$21 ';'", -"at_least_one_scoped_name : scoped_name scoped_names", -"$$22 :", -"scoped_names : scoped_names ',' $$22 scoped_name", -"scoped_names :", -"scoped_name : id", -"$$23 :", -"scoped_name : IDL_SCOPE_DELIMITOR $$23 id", -"$$24 :", -"scoped_name : scoped_name IDL_SCOPE_DELIMITOR $$24 id", -"id : IDENTIFIER", -"forward : interface_decl", -"$$25 :", -"$$26 :", -"$$27 :", -"$$28 :", -"const_dcl : IDL_CONST $$25 const_type $$26 id $$27 '=' $$28 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", -"$$29 :", -"type_dcl : IDL_TYPEDEF $$29 type_declarator", -"type_dcl : struct_type", -"type_dcl : union_type", -"type_dcl : enum_type", -"type_dcl : IDL_NATIVE simple_declarator", -"$$30 :", -"type_declarator : type_spec $$30 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", -"$$31 :", -"declarators : declarators ',' $$31 declarator", -"declarators :", -"declarator : simple_declarator", -"declarator : complex_declarator", -"at_least_one_simple_declarator : simple_declarator simple_declarators", -"$$32 :", -"simple_declarators : simple_declarators ',' $$32 simple_declarator", -"simple_declarators :", -"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", -"$$33 :", -"$$34 :", -"$$35 :", -"$$36 :", -"struct_type : IDL_STRUCT $$33 id $$34 '{' $$35 at_least_one_member $$36 '}'", -"at_least_one_member : member members", -"members : members member", -"members :", -"$$37 :", -"$$38 :", -"member : type_spec $$37 at_least_one_declarator $$38 ';'", -"$$39 :", -"member : error $$39 ';'", -"$$40 :", -"$$41 :", -"$$42 :", -"$$43 :", -"$$44 :", -"$$45 :", -"$$46 :", -"$$47 :", -"union_type : IDL_UNION $$40 id $$41 IDL_SWITCH $$42 '(' $$43 switch_type_spec $$44 ')' $$45 '{' $$46 at_least_one_case_branch $$47 '}'", -"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 :", -"$$48 :", -"$$49 :", -"case_branch : at_least_one_case_label $$48 element_spec $$49 ';'", -"$$50 :", -"case_branch : error $$50 ';'", -"at_least_one_case_label : case_label case_labels", -"case_labels : case_labels case_label", -"case_labels :", -"$$51 :", -"case_label : IDL_DEFAULT $$51 ':'", -"$$52 :", -"$$53 :", -"case_label : IDL_CASE $$52 const_expr $$53 ':'", -"$$54 :", -"element_spec : type_spec $$54 declarator", -"$$55 :", -"$$56 :", -"$$57 :", -"$$58 :", -"enum_type : IDL_ENUM $$55 id $$56 '{' $$57 at_least_one_enumerator $$58 '}'", -"at_least_one_enumerator : enumerator enumerators", -"$$59 :", -"enumerators : enumerators ',' $$59 enumerator", -"enumerators :", -"enumerator : IDENTIFIER", -"$$60 :", -"$$61 :", -"sequence_type_spec : seq_head ',' $$60 positive_int_expr $$61 '>'", -"sequence_type_spec : seq_head '>'", -"$$62 :", -"$$63 :", -"seq_head : IDL_SEQUENCE $$62 '<' $$63 simple_type_spec", -"$$64 :", -"$$65 :", -"string_type_spec : string_head '<' $$64 positive_int_expr $$65 '>'", -"string_type_spec : string_head", -"string_head : IDL_STRING", -"$$66 :", -"$$67 :", -"wstring_type_spec : wstring_head '<' $$66 positive_int_expr $$67 '>'", -"wstring_type_spec : wstring_head", -"wstring_head : IDL_WSTRING", -"$$68 :", -"array_declarator : id $$68 at_least_one_array_dim", -"at_least_one_array_dim : array_dim array_dims", -"array_dims : array_dims array_dim", -"array_dims :", -"$$69 :", -"$$70 :", -"array_dim : '[' $$69 positive_int_expr $$70 ']'", -"$$71 :", -"$$72 :", -"attribute : opt_readonly IDL_ATTRIBUTE $$71 param_type_spec $$72 at_least_one_simple_declarator", -"opt_readonly : IDL_READONLY", -"opt_readonly :", -"$$73 :", -"$$74 :", -"$$75 :", -"$$76 :", -"exception : IDL_EXCEPTION $$73 id $$74 '{' $$75 members $$76 '}'", -"$$77 :", -"$$78 :", -"$$79 :", -"$$80 :", -"operation : opt_op_attribute op_type_spec $$77 IDENTIFIER $$78 parameter_list $$79 opt_raises $$80 opt_context", -"opt_op_attribute : IDL_ONEWAY", -"opt_op_attribute : IDL_IDEMPOTENT", -"opt_op_attribute :", -"op_type_spec : param_type_spec", -"op_type_spec : IDL_VOID", -"$$81 :", -"parameter_list : '(' $$81 ')'", -"$$82 :", -"parameter_list : '(' $$82 at_least_one_parameter ')'", -"at_least_one_parameter : parameter parameters", -"$$83 :", -"parameters : parameters ',' $$83 parameter", -"parameters :", -"$$84 :", -"$$85 :", -"parameter : direction $$84 param_type_spec $$85 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", -"$$86 :", -"$$87 :", -"opt_raises : IDL_RAISES $$86 '(' $$87 at_least_one_scoped_name ')'", -"opt_raises :", -"$$88 :", -"$$89 :", -"opt_context : IDL_CONTEXT $$88 '(' $$89 at_least_one_string_literal ')'", -"opt_context :", -"at_least_one_string_literal : IDL_STRING_LITERAL string_literals", -"$$90 :", -"string_literals : string_literals ',' $$90 IDL_STRING_LITERAL", -"string_literals :", -}; -#endif -#define yyclearin (yychar=(-1)) -#define yyerrok (yyerrflag=0) -#ifndef YYSTACKSIZE -#ifdef YYMAXDEPTH -#define YYSTACKSIZE YYMAXDEPTH -#else -#define YYSTACKSIZE 300 -#endif -#endif -int yydebug; -int yynerrs; -int yyerrflag; -int yychar; -short *yyssp; -YYSTYPE *yyvsp; -YYSTYPE yyval; -YYSTYPE yylval; -#define yystacksize YYSTACKSIZE -short yyss[YYSTACKSIZE]; -YYSTYPE yyvs[YYSTACKSIZE]; -#line 2277 "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 *) -{ -} -#line 815 "y.tab.c" -#define YYABORT goto yyabort -#define YYACCEPT goto yyaccept -#define YYERROR goto yyerrlab -#ifdef YYDEBUG -#ifndef YYDEBUG_LEXER_TEXT /* pointer to the text isolated by the lexer*/ -#define YYDEBUG_LEXER_TEXT "YYDEBUG_LEXER_TEXT not defined" -#endif -#ifndef YYDEBUG_INDENT_STRING -#define YYDEBUG_INDENT_STRING "| " -#endif -#ifndef YYDEBUG_REDUCE_STRING -#define YYDEBUG_REDUCE_STRING "+-------" -#endif -#ifndef YYDEBUG_INDENT -#ifdef __cplusplus -void YYDEBUG_INDENT(int yyindent) -#else -YYDEBUG_INDENT(yyindent) -int yyindent; -#endif -{ - while(yyindent-- > 0) - printf("%s", YYDEBUG_INDENT_STRING); -} -#endif /* YYDEBUG_INDENT */ -#ifndef YYDEBUG_REDUCE -#ifdef __cplusplus -void YYDEBUG_REDUCE(int yynew_state, int yyrule_num, char *yyrule_string, int yynew_indent, int yyrhs_count) -#else -YYDEBUG_REDUCE(yynew_state, yyrule_num, yyrule_string, yynew_indent, yyrhs_count) -int yynew_state; -int yyrule_num; -char * yyrule_string; -int yynew_indent; -int yyrhs_count; -#endif -{ - if (1 < yyrhs_count) - { /* draw the graphics for the reduction */ - YYDEBUG_INDENT(yynew_indent); - while(1 < yyrhs_count--) - printf("%s", YYDEBUG_REDUCE_STRING); - putchar('+'); /* left rotated L would look nice */ - putchar('\n'); - YYDEBUG_INDENT(yynew_indent); - putchar('|'); /* down arrow would look nice */ - putchar('\n'); - } - YYDEBUG_INDENT(yynew_indent); - /* Only print the resulting token name */ - while (*yyrule_string) - putchar(*yyrule_string++); - putchar('\n'); -} -#endif /* YYDEBUG_REDUCE */ -#ifndef YYDEBUG_SHIFT_LEXEME -#ifdef __cplusplus -void YYDEBUG_SHIFT_LEXEME(int yyold_state, int yynew_state, char *yytoken_string, int yynew_indent) -#else -YYDEBUG_SHIFT_LEXEME(yyold_state, yynew_state, yytoken_string, yynew_indent) -int yyold_state; -int yynew_state; -char * yytoken_string; -int yynew_indent; -#endif -{ - YYDEBUG_INDENT(yynew_indent); - printf("%s <-- `%s'\n", yytoken_string, YYDEBUG_LEXER_TEXT); -} -#endif /* YYDEBUG_SHIFT_LEXEME */ -#ifndef YYDEBUG_LOOK_AHEAD -#ifdef __cplusplus -void YYDEBUG_LOOK_AHEAD(int yynew_state, int yytoken_num, char *yytoken_string, int yyindent) -#else -YYDEBUG_LOOK_AHEAD(yynew_state, yytoken_num, yytoken_string, yyindent) -int yynew_state; -int yytoken_num; -char * yytoken_string; -int yyindent; -#endif -{ - YYDEBUG_INDENT(yyindent); - printf(" .... look ahead at %s `%s'\n", - yytoken_string, - (0 == yytoken_num)? "\0": YYDEBUG_LEXER_TEXT); -} -#endif /* YYDEBUG_LOOK_AHEAD */ -#ifndef YYDEBUG_DISCARD_STATE -#ifdef __cplusplus -void YYDEBUG_DISCARD_STATE(int yynew_state, int yyindent) -#else -YYDEBUG_DISCARD_STATE(yynew_state, yyindent) -int yynew_state; -int yyindent; -#endif -{ - if (0 < yyindent) - { /* draw the graphics for the reduction */ - YYDEBUG_INDENT(yyindent-1); - printf("%s", YYDEBUG_REDUCE_STRING); - putchar('+'); /* left rotated L would look nice */ - printf(" discarding state\n"); - YYDEBUG_INDENT(yyindent-1); - putchar('|'); /* down arrow would look nice */ - putchar('\n'); - } - else - { - if (0 == yyindent) - printf("discarding state\n"); - else - printf("no more states to discard: parser will abort\n"); - } -} -#endif /* YYDEBUG_DISCARD_STATE */ -#ifndef YYDEBUG_DISCARD_TOKEN -#ifdef __cplusplus -void YYDEBUG_DISCARD_TOKEN(int yynew_state, int yytoken_num, char *yytoken_string, int yyindent) -#else -YYDEBUG_DISCARD_TOKEN(yynew_state, yytoken_num, yytoken_string, yyindent) -int yynew_state; -int yytoken_num; -char * yytoken_string; -int yyindent; -#endif -{ - YYDEBUG_INDENT(yyindent); - printf("discarding token %s\n", yytoken_string); -} -#endif /* YYDEBUG_DISCARD_TOKEN */ -#ifndef YYDEBUG_SHIFT_ERROR_LEXEME -#ifdef __cplusplus -void YYDEBUG_SHIFT_ERROR_LEXEME(int yyold_state, int yynew_state, int yyindent) -#else -YYDEBUG_SHIFT_ERROR_LEXEME(yyold_state, yynew_state, yyindent) -int yyold_state; -int yynew_state; -int yyindent; -#endif -{ - YYDEBUG_INDENT(yyindent); - printf("error\n"); -} -#endif /* YYDEBUG_SHIFT_ERROR_LEXEME */ -#endif /* YYDEBUG */ -#ifdef __cplusplus -extern "C" { extern char *getenv(const char *); } -#endif -int -yyparse() -{ - register int yym, yyn, yystate; -#if YYDEBUG - register char *yys; -#ifndef __cplusplus - extern char *getenv(); -#endif - - if ((yys = getenv("YYDEBUG"))) - { - yyn = *yys; - if (yyn >= '0' && yyn <= '9') - yydebug = yyn - '0'; - } -#endif - - yynerrs = 0; - yyerrflag = 0; - yychar = (-1); - - yyssp = yyss; - yyvsp = yyvs; - *yyssp = yystate = 0; - -yyloop: - if ((yyn = yydefred[yystate])) goto yyreduce; - if (yychar < 0) - { - if ((yychar = yylex()) < 0) yychar = 0; -#if YYDEBUG - if (yydebug) - { - yys = 0; - if (yychar <= YYMAXTOKEN) yys = yyname[yychar]; - if (!yys) yys = "illegal-symbol"; - if (5 < yydebug) - printf("yydebug: state %d, reading %d (%s)\n", yystate, - yychar, yys); - else - YYDEBUG_LOOK_AHEAD(yystate, yychar, yys, yyssp-yyss); - } -#endif - } - if ((yyn = yysindex[yystate]) && (yyn += yychar) >= 0 && - yyn <= YYTABLESIZE && yycheck[yyn] == yychar) - { -#if YYDEBUG - if (yydebug) - if (5 < yydebug) - printf("yydebug: state %d, shifting to state %d\n", - yystate, yytable[yyn]); - else - YYDEBUG_SHIFT_LEXEME(yystate, yytable[yyn], yys, yyssp-yyss); -#endif - if (yyssp >= yyss + yystacksize - 1) - { - goto yyoverflow; - } - *++yyssp = yystate = yytable[yyn]; - *++yyvsp = yylval; - yychar = (-1); - if (yyerrflag > 0) --yyerrflag; - goto yyloop; - } - if ((yyn = yyrindex[yystate]) && (yyn += yychar) >= 0 && - yyn <= YYTABLESIZE && yycheck[yyn] == yychar) - { - yyn = yytable[yyn]; - goto yyreduce; - } - if (yyerrflag) goto yyinrecovery; -#ifdef lint - goto yynewerror; -#endif -yynewerror: - yyerror("syntax error"); -#ifdef lint - goto yyerrlab; -#endif -yyerrlab: - ++yynerrs; -yyinrecovery: - if (yyerrflag < 3) - { - yyerrflag = 3; - for (;;) - { - if ((yyn = yysindex[*yyssp]) && (yyn += YYERRCODE) >= 0 && - yyn <= YYTABLESIZE && yycheck[yyn] == YYERRCODE) - { -#if YYDEBUG - if (yydebug) - if (5 < yydebug) - printf("yydebug: state %d, error recovery shifting\ - to state %d\n", *yyssp, yytable[yyn]); - else - YYDEBUG_SHIFT_ERROR_LEXEME(*yyssp, yytable[yyn], yyssp-yyss); -#endif - if (yyssp >= yyss + yystacksize - 1) - { - goto yyoverflow; - } - *++yyssp = yystate = yytable[yyn]; - *++yyvsp = yylval; - goto yyloop; - } - else - { -#if YYDEBUG - if (yydebug) - if (5 < yydebug) - printf("yydebug: error recovery discarding state %d\ -", - *yyssp); - else - YYDEBUG_DISCARD_STATE(*yyssp, yyssp-yyss-1); -#endif - if (yyssp <= yyss) goto yyabort; - --yyssp; - --yyvsp; - } - } - } - else - { - if (yychar == 0) goto yyabort; -#if YYDEBUG - if (yydebug) - { - yys = 0; - if (yychar <= YYMAXTOKEN) yys = yyname[yychar]; - if (!yys) yys = "illegal-symbol"; - if (5 < yydebug) - printf("yydebug: state %d, error recovery discards token %d (%s)\n", - yystate, yychar, yys); - else - YYDEBUG_DISCARD_TOKEN(yystate, yychar, yys, yyssp-yyss); - } -#endif - yychar = (-1); - goto yyloop; - } -yyreduce: - yym = yylen[yyn]; - yyval = yyvsp[1-yym]; -#if YYDEBUG - if (yydebug) - if (5 < yydebug) - printf("yydebug: state %d, reducing by rule %d (%s)\n", - yystate, yyn, yyrule[yyn]); - else - YYDEBUG_REDUCE(yystate, yyn, yyrule[yyn], yyssp-yyss-yym, yym); -#endif - switch (yyn) - { -case 4: -#line 240 "idl.yy" -{ - idl_global->set_parse_state(IDL_GlobalData::PS_TypeDeclSeen); - } -break; -case 5: -#line 244 "idl.yy" -{ - idl_global->set_parse_state(IDL_GlobalData::PS_NoState); - } -break; -case 6: -#line 248 "idl.yy" -{ - idl_global->set_parse_state(IDL_GlobalData::PS_ConstDeclSeen); - } -break; -case 7: -#line 252 "idl.yy" -{ - idl_global->set_parse_state(IDL_GlobalData::PS_NoState); - } -break; -case 8: -#line 256 "idl.yy" -{ - idl_global->set_parse_state(IDL_GlobalData::PS_ExceptDeclSeen); - } -break; -case 9: -#line 260 "idl.yy" -{ - idl_global->set_parse_state(IDL_GlobalData::PS_NoState); - } -break; -case 10: -#line 264 "idl.yy" -{ - idl_global->set_parse_state(IDL_GlobalData::PS_InterfaceDeclSeen); - } -break; -case 11: -#line 268 "idl.yy" -{ - idl_global->set_parse_state(IDL_GlobalData::PS_NoState); - } -break; -case 12: -#line 272 "idl.yy" -{ - idl_global->set_parse_state(IDL_GlobalData::PS_ModuleDeclSeen); - } -break; -case 13: -#line 276 "idl.yy" -{ - idl_global->set_parse_state(IDL_GlobalData::PS_NoState); - } -break; -case 14: -#line 280 "idl.yy" -{ - idl_global->err()->syntax_error(idl_global->parse_state()); - } -break; -case 15: -#line 284 "idl.yy" -{ - idl_global->set_parse_state(IDL_GlobalData::PS_NoState); - yyerrok; - } -break; -case 16: -#line 291 "idl.yy" -{ - idl_global->set_parse_state(IDL_GlobalData::PS_ModuleSeen); - } -break; -case 17: -#line 295 "idl.yy" -{ - UTL_ScopedName *n = - new UTL_ScopedName(new Identifier(yyvsp[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 316 "idl.yy" -{ - idl_global->set_parse_state(IDL_GlobalData::PS_ModuleSqSeen); - } -break; -case 19: -#line 320 "idl.yy" -{ - idl_global->set_parse_state(IDL_GlobalData::PS_ModuleBodySeen); - } -break; -case 20: -#line 324 "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 340 "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 && yyvsp[0].ihval != NULL) { - i = idl_global->gen()->create_interface(yyvsp[0].ihval->interface_name(), - yyvsp[0].ihval->inherits(), - yyvsp[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(yyvsp[0].ihval->inherits()); - fd->set_n_inherits(yyvsp[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 424 "idl.yy" -{ - idl_global->set_parse_state(IDL_GlobalData::PS_InterfaceSqSeen); - } -break; -case 25: -#line 428 "idl.yy" -{ - idl_global->set_parse_state(IDL_GlobalData::PS_InterfaceBodySeen); - } -break; -case 26: -#line 432 "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 443 "idl.yy" -{ - idl_global->set_parse_state(IDL_GlobalData::PS_InterfaceSeen); - } -break; -case 28: -#line 447 "idl.yy" -{ - idl_global->set_parse_state(IDL_GlobalData::PS_InterfaceIDSeen); - yyval.idval = yyvsp[0].idval; - } -break; -case 29: -#line 455 "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(yyvsp[-1].idval, NULL), yyvsp[0].nlval); - } -break; -case 30: -#line 469 "idl.yy" -{ - idl_global->set_parse_state(IDL_GlobalData::PS_InheritColonSeen); - } -break; -case 31: -#line 473 "idl.yy" -{ - yyval.nlval = yyvsp[0].nlval; - } -break; -case 32: -#line 477 "idl.yy" -{ - yyval.nlval = NULL; - } -break; -case 35: -#line 489 "idl.yy" -{ - idl_global->set_parse_state(IDL_GlobalData::PS_TypeDeclSeen); - } -break; -case 36: -#line 493 "idl.yy" -{ - idl_global->set_parse_state(IDL_GlobalData::PS_NoState); - } -break; -case 37: -#line 497 "idl.yy" -{ - idl_global->set_parse_state(IDL_GlobalData::PS_ConstDeclSeen); - } -break; -case 38: -#line 501 "idl.yy" -{ - idl_global->set_parse_state(IDL_GlobalData::PS_NoState); - } -break; -case 39: -#line 505 "idl.yy" -{ - idl_global->set_parse_state(IDL_GlobalData::PS_ExceptDeclSeen); - } -break; -case 40: -#line 509 "idl.yy" -{ - idl_global->set_parse_state(IDL_GlobalData::PS_NoState); - } -break; -case 41: -#line 513 "idl.yy" -{ - idl_global->set_parse_state(IDL_GlobalData::PS_AttrDeclSeen); - } -break; -case 42: -#line 517 "idl.yy" -{ - idl_global->set_parse_state(IDL_GlobalData::PS_NoState); - } -break; -case 43: -#line 521 "idl.yy" -{ - idl_global->set_parse_state(IDL_GlobalData::PS_OpDeclSeen); - } -break; -case 44: -#line 525 "idl.yy" -{ - idl_global->set_parse_state(IDL_GlobalData::PS_NoState); - } -break; -case 45: -#line 529 "idl.yy" -{ - idl_global->err()->syntax_error(idl_global->parse_state()); - } -break; -case 46: -#line 533 "idl.yy" -{ - idl_global->set_parse_state(IDL_GlobalData::PS_NoState); - yyerrok; - } -break; -case 47: -#line 541 "idl.yy" -{ - yyval.nlval = new UTL_NameList(yyvsp[-1].idlist, yyvsp[0].nlval); - } -break; -case 48: -#line 549 "idl.yy" -{ - idl_global->set_parse_state(IDL_GlobalData::PS_SNListCommaSeen); - } -break; -case 49: -#line 553 "idl.yy" -{ - idl_global->set_parse_state(IDL_GlobalData::PS_ScopedNameSeen); - - if (yyvsp[-3].nlval == NULL) - yyval.nlval = new UTL_NameList(yyvsp[0].idlist, NULL); - else { - yyvsp[-3].nlval->nconc(new UTL_NameList(yyvsp[0].idlist, NULL)); - yyval.nlval = yyvsp[-3].nlval; - } - } -break; -case 50: -#line 564 "idl.yy" -{ - yyval.nlval = NULL; - } -break; -case 51: -#line 571 "idl.yy" -{ - idl_global->set_parse_state(IDL_GlobalData::PS_SN_IDSeen); - - yyval.idlist = new UTL_IdList(yyvsp[0].idval, NULL); - } -break; -case 52: -#line 577 "idl.yy" -{ - idl_global->set_parse_state(IDL_GlobalData::PS_ScopeDelimSeen); - } -break; -case 53: -#line 581 "idl.yy" -{ - idl_global->set_parse_state(IDL_GlobalData::PS_SN_IDSeen); - - yyval.idlist = new UTL_IdList(new Identifier(yyvsp[-2].strval, 1, 0, I_FALSE), - new UTL_IdList(yyvsp[0].idval, NULL)); - } -break; -case 54: -#line 589 "idl.yy" -{ - idl_global->set_parse_state(IDL_GlobalData::PS_ScopeDelimSeen); - } -break; -case 55: -#line 593 "idl.yy" -{ - idl_global->set_parse_state(IDL_GlobalData::PS_SN_IDSeen); - - yyvsp[-3].idlist->nconc(new UTL_IdList(yyvsp[0].idval, NULL)); - yyval.idlist = yyvsp[-3].idlist; - } -break; -case 56: -#line 602 "idl.yy" -{ - yyval.idval = new Identifier(yyvsp[0].strval, 1, 0, I_FALSE); - } -break; -case 57: -#line 609 "idl.yy" -{ - UTL_Scope *s = idl_global->scopes()->top_non_null(); - UTL_ScopedName *n = new UTL_ScopedName(yyvsp[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 629 "idl.yy" -{ - idl_global->set_parse_state(IDL_GlobalData::PS_ConstSeen); - } -break; -case 59: -#line 633 "idl.yy" -{ - idl_global->set_parse_state(IDL_GlobalData::PS_ConstTypeSeen); - } -break; -case 60: -#line 637 "idl.yy" -{ - idl_global->set_parse_state(IDL_GlobalData::PS_ConstIDSeen); - } -break; -case 61: -#line 641 "idl.yy" -{ - idl_global->set_parse_state(IDL_GlobalData::PS_ConstAssignSeen); - } -break; -case 62: -#line 645 "idl.yy" -{ - UTL_ScopedName *n = new UTL_ScopedName(yyvsp[-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 (yyvsp[0].exval != NULL && s != NULL) { - if (yyvsp[0].exval->coerce(yyvsp[-6].etval) == NULL) - idl_global->err()->coercion_error(yyvsp[0].exval, yyvsp[-6].etval); - else { - c = - idl_global->gen()->create_constant(yyvsp[-6].etval, yyvsp[0].exval, n, p); - (void) s->fe_add_constant(c); - } - } - } -break; -case 68: -#line 678 "idl.yy" -{ - yyval.etval = AST_Expression::EV_string; - } -break; -case 69: -#line 682 "idl.yy" -{ - yyval.etval = AST_Expression::EV_wstring; - } -break; -case 70: -#line 686 "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(yyvsp[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 728 "idl.yy" -{ - yyval.exval = idl_global->gen()->create_expr(AST_Expression::EC_or, yyvsp[-2].exval, yyvsp[0].exval); - } -break; -case 76: -#line 736 "idl.yy" -{ - yyval.exval = idl_global->gen()->create_expr(AST_Expression::EC_xor, yyvsp[-2].exval, yyvsp[0].exval); - } -break; -case 78: -#line 744 "idl.yy" -{ - yyval.exval = idl_global->gen()->create_expr(AST_Expression::EC_and, yyvsp[-2].exval, yyvsp[0].exval); - } -break; -case 80: -#line 752 "idl.yy" -{ - yyval.exval = idl_global->gen()->create_expr(AST_Expression::EC_right,yyvsp[-2].exval,yyvsp[0].exval); - } -break; -case 81: -#line 756 "idl.yy" -{ - yyval.exval = idl_global->gen()->create_expr(AST_Expression::EC_left,yyvsp[-2].exval,yyvsp[0].exval); - } -break; -case 83: -#line 764 "idl.yy" -{ - yyval.exval = idl_global->gen()->create_expr(AST_Expression::EC_add, yyvsp[-2].exval, yyvsp[0].exval); - } -break; -case 84: -#line 768 "idl.yy" -{ - yyval.exval = idl_global->gen()->create_expr(AST_Expression::EC_minus,yyvsp[-2].exval,yyvsp[0].exval); - } -break; -case 86: -#line 776 "idl.yy" -{ - yyval.exval = idl_global->gen()->create_expr(AST_Expression::EC_mul, yyvsp[-2].exval, yyvsp[0].exval); - } -break; -case 87: -#line 780 "idl.yy" -{ - yyval.exval = idl_global->gen()->create_expr(AST_Expression::EC_div, yyvsp[-2].exval, yyvsp[0].exval); - } -break; -case 88: -#line 784 "idl.yy" -{ - yyval.exval = idl_global->gen()->create_expr(AST_Expression::EC_mod, yyvsp[-2].exval, yyvsp[0].exval); - } -break; -case 90: -#line 792 "idl.yy" -{ - yyval.exval = idl_global->gen()->create_expr(AST_Expression::EC_u_plus, - yyvsp[0].exval, - NULL); - } -break; -case 91: -#line 798 "idl.yy" -{ - yyval.exval = idl_global->gen()->create_expr(AST_Expression::EC_u_minus, - yyvsp[0].exval, - NULL); - } -break; -case 92: -#line 804 "idl.yy" -{ - yyval.exval = idl_global->gen()->create_expr(AST_Expression::EC_bit_neg, - yyvsp[0].exval, - NULL); - } -break; -case 93: -#line 813 "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(yyvsp[0].idlist); - } -break; -case 95: -#line 823 "idl.yy" -{ - yyval.exval = yyvsp[-1].exval; - } -break; -case 96: -#line 830 "idl.yy" -{ - yyval.exval = idl_global->gen()->create_expr(yyvsp[0].ival); - } -break; -case 97: -#line 834 "idl.yy" -{ - yyval.exval = idl_global->gen()->create_expr(yyvsp[0].sval); - } -break; -case 98: -#line 838 "idl.yy" -{ - yyval.exval = idl_global->gen()->create_expr(yyvsp[0].cval); - } -break; -case 99: -#line 842 "idl.yy" -{ - yyval.exval = idl_global->gen()->create_expr(yyvsp[0].dval); - } -break; -case 100: -#line 846 "idl.yy" -{ - yyval.exval = idl_global->gen()->create_expr((idl_bool) I_TRUE, - AST_Expression::EV_bool); - } -break; -case 101: -#line 851 "idl.yy" -{ - yyval.exval = idl_global->gen()->create_expr((idl_bool) I_FALSE, - AST_Expression::EV_bool); - } -break; -case 102: -#line 859 "idl.yy" -{ - yyvsp[0].exval->evaluate(AST_Expression::EK_const); - yyval.exval = idl_global->gen()->create_expr(yyvsp[0].exval, AST_Expression::EV_ulong); - } -break; -case 103: -#line 867 "idl.yy" -{ - idl_global->set_parse_state(IDL_GlobalData::PS_TypedefSeen); - } -break; -case 104: -#line 870 "idl.yy" -{yyval.ival = 0;} -break; -case 105: -#line 871 "idl.yy" -{ yyval.ival = 0;} -break; -case 106: -#line 872 "idl.yy" -{ yyval.ival = 0;} -break; -case 107: -#line 873 "idl.yy" -{ yyval.ival = 0;} -break; -case 108: -#line 875 "idl.yy" -{ - UTL_Scope *s = idl_global->scopes()->top_non_null(); - AST_Native *node = NULL; - AST_Decl *v = NULL; - UTL_StrList *p = idl_global->pragmas(); - - ACE_UNUSED_ARG (v); - - idl_global->set_parse_state(IDL_GlobalData::PS_NativeSeen); - /* - * Create a node representing a Native and add it to its - * enclosing scope - */ - if (s != NULL) { - node = idl_global->gen()->create_native (yyvsp[0].deval->name (), p); - /* - * Add it to its defining scope - */ - (void) s->fe_add_native (node); - } - } -break; -case 109: -#line 900 "idl.yy" -{ - idl_global->set_parse_state(IDL_GlobalData::PS_TypeSpecSeen); - } -break; -case 110: -#line 904 "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 && yyvsp[-2].dcval != NULL && yyvsp[0].dlval != NULL) { - l = new UTL_DecllistActiveIterator(yyvsp[0].dlval); - for (;!(l->is_done()); l->next()) { - d = l->item(); - if (d == NULL) - continue; - AST_Type * tp = d->compose(yyvsp[-2].dcval); - if (tp == NULL) - continue; - t = idl_global->gen()->create_typedef(tp, d->name(), p); - /* if this is a sequence, it is a named one and hence we*/ - /* set its name to the same as the declarator. However*/ - /* @@ (ASG) note that if we had a scenario of the kind*/ - /* typedef sequence<...> X, Y, Z; then we must make a*/ - /* new sequence node for each name. Not handled currently.*/ - if (tp->node_type () == AST_Decl::NT_sequence) - { - tp->set_name (d->name ()); - } - (void) s->fe_add_typedef(t); - } - delete l; - } - } -break; -case 113: -#line 952 "idl.yy" -{ - yyval.dcval = idl_global->scopes()->bottom()->lookup_primitive_type(yyvsp[0].etval); - } -break; -case 115: -#line 957 "idl.yy" -{ - UTL_Scope *s = idl_global->scopes()->top_non_null(); - AST_Decl *d = NULL; - - if (s != NULL) - d = s->lookup_by_name(yyvsp[0].idlist, I_TRUE); - if (d == NULL) - idl_global->err()->lookup_error(yyvsp[0].idlist); - yyval.dcval = d; - } -break; -case 128: -#line 992 "idl.yy" -{ - yyval.dlval = new UTL_DeclList(yyvsp[-1].deval, yyvsp[0].dlval); - } -break; -case 129: -#line 1000 "idl.yy" -{ - idl_global->set_parse_state(IDL_GlobalData::PS_DeclsCommaSeen); - } -break; -case 130: -#line 1004 "idl.yy" -{ - idl_global->set_parse_state(IDL_GlobalData::PS_DeclsDeclSeen); - - if (yyvsp[-3].dlval == NULL) - yyval.dlval = new UTL_DeclList(yyvsp[0].deval, NULL); - else { - yyvsp[-3].dlval->nconc(new UTL_DeclList(yyvsp[0].deval, NULL)); - yyval.dlval = yyvsp[-3].dlval; - } - } -break; -case 131: -#line 1015 "idl.yy" -{ - yyval.dlval = NULL; - } -break; -case 134: -#line 1027 "idl.yy" -{ - yyval.dlval = new UTL_DeclList(yyvsp[-1].deval, yyvsp[0].dlval); - } -break; -case 135: -#line 1035 "idl.yy" -{ - idl_global->set_parse_state(IDL_GlobalData::PS_DeclsCommaSeen); - } -break; -case 136: -#line 1039 "idl.yy" -{ - idl_global->set_parse_state(IDL_GlobalData::PS_DeclsDeclSeen); - - if (yyvsp[-3].dlval == NULL) - yyval.dlval = new UTL_DeclList(yyvsp[0].deval, NULL); - else { - yyvsp[-3].dlval->nconc(new UTL_DeclList(yyvsp[0].deval, NULL)); - yyval.dlval = yyvsp[-3].dlval; - } - } -break; -case 137: -#line 1050 "idl.yy" -{ - yyval.dlval = NULL; - } -break; -case 138: -#line 1057 "idl.yy" -{ - yyval.deval = new FE_Declarator(new UTL_ScopedName(yyvsp[0].idval, NULL), - FE_Declarator::FD_simple, NULL); - } -break; -case 139: -#line 1065 "idl.yy" -{ - yyval.deval = new FE_Declarator(new UTL_ScopedName(yyvsp[0].dcval->local_name(), NULL), - FE_Declarator::FD_complex, - yyvsp[0].dcval); - } -break; -case 142: -#line 1079 "idl.yy" -{ - yyval.etval = AST_Expression::EV_long; - } -break; -case 143: -#line 1083 "idl.yy" -{ - yyval.etval = AST_Expression::EV_longlong; - } -break; -case 144: -#line 1087 "idl.yy" -{ - yyval.etval = AST_Expression::EV_short; - } -break; -case 145: -#line 1094 "idl.yy" -{ - yyval.etval = AST_Expression::EV_ulong; - } -break; -case 146: -#line 1098 "idl.yy" -{ - yyval.etval = AST_Expression::EV_ulonglong; - } -break; -case 147: -#line 1102 "idl.yy" -{ - yyval.etval = AST_Expression::EV_ushort; - } -break; -case 148: -#line 1109 "idl.yy" -{ - yyval.etval = AST_Expression::EV_double; - } -break; -case 149: -#line 1113 "idl.yy" -{ - yyval.etval = AST_Expression::EV_float; - } -break; -case 150: -#line 1117 "idl.yy" -{ - yyval.etval = AST_Expression::EV_longdouble; - } -break; -case 151: -#line 1124 "idl.yy" -{ - yyval.etval = AST_Expression::EV_char; - } -break; -case 152: -#line 1128 "idl.yy" -{ - yyval.etval = AST_Expression::EV_wchar; - } -break; -case 153: -#line 1135 "idl.yy" -{ - yyval.etval = AST_Expression::EV_octet; - } -break; -case 154: -#line 1142 "idl.yy" -{ - yyval.etval = AST_Expression::EV_bool; - } -break; -case 155: -#line 1149 "idl.yy" -{ - yyval.etval = AST_Expression::EV_any; - } -break; -case 156: -#line 1156 "idl.yy" -{ - idl_global->set_parse_state(IDL_GlobalData::PS_StructSeen); - } -break; -case 157: -#line 1160 "idl.yy" -{ - UTL_Scope *s = idl_global->scopes()->top_non_null(); - UTL_ScopedName *n = new UTL_ScopedName(yyvsp[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 158: -#line 1184 "idl.yy" -{ - idl_global->set_parse_state(IDL_GlobalData::PS_StructSqSeen); - } -break; -case 159: -#line 1188 "idl.yy" -{ - idl_global->set_parse_state(IDL_GlobalData::PS_StructBodySeen); - } -break; -case 160: -#line 1192 "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 164: -#line 1217 "idl.yy" -{ - idl_global->set_parse_state(IDL_GlobalData::PS_MemberTypeSeen); - } -break; -case 165: -#line 1221 "idl.yy" -{ - idl_global->set_parse_state(IDL_GlobalData::PS_MemberDeclsSeen); - } -break; -case 166: -#line 1225 "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 (yyvsp[-4].dcval != NULL && AST_illegal_recursive_type(yyvsp[-4].dcval)) - idl_global->err()->error1(UTL_Error::EIDL_RECURSIVE_TYPE, yyvsp[-4].dcval); - /* - * Create a node representing a struct or exception member - * Add it to the enclosing scope - */ - else if (s != NULL && yyvsp[-4].dcval != NULL && yyvsp[-2].dlval != NULL) { - l = new UTL_DecllistActiveIterator(yyvsp[-2].dlval); - for (;!(l->is_done()); l->next()) { - d = l->item(); - if (d == NULL) - continue; - AST_Type *tp = d->compose(yyvsp[-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 167: -#line 1258 "idl.yy" -{ - idl_global->err()->syntax_error(idl_global->parse_state()); - } -break; -case 168: -#line 1262 "idl.yy" -{ - idl_global->set_parse_state(IDL_GlobalData::PS_NoState); - yyerrok; - } -break; -case 169: -#line 1270 "idl.yy" -{ - idl_global->set_parse_state(IDL_GlobalData::PS_UnionSeen); - } -break; -case 170: -#line 1274 "idl.yy" -{ - idl_global->set_parse_state(IDL_GlobalData::PS_UnionIDSeen); - } -break; -case 171: -#line 1278 "idl.yy" -{ - idl_global->set_parse_state(IDL_GlobalData::PS_SwitchSeen); - } -break; -case 172: -#line 1282 "idl.yy" -{ - idl_global->set_parse_state(IDL_GlobalData::PS_SwitchOpenParSeen); - } -break; -case 173: -#line 1286 "idl.yy" -{ - idl_global->set_parse_state(IDL_GlobalData::PS_SwitchTypeSeen); - } -break; -case 174: -#line 1290 "idl.yy" -{ - UTL_Scope *s = idl_global->scopes()->top_non_null(); - UTL_ScopedName *n = new UTL_ScopedName(yyvsp[-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 (yyvsp[-2].dcval != NULL && s != NULL) { - AST_ConcreteType *tp = AST_ConcreteType::narrow_from_decl(yyvsp[-2].dcval); - if (tp == NULL) { - idl_global->err()->not_a_type(yyvsp[-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 175: -#line 1319 "idl.yy" -{ - idl_global->set_parse_state(IDL_GlobalData::PS_UnionSqSeen); - } -break; -case 176: -#line 1323 "idl.yy" -{ - idl_global->set_parse_state(IDL_GlobalData::PS_UnionBodySeen); - } -break; -case 177: -#line 1327 "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 178: -#line 1345 "idl.yy" -{ - yyval.dcval = idl_global->scopes()->bottom()->lookup_primitive_type(yyvsp[0].etval); - } -break; -case 179: -#line 1349 "idl.yy" -{ - yyval.dcval = idl_global->scopes()->bottom()->lookup_primitive_type(yyvsp[0].etval); - } -break; -case 180: -#line 1353 "idl.yy" -{ - yyval.dcval = idl_global->scopes()->bottom()->lookup_primitive_type(yyvsp[0].etval); - } -break; -case 181: -#line 1357 "idl.yy" -{ - yyval.dcval = idl_global->scopes()->bottom()->lookup_primitive_type(yyvsp[0].etval); - } -break; -case 183: -#line 1362 "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(yyvsp[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(yyvsp[0].idlist); - } -break; -case 187: -#line 1432 "idl.yy" -{ - idl_global->set_parse_state(IDL_GlobalData::PS_UnionLabelSeen); - } -break; -case 188: -#line 1436 "idl.yy" -{ - idl_global->set_parse_state(IDL_GlobalData::PS_UnionElemSeen); - } -break; -case 189: -#line 1440 "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 = yyvsp[-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 && yyvsp[-4].llval != NULL && yyvsp[-2].ffval != NULL) { - l = new UTL_LabellistActiveIterator(yyvsp[-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 190: -#line 1468 "idl.yy" -{ - idl_global->err()->syntax_error(idl_global->parse_state()); - } -break; -case 191: -#line 1473 "idl.yy" -{ - idl_global->set_parse_state(IDL_GlobalData::PS_NoState); - yyerrok; - } -break; -case 192: -#line 1481 "idl.yy" -{ - yyval.llval = new UTL_LabelList(yyvsp[-1].ulval, yyvsp[0].llval); - } -break; -case 193: -#line 1488 "idl.yy" -{ - if (yyvsp[-1].llval == NULL) - yyval.llval = new UTL_LabelList(yyvsp[0].ulval, NULL); - else { - yyvsp[-1].llval->nconc(new UTL_LabelList(yyvsp[0].ulval, NULL)); - yyval.llval = yyvsp[-1].llval; - } - } -break; -case 194: -#line 1497 "idl.yy" -{ - yyval.llval = NULL; - } -break; -case 195: -#line 1504 "idl.yy" -{ - idl_global->set_parse_state(IDL_GlobalData::PS_DefaultSeen); - } -break; -case 196: -#line 1508 "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 197: -#line 1516 "idl.yy" -{ - idl_global->set_parse_state(IDL_GlobalData::PS_CaseSeen); - } -break; -case 198: -#line 1520 "idl.yy" -{ - idl_global->set_parse_state(IDL_GlobalData::PS_LabelExprSeen); - } -break; -case 199: -#line 1524 "idl.yy" -{ - idl_global->set_parse_state(IDL_GlobalData::PS_LabelColonSeen); - - yyval.ulval = idl_global->gen()->create_union_label(AST_UnionLabel::UL_label, - yyvsp[-2].exval); - } -break; -case 200: -#line 1534 "idl.yy" -{ - idl_global->set_parse_state(IDL_GlobalData::PS_UnionElemTypeSeen); - } -break; -case 201: -#line 1538 "idl.yy" -{ - idl_global->set_parse_state(IDL_GlobalData::PS_UnionElemDeclSeen); - /* - * Check for illegal recursive use of type - */ - if (yyvsp[-2].dcval != NULL && AST_illegal_recursive_type(yyvsp[-2].dcval)) - idl_global->err()->error1(UTL_Error::EIDL_RECURSIVE_TYPE, yyvsp[-2].dcval); - /* - * Create a field in a union branch - */ - else if (yyvsp[-2].dcval == NULL || yyvsp[0].deval == NULL) - yyval.ffval = NULL; - else { - AST_Type *tp = yyvsp[0].deval->compose(yyvsp[-2].dcval); - if (tp == NULL) - yyval.ffval = NULL; - else - yyval.ffval = idl_global->gen()->create_field(tp, - yyvsp[0].deval->name(), - idl_global->pragmas()); - } - } -break; -case 202: -#line 1564 "idl.yy" -{ - idl_global->set_parse_state(IDL_GlobalData::PS_EnumSeen); - } -break; -case 203: -#line 1568 "idl.yy" -{ - UTL_Scope *s = idl_global->scopes()->top_non_null(); - UTL_ScopedName *n = new UTL_ScopedName(yyvsp[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 204: -#line 1595 "idl.yy" -{ - idl_global->set_parse_state(IDL_GlobalData::PS_EnumSqSeen); - } -break; -case 205: -#line 1599 "idl.yy" -{ - idl_global->set_parse_state(IDL_GlobalData::PS_EnumBodySeen); - } -break; -case 206: -#line 1603 "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 208: -#line 1622 "idl.yy" -{ - idl_global->set_parse_state(IDL_GlobalData::PS_EnumCommaSeen); - } -break; -case 211: -#line 1631 "idl.yy" -{ - UTL_Scope *s = idl_global->scopes()->top_non_null(); - UTL_ScopedName *n = - new UTL_ScopedName(new Identifier(yyvsp[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 212: -#line 1655 "idl.yy" -{ - idl_global->set_parse_state(IDL_GlobalData::PS_SequenceCommaSeen); - } -break; -case 213: -#line 1659 "idl.yy" -{ - idl_global->set_parse_state(IDL_GlobalData::PS_SequenceExprSeen); - } -break; -case 214: -#line 1663 "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 (yyvsp[-2].exval == NULL || yyvsp[-2].exval->coerce(AST_Expression::EV_ulong) == NULL) { - idl_global->err()->coercion_error(yyvsp[-2].exval, AST_Expression::EV_ulong); - yyval.dcval = NULL; - } else if (yyvsp[-5].dcval == NULL) { - yyval.dcval = NULL; - } else { - AST_Type *tp = AST_Type::narrow_from_decl(yyvsp[-5].dcval); - if (tp == NULL) - yyval.dcval = NULL; - else { - yyval.dcval = idl_global->gen()->create_sequence(yyvsp[-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 215: -#line 1694 "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 (yyvsp[-1].dcval == NULL) - yyval.dcval = NULL; - else { - AST_Type *tp = AST_Type::narrow_from_decl(yyvsp[-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 216: -#line 1727 "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 217: -#line 1735 "idl.yy" -{ - idl_global->set_parse_state(IDL_GlobalData::PS_SequenceSqSeen); - } -break; -case 218: -#line 1739 "idl.yy" -{ - idl_global->set_parse_state(IDL_GlobalData::PS_SequenceTypeSeen); - yyval.dcval = yyvsp[0].dcval; - } -break; -case 219: -#line 1748 "idl.yy" -{ - idl_global->set_parse_state(IDL_GlobalData::PS_StringSqSeen); - } -break; -case 220: -#line 1752 "idl.yy" -{ - idl_global->set_parse_state(IDL_GlobalData::PS_StringExprSeen); - } -break; -case 221: -#line 1756 "idl.yy" -{ - idl_global->set_parse_state(IDL_GlobalData::PS_StringQsSeen); - /* - * Create a node representing a string - */ - if (yyvsp[-2].exval == NULL || yyvsp[-2].exval->coerce(AST_Expression::EV_ulong) == NULL) { - idl_global->err()->coercion_error(yyvsp[-2].exval, AST_Expression::EV_ulong); - yyval.dcval = NULL; - } else { - yyval.dcval = idl_global->gen()->create_string(yyvsp[-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 222: -#line 1774 "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 223: -#line 1792 "idl.yy" -{ - idl_global->set_parse_state(IDL_GlobalData::PS_StringSeen); - } -break; -case 224: -#line 1800 "idl.yy" -{ - idl_global->set_parse_state(IDL_GlobalData::PS_StringSqSeen); - } -break; -case 225: -#line 1804 "idl.yy" -{ - idl_global->set_parse_state(IDL_GlobalData::PS_StringExprSeen); - } -break; -case 226: -#line 1808 "idl.yy" -{ - idl_global->set_parse_state(IDL_GlobalData::PS_StringQsSeen); - /* - * Create a node representing a string - */ - if (yyvsp[-2].exval == NULL || yyvsp[-2].exval->coerce(AST_Expression::EV_ulong) == NULL) { - idl_global->err()->coercion_error(yyvsp[-2].exval, AST_Expression::EV_ulong); - yyval.dcval = NULL; - } else { - yyval.dcval = idl_global->gen()->create_wstring(yyvsp[-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 227: -#line 1826 "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 228: -#line 1844 "idl.yy" -{ - idl_global->set_parse_state(IDL_GlobalData::PS_StringSeen); - } -break; -case 229: -#line 1851 "idl.yy" -{ - idl_global->set_parse_state(IDL_GlobalData::PS_ArrayIDSeen); - } -break; -case 230: -#line 1855 "idl.yy" -{ - idl_global->set_parse_state(IDL_GlobalData::PS_ArrayCompleted); - /* - * Create a node representing an array - */ - if (yyvsp[0].elval != NULL) { - yyval.dcval = idl_global->gen()->create_array(new UTL_ScopedName(yyvsp[-2].idval, NULL), - yyvsp[0].elval->length(), yyvsp[0].elval); - } - } -break; -case 231: -#line 1869 "idl.yy" -{ - yyval.elval = new UTL_ExprList(yyvsp[-1].exval, yyvsp[0].elval); - } -break; -case 232: -#line 1876 "idl.yy" -{ - if (yyvsp[-1].elval == NULL) - yyval.elval = new UTL_ExprList(yyvsp[0].exval, NULL); - else { - yyvsp[-1].elval->nconc(new UTL_ExprList(yyvsp[0].exval, NULL)); - yyval.elval = yyvsp[-1].elval; - } - } -break; -case 233: -#line 1885 "idl.yy" -{ - yyval.elval = NULL; - } -break; -case 234: -#line 1892 "idl.yy" -{ - idl_global->set_parse_state(IDL_GlobalData::PS_DimSqSeen); - } -break; -case 235: -#line 1896 "idl.yy" -{ - idl_global->set_parse_state(IDL_GlobalData::PS_DimExprSeen); - } -break; -case 236: -#line 1900 "idl.yy" -{ - idl_global->set_parse_state(IDL_GlobalData::PS_DimQsSeen); - /* - * Array dimensions are expressions which must be coerced to - * positive integers - */ - if (yyvsp[-2].exval == NULL || yyvsp[-2].exval->coerce(AST_Expression::EV_ulong) == NULL) { - idl_global->err()->coercion_error(yyvsp[-2].exval, AST_Expression::EV_ulong); - yyval.exval = NULL; - } else - yyval.exval = yyvsp[-2].exval; - } -break; -case 237: -#line 1917 "idl.yy" -{ - idl_global->set_parse_state(IDL_GlobalData::PS_AttrSeen); - } -break; -case 238: -#line 1921 "idl.yy" -{ - idl_global->set_parse_state(IDL_GlobalData::PS_AttrTypeSeen); - } -break; -case 239: -#line 1925 "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 && yyvsp[-2].dcval != NULL && yyvsp[0].dlval != NULL) { - l = new UTL_DecllistActiveIterator(yyvsp[0].dlval); - for (;!(l->is_done()); l->next()) { - d = l->item(); - if (d == NULL) - continue; - AST_Type *tp = d->compose(yyvsp[-2].dcval); - if (tp == NULL) - continue; - a = idl_global->gen()->create_attribute(yyvsp[-5].bval, tp, d->name(), p); - /* - * Add one attribute to the enclosing scope - */ - (void) s->fe_add_attribute(a); - } - delete l; - } - } -break; -case 240: -#line 1959 "idl.yy" -{ - idl_global->set_parse_state(IDL_GlobalData::PS_AttrROSeen); - yyval.bval = I_TRUE; - } -break; -case 241: -#line 1964 "idl.yy" -{ - yyval.bval = I_FALSE; - } -break; -case 242: -#line 1971 "idl.yy" -{ - idl_global->set_parse_state(IDL_GlobalData::PS_ExceptSeen); - } -break; -case 243: -#line 1975 "idl.yy" -{ - UTL_Scope *s = idl_global->scopes()->top_non_null(); - UTL_ScopedName *n = new UTL_ScopedName(yyvsp[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 244: -#line 1999 "idl.yy" -{ - idl_global->set_parse_state(IDL_GlobalData::PS_ExceptSqSeen); - } -break; -case 245: -#line 2003 "idl.yy" -{ - idl_global->set_parse_state(IDL_GlobalData::PS_ExceptBodySeen); - } -break; -case 246: -#line 2007 "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 247: -#line 2019 "idl.yy" -{ - idl_global->set_parse_state(IDL_GlobalData::PS_OpTypeSeen); - } -break; -case 248: -#line 2023 "idl.yy" -{ - UTL_Scope *s = idl_global->scopes()->top_non_null(); - UTL_ScopedName *n = - new UTL_ScopedName(new Identifier(yyvsp[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 && yyvsp[-2].dcval != NULL) { - AST_Type *tp = AST_Type::narrow_from_decl(yyvsp[-2].dcval); - if (tp == NULL) { - idl_global->err()->not_a_type(yyvsp[-2].dcval); - } else if (tp->node_type() == AST_Decl::NT_except) { - idl_global->err()->not_a_type(yyvsp[-2].dcval); - } else { - o = idl_global->gen()->create_operation(tp, yyvsp[-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 249: -#line 2052 "idl.yy" -{ - idl_global->set_parse_state(IDL_GlobalData::PS_OpParsCompleted); - } -break; -case 250: -#line 2056 "idl.yy" -{ - idl_global->set_parse_state(IDL_GlobalData::PS_OpRaiseCompleted); - } -break; -case 251: -#line 2060 "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 (yyvsp[-2].nlval != NULL && o != NULL) - (void) o->fe_add_exceptions(yyvsp[-2].nlval); - if (yyvsp[0].slval != NULL) - (void) o->fe_add_context(yyvsp[0].slval); - } - /* - * Done with this operation. Pop its scope from the scopes stack - */ - idl_global->scopes()->pop(); - } -break; -case 252: -#line 2085 "idl.yy" -{ - idl_global->set_parse_state(IDL_GlobalData::PS_OpAttrSeen); - yyval.ofval = AST_Operation::OP_oneway; - } -break; -case 253: -#line 2090 "idl.yy" -{ - idl_global->set_parse_state(IDL_GlobalData::PS_OpAttrSeen); - yyval.ofval = AST_Operation::OP_idempotent; - } -break; -case 254: -#line 2095 "idl.yy" -{ - yyval.ofval = AST_Operation::OP_noflags; - } -break; -case 256: -#line 2103 "idl.yy" -{ - yyval.dcval = - idl_global->scopes()->bottom() - ->lookup_primitive_type(AST_Expression::EV_void); - } -break; -case 257: -#line 2112 "idl.yy" -{ - idl_global->set_parse_state(IDL_GlobalData::PS_OpSqSeen); - } -break; -case 258: -#line 2116 "idl.yy" -{ - idl_global->set_parse_state(IDL_GlobalData::PS_OpQsSeen); - } -break; -case 259: -#line 2120 "idl.yy" -{ - idl_global->set_parse_state(IDL_GlobalData::PS_OpSqSeen); - } -break; -case 260: -#line 2125 "idl.yy" -{ - idl_global->set_parse_state(IDL_GlobalData::PS_OpQsSeen); - } -break; -case 262: -#line 2135 "idl.yy" -{ - idl_global->set_parse_state(IDL_GlobalData::PS_OpParCommaSeen); - } -break; -case 265: -#line 2144 "idl.yy" -{ - idl_global->set_parse_state(IDL_GlobalData::PS_OpParDirSeen); - } -break; -case 266: -#line 2148 "idl.yy" -{ - idl_global->set_parse_state(IDL_GlobalData::PS_OpParTypeSeen); - } -break; -case 267: -#line 2152 "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 (yyvsp[-2].dcval != NULL && yyvsp[0].deval != NULL && s != NULL) { - AST_Type *tp = yyvsp[0].deval->compose(yyvsp[-2].dcval); - if (tp != NULL) { - a = idl_global->gen()->create_argument(yyvsp[-4].dival, tp, yyvsp[0].deval->name(), p); - (void) s->fe_add_argument(a); - } - } - } -break; -case 268: -#line 2174 "idl.yy" -{ - yyval.dcval = idl_global->scopes()->bottom()->lookup_primitive_type(yyvsp[0].etval); - } -break; -case 270: -#line 2179 "idl.yy" -{ - UTL_Scope *s = idl_global->scopes()->top_non_null(); - AST_Decl *d = NULL; - - if (s != NULL) - d = s->lookup_by_name(yyvsp[0].idlist, I_TRUE); - if (d == NULL) - idl_global->err()->lookup_error(yyvsp[0].idlist); - yyval.dcval = d; - } -break; -case 271: -#line 2193 "idl.yy" -{ - yyval.dival = AST_Argument::dir_IN; - } -break; -case 272: -#line 2197 "idl.yy" -{ - yyval.dival = AST_Argument::dir_OUT; - } -break; -case 273: -#line 2201 "idl.yy" -{ - yyval.dival = AST_Argument::dir_INOUT; - } -break; -case 274: -#line 2208 "idl.yy" -{ - idl_global->set_parse_state(IDL_GlobalData::PS_OpRaiseSeen); - } -break; -case 275: -#line 2212 "idl.yy" -{ - idl_global->set_parse_state(IDL_GlobalData::PS_OpRaiseSqSeen); - } -break; -case 276: -#line 2217 "idl.yy" -{ - idl_global->set_parse_state(IDL_GlobalData::PS_OpRaiseQsSeen); - yyval.nlval = yyvsp[-1].nlval; - } -break; -case 277: -#line 2222 "idl.yy" -{ - yyval.nlval = NULL; - } -break; -case 278: -#line 2229 "idl.yy" -{ - idl_global->set_parse_state(IDL_GlobalData::PS_OpContextSeen); - } -break; -case 279: -#line 2233 "idl.yy" -{ - idl_global->set_parse_state(IDL_GlobalData::PS_OpContextSqSeen); - } -break; -case 280: -#line 2238 "idl.yy" -{ - idl_global->set_parse_state(IDL_GlobalData::PS_OpContextQsSeen); - yyval.slval = yyvsp[-1].slval; - } -break; -case 281: -#line 2243 "idl.yy" -{ - yyval.slval = NULL; - } -break; -case 282: -#line 2250 "idl.yy" -{ - yyval.slval = new UTL_StrList(yyvsp[-1].sval, yyvsp[0].slval); - } -break; -case 283: -#line 2258 "idl.yy" -{ - idl_global->set_parse_state(IDL_GlobalData::PS_OpContextCommaSeen); - } -break; -case 284: -#line 2262 "idl.yy" -{ - if (yyvsp[-3].slval == NULL) - yyval.slval = new UTL_StrList(yyvsp[0].sval, NULL); - else { - yyvsp[-3].slval->nconc(new UTL_StrList(yyvsp[0].sval, NULL)); - yyval.slval = yyvsp[-3].slval; - } - } -break; -case 285: -#line 2271 "idl.yy" -{ - yyval.slval = NULL; - } -break; -#line 3286 "y.tab.c" - } - yyssp -= yym; - yystate = *yyssp; - yyvsp -= yym; - yym = yylhs[yyn]; - if (yystate == 0 && yym == 0) - { -#ifdef YYDEBUG - if (5 < yydebug) - printf("yydebug: after reduction, shifting from state 0 to\ - state %d\n", YYFINAL); -#endif - yystate = YYFINAL; - *++yyssp = YYFINAL; - *++yyvsp = yyval; - if (yychar < 0) - { - if ((yychar = yylex()) < 0) yychar = 0; -#if YYDEBUG - if (yydebug) - { - yys = 0; - if (yychar <= YYMAXTOKEN) yys = yyname[yychar]; - if (!yys) yys = "illegal-symbol"; - if (5 < yydebug) - printf("yydebug: state %d, reading %d (%s)\n", - YYFINAL, yychar, yys); - else - YYDEBUG_LOOK_AHEAD(YYFINAL, yychar, yys, yyssp-yyss); - } -#endif - } - if (yychar == 0) goto yyaccept; - goto yyloop; - } - if ((yyn = yygindex[yym]) && (yyn += yystate) >= 0 && - yyn <= YYTABLESIZE && yycheck[yyn] == yystate) - yystate = yytable[yyn]; - else - yystate = yydgoto[yym]; -#ifdef YYDEBUG - if (5 < yydebug) - printf("yydebug: after reduction, shifting from state %d \ -to state %d\n", *yyssp, yystate); -#endif - if (yyssp >= yyss + yystacksize - 1) - { - goto yyoverflow; - } - *++yyssp = yystate; - *++yyvsp = yyval; - goto yyloop; -yyoverflow: - yyerror("yacc stack overflow"); -yyabort: - return (1); -yyaccept: - return (0); -} diff --git a/TAO/TAO_IDL/fe/y.tab.cpp.diff b/TAO/TAO_IDL/fe/y.tab.cpp.diff deleted file mode 100644 index 8f29bff9c8b..00000000000 --- a/TAO/TAO_IDL/fe/y.tab.cpp.diff +++ /dev/null @@ -1,127 +0,0 @@ ---- y.tab.cpp.orig Fri Jan 23 11:09:05 1998 -+++ y.tab.cpp Fri Jan 23 11:08:33 1998 -@@ -97,13 +97,13 @@ - - #ifdef __STDC__ - #include <stdlib.h> --#include <string.h> -+// #include <string.h> - #else - #include <malloc.h> - #include <memory.h> - #endif - --#include <values.h> -+// #include <values.h> - - #ifdef __cplusplus - -@@ -494,52 +494,52 @@ - - 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_NATIVE", 292, -- "IDL_INTEGER_LITERAL", 293, -- "IDL_STRING_LITERAL", 294, -- "IDL_CHARACTER_LITERAL", 295, -- "IDL_FLOATING_PT_LITERAL", 296, -- "IDL_TRUETOK", 297, -- "IDL_FALSETOK", 298, -- "IDL_SCOPE_DELIMITOR", 299, -- "IDL_LEFT_SHIFT", 300, -- "IDL_RIGHT_SHIFT", 301, -- "-unknown-", -1 /* ends search */ -+ {"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_NATIVE", 292}, -+ {"IDL_INTEGER_LITERAL", 293}, -+ {"IDL_STRING_LITERAL", 294}, -+ {"IDL_CHARACTER_LITERAL", 295}, -+ {"IDL_FLOATING_PT_LITERAL", 296}, -+ {"IDL_TRUETOK", 297}, -+ {"IDL_FALSETOK", 298}, -+ {"IDL_SCOPE_DELIMITOR", 299}, -+ {"IDL_LEFT_SHIFT", 300}, -+ {"IDL_RIGHT_SHIFT", 301}, -+ {"-unknown-", -1} /* ends search */ - }; - - char * yyreds[] = -@@ -837,7 +837,9 @@ - * 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 diff --git a/TAO/TAO_IDL/fe/y.tab.h b/TAO/TAO_IDL/fe/y.tab.h deleted file mode 100644 index 8c197aab46b..00000000000 --- a/TAO/TAO_IDL/fe/y.tab.h +++ /dev/null @@ -1,77 +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_NATIVE 292 -# define IDL_INTEGER_LITERAL 293 -# define IDL_STRING_LITERAL 294 -# define IDL_CHARACTER_LITERAL 295 -# define IDL_FLOATING_PT_LITERAL 296 -# define IDL_TRUETOK 297 -# define IDL_FALSETOK 298 -# define IDL_SCOPE_DELIMITOR 299 -# define IDL_LEFT_SHIFT 300 -# define IDL_RIGHT_SHIFT 301 |