summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Mitz <mitza@objectcomputing.com>2019-01-04 16:34:35 -0800
committerGitHub <noreply@github.com>2019-01-04 16:34:35 -0800
commit8bc095556b48dabfd29989936186d158fc835236 (patch)
tree9c1ede7d1a919af3c26dd70c6105a60a4c719363
parente16c38577de257efc1802016add191446e81b20b (diff)
parenta4933207212e4ea0958fc1d77d897613fa75b0d7 (diff)
downloadATCD-8bc095556b48dabfd29989936186d158fc835236.tar.gz
Merge pull request #723 from iguessthislldo/igtd/xtypes
Annotation support in the tao_idl front end
-rw-r--r--TAO/TAO_IDL/.gitignore1
-rw-r--r--TAO/TAO_IDL/INSTALL.sun186
-rw-r--r--TAO/TAO_IDL/README.md17
-rw-r--r--TAO/TAO_IDL/README.sun245
-rw-r--r--TAO/TAO_IDL/ast/ast_annotation_appl.cpp179
-rw-r--r--TAO/TAO_IDL/ast/ast_annotation_decl.cpp114
-rw-r--r--TAO/TAO_IDL/ast/ast_annotation_member.cpp109
-rw-r--r--TAO/TAO_IDL/ast/ast_array.cpp15
-rw-r--r--TAO/TAO_IDL/ast/ast_decl.cpp177
-rw-r--r--TAO/TAO_IDL/ast/ast_enum.cpp13
-rw-r--r--TAO/TAO_IDL/ast/ast_enum_val.cpp12
-rw-r--r--TAO/TAO_IDL/ast/ast_expression.cpp123
-rw-r--r--TAO/TAO_IDL/ast/ast_field.cpp19
-rw-r--r--TAO/TAO_IDL/ast/ast_generator.cpp31
-rw-r--r--TAO/TAO_IDL/ast/ast_module.cpp7
-rw-r--r--TAO/TAO_IDL/ast/ast_sequence.cpp26
-rw-r--r--TAO/TAO_IDL/ast/ast_structure.cpp43
-rw-r--r--TAO/TAO_IDL/ast/ast_typedef.cpp41
-rw-r--r--TAO/TAO_IDL/ast/ast_union.cpp26
-rw-r--r--TAO/TAO_IDL/ast/ast_union_branch.cpp9
-rw-r--r--TAO/TAO_IDL/ast/ast_visitor.cpp5
-rw-r--r--TAO/TAO_IDL/be/be_global.cpp81
-rw-r--r--TAO/TAO_IDL/be/be_init.cpp2
-rw-r--r--TAO/TAO_IDL/be/be_visitor_ami_pre_proc.cpp9
-rw-r--r--TAO/TAO_IDL/be/be_visitor_scope.cpp5
-rw-r--r--TAO/TAO_IDL/be/be_visitor_union/union.cpp12
-rw-r--r--TAO/TAO_IDL/be_include/be_global.h4
-rw-r--r--TAO/TAO_IDL/docs/ANNOUNCEMENT131
-rw-r--r--TAO/TAO_IDL/docs/CHANGES122
-rw-r--r--TAO/TAO_IDL/docs/README.md54
-rw-r--r--TAO/TAO_IDL/docs/WRITING_A_BE5
-rw-r--r--TAO/TAO_IDL/docs/annotations.md502
-rw-r--r--TAO/TAO_IDL/docs/historical/ANNOUNCEMENT (renamed from TAO/TAO_IDL/ANNOUNCEMENT)0
-rw-r--r--TAO/TAO_IDL/docs/historical/BUG_REPORT (renamed from TAO/TAO_IDL/docs/BUG_REPORT)0
-rw-r--r--TAO/TAO_IDL/docs/historical/CHANGES (renamed from TAO/TAO_IDL/CHANGES)0
-rw-r--r--TAO/TAO_IDL/docs/historical/CLI (renamed from TAO/TAO_IDL/docs/CLI)0
-rw-r--r--TAO/TAO_IDL/docs/historical/INSTALL (renamed from TAO/TAO_IDL/docs/INSTALL)0
-rw-r--r--TAO/TAO_IDL/docs/historical/PROBLEMS (renamed from TAO/TAO_IDL/docs/PROBLEMS)0
-rw-r--r--TAO/TAO_IDL/docs/historical/README (renamed from TAO/TAO_IDL/docs/README)0
-rw-r--r--TAO/TAO_IDL/docs/historical/ROADMAP (renamed from TAO/TAO_IDL/docs/ROADMAP)0
-rw-r--r--TAO/TAO_IDL/driver/drv_args.cpp452
-rw-r--r--TAO/TAO_IDL/fe/fe_extern.cpp11
-rw-r--r--TAO/TAO_IDL/fe/fe_lookup.cpp2
-rw-r--r--TAO/TAO_IDL/fe/idl.ll6
-rw-r--r--TAO/TAO_IDL/fe/idl.tab.cpp5708
-rw-r--r--TAO/TAO_IDL/fe/idl.tab.hpp25
-rw-r--r--TAO/TAO_IDL/fe/idl.ypp1395
-rw-r--r--TAO/TAO_IDL/fe/idl.yy.cpp1328
-rw-r--r--TAO/TAO_IDL/fe/lookup_starter.txt3
-rw-r--r--TAO/TAO_IDL/fe/post_flex.sed10
-rw-r--r--TAO/TAO_IDL/fe/post_gperf.sed2
-rw-r--r--TAO/TAO_IDL/include/ast_annotation_appl.h112
-rw-r--r--TAO/TAO_IDL/include/ast_annotation_decl.h60
-rw-r--r--TAO/TAO_IDL/include/ast_annotation_member.h69
-rw-r--r--TAO/TAO_IDL/include/ast_array.h15
-rw-r--r--TAO/TAO_IDL/include/ast_concrete_type.h2
-rw-r--r--TAO/TAO_IDL/include/ast_constant.h2
-rw-r--r--TAO/TAO_IDL/include/ast_decl.h126
-rw-r--r--TAO/TAO_IDL/include/ast_enum.h2
-rw-r--r--TAO/TAO_IDL/include/ast_enum_val.h13
-rw-r--r--TAO/TAO_IDL/include/ast_expression.h13
-rw-r--r--TAO/TAO_IDL/include/ast_field.h12
-rw-r--r--TAO/TAO_IDL/include/ast_generator.h16
-rw-r--r--TAO/TAO_IDL/include/ast_module.h6
-rw-r--r--TAO/TAO_IDL/include/ast_sequence.h13
-rw-r--r--TAO/TAO_IDL/include/ast_structure.h13
-rw-r--r--TAO/TAO_IDL/include/ast_typedef.h12
-rw-r--r--TAO/TAO_IDL/include/ast_union.h13
-rw-r--r--TAO/TAO_IDL/include/ast_union_branch.h2
-rw-r--r--TAO/TAO_IDL/include/ast_visitor.h2
-rw-r--r--TAO/TAO_IDL/include/fe_declarator.h2
-rw-r--r--TAO/TAO_IDL/include/fe_extern.h29
-rw-r--r--TAO/TAO_IDL/include/idl_defines.h36
-rw-r--r--TAO/TAO_IDL/include/idl_global.h264
-rw-r--r--TAO/TAO_IDL/include/idl_version.h114
-rw-r--r--TAO/TAO_IDL/include/utl_annotations.h26
-rw-r--r--TAO/TAO_IDL/include/utl_err.h70
-rw-r--r--TAO/TAO_IDL/include/utl_identifier.h23
-rw-r--r--TAO/TAO_IDL/include/utl_idlist.h11
-rw-r--r--TAO/TAO_IDL/include/utl_scope.h12
-rw-r--r--TAO/TAO_IDL/narrow/narrow.cpp6
-rwxr-xr-xTAO/TAO_IDL/regen.pl16
-rwxr-xr-xTAO/TAO_IDL/regen.sh6
-rw-r--r--TAO/TAO_IDL/tao_idl.cpp84
-rw-r--r--TAO/TAO_IDL/tao_idl_fe.mpc28
-rw-r--r--TAO/TAO_IDL/util/idl_version.cpp96
-rw-r--r--TAO/TAO_IDL/util/utl_annotations.cpp46
-rw-r--r--TAO/TAO_IDL/util/utl_err.cpp561
-rw-r--r--TAO/TAO_IDL/util/utl_global.cpp106
-rw-r--r--TAO/TAO_IDL/util/utl_identifier.cpp91
-rw-r--r--TAO/TAO_IDL/util/utl_idlist.cpp82
-rw-r--r--TAO/TAO_IDL/util/utl_scope.cpp44
-rw-r--r--TAO/bin/tao_orb_tests.lst1
-rw-r--r--TAO/docs/compiler.html90
-rw-r--r--TAO/orbsvcs/IFR_Service/be_global.cpp57
-rw-r--r--TAO/orbsvcs/IFR_Service/be_global.h2
-rw-r--r--TAO/orbsvcs/tests/Notify/MC/.gitignore1
-rw-r--r--TAO/tests/IDL_Test/.gitignore464
-rw-r--r--TAO/tests/IDLv4/README.md3
-rw-r--r--TAO/tests/IDLv4/TestIDLv4.idl111
-rw-r--r--TAO/tests/IDLv4/annotations/.gitignore1
-rw-r--r--TAO/tests/IDLv4/annotations/README.md5
-rw-r--r--TAO/tests/IDLv4/annotations/annotest_idl.cpp1
-rw-r--r--TAO/tests/IDLv4/annotations/annotest_idl.mpc6
-rw-r--r--TAO/tests/IDLv4/annotations/be_extern.h16
-rw-r--r--TAO/tests/IDLv4/annotations/be_global.cpp38
-rw-r--r--TAO/tests/IDLv4/annotations/be_global.h23
-rw-r--r--TAO/tests/IDLv4/annotations/be_init.cpp1230
-rw-r--r--TAO/tests/IDLv4/annotations/be_produce.cpp21
-rw-r--r--TAO/tests/IDLv4/annotations/be_util.cpp29
-rw-r--r--TAO/tests/IDLv4/annotations/be_util.h25
-rw-r--r--TAO/tests/IDLv4/annotations/drv_args.cpp1
-rw-r--r--TAO/tests/IDLv4/annotations/drv_prepoc.cpp1
-rwxr-xr-xTAO/tests/IDLv4/annotations/run_test.pl31
114 files changed, 9453 insertions, 6227 deletions
diff --git a/TAO/TAO_IDL/.gitignore b/TAO/TAO_IDL/.gitignore
index 9ea5275509d..7259a262bc8 100644
--- a/TAO/TAO_IDL/.gitignore
+++ b/TAO/TAO_IDL/.gitignore
@@ -1 +1,2 @@
/tao_idl
+/fe/idl.output
diff --git a/TAO/TAO_IDL/INSTALL.sun b/TAO/TAO_IDL/INSTALL.sun
deleted file mode 100644
index 2b26b7fb597..00000000000
--- a/TAO/TAO_IDL/INSTALL.sun
+++ /dev/null
@@ -1,186 +0,0 @@
-========================================
-
-This file contains the original INSTALL file that came with the
-SunSoft IDL compiler release. This information in this file is
-historical in nature and the much of the specific information probably
-is inaccurate with respect to the current state of TAO IDL. Please
-see the ../TAO-INSTALL.html documentation that comes with TAO for
-up-to-date information on the installation process.
-
-Specifically, some of the files referred to below have been renamed in
-TAO IDL.
-
-INTERFACE DEFINITION LANGUAGE INSTALLATION GUIDE
--==============================================-
-
-INTRODUCTION
-
-This file describes the installation process for OMG_IDL_CFE version 1.3.
-This file explains how to:
-
-- install the source code
-- modify the sources to customize them for different configurations
-- modify the sources to implement your own back end
-
-TESTED CONFIGURATIONS
-
-This release has been tested and is believed to operate correctly on:
-- SunPro Sparcworks 2.x and 3.0 on SunOS 4.1.x
-- SunPro Sparcworks 2.x and 3.0 on Solaris 2.3
-- g++ 2.5.8 on SunOS 4.1.x
-- g++ 2.5.8 on Solaris 2.3
-
-This is the first release of OMG IDL CFE which is preconfigured to compile
-correctly for Solaris 2.x and with SunPro SparcWorks compilers.
-
-CUSTOMIZATION
-
-The release contains a file idl_make_vars in the current directory,
-which is included in each Makefile. This file defines all the
-customizable variables for the CFE.
-
-OSV should be set to a string denoting the operating system upon which
-you wish to build the CFE. The CFE as shipped is preconfigured to
-compile correctly on Solaris 2.x (OSV=SOLARIS2), and has also been
-tested on SunOS 4.1.x (OSV=SUNOS4). It contains code donated by HP
-which enables it to be compiled on Apollo Domain systems (OSV=apollo)
-and HPUX systems (OSV=hpux), but these two configurations have not
-been tested.
-
-C++ and CCC should be set to identify the C++ compiler you will use to
-compile this release. Their values should be identical. Both are set
-to address differences between various make programs - some predefine
-CCC, others use C++ to denote the C++ compiler. The possible values
-are CC (which uses the Sparcworks compilers on SunOS 4.1 and Solaris
-2.3) and g++, which uses the installed version of GNU C++.
-
-CCFLAGS should be set to a list of flags to pass to the C++
-compiler. As shipped, this list is -g. NOTE: We have not extensively
-tested the release with optimization turned on.
-
-CPP_FLAGS should be set to a list of flags to pass to the C++
-preprocessor. Use this variable to enable or disable specific
-customizations you make to the BE or CFE sources.
-
-YFLAGS should be set to a list of flags to pass to the Yacc
-program. As shipped, the list is -d -t, which causes Yacc to generate
-y.tab.h and y.tab.c files.
-
-LEXFLAGS should be set to a list of flags to pass to the Lex
-program. As shipped, the list -t.
-
-RANLIB should be set to the location of the ranlib program on your
-system. As shipped this is ranlib. If your system has no ranlib you
-can set this variable to ':' or /bin/true. As shipped the variable is
-preset to /bin/true since Solaris 2.x does not use ranlib.
-
-AR should be set to the location of the ar program on your system. As
-shipped this is ar. If your system has a different mechanism for
-creating libraries, you should modify the value of this variable
-accordingly.
-
-ARFLAGS should be set to the flags to be passed to the ar program. As
-shipped this is 'crv'.
-
-INSTALLATION
-
-a. Disk space requirements
-
-This distribution requires approximately 350 KBytes when
-compressed. When uncompressed, untarred and compiled, approximately 10
-MBytes of disk space are consumed on a Sun 4.
-
-b. Getting the software
-
-Use anonymous FTP to omg.org and supply your e-mail address as
-password. Change directories to pub/OMG_IDL_CFE_1.3, set bin and get
-the compressed tar file OMG_IDL_CFE_1.3.tar.Z.
-
-The distribution may, in the future, be made available from other
-archives on the Internet. However, omg.org will always have the most
-up-to-date version of this software.
-
-After transferring this file, uncompress it and untar it in a
-directory of your choice.
-
-c. Compiling it
-
-If you are using a Sparcstation running Solaris 2.x and have the
-SunPro Sparcworks compilers installed, you may directly install the
-software. If your hardware or operating system configurations are
-different, read and follow the instructions in the previous section
-first.
-
-At the root directory of the release, issue
-
- % make
-
-or
-
- % make all
-
-This will compile the provided sources and the sources found in the be
-directory. Executing this make target causes 'make all' to be invoked
-in each subdirectory, resulting in building the libraries for each
-component and finally a link step producing an executable IDL
-compiler.
-
-In order to make only the compiler front end components, without
-compiling the sources found in the be directory and without building
-an executable, issue
-
- % make libs
-
-This will build the libraries in the ast, fe, util, driver and narrow
-directories. To build only the be, issue
-
- % make be
-
-To build all libraries without creating an executable, issue
-
- % make all_libs
-
-To remove all files created by the build process, issue
-
- % make clean
-
-This will not remove any files created by Yacc and Lex, because you
-may be using the ones provided in the distribution (see below).
-
-d. Yacc and Lex
-
-Some installations may not have a C++ aware Yacc and Lex
-processor. For these installations, we have included the output of
-yacc and lex in the release. If you need to use these files to build
-the release because you don't have access to a C++ capable Yacc or
-Lex, go to the "fe" directory, issue the command:
-
- % touch lex.yy.cc y.tab.cc y.tab.hh
-
-This will ensure that the processed files appear to be newer than the
-source files they were produced from and will cause "make" to skip
-their production.
-
-NOTE: The files provided in the distribution have been produced on
-Solaris 2.3 and may contain OS-specific #include directives. If you
-intend to use these files, you may have to edit them to make them work
-in your environment. The provided files are known to compile cleanly
-without modification with both SunPro Sparcworks compilers and GNU C++
-on both SunOS 4.1 and Solaris 2.3. We have not tested the grammar and
-lexer input files with bison or flex.
-
-IMPLEMENTING A BACK END
-
-To implement your own back end, you can start with the provided
-sources in the be directory and modify them. The Makefile understands
-the 'make all' target and will generate libbe.a in the demo_be
-directory. As set up, the variable CPP_FLAGS allows you to place
-include files either in the current directory or in the include
-directory. Alternatively, you can place your include files in a new
-directory and modify CPP_FLAGS to cause the C++ preprocessor to search
-this new directory for referenced include files, by adding a new -I
-directive.
-
-Additional detail on the structure and function of back ends, and on
-the protocol which a back end must implement, are found in the
-document entitled WRITING_A_BE.
diff --git a/TAO/TAO_IDL/README.md b/TAO/TAO_IDL/README.md
new file mode 100644
index 00000000000..7d76776c803
--- /dev/null
+++ b/TAO/TAO_IDL/README.md
@@ -0,0 +1,17 @@
+# TAO\_IDL
+
+TAO\_IDL/`tao_idl` is TAO's Interface Description Language (IDL) compiler. It
+is based on Sun Microsystems' OMG IDL Compiler Front End (CFE) version 1.3,
+which was released in 1994. It implements most IDL v3 features and, starting
+with TAO 2.5.4, some features from IDL v4.
+
+## User Documentation
+
+User documentation on using TAO\_IDL can be found at
+[../docs/compiler.html](../docs/compiler.html).
+
+## Developer Documentation
+
+For developers either making use of TAO\_IDL in a downstream compiler or
+contributing to TAO\_IDL, documentation can be found at
+[docs/README.md](docs/README.md).
diff --git a/TAO/TAO_IDL/README.sun b/TAO/TAO_IDL/README.sun
deleted file mode 100644
index b2b6e20d3d5..00000000000
--- a/TAO/TAO_IDL/README.sun
+++ /dev/null
@@ -1,245 +0,0 @@
-========================================
-
-This file contains the original README file that came with the SunSoft
-IDL compiler release. This information in this file is historical in
-nature and the much of the specific information probably is inaccurate
-with respect to the current state of TAO IDL. Please see the
-../docs/index.html documentation that comes with TAO for up-to-date
-information on TAO IDL compiler design and implementation.
-
-Specifically, some of the files referred to below have been renamed in
-TAO IDL.
-
-INTERFACE DEFINITION LANGUAGE COMPILER FRONT END
--==============================================-
-
-INTRODUCTION
-
-Welcome to the publicly available source release of SunSoft's
-implementation of the compiler front end (CFE) for OMG Interface Definition
-Language! This is Release 1.3 of the CFE.
-
-The Interface Definition Language (IDL) implementation is divided into
-three parts:
-
-- A main program for driving the compilation process
-- A parser and attendant utilities
-- One or more back ends (BEs) for taking the processed input and producing
- output in a target language and target format
-
-WARNINGS
-
-This is a preliminary version. This software is made available AS IS and
-WITH NO GUARANTEES. Please read the copyright notice attached at the
-bottom of this file.
-
-IMPORTANT NOTICE FOR USERS OF OMG IDL CFE VERSION 1.2.
-
-Please carefully read the file CHANGES to obtain IMPORTANT INFORMATION on
-changes in that may affect the manner in which a BE is constructed. You
-must follow instructions contained in the file CHANGES to obtain a
-functional BE if you are migrating an existing BE from OMG IDL CFE v. 1.2.
-
-TARGET AUDIENCE
-
-Who should use this release?
-
-- You can use this source release to create a stand alone parser for OMG
- Interface Definition Language. This may be useful to verify the legality
- of IDL input.
-- Developers of OMG Interface Definition Language compilers should use this
- release as a basis for writing their back ends, to obtain a common
- framework for their compiler and to provide portable and uniform
- parsing of IDL input.
-
-HOW TO OBTAIN THIS SOFTWARE
-
-Please use anonymous FTP to omg.org and supply your e-mail address as the
-password. Then change directories to pub/OMG_IDL_CFE_1.3, set binary transfer
-and get the file OMG_IDL_CFE_1.3.TAR.Z. This file includes copies of all
-individual documentation files in the directory.
-
-Precompiled binaries constructed from the sources in this release will be
-made available shortly, in the directory pub/OMG_IDL_CFE_1.3/bin. These
-binaries are useful for parsing IDL source and for learning about the
-language. Precompiled binaries for Solaris 2.x and for SunOS 4.x will be
-provided.
-
-You can also use the mail server program to retrieve this software. Send
-email with the subject 'help' to omg_idl@omg.org, and the mail server will
-respond with instructions on how to retrieve the software.
-
-Copies of this software may be made available from archives other than
-omg.org. New versions made available by Sun will be placed on omg.org and a
-message will be sent to this newsgroup announcing its availability.
-
-Finally, the SunSoft OMG IDL CFE is also available on magnetic tape for a
-nominal media charge directly from SunSoft. Please refer to part number
-DIDL-100-STP when ordering.
-
-CONTACT POINT
-
-Please let us know who you are if you decide to use this software, and how
-you use it. Please send e-mail to:
-
- idl-cfe@sun.com
-
-This address can also be used to report problems, bugs, suggestions and
-send general comments.
-
-WHAT IS PROVIDED IN THE RELEASE
-
-Provided in this release are:
-
-- A main program for driving an Interface Definition Language compiler
-- A parser for the Interface Definition Language grammar which builds an
- internal representation of the input parsed. This internal
- representation, named an Abstract Syntax Tree (AST), is used as input to
- a back end
-- Some utility functions used by the parser
-- A demonstration back end (BE) which exercises the front end but produces
- no translated output
-- Documentation of the public interfaces and of the contract between
- the compiler front end and a back end
-
-OPERATION
-
-A complete compiler operates in two passes:
-
-- The first pass, provided in this release, parses the IDL input and
- produces an internal representation, called an Abstract Syntax Tree (AST).
- This pass also does a complete syntax and semantics check of the input
- provided to ensure that exactly legal IDL input is accepted. If a syntax
- or semantic error is discovered, the second pass is not invoked.
-- The second pass, provided by compiler developers, takes the AST and
- produces output in the language and format of choice. A demonstration
- back end is provided in the release.
-
-HOW TO USE THIS SOFTWARE
-
-To create a complete compiler from OMG Interface Definition Language to a
-target language, compiler developers will:
-
-- Write a back end (BE) to take the internal representation of the input
- parsed and translate it to the target language and format. You will
- probably want to replace the BE directory in this source tree with your
- own BE directory
-- Link the BE with the sources provided here to produce a complete
- compiler.
-
-DOCUMENTATION
-
-The OMG Interface Definition Language is fully described in the CORBA
-documentation, Chapter 4. This document may be obtained from OMG.
-
-This release also provides the following documents:
-
-- This README file, describing the release
-- INSTALL, describing installation of the software
-- WRITING_A_BE contains all the information needed to start writing a back
- end for this distribution
-- CHANGES_IN_AST describes changes that affect migration of BEs written
- against version 1.2 to version 1.3.
-- CLI, describing the command line interface to the CFE
-- ROADMAP, describing the directory structure for the source code. This
- file will assist a developer in understanding the structure of the code
- and navigating it
-- PROBLEMS, describing a list of issues that may be addressed in future
- releases
-- BUG_REPORT, containing a form for use in reporting bugs and problems
- with the IDL CFE
-
-ENVIRONMENT
-
-The INSTALL file explains how to customize the software for specific
-platforms. The source distribution expects the following environment:
-
-- Sparcstation 1, 2, or 10 hardware
-- SunPro SparcWorks 3.x or 4.0
-
-As preconfigured, it compiles on Solaris 2.x. It can be reconfigured to
-compile on SunOS 4.x, HPUX or Apollo Domain OS. As far as is known, no use
-is made of Sun Make-specific features, and the Makefiles should be usable
-with other make programs.
-
-This release has been tested and is believed to operate correctly with:
-- SunPro Sparcworks 2.x and 3.0 on SunOS 4.1.x
-- SunPro Sparcworks 2.x and 3.0 on Solaris 2.3
-- g++ 2.5.8 on SunOS 4.1.x
-- g++ 2.5.8 on Solaris 2.3
-
-INSTALLATION
-
-This release is targetted for Sun workstations running Solaris 2.x. The
-process of installing this software is described in detail in the file
-INSTALL in this directory. The INSTALL file also describes how to customize
-the release for your own environment if it is different.
-
-KNOWN PROBLEMS
-
-A list of known deficiencies is provided in the file PROBLEMS in this
-directory. If you find a problem which is not mentioned in it, please
-report it as described below. Please read this file now to be apprised of
-the problems found so far with this release.
-
-COPYRIGHT
-
-This copyright notice appears on all files. Please read it!
-
-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.
diff --git a/TAO/TAO_IDL/ast/ast_annotation_appl.cpp b/TAO/TAO_IDL/ast/ast_annotation_appl.cpp
new file mode 100644
index 00000000000..5dd5469d5db
--- /dev/null
+++ b/TAO/TAO_IDL/ast/ast_annotation_appl.cpp
@@ -0,0 +1,179 @@
+#include "ast_annotation_appl.h"
+#include "ast_annotation_member.h"
+
+AST_Annotation_Appl::Param::Param ()
+ : used (false)
+{
+}
+
+AST_Decl::NodeType const AST_Annotation_Appl::NT = AST_Decl::NT_annotation_appl;
+
+AST_Annotation_Appl::AST_Annotation_Appl (
+ UTL_ScopedName *name, AST_Annotation_Appl::Params *params)
+ : AST_Decl (NT, name),
+ AST_Type (NT, name),
+ AST_ConcreteType (NT, name),
+ UTL_Scope (NT),
+ AST_Structure (name, false, false),
+ AST_Annotation_Decl (name),
+ original_name_ (name->get_string_copy ()),
+ params_ (params),
+ annotation_decl_ (0)
+{
+}
+
+AST_Annotation_Appl::~AST_Annotation_Appl ()
+{
+ delete [] original_name_;
+}
+
+void AST_Annotation_Appl::dump (ACE_OSTREAM_TYPE &o)
+{
+ dump_i (o, original_name_);
+ if (params_)
+ {
+ dump_i (o, "(");
+ Params::ITERATOR iter (*params_);
+ while (!iter.done ())
+ {
+ Param **i = 0;
+ iter.next (i);
+ if ((*i)->id)
+ {
+ (*i)->id->dump (o);
+ dump_i (o, " = ");
+ }
+ (*i)->expr->dump (o);
+ iter.advance ();
+ if (!iter.done ())
+ {
+ dump_i (o, ", ");
+ }
+ }
+ dump_i (o, ")");
+ }
+}
+
+int AST_Annotation_Appl::ast_accept (ast_visitor *)
+{
+ return 0;
+}
+
+void AST_Annotation_Appl::destroy ()
+{
+}
+
+const char *AST_Annotation_Appl::original_name () const
+{
+ return original_name_;
+}
+
+IMPL_NARROW_FROM_DECL (AST_Annotation_Appl)
+IMPL_NARROW_FROM_SCOPE (AST_Annotation_Appl)
+
+bool
+AST_Annotation_Appl::apply_from (AST_Annotation_Decl *decl)
+{
+ // Apply Each Member From the Annotation Declaration
+ for (UTL_ScopeActiveIterator si (
+ decl,
+ UTL_Scope::IK_decls);
+ !si.is_done ();
+ si.next ())
+ {
+ AST_Annotation_Member *member =
+ AST_Annotation_Member::narrow_from_decl (si.item ());
+ if (member)
+ {
+ AST_Annotation_Member *new_member = fe_add_annotation_member (
+ new AST_Annotation_Member (member->name (), member));
+
+ /*
+ * Check to see if we have a parameter that matches this. If not,
+ * make sure that the member has a default value.
+ */
+ Param *param = find_param (member->local_name ()->get_string ());
+ if (param)
+ {
+ new_member->value (new AST_Expression (param->expr, member->expr_type()));
+ if (new_member->invalid_value ())
+ {
+ idl_global->err ()->invalid_annotation_param_type (
+ this, member, param->expr);
+ return false;
+ }
+ param->used = true;
+ }
+ else if (!new_member->value ())
+ {
+ idl_global->err ()->annotation_param_missing_error (
+ this, member);
+ return false;
+ }
+ }
+ }
+
+ // Make sure all the parameters were used
+ if (params_)
+ {
+ for (Param::Iterator it (*params_);
+ !it.done (); it.advance ())
+ {
+ Param **param = 0;
+ it.next (param);
+ if ((*param) && !(*param)->used)
+ {
+ idl_global->err ()->invalid_annotation_param_error (
+ this, decl, (*param)->id);
+ return false;
+ }
+ }
+ }
+
+ annotation_decl_ = decl;
+
+ return true;
+}
+
+AST_Annotation_Appl::Params *
+AST_Annotation_Appl::params ()
+{
+ return params_;
+}
+
+AST_Annotation_Decl *
+AST_Annotation_Appl::annotation_decl ()
+{
+ return annotation_decl_;
+}
+
+AST_Annotation_Appl::Param *
+AST_Annotation_Appl::find_param (const char *name)
+{
+ if (params_)
+ {
+ // Check for single nameless parameter
+ if (params_->size () == 1)
+ {
+ Param *top = 0;
+ params_->top (top);
+ if (top && !top->id && top->expr)
+ {
+ // Don't reuse it if used
+ return top->used ? 0 : top;
+ }
+ }
+ for (Param::Iterator it (*params_);
+ !it.done (); it.advance ())
+ {
+ Param **param = 0;
+ it.next (param);
+ if ((*param) && (*param)->id && !ACE_OS::strcmp ((*param)->id->get_string (), name))
+ {
+ return (*param);
+ }
+ }
+ }
+
+ return 0;
+}
diff --git a/TAO/TAO_IDL/ast/ast_annotation_decl.cpp b/TAO/TAO_IDL/ast/ast_annotation_decl.cpp
new file mode 100644
index 00000000000..5ccaba059f2
--- /dev/null
+++ b/TAO/TAO_IDL/ast/ast_annotation_decl.cpp
@@ -0,0 +1,114 @@
+#include "ast_annotation_decl.h"
+#include "ast_annotation_member.h"
+#include "utl_indenter.h"
+#include "utl_identifier.h"
+#include "ast_constant.h"
+
+AST_Decl::NodeType const AST_Annotation_Decl::NT =
+ AST_Decl::NT_annotation_decl;
+
+AST_Annotation_Decl::AST_Annotation_Decl (UTL_ScopedName *name)
+ : AST_Decl (NT, name),
+ AST_Type (NT, name),
+ AST_ConcreteType (NT, name),
+ UTL_Scope (NT),
+ AST_Structure (name, false, false)
+{
+ if (!ACE_OS::strcmp(name->last_component ()->get_string (), "@annotation"))
+ {
+ idl_global->err ()-> misc_error(
+ "An Annotation can not be named \"annotation\"");
+ }
+}
+
+AST_Annotation_Decl::~AST_Annotation_Decl ()
+{
+}
+
+void AST_Annotation_Decl::dump (ACE_OSTREAM_TYPE &o)
+{
+ this->dump_i (o, "@annotation ");
+ AST_Decl::dump (o);
+ this->dump_i (o, " {\n");
+ UTL_Scope::dump (o);
+ idl_global->indent ()->skip_to (o);
+ this->dump_i (o, "}");
+}
+
+void AST_Annotation_Decl::destroy ()
+{
+ AST_Decl::destroy ();
+}
+
+IMPL_NARROW_FROM_DECL (AST_Annotation_Decl)
+IMPL_NARROW_FROM_SCOPE (AST_Annotation_Decl)
+
+void
+AST_Annotation_Decl::escape_name (Identifier *name)
+{
+ char *old_name = name->get_string ();
+ char *new_name = new char [ACE_OS::strlen (old_name) + 2]; // '@' and '\0'
+ if (new_name)
+ {
+ new_name[0] = '@';
+ new_name[1] = '\0';
+ ACE_OS::strcat (new_name, old_name);
+ name->replace_string (new_name);
+ delete [] new_name;
+ }
+}
+
+void
+AST_Annotation_Decl::escape_name (UTL_ScopedName *name)
+{
+ escape_name (name->last_component ());
+}
+
+bool
+AST_Annotation_Decl::annotatable () const
+{
+ return false;
+}
+
+AST_Annotation_Member *
+AST_Annotation_Decl::fe_add_annotation_member (
+ AST_Annotation_Member *annotation_member)
+{
+ AST_Decl *d = fe_add_decl (annotation_member);
+ if (d)
+ {
+ AST_Type *ft = annotation_member->field_type ();
+ UTL_ScopedName *mru = ft->last_referenced_as ();
+ if (mru)
+ {
+ add_to_referenced (ft, false, mru->first_component ());
+ }
+ }
+
+ AST_Annotation_Decl *s = AST_Annotation_Decl::narrow_from_scope (this);
+ if (s)
+ {
+ s->fields ().enqueue_tail (annotation_member);
+ }
+
+ return AST_Annotation_Member::narrow_from_decl (d);
+}
+
+AST_Constant *
+AST_Annotation_Decl::fe_add_constant (AST_Constant *t)
+{
+ return AST_Constant::narrow_from_decl (fe_add_decl (t));
+}
+
+int
+AST_Annotation_Decl::ast_accept (ast_visitor *visitor)
+{
+ ACE_UNUSED_ARG (visitor);
+ return 0;
+}
+
+bool
+AST_Annotation_Decl::ami_visit ()
+{
+ return false;
+}
diff --git a/TAO/TAO_IDL/ast/ast_annotation_member.cpp b/TAO/TAO_IDL/ast/ast_annotation_member.cpp
new file mode 100644
index 00000000000..2acba197bfb
--- /dev/null
+++ b/TAO/TAO_IDL/ast/ast_annotation_member.cpp
@@ -0,0 +1,109 @@
+/**
+ * Abstract Syntax Tree Node for a Member Value of an Annotation
+ */
+
+#include "ast_annotation_member.h"
+#include "ast_type.h"
+#include "utl_scope.h"
+
+#include "ast_enum.h"
+#include "ast_enum_val.h"
+
+AST_Decl::NodeType const AST_Annotation_Member::NT =
+ AST_Decl::NT_annotation_member;
+
+AST_Annotation_Member::AST_Annotation_Member (
+ AST_Expression::ExprType expr_type, AST_Type *type, UTL_ScopedName *name)
+ : AST_Decl (NT, name),
+ AST_Field (type, name, vis_NA),
+ expr_type_ (expr_type),
+ value_ (0)
+{
+}
+
+AST_Annotation_Member::AST_Annotation_Member (
+ AST_Decl::NodeType nt,
+ AST_Expression::ExprType expr_type, AST_Type *type, UTL_ScopedName *name)
+ : AST_Decl (nt, name),
+ AST_Field (nt, type, name, vis_NA),
+ expr_type_ (expr_type),
+ value_ (0)
+{
+}
+
+AST_Annotation_Member::AST_Annotation_Member (
+ UTL_ScopedName *name,
+ AST_Annotation_Member *other)
+ : AST_Decl (name, dynamic_cast<AST_Decl*>(other)),
+ AST_Field (name, dynamic_cast<AST_Field*>(other)),
+ expr_type_ (other->expr_type ()),
+ value_ (other->value () ?
+ new AST_Expression (other->value (), other->expr_type ()) : 0)
+{
+}
+
+AST_Annotation_Member::~AST_Annotation_Member ()
+{
+ delete value_;
+}
+
+void
+AST_Annotation_Member::destroy ()
+{
+ if (value_)
+ {
+ value_->destroy ();
+ }
+}
+
+IMPL_NARROW_FROM_DECL (AST_Annotation_Member);
+IMPL_NARROW_FROM_SCOPE (AST_Annotation_Member);
+
+void
+AST_Annotation_Member::dump (ACE_OSTREAM_TYPE &o)
+{
+ AST_Field::dump (o);
+ if (value_)
+ {
+ dump_i (o, " default ");
+ if (field_type ()->node_type () == AST_Decl::NT_enum)
+ {
+ dynamic_cast<AST_Enum*> (field_type ())->
+ lookup_by_value (value_)->name ()->dump (o);
+ }
+ else
+ {
+ value_->dump (o);
+ }
+ }
+}
+
+AST_Expression *
+AST_Annotation_Member::value ()
+{
+ return value_;
+}
+
+void
+AST_Annotation_Member::value (AST_Expression *value)
+{
+ if (value_)
+ {
+ value_->destroy ();
+ delete value_;
+ }
+
+ value_ = value;
+}
+
+AST_Expression::ExprType
+AST_Annotation_Member::expr_type ()
+{
+ return expr_type_;
+}
+
+bool
+AST_Annotation_Member::invalid_value ()
+{
+ return !value () || !value ()->ev ();
+}
diff --git a/TAO/TAO_IDL/ast/ast_array.cpp b/TAO/TAO_IDL/ast/ast_array.cpp
index 6f4ed33f32a..a70329e4758 100644
--- a/TAO/TAO_IDL/ast/ast_array.cpp
+++ b/TAO/TAO_IDL/ast/ast_array.cpp
@@ -97,7 +97,8 @@ AST_Array::AST_Array (UTL_ScopedName *n,
n),
pd_n_dims (nd),
pd_base_type (0),
- owns_base_type_ (false)
+ owns_base_type_ (false),
+ base_type_annotations_ (0)
{
this->pd_dims = this->compute_dims (ds,
nd);
@@ -271,3 +272,15 @@ AST_Array::set_dims (AST_Expression **ds,
}
IMPL_NARROW_FROM_DECL(AST_Array)
+
+AST_Annotation_Appls *
+AST_Array::base_type_annotations()
+{
+ return base_type_annotations_;
+}
+
+void
+AST_Array::base_type_annotations(AST_Annotation_Appls *annotations)
+{
+ base_type_annotations_ = annotations;
+}
diff --git a/TAO/TAO_IDL/ast/ast_decl.cpp b/TAO/TAO_IDL/ast/ast_decl.cpp
index 394b6bfbdc2..34648949f09 100644
--- a/TAO/TAO_IDL/ast/ast_decl.cpp
+++ b/TAO/TAO_IDL/ast/ast_decl.cpp
@@ -62,16 +62,6 @@ trademarks or registered trademarks of Sun Microsystems, Inc.
*/
-/*
- * AST_Decl is the base class for all AST nodes except AST_Expression.
- * AST_Decls have a node type (a value from the enum AST_Decl::NodeType)
- * and a name (a UTL_ScopedName).
- * Additionally AST_Decl nodes record the scope of definition, the
- * file name in which they were defined, the line on which they were
- * defined in that file, and a boolean denoting whether this is the
- * main file or an #include'd file.
- */
-
#include "ast_interface.h"
#include "ast_module.h"
#include "ast_array.h"
@@ -88,6 +78,8 @@ trademarks or registered trademarks of Sun Microsystems, Inc.
#include "utl_scope.h"
#include "utl_err.h"
#include "ace/OS_NS_stdio.h"
+#include "ast_annotation_appl.h"
+#include "utl_indenter.h"
// FUZZ: disable check_for_streams_include
#include "ace/streams.h"
@@ -139,6 +131,8 @@ AST_Decl::AST_Decl (NodeType nt,
repoID_ (0),
flat_name_ (0),
contains_wstring_ (-1),
+ annotation_appls_ (0),
+ builtin_ (idl_global->in_eval_),
pd_imported (idl_global->imported ()),
pd_in_main_file (idl_global->in_main_file ()),
pd_defined_in (idl_global->scopes ().depth () > 0
@@ -177,6 +171,53 @@ AST_Decl::AST_Decl (NodeType nt,
this->compute_repoID ();
}
+AST_Decl::AST_Decl (
+ UTL_ScopedName *name,
+ AST_Decl *other)
+ : COMMON_Base (),
+ repoID_ (0),
+ flat_name_ (0),
+ contains_wstring_ (-1),
+ annotation_appls_ (0),
+ builtin_ (idl_global->in_eval_),
+ pd_imported (idl_global->imported ()),
+ pd_in_main_file (idl_global->in_main_file ()),
+ pd_defined_in (idl_global->scopes ().depth () > 0
+ ? idl_global->scopes ().top ()
+ : 0),
+ pd_node_type (other->node_type ()),
+ pd_line (idl_global->lineno ()),
+ pd_name (0),
+ pd_local_name (name ? name->last_component ()->copy () : 0),
+ pd_original_local_name (0),
+ full_name_ (0),
+ prefix_ (0),
+ version_ (0),
+ anonymous_ (other->anonymous ()),
+ typeid_set_ (false),
+ last_referenced_as_ (0),
+ prefix_scope_ (0),
+ in_tmpl_mod_not_aliased_ (idl_global->in_tmpl_mod_no_alias ())
+{
+ // If this is the root node, the filename won't have been set yet.
+ UTL_String *fn = idl_global->filename ();
+ this->pd_file_name = (fn ? fn->get_string () : "");
+
+ this->compute_full_name (name);
+
+ char *prefix = 0;
+ idl_global->pragma_prefixes ().top (prefix);
+ this->prefix_ = ACE::strnew (prefix ? prefix : "");
+
+ if (name)
+ {
+ // The function body creates its own copy.
+ this->original_local_name (name->last_component ());
+ }
+
+ this->compute_repoID ();
+}
+
AST_Decl::~AST_Decl (void)
{
}
@@ -805,12 +846,6 @@ AST_Decl::node_type_to_string (NodeType nt)
return "consumes";
// No useful output for these.
- case NT_enum_val:
- case NT_field:
- case NT_union_branch:
- case NT_op:
- case NT_argument:
- case NT_root:
default:
return "";
}
@@ -1533,3 +1568,113 @@ AST_Decl::in_tmpl_mod_not_aliased (bool val)
//Narrowing methods for AST_Decl.
IMPL_NARROW_FROM_DECL(AST_Decl)
+
+
+void AST_Decl::annotation_appls (AST_Annotation_Appls *annotations)
+{
+ if (annotatable ())
+ {
+ annotation_appls_ = annotations;
+ }
+ else
+ {
+ ACE_ERROR ((LM_ERROR,
+ ACE_TEXT ("WARNING: %C is annotated but its type can't be annotated!\n"),
+ full_name ()
+ ));
+ }
+}
+
+AST_Annotation_Appls *AST_Decl::annotation_appls ()
+{
+ return annotation_appls_;
+}
+
+void
+AST_Decl::dump_annotations (ACE_OSTREAM_TYPE &o, bool print_inline)
+{
+ if (annotation_appls_)
+ {
+ for (size_t i = 0; i < annotation_appls_->size (); i++)
+ {
+ AST_Annotation_Appl *a = (*annotation_appls_)[i];
+ a->dump (o);
+ if (print_inline)
+ {
+ dump_i (o, " ");
+ }
+ else
+ {
+ dump_i (o, "\n");
+ // We need to indent the next line (or not if we are not indented)
+ idl_global->indent ()->skip_to (o);
+ }
+ }
+ }
+}
+
+void
+AST_Decl::dump_with_annotations (ACE_OSTREAM_TYPE &o, bool inline_annotations)
+{
+ if (annotatable () && auto_dump_annotations())
+ {
+ dump_annotations (o, inline_annotations);
+ }
+
+ dump (o);
+}
+
+ACE_OSTREAM_TYPE &
+operator<< (ACE_OSTREAM_TYPE &o, AST_Decl &d)
+{
+ d.dump_with_annotations (o, d.dump_annotations_inline ());
+
+ return o;
+}
+
+bool
+AST_Decl::annotatable () const
+{
+ return false;
+}
+
+bool
+AST_Decl::dump_annotations_inline () const
+{
+ return false;
+}
+
+bool
+AST_Decl::auto_dump_annotations () const
+{
+ return true;
+}
+
+bool
+AST_Decl::builtin () const
+{
+ return builtin_;
+}
+
+bool
+AST_Decl::should_be_dumped () const
+{
+ return !builtin () || idl_global->dump_builtins_;
+}
+
+AST_Annotation_Appls &
+AST_Decl::annotations ()
+{
+ if (!annotation_appls_)
+ {
+ annotation_appls_ = new AST_Annotation_Appls;
+ }
+
+ return *annotation_appls_;
+}
+
+bool
+AST_Decl::ami_visit ()
+{
+ return true;
+}
diff --git a/TAO/TAO_IDL/ast/ast_enum.cpp b/TAO/TAO_IDL/ast/ast_enum.cpp
index bd1e1c12443..6ad9afb3fc9 100644
--- a/TAO/TAO_IDL/ast/ast_enum.cpp
+++ b/TAO/TAO_IDL/ast/ast_enum.cpp
@@ -331,20 +331,29 @@ AST_Enum::dump (ACE_OSTREAM_TYPE &o)
this->local_name ()->dump (o);
this->dump_i (o, " {\n");
+ idl_global->indent ()->increase ();
+ idl_global->indent ()->skip_to (o);
// Must increment the iterator explicitly inside the loop.
for (UTL_ScopeActiveIterator i (this, IK_decls);!i.is_done ();)
{
d = i.item ();
+ d->dump_annotations (o, true /* print inline */);
d->local_name ()->dump (o);
i.next ();
- if (!i.is_done ())
+ if (i.is_done ())
+ {
+ this->dump_i (o, "\n");
+ }
+ else
{
- this->dump_i (o, ", ");
+ this->dump_i (o, ",\n");
+ idl_global->indent ()->skip_to (o);
}
}
+ idl_global->indent ()->decrease ();
idl_global->indent ()->skip_to (o);
this->dump_i (o, "}");
diff --git a/TAO/TAO_IDL/ast/ast_enum_val.cpp b/TAO/TAO_IDL/ast/ast_enum_val.cpp
index 0bfc81b2da9..c33e22c8040 100644
--- a/TAO/TAO_IDL/ast/ast_enum_val.cpp
+++ b/TAO/TAO_IDL/ast/ast_enum_val.cpp
@@ -102,6 +102,16 @@ AST_EnumVal::ast_accept (ast_visitor *visitor)
return visitor->visit_enum_val (this);
}
+IMPL_NARROW_FROM_DECL(AST_EnumVal)
+AST_Enum *
+AST_EnumVal::enum_parent ()
+{
+ return enum_parent_;
+}
-IMPL_NARROW_FROM_DECL(AST_EnumVal)
+void
+AST_EnumVal::enum_parent (AST_Enum *node)
+{
+ enum_parent_ = node;
+}
diff --git a/TAO/TAO_IDL/ast/ast_expression.cpp b/TAO/TAO_IDL/ast/ast_expression.cpp
index aac7235ff2c..7a6bc510527 100644
--- a/TAO/TAO_IDL/ast/ast_expression.cpp
+++ b/TAO/TAO_IDL/ast/ast_expression.cpp
@@ -70,6 +70,7 @@ trademarks or registered trademarks of Sun Microsystems, Inc.
#include "ast_param_holder.h"
#include "ast_visitor.h"
#include "ast_generator.h"
+#include "ast_enum_val.h"
#include "utl_err.h"
#include "utl_scope.h"
@@ -93,6 +94,7 @@ AST_Expression::fill_definition_details (void)
: 0 ;
this->pd_line = idl_global->lineno ();
this->pd_file_name = idl_global->filename ();
+ enum_parent (0);
}
// An AST_Expression denoting a symbolic name.
@@ -131,6 +133,7 @@ AST_Expression::AST_Expression (AST_Expression *v,
{
AST_Param_Holder *ph = v->param_holder_;
this->fill_definition_details ();
+ enum_parent (v->enum_parent ());
// If we are here because one string constant has
// another one as its rhs, we must copy the UTL_String
@@ -2511,6 +2514,12 @@ AST_Expression::eval_symbol (AST_Expression::EvalKind ek)
return 0;
}
+ if (d->node_type () == AST_Decl::NT_enum_val)
+ {
+ AST_EnumVal *enumval = AST_EnumVal::narrow_from_decl (d);
+ enum_parent (enumval->enum_parent ());
+ }
+
// OK, now evaluate the constant we just got, to produce its value.
c = AST_Constant::narrow_from_decl (d);
@@ -2850,28 +2859,19 @@ AST_Expression::operator== (AST_Expression *vc)
case EV_bool:
return this->pd_ev->u.lval == vc->ev ()->u.lval;
case EV_string:
- if (this->pd_ev->u.strval == 0)
- {
- return vc->ev ()->u.strval == 0;
- }
- else if (vc->ev ()->u.strval == 0)
- {
- return false;
- }
- else
- {
- return this->pd_ev->u.strval == vc->ev ()->u.strval;
- }
-
+ return !ACE_OS::strcmp (pd_ev->u.strval->get_string (),
+ vc->ev ()->u.strval->get_string ());
+ case EV_wstring:
+ return !ACE_OS::strcmp (pd_ev->u.wstrval, vc->ev ()->u.wstrval);
case EV_longlong:
return pd_ev->u.llval == vc->ev ()->u.llval;
case EV_ulonglong:
return pd_ev->u.ullval == vc->ev ()->u.ullval;
case EV_fixed:
return pd_ev->u.fixedval == vc->ev ()->u.fixedval;
- case EV_longdouble:
- case EV_wstring:
case EV_enum:
+ return pd_ev->u.eval == vc->ev ()->u.eval;
+ case EV_longdouble:
case EV_void:
case EV_none:
case EV_any:
@@ -3004,8 +3004,7 @@ dump_unary_expr (ACE_OSTREAM_TYPE &o,
// Dump the supplied AST_ExprValue to the ostream o.
static void
-dump_expr_val (ACE_OSTREAM_TYPE &o,
- AST_Expression::AST_ExprValue *ev)
+dump_expr_val (ACE_OSTREAM_TYPE &o, AST_Expression::AST_ExprValue *ev)
{
switch (ev->et)
{
@@ -3041,24 +3040,26 @@ dump_expr_val (ACE_OSTREAM_TYPE &o,
break;
case AST_Expression::EV_string:
if (ev->u.strval != 0)
- ev->u.strval->dump(o);
+ {
+ ev->u.strval->dump (o);
+ }
+ else
+ {
+ o << "(null string)";
+ }
+ break;
case AST_Expression::EV_longlong:
-// o << ev->u.llval;
- break;
+ o << ev->u.llval;
+ break;
case AST_Expression::EV_ulonglong:
-// o << ev->u.ullval;
+ o << ev->u.ullval;
break;
case AST_Expression::EV_fixed:
o << ev->u.fixedval;
break;
- case AST_Expression::EV_longdouble:
- case AST_Expression::EV_wstring:
case AST_Expression::EV_enum:
- case AST_Expression::EV_none:
- case AST_Expression::EV_void:
- case AST_Expression::EV_any:
- case AST_Expression::EV_object:
- break;
+ default:
+ o << "(Can not dump this type)";
}
}
@@ -3069,8 +3070,7 @@ AST_Expression::dump (ACE_OSTREAM_TYPE &o)
// See if it was a constant or was evaluated already.
if (this->pd_ev != 0)
{
- dump_expr_val (o,
- this->pd_ev);
+ dump_expr_val (o, this->pd_ev);
return;
}
@@ -3321,3 +3321,66 @@ AST_Expression::set_n (UTL_ScopedName *new_n)
{
this->pd_n = new_n;
}
+
+const char *
+AST_Expression::exprtype_to_string (ExprType t)
+{
+ switch (t) {
+ case AST_Expression::EV_short:
+ return "short";
+ case AST_Expression::EV_ushort:
+ return "unsigned short";
+ case AST_Expression::EV_long:
+ return "long";
+ case AST_Expression::EV_ulong:
+ return "unsigned long";
+ case AST_Expression::EV_float:
+ return "float";
+ case AST_Expression::EV_double:
+ return "double";
+ case AST_Expression::EV_char:
+ return "char";
+ case AST_Expression::EV_octet:
+ return "octet";
+ case AST_Expression::EV_bool:
+ return "boolean";
+ case AST_Expression::EV_string:
+ return "string";
+ case AST_Expression::EV_enum:
+ return "enum";
+ case AST_Expression::EV_void:
+ return "void";
+ case AST_Expression::EV_none:
+ return "none";
+ case AST_Expression::EV_wchar:
+ return "wchar";
+ case AST_Expression::EV_longlong:
+ return "longlong";
+ case AST_Expression::EV_ulonglong:
+ return "ulonglong";
+ case AST_Expression::EV_longdouble:
+ return "longdouble";
+ case AST_Expression::EV_wstring:
+ return "wstring";
+ case AST_Expression::EV_any:
+ return "any";
+ case AST_Expression::EV_object:
+ return "object";
+ case AST_Expression::EV_fixed:
+ return "fixed";
+ default:
+ return "<UNKNOWN TYPE>";
+ }
+}
+
+AST_Enum *
+AST_Expression::enum_parent ()
+{
+ return enum_parent_;
+}
+
+void
+AST_Expression::enum_parent (AST_Enum *node)
+{
+ enum_parent_ = node;
+}
diff --git a/TAO/TAO_IDL/ast/ast_field.cpp b/TAO/TAO_IDL/ast/ast_field.cpp
index 528297592c2..16e6b22c3c0 100644
--- a/TAO/TAO_IDL/ast/ast_field.cpp
+++ b/TAO/TAO_IDL/ast/ast_field.cpp
@@ -150,11 +150,23 @@ AST_Field::AST_Field (AST_Decl::NodeType nt,
}
}
+AST_Field::AST_Field (
+ UTL_ScopedName *name,
+ AST_Field *other)
+ : COMMON_Base (),
+ AST_Decl (name, dynamic_cast<AST_Decl*>(other)),
+ ref_type_ (other->field_type ()),
+ visibility_ (other->visibility ()),
+ owns_base_type_ (false)
+{
+ // We definitely don't own the base type and the param holder check shouldn't
+ // be an issue here.
+}
+
AST_Field::~AST_Field (void)
{
}
-// Dump this AST_Field node to the ostream o.
void
AST_Field::dump (ACE_OSTREAM_TYPE &o)
{
@@ -217,3 +229,8 @@ AST_Field::contains_wstring (void)
}
IMPL_NARROW_FROM_DECL(AST_Field)
+
+bool AST_Field::annotatable () const
+{
+ return true;
+}
diff --git a/TAO/TAO_IDL/ast/ast_generator.cpp b/TAO/TAO_IDL/ast/ast_generator.cpp
index 195fe037dd7..0c1c673aca6 100644
--- a/TAO/TAO_IDL/ast/ast_generator.cpp
+++ b/TAO/TAO_IDL/ast/ast_generator.cpp
@@ -104,6 +104,8 @@ trademarks or registered trademarks of Sun Microsystems, Inc.
#include "ast_factory.h"
#include "ast_finder.h"
#include "ast_fixed.h"
+#include "ast_annotation_appl.h"
+#include "ast_annotation_member.h"
#include "utl_identifier.h"
@@ -1158,3 +1160,32 @@ AST_Generator::create_param_holder (
return retval;
}
+AST_Annotation_Decl *
+AST_Generator::create_annotation_decl (
+ UTL_ScopedName *name)
+{
+ AST_Annotation_Decl *retval = 0;
+ ACE_NEW_RETURN (retval, AST_Annotation_Decl (name), 0);
+ return retval;
+}
+
+AST_Annotation_Appl *
+AST_Generator::create_annotation_appl (
+ UTL_ScopedName *name,
+ AST_Annotation_Appl::Params *params)
+{
+ AST_Annotation_Appl *retval = 0;
+ ACE_NEW_RETURN (retval, AST_Annotation_Appl (name, params), 0);
+ return retval;
+}
+
+AST_Annotation_Member *
+AST_Generator::create_annotation_member (
+ AST_Expression::ExprType expr_type,
+ AST_Type *type,
+ UTL_ScopedName *name)
+{
+ AST_Annotation_Member *retval = 0;
+ ACE_NEW_RETURN (retval, AST_Annotation_Member (expr_type, type, name), 0);
+ return retval;
+}
diff --git a/TAO/TAO_IDL/ast/ast_module.cpp b/TAO/TAO_IDL/ast/ast_module.cpp
index 7c6ecc1e7a0..b428d3c5dd6 100644
--- a/TAO/TAO_IDL/ast/ast_module.cpp
+++ b/TAO/TAO_IDL/ast/ast_module.cpp
@@ -642,3 +642,10 @@ AST_Module::reset_last_in_same_parent_scope (void)
this->last_in_same_parent_scope_ = this;
}
+AST_Annotation_Decl *
+AST_Module::fe_add_annotation_decl (
+ AST_Annotation_Decl *annotation_decl)
+{
+ return AST_Annotation_Decl::narrow_from_decl (
+ fe_add_decl (annotation_decl));
+}
diff --git a/TAO/TAO_IDL/ast/ast_sequence.cpp b/TAO/TAO_IDL/ast/ast_sequence.cpp
index 13466274df4..842129085ac 100644
--- a/TAO/TAO_IDL/ast/ast_sequence.cpp
+++ b/TAO/TAO_IDL/ast/ast_sequence.cpp
@@ -73,6 +73,7 @@ trademarks or registered trademarks of Sun Microsystems, Inc.
#include "ast_expression.h"
#include "ast_param_holder.h"
#include "ast_visitor.h"
+#include "ast_annotation_appl.h"
#include "utl_identifier.h"
#include "utl_err.h"
@@ -104,7 +105,8 @@ AST_Sequence::AST_Sequence (AST_Expression *ms,
pd_max_size (ms),
pd_base_type (bt),
unbounded_ (true),
- owns_base_type_ (false)
+ owns_base_type_ (false),
+ base_type_annotations_ (0)
{
FE_Utils::tmpl_mod_ref_check (this, bt);
@@ -211,6 +213,16 @@ void
AST_Sequence::dump (ACE_OSTREAM_TYPE &o)
{
this->dump_i (o, "sequence <");
+ if (base_type_annotations ())
+ {
+ size_t count = base_type_annotations ()->size ();
+ for (size_t i = 0; i < count; i++)
+ {
+ AST_Annotation_Appl *a = (*base_type_annotations ())[i];
+ a->dump (o);
+ dump_i (o, " ");
+ }
+ }
this->pd_base_type->dump (o);
this->dump_i (o, ", ");
this->pd_max_size->dump (o);
@@ -273,3 +285,15 @@ AST_Sequence::destroy (void)
}
IMPL_NARROW_FROM_DECL(AST_Sequence)
+
+AST_Annotation_Appls *
+AST_Sequence::base_type_annotations()
+{
+ return base_type_annotations_;
+}
+
+void
+AST_Sequence::base_type_annotations(AST_Annotation_Appls *annotations)
+{
+ base_type_annotations_ = annotations;
+}
diff --git a/TAO/TAO_IDL/ast/ast_structure.cpp b/TAO/TAO_IDL/ast/ast_structure.cpp
index 3e7fc1f83a5..2a360d28c17 100644
--- a/TAO/TAO_IDL/ast/ast_structure.cpp
+++ b/TAO/TAO_IDL/ast/ast_structure.cpp
@@ -77,6 +77,7 @@ trademarks or registered trademarks of Sun Microsystems, Inc.
#include "utl_string.h"
#include "utl_err.h"
#include "utl_indenter.h"
+#include "utl_identifier.h"
#include "ace/Truncate.h"
@@ -587,3 +588,45 @@ AST_Structure::destroy (void)
IMPL_NARROW_FROM_DECL(AST_Structure)
IMPL_NARROW_FROM_SCOPE(AST_Structure)
+bool AST_Structure::annotatable () const
+{
+ return true;
+}
+
+AST_Decl *
+AST_Structure::operator[] (const size_t index)
+{
+ size_t count = member_count_ <= 0 ? 0 : member_count_;
+ if (index >= count)
+ {
+ return 0;
+ }
+ size_t i = 0;
+ for (UTL_ScopeActiveIterator si (this, UTL_Scope::IK_decls);
+ !si.is_done ();
+ si.next ())
+ {
+ if (i == index)
+ {
+ return si.item ();
+ }
+ i++;
+ }
+ return 0;
+}
+
+AST_Decl *
+AST_Structure::operator[] (const char* name)
+{
+ for (UTL_ScopeActiveIterator si (this, UTL_Scope::IK_decls);
+ !si.is_done ();
+ si.next ())
+ {
+ AST_Decl *field = si.item ();
+ const char *field_name = field->local_name ()->get_string ();
+ if (!ACE_OS::strcmp (name, field_name)) {
+ return field;
+ }
+ }
+ return 0;
+}
diff --git a/TAO/TAO_IDL/ast/ast_typedef.cpp b/TAO/TAO_IDL/ast/ast_typedef.cpp
index db07a34bbe8..760bf9b55c7 100644
--- a/TAO/TAO_IDL/ast/ast_typedef.cpp
+++ b/TAO/TAO_IDL/ast/ast_typedef.cpp
@@ -89,12 +89,17 @@ AST_Typedef::AST_Typedef (AST_Type *bt,
n),
AST_Field (AST_Decl::NT_typedef,
bt,
- n)
+ n),
+ cached_annotations_ (0)
{
}
AST_Typedef::~AST_Typedef (void)
{
+ if (!cached_annotations_)
+ {
+ delete cached_annotations_;
+ }
}
// Given a typedef node, traverse the chain of base types until they are no
@@ -151,7 +156,7 @@ void
AST_Typedef::dump (ACE_OSTREAM_TYPE&o)
{
this->dump_i (o, "typedef ");
- this->ref_type_->dump (o);
+ o << *ref_type_;
this->dump_i (o, " ");
this->local_name ()->dump (o);
}
@@ -193,3 +198,35 @@ AST_Typedef::destroy (void)
}
IMPL_NARROW_FROM_DECL(AST_Typedef)
+
+AST_Annotation_Appls &
+AST_Typedef::annotations ()
+{
+ if (!cached_annotations_)
+ {
+ cached_annotations_ = new AST_Annotation_Appls;
+
+ if (base_type ())
+ {
+ AST_Annotation_Appls &next = base_type ()->annotations ();
+ for (size_t i = 0; i < next.size (); i++)
+ {
+ cached_annotations_->push_back (next[i]);
+ }
+ }
+
+ /*
+ * Done after so it's easier for later annotations to override
+ * older ones.
+ */
+ if (annotation_appls ()) {
+ AST_Annotation_Appls &appls = *annotation_appls ();
+ for (size_t i = 0; i < appls.size (); i++)
+ {
+ cached_annotations_->push_back (appls[i]);
+ }
+ }
+ }
+
+ return *cached_annotations_;
+}
diff --git a/TAO/TAO_IDL/ast/ast_union.cpp b/TAO/TAO_IDL/ast/ast_union.cpp
index eec05414e03..1d3c906c483 100644
--- a/TAO/TAO_IDL/ast/ast_union.cpp
+++ b/TAO/TAO_IDL/ast/ast_union.cpp
@@ -84,6 +84,7 @@ trademarks or registered trademarks of Sun Microsystems, Inc.
#include "utl_identifier.h"
#include "utl_indenter.h"
#include "global_extern.h"
+#include "ast_annotation_appl.h"
// FUZZ: disable check_for_streams_include
#include "ace/streams.h"
@@ -104,7 +105,8 @@ AST_Union::AST_Union (AST_ConcreteType *dt,
AST_Structure (n,
local,
abstract),
- default_index_ (-2)
+ default_index_ (-2),
+ disc_annotations_ (0)
{
this->default_value_.computed_ = -2;
@@ -969,6 +971,16 @@ AST_Union::dump (ACE_OSTREAM_TYPE &o)
o << "union ";
this->local_name ()->dump (o);
o << " switch (";
+ if (disc_annotations ())
+ {
+ size_t count = disc_annotations ()->size ();
+ for (size_t i = 0; i < count; i++)
+ {
+ AST_Annotation_Appl *a = (*disc_annotations ())[i];
+ a->dump (o);
+ dump_i (o, " ");
+ }
+ }
this->pd_disc_type->local_name ()->dump (o);
o << ") {\n";
UTL_Scope::dump (o);
@@ -1036,3 +1048,15 @@ AST_Union::udisc_type (void)
IMPL_NARROW_FROM_DECL(AST_Union)
IMPL_NARROW_FROM_SCOPE(AST_Union)
+
+AST_Annotation_Appls *
+AST_Union::disc_annotations()
+{
+ return disc_annotations_;
+}
+
+void
+AST_Union::disc_annotations(AST_Annotation_Appls *annotations)
+{
+ disc_annotations_ = annotations;
+}
diff --git a/TAO/TAO_IDL/ast/ast_union_branch.cpp b/TAO/TAO_IDL/ast/ast_union_branch.cpp
index e2f72a2ada5..e0a205b9a87 100644
--- a/TAO/TAO_IDL/ast/ast_union_branch.cpp
+++ b/TAO/TAO_IDL/ast/ast_union_branch.cpp
@@ -73,6 +73,7 @@ trademarks or registered trademarks of Sun Microsystems, Inc.
#include "ast_enum.h"
#include "ast_enum_val.h"
#include "ast_visitor.h"
+#include "utl_indenter.h"
#include "utl_labellist.h"
#include "fe_extern.h"
@@ -103,7 +104,8 @@ AST_UnionBranch::~AST_UnionBranch (void)
void
AST_UnionBranch::dump (ACE_OSTREAM_TYPE &o)
{
- for (unsigned long i = 0; i < this->label_list_length (); ++i)
+ unsigned long l = this->label_list_length ();
+ for (unsigned long i = 0; i < l; ++i)
{
this->dump_i (o, "case ");
@@ -111,9 +113,14 @@ AST_UnionBranch::dump (ACE_OSTREAM_TYPE &o)
ul->dump (o);
this->dump_i (o, ":\n");
+ if (i != l - 1) idl_global->indent ()->skip_to (o);
}
+ idl_global->indent ()->increase ();
+ idl_global->indent ()->skip_to (o);
+ AST_Field::dump_annotations (o, true /* print inline */);
AST_Field::dump (o);
+ idl_global->indent ()->decrease ();
}
int
diff --git a/TAO/TAO_IDL/ast/ast_visitor.cpp b/TAO/TAO_IDL/ast/ast_visitor.cpp
index 7c6f66859e5..662179b4154 100644
--- a/TAO/TAO_IDL/ast/ast_visitor.cpp
+++ b/TAO/TAO_IDL/ast/ast_visitor.cpp
@@ -13,3 +13,8 @@ int ast_visitor::visit_fixed (AST_Fixed *)
{
return 0;
}
+
+int ast_visitor::visit_annotation_decl (AST_Annotation_Decl *)
+{
+ return 0;
+}
diff --git a/TAO/TAO_IDL/be/be_global.cpp b/TAO/TAO_IDL/be/be_global.cpp
index 32d6caf4ecc..ac181d2a2cc 100644
--- a/TAO/TAO_IDL/be/be_global.cpp
+++ b/TAO/TAO_IDL/be/be_global.cpp
@@ -2809,6 +2809,7 @@ BE_GlobalData::parse_args (long &i, char **av)
ACE_TEXT ("IDL: I don't understand the '%C' option\n"),
av[i]
));
+ idl_global->parse_args_exit (1);
}
break;
case 'b':
@@ -2824,6 +2825,7 @@ BE_GlobalData::parse_args (long &i, char **av)
ACE_TEXT (" the '%C' option\n"),
av[i]
));
+ idl_global->parse_args_exit (1);
}
break;
// = Various 'c'lient side stub file_name_endings.
@@ -2853,6 +2855,7 @@ BE_GlobalData::parse_args (long &i, char **av)
ACE_TEXT ("IDL: I don't understand the '%C' option\n"),
av[i]
));
+ idl_global->parse_args_exit (1);
}
break;
// = Various 's'erver side skeleton file name endings.
@@ -2890,6 +2893,7 @@ BE_GlobalData::parse_args (long &i, char **av)
ACE_TEXT ("IDL: I don't understand the '%C' option\n"),
av[i]
));
+ idl_global->parse_args_exit (1);
}
break;
// Operation lookup strategy.
@@ -2902,6 +2906,7 @@ BE_GlobalData::parse_args (long &i, char **av)
{
ACE_ERROR ((LM_ERROR,
ACE_TEXT ("no selection for -H option\n")));
+ idl_global->parse_args_exit (1);
}
else if (ACE_OS::strcmp (av[i+1], "dynamic_hash") == 0)
{
@@ -2925,6 +2930,7 @@ BE_GlobalData::parse_args (long &i, char **av)
ACE_TEXT ("%C: unknown operation lookup <%C>\n"),
av[0],
av[i + 1]));
+ idl_global->parse_args_exit (1);
}
++i;
@@ -2955,6 +2961,7 @@ BE_GlobalData::parse_args (long &i, char **av)
ACE_TEXT (" the '%C' option\n"),
av[i]
));
+ idl_global->parse_args_exit (1);
}
}
else
@@ -2964,6 +2971,7 @@ BE_GlobalData::parse_args (long &i, char **av)
ACE_TEXT ("IDL: I don't understand the '%C' option\n"),
av[i]
));
+ idl_global->parse_args_exit (1);
}
break;
@@ -2992,6 +3000,7 @@ BE_GlobalData::parse_args (long &i, char **av)
ACE_TEXT (" the '%C' option\n"),
av[i]
));
+ idl_global->parse_args_exit (1);
}
break;
@@ -3018,8 +3027,7 @@ BE_GlobalData::parse_args (long &i, char **av)
ACE_TEXT (" specified by -o option\n"),
av[i + 1]
));
-
- break;
+ idl_global->parse_args_exit (1);
}
be_global->output_dir (av[i + 1]);
@@ -3047,7 +3055,7 @@ BE_GlobalData::parse_args (long &i, char **av)
av[i + 1]
));
- break;
+ idl_global->parse_args_exit (1);
}
be_global->anyop_output_dir (av[i + 1]);
@@ -3061,6 +3069,7 @@ BE_GlobalData::parse_args (long &i, char **av)
ACE_TEXT (" the '%C' option\n"),
av[i]
));
+ idl_global->parse_args_exit (1);
}
}
else if (av[i][2] == 'E')
@@ -3085,7 +3094,7 @@ BE_GlobalData::parse_args (long &i, char **av)
av[i + 1]
));
- break;
+ idl_global->parse_args_exit (1);
}
be_global->exec_output_dir (av[i + 1]);
@@ -3099,25 +3108,27 @@ BE_GlobalData::parse_args (long &i, char **av)
ACE_TEXT (" the '%C' option\n"),
av[i]
));
+ idl_global->parse_args_exit (1);
}
}
else if (av[i][2] == 'N')
- {
- if (av[i][3] == '\0')
- {
- // Don't overwrite exec files.
- be_global->overwrite_not_exec (true);
- }
- else
- {
- ACE_ERROR ((
- LM_ERROR,
- ACE_TEXT ("IDL: I don't understand")
- ACE_TEXT (" the '%C' option\n"),
- av[i]
- ));
- }
- }
+ {
+ if (av[i][3] == '\0')
+ {
+ // Don't overwrite exec files.
+ be_global->overwrite_not_exec (true);
+ }
+ else
+ {
+ ACE_ERROR ((
+ LM_ERROR,
+ ACE_TEXT ("IDL: I don't understand")
+ ACE_TEXT (" the '%C' option\n"),
+ av[i]
+ ));
+ idl_global->parse_args_exit (1);
+ }
+ }
else if (av[i][2] == 'S')
{
if (av[i][3] == '\0')
@@ -3140,7 +3151,7 @@ BE_GlobalData::parse_args (long &i, char **av)
av[i + 1]
));
- break;
+ idl_global->parse_args_exit (1);
}
be_global->skel_output_dir (av[i + 1]);
@@ -3154,6 +3165,7 @@ BE_GlobalData::parse_args (long &i, char **av)
ACE_TEXT (" the '%C' option\n"),
av[i]
));
+ idl_global->parse_args_exit (1);
}
}
else
@@ -3164,6 +3176,7 @@ BE_GlobalData::parse_args (long &i, char **av)
ACE_TEXT (" the '%C' option\n"),
av[i]
));
+ idl_global->parse_args_exit (1);
}
break;
@@ -3266,6 +3279,7 @@ BE_GlobalData::parse_args (long &i, char **av)
ACE_TEXT ("the '%C' option\n"),
av[i]
));
+ idl_global->parse_args_exit (1);
}
break;
@@ -3296,6 +3310,7 @@ BE_GlobalData::parse_args (long &i, char **av)
ACE_TEXT ("the '%s' option\n"),
av[i]
));
+ idl_global->parse_args_exit (1);
}
break;
@@ -3316,6 +3331,7 @@ BE_GlobalData::parse_args (long &i, char **av)
ACE_TEXT ("the '%s' option\n"),
av[i]
));
+ idl_global->parse_args_exit (1);
}
break;
@@ -3328,6 +3344,7 @@ BE_GlobalData::parse_args (long &i, char **av)
ACE_TEXT ("the '%s' option\n"),
av[i]
));
+ idl_global->parse_args_exit (1);
}
break;
@@ -3347,6 +3364,7 @@ BE_GlobalData::parse_args (long &i, char **av)
ACE_TEXT ("the '%C' option\n"),
av[i]
));
+ idl_global->parse_args_exit (1);
}
break;
@@ -3376,6 +3394,7 @@ BE_GlobalData::parse_args (long &i, char **av)
ACE_TEXT ("the '%C' option\n"),
av[i]
));
+ idl_global->parse_args_exit (1);
}
break;
}
@@ -3394,6 +3413,7 @@ BE_GlobalData::parse_args (long &i, char **av)
ACE_TEXT ("the '%C' option\n"),
av[i]
));
+ idl_global->parse_args_exit (1);
}
break;
}
@@ -3421,6 +3441,7 @@ BE_GlobalData::parse_args (long &i, char **av)
ACE_TEXT ("the '%s' option\n"),
av[i]
));
+ idl_global->parse_args_exit (1);
}
break;
@@ -3440,6 +3461,7 @@ BE_GlobalData::parse_args (long &i, char **av)
ACE_TEXT ("the '%C' option\n"),
av[i]
));
+ idl_global->parse_args_exit (1);
}
}
else if (av[i][2] == 'o')
@@ -3457,6 +3479,7 @@ BE_GlobalData::parse_args (long &i, char **av)
ACE_TEXT ("the '%C' option\n"),
av[i]
));
+ idl_global->parse_args_exit (1);
}
}
else if (av[i][2] == 'I')
@@ -3513,11 +3536,7 @@ BE_GlobalData::parse_args (long &i, char **av)
ACE_TEXT (" the '%C' option\n"),
av[i]
));
-
- idl_global->set_compile_flags (
- idl_global->compile_flags ()
- | IDL_CF_ONLY_USAGE
- );
+ idl_global->parse_args_exit (1);
}
}
}
@@ -3534,6 +3553,7 @@ BE_GlobalData::parse_args (long &i, char **av)
ACE_TEXT ("IDL: I don't understand the '%C' option\n"),
av[i]
));
+ idl_global->parse_args_exit (1);
}
break;
@@ -3620,6 +3640,7 @@ BE_GlobalData::parse_args (long &i, char **av)
ACE_TEXT ("IDL: I don't understand the '%C' option\n"),
av[i]
));
+ idl_global->parse_args_exit (1);
}
}
else if (av[i][2] == 'm')
@@ -3642,6 +3663,7 @@ BE_GlobalData::parse_args (long &i, char **av)
ACE_TEXT ("IDL: I don't understand the '%C' option\n"),
av[i]
));
+ idl_global->parse_args_exit (1);
}
}
else if (av[i][2] == 's')
@@ -3663,6 +3685,7 @@ BE_GlobalData::parse_args (long &i, char **av)
ACE_TEXT ("IDL: I don't understand the '%C' option\n"),
av[i]
));
+ idl_global->parse_args_exit (1);
}
}
else if (av[i][2] == 'e')
@@ -3683,6 +3706,7 @@ BE_GlobalData::parse_args (long &i, char **av)
ACE_TEXT ("IDL: I don't understand the '%C' option\n"),
av[i]
));
+ idl_global->parse_args_exit (1);
}
break;
@@ -3700,6 +3724,7 @@ BE_GlobalData::parse_args (long &i, char **av)
ACE_TEXT ("IDL: I don't understand the '%C' option\n"),
av[i]
));
+ idl_global->parse_args_exit (1);
}
break;
@@ -3710,9 +3735,7 @@ BE_GlobalData::parse_args (long &i, char **av)
av[i]
));
- idl_global->set_compile_flags (idl_global->compile_flags ()
- | IDL_CF_ONLY_USAGE);
- break;
+ idl_global->parse_args_exit (1);
}
}
diff --git a/TAO/TAO_IDL/be/be_init.cpp b/TAO/TAO_IDL/be/be_init.cpp
index 0bc55c7d168..691eb0056cd 100644
--- a/TAO/TAO_IDL/be/be_init.cpp
+++ b/TAO/TAO_IDL/be/be_init.cpp
@@ -18,6 +18,8 @@ BE_init (int &, ACE_TCHAR *[])
BE_GlobalData,
-1);
+ idl_global->default_idl_version_ = IDL_VERSION_3;
+
return 0;
}
diff --git a/TAO/TAO_IDL/be/be_visitor_ami_pre_proc.cpp b/TAO/TAO_IDL/be/be_visitor_ami_pre_proc.cpp
index f4c58efd32a..d9b13eba963 100644
--- a/TAO/TAO_IDL/be/be_visitor_ami_pre_proc.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_ami_pre_proc.cpp
@@ -837,7 +837,7 @@ be_visitor_ami_pre_proc::visit_scope (be_scope *node)
// Continue until each element is visited.
while (elem_number < number_of_elements)
{
- AST_Decl *d = elements[elem_number];
+ AST_Decl *d = elements[elem_number++];
if (!d)
{
@@ -850,6 +850,11 @@ be_visitor_ami_pre_proc::visit_scope (be_scope *node)
}
+ if (!d->ami_visit())
+ {
+ continue;
+ }
+
be_decl *bd = be_decl::narrow_from_decl (d);
// Set the scope node as "node" in which the code is being
@@ -859,8 +864,6 @@ be_visitor_ami_pre_proc::visit_scope (be_scope *node)
// Set the node to be visited.
this->ctx_->node (bd);
- ++elem_number;
-
// Send the visitor.
if (bd == 0 || bd->accept (this) == -1)
diff --git a/TAO/TAO_IDL/be/be_visitor_scope.cpp b/TAO/TAO_IDL/be/be_visitor_scope.cpp
index 6605b8ebcce..c2902c45dc5 100644
--- a/TAO/TAO_IDL/be/be_visitor_scope.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_scope.cpp
@@ -62,6 +62,11 @@ be_visitor_scope::visit_scope (be_scope *node)
-1);
}
+ if (d->node_type () == AST_Decl::NT_annotation_decl)
+ {
+ continue;
+ }
+
be_decl *bd = be_decl::narrow_from_decl (d);
// Set the scope node as "node" in which the code is being
diff --git a/TAO/TAO_IDL/be/be_visitor_union/union.cpp b/TAO/TAO_IDL/be/be_visitor_union/union.cpp
index 89107416742..9ed497927ac 100644
--- a/TAO/TAO_IDL/be/be_visitor_union/union.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_union/union.cpp
@@ -171,19 +171,15 @@ be_visitor_union_cdr_op_cs::pre_process (be_decl *bd)
}
this->latest_branch_ = boolean_branch (b);
- switch (this->latest_branch_)
- {
- case BUB_TRUE:
- case BUB_FALSE:
+ if (this->latest_branch_ != BUB_NONE) {
+ if (this->latest_branch_ != BUB_UNCONDITIONAL) {
*os << "if (" << (this->latest_branch_ == BUB_TRUE ? "" : "!")
<< (this->ctx_->sub_state () == TAO_CodeGen::TAO_CDR_OUTPUT ?
"_tao_union._d ()" : "_tao_discriminant") << ")" << be_idt_nl
<< "{" << be_idt_nl;
- case BUB_UNCONDITIONAL:
- return 0;
- default:
- break;
}
+ return 0;
+ }
*os << be_nl;
diff --git a/TAO/TAO_IDL/be_include/be_global.h b/TAO/TAO_IDL/be_include/be_global.h
index a84c642cf7d..c989a617de9 100644
--- a/TAO/TAO_IDL/be_include/be_global.h
+++ b/TAO/TAO_IDL/be_include/be_global.h
@@ -929,7 +929,9 @@ public:
/// implementations in IDL and IFR backends.
ACE_CString spawn_options (void);
- /// Parse args that affect the backend.
+ /**
+ * Parse an argument that the frontend did not recognize.
+ */
void parse_args (long &i, char **av);
private:
diff --git a/TAO/TAO_IDL/docs/ANNOUNCEMENT b/TAO/TAO_IDL/docs/ANNOUNCEMENT
deleted file mode 100644
index 870db6f6006..00000000000
--- a/TAO/TAO_IDL/docs/ANNOUNCEMENT
+++ /dev/null
@@ -1,131 +0,0 @@
-WHAT:
-
-SunSoft, Inc., Mountain View, California, has placed the source code to
-Project DOE's Interface Definition Language (IDL) compiler front end
-(CFE) on OMG's file server, making the implementation publicly
-available. This release is identified by the version number 1.3.
-
-Project DOE is SunSoft's corporate-wide development effort to integrate
-distributed object technology into the Solaris O/S. OMG (Object Management
-Group) is the industry wide body formed to create specifications for
-distributed object technology. It currently has more than 370 members. OMG
-IDL is part of OMG's CORBA 1.1 specification and provides a standardized
-way for defining object interfaces. OMG IDL forms the basis for distributed
-object interactionin Project DOE.
-
-The SunSoft OMG IDL CFE provides a complete framework for building
-CORBA 1.1-compliant preprocessors for OMG IDL. By using this standard
-implementation, developers of OMG IDL compilers will save many months
-of work and enhance the portability and interoperability of OMG
-IDL-interfaced objects.
-
-The SunSoft OMG IDL CFE allows convenient and fast integration of new back
-ends to the compiler. The release consists of a front end which converts
-OMG IDL to an intermediate format, a compiler framework driver, an example
-implementation of a compiler back end, and a set of protocols for
-interaction between the front and back ends. The SunSoft OMG IDL CFE
-parser uses components generated by yacc and lex.
-
-The SunSoft OMG IDL CFE is designed to allow easy extension of OMG IDL
-without impacting existing back-end implementations. As the CORBA
-specification evolves, any new updates to the IDE CFE will be placed
-by SunSoft on the OMG server.
-
-This release provides a directory with many examples of OMG IDL
-specifications to allow users to become familiar with the process of
-writing OMG IDL code.
-
-For more information send email to idl-cfe@sun.com.
-
-HOW:
-
-The SunSoft OMG IDL CFE is available at no charge through anonymous FTP
-in source form on the OMG file server, omg.org. Please retrieve the
-file OMG_IDL_CFE_1.3.tar.Z from the directory pub/OMG_IDL_CFE_1.3. Please
-let us know who you are if you retrieve the compiler front end using this
-method, by sending email to idl-cfe@sun.com.
-
-You can also retrieve the software by using the OMG mail server program.
-Send email with the subject 'help' to omg_idl@omg.org, and the mail server
-will respond with instructions on how to retrieve the software.
-
-WHEN:
-
-The SunSoft OMG IDL CFE is available now.
-
-CONTACT:
-
-Please let us know who you are if you decide to use this software, and how
-you use it. Please send email to:
-
- idl-cfe@sun.com
-
-This address can also be used to report problems, bugs, suggestions and
-send general comments.
-
-We ask that if you make extensions or modifications to this source release,
-please make these extensions available to others using the OMG IDL compiler
-front end, by sending the modified sources to the above email address. This
-will help us evaluate your extensions for inclusion in a future version. It
-also ensures your investment in these extensions when new versions of the
-CFE are released.
-
-NOTE:
-
-SunOS, SunSoft, Sun, Solaris, Sun Microsystems or the Sun logo are
-trademarks or registered trademarks of Sun Microsystems, Inc.
-
-COPYRIGHT NOTICE:
-
-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
diff --git a/TAO/TAO_IDL/docs/CHANGES b/TAO/TAO_IDL/docs/CHANGES
deleted file mode 100644
index ae6fca7bcea..00000000000
--- a/TAO/TAO_IDL/docs/CHANGES
+++ /dev/null
@@ -1,122 +0,0 @@
-CHANGES WHICH AFFECT BE WRITERS
--=============================-
-
-INTRODUCTION
-
-This file describes changes that affect BE writers. It contains IMPORTANT
-INFORMATION for BE writers who wish to migrate a BE written to operate with
-release 1.2 to operate with release 1.3. It is likely that not following
-these instructions will result in a compilable but malfunctioning compiler.
-
-AST INHERITANCE CHANGES
-
-The AST has been reorganized so that AST_Union and AST_Exception now
-inherit from AST_Structure. This means that constructors of BE classes
-which inherit from AST_Union or AST_Exception now need to explicitly call
-an initializer for AST_Structure in their init section.
-
-We repeat below the information given in the file WRITING_A_BE, in the
-section entitled "WRITING A BE".
-
-AST_EXCEPTION
-
-The signature for constructors of classes inheriting from AST_Exception
-should now be:
-
- BE_Exception::BE_Exception(UTL_ScopedName *n,
- UTL_StrList *p)
- : AST_Decl(AST_Decl::NT_except, n, p),
- AST_Structure(AST_Decl::NT_except, n, p),
- UTL_Scope(AST_Decl::NT_except)
-
-AST_UNION
-
-The signature for constructors of classes inheriting from AST_Union should
-now be:
-
- BE_Union::BE_Union(AST_ConcreteType *dt,
- UTL_ScopedName *n,
- UTL_StrList *p)
- : AST_Union(dt, n, p),
- AST_Structure(AST_Decl::NT_union, n, p),
- AST_Decl(AST_Decl::NT_union, n, p),
- UTL_Scope(AST_Decl::NT_union)
-
-IDL_BOOL TYPE
-
-To increase portability and reduce dependency of the sources on POSIX
-compliance in targets of ports, IDL now provides its own boolean type which
-is named idl_bool. It provides two truth values, I_TRUE and I_FALSE.
-
-UTL_SCOPEDNAME TYPE
-
-The UTL_ScopedName type is now a list of Identifier nodes; in previous
-releases it used to be a list of String nodes. If your BE constructs scoped
-names this change will prevent recompilation until you modify your
-constructor calls to invoke constructors for Identifier instead of for
-String. The signature of the constructor is:
-
- Identifier::Identifier(char *, long x=1, long y=0, long z=I_FALSE)
-
-The additional arguments which can be defaulted to the values indicated are
-included for future use.
-
-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.
diff --git a/TAO/TAO_IDL/docs/README.md b/TAO/TAO_IDL/docs/README.md
new file mode 100644
index 00000000000..f9a0bacbda0
--- /dev/null
+++ b/TAO/TAO_IDL/docs/README.md
@@ -0,0 +1,54 @@
+# TAO\_IDL Developer Documentation
+
+## Topics
+
+- [Historical Document Describing How to Write a Backend](WRITING_A_BE).
+- [Creating Annotations for IDLv4](annotations.md)
+- [Less Relevant Historical Documents from Sun](historical)
+
+## TAO\_IDL Layout
+
+TAO\_IDL is broken up into a few different modules, these can be generalized
+as:
+
+- `AST`
+ - "Abstract Syntax Tree"
+ - Nodes representing the Abstract Syntax Tree
+- `FE`
+ - "Front End"
+ - Parsing functionality that generates the Abstract Syntax Tree.
+ - Among other things, contains the Bison grammar `fe/idl.ypp` and Flex
+ token `fe/idl.ll` files.
+- `BE`
+ - "Back End"
+ - Transformed Abstract Syntax Tree
+- `UTL`
+ - "Util"
+ - Utility Classes and Functions.
+ - Contains class for the `idl_global` singleton which is made up of
+ `include/idl_global.h` and `utl/utl_global.cpp`.
+- `DRV`
+ - "Driver"
+ - The `tao_idl` program it self which drives the other modules.
+
+Lacking namespaces for the most part, in TAO\_IDL function and class names
+generally start with these modules, using the "C" way of emulating namespaces.
+
+The modules are broken into these places on the file system:
+
+- `include`
+ - Contains the header files for AST, FE, and UTL modules.
+- `ast`
+ - Contains the source files for AST modules classes.
+- `fe`
+ - Contains the source files and some header files for the FE module
+- `be_include`
+ - Contains the header files for the BE module.
+- `be`
+ - Contains the source files for the BE module.
+- `driver`
+ - Contains some parts of DRV.
+- `util`
+ - Contains the souce files for the UTL module.
+- `narrow`
+ - Leftover from a custom casting system.
diff --git a/TAO/TAO_IDL/docs/WRITING_A_BE b/TAO/TAO_IDL/docs/WRITING_A_BE
index 5c3c069f7a1..e0141e8987b 100644
--- a/TAO/TAO_IDL/docs/WRITING_A_BE
+++ b/TAO/TAO_IDL/docs/WRITING_A_BE
@@ -1,3 +1,8 @@
+WARNING! This document is historical but left out of the historical directory
+because it describes the basic architecture of the compiler that mostly still
+apply as of writing. Refer to the code itself for up to date information such
+as what AST Nodes are in use.
+
OMG INTERFACE DEFINITION LANGUAGE COMPILER FRONT END PROTOCOLS
==============================================================
diff --git a/TAO/TAO_IDL/docs/annotations.md b/TAO/TAO_IDL/docs/annotations.md
new file mode 100644
index 00000000000..29975088b96
--- /dev/null
+++ b/TAO/TAO_IDL/docs/annotations.md
@@ -0,0 +1,502 @@
+# Implementing Annotations
+
+**How to use the internal API to implement built-in annotations in `tao_idl` or a
+compiler that uses `tao_idl`.**
+
+**Table of Contents:**
+
+<!-- vim-markdown-toc GFM -->
+
+* [IDL Annotations](#idl-annotations)
+ * [Special Cases of Annotations](#special-cases-of-annotations)
+ * [Unions Discriminators](#unions-discriminators)
+ * [Base Types in Sequences](#base-types-in-sequences)
+ * [Base Types in Arrays](#base-types-in-arrays)
+* [Defining Annotations](#defining-annotations)
+ * [`@document` Example](#document-example)
+ * [What Can Go in Annotations](#what-can-go-in-annotations)
+* [Reading Annotations in the AST](#reading-annotations-in-the-ast)
+ * [Reading `@document` Annotations](#reading-document-annotations)
+ * [Reading Annotations Manually](#reading-annotations-manually)
+ * [Reading Special Cases of Annotations](#reading-special-cases-of-annotations)
+ * [Unions Discriminators](#unions-discriminators-1)
+ * [Base Types in Sequences](#base-types-in-sequences-1)
+ * [Base Types in Arrays](#base-types-in-arrays-1)
+* [Limitations](#limitations)
+
+<!-- vim-markdown-toc -->
+
+## IDL Annotations
+
+Annotations are a feature of IDLv4 that allows IDL authors to pass hints to the
+IDL compiler that can change compiler behavior and code generation. They are
+similar to some uses of `#pragma`, but are more powerful because they are
+integrated with IDL and are more expressive. In the latest IDL specification as
+of writing, version 4.2, they are described in section 7.4.15.1.
+
+Annotations exist in other languages like Java, Python (as decorators), and C#
+(as attributes). Like Java and Python, annotations can appear in front of
+declarations, have `@` at the beginning, and can look like function call.
+
+Here is what an example of IDL using some OMG standard annotations might look
+like:
+
+```
+enum Urgency_t {
+ SUPPLEMENTARY,
+ @default_literal INFORMATIVE,
+ CRITICAL
+};
+
+@unit("Hour(s)")
+@range(min=0,max=23)
+typedef short Hours_t;
+
+@unit("Day(s)")
+typedef unsigned long Days_t;
+
+struct Time_t {
+ Hours_t hours;
+ Days_t days;
+};
+
+@mutable
+struct Report {
+ @key
+ unsigned long index;
+
+ @optional
+ Expiration_t expiration;
+
+ @optional
+ Urgency_t urgency;
+
+ string message;
+};
+```
+
+### Special Cases of Annotations
+
+Annotations "may be applied to any IDL constructs or sub-constructs", as
+defined by the OMG. This is very vague and the OMG has not clarified this as of
+IDL 4.2. [(Also see Limitation #1)](#limitation1). What can be said about it
+though is that other than before normal declarations, like before structs,
+typedefs, and constants, in TAO\_IDL as of writing, annotations can also be
+applied in the following cases. See ["Reading Special Cases of
+Annotations"](#reading-special-cases-of-annotations) for how to have the
+compiler use these kinds of annotations.
+
+#### Unions Discriminators
+
+```
+enum GradeType {
+ PASS_FAIL,
+ PASS_70,
+ PASS_80
+};
+union Grade (@key GradeType) {
+case PASS_FAIL:
+ boolean pass;
+case PASS_70:
+case PASS_80:
+default:
+ short grade;
+};
+```
+
+#### Base Types in Sequences
+
+```
+struct Event {
+ short data;
+};
+typedef sequence<@external Report, 12> Dozen_Events;
+```
+
+#### Base Types in Arrays
+
+```
+struct Event {
+ short data;
+};
+typedef Dozen_Events Event @external [12];
+```
+
+## Defining Annotations
+
+Annotations should be defined after the AST is initialized and ready to be
+used, but before any user defined IDL is processed. The recommended place for
+this is `BE_post_init ()` which is located in `be/be_init.cpp` in `tao_idl`.
+Annotations are nodes in the AST and could be defined by hand, simulating what
+happens in `fe/idl.yy`. However a string parsing utility has been added just
+for this purpose, `idl_global->eval (const char* idl)`. `eval ()` processes IDL
+as if it were in an IDL file so annotations can be defined using the IDL
+annotation notation.
+
+### `@document` Example
+
+As a simple example, If we wanted to make a annotation that inserted comments
+into the product files for documentation purposes, we could design an
+annotation like this this:
+
+```
+@annotation document {
+ enum API_Type {
+ INTERNAL_API,
+ USER_API,
+ LEGACY_API
+ };
+ string comment;
+ API_Type api_type default INTERNAL_API;
+ boolean deprecated default FALSE;
+};
+```
+
+To use it without defining it in every IDL file, we need to embed it into
+`BE_post_init()`.
+
+```C++
+void BE_post_init (char *[], long)
+{
+ // ...
+ if (idl_global->idl_version_ > IDL_VERSION_3)
+ {
+ idl_global->eval (
+ "@annotation document {\n"
+ " enum API_Type {\n"
+ " INTERNAL_API,\n"
+ " USER_API,\n"
+ " LEGACY_API\n"
+ " };\n"
+ " string comment;\n"
+ " API_Type api_type default INTERNAL_API;\n"
+ " boolean deprecated default FALSE;\n"
+ "};\n"
+ );
+ }
+ // ...
+}
+```
+
+The new lines aren't strictly necessary but might help if a syntax error occurs
+because it will refer to the line number of this string as though it was a file
+called "builtin". This might not be helpful as it could be, because it won't
+distinguish between multiple calls to `eval` when reporting an error.
+
+By default TAO\_IDL uses IDL3 and this will cause an error when parsing the
+annotations. Version is controlled using `--idl-version` command line argument
+and ultimately `idl_global->idl_version_`. In the example above we would have
+to pass `--idl-version 4`.
+
+We can set it to use IDL4 by default in `BE_init ()`:
+
+```C++
+int BE_init (int &, ACE_TCHAR *[])
+{
+ // ...
+ idl_global->default_idl_version_ = IDL_VERSION_4;
+ // ...
+}
+
+void BE_post_init (char *[], long)
+{
+ // Same as above ...
+}
+```
+
+In TAO\_IDL, `idl_global->default_idl_version_` sets `idl_global->idl_version_`
+after `BE_init` is called but before arguments are parsed. This gives the user
+a chance to override it if they really want to and allows them to query the
+version we're setting using `--default-idl-version`.
+
+Alternatively if it is desired to retain compatibility with older versions of
+TAO, use the `TAO_IDL_HAS_ANNOTATIONS` macro.
+
+```C++
+int BE_init (int &, ACE_TCHAR *[])
+{
+ // ...
+#ifdef TAO_IDL_HAS_ANNOTATIONS
+ idl_global->default_idl_version_ = IDL_VERSION_4;
+#endif
+ // ...
+}
+
+void BE_post_init (char *[], long)
+{
+ // ...
+#ifdef TAO_IDL_HAS_ANNOTATIONS
+ if (idl_global->idl_version_ > IDL_VERSION_3)
+ {
+ idl_global->eval (
+ // ...
+ );
+ }
+#endif
+ // ...
+}
+```
+
+This would also be used when reading the annotations later.
+
+<a name="document-usage"></a>
+Once the annotation is declared, it can be used in IDL:
+
+```
+@document("Struct with 1 member")
+struct struct1 {
+ short x;
+};
+
+@document(
+ comment="Struct with 2 members",
+ api_type=USER_API
+)
+struct struct2 {
+ short x, y;
+};
+
+@document(
+ comment="Struct with 3 members",
+ api_type=LEGACY_API,
+ deprecated=TRUE
+)
+struct struct3 {
+ short x, y, z;
+};
+```
+
+However it won't do anything because nothing using the AST is looking for it,
+so it will be ignored. To make the program aware of the annotations, see
+["Reading Annotations in the AST"](#reading-annotations-in-the-ast) below.
+
+### What Can Go in Annotations
+
+- Annotations members can be of any type that constants can be. This includes
+booleans, integers, floats, enumerations, characters, and strings.
+- Enumerations, constants, and typedefs can be declared inside the annotation
+declaration, however they can not used outside the annotation expect for when
+passing them as parameters to the same annotation. Otherwise normal scope rules
+apply: Valid constant types and values from outside the annotation can be used
+inside it.
+
+## Reading Annotations in the AST
+
+To get the annotations for most nodes types, get a reference or pointer to the
+`ACE_Vector` of Annotations using `node->annotations()` and pass it to
+`UTL_find_annotation` to get the annotation. From there use index operators
+`[]` on the annotation to get the individual members and `value()` to get the
+value. The last part is not straightforward, as we have to deal with the
+`AST_Expression` class which is the internal class of TAO\_IDL that holds
+constant values.
+
+Internally, annotation local names are prefixed with `@` to prevent clashes
+with other elements in IDL with the same name. For example when trying to use
+`UTL_find_annotation` with annotation named `bar` in a module named `foo`, the
+proper internal scoped name to pass as the second argument is either
+`foo::@bar` or `::foo::@bar` if we want to be explicit that `foo` is in the
+root module.
+
+### Reading `@document` Annotations
+
+In this example we will use the [`@document` annotation defined
+above](#document-example) to generate Doxygen comments in the C++ code
+generated. For simplicity's sake, we will limit this example to structs defined
+in TAO client headers. This can be accomplished by modifying the struct
+visitor in `be/be_visitor_structure/structure_ch.cpp`.
+
+At the top of the file, these includes should be added:
+
+```C++
+#include "ast_annotation_member.h"
+#include "utl_annotations.h"
+#include "utl_string.h"
+#include "ast_enum_val.h"
+```
+
+About midway though the file, in
+`int be_visitor_structure_ch::visit_structure (be_structure *node)`
+right before
+```C++
+*os << be_nl_2
+ << "struct " // ...
+```
+these lines would also need to be added:
+
+```C++
+ AST_Annotation_Appl *document =
+ UTL_find_annotation (node->annotations (), "::@document");
+ if (document)
+ {
+ const char *comment =
+ AST_Annotation_Member::narrow_from_decl ((*document)["comment"])->
+ value ()->ev ()->u.strval->get_string ();
+
+ bool deprecated =
+ AST_Annotation_Member::narrow_from_decl ((*document)["deprecated"])->
+ value ()->ev ()->u.bval;
+
+ /*
+ * This is more complicated because we are trying to get the name of
+ * the enumerator. If we just wanted the number value, we could treat the
+ * AST_Expresssion from the annotation member as a unsigned long by using
+ * ev()->u.ulval.
+ */
+ const char *api_type = 0;
+ AST_Expression *api_type_val =
+ AST_Annotation_Member::narrow_from_decl ((*document)["api_type"])->
+ value ();
+ AST_Enum *api_type_enum = api_type_val->enum_parent();
+ if (api_type_enum)
+ {
+ AST_EnumVal *enum_val =
+ api_type_enum->lookup_by_value (api_type_val);
+ if (enum_val)
+ {
+ api_type = enum_val->local_name ()->get_string ();
+ }
+ }
+
+ *os
+ << "/**" << be_nl
+ << " * " << comment << be_nl
+ ;
+
+ if (api_type)
+ {
+ *os
+ << " *" << be_nl
+ << " * API_TYPE: " << api_type << be_nl
+ ;
+ }
+
+ if (deprecated)
+ {
+ *os
+ << " *" << be_nl
+ << " * \\deprecated This is deprecated" << be_nl
+ ;
+ }
+ *os << " */";
+ }
+```
+
+Using the [`@document` use example from above](#document-usage), these are
+inserted into the client header file:
+
+```C++
+// ...
+/**
+ * Struct with 1 member
+ *
+ * API_TYPE: INTERNAL_API
+ */
+struct struct1
+{
+ // ...
+};
+
+// ...
+
+/**
+ * Struct with 2 members
+ *
+ * API_TYPE: USER_API
+ */
+struct struct2
+{
+ // ...
+};
+
+/**
+ * Struct with 3 members
+ *
+ * API_TYPE: LEGACY_API
+ *
+ * \deprecated This is deprecated
+ */
+struct struct3
+{
+ // ...
+};
+// ...
+```
+
+#### Reading Annotations Manually
+
+`UTL_find_annotation` is convenient but only returns the last annotation of the
+passed annotation type. If we want the first one, handle multiple annotations
+of the same type, or read all the annotations, we will have to do what
+`UTL_find_annotation` is doing for us, which is just iterating over the
+`ACE_Vector` of `AST_Annotation_Appl`.
+
+```C++
+ AST_Annotation_Appls &annotations;
+ AST_Annotation_Decl *annotation;
+ for (AST_Annotation_Appls::iterator i = annotations.begin ();
+ i != annotations.end (); ++i)
+ {
+ AST_Annotation_Appl *appl = *i;
+ if (appl && appl->annotation_decl () == annotation)
+ {
+ // Do work with annotation application
+ }
+ }
+```
+
+### Reading Special Cases of Annotations
+
+Annotations placed before a definition in a scope are interpreted as annotating
+the node that is being defined. Annotations in other places require special
+grammar and special handling in the API.
+
+The following cases shows how to get the last annotation called `anno` from
+these special cases.
+
+If a type is `typedef`-ed, resolve it completely using `AST_Type
+*primitive_base_type ()` and `dynamic_cast` to the correct type before trying
+to read these special cases.
+
+#### Unions Discriminators
+
+**[See IDL Example](#unions-discriminators)**
+
+```C++
+ AST_Union *node;
+ AST_Annotation_Appl *document =
+ UTL_find_annotation (node->disc_annotations (), "::@anno");
+```
+
+#### Base Types in Sequences
+
+**[See IDL Example](#base-types-in-sequences)**
+
+```C++
+ AST_Sequence *node;
+ AST_Annotation_Appl *document =
+ UTL_find_annotation (node->base_type_annotations (), "::@anno");
+```
+
+#### Base Types in Arrays
+
+**[See IDL Example](#base-types-in-arrays)**
+
+```C++
+ AST_Array *node;
+ AST_Annotation_Appl *document =
+ UTL_find_annotation (node->base_type_annotations (), "::@anno");
+```
+
+## Limitations
+
+The current limitations exist in TAO\_IDL annotation implementation as of writing:
+
+<a name="limitation1"></a>
+1. Because of lack of a proper grammar specification in IDL for where
+ annotations can go, annotations in places other than before declarations in
+ scopes and other places listed above will result in syntax errors, even if
+ they work with other IDL tools.
+
+2. Even though this is implicitly allowed by the IDL specification, Annotations
+ whose local names clash with IDL keywords are not supported. This includes
+ the OMG standard annotations `default` and `oneway`.
diff --git a/TAO/TAO_IDL/ANNOUNCEMENT b/TAO/TAO_IDL/docs/historical/ANNOUNCEMENT
index 870db6f6006..870db6f6006 100644
--- a/TAO/TAO_IDL/ANNOUNCEMENT
+++ b/TAO/TAO_IDL/docs/historical/ANNOUNCEMENT
diff --git a/TAO/TAO_IDL/docs/BUG_REPORT b/TAO/TAO_IDL/docs/historical/BUG_REPORT
index 28c34ae141d..28c34ae141d 100644
--- a/TAO/TAO_IDL/docs/BUG_REPORT
+++ b/TAO/TAO_IDL/docs/historical/BUG_REPORT
diff --git a/TAO/TAO_IDL/CHANGES b/TAO/TAO_IDL/docs/historical/CHANGES
index ae6fca7bcea..ae6fca7bcea 100644
--- a/TAO/TAO_IDL/CHANGES
+++ b/TAO/TAO_IDL/docs/historical/CHANGES
diff --git a/TAO/TAO_IDL/docs/CLI b/TAO/TAO_IDL/docs/historical/CLI
index a61c2bae365..a61c2bae365 100644
--- a/TAO/TAO_IDL/docs/CLI
+++ b/TAO/TAO_IDL/docs/historical/CLI
diff --git a/TAO/TAO_IDL/docs/INSTALL b/TAO/TAO_IDL/docs/historical/INSTALL
index 6fcaa710042..6fcaa710042 100644
--- a/TAO/TAO_IDL/docs/INSTALL
+++ b/TAO/TAO_IDL/docs/historical/INSTALL
diff --git a/TAO/TAO_IDL/docs/PROBLEMS b/TAO/TAO_IDL/docs/historical/PROBLEMS
index 65cfb6a1893..65cfb6a1893 100644
--- a/TAO/TAO_IDL/docs/PROBLEMS
+++ b/TAO/TAO_IDL/docs/historical/PROBLEMS
diff --git a/TAO/TAO_IDL/docs/README b/TAO/TAO_IDL/docs/historical/README
index 700c1c1a707..700c1c1a707 100644
--- a/TAO/TAO_IDL/docs/README
+++ b/TAO/TAO_IDL/docs/historical/README
diff --git a/TAO/TAO_IDL/docs/ROADMAP b/TAO/TAO_IDL/docs/historical/ROADMAP
index 5da0d83823c..5da0d83823c 100644
--- a/TAO/TAO_IDL/docs/ROADMAP
+++ b/TAO/TAO_IDL/docs/historical/ROADMAP
diff --git a/TAO/TAO_IDL/driver/drv_args.cpp b/TAO/TAO_IDL/driver/drv_args.cpp
index 31e4984c9b2..1f81a9f6c11 100644
--- a/TAO/TAO_IDL/driver/drv_args.cpp
+++ b/TAO/TAO_IDL/driver/drv_args.cpp
@@ -76,6 +76,7 @@ trademarks or registered trademarks of Sun Microsystems, Inc.
#include "be_util.h"
#include "ace/OS_NS_stdio.h"
+#include "ace/OS_NS_stdlib.h"
#include "ace/OS_NS_unistd.h"
#include "ace/os_include/os_ctype.h"
#include "ace/Lib_Find.h"
@@ -83,6 +84,8 @@ trademarks or registered trademarks of Sun Microsystems, Inc.
extern long DRV_nfiles;
extern char *DRV_files[];
+void process_long_option(long ac, char **av, long &i);
+
// Push a file into the list of files to be processed
void
DRV_push_file (const char *s)
@@ -118,94 +121,64 @@ void
DRV_usage (void)
{
ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("%C: usage: %C [flag | file]*\n"),
+ ACE_TEXT ("%C: usage: %C [[flag|file] ...] [-- file ...]\n"),
idl_global->prog_name (),
idl_global->prog_name ()));
ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("Legal flags:\n")));
- ACE_DEBUG ((
- LM_DEBUG,
- ACE_TEXT (" -A...\t\t\tlocal implementation-specific escape\n")
- ));
- ACE_DEBUG ((
- LM_DEBUG,
- ACE_TEXT (" -Cw\t\t\tWarning if identifier spellings differ ")
- ACE_TEXT ("only in case (default is error)\n")
- ));
- ACE_DEBUG ((
- LM_DEBUG,
- ACE_TEXT (" -Ce\t\t\tError if identifier spellings differ ")
- ACE_TEXT ("only in case (default)\n")
- ));
- ACE_DEBUG ((
- LM_DEBUG,
- ACE_TEXT (" -ae\t\t\tError if anonymous type is seen ")
- ACE_TEXT ("(default)\n")
- ));
- ACE_DEBUG ((
- LM_DEBUG,
- ACE_TEXT (" -aw\t\t\tWarning if anonymous type is seen ")
- ACE_TEXT ("(default is error)\n")
- ));
- ACE_DEBUG ((
- LM_DEBUG,
- ACE_TEXT (" -as\t\t\tSilences the anonymous type diagnostic ")
- ACE_TEXT ("(default is error)\n")
- ));
- ACE_DEBUG ((
- LM_DEBUG,
- ACE_TEXT (" -d\t\t\tOutputs (to stdout) a dump of the AST\n")
- ));
- ACE_DEBUG ((
- LM_DEBUG,
- ACE_TEXT (" -Dname[=value]\t\tdefines name for preprocessor\n")
- ));
- ACE_DEBUG ((
- LM_DEBUG,
- ACE_TEXT (" -E\t\t\truns preprocessor only, prints on stdout\n")
- ));
- ACE_DEBUG ((
- LM_DEBUG,
- ACE_TEXT (" -Idir\t\t\tincludes dir in search path for preprocessor\n")
- ));
- ACE_DEBUG ((
- LM_DEBUG,
- ACE_TEXT (" -t\t\t\tTemporary directory to be used")
- ACE_TEXT (" by the IDL compiler.\n")
- ));
- ACE_DEBUG ((
- LM_DEBUG,
- ACE_TEXT (" -u\t\t\tprints usage message and exits\n")
- ));
- ACE_DEBUG ((
- LM_DEBUG,
- ACE_TEXT (" -Uname\t\t\tundefines name for preprocessor\n")
- ));
- ACE_DEBUG ((
- LM_DEBUG,
- ACE_TEXT (" -v\t\t\ttraces compilation stages\n")
- ));
- ACE_DEBUG ((
- LM_DEBUG,
- ACE_TEXT (" -V\t\t\tprints version info then exits\n")
- ));
- ACE_DEBUG ((
- LM_DEBUG,
- ACE_TEXT (" -w\t\t\tsuppresses IDL compiler warning messages\n")
- ));
- ACE_DEBUG ((
- LM_DEBUG,
- ACE_TEXT (" -Wp,<arg1,...,argn>\tpasses args to preprocessor\n")
- ));
- ACE_DEBUG ((
- LM_DEBUG,
- ACE_TEXT (" -Yp,path\t\tdefines location of preprocessor\n")
- ));
+ ACE_TEXT ("Legal flags:\n")
+ ACE_TEXT (" -h | --help | -u\tPrint this list and exit successfully\n")
+ ACE_TEXT (" -A...\t\t\tlocal implementation-specific escape\n")
+ ACE_TEXT (" -Cw\t\t\tWarning if identifier spellings differ ")
+ ACE_TEXT ("only in case (default is error)\n")
+ ACE_TEXT (" -Ce\t\t\tError if identifier spellings differ ")
+ ACE_TEXT ("only in case (default)\n")
+ ACE_TEXT (" -ae\t\t\tError if anonymous type is seen ")
+ ACE_TEXT ("(default)\n")
+ ACE_TEXT (" -aw\t\t\tWarning if anonymous type is seen ")
+ ACE_TEXT ("(default is error)\n")
+ ACE_TEXT (" -as\t\t\tSilences the anonymous type diagnostic ")
+ ACE_TEXT ("(default is error)\n")
+ ACE_TEXT (" -d | --dump\t\tPrints a dump of the AST and exits\n")
+ ACE_TEXT (" -Dname[=value]\t\tdefines name for preprocessor\n")
+ ACE_TEXT (" -E\t\t\truns preprocessor only, prints on stdout\n")
+ ACE_TEXT (" -Idir\t\t\tincludes dir in search path for preprocessor\n")
+ ACE_TEXT (" -t\t\t\tTemporary directory to be used")
+ ACE_TEXT (" by the IDL compiler.\n")
+ ACE_TEXT (" -Uname\t\t\tundefines name for preprocessor\n")
+ ACE_TEXT (" -v\t\t\ttraces compilation stages\n")
+ ACE_TEXT (" -V | --version\t\tprints version info then exits\n")
+ ACE_TEXT (" -w\t\t\tsuppresses IDL compiler warning messages\n")
+ ACE_TEXT (" -Wp,<arg1,...,argn>\tpasses args to preprocessor\n")
+ ACE_TEXT (" -Yp,path\t\tdefines location of preprocessor\n")
+ ACE_TEXT (" --idl-version VERSION\tSet the version of IDL to use\n")
+ ACE_TEXT (" --default-idl-version\tPrint the default IDL version and exit\n")
+ ACE_TEXT (" --list-idl-versions\tPrint IDL versions supported and exit\n")
+ ACE_TEXT (" --syntax-only\t\tJust check the syntax, do not create files\n")
+ ACE_TEXT (" --bison-trace\t\tEnable Bison Tracing (sets yydebug to 1)\n")
+ ACE_TEXT (" --dump-builtins\tDump the compiler and user defined IDL.\n")
+ ACE_TEXT (" --just-dump-builtins\tJust dump the compiler defined IDL and exit.\n")
+ ACE_TEXT (" --unknown-annotations ARG\t")
+ ACE_TEXT ("Set reaction to unknown annotations. ARG must be one of the following:\n")
+ ACE_TEXT ("\t\t\t\twarn-once\tThe default, warn once per unique local name\n")
+ ACE_TEXT ("\t\t\t\twarn-all\tWarn for all unknown annotations\n")
+ ACE_TEXT ("\t\t\t\terror\t\tCauses the process to exit with a failed return status\n")
+ ACE_TEXT ("\t\t\t\tignore\t\tDon't report unknown annotations\n")
+ ));
be_util::usage ();
}
+#define UNKNOWN_OPTION \
+ ACE_ERROR (( \
+ LM_ERROR, \
+ ACE_TEXT ("IDL: I don't understand") \
+ ACE_TEXT (" the '%s' option\n"), \
+ ACE_TEXT_CHAR_TO_TCHAR (av[i]) \
+ )); \
+ idl_global->parse_args_exit (1); \
+ return;
+
// Parse arguments on command line
void
DRV_parse_args (long ac, char **av)
@@ -215,13 +188,16 @@ DRV_parse_args (long ac, char **av)
long i;
bool has_space = false;
+ // After -- process all arguments as files
+ bool just_files = false;
+
FE_store_env_include_paths ();
DRV_cpp_init ();
idl_global->set_prog_name (av[0]);
for (i = 1; i < ac; i++)
{
- if (av[i][0] == '-')
+ if (!just_files && av[i][0] == '-')
{
idl_global->append_idl_flag (av[i]);
@@ -234,10 +210,9 @@ DRV_parse_args (long ac, char **av)
ACE_TEXT ("IDL: Space between dash and option ")
ACE_TEXT ("letters not allowed\n")
));
+ idl_global->parse_args_exit (1);
+ return;
- ++i;
- idl_global->set_err_count (idl_global->err_count () + 1);
- break;
case 'A':
if (av[i][2] == '\0')
{
@@ -253,12 +228,9 @@ DRV_parse_args (long ac, char **av)
ACE_TEXT ("IDL: incorrect use of ")
ACE_TEXT ("the -A option\n")
));
+ idl_global->parse_args_exit (1);
+ return;
- idl_global->set_compile_flags (
- idl_global->compile_flags ()
- | IDL_CF_ONLY_USAGE
- );
- break;
}
}
else
@@ -287,13 +259,8 @@ DRV_parse_args (long ac, char **av)
}
else
{
- ACE_ERROR ((
- LM_ERROR,
- ACE_TEXT ("IDL: I don't understand")
- ACE_TEXT (" the '%s' option\n"),
- ACE_TEXT_CHAR_TO_TCHAR (av[i])
- ));
- }
+ UNKNOWN_OPTION;
+ }
break;
// Temp directory for the IDL compiler to keep its files.
@@ -306,17 +273,7 @@ DRV_parse_args (long ac, char **av)
}
else
{
- ACE_ERROR ((
- LM_ERROR,
- ACE_TEXT ("IDL: I don't understand")
- ACE_TEXT (" the '%s' option\n"),
- ACE_TEXT_CHAR_TO_TCHAR (av[i])
- ));
-
- idl_global->set_compile_flags (
- idl_global->compile_flags ()
- | IDL_CF_ONLY_USAGE
- );
+ UNKNOWN_OPTION;
}
break;
@@ -343,18 +300,7 @@ DRV_parse_args (long ac, char **av)
}
else
{
- ACE_ERROR ((
- LM_ERROR,
- ACE_TEXT ("IDL: I don't understand")
- ACE_TEXT (" the '%s' option\n"),
- ACE_TEXT_CHAR_TO_TCHAR (av[i])
- ));
-
- idl_global->set_compile_flags (
- idl_global->compile_flags ()
- | IDL_CF_ONLY_USAGE
- );
- break;
+ UNKNOWN_OPTION;
}
}
else
@@ -374,12 +320,19 @@ DRV_parse_args (long ac, char **av)
break;
case 'E':
+ if (av[i][2] != '\0')
+ {
+ UNKNOWN_OPTION;
+ }
idl_global->set_compile_flags (idl_global->compile_flags () |
IDL_CF_ONLY_PREPROC);
break;
case 'V':
- idl_global->set_compile_flags (idl_global->compile_flags () |
- IDL_CF_VERSION);
+ if (av[i][2] != '\0')
+ {
+ UNKNOWN_OPTION;
+ }
+ idl_global->print_version ();
break;
case 'W':
if (av[i][2] == '\0')
@@ -391,18 +344,7 @@ DRV_parse_args (long ac, char **av)
}
else
{
- ACE_ERROR ((
- LM_ERROR,
- ACE_TEXT ("IDL: I don't understand")
- ACE_TEXT (" the '%s' option\n"),
- ACE_TEXT_CHAR_TO_TCHAR (av[i])
- ));
-
- idl_global->set_compile_flags (
- idl_global->compile_flags ()
- | IDL_CF_ONLY_USAGE
- );
- break;
+ UNKNOWN_OPTION;
}
}
else
@@ -417,12 +359,9 @@ DRV_parse_args (long ac, char **av)
LM_ERROR,
ACE_TEXT ("IDL: Incorrect use of -W option\n")
));
+ idl_global->parse_args_exit (1);
+ return;
- idl_global->set_compile_flags (
- idl_global->compile_flags ()
- | IDL_CF_ONLY_USAGE
- );
- break;
case 'p':
if (*(s + 1) == ',')
{
@@ -450,18 +389,7 @@ DRV_parse_args (long ac, char **av)
}
else
{
- ACE_ERROR ((
- LM_ERROR,
- ACE_TEXT ("IDL: I don't understand")
- ACE_TEXT (" the '%s' option\n"),
- ACE_TEXT_CHAR_TO_TCHAR (av[i])
- ));
-
- idl_global->set_compile_flags (
- idl_global->compile_flags ()
- | IDL_CF_ONLY_USAGE
- );
- break;
+ UNKNOWN_OPTION;
}
}
else
@@ -484,11 +412,8 @@ DRV_parse_args (long ac, char **av)
ACE_TEXT ("IDL: I don't understand")
ACE_TEXT (" the '-Y' option\n")
));
-
- idl_global->set_compile_flags (
- idl_global->compile_flags ()
- | IDL_CF_ONLY_USAGE
- );
+ idl_global->parse_args_exit (1);
+ return;
}
break;
@@ -499,27 +424,30 @@ DRV_parse_args (long ac, char **av)
ACE_TEXT (" %s with the '-Y' option\n"),
ACE_TEXT_CHAR_TO_TCHAR (s)
));
-
- idl_global->set_compile_flags (
- idl_global->compile_flags ()
- | IDL_CF_ONLY_USAGE
- );
- break;
+ idl_global->parse_args_exit (1);
+ return;
}
break;
case 'd':
- idl_global->set_compile_flags (idl_global->compile_flags ()
- | IDL_CF_DUMP_AST);
- break;
- case 'u':
- idl_global->set_compile_flags (idl_global->compile_flags ()
- | IDL_CF_ONLY_USAGE);
+ if (av[i][2] != '\0')
+ {
+ UNKNOWN_OPTION;
+ }
+ idl_global->dump_ast ();
break;
case 'v':
+ if (av[i][2] != '\0')
+ {
+ UNKNOWN_OPTION;
+ }
idl_global->set_compile_flags (idl_global->compile_flags ()
| IDL_CF_INFORMATIVE);
break;
case 'w':
+ if (av[i][2] != '\0')
+ {
+ UNKNOWN_OPTION;
+ }
idl_global->set_compile_flags (idl_global->compile_flags ()
| IDL_CF_NOWARNINGS);
break;
@@ -537,28 +465,48 @@ DRV_parse_args (long ac, char **av)
}
else
{
- ACE_ERROR ((
- LM_ERROR,
- ACE_TEXT ("IDL: I don't understand the '%s' option\n"),
- ACE_TEXT_CHAR_TO_TCHAR (av[i])
- ));
+ UNKNOWN_OPTION;
+ }
+
+ break;
- idl_global->set_compile_flags (
- idl_global->compile_flags ()
- | IDL_CF_ONLY_USAGE
- );
+ case 'u': // Old Help Option
+ if (av[i][2] != '\0')
+ {
+ UNKNOWN_OPTION;
}
+ idl_global->print_help ();
+ break;
+
+ case 'h': // Short Help Option, else let be_global process it
+ if (av[i][2] == '\0') {
+ idl_global->print_help ();
+ } else {
+ be_global->parse_args (i, av);
+ }
+ break;
+ case '-': // -- or Long Options
+ if (av[i][2] == '\0')
+ {
+ just_files = true; // Treat the following arguments as files
+ }
+ else
+ {
+ process_long_option(ac, av, i);
+ }
break;
+
default:
be_global->parse_args (i, av);
- break;
} // End of switch (av[i][1])
} // End of IF (av[i][0] == '-')
else
{
DRV_push_file (av[i]);
}
+
+ if (idl_global->parse_args_exit_) return; // Catch Exits
} // End of FOR (i = 1; i < ac; i++)
be_util::arg_post_proc ();
@@ -614,3 +562,153 @@ DRV_parse_args (long ac, char **av)
DRV_cpp_post_init ();
}
+
+void
+print_idl_versions()
+{
+ ACE_DEBUG ((LM_INFO,
+ ACE_TEXT ("These are the valid IDL versions this compiler will accept:\n")
+ ));
+ for (int v = 1; v < IDL_VERSION_COUNT; v++)
+ {
+ ACE_DEBUG ((LM_INFO, ACE_TEXT ("%C\n"),
+ IdlVersion (static_cast<SpecificIdlVersion>(v)).to_string ()
+ ));
+ }
+}
+
+void
+process_long_option(long ac, char **av, long &i)
+{
+ const char *long_option = av[i] + 2;
+ bool no_more_args = i + 1 >= ac;
+ if (!ACE_OS::strcmp (long_option, "idl-version"))
+ {
+ bool invalid_version = no_more_args;
+ if (no_more_args)
+ {
+ ACE_ERROR ((LM_ERROR,
+ ACE_TEXT ("--idl-version is missing a required argument, ")
+ ACE_TEXT ("the IDL version to use.\n")
+ ));
+ }
+ else
+ {
+ idl_global->idl_version_.from_string (av[++i]);
+ invalid_version = !idl_global->idl_version_.is_valid ();
+ if (invalid_version)
+ {
+ ACE_ERROR ((LM_ERROR,
+ ACE_TEXT ("\"%C\" is not a valid IDL version supported\n"),
+ av[i]
+ ));
+ }
+ }
+ if (invalid_version)
+ {
+ print_idl_versions ();
+ idl_global->parse_args_exit (1);
+ }
+ }
+ else if (!ACE_OS::strcmp (long_option, "syntax-only"))
+ {
+ idl_global->syntax_only_ = true;
+ }
+ else if (!ACE_OS::strcmp (long_option, "default-idl-version"))
+ {
+ ACE_DEBUG ((LM_INFO, ACE_TEXT ("%C\n"),
+ idl_global->default_idl_version_.to_string ()));
+ idl_global->parse_args_exit (0);
+ }
+ else if (!ACE_OS::strcmp (long_option, "list-idl-versions"))
+ {
+ print_idl_versions ();
+ idl_global->parse_args_exit (0);
+ }
+ else if (!ACE_OS::strcmp (long_option, "help"))
+ {
+ idl_global->print_help ();
+ }
+ else if (!ACE_OS::strcmp (long_option, "bison-trace"))
+ {
+ FE_yydebug (true);
+ }
+ else if (!ACE_OS::strcmp (long_option, "version"))
+ {
+ idl_global->print_version ();
+ }
+ else if (!ACE_OS::strcmp (long_option, "dump-builtins"))
+ {
+ idl_global->dump_builtins_ = true;
+ idl_global->dump_ast ();
+ }
+ else if (!ACE_OS::strcmp (long_option, "just-dump-builtins"))
+ {
+ // Don't use dump_ast because we need to dump before parsing any files.
+ idl_global->dump_builtins_ = true;
+ idl_global->just_dump_builtins_ = true;
+ }
+ else if (!ACE_OS::strcmp (long_option, "dump"))
+ {
+ idl_global->dump_ast ();
+ }
+ else if (!ACE_OS::strcmp (long_option, "unknown-annotations"))
+ {
+ bool invalid_argument = no_more_args;
+ if (no_more_args)
+ {
+ ACE_ERROR ((LM_ERROR,
+ ACE_TEXT ("--unknown-annotations is missing its required argument.")
+ ));
+ }
+ else
+ {
+ i++;
+ if (!ACE_OS::strcmp (av[i], "warn-once"))
+ {
+ idl_global->unknown_annotations_ =
+ IDL_GlobalData::UNKNOWN_ANNOTATIONS_WARN_ONCE;
+ }
+ else if (!ACE_OS::strcmp (av[i], "warn-all"))
+ {
+ idl_global->unknown_annotations_ =
+ IDL_GlobalData::UNKNOWN_ANNOTATIONS_WARN_ALL;
+ }
+ else if (!ACE_OS::strcmp (av[i], "error"))
+ {
+ idl_global->unknown_annotations_ =
+ IDL_GlobalData::UNKNOWN_ANNOTATIONS_ERROR;
+ }
+ else if (!ACE_OS::strcmp (av[i], "ignore"))
+ {
+ idl_global->unknown_annotations_ =
+ IDL_GlobalData::UNKNOWN_ANNOTATIONS_IGNORE;
+ }
+ else
+ {
+ invalid_argument = true;
+ ACE_ERROR ((LM_ERROR,
+ ACE_TEXT ("\"%C\" is not a valid argument.\n"),
+ av[i]
+ ));
+ }
+ }
+ if (invalid_argument)
+ {
+ ACE_ERROR ((LM_ERROR,
+ ACE_TEXT ("Use either \"warn-once\", \"warn-all\", ")
+ ACE_TEXT ("\"error\" or \"ignore\".\n"),
+ av[i]
+ ));
+ idl_global->parse_args_exit (1);
+ }
+ }
+ else
+ {
+ ACE_DEBUG ((LM_ERROR,
+ ACE_TEXT ("Unknown long option: %C\n"),
+ long_option
+ ));
+ idl_global->parse_args_exit (1);
+ }
+}
diff --git a/TAO/TAO_IDL/fe/fe_extern.cpp b/TAO/TAO_IDL/fe/fe_extern.cpp
index 605e4639f44..440d81cdc3c 100644
--- a/TAO/TAO_IDL/fe/fe_extern.cpp
+++ b/TAO/TAO_IDL/fe/fe_extern.cpp
@@ -97,12 +97,21 @@ FE_yyparse (void)
tao_preproc_buffer_length = 0;
tao_preproc_buffer_pos = 0;
#else
- ACE_OS::fclose (tao_yyin);
+ if (tao_yyin)
+ {
+ ACE_OS::fclose (tao_yyin);
+ }
#endif /* USE_MCPP_BUFFER_LEXING */
return result;
}
+extern int tao_yydebug;
+void FE_yydebug (bool value)
+{
+ tao_yydebug = value;
+}
+
#ifdef USE_MCPP_BUFFER_LEXING
void
FE_set_yyin (char * f)
diff --git a/TAO/TAO_IDL/fe/fe_lookup.cpp b/TAO/TAO_IDL/fe/fe_lookup.cpp
index 2deefd7aba6..406f071938b 100644
--- a/TAO/TAO_IDL/fe/fe_lookup.cpp
+++ b/TAO/TAO_IDL/fe/fe_lookup.cpp
@@ -2,7 +2,7 @@
#include "ace/OS_NS_string.h"
/* C++ code produced by gperf version 2.8 (ACE version) */
-/* Command-line: /tao_builds/mitza/DOC_fixed/ACE/bin/ace_gperf -M -J -c -C -D -E -T -f 0 -a -o -t -p -K keyword_ -L C++ -Z TAO_IDL_CPP_Keyword_Table -N lookup -k1,2,$ fe/keywords.dat */
+/* Command-line: /mnt/arch/data/work/oci/ace_tao/xtypes/ACE_TAO/ACE/bin/ace_gperf -M -J -c -C -D -E -T -f 0 -a -o -t -p -K keyword_ -L C++ -Z TAO_IDL_CPP_Keyword_Table -N lookup -k1,2,$ fe/keywords.dat */
unsigned int
TAO_IDL_CPP_Keyword_Table::hash (const char *str, unsigned int len)
{
diff --git a/TAO/TAO_IDL/fe/idl.ll b/TAO/TAO_IDL/fe/idl.ll
index 817051334be..3d384441756 100644
--- a/TAO/TAO_IDL/fe/idl.ll
+++ b/TAO/TAO_IDL/fe/idl.ll
@@ -64,7 +64,7 @@ trademarks or registered trademarks of Sun Microsystems, Inc.
*/
/*
- * idl.ll - Lexical scanner for IDL 3.1
+ * idl.ll - Lexical scanner for IDL
*/
#include "global_extern.h"
@@ -87,6 +87,7 @@ trademarks or registered trademarks of Sun Microsystems, Inc.
#include "fe_home_header.h"
#include "fe_private.h"
#include "fe_extern.h"
+#include "ast_annotation_appl.h"
#include "idl.tab.hpp"
static char * idl_wstring_escape_reader (char *);
@@ -204,6 +205,9 @@ oneway return IDL_ONEWAY;
return IDL_SCOPE_DELIMITOR;
}
+@annotation[^A-Za-z0-9_] return IDL_ANNOTATION_DECL; // Allow annotation names that start with "annotation"
+@ return IDL_ANNOTATION_SYMBOL;
+
[a-ij-rs-zA-IJ-RS-Z_][a-ij-rs-zA-IJ-RS-Z0-9_]* {
// Make sure that this identifier is not a C++ keyword. If it is,
// prepend it with a _cxx_. Lookup in the perfect hash table for C++
diff --git a/TAO/TAO_IDL/fe/idl.tab.cpp b/TAO/TAO_IDL/fe/idl.tab.cpp
index ce29e2c5206..705278d1047 100644
--- a/TAO/TAO_IDL/fe/idl.tab.cpp
+++ b/TAO/TAO_IDL/fe/idl.tab.cpp
@@ -1,8 +1,8 @@
-/* A Bison parser, made by GNU Bison 3.0.2. */
+/* A Bison parser, made by GNU Bison 3.1. */
/* Bison implementation for Yacc-like parsers in C
- Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc.
+ Copyright (C) 1984, 1989-1990, 2000-2015, 2018 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -44,7 +44,7 @@
#define YYBISON 1
/* Bison version. */
-#define YYBISON_VERSION "3.0.2"
+#define YYBISON_VERSION "3.1"
/* Skeleton name. */
#define YYSKELETON_NAME "yacc.c"
@@ -70,7 +70,7 @@
#define yychar tao_yychar
/* Copy the first part of user declarations. */
-#line 71 "fe/idl.ypp" /* yacc.c:339 */
+#line 72 "fe/idl.ypp" /* yacc.c:339 */
#include "utl_identifier.h"
#include "utl_err.h"
@@ -123,6 +123,10 @@
#include "ast_visitor_tmpl_module_inst.h"
#include "ast_visitor_tmpl_module_ref.h"
#include "ast_visitor_context.h"
+#include "ast_annotation_appl.h"
+#include "ast_union_branch.h"
+#include "ast_enum_val.h"
+#include "ast_annotation_member.h"
#include "fe_declarator.h"
#include "fe_interface_header.h"
@@ -142,12 +146,13 @@ extern "C" int tao_yywrap (void);
extern char tao_yytext[];
extern int tao_yyleng;
AST_Enum *tao_enum_constant_decl = 0;
+AST_String *tao_string_decl = 0;
AST_Expression::ExprType t_param_const_type = AST_Expression::EV_none;
#define TAO_YYDEBUG_LEXER_TEXT (tao_yytext[tao_yyleng] = '\0', tao_yytext)
-// Force the pretty debugging code to compile.
+// Compile Optional Tracing Output for Parser, can be enabled with --bison-trace
#define YYDEBUG 1
-#line 151 "fe/idl.tab.cpp" /* yacc.c:339 */
+#line 156 "fe/idl.tab.cpp" /* yacc.c:339 */
# ifndef YY_NULLPTR
# if defined __cplusplus && 201103L <= __cplusplus
@@ -264,16 +269,18 @@ extern int tao_yydebug;
IDL_LEFT_SHIFT = 337,
IDL_RIGHT_SHIFT = 338,
IDL_WCHAR_LITERAL = 339,
- IDL_WSTRING_LITERAL = 340
+ IDL_WSTRING_LITERAL = 340,
+ IDL_ANNOTATION_DECL = 341,
+ IDL_ANNOTATION_SYMBOL = 342
};
#endif
/* Value type. */
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
-typedef union YYSTYPE YYSTYPE;
+
union YYSTYPE
{
-#line 152 "fe/idl.ypp" /* yacc.c:355 */
+#line 158 "fe/idl.ypp" /* yacc.c:355 */
AST_Decl *dcval; /* Decl value */
UTL_StrList *slval; /* String list */
@@ -310,9 +317,18 @@ union YYSTYPE
FE_Utils::T_Param_Info *pival; /* Template interface param */
FE_Utils::T_PARAMLIST_INFO *plval; /* List of template params */
FE_Utils::T_ARGLIST *alval; /* List of template args */
-
-#line 315 "fe/idl.tab.cpp" /* yacc.c:355 */
+ AST_Annotation_Appl *annotation_val;
+ AST_Annotation_Appls *annotations_val;
+ AST_Annotation_Appl::Param *annotation_param_val;
+ AST_Annotation_Appl::Params *annotation_params_val;
+ AST_Annotation_Decl *annotation_decl_val;
+ AST_Decls *decls_val;
+ Decl_Annotations_Pair *decl_annotations_pair_val;
+
+#line 329 "fe/idl.tab.cpp" /* yacc.c:355 */
};
+
+typedef union YYSTYPE YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1
# define YYSTYPE_IS_DECLARED 1
#endif
@@ -326,7 +342,7 @@ int tao_yyparse (void);
/* Copy the second part of user declarations. */
-#line 330 "fe/idl.tab.cpp" /* yacc.c:358 */
+#line 346 "fe/idl.tab.cpp" /* yacc.c:358 */
#ifdef short
# undef short
@@ -347,13 +363,13 @@ typedef signed char yytype_int8;
#ifdef YYTYPE_UINT16
typedef YYTYPE_UINT16 yytype_uint16;
#else
-typedef unsigned short int yytype_uint16;
+typedef unsigned short yytype_uint16;
#endif
#ifdef YYTYPE_INT16
typedef YYTYPE_INT16 yytype_int16;
#else
-typedef short int yytype_int16;
+typedef short yytype_int16;
#endif
#ifndef YYSIZE_T
@@ -365,7 +381,7 @@ typedef short int yytype_int16;
# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
# define YYSIZE_T size_t
# else
-# define YYSIZE_T unsigned int
+# define YYSIZE_T unsigned
# endif
#endif
@@ -417,7 +433,7 @@ typedef short int yytype_int16;
# define YYUSE(E) /* empty */
#endif
-#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
+#if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
/* Suppress an incorrect diagnostic about yylval being uninitialized. */
# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
_Pragma ("GCC diagnostic push") \
@@ -566,26 +582,26 @@ union yyalloc
#endif /* !YYCOPY_NEEDED */
/* YYFINAL -- State number of the termination state. */
-#define YYFINAL 3
+#define YYFINAL 4
/* YYLAST -- Last index in YYTABLE. */
-#define YYLAST 1285
+#define YYLAST 1566
/* YYNTOKENS -- Number of terminals. */
-#define YYNTOKENS 108
+#define YYNTOKENS 109
/* YYNNTS -- Number of nonterminals. */
-#define YYNNTS 389
+#define YYNNTS 400
/* YYNRULES -- Number of rules. */
-#define YYNRULES 578
+#define YYNRULES 597
/* YYNSTATES -- Number of states. */
-#define YYNSTATES 848
+#define YYNSTATES 879
/* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned
by yylex, with out-of-bounds checking. */
#define YYUNDEFTOK 2
-#define YYMAXUTOK 340
+#define YYMAXUTOK 342
#define YYTRANSLATE(YYX) \
- ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
+ ((unsigned) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
as returned by yylex, without out-of-bounds checking. */
@@ -594,16 +610,16 @@ static const yytype_uint8 yytranslate[] =
0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 101, 96, 2,
- 103, 104, 99, 97, 92, 98, 2, 100, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 91, 86,
- 89, 93, 90, 2, 105, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 103, 98, 2,
+ 105, 106, 101, 99, 94, 100, 2, 102, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 93, 88,
+ 91, 95, 92, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 106, 2, 107, 95, 2, 2, 2, 2, 2,
+ 2, 107, 2, 108, 97, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 87, 94, 88, 102, 2, 2, 2,
+ 2, 2, 2, 89, 96, 90, 104, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
@@ -625,71 +641,73 @@ static const yytype_uint8 yytranslate[] =
55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
- 85
+ 85, 86, 87
};
#if YYDEBUG
/* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
static const yytype_uint16 yyrline[] =
{
- 0, 360, 360, 363, 364, 368, 371, 374, 380, 392,
- 391, 402, 401, 412, 411, 422, 421, 432, 431, 442,
- 441, 452, 451, 462, 461, 472, 471, 482, 481, 492,
- 491, 502, 501, 512, 511, 522, 521, 536, 535, 548,
- 587, 592, 547, 609, 617, 632, 642, 673, 677, 616,
- 701, 705, 706, 710, 711, 716, 722, 715, 810, 816,
- 809, 887, 888, 893, 932, 937, 892, 955, 954, 968,
- 1006, 1037, 1071, 1070, 1082, 1089, 1090, 1091, 1092, 1096,
- 1107, 1112, 1156, 1161, 1111, 1190, 1234, 1239, 1188, 1258,
- 1256, 1298, 1297, 1311, 1317, 1324, 1331, 1338, 1364, 1391,
- 1456, 1457, 1461, 1462, 1463, 1469, 1468, 1479, 1478, 1491,
- 1492, 1497, 1496, 1507, 1506, 1517, 1516, 1527, 1526, 1537,
- 1536, 1547, 1546, 1557, 1556, 1567, 1566, 1580, 1593, 1591,
- 1619, 1626, 1637, 1636, 1664, 1662, 1689, 1700, 1713, 1759,
- 1787, 1818, 1823, 1828, 1833, 1817, 1904, 1905, 1906, 1907,
- 1908, 1909, 1910, 1922, 1927, 1996, 1998, 2000, 2001, 2015,
- 2016, 2030, 2031, 2044, 2045, 2055, 2068, 2069, 2079, 2092,
- 2093, 2103, 2113, 2126, 2127, 2137, 2147, 2160, 2211, 2212,
- 2221, 2226, 2232, 2240, 2245, 2250, 2256, 2260, 2265, 2270,
- 2278, 2352, 2353, 2357, 2358, 2362, 2363, 2367, 2371, 2372,
- 2376, 2381, 2380, 2391, 2396, 2401, 2406, 2433, 2442, 2441,
- 2513, 2514, 2518, 2526, 2527, 2555, 2556, 2557, 2558, 2559,
- 2560, 2561, 2562, 2566, 2567, 2568, 2569, 2573, 2574, 2575,
- 2579, 2580, 2584, 2597, 2595, 2623, 2630, 2631, 2635, 2648,
- 2646, 2674, 2681, 2698, 2717, 2718, 2722, 2727, 2732, 2740,
- 2745, 2750, 2758, 2763, 2768, 2776, 2784, 2789, 2797, 2805,
- 2813, 2821, 2830, 2829, 2845, 2879, 2884, 2844, 2903, 2906,
- 2907, 2911, 2911, 2922, 2927, 2920, 2990, 2989, 3004, 3003,
- 3018, 3023, 3059, 3064, 3121, 3126, 3017, 3150, 3158, 3172,
- 3182, 3190, 3191, 3299, 3302, 3303, 3308, 3313, 3307, 3349,
- 3348, 3362, 3373, 3393, 3401, 3400, 3416, 3421, 3415, 3438,
- 3437, 3490, 3514, 3539, 3544, 3577, 3582, 3538, 3608, 3613,
- 3611, 3618, 3622, 3659, 3664, 3657, 3745, 3806, 3816, 3805,
- 3829, 3839, 3844, 3837, 3891, 3917, 3927, 3932, 3925, 3968,
- 3993, 4002, 4001, 4043, 4054, 4074, 4082, 4087, 4081, 4149,
- 4150, 4155, 4160, 4165, 4170, 4154, 4239, 4244, 4249, 4254,
- 4238, 4332, 4337, 4367, 4372, 4331, 4390, 4395, 4460, 4465,
- 4388, 4502, 4508, 4515, 4522, 4523, 4535, 4541, 4583, 4534,
- 4605, 4604, 4615, 4614, 4627, 4632, 4630, 4637, 4642, 4647,
- 4641, 4688, 4687, 4698, 4697, 4710, 4715, 4713, 4720, 4725,
- 4730, 4724, 4777, 4785, 4786, 4787, 4897, 4902, 4907, 4916,
- 4921, 4915, 4933, 4941, 4946, 4940, 4958, 4966, 4971, 4965,
- 4983, 4991, 4996, 4990, 5008, 5015, 5028, 5026, 5052, 5059,
- 5088, 5126, 5127, 5131, 5161, 5201, 5206, 5160, 5225, 5230,
- 5223, 5273, 5272, 5283, 5290, 5291, 5296, 5295, 5306, 5305,
- 5316, 5315, 5326, 5325, 5336, 5335, 5346, 5345, 5356, 5355,
- 5367, 5458, 5465, 5491, 5598, 5608, 5614, 5620, 5693, 5766,
- 5841, 5840, 5890, 5895, 5900, 5905, 5910, 5915, 5889, 5970,
- 5969, 5980, 5987, 5994, 6002, 6007, 6001, 6019, 6020, 6024,
- 6026, 6025, 6036, 6035, 6050, 6074, 6048, 6102, 6130, 6100,
- 6156, 6157, 6158, 6162, 6163, 6167, 6195, 6226, 6271, 6276,
- 6224, 6293, 6303, 6322, 6334, 6333, 6373, 6423, 6428, 6371,
- 6445, 6450, 6458, 6463, 6468, 6473, 6478, 6483, 6488, 6493,
- 6498, 6503, 6512, 6547, 6546, 6568, 6575, 6601, 6619, 6630,
- 6650, 6657, 6668, 6673, 6692, 6697, 6667, 6712, 6719, 6724,
- 6731, 6730, 6739, 6738, 6747, 6746, 6758, 6828, 6879, 6895,
- 6909, 6916, 6976, 6981, 6986, 6980, 7047, 7052, 7046, 7067,
- 7068, 7073, 7072, 7083, 7082, 7093, 7092, 7103, 7102
+ 0, 386, 386, 389, 390, 398, 411, 417, 421, 425,
+ 433, 432, 442, 441, 451, 450, 460, 459, 469, 468,
+ 478, 477, 487, 486, 496, 495, 505, 504, 514, 513,
+ 523, 522, 532, 531, 541, 540, 550, 549, 559, 558,
+ 572, 571, 583, 622, 626, 582, 642, 650, 664, 674,
+ 704, 708, 649, 731, 735, 736, 740, 741, 746, 751,
+ 745, 837, 842, 836, 911, 912, 917, 955, 959, 916,
+ 975, 974, 986, 1023, 1053, 1086, 1085, 1094, 1101, 1102,
+ 1103, 1104, 1108, 1112, 1117, 1160, 1164, 1116, 1191, 1234,
+ 1238, 1189, 1255, 1253, 1293, 1292, 1304, 1308, 1315, 1320,
+ 1328, 1353, 1379, 1443, 1444, 1448, 1449, 1450, 1456, 1455,
+ 1464, 1463, 1474, 1475, 1480, 1479, 1488, 1487, 1496, 1495,
+ 1504, 1503, 1512, 1511, 1520, 1519, 1528, 1527, 1536, 1535,
+ 1547, 1559, 1557, 1582, 1589, 1599, 1598, 1624, 1622, 1647,
+ 1657, 1668, 1712, 1739, 1769, 1773, 1777, 1781, 1768, 1843,
+ 1844, 1845, 1846, 1847, 1848, 1849, 1853, 1857, 1925, 1927,
+ 1929, 1930, 1942, 1943, 1955, 1956, 1968, 1969, 1978, 1990,
+ 1991, 2000, 2012, 2013, 2022, 2031, 2043, 2044, 2053, 2062,
+ 2074, 2132, 2133, 2140, 2144, 2149, 2156, 2160, 2164, 2169,
+ 2173, 2177, 2181, 2188, 2257, 2256, 2283, 2284, 2288, 2289,
+ 2290, 2292, 2291, 2300, 2301, 2305, 2356, 2360, 2367, 2380,
+ 2390, 2398, 2397, 2470, 2474, 2481, 2490, 2497, 2505, 2511,
+ 2518, 2529, 2528, 2537, 2541, 2545, 2549, 2575, 2583, 2582,
+ 2654, 2655, 2659, 2666, 2667, 2693, 2694, 2695, 2696, 2697,
+ 2698, 2699, 2700, 2704, 2705, 2706, 2707, 2711, 2712, 2713,
+ 2717, 2718, 2722, 2734, 2732, 2757, 2764, 2765, 2769, 2781,
+ 2779, 2804, 2811, 2827, 2845, 2846, 2850, 2854, 2858, 2865,
+ 2869, 2873, 2880, 2884, 2888, 2895, 2902, 2906, 2913, 2920,
+ 2927, 2934, 2942, 2941, 2955, 2986, 2990, 2954, 3007, 3010,
+ 3011, 3015, 3015, 3034, 3038, 3033, 3102, 3101, 3114, 3113,
+ 3126, 3130, 3163, 3167, 3223, 3227, 3125, 3249, 3256, 3269,
+ 3278, 3285, 3286, 3395, 3398, 3399, 3404, 3408, 3403, 3441,
+ 3440, 3452, 3462, 3480, 3488, 3487, 3501, 3505, 3500, 3521,
+ 3520, 3571, 3596, 3620, 3624, 3655, 3659, 3619, 3683, 3688,
+ 3686, 3692, 3696, 3733, 3737, 3731, 3824, 3894, 3903, 3893,
+ 3917, 3927, 3931, 3925, 3976, 4002, 4011, 4015, 4009, 4051,
+ 4077, 4085, 4084, 4129, 4139, 4157, 4165, 4169, 4164, 4229,
+ 4230, 4235, 4239, 4243, 4247, 4234, 4314, 4318, 4322, 4326,
+ 4313, 4402, 4406, 4435, 4439, 4401, 4455, 4459, 4523, 4527,
+ 4453, 4562, 4567, 4572, 4579, 4580, 4591, 4596, 4637, 4590,
+ 4657, 4656, 4665, 4664, 4675, 4680, 4678, 4684, 4689, 4693,
+ 4688, 4732, 4731, 4740, 4739, 4750, 4755, 4753, 4759, 4764,
+ 4768, 4763, 4813, 4820, 4821, 4822, 4929, 4933, 4937, 4945,
+ 4949, 4944, 4958, 4966, 4970, 4965, 4979, 4987, 4991, 4986,
+ 5000, 5008, 5012, 5007, 5021, 5028, 5040, 5038, 5061, 5068,
+ 5096, 5133, 5134, 5138, 5167, 5206, 5210, 5166, 5227, 5231,
+ 5225, 5272, 5271, 5279, 5286, 5287, 5292, 5291, 5300, 5299,
+ 5308, 5307, 5316, 5315, 5324, 5323, 5332, 5331, 5340, 5339,
+ 5349, 5439, 5445, 5470, 5576, 5585, 5589, 5595, 5667, 5739,
+ 5813, 5812, 5860, 5864, 5868, 5872, 5876, 5880, 5859, 5933,
+ 5932, 5940, 5947, 5952, 5960, 5964, 5959, 5974, 5975, 5979,
+ 5981, 5980, 5989, 5988, 6001, 6024, 5999, 6050, 6077, 6048,
+ 6101, 6102, 6103, 6107, 6108, 6112, 6139, 6169, 6213, 6217,
+ 6167, 6232, 6241, 6259, 6270, 6269, 6307, 6356, 6360, 6305,
+ 6375, 6379, 6386, 6390, 6394, 6398, 6402, 6406, 6410, 6414,
+ 6418, 6422, 6430, 6461, 6474, 6481, 6506, 6524, 6531, 6546,
+ 6553, 6563, 6567, 6585, 6589, 6562, 6602, 6608, 6611, 6618,
+ 6617, 6624, 6623, 6630, 6629, 6639, 6708, 6758, 6773, 6785,
+ 6792, 6851, 6856, 6860, 6855, 6919, 6923, 6918, 6936, 6937,
+ 6942, 6941, 6950, 6949, 6958, 6957, 6966, 6965
};
#endif
@@ -717,89 +735,94 @@ static const char *const yytname[] =
"IDL_UINTEGER_LITERAL", "IDL_STRING_LITERAL", "IDL_CHARACTER_LITERAL",
"IDL_FLOATING_PT_LITERAL", "IDL_FIXED_PT_LITERAL", "IDL_TRUETOK",
"IDL_FALSETOK", "IDL_SCOPE_DELIMITOR", "IDL_LEFT_SHIFT",
- "IDL_RIGHT_SHIFT", "IDL_WCHAR_LITERAL", "IDL_WSTRING_LITERAL", "';'",
- "'{'", "'}'", "'<'", "'>'", "':'", "','", "'='", "'|'", "'^'", "'&'",
- "'+'", "'-'", "'*'", "'/'", "'%'", "'~'", "'('", "')'", "'@'", "'['",
- "']'", "$accept", "start", "definitions", "definition",
- "at_least_one_definition", "fixed_definition", "$@1", "$@2", "$@3",
- "$@4", "$@5", "$@6", "$@7", "$@8", "$@9", "$@10", "$@11", "$@12", "$@13",
- "$@14", "module_header", "$@15", "module", "$@16", "$@17", "$@18",
- "template_module_header", "template_module", "$@19", "$@20", "$@21",
- "$@22", "$@23", "at_least_one_tpl_definition", "tpl_definitions",
- "tpl_definition", "template_module_ref", "$@24", "$@25",
- "template_module_inst", "$@26", "$@27", "interface_def", "interface",
- "$@28", "$@29", "$@30", "interface_decl", "$@31", "interface_header",
- "inheritance_spec", "$@32", "value_def", "valuetype",
- "value_concrete_decl", "$@33", "$@34", "$@35", "value_abs_decl", "$@36",
- "$@37", "$@38", "value_header", "$@39", "value_decl", "$@40",
+ "IDL_RIGHT_SHIFT", "IDL_WCHAR_LITERAL", "IDL_WSTRING_LITERAL",
+ "IDL_ANNOTATION_DECL", "IDL_ANNOTATION_SYMBOL", "';'", "'{'", "'}'",
+ "'<'", "'>'", "':'", "','", "'='", "'|'", "'^'", "'&'", "'+'", "'-'",
+ "'*'", "'/'", "'%'", "'~'", "'('", "')'", "'['", "']'", "$accept",
+ "start", "definitions", "at_least_one_definition", "definition",
+ "fixed_definition", "$@1", "$@2", "$@3", "$@4", "$@5", "$@6", "$@7",
+ "$@8", "$@9", "$@10", "$@11", "$@12", "$@13", "$@14", "$@15",
+ "module_header", "$@16", "module", "@17", "$@18", "$@19",
+ "template_module_header", "template_module", "$@20", "$@21", "$@22",
+ "$@23", "$@24", "at_least_one_tpl_definition", "tpl_definitions",
+ "tpl_definition", "template_module_ref", "$@25", "$@26",
+ "template_module_inst", "$@27", "$@28", "interface_def", "interface",
+ "$@29", "$@30", "$@31", "interface_decl", "$@32", "interface_header",
+ "inheritance_spec", "$@33", "value_def", "valuetype",
+ "value_concrete_decl", "$@34", "$@35", "$@36", "value_abs_decl", "$@37",
+ "$@38", "$@39", "value_header", "$@40", "value_decl", "$@41",
"opt_truncatable", "supports_spec", "value_forward_decl",
"value_box_decl", "value_elements", "value_element", "state_member",
- "@41", "@42", "exports", "export", "$@43", "$@44", "$@45", "$@46",
- "$@47", "$@48", "$@49", "$@50", "at_least_one_scoped_name",
- "scoped_names", "$@51", "scoped_name", "$@52", "$@53", "id",
- "defining_id", "interface_forward", "const_dcl", "$@54", "$@55", "$@56",
- "$@57", "const_type", "expression", "const_expr", "or_expr", "xor_expr",
+ "@42", "@43", "exports", "export", "$@44", "$@45", "$@46", "$@47",
+ "$@48", "$@49", "$@50", "$@51", "at_least_one_scoped_name",
+ "scoped_names", "$@52", "scoped_name", "$@53", "$@54", "id",
+ "defining_id", "interface_forward", "const_dcl", "$@55", "$@56", "$@57",
+ "$@58", "const_type", "expression", "const_expr", "or_expr", "xor_expr",
"and_expr", "shift_expr", "add_expr", "mult_expr", "unary_expr",
- "primary_expr", "literal", "positive_int_expr", "annotations",
- "annotation_appl", "annotation_appl_params",
- "at_least_one_annotation_appl_param", "annotation_appl_named_params",
- "annotation_appl_param", "type_dcl", "$@58", "type_declarator", "$@59",
- "type_spec", "simple_type_spec", "base_type_spec", "template_type_spec",
- "constructed_type_spec", "constructed_forward_type_spec",
- "at_least_one_declarator", "declarators", "$@60", "declarator",
- "at_least_one_simple_declarator", "simple_declarators", "$@61",
- "simple_declarator", "complex_declarator", "integer_type", "signed_int",
- "unsigned_int", "floating_pt_type", "fixed_type", "char_type",
- "octet_type", "boolean_type", "any_type", "object_type", "struct_decl",
- "$@62", "struct_type", "$@63", "$@64", "$@65", "at_least_one_member",
- "members", "member", "@66", "member_i", "$@67", "$@68", "$@69",
- "union_decl", "$@70", "union_type", "$@71", "$@72", "$@73", "$@74",
- "$@75", "$@76", "switch_type_spec", "at_least_one_case_branch",
- "case_branches", "case_branch", "$@77", "$@78", "$@79",
- "at_least_one_case_label", "case_labels", "case_label", "$@80", "$@81",
- "$@82", "element_spec", "$@83", "struct_forward_type",
- "union_forward_type", "enum_type", "$@84", "$@85", "$@86", "$@87",
- "at_least_one_enumerator", "enumerators", "$@88", "enumerator",
- "sequence_type_spec", "$@89", "$@90", "seq_head", "$@91", "$@92",
- "fixed_type_spec", "string_type_spec", "$@93", "$@94", "string_head",
- "wstring_type_spec", "$@95", "$@96", "wstring_head", "array_declarator",
- "$@97", "at_least_one_array_dim", "array_dims", "array_dim", "$@98",
- "$@99", "attribute", "attribute_readonly", "$@100", "$@101", "$@102",
- "$@103", "attribute_readwrite", "$@104", "$@105", "$@106", "$@107",
- "exception", "$@108", "$@109", "$@110", "$@111", "operation", "$@112",
- "$@113", "$@114", "$@115", "opt_op_attribute", "op_type_spec",
- "init_decl", "$@116", "$@117", "$@118", "init_parameter_list", "$@119",
- "$@120", "at_least_one_in_parameter", "in_parameters", "$@121",
- "in_parameter", "$@122", "$@123", "parameter_list", "$@124", "$@125",
- "at_least_one_parameter", "parameters", "$@126", "parameter", "$@127",
- "$@128", "param_type_spec", "direction", "opt_raises", "$@129", "$@130",
- "opt_getraises", "$@131", "$@132", "opt_setraises", "$@133", "$@134",
- "opt_context", "$@135", "$@136", "at_least_one_string_literal",
- "string_literals", "$@137", "typeid_dcl", "typeprefix_dcl", "component",
- "component_forward_decl", "component_decl", "$@138", "$@139", "$@140",
- "component_header", "$@141", "$@142", "component_inheritance_spec",
- "$@143", "component_exports", "component_export", "$@144", "$@145",
- "$@146", "$@147", "$@148", "$@149", "$@150", "provides_decl",
+ "primary_expr", "literal", "positive_int_expr", "annotation_dcl", "$@59",
+ "annotation_body", "annotation_statement", "$@60",
+ "annotation_member_type", "annotation_member",
+ "annotation_member_default", "at_least_one_annotation",
+ "annotations_maybe", "annotation_appl", "@61",
+ "annotation_appl_params_maybe", "annotation_appl_params",
+ "named_annotation_appl_params", "more_named_annotation_appl_params",
+ "named_annotation_appl_param", "type_dcl", "$@62", "type_declarator",
+ "$@63", "type_spec", "simple_type_spec", "base_type_spec",
+ "template_type_spec", "constructed_type_spec",
+ "constructed_forward_type_spec", "at_least_one_declarator",
+ "declarators", "$@64", "declarator", "at_least_one_simple_declarator",
+ "simple_declarators", "$@65", "simple_declarator", "complex_declarator",
+ "integer_type", "signed_int", "unsigned_int", "floating_pt_type",
+ "fixed_type", "char_type", "octet_type", "boolean_type", "any_type",
+ "object_type", "struct_decl", "$@66", "struct_type", "$@67", "$@68",
+ "$@69", "at_least_one_member", "members", "member", "@70", "member_i",
+ "$@71", "$@72", "$@73", "union_decl", "$@74", "union_type", "$@75",
+ "$@76", "$@77", "$@78", "$@79", "$@80", "switch_type_spec",
+ "at_least_one_case_branch", "case_branches", "case_branch", "$@81",
+ "$@82", "$@83", "at_least_one_case_label", "case_labels", "case_label",
+ "$@84", "$@85", "$@86", "element_spec", "$@87", "struct_forward_type",
+ "union_forward_type", "enum_type", "$@88", "$@89", "$@90", "$@91",
+ "at_least_one_enumerator", "enumerators", "$@92", "enumerator",
+ "sequence_type_spec", "$@93", "$@94", "seq_head", "$@95", "$@96",
+ "fixed_type_spec", "string_type_spec", "$@97", "$@98", "string_head",
+ "wstring_type_spec", "$@99", "$@100", "wstring_head", "array_declarator",
+ "$@101", "at_least_one_array_dim", "array_dims", "array_dim", "$@102",
+ "$@103", "attribute", "attribute_readonly", "$@104", "$@105", "$@106",
+ "$@107", "attribute_readwrite", "$@108", "$@109", "$@110", "$@111",
+ "exception", "$@112", "$@113", "$@114", "$@115", "operation", "$@116",
+ "$@117", "$@118", "$@119", "opt_op_attribute", "op_type_spec",
+ "init_decl", "$@120", "$@121", "$@122", "init_parameter_list", "$@123",
+ "$@124", "at_least_one_in_parameter", "in_parameters", "$@125",
+ "in_parameter", "$@126", "$@127", "parameter_list", "$@128", "$@129",
+ "at_least_one_parameter", "parameters", "$@130", "parameter", "$@131",
+ "$@132", "param_type_spec", "direction", "opt_raises", "$@133", "$@134",
+ "opt_getraises", "$@135", "$@136", "opt_setraises", "$@137", "$@138",
+ "opt_context", "$@139", "$@140", "at_least_one_string_literal",
+ "string_literals", "$@141", "typeid_dcl", "typeprefix_dcl", "component",
+ "component_forward_decl", "component_decl", "$@142", "$@143", "$@144",
+ "component_header", "$@145", "$@146", "component_inheritance_spec",
+ "$@147", "component_exports", "component_export", "$@148", "$@149",
+ "$@150", "$@151", "$@152", "$@153", "$@154", "provides_decl",
"interface_type", "uses_decl", "uses_opt_multiple", "opt_multiple",
- "emits_decl", "publishes_decl", "consumes_decl", "home_decl", "$@151",
- "home_header", "$@152", "$@153", "$@154", "$@155", "$@156", "$@157",
- "home_inheritance_spec", "$@158", "primary_key_spec", "home_body",
- "$@159", "$@160", "home_exports", "home_export", "$@161", "$@162",
- "factory_decl", "$@163", "$@164", "finder_decl", "$@165", "$@166",
+ "emits_decl", "publishes_decl", "consumes_decl", "home_decl", "$@155",
+ "home_header", "$@156", "$@157", "$@158", "$@159", "$@160", "$@161",
+ "home_inheritance_spec", "$@162", "primary_key_spec", "home_body",
+ "$@163", "$@164", "home_exports", "home_export", "$@165", "$@166",
+ "factory_decl", "$@167", "$@168", "finder_decl", "$@169", "$@170",
"event", "event_forward_decl", "event_concrete_forward_decl",
- "event_abs_forward_decl", "event_abs_decl", "$@167", "$@168", "$@169",
+ "event_abs_forward_decl", "event_abs_decl", "$@171", "$@172", "$@173",
"event_abs_header", "event_custom_header", "event_plain_header",
- "event_rest_of_header", "$@170", "event_decl", "$@171", "$@172", "$@173",
+ "event_rest_of_header", "$@174", "event_decl", "$@175", "$@176", "$@177",
"event_header", "formal_parameter_type", "at_least_one_formal_parameter",
- "formal_parameters", "$@174", "formal_parameter",
+ "formal_parameters", "formal_parameter",
"at_least_one_formal_parameter_name", "formal_parameter_names",
- "formal_parameter_name", "porttype_decl", "$@175", "$@176", "$@177",
- "$@178", "at_least_one_port_export", "port_exports", "port_export",
- "$@179", "$@180", "$@181", "extended_port_decl",
+ "formal_parameter_name", "porttype_decl", "$@178", "$@179", "$@180",
+ "$@181", "at_least_one_port_export", "port_exports", "port_export",
+ "$@182", "$@183", "$@184", "extended_port_decl",
"at_least_one_actual_parameter", "actual_parameters", "actual_parameter",
- "connector_decl", "connector_header", "$@182", "$@183", "connector_body",
- "$@184", "$@185", "connector_exports", "connector_export", "$@186",
- "$@187", "$@188", "$@189", YY_NULLPTR
+ "connector_decl", "connector_header", "$@185", "$@186", "connector_body",
+ "$@187", "$@188", "connector_exports", "connector_export", "$@189",
+ "$@190", "$@191", "$@192", YY_NULLPTR
};
#endif
@@ -816,18 +839,18 @@ static const yytype_uint16 yytoknum[] =
305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
- 335, 336, 337, 338, 339, 340, 59, 123, 125, 60,
- 62, 58, 44, 61, 124, 94, 38, 43, 45, 42,
- 47, 37, 126, 40, 41, 64, 91, 93
+ 335, 336, 337, 338, 339, 340, 341, 342, 59, 123,
+ 125, 60, 62, 58, 44, 61, 124, 94, 38, 43,
+ 45, 42, 47, 37, 126, 40, 41, 91, 93
};
# endif
-#define YYPACT_NINF -597
+#define YYPACT_NINF -631
#define yypact_value_is_default(Yystate) \
- (!!((Yystate) == (-597)))
+ (!!((Yystate) == (-631)))
-#define YYTABLE_NINF -519
+#define YYTABLE_NINF -539
#define yytable_value_is_error(Yytable_value) \
0
@@ -836,91 +859,94 @@ static const yytype_uint16 yytoknum[] =
STATE-NUM. */
static const yytype_int16 yypact[] =
{
- -597, 49, 56, -597, 187, -597, -597, -597, -597, -597,
- -597, -597, -597, -597, -597, 77, 193, 62, -597, -597,
- -597, -597, 42, 42, -597, -597, 42, -597, -597, 29,
- -597, 308, 17, 44, -597, -597, 2, -597, -597, -597,
- -597, -597, -597, 564, -597, -597, -597, -597, -597, -597,
- -597, 78, -597, 181, -597, -597, -597, -597, -597, -597,
- -597, -597, -597, -597, -597, -597, -597, -597, -597, -597,
- -597, -597, 98, -597, -597, -597, 98, -597, -597, 100,
- 132, 923, 42, -597, 598, -597, -597, -597, -597, -597,
- 47, -597, 104, -597, 114, -597, 115, -597, -597, 98,
- -597, 145, 225, -597, -597, -597, -2, -597, 99, -597,
- -597, 9, -597, 232, 235, 776, -597, -597, -597, 238,
- 278, -597, 240, 247, 250, 171, -597, 236, -597, -597,
- -597, -597, -597, -597, 245, -597, -597, -597, -597, -597,
- -597, 258, -597, -597, -597, -597, -597, -597, -597, -597,
- -597, -597, -597, -597, -597, -597, -597, -597, -597, 181,
- -597, -597, -597, 149, -597, -597, 251, -597, 253, 262,
- 263, 257, -597, 270, 273, 274, 276, 271, 277, 283,
- 285, -597, -597, -597, 287, 288, -597, -597, -597, -597,
- 258, -597, -597, -597, -597, -597, -597, -597, -597, -597,
- 258, -597, -597, -597, -597, -597, -597, -597, -597, -597,
- 290, -597, 291, -597, -597, 292, -597, 376, -597, -597,
- -597, 52, 58, 342, -597, -597, 923, -597, -597, -597,
- -597, 295, -597, -597, -597, -597, 378, -597, -597, 220,
- 296, -597, -597, -597, -597, -597, -597, -597, -597, 377,
- -597, 402, 299, 344, -597, -597, -597, -597, -597, -597,
- -597, 289, -597, -597, -597, -597, -597, -597, -597, -597,
- -597, 344, 310, 313, -597, -597, -597, -597, -597, 315,
- 317, -597, -597, -597, 316, -597, 376, -597, -597, 318,
- -597, -597, -597, -597, -597, -597, -597, -597, -597, -597,
- 451, 451, 451, 402, 258, -597, 312, 314, 328, 165,
- 167, 116, -597, -597, -597, 306, -597, -597, -597, -597,
- 409, -597, 324, 336, -597, -597, -597, -597, 42, -597,
- -597, -597, -597, 337, -597, 42, -597, 402, 402, 402,
- -597, -597, -597, -597, -597, -597, -597, 222, -597, 325,
- -597, -597, -597, -597, -597, -597, -597, -597, 42, 344,
- -597, -597, -597, 343, 292, 402, -597, -597, -597, 329,
- 402, 402, 402, 402, 402, 402, 402, 402, 402, 402,
- -597, 340, -597, -597, 345, -597, -597, 346, -597, -597,
- 258, 1047, 801, 402, 650, -597, -597, -597, -597, -597,
- -597, 130, 548, 890, 965, -597, -597, -597, -597, 38,
- 379, 42, 42, -597, -597, -597, -597, -597, 38, -597,
- 348, -597, 341, 335, 350, -597, -597, 1082, 258, -597,
- 42, 344, -597, -597, -597, -597, 314, 328, 165, 167,
- 167, 116, 116, -597, -597, -597, 452, 187, 368, 454,
- 371, 776, -597, -597, 367, -597, -597, -597, 380, -597,
- -597, -597, -597, -597, -597, 702, -597, -597, -597, -597,
- -597, 381, -597, -597, -597, 384, 374, -597, 398, 399,
- 400, 383, 403, -597, 260, -597, 459, 258, -597, -597,
- -597, -597, -597, -597, 42, 42, 42, -597, 404, -597,
- -597, -597, -597, -597, -597, -597, -597, -597, -597, 405,
- -597, -597, -597, 1164, 883, 466, 841, -597, 258, 376,
- -597, -597, 51, 92, 412, 415, 416, 376, 417, -597,
- -597, -597, -597, -597, -597, 60, -597, -597, 418, 419,
- 258, -597, 202, 318, -597, 420, -597, -597, -597, -597,
- 220, -597, 423, -597, 424, 425, 426, 428, 429, -597,
- 258, -597, -597, -597, -597, -597, 430, 431, -597, 130,
- 130, -597, -597, -597, -597, -597, -597, -597, -597, 432,
- -597, 433, 96, 96, 96, 434, -597, 435, 436, 437,
- 447, 448, 453, -597, -597, -597, 455, 456, 450, 457,
- -597, -597, -597, -597, -597, -597, -597, -597, -597, -597,
- 402, 402, 335, -597, -597, 458, 427, 460, -597, 474,
- -597, -597, -597, -597, -597, 1213, -597, 42, -597, -597,
- -597, -597, -597, -597, -597, -597, -597, 61, -597, -597,
- -597, -597, -597, -597, -597, -597, -597, -597, -597, -597,
- -597, -597, -597, 440, 440, -597, -597, -597, -597, 841,
- -597, -597, -597, -597, -597, -597, -597, -597, -597, 461,
- 463, 464, 465, 202, 42, -597, -597, -597, -597, 469,
- 258, 63, -597, -597, 473, 509, -597, -597, -597, -597,
- -597, 445, -597, 42, -597, -597, -597, -597, -597, 258,
- 477, 478, -597, -597, 440, 500, -597, 487, 559, 557,
- 557, -597, 541, 505, -597, -597, 258, 510, -597, 64,
- 495, -597, -597, 184, -597, -597, 496, -597, -597, -597,
- -597, -597, -597, -597, -597, 543, 600, -597, 516, -597,
- 557, -597, -597, -597, -597, -597, -597, -597, 841, -597,
- 512, 522, 557, 523, 565, -597, 42, -597, -597, 538,
- -597, 526, 189, 557, -597, 545, 402, 542, 544, 93,
- -597, 73, -597, -597, -597, -597, -597, -597, -597, -597,
- 258, -597, 550, -597, -597, -597, -597, 531, -597, -597,
- -597, -597, -597, -597, -597, -597, 260, 97, -597, 559,
- 42, 42, 533, -597, 600, -597, 554, 841, 601, 556,
- -597, -597, -597, -597, -597, 547, 552, -597, -597, -597,
- -597, -597, -597, -597, -597, -597, 562, -597, -597, 42,
- 189, -597, 551, -597, -597, 566, -597, -597, -597, -597,
- 597, -597, 569, 585, -597, -597, 603, -597
+ -631, 53, 704, -631, -631, -631, -631, -631, -631, -631,
+ -631, -631, -631, -631, 96, 66, 98, 140, -631, 96,
+ 96, -631, 44, 44, -631, -631, 96, -631, -631, 0,
+ -631, 239, 23, 54, -631, -631, 97, -631, -631, -631,
+ -631, -631, -631, 347, -631, -631, -631, -631, -631, 1376,
+ 67, -631, -631, 91, -631, 169, -631, -631, -631, -631,
+ -631, -631, -631, -631, -631, -631, -631, -631, -631, -631,
+ -631, -631, -631, -631, 125, -631, -631, -631, 125, -631,
+ -631, 147, 165, 1173, 44, 96, 1485, 96, 96, 96,
+ 96, -631, -631, -631, 99, 96, 145, -631, 151, 96,
+ -631, 125, 96, 199, 203, 96, -631, -631, 15, -631,
+ 28, -631, -631, 153, -631, 204, 214, 403, -631, -631,
+ -631, 215, 257, -631, 218, 220, 222, 170, -631, 154,
+ -631, -631, -631, -631, -631, -631, 225, -631, -631, -631,
+ -631, -631, -631, 240, -631, -631, -631, -631, -631, -631,
+ -631, -631, -631, -631, -631, -631, -631, -631, -631, -631,
+ -631, 169, -631, -631, -631, 188, -631, -631, 229, -631,
+ 231, 236, 242, -631, 44, 241, 243, 244, -631, 246,
+ 247, 248, 250, 256, 251, 258, 261, -631, -631, -631,
+ 264, 266, -631, -631, -631, -631, 240, -631, -631, -631,
+ -631, -631, -631, -631, -631, -631, 240, -631, -631, -631,
+ -631, -631, -631, -631, -631, 281, -631, 285, -631, -631,
+ 253, -631, 329, -631, -631, -631, 41, 70, -631, -631,
+ -631, 1173, -631, -631, -631, -631, 288, -631, -631, -631,
+ -631, 334, -631, -631, 39, 290, -631, -631, -631, -631,
+ -631, -631, -631, -631, 372, -631, 150, 293, 339, -631,
+ -631, -631, -631, -631, -631, 240, -631, -631, 291, -631,
+ -631, -631, -631, -631, -631, -631, -631, -631, 339, 301,
+ 304, -631, -631, -631, 96, 96, 308, 310, -631, -631,
+ -631, 311, -631, 329, -631, -631, -631, -631, -631, -631,
+ 400, -631, 313, 312, -631, -631, -631, -631, -631, -631,
+ -631, -631, -631, -631, 56, 56, 56, 150, 240, -631,
+ -631, 315, 317, 314, 88, 111, 166, -631, -631, -631,
+ -631, -631, 44, -631, -631, -631, -631, 322, -631, 44,
+ -631, 150, 150, 150, 303, -631, -631, -631, -631, -631,
+ -631, -631, 221, -631, -6, -631, -631, -631, -631, -631,
+ -631, -631, -631, 44, 339, -631, -631, -631, 331, 253,
+ 633, 1245, 332, 333, -631, 403, -631, -631, -631, 323,
+ 150, 150, 150, 150, 150, 150, 150, 150, 150, 150,
+ 327, 96, -631, 240, 1081, 829, 150, -631, -631, -631,
+ -631, -631, 150, -631, -631, -631, -631, -631, 152, 997,
+ -631, -631, -631, -631, 83, 373, 44, 44, -631, -631,
+ -631, -631, -631, 83, -631, 342, -631, 338, -631, 343,
+ -631, -631, 1116, 240, -631, 44, 339, -631, -631, -631,
+ -631, 348, -631, -631, 96, -631, -631, 350, 349, 438,
+ 357, -631, -631, 317, 314, 88, 111, 111, 166, 166,
+ -631, -631, -631, -631, -631, 354, -631, -631, -631, 359,
+ -631, -631, -631, -631, -631, -631, 869, -631, -631, -631,
+ -631, -631, 360, -631, -631, -631, 363, 361, 770, 368,
+ 370, 371, 369, -631, 362, -631, 378, 365, 375, 1325,
+ 192, 44, 44, 44, -631, 383, -631, -631, -631, -631,
+ -631, -631, -631, 96, 96, -631, 384, -631, -631, -631,
+ 1200, 913, 444, 953, -631, 240, 329, -631, -631, 65,
+ 68, 388, 394, 395, 329, 396, -631, -631, 1, -631,
+ 71, -631, -631, 397, 398, 240, -631, 210, 1485, -631,
+ 457, -631, -631, -631, -631, 39, -631, 401, -631, 402,
+ 404, 405, 406, 407, -631, 240, -631, -631, -631, -631,
+ -631, 408, 409, -631, 1466, 1466, -631, -631, -631, -631,
+ -631, -631, -631, 150, -631, 329, -631, -631, -631, -631,
+ -631, -631, 483, 240, -631, -631, -631, -631, -631, -631,
+ 79, 79, 79, 412, -631, 414, 417, 418, 423, 429,
+ 431, -631, -631, -631, 433, 434, 435, 437, -631, -631,
+ -631, -631, -631, -631, -631, -631, -631, -631, 150, -631,
+ -631, -631, 96, -631, 442, 430, 448, -631, 473, -631,
+ -631, -631, -631, -631, 452, 150, 453, 1351, -631, 44,
+ -631, -631, -631, -631, -631, -631, -631, -631, -631, 80,
+ -631, -631, -631, 369, 378, 466, 96, 449, -631, -631,
+ -631, -631, -631, -631, -631, -631, -631, -631, 451, 451,
+ -631, -631, -631, -631, 953, 96, -631, 150, 416, -631,
+ -631, -631, -631, -631, 471, 472, 474, 475, 210, -631,
+ -631, -631, 44, -631, -631, -631, -631, 478, 240, 81,
+ -631, -631, -631, -631, -631, 528, -631, -631, -631, -631,
+ -631, -631, -631, -631, 44, -631, -631, -631, -631, -631,
+ 240, 477, 508, -631, -631, 451, 481, 484, 464, 539,
+ 537, 537, 96, 521, 487, 469, -631, 240, 491, -631,
+ -631, 479, -631, -631, -631, -631, -631, 480, -631, -631,
+ -631, -631, -631, -631, -631, -631, -631, 524, 582, 482,
+ -631, 537, 93, 953, -631, 495, 485, 537, 486, 530,
+ 96, 44, -631, -631, 501, -631, 489, 211, 537, -631,
+ -631, -631, -631, -631, -631, -631, -631, -631, -631, -631,
+ -631, -631, -631, -631, -631, 240, -631, 502, -631, -631,
+ -631, -631, 493, -631, -631, -631, 509, 150, 507, 511,
+ 69, -631, 228, 96, 539, 44, 44, 497, 96, 582,
+ -631, 510, 953, 564, -631, -631, -631, -631, -631, 1440,
+ -631, -631, -631, 499, 500, -631, -631, -631, -631, -631,
+ -631, -631, 514, -631, -631, -631, -631, 44, 211, 96,
+ 504, -631, 96, 522, 505, -631, -631, -631, -631, -631,
+ -631, 538, -631, 506, 520, -631, -631, 540, -631
};
/* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
@@ -928,179 +954,184 @@ static const yytype_int16 yypact[] =
means the default is an error. */
static const yytype_uint16 yydefact[] =
{
- 4, 0, 192, 1, 0, 35, 141, 37, 67, 201,
- 262, 278, 313, 361, 192, 0, 0, 0, 91, 192,
- 192, 472, 0, 0, 542, 563, 0, 3, 5, 39,
- 21, 58, 0, 0, 19, 61, 74, 63, 23, 75,
- 80, 76, 81, 74, 77, 78, 62, 15, 191, 9,
- 207, 264, 203, 312, 204, 230, 231, 205, 17, 11,
- 13, 25, 432, 431, 434, 27, 470, 29, 502, 504,
- 503, 501, 74, 520, 521, 500, 74, 31, 33, 0,
- 0, 0, 0, 192, 0, 192, 192, 192, 192, 242,
- 0, 206, 74, 192, 74, 85, 74, 192, 79, 74,
- 192, 438, 513, 192, 136, 132, 0, 131, 0, 192,
- 192, 194, 43, 0, 0, 0, 192, 6, 7, 0,
- 94, 69, 0, 0, 0, 246, 248, 0, 252, 253,
- 256, 257, 258, 259, 255, 260, 261, 327, 335, 340,
- 89, 214, 99, 210, 212, 213, 211, 215, 244, 245,
- 216, 220, 217, 219, 218, 221, 222, 264, 227, 0,
- 228, 229, 223, 0, 226, 224, 334, 225, 339, 0,
- 0, 0, 280, 0, 0, 0, 0, 0, 0, 0,
- 0, 514, 507, 516, 0, 0, 566, 562, 36, 255,
- 154, 142, 146, 150, 151, 147, 148, 149, 152, 153,
- 38, 68, 202, 208, 263, 279, 314, 362, 137, 70,
- 511, 71, 0, 512, 92, 443, 473, 0, 429, 134,
- 430, 0, 0, 0, 40, 22, 0, 527, 523, 524,
- 529, 526, 530, 528, 525, 522, 0, 45, 535, 0,
- 0, 20, 93, 72, 64, 24, 82, 247, 254, 249,
- 251, 0, 0, 96, 326, 323, 331, 336, 16, 10,
- 265, 0, 18, 12, 14, 26, 435, 28, 484, 471,
- 30, 96, 0, 0, 32, 34, 570, 192, 192, 0,
- 0, 86, 441, 439, 481, 133, 0, 543, 564, 136,
- 180, 181, 182, 184, 187, 186, 188, 189, 185, 183,
- 0, 0, 0, 0, 177, 195, 156, 157, 159, 161,
- 163, 166, 169, 173, 178, 0, 196, 199, 4, 531,
- 0, 536, 0, 532, 561, 155, 560, 59, 0, 110,
- 101, 250, 190, 0, 328, 0, 90, 0, 0, 0,
- 271, 281, 445, 488, 515, 508, 517, 567, 143, 242,
- 209, 235, 236, 237, 243, 315, 363, 110, 0, 96,
- 479, 474, 135, 0, 443, 0, 174, 175, 176, 0,
+ 4, 0, 0, 3, 1, 38, 144, 40, 70, 221,
+ 282, 298, 333, 381, 0, 0, 0, 0, 94, 0,
+ 0, 492, 0, 0, 561, 582, 0, 6, 7, 42,
+ 24, 61, 0, 0, 22, 64, 77, 66, 26, 78,
+ 83, 79, 84, 77, 80, 81, 65, 18, 10, 0,
+ 0, 12, 227, 284, 223, 332, 224, 250, 251, 225,
+ 20, 14, 16, 28, 452, 451, 454, 30, 490, 32,
+ 522, 524, 523, 521, 77, 540, 541, 520, 77, 34,
+ 36, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 140, 262, 226, 77, 0, 77, 88, 77, 0,
+ 82, 77, 0, 458, 533, 0, 139, 135, 0, 134,
+ 0, 210, 210, 0, 46, 0, 0, 0, 210, 8,
+ 9, 0, 97, 72, 0, 0, 0, 266, 268, 0,
+ 272, 273, 276, 277, 278, 279, 275, 280, 281, 347,
+ 355, 360, 92, 234, 102, 230, 232, 233, 231, 235,
+ 264, 265, 236, 240, 237, 239, 238, 241, 242, 284,
+ 247, 0, 248, 249, 243, 0, 246, 244, 354, 245,
+ 359, 0, 0, 5, 0, 208, 0, 0, 300, 0,
+ 0, 0, 0, 0, 0, 0, 0, 534, 527, 536,
+ 0, 0, 585, 581, 39, 275, 157, 145, 149, 153,
+ 154, 150, 151, 152, 155, 156, 41, 71, 222, 228,
+ 283, 299, 334, 382, 73, 531, 74, 0, 532, 95,
+ 463, 493, 0, 449, 137, 450, 0, 0, 194, 43,
+ 25, 0, 547, 543, 544, 549, 546, 550, 548, 545,
+ 542, 0, 48, 554, 0, 0, 23, 96, 75, 67,
+ 27, 85, 267, 274, 269, 271, 0, 0, 99, 346,
+ 343, 351, 356, 19, 11, 211, 13, 285, 0, 21,
+ 15, 17, 29, 455, 31, 504, 491, 33, 99, 0,
+ 0, 35, 37, 589, 0, 0, 0, 0, 89, 461,
+ 459, 501, 136, 0, 562, 209, 583, 197, 4, 551,
+ 0, 555, 0, 552, 183, 184, 185, 187, 190, 189,
+ 191, 192, 188, 186, 0, 0, 0, 0, 180, 580,
+ 158, 159, 160, 162, 164, 166, 169, 172, 176, 181,
+ 579, 62, 0, 113, 104, 270, 193, 0, 348, 0,
+ 93, 0, 0, 0, 214, 291, 301, 465, 508, 535,
+ 528, 537, 586, 146, 262, 229, 255, 256, 257, 263,
+ 335, 383, 113, 0, 99, 499, 494, 138, 0, 463,
+ 0, 0, 3, 0, 49, 0, 177, 178, 179, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 193, 197, 192, 41, 0, 46, 533, 558, 192, 73,
- 130, 0, 0, 0, 0, 95, 324, 332, 337, 266,
- 270, 0, 0, 436, 0, 110, 101, 351, 356, 0,
- 466, 0, 0, 575, 349, 350, 571, 573, 0, 577,
- 0, 569, 0, 0, 232, 192, 270, 0, 442, 440,
- 0, 96, 544, 565, 200, 179, 158, 160, 162, 164,
- 165, 167, 168, 170, 171, 172, 0, 0, 0, 0,
- 0, 0, 192, 60, 127, 125, 371, 372, 0, 109,
- 117, 111, 121, 119, 123, 0, 113, 115, 376, 107,
- 105, 0, 100, 102, 103, 0, 0, 329, 0, 0,
- 0, 0, 271, 276, 0, 272, 246, 292, 287, 288,
- 289, 290, 282, 291, 0, 0, 0, 456, 0, 444,
- 446, 448, 450, 452, 454, 458, 192, 192, 489, 0,
- 487, 490, 492, 0, 0, 0, 0, 462, 461, 0,
- 465, 464, 0, 0, 0, 0, 0, 0, 0, 568,
- 144, 346, 342, 345, 233, 0, 316, 321, 271, 0,
- 480, 475, 0, 0, 198, 3, 42, 537, 47, 534,
- 0, 128, 0, 66, 0, 0, 0, 0, 0, 375,
- 405, 402, 403, 404, 366, 374, 0, 0, 192, 0,
- 0, 84, 104, 330, 325, 333, 338, 267, 269, 0,
- 273, 0, 0, 0, 0, 0, 437, 0, 0, 0,
- 0, 0, 0, 494, 497, 486, 0, 0, 0, 0,
- 352, 357, 460, 556, 557, 576, 572, 574, 463, 578,
- 0, 0, 343, 192, 322, 0, 318, 0, 88, 0,
- 554, 550, 552, 545, 549, 0, 559, 0, 126, 118,
- 112, 122, 120, 124, 192, 114, 116, 0, 108, 106,
- 277, 192, 283, 469, 467, 468, 457, 447, 449, 451,
- 453, 455, 459, 0, 0, 491, 493, 510, 519, 0,
- 192, 145, 347, 344, 234, 317, 319, 365, 476, 0,
- 0, 0, 0, 547, 0, 53, 39, 48, 52, 0,
- 129, 0, 377, 274, 0, 380, 495, 498, 353, 358,
- 241, 0, 192, 0, 555, 551, 553, 546, 548, 55,
- 0, 192, 54, 367, 0, 0, 284, 0, 0, 412,
- 412, 192, 416, 238, 348, 320, 477, 0, 49, 0,
- 0, 378, 275, 0, 381, 388, 0, 387, 409, 496,
- 499, 354, 413, 359, 239, 483, 0, 51, 393, 368,
- 412, 299, 306, 304, 285, 295, 296, 303, 0, 383,
- 384, 0, 412, 0, 420, 192, 0, 478, 541, 0,
- 540, 0, 0, 412, 379, 0, 0, 0, 0, 0,
- 192, 301, 389, 385, 410, 355, 414, 417, 360, 240,
- 482, 56, 538, 392, 406, 407, 408, 0, 398, 399,
- 369, 300, 307, 305, 286, 294, 0, 0, 192, 0,
- 0, 0, 0, 192, 0, 394, 395, 0, 424, 0,
- 309, 297, 302, 390, 386, 0, 0, 418, 57, 539,
- 396, 400, 421, 370, 308, 192, 0, 411, 415, 0,
- 0, 192, 0, 310, 298, 0, 397, 401, 422, 419,
- 0, 428, 0, 425, 423, 426, 0, 427
+ 577, 0, 76, 133, 0, 0, 0, 210, 98, 344,
+ 352, 357, 0, 212, 286, 290, 210, 210, 456, 0,
+ 113, 104, 371, 376, 0, 486, 0, 0, 594, 369,
+ 370, 590, 592, 0, 596, 0, 588, 0, 210, 252,
+ 210, 290, 0, 462, 460, 0, 99, 563, 584, 201,
+ 195, 0, 203, 196, 0, 198, 204, 0, 0, 0,
+ 0, 553, 182, 161, 163, 165, 167, 168, 170, 171,
+ 173, 174, 175, 210, 63, 130, 128, 391, 392, 0,
+ 112, 120, 114, 124, 122, 126, 0, 116, 118, 396,
+ 110, 108, 0, 103, 105, 106, 0, 0, 0, 0,
+ 0, 0, 134, 215, 0, 216, 219, 0, 291, 0,
+ 0, 0, 0, 0, 476, 0, 464, 466, 468, 470,
+ 472, 474, 478, 0, 0, 509, 0, 507, 510, 512,
+ 0, 0, 0, 0, 482, 481, 0, 485, 484, 0,
+ 0, 0, 0, 0, 0, 0, 587, 147, 0, 253,
+ 0, 336, 341, 291, 0, 500, 495, 0, 0, 199,
+ 207, 200, 45, 556, 50, 0, 131, 0, 69, 0,
+ 0, 0, 0, 0, 395, 425, 422, 423, 424, 386,
+ 394, 0, 0, 210, 0, 0, 87, 107, 350, 349,
+ 345, 353, 358, 0, 213, 0, 217, 287, 289, 296,
+ 293, 292, 266, 312, 307, 308, 309, 310, 302, 311,
+ 0, 0, 0, 0, 457, 0, 0, 0, 0, 0,
+ 0, 514, 517, 506, 0, 0, 0, 0, 372, 377,
+ 480, 575, 576, 595, 591, 593, 483, 597, 0, 366,
+ 362, 365, 0, 342, 0, 338, 0, 91, 0, 573,
+ 569, 571, 564, 568, 0, 0, 0, 0, 578, 0,
+ 129, 121, 115, 125, 123, 127, 210, 117, 119, 0,
+ 111, 109, 220, 0, 219, 0, 0, 0, 489, 487,
+ 488, 477, 467, 469, 471, 473, 475, 479, 0, 0,
+ 511, 513, 530, 539, 0, 0, 148, 0, 363, 254,
+ 337, 339, 385, 496, 0, 0, 0, 0, 566, 202,
+ 206, 205, 0, 56, 42, 51, 55, 0, 132, 0,
+ 397, 218, 297, 294, 303, 400, 515, 518, 373, 378,
+ 261, 367, 364, 210, 0, 574, 570, 572, 565, 567,
+ 58, 0, 0, 57, 387, 0, 0, 0, 0, 0,
+ 432, 432, 0, 436, 258, 0, 340, 497, 0, 52,
+ 54, 0, 398, 295, 304, 401, 408, 0, 407, 429,
+ 516, 519, 374, 433, 379, 259, 368, 503, 0, 413,
+ 388, 432, 0, 0, 403, 404, 0, 432, 0, 440,
+ 0, 0, 498, 560, 0, 559, 0, 0, 432, 399,
+ 319, 326, 324, 305, 315, 316, 323, 409, 405, 430,
+ 375, 434, 437, 380, 260, 502, 59, 557, 412, 426,
+ 427, 428, 0, 418, 419, 389, 0, 0, 0, 0,
+ 0, 210, 321, 0, 0, 0, 0, 0, 0, 0,
+ 414, 415, 0, 444, 320, 327, 325, 306, 314, 0,
+ 322, 410, 406, 0, 0, 438, 60, 558, 416, 420,
+ 441, 390, 0, 329, 317, 431, 435, 0, 0, 0,
+ 0, 328, 0, 0, 0, 417, 421, 442, 330, 318,
+ 439, 0, 448, 0, 445, 443, 446, 0, 447
};
/* YYPGOTO[NTERM-NUM]. */
static const yytype_int16 yypgoto[] =
{
- -597, -597, 362, 237, -597, -582, -597, -597, -597, -597,
- -597, -597, -597, -597, -597, -597, -597, -597, -597, -597,
- -558, -597, -597, -597, -597, -597, -597, -597, -597, -597,
- -597, -597, -597, -597, -597, -34, -597, -597, -597, -597,
- -597, -597, -597, -597, -597, -597, -597, 244, -597, -597,
- 162, -597, -597, -597, 666, -597, -597, -597, -597, -597,
- -597, -597, 670, -597, 272, -597, -597, -235, -597, -597,
- 281, -597, -597, -597, -597, -276, -352, -597, -597, -597,
- -597, -597, -597, -597, -597, -316, -597, -597, -22, -597,
- -597, -189, -11, -597, 13, -597, -597, -597, -597, 462,
- 79, -207, -597, 320, 322, 319, -65, -73, -24, 66,
- -597, -304, 0, -597, -597, -597, -597, 248, 14, -597,
- -597, -597, -71, 301, -438, -597, -597, -597, 55, -597,
- -597, -576, -14, -597, -597, -3, -597, -56, -597, -597,
- -43, -42, -55, -51, -50, -597, -597, -37, -597, -36,
- -597, -597, -597, -597, 280, 358, -597, -254, -597, -597,
- -597, -33, -597, -31, -597, -597, -597, -597, -597, -597,
- -597, -597, -597, -70, -597, -597, -597, -597, -597, -95,
- -597, -597, -597, -597, -597, -597, -597, -38, -597, -597,
- -597, -597, -597, -597, -597, 11, -597, -597, -597, -597,
- -597, -597, -597, -67, -597, -597, -597, -66, -597, -597,
- -597, -597, -597, -597, -597, 95, -597, -597, -323, -597,
- -597, -597, -597, -597, -597, -597, -597, -597, -597, 16,
- -597, -597, -597, -597, -597, -597, -597, -597, -597, -597,
- -597, -597, -597, -597, -597, -596, -597, -597, -597, -597,
- -597, -90, -597, -597, -597, -597, -597, -597, -597, -597,
- -126, -597, -597, -487, -597, -543, -597, -597, -597, -597,
- -597, -597, -597, -597, -597, -597, -597, -597, -597, -597,
- 18, 19, -597, -597, -597, -597, -597, -597, -597, -597,
- -597, 359, -597, -597, -597, -597, -597, -597, -597, -597,
- -597, -597, -305, 304, -303, -597, -597, -597, -597, -597,
- -597, -597, -597, -597, -597, -597, -597, -597, -597, -597,
- -597, -597, -597, -597, -597, -597, -597, -597, -597, -597,
- -597, -597, -597, -597, -597, -597, -597, -597, -597, -597,
- -597, -597, -597, -597, -597, -597, 648, -597, -597, -597,
- -597, -597, -597, -597, -597, -597, -597, 279, -597, -597,
- -75, -597, -597, -597, -597, -597, -597, -597, 69, -597,
- -597, -597, 347, -597, -597, 195, -597, -597, -597, -597,
- -597, -597, -597, -597, -597, -597, -597, -597, -597
+ -631, -631, 318, 319, 570, -587, -631, -631, -631, -631,
+ -631, -631, -631, -631, -631, -631, -631, -631, -631, -631,
+ -631, -584, -631, -631, -631, -631, -631, -631, -631, -631,
+ -631, -631, -631, -631, -631, -631, -112, -631, -631, -631,
+ -631, -631, -631, -631, -631, -631, -631, -631, 249, -631,
+ -631, 120, -631, -631, -631, 604, -631, -631, -631, -631,
+ -631, -631, -631, 606, -631, 255, -631, -631, -237, -631,
+ -631, 212, -631, -631, -631, -631, -310, -352, -631, -631,
+ -631, -631, -631, -631, -631, -631, -327, -631, -631, -22,
+ -631, -631, -183, -10, -631, 6, -631, -631, -631, -631,
+ -193, -4, -230, -631, 245, 252, 270, -100, -87, -111,
+ -19, -631, -309, -631, -631, -631, -631, -631, -631, -631,
+ -631, -631, -88, 576, -631, -631, -631, -631, -36, 45,
+ 16, -631, 84, -631, -40, 141, -447, -631, -631, -631,
+ -35, -631, -631, -601, -108, -631, -631, -8, -631, -58,
+ -631, -631, -47, -43, -57, -56, -55, 268, -631, -38,
+ -631, -32, -631, -631, -631, -631, 208, 309, -631, -274,
+ -631, -631, -631, -30, -631, -28, -631, -631, -631, -631,
+ -631, -631, -631, -631, -631, -165, -631, -631, -631, -631,
+ -631, -162, -631, -631, -631, -631, -631, -631, -631, -41,
+ -631, -631, -631, -631, -631, -631, -631, -62, -631, -631,
+ -631, -631, -631, -631, -631, -76, -631, -631, -631, -66,
+ -631, -631, -631, -631, -631, -631, -631, -31, -631, -631,
+ -315, -631, -631, -631, -631, -631, -631, -631, -631, -631,
+ -631, 17, -631, -631, -631, -631, -631, -631, -631, -631,
+ -631, -631, -631, -631, -631, -631, -631, -630, -631, -631,
+ -631, -631, -631, -158, -631, -631, -631, -631, -631, -631,
+ -631, -631, -190, -631, -631, -488, -631, -591, -631, -631,
+ -631, -631, -631, -631, -631, -631, -631, -631, -631, -631,
+ -631, -631, 18, 20, -631, -631, -631, -631, -631, -631,
+ -631, -631, -631, 300, -631, -631, -631, -631, -631, -631,
+ -631, -631, -631, -631, -302, 259, -301, -631, -631, -631,
+ -631, -631, -631, -631, -631, -631, -631, -631, -631, -631,
+ -631, -631, -631, -631, -631, -631, -631, -631, -631, -631,
+ -631, -631, -631, -631, -631, -631, -631, -631, -631, -631,
+ -631, -631, -631, -631, -631, -631, -631, -631, 592, -631,
+ -631, -631, -631, -631, -631, -631, -631, -631, 296, -631,
+ -631, -157, -631, -631, -631, -631, -631, -631, -631, -25,
+ -631, -631, -631, 271, -631, -631, 119, -631, -631, -631,
+ -631, -631, -631, -631, -631, -631, -631, -631, -631, -631
};
/* YYDEFGOTO[NTERM-NUM]. */
static const yytype_int16 yydefgoto[] =
{
- -1, 1, 2, 27, 383, 28, 170, 174, 175, 169,
- 173, 119, 114, 123, 176, 178, 180, 184, 185, 80,
- 29, 82, 30, 113, 318, 448, 31, 32, 115, 322,
- 450, 625, 700, 677, 701, 678, 679, 717, 803, 33,
- 116, 388, 34, 35, 122, 329, 458, 36, 83, 37,
- 140, 328, 38, 39, 40, 124, 330, 471, 41, 212,
- 357, 539, 42, 253, 43, 100, 243, 336, 44, 45,
- 392, 472, 473, 570, 569, 391, 459, 555, 566, 567,
- 554, 557, 556, 558, 552, 389, 454, 627, 304, 217,
- 286, 107, 349, 46, 460, 81, 277, 422, 610, 191,
- 324, 332, 306, 307, 308, 309, 310, 311, 312, 313,
- 314, 333, 90, 48, 315, 316, 381, 317, 461, 84,
- 202, 278, 142, 143, 144, 145, 146, 50, 350, 424,
- 613, 351, 689, 713, 755, 352, 353, 147, 148, 149,
- 150, 151, 152, 153, 154, 155, 156, 51, 85, 52,
- 171, 340, 481, 399, 482, 578, 401, 485, 641, 705,
- 579, 53, 86, 54, 261, 402, 581, 684, 723, 768,
- 492, 744, 769, 745, 770, 826, 765, 746, 771, 747,
- 767, 766, 809, 811, 825, 55, 56, 57, 87, 279,
- 425, 615, 536, 616, 692, 537, 162, 337, 478, 163,
- 252, 394, 164, 165, 338, 479, 166, 167, 339, 480,
- 168, 354, 423, 532, 612, 533, 611, 691, 462, 414,
- 515, 659, 711, 752, 415, 516, 660, 712, 754, 463,
- 88, 280, 426, 617, 464, 634, 720, 763, 808, 465,
- 564, 475, 568, 704, 740, 686, 707, 708, 726, 750,
- 799, 727, 748, 798, 739, 761, 762, 787, 806, 830,
- 788, 807, 831, 565, 789, 729, 751, 800, 733, 753,
- 801, 778, 802, 829, 823, 832, 840, 842, 843, 846,
- 466, 467, 61, 62, 63, 177, 342, 498, 64, 215,
- 359, 283, 358, 403, 499, 587, 588, 589, 590, 591,
- 585, 592, 621, 519, 622, 418, 521, 502, 503, 504,
- 65, 179, 66, 103, 284, 431, 619, 693, 735, 361,
- 430, 757, 269, 343, 509, 404, 510, 596, 597, 511,
- 653, 709, 512, 654, 710, 67, 68, 69, 70, 71,
- 272, 405, 598, 72, 73, 74, 182, 271, 75, 273,
- 406, 599, 76, 236, 237, 323, 451, 238, 759, 782,
- 760, 77, 109, 363, 542, 672, 623, 673, 624, 670,
- 671, 669, 419, 240, 387, 326, 78, 79, 110, 364,
- 187, 276, 420, 347, 421, 525, 526, 524, 528
+ -1, 1, 2, 3, 27, 28, 172, 176, 180, 181,
+ 171, 179, 121, 116, 125, 182, 184, 186, 190, 191,
+ 82, 29, 84, 30, 115, 298, 448, 31, 32, 117,
+ 302, 450, 647, 731, 705, 732, 706, 707, 748, 828,
+ 33, 118, 391, 34, 35, 124, 333, 469, 36, 85,
+ 37, 142, 332, 38, 39, 40, 126, 334, 482, 41,
+ 217, 362, 544, 42, 258, 43, 102, 248, 340, 44,
+ 45, 395, 483, 484, 575, 574, 394, 470, 560, 571,
+ 572, 559, 562, 561, 563, 557, 392, 465, 649, 318,
+ 222, 293, 109, 354, 46, 471, 83, 284, 427, 628,
+ 197, 319, 336, 321, 322, 323, 324, 325, 326, 327,
+ 328, 329, 337, 48, 297, 370, 443, 548, 444, 445,
+ 646, 49, 50, 295, 344, 403, 494, 495, 586, 496,
+ 472, 86, 208, 285, 590, 145, 146, 147, 148, 52,
+ 355, 429, 632, 356, 719, 744, 780, 357, 358, 149,
+ 150, 151, 152, 153, 154, 155, 156, 157, 158, 53,
+ 87, 54, 177, 345, 497, 404, 498, 588, 406, 591,
+ 666, 736, 665, 55, 88, 56, 268, 407, 667, 737,
+ 772, 819, 598, 793, 820, 794, 821, 863, 816, 795,
+ 822, 796, 818, 817, 852, 854, 862, 57, 58, 59,
+ 89, 286, 430, 634, 541, 635, 723, 542, 164, 341,
+ 489, 165, 257, 397, 166, 167, 342, 490, 168, 169,
+ 343, 491, 170, 359, 428, 630, 688, 631, 687, 745,
+ 473, 419, 522, 684, 742, 777, 420, 523, 685, 743,
+ 779, 474, 90, 287, 431, 636, 475, 656, 751, 788,
+ 833, 476, 569, 486, 573, 735, 771, 716, 738, 739,
+ 757, 775, 824, 758, 773, 823, 770, 786, 787, 812,
+ 831, 858, 813, 832, 859, 570, 814, 760, 776, 825,
+ 764, 778, 826, 803, 827, 857, 851, 860, 871, 873,
+ 874, 877, 477, 478, 63, 64, 65, 183, 347, 505,
+ 66, 220, 364, 290, 363, 408, 506, 605, 606, 607,
+ 608, 609, 603, 610, 640, 526, 641, 423, 528, 509,
+ 510, 511, 67, 185, 68, 105, 291, 436, 638, 724,
+ 767, 366, 435, 782, 276, 348, 516, 409, 517, 614,
+ 615, 518, 678, 740, 519, 679, 741, 69, 70, 71,
+ 72, 73, 279, 410, 616, 74, 75, 76, 188, 278,
+ 77, 280, 411, 617, 78, 241, 242, 303, 243, 784,
+ 807, 785, 79, 111, 368, 547, 697, 642, 698, 643,
+ 695, 696, 694, 424, 245, 390, 330, 80, 81, 112,
+ 369, 193, 283, 425, 352, 426, 532, 533, 531, 535
};
/* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
@@ -1108,447 +1139,510 @@ static const yytype_int16 yydefgoto[] =
number is the opposite. If YYTABLE_NINF, syntax error. */
static const yytype_int16 yytable[] =
{
- 106, 108, 4, 89, 111, 161, 157, 158, 101, 102,
- 159, 91, 160, 203, 198, 199, 305, 47, 49, 395,
- 58, 141, 59, 60, 413, 192, 195, 561, 285, 601,
- 196, 197, 325, 396, 397, 398, 344, 664, 193, 194,
- 474, 104, 416, 675, 417, 104, 161, 157, 158, 3,
- 208, 159, 508, 160, 603, 287, -2, 517, 687, 190,
- 200, 288, 141, 614, 682, 5, 703, 676, 6, 7,
- 8, 9, 201, 218, 204, 205, 206, 207, 561, 219,
- 497, 427, 210, 8, 10, 11, 213, 12, -138, 214,
- 219, 13, 216, 120, 741, 604, 369, 362, 500, 104,
- 501, -192, -192, 117, 14, 15, 16, 17, 721, 221,
- 222, 18, 223, 18, 19, 97, 239, 20, 112, 105,
- 21, 742, 743, 105, 429, 742, 743, 22, 23, 513,
- 118, 483, 219, -192, 24, 25, 674, 675, -192, -192,
- -192, -192, -192, -192, -192, -192, -192, -192, -192, -192,
- -192, -192, 26, -192, -192, -192, -192, 26, 434, 198,
- 199, 676, 474, 26, -311, 26, 26, 730, 26, 26,
- 192, 195, 688, 219, 220, 196, 197, 219, -192, 247,
- 219, -293, 248, 193, 194, 741, 476, 186, 5, 120,
- -139, 6, 7, 8, 9, 120, 541, 764, 121, 8,
- -140, -97, 26, 172, 190, 120, 120, 10, 11, 775,
- 12, -192, 742, 743, 13, 377, 378, 379, 188, 620,
- 790, 561, 813, 104, 784, 785, 786, 14, 15, 16,
- 17, -433, 407, 408, 181, -192, 18, 19, 181, 254,
- 20, 255, 18, 21, 249, 250, 93, 373, 374, 833,
- 22, 23, 407, 408, 209, 837, 211, 24, 25, 92,
- 94, 772, 409, 104, 375, 376, 348, 410, 125, 126,
- 127, 128, 129, 130, 131, 132, 133, 134, 135, 136,
- 10, 11, 409, 12, 137, 138, 139, 410, 96, 99,
- 411, 412, 26, 290, 291, 292, 293, 294, 295, 296,
- 297, 105, 441, 442, 298, 299, 390, 662, 439, 440,
- 561, -505, -44, 390, -44, 638, 639, 300, 301, 224,
- 821, 225, 302, 303, 241, 26, 242, 244, -44, -44,
- 602, -44, -44, 245, 251, -44, 428, 246, 608, 219,
- 256, 105, 257, 325, 260, 289, 488, 489, 258, 259,
- 620, 490, 491, 443, 444, 445, 262, -44, 266, 263,
- 264, -44, 265, 267, 493, 26, 366, 367, 368, 561,
- 268, 270, 141, 274, 275, -44, -506, 453, 281, 104,
- 487, 321, 447, 282, 320, 331, 327, 518, 334, 522,
- 523, 335, 341, 643, 644, 645, 518, 345, 562, 563,
- 346, 484, 355, 325, 356, 104, 370, 360, 540, 371,
- 380, 365, 384, 580, 385, 290, 291, 292, 293, 294,
- 295, 296, 297, 105, 372, 535, 298, 299, 386, 393,
- 432, -341, 446, 435, 530, 449, 529, 520, 452, 300,
- 301, 531, 534, 560, 302, 303, 161, 157, 158, 562,
- 563, 159, 550, 160, 104, 543, 546, 547, 548, 551,
- 47, 49, 141, 58, 573, 59, 60, 247, 553, 571,
- 572, 577, 582, 583, 584, 290, 291, 292, 293, 294,
- 295, 296, 297, 105, 815, 816, 298, 299, 574, 575,
- 576, -268, 586, 595, 560, 593, 594, 600, 605, 300,
- 301, 606, 607, 609, 302, 303, -364, 618, -8, 628,
- 629, 630, 631, 835, 632, 633, 635, 636, 640, 666,
- 646, 647, 648, 649, 290, 291, 292, 293, 294, 295,
- 296, 297, 105, 650, 651, 298, 299, 642, 657, 652,
- 668, 655, 656, 685, -382, 658, 665, 694, 667, 695,
- 696, 104, 714, 697, 303, 702, 486, 126, 127, 792,
- 706, 130, 131, 132, 133, 718, -50, 104, 637, 484,
- 484, 12, 125, 126, 127, 128, 129, 130, 131, 132,
- 133, 134, 135, 136, 10, 11, 722, 12, 137, 138,
- 139, 724, 562, 563, 725, 728, 732, 734, 738, 736,
- 749, 104, 756, 758, 773, 680, 125, 126, 127, 128,
- 129, 130, 131, 132, 133, 134, 135, 136, 10, 11,
- -391, 12, 137, 138, 139, 774, 776, 777, 781, 105,
- 783, 791, 794, 793, 681, 805, 817, 560, 47, 49,
- 822, 58, 804, 59, 60, 105, 820, 824, 834, 89,
- -98, 827, 699, 104, 838, 120, 828, 690, 125, 126,
- 127, 128, 129, 130, 131, 132, 133, 134, 135, 136,
- 839, 716, 841, 844, 137, 138, 139, 845, 847, 105,
- 382, 562, 563, 98, 545, 737, 95, 514, 319, 661,
- 436, 438, 535, 437, 544, 477, 683, 731, 400, 795,
- 89, 719, 812, 715, 836, 104, 538, 663, 690, 814,
- 125, 126, 127, 128, 129, 130, 131, 132, 133, 189,
- 135, 136, 527, 433, 183, 810, 560, 138, 139, 819,
- 549, 105, 47, 49, 780, 58, 559, 59, 60, 0,
- 562, 563, 698, 0, 89, 626, 0, 0, 0, 0,
- 505, 0, 779, 0, 0, 0, 0, 0, 161, 157,
- 158, 0, 0, 159, 0, 160, 0, 0, 0, 0,
- 796, 797, 0, 0, 141, 0, 0, 0, 390, 390,
- 226, 0, 227, 105, 0, 560, 0, 0, 0, 0,
- 0, 0, 818, 0, 0, 0, 228, 229, 0, 230,
- 231, 0, 455, 232, -373, 6, 0, 390, 9, -373,
- -373, -373, -373, -373, -373, -373, -373, -373, -373, -373,
- -373, 10, 11, 0, 12, 233, -373, -373, 13, 234,
- 0, 407, 408, 456, 457, -373, 0, 0, 0, 0,
- 0, 14, 0, 235, 104, 468, 469, 470, 0, 125,
- 126, 127, 128, 129, 130, 131, 132, 133, 189, 135,
- 136, 0, 0, 0, 22, 23, 138, 139, 0, 0,
+ 108, 110, 163, 144, 92, 159, 93, 204, 47, 103,
+ 104, 160, 398, 161, 320, 162, 113, 205, 51, 60,
+ 61, 143, 62, 226, 227, 198, 201, 202, 203, 566,
+ 244, 689, 399, 400, 401, 619, 199, 418, 299, 292,
+ 200, 349, 106, 485, 294, 163, 209, 106, 159, 717,
+ 421, 422, 432, 4, 160, 47, 161, 515, 162, 106,
+ 703, 196, 206, 704, 143, 51, 60, 61, 621, 62,
+ 790, 622, 8, 296, 633, 207, 566, 210, 211, 212,
+ 213, -361, 106, 710, 734, 215, 106, 379, 174, 218,
+ 223, 114, 219, 504, 790, 221, 224, 791, 792, 91,
+ 520, -361, 524, 225, 8, 752, 507, 508, 629, 224,
+ 367, 119, 304, 305, 306, 307, 308, 309, 310, 311,
+ 107, 791, 792, 312, 313, 107, 174, 434, 174, 304,
+ 305, 306, 307, 308, 309, 310, 311, 107, 314, 315,
+ 312, 313, 120, 316, 317, 703, 224, 18, 704, 224,
+ 761, 95, 265, 106, 174, 204, 123, 174, 174, -313,
+ 224, 317, 254, 255, 107, 205, 487, 174, 174, 485,
+ 383, 384, 493, 198, 201, 202, 203, 442, 252, -331,
+ 789, 253, 412, 413, 199, -141, 800, -142, 200, 18,
+ 122, 178, 122, 99, 187, 106, 718, 815, 187, 546,
+ 592, 128, 129, 501, 502, 132, 133, 134, 135, 196,
+ 385, 386, 414, 503, 214, 12, 216, 415, 122, 492,
+ 416, 417, 841, 304, 305, 306, 307, 308, 309, 310,
+ 311, 107, 639, -143, 312, 313, 192, 566, 122, -100,
+ 412, 413, 228, -47, 122, -47, 809, 810, 811, 314,
+ 315, 412, 413, 194, 316, 317, 791, 792, 866, -47,
+ -47, 868, -47, -47, 94, 96, -47, 387, 388, 389,
+ 414, 98, 101, 107, 353, 415, 460, 461, 462, 174,
+ 259, 414, 260, 456, 457, 797, 415, -453, -47, 416,
+ 417, -525, -47, 229, 204, 376, 377, 378, 458, 459,
+ 660, 661, 230, 246, 205, 247, -47, 249, 250, 488,
+ 393, 251, 198, 201, 202, 203, 256, 393, 499, 500,
+ 261, 224, 262, 199, 263, 320, 566, 200, -209, 447,
+ 264, 266, 106, 267, 269, 270, 271, 301, 272, 274,
+ 538, 433, 540, 620, 849, 273, 289, 275, 196, 277,
+ 106, 626, 281, 662, 282, 127, 128, 129, 130, 131,
+ 132, 133, 134, 135, 136, 137, 138, 10, 11, -526,
+ 12, 139, 140, 141, 288, 555, 441, 47, 721, 300,
+ 335, 464, 331, 639, 338, 566, 339, 51, 60, 61,
+ 350, 62, 525, 351, 529, 530, 346, 360, 320, 361,
+ 567, 525, 663, 373, 365, 374, 375, 231, 402, 232,
+ 568, 380, 382, 545, 381, 700, 396, 668, 669, 670,
+ 437, 463, -44, 233, 234, 449, 235, 236, 107, 452,
+ 237, 527, 536, 537, 550, -101, 549, 539, 551, 552,
+ 122, 553, 594, 595, 596, 597, 554, 567, 556, 558,
+ 576, 577, 238, 578, 565, 587, 239, 568, 163, 599,
+ 580, 159, 581, 582, 583, -288, 143, 160, 584, 161,
+ 240, 162, 585, 604, 613, 618, 623, 143, 593, 600,
+ 601, 602, 624, 625, 627, 659, 645, -384, 637, 650,
+ 651, 252, 652, 653, 654, 655, 657, 658, 843, 844,
+ 671, 565, 672, 611, 612, 673, 674, 163, 209, 5,
+ 159, 675, 6, 7, 8, 9, 160, 676, 161, 677,
+ 162, 680, 681, 629, 691, 682, 143, 683, 10, 11,
+ 864, 12, 690, 163, 163, 13, 159, 159, 692, 693,
+ 699, 701, 160, 160, 161, 161, 162, 162, 14, 15,
+ 16, 17, 143, 143, 712, 714, 715, 18, 19, 725,
+ 726, 20, 727, -402, 21, 728, 733, 749, 709, 753,
+ 755, 22, 23, 754, 756, 759, 763, 766, 24, 25,
+ 702, 765, 768, 781, 769, 783, 774, 835, -411, 798,
+ 799, 801, 802, 806, 26, 808, 829, 834, -53, 830,
+ 836, 837, 845, 850, 848, 855, 856, 861, 567, 867,
+ 869, 870, 875, 872, 876, 878, 371, 372, 568, 173,
+ 750, 100, 97, 521, 686, 453, 175, 708, 711, 579,
+ 664, 713, 644, 454, 762, 540, 106, 6, 446, 543,
+ 439, 127, 128, 129, 130, 131, 132, 133, 134, 135,
+ 195, 137, 455, 47, 405, 838, 12, 722, 140, 141,
+ 840, 746, 565, 51, 60, 61, 842, 62, 865, 438,
+ 189, 451, 847, 729, 648, 92, 0, 720, 0, 512,
+ 730, 0, 534, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 567, 0, 0,
+ 0, 0, 747, 0, -2, 5, 0, 568, 6, 7,
+ 8, 9, 0, 0, 107, 0, 0, 0, 0, 0,
+ 0, 0, 0, 440, 10, 11, 0, 12, 0, 0,
+ 0, 13, 92, 839, 720, 0, 0, 0, 47, 0,
+ 0, 0, 0, 0, 14, 15, 16, 17, 51, 60,
+ 61, 565, 62, 18, 19, 0, 567, 20, 0, 805,
+ 21, 0, 0, 0, 0, 0, 568, 22, 23, 0,
+ 92, 0, 804, 106, 24, 25, 0, 0, 127, 128,
+ 129, 130, 131, 132, 133, 134, 135, 136, 137, 138,
+ 26, -210, 0, 0, 139, 140, 141, 0, 163, 853,
+ 0, 159, 0, 393, 393, 0, 0, 160, 0, 161,
+ 565, 162, 0, 0, 0, 0, 0, 143, 846, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, -373, 0, 455, 0, -373, 6, 0, -83,
- 9, -373, -373, -373, -373, -373, -373, -373, -373, -373,
- -373, -373, -373, 10, 11, 0, 12, 0, -373, -373,
- 13, 0, 0, 407, 408, 456, 457, -373, 0, 0,
- 407, 408, 105, 14, 0, 0, 104, 468, 469, 470,
- 0, 125, 126, 127, 128, 129, 130, 131, 132, 133,
- 189, 494, 495, 0, 0, 0, 22, 23, 138, 139,
- 409, 496, 0, 0, 0, 410, 0, 0, 411, 412,
- 0, 0, 0, 0, -373, 0, 455, 0, -373, 6,
- 0, -518, 9, -373, -373, -373, -373, -373, -373, -373,
- -373, -373, -373, -373, -373, 10, 11, 0, 12, 0,
- -373, -373, 13, 0, 0, 407, 408, 456, 457, -373,
- 0, 0, 0, 0, 105, 14, 0, 0, 0, 506,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 507,
- 0, 0, 0, 0, 0, 0, 0, 0, 22, 23,
+ 466, 0, -393, 6, 0, 393, 9, -393, -393, -393,
+ -393, -393, -393, -393, -393, -393, -393, -393, -393, 10,
+ 11, 107, 12, 0, -393, -393, 13, 174, 0, 412,
+ 413, 467, 468, -393, 0, 0, 0, 0, 0, 14,
+ 0, 0, 106, 479, 480, 481, 0, 127, 128, 129,
+ 130, 131, 132, 133, 134, 135, 195, 137, 138, 0,
+ 0, 0, 22, 23, 140, 141, 0, 0, 0, 0,
+ 0, 0, 0, 564, 0, 0, 0, 0, 0, 0,
+ -393, 0, 0, 0, 466, 0, -393, 6, 0, -86,
+ 9, -393, -393, -393, -393, -393, -393, -393, -393, -393,
+ -393, -393, -393, 10, 11, 0, 12, 0, -393, -393,
+ 13, 0, 0, 412, 413, 467, 468, -393, 0, 0,
+ 107, 0, 0, 14, 0, 0, 106, 479, 480, 481,
+ 0, 127, 128, 129, 130, 131, 132, 133, 134, 135,
+ 195, 137, 138, 0, 0, 0, 22, 23, 140, 141,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, -373, 0, 455, 0,
- -373, 6, 0, -485, 9, -373, -373, -373, -373, -373,
- -373, -373, -373, -373, -373, -373, -373, 10, 11, 0,
- 12, 0, -373, -373, 13, 0, 0, 407, 408, 456,
- 457, -373, 0, 455, 0, -373, 6, 14, 0, 9,
- -373, -373, -373, -373, -373, -373, -373, -373, -373, -373,
- -373, -373, 10, 11, 0, 12, 0, -373, -373, 13,
- 22, 23, 407, 408, 456, 457, -373, 0, 0, 0,
- 0, 0, 14, 0, 0, 0, 0, 0, -373, 0,
- 0, 0, 0, 0, 0, -65, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 22, 23, 0, 0, 0,
+ 0, 0, 0, 0, -393, 0, 0, 0, 466, 0,
+ -393, 6, 0, -538, 9, -393, -393, -393, -393, -393,
+ -393, -393, -393, -393, -393, -393, -393, 10, 11, 0,
+ 12, 0, -393, -393, 13, 0, 0, 412, 413, 467,
+ 468, -393, 0, 0, 107, 0, 0, 14, 0, 0,
+ 0, 513, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 514, 0, 0, 0, 0, 0, 0, 0, 0,
+ 22, 23, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, -393, 0,
+ 0, 0, 466, 0, -393, 6, 0, -505, 9, -393,
+ -393, -393, -393, -393, -393, -393, -393, -393, -393, -393,
+ -393, 10, 11, 0, 12, 0, -393, -393, 13, 0,
+ 0, 412, 413, 467, 468, -393, 0, 466, 0, -393,
+ 6, 14, 0, 9, -393, -393, -393, -393, -393, -393,
+ -393, -393, -393, -393, -393, -393, 10, 11, 0, 12,
+ 0, -393, -393, 13, 22, 23, 412, 413, 467, 468,
+ -393, 0, 0, 0, 0, 0, 14, 0, 0, 0,
+ 0, 0, -393, 0, 0, 0, 0, 0, 0, 0,
+ 0, -68, 0, 0, 0, 0, 106, 0, 0, 22,
+ 23, 127, 128, 129, 130, 131, 132, 133, 134, 135,
+ 195, 0, 0, 0, 0, 0, 0, -393, 140, 141,
+ 0, 466, 0, -393, 6, 0, -90, 9, -393, -393,
+ -393, -393, -393, -393, -393, -393, -393, -393, -393, -393,
+ 10, 11, 0, 12, 0, -393, -393, 13, 0, 0,
+ 412, 413, 467, 468, -393, 0, 0, 0, 0, 0,
+ 14, 0, 0, 0, 0, 0, 5, 0, 0, 6,
+ 7, 8, 9, 0, 107, 0, 0, 0, 0, 0,
+ 0, 0, 0, 22, 23, 10, 11, 0, 12, 0,
+ 0, 0, 13, 0, 0, 0, 0, 0, 0, 0,
+ 0, -393, 0, 0, 0, 14, 15, 16, 17, 0,
+ -529, 0, 0, 0, 18, 19, 0, 0, 20, 0,
+ 0, 21, 0, 0, 0, 0, 0, 0, 22, 23,
+ 0, 0, 0, 0, 0, 24, 25, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 589, 0, 106, 0,
+ 0, 26, -210, 127, 128, 129, 130, 131, 132, 133,
+ 134, 135, 136, 137, 138, 10, 11, 0, 12, 139,
+ 140, 141, 5, 0, 0, 6, 7, 8, 9, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, -373, 0, 455, 0, -373, 6, 0,
- -87, 9, -373, -373, -373, -373, -373, -373, -373, -373,
- -373, -373, -373, -373, 10, 11, 0, 12, 0, -373,
- -373, 13, 0, 0, 407, 408, 456, 457, -373, 0,
- 0, 0, 0, 0, 14, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 5, 0, 0, 6, 7, 8,
- 9, 0, 0, 0, 0, 0, 0, 22, 23, 0,
- 0, 0, 0, 10, 11, 0, 12, 0, 0, 0,
- 13, 0, 0, 0, 0, -373, 0, 0, 0, 0,
- 0, 0, -509, 14, 15, 16, 17, 0, 0, 0,
- 0, 0, 18, 19, 0, 0, 20, 0, 0, 21,
- 0, 0, 0, 0, 0, 0, 22, 23, 0, 0,
- 0, 0, 0, 24, 25, 674
+ 0, 10, 11, 0, 12, 0, 0, 5, 13, 0,
+ 6, 7, 8, 9, 0, 0, 0, 0, 0, 0,
+ 0, 14, 15, 16, 17, 0, 10, 11, 0, 12,
+ 18, 19, 0, 13, 20, 0, 107, 21, 0, 0,
+ 0, 0, 174, 0, 22, 23, 14, 15, 16, 17,
+ 0, 24, 25, 702, 0, 18, 19, 0, 0, 20,
+ 0, 0, 21, 0, 0, 0, 0, 26, 0, 22,
+ 23, 0, 0, 106, 0, 0, 24, 25, 127, 128,
+ 129, 130, 131, 132, 133, 134, 135, 136, 137, 138,
+ 10, 11, 26, 12, 139, 140, 141, 589, 0, 106,
+ 0, 0, 0, 0, 127, 128, 129, 130, 131, 132,
+ 133, 134, 135, 136, 137, 138, 10, 11, 106, 12,
+ 139, 140, 141, 127, 128, 129, 130, 131, 132, 133,
+ 134, 135, 136, 137, 138, 10, 11, 0, 12, 139,
+ 140, 141, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 107, 0, 0, 0, 0, 0, 174, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 107, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 107
};
static const yytype_int16 yycheck[] =
{
- 22, 23, 2, 14, 26, 43, 43, 43, 19, 20,
- 43, 14, 43, 84, 81, 81, 223, 4, 4, 335,
- 4, 43, 4, 4, 347, 81, 81, 465, 217, 516,
- 81, 81, 239, 337, 338, 339, 271, 613, 81, 81,
- 392, 3, 347, 625, 347, 3, 84, 84, 84, 0,
- 3, 84, 404, 84, 3, 3, 0, 19, 654, 81,
- 82, 3, 84, 3, 3, 1, 3, 625, 4, 5,
- 6, 7, 83, 75, 85, 86, 87, 88, 516, 81,
- 403, 357, 93, 6, 20, 21, 97, 23, 86, 100,
- 81, 27, 103, 91, 1, 3, 303, 286, 403, 3,
- 403, 28, 29, 86, 40, 41, 42, 43, 704, 109,
- 110, 49, 103, 49, 50, 53, 116, 53, 89, 81,
- 56, 28, 29, 81, 359, 28, 29, 63, 64, 405,
- 86, 1, 81, 3, 70, 71, 72, 719, 8, 9,
- 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
- 20, 21, 105, 23, 24, 25, 26, 105, 365, 226,
- 226, 719, 514, 105, 86, 105, 105, 710, 105, 105,
- 226, 226, 659, 81, 75, 226, 226, 81, 105, 8,
- 81, 88, 11, 226, 226, 1, 393, 87, 1, 91,
- 86, 4, 5, 6, 7, 91, 431, 740, 36, 6,
- 86, 86, 105, 22, 226, 91, 91, 20, 21, 752,
- 23, 81, 28, 29, 27, 99, 100, 101, 86, 542,
- 763, 659, 798, 3, 35, 36, 37, 40, 41, 42,
- 43, 86, 30, 31, 72, 105, 49, 50, 76, 90,
- 53, 92, 49, 56, 8, 9, 53, 82, 83, 825,
- 63, 64, 30, 31, 92, 831, 94, 70, 71, 15,
- 16, 748, 60, 3, 97, 98, 277, 65, 8, 9,
- 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
- 20, 21, 60, 23, 24, 25, 26, 65, 16, 17,
- 68, 69, 105, 73, 74, 75, 76, 77, 78, 79,
- 80, 81, 375, 376, 84, 85, 328, 611, 373, 374,
- 748, 86, 4, 335, 6, 569, 570, 97, 98, 87,
- 807, 86, 102, 103, 86, 105, 48, 87, 20, 21,
- 519, 23, 24, 86, 89, 27, 358, 87, 527, 81,
- 89, 81, 89, 550, 87, 3, 402, 402, 86, 86,
- 673, 402, 402, 377, 378, 379, 86, 49, 87, 86,
- 86, 53, 86, 86, 402, 105, 300, 301, 302, 807,
- 87, 86, 394, 86, 86, 67, 86, 388, 87, 3,
- 402, 3, 382, 91, 89, 8, 90, 409, 89, 411,
- 412, 47, 103, 582, 583, 584, 418, 87, 465, 465,
- 87, 401, 87, 610, 87, 3, 94, 91, 430, 95,
- 104, 93, 3, 484, 90, 73, 74, 75, 76, 77,
- 78, 79, 80, 81, 96, 425, 84, 85, 92, 92,
- 87, 106, 92, 104, 93, 90, 88, 58, 92, 97,
- 98, 106, 92, 465, 102, 103, 484, 484, 484, 516,
- 516, 484, 452, 484, 3, 3, 88, 3, 87, 92,
- 447, 447, 484, 447, 90, 447, 447, 8, 88, 88,
- 86, 88, 494, 495, 496, 73, 74, 75, 76, 77,
- 78, 79, 80, 81, 800, 801, 84, 85, 90, 90,
- 90, 88, 88, 88, 516, 506, 507, 31, 86, 97,
- 98, 86, 86, 86, 102, 103, 88, 88, 88, 86,
- 86, 86, 86, 829, 86, 86, 86, 86, 86, 92,
- 86, 86, 86, 86, 73, 74, 75, 76, 77, 78,
- 79, 80, 81, 86, 86, 84, 85, 104, 88, 86,
- 66, 86, 86, 103, 35, 88, 88, 86, 88, 86,
- 86, 3, 107, 88, 103, 86, 8, 9, 10, 766,
- 87, 13, 14, 15, 16, 88, 88, 3, 568, 569,
- 570, 23, 8, 9, 10, 11, 12, 13, 14, 15,
- 16, 17, 18, 19, 20, 21, 86, 23, 24, 25,
- 26, 104, 659, 659, 35, 38, 55, 92, 103, 89,
- 104, 3, 59, 3, 92, 627, 8, 9, 10, 11,
- 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
- 104, 23, 24, 25, 26, 103, 103, 62, 90, 81,
- 104, 86, 88, 91, 634, 104, 103, 659, 625, 625,
- 39, 625, 92, 625, 625, 81, 92, 91, 86, 660,
- 86, 104, 674, 3, 103, 91, 104, 660, 8, 9,
+ 22, 23, 43, 43, 14, 43, 14, 83, 2, 19,
+ 20, 43, 339, 43, 244, 43, 26, 83, 2, 2,
+ 2, 43, 2, 111, 112, 83, 83, 83, 83, 476,
+ 118, 632, 341, 342, 343, 523, 83, 352, 231, 222,
+ 83, 278, 3, 395, 3, 86, 86, 3, 86, 679,
+ 352, 352, 362, 0, 86, 49, 86, 409, 86, 3,
+ 647, 83, 84, 647, 86, 49, 49, 49, 3, 49,
+ 1, 3, 6, 3, 3, 85, 523, 87, 88, 89,
+ 90, 87, 3, 3, 3, 95, 3, 317, 87, 99,
+ 75, 91, 102, 408, 1, 105, 81, 28, 29, 3,
+ 410, 107, 19, 75, 6, 735, 408, 408, 107, 81,
+ 293, 88, 73, 74, 75, 76, 77, 78, 79, 80,
+ 81, 28, 29, 84, 85, 81, 87, 364, 87, 73,
+ 74, 75, 76, 77, 78, 79, 80, 81, 99, 100,
+ 84, 85, 88, 104, 105, 732, 81, 49, 732, 81,
+ 741, 53, 174, 3, 87, 231, 36, 87, 87, 90,
+ 81, 105, 8, 9, 81, 231, 396, 87, 87, 521,
+ 82, 83, 402, 231, 231, 231, 231, 370, 8, 88,
+ 771, 11, 30, 31, 231, 88, 777, 88, 231, 49,
+ 93, 22, 93, 53, 74, 3, 684, 788, 78, 436,
+ 8, 9, 10, 51, 52, 13, 14, 15, 16, 231,
+ 99, 100, 60, 61, 94, 23, 96, 65, 93, 402,
+ 68, 69, 823, 73, 74, 75, 76, 77, 78, 79,
+ 80, 81, 547, 88, 84, 85, 89, 684, 93, 88,
+ 30, 31, 89, 4, 93, 6, 35, 36, 37, 99,
+ 100, 30, 31, 88, 104, 105, 28, 29, 859, 20,
+ 21, 862, 23, 24, 15, 16, 27, 101, 102, 103,
+ 60, 16, 17, 81, 284, 65, 387, 388, 389, 87,
+ 92, 60, 94, 383, 384, 773, 65, 88, 49, 68,
+ 69, 88, 53, 89, 370, 314, 315, 316, 385, 386,
+ 574, 575, 88, 88, 370, 48, 67, 89, 88, 397,
+ 332, 89, 370, 370, 370, 370, 91, 339, 406, 407,
+ 91, 81, 91, 370, 88, 555, 773, 370, 87, 370,
+ 88, 88, 3, 89, 88, 88, 88, 3, 88, 88,
+ 428, 363, 430, 526, 832, 89, 93, 89, 370, 88,
+ 3, 534, 88, 583, 88, 8, 9, 10, 11, 12,
+ 13, 14, 15, 16, 17, 18, 19, 20, 21, 88,
+ 23, 24, 25, 26, 89, 463, 370, 371, 687, 91,
+ 8, 391, 92, 698, 91, 832, 47, 371, 371, 371,
+ 89, 371, 414, 89, 416, 417, 105, 89, 628, 89,
+ 476, 423, 585, 3, 93, 92, 94, 4, 105, 6,
+ 476, 96, 98, 435, 97, 645, 94, 600, 601, 602,
+ 89, 94, 90, 20, 21, 92, 23, 24, 81, 106,
+ 27, 58, 90, 95, 444, 88, 88, 94, 88, 90,
+ 93, 3, 500, 500, 500, 500, 89, 523, 94, 90,
+ 90, 88, 49, 92, 476, 90, 53, 523, 499, 500,
+ 92, 499, 92, 92, 95, 90, 488, 499, 106, 499,
+ 67, 499, 94, 90, 90, 31, 88, 499, 500, 501,
+ 502, 503, 88, 88, 88, 573, 29, 90, 90, 88,
+ 88, 8, 88, 88, 88, 88, 88, 88, 825, 826,
+ 88, 523, 88, 513, 514, 88, 88, 548, 548, 1,
+ 548, 88, 4, 5, 6, 7, 548, 88, 548, 88,
+ 548, 88, 88, 107, 94, 90, 548, 90, 20, 21,
+ 857, 23, 90, 574, 575, 27, 574, 575, 90, 66,
+ 88, 88, 574, 575, 574, 575, 574, 575, 40, 41,
+ 42, 43, 574, 575, 88, 106, 105, 49, 50, 88,
+ 88, 53, 88, 35, 56, 90, 88, 90, 656, 88,
+ 106, 63, 64, 89, 35, 38, 55, 108, 70, 71,
+ 72, 94, 91, 59, 105, 3, 106, 817, 106, 94,
+ 105, 105, 62, 92, 86, 106, 94, 88, 90, 106,
+ 93, 90, 105, 39, 94, 106, 106, 93, 684, 105,
+ 88, 106, 106, 75, 94, 75, 298, 298, 684, 49,
+ 732, 17, 16, 411, 628, 380, 50, 649, 664, 488,
+ 585, 666, 548, 381, 742, 723, 3, 4, 370, 431,
+ 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
+ 17, 18, 382, 647, 345, 820, 23, 688, 25, 26,
+ 822, 723, 684, 647, 647, 647, 824, 647, 858, 369,
+ 78, 375, 829, 698, 555, 685, -1, 685, -1, 408,
+ 702, -1, 423, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 773, -1, -1,
+ -1, -1, 724, -1, 0, 1, -1, 773, 4, 5,
+ 6, 7, -1, -1, 81, -1, -1, -1, -1, -1,
+ -1, -1, -1, 90, 20, 21, -1, 23, -1, -1,
+ -1, 27, 742, 821, 742, -1, -1, -1, 732, -1,
+ -1, -1, -1, -1, 40, 41, 42, 43, 732, 732,
+ 732, 773, 732, 49, 50, -1, 832, 53, -1, 781,
+ 56, -1, -1, -1, -1, -1, 832, 63, 64, -1,
+ 780, -1, 780, 3, 70, 71, -1, -1, 8, 9,
10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
- 104, 693, 75, 104, 24, 25, 26, 92, 75, 81,
- 318, 748, 748, 17, 447, 719, 16, 406, 226, 610,
- 370, 372, 692, 371, 446, 394, 641, 711, 340, 769,
- 711, 701, 797, 692, 830, 3, 426, 612, 711, 799,
- 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
- 18, 19, 418, 364, 76, 796, 748, 25, 26, 804,
- 451, 81, 719, 719, 756, 719, 34, 719, 719, -1,
- 807, 807, 673, -1, 755, 550, -1, -1, -1, -1,
- 403, -1, 755, -1, -1, -1, -1, -1, 796, 796,
- 796, -1, -1, 796, -1, 796, -1, -1, -1, -1,
- 770, 771, -1, -1, 796, -1, -1, -1, 800, 801,
- 4, -1, 6, 81, -1, 807, -1, -1, -1, -1,
- -1, -1, 803, -1, -1, -1, 20, 21, -1, 23,
- 24, -1, 1, 27, 3, 4, -1, 829, 7, 8,
- 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
- 19, 20, 21, -1, 23, 49, 25, 26, 27, 53,
- -1, 30, 31, 32, 33, 34, -1, -1, -1, -1,
- -1, 40, -1, 67, 3, 44, 45, 46, -1, 8,
- 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
- 19, -1, -1, -1, 63, 64, 25, 26, -1, -1,
+ 86, 87, -1, -1, 24, 25, 26, -1, 839, 839,
+ -1, 839, -1, 825, 826, -1, -1, 839, -1, 839,
+ 832, 839, -1, -1, -1, -1, -1, 839, 828, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 81, -1, 1, -1, 3, 4, -1, 88,
+ 1, -1, 3, 4, -1, 857, 7, 8, 9, 10,
+ 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
+ 21, 81, 23, -1, 25, 26, 27, 87, -1, 30,
+ 31, 32, 33, 34, -1, -1, -1, -1, -1, 40,
+ -1, -1, 3, 44, 45, 46, -1, 8, 9, 10,
+ 11, 12, 13, 14, 15, 16, 17, 18, 19, -1,
+ -1, -1, 63, 64, 25, 26, -1, -1, -1, -1,
+ -1, -1, -1, 34, -1, -1, -1, -1, -1, -1,
+ 81, -1, -1, -1, 1, -1, 3, 4, -1, 90,
7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
17, 18, 19, 20, 21, -1, 23, -1, 25, 26,
27, -1, -1, 30, 31, 32, 33, 34, -1, -1,
- 30, 31, 81, 40, -1, -1, 3, 44, 45, 46,
+ 81, -1, -1, 40, -1, -1, 3, 44, 45, 46,
-1, 8, 9, 10, 11, 12, 13, 14, 15, 16,
- 17, 51, 52, -1, -1, -1, 63, 64, 25, 26,
- 60, 61, -1, -1, -1, 65, -1, -1, 68, 69,
- -1, -1, -1, -1, 81, -1, 1, -1, 3, 4,
- -1, 88, 7, 8, 9, 10, 11, 12, 13, 14,
- 15, 16, 17, 18, 19, 20, 21, -1, 23, -1,
- 25, 26, 27, -1, -1, 30, 31, 32, 33, 34,
- -1, -1, -1, -1, 81, 40, -1, -1, -1, 44,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, 54,
- -1, -1, -1, -1, -1, -1, -1, -1, 63, 64,
+ 17, 18, 19, -1, -1, -1, 63, 64, 25, 26,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, 81, -1, 1, -1,
- 3, 4, -1, 88, 7, 8, 9, 10, 11, 12,
+ -1, -1, -1, -1, 81, -1, -1, -1, 1, -1,
+ 3, 4, -1, 90, 7, 8, 9, 10, 11, 12,
13, 14, 15, 16, 17, 18, 19, 20, 21, -1,
23, -1, 25, 26, 27, -1, -1, 30, 31, 32,
- 33, 34, -1, 1, -1, 3, 4, 40, -1, 7,
- 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
- 18, 19, 20, 21, -1, 23, -1, 25, 26, 27,
- 63, 64, 30, 31, 32, 33, 34, -1, -1, -1,
- -1, -1, 40, -1, -1, -1, -1, -1, 81, -1,
- -1, -1, -1, -1, -1, 88, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 63, 64, -1, -1, -1,
+ 33, 34, -1, -1, 81, -1, -1, 40, -1, -1,
+ -1, 44, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 54, -1, -1, -1, -1, -1, -1, -1, -1,
+ 63, 64, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 81, -1,
+ -1, -1, 1, -1, 3, 4, -1, 90, 7, 8,
+ 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
+ 19, 20, 21, -1, 23, -1, 25, 26, 27, -1,
+ -1, 30, 31, 32, 33, 34, -1, 1, -1, 3,
+ 4, 40, -1, 7, 8, 9, 10, 11, 12, 13,
+ 14, 15, 16, 17, 18, 19, 20, 21, -1, 23,
+ -1, 25, 26, 27, 63, 64, 30, 31, 32, 33,
+ 34, -1, -1, -1, -1, -1, 40, -1, -1, -1,
+ -1, -1, 81, -1, -1, -1, -1, -1, -1, -1,
+ -1, 90, -1, -1, -1, -1, 3, -1, -1, 63,
+ 64, 8, 9, 10, 11, 12, 13, 14, 15, 16,
+ 17, -1, -1, -1, -1, -1, -1, 81, 25, 26,
+ -1, 1, -1, 3, 4, -1, 90, 7, 8, 9,
+ 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
+ 20, 21, -1, 23, -1, 25, 26, 27, -1, -1,
+ 30, 31, 32, 33, 34, -1, -1, -1, -1, -1,
+ 40, -1, -1, -1, -1, -1, 1, -1, -1, 4,
+ 5, 6, 7, -1, 81, -1, -1, -1, -1, -1,
+ -1, -1, -1, 63, 64, 20, 21, -1, 23, -1,
+ -1, -1, 27, -1, -1, -1, -1, -1, -1, -1,
+ -1, 81, -1, -1, -1, 40, 41, 42, 43, -1,
+ 90, -1, -1, -1, 49, 50, -1, -1, 53, -1,
+ -1, 56, -1, -1, -1, -1, -1, -1, 63, 64,
+ -1, -1, -1, -1, -1, 70, 71, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 1, -1, 3, -1,
+ -1, 86, 87, 8, 9, 10, 11, 12, 13, 14,
+ 15, 16, 17, 18, 19, 20, 21, -1, 23, 24,
+ 25, 26, 1, -1, -1, 4, 5, 6, 7, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 20, 21, -1, 23, -1, -1, 1, 27, -1,
+ 4, 5, 6, 7, -1, -1, -1, -1, -1, -1,
+ -1, 40, 41, 42, 43, -1, 20, 21, -1, 23,
+ 49, 50, -1, 27, 53, -1, 81, 56, -1, -1,
+ -1, -1, 87, -1, 63, 64, 40, 41, 42, 43,
+ -1, 70, 71, 72, -1, 49, 50, -1, -1, 53,
+ -1, -1, 56, -1, -1, -1, -1, 86, -1, 63,
+ 64, -1, -1, 3, -1, -1, 70, 71, 8, 9,
+ 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
+ 20, 21, 86, 23, 24, 25, 26, 1, -1, 3,
+ -1, -1, -1, -1, 8, 9, 10, 11, 12, 13,
+ 14, 15, 16, 17, 18, 19, 20, 21, 3, 23,
+ 24, 25, 26, 8, 9, 10, 11, 12, 13, 14,
+ 15, 16, 17, 18, 19, 20, 21, -1, 23, 24,
+ 25, 26, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 81, -1, -1, -1, -1, -1, 87, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 81, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 81, -1, 1, -1, 3, 4, -1,
- 88, 7, 8, 9, 10, 11, 12, 13, 14, 15,
- 16, 17, 18, 19, 20, 21, -1, 23, -1, 25,
- 26, 27, -1, -1, 30, 31, 32, 33, 34, -1,
- -1, -1, -1, -1, 40, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 1, -1, -1, 4, 5, 6,
- 7, -1, -1, -1, -1, -1, -1, 63, 64, -1,
- -1, -1, -1, 20, 21, -1, 23, -1, -1, -1,
- 27, -1, -1, -1, -1, 81, -1, -1, -1, -1,
- -1, -1, 88, 40, 41, 42, 43, -1, -1, -1,
- -1, -1, 49, 50, -1, -1, 53, -1, -1, 56,
- -1, -1, -1, -1, -1, -1, 63, 64, -1, -1,
- -1, -1, -1, 70, 71, 72
+ -1, -1, -1, -1, -1, -1, 81
};
/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
symbol of state STATE-NUM. */
static const yytype_uint16 yystos[] =
{
- 0, 109, 110, 0, 220, 1, 4, 5, 6, 7,
+ 0, 110, 111, 112, 0, 1, 4, 5, 6, 7,
20, 21, 23, 27, 40, 41, 42, 43, 49, 50,
- 53, 56, 63, 64, 70, 71, 105, 111, 113, 128,
- 130, 134, 135, 147, 150, 151, 155, 157, 160, 161,
- 162, 166, 170, 172, 176, 177, 201, 202, 221, 226,
- 235, 255, 257, 269, 271, 293, 294, 295, 337, 388,
- 389, 390, 391, 392, 396, 418, 420, 443, 444, 445,
- 446, 447, 451, 452, 453, 456, 460, 469, 484, 485,
- 127, 203, 129, 156, 227, 256, 270, 296, 338, 200,
- 220, 243, 155, 53, 155, 170, 172, 53, 162, 172,
- 173, 200, 200, 421, 3, 81, 196, 199, 196, 470,
- 486, 196, 89, 131, 120, 136, 148, 86, 86, 119,
- 91, 158, 152, 121, 163, 8, 9, 10, 11, 12,
- 13, 14, 15, 16, 17, 18, 19, 24, 25, 26,
- 158, 196, 230, 231, 232, 233, 234, 245, 246, 247,
- 248, 249, 250, 251, 252, 253, 254, 255, 257, 269,
- 271, 295, 304, 307, 310, 311, 314, 315, 318, 117,
- 114, 258, 22, 118, 115, 116, 122, 393, 123, 419,
- 124, 158, 454, 454, 125, 126, 87, 488, 86, 17,
- 196, 207, 245, 248, 249, 250, 251, 252, 311, 315,
- 196, 200, 228, 230, 200, 200, 200, 200, 3, 158,
- 200, 158, 167, 200, 200, 397, 200, 197, 75, 81,
- 75, 220, 220, 103, 87, 86, 4, 6, 20, 21,
- 23, 24, 27, 49, 53, 67, 461, 462, 465, 220,
- 481, 86, 48, 174, 87, 86, 87, 8, 11, 8,
- 9, 89, 308, 171, 90, 92, 89, 89, 86, 86,
- 87, 272, 86, 86, 86, 86, 87, 86, 87, 430,
- 86, 455, 448, 457, 86, 86, 489, 204, 229, 297,
- 339, 87, 91, 399, 422, 199, 198, 3, 3, 3,
- 73, 74, 75, 76, 77, 78, 79, 80, 84, 85,
- 97, 98, 102, 103, 196, 209, 210, 211, 212, 213,
- 214, 215, 216, 217, 218, 222, 223, 225, 132, 207,
- 89, 3, 137, 463, 208, 209, 483, 90, 159, 153,
- 164, 8, 209, 219, 89, 47, 175, 305, 312, 316,
- 259, 103, 394, 431, 175, 87, 87, 491, 200, 200,
- 236, 239, 243, 244, 319, 87, 87, 168, 400, 398,
- 91, 427, 199, 471, 487, 93, 217, 217, 217, 209,
- 94, 95, 96, 82, 83, 97, 98, 99, 100, 101,
- 104, 224, 110, 112, 3, 90, 92, 482, 149, 193,
- 196, 183, 178, 92, 309, 193, 219, 219, 219, 261,
- 263, 264, 273, 401, 433, 449, 458, 30, 31, 60,
- 65, 68, 69, 326, 327, 332, 410, 412, 413, 480,
- 490, 492, 205, 320, 237, 298, 340, 183, 196, 175,
- 428, 423, 87, 399, 209, 104, 211, 212, 213, 214,
- 214, 215, 215, 216, 216, 216, 92, 220, 133, 90,
- 138, 464, 92, 200, 194, 1, 32, 33, 154, 184,
- 202, 226, 326, 337, 342, 347, 388, 389, 44, 45,
- 46, 165, 179, 180, 184, 349, 209, 231, 306, 313,
- 317, 260, 262, 1, 220, 265, 8, 196, 245, 250,
- 251, 252, 278, 295, 51, 52, 61, 326, 395, 402,
- 410, 412, 415, 416, 417, 480, 44, 54, 184, 432,
- 434, 437, 440, 183, 178, 328, 333, 19, 196, 411,
- 58, 414, 196, 196, 495, 493, 494, 411, 496, 88,
- 93, 106, 321, 323, 92, 220, 300, 303, 262, 169,
- 196, 175, 472, 3, 225, 111, 88, 3, 87, 465,
- 220, 92, 192, 88, 188, 185, 190, 189, 191, 34,
- 196, 232, 311, 315, 348, 371, 186, 187, 350, 182,
- 181, 88, 86, 90, 90, 90, 90, 88, 263, 268,
- 230, 274, 196, 196, 196, 408, 88, 403, 404, 405,
- 406, 407, 409, 200, 200, 88, 435, 436, 450, 459,
- 31, 371, 199, 3, 3, 86, 86, 86, 199, 86,
- 206, 324, 322, 238, 3, 299, 301, 341, 88, 424,
- 326, 410, 412, 474, 476, 139, 483, 195, 86, 86,
- 86, 86, 86, 86, 343, 86, 86, 220, 265, 265,
- 86, 266, 104, 199, 199, 199, 86, 86, 86, 86,
- 86, 86, 86, 438, 441, 86, 86, 88, 88, 329,
- 334, 208, 219, 323, 239, 88, 92, 88, 66, 479,
- 477, 478, 473, 475, 72, 113, 128, 141, 143, 144,
- 196, 220, 3, 236, 275, 103, 353, 353, 371, 240,
- 243, 325, 302, 425, 86, 86, 86, 88, 476, 196,
- 140, 142, 86, 3, 351, 267, 87, 354, 355, 439,
- 442, 330, 335, 241, 107, 303, 196, 145, 88, 220,
- 344, 353, 86, 276, 104, 35, 356, 359, 38, 373,
- 373, 240, 55, 376, 92, 426, 89, 143, 103, 362,
- 352, 1, 28, 29, 279, 281, 285, 287, 360, 104,
- 357, 374, 331, 377, 336, 242, 59, 429, 3, 466,
- 468, 363, 364, 345, 373, 284, 289, 288, 277, 280,
- 282, 286, 371, 92, 103, 373, 103, 62, 379, 243,
- 196, 90, 467, 104, 35, 36, 37, 365, 368, 372,
- 373, 86, 209, 91, 88, 281, 220, 220, 361, 358,
- 375, 378, 380, 146, 92, 104, 366, 369, 346, 290,
- 230, 291, 287, 239, 359, 193, 193, 103, 200, 468,
- 92, 371, 39, 382, 91, 292, 283, 104, 104, 381,
- 367, 370, 383, 239, 86, 193, 368, 239, 103, 104,
- 384, 75, 385, 386, 104, 92, 387, 75
+ 53, 56, 63, 64, 70, 71, 86, 113, 114, 130,
+ 132, 136, 137, 149, 152, 153, 157, 159, 162, 163,
+ 164, 168, 172, 174, 178, 179, 203, 204, 222, 230,
+ 231, 239, 248, 268, 270, 282, 284, 306, 307, 308,
+ 350, 401, 402, 403, 404, 405, 409, 431, 433, 456,
+ 457, 458, 459, 460, 464, 465, 466, 469, 473, 481,
+ 496, 497, 129, 205, 131, 158, 240, 269, 283, 309,
+ 351, 3, 202, 256, 157, 53, 157, 172, 174, 53,
+ 164, 174, 175, 202, 202, 434, 3, 81, 198, 201,
+ 198, 482, 498, 202, 91, 133, 122, 138, 150, 88,
+ 88, 121, 93, 160, 154, 123, 165, 8, 9, 10,
+ 11, 12, 13, 14, 15, 16, 17, 18, 19, 24,
+ 25, 26, 160, 198, 243, 244, 245, 246, 247, 258,
+ 259, 260, 261, 262, 263, 264, 265, 266, 267, 268,
+ 270, 282, 284, 308, 317, 320, 323, 324, 327, 328,
+ 331, 119, 115, 113, 87, 232, 116, 271, 22, 120,
+ 117, 118, 124, 406, 125, 432, 126, 160, 467, 467,
+ 127, 128, 89, 500, 88, 17, 198, 209, 258, 261,
+ 262, 263, 264, 265, 324, 328, 198, 202, 241, 243,
+ 202, 202, 202, 202, 160, 202, 160, 169, 202, 202,
+ 410, 202, 199, 75, 81, 75, 231, 231, 89, 89,
+ 88, 4, 6, 20, 21, 23, 24, 27, 49, 53,
+ 67, 474, 475, 477, 231, 493, 88, 48, 176, 89,
+ 88, 89, 8, 11, 8, 9, 91, 321, 173, 92,
+ 94, 91, 91, 88, 88, 198, 88, 89, 285, 88,
+ 88, 88, 88, 89, 88, 89, 443, 88, 468, 461,
+ 470, 88, 88, 501, 206, 242, 310, 352, 89, 93,
+ 412, 435, 201, 200, 3, 232, 3, 223, 134, 209,
+ 91, 3, 139, 476, 73, 74, 75, 76, 77, 78,
+ 79, 80, 84, 85, 99, 100, 104, 105, 198, 210,
+ 211, 212, 213, 214, 215, 216, 217, 218, 219, 220,
+ 495, 92, 161, 155, 166, 8, 211, 221, 91, 47,
+ 177, 318, 325, 329, 233, 272, 105, 407, 444, 177,
+ 89, 89, 503, 202, 202, 249, 252, 256, 257, 332,
+ 89, 89, 170, 413, 411, 93, 440, 201, 483, 499,
+ 224, 111, 112, 3, 92, 94, 219, 219, 219, 211,
+ 96, 97, 98, 82, 83, 99, 100, 101, 102, 103,
+ 494, 151, 195, 198, 185, 180, 94, 322, 195, 221,
+ 221, 221, 105, 234, 274, 276, 277, 286, 414, 446,
+ 462, 471, 30, 31, 60, 65, 68, 69, 339, 340,
+ 345, 423, 425, 426, 492, 502, 504, 207, 333, 250,
+ 311, 353, 185, 198, 177, 441, 436, 89, 412, 7,
+ 90, 204, 209, 225, 227, 228, 266, 308, 135, 92,
+ 140, 477, 106, 213, 214, 215, 216, 216, 217, 217,
+ 218, 218, 218, 94, 202, 196, 1, 32, 33, 156,
+ 186, 204, 239, 339, 350, 355, 360, 401, 402, 44,
+ 45, 46, 167, 181, 182, 186, 362, 211, 231, 319,
+ 326, 330, 201, 211, 235, 236, 238, 273, 275, 231,
+ 231, 51, 52, 61, 339, 408, 415, 423, 425, 428,
+ 429, 430, 492, 44, 54, 186, 445, 447, 450, 453,
+ 185, 180, 341, 346, 19, 198, 424, 58, 427, 198,
+ 198, 507, 505, 506, 424, 508, 90, 95, 231, 94,
+ 231, 313, 316, 275, 171, 198, 177, 484, 226, 88,
+ 202, 88, 90, 3, 89, 231, 94, 194, 90, 190,
+ 187, 192, 191, 193, 34, 198, 245, 324, 328, 361,
+ 384, 188, 189, 363, 184, 183, 90, 88, 92, 244,
+ 92, 92, 92, 95, 106, 94, 237, 90, 276, 1,
+ 243, 278, 8, 198, 258, 263, 264, 265, 291, 308,
+ 198, 198, 198, 421, 90, 416, 417, 418, 419, 420,
+ 422, 202, 202, 90, 448, 449, 463, 472, 31, 384,
+ 201, 3, 3, 88, 88, 88, 201, 88, 208, 107,
+ 334, 336, 251, 3, 312, 314, 354, 90, 437, 339,
+ 423, 425, 486, 488, 241, 29, 229, 141, 495, 197,
+ 88, 88, 88, 88, 88, 88, 356, 88, 88, 231,
+ 278, 278, 211, 201, 238, 281, 279, 287, 201, 201,
+ 201, 88, 88, 88, 88, 88, 88, 88, 451, 454,
+ 88, 88, 90, 90, 342, 347, 210, 337, 335, 252,
+ 90, 94, 90, 66, 491, 489, 490, 485, 487, 88,
+ 211, 88, 72, 114, 130, 143, 145, 146, 198, 231,
+ 3, 237, 88, 249, 106, 105, 366, 366, 384, 253,
+ 256, 221, 336, 315, 438, 88, 88, 88, 90, 488,
+ 198, 142, 144, 88, 3, 364, 280, 288, 367, 368,
+ 452, 455, 343, 348, 254, 338, 316, 198, 147, 90,
+ 145, 357, 366, 88, 89, 106, 35, 369, 372, 38,
+ 386, 386, 253, 55, 389, 94, 108, 439, 91, 105,
+ 375, 365, 289, 373, 106, 370, 387, 344, 390, 349,
+ 255, 59, 442, 3, 478, 480, 376, 377, 358, 386,
+ 1, 28, 29, 292, 294, 298, 300, 384, 94, 105,
+ 386, 105, 62, 392, 256, 198, 92, 479, 106, 35,
+ 36, 37, 378, 381, 385, 386, 297, 302, 301, 290,
+ 293, 295, 299, 374, 371, 388, 391, 393, 148, 94,
+ 106, 379, 382, 359, 88, 211, 93, 90, 294, 231,
+ 300, 252, 372, 195, 195, 105, 202, 480, 94, 384,
+ 39, 395, 303, 243, 304, 106, 106, 394, 380, 383,
+ 396, 93, 305, 296, 195, 381, 252, 105, 252, 88,
+ 106, 397, 75, 398, 399, 106, 94, 400, 75
};
/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
static const yytype_uint16 yyr1[] =
{
- 0, 108, 109, 110, 110, 111, 111, 111, 112, 114,
- 113, 115, 113, 116, 113, 117, 113, 118, 113, 119,
- 113, 120, 113, 121, 113, 122, 113, 123, 113, 124,
- 113, 125, 113, 126, 113, 127, 113, 129, 128, 131,
- 132, 133, 130, 134, 136, 137, 138, 139, 140, 135,
- 141, 142, 142, 143, 143, 145, 146, 144, 148, 149,
- 147, 150, 150, 152, 153, 154, 151, 156, 155, 157,
- 157, 157, 159, 158, 158, 160, 160, 160, 160, 161,
- 161, 163, 164, 165, 162, 167, 168, 169, 166, 171,
- 170, 173, 172, 174, 174, 175, 175, 176, 176, 177,
- 178, 178, 179, 179, 179, 181, 180, 182, 180, 183,
- 183, 185, 184, 186, 184, 187, 184, 188, 184, 189,
- 184, 190, 184, 191, 184, 192, 184, 193, 195, 194,
- 194, 196, 197, 196, 198, 196, 199, 200, 201, 201,
- 201, 203, 204, 205, 206, 202, 207, 207, 207, 207,
- 207, 207, 207, 207, 207, 208, 209, 210, 210, 211,
- 211, 212, 212, 213, 213, 213, 214, 214, 214, 215,
- 215, 215, 215, 216, 216, 216, 216, 217, 217, 217,
- 218, 218, 218, 218, 218, 218, 218, 218, 218, 218,
- 219, 220, 220, 221, 221, 222, 222, 223, 224, 224,
- 225, 227, 226, 226, 226, 226, 226, 226, 229, 228,
- 230, 230, 231, 231, 231, 232, 232, 232, 232, 232,
- 232, 232, 232, 233, 233, 233, 233, 234, 234, 234,
- 235, 235, 236, 238, 237, 237, 239, 239, 240, 242,
- 241, 241, 243, 244, 245, 245, 246, 246, 246, 247,
- 247, 247, 248, 248, 248, 249, 250, 250, 251, 252,
- 253, 254, 256, 255, 258, 259, 260, 257, 261, 262,
- 262, 264, 263, 266, 267, 265, 268, 265, 270, 269,
- 272, 273, 274, 275, 276, 277, 271, 278, 278, 278,
- 278, 278, 278, 279, 280, 280, 282, 283, 281, 284,
- 281, 285, 286, 286, 288, 287, 289, 290, 287, 292,
- 291, 293, 294, 296, 297, 298, 299, 295, 300, 302,
- 301, 301, 303, 305, 306, 304, 304, 308, 309, 307,
- 310, 312, 313, 311, 311, 314, 316, 317, 315, 315,
- 318, 320, 319, 321, 322, 322, 324, 325, 323, 326,
- 326, 328, 329, 330, 331, 327, 333, 334, 335, 336,
- 332, 338, 339, 340, 341, 337, 343, 344, 345, 346,
- 342, 347, 347, 347, 348, 348, 350, 351, 352, 349,
- 354, 353, 355, 353, 356, 358, 357, 357, 360, 361,
- 359, 363, 362, 364, 362, 365, 367, 366, 366, 369,
- 370, 368, 371, 371, 371, 371, 372, 372, 372, 374,
- 375, 373, 373, 377, 378, 376, 376, 380, 381, 379,
- 379, 383, 384, 382, 382, 385, 387, 386, 386, 388,
- 389, 390, 390, 391, 393, 394, 395, 392, 397, 398,
- 396, 400, 399, 399, 401, 401, 403, 402, 404, 402,
- 405, 402, 406, 402, 407, 402, 408, 402, 409, 402,
- 410, 411, 411, 412, 413, 414, 414, 415, 416, 417,
- 419, 418, 421, 422, 423, 424, 425, 426, 420, 428,
- 427, 427, 429, 429, 431, 432, 430, 433, 433, 434,
- 435, 434, 436, 434, 438, 439, 437, 441, 442, 440,
- 443, 443, 443, 444, 444, 445, 446, 448, 449, 450,
- 447, 451, 452, 453, 455, 454, 457, 458, 459, 456,
- 460, 460, 461, 461, 461, 461, 461, 461, 461, 461,
- 461, 461, 462, 464, 463, 463, 465, 465, 466, 467,
- 467, 468, 470, 471, 472, 473, 469, 474, 475, 475,
- 477, 476, 478, 476, 479, 476, 480, 480, 481, 482,
- 482, 483, 484, 486, 487, 485, 489, 490, 488, 491,
- 491, 493, 492, 494, 492, 495, 492, 496, 492
+ 0, 109, 110, 111, 111, 112, 112, 113, 113, 113,
+ 115, 114, 116, 114, 117, 114, 118, 114, 119, 114,
+ 120, 114, 121, 114, 122, 114, 123, 114, 124, 114,
+ 125, 114, 126, 114, 127, 114, 128, 114, 129, 114,
+ 131, 130, 133, 134, 135, 132, 136, 138, 139, 140,
+ 141, 142, 137, 143, 144, 144, 145, 145, 147, 148,
+ 146, 150, 151, 149, 152, 152, 154, 155, 156, 153,
+ 158, 157, 159, 159, 159, 161, 160, 160, 162, 162,
+ 162, 162, 163, 163, 165, 166, 167, 164, 169, 170,
+ 171, 168, 173, 172, 175, 174, 176, 176, 177, 177,
+ 178, 178, 179, 180, 180, 181, 181, 181, 183, 182,
+ 184, 182, 185, 185, 187, 186, 188, 186, 189, 186,
+ 190, 186, 191, 186, 192, 186, 193, 186, 194, 186,
+ 195, 197, 196, 196, 198, 199, 198, 200, 198, 201,
+ 202, 203, 203, 203, 205, 206, 207, 208, 204, 209,
+ 209, 209, 209, 209, 209, 209, 209, 209, 210, 211,
+ 212, 212, 213, 213, 214, 214, 215, 215, 215, 216,
+ 216, 216, 217, 217, 217, 217, 218, 218, 218, 218,
+ 219, 219, 219, 220, 220, 220, 220, 220, 220, 220,
+ 220, 220, 220, 221, 223, 222, 224, 224, 225, 225,
+ 225, 226, 225, 227, 227, 228, 229, 229, 230, 231,
+ 231, 233, 232, 234, 234, 235, 235, 236, 237, 237,
+ 238, 240, 239, 239, 239, 239, 239, 239, 242, 241,
+ 243, 243, 244, 244, 244, 245, 245, 245, 245, 245,
+ 245, 245, 245, 246, 246, 246, 246, 247, 247, 247,
+ 248, 248, 249, 251, 250, 250, 252, 252, 253, 255,
+ 254, 254, 256, 257, 258, 258, 259, 259, 259, 260,
+ 260, 260, 261, 261, 261, 262, 263, 263, 264, 265,
+ 266, 267, 269, 268, 271, 272, 273, 270, 274, 275,
+ 275, 277, 276, 279, 280, 278, 281, 278, 283, 282,
+ 285, 286, 287, 288, 289, 290, 284, 291, 291, 291,
+ 291, 291, 291, 292, 293, 293, 295, 296, 294, 297,
+ 294, 298, 299, 299, 301, 300, 302, 303, 300, 305,
+ 304, 306, 307, 309, 310, 311, 312, 308, 313, 315,
+ 314, 314, 316, 318, 319, 317, 317, 321, 322, 320,
+ 323, 325, 326, 324, 324, 327, 329, 330, 328, 328,
+ 331, 333, 332, 334, 335, 335, 337, 338, 336, 339,
+ 339, 341, 342, 343, 344, 340, 346, 347, 348, 349,
+ 345, 351, 352, 353, 354, 350, 356, 357, 358, 359,
+ 355, 360, 360, 360, 361, 361, 363, 364, 365, 362,
+ 367, 366, 368, 366, 369, 371, 370, 370, 373, 374,
+ 372, 376, 375, 377, 375, 378, 380, 379, 379, 382,
+ 383, 381, 384, 384, 384, 384, 385, 385, 385, 387,
+ 388, 386, 386, 390, 391, 389, 389, 393, 394, 392,
+ 392, 396, 397, 395, 395, 398, 400, 399, 399, 401,
+ 402, 403, 403, 404, 406, 407, 408, 405, 410, 411,
+ 409, 413, 412, 412, 414, 414, 416, 415, 417, 415,
+ 418, 415, 419, 415, 420, 415, 421, 415, 422, 415,
+ 423, 424, 424, 425, 426, 427, 427, 428, 429, 430,
+ 432, 431, 434, 435, 436, 437, 438, 439, 433, 441,
+ 440, 440, 442, 442, 444, 445, 443, 446, 446, 447,
+ 448, 447, 449, 447, 451, 452, 450, 454, 455, 453,
+ 456, 456, 456, 457, 457, 458, 459, 461, 462, 463,
+ 460, 464, 465, 466, 468, 467, 470, 471, 472, 469,
+ 473, 473, 474, 474, 474, 474, 474, 474, 474, 474,
+ 474, 474, 475, 476, 476, 477, 477, 478, 479, 479,
+ 480, 482, 483, 484, 485, 481, 486, 487, 487, 489,
+ 488, 490, 488, 491, 488, 492, 492, 493, 494, 494,
+ 495, 496, 498, 499, 497, 501, 502, 500, 503, 503,
+ 505, 504, 506, 504, 507, 504, 508, 504
};
/* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
static const yytype_uint8 yyr2[] =
{
- 0, 2, 1, 3, 0, 1, 2, 2, 3, 0,
- 3, 0, 3, 0, 3, 0, 3, 0, 3, 0,
- 3, 0, 3, 0, 3, 0, 3, 0, 3, 0,
- 3, 0, 3, 0, 3, 0, 3, 0, 3, 0,
- 0, 0, 7, 2, 0, 0, 0, 0, 0, 11,
- 2, 3, 0, 1, 2, 0, 0, 8, 0, 0,
- 6, 1, 1, 0, 0, 0, 7, 0, 3, 2,
- 3, 3, 0, 4, 0, 1, 1, 1, 1, 2,
- 1, 0, 0, 0, 7, 0, 0, 0, 8, 0,
- 4, 0, 3, 1, 0, 2, 0, 2, 1, 2,
- 2, 0, 1, 1, 2, 0, 3, 0, 3, 2,
- 0, 0, 3, 0, 3, 0, 3, 0, 3, 0,
- 3, 0, 3, 0, 3, 0, 3, 2, 0, 4,
- 0, 1, 0, 3, 0, 4, 1, 2, 1, 2,
- 2, 0, 0, 0, 0, 9, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 3, 1,
- 3, 1, 3, 1, 3, 3, 1, 3, 3, 1,
- 3, 3, 3, 1, 2, 2, 2, 1, 1, 3,
+ 0, 2, 1, 1, 0, 3, 2, 1, 2, 2,
+ 0, 3, 0, 3, 0, 3, 0, 3, 0, 3,
+ 0, 3, 0, 3, 0, 3, 0, 3, 0, 3,
+ 0, 3, 0, 3, 0, 3, 0, 3, 0, 3,
+ 0, 3, 0, 0, 0, 7, 2, 0, 0, 0,
+ 0, 0, 11, 2, 2, 0, 1, 2, 0, 0,
+ 8, 0, 0, 6, 1, 1, 0, 0, 0, 7,
+ 0, 3, 2, 3, 3, 0, 4, 0, 1, 1,
+ 1, 1, 2, 1, 0, 0, 0, 7, 0, 0,
+ 0, 8, 0, 4, 0, 3, 1, 0, 2, 0,
+ 2, 1, 2, 2, 0, 1, 1, 2, 0, 3,
+ 0, 3, 2, 0, 0, 3, 0, 3, 0, 3,
+ 0, 3, 0, 3, 0, 3, 0, 3, 0, 3,
+ 2, 0, 4, 0, 1, 0, 3, 0, 4, 1,
+ 1, 1, 2, 2, 0, 0, 0, 0, 9, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 2, 0, 5, 2, 1, 1, 2, 3, 0,
+ 1, 3, 1, 3, 1, 3, 1, 3, 3, 1,
+ 3, 3, 1, 3, 3, 3, 1, 2, 2, 2,
+ 1, 1, 3, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 0, 6, 2, 0, 1, 2,
+ 2, 0, 4, 1, 1, 4, 2, 0, 2, 2,
+ 0, 0, 4, 3, 0, 1, 1, 2, 3, 0,
3, 0, 3, 1, 1, 1, 2, 1, 0, 3,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
@@ -1556,14 +1650,14 @@ static const yytype_uint8 yyr2[] =
4, 0, 1, 1, 1, 1, 1, 2, 1, 2,
3, 2, 1, 1, 2, 1, 1, 1, 1, 1,
1, 1, 0, 3, 0, 0, 0, 7, 2, 2,
- 0, 0, 2, 0, 0, 6, 0, 3, 0, 3,
- 0, 0, 0, 0, 0, 0, 14, 1, 1, 1,
+ 0, 0, 3, 0, 0, 5, 0, 3, 0, 3,
+ 0, 0, 0, 0, 0, 0, 15, 1, 1, 1,
1, 1, 1, 2, 2, 0, 0, 0, 6, 0,
- 3, 2, 3, 0, 0, 3, 0, 0, 5, 0,
+ 3, 2, 2, 0, 0, 3, 0, 0, 5, 0,
3, 1, 1, 0, 0, 0, 0, 9, 2, 0,
- 4, 0, 2, 0, 0, 6, 2, 0, 0, 5,
+ 4, 0, 2, 0, 0, 6, 2, 0, 0, 6,
6, 0, 0, 6, 1, 1, 0, 0, 6, 1,
- 1, 0, 3, 2, 2, 0, 0, 0, 5, 1,
+ 1, 0, 4, 2, 2, 0, 0, 0, 5, 1,
1, 0, 0, 0, 0, 9, 0, 0, 0, 0,
9, 0, 0, 0, 0, 9, 0, 0, 0, 0,
11, 1, 1, 0, 1, 1, 0, 0, 0, 8,
@@ -1582,11 +1676,11 @@ static const yytype_uint8 yyr2[] =
1, 1, 1, 1, 1, 2, 3, 0, 0, 0,
8, 3, 3, 2, 0, 3, 0, 0, 0, 8,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 2, 2, 0, 4, 0, 2, 5, 2, 3,
- 0, 1, 0, 0, 0, 0, 10, 2, 2, 0,
- 0, 3, 0, 3, 0, 3, 3, 3, 3, 4,
- 0, 1, 2, 0, 0, 6, 0, 0, 5, 2,
- 0, 0, 3, 0, 3, 0, 3, 0, 3
+ 1, 2, 2, 3, 0, 2, 5, 2, 3, 0,
+ 1, 0, 0, 0, 0, 10, 2, 2, 0, 0,
+ 3, 0, 3, 0, 3, 3, 3, 3, 4, 0,
+ 1, 2, 0, 0, 6, 0, 0, 5, 2, 0,
+ 0, 3, 0, 3, 0, 3, 0, 3
};
@@ -1721,7 +1815,7 @@ do { \
static void
yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule)
{
- unsigned long int yylno = yyrline[yyrule];
+ unsigned long yylno = yyrline[yyrule];
int yynrhs = yyr2[yyrule];
int yyi;
YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
@@ -1947,6 +2041,7 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
case N: \
yyformat = S; \
break
+ default: /* Avoid compiler warnings. */
YYCASE_(0, YY_("syntax error"));
YYCASE_(1, YY_("syntax error, unexpected %s"));
YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
@@ -2152,7 +2247,7 @@ yyparse (void)
yyvsp = yyvs + yysize - 1;
YYDPRINTF ((stderr, "Stack size increased to %lu\n",
- (unsigned long int) yystacksize));
+ (unsigned long) yystacksize));
if (yyss + yystacksize - 1 <= yyssp)
YYABORT;
@@ -2263,300 +2358,328 @@ yyreduce:
switch (yyn)
{
case 5:
-#line 369 "fe/idl.ypp" /* yacc.c:1646 */
+#line 399 "fe/idl.ypp" /* yacc.c:1651 */
{
+ AST_Decl *d = (yyvsp[0].dcval);
+ if (d)
+ {
+ d->annotation_appls ((yyvsp[-1].annotations_val));
+ }
+ else
+ {
+ idl_global->err ()-> unsupported_warning(
+ "Annotating this type of definition is not supported");
+ }
}
-#line 2270 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 2375 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
case 6:
-#line 372 "fe/idl.ypp" /* yacc.c:1646 */
+#line 412 "fe/idl.ypp" /* yacc.c:1651 */
{
}
-#line 2277 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 2382 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
case 7:
-#line 375 "fe/idl.ypp" /* yacc.c:1646 */
+#line 418 "fe/idl.ypp" /* yacc.c:1651 */
{
+ (yyval.dcval) = (yyvsp[0].dcval);
+ }
+#line 2390 "fe/idl.tab.cpp" /* yacc.c:1651 */
+ break;
+
+ case 8:
+#line 422 "fe/idl.ypp" /* yacc.c:1651 */
+ {
+ (yyval.dcval) = 0;
}
-#line 2284 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 2398 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
case 9:
-#line 392 "fe/idl.ypp" /* yacc.c:1646 */
+#line 426 "fe/idl.ypp" /* yacc.c:1651 */
{
-// fixed_definition : type_dcl
- idl_global->set_parse_state (IDL_GlobalData::PS_TypeDeclSeen);
+ (yyval.dcval) = 0;
}
-#line 2293 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 2406 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
case 10:
-#line 397 "fe/idl.ypp" /* yacc.c:1646 */
+#line 433 "fe/idl.ypp" /* yacc.c:1651 */
{
-// ';'
- idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
+ idl_global->set_parse_state (IDL_GlobalData::PS_AnnotationDeclSeen);
}
-#line 2302 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 2414 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
case 11:
-#line 402 "fe/idl.ypp" /* yacc.c:1646 */
+#line 437 "fe/idl.ypp" /* yacc.c:1651 */
{
-// | typeid_dcl
- idl_global->set_parse_state (IDL_GlobalData::PS_TypeIdDeclSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
+ (yyval.dcval) = 0;
}
-#line 2311 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 2423 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
case 12:
-#line 407 "fe/idl.ypp" /* yacc.c:1646 */
+#line 442 "fe/idl.ypp" /* yacc.c:1651 */
{
-// ';'
- idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
+ idl_global->set_parse_state (IDL_GlobalData::PS_TypeDeclSeen);
}
-#line 2320 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 2431 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
case 13:
-#line 412 "fe/idl.ypp" /* yacc.c:1646 */
+#line 446 "fe/idl.ypp" /* yacc.c:1651 */
{
-// | typeprefix_dcl
- idl_global->set_parse_state (IDL_GlobalData::PS_TypePrefixDeclSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
+ (yyval.dcval) = (yyvsp[-2].dcval);
}
-#line 2329 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 2440 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
case 14:
-#line 417 "fe/idl.ypp" /* yacc.c:1646 */
+#line 451 "fe/idl.ypp" /* yacc.c:1651 */
{
-// ';'
- idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
+ idl_global->set_parse_state (IDL_GlobalData::PS_TypeIdDeclSeen);
}
-#line 2338 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 2448 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
case 15:
-#line 422 "fe/idl.ypp" /* yacc.c:1646 */
+#line 455 "fe/idl.ypp" /* yacc.c:1651 */
{
-// | const_dcl
- idl_global->set_parse_state (IDL_GlobalData::PS_ConstDeclSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
+ (yyval.dcval) = 0;
}
-#line 2347 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 2457 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
case 16:
-#line 427 "fe/idl.ypp" /* yacc.c:1646 */
+#line 460 "fe/idl.ypp" /* yacc.c:1651 */
{
-// ';'
- idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
+ idl_global->set_parse_state (IDL_GlobalData::PS_TypePrefixDeclSeen);
}
-#line 2356 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 2465 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
case 17:
-#line 432 "fe/idl.ypp" /* yacc.c:1646 */
+#line 464 "fe/idl.ypp" /* yacc.c:1651 */
{
-// | exception
- idl_global->set_parse_state (IDL_GlobalData::PS_ExceptDeclSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
+ (yyval.dcval) = 0;
}
-#line 2365 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 2474 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
case 18:
-#line 437 "fe/idl.ypp" /* yacc.c:1646 */
+#line 469 "fe/idl.ypp" /* yacc.c:1651 */
{
-// ';'
- idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
+ idl_global->set_parse_state (IDL_GlobalData::PS_ConstDeclSeen);
}
-#line 2374 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 2482 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
case 19:
-#line 442 "fe/idl.ypp" /* yacc.c:1646 */
+#line 473 "fe/idl.ypp" /* yacc.c:1651 */
{
-// | interface_def
- idl_global->set_parse_state (IDL_GlobalData::PS_InterfaceDeclSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
+ (yyval.dcval) = (yyvsp[-2].dcval);
}
-#line 2383 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 2491 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
case 20:
-#line 447 "fe/idl.ypp" /* yacc.c:1646 */
+#line 478 "fe/idl.ypp" /* yacc.c:1651 */
{
-// ';'
- idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
+ idl_global->set_parse_state (IDL_GlobalData::PS_ExceptDeclSeen);
}
-#line 2392 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 2499 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
case 21:
-#line 452 "fe/idl.ypp" /* yacc.c:1646 */
+#line 482 "fe/idl.ypp" /* yacc.c:1651 */
{
-// | module
- idl_global->set_parse_state (IDL_GlobalData::PS_ModuleDeclSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
+ (yyval.dcval) = 0;
}
-#line 2401 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 2508 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
case 22:
-#line 457 "fe/idl.ypp" /* yacc.c:1646 */
+#line 487 "fe/idl.ypp" /* yacc.c:1651 */
{
-// ';'
- idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
+ idl_global->set_parse_state (IDL_GlobalData::PS_InterfaceDeclSeen);
}
-#line 2410 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 2516 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
case 23:
-#line 462 "fe/idl.ypp" /* yacc.c:1646 */
+#line 491 "fe/idl.ypp" /* yacc.c:1651 */
{
-// | value_def
- idl_global->set_parse_state (IDL_GlobalData::PS_ValueTypeDeclSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
+ (yyval.dcval) = 0;
}
-#line 2419 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 2525 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
case 24:
-#line 467 "fe/idl.ypp" /* yacc.c:1646 */
+#line 496 "fe/idl.ypp" /* yacc.c:1651 */
{
-// ';'
- idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
+ idl_global->set_parse_state (IDL_GlobalData::PS_ModuleDeclSeen);
}
-#line 2428 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 2533 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
case 25:
-#line 472 "fe/idl.ypp" /* yacc.c:1646 */
+#line 500 "fe/idl.ypp" /* yacc.c:1651 */
{
-// | component
- idl_global->set_parse_state (IDL_GlobalData::PS_ComponentDeclSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
+ (yyval.dcval) = (yyvsp[-2].dcval);
}
-#line 2437 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 2542 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
case 26:
-#line 477 "fe/idl.ypp" /* yacc.c:1646 */
+#line 505 "fe/idl.ypp" /* yacc.c:1651 */
{
-// ';'
- idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
+ idl_global->set_parse_state (IDL_GlobalData::PS_ValueTypeDeclSeen);
}
-#line 2446 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 2550 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
case 27:
-#line 482 "fe/idl.ypp" /* yacc.c:1646 */
+#line 509 "fe/idl.ypp" /* yacc.c:1651 */
{
-// | home_decl
- idl_global->set_parse_state (IDL_GlobalData::PS_HomeDeclSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
+ (yyval.dcval) = 0;
}
-#line 2455 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 2559 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
case 28:
-#line 487 "fe/idl.ypp" /* yacc.c:1646 */
+#line 514 "fe/idl.ypp" /* yacc.c:1651 */
{
-// ';'
- idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
+ idl_global->set_parse_state (IDL_GlobalData::PS_ComponentDeclSeen);
}
-#line 2464 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 2567 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
case 29:
-#line 492 "fe/idl.ypp" /* yacc.c:1646 */
+#line 518 "fe/idl.ypp" /* yacc.c:1651 */
{
-// | event
- idl_global->set_parse_state (IDL_GlobalData::PS_EventDeclSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
+ (yyval.dcval) = 0;
}
-#line 2473 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 2576 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
case 30:
-#line 497 "fe/idl.ypp" /* yacc.c:1646 */
+#line 523 "fe/idl.ypp" /* yacc.c:1651 */
{
-// ';'
- idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
+ idl_global->set_parse_state (IDL_GlobalData::PS_HomeDeclSeen);
}
-#line 2482 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 2584 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
case 31:
-#line 502 "fe/idl.ypp" /* yacc.c:1646 */
+#line 527 "fe/idl.ypp" /* yacc.c:1651 */
{
-// | porttype_decl
- idl_global->set_parse_state (IDL_GlobalData::PS_PorttypeDeclSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
+ (yyval.dcval) = 0;
}
-#line 2491 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 2593 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
case 32:
-#line 507 "fe/idl.ypp" /* yacc.c:1646 */
+#line 532 "fe/idl.ypp" /* yacc.c:1651 */
{
-// ';'
- idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
+ idl_global->set_parse_state (IDL_GlobalData::PS_EventDeclSeen);
}
-#line 2500 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 2601 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
case 33:
-#line 512 "fe/idl.ypp" /* yacc.c:1646 */
+#line 536 "fe/idl.ypp" /* yacc.c:1651 */
{
-// | connector_decl
- idl_global->set_parse_state (IDL_GlobalData::PS_ConnectorDeclSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
+ (yyval.dcval) = 0;
}
-#line 2509 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 2610 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
case 34:
-#line 517 "fe/idl.ypp" /* yacc.c:1646 */
+#line 541 "fe/idl.ypp" /* yacc.c:1651 */
{
-// ';'
- idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
+ idl_global->set_parse_state (IDL_GlobalData::PS_PorttypeDeclSeen);
}
-#line 2518 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 2618 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
case 35:
-#line 522 "fe/idl.ypp" /* yacc.c:1646 */
+#line 545 "fe/idl.ypp" /* yacc.c:1651 */
{
-// | error
- idl_global->err()->syntax_error (idl_global->parse_state());
+ idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
+ (yyval.dcval) = 0;
}
-#line 2527 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 2627 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
case 36:
-#line 527 "fe/idl.ypp" /* yacc.c:1646 */
+#line 550 "fe/idl.ypp" /* yacc.c:1651 */
+ {
+ idl_global->set_parse_state (IDL_GlobalData::PS_ConnectorDeclSeen);
+ }
+#line 2635 "fe/idl.tab.cpp" /* yacc.c:1651 */
+ break;
+
+ case 37:
+#line 554 "fe/idl.ypp" /* yacc.c:1651 */
+ {
+ idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
+ (yyval.dcval) = 0;
+ }
+#line 2644 "fe/idl.tab.cpp" /* yacc.c:1651 */
+ break;
+
+ case 38:
+#line 559 "fe/idl.ypp" /* yacc.c:1651 */
+ {
+ idl_global->err()->syntax_error (idl_global->parse_state());
+ }
+#line 2652 "fe/idl.tab.cpp" /* yacc.c:1651 */
+ break;
+
+ case 39:
+#line 563 "fe/idl.ypp" /* yacc.c:1651 */
{
-// ';'
idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
yyerrok;
+ (yyval.dcval) = 0;
}
-#line 2537 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 2662 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 37:
-#line 536 "fe/idl.ypp" /* yacc.c:1646 */
+ case 40:
+#line 572 "fe/idl.ypp" /* yacc.c:1651 */
{
-// module_header : IDL_MODULE
idl_global->set_parse_state (IDL_GlobalData::PS_ModuleSeen);
}
-#line 2546 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 2670 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 38:
-#line 541 "fe/idl.ypp" /* yacc.c:1646 */
+ case 41:
+#line 576 "fe/idl.ypp" /* yacc.c:1651 */
{
(yyval.idlist) = (yyvsp[0].idlist);
}
-#line 2554 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 2678 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 39:
-#line 548 "fe/idl.ypp" /* yacc.c:1646 */
+ case 42:
+#line 583 "fe/idl.ypp" /* yacc.c:1651 */
{
-// module : module_header
idl_global->set_parse_state (IDL_GlobalData::PS_ModuleIDSeen);
// The module_header rule is common to template module, fixed
@@ -2579,8 +2702,7 @@ yyreduce:
*/
if (s != 0)
{
- m = idl_global->gen ()->create_module (s,
- (yyvsp[0].idlist));
+ m = idl_global->gen ()->create_module (s, (yyvsp[0].idlist));
(void) s->fe_add_module (m);
}
@@ -2592,54 +2714,53 @@ yyreduce:
* Push it on the stack
*/
idl_global->scopes ().push (m);
+
+ (yyval.dcval) = m;
}
-#line 2597 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 2721 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 40:
-#line 587 "fe/idl.ypp" /* yacc.c:1646 */
+ case 43:
+#line 622 "fe/idl.ypp" /* yacc.c:1651 */
{
-// '{'
- idl_global->set_parse_state (IDL_GlobalData::PS_ModuleSqSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_ModuleSqSeen);
}
-#line 2606 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 2729 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 41:
-#line 592 "fe/idl.ypp" /* yacc.c:1646 */
+ case 44:
+#line 626 "fe/idl.ypp" /* yacc.c:1651 */
{
-// at_least_one_definition
idl_global->set_parse_state (IDL_GlobalData::PS_ModuleBodySeen);
}
-#line 2615 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 2737 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 42:
-#line 597 "fe/idl.ypp" /* yacc.c:1646 */
+ case 45:
+#line 630 "fe/idl.ypp" /* yacc.c:1651 */
{
-// '}'
idl_global->set_parse_state (IDL_GlobalData::PS_ModuleQsSeen);
/*
* Finished with this module - pop it from the scope stack.
*/
idl_global->scopes ().pop ();
+ (yyval.dcval) = (yyvsp[-5].dcval);
}
-#line 2629 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 2751 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 43:
-#line 610 "fe/idl.ypp" /* yacc.c:1646 */
+ case 46:
+#line 643 "fe/idl.ypp" /* yacc.c:1651 */
{
idl_global->set_parse_state (IDL_GlobalData::PS_TmplModuleIDSeen);
}
-#line 2637 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 2759 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 44:
-#line 617 "fe/idl.ypp" /* yacc.c:1646 */
+ case 47:
+#line 650 "fe/idl.ypp" /* yacc.c:1651 */
{
-// template_module : template_module_header
// The module_header rule is common to template module, fixed
// module and instantiated template module. In the last
// case, a fully scoped name is allowed, but here we
@@ -2652,11 +2773,11 @@ yyreduce:
IDL_GlobalData::PS_ModuleIDSeen);
}
}
-#line 2656 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 2777 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 45:
-#line 632 "fe/idl.ypp" /* yacc.c:1646 */
+ case 48:
+#line 664 "fe/idl.ypp" /* yacc.c:1651 */
{
if (FE_Utils::duplicate_param_id ((yyvsp[0].plval)))
{
@@ -2666,13 +2787,12 @@ yyreduce:
return 1;
}
}
-#line 2670 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 2791 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 46:
-#line 642 "fe/idl.ypp" /* yacc.c:1646 */
+ case 49:
+#line 674 "fe/idl.ypp" /* yacc.c:1651 */
{
-// '>'
idl_global->set_parse_state (IDL_GlobalData::PS_TmplModuleParamsSeen);
AST_Template_Module *tm =
@@ -2701,29 +2821,28 @@ yyreduce:
// of the template module.
idl_global->current_params ((yyvsp[-2].plval));
}
-#line 2705 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 2825 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 47:
-#line 673 "fe/idl.ypp" /* yacc.c:1646 */
+ case 50:
+#line 704 "fe/idl.ypp" /* yacc.c:1651 */
{
idl_global->set_parse_state (IDL_GlobalData::PS_TmplModuleSqSeen);
}
-#line 2713 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 2833 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 48:
-#line 677 "fe/idl.ypp" /* yacc.c:1646 */
+ case 51:
+#line 708 "fe/idl.ypp" /* yacc.c:1651 */
{
idl_global->set_parse_state (IDL_GlobalData::PS_TmplModuleBodySeen);
}
-#line 2721 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 2841 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 49:
-#line 681 "fe/idl.ypp" /* yacc.c:1646 */
+ case 52:
+#line 712 "fe/idl.ypp" /* yacc.c:1651 */
{
-// '}'
idl_global->set_parse_state (IDL_GlobalData::PS_TmplModuleQsSeen);
/*
@@ -2739,33 +2858,30 @@ yyreduce:
// that we are no longer in a template module scope.
idl_global->current_params (0);
}
-#line 2743 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 2862 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 55:
-#line 716 "fe/idl.ypp" /* yacc.c:1646 */
+ case 58:
+#line 746 "fe/idl.ypp" /* yacc.c:1651 */
{
-// template_module_ref : IDL_ALIAS scoped_name
idl_global->set_parse_state (
IDL_GlobalData::PS_ModuleRefSeen);
}
-#line 2753 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 2871 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 56:
-#line 722 "fe/idl.ypp" /* yacc.c:1646 */
+ case 59:
+#line 751 "fe/idl.ypp" /* yacc.c:1651 */
{
-// '<' at_least_one_formal_parameter_name '>'
idl_global->set_parse_state (
IDL_GlobalData::PS_ModuleRefParamsSeen);
}
-#line 2763 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 2880 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 57:
-#line 728 "fe/idl.ypp" /* yacc.c:1646 */
+ case 60:
+#line 756 "fe/idl.ypp" /* yacc.c:1651 */
{
-// defining_id
idl_global->set_parse_state (
IDL_GlobalData::PS_ModuleRefIDSeen);
@@ -2842,33 +2958,30 @@ yyreduce:
idl_global->in_tmpl_mod_no_alias (itmna_flag);
idl_global->in_tmpl_mod_alias (false);
}
-#line 2846 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 2962 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 58:
-#line 810 "fe/idl.ypp" /* yacc.c:1646 */
+ case 61:
+#line 837 "fe/idl.ypp" /* yacc.c:1651 */
{
-// template_module_inst : template_module_header
idl_global->set_parse_state (
IDL_GlobalData::PS_InstModuleSeen);
}
-#line 2856 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 2971 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 59:
-#line 816 "fe/idl.ypp" /* yacc.c:1646 */
+ case 62:
+#line 842 "fe/idl.ypp" /* yacc.c:1651 */
{
-// at_least_one_actual_parameter '>'
idl_global->set_parse_state (
IDL_GlobalData::PS_InstModuleArgsSeen);
}
-#line 2866 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 2980 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 60:
-#line 822 "fe/idl.ypp" /* yacc.c:1646 */
+ case 63:
+#line 847 "fe/idl.ypp" /* yacc.c:1651 */
{
-// defining_id
idl_global->set_parse_state (
IDL_GlobalData::PS_InstModuleIDSeen);
@@ -2929,13 +3042,12 @@ yyreduce:
idl_global->set_err_count (idl_global->err_count () + 1);
}
}
-#line 2933 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 3046 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 63:
-#line 893 "fe/idl.ypp" /* yacc.c:1646 */
+ case 66:
+#line 917 "fe/idl.ypp" /* yacc.c:1651 */
{
-// interface : interface_header
UTL_Scope *s = idl_global->scopes ().top_non_null ();
AST_Interface *i = 0;
@@ -2972,31 +3084,28 @@ yyreduce:
*/
idl_global->scopes ().push (i);
}
-#line 2976 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 3088 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 64:
-#line 932 "fe/idl.ypp" /* yacc.c:1646 */
+ case 67:
+#line 955 "fe/idl.ypp" /* yacc.c:1651 */
{
-// '{'
idl_global->set_parse_state (IDL_GlobalData::PS_InterfaceSqSeen);
}
-#line 2985 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 3096 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 65:
-#line 937 "fe/idl.ypp" /* yacc.c:1646 */
+ case 68:
+#line 959 "fe/idl.ypp" /* yacc.c:1651 */
{
-// exports
idl_global->set_parse_state (IDL_GlobalData::PS_InterfaceBodySeen);
}
-#line 2994 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 3104 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 66:
-#line 942 "fe/idl.ypp" /* yacc.c:1646 */
+ case 69:
+#line 963 "fe/idl.ypp" /* yacc.c:1651 */
{
-// '}'
idl_global->set_parse_state (IDL_GlobalData::PS_InterfaceQsSeen);
/*
@@ -3004,32 +3113,29 @@ yyreduce:
*/
idl_global->scopes ().pop ();
}
-#line 3008 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 3117 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 67:
-#line 955 "fe/idl.ypp" /* yacc.c:1646 */
+ case 70:
+#line 975 "fe/idl.ypp" /* yacc.c:1651 */
{
-// interface_decl : IDL_INTERFACE
idl_global->set_parse_state (IDL_GlobalData::PS_InterfaceSeen);
}
-#line 3017 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 3125 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 68:
-#line 960 "fe/idl.ypp" /* yacc.c:1646 */
+ case 71:
+#line 979 "fe/idl.ypp" /* yacc.c:1651 */
{
-// defining_id
idl_global->set_parse_state (IDL_GlobalData::PS_InterfaceIDSeen);
(yyval.idval) = (yyvsp[0].idval);
}
-#line 3027 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 3134 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 69:
-#line 969 "fe/idl.ypp" /* yacc.c:1646 */
+ case 72:
+#line 987 "fe/idl.ypp" /* yacc.c:1651 */
{
-// interface_header : interface_decl inheritance_spec
idl_global->set_parse_state (IDL_GlobalData::PS_InheritSpecSeen);
if ((yyvsp[0].nlval) != 0 && (yyvsp[0].nlval)->truncatable ())
@@ -3064,13 +3170,12 @@ yyreduce:
(yyvsp[0].nlval) = 0;
}
}
-#line 3068 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 3174 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 70:
-#line 1007 "fe/idl.ypp" /* yacc.c:1646 */
+ case 73:
+#line 1024 "fe/idl.ypp" /* yacc.c:1651 */
{
-// | IDL_LOCAL interface_decl inheritance_spec
idl_global->set_parse_state (IDL_GlobalData::PS_InheritSpecSeen);
/*
@@ -3098,13 +3203,12 @@ yyreduce:
(yyvsp[0].nlval) = 0;
}
}
-#line 3102 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 3207 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 71:
-#line 1038 "fe/idl.ypp" /* yacc.c:1646 */
+ case 74:
+#line 1054 "fe/idl.ypp" /* yacc.c:1651 */
{
-// | IDL_ABSTRACT interface_decl inheritance_spec
idl_global->set_parse_state (IDL_GlobalData::PS_InheritSpecSeen);
/*
@@ -3132,56 +3236,45 @@ yyreduce:
(yyvsp[0].nlval) = 0;
}
}
-#line 3136 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 3240 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 72:
-#line 1071 "fe/idl.ypp" /* yacc.c:1646 */
+ case 75:
+#line 1086 "fe/idl.ypp" /* yacc.c:1651 */
{
-// inheritance_spec : ':' opt_truncatable
idl_global->set_parse_state (IDL_GlobalData::PS_InheritColonSeen);
}
-#line 3145 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 3248 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 73:
-#line 1076 "fe/idl.ypp" /* yacc.c:1646 */
+ case 76:
+#line 1090 "fe/idl.ypp" /* yacc.c:1651 */
{
-// at_least_one_scoped_name
(yyvsp[0].nlval)->truncatable ((yyvsp[-2].bval));
(yyval.nlval) = (yyvsp[0].nlval);
}
-#line 3155 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 3257 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 74:
-#line 1082 "fe/idl.ypp" /* yacc.c:1646 */
+ case 77:
+#line 1095 "fe/idl.ypp" /* yacc.c:1651 */
{
-/* | EMPTY */
(yyval.nlval) = 0;
}
-#line 3164 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 3265 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 79:
-#line 1097 "fe/idl.ypp" /* yacc.c:1646 */
+ case 82:
+#line 1109 "fe/idl.ypp" /* yacc.c:1651 */
{
-// valuetype : IDL_CUSTOM value_concrete_decl
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("error in %C line %d\n"),
- idl_global->filename ()->get_string (),
- idl_global->lineno ()));
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("Sorry, I (TAO_IDL) can't handle")
- ACE_TEXT (" custom yet\n")));
+ idl_global->err ()->unsupported_error ("custom is not supported");
}
-#line 3179 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 3273 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 81:
-#line 1112 "fe/idl.ypp" /* yacc.c:1646 */
+ case 84:
+#line 1117 "fe/idl.ypp" /* yacc.c:1651 */
{
-// value_concrete_decl : value_header
UTL_Scope *s = idl_global->scopes ().top_non_null ();
AST_ValueType *v = 0;
AST_Interface *i = 0;
@@ -3223,31 +3316,28 @@ yyreduce:
*/
idl_global->scopes ().push (v);
}
-#line 3227 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 3320 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 82:
-#line 1156 "fe/idl.ypp" /* yacc.c:1646 */
+ case 85:
+#line 1160 "fe/idl.ypp" /* yacc.c:1651 */
{
-// '{'
idl_global->set_parse_state (IDL_GlobalData::PS_ValueTypeSqSeen);
}
-#line 3236 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 3328 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 83:
-#line 1161 "fe/idl.ypp" /* yacc.c:1646 */
+ case 86:
+#line 1164 "fe/idl.ypp" /* yacc.c:1651 */
{
-// value_elements
idl_global->set_parse_state (IDL_GlobalData::PS_ValueTypeBodySeen);
}
-#line 3245 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 3336 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 84:
-#line 1166 "fe/idl.ypp" /* yacc.c:1646 */
+ case 87:
+#line 1168 "fe/idl.ypp" /* yacc.c:1651 */
{
-// '}'
idl_global->set_parse_state (IDL_GlobalData::PS_ValueTypeQsSeen);
AST_ValueType *vt =
@@ -3265,13 +3355,12 @@ yyreduce:
*/
idl_global->scopes ().pop ();
}
-#line 3269 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 3359 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 85:
-#line 1190 "fe/idl.ypp" /* yacc.c:1646 */
+ case 88:
+#line 1191 "fe/idl.ypp" /* yacc.c:1651 */
{
-// value_abs_decl : IDL_ABSTRACT value_header
UTL_Scope *s = idl_global->scopes ().top_non_null ();
AST_ValueType *v = 0;
AST_Interface *i = 0;
@@ -3313,31 +3402,28 @@ yyreduce:
*/
idl_global->scopes ().push (v);
}
-#line 3317 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 3406 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 86:
-#line 1234 "fe/idl.ypp" /* yacc.c:1646 */
+ case 89:
+#line 1234 "fe/idl.ypp" /* yacc.c:1651 */
{
-// '{'
idl_global->set_parse_state (IDL_GlobalData::PS_ValueTypeSqSeen);
}
-#line 3326 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 3414 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 87:
-#line 1239 "fe/idl.ypp" /* yacc.c:1646 */
+ case 90:
+#line 1238 "fe/idl.ypp" /* yacc.c:1651 */
{
-// exports
idl_global->set_parse_state (IDL_GlobalData::PS_ValueTypeBodySeen);
}
-#line 3335 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 3422 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 88:
-#line 1244 "fe/idl.ypp" /* yacc.c:1646 */
+ case 91:
+#line 1242 "fe/idl.ypp" /* yacc.c:1651 */
{
-// '}'
idl_global->set_parse_state (IDL_GlobalData::PS_ValueTypeQsSeen);
/*
@@ -3345,22 +3431,20 @@ yyreduce:
*/
idl_global->scopes ().pop ();
}
-#line 3349 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 3435 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 89:
-#line 1258 "fe/idl.ypp" /* yacc.c:1646 */
+ case 92:
+#line 1255 "fe/idl.ypp" /* yacc.c:1651 */
{
-// value_header : value_decl inheritance_spec
idl_global->set_parse_state (IDL_GlobalData::PS_InheritSpecSeen);
}
-#line 3358 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 3443 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 90:
-#line 1263 "fe/idl.ypp" /* yacc.c:1646 */
+ case 93:
+#line 1259 "fe/idl.ypp" /* yacc.c:1651 */
{
-// supports_spec
idl_global->set_parse_state (IDL_GlobalData::PS_SupportSpecSeen);
UTL_ScopedName *sn = 0;
@@ -3390,68 +3474,62 @@ yyreduce:
(yyvsp[-2].nlval) = 0;
}
}
-#line 3394 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 3478 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 91:
-#line 1298 "fe/idl.ypp" /* yacc.c:1646 */
+ case 94:
+#line 1293 "fe/idl.ypp" /* yacc.c:1651 */
{
-// value_decl : IDL_VALUETYPE
idl_global->set_parse_state (IDL_GlobalData::PS_ValueTypeSeen);
}
-#line 3403 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 3486 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 92:
-#line 1303 "fe/idl.ypp" /* yacc.c:1646 */
+ case 95:
+#line 1297 "fe/idl.ypp" /* yacc.c:1651 */
{
-// defining_id
idl_global->set_parse_state (IDL_GlobalData::PS_ValueTypeIDSeen);
(yyval.idval) = (yyvsp[0].idval);
}
-#line 3413 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 3495 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 93:
-#line 1312 "fe/idl.ypp" /* yacc.c:1646 */
+ case 96:
+#line 1305 "fe/idl.ypp" /* yacc.c:1651 */
{
-// opt_truncatable : IDL_TRUNCATABLE
(yyval.bval) = true;
}
-#line 3422 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 3503 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 94:
-#line 1317 "fe/idl.ypp" /* yacc.c:1646 */
+ case 97:
+#line 1309 "fe/idl.ypp" /* yacc.c:1651 */
{
-/* | EMPTY */
(yyval.bval) = false;
}
-#line 3431 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 3511 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 95:
-#line 1326 "fe/idl.ypp" /* yacc.c:1646 */
+ case 98:
+#line 1317 "fe/idl.ypp" /* yacc.c:1651 */
{
-// supports_spec : IDL_SUPPORTS at_least_one_scoped_name
(yyval.nlval) = (yyvsp[0].nlval);
}
-#line 3440 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 3519 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 96:
-#line 1331 "fe/idl.ypp" /* yacc.c:1646 */
+ case 99:
+#line 1321 "fe/idl.ypp" /* yacc.c:1651 */
{
/* | EMPTY */
(yyval.nlval) = 0;
}
-#line 3449 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 3528 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 97:
-#line 1340 "fe/idl.ypp" /* yacc.c:1646 */
+ case 100:
+#line 1330 "fe/idl.ypp" /* yacc.c:1651 */
{
-// value_forward_decl : IDL_ABSTRACT value_decl
UTL_Scope *s = idl_global->scopes ().top_non_null ();
UTL_ScopedName n ((yyvsp[0].idval),
0);
@@ -3473,13 +3551,12 @@ yyreduce:
delete (yyvsp[0].idval);
(yyvsp[0].idval) = 0;
}
-#line 3477 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 3555 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 98:
-#line 1365 "fe/idl.ypp" /* yacc.c:1646 */
+ case 101:
+#line 1354 "fe/idl.ypp" /* yacc.c:1651 */
{
-// | value_decl
UTL_Scope *s = idl_global->scopes ().top_non_null ();
UTL_ScopedName n ((yyvsp[0].idval),
0);
@@ -3501,13 +3578,12 @@ yyreduce:
delete (yyvsp[0].idval);
(yyvsp[0].idval) = 0;
}
-#line 3505 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 3582 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 99:
-#line 1392 "fe/idl.ypp" /* yacc.c:1646 */
+ case 102:
+#line 1380 "fe/idl.ypp" /* yacc.c:1651 */
{
-// value_box_decl : value_decl type_spec
idl_global->set_parse_state (IDL_GlobalData::PS_ValueBoxDeclSeen);
UTL_Scope *s = idl_global->scopes ().top_non_null ();
@@ -3567,215 +3643,192 @@ yyreduce:
delete (yyvsp[-1].idval);
(yyvsp[-1].idval) = 0;
}
-#line 3571 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 3647 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 105:
-#line 1469 "fe/idl.ypp" /* yacc.c:1646 */
+ case 108:
+#line 1456 "fe/idl.ypp" /* yacc.c:1651 */
{
-// state_member : IDL_PUBLIC
/* is $0 to member_i */
(yyval.vival) = AST_Field::vis_PUBLIC;
}
-#line 3581 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 3656 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 106:
-#line 1475 "fe/idl.ypp" /* yacc.c:1646 */
+ case 109:
+#line 1461 "fe/idl.ypp" /* yacc.c:1651 */
{
-// member_i
}
-#line 3589 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 3663 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 107:
-#line 1479 "fe/idl.ypp" /* yacc.c:1646 */
+ case 110:
+#line 1464 "fe/idl.ypp" /* yacc.c:1651 */
{
-// IDL_PRIVATE
/* is $0 to member_i */
(yyval.vival) = AST_Field::vis_PRIVATE;
}
-#line 3599 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 3672 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 108:
-#line 1485 "fe/idl.ypp" /* yacc.c:1646 */
+ case 111:
+#line 1469 "fe/idl.ypp" /* yacc.c:1651 */
{
-// member_i
}
-#line 3607 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 3679 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 111:
-#line 1497 "fe/idl.ypp" /* yacc.c:1646 */
+ case 114:
+#line 1480 "fe/idl.ypp" /* yacc.c:1651 */
{
-// export : type_dcl
idl_global->set_parse_state (IDL_GlobalData::PS_TypeDeclSeen);
}
-#line 3616 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 3687 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 112:
-#line 1502 "fe/idl.ypp" /* yacc.c:1646 */
+ case 115:
+#line 1484 "fe/idl.ypp" /* yacc.c:1651 */
{
-// ';'
idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
}
-#line 3625 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 3695 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 113:
-#line 1507 "fe/idl.ypp" /* yacc.c:1646 */
+ case 116:
+#line 1488 "fe/idl.ypp" /* yacc.c:1651 */
{
-// | typeid_dcl
idl_global->set_parse_state (IDL_GlobalData::PS_TypeIdDeclSeen);
}
-#line 3634 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 3703 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 114:
-#line 1512 "fe/idl.ypp" /* yacc.c:1646 */
+ case 117:
+#line 1492 "fe/idl.ypp" /* yacc.c:1651 */
{
-// ';'
idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
}
-#line 3643 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 3711 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 115:
-#line 1517 "fe/idl.ypp" /* yacc.c:1646 */
+ case 118:
+#line 1496 "fe/idl.ypp" /* yacc.c:1651 */
{
-// | typeprefix_dcl
idl_global->set_parse_state (IDL_GlobalData::PS_TypePrefixDeclSeen);
}
-#line 3652 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 3719 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 116:
-#line 1522 "fe/idl.ypp" /* yacc.c:1646 */
+ case 119:
+#line 1500 "fe/idl.ypp" /* yacc.c:1651 */
{
-// ';'
idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
}
-#line 3661 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 3727 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 117:
-#line 1527 "fe/idl.ypp" /* yacc.c:1646 */
+ case 120:
+#line 1504 "fe/idl.ypp" /* yacc.c:1651 */
{
-// | const_dcl
idl_global->set_parse_state (IDL_GlobalData::PS_ConstDeclSeen);
}
-#line 3670 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 3735 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 118:
-#line 1532 "fe/idl.ypp" /* yacc.c:1646 */
+ case 121:
+#line 1508 "fe/idl.ypp" /* yacc.c:1651 */
{
-// ';'
idl_global->set_parse_state(IDL_GlobalData::PS_NoState);
}
-#line 3679 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 3743 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 119:
-#line 1537 "fe/idl.ypp" /* yacc.c:1646 */
+ case 122:
+#line 1512 "fe/idl.ypp" /* yacc.c:1651 */
{
-// | exception
idl_global->set_parse_state (IDL_GlobalData::PS_ExceptDeclSeen);
}
-#line 3688 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 3751 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 120:
-#line 1542 "fe/idl.ypp" /* yacc.c:1646 */
+ case 123:
+#line 1516 "fe/idl.ypp" /* yacc.c:1651 */
{
-// ';'
idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
}
-#line 3697 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 3759 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 121:
-#line 1547 "fe/idl.ypp" /* yacc.c:1646 */
+ case 124:
+#line 1520 "fe/idl.ypp" /* yacc.c:1651 */
{
-// | attribute
idl_global->set_parse_state (IDL_GlobalData::PS_AttrDeclSeen);
}
-#line 3706 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 3767 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 122:
-#line 1552 "fe/idl.ypp" /* yacc.c:1646 */
+ case 125:
+#line 1524 "fe/idl.ypp" /* yacc.c:1651 */
{
-// ';'
idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
}
-#line 3715 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 3775 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 123:
-#line 1557 "fe/idl.ypp" /* yacc.c:1646 */
+ case 126:
+#line 1528 "fe/idl.ypp" /* yacc.c:1651 */
{
-// | operation
idl_global->set_parse_state (IDL_GlobalData::PS_OpDeclSeen);
}
-#line 3724 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 3783 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 124:
-#line 1562 "fe/idl.ypp" /* yacc.c:1646 */
+ case 127:
+#line 1532 "fe/idl.ypp" /* yacc.c:1651 */
{
-// ';'
idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
}
-#line 3733 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 3791 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 125:
-#line 1567 "fe/idl.ypp" /* yacc.c:1646 */
+ case 128:
+#line 1536 "fe/idl.ypp" /* yacc.c:1651 */
{
-// | error
idl_global->err()->syntax_error (idl_global->parse_state());
}
-#line 3742 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 3799 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 126:
-#line 1572 "fe/idl.ypp" /* yacc.c:1646 */
+ case 129:
+#line 1540 "fe/idl.ypp" /* yacc.c:1651 */
{
-// ';'
idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
yyerrok;
}
-#line 3752 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 3808 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 127:
-#line 1581 "fe/idl.ypp" /* yacc.c:1646 */
+ case 130:
+#line 1548 "fe/idl.ypp" /* yacc.c:1651 */
{
-// at_least_one_scoped_name : scoped_name scoped_names
ACE_NEW_RETURN ((yyval.nlval),
UTL_NameList ((yyvsp[-1].idlist),
(yyvsp[0].nlval)),
1);
}
-#line 3764 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 3819 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 128:
-#line 1593 "fe/idl.ypp" /* yacc.c:1646 */
+ case 131:
+#line 1559 "fe/idl.ypp" /* yacc.c:1651 */
{
-// scoped_names : scoped_names ','
idl_global->set_parse_state (IDL_GlobalData::PS_SNListCommaSeen);
}
-#line 3773 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 3827 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 129:
-#line 1598 "fe/idl.ypp" /* yacc.c:1646 */
+ case 132:
+#line 1563 "fe/idl.ypp" /* yacc.c:1651 */
{
-// scoped_name
idl_global->set_parse_state (IDL_GlobalData::PS_ScopedNameSeen);
UTL_NameList *nl = 0;
@@ -3794,22 +3847,20 @@ yyreduce:
(yyval.nlval) = (yyvsp[-3].nlval);
}
}
-#line 3798 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 3851 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 130:
-#line 1619 "fe/idl.ypp" /* yacc.c:1646 */
+ case 133:
+#line 1583 "fe/idl.ypp" /* yacc.c:1651 */
{
-/* | EMPTY */
(yyval.nlval) = 0;
}
-#line 3807 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 3859 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 131:
-#line 1627 "fe/idl.ypp" /* yacc.c:1646 */
+ case 134:
+#line 1590 "fe/idl.ypp" /* yacc.c:1651 */
{
-// scoped_name : id
idl_global->set_parse_state (IDL_GlobalData::PS_SN_IDSeen);
ACE_NEW_RETURN ((yyval.idlist),
@@ -3817,22 +3868,20 @@ yyreduce:
0),
1);
}
-#line 3821 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 3872 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 132:
-#line 1637 "fe/idl.ypp" /* yacc.c:1646 */
+ case 135:
+#line 1599 "fe/idl.ypp" /* yacc.c:1651 */
{
-// | IDL_SCOPE_DELIMITOR
idl_global->set_parse_state (IDL_GlobalData::PS_ScopeDelimSeen);
}
-#line 3830 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 3880 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 133:
-#line 1642 "fe/idl.ypp" /* yacc.c:1646 */
+ case 136:
+#line 1603 "fe/idl.ypp" /* yacc.c:1651 */
{
-// id
idl_global->set_parse_state (IDL_GlobalData::PS_SN_IDSeen);
Identifier *id = 0;
@@ -3851,13 +3900,12 @@ yyreduce:
sn),
1);
}
-#line 3855 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 3904 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 134:
-#line 1664 "fe/idl.ypp" /* yacc.c:1646 */
+ case 137:
+#line 1624 "fe/idl.ypp" /* yacc.c:1651 */
{
-// | scoped_name IDL_SCOPE_DELIMITOR
idl_global->set_parse_state (IDL_GlobalData::PS_ScopeDelimSeen);
// This cleans up all the non-global "::"s in scoped names.
@@ -3866,13 +3914,12 @@ yyreduce:
ACE::strdelete ((yyvsp[0].strval));
(yyvsp[0].strval) = 0;
}
-#line 3870 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 3918 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 135:
-#line 1675 "fe/idl.ypp" /* yacc.c:1646 */
+ case 138:
+#line 1634 "fe/idl.ypp" /* yacc.c:1651 */
{
-// id
idl_global->set_parse_state (IDL_GlobalData::PS_SN_IDSeen);
UTL_IdList *sn = 0;
@@ -3883,43 +3930,38 @@ yyreduce:
(yyvsp[-3].idlist)->nconc (sn);
(yyval.idlist) = (yyvsp[-3].idlist);
}
-#line 3887 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 3934 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 136:
-#line 1690 "fe/idl.ypp" /* yacc.c:1646 */
+ case 139:
+#line 1648 "fe/idl.ypp" /* yacc.c:1651 */
{
-// id: IDENTIFIER
ACE_NEW_RETURN ((yyval.idval),
Identifier ((yyvsp[0].strval)),
1);
ACE::strdelete ((yyvsp[0].strval));
(yyvsp[0].strval) = 0;
}
-#line 3900 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 3946 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 137:
-#line 1701 "fe/idl.ypp" /* yacc.c:1646 */
+ case 140:
+#line 1658 "fe/idl.ypp" /* yacc.c:1651 */
{
/* defining_id is a defining identifier
whereas id is usually a reference to a defining identifier */
- ACE_NEW_RETURN ((yyval.idval),
- Identifier ((yyvsp[0].strval)),
- 1);
+ ACE_NEW_RETURN ((yyval.idval), Identifier ((yyvsp[0].strval)), 1);
ACE::strdelete ((yyvsp[0].strval));
(yyvsp[0].strval) = 0;
}
-#line 3914 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 3958 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 138:
-#line 1714 "fe/idl.ypp" /* yacc.c:1646 */
+ case 141:
+#line 1669 "fe/idl.ypp" /* yacc.c:1651 */
{
-// interface_forward : interface_decl
UTL_Scope *s = idl_global->scopes ().top_non_null ();
- UTL_ScopedName n ((yyvsp[0].idval),
- 0);
+ UTL_ScopedName n ((yyvsp[0].idval), 0);
if (ACE_OS::strcmp ((yyvsp[0].idval)->get_string (),
"TypeCode") == 0
@@ -3959,13 +4001,12 @@ yyreduce:
delete (yyvsp[0].idval);
(yyvsp[0].idval) = 0;
}
-#line 3963 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 4005 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 139:
-#line 1760 "fe/idl.ypp" /* yacc.c:1646 */
+ case 142:
+#line 1713 "fe/idl.ypp" /* yacc.c:1651 */
{
-// | IDL_LOCAL interface_decl
UTL_Scope *s = idl_global->scopes ().top_non_null ();
UTL_ScopedName n ((yyvsp[0].idval),
0);
@@ -3990,13 +4031,12 @@ yyreduce:
delete (yyvsp[0].idval);
(yyvsp[0].idval) = 0;
}
-#line 3994 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 4035 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 140:
-#line 1788 "fe/idl.ypp" /* yacc.c:1646 */
+ case 143:
+#line 1740 "fe/idl.ypp" /* yacc.c:1651 */
{
-// | IDL_ABSTRACT interface_decl
UTL_Scope *s = idl_global->scopes ().top_non_null ();
UTL_ScopedName n ((yyvsp[0].idval),
0);
@@ -4021,51 +4061,47 @@ yyreduce:
delete (yyvsp[0].idval);
(yyvsp[0].idval) = 0;
}
-#line 4025 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 4065 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 141:
-#line 1818 "fe/idl.ypp" /* yacc.c:1646 */
+ case 144:
+#line 1769 "fe/idl.ypp" /* yacc.c:1651 */
{
-// const_dcl : IDL_CONST
idl_global->set_parse_state (IDL_GlobalData::PS_ConstSeen);
}
-#line 4034 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 4073 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 142:
-#line 1823 "fe/idl.ypp" /* yacc.c:1646 */
+ case 145:
+#line 1773 "fe/idl.ypp" /* yacc.c:1651 */
{
-// const_type
idl_global->set_parse_state (IDL_GlobalData::PS_ConstTypeSeen);
}
-#line 4043 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 4081 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 143:
-#line 1828 "fe/idl.ypp" /* yacc.c:1646 */
+ case 146:
+#line 1777 "fe/idl.ypp" /* yacc.c:1651 */
{
-// defining_id
idl_global->set_parse_state (IDL_GlobalData::PS_ConstIDSeen);
}
-#line 4052 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 4089 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 144:
-#line 1833 "fe/idl.ypp" /* yacc.c:1646 */
+ case 147:
+#line 1781 "fe/idl.ypp" /* yacc.c:1651 */
{
-// '='
idl_global->set_parse_state (IDL_GlobalData::PS_ConstAssignSeen);
}
-#line 4061 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 4097 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 145:
-#line 1838 "fe/idl.ypp" /* yacc.c:1646 */
+ case 148:
+#line 1785 "fe/idl.ypp" /* yacc.c:1651 */
{
-// expression
- UTL_ScopedName n ((yyvsp[-4].idval),
- 0);
+ (yyval.dcval) = 0;
+ UTL_ScopedName n ((yyvsp[-4].idval), 0);
+
UTL_Scope *s = idl_global->scopes ().top_non_null ();
AST_Constant *c = 0;
idl_global->set_parse_state (IDL_GlobalData::PS_ConstExprSeen);
@@ -4076,28 +4112,24 @@ yyreduce:
*/
if ((yyvsp[0].exval) != 0 && s != 0)
{
- AST_Param_Holder *param_holder =
- (yyvsp[0].exval)->param_holder ();
+ AST_Param_Holder *param_holder = (yyvsp[0].exval)->param_holder ();
AST_Expression::AST_ExprValue *result =
- (yyvsp[0].exval)->check_and_coerce ((yyvsp[-6].etval),
- tao_enum_constant_decl);
+ (yyvsp[0].exval)->check_and_coerce ((yyvsp[-6].etval), tao_enum_constant_decl);
tao_enum_constant_decl = 0;
// If the expression is a template parameter place
// holder, 'result' will be 0, but it's ok.
if (result == 0 && param_holder == 0)
{
- idl_global->err ()->coercion_error ((yyvsp[0].exval),
- (yyvsp[-6].etval));
+ idl_global->err ()->coercion_error ((yyvsp[0].exval), (yyvsp[-6].etval));
(yyvsp[0].exval)->destroy ();
delete (yyvsp[0].exval);
(yyvsp[0].exval) = 0;
}
else
{
- AST_Expression::ExprType et =
- (yyvsp[-6].etval);
+ AST_Expression::ExprType et = (yyvsp[-6].etval);
if (param_holder != 0
&& et != param_holder->info ()->const_type_)
@@ -4107,56 +4139,42 @@ yyreduce:
}
else
{
- c =
- idl_global->gen ()->create_constant (
- (yyvsp[-6].etval),
- (yyvsp[0].exval),
- &n);
-
+ c = idl_global->gen ()->create_constant ((yyvsp[-6].etval), (yyvsp[0].exval), &n);
(void) s->fe_add_constant (c);
+ (yyval.dcval) = c;
}
}
- (yyvsp[-4].idval)->destroy ();
- delete (yyvsp[-4].idval);
- (yyvsp[-4].idval) = 0;
-
delete result;
result = 0;
}
+
+ (yyvsp[-4].idval)->destroy ();
+ delete (yyvsp[-4].idval);
+ (yyvsp[-4].idval) = 0;
}
-#line 4129 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 4157 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 152:
-#line 1911 "fe/idl.ypp" /* yacc.c:1646 */
+ case 155:
+#line 1850 "fe/idl.ypp" /* yacc.c:1651 */
{
-// const_type
-// : integer_type
-// | char_type
-// | octet_type
-// | boolean_type
-// | floating_pt_type
-// | fixed_type
-// | string_type_spec
(yyval.etval) = AST_Expression::EV_string;
}
-#line 4145 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 4165 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 153:
-#line 1923 "fe/idl.ypp" /* yacc.c:1646 */
+ case 156:
+#line 1854 "fe/idl.ypp" /* yacc.c:1651 */
{
-// | wstring_type_spec
(yyval.etval) = AST_Expression::EV_wstring;
}
-#line 4154 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 4173 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 154:
-#line 1928 "fe/idl.ypp" /* yacc.c:1646 */
+ case 157:
+#line 1858 "fe/idl.ypp" /* yacc.c:1651 */
{
-// | scoped_name
UTL_Scope *s = idl_global->scopes ().top_non_null ();
AST_PredefinedType *c = 0;
AST_Typedef *t = 0;
@@ -4221,14 +4239,12 @@ yyreduce:
sn = 0;
(yyvsp[0].idlist) = 0;
}
-#line 4225 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 4243 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 158:
-#line 2002 "fe/idl.ypp" /* yacc.c:1646 */
+ case 161:
+#line 1931 "fe/idl.ypp" /* yacc.c:1651 */
{
-// or_expr : xor_expr
-// | or_expr '|' xor_expr
(yyval.exval) =
idl_global->gen ()->create_expr (
AST_Expression::EC_or,
@@ -4236,14 +4252,12 @@ yyreduce:
(yyvsp[0].exval)
);
}
-#line 4240 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 4256 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 160:
-#line 2017 "fe/idl.ypp" /* yacc.c:1646 */
+ case 163:
+#line 1944 "fe/idl.ypp" /* yacc.c:1651 */
{
-// xor_expr : and_expr
-// | xor_expr '^' and_expr
(yyval.exval) =
idl_global->gen ()->create_expr (
AST_Expression::EC_xor,
@@ -4251,13 +4265,12 @@ yyreduce:
(yyvsp[0].exval)
);
}
-#line 4255 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 4269 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 162:
-#line 2032 "fe/idl.ypp" /* yacc.c:1646 */
+ case 165:
+#line 1957 "fe/idl.ypp" /* yacc.c:1651 */
{
-// and_expr : shift_expr | and_expr '&' shift_expr
(yyval.exval) =
idl_global->gen ()->create_expr (
AST_Expression::EC_and,
@@ -4265,13 +4278,12 @@ yyreduce:
(yyvsp[0].exval)
);
}
-#line 4269 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 4282 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 164:
-#line 2046 "fe/idl.ypp" /* yacc.c:1646 */
+ case 167:
+#line 1970 "fe/idl.ypp" /* yacc.c:1651 */
{
-// shift_expr : add_expr | shift_expr IDL_LEFT_SHIFT add_expr
(yyval.exval) =
idl_global->gen ()->create_expr (
AST_Expression::EC_left,
@@ -4279,13 +4291,12 @@ yyreduce:
(yyvsp[0].exval)
);
}
-#line 4283 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 4295 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 165:
-#line 2056 "fe/idl.ypp" /* yacc.c:1646 */
+ case 168:
+#line 1979 "fe/idl.ypp" /* yacc.c:1651 */
{
-// | shift_expr IDL_RIGHT_SHIFT add_expr
(yyval.exval) =
idl_global->gen ()->create_expr (
AST_Expression::EC_right,
@@ -4293,13 +4304,12 @@ yyreduce:
(yyvsp[0].exval)
);
}
-#line 4297 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 4308 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 167:
-#line 2070 "fe/idl.ypp" /* yacc.c:1646 */
+ case 170:
+#line 1992 "fe/idl.ypp" /* yacc.c:1651 */
{
-// add_expr : mult_expr | add_expr '+' mult_expr
(yyval.exval) =
idl_global->gen ()->create_expr (
AST_Expression::EC_add,
@@ -4307,13 +4317,12 @@ yyreduce:
(yyvsp[0].exval)
);
}
-#line 4311 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 4321 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 168:
-#line 2080 "fe/idl.ypp" /* yacc.c:1646 */
+ case 171:
+#line 2001 "fe/idl.ypp" /* yacc.c:1651 */
{
-// | add_expr '-' mult_expr
(yyval.exval) =
idl_global->gen ()->create_expr (
AST_Expression::EC_minus,
@@ -4321,13 +4330,12 @@ yyreduce:
(yyvsp[0].exval)
);
}
-#line 4325 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 4334 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 170:
-#line 2094 "fe/idl.ypp" /* yacc.c:1646 */
+ case 173:
+#line 2014 "fe/idl.ypp" /* yacc.c:1651 */
{
-// mult_expr : unary_expr | mult_expr '*' unary_expr
(yyval.exval) =
idl_global->gen ()->create_expr (
AST_Expression::EC_mul,
@@ -4335,13 +4343,12 @@ yyreduce:
(yyvsp[0].exval)
);
}
-#line 4339 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 4347 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 171:
-#line 2104 "fe/idl.ypp" /* yacc.c:1646 */
+ case 174:
+#line 2023 "fe/idl.ypp" /* yacc.c:1651 */
{
-// | mult_expr '/' unary_expr
(yyval.exval) =
idl_global->gen ()->create_expr (
AST_Expression::EC_div,
@@ -4349,13 +4356,12 @@ yyreduce:
(yyvsp[0].exval)
);
}
-#line 4353 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 4360 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 172:
-#line 2114 "fe/idl.ypp" /* yacc.c:1646 */
+ case 175:
+#line 2032 "fe/idl.ypp" /* yacc.c:1651 */
{
-// | mult_expr '%' unary_expr
(yyval.exval) =
idl_global->gen ()->create_expr (
AST_Expression::EC_mod,
@@ -4363,13 +4369,12 @@ yyreduce:
(yyvsp[0].exval)
);
}
-#line 4367 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 4373 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 174:
-#line 2128 "fe/idl.ypp" /* yacc.c:1646 */
+ case 177:
+#line 2045 "fe/idl.ypp" /* yacc.c:1651 */
{
-// unary_expr : primary_expr | '+' primary_expr
(yyval.exval) =
idl_global->gen ()->create_expr (
AST_Expression::EC_u_plus,
@@ -4377,13 +4382,12 @@ yyreduce:
0
);
}
-#line 4381 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 4386 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 175:
-#line 2138 "fe/idl.ypp" /* yacc.c:1646 */
+ case 178:
+#line 2054 "fe/idl.ypp" /* yacc.c:1651 */
{
-// | '-' primary_expr
(yyval.exval) =
idl_global->gen()->create_expr (
AST_Expression::EC_u_minus,
@@ -4391,13 +4395,12 @@ yyreduce:
0
);
}
-#line 4395 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 4399 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 176:
-#line 2148 "fe/idl.ypp" /* yacc.c:1646 */
+ case 179:
+#line 2063 "fe/idl.ypp" /* yacc.c:1651 */
{
-// | '~' primary_expr
(yyval.exval) =
idl_global->gen()->create_expr (
AST_Expression::EC_bit_neg,
@@ -4405,26 +4408,29 @@ yyreduce:
0
);
}
-#line 4409 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 4412 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 177:
-#line 2161 "fe/idl.ypp" /* yacc.c:1646 */
+ case 180:
+#line 2075 "fe/idl.ypp" /* yacc.c:1651 */
{
-// 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).
*/
+ AST_Expression *expr = 0;
UTL_Scope *s = idl_global->scopes ().top_non_null ();
AST_Decl *d =
s->lookup_by_name ((yyvsp[0].idlist));
if (d == 0)
{
- idl_global->err ()->lookup_error ((yyvsp[0].idlist));
- return 1;
+ if (!idl_global->ignore_lookup_errors_)
+ {
+ idl_global->err ()->lookup_error ((yyvsp[0].idlist));
+ return 1;
+ }
}
else if (d->node_type () == AST_Decl::NT_const)
{
@@ -4440,8 +4446,7 @@ yyreduce:
AST_Constant *c =
AST_Constant::narrow_from_decl (d);
- (yyval.exval) =
- idl_global->gen ()->create_expr (
+ expr = idl_global->gen ()->create_expr (
c->constant_value (),
c->et ());
}
@@ -4451,126 +4456,119 @@ yyreduce:
// passed in this constructor, so we copy it
// and destroy it below no matter which case
// is followed.
- (yyval.exval) =
- idl_global->gen ()->create_expr (
+ expr = idl_global->gen ()->create_expr (
(yyvsp[0].idlist)->copy ());
+ if (d->node_type () == AST_Decl::NT_enum_val)
+ {
+ AST_EnumVal *enumval = AST_EnumVal::narrow_from_decl (d);
+ expr->enum_parent (enumval->enum_parent ());
+ }
}
+ (yyval.exval) = expr;
(yyvsp[0].idlist)->destroy ();
delete (yyvsp[0].idlist);
(yyvsp[0].idlist) = 0;
}
-#line 4464 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 4474 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 179:
-#line 2213 "fe/idl.ypp" /* yacc.c:1646 */
+ case 182:
+#line 2134 "fe/idl.ypp" /* yacc.c:1651 */
{
-// | literal
-// | '(' const_expr ')'
(yyval.exval) = (yyvsp[-1].exval);
}
-#line 4474 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 4482 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 180:
-#line 2222 "fe/idl.ypp" /* yacc.c:1646 */
+ case 183:
+#line 2141 "fe/idl.ypp" /* yacc.c:1651 */
{
-// literal : IDL_INTEGER_LITERAL
(yyval.exval) = idl_global->gen ()->create_expr ((yyvsp[0].ival));
}
-#line 4483 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 4490 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 181:
-#line 2227 "fe/idl.ypp" /* yacc.c:1646 */
+ case 184:
+#line 2145 "fe/idl.ypp" /* yacc.c:1651 */
{
-// | IDL_UINTEGER_LITERAL
(yyval.exval) =
idl_global->gen ()->create_expr ((yyvsp[0].uival));
}
-#line 4493 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 4499 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 182:
-#line 2233 "fe/idl.ypp" /* yacc.c:1646 */
+ case 185:
+#line 2150 "fe/idl.ypp" /* yacc.c:1651 */
{
-// | IDL_STRING_LITERAL
(yyval.exval) = idl_global->gen ()->create_expr ((yyvsp[0].sval));
(yyvsp[0].sval)->destroy ();
delete (yyvsp[0].sval);
(yyvsp[0].sval) = 0;
}
-#line 4505 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 4510 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 183:
-#line 2241 "fe/idl.ypp" /* yacc.c:1646 */
+ case 186:
+#line 2157 "fe/idl.ypp" /* yacc.c:1651 */
{
-// | IDL_WSTRING_LITERAL
(yyval.exval) = idl_global->gen ()->create_expr ((yyvsp[0].wsval));
}
-#line 4514 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 4518 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 184:
-#line 2246 "fe/idl.ypp" /* yacc.c:1646 */
+ case 187:
+#line 2161 "fe/idl.ypp" /* yacc.c:1651 */
{
-// | IDL_CHARACTER_LITERAL
(yyval.exval) = idl_global->gen ()->create_expr ((yyvsp[0].cval));
}
-#line 4523 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 4526 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 185:
-#line 2251 "fe/idl.ypp" /* yacc.c:1646 */
+ case 188:
+#line 2165 "fe/idl.ypp" /* yacc.c:1651 */
{
-// | IDL_WCHAR_LITERAL
ACE_OutputCDR::from_wchar wc ((yyvsp[0].wcval));
(yyval.exval) = idl_global->gen ()->create_expr (wc);
}
-#line 4533 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 4535 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 186:
-#line 2257 "fe/idl.ypp" /* yacc.c:1646 */
+ case 189:
+#line 2170 "fe/idl.ypp" /* yacc.c:1651 */
{
(yyval.exval) = idl_global->gen ()->create_expr ((yyvsp[0].fixval));
}
-#line 4541 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 4543 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 187:
-#line 2261 "fe/idl.ypp" /* yacc.c:1646 */
+ case 190:
+#line 2174 "fe/idl.ypp" /* yacc.c:1651 */
{
-// | IDL_FLOATING_PT_LITERAL
(yyval.exval) = idl_global->gen ()->create_expr ((yyvsp[0].dval));
}
-#line 4550 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 4551 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 188:
-#line 2266 "fe/idl.ypp" /* yacc.c:1646 */
+ case 191:
+#line 2178 "fe/idl.ypp" /* yacc.c:1651 */
{
-// | IDL_TRUETOK
(yyval.exval) = idl_global->gen ()->create_expr (true);
}
-#line 4559 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 4559 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 189:
-#line 2271 "fe/idl.ypp" /* yacc.c:1646 */
+ case 192:
+#line 2182 "fe/idl.ypp" /* yacc.c:1651 */
{
-// | IDL_FALSETOK
(yyval.exval) = idl_global->gen ()->create_expr (false);
}
-#line 4568 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 4567 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 190:
-#line 2279 "fe/idl.ypp" /* yacc.c:1646 */
+ case 193:
+#line 2189 "fe/idl.ypp" /* yacc.c:1651 */
{
-// positive_int_expr : const_expr
int good_expression = 1;
(yyvsp[0].exval)->evaluate (AST_Expression::EK_positive_int);
AST_Expression::AST_ExprValue *ev = (yyvsp[0].exval)->ev ();
@@ -4634,59 +4632,352 @@ yyreduce:
idl_global->err ()->syntax_error (idl_global->parse_state ());
}
}
-#line 4638 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 4636 "fe/idl.tab.cpp" /* yacc.c:1651 */
+ break;
+
+ case 194:
+#line 2257 "fe/idl.ypp" /* yacc.c:1651 */
+ {
+ if (idl_global->idl_version_ < IDL_VERSION_4)
+ {
+ idl_global->err ()->idl_version_error (
+ "Annotations are an IDL4 feature");
+ }
+
+ Identifier *id = (yyvsp[-1].idval);
+ UTL_ScopedName name (id, 0);
+ AST_Annotation_Decl::escape_name (&name);
+ AST_Annotation_Decl *annotation_decl = idl_global->gen ()->
+ create_annotation_decl (&name);
+ idl_global->scopes ().top_non_null ()->
+ fe_add_annotation_decl (annotation_decl);
+ idl_global->scopes ().push (annotation_decl);
+ }
+#line 4657 "fe/idl.tab.cpp" /* yacc.c:1651 */
+ break;
+
+ case 195:
+#line 2274 "fe/idl.ypp" /* yacc.c:1651 */
+ {
+ Identifier *id = (yyvsp[-4].idval);
+ idl_global->scopes ().pop ();
+ id->destroy ();
+ delete id;
+ }
+#line 4668 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
case 201:
-#line 2381 "fe/idl.ypp" /* yacc.c:1646 */
+#line 2292 "fe/idl.ypp" /* yacc.c:1651 */
{
-// type_dcl : IDL_TYPEDEF
idl_global->set_parse_state (IDL_GlobalData::PS_TypedefSeen);
idl_global->in_typedef (true);
}
-#line 4648 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 4677 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 202:
-#line 2387 "fe/idl.ypp" /* yacc.c:1646 */
+ case 205:
+#line 2306 "fe/idl.ypp" /* yacc.c:1651 */
{
-// type_declarator
- (yyval.dcval) = 0;
+ UTL_Scope *scope = idl_global->scopes ().top_non_null ();
+ UTL_Scope *root = idl_global->scopes ().bottom ();
+
+ AST_Expression::ExprType type = (yyvsp[-3].etval);
+ Identifier *name = (yyvsp[-2].idval);
+ UTL_ScopedName scoped_name (name, 0);
+ AST_Expression *default_value = (yyvsp[-1].exval);
+
+ AST_Decl * type_obj;
+ switch (type)
+ {
+ case AST_Expression::EV_string:
+ case AST_Expression::EV_wstring:
+ type_obj = tao_string_decl;
+ break;
+ case AST_Expression::EV_enum:
+ type_obj = tao_enum_constant_decl;
+ break;
+ default:
+ type_obj = root->lookup_primitive_type (type);
+ }
+
+ FE_Declarator *declarator = new FE_Declarator (
+ &scoped_name, FE_Declarator::FD_simple, 0);
+ AST_Annotation_Member *member = idl_global->gen ()->
+ create_annotation_member (
+ type, declarator->compose (type_obj), declarator->name ());
+ scope->fe_add_annotation_member (member);
+
+ if (default_value)
+ {
+ // Check if types are compatible, else report error
+ AST_Expression::AST_ExprValue *result =
+ default_value->check_and_coerce (type, tao_enum_constant_decl);
+ tao_enum_constant_decl = 0;
+ if (result)
+ {
+ member->value (default_value);
+ }
+ else
+ {
+ idl_global->err ()->coercion_error (default_value, type);
+ }
+ delete result;
+ }
}
-#line 4657 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 4729 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 203:
-#line 2392 "fe/idl.ypp" /* yacc.c:1646 */
+ case 206:
+#line 2357 "fe/idl.ypp" /* yacc.c:1651 */
{
-// | struct_type
- (yyval.dcval) = 0;
+ (yyval.exval) = (yyvsp[0].exval);
}
-#line 4666 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 4737 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 204:
-#line 2397 "fe/idl.ypp" /* yacc.c:1646 */
+ case 207:
+#line 2361 "fe/idl.ypp" /* yacc.c:1651 */
{
-// | union_type
- (yyval.dcval) = 0;
+ (yyval.exval) = 0;
}
-#line 4675 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 4745 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 205:
-#line 2402 "fe/idl.ypp" /* yacc.c:1646 */
+ case 208:
+#line 2368 "fe/idl.ypp" /* yacc.c:1651 */
{
-// | enum_type
- (yyval.dcval) = 0;
+ AST_Annotation_Appls *annotations = (yyvsp[-1].annotations_val);
+ AST_Annotation_Appl *annotation = (yyvsp[0].annotation_val);
+ if (annotation)
+ {
+ annotations->push_back (annotation);
+ }
+ (yyval.annotations_val) = annotations;
}
-#line 4684 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 4759 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 206:
-#line 2407 "fe/idl.ypp" /* yacc.c:1646 */
+ case 209:
+#line 2381 "fe/idl.ypp" /* yacc.c:1651 */
+ {
+ AST_Annotation_Appls *annotations = (yyvsp[-1].annotations_val);
+ AST_Annotation_Appl *annotation = (yyvsp[0].annotation_val);
+ if (annotation)
+ {
+ annotations->push_back (annotation);
+ }
+ (yyval.annotations_val) = annotations;
+ }
+#line 4773 "fe/idl.tab.cpp" /* yacc.c:1651 */
+ break;
+
+ case 210:
+#line 2391 "fe/idl.ypp" /* yacc.c:1651 */
+ {
+ (yyval.annotations_val) = new AST_Annotation_Appls ();
+ }
+#line 4781 "fe/idl.tab.cpp" /* yacc.c:1651 */
+ break;
+
+ case 211:
+#line 2398 "fe/idl.ypp" /* yacc.c:1651 */
+ {
+ if (idl_global->idl_version_ < IDL_VERSION_4)
+ {
+ idl_global->err ()->idl_version_error (
+ "Annotations are an IDL4 feature");
+ }
+
+ AST_Annotation_Decl *decl = 0;
+ UTL_ScopedName *name = (yyvsp[0].idlist);
+ AST_Annotation_Decl::escape_name (name);
+
+ // Check for Matching Annotation Declaration
+ AST_Decl *d = idl_global->scopes ().top_non_null ()->
+ lookup_by_name (name);
+ if (d)
+ {
+ decl = AST_Annotation_Decl::narrow_from_decl (d);
+ if (decl)
+ {
+ idl_global->scopes ().push (decl);
+ }
+ }
+ else
+ {
+ Identifier &id = *name->last_component ();
+ switch (idl_global->unknown_annotations_)
+ {
+ default:
+ case IDL_GlobalData::UNKNOWN_ANNOTATIONS_WARN_ONCE:
+ if (idl_global->unknown_annotations_seen_.insert (id) == 1)
+ {
+ break;
+ }
+ idl_global->err ()->lookup_warning (name);
+ break;
+ case IDL_GlobalData::UNKNOWN_ANNOTATIONS_WARN_ALL:
+ idl_global->err ()->lookup_warning (name);
+ break;
+ case IDL_GlobalData::UNKNOWN_ANNOTATIONS_ERROR:
+ idl_global->err ()->lookup_error (name);
+ break;
+ case IDL_GlobalData::UNKNOWN_ANNOTATIONS_IGNORE:
+ break;
+ }
+
+ // Ignore lookup errors for parameter values that might depend
+ // on constants or enums from the annotation declaration.
+ idl_global->ignore_lookup_errors_ = true;
+ }
+
+ (yyval.annotation_decl_val) = decl;
+ }
+#line 4838 "fe/idl.tab.cpp" /* yacc.c:1651 */
+ break;
+
+ case 212:
+#line 2451 "fe/idl.ypp" /* yacc.c:1651 */
+ {
+ idl_global->ignore_lookup_errors_ = false;
+ AST_Annotation_Appl *appl = 0;
+ UTL_ScopedName *name = (yyvsp[-2].idlist);
+ AST_Annotation_Decl *decl = (yyvsp[-1].annotation_decl_val);
+ AST_Annotation_Appl::Params *params = (yyvsp[0].annotation_params_val);
+
+ if (decl)
+ {
+ appl = idl_global->gen ()->create_annotation_appl (name, params);
+ appl->apply_from (decl);
+ idl_global->scopes ().pop ();
+ }
+
+ (yyval.annotation_val) = appl;
+ }
+#line 4859 "fe/idl.tab.cpp" /* yacc.c:1651 */
+ break;
+
+ case 213:
+#line 2471 "fe/idl.ypp" /* yacc.c:1651 */
+ {
+ (yyval.annotation_params_val) = (yyvsp[-1].annotation_params_val);
+ }
+#line 4867 "fe/idl.tab.cpp" /* yacc.c:1651 */
+ break;
+
+ case 214:
+#line 2475 "fe/idl.ypp" /* yacc.c:1651 */
+ {
+ (yyval.annotation_params_val) = 0;
+ }
+#line 4875 "fe/idl.tab.cpp" /* yacc.c:1651 */
+ break;
+
+ case 215:
+#line 2482 "fe/idl.ypp" /* yacc.c:1651 */
+ {
+ AST_Annotation_Appl::Params *params = new AST_Annotation_Appl::Params;
+ AST_Annotation_Appl::Param *param = new AST_Annotation_Appl::Param;
+ param->id = 0;
+ param->expr = (yyvsp[0].exval);
+ params->push (param);
+ (yyval.annotation_params_val) = params;
+ }
+#line 4888 "fe/idl.tab.cpp" /* yacc.c:1651 */
+ break;
+
+ case 216:
+#line 2491 "fe/idl.ypp" /* yacc.c:1651 */
+ {
+ (yyval.annotation_params_val) = (yyvsp[0].annotation_params_val);
+ }
+#line 4896 "fe/idl.tab.cpp" /* yacc.c:1651 */
+ break;
+
+ case 217:
+#line 2498 "fe/idl.ypp" /* yacc.c:1651 */
+ {
+ AST_Annotation_Appl::Params *params = (yyvsp[0].annotation_params_val);
+ params->push ((yyvsp[-1].annotation_param_val));
+ (yyval.annotation_params_val) = params;
+ }
+#line 4906 "fe/idl.tab.cpp" /* yacc.c:1651 */
+ break;
+
+ case 218:
+#line 2506 "fe/idl.ypp" /* yacc.c:1651 */
+ {
+ AST_Annotation_Appl::Params *params = (yyvsp[0].annotation_params_val);
+ params->push ((yyvsp[-1].annotation_param_val));
+ (yyval.annotation_params_val) = params;
+ }
+#line 4916 "fe/idl.tab.cpp" /* yacc.c:1651 */
+ break;
+
+ case 219:
+#line 2512 "fe/idl.ypp" /* yacc.c:1651 */
+ {
+ (yyval.annotation_params_val) = new AST_Annotation_Appl::Params;
+ }
+#line 4924 "fe/idl.tab.cpp" /* yacc.c:1651 */
+ break;
+
+ case 220:
+#line 2519 "fe/idl.ypp" /* yacc.c:1651 */
+ {
+ AST_Annotation_Appl::Param *param = new AST_Annotation_Appl::Param;
+ param->id = (yyvsp[-2].idval);
+ param->expr = (yyvsp[0].exval);
+ (yyval.annotation_param_val) = param;
+ }
+#line 4935 "fe/idl.tab.cpp" /* yacc.c:1651 */
+ break;
+
+ case 221:
+#line 2529 "fe/idl.ypp" /* yacc.c:1651 */
+ {
+ idl_global->set_parse_state (IDL_GlobalData::PS_TypedefSeen);
+ idl_global->in_typedef (true);
+ }
+#line 4944 "fe/idl.tab.cpp" /* yacc.c:1651 */
+ break;
+
+ case 222:
+#line 2534 "fe/idl.ypp" /* yacc.c:1651 */
+ {
+ (yyval.dcval) = (yyvsp[0].dcval);
+ }
+#line 4952 "fe/idl.tab.cpp" /* yacc.c:1651 */
+ break;
+
+ case 223:
+#line 2538 "fe/idl.ypp" /* yacc.c:1651 */
+ {
+ (yyval.dcval) = (yyvsp[0].dcval);
+ }
+#line 4960 "fe/idl.tab.cpp" /* yacc.c:1651 */
+ break;
+
+ case 224:
+#line 2542 "fe/idl.ypp" /* yacc.c:1651 */
+ {
+ (yyval.dcval) = (yyvsp[0].dcval);
+ }
+#line 4968 "fe/idl.tab.cpp" /* yacc.c:1651 */
+ break;
+
+ case 225:
+#line 2546 "fe/idl.ypp" /* yacc.c:1651 */
+ {
+ (yyval.dcval) = (yyvsp[0].dcval);
+ }
+#line 4976 "fe/idl.tab.cpp" /* yacc.c:1651 */
+ break;
+
+ case 226:
+#line 2550 "fe/idl.ypp" /* yacc.c:1651 */
{
-// | IDL_NATIVE simple_declarator
UTL_Scope *s = idl_global->scopes ().top_non_null ();
AST_Native *node = 0;
idl_global->set_parse_state (IDL_GlobalData::PS_NativeSeen);
@@ -4711,31 +5002,28 @@ yyreduce:
delete (yyvsp[0].deval);
(yyvsp[0].deval) = 0;
}
-#line 4715 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 5006 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 207:
-#line 2434 "fe/idl.ypp" /* yacc.c:1646 */
+ case 227:
+#line 2576 "fe/idl.ypp" /* yacc.c:1651 */
{
-// | constructed_forward_type_spec
(yyval.dcval) = 0;
}
-#line 4724 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 5014 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 208:
-#line 2442 "fe/idl.ypp" /* yacc.c:1646 */
+ case 228:
+#line 2583 "fe/idl.ypp" /* yacc.c:1651 */
{
-// type_declarator : type_spec
idl_global->set_parse_state (IDL_GlobalData::PS_TypeSpecSeen);
}
-#line 4733 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 5022 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 209:
-#line 2447 "fe/idl.ypp" /* yacc.c:1646 */
+ case 229:
+#line 2587 "fe/idl.ypp" /* yacc.c:1651 */
{
-// at_least_one_declarator
UTL_Scope *s = idl_global->scopes ().top_non_null ();
FE_Declarator *d = 0;
AST_Typedef *t = 0;
@@ -4796,27 +5084,26 @@ yyreduce:
delete (yyvsp[0].dlval);
(yyvsp[0].dlval) = 0;
}
+
+ (yyval.dcval) = t;
}
-#line 4801 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 5091 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 212:
-#line 2519 "fe/idl.ypp" /* yacc.c:1646 */
+ case 232:
+#line 2660 "fe/idl.ypp" /* yacc.c:1651 */
{
-// simple_type_spec : base_type_spec
(yyval.dcval) =
idl_global->scopes ().bottom ()->lookup_primitive_type (
(yyvsp[0].etval)
);
}
-#line 4813 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 5102 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 214:
-#line 2528 "fe/idl.ypp" /* yacc.c:1646 */
+ case 234:
+#line 2668 "fe/idl.ypp" /* yacc.c:1651 */
{
-// | template_type_spec
-// | scoped_name
UTL_Scope *s = idl_global->scopes ().top_non_null ();
AST_Decl *d = 0;
@@ -4838,34 +5125,31 @@ yyreduce:
(yyval.dcval) = d;
}
-#line 4842 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 5129 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 232:
-#line 2585 "fe/idl.ypp" /* yacc.c:1646 */
+ case 252:
+#line 2723 "fe/idl.ypp" /* yacc.c:1651 */
{
-// at_least_one_declarator : declarator declarators
ACE_NEW_RETURN ((yyval.dlval),
UTL_DeclList ((yyvsp[-1].deval),
(yyvsp[0].dlval)),
1);
}
-#line 4854 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 5140 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 233:
-#line 2597 "fe/idl.ypp" /* yacc.c:1646 */
+ case 253:
+#line 2734 "fe/idl.ypp" /* yacc.c:1651 */
{
-// declarators : declarators ','
idl_global->set_parse_state (IDL_GlobalData::PS_DeclsCommaSeen);
}
-#line 4863 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 5148 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 234:
-#line 2602 "fe/idl.ypp" /* yacc.c:1646 */
+ case 254:
+#line 2738 "fe/idl.ypp" /* yacc.c:1651 */
{
-// declarator
idl_global->set_parse_state (IDL_GlobalData::PS_DeclsDeclSeen);
UTL_DeclList *dl = 0;
@@ -4884,43 +5168,39 @@ yyreduce:
(yyval.dlval) = (yyvsp[-3].dlval);
}
}
-#line 4888 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 5172 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 235:
-#line 2623 "fe/idl.ypp" /* yacc.c:1646 */
+ case 255:
+#line 2758 "fe/idl.ypp" /* yacc.c:1651 */
{
-/* | EMPTY */
(yyval.dlval) = 0;
}
-#line 4897 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 5180 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 238:
-#line 2636 "fe/idl.ypp" /* yacc.c:1646 */
+ case 258:
+#line 2770 "fe/idl.ypp" /* yacc.c:1651 */
{
-// at_least_one_simple_declarator : simple_declarator simple_declarators
ACE_NEW_RETURN ((yyval.dlval),
UTL_DeclList ((yyvsp[-1].deval),
(yyvsp[0].dlval)),
1);
}
-#line 4909 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 5191 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 239:
-#line 2648 "fe/idl.ypp" /* yacc.c:1646 */
+ case 259:
+#line 2781 "fe/idl.ypp" /* yacc.c:1651 */
{
-// simple_declarators : simple_declarators ','
idl_global->set_parse_state (IDL_GlobalData::PS_DeclsCommaSeen);
}
-#line 4918 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 5199 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 240:
-#line 2653 "fe/idl.ypp" /* yacc.c:1646 */
+ case 260:
+#line 2785 "fe/idl.ypp" /* yacc.c:1651 */
{
-// simple_declarator
idl_global->set_parse_state (IDL_GlobalData::PS_DeclsDeclSeen);
UTL_DeclList *dl = 0;
@@ -4939,22 +5219,20 @@ yyreduce:
(yyval.dlval) = (yyvsp[-3].dlval);
}
}
-#line 4943 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 5223 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 241:
-#line 2674 "fe/idl.ypp" /* yacc.c:1646 */
+ case 261:
+#line 2805 "fe/idl.ypp" /* yacc.c:1651 */
{
-/* | EMPTY */
(yyval.dlval) = 0;
}
-#line 4952 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 5231 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 242:
-#line 2682 "fe/idl.ypp" /* yacc.c:1646 */
+ case 262:
+#line 2812 "fe/idl.ypp" /* yacc.c:1651 */
{
-// simple_declarator : defining_id
UTL_ScopedName *sn = 0;
ACE_NEW_RETURN (sn,
UTL_ScopedName ((yyvsp[0].idval),
@@ -4966,13 +5244,12 @@ yyreduce:
0),
1);
}
-#line 4970 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 5248 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 243:
-#line 2699 "fe/idl.ypp" /* yacc.c:1646 */
+ case 263:
+#line 2828 "fe/idl.ypp" /* yacc.c:1651 */
{
-// complex_declarator : array_declarator
UTL_ScopedName *sn = 0;
ACE_NEW_RETURN (sn,
UTL_ScopedName (
@@ -4986,179 +5263,159 @@ yyreduce:
(yyvsp[0].dcval)),
1);
}
-#line 4990 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 5267 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 246:
-#line 2723 "fe/idl.ypp" /* yacc.c:1646 */
+ case 266:
+#line 2851 "fe/idl.ypp" /* yacc.c:1651 */
{
-// signed_int : IDL_LONG
(yyval.etval) = AST_Expression::EV_long;
}
-#line 4999 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 5275 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 247:
-#line 2728 "fe/idl.ypp" /* yacc.c:1646 */
+ case 267:
+#line 2855 "fe/idl.ypp" /* yacc.c:1651 */
{
-// | IDL_LONG IDL_LONG
(yyval.etval) = AST_Expression::EV_longlong;
}
-#line 5008 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 5283 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 248:
-#line 2733 "fe/idl.ypp" /* yacc.c:1646 */
+ case 268:
+#line 2859 "fe/idl.ypp" /* yacc.c:1651 */
{
-// | IDL_SHORT
(yyval.etval) = AST_Expression::EV_short;
}
-#line 5017 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 5291 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 249:
-#line 2741 "fe/idl.ypp" /* yacc.c:1646 */
+ case 269:
+#line 2866 "fe/idl.ypp" /* yacc.c:1651 */
{
-// unsigned_int : IDL_UNSIGNED IDL_LONG
(yyval.etval) = AST_Expression::EV_ulong;
}
-#line 5026 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 5299 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 250:
-#line 2746 "fe/idl.ypp" /* yacc.c:1646 */
+ case 270:
+#line 2870 "fe/idl.ypp" /* yacc.c:1651 */
{
-// | IDL_UNSIGNED IDL_LONG IDL_LONG
(yyval.etval) = AST_Expression::EV_ulonglong;
}
-#line 5035 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 5307 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 251:
-#line 2751 "fe/idl.ypp" /* yacc.c:1646 */
+ case 271:
+#line 2874 "fe/idl.ypp" /* yacc.c:1651 */
{
-// | IDL_UNSIGNED IDL_SHORT
(yyval.etval) = AST_Expression::EV_ushort;
}
-#line 5044 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 5315 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 252:
-#line 2759 "fe/idl.ypp" /* yacc.c:1646 */
+ case 272:
+#line 2881 "fe/idl.ypp" /* yacc.c:1651 */
{
-// floating_pt_type : IDL_DOUBLE
(yyval.etval) = AST_Expression::EV_double;
}
-#line 5053 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 5323 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 253:
-#line 2764 "fe/idl.ypp" /* yacc.c:1646 */
+ case 273:
+#line 2885 "fe/idl.ypp" /* yacc.c:1651 */
{
-// | IDL_FLOAT
(yyval.etval) = AST_Expression::EV_float;
}
-#line 5062 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 5331 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 254:
-#line 2769 "fe/idl.ypp" /* yacc.c:1646 */
+ case 274:
+#line 2889 "fe/idl.ypp" /* yacc.c:1651 */
{
-// | IDL_LONG IDL_DOUBLE
(yyval.etval) = AST_Expression::EV_longdouble;
}
-#line 5071 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 5339 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 255:
-#line 2777 "fe/idl.ypp" /* yacc.c:1646 */
+ case 275:
+#line 2896 "fe/idl.ypp" /* yacc.c:1651 */
{
-// fixed_type : IDL_FIXED
(yyval.etval) = AST_Expression::EV_fixed;
}
-#line 5080 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 5347 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 256:
-#line 2785 "fe/idl.ypp" /* yacc.c:1646 */
+ case 276:
+#line 2903 "fe/idl.ypp" /* yacc.c:1651 */
{
-// char_type : IDL_CHAR
(yyval.etval) = AST_Expression::EV_char;
}
-#line 5089 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 5355 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 257:
-#line 2790 "fe/idl.ypp" /* yacc.c:1646 */
+ case 277:
+#line 2907 "fe/idl.ypp" /* yacc.c:1651 */
{
-// | IDL_WCHAR
(yyval.etval) = AST_Expression::EV_wchar;
}
-#line 5098 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 5363 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 258:
-#line 2798 "fe/idl.ypp" /* yacc.c:1646 */
+ case 278:
+#line 2914 "fe/idl.ypp" /* yacc.c:1651 */
{
-// octet_type : IDL_OCTET
(yyval.etval) = AST_Expression::EV_octet;
}
-#line 5107 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 5371 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 259:
-#line 2806 "fe/idl.ypp" /* yacc.c:1646 */
+ case 279:
+#line 2921 "fe/idl.ypp" /* yacc.c:1651 */
{
-// boolean_type : IDL_BOOLEAN
(yyval.etval) = AST_Expression::EV_bool;
}
-#line 5116 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 5379 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 260:
-#line 2814 "fe/idl.ypp" /* yacc.c:1646 */
+ case 280:
+#line 2928 "fe/idl.ypp" /* yacc.c:1651 */
{
-// any_type : IDL_ANY
(yyval.etval) = AST_Expression::EV_any;
}
-#line 5125 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 5387 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 261:
-#line 2822 "fe/idl.ypp" /* yacc.c:1646 */
+ case 281:
+#line 2935 "fe/idl.ypp" /* yacc.c:1651 */
{
-// object_type : IDL_OBJECT
(yyval.etval) = AST_Expression::EV_object;
}
-#line 5134 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 5395 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 262:
-#line 2830 "fe/idl.ypp" /* yacc.c:1646 */
+ case 282:
+#line 2942 "fe/idl.ypp" /* yacc.c:1651 */
{
-// struct_decl : IDL_STRUCT
idl_global->set_parse_state (IDL_GlobalData::PS_StructSeen);
}
-#line 5143 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 5403 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 263:
-#line 2835 "fe/idl.ypp" /* yacc.c:1646 */
+ case 283:
+#line 2946 "fe/idl.ypp" /* yacc.c:1651 */
{
-// defining_id
idl_global->set_parse_state (IDL_GlobalData::PS_StructIDSeen);
(yyval.idval) = (yyvsp[0].idval);
}
-#line 5153 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 5412 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 264:
-#line 2845 "fe/idl.ypp" /* yacc.c:1646 */
+ case 284:
+#line 2955 "fe/idl.ypp" /* yacc.c:1651 */
{
-// struct_type : struct_header
UTL_Scope *s = idl_global->scopes ().top_non_null ();
- UTL_ScopedName n ((yyvsp[0].idval),
- 0);
+ UTL_ScopedName n ((yyvsp[0].idval), 0);
AST_Structure *d = 0;
/*
@@ -5173,8 +5430,7 @@ yyreduce:
s->is_local (),
s->is_abstract ()
);
- AST_Structure::fwd_redefinition_helper (d,
- s);
+ AST_Structure::fwd_redefinition_helper (d, s);
(void) s->fe_add_structure (d);
}
@@ -5187,31 +5443,28 @@ yyreduce:
delete (yyvsp[0].idval);
(yyvsp[0].idval) = 0;
}
-#line 5191 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 5447 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 265:
-#line 2879 "fe/idl.ypp" /* yacc.c:1646 */
+ case 285:
+#line 2986 "fe/idl.ypp" /* yacc.c:1651 */
{
-// '{'
idl_global->set_parse_state (IDL_GlobalData::PS_StructSqSeen);
}
-#line 5200 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 5455 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 266:
-#line 2884 "fe/idl.ypp" /* yacc.c:1646 */
+ case 286:
+#line 2990 "fe/idl.ypp" /* yacc.c:1651 */
{
-// at_least_one_member
idl_global->set_parse_state (IDL_GlobalData::PS_StructBodySeen);
}
-#line 5209 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 5463 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 267:
-#line 2889 "fe/idl.ypp" /* yacc.c:1646 */
+ case 287:
+#line 2994 "fe/idl.ypp" /* yacc.c:1651 */
{
-// '}'
idl_global->set_parse_state (IDL_GlobalData::PS_StructQsSeen);
/*
@@ -5222,45 +5475,57 @@ yyreduce:
);
idl_global->scopes ().pop ();
}
-#line 5226 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 5479 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 271:
-#line 2911 "fe/idl.ypp" /* yacc.c:1646 */
+ case 291:
+#line 3015 "fe/idl.ypp" /* yacc.c:1651 */
{
-// member :
/* is $0 to member_i */
(yyval.vival) = AST_Field::vis_NA;
}
-#line 5236 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 5488 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 273:
-#line 2922 "fe/idl.ypp" /* yacc.c:1646 */
+ case 292:
+#line 3020 "fe/idl.ypp" /* yacc.c:1651 */
+ {
+ if ((yyvsp[0].decls_val))
+ {
+ AST_Decls & decls = *(yyvsp[0].decls_val);
+ for (size_t i = 0; i < decls.size (); i++)
+ {
+ decls[i]->annotation_appls ((yyvsp[-1].annotations_val));
+ }
+ }
+ }
+#line 5503 "fe/idl.tab.cpp" /* yacc.c:1651 */
+ break;
+
+ case 293:
+#line 3034 "fe/idl.ypp" /* yacc.c:1651 */
{
-// member_i : type_spec
idl_global->set_parse_state (IDL_GlobalData::PS_MemberTypeSeen);
}
-#line 5245 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 5511 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 274:
-#line 2927 "fe/idl.ypp" /* yacc.c:1646 */
+ case 294:
+#line 3038 "fe/idl.ypp" /* yacc.c:1651 */
{
-// at_least_one_declarator
idl_global->set_parse_state (IDL_GlobalData::PS_MemberDeclsSeen);
}
-#line 5254 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 5519 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 275:
-#line 2932 "fe/idl.ypp" /* yacc.c:1646 */
+ case 295:
+#line 3042 "fe/idl.ypp" /* yacc.c:1651 */
{
-// ';'
UTL_Scope *s = idl_global->scopes ().top_non_null ();
FE_Declarator *d = 0;
AST_Field *f = 0;
idl_global->set_parse_state (IDL_GlobalData::PS_MemberDeclsCompleted);
+ AST_Decls *members = 0;
/*
* Check for illegal recursive use of type.
@@ -5275,10 +5540,9 @@ yyreduce:
* Create a node representing a struct or exception member
* Add it to the enclosing scope.
*/
- else if (s != 0
- && (yyvsp[-4].dcval) != 0
- && (yyvsp[-2].dlval) != 0)
+ else if (s && (yyvsp[-4].dcval) && (yyvsp[-2].dlval))
{
+ members = new AST_Decls;
for (UTL_DecllistActiveIterator l ((yyvsp[-2].dlval));
!l.is_done ();
l.next ())
@@ -5302,8 +5566,9 @@ yyreduce:
idl_global->gen ()->create_field (
tp,
d->name (),
- (yyvsp[-6].vival)
+ (yyvsp[-5].vival)
);
+ members->push_back (f);
(void) s->fe_add_field (f);
}
}
@@ -5311,64 +5576,59 @@ yyreduce:
(yyvsp[-2].dlval)->destroy ();
delete (yyvsp[-2].dlval);
(yyvsp[-2].dlval) = 0;
+
+ (yyval.decls_val) = members;
}
-#line 5316 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 5583 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 276:
-#line 2990 "fe/idl.ypp" /* yacc.c:1646 */
+ case 296:
+#line 3102 "fe/idl.ypp" /* yacc.c:1651 */
{
-// | error
idl_global->err()->syntax_error (idl_global->parse_state ());
}
-#line 5325 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 5591 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 277:
-#line 2995 "fe/idl.ypp" /* yacc.c:1646 */
+ case 297:
+#line 3106 "fe/idl.ypp" /* yacc.c:1651 */
{
-// ';'
idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
yyerrok;
}
-#line 5335 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 5600 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 278:
-#line 3004 "fe/idl.ypp" /* yacc.c:1646 */
+ case 298:
+#line 3114 "fe/idl.ypp" /* yacc.c:1651 */
{
-// union_decl : IDL_UNION
idl_global->set_parse_state (IDL_GlobalData::PS_UnionSeen);
}
-#line 5344 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 5608 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 279:
-#line 3009 "fe/idl.ypp" /* yacc.c:1646 */
+ case 299:
+#line 3118 "fe/idl.ypp" /* yacc.c:1651 */
{
-// defining_id
idl_global->set_parse_state (IDL_GlobalData::PS_UnionIDSeen);
(yyval.idval) = (yyvsp[0].idval);
}
-#line 5354 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 5617 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 280:
-#line 3018 "fe/idl.ypp" /* yacc.c:1646 */
+ case 300:
+#line 3126 "fe/idl.ypp" /* yacc.c:1651 */
{
-// union_type : union_decl IDL_SWITCH
idl_global->set_parse_state (IDL_GlobalData::PS_SwitchSeen);
}
-#line 5363 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 5625 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 281:
-#line 3023 "fe/idl.ypp" /* yacc.c:1646 */
+ case 301:
+#line 3130 "fe/idl.ypp" /* yacc.c:1651 */
{
-// '('
UTL_Scope *s = idl_global->scopes ().top_non_null ();
- UTL_ScopedName n ((yyvsp[-3].idval),
- 0);
+ UTL_ScopedName n ((yyvsp[-3].idval), 0);
AST_Union *u = 0;
idl_global->set_parse_state (IDL_GlobalData::PS_SwitchOpenParSeen);
@@ -5384,8 +5644,7 @@ yyreduce:
s->is_abstract ());
AST_Structure *st = AST_Structure::narrow_from_decl (u);
- AST_Structure::fwd_redefinition_helper (st,
- s);
+ AST_Structure::fwd_redefinition_helper (st, s);
u = AST_Union::narrow_from_decl (st);
(void) s->fe_add_union (u);
}
@@ -5399,22 +5658,20 @@ yyreduce:
* Don't delete $1 yet; we'll need it a bit later.
*/
}
-#line 5403 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 5662 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 282:
-#line 3059 "fe/idl.ypp" /* yacc.c:1646 */
+ case 302:
+#line 3163 "fe/idl.ypp" /* yacc.c:1651 */
{
-// switch_type_spec
idl_global->set_parse_state (IDL_GlobalData::PS_SwitchTypeSeen);
}
-#line 5412 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 5670 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 283:
-#line 3064 "fe/idl.ypp" /* yacc.c:1646 */
+ case 303:
+#line 3167 "fe/idl.ypp" /* yacc.c:1651 */
{
-// ')'
/*
* The top of the scopes must be an empty union we added after we
* encountered 'union <id> switch ('. Now we are ready to add a
@@ -5425,15 +5682,13 @@ yyreduce:
idl_global->scopes ().pop ();
UTL_Scope *s = idl_global->scopes ().top_non_null ();
- UTL_ScopedName n ((yyvsp[-7].idval),
- 0);
+ UTL_ScopedName n ((yyvsp[-8].idval), 0);
idl_global->set_parse_state (IDL_GlobalData::PS_SwitchCloseParSeen);
/*
* Create a node representing a union.
*/
- if ((yyvsp[-2].dcval) != 0
- && s != 0)
+ if ((yyvsp[-2].dcval) != 0 && s != 0)
{
AST_ConcreteType *tp =
AST_ConcreteType::narrow_from_decl ((yyvsp[-2].dcval));
@@ -5450,10 +5705,12 @@ yyreduce:
&n,
s->is_local (),
s->is_abstract ());
+
/* Narrow the enclosing scope. */
AST_Union *e = AST_Union::narrow_from_scope (top);
e->redefine (u);
+ e->disc_annotations ((yyvsp[-3].annotations_val)); // Set Discriminator Annotations
u->destroy ();
delete u;
@@ -5465,35 +5722,32 @@ yyreduce:
*/
idl_global->scopes ().push (top);
- (yyvsp[-7].idval)->destroy ();
- delete (yyvsp[-7].idval);
- (yyvsp[-7].idval) = 0;
+ (yyvsp[-8].idval)->destroy ();
+ delete (yyvsp[-8].idval);
+ (yyvsp[-8].idval) = 0;
}
-#line 5473 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 5730 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 284:
-#line 3121 "fe/idl.ypp" /* yacc.c:1646 */
+ case 304:
+#line 3223 "fe/idl.ypp" /* yacc.c:1651 */
{
-// '{'
idl_global->set_parse_state (IDL_GlobalData::PS_UnionSqSeen);
}
-#line 5482 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 5738 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 285:
-#line 3126 "fe/idl.ypp" /* yacc.c:1646 */
+ case 305:
+#line 3227 "fe/idl.ypp" /* yacc.c:1651 */
{
-// at_least_one_case_branch
idl_global->set_parse_state (IDL_GlobalData::PS_UnionBodySeen);
}
-#line 5491 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 5746 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 286:
-#line 3131 "fe/idl.ypp" /* yacc.c:1646 */
+ case 306:
+#line 3231 "fe/idl.ypp" /* yacc.c:1651 */
{
-// '}'
idl_global->set_parse_state (IDL_GlobalData::PS_UnionQsSeen);
/*
@@ -5508,25 +5762,23 @@ yyreduce:
idl_global->scopes ().pop ();
}
}
-#line 5512 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 5766 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 287:
-#line 3151 "fe/idl.ypp" /* yacc.c:1646 */
+ case 307:
+#line 3250 "fe/idl.ypp" /* yacc.c:1651 */
{
-// switch_type_spec : integer_type
(yyval.dcval) =
idl_global->scopes ().bottom ()->lookup_primitive_type (
(yyvsp[0].etval)
);
}
-#line 5524 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 5777 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 288:
-#line 3159 "fe/idl.ypp" /* yacc.c:1646 */
+ case 308:
+#line 3257 "fe/idl.ypp" /* yacc.c:1651 */
{
-// | char_type
/* wchars are not allowed. */
if ((yyvsp[0].etval) == AST_Expression::EV_wchar)
{
@@ -5538,13 +5790,12 @@ yyreduce:
(yyvsp[0].etval)
);
}
-#line 5542 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 5794 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 289:
-#line 3173 "fe/idl.ypp" /* yacc.c:1646 */
+ case 309:
+#line 3270 "fe/idl.ypp" /* yacc.c:1651 */
{
-// | octet_type
/* octets are not allowed. */
idl_global->err ()->error0 (UTL_Error::EIDL_DISC_TYPE);
(yyval.dcval) =
@@ -5552,26 +5803,23 @@ yyreduce:
(yyvsp[0].etval)
);
}
-#line 5556 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 5807 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 290:
-#line 3183 "fe/idl.ypp" /* yacc.c:1646 */
+ case 310:
+#line 3279 "fe/idl.ypp" /* yacc.c:1651 */
{
-// | boolean_type
(yyval.dcval) =
idl_global->scopes ().bottom ()->lookup_primitive_type (
(yyvsp[0].etval)
);
}
-#line 5568 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 5818 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 292:
-#line 3192 "fe/idl.ypp" /* yacc.c:1646 */
+ case 312:
+#line 3287 "fe/idl.ypp" /* yacc.c:1651 */
{
-// | enum_type
-// | scoped_name
UTL_Scope *s = idl_global->scopes ().top_non_null ();
AST_Decl *d = 0;
AST_PredefinedType *p = 0;
@@ -5667,38 +5915,38 @@ yyreduce:
(yyvsp[0].idlist) = 0;
/* If we don't return here, we'll crash later.*/
- return 1;
+ if (!idl_global->ignore_lookup_errors_)
+ {
+ return 1;
+ }
}
(yyvsp[0].idlist)->destroy ();
delete (yyvsp[0].idlist);
(yyvsp[0].idlist) = 0;
}
-#line 5678 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 5929 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 296:
-#line 3308 "fe/idl.ypp" /* yacc.c:1646 */
+ case 316:
+#line 3404 "fe/idl.ypp" /* yacc.c:1651 */
{
-// case_branch : at_least_one_case_label
idl_global->set_parse_state (IDL_GlobalData::PS_UnionLabelSeen);
}
-#line 5687 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 5937 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 297:
-#line 3313 "fe/idl.ypp" /* yacc.c:1646 */
+ case 317:
+#line 3408 "fe/idl.ypp" /* yacc.c:1651 */
{
-// annotations element_spec
idl_global->set_parse_state (IDL_GlobalData::PS_UnionElemSeen);
}
-#line 5696 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 5945 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 298:
-#line 3318 "fe/idl.ypp" /* yacc.c:1646 */
+ case 318:
+#line 3412 "fe/idl.ypp" /* yacc.c:1651 */
{
-// ';'
UTL_Scope *s = idl_global->scopes ().top_non_null ();
AST_UnionBranch *b = 0;
AST_Field *f = (yyvsp[-2].ffval);
@@ -5708,9 +5956,7 @@ yyreduce:
* Create several nodes representing branches of a union.
* Add them to the enclosing scope (the union scope)
*/
- if (s != 0
- && (yyvsp[-5].llval) != 0
- && (yyvsp[-2].ffval) != 0)
+ if (s != 0 && (yyvsp[-5].llval) != 0 && (yyvsp[-2].ffval) != 0)
{
b =
idl_global->gen ()->create_union_branch (
@@ -5718,6 +5964,7 @@ yyreduce:
f->field_type (),
f->name ()
);
+ b->annotation_appls ((yyvsp[-3].annotations_val));
(void) s->fe_add_union_branch (b);
// f has passed its field type to the union branch,
@@ -5727,85 +5974,78 @@ yyreduce:
f = 0;
}
}
-#line 5731 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 5978 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 299:
-#line 3349 "fe/idl.ypp" /* yacc.c:1646 */
+ case 319:
+#line 3441 "fe/idl.ypp" /* yacc.c:1651 */
{
-// | error
idl_global->err()->syntax_error (idl_global->parse_state());
}
-#line 5740 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 5986 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 300:
-#line 3354 "fe/idl.ypp" /* yacc.c:1646 */
+ case 320:
+#line 3445 "fe/idl.ypp" /* yacc.c:1651 */
{
-// ';'
idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
yyerrok;
}
-#line 5750 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 5995 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 301:
-#line 3363 "fe/idl.ypp" /* yacc.c:1646 */
+ case 321:
+#line 3453 "fe/idl.ypp" /* yacc.c:1651 */
{
-// at_least_one_case_label : case_label case_labels
ACE_NEW_RETURN ((yyval.llval),
UTL_LabelList ((yyvsp[-1].ulval),
(yyvsp[0].llval)),
1);
}
-#line 5762 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 6006 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 302:
-#line 3374 "fe/idl.ypp" /* yacc.c:1646 */
+ case 322:
+#line 3463 "fe/idl.ypp" /* yacc.c:1651 */
{
-// case_labels : case_labels annotations case_label
UTL_LabelList *ll = 0;
ACE_NEW_RETURN (ll,
UTL_LabelList ((yyvsp[0].ulval),
0),
1);
- if ((yyvsp[-2].llval) == 0)
+ if ((yyvsp[-1].llval) == 0)
{
(yyval.llval) = ll;
}
else
{
- (yyvsp[-2].llval)->nconc (ll);
- (yyval.llval) = (yyvsp[-2].llval);
+ (yyvsp[-1].llval)->nconc (ll);
+ (yyval.llval) = (yyvsp[-1].llval);
}
}
-#line 5785 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 6028 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 303:
-#line 3393 "fe/idl.ypp" /* yacc.c:1646 */
+ case 323:
+#line 3481 "fe/idl.ypp" /* yacc.c:1651 */
{
-/* | EMPTY */
(yyval.llval) = 0;
}
-#line 5794 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 6036 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 304:
-#line 3401 "fe/idl.ypp" /* yacc.c:1646 */
+ case 324:
+#line 3488 "fe/idl.ypp" /* yacc.c:1651 */
{
-// case_label : IDL_DEFAULT
idl_global->set_parse_state (IDL_GlobalData::PS_DefaultSeen);
}
-#line 5803 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 6044 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 305:
-#line 3406 "fe/idl.ypp" /* yacc.c:1646 */
+ case 325:
+#line 3492 "fe/idl.ypp" /* yacc.c:1651 */
{
-// ':'
idl_global->set_parse_state (IDL_GlobalData::PS_LabelColonSeen);
(yyval.ulval) = idl_global->gen ()->create_union_label (
@@ -5813,30 +6053,28 @@ yyreduce:
0
);
}
-#line 5817 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 6057 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 306:
-#line 3416 "fe/idl.ypp" /* yacc.c:1646 */
+ case 326:
+#line 3501 "fe/idl.ypp" /* yacc.c:1651 */
{
-// | IDL_CASE
idl_global->set_parse_state (IDL_GlobalData::PS_CaseSeen);
}
-#line 5826 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 6065 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 307:
-#line 3421 "fe/idl.ypp" /* yacc.c:1646 */
+ case 327:
+#line 3505 "fe/idl.ypp" /* yacc.c:1651 */
{
idl_global->set_parse_state (IDL_GlobalData::PS_LabelExprSeen);
}
-#line 5834 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 6073 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 308:
-#line 3425 "fe/idl.ypp" /* yacc.c:1646 */
+ case 328:
+#line 3509 "fe/idl.ypp" /* yacc.c:1651 */
{
-// const_expr
idl_global->set_parse_state (IDL_GlobalData::PS_LabelColonSeen);
(yyval.ulval) = idl_global->gen()->create_union_label (
@@ -5844,22 +6082,20 @@ yyreduce:
(yyvsp[-2].exval)
);
}
-#line 5848 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 6086 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 309:
-#line 3438 "fe/idl.ypp" /* yacc.c:1646 */
+ case 329:
+#line 3521 "fe/idl.ypp" /* yacc.c:1651 */
{
-// element_spec : type_spec
idl_global->set_parse_state (IDL_GlobalData::PS_UnionElemTypeSeen);
}
-#line 5857 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 6094 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 310:
-#line 3443 "fe/idl.ypp" /* yacc.c:1646 */
+ case 330:
+#line 3525 "fe/idl.ypp" /* yacc.c:1651 */
{
-// declarator
idl_global->set_parse_state (IDL_GlobalData::PS_UnionElemDeclSeen);
/*
@@ -5902,13 +6138,12 @@ yyreduce:
(yyvsp[0].deval) = 0;
}
}
-#line 5906 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 6142 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 311:
-#line 3491 "fe/idl.ypp" /* yacc.c:1646 */
+ case 331:
+#line 3572 "fe/idl.ypp" /* yacc.c:1651 */
{
-// struct_forward_type : struct_decl
UTL_Scope *s = idl_global->scopes ().top_non_null ();
UTL_ScopedName n ((yyvsp[0].idval),
0);
@@ -5926,14 +6161,15 @@ yyreduce:
(yyvsp[0].idval)->destroy ();
delete (yyvsp[0].idval);
(yyvsp[0].idval) = 0;
+
+ (yyval.dcval) = d;
}
-#line 5931 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 6168 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 312:
-#line 3515 "fe/idl.ypp" /* yacc.c:1646 */
+ case 332:
+#line 3597 "fe/idl.ypp" /* yacc.c:1651 */
{
-// union_forward_type : union_decl
UTL_Scope *s = idl_global->scopes ().top_non_null ();
UTL_ScopedName n ((yyvsp[0].idval),
0);
@@ -5952,25 +6188,22 @@ yyreduce:
delete (yyvsp[0].idval);
(yyvsp[0].idval) = 0;
}
-#line 5956 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 6192 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 313:
-#line 3539 "fe/idl.ypp" /* yacc.c:1646 */
+ case 333:
+#line 3620 "fe/idl.ypp" /* yacc.c:1651 */
{
-// enum_type : IDL_ENUM
idl_global->set_parse_state (IDL_GlobalData::PS_EnumSeen);
}
-#line 5965 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 6200 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 314:
-#line 3544 "fe/idl.ypp" /* yacc.c:1646 */
+ case 334:
+#line 3624 "fe/idl.ypp" /* yacc.c:1651 */
{
-// defining_id
UTL_Scope *s = idl_global->scopes ().top_non_null ();
- UTL_ScopedName n ((yyvsp[0].idval),
- 0);
+ UTL_ScopedName n ((yyvsp[0].idval), 0);
AST_Enum *e = 0;
idl_global->set_parse_state (IDL_GlobalData::PS_EnumIDSeen);
@@ -5998,31 +6231,28 @@ yyreduce:
delete (yyvsp[0].idval);
(yyvsp[0].idval) = 0;
}
-#line 6002 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 6235 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 315:
-#line 3577 "fe/idl.ypp" /* yacc.c:1646 */
+ case 335:
+#line 3655 "fe/idl.ypp" /* yacc.c:1651 */
{
-// '{'
idl_global->set_parse_state (IDL_GlobalData::PS_EnumSqSeen);
}
-#line 6011 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 6243 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 316:
-#line 3582 "fe/idl.ypp" /* yacc.c:1646 */
+ case 336:
+#line 3659 "fe/idl.ypp" /* yacc.c:1651 */
{
-// at_least_one_enumerator
idl_global->set_parse_state (IDL_GlobalData::PS_EnumBodySeen);
}
-#line 6020 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 6251 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 317:
-#line 3587 "fe/idl.ypp" /* yacc.c:1646 */
+ case 337:
+#line 3663 "fe/idl.ypp" /* yacc.c:1651 */
{
-// '}'
idl_global->set_parse_state (IDL_GlobalData::PS_EnumQsSeen);
/*
@@ -6040,28 +6270,25 @@ yyreduce:
idl_global->scopes ().pop ();
}
}
-#line 6044 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 6274 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 319:
-#line 3613 "fe/idl.ypp" /* yacc.c:1646 */
+ case 339:
+#line 3688 "fe/idl.ypp" /* yacc.c:1651 */
{
-// enumerators : enumerators ','
idl_global->set_parse_state (IDL_GlobalData::PS_EnumCommaSeen);
}
-#line 6053 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 6282 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 322:
-#line 3623 "fe/idl.ypp" /* yacc.c:1646 */
+ case 342:
+#line 3697 "fe/idl.ypp" /* yacc.c:1651 */
{
-// enumerator : annotations IDENTIFIER
UTL_Scope *s = idl_global->scopes ().top_non_null ();
Identifier id ((yyvsp[0].strval));
ACE::strdelete ((yyvsp[0].strval));
(yyvsp[0].strval) = 0;
- UTL_ScopedName n (&id,
- 0);
+ UTL_ScopedName n (&id, 0);
AST_EnumVal *e = 0;
AST_Enum *c = 0;
@@ -6080,38 +6307,48 @@ yyreduce:
c->next_enum_val (),
&n
);
+ e->enum_parent (c);
+ e->annotation_appls ((yyvsp[-1].annotations_val));
}
(void) s->fe_add_enum_val (e);
}
}
-#line 6089 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 6318 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 323:
-#line 3659 "fe/idl.ypp" /* yacc.c:1646 */
+ case 343:
+#line 3733 "fe/idl.ypp" /* yacc.c:1651 */
{
-// sequence_type_spec : seq_head ','
idl_global->set_parse_state (IDL_GlobalData::PS_SequenceCommaSeen);
}
-#line 6098 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 6326 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 324:
-#line 3664 "fe/idl.ypp" /* yacc.c:1646 */
+ case 344:
+#line 3737 "fe/idl.ypp" /* yacc.c:1651 */
{
-// positive_int_expr
idl_global->set_parse_state (IDL_GlobalData::PS_SequenceExprSeen);
}
-#line 6107 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 6334 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 325:
-#line 3669 "fe/idl.ypp" /* yacc.c:1646 */
+ case 345:
+#line 3741 "fe/idl.ypp" /* yacc.c:1651 */
{
-// '>'
idl_global->set_parse_state (IDL_GlobalData::PS_SequenceQsSeen);
+ AST_Sequence *seq = 0;
+ Decl_Annotations_Pair *seq_head = (yyvsp[-5].decl_annotations_pair_val);
+ AST_Decl *type = 0;
+ AST_Annotation_Appls *type_annotations = 0;
+ if (seq_head)
+ {
+ type = seq_head->decl;
+ type_annotations = seq_head->annotations;
+ }
+ delete seq_head;
+
/*
* Remove sequence marker from scopes stack.
*/
@@ -6144,15 +6381,10 @@ yyreduce:
{
idl_global->err ()->coercion_error ((yyvsp[-2].exval),
AST_Expression::EV_ulong);
- (yyval.dcval) = 0;
}
- else if (0 == (yyvsp[-5].dcval))
+ else if (type)
{
- (yyval.dcval) = 0;
- }
- else
- {
- AST_Type *tp = AST_Type::narrow_from_decl ((yyvsp[-5].dcval));
+ AST_Type *tp = AST_Type::narrow_from_decl (type);
if (0 == tp)
{
@@ -6164,7 +6396,7 @@ yyreduce:
UTL_ScopedName sn (&id,
0);
- (yyval.dcval) =
+ seq =
idl_global->gen ()->create_sequence (
(yyvsp[-2].exval),
tp,
@@ -6172,6 +6404,7 @@ yyreduce:
s->is_local (),
s->is_abstract ()
);
+ seq->base_type_annotations (type_annotations);
if (!idl_global->in_typedef ()
&& !idl_global->anon_silent ())
@@ -6183,16 +6416,27 @@ yyreduce:
delete ev;
ev = 0;
+ (yyval.dcval) = seq;
}
-#line 6188 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 6422 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 326:
-#line 3747 "fe/idl.ypp" /* yacc.c:1646 */
+ case 346:
+#line 3826 "fe/idl.ypp" /* yacc.c:1651 */
{
-// | seq_head '>'
idl_global->set_parse_state (IDL_GlobalData::PS_SequenceQsSeen);
+ AST_Sequence *seq = 0;
+ Decl_Annotations_Pair *seq_head = (yyvsp[-1].decl_annotations_pair_val);
+ AST_Decl *type = 0;
+ AST_Annotation_Appls *type_annotations = 0;
+ if (seq_head)
+ {
+ type = seq_head->decl;
+ type_annotations = seq_head->annotations;
+ }
+ delete seq_head;
+
/*
* Remove sequence marker from scopes stack.
*/
@@ -6206,13 +6450,9 @@ yyreduce:
/*
* Create a node representing a sequence.
*/
- if ((yyvsp[-1].dcval) == 0)
+ if (type)
{
- (yyval.dcval) = 0;
- }
- else
- {
- AST_Type *tp = AST_Type::narrow_from_decl ((yyvsp[-1].dcval));
+ AST_Type *tp = AST_Type::narrow_from_decl (type);
if (tp == 0)
{
@@ -6224,7 +6464,7 @@ yyreduce:
UTL_ScopedName sn (&id, 0);
ACE_CDR::ULong bound = 0UL;
- (yyval.dcval) =
+ seq =
idl_global->gen ()->create_sequence (
idl_global->gen ()->create_expr (
bound,
@@ -6235,6 +6475,7 @@ yyreduce:
s->is_local (),
s->is_abstract ()
);
+ seq->base_type_annotations (type_annotations);
if (!idl_global->in_typedef ()
&& !idl_global->anon_silent ())
@@ -6243,14 +6484,15 @@ yyreduce:
}
}
}
+
+ (yyval.dcval) = seq;
}
-#line 6248 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 6491 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 327:
-#line 3806 "fe/idl.ypp" /* yacc.c:1646 */
+ case 347:
+#line 3894 "fe/idl.ypp" /* yacc.c:1651 */
{
-// seq_head : IDL_SEQUENCE
idl_global->set_parse_state (IDL_GlobalData::PS_SequenceSeen);
/*
@@ -6258,59 +6500,57 @@ yyreduce:
*/
idl_global->scopes ().push (0);
}
-#line 6262 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 6504 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 328:
-#line 3816 "fe/idl.ypp" /* yacc.c:1646 */
+ case 348:
+#line 3903 "fe/idl.ypp" /* yacc.c:1651 */
{
-// '<'
idl_global->set_parse_state (IDL_GlobalData::PS_SequenceSqSeen);
}
-#line 6271 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 6512 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 329:
-#line 3821 "fe/idl.ypp" /* yacc.c:1646 */
+ case 349:
+#line 3907 "fe/idl.ypp" /* yacc.c:1651 */
{
-// simple_type_spec
idl_global->set_parse_state (IDL_GlobalData::PS_SequenceTypeSeen);
- (yyval.dcval) = (yyvsp[0].dcval);
+ Decl_Annotations_Pair *seq_head = new Decl_Annotations_Pair;
+ seq_head->decl = (yyvsp[0].dcval);
+ seq_head->annotations = (yyvsp[-1].annotations_val);
+ (yyval.decl_annotations_pair_val) = seq_head;
}
-#line 6281 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 6524 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 330:
-#line 3830 "fe/idl.ypp" /* yacc.c:1646 */
+ case 350:
+#line 3918 "fe/idl.ypp" /* yacc.c:1651 */
{
(yyvsp[-1].exval)->evaluate (AST_Expression::EK_positive_int);
(yyval.dcval) = idl_global->gen ()->create_fixed ((yyvsp[-3].exval), (yyvsp[-1].exval));
}
-#line 6290 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 6533 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 331:
-#line 3839 "fe/idl.ypp" /* yacc.c:1646 */
+ case 351:
+#line 3927 "fe/idl.ypp" /* yacc.c:1651 */
{
-// string_type_spec : string_head '<'
idl_global->set_parse_state (IDL_GlobalData::PS_StringSqSeen);
}
-#line 6299 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 6541 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 332:
-#line 3844 "fe/idl.ypp" /* yacc.c:1646 */
+ case 352:
+#line 3931 "fe/idl.ypp" /* yacc.c:1651 */
{
-// positive_int_expr
idl_global->set_parse_state (IDL_GlobalData::PS_StringExprSeen);
}
-#line 6308 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 6549 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 333:
-#line 3849 "fe/idl.ypp" /* yacc.c:1646 */
+ case 353:
+#line 3935 "fe/idl.ypp" /* yacc.c:1651 */
{
-// '>'
idl_global->set_parse_state (IDL_GlobalData::PS_StringQsSeen);
/*
@@ -6331,87 +6571,83 @@ yyreduce:
}
else
{
- (yyval.dcval) = idl_global->gen ()->create_string ((yyvsp[-2].exval));
+ tao_string_decl = 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)
- )
- );
+ idl_global->root ()->fe_add_string (
+ AST_String::narrow_from_decl (
+ tao_string_decl));
- if (!idl_global->in_typedef ()
- && !idl_global->anon_silent ())
+ if (!idl_global->in_typedef () && !idl_global->anon_silent ())
{
idl_global->err ()->anonymous_type_diagnostic ();
}
+
+ (yyval.dcval) = tao_string_decl;
}
delete ev;
ev = 0;
}
-#line 6355 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 6595 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 334:
-#line 3892 "fe/idl.ypp" /* yacc.c:1646 */
+ case 354:
+#line 3977 "fe/idl.ypp" /* yacc.c:1651 */
{
-// | string_head
idl_global->set_parse_state (IDL_GlobalData::PS_StringCompleted);
+
/*
* Create a node representing a string.
*/
ACE_CDR::ULong bound = 0UL;
-
- (yyval.dcval) =
+ tao_string_decl =
idl_global->gen ()->create_string (
idl_global->gen ()->create_expr (bound,
AST_Expression::EV_ulong)
);
+
/*
* 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)
- )
- );
+ idl_global->root ()->fe_add_string (
+ AST_String::narrow_from_decl (
+ tao_string_decl));
+
+ (yyval.dcval) = tao_string_decl;
}
-#line 6382 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 6622 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 335:
-#line 3918 "fe/idl.ypp" /* yacc.c:1646 */
+ case 355:
+#line 4003 "fe/idl.ypp" /* yacc.c:1651 */
{
-// string_head : IDL_STRING
idl_global->set_parse_state (IDL_GlobalData::PS_StringSeen);
}
-#line 6391 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 6630 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 336:
-#line 3927 "fe/idl.ypp" /* yacc.c:1646 */
+ case 356:
+#line 4011 "fe/idl.ypp" /* yacc.c:1651 */
{
-// wstring_type_spec : wstring_head '<'
idl_global->set_parse_state (IDL_GlobalData::PS_StringSqSeen);
}
-#line 6400 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 6638 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 337:
-#line 3932 "fe/idl.ypp" /* yacc.c:1646 */
+ case 357:
+#line 4015 "fe/idl.ypp" /* yacc.c:1651 */
{
-// positive_int_expr
idl_global->set_parse_state (IDL_GlobalData::PS_StringExprSeen);
}
-#line 6409 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 6646 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 338:
-#line 3937 "fe/idl.ypp" /* yacc.c:1646 */
+ case 358:
+#line 4019 "fe/idl.ypp" /* yacc.c:1651 */
{
-// '>'
idl_global->set_parse_state (IDL_GlobalData::PS_StringQsSeen);
/*
@@ -6426,94 +6662,94 @@ yyreduce:
}
else
{
- (yyval.dcval) = idl_global->gen ()->create_wstring ((yyvsp[-2].exval));
+ AST_String *string = 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))
- );
+ idl_global->root ()->fe_add_string (
+ AST_String::narrow_from_decl (
+ string));
- if (!idl_global->in_typedef ()
- && !idl_global->anon_silent ())
+ if (!idl_global->in_typedef () && !idl_global->anon_silent ())
{
idl_global->err ()->anonymous_type_diagnostic ();
}
+
+ (yyval.dcval) = string;
}
}
-#line 6445 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 6683 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 339:
-#line 3969 "fe/idl.ypp" /* yacc.c:1646 */
+ case 359:
+#line 4052 "fe/idl.ypp" /* yacc.c:1651 */
{
-// | wstring_head
idl_global->set_parse_state (IDL_GlobalData::PS_StringCompleted);
/*
* Create a node representing a wstring.
*/
ACE_CDR::ULong bound = 0UL;
-
- (yyval.dcval) =
+ AST_String *string =
idl_global->gen ()->create_wstring (
idl_global->gen ()->create_expr (bound,
AST_Expression::EV_ulong)
);
+
/*
* 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))
- );
+ idl_global->root ()->fe_add_string (
+ AST_String::narrow_from_decl (
+ string));
+
+ (yyval.dcval) = string;
}
-#line 6471 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 6710 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 340:
-#line 3994 "fe/idl.ypp" /* yacc.c:1646 */
+ case 360:
+#line 4078 "fe/idl.ypp" /* yacc.c:1651 */
{
-// wstring_head : IDL_WSTRING
idl_global->set_parse_state (IDL_GlobalData::PS_StringSeen);
}
-#line 6480 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 6718 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 341:
-#line 4002 "fe/idl.ypp" /* yacc.c:1646 */
+ case 361:
+#line 4085 "fe/idl.ypp" /* yacc.c:1651 */
{
-// array_declarator : defining_id
idl_global->set_parse_state (IDL_GlobalData::PS_ArrayIDSeen);
}
-#line 6489 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 6726 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 342:
-#line 4007 "fe/idl.ypp" /* yacc.c:1646 */
+ case 362:
+#line 4089 "fe/idl.ypp" /* yacc.c:1651 */
{
-// at_least_one_array_dim
idl_global->set_parse_state (IDL_GlobalData::PS_ArrayCompleted);
+ AST_Array *array = 0;
+ AST_Annotation_Appls *base_type_annotations = (yyvsp[-1].annotations_val);
+ UTL_ExprList *array_dims = (yyvsp[0].elval);
+
/*
* Create a node representing an array.
*/
- if ((yyvsp[0].elval) != 0)
+ if (array_dims)
{
- UTL_ScopedName sn ((yyvsp[-2].idval),
+ UTL_ScopedName sn ((yyvsp[-3].idval),
0);
- (yyval.dcval) =
+ array =
idl_global->gen ()->create_array (
&sn,
- (yyvsp[0].elval)->length (),
- (yyvsp[0].elval),
+ array_dims->length (),
+ array_dims,
0,
0
);
-
- (yyvsp[0].elval)->destroy ();
- delete (yyvsp[0].elval);
- (yyvsp[0].elval) = 0;
-
+ array->base_type_annotations (base_type_annotations);
sn.destroy ();
if (!idl_global->in_typedef ()
@@ -6522,26 +6758,29 @@ yyreduce:
idl_global->err ()->anonymous_type_diagnostic ();
}
}
+
+ array_dims->destroy ();
+ delete array_dims;
+
+ (yyval.dcval) = array;
}
-#line 6527 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 6768 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 343:
-#line 4044 "fe/idl.ypp" /* yacc.c:1646 */
+ case 363:
+#line 4130 "fe/idl.ypp" /* yacc.c:1651 */
{
-// at_least_one_array_dim : array_dim array_dims
ACE_NEW_RETURN ((yyval.elval),
UTL_ExprList ((yyvsp[-1].exval),
(yyvsp[0].elval)),
1);
}
-#line 6539 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 6779 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 344:
-#line 4055 "fe/idl.ypp" /* yacc.c:1646 */
+ case 364:
+#line 4140 "fe/idl.ypp" /* yacc.c:1651 */
{
-// array_dims : array_dims array_dim
UTL_ExprList *el = 0;
ACE_NEW_RETURN (el,
UTL_ExprList ((yyvsp[0].exval),
@@ -6558,40 +6797,36 @@ yyreduce:
(yyval.elval) = (yyvsp[-1].elval);
}
}
-#line 6562 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 6801 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 345:
-#line 4074 "fe/idl.ypp" /* yacc.c:1646 */
+ case 365:
+#line 4158 "fe/idl.ypp" /* yacc.c:1651 */
{
-/* | EMPTY */
(yyval.elval) = 0;
}
-#line 6571 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 6809 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 346:
-#line 4082 "fe/idl.ypp" /* yacc.c:1646 */
+ case 366:
+#line 4165 "fe/idl.ypp" /* yacc.c:1651 */
{
-// array_dim : '['
idl_global->set_parse_state (IDL_GlobalData::PS_DimSqSeen);
}
-#line 6580 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 6817 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 347:
-#line 4087 "fe/idl.ypp" /* yacc.c:1646 */
+ case 367:
+#line 4169 "fe/idl.ypp" /* yacc.c:1651 */
{
-// positive_int_expr
idl_global->set_parse_state (IDL_GlobalData::PS_DimExprSeen);
}
-#line 6589 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 6825 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 348:
-#line 4092 "fe/idl.ypp" /* yacc.c:1646 */
+ case 368:
+#line 4173 "fe/idl.ypp" /* yacc.c:1651 */
{
-// ']'
idl_global->set_parse_state (IDL_GlobalData::PS_DimQsSeen);
/*
@@ -6644,49 +6879,44 @@ yyreduce:
delete ev;
ev = 0;
}
-#line 6648 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 6883 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 351:
-#line 4155 "fe/idl.ypp" /* yacc.c:1646 */
+ case 371:
+#line 4235 "fe/idl.ypp" /* yacc.c:1651 */
{
-// attribute_readonly : IDL_READONLY
idl_global->set_parse_state (IDL_GlobalData::PS_AttrROSeen);
}
-#line 6657 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 6891 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 352:
-#line 4160 "fe/idl.ypp" /* yacc.c:1646 */
+ case 372:
+#line 4239 "fe/idl.ypp" /* yacc.c:1651 */
{
-// IDL_ATTRIBUTE
idl_global->set_parse_state (IDL_GlobalData::PS_AttrSeen);
}
-#line 6666 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 6899 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 353:
-#line 4165 "fe/idl.ypp" /* yacc.c:1646 */
+ case 373:
+#line 4243 "fe/idl.ypp" /* yacc.c:1651 */
{
-// param_type_spec
idl_global->set_parse_state (IDL_GlobalData::PS_AttrTypeSeen);
}
-#line 6675 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 6907 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 354:
-#line 4170 "fe/idl.ypp" /* yacc.c:1646 */
+ case 374:
+#line 4247 "fe/idl.ypp" /* yacc.c:1651 */
{
-// at_least_one_simple_declarator
idl_global->set_parse_state (IDL_GlobalData::PS_AttrDeclsSeen);
}
-#line 6684 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 6915 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 355:
-#line 4175 "fe/idl.ypp" /* yacc.c:1646 */
+ case 375:
+#line 4251 "fe/idl.ypp" /* yacc.c:1651 */
{
-// opt_raises
UTL_Scope *s = idl_global->scopes ().top_non_null ();
AST_Attribute *a = 0;
FE_Declarator *d = 0;
@@ -6745,49 +6975,44 @@ yyreduce:
delete (yyvsp[-2].dlval);
(yyvsp[-2].dlval) = 0;
}
-#line 6749 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 6979 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 356:
-#line 4239 "fe/idl.ypp" /* yacc.c:1646 */
+ case 376:
+#line 4314 "fe/idl.ypp" /* yacc.c:1651 */
{
-// attribute_readwrite : IDL_ATTRIBUTE
idl_global->set_parse_state (IDL_GlobalData::PS_AttrSeen);
}
-#line 6758 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 6987 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 357:
-#line 4244 "fe/idl.ypp" /* yacc.c:1646 */
+ case 377:
+#line 4318 "fe/idl.ypp" /* yacc.c:1651 */
{
-// param_type_spec
idl_global->set_parse_state (IDL_GlobalData::PS_AttrTypeSeen);
}
-#line 6767 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 6995 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 358:
-#line 4249 "fe/idl.ypp" /* yacc.c:1646 */
+ case 378:
+#line 4322 "fe/idl.ypp" /* yacc.c:1651 */
{
-// at_least_one_simple_declarator
idl_global->set_parse_state (IDL_GlobalData::PS_AttrDeclsSeen);
}
-#line 6776 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 7003 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 359:
-#line 4254 "fe/idl.ypp" /* yacc.c:1646 */
+ case 379:
+#line 4326 "fe/idl.ypp" /* yacc.c:1651 */
{
-// opt_getraises
idl_global->set_parse_state (IDL_GlobalData::PS_OpGetRaiseCompleted);
}
-#line 6785 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 7011 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 360:
-#line 4259 "fe/idl.ypp" /* yacc.c:1646 */
+ case 380:
+#line 4330 "fe/idl.ypp" /* yacc.c:1651 */
{
-// opt_setraises
UTL_Scope *s = idl_global->scopes ().top_non_null ();
AST_Attribute *a = 0;
FE_Declarator *d = 0;
@@ -6855,22 +7080,20 @@ yyreduce:
delete (yyvsp[-4].dlval);
(yyvsp[-4].dlval) = 0;
}
-#line 6859 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 7084 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 361:
-#line 4332 "fe/idl.ypp" /* yacc.c:1646 */
+ case 381:
+#line 4402 "fe/idl.ypp" /* yacc.c:1651 */
{
-// exception : IDL_EXCEPTION
idl_global->set_parse_state (IDL_GlobalData::PS_ExceptSeen);
}
-#line 6868 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 7092 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 362:
-#line 4337 "fe/idl.ypp" /* yacc.c:1646 */
+ case 382:
+#line 4406 "fe/idl.ypp" /* yacc.c:1651 */
{
-// defining_id
UTL_Scope *s = idl_global->scopes ().top_non_null ();
UTL_ScopedName n ((yyvsp[0].idval),
0);
@@ -6898,53 +7121,48 @@ yyreduce:
delete (yyvsp[0].idval);
(yyvsp[0].idval) = 0;
}
-#line 6902 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 7125 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 363:
-#line 4367 "fe/idl.ypp" /* yacc.c:1646 */
+ case 383:
+#line 4435 "fe/idl.ypp" /* yacc.c:1651 */
{
-// '{'
idl_global->set_parse_state (IDL_GlobalData::PS_ExceptSqSeen);
}
-#line 6911 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 7133 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 364:
-#line 4372 "fe/idl.ypp" /* yacc.c:1646 */
+ case 384:
+#line 4439 "fe/idl.ypp" /* yacc.c:1651 */
{
-// members
idl_global->set_parse_state (IDL_GlobalData::PS_ExceptBodySeen);
}
-#line 6920 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 7141 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 365:
-#line 4377 "fe/idl.ypp" /* yacc.c:1646 */
+ case 385:
+#line 4443 "fe/idl.ypp" /* yacc.c:1651 */
{
-// '}'
idl_global->set_parse_state (IDL_GlobalData::PS_ExceptQsSeen);
/*
* Done with this exception. Pop its scope from the scope stack.
*/
idl_global->scopes ().pop ();
}
-#line 6933 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 7153 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 366:
-#line 4390 "fe/idl.ypp" /* yacc.c:1646 */
+ case 386:
+#line 4455 "fe/idl.ypp" /* yacc.c:1651 */
{
-// operation : opt_op_attribute op_type_spec
idl_global->set_parse_state (IDL_GlobalData::PS_OpTypeSeen);
}
-#line 6942 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 7161 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 367:
-#line 4395 "fe/idl.ypp" /* yacc.c:1646 */
+ case 387:
+#line 4459 "fe/idl.ypp" /* yacc.c:1651 */
{
-// annotations IDENTIFIER
UTL_Scope *s = idl_global->scopes ().top_non_null ();
Identifier id ((yyvsp[0].strval));
ACE::strdelete ((yyvsp[0].strval));
@@ -7007,31 +7225,28 @@ yyreduce:
*/
idl_global->scopes ().push (o);
}
-#line 7011 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 7229 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 368:
-#line 4460 "fe/idl.ypp" /* yacc.c:1646 */
+ case 388:
+#line 4523 "fe/idl.ypp" /* yacc.c:1651 */
{
-// parameter_list
idl_global->set_parse_state (IDL_GlobalData::PS_OpParsCompleted);
}
-#line 7020 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 7237 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 369:
-#line 4465 "fe/idl.ypp" /* yacc.c:1646 */
+ case 389:
+#line 4527 "fe/idl.ypp" /* yacc.c:1651 */
{
-// opt_raises
idl_global->set_parse_state (IDL_GlobalData::PS_OpRaiseCompleted);
}
-#line 7029 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 7245 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 370:
-#line 4470 "fe/idl.ypp" /* yacc.c:1646 */
+ case 390:
+#line 4531 "fe/idl.ypp" /* yacc.c:1651 */
{
-// opt_context
UTL_Scope *s = idl_global->scopes ().top_non_null ();
AST_Operation *o = 0;
idl_global->set_parse_state (IDL_GlobalData::PS_OpCompleted);
@@ -7059,64 +7274,58 @@ yyreduce:
*/
idl_global->scopes ().pop ();
}
-#line 7063 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 7278 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 371:
-#line 4503 "fe/idl.ypp" /* yacc.c:1646 */
+ case 391:
+#line 4563 "fe/idl.ypp" /* yacc.c:1651 */
{
-// opt_op_attribute : IDL_ONEWAY
idl_global->set_parse_state (IDL_GlobalData::PS_OpAttrSeen);
(yyval.ofval) = AST_Operation::OP_oneway;
}
-#line 7073 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 7287 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 372:
-#line 4509 "fe/idl.ypp" /* yacc.c:1646 */
+ case 392:
+#line 4568 "fe/idl.ypp" /* yacc.c:1651 */
{
-// | IDL_IDEMPOTENT
idl_global->set_parse_state (IDL_GlobalData::PS_OpAttrSeen);
(yyval.ofval) = AST_Operation::OP_idempotent;
}
-#line 7083 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 7296 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 373:
-#line 4515 "fe/idl.ypp" /* yacc.c:1646 */
+ case 393:
+#line 4573 "fe/idl.ypp" /* yacc.c:1651 */
{
-/* | EMPTY */
(yyval.ofval) = AST_Operation::OP_noflags;
}
-#line 7092 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 7304 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 375:
-#line 4524 "fe/idl.ypp" /* yacc.c:1646 */
+ case 395:
+#line 4581 "fe/idl.ypp" /* yacc.c:1651 */
{
-// op_type_spec : param_type_spec | IDL_VOID
(yyval.dcval) =
idl_global->scopes ().bottom ()->lookup_primitive_type (
AST_Expression::EV_void
);
}
-#line 7104 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 7315 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 376:
-#line 4535 "fe/idl.ypp" /* yacc.c:1646 */
+ case 396:
+#line 4591 "fe/idl.ypp" /* yacc.c:1651 */
{
-// init_decl : IDL_FACTORY
//@@ PS_FactorySeen?
idl_global->set_parse_state (IDL_GlobalData::PS_OpTypeSeen);
}
-#line 7114 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 7324 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 377:
-#line 4541 "fe/idl.ypp" /* yacc.c:1646 */
+ case 397:
+#line 4596 "fe/idl.ypp" /* yacc.c:1651 */
{
-// annotations IDENTIFIER
UTL_Scope *s = idl_global->scopes ().top_non_null ();
if (s->is_abstract ())
@@ -7156,22 +7365,20 @@ yyreduce:
*/
idl_global->scopes ().push (factory);
}
-#line 7160 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 7369 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 378:
-#line 4583 "fe/idl.ypp" /* yacc.c:1646 */
+ case 398:
+#line 4637 "fe/idl.ypp" /* yacc.c:1651 */
{
-// init_parameter_list
idl_global->set_parse_state (IDL_GlobalData::PS_OpParsCompleted);
}
-#line 7169 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 7377 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 379:
-#line 4588 "fe/idl.ypp" /* yacc.c:1646 */
+ case 399:
+#line 4641 "fe/idl.ypp" /* yacc.c:1651 */
{
-// opt_raises
idl_global->set_parse_state (IDL_GlobalData::PS_OpRaiseCompleted);
if ((yyvsp[0].nlval) != 0)
@@ -7183,76 +7390,68 @@ yyreduce:
idl_global->scopes ().pop ();
}
-#line 7187 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 7394 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 380:
-#line 4605 "fe/idl.ypp" /* yacc.c:1646 */
+ case 400:
+#line 4657 "fe/idl.ypp" /* yacc.c:1651 */
{
-// init_parameter_list : '('
idl_global->set_parse_state (IDL_GlobalData::PS_OpSqSeen);
}
-#line 7196 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 7402 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 381:
-#line 4610 "fe/idl.ypp" /* yacc.c:1646 */
+ case 401:
+#line 4661 "fe/idl.ypp" /* yacc.c:1651 */
{
-// ')'
idl_global->set_parse_state (IDL_GlobalData::PS_OpQsSeen);
}
-#line 7205 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 7410 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 382:
-#line 4615 "fe/idl.ypp" /* yacc.c:1646 */
+ case 402:
+#line 4665 "fe/idl.ypp" /* yacc.c:1651 */
{
-// | '('
idl_global->set_parse_state (IDL_GlobalData::PS_OpSqSeen);
}
-#line 7214 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 7418 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 383:
-#line 4621 "fe/idl.ypp" /* yacc.c:1646 */
+ case 403:
+#line 4670 "fe/idl.ypp" /* yacc.c:1651 */
{
-// at_least_one_in_parameter ')'
idl_global->set_parse_state (IDL_GlobalData::PS_OpQsSeen);
}
-#line 7223 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 7426 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 385:
-#line 4632 "fe/idl.ypp" /* yacc.c:1646 */
+ case 405:
+#line 4680 "fe/idl.ypp" /* yacc.c:1651 */
{
-// in_parameters : in_parameters ','
idl_global->set_parse_state (IDL_GlobalData::PS_OpParCommaSeen);
}
-#line 7232 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 7434 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 388:
-#line 4642 "fe/idl.ypp" /* yacc.c:1646 */
+ case 408:
+#line 4689 "fe/idl.ypp" /* yacc.c:1651 */
{
-// in_parameter : IDL_IN
idl_global->set_parse_state (IDL_GlobalData::PS_OpParDirSeen);
}
-#line 7241 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 7442 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 389:
-#line 4647 "fe/idl.ypp" /* yacc.c:1646 */
+ case 409:
+#line 4693 "fe/idl.ypp" /* yacc.c:1651 */
{
-// param_type_spec
idl_global->set_parse_state (IDL_GlobalData::PS_OpParTypeSeen);
}
-#line 7250 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 7450 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 390:
-#line 4652 "fe/idl.ypp" /* yacc.c:1646 */
+ case 410:
+#line 4697 "fe/idl.ypp" /* yacc.c:1651 */
{
-// declarator
UTL_Scope *s = idl_global->scopes ().top_non_null ();
AST_Argument *a = 0;
idl_global->set_parse_state (IDL_GlobalData::PS_OpParDeclSeen);
@@ -7283,76 +7482,68 @@ yyreduce:
delete (yyvsp[0].deval);
(yyvsp[0].deval) = 0;
}
-#line 7287 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 7486 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 391:
-#line 4688 "fe/idl.ypp" /* yacc.c:1646 */
+ case 411:
+#line 4732 "fe/idl.ypp" /* yacc.c:1651 */
{
-// parameter_list : '('
idl_global->set_parse_state (IDL_GlobalData::PS_OpSqSeen);
}
-#line 7296 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 7494 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 392:
-#line 4693 "fe/idl.ypp" /* yacc.c:1646 */
+ case 412:
+#line 4736 "fe/idl.ypp" /* yacc.c:1651 */
{
-// ')'
idl_global->set_parse_state (IDL_GlobalData::PS_OpQsSeen);
}
-#line 7305 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 7502 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 393:
-#line 4698 "fe/idl.ypp" /* yacc.c:1646 */
+ case 413:
+#line 4740 "fe/idl.ypp" /* yacc.c:1651 */
{
-// | '('
idl_global->set_parse_state (IDL_GlobalData::PS_OpSqSeen);
}
-#line 7314 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 7510 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 394:
-#line 4704 "fe/idl.ypp" /* yacc.c:1646 */
+ case 414:
+#line 4745 "fe/idl.ypp" /* yacc.c:1651 */
{
-// at_least_one_parameter ')'
idl_global->set_parse_state (IDL_GlobalData::PS_OpQsSeen);
}
-#line 7323 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 7518 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 396:
-#line 4715 "fe/idl.ypp" /* yacc.c:1646 */
+ case 416:
+#line 4755 "fe/idl.ypp" /* yacc.c:1651 */
{
-// parameters : parameters ','
idl_global->set_parse_state (IDL_GlobalData::PS_OpParCommaSeen);
}
-#line 7332 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 7526 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 399:
-#line 4725 "fe/idl.ypp" /* yacc.c:1646 */
+ case 419:
+#line 4764 "fe/idl.ypp" /* yacc.c:1651 */
{
-// parameter : direction
idl_global->set_parse_state (IDL_GlobalData::PS_OpParDirSeen);
}
-#line 7341 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 7534 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 400:
-#line 4730 "fe/idl.ypp" /* yacc.c:1646 */
+ case 420:
+#line 4768 "fe/idl.ypp" /* yacc.c:1651 */
{
-// param_type_spec
idl_global->set_parse_state (IDL_GlobalData::PS_OpParTypeSeen);
}
-#line 7350 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 7542 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 401:
-#line 4735 "fe/idl.ypp" /* yacc.c:1646 */
+ case 421:
+#line 4772 "fe/idl.ypp" /* yacc.c:1651 */
{
-// declarator
UTL_Scope *s = idl_global->scopes ().top_non_null ();
AST_Argument *a = 0;
idl_global->set_parse_state (IDL_GlobalData::PS_OpParDeclSeen);
@@ -7390,27 +7581,23 @@ yyreduce:
delete (yyvsp[0].deval);
(yyvsp[0].deval) = 0;
}
-#line 7394 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 7585 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 402:
-#line 4778 "fe/idl.ypp" /* yacc.c:1646 */
+ case 422:
+#line 4814 "fe/idl.ypp" /* yacc.c:1651 */
{
-// param_type_spec : base_type_spec
(yyval.dcval) =
idl_global->scopes ().bottom ()->lookup_primitive_type (
(yyvsp[0].etval)
);
}
-#line 7406 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 7596 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 405:
-#line 4788 "fe/idl.ypp" /* yacc.c:1646 */
+ case 425:
+#line 4823 "fe/idl.ypp" /* yacc.c:1651 */
{
-// | string_type_spec
-// | wstring_type_spec
-// | scoped_name
UTL_Scope *s = idl_global->scopes ().top_non_null ();
AST_Decl *d = 0;
UTL_ScopedName *n = (yyvsp[0].idlist);
@@ -7513,209 +7700,187 @@ yyreduce:
(yyval.dcval) = d;
}
-#line 7517 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 7704 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 406:
-#line 4898 "fe/idl.ypp" /* yacc.c:1646 */
+ case 426:
+#line 4930 "fe/idl.ypp" /* yacc.c:1651 */
{
-// direction : IDL_IN
(yyval.dival) = AST_Argument::dir_IN;
}
-#line 7526 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 7712 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 407:
-#line 4903 "fe/idl.ypp" /* yacc.c:1646 */
+ case 427:
+#line 4934 "fe/idl.ypp" /* yacc.c:1651 */
{
-// | IDL_OUT
(yyval.dival) = AST_Argument::dir_OUT;
}
-#line 7535 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 7720 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 408:
-#line 4908 "fe/idl.ypp" /* yacc.c:1646 */
+ case 428:
+#line 4938 "fe/idl.ypp" /* yacc.c:1651 */
{
-// | IDL_INOUT
(yyval.dival) = AST_Argument::dir_INOUT;
}
-#line 7544 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 7728 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 409:
-#line 4916 "fe/idl.ypp" /* yacc.c:1646 */
+ case 429:
+#line 4945 "fe/idl.ypp" /* yacc.c:1651 */
{
-// opt_raises : IDL_RAISES
idl_global->set_parse_state (IDL_GlobalData::PS_OpRaiseSeen);
}
-#line 7553 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 7736 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 410:
-#line 4921 "fe/idl.ypp" /* yacc.c:1646 */
+ case 430:
+#line 4949 "fe/idl.ypp" /* yacc.c:1651 */
{
-// '('
idl_global->set_parse_state (IDL_GlobalData::PS_OpRaiseSqSeen);
}
-#line 7562 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 7744 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 411:
-#line 4927 "fe/idl.ypp" /* yacc.c:1646 */
+ case 431:
+#line 4954 "fe/idl.ypp" /* yacc.c:1651 */
{
-// at_least_one_scoped_name ')'
idl_global->set_parse_state (IDL_GlobalData::PS_OpRaiseQsSeen);
(yyval.nlval) = (yyvsp[-1].nlval);
}
-#line 7572 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 7753 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 412:
-#line 4933 "fe/idl.ypp" /* yacc.c:1646 */
+ case 432:
+#line 4959 "fe/idl.ypp" /* yacc.c:1651 */
{
(yyval.nlval) = 0;
-/* | EMPTY */
}
-#line 7581 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 7761 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 413:
-#line 4941 "fe/idl.ypp" /* yacc.c:1646 */
+ case 433:
+#line 4966 "fe/idl.ypp" /* yacc.c:1651 */
{
-// opt_getraises : IDL_GETRAISES
idl_global->set_parse_state (IDL_GlobalData::PS_OpGetRaiseSeen);
}
-#line 7590 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 7769 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 414:
-#line 4946 "fe/idl.ypp" /* yacc.c:1646 */
+ case 434:
+#line 4970 "fe/idl.ypp" /* yacc.c:1651 */
{
-// '('
idl_global->set_parse_state (IDL_GlobalData::PS_OpGetRaiseSqSeen);
}
-#line 7599 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 7777 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 415:
-#line 4952 "fe/idl.ypp" /* yacc.c:1646 */
+ case 435:
+#line 4975 "fe/idl.ypp" /* yacc.c:1651 */
{
-// at_least_one_scoped_name ')'
idl_global->set_parse_state (IDL_GlobalData::PS_OpGetRaiseQsSeen);
(yyval.nlval) = (yyvsp[-1].nlval);
}
-#line 7609 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 7786 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 416:
-#line 4958 "fe/idl.ypp" /* yacc.c:1646 */
+ case 436:
+#line 4980 "fe/idl.ypp" /* yacc.c:1651 */
{
(yyval.nlval) = 0;
-/* | EMPTY */
}
-#line 7618 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 7794 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 417:
-#line 4966 "fe/idl.ypp" /* yacc.c:1646 */
+ case 437:
+#line 4987 "fe/idl.ypp" /* yacc.c:1651 */
{
-// opt_setraises : IDL_SETRAISES
idl_global->set_parse_state (IDL_GlobalData::PS_OpSetRaiseSeen);
}
-#line 7627 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 7802 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 418:
-#line 4971 "fe/idl.ypp" /* yacc.c:1646 */
+ case 438:
+#line 4991 "fe/idl.ypp" /* yacc.c:1651 */
{
-// '('
idl_global->set_parse_state (IDL_GlobalData::PS_OpSetRaiseSqSeen);
}
-#line 7636 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 7810 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 419:
-#line 4977 "fe/idl.ypp" /* yacc.c:1646 */
+ case 439:
+#line 4996 "fe/idl.ypp" /* yacc.c:1651 */
{
-// at_least_one_scoped_name ')'
idl_global->set_parse_state (IDL_GlobalData::PS_OpSetRaiseQsSeen);
(yyval.nlval) = (yyvsp[-1].nlval);
}
-#line 7646 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 7819 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 420:
-#line 4983 "fe/idl.ypp" /* yacc.c:1646 */
+ case 440:
+#line 5001 "fe/idl.ypp" /* yacc.c:1651 */
{
(yyval.nlval) = 0;
-/* | EMPTY */
}
-#line 7655 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 7827 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 421:
-#line 4991 "fe/idl.ypp" /* yacc.c:1646 */
+ case 441:
+#line 5008 "fe/idl.ypp" /* yacc.c:1651 */
{
-// opt_context : IDL_CONTEXT
idl_global->set_parse_state (IDL_GlobalData::PS_OpContextSeen);
}
-#line 7664 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 7835 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 422:
-#line 4996 "fe/idl.ypp" /* yacc.c:1646 */
+ case 442:
+#line 5012 "fe/idl.ypp" /* yacc.c:1651 */
{
idl_global->set_parse_state (IDL_GlobalData::PS_OpContextSqSeen);
-// '('
}
-#line 7673 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 7843 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 423:
-#line 5002 "fe/idl.ypp" /* yacc.c:1646 */
+ case 443:
+#line 5017 "fe/idl.ypp" /* yacc.c:1651 */
{
-// at_least_one_string_literal ')'
idl_global->set_parse_state (IDL_GlobalData::PS_OpContextQsSeen);
(yyval.slval) = (yyvsp[-1].slval);
}
-#line 7683 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 7852 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 424:
-#line 5008 "fe/idl.ypp" /* yacc.c:1646 */
+ case 444:
+#line 5022 "fe/idl.ypp" /* yacc.c:1651 */
{
-/* | EMPTY */
(yyval.slval) = 0;
}
-#line 7692 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 7860 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 425:
-#line 5016 "fe/idl.ypp" /* yacc.c:1646 */
+ case 445:
+#line 5029 "fe/idl.ypp" /* yacc.c:1651 */
{
-// at_least_one_string_literal : IDL_STRING_LITERAL string_literals
ACE_NEW_RETURN ((yyval.slval),
UTL_StrList ((yyvsp[-1].sval),
(yyvsp[0].slval)),
1);
}
-#line 7704 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 7871 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 426:
-#line 5028 "fe/idl.ypp" /* yacc.c:1646 */
+ case 446:
+#line 5040 "fe/idl.ypp" /* yacc.c:1651 */
{
-// string_literals : string_literals ','
idl_global->set_parse_state (IDL_GlobalData::PS_OpContextCommaSeen);
}
-#line 7713 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 7879 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 427:
-#line 5033 "fe/idl.ypp" /* yacc.c:1646 */
+ case 447:
+#line 5044 "fe/idl.ypp" /* yacc.c:1651 */
{
-// IDL_STRING_LITERAL
UTL_StrList *sl = 0;
ACE_NEW_RETURN (sl,
UTL_StrList ((yyvsp[0].sval),
@@ -7732,22 +7897,20 @@ yyreduce:
(yyval.slval) = (yyvsp[-3].slval);
}
}
-#line 7736 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 7901 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 428:
-#line 5052 "fe/idl.ypp" /* yacc.c:1646 */
+ case 448:
+#line 5062 "fe/idl.ypp" /* yacc.c:1651 */
{
-/* | EMPTY */
(yyval.slval) = 0;
}
-#line 7745 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 7909 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 429:
-#line 5060 "fe/idl.ypp" /* yacc.c:1646 */
+ case 449:
+#line 5069 "fe/idl.ypp" /* yacc.c:1651 */
{
-// typeid_dcl : IDL_TYPEID scoped_name IDL_STRING_LITERAL
UTL_Scope *s = idl_global->scopes ().top_non_null ();
AST_Decl *d =
s->lookup_by_name ((yyvsp[-1].idlist));
@@ -7771,13 +7934,12 @@ yyreduce:
delete (yyvsp[0].sval);
(yyvsp[0].sval) = 0;
}
-#line 7775 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 7938 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 430:
-#line 5089 "fe/idl.ypp" /* yacc.c:1646 */
+ case 450:
+#line 5097 "fe/idl.ypp" /* yacc.c:1651 */
{
-// typeprefix_dcl : IDL_TYPEPREFIX scoped_name IDL_STRING_LITERAL
UTL_Scope *s = idl_global->scopes ().top_non_null ();
AST_Decl *d = ScopeAsDecl (s);
@@ -7810,13 +7972,12 @@ yyreduce:
delete (yyvsp[0].sval);
(yyvsp[0].sval) = 0;
}
-#line 7814 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 7976 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 433:
-#line 5133 "fe/idl.ypp" /* yacc.c:1646 */
+ case 453:
+#line 5140 "fe/idl.ypp" /* yacc.c:1651 */
{
-// component_forward_decl : IDL_COMPONENT defining_id
UTL_Scope *s = idl_global->scopes ().top_non_null ();
UTL_ScopedName n ((yyvsp[0].idval),
0);
@@ -7839,13 +8000,12 @@ yyreduce:
delete (yyvsp[0].idval);
(yyvsp[0].idval) = 0;
}
-#line 7843 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 8004 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 434:
-#line 5161 "fe/idl.ypp" /* yacc.c:1646 */
+ case 454:
+#line 5167 "fe/idl.ypp" /* yacc.c:1651 */
{
-// component_decl : component_header
UTL_Scope *s = idl_global->scopes ().top_non_null ();
AST_Component *c = 0;
@@ -7883,31 +8043,28 @@ yyreduce:
*/
idl_global->scopes ().push (c);
}
-#line 7887 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 8047 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 435:
-#line 5201 "fe/idl.ypp" /* yacc.c:1646 */
+ case 455:
+#line 5206 "fe/idl.ypp" /* yacc.c:1651 */
{
-// '{'
idl_global->set_parse_state (IDL_GlobalData::PS_ComponentSqSeen);
}
-#line 7896 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 8055 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 436:
-#line 5206 "fe/idl.ypp" /* yacc.c:1646 */
+ case 456:
+#line 5210 "fe/idl.ypp" /* yacc.c:1651 */
{
-// component_exports
idl_global->set_parse_state (IDL_GlobalData::PS_ComponentBodySeen);
}
-#line 7905 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 8063 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 437:
-#line 5211 "fe/idl.ypp" /* yacc.c:1646 */
+ case 457:
+#line 5214 "fe/idl.ypp" /* yacc.c:1651 */
{
-// '}'
idl_global->set_parse_state (IDL_GlobalData::PS_ComponentQsSeen);
/*
@@ -7915,31 +8072,28 @@ yyreduce:
*/
idl_global->scopes ().pop ();
}
-#line 7919 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 8076 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 438:
-#line 5225 "fe/idl.ypp" /* yacc.c:1646 */
+ case 458:
+#line 5227 "fe/idl.ypp" /* yacc.c:1651 */
{
-// component_header: IDL_COMPONENT defining_id
idl_global->set_parse_state (IDL_GlobalData::PS_ComponentIDSeen);
}
-#line 7928 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 8084 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 439:
-#line 5230 "fe/idl.ypp" /* yacc.c:1646 */
+ case 459:
+#line 5231 "fe/idl.ypp" /* yacc.c:1651 */
{
-// component_inheritance_spec
idl_global->set_parse_state (IDL_GlobalData::PS_InheritSpecSeen);
}
-#line 7937 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 8092 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 440:
-#line 5235 "fe/idl.ypp" /* yacc.c:1646 */
+ case 460:
+#line 5235 "fe/idl.ypp" /* yacc.c:1651 */
{
-// supports_spec
idl_global->set_parse_state (IDL_GlobalData::PS_SupportSpecSeen);
/*
@@ -7972,166 +8126,148 @@ yyreduce:
(yyvsp[-2].idlist) = 0;
}
}
-#line 7976 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 8130 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 441:
-#line 5273 "fe/idl.ypp" /* yacc.c:1646 */
+ case 461:
+#line 5272 "fe/idl.ypp" /* yacc.c:1651 */
{
-// component_inheritance_spec : ':'
idl_global->set_parse_state (IDL_GlobalData::PS_InheritColonSeen);
}
-#line 7985 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 8138 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 442:
-#line 5278 "fe/idl.ypp" /* yacc.c:1646 */
+ case 462:
+#line 5276 "fe/idl.ypp" /* yacc.c:1651 */
{
-// scoped_name
(yyval.idlist) = (yyvsp[0].idlist);
}
-#line 7994 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 8146 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 443:
-#line 5283 "fe/idl.ypp" /* yacc.c:1646 */
+ case 463:
+#line 5280 "fe/idl.ypp" /* yacc.c:1651 */
{
-/* | EMPTY */
(yyval.idlist) = 0;
}
-#line 8003 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 8154 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 446:
-#line 5296 "fe/idl.ypp" /* yacc.c:1646 */
+ case 466:
+#line 5292 "fe/idl.ypp" /* yacc.c:1651 */
{
-// component_export : provides_decl
idl_global->set_parse_state (IDL_GlobalData::PS_ProvidesDeclSeen);
}
-#line 8012 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 8162 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 447:
-#line 5301 "fe/idl.ypp" /* yacc.c:1646 */
+ case 467:
+#line 5296 "fe/idl.ypp" /* yacc.c:1651 */
{
-// ';'
idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
}
-#line 8021 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 8170 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 448:
-#line 5306 "fe/idl.ypp" /* yacc.c:1646 */
+ case 468:
+#line 5300 "fe/idl.ypp" /* yacc.c:1651 */
{
-// | uses_decl
idl_global->set_parse_state (IDL_GlobalData::PS_UsesDeclSeen);
}
-#line 8030 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 8178 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 449:
-#line 5311 "fe/idl.ypp" /* yacc.c:1646 */
+ case 469:
+#line 5304 "fe/idl.ypp" /* yacc.c:1651 */
{
-// ';'
idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
}
-#line 8039 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 8186 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 450:
-#line 5316 "fe/idl.ypp" /* yacc.c:1646 */
+ case 470:
+#line 5308 "fe/idl.ypp" /* yacc.c:1651 */
{
-// | emits_decl
idl_global->set_parse_state (IDL_GlobalData::PS_EmitsDeclSeen);
}
-#line 8048 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 8194 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 451:
-#line 5321 "fe/idl.ypp" /* yacc.c:1646 */
+ case 471:
+#line 5312 "fe/idl.ypp" /* yacc.c:1651 */
{
-// ';'
idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
}
-#line 8057 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 8202 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 452:
-#line 5326 "fe/idl.ypp" /* yacc.c:1646 */
+ case 472:
+#line 5316 "fe/idl.ypp" /* yacc.c:1651 */
{
-// | publishes_decl
idl_global->set_parse_state (IDL_GlobalData::PS_PublishesDeclSeen);
}
-#line 8066 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 8210 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 453:
-#line 5331 "fe/idl.ypp" /* yacc.c:1646 */
+ case 473:
+#line 5320 "fe/idl.ypp" /* yacc.c:1651 */
{
-// ';'
idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
}
-#line 8075 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 8218 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 454:
-#line 5336 "fe/idl.ypp" /* yacc.c:1646 */
+ case 474:
+#line 5324 "fe/idl.ypp" /* yacc.c:1651 */
{
-// | consumes_decl
idl_global->set_parse_state (IDL_GlobalData::PS_ConsumesDeclSeen);
}
-#line 8084 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 8226 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 455:
-#line 5341 "fe/idl.ypp" /* yacc.c:1646 */
+ case 475:
+#line 5328 "fe/idl.ypp" /* yacc.c:1651 */
{
-// ';'
idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
}
-#line 8093 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 8234 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 456:
-#line 5346 "fe/idl.ypp" /* yacc.c:1646 */
+ case 476:
+#line 5332 "fe/idl.ypp" /* yacc.c:1651 */
{
-// | attribute
idl_global->set_parse_state (IDL_GlobalData::PS_AttrDeclSeen);
}
-#line 8102 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 8242 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 457:
-#line 5351 "fe/idl.ypp" /* yacc.c:1646 */
+ case 477:
+#line 5336 "fe/idl.ypp" /* yacc.c:1651 */
{
-// ';'
idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
}
-#line 8111 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 8250 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 458:
-#line 5356 "fe/idl.ypp" /* yacc.c:1646 */
+ case 478:
+#line 5340 "fe/idl.ypp" /* yacc.c:1651 */
{
-// | extended_port_decl
idl_global->set_parse_state (IDL_GlobalData::PS_ExtendedPortDeclSeen);
}
-#line 8120 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 8258 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 459:
-#line 5361 "fe/idl.ypp" /* yacc.c:1646 */
+ case 479:
+#line 5344 "fe/idl.ypp" /* yacc.c:1651 */
{
-// ';'
idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
}
-#line 8129 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 8266 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 460:
-#line 5368 "fe/idl.ypp" /* yacc.c:1646 */
+ case 480:
+#line 5350 "fe/idl.ypp" /* yacc.c:1651 */
{
-// provides_decl : IDL_PROVIDES interface_type id
UTL_Scope *s = idl_global->scopes ().top_non_null ();
bool so_far_so_good = true;
AST_Decl::NodeType nt = AST_Decl::NT_type;
@@ -8217,24 +8353,22 @@ yyreduce:
delete (yyvsp[0].idval);
(yyvsp[0].idval) = 0;
}
-#line 8221 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 8357 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 461:
-#line 5459 "fe/idl.ypp" /* yacc.c:1646 */
+ case 481:
+#line 5440 "fe/idl.ypp" /* yacc.c:1651 */
{
-// interface_type : scoped_name
// Lookups and checking are done where the 'interface_type'
// token is used, in 'provides_decl' and 'uses_decl'.
(yyval.idlist) = (yyvsp[0].idlist);
}
-#line 8232 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 8367 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 462:
-#line 5466 "fe/idl.ypp" /* yacc.c:1646 */
+ case 482:
+#line 5446 "fe/idl.ypp" /* yacc.c:1651 */
{
-// | IDL_OBJECT
Identifier *corba_id = 0;
ACE_NEW_RETURN (corba_id,
@@ -8256,13 +8390,12 @@ yyreduce:
conc_name),
1);
}
-#line 8260 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 8394 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 463:
-#line 5492 "fe/idl.ypp" /* yacc.c:1646 */
+ case 483:
+#line 5471 "fe/idl.ypp" /* yacc.c:1651 */
{
-// uses_decl : uses_opt_multiple interface_type id
UTL_Scope *s = idl_global->scopes ().top_non_null ();
bool so_far_so_good = true;
AST_Decl::NodeType nt = AST_Decl::NT_type;
@@ -8364,42 +8497,38 @@ yyreduce:
delete (yyvsp[0].idval);
(yyvsp[0].idval) = 0;
}
-#line 8368 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 8501 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 464:
-#line 5599 "fe/idl.ypp" /* yacc.c:1646 */
+ case 484:
+#line 5577 "fe/idl.ypp" /* yacc.c:1651 */
{
-// uses_opt_multiple : IDL_USES opt_multiple
// We use this extra rule here to use in both uses_decl and
// extended_uses_decl, so the LALR(1) parser can avoid conflicts.
(yyval.bval) = (yyvsp[0].bval);
}
-#line 8379 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 8511 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 465:
-#line 5609 "fe/idl.ypp" /* yacc.c:1646 */
+ case 485:
+#line 5586 "fe/idl.ypp" /* yacc.c:1651 */
{
-// opt_multiple : IDL_MULTIPLE
(yyval.bval) = true;
}
-#line 8388 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 8519 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 466:
-#line 5614 "fe/idl.ypp" /* yacc.c:1646 */
+ case 486:
+#line 5590 "fe/idl.ypp" /* yacc.c:1651 */
{
-/* | EMPTY */
(yyval.bval) = false;
}
-#line 8397 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 8527 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 467:
-#line 5621 "fe/idl.ypp" /* yacc.c:1646 */
+ case 487:
+#line 5596 "fe/idl.ypp" /* yacc.c:1651 */
{
-// emits_decl : IDL_EMITS scoped_name id
UTL_Scope *s = idl_global->scopes ().top_non_null ();
bool so_far_so_good = true;
AST_Decl::NodeType nt = AST_Decl::NT_type;
@@ -8468,13 +8597,12 @@ yyreduce:
delete (yyvsp[0].idval);
(yyvsp[0].idval) = 0;
}
-#line 8472 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 8601 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 468:
-#line 5694 "fe/idl.ypp" /* yacc.c:1646 */
+ case 488:
+#line 5668 "fe/idl.ypp" /* yacc.c:1651 */
{
-// publishes_decl : IDL_PUBLISHES scoped_name id
UTL_Scope *s = idl_global->scopes ().top_non_null ();
bool so_far_so_good = true;
AST_Decl::NodeType nt = AST_Decl::NT_type;
@@ -8543,13 +8671,12 @@ yyreduce:
delete (yyvsp[0].idval);
(yyvsp[0].idval) = 0;
}
-#line 8547 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 8675 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 469:
-#line 5767 "fe/idl.ypp" /* yacc.c:1646 */
+ case 489:
+#line 5740 "fe/idl.ypp" /* yacc.c:1651 */
{
-// consumes_decl : IDL_CONSUMES scoped_name id
UTL_Scope *s = idl_global->scopes ().top_non_null ();
bool so_far_so_good = true;
AST_Decl::NodeType nt = AST_Decl::NT_type;
@@ -8618,13 +8745,12 @@ yyreduce:
delete (yyvsp[0].idval);
(yyvsp[0].idval) = 0;
}
-#line 8622 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 8749 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 470:
-#line 5841 "fe/idl.ypp" /* yacc.c:1646 */
+ case 490:
+#line 5813 "fe/idl.ypp" /* yacc.c:1651 */
{
-// home_decl : home_header
UTL_Scope *s = idl_global->scopes ().top_non_null ();
AST_Home *h = 0;
@@ -8660,79 +8786,71 @@ yyreduce:
*/
idl_global->scopes ().push (h);
}
-#line 8664 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 8790 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 471:
-#line 5879 "fe/idl.ypp" /* yacc.c:1646 */
+ case 491:
+#line 5850 "fe/idl.ypp" /* yacc.c:1651 */
{
-// home_body
/*
* Done with this component - pop it off the scopes stack.
*/
idl_global->scopes ().pop ();
}
-#line 8676 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 8801 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 472:
-#line 5890 "fe/idl.ypp" /* yacc.c:1646 */
+ case 492:
+#line 5860 "fe/idl.ypp" /* yacc.c:1651 */
{
-// home_header : IDL_HOME
idl_global->set_parse_state (IDL_GlobalData::PS_HomeSeen);
}
-#line 8685 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 8809 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 473:
-#line 5895 "fe/idl.ypp" /* yacc.c:1646 */
+ case 493:
+#line 5864 "fe/idl.ypp" /* yacc.c:1651 */
{
-// defining_id
idl_global->set_parse_state (IDL_GlobalData::PS_HomeIDSeen);
}
-#line 8694 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 8817 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 474:
-#line 5900 "fe/idl.ypp" /* yacc.c:1646 */
+ case 494:
+#line 5868 "fe/idl.ypp" /* yacc.c:1651 */
{
-// home_inheritance_spec
idl_global->set_parse_state (IDL_GlobalData::PS_InheritSpecSeen);
}
-#line 8703 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 8825 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 475:
-#line 5905 "fe/idl.ypp" /* yacc.c:1646 */
+ case 495:
+#line 5872 "fe/idl.ypp" /* yacc.c:1651 */
{
-// supports_spec
idl_global->set_parse_state (IDL_GlobalData::PS_SupportSpecSeen);
}
-#line 8712 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 8833 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 476:
-#line 5910 "fe/idl.ypp" /* yacc.c:1646 */
+ case 496:
+#line 5876 "fe/idl.ypp" /* yacc.c:1651 */
{
-// IDL_MANAGES
idl_global->set_parse_state (IDL_GlobalData::PS_ManagesSeen);
}
-#line 8721 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 8841 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 477:
-#line 5915 "fe/idl.ypp" /* yacc.c:1646 */
+ case 497:
+#line 5880 "fe/idl.ypp" /* yacc.c:1651 */
{
-// scoped_name
idl_global->set_parse_state (IDL_GlobalData::PS_ManagesIDSeen);
}
-#line 8730 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 8849 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 478:
-#line 5920 "fe/idl.ypp" /* yacc.c:1646 */
+ case 498:
+#line 5884 "fe/idl.ypp" /* yacc.c:1651 */
{
-// primary_key_spec
idl_global->set_parse_state (IDL_GlobalData::PS_PrimaryKeySpecSeen);
/*
@@ -8777,121 +8895,108 @@ yyreduce:
(yyvsp[-6].nlval) = 0;
}
}
-#line 8781 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 8899 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 479:
-#line 5970 "fe/idl.ypp" /* yacc.c:1646 */
+ case 499:
+#line 5933 "fe/idl.ypp" /* yacc.c:1651 */
{
-// home_inheritance_spec ':'
idl_global->set_parse_state (IDL_GlobalData::PS_InheritColonSeen);
}
-#line 8790 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 8907 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 480:
-#line 5975 "fe/idl.ypp" /* yacc.c:1646 */
+ case 500:
+#line 5937 "fe/idl.ypp" /* yacc.c:1651 */
{
-// scoped_name
(yyval.idlist) = (yyvsp[0].idlist);
}
-#line 8799 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 8915 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 481:
-#line 5980 "fe/idl.ypp" /* yacc.c:1646 */
+ case 501:
+#line 5941 "fe/idl.ypp" /* yacc.c:1651 */
{
-/* | EMPTY */
(yyval.idlist) = 0;
}
-#line 8808 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 8923 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 482:
-#line 5989 "fe/idl.ypp" /* yacc.c:1646 */
+ case 502:
+#line 5949 "fe/idl.ypp" /* yacc.c:1651 */
{
-// primary_key_spec : IDL_PRIMARYKEY scoped_name
(yyval.idlist) = (yyvsp[0].idlist);
}
-#line 8817 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 8931 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 483:
-#line 5994 "fe/idl.ypp" /* yacc.c:1646 */
+ case 503:
+#line 5953 "fe/idl.ypp" /* yacc.c:1651 */
{
-/* | EMPTY */
(yyval.idlist) = 0;
}
-#line 8826 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 8939 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 484:
-#line 6002 "fe/idl.ypp" /* yacc.c:1646 */
+ case 504:
+#line 5960 "fe/idl.ypp" /* yacc.c:1651 */
{
-// home_body : '{'
idl_global->set_parse_state (IDL_GlobalData::PS_HomeSqSeen);
}
-#line 8835 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 8947 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 485:
-#line 6007 "fe/idl.ypp" /* yacc.c:1646 */
+ case 505:
+#line 5964 "fe/idl.ypp" /* yacc.c:1651 */
{
-// home_exports
idl_global->set_parse_state (IDL_GlobalData::PS_HomeBodySeen);
}
-#line 8844 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 8955 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 486:
-#line 6012 "fe/idl.ypp" /* yacc.c:1646 */
+ case 506:
+#line 5968 "fe/idl.ypp" /* yacc.c:1651 */
{
-// '}'
idl_global->set_parse_state (IDL_GlobalData::PS_HomeQsSeen);
}
-#line 8853 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 8963 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 490:
-#line 6026 "fe/idl.ypp" /* yacc.c:1646 */
+ case 510:
+#line 5981 "fe/idl.ypp" /* yacc.c:1651 */
{
-// home_export : factory_decl
idl_global->set_parse_state (IDL_GlobalData::PS_FactoryDeclSeen);
}
-#line 8862 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 8971 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 491:
-#line 6031 "fe/idl.ypp" /* yacc.c:1646 */
+ case 511:
+#line 5985 "fe/idl.ypp" /* yacc.c:1651 */
{
-// | ';'
idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
}
-#line 8871 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 8979 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 492:
-#line 6036 "fe/idl.ypp" /* yacc.c:1646 */
+ case 512:
+#line 5989 "fe/idl.ypp" /* yacc.c:1651 */
{
-// | finder_decl
idl_global->set_parse_state (IDL_GlobalData::PS_FinderDeclSeen);
}
-#line 8880 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 8987 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 493:
-#line 6041 "fe/idl.ypp" /* yacc.c:1646 */
+ case 513:
+#line 5993 "fe/idl.ypp" /* yacc.c:1651 */
{
-// | ';'
idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
}
-#line 8889 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 8995 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 494:
-#line 6050 "fe/idl.ypp" /* yacc.c:1646 */
+ case 514:
+#line 6001 "fe/idl.ypp" /* yacc.c:1651 */
{
-// factory_decl : IDL_FACTORY defining_id
UTL_Scope *s = idl_global->scopes ().top_non_null ();
UTL_ScopedName n ((yyvsp[0].idval),
0);
@@ -8913,22 +9018,20 @@ yyreduce:
*/
idl_global->scopes ().push (f);
}
-#line 8917 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 9022 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 495:
-#line 6074 "fe/idl.ypp" /* yacc.c:1646 */
+ case 515:
+#line 6024 "fe/idl.ypp" /* yacc.c:1651 */
{
-// init_parameter_list
idl_global->set_parse_state (IDL_GlobalData::PS_OpParsCompleted);
}
-#line 8926 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 9030 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 496:
-#line 6079 "fe/idl.ypp" /* yacc.c:1646 */
+ case 516:
+#line 6028 "fe/idl.ypp" /* yacc.c:1651 */
{
-// opt_raises
UTL_Scope *s = idl_global->scopes ().top_non_null ();
idl_global->set_parse_state (IDL_GlobalData::PS_OpRaiseCompleted);
@@ -8945,13 +9048,12 @@ yyreduce:
*/
idl_global->scopes ().pop ();
}
-#line 8949 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 9052 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 497:
-#line 6102 "fe/idl.ypp" /* yacc.c:1646 */
+ case 517:
+#line 6050 "fe/idl.ypp" /* yacc.c:1651 */
{
-// finder_decl : IDL_FINDER defining_id
UTL_Scope *s = idl_global->scopes ().top_non_null ();
UTL_ScopedName n ((yyvsp[0].idval),
0);
@@ -8977,22 +9079,20 @@ yyreduce:
*/
idl_global->scopes ().push (f);
}
-#line 8981 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 9083 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 498:
-#line 6130 "fe/idl.ypp" /* yacc.c:1646 */
+ case 518:
+#line 6077 "fe/idl.ypp" /* yacc.c:1651 */
{
-// init_parameter_list
idl_global->set_parse_state (IDL_GlobalData::PS_OpParsCompleted);
}
-#line 8990 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 9091 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 499:
-#line 6135 "fe/idl.ypp" /* yacc.c:1646 */
+ case 519:
+#line 6081 "fe/idl.ypp" /* yacc.c:1651 */
{
-// opt_raises
UTL_Scope *s = idl_global->scopes ().top_non_null ();
idl_global->set_parse_state (IDL_GlobalData::PS_OpRaiseCompleted);
@@ -9009,13 +9109,12 @@ yyreduce:
*/
idl_global->scopes ().pop ();
}
-#line 9013 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 9113 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 505:
-#line 6169 "fe/idl.ypp" /* yacc.c:1646 */
+ case 525:
+#line 6114 "fe/idl.ypp" /* yacc.c:1651 */
{
-// event_concrete_forward_decl : IDL_EVENTTYPE defining_id
UTL_Scope *s = idl_global->scopes ().top_non_null ();
UTL_ScopedName n ((yyvsp[0].idval),
0);
@@ -9037,13 +9136,12 @@ yyreduce:
delete (yyvsp[0].idval);
(yyvsp[0].idval) = 0;
}
-#line 9041 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 9140 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 506:
-#line 6198 "fe/idl.ypp" /* yacc.c:1646 */
+ case 526:
+#line 6142 "fe/idl.ypp" /* yacc.c:1651 */
{
-// event_abs_forward_decl : IDL_ABSTRACT IDL_EVENTTYPE defining_id
UTL_Scope *s = idl_global->scopes ().top_non_null ();
UTL_ScopedName n ((yyvsp[0].idval),
0);
@@ -9065,13 +9163,12 @@ yyreduce:
delete (yyvsp[0].idval);
(yyvsp[0].idval) = 0;
}
-#line 9069 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 9167 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 507:
-#line 6226 "fe/idl.ypp" /* yacc.c:1646 */
+ case 527:
+#line 6169 "fe/idl.ypp" /* yacc.c:1651 */
{
-// event_abs_decl : event_abs_header event_rest_of_header
UTL_Scope *s = idl_global->scopes ().top_non_null ();
AST_EventType *e = 0;
AST_Interface *i = 0;
@@ -9114,31 +9211,28 @@ yyreduce:
delete (yyvsp[-1].idval);
(yyvsp[-1].idval) = 0;
}
-#line 9118 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 9215 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 508:
-#line 6271 "fe/idl.ypp" /* yacc.c:1646 */
+ case 528:
+#line 6213 "fe/idl.ypp" /* yacc.c:1651 */
{
-// '{'
idl_global->set_parse_state (IDL_GlobalData::PS_EventTypeSqSeen);
}
-#line 9127 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 9223 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 509:
-#line 6276 "fe/idl.ypp" /* yacc.c:1646 */
+ case 529:
+#line 6217 "fe/idl.ypp" /* yacc.c:1651 */
{
-// exports
idl_global->set_parse_state (IDL_GlobalData::PS_EventTypeBodySeen);
}
-#line 9136 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 9231 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 510:
-#line 6281 "fe/idl.ypp" /* yacc.c:1646 */
+ case 530:
+#line 6221 "fe/idl.ypp" /* yacc.c:1651 */
{
-// '}'
idl_global->set_parse_state (IDL_GlobalData::PS_EventTypeQsSeen);
/*
@@ -9146,22 +9240,20 @@ yyreduce:
*/
idl_global->scopes ().pop ();
}
-#line 9150 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 9244 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 511:
-#line 6296 "fe/idl.ypp" /* yacc.c:1646 */
+ case 531:
+#line 6235 "fe/idl.ypp" /* yacc.c:1651 */
{
-// event_abs_header : IDL_ABSTRACT IDL_EVENTTYPE defining_id
(yyval.idval) = (yyvsp[0].idval);
}
-#line 9159 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 9252 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 512:
-#line 6306 "fe/idl.ypp" /* yacc.c:1646 */
+ case 532:
+#line 6244 "fe/idl.ypp" /* yacc.c:1651 */
{
-// event_custom_header : IDL_CUSTOM IDL_EVENTTYPE defining_id
idl_global->set_parse_state (IDL_GlobalData::PS_EventTypeIDSeen);
ACE_DEBUG ((LM_DEBUG,
@@ -9173,33 +9265,30 @@ yyreduce:
ACE_TEXT (" custom yet\n")));
(yyval.idval) = 0;
}
-#line 9177 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 9269 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 513:
-#line 6324 "fe/idl.ypp" /* yacc.c:1646 */
+ case 533:
+#line 6261 "fe/idl.ypp" /* yacc.c:1651 */
{
-// event_plain_header : IDL_EVENTTYPE defining_id
idl_global->set_parse_state (IDL_GlobalData::PS_EventTypeIDSeen);
(yyval.idval) = (yyvsp[0].idval);
}
-#line 9188 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 9279 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 514:
-#line 6334 "fe/idl.ypp" /* yacc.c:1646 */
+ case 534:
+#line 6270 "fe/idl.ypp" /* yacc.c:1651 */
{
-// event_rest_of_header : inheritance_spec
idl_global->set_parse_state (IDL_GlobalData::PS_InheritSpecSeen);
}
-#line 9197 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 9287 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 515:
-#line 6339 "fe/idl.ypp" /* yacc.c:1646 */
+ case 535:
+#line 6274 "fe/idl.ypp" /* yacc.c:1651 */
{
-// supports_spec
idl_global->set_parse_state (IDL_GlobalData::PS_SupportSpecSeen);
ACE_NEW_RETURN ((yyval.vhval),
@@ -9227,13 +9316,12 @@ yyreduce:
(yyvsp[-2].nlval) = 0;
}
}
-#line 9231 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 9320 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 516:
-#line 6373 "fe/idl.ypp" /* yacc.c:1646 */
+ case 536:
+#line 6307 "fe/idl.ypp" /* yacc.c:1651 */
{
-// event_decl : event_header event_rest_of_header
UTL_Scope *s = idl_global->scopes ().top_non_null ();
AST_EventType *e = 0;
AST_Interface *i = 0;
@@ -9281,31 +9369,28 @@ yyreduce:
*/
idl_global->scopes ().push (e);
}
-#line 9285 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 9373 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 517:
-#line 6423 "fe/idl.ypp" /* yacc.c:1646 */
+ case 537:
+#line 6356 "fe/idl.ypp" /* yacc.c:1651 */
{
-// '{'
idl_global->set_parse_state (IDL_GlobalData::PS_EventTypeSqSeen);
}
-#line 9294 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 9381 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 518:
-#line 6428 "fe/idl.ypp" /* yacc.c:1646 */
+ case 538:
+#line 6360 "fe/idl.ypp" /* yacc.c:1651 */
{
-// value_elements
idl_global->set_parse_state (IDL_GlobalData::PS_EventTypeBodySeen);
}
-#line 9303 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 9389 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 519:
-#line 6433 "fe/idl.ypp" /* yacc.c:1646 */
+ case 539:
+#line 6364 "fe/idl.ypp" /* yacc.c:1651 */
{
-// '}'
idl_global->set_parse_state (IDL_GlobalData::PS_EventTypeQsSeen);
/*
@@ -9313,127 +9398,112 @@ yyreduce:
*/
idl_global->scopes ().pop ();
}
-#line 9317 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 9402 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 520:
-#line 6446 "fe/idl.ypp" /* yacc.c:1646 */
+ case 540:
+#line 6376 "fe/idl.ypp" /* yacc.c:1651 */
{
-// event_header : event_custom_header
(yyval.idval) = (yyvsp[0].idval);
}
-#line 9326 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 9410 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 521:
-#line 6451 "fe/idl.ypp" /* yacc.c:1646 */
+ case 541:
+#line 6380 "fe/idl.ypp" /* yacc.c:1651 */
{
-// event_header : event_plain_header
(yyval.idval) = (yyvsp[0].idval);
}
-#line 9335 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 9418 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 522:
-#line 6459 "fe/idl.ypp" /* yacc.c:1646 */
+ case 542:
+#line 6387 "fe/idl.ypp" /* yacc.c:1651 */
{
-// formal_parameter_type : IDL_TYPENAME
(yyval.ntval) = AST_Decl::NT_type;
}
-#line 9344 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 9426 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 523:
-#line 6464 "fe/idl.ypp" /* yacc.c:1646 */
+ case 543:
+#line 6391 "fe/idl.ypp" /* yacc.c:1651 */
{
-// IDL_STRUCT
(yyval.ntval) = AST_Decl::NT_struct;
}
-#line 9353 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 9434 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 524:
-#line 6469 "fe/idl.ypp" /* yacc.c:1646 */
+ case 544:
+#line 6395 "fe/idl.ypp" /* yacc.c:1651 */
{
-// IDL_UNION
(yyval.ntval) = AST_Decl::NT_union;
}
-#line 9362 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 9442 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 525:
-#line 6474 "fe/idl.ypp" /* yacc.c:1646 */
+ case 545:
+#line 6399 "fe/idl.ypp" /* yacc.c:1651 */
{
-// IDL_EVENTTYPE
(yyval.ntval) = AST_Decl::NT_eventtype;
}
-#line 9371 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 9450 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 526:
-#line 6479 "fe/idl.ypp" /* yacc.c:1646 */
+ case 546:
+#line 6403 "fe/idl.ypp" /* yacc.c:1651 */
{
-// IDL_SEQUENCE
(yyval.ntval) = AST_Decl::NT_sequence;
}
-#line 9380 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 9458 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 527:
-#line 6484 "fe/idl.ypp" /* yacc.c:1646 */
+ case 547:
+#line 6407 "fe/idl.ypp" /* yacc.c:1651 */
{
-// IDL_INTERFACE
(yyval.ntval) = AST_Decl::NT_interface;
}
-#line 9389 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 9466 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 528:
-#line 6489 "fe/idl.ypp" /* yacc.c:1646 */
+ case 548:
+#line 6411 "fe/idl.ypp" /* yacc.c:1651 */
{
-// IDL_VALUETYPE
(yyval.ntval) = AST_Decl::NT_valuetype;
}
-#line 9398 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 9474 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 529:
-#line 6494 "fe/idl.ypp" /* yacc.c:1646 */
+ case 549:
+#line 6415 "fe/idl.ypp" /* yacc.c:1651 */
{
-// IDL_ENUM
(yyval.ntval) = AST_Decl::NT_enum;
}
-#line 9407 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 9482 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 530:
-#line 6499 "fe/idl.ypp" /* yacc.c:1646 */
+ case 550:
+#line 6419 "fe/idl.ypp" /* yacc.c:1651 */
{
-// IDL_EXCEPTION
(yyval.ntval) = AST_Decl::NT_except;
}
-#line 9416 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 9490 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 531:
-#line 6504 "fe/idl.ypp" /* yacc.c:1646 */
+ case 551:
+#line 6423 "fe/idl.ypp" /* yacc.c:1651 */
{
-// IDL_CONST const_type
(yyval.ntval) = AST_Decl::NT_const;
t_param_const_type = (yyvsp[0].etval);
}
-#line 9426 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 9499 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 532:
-#line 6513 "fe/idl.ypp" /* yacc.c:1646 */
+ case 552:
+#line 6431 "fe/idl.ypp" /* yacc.c:1651 */
{
-// at_least_one_formal_parameter : formal_parameter formal_parameters
if ((yyvsp[0].plval) == 0)
{
- ACE_NEW_RETURN ((yyvsp[0].plval),
- FE_Utils::T_PARAMLIST_INFO,
- 1);
+ ACE_NEW_RETURN ((yyvsp[0].plval), FE_Utils::T_PARAMLIST_INFO, 1);
}
(yyvsp[0].plval)->enqueue_head (*(yyvsp[-1].pival));
@@ -9457,51 +9527,37 @@ yyreduce:
(yyval.plval) = (yyvsp[0].plval);
}
-#line 9461 "fe/idl.tab.cpp" /* yacc.c:1646 */
- break;
-
- case 533:
-#line 6547 "fe/idl.ypp" /* yacc.c:1646 */
- {
-// formal_parameters : formal_parameters ','
- // Maybe add a new parse state to set here.
- }
-#line 9470 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 9531 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 534:
-#line 6552 "fe/idl.ypp" /* yacc.c:1646 */
+ case 553:
+#line 6462 "fe/idl.ypp" /* yacc.c:1651 */
{
-// formal_parameter
- if ((yyvsp[-3].plval) == 0)
+ if ((yyvsp[-2].plval) == 0)
{
- ACE_NEW_RETURN ((yyvsp[-3].plval),
- FE_Utils::T_PARAMLIST_INFO,
- 1);
+ ACE_NEW_RETURN ((yyvsp[-2].plval), FE_Utils::T_PARAMLIST_INFO, 1);
}
- (yyvsp[-3].plval)->enqueue_tail (*(yyvsp[0].pival));
- (yyval.plval) = (yyvsp[-3].plval);
+ (yyvsp[-2].plval)->enqueue_tail (*(yyvsp[0].pival));
+ (yyval.plval) = (yyvsp[-2].plval);
delete (yyvsp[0].pival);
(yyvsp[0].pival) = 0;
}
-#line 9490 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 9548 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 535:
-#line 6568 "fe/idl.ypp" /* yacc.c:1646 */
+ case 554:
+#line 6475 "fe/idl.ypp" /* yacc.c:1651 */
{
-// /* EMPTY */
(yyval.plval) = 0;
}
-#line 9499 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 9556 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 536:
-#line 6576 "fe/idl.ypp" /* yacc.c:1646 */
+ case 555:
+#line 6482 "fe/idl.ypp" /* yacc.c:1651 */
{
-// formal_parameter : formal_parameter_type IDENTIFIER
ACE_NEW_RETURN ((yyval.pival),
FE_Utils::T_Param_Info,
@@ -9525,11 +9581,11 @@ yyreduce:
tao_enum_constant_decl = 0;
}
}
-#line 9529 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 9585 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 537:
-#line 6602 "fe/idl.ypp" /* yacc.c:1646 */
+ case 556:
+#line 6507 "fe/idl.ypp" /* yacc.c:1651 */
{
ACE_NEW_RETURN ((yyval.pival),
FE_Utils::T_Param_Info,
@@ -9544,30 +9600,22 @@ yyreduce:
ACE::strdelete ((yyvsp[0].strval));
(yyvsp[0].strval) = 0;
}
-#line 9548 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 9604 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 538:
-#line 6620 "fe/idl.ypp" /* yacc.c:1646 */
+ case 557:
+#line 6525 "fe/idl.ypp" /* yacc.c:1651 */
{
-// at_least_one_formal_parameter_name : formal_parameter_name formal_parameter_names
- ACE_NEW_RETURN ((yyval.slval),
- UTL_StrList ((yyvsp[-1].sval),
- (yyvsp[0].slval)),
- 1);
+ ACE_NEW_RETURN ((yyval.slval), UTL_StrList ((yyvsp[-1].sval), (yyvsp[0].slval)), 1);
}
-#line 9560 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 9612 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 539:
-#line 6631 "fe/idl.ypp" /* yacc.c:1646 */
+ case 558:
+#line 6532 "fe/idl.ypp" /* yacc.c:1651 */
{
-// formal_parameter_names : formal_parameter_names ',' formal_parameter_name
UTL_StrList *sl = 0;
- ACE_NEW_RETURN (sl,
- UTL_StrList ((yyvsp[0].sval),
- 0),
- 1);
+ ACE_NEW_RETURN (sl, UTL_StrList ((yyvsp[0].sval), 0), 1);
if ((yyvsp[-2].slval) == 0)
{
@@ -9579,42 +9627,38 @@ yyreduce:
(yyval.slval) = (yyvsp[-2].slval);
}
}
-#line 9583 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 9631 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 540:
-#line 6650 "fe/idl.ypp" /* yacc.c:1646 */
+ case 559:
+#line 6547 "fe/idl.ypp" /* yacc.c:1651 */
{
-// /* EMPTY */
(yyval.slval) = 0;
}
-#line 9592 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 9639 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 541:
-#line 6658 "fe/idl.ypp" /* yacc.c:1646 */
+ case 560:
+#line 6554 "fe/idl.ypp" /* yacc.c:1651 */
{
-// formal_parameter_name : IDENTIFIER
ACE_NEW_RETURN ((yyval.sval),
UTL_String ((yyvsp[0].strval), true),
1);
}
-#line 9603 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 9649 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 542:
-#line 6668 "fe/idl.ypp" /* yacc.c:1646 */
+ case 561:
+#line 6563 "fe/idl.ypp" /* yacc.c:1651 */
{
-// porttype_decl : IDL_PORTTYPE
idl_global->set_parse_state (IDL_GlobalData::PS_PorttypeSeen);
}
-#line 9612 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 9657 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 543:
-#line 6673 "fe/idl.ypp" /* yacc.c:1646 */
+ case 562:
+#line 6567 "fe/idl.ypp" /* yacc.c:1651 */
{
-// annotations IDENTIFIER
idl_global->set_parse_state (IDL_GlobalData::PS_PorttypeIDSeen);
UTL_Scope *s = idl_global->scopes ().top_non_null ();
@@ -9631,116 +9675,103 @@ yyreduce:
// Push it on the scopes stack.
idl_global->scopes ().push (p);
}
-#line 9635 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 9679 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 544:
-#line 6692 "fe/idl.ypp" /* yacc.c:1646 */
+ case 563:
+#line 6585 "fe/idl.ypp" /* yacc.c:1651 */
{
-// '{'
idl_global->set_parse_state (IDL_GlobalData::PS_PorttypeSqSeen);
}
-#line 9644 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 9687 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 545:
-#line 6697 "fe/idl.ypp" /* yacc.c:1646 */
+ case 564:
+#line 6589 "fe/idl.ypp" /* yacc.c:1651 */
{
-// at_least_one_port_export
idl_global->set_parse_state (IDL_GlobalData::PS_PorttypeBodySeen);
}
-#line 9653 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 9695 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 546:
-#line 6702 "fe/idl.ypp" /* yacc.c:1646 */
+ case 565:
+#line 6593 "fe/idl.ypp" /* yacc.c:1651 */
{
-// '}'
idl_global->set_parse_state (IDL_GlobalData::PS_PorttypeQsSeen);
// Done with this port type - pop it off the scopes stack.
idl_global->scopes ().pop ();
}
-#line 9665 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 9706 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 547:
-#line 6713 "fe/idl.ypp" /* yacc.c:1646 */
+ case 566:
+#line 6603 "fe/idl.ypp" /* yacc.c:1651 */
{
-// at_least_one_port_export : port_export port_exports
}
-#line 9673 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 9713 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 548:
-#line 6720 "fe/idl.ypp" /* yacc.c:1646 */
+ case 567:
+#line 6609 "fe/idl.ypp" /* yacc.c:1651 */
{
-// port_exports : port_exports port_export
}
-#line 9681 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 9720 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 549:
-#line 6724 "fe/idl.ypp" /* yacc.c:1646 */
+ case 568:
+#line 6612 "fe/idl.ypp" /* yacc.c:1651 */
{
-// | /* EMPTY */
}
-#line 9689 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 9727 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 550:
-#line 6731 "fe/idl.ypp" /* yacc.c:1646 */
+ case 569:
+#line 6618 "fe/idl.ypp" /* yacc.c:1651 */
{
-// port_export : provides_decl
}
-#line 9697 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 9734 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 551:
-#line 6735 "fe/idl.ypp" /* yacc.c:1646 */
+ case 570:
+#line 6621 "fe/idl.ypp" /* yacc.c:1651 */
{
-// ';'
}
-#line 9705 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 9741 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 552:
-#line 6739 "fe/idl.ypp" /* yacc.c:1646 */
+ case 571:
+#line 6624 "fe/idl.ypp" /* yacc.c:1651 */
{
-// | uses_decl
}
-#line 9713 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 9748 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 553:
-#line 6743 "fe/idl.ypp" /* yacc.c:1646 */
+ case 572:
+#line 6627 "fe/idl.ypp" /* yacc.c:1651 */
{
-// ';'
}
-#line 9721 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 9755 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 554:
-#line 6747 "fe/idl.ypp" /* yacc.c:1646 */
+ case 573:
+#line 6630 "fe/idl.ypp" /* yacc.c:1651 */
{
-// | attribute
idl_global->set_parse_state (IDL_GlobalData::PS_AttrDeclSeen);
}
-#line 9730 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 9763 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 555:
-#line 6752 "fe/idl.ypp" /* yacc.c:1646 */
+ case 574:
+#line 6634 "fe/idl.ypp" /* yacc.c:1651 */
{
-// ';'
}
-#line 9738 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 9770 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 556:
-#line 6759 "fe/idl.ypp" /* yacc.c:1646 */
+ case 575:
+#line 6640 "fe/idl.ypp" /* yacc.c:1651 */
{
-// extended_port_decl : IDL_PORT scoped_name IDENTIFIER
idl_global->set_parse_state (IDL_GlobalData::PS_ExtendedPortDeclSeen);
UTL_Scope *s = idl_global->scopes ().top_non_null ();
AST_Decl *d =
@@ -9808,13 +9839,12 @@ yyreduce:
delete (yyvsp[-1].idlist);
(yyvsp[-1].idlist) = 0;
}
-#line 9812 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 9843 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 557:
-#line 6829 "fe/idl.ypp" /* yacc.c:1646 */
+ case 576:
+#line 6709 "fe/idl.ypp" /* yacc.c:1651 */
{
-// | IDL_MIRRORPORT scoped_name IDENTIFIER
idl_global->set_parse_state (IDL_GlobalData::PS_MirrorPortDeclSeen);
UTL_Scope *s = idl_global->scopes ().top_non_null ();
AST_Decl *d =
@@ -9860,13 +9890,12 @@ yyreduce:
delete (yyvsp[-1].idlist);
(yyvsp[-1].idlist) = 0;
}
-#line 9864 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 9894 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 558:
-#line 6880 "fe/idl.ypp" /* yacc.c:1646 */
+ case 577:
+#line 6759 "fe/idl.ypp" /* yacc.c:1651 */
{
-// at_least_one_actual_parameter : annotations actual_parameter actual_parameters
if ((yyvsp[0].alval) == 0)
{
ACE_NEW_RETURN ((yyvsp[0].alval),
@@ -9877,13 +9906,12 @@ yyreduce:
(yyvsp[0].alval)->enqueue_head ((yyvsp[-1].dcval));
(yyval.alval) = (yyvsp[0].alval);
}
-#line 9881 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 9910 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 559:
-#line 6896 "fe/idl.ypp" /* yacc.c:1646 */
+ case 578:
+#line 6774 "fe/idl.ypp" /* yacc.c:1651 */
{
-// actual_parameters : actual_parameters ',' annotations actual_parameter
if ((yyvsp[-3].alval) == 0)
{
ACE_NEW_RETURN ((yyvsp[-3].alval),
@@ -9894,22 +9922,20 @@ yyreduce:
(yyvsp[-3].alval)->enqueue_tail ((yyvsp[0].dcval));
(yyval.alval) = (yyvsp[-3].alval);
}
-#line 9898 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 9926 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 560:
-#line 6909 "fe/idl.ypp" /* yacc.c:1646 */
+ case 579:
+#line 6786 "fe/idl.ypp" /* yacc.c:1651 */
{
-// | /* EMPTY */
(yyval.alval) = 0;
}
-#line 9907 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 9934 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 561:
-#line 6917 "fe/idl.ypp" /* yacc.c:1646 */
+ case 580:
+#line 6793 "fe/idl.ypp" /* yacc.c:1651 */
{
-// actual_parameter : expression
// To avoid grammar conflicts with this LALR(1) parser,
// we take advantage of the fact that an expression can
// be a scoped name. At that lower level, we create an
@@ -9964,31 +9990,28 @@ yyreduce:
0);
}
}
-#line 9968 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 9994 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 563:
-#line 6981 "fe/idl.ypp" /* yacc.c:1646 */
+ case 582:
+#line 6856 "fe/idl.ypp" /* yacc.c:1651 */
{
-// connector_header : IDL_CONNECTOR
idl_global->set_parse_state (IDL_GlobalData::PS_ConnectorSeen);
}
-#line 9977 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 10002 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 564:
-#line 6986 "fe/idl.ypp" /* yacc.c:1646 */
+ case 583:
+#line 6860 "fe/idl.ypp" /* yacc.c:1651 */
{
-// annotations IDENTIFIER
idl_global->set_parse_state (IDL_GlobalData::PS_ConnectorIDSeen);
}
-#line 9986 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 10010 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 565:
-#line 6991 "fe/idl.ypp" /* yacc.c:1646 */
+ case 584:
+#line 6864 "fe/idl.ypp" /* yacc.c:1651 */
{
-// component_inheritance_spec
UTL_Scope *s = idl_global->scopes ().top_non_null ();
AST_Connector *parent = 0;
bool so_far_so_good = true;
@@ -10039,113 +10062,102 @@ yyreduce:
idl_global->scopes ().push (c);
}
}
-#line 10043 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 10066 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 566:
-#line 7047 "fe/idl.ypp" /* yacc.c:1646 */
+ case 585:
+#line 6919 "fe/idl.ypp" /* yacc.c:1651 */
{
-// connector_body " '{'
idl_global->set_parse_state (IDL_GlobalData::PS_ConnectorSqSeen);
}
-#line 10052 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 10074 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 567:
-#line 7052 "fe/idl.ypp" /* yacc.c:1646 */
+ case 586:
+#line 6923 "fe/idl.ypp" /* yacc.c:1651 */
{
-// connector_exports
idl_global->set_parse_state (IDL_GlobalData::PS_ConnectorBodySeen);
}
-#line 10061 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 10082 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 568:
-#line 7057 "fe/idl.ypp" /* yacc.c:1646 */
+ case 587:
+#line 6927 "fe/idl.ypp" /* yacc.c:1651 */
{
-// '}
idl_global->set_parse_state (IDL_GlobalData::PS_ConnectorQsSeen);
// Done with this connector - pop it off the scope stack.
idl_global->scopes ().pop ();
}
-#line 10073 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 10093 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 571:
-#line 7073 "fe/idl.ypp" /* yacc.c:1646 */
+ case 590:
+#line 6942 "fe/idl.ypp" /* yacc.c:1651 */
{
-// connector_export : provides_decl
idl_global->set_parse_state (IDL_GlobalData::PS_ProvidesDeclSeen);
}
-#line 10082 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 10101 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 572:
-#line 7078 "fe/idl.ypp" /* yacc.c:1646 */
+ case 591:
+#line 6946 "fe/idl.ypp" /* yacc.c:1651 */
{
-// ';'
idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
}
-#line 10091 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 10109 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 573:
-#line 7083 "fe/idl.ypp" /* yacc.c:1646 */
+ case 592:
+#line 6950 "fe/idl.ypp" /* yacc.c:1651 */
{
-// | uses_decl
idl_global->set_parse_state (IDL_GlobalData::PS_UsesDeclSeen);
}
-#line 10100 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 10117 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 574:
-#line 7088 "fe/idl.ypp" /* yacc.c:1646 */
+ case 593:
+#line 6954 "fe/idl.ypp" /* yacc.c:1651 */
{
-// ';'
idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
}
-#line 10109 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 10125 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 575:
-#line 7093 "fe/idl.ypp" /* yacc.c:1646 */
+ case 594:
+#line 6958 "fe/idl.ypp" /* yacc.c:1651 */
{
-// | attribute
idl_global->set_parse_state (IDL_GlobalData::PS_AttrDeclSeen);
}
-#line 10118 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 10133 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 576:
-#line 7098 "fe/idl.ypp" /* yacc.c:1646 */
+ case 595:
+#line 6962 "fe/idl.ypp" /* yacc.c:1651 */
{
-// ';'
idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
}
-#line 10127 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 10141 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 577:
-#line 7103 "fe/idl.ypp" /* yacc.c:1646 */
+ case 596:
+#line 6966 "fe/idl.ypp" /* yacc.c:1651 */
{
-// | extended_port_decl
idl_global->set_parse_state (IDL_GlobalData::PS_ExtendedPortDeclSeen);
}
-#line 10136 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 10149 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
- case 578:
-#line 7108 "fe/idl.ypp" /* yacc.c:1646 */
+ case 597:
+#line 6970 "fe/idl.ypp" /* yacc.c:1651 */
{
-// ';'
idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
}
-#line 10145 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 10157 "fe/idl.tab.cpp" /* yacc.c:1651 */
break;
-#line 10149 "fe/idl.tab.cpp" /* yacc.c:1646 */
+#line 10161 "fe/idl.tab.cpp" /* yacc.c:1651 */
default: break;
}
/* User semantic actions sometimes alter yychar, and that requires
@@ -10373,7 +10385,7 @@ yyreturn:
#endif
return yyresult;
}
-#line 7114 "fe/idl.ypp" /* yacc.c:1906 */
+#line 6975 "fe/idl.ypp" /* yacc.c:1910 */
/* programs */
diff --git a/TAO/TAO_IDL/fe/idl.tab.hpp b/TAO/TAO_IDL/fe/idl.tab.hpp
index a14c0d7cc86..7e6713cd4ec 100644
--- a/TAO/TAO_IDL/fe/idl.tab.hpp
+++ b/TAO/TAO_IDL/fe/idl.tab.hpp
@@ -1,8 +1,8 @@
-/* A Bison parser, made by GNU Bison 3.0.2. */
+/* A Bison parser, made by GNU Bison 3.1. */
/* Bison interface for Yacc-like parsers in C
- Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc.
+ Copyright (C) 1984, 1989-1990, 2000-2015, 2018 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -127,16 +127,18 @@ extern int tao_yydebug;
IDL_LEFT_SHIFT = 337,
IDL_RIGHT_SHIFT = 338,
IDL_WCHAR_LITERAL = 339,
- IDL_WSTRING_LITERAL = 340
+ IDL_WSTRING_LITERAL = 340,
+ IDL_ANNOTATION_DECL = 341,
+ IDL_ANNOTATION_SYMBOL = 342
};
#endif
/* Value type. */
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
-typedef union YYSTYPE YYSTYPE;
+
union YYSTYPE
{
-#line 152 "fe/idl.ypp" /* yacc.c:1909 */
+#line 158 "fe/idl.ypp" /* yacc.c:1913 */
AST_Decl *dcval; /* Decl value */
UTL_StrList *slval; /* String list */
@@ -173,9 +175,18 @@ union YYSTYPE
FE_Utils::T_Param_Info *pival; /* Template interface param */
FE_Utils::T_PARAMLIST_INFO *plval; /* List of template params */
FE_Utils::T_ARGLIST *alval; /* List of template args */
-
-#line 178 "fe/idl.tab.hpp" /* yacc.c:1909 */
+ AST_Annotation_Appl *annotation_val;
+ AST_Annotation_Appls *annotations_val;
+ AST_Annotation_Appl::Param *annotation_param_val;
+ AST_Annotation_Appl::Params *annotation_params_val;
+ AST_Annotation_Decl *annotation_decl_val;
+ AST_Decls *decls_val;
+ Decl_Annotations_Pair *decl_annotations_pair_val;
+
+#line 187 "fe/idl.tab.hpp" /* yacc.c:1913 */
};
+
+typedef union YYSTYPE YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1
# define YYSTYPE_IS_DECLARED 1
#endif
diff --git a/TAO/TAO_IDL/fe/idl.ypp b/TAO/TAO_IDL/fe/idl.ypp
index 0fb4ac1ac93..9d759cf5745 100644
--- a/TAO/TAO_IDL/fe/idl.ypp
+++ b/TAO/TAO_IDL/fe/idl.ypp
@@ -62,8 +62,9 @@ trademarks or registered trademarks of Sun Microsystems, Inc.
*/
-/*
- * idl.ypp - YACC grammar for IDL 3.x
+/**
+ * \file idl.ypp
+ * \brief Bison grammar for IDL
*/
/* Declarations */
@@ -120,6 +121,10 @@ trademarks or registered trademarks of Sun Microsystems, Inc.
#include "ast_visitor_tmpl_module_inst.h"
#include "ast_visitor_tmpl_module_ref.h"
#include "ast_visitor_context.h"
+#include "ast_annotation_appl.h"
+#include "ast_union_branch.h"
+#include "ast_enum_val.h"
+#include "ast_annotation_member.h"
#include "fe_declarator.h"
#include "fe_interface_header.h"
@@ -139,9 +144,10 @@ extern "C" int tao_yywrap (void);
extern char tao_yytext[];
extern int tao_yyleng;
AST_Enum *tao_enum_constant_decl = 0;
+AST_String *tao_string_decl = 0;
AST_Expression::ExprType t_param_const_type = AST_Expression::EV_none;
#define TAO_YYDEBUG_LEXER_TEXT (tao_yytext[tao_yyleng] = '\0', tao_yytext)
-// Force the pretty debugging code to compile.
+// Compile Optional Tracing Output for Parser, can be enabled with --bison-trace
#define YYDEBUG 1
%}
@@ -185,6 +191,13 @@ AST_Expression::ExprType t_param_const_type = AST_Expression::EV_none;
FE_Utils::T_Param_Info *pival; /* Template interface param */
FE_Utils::T_PARAMLIST_INFO *plval; /* List of template params */
FE_Utils::T_ARGLIST *alval; /* List of template args */
+ AST_Annotation_Appl *annotation_val;
+ AST_Annotation_Appls *annotations_val;
+ AST_Annotation_Appl::Param *annotation_param_val;
+ AST_Annotation_Appl::Params *annotation_params_val;
+ AST_Annotation_Decl *annotation_decl_val;
+ AST_Decls *decls_val;
+ Decl_Annotations_Pair *decl_annotations_pair_val;
}
/*
@@ -281,6 +294,9 @@ AST_Expression::ExprType t_param_const_type = AST_Expression::EV_none;
%token <wcval> IDL_WCHAR_LITERAL
%token <wsval> IDL_WSTRING_LITERAL
+%token IDL_ANNOTATION_DECL
+%token IDL_ANNOTATION_SYMBOL
+
/*
* These are production names:
*/
@@ -288,9 +304,10 @@ AST_Expression::ExprType t_param_const_type = AST_Expression::EV_none;
%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> array_declarator op_type_spec wstring_type_spec
%type <dcval> param_type_spec type_dcl type_declarator actual_parameter
%type <dcval> fixed_type_spec
+%type <dcval> definition fixed_definition module const_dcl struct_forward_type
%type <idlist> scoped_name interface_type component_inheritance_spec
%type <idlist> home_inheritance_spec primary_key_spec module_header
@@ -320,7 +337,7 @@ AST_Expression::ExprType t_param_const_type = AST_Expression::EV_none;
%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 <exval> positive_int_expr array_dim annotation_member_default
%type <ulval> case_label
@@ -329,6 +346,7 @@ AST_Expression::ExprType t_param_const_type = AST_Expression::EV_none;
%type <etval> const_type integer_type char_type boolean_type
%type <etval> floating_pt_type fixed_type any_type signed_int
%type <etval> unsigned_int base_type_spec octet_type object_type
+%type <etval> annotation_member_type
%type <dival> direction
@@ -346,12 +364,20 @@ AST_Expression::ExprType t_param_const_type = AST_Expression::EV_none;
%type <ntval> formal_parameter_type
%type <pival> formal_parameter
-
%type <plval> formal_parameters at_least_one_formal_parameter
%type <sval> formal_parameter_name
%type <alval> actual_parameters at_least_one_actual_parameter
+
+%type <annotations_val> at_least_one_annotation annotations_maybe
+%type <annotation_val> annotation_appl
+%type <annotation_params_val> annotation_appl_params_maybe annotation_appl_params
+%type <annotation_params_val> named_annotation_appl_params more_named_annotation_appl_params
+%type <annotation_param_val> named_annotation_appl_param
+%type <decl_annotations_pair_val> seq_head
+
+%type <decls_val> member_i;
%%
/*
@@ -360,181 +386,190 @@ AST_Expression::ExprType t_param_const_type = AST_Expression::EV_none;
start : definitions ;
definitions
- : definitions annotations definition
- | /* EMPTY */
+ : at_least_one_definition
+ | %empty
+ ;
+
+at_least_one_definition
+ /*
+ * This is broken up into 2 rules to avoid a grammer ambiguity caused
+ * by annotations which causes shift/reduce conflicts in bison.
+ */
+ : definitions at_least_one_annotation definition
+ {
+ AST_Decl *d = $3;
+ if (d)
+ {
+ d->annotation_appls ($2);
+ }
+ else
+ {
+ idl_global->err ()-> unsupported_warning(
+ "Annotating this type of definition is not supported");
+ }
+ }
+ | definitions definition
+ {
+ }
;
definition
: fixed_definition
{
+ $$ = $1;
}
| template_module ';'
{
+ $$ = 0;
}
| template_module_inst ';'
{
+ $$ = 0;
}
;
-at_least_one_definition
- : definitions annotations definition
- ;
-
fixed_definition
- :
- /* TODO:
- annotation_dcl
+ : annotation_dcl
{
idl_global->set_parse_state (IDL_GlobalData::PS_AnnotationDeclSeen);
}
- | */
- type_dcl
+ ';'
+ {
+ idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
+ $$ = 0;
+ }
+ | type_dcl
{
-// fixed_definition : type_dcl
idl_global->set_parse_state (IDL_GlobalData::PS_TypeDeclSeen);
}
- ';'
+ ';'
{
-// ';'
idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
+ $$ = $1;
}
| typeid_dcl
{
-// | typeid_dcl
idl_global->set_parse_state (IDL_GlobalData::PS_TypeIdDeclSeen);
}
- ';'
+ ';'
{
-// ';'
idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
+ $$ = 0;
}
| typeprefix_dcl
{
-// | typeprefix_dcl
idl_global->set_parse_state (IDL_GlobalData::PS_TypePrefixDeclSeen);
}
- ';'
+ ';'
{
-// ';'
idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
+ $$ = 0;
}
| const_dcl
{
-// | const_dcl
idl_global->set_parse_state (IDL_GlobalData::PS_ConstDeclSeen);
}
- ';'
+ ';'
{
-// ';'
idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
+ $$ = $1;
}
| exception
{
-// | exception
idl_global->set_parse_state (IDL_GlobalData::PS_ExceptDeclSeen);
}
- ';'
+ ';'
{
-// ';'
- idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
+ idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
+ $$ = 0;
}
| interface_def
{
-// | interface_def
idl_global->set_parse_state (IDL_GlobalData::PS_InterfaceDeclSeen);
}
- ';'
+ ';'
{
-// ';'
idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
+ $$ = 0;
}
| module
{
-// | module
idl_global->set_parse_state (IDL_GlobalData::PS_ModuleDeclSeen);
}
- ';'
+ ';'
{
-// ';'
idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
+ $$ = $1;
}
| value_def
{
-// | value_def
idl_global->set_parse_state (IDL_GlobalData::PS_ValueTypeDeclSeen);
}
- ';'
+ ';'
{
-// ';'
idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
+ $$ = 0;
}
| component
{
-// | component
idl_global->set_parse_state (IDL_GlobalData::PS_ComponentDeclSeen);
}
- ';'
+ ';'
{
-// ';'
idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
+ $$ = 0;
}
| home_decl
{
-// | home_decl
idl_global->set_parse_state (IDL_GlobalData::PS_HomeDeclSeen);
}
- ';'
+ ';'
{
-// ';'
idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
+ $$ = 0;
}
| event
{
-// | event
idl_global->set_parse_state (IDL_GlobalData::PS_EventDeclSeen);
}
- ';'
+ ';'
{
-// ';'
idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
+ $$ = 0;
}
| porttype_decl
{
-// | porttype_decl
idl_global->set_parse_state (IDL_GlobalData::PS_PorttypeDeclSeen);
}
- ';'
+ ';'
{
-// ';'
idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
+ $$ = 0;
}
| connector_decl
{
-// | connector_decl
idl_global->set_parse_state (IDL_GlobalData::PS_ConnectorDeclSeen);
}
- ';'
+ ';'
{
-// ';'
idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
+ $$ = 0;
}
| error
{
-// | error
idl_global->err()->syntax_error (idl_global->parse_state());
}
';'
{
-// ';'
idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
yyerrok;
+ $$ = 0;
}
;
module_header
: IDL_MODULE
{
-// module_header : IDL_MODULE
idl_global->set_parse_state (IDL_GlobalData::PS_ModuleSeen);
}
scoped_name
@@ -546,7 +581,6 @@ module_header
module
: module_header
{
-// module : module_header
idl_global->set_parse_state (IDL_GlobalData::PS_ModuleIDSeen);
// The module_header rule is common to template module, fixed
@@ -569,8 +603,7 @@ module
*/
if (s != 0)
{
- m = idl_global->gen ()->create_module (s,
- $1);
+ m = idl_global->gen ()->create_module (s, $1);
(void) s->fe_add_module (m);
}
@@ -582,26 +615,26 @@ module
* Push it on the stack
*/
idl_global->scopes ().push (m);
+
+ $<dcval>$ = m;
}
'{'
{
-// '{'
- idl_global->set_parse_state (IDL_GlobalData::PS_ModuleSqSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_ModuleSqSeen);
}
at_least_one_definition
{
-// at_least_one_definition
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 ();
+ $$ = $<dcval>2;
}
;
@@ -615,7 +648,6 @@ template_module_header
template_module
: template_module_header
{
-// template_module : template_module_header
// The module_header rule is common to template module, fixed
// module and instantiated template module. In the last
// case, a fully scoped name is allowed, but here we
@@ -640,7 +672,6 @@ template_module
}
'>'
{
-// '>'
idl_global->set_parse_state (IDL_GlobalData::PS_TmplModuleParamsSeen);
AST_Template_Module *tm =
@@ -679,7 +710,6 @@ template_module
}
'}'
{
-// '}'
idl_global->set_parse_state (IDL_GlobalData::PS_TmplModuleQsSeen);
/*
@@ -702,8 +732,8 @@ at_least_one_tpl_definition
;
tpl_definitions
- : tpl_definitions annotations tpl_definition
- | /* EMPTY */
+ : tpl_definitions tpl_definition
+ | %empty
;
tpl_definition
@@ -714,19 +744,16 @@ tpl_definition
template_module_ref
: IDL_ALIAS scoped_name
{
-// template_module_ref : IDL_ALIAS scoped_name
idl_global->set_parse_state (
IDL_GlobalData::PS_ModuleRefSeen);
}
'<' at_least_one_formal_parameter_name '>'
{
-// '<' at_least_one_formal_parameter_name '>'
idl_global->set_parse_state (
IDL_GlobalData::PS_ModuleRefParamsSeen);
}
defining_id
{
-// defining_id
idl_global->set_parse_state (
IDL_GlobalData::PS_ModuleRefIDSeen);
@@ -808,19 +835,16 @@ template_module_ref
template_module_inst
: template_module_header
{
-// template_module_inst : template_module_header
idl_global->set_parse_state (
IDL_GlobalData::PS_InstModuleSeen);
}
at_least_one_actual_parameter '>'
{
-// at_least_one_actual_parameter '>'
idl_global->set_parse_state (
IDL_GlobalData::PS_InstModuleArgsSeen);
}
defining_id
{
-// defining_id
idl_global->set_parse_state (
IDL_GlobalData::PS_InstModuleIDSeen);
@@ -891,7 +915,6 @@ interface_def
interface :
interface_header
{
-// interface : interface_header
UTL_Scope *s = idl_global->scopes ().top_non_null ();
AST_Interface *i = 0;
@@ -930,17 +953,14 @@ interface :
}
'{'
{
-// '{'
idl_global->set_parse_state (IDL_GlobalData::PS_InterfaceSqSeen);
}
exports
{
-// exports
idl_global->set_parse_state (IDL_GlobalData::PS_InterfaceBodySeen);
}
'}'
{
-// '}'
idl_global->set_parse_state (IDL_GlobalData::PS_InterfaceQsSeen);
/*
@@ -953,12 +973,10 @@ interface :
interface_decl:
IDL_INTERFACE
{
-// interface_decl : IDL_INTERFACE
idl_global->set_parse_state (IDL_GlobalData::PS_InterfaceSeen);
}
defining_id
{
-// defining_id
idl_global->set_parse_state (IDL_GlobalData::PS_InterfaceIDSeen);
$$ = $3;
}
@@ -967,7 +985,6 @@ interface_decl:
interface_header :
interface_decl inheritance_spec
{
-// interface_header : interface_decl inheritance_spec
idl_global->set_parse_state (IDL_GlobalData::PS_InheritSpecSeen);
if ($2 != 0 && $2->truncatable ())
@@ -1005,7 +1022,6 @@ interface_header :
|
IDL_LOCAL interface_decl inheritance_spec
{
-// | IDL_LOCAL interface_decl inheritance_spec
idl_global->set_parse_state (IDL_GlobalData::PS_InheritSpecSeen);
/*
@@ -1036,7 +1052,6 @@ interface_header :
|
IDL_ABSTRACT interface_decl inheritance_spec
{
-// | IDL_ABSTRACT interface_decl inheritance_spec
idl_global->set_parse_state (IDL_GlobalData::PS_InheritSpecSeen);
/*
@@ -1069,18 +1084,15 @@ interface_header :
inheritance_spec
: ':' opt_truncatable
{
-// inheritance_spec : ':' opt_truncatable
idl_global->set_parse_state (IDL_GlobalData::PS_InheritColonSeen);
}
at_least_one_scoped_name
{
-// at_least_one_scoped_name
$4->truncatable ($2);
$$ = $4;
}
- | /* EMPTY */
+ | %empty
{
-/* | EMPTY */
$$ = 0;
}
;
@@ -1095,14 +1107,7 @@ value_def
valuetype
: IDL_CUSTOM value_concrete_decl
{
-// valuetype : IDL_CUSTOM value_concrete_decl
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("error in %C line %d\n"),
- idl_global->filename ()->get_string (),
- idl_global->lineno ()));
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("Sorry, I (TAO_IDL) can't handle")
- ACE_TEXT (" custom yet\n")));
+ idl_global->err ()->unsupported_error ("custom is not supported");
}
| value_concrete_decl
;
@@ -1110,7 +1115,6 @@ valuetype
value_concrete_decl :
value_header
{
-// value_concrete_decl : value_header
UTL_Scope *s = idl_global->scopes ().top_non_null ();
AST_ValueType *v = 0;
AST_Interface *i = 0;
@@ -1154,17 +1158,14 @@ value_concrete_decl :
}
'{'
{
-// '{'
idl_global->set_parse_state (IDL_GlobalData::PS_ValueTypeSqSeen);
}
value_elements
{
-// value_elements
idl_global->set_parse_state (IDL_GlobalData::PS_ValueTypeBodySeen);
}
'}'
{
-// '}'
idl_global->set_parse_state (IDL_GlobalData::PS_ValueTypeQsSeen);
AST_ValueType *vt =
@@ -1188,7 +1189,6 @@ value_abs_decl :
IDL_ABSTRACT
value_header
{
-// value_abs_decl : IDL_ABSTRACT value_header
UTL_Scope *s = idl_global->scopes ().top_non_null ();
AST_ValueType *v = 0;
AST_Interface *i = 0;
@@ -1232,17 +1232,14 @@ value_abs_decl :
}
'{'
{
-// '{'
idl_global->set_parse_state (IDL_GlobalData::PS_ValueTypeSqSeen);
}
exports
{
-// exports
idl_global->set_parse_state (IDL_GlobalData::PS_ValueTypeBodySeen);
}
'}'
{
-// '}'
idl_global->set_parse_state (IDL_GlobalData::PS_ValueTypeQsSeen);
/*
@@ -1256,12 +1253,10 @@ value_header :
value_decl
inheritance_spec
{
-// value_header : value_decl inheritance_spec
idl_global->set_parse_state (IDL_GlobalData::PS_InheritSpecSeen);
}
supports_spec
{
-// supports_spec
idl_global->set_parse_state (IDL_GlobalData::PS_SupportSpecSeen);
UTL_ScopedName *sn = 0;
@@ -1296,12 +1291,10 @@ value_header :
value_decl
: IDL_VALUETYPE
{
-// value_decl : IDL_VALUETYPE
idl_global->set_parse_state (IDL_GlobalData::PS_ValueTypeSeen);
}
defining_id
{
-// defining_id
idl_global->set_parse_state (IDL_GlobalData::PS_ValueTypeIDSeen);
$$ = $3;
}
@@ -1310,12 +1303,10 @@ value_decl
opt_truncatable :
IDL_TRUNCATABLE
{
-// opt_truncatable : IDL_TRUNCATABLE
$$ = true;
}
- | /* EMPTY */
+ | %empty
{
-/* | EMPTY */
$$ = false;
}
;
@@ -1324,10 +1315,9 @@ supports_spec :
IDL_SUPPORTS
at_least_one_scoped_name
{
-// supports_spec : IDL_SUPPORTS at_least_one_scoped_name
$$ = $2;
}
- | /* EMPTY */
+ | %empty
{
/* | EMPTY */
$$ = 0;
@@ -1338,7 +1328,6 @@ value_forward_decl :
IDL_ABSTRACT
value_decl
{
-// value_forward_decl : IDL_ABSTRACT value_decl
UTL_Scope *s = idl_global->scopes ().top_non_null ();
UTL_ScopedName n ($2,
0);
@@ -1363,7 +1352,6 @@ value_forward_decl :
|
value_decl
{
-// | value_decl
UTL_Scope *s = idl_global->scopes ().top_non_null ();
UTL_ScopedName n ($1,
0);
@@ -1390,7 +1378,6 @@ value_forward_decl :
value_box_decl
: value_decl type_spec /* in this order %!?*/
{
-// value_box_decl : value_decl type_spec
idl_global->set_parse_state (IDL_GlobalData::PS_ValueBoxDeclSeen);
UTL_Scope *s = idl_global->scopes ().top_non_null ();
@@ -1454,123 +1441,103 @@ value_box_decl
value_elements
: value_elements value_element
- | /* EMPTY */
+ | %empty
;
value_element
: state_member
| export
| init_decl
- ';'
+ ';'
;
state_member
: IDL_PUBLIC
{
-// state_member : IDL_PUBLIC
/* is $0 to member_i */
$<vival>$ = AST_Field::vis_PUBLIC;
}
member_i
{
-// member_i
}
| IDL_PRIVATE
{
-// IDL_PRIVATE
/* is $0 to member_i */
$<vival>$ = AST_Field::vis_PRIVATE;
}
member_i
{
-// member_i
}
;
exports
: exports export
- | /* EMPTY */
+ | %empty
;
export
: type_dcl
{
-// export : type_dcl
idl_global->set_parse_state (IDL_GlobalData::PS_TypeDeclSeen);
}
- ';'
+ ';'
{
-// ';'
idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
}
| typeid_dcl
{
-// | typeid_dcl
idl_global->set_parse_state (IDL_GlobalData::PS_TypeIdDeclSeen);
}
- ';'
+ ';'
{
-// ';'
idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
}
| typeprefix_dcl
{
-// | typeprefix_dcl
idl_global->set_parse_state (IDL_GlobalData::PS_TypePrefixDeclSeen);
}
- ';'
+ ';'
{
-// ';'
idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
}
| const_dcl
{
-// | const_dcl
idl_global->set_parse_state (IDL_GlobalData::PS_ConstDeclSeen);
}
- ';'
+ ';'
{
-// ';'
idl_global->set_parse_state(IDL_GlobalData::PS_NoState);
}
| exception
{
-// | exception
idl_global->set_parse_state (IDL_GlobalData::PS_ExceptDeclSeen);
}
- ';'
+ ';'
{
-// ';'
idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
}
| attribute
{
-// | attribute
idl_global->set_parse_state (IDL_GlobalData::PS_AttrDeclSeen);
}
- ';'
+ ';'
{
-// ';'
idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
}
| operation
{
-// | operation
idl_global->set_parse_state (IDL_GlobalData::PS_OpDeclSeen);
}
- ';'
+ ';'
{
-// ';'
idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
}
| error
{
-// | error
idl_global->err()->syntax_error (idl_global->parse_state());
}
';'
{
-// ';'
idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
yyerrok;
}
@@ -1579,7 +1546,6 @@ export
at_least_one_scoped_name :
scoped_name scoped_names
{
-// at_least_one_scoped_name : scoped_name scoped_names
ACE_NEW_RETURN ($<nlval>$,
UTL_NameList ($1,
$2),
@@ -1591,12 +1557,10 @@ scoped_names
: scoped_names
','
{
-// scoped_names : scoped_names ','
idl_global->set_parse_state (IDL_GlobalData::PS_SNListCommaSeen);
}
scoped_name
{
-// scoped_name
idl_global->set_parse_state (IDL_GlobalData::PS_ScopedNameSeen);
UTL_NameList *nl = 0;
@@ -1615,9 +1579,8 @@ scoped_names
$<nlval>$ = $1;
}
}
- | /* EMPTY */
+ | %empty
{
-/* | EMPTY */
$<nlval>$ = 0;
}
;
@@ -1625,7 +1588,6 @@ scoped_names
scoped_name
: id
{
-// scoped_name : id
idl_global->set_parse_state (IDL_GlobalData::PS_SN_IDSeen);
ACE_NEW_RETURN ($$,
@@ -1635,12 +1597,10 @@ scoped_name
}
| IDL_SCOPE_DELIMITOR
{
-// | IDL_SCOPE_DELIMITOR
idl_global->set_parse_state (IDL_GlobalData::PS_ScopeDelimSeen);
}
id
{
-// id
idl_global->set_parse_state (IDL_GlobalData::PS_SN_IDSeen);
Identifier *id = 0;
@@ -1662,7 +1622,6 @@ scoped_name
| scoped_name
IDL_SCOPE_DELIMITOR
{
-// | scoped_name IDL_SCOPE_DELIMITOR
idl_global->set_parse_state (IDL_GlobalData::PS_ScopeDelimSeen);
// This cleans up all the non-global "::"s in scoped names.
@@ -1673,7 +1632,6 @@ scoped_name
}
id
{
-// id
idl_global->set_parse_state (IDL_GlobalData::PS_SN_IDSeen);
UTL_IdList *sn = 0;
@@ -1688,7 +1646,6 @@ scoped_name
id : IDENTIFIER
{
-// id: IDENTIFIER
ACE_NEW_RETURN ($$,
Identifier ($1),
1);
@@ -1697,25 +1654,21 @@ id : IDENTIFIER
}
;
-defining_id : annotations IDENTIFIER
+defining_id : IDENTIFIER
{
/* defining_id is a defining identifier
whereas id is usually a reference to a defining identifier */
- ACE_NEW_RETURN ($$,
- Identifier ($2),
- 1);
- ACE::strdelete ($2);
- $2 = 0;
+ ACE_NEW_RETURN ($$, Identifier ($1), 1);
+ ACE::strdelete ($1);
+ $1 = 0;
}
;
interface_forward :
interface_decl
{
-// interface_forward : interface_decl
UTL_Scope *s = idl_global->scopes ().top_non_null ();
- UTL_ScopedName n ($1,
- 0);
+ UTL_ScopedName n ($1, 0);
if (ACE_OS::strcmp ($1->get_string (),
"TypeCode") == 0
@@ -1758,7 +1711,6 @@ interface_forward :
|
IDL_LOCAL interface_decl
{
-// | IDL_LOCAL interface_decl
UTL_Scope *s = idl_global->scopes ().top_non_null ();
UTL_ScopedName n ($2,
0);
@@ -1786,7 +1738,6 @@ interface_forward :
|
IDL_ABSTRACT interface_decl
{
-// | IDL_ABSTRACT interface_decl
UTL_Scope *s = idl_global->scopes ().top_non_null ();
UTL_ScopedName n ($2,
0);
@@ -1816,29 +1767,25 @@ interface_forward :
const_dcl :
IDL_CONST
{
-// const_dcl : IDL_CONST
idl_global->set_parse_state (IDL_GlobalData::PS_ConstSeen);
}
const_type
{
-// const_type
idl_global->set_parse_state (IDL_GlobalData::PS_ConstTypeSeen);
}
defining_id
{
-// defining_id
idl_global->set_parse_state (IDL_GlobalData::PS_ConstIDSeen);
}
'='
{
-// '='
idl_global->set_parse_state (IDL_GlobalData::PS_ConstAssignSeen);
}
expression
{
-// expression
- UTL_ScopedName n ($5,
- 0);
+ $$ = 0;
+ UTL_ScopedName n ($5, 0);
+
UTL_Scope *s = idl_global->scopes ().top_non_null ();
AST_Constant *c = 0;
idl_global->set_parse_state (IDL_GlobalData::PS_ConstExprSeen);
@@ -1849,28 +1796,24 @@ const_dcl :
*/
if ($9 != 0 && s != 0)
{
- AST_Param_Holder *param_holder =
- $9->param_holder ();
+ AST_Param_Holder *param_holder = $9->param_holder ();
AST_Expression::AST_ExprValue *result =
- $9->check_and_coerce ($3,
- tao_enum_constant_decl);
+ $9->check_and_coerce ($3, tao_enum_constant_decl);
tao_enum_constant_decl = 0;
// If the expression is a template parameter place
// holder, 'result' will be 0, but it's ok.
if (result == 0 && param_holder == 0)
{
- idl_global->err ()->coercion_error ($9,
- $3);
+ idl_global->err ()->coercion_error ($9, $3);
$9->destroy ();
delete $9;
$9 = 0;
}
else
{
- AST_Expression::ExprType et =
- $3;
+ AST_Expression::ExprType et = $3;
if (param_holder != 0
&& et != param_holder->info ()->const_type_)
@@ -1880,23 +1823,19 @@ const_dcl :
}
else
{
- c =
- idl_global->gen ()->create_constant (
- $3,
- $9,
- &n);
-
+ c = idl_global->gen ()->create_constant ($3, $9, &n);
(void) s->fe_add_constant (c);
+ $$ = c;
}
}
- $5->destroy ();
- delete $5;
- $5 = 0;
-
delete result;
result = 0;
}
+
+ $5->destroy ();
+ delete $5;
+ $5 = 0;
}
;
@@ -1909,24 +1848,14 @@ const_type
| fixed_type
| string_type_spec
{
-// const_type
-// : integer_type
-// | char_type
-// | octet_type
-// | boolean_type
-// | floating_pt_type
-// | fixed_type
-// | string_type_spec
$$ = AST_Expression::EV_string;
}
| wstring_type_spec
{
-// | wstring_type_spec
$$ = AST_Expression::EV_wstring;
}
| scoped_name
{
-// | scoped_name
UTL_Scope *s = idl_global->scopes ().top_non_null ();
AST_PredefinedType *c = 0;
AST_Typedef *t = 0;
@@ -1960,19 +1889,19 @@ const_type
{
c = AST_PredefinedType::narrow_from_decl (d);
- $<etval>$ = FE_Utils::PredefinedTypeToExprType (c->pt ());
+ $$ = FE_Utils::PredefinedTypeToExprType (c->pt ());
}
else if (d->node_type () == AST_Decl::NT_string)
{
- $<etval>$ = AST_Expression::EV_string;
+ $$ = AST_Expression::EV_string;
}
else if (d->node_type () == AST_Decl::NT_wstring)
{
- $<etval>$ = AST_Expression::EV_wstring;
+ $$ = AST_Expression::EV_wstring;
}
else if (d->node_type () == AST_Decl::NT_enum)
{
- $<etval>$ = AST_Expression::EV_enum;
+ $$ = AST_Expression::EV_enum;
tao_enum_constant_decl =
AST_Enum::narrow_from_decl (d);
}
@@ -2000,8 +1929,6 @@ const_expr : or_expr ;
or_expr : xor_expr
| or_expr '|' xor_expr
{
-// or_expr : xor_expr
-// | or_expr '|' xor_expr
$$ =
idl_global->gen ()->create_expr (
AST_Expression::EC_or,
@@ -2015,8 +1942,6 @@ xor_expr
: and_expr
| xor_expr '^' and_expr
{
-// xor_expr : and_expr
-// | xor_expr '^' and_expr
$$ =
idl_global->gen ()->create_expr (
AST_Expression::EC_xor,
@@ -2030,7 +1955,6 @@ and_expr
: shift_expr
| and_expr '&' shift_expr
{
-// and_expr : shift_expr | and_expr '&' shift_expr
$$ =
idl_global->gen ()->create_expr (
AST_Expression::EC_and,
@@ -2044,7 +1968,6 @@ shift_expr
: add_expr
| shift_expr IDL_LEFT_SHIFT add_expr
{
-// shift_expr : add_expr | shift_expr IDL_LEFT_SHIFT add_expr
$$ =
idl_global->gen ()->create_expr (
AST_Expression::EC_left,
@@ -2054,7 +1977,6 @@ shift_expr
}
| shift_expr IDL_RIGHT_SHIFT add_expr
{
-// | shift_expr IDL_RIGHT_SHIFT add_expr
$$ =
idl_global->gen ()->create_expr (
AST_Expression::EC_right,
@@ -2068,7 +1990,6 @@ add_expr
: mult_expr
| add_expr '+' mult_expr
{
-// add_expr : mult_expr | add_expr '+' mult_expr
$$ =
idl_global->gen ()->create_expr (
AST_Expression::EC_add,
@@ -2078,7 +1999,6 @@ add_expr
}
| add_expr '-' mult_expr
{
-// | add_expr '-' mult_expr
$$ =
idl_global->gen ()->create_expr (
AST_Expression::EC_minus,
@@ -2092,7 +2012,6 @@ mult_expr
: unary_expr
| mult_expr '*' unary_expr
{
-// mult_expr : unary_expr | mult_expr '*' unary_expr
$$ =
idl_global->gen ()->create_expr (
AST_Expression::EC_mul,
@@ -2102,7 +2021,6 @@ mult_expr
}
| mult_expr '/' unary_expr
{
-// | mult_expr '/' unary_expr
$$ =
idl_global->gen ()->create_expr (
AST_Expression::EC_div,
@@ -2112,7 +2030,6 @@ mult_expr
}
| mult_expr '%' unary_expr
{
-// | mult_expr '%' unary_expr
$$ =
idl_global->gen ()->create_expr (
AST_Expression::EC_mod,
@@ -2126,7 +2043,6 @@ unary_expr
: primary_expr
| '+' primary_expr
{
-// unary_expr : primary_expr | '+' primary_expr
$$ =
idl_global->gen ()->create_expr (
AST_Expression::EC_u_plus,
@@ -2136,7 +2052,6 @@ unary_expr
}
| '-' primary_expr
{
-// | '-' primary_expr
$$ =
idl_global->gen()->create_expr (
AST_Expression::EC_u_minus,
@@ -2146,7 +2061,6 @@ unary_expr
}
| '~' primary_expr
{
-// | '~' primary_expr
$$ =
idl_global->gen()->create_expr (
AST_Expression::EC_bit_neg,
@@ -2159,20 +2073,23 @@ unary_expr
primary_expr
: scoped_name
{
-// 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).
*/
+ AST_Expression *expr = 0;
UTL_Scope *s = idl_global->scopes ().top_non_null ();
AST_Decl *d =
s->lookup_by_name ($1);
if (d == 0)
{
- idl_global->err ()->lookup_error ($1);
- return 1;
+ if (!idl_global->ignore_lookup_errors_)
+ {
+ idl_global->err ()->lookup_error ($1);
+ return 1;
+ }
}
else if (d->node_type () == AST_Decl::NT_const)
{
@@ -2188,8 +2105,7 @@ primary_expr
AST_Constant *c =
AST_Constant::narrow_from_decl (d);
- $<exval>$ =
- idl_global->gen ()->create_expr (
+ expr = idl_global->gen ()->create_expr (
c->constant_value (),
c->et ());
}
@@ -2199,11 +2115,16 @@ primary_expr
// passed in this constructor, so we copy it
// and destroy it below no matter which case
// is followed.
- $<exval>$ =
- idl_global->gen ()->create_expr (
+ expr = idl_global->gen ()->create_expr (
$1->copy ());
+ if (d->node_type () == AST_Decl::NT_enum_val)
+ {
+ AST_EnumVal *enumval = AST_EnumVal::narrow_from_decl (d);
+ expr->enum_parent (enumval->enum_parent ());
+ }
}
+ $<exval>$ = expr;
$1->destroy ();
delete $1;
$1 = 0;
@@ -2211,8 +2132,6 @@ primary_expr
| literal
| '(' const_expr ')'
{
-// | literal
-// | '(' const_expr ')'
$$ = $2;
}
;
@@ -2220,18 +2139,15 @@ primary_expr
literal
: IDL_INTEGER_LITERAL
{
-// literal : IDL_INTEGER_LITERAL
$$ = idl_global->gen ()->create_expr ($1);
}
| IDL_UINTEGER_LITERAL
{
-// | IDL_UINTEGER_LITERAL
$$ =
idl_global->gen ()->create_expr ($1);
}
| IDL_STRING_LITERAL
{
-// | IDL_STRING_LITERAL
$$ = idl_global->gen ()->create_expr ($1);
$1->destroy ();
delete $1;
@@ -2239,17 +2155,14 @@ literal
}
| IDL_WSTRING_LITERAL
{
-// | IDL_WSTRING_LITERAL
$$ = idl_global->gen ()->create_expr ($1);
}
| IDL_CHARACTER_LITERAL
{
-// | IDL_CHARACTER_LITERAL
$$ = idl_global->gen ()->create_expr ($1);
}
| IDL_WCHAR_LITERAL
{
-// | IDL_WCHAR_LITERAL
ACE_OutputCDR::from_wchar wc ($1);
$$ = idl_global->gen ()->create_expr (wc);
}
@@ -2259,17 +2172,14 @@ literal
}
| IDL_FLOATING_PT_LITERAL
{
-// | IDL_FLOATING_PT_LITERAL
$$ = idl_global->gen ()->create_expr ($1);
}
| IDL_TRUETOK
{
-// | IDL_TRUETOK
$$ = idl_global->gen ()->create_expr (true);
}
| IDL_FALSETOK
{
-// | IDL_FALSETOK
$$ = idl_global->gen ()->create_expr (false);
}
;
@@ -2277,7 +2187,6 @@ literal
positive_int_expr :
const_expr
{
-// positive_int_expr : const_expr
int good_expression = 1;
$1->evaluate (AST_Expression::EK_positive_int);
AST_Expression::AST_ExprValue *ev = $1->ev ();
@@ -2343,69 +2252,302 @@ positive_int_expr :
}
;
-/* Annotations
- TODO: actions
- TODO: annotation_dcl and friends
- */
+annotation_dcl
+ : IDL_ANNOTATION_DECL defining_id '{'
+ {
+ if (idl_global->idl_version_ < IDL_VERSION_4)
+ {
+ idl_global->err ()->idl_version_error (
+ "Annotations are an IDL4 feature");
+ }
+
+ Identifier *id = $2;
+ UTL_ScopedName name (id, 0);
+ AST_Annotation_Decl::escape_name (&name);
+ AST_Annotation_Decl *annotation_decl = idl_global->gen ()->
+ create_annotation_decl (&name);
+ idl_global->scopes ().top_non_null ()->
+ fe_add_annotation_decl (annotation_decl);
+ idl_global->scopes ().push (annotation_decl);
+ }
+ annotation_body '}'
+ {
+ Identifier *id = $2;
+ idl_global->scopes ().pop ();
+ id->destroy ();
+ delete id;
+ }
+ ;
+
+annotation_body
+ : annotation_body annotation_statement
+ | %empty
+ ;
+
+annotation_statement
+ : annotation_member
+ | const_dcl ';'
+ | enum_type ';'
+ | IDL_TYPEDEF
+ {
+ idl_global->set_parse_state (IDL_GlobalData::PS_TypedefSeen);
+ idl_global->in_typedef (true);
+ }
+ type_declarator ';'
+ ;
+
+annotation_member_type
+ : const_type
+ | any_type
+ ;
+
+annotation_member
+ : annotation_member_type defining_id annotation_member_default ';'
+ {
+ UTL_Scope *scope = idl_global->scopes ().top_non_null ();
+ UTL_Scope *root = idl_global->scopes ().bottom ();
+
+ AST_Expression::ExprType type = $1;
+ Identifier *name = $2;
+ UTL_ScopedName scoped_name (name, 0);
+ AST_Expression *default_value = $3;
+
+ AST_Decl * type_obj;
+ switch (type)
+ {
+ case AST_Expression::EV_string:
+ case AST_Expression::EV_wstring:
+ type_obj = tao_string_decl;
+ break;
+ case AST_Expression::EV_enum:
+ type_obj = tao_enum_constant_decl;
+ break;
+ default:
+ type_obj = root->lookup_primitive_type (type);
+ }
+
+ FE_Declarator *declarator = new FE_Declarator (
+ &scoped_name, FE_Declarator::FD_simple, 0);
+ AST_Annotation_Member *member = idl_global->gen ()->
+ create_annotation_member (
+ type, declarator->compose (type_obj), declarator->name ());
+ scope->fe_add_annotation_member (member);
+
+ if (default_value)
+ {
+ // Check if types are compatible, else report error
+ AST_Expression::AST_ExprValue *result =
+ default_value->check_and_coerce (type, tao_enum_constant_decl);
+ tao_enum_constant_decl = 0;
+ if (result)
+ {
+ member->value (default_value);
+ }
+ else
+ {
+ idl_global->err ()->coercion_error (default_value, type);
+ }
+ delete result;
+ }
+ }
+ ;
+
+annotation_member_default
+ : IDL_DEFAULT const_expr
+ {
+ $$ = $2;
+ }
+ | %empty
+ {
+ $$ = 0;
+ }
+ ;
-annotations
- : annotations annotation_appl
- | /* EMPTY */
+at_least_one_annotation
+ : annotations_maybe annotation_appl
+ {
+ AST_Annotation_Appls *annotations = $1;
+ AST_Annotation_Appl *annotation = $2;
+ if (annotation)
+ {
+ annotations->push_back (annotation);
+ }
+ $$ = annotations;
+ }
+ ;
+
+annotations_maybe
+ : annotations_maybe annotation_appl
+ {
+ AST_Annotation_Appls *annotations = $1;
+ AST_Annotation_Appl *annotation = $2;
+ if (annotation)
+ {
+ annotations->push_back (annotation);
+ }
+ $$ = annotations;
+ }
+ | %empty
+ {
+ $$ = new AST_Annotation_Appls ();
+ }
;
annotation_appl
- : '@' scoped_name '(' annotation_appl_params ')'
- | '@' scoped_name
+ : IDL_ANNOTATION_SYMBOL scoped_name
+ {
+ if (idl_global->idl_version_ < IDL_VERSION_4)
+ {
+ idl_global->err ()->idl_version_error (
+ "Annotations are an IDL4 feature");
+ }
+
+ AST_Annotation_Decl *decl = 0;
+ UTL_ScopedName *name = $2;
+ AST_Annotation_Decl::escape_name (name);
+
+ // Check for Matching Annotation Declaration
+ AST_Decl *d = idl_global->scopes ().top_non_null ()->
+ lookup_by_name (name);
+ if (d)
+ {
+ decl = AST_Annotation_Decl::narrow_from_decl (d);
+ if (decl)
+ {
+ idl_global->scopes ().push (decl);
+ }
+ }
+ else
+ {
+ Identifier &id = *name->last_component ();
+ switch (idl_global->unknown_annotations_)
+ {
+ default:
+ case IDL_GlobalData::UNKNOWN_ANNOTATIONS_WARN_ONCE:
+ if (idl_global->unknown_annotations_seen_.insert (id) == 1)
+ {
+ break;
+ }
+ idl_global->err ()->lookup_warning (name);
+ break;
+ case IDL_GlobalData::UNKNOWN_ANNOTATIONS_WARN_ALL:
+ idl_global->err ()->lookup_warning (name);
+ break;
+ case IDL_GlobalData::UNKNOWN_ANNOTATIONS_ERROR:
+ idl_global->err ()->lookup_error (name);
+ break;
+ case IDL_GlobalData::UNKNOWN_ANNOTATIONS_IGNORE:
+ break;
+ }
+
+ // Ignore lookup errors for parameter values that might depend
+ // on constants or enums from the annotation declaration.
+ idl_global->ignore_lookup_errors_ = true;
+ }
+
+ $<annotation_decl_val>$ = decl;
+ }
+ annotation_appl_params_maybe
+ {
+ idl_global->ignore_lookup_errors_ = false;
+ AST_Annotation_Appl *appl = 0;
+ UTL_ScopedName *name = $2;
+ AST_Annotation_Decl *decl = $<annotation_decl_val>3;
+ AST_Annotation_Appl::Params *params = $4;
+
+ if (decl)
+ {
+ appl = idl_global->gen ()->create_annotation_appl (name, params);
+ appl->apply_from (decl);
+ idl_global->scopes ().pop ();
+ }
+
+ $$ = appl;
+ }
+ ;
+
+annotation_appl_params_maybe
+ : '(' annotation_appl_params ')'
+ {
+ $$ = $2;
+ }
+ | %empty
+ {
+ $$ = 0;
+ }
;
annotation_appl_params
: const_expr
- | at_least_one_annotation_appl_param
+ {
+ AST_Annotation_Appl::Params *params = new AST_Annotation_Appl::Params;
+ AST_Annotation_Appl::Param *param = new AST_Annotation_Appl::Param;
+ param->id = 0;
+ param->expr = $1;
+ params->push (param);
+ $$ = params;
+ }
+ | named_annotation_appl_params
+ {
+ $$ = $1;
+ }
;
-at_least_one_annotation_appl_param :
- annotation_appl_param annotation_appl_named_params
- ;
+named_annotation_appl_params
+ : named_annotation_appl_param more_named_annotation_appl_params
+ {
+ AST_Annotation_Appl::Params *params = $2;
+ params->push ($1);
+ $$ = params;
+ }
-annotation_appl_named_params
- : annotation_appl_named_params ',' annotation_appl_param
- | /* EMPTY */
+more_named_annotation_appl_params
+ : ',' named_annotation_appl_param more_named_annotation_appl_params
+ {
+ AST_Annotation_Appl::Params *params = $3;
+ params->push ($2);
+ $$ = params;
+ }
+ | %empty
+ {
+ $$ = new AST_Annotation_Appl::Params;
+ }
;
-annotation_appl_param
- : IDENTIFIER '=' const_expr
+named_annotation_appl_param
+ : id '=' const_expr
+ {
+ AST_Annotation_Appl::Param *param = new AST_Annotation_Appl::Param;
+ param->id = $1;
+ param->expr = $3;
+ $$ = param;
+ }
;
type_dcl
: IDL_TYPEDEF
{
-// type_dcl : IDL_TYPEDEF
idl_global->set_parse_state (IDL_GlobalData::PS_TypedefSeen);
idl_global->in_typedef (true);
}
type_declarator
{
-// type_declarator
- $$ = 0;
+ $$ = $3;
}
| struct_type
{
-// | struct_type
- $$ = 0;
+ $$ = $1;
}
| union_type
{
-// | union_type
- $$ = 0;
+ $$ = $1;
}
| enum_type
{
-// | enum_type
- $$ = 0;
+ $$ = $1;
}
| IDL_NATIVE simple_declarator
{
-// | IDL_NATIVE simple_declarator
UTL_Scope *s = idl_global->scopes ().top_non_null ();
AST_Native *node = 0;
idl_global->set_parse_state (IDL_GlobalData::PS_NativeSeen);
@@ -2432,7 +2574,6 @@ type_dcl
}
| constructed_forward_type_spec
{
-// | constructed_forward_type_spec
$$ = 0;
}
;
@@ -2440,12 +2581,10 @@ type_dcl
type_declarator :
type_spec
{
-// type_declarator : type_spec
idl_global->set_parse_state (IDL_GlobalData::PS_TypeSpecSeen);
}
at_least_one_declarator
{
-// at_least_one_declarator
UTL_Scope *s = idl_global->scopes ().top_non_null ();
FE_Declarator *d = 0;
AST_Typedef *t = 0;
@@ -2506,6 +2645,8 @@ type_declarator :
delete $3;
$3 = 0;
}
+
+ $$ = t;
}
;
@@ -2517,7 +2658,6 @@ type_spec
simple_type_spec
: base_type_spec
{
-// simple_type_spec : base_type_spec
$$ =
idl_global->scopes ().bottom ()->lookup_primitive_type (
$1
@@ -2526,8 +2666,6 @@ simple_type_spec
| template_type_spec
| scoped_name
{
-// | template_type_spec
-// | scoped_name
UTL_Scope *s = idl_global->scopes ().top_non_null ();
AST_Decl *d = 0;
@@ -2583,7 +2721,6 @@ constructed_forward_type_spec
at_least_one_declarator :
declarator declarators
{
-// at_least_one_declarator : declarator declarators
ACE_NEW_RETURN ($$,
UTL_DeclList ($1,
$2),
@@ -2595,12 +2732,10 @@ declarators
: declarators
','
{
-// declarators : declarators ','
idl_global->set_parse_state (IDL_GlobalData::PS_DeclsCommaSeen);
}
declarator
{
-// declarator
idl_global->set_parse_state (IDL_GlobalData::PS_DeclsDeclSeen);
UTL_DeclList *dl = 0;
@@ -2619,9 +2754,8 @@ declarators
$<dlval>$ = $1;
}
}
- | /* EMPTY */
+ | %empty
{
-/* | EMPTY */
$<dlval>$ = 0;
}
;
@@ -2634,7 +2768,6 @@ declarator
at_least_one_simple_declarator :
simple_declarator simple_declarators
{
-// at_least_one_simple_declarator : simple_declarator simple_declarators
ACE_NEW_RETURN ($<dlval>$,
UTL_DeclList ($1,
$2),
@@ -2646,12 +2779,10 @@ simple_declarators
: simple_declarators
','
{
-// simple_declarators : simple_declarators ','
idl_global->set_parse_state (IDL_GlobalData::PS_DeclsCommaSeen);
}
simple_declarator
{
-// simple_declarator
idl_global->set_parse_state (IDL_GlobalData::PS_DeclsDeclSeen);
UTL_DeclList *dl = 0;
@@ -2670,9 +2801,8 @@ simple_declarators
$<dlval>$ = $1;
}
}
- | /* EMPTY */
+ | %empty
{
-/* | EMPTY */
$<dlval>$ = 0;
}
;
@@ -2680,7 +2810,6 @@ simple_declarators
simple_declarator :
defining_id
{
-// simple_declarator : defining_id
UTL_ScopedName *sn = 0;
ACE_NEW_RETURN (sn,
UTL_ScopedName ($1,
@@ -2697,7 +2826,6 @@ simple_declarator :
complex_declarator :
array_declarator
{
-// complex_declarator : array_declarator
UTL_ScopedName *sn = 0;
ACE_NEW_RETURN (sn,
UTL_ScopedName (
@@ -2721,17 +2849,14 @@ integer_type
signed_int
: IDL_LONG
{
-// signed_int : IDL_LONG
$$ = AST_Expression::EV_long;
}
| IDL_LONG IDL_LONG
{
-// | IDL_LONG IDL_LONG
$$ = AST_Expression::EV_longlong;
}
| IDL_SHORT
{
-// | IDL_SHORT
$$ = AST_Expression::EV_short;
}
;
@@ -2739,17 +2864,14 @@ signed_int
unsigned_int
: IDL_UNSIGNED IDL_LONG
{
-// unsigned_int : IDL_UNSIGNED IDL_LONG
$$ = AST_Expression::EV_ulong;
}
| IDL_UNSIGNED IDL_LONG IDL_LONG
{
-// | IDL_UNSIGNED IDL_LONG IDL_LONG
$$ = AST_Expression::EV_ulonglong;
}
| IDL_UNSIGNED IDL_SHORT
{
-// | IDL_UNSIGNED IDL_SHORT
$$ = AST_Expression::EV_ushort;
}
;
@@ -2757,17 +2879,14 @@ unsigned_int
floating_pt_type
: IDL_DOUBLE
{
-// floating_pt_type : IDL_DOUBLE
$$ = AST_Expression::EV_double;
}
| IDL_FLOAT
{
-// | IDL_FLOAT
$$ = AST_Expression::EV_float;
}
| IDL_LONG IDL_DOUBLE
{
-// | IDL_LONG IDL_DOUBLE
$$ = AST_Expression::EV_longdouble;
}
;
@@ -2775,7 +2894,6 @@ floating_pt_type
fixed_type
: IDL_FIXED
{
-// fixed_type : IDL_FIXED
$$ = AST_Expression::EV_fixed;
}
;
@@ -2783,12 +2901,10 @@ fixed_type
char_type
: IDL_CHAR
{
-// char_type : IDL_CHAR
$$ = AST_Expression::EV_char;
}
| IDL_WCHAR
{
-// | IDL_WCHAR
$$ = AST_Expression::EV_wchar;
}
;
@@ -2796,7 +2912,6 @@ char_type
octet_type
: IDL_OCTET
{
-// octet_type : IDL_OCTET
$$ = AST_Expression::EV_octet;
}
;
@@ -2804,7 +2919,6 @@ octet_type
boolean_type
: IDL_BOOLEAN
{
-// boolean_type : IDL_BOOLEAN
$$ = AST_Expression::EV_bool;
}
;
@@ -2812,7 +2926,6 @@ boolean_type
any_type
: IDL_ANY
{
-// any_type : IDL_ANY
$$ = AST_Expression::EV_any;
}
;
@@ -2820,7 +2933,6 @@ any_type
object_type
: IDL_OBJECT
{
-// object_type : IDL_OBJECT
$$ = AST_Expression::EV_object;
}
;
@@ -2828,12 +2940,10 @@ object_type
struct_decl :
IDL_STRUCT
{
-// struct_decl : IDL_STRUCT
idl_global->set_parse_state (IDL_GlobalData::PS_StructSeen);
}
defining_id
{
-// defining_id
idl_global->set_parse_state (IDL_GlobalData::PS_StructIDSeen);
$$ = $3;
}
@@ -2843,10 +2953,8 @@ struct_decl :
struct_type
: struct_decl
{
-// struct_type : struct_header
UTL_Scope *s = idl_global->scopes ().top_non_null ();
- UTL_ScopedName n ($1,
- 0);
+ UTL_ScopedName n ($1, 0);
AST_Structure *d = 0;
/*
@@ -2861,8 +2969,7 @@ struct_type
s->is_local (),
s->is_abstract ()
);
- AST_Structure::fwd_redefinition_helper (d,
- s);
+ AST_Structure::fwd_redefinition_helper (d, s);
(void) s->fe_add_structure (d);
}
@@ -2877,17 +2984,14 @@ struct_type
}
'{'
{
-// '{'
idl_global->set_parse_state (IDL_GlobalData::PS_StructSqSeen);
}
at_least_one_member
{
-// at_least_one_member
idl_global->set_parse_state (IDL_GlobalData::PS_StructBodySeen);
}
'}'
{
-// '}'
idl_global->set_parse_state (IDL_GlobalData::PS_StructQsSeen);
/*
@@ -2904,56 +3008,61 @@ at_least_one_member : member members ;
members
: members member
- | /* EMPTY */
+ | %empty
;
member :
{
-// member :
/* is $0 to member_i */
$<vival>$ = AST_Field::vis_NA;
}
- member_i
+ annotations_maybe member_i
+ {
+ if ($3)
+ {
+ AST_Decls & decls = *$3;
+ for (size_t i = 0; i < decls.size (); i++)
+ {
+ decls[i]->annotation_appls ($2);
+ }
+ }
+ }
;
member_i :
- annotations
type_spec
{
-// member_i : type_spec
idl_global->set_parse_state (IDL_GlobalData::PS_MemberTypeSeen);
}
at_least_one_declarator
{
-// at_least_one_declarator
idl_global->set_parse_state (IDL_GlobalData::PS_MemberDeclsSeen);
}
- ';'
+ ';'
{
-// ';'
UTL_Scope *s = idl_global->scopes ().top_non_null ();
FE_Declarator *d = 0;
AST_Field *f = 0;
idl_global->set_parse_state (IDL_GlobalData::PS_MemberDeclsCompleted);
+ AST_Decls *members = 0;
/*
* Check for illegal recursive use of type.
*/
- if ($2 != 0
- && AST_illegal_recursive_type ($2))
+ if ($1 != 0
+ && AST_illegal_recursive_type ($1))
{
idl_global->err ()->error1 (UTL_Error::EIDL_RECURSIVE_TYPE,
- $2);
+ $1);
}
/*
* Create a node representing a struct or exception member
* Add it to the enclosing scope.
*/
- else if (s != 0
- && $2 != 0
- && $4 != 0)
+ else if (s && $1 && $3)
{
- for (UTL_DecllistActiveIterator l ($4);
+ members = new AST_Decls;
+ for (UTL_DecllistActiveIterator l ($3);
!l.is_done ();
l.next ())
{
@@ -2964,7 +3073,7 @@ member_i :
continue;
}
- AST_Type *tp = d->compose ($2);
+ AST_Type *tp = d->compose ($1);
if (tp == 0)
{
@@ -2978,22 +3087,23 @@ member_i :
d->name (),
$<vival>0
);
+ members->push_back (f);
(void) s->fe_add_field (f);
}
}
- $4->destroy ();
- delete $4;
- $4 = 0;
+ $3->destroy ();
+ delete $3;
+ $3 = 0;
+
+ $$ = members;
}
| error
{
-// | error
idl_global->err()->syntax_error (idl_global->parse_state ());
}
- ';'
+ ';'
{
-// ';'
idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
yyerrok;
}
@@ -3002,12 +3112,10 @@ member_i :
union_decl :
IDL_UNION
{
-// union_decl : IDL_UNION
idl_global->set_parse_state (IDL_GlobalData::PS_UnionSeen);
}
defining_id
{
-// defining_id
idl_global->set_parse_state (IDL_GlobalData::PS_UnionIDSeen);
$$ = $3;
}
@@ -3016,15 +3124,12 @@ union_decl :
union_type
: union_decl IDL_SWITCH
{
-// union_type : union_decl IDL_SWITCH
idl_global->set_parse_state (IDL_GlobalData::PS_SwitchSeen);
}
'('
{
-// '('
UTL_Scope *s = idl_global->scopes ().top_non_null ();
- UTL_ScopedName n ($1,
- 0);
+ UTL_ScopedName n ($1, 0);
AST_Union *u = 0;
idl_global->set_parse_state (IDL_GlobalData::PS_SwitchOpenParSeen);
@@ -3040,8 +3145,7 @@ union_type
s->is_abstract ());
AST_Structure *st = AST_Structure::narrow_from_decl (u);
- AST_Structure::fwd_redefinition_helper (st,
- s);
+ AST_Structure::fwd_redefinition_helper (st, s);
u = AST_Union::narrow_from_decl (st);
(void) s->fe_add_union (u);
}
@@ -3055,14 +3159,12 @@ union_type
* Don't delete $1 yet; we'll need it a bit later.
*/
}
- switch_type_spec
+ annotations_maybe switch_type_spec
{
-// switch_type_spec
idl_global->set_parse_state (IDL_GlobalData::PS_SwitchTypeSeen);
}
')'
{
-// ')'
/*
* The top of the scopes must be an empty union we added after we
* encountered 'union <id> switch ('. Now we are ready to add a
@@ -3073,22 +3175,20 @@ union_type
idl_global->scopes ().pop ();
UTL_Scope *s = idl_global->scopes ().top_non_null ();
- UTL_ScopedName n ($1,
- 0);
+ UTL_ScopedName n ($1, 0);
idl_global->set_parse_state (IDL_GlobalData::PS_SwitchCloseParSeen);
/*
* Create a node representing a union.
*/
- if ($6 != 0
- && s != 0)
+ if ($7 != 0 && s != 0)
{
AST_ConcreteType *tp =
- AST_ConcreteType::narrow_from_decl ($6);
+ AST_ConcreteType::narrow_from_decl ($7);
if (tp == 0)
{
- idl_global->err ()->not_a_type ($6);
+ idl_global->err ()->not_a_type ($7);
}
else
{
@@ -3098,10 +3198,12 @@ union_type
&n,
s->is_local (),
s->is_abstract ());
+
/* Narrow the enclosing scope. */
AST_Union *e = AST_Union::narrow_from_scope (top);
e->redefine (u);
+ e->disc_annotations ($6); // Set Discriminator Annotations
u->destroy ();
delete u;
@@ -3119,17 +3221,14 @@ union_type
}
'{'
{
-// '{'
idl_global->set_parse_state (IDL_GlobalData::PS_UnionSqSeen);
}
at_least_one_case_branch
{
-// at_least_one_case_branch
idl_global->set_parse_state (IDL_GlobalData::PS_UnionBodySeen);
}
'}'
{
-// '}'
idl_global->set_parse_state (IDL_GlobalData::PS_UnionQsSeen);
/*
@@ -3149,7 +3248,6 @@ union_type
switch_type_spec :
integer_type
{
-// switch_type_spec : integer_type
$$ =
idl_global->scopes ().bottom ()->lookup_primitive_type (
$1
@@ -3157,7 +3255,6 @@ switch_type_spec :
}
| char_type
{
-// | char_type
/* wchars are not allowed. */
if ($1 == AST_Expression::EV_wchar)
{
@@ -3171,7 +3268,6 @@ switch_type_spec :
}
| octet_type
{
-// | octet_type
/* octets are not allowed. */
idl_global->err ()->error0 (UTL_Error::EIDL_DISC_TYPE);
$$ =
@@ -3181,7 +3277,6 @@ switch_type_spec :
}
| boolean_type
{
-// | boolean_type
$$ =
idl_global->scopes ().bottom ()->lookup_primitive_type (
$1
@@ -3190,8 +3285,6 @@ switch_type_spec :
| enum_type
| scoped_name
{
-// | enum_type
-// | scoped_name
UTL_Scope *s = idl_global->scopes ().top_non_null ();
AST_Decl *d = 0;
AST_PredefinedType *p = 0;
@@ -3287,7 +3380,10 @@ switch_type_spec :
$1 = 0;
/* If we don't return here, we'll crash later.*/
- return 1;
+ if (!idl_global->ignore_lookup_errors_)
+ {
+ return 1;
+ }
}
$1->destroy ();
@@ -3300,23 +3396,20 @@ at_least_one_case_branch : case_branch case_branches ;
case_branches
: case_branches case_branch
- | /* empty */
+ | %empty
;
case_branch :
at_least_one_case_label
{
-// case_branch : at_least_one_case_label
idl_global->set_parse_state (IDL_GlobalData::PS_UnionLabelSeen);
}
- annotations element_spec
+ annotations_maybe element_spec
{
-// annotations element_spec
idl_global->set_parse_state (IDL_GlobalData::PS_UnionElemSeen);
}
- ';'
+ ';'
{
-// ';'
UTL_Scope *s = idl_global->scopes ().top_non_null ();
AST_UnionBranch *b = 0;
AST_Field *f = $4;
@@ -3326,9 +3419,7 @@ case_branch :
* Create several nodes representing branches of a union.
* Add them to the enclosing scope (the union scope)
*/
- if (s != 0
- && $1 != 0
- && $4 != 0)
+ if (s != 0 && $1 != 0 && $4 != 0)
{
b =
idl_global->gen ()->create_union_branch (
@@ -3336,6 +3427,7 @@ case_branch :
f->field_type (),
f->name ()
);
+ b->annotation_appls ($3);
(void) s->fe_add_union_branch (b);
// f has passed its field type to the union branch,
@@ -3347,12 +3439,10 @@ case_branch :
}
| error
{
-// | error
idl_global->err()->syntax_error (idl_global->parse_state());
}
- ';'
+ ';'
{
-// ';'
idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
yyerrok;
}
@@ -3361,7 +3451,6 @@ case_branch :
at_least_one_case_label :
case_label case_labels
{
-// at_least_one_case_label : case_label case_labels
ACE_NEW_RETURN ($<llval>$,
UTL_LabelList ($1,
$2),
@@ -3370,12 +3459,11 @@ at_least_one_case_label :
;
case_labels
- : case_labels annotations case_label
+ : case_labels case_label
{
-// case_labels : case_labels annotations case_label
UTL_LabelList *ll = 0;
ACE_NEW_RETURN (ll,
- UTL_LabelList ($3,
+ UTL_LabelList ($2,
0),
1);
@@ -3389,9 +3477,8 @@ case_labels
$<llval>$ = $1;
}
}
- | /* EMPTY */
+ | %empty
{
-/* | EMPTY */
$<llval>$ = 0;
}
;
@@ -3399,12 +3486,10 @@ case_labels
case_label
: IDL_DEFAULT
{
-// 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 (
@@ -3414,7 +3499,6 @@ case_label
}
| IDL_CASE
{
-// | IDL_CASE
idl_global->set_parse_state (IDL_GlobalData::PS_CaseSeen);
}
const_expr
@@ -3423,7 +3507,6 @@ case_label
}
':'
{
-// const_expr
idl_global->set_parse_state (IDL_GlobalData::PS_LabelColonSeen);
$$ = idl_global->gen()->create_union_label (
@@ -3436,12 +3519,10 @@ case_label
element_spec :
type_spec
{
-// element_spec : type_spec
idl_global->set_parse_state (IDL_GlobalData::PS_UnionElemTypeSeen);
}
declarator
{
-// declarator
idl_global->set_parse_state (IDL_GlobalData::PS_UnionElemDeclSeen);
/*
@@ -3489,7 +3570,6 @@ element_spec :
struct_forward_type
: struct_decl
{
-// struct_forward_type : struct_decl
UTL_Scope *s = idl_global->scopes ().top_non_null ();
UTL_ScopedName n ($1,
0);
@@ -3507,13 +3587,14 @@ struct_forward_type
$1->destroy ();
delete $1;
$1 = 0;
+
+ $$ = d;
}
;
union_forward_type
: union_decl
{
-// union_forward_type : union_decl
UTL_Scope *s = idl_global->scopes ().top_non_null ();
UTL_ScopedName n ($1,
0);
@@ -3537,15 +3618,12 @@ union_forward_type
enum_type :
IDL_ENUM
{
-// enum_type : IDL_ENUM
idl_global->set_parse_state (IDL_GlobalData::PS_EnumSeen);
}
defining_id
{
-// defining_id
UTL_Scope *s = idl_global->scopes ().top_non_null ();
- UTL_ScopedName n ($3,
- 0);
+ UTL_ScopedName n ($3, 0);
AST_Enum *e = 0;
idl_global->set_parse_state (IDL_GlobalData::PS_EnumIDSeen);
@@ -3575,17 +3653,14 @@ enum_type :
}
'{'
{
-// '{'
idl_global->set_parse_state (IDL_GlobalData::PS_EnumSqSeen);
}
at_least_one_enumerator
{
-// at_least_one_enumerator
idl_global->set_parse_state (IDL_GlobalData::PS_EnumBodySeen);
}
'}'
{
-// '}'
idl_global->set_parse_state (IDL_GlobalData::PS_EnumQsSeen);
/*
@@ -3611,23 +3686,20 @@ enumerators
: enumerators
','
{
-// enumerators : enumerators ','
idl_global->set_parse_state (IDL_GlobalData::PS_EnumCommaSeen);
}
enumerator
- | /* EMPTY */
+ | %empty
;
enumerator :
- annotations IDENTIFIER
+ annotations_maybe IDENTIFIER
{
-// enumerator : annotations IDENTIFIER
UTL_Scope *s = idl_global->scopes ().top_non_null ();
Identifier id ($2);
ACE::strdelete ($2);
$2 = 0;
- UTL_ScopedName n (&id,
- 0);
+ UTL_ScopedName n (&id, 0);
AST_EnumVal *e = 0;
AST_Enum *c = 0;
@@ -3646,6 +3718,8 @@ enumerator :
c->next_enum_val (),
&n
);
+ e->enum_parent (c);
+ e->annotation_appls ($1);
}
(void) s->fe_add_enum_val (e);
@@ -3657,19 +3731,27 @@ sequence_type_spec
: seq_head
','
{
-// sequence_type_spec : seq_head ','
idl_global->set_parse_state (IDL_GlobalData::PS_SequenceCommaSeen);
}
positive_int_expr
{
-// positive_int_expr
idl_global->set_parse_state (IDL_GlobalData::PS_SequenceExprSeen);
}
'>'
{
-// '>'
idl_global->set_parse_state (IDL_GlobalData::PS_SequenceQsSeen);
+ AST_Sequence *seq = 0;
+ Decl_Annotations_Pair *seq_head = $1;
+ AST_Decl *type = 0;
+ AST_Annotation_Appls *type_annotations = 0;
+ if (seq_head)
+ {
+ type = seq_head->decl;
+ type_annotations = seq_head->annotations;
+ }
+ delete seq_head;
+
/*
* Remove sequence marker from scopes stack.
*/
@@ -3702,15 +3784,10 @@ sequence_type_spec
{
idl_global->err ()->coercion_error ($4,
AST_Expression::EV_ulong);
- $<dcval>$ = 0;
}
- else if (0 == $1)
+ else if (type)
{
- $<dcval>$ = 0;
- }
- else
- {
- AST_Type *tp = AST_Type::narrow_from_decl ($1);
+ AST_Type *tp = AST_Type::narrow_from_decl (type);
if (0 == tp)
{
@@ -3722,7 +3799,7 @@ sequence_type_spec
UTL_ScopedName sn (&id,
0);
- $$ =
+ seq =
idl_global->gen ()->create_sequence (
$4,
tp,
@@ -3730,6 +3807,7 @@ sequence_type_spec
s->is_local (),
s->is_abstract ()
);
+ seq->base_type_annotations (type_annotations);
if (!idl_global->in_typedef ()
&& !idl_global->anon_silent ())
@@ -3741,13 +3819,24 @@ sequence_type_spec
delete ev;
ev = 0;
+ $$ = seq;
}
| seq_head
'>'
{
-// | seq_head '>'
idl_global->set_parse_state (IDL_GlobalData::PS_SequenceQsSeen);
+ AST_Sequence *seq = 0;
+ Decl_Annotations_Pair *seq_head = $1;
+ AST_Decl *type = 0;
+ AST_Annotation_Appls *type_annotations = 0;
+ if (seq_head)
+ {
+ type = seq_head->decl;
+ type_annotations = seq_head->annotations;
+ }
+ delete seq_head;
+
/*
* Remove sequence marker from scopes stack.
*/
@@ -3761,13 +3850,9 @@ sequence_type_spec
/*
* Create a node representing a sequence.
*/
- if ($1 == 0)
- {
- $$ = 0;
- }
- else
+ if (type)
{
- AST_Type *tp = AST_Type::narrow_from_decl ($1);
+ AST_Type *tp = AST_Type::narrow_from_decl (type);
if (tp == 0)
{
@@ -3779,7 +3864,7 @@ sequence_type_spec
UTL_ScopedName sn (&id, 0);
ACE_CDR::ULong bound = 0UL;
- $$ =
+ seq =
idl_global->gen ()->create_sequence (
idl_global->gen ()->create_expr (
bound,
@@ -3790,6 +3875,7 @@ sequence_type_spec
s->is_local (),
s->is_abstract ()
);
+ seq->base_type_annotations (type_annotations);
if (!idl_global->in_typedef ()
&& !idl_global->anon_silent ())
@@ -3798,13 +3884,14 @@ sequence_type_spec
}
}
}
+
+ $$ = seq;
}
;
seq_head :
IDL_SEQUENCE
{
-// seq_head : IDL_SEQUENCE
idl_global->set_parse_state (IDL_GlobalData::PS_SequenceSeen);
/*
@@ -3814,14 +3901,15 @@ seq_head :
}
'<'
{
-// '<'
idl_global->set_parse_state (IDL_GlobalData::PS_SequenceSqSeen);
}
- simple_type_spec
+ annotations_maybe simple_type_spec
{
-// simple_type_spec
idl_global->set_parse_state (IDL_GlobalData::PS_SequenceTypeSeen);
- $$ = $5;
+ Decl_Annotations_Pair *seq_head = new Decl_Annotations_Pair;
+ seq_head->decl = $6;
+ seq_head->annotations = $5;
+ $$ = seq_head;
}
;
@@ -3837,17 +3925,14 @@ string_type_spec
: string_head
'<'
{
-// string_type_spec : string_head '<'
idl_global->set_parse_state (IDL_GlobalData::PS_StringSqSeen);
}
positive_int_expr
{
-// positive_int_expr
idl_global->set_parse_state (IDL_GlobalData::PS_StringExprSeen);
}
'>'
{
-// '>'
idl_global->set_parse_state (IDL_GlobalData::PS_StringQsSeen);
/*
@@ -3868,21 +3953,21 @@ string_type_spec
}
else
{
- $$ = idl_global->gen ()->create_string ($4);
+ tao_string_decl = 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 (
- $$
- )
- );
+ idl_global->root ()->fe_add_string (
+ AST_String::narrow_from_decl (
+ tao_string_decl));
- if (!idl_global->in_typedef ()
- && !idl_global->anon_silent ())
+ if (!idl_global->in_typedef () && !idl_global->anon_silent ())
{
idl_global->err ()->anonymous_type_diagnostic ();
}
+
+ $$ = tao_string_decl;
}
delete ev;
@@ -3890,33 +3975,32 @@ string_type_spec
}
| string_head
{
-// | string_head
idl_global->set_parse_state (IDL_GlobalData::PS_StringCompleted);
+
/*
* Create a node representing a string.
*/
ACE_CDR::ULong bound = 0UL;
-
- $$ =
+ tao_string_decl =
idl_global->gen ()->create_string (
idl_global->gen ()->create_expr (bound,
AST_Expression::EV_ulong)
);
+
/*
* Add this AST_String to the types defined in the global scope.
*/
- (void) idl_global->root ()->fe_add_string (
- AST_String::narrow_from_decl (
- $$
- )
- );
+ idl_global->root ()->fe_add_string (
+ AST_String::narrow_from_decl (
+ tao_string_decl));
+
+ $$ = tao_string_decl;
}
;
string_head :
IDL_STRING
{
-// string_head : IDL_STRING
idl_global->set_parse_state (IDL_GlobalData::PS_StringSeen);
}
;
@@ -3925,17 +4009,14 @@ wstring_type_spec
: wstring_head
'<'
{
-// wstring_type_spec : wstring_head '<'
idl_global->set_parse_state (IDL_GlobalData::PS_StringSqSeen);
}
positive_int_expr
{
-// positive_int_expr
idl_global->set_parse_state (IDL_GlobalData::PS_StringExprSeen);
}
'>'
{
-// '>'
idl_global->set_parse_state (IDL_GlobalData::PS_StringQsSeen);
/*
@@ -3950,49 +4031,51 @@ wstring_type_spec
}
else
{
- $$ = idl_global->gen ()->create_wstring ($4);
+ AST_String *string = 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 ($$)
- );
+ idl_global->root ()->fe_add_string (
+ AST_String::narrow_from_decl (
+ string));
- if (!idl_global->in_typedef ()
- && !idl_global->anon_silent ())
+ if (!idl_global->in_typedef () && !idl_global->anon_silent ())
{
idl_global->err ()->anonymous_type_diagnostic ();
}
+
+ $$ = string;
}
}
| wstring_head
{
-// | wstring_head
idl_global->set_parse_state (IDL_GlobalData::PS_StringCompleted);
/*
* Create a node representing a wstring.
*/
ACE_CDR::ULong bound = 0UL;
-
- $$ =
+ AST_String *string =
idl_global->gen ()->create_wstring (
idl_global->gen ()->create_expr (bound,
AST_Expression::EV_ulong)
);
+
/*
* Add this AST_String to the types defined in the global scope.
*/
- (void) idl_global->root ()->fe_add_string (
- AST_String::narrow_from_decl ($$)
- );
+ idl_global->root ()->fe_add_string (
+ AST_String::narrow_from_decl (
+ string));
+
+ $$ = string;
}
;
wstring_head :
IDL_WSTRING
{
-// wstring_head : IDL_WSTRING
idl_global->set_parse_state (IDL_GlobalData::PS_StringSeen);
}
;
@@ -4000,34 +4083,32 @@ wstring_head :
array_declarator :
defining_id
{
-// array_declarator : defining_id
idl_global->set_parse_state (IDL_GlobalData::PS_ArrayIDSeen);
}
- at_least_one_array_dim
+ annotations_maybe at_least_one_array_dim
{
-// at_least_one_array_dim
idl_global->set_parse_state (IDL_GlobalData::PS_ArrayCompleted);
+ AST_Array *array = 0;
+ AST_Annotation_Appls *base_type_annotations = $3;
+ UTL_ExprList *array_dims = $4;
+
/*
* Create a node representing an array.
*/
- if ($3 != 0)
+ if (array_dims)
{
UTL_ScopedName sn ($1,
0);
- $$ =
+ array =
idl_global->gen ()->create_array (
&sn,
- $3->length (),
- $3,
+ array_dims->length (),
+ array_dims,
0,
0
);
-
- $3->destroy ();
- delete $3;
- $3 = 0;
-
+ array->base_type_annotations (base_type_annotations);
sn.destroy ();
if (!idl_global->in_typedef ()
@@ -4036,14 +4117,18 @@ array_declarator :
idl_global->err ()->anonymous_type_diagnostic ();
}
}
+
+ array_dims->destroy ();
+ delete array_dims;
+
+ $$ = array;
}
;
at_least_one_array_dim :
array_dim array_dims
{
-// at_least_one_array_dim : array_dim array_dims
- ACE_NEW_RETURN ($<elval>$,
+ ACE_NEW_RETURN ($$,
UTL_ExprList ($1,
$2),
1);
@@ -4053,7 +4138,6 @@ at_least_one_array_dim :
array_dims
: array_dims array_dim
{
-// array_dims : array_dims array_dim
UTL_ExprList *el = 0;
ACE_NEW_RETURN (el,
UTL_ExprList ($2,
@@ -4062,35 +4146,31 @@ array_dims
if ($1 == 0)
{
- $<elval>$ = el;
+ $$ = el;
}
else
{
$1->nconc (el);
- $<elval>$ = $1;
+ $$ = $1;
}
}
- | /* EMPTY */
+ | %empty
{
-/* | EMPTY */
- $<elval>$ = 0;
+ $$ = 0;
}
;
array_dim :
'['
{
-// array_dim : '['
idl_global->set_parse_state (IDL_GlobalData::PS_DimSqSeen);
}
positive_int_expr
{
-// positive_int_expr
idl_global->set_parse_state (IDL_GlobalData::PS_DimExprSeen);
}
']'
{
-// ']'
idl_global->set_parse_state (IDL_GlobalData::PS_DimQsSeen);
/*
@@ -4153,27 +4233,22 @@ attribute
attribute_readonly :
IDL_READONLY
{
-// attribute_readonly : IDL_READONLY
idl_global->set_parse_state (IDL_GlobalData::PS_AttrROSeen);
}
IDL_ATTRIBUTE
{
-// IDL_ATTRIBUTE
idl_global->set_parse_state (IDL_GlobalData::PS_AttrSeen);
}
param_type_spec
{
-// param_type_spec
idl_global->set_parse_state (IDL_GlobalData::PS_AttrTypeSeen);
}
at_least_one_simple_declarator
{
-// at_least_one_simple_declarator
idl_global->set_parse_state (IDL_GlobalData::PS_AttrDeclsSeen);
}
opt_raises
{
-// opt_raises
UTL_Scope *s = idl_global->scopes ().top_non_null ();
AST_Attribute *a = 0;
FE_Declarator *d = 0;
@@ -4237,27 +4312,22 @@ attribute_readonly :
attribute_readwrite :
IDL_ATTRIBUTE
{
-// attribute_readwrite : IDL_ATTRIBUTE
idl_global->set_parse_state (IDL_GlobalData::PS_AttrSeen);
}
param_type_spec
{
-// param_type_spec
idl_global->set_parse_state (IDL_GlobalData::PS_AttrTypeSeen);
}
at_least_one_simple_declarator
{
-// at_least_one_simple_declarator
idl_global->set_parse_state (IDL_GlobalData::PS_AttrDeclsSeen);
}
opt_getraises
{
-// opt_getraises
idl_global->set_parse_state (IDL_GlobalData::PS_OpGetRaiseCompleted);
}
opt_setraises
{
-// opt_setraises
UTL_Scope *s = idl_global->scopes ().top_non_null ();
AST_Attribute *a = 0;
FE_Declarator *d = 0;
@@ -4330,12 +4400,10 @@ attribute_readwrite :
exception :
IDL_EXCEPTION
{
-// exception : IDL_EXCEPTION
idl_global->set_parse_state (IDL_GlobalData::PS_ExceptSeen);
}
defining_id
{
-// defining_id
UTL_Scope *s = idl_global->scopes ().top_non_null ();
UTL_ScopedName n ($3,
0);
@@ -4365,17 +4433,14 @@ exception :
}
'{'
{
-// '{'
idl_global->set_parse_state (IDL_GlobalData::PS_ExceptSqSeen);
}
members
{
-// 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.
@@ -4388,12 +4453,10 @@ operation :
opt_op_attribute
op_type_spec
{
-// operation : opt_op_attribute op_type_spec
idl_global->set_parse_state (IDL_GlobalData::PS_OpTypeSeen);
}
- annotations IDENTIFIER
+ annotations_maybe IDENTIFIER
{
-// annotations IDENTIFIER
UTL_Scope *s = idl_global->scopes ().top_non_null ();
Identifier id ($5);
ACE::strdelete ($5);
@@ -4458,17 +4521,14 @@ operation :
}
parameter_list
{
-// parameter_list
idl_global->set_parse_state (IDL_GlobalData::PS_OpParsCompleted);
}
opt_raises
{
-// opt_raises
idl_global->set_parse_state (IDL_GlobalData::PS_OpRaiseCompleted);
}
opt_context
{
-// opt_context
UTL_Scope *s = idl_global->scopes ().top_non_null ();
AST_Operation *o = 0;
idl_global->set_parse_state (IDL_GlobalData::PS_OpCompleted);
@@ -4501,19 +4561,16 @@ operation :
opt_op_attribute
: IDL_ONEWAY
{
-// opt_op_attribute : IDL_ONEWAY
idl_global->set_parse_state (IDL_GlobalData::PS_OpAttrSeen);
$$ = AST_Operation::OP_oneway;
}
| IDL_IDEMPOTENT
{
-// | IDL_IDEMPOTENT
idl_global->set_parse_state (IDL_GlobalData::PS_OpAttrSeen);
$$ = AST_Operation::OP_idempotent;
}
- | /* EMPTY */
+ | %empty
{
-/* | EMPTY */
$$ = AST_Operation::OP_noflags;
}
;
@@ -4522,7 +4579,6 @@ op_type_spec
: param_type_spec
| IDL_VOID
{
-// op_type_spec : param_type_spec | IDL_VOID
$$ =
idl_global->scopes ().bottom ()->lookup_primitive_type (
AST_Expression::EV_void
@@ -4533,13 +4589,11 @@ op_type_spec
init_decl
: IDL_FACTORY
{
-// init_decl : IDL_FACTORY
//@@ PS_FactorySeen?
idl_global->set_parse_state (IDL_GlobalData::PS_OpTypeSeen);
}
- annotations IDENTIFIER
+ annotations_maybe IDENTIFIER
{
-// annotations IDENTIFIER
UTL_Scope *s = idl_global->scopes ().top_non_null ();
if (s->is_abstract ())
@@ -4581,12 +4635,10 @@ init_decl
}
init_parameter_list
{
-// init_parameter_list
idl_global->set_parse_state (IDL_GlobalData::PS_OpParsCompleted);
}
opt_raises
{
-// opt_raises
idl_global->set_parse_state (IDL_GlobalData::PS_OpRaiseCompleted);
if ($8 != 0)
@@ -4603,23 +4655,19 @@ init_decl
init_parameter_list
: '('
{
-// init_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_in_parameter
')'
{
-// at_least_one_in_parameter ')'
idl_global->set_parse_state (IDL_GlobalData::PS_OpQsSeen);
}
;
@@ -4630,27 +4678,23 @@ in_parameters
: in_parameters
','
{
-// in_parameters : in_parameters ','
idl_global->set_parse_state (IDL_GlobalData::PS_OpParCommaSeen);
}
in_parameter
- | /* EMPTY */
+ | %empty
;
in_parameter :
IDL_IN
{
-// in_parameter : IDL_IN
idl_global->set_parse_state (IDL_GlobalData::PS_OpParDirSeen);
}
param_type_spec
{
-// param_type_spec
idl_global->set_parse_state (IDL_GlobalData::PS_OpParTypeSeen);
}
declarator
{
-// declarator
UTL_Scope *s = idl_global->scopes ().top_non_null ();
AST_Argument *a = 0;
idl_global->set_parse_state (IDL_GlobalData::PS_OpParDeclSeen);
@@ -4686,23 +4730,19 @@ in_parameter :
parameter_list
: '('
{
-// 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
')'
{
-// at_least_one_parameter ')'
idl_global->set_parse_state (IDL_GlobalData::PS_OpQsSeen);
}
;
@@ -4713,27 +4753,23 @@ parameters
: parameters
','
{
-// parameters : parameters ','
idl_global->set_parse_state (IDL_GlobalData::PS_OpParCommaSeen);
}
parameter
- | /* EMPTY */
+ | %empty
;
parameter :
direction
{
-// parameter : direction
idl_global->set_parse_state (IDL_GlobalData::PS_OpParDirSeen);
}
param_type_spec
{
-// param_type_spec
idl_global->set_parse_state (IDL_GlobalData::PS_OpParTypeSeen);
}
declarator
{
-// declarator
UTL_Scope *s = idl_global->scopes ().top_non_null ();
AST_Argument *a = 0;
idl_global->set_parse_state (IDL_GlobalData::PS_OpParDeclSeen);
@@ -4776,7 +4812,6 @@ parameter :
param_type_spec
: base_type_spec
{
-// param_type_spec : base_type_spec
$$ =
idl_global->scopes ().bottom ()->lookup_primitive_type (
$1
@@ -4786,9 +4821,6 @@ param_type_spec
| wstring_type_spec
| scoped_name
{
-// | string_type_spec
-// | wstring_type_spec
-// | scoped_name
UTL_Scope *s = idl_global->scopes ().top_non_null ();
AST_Decl *d = 0;
UTL_ScopedName *n = $1;
@@ -4896,17 +4928,14 @@ param_type_spec
direction
: IDL_IN
{
-// direction : IDL_IN
$$ = AST_Argument::dir_IN;
}
| IDL_OUT
{
-// | IDL_OUT
$$ = AST_Argument::dir_OUT;
}
| IDL_INOUT
{
-// | IDL_INOUT
$$ = AST_Argument::dir_INOUT;
}
;
@@ -4914,99 +4943,83 @@ direction
opt_raises
: IDL_RAISES
{
-// 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
')'
{
-// at_least_one_scoped_name ')'
idl_global->set_parse_state (IDL_GlobalData::PS_OpRaiseQsSeen);
$$ = $5;
}
- | /* EMPTY */
+ | %empty
{
$$ = 0;
-/* | EMPTY */
}
;
opt_getraises
: IDL_GETRAISES
{
-// opt_getraises : IDL_GETRAISES
idl_global->set_parse_state (IDL_GlobalData::PS_OpGetRaiseSeen);
}
'('
{
-// '('
idl_global->set_parse_state (IDL_GlobalData::PS_OpGetRaiseSqSeen);
}
at_least_one_scoped_name
')'
{
-// at_least_one_scoped_name ')'
idl_global->set_parse_state (IDL_GlobalData::PS_OpGetRaiseQsSeen);
$$ = $5;
}
- | /* EMPTY */
+ | %empty
{
$$ = 0;
-/* | EMPTY */
}
;
opt_setraises
: IDL_SETRAISES
{
-// opt_setraises : IDL_SETRAISES
idl_global->set_parse_state (IDL_GlobalData::PS_OpSetRaiseSeen);
}
'('
{
-// '('
idl_global->set_parse_state (IDL_GlobalData::PS_OpSetRaiseSqSeen);
}
at_least_one_scoped_name
')'
{
-// at_least_one_scoped_name ')'
idl_global->set_parse_state (IDL_GlobalData::PS_OpSetRaiseQsSeen);
$$ = $5;
}
- | /* EMPTY */
+ | %empty
{
$$ = 0;
-/* | EMPTY */
}
;
opt_context
: IDL_CONTEXT
{
-// 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
')'
{
-// at_least_one_string_literal ')'
idl_global->set_parse_state (IDL_GlobalData::PS_OpContextQsSeen);
$$ = $5;
}
- | /* EMPTY */
+ | %empty
{
-/* | EMPTY */
$$ = 0;
}
;
@@ -5014,7 +5027,6 @@ opt_context
at_least_one_string_literal :
IDL_STRING_LITERAL string_literals
{
-// at_least_one_string_literal : IDL_STRING_LITERAL string_literals
ACE_NEW_RETURN ($<slval>$,
UTL_StrList ($1,
$2),
@@ -5026,12 +5038,10 @@ string_literals
: string_literals
','
{
-// string_literals : string_literals ','
idl_global->set_parse_state (IDL_GlobalData::PS_OpContextCommaSeen);
}
IDL_STRING_LITERAL
{
-// IDL_STRING_LITERAL
UTL_StrList *sl = 0;
ACE_NEW_RETURN (sl,
UTL_StrList ($4,
@@ -5048,9 +5058,8 @@ string_literals
$<slval>$ = $1;
}
}
- | /* EMPTY */
+ | %empty
{
-/* | EMPTY */
$$ = 0;
}
;
@@ -5058,7 +5067,6 @@ string_literals
typeid_dcl
: IDL_TYPEID scoped_name IDL_STRING_LITERAL
{
-// typeid_dcl : IDL_TYPEID scoped_name IDL_STRING_LITERAL
UTL_Scope *s = idl_global->scopes ().top_non_null ();
AST_Decl *d =
s->lookup_by_name ($2);
@@ -5087,7 +5095,6 @@ typeid_dcl
typeprefix_dcl
: IDL_TYPEPREFIX scoped_name IDL_STRING_LITERAL
{
-// typeprefix_dcl : IDL_TYPEPREFIX scoped_name IDL_STRING_LITERAL
UTL_Scope *s = idl_global->scopes ().top_non_null ();
AST_Decl *d = ScopeAsDecl (s);
@@ -5131,7 +5138,6 @@ component_forward_decl :
IDL_COMPONENT
defining_id
{
-// component_forward_decl : IDL_COMPONENT defining_id
UTL_Scope *s = idl_global->scopes ().top_non_null ();
UTL_ScopedName n ($2,
0);
@@ -5159,7 +5165,6 @@ component_forward_decl :
component_decl :
component_header
{
-// component_decl : component_header
UTL_Scope *s = idl_global->scopes ().top_non_null ();
AST_Component *c = 0;
@@ -5199,17 +5204,14 @@ component_decl :
}
'{'
{
-// '{'
idl_global->set_parse_state (IDL_GlobalData::PS_ComponentSqSeen);
}
component_exports
{
-// component_exports
idl_global->set_parse_state (IDL_GlobalData::PS_ComponentBodySeen);
}
'}'
{
-// '}'
idl_global->set_parse_state (IDL_GlobalData::PS_ComponentQsSeen);
/*
@@ -5223,17 +5225,14 @@ component_header :
IDL_COMPONENT
defining_id
{
-// component_header: IDL_COMPONENT defining_id
idl_global->set_parse_state (IDL_GlobalData::PS_ComponentIDSeen);
}
component_inheritance_spec
{
-// component_inheritance_spec
idl_global->set_parse_state (IDL_GlobalData::PS_InheritSpecSeen);
}
supports_spec
{
-// supports_spec
idl_global->set_parse_state (IDL_GlobalData::PS_SupportSpecSeen);
/*
@@ -5271,102 +5270,84 @@ component_header :
component_inheritance_spec
: ':'
{
-// component_inheritance_spec : ':'
idl_global->set_parse_state (IDL_GlobalData::PS_InheritColonSeen);
}
scoped_name
{
-// scoped_name
$<idlist>$ = $3;
}
- | /* EMPTY */
+ | %empty
{
-/* | EMPTY */
$$ = 0;
}
;
component_exports
: component_exports component_export
- | /* EMPTY */
+ | %empty
;
component_export
: provides_decl
{
-// component_export : provides_decl
idl_global->set_parse_state (IDL_GlobalData::PS_ProvidesDeclSeen);
}
- ';'
+ ';'
{
-// ';'
idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
}
| uses_decl
{
-// | uses_decl
idl_global->set_parse_state (IDL_GlobalData::PS_UsesDeclSeen);
}
- ';'
+ ';'
{
-// ';'
idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
}
| emits_decl
{
-// | emits_decl
idl_global->set_parse_state (IDL_GlobalData::PS_EmitsDeclSeen);
}
- ';'
+ ';'
{
-// ';'
idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
}
| publishes_decl
{
-// | publishes_decl
idl_global->set_parse_state (IDL_GlobalData::PS_PublishesDeclSeen);
}
- ';'
+ ';'
{
-// ';'
idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
}
| consumes_decl
{
-// | consumes_decl
idl_global->set_parse_state (IDL_GlobalData::PS_ConsumesDeclSeen);
}
- ';'
+ ';'
{
-// ';'
idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
}
| attribute
{
-// | attribute
idl_global->set_parse_state (IDL_GlobalData::PS_AttrDeclSeen);
}
- ';'
+ ';'
{
-// ';'
idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
}
| extended_port_decl
{
-// | extended_port_decl
idl_global->set_parse_state (IDL_GlobalData::PS_ExtendedPortDeclSeen);
}
- ';'
+ ';'
{
-// ';'
idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
}
;
provides_decl : IDL_PROVIDES interface_type id
{
-// provides_decl : IDL_PROVIDES interface_type id
UTL_Scope *s = idl_global->scopes ().top_non_null ();
bool so_far_so_good = true;
AST_Decl::NodeType nt = AST_Decl::NT_type;
@@ -5457,14 +5438,12 @@ provides_decl : IDL_PROVIDES interface_type id
interface_type
: scoped_name
{
-// interface_type : scoped_name
// Lookups and checking are done where the 'interface_type'
// token is used, in 'provides_decl' and 'uses_decl'.
$$ = $1;
}
| IDL_OBJECT
{
-// | IDL_OBJECT
Identifier *corba_id = 0;
ACE_NEW_RETURN (corba_id,
@@ -5490,7 +5469,6 @@ interface_type
uses_decl : uses_opt_multiple interface_type id
{
-// uses_decl : uses_opt_multiple interface_type id
UTL_Scope *s = idl_global->scopes ().top_non_null ();
bool so_far_so_good = true;
AST_Decl::NodeType nt = AST_Decl::NT_type;
@@ -5597,7 +5575,6 @@ uses_decl : uses_opt_multiple interface_type id
uses_opt_multiple
: IDL_USES opt_multiple
{
-// uses_opt_multiple : IDL_USES opt_multiple
// We use this extra rule here to use in both uses_decl and
// extended_uses_decl, so the LALR(1) parser can avoid conflicts.
$$ = $2;
@@ -5607,19 +5584,16 @@ uses_opt_multiple
opt_multiple
: IDL_MULTIPLE
{
-// opt_multiple : IDL_MULTIPLE
$$ = true;
}
- | /* EMPTY */
+ | %empty
{
-/* | EMPTY */
$$ = false;
}
;
emits_decl : IDL_EMITS scoped_name id
{
-// emits_decl : IDL_EMITS scoped_name id
UTL_Scope *s = idl_global->scopes ().top_non_null ();
bool so_far_so_good = true;
AST_Decl::NodeType nt = AST_Decl::NT_type;
@@ -5692,7 +5666,6 @@ emits_decl : IDL_EMITS scoped_name id
publishes_decl : IDL_PUBLISHES scoped_name id
{
-// publishes_decl : IDL_PUBLISHES scoped_name id
UTL_Scope *s = idl_global->scopes ().top_non_null ();
bool so_far_so_good = true;
AST_Decl::NodeType nt = AST_Decl::NT_type;
@@ -5765,7 +5738,6 @@ publishes_decl : IDL_PUBLISHES scoped_name id
consumes_decl : IDL_CONSUMES scoped_name id
{
-// consumes_decl : IDL_CONSUMES scoped_name id
UTL_Scope *s = idl_global->scopes ().top_non_null ();
bool so_far_so_good = true;
AST_Decl::NodeType nt = AST_Decl::NT_type;
@@ -5839,7 +5811,6 @@ consumes_decl : IDL_CONSUMES scoped_name id
home_decl :
home_header
{
-// home_decl : home_header
UTL_Scope *s = idl_global->scopes ().top_non_null ();
AST_Home *h = 0;
@@ -5877,7 +5848,6 @@ home_decl :
}
home_body
{
-// home_body
/*
* Done with this component - pop it off the scopes stack.
*/
@@ -5888,37 +5858,30 @@ home_decl :
home_header :
IDL_HOME
{
-// home_header : IDL_HOME
idl_global->set_parse_state (IDL_GlobalData::PS_HomeSeen);
}
defining_id
{
-// defining_id
idl_global->set_parse_state (IDL_GlobalData::PS_HomeIDSeen);
}
home_inheritance_spec
{
-// home_inheritance_spec
idl_global->set_parse_state (IDL_GlobalData::PS_InheritSpecSeen);
}
supports_spec
{
-// supports_spec
idl_global->set_parse_state (IDL_GlobalData::PS_SupportSpecSeen);
}
IDL_MANAGES
{
-// IDL_MANAGES
idl_global->set_parse_state (IDL_GlobalData::PS_ManagesSeen);
}
scoped_name
{
-// scoped_name
idl_global->set_parse_state (IDL_GlobalData::PS_ManagesIDSeen);
}
primary_key_spec
{
-// primary_key_spec
idl_global->set_parse_state (IDL_GlobalData::PS_PrimaryKeySpecSeen);
/*
@@ -5968,17 +5931,14 @@ home_header :
home_inheritance_spec
: ':'
{
-// home_inheritance_spec ':'
idl_global->set_parse_state (IDL_GlobalData::PS_InheritColonSeen);
}
scoped_name
{
-// scoped_name
$<idlist>$ = $3;
}
- | /* EMPTY */
+ | %empty
{
-/* | EMPTY */
$$ = 0;
}
;
@@ -5987,12 +5947,10 @@ primary_key_spec
: IDL_PRIMARYKEY
scoped_name
{
-// primary_key_spec : IDL_PRIMARYKEY scoped_name
$$ = $2;
}
- | /* EMPTY */
+ | %empty
{
-/* | EMPTY */
$$ = 0;
}
;
@@ -6000,46 +5958,39 @@ primary_key_spec
home_body :
'{'
{
-// home_body : '{'
idl_global->set_parse_state (IDL_GlobalData::PS_HomeSqSeen);
}
home_exports
{
-// home_exports
idl_global->set_parse_state (IDL_GlobalData::PS_HomeBodySeen);
}
'}'
{
-// '}'
idl_global->set_parse_state (IDL_GlobalData::PS_HomeQsSeen);
}
;
home_exports
: home_exports home_export
- | /* EMPTY */
+ | %empty
;
home_export
: export
| factory_decl
{
-// home_export : factory_decl
idl_global->set_parse_state (IDL_GlobalData::PS_FactoryDeclSeen);
}
- ';'
+ ';'
{
-// | ';'
idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
}
| finder_decl
{
-// | finder_decl
idl_global->set_parse_state (IDL_GlobalData::PS_FinderDeclSeen);
}
- ';'
+ ';'
{
-// | ';'
idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
}
;
@@ -6048,7 +5999,6 @@ factory_decl :
IDL_FACTORY
defining_id
{
-// factory_decl : IDL_FACTORY defining_id
UTL_Scope *s = idl_global->scopes ().top_non_null ();
UTL_ScopedName n ($2,
0);
@@ -6072,12 +6022,10 @@ factory_decl :
}
init_parameter_list
{
-// init_parameter_list
idl_global->set_parse_state (IDL_GlobalData::PS_OpParsCompleted);
}
opt_raises
{
-// opt_raises
UTL_Scope *s = idl_global->scopes ().top_non_null ();
idl_global->set_parse_state (IDL_GlobalData::PS_OpRaiseCompleted);
@@ -6100,7 +6048,6 @@ finder_decl :
IDL_FINDER
defining_id
{
-// finder_decl : IDL_FINDER defining_id
UTL_Scope *s = idl_global->scopes ().top_non_null ();
UTL_ScopedName n ($2,
0);
@@ -6128,12 +6075,10 @@ finder_decl :
}
init_parameter_list
{
-// init_parameter_list
idl_global->set_parse_state (IDL_GlobalData::PS_OpParsCompleted);
}
opt_raises
{
-// opt_raises
UTL_Scope *s = idl_global->scopes ().top_non_null ();
idl_global->set_parse_state (IDL_GlobalData::PS_OpRaiseCompleted);
@@ -6167,7 +6112,6 @@ event_concrete_forward_decl :
IDL_EVENTTYPE
defining_id
{
-// event_concrete_forward_decl : IDL_EVENTTYPE defining_id
UTL_Scope *s = idl_global->scopes ().top_non_null ();
UTL_ScopedName n ($2,
0);
@@ -6196,7 +6140,6 @@ event_abs_forward_decl :
IDL_EVENTTYPE
defining_id
{
-// event_abs_forward_decl : IDL_ABSTRACT IDL_EVENTTYPE defining_id
UTL_Scope *s = idl_global->scopes ().top_non_null ();
UTL_ScopedName n ($3,
0);
@@ -6224,7 +6167,6 @@ event_abs_decl :
event_abs_header
event_rest_of_header
{
-// event_abs_decl : event_abs_header event_rest_of_header
UTL_Scope *s = idl_global->scopes ().top_non_null ();
AST_EventType *e = 0;
AST_Interface *i = 0;
@@ -6269,17 +6211,14 @@ event_abs_decl :
}
'{'
{
-// '{'
idl_global->set_parse_state (IDL_GlobalData::PS_EventTypeSqSeen);
}
exports
{
-// exports
idl_global->set_parse_state (IDL_GlobalData::PS_EventTypeBodySeen);
}
'}'
{
-// '}'
idl_global->set_parse_state (IDL_GlobalData::PS_EventTypeQsSeen);
/*
@@ -6294,7 +6233,6 @@ event_abs_header :
IDL_EVENTTYPE
defining_id
{
-// event_abs_header : IDL_ABSTRACT IDL_EVENTTYPE defining_id
$$ = $3;
}
;
@@ -6304,7 +6242,6 @@ event_custom_header :
IDL_EVENTTYPE
defining_id
{
-// event_custom_header : IDL_CUSTOM IDL_EVENTTYPE defining_id
idl_global->set_parse_state (IDL_GlobalData::PS_EventTypeIDSeen);
ACE_DEBUG ((LM_DEBUG,
@@ -6322,7 +6259,6 @@ event_plain_header :
IDL_EVENTTYPE
defining_id
{
-// event_plain_header : IDL_EVENTTYPE defining_id
idl_global->set_parse_state (IDL_GlobalData::PS_EventTypeIDSeen);
$$ = $2;
@@ -6332,12 +6268,10 @@ event_plain_header :
event_rest_of_header :
inheritance_spec
{
-// event_rest_of_header : inheritance_spec
idl_global->set_parse_state (IDL_GlobalData::PS_InheritSpecSeen);
}
supports_spec
{
-// supports_spec
idl_global->set_parse_state (IDL_GlobalData::PS_SupportSpecSeen);
ACE_NEW_RETURN ($<vhval>$,
@@ -6371,7 +6305,6 @@ event_decl :
event_header
event_rest_of_header
{
-// event_decl : event_header event_rest_of_header
UTL_Scope *s = idl_global->scopes ().top_non_null ();
AST_EventType *e = 0;
AST_Interface *i = 0;
@@ -6421,17 +6354,14 @@ event_decl :
}
'{'
{
-// '{'
idl_global->set_parse_state (IDL_GlobalData::PS_EventTypeSqSeen);
}
value_elements
{
-// value_elements
idl_global->set_parse_state (IDL_GlobalData::PS_EventTypeBodySeen);
}
'}'
{
-// '}'
idl_global->set_parse_state (IDL_GlobalData::PS_EventTypeQsSeen);
/*
@@ -6444,12 +6374,10 @@ event_decl :
event_header
: event_custom_header
{
-// event_header : event_custom_header
$$ = $1;
}
| event_plain_header
{
-// event_header : event_plain_header
$$ = $1;
}
;
@@ -6457,52 +6385,42 @@ event_header
formal_parameter_type
: IDL_TYPENAME
{
-// formal_parameter_type : IDL_TYPENAME
$<ntval>$ = AST_Decl::NT_type;
}
| IDL_STRUCT
{
-// IDL_STRUCT
$<ntval>$ = AST_Decl::NT_struct;
}
| IDL_UNION
{
-// IDL_UNION
$<ntval>$ = AST_Decl::NT_union;
}
| IDL_EVENTTYPE
{
-// IDL_EVENTTYPE
$<ntval>$ = AST_Decl::NT_eventtype;
}
| IDL_SEQUENCE
{
-// IDL_SEQUENCE
$<ntval>$ = AST_Decl::NT_sequence;
}
| IDL_INTERFACE
{
-// IDL_INTERFACE
$<ntval>$ = AST_Decl::NT_interface;
}
| IDL_VALUETYPE
{
-// IDL_VALUETYPE
$<ntval>$ = AST_Decl::NT_valuetype;
}
| IDL_ENUM
{
-// IDL_ENUM
$<ntval>$ = AST_Decl::NT_enum;
}
| IDL_EXCEPTION
{
-// IDL_EXCEPTION
$<ntval>$ = AST_Decl::NT_except;
}
| IDL_CONST const_type
{
-// IDL_CONST const_type
$<ntval>$ = AST_Decl::NT_const;
t_param_const_type = $2;
}
@@ -6511,12 +6429,9 @@ formal_parameter_type
at_least_one_formal_parameter
: formal_parameter formal_parameters
{
-// at_least_one_formal_parameter : formal_parameter formal_parameters
if ($2 == 0)
{
- ACE_NEW_RETURN ($2,
- FE_Utils::T_PARAMLIST_INFO,
- 1);
+ ACE_NEW_RETURN ($2, FE_Utils::T_PARAMLIST_INFO, 1);
}
$2->enqueue_head (*$1);
@@ -6538,59 +6453,49 @@ at_least_one_formal_parameter
return 1;
}
- $<plval>$ = $2;
+ $$ = $2;
}
;
formal_parameters
- : formal_parameters ','
+ : formal_parameters ',' formal_parameter
{
-// formal_parameters : formal_parameters ','
- // Maybe add a new parse state to set here.
- }
- formal_parameter
- {
-// formal_parameter
if ($1 == 0)
{
- ACE_NEW_RETURN ($1,
- FE_Utils::T_PARAMLIST_INFO,
- 1);
+ ACE_NEW_RETURN ($1, FE_Utils::T_PARAMLIST_INFO, 1);
}
- $1->enqueue_tail (*$4);
- $<plval>$ = $1;
+ $1->enqueue_tail (*$3);
+ $$ = $1;
- delete $4;
- $4 = 0;
+ delete $3;
+ $3 = 0;
}
- | /* EMPTY */
+ | %empty
{
-// /* EMPTY */
- $<plval>$ = 0;
+ $$ = 0;
}
;
formal_parameter
: formal_parameter_type IDENTIFIER
{
-// formal_parameter : formal_parameter_type IDENTIFIER
- ACE_NEW_RETURN ($<pival>$,
+ ACE_NEW_RETURN ($$,
FE_Utils::T_Param_Info,
1);
AST_Decl::NodeType nt = $1;
- $<pival>$->type_ = nt;
- $<pival>$->name_ = $2;
+ $$->type_ = nt;
+ $$->name_ = $2;
ACE::strdelete ($2);
$2 = 0;
if (nt == AST_Decl::NT_const)
{
- $<pival>$->const_type_ = t_param_const_type;
- $<pival>$->enum_const_type_decl_ =
+ $$->const_type_ = t_param_const_type;
+ $$->enum_const_type_decl_ =
tao_enum_constant_decl;
// Reset these values.
@@ -6600,13 +6505,13 @@ formal_parameter
}
| IDL_SEQUENCE '<' IDENTIFIER '>' IDENTIFIER
{
- ACE_NEW_RETURN ($<pival>$,
+ ACE_NEW_RETURN ($$,
FE_Utils::T_Param_Info,
1);
- $<pival>$->type_ = AST_Decl::NT_sequence;
- $<pival>$->seq_param_ref_ = $3;
- $<pival>$->name_ += $5;
+ $$->type_ = AST_Decl::NT_sequence;
+ $$->seq_param_ref_ = $3;
+ $$->name_ += $5;
ACE::strdelete ($3);
$3 = 0;
@@ -6618,45 +6523,35 @@ formal_parameter
at_least_one_formal_parameter_name
: formal_parameter_name formal_parameter_names
{
-// at_least_one_formal_parameter_name : formal_parameter_name formal_parameter_names
- ACE_NEW_RETURN ($<slval>$,
- UTL_StrList ($1,
- $2),
- 1);
+ ACE_NEW_RETURN ($$, UTL_StrList ($1, $2), 1);
}
;
formal_parameter_names
: formal_parameter_names ',' formal_parameter_name
{
-// formal_parameter_names : formal_parameter_names ',' formal_parameter_name
UTL_StrList *sl = 0;
- ACE_NEW_RETURN (sl,
- UTL_StrList ($3,
- 0),
- 1);
+ ACE_NEW_RETURN (sl, UTL_StrList ($3, 0), 1);
if ($1 == 0)
{
- $<slval>$ = sl;
+ $$ = sl;
}
else
{
$1->nconc (sl);
- $<slval>$ = $1;
+ $$ = $1;
}
}
- | /* EMPTY */
+ | %empty
{
-// /* EMPTY */
- $<slval>$ = 0;
+ $$ = 0;
}
;
formal_parameter_name
: IDENTIFIER
{
-// formal_parameter_name : IDENTIFIER
ACE_NEW_RETURN ($$,
UTL_String ($1, true),
1);
@@ -6666,12 +6561,10 @@ formal_parameter_name
porttype_decl
: IDL_PORTTYPE
{
-// porttype_decl : IDL_PORTTYPE
idl_global->set_parse_state (IDL_GlobalData::PS_PorttypeSeen);
}
- annotations IDENTIFIER
+ annotations_maybe IDENTIFIER
{
-// annotations IDENTIFIER
idl_global->set_parse_state (IDL_GlobalData::PS_PorttypeIDSeen);
UTL_Scope *s = idl_global->scopes ().top_non_null ();
@@ -6690,17 +6583,14 @@ porttype_decl
}
'{'
{
-// '{'
idl_global->set_parse_state (IDL_GlobalData::PS_PorttypeSqSeen);
}
at_least_one_port_export
{
-// at_least_one_port_export
idl_global->set_parse_state (IDL_GlobalData::PS_PorttypeBodySeen);
}
'}'
{
-// '}'
idl_global->set_parse_state (IDL_GlobalData::PS_PorttypeQsSeen);
// Done with this port type - pop it off the scopes stack.
@@ -6711,53 +6601,43 @@ porttype_decl
at_least_one_port_export
: port_export port_exports
{
-// at_least_one_port_export : port_export port_exports
}
;
port_exports
: port_exports port_export
{
-// port_exports : port_exports port_export
}
- | /* EMPTY */
+ | %empty
{
-// | /* EMPTY */
}
;
port_export
: provides_decl
{
-// port_export : provides_decl
}
';'
{
-// ';'
}
| uses_decl
{
-// | uses_decl
}
';'
{
-// ';'
}
| attribute
{
-// | attribute
idl_global->set_parse_state (IDL_GlobalData::PS_AttrDeclSeen);
}
';'
{
-// ';'
}
;
extended_port_decl
: IDL_PORT scoped_name IDENTIFIER
{
-// extended_port_decl : IDL_PORT scoped_name IDENTIFIER
idl_global->set_parse_state (IDL_GlobalData::PS_ExtendedPortDeclSeen);
UTL_Scope *s = idl_global->scopes ().top_non_null ();
AST_Decl *d =
@@ -6827,7 +6707,6 @@ extended_port_decl
}
| IDL_MIRRORPORT scoped_name IDENTIFIER
{
-// | IDL_MIRRORPORT scoped_name IDENTIFIER
idl_global->set_parse_state (IDL_GlobalData::PS_MirrorPortDeclSeen);
UTL_Scope *s = idl_global->scopes ().top_non_null ();
AST_Decl *d =
@@ -6876,9 +6755,8 @@ extended_port_decl
;
at_least_one_actual_parameter
- : annotations actual_parameter actual_parameters
+ : annotations_maybe actual_parameter actual_parameters
{
-// at_least_one_actual_parameter : annotations actual_parameter actual_parameters
if ($3 == 0)
{
ACE_NEW_RETURN ($3,
@@ -6892,9 +6770,8 @@ at_least_one_actual_parameter
;
actual_parameters
- : actual_parameters ',' annotations actual_parameter
+ : actual_parameters ',' annotations_maybe actual_parameter
{
-// actual_parameters : actual_parameters ',' annotations actual_parameter
if ($1 == 0)
{
ACE_NEW_RETURN ($1,
@@ -6905,9 +6782,8 @@ actual_parameters
$1->enqueue_tail ($4);
$<alval>$ = $1;
}
- | /* EMPTY */
+ | %empty
{
-// | /* EMPTY */
$<alval>$ = 0;
}
;
@@ -6915,7 +6791,6 @@ actual_parameters
actual_parameter
: expression
{
-// actual_parameter : expression
// To avoid grammar conflicts with this LALR(1) parser,
// we take advantage of the fact that an expression can
// be a scoped name. At that lower level, we create an
@@ -6979,17 +6854,14 @@ connector_decl
connector_header
: IDL_CONNECTOR
{
-// connector_header : IDL_CONNECTOR
idl_global->set_parse_state (IDL_GlobalData::PS_ConnectorSeen);
}
- annotations IDENTIFIER
+ annotations_maybe IDENTIFIER
{
-// annotations IDENTIFIER
idl_global->set_parse_state (IDL_GlobalData::PS_ConnectorIDSeen);
}
component_inheritance_spec
{
-// component_inheritance_spec
UTL_Scope *s = idl_global->scopes ().top_non_null ();
AST_Connector *parent = 0;
bool so_far_so_good = true;
@@ -7045,17 +6917,14 @@ connector_header
connector_body
: '{'
{
-// connector_body " '{'
idl_global->set_parse_state (IDL_GlobalData::PS_ConnectorSqSeen);
}
connector_exports
{
-// connector_exports
idl_global->set_parse_state (IDL_GlobalData::PS_ConnectorBodySeen);
}
'}'
{
-// '}
idl_global->set_parse_state (IDL_GlobalData::PS_ConnectorQsSeen);
// Done with this connector - pop it off the scope stack.
@@ -7065,48 +6934,40 @@ connector_body
connector_exports
: connector_exports connector_export
- | /* EMPTY */
+ | %empty
;
connector_export
: provides_decl
{
-// connector_export : provides_decl
idl_global->set_parse_state (IDL_GlobalData::PS_ProvidesDeclSeen);
}
- ';'
+ ';'
{
-// ';'
idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
}
| uses_decl
{
-// | uses_decl
idl_global->set_parse_state (IDL_GlobalData::PS_UsesDeclSeen);
}
- ';'
+ ';'
{
-// ';'
idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
}
| attribute
{
-// | attribute
idl_global->set_parse_state (IDL_GlobalData::PS_AttrDeclSeen);
}
- ';'
+ ';'
{
-// ';'
idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
}
| extended_port_decl
{
-// | extended_port_decl
idl_global->set_parse_state (IDL_GlobalData::PS_ExtendedPortDeclSeen);
}
- ';'
+ ';'
{
-// ';'
idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
}
;
diff --git a/TAO/TAO_IDL/fe/idl.yy.cpp b/TAO/TAO_IDL/fe/idl.yy.cpp
index 5a7237f40ef..f86edc5aaaf 100644
--- a/TAO/TAO_IDL/fe/idl.yy.cpp
+++ b/TAO/TAO_IDL/fe/idl.yy.cpp
@@ -1,6 +1,6 @@
-#line 1 "fe/idl.yy.cpp"
+#line 2 "fe/idl.yy.cpp"
-#line 3 "fe/idl.yy.cpp"
+#line 4 "fe/idl.yy.cpp"
#define YY_INT_ALIGNED short int
@@ -608,8 +608,8 @@ static void yynoreturn yy_fatal_error ( const char* msg );
YY_FATAL_ERROR( "token too large, exceeds YYLMAX" ); \
yy_flex_strncpy( yytext, (yytext_ptr), yyleng + 1 ); \
(yy_c_buf_p) = yy_cp;
-#define YY_NUM_RULES 111
-#define YY_END_OF_BUFFER 112
+#define YY_NUM_RULES 113
+#define YY_END_OF_BUFFER 114
/* This struct is not used in this scanner,
but its presence is necessary. */
struct yy_trans_info
@@ -617,74 +617,75 @@ struct yy_trans_info
flex_int32_t yy_verify;
flex_int32_t yy_nxt;
};
-static const flex_int16_t yy_accept[593] =
+static const flex_int16_t yy_accept[605] =
{ 0,
- 108, 108, 112, 110, 108, 109, 109, 110, 110, 110,
- 110, 110, 83, 79, 110, 110, 110, 74, 74, 74,
- 74, 74, 74, 74, 74, 74, 74, 74, 74, 74,
- 74, 74, 74, 74, 74, 74, 74, 74, 74, 74,
- 74, 74, 108, 110, 109, 108, 0, 84, 0, 0,
- 0, 0, 82, 78, 75, 107, 0, 75, 83, 0,
- 77, 0, 0, 79, 73, 71, 72, 74, 74, 0,
- 0, 74, 74, 74, 74, 74, 74, 74, 74, 74,
- 74, 74, 74, 74, 74, 74, 74, 74, 74, 74,
- 74, 74, 74, 74, 68, 74, 74, 74, 74, 74,
-
- 74, 74, 74, 74, 74, 74, 74, 74, 74, 74,
- 74, 74, 74, 74, 74, 74, 74, 74, 74, 74,
- 74, 74, 108, 0, 0, 102, 0, 0, 0, 0,
- 0, 0, 0, 84, 0, 0, 0, 86, 0, 86,
- 0, 0, 82, 0, 78, 0, 75, 0, 106, 106,
- 75, 0, 76, 81, 74, 0, 85, 0, 0, 0,
- 74, 74, 74, 74, 1, 74, 74, 74, 74, 74,
- 74, 74, 74, 74, 74, 74, 74, 74, 74, 74,
- 74, 74, 74, 74, 74, 74, 74, 74, 74, 74,
- 74, 74, 74, 74, 74, 74, 69, 74, 74, 74,
-
- 74, 74, 74, 74, 74, 74, 74, 74, 74, 74,
- 74, 74, 74, 74, 74, 74, 74, 74, 0, 0,
- 0, 0, 0, 0, 0, 0, 89, 87, 0, 0,
- 80, 0, 75, 76, 74, 85, 0, 0, 0, 0,
- 90, 0, 74, 65, 74, 74, 74, 74, 20, 27,
- 74, 74, 74, 74, 74, 74, 74, 74, 13, 74,
- 74, 74, 74, 74, 74, 74, 48, 74, 74, 74,
- 74, 24, 74, 74, 74, 74, 74, 74, 74, 60,
- 74, 74, 74, 74, 74, 74, 74, 74, 74, 74,
- 74, 74, 74, 74, 74, 74, 74, 57, 74, 31,
-
- 74, 74, 0, 0, 0, 0, 0, 0, 0, 103,
- 0, 0, 0, 0, 0, 0, 0, 87, 0, 88,
- 0, 66, 0, 0, 0, 74, 74, 64, 74, 74,
- 74, 74, 10, 74, 74, 74, 74, 74, 44, 74,
- 74, 74, 74, 18, 22, 74, 74, 67, 74, 33,
- 74, 74, 74, 74, 74, 30, 74, 74, 74, 74,
- 74, 74, 74, 74, 74, 74, 25, 74, 74, 74,
- 74, 74, 74, 74, 74, 74, 17, 74, 74, 28,
- 74, 98, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 91, 0, 2, 74, 74,
-
- 74, 74, 74, 74, 74, 35, 74, 23, 74, 74,
- 74, 46, 74, 49, 74, 74, 74, 3, 74, 32,
- 70, 74, 74, 74, 74, 38, 74, 4, 74, 74,
- 74, 14, 12, 74, 19, 74, 74, 55, 74, 74,
- 74, 74, 74, 0, 96, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 74,
- 74, 29, 74, 74, 74, 8, 21, 74, 74, 36,
- 74, 74, 58, 74, 74, 74, 74, 37, 74, 74,
- 74, 74, 74, 74, 74, 11, 74, 74, 74, 74,
- 15, 0, 0, 94, 94, 0, 0, 100, 0, 0,
-
- 99, 0, 0, 0, 0, 0, 0, 0, 34, 74,
- 74, 74, 43, 74, 74, 74, 74, 74, 50, 62,
- 74, 52, 74, 5, 16, 74, 39, 74, 59, 74,
- 26, 74, 0, 104, 104, 0, 0, 0, 0, 97,
- 0, 0, 0, 0, 0, 0, 0, 6, 42, 63,
- 45, 7, 47, 9, 74, 74, 53, 54, 74, 74,
- 41, 0, 0, 0, 92, 92, 0, 0, 95, 95,
- 0, 0, 0, 0, 61, 51, 74, 56, 0, 0,
- 105, 105, 0, 0, 0, 40, 0, 101, 0, 93,
- 93, 0
-
+ 110, 110, 114, 112, 110, 111, 111, 112, 112, 112,
+ 112, 112, 85, 81, 112, 112, 112, 75, 76, 76,
+ 76, 76, 76, 76, 76, 76, 76, 76, 76, 76,
+ 76, 76, 76, 76, 76, 76, 76, 76, 76, 76,
+ 76, 76, 76, 110, 112, 111, 110, 0, 86, 0,
+ 0, 0, 0, 84, 80, 77, 109, 0, 77, 85,
+ 0, 79, 0, 0, 81, 73, 71, 72, 0, 76,
+ 76, 0, 0, 76, 76, 76, 76, 76, 76, 76,
+ 76, 76, 76, 76, 76, 76, 76, 76, 76, 76,
+ 76, 76, 76, 76, 76, 76, 68, 76, 76, 76,
+
+ 76, 76, 76, 76, 76, 76, 76, 76, 76, 76,
+ 76, 76, 76, 76, 76, 76, 76, 76, 76, 76,
+ 76, 76, 76, 76, 110, 0, 0, 104, 0, 0,
+ 0, 0, 0, 0, 0, 86, 0, 0, 0, 88,
+ 0, 88, 0, 0, 84, 0, 80, 0, 77, 0,
+ 108, 108, 77, 0, 78, 83, 0, 76, 0, 87,
+ 0, 0, 0, 76, 76, 76, 76, 1, 76, 76,
+ 76, 76, 76, 76, 76, 76, 76, 76, 76, 76,
+ 76, 76, 76, 76, 76, 76, 76, 76, 76, 76,
+ 76, 76, 76, 76, 76, 76, 76, 76, 76, 69,
+
+ 76, 76, 76, 76, 76, 76, 76, 76, 76, 76,
+ 76, 76, 76, 76, 76, 76, 76, 76, 76, 76,
+ 76, 0, 0, 0, 0, 0, 0, 0, 0, 91,
+ 89, 0, 0, 82, 0, 77, 78, 0, 76, 87,
+ 0, 0, 0, 0, 92, 0, 76, 65, 76, 76,
+ 76, 76, 20, 27, 76, 76, 76, 76, 76, 76,
+ 76, 76, 13, 76, 76, 76, 76, 76, 76, 76,
+ 48, 76, 76, 76, 76, 24, 76, 76, 76, 76,
+ 76, 76, 76, 60, 76, 76, 76, 76, 76, 76,
+ 76, 76, 76, 76, 76, 76, 76, 76, 76, 76,
+
+ 76, 57, 76, 31, 76, 76, 0, 0, 0, 0,
+ 0, 0, 0, 105, 0, 0, 0, 0, 0, 0,
+ 0, 89, 0, 90, 0, 0, 66, 0, 0, 0,
+ 76, 76, 64, 76, 76, 76, 76, 10, 76, 76,
+ 76, 76, 76, 44, 76, 76, 76, 76, 18, 22,
+ 76, 76, 67, 76, 33, 76, 76, 76, 76, 76,
+ 30, 76, 76, 76, 76, 76, 76, 76, 76, 76,
+ 76, 25, 76, 76, 76, 76, 76, 76, 76, 76,
+ 76, 17, 76, 76, 28, 76, 100, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+
+ 0, 93, 0, 2, 76, 76, 76, 76, 76, 76,
+ 76, 35, 76, 23, 76, 76, 76, 46, 76, 49,
+ 76, 76, 76, 3, 76, 32, 70, 76, 76, 76,
+ 76, 38, 76, 4, 76, 76, 76, 14, 12, 76,
+ 19, 76, 76, 55, 76, 76, 76, 76, 76, 0,
+ 98, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 76, 76, 29, 76,
+ 76, 76, 8, 21, 76, 76, 36, 76, 76, 58,
+ 76, 76, 76, 76, 37, 76, 76, 76, 76, 76,
+ 76, 76, 11, 76, 76, 76, 76, 15, 0, 0,
+
+ 96, 96, 0, 0, 102, 0, 0, 101, 0, 0,
+ 0, 0, 0, 0, 0, 0, 34, 76, 76, 76,
+ 43, 76, 76, 76, 76, 76, 50, 62, 76, 52,
+ 76, 5, 16, 76, 39, 76, 59, 76, 26, 76,
+ 0, 106, 106, 0, 0, 0, 0, 99, 0, 0,
+ 0, 0, 0, 0, 0, 0, 6, 42, 63, 45,
+ 7, 47, 9, 76, 76, 53, 54, 76, 76, 41,
+ 0, 0, 0, 94, 94, 0, 0, 97, 97, 0,
+ 0, 0, 0, 0, 61, 51, 76, 56, 0, 0,
+ 107, 107, 0, 0, 0, 0, 40, 0, 103, 0,
+
+ 95, 95, 74, 0
} ;
static const YY_CHAR yy_ec[256] =
@@ -695,14 +696,14 @@ static const YY_CHAR yy_ec[256] =
1, 5, 1, 6, 7, 1, 1, 1, 8, 1,
1, 9, 10, 1, 11, 12, 13, 14, 15, 15,
15, 15, 15, 15, 15, 16, 16, 17, 1, 18,
- 19, 20, 21, 1, 22, 23, 23, 24, 25, 26,
- 27, 27, 27, 27, 27, 28, 27, 27, 29, 27,
- 27, 30, 31, 32, 33, 27, 27, 34, 27, 27,
- 1, 35, 1, 1, 27, 1, 36, 37, 38, 39,
-
- 40, 41, 42, 43, 44, 45, 46, 47, 48, 49,
- 50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
- 60, 27, 1, 1, 1, 1, 1, 1, 1, 1,
+ 19, 20, 21, 22, 23, 24, 24, 25, 26, 27,
+ 28, 28, 28, 28, 28, 29, 28, 28, 30, 28,
+ 28, 31, 32, 33, 34, 28, 28, 35, 28, 28,
+ 1, 36, 1, 1, 28, 1, 37, 38, 39, 40,
+
+ 41, 42, 43, 44, 45, 46, 47, 48, 49, 50,
+ 51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
+ 61, 28, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
@@ -719,301 +720,308 @@ static const YY_CHAR yy_ec[256] =
1, 1, 1, 1, 1
} ;
-static const YY_CHAR yy_meta[61] =
+static const YY_CHAR yy_meta[62] =
{ 0,
1, 1, 2, 1, 1, 3, 1, 4, 1, 1,
1, 1, 1, 5, 5, 6, 1, 1, 1, 1,
- 3, 6, 6, 6, 6, 6, 7, 7, 7, 7,
- 7, 7, 7, 7, 3, 5, 5, 6, 6, 6,
- 5, 7, 7, 7, 7, 7, 7, 7, 8, 7,
- 7, 7, 8, 7, 8, 9, 8, 7, 8, 7
+ 3, 1, 6, 6, 6, 6, 6, 7, 7, 7,
+ 7, 7, 7, 7, 7, 3, 5, 5, 6, 6,
+ 6, 5, 7, 7, 7, 7, 7, 7, 7, 8,
+ 7, 7, 7, 8, 7, 8, 9, 8, 7, 8,
+ 7
} ;
-static const flex_int16_t yy_base[621] =
+static const flex_int16_t yy_base[634] =
{ 0,
- 0, 59, 1177, 1178, 60, 1178, 1178, 57, 1141, 55,
- 58, 66, 81, 74, 1158, 1156, 1153, 0, 1150, 70,
- 1134, 1140, 54, 1119, 68, 37, 68, 86, 1128, 1117,
- 33, 1116, 87, 1129, 70, 79, 98, 96, 47, 92,
- 92, 30, 142, 153, 1143, 143, 77, 157, 146, 1155,
- 156, 161, 151, 167, 202, 1178, 184, 187, 197, 232,
- 1178, 209, 0, 238, 1178, 1178, 1178, 0, 1134, 223,
- 1126, 1115, 1126, 1104, 1113, 1096, 1100, 1104, 1099, 1116,
- 124, 1097, 1109, 1093, 1104, 1091, 1106, 1107, 1106, 137,
- 1093, 1087, 1093, 1089, 134, 196, 1090, 1085, 1098, 1089,
-
- 1080, 1079, 1093, 1077, 1078, 149, 1093, 1085, 1092, 98,
- 1077, 1073, 1074, 1080, 1067, 1071, 154, 1081, 1073, 1075,
- 1075, 1062, 233, 0, 192, 1178, 1110, 265, 1071, 1075,
- 1069, 1059, 1092, 259, 225, 249, 260, 1178, 1102, 1101,
- 268, 1100, 273, 0, 278, 290, 1178, 304, 1178, 306,
- 0, 300, 305, 0, 1076, 261, 321, 314, 1098, 243,
- 1065, 1079, 1048, 1066, 0, 1048, 1053, 1059, 1045, 1046,
- 281, 1041, 1059, 1057, 1038, 1044, 1042, 1050, 1034, 1049,
- 1047, 1050, 1032, 1044, 1033, 1026, 1041, 1044, 1037, 1042,
- 1024, 1020, 1020, 1030, 1033, 1014, 0, 1016, 37, 1013,
-
- 1022, 1014, 1028, 1010, 1012, 1011, 278, 1012, 1007, 1012,
- 1020, 1009, 1014, 1003, 1000, 1016, 1018, 1000, 1046, 1045,
- 1003, 1009, 999, 1011, 369, 326, 1178, 1178, 329, 1038,
- 0, 339, 350, 1178, 1020, 340, 1038, 332, 342, 0,
- 1178, 0, 1005, 0, 989, 987, 996, 999, 0, 0,
- 988, 997, 295, 996, 985, 978, 986, 978, 0, 976,
- 979, 979, 988, 988, 971, 989, 0, 971, 968, 969,
- 974, 0, 978, 969, 971, 973, 959, 960, 978, 958,
- 976, 975, 966, 965, 968, 957, 966, 969, 949, 954,
- 964, 951, 962, 961, 343, 949, 955, 0, 956, 0,
-
- 942, 950, 987, 396, 952, 942, 950, 947, 941, 1178,
- 226, 418, 943, 947, 941, 931, 353, 1178, 975, 1178,
- 974, 0, 389, 434, 973, 925, 943, 0, 941, 941,
- 927, 937, 0, 926, 914, 924, 924, 930, 0, 914,
- 913, 914, 913, 0, 0, 921, 909, 0, 922, 0,
- 922, 908, 920, 908, 918, 0, 897, 896, 902, 899,
- 914, 309, 898, 902, 901, 905, 0, 906, 892, 893,
- 902, 908, 903, 903, 905, 887, 0, 890, 883, 0,
- 888, 1178, 462, 384, 881, 391, 887, 928, 927, 885,
- 891, 881, 893, 363, 470, 1178, 920, 0, 889, 870,
-
- 876, 884, 868, 882, 866, 0, 865, 0, 859, 874,
- 857, 0, 862, 0, 771, 752, 739, 0, 714, 0,
- 0, 707, 697, 701, 689, 0, 684, 0, 679, 687,
- 670, 0, 0, 668, 0, 667, 679, 0, 671, 678,
- 668, 646, 659, 498, 1178, 513, 405, 409, 413, 533,
- 657, 676, 432, 638, 618, 608, 605, 541, 635, 584,
- 583, 0, 585, 577, 572, 0, 0, 563, 554, 0,
- 553, 553, 0, 525, 529, 522, 515, 0, 506, 506,
- 485, 501, 492, 477, 490, 0, 480, 463, 459, 440,
- 0, 569, 440, 1178, 442, 476, 519, 1178, 484, 436,
-
- 1178, 584, 449, 434, 528, 420, 396, 454, 0, 407,
- 387, 377, 0, 385, 370, 358, 341, 327, 0, 0,
- 339, 0, 321, 0, 0, 308, 0, 323, 0, 314,
- 0, 299, 478, 1178, 484, 318, 592, 547, 607, 1178,
- 615, 549, 450, 630, 635, 587, 275, 0, 0, 0,
- 0, 0, 0, 0, 236, 199, 0, 0, 167, 136,
- 0, 650, 654, 555, 1178, 612, 658, 621, 1178, 673,
- 677, 174, 172, 658, 0, 0, 70, 0, 681, 684,
- 1178, 686, 96, 688, 696, 0, 700, 1178, 707, 1178,
- 709, 1178, 730, 739, 744, 751, 759, 768, 773, 779,
-
- 788, 794, 796, 800, 809, 815, 817, 819, 822, 828,
- 834, 840, 846, 852, 861, 870, 879, 888, 897, 906
+ 0, 60, 1192, 1193, 61, 1193, 1193, 58, 1155, 56,
+ 59, 67, 83, 75, 1173, 1171, 1168, 1150, 0, 1163,
+ 71, 1147, 1153, 54, 1132, 68, 37, 71, 48, 1141,
+ 1130, 33, 1129, 77, 1142, 87, 76, 66, 91, 52,
+ 86, 101, 100, 144, 154, 1157, 140, 147, 158, 147,
+ 1169, 157, 162, 152, 179, 207, 1193, 176, 170, 199,
+ 238, 1193, 227, 0, 244, 1193, 1193, 1193, 1126, 0,
+ 1146, 167, 1138, 1127, 1138, 1116, 1125, 1108, 1112, 1116,
+ 1111, 1128, 132, 1109, 1121, 1105, 1116, 1103, 1118, 1119,
+ 1118, 138, 1105, 1099, 1105, 1101, 175, 150, 1102, 1097,
+
+ 1110, 1101, 1092, 1091, 1105, 1089, 1090, 66, 1105, 1097,
+ 1104, 154, 1089, 1085, 1086, 1092, 1079, 1083, 163, 1093,
+ 1085, 1087, 1087, 1074, 260, 0, 187, 1193, 1123, 272,
+ 1083, 1087, 1081, 1071, 1105, 266, 210, 221, 267, 1193,
+ 1115, 1114, 275, 1113, 280, 0, 285, 298, 1193, 312,
+ 1193, 314, 0, 308, 313, 0, 1070, 1087, 238, 302,
+ 322, 1110, 290, 1076, 1090, 1059, 1077, 0, 1059, 1064,
+ 1070, 1056, 1057, 288, 1052, 1070, 1068, 1049, 1055, 1053,
+ 1061, 1045, 1060, 1058, 1061, 1043, 1055, 1044, 1037, 1052,
+ 1055, 1048, 1053, 1035, 1031, 1031, 1041, 1044, 1025, 0,
+
+ 1027, 281, 1024, 1033, 1025, 1039, 1021, 1023, 1022, 289,
+ 1023, 1018, 1023, 1031, 1020, 1025, 1014, 1011, 1027, 1029,
+ 1011, 1058, 1057, 1014, 1020, 1010, 1022, 378, 335, 1193,
+ 1193, 337, 1050, 0, 342, 348, 1193, 1006, 1030, 368,
+ 1049, 255, 353, 0, 1193, 0, 1015, 0, 999, 997,
+ 1006, 1009, 0, 0, 998, 1007, 297, 1006, 995, 988,
+ 996, 988, 0, 986, 989, 989, 998, 998, 981, 999,
+ 0, 981, 978, 979, 984, 0, 988, 979, 981, 983,
+ 969, 970, 988, 968, 986, 985, 976, 975, 978, 967,
+ 976, 979, 959, 964, 974, 961, 972, 971, 355, 959,
+
+ 965, 0, 966, 0, 952, 960, 998, 381, 962, 952,
+ 960, 957, 951, 1193, 203, 413, 953, 957, 951, 941,
+ 296, 1193, 986, 1193, 985, 936, 0, 395, 429, 983,
+ 934, 952, 0, 950, 950, 936, 946, 0, 935, 923,
+ 933, 933, 939, 0, 923, 922, 923, 922, 0, 0,
+ 930, 918, 0, 931, 0, 931, 917, 929, 917, 927,
+ 0, 906, 905, 911, 908, 923, 135, 907, 911, 910,
+ 914, 0, 915, 901, 902, 911, 917, 912, 912, 914,
+ 896, 0, 899, 892, 0, 897, 1193, 458, 364, 890,
+ 434, 896, 938, 937, 894, 900, 890, 902, 901, 342,
+
+ 466, 1193, 929, 0, 897, 878, 884, 892, 876, 890,
+ 874, 0, 873, 0, 867, 882, 865, 0, 870, 0,
+ 887, 868, 758, 0, 761, 0, 0, 741, 703, 720,
+ 719, 0, 700, 0, 684, 692, 675, 0, 0, 673,
+ 0, 672, 685, 0, 677, 684, 683, 661, 678, 481,
+ 1193, 496, 400, 386, 511, 516, 683, 712, 437, 676,
+ 661, 668, 664, 647, 524, 687, 625, 613, 0, 614,
+ 606, 580, 0, 0, 579, 578, 0, 585, 586, 0,
+ 570, 578, 569, 538, 0, 529, 542, 520, 539, 518,
+ 503, 508, 0, 483, 481, 475, 462, 0, 539, 411,
+
+ 1193, 443, 473, 565, 1193, 503, 406, 1193, 573, 417,
+ 432, 577, 438, 414, 370, 449, 0, 410, 382, 383,
+ 0, 392, 375, 369, 372, 358, 0, 0, 357, 0,
+ 332, 0, 0, 319, 0, 334, 0, 320, 0, 319,
+ 525, 1193, 531, 313, 593, 553, 597, 1193, 601, 569,
+ 473, 618, 622, 625, 243, 215, 0, 0, 0, 0,
+ 0, 0, 0, 189, 169, 0, 0, 180, 141, 0,
+ 640, 644, 647, 1193, 649, 659, 663, 1193, 668, 673,
+ 148, 134, 531, 36, 0, 0, 43, 0, 683, 675,
+ 1193, 679, 63, 687, 689, 0, 0, 698, 1193, 702,
+
+ 1193, 712, 1193, 1193, 733, 742, 747, 754, 762, 771,
+ 776, 782, 791, 797, 799, 803, 812, 818, 820, 822,
+ 825, 831, 837, 843, 849, 855, 864, 873, 882, 891,
+ 900, 909, 918
} ;
-static const flex_int16_t yy_def[621] =
+static const flex_int16_t yy_def[634] =
{ 0,
- 592, 1, 592, 592, 592, 592, 592, 593, 594, 592,
- 592, 592, 592, 592, 592, 592, 592, 595, 595, 595,
- 595, 595, 595, 595, 595, 595, 595, 595, 595, 595,
- 595, 595, 595, 595, 595, 595, 595, 595, 595, 595,
- 595, 595, 592, 592, 592, 592, 593, 592, 596, 592,
- 597, 592, 13, 592, 592, 592, 598, 55, 592, 592,
- 592, 592, 599, 592, 592, 592, 592, 595, 595, 600,
- 601, 595, 595, 595, 595, 595, 595, 595, 595, 595,
- 595, 595, 595, 595, 595, 595, 595, 595, 595, 595,
- 595, 595, 595, 595, 595, 595, 595, 595, 595, 595,
-
- 595, 595, 595, 595, 595, 595, 595, 595, 595, 595,
- 595, 595, 595, 595, 595, 595, 595, 595, 595, 595,
- 595, 595, 592, 44, 44, 592, 125, 592, 592, 592,
- 592, 592, 592, 592, 593, 593, 593, 592, 592, 592,
- 592, 602, 592, 603, 592, 592, 592, 598, 592, 598,
- 58, 592, 592, 599, 595, 600, 592, 604, 592, 592,
- 595, 595, 595, 595, 595, 595, 595, 595, 595, 595,
- 595, 595, 595, 595, 595, 595, 595, 595, 595, 595,
- 595, 595, 595, 595, 595, 595, 595, 595, 595, 595,
- 595, 595, 595, 595, 595, 595, 595, 595, 595, 595,
-
- 595, 595, 595, 595, 595, 595, 595, 595, 595, 595,
- 595, 595, 595, 595, 595, 595, 595, 595, 605, 592,
- 592, 592, 592, 592, 592, 593, 592, 592, 592, 606,
- 603, 592, 592, 592, 595, 592, 592, 600, 600, 607,
- 592, 608, 595, 595, 595, 595, 595, 595, 595, 595,
- 595, 595, 595, 595, 595, 595, 595, 595, 595, 595,
- 595, 595, 595, 595, 595, 595, 595, 595, 595, 595,
- 595, 595, 595, 595, 595, 595, 595, 595, 595, 595,
- 595, 595, 595, 595, 595, 595, 595, 595, 595, 595,
- 595, 595, 595, 595, 595, 595, 595, 595, 595, 595,
-
- 595, 595, 605, 592, 592, 592, 592, 592, 225, 592,
- 225, 592, 592, 592, 592, 592, 593, 592, 592, 592,
- 592, 595, 600, 600, 609, 595, 595, 595, 595, 595,
- 595, 595, 595, 595, 595, 595, 595, 595, 595, 595,
- 595, 595, 595, 595, 595, 595, 595, 595, 595, 595,
- 595, 595, 595, 595, 595, 595, 595, 595, 595, 595,
- 595, 595, 595, 595, 595, 595, 595, 595, 595, 595,
- 595, 595, 595, 595, 595, 595, 595, 595, 595, 595,
- 595, 592, 592, 592, 592, 592, 592, 610, 592, 592,
- 592, 592, 592, 600, 324, 592, 611, 595, 595, 595,
-
- 595, 595, 595, 595, 595, 595, 595, 595, 595, 595,
- 595, 595, 595, 595, 595, 595, 595, 595, 595, 595,
- 595, 595, 595, 595, 595, 595, 595, 595, 595, 595,
- 595, 595, 595, 595, 595, 595, 595, 595, 595, 595,
- 595, 595, 595, 592, 592, 592, 612, 592, 592, 592,
- 592, 610, 592, 592, 592, 592, 592, 324, 613, 595,
- 595, 595, 595, 595, 595, 595, 595, 595, 595, 595,
- 595, 595, 595, 595, 595, 595, 595, 595, 595, 595,
- 595, 595, 595, 595, 595, 595, 595, 595, 595, 595,
- 595, 592, 612, 592, 612, 614, 592, 592, 615, 592,
-
- 592, 592, 592, 592, 592, 592, 600, 592, 595, 595,
- 595, 595, 595, 595, 595, 595, 595, 595, 595, 595,
- 595, 595, 595, 595, 595, 595, 595, 595, 595, 595,
- 595, 595, 614, 592, 614, 615, 592, 616, 592, 592,
- 592, 617, 592, 592, 592, 592, 592, 595, 595, 595,
- 595, 595, 595, 595, 595, 595, 595, 595, 595, 595,
- 595, 592, 592, 616, 592, 616, 592, 617, 592, 617,
- 618, 619, 592, 592, 595, 595, 595, 595, 592, 618,
- 592, 618, 619, 592, 620, 595, 592, 592, 620, 592,
- 620, 0, 592, 592, 592, 592, 592, 592, 592, 592,
-
- 592, 592, 592, 592, 592, 592, 592, 592, 592, 592,
- 592, 592, 592, 592, 592, 592, 592, 592, 592, 592
+ 604, 1, 604, 604, 604, 604, 604, 605, 606, 604,
+ 604, 604, 604, 604, 604, 604, 604, 604, 607, 607,
+ 607, 607, 607, 607, 607, 607, 607, 607, 607, 607,
+ 607, 607, 607, 607, 607, 607, 607, 607, 607, 607,
+ 607, 607, 607, 604, 604, 604, 604, 605, 604, 608,
+ 604, 609, 604, 13, 604, 604, 604, 610, 56, 604,
+ 604, 604, 604, 611, 604, 604, 604, 604, 604, 607,
+ 607, 612, 613, 607, 607, 607, 607, 607, 607, 607,
+ 607, 607, 607, 607, 607, 607, 607, 607, 607, 607,
+ 607, 607, 607, 607, 607, 607, 607, 607, 607, 607,
+
+ 607, 607, 607, 607, 607, 607, 607, 607, 607, 607,
+ 607, 607, 607, 607, 607, 607, 607, 607, 607, 607,
+ 607, 607, 607, 607, 604, 45, 45, 604, 127, 604,
+ 604, 604, 604, 604, 604, 604, 605, 605, 605, 604,
+ 604, 604, 604, 614, 604, 615, 604, 604, 604, 610,
+ 604, 610, 59, 604, 604, 611, 604, 607, 612, 604,
+ 616, 604, 604, 607, 607, 607, 607, 607, 607, 607,
+ 607, 607, 607, 607, 607, 607, 607, 607, 607, 607,
+ 607, 607, 607, 607, 607, 607, 607, 607, 607, 607,
+ 607, 607, 607, 607, 607, 607, 607, 607, 607, 607,
+
+ 607, 607, 607, 607, 607, 607, 607, 607, 607, 607,
+ 607, 607, 607, 607, 607, 607, 607, 607, 607, 607,
+ 607, 617, 604, 604, 604, 604, 604, 604, 605, 604,
+ 604, 604, 618, 615, 604, 604, 604, 604, 607, 604,
+ 604, 612, 612, 619, 604, 620, 607, 607, 607, 607,
+ 607, 607, 607, 607, 607, 607, 607, 607, 607, 607,
+ 607, 607, 607, 607, 607, 607, 607, 607, 607, 607,
+ 607, 607, 607, 607, 607, 607, 607, 607, 607, 607,
+ 607, 607, 607, 607, 607, 607, 607, 607, 607, 607,
+ 607, 607, 607, 607, 607, 607, 607, 607, 607, 607,
+
+ 607, 607, 607, 607, 607, 607, 617, 604, 604, 604,
+ 604, 604, 228, 604, 228, 604, 604, 604, 604, 604,
+ 605, 604, 604, 604, 604, 604, 607, 612, 612, 621,
+ 607, 607, 607, 607, 607, 607, 607, 607, 607, 607,
+ 607, 607, 607, 607, 607, 607, 607, 607, 607, 607,
+ 607, 607, 607, 607, 607, 607, 607, 607, 607, 607,
+ 607, 607, 607, 607, 607, 607, 607, 607, 607, 607,
+ 607, 607, 607, 607, 607, 607, 607, 607, 607, 607,
+ 607, 607, 607, 607, 607, 607, 604, 604, 604, 604,
+ 604, 604, 622, 604, 604, 604, 604, 604, 604, 612,
+
+ 329, 604, 623, 607, 607, 607, 607, 607, 607, 607,
+ 607, 607, 607, 607, 607, 607, 607, 607, 607, 607,
+ 607, 607, 607, 607, 607, 607, 607, 607, 607, 607,
+ 607, 607, 607, 607, 607, 607, 607, 607, 607, 607,
+ 607, 607, 607, 607, 607, 607, 607, 607, 607, 604,
+ 604, 604, 624, 604, 604, 604, 604, 622, 604, 604,
+ 604, 604, 604, 604, 329, 625, 607, 607, 607, 607,
+ 607, 607, 607, 607, 607, 607, 607, 607, 607, 607,
+ 607, 607, 607, 607, 607, 607, 607, 607, 607, 607,
+ 607, 607, 607, 607, 607, 607, 607, 607, 604, 624,
+
+ 604, 624, 626, 604, 604, 627, 604, 604, 604, 604,
+ 604, 604, 604, 604, 612, 604, 607, 607, 607, 607,
+ 607, 607, 607, 607, 607, 607, 607, 607, 607, 607,
+ 607, 607, 607, 607, 607, 607, 607, 607, 607, 607,
+ 626, 604, 626, 627, 604, 628, 604, 604, 604, 629,
+ 604, 604, 604, 604, 604, 604, 607, 607, 607, 607,
+ 607, 607, 607, 607, 607, 607, 607, 607, 607, 607,
+ 604, 604, 628, 604, 628, 604, 629, 604, 629, 630,
+ 631, 604, 604, 604, 607, 607, 607, 607, 604, 630,
+ 604, 630, 631, 604, 632, 633, 607, 604, 604, 632,
+
+ 604, 632, 604, 0, 604, 604, 604, 604, 604, 604,
+ 604, 604, 604, 604, 604, 604, 604, 604, 604, 604,
+ 604, 604, 604, 604, 604, 604, 604, 604, 604, 604,
+ 604, 604, 604
} ;
-static const flex_int16_t yy_nxt[1239] =
+static const flex_int16_t yy_nxt[1255] =
{ 0,
4, 5, 6, 7, 5, 8, 4, 9, 4, 4,
10, 11, 12, 13, 14, 14, 15, 16, 4, 17,
- 7, 18, 18, 18, 18, 19, 18, 20, 21, 18,
- 18, 22, 18, 18, 4, 23, 24, 25, 26, 27,
- 28, 29, 30, 31, 18, 18, 32, 33, 34, 35,
- 36, 18, 37, 38, 39, 40, 41, 42, 18, 18,
- 43, 46, 48, 43, 46, 44, 52, 121, 53, 54,
- 54, 55, 55, 55, 56, 70, 83, 71, 57, 45,
- 94, 95, 48, 122, 281, 58, 84, 64, 64, 64,
- 74, 49, 58, 282, 59, 59, 60, 61, 62, 115,
-
- 75, 584, 76, 79, 61, 62, 116, 102, 77, 586,
- 80, 49, 61, 62, 63, 85, 86, 81, 103, 61,
- 62, 89, 97, 82, 87, 104, 88, 119, 105, 90,
- 98, 106, 91, 108, 107, 110, 99, 109, 111, 63,
- 117, 120, 100, 123, 46, 118, 123, 46, 124, 204,
- 112, 113, 205, 114, 125, 126, 126, 127, 134, 137,
- 137, 134, 135, 140, 143, 143, 128, 128, 128, 141,
- 141, 170, 171, 126, 55, 55, 55, 572, 58, 584,
- 145, 145, 145, 186, 144, 180, 149, 150, 187, 142,
- 61, 62, 199, 129, 578, 181, 130, 212, 200, 131,
-
- 151, 151, 151, 132, 150, 61, 62, 213, 58, 144,
- 59, 59, 60, 577, 142, 55, 55, 55, 152, 152,
- 61, 62, 153, 153, 153, 61, 146, 147, 157, 147,
- 48, 388, 592, 188, 123, 61, 62, 123, 592, 124,
- 61, 146, 147, 58, 189, 60, 60, 60, 147, 58,
- 241, 64, 64, 64, 48, 61, 62, 158, 576, 49,
- 134, 61, 62, 134, 135, 48, 157, 126, 126, 220,
- 61, 62, 592, 226, 226, 228, 61, 62, 128, 128,
- 128, 229, 229, 49, 58, 126, 143, 143, 60, 58,
- 575, 145, 145, 145, 49, 158, 61, 62, 242, 232,
-
- 232, 61, 62, 233, 233, 233, 149, 150, 149, 150,
- 574, 61, 62, 153, 153, 153, 61, 62, 153, 153,
- 153, 290, 236, 537, 150, 236, 150, 239, 239, 252,
- 234, 48, 234, 291, 253, 254, 318, 157, 561, 317,
- 317, 236, 319, 319, 236, 234, 426, 157, 237, 333,
- 334, 234, 233, 233, 233, 323, 323, 560, 48, 559,
- 49, 558, 427, 233, 233, 233, 158, 237, 157, 240,
- 309, 310, 310, 311, 557, 147, 158, 147, 556, 555,
- 554, 373, 312, 312, 312, 447, 374, 49, 447, 310,
- 147, 375, 449, 376, 157, 449, 147, 158, 382, 382,
-
- 383, 157, 394, 394, 450, 450, 450, 494, 495, 313,
- 496, 553, 314, 496, 449, 315, 382, 449, 552, 316,
- 310, 310, 389, 158, 551, 495, 450, 450, 450, 550,
- 158, 312, 312, 312, 501, 501, 502, 538, 310, 157,
- 538, 549, 494, 495, 494, 495, 548, 395, 395, 395,
- 542, 571, 501, 542, 571, 395, 395, 395, 395, 395,
- 495, 396, 495, 444, 445, 445, 444, 547, 158, 395,
- 395, 395, 395, 395, 395, 446, 446, 446, 534, 535,
- 534, 535, 445, 458, 458, 458, 534, 535, 543, 537,
- 532, 458, 458, 458, 458, 458, 535, 531, 535, 444,
-
- 445, 445, 444, 530, 535, 458, 458, 458, 458, 458,
- 458, 492, 492, 492, 444, 445, 445, 444, 445, 529,
- 497, 498, 498, 497, 499, 528, 446, 446, 446, 544,
- 527, 526, 545, 445, 497, 498, 498, 497, 499, 498,
- 525, 546, 546, 546, 524, 523, 450, 450, 450, 565,
- 566, 569, 570, 498, 507, 507, 507, 565, 566, 522,
- 521, 520, 507, 507, 507, 507, 507, 566, 519, 570,
- 444, 445, 445, 444, 518, 566, 507, 507, 507, 507,
- 507, 507, 492, 492, 492, 539, 540, 540, 539, 445,
- 517, 573, 516, 562, 498, 498, 562, 541, 541, 541,
-
- 546, 546, 546, 515, 540, 563, 563, 563, 539, 540,
- 540, 539, 498, 514, 565, 566, 539, 540, 540, 539,
- 567, 567, 567, 569, 570, 513, 512, 540, 541, 541,
- 541, 544, 566, 511, 545, 540, 544, 510, 509, 545,
- 572, 570, 396, 546, 546, 546, 506, 505, 546, 546,
- 546, 562, 498, 498, 562, 579, 498, 498, 579, 585,
- 540, 540, 585, 563, 563, 563, 504, 563, 563, 563,
- 498, 567, 567, 567, 498, 569, 570, 503, 540, 581,
- 582, 453, 579, 498, 498, 579, 581, 582, 581, 582,
- 588, 588, 500, 570, 587, 587, 587, 582, 590, 591,
-
- 491, 498, 498, 498, 582, 490, 582, 489, 588, 590,
- 591, 590, 591, 587, 587, 587, 591, 488, 487, 486,
- 498, 485, 484, 483, 482, 481, 480, 591, 479, 591,
- 47, 47, 47, 47, 47, 47, 47, 47, 47, 50,
- 478, 50, 50, 50, 50, 50, 50, 50, 68, 68,
- 68, 68, 68, 136, 136, 136, 477, 476, 136, 139,
- 475, 139, 139, 139, 139, 139, 139, 139, 148, 148,
- 148, 148, 148, 148, 148, 148, 148, 154, 154, 156,
- 156, 156, 156, 156, 156, 156, 156, 156, 159, 474,
- 159, 159, 159, 159, 159, 159, 159, 230, 230, 230,
-
- 231, 231, 238, 238, 238, 473, 472, 238, 238, 303,
- 303, 303, 303, 303, 303, 303, 303, 303, 321, 321,
- 321, 324, 324, 325, 325, 397, 397, 397, 452, 452,
- 452, 452, 452, 452, 452, 452, 452, 459, 459, 459,
- 493, 493, 493, 493, 493, 493, 493, 493, 493, 508,
- 508, 508, 533, 533, 533, 533, 533, 533, 533, 533,
- 533, 536, 536, 536, 536, 536, 536, 536, 536, 536,
- 564, 564, 564, 564, 564, 564, 564, 564, 564, 568,
- 568, 568, 568, 568, 568, 568, 568, 568, 580, 580,
- 580, 580, 580, 580, 580, 580, 580, 583, 583, 583,
-
- 583, 583, 583, 583, 583, 583, 589, 589, 589, 589,
- 589, 589, 589, 589, 589, 471, 470, 469, 468, 467,
- 466, 465, 464, 463, 462, 461, 460, 396, 457, 456,
- 455, 454, 388, 453, 451, 448, 443, 442, 441, 440,
- 439, 438, 437, 436, 435, 434, 433, 432, 431, 430,
- 429, 428, 425, 424, 423, 422, 421, 420, 419, 418,
- 417, 416, 415, 414, 413, 412, 411, 410, 409, 408,
- 407, 406, 405, 404, 403, 402, 401, 400, 399, 398,
- 396, 320, 318, 393, 392, 391, 390, 592, 387, 386,
- 385, 384, 304, 381, 380, 379, 378, 377, 372, 371,
-
- 370, 369, 368, 367, 366, 365, 364, 363, 362, 361,
- 360, 359, 358, 357, 356, 355, 354, 353, 352, 351,
- 350, 349, 348, 347, 346, 345, 344, 343, 342, 341,
- 340, 339, 338, 337, 336, 335, 332, 331, 330, 329,
- 328, 327, 326, 70, 322, 320, 308, 307, 306, 305,
- 219, 304, 302, 301, 300, 299, 298, 297, 296, 295,
- 294, 293, 292, 289, 288, 287, 286, 285, 284, 283,
- 280, 279, 278, 277, 276, 275, 274, 273, 272, 271,
- 270, 269, 268, 267, 266, 265, 264, 263, 262, 261,
- 260, 259, 258, 257, 256, 255, 251, 250, 249, 248,
-
- 247, 246, 245, 244, 243, 241, 235, 227, 227, 227,
- 225, 224, 223, 222, 221, 219, 218, 217, 216, 215,
- 214, 211, 210, 209, 208, 207, 206, 203, 202, 201,
- 198, 197, 196, 195, 194, 193, 192, 191, 190, 185,
- 184, 183, 182, 179, 178, 177, 176, 175, 174, 173,
- 172, 169, 168, 167, 166, 165, 164, 163, 162, 161,
- 160, 155, 138, 133, 101, 96, 93, 92, 78, 73,
- 72, 69, 67, 66, 65, 51, 592, 3, 592, 592,
- 592, 592, 592, 592, 592, 592, 592, 592, 592, 592,
- 592, 592, 592, 592, 592, 592, 592, 592, 592, 592,
-
- 592, 592, 592, 592, 592, 592, 592, 592, 592, 592,
- 592, 592, 592, 592, 592, 592, 592, 592, 592, 592,
- 592, 592, 592, 592, 592, 592, 592, 592, 592, 592,
- 592, 592, 592, 592, 592, 592, 592, 592
+ 7, 18, 19, 19, 19, 19, 20, 19, 21, 22,
+ 19, 19, 23, 19, 19, 4, 24, 25, 26, 27,
+ 28, 29, 30, 31, 32, 19, 19, 33, 34, 35,
+ 36, 37, 19, 38, 39, 40, 41, 42, 43, 19,
+ 19, 44, 47, 49, 44, 47, 45, 53, 594, 54,
+ 55, 55, 56, 56, 56, 57, 72, 85, 73, 58,
+ 46, 96, 97, 597, 91, 596, 59, 86, 65, 65,
+ 65, 76, 92, 50, 59, 93, 60, 60, 61, 62,
+
+ 63, 77, 110, 78, 81, 117, 111, 62, 63, 79,
+ 202, 82, 118, 99, 62, 63, 203, 64, 83, 87,
+ 88, 100, 62, 63, 84, 104, 107, 101, 89, 108,
+ 90, 112, 109, 102, 113, 119, 105, 121, 123, 581,
+ 120, 47, 64, 106, 47, 125, 114, 115, 125, 116,
+ 126, 122, 49, 594, 124, 127, 128, 128, 129, 136,
+ 139, 139, 136, 137, 142, 145, 145, 130, 130, 130,
+ 143, 143, 160, 432, 128, 56, 56, 56, 151, 152,
+ 173, 174, 50, 153, 153, 153, 146, 183, 191, 433,
+ 59, 144, 147, 147, 147, 131, 152, 184, 132, 192,
+
+ 588, 133, 161, 62, 63, 134, 207, 215, 393, 208,
+ 59, 146, 60, 60, 61, 49, 144, 216, 62, 63,
+ 56, 56, 56, 62, 63, 189, 49, 587, 604, 586,
+ 190, 62, 148, 149, 604, 149, 154, 154, 62, 63,
+ 155, 155, 155, 160, 585, 50, 62, 148, 149, 59,
+ 604, 61, 61, 61, 149, 59, 50, 65, 65, 65,
+ 160, 125, 62, 63, 125, 584, 126, 136, 62, 63,
+ 136, 137, 49, 161, 128, 128, 223, 62, 63, 583,
+ 229, 229, 231, 62, 63, 130, 130, 130, 232, 232,
+ 161, 59, 128, 145, 145, 61, 59, 245, 147, 147,
+
+ 147, 49, 50, 240, 62, 63, 240, 235, 235, 62,
+ 63, 236, 236, 236, 151, 152, 151, 152, 545, 62,
+ 63, 155, 155, 155, 62, 63, 155, 155, 155, 285,
+ 241, 50, 152, 294, 152, 243, 243, 256, 286, 237,
+ 49, 237, 257, 258, 322, 295, 246, 160, 321, 321,
+ 323, 323, 338, 339, 237, 236, 236, 236, 160, 570,
+ 237, 236, 236, 236, 569, 453, 328, 328, 453, 240,
+ 50, 568, 240, 567, 149, 160, 149, 161, 244, 313,
+ 314, 314, 315, 387, 387, 388, 566, 503, 161, 149,
+ 503, 316, 316, 316, 378, 149, 241, 565, 314, 379,
+
+ 160, 387, 501, 502, 380, 161, 381, 546, 400, 400,
+ 546, 564, 563, 501, 502, 314, 314, 394, 550, 317,
+ 502, 550, 318, 562, 561, 319, 316, 316, 316, 320,
+ 161, 502, 560, 314, 160, 455, 559, 558, 455, 508,
+ 508, 509, 401, 401, 401, 501, 502, 456, 456, 456,
+ 557, 401, 401, 401, 401, 401, 402, 508, 556, 450,
+ 451, 451, 450, 502, 161, 401, 401, 401, 401, 401,
+ 401, 452, 452, 452, 580, 542, 543, 580, 451, 465,
+ 465, 465, 450, 451, 451, 450, 555, 551, 465, 465,
+ 465, 465, 465, 543, 499, 499, 499, 450, 451, 451,
+
+ 450, 451, 465, 465, 465, 465, 465, 465, 545, 452,
+ 452, 452, 455, 540, 539, 455, 451, 504, 505, 505,
+ 504, 506, 538, 537, 456, 456, 456, 542, 543, 456,
+ 456, 456, 595, 542, 543, 595, 505, 515, 515, 515,
+ 450, 451, 451, 450, 536, 543, 515, 515, 515, 515,
+ 515, 543, 499, 499, 499, 574, 575, 535, 534, 451,
+ 515, 515, 515, 515, 515, 515, 504, 505, 505, 504,
+ 506, 578, 579, 575, 547, 548, 548, 547, 552, 533,
+ 532, 553, 531, 530, 529, 505, 549, 549, 549, 579,
+ 554, 554, 554, 548, 571, 505, 505, 571, 547, 548,
+
+ 548, 547, 547, 548, 548, 547, 572, 572, 572, 528,
+ 576, 576, 576, 505, 549, 549, 549, 548, 527, 552,
+ 526, 548, 553, 552, 525, 524, 553, 581, 523, 582,
+ 522, 554, 554, 554, 521, 554, 554, 554, 554, 554,
+ 554, 571, 505, 505, 571, 589, 505, 505, 589, 574,
+ 575, 574, 575, 572, 572, 572, 520, 572, 572, 572,
+ 505, 548, 548, 519, 505, 578, 579, 575, 518, 575,
+ 578, 579, 576, 576, 576, 591, 592, 591, 592, 548,
+ 517, 591, 592, 579, 589, 505, 505, 589, 579, 599,
+ 599, 601, 602, 592, 402, 592, 598, 598, 598, 592,
+
+ 505, 505, 514, 505, 601, 602, 513, 599, 512, 602,
+ 511, 598, 598, 598, 601, 602, 510, 459, 505, 507,
+ 498, 497, 602, 496, 495, 494, 493, 492, 491, 490,
+ 489, 488, 602, 48, 48, 48, 48, 48, 48, 48,
+ 48, 48, 51, 487, 51, 51, 51, 51, 51, 51,
+ 51, 70, 70, 70, 70, 70, 138, 138, 138, 486,
+ 485, 138, 141, 484, 141, 141, 141, 141, 141, 141,
+ 141, 150, 150, 150, 150, 150, 150, 150, 150, 150,
+ 156, 156, 159, 159, 159, 159, 159, 159, 159, 159,
+ 159, 162, 483, 162, 162, 162, 162, 162, 162, 162,
+
+ 233, 233, 233, 234, 234, 242, 242, 242, 482, 481,
+ 242, 242, 307, 307, 307, 307, 307, 307, 307, 307,
+ 307, 325, 325, 325, 329, 329, 330, 330, 403, 403,
+ 403, 458, 458, 458, 458, 458, 458, 458, 458, 458,
+ 466, 466, 466, 500, 500, 500, 500, 500, 500, 500,
+ 500, 500, 516, 516, 516, 541, 541, 541, 541, 541,
+ 541, 541, 541, 541, 544, 544, 544, 544, 544, 544,
+ 544, 544, 544, 573, 573, 573, 573, 573, 573, 573,
+ 573, 573, 577, 577, 577, 577, 577, 577, 577, 577,
+ 577, 590, 590, 590, 590, 590, 590, 590, 590, 590,
+
+ 593, 593, 593, 593, 593, 593, 593, 593, 593, 600,
+ 600, 600, 600, 600, 600, 600, 600, 600, 603, 603,
+ 603, 603, 480, 479, 478, 477, 476, 475, 474, 473,
+ 472, 471, 470, 469, 468, 467, 402, 464, 463, 462,
+ 461, 460, 393, 459, 457, 454, 449, 448, 447, 446,
+ 445, 444, 443, 442, 441, 440, 439, 438, 437, 436,
+ 435, 434, 431, 430, 429, 428, 427, 426, 425, 424,
+ 423, 422, 421, 420, 419, 418, 417, 416, 415, 414,
+ 413, 412, 411, 410, 409, 408, 407, 406, 405, 404,
+ 402, 399, 324, 322, 398, 397, 396, 395, 604, 392,
+
+ 391, 390, 389, 308, 386, 385, 384, 383, 382, 377,
+ 376, 375, 374, 373, 372, 371, 370, 369, 368, 367,
+ 366, 365, 364, 363, 362, 361, 360, 359, 358, 357,
+ 356, 355, 354, 353, 352, 351, 350, 349, 348, 347,
+ 346, 345, 344, 343, 342, 341, 340, 337, 336, 335,
+ 334, 333, 332, 331, 72, 327, 326, 324, 312, 311,
+ 310, 309, 222, 308, 306, 305, 304, 303, 302, 301,
+ 300, 299, 298, 297, 296, 293, 292, 291, 290, 289,
+ 288, 287, 284, 283, 282, 281, 280, 279, 278, 277,
+ 276, 275, 274, 273, 272, 271, 270, 269, 268, 267,
+
+ 266, 265, 264, 263, 262, 261, 260, 259, 255, 254,
+ 253, 252, 251, 250, 249, 248, 247, 245, 239, 238,
+ 230, 230, 230, 228, 227, 226, 225, 224, 222, 221,
+ 220, 219, 218, 217, 214, 213, 212, 211, 210, 209,
+ 206, 205, 204, 201, 200, 199, 198, 197, 196, 195,
+ 194, 193, 188, 187, 186, 185, 182, 181, 180, 179,
+ 178, 177, 176, 175, 172, 171, 170, 169, 168, 167,
+ 166, 165, 164, 163, 158, 157, 140, 135, 103, 98,
+ 95, 94, 80, 75, 74, 71, 69, 68, 67, 66,
+ 52, 604, 3, 604, 604, 604, 604, 604, 604, 604,
+
+ 604, 604, 604, 604, 604, 604, 604, 604, 604, 604,
+ 604, 604, 604, 604, 604, 604, 604, 604, 604, 604,
+ 604, 604, 604, 604, 604, 604, 604, 604, 604, 604,
+ 604, 604, 604, 604, 604, 604, 604, 604, 604, 604,
+ 604, 604, 604, 604, 604, 604, 604, 604, 604, 604,
+ 604, 604, 604, 604
} ;
-static const flex_int16_t yy_chk[1239] =
+static const flex_int16_t yy_chk[1255] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
@@ -1021,136 +1029,138 @@ static const flex_int16_t yy_chk[1239] =
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 2, 5, 8, 2, 5, 2, 10, 42, 10, 10,
- 10, 11, 11, 11, 12, 20, 26, 20, 12, 2,
- 31, 31, 47, 42, 199, 14, 26, 14, 14, 14,
- 23, 8, 13, 199, 13, 13, 13, 14, 14, 39,
-
- 23, 583, 23, 25, 13, 13, 39, 35, 23, 577,
- 25, 47, 14, 14, 13, 27, 27, 25, 35, 13,
- 13, 28, 33, 25, 27, 35, 27, 41, 36, 28,
- 33, 36, 28, 37, 36, 38, 33, 37, 38, 13,
- 40, 41, 33, 43, 46, 40, 43, 46, 43, 110,
- 38, 38, 110, 38, 44, 44, 44, 44, 48, 49,
- 49, 48, 48, 51, 53, 53, 44, 44, 44, 51,
- 51, 81, 81, 44, 52, 52, 52, 573, 54, 572,
- 54, 54, 54, 95, 53, 90, 57, 57, 95, 51,
- 54, 54, 106, 44, 560, 90, 44, 117, 106, 44,
-
- 58, 58, 58, 44, 57, 54, 54, 117, 59, 53,
- 59, 59, 59, 559, 51, 55, 55, 55, 62, 62,
- 59, 59, 62, 62, 62, 55, 55, 55, 70, 55,
- 135, 311, 125, 96, 123, 59, 59, 123, 125, 123,
- 55, 55, 55, 60, 96, 60, 60, 60, 55, 64,
- 160, 64, 64, 64, 136, 60, 60, 70, 556, 135,
- 134, 64, 64, 134, 134, 137, 156, 128, 128, 128,
- 60, 60, 311, 137, 137, 141, 64, 64, 128, 128,
- 128, 141, 141, 136, 143, 128, 143, 143, 143, 145,
- 555, 145, 145, 145, 137, 156, 143, 143, 160, 146,
-
- 146, 145, 145, 146, 146, 146, 148, 148, 150, 150,
- 547, 143, 143, 152, 152, 152, 145, 145, 153, 153,
- 153, 207, 157, 536, 148, 157, 150, 158, 158, 171,
- 153, 226, 153, 207, 171, 171, 229, 238, 532, 226,
- 226, 236, 229, 229, 236, 153, 362, 239, 157, 253,
- 253, 153, 232, 232, 232, 239, 239, 530, 317, 528,
- 226, 526, 362, 233, 233, 233, 238, 236, 394, 158,
- 225, 225, 225, 225, 523, 233, 239, 233, 521, 518,
- 517, 295, 225, 225, 225, 384, 295, 317, 384, 225,
- 233, 295, 386, 295, 323, 386, 233, 394, 304, 304,
-
- 304, 507, 323, 323, 386, 386, 386, 447, 447, 225,
- 448, 516, 225, 448, 449, 225, 304, 449, 515, 225,
- 312, 312, 312, 323, 514, 447, 449, 449, 449, 512,
- 507, 312, 312, 312, 453, 453, 453, 500, 312, 324,
- 500, 511, 493, 493, 495, 495, 510, 324, 324, 324,
- 503, 543, 453, 503, 543, 324, 324, 324, 324, 324,
- 493, 508, 495, 383, 383, 383, 383, 506, 324, 324,
- 324, 324, 324, 324, 324, 383, 383, 383, 496, 496,
- 533, 533, 383, 395, 395, 395, 535, 535, 504, 499,
- 490, 395, 395, 395, 395, 395, 496, 489, 533, 444,
-
- 444, 444, 444, 488, 535, 395, 395, 395, 395, 395,
- 395, 444, 444, 444, 446, 446, 446, 446, 444, 487,
- 497, 497, 497, 497, 497, 485, 446, 446, 446, 505,
- 484, 483, 505, 446, 450, 450, 450, 450, 450, 497,
- 482, 505, 505, 505, 481, 480, 450, 450, 450, 538,
- 538, 542, 542, 450, 458, 458, 458, 564, 564, 479,
- 477, 476, 458, 458, 458, 458, 458, 538, 475, 542,
- 492, 492, 492, 492, 474, 564, 458, 458, 458, 458,
- 458, 458, 492, 492, 492, 502, 502, 502, 502, 492,
- 472, 546, 471, 537, 537, 537, 537, 502, 502, 502,
-
- 546, 546, 546, 469, 502, 537, 537, 537, 539, 539,
- 539, 539, 537, 468, 566, 566, 541, 541, 541, 541,
- 539, 539, 539, 568, 568, 465, 464, 539, 541, 541,
- 541, 544, 566, 463, 544, 541, 545, 461, 460, 545,
- 545, 568, 459, 544, 544, 544, 457, 456, 545, 545,
- 545, 562, 562, 562, 562, 563, 563, 563, 563, 574,
- 567, 567, 574, 562, 562, 562, 455, 563, 563, 563,
- 562, 567, 567, 567, 563, 570, 570, 454, 567, 571,
- 571, 452, 579, 579, 579, 579, 580, 580, 582, 582,
- 584, 584, 451, 570, 579, 579, 579, 571, 585, 585,
-
- 443, 579, 587, 587, 580, 442, 582, 441, 584, 589,
- 589, 591, 591, 587, 587, 587, 585, 440, 439, 437,
- 587, 436, 434, 431, 430, 429, 427, 589, 425, 591,
- 593, 593, 593, 593, 593, 593, 593, 593, 593, 594,
- 424, 594, 594, 594, 594, 594, 594, 594, 595, 595,
- 595, 595, 595, 596, 596, 596, 423, 422, 596, 597,
- 419, 597, 597, 597, 597, 597, 597, 597, 598, 598,
- 598, 598, 598, 598, 598, 598, 598, 599, 599, 600,
- 600, 600, 600, 600, 600, 600, 600, 600, 601, 417,
- 601, 601, 601, 601, 601, 601, 601, 602, 602, 602,
-
- 603, 603, 604, 604, 604, 416, 415, 604, 604, 605,
- 605, 605, 605, 605, 605, 605, 605, 605, 606, 606,
- 606, 607, 607, 608, 608, 609, 609, 609, 610, 610,
- 610, 610, 610, 610, 610, 610, 610, 611, 611, 611,
- 612, 612, 612, 612, 612, 612, 612, 612, 612, 613,
- 613, 613, 614, 614, 614, 614, 614, 614, 614, 614,
- 614, 615, 615, 615, 615, 615, 615, 615, 615, 615,
- 616, 616, 616, 616, 616, 616, 616, 616, 616, 617,
- 617, 617, 617, 617, 617, 617, 617, 617, 618, 618,
- 618, 618, 618, 618, 618, 618, 618, 619, 619, 619,
-
- 619, 619, 619, 619, 619, 619, 620, 620, 620, 620,
- 620, 620, 620, 620, 620, 413, 411, 410, 409, 407,
- 405, 404, 403, 402, 401, 400, 399, 397, 393, 392,
- 391, 390, 389, 388, 387, 385, 381, 379, 378, 376,
- 375, 374, 373, 372, 371, 370, 369, 368, 366, 365,
- 364, 363, 361, 360, 359, 358, 357, 355, 354, 353,
- 352, 351, 349, 347, 346, 343, 342, 341, 340, 338,
- 337, 336, 335, 334, 332, 331, 330, 329, 327, 326,
- 325, 321, 319, 316, 315, 314, 313, 309, 308, 307,
- 306, 305, 303, 302, 301, 299, 297, 296, 294, 293,
-
- 292, 291, 290, 289, 288, 287, 286, 285, 284, 283,
- 282, 281, 280, 279, 278, 277, 276, 275, 274, 273,
- 271, 270, 269, 268, 266, 265, 264, 263, 262, 261,
- 260, 258, 257, 256, 255, 254, 252, 251, 248, 247,
- 246, 245, 243, 237, 235, 230, 224, 223, 222, 221,
- 220, 219, 218, 217, 216, 215, 214, 213, 212, 211,
- 210, 209, 208, 206, 205, 204, 203, 202, 201, 200,
- 198, 196, 195, 194, 193, 192, 191, 190, 189, 188,
- 187, 186, 185, 184, 183, 182, 181, 180, 179, 178,
- 177, 176, 175, 174, 173, 172, 170, 169, 168, 167,
-
- 166, 164, 163, 162, 161, 159, 155, 142, 140, 139,
- 133, 132, 131, 130, 129, 127, 122, 121, 120, 119,
- 118, 116, 115, 114, 113, 112, 111, 109, 108, 107,
- 105, 104, 103, 102, 101, 100, 99, 98, 97, 94,
- 93, 92, 91, 89, 88, 87, 86, 85, 84, 83,
- 82, 80, 79, 78, 77, 76, 75, 74, 73, 72,
- 71, 69, 50, 45, 34, 32, 30, 29, 24, 22,
- 21, 19, 17, 16, 15, 9, 3, 592, 592, 592,
- 592, 592, 592, 592, 592, 592, 592, 592, 592, 592,
- 592, 592, 592, 592, 592, 592, 592, 592, 592, 592,
-
- 592, 592, 592, 592, 592, 592, 592, 592, 592, 592,
- 592, 592, 592, 592, 592, 592, 592, 592, 592, 592,
- 592, 592, 592, 592, 592, 592, 592, 592, 592, 592,
- 592, 592, 592, 592, 592, 592, 592, 592
+ 1, 2, 5, 8, 2, 5, 2, 10, 593, 10,
+ 10, 10, 11, 11, 11, 12, 21, 27, 21, 12,
+ 2, 32, 32, 587, 29, 584, 14, 27, 14, 14,
+ 14, 24, 29, 8, 13, 29, 13, 13, 13, 14,
+
+ 14, 24, 38, 24, 26, 40, 38, 13, 13, 24,
+ 108, 26, 40, 34, 14, 14, 108, 13, 26, 28,
+ 28, 34, 13, 13, 26, 36, 37, 34, 28, 37,
+ 28, 39, 37, 34, 39, 41, 36, 42, 43, 582,
+ 41, 47, 13, 36, 47, 44, 39, 39, 44, 39,
+ 44, 42, 48, 581, 43, 45, 45, 45, 45, 49,
+ 50, 50, 49, 49, 52, 54, 54, 45, 45, 45,
+ 52, 52, 72, 367, 45, 53, 53, 53, 58, 58,
+ 83, 83, 48, 59, 59, 59, 54, 92, 98, 367,
+ 55, 52, 55, 55, 55, 45, 58, 92, 45, 98,
+
+ 569, 45, 72, 55, 55, 45, 112, 119, 315, 112,
+ 60, 54, 60, 60, 60, 137, 52, 119, 55, 55,
+ 56, 56, 56, 60, 60, 97, 138, 568, 127, 565,
+ 97, 56, 56, 56, 127, 56, 63, 63, 60, 60,
+ 63, 63, 63, 159, 564, 137, 56, 56, 56, 61,
+ 315, 61, 61, 61, 56, 65, 138, 65, 65, 65,
+ 242, 125, 61, 61, 125, 556, 125, 136, 65, 65,
+ 136, 136, 139, 159, 130, 130, 130, 61, 61, 555,
+ 139, 139, 143, 65, 65, 130, 130, 130, 143, 143,
+ 242, 145, 130, 145, 145, 145, 147, 163, 147, 147,
+
+ 147, 321, 139, 160, 145, 145, 160, 148, 148, 147,
+ 147, 148, 148, 148, 150, 150, 152, 152, 544, 145,
+ 145, 154, 154, 154, 147, 147, 155, 155, 155, 202,
+ 160, 321, 150, 210, 152, 161, 161, 174, 202, 155,
+ 229, 155, 174, 174, 232, 210, 163, 400, 229, 229,
+ 232, 232, 257, 257, 155, 235, 235, 235, 243, 540,
+ 155, 236, 236, 236, 538, 389, 243, 243, 389, 240,
+ 229, 536, 240, 534, 236, 515, 236, 400, 161, 228,
+ 228, 228, 228, 308, 308, 308, 531, 454, 243, 236,
+ 454, 228, 228, 228, 299, 236, 240, 529, 228, 299,
+
+ 328, 308, 453, 453, 299, 515, 299, 507, 328, 328,
+ 507, 526, 525, 500, 500, 316, 316, 316, 510, 228,
+ 453, 510, 228, 524, 523, 228, 316, 316, 316, 228,
+ 328, 500, 522, 316, 329, 391, 520, 519, 391, 459,
+ 459, 459, 329, 329, 329, 502, 502, 391, 391, 391,
+ 518, 329, 329, 329, 329, 329, 516, 459, 514, 388,
+ 388, 388, 388, 502, 329, 329, 329, 329, 329, 329,
+ 329, 388, 388, 388, 551, 503, 503, 551, 388, 401,
+ 401, 401, 450, 450, 450, 450, 513, 511, 401, 401,
+ 401, 401, 401, 503, 450, 450, 450, 452, 452, 452,
+
+ 452, 450, 401, 401, 401, 401, 401, 401, 506, 452,
+ 452, 452, 455, 497, 496, 455, 452, 456, 456, 456,
+ 456, 456, 495, 494, 455, 455, 455, 541, 541, 456,
+ 456, 456, 583, 543, 543, 583, 456, 465, 465, 465,
+ 499, 499, 499, 499, 492, 541, 465, 465, 465, 465,
+ 465, 543, 499, 499, 499, 546, 546, 491, 490, 499,
+ 465, 465, 465, 465, 465, 465, 504, 504, 504, 504,
+ 504, 550, 550, 546, 509, 509, 509, 509, 512, 489,
+ 488, 512, 487, 486, 484, 504, 509, 509, 509, 550,
+ 512, 512, 512, 509, 545, 545, 545, 545, 547, 547,
+
+ 547, 547, 549, 549, 549, 549, 545, 545, 545, 483,
+ 547, 547, 547, 545, 549, 549, 549, 547, 482, 552,
+ 481, 549, 552, 553, 479, 478, 553, 553, 476, 554,
+ 475, 552, 552, 552, 472, 553, 553, 553, 554, 554,
+ 554, 571, 571, 571, 571, 572, 572, 572, 572, 573,
+ 573, 575, 575, 571, 571, 571, 471, 572, 572, 572,
+ 571, 576, 576, 470, 572, 577, 577, 573, 468, 575,
+ 579, 579, 576, 576, 576, 580, 580, 590, 590, 576,
+ 467, 592, 592, 577, 589, 589, 589, 589, 579, 594,
+ 594, 595, 595, 580, 466, 590, 589, 589, 589, 592,
+
+ 598, 598, 464, 589, 600, 600, 463, 594, 462, 595,
+ 461, 598, 598, 598, 602, 602, 460, 458, 598, 457,
+ 449, 448, 600, 447, 446, 445, 443, 442, 440, 437,
+ 436, 435, 602, 605, 605, 605, 605, 605, 605, 605,
+ 605, 605, 606, 433, 606, 606, 606, 606, 606, 606,
+ 606, 607, 607, 607, 607, 607, 608, 608, 608, 431,
+ 430, 608, 609, 429, 609, 609, 609, 609, 609, 609,
+ 609, 610, 610, 610, 610, 610, 610, 610, 610, 610,
+ 611, 611, 612, 612, 612, 612, 612, 612, 612, 612,
+ 612, 613, 428, 613, 613, 613, 613, 613, 613, 613,
+
+ 614, 614, 614, 615, 615, 616, 616, 616, 425, 423,
+ 616, 616, 617, 617, 617, 617, 617, 617, 617, 617,
+ 617, 618, 618, 618, 619, 619, 620, 620, 621, 621,
+ 621, 622, 622, 622, 622, 622, 622, 622, 622, 622,
+ 623, 623, 623, 624, 624, 624, 624, 624, 624, 624,
+ 624, 624, 625, 625, 625, 626, 626, 626, 626, 626,
+ 626, 626, 626, 626, 627, 627, 627, 627, 627, 627,
+ 627, 627, 627, 628, 628, 628, 628, 628, 628, 628,
+ 628, 628, 629, 629, 629, 629, 629, 629, 629, 629,
+ 629, 630, 630, 630, 630, 630, 630, 630, 630, 630,
+
+ 631, 631, 631, 631, 631, 631, 631, 631, 631, 632,
+ 632, 632, 632, 632, 632, 632, 632, 632, 633, 633,
+ 633, 633, 422, 421, 419, 417, 416, 415, 413, 411,
+ 410, 409, 408, 407, 406, 405, 403, 399, 398, 397,
+ 396, 395, 394, 393, 392, 390, 386, 384, 383, 381,
+ 380, 379, 378, 377, 376, 375, 374, 373, 371, 370,
+ 369, 368, 366, 365, 364, 363, 362, 360, 359, 358,
+ 357, 356, 354, 352, 351, 348, 347, 346, 345, 343,
+ 342, 341, 340, 339, 337, 336, 335, 334, 332, 331,
+ 330, 326, 325, 323, 320, 319, 318, 317, 313, 312,
+
+ 311, 310, 309, 307, 306, 305, 303, 301, 300, 298,
+ 297, 296, 295, 294, 293, 292, 291, 290, 289, 288,
+ 287, 286, 285, 284, 283, 282, 281, 280, 279, 278,
+ 277, 275, 274, 273, 272, 270, 269, 268, 267, 266,
+ 265, 264, 262, 261, 260, 259, 258, 256, 255, 252,
+ 251, 250, 249, 247, 241, 239, 238, 233, 227, 226,
+ 225, 224, 223, 222, 221, 220, 219, 218, 217, 216,
+ 215, 214, 213, 212, 211, 209, 208, 207, 206, 205,
+ 204, 203, 201, 199, 198, 197, 196, 195, 194, 193,
+ 192, 191, 190, 189, 188, 187, 186, 185, 184, 183,
+
+ 182, 181, 180, 179, 178, 177, 176, 175, 173, 172,
+ 171, 170, 169, 167, 166, 165, 164, 162, 158, 157,
+ 144, 142, 141, 135, 134, 133, 132, 131, 129, 124,
+ 123, 122, 121, 120, 118, 117, 116, 115, 114, 113,
+ 111, 110, 109, 107, 106, 105, 104, 103, 102, 101,
+ 100, 99, 96, 95, 94, 93, 91, 90, 89, 88,
+ 87, 86, 85, 84, 82, 81, 80, 79, 78, 77,
+ 76, 75, 74, 73, 71, 69, 51, 46, 35, 33,
+ 31, 30, 25, 23, 22, 20, 18, 17, 16, 15,
+ 9, 3, 604, 604, 604, 604, 604, 604, 604, 604,
+
+ 604, 604, 604, 604, 604, 604, 604, 604, 604, 604,
+ 604, 604, 604, 604, 604, 604, 604, 604, 604, 604,
+ 604, 604, 604, 604, 604, 604, 604, 604, 604, 604,
+ 604, 604, 604, 604, 604, 604, 604, 604, 604, 604,
+ 604, 604, 604, 604, 604, 604, 604, 604, 604, 604,
+ 604, 604, 604, 604
} ;
static yy_state_type yy_last_accepting_state;
@@ -1239,7 +1249,7 @@ trademarks or registered trademarks of Sun Microsystems, Inc.
*/
/*
- * idl.ll - Lexical scanner for IDL 3.1
+ * idl.ll - Lexical scanner for IDL
*/
#include "global_extern.h"
@@ -1262,6 +1272,7 @@ trademarks or registered trademarks of Sun Microsystems, Inc.
#include "fe_home_header.h"
#include "fe_private.h"
#include "fe_extern.h"
+#include "ast_annotation_appl.h"
#include "idl.tab.hpp"
static char * idl_wstring_escape_reader (char *);
@@ -1286,9 +1297,9 @@ static AST_Decl * idl_find_node (const char *);
#undef ECHO
#endif
-#line 1291 "fe/idl.yy.cpp"
+#line 1303 "fe/idl.yy.cpp"
/* SO we don't choke on files that use \r\n */
-#line 1293 "fe/idl.yy.cpp"
+#line 1305 "fe/idl.yy.cpp"
#define INITIAL 0
@@ -1508,10 +1519,10 @@ YY_DECL
}
{
-#line 122 "fe/idl.ll"
+#line 123 "fe/idl.ll"
-#line 1516 "fe/idl.yy.cpp"
+#line 1528 "fe/idl.yy.cpp"
while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
{
@@ -1539,13 +1550,13 @@ yy_match:
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 >= 593 )
+ if ( yy_current_state >= 605 )
yy_c = yy_meta[yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
++yy_cp;
}
- while ( yy_current_state != 592 );
+ while ( yy_current_state != 604 );
yy_cp = (yy_last_accepting_cpos);
yy_current_state = (yy_last_accepting_state);
@@ -1567,375 +1578,386 @@ do_action: /* This label is used only to access EOF actions. */
case 1:
YY_RULE_SETUP
-#line 124 "fe/idl.ll"
+#line 125 "fe/idl.ll"
return IDL_ANY;
YY_BREAK
case 2:
YY_RULE_SETUP
-#line 125 "fe/idl.ll"
+#line 126 "fe/idl.ll"
return IDL_OBJECT;
YY_BREAK
case 3:
YY_RULE_SETUP
-#line 126 "fe/idl.ll"
+#line 127 "fe/idl.ll"
return IDL_MODULE;
YY_BREAK
case 4:
YY_RULE_SETUP
-#line 127 "fe/idl.ll"
+#line 128 "fe/idl.ll"
return IDL_RAISES;
YY_BREAK
case 5:
YY_RULE_SETUP
-#line 128 "fe/idl.ll"
+#line 129 "fe/idl.ll"
return IDL_READONLY;
YY_BREAK
case 6:
YY_RULE_SETUP
-#line 129 "fe/idl.ll"
+#line 130 "fe/idl.ll"
return IDL_ATTRIBUTE;
YY_BREAK
case 7:
YY_RULE_SETUP
-#line 130 "fe/idl.ll"
+#line 131 "fe/idl.ll"
return IDL_EXCEPTION;
YY_BREAK
case 8:
YY_RULE_SETUP
-#line 131 "fe/idl.ll"
+#line 132 "fe/idl.ll"
return IDL_CONTEXT;
YY_BREAK
case 9:
YY_RULE_SETUP
-#line 132 "fe/idl.ll"
+#line 133 "fe/idl.ll"
return IDL_INTERFACE;
YY_BREAK
case 10:
YY_RULE_SETUP
-#line 133 "fe/idl.ll"
+#line 134 "fe/idl.ll"
return IDL_CONST;
YY_BREAK
case 11:
YY_RULE_SETUP
-#line 134 "fe/idl.ll"
+#line 135 "fe/idl.ll"
return IDL_TYPEDEF;
YY_BREAK
case 12:
YY_RULE_SETUP
-#line 135 "fe/idl.ll"
+#line 136 "fe/idl.ll"
return IDL_STRUCT;
YY_BREAK
case 13:
YY_RULE_SETUP
-#line 136 "fe/idl.ll"
+#line 137 "fe/idl.ll"
return IDL_ENUM;
YY_BREAK
case 14:
YY_RULE_SETUP
-#line 137 "fe/idl.ll"
+#line 138 "fe/idl.ll"
return IDL_STRING;
YY_BREAK
case 15:
YY_RULE_SETUP
-#line 138 "fe/idl.ll"
+#line 139 "fe/idl.ll"
return IDL_WSTRING;
YY_BREAK
case 16:
YY_RULE_SETUP
-#line 139 "fe/idl.ll"
+#line 140 "fe/idl.ll"
return IDL_SEQUENCE;
YY_BREAK
case 17:
YY_RULE_SETUP
-#line 140 "fe/idl.ll"
+#line 141 "fe/idl.ll"
return IDL_UNION;
YY_BREAK
case 18:
YY_RULE_SETUP
-#line 141 "fe/idl.ll"
+#line 142 "fe/idl.ll"
return IDL_FIXED;
YY_BREAK
case 19:
YY_RULE_SETUP
-#line 142 "fe/idl.ll"
+#line 143 "fe/idl.ll"
return IDL_SWITCH;
YY_BREAK
case 20:
YY_RULE_SETUP
-#line 143 "fe/idl.ll"
+#line 144 "fe/idl.ll"
return IDL_CASE;
YY_BREAK
case 21:
YY_RULE_SETUP
-#line 144 "fe/idl.ll"
+#line 145 "fe/idl.ll"
return IDL_DEFAULT;
YY_BREAK
case 22:
YY_RULE_SETUP
-#line 145 "fe/idl.ll"
+#line 146 "fe/idl.ll"
return IDL_FLOAT;
YY_BREAK
case 23:
YY_RULE_SETUP
-#line 146 "fe/idl.ll"
+#line 147 "fe/idl.ll"
return IDL_DOUBLE;
YY_BREAK
case 24:
YY_RULE_SETUP
-#line 147 "fe/idl.ll"
+#line 148 "fe/idl.ll"
return IDL_LONG;
YY_BREAK
case 25:
YY_RULE_SETUP
-#line 148 "fe/idl.ll"
+#line 149 "fe/idl.ll"
return IDL_SHORT;
YY_BREAK
case 26:
YY_RULE_SETUP
-#line 149 "fe/idl.ll"
+#line 150 "fe/idl.ll"
return IDL_UNSIGNED;
YY_BREAK
case 27:
YY_RULE_SETUP
-#line 150 "fe/idl.ll"
+#line 151 "fe/idl.ll"
return IDL_CHAR;
YY_BREAK
case 28:
YY_RULE_SETUP
-#line 151 "fe/idl.ll"
+#line 152 "fe/idl.ll"
return IDL_WCHAR;
YY_BREAK
case 29:
YY_RULE_SETUP
-#line 152 "fe/idl.ll"
+#line 153 "fe/idl.ll"
return IDL_BOOLEAN;
YY_BREAK
case 30:
YY_RULE_SETUP
-#line 153 "fe/idl.ll"
+#line 154 "fe/idl.ll"
return IDL_OCTET;
YY_BREAK
case 31:
YY_RULE_SETUP
-#line 154 "fe/idl.ll"
+#line 155 "fe/idl.ll"
return IDL_VOID;
YY_BREAK
case 32:
YY_RULE_SETUP
-#line 155 "fe/idl.ll"
+#line 156 "fe/idl.ll"
return IDL_NATIVE;
YY_BREAK
case 33:
YY_RULE_SETUP
-#line 156 "fe/idl.ll"
+#line 157 "fe/idl.ll"
return IDL_LOCAL;
YY_BREAK
case 34:
YY_RULE_SETUP
-#line 157 "fe/idl.ll"
+#line 158 "fe/idl.ll"
return IDL_ABSTRACT;
YY_BREAK
case 35:
YY_RULE_SETUP
-#line 159 "fe/idl.ll"
+#line 160 "fe/idl.ll"
return IDL_CUSTOM;
YY_BREAK
case 36:
YY_RULE_SETUP
-#line 160 "fe/idl.ll"
+#line 161 "fe/idl.ll"
return IDL_FACTORY;
YY_BREAK
case 37:
YY_RULE_SETUP
-#line 161 "fe/idl.ll"
+#line 162 "fe/idl.ll"
return IDL_PRIVATE;
YY_BREAK
case 38:
YY_RULE_SETUP
-#line 162 "fe/idl.ll"
+#line 163 "fe/idl.ll"
return IDL_PUBLIC;
YY_BREAK
case 39:
YY_RULE_SETUP
-#line 163 "fe/idl.ll"
+#line 164 "fe/idl.ll"
return IDL_SUPPORTS;
YY_BREAK
case 40:
YY_RULE_SETUP
-#line 164 "fe/idl.ll"
+#line 165 "fe/idl.ll"
return IDL_TRUNCATABLE;
YY_BREAK
case 41:
YY_RULE_SETUP
-#line 165 "fe/idl.ll"
+#line 166 "fe/idl.ll"
return IDL_VALUETYPE;
YY_BREAK
case 42:
YY_RULE_SETUP
-#line 167 "fe/idl.ll"
+#line 168 "fe/idl.ll"
return IDL_COMPONENT;
YY_BREAK
case 43:
YY_RULE_SETUP
-#line 168 "fe/idl.ll"
+#line 169 "fe/idl.ll"
return IDL_CONSUMES;
YY_BREAK
case 44:
YY_RULE_SETUP
-#line 169 "fe/idl.ll"
+#line 170 "fe/idl.ll"
return IDL_EMITS;
YY_BREAK
case 45:
YY_RULE_SETUP
-#line 170 "fe/idl.ll"
+#line 171 "fe/idl.ll"
return IDL_EVENTTYPE;
YY_BREAK
case 46:
YY_RULE_SETUP
-#line 171 "fe/idl.ll"
+#line 172 "fe/idl.ll"
return IDL_FINDER;
YY_BREAK
case 47:
YY_RULE_SETUP
-#line 172 "fe/idl.ll"
+#line 173 "fe/idl.ll"
return IDL_GETRAISES;
YY_BREAK
case 48:
YY_RULE_SETUP
-#line 173 "fe/idl.ll"
+#line 174 "fe/idl.ll"
return IDL_HOME;
YY_BREAK
case 49:
YY_RULE_SETUP
-#line 174 "fe/idl.ll"
+#line 175 "fe/idl.ll"
return IDL_IMPORT;
YY_BREAK
case 50:
YY_RULE_SETUP
-#line 175 "fe/idl.ll"
+#line 176 "fe/idl.ll"
return IDL_MULTIPLE;
YY_BREAK
case 51:
YY_RULE_SETUP
-#line 176 "fe/idl.ll"
+#line 177 "fe/idl.ll"
return IDL_PRIMARYKEY;
YY_BREAK
case 52:
YY_RULE_SETUP
-#line 177 "fe/idl.ll"
+#line 178 "fe/idl.ll"
return IDL_PROVIDES;
YY_BREAK
case 53:
YY_RULE_SETUP
-#line 178 "fe/idl.ll"
+#line 179 "fe/idl.ll"
return IDL_PUBLISHES;
YY_BREAK
case 54:
YY_RULE_SETUP
-#line 179 "fe/idl.ll"
+#line 180 "fe/idl.ll"
return IDL_SETRAISES;
YY_BREAK
case 55:
YY_RULE_SETUP
-#line 180 "fe/idl.ll"
+#line 181 "fe/idl.ll"
return IDL_TYPEID;
YY_BREAK
case 56:
YY_RULE_SETUP
-#line 181 "fe/idl.ll"
+#line 182 "fe/idl.ll"
return IDL_TYPEPREFIX;
YY_BREAK
case 57:
YY_RULE_SETUP
-#line 182 "fe/idl.ll"
+#line 183 "fe/idl.ll"
return IDL_USES;
YY_BREAK
case 58:
YY_RULE_SETUP
-#line 183 "fe/idl.ll"
+#line 184 "fe/idl.ll"
return IDL_MANAGES;
YY_BREAK
case 59:
YY_RULE_SETUP
-#line 185 "fe/idl.ll"
+#line 186 "fe/idl.ll"
return IDL_TYPENAME;
YY_BREAK
case 60:
YY_RULE_SETUP
-#line 186 "fe/idl.ll"
+#line 187 "fe/idl.ll"
return IDL_PORT;
YY_BREAK
case 61:
YY_RULE_SETUP
-#line 187 "fe/idl.ll"
+#line 188 "fe/idl.ll"
return IDL_MIRRORPORT;
YY_BREAK
case 62:
YY_RULE_SETUP
-#line 188 "fe/idl.ll"
+#line 189 "fe/idl.ll"
return IDL_PORTTYPE;
YY_BREAK
case 63:
YY_RULE_SETUP
-#line 189 "fe/idl.ll"
+#line 190 "fe/idl.ll"
return IDL_CONNECTOR;
YY_BREAK
case 64:
YY_RULE_SETUP
-#line 190 "fe/idl.ll"
+#line 191 "fe/idl.ll"
return IDL_ALIAS;
YY_BREAK
case 65:
YY_RULE_SETUP
-#line 192 "fe/idl.ll"
+#line 193 "fe/idl.ll"
return IDL_TRUETOK;
YY_BREAK
case 66:
YY_RULE_SETUP
-#line 193 "fe/idl.ll"
+#line 194 "fe/idl.ll"
return IDL_FALSETOK;
YY_BREAK
case 67:
YY_RULE_SETUP
-#line 195 "fe/idl.ll"
+#line 196 "fe/idl.ll"
return IDL_INOUT;
YY_BREAK
case 68:
YY_RULE_SETUP
-#line 196 "fe/idl.ll"
+#line 197 "fe/idl.ll"
return IDL_IN;
YY_BREAK
case 69:
YY_RULE_SETUP
-#line 197 "fe/idl.ll"
+#line 198 "fe/idl.ll"
return IDL_OUT;
YY_BREAK
case 70:
YY_RULE_SETUP
-#line 198 "fe/idl.ll"
+#line 199 "fe/idl.ll"
return IDL_ONEWAY;
YY_BREAK
case 71:
YY_RULE_SETUP
-#line 200 "fe/idl.ll"
+#line 201 "fe/idl.ll"
return IDL_LEFT_SHIFT;
YY_BREAK
case 72:
YY_RULE_SETUP
-#line 201 "fe/idl.ll"
+#line 202 "fe/idl.ll"
return IDL_RIGHT_SHIFT;
YY_BREAK
case 73:
YY_RULE_SETUP
-#line 202 "fe/idl.ll"
+#line 203 "fe/idl.ll"
{
tao_yylval.strval = ACE::strnew ("::");
return IDL_SCOPE_DELIMITOR;
}
YY_BREAK
case 74:
+/* rule 74 can match eol */
+YY_RULE_SETUP
+#line 208 "fe/idl.ll"
+return IDL_ANNOTATION_DECL; // Allow annotation names that start with "annotation"
+ YY_BREAK
+case 75:
+YY_RULE_SETUP
+#line 209 "fe/idl.ll"
+return IDL_ANNOTATION_SYMBOL;
+ YY_BREAK
+case 76:
YY_RULE_SETUP
-#line 207 "fe/idl.ll"
+#line 211 "fe/idl.ll"
{
// Make sure that this identifier is not a C++ keyword. If it is,
// prepend it with a _cxx_. Lookup in the perfect hash table for C++
@@ -1969,82 +1991,82 @@ YY_RULE_SETUP
return IDENTIFIER;
}
YY_BREAK
-case 75:
+case 77:
YY_RULE_SETUP
-#line 240 "fe/idl.ll"
+#line 244 "fe/idl.ll"
{
tao_yylval.dval = idl_atof (ace_yytext);
return IDL_FLOATING_PT_LITERAL;
}
YY_BREAK
-case 76:
+case 78:
YY_RULE_SETUP
-#line 244 "fe/idl.ll"
+#line 248 "fe/idl.ll"
{
tao_yylval.dval = idl_atof (ace_yytext);
return IDL_FLOATING_PT_LITERAL;
}
YY_BREAK
-case 77:
+case 79:
YY_RULE_SETUP
-#line 249 "fe/idl.ll"
+#line 253 "fe/idl.ll"
{
tao_yylval.fixval = ACE_CDR::Fixed::from_string (ace_yytext);
return IDL_FIXED_PT_LITERAL;
}
YY_BREAK
-case 78:
+case 80:
YY_RULE_SETUP
-#line 254 "fe/idl.ll"
+#line 258 "fe/idl.ll"
{
tao_yylval.ival = idl_atoi (ace_yytext, 10);
return IDL_INTEGER_LITERAL;
}
YY_BREAK
-case 79:
+case 81:
YY_RULE_SETUP
-#line 258 "fe/idl.ll"
+#line 262 "fe/idl.ll"
{
tao_yylval.uival = idl_atoui (ace_yytext, 10);
return IDL_UINTEGER_LITERAL;
}
YY_BREAK
-case 80:
+case 82:
YY_RULE_SETUP
-#line 262 "fe/idl.ll"
+#line 266 "fe/idl.ll"
{
tao_yylval.ival = idl_atoi (ace_yytext, 16);
return IDL_INTEGER_LITERAL;
}
YY_BREAK
-case 81:
+case 83:
YY_RULE_SETUP
-#line 266 "fe/idl.ll"
+#line 270 "fe/idl.ll"
{
tao_yylval.uival = idl_atoui (ace_yytext, 16);
return IDL_UINTEGER_LITERAL;
}
YY_BREAK
-case 82:
+case 84:
YY_RULE_SETUP
-#line 270 "fe/idl.ll"
+#line 274 "fe/idl.ll"
{
tao_yylval.ival = idl_atoi (ace_yytext, 8);
return IDL_INTEGER_LITERAL;
}
YY_BREAK
-case 83:
+case 85:
YY_RULE_SETUP
-#line 274 "fe/idl.ll"
+#line 278 "fe/idl.ll"
{
tao_yylval.uival = idl_atoui (ace_yytext, 8);
return IDL_UINTEGER_LITERAL;
}
YY_BREAK
-case 84:
-/* rule 84 can match eol */
+case 86:
+/* rule 86 can match eol */
YY_RULE_SETUP
-#line 279 "fe/idl.ll"
+#line 283 "fe/idl.ll"
{
/* Skip the quotes */
char * const tmp = ace_yytext;
@@ -2066,10 +2088,10 @@ YY_RULE_SETUP
return IDL_STRING_LITERAL;
}
YY_BREAK
-case 85:
-/* rule 85 can match eol */
+case 87:
+/* rule 87 can match eol */
YY_RULE_SETUP
-#line 299 "fe/idl.ll"
+#line 303 "fe/idl.ll"
{
/* Skip the bookends */
char * const tmp = ACE_OS::strdup (ace_yytext);
@@ -2089,102 +2111,90 @@ YY_RULE_SETUP
return IDL_WSTRING_LITERAL;
}
YY_BREAK
-case 86:
+case 88:
YY_RULE_SETUP
-#line 317 "fe/idl.ll"
+#line 321 "fe/idl.ll"
{
tao_yylval.cval = ace_yytext[1];
return IDL_CHARACTER_LITERAL;
}
YY_BREAK
-case 87:
+case 89:
YY_RULE_SETUP
-#line 321 "fe/idl.ll"
+#line 325 "fe/idl.ll"
{
// octal character constant
tao_yylval.cval = idl_escape_reader (ace_yytext + 1);
return IDL_CHARACTER_LITERAL;
}
YY_BREAK
-case 88:
+case 90:
YY_RULE_SETUP
-#line 326 "fe/idl.ll"
+#line 330 "fe/idl.ll"
{
// hexadecimal character constant
tao_yylval.cval = idl_escape_reader (ace_yytext + 1);
return IDL_CHARACTER_LITERAL;
}
YY_BREAK
-case 89:
+case 91:
YY_RULE_SETUP
-#line 331 "fe/idl.ll"
+#line 335 "fe/idl.ll"
{
tao_yylval.cval = idl_escape_reader (ace_yytext + 1);
return IDL_CHARACTER_LITERAL;
}
YY_BREAK
-case 90:
+case 92:
YY_RULE_SETUP
-#line 335 "fe/idl.ll"
+#line 339 "fe/idl.ll"
{
// wide character constant
tao_yylval.wcval = ace_yytext[2];
return IDL_WCHAR_LITERAL;
}
YY_BREAK
-case 91:
+case 93:
YY_RULE_SETUP
-#line 340 "fe/idl.ll"
+#line 344 "fe/idl.ll"
{
// hexadecimal wide character constant
tao_yylval.wcval = idl_wchar_escape_reader (ace_yytext + 2);
return IDL_WCHAR_LITERAL;
}
YY_BREAK
-case 92:
-/* rule 92 can match eol */
-#line 346 "fe/idl.ll"
-case 93:
-/* rule 93 can match eol */
-YY_RULE_SETUP
-#line 346 "fe/idl.ll"
-{/* remember pragma */
- idl_global->set_lineno (idl_global->lineno () + 1);
- idl_store_pragma (ace_yytext);
- break;
- }
- YY_BREAK
case 94:
/* rule 94 can match eol */
-#line 352 "fe/idl.ll"
+#line 350 "fe/idl.ll"
case 95:
/* rule 95 can match eol */
YY_RULE_SETUP
-#line 352 "fe/idl.ll"
-{/* ignore file */
- idl_global->set_lineno(idl_global->lineno () + 1);
+#line 350 "fe/idl.ll"
+{/* remember pragma */
+ idl_global->set_lineno (idl_global->lineno () + 1);
+ idl_store_pragma (ace_yytext);
break;
}
YY_BREAK
case 96:
/* rule 96 can match eol */
-#line 357 "fe/idl.ll"
+#line 356 "fe/idl.ll"
case 97:
/* rule 97 can match eol */
YY_RULE_SETUP
-#line 357 "fe/idl.ll"
-{
- idl_parse_line_and_file (ace_yytext);
+#line 356 "fe/idl.ll"
+{/* ignore file */
+ idl_global->set_lineno(idl_global->lineno () + 1);
break;
}
YY_BREAK
case 98:
/* rule 98 can match eol */
-#line 362 "fe/idl.ll"
+#line 361 "fe/idl.ll"
case 99:
/* rule 99 can match eol */
YY_RULE_SETUP
-#line 362 "fe/idl.ll"
+#line 361 "fe/idl.ll"
{
idl_parse_line_and_file (ace_yytext);
break;
@@ -2192,11 +2202,11 @@ YY_RULE_SETUP
YY_BREAK
case 100:
/* rule 100 can match eol */
-#line 367 "fe/idl.ll"
+#line 366 "fe/idl.ll"
case 101:
/* rule 101 can match eol */
YY_RULE_SETUP
-#line 367 "fe/idl.ll"
+#line 366 "fe/idl.ll"
{
idl_parse_line_and_file (ace_yytext);
break;
@@ -2204,11 +2214,11 @@ YY_RULE_SETUP
YY_BREAK
case 102:
/* rule 102 can match eol */
-#line 372 "fe/idl.ll"
+#line 371 "fe/idl.ll"
case 103:
/* rule 103 can match eol */
YY_RULE_SETUP
-#line 372 "fe/idl.ll"
+#line 371 "fe/idl.ll"
{
idl_parse_line_and_file (ace_yytext);
break;
@@ -2216,30 +2226,42 @@ YY_RULE_SETUP
YY_BREAK
case 104:
/* rule 104 can match eol */
-#line 377 "fe/idl.ll"
+#line 376 "fe/idl.ll"
case 105:
/* rule 105 can match eol */
YY_RULE_SETUP
-#line 377 "fe/idl.ll"
+#line 376 "fe/idl.ll"
{
- /* ignore cpp ident */
- idl_global->set_lineno (idl_global->lineno () + 1);
+ idl_parse_line_and_file (ace_yytext);
break;
}
YY_BREAK
case 106:
/* rule 106 can match eol */
+#line 381 "fe/idl.ll"
+case 107:
+/* rule 107 can match eol */
+YY_RULE_SETUP
+#line 381 "fe/idl.ll"
+{
+ /* ignore cpp ident */
+ idl_global->set_lineno (idl_global->lineno () + 1);
+ break;
+ }
+ YY_BREAK
+case 108:
+/* rule 108 can match eol */
YY_RULE_SETUP
-#line 382 "fe/idl.ll"
+#line 386 "fe/idl.ll"
{
/* ignore comments */
idl_global->set_lineno(idl_global->lineno () + 1);
break;
}
YY_BREAK
-case 107:
+case 109:
YY_RULE_SETUP
-#line 387 "fe/idl.ll"
+#line 391 "fe/idl.ll"
{
for (;;)
{
@@ -2260,31 +2282,31 @@ YY_RULE_SETUP
break;
}
YY_BREAK
-case 108:
+case 110:
YY_RULE_SETUP
-#line 406 "fe/idl.ll"
+#line 410 "fe/idl.ll"
break;
YY_BREAK
-case 109:
-/* rule 109 can match eol */
+case 111:
+/* rule 111 can match eol */
YY_RULE_SETUP
-#line 407 "fe/idl.ll"
+#line 411 "fe/idl.ll"
{
idl_global->set_lineno (idl_global->lineno () + 1);
break;
}
YY_BREAK
-case 110:
+case 112:
YY_RULE_SETUP
-#line 411 "fe/idl.ll"
+#line 415 "fe/idl.ll"
return ace_yytext[0];
YY_BREAK
-case 111:
+case 113:
YY_RULE_SETUP
-#line 413 "fe/idl.ll"
+#line 417 "fe/idl.ll"
ECHO;
YY_BREAK
-#line 2289 "fe/idl.yy.cpp"
+#line 2312 "fe/idl.yy.cpp"
case YY_STATE_EOF(INITIAL):
yyterminate();
@@ -2583,7 +2605,7 @@ static int yy_get_next_buffer (void)
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 >= 593 )
+ if ( yy_current_state >= 605 )
yy_c = yy_meta[yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
@@ -2611,11 +2633,11 @@ static int yy_get_next_buffer (void)
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 >= 593 )
+ if ( yy_current_state >= 605 )
yy_c = yy_meta[yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
- yy_is_jam = (yy_current_state == 592);
+ yy_is_jam = (yy_current_state == 604);
return yy_is_jam ? 0 : yy_current_state;
}
@@ -3293,7 +3315,7 @@ void yyfree (void * ptr )
#define YYTABLES_NAME "yytables"
-#line 413 "fe/idl.ll"
+#line 417 "fe/idl.ll"
/* subroutines */
diff --git a/TAO/TAO_IDL/fe/lookup_starter.txt b/TAO/TAO_IDL/fe/lookup_starter.txt
new file mode 100644
index 00000000000..8d8d9019c0d
--- /dev/null
+++ b/TAO/TAO_IDL/fe/lookup_starter.txt
@@ -0,0 +1,3 @@
+#include "fe_private.h"
+#include "ace/OS_NS_string.h"
+
diff --git a/TAO/TAO_IDL/fe/post_flex.sed b/TAO/TAO_IDL/fe/post_flex.sed
new file mode 100644
index 00000000000..81154d3f879
--- /dev/null
+++ b/TAO/TAO_IDL/fe/post_flex.sed
@@ -0,0 +1,10 @@
+s/ NULL/ 0/g
+s/ / /g
+s/ *$//g
+s/YY_BREAK break;/YY_BREAK ACE_NOTREACHED (break;)/g
+s@#include <errno.h>@#include "ace/OS_NS_errno.h"@
+s@#include <stdio.h>@#include "ace/OS_NS_stdio.h"@
+s@#include <unistd.h>@#include "ace/os_include/os_ctype.h"@
+s@c = getc@c = ACE_OS::getc@
+s@199901L@199901L || defined (__HP_aCC)@
+/#include <[seu]/d
diff --git a/TAO/TAO_IDL/fe/post_gperf.sed b/TAO/TAO_IDL/fe/post_gperf.sed
new file mode 100644
index 00000000000..fab57954503
--- /dev/null
+++ b/TAO/TAO_IDL/fe/post_gperf.sed
@@ -0,0 +1,2 @@
+s/,}/,0}/g
+s/\*str == \*s && !ACE_OS::strncmp/len == static_cast<unsigned int> (ACE_OS::strlen (s)) \&\& *str == *s \&\& !ACE_OS::strncmp/g
diff --git a/TAO/TAO_IDL/include/ast_annotation_appl.h b/TAO/TAO_IDL/include/ast_annotation_appl.h
new file mode 100644
index 00000000000..75b6e0fa84d
--- /dev/null
+++ b/TAO/TAO_IDL/include/ast_annotation_appl.h
@@ -0,0 +1,112 @@
+/**
+ * Abstract Syntax Tree Node for an application of an annotation.
+ */
+
+#ifndef AST_ANNOTATION_APPL_HEADER
+#define AST_ANNOTATION_APPL_HEADER
+
+#include "ast_annotation_decl.h"
+#include "utl_identifier.h"
+#include "ast_expression.h"
+
+#include "ace/Containers_T.h"
+#include "ace/Vector_T.h"
+
+/**
+ * Abstract Syntax Tree Node for an application of an annotation.
+ *
+ * Params are implemented as a stack of name, value pairs which are independent
+ * from the finished annotation members. The members which are AST_Fields subclasses
+ * stored the same way as fields in AST_Struct.
+ */
+class TAO_IDL_FE_Export AST_Annotation_Appl : public virtual AST_Annotation_Decl
+{
+public:
+ /**
+ * Store Optional Annotation Parameters
+ */
+ ///{
+ struct Param {
+ Param ();
+ Identifier *id;
+ AST_Expression *expr;
+ bool used;
+ typedef ACE_Unbounded_Stack_Iterator<Param*> Iterator;
+ };
+ typedef ACE_Unbounded_Stack<Param*> Params;
+ ///}
+
+ /**
+ * Create an Annotation using it's name and parameters
+ */
+ AST_Annotation_Appl (UTL_ScopedName *name, Params *params);
+
+ virtual ~AST_Annotation_Appl ();
+
+ /// Narrowing
+ ///{
+ DEF_NARROW_FROM_DECL (AST_Annotation_Appl);
+ DEF_NARROW_FROM_SCOPE (AST_Annotation_Appl);
+ ///}
+
+ /// AST Dumping
+ virtual void dump (ACE_OSTREAM_TYPE &o);
+
+ /// Visiting
+ virtual int ast_accept (ast_visitor *visitor);
+
+ /// Cleanup
+ virtual void destroy ();
+
+ static AST_Decl::NodeType const NT;
+
+ /**
+ * Get name of the annotation as written by the user
+ */
+ const char* original_name () const;
+
+ /**
+ * Apply a Annotation Declaration to this Application. This will either fully
+ * instantiate this object or result in an error, in which case it returns false.
+ */
+ bool apply_from (AST_Annotation_Decl *decl);
+
+ /**
+ * Return pointer to the stack of parameters passed. BACKENDS SHOULDN'T USE
+ * THIS UNLESS YOU NEED EXACTLY WHAT THE USER PASSED. Backends should use the
+ * lookup and scope iterator APIs that this class inherits from AST_Scope
+ * and AST_Struct. Can be null.
+ */
+ Params *params ();
+
+ /**
+ * AST_Annotation_Decl kept in case desired by someone
+ *
+ * Will be null if accessed before apply_from() is called or if being used
+ * without a declaration.
+ */
+ AST_Annotation_Decl *annotation_decl ();
+
+ /**
+ * Return the parameter with the specified name if it's in the stack else
+ * returns 0.
+ */
+ Param *find_param (const char *name);
+
+private:
+ /// Name of the Annotation as written
+ const char *original_name_;
+
+ /// Parameters List (Can be null)
+ Params *params_;
+
+ /// The AST_Annotation_Decl (Possibly could be null)
+ AST_Annotation_Decl *annotation_decl_;
+};
+
+struct Decl_Annotations_Pair {
+ AST_Decl *decl;
+ AST_Annotation_Appls *annotations;
+};
+
+#endif
diff --git a/TAO/TAO_IDL/include/ast_annotation_decl.h b/TAO/TAO_IDL/include/ast_annotation_decl.h
new file mode 100644
index 00000000000..0ee0fd2eab7
--- /dev/null
+++ b/TAO/TAO_IDL/include/ast_annotation_decl.h
@@ -0,0 +1,60 @@
+/**
+ * Abstract Syntax Tree Node for a declaration of an annotation.
+ */
+
+#ifndef AST_ANNOTATION_DECL_HEADER
+#define AST_ANNOTATION_DECL_HEADER
+
+#include "ast_structure.h"
+
+/**
+ * Abstract Syntax Tree Node for a declaration of an annotation.
+ */
+class TAO_IDL_FE_Export AST_Annotation_Decl : public virtual AST_Structure
+{
+public:
+
+ AST_Annotation_Decl (UTL_ScopedName *name);
+
+ virtual ~AST_Annotation_Decl ();
+
+ /// Narrowing
+ ///{
+ DEF_NARROW_FROM_DECL (AST_Annotation_Decl);
+ DEF_NARROW_FROM_SCOPE (AST_Annotation_Decl);
+ ///}
+
+ /// AST Dumping
+ virtual void dump (ACE_OSTREAM_TYPE &o);
+
+ /// Cleanup
+ virtual void destroy ();
+
+ static AST_Decl::NodeType const NT;
+
+ /**
+ * Work around for AST node lookup, so that annotations do not conflict with
+ * other IDL types and variables that have the same name. This is done by
+ * prepending '@' to all annotation names.
+ */
+ ///{
+ static void escape_name (Identifier *name);
+ static void escape_name (UTL_ScopedName *name);
+ ///}
+
+ virtual bool annotatable () const;
+
+ virtual AST_Annotation_Member *fe_add_annotation_member (
+ AST_Annotation_Member *annotation_member);
+
+ virtual AST_Constant *fe_add_constant (AST_Constant *t);
+
+ virtual int ast_accept (ast_visitor *visitor);
+
+ /**
+ * Should AMI visit this node? (NO)
+ */
+ virtual bool ami_visit ();
+};
+
+#endif
diff --git a/TAO/TAO_IDL/include/ast_annotation_member.h b/TAO/TAO_IDL/include/ast_annotation_member.h
new file mode 100644
index 00000000000..5686a2f639f
--- /dev/null
+++ b/TAO/TAO_IDL/include/ast_annotation_member.h
@@ -0,0 +1,69 @@
+/**
+ * Abstract Syntax Tree Node for a Member Value of an Annotation
+ */
+
+#ifndef AST_ANNOTATION_MEMBER_HEADER
+#define AST_ANNOTATION_MEMBER_HEADER
+
+#include "ast_field.h"
+#include "ast_expression.h"
+
+class AST_Expression;
+
+/**
+ * Abstract Syntax Tree Node for a Member Value of an Annotation
+ */
+class TAO_IDL_FE_Export AST_Annotation_Member : public virtual AST_Field
+{
+public:
+ AST_Annotation_Member (
+ AST_Expression::ExprType expr_type,
+ AST_Type *type, UTL_ScopedName *name);
+
+ AST_Annotation_Member (
+ AST_Decl::NodeType nt,
+ AST_Expression::ExprType expr_type,
+ AST_Type *type, UTL_ScopedName *name);
+
+ /// Pseudo-Copy Constructor for Creating Annotation Applications
+ AST_Annotation_Member (
+ UTL_ScopedName *name,
+ AST_Annotation_Member *other);
+
+ virtual ~AST_Annotation_Member ();
+
+ static AST_Decl::NodeType const NT;
+
+ /// Cleanup
+ virtual void destroy ();
+
+ /// Narrowing
+ ///{
+ DEF_NARROW_FROM_DECL (AST_Annotation_Member);
+ DEF_NARROW_FROM_SCOPE (AST_Annotation_Member);
+ ///}
+
+ /// AST Dumping
+ virtual void dump (ACE_OSTREAM_TYPE &o);
+
+ /// Get and Set the Value
+ ///{
+ AST_Expression *value ();
+ void value (AST_Expression *value);
+ ///}
+
+ /// Get the ExprType
+ AST_Expression::ExprType expr_type ();
+
+ /// Returns true if the expression value is null or invalid
+ bool invalid_value ();
+
+private:
+ /// Keep ExprType at hand for convience
+ AST_Expression::ExprType expr_type_;
+
+ /// Value of the Member, can be null
+ AST_Expression *value_;
+};
+
+#endif
diff --git a/TAO/TAO_IDL/include/ast_array.h b/TAO/TAO_IDL/include/ast_array.h
index 8f657fe0b96..affd6681d5c 100644
--- a/TAO/TAO_IDL/include/ast_array.h
+++ b/TAO/TAO_IDL/include/ast_array.h
@@ -120,6 +120,14 @@ public:
static AST_Decl::NodeType const NT;
+ /**
+ * Get and Set Annotations on the base type
+ */
+ ///{
+ AST_Annotation_Appls *base_type_annotations ();
+ void base_type_annotations (AST_Annotation_Appls *annotations);
+ ///}
+
protected:
virtual int compute_size_type (void);
// Compute the size type if it is unknown.
@@ -140,11 +148,14 @@ private:
// If our base type is anonymous array or sequence, we're
// responsible for destroying it.
-private:
-
// Compute how many dimensions.
AST_Expression **compute_dims (UTL_ExprList *dims,
ACE_CDR::ULong ndims);
+
+ /**
+ * Annotations on the base type
+ */
+ AST_Annotation_Appls *base_type_annotations_;
};
#endif // _AST_ARRAY_AST_ARRAY_HH
diff --git a/TAO/TAO_IDL/include/ast_concrete_type.h b/TAO/TAO_IDL/include/ast_concrete_type.h
index 18018eba25d..edac0ba5211 100644
--- a/TAO/TAO_IDL/include/ast_concrete_type.h
+++ b/TAO/TAO_IDL/include/ast_concrete_type.h
@@ -84,6 +84,8 @@ public:
// Narrowing.
DEF_NARROW_FROM_DECL(AST_ConcreteType);
+
+ virtual bool annotatable () const { return true; }
};
#endif // _AST_CONCRETE_TYPE_AST_CONCRETE_TYPE_HH
diff --git a/TAO/TAO_IDL/include/ast_constant.h b/TAO/TAO_IDL/include/ast_constant.h
index 4af90810fc7..01196eb790a 100644
--- a/TAO/TAO_IDL/include/ast_constant.h
+++ b/TAO/TAO_IDL/include/ast_constant.h
@@ -126,6 +126,8 @@ public:
static AST_Decl::NodeType const NT;
+ virtual bool annotatable () const { return true; }
+
protected:
AST_Expression *pd_constant_value;
// The value.
diff --git a/TAO/TAO_IDL/include/ast_decl.h b/TAO/TAO_IDL/include/ast_decl.h
index 5517834723c..f11e4a2f610 100644
--- a/TAO/TAO_IDL/include/ast_decl.h
+++ b/TAO/TAO_IDL/include/ast_decl.h
@@ -1,4 +1,4 @@
-// This may look like C, but it's really -*- C++ -*-
+// -*- C++ -*-
/*
COPYRIGHT
@@ -66,18 +66,12 @@ trademarks or registered trademarks of Sun Microsystems, Inc.
#ifndef _AST_DECL_AST_DECL_HH
#define _AST_DECL_AST_DECL_HH
-// Rock bottom of AST class hierarchy
-//
-// This class is inherited by all classes which represent named entities
-// in IDL. It implements the line and file recording mechanism and also
-// records the type of the node. This may be useful for BEs to be able
-// to distinguish the real type of a node given only a superclass.
-
#include "utl_scoped_name.h"
#include "idl_narrow.h"
#include "ace/os_include/sys/os_types.h"
#include "ace/SString.h"
+#include "ace/Vector_T.h"
// This is for AIX w/IBM C++
class Identifier;
@@ -86,12 +80,16 @@ class UTL_Scope;
class UTL_String;
class ast_visitor;
-// This class is needed (only for g++) to get around a bug in g++ which
-// causes virtual operations to not be looked up correctly if an operation
-// is defined in more than one virtual public base class. This class makes
-// the hierarchy rooted in a single class, thereby eliminating the situation
-// that causes the bug to appear
+class AST_Annotation_Appl;
+typedef ACE_Vector<AST_Annotation_Appl*> AST_Annotation_Appls;
+/**
+ * This class is needed (only for g++) to get around a bug in g++ which
+ * causes virtual operations to not be looked up correctly if an operation
+ * is defined in more than one virtual public base class. This class makes
+ * the hierarchy rooted in a single class, thereby eliminating the situation
+ * that causes the bug to appear
+ */
class TAO_IDL_FE_Export COMMON_Base
{
protected:
@@ -116,6 +114,18 @@ protected:
bool is_abstract_;
};
+/**
+ * AST_Decl is the base class for almost all AST nodes.
+ *
+ * AST_* classes that do not inherit from AST_Decl include AST_Expression and
+ * AST_Union_Label. AST_Decls have a node type (a value from the enum
+ * AST_Decl::NodeType) and a name (a UTL_ScopedName). The node type may be
+ * useful for BEs to be able to distinguish the real type of a node given only
+ * a superclass. Additionally AST_Decl nodes record the scope of definition,
+ * the file name and line number where they were defined, whether this was
+ * defined by the compiler, whether this is the main file or an #include'd
+ * file, among other things.
+ */
class TAO_IDL_FE_Export AST_Decl : public virtual COMMON_Base
{
public:
@@ -169,12 +179,25 @@ public:
, NT_mirror_port // Denotes a mirror port
, NT_connector // Denotes a CCM connector
, NT_param_holder // Denotes a template param placeholder
+ , NT_annotation_decl // The declaration of an annotation
+ , NT_annotation_appl // Application of an annotation to an IDL element
+ , NT_annotation_member // Value Inside an Annotation
};
AST_Decl (NodeType type,
UTL_ScopedName *n,
bool anonymous = false);
+ /**
+ * A sort of copy constructor that creates a copy of the AST_Decl for a new
+ * scope.
+ * The new name must be calculated before hand.
+ * This was created for Annotation Applications and Extended Structs.
+ */
+ AST_Decl (
+ UTL_ScopedName *name,
+ AST_Decl *other);
+
virtual ~AST_Decl (void);
// Cleanup method.
@@ -308,6 +331,71 @@ public:
bool in_tmpl_mod_not_aliased (void) const;
void in_tmpl_mod_not_aliased (bool val);
+ /// Set and get annotations for this IDL element
+ ///{
+ virtual void annotation_appls (AST_Annotation_Appls *annotations);
+ AST_Annotation_Appls *annotation_appls ();
+ ///}
+
+ /**
+ * Dump Annotations AST
+ *
+ * By default print each annotation on its own line. If print_inline is true,
+ * it prints them with spaces separating them instead.
+ */
+ void dump_annotations (ACE_OSTREAM_TYPE &o, bool print_inline = false);
+
+ /**
+ * Dump Object with Annotations
+ */
+ void dump_with_annotations (ACE_OSTREAM_TYPE &o, bool inline_annotations= false);
+
+ /**
+ * Dump AST Object to Stream
+ *
+ * Uses dump_annotations() before dumping if an object has annotations and is
+ * annotatable.
+ */
+ friend ACE_OSTREAM_TYPE &
+ operator<< (ACE_OSTREAM_TYPE &o, AST_Decl &d);
+
+ /**
+ * Returns true if annotations are valid to use on this
+ */
+ virtual bool annotatable () const;
+
+ /**
+ * Return true if annotations are dumped inline when using <<
+ */
+ virtual bool dump_annotations_inline () const;
+
+ /**
+ * Return true if annotations are dumped at all when using <<
+ */
+ virtual bool auto_dump_annotations () const;
+
+ /**
+ * True if defined using idl_global->eval()
+ */
+ virtual bool builtin () const;
+
+ /**
+ * True if the node should be dumped
+ */
+ virtual bool should_be_dumped () const;
+
+ /**
+ * Get Annotation Vector Reference.
+ * If this is a typedef, it includes recursively acquired annotations from
+ * the possible chain of direct typedefs.
+ */
+ virtual AST_Annotation_Appls &annotations ();
+
+ /**
+ * Should AMI visit this node?
+ */
+ virtual bool ami_visit ();
+
protected:
// These are not private because they're used by
// be_predefined_type' constructor and can be called
@@ -322,7 +410,6 @@ protected:
int contains_wstring_;
// If we are a scope, do we contain a wstring at some level?
-protected:
void dump_i (ACE_OSTREAM_TYPE &o, const char *s) const ;
void compute_repoID (void);
@@ -337,6 +424,14 @@ protected:
const char *node_type_to_string (NodeType nt);
// Convert a NodeType to a string for dumping.
+ /// Annotations applied to this IDL element
+ AST_Annotation_Appls* annotation_appls_;
+
+ /**
+ * True if defined using idl_global->eval()
+ */
+ bool builtin_;
+
private:
// Data
@@ -391,7 +486,6 @@ private:
bool in_tmpl_mod_not_aliased_;
// false by default - if true, we can't be referenced.
-private:
void compute_full_name (UTL_ScopedName *n);
// Compute the full name of an AST node.
@@ -400,4 +494,6 @@ private:
// Non-top-level version of set_prefix_with_typeprefix.
};
+typedef ACE_Vector<AST_Decl*> AST_Decls;
+
#endif // _AST_DECL_AST_DECL_HH
diff --git a/TAO/TAO_IDL/include/ast_enum.h b/TAO/TAO_IDL/include/ast_enum.h
index fb373291f97..3ab61916e3b 100644
--- a/TAO/TAO_IDL/include/ast_enum.h
+++ b/TAO/TAO_IDL/include/ast_enum.h
@@ -110,6 +110,8 @@ public:
static AST_Decl::NodeType const NT;
+ virtual bool annotatable () const { return true; }
+
private:
friend int tao_yyparse (void);
diff --git a/TAO/TAO_IDL/include/ast_enum_val.h b/TAO/TAO_IDL/include/ast_enum_val.h
index a7d5df282d3..6339f5280cf 100644
--- a/TAO/TAO_IDL/include/ast_enum_val.h
+++ b/TAO/TAO_IDL/include/ast_enum_val.h
@@ -68,6 +68,8 @@ trademarks or registered trademarks of Sun Microsystems, Inc.
#include "ast_constant.h"
+class AST_Enum;
+
// An enumerator is a constant of type unsigned long.
class TAO_IDL_FE_Export AST_EnumVal : public virtual AST_Constant
@@ -88,6 +90,17 @@ public:
virtual int ast_accept (ast_visitor *visitor);
static AST_Decl::NodeType const NT;
+
+ virtual bool annotatable () const { return true; }
+
+ /// Parent Enum of this value
+ ///{
+ AST_Enum *enum_parent ();
+ void enum_parent (AST_Enum* node);
+ ///)
+
+private:
+ AST_Enum *enum_parent_;
};
#endif // _AST_ENUM_VAL_AST_ENUM_VAL_HH
diff --git a/TAO/TAO_IDL/include/ast_expression.h b/TAO/TAO_IDL/include/ast_expression.h
index 87798bea6f4..ec2dfc4eb22 100644
--- a/TAO/TAO_IDL/include/ast_expression.h
+++ b/TAO/TAO_IDL/include/ast_expression.h
@@ -74,6 +74,7 @@ class UTL_Scope;
class ast_visitor;
class AST_Decl;
class AST_Param_Holder;
+class AST_Enum;
// Representation of expression values.
@@ -290,6 +291,14 @@ public:
// Accessor for the member.
AST_Param_Holder *param_holder (void) const;
+ static const char *exprtype_to_string (ExprType t);
+
+ /// Pointer to enum of this value if applicable
+ ///{
+ AST_Enum *enum_parent ();
+ void enum_parent (AST_Enum *node);
+ ///}
+
protected:
// Evaluate different sets of operators.
AST_ExprValue *eval_bin_op (EvalKind ek);
@@ -335,12 +344,14 @@ private:
AST_Param_Holder *param_holder_;
// Non-zero if we were created from a reference template param.
-private:
// Fill out the lineno, filename and definition scope details.
void fill_definition_details (void);
// Internal evaluation.
virtual AST_ExprValue *eval_internal (EvalKind ek);
+
+ /// Pointer to enum of this value if applicable
+ AST_Enum *enum_parent_;
};
#endif // _AST_EXPR_VAL_AST_EXPR_VAL_HH
diff --git a/TAO/TAO_IDL/include/ast_field.h b/TAO/TAO_IDL/include/ast_field.h
index 3436d810fbe..535e6740ab8 100644
--- a/TAO/TAO_IDL/include/ast_field.h
+++ b/TAO/TAO_IDL/include/ast_field.h
@@ -99,6 +99,16 @@ public:
UTL_ScopedName *n,
Visibility vis = vis_NA);
+ /**
+ * A sort of copy constructor that creates a copy of the AST_Field for a new
+ * scope.
+ * The new name must be calculated before hand.
+ * This was created for Annotation Instances and Extended Structs.
+ */
+ AST_Field (
+ UTL_ScopedName *name,
+ AST_Field *other);
+
virtual ~AST_Field (void);
// Data Accessors.
@@ -128,6 +138,8 @@ public:
static AST_Decl::NodeType const NT;
+ virtual bool annotatable () const;
+
protected:
// Data.
diff --git a/TAO/TAO_IDL/include/ast_generator.h b/TAO/TAO_IDL/include/ast_generator.h
index 9ebea1697ae..d4fd9fbac16 100644
--- a/TAO/TAO_IDL/include/ast_generator.h
+++ b/TAO/TAO_IDL/include/ast_generator.h
@@ -94,6 +94,10 @@ class AST_Param_Holder;
class AST_Finder;
class AST_Fixed;
+#include "ast_annotation_appl.h"
+
+class AST_Annotation_Member;
+
// Defines base class for node generators.
class TAO_IDL_FE_Export AST_Generator
@@ -413,6 +417,18 @@ public:
AST_Param_Holder *create_param_holder (
UTL_ScopedName *parameter_name,
FE_Utils::T_Param_Info *info);
+
+ virtual AST_Annotation_Decl * create_annotation_decl (
+ UTL_ScopedName *name);
+
+ virtual AST_Annotation_Member * create_annotation_member (
+ AST_Expression::ExprType expr_type,
+ AST_Type *type,
+ UTL_ScopedName *name);
+
+ virtual AST_Annotation_Appl * create_annotation_appl (
+ UTL_ScopedName *name,
+ AST_Annotation_Appl::Params *params);
};
#endif // _AST_GENERATOR_AST_GENERATOR_HH
diff --git a/TAO/TAO_IDL/include/ast_module.h b/TAO/TAO_IDL/include/ast_module.h
index eefe207a66d..03998ee62f0 100644
--- a/TAO/TAO_IDL/include/ast_module.h
+++ b/TAO/TAO_IDL/include/ast_module.h
@@ -230,12 +230,18 @@ public:
virtual
AST_PortType *fe_add_porttype (AST_PortType *pt);
+ virtual
+ AST_Annotation_Decl *fe_add_annotation_decl (
+ AST_Annotation_Decl *annotation_decl);
+
// Reset the last_in_same_parent_scope_ member to ourself
// (called by AST_Root::destroy on the CORBA module containing
// the basic types, since it isn't destroyed between processing
// multiple IDL files.
void reset_last_in_same_parent_scope (void);
+ virtual bool annotatable () const { return true; }
+
private: // Data
bool pd_has_nested_valuetype_;
diff --git a/TAO/TAO_IDL/include/ast_sequence.h b/TAO/TAO_IDL/include/ast_sequence.h
index 69787e142d2..f91dc3a0087 100644
--- a/TAO/TAO_IDL/include/ast_sequence.h
+++ b/TAO/TAO_IDL/include/ast_sequence.h
@@ -118,6 +118,14 @@ public:
static AST_Decl::NodeType const NT;
+ /**
+ * Get and Set Annotations on the base type
+ */
+ ///{
+ AST_Annotation_Appls *base_type_annotations ();
+ void base_type_annotations (AST_Annotation_Appls *annotations);
+ ///}
+
private:
// Data.
AST_Expression *pd_max_size;
@@ -132,6 +140,11 @@ private:
bool owns_base_type_;
// If our base type is anonymous array or sequence, we're
// responsible for destroying it.
+
+ /**
+ * Annotations on the base type
+ */
+ AST_Annotation_Appls *base_type_annotations_;
};
#endif // _AST_SEQUENCE_AST_SEQUENCE_HH
diff --git a/TAO/TAO_IDL/include/ast_structure.h b/TAO/TAO_IDL/include/ast_structure.h
index b33e5e138ee..7ccf834cf66 100644
--- a/TAO/TAO_IDL/include/ast_structure.h
+++ b/TAO/TAO_IDL/include/ast_structure.h
@@ -155,6 +155,16 @@ public:
static AST_Decl::NodeType const NT;
+ virtual bool annotatable () const;
+
+ virtual AST_Field *fe_add_field (AST_Field *f);
+
+ /// Easy Member Access
+ ///{
+ virtual AST_Decl *operator[] (const size_t index);
+ virtual AST_Decl *operator[] (const char* name);
+ ///}
+
protected:
friend int tao_yyparse (void);
// Scope Management Protocol.
@@ -163,8 +173,6 @@ protected:
virtual AST_Structure *fe_add_structure (AST_Structure *s);
- virtual AST_Field *fe_add_field (AST_Field *f);
-
virtual AST_Enum *fe_add_enum (AST_Enum *e);
virtual AST_EnumVal *fe_add_enum_val (AST_EnumVal *v);
@@ -172,7 +180,6 @@ protected:
virtual int compute_size_type (void);
// Compute the size type if it is unknown.
-protected:
ACE_Unbounded_Queue<AST_Field *> fields_;
// Container for this struct's field nodes. Excludes nodes included
// in member_count, i.e., enum values of an enum declared inside
diff --git a/TAO/TAO_IDL/include/ast_typedef.h b/TAO/TAO_IDL/include/ast_typedef.h
index 54b8a0e309b..ea1f28cba3b 100644
--- a/TAO/TAO_IDL/include/ast_typedef.h
+++ b/TAO/TAO_IDL/include/ast_typedef.h
@@ -116,9 +116,21 @@ public:
static AST_Decl::NodeType const NT;
+ virtual bool dump_annotations_inline () const { return true; }
+
+ /**
+ * Recursively acquired annotations from typedefs.
+ */
+ virtual AST_Annotation_Appls &annotations ();
+
protected:
virtual int compute_size_type (void);
// Compute the size type if it is unknown.
+
+ /**
+ * Cache of Recursively acquired annotations from typedefs.
+ */
+ AST_Annotation_Appls *cached_annotations_;
};
#endif // _AST_TYPEDEF_AST_TYPEDEF_HH
diff --git a/TAO/TAO_IDL/include/ast_union.h b/TAO/TAO_IDL/include/ast_union.h
index 7397bbde637..75000af257f 100644
--- a/TAO/TAO_IDL/include/ast_union.h
+++ b/TAO/TAO_IDL/include/ast_union.h
@@ -138,6 +138,14 @@ public:
static AST_Decl::NodeType const NT;
+ /**
+ * Get and Set Annotations on the discriminator
+ */
+ ///{
+ AST_Annotation_Appls *disc_annotations ();
+ void disc_annotations (AST_Annotation_Appls *annotations);
+ ///}
+
protected:
virtual int compute_size_type (void);
// Compute the size type if it is unknown.
@@ -195,6 +203,11 @@ private:
int default_index_;
// Default label index (zero based indexing).
+
+ /**
+ * Annotations on the discriminator
+ */
+ AST_Annotation_Appls *disc_annotations_;
};
#endif // _AST_UNION_AST_UNION_HH
diff --git a/TAO/TAO_IDL/include/ast_union_branch.h b/TAO/TAO_IDL/include/ast_union_branch.h
index a7e04a1a6d8..955f9e0c8e3 100644
--- a/TAO/TAO_IDL/include/ast_union_branch.h
+++ b/TAO/TAO_IDL/include/ast_union_branch.h
@@ -118,6 +118,8 @@ public:
static AST_Decl::NodeType const NT;
+ virtual bool auto_dump_annotations () const { return false; }
+
private:
// list of labels.
UTL_LabelList *pd_ll;
diff --git a/TAO/TAO_IDL/include/ast_visitor.h b/TAO/TAO_IDL/include/ast_visitor.h
index a38300e805a..3a45c23a461 100644
--- a/TAO/TAO_IDL/include/ast_visitor.h
+++ b/TAO/TAO_IDL/include/ast_visitor.h
@@ -68,6 +68,7 @@ class AST_Root;
class AST_Native;
class AST_Param_Holder;
class AST_Fixed;
+class AST_Annotation_Decl;
/**
* @class ast_visitor
@@ -138,6 +139,7 @@ public:
virtual int visit_native (AST_Native *node) = 0;
virtual int visit_valuebox (AST_ValueBox *node) = 0;
virtual int visit_fixed (AST_Fixed *node);
+ virtual int visit_annotation_decl (AST_Annotation_Decl *node);
protected:
// For abstract class.
diff --git a/TAO/TAO_IDL/include/fe_declarator.h b/TAO/TAO_IDL/include/fe_declarator.h
index 4527d2693e8..d55d8c3a735 100644
--- a/TAO/TAO_IDL/include/fe_declarator.h
+++ b/TAO/TAO_IDL/include/fe_declarator.h
@@ -70,7 +70,7 @@ trademarks or registered trademarks of Sun Microsystems, Inc.
class AST_Decl;
class AST_Type;
-class FE_Declarator
+class TAO_IDL_FE_Export FE_Declarator
{
public:
// Enum to denote types of declarators.
diff --git a/TAO/TAO_IDL/include/fe_extern.h b/TAO/TAO_IDL/include/fe_extern.h
index 2dd29077402..47f95a109c5 100644
--- a/TAO/TAO_IDL/include/fe_extern.h
+++ b/TAO/TAO_IDL/include/fe_extern.h
@@ -82,6 +82,9 @@ TAO_IDL_FE_Export int
FE_yyparse (void);
TAO_IDL_FE_Export void
+FE_yydebug (bool);
+
+TAO_IDL_FE_Export void
#ifdef USE_MCPP_BUFFER_LEXING
FE_set_yyin (char *); // Set yyin
#else
@@ -99,12 +102,30 @@ FE_new_UTL_Error (void);
TAO_IDL_FE_Export UTL_Indenter *
FE_new_UTL_Indenter (void);
-// Exception thrown when exiting prematurely in the front end.
-// Also used when command line options limit the output to
-// usage, version or preprocessed files. Catch block is just
-// before front end cleanup and exit.
+/**
+ * Exception thrown when exiting prematurely in the front end.
+ * Also used when command line options limit the output to
+ * usage, version or preprocessed files. Catch block is just
+ * before front end cleanup and exit.
+ *
+ * By default it increments the error count by 1. The status can also be set
+ * mannually.
+ */
class TAO_IDL_FE_Export Bailout
{
+public:
+ bool increment_errors_;
+ int errors_;
+ Bailout()
+ : increment_errors_ (true),
+ errors_ (-1) // (Invalid)
+ {
+ }
+ Bailout(int errors)
+ : increment_errors_ (false),
+ errors_ (errors)
+ {
+ }
};
#endif // _FE_EXTERN_FE_EXTERN_HH
diff --git a/TAO/TAO_IDL/include/idl_defines.h b/TAO/TAO_IDL/include/idl_defines.h
index a4bede43aef..e7be19f038d 100644
--- a/TAO/TAO_IDL/include/idl_defines.h
+++ b/TAO/TAO_IDL/include/idl_defines.h
@@ -77,13 +77,45 @@ trademarks or registered trademarks of Sun Microsystems, Inc.
// HP-UX 64-bit warns that the result of '<<' is widened from an int to long.
// They are assumed to be of type long within the tao_idl and IFR code.
-#define IDL_CF_VERSION (long)(1 << 0)
#define IDL_CF_DUMP_AST (long)(1 << 1)
#define IDL_CF_ONLY_PREPROC (long)(1 << 2)
-#define IDL_CF_ONLY_USAGE (long)(1 << 3)
#define IDL_CF_INFORMATIVE (long)(1 << 4)
#define IDL_CF_NOWARNINGS (long)(1 << 5)
+/**
+ * IDL_CF_ONLY_USAGE is deprecated but remains for backwards compatibility.
+ * It's direct successor is print_help (), but this was being used as part of
+ * an indicator of a argument being invalid. Convention is that cli programs
+ * only say that the argument(s) are wrong, not to print out the whole
+ * help/usage message, so instead this call should be used:
+ * idl_global->parse_args_exit (1);
+ *
+ * When this is called, the argument parser should state the mistake and exit
+ * the parsing early. Afterwards tao_idl will print how to see the help and
+ * exit with an error status.
+ */
+#define IDL_CF_ONLY_USAGE (long)(1 << 3)
+
+/**
+ * This signals that tao_idl has void idl_global->parse_args_exit (int status).
+ * Use something like this to have backends use the new behavior with tao_idl
+ * newer than 2.5.1 but still remain backwards compatible with older versions
+ * of tao_idl:
+ * #ifdef TAO_IDL_HAS_PARSE_ARGS_EXIT
+ * #define PARSE_ARGS_ERROR idl_global->parse_args_exit (1);
+ * #else
+ * #define PARSE_ARGS_ERROR \
+ * idl_global->set_compile_flags ( \
+ * idl_global->compile_flags () | IDL_CF_ONLY_USAGE);
+ * #endif
+ */
+#define TAO_IDL_HAS_PARSE_ARGS_EXIT
+
+/**
+ * Defined if TAO_IDL has support for annotations
+ */
+#define TAO_IDL_HAS_ANNOTATIONS
+
#define NAMEBUFSIZE 1024
// Maximum length of static buffers used to store names.
diff --git a/TAO/TAO_IDL/include/idl_global.h b/TAO/TAO_IDL/include/idl_global.h
index 3e8cff756ff..b5838e0ff58 100644
--- a/TAO/TAO_IDL/include/idl_global.h
+++ b/TAO/TAO_IDL/include/idl_global.h
@@ -76,6 +76,7 @@ trademarks or registered trademarks of Sun Microsystems, Inc.
#include "ast_predefined_type.h"
#include "utl_stack.h"
#include "fe_utils.h"
+#include "idl_version.h"
class AST_Root;
class AST_Module;
@@ -88,9 +89,11 @@ class UTL_Error;
class UTL_String;
class UTL_Indenter;
-// idl_global.hh
-//
-// Defines a class containing all front end global data.
+/**
+ * \file Defines a class containing all front end global data.
+ *
+ * Corresponding source file is util/utl_global.cpp.
+ */
class TAO_IDL_FE_Export IDL_GlobalData
{
@@ -294,72 +297,18 @@ public:
, PS_PorttypeSqSeen // Seen '{' for porttype
, PS_PorttypeQsSeen // Seen '}' for porttype
, PS_PorttypeBodySeen // Seen complete porttype body
+ , PS_AnnotationDeclSeen
};
- // flags for types of declarations seen while parsing.
- bool abstract_iface_seen_;
- bool abstractbase_seen_;
- bool aggregate_seen_;
- bool ambiguous_type_seen_;
- bool any_arg_seen_;
- bool any_seen_;
- bool any_seq_seen_;
- bool array_seen_;
- bool array_seq_seen_;
- bool base_object_seen_;
- bool basic_type_seen_;
- bool bd_string_seen_;
- bool boolean_seq_seen_;
- bool char_seq_seen_;
- bool component_seen_;
- bool connector_seen_;
- bool double_seq_seen_;
- bool enum_seen_;
- bool exception_seen_;
- bool fixed_array_decl_seen_;
- bool fixed_size_decl_seen_;
- bool float_seq_seen_;
- bool fwd_iface_seen_;
- bool fwd_valuetype_seen_;
- bool iface_seq_seen_;
- bool interface_seen_;
- bool local_iface_seen_;
- bool long_seq_seen_;
- bool longdouble_seq_seen_;
- bool longlong_seq_seen_;
- bool non_local_fwd_iface_seen_;
- bool non_local_iface_seen_;
- bool non_local_op_seen_;
- bool object_arg_seen_;
- bool octet_seq_seen_;
- bool operation_seen_;
- bool pseudo_seq_seen_;
- bool recursive_type_seen_;
- bool seq_seen_;
- bool short_seq_seen_;
- bool special_basic_decl_seen_;
- bool string_seen_;
- bool string_member_seen_;
- bool string_seq_seen_;
- bool typecode_seen_;
- bool ub_string_seen_;
- bool ulong_seq_seen_;
- bool ulonglong_seq_seen_;
- bool union_seen_;
- bool ushort_seq_seen_;
- bool valuebase_seen_;
- bool valuefactory_seen_;
- bool valuetype_seen_;
- bool var_array_decl_seen_;
- bool var_size_decl_seen_;
- bool vt_seq_seen_;
- bool wchar_seq_seen_;
- bool wstring_seq_seen_;
- bool dds_connector_seen_;
- bool ami_connector_seen_;
-
- // flag to force generation of skeleton includes (see bug #2419).
- bool need_skeleton_includes_;
+ /**
+ * Choices for how to react to unkown annotations
+ */
+ enum Unknown_Annotations {
+ UNKNOWN_ANNOTATIONS_WARN_ONCE,
+ UNKNOWN_ANNOTATIONS_WARN_ALL,
+ UNKNOWN_ANNOTATIONS_ERROR,
+ UNKNOWN_ANNOTATIONS_IGNORE
+ };
IDL_GlobalData (void);
~IDL_GlobalData (void);
@@ -758,6 +707,187 @@ public:
void in_tmpl_mod_alias (bool val);
// Accessors for the member.
+ /**
+ * Convenience function that causes the program to exit with the given return
+ * status after returning from parsing arguments.
+ */
+ void parse_args_exit (int status);
+
+ /**
+ * Convenience function that causes the program to print version and exit
+ * with an success return code after returning from parsing arguments.
+ */
+ void print_version ();
+
+ /**
+ * Convenience function that causes the program to print help and exit
+ * with an success return code after returning from parsing arguments.
+ */
+ void print_help ();
+
+ /**
+ * Returns true if warnings are to be shown
+ */
+ bool print_warnings ();
+
+ /**
+ * Eval string as though it was included in the IDL file. Results are added
+ * to the Abstract Syntax Tree. It was added for use in be_post_init. THIS
+ * SHOULD NOT BE CALLED WHILE IN THE MIDDLE OF PARSING.
+ */
+ void eval (const char *string);
+
+ /**
+ * Dump AST after parsing files and exit
+ */
+ void dump_ast ();
+
+ /// flags for types of declarations seen while parsing.
+ ///{
+ bool abstract_iface_seen_;
+ bool abstractbase_seen_;
+ bool aggregate_seen_;
+ bool ambiguous_type_seen_;
+ bool any_arg_seen_;
+ bool any_seen_;
+ bool any_seq_seen_;
+ bool array_seen_;
+ bool array_seq_seen_;
+ bool base_object_seen_;
+ bool basic_type_seen_;
+ bool bd_string_seen_;
+ bool boolean_seq_seen_;
+ bool char_seq_seen_;
+ bool component_seen_;
+ bool connector_seen_;
+ bool double_seq_seen_;
+ bool enum_seen_;
+ bool exception_seen_;
+ bool fixed_array_decl_seen_;
+ bool fixed_size_decl_seen_;
+ bool float_seq_seen_;
+ bool fwd_iface_seen_;
+ bool fwd_valuetype_seen_;
+ bool iface_seq_seen_;
+ bool interface_seen_;
+ bool local_iface_seen_;
+ bool long_seq_seen_;
+ bool longdouble_seq_seen_;
+ bool longlong_seq_seen_;
+ bool non_local_fwd_iface_seen_;
+ bool non_local_iface_seen_;
+ bool non_local_op_seen_;
+ bool object_arg_seen_;
+ bool octet_seq_seen_;
+ bool operation_seen_;
+ bool pseudo_seq_seen_;
+ bool recursive_type_seen_;
+ bool seq_seen_;
+ bool short_seq_seen_;
+ bool special_basic_decl_seen_;
+ bool string_seen_;
+ bool string_member_seen_;
+ bool string_seq_seen_;
+ bool typecode_seen_;
+ bool ub_string_seen_;
+ bool ulong_seq_seen_;
+ bool ulonglong_seq_seen_;
+ bool union_seen_;
+ bool ushort_seq_seen_;
+ bool valuebase_seen_;
+ bool valuefactory_seen_;
+ bool valuetype_seen_;
+ bool var_array_decl_seen_;
+ bool var_size_decl_seen_;
+ bool vt_seq_seen_;
+ bool wchar_seq_seen_;
+ bool wstring_seq_seen_;
+ bool dds_connector_seen_;
+ bool ami_connector_seen_;
+ ///}
+
+ /// flag to force generation of skeleton includes (see bug #2419).
+ bool need_skeleton_includes_;
+
+ /**
+ * Version of IDL to enforce
+ */
+ IdlVersion idl_version_;
+
+ /**
+ * Default version of IDL to enforce. Compilers extending tao_idl coould set
+ * idl_version_ directly, but this allows Can be set to allow
+ * --default-idl-version to print an accuate default IDL version.
+ */
+ IdlVersion default_idl_version_;
+
+ /**
+ * Perform the compilation process right up until invoking the backend.
+ * In other words just check the syntax of the input files, do not create
+ * any output.
+ */
+ bool syntax_only_;
+
+ /**
+ * Exit when finished processing cli arguments
+ * Default is false.
+ */
+ bool parse_args_exit_;
+
+ /**
+ * If parse_args_exit_ is true, this is the program status to return from
+ * main.
+ * Default is 0.
+ */
+ int parse_args_exit_status_;
+
+ /**
+ * Print command line argument help message when finished processing
+ * cli arguments.
+ */
+ bool print_help_;
+
+ /**
+ * Print compiler version when finished processing cli arguments.
+ */
+ bool print_version_;
+
+ /**
+ * If true, we are inside the eval() function
+ */
+ bool in_eval_;
+
+ /**
+ * Dump constructs defined using eval() if true.
+ */
+ bool dump_builtins_;
+
+ /**
+ * If true, Dump only the IDL defined using eval() and exit using
+ * ignore_files_
+ */
+ bool just_dump_builtins_;
+
+ /**
+ * Exit right before parsing input files.
+ */
+ bool ignore_files_;
+
+ /**
+ * If true, silently ignore lookup errors.
+ */
+ bool ignore_lookup_errors_;
+
+ /**
+ * Reaction to unknown annotations
+ */
+ Unknown_Annotations unknown_annotations_;
+
+ /**
+ * Set of the local names of unkown annotations already seen
+ */
+ ACE_Unbounded_Set<Identifier> unknown_annotations_seen_;
+
private:
// Data
UTL_ScopeStack pd_scopes; // Store scopes stack
diff --git a/TAO/TAO_IDL/include/idl_version.h b/TAO/TAO_IDL/include/idl_version.h
new file mode 100644
index 00000000000..d76d79dff12
--- /dev/null
+++ b/TAO/TAO_IDL/include/idl_version.h
@@ -0,0 +1,114 @@
+/**
+ * Header File for Tracking IDL Versions
+ *
+ * Source File Counterpart is util/idl_version.cpp.
+ */
+
+#ifndef IDL_VERSION_HEADER
+#define IDL_VERSION_HEADER
+
+#include "TAO_IDL_FE_Export.h"
+
+/**
+ * List of Specific Idl Versions
+ *
+ * Order is used to determine how versions compare to each other.
+ *
+ * NOTE: If updated, idlVersionNames in util/idl_version.cpp must be updated
+ * as well!
+ */
+enum TAO_IDL_FE_Export SpecificIdlVersion
+{
+ /// Invalid Version Value
+ IDL_VERSION_INVALID,
+
+ /**
+ * IDL 3.x
+ * tao_idl dialect of IDL defined in OMG CORBA and IDL 3.5 specs.
+ * This is the version of IDL supported by the compiler as is without IDL
+ * version checks.
+ */
+ IDL_VERSION_3,
+
+ /**
+ * IDL 4.x
+ * tao_idl dialect of IDL as defined in OMG 2016-04-02 (http://www.omg.org/spec/IDL/4.0/)
+ * and later revisions.
+ */
+ IDL_VERSION_4,
+
+ /**
+ * SHOULD ALWAYS BE LAST, DO NOT PUT ANY VERSIONS PAST THIS!
+ *
+ * Attempting to pass this to IdlVersion will result in an invalid value.
+ */
+ IDL_VERSION_COUNT
+};
+
+/**
+ * Default version of IDL to use if BE does not specify a default version.
+ * This is so that BE can control the version without overriding idl_version_
+ * directly and making --default-idl-version incorrect.
+ */
+const SpecificIdlVersion DEFAULT_DEFAULT_IDL_VERSION = IDL_VERSION_3;
+
+/**
+ * Class Operations involving SpecificIdlVersion Values
+ */
+class TAO_IDL_FE_Export IdlVersion
+{
+public:
+ /**
+ * New IdlVersion set to DEFAULT_DEFAULT_IDL_VERSION.
+ */
+ IdlVersion ();
+
+ /**
+ * New IdlVersion set from a SpecificIdlVersion if version is valid,
+ * otherwise IDL_VERSION_INVALID.
+ */
+ IdlVersion (SpecificIdlVersion version);
+
+ /**
+ * Get version as a SpecificIdlVersion.
+ */
+ SpecificIdlVersion version () const;
+ /**
+ * Set version from a SpecificIdlVersion if version is valid, otherwise
+ * IDL_VERSION_INVALID.
+ */
+ void version (SpecificIdlVersion version);
+
+ /**
+ * Is Version Valid?
+ */
+ bool is_valid () const;
+
+ /**
+ * Get version as string.
+ */
+ const char * to_string () const;
+ /**
+ * Set version from string, sets versions as invalid if it does not match
+ * any strings in idlVersionNames.
+ */
+ void from_string (const char * version);
+
+ /**
+ * Compare a IdlVersion to a SpecificIdlVersion or another IdlVersion
+ */
+ ///{
+ operator SpecificIdlVersion () const;
+ bool operator== (SpecificIdlVersion other) const;
+ bool operator!= (SpecificIdlVersion other) const;
+ bool operator> (SpecificIdlVersion other) const;
+ bool operator>= (SpecificIdlVersion other) const;
+ bool operator< (SpecificIdlVersion other) const;
+ bool operator<= (SpecificIdlVersion other) const;
+ ///}
+
+private:
+ SpecificIdlVersion version_;
+};
+
+#endif
diff --git a/TAO/TAO_IDL/include/utl_annotations.h b/TAO/TAO_IDL/include/utl_annotations.h
new file mode 100644
index 00000000000..5b542528266
--- /dev/null
+++ b/TAO/TAO_IDL/include/utl_annotations.h
@@ -0,0 +1,26 @@
+#ifndef UTL_ANNOTATIONS_HEADER
+#define UTL_ANNOTATIONS_HEADER
+
+#include "TAO_IDL_FE_Export.h"
+
+#include "ast_annotation_appl.h"
+
+/**
+ * Given an AST_Annotation_Appls, find the last annotation that matches the
+ * given annotation declaration. Returns 0 if not found.
+ *
+ * "declaration" must be an absolutely scoped name or a pointer to the
+ * AST_Annotation_Decl.
+ */
+///{
+TAO_IDL_FE_Export AST_Annotation_Appl *UTL_find_annotation (
+ AST_Annotation_Appls &annotations, AST_Annotation_Decl *annotation);
+TAO_IDL_FE_Export AST_Annotation_Appl *UTL_find_annotation (
+ AST_Annotation_Appls *annotations, AST_Annotation_Decl *annotation);
+TAO_IDL_FE_Export AST_Annotation_Appl *UTL_find_annotation (
+ AST_Annotation_Appls &annotations, const char *annotation);
+TAO_IDL_FE_Export AST_Annotation_Appl *UTL_find_annotation (
+ AST_Annotation_Appls *annotations, const char *annotation);
+///}
+
+#endif
diff --git a/TAO/TAO_IDL/include/utl_err.h b/TAO/TAO_IDL/include/utl_err.h
index da67239bfc1..ecd81b7a330 100644
--- a/TAO/TAO_IDL/include/utl_err.h
+++ b/TAO/TAO_IDL/include/utl_err.h
@@ -76,10 +76,14 @@ class AST_Fixed;
class AST_Union;
class AST_UnionLabel;
class UTL_String;
+class AST_Annotation_Decl;
+class AST_Annotation_Member;
class TAO_IDL_FE_Export UTL_Error
{
public:
+ UTL_Error();
+
enum ErrorCode {
EIDL_SYNTAX_ERROR, // Syntax error in IDL input
// More details will be gleaned from examining
@@ -151,9 +155,16 @@ public:
EIDL_MISMATCHED_SEQ_PARAM, // 'sequence<T>' must match a previous param
EIDL_TEMPLATE_NOT_ALIASED, // ref to tmpl module scope must be via alias
EIDL_FIXED_UNSUPPORTED, // fixed data type is not supported
+ EIDL_IDL_VERSION_ERROR, // An error related to differences in IDL version
+ EIDL_UNSUPPORTED, // Unsupported feature was used in input IDL
+ EIDL_ANNOTATION_PARAM_ERROR, // Error in Annotation Parameters
+ EIDL_MISC, // Very Specific Error or Warning
EIDL_OK // No error
};
+ ErrorCode last_error;
+ ErrorCode last_warning;
+
// Operations
// Report errors with varying numbers of arguments
@@ -183,7 +194,7 @@ public:
// Report a syntax error in IDL input
void syntax_error (IDL_GlobalData::ParseState ps);
- // Report clash of declared and referenced indentifiers
+ // Report clash of declared and referenced identifiers
void redef_error (const char *n, const char *t);
// Report a name being used with different spellings
@@ -200,13 +211,16 @@ public:
// Same as above, but doesn't increment the error count.
void idl_keyword_warning (char *n);
- // Report an unsuccesful coercion attempt
+ // Report an unsuccessful coercion attempt
void coercion_error (AST_Expression *v,
AST_Expression::ExprType t);
// Report a failed name lookup attempt.
void lookup_error (UTL_ScopedName *n);
+ /// Report a failed name lookup attempt as a warning.
+ void lookup_warning (UTL_ScopedName *n);
+
// Report an illegal #pragma version.
void version_number_error (char *n);
@@ -254,7 +268,7 @@ public:
// A concrete supported interface must inherit from all concrete
// interfaces supported by the valuetype's ancestors, and all of
- // those conrete interfaces' ancestors.
+ // those concrete interfaces' ancestors.
void concrete_supported_inheritance_error (UTL_ScopedName *v,
UTL_ScopedName *i);
@@ -385,6 +399,56 @@ public:
// Reference to an item in the scope of a template
// module was not via an alias.
void template_scope_ref_not_aliased (AST_Decl *d);
+
+ /**
+ * Report IDL version error, with a given reason.
+ */
+ void idl_version_error (const char *reason);
+
+ /**
+ * Warn about an unsupported feature in the input IDL that can be ignored for
+ * the most part.
+ */
+ void unsupported_warning (const char *reason);
+
+ /**
+ * Report an unsupported feature in the input IDL that can't be ignored.
+ */
+ void unsupported_error (const char *reason);
+
+ /**
+ * Report a error for a specific situation
+ *
+ * If node is not defined the current file and line are reported.
+ */
+ void misc_error (const char *reason, AST_Decl *node = 0);
+
+ /**
+ * Report a warning for a specific situation
+ *
+ * If node is not defined the current file and line are reported.
+ */
+ void misc_warning (const char *reason, AST_Decl *node = 0);
+
+ /**
+ * Report that an invalid annotation parameter was passed
+ */
+ void invalid_annotation_param_error (
+ AST_Annotation_Appl *appl, AST_Annotation_Decl *decl,
+ Identifier *invalid_id);
+
+ /**
+ * Report that an annotation parameter has an invalid type
+ */
+ void invalid_annotation_param_type (
+ AST_Annotation_Appl *appl, AST_Annotation_Member *member,
+ AST_Expression *offending_value);
+
+ /**
+ * Report that an annotation parameter needs to be defined
+ */
+ void annotation_param_missing_error (
+ AST_Annotation_Appl *appl, AST_Annotation_Member *member);
};
#endif // _UTL_ERR_UTL_ERR_HH
diff --git a/TAO/TAO_IDL/include/utl_identifier.h b/TAO/TAO_IDL/include/utl_identifier.h
index 3afb4ef6301..e6ce80ead3f 100644
--- a/TAO/TAO_IDL/include/utl_identifier.h
+++ b/TAO/TAO_IDL/include/utl_identifier.h
@@ -78,17 +78,26 @@ public:
Identifier (const char *s);
// Constructor.
+ Identifier (const Identifier &other);
+
virtual ~Identifier (void);
// Destructor.
// Operations
+ /**
+ * Get the underlying string.
+ */
+ ///{
char *get_string (void);
- // Get the underlying string.
+ const char *get_string () const;
+ ///}
- void replace_string (const char * s);
+ void replace_string (const char *s);
// Replace the underlying string and free the old one.
+ void preprocess_and_replace_string (const char *s);
+
bool compare (Identifier *other);
// Compare with other Identifier.
@@ -110,12 +119,14 @@ public:
virtual void destroy (void);
// Cleanup function.
+ bool operator== (const Identifier &other) const;
+
private:
- // Storage for data.
- char *pv_string;
+ // Storage for data.
+ char *pv_string;
- // Did the IDL string have a leading underscore?
- bool escaped_;
+ // Did the IDL string have a leading underscore?
+ bool escaped_;
};
#endif // _UTL_IDENTIFIER_UTL_IDENTIFIER_HH
diff --git a/TAO/TAO_IDL/include/utl_idlist.h b/TAO/TAO_IDL/include/utl_idlist.h
index 9f4927d0178..ea59e45aca8 100644
--- a/TAO/TAO_IDL/include/utl_idlist.h
+++ b/TAO/TAO_IDL/include/utl_idlist.h
@@ -113,6 +113,17 @@ public:
int compare (UTL_IdList *other);
// Compares each component for equality.
+
+ /**
+ * Return a copy of the contents as a string
+ */
+ char *get_string_copy ();
+
+ /**
+ * Return true if the list begins with "::"
+ */
+ bool is_absolute ();
+
private:
Identifier *pd_car_data;
};
diff --git a/TAO/TAO_IDL/include/utl_scope.h b/TAO/TAO_IDL/include/utl_scope.h
index a21d5a0e40d..ef20c534e08 100644
--- a/TAO/TAO_IDL/include/utl_scope.h
+++ b/TAO/TAO_IDL/include/utl_scope.h
@@ -131,6 +131,8 @@ class AST_Mirror_Port;
class AST_Connector;
class UTL_StrList;
class UTL_NameList;
+class AST_Annotation_Decl;
+class AST_Annotation_Member;
// Forward declaration of active iterator for UTL_Scope.
class UTL_ScopeActiveIterator;
@@ -196,6 +198,8 @@ public:
// Look up one of the pseudo-object types.
AST_Decl *lookup_pseudo (Identifier *);
+ AST_Decl *lookup_by_name (const char *name);
+
virtual AST_Decl *look_in_prev_mods_local (Identifier *e,
bool ignore_fwd = false);
@@ -492,6 +496,14 @@ public:
virtual
AST_Mirror_Port *fe_add_mirror_port (AST_Mirror_Port *mp);
+ virtual
+ AST_Annotation_Decl *fe_add_annotation_decl (
+ AST_Annotation_Decl *annotation_decl);
+
+ virtual
+ AST_Annotation_Member *fe_add_annotation_member (
+ AST_Annotation_Member *annotation_member);
+
protected:
/// Quick check on the head of a name to see if it's global.
bool is_global_name (Identifier *i);
diff --git a/TAO/TAO_IDL/narrow/narrow.cpp b/TAO/TAO_IDL/narrow/narrow.cpp
index 763072c5ac1..180ac2888df 100644
--- a/TAO/TAO_IDL/narrow/narrow.cpp
+++ b/TAO/TAO_IDL/narrow/narrow.cpp
@@ -78,6 +78,8 @@ trademarks or registered trademarks of Sun Microsystems, Inc.
#include "ast_enum.h"
#include "ast_interface_fwd.h"
#include "utl_scope.h"
+#include "ast_annotation_decl.h"
+#include "ast_annotation_appl.h"
// Narrowing functions for AST
@@ -123,6 +125,10 @@ ScopeAsDecl (UTL_Scope *s)
return AST_Structure::narrow_from_scope (s);
case AST_Decl::NT_enum:
return AST_Enum::narrow_from_scope (s);
+ case AST_Decl::NT_annotation_decl:
+ return AST_Annotation_Decl::narrow_from_scope (s);
+ case AST_Decl::NT_annotation_appl:
+ return AST_Annotation_Appl::narrow_from_scope (s);
default:
return 0;
}
diff --git a/TAO/TAO_IDL/regen.pl b/TAO/TAO_IDL/regen.pl
new file mode 100755
index 00000000000..ed20f2bc56b
--- /dev/null
+++ b/TAO/TAO_IDL/regen.pl
@@ -0,0 +1,16 @@
+eval '(exit $?0)' && eval 'exec perl -w -S $0 ${1+"$@"}'
+ & eval 'exec perl -w -S $0 $argv:q'
+ if 0;
+
+use strict;
+use Env 'ACE_ROOT';
+
+my %args = map { $_ => 1 } @ARGV;
+my $debug = exists($args{'-d'});
+
+my $features = 'tao_idl_fe_gen=1';
+system "$ACE_ROOT/bin/mpc.pl -type gnuace -features $features tao_idl_fe.mpc";
+utime undef, undef, 'fe/keywords.dat';
+
+my $bison_target = $debug ? 'debug_bison' : 'y.tab';
+system "make -f GNUmakefile.TAO_IDL_GEN $features lex.yy $bison_target all";
diff --git a/TAO/TAO_IDL/regen.sh b/TAO/TAO_IDL/regen.sh
deleted file mode 100755
index 94b877bf8c3..00000000000
--- a/TAO/TAO_IDL/regen.sh
+++ /dev/null
@@ -1,6 +0,0 @@
-if [[ tao_idl_fe.mpc -nt GNUmakefile.TAO_IDL_GEN ]]; then
- mpc.pl -type gnuace -features tao_idl_fe_gen=1 tao_idl_fe.mpc && \
- touch fe/keywords.dat
-fi && \
-make -f GNUmakefile.TAO_IDL_GEN tao_idl_fe_gen=1 lex.yy y.tab all && \
-make
diff --git a/TAO/TAO_IDL/tao_idl.cpp b/TAO/TAO_IDL/tao_idl.cpp
index a4b6254559a..a21592d926c 100644
--- a/TAO/TAO_IDL/tao_idl.cpp
+++ b/TAO/TAO_IDL/tao_idl.cpp
@@ -279,6 +279,12 @@ DRV_drive (const char *s)
idl_global->root ()->dump (*ACE_DEFAULT_LOG_STREAM);
}
+ if (idl_global->syntax_only_)
+ {
+ // Set error count for syntax errors
+ throw Bailout (idl_global->err_count ());
+ }
+
// Call the main entry point for the BE.
if (idl_global->compile_flags () & IDL_CF_INFORMATIVE)
{
@@ -323,33 +329,34 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv[])
throw Bailout ();
}
+ // Give BE chance to set default IDL version using BE_init
+ idl_global->idl_version_ = idl_global->default_idl_version_;
+
// Parse arguments.
DRV_parse_args (atc.get_argc (), atc.get_ASCII_argv ());
- // If a version message is requested, print it and exit cleanly.
- if (idl_global->compile_flags () & IDL_CF_VERSION)
+ // Print Help Message
+ if (idl_global->print_help_)
{
- DRV_version ();
- DRV_cleanup ();
- return 0;
+ DRV_usage ();
}
- // If a usage message is requested, print it and exit cleanly.
- if (idl_global->compile_flags () & IDL_CF_ONLY_USAGE)
+ // If a version message is requested, print it
+ if (idl_global->print_version_)
{
- DRV_usage ();
- DRV_cleanup ();
- return 0;
+ DRV_version ();
}
- // If there are no input files, and we are not using the
- // directory recursion option, there's no sense going any further.
- if (0 == DRV_nfiles && 0 == idl_global->recursion_start ())
+ // If exiting because of arguments, do it now
+ if (idl_global->parse_args_exit_)
{
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("IDL: No input files\n")));
-
- throw Bailout ();
+ int status = idl_global->parse_args_exit_status_;
+ if (status)
+ {
+ ACE_ERROR ((LM_ERROR,
+ ACE_TEXT ("Use \"-h\" or \"--help\" to see valid options.\n")));
+ }
+ throw Bailout (status);
}
AST_Generator *gen = be_util::generator_init ();
@@ -375,6 +382,30 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv[])
// Does various things in various backends.
BE_post_init (DRV_files, DRV_nfiles);
+ // Dump Builtin IDL AST
+ if (idl_global->just_dump_builtins_)
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ ACE_TEXT ("Dump Builtin IDL defined by Compiler:\n")));
+ idl_global->root ()->dump (*ACE_DEFAULT_LOG_STREAM);
+ idl_global->ignore_files_ = true;
+ }
+
+ if (idl_global->ignore_files_)
+ {
+ throw Bailout (idl_global->err_count ());
+ }
+
+ // If there are no input files, and we are not using the
+ // directory recursion option, there's no sense going any further.
+ if (0 == DRV_nfiles && 0 == idl_global->recursion_start ())
+ {
+ ACE_ERROR ((LM_ERROR,
+ ACE_TEXT ("IDL: No input files\n")));
+
+ throw Bailout ();
+ }
+
FILE *output_file = 0;
if (idl_global->multi_file_input ())
@@ -406,13 +437,20 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv[])
ACE_OS::unlink (idl_global->big_file_name ());
}
}
- catch (Bailout)
+ catch (const Bailout &bailout)
{
- // Incrementing here may be redundant, but the error count
- // is the exit value, and we want to make sure it isn't 0
- // if there was in fact an error. If a non-zero value is
- // off by 1, it's not so important.
- idl_global->set_err_count (idl_global->err_count () + 1);
+ if (bailout.increment_errors_)
+ {
+ // Incrementing here may be redundant, but the error count
+ // is the exit value, and we want to make sure it isn't 0
+ // if there was in fact an error. If a non-zero value is
+ // off by 1, it's not so important.
+ idl_global->set_err_count (idl_global->err_count () + 1);
+ }
+ else
+ {
+ idl_global->set_err_count (bailout.errors_);
+ }
}
int const retval = idl_global->err_count ();
diff --git a/TAO/TAO_IDL/tao_idl_fe.mpc b/TAO/TAO_IDL/tao_idl_fe.mpc
index 8feb6d337b2..f2fc3051adb 100644
--- a/TAO/TAO_IDL/tao_idl_fe.mpc
+++ b/TAO/TAO_IDL/tao_idl_fe.mpc
@@ -4,15 +4,12 @@ project(TAO_IDL_GEN) {
custom_only = 1
verbatim(gnuace, local) {
+ BISON_FLAGS := -d --feature=caret --warnings=error=deprecated --warnings=error=empty-rule --warnings=error=conflicts-rr
all: fe/fe_lookup.cpp fe/idl.yy.cpp fe/idl.tab.cpp fe/idl.tab.hpp
+ GPERF ?= $(ACE_ROOT)/bin/ace_gperf
fe/fe_lookup.cpp: fe/keywords.dat
- " echo '#include \"fe_private.h\"' > $@"
- " echo '#include \"ace/OS_NS_string.h\"' >> $@"
- " echo '' >> $@"
- " $(ACE_ROOT)/bin/ace_gperf -M -J -c -C -D -E -T -f 0 -a -o -t -p -K keyword_ -L C++ -Z TAO_IDL_CPP_Keyword_Table -N lookup -k1,2,$$ $^ | \\"
- " sed -e 's/,}/,0}/g' \\"
- " -e 's/\\*str == \\*s && !ACE_OS::strncmp/len == static_cast<unsigned int> (ACE_OS::strlen (s)) \\&\\& *str == *s \\&\\& !ACE_OS::strncmp/g' \\"
- " >> $@"
+ " cp fe/lookup_starter.txt $@"
+ " $(GPERF) -M -J -c -C -D -E -T -f 0 -a -o -t -p -K keyword_ -L C++ -Z TAO_IDL_CPP_Keyword_Table -N lookup -k1,2,$$ $^ | sed -f fe/post_gperf.sed >> $@"
fe/idl.yy.cpp: fe/idl.ll
" @echo 'WARNING: Potentially outdated $@'"
@@ -24,17 +21,7 @@ project(TAO_IDL_GEN) {
lex.yy:
"ifeq ($(notdir $(LEX)), flex)"
" $(LEX) -t -P tao_yy -ofe/idl.yy.cpp fe/idl.ll | \\"
- " sed -e 's/ NULL/ 0/g' \\"
- " -e 's/ / /g' \\"
- " -e 's/ *$$\/\/g' \\"
- " -e 's/YY_BREAK break;/YY_BREAK ACE_NOTREACHED (break;)/g' \\"
- " -e 's@#include <errno\.h>@#include \"ace/OS_NS_errno.h\"@' \\"
- " -e 's@#include <stdio\.h>@#include \"ace/OS_NS_stdio.h\"@' \\"
- " -e 's@#include <unistd\.h>@#include \"ace/os_include/os_ctype.h\"@' \\"
- " -e 's@c = getc@c = ACE_OS::getc@' \\"
- " -e 's@199901L@199901L || defined (__HP_aCC)@' \\"
- " -e '/#include <[seu]/d' \\"
- " > fe/idl.yy.cpp"
+ " sed -f fe/post_flex.sed > fe/idl.yy.cpp"
"else"
" @echo 'ERROR: You must use flex 2.6.4 or higher to process this file'"
" @/bin/false"
@@ -46,10 +33,13 @@ project(TAO_IDL_GEN) {
" @echo ' generate it using:'"
" @echo ' make y.tab'"
+ debug_bison: BISON_FLAGS += --report all
+ debug_bison: y.tab
+
.PHONY: y.tab
y.tab: fe/idl.ypp
"ifeq ($(notdir $(YACC)), bison)"
- " $(YACC) -d -p tao_yy -b fe/idl fe/idl.ypp"
+ " $(YACC) $(BISON_FLAGS) -p tao_yy -b fe/idl fe/idl.ypp"
"else"
" @echo 'ERROR: You must use bison 3 or higher to process this file'"
" @/bin/false"
diff --git a/TAO/TAO_IDL/util/idl_version.cpp b/TAO/TAO_IDL/util/idl_version.cpp
new file mode 100644
index 00000000000..14a70dc821c
--- /dev/null
+++ b/TAO/TAO_IDL/util/idl_version.cpp
@@ -0,0 +1,96 @@
+/**
+ * Source File for Tracking IDL Versions
+ *
+ * Header File Counterpart is include/idl_version.h
+ */
+
+#include "ace/OS_NS_string.h"
+#include "idl_version.h"
+
+static const char * idlVersionNames[IDL_VERSION_COUNT] = {
+ "Invalid",
+ "3",
+ "4"
+};
+
+IdlVersion::IdlVersion () : version_(DEFAULT_DEFAULT_IDL_VERSION)
+{
+}
+
+IdlVersion::IdlVersion (SpecificIdlVersion version)
+{
+ this->version (version);
+}
+
+SpecificIdlVersion IdlVersion::version () const
+{
+ return version_;
+}
+
+void IdlVersion::version (SpecificIdlVersion version)
+{
+ version_ = version < IDL_VERSION_COUNT ? version : IDL_VERSION_INVALID;
+}
+
+bool IdlVersion::is_valid () const
+{
+ return version_ != IDL_VERSION_INVALID;
+}
+
+const char * IdlVersion::to_string () const
+{
+ return idlVersionNames[version_];
+}
+
+void IdlVersion::from_string (const char * version)
+{
+ if (!version)
+ {
+ version_ = IDL_VERSION_INVALID;
+ }
+ for (int i = 0; i < IDL_VERSION_COUNT; i++)
+ {
+ if (!ACE_OS::strcmp (version, idlVersionNames[i]))
+ {
+ version_ = static_cast<SpecificIdlVersion> (i);
+ return;
+ }
+ }
+ version_ = IDL_VERSION_INVALID;
+}
+
+IdlVersion::operator SpecificIdlVersion () const
+{
+ return version_;
+}
+
+bool IdlVersion::operator== (SpecificIdlVersion other) const
+{
+ return version_ == other;
+}
+
+bool IdlVersion::operator!= (SpecificIdlVersion other) const
+{
+ return version_ != other;
+}
+
+bool IdlVersion::operator> (SpecificIdlVersion other) const
+{
+ return version_ > other;
+}
+
+bool IdlVersion::operator>= (SpecificIdlVersion other) const
+{
+ return version_ >= other;
+}
+
+bool IdlVersion::operator< (SpecificIdlVersion other) const
+{
+ return version_ < other;
+}
+
+bool IdlVersion::operator<= (SpecificIdlVersion other) const
+{
+ return version_ <= other;
+}
+
diff --git a/TAO/TAO_IDL/util/utl_annotations.cpp b/TAO/TAO_IDL/util/utl_annotations.cpp
new file mode 100644
index 00000000000..36dfa07c704
--- /dev/null
+++ b/TAO/TAO_IDL/util/utl_annotations.cpp
@@ -0,0 +1,46 @@
+#include "utl_annotations.h"
+
+AST_Annotation_Appl *UTL_find_annotation (
+ AST_Annotation_Appls &annotations, AST_Annotation_Decl *annotation)
+{
+ AST_Annotation_Appl *result = 0;
+ if (annotation)
+ {
+ for (AST_Annotation_Appls::iterator i = annotations.begin ();
+ i != annotations.end (); ++i)
+ {
+ AST_Annotation_Appl *appl = *i;
+ if (appl && appl->annotation_decl () == annotation)
+ {
+ result = appl;
+ }
+ }
+ }
+ return result;
+}
+
+AST_Annotation_Appl *UTL_find_annotation (
+ AST_Annotation_Appls *annotations, AST_Annotation_Decl *annotation)
+{
+ return annotations ? UTL_find_annotation (*annotations, annotation) : 0;
+}
+
+AST_Annotation_Appl *UTL_find_annotation (
+ AST_Annotation_Appls &annotations, const char *annotation)
+{
+ AST_Annotation_Appl *result = 0;
+ if (annotation)
+ {
+ return UTL_find_annotation (
+ annotations,
+ AST_Annotation_Decl::narrow_from_decl (
+ idl_global->scopes ().bottom ()->lookup_by_name (annotation)));
+ }
+ return result;
+}
+
+AST_Annotation_Appl *UTL_find_annotation (
+ AST_Annotation_Appls *annotations, const char *annotation)
+{
+ return annotations ? UTL_find_annotation (*annotations, annotation) : 0;
+}
diff --git a/TAO/TAO_IDL/util/utl_err.cpp b/TAO/TAO_IDL/util/utl_err.cpp
index 1aab6296823..188232d0d67 100644
--- a/TAO/TAO_IDL/util/utl_err.cpp
+++ b/TAO/TAO_IDL/util/utl_err.cpp
@@ -78,6 +78,9 @@ trademarks or registered trademarks of Sun Microsystems, Inc.
#include "ast_fixed.h"
#include "ast_union.h"
#include "ast_union_label.h"
+#include "ast_annotation_decl.h"
+#include "ast_annotation_member.h"
+#include "ast_annotation_appl.h"
// FUZZ: disable check_for_streams_include
#include "ace/streams.h"
@@ -235,75 +238,83 @@ error_string (UTL_Error::ErrorCode c)
return "ref to template module scope must be via alias";
case UTL_Error::EIDL_FIXED_UNSUPPORTED:
return "fixed data types are not supported";
+ case UTL_Error::EIDL_IDL_VERSION_ERROR:
+ return "Invalid use of this version of IDL";
+ case UTL_Error::EIDL_ANNOTATION_PARAM_ERROR:
+ return "Error in annotation parameter(s): ";
+ case UTL_Error::EIDL_UNSUPPORTED:
+ case UTL_Error::EIDL_MISC:
+ return ""; // Supply Case by Case Message
+
+ default:
+ return "<This error code is missing a string in error_string "
+ "in utl_err.cpp!>";
}
+}
- return 0;
+/**
+ * Get filename from node or from idl_global if node is null.
+ */
+static const char *
+get_filename (AST_Decl *node = 0)
+{
+ return node ? node->file_name ().c_str ()
+ : idl_global->filename ()->get_string ();
+}
+
+/**
+ * Get line number from node or from idl_global if node is null.
+ */
+static long
+get_lineno (AST_Decl *node = 0)
+{
+ return node ? node->line () : idl_global->lineno ();
}
-// Print out an error message header on cerr
+/**
+ * Common Error Message Header
+ */
+///{
static void
-idl_error_header (UTL_Error::ErrorCode c,
- long lineno,
- ACE_CString s)
+idl_error_header (UTL_Error::ErrorCode c, long lineno, ACE_CString s)
{
+ idl_global->err ()->last_error = c;
ACE_ERROR ((LM_ERROR,
"Error - %C: \"%C\", line %d: %C",
idl_global->prog_name (),
s.c_str (),
lineno == -1 ? idl_global->lineno () : lineno,
error_string (c)));
+ idl_global->set_err_count (idl_global->err_count () + 1);
}
+static void
+idl_error_header (UTL_Error::ErrorCode c, AST_Decl *node = 0)
+{
+ idl_error_header (c, get_lineno (node), get_filename (node));
+}
+///}
-// Convert the type of an AST_Expression to a char *.
-static const char *
-exprtype_to_string (AST_Expression::ExprType t)
-{
- switch (t) {
- case AST_Expression::EV_short:
- return "short";
- case AST_Expression::EV_ushort:
- return "unsigned short";
- case AST_Expression::EV_long:
- return "long";
- case AST_Expression::EV_ulong:
- return "unsigned long";
- case AST_Expression::EV_float:
- return "float";
- case AST_Expression::EV_double:
- return "double";
- case AST_Expression::EV_char:
- return "char";
- case AST_Expression::EV_octet:
- return "octet";
- case AST_Expression::EV_bool:
- return "boolean";
- case AST_Expression::EV_string:
- return "string";
- case AST_Expression::EV_enum:
- return "enum";
- case AST_Expression::EV_void:
- return "void";
- case AST_Expression::EV_none:
- return "none";
- case AST_Expression::EV_wchar:
- return "wchar";
- case AST_Expression::EV_longlong:
- return "longlong";
- case AST_Expression::EV_ulonglong:
- return "ulonglong";
- case AST_Expression::EV_longdouble:
- return "longdouble";
- case AST_Expression::EV_wstring:
- return "wstring";
- case AST_Expression::EV_any:
- return "any";
- case AST_Expression::EV_object:
- return "object";
- case AST_Expression::EV_fixed:
- return "fixed";
- }
- return 0;
+/**
+ * Common Warning Message Header
+ */
+///{
+static void
+idl_warning_header (UTL_Error::ErrorCode c, long lineno, ACE_CString s)
+{
+ idl_global->err ()->last_warning = c;
+ ACE_ERROR ((LM_WARNING,
+ "Warning - %C: \"%C\", line %d: %C",
+ idl_global->prog_name (),
+ s.c_str (),
+ lineno == -1 ? idl_global->lineno () : lineno,
+ error_string (c)));
+}
+static void
+idl_warning_header (UTL_Error::ErrorCode c, AST_Decl *node = 0)
+{
+ idl_warning_header (c, get_lineno (node), get_filename (node));
}
+///}
// Convert a parse state into a possible error message
static const char *
@@ -314,7 +325,7 @@ parse_state_to_error_message (IDL_GlobalData::ParseState ps)
case IDL_GlobalData::PS_NoState:
return "Statement cannot be parsed";
case IDL_GlobalData::PS_TypeDeclSeen:
- return "Malformed typedef declaration";
+ return "Malformed type declaration";
case IDL_GlobalData::PS_TypeIdDeclSeen:
return "Malformed type id declaration";
case IDL_GlobalData::PS_TypePrefixDeclSeen:
@@ -699,6 +710,12 @@ parse_state_to_error_message (IDL_GlobalData::ParseState ps)
}
}
+UTL_Error::UTL_Error ()
+ : last_error (EIDL_OK),
+ last_warning (EIDL_OK)
+{
+}
+
// Public methods.
// Report error messages with various numbers of arguments.
@@ -722,26 +739,20 @@ UTL_Error::syntax_error (IDL_GlobalData::ParseState ps)
void
UTL_Error::error0 (UTL_Error::ErrorCode c)
{
- idl_error_header (c,
- idl_global->lineno (),
- idl_global->filename ()->get_string ());
+ idl_error_header (c);
ACE_ERROR ((LM_ERROR,
"\n"));
- idl_global->set_err_count (idl_global->err_count () + 1);
}
void
UTL_Error::error1 (UTL_Error::ErrorCode c,
AST_Decl *d)
{
- idl_error_header (c,
- idl_global->lineno (),
- idl_global->filename ()->get_string ());
+ idl_error_header (c);
ACE_ERROR ((LM_ERROR, " - "));
d->name ()->dump (*ACE_DEFAULT_LOG_STREAM);;
ACE_ERROR ((LM_ERROR,
"\n"));
- idl_global->set_err_count (idl_global->err_count () + 1);
}
void
@@ -749,16 +760,13 @@ UTL_Error::error2 (UTL_Error::ErrorCode c,
AST_Decl *d1,
AST_Decl *d2)
{
- idl_error_header (c,
- idl_global->lineno (),
- idl_global->filename ()->get_string ());
+ idl_error_header (c);
d1->name ()->dump (*ACE_DEFAULT_LOG_STREAM);;
ACE_ERROR ((LM_ERROR,
", "));
d2->name ()->dump (*ACE_DEFAULT_LOG_STREAM);;
ACE_ERROR ((LM_ERROR,
"\n"));
- idl_global->set_err_count (idl_global->err_count () + 1);
}
void
@@ -767,9 +775,7 @@ UTL_Error::error3 (UTL_Error::ErrorCode c,
AST_Decl *d2,
AST_Decl *d3)
{
- idl_error_header (c,
- idl_global->lineno (),
- idl_global->filename ()->get_string ());
+ idl_error_header (c);
d1->name ()->dump (*ACE_DEFAULT_LOG_STREAM);;
ACE_ERROR ((LM_ERROR,
", "));
@@ -779,7 +785,6 @@ UTL_Error::error3 (UTL_Error::ErrorCode c,
d3->name ()->dump (*ACE_DEFAULT_LOG_STREAM);;
ACE_ERROR ((LM_ERROR,
"\n"));
- idl_global->set_err_count (idl_global->err_count () + 1);
}
void
@@ -787,10 +792,8 @@ UTL_Error::warning0 (UTL_Error::ErrorCode c)
{
if (! (idl_global->compile_flags () & IDL_CF_NOWARNINGS))
{
- idl_error_header (c,
- idl_global->lineno (),
- idl_global->filename ()->get_string ());
- ACE_ERROR ((LM_ERROR,
+ idl_warning_header (c);
+ ACE_ERROR ((LM_WARNING,
"\n"));
}
}
@@ -801,11 +804,9 @@ UTL_Error::warning1 (UTL_Error::ErrorCode c,
{
if (! (idl_global->compile_flags () & IDL_CF_NOWARNINGS))
{
- idl_error_header (c,
- idl_global->lineno (),
- idl_global->filename ()->get_string ());
+ idl_warning_header (c);
d->name ()->dump (*ACE_DEFAULT_LOG_STREAM);
- ACE_ERROR ((LM_ERROR,
+ ACE_ERROR ((LM_WARNING,
"\n"));
}
}
@@ -817,14 +818,12 @@ UTL_Error::warning2 (UTL_Error::ErrorCode c,
{
if (! (idl_global->compile_flags () & IDL_CF_NOWARNINGS))
{
- idl_error_header (c,
- idl_global->lineno (),
- idl_global->filename ()->get_string ());
+ idl_warning_header (c);
d1->name ()->dump (*ACE_DEFAULT_LOG_STREAM);
- ACE_ERROR ((LM_ERROR,
+ ACE_ERROR ((LM_WARNING,
", "));
d2->name ()->dump (*ACE_DEFAULT_LOG_STREAM);
- ACE_ERROR ((LM_ERROR,
+ ACE_ERROR ((LM_WARNING,
"\n"));
}
}
@@ -837,17 +836,15 @@ UTL_Error::warning3 (UTL_Error::ErrorCode c,
{
if (! (idl_global->compile_flags () & IDL_CF_NOWARNINGS))
{
- idl_error_header (c,
- idl_global->lineno (),
- idl_global->filename ()->get_string ());
+ idl_warning_header (c);
d1->name ()->dump (*ACE_DEFAULT_LOG_STREAM);
- ACE_ERROR ((LM_ERROR,
+ ACE_ERROR ((LM_WARNING,
", "));
d2->name ()->dump (*ACE_DEFAULT_LOG_STREAM);
- ACE_ERROR ((LM_ERROR,
+ ACE_ERROR ((LM_WARNING,
", "));
d3->name ()->dump (*ACE_DEFAULT_LOG_STREAM);
- ACE_ERROR ((LM_ERROR,
+ ACE_ERROR ((LM_WARNING,
"\n"));
}
}
@@ -863,58 +860,57 @@ UTL_Error::coercion_error (AST_Expression *v,
v->dump (*ACE_DEFAULT_LOG_STREAM);
ACE_ERROR ((LM_ERROR,
" to %C\n",
- exprtype_to_string (t)));
- idl_global->set_err_count (idl_global->err_count () + 1);
+ AST_Expression::exprtype_to_string (t)));
}
// Report a failed name lookup attempt.
void
UTL_Error::lookup_error (UTL_ScopedName *n)
{
- idl_error_header (EIDL_LOOKUP_ERROR,
- idl_global->lineno (),
- idl_global->filename ()->get_string ());
+ if (idl_global->ignore_lookup_errors_) return;
+ idl_error_header (EIDL_LOOKUP_ERROR);
n->dump (*ACE_DEFAULT_LOG_STREAM);;
ACE_ERROR ((LM_ERROR,
"\n"));
- idl_global->set_err_count (idl_global->err_count () + 1);
+}
+
+void
+UTL_Error::lookup_warning (UTL_ScopedName *n)
+{
+ if (idl_global->print_warnings ())
+ {
+ idl_warning_header (EIDL_LOOKUP_ERROR);
+ n->dump (*ACE_DEFAULT_LOG_STREAM);;
+ ACE_ERROR ((LM_ERROR, "\n"));
+ }
}
// Report an illegal version number assignment.
void
UTL_Error::version_number_error (char *n)
{
- idl_error_header (EIDL_ILLEGAL_VERSION,
- idl_global->lineno (),
- idl_global->filename ()->get_string ());
+ idl_error_header (EIDL_ILLEGAL_VERSION);
ACE_ERROR ((LM_ERROR,
"%C\n",
n));
- idl_global->set_err_count (idl_global->err_count () + 1);
}
void
UTL_Error::version_syntax_error (const char *msg)
{
- idl_error_header (EIDL_ILLEGAL_VERSION,
- idl_global->lineno (),
- idl_global->filename ()->get_string ());
+ idl_error_header (EIDL_ILLEGAL_VERSION);
ACE_ERROR ((LM_ERROR,
"%C\n",
msg));
- idl_global->set_err_count (idl_global->err_count () + 1);
}
// Report an attempt to set the version a second time.
void
UTL_Error::version_reset_error (void)
{
- idl_error_header (EIDL_VERSION_RESET,
- idl_global->lineno (),
- idl_global->filename ()->get_string ());
+ idl_error_header (EIDL_VERSION_RESET);
ACE_ERROR ((LM_ERROR,
"\n"));
- idl_global->set_err_count (idl_global->err_count () + 1);
}
// Report a reset of the id a second time to a different string.
@@ -922,14 +918,11 @@ void
UTL_Error::id_reset_error (const char *o,
const char *n)
{
- idl_error_header (EIDL_ID_RESET,
- idl_global->lineno (),
- idl_global->filename ()->get_string ());
+ idl_error_header (EIDL_ID_RESET);
ACE_ERROR ((LM_ERROR,
"%s, %s\n",
o,
n));
- idl_global->set_err_count (idl_global->err_count () + 1);
}
// Report an attempt to inherit from an interface which was only
@@ -938,12 +931,7 @@ void
UTL_Error::inheritance_fwd_error (UTL_ScopedName *n,
AST_Interface *f)
{
- if (f)
- {
- idl_error_header (EIDL_INHERIT_FWD_ERROR,
- f->line (),
- f->file_name ());
- }
+ idl_error_header (EIDL_INHERIT_FWD_ERROR, f);
ACE_ERROR ((LM_ERROR,
"interface "));
@@ -957,7 +945,6 @@ UTL_Error::inheritance_fwd_error (UTL_ScopedName *n,
ACE_ERROR ((LM_ERROR,
"\n"));
- idl_global->set_err_count (idl_global->err_count () + 1);
}
// Report an attempt to inherit from something other than an interface.
@@ -965,16 +952,13 @@ void
UTL_Error::inheritance_error (UTL_ScopedName *n,
AST_Decl *d)
{
- idl_error_header (EIDL_CANT_INHERIT,
- idl_global->lineno (),
- idl_global->filename ()->get_string ());
+ idl_error_header (EIDL_CANT_INHERIT);
n->dump (*ACE_DEFAULT_LOG_STREAM);;
ACE_ERROR ((LM_ERROR,
" attempts to inherit from "));
d->name ()->dump (*ACE_DEFAULT_LOG_STREAM);
ACE_ERROR ((LM_ERROR,
"\n"));
- idl_global->set_err_count (idl_global->err_count () + 1);
}
// Report an attempt to support an interface which was only
@@ -983,9 +967,7 @@ void
UTL_Error::supports_fwd_error (UTL_ScopedName *n,
AST_Interface *f)
{
- idl_error_header (EIDL_SUPPORTS_FWD_ERROR,
- f->line (),
- f->file_name ());
+ idl_error_header (EIDL_SUPPORTS_FWD_ERROR, f);
ACE_ERROR ((LM_ERROR,
"interface "));
n->dump (*ACE_DEFAULT_LOG_STREAM);
@@ -994,7 +976,6 @@ UTL_Error::supports_fwd_error (UTL_ScopedName *n,
f->local_name ()->dump (*ACE_DEFAULT_LOG_STREAM);
ACE_ERROR ((LM_ERROR,
"\n"));
- idl_global->set_err_count (idl_global->err_count () + 1);
}
// Report an attempt to support something other than an interface.
@@ -1002,16 +983,13 @@ void
UTL_Error::supports_error (UTL_ScopedName *n,
AST_Decl *d)
{
- idl_error_header (EIDL_CANT_SUPPORT,
- idl_global->lineno (),
- idl_global->filename ()->get_string ());
+ idl_error_header (EIDL_CANT_SUPPORT);
n->dump (*ACE_DEFAULT_LOG_STREAM);
ACE_ERROR ((LM_ERROR,
" attempts to support "));
d->name ()->dump (*ACE_DEFAULT_LOG_STREAM);;
ACE_ERROR ((LM_ERROR,
"\n"));
- idl_global->set_err_count (idl_global->err_count () + 1);
}
// Report illegal inheritance from non-abstract valuetype or interface.
@@ -1019,9 +997,7 @@ void
UTL_Error::abstract_inheritance_error (UTL_ScopedName *v,
UTL_ScopedName *i)
{
- idl_error_header (EIDL_CANT_INHERIT,
- idl_global->lineno (),
- idl_global->filename ()->get_string ());
+ idl_error_header (EIDL_CANT_INHERIT);
ACE_ERROR ((LM_ERROR,
" abstract valuetype "));
v->dump (*ACE_DEFAULT_LOG_STREAM);
@@ -1030,7 +1006,6 @@ UTL_Error::abstract_inheritance_error (UTL_ScopedName *v,
i->dump (*ACE_DEFAULT_LOG_STREAM);
ACE_ERROR ((LM_ERROR,
"\n"));
- idl_global->set_err_count (idl_global->err_count () + 1);
}
// Report illegal support of non-abstract interface.
@@ -1038,9 +1013,7 @@ void
UTL_Error::abstract_support_error (UTL_ScopedName *v,
UTL_ScopedName *i)
{
- idl_error_header (EIDL_CANT_SUPPORT,
- idl_global->lineno (),
- idl_global->filename ()->get_string ());
+ idl_error_header (EIDL_CANT_SUPPORT);
ACE_ERROR ((LM_ERROR,
" valuetype "));
v->dump (*ACE_DEFAULT_LOG_STREAM);
@@ -1049,7 +1022,6 @@ UTL_Error::abstract_support_error (UTL_ScopedName *v,
i->dump (*ACE_DEFAULT_LOG_STREAM);
ACE_ERROR ((LM_ERROR,
"\n"));
- idl_global->set_err_count (idl_global->err_count () + 1);
}
// Report illegal component or home support of local interface.
@@ -1057,9 +1029,7 @@ void
UTL_Error::unconstrained_interface_expected (UTL_ScopedName *c,
UTL_ScopedName *i)
{
- idl_error_header (EIDL_CANT_SUPPORT,
- idl_global->lineno (),
- idl_global->filename ()->get_string ());
+ idl_error_header (EIDL_CANT_SUPPORT);
ACE_ERROR ((LM_ERROR,
" component or home "));
c->dump (*ACE_DEFAULT_LOG_STREAM);
@@ -1068,16 +1038,13 @@ UTL_Error::unconstrained_interface_expected (UTL_ScopedName *c,
i->dump (*ACE_DEFAULT_LOG_STREAM);
ACE_ERROR ((LM_ERROR,
"\n"));
- idl_global->set_err_count (idl_global->err_count () + 1);
}
void
UTL_Error::concrete_supported_inheritance_error (UTL_ScopedName *v,
UTL_ScopedName *i)
{
- idl_error_header (EIDL_CANT_SUPPORT,
- idl_global->lineno (),
- idl_global->filename ()->get_string ());
+ idl_error_header (EIDL_CANT_SUPPORT);
ACE_ERROR ((LM_ERROR,
" valuetype "));
v->dump (*ACE_DEFAULT_LOG_STREAM);
@@ -1088,7 +1055,6 @@ UTL_Error::concrete_supported_inheritance_error (UTL_ScopedName *v,
i->dump (*ACE_DEFAULT_LOG_STREAM);
ACE_ERROR ((LM_ERROR,
"\n"));
- idl_global->set_err_count (idl_global->err_count () + 1);
}
// Report an error while evaluating an expression.
@@ -1101,29 +1067,23 @@ UTL_Error::eval_error (AST_Expression *v)
v->dump (*ACE_DEFAULT_LOG_STREAM);
ACE_ERROR ((LM_ERROR,
"\n"));
- idl_global->set_err_count (idl_global->err_count () + 1);
}
// Report an error while evaluating an expression.
void
UTL_Error::incompatible_type_error (AST_Expression *v)
{
- idl_error_header (EIDL_INCOMPATIBLE_TYPE,
- idl_global->lineno (),
- idl_global->filename ()->get_string ());
+ idl_error_header (EIDL_INCOMPATIBLE_TYPE);
v->dump (*ACE_DEFAULT_LOG_STREAM);
ACE_ERROR ((LM_ERROR,
"\n"));
- idl_global->set_err_count (idl_global->err_count () + 1);
}
void
UTL_Error::incompatible_disc_error (AST_Decl *d,
AST_Expression *e)
{
- idl_error_header (EIDL_LABEL_TYPE,
- idl_global->lineno (),
- idl_global->filename ()->get_string ());
+ idl_error_header (EIDL_LABEL_TYPE);
d->name ()->dump (*ACE_DEFAULT_LOG_STREAM);
ACE_ERROR ((LM_ERROR, " does not contain "));
UTL_ScopedName *sn = e->n ();
@@ -1131,7 +1091,6 @@ UTL_Error::incompatible_disc_error (AST_Decl *d,
? sn->dump (*ACE_DEFAULT_LOG_STREAM)
: e->dump (*ACE_DEFAULT_LOG_STREAM));
ACE_ERROR ((LM_ERROR, "\n"));
- idl_global->set_err_count (idl_global->err_count () + 1);
}
// Report a situation where a constant was expected but we
@@ -1141,16 +1100,13 @@ void
UTL_Error::constant_expected (UTL_ScopedName *n,
AST_Decl *d)
{
- idl_error_header (EIDL_CONSTANT_EXPECTED,
- d->line (),
- d->file_name ());
+ idl_error_header (EIDL_CONSTANT_EXPECTED, d);
n->dump (*ACE_DEFAULT_LOG_STREAM);
ACE_ERROR ((LM_ERROR,
" bound to "));
d->dump (*ACE_DEFAULT_LOG_STREAM);
ACE_ERROR ((LM_ERROR,
"\n"));
- idl_global->set_err_count (idl_global->err_count () + 1);
}
// Report a situation where an interface was expected but we got
@@ -1159,25 +1115,19 @@ UTL_Error::constant_expected (UTL_ScopedName *n,
void
UTL_Error::interface_expected (AST_Decl *d)
{
- idl_error_header (EIDL_INTERFACE_EXPECTED,
- idl_global->lineno (),
- idl_global->filename ()->get_string ());
+ idl_error_header (EIDL_INTERFACE_EXPECTED);
d->name ()->dump (*ACE_DEFAULT_LOG_STREAM);
ACE_ERROR ((LM_ERROR,
"\n"));
- idl_global->set_err_count (idl_global->err_count () + 1);
}
void
UTL_Error::template_module_expected (AST_Decl *d)
{
- idl_error_header (EIDL_TMPL_MODULE_EXPECTED,
- idl_global->lineno (),
- idl_global->filename ()->get_string ());
+ idl_error_header (EIDL_TMPL_MODULE_EXPECTED);
d->name ()->dump (*ACE_DEFAULT_LOG_STREAM);
ACE_ERROR ((LM_ERROR,
"\n"));
- idl_global->set_err_count (idl_global->err_count () + 1);
}
// Report a situation where an value type was expected but we got
@@ -1186,13 +1136,10 @@ UTL_Error::template_module_expected (AST_Decl *d)
void
UTL_Error::valuetype_expected (AST_Decl *d)
{
- idl_error_header (EIDL_VALUETYPE_EXPECTED,
- idl_global->lineno (),
- idl_global->filename ()->get_string ());
+ idl_error_header (EIDL_VALUETYPE_EXPECTED);
d->name ()->dump (*ACE_DEFAULT_LOG_STREAM);
ACE_ERROR ((LM_ERROR,
"\n"));
- idl_global->set_err_count (idl_global->err_count () + 1);
}
// Report a situation where a concrete value type was expected but we got
@@ -1201,13 +1148,10 @@ UTL_Error::valuetype_expected (AST_Decl *d)
void
UTL_Error::concrete_valuetype_expected (AST_Decl *d)
{
- idl_error_header (EIDL_CONCRETE_VT_EXPECTED,
- idl_global->lineno (),
- idl_global->filename ()->get_string ());
+ idl_error_header (EIDL_CONCRETE_VT_EXPECTED);
d->name ()->dump (*ACE_DEFAULT_LOG_STREAM);
ACE_ERROR ((LM_ERROR,
"\n"));
- idl_global->set_err_count (idl_global->err_count () + 1);
}
// Report a situation where an abstract type was expected but we got
@@ -1217,13 +1161,10 @@ UTL_Error::concrete_valuetype_expected (AST_Decl *d)
void
UTL_Error::abstract_expected (AST_Decl *d)
{
- idl_error_header (EIDL_ABSTRACT_EXPECTED,
- idl_global->lineno (),
- idl_global->filename ()->get_string ());
+ idl_error_header (EIDL_ABSTRACT_EXPECTED);
d->name ()->dump (*ACE_DEFAULT_LOG_STREAM);
ACE_ERROR ((LM_ERROR,
"\n"));
- idl_global->set_err_count (idl_global->err_count () + 1);
}
// Report a situation where an abstract type was expected but we got
@@ -1233,13 +1174,10 @@ UTL_Error::abstract_expected (AST_Decl *d)
void
UTL_Error::eventtype_expected (AST_Decl *d)
{
- idl_error_header (EIDL_EVENTTYPE_EXPECTED,
- idl_global->lineno (),
- idl_global->filename ()->get_string ());
+ idl_error_header (EIDL_EVENTTYPE_EXPECTED);
d->name ()->dump (*ACE_DEFAULT_LOG_STREAM);
ACE_ERROR ((LM_ERROR,
"\n"));
- idl_global->set_err_count (idl_global->err_count () + 1);
}
// Report a situation where a valuetype used as a primary key for a
@@ -1248,15 +1186,12 @@ UTL_Error::eventtype_expected (AST_Decl *d)
void
UTL_Error::primary_key_error (AST_Decl *d)
{
- idl_error_header (EIDL_PRIMARY_KEY_ERROR,
- idl_global->lineno (),
- idl_global->filename ()->get_string ());
+ idl_error_header (EIDL_PRIMARY_KEY_ERROR);
ACE_ERROR ((LM_ERROR,
"primary key "));
d->name ()->dump (*ACE_DEFAULT_LOG_STREAM);
ACE_ERROR ((LM_ERROR,
"does not have Components::primaryKeyBase as an ancestor\n"));
- idl_global->set_err_count (idl_global->err_count () + 1);
}
// Report a situation where an enumerator was expected but we
@@ -1267,16 +1202,13 @@ void
UTL_Error::enum_val_expected (AST_Union *u,
AST_UnionLabel *l)
{
- idl_error_header (EIDL_ENUM_VAL_EXPECTED,
- u->line (),
- u->file_name ());
+ idl_error_header (EIDL_ENUM_VAL_EXPECTED, u);
ACE_ERROR ((LM_ERROR,
" union %C, ",
u->local_name ()->get_string ()));
l->dump (*ACE_DEFAULT_LOG_STREAM);
ACE_ERROR ((LM_ERROR,
"\n"));
- idl_global->set_err_count (idl_global->err_count () + 1);
}
// Report a situation where an enumerator was received but we
@@ -1289,9 +1221,7 @@ UTL_Error::enum_val_lookup_failure (AST_Union *u,
AST_Enum *e,
UTL_ScopedName *n)
{
- idl_error_header (EIDL_ENUM_VAL_NOT_FOUND,
- u->line (),
- u->file_name ());
+ idl_error_header (EIDL_ENUM_VAL_NOT_FOUND, u);
ACE_ERROR ((LM_ERROR,
" union %C, enum %C, enumerator ",
u->local_name ()->get_string (),
@@ -1299,47 +1229,38 @@ UTL_Error::enum_val_lookup_failure (AST_Union *u,
n->dump (*ACE_DEFAULT_LOG_STREAM);
ACE_ERROR ((LM_ERROR,
"\n"));
- idl_global->set_err_count (idl_global->err_count () + 1);
}
// Report clash between declared and referenced indentifiers.
void
UTL_Error::redef_error (const char *b, const char *n)
{
- idl_error_header (EIDL_REDEF,
- idl_global->lineno (),
- idl_global->filename ()->get_string ());
+ idl_error_header (EIDL_REDEF);
ACE_ERROR ((LM_ERROR,
"\"%s\" and \"%s\"\n",
b,
n));
- idl_global->set_err_count (idl_global->err_count () + 1);
}
// Report two or more spellings for an identifier.
void
UTL_Error::name_case_error (char *b, char *n)
{
- idl_error_header (EIDL_NAME_CASE_ERROR,
- idl_global->lineno (),
- idl_global->filename ()->get_string ());
+ idl_error_header (EIDL_NAME_CASE_ERROR);
ACE_ERROR ((LM_ERROR,
"\"%C\" and \"%C\"\n",
b,
n));
- idl_global->set_err_count (idl_global->err_count () + 1);
}
void
UTL_Error::name_case_warning (char *b,
char *n)
{
- if (! (idl_global->compile_flags () & IDL_CF_NOWARNINGS))
+ if (idl_global->print_warnings ())
{
- idl_error_header (EIDL_NAME_CASE_WARNING,
- idl_global->lineno (),
- idl_global->filename ()->get_string ());
- ACE_ERROR ((LM_ERROR,
+ idl_warning_header (EIDL_NAME_CASE_WARNING);
+ ACE_ERROR ((LM_WARNING,
"\"%C\" and \"%C\"\n",
b,
n));
@@ -1349,23 +1270,18 @@ UTL_Error::name_case_warning (char *b,
void
UTL_Error::idl_keyword_error (char *n)
{
- idl_error_header (EIDL_KEYWORD_ERROR,
- idl_global->lineno (),
- idl_global->filename ()->get_string ());
+ idl_error_header (EIDL_KEYWORD_ERROR);
ACE_ERROR ((LM_ERROR,
"\"%C\"\n",
n));
- idl_global->set_err_count (idl_global->err_count () + 1);
}
void
UTL_Error::idl_keyword_warning (char *n)
{
- if (! (idl_global->compile_flags () & IDL_CF_NOWARNINGS))
+ if (idl_global->print_warnings ())
{
- idl_error_header (EIDL_KEYWORD_WARNING,
- idl_global->lineno (),
- idl_global->filename ()->get_string ());
+ idl_warning_header (EIDL_KEYWORD_WARNING);
ACE_ERROR ((LM_ERROR,
"\"%C\"\n",
n));
@@ -1378,9 +1294,7 @@ UTL_Error::ambiguous (UTL_Scope *s,
AST_Decl *l,
AST_Decl *d)
{
- idl_error_header (EIDL_AMBIGUOUS,
- d->line (),
- d->file_name ());
+ idl_error_header (EIDL_AMBIGUOUS, d);
ACE_ERROR ((LM_ERROR,
" scope: %C, collision: ",
(ScopeAsDecl (s))->local_name ()->get_string ()));
@@ -1390,20 +1304,16 @@ UTL_Error::ambiguous (UTL_Scope *s,
l->name ()->dump (*ACE_DEFAULT_LOG_STREAM);
ACE_ERROR ((LM_ERROR,
"\n"));
- idl_global->set_err_count (idl_global->err_count () + 1);
}
// Report a forward declared struct or union which was never defined.
void
UTL_Error::fwd_decl_not_defined (AST_Type *d)
{
- idl_error_header (EIDL_DECL_NOT_DEFINED,
- d->line (),
- d->file_name ());
+ idl_error_header (EIDL_DECL_NOT_DEFINED, d);
d->name ()->dump (*ACE_DEFAULT_LOG_STREAM);
ACE_ERROR ((LM_ERROR,
"\n"));
- idl_global->set_err_count (idl_global->err_count () + 1);
}
// Report lookup in undefined forward declared but undefined interface.
@@ -1411,9 +1321,7 @@ void
UTL_Error::fwd_decl_lookup (AST_Interface *d,
UTL_ScopedName *n)
{
- idl_error_header (EIDL_FWD_DECL_LOOKUP,
- idl_global->lineno (),
- idl_global->filename ()->get_string ());
+ idl_error_header (EIDL_FWD_DECL_LOOKUP);
ACE_ERROR ((LM_ERROR,
"trying to look up "));
n->dump (*ACE_DEFAULT_LOG_STREAM);;
@@ -1422,7 +1330,6 @@ UTL_Error::fwd_decl_lookup (AST_Interface *d,
d->local_name ()->dump (*ACE_DEFAULT_LOG_STREAM);
ACE_ERROR ((LM_ERROR,
"\n"));
- idl_global->set_err_count (idl_global->err_count () + 1);
}
// Report a redefinition inside its own scope.
@@ -1430,25 +1337,20 @@ void
UTL_Error::redefinition_in_scope (AST_Decl *d,
AST_Decl *s)
{
- idl_error_header (EIDL_REDEF_SCOPE,
- d->line (),
- d->file_name ());
+ idl_error_header (EIDL_REDEF_SCOPE, d);
d->name ()->dump (*ACE_DEFAULT_LOG_STREAM);
ACE_ERROR ((LM_ERROR,
", "));
s->name ()->dump (*ACE_DEFAULT_LOG_STREAM);
ACE_ERROR ((LM_ERROR,
"\n"));
- idl_global->set_err_count (idl_global->err_count () + 1);
}
// Report not a type error.
void
UTL_Error::not_a_type (AST_Decl *d)
{
- idl_error_header (EIDL_NOT_A_TYPE,
- idl_global->lineno (),
- idl_global->filename ()->get_string ());
+ idl_error_header (EIDL_NOT_A_TYPE);
if (d == 0 || d->name () == 0)
{
ACE_ERROR ((LM_ERROR,
@@ -1461,15 +1363,13 @@ UTL_Error::not_a_type (AST_Decl *d)
ACE_ERROR ((LM_ERROR,
"\n"));
- idl_global->set_err_count (idl_global->err_count () + 1);
}
void
UTL_Error::fixed_unsupported (AST_Fixed *d)
{
- idl_error_header (EIDL_FIXED_UNSUPPORTED, d->line (), d->file_name ());
+ idl_error_header (EIDL_FIXED_UNSUPPORTED, d);
ACE_ERROR ((LM_ERROR, "\n"));
- idl_global->set_err_count (idl_global->err_count () + 1);
}
void
@@ -1481,18 +1381,14 @@ UTL_Error::back_end (long lineno,
s->get_string ());
ACE_ERROR ((LM_ERROR,
"\n"));
- idl_global->set_err_count (idl_global->err_count () + 1);
}
void
UTL_Error::illegal_infix (void)
{
- idl_error_header (EIDL_ILLEGAL_INFIX,
- idl_global->lineno (),
- idl_global->filename ()->get_string ());
+ idl_error_header (EIDL_ILLEGAL_INFIX);
ACE_ERROR ((LM_ERROR,
"\n"));
- idl_global->set_err_count (idl_global->err_count () + 1);
}
void
@@ -1500,9 +1396,7 @@ UTL_Error::local_remote_mismatch (AST_Decl *l,
UTL_Scope *s)
{
AST_Decl *r = ScopeAsDecl (s);
- idl_error_header (EIDL_LOCAL_REMOTE_MISMATCH,
- r->line (),
- r->file_name ());
+ idl_error_header (EIDL_LOCAL_REMOTE_MISMATCH, r);
ACE_ERROR ((LM_ERROR,
"local type "));
l->name ()->dump (*ACE_DEFAULT_LOG_STREAM);
@@ -1511,62 +1405,46 @@ UTL_Error::local_remote_mismatch (AST_Decl *l,
r->name ()->dump (*ACE_DEFAULT_LOG_STREAM);
ACE_ERROR ((LM_ERROR,
"\n"));
- idl_global->set_err_count (idl_global->err_count () + 1);
}
void
UTL_Error::ignore_idl3_error (AST_Decl *d)
{
- idl_error_header (EIDL_IGNORE_IDL3_ERROR,
- d->line (),
- d->file_name ());
+ idl_error_header (EIDL_IGNORE_IDL3_ERROR, d);
d->name ()->dump (*ACE_DEFAULT_LOG_STREAM);
ACE_ERROR ((LM_ERROR,
"\n"));
- idl_global->set_err_count (idl_global->err_count () + 1);
}
void
UTL_Error::illegal_primary_key (AST_Decl *d)
{
- idl_error_header (EIDL_ILLEGAL_PRIMARY_KEY,
- d->line (),
- d->file_name ());
+ idl_error_header (EIDL_ILLEGAL_PRIMARY_KEY, d);
d->name ()->dump (*ACE_DEFAULT_LOG_STREAM);
ACE_ERROR ((LM_ERROR, "\n"));
- idl_global->set_err_count (idl_global->err_count () + 1);
}
void
UTL_Error::duplicate_param_id (UTL_ScopedName *n)
{
- idl_error_header (EIDL_DUPLICATE_T_PARAM,
- idl_global->lineno (),
- idl_global->filename ()->get_string ());
+ idl_error_header (EIDL_DUPLICATE_T_PARAM);
ACE_ERROR ((LM_ERROR, " - "));
n->dump (*ACE_DEFAULT_LOG_STREAM);
ACE_ERROR ((LM_ERROR, "\n"));
- idl_global->set_err_count (idl_global->err_count () + 1);
}
void
UTL_Error::mismatched_template_param (const char *name)
{
- idl_error_header (EIDL_MISMATCHED_T_PARAM,
- idl_global->lineno (),
- idl_global->filename ()->get_string ());
+ idl_error_header (EIDL_MISMATCHED_T_PARAM);
ACE_ERROR ((LM_ERROR, " - %s\n", name));
- idl_global->set_err_count (idl_global->err_count () + 1);
}
void
UTL_Error::mismatch_seq_of_param (const char *param_id)
{
- idl_error_header (EIDL_MISMATCHED_SEQ_PARAM,
- idl_global->lineno (),
- idl_global->filename ()->get_string ());
+ idl_error_header (EIDL_MISMATCHED_SEQ_PARAM);
ACE_ERROR ((LM_ERROR, " - %s\n", param_id));
- idl_global->set_err_count (idl_global->err_count () + 1);
}
void
@@ -1577,13 +1455,10 @@ UTL_Error::scope_masking_error (AST_Decl *masked,
const char *masked_file = masked->file_name ().c_str ();
const char *masking_file = masking->file_name ().c_str ();
+ idl_error_header (EIDL_MISC);
ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("Error - %C: \"%C\", line %d: ")
ACE_TEXT ("Did you mean \"::%C\"\n")
ACE_TEXT (" declared at "),
- idl_global->prog_name (),
- this_file,
- idl_global->lineno (),
masked->full_name () ));
const bool same_file =
@@ -1634,38 +1509,138 @@ UTL_Error::anonymous_type_diagnostic (void)
return;
}
- bool aw = idl_global->anon_warning ();
- bool nw = (idl_global->compile_flags () & IDL_CF_NOWARNINGS);
-
- if (aw && nw)
+ if (idl_global->anon_warning ())
{
- return;
+ if (idl_global->print_warnings ())
+ {
+ idl_warning_header (EIDL_ANONYMOUS_WARNING);
+ ACE_ERROR ((LM_WARNING, "\n"));
+ }
}
-
- ErrorCode ec =
- (aw ? EIDL_ANONYMOUS_WARNING : EIDL_ANONYMOUS_ERROR);
-
- idl_error_header (ec,
- idl_global->lineno (),
- idl_global->filename ()->get_string ());
-
- ACE_ERROR ((LM_ERROR, "\n"));
-
- if (ec == EIDL_ANONYMOUS_ERROR)
+ else
{
- idl_global->set_err_count (idl_global->err_count () + 1);
+ idl_error_header (EIDL_ANONYMOUS_ERROR);
+ ACE_ERROR ((LM_ERROR, "\n"));
}
}
void
UTL_Error::template_scope_ref_not_aliased (AST_Decl *d)
{
- idl_error_header (EIDL_TEMPLATE_NOT_ALIASED,
- idl_global->lineno (),
- d->file_name ());
+ idl_error_header (EIDL_TEMPLATE_NOT_ALIASED, d);
ACE_ERROR ((LM_ERROR, " - "));
d->name ()->dump (*ACE_DEFAULT_LOG_STREAM);
ACE_ERROR ((LM_ERROR, "\n"));
- idl_global->set_err_count (idl_global->err_count () + 1);
}
+void
+UTL_Error::idl_version_error (const char *reason)
+{
+ idl_error_header (EIDL_IDL_VERSION_ERROR);
+ ACE_ERROR ((LM_ERROR,
+ ACE_TEXT ("\n%C\nCurrent IDL version is %C, use --idl-version VERSION to ")
+ ACE_TEXT ("set the IDL version to use.\n"),
+ reason, idl_global->idl_version_.to_string ()
+ ));
+}
+
+void
+UTL_Error::unsupported_error (const char *reason)
+{
+ idl_error_header (EIDL_UNSUPPORTED);
+ ACE_ERROR ((LM_ERROR, ACE_TEXT ("%C\n"), reason));
+}
+
+void
+UTL_Error::unsupported_warning (const char *reason)
+{
+ if (idl_global->print_warnings ())
+ {
+ idl_warning_header (EIDL_UNSUPPORTED);
+ ACE_ERROR ((LM_WARNING, ACE_TEXT ("%C\n"), reason));
+ }
+}
+
+void
+UTL_Error::misc_error (const char *reason, AST_Decl *node)
+{
+ idl_error_header (EIDL_MISC, node);
+ ACE_ERROR ((LM_ERROR, ACE_TEXT ("%C\n"), reason));
+}
+
+void
+UTL_Error::misc_warning (const char *reason, AST_Decl *node)
+{
+ if (idl_global->print_warnings ())
+ {
+ idl_warning_header (EIDL_MISC, node);
+ ACE_ERROR ((LM_WARNING, ACE_TEXT ("%C\n"), reason));
+ }
+}
+
+void
+UTL_Error::invalid_annotation_param_error (
+ AST_Annotation_Appl *appl, AST_Annotation_Decl *decl,
+ Identifier *invalid_id)
+{
+ bool is_builtin = decl->builtin ();
+ idl_error_header (EIDL_ANNOTATION_PARAM_ERROR,
+ static_cast<AST_Decl*>(appl));
+ invalid_id->dump (*ACE_DEFAULT_LOG_STREAM);;
+ ACE_ERROR ((LM_ERROR, ACE_TEXT (" is not a member of %Cannotation "),
+ is_builtin ? "builtin " : ""));
+ decl->name ()->dump (*ACE_DEFAULT_LOG_STREAM);;
+ if (!is_builtin)
+ {
+ ACE_ERROR ((LM_ERROR, ACE_TEXT (" declared in \"%C\" on line %d"),
+ get_filename (decl), get_lineno (decl)));
+ }
+ ACE_ERROR ((LM_ERROR, ACE_TEXT ("\n")));
+}
+
+void
+UTL_Error::invalid_annotation_param_type (
+ AST_Annotation_Appl *appl, AST_Annotation_Member *member,
+ AST_Expression *offending_value)
+{
+ bool is_builtin = member->builtin ();
+ idl_error_header (EIDL_ANNOTATION_PARAM_ERROR,
+ static_cast<AST_Decl*>(appl));
+ ACE_ERROR ((LM_ERROR,
+ ACE_TEXT ("%Cnnotation member \""),
+ is_builtin ? "Builtin a" : "A"));
+ member->dump (*ACE_DEFAULT_LOG_STREAM);
+ ACE_ERROR ((LM_ERROR, ACE_TEXT ("\"")));
+ if (!is_builtin)
+ {
+ ACE_ERROR ((LM_ERROR,
+ ACE_TEXT (" declared in \"%C\" on line %d"),
+ get_filename (member), get_lineno (member)));
+ }
+ ACE_ERROR ((LM_ERROR, ACE_TEXT (" can not be set to ")));
+ offending_value->dump (*ACE_DEFAULT_LOG_STREAM);;
+ ACE_ERROR ((LM_ERROR, ACE_TEXT (" because the types are incompatible!\n")));
+}
+
+void
+UTL_Error::annotation_param_missing_error (
+ AST_Annotation_Appl *appl, AST_Annotation_Member *member)
+{
+ bool is_builtin = member->builtin ();
+ idl_error_header (EIDL_ANNOTATION_PARAM_ERROR,
+ static_cast<AST_Decl*>(appl));
+ ACE_ERROR ((LM_ERROR,
+ ACE_TEXT ("%Cnnotation member: \""),
+ is_builtin ? "Builtin a" : "A"));
+ member->dump (*ACE_DEFAULT_LOG_STREAM);
+ ACE_ERROR ((LM_ERROR, ACE_TEXT ("\"")));
+ if (!is_builtin)
+ {
+ ACE_ERROR ((LM_ERROR,
+ ACE_TEXT (" declared in \"%C\" on line %d"),
+ get_filename (member), get_lineno (member)));
+ }
+ ACE_ERROR ((LM_ERROR,
+ ACE_TEXT (" needs to be defined because it does not have a default value!\n"),
+ get_filename (member), get_lineno (member)));
+}
diff --git a/TAO/TAO_IDL/util/utl_global.cpp b/TAO/TAO_IDL/util/utl_global.cpp
index 3cebe32f2dc..47e979ebc3a 100644
--- a/TAO/TAO_IDL/util/utl_global.cpp
+++ b/TAO/TAO_IDL/util/utl_global.cpp
@@ -62,6 +62,8 @@ trademarks or registered trademarks of Sun Microsystems, Inc.
*/
+
+#include "idl_defines.h"
#include "idl_global.h"
#include "global_extern.h"
#include "utl_identifier.h"
@@ -71,10 +73,12 @@ trademarks or registered trademarks of Sun Microsystems, Inc.
#include "fe_extern.h"
#include "fe_private.h"
#include "nr_extern.h"
+#include "ast_extern.h"
#include "ast_root.h"
#include "ast_generator.h"
#include "ast_valuetype.h"
+#include "ast_annotation_decl.h"
#include "ace/OS_NS_stdio.h"
#include "ace/OS_NS_unistd.h"
@@ -106,7 +110,18 @@ char* IDL_GlobalData::translateName(const char* name, char *name_buf)
#endif
IDL_GlobalData::IDL_GlobalData (void)
- : pd_root (0),
+ : syntax_only_ (false),
+ parse_args_exit_ (false),
+ parse_args_exit_status_ (0),
+ print_help_ (false),
+ print_version_ (false),
+ in_eval_ (false),
+ dump_builtins_ (false),
+ just_dump_builtins_ (false),
+ ignore_files_ (false),
+ ignore_lookup_errors_ (false),
+ unknown_annotations_ (UNKNOWN_ANNOTATIONS_WARN_ONCE),
+ pd_root (0),
pd_gen (0),
pd_primary_key_base (0),
pd_err (0),
@@ -525,6 +540,14 @@ IDL_GlobalData::compile_flags (void)
void
IDL_GlobalData::set_compile_flags (long cf)
{
+ if (cf & IDL_CF_ONLY_USAGE)
+ {
+ print_help ();
+ }
+ if (cf & IDL_CF_DUMP_AST)
+ {
+ syntax_only_ = true;
+ }
this->pd_compile_flags = cf;
}
@@ -1870,3 +1893,84 @@ IDL_GlobalData::in_tmpl_mod_alias (bool val)
{
this->in_tmpl_mod_alias_ = val;
}
+
+void
+IDL_GlobalData::parse_args_exit (int status)
+{
+ parse_args_exit_ = true;
+ parse_args_exit_status_ = status;
+}
+
+void
+IDL_GlobalData::print_help ()
+{
+ print_help_ = true;
+ parse_args_exit (0);
+}
+
+void
+IDL_GlobalData::print_version ()
+{
+ print_version_ = true;
+ parse_args_exit (0);
+}
+
+bool
+IDL_GlobalData::print_warnings ()
+{
+ return ! (idl_global->compile_flags () & IDL_CF_NOWARNINGS);
+}
+
+/*
+ * These are generated in idl.yy.cpp but they are not put in the header file,
+ * so to use them we must declare them here.
+ */
+struct yy_buffer_state;
+extern yy_buffer_state *tao_yy_scan_string (const char *);
+extern int tao_yylex_destroy ();
+
+void
+IDL_GlobalData::eval (const char *string)
+{
+ in_eval_ = true;
+
+ // Get IDL_Global Context
+ UTL_String *old_filename = filename ();
+ pd_filename = 0;
+ long old_lineno = lineno ();
+ idl_global->set_lineno (1);
+ UTL_String *old_idl_src_file = idl_src_file ();
+
+ // Name this pseudo-file "builtin"
+ UTL_String utl_string ("builtin", true);
+ idl_global->idl_src_file (new UTL_String (&utl_string, true));
+ idl_global->set_filename (new UTL_String (&utl_string, true));
+
+ // Set up Flex to read from string
+ tao_yy_scan_string (string);
+
+ // emulate DRV_drive()
+ FE_yyparse ();
+ idl_global->check_primary_keys ();
+ AST_check_fwd_decls ();
+
+ // Have Flex Cleanup
+ tao_yylex_destroy ();
+
+ // Restore IDL_Global Context
+ idl_global->set_filename (old_filename);
+ idl_src_file()->destroy ();
+ delete idl_src_file ();
+ idl_src_file (old_idl_src_file);
+ idl_global->set_lineno (old_lineno);
+ idl_global->reset_flag_seen ();
+
+ in_eval_ = false;
+}
+
+void
+IDL_GlobalData::dump_ast ()
+{
+ idl_global->set_compile_flags (idl_global->compile_flags ()
+ | IDL_CF_DUMP_AST);
+}
diff --git a/TAO/TAO_IDL/util/utl_identifier.cpp b/TAO/TAO_IDL/util/utl_identifier.cpp
index 2b37b3b33a1..8f3929d0c8f 100644
--- a/TAO/TAO_IDL/util/utl_identifier.cpp
+++ b/TAO/TAO_IDL/util/utl_identifier.cpp
@@ -70,6 +70,7 @@ trademarks or registered trademarks of Sun Microsystems, Inc.
// FUZZ: disable check_for_streams_include
#include "ace/streams.h"
+#include "ace/OS_NS_string.h"
Identifier::Identifier (void)
: pv_string (0),
@@ -81,6 +82,51 @@ Identifier::Identifier (const char *s)
: pv_string (0),
escaped_ (false)
{
+ preprocess_and_replace_string (s);
+}
+
+Identifier::Identifier (const Identifier &other)
+ : pv_string (0),
+ escaped_ (other.escaped ())
+{
+ replace_string (other.get_string ());
+}
+
+Identifier::~Identifier (void)
+{
+ if (this->pv_string != 0)
+ {
+ ACE::strdelete (this->pv_string);
+ }
+}
+
+// Operations.
+
+char *
+Identifier::get_string (void)
+{
+ return this->pv_string;
+}
+
+const char *
+Identifier::get_string (void) const
+{
+ return this->pv_string;
+}
+
+void
+Identifier::replace_string (const char * s)
+{
+ if (pv_string)
+ {
+ delete [] this->pv_string;
+ }
+ this->pv_string = s ? ACE::strnew (s) : 0;
+}
+
+void
+Identifier::preprocess_and_replace_string (const char * s)
+{
bool shift = false;
if (*s == '_')
@@ -127,38 +173,7 @@ Identifier::Identifier (const char *s)
}
}
- if (shift)
- {
- this->pv_string = ACE::strnew (s + 1);
- }
- else
- {
- this->pv_string = ACE::strnew (s);
- }
-}
-
-Identifier::~Identifier (void)
-{
- if (this->pv_string != 0)
- {
- ACE::strdelete (this->pv_string);
- this->pv_string = 0;
- }
-}
-
-// Operations.
-
-char *
-Identifier::get_string (void)
-{
- return this->pv_string;
-}
-
-void
-Identifier::replace_string (const char * s)
-{
- delete [] this->pv_string;
- this->pv_string = ACE::strnew (s);
+ replace_string (shift ? s + 1 : s);
}
// Compare two Identifier *
@@ -218,10 +233,20 @@ Identifier::dump (ACE_OSTREAM_TYPE &o)
return;
}
- o << this->pv_string;
+ /*
+ * Annotation ids are prefixed with '@' to effectively create an alternative
+ * namespace for them. This hides that hack from dumping.
+ */
+ o << ((pv_string[0] == '@') ? pv_string + 1 : pv_string);
}
void
Identifier::destroy (void)
{
}
+
+bool
+Identifier::operator== (const Identifier &other) const
+{
+ return !ACE_OS::strcmp (pv_string, other.get_string ());
+}
diff --git a/TAO/TAO_IDL/util/utl_idlist.cpp b/TAO/TAO_IDL/util/utl_idlist.cpp
index 601dec5b420..c2445916e77 100644
--- a/TAO/TAO_IDL/util/utl_idlist.cpp
+++ b/TAO/TAO_IDL/util/utl_idlist.cpp
@@ -198,8 +198,8 @@ UTL_IdList::compare (UTL_IdList *other)
void
UTL_IdList::dump (ACE_OSTREAM_TYPE &o)
{
- long first = true;
- long second = false;
+ bool first = true;
+ bool second = false;
for (UTL_IdListActiveIterator i (this);
!i.is_done ();
@@ -214,19 +214,26 @@ UTL_IdList::dump (ACE_OSTREAM_TYPE &o)
first = second = false;
}
- i.item ()->dump (o);
-
- if (first)
+ if (i.item ()->get_string ())
{
- if (ACE_OS::strcmp (i.item ()->get_string (), "::") != 0)
- {
- first = false;
- }
- else
+ i.item ()->dump (o);
+
+ if (first)
{
- second = true;
+ if (ACE_OS::strcmp (i.item ()->get_string (), "::") != 0)
+ {
+ first = false;
+ }
+ else
+ {
+ second = true;
+ }
}
}
+ else
+ {
+ o << "(null string)";
+ }
}
}
@@ -264,3 +271,56 @@ UTL_IdListActiveIterator::item (void)
return ((UTL_IdList *) source)->head ();
}
+
+char *
+UTL_IdList::get_string_copy ()
+{
+ /*
+ * Absolute Names have "::" as the first item in the idlist, so delimiters
+ * have to start be inserted depending on if the name is absolute or not
+ */
+ size_t delimiter_start = is_absolute () ? 1 : 0;
+
+ // Get buffer of the correct size
+ size_t n = 0;
+ size_t size = 1;
+ for (UTL_IdListActiveIterator i (this);
+ !i.is_done ();
+ i.next ())
+ {
+ if (n > delimiter_start)
+ {
+ size += 2; // For delimiter
+ }
+ const char *item = i.item ()->get_string ();
+ size += ACE_OS::strlen (item);
+ n++;
+ }
+ char *buffer = new char[size];
+ buffer[0] = '\0';
+
+ // Fill buffer
+ n = 0;
+ for (UTL_IdListActiveIterator i (this);
+ !i.is_done ();
+ i.next ())
+ {
+ if (n > delimiter_start)
+ {
+ ACE_OS::strncat (buffer, "::", 2);
+ }
+ const char *item = i.item ()->get_string ();
+ ACE_OS::strcat (buffer, item);
+ n++;
+ }
+
+ buffer[size - 1] = '\0';
+
+ return buffer;
+}
+
+bool
+UTL_IdList::is_absolute ()
+{
+ return !ACE_OS::strcmp (first_component ()->get_string (), "::");
+}
diff --git a/TAO/TAO_IDL/util/utl_scope.cpp b/TAO/TAO_IDL/util/utl_scope.cpp
index f8b25ec0f32..eb0a50bc9c0 100644
--- a/TAO/TAO_IDL/util/utl_scope.cpp
+++ b/TAO/TAO_IDL/util/utl_scope.cpp
@@ -1229,8 +1229,8 @@ UTL_Scope::lookup_by_name (UTL_ScopedName *e,
work = idl_global->root ();
}
- AST_Decl *first_found_final_parent_decl= 0;
- const bool searching_module_path= (e->length () != 1);
+ AST_Decl *first_found_final_parent_decl = 0;
+ const bool searching_module_path = (e->length () != 1);
AST_Decl *d = searching_module_path ?
work->lookup_by_name_r (e, full_def_only, first_found_final_parent_decl) :
work->lookup_by_name_r (e, full_def_only);
@@ -1822,7 +1822,9 @@ UTL_Scope::dump (ACE_OSTREAM_TYPE &o)
if (0 < this->pd_locals_used)
{
- o << ACE_TEXT ("\n/* Locally defined types: */\n");
+ o << '\n';
+ idl_global->indent ()->skip_to (o);
+ o << ACE_TEXT ("/* Locally defined types: */\n");
for (UTL_ScopeActiveIterator i (this, IK_localtypes);
!i.is_done ();
@@ -1830,18 +1832,19 @@ UTL_Scope::dump (ACE_OSTREAM_TYPE &o)
{
AST_Decl *d = i.item ();
- if (!d->imported ())
+ if (d->should_be_dumped () && !d->imported ())
{
idl_global->indent ()->skip_to (o);
- d->dump (o);
- o << ACE_TEXT ("\n");
+ o << *d << ACE_TEXT (";\n");
}
}
}
if (0 < this->pd_decls_used)
{
- o << ACE_TEXT ("\n/* Declarations: */\n");
+ o << '\n';
+ idl_global->indent ()->skip_to (o);
+ o << ACE_TEXT ("/* Declarations: */\n");
for (UTL_ScopeActiveIterator j (this, IK_decls);
!j.is_done ();
@@ -1849,11 +1852,10 @@ UTL_Scope::dump (ACE_OSTREAM_TYPE &o)
{
AST_Decl *d = j.item ();
- if (!d->imported ())
+ if (d->should_be_dumped () && !d->imported ())
{
idl_global->indent ()->skip_to (o);
- d->dump (o);
- o << ACE_TEXT (";\n");
+ o << *d << ACE_TEXT (";\n");
}
}
}
@@ -2226,3 +2228,25 @@ UTL_ScopeActiveIterator::iteration_stage (void)
{
return this->stage;
}
+
+AST_Annotation_Decl *
+UTL_Scope::fe_add_annotation_decl (AST_Annotation_Decl * /*annotation_decl*/)
+{
+ return 0;
+}
+
+AST_Annotation_Member *
+UTL_Scope::fe_add_annotation_member (AST_Annotation_Member * /*annotation_member*/)
+{
+ return 0;
+}
+
+AST_Decl *
+UTL_Scope::lookup_by_name (const char *name)
+{
+ AST_Decl *node = 0;
+ UTL_ScopedName *scoped_name = FE_Utils::string_to_scoped_name (name);
+ node = lookup_by_name (scoped_name);
+ delete scoped_name;
+ return node;
+}
diff --git a/TAO/bin/tao_orb_tests.lst b/TAO/bin/tao_orb_tests.lst
index 1f512ada9d7..221f1ea556e 100644
--- a/TAO/bin/tao_orb_tests.lst
+++ b/TAO/bin/tao_orb_tests.lst
@@ -505,3 +505,4 @@ TAO/DevGuideExamples/ValueTypes/Messenger/run_test.pl: !MINIMUM !CORBA_E_MICRO
TAO/DevGuideExamples/ValueTypes/Bank/run_test.pl: !MINIMUM !CORBA_E_MICRO
TAO/DevGuideExamples/AMH/run_test.pl: !NO_MESSAGING !CORBA_E_MICRO
TAO/DevGuideExamples/AMH_AMI/run_test.pl: !NO_MESSAGING !CORBA_E_MICRO
+TAO/tests/IDLv4/annotations/run_test.pl
diff --git a/TAO/docs/compiler.html b/TAO/docs/compiler.html
index a036c26e5e8..359f2475a19 100644
--- a/TAO/docs/compiler.html
+++ b/TAO/docs/compiler.html
@@ -69,7 +69,7 @@ these files:) <P>
unlinked if not used.
<LI> <B><EM>CIAO servant files</EM></B>, <EM>i.e.</EM>, <tt>*_svnt.h</tt>,
and <tt>*_svnt.cpp</tt>. Optionally generated files, containing component
- and home servant implementations, as well as factory fuctions to create
+ and home servant implementations, as well as factory functions to create
components and homes.
<LI> <B><EM>Executor IDL file</EM></B>, <EM>i.e.</EM>, <tt>*E.idl</tt>.
IDL file containing local interfaces used for component and home
@@ -153,7 +153,7 @@ to the preprocessor (MVS, HPUX, etc.). And case 3 isn't used at all,
but is included as a default case.</P>
<P>Since the default preprocessor may not always work when TAO_IDL is moved to
-another machine or used in cross-compilation, it can be overriden at runtime
+another machine or used in cross-compilation, it can be overridden at runtime
by setting the environment variables TAO_IDL_PREPROCESSOR and
TAO_IDL_PREPROCESSOR_ARGS.</P>
@@ -251,20 +251,40 @@ also receives other options that are specific to it.<p>
<th>Remark</th>
</tr>
<tr><a NAME="u">
- <td><tt>-u</tt></td>
+ <td><tt>-h</br>--help</br>-u</tt></td>
- <td>The compiler prints out the options that are given below and exits
- clean </td>
+ <td>The compiler prints out the arguments it supports and exits</td>
<td>&nbsp;</td>
</tr>
<tr> <a NAME="V">
- <td><tt>-V</tt></td>
+ <td><tt>-V</br>--version</tt></td>
<td>The compiler printouts its version and exits</td>
<td>&nbsp;</td>
</tr>
+ <tr>
+ <td><tt>--idl-version VERSION</tt></td>
+
+ <td>Set the IDL version to use</td>
+ <td>&nbsp;</td>
+ </tr>
+
+ <tr>
+ <td><tt>--default-idl-version</tt></td>
+
+ <td>Prints the default IDL version for the compiler and exits</td>
+ <td>&nbsp;</td>
+ </tr>
+
+ <tr>
+ <td><tt>--list-idl-versions</tt></td>
+
+ <td>Lists IDL versions the compiler supports and exits</td>
+ <td>&nbsp;</td>
+ </tr>
+
<tr><a name="Wb">
<td><tt>-Wb,</tt><i>option_list</i></EM</TD></td>
@@ -329,7 +349,7 @@ also receives other options that are specific to it.<p>
or <tt>extern</tt> typecode declaration in the generated stub code,
this is needed for Windows and newer versions of gcc, which require special directives to
export symbols from DLLs, otherwise the definition is just a
- space on unix platforms. This option works only in conjuction with
+ space on Unix platforms. This option works only in conjunction with
the -GA option, which generates Any operators and typecodes into a
separate set of files.&nbsp;</td>
</tr>
@@ -341,7 +361,7 @@ also receives other options that are specific to it.<p>
<td>The compiler will generate code to include <i>include_path</i> at the
top of the anyop file header, this is usually a good place to define the export
- macro. This option works in conjuction with the -GA option, which generates Any
+ macro. This option works in conjunction with the -GA option, which generates Any
operators and typecodes into a separate set of files.</td>
</tr>
@@ -377,7 +397,7 @@ also receives other options that are specific to it.<p>
<td><tt>exec_export_macro=</tt><i>macro_name</i></td>
<td>The compiler will emit <i>macro_name</i> right after each <tt>class</tt>
- or <tt>extern</tt> keyword in the generated CIAO executor implmentation header
+ or <tt>extern</tt> keyword in the generated CIAO executor implementation header
(*_exec.h) files, if such
code is being generated (see <tt>-Gex</tt> option below). These macros
are needed for Windows and newer versions of gcc, which require special directives to
@@ -401,7 +421,7 @@ also receives other options that are specific to it.<p>
<td><tt>conn_export_macro=</tt><i>macro_name</i></td>
<td>The compiler will emit <i>macro_name</i> right after each <tt>class</tt>
- or <tt>extern</tt> keyword in the generated CIAO connector implmentation header
+ or <tt>extern</tt> keyword in the generated CIAO connector implementation header
(*_conn.h) files, if such
code is being generated (see <tt>-Gcn</tt> option below). These macros
are needed for Windows and newer versions of gcc, which require special directives to
@@ -556,10 +576,33 @@ also receives other options that are specific to it.<p>
<td>&nbsp;</td>
</tr>
+ <tr>
+ <td><tt>--syntax-only</tt></td>
+
+ <td>Parse input files, but exit without generating any files.</td>
+ <td>&nbsp;</td>
+ </tr>
+
<tr><a name="d">
- <td><tt>-d</tt></td>
+ <td><tt>--dump </br> -d</tt></td>
+
+ <td>Causes output of a dump of the AST and exits before any files would be
+ created.</td>
+ <td>&nbsp;</td>
+ </tr>
+
+ <tr>
+ <td><tt>--dump-builtins</tt></td>
- <td>Causes output of a dump of the AST</td>
+ <td>Implies --dump, but also dumps IDL defined by the compiler.</td>
+ <td>&nbsp;</td>
+ </tr>
+
+ <tr>
+ <td><tt>--just-dump-builtins</tt></td>
+
+ <td>Dumps IDL defined by the compiler but ignores any files passed and
+ exits.</td>
<td>&nbsp;</td>
</tr>
@@ -636,7 +679,7 @@ also receives other options that are specific to it.<p>
<tr><a name="in">
<TD><TT>-in</TT></TD>
- <TD> To generate #include statements with <>'s for the standard
+ <TD> To generate #include statements with &lt;&gt;'s for the standard
include files (e.g. tao/corba.h) indicating them as non-changing
files</TD>
<td>&nbsp;</td>
@@ -779,7 +822,7 @@ also receives other options that are specific to it.<p>
<tr><a name="Ce">
<td><tt>-Ce</tt></td>
- <td>Output an error if two indentifiers in the same scope differ in
+ <td>Output an error if two identifiers in the same scope differ in
spelling only by case (default).</td>
<td>&nbsp;</td>
@@ -836,7 +879,7 @@ also receives other options that are specific to it.<p>
<td>Generate AMI4CCM code</td>
<td>*A.idl file (containing callback interface, "sendc_" methods
- and CCM connector) plus addition to CCM servant and exectuor</td>
+ and CCM connector) plus addition to CCM servant and executor</td>
</tr>
<tr><a name="Gp">
@@ -1036,7 +1079,7 @@ also receives other options that are specific to it.<p>
<td>Generate CIAO executor implementation code for component and home IDL declarations</td>
<td>
- These files have empty function bodies for all facet, suported and inherited operations,
+ These files have empty function bodies for all facet, supported and inherited operations,
to be filled in by the developer.</td>
</tr>
@@ -1296,6 +1339,21 @@ also receives other options that are specific to it.<p>
<td>Default is 2 spaces</td>
</tr>
+ <tr>
+ <td><tt>--unknown-annotations ARG</tt></td>
+
+ <td>
+ Controls the reaction when encountering undefined annotations. The valid
+ arguments to this option are "warn-once" (Default), "warn-all", "error",
+ and "ignore".
+ </td>
+ <td>
+ The difference between "warn-once" and "warn-all" is that with
+ "warn-once" using annotations the same local name will not be warned
+ about more than once, while "warn-all" will warn with every usage.
+ </td>
+ </tr>
+
</table> <P>
<P><HR><P>
diff --git a/TAO/orbsvcs/IFR_Service/be_global.cpp b/TAO/orbsvcs/IFR_Service/be_global.cpp
index fd630201645..d85c1eafab3 100644
--- a/TAO/orbsvcs/IFR_Service/be_global.cpp
+++ b/TAO/orbsvcs/IFR_Service/be_global.cpp
@@ -147,47 +147,66 @@ BE_GlobalData::spawn_options (void)
return this->orb_args_ + idl_global->idl_flags ();
}
+#define UNKNOWN_OPTION \
+ ORBSVCS_ERROR (( \
+ LM_ERROR, \
+ ACE_TEXT ("IDL: I don't understand the '%s' option\n"), \
+ av[i])); \
+ idl_global->parse_args_exit (1);
+
void
BE_GlobalData::parse_args (long &i, char **av)
{
switch (av[i][1])
{
case 'L':
- be_global->enable_locking (true);
+ if (av[i][2] == '\0')
+ {
+ be_global->enable_locking (true);
+ }
+ else
+ {
+ UNKNOWN_OPTION;
+ }
break;
+
case 'r':
- be_global->removing (true);
+ if (av[i][2] == '\0')
+ {
+ be_global->removing (true);
+ }
+ else
+ {
+ UNKNOWN_OPTION;
+ }
break;
+
case 'S':
// Suppress ...
- if (av[i][2] == 'i')
+ if (av[i][2] == 'i' && av[i][3] == '\0')
{
// ... processing of included IDL files.
be_global->do_included_files (0);
}
else
{
- ORBSVCS_ERROR ((
- LM_ERROR,
- ACE_TEXT ("IDL: I don't understand the '%s' option\n"),
- av[i]));
-
- ACE_OS::exit (99);
+ UNKNOWN_OPTION;
}
break;
+
case 'T':
- be_global->allow_duplicate_typedefs (true);
+ if (av[i][2] == '\0')
+ {
+ be_global->allow_duplicate_typedefs (true);
+ }
+ else
+ {
+ UNKNOWN_OPTION;
+ }
break;
+
default:
- ORBSVCS_ERROR ((
- LM_ERROR,
- ACE_TEXT ("IDL: I don't understand the '%s' option\n"),
- av[i]
- ));
-
- idl_global->set_compile_flags (idl_global->compile_flags ()
- | IDL_CF_ONLY_USAGE);
- break;
+ UNKNOWN_OPTION;
}
}
diff --git a/TAO/orbsvcs/IFR_Service/be_global.h b/TAO/orbsvcs/IFR_Service/be_global.h
index a2f3752b825..74a71bc3b20 100644
--- a/TAO/orbsvcs/IFR_Service/be_global.h
+++ b/TAO/orbsvcs/IFR_Service/be_global.h
@@ -78,7 +78,7 @@ public:
/// implementations in IDL and IFR backends.
ACE_CString spawn_options (void);
- /// Parse args that affect the backend.
+ /// Parse an argument that might affect the backend.
void parse_args (long &i, char **av);
private:
diff --git a/TAO/orbsvcs/tests/Notify/MC/.gitignore b/TAO/orbsvcs/tests/Notify/MC/.gitignore
new file mode 100644
index 00000000000..4ffa0e3055a
--- /dev/null
+++ b/TAO/orbsvcs/tests/Notify/MC/.gitignore
@@ -0,0 +1 @@
+notify.conf
diff --git a/TAO/tests/IDL_Test/.gitignore b/TAO/tests/IDL_Test/.gitignore
index 9a159eea34b..ab69fed79c6 100644
--- a/TAO/tests/IDL_Test/.gitignore
+++ b/TAO/tests/IDL_Test/.gitignore
@@ -1,457 +1,11 @@
-/anonymousA.cpp
-/anonymousA.h
-/anonymousC.cpp
-/anonymousC.h
-/anonymousC.inl
-/anonymousS.cpp
-/anonymousS.h
-/anonymousS_T.cpp
-/anonymousS_T.h
-/anyunionC.cpp
-/anyunionC.h
-/anyunionC.inl
-/anyunionS.cpp
-/anyunionS.h
-/anyunionS_T.cpp
-/anyunionS_T.h
-/array_anon_nestedC.cpp
-/array_anon_nestedC.h
-/array_anon_nestedC.inl
-/array_anon_nestedS.cpp
-/array_anon_nestedS.h
-/array_anon_nestedS_T.cpp
-/array_anon_nestedS_T.h
-/array_onlyA.cpp
-/array_onlyA.h
-/array_onlyC.cpp
-/array_onlyC.h
-/array_onlyC.inl
-/array_onlyS.cpp
-/array_onlyS.h
-/array_onlyS_T.cpp
-/array_onlyS_T.h
-/array_onlySupport.cxx
-/array_onlySupport.h
-/arrayA.cpp
-/arrayC.cpp
-/arrayC.h
-/arrayC.inl
-/arrayS.cpp
-/arrayS.h
-/arrayS_T.cpp
-/arrayS_T.h
-/attribute.cxx
-/attribute.h
-/attributeC.cpp
-/attributeC.h
-/attributeC.inl
-/attributePlugin.cxx
-/attributePlugin.h
-/attributeS.cpp
-/attributeS.h
-/attributeS_T.cpp
-/attributeS_T.h
-/attributeSupport.cxx
-/attributeSupport.h
-/Bug_2350_RegressionC.cpp
-/Bug_2350_RegressionC.h
-/Bug_2350_RegressionC.inl
-/Bug_2350_RegressionS.cpp
-/Bug_2350_RegressionS.h
-/Bug_2350_RegressionS_T.cpp
-/Bug_2350_RegressionS_T.h
-/Bug_2577_RegressionC.cpp
-/Bug_2577_RegressionC.h
-/Bug_2577_RegressionC.inl
-/Bug_2577_RegressionS.cpp
-/Bug_2577_RegressionS.h
-/Bug_2577_RegressionS_T.cpp
-/Bug_2577_RegressionS_T.h
-/Bug_2582_RegressionC.cpp
-/Bug_2582_RegressionC.h
-/Bug_2582_RegressionC.inl
-/Bug_2582_RegressionS.cpp
-/Bug_2582_RegressionS.h
-/Bug_2582_RegressionS_T.cpp
-/Bug_2582_RegressionS_T.h
-/Bug_2583_RegressionC.cpp
-/Bug_2583_RegressionC.h
-/Bug_2583_RegressionC.inl
-/Bug_2583_RegressionS.cpp
-/Bug_2583_RegressionS.h
-/Bug_2583_RegressionS_T.cpp
-/Bug_2583_RegressionS_T.h
-/Bug_2616_RegressionC.cpp
-/Bug_2616_RegressionC.h
-/Bug_2616_RegressionC.inl
-/Bug_2616_RegressionS.cpp
-/Bug_2616_RegressionS.h
-/Bug_2616_RegressionS_T.cpp
-/Bug_2616_RegressionS_T.h
-/Bug_2619_RegressionC.cpp
-/Bug_2619_RegressionC.h
-/Bug_2619_RegressionC.inl
-/Bug_2619_RegressionS.cpp
-/Bug_2619_RegressionS.h
-/Bug_2619_RegressionS_T.cpp
-/Bug_2619_RegressionS_T.h
-/Bug_3243_RegressionC.cpp
-/Bug_3243_RegressionC.h
-/Bug_3243_RegressionC.inl
-/Bug_3243_RegressionS.cpp
-/Bug_3243_RegressionS.h
-/Bug_3243_RegressionS_T.cpp
-/Bug_3243_RegressionS_T.h
-/Bug_3312_RegressionC.cpp
-/Bug_3312_RegressionC.h
-/Bug_3312_RegressionC.inl
-/Bug_3312_RegressionS.cpp
-/Bug_3312_RegressionS.h
-/Bug_3312_RegressionS_T.cpp
-/Bug_3312_RegressionS_T.h
-/Bug_3819_RegressionC.cpp
-/Bug_3819_RegressionC.h
-/Bug_3819_RegressionC.inl
-/Bug_3819_RegressionS.cpp
-/Bug_3819_RegressionS.h
-/Bug_3819_RegressionS_T.cpp
-/Bug_3819_RegressionS_T.h
-/Bug_3821_RegressionC.cpp
-/Bug_3821_RegressionC.h
-/Bug_3821_RegressionC.inl
-/Bug_3821_RegressionS.cpp
-/Bug_3821_RegressionS.h
-/Bug_3821_RegressionS_T.cpp
-/Bug_3821_RegressionS_T.h
-/constants.cxx
-/constants.h
-/constantsA.cpp
-/constantsA.h
-/constantsC.cpp
-/constantsC.h
-/constantsC.inl
-/constantsPlugin.cxx
-/constantsPlugin.h
-/constantsS.cpp
-/constantsS.h
-/constantsS_T.cpp
-/constantsS_T.h
-/constantsSupport.cxx
-/constantsSupport.h
-/dif2.cxx
-/dif2.h
-/dif2A.cpp
-/dif2A.h
-/dif2C.cpp
-/dif2C.h
-/dif2C.inl
-/dif2Plugin.cxx
-/dif2Plugin.h
-/dif2S.cpp
-/dif2S.h
-/dif2S_T.cpp
-/dif2S_T.h
-/dif2Support.cxx
-/dif2Support.h
-/enum_in_struct.cxx
-/enum_in_struct.h
-/enum_in_structA.cpp
-/enum_in_structC.cpp
-/enum_in_structC.h
-/enum_in_structC.inl
-/enum_in_structPlugin.cxx
-/enum_in_structPlugin.h
-/enum_in_structS.cpp
-/enum_in_structS.h
-/enum_in_structS_T.cpp
-/enum_in_structS_T.h
-/enum_in_structSupport.cxx
-/enum_in_structSupport.h
-/fullA.cpp
-/fullC.cpp
-/fullC.h
-/fullC.inl
-/fullS.cpp
-/fullS.h
-/fullS_T.cpp
-/fullS_T.h
-/fwdA.cpp
-/fwdC.cpp
-/fwdC.h
-/fwdC.inl
-/fwdS.cpp
-/fwdS.h
-/fwdS_T.cpp
-/fwdS_T.h
-/generic_objectA.cpp
-/generic_objectA.h
-/generic_objectC.cpp
-/generic_objectC.h
-/generic_objectC.inl
-/generic_objectS.cpp
-/generic_objectS.h
-/generic_objectS_T.cpp
-/generic_objectS_T.h
-/gperfA.cpp
-/gperfC.cpp
-/gperfC.h
-/gperfC.inl
-/gperfS.cpp
-/gperfS.h
-/gperfS_T.cpp
-/gperfS_T.h
-/includedA.cpp
-/includedC.cpp
-/includedC.h
-/includedC.inl
-/includedS.cpp
-/includedS.h
-/includedS_T.cpp
-/includedS_T.h
-/includedSupport.cxx
-/includedSupport.h
-/including.cxx
-/includingA.cpp
-/includingC.cpp
-/includingC.h
-/includingC.inl
-/includingS.cpp
-/includingS.h
-/includingS_T.cpp
-/includingS_T.h
-/inheritA.cpp
-/inheritA.h
-/inheritC.cpp
-/inheritC.h
-/inheritC.inl
-/inheritS.cpp
-/inheritS.h
-/inheritS_T.cpp
-/inheritS_T.h
-/interfaceA.cpp
-/interfaceC.cpp
-/interfaceC.h
-/interfaceC.inl
-/interfaceS.cpp
-/interfaceS.h
-/interfaceS_T.cpp
-/interfaceS_T.h
-/keywordsA.cpp
-/keywordsA.h
-/keywordsC.cpp
-/keywordsC.h
-/keywordsC.inl
-/keywordsS.cpp
-/keywordsS.h
-/keywordsS_T.cpp
-/keywordsS_T.h
-/loader_constC.cpp
-/loader_constC.h
-/loader_constC.inl
-/loader_constS.cpp
-/loader_constS.h
-/loader_constS_T.cpp
-/loader_constS_T.h
+/*A.cpp
+/*A.h
+/*C.cpp
+/*C.h
+/*C.inl
+/*S.cpp
+/*S.h
+/*S_T.cpp
+/*S_T.h
/main
-/moduleA.cpp
-/moduleA.h
-/moduleC.cpp
-/moduleC.h
-/moduleC.inl
-/moduleS.cpp
-/moduleS.h
-/moduleS_T.cpp
-/moduleS_T.h
-/nested_scopeA.cpp
-/nested_scopeC.cpp
-/nested_scopeC.h
-/nested_scopeC.inl
-/nested_scopeS.cpp
-/nested_scopeS.h
-/nested_scopeS_T.cpp
-/nested_scopeS_T.h
-/old_arrayC.cpp
-/old_arrayC.h
-/old_arrayC.inl
-/old_arrayS.cpp
-/old_arrayS.h
-/old_arrayS_T.cpp
-/old_arrayS_T.h
-/old_constantsC.cpp
-/old_constantsC.h
-/old_constantsC.inl
-/old_constantsS.cpp
-/old_constantsS.h
-/old_constantsS_T.cpp
-/old_constantsS_T.h
-/old_sequenceC.cpp
-/old_sequenceC.h
-/old_sequenceC.inl
-/old_sequenceS.cpp
-/old_sequenceS.h
-/old_sequenceS_T.cpp
-/old_sequenceS_T.h
-/old_structC.cpp
-/old_structC.h
-/old_structC.inl
-/old_structS.cpp
-/old_structS.h
-/old_structS_T.cpp
-/old_structS_T.h
-/old_union2C.cpp
-/old_union2C.h
-/old_union2C.inl
-/old_union2S.cpp
-/old_union2S.h
-/old_union2S_T.cpp
-/old_union2S_T.h
-/old_unionC.cpp
-/old_unionC.h
-/old_unionC.inl
-/old_unionS.cpp
-/old_unionS.h
-/old_unionS_T.cpp
-/old_unionS_T.h
-/paramsA.cpp
-/paramsC.cpp
-/paramsC.h
-/paramsC.inl
-/paramsS.cpp
-/paramsS.h
-/paramsS_T.cpp
-/paramsS_T.h
-/PEMNamingC.cpp
-/PEMNamingC.h
-/PEMNamingC.inl
-/PEMNamingS.cpp
-/PEMNamingS.h
-/PEMNamingS_T.cpp
-/PEMNamingS_T.h
-/pragmaA.cpp
-/pragmaA.h
-/pragmaC.cpp
-/pragmaC.h
-/pragmaC.inl
-/pragmaS.cpp
-/pragmaS.h
-/pragmaS_T.cpp
-/pragmaS_T.h
-/primtypesA.cpp
-/primtypesA.h
-/primtypesC.cpp
-/primtypesC.h
-/primtypesC.inl
-/primtypesS.cpp
-/primtypesS.h
-/primtypesS_T.cpp
-/primtypesS_T.h
-/reopen_include1A.cpp
-/reopen_include1C.cpp
-/reopen_include1C.h
-/reopen_include1C.inl
-/reopen_include1S.cpp
-/reopen_include1S.h
-/reopen_include1S_T.cpp
-/reopen_include1S_T.h
-/reopen_include2A.cpp
-/reopen_include2C.cpp
-/reopen_include2C.h
-/reopen_include2C.inl
-/reopen_include2S.cpp
-/reopen_include2S.h
-/reopen_include2S_T.cpp
-/reopen_include2S_T.h
-/reopened_modulesA.cpp
-/reopened_modulesC.cpp
-/reopened_modulesC.h
-/reopened_modulesC.inl
-/reopened_modulesS.cpp
-/reopened_modulesS.h
-/reopened_modulesS_T.cpp
-/reopened_modulesS_T.h
-/repo_id_modA.cpp
-/repo_id_modA.h
-/repo_id_modC.cpp
-/repo_id_modC.h
-/repo_id_modC.inl
-/repo_id_modS.cpp
-/repo_id_modS.h
-/repo_id_modS_T.cpp
-/repo_id_modS_T.h
-/sequenceA.cpp
-/sequenceC.cpp
-/sequenceC.h
-/sequenceC.inl
-/sequenceS.cpp
-/sequenceS.h
-/sequenceS_T.cpp
-/sequenceS_T.h
-/simple2C.cpp
-/simple2C.h
-/simple2C.inl
-/simple2S.cpp
-/simple2S.h
-/simple2S_T.cpp
-/simple2S_T.h
-/simpleC.cpp
-/simpleC.h
-/simpleC.inl
-/simpleS.cpp
-/simpleS.h
-/simpleS_T.cpp
-/simpleS_T.h
-/string_valueC.cpp
-/string_valueC.h
-/string_valueC.inl
-/string_valueS.cpp
-/string_valueS.h
-/string_valueS_T.cpp
-/string_valueS_T.h
-/structC.cpp
-/structC.h
-/structC.inl
-/structS.cpp
-/structS.h
-/structS_T.cpp
-/structS_T.h
/TAO_IDL_TEST_stub_export.h
-/typecodeA.cpp
-/typecodeA.h
-/typecodeC.cpp
-/typecodeC.h
-/typecodeC.inl
-/typecodeS.cpp
-/typecodeS.h
-/typecodeS_T.cpp
-/typecodeS_T.h
-/typedefA.cpp
-/typedefA.h
-/typedefC.cpp
-/typedefC.h
-/typedefC.inl
-/typedefS.cpp
-/typedefS.h
-/typedefS_T.cpp
-/typedefS_T.h
-/typeprefixC.cpp
-/typeprefixC.h
-/typeprefixC.inl
-/typeprefixS.cpp
-/typeprefixS.h
-/typeprefixS_T.cpp
-/typeprefixS_T.h
-/unionA.cpp
-/unionC.cpp
-/unionC.h
-/unionC.inl
-/unionS.cpp
-/unionS.h
-/unionS_T.cpp
-/unionS_T.h
-/valuetypeC.cpp
-/valuetypeC.h
-/valuetypeC.inl
-/valuetypeS.cpp
-/valuetypeS.h
-/valuetypeS_T.cpp
-/valuetypeS_T.h
diff --git a/TAO/tests/IDLv4/README.md b/TAO/tests/IDLv4/README.md
new file mode 100644
index 00000000000..442ab7a8666
--- /dev/null
+++ b/TAO/tests/IDLv4/README.md
@@ -0,0 +1,3 @@
+# IDLv4
+
+Tests for IDLv4.x features in tao\_idl.
diff --git a/TAO/tests/IDLv4/TestIDLv4.idl b/TAO/tests/IDLv4/TestIDLv4.idl
new file mode 100644
index 00000000000..d46d65705e7
--- /dev/null
+++ b/TAO/tests/IDLv4/TestIDLv4.idl
@@ -0,0 +1,111 @@
+// IDL v4.2 OMG formal/2018-01-05
+
+// 7.4.13 Building Block Extended Data-Types
+
+// 7.4.13.4.1 Extended Structs
+
+struct StructA {
+ long a;
+};
+
+struct StructB : StructA {
+ long b;
+};
+
+struct StructC : StructB {
+};
+
+// 7.4.13.4.2 Union Discriminators
+
+union UnionWC switch (wchar) {
+ case L'a':
+ long a;
+};
+
+union UnionOC switch (octet) {
+ case 42:
+ long a;
+};
+
+// 7.4.13.4.3.1 Maps
+
+typedef map<long, string> MapType;
+
+typedef map<long, string, 23> MapTypeBounded;
+
+// 7.4.13.4.3.2 Bit Sets
+
+bitset BitSet1 {
+ bitfield<1> bit0;
+ bitfield<1>; // skip bit1
+ bitfield<2, unsigned short> bits2_3;
+};
+
+bitset BitSet2 : BitSet1 {
+ bitfield<3>; // skip bits4-6
+ bitfield<1> bit7;
+};
+
+// 7.4.13.4.3.3 Bit Masks
+
+bitmask BitMask1 {
+ val0, val1, val2, val3
+};
+
+// 7.4.13.4.4 8-bit Integers
+
+typedef int8 ByteSigned;
+typedef uint8 ByteUnsigned;
+
+// 7.4.13.4.5 Alternate Names for Integer Types
+
+typedef int16 ShortSigned;
+typedef int32 LongSigned;
+typedef int64 LongLongSigned;
+typedef uint16 ShortUnsigned;
+typedef uint32 LongUnsigned;
+typedef uint64 LongLongUnsigned;
+
+// 7.4.14 Building Block Anonymous Types
+
+struct TestAnon {
+ sequence<string> a;
+ long b[4];
+};
+
+// 7.4.15 Building Block Annotations
+
+// 7.4.15.4.2 Applying Annotations
+
+@abc
+struct Annotated1 {
+
+ @def(1) octet a;
+ @ghi(2.3) octet b;
+ @jkl('m') octet c;
+ @nop(L'q') octet d;
+ @rst(TRUE) octet e;
+ @uvw("xyz") octet f;
+ @aa(L"bbcc") octet g;
+ @ddee(4 + 5) octet h;
+
+ const double dub = 6.78;
+ @ffgg(dub) octet i;
+
+ @hhii(jj = FALSE) octet j;
+ @kkll(mm = 3, nn = 'oo') octet k;
+};
+
+@bit_bound(8)
+bitmask BitMask2 {
+ @position(1) flag1
+};
+
+// 7.4.15.4.1 Defining Annotations
+// This should be able to be parsed but it will not effect anything except the
+// compiler will produce an warning that defining annotations will be ignored.
+// TODO: Make more cases
+@annotation Annotation1 {
+ short somevalue;
+};
+
diff --git a/TAO/tests/IDLv4/annotations/.gitignore b/TAO/tests/IDLv4/annotations/.gitignore
new file mode 100644
index 00000000000..a51abdaa9bc
--- /dev/null
+++ b/TAO/tests/IDLv4/annotations/.gitignore
@@ -0,0 +1 @@
+/annotest_idl
diff --git a/TAO/tests/IDLv4/annotations/README.md b/TAO/tests/IDLv4/annotations/README.md
new file mode 100644
index 00000000000..6d72e80db1a
--- /dev/null
+++ b/TAO/tests/IDLv4/annotations/README.md
@@ -0,0 +1,5 @@
+# Annotation Test IDL Compiler
+
+This is a instance of the `tao_idl` compiler that doesn't produces any output
+and just verifies annotations can be defined and read by the backend and that
+annotation data is correct. This testing is taking place in `be_init.cpp`.
diff --git a/TAO/tests/IDLv4/annotations/annotest_idl.cpp b/TAO/tests/IDLv4/annotations/annotest_idl.cpp
new file mode 100644
index 00000000000..9c19d4bede6
--- /dev/null
+++ b/TAO/tests/IDLv4/annotations/annotest_idl.cpp
@@ -0,0 +1 @@
+#include "TAO_IDL/tao_idl.cpp"
diff --git a/TAO/tests/IDLv4/annotations/annotest_idl.mpc b/TAO/tests/IDLv4/annotations/annotest_idl.mpc
new file mode 100644
index 00000000000..4f0b53d2071
--- /dev/null
+++ b/TAO/tests/IDLv4/annotations/annotest_idl.mpc
@@ -0,0 +1,6 @@
+project: aceexe {
+ exename = *
+ after += TAO_IDL_FE
+ libs += TAO_IDL_FE
+ includes += . $(TAO_ROOT)/TAO_IDL/include $(TAO_ROOT)/TAO_IDL/fe $(TAO_ROOT)
+}
diff --git a/TAO/tests/IDLv4/annotations/be_extern.h b/TAO/tests/IDLv4/annotations/be_extern.h
new file mode 100644
index 00000000000..4f9fc818dae
--- /dev/null
+++ b/TAO/tests/IDLv4/annotations/be_extern.h
@@ -0,0 +1,16 @@
+#ifndef ANNOTEST_IDL_BE_EXTERN_HEADER
+#define ANNOTEST_IDL_BE_EXTERN_HEADER
+
+#include "be_global.h"
+
+extern BE_GlobalData *be_global;
+
+extern int BE_init(int&, ACE_TCHAR*[]);
+extern void BE_post_init(char*[], long);
+extern void BE_version();
+extern void BE_produce();
+extern void BE_abort();
+extern void BE_cleanup();
+
+#endif
+
diff --git a/TAO/tests/IDLv4/annotations/be_global.cpp b/TAO/tests/IDLv4/annotations/be_global.cpp
new file mode 100644
index 00000000000..6ded8148d59
--- /dev/null
+++ b/TAO/tests/IDLv4/annotations/be_global.cpp
@@ -0,0 +1,38 @@
+#include "be_global.h"
+#include "be_util.h"
+#include "ast_generator.h"
+#include "global_extern.h"
+#include "idl_defines.h"
+#include "utl_err.h"
+#include "utl_string.h"
+
+#include "ace/OS_NS_strings.h"
+#include "ace/OS_NS_sys_stat.h"
+#include "ace/ARGV.h"
+
+BE_GlobalData *be_global = 0;
+
+BE_GlobalData::BE_GlobalData ()
+{
+}
+
+void
+BE_GlobalData::destroy ()
+{
+}
+
+ACE_CString
+BE_GlobalData::spawn_options ()
+{
+ return idl_global->idl_flags ();
+}
+
+void
+BE_GlobalData::parse_args (long &i, char **av)
+{
+ ACE_ERROR ((LM_ERROR,
+ ACE_TEXT ("IDL: I don't understand the '%C' option\n"),
+ av[i]
+ ));
+ idl_global->parse_args_exit (1);
+}
diff --git a/TAO/tests/IDLv4/annotations/be_global.h b/TAO/tests/IDLv4/annotations/be_global.h
new file mode 100644
index 00000000000..3f98e13e94d
--- /dev/null
+++ b/TAO/tests/IDLv4/annotations/be_global.h
@@ -0,0 +1,23 @@
+#ifndef ANNOTEST_IDL_BE_GLOBAL_HEADER
+#define ANNOTEST_IDL_BE_GLOBAL_HEADER
+
+#include "ace/SString.h"
+
+class BE_GlobalData {
+public:
+ BE_GlobalData ();
+
+ void destroy ();
+
+ /**
+ * Spawn Command Line Options
+ */
+ ACE_CString spawn_options ();
+
+ /**
+ * Parse an argument that the frontend did not recognize.
+ */
+ void parse_args (long &i, char **av);
+};
+
+#endif
diff --git a/TAO/tests/IDLv4/annotations/be_init.cpp b/TAO/tests/IDLv4/annotations/be_init.cpp
new file mode 100644
index 00000000000..4c0f555e600
--- /dev/null
+++ b/TAO/tests/IDLv4/annotations/be_init.cpp
@@ -0,0 +1,1230 @@
+#include "tao/Version.h"
+#include "global_extern.h"
+#include "be_extern.h"
+#include "drv_extern.h"
+#include "idl_version.h"
+
+#include "ace/OS_NS_stdlib.h"
+#include "ace/OS_NS_string.h"
+
+#ifndef ACE_LACKS_IOSTREAM_TOTALLY
+# include "ace/streams.h"
+#endif
+
+#include "utl_identifier.h"
+#include "ast_generator.h"
+#include "utl_scope.h"
+#include "fe_declarator.h"
+#include "ast_field.h"
+#include "ast_annotation_decl.h"
+#include "ast_annotation_member.h"
+#include "ast_typedef.h"
+#include "ast_sequence.h"
+#include "ast_union.h"
+#include "ast_enum_val.h"
+#include "utl_string.h"
+#include "ast_array.h"
+
+void
+BE_version ()
+{
+ ACE_DEBUG ((LM_DEBUG,
+ ACE_TEXT ("annotest_idl version ") ACE_TEXT (TAO_VERSION)
+ ACE_TEXT ("\n")));
+}
+
+int
+BE_init (int&, ACE_TCHAR*[])
+{
+ ACE_NEW_RETURN (be_global, BE_GlobalData, -1);
+
+ // Enable Annotations
+ idl_global->default_idl_version_ = IDL_VERSION_4;
+
+ // Disable Trying to Parse File Arguments and creating File Output
+ idl_global->ignore_files_ = true;
+
+ return 0;
+}
+
+/// Test Statistics
+///{
+static unsigned failed_test_count = 0;
+static unsigned total_test_count = 0;
+///}
+
+struct Failed {};
+
+class Annotation_Test {
+public:
+ const char *name_;
+ const char *idl_;
+ bool failed_;
+ int error_count_;
+ UTL_Error::ErrorCode last_error_, last_warning_;
+
+ explicit Annotation_Test (const char *name)
+ : name_ (name),
+ idl_ (0),
+ failed_ (false),
+ error_count_ (0),
+ last_error_ (UTL_Error::EIDL_OK),
+ last_warning_ (UTL_Error::EIDL_OK)
+ {
+ total_test_count++;
+ }
+
+ ~Annotation_Test ()
+ {
+ if (idl_global->err ()->last_error == UTL_Error::EIDL_SYNTAX_ERROR)
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ ACE_TEXT ("Annotation Test: %C: ")
+ ACE_TEXT ("FAILED because of syntax error in:\n%C\n")
+ ACE_TEXT ("Check Syntax Error Message Above For More Infomation\n"),
+ name_, idl_));
+ failed_test_count++;
+ }
+ else if (!failed_)
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ ACE_TEXT ("Annotation Test: %C: PASSED\n"), name_));
+ }
+ }
+
+ void failed (const char * message = 0)
+ {
+ if (message)
+ {
+ ACE_ERROR ((LM_ERROR,
+ ACE_TEXT ("Annotation Test Error: %C: %C\n"),
+ name_, message));
+ }
+ ACE_DEBUG ((LM_DEBUG,
+ ACE_TEXT ("Annotation Test: %C: FAILED\nFailed IDL:\n%C\n"),
+ name_, idl_));
+ failed_test_count++;
+ failed_ = true;
+ throw Failed();
+ }
+
+ Annotation_Test &error_count (int error_count)
+ {
+ error_count_ = error_count;
+ return *this;
+ }
+
+ Annotation_Test &last_error (UTL_Error::ErrorCode last_error)
+ {
+ last_error_ = last_error;
+ return *this;
+ }
+
+ Annotation_Test &last_warning (UTL_Error::ErrorCode last_warning)
+ {
+ last_warning_ = last_warning;
+ return *this;
+ }
+
+ Annotation_Test &run (const char *idl)
+ {
+ // Reset Error State
+ idl_global->set_err_count (0);
+ idl_global->err ()->last_error = UTL_Error::EIDL_OK;
+ idl_global->err ()->last_warning = UTL_Error::EIDL_OK;
+
+ // Eval IDL
+ idl_ = idl;
+ idl_global->eval (idl);
+
+ // Look at Results
+ if (idl_global->err_count () != error_count_)
+ {
+ failed_ = true;
+ ACE_ERROR ((LM_ERROR,
+ ACE_TEXT ("Annotation Test Error: %C:\nError Count: expecting %d, got %d!\n"),
+ name_, error_count_, idl_global->err_count ()));
+ }
+ if (idl_global->err ()->last_error != last_error_)
+ {
+ failed_ = true;
+ ACE_ERROR ((LM_ERROR,
+ ACE_TEXT ("Annotation Test Error: %C:\n")
+ ACE_TEXT ("Last Error Code (UTL_Error::ErrorCode): expecting "),
+ name_));
+ if (last_error_ == UTL_Error::EIDL_OK)
+ {
+ ACE_ERROR ((LM_ERROR, ACE_TEXT ("OK")));
+ }
+ else
+ {
+ ACE_ERROR ((LM_ERROR, ACE_TEXT ("%d"), last_error_));
+ }
+ ACE_ERROR ((LM_ERROR, ACE_TEXT (", got ")));
+ if (idl_global->err ()->last_error == UTL_Error::EIDL_OK)
+ {
+ ACE_ERROR ((LM_ERROR, ACE_TEXT ("OK")));
+ }
+ else
+ {
+ ACE_ERROR ((LM_ERROR, ACE_TEXT ("%d"),
+ idl_global->err ()->last_error));
+ }
+ ACE_ERROR ((LM_ERROR, ACE_TEXT ("!\n")));
+ }
+ if (idl_global->err ()->last_warning != last_warning_)
+ {
+ failed_ = true;
+ ACE_ERROR ((LM_ERROR,
+ ACE_TEXT ("Annotation Test Error: %C:\n")
+ ACE_TEXT ("Last Warning Code (UTL_Error::ErrorCode): expecting "),
+ name_));
+ if (last_warning_ == UTL_Error::EIDL_OK)
+ {
+ ACE_ERROR ((LM_ERROR, ACE_TEXT ("OK")));
+ }
+ else
+ {
+ ACE_ERROR ((LM_ERROR, ACE_TEXT ("%d"), last_warning_));
+ }
+ ACE_ERROR ((LM_ERROR, ACE_TEXT (", got ")));
+ if (idl_global->err ()->last_warning == UTL_Error::EIDL_OK)
+ {
+ ACE_ERROR ((LM_ERROR, ACE_TEXT ("OK")));
+ }
+ else
+ {
+ ACE_ERROR ((LM_ERROR, ACE_TEXT ("%d"),
+ idl_global->err ()->last_warning));
+ }
+ ACE_ERROR ((LM_ERROR, ACE_TEXT ("!\n")));
+ }
+ if (failed_)
+ {
+ failed ();
+ }
+
+ return *this;
+ }
+
+ AST_Decl *assert_node (const char *name, UTL_Scope *from = 0)
+ {
+ AST_Decl *node = 0;
+ UTL_ScopedName *scoped_name = FE_Utils::string_to_scoped_name (name);
+
+ UTL_Scope *scope = from ? from : idl_global->scopes ().bottom ();
+
+ if (scoped_name)
+ {
+ node = scope->lookup_by_name (scoped_name);
+ }
+
+ if (!node)
+ {
+ ACE_ERROR ((LM_ERROR,
+ ACE_TEXT ("Annotation Test Error: %C:\n")
+ ACE_TEXT ("Failed to Find AST Node named %C!\n"),
+ name_, name));
+ failed ();
+ }
+
+ delete scoped_name;
+ return node;
+ }
+
+ AST_Annotation_Decl *assert_annotation_decl (const char *name)
+ {
+ AST_Annotation_Decl *node = dynamic_cast<AST_Annotation_Decl*>(
+ assert_node (name));
+
+ if (node->node_type () != AST_Decl::NT_annotation_decl)
+ {
+ ACE_ERROR ((LM_ERROR,
+ ACE_TEXT ("Annotation Test Error: %C:\n")
+ ACE_TEXT ("AST Node named %C is not an AST_Annotation_Decl!\n"),
+ name_, name));
+ failed ();
+ }
+
+ return node;
+ }
+
+ void assert_annotation_appl_count (
+ AST_Decl *node, size_t count)
+ {
+ AST_Annotation_Appls &annotations = node->annotations ();
+ if (annotations.size () != count)
+ {
+ char *node_name = node->name ()->get_string_copy ();
+ ACE_ERROR ((LM_ERROR,
+ ACE_TEXT ("Annotation Test Error: %C:\n")
+ ACE_TEXT ("asserting %C has %d annotations, but there are %d!\n"),
+ name_, node_name, count, annotations.size ()));
+ delete [] node_name;
+ failed ();
+ }
+ }
+
+ AST_Annotation_Appl *assert_annotation_appl (
+ AST_Decl *node, size_t index, AST_Annotation_Decl *anno_decl)
+ {
+ if (!anno_decl)
+ {
+ ACE_ERROR ((LM_ERROR,
+ ACE_TEXT ("Annotation Test Error: %C:\n")
+ ACE_TEXT ("assert_annotation_appl: annotation decl is null!\n"),
+ name_));
+ failed ();
+ }
+
+ AST_Annotation_Appls &annotations = node->annotations ();
+ if (!annotations.size ())
+ {
+ char *node_name = node->name ()->get_string_copy ();
+ ACE_ERROR ((LM_ERROR,
+ ACE_TEXT ("Annotation Test Error: %C:\n")
+ ACE_TEXT ("can not access %C annotation %d, ")
+ ACE_TEXT ("it has no annotations!\n"),
+ name_, node_name, index));
+ delete [] node_name;
+ failed ();
+ }
+
+ if (index >= annotations.size ())
+ {
+ char *node_name = node->name ()->get_string_copy ();
+ ACE_ERROR ((LM_ERROR,
+ ACE_TEXT ("Annotation Test Error: %C:\n")
+ ACE_TEXT ("can not access %C annotation %d, ")
+ ACE_TEXT ("it only has %d annotation(s)!\n"),
+ name_, node_name, index, annotations.size ()));
+ delete [] node_name;
+ failed ();
+ }
+
+ AST_Annotation_Appl *anno_appl = annotations[index];
+ if (!anno_appl)
+ {
+ char *node_name = node->name ()->get_string_copy ();
+ ACE_ERROR ((LM_ERROR,
+ ACE_TEXT ("Annotation Test Error: %C:\n")
+ ACE_TEXT ("%C annotation %d is null!\n"),
+ name_, node_name, index));
+ delete [] node_name;
+ failed ();
+ }
+ if (anno_appl->annotation_decl () != anno_decl)
+ {
+ char *anno_appl_name = anno_appl->name ()->get_string_copy ();
+ char *anno_decl_name = anno_decl->name ()->get_string_copy ();
+ char *node_name = node->name ()->get_string_copy ();
+ ACE_ERROR ((LM_ERROR,
+ ACE_TEXT ("Annotation Test Error: %C:\n")
+ ACE_TEXT ("%C annotation %d is a %C, looking for a %C!\n"),
+ name_, node_name, index, anno_appl_name, anno_decl_name));
+ delete [] anno_appl_name;
+ delete [] anno_decl_name;
+ delete [] node_name;
+ failed ();
+ }
+
+ return anno_appl;
+ }
+
+ void assert_annotation_member_count (
+ AST_Annotation_Decl *anno_decl, size_t count)
+ {
+ if (!anno_decl)
+ {
+ ACE_ERROR ((LM_ERROR,
+ ACE_TEXT ("Annotation Test Error: %C:\n")
+ ACE_TEXT ("assert_annotation_member_count: annotation decl is null!\n"),
+ name_));
+ failed ();
+ }
+
+ size_t actual_count = anno_decl->member_count ();
+ if (actual_count != count)
+ {
+ char *anno_decl_name = anno_decl->name ()->get_string_copy ();
+ ACE_ERROR ((LM_ERROR,
+ ACE_TEXT ("Annotation Test Error: %C:\n")
+ ACE_TEXT ("%C should have %d members, but it actually has %d!\n"),
+ name_, anno_decl_name, count, actual_count));
+ delete [] anno_decl_name;
+ failed ();
+ }
+ }
+
+ void assert_annotation_member_count (
+ AST_Annotation_Appl *anno_appl, size_t count)
+ {
+ assert_annotation_member_count (
+ dynamic_cast<AST_Annotation_Decl*>(anno_appl), count);
+ }
+
+ AST_Annotation_Member *get_annotation_member (
+ AST_Annotation_Decl *anno_decl, const char *name)
+ {
+ AST_Decl *decl = (*anno_decl)[name];
+ AST_Annotation_Member *member = decl ?
+ AST_Annotation_Member::narrow_from_decl(decl) : 0;
+ if (!member)
+ {
+ ACE_ERROR ((LM_ERROR,
+ ACE_TEXT ("Annotation Test Error: %C:\n")
+ ACE_TEXT ("Could not get annotation member %C!\n"),
+ name_, name));
+ failed ();
+ }
+ return member;
+ }
+
+ AST_Annotation_Member *get_annotation_member (
+ AST_Annotation_Appl *anno_appl, const char *name)
+ {
+ return get_annotation_member(
+ dynamic_cast<AST_Annotation_Decl*>(anno_appl), name);
+ }
+
+ void assert_annotation_member_type (
+ AST_Annotation_Member *member, AST_Expression::ExprType type)
+ {
+ if (member->expr_type () != type)
+ {
+ char *member_name = member->name ()->get_string_copy ();
+ ACE_ERROR ((LM_ERROR,
+ ACE_TEXT ("Annotation Test Error: %C:\n")
+ ACE_TEXT ("For Annotation Member %C, ")
+ ACE_TEXT ("expecting it to be a %C, but it is a %C!\n"),
+ name_, member_name,
+ AST_Expression::exprtype_to_string (type),
+ AST_Expression::exprtype_to_string (member->expr_type ())));
+ delete [] member_name;
+ failed ();
+ }
+ }
+
+ void assert_annotation_member_value (
+ AST_Annotation_Member *member, AST_Expression *expected)
+ {
+ AST_Expression *member_value = member->value ();
+ if (!member_value)
+ {
+ char *member_name = member->name ()->get_string_copy ();
+ ACE_ERROR ((LM_ERROR,
+ ACE_TEXT ("Annotation Test Error: %C:\n")
+ ACE_TEXT ("For Annotation Member %C, ")
+ ACE_TEXT ("expecting it to have a value, but it doesn't!\n"),
+ name_, member_name));
+ delete [] member_name;
+ failed ();
+ }
+
+ if (!expected)
+ {
+ char *member_name = member->name ()->get_string_copy ();
+ ACE_ERROR ((LM_ERROR,
+ ACE_TEXT ("Annotation Test Error: %C:\n")
+ ACE_TEXT ("For Annotation Member %C, ")
+ ACE_TEXT ("expected value is null, can't compare!\n"),
+ name_, member_name));
+ delete [] member_name;
+ failed ();
+ }
+
+ bool equal;
+ if (member_value->ev ()->et == AST_Expression::EV_ulong &&
+ expected->ev ()->et == AST_Expression::EV_ulong)
+ {
+ // For Enums
+ equal = expected->ev()->u.ulval == member_value->ev()->u.ulval;
+ }
+ else
+ {
+ equal = (*expected) == member_value;
+ }
+
+
+ if (!equal)
+ {
+ char *member_name = member->name ()->get_string_copy ();
+ ACE_ERROR ((LM_ERROR,
+ ACE_TEXT ("Annotation Test Error: %C:\n")
+ ACE_TEXT ("For Annotation Member %C, ")
+ ACE_TEXT ("expecting "),
+ name_, member_name));
+ delete [] member_name;
+ expected->dump (*ACE_DEFAULT_LOG_STREAM);
+ ACE_ERROR ((LM_ERROR, ACE_TEXT (", got ")));
+ member_value->dump (*ACE_DEFAULT_LOG_STREAM);
+ ACE_ERROR ((LM_ERROR, ACE_TEXT ("!\n")));
+ failed ();
+ }
+ }
+
+ template <typename T1, typename T2>
+ void assert_annotation_member_value (
+ AST_Annotation_Member *member, T1 expected_value)
+ {
+ AST_Expression expected (static_cast<T2> (expected_value));
+ assert_annotation_member_value (member, &expected);
+ }
+
+ void assert_annotation_member_no_value (AST_Annotation_Member *member)
+ {
+ AST_Expression *member_value = member->value ();
+ if (member_value)
+ {
+ char *member_name = member->name ()->get_string_copy ();
+ ACE_ERROR ((LM_ERROR,
+ ACE_TEXT ("Annotation Test Error: %C:\n")
+ ACE_TEXT ("For Annotation Member %C, ")
+ ACE_TEXT ("expecting it to not have a value, but it does!\n"),
+ name_, member_name));
+ delete [] member_name;
+ failed ();
+ }
+ }
+};
+
+void
+BE_post_init (char *[], long)
+{
+ /*
+ * Notes About These Tests
+ * =========================================================================
+ *
+ * - They are in the same IDL namespace, so they can conflict with each
+ * other.
+ *
+ * - You can't test for a syntax error really because tao_idl throws an
+ * exception for them. Even if the exception was caught, the AST might be
+ * in an invalid state afterwards.
+ *
+ * - Annotations local names internally start with @ so that they don't
+ * conflict with other non-annotation names. See below for examples.
+ *
+ * - Some of these tests intentionally cause errors.
+ */
+
+ /* -------------------------------------------------------------------------
+ * Annotations Declarations
+ * -------------------------------------------------------------------------
+ * These tests assert that annotations can be declared.
+ */
+
+ AST_Annotation_Decl *test_annotation_1 = 0;
+ try {
+ Annotation_Test t("Annotation Declaration with No Members");
+ test_annotation_1 = t.run (
+ "@annotation test_annotation_1 {\n"
+ "};\n"
+ ).assert_annotation_decl ("::@test_annotation_1");
+ t.assert_annotation_member_count (test_annotation_1, 0);
+ } catch (Failed &f) {}
+
+ try {
+ Annotation_Test t("Annotation Declaration with Members");
+ AST_Annotation_Decl *test_annotation_2 = t.run (
+ "@annotation test_annotation_2 {\n"
+ " short short_value;\n"
+ " char char_value;\n"
+ " long long_value;\n"
+ " boolean boolean_value;\n"
+ "};\n"
+ ).assert_annotation_decl ("::@test_annotation_2");
+ t.assert_annotation_member_count (test_annotation_2, 4);
+
+ AST_Annotation_Member *short_value =
+ t.get_annotation_member (test_annotation_2, "short_value");
+ t.assert_annotation_member_type (short_value, AST_Expression::EV_short);
+ t.assert_annotation_member_no_value (short_value);
+
+ AST_Annotation_Member *char_value =
+ t.get_annotation_member (test_annotation_2, "char_value");
+ t.assert_annotation_member_type (char_value, AST_Expression::EV_char);
+ t.assert_annotation_member_no_value (char_value);
+
+ AST_Annotation_Member *long_value =
+ t.get_annotation_member (test_annotation_2, "long_value");
+ t.assert_annotation_member_type (long_value, AST_Expression::EV_long);
+ t.assert_annotation_member_no_value (long_value);
+
+ AST_Annotation_Member *boolean_value =
+ t.get_annotation_member (test_annotation_2, "boolean_value");
+ t.assert_annotation_member_type (boolean_value, AST_Expression::EV_bool);
+ t.assert_annotation_member_no_value (boolean_value);
+ } catch (Failed &f) {}
+
+ try {
+ Annotation_Test t("Annotation Declaration with Defaulted Members");
+ AST_Annotation_Decl *test_annotation_3 = t.run (
+ "@annotation test_annotation_3 {\n"
+ " short short_value default 1;\n"
+ " char char_value default '&';\n"
+ " long long_value default -1;\n"
+ " boolean boolean_value default FALSE;\n"
+ "};\n"
+ ).assert_annotation_decl ("::@test_annotation_3");
+ t.assert_annotation_member_count (test_annotation_3, 4);
+
+ AST_Annotation_Member *short_value =
+ t.get_annotation_member (test_annotation_3, "short_value");
+ t.assert_annotation_member_type (short_value, AST_Expression::EV_short);
+ t.assert_annotation_member_value<short, ACE_CDR::Short> (short_value, 1);
+
+ AST_Annotation_Member *char_value =
+ t.get_annotation_member (test_annotation_3, "char_value");
+ t.assert_annotation_member_type (char_value, AST_Expression::EV_char);
+ t.assert_annotation_member_value<char, ACE_CDR::Char> (char_value, '&');
+
+ AST_Annotation_Member *long_value =
+ t.get_annotation_member (test_annotation_3, "long_value");
+ t.assert_annotation_member_type (long_value, AST_Expression::EV_long);
+ t.assert_annotation_member_value<int, ACE_CDR::Long> (long_value, -1);
+
+ AST_Annotation_Member *boolean_value =
+ t.get_annotation_member (test_annotation_3, "boolean_value");
+ t.assert_annotation_member_type (boolean_value, AST_Expression::EV_bool);
+ t.assert_annotation_member_value<bool, ACE_CDR::Boolean> (boolean_value, false);
+ } catch (Failed &f) {}
+
+ AST_Annotation_Decl *test_annotation_4 = 0;
+ try {
+ Annotation_Test t("Annotation Declaration with Mixed Members");
+ test_annotation_4 = t.run (
+ "@annotation test_annotation_4 {\n"
+ " short x;\n"
+ " short y default 0;\n"
+ "};\n"
+ ).assert_annotation_decl ("::@test_annotation_4");
+ t.assert_annotation_member_count (test_annotation_4, 2);
+
+ AST_Annotation_Member *x =
+ t.get_annotation_member (test_annotation_4, "x");
+ t.assert_annotation_member_type (x, AST_Expression::EV_short);
+ t.assert_annotation_member_no_value (x);
+
+ AST_Annotation_Member *y =
+ t.get_annotation_member (test_annotation_4, "y");
+ t.assert_annotation_member_type (y, AST_Expression::EV_short);
+ t.assert_annotation_member_value<short, ACE_CDR::Short> (y, 0);
+ } catch (Failed &f) {}
+
+ AST_Annotation_Decl *test_annotation_in_module = 0;
+ try {
+ Annotation_Test t("Annotation Declaration In Module");
+ test_annotation_in_module = t.run (
+ "module module_with_annotation_decl {\n"
+ " @annotation test_annotation {\n"
+ " };\n"
+ "};\n"
+ ).assert_annotation_decl (
+ "::module_with_annotation_decl::@test_annotation");
+ t.assert_annotation_member_count (test_annotation_in_module, 0);
+ } catch (Failed &f) {}
+
+ AST_Annotation_Decl *enum_annotation = 0;
+ AST_Expression *enum_annotation_a = 0;
+ AST_Expression *enum_annotation_b = 0;
+ AST_Expression *enum_annotation_c = 0;
+ try {
+ Annotation_Test t("Annotation Declaration with Enum");
+ enum_annotation = t.run (
+ "@annotation enum_annotation {\n"
+ " enum Enum_t {\n"
+ " A,\n"
+ " B,\n"
+ " C\n"
+ " };\n"
+ " Enum_t value default A;\n"
+ "};\n"
+ ).assert_annotation_decl ("@enum_annotation");
+ t.assert_annotation_member_count (enum_annotation, 1);
+ UTL_Scope *scope = dynamic_cast<UTL_Scope*>(enum_annotation);
+ AST_Annotation_Member *value =
+ t.get_annotation_member (enum_annotation, "value");
+
+ AST_EnumVal *a = AST_EnumVal::narrow_from_decl(
+ t.assert_node ("A", scope));
+ enum_annotation_a = a->constant_value();
+
+ AST_EnumVal *b = AST_EnumVal::narrow_from_decl(
+ t.assert_node ("B", scope));
+ enum_annotation_b = b->constant_value();
+
+ AST_EnumVal *c = AST_EnumVal::narrow_from_decl(
+ t.assert_node ("C", scope));
+ enum_annotation_c = c->constant_value();
+
+ t.assert_annotation_member_value (value, enum_annotation_a);
+ } catch (Failed &f) {}
+
+ AST_Annotation_Decl *string_annotation = 0;
+ try {
+ Annotation_Test t("Annotation Declaration with String");
+ string_annotation = t.run (
+ "@annotation string_annotation {\n"
+ " string value default \"This is some text\";\n"
+ "};\n"
+ ).assert_annotation_decl ("@string_annotation");
+ t.assert_annotation_member_count (string_annotation, 1);
+ AST_Annotation_Member *value =
+ t.get_annotation_member (string_annotation, "value");
+
+ UTL_String test_string("This is some text");
+ t.assert_annotation_member_value<UTL_String*, UTL_String*>
+ (value, &test_string);
+ } catch (Failed &f) {}
+
+ AST_Expression *constant_annotation_x = 0;
+ AST_Expression *constant_annotation_y = 0;
+ AST_Annotation_Decl *constant_annotation = 0;
+ try {
+ Annotation_Test t("Annotation Declaration with Constant");
+ constant_annotation = t.run (
+ "@annotation constant_annotation {\n"
+ " const short X = 4;\n"
+ " const short Y = 5;\n"
+ " short value default X;\n"
+ "};\n"
+ ).assert_annotation_decl ("@constant_annotation");
+ t.assert_annotation_member_count (constant_annotation, 1);
+ UTL_Scope *scope = dynamic_cast<UTL_Scope*>(constant_annotation);
+ AST_Annotation_Member *value =
+ t.get_annotation_member (constant_annotation, "value");
+
+ AST_Constant *x = AST_Constant::narrow_from_decl(
+ t.assert_node ("X", scope));
+ constant_annotation_x = x->constant_value();
+
+ AST_Constant *y = AST_Constant::narrow_from_decl(
+ t.assert_node ("Y", scope));
+ constant_annotation_y = y->constant_value();
+
+ t.assert_annotation_member_value (value, constant_annotation_x);
+ } catch (Failed &f) {}
+
+ /* -------------------------------------------------------------------------
+ * Annotations Applications
+ * -------------------------------------------------------------------------
+ * These tests assert that annotations can be applied to various IDL
+ * constructs.
+ */
+
+ try {
+ Annotation_Test t("Module Annotation Application");
+ AST_Decl *module1 = t.run (
+ "@test_annotation_1\n"
+ "module module1 {\n"
+ " struct struct_in_module1 {\n"
+ " short member;\n"
+ " };\n"
+ "};\n"
+ ).assert_node ("::module1");
+ t.assert_annotation_appl_count (module1, 1);
+ t.assert_annotation_appl (module1, 0, test_annotation_1);
+ } catch (Failed &f) {}
+
+ try {
+ Annotation_Test t("Struct Annotation Application");
+ AST_Decl *struct1 = t.run (
+ "@test_annotation_1\n"
+ "struct struct1 {\n"
+ " short member;\n"
+ "};\n"
+ ).assert_node ("::struct1");
+ t.assert_annotation_appl_count (struct1, 1);
+ t.assert_annotation_appl (struct1, 0, test_annotation_1);
+ } catch (Failed &f) {}
+
+ try {
+ Annotation_Test t("Typedef Annotation Application");
+ t.run (
+ "@enum_annotation\n"
+ "typedef short short_int;\n"
+ "@string_annotation\n"
+ "typedef short_int small_int;\n"
+ "@test_annotation_1\n"
+ "typedef small_int i16;\n"
+ "struct struct6 {\n"
+ " i16 member;\n"
+ "};\n"
+ );
+
+ // Assert short_int has enum_annotation
+ AST_Decl *short_int = t.assert_node ("short_int");
+ t.assert_annotation_appl_count (short_int, 1);
+ t.assert_annotation_appl (short_int, 0, enum_annotation);
+
+ // Get type of member
+ AST_Decl *member_decl = t.assert_node ("struct6::member");
+ AST_Field *member = AST_Field::narrow_from_decl (member_decl);
+ if (!member)
+ {
+ t.failed ("Could Not Get member");
+ }
+ AST_Decl* type = dynamic_cast<AST_Decl*> (member->field_type ());
+
+ // Assert type has enum_annotation, string_annotation, and
+ // test_annotation_1.
+ t.assert_annotation_appl_count (type, 3);
+ t.assert_annotation_appl (type, 0, enum_annotation);
+ t.assert_annotation_appl (type, 1, string_annotation);
+ t.assert_annotation_appl (type, 2, test_annotation_1);
+ } catch (Failed &f) {}
+
+ try {
+ Annotation_Test t("Sequence Type Parameter Annotation Application");
+ AST_Decl *value_decl = t.run (
+ "typedef sequence<@test_annotation_1 short, 5> test_seq_t;\n"
+ "struct struct7 {\n"
+ " test_seq_t value;\n"
+ "};\n"
+ ).assert_node ("::struct7::value");
+
+ // Get Sequence
+ AST_Field *value = AST_Field::narrow_from_decl (value_decl);
+ if (!value)
+ {
+ t.failed (
+ "Could Not Convert struct7::value from AST_Decl into AST_Field");
+ }
+ AST_Typedef *typedef_node =
+ dynamic_cast<AST_Typedef*> (value->field_type ());
+ if (!typedef_node)
+ {
+ t.failed (
+ "Could Not Convert test_seq_t from AST_Decl into AST_Typedef");
+ }
+ AST_Decl *seq_decl = dynamic_cast<AST_Decl*>(typedef_node->base_type ());
+ AST_Sequence *seq = AST_Sequence::narrow_from_decl (seq_decl);
+ if (!seq)
+ {
+ t.failed (
+ "Could Not Convert test_seq_t from AST_Typedef in AST_Sequence");
+ }
+
+ // Verify Annotation on Base Type
+ AST_Annotation_Appls *annotations = seq->base_type_annotations ();
+ if (!annotations)
+ {
+ t.failed ("base_type_annotations() for test_seq_t returned null!");
+ }
+ size_t count = annotations->size ();
+ if (count != 1)
+ {
+ ACE_ERROR ((LM_ERROR, ACE_TEXT ("Annotation Test Error: %C:\n")
+ ACE_TEXT ("expected one annotation on test_seq_t base type, ")
+ ACE_TEXT ("it has %d annotations!\n"),
+ t.name_, count));
+ t.failed ();
+ }
+ AST_Annotation_Appl *annotation = (*annotations)[0];
+ if (!annotation)
+ {
+ t.failed ("annotation for test_seq_t base type is null!");
+ }
+ if (annotation->annotation_decl () != test_annotation_1)
+ {
+ UTL_ScopedName *scopedname = annotation->name ();
+ const char *name = scopedname ?
+ scopedname-> get_string_copy () : "UNKNOWN";
+ ACE_ERROR ((LM_ERROR, ACE_TEXT ("Annotation Test Error: %C:\n")
+ ACE_TEXT ("expected annotation for test_seq_t base type to be ")
+ ACE_TEXT ("test_annotation_1, but it was %C\n"),
+ t.name_, name));
+ if (scopedname)
+ {
+ delete [] name;
+ }
+ t.failed ();
+ }
+ } catch (Failed &f) {}
+
+ try {
+ Annotation_Test t("Constant Declarations Annotation Application");
+ AST_Decl *test_const = t.run (
+ "@test_annotation_1\n"
+ "const short test_const = 5;\n"
+ ).assert_node ("test_const");
+ t.assert_annotation_appl_count (test_const, 1);
+ t.assert_annotation_appl (test_const, 0, test_annotation_1);
+ } catch (Failed &f) {}
+
+ try {
+ Annotation_Test t("Multiple Annotation Applications");
+ AST_Decl *struct3 = t.run (
+ "@test_annotation_1\n"
+ "@test_annotation_1\n"
+ "struct struct3 {\n"
+ " short test_member_1;\n"
+ "};\n"
+ ).assert_node ("struct3");
+ t.assert_annotation_appl_count (struct3, 2);
+ t.assert_annotation_appl (struct3, 0, test_annotation_1);
+ t.assert_annotation_appl (struct3, 1, test_annotation_1);
+ } catch (Failed &f) {}
+
+ try {
+ Annotation_Test t("Annotation Application with a Single Parameter");
+ AST_Decl *struct4 = t.run (
+ "@test_annotation_4 (100)\n"
+ "struct struct4 {\n"
+ " short test_member_1;\n"
+ "};\n"
+ ).assert_node ("struct4");
+ t.assert_annotation_appl_count (struct4, 1);
+ AST_Annotation_Appl *appl =
+ t.assert_annotation_appl (struct4, 0, test_annotation_4);
+ t.assert_annotation_member_count (appl, 2);
+
+ AST_Annotation_Member *x = t.get_annotation_member (appl, "x");
+ t.assert_annotation_member_value<short, ACE_CDR::Short> (x, 100);
+
+ AST_Annotation_Member *y = t.get_annotation_member (appl, "y");
+ t.assert_annotation_member_value<short, ACE_CDR::Short> (y, 0);
+ } catch (Failed &f) {}
+
+ try {
+ Annotation_Test t("Annotation Application with Named Parameters");
+ AST_Decl *struct2 = t.run (
+ "@test_annotation_4 (x = 101, y = 102)\n"
+ "struct struct2 {\n"
+ " short test_member_1;\n"
+ "};\n"
+ ).assert_node ("struct2");
+ t.assert_annotation_appl_count (struct2, 1);
+ AST_Annotation_Appl *appl =
+ t.assert_annotation_appl (struct2, 0, test_annotation_4);
+ t.assert_annotation_member_count (appl, 2);
+
+ AST_Annotation_Member *x = t.get_annotation_member (appl, "x");
+ t.assert_annotation_member_value<short, ACE_CDR::Short> (x, 101);
+
+ AST_Annotation_Member *y = t.get_annotation_member (appl, "y");
+ t.assert_annotation_member_value<short, ACE_CDR::Short> (y, 102);
+ } catch (Failed &f) {}
+
+ try {
+ Annotation_Test t("Annotation Applications with Scoped Names");
+ AST_Decl *struct5 = t.run (
+ "@module_with_annotation_decl::test_annotation\n"
+ "@::module_with_annotation_decl::test_annotation\n"
+ "struct struct5 {\n"
+ " short test_member_1;\n"
+ "};\n"
+ ).assert_node ("struct5");
+ t.assert_annotation_appl_count (struct5, 2);
+ t.assert_annotation_appl (struct5, 0, test_annotation_in_module);
+ t.assert_annotation_appl (struct5, 1, test_annotation_in_module);
+ } catch (Failed &f) {}
+
+ try {
+ Annotation_Test t("Annotation Applications on/in Unions");
+ AST_Decl *test_union_decl = t.run (
+ /* Annotations on the union and the discriminator */
+ "@test_annotation_1\n"
+ "union test_union switch (@test_annotation_1 short) {\n"
+ "case 0:\n"
+ "case 1:\n"
+ /* Annotation on a Union Member */
+ " @test_annotation_1 short union_member_1;\n"
+ "default:\n"
+ " short union_member_2;\n"
+ "};\n"
+ ).assert_node ("test_union");
+ AST_Union *test_union = AST_Union::narrow_from_decl (test_union_decl);
+ if (!test_union)
+ {
+ t.failed ("failed to get test_union!");
+ }
+
+ // Annotation On Union
+ t.assert_annotation_appl_count (test_union_decl, 1);
+ t.assert_annotation_appl (test_union_decl, 0, test_annotation_1);
+
+ // Annotation On Discriminator
+ AST_Annotation_Appls *annotations = test_union->disc_annotations ();
+ if (!annotations)
+ {
+ t.failed ("test_union discriminator annotations is null!");
+ }
+ size_t count = annotations->size ();
+ if (count != 1)
+ {
+ ACE_ERROR ((LM_ERROR, ACE_TEXT ("Annotation Test Error: %C:\n")
+ ACE_TEXT ("expected one annotation on test_union discriminator, ")
+ ACE_TEXT ("it has %d annotations!\n"),
+ t.name_, count));
+ t.failed ();
+ }
+ AST_Annotation_Appl *annotation = (*annotations)[0];
+ if (!annotation)
+ {
+ t.failed ("annotation for test_seq_t base type is null!");
+ }
+ if (annotation->annotation_decl () != test_annotation_1)
+ {
+ UTL_ScopedName *scopedname = annotation->name ();
+ const char *name = scopedname ?
+ scopedname-> get_string_copy () : "UNKNOWN";
+ ACE_ERROR ((LM_ERROR, ACE_TEXT ("Annotation Test Error: %C:\n")
+ ACE_TEXT ("expected annotation for test_union discriminator to be ")
+ ACE_TEXT ("test_annotation_1, but it was %C\n"),
+ t.name_, name));
+ if (scopedname)
+ {
+ delete [] name;
+ }
+ t.failed ();
+ }
+
+ // Annotation on Union Member
+ AST_Decl *union_member_1 =
+ t.assert_node ("test_union::union_member_1");
+ t.assert_annotation_appl_count (union_member_1, 1);
+ t.assert_annotation_appl (union_member_1, 0, test_annotation_1);
+ } catch (Failed &f) {}
+
+ try {
+ Annotation_Test t("Annotation Applications on/in Enums");
+ AST_Decl *Test_Enum = t.run (
+ /* Annotation on the enum */
+ "@test_annotation_1\n"
+ "enum Test_Enum {\n"
+ " TEST_ENUM_MEMBER_1,\n"
+ /* Annotation on a enumerator */
+ " @test_annotation_1 TEST_ENUM_MEMBER_2,\n"
+ " TEST_ENUM_MEMBER_3\n"
+ "};\n"
+ ).assert_node ("Test_Enum");
+
+ // Annotation on Enum
+ t.assert_annotation_appl_count (Test_Enum, 1);
+ t.assert_annotation_appl (Test_Enum, 0, test_annotation_1);
+
+ // Annotation on Enum Member
+ AST_Decl *TEST_ENUM_MEMBER_2 =
+ t.assert_node ("Test_Enum::TEST_ENUM_MEMBER_2");
+ t.assert_annotation_appl_count (TEST_ENUM_MEMBER_2, 1);
+ t.assert_annotation_appl (TEST_ENUM_MEMBER_2, 0, test_annotation_1);
+ } catch (Failed &f) {}
+
+ try {
+ Annotation_Test t("By Default, Unknown Annotation Application Causes Warning");
+ t.last_warning (UTL_Error::EIDL_LOOKUP_ERROR);
+ t.run (
+ "struct struct11 {\n"
+ " @fake_annotation(fake_param=FAKE_CONSTANT)\n"
+ " short member;\n"
+ "};\n"
+ );
+ } catch (Failed &f) {}
+
+ try {
+ idl_global->unknown_annotations_ =
+ IDL_GlobalData::UNKNOWN_ANNOTATIONS_ERROR;
+ Annotation_Test t("Optionally, Unknown Annotation Application Causes Error");
+ t.last_error (UTL_Error::EIDL_LOOKUP_ERROR).error_count (1);
+ t.run (
+ "struct struct10 {\n"
+ " @fake_annotation(fake_param=FAKE_CONSTANT)\n"
+ " short member;\n"
+ "};\n"
+ );
+ // Restore Default Behaivor
+ idl_global->unknown_annotations_ =
+ IDL_GlobalData::UNKNOWN_ANNOTATIONS_WARN_ONCE;
+ } catch (Failed &f) {}
+
+ try {
+ Annotation_Test t("Annotation Application with Enum");
+ AST_Decl *value = t.run (
+ "struct struct8 {\n"
+ " @enum_annotation\n" // A
+ " @enum_annotation(B)\n"
+ " @enum_annotation(value=C)\n"
+ " short value;\n"
+ "};\n"
+ ).assert_node ("struct8::value");
+ t.assert_annotation_appl_count (value, 3);
+ AST_Annotation_Member *member;
+
+ AST_Annotation_Appl *first =
+ t.assert_annotation_appl (value, 0, enum_annotation);
+ member = t.get_annotation_member (first, "value");
+ t.assert_annotation_member_value (member, enum_annotation_a);
+
+ AST_Annotation_Appl *second =
+ t.assert_annotation_appl (value, 1, enum_annotation);
+ member = t.get_annotation_member (second, "value");
+ t.assert_annotation_member_value (member, enum_annotation_b);
+
+ AST_Annotation_Appl *third =
+ t.assert_annotation_appl (value, 2, enum_annotation);
+ member = t.get_annotation_member (third, "value");
+ t.assert_annotation_member_value (member, enum_annotation_c);
+ } catch (Failed &f) {}
+
+ try {
+ Annotation_Test t("Annotation Application with String");
+ AST_Decl *value = t.run (
+ "struct struct9 {\n"
+ " @string_annotation\n" // A
+ " @string_annotation(\"Something else\")\n"
+ " @string_annotation(value=\"One last thing\")\n"
+ " short value;\n"
+ "};\n"
+ ).assert_node ("struct9::value");
+ t.assert_annotation_appl_count (value, 3);
+ AST_Annotation_Member *member;
+ AST_Annotation_Appl *annotation;
+
+ UTL_String first_string("This is some text");
+ annotation = t.assert_annotation_appl (value, 0, string_annotation);
+ member = t.get_annotation_member (annotation, "value");
+ t.assert_annotation_member_value <UTL_String*, UTL_String*>
+ (member, &first_string);
+
+ UTL_String second_string("Something else");
+ annotation = t.assert_annotation_appl (value, 1, string_annotation);
+ member = t.get_annotation_member (annotation, "value");
+ t.assert_annotation_member_value <UTL_String*, UTL_String*>
+ (member, &second_string);
+
+ UTL_String third_string("One last thing");
+ annotation = t.assert_annotation_appl (value, 2, string_annotation);
+ member = t.get_annotation_member (annotation, "value");
+ t.assert_annotation_member_value <UTL_String*, UTL_String*>
+ (member, &third_string);
+ } catch (Failed &f) {}
+
+ try {
+ Annotation_Test t("Annotation Application with Constant");
+ AST_Decl *value = t.run (
+ "struct struct12 {\n"
+ " @constant_annotation\n" // A
+ " @constant_annotation(Y)\n"
+ " @constant_annotation(100)\n"
+ " short value;\n"
+ "};\n"
+ ).assert_node ("struct12::value");
+ t.assert_annotation_appl_count (value, 3);
+ AST_Annotation_Member *member;
+ AST_Annotation_Appl *annotation;
+
+ annotation = t.assert_annotation_appl (value, 0, constant_annotation);
+ member = t.get_annotation_member (annotation, "value");
+ t.assert_annotation_member_value (member, constant_annotation_x);
+
+ annotation = t.assert_annotation_appl (value, 1, constant_annotation);
+ member = t.get_annotation_member (annotation, "value");
+ t.assert_annotation_member_value (member, constant_annotation_y);
+
+ annotation = t.assert_annotation_appl (value, 2, constant_annotation);
+ member = t.get_annotation_member (annotation, "value");
+ t.assert_annotation_member_value<short, ACE_CDR::Short> (member, 100);
+ } catch (Failed &f) {}
+
+ try {
+ Annotation_Test t("Annotate Array Base Type");
+ AST_Typedef *thetypedef = AST_Typedef::narrow_from_decl (t.run (
+ "typedef struct12 struct12Array @test_annotation_1 [12];\n"
+ ).assert_node ("::struct12Array"));
+ AST_Array *struct12Array =
+ dynamic_cast<AST_Array*> (thetypedef->base_type ());
+
+ // Verify Annotation on Base Type
+ AST_Annotation_Appls *annotations =
+ struct12Array->base_type_annotations ();
+ if (!annotations)
+ {
+ t.failed ("base_type_annotations() for struct12Array returned null!");
+ }
+ size_t count = annotations->size ();
+ if (count != 1)
+ {
+ ACE_ERROR ((LM_ERROR, ACE_TEXT ("Annotation Test Error: %C:\n")
+ ACE_TEXT ("expected one annotation on struct12Array base type, ")
+ ACE_TEXT ("it has %d annotations!\n"),
+ t.name_, count));
+ t.failed ();
+ }
+ AST_Annotation_Appl *annotation = (*annotations)[0];
+ if (!annotation)
+ {
+ t.failed ("annotation for struct12Array base type is null!");
+ }
+ if (annotation->annotation_decl () != test_annotation_1)
+ {
+ UTL_ScopedName *scopedname = annotation->name ();
+ const char *name = scopedname ?
+ scopedname-> get_string_copy () : "UNKNOWN";
+ ACE_ERROR ((LM_ERROR, ACE_TEXT ("Annotation Test Error: %C:\n")
+ ACE_TEXT ("expected annotation for struct12Array base type to be ")
+ ACE_TEXT ("test_annotation_1, but it was %C\n"),
+ t.name_, name));
+ if (scopedname)
+ {
+ delete [] name;
+ }
+ t.failed ();
+ }
+ } catch (Failed &f) {}
+
+ /* -------------------------------------------------------------------------
+ * Annotation Names
+ * -------------------------------------------------------------------------
+ * These tests assert various aspects of how annotations work in regards to
+ * naming.
+ */
+
+ try {
+ Annotation_Test t("Annotation and Non-Annotation Names Can't Clash");
+ t.run (
+ "@annotation samename {\n"
+ "};\n"
+ "struct samename {\n"
+ " short member;\n"
+ "};"
+ );
+ } catch (Failed &f) {}
+
+ try {
+ Annotation_Test t("Annotation Names Can't Be \"annotation\"");
+ t.last_error (UTL_Error::EIDL_MISC).error_count (1);
+ t.run (
+ "@annotation annotation {\n"
+ "};\n"
+ );
+ } catch (Failed &f) {}
+
+ try {
+ Annotation_Test t("Annotation Names Can Start with \"annotation\"");
+ t.run (
+ "@annotation annotationannotation {\n"
+ "};\n"
+ "@annotationannotation\n"
+ "struct annotationannotation_struct {\n"
+ " short member;\n"
+ "};\n"
+ ).assert_annotation_decl ("::@annotationannotation");
+ } catch (Failed &f) {}
+
+ // Done, Print Overall Results
+ if (failed_test_count)
+ {
+ ACE_ERROR ((LM_ERROR,
+ ACE_TEXT ("Annotation Test: %d out of %d subtests failed!\n"),
+ failed_test_count, total_test_count));
+ }
+ else
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ ACE_TEXT ("Annotation Test: All %d subtests passed\n"),
+ total_test_count));
+ }
+ idl_global->set_err_count (failed_test_count);
+}
diff --git a/TAO/tests/IDLv4/annotations/be_produce.cpp b/TAO/tests/IDLv4/annotations/be_produce.cpp
new file mode 100644
index 00000000000..fc34f55a20a
--- /dev/null
+++ b/TAO/tests/IDLv4/annotations/be_produce.cpp
@@ -0,0 +1,21 @@
+#include "global_extern.h"
+#include "be_extern.h"
+
+void
+BE_cleanup ()
+{
+ idl_global->destroy();
+}
+
+void
+BE_abort ()
+{
+ ACE_ERROR ((LM_ERROR, ACE_TEXT ("Fatal Error - Aborting\n")));
+ BE_cleanup ();
+ ACE_OS::exit (1);
+}
+
+void
+BE_produce()
+{
+}
diff --git a/TAO/tests/IDLv4/annotations/be_util.cpp b/TAO/tests/IDLv4/annotations/be_util.cpp
new file mode 100644
index 00000000000..02ae81c5de1
--- /dev/null
+++ b/TAO/tests/IDLv4/annotations/be_util.cpp
@@ -0,0 +1,29 @@
+#include "be_util.h"
+#include "be_extern.h"
+
+#include "ast_generator.h"
+
+#include "ace/OS_NS_strings.h"
+
+void
+be_util::prep_be_arg (char * /*arg*/)
+{
+}
+
+void
+be_util::arg_post_proc ()
+{
+}
+
+void
+be_util::usage ()
+{
+}
+
+AST_Generator *
+be_util::generator_init ()
+{
+ AST_Generator *gen = 0;
+ ACE_NEW_RETURN(gen, AST_Generator, 0);
+ return gen;
+}
diff --git a/TAO/tests/IDLv4/annotations/be_util.h b/TAO/tests/IDLv4/annotations/be_util.h
new file mode 100644
index 00000000000..001cdffddee
--- /dev/null
+++ b/TAO/tests/IDLv4/annotations/be_util.h
@@ -0,0 +1,25 @@
+#ifndef ANNOTEST_IDL_BE_UTIL_HEADER
+#define ANNOTEST_IDL_BE_UTIL_HEADER
+
+class TAO_OutStream;
+class be_module;
+class AST_Decl;
+class AST_Generator;
+
+class be_util
+{
+public:
+ /// Special BE arg call factored out of DRV_args.
+ static void prep_be_arg (char *s);
+
+ /// Checks made after parsing args.
+ static void arg_post_proc ();
+
+ /// Display usage of BE-specific options.
+ static void usage ();
+
+ /// Create an AST node generator.
+ static AST_Generator *generator_init ();
+};
+
+#endif
diff --git a/TAO/tests/IDLv4/annotations/drv_args.cpp b/TAO/tests/IDLv4/annotations/drv_args.cpp
new file mode 100644
index 00000000000..6e6175034d7
--- /dev/null
+++ b/TAO/tests/IDLv4/annotations/drv_args.cpp
@@ -0,0 +1 @@
+#include "TAO_IDL/driver/drv_args.cpp"
diff --git a/TAO/tests/IDLv4/annotations/drv_prepoc.cpp b/TAO/tests/IDLv4/annotations/drv_prepoc.cpp
new file mode 100644
index 00000000000..9a6127d4355
--- /dev/null
+++ b/TAO/tests/IDLv4/annotations/drv_prepoc.cpp
@@ -0,0 +1 @@
+#include "TAO_IDL/driver/drv_preproc.cpp"
diff --git a/TAO/tests/IDLv4/annotations/run_test.pl b/TAO/tests/IDLv4/annotations/run_test.pl
new file mode 100755
index 00000000000..a1cad7ce3c7
--- /dev/null
+++ b/TAO/tests/IDLv4/annotations/run_test.pl
@@ -0,0 +1,31 @@
+eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
+ & eval 'exec perl -S $0 $argv:q'
+ if 0;
+
+use strict;
+use Env (ACE_ROOT);
+use lib "$ACE_ROOT/bin";
+use PerlACE::Run_Test
+
+my $status = 0;
+
+my $annotest_idl = PerlDDS::create_process ("annotest_idl", "");
+print $annotest_idl->CommandLine ();
+$annotest_idl->Spawn ();
+my $annotest_idl_result = $annotest_idl->WaitKill (10);
+if ($annotest_idl_result > 0)
+ {
+ print STDERR "ERROR: annotest_idl returned $annotest_idl_result\n";
+ }
+$status = 1 if $annotest_idl_result;
+
+if ($status)
+ {
+ print STDERR "test FAILED";
+ }
+else
+ {
+ print "test PASSED";
+ }
+
+exit $status