summaryrefslogtreecommitdiff
path: root/TAO/TAO_IDL/fe
diff options
context:
space:
mode:
authorparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2001-12-31 17:34:56 +0000
committerparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2001-12-31 17:34:56 +0000
commit941741da484ba50c4577fc53e9be6eea300fa2a5 (patch)
tree6ed27dc6a4b35eca1e746e6fc13ba844b6d390f6 /TAO/TAO_IDL/fe
parent0e20a37f9509ca5f382c0f7bc8306de6e3949fed (diff)
downloadATCD-941741da484ba50c4577fc53e9be6eea300fa2a5.tar.gz
ChangeLogTag: Mon Dec 31 11:01:29 2001 Jeff Parsons <parsons@cs.wustl.edu>
Diffstat (limited to 'TAO/TAO_IDL/fe')
-rw-r--r--TAO/TAO_IDL/fe/Makefile.am1
-rw-r--r--TAO/TAO_IDL/fe/fe_declarator.cpp139
-rw-r--r--TAO/TAO_IDL/fe/fe_init.cpp154
-rw-r--r--TAO/TAO_IDL/fe/fe_tmplinst.cpp56
-rw-r--r--TAO/TAO_IDL/fe/idl.ll398
-rw-r--r--TAO/TAO_IDL/fe/idl.yy1562
-rw-r--r--TAO/TAO_IDL/fe/lex.yy.cpp813
-rw-r--r--TAO/TAO_IDL/fe/lex.yy.cpp.diff43
-rw-r--r--TAO/TAO_IDL/fe/y.tab.cpp2271
-rw-r--r--TAO/TAO_IDL/fe/y.tab.cpp.diff8
10 files changed, 3046 insertions, 2399 deletions
diff --git a/TAO/TAO_IDL/fe/Makefile.am b/TAO/TAO_IDL/fe/Makefile.am
index 686f4570439..f7074e41070 100644
--- a/TAO/TAO_IDL/fe/Makefile.am
+++ b/TAO/TAO_IDL/fe/Makefile.am
@@ -25,6 +25,7 @@ libfe_la_SOURCES = \
fe_lookup.cpp \
fe_private.cpp \
lex.yy.cpp \
+ tmplinst.cpp \
y.tab.cpp
diff --git a/TAO/TAO_IDL/fe/fe_declarator.cpp b/TAO/TAO_IDL/fe/fe_declarator.cpp
index 400dbe1b29f..295790ab91c 100644
--- a/TAO/TAO_IDL/fe/fe_declarator.cpp
+++ b/TAO/TAO_IDL/fe/fe_declarator.cpp
@@ -62,100 +62,101 @@ NOTE:
SunOS, SunSoft, Sun, Solaris, Sun Microsystems or the Sun logo are
trademarks or registered trademarks of Sun Microsystems, Inc.
- */
-
-/*
- * fe_declarator.cc - Implementation of FE private declaration
- * statement class
- *
- * The FE_Declarator class is used to hold together complex declarations
- * until all the components are parsed and before they are composed into
- * an AST_Type node.
- */
+*/
#include "idl.h"
#include "idl_extern.h"
-
#include "fe_private.h"
ACE_RCSID(fe, fe_declarator, "$Id$")
-/*
- * Constructor(s) and destructor
- */
-
-FE_Declarator::FE_Declarator(UTL_ScopedName *n, DeclaratorType dt,
- AST_Decl *cp)
- : pd_complex_part(cp),
- pd_name(n),
- pd_decl_type(dt)
+// Constructor(s) and destructor
+
+FE_Declarator::FE_Declarator (UTL_ScopedName *n,
+ DeclaratorType dt,
+ AST_Decl *cp)
+ : pd_complex_part (cp),
+ pd_name (n),
+ pd_decl_type (dt)
{
}
-/*
- * Private operations
- */
-
-/*
- * Public operations
- */
+// Public operations.
// Compose the type of the complex declarator (if any) with the base
-// type supplied in ct
+// type supplied in ct.
AST_Type *
-FE_Declarator::compose(AST_Decl *d)
+FE_Declarator::compose (AST_Decl *d)
{
- AST_Array *arr;
- AST_Type *ct;
-
- ct = AST_Type::narrow_from_decl(d);
- if (ct == NULL) {
- idl_global->err()->not_a_type(d);
- return NULL;
- }
- if (ct->node_type() == AST_Decl::NT_except) {
- idl_global->err()->not_a_type(d);
- return NULL;
- }
- if (pd_decl_type == FD_simple || pd_complex_part == NULL) {
- return ct;
- }
- if (pd_complex_part->node_type() == AST_Decl::NT_array) {
- arr = AST_Array::narrow_from_decl(pd_complex_part);
- arr->set_base_type(ct);
-
- /*
- * Add the new array to the types defined in the global scope
- */
- idl_global->root()->fe_add_array(arr);
-
- return arr;
- }
- return NULL; // return through this statement should not happen
+ AST_Array *arr = 0;
+ AST_Type *ct = 0;
+
+ ct = AST_Type::narrow_from_decl (d);
+
+ // All uses of forward declared interfaces, structs and unions must
+ // not have a different prefix from the place of declaration.
+ if (!ct->is_defined ())
+ {
+ char *current_prefix = 0;
+ idl_global->pragma_prefixes ().top (current_prefix);
+
+ if (ACE_OS::strcmp (current_prefix, d->prefix ()) != 0)
+ {
+ idl_global->err ()->error1 (UTL_Error::EIDL_PREFIX_CONFLICT,
+ d);
+
+ return 0;
+ }
+ }
+
+ if (ct == 0)
+ {
+ idl_global->err ()->not_a_type (d);
+ return 0;
+ }
+
+ if (ct->node_type () == AST_Decl::NT_except)
+ {
+ idl_global->err ()->not_a_type (d);
+ return 0;
+ }
+
+ if (this->pd_decl_type == FD_simple || this->pd_complex_part == 0)
+ {
+ return ct;
+ }
+
+ if (this->pd_complex_part->node_type () == AST_Decl::NT_array)
+ {
+ arr = AST_Array::narrow_from_decl (this->pd_complex_part);
+ arr->set_base_type (ct);
+
+ // Add the new array to the types defined in the global scope
+ idl_global->root ()->fe_add_array (arr);
+
+ return arr;
+ }
+
+ // We shouldn't get here.
+ return 0;
}
-/*
- * Redefinition of inherited virtual operations
- */
-
-/*
- * Data accessors
- */
+// Data accessors.
AST_Decl *
-FE_Declarator::complex_part()
+FE_Declarator::complex_part (void)
{
- return pd_complex_part;
+ return this->pd_complex_part;
}
UTL_ScopedName *
-FE_Declarator::name()
+FE_Declarator::name (void)
{
- return pd_name;
+ return this->pd_name;
}
FE_Declarator::DeclaratorType
-FE_Declarator::decl_type()
+FE_Declarator::decl_type (void)
{
- return pd_decl_type;
+ return this->pd_decl_type;
}
diff --git a/TAO/TAO_IDL/fe/fe_init.cpp b/TAO/TAO_IDL/fe/fe_init.cpp
index 0f63d775f22..f80c9d097e8 100644
--- a/TAO/TAO_IDL/fe/fe_init.cpp
+++ b/TAO/TAO_IDL/fe/fe_init.cpp
@@ -112,128 +112,112 @@ fe_populate_global_scope (AST_Module *m)
pdt =
idl_global->gen ()->create_predefined_type (
AST_PredefinedType::PT_long,
- create_scoped_name ("long"),
- NULL
+ create_scoped_name ("long")
);
m->fe_add_predefined_type (pdt);
pdt =
idl_global->gen ()->create_predefined_type (
AST_PredefinedType::PT_ulong,
- create_scoped_name ("unsigned long"),
- NULL
+ create_scoped_name ("unsigned long")
);
m->fe_add_predefined_type (pdt);
pdt =
idl_global->gen ()->create_predefined_type (
AST_PredefinedType::PT_longlong,
- create_scoped_name ("long long"),
- NULL
+ create_scoped_name ("long long")
);
m->fe_add_predefined_type(pdt);
pdt =
idl_global->gen ()->create_predefined_type (
AST_PredefinedType::PT_ulonglong,
- create_scoped_name ("unsigned long long"),
- NULL
+ create_scoped_name ("unsigned long long")
);
m->fe_add_predefined_type (pdt);
pdt =
idl_global->gen ()->create_predefined_type (
AST_PredefinedType::PT_short,
- create_scoped_name ("short"),
- NULL
+ create_scoped_name ("short")
);
m->fe_add_predefined_type (pdt);
pdt =
idl_global->gen ()->create_predefined_type (
AST_PredefinedType::PT_ushort,
- create_scoped_name ("unsigned short"),
- NULL
+ create_scoped_name ("unsigned short")
);
m->fe_add_predefined_type (pdt);
pdt =
idl_global->gen ()->create_predefined_type (
AST_PredefinedType::PT_float,
- create_scoped_name ("float"),
- NULL
+ create_scoped_name ("float")
);
m->fe_add_predefined_type (pdt);
pdt =
idl_global->gen ()->create_predefined_type (
AST_PredefinedType::PT_double,
- create_scoped_name("double"),
- NULL
+ create_scoped_name("double")
);
m->fe_add_predefined_type (pdt);
pdt =
idl_global->gen ()->create_predefined_type (
AST_PredefinedType::PT_longdouble,
- create_scoped_name ("long double"),
- NULL
+ create_scoped_name ("long double")
);
m->fe_add_predefined_type (pdt);
pdt =
idl_global->gen ()->create_predefined_type (
AST_PredefinedType::PT_char,
- create_scoped_name ("char"),
- NULL
+ create_scoped_name ("char")
);
m->fe_add_predefined_type (pdt);
pdt =
idl_global->gen ()->create_predefined_type (
AST_PredefinedType::PT_wchar,
- create_scoped_name ("wchar"),
- NULL
+ create_scoped_name ("wchar")
);
m->fe_add_predefined_type (pdt);
pdt =
idl_global->gen ()->create_predefined_type (
AST_PredefinedType::PT_octet,
- create_scoped_name ("octet"),
- NULL
+ create_scoped_name ("octet")
);
m->fe_add_predefined_type (pdt);
pdt =
idl_global->gen ()->create_predefined_type (
AST_PredefinedType::PT_any,
- create_scoped_name ("any"),
- NULL
+ create_scoped_name ("any")
);
m->fe_add_predefined_type (pdt);
pdt =
idl_global->gen ()->create_predefined_type (
AST_PredefinedType::PT_boolean,
- create_scoped_name ("boolean"),
- NULL
+ create_scoped_name ("boolean")
);
m->fe_add_predefined_type (pdt);
pdt =
idl_global->gen ()->create_predefined_type (
AST_PredefinedType::PT_void,
- create_scoped_name ("void"),
- NULL
+ create_scoped_name ("void")
);
m->fe_add_predefined_type (pdt);
pdt =
idl_global->gen ()->create_predefined_type (
AST_PredefinedType::PT_pseudo,
- create_scoped_name("Object"),
- NULL
+ create_scoped_name("Object")
);
m->fe_add_predefined_type (pdt);
@@ -242,200 +226,175 @@ fe_populate_global_scope (AST_Module *m)
pdt =
idl_global->gen ()->create_predefined_type (
AST_PredefinedType::PT_pseudo,
- create_scoped_name ("attribute"),
- NULL
+ create_scoped_name ("attribute")
);
m->fe_add_predefined_type (pdt);
pdt =
idl_global->gen ()->create_predefined_type (
AST_PredefinedType::PT_pseudo,
- create_scoped_name ("case"),
- NULL
+ create_scoped_name ("case")
);
m->fe_add_predefined_type (pdt);
pdt =
idl_global->gen ()->create_predefined_type (
AST_PredefinedType::PT_pseudo,
- create_scoped_name ("const"),
- NULL
+ create_scoped_name ("const")
);
m->fe_add_predefined_type (pdt);
pdt =
idl_global->gen ()->create_predefined_type (
AST_PredefinedType::PT_pseudo,
- create_scoped_name ("context"),
- NULL
+ create_scoped_name ("context")
);
m->fe_add_predefined_type (pdt);
pdt =
idl_global->gen ()->create_predefined_type (
AST_PredefinedType::PT_pseudo,
- create_scoped_name ("default"),
- NULL
+ create_scoped_name ("default")
);
m->fe_add_predefined_type (pdt);
pdt =
idl_global->gen ()->create_predefined_type (
AST_PredefinedType::PT_pseudo,
- create_scoped_name ("enum"),
- NULL
+ create_scoped_name ("enum")
);
m->fe_add_predefined_type (pdt);
pdt =
idl_global->gen ()->create_predefined_type (
AST_PredefinedType::PT_pseudo,
- create_scoped_name ("exception"),
- NULL
+ create_scoped_name ("exception")
);
m->fe_add_predefined_type (pdt);
pdt =
idl_global->gen ()->create_predefined_type (
AST_PredefinedType::PT_pseudo,
- create_scoped_name ("in"),
- NULL
+ create_scoped_name ("in")
);
m->fe_add_predefined_type (pdt);
pdt =
idl_global->gen ()->create_predefined_type (
AST_PredefinedType::PT_pseudo,
- create_scoped_name ("out"),
- NULL
+ create_scoped_name ("out")
);
m->fe_add_predefined_type (pdt);
pdt =
idl_global->gen ()->create_predefined_type (
AST_PredefinedType::PT_pseudo,
- create_scoped_name ("inout"),
- NULL
+ create_scoped_name ("inout")
);
m->fe_add_predefined_type (pdt);
pdt =
idl_global->gen ()->create_predefined_type (
AST_PredefinedType::PT_pseudo,
- create_scoped_name ("interface"),
- NULL
+ create_scoped_name ("interface")
);
m->fe_add_predefined_type (pdt);
pdt =
idl_global->gen ()->create_predefined_type (
AST_PredefinedType::PT_pseudo,
- create_scoped_name ("module"),
- NULL
+ create_scoped_name ("module")
);
m->fe_add_predefined_type (pdt);
pdt =
idl_global->gen ()->create_predefined_type (
AST_PredefinedType::PT_pseudo,
- create_scoped_name ("oneway"),
- NULL
+ create_scoped_name ("oneway")
);
m->fe_add_predefined_type (pdt);
pdt =
idl_global->gen ()->create_predefined_type (
AST_PredefinedType::PT_pseudo,
- create_scoped_name ("raises"),
- NULL
+ create_scoped_name ("raises")
);
m->fe_add_predefined_type (pdt);
pdt =
idl_global->gen ()->create_predefined_type (
AST_PredefinedType::PT_pseudo,
- create_scoped_name ("readonly"),
- NULL
+ create_scoped_name ("readonly")
);
m->fe_add_predefined_type (pdt);
pdt =
idl_global->gen ()->create_predefined_type (
AST_PredefinedType::PT_pseudo,
- create_scoped_name ("sequence"),
- NULL
+ create_scoped_name ("sequence")
);
m->fe_add_predefined_type (pdt);
pdt =
idl_global->gen ()->create_predefined_type (
AST_PredefinedType::PT_pseudo,
- create_scoped_name ("string"),
- NULL
+ create_scoped_name ("string")
);
m->fe_add_predefined_type (pdt);
pdt =
idl_global->gen ()->create_predefined_type (
AST_PredefinedType::PT_pseudo,
- create_scoped_name ("wstring"),
- NULL
+ create_scoped_name ("wstring")
);
m->fe_add_predefined_type (pdt);
pdt =
idl_global->gen ()->create_predefined_type (
AST_PredefinedType::PT_pseudo,
- create_scoped_name ("struct"),
- NULL
+ create_scoped_name ("struct")
);
m->fe_add_predefined_type (pdt);
pdt =
idl_global->gen ()->create_predefined_type (
AST_PredefinedType::PT_pseudo,
- create_scoped_name ("switch"),
- NULL
+ create_scoped_name ("switch")
);
m->fe_add_predefined_type (pdt);
pdt =
idl_global->gen ()->create_predefined_type (
AST_PredefinedType::PT_pseudo,
- create_scoped_name ("typedef"),
- NULL
+ create_scoped_name ("typedef")
);
m->fe_add_predefined_type (pdt);
pdt =
idl_global->gen ()->create_predefined_type (
AST_PredefinedType::PT_pseudo,
- create_scoped_name ("union"),
- NULL
+ create_scoped_name ("union")
);
m->fe_add_predefined_type (pdt);
pdt =
idl_global->gen ()->create_predefined_type (
AST_PredefinedType::PT_pseudo,
- create_scoped_name ("unsigned"),
- NULL
+ create_scoped_name ("unsigned")
);
m->fe_add_predefined_type (pdt);
pdt =
idl_global->gen ()->create_predefined_type (
AST_PredefinedType::PT_pseudo,
- create_scoped_name ("TRUE"),
- NULL
+ create_scoped_name ("TRUE")
);
m->fe_add_predefined_type (pdt);
pdt =
idl_global->gen ()->create_predefined_type (
AST_PredefinedType::PT_pseudo,
- create_scoped_name ("FALSE"),
- NULL
+ create_scoped_name ("FALSE")
);
m->fe_add_predefined_type (pdt);
@@ -445,64 +404,49 @@ fe_populate_global_scope (AST_Module *m)
pdt =
idl_global->gen ()->create_predefined_type (
AST_PredefinedType::PT_pseudo,
- create_scoped_name ("abstract"),
- NULL
+ create_scoped_name ("abstract")
);
m->fe_add_predefined_type (pdt);
pdt =
idl_global->gen ()->create_predefined_type (
AST_PredefinedType::PT_pseudo,
- create_scoped_name ("custom"),
- NULL
+ create_scoped_name ("custom")
);
m->fe_add_predefined_type (pdt);
pdt =
idl_global->gen ()->create_predefined_type (
AST_PredefinedType::PT_pseudo,
- create_scoped_name ("init"),
- NULL
+ create_scoped_name ("private")
);
m->fe_add_predefined_type (pdt);
pdt =
idl_global->gen ()->create_predefined_type (
AST_PredefinedType::PT_pseudo,
- create_scoped_name ("private"),
- NULL
+ create_scoped_name ("public")
);
m->fe_add_predefined_type (pdt);
pdt =
idl_global->gen ()->create_predefined_type (
AST_PredefinedType::PT_pseudo,
- create_scoped_name ("public"),
- NULL
+ create_scoped_name ("supports")
);
m->fe_add_predefined_type (pdt);
pdt =
idl_global->gen ()->create_predefined_type (
AST_PredefinedType::PT_pseudo,
- create_scoped_name ("supports"),
- NULL
+ create_scoped_name ("truncatable")
);
m->fe_add_predefined_type (pdt);
pdt =
idl_global->gen ()->create_predefined_type (
AST_PredefinedType::PT_pseudo,
- create_scoped_name ("truncatable"),
- NULL
- );
- m->fe_add_predefined_type (pdt);
-
- pdt =
- idl_global->gen ()->create_predefined_type (
- AST_PredefinedType::PT_pseudo,
- create_scoped_name ("valuetype"),
- NULL
+ create_scoped_name ("valuetype")
);
m->fe_add_predefined_type (pdt);
}
@@ -617,7 +561,7 @@ FE_init_stage2 (void)
}
// Create a global root for the AST. Note that the AST root has no name.
- r = idl_global->gen ()->create_root (create_scoped_name (""), 0);
+ r = idl_global->gen ()->create_root (create_scoped_name (""));
idl_global->set_root (r);
if (r == 0)
diff --git a/TAO/TAO_IDL/fe/fe_tmplinst.cpp b/TAO/TAO_IDL/fe/fe_tmplinst.cpp
new file mode 100644
index 00000000000..838db3009e9
--- /dev/null
+++ b/TAO/TAO_IDL/fe/fe_tmplinst.cpp
@@ -0,0 +1,56 @@
+// $Id$
+
+#include "ace/ACE.h"
+#include "ace/Hash_Map_Manager_T.h"
+#include "ace/Containers_T.h"
+
+class AST_Decl;
+class AST_Field;
+
+#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
+
+template class ACE_Hash_Map_Entry<ACE_CString, int>;
+template class ACE_Hash_Map_Iterator_Base_Ex<ACE_CString, int, ACE_Hash<ACE_CString>, ACE_Equal_To<ACE_CString>, ACE_Null_Mutex>;
+template class ACE_Hash_Map_Iterator_Ex<ACE_CString, int, ACE_Hash<ACE_CString>, ACE_Equal_To<ACE_CString>, ACE_Null_Mutex>;
+template class ACE_Equal_To<ACE_CString>;
+template class ACE_Hash_Map_Reverse_Iterator_Ex<ACE_CString, int, ACE_Hash<ACE_CString>, ACE_Equal_To<ACE_CString>, ACE_Null_Mutex>;
+template class ACE_Hash<ACE_CString>;
+template class ACE_Hash_Map_Manager_Ex<ACE_CString, int, ACE_Hash<ACE_CString>, ACE_Equal_To<ACE_CString>, ACE_Null_Mutex>;
+template class ACE_Hash_Map_Manager<ACE_CString, int, ACE_Null_Mutex>;
+
+template class ACE_Node<AST_Decl *>;
+template class ACE_Unbounded_Set<AST_Decl *>;
+template class ACE_Unbounded_Set_Iterator<AST_Decl *>;
+
+template class ACE_Node<AST_Field *>;
+template class ACE_Unbounded_Queue<AST_Field *>;
+template class ACE_Unbounded_Queue_Iterator<AST_Field *>;
+
+template class ACE_Node<char *>;
+template class ACE_Unbounded_Stack<char *>;
+template class ACE_Unbounded_Stack_Iterator<char *>;
+
+#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
+
+#pragma instantiate ACE_Hash_Map_Entry<ACE_CString, int>
+#pragma instantiate ACE_Hash_Map_Iterator_Base_Ex<ACE_CString, int, ACE_Hash<ACE_CString>, ACE_Equal_To<ACE_CString>, ACE_Null_Mutex>
+#pragma instantiate ACE_Hash_Map_Iterator_Ex<ACE_CString, int, ACE_Hash<ACE_CString>, ACE_Equal_To<ACE_CString>, ACE_Null_Mutex>
+#pragma instantiate ACE_Equal_To<ACE_CString>
+#pragma instantiate ACE_Hash_Map_Reverse_Iterator_Ex<ACE_CString, int, ACE_Hash<ACE_CString>, ACE_Equal_To<ACE_CString>, ACE_Null_Mutex>
+#pragma instantiate ACE_Hash<ACE_CString>
+#pragma instantiate ACE_Hash_Map_Manager_Ex<ACE_CString, int, ACE_Hash<ACE_CString>, ACE_Equal_To<ACE_CString>, ACE_Null_Mutex>
+#pragma instantiate ACE_Hash_Map_Manager<ACE_CString, int, ACE_Null_Mutex>
+
+#pragma instantiate ACE_Node<AST_Decl *>
+#pragma instantiate ACE_Unbounded_Set<AST_Decl *>
+#pragma instantiate ACE_Unbounded_Set_Iterator<AST_Decl *>
+
+#pragma instantiate ACE_Node<AST_Decl *>
+#pragma instantiate ACE_Unbounded_Queue<AST_Decl *>
+#pragma instantiate ACE_Unbounded_Queue_Iterator<AST_Decl *>
+
+#pragma instantiate ACE_Node<char *>
+#pragma instantiate ACE_Unbounded_Stack<char *>
+#pragma instantiate ACE_Unbounded_Stack_Iterator<char *>
+
+#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
diff --git a/TAO/TAO_IDL/fe/idl.ll b/TAO/TAO_IDL/fe/idl.ll
index b5770d82232..401045f22ee 100644
--- a/TAO/TAO_IDL/fe/idl.ll
+++ b/TAO/TAO_IDL/fe/idl.ll
@@ -72,14 +72,17 @@ trademarks or registered trademarks of Sun Microsystems, Inc.
#include "fe_private.h"
#include "y.tab.h"
-static char * idl_wstring_escape_reader(char *);
-static ACE_CDR::WChar idl_wchar_escape_reader(char *);
-static char idl_escape_reader(char *);
-static double idl_atof(char *);
-static long idl_atoi(char *, long);
-static unsigned long idl_atoui(char *, long);
-static void idl_parse_line_and_file(char *);
-static void idl_store_pragma(char *);
+static char * idl_wstring_escape_reader (char *);
+static ACE_CDR::WChar idl_wchar_escape_reader (char *);
+static char idl_escape_reader (char *);
+static double idl_atof (char *);
+static long idl_atoi (char *, long);
+static unsigned long idl_atoui (char *, long);
+static void idl_parse_line_and_file (char *);
+static void idl_store_pragma (char *);
+static char * idl_get_pragma_string (char *);
+static idl_bool idl_valid_version (char *);
+static AST_Decl * idl_find_node (char *);
#if 0 /* defined (HPUX) */
// HPUX has yytext typed to unsigned char *. We make sure here that
@@ -350,48 +353,74 @@ stripped_name(UTL_String *fn)
return n;
}
-/*
- * Parse a #line statement generated by the C preprocessor
- */
+// Parse a #line statement generated by the C preprocessor
static void
-idl_parse_line_and_file(char *buf)
+idl_parse_line_and_file (char *buf)
{
- char *r = buf;
- char *h;
- UTL_String *nm;
+ char *r = buf;
+ char *h = 0;
+ UTL_String *nm = 0;
- /* Skip initial '#' */
+ // Skip initial '#'.
if (*r != '#')
- return;
+ {
+ return;
+ }
else
- r++;
+ {
+ r++;
+ }
- /* Check to see if we're running under the screwy Microsoft scheme */
- /* of putting #line num instead of #num. */
+ // Check to see if we're running under the screwy Microsoft scheme
+ // of putting #line num instead of #num.
if (ACE_OS::strncmp (r, "line", 4) == 0)
- r += 5;
+ {
+ r += 5;
+ }
- /* Find line number */
+ // Find line number.
while (isspace (*r))
- r++;
+ {
+ r++;
+ }
+
h = r;
+
for (; isdigit (*r); r++)
- continue;
+ {
+ continue;
+ }
+
*r++ = 0;
- idl_global->set_lineno(idl_atoui(h, 10));
+ idl_global->set_lineno (idl_atoui (h, 10));
- /* Find file name, if present */
+ // Find file name, if present.
for (; *r != '"'; r++)
- if (*r == '\n' || *r == '\0')
- return;
+ {
+ if (*r == '\n' || *r == '\0')
+ {
+ return;
+ }
+ }
h = ++r;
+
for (; *r != '"'; r++)
- continue;
+ {
+ continue;
+ }
+
*r = 0;
+ UTL_String *tmp = 0;
+
if (*h == '\0')
- idl_global->set_filename(new UTL_String("standard input"));
+ {
+ ACE_NEW (tmp,
+ UTL_String ("standard input"));
+ idl_global->set_filename (tmp);
+ return;
+ }
else
{
long i;
@@ -401,70 +430,183 @@ idl_parse_line_and_file(char *buf)
for (i = 0, j = 0; h[j] != '\0'; i++, j++)
{
if (h[j] == '\\' && h[j + 1] == '\\')
- j++;
+ {
+ j++;
+ }
- h[i] = h[j];
+ h[i] = h[j];
}
+
h[i] = '\0';
- idl_global->set_filename(new UTL_String(h));
- }
- int in_main_file = I_FALSE;
- if (idl_global->filename()->compare(idl_global->real_filename())
- || idl_global->filename()->compare(idl_global->main_filename()))
- in_main_file = I_TRUE;
- idl_global->set_in_main_file(in_main_file);
- /*
- * If it's an import file store the stripped name for the BE to use
- */
- if (!(idl_global->in_main_file()) && idl_global->import()) {
- nm = new UTL_String(stripped_name(idl_global->filename()));
- idl_global->store_include_file_name(nm);
- }
+ ACE_NEW (tmp,
+ UTL_String (h));
+ idl_global->set_filename (tmp);
+ }
+
+ UTL_String *fname = idl_global->filename ();
+ idl_bool in_main_file = I_FALSE;
+ idl_bool is_real_filename = fname->compare (idl_global->real_filename ());
+ idl_bool is_main_filename = I_FALSE;
+
+ if (!is_real_filename)
+ {
+ is_main_filename = fname->compare (idl_global->main_filename ());
+ }
+
+ if (is_real_filename || is_main_filename)
+ {
+ in_main_file = I_TRUE;
+ }
+
+ idl_global->set_in_main_file (in_main_file);
+
+ // If it's an import file store the stripped name for the BE to use
+ if (!(idl_global->in_main_file ()) && idl_global->import ())
+ {
+ ACE_NEW (nm,
+ UTL_String (stripped_name (fname)));
+
+ // This call also manages the #pragma prefix.
+ idl_global->store_include_file_name (nm);
+ }
+ else if (is_main_filename && idl_global->pragma_prefixes ().size () > 1)
+ {
+ // If we're here, we have come to the end of an included file, so we
+ // pop its prefix.
+ char *trash = 0;
+ idl_global->pragma_prefixes ().pop (trash);
+ delete [] trash;
+ }
}
-/*
- * Store a #pragma line into the list of pragmas
- */
+// Store a #pragma line into the list of pragmas
static void
-idl_store_pragma(char *buf)
+idl_store_pragma (char *buf)
{
char *sp = buf + 1;
- // Remove all the blanks between the '#' and the 'pragma'
+
+ // Remove all the blanks between the '#' and the 'pragma'.
if (*sp != 'p')
{
while (*sp != 'p')
- ++sp;
+ {
+ ++sp;
+ }
+
char *tp = buf + 1;
+
while (*sp != '\n')
{
*tp = *sp;
- ++tp; ++sp;
+ ++tp;
+ ++sp;
}
}
- if (ACE_OS::strstr(buf + 8, "import") != 0) {
- idl_global->set_import(I_TRUE);
- return;
- }
- if (ACE_OS::strstr(buf + 8, "include") != 0) {
- idl_global->set_import(I_FALSE);
- return;
- }
- // Remove the final '\n'
+ if (ACE_OS::strstr (buf + 8, "import") != 0)
+ {
+ idl_global->set_import (I_TRUE);
+ return;
+ }
+
+ if (ACE_OS::strstr (buf + 8, "include") != 0)
+ {
+ idl_global->set_import (I_FALSE);
+ return;
+ }
+
+ // Remove the final '\n'.
while (*sp != '\n')
- ++sp;
+ {
+ ++sp;
+ }
+
*sp = '\0';
- if (ACE_OS::strstr(buf + 8, "ident") != 0) {
- idl_global->ident_string(buf + 8);
- return;
- }
- UTL_StrList *p = idl_global->pragmas();
- if (p == NULL)
- idl_global->set_pragmas(new UTL_StrList(new UTL_String(buf), NULL));
- else {
- p->nconc(new UTL_StrList(new UTL_String(buf), NULL));
- idl_global->set_pragmas(p);
- }
+
+ if (ACE_OS::strncmp (buf + 8, "prefix", 6) == 0)
+ {
+ char *new_prefix = idl_get_pragma_string (buf);
+
+ if (new_prefix != 0)
+ {
+ unsigned long depth = idl_global->scopes ()->depth ();
+
+ // At global scope, we always replace the prefix. For all
+ // other scopes, we replace only if there is a prefix already
+ // associated with that scope, otherwise we add the prefix.
+ if (depth == 1 || idl_global->scopes ()->top ()->has_prefix ())
+ {
+ char *trash = 0;
+ idl_global->pragma_prefixes ().pop (trash);
+ delete [] trash;
+ }
+
+ if (depth > 1)
+ {
+ idl_global->scopes ()->top ()->has_prefix (1);
+ }
+
+ idl_global->pragma_prefixes ().push (new_prefix);
+ }
+ }
+ else if (ACE_OS::strncmp (buf + 8, "version", 7) == 0)
+ {
+ char *tmp = buf + 16;
+
+ while (*tmp == ' ')
+ {
+ ++tmp;
+ }
+
+ char *number = ACE_OS::strchr (tmp, ' ');
+
+ while (*number == ' ')
+ {
+ ++number;
+ }
+
+ AST_Decl *d = idl_find_node (tmp);
+
+ if (d == 0)
+ {
+ return;
+ }
+
+ if (!idl_valid_version (number))
+ {
+ idl_global->err ()->version_number_error (number);
+ return;
+ }
+
+ d->version (ACE::strnew (number));
+ }
+ else if (ACE_OS::strncmp (buf + 8, "ident", 5) == 0)
+ {
+ idl_global->ident_string (buf + 8);
+ }
+ else if (ACE_OS::strncmp (buf + 8, "id", 2) == 0)
+ {
+ char *tmp = buf + 11;
+
+ while (*tmp == ' ')
+ {
+ ++tmp;
+ }
+
+ AST_Decl *d = idl_find_node (tmp);
+
+ if (d == 0)
+ {
+ return;
+ }
+
+ char *new_id = idl_get_pragma_string (buf);
+
+ if (new_id != 0)
+ {
+ d->repoID (new_id);
+ }
+ }
}
/*
@@ -677,3 +819,111 @@ idl_wstring_escape_reader (char *str)
{
return str;
}
+
+static char *
+idl_get_pragma_string (char *pragma)
+{
+ // Get pointers to each end of the substring between the quotes.
+ const char *start = ACE_OS::strchr (pragma, '"') + 1;
+ const char *end = ACE_OS::strchr (start, '"');
+
+ if (end == 0)
+ {
+ idl_global->err ()->syntax_error (
+ IDL_GlobalData::PS_PragmaPrefixSyntax
+ );
+
+ return 0;
+ }
+
+ int len = end - start;
+ char *retval = 0;
+
+ ACE_NEW_RETURN (retval,
+ char[len + 1],
+ 0);
+
+ ACE_OS::strncpy (retval,
+ start,
+ len);
+
+ retval[len] = '\0';
+ return retval;
+}
+
+static idl_bool
+idl_valid_version (char *s)
+{
+ // Nothing preceding decimal point.
+ if (*s == '.')
+ {
+ return 0;
+ }
+
+ char *minor = ACE_OS::strchr (s, '.');
+ int i;
+
+ if (minor == 0)
+ {
+ // No decimal point.
+ return 0;
+ }
+
+ if (*(minor + 1) == '\0')
+ {
+ // Nothing following decimal point.
+ return 0;
+ }
+
+ char *tmp = minor + 1;
+
+ for (i = 0; tmp[i] != '\0'; ++i)
+ {
+ if (!isdigit (tmp[i]))
+ {
+ return 0;
+ }
+ }
+
+ int len = minor - s;
+
+ for (i = 0; i < len; ++i)
+ {
+ if (!isdigit (s[i]))
+ {
+ return 0;
+ }
+ }
+
+ // Major and minor version numbers must be unsigned shorts.
+ if (ACE_OS::atoi (minor + 1) > ACE_UINT16_MAX
+ || ACE_OS::atoi (s) > ACE_UINT16_MAX)
+ {
+ return 0;
+ }
+
+ return 1;
+}
+
+static AST_Decl *
+idl_find_node (char *s)
+{
+ UTL_ScopedName *node = idl_global->string_to_scoped_name (s);
+ AST_Decl *d = 0;
+
+ if (node != 0)
+ {
+ d = idl_global->scopes ()->top_non_null ()->lookup_by_name (node,
+ I_TRUE);
+ }
+
+ if (d == 0)
+ {
+ idl_global->err ()->lookup_error (node);
+ node->destroy ();
+ delete node;
+ node = 0;
+ }
+
+ return d;
+}
diff --git a/TAO/TAO_IDL/fe/idl.yy b/TAO/TAO_IDL/fe/idl.yy
index 0355ef6d522..a9e8a74d1e7 100644
--- a/TAO/TAO_IDL/fe/idl.yy
+++ b/TAO/TAO_IDL/fe/idl.yy
@@ -259,112 +259,102 @@ definitions
definition
: type_dcl
{
- idl_global->set_parse_state(IDL_GlobalData::PS_TypeDeclSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_TypeDeclSeen);
}
';'
{
- idl_global->set_parse_state(IDL_GlobalData::PS_NoState);
+ idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
}
| const_dcl
{
- idl_global->set_parse_state(IDL_GlobalData::PS_ConstDeclSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_ConstDeclSeen);
}
';'
{
- idl_global->set_parse_state(IDL_GlobalData::PS_NoState);
+ idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
}
| exception
{
- idl_global->set_parse_state(IDL_GlobalData::PS_ExceptDeclSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_ExceptDeclSeen);
}
';'
{
- idl_global->set_parse_state(IDL_GlobalData::PS_NoState);
+ idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
}
| interface_def
{
- idl_global->set_parse_state(IDL_GlobalData::PS_InterfaceDeclSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_InterfaceDeclSeen);
}
';'
{
- idl_global->set_parse_state(IDL_GlobalData::PS_NoState);
+ idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
}
| module
{
- idl_global->set_parse_state(IDL_GlobalData::PS_ModuleDeclSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_ModuleDeclSeen);
}
';'
{
- idl_global->set_parse_state(IDL_GlobalData::PS_NoState);
+ idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
}
| value_def
{
- idl_global->set_parse_state(IDL_GlobalData::PS_ValuetypeDeclSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_ValuetypeDeclSeen);
}
';'
{
- idl_global->set_parse_state(IDL_GlobalData::PS_NoState);
+ idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
}
| error
{
- idl_global->err()->syntax_error(idl_global->parse_state());
+ idl_global->err()->syntax_error (idl_global->parse_state());
}
';'
{
- idl_global->set_parse_state(IDL_GlobalData::PS_NoState);
+ idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
yyerrok;
}
;
module : IDL_MODULE
{
- idl_global->set_parse_state(IDL_GlobalData::PS_ModuleSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_ModuleSeen);
}
IDENTIFIER
{
- UTL_ScopedName *n =
- new UTL_ScopedName(new Identifier($3), NULL);
- AST_Module *m = NULL;
- UTL_Scope *s = idl_global->scopes()->top_non_null();
- UTL_StrList *p = idl_global->pragmas();
+ UTL_ScopedName *n =
+ new UTL_ScopedName(new Identifier ($3), 0);
+ AST_Module *m = 0;
+ UTL_Scope *s = idl_global->scopes ()->top_non_null ();
- idl_global->set_parse_state(IDL_GlobalData::PS_ModuleIDSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_ModuleIDSeen);
/*
* Make a new module and add it to the enclosing scope
*/
- if (s != NULL) {
- m = idl_global->gen ()->create_module (s, n, p);
+ if (s != 0) {
+ m = idl_global->gen ()->create_module (s, n);
(void) s->fe_add_module (m);
}
/*
* Push it on the stack
*/
- idl_global->scopes()->push(m);
+ idl_global->scopes ()->push (m);
}
'{'
{
- idl_global->set_parse_state(IDL_GlobalData::PS_ModuleSqSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_ModuleSqSeen);
}
definitions
{
- idl_global->set_parse_state(IDL_GlobalData::PS_ModuleBodySeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_ModuleBodySeen);
}
'}'
{
- idl_global->set_parse_state(IDL_GlobalData::PS_ModuleQsSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_ModuleQsSeen);
/*
* Finished with this module - pop it from the scope stack
*/
- UTL_Scope* s = idl_global->scopes()->top();
- AST_Module* m = AST_Module::narrow_from_scope (s);
- if (m != 0)
- {
- UTL_StrList *p = m->pragmas ();
- if (p != 0)
- p = (UTL_StrList*)p->copy ();
- idl_global->set_pragmas (p);
- }
- idl_global->scopes()->pop();
+ idl_global->scopes ()->pop ();
}
;
@@ -376,27 +366,23 @@ interface_def
interface :
interface_header
{
- UTL_Scope *s = idl_global->scopes ()->top_non_null ();
- AST_Interface *i = NULL;
- AST_Decl *v = NULL;
- UTL_StrList *p = idl_global->pragmas ();
- ACE_UNUSED_ARG (v);
+ UTL_Scope *s = idl_global->scopes ()->top_non_null ();
+ AST_Interface *i = 0;
/*
* Make a new interface node and add it to its enclosing scope
*/
- if (s != NULL && $1 != NULL) {
+ if (s != 0 && $1 != 0) {
i = idl_global->gen ()->create_interface (
$1->interface_name (),
$1->inherits (),
$1->n_inherits (),
$1->inherits_flat (),
$1->n_inherits_flat (),
- p,
$1->is_local (),
$1->is_abstract ()
);
- AST_Interface::fwd_redefinition_helper (i,s,p);
+ AST_Interface::fwd_redefinition_helper (i, s);
/*
* Add the interface to its definition scope
*/
@@ -409,42 +395,30 @@ interface :
}
'{'
{
- idl_global->set_parse_state(IDL_GlobalData::PS_InterfaceSqSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_InterfaceSqSeen);
}
exports
{
- idl_global->set_parse_state(IDL_GlobalData::PS_InterfaceBodySeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_InterfaceBodySeen);
}
'}'
{
- idl_global->set_parse_state(IDL_GlobalData::PS_InterfaceQsSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_InterfaceQsSeen);
/*
* Done with this interface - pop it off the scopes stack
*/
- UTL_Scope* s = idl_global->scopes ()->top();
- AST_Interface* m = AST_Interface::narrow_from_scope (s);
- if (m != NULL)
- {
- m->inherited_name_clash ();
- UTL_StrList *p = m->pragmas ();
- if (p != 0)
- {
- p = (UTL_StrList*) p->copy ();
- }
- idl_global->set_pragmas (p);
- }
- idl_global->scopes ()->pop();
+ idl_global->scopes ()->pop ();
}
;
interface_decl:
IDL_INTERFACE
{
- idl_global->set_parse_state(IDL_GlobalData::PS_InterfaceSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_InterfaceSeen);
}
id
{
- idl_global->set_parse_state(IDL_GlobalData::PS_InterfaceIDSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_InterfaceIDSeen);
$$ = $3;
}
;
@@ -452,51 +426,44 @@ interface_decl:
interface_header :
interface_decl inheritance_spec
{
- idl_global->set_parse_state(IDL_GlobalData::PS_InheritSpecSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_InheritSpecSeen);
/*
* Create an AST representation of the information in the header
* part of an interface - this representation contains a computed
* list of all interfaces which this interface inherits from,
* recursively
*/
- $$ = new FE_InterfaceHeader(new UTL_ScopedName($1, NULL), $2);
+ $$ = new FE_InterfaceHeader (new UTL_ScopedName ($1, 0), $2);
}
|
IDL_LOCAL interface_decl inheritance_spec
{
- idl_global->set_parse_state(IDL_GlobalData::PS_InheritSpecSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_InheritSpecSeen);
/*
* Create an AST representation of the information in the header
* part of an interface - this representation contains a computed
* list of all interfaces which this interface inherits from,
* recursively
*/
- $$ = new FE_Local_InterfaceHeader(new UTL_ScopedName($2, NULL), $3);
+ $$ = new FE_Local_InterfaceHeader (new UTL_ScopedName($2, 0), $3);
}
|
IDL_ABSTRACT interface_decl inheritance_spec
{
- cerr << "error in " << idl_global->filename()->get_string()
- << " line " << idl_global->lineno() << ":\n" ;
- cerr << "Sorry, I (TAO_IDL) can't handle abstract interface yet\n";
- /* (if not truncatable) */
-#if 0
- idl_global->set_parse_state(IDL_GlobalData::PS_InheritSpecSeen);
- /*
- * Create an AST representation of the information in the header
- * part of an interface - this representation contains a computed
- * list of all interfaces which this interface inherits from,
- * recursively
- */
- $$ = new FE_Abstract_InterfaceHeader(new UTL_ScopedName($2, NULL), $3);
-#endif
+ ACE_DEBUG ((LM_DEBUG,
+ ACE_TEXT ("error in %s line %d\n"),
+ idl_global->filename ()->get_string (),
+ idl_global->lineno ()));
+ ACE_DEBUG ((LM_DEBUG,
+ ACE_TEXT ("Sorry, I (TAO_IDL) can't handle abstract")
+ ACE_TEXT (" interfaces yet\n")));
}
;
inheritance_spec
: ':'
{
- idl_global->set_parse_state(IDL_GlobalData::PS_InheritColonSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_InheritColonSeen);
}
at_least_one_scoped_name
{
@@ -504,7 +471,7 @@ inheritance_spec
}
| /* EMPTY */
{
- $$ = NULL;
+ $$ = 0;
}
;
@@ -518,10 +485,13 @@ value_def
valuetype
: IDL_CUSTOM value_concrete_decl
{
- cerr << "error in " << idl_global->filename()->get_string()
- << " line " << idl_global->lineno() << ":\n" ;
- cerr << "Sorry, I (TAO_IDL) can't handle custom yet\n";
- /* set custom (if not truncatable) */
+ ACE_DEBUG ((LM_DEBUG,
+ ACE_TEXT ("error in %s 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")));
}
| value_concrete_decl
;
@@ -529,47 +499,42 @@ valuetype
value_concrete_decl :
value_header
{
- UTL_Scope *s = idl_global->scopes()->top_non_null();
- AST_Interface *i = NULL;
- UTL_StrList *p = idl_global->pragmas();
+ UTL_Scope *s = idl_global->scopes ()->top_non_null ();
+ AST_Interface *i = 0;
- if (s != NULL && $1 != NULL) {
- i = idl_global->gen()->create_valuetype($1->interface_name(),
- $1->inherits(),
- $1->n_inherits(),
- p);
- AST_Interface::fwd_redefinition_helper (i,s,p);
+ if (s != 0 && $1 != 0) {
+ i = idl_global->gen ()->create_valuetype ($1->interface_name (),
+ $1->inherits (),
+ $1->n_inherits ());
+ AST_Interface::fwd_redefinition_helper (i, s);
/*
* Add the valuetype to its definition scope
*/
- (void) s->fe_add_interface(i);
+ (void) s->fe_add_interface (i);
}
/*
* Push it on the scope stack
*/
- idl_global->scopes()->push(i);
+ idl_global->scopes ()->push (i);
}
'{'
{
- idl_global->set_parse_state(IDL_GlobalData::PS_InterfaceSqSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_InterfaceSqSeen);
}
value_elements
{
- idl_global->set_parse_state(IDL_GlobalData::PS_InterfaceBodySeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_InterfaceBodySeen);
}
'}'
{
- idl_global->set_parse_state(IDL_GlobalData::PS_InterfaceQsSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_InterfaceQsSeen);
/*
* Done with this interface - pop it off the scopes stack
*/
- UTL_Scope* s = idl_global->scopes()->top();
+ UTL_Scope* s = idl_global->scopes ()->top ();
AST_Interface* m = AST_Interface::narrow_from_scope (s);
m->inherited_name_clash ();
- UTL_StrList *p = m->pragmas ();
- if (p != 0) p = (UTL_StrList*)p->copy ();
- idl_global->set_pragmas (p);
- idl_global->scopes()->pop();
+ idl_global->scopes ()->pop ();
}
;
@@ -577,53 +542,48 @@ value_abs_decl :
IDL_ABSTRACT
value_header
{
- UTL_Scope *s = idl_global->scopes()->top_non_null();
- AST_Interface *i = NULL;
- UTL_StrList *p = idl_global->pragmas();
+ UTL_Scope *s = idl_global->scopes ()->top_non_null ();
+ AST_Interface *i = 0;
- if (s != NULL && $2 != NULL) {
+ if (s != 0 && $2 != 0) {
if ($2->n_concrete() > 0) {
- idl_global->err()->abstract_inheritance_error ($2->interface_name ());
+ idl_global->err ()->abstract_inheritance_error ($2->interface_name ());
}
- i = idl_global->gen()->create_valuetype($2->interface_name(),
- $2->inherits(),
- $2->n_inherits(),
- p);
+ i = idl_global->gen()->create_valuetype ($2->interface_name (),
+ $2->inherits (),
+ $2->n_inherits ());
i->set_abstract_valuetype ();
- AST_Interface::fwd_redefinition_helper (i,s,p);
+ AST_Interface::fwd_redefinition_helper (i, s);
/*
* Add the valuetype to its definition scope
*/
- (void) s->fe_add_interface(i);
+ (void) s->fe_add_interface (i);
}
/*
* Push it on the scope stack
*/
- idl_global->scopes()->push(i);
+ idl_global->scopes ()->push (i);
}
'{'
{
- idl_global->set_parse_state(IDL_GlobalData::PS_InterfaceSqSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_InterfaceSqSeen);
}
exports
{
- idl_global->set_parse_state(IDL_GlobalData::PS_InterfaceBodySeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_InterfaceBodySeen);
}
'}'
{
- idl_global->set_parse_state(IDL_GlobalData::PS_InterfaceQsSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_InterfaceQsSeen);
/*
* Done with this interface - pop it off the scopes stack
*/
- UTL_Scope* s = idl_global->scopes()->top();
+ UTL_Scope* s = idl_global->scopes ()->top ();
AST_Interface* m = AST_Interface::narrow_from_scope (s);
m->inherited_name_clash ();
- UTL_StrList *p = m->pragmas ();
- if (p != 0) p = (UTL_StrList*)p->copy ();
- idl_global->set_pragmas (p);
- idl_global->scopes()->pop();
+ idl_global->scopes ()->pop ();
}
;
@@ -634,18 +594,18 @@ value_header :
inheritance_spec
supports_spec
{
- $$ = new FE_obv_header (new UTL_ScopedName ($1, NULL), $3, $4);
+ $$ = new FE_obv_header (new UTL_ScopedName ($1, 0), $3, $4);
}
;
value_decl
: IDL_VALUETYPE
{
- idl_global->set_parse_state(IDL_GlobalData::PS_ValuetypeSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_ValuetypeSeen);
}
id
{
- idl_global->set_parse_state(IDL_GlobalData::PS_ValuetypeIDSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_ValuetypeIDSeen);
$$ = $3;
}
;
@@ -653,11 +613,14 @@ value_decl
opt_truncatable :
IDL_TRUNCATABLE
{
- cerr << "warning in " << idl_global->filename()->get_string()
- << " line " << idl_global->lineno() << ":\n" ;
- cerr << "truncatable modifier not supported and is ignored\n";
+ ACE_DEBUG ((LM_DEBUG,
+ ACE_TEXT ("warning in %s line %d\n"),
+ idl_global->filename ()->get_string (),
+ idl_global->lineno ()));
+ ACE_DEBUG ((LM_DEBUG,
+ ACE_TEXT ("truncatable modifier not supported ")
+ ACE_TEXT ("and is ignored\n")));
$$ = I_FALSE;
- /* $$ = I_TRUE; */
}
| /* EMPTY */
{
@@ -669,11 +632,11 @@ supports_spec :
IDL_SUPPORTS
scoped_name
{
- $$ = new UTL_NameList($2, NULL);
+ $$ = new UTL_NameList ($2, 0);
}
| /* empty */
{
- $$ = NULL;
+ $$ = 0;
}
;
@@ -681,42 +644,37 @@ value_forward_decl :
IDL_ABSTRACT
value_decl
{
- UTL_Scope *s = idl_global->scopes()->top_non_null();
- UTL_ScopedName *n = new UTL_ScopedName($2, NULL);
- AST_InterfaceFwd *f = NULL;
- UTL_StrList *p = idl_global->pragmas();
+ UTL_Scope *s = idl_global->scopes ()->top_non_null ();
+ UTL_ScopedName *n = new UTL_ScopedName ($2, 0);
+ AST_InterfaceFwd *f = 0;
- idl_global->set_parse_state(IDL_GlobalData::PS_ForwardDeclSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_ForwardDeclSeen);
/*
* Create a node representing a forward declaration of an
* valuetype. Store it in the enclosing scope
*/
- if (s != NULL) {
- f = idl_global->gen()->create_valuetype_fwd(n, p);
- // if ($1)
+ if (s != 0) {
+ f = idl_global->gen()->create_valuetype_fwd (n);
f->set_abstract_valuetype ();
- (void) s->fe_add_interface_fwd(f);
+ (void) s->fe_add_interface_fwd (f);
}
- idl_global->set_pragmas (p);
}
|
value_decl
{
- UTL_Scope *s = idl_global->scopes()->top_non_null();
- UTL_ScopedName *n = new UTL_ScopedName($1, NULL);
- AST_InterfaceFwd *f = NULL;
- UTL_StrList *p = idl_global->pragmas();
+ UTL_Scope *s = idl_global->scopes ()->top_non_null ();
+ UTL_ScopedName *n = new UTL_ScopedName ($1, 0);
+ AST_InterfaceFwd *f = 0;
- idl_global->set_parse_state(IDL_GlobalData::PS_ForwardDeclSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_ForwardDeclSeen);
/*
* Create a node representing a forward declaration of an
* valuetype. Store it in the enclosing scope
*/
- if (s != NULL) {
- f = idl_global->gen()->create_valuetype_fwd(n, p);
- (void) s->fe_add_interface_fwd(f);
+ if (s != 0) {
+ f = idl_global->gen ()->create_valuetype_fwd (n);
+ (void) s->fe_add_interface_fwd (f);
}
- idl_global->set_pragmas (p);
}
;
@@ -724,9 +682,13 @@ value_forward_decl :
value_box_decl
: value_decl type_spec /* in this order %!?*/
{
- cerr << "error in " << idl_global->filename()->get_string()
- << " line " << idl_global->lineno() << ":\n" ;
- cerr << "Sorry, I (TAO_IDL) can't handle boxes yet\n";
+ ACE_DEBUG ((LM_DEBUG,
+ ACE_TEXT ("error in %s 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 (" boxes yet\n")));
}
;
@@ -739,6 +701,7 @@ value_element
: state_member
| export
| init_decl
+ ';'
;
state_member
@@ -764,15 +727,15 @@ exports
export
: type_dcl
{
- idl_global->set_parse_state(IDL_GlobalData::PS_TypeDeclSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_TypeDeclSeen);
}
';'
{
- idl_global->set_parse_state(IDL_GlobalData::PS_NoState);
+ idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
}
| const_dcl
{
- idl_global->set_parse_state(IDL_GlobalData::PS_ConstDeclSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_ConstDeclSeen);
}
';'
{
@@ -780,35 +743,35 @@ export
}
| exception
{
- idl_global->set_parse_state(IDL_GlobalData::PS_ExceptDeclSeen);
+ 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);
}
| attribute
{
- idl_global->set_parse_state(IDL_GlobalData::PS_AttrDeclSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_AttrDeclSeen);
}
';'
{
- idl_global->set_parse_state(IDL_GlobalData::PS_NoState);
+ idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
}
| operation
{
- idl_global->set_parse_state(IDL_GlobalData::PS_OpDeclSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_OpDeclSeen);
}
';'
{
- idl_global->set_parse_state(IDL_GlobalData::PS_NoState);
+ idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
}
| error
{
- idl_global->err()->syntax_error(idl_global->parse_state());
+ idl_global->err()->syntax_error (idl_global->parse_state());
}
';'
{
- idl_global->set_parse_state(IDL_GlobalData::PS_NoState);
+ idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
yyerrok;
}
;
@@ -816,7 +779,7 @@ export
at_least_one_scoped_name :
scoped_name scoped_names
{
- $$ = new UTL_NameList($1, $2);
+ $$ = new UTL_NameList ($1, $2);
}
;
@@ -824,164 +787,153 @@ scoped_names
: scoped_names
','
{
- idl_global->set_parse_state(IDL_GlobalData::PS_SNListCommaSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_SNListCommaSeen);
}
scoped_name
{
- idl_global->set_parse_state(IDL_GlobalData::PS_ScopedNameSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_ScopedNameSeen);
- if ($1 == NULL)
- $$ = new UTL_NameList($4, NULL);
+ if ($1 == 0)
+ $$ = new UTL_NameList ($4, 0);
else {
- $1->nconc(new UTL_NameList($4, NULL));
+ $1->nconc (new UTL_NameList ($4, 0));
$$ = $1;
}
}
| /* EMPTY */
{
- $$ = NULL;
+ $$ = 0;
}
;
scoped_name
: id
{
- idl_global->set_parse_state(IDL_GlobalData::PS_SN_IDSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_SN_IDSeen);
- $$ = new UTL_IdList($1, NULL);
+ $$ = new UTL_IdList($1, 0);
}
| IDL_SCOPE_DELIMITOR
{
- idl_global->set_parse_state(IDL_GlobalData::PS_ScopeDelimSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_ScopeDelimSeen);
}
id
{
- idl_global->set_parse_state(IDL_GlobalData::PS_SN_IDSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_SN_IDSeen);
- $$ = new UTL_IdList(new Identifier($1),
- new UTL_IdList($3, NULL));
+ $$ = new UTL_IdList (new Identifier ($1),
+ new UTL_IdList ($3, 0));
}
| scoped_name
IDL_SCOPE_DELIMITOR
{
- idl_global->set_parse_state(IDL_GlobalData::PS_ScopeDelimSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_ScopeDelimSeen);
}
id
{
- idl_global->set_parse_state(IDL_GlobalData::PS_SN_IDSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_SN_IDSeen);
- $1->nconc(new UTL_IdList($4, NULL));
+ $1->nconc (new UTL_IdList ($4, 0));
$$ = $1;
}
;
id: IDENTIFIER
{
- $$ = new Identifier($1);
+ $$ = new Identifier ($1);
}
;
forward :
interface_decl
{
- UTL_Scope *s = idl_global->scopes()->top_non_null();
- UTL_ScopedName *n = new UTL_ScopedName($1, NULL);
- AST_InterfaceFwd *f = NULL;
- UTL_StrList *p = idl_global->pragmas();
+ UTL_Scope *s = idl_global->scopes ()->top_non_null ();
+ UTL_ScopedName *n = new UTL_ScopedName($1, 0);
+ AST_InterfaceFwd *f = 0;
- idl_global->set_parse_state(IDL_GlobalData::PS_ForwardDeclSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_ForwardDeclSeen);
/*
* Create a node representing a forward declaration of an
* interface. Store it in the enclosing scope
*/
- if (s != NULL) {
- f = idl_global->gen()->create_interface_fwd(n, p, 0, 0);
- (void) s->fe_add_interface_fwd(f);
+ if (s != 0) {
+ f = idl_global->gen ()->create_interface_fwd (n, 0, 0);
+ (void) s->fe_add_interface_fwd (f);
}
- idl_global->set_pragmas (p);
}
|
IDL_LOCAL interface_decl
{
- UTL_Scope *s = idl_global->scopes()->top_non_null();
- UTL_ScopedName *n = new UTL_ScopedName($2, NULL);
- AST_InterfaceFwd *f = NULL;
- UTL_StrList *p = idl_global->pragmas();
+ UTL_Scope *s = idl_global->scopes ()->top_non_null ();
+ UTL_ScopedName *n = new UTL_ScopedName ($2, 0);
+ AST_InterfaceFwd *f = 0;
- idl_global->set_parse_state(IDL_GlobalData::PS_ForwardDeclSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_ForwardDeclSeen);
/*
* Create a node representing a forward declaration of an
* interface. Store it in the enclosing scope
*/
- if (s != NULL) {
- f = idl_global->gen()->create_interface_fwd(n, p, 1, 0);
- (void) s->fe_add_interface_fwd(f);
+ if (s != 0) {
+ f = idl_global->gen ()->create_interface_fwd (n, 1, 0);
+ (void) s->fe_add_interface_fwd (f);
}
- idl_global->set_pragmas (p);
}
|
IDL_ABSTRACT interface_decl
{
- UTL_Scope *s = idl_global->scopes()->top_non_null();
- UTL_ScopedName *n = new UTL_ScopedName($2, NULL);
- AST_InterfaceFwd *f = NULL;
- UTL_StrList *p = idl_global->pragmas();
+ UTL_Scope *s = idl_global->scopes ()->top_non_null ();
+ UTL_ScopedName *n = new UTL_ScopedName ($2, 0);
+ AST_InterfaceFwd *f = 0;
- idl_global->set_parse_state(IDL_GlobalData::PS_ForwardDeclSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_ForwardDeclSeen);
/*
* Create a node representing a forward declaration of an
* interface. Store it in the enclosing scope
*/
- if (s != NULL) {
- f = idl_global->gen()->create_interface_fwd(n, p, 0, 1);
- (void) s->fe_add_interface_fwd(f);
+ if (s != 0) {
+ f = idl_global->gen ()->create_interface_fwd (n, 0, 1);
+ (void) s->fe_add_interface_fwd (f);
}
- idl_global->set_pragmas (p);
}
;
const_dcl :
IDL_CONST
{
- idl_global->set_parse_state(IDL_GlobalData::PS_ConstSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_ConstSeen);
}
const_type
{
- idl_global->set_parse_state(IDL_GlobalData::PS_ConstTypeSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_ConstTypeSeen);
}
id
{
- idl_global->set_parse_state(IDL_GlobalData::PS_ConstIDSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_ConstIDSeen);
}
'='
{
- idl_global->set_parse_state(IDL_GlobalData::PS_ConstAssignSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_ConstAssignSeen);
}
expression
{
- UTL_ScopedName *n = new UTL_ScopedName($5, NULL);
- UTL_Scope *s = idl_global->scopes()->top_non_null();
- AST_Constant *c = NULL;
- UTL_StrList *p = idl_global->pragmas();
- AST_Decl *v = NULL;
+ UTL_ScopedName *n = new UTL_ScopedName ($5, 0);
+ UTL_Scope *s = idl_global->scopes ()->top_non_null ();
+ AST_Constant *c = 0;
- ACE_UNUSED_ARG (v);
-
- idl_global->set_parse_state(IDL_GlobalData::PS_ConstExprSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_ConstExprSeen);
/*
* Create a node representing a constant declaration. Store
* it in the enclosing scope
*/
- if ($9 != NULL && s != NULL) {
- if ($9->coerce($3) == NULL)
- idl_global->err()->coercion_error($9, $3);
+ if ($9 != 0 && s != 0) {
+ if ($9->coerce ($3) == 0)
+ idl_global->err ()->coercion_error ($9, $3);
else {
c =
- idl_global->gen()->create_constant($3, $9, n, p);
- (void) s->fe_add_constant(c);
+ idl_global->gen ()->create_constant ($3, $9, n);
+ (void) s->fe_add_constant (c);
}
}
- idl_global->set_pragmas (p);
}
;
@@ -1002,31 +954,31 @@ const_type
}
| scoped_name
{
- UTL_Scope *s = idl_global->scopes()->top_non_null();
- AST_Decl *d = NULL;
- AST_PredefinedType *c = NULL;
- AST_Typedef *t = NULL;
+ UTL_Scope *s = idl_global->scopes ()->top_non_null ();
+ AST_Decl *d = 0;
+ AST_PredefinedType *c = 0;
+ AST_Typedef *t = 0;
/*
* If the constant's type is a scoped name, it must resolve
* to a scalar constant type
*/
- if (s != NULL && (d = s->lookup_by_name($1, I_TRUE)) != NULL) {
+ if (s != 0 && (d = s->lookup_by_name ($1, I_TRUE)) != 0) {
/*
* Look through typedefs
*/
- while (d->node_type() == AST_Decl::NT_typedef) {
- t = AST_Typedef::narrow_from_decl(d);
- if (t == NULL)
+ while (d->node_type () == AST_Decl::NT_typedef) {
+ t = AST_Typedef::narrow_from_decl (d);
+ if (t == 0)
break;
- d = t->base_type();
+ d = t->base_type ();
}
- if (d == NULL)
+ if (d == 0)
$$ = AST_Expression::EV_any;
- else if (d->node_type() == AST_Decl::NT_pre_defined) {
- c = AST_PredefinedType::narrow_from_decl(d);
- if (c != NULL) {
- $$ = idl_global->PredefinedTypeToExprType(c->pt());
+ else if (d->node_type () == AST_Decl::NT_pre_defined) {
+ c = AST_PredefinedType::narrow_from_decl (d);
+ if (c != 0) {
+ $$ = idl_global->PredefinedTypeToExprType (c->pt ());
} else {
$$ = AST_Expression::EV_any;
}
@@ -1048,7 +1000,9 @@ const_expr : or_expr ;
or_expr : xor_expr
| or_expr '|' xor_expr
{
- $$ = idl_global->gen()->create_expr(AST_Expression::EC_or, $1, $3);
+ $$ = idl_global->gen ()->create_expr (AST_Expression::EC_or,
+ $1,
+ $3);
}
;
@@ -1056,7 +1010,9 @@ xor_expr
: and_expr
| xor_expr '^' and_expr
{
- $$ = idl_global->gen()->create_expr(AST_Expression::EC_xor, $1, $3);
+ $$ = idl_global->gen ()->create_expr (AST_Expression::EC_xor,
+ $1,
+ $3);
}
;
@@ -1064,7 +1020,9 @@ and_expr
: shift_expr
| and_expr '&' shift_expr
{
- $$ = idl_global->gen()->create_expr(AST_Expression::EC_and, $1, $3);
+ $$ = idl_global->gen ()->create_expr (AST_Expression::EC_and,
+ $1,
+ $3);
}
;
@@ -1072,11 +1030,15 @@ shift_expr
: add_expr
| shift_expr IDL_LEFT_SHIFT add_expr
{
- $$ = idl_global->gen()->create_expr(AST_Expression::EC_left,$1,$3);
+ $$ = idl_global->gen ()->create_expr (AST_Expression::EC_left,
+ $1,
+ $3);
}
| shift_expr IDL_RIGHT_SHIFT add_expr
{
- $$ = idl_global->gen()->create_expr(AST_Expression::EC_right,$1,$3);
+ $$ = idl_global->gen ()->create_expr (AST_Expression::EC_right,
+ $1,
+ $3);
}
;
@@ -1084,11 +1046,15 @@ add_expr
: mult_expr
| add_expr '+' mult_expr
{
- $$ = idl_global->gen()->create_expr(AST_Expression::EC_add, $1, $3);
+ $$ = idl_global->gen ()->create_expr (AST_Expression::EC_add,
+ $1,
+ $3);
}
| add_expr '-' mult_expr
{
- $$ = idl_global->gen()->create_expr(AST_Expression::EC_minus,$1,$3);
+ $$ = idl_global->gen ()->create_expr (AST_Expression::EC_minus,
+ $1,
+ $3);
}
;
@@ -1096,15 +1062,21 @@ mult_expr
: unary_expr
| mult_expr '*' unary_expr
{
- $$ = idl_global->gen()->create_expr(AST_Expression::EC_mul, $1, $3);
+ $$ = idl_global->gen ()->create_expr (AST_Expression::EC_mul,
+ $1,
+ $3);
}
| mult_expr '/' unary_expr
{
- $$ = idl_global->gen()->create_expr(AST_Expression::EC_div, $1, $3);
+ $$ = idl_global->gen ()->create_expr (AST_Expression::EC_div,
+ $1,
+ $3);
}
| mult_expr '%' unary_expr
{
- $$ = idl_global->gen()->create_expr(AST_Expression::EC_mod, $1, $3);
+ $$ = idl_global->gen ()->create_expr (AST_Expression::EC_mod,
+ $1,
+ $3);
}
;
@@ -1112,21 +1084,21 @@ unary_expr
: primary_expr
| '+' primary_expr
{
- $$ = idl_global->gen()->create_expr(AST_Expression::EC_u_plus,
- $2,
- NULL);
+ $$ = idl_global->gen ()->create_expr (AST_Expression::EC_u_plus,
+ $2,
+ 0);
}
| '-' primary_expr
{
- $$ = idl_global->gen()->create_expr(AST_Expression::EC_u_minus,
- $2,
- NULL);
+ $$ = idl_global->gen()->create_expr (AST_Expression::EC_u_minus,
+ $2,
+ 0);
}
| '~' primary_expr
{
- $$ = idl_global->gen()->create_expr(AST_Expression::EC_bit_neg,
- $2,
- NULL);
+ $$ = idl_global->gen()->create_expr (AST_Expression::EC_bit_neg,
+ $2,
+ 0);
}
;
@@ -1138,7 +1110,7 @@ primary_expr
* but only when it is evaluated (such as when it is assigned
* as a constant value).
*/
- UTL_Scope *s = idl_global->scopes()->top_non_null ();
+ UTL_Scope *s = idl_global->scopes ()->top_non_null ();
AST_Decl *d = s->lookup_by_name ($1,
1);
@@ -1171,42 +1143,42 @@ primary_expr
literal
: IDL_INTEGER_LITERAL
{
- $$ = idl_global->gen()->create_expr($1);
+ $$ = idl_global->gen ()->create_expr ($1);
}
| IDL_UINTEGER_LITERAL
{
- $$ = idl_global->gen()->create_expr($1);
+ $$ = idl_global->gen ()->create_expr ($1);
}
| IDL_STRING_LITERAL
{
- $$ = idl_global->gen()->create_expr($1);
+ $$ = idl_global->gen ()->create_expr ($1);
}
| IDL_WSTRING_LITERAL
{
- $$ = idl_global->gen()->create_expr($1);
+ $$ = idl_global->gen ()->create_expr ($1);
}
| IDL_CHARACTER_LITERAL
{
- $$ = idl_global->gen()->create_expr($1);
+ $$ = idl_global->gen ()->create_expr ($1);
}
| IDL_WCHAR_LITERAL
{
ACE_OutputCDR::from_wchar wc ($1);
- $$ = idl_global->gen()->create_expr(wc);
+ $$ = idl_global->gen ()->create_expr (wc);
}
| IDL_FLOATING_PT_LITERAL
{
- $$ = idl_global->gen()->create_expr($1);
+ $$ = idl_global->gen ()->create_expr ($1);
}
| IDL_TRUETOK
{
- $$ = idl_global->gen()->create_expr((idl_bool) I_TRUE,
- AST_Expression::EV_bool);
+ $$ = idl_global->gen ()->create_expr ((idl_bool) I_TRUE,
+ AST_Expression::EV_bool);
}
| IDL_FALSETOK
{
- $$ = idl_global->gen()->create_expr((idl_bool) I_FALSE,
- AST_Expression::EV_bool);
+ $$ = idl_global->gen ()->create_expr ((idl_bool) I_FALSE,
+ AST_Expression::EV_bool);
}
;
@@ -1280,7 +1252,7 @@ positive_int_expr :
type_dcl
: IDL_TYPEDEF
{
- idl_global->set_parse_state(IDL_GlobalData::PS_TypedefSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_TypedefSeen);
}
type_declarator {$$ = 0;}
| struct_type { $$ = 0;}
@@ -1288,67 +1260,58 @@ type_dcl
| enum_type { $$ = 0;}
| IDL_NATIVE simple_declarator
{
- UTL_Scope *s = idl_global->scopes()->top_non_null();
- AST_Native *node = NULL;
- AST_Decl *v = NULL;
- UTL_StrList *p = idl_global->pragmas();
-
- ACE_UNUSED_ARG (v);
+ UTL_Scope *s = idl_global->scopes ()->top_non_null ();
+ AST_Native *node = 0;
- idl_global->set_parse_state(IDL_GlobalData::PS_NativeSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_NativeSeen);
/*
* Create a node representing a Native and add it to its
* enclosing scope
*/
- if (s != NULL) {
- node = idl_global->gen()->create_native ($2->name (), p);
+ if (s != 0) {
+ node = idl_global->gen ()->create_native ($2->name ());
/*
* Add it to its defining scope
*/
(void) s->fe_add_native (node);
}
- idl_global->set_pragmas (p);
}
;
type_declarator :
type_spec
{
- idl_global->set_parse_state(IDL_GlobalData::PS_TypeSpecSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_TypeSpecSeen);
}
at_least_one_declarator
{
- UTL_Scope *s = idl_global->scopes()->top_non_null();
+ UTL_Scope *s = idl_global->scopes ()->top_non_null ();
UTL_DecllistActiveIterator *l;
- FE_Declarator *d = NULL;
- AST_Typedef *t = NULL;
- AST_Decl *v = NULL;
- UTL_StrList *p = idl_global->pragmas();
+ FE_Declarator *d = 0;
+ AST_Typedef *t = 0;
- ACE_UNUSED_ARG (v);
-
- idl_global->set_parse_state(IDL_GlobalData::PS_DeclaratorsSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_DeclaratorsSeen);
/*
* Create a list of type renamings. Add them to the
* enclosing scope
*/
- if (s != NULL && $1 != NULL && $3 != NULL) {
- l = new UTL_DecllistActiveIterator($3);
- for (;!(l->is_done()); l->next()) {
- d = l->item();
- if (d == NULL)
- continue;
- AST_Type * tp = d->compose($1);
- if (tp == NULL)
- continue;
- t = idl_global->gen()->create_typedef(tp, d->name(), p,
- s->is_local (),
- s->is_abstract ());
- (void) s->fe_add_typedef(t);
+ if (s != 0 && $1 != 0 && $3 != 0) {
+ l = new UTL_DecllistActiveIterator ($3);
+ for (;!(l->is_done ()); l->next ()) {
+ d = l->item ();
+ if (d == 0)
+ continue;
+ AST_Type * tp = d->compose ($1);
+ if (tp == 0)
+ continue;
+ t = idl_global->gen ()->create_typedef (tp,
+ d->name (),
+ s->is_local (),
+ s->is_abstract ());
+ (void) s->fe_add_typedef (t);
}
delete l;
}
- idl_global->set_pragmas (p);
}
;
@@ -1360,18 +1323,18 @@ type_spec
simple_type_spec
: base_type_spec
{
- $$ = idl_global->scopes()->bottom()->lookup_primitive_type($1);
+ $$ = idl_global->scopes ()->bottom ()->lookup_primitive_type ($1);
}
| template_type_spec
| scoped_name
{
- UTL_Scope *s = idl_global->scopes()->top_non_null();
- AST_Decl *d = NULL;
+ UTL_Scope *s = idl_global->scopes ()->top_non_null ();
+ AST_Decl *d = 0;
- if (s != NULL)
- d = s->lookup_by_name($1, I_TRUE);
- if (d == NULL)
- idl_global->err()->lookup_error($1);
+ if (s != 0)
+ d = s->lookup_by_name ($1, I_TRUE);
+ if (d == 0)
+ idl_global->err ()->lookup_error ($1);
$$ = d;
}
;
@@ -1401,7 +1364,7 @@ constructed_type_spec
at_least_one_declarator :
declarator declarators
{
- $$ = new UTL_DeclList($1, $2);
+ $$ = new UTL_DeclList ($1, $2);
}
;
@@ -1409,22 +1372,22 @@ declarators
: declarators
','
{
- idl_global->set_parse_state(IDL_GlobalData::PS_DeclsCommaSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_DeclsCommaSeen);
}
declarator
{
- idl_global->set_parse_state(IDL_GlobalData::PS_DeclsDeclSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_DeclsDeclSeen);
- if ($1 == NULL)
- $$ = new UTL_DeclList($4, NULL);
+ if ($1 == 0)
+ $$ = new UTL_DeclList ($4, 0);
else {
- $1->nconc(new UTL_DeclList($4, NULL));
+ $1->nconc (new UTL_DeclList ($4, 0));
$$ = $1;
}
}
| /* EMPTY */
{
- $$ = NULL;
+ $$ = 0;
}
;
@@ -1436,7 +1399,7 @@ declarator
at_least_one_simple_declarator :
simple_declarator simple_declarators
{
- $$ = new UTL_DeclList($1, $2);
+ $$ = new UTL_DeclList ($1, $2);
}
;
@@ -1444,39 +1407,40 @@ simple_declarators
: simple_declarators
','
{
- idl_global->set_parse_state(IDL_GlobalData::PS_DeclsCommaSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_DeclsCommaSeen);
}
simple_declarator
{
- idl_global->set_parse_state(IDL_GlobalData::PS_DeclsDeclSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_DeclsDeclSeen);
- if ($1 == NULL)
- $$ = new UTL_DeclList($4, NULL);
+ if ($1 == 0)
+ $$ = new UTL_DeclList ($4, 0);
else {
- $1->nconc(new UTL_DeclList($4, NULL));
+ $1->nconc (new UTL_DeclList ($4, 0));
$$ = $1;
}
}
| /* EMPTY */
{
- $$ = NULL;
+ $$ = 0;
}
;
simple_declarator :
id
{
- $$ = new FE_Declarator(new UTL_ScopedName($1, NULL),
- FE_Declarator::FD_simple, NULL);
+ $$ = new FE_Declarator (new UTL_ScopedName ($1, 0),
+ FE_Declarator::FD_simple, 0);
}
;
complex_declarator :
array_declarator
{
- $$ = new FE_Declarator(new UTL_ScopedName($1->local_name(), NULL),
- FE_Declarator::FD_complex,
- $1);
+ $$ = new FE_Declarator (new UTL_ScopedName ($1->local_name (),
+ 0),
+ FE_Declarator::FD_complex,
+ $1);
}
;
@@ -1533,9 +1497,13 @@ floating_pt_type
fixed_type
: IDL_FIXED
{
- cerr << "error in " << idl_global->filename()->get_string()
- << " line " << idl_global->lineno() << ":\n" ;
- cerr << "Sorry, I (TAO_IDL) can't handle fixed types yet\n";
+ ACE_DEBUG ((LM_DEBUG,
+ ACE_TEXT ("error in %s 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 (" fixed types yet\n")));
}
;
@@ -1574,57 +1542,48 @@ any_type
struct_type :
IDL_STRUCT
{
- idl_global->set_parse_state(IDL_GlobalData::PS_StructSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_StructSeen);
}
id
{
- UTL_Scope *s = idl_global->scopes()->top_non_null();
- UTL_ScopedName *n = new UTL_ScopedName($3, NULL);
- AST_Structure *d = NULL;
- UTL_StrList *p = idl_global->pragmas();
- AST_Decl *v = NULL;
-
- ACE_UNUSED_ARG (v);
+ UTL_Scope *s = idl_global->scopes ()->top_non_null ();
+ UTL_ScopedName *n = new UTL_ScopedName ($3, 0);
+ AST_Structure *d = 0;
- idl_global->set_parse_state(IDL_GlobalData::PS_StructIDSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_StructIDSeen);
/*
* Create a node representing a struct declaration. Add it
* to the enclosing scope
*/
- if (s != NULL) {
- d = idl_global->gen()->create_structure(n,
- p,
- s->is_local (),
- s->is_abstract ());
- (void) s->fe_add_structure(d);
+ if (s != 0) {
+ d = idl_global->gen ()->create_structure (n,
+ s->is_local (),
+ s->is_abstract ());
+ (void) s->fe_add_structure (d);
}
/*
* Push the scope of the struct on the scopes stack
*/
- idl_global->scopes()->push(d);
+ idl_global->scopes ()->push (d);
}
'{'
{
- idl_global->set_parse_state(IDL_GlobalData::PS_StructSqSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_StructSqSeen);
}
at_least_one_member
{
- idl_global->set_parse_state(IDL_GlobalData::PS_StructBodySeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_StructBodySeen);
}
'}'
{
- idl_global->set_parse_state(IDL_GlobalData::PS_StructQsSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_StructQsSeen);
/*
* Done with this struct. Pop its scope off the scopes stack
*/
- $$ =
- AST_Structure::narrow_from_scope(
- idl_global->scopes()->top_non_null());
- UTL_StrList *p = $$->pragmas ();
- if (p != 0)
- p = (UTL_StrList*)p->copy ();
- idl_global->set_pragmas (p);
- idl_global->scopes()->pop();
+ $$ = AST_Structure::narrow_from_scope (
+ idl_global->scopes ()->top_non_null ()
+ );
+ idl_global->scopes ()->pop ();
}
;
@@ -1646,53 +1605,55 @@ member :
member_i:
type_spec
{
- idl_global->set_parse_state(IDL_GlobalData::PS_MemberTypeSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_MemberTypeSeen);
}
at_least_one_declarator
{
- idl_global->set_parse_state(IDL_GlobalData::PS_MemberDeclsSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_MemberDeclsSeen);
}
';'
{
- UTL_Scope *s = idl_global->scopes()->top_non_null();
- UTL_DecllistActiveIterator *l = NULL;
- FE_Declarator *d = NULL;
- AST_Field *f = NULL;
- UTL_StrList *p = idl_global->pragmas();
+ UTL_Scope *s = idl_global->scopes ()->top_non_null ();
+ UTL_DecllistActiveIterator *l = 0;
+ FE_Declarator *d = 0;
+ AST_Field *f = 0;
- idl_global->set_parse_state(IDL_GlobalData::PS_MemberDeclsCompleted);
+ idl_global->set_parse_state (IDL_GlobalData::PS_MemberDeclsCompleted);
/*
* Check for illegal recursive use of type
*/
- if ($1 != NULL && AST_illegal_recursive_type($1))
- idl_global->err()->error1(UTL_Error::EIDL_RECURSIVE_TYPE, $1);
+ if ($1 != 0 && AST_illegal_recursive_type ($1))
+ idl_global->err ()->error1 (UTL_Error::EIDL_RECURSIVE_TYPE,
+ $1);
/*
* Create a node representing a struct or exception member
* Add it to the enclosing scope
*/
- else if (s != NULL && $1 != NULL && $3 != NULL) {
- l = new UTL_DecllistActiveIterator($3);
- for (;!(l->is_done()); l->next()) {
- d = l->item();
- if (d == NULL)
+ else if (s != 0 && $1 != 0 && $3 != 0) {
+ l = new UTL_DecllistActiveIterator ($3);
+ for (;!(l->is_done ()); l->next ()) {
+ d = l->item ();
+ if (d == 0)
continue;
- AST_Type *tp = d->compose($1);
- if (tp == NULL)
+ AST_Type *tp = d->compose ($1);
+ if (tp == 0)
continue;
/* $0 denotes Visibility, must be on yacc reduction stack */
- f = idl_global->gen()->create_field(tp, d->name(), p, $<vival>0);
- (void) s->fe_add_field(f);
+ f = idl_global->gen ()->create_field (tp,
+ d->name (),
+ $<vival>0);
+ (void) s->fe_add_field (f);
}
delete l;
}
}
| error
{
- idl_global->err()->syntax_error(idl_global->parse_state());
+ idl_global->err()->syntax_error (idl_global->parse_state ());
}
';'
{
- idl_global->set_parse_state(IDL_GlobalData::PS_NoState);
+ idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
yyerrok;
}
;
@@ -1700,82 +1661,72 @@ member_i:
union_type :
IDL_UNION
{
- idl_global->set_parse_state(IDL_GlobalData::PS_UnionSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_UnionSeen);
}
id
{
- idl_global->set_parse_state(IDL_GlobalData::PS_UnionIDSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_UnionIDSeen);
}
IDL_SWITCH
{
- idl_global->set_parse_state(IDL_GlobalData::PS_SwitchSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_SwitchSeen);
}
'('
{
- idl_global->set_parse_state(IDL_GlobalData::PS_SwitchOpenParSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_SwitchOpenParSeen);
}
switch_type_spec
{
- idl_global->set_parse_state(IDL_GlobalData::PS_SwitchTypeSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_SwitchTypeSeen);
}
')'
{
- UTL_Scope *s = idl_global->scopes()->top_non_null();
- UTL_ScopedName *n = new UTL_ScopedName($3, NULL);
- AST_Union *u = NULL;
- AST_Decl *v = NULL;
- UTL_StrList *p = idl_global->pragmas();
+ UTL_Scope *s = idl_global->scopes ()->top_non_null ();
+ UTL_ScopedName *n = new UTL_ScopedName ($3, 0);
+ AST_Union *u = 0;
- ACE_UNUSED_ARG (v);
-
- idl_global->set_parse_state(IDL_GlobalData::PS_SwitchCloseParSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_SwitchCloseParSeen);
/*
* Create a node representing a union. Add it to its enclosing
* scope
*/
- if ($9 != NULL && s != NULL) {
- AST_ConcreteType *tp = AST_ConcreteType::narrow_from_decl($9);
- if (tp == NULL) {
- idl_global->err()->not_a_type($9);
+ if ($9 != 0 && s != 0) {
+ AST_ConcreteType *tp = AST_ConcreteType::narrow_from_decl ($9);
+ if (tp == 0) {
+ idl_global->err ()->not_a_type ($9);
} else {
- u = idl_global->gen()->create_union(tp,
- n,
- p,
- s->is_local (),
- s->is_abstract ());
- (void) s->fe_add_union(u);
+ u = idl_global->gen ()->create_union (tp,
+ n,
+ s->is_local (),
+ s->is_abstract ());
+ (void) s->fe_add_union (u);
}
}
/*
* Push the scope of the union on the scopes stack
*/
- idl_global->scopes()->push(u);
+ idl_global->scopes()->push (u);
}
'{'
{
- idl_global->set_parse_state(IDL_GlobalData::PS_UnionSqSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_UnionSqSeen);
}
at_least_one_case_branch
{
- idl_global->set_parse_state(IDL_GlobalData::PS_UnionBodySeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_UnionBodySeen);
}
'}'
{
- idl_global->set_parse_state(IDL_GlobalData::PS_UnionQsSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_UnionQsSeen);
/*
* Done with this union. Pop its scope from the scopes stack
*/
- $$ =
- AST_Union::narrow_from_scope (
- idl_global->scopes()->top_non_null()
- );
+ $$ = AST_Union::narrow_from_scope (
+ idl_global->scopes ()->top_non_null ()
+ );
if ($$ != 0)
{
- UTL_StrList *p = $$->pragmas ();
- if (p != 0)
- p = (UTL_StrList*)p->copy ();
- idl_global->set_pragmas (p);
- idl_global->scopes()->pop();
+ idl_global->scopes ()->pop ();
}
}
;
@@ -1783,30 +1734,36 @@ union_type :
switch_type_spec :
integer_type
{
- $$ = idl_global->scopes()->bottom()->lookup_primitive_type($1);
+ $$ = idl_global->scopes ()->bottom ()->lookup_primitive_type ($1);
}
| char_type
{
- $$ = idl_global->scopes()->bottom()->lookup_primitive_type($1);
+ /* wchars are not allowed */
+ if ($1 == AST_Expression::EV_wchar)
+ {
+ idl_global->err ()->error0 (UTL_Error::EIDL_DISC_TYPE);
+ }
+
+ $$ = idl_global->scopes ()->bottom ()->lookup_primitive_type ($1);
}
| octet_type
{
- // octets are not allowed
+ /* octets are not allowed */
idl_global->err ()->error0 (UTL_Error::EIDL_DISC_TYPE);
- $$ = idl_global->scopes()->bottom()->lookup_primitive_type($1);
+ $$ = idl_global->scopes ()->bottom ()->lookup_primitive_type ($1);
}
| boolean_type
{
- $$ = idl_global->scopes()->bottom()->lookup_primitive_type($1);
+ $$ = idl_global->scopes ()->bottom ()->lookup_primitive_type ($1);
}
| enum_type
| scoped_name
{
- UTL_Scope *s = idl_global->scopes()->top_non_null();
- AST_Decl *d = NULL;
- AST_PredefinedType *p = NULL;
- AST_Typedef *t = NULL;
- long found = I_FALSE;
+ UTL_Scope *s = idl_global->scopes ()->top_non_null ();
+ AST_Decl *d = 0;
+ AST_PredefinedType *p = 0;
+ AST_Typedef *t = 0;
+ long found = I_FALSE;
/*
* The discriminator is a scoped name. Try to resolve to
@@ -1814,17 +1771,17 @@ switch_type_spec :
* typedef's to arrive at the base type at the end of the
* chain
*/
- if (s != NULL && (d = s->lookup_by_name($1, I_TRUE)) != NULL) {
+ if (s != 0 && (d = s->lookup_by_name ($1, I_TRUE)) != 0) {
while (!found) {
- switch (d->node_type()) {
+ switch (d->node_type ()) {
case AST_Decl::NT_enum:
$$ = d;
found = I_TRUE;
break;
case AST_Decl::NT_pre_defined:
- p = AST_PredefinedType::narrow_from_decl(d);
- if (p != NULL) {
- switch (p->pt()) {
+ p = AST_PredefinedType::narrow_from_decl (d);
+ if (p != 0) {
+ switch (p->pt ()) {
case AST_PredefinedType::PT_long:
case AST_PredefinedType::PT_ulong:
case AST_PredefinedType::PT_longlong:
@@ -1832,43 +1789,43 @@ switch_type_spec :
case AST_PredefinedType::PT_short:
case AST_PredefinedType::PT_ushort:
case AST_PredefinedType::PT_char:
- case AST_PredefinedType::PT_wchar:
case AST_PredefinedType::PT_boolean:
$$ = p;
found = I_TRUE;
break;
+ case AST_PredefinedType::PT_wchar:
case AST_PredefinedType::PT_octet:
- // octets are not allowed
+ /* octets and wchars are not allowed */
idl_global->err ()->error0 (UTL_Error::EIDL_DISC_TYPE);
- $$ = NULL;
+ $$ = 0;
found = I_TRUE;
break;
default:
- $$ = NULL;
+ $$ = 0;
found = I_TRUE;
break;
}
} else
{
- $$ = NULL;
+ $$ = 0;
found = I_TRUE;
}
break;
case AST_Decl::NT_typedef:
- t = AST_Typedef::narrow_from_decl(d);
- if (t != NULL) d = t->base_type();
+ t = AST_Typedef::narrow_from_decl (d);
+ if (t != 0) d = t->base_type ();
break;
default:
- $$ = NULL;
+ $$ = 0;
found = I_TRUE;
break;
}
}
} else
- $$ = NULL;
+ $$ = 0;
- if ($$ == NULL)
- idl_global->err()->lookup_error($1);
+ if ($$ == 0)
+ idl_global->err ()->lookup_error ($1);
}
;
@@ -1882,44 +1839,38 @@ case_branches
case_branch :
at_least_one_case_label
{
- idl_global->set_parse_state(IDL_GlobalData::PS_UnionLabelSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_UnionLabelSeen);
}
element_spec
{
- idl_global->set_parse_state(IDL_GlobalData::PS_UnionElemSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_UnionElemSeen);
}
';'
{
- UTL_Scope *s = idl_global->scopes()->top_non_null();
- UTL_LabellistActiveIterator *l = NULL;
- AST_UnionLabel *d = NULL;
- AST_UnionBranch *b = NULL;
- AST_Field *f = $3;
-
- ACE_UNUSED_ARG (l);
- ACE_UNUSED_ARG (d);
+ UTL_Scope *s = idl_global->scopes ()->top_non_null ();
+ AST_UnionBranch *b = 0;
+ AST_Field *f = $3;
- idl_global->set_parse_state(IDL_GlobalData::PS_UnionElemCompleted);
+ idl_global->set_parse_state (IDL_GlobalData::PS_UnionElemCompleted);
/*
* Create several nodes representing branches of a union.
* Add them to the enclosing scope (the union scope)
*/
- if (s != NULL && $1 != NULL && $3 != NULL) {
- b = idl_global->gen()->create_union_branch($1,
- f->field_type(),
- f->name(),
- f->pragmas());
- (void) s->fe_add_union_branch(b);
+ if (s != 0 && $1 != 0 && $3 != 0) {
+ b = idl_global->gen ()->create_union_branch ($1,
+ f->field_type (),
+ f->name ());
+ (void) s->fe_add_union_branch (b);
}
}
| error
{
- idl_global->err()->syntax_error(idl_global->parse_state());
+ idl_global->err()->syntax_error (idl_global->parse_state());
}
';'
{
- idl_global->set_parse_state(IDL_GlobalData::PS_NoState);
+ idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
yyerrok;
}
;
@@ -1927,82 +1878,84 @@ case_branch :
at_least_one_case_label :
case_label case_labels
{
- $$ = new UTL_LabelList($1, $2);
+ $$ = new UTL_LabelList ($1, $2);
}
;
case_labels
: case_labels case_label
{
- if ($1 == NULL)
- $$ = new UTL_LabelList($2, NULL);
+ if ($1 == 0)
+ $$ = new UTL_LabelList ($2, 0);
else {
- $1->nconc(new UTL_LabelList($2, NULL));
+ $1->nconc(new UTL_LabelList ($2, 0));
$$ = $1;
}
}
| /* EMPTY */
{
- $$ = NULL;
+ $$ = 0;
}
;
case_label
: IDL_DEFAULT
{
- idl_global->set_parse_state(IDL_GlobalData::PS_DefaultSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_DefaultSeen);
}
':'
{
- idl_global->set_parse_state(IDL_GlobalData::PS_LabelColonSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_LabelColonSeen);
- $$ = idl_global->gen()->
- create_union_label(AST_UnionLabel::UL_default,
- NULL);
+ $$ = idl_global->gen ()->create_union_label (
+ AST_UnionLabel::UL_default,
+ 0
+ );
}
| IDL_CASE
{
- idl_global->set_parse_state(IDL_GlobalData::PS_CaseSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_CaseSeen);
}
const_expr
{
- idl_global->set_parse_state(IDL_GlobalData::PS_LabelExprSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_LabelExprSeen);
}
':'
{
- idl_global->set_parse_state(IDL_GlobalData::PS_LabelColonSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_LabelColonSeen);
- $$ = idl_global->gen()->create_union_label(AST_UnionLabel::UL_label,
- $3);
+ $$ = idl_global->gen()->create_union_label (
+ AST_UnionLabel::UL_label,
+ $3
+ );
}
;
element_spec :
type_spec
{
- idl_global->set_parse_state(IDL_GlobalData::PS_UnionElemTypeSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_UnionElemTypeSeen);
}
declarator
{
- idl_global->set_parse_state(IDL_GlobalData::PS_UnionElemDeclSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_UnionElemDeclSeen);
/*
* Check for illegal recursive use of type
*/
- if ($1 != NULL && AST_illegal_recursive_type($1))
- idl_global->err()->error1(UTL_Error::EIDL_RECURSIVE_TYPE, $1);
+ if ($1 != 0 && AST_illegal_recursive_type ($1))
+ idl_global->err()->error1 (UTL_Error::EIDL_RECURSIVE_TYPE, $1);
/*
* Create a field in a union branch
*/
- else if ($1 == NULL || $3 == NULL)
- $$ = NULL;
+ else if ($1 == 0 || $3 == 0)
+ $$ = 0;
else {
- AST_Type *tp = $3->compose($1);
- if (tp == NULL)
- $$ = NULL;
+ AST_Type *tp = $3->compose ($1);
+ if (tp == 0)
+ $$ = 0;
else
- $$ = idl_global->gen()->create_field(tp,
- $3->name(),
- idl_global->pragmas());
+ $$ = idl_global->gen ()->create_field (tp,
+ $3->name());
}
}
;
@@ -2010,61 +1963,55 @@ element_spec :
enum_type :
IDL_ENUM
{
- idl_global->set_parse_state(IDL_GlobalData::PS_EnumSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_EnumSeen);
}
id
{
- UTL_Scope *s = idl_global->scopes()->top_non_null();
- UTL_ScopedName *n = new UTL_ScopedName($3, NULL);
- AST_Enum *e = NULL;
- AST_Decl *v = NULL;
- UTL_StrList *p = idl_global->pragmas();
+ UTL_Scope *s = idl_global->scopes ()->top_non_null ();
+ UTL_ScopedName *n = new UTL_ScopedName($3, 0);
+ AST_Enum *e = 0;
- ACE_UNUSED_ARG (v);
-
- idl_global->set_parse_state(IDL_GlobalData::PS_EnumIDSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_EnumIDSeen);
/*
* Create a node representing an enum and add it to its
* enclosing scope
*/
- if (s != NULL) {
- e = idl_global->gen()->create_enum(n,
- p,
- s->is_local (),
- s->is_abstract ());
+ if (s != 0) {
+ e = idl_global->gen ()->create_enum (n,
+ s->is_local (),
+ s->is_abstract ());
/*
* Add it to its defining scope
*/
- (void) s->fe_add_enum(e);
+ (void) s->fe_add_enum (e);
}
/*
* Push the enum scope on the scopes stack
*/
- idl_global->scopes()->push(e);
+ idl_global->scopes ()->push (e);
}
'{'
{
- idl_global->set_parse_state(IDL_GlobalData::PS_EnumSqSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_EnumSqSeen);
}
at_least_one_enumerator
{
- idl_global->set_parse_state(IDL_GlobalData::PS_EnumBodySeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_EnumBodySeen);
}
'}'
{
- UTL_StrList *p = 0;
- idl_global->set_parse_state(IDL_GlobalData::PS_EnumQsSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_EnumQsSeen);
/*
* Done with this enum. Pop its scope from the scopes stack
*/
- if (idl_global->scopes()->top() == NULL)
- $$ = NULL;
+ if (idl_global->scopes ()->top () == 0)
+ $$ = 0;
else {
- $$ = AST_Enum::narrow_from_scope(idl_global->scopes()->top_non_null());
- p = $$->pragmas ();
- idl_global->scopes()->pop();
+ $$ = AST_Enum::narrow_from_scope (
+ idl_global->scopes ()->top_non_null ()
+ );
+ idl_global->scopes ()->pop ();
}
- idl_global->set_pragmas (p);
}
;
@@ -2074,7 +2021,7 @@ enumerators
: enumerators
','
{
- idl_global->set_parse_state(IDL_GlobalData::PS_EnumCommaSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_EnumCommaSeen);
}
enumerator
| /* EMPTY */
@@ -2083,22 +2030,22 @@ enumerators
enumerator :
IDENTIFIER
{
- UTL_Scope *s = idl_global->scopes()->top_non_null();
- UTL_ScopedName *n =
- new UTL_ScopedName(new Identifier($1), NULL);
- AST_EnumVal *e = NULL;
- AST_Enum *c = NULL;
- UTL_StrList *p = idl_global->pragmas();
+ UTL_Scope *s = idl_global->scopes ()->top_non_null ();
+ UTL_ScopedName *n =
+ new UTL_ScopedName (new Identifier ($1), 0);
+ AST_EnumVal *e = 0;
+ AST_Enum *c = 0;
/*
* Create a node representing one enumerator in an enum
* Add it to the enclosing scope (the enum scope)
*/
- if (s != NULL && s->scope_node_type() == AST_Decl::NT_enum) {
- c = AST_Enum::narrow_from_scope(s);
- if (c != NULL)
- e = idl_global->gen()->create_enum_val(c->next_enum_val(), n, p);
- (void) s->fe_add_enum_val(e);
+ if (s != 0 && s->scope_node_type () == AST_Decl::NT_enum) {
+ c = AST_Enum::narrow_from_scope (s);
+ if (c != 0)
+ e = idl_global->gen ()->create_enum_val (c->next_enum_val (),
+ n);
+ (void) s->fe_add_enum_val (e);
}
}
;
@@ -2107,77 +2054,80 @@ sequence_type_spec
: seq_head
','
{
- idl_global->set_parse_state(IDL_GlobalData::PS_SequenceCommaSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_SequenceCommaSeen);
}
positive_int_expr
{
- idl_global->set_parse_state(IDL_GlobalData::PS_SequenceExprSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_SequenceExprSeen);
}
'>'
{
- idl_global->set_parse_state(IDL_GlobalData::PS_SequenceQsSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_SequenceQsSeen);
/*
* Remove sequence marker from scopes stack
*/
- if (idl_global->scopes()->top() == NULL)
- idl_global->scopes()->pop();
- UTL_Scope *s = idl_global->scopes()->top_non_null ();
+ if (idl_global->scopes ()->top() == 0)
+ idl_global->scopes ()->pop ();
+ UTL_Scope *s = idl_global->scopes ()->top_non_null ();
/*
* Create a node representing a sequence
*/
- if ($4 == NULL || $4->coerce(AST_Expression::EV_ulong) == NULL) {
- idl_global->err()->coercion_error($4, AST_Expression::EV_ulong);
- $$ = NULL;
- } else if ($1 == NULL) {
- $$ = NULL;
+ if ($4 == 0 || $4->coerce(AST_Expression::EV_ulong) == 0) {
+ idl_global->err ()->coercion_error ($4, AST_Expression::EV_ulong);
+ $$ = 0;
+ } else if ($1 == 0) {
+ $$ = 0;
} else {
- AST_Type *tp = AST_Type::narrow_from_decl($1);
- if (tp == NULL)
+ AST_Type *tp = AST_Type::narrow_from_decl ($1);
+ if (tp == 0)
; // Error will be caught in FE_Declarator.
else {
- $$ = idl_global->gen()->create_sequence($4,
- tp,
- s->is_local (),
- s->is_abstract ());
+ $$ = idl_global->gen ()->create_sequence ($4,
+ tp,
+ s->is_local (),
+ s->is_abstract ());
/*
- * Add this AST_Sequence to the types defined in the global scope
+ * Add this AST_Sequence to types defined in the global scope.
*/
- (void) idl_global->root()
- ->fe_add_sequence(AST_Sequence::narrow_from_decl($$));
+ (void) idl_global->root ()->fe_add_sequence (
+ AST_Sequence::narrow_from_decl ($$)
+ );
}
}
}
| seq_head
'>'
{
- idl_global->set_parse_state(IDL_GlobalData::PS_SequenceQsSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_SequenceQsSeen);
/*
* Remove sequence marker from scopes stack
*/
- if (idl_global->scopes()->top() == NULL)
- idl_global->scopes()->pop();
- UTL_Scope *s = idl_global->scopes()->top_non_null ();
+ if (idl_global->scopes ()->top () == 0)
+ idl_global->scopes ()->pop ();
+ UTL_Scope *s = idl_global->scopes ()->top_non_null ();
/*
* Create a node representing a sequence
*/
- if ($1 == NULL)
- $$ = NULL;
+ if ($1 == 0)
+ $$ = 0;
else {
- AST_Type *tp = AST_Type::narrow_from_decl($1);
- if (tp == NULL)
+ AST_Type *tp = AST_Type::narrow_from_decl ($1);
+ if (tp == 0)
; // Error will be caught in FE_Declarator.
else {
$$ =
- idl_global->gen()->create_sequence(
- idl_global->gen()->create_expr((unsigned long) 0),
- tp,
- s->is_local (),
- s->is_abstract ());
+ idl_global->gen ()->create_sequence (
+ idl_global->gen ()->create_expr ((unsigned long) 0),
+ tp,
+ s->is_local (),
+ s->is_abstract ()
+ );
/*
- * Add this AST_Sequence to the types defined in the global scope
+ * Add this AST_Sequence to types defined in the global scope
*/
- (void) idl_global->root()
- ->fe_add_sequence(AST_Sequence::narrow_from_decl($$));
+ (void) idl_global->root ()->fe_add_sequence (
+ AST_Sequence::narrow_from_decl ($$)
+ );
}
}
}
@@ -2186,19 +2136,19 @@ sequence_type_spec
seq_head:
IDL_SEQUENCE
{
- idl_global->set_parse_state(IDL_GlobalData::PS_SequenceSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_SequenceSeen);
/*
* Push a sequence marker on scopes stack
*/
- idl_global->scopes()->push(NULL);
+ idl_global->scopes ()->push (0);
}
'<'
{
- idl_global->set_parse_state(IDL_GlobalData::PS_SequenceSqSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_SequenceSqSeen);
}
simple_type_spec
{
- idl_global->set_parse_state(IDL_GlobalData::PS_SequenceTypeSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_SequenceTypeSeen);
$$ = $5;
}
;
@@ -2207,51 +2157,54 @@ string_type_spec
: string_head
'<'
{
- idl_global->set_parse_state(IDL_GlobalData::PS_StringSqSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_StringSqSeen);
}
positive_int_expr
{
- idl_global->set_parse_state(IDL_GlobalData::PS_StringExprSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_StringExprSeen);
}
'>'
{
- idl_global->set_parse_state(IDL_GlobalData::PS_StringQsSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_StringQsSeen);
/*
* Create a node representing a string
*/
- if ($4 == NULL || $4->coerce(AST_Expression::EV_ulong) == NULL) {
- idl_global->err()->coercion_error($4, AST_Expression::EV_ulong);
- $$ = NULL;
+ if ($4 == 0 || $4->coerce (AST_Expression::EV_ulong) == 0) {
+ idl_global->err ()->coercion_error ($4, AST_Expression::EV_ulong);
+ $$ = 0;
} else {
- $$ = idl_global->gen()->create_string($4);
+ $$ = 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($$));
+ (void) idl_global->root ()->fe_add_string (
+ AST_String::narrow_from_decl ($$)
+ );
}
}
| string_head
{
- idl_global->set_parse_state(IDL_GlobalData::PS_StringCompleted);
+ idl_global->set_parse_state (IDL_GlobalData::PS_StringCompleted);
/*
* Create a node representing a string
*/
$$ =
- idl_global->gen()->create_string(
- idl_global->gen()->create_expr((unsigned long) 0));
+ idl_global->gen ()->create_string (
+ idl_global->gen ()->create_expr ((unsigned long) 0)
+ );
/*
* Add this AST_String to the types defined in the global scope
*/
- (void) idl_global->root()
- ->fe_add_string(AST_String::narrow_from_decl($$));
+ (void) idl_global->root ()->fe_add_string (
+ AST_String::narrow_from_decl ($$)
+ );
}
;
string_head:
IDL_STRING
{
- idl_global->set_parse_state(IDL_GlobalData::PS_StringSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_StringSeen);
}
;
@@ -2259,68 +2212,75 @@ wstring_type_spec
: wstring_head
'<'
{
- idl_global->set_parse_state(IDL_GlobalData::PS_StringSqSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_StringSqSeen);
}
positive_int_expr
{
- idl_global->set_parse_state(IDL_GlobalData::PS_StringExprSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_StringExprSeen);
}
'>'
{
- idl_global->set_parse_state(IDL_GlobalData::PS_StringQsSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_StringQsSeen);
/*
* Create a node representing a string
*/
- if ($4 == NULL || $4->coerce(AST_Expression::EV_ulong) == NULL) {
- idl_global->err()->coercion_error($4, AST_Expression::EV_ulong);
- $$ = NULL;
+ if ($4 == 0 || $4->coerce(AST_Expression::EV_ulong) == 0) {
+ idl_global->err ()->coercion_error ($4, AST_Expression::EV_ulong);
+ $$ = 0;
} else {
- $$ = idl_global->gen()->create_wstring($4);
+ $$ = 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($$));
+ (void) idl_global->root ()->fe_add_string (
+ AST_String::narrow_from_decl ($$)
+ );
}
}
| wstring_head
{
- idl_global->set_parse_state(IDL_GlobalData::PS_StringCompleted);
+ idl_global->set_parse_state (IDL_GlobalData::PS_StringCompleted);
/*
* Create a node representing a string
*/
$$ =
- idl_global->gen()->create_wstring(
- idl_global->gen()->create_expr((unsigned long) 0));
+ idl_global->gen ()->create_wstring (
+ idl_global->gen ()->create_expr ((unsigned long) 0)
+ );
/*
* Add this AST_String to the types defined in the global scope
*/
- (void) idl_global->root()
- ->fe_add_string(AST_String::narrow_from_decl($$));
+ (void) idl_global->root ()->fe_add_string (
+ AST_String::narrow_from_decl ($$)
+ );
}
;
wstring_head:
IDL_WSTRING
{
- idl_global->set_parse_state(IDL_GlobalData::PS_StringSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_StringSeen);
}
;
array_declarator :
id
{
- idl_global->set_parse_state(IDL_GlobalData::PS_ArrayIDSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_ArrayIDSeen);
}
at_least_one_array_dim
{
- idl_global->set_parse_state(IDL_GlobalData::PS_ArrayCompleted);
+ idl_global->set_parse_state (IDL_GlobalData::PS_ArrayCompleted);
/*
* Create a node representing an array
*/
- if ($3 != NULL) {
- $$ = idl_global->gen()->create_array(new UTL_ScopedName($1, NULL),
- $3->length(), $3, 0, 0);
+ if ($3 != 0) {
+ $$ = idl_global->gen ()->create_array (new UTL_ScopedName ($1,
+ 0),
+ $3->length (),
+ $3,
+ 0,
+ 0);
}
}
;
@@ -2328,45 +2288,45 @@ array_declarator :
at_least_one_array_dim :
array_dim array_dims
{
- $$ = new UTL_ExprList($1, $2);
+ $$ = new UTL_ExprList ($1, $2);
}
;
array_dims
: array_dims array_dim
{
- if ($1 == NULL)
- $$ = new UTL_ExprList($2, NULL);
+ if ($1 == 0)
+ $$ = new UTL_ExprList ($2, 0);
else {
- $1->nconc(new UTL_ExprList($2, NULL));
+ $1->nconc (new UTL_ExprList ($2, 0));
$$ = $1;
}
}
| /* EMPTY */
{
- $$ = NULL;
+ $$ = 0;
}
;
array_dim :
'['
{
- idl_global->set_parse_state(IDL_GlobalData::PS_DimSqSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_DimSqSeen);
}
positive_int_expr
{
- idl_global->set_parse_state(IDL_GlobalData::PS_DimExprSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_DimExprSeen);
}
']'
{
- idl_global->set_parse_state(IDL_GlobalData::PS_DimQsSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_DimQsSeen);
/*
* Array dimensions are expressions which must be coerced to
* positive integers
*/
- if ($3 == NULL || $3->coerce(AST_Expression::EV_ulong) == NULL) {
- idl_global->err()->coercion_error($3, AST_Expression::EV_ulong);
- $$ = NULL;
+ if ($3 == 0 || $3->coerce (AST_Expression::EV_ulong) == 0) {
+ idl_global->err ()->coercion_error ($3, AST_Expression::EV_ulong);
+ $$ = 0;
} else
$$ = $3;
}
@@ -2376,55 +2336,52 @@ attribute:
opt_readonly
IDL_ATTRIBUTE
{
- idl_global->set_parse_state(IDL_GlobalData::PS_AttrSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_AttrSeen);
}
param_type_spec
{
- idl_global->set_parse_state(IDL_GlobalData::PS_AttrTypeSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_AttrTypeSeen);
}
at_least_one_simple_declarator
{
- UTL_Scope *s = idl_global->scopes()->top_non_null();
- UTL_DecllistActiveIterator *l = NULL;
- AST_Attribute *a = NULL;
- FE_Declarator *d = NULL;
- UTL_StrList *p = idl_global->pragmas();
+ UTL_Scope *s = idl_global->scopes ()->top_non_null ();
+ UTL_DecllistActiveIterator *l = 0;
+ AST_Attribute *a = 0;
+ FE_Declarator *d = 0;
- idl_global->set_parse_state(IDL_GlobalData::PS_AttrCompleted);
+ idl_global->set_parse_state (IDL_GlobalData::PS_AttrCompleted);
/*
* Create nodes representing attributes and add them to the
* enclosing scope
*/
- if (s != NULL && $4 != NULL && $6 != NULL) {
- l = new UTL_DecllistActiveIterator($6);
- for (;!(l->is_done()); l->next()) {
- d = l->item();
- if (d == NULL)
+ if (s != 0 && $4 != 0 && $6 != 0) {
+ l = new UTL_DecllistActiveIterator ($6);
+ for (; !(l->is_done ()); l->next ()) {
+ d = l->item ();
+ if (d == 0)
continue;
- AST_Type *tp = d->compose($4);
- if (tp == NULL)
+ AST_Type *tp = d->compose ($4);
+ if (tp == 0)
continue;
- a = idl_global->gen()->create_attribute($1,
- tp,
- (UTL_IdList *) d->name()->copy (),
- p,
- s->is_local (),
- s->is_abstract ());
+ a = idl_global->gen ()->create_attribute ($1,
+ tp,
+ (UTL_IdList *) d->name()->copy (),
+ s->is_local (),
+ s->is_abstract ());
/*
* Add one attribute to the enclosing scope
*/
- (void) s->fe_add_attribute(a);
+ (void) s->fe_add_attribute (a);
}
delete l;
}
- idl_global->set_pragmas (p);
}
;
opt_readonly
: IDL_READONLY
{
- idl_global->set_parse_state(IDL_GlobalData::PS_AttrROSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_AttrROSeen);
$$ = I_TRUE;
}
| /* EMPTY */
@@ -2436,54 +2393,45 @@ opt_readonly
exception :
IDL_EXCEPTION
{
- idl_global->set_parse_state(IDL_GlobalData::PS_ExceptSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_ExceptSeen);
}
id
{
- UTL_Scope *s = idl_global->scopes()->top_non_null();
- UTL_ScopedName *n = new UTL_ScopedName($3, NULL);
- AST_Exception *e = NULL;
- UTL_StrList *p = idl_global->pragmas();
- AST_Decl *v = NULL;
-
- ACE_UNUSED_ARG (v);
+ UTL_Scope *s = idl_global->scopes ()->top_non_null ();
+ UTL_ScopedName *n = new UTL_ScopedName ($3, 0);
+ AST_Exception *e = 0;
- idl_global->set_parse_state(IDL_GlobalData::PS_ExceptIDSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_ExceptIDSeen);
/*
* Create a node representing an exception and add it to
* the enclosing scope
*/
- if (s != NULL) {
- e = idl_global->gen()->create_exception(n,
- p,
- s->is_local (),
- s->is_abstract ());
- (void) s->fe_add_exception(e);
+ if (s != 0) {
+ e = idl_global->gen ()->create_exception (n,
+ s->is_local (),
+ s->is_abstract ());
+ (void) s->fe_add_exception (e);
}
/*
* Push the exception scope on the scope stack
*/
- idl_global->scopes()->push(e);
+ idl_global->scopes()->push (e);
}
'{'
{
- idl_global->set_parse_state(IDL_GlobalData::PS_ExceptSqSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_ExceptSqSeen);
}
members
{
- idl_global->set_parse_state(IDL_GlobalData::PS_ExceptBodySeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_ExceptBodySeen);
}
'}'
{
- idl_global->set_parse_state(IDL_GlobalData::PS_ExceptQsSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_ExceptQsSeen);
/*
* Done with this exception. Pop its scope from the scope stack
*/
- AST_Exception *ex =
- AST_Exception::narrow_from_scope (idl_global->scopes ()->top_non_null ());
- UTL_StrList *p = ex->pragmas ();
- idl_global->scopes()->pop();
- idl_global->set_pragmas (p);
+ idl_global->scopes ()->pop ();
}
;
@@ -2491,83 +2439,81 @@ operation :
opt_op_attribute
op_type_spec
{
- idl_global->set_parse_state(IDL_GlobalData::PS_OpTypeSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_OpTypeSeen);
}
IDENTIFIER
{
- UTL_Scope *s = idl_global->scopes()->top_non_null();
- UTL_ScopedName *n =
- new UTL_ScopedName(new Identifier($4), NULL);
- AST_Operation *o = NULL;
- UTL_StrList *p = idl_global->pragmas();
+ UTL_Scope *s = idl_global->scopes ()->top_non_null ();
+ UTL_ScopedName *n =
+ new UTL_ScopedName (new Identifier ($4), 0);
+ AST_Operation *o = 0;
- idl_global->set_parse_state(IDL_GlobalData::PS_OpIDSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_OpIDSeen);
/*
* Create a node representing an operation on an interface
* and add it to its enclosing scope
*/
- if (s != NULL && $2 != NULL) {
- AST_Type *tp = AST_Type::narrow_from_decl($2);
- if (tp == NULL) {
- idl_global->err()->not_a_type($2);
- } else if (tp->node_type() == AST_Decl::NT_except) {
- idl_global->err()->not_a_type($2);
+ if (s != 0 && $2 != 0) {
+ AST_Type *tp = AST_Type::narrow_from_decl ($2);
+ if (tp == 0) {
+ idl_global->err ()->not_a_type ($2);
+ } else if (tp->node_type () == AST_Decl::NT_except) {
+ idl_global->err ()->not_a_type ($2);
} else {
- o = idl_global->gen()->create_operation(tp,
- $1,
- n,
- p,
- s->is_local (),
- s->is_abstract ());
- (void) s->fe_add_operation(o);
+ o = idl_global->gen ()->create_operation (tp,
+ $1,
+ n,
+ s->is_local (),
+ s->is_abstract ());
+ (void) s->fe_add_operation (o);
}
}
/*
* Push the operation scope onto the scopes stack
*/
- idl_global->scopes()->push(o);
+ idl_global->scopes()->push (o);
}
parameter_list
{
- idl_global->set_parse_state(IDL_GlobalData::PS_OpParsCompleted);
+ idl_global->set_parse_state (IDL_GlobalData::PS_OpParsCompleted);
}
opt_raises
{
- idl_global->set_parse_state(IDL_GlobalData::PS_OpRaiseCompleted);
+ idl_global->set_parse_state (IDL_GlobalData::PS_OpRaiseCompleted);
}
opt_context
{
- UTL_Scope *s = idl_global->scopes()->top_non_null();
- AST_Operation *o = NULL;
+ UTL_Scope *s = idl_global->scopes ()->top_non_null ();
+ AST_Operation *o = 0;
- idl_global->set_parse_state(IDL_GlobalData::PS_OpCompleted);
+ idl_global->set_parse_state (IDL_GlobalData::PS_OpCompleted);
/*
* Add exceptions and context to the operation
*/
- if (s != NULL && s->scope_node_type() == AST_Decl::NT_op) {
- o = AST_Operation::narrow_from_scope(s);
+ if (s != 0 && s->scope_node_type() == AST_Decl::NT_op) {
+ o = AST_Operation::narrow_from_scope (s);
- if ($8 != NULL && o != NULL)
- (void) o->fe_add_exceptions($8);
- if ($10 != NULL)
- (void) o->fe_add_context($10);
+ if ($8 != 0 && o != 0)
+ (void) o->fe_add_exceptions ($8);
+ if ($10 != 0)
+ (void) o->fe_add_context ($10);
}
/*
* Done with this operation. Pop its scope from the scopes stack
*/
- idl_global->scopes()->pop();
+ idl_global->scopes ()->pop ();
}
;
opt_op_attribute
: IDL_ONEWAY
{
- idl_global->set_parse_state(IDL_GlobalData::PS_OpAttrSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_OpAttrSeen);
$$ = AST_Operation::OP_oneway;
}
| IDL_IDEMPOTENT
{
- idl_global->set_parse_state(IDL_GlobalData::PS_OpAttrSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_OpAttrSeen);
$$ = AST_Operation::OP_idempotent;
}
| /* EMPTY */
@@ -2581,38 +2527,147 @@ op_type_spec
| IDL_VOID
{
$$ =
- idl_global->scopes()->bottom()
- ->lookup_primitive_type(AST_Expression::EV_void);
+ idl_global->scopes ()->bottom ()->lookup_primitive_type (
+ AST_Expression::EV_void
+ );
}
;
init_decl
- : IDL_FACTORY IDENTIFIER parameter_list
+ : IDL_FACTORY
+ {
+ //@@ PS_FactorySeen?
+ idl_global->set_parse_state (IDL_GlobalData::PS_OpTypeSeen);
+ }
+ IDENTIFIER
+ {
+
+ UTL_Scope *s = idl_global->scopes ()->top_non_null ();
+ if (s->is_abstract ())
+ {
+ //@@ Fire error
+ ACE_ERROR ((LM_ERROR,
+ ACE_TEXT ("error in %s line %d:\n")
+ ACE_TEXT ("Abstract valuetype can't have a ")
+ ACE_TEXT ("factory construct.\n"),
+ idl_global->filename ()->get_string (),
+ idl_global->lineno ()));
+ }
+ UTL_ScopedName *n =
+ new UTL_ScopedName (new Identifier ($3), 0);
+
+ AST_Factory *factory = 0;
+ idl_global->set_parse_state (IDL_GlobalData::PS_OpIDSeen);
+
+ /*
+ * Create a node representing an factory construct
+ * and add it to its enclosing scope
+ */
+ if (s != 0)
+ {
+ factory = idl_global->gen ()->create_factory (n);
+ (void) s->fe_add_factory (factory);
+ }
+ /*
+ * Push the operation scope onto the scopes stack
+ */
+ idl_global->scopes ()->push (factory);
+ }
+ init_parameter_list
+ {
+ // TODO: replace parameter_list with rule that accepts only IN args
+
+ idl_global->set_parse_state (IDL_GlobalData::PS_OpParsCompleted);
+ idl_global->scopes ()->pop ();
+ }
+ ;
+
+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
+ ')'
+ {
+ idl_global->set_parse_state (IDL_GlobalData::PS_OpQsSeen);
+ }
+ ;
+
+at_least_one_in_parameter : in_parameter in_parameters ;
+
+in_parameters
+ : in_parameters
+ ','
+ {
+ idl_global->set_parse_state (IDL_GlobalData::PS_OpParCommaSeen);
+ }
+ in_parameter
+ | /* EMPTY */
+ ;
+
+in_parameter :
+ IDL_IN
+ {
+ idl_global->set_parse_state (IDL_GlobalData::PS_OpParDirSeen);
+ }
+ param_type_spec
+ {
+ idl_global->set_parse_state (IDL_GlobalData::PS_OpParTypeSeen);
+ }
+ declarator
{
- // TODO: replace parameter_list with rule that accepts only IN args
- cerr << "error in " << idl_global->filename()->get_string()
- << " line " << idl_global->lineno() << ":\n" ;
- cerr << "Sorry, I (TAO_IDL) can't handle factory yet\n";
+
+ UTL_Scope *s = idl_global->scopes ()->top_non_null ();
+ AST_Argument *a = 0;
+
+ idl_global->set_parse_state (IDL_GlobalData::PS_OpParDeclSeen);
+ /*
+ * Create a node representing an argument to an operation
+ * Add it to the enclosing scope (the operation scope)
+ */
+ if ($3 != 0 && $5 != 0 && s != 0)
+ {
+ AST_Type *tp = $5->compose ($3);
+ if (tp != 0)
+ {
+ a = idl_global->gen ()->create_argument (
+ AST_Argument::dir_IN,
+ tp,
+ (UTL_IdList *) $5->name ()->copy ()
+ );
+
+ (void) s->fe_add_argument (a);
+ }
+ }
}
;
parameter_list
: '('
{
- idl_global->set_parse_state(IDL_GlobalData::PS_OpSqSeen);
+ 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_OpQsSeen);
}
| '('
{
- idl_global->set_parse_state(IDL_GlobalData::PS_OpSqSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_OpSqSeen);
}
at_least_one_parameter
')'
{
- idl_global->set_parse_state(IDL_GlobalData::PS_OpQsSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_OpQsSeen);
}
;
@@ -2622,7 +2677,7 @@ parameters
: parameters
','
{
- idl_global->set_parse_state(IDL_GlobalData::PS_OpParCommaSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_OpParCommaSeen);
}
parameter
| /* EMPTY */
@@ -2631,36 +2686,43 @@ parameters
parameter :
direction
{
- idl_global->set_parse_state(IDL_GlobalData::PS_OpParDirSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_OpParDirSeen);
}
param_type_spec
{
- idl_global->set_parse_state(IDL_GlobalData::PS_OpParTypeSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_OpParTypeSeen);
}
declarator
{
- UTL_Scope *s = idl_global->scopes()->top_non_null();
- AST_Argument *a = NULL;
- UTL_StrList *p = idl_global->pragmas();
+ UTL_Scope *s = idl_global->scopes ()->top_non_null ();
+ AST_Argument *a = 0;
- idl_global->set_parse_state(IDL_GlobalData::PS_OpParDeclSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_OpParDeclSeen);
/*
* Create a node representing an argument to an operation
* Add it to the enclosing scope (the operation scope)
*/
- if ($3 != NULL && $5 != NULL && s != NULL) {
- AST_Type *tp = $5->compose($3);
- if (tp != NULL) {
+ if ($3 != 0 && $5 != 0 && s != 0) {
+ AST_Type *tp = $5->compose ($3);
+ if (tp != 0) {
if (!s->is_local () && tp->is_local ())
{
- cerr << "error in " << idl_global->filename()->get_string()
- << " line " << idl_global->lineno() << ":\n" ;
- cerr << "Cannot use a local type as an argument of a remote interface operation\n";
+ ACE_DEBUG ((LM_DEBUG,
+ ACE_TEXT ("error in %s line %d\n"),
+ idl_global->filename ()->get_string (),
+ idl_global->lineno ()));
+ ACE_DEBUG ((LM_DEBUG,
+ ACE_TEXT ("Cannot use a local type as an ")
+ ACE_TEXT ("argument of a remote operation\n")));
}
else
{
- a = idl_global->gen()->create_argument($1, tp, (UTL_IdList *) $5->name ()->copy (), p);
- (void) s->fe_add_argument(a);
+ a = idl_global->gen ()->create_argument (
+ $1,
+ tp,
+ (UTL_IdList *) $5->name ()->copy ()
+ );
+ (void) s->fe_add_argument (a);
}
}
}
@@ -2670,19 +2732,19 @@ parameter :
param_type_spec
: base_type_spec
{
- $$ = idl_global->scopes()->bottom()->lookup_primitive_type($1);
+ $$ = idl_global->scopes ()->bottom ()->lookup_primitive_type ($1);
}
| string_type_spec
| wstring_type_spec
| scoped_name
{
- UTL_Scope *s = idl_global->scopes()->top_non_null();
- AST_Decl *d = NULL;
+ UTL_Scope *s = idl_global->scopes ()->top_non_null ();
+ AST_Decl *d = 0;
- if (s != NULL)
- d = s->lookup_by_name($1, I_TRUE);
- if (d == NULL)
- idl_global->err()->lookup_error($1);
+ if (s != 0)
+ d = s->lookup_by_name ($1, I_TRUE);
+ if (d == 0)
+ idl_global->err ()->lookup_error ($1);
$$ = d;
}
;
@@ -2705,49 +2767,49 @@ direction
opt_raises
: IDL_RAISES
{
- idl_global->set_parse_state(IDL_GlobalData::PS_OpRaiseSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_OpRaiseSeen);
}
'('
{
- idl_global->set_parse_state(IDL_GlobalData::PS_OpRaiseSqSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_OpRaiseSqSeen);
}
at_least_one_scoped_name
')'
{
- idl_global->set_parse_state(IDL_GlobalData::PS_OpRaiseQsSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_OpRaiseQsSeen);
$$ = $5;
}
| /* EMPTY */
{
- $$ = NULL;
+ $$ = 0;
}
;
opt_context
: IDL_CONTEXT
{
- idl_global->set_parse_state(IDL_GlobalData::PS_OpContextSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_OpContextSeen);
}
'('
{
- idl_global->set_parse_state(IDL_GlobalData::PS_OpContextSqSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_OpContextSqSeen);
}
at_least_one_string_literal
')'
{
- idl_global->set_parse_state(IDL_GlobalData::PS_OpContextQsSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_OpContextQsSeen);
$$ = $5;
}
| /* EMPTY */
{
- $$ = NULL;
+ $$ = 0;
}
;
at_least_one_string_literal :
IDL_STRING_LITERAL string_literals
{
- $$ = new UTL_StrList($1, $2);
+ $$ = new UTL_StrList ($1, $2);
}
;
@@ -2755,20 +2817,20 @@ string_literals
: string_literals
','
{
- idl_global->set_parse_state(IDL_GlobalData::PS_OpContextCommaSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_OpContextCommaSeen);
}
IDL_STRING_LITERAL
{
- if ($1 == NULL)
- $$ = new UTL_StrList($4, NULL);
+ if ($1 == 0)
+ $$ = new UTL_StrList ($4, 0);
else {
- $1->nconc(new UTL_StrList($4, NULL));
+ $1->nconc (new UTL_StrList ($4, 0));
$$ = $1;
}
}
| /* EMPTY */
{
- $$ = NULL;
+ $$ = 0;
}
;
@@ -2779,7 +2841,7 @@ string_literals
* ???
*/
int
-yywrap()
+yywrap ()
{
return 1;
}
@@ -2788,7 +2850,7 @@ yywrap()
* Report an error situation discovered in a production
*/
void
-yyerror(const char *msg)
+yyerror (const char *msg)
{
ACE_ERROR ((LM_ERROR,
"%s\n",
diff --git a/TAO/TAO_IDL/fe/lex.yy.cpp b/TAO/TAO_IDL/fe/lex.yy.cpp
index b1275e87b0c..15a6b7c1583 100644
--- a/TAO/TAO_IDL/fe/lex.yy.cpp
+++ b/TAO/TAO_IDL/fe/lex.yy.cpp
@@ -802,14 +802,17 @@ trademarks or registered trademarks of Sun Microsystems, Inc.
#include "fe_private.h"
#include "y.tab.h"
-static char * idl_wstring_escape_reader(char *);
-static ACE_CDR::WChar idl_wchar_escape_reader(char *);
-static char idl_escape_reader(char *);
-static double idl_atof(char *);
-static long idl_atoi(char *, long);
-static unsigned long idl_atoui(char *, long);
-static void idl_parse_line_and_file(char *);
-static void idl_store_pragma(char *);
+static char * idl_wstring_escape_reader (char *);
+static ACE_CDR::WChar idl_wchar_escape_reader (char *);
+static char idl_escape_reader (char *);
+static double idl_atof (char *);
+static long idl_atoi (char *, long);
+static unsigned long idl_atoui (char *, long);
+static void idl_parse_line_and_file (char *);
+static void idl_store_pragma (char *);
+static char * idl_get_pragma_string (char *);
+static idl_bool idl_valid_version (char *);
+static AST_Decl * idl_find_node (char *);
#if 0 /* defined (HPUX) */
// HPUX has tao_yytext typed to unsigned char *. We make sure here that
@@ -1518,137 +1521,136 @@ TAO_YY_RULE_SETUP
TAO_YY_ECHO;
break;
case TAO_YY_STATE_EOF(INITIAL):
- tao_yyterminate();
-
- case TAO_YY_END_OF_BUFFER:
- {
- /* Amount of text matched not including the EOB char. */
- int tao_yy_amount_of_matched_text = (int) (tao_yy_cp - tao_yytext_ptr) - 1;
-
- /* Undo the effects of TAO_YY_DO_BEFORE_ACTION. */
- *tao_yy_cp = tao_yy_hold_char;
- TAO_YY_RESTORE_TAO_YY_MORE_OFFSET
-
- if ( tao_yy_current_buffer->tao_yy_buffer_status == TAO_YY_BUFFER_NEW )
- {
- /* We're scanning a new file or input source. It's
- * possible that this happened because the user
- * just pointed tao_yyin at a new source and called
- * tao_yylex(). If so, then we have to assure
- * consistency between tao_yy_current_buffer and our
- * globals. Here is the right place to do so, because
- * this is the first action (other than possibly a
- * back-up) that will match for the new input source.
- */
- tao_yy_n_chars = tao_yy_current_buffer->tao_yy_n_chars;
- tao_yy_current_buffer->tao_yy_input_file = tao_yyin;
- tao_yy_current_buffer->tao_yy_buffer_status = TAO_YY_BUFFER_NORMAL;
- }
-
- /* Note that here we test for tao_yy_c_buf_p "<=" to the position
- * of the first EOB in the buffer, since tao_yy_c_buf_p will
- * already have been incremented past the NUL character
- * (since all states make transitions on EOB to the
- * end-of-buffer state). Contrast this with the test
- * in input().
- */
- if ( tao_yy_c_buf_p <= &tao_yy_current_buffer->tao_yy_ch_buf[tao_yy_n_chars] )
- { /* This was really a NUL. */
- tao_yy_state_type tao_yy_next_state;
-
- tao_yy_c_buf_p = tao_yytext_ptr + tao_yy_amount_of_matched_text;
-
- tao_yy_current_state = tao_yy_get_previous_state();
-
- /* Okay, we're now positioned to make the NUL
- * transition. We couldn't have
- * tao_yy_get_previous_state() go ahead and do it
- * for us because it doesn't know how to deal
- * with the possibility of jamming (and we don't
- * want to build jamming into it because then it
- * will run more slowly).
- */
-
- tao_yy_next_state = tao_yy_try_NUL_trans( tao_yy_current_state );
-
- tao_yy_bp = tao_yytext_ptr + TAO_YY_MORE_ADJ;
-
- if ( tao_yy_next_state )
- {
- /* Consume the NUL. */
- tao_yy_cp = ++tao_yy_c_buf_p;
- tao_yy_current_state = tao_yy_next_state;
- goto tao_yy_match;
- }
-
- else
- {
- tao_yy_cp = tao_yy_c_buf_p;
- goto tao_yy_find_action;
- }
- }
-
- else switch ( tao_yy_get_next_buffer() )
- {
- case EOB_ACT_END_OF_FILE:
- {
- tao_yy_did_buffer_switch_on_eof = 0;
-
- if ( tao_yywrap() )
- {
- /* Note: because we've taken care in
- * tao_yy_get_next_buffer() to have set up
- * tao_yytext, we can now set up
- * tao_yy_c_buf_p so that if some total
- * hoser (like flex itself) wants to
- * call the scanner after we return the
- * TAO_YY_NULL, it'll still work - another
- * TAO_YY_NULL will get returned.
- */
- tao_yy_c_buf_p = tao_yytext_ptr + TAO_YY_MORE_ADJ;
-
- tao_yy_act = TAO_YY_STATE_EOF(TAO_YY_START);
- goto do_action;
- }
-
- else
- {
- if ( ! tao_yy_did_buffer_switch_on_eof )
- TAO_YY_NEW_FILE;
- }
- break;
- }
-
- case EOB_ACT_CONTINUE_SCAN:
- tao_yy_c_buf_p =
- tao_yytext_ptr + tao_yy_amount_of_matched_text;
-
- tao_yy_current_state = tao_yy_get_previous_state();
-
- tao_yy_cp = tao_yy_c_buf_p;
- tao_yy_bp = tao_yytext_ptr + TAO_YY_MORE_ADJ;
- goto tao_yy_match;
-
- case EOB_ACT_LAST_MATCH:
- tao_yy_c_buf_p =
- &tao_yy_current_buffer->tao_yy_ch_buf[tao_yy_n_chars];
-
- tao_yy_current_state = tao_yy_get_previous_state();
-
- tao_yy_cp = tao_yy_c_buf_p;
- tao_yy_bp = tao_yytext_ptr + TAO_YY_MORE_ADJ;
- goto tao_yy_find_action;
- }
- break;
- }
-
- default:
- TAO_YY_FATAL_ERROR(
- "fatal flex scanner internal error--no action found" );
- } /* end of action switch */
- } /* end of scanning one token */
- } /* end of tao_yylex */
-
+ tao_yyterminate();
+
+ case TAO_YY_END_OF_BUFFER:
+ {
+ /* Amount of text matched not including the EOB char. */
+ int tao_yy_amount_of_matched_text = (int) (tao_yy_cp - tao_yytext_ptr) - 1;
+
+ /* Undo the effects of TAO_YY_DO_BEFORE_ACTION. */
+ *tao_yy_cp = tao_yy_hold_char;
+ TAO_YY_RESTORE_TAO_YY_MORE_OFFSET
+
+ if ( tao_yy_current_buffer->tao_yy_buffer_status == TAO_YY_BUFFER_NEW )
+ {
+ /* We're scanning a new file or input source. It's
+ * possible that this happened because the user
+ * just pointed tao_yyin at a new source and called
+ * tao_yylex(). If so, then we have to assure
+ * consistency between tao_yy_current_buffer and our
+ * globals. Here is the right place to do so, because
+ * this is the first action (other than possibly a
+ * back-up) that will match for the new input source.
+ */
+ tao_yy_n_chars = tao_yy_current_buffer->tao_yy_n_chars;
+ tao_yy_current_buffer->tao_yy_input_file = tao_yyin;
+ tao_yy_current_buffer->tao_yy_buffer_status = TAO_YY_BUFFER_NORMAL;
+ }
+
+ /* Note that here we test for tao_yy_c_buf_p "<=" to the position
+ * of the first EOB in the buffer, since tao_yy_c_buf_p will
+ * already have been incremented past the NUL character
+ * (since all states make transitions on EOB to the
+ * end-of-buffer state). Contrast this with the test
+ * in input().
+ */
+ if ( tao_yy_c_buf_p <= &tao_yy_current_buffer->tao_yy_ch_buf[tao_yy_n_chars] )
+ { /* This was really a NUL. */
+ tao_yy_state_type tao_yy_next_state;
+
+ tao_yy_c_buf_p = tao_yytext_ptr + tao_yy_amount_of_matched_text;
+
+ tao_yy_current_state = tao_yy_get_previous_state();
+
+ /* Okay, we're now positioned to make the NUL
+ * transition. We couldn't have
+ * tao_yy_get_previous_state() go ahead and do it
+ * for us because it doesn't know how to deal
+ * with the possibility of jamming (and we don't
+ * want to build jamming into it because then it
+ * will run more slowly).
+ */
+
+ tao_yy_next_state = tao_yy_try_NUL_trans( tao_yy_current_state );
+
+ tao_yy_bp = tao_yytext_ptr + TAO_YY_MORE_ADJ;
+
+ if ( tao_yy_next_state )
+ {
+ /* Consume the NUL. */
+ tao_yy_cp = ++tao_yy_c_buf_p;
+ tao_yy_current_state = tao_yy_next_state;
+ goto tao_yy_match;
+ }
+
+ else
+ {
+ tao_yy_cp = tao_yy_c_buf_p;
+ goto tao_yy_find_action;
+ }
+ }
+
+ else switch ( tao_yy_get_next_buffer() )
+ {
+ case EOB_ACT_END_OF_FILE:
+ {
+ tao_yy_did_buffer_switch_on_eof = 0;
+
+ if ( tao_yywrap() )
+ {
+ /* Note: because we've taken care in
+ * tao_yy_get_next_buffer() to have set up
+ * tao_yytext, we can now set up
+ * tao_yy_c_buf_p so that if some total
+ * hoser (like flex itself) wants to
+ * call the scanner after we return the
+ * TAO_YY_NULL, it'll still work - another
+ * TAO_YY_NULL will get returned.
+ */
+ tao_yy_c_buf_p = tao_yytext_ptr + TAO_YY_MORE_ADJ;
+
+ tao_yy_act = TAO_YY_STATE_EOF(TAO_YY_START);
+ goto do_action;
+ }
+
+ else
+ {
+ if ( ! tao_yy_did_buffer_switch_on_eof )
+ TAO_YY_NEW_FILE;
+ }
+ break;
+ }
+
+ case EOB_ACT_CONTINUE_SCAN:
+ tao_yy_c_buf_p =
+ tao_yytext_ptr + tao_yy_amount_of_matched_text;
+
+ tao_yy_current_state = tao_yy_get_previous_state();
+
+ tao_yy_cp = tao_yy_c_buf_p;
+ tao_yy_bp = tao_yytext_ptr + TAO_YY_MORE_ADJ;
+ goto tao_yy_match;
+
+ case EOB_ACT_LAST_MATCH:
+ tao_yy_c_buf_p =
+ &tao_yy_current_buffer->tao_yy_ch_buf[tao_yy_n_chars];
+
+ tao_yy_current_state = tao_yy_get_previous_state();
+
+ tao_yy_cp = tao_yy_c_buf_p;
+ tao_yy_bp = tao_yytext_ptr + TAO_YY_MORE_ADJ;
+ goto tao_yy_find_action;
+ }
+ break;
+ }
+
+ default:
+ TAO_YY_FATAL_ERROR(
+ "fatal flex scanner internal error--no action found" );
+ } /* end of action switch */
+ } /* end of scanning one token */
+ } /* end of tao_yylex */
/* tao_yy_get_next_buffer - try to read in a new buffer
*
@@ -1714,79 +1716,78 @@ static int tao_yy_get_next_buffer()
"input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
#else
- /* just a shorter name for the current buffer */
- TAO_YY_BUFFER_STATE b = tao_yy_current_buffer;
+ /* just a shorter name for the current buffer */
+ TAO_YY_BUFFER_STATE b = tao_yy_current_buffer;
- int tao_yy_c_buf_p_offset =
- (int) (tao_yy_c_buf_p - b->tao_yy_ch_buf);
+ int tao_yy_c_buf_p_offset =
+ (int) (tao_yy_c_buf_p - b->tao_yy_ch_buf);
- if ( b->tao_yy_is_our_buffer )
- {
- int new_size = b->tao_yy_buf_size * 2;
+ if ( b->tao_yy_is_our_buffer )
+ {
+ int new_size = b->tao_yy_buf_size * 2;
- if ( new_size <= 0 )
- b->tao_yy_buf_size += b->tao_yy_buf_size / 8;
- else
- b->tao_yy_buf_size *= 2;
+ if ( new_size <= 0 )
+ b->tao_yy_buf_size += b->tao_yy_buf_size / 8;
+ else
+ b->tao_yy_buf_size *= 2;
- b->tao_yy_ch_buf = (char *)
- /* Include room in for 2 EOB chars. */
- tao_yy_flex_realloc( (void *) b->tao_yy_ch_buf,
- b->tao_yy_buf_size + 2 );
- }
- else
- /* Can't grow it, we don't own it. */
- b->tao_yy_ch_buf = 0;
+ b->tao_yy_ch_buf = (char *)
+ /* Include room in for 2 EOB chars. */
+ tao_yy_flex_realloc( (void *) b->tao_yy_ch_buf,
+ b->tao_yy_buf_size + 2 );
+ }
+ else
+ /* Can't grow it, we don't own it. */
+ b->tao_yy_ch_buf = 0;
- if ( ! b->tao_yy_ch_buf )
- TAO_YY_FATAL_ERROR(
- "fatal error - scanner input buffer overflow" );
+ if ( ! b->tao_yy_ch_buf )
+ TAO_YY_FATAL_ERROR(
+ "fatal error - scanner input buffer overflow" );
- tao_yy_c_buf_p = &b->tao_yy_ch_buf[tao_yy_c_buf_p_offset];
+ tao_yy_c_buf_p = &b->tao_yy_ch_buf[tao_yy_c_buf_p_offset];
- num_to_read = tao_yy_current_buffer->tao_yy_buf_size -
- number_to_move - 1;
+ num_to_read = tao_yy_current_buffer->tao_yy_buf_size -
+ number_to_move - 1;
#endif
- }
+ }
- if ( num_to_read > TAO_YY_READ_BUF_SIZE )
- num_to_read = TAO_YY_READ_BUF_SIZE;
+ if ( num_to_read > TAO_YY_READ_BUF_SIZE )
+ num_to_read = TAO_YY_READ_BUF_SIZE;
- /* Read in more data. */
- TAO_YY_INPUT( (&tao_yy_current_buffer->tao_yy_ch_buf[number_to_move]),
- tao_yy_n_chars, num_to_read );
+ /* Read in more data. */
+ TAO_YY_INPUT( (&tao_yy_current_buffer->tao_yy_ch_buf[number_to_move]),
+ tao_yy_n_chars, num_to_read );
- tao_yy_current_buffer->tao_yy_n_chars = tao_yy_n_chars;
- }
+ tao_yy_current_buffer->tao_yy_n_chars = tao_yy_n_chars;
+ }
- if ( tao_yy_n_chars == 0 )
- {
- if ( number_to_move == TAO_YY_MORE_ADJ )
- {
- ret_val = EOB_ACT_END_OF_FILE;
- tao_yyrestart( tao_yyin );
- }
+ if ( tao_yy_n_chars == 0 )
+ {
+ if ( number_to_move == TAO_YY_MORE_ADJ )
+ {
+ ret_val = EOB_ACT_END_OF_FILE;
+ tao_yyrestart( tao_yyin );
+ }
- else
- {
- ret_val = EOB_ACT_LAST_MATCH;
- tao_yy_current_buffer->tao_yy_buffer_status =
- TAO_YY_BUFFER_EOF_PENDING;
- }
- }
-
- else
- ret_val = EOB_ACT_CONTINUE_SCAN;
+ else
+ {
+ ret_val = EOB_ACT_LAST_MATCH;
+ tao_yy_current_buffer->tao_yy_buffer_status =
+ TAO_YY_BUFFER_EOF_PENDING;
+ }
+ }
- tao_yy_n_chars += number_to_move;
- tao_yy_current_buffer->tao_yy_ch_buf[tao_yy_n_chars] = TAO_YY_END_OF_BUFFER_CHAR;
- tao_yy_current_buffer->tao_yy_ch_buf[tao_yy_n_chars + 1] = TAO_YY_END_OF_BUFFER_CHAR;
+ else
+ ret_val = EOB_ACT_CONTINUE_SCAN;
- tao_yytext_ptr = &tao_yy_current_buffer->tao_yy_ch_buf[0];
+ tao_yy_n_chars += number_to_move;
+ tao_yy_current_buffer->tao_yy_ch_buf[tao_yy_n_chars] = TAO_YY_END_OF_BUFFER_CHAR;
+ tao_yy_current_buffer->tao_yy_ch_buf[tao_yy_n_chars + 1] = TAO_YY_END_OF_BUFFER_CHAR;
- return ret_val;
- }
+ tao_yytext_ptr = &tao_yy_current_buffer->tao_yy_ch_buf[0];
+ return ret_val;
+ }
/* tao_yy_get_previous_state - get the state just before the EOB char was reached */
@@ -1994,29 +1995,28 @@ void tao_yy_switch_to_buffer( TAO_YY_BUFFER_STATE new_buffer )
void tao_yy_switch_to_buffer( new_buffer )
TAO_YY_BUFFER_STATE new_buffer;
#endif
- {
- if ( tao_yy_current_buffer == new_buffer )
- return;
-
- if ( tao_yy_current_buffer )
- {
- /* Flush out information for old buffer. */
- *tao_yy_c_buf_p = tao_yy_hold_char;
- tao_yy_current_buffer->tao_yy_buf_pos = tao_yy_c_buf_p;
- tao_yy_current_buffer->tao_yy_n_chars = tao_yy_n_chars;
- }
-
- tao_yy_current_buffer = new_buffer;
- tao_yy_load_buffer_state();
-
- /* We don't actually know whether we did this switch during
- * EOF (tao_yywrap()) processing, but the only time this flag
- * is looked at is after tao_yywrap() is called, so it's safe
- * to go ahead and always set it.
- */
- tao_yy_did_buffer_switch_on_eof = 1;
- }
-
+ {
+ if ( tao_yy_current_buffer == new_buffer )
+ return;
+
+ if ( tao_yy_current_buffer )
+ {
+ /* Flush out information for old buffer. */
+ *tao_yy_c_buf_p = tao_yy_hold_char;
+ tao_yy_current_buffer->tao_yy_buf_pos = tao_yy_c_buf_p;
+ tao_yy_current_buffer->tao_yy_n_chars = tao_yy_n_chars;
+ }
+
+ tao_yy_current_buffer = new_buffer;
+ tao_yy_load_buffer_state();
+
+ /* We don't actually know whether we did this switch during
+ * EOF (tao_yywrap()) processing, but the only time this flag
+ * is looked at is after tao_yywrap() is called, so it's safe
+ * to go ahead and always set it.
+ */
+ tao_yy_did_buffer_switch_on_eof = 1;
+ }
#ifdef TAO_YY_USE_PROTOS
void tao_yy_load_buffer_state( void )
@@ -2425,48 +2425,74 @@ stripped_name(UTL_String *fn)
return n;
}
-/*
- * Parse a #line statement generated by the C preprocessor
- */
+// Parse a #line statement generated by the C preprocessor
static void
-idl_parse_line_and_file(char *buf)
+idl_parse_line_and_file (char *buf)
{
- char *r = buf;
- char *h;
- UTL_String *nm;
+ char *r = buf;
+ char *h = 0;
+ UTL_String *nm = 0;
- /* Skip initial '#' */
+ // Skip initial '#'.
if (*r != '#')
- return;
+ {
+ return;
+ }
else
- r++;
+ {
+ r++;
+ }
- /* Check to see if we're running under the screwy Microsoft scheme */
- /* of putting #line num instead of #num. */
+ // Check to see if we're running under the screwy Microsoft scheme
+ // of putting #line num instead of #num.
if (ACE_OS::strncmp (r, "line", 4) == 0)
- r += 5;
+ {
+ r += 5;
+ }
- /* Find line number */
+ // Find line number.
while (isspace (*r))
- r++;
+ {
+ r++;
+ }
+
h = r;
+
for (; isdigit (*r); r++)
- continue;
+ {
+ continue;
+ }
+
*r++ = 0;
- idl_global->set_lineno(idl_atoui(h, 10));
+ idl_global->set_lineno (idl_atoui (h, 10));
- /* Find file name, if present */
+ // Find file name, if present.
for (; *r != '"'; r++)
- if (*r == '\n' || *r == '\0')
- return;
+ {
+ if (*r == '\n' || *r == '\0')
+ {
+ return;
+ }
+ }
h = ++r;
+
for (; *r != '"'; r++)
- continue;
+ {
+ continue;
+ }
+
*r = 0;
+ UTL_String *tmp = 0;
+
if (*h == '\0')
- idl_global->set_filename(new UTL_String("standard input"));
+ {
+ ACE_NEW (tmp,
+ UTL_String ("standard input"));
+ idl_global->set_filename (tmp);
+ return;
+ }
else
{
long i;
@@ -2476,70 +2502,183 @@ idl_parse_line_and_file(char *buf)
for (i = 0, j = 0; h[j] != '\0'; i++, j++)
{
if (h[j] == '\\' && h[j + 1] == '\\')
- j++;
+ {
+ j++;
+ }
- h[i] = h[j];
+ h[i] = h[j];
}
+
h[i] = '\0';
- idl_global->set_filename(new UTL_String(h));
+ ACE_NEW (tmp,
+ UTL_String (h));
+ idl_global->set_filename (tmp);
+ }
+
+ UTL_String *fname = idl_global->filename ();
+ idl_bool in_main_file = I_FALSE;
+ idl_bool is_real_filename = fname->compare (idl_global->real_filename ());
+ idl_bool is_main_filename = I_FALSE;
+
+ if (!is_real_filename)
+ {
+ is_main_filename = fname->compare (idl_global->main_filename ());
+ }
+
+ if (is_real_filename || is_main_filename)
+ {
+ in_main_file = I_TRUE;
+ }
+
+ idl_global->set_in_main_file (in_main_file);
+
+ // If it's an import file store the stripped name for the BE to use
+ if (!(idl_global->in_main_file ()) && idl_global->import ())
+ {
+ ACE_NEW (nm,
+ UTL_String (stripped_name (fname)));
+
+ // This call also manages the #pragma prefix.
+ idl_global->store_include_file_name (nm);
+ }
+ else if (is_main_filename && idl_global->pragma_prefixes ().size () > 1)
+ {
+ // If we're here, we have come to the end of an included file, so we
+ // pop its prefix.
+ char *trash = 0;
+ idl_global->pragma_prefixes ().pop (trash);
+ delete [] trash;
}
- int in_main_file = I_FALSE;
- if (idl_global->filename()->compare(idl_global->real_filename())
- || idl_global->filename()->compare(idl_global->main_filename()))
- in_main_file = I_TRUE;
- idl_global->set_in_main_file(in_main_file);
- /*
- * If it's an import file store the stripped name for the BE to use
- */
- if (!(idl_global->in_main_file()) && idl_global->import()) {
- nm = new UTL_String(stripped_name(idl_global->filename()));
- idl_global->store_include_file_name(nm);
- }
}
-/*
- * Store a #pragma line into the list of pragmas
- */
+// Store a #pragma line into the list of pragmas
static void
-idl_store_pragma(char *buf)
+idl_store_pragma (char *buf)
{
char *sp = buf + 1;
- // Remove all the blanks between the '#' and the 'pragma'
+
+ // Remove all the blanks between the '#' and the 'pragma'.
if (*sp != 'p')
{
while (*sp != 'p')
- ++sp;
+ {
+ ++sp;
+ }
+
char *tp = buf + 1;
+
while (*sp != '\n')
{
*tp = *sp;
- ++tp; ++sp;
+ ++tp;
+ ++sp;
}
}
- if (ACE_OS::strstr(buf + 8, "import") != 0) {
- idl_global->set_import(I_TRUE);
- return;
- }
- if (ACE_OS::strstr(buf + 8, "include") != 0) {
- idl_global->set_import(I_FALSE);
- return;
- }
- // Remove the final '\n'
+ if (ACE_OS::strstr (buf + 8, "import") != 0)
+ {
+ idl_global->set_import (I_TRUE);
+ return;
+ }
+
+ if (ACE_OS::strstr (buf + 8, "include") != 0)
+ {
+ idl_global->set_import (I_FALSE);
+ return;
+ }
+
+ // Remove the final '\n'.
while (*sp != '\n')
- ++sp;
+ {
+ ++sp;
+ }
+
*sp = '\0';
- if (ACE_OS::strstr(buf + 8, "ident") != 0) {
- idl_global->ident_string(buf + 8);
- return;
- }
- UTL_StrList *p = idl_global->pragmas();
- if (p == NULL)
- idl_global->set_pragmas(new UTL_StrList(new UTL_String(buf), NULL));
- else {
- p->nconc(new UTL_StrList(new UTL_String(buf), NULL));
- idl_global->set_pragmas(p);
- }
+
+ if (ACE_OS::strncmp (buf + 8, "prefix", 6) == 0)
+ {
+ char *new_prefix = idl_get_pragma_string (buf);
+
+ if (new_prefix != 0)
+ {
+ unsigned long depth = idl_global->scopes ()->depth ();
+
+ // At global scope, we always replace the prefix. For all
+ // other scopes, we replace only if there is a prefix already
+ // associated with that scope, otherwise we add the prefix.
+ if (depth == 1 || idl_global->scopes ()->top ()->has_prefix ())
+ {
+ char *trash = 0;
+ idl_global->pragma_prefixes ().pop (trash);
+ delete [] trash;
+ }
+
+ if (depth > 1)
+ {
+ idl_global->scopes ()->top ()->has_prefix (1);
+ }
+
+ idl_global->pragma_prefixes ().push (new_prefix);
+ }
+ }
+ else if (ACE_OS::strncmp (buf + 8, "version", 7) == 0)
+ {
+ char *tmp = buf + 16;
+
+ while (*tmp == ' ')
+ {
+ ++tmp;
+ }
+
+ char *number = ACE_OS::strchr (tmp, ' ');
+
+ while (*number == ' ')
+ {
+ ++number;
+ }
+
+ AST_Decl *d = idl_find_node (tmp);
+
+ if (d == 0)
+ {
+ return;
+ }
+
+ if (!idl_valid_version (number))
+ {
+ idl_global->err ()->version_number_error (number);
+ return;
+ }
+
+ d->version (ACE::strnew (number));
+ }
+ else if (ACE_OS::strncmp (buf + 8, "ident", 5) == 0)
+ {
+ idl_global->ident_string (buf + 8);
+ }
+ else if (ACE_OS::strncmp (buf + 8, "id", 2) == 0)
+ {
+ char *tmp = buf + 11;
+
+ while (*tmp == ' ')
+ {
+ ++tmp;
+ }
+
+ AST_Decl *d = idl_find_node (tmp);
+
+ if (d == 0)
+ {
+ return;
+ }
+
+ char *new_id = idl_get_pragma_string (buf);
+
+ if (new_id != 0)
+ {
+ d->repoID (new_id);
+ }
+ }
}
/*
@@ -2752,3 +2891,111 @@ idl_wstring_escape_reader (char *str)
{
return str;
}
+
+static char *
+idl_get_pragma_string (char *pragma)
+{
+ // Get pointers to each end of the substring between the quotes.
+ const char *start = ACE_OS::strchr (pragma, '"') + 1;
+ const char *end = ACE_OS::strchr (start, '"');
+
+ if (end == 0)
+ {
+ idl_global->err ()->syntax_error (
+ IDL_GlobalData::PS_PragmaPrefixSyntax
+ );
+
+ return 0;
+ }
+
+ int len = end - start;
+ char *retval = 0;
+
+ ACE_NEW_RETURN (retval,
+ char[len + 1],
+ 0);
+
+ ACE_OS::strncpy (retval,
+ start,
+ len);
+
+ retval[len] = '\0';
+ return retval;
+}
+
+static idl_bool
+idl_valid_version (char *s)
+{
+ // Nothing preceding decimal point.
+ if (*s == '.')
+ {
+ return 0;
+ }
+
+ char *minor = ACE_OS::strchr (s, '.');
+ int i;
+
+ if (minor == 0)
+ {
+ // No decimal point.
+ return 0;
+ }
+
+ if (*(minor + 1) == '\0')
+ {
+ // Nothing following decimal point.
+ return 0;
+ }
+
+ char *tmp = minor + 1;
+
+ for (i = 0; tmp[i] != '\0'; ++i)
+ {
+ if (!isdigit (tmp[i]))
+ {
+ return 0;
+ }
+ }
+
+ int len = minor - s;
+
+ for (i = 0; i < len; ++i)
+ {
+ if (!isdigit (s[i]))
+ {
+ return 0;
+ }
+ }
+
+ // Major and minor version numbers must be unsigned shorts.
+ if (ACE_OS::atoi (minor + 1) > ACE_UINT16_MAX
+ || ACE_OS::atoi (s) > ACE_UINT16_MAX)
+ {
+ return 0;
+ }
+
+ return 1;
+}
+
+static AST_Decl *
+idl_find_node (char *s)
+{
+ UTL_ScopedName *node = idl_global->string_to_scoped_name (s);
+ AST_Decl *d = 0;
+
+ if (node != 0)
+ {
+ d = idl_global->scopes ()->top_non_null ()->lookup_by_name (node,
+ I_TRUE);
+ }
+
+ if (d == 0)
+ {
+ idl_global->err ()->lookup_error (node);
+ node->destroy ();
+ delete node;
+ node = 0;
+ }
+
+ return d;
+}
diff --git a/TAO/TAO_IDL/fe/lex.yy.cpp.diff b/TAO/TAO_IDL/fe/lex.yy.cpp.diff
index b761ccc174b..8b1734507cf 100644
--- a/TAO/TAO_IDL/fe/lex.yy.cpp.diff
+++ b/TAO/TAO_IDL/fe/lex.yy.cpp.diff
@@ -1,7 +1,4 @@
---- lex.yy.cpp Mon Nov 12 18:56:44 2001
-+++ lex.yy.cpp.new Mon Nov 12 18:52:48 2001
-@@ -984,7 +984,7 @@
-
+@@ -987,7 +987,7 @@
/* Code executed at the end of each rule. */
#ifndef TAO_YY_BREAK
-#define TAO_YY_BREAK break;
@@ -9,7 +6,7 @@
#endif
#define TAO_YY_RULE_SETUP \
-@@ -996,7 +996,7 @@
+@@ -999,7 +999,7 @@
TAO_YY_DECL
{
register tao_yy_state_type tao_yy_current_state;
@@ -17,8 +14,7 @@
+ register char *tao_yy_cp = 0, *tao_yy_bp = 0;
register int tao_yy_act;
-
-@@ -1432,42 +1432,42 @@
+@@ -1435,7 +1435,7 @@
idl_global->set_lineno(idl_global->lineno() + 1);
idl_store_pragma(ace_tao_yytext);
}
@@ -26,14 +22,15 @@
+ break;
case 69:
case 70:
- TAO_YY_RULE_SETUP
- {/* ignore file */
- idl_global->set_lineno(idl_global->lineno() + 1);
- }
+
+@@ -1442,7 +1442,7 @@
+{/* ignore file */
+ idl_global->set_lineno(idl_global->lineno() + 1);
+ }
- TAO_YY_BREAK
-+ break;
- case 71:
- case 72:
++ break;
+case 71:
+case 72:
TAO_YY_RULE_SETUP
{
idl_parse_line_and_file(ace_tao_yytext);
@@ -42,6 +39,8 @@
+ break;
case 73:
case 74:
+
+@@ -1455,7 +1455,7 @@
TAO_YY_RULE_SETUP
{
idl_parse_line_and_file(ace_tao_yytext);
@@ -50,6 +49,8 @@
+ break;
case 75:
case 76:
+
+@@ -1462,7 +1462,7 @@
TAO_YY_RULE_SETUP
{
idl_parse_line_and_file(ace_tao_yytext);
@@ -58,6 +59,8 @@
+ break;
case 77:
case 78:
+
+@@ -1469,7 +1469,7 @@
TAO_YY_RULE_SETUP
{
idl_parse_line_and_file(ace_tao_yytext);
@@ -66,8 +69,8 @@
+ break;
case 79:
case 80:
- TAO_YY_RULE_SETUP
-@@ -1475,14 +1475,14 @@
+
+@@ -1478,14 +1478,14 @@
/* ignore cpp ident */
idl_global->set_lineno(idl_global->lineno() + 1);
}
@@ -75,6 +78,8 @@
+ break;
case 81:
TAO_YY_RULE_SETUP
+
+@@ -1484,7 +1484,7 @@
{
/* ignore comments */
idl_global->set_lineno(idl_global->lineno() + 1);
@@ -83,8 +88,8 @@
+ break;
case 82:
TAO_YY_RULE_SETUP
- {
-@@ -1499,25 +1499,25 @@
+
+@@ -1502,25 +1502,25 @@
}
}
}
@@ -104,6 +109,8 @@
+ break;
case 85:
TAO_YY_RULE_SETUP
+
+@@ -1518,7 +1518,7 @@
return ace_tao_yytext [0];
- TAO_YY_BREAK
+ break;
diff --git a/TAO/TAO_IDL/fe/y.tab.cpp b/TAO/TAO_IDL/fe/y.tab.cpp
index 92237c1df6d..b4f8cfca595 100644
--- a/TAO/TAO_IDL/fe/y.tab.cpp
+++ b/TAO/TAO_IDL/fe/y.tab.cpp
@@ -141,10 +141,11 @@ short tao_yylhs[] = { -1,
183, 184, 14, 14, 182, 185, 11, 25, 26, 26,
186, 187, 47, 188, 189, 121, 66, 66, 190, 191,
192, 193, 77, 194, 196, 197, 198, 123, 62, 62,
- 62, 12, 12, 114, 199, 195, 201, 195, 200, 204,
- 203, 203, 205, 206, 202, 15, 15, 15, 15, 61,
- 61, 61, 207, 208, 23, 23, 209, 210, 17, 17,
- 18, 211, 19, 19,
+ 62, 12, 12, 199, 201, 114, 202, 200, 204, 200,
+ 203, 207, 206, 206, 208, 209, 205, 210, 195, 212,
+ 195, 211, 215, 214, 214, 216, 217, 213, 15, 15,
+ 15, 15, 61, 61, 61, 218, 219, 23, 23, 220,
+ 221, 17, 17, 18, 222, 19, 19,
};
short tao_yylen[] = { 2,
1, 2, 0, 0, 3, 0, 3, 0, 3, 0,
@@ -153,7 +154,7 @@ short tao_yylen[] = { 2,
2, 3, 3, 0, 3, 0, 1, 1, 1, 1,
2, 1, 0, 0, 0, 7, 0, 0, 0, 8,
4, 0, 3, 1, 0, 2, 0, 2, 1, 2,
- 2, 0, 1, 1, 1, 0, 3, 0, 3, 2,
+ 2, 0, 1, 1, 2, 0, 3, 0, 3, 2,
0, 0, 3, 0, 3, 0, 3, 0, 3, 0,
3, 0, 3, 2, 0, 4, 0, 1, 0, 3,
0, 4, 1, 1, 2, 2, 0, 0, 0, 0,
@@ -177,10 +178,11 @@ short tao_yylen[] = { 2,
0, 0, 6, 1, 1, 0, 3, 2, 2, 0,
0, 0, 5, 0, 0, 6, 1, 0, 0, 0,
0, 0, 9, 0, 0, 0, 0, 10, 1, 1,
- 0, 1, 1, 3, 0, 3, 0, 4, 2, 0,
- 4, 0, 0, 0, 5, 1, 1, 1, 1, 1,
- 1, 1, 0, 0, 6, 0, 0, 0, 6, 0,
- 2, 0, 4, 0,
+ 0, 1, 1, 0, 0, 5, 0, 3, 0, 4,
+ 2, 0, 4, 0, 0, 0, 5, 0, 3, 0,
+ 4, 2, 0, 4, 0, 0, 0, 5, 1, 1,
+ 1, 1, 1, 1, 1, 0, 0, 6, 0, 0,
+ 0, 6, 0, 2, 0, 4, 0,
};
short tao_yydefred[] = { 3,
0, 0, 16, 97, 18, 29, 146, 201, 216, 249,
@@ -207,367 +209,371 @@ short tao_yydefred[] = { 3,
0, 125, 129, 134, 260, 92, 0, 267, 272, 0,
3, 0, 0, 209, 0, 0, 208, 0, 82, 287,
299, 300, 0, 0, 72, 74, 76, 0, 70, 78,
- 80, 0, 68, 66, 0, 61, 63, 64, 65, 85,
+ 80, 304, 68, 66, 0, 61, 63, 64, 0, 85,
265, 130, 131, 132, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 100, 0,
173, 281, 277, 280, 204, 208, 0, 219, 258, 252,
- 257, 0, 0, 0, 303, 317, 294, 318, 302, 0,
- 316, 284, 0, 0, 0, 28, 0, 0, 0, 0,
- 0, 46, 0, 135, 0, 0, 0, 0, 0, 0,
- 0, 126, 127, 128, 261, 268, 273, 0, 0, 0,
- 0, 0, 0, 0, 214, 211, 210, 0, 0, 0,
- 207, 0, 50, 83, 0, 0, 73, 75, 77, 79,
- 81, 0, 304, 69, 67, 0, 101, 111, 22, 174,
+ 257, 0, 0, 0, 303, 330, 294, 331, 302, 0,
+ 329, 284, 0, 0, 0, 28, 0, 0, 0, 0,
+ 0, 46, 65, 0, 135, 0, 0, 0, 0, 0,
+ 0, 0, 126, 127, 128, 261, 268, 273, 0, 0,
+ 0, 0, 0, 0, 0, 214, 211, 210, 0, 0,
+ 0, 207, 0, 50, 83, 0, 0, 73, 75, 77,
+ 79, 81, 305, 69, 67, 0, 101, 111, 22, 174,
282, 279, 205, 0, 0, 0, 229, 220, 0, 225,
226, 228, 227, 253, 255, 293, 295, 285, 0, 0,
- 0, 215, 212, 0, 0, 0, 0, 306, 320, 321,
- 322, 313, 0, 312, 283, 0, 221, 256, 296, 286,
- 181, 0, 308, 0, 213, 0, 0, 0, 314, 310,
- 222, 323, 297, 179, 0, 0, 0, 0, 0, 0,
- 315, 311, 237, 244, 242, 234, 241, 223, 233, 324,
- 327, 298, 180, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 238, 245, 243, 247, 235, 240, 224, 232,
- 0, 328, 0, 0, 0, 325, 0, 246, 248, 236,
- 334, 0, 0, 329, 332, 0, 333,
+ 215, 212, 0, 0, 0, 0, 0, 306, 283, 0,
+ 221, 256, 0, 296, 286, 181, 0, 0, 213, 0,
+ 0, 0, 0, 0, 308, 315, 0, 314, 222, 319,
+ 333, 334, 335, 326, 0, 325, 336, 297, 179, 0,
+ 310, 0, 0, 0, 321, 0, 0, 0, 0, 316,
+ 312, 237, 244, 242, 234, 241, 223, 233, 327, 323,
+ 337, 340, 298, 180, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 317, 313, 238,
+ 245, 243, 247, 235, 240, 224, 232, 328, 324, 0,
+ 341, 0, 0, 0, 338, 0, 246, 248, 236, 347,
+ 0, 0, 342, 345, 0, 346,
};
short tao_yydgoto[] = { 1,
- 326, 78, 79, 80, 81, 82, 83, 84, 358, 85,
- 176, 287, 86, 87, 289, 204, 422, 452, 453, 164,
- 189, 60, 403, 171, 273, 322, 416, 428, 177, 222,
- 390, 398, 20, 21, 347, 205, 206, 207, 208, 209,
- 210, 211, 212, 213, 214, 215, 274, 417, 437, 113,
+ 327, 78, 79, 80, 81, 82, 83, 84, 358, 85,
+ 176, 287, 86, 87, 289, 204, 433, 471, 472, 164,
+ 189, 60, 408, 171, 273, 323, 425, 441, 177, 222,
+ 385, 394, 20, 21, 347, 205, 206, 207, 208, 209,
+ 210, 211, 212, 213, 214, 215, 274, 426, 454, 113,
89, 90, 91, 92, 93, 94, 95, 96, 97, 98,
- 382, 233, 178, 179, 180, 234, 99, 22, 23, 100,
+ 404, 233, 178, 179, 180, 234, 99, 22, 23, 100,
235, 2, 25, 103, 236, 104, 237, 105, 28, 106,
- 29, 107, 30, 108, 38, 40, 154, 221, 319, 31,
+ 29, 107, 30, 108, 38, 40, 154, 221, 320, 31,
32, 57, 187, 161, 238, 41, 134, 33, 34, 35,
36, 37, 58, 188, 162, 245, 129, 186, 283, 56,
- 246, 247, 239, 249, 327, 301, 300, 293, 294, 295,
- 240, 297, 241, 298, 284, 303, 140, 169, 39, 153,
- 220, 318, 123, 42, 155, 320, 410, 43, 156, 275,
- 224, 323, 331, 282, 277, 355, 386, 354, 44, 157,
- 225, 328, 374, 396, 418, 407, 429, 419, 430, 427,
- 445, 424, 426, 425, 443, 444, 45, 158, 280, 226,
- 329, 281, 330, 375, 168, 266, 139, 190, 101, 172,
- 267, 102, 173, 268, 223, 321, 371, 336, 377, 46,
- 159, 227, 332, 335, 343, 376, 397, 409, 369, 383,
- 370, 384, 394, 406, 392, 405, 408, 431, 432, 447,
- 456,
+ 246, 247, 239, 249, 328, 301, 300, 293, 294, 295,
+ 240, 297, 241, 298, 284, 304, 140, 169, 39, 153,
+ 220, 319, 123, 42, 155, 321, 419, 43, 156, 275,
+ 224, 324, 332, 282, 277, 355, 380, 354, 44, 157,
+ 225, 329, 373, 390, 427, 413, 442, 428, 443, 440,
+ 464, 437, 439, 438, 462, 463, 45, 158, 280, 226,
+ 330, 281, 331, 374, 168, 266, 139, 190, 101, 172,
+ 267, 102, 173, 268, 223, 322, 370, 337, 376, 46,
+ 159, 227, 333, 336, 384, 375, 393, 418, 299, 378,
+ 369, 387, 397, 388, 398, 412, 436, 410, 435, 391,
+ 405, 392, 406, 416, 445, 414, 444, 417, 446, 447,
+ 466, 475,
};
short tao_yysindex[] = { 0,
- 0, 590, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, -208, -197, -175, -224, 0, 0, 0, 0, 0,
- 0, 26, 430, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 49, 566, -146,
- -208, 448, -208, -208, -208, -208, 0, 0, 0, 26,
- 0, 26, -186, -186, 0, -208, -5, 17, 0, 0,
- -209, 0, -138, 0, 0, 0, 0, 0, 0, 0,
+ 0, 575, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, -216, -200, -235, -229, 0, 0, 0, 0, 0,
+ 0, 37, 411, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 42, 536, -173,
+ -216, 437, -216, -216, -216, -216, 0, 0, 0, 37,
+ 0, 37, -215, -215, 0, -216, -16, 12, 0, 0,
+ -171, 0, -125, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 59, 0, -177, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 26, 0,
- 77, 87, 99, 105, 108, 113, 115, 134, 0, 0,
- 0, -177, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 73, 0,
- 0, 0, 0, -221, 0, 0, -59, 0, 149, -208,
- 0, 0, 0, -88, 0, 0, 0, 0, 0, 0,
- 0, 0, -208, 117, -208, 125, -51, 126, 127, 0,
- 0, 0, -177, 0, 0, 0, 0, 12, -208, -221,
- 0, 12, 12, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 648, 617, 207, 357,
+ 0, 0, 0, 0, 0, 72, 0, -207, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 37, 0,
+ 62, 80, 106, 108, 111, 113, 119, 121, 0, 0,
+ 0, -207, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 67, 0,
+ 0, 0, 0, -220, 0, 0, -67, 0, 140, -216,
+ 0, 0, 0, -97, 0, 0, 0, 0, 0, 0,
+ 0, 0, -216, 83, -216, 87, -44, 100, 110, 0,
+ 0, 0, -207, 0, 0, 0, 0, 13, -216, -220,
+ 0, 13, 13, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 631, 600, 212, 486,
0, 0, 0, 0, 0, 0, 0, 0, 0, 31,
- 31, 31, 12, -177, 0, 130, 162, 220, -131, 132,
- 129, 0, 0, 0, 0, 0, -177, 0, 0, 198,
- 0, 221, 173, 0, 226, 16, 0, 648, 0, 0,
- 0, 0, 515, -16, 0, 0, 0, 145, 0, 0,
- 0, 18, 0, 0, 146, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 235, 12, 12, 12, 12, 12,
- 12, 12, 12, 12, 12, 227, 229, 238, 0, 590,
+ 31, 31, 13, -207, 0, 134, 166, 228, -96, 27,
+ 122, 0, 0, 0, 0, 0, -207, 0, 0, 207,
+ 0, 225, 180, 0, 232, 16, 0, 631, 0, 0,
+ 0, 0, 510, -8, 0, 0, 0, 150, 0, 0,
+ 0, 0, 0, 0, 152, 0, 0, 0, 224, 0,
+ 0, 0, 0, 0, 245, 13, 13, 13, 13, 13,
+ 13, 13, 13, 13, 13, 229, 234, 243, 0, 575,
0, 0, 0, 0, 0, 0, 381, 0, 0, 0,
- 0, 0, 152, 223, 0, 0, 0, 0, 0, -177,
- 0, 0, 251, 253, 264, 0, 265, 268, 288, 381,
- 381, 0, -221, 0, 162, 220, -131, 132, 132, 129,
- 129, 0, 0, 0, 0, 0, 0, 12, 204, -208,
- 12, 173, 205, 0, 0, 0, 0, 157, 206, 289,
- 0, 217, 0, 0, 89, 548, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, -177, 0, 0, 0, 0,
- 0, 0, 0, 292, -208, 85, 0, 0, -177, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 311, -74,
- 261, 0, 0, 314, 16, 288, -208, 0, 0, 0,
- 0, 0, 315, 0, 0, 300, 0, 0, 0, 0,
- 0, 548, 0, 316, 0, 239, 70, 319, 0, 0,
- 0, 0, 0, 0, -208, -74, -188, 324, 74, -208,
+ 0, 0, 162, 230, 0, 0, 0, 0, 0, -207,
+ 0, 0, 231, 249, 254, 0, 255, 266, 73, 381,
+ 381, 0, 0, -220, 0, 166, 228, -96, 27, 27,
+ 122, 122, 0, 0, 0, 0, 0, 0, 13, 217,
+ -216, 13, 180, 221, 0, 0, 0, 0, 554, 222,
+ 288, 0, 226, 0, 0, 95, 361, 0, 0, 0,
+ 0, 0, 0, 0, 0, -207, 0, 0, 0, 0,
+ 0, 0, 0, 294, -216, 92, 0, 0, -207, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 315, 264,
+ 0, 0, 317, 16, 319, -216, 0, 0, 0, 301,
+ 0, 0, 0, 0, 0, 0, 320, 77, 0, 247,
+ 327, -63, 90, 338, 0, 0, 330, 0, 0, 0,
+ 0, 0, 0, 0, 342, 0, 0, 0, 0, 361,
+ 0, 341, -68, 361, 0, 345, 353, 104, -216, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 308, 12, 313, 448, -94, 244, -188,
- -221, 336, 0, 0, 0, 0, 0, 0, 0, 0,
- 337, 0, 321, -208, 318, 0, 94, 0, 0, 0,
- 0, 359, 360, 0, 0, 98, 0,
+ 0, 0, 0, 0, -216, 77, 343, 13, 339, 437,
+ -52, 276, -68, -216, -63, -220, 363, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 364,
+ 0, 346, -216, 352, 0, 109, 0, 0, 0, 0,
+ 372, 371, 0, 0, 112, 0,
};
short tao_yyrindex[] = { 0,
- 0, 407, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 416, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, -1, -13, 0, 0, 0, 0, 0, 0, 0,
+ 0, 7, 29, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 11,
- 0, 42, 3, -43, 0, 0, 0, 0, 0, 0,
- 29, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 19,
+ 0, 26, 56, -43, 0, 0, 0, 0, 0, 0,
+ 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 33, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, -98, 0,
- 54, 91, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 151, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 49, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, -93, 0,
+ 74, 127, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 163, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 28, 0, 0, 0,
- 0, 0, 0, 287, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 6, 0, 0, 0,
+ 0, 0, 0, 302, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, -6, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 23, 0, 0, 0, 0, 0, 228, 277, 13, 0,
+ 176, 0, 0, 0, 0, 0, 253, 281, 28, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, -19, 0, 120, 470, 537, 464, 111,
- 38, 0, 0, 0, 0, 0, 293, 0, 0, 0,
- 0, 352, 0, 0, 0, 0, 0, 305, 0, 0,
+ 0, 0, 0, -19, 0, 135, 543, 350, 328, 51,
+ 38, 0, 0, 0, 0, 0, 305, 0, 0, 0,
+ 0, 374, 0, 0, 0, 0, 0, 309, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 290,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 306,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 118, 0, 0, 0, 0, 0, 0, 0, 160,
+ 0, 199, 0, 0, 0, 0, 0, 0, 0, 178,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 549, 539, 492, 148, 159, 61,
- 101, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 6, 0, 179, 0, 0, 0, 0, 0, 304,
+ 0, 0, 0, 0, 0, 548, 541, 336, 88, 125,
+ 61, 115, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 18, 0, 223, 0, 0, 0, 0, 0,
+ 313, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 398, 0, 0, 399, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, -28, 0, 0, 0, 7, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 377, 0, 0, 390, 0,
+ 0, 0, 0, 0, 0, 0, -27, 0, 0, 0,
+ 0, 0, 22, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, -7, 382, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 401, 0, 0, 0, 404, 0, 387, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 393, 0, 0, -48, 378, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 379, 0,
+ 460, 0, 322, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 497, 0, 329,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 398, 0, 0, 0, 0,
+ 0, 407, 0, 0, 0, 0,
};
short tao_yygindex[] = { 0,
- -21, 250, 0, 0, 0, -35, 35, 4, 0, 39,
- 0, 0, 0, -34, -306, -22, 0, 0, 0, 30,
- 0, 57, 0, 0, 0, 0, 0, 0, 107, 0,
- 0, 0, 0, 449, 0, -189, 0, 208, 209, 210,
- -76, -42, -26, 45, 0, -113, 143, 41, 0, 0,
- -32, -31, -30, 433, 0, 434, 0, 0, -191, -29,
- 0, 0, -254, -9, 0, 0, 0, 215, 216, -12,
- 10, 254, 0, 0, 14, 0, 25, 0, 0, 0,
+ -21, 259, 0, 0, 0, -35, 14, 4, 0, 34,
+ 0, 0, 0, -34, -289, -22, 0, 0, 0, 8,
+ 0, -1, 0, 0, 0, 0, 0, 0, 98, 0,
+ 0, 0, 0, 436, 0, -192, 0, 201, 202, 200,
+ -23, -14, -20, 50, 0, -118, 158, 41, 0, 0,
+ -32, -31, -30, 444, 0, 445, 0, 0, -176, -29,
+ 0, 0, -239, -9, 0, 0, 0, 227, 239, -12,
+ 10, 277, 0, 0, 11, 0, 25, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 318, 0, 0, 0, 0, 0, 0, 0,
+ 0, 488, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 323, 0, -36, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 291, 0, 0, 0, 0, 0, 0, 0,
- 0, 459, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 294, 0, -67, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 282, 236, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 64, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 252, 202, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 50, 0, 0,
+ 0, 131, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 104, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 110, 0, 0, 0, 0, 0,
- 0, 75, 0, 0, 0, 0, 0, 0, 0, 0,
- 0,
+ 0, 0, 0, 0, 78, 0, 0, 0, 0, 0,
+ 0, 0, 63, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0,
};
-#define TAO_YYTABLESIZE 941
+#define TAO_YYTABLESIZE 924
short tao_yytable[] = { 49,
88, 77, 48, 110, 111, 18, 114, 115, 116, 119,
- 326, 24, 305, 255, 55, 26, 112, 133, 133, 88,
- 122, 133, 133, 133, 36, 133, 27, 133, 121, 368,
- 124, 125, 126, 127, 87, 47, 17, 87, 133, 133,
- 19, 291, 133, 131, 55, 59, 278, 86, 47, 278,
- 86, 203, 135, 84, 200, 136, 201, 94, 218, 219,
- 55, 58, 6, 182, 278, 350, 182, 413, 189, 95,
- 203, 189, 186, 133, 133, 122, 158, 16, 122, 55,
- 122, 182, 122, 59, 6, 399, 189, 186, 76, 189,
- 186, 158, 414, 415, 158, 122, 122, 269, 123, 122,
- 96, 123, 141, 123, 133, 123, 128, 109, 130, 55,
- 120, 163, 269, 276, 75, 269, 87, 132, 123, 123,
- 142, 36, 123, 137, 138, 55, 16, 167, 348, 86,
- 122, 122, 143, 36, 274, 84, 145, 202, 124, 133,
- 174, 124, 181, 124, 291, 124, 146, 217, 119, 274,
- 411, 119, 274, 123, 123, 144, 216, 147, 124, 124,
- 112, 122, 124, 148, 36, 265, 149, 88, 119, 119,
- 263, 150, 119, 151, 261, 264, 262, 112, 112, 259,
- 260, 112, 308, 309, 123, 120, 414, 415, 120, 449,
- 18, 18, 152, 124, 124, 160, 121, 286, 288, 121,
- 291, 36, 165, 119, 119, 120, 120, 351, 166, 120,
- 290, 170, 112, 379, 380, 381, 121, 121, 310, 311,
- 121, 17, 17, 183, 124, 19, 19, 50, 52, 53,
- 54, 18, 344, 345, 119, 434, 312, 313, 314, 175,
- 120, 120, 292, 326, 252, 253, 254, 182, 184, 185,
- 250, 121, 121, 256, 88, 257, 55, 258, 269, 307,
- 307, 307, 17, 272, 271, 278, 19, 292, 47, 296,
- 302, 120, 279, 18, 299, 304, 333, 88, 88, 24,
- 346, 334, 121, 26, 189, 186, 55, 47, 315, 158,
- 316, 133, 133, 87, 27, 360, 361, 362, 363, 317,
- 286, 288, 55, 206, 17, 359, 86, 181, 19, 337,
- 269, 338, 84, 290, 191, 192, 193, 194, 195, 196,
- 197, 76, 339, 340, 198, 199, 341, 342, 349, 353,
- 364, 357, 365, 191, 192, 193, 194, 195, 196, 197,
- 76, 366, 181, 198, 199, 367, 135, 274, 122, 122,
- 372, 378, 27, 385, 387, 393, 286, 288, 395, 400,
- 402, 401, 404, 420, 49, 421, 433, 391, 439, 290,
- 435, 123, 123, 209, 209, 442, 450, 446, 448, 209,
- 209, 209, 209, 209, 209, 209, 209, 209, 209, 209,
- 209, 209, 181, 209, 209, 209, 209, 49, 451, 454,
- 423, 45, 457, 455, 88, 436, 1, 110, 163, 57,
- 172, 124, 124, 47, 21, 56, 319, 186, 356, 62,
- 63, 119, 119, 66, 67, 68, 69, 209, 254, 49,
- 230, 181, 10, 309, 209, 209, 178, 330, 331, 251,
+ 255, 24, 26, 307, 55, 17, 112, 133, 133, 88,
+ 122, 133, 133, 133, 6, 133, 27, 133, 121, 36,
+ 124, 125, 126, 127, 87, 19, 47, 87, 133, 133,
+ 47, 86, 133, 131, 86, 186, 189, 368, 128, 189,
+ 130, 339, 203, 218, 219, 200, 291, 201, 278, 6,
+ 186, 278, 318, 186, 189, 94, 16, 189, 84, 261,
+ 203, 262, 16, 133, 133, 122, 278, 95, 122, 55,
+ 122, 350, 122, 120, 96, 75, 55, 59, 119, 76,
+ 135, 119, 158, 136, 59, 122, 122, 144, 123, 122,
+ 109, 123, 143, 123, 133, 123, 132, 158, 119, 119,
+ 158, 163, 119, 55, 58, 141, 87, 269, 123, 123,
+ 420, 145, 123, 86, 429, 120, 348, 167, 120, 36,
+ 122, 122, 269, 142, 133, 269, 137, 138, 202, 146,
+ 174, 36, 181, 119, 119, 120, 120, 217, 36, 120,
+ 84, 55, 124, 123, 123, 124, 216, 124, 265, 124,
+ 291, 122, 121, 263, 147, 121, 148, 88, 264, 149,
+ 274, 150, 124, 124, 119, 112, 124, 151, 55, 152,
+ 120, 120, 121, 121, 123, 274, 121, 422, 274, 160,
+ 18, 18, 112, 112, 165, 448, 112, 286, 288, 166,
+ 17, 17, 170, 351, 458, 175, 36, 124, 124, 182,
+ 290, 120, 423, 424, 259, 260, 182, 121, 121, 182,
+ 19, 19, 184, 468, 401, 402, 403, 112, 423, 424,
+ 183, 18, 185, 291, 182, 309, 310, 291, 124, 50,
+ 52, 17, 313, 314, 315, 451, 311, 312, 121, 252,
+ 253, 254, 53, 54, 88, 250, 55, 256, 186, 257,
+ 309, 19, 189, 344, 345, 258, 276, 269, 271, 47,
+ 272, 278, 279, 18, 296, 292, 302, 88, 88, 24,
+ 26, 346, 303, 17, 339, 305, 334, 47, 335, 338,
+ 316, 133, 133, 87, 27, 317, 360, 361, 362, 363,
+ 86, 286, 288, 19, 318, 158, 359, 339, 181, 320,
+ 320, 320, 340, 341, 290, 191, 192, 193, 194, 195,
+ 196, 197, 76, 292, 342, 198, 199, 84, 55, 343,
+ 269, 365, 357, 191, 192, 193, 194, 195, 196, 197,
+ 76, 349, 181, 198, 199, 353, 364, 206, 122, 122,
+ 366, 367, 371, 135, 377, 55, 379, 381, 383, 389,
+ 395, 119, 119, 49, 396, 117, 386, 400, 117, 399,
+ 411, 123, 123, 118, 286, 288, 118, 27, 286, 288,
+ 407, 409, 415, 274, 421, 117, 117, 290, 430, 117,
+ 115, 290, 431, 118, 118, 432, 452, 118, 120, 120,
+ 456, 450, 461, 467, 465, 45, 49, 115, 115, 434,
+ 469, 115, 473, 470, 474, 1, 476, 88, 453, 110,
+ 117, 117, 181, 163, 57, 124, 124, 56, 118, 118,
+ 21, 181, 172, 49, 332, 121, 121, 254, 186, 230,
+ 178, 311, 115, 115, 322, 343, 231, 344, 251, 51,
+ 181, 117, 372, 460, 209, 209, 306, 308, 307, 118,
209, 209, 209, 209, 209, 209, 209, 209, 209, 209,
- 209, 209, 209, 231, 209, 209, 209, 209, 120, 120,
- 441, 373, 51, 305, 352, 306, 76, 307, 438, 121,
- 121, 117, 118, 55, 270, 276, 228, 324, 388, 440,
- 412, 248, 0, 0, 301, 389, 0, 0, 209, 301,
+ 209, 209, 209, 115, 209, 209, 209, 209, 209, 209,
+ 352, 455, 117, 118, 209, 209, 209, 209, 209, 209,
+ 209, 209, 209, 209, 209, 209, 209, 270, 209, 209,
+ 209, 209, 55, 228, 382, 276, 457, 459, 209, 301,
+ 248, 325, 0, 449, 301, 301, 301, 301, 301, 301,
+ 301, 301, 301, 301, 301, 0, 0, 0, 0, 0,
+ 301, 301, 209, 0, 0, 0, 288, 301, 0, 301,
+ 0, 0, 301, 301, 301, 301, 301, 301, 301, 301,
+ 301, 301, 301, 0, 0, 0, 0, 0, 301, 301,
+ 0, 0, 301, 0, 288, 301, 0, 301, 0, 0,
301, 301, 301, 301, 301, 301, 301, 301, 301, 301,
- 0, 117, 0, 0, 117, 301, 301, 0, 0, 0,
- 113, 288, 0, 0, 301, 0, 0, 0, 0, 0,
- 0, 117, 117, 0, 0, 117, 0, 113, 113, 118,
- 0, 113, 118, 301, 0, 0, 0, 301, 301, 301,
- 301, 301, 301, 301, 301, 301, 301, 301, 301, 118,
- 118, 0, 0, 118, 301, 301, 117, 117, 0, 0,
- 288, 301, 113, 301, 0, 0, 301, 301, 301, 301,
- 301, 301, 301, 301, 301, 301, 301, 115, 0, 116,
- 0, 0, 301, 301, 118, 118, 301, 117, 288, 114,
- 0, 301, 0, 113, 115, 115, 116, 116, 115, 0,
- 116, 0, 0, 0, 0, 0, 114, 114, 0, 0,
- 114, 0, 0, 47, 301, 118, 0, 0, 61, 62,
- 63, 64, 65, 66, 67, 68, 69, 70, 71, 115,
- 115, 116, 116, 72, 73, 74, 325, 47, 0, 0,
- 0, 114, 61, 62, 63, 64, 65, 66, 67, 68,
+ 301, 116, 0, 113, 0, 0, 301, 301, 114, 0,
+ 301, 0, 288, 0, 0, 301, 0, 0, 116, 116,
+ 113, 113, 116, 0, 113, 114, 114, 0, 0, 114,
+ 0, 0, 0, 0, 0, 0, 0, 47, 301, 0,
+ 0, 0, 61, 62, 63, 64, 65, 66, 67, 68,
+ 69, 70, 71, 116, 116, 113, 326, 47, 73, 74,
+ 114, 0, 61, 62, 63, 64, 65, 66, 67, 68,
69, 70, 71, 8, 9, 0, 10, 72, 73, 74,
- 115, 0, 116, 0, 0, 0, 76, 0, 0, 0,
- 0, 0, 114, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 47, 0, 0, 0,
- 76, 61, 62, 63, 64, 65, 66, 67, 68, 69,
- 70, 71, 8, 9, 47, 10, 72, 73, 74, 61,
- 62, 63, 64, 65, 66, 67, 68, 69, 70, 71,
- 8, 9, 0, 10, 72, 73, 74, 0, 0, 0,
- 75, 0, 0, 0, 0, 0, 0, 0, 0, 76,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 239, 0, 0, 0, 76, 239, 239,
- 239, 239, 239, 239, 239, 239, 239, 239, 239, 239,
- 239, 47, 239, 239, 239, 239, 61, 62, 63, 64,
- 65, 66, 67, 68, 69, 70, 71, 0, 0, 0,
- 0, 0, 73, 74, 0, 0, 0, 0, 0, 0,
- 0, 285, 0, 0, 47, 0, 239, 0, 0, 61,
- 62, 63, 64, 65, 66, 67, 68, 69, 70, 71,
- 0, 0, 47, 0, 76, 73, 74, 61, 62, 63,
+ 0, 0, 0, 0, 116, 0, 113, 47, 0, 0,
+ 76, 114, 61, 62, 63, 64, 65, 66, 67, 68,
+ 69, 70, 71, 8, 9, 0, 10, 72, 73, 74,
+ 76, 0, 0, 47, 0, 0, 0, 0, 61, 62,
+ 63, 64, 65, 66, 67, 68, 69, 70, 71, 8,
+ 9, 75, 10, 72, 73, 74, 239, 0, 0, 0,
+ 76, 239, 239, 239, 239, 239, 239, 239, 239, 239,
+ 239, 239, 239, 239, 0, 239, 239, 239, 239, 0,
+ 0, 0, 47, 0, 0, 0, 76, 61, 62, 63,
+ 64, 65, 66, 67, 68, 69, 70, 71, 0, 0,
+ 0, 0, 72, 73, 74, 0, 47, 0, 0, 239,
+ 0, 61, 62, 63, 64, 65, 66, 67, 68, 69,
+ 70, 71, 0, 0, 0, 0, 0, 73, 74, 0,
+ 0, 0, 47, 0, 0, 76, 285, 61, 62, 63,
64, 65, 66, 67, 68, 69, 70, 0, 0, 0,
- 0, 0, 0, 73, 74, 3, 0, 4, 5, 6,
- 7, 0, 0, 0, 0, 0, 0, 76, 0, 0,
- 0, 0, 8, 9, 0, 10, 0, 0, 0, 11,
- 0, 0, 229, 0, 4, 76, 0, 7, 0, 0,
- 0, 0, 12, 13, 14, 15, 0, 0, 0, 8,
- 9, 16, 10, 0, 0, 0, 11, 0, 0, 230,
- 0, 231, 232, 229, 0, 4, 0, 0, 7, 12,
- 0, 0, 0, 242, 243, 244, 0, 0, 0, 0,
- 8, 9, 0, 10, 0, 0, 0, 11, 0, 0,
- 230, 0, 231, 232, 0, 0, 0, 0, 0, 0,
- 12,
+ 47, 0, 0, 73, 74, 356, 62, 63, 0, 76,
+ 66, 67, 68, 69, 0, 0, 0, 0, 0, 10,
+ 3, 0, 4, 5, 6, 7, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 76, 0, 8, 9, 0,
+ 10, 0, 0, 0, 11, 229, 0, 4, 0, 0,
+ 7, 0, 0, 76, 0, 0, 0, 12, 13, 14,
+ 15, 0, 8, 9, 0, 10, 16, 0, 0, 11,
+ 0, 0, 230, 0, 231, 232, 229, 0, 4, 0,
+ 0, 7, 12, 0, 0, 0, 242, 243, 244, 0,
+ 0, 0, 0, 8, 9, 0, 10, 0, 0, 0,
+ 11, 0, 0, 230, 0, 231, 232, 0, 0, 0,
+ 0, 0, 0, 12,
};
short tao_yycheck[] = { 12,
23, 23, 12, 39, 39, 2, 39, 39, 39, 39,
- 59, 2, 41, 203, 58, 2, 39, 37, 38, 42,
- 42, 41, 42, 43, 123, 45, 2, 47, 41, 336,
- 43, 44, 45, 46, 41, 257, 2, 44, 58, 59,
- 2, 233, 62, 56, 58, 59, 41, 41, 257, 44,
- 44, 40, 262, 41, 43, 265, 45, 59, 172, 173,
- 58, 59, 260, 41, 59, 320, 44, 256, 41, 59,
- 40, 44, 44, 93, 94, 38, 44, 302, 41, 123,
- 43, 59, 45, 58, 260, 392, 59, 59, 310, 62,
- 62, 59, 281, 282, 62, 58, 59, 44, 38, 62,
- 59, 41, 44, 43, 124, 45, 50, 59, 52, 123,
- 257, 134, 59, 91, 301, 62, 123, 123, 58, 59,
- 62, 123, 62, 262, 263, 123, 302, 140, 318, 123,
- 93, 94, 310, 123, 44, 123, 60, 126, 38, 123,
- 153, 41, 155, 43, 336, 45, 60, 170, 38, 59,
- 405, 41, 62, 93, 94, 99, 169, 59, 58, 59,
- 41, 124, 62, 59, 123, 37, 59, 190, 58, 59,
- 42, 59, 62, 59, 43, 47, 45, 58, 59, 311,
- 312, 62, 259, 260, 124, 38, 281, 282, 41, 444,
- 187, 188, 59, 93, 94, 123, 38, 233, 233, 41,
- 392, 300, 262, 93, 94, 58, 59, 321, 60, 62,
- 233, 300, 93, 288, 289, 290, 58, 59, 261, 262,
- 62, 187, 188, 275, 124, 187, 188, 13, 14, 14,
- 15, 228, 300, 301, 124, 425, 263, 264, 265, 123,
- 93, 94, 125, 292, 200, 201, 202, 123, 123, 123,
- 44, 93, 94, 124, 277, 94, 300, 38, 61, 288,
- 289, 290, 228, 91, 44, 40, 228, 284, 257, 125,
- 125, 124, 257, 270, 257, 41, 125, 300, 301, 270,
- 303, 59, 124, 270, 257, 257, 300, 257, 62, 257,
- 62, 311, 312, 300, 270, 328, 328, 328, 328, 62,
- 336, 336, 300, 125, 270, 328, 300, 320, 270, 59,
- 257, 59, 300, 336, 303, 304, 305, 306, 307, 308,
- 309, 310, 59, 59, 313, 314, 59, 40, 125, 125,
- 125, 328, 44, 303, 304, 305, 306, 307, 308, 309,
- 310, 125, 355, 313, 314, 257, 262, 257, 311, 312,
- 59, 41, 125, 93, 41, 41, 392, 392, 59, 44,
- 291, 123, 44, 40, 377, 292, 59, 377, 125, 392,
- 58, 311, 312, 256, 257, 40, 59, 41, 58, 262,
- 263, 264, 265, 266, 267, 268, 269, 270, 271, 272,
- 273, 274, 405, 276, 277, 278, 279, 410, 305, 41,
- 410, 125, 305, 44, 427, 427, 0, 257, 431, 123,
- 59, 311, 312, 257, 125, 123, 257, 41, 262, 263,
- 264, 311, 312, 267, 268, 269, 270, 310, 125, 125,
- 41, 444, 276, 41, 256, 257, 59, 59, 41, 190,
+ 203, 2, 2, 41, 58, 2, 39, 37, 38, 42,
+ 42, 41, 42, 43, 260, 45, 2, 47, 41, 123,
+ 43, 44, 45, 46, 41, 2, 257, 44, 58, 59,
+ 257, 41, 62, 56, 44, 44, 41, 337, 50, 44,
+ 52, 59, 40, 172, 173, 43, 233, 45, 41, 260,
+ 59, 44, 41, 62, 59, 59, 302, 62, 41, 43,
+ 40, 45, 302, 93, 94, 38, 59, 59, 41, 123,
+ 43, 321, 45, 257, 59, 301, 58, 59, 38, 310,
+ 262, 41, 44, 265, 58, 58, 59, 99, 38, 62,
+ 59, 41, 310, 43, 124, 45, 123, 59, 58, 59,
+ 62, 134, 62, 58, 59, 44, 123, 44, 58, 59,
+ 410, 60, 62, 123, 414, 38, 319, 140, 41, 123,
+ 93, 94, 59, 62, 123, 62, 262, 263, 126, 60,
+ 153, 123, 155, 93, 94, 58, 59, 170, 123, 62,
+ 123, 123, 38, 93, 94, 41, 169, 43, 37, 45,
+ 337, 124, 38, 42, 59, 41, 59, 190, 47, 59,
+ 44, 59, 58, 59, 124, 41, 62, 59, 123, 59,
+ 93, 94, 58, 59, 124, 59, 62, 256, 62, 123,
+ 187, 188, 58, 59, 262, 435, 62, 233, 233, 60,
+ 187, 188, 300, 322, 444, 123, 300, 93, 94, 123,
+ 233, 124, 281, 282, 311, 312, 41, 93, 94, 44,
+ 187, 188, 123, 463, 288, 289, 290, 93, 281, 282,
+ 275, 228, 123, 410, 59, 259, 260, 414, 124, 13,
+ 14, 228, 263, 264, 265, 438, 261, 262, 124, 200,
+ 201, 202, 14, 15, 277, 44, 300, 124, 257, 94,
+ 288, 228, 257, 300, 301, 38, 91, 61, 44, 257,
+ 91, 40, 257, 270, 125, 284, 125, 300, 301, 270,
+ 270, 304, 59, 270, 292, 41, 125, 257, 59, 59,
+ 62, 311, 312, 300, 270, 62, 329, 329, 329, 329,
+ 300, 337, 337, 270, 62, 257, 329, 59, 321, 288,
+ 289, 290, 59, 59, 337, 303, 304, 305, 306, 307,
+ 308, 309, 310, 125, 59, 313, 314, 300, 300, 257,
+ 257, 44, 329, 303, 304, 305, 306, 307, 308, 309,
+ 310, 125, 355, 313, 314, 125, 125, 125, 311, 312,
+ 125, 257, 59, 262, 40, 300, 93, 41, 40, 59,
+ 41, 311, 312, 376, 288, 38, 376, 41, 41, 123,
+ 41, 311, 312, 38, 410, 410, 41, 125, 414, 414,
+ 291, 44, 41, 257, 44, 58, 59, 410, 44, 62,
+ 41, 414, 40, 58, 59, 292, 58, 62, 311, 312,
+ 125, 59, 40, 58, 41, 125, 419, 58, 59, 419,
+ 59, 62, 41, 305, 44, 0, 305, 440, 440, 257,
+ 93, 94, 435, 446, 123, 311, 312, 123, 93, 94,
+ 125, 444, 59, 125, 257, 311, 312, 125, 41, 41,
+ 59, 41, 93, 94, 41, 59, 125, 41, 190, 14,
+ 463, 124, 355, 446, 256, 257, 256, 258, 257, 124,
+ 262, 263, 264, 265, 266, 267, 268, 269, 270, 271,
+ 272, 273, 274, 124, 276, 277, 278, 279, 256, 257,
+ 323, 441, 39, 39, 262, 263, 264, 265, 266, 267,
+ 268, 269, 270, 271, 272, 273, 274, 221, 276, 277,
+ 278, 279, 15, 186, 374, 224, 443, 445, 310, 257,
+ 188, 276, -1, 436, 262, 263, 264, 265, 266, 267,
+ 268, 269, 270, 271, 272, -1, -1, -1, -1, -1,
+ 278, 279, 310, -1, -1, -1, 284, 257, -1, 287,
+ -1, -1, 262, 263, 264, 265, 266, 267, 268, 269,
+ 270, 271, 272, -1, -1, -1, -1, -1, 278, 279,
+ -1, -1, 310, -1, 284, 257, -1, 287, -1, -1,
262, 263, 264, 265, 266, 267, 268, 269, 270, 271,
- 272, 273, 274, 125, 276, 277, 278, 279, 311, 312,
- 431, 355, 14, 256, 322, 257, 310, 258, 428, 311,
- 312, 39, 39, 15, 221, 224, 186, 276, 375, 430,
- 406, 188, -1, -1, 257, 376, -1, -1, 310, 262,
- 263, 264, 265, 266, 267, 268, 269, 270, 271, 272,
- -1, 38, -1, -1, 41, 278, 279, -1, -1, -1,
- 41, 284, -1, -1, 287, -1, -1, -1, -1, -1,
- -1, 58, 59, -1, -1, 62, -1, 58, 59, 38,
- -1, 62, 41, 257, -1, -1, -1, 310, 262, 263,
- 264, 265, 266, 267, 268, 269, 270, 271, 272, 58,
- 59, -1, -1, 62, 278, 279, 93, 94, -1, -1,
- 284, 257, 93, 287, -1, -1, 262, 263, 264, 265,
- 266, 267, 268, 269, 270, 271, 272, 41, -1, 41,
- -1, -1, 278, 279, 93, 94, 310, 124, 284, 41,
- -1, 287, -1, 124, 58, 59, 58, 59, 62, -1,
- 62, -1, -1, -1, -1, -1, 58, 59, -1, -1,
- 62, -1, -1, 257, 310, 124, -1, -1, 262, 263,
- 264, 265, 266, 267, 268, 269, 270, 271, 272, 93,
- 94, 93, 94, 277, 278, 279, 256, 257, -1, -1,
- -1, 93, 262, 263, 264, 265, 266, 267, 268, 269,
+ 272, 41, -1, 41, -1, -1, 278, 279, 41, -1,
+ 310, -1, 284, -1, -1, 287, -1, -1, 58, 59,
+ 58, 59, 62, -1, 62, 58, 59, -1, -1, 62,
+ -1, -1, -1, -1, -1, -1, -1, 257, 310, -1,
+ -1, -1, 262, 263, 264, 265, 266, 267, 268, 269,
+ 270, 271, 272, 93, 94, 93, 256, 257, 278, 279,
+ 93, -1, 262, 263, 264, 265, 266, 267, 268, 269,
270, 271, 272, 273, 274, -1, 276, 277, 278, 279,
- 124, -1, 124, -1, -1, -1, 310, -1, -1, -1,
- -1, -1, 124, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, 257, -1, -1, -1,
- 310, 262, 263, 264, 265, 266, 267, 268, 269, 270,
- 271, 272, 273, 274, 257, 276, 277, 278, 279, 262,
- 263, 264, 265, 266, 267, 268, 269, 270, 271, 272,
- 273, 274, -1, 276, 277, 278, 279, -1, -1, -1,
- 301, -1, -1, -1, -1, -1, -1, -1, -1, 310,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 257, -1, -1, -1, 310, 262, 263,
+ -1, -1, -1, -1, 124, -1, 124, 257, -1, -1,
+ 310, 124, 262, 263, 264, 265, 266, 267, 268, 269,
+ 270, 271, 272, 273, 274, -1, 276, 277, 278, 279,
+ 310, -1, -1, 257, -1, -1, -1, -1, 262, 263,
264, 265, 266, 267, 268, 269, 270, 271, 272, 273,
- 274, 257, 276, 277, 278, 279, 262, 263, 264, 265,
- 266, 267, 268, 269, 270, 271, 272, -1, -1, -1,
- -1, -1, 278, 279, -1, -1, -1, -1, -1, -1,
- -1, 287, -1, -1, 257, -1, 310, -1, -1, 262,
- 263, 264, 265, 266, 267, 268, 269, 270, 271, 272,
- -1, -1, 257, -1, 310, 278, 279, 262, 263, 264,
+ 274, 301, 276, 277, 278, 279, 257, -1, -1, -1,
+ 310, 262, 263, 264, 265, 266, 267, 268, 269, 270,
+ 271, 272, 273, 274, -1, 276, 277, 278, 279, -1,
+ -1, -1, 257, -1, -1, -1, 310, 262, 263, 264,
+ 265, 266, 267, 268, 269, 270, 271, 272, -1, -1,
+ -1, -1, 277, 278, 279, -1, 257, -1, -1, 310,
+ -1, 262, 263, 264, 265, 266, 267, 268, 269, 270,
+ 271, 272, -1, -1, -1, -1, -1, 278, 279, -1,
+ -1, -1, 257, -1, -1, 310, 287, 262, 263, 264,
265, 266, 267, 268, 269, 270, 271, -1, -1, -1,
- -1, -1, -1, 278, 279, 256, -1, 258, 259, 260,
- 261, -1, -1, -1, -1, -1, -1, 310, -1, -1,
- -1, -1, 273, 274, -1, 276, -1, -1, -1, 280,
- -1, -1, 256, -1, 258, 310, -1, 261, -1, -1,
- -1, -1, 293, 294, 295, 296, -1, -1, -1, 273,
- 274, 302, 276, -1, -1, -1, 280, -1, -1, 283,
- -1, 285, 286, 256, -1, 258, -1, -1, 261, 293,
- -1, -1, -1, 297, 298, 299, -1, -1, -1, -1,
- 273, 274, -1, 276, -1, -1, -1, 280, -1, -1,
- 283, -1, 285, 286, -1, -1, -1, -1, -1, -1,
- 293,
+ 257, -1, -1, 278, 279, 262, 263, 264, -1, 310,
+ 267, 268, 269, 270, -1, -1, -1, -1, -1, 276,
+ 256, -1, 258, 259, 260, 261, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 310, -1, 273, 274, -1,
+ 276, -1, -1, -1, 280, 256, -1, 258, -1, -1,
+ 261, -1, -1, 310, -1, -1, -1, 293, 294, 295,
+ 296, -1, 273, 274, -1, 276, 302, -1, -1, 280,
+ -1, -1, 283, -1, 285, 286, 256, -1, 258, -1,
+ -1, 261, 293, -1, -1, -1, 297, 298, 299, -1,
+ -1, -1, -1, 273, 274, -1, 276, -1, -1, -1,
+ 280, -1, -1, 283, -1, 285, 286, -1, -1, -1,
+ -1, -1, -1, 293,
};
#define TAO_YYFINAL 1
#ifndef TAO_YYDEBUG
@@ -663,7 +669,7 @@ const char *tao_yyrule[] = {
"value_elements :",
"value_element : state_member",
"value_element : export",
-"value_element : init_decl",
+"value_element : init_decl ';'",
"$$24 :",
"state_member : IDL_PUBLIC $$24 member_i",
"$$25 :",
@@ -902,18 +908,31 @@ const char *tao_yyrule[] = {
"opt_op_attribute :",
"op_type_spec : param_type_spec",
"op_type_spec : IDL_VOID",
-"init_decl : IDL_FACTORY IDENTIFIER parameter_list",
"$$92 :",
-"parameter_list : '(' $$92 ')'",
"$$93 :",
-"parameter_list : '(' $$93 at_least_one_parameter ')'",
-"at_least_one_parameter : parameter parameters",
+"init_decl : IDL_FACTORY $$92 IDENTIFIER $$93 init_parameter_list",
"$$94 :",
-"parameters : parameters ',' $$94 parameter",
-"parameters :",
+"init_parameter_list : '(' $$94 ')'",
"$$95 :",
+"init_parameter_list : '(' $$95 at_least_one_in_parameter ')'",
+"at_least_one_in_parameter : in_parameter in_parameters",
"$$96 :",
-"parameter : direction $$95 param_type_spec $$96 declarator",
+"in_parameters : in_parameters ',' $$96 in_parameter",
+"in_parameters :",
+"$$97 :",
+"$$98 :",
+"in_parameter : IDL_IN $$97 param_type_spec $$98 declarator",
+"$$99 :",
+"parameter_list : '(' $$99 ')'",
+"$$100 :",
+"parameter_list : '(' $$100 at_least_one_parameter ')'",
+"at_least_one_parameter : parameter parameters",
+"$$101 :",
+"parameters : parameters ',' $$101 parameter",
+"parameters :",
+"$$102 :",
+"$$103 :",
+"parameter : direction $$102 param_type_spec $$103 declarator",
"param_type_spec : base_type_spec",
"param_type_spec : string_type_spec",
"param_type_spec : wstring_type_spec",
@@ -921,17 +940,17 @@ const char *tao_yyrule[] = {
"direction : IDL_IN",
"direction : IDL_OUT",
"direction : IDL_INOUT",
-"$$97 :",
-"$$98 :",
-"opt_raises : IDL_RAISES $$97 '(' $$98 at_least_one_scoped_name ')'",
+"$$104 :",
+"$$105 :",
+"opt_raises : IDL_RAISES $$104 '(' $$105 at_least_one_scoped_name ')'",
"opt_raises :",
-"$$99 :",
-"$$100 :",
-"opt_context : IDL_CONTEXT $$99 '(' $$100 at_least_one_string_literal ')'",
+"$$106 :",
+"$$107 :",
+"opt_context : IDL_CONTEXT $$106 '(' $$107 at_least_one_string_literal ')'",
"opt_context :",
"at_least_one_string_literal : IDL_STRING_LITERAL string_literals",
-"$$101 :",
-"string_literals : string_literals ',' $$101 IDL_STRING_LITERAL",
+"$$108 :",
+"string_literals : string_literals ',' $$108 IDL_STRING_LITERAL",
"string_literals :",
};
#endif
@@ -961,7 +980,7 @@ TAO_YYSTYPE tao_yyvs[TAO_YYSTACKSIZE];
* ???
*/
int
-tao_yywrap()
+tao_yywrap ()
{
return 1;
}
@@ -970,7 +989,7 @@ tao_yywrap()
* Report an error situation discovered in a production
*/
void
-tao_yyerror(const char *msg)
+tao_yyerror (const char *msg)
{
ACE_ERROR ((LM_ERROR,
"%s\n",
@@ -1282,153 +1301,139 @@ tao_yyreduce:
{
case 4:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_TypeDeclSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_TypeDeclSeen);
}
break;
case 5:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_NoState);
+ idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
}
break;
case 6:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_ConstDeclSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_ConstDeclSeen);
}
break;
case 7:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_NoState);
+ idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
}
break;
case 8:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_ExceptDeclSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_ExceptDeclSeen);
}
break;
case 9:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_NoState);
+ idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
}
break;
case 10:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_InterfaceDeclSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_InterfaceDeclSeen);
}
break;
case 11:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_NoState);
+ idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
}
break;
case 12:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_ModuleDeclSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_ModuleDeclSeen);
}
break;
case 13:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_NoState);
+ idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
}
break;
case 14:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_ValuetypeDeclSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_ValuetypeDeclSeen);
}
break;
case 15:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_NoState);
+ idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
}
break;
case 16:
{
- idl_global->err()->syntax_error(idl_global->parse_state());
+ idl_global->err()->syntax_error (idl_global->parse_state());
}
break;
case 17:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_NoState);
+ idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
tao_yyerrok;
}
break;
case 18:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_ModuleSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_ModuleSeen);
}
break;
case 19:
{
- UTL_ScopedName *n =
- new UTL_ScopedName(new Identifier(tao_yyvsp[0].strval), NULL);
- AST_Module *m = NULL;
- UTL_Scope *s = idl_global->scopes()->top_non_null();
- UTL_StrList *p = idl_global->pragmas();
+ UTL_ScopedName *n =
+ new UTL_ScopedName(new Identifier (tao_yyvsp[0].strval), 0);
+ AST_Module *m = 0;
+ UTL_Scope *s = idl_global->scopes ()->top_non_null ();
- idl_global->set_parse_state(IDL_GlobalData::PS_ModuleIDSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_ModuleIDSeen);
/*
* Make a new module and add it to the enclosing scope
*/
- if (s != NULL) {
- m = idl_global->gen ()->create_module (s, n, p);
+ if (s != 0) {
+ m = idl_global->gen ()->create_module (s, n);
(void) s->fe_add_module (m);
}
/*
* Push it on the stack
*/
- idl_global->scopes()->push(m);
+ idl_global->scopes ()->push (m);
}
break;
case 20:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_ModuleSqSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_ModuleSqSeen);
}
break;
case 21:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_ModuleBodySeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_ModuleBodySeen);
}
break;
case 22:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_ModuleQsSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_ModuleQsSeen);
/*
* Finished with this module - pop it from the scope stack
*/
- UTL_Scope* s = idl_global->scopes()->top();
- AST_Module* m = AST_Module::narrow_from_scope (s);
- if (m != 0)
- {
- UTL_StrList *p = m->pragmas ();
- if (p != 0)
- p = (UTL_StrList*)p->copy ();
- idl_global->set_pragmas (p);
- }
- idl_global->scopes()->pop();
+ idl_global->scopes ()->pop ();
}
break;
case 25:
{
- UTL_Scope *s = idl_global->scopes ()->top_non_null ();
- AST_Interface *i = NULL;
- AST_Decl *v = NULL;
- UTL_StrList *p = idl_global->pragmas ();
- ACE_UNUSED_ARG (v);
+ UTL_Scope *s = idl_global->scopes ()->top_non_null ();
+ AST_Interface *i = 0;
/*
* Make a new interface node and add it to its enclosing scope
*/
- if (s != NULL && tao_yyvsp[0].ihval != NULL) {
+ if (s != 0 && tao_yyvsp[0].ihval != 0) {
i = idl_global->gen ()->create_interface (
tao_yyvsp[0].ihval->interface_name (),
tao_yyvsp[0].ihval->inherits (),
tao_yyvsp[0].ihval->n_inherits (),
tao_yyvsp[0].ihval->inherits_flat (),
tao_yyvsp[0].ihval->n_inherits_flat (),
- p,
tao_yyvsp[0].ihval->is_local (),
tao_yyvsp[0].ihval->is_abstract ()
);
- AST_Interface::fwd_redefinition_helper (i,s,p);
+ AST_Interface::fwd_redefinition_helper (i, s);
/*
* Add the interface to its definition scope
*/
@@ -1442,91 +1447,72 @@ case 25:
break;
case 26:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_InterfaceSqSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_InterfaceSqSeen);
}
break;
case 27:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_InterfaceBodySeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_InterfaceBodySeen);
}
break;
case 28:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_InterfaceQsSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_InterfaceQsSeen);
/*
* Done with this interface - pop it off the scopes stack
*/
- UTL_Scope* s = idl_global->scopes ()->top();
- AST_Interface* m = AST_Interface::narrow_from_scope (s);
- if (m != NULL)
- {
- m->inherited_name_clash ();
- UTL_StrList *p = m->pragmas ();
- if (p != 0)
- {
- p = (UTL_StrList*) p->copy ();
- }
- idl_global->set_pragmas (p);
- }
- idl_global->scopes ()->pop();
+ idl_global->scopes ()->pop ();
}
break;
case 29:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_InterfaceSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_InterfaceSeen);
}
break;
case 30:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_InterfaceIDSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_InterfaceIDSeen);
tao_yyval.idval = tao_yyvsp[0].idval;
}
break;
case 31:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_InheritSpecSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_InheritSpecSeen);
/*
* Create an AST representation of the information in the header
* part of an interface - this representation contains a computed
* list of all interfaces which this interface inherits from,
* recursively
*/
- tao_yyval.ihval = new FE_InterfaceHeader(new UTL_ScopedName(tao_yyvsp[-1].idval, NULL), tao_yyvsp[0].nlval);
+ tao_yyval.ihval = new FE_InterfaceHeader (new UTL_ScopedName (tao_yyvsp[-1].idval, 0), tao_yyvsp[0].nlval);
}
break;
case 32:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_InheritSpecSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_InheritSpecSeen);
/*
* Create an AST representation of the information in the header
* part of an interface - this representation contains a computed
* list of all interfaces which this interface inherits from,
* recursively
*/
- tao_yyval.ihval = new FE_Local_InterfaceHeader(new UTL_ScopedName(tao_yyvsp[-1].idval, NULL), tao_yyvsp[0].nlval);
+ tao_yyval.ihval = new FE_Local_InterfaceHeader (new UTL_ScopedName(tao_yyvsp[-1].idval, 0), tao_yyvsp[0].nlval);
}
break;
case 33:
{
- cerr << "error in " << idl_global->filename()->get_string()
- << " line " << idl_global->lineno() << ":\n" ;
- cerr << "Sorry, I (TAO_IDL) can't handle abstract interface yet\n";
- /* (if not truncatable) */
-#if 0
- idl_global->set_parse_state(IDL_GlobalData::PS_InheritSpecSeen);
- /*
- * Create an AST representation of the information in the header
- * part of an interface - this representation contains a computed
- * list of all interfaces which this interface inherits from,
- * recursively
- */
- tao_yyval.ihval = new FE_Abstract_InterfaceHeader(new UTL_ScopedName(tao_yyvsp[-1].idval, NULL), tao_yyvsp[0].nlval);
-#endif
+ ACE_DEBUG ((LM_DEBUG,
+ ACE_TEXT ("error in %s line %d\n"),
+ idl_global->filename ()->get_string (),
+ idl_global->lineno ()));
+ ACE_DEBUG ((LM_DEBUG,
+ ACE_TEXT ("Sorry, I (TAO_IDL) can't handle abstract")
+ ACE_TEXT (" interfaces yet\n")));
}
break;
case 34:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_InheritColonSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_InheritColonSeen);
}
break;
case 35:
@@ -1536,142 +1522,138 @@ case 35:
break;
case 36:
{
- tao_yyval.nlval = NULL;
+ tao_yyval.nlval = 0;
}
break;
case 41:
{
- cerr << "error in " << idl_global->filename()->get_string()
- << " line " << idl_global->lineno() << ":\n" ;
- cerr << "Sorry, I (TAO_IDL) can't handle custom yet\n";
- /* set custom (if not truncatable) */
+ ACE_DEBUG ((LM_DEBUG,
+ ACE_TEXT ("error in %s 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")));
}
break;
case 43:
{
- UTL_Scope *s = idl_global->scopes()->top_non_null();
- AST_Interface *i = NULL;
- UTL_StrList *p = idl_global->pragmas();
+ UTL_Scope *s = idl_global->scopes ()->top_non_null ();
+ AST_Interface *i = 0;
- if (s != NULL && tao_yyvsp[0].vhval != NULL) {
- i = idl_global->gen()->create_valuetype(tao_yyvsp[0].vhval->interface_name(),
- tao_yyvsp[0].vhval->inherits(),
- tao_yyvsp[0].vhval->n_inherits(),
- p);
- AST_Interface::fwd_redefinition_helper (i,s,p);
+ if (s != 0 && tao_yyvsp[0].vhval != 0) {
+ i = idl_global->gen ()->create_valuetype (tao_yyvsp[0].vhval->interface_name (),
+ tao_yyvsp[0].vhval->inherits (),
+ tao_yyvsp[0].vhval->n_inherits ());
+ AST_Interface::fwd_redefinition_helper (i, s);
/*
* Add the valuetype to its definition scope
*/
- (void) s->fe_add_interface(i);
+ (void) s->fe_add_interface (i);
}
/*
* Push it on the scope stack
*/
- idl_global->scopes()->push(i);
+ idl_global->scopes ()->push (i);
}
break;
case 44:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_InterfaceSqSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_InterfaceSqSeen);
}
break;
case 45:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_InterfaceBodySeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_InterfaceBodySeen);
}
break;
case 46:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_InterfaceQsSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_InterfaceQsSeen);
/*
* Done with this interface - pop it off the scopes stack
*/
- UTL_Scope* s = idl_global->scopes()->top();
+ UTL_Scope* s = idl_global->scopes ()->top ();
AST_Interface* m = AST_Interface::narrow_from_scope (s);
m->inherited_name_clash ();
- UTL_StrList *p = m->pragmas ();
- if (p != 0) p = (UTL_StrList*)p->copy ();
- idl_global->set_pragmas (p);
- idl_global->scopes()->pop();
+ idl_global->scopes ()->pop ();
}
break;
case 47:
{
- UTL_Scope *s = idl_global->scopes()->top_non_null();
- AST_Interface *i = NULL;
- UTL_StrList *p = idl_global->pragmas();
+ UTL_Scope *s = idl_global->scopes ()->top_non_null ();
+ AST_Interface *i = 0;
- if (s != NULL && tao_yyvsp[0].vhval != NULL) {
+ if (s != 0 && tao_yyvsp[0].vhval != 0) {
if (tao_yyvsp[0].vhval->n_concrete() > 0) {
- idl_global->err()->abstract_inheritance_error (tao_yyvsp[0].vhval->interface_name ());
+ idl_global->err ()->abstract_inheritance_error (tao_yyvsp[0].vhval->interface_name ());
}
- i = idl_global->gen()->create_valuetype(tao_yyvsp[0].vhval->interface_name(),
- tao_yyvsp[0].vhval->inherits(),
- tao_yyvsp[0].vhval->n_inherits(),
- p);
+ i = idl_global->gen()->create_valuetype (tao_yyvsp[0].vhval->interface_name (),
+ tao_yyvsp[0].vhval->inherits (),
+ tao_yyvsp[0].vhval->n_inherits ());
i->set_abstract_valuetype ();
- AST_Interface::fwd_redefinition_helper (i,s,p);
+ AST_Interface::fwd_redefinition_helper (i, s);
/*
* Add the valuetype to its definition scope
*/
- (void) s->fe_add_interface(i);
+ (void) s->fe_add_interface (i);
}
/*
* Push it on the scope stack
*/
- idl_global->scopes()->push(i);
+ idl_global->scopes ()->push (i);
}
break;
case 48:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_InterfaceSqSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_InterfaceSqSeen);
}
break;
case 49:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_InterfaceBodySeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_InterfaceBodySeen);
}
break;
case 50:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_InterfaceQsSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_InterfaceQsSeen);
/*
* Done with this interface - pop it off the scopes stack
*/
- UTL_Scope* s = idl_global->scopes()->top();
+ UTL_Scope* s = idl_global->scopes ()->top ();
AST_Interface* m = AST_Interface::narrow_from_scope (s);
m->inherited_name_clash ();
- UTL_StrList *p = m->pragmas ();
- if (p != 0) p = (UTL_StrList*)p->copy ();
- idl_global->set_pragmas (p);
- idl_global->scopes()->pop();
+ idl_global->scopes ()->pop ();
}
break;
case 51:
{
- tao_yyval.vhval = new FE_obv_header (new UTL_ScopedName (tao_yyvsp[-3].idval, NULL), tao_yyvsp[-1].nlval, tao_yyvsp[0].nlval);
+ tao_yyval.vhval = new FE_obv_header (new UTL_ScopedName (tao_yyvsp[-3].idval, 0), tao_yyvsp[-1].nlval, tao_yyvsp[0].nlval);
}
break;
case 52:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_ValuetypeSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_ValuetypeSeen);
}
break;
case 53:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_ValuetypeIDSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_ValuetypeIDSeen);
tao_yyval.idval = tao_yyvsp[0].idval;
}
break;
case 54:
{
- cerr << "warning in " << idl_global->filename()->get_string()
- << " line " << idl_global->lineno() << ":\n" ;
- cerr << "truncatable modifier not supported and is ignored\n";
+ ACE_DEBUG ((LM_DEBUG,
+ ACE_TEXT ("warning in %s line %d\n"),
+ idl_global->filename ()->get_string (),
+ idl_global->lineno ()));
+ ACE_DEBUG ((LM_DEBUG,
+ ACE_TEXT ("truncatable modifier not supported ")
+ ACE_TEXT ("and is ignored\n")));
tao_yyval.bval = I_FALSE;
- /* $$ = I_TRUE; */
}
break;
case 55:
@@ -1681,59 +1663,58 @@ case 55:
break;
case 56:
{
- tao_yyval.nlval = new UTL_NameList(tao_yyvsp[0].idlist, NULL);
+ tao_yyval.nlval = new UTL_NameList (tao_yyvsp[0].idlist, 0);
}
break;
case 57:
{
- tao_yyval.nlval = NULL;
+ tao_yyval.nlval = 0;
}
break;
case 58:
{
- UTL_Scope *s = idl_global->scopes()->top_non_null();
- UTL_ScopedName *n = new UTL_ScopedName(tao_yyvsp[0].idval, NULL);
- AST_InterfaceFwd *f = NULL;
- UTL_StrList *p = idl_global->pragmas();
+ UTL_Scope *s = idl_global->scopes ()->top_non_null ();
+ UTL_ScopedName *n = new UTL_ScopedName (tao_yyvsp[0].idval, 0);
+ AST_InterfaceFwd *f = 0;
- idl_global->set_parse_state(IDL_GlobalData::PS_ForwardDeclSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_ForwardDeclSeen);
/*
* Create a node representing a forward declaration of an
* valuetype. Store it in the enclosing scope
*/
- if (s != NULL) {
- f = idl_global->gen()->create_valuetype_fwd(n, p);
- /* if ($1)*/
+ if (s != 0) {
+ f = idl_global->gen()->create_valuetype_fwd (n);
f->set_abstract_valuetype ();
- (void) s->fe_add_interface_fwd(f);
+ (void) s->fe_add_interface_fwd (f);
}
- idl_global->set_pragmas (p);
}
break;
case 59:
{
- UTL_Scope *s = idl_global->scopes()->top_non_null();
- UTL_ScopedName *n = new UTL_ScopedName(tao_yyvsp[0].idval, NULL);
- AST_InterfaceFwd *f = NULL;
- UTL_StrList *p = idl_global->pragmas();
+ UTL_Scope *s = idl_global->scopes ()->top_non_null ();
+ UTL_ScopedName *n = new UTL_ScopedName (tao_yyvsp[0].idval, 0);
+ AST_InterfaceFwd *f = 0;
- idl_global->set_parse_state(IDL_GlobalData::PS_ForwardDeclSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_ForwardDeclSeen);
/*
* Create a node representing a forward declaration of an
* valuetype. Store it in the enclosing scope
*/
- if (s != NULL) {
- f = idl_global->gen()->create_valuetype_fwd(n, p);
- (void) s->fe_add_interface_fwd(f);
+ if (s != 0) {
+ f = idl_global->gen ()->create_valuetype_fwd (n);
+ (void) s->fe_add_interface_fwd (f);
}
- idl_global->set_pragmas (p);
}
break;
case 60:
{
- cerr << "error in " << idl_global->filename()->get_string()
- << " line " << idl_global->lineno() << ":\n" ;
- cerr << "Sorry, I (TAO_IDL) can't handle boxes yet\n";
+ ACE_DEBUG ((LM_DEBUG,
+ ACE_TEXT ("error in %s 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 (" boxes yet\n")));
}
break;
case 66:
@@ -1750,17 +1731,17 @@ case 68:
break;
case 72:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_TypeDeclSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_TypeDeclSeen);
}
break;
case 73:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_NoState);
+ idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
}
break;
case 74:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_ConstDeclSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_ConstDeclSeen);
}
break;
case 75:
@@ -1770,212 +1751,201 @@ case 75:
break;
case 76:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_ExceptDeclSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_ExceptDeclSeen);
}
break;
case 77:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_NoState);
+ idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
}
break;
case 78:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_AttrDeclSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_AttrDeclSeen);
}
break;
case 79:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_NoState);
+ idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
}
break;
case 80:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_OpDeclSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_OpDeclSeen);
}
break;
case 81:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_NoState);
+ idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
}
break;
case 82:
{
- idl_global->err()->syntax_error(idl_global->parse_state());
+ idl_global->err()->syntax_error (idl_global->parse_state());
}
break;
case 83:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_NoState);
+ idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
tao_yyerrok;
}
break;
case 84:
{
- tao_yyval.nlval = new UTL_NameList(tao_yyvsp[-1].idlist, tao_yyvsp[0].nlval);
+ tao_yyval.nlval = new UTL_NameList (tao_yyvsp[-1].idlist, tao_yyvsp[0].nlval);
}
break;
case 85:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_SNListCommaSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_SNListCommaSeen);
}
break;
case 86:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_ScopedNameSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_ScopedNameSeen);
- if (tao_yyvsp[-3].nlval == NULL)
- tao_yyval.nlval = new UTL_NameList(tao_yyvsp[0].idlist, NULL);
+ if (tao_yyvsp[-3].nlval == 0)
+ tao_yyval.nlval = new UTL_NameList (tao_yyvsp[0].idlist, 0);
else {
- tao_yyvsp[-3].nlval->nconc(new UTL_NameList(tao_yyvsp[0].idlist, NULL));
+ tao_yyvsp[-3].nlval->nconc (new UTL_NameList (tao_yyvsp[0].idlist, 0));
tao_yyval.nlval = tao_yyvsp[-3].nlval;
}
}
break;
case 87:
{
- tao_yyval.nlval = NULL;
+ tao_yyval.nlval = 0;
}
break;
case 88:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_SN_IDSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_SN_IDSeen);
- tao_yyval.idlist = new UTL_IdList(tao_yyvsp[0].idval, NULL);
+ tao_yyval.idlist = new UTL_IdList(tao_yyvsp[0].idval, 0);
}
break;
case 89:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_ScopeDelimSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_ScopeDelimSeen);
}
break;
case 90:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_SN_IDSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_SN_IDSeen);
- tao_yyval.idlist = new UTL_IdList(new Identifier(tao_yyvsp[-2].strval),
- new UTL_IdList(tao_yyvsp[0].idval, NULL));
+ tao_yyval.idlist = new UTL_IdList (new Identifier (tao_yyvsp[-2].strval),
+ new UTL_IdList (tao_yyvsp[0].idval, 0));
}
break;
case 91:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_ScopeDelimSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_ScopeDelimSeen);
}
break;
case 92:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_SN_IDSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_SN_IDSeen);
- tao_yyvsp[-3].idlist->nconc(new UTL_IdList(tao_yyvsp[0].idval, NULL));
+ tao_yyvsp[-3].idlist->nconc (new UTL_IdList (tao_yyvsp[0].idval, 0));
tao_yyval.idlist = tao_yyvsp[-3].idlist;
}
break;
case 93:
{
- tao_yyval.idval = new Identifier(tao_yyvsp[0].strval);
+ tao_yyval.idval = new Identifier (tao_yyvsp[0].strval);
}
break;
case 94:
{
- UTL_Scope *s = idl_global->scopes()->top_non_null();
- UTL_ScopedName *n = new UTL_ScopedName(tao_yyvsp[0].idval, NULL);
- AST_InterfaceFwd *f = NULL;
- UTL_StrList *p = idl_global->pragmas();
+ UTL_Scope *s = idl_global->scopes ()->top_non_null ();
+ UTL_ScopedName *n = new UTL_ScopedName(tao_yyvsp[0].idval, 0);
+ AST_InterfaceFwd *f = 0;
- idl_global->set_parse_state(IDL_GlobalData::PS_ForwardDeclSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_ForwardDeclSeen);
/*
* Create a node representing a forward declaration of an
* interface. Store it in the enclosing scope
*/
- if (s != NULL) {
- f = idl_global->gen()->create_interface_fwd(n, p, 0, 0);
- (void) s->fe_add_interface_fwd(f);
+ if (s != 0) {
+ f = idl_global->gen ()->create_interface_fwd (n, 0, 0);
+ (void) s->fe_add_interface_fwd (f);
}
- idl_global->set_pragmas (p);
}
break;
case 95:
{
- UTL_Scope *s = idl_global->scopes()->top_non_null();
- UTL_ScopedName *n = new UTL_ScopedName(tao_yyvsp[0].idval, NULL);
- AST_InterfaceFwd *f = NULL;
- UTL_StrList *p = idl_global->pragmas();
+ UTL_Scope *s = idl_global->scopes ()->top_non_null ();
+ UTL_ScopedName *n = new UTL_ScopedName (tao_yyvsp[0].idval, 0);
+ AST_InterfaceFwd *f = 0;
- idl_global->set_parse_state(IDL_GlobalData::PS_ForwardDeclSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_ForwardDeclSeen);
/*
* Create a node representing a forward declaration of an
* interface. Store it in the enclosing scope
*/
- if (s != NULL) {
- f = idl_global->gen()->create_interface_fwd(n, p, 1, 0);
- (void) s->fe_add_interface_fwd(f);
+ if (s != 0) {
+ f = idl_global->gen ()->create_interface_fwd (n, 1, 0);
+ (void) s->fe_add_interface_fwd (f);
}
- idl_global->set_pragmas (p);
}
break;
case 96:
{
- UTL_Scope *s = idl_global->scopes()->top_non_null();
- UTL_ScopedName *n = new UTL_ScopedName(tao_yyvsp[0].idval, NULL);
- AST_InterfaceFwd *f = NULL;
- UTL_StrList *p = idl_global->pragmas();
+ UTL_Scope *s = idl_global->scopes ()->top_non_null ();
+ UTL_ScopedName *n = new UTL_ScopedName (tao_yyvsp[0].idval, 0);
+ AST_InterfaceFwd *f = 0;
- idl_global->set_parse_state(IDL_GlobalData::PS_ForwardDeclSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_ForwardDeclSeen);
/*
* Create a node representing a forward declaration of an
* interface. Store it in the enclosing scope
*/
- if (s != NULL) {
- f = idl_global->gen()->create_interface_fwd(n, p, 0, 1);
- (void) s->fe_add_interface_fwd(f);
+ if (s != 0) {
+ f = idl_global->gen ()->create_interface_fwd (n, 0, 1);
+ (void) s->fe_add_interface_fwd (f);
}
- idl_global->set_pragmas (p);
}
break;
case 97:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_ConstSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_ConstSeen);
}
break;
case 98:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_ConstTypeSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_ConstTypeSeen);
}
break;
case 99:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_ConstIDSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_ConstIDSeen);
}
break;
case 100:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_ConstAssignSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_ConstAssignSeen);
}
break;
case 101:
{
- UTL_ScopedName *n = new UTL_ScopedName(tao_yyvsp[-4].idval, NULL);
- UTL_Scope *s = idl_global->scopes()->top_non_null();
- AST_Constant *c = NULL;
- UTL_StrList *p = idl_global->pragmas();
- AST_Decl *v = NULL;
-
- ACE_UNUSED_ARG (v);
+ UTL_ScopedName *n = new UTL_ScopedName (tao_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);
+ idl_global->set_parse_state (IDL_GlobalData::PS_ConstExprSeen);
/*
* Create a node representing a constant declaration. Store
* it in the enclosing scope
*/
- if (tao_yyvsp[0].exval != NULL && s != NULL) {
- if (tao_yyvsp[0].exval->coerce(tao_yyvsp[-6].etval) == NULL)
- idl_global->err()->coercion_error(tao_yyvsp[0].exval, tao_yyvsp[-6].etval);
+ if (tao_yyvsp[0].exval != 0 && s != 0) {
+ if (tao_yyvsp[0].exval->coerce (tao_yyvsp[-6].etval) == 0)
+ idl_global->err ()->coercion_error (tao_yyvsp[0].exval, tao_yyvsp[-6].etval);
else {
c =
- idl_global->gen()->create_constant(tao_yyvsp[-6].etval, tao_yyvsp[0].exval, n, p);
- (void) s->fe_add_constant(c);
+ idl_global->gen ()->create_constant (tao_yyvsp[-6].etval, tao_yyvsp[0].exval, n);
+ (void) s->fe_add_constant (c);
}
}
- idl_global->set_pragmas (p);
}
break;
case 108:
@@ -1990,31 +1960,31 @@ case 109:
break;
case 110:
{
- UTL_Scope *s = idl_global->scopes()->top_non_null();
- AST_Decl *d = NULL;
- AST_PredefinedType *c = NULL;
- AST_Typedef *t = NULL;
+ UTL_Scope *s = idl_global->scopes ()->top_non_null ();
+ AST_Decl *d = 0;
+ AST_PredefinedType *c = 0;
+ AST_Typedef *t = 0;
/*
* If the constant's type is a scoped name, it must resolve
* to a scalar constant type
*/
- if (s != NULL && (d = s->lookup_by_name(tao_yyvsp[0].idlist, I_TRUE)) != NULL) {
+ if (s != 0 && (d = s->lookup_by_name (tao_yyvsp[0].idlist, I_TRUE)) != 0) {
/*
* Look through typedefs
*/
- while (d->node_type() == AST_Decl::NT_typedef) {
- t = AST_Typedef::narrow_from_decl(d);
- if (t == NULL)
+ while (d->node_type () == AST_Decl::NT_typedef) {
+ t = AST_Typedef::narrow_from_decl (d);
+ if (t == 0)
break;
- d = t->base_type();
+ d = t->base_type ();
}
- if (d == NULL)
+ if (d == 0)
tao_yyval.etval = AST_Expression::EV_any;
- else if (d->node_type() == AST_Decl::NT_pre_defined) {
- c = AST_PredefinedType::narrow_from_decl(d);
- if (c != NULL) {
- tao_yyval.etval = idl_global->PredefinedTypeToExprType(c->pt());
+ else if (d->node_type () == AST_Decl::NT_pre_defined) {
+ c = AST_PredefinedType::narrow_from_decl (d);
+ if (c != 0) {
+ tao_yyval.etval = idl_global->PredefinedTypeToExprType (c->pt ());
} else {
tao_yyval.etval = AST_Expression::EV_any;
}
@@ -2030,73 +2000,93 @@ case 110:
break;
case 114:
{
- tao_yyval.exval = idl_global->gen()->create_expr(AST_Expression::EC_or, tao_yyvsp[-2].exval, tao_yyvsp[0].exval);
+ tao_yyval.exval = idl_global->gen ()->create_expr (AST_Expression::EC_or,
+ tao_yyvsp[-2].exval,
+ tao_yyvsp[0].exval);
}
break;
case 116:
{
- tao_yyval.exval = idl_global->gen()->create_expr(AST_Expression::EC_xor, tao_yyvsp[-2].exval, tao_yyvsp[0].exval);
+ tao_yyval.exval = idl_global->gen ()->create_expr (AST_Expression::EC_xor,
+ tao_yyvsp[-2].exval,
+ tao_yyvsp[0].exval);
}
break;
case 118:
{
- tao_yyval.exval = idl_global->gen()->create_expr(AST_Expression::EC_and, tao_yyvsp[-2].exval, tao_yyvsp[0].exval);
+ tao_yyval.exval = idl_global->gen ()->create_expr (AST_Expression::EC_and,
+ tao_yyvsp[-2].exval,
+ tao_yyvsp[0].exval);
}
break;
case 120:
{
- tao_yyval.exval = idl_global->gen()->create_expr(AST_Expression::EC_left,tao_yyvsp[-2].exval,tao_yyvsp[0].exval);
+ tao_yyval.exval = idl_global->gen ()->create_expr (AST_Expression::EC_left,
+ tao_yyvsp[-2].exval,
+ tao_yyvsp[0].exval);
}
break;
case 121:
{
- tao_yyval.exval = idl_global->gen()->create_expr(AST_Expression::EC_right,tao_yyvsp[-2].exval,tao_yyvsp[0].exval);
+ tao_yyval.exval = idl_global->gen ()->create_expr (AST_Expression::EC_right,
+ tao_yyvsp[-2].exval,
+ tao_yyvsp[0].exval);
}
break;
case 123:
{
- tao_yyval.exval = idl_global->gen()->create_expr(AST_Expression::EC_add, tao_yyvsp[-2].exval, tao_yyvsp[0].exval);
+ tao_yyval.exval = idl_global->gen ()->create_expr (AST_Expression::EC_add,
+ tao_yyvsp[-2].exval,
+ tao_yyvsp[0].exval);
}
break;
case 124:
{
- tao_yyval.exval = idl_global->gen()->create_expr(AST_Expression::EC_minus,tao_yyvsp[-2].exval,tao_yyvsp[0].exval);
+ tao_yyval.exval = idl_global->gen ()->create_expr (AST_Expression::EC_minus,
+ tao_yyvsp[-2].exval,
+ tao_yyvsp[0].exval);
}
break;
case 126:
{
- tao_yyval.exval = idl_global->gen()->create_expr(AST_Expression::EC_mul, tao_yyvsp[-2].exval, tao_yyvsp[0].exval);
+ tao_yyval.exval = idl_global->gen ()->create_expr (AST_Expression::EC_mul,
+ tao_yyvsp[-2].exval,
+ tao_yyvsp[0].exval);
}
break;
case 127:
{
- tao_yyval.exval = idl_global->gen()->create_expr(AST_Expression::EC_div, tao_yyvsp[-2].exval, tao_yyvsp[0].exval);
+ tao_yyval.exval = idl_global->gen ()->create_expr (AST_Expression::EC_div,
+ tao_yyvsp[-2].exval,
+ tao_yyvsp[0].exval);
}
break;
case 128:
{
- tao_yyval.exval = idl_global->gen()->create_expr(AST_Expression::EC_mod, tao_yyvsp[-2].exval, tao_yyvsp[0].exval);
+ tao_yyval.exval = idl_global->gen ()->create_expr (AST_Expression::EC_mod,
+ tao_yyvsp[-2].exval,
+ tao_yyvsp[0].exval);
}
break;
case 130:
{
- tao_yyval.exval = idl_global->gen()->create_expr(AST_Expression::EC_u_plus,
- tao_yyvsp[0].exval,
- NULL);
+ tao_yyval.exval = idl_global->gen ()->create_expr (AST_Expression::EC_u_plus,
+ tao_yyvsp[0].exval,
+ 0);
}
break;
case 131:
{
- tao_yyval.exval = idl_global->gen()->create_expr(AST_Expression::EC_u_minus,
- tao_yyvsp[0].exval,
- NULL);
+ tao_yyval.exval = idl_global->gen()->create_expr (AST_Expression::EC_u_minus,
+ tao_yyvsp[0].exval,
+ 0);
}
break;
case 132:
{
- tao_yyval.exval = idl_global->gen()->create_expr(AST_Expression::EC_bit_neg,
- tao_yyvsp[0].exval,
- NULL);
+ tao_yyval.exval = idl_global->gen()->create_expr (AST_Expression::EC_bit_neg,
+ tao_yyvsp[0].exval,
+ 0);
}
break;
case 133:
@@ -2106,7 +2096,7 @@ case 133:
* but only when it is evaluated (such as when it is assigned
* as a constant value).
*/
- UTL_Scope *s = idl_global->scopes()->top_non_null ();
+ UTL_Scope *s = idl_global->scopes ()->top_non_null ();
AST_Decl *d = s->lookup_by_name (tao_yyvsp[0].idlist,
1);
@@ -2137,50 +2127,50 @@ case 135:
break;
case 136:
{
- tao_yyval.exval = idl_global->gen()->create_expr(tao_yyvsp[0].ival);
+ tao_yyval.exval = idl_global->gen ()->create_expr (tao_yyvsp[0].ival);
}
break;
case 137:
{
- tao_yyval.exval = idl_global->gen()->create_expr(tao_yyvsp[0].uival);
+ tao_yyval.exval = idl_global->gen ()->create_expr (tao_yyvsp[0].uival);
}
break;
case 138:
{
- tao_yyval.exval = idl_global->gen()->create_expr(tao_yyvsp[0].sval);
+ tao_yyval.exval = idl_global->gen ()->create_expr (tao_yyvsp[0].sval);
}
break;
case 139:
{
- tao_yyval.exval = idl_global->gen()->create_expr(tao_yyvsp[0].wsval);
+ tao_yyval.exval = idl_global->gen ()->create_expr (tao_yyvsp[0].wsval);
}
break;
case 140:
{
- tao_yyval.exval = idl_global->gen()->create_expr(tao_yyvsp[0].cval);
+ tao_yyval.exval = idl_global->gen ()->create_expr (tao_yyvsp[0].cval);
}
break;
case 141:
{
ACE_OutputCDR::from_wchar wc (tao_yyvsp[0].wcval);
- tao_yyval.exval = idl_global->gen()->create_expr(wc);
+ tao_yyval.exval = idl_global->gen ()->create_expr (wc);
}
break;
case 142:
{
- tao_yyval.exval = idl_global->gen()->create_expr(tao_yyvsp[0].dval);
+ tao_yyval.exval = idl_global->gen ()->create_expr (tao_yyvsp[0].dval);
}
break;
case 143:
{
- tao_yyval.exval = idl_global->gen()->create_expr((idl_bool) I_TRUE,
- AST_Expression::EV_bool);
+ tao_yyval.exval = idl_global->gen ()->create_expr ((idl_bool) I_TRUE,
+ AST_Expression::EV_bool);
}
break;
case 144:
{
- tao_yyval.exval = idl_global->gen()->create_expr((idl_bool) I_FALSE,
- AST_Expression::EV_bool);
+ tao_yyval.exval = idl_global->gen ()->create_expr ((idl_bool) I_FALSE,
+ AST_Expression::EV_bool);
}
break;
case 145:
@@ -2250,7 +2240,7 @@ case 145:
break;
case 146:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_TypedefSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_TypedefSeen);
}
break;
case 147:
@@ -2267,150 +2257,142 @@ case 150:
break;
case 151:
{
- UTL_Scope *s = idl_global->scopes()->top_non_null();
- AST_Native *node = NULL;
- AST_Decl *v = NULL;
- UTL_StrList *p = idl_global->pragmas();
+ UTL_Scope *s = idl_global->scopes ()->top_non_null ();
+ AST_Native *node = 0;
- ACE_UNUSED_ARG (v);
-
- idl_global->set_parse_state(IDL_GlobalData::PS_NativeSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_NativeSeen);
/*
* Create a node representing a Native and add it to its
* enclosing scope
*/
- if (s != NULL) {
- node = idl_global->gen()->create_native (tao_yyvsp[0].deval->name (), p);
+ if (s != 0) {
+ node = idl_global->gen ()->create_native (tao_yyvsp[0].deval->name ());
/*
* Add it to its defining scope
*/
(void) s->fe_add_native (node);
}
- idl_global->set_pragmas (p);
}
break;
case 152:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_TypeSpecSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_TypeSpecSeen);
}
break;
case 153:
{
- UTL_Scope *s = idl_global->scopes()->top_non_null();
+ UTL_Scope *s = idl_global->scopes ()->top_non_null ();
UTL_DecllistActiveIterator *l;
- FE_Declarator *d = NULL;
- AST_Typedef *t = NULL;
- AST_Decl *v = NULL;
- UTL_StrList *p = idl_global->pragmas();
-
- ACE_UNUSED_ARG (v);
+ FE_Declarator *d = 0;
+ AST_Typedef *t = 0;
- idl_global->set_parse_state(IDL_GlobalData::PS_DeclaratorsSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_DeclaratorsSeen);
/*
* Create a list of type renamings. Add them to the
* enclosing scope
*/
- if (s != NULL && tao_yyvsp[-2].dcval != NULL && tao_yyvsp[0].dlval != NULL) {
- l = new UTL_DecllistActiveIterator(tao_yyvsp[0].dlval);
- for (;!(l->is_done()); l->next()) {
- d = l->item();
- if (d == NULL)
- continue;
- AST_Type * tp = d->compose(tao_yyvsp[-2].dcval);
- if (tp == NULL)
- continue;
- t = idl_global->gen()->create_typedef(tp, d->name(), p,
- s->is_local (),
- s->is_abstract ());
- (void) s->fe_add_typedef(t);
+ if (s != 0 && tao_yyvsp[-2].dcval != 0 && tao_yyvsp[0].dlval != 0) {
+ l = new UTL_DecllistActiveIterator (tao_yyvsp[0].dlval);
+ for (;!(l->is_done ()); l->next ()) {
+ d = l->item ();
+ if (d == 0)
+ continue;
+ AST_Type * tp = d->compose (tao_yyvsp[-2].dcval);
+ if (tp == 0)
+ continue;
+ t = idl_global->gen ()->create_typedef (tp,
+ d->name (),
+ s->is_local (),
+ s->is_abstract ());
+ (void) s->fe_add_typedef (t);
}
delete l;
}
- idl_global->set_pragmas (p);
}
break;
case 156:
{
- tao_yyval.dcval = idl_global->scopes()->bottom()->lookup_primitive_type(tao_yyvsp[0].etval);
+ tao_yyval.dcval = idl_global->scopes ()->bottom ()->lookup_primitive_type (tao_yyvsp[0].etval);
}
break;
case 158:
{
- UTL_Scope *s = idl_global->scopes()->top_non_null();
- AST_Decl *d = NULL;
+ UTL_Scope *s = idl_global->scopes ()->top_non_null ();
+ AST_Decl *d = 0;
- if (s != NULL)
- d = s->lookup_by_name(tao_yyvsp[0].idlist, I_TRUE);
- if (d == NULL)
- idl_global->err()->lookup_error(tao_yyvsp[0].idlist);
+ if (s != 0)
+ d = s->lookup_by_name (tao_yyvsp[0].idlist, I_TRUE);
+ if (d == 0)
+ idl_global->err ()->lookup_error (tao_yyvsp[0].idlist);
tao_yyval.dcval = d;
}
break;
case 172:
{
- tao_yyval.dlval = new UTL_DeclList(tao_yyvsp[-1].deval, tao_yyvsp[0].dlval);
+ tao_yyval.dlval = new UTL_DeclList (tao_yyvsp[-1].deval, tao_yyvsp[0].dlval);
}
break;
case 173:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_DeclsCommaSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_DeclsCommaSeen);
}
break;
case 174:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_DeclsDeclSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_DeclsDeclSeen);
- if (tao_yyvsp[-3].dlval == NULL)
- tao_yyval.dlval = new UTL_DeclList(tao_yyvsp[0].deval, NULL);
+ if (tao_yyvsp[-3].dlval == 0)
+ tao_yyval.dlval = new UTL_DeclList (tao_yyvsp[0].deval, 0);
else {
- tao_yyvsp[-3].dlval->nconc(new UTL_DeclList(tao_yyvsp[0].deval, NULL));
+ tao_yyvsp[-3].dlval->nconc (new UTL_DeclList (tao_yyvsp[0].deval, 0));
tao_yyval.dlval = tao_yyvsp[-3].dlval;
}
}
break;
case 175:
{
- tao_yyval.dlval = NULL;
+ tao_yyval.dlval = 0;
}
break;
case 178:
{
- tao_yyval.dlval = new UTL_DeclList(tao_yyvsp[-1].deval, tao_yyvsp[0].dlval);
+ tao_yyval.dlval = new UTL_DeclList (tao_yyvsp[-1].deval, tao_yyvsp[0].dlval);
}
break;
case 179:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_DeclsCommaSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_DeclsCommaSeen);
}
break;
case 180:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_DeclsDeclSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_DeclsDeclSeen);
- if (tao_yyvsp[-3].dlval == NULL)
- tao_yyval.dlval = new UTL_DeclList(tao_yyvsp[0].deval, NULL);
+ if (tao_yyvsp[-3].dlval == 0)
+ tao_yyval.dlval = new UTL_DeclList (tao_yyvsp[0].deval, 0);
else {
- tao_yyvsp[-3].dlval->nconc(new UTL_DeclList(tao_yyvsp[0].deval, NULL));
+ tao_yyvsp[-3].dlval->nconc (new UTL_DeclList (tao_yyvsp[0].deval, 0));
tao_yyval.dlval = tao_yyvsp[-3].dlval;
}
}
break;
case 181:
{
- tao_yyval.dlval = NULL;
+ tao_yyval.dlval = 0;
}
break;
case 182:
{
- tao_yyval.deval = new FE_Declarator(new UTL_ScopedName(tao_yyvsp[0].idval, NULL),
- FE_Declarator::FD_simple, NULL);
+ tao_yyval.deval = new FE_Declarator (new UTL_ScopedName (tao_yyvsp[0].idval, 0),
+ FE_Declarator::FD_simple, 0);
}
break;
case 183:
{
- tao_yyval.deval = new FE_Declarator(new UTL_ScopedName(tao_yyvsp[0].dcval->local_name(), NULL),
- FE_Declarator::FD_complex,
- tao_yyvsp[0].dcval);
+ tao_yyval.deval = new FE_Declarator (new UTL_ScopedName (tao_yyvsp[0].dcval->local_name (),
+ 0),
+ FE_Declarator::FD_complex,
+ tao_yyvsp[0].dcval);
}
break;
case 186:
@@ -2460,9 +2442,13 @@ case 194:
break;
case 195:
{
- cerr << "error in " << idl_global->filename()->get_string()
- << " line " << idl_global->lineno() << ":\n" ;
- cerr << "Sorry, I (TAO_IDL) can't handle fixed types yet\n";
+ ACE_DEBUG ((LM_DEBUG,
+ ACE_TEXT ("error in %s 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 (" fixed types yet\n")));
}
break;
case 196:
@@ -2492,61 +2478,52 @@ case 200:
break;
case 201:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_StructSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_StructSeen);
}
break;
case 202:
{
- UTL_Scope *s = idl_global->scopes()->top_non_null();
- UTL_ScopedName *n = new UTL_ScopedName(tao_yyvsp[0].idval, NULL);
- AST_Structure *d = NULL;
- UTL_StrList *p = idl_global->pragmas();
- AST_Decl *v = NULL;
+ UTL_Scope *s = idl_global->scopes ()->top_non_null ();
+ UTL_ScopedName *n = new UTL_ScopedName (tao_yyvsp[0].idval, 0);
+ AST_Structure *d = 0;
- ACE_UNUSED_ARG (v);
-
- idl_global->set_parse_state(IDL_GlobalData::PS_StructIDSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_StructIDSeen);
/*
* Create a node representing a struct declaration. Add it
* to the enclosing scope
*/
- if (s != NULL) {
- d = idl_global->gen()->create_structure(n,
- p,
- s->is_local (),
- s->is_abstract ());
- (void) s->fe_add_structure(d);
+ if (s != 0) {
+ d = idl_global->gen ()->create_structure (n,
+ s->is_local (),
+ s->is_abstract ());
+ (void) s->fe_add_structure (d);
}
/*
* Push the scope of the struct on the scopes stack
*/
- idl_global->scopes()->push(d);
+ idl_global->scopes ()->push (d);
}
break;
case 203:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_StructSqSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_StructSqSeen);
}
break;
case 204:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_StructBodySeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_StructBodySeen);
}
break;
case 205:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_StructQsSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_StructQsSeen);
/*
* Done with this struct. Pop its scope off the scopes stack
*/
- tao_yyval.dcval =
- AST_Structure::narrow_from_scope(
- idl_global->scopes()->top_non_null());
- UTL_StrList *p = tao_yyval.dcval->pragmas ();
- if (p != 0)
- p = (UTL_StrList*)p->copy ();
- idl_global->set_pragmas (p);
- idl_global->scopes()->pop();
+ tao_yyval.dcval = AST_Structure::narrow_from_scope (
+ idl_global->scopes ()->top_non_null ()
+ );
+ idl_global->scopes ()->pop ();
}
break;
case 209:
@@ -2557,44 +2534,46 @@ case 209:
break;
case 211:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_MemberTypeSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_MemberTypeSeen);
}
break;
case 212:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_MemberDeclsSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_MemberDeclsSeen);
}
break;
case 213:
{
- UTL_Scope *s = idl_global->scopes()->top_non_null();
- UTL_DecllistActiveIterator *l = NULL;
- FE_Declarator *d = NULL;
- AST_Field *f = NULL;
- UTL_StrList *p = idl_global->pragmas();
+ UTL_Scope *s = idl_global->scopes ()->top_non_null ();
+ UTL_DecllistActiveIterator *l = 0;
+ FE_Declarator *d = 0;
+ AST_Field *f = 0;
- idl_global->set_parse_state(IDL_GlobalData::PS_MemberDeclsCompleted);
+ idl_global->set_parse_state (IDL_GlobalData::PS_MemberDeclsCompleted);
/*
* Check for illegal recursive use of type
*/
- if (tao_yyvsp[-4].dcval != NULL && AST_illegal_recursive_type(tao_yyvsp[-4].dcval))
- idl_global->err()->error1(UTL_Error::EIDL_RECURSIVE_TYPE, tao_yyvsp[-4].dcval);
+ if (tao_yyvsp[-4].dcval != 0 && AST_illegal_recursive_type (tao_yyvsp[-4].dcval))
+ idl_global->err ()->error1 (UTL_Error::EIDL_RECURSIVE_TYPE,
+ tao_yyvsp[-4].dcval);
/*
* Create a node representing a struct or exception member
* Add it to the enclosing scope
*/
- else if (s != NULL && tao_yyvsp[-4].dcval != NULL && tao_yyvsp[-2].dlval != NULL) {
- l = new UTL_DecllistActiveIterator(tao_yyvsp[-2].dlval);
- for (;!(l->is_done()); l->next()) {
- d = l->item();
- if (d == NULL)
+ else if (s != 0 && tao_yyvsp[-4].dcval != 0 && tao_yyvsp[-2].dlval != 0) {
+ l = new UTL_DecllistActiveIterator (tao_yyvsp[-2].dlval);
+ for (;!(l->is_done ()); l->next ()) {
+ d = l->item ();
+ if (d == 0)
continue;
- AST_Type *tp = d->compose(tao_yyvsp[-4].dcval);
- if (tp == NULL)
+ AST_Type *tp = d->compose (tao_yyvsp[-4].dcval);
+ if (tp == 0)
continue;
/* $0 denotes Visibility, must be on yacc reduction stack */
- f = idl_global->gen()->create_field(tp, d->name(), p, tao_yyvsp[-5].vival);
- (void) s->fe_add_field(f);
+ f = idl_global->gen ()->create_field (tp,
+ d->name (),
+ tao_yyvsp[-5].vival);
+ (void) s->fe_add_field (f);
}
delete l;
}
@@ -2602,133 +2581,132 @@ case 213:
break;
case 214:
{
- idl_global->err()->syntax_error(idl_global->parse_state());
+ idl_global->err()->syntax_error (idl_global->parse_state ());
}
break;
case 215:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_NoState);
+ idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
tao_yyerrok;
}
break;
case 216:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_UnionSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_UnionSeen);
}
break;
case 217:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_UnionIDSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_UnionIDSeen);
}
break;
case 218:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_SwitchSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_SwitchSeen);
}
break;
case 219:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_SwitchOpenParSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_SwitchOpenParSeen);
}
break;
case 220:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_SwitchTypeSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_SwitchTypeSeen);
}
break;
case 221:
{
- UTL_Scope *s = idl_global->scopes()->top_non_null();
- UTL_ScopedName *n = new UTL_ScopedName(tao_yyvsp[-8].idval, NULL);
- AST_Union *u = NULL;
- AST_Decl *v = NULL;
- UTL_StrList *p = idl_global->pragmas();
-
- ACE_UNUSED_ARG (v);
+ UTL_Scope *s = idl_global->scopes ()->top_non_null ();
+ UTL_ScopedName *n = new UTL_ScopedName (tao_yyvsp[-8].idval, 0);
+ AST_Union *u = 0;
- idl_global->set_parse_state(IDL_GlobalData::PS_SwitchCloseParSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_SwitchCloseParSeen);
/*
* Create a node representing a union. Add it to its enclosing
* scope
*/
- if (tao_yyvsp[-2].dcval != NULL && s != NULL) {
- AST_ConcreteType *tp = AST_ConcreteType::narrow_from_decl(tao_yyvsp[-2].dcval);
- if (tp == NULL) {
- idl_global->err()->not_a_type(tao_yyvsp[-2].dcval);
+ if (tao_yyvsp[-2].dcval != 0 && s != 0) {
+ AST_ConcreteType *tp = AST_ConcreteType::narrow_from_decl (tao_yyvsp[-2].dcval);
+ if (tp == 0) {
+ idl_global->err ()->not_a_type (tao_yyvsp[-2].dcval);
} else {
- u = idl_global->gen()->create_union(tp,
- n,
- p,
- s->is_local (),
- s->is_abstract ());
- (void) s->fe_add_union(u);
+ u = idl_global->gen ()->create_union (tp,
+ n,
+ s->is_local (),
+ s->is_abstract ());
+ (void) s->fe_add_union (u);
}
}
/*
* Push the scope of the union on the scopes stack
*/
- idl_global->scopes()->push(u);
+ idl_global->scopes()->push (u);
}
break;
case 222:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_UnionSqSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_UnionSqSeen);
}
break;
case 223:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_UnionBodySeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_UnionBodySeen);
}
break;
case 224:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_UnionQsSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_UnionQsSeen);
/*
* Done with this union. Pop its scope from the scopes stack
*/
- tao_yyval.dcval =
- AST_Union::narrow_from_scope (
- idl_global->scopes()->top_non_null()
- );
+ tao_yyval.dcval = AST_Union::narrow_from_scope (
+ idl_global->scopes ()->top_non_null ()
+ );
if (tao_yyval.dcval != 0)
{
- UTL_StrList *p = tao_yyval.dcval->pragmas ();
- if (p != 0)
- p = (UTL_StrList*)p->copy ();
- idl_global->set_pragmas (p);
- idl_global->scopes()->pop();
+ idl_global->scopes ()->pop ();
}
}
break;
case 225:
{
- tao_yyval.dcval = idl_global->scopes()->bottom()->lookup_primitive_type(tao_yyvsp[0].etval);
+ tao_yyval.dcval = idl_global->scopes ()->bottom ()->lookup_primitive_type (tao_yyvsp[0].etval);
}
break;
case 226:
{
- tao_yyval.dcval = idl_global->scopes()->bottom()->lookup_primitive_type(tao_yyvsp[0].etval);
+ /* wchars are not allowed */
+ if (tao_yyvsp[0].etval == AST_Expression::EV_wchar)
+ {
+ idl_global->err ()->error0 (UTL_Error::EIDL_DISC_TYPE);
+ }
+
+ tao_yyval.dcval =
+ idl_global->scopes ()->bottom ()->lookup_primitive_type (
+ tao_yyvsp[0].etval
+ );
}
break;
case 227:
{
- /* octets are not allowed*/
+ /* octets are not allowed */
idl_global->err ()->error0 (UTL_Error::EIDL_DISC_TYPE);
- tao_yyval.dcval = idl_global->scopes()->bottom()->lookup_primitive_type(tao_yyvsp[0].etval);
+ tao_yyval.dcval = idl_global->scopes ()->bottom ()->lookup_primitive_type (tao_yyvsp[0].etval);
}
break;
case 228:
{
- tao_yyval.dcval = idl_global->scopes()->bottom()->lookup_primitive_type(tao_yyvsp[0].etval);
+ tao_yyval.dcval = idl_global->scopes ()->bottom ()->lookup_primitive_type (tao_yyvsp[0].etval);
}
break;
case 230:
{
- UTL_Scope *s = idl_global->scopes()->top_non_null();
- AST_Decl *d = NULL;
- AST_PredefinedType *p = NULL;
- AST_Typedef *t = NULL;
- long found = I_FALSE;
+ UTL_Scope *s = idl_global->scopes ()->top_non_null ();
+ AST_Decl *d = 0;
+ AST_PredefinedType *p = 0;
+ AST_Typedef *t = 0;
+ long found = I_FALSE;
/*
* The discriminator is a scoped name. Try to resolve to
@@ -2736,17 +2714,17 @@ case 230:
* typedef's to arrive at the base type at the end of the
* chain
*/
- if (s != NULL && (d = s->lookup_by_name(tao_yyvsp[0].idlist, I_TRUE)) != NULL) {
+ if (s != 0 && (d = s->lookup_by_name (tao_yyvsp[0].idlist, I_TRUE)) != 0) {
while (!found) {
- switch (d->node_type()) {
+ switch (d->node_type ()) {
case AST_Decl::NT_enum:
tao_yyval.dcval = d;
found = I_TRUE;
break;
case AST_Decl::NT_pre_defined:
- p = AST_PredefinedType::narrow_from_decl(d);
- if (p != NULL) {
- switch (p->pt()) {
+ p = AST_PredefinedType::narrow_from_decl (d);
+ if (p != 0) {
+ switch (p->pt ()) {
case AST_PredefinedType::PT_long:
case AST_PredefinedType::PT_ulong:
case AST_PredefinedType::PT_longlong:
@@ -2754,572 +2732,572 @@ case 230:
case AST_PredefinedType::PT_short:
case AST_PredefinedType::PT_ushort:
case AST_PredefinedType::PT_char:
- case AST_PredefinedType::PT_wchar:
case AST_PredefinedType::PT_boolean:
tao_yyval.dcval = p;
found = I_TRUE;
break;
+ case AST_PredefinedType::PT_wchar:
case AST_PredefinedType::PT_octet:
- /* octets are not allowed*/
+ /* octets and wchars are not allowed */
idl_global->err ()->error0 (UTL_Error::EIDL_DISC_TYPE);
- tao_yyval.dcval = NULL;
+ tao_yyval.dcval = 0;
found = I_TRUE;
break;
default:
- tao_yyval.dcval = NULL;
+ tao_yyval.dcval = 0;
found = I_TRUE;
break;
}
} else
{
- tao_yyval.dcval = NULL;
+ tao_yyval.dcval = 0;
found = I_TRUE;
}
break;
case AST_Decl::NT_typedef:
- t = AST_Typedef::narrow_from_decl(d);
- if (t != NULL) d = t->base_type();
+ t = AST_Typedef::narrow_from_decl (d);
+ if (t != 0) d = t->base_type ();
break;
default:
- tao_yyval.dcval = NULL;
+ tao_yyval.dcval = 0;
found = I_TRUE;
break;
}
}
} else
- tao_yyval.dcval = NULL;
+ tao_yyval.dcval = 0;
- if (tao_yyval.dcval == NULL)
- idl_global->err()->lookup_error(tao_yyvsp[0].idlist);
+ if (tao_yyval.dcval == 0)
+ idl_global->err ()->lookup_error (tao_yyvsp[0].idlist);
}
break;
case 234:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_UnionLabelSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_UnionLabelSeen);
}
break;
case 235:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_UnionElemSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_UnionElemSeen);
}
break;
case 236:
{
- UTL_Scope *s = idl_global->scopes()->top_non_null();
- UTL_LabellistActiveIterator *l = NULL;
- AST_UnionLabel *d = NULL;
- AST_UnionBranch *b = NULL;
- AST_Field *f = tao_yyvsp[-2].ffval;
+ UTL_Scope *s = idl_global->scopes ()->top_non_null ();
+ AST_UnionBranch *b = 0;
+ AST_Field *f = tao_yyvsp[-2].ffval;
- ACE_UNUSED_ARG (l);
- ACE_UNUSED_ARG (d);
-
- idl_global->set_parse_state(IDL_GlobalData::PS_UnionElemCompleted);
+ idl_global->set_parse_state (IDL_GlobalData::PS_UnionElemCompleted);
/*
* Create several nodes representing branches of a union.
* Add them to the enclosing scope (the union scope)
*/
- if (s != NULL && tao_yyvsp[-4].llval != NULL && tao_yyvsp[-2].ffval != NULL) {
- b = idl_global->gen()->create_union_branch(tao_yyvsp[-4].llval,
- f->field_type(),
- f->name(),
- f->pragmas());
- (void) s->fe_add_union_branch(b);
+ if (s != 0 && tao_yyvsp[-4].llval != 0 && tao_yyvsp[-2].ffval != 0) {
+ b = idl_global->gen ()->create_union_branch (tao_yyvsp[-4].llval,
+ f->field_type (),
+ f->name ());
+ (void) s->fe_add_union_branch (b);
}
}
break;
case 237:
{
- idl_global->err()->syntax_error(idl_global->parse_state());
+ idl_global->err()->syntax_error (idl_global->parse_state());
}
break;
case 238:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_NoState);
+ idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
tao_yyerrok;
}
break;
case 239:
{
- tao_yyval.llval = new UTL_LabelList(tao_yyvsp[-1].ulval, tao_yyvsp[0].llval);
+ tao_yyval.llval = new UTL_LabelList (tao_yyvsp[-1].ulval, tao_yyvsp[0].llval);
}
break;
case 240:
{
- if (tao_yyvsp[-1].llval == NULL)
- tao_yyval.llval = new UTL_LabelList(tao_yyvsp[0].ulval, NULL);
+ if (tao_yyvsp[-1].llval == 0)
+ tao_yyval.llval = new UTL_LabelList (tao_yyvsp[0].ulval, 0);
else {
- tao_yyvsp[-1].llval->nconc(new UTL_LabelList(tao_yyvsp[0].ulval, NULL));
+ tao_yyvsp[-1].llval->nconc(new UTL_LabelList (tao_yyvsp[0].ulval, 0));
tao_yyval.llval = tao_yyvsp[-1].llval;
}
}
break;
case 241:
{
- tao_yyval.llval = NULL;
+ tao_yyval.llval = 0;
}
break;
case 242:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_DefaultSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_DefaultSeen);
}
break;
case 243:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_LabelColonSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_LabelColonSeen);
- tao_yyval.ulval = idl_global->gen()->
- create_union_label(AST_UnionLabel::UL_default,
- NULL);
+ tao_yyval.ulval = idl_global->gen ()->create_union_label (
+ AST_UnionLabel::UL_default,
+ 0
+ );
}
break;
case 244:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_CaseSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_CaseSeen);
}
break;
case 245:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_LabelExprSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_LabelExprSeen);
}
break;
case 246:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_LabelColonSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_LabelColonSeen);
- tao_yyval.ulval = idl_global->gen()->create_union_label(AST_UnionLabel::UL_label,
- tao_yyvsp[-2].exval);
+ tao_yyval.ulval = idl_global->gen()->create_union_label (
+ AST_UnionLabel::UL_label,
+ tao_yyvsp[-2].exval
+ );
}
break;
case 247:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_UnionElemTypeSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_UnionElemTypeSeen);
}
break;
case 248:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_UnionElemDeclSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_UnionElemDeclSeen);
/*
* Check for illegal recursive use of type
*/
- if (tao_yyvsp[-2].dcval != NULL && AST_illegal_recursive_type(tao_yyvsp[-2].dcval))
- idl_global->err()->error1(UTL_Error::EIDL_RECURSIVE_TYPE, tao_yyvsp[-2].dcval);
+ if (tao_yyvsp[-2].dcval != 0 && AST_illegal_recursive_type (tao_yyvsp[-2].dcval))
+ idl_global->err()->error1 (UTL_Error::EIDL_RECURSIVE_TYPE, tao_yyvsp[-2].dcval);
/*
* Create a field in a union branch
*/
- else if (tao_yyvsp[-2].dcval == NULL || tao_yyvsp[0].deval == NULL)
- tao_yyval.ffval = NULL;
+ else if (tao_yyvsp[-2].dcval == 0 || tao_yyvsp[0].deval == 0)
+ tao_yyval.ffval = 0;
else {
- AST_Type *tp = tao_yyvsp[0].deval->compose(tao_yyvsp[-2].dcval);
- if (tp == NULL)
- tao_yyval.ffval = NULL;
+ AST_Type *tp = tao_yyvsp[0].deval->compose (tao_yyvsp[-2].dcval);
+ if (tp == 0)
+ tao_yyval.ffval = 0;
else
- tao_yyval.ffval = idl_global->gen()->create_field(tp,
- tao_yyvsp[0].deval->name(),
- idl_global->pragmas());
+ tao_yyval.ffval = idl_global->gen ()->create_field (tp,
+ tao_yyvsp[0].deval->name());
}
}
break;
case 249:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_EnumSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_EnumSeen);
}
break;
case 250:
{
- UTL_Scope *s = idl_global->scopes()->top_non_null();
- UTL_ScopedName *n = new UTL_ScopedName(tao_yyvsp[0].idval, NULL);
- AST_Enum *e = NULL;
- AST_Decl *v = NULL;
- UTL_StrList *p = idl_global->pragmas();
-
- ACE_UNUSED_ARG (v);
+ UTL_Scope *s = idl_global->scopes ()->top_non_null ();
+ UTL_ScopedName *n = new UTL_ScopedName(tao_yyvsp[0].idval, 0);
+ AST_Enum *e = 0;
- idl_global->set_parse_state(IDL_GlobalData::PS_EnumIDSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_EnumIDSeen);
/*
* Create a node representing an enum and add it to its
* enclosing scope
*/
- if (s != NULL) {
- e = idl_global->gen()->create_enum(n,
- p,
- s->is_local (),
- s->is_abstract ());
+ if (s != 0) {
+ e = idl_global->gen ()->create_enum (n,
+ s->is_local (),
+ s->is_abstract ());
/*
* Add it to its defining scope
*/
- (void) s->fe_add_enum(e);
+ (void) s->fe_add_enum (e);
}
/*
* Push the enum scope on the scopes stack
*/
- idl_global->scopes()->push(e);
+ idl_global->scopes ()->push (e);
}
break;
case 251:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_EnumSqSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_EnumSqSeen);
}
break;
case 252:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_EnumBodySeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_EnumBodySeen);
}
break;
case 253:
{
- UTL_StrList *p = 0;
- idl_global->set_parse_state(IDL_GlobalData::PS_EnumQsSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_EnumQsSeen);
/*
* Done with this enum. Pop its scope from the scopes stack
*/
- if (idl_global->scopes()->top() == NULL)
- tao_yyval.dcval = NULL;
+ if (idl_global->scopes ()->top () == 0)
+ tao_yyval.dcval = 0;
else {
- tao_yyval.dcval = AST_Enum::narrow_from_scope(idl_global->scopes()->top_non_null());
- p = tao_yyval.dcval->pragmas ();
- idl_global->scopes()->pop();
+ tao_yyval.dcval = AST_Enum::narrow_from_scope (
+ idl_global->scopes ()->top_non_null ()
+ );
+ idl_global->scopes ()->pop ();
}
- idl_global->set_pragmas (p);
}
break;
case 255:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_EnumCommaSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_EnumCommaSeen);
}
break;
case 258:
{
- UTL_Scope *s = idl_global->scopes()->top_non_null();
- UTL_ScopedName *n =
- new UTL_ScopedName(new Identifier(tao_yyvsp[0].strval), NULL);
- AST_EnumVal *e = NULL;
- AST_Enum *c = NULL;
- UTL_StrList *p = idl_global->pragmas();
+ UTL_Scope *s = idl_global->scopes ()->top_non_null ();
+ UTL_ScopedName *n =
+ new UTL_ScopedName (new Identifier (tao_yyvsp[0].strval), 0);
+ AST_EnumVal *e = 0;
+ AST_Enum *c = 0;
/*
* Create a node representing one enumerator in an enum
* Add it to the enclosing scope (the enum scope)
*/
- if (s != NULL && s->scope_node_type() == AST_Decl::NT_enum) {
- c = AST_Enum::narrow_from_scope(s);
- if (c != NULL)
- e = idl_global->gen()->create_enum_val(c->next_enum_val(), n, p);
- (void) s->fe_add_enum_val(e);
+ if (s != 0 && s->scope_node_type () == AST_Decl::NT_enum) {
+ c = AST_Enum::narrow_from_scope (s);
+ if (c != 0)
+ e = idl_global->gen ()->create_enum_val (c->next_enum_val (),
+ n);
+ (void) s->fe_add_enum_val (e);
}
}
break;
case 259:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_SequenceCommaSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_SequenceCommaSeen);
}
break;
case 260:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_SequenceExprSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_SequenceExprSeen);
}
break;
case 261:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_SequenceQsSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_SequenceQsSeen);
/*
* Remove sequence marker from scopes stack
*/
- if (idl_global->scopes()->top() == NULL)
- idl_global->scopes()->pop();
- UTL_Scope *s = idl_global->scopes()->top_non_null ();
+ if (idl_global->scopes ()->top() == 0)
+ idl_global->scopes ()->pop ();
+ UTL_Scope *s = idl_global->scopes ()->top_non_null ();
/*
* Create a node representing a sequence
*/
- if (tao_yyvsp[-2].exval == NULL || tao_yyvsp[-2].exval->coerce(AST_Expression::EV_ulong) == NULL) {
- idl_global->err()->coercion_error(tao_yyvsp[-2].exval, AST_Expression::EV_ulong);
- tao_yyval.dcval = NULL;
- } else if (tao_yyvsp[-5].dcval == NULL) {
- tao_yyval.dcval = NULL;
+ if (tao_yyvsp[-2].exval == 0 || tao_yyvsp[-2].exval->coerce(AST_Expression::EV_ulong) == 0) {
+ idl_global->err ()->coercion_error (tao_yyvsp[-2].exval, AST_Expression::EV_ulong);
+ tao_yyval.dcval = 0;
+ } else if (tao_yyvsp[-5].dcval == 0) {
+ tao_yyval.dcval = 0;
} else {
- AST_Type *tp = AST_Type::narrow_from_decl(tao_yyvsp[-5].dcval);
- if (tp == NULL)
+ AST_Type *tp = AST_Type::narrow_from_decl (tao_yyvsp[-5].dcval);
+ if (tp == 0)
; /* Error will be caught in FE_Declarator.*/
else {
- tao_yyval.dcval = idl_global->gen()->create_sequence(tao_yyvsp[-2].exval,
- tp,
- s->is_local (),
- s->is_abstract ());
+ tao_yyval.dcval = idl_global->gen ()->create_sequence (tao_yyvsp[-2].exval,
+ tp,
+ s->is_local (),
+ s->is_abstract ());
/*
- * Add this AST_Sequence to the types defined in the global scope
+ * Add this AST_Sequence to types defined in the global scope.
*/
- (void) idl_global->root()
- ->fe_add_sequence(AST_Sequence::narrow_from_decl(tao_yyval.dcval));
+ (void) idl_global->root ()->fe_add_sequence (
+ AST_Sequence::narrow_from_decl (tao_yyval.dcval)
+ );
}
}
}
break;
case 262:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_SequenceQsSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_SequenceQsSeen);
/*
* Remove sequence marker from scopes stack
*/
- if (idl_global->scopes()->top() == NULL)
- idl_global->scopes()->pop();
- UTL_Scope *s = idl_global->scopes()->top_non_null ();
+ if (idl_global->scopes ()->top () == 0)
+ idl_global->scopes ()->pop ();
+ UTL_Scope *s = idl_global->scopes ()->top_non_null ();
/*
* Create a node representing a sequence
*/
- if (tao_yyvsp[-1].dcval == NULL)
- tao_yyval.dcval = NULL;
+ if (tao_yyvsp[-1].dcval == 0)
+ tao_yyval.dcval = 0;
else {
- AST_Type *tp = AST_Type::narrow_from_decl(tao_yyvsp[-1].dcval);
- if (tp == NULL)
+ AST_Type *tp = AST_Type::narrow_from_decl (tao_yyvsp[-1].dcval);
+ if (tp == 0)
; /* Error will be caught in FE_Declarator.*/
else {
tao_yyval.dcval =
- idl_global->gen()->create_sequence(
- idl_global->gen()->create_expr((unsigned long) 0),
- tp,
- s->is_local (),
- s->is_abstract ());
+ idl_global->gen ()->create_sequence (
+ idl_global->gen ()->create_expr ((unsigned long) 0),
+ tp,
+ s->is_local (),
+ s->is_abstract ()
+ );
/*
- * Add this AST_Sequence to the types defined in the global scope
+ * Add this AST_Sequence to types defined in the global scope
*/
- (void) idl_global->root()
- ->fe_add_sequence(AST_Sequence::narrow_from_decl(tao_yyval.dcval));
+ (void) idl_global->root ()->fe_add_sequence (
+ AST_Sequence::narrow_from_decl (tao_yyval.dcval)
+ );
}
}
}
break;
case 263:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_SequenceSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_SequenceSeen);
/*
* Push a sequence marker on scopes stack
*/
- idl_global->scopes()->push(NULL);
+ idl_global->scopes ()->push (0);
}
break;
case 264:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_SequenceSqSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_SequenceSqSeen);
}
break;
case 265:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_SequenceTypeSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_SequenceTypeSeen);
tao_yyval.dcval = tao_yyvsp[0].dcval;
}
break;
case 266:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_StringSqSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_StringSqSeen);
}
break;
case 267:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_StringExprSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_StringExprSeen);
}
break;
case 268:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_StringQsSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_StringQsSeen);
/*
* Create a node representing a string
*/
- if (tao_yyvsp[-2].exval == NULL || tao_yyvsp[-2].exval->coerce(AST_Expression::EV_ulong) == NULL) {
- idl_global->err()->coercion_error(tao_yyvsp[-2].exval, AST_Expression::EV_ulong);
- tao_yyval.dcval = NULL;
+ if (tao_yyvsp[-2].exval == 0 || tao_yyvsp[-2].exval->coerce (AST_Expression::EV_ulong) == 0) {
+ idl_global->err ()->coercion_error (tao_yyvsp[-2].exval, AST_Expression::EV_ulong);
+ tao_yyval.dcval = 0;
} else {
- tao_yyval.dcval = idl_global->gen()->create_string(tao_yyvsp[-2].exval);
+ tao_yyval.dcval = idl_global->gen ()->create_string (tao_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(tao_yyval.dcval));
+ (void) idl_global->root ()->fe_add_string (
+ AST_String::narrow_from_decl (tao_yyval.dcval)
+ );
}
}
break;
case 269:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_StringCompleted);
+ idl_global->set_parse_state (IDL_GlobalData::PS_StringCompleted);
/*
* Create a node representing a string
*/
tao_yyval.dcval =
- idl_global->gen()->create_string(
- idl_global->gen()->create_expr((unsigned long) 0));
+ idl_global->gen ()->create_string (
+ idl_global->gen ()->create_expr ((unsigned long) 0)
+ );
/*
* Add this AST_String to the types defined in the global scope
*/
- (void) idl_global->root()
- ->fe_add_string(AST_String::narrow_from_decl(tao_yyval.dcval));
+ (void) idl_global->root ()->fe_add_string (
+ AST_String::narrow_from_decl (tao_yyval.dcval)
+ );
}
break;
case 270:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_StringSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_StringSeen);
}
break;
case 271:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_StringSqSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_StringSqSeen);
}
break;
case 272:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_StringExprSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_StringExprSeen);
}
break;
case 273:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_StringQsSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_StringQsSeen);
/*
* Create a node representing a string
*/
- if (tao_yyvsp[-2].exval == NULL || tao_yyvsp[-2].exval->coerce(AST_Expression::EV_ulong) == NULL) {
- idl_global->err()->coercion_error(tao_yyvsp[-2].exval, AST_Expression::EV_ulong);
- tao_yyval.dcval = NULL;
+ if (tao_yyvsp[-2].exval == 0 || tao_yyvsp[-2].exval->coerce(AST_Expression::EV_ulong) == 0) {
+ idl_global->err ()->coercion_error (tao_yyvsp[-2].exval, AST_Expression::EV_ulong);
+ tao_yyval.dcval = 0;
} else {
- tao_yyval.dcval = idl_global->gen()->create_wstring(tao_yyvsp[-2].exval);
+ tao_yyval.dcval = idl_global->gen ()->create_wstring (tao_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(tao_yyval.dcval));
+ (void) idl_global->root ()->fe_add_string (
+ AST_String::narrow_from_decl (tao_yyval.dcval)
+ );
}
}
break;
case 274:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_StringCompleted);
+ idl_global->set_parse_state (IDL_GlobalData::PS_StringCompleted);
/*
* Create a node representing a string
*/
tao_yyval.dcval =
- idl_global->gen()->create_wstring(
- idl_global->gen()->create_expr((unsigned long) 0));
+ idl_global->gen ()->create_wstring (
+ idl_global->gen ()->create_expr ((unsigned long) 0)
+ );
/*
* Add this AST_String to the types defined in the global scope
*/
- (void) idl_global->root()
- ->fe_add_string(AST_String::narrow_from_decl(tao_yyval.dcval));
+ (void) idl_global->root ()->fe_add_string (
+ AST_String::narrow_from_decl (tao_yyval.dcval)
+ );
}
break;
case 275:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_StringSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_StringSeen);
}
break;
case 276:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_ArrayIDSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_ArrayIDSeen);
}
break;
case 277:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_ArrayCompleted);
+ idl_global->set_parse_state (IDL_GlobalData::PS_ArrayCompleted);
/*
* Create a node representing an array
*/
- if (tao_yyvsp[0].elval != NULL) {
- tao_yyval.dcval = idl_global->gen()->create_array(new UTL_ScopedName(tao_yyvsp[-2].idval, NULL),
- tao_yyvsp[0].elval->length(), tao_yyvsp[0].elval, 0, 0);
+ if (tao_yyvsp[0].elval != 0) {
+ tao_yyval.dcval = idl_global->gen ()->create_array (new UTL_ScopedName (tao_yyvsp[-2].idval,
+ 0),
+ tao_yyvsp[0].elval->length (),
+ tao_yyvsp[0].elval,
+ 0,
+ 0);
}
}
break;
case 278:
{
- tao_yyval.elval = new UTL_ExprList(tao_yyvsp[-1].exval, tao_yyvsp[0].elval);
+ tao_yyval.elval = new UTL_ExprList (tao_yyvsp[-1].exval, tao_yyvsp[0].elval);
}
break;
case 279:
{
- if (tao_yyvsp[-1].elval == NULL)
- tao_yyval.elval = new UTL_ExprList(tao_yyvsp[0].exval, NULL);
+ if (tao_yyvsp[-1].elval == 0)
+ tao_yyval.elval = new UTL_ExprList (tao_yyvsp[0].exval, 0);
else {
- tao_yyvsp[-1].elval->nconc(new UTL_ExprList(tao_yyvsp[0].exval, NULL));
+ tao_yyvsp[-1].elval->nconc (new UTL_ExprList (tao_yyvsp[0].exval, 0));
tao_yyval.elval = tao_yyvsp[-1].elval;
}
}
break;
case 280:
{
- tao_yyval.elval = NULL;
+ tao_yyval.elval = 0;
}
break;
case 281:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_DimSqSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_DimSqSeen);
}
break;
case 282:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_DimExprSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_DimExprSeen);
}
break;
case 283:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_DimQsSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_DimQsSeen);
/*
* Array dimensions are expressions which must be coerced to
* positive integers
*/
- if (tao_yyvsp[-2].exval == NULL || tao_yyvsp[-2].exval->coerce(AST_Expression::EV_ulong) == NULL) {
- idl_global->err()->coercion_error(tao_yyvsp[-2].exval, AST_Expression::EV_ulong);
- tao_yyval.exval = NULL;
+ if (tao_yyvsp[-2].exval == 0 || tao_yyvsp[-2].exval->coerce (AST_Expression::EV_ulong) == 0) {
+ idl_global->err ()->coercion_error (tao_yyvsp[-2].exval, AST_Expression::EV_ulong);
+ tao_yyval.exval = 0;
} else
tao_yyval.exval = tao_yyvsp[-2].exval;
}
break;
case 284:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_AttrSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_AttrSeen);
}
break;
case 285:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_AttrTypeSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_AttrTypeSeen);
}
break;
case 286:
{
- UTL_Scope *s = idl_global->scopes()->top_non_null();
- UTL_DecllistActiveIterator *l = NULL;
- AST_Attribute *a = NULL;
- FE_Declarator *d = NULL;
- UTL_StrList *p = idl_global->pragmas();
+ UTL_Scope *s = idl_global->scopes ()->top_non_null ();
+ UTL_DecllistActiveIterator *l = 0;
+ AST_Attribute *a = 0;
+ FE_Declarator *d = 0;
- idl_global->set_parse_state(IDL_GlobalData::PS_AttrCompleted);
+ idl_global->set_parse_state (IDL_GlobalData::PS_AttrCompleted);
/*
* Create nodes representing attributes and add them to the
* enclosing scope
*/
- if (s != NULL && tao_yyvsp[-2].dcval != NULL && tao_yyvsp[0].dlval != NULL) {
- l = new UTL_DecllistActiveIterator(tao_yyvsp[0].dlval);
- for (;!(l->is_done()); l->next()) {
- d = l->item();
- if (d == NULL)
+ if (s != 0 && tao_yyvsp[-2].dcval != 0 && tao_yyvsp[0].dlval != 0) {
+ l = new UTL_DecllistActiveIterator (tao_yyvsp[0].dlval);
+ for (; !(l->is_done ()); l->next ()) {
+ d = l->item ();
+ if (d == 0)
continue;
- AST_Type *tp = d->compose(tao_yyvsp[-2].dcval);
- if (tp == NULL)
+ AST_Type *tp = d->compose (tao_yyvsp[-2].dcval);
+ if (tp == 0)
continue;
- a = idl_global->gen()->create_attribute(tao_yyvsp[-5].bval,
- tp,
- (UTL_IdList *) d->name()->copy (),
- p,
- s->is_local (),
- s->is_abstract ());
+ a = idl_global->gen ()->create_attribute (tao_yyvsp[-5].bval,
+ tp,
+ (UTL_IdList *) d->name()->copy (),
+ s->is_local (),
+ s->is_abstract ());
/*
* Add one attribute to the enclosing scope
*/
- (void) s->fe_add_attribute(a);
+ (void) s->fe_add_attribute (a);
}
delete l;
}
- idl_global->set_pragmas (p);
}
break;
case 287:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_AttrROSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_AttrROSeen);
tao_yyval.bval = I_TRUE;
}
break;
@@ -3330,142 +3308,131 @@ case 288:
break;
case 289:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_ExceptSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_ExceptSeen);
}
break;
case 290:
{
- UTL_Scope *s = idl_global->scopes()->top_non_null();
- UTL_ScopedName *n = new UTL_ScopedName(tao_yyvsp[0].idval, NULL);
- AST_Exception *e = NULL;
- UTL_StrList *p = idl_global->pragmas();
- AST_Decl *v = NULL;
-
- ACE_UNUSED_ARG (v);
+ UTL_Scope *s = idl_global->scopes ()->top_non_null ();
+ UTL_ScopedName *n = new UTL_ScopedName (tao_yyvsp[0].idval, 0);
+ AST_Exception *e = 0;
- idl_global->set_parse_state(IDL_GlobalData::PS_ExceptIDSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_ExceptIDSeen);
/*
* Create a node representing an exception and add it to
* the enclosing scope
*/
- if (s != NULL) {
- e = idl_global->gen()->create_exception(n,
- p,
- s->is_local (),
- s->is_abstract ());
- (void) s->fe_add_exception(e);
+ if (s != 0) {
+ e = idl_global->gen ()->create_exception (n,
+ s->is_local (),
+ s->is_abstract ());
+ (void) s->fe_add_exception (e);
}
/*
* Push the exception scope on the scope stack
*/
- idl_global->scopes()->push(e);
+ idl_global->scopes()->push (e);
}
break;
case 291:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_ExceptSqSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_ExceptSqSeen);
}
break;
case 292:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_ExceptBodySeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_ExceptBodySeen);
}
break;
case 293:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_ExceptQsSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_ExceptQsSeen);
/*
* Done with this exception. Pop its scope from the scope stack
*/
- AST_Exception *ex =
- AST_Exception::narrow_from_scope (idl_global->scopes ()->top_non_null ());
- UTL_StrList *p = ex->pragmas ();
- idl_global->scopes()->pop();
- idl_global->set_pragmas (p);
+ idl_global->scopes ()->pop ();
}
break;
case 294:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_OpTypeSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_OpTypeSeen);
}
break;
case 295:
{
- UTL_Scope *s = idl_global->scopes()->top_non_null();
- UTL_ScopedName *n =
- new UTL_ScopedName(new Identifier(tao_yyvsp[0].strval), NULL);
- AST_Operation *o = NULL;
- UTL_StrList *p = idl_global->pragmas();
+ UTL_Scope *s = idl_global->scopes ()->top_non_null ();
+ UTL_ScopedName *n =
+ new UTL_ScopedName (new Identifier (tao_yyvsp[0].strval), 0);
+ AST_Operation *o = 0;
- idl_global->set_parse_state(IDL_GlobalData::PS_OpIDSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_OpIDSeen);
/*
* Create a node representing an operation on an interface
* and add it to its enclosing scope
*/
- if (s != NULL && tao_yyvsp[-2].dcval != NULL) {
- AST_Type *tp = AST_Type::narrow_from_decl(tao_yyvsp[-2].dcval);
- if (tp == NULL) {
- idl_global->err()->not_a_type(tao_yyvsp[-2].dcval);
- } else if (tp->node_type() == AST_Decl::NT_except) {
- idl_global->err()->not_a_type(tao_yyvsp[-2].dcval);
+ if (s != 0 && tao_yyvsp[-2].dcval != 0) {
+ AST_Type *tp = AST_Type::narrow_from_decl (tao_yyvsp[-2].dcval);
+ if (tp == 0) {
+ idl_global->err ()->not_a_type (tao_yyvsp[-2].dcval);
+ } else if (tp->node_type () == AST_Decl::NT_except) {
+ idl_global->err ()->not_a_type (tao_yyvsp[-2].dcval);
} else {
- o = idl_global->gen()->create_operation(tp,
- tao_yyvsp[-3].ofval,
- n,
- p,
- s->is_local (),
- s->is_abstract ());
- (void) s->fe_add_operation(o);
+ o = idl_global->gen ()->create_operation (tp,
+ tao_yyvsp[-3].ofval,
+ n,
+ s->is_local (),
+ s->is_abstract ());
+ (void) s->fe_add_operation (o);
}
}
/*
* Push the operation scope onto the scopes stack
*/
- idl_global->scopes()->push(o);
+ idl_global->scopes()->push (o);
}
break;
case 296:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_OpParsCompleted);
+ idl_global->set_parse_state (IDL_GlobalData::PS_OpParsCompleted);
}
break;
case 297:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_OpRaiseCompleted);
+ idl_global->set_parse_state (IDL_GlobalData::PS_OpRaiseCompleted);
}
break;
case 298:
{
- UTL_Scope *s = idl_global->scopes()->top_non_null();
- AST_Operation *o = NULL;
+ UTL_Scope *s = idl_global->scopes ()->top_non_null ();
+ AST_Operation *o = 0;
- idl_global->set_parse_state(IDL_GlobalData::PS_OpCompleted);
+ idl_global->set_parse_state (IDL_GlobalData::PS_OpCompleted);
/*
* Add exceptions and context to the operation
*/
- if (s != NULL && s->scope_node_type() == AST_Decl::NT_op) {
- o = AST_Operation::narrow_from_scope(s);
+ if (s != 0 && s->scope_node_type() == AST_Decl::NT_op) {
+ o = AST_Operation::narrow_from_scope (s);
- if (tao_yyvsp[-2].nlval != NULL && o != NULL)
- (void) o->fe_add_exceptions(tao_yyvsp[-2].nlval);
- if (tao_yyvsp[0].slval != NULL)
- (void) o->fe_add_context(tao_yyvsp[0].slval);
+ if (tao_yyvsp[-2].nlval != 0 && o != 0)
+ (void) o->fe_add_exceptions (tao_yyvsp[-2].nlval);
+ if (tao_yyvsp[0].slval != 0)
+ (void) o->fe_add_context (tao_yyvsp[0].slval);
}
/*
* Done with this operation. Pop its scope from the scopes stack
*/
- idl_global->scopes()->pop();
+ idl_global->scopes ()->pop ();
}
break;
case 299:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_OpAttrSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_OpAttrSeen);
tao_yyval.ofval = AST_Operation::OP_oneway;
}
break;
case 300:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_OpAttrSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_OpAttrSeen);
tao_yyval.ofval = AST_Operation::OP_idempotent;
}
break;
@@ -3477,179 +3444,291 @@ break;
case 303:
{
tao_yyval.dcval =
- idl_global->scopes()->bottom()
- ->lookup_primitive_type(AST_Expression::EV_void);
+ idl_global->scopes ()->bottom ()->lookup_primitive_type (
+ AST_Expression::EV_void
+ );
}
break;
case 304:
{
- /* TODO: replace parameter_list with rule that accepts only IN args*/
- cerr << "error in " << idl_global->filename()->get_string()
- << " line " << idl_global->lineno() << ":\n" ;
- cerr << "Sorry, I (TAO_IDL) can't handle factory yet\n";
+ /*@@ PS_FactorySeen?*/
+ idl_global->set_parse_state (IDL_GlobalData::PS_OpTypeSeen);
}
break;
case 305:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_OpSqSeen);
+
+ UTL_Scope *s = idl_global->scopes ()->top_non_null ();
+ if (s->is_abstract ())
+ {
+ /*@@ Fire error*/
+ ACE_ERROR ((LM_ERROR,
+ ACE_TEXT ("error in %s line %d:\n")
+ ACE_TEXT ("Abstract valuetype can't have a ")
+ ACE_TEXT ("factory construct.\n"),
+ idl_global->filename ()->get_string (),
+ idl_global->lineno ()));
+ }
+ UTL_ScopedName *n =
+ new UTL_ScopedName (new Identifier (tao_yyvsp[0].strval), 0);
+
+ AST_Factory *factory = 0;
+ idl_global->set_parse_state (IDL_GlobalData::PS_OpIDSeen);
+
+ /*
+ * Create a node representing an factory construct
+ * and add it to its enclosing scope
+ */
+ if (s != 0)
+ {
+ factory = idl_global->gen ()->create_factory (n);
+ (void) s->fe_add_factory (factory);
+ }
+ /*
+ * Push the operation scope onto the scopes stack
+ */
+ idl_global->scopes ()->push (factory);
}
break;
case 306:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_OpQsSeen);
+ /* TODO: replace parameter_list with rule that accepts only IN args*/
+
+ idl_global->set_parse_state (IDL_GlobalData::PS_OpParsCompleted);
+ idl_global->scopes ()->pop ();
}
break;
case 307:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_OpSqSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_OpSqSeen);
}
break;
case 308:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_OpQsSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_OpQsSeen);
}
break;
-case 310:
+case 309:
+#line 2588 "fe/idl.tao_yy"
{
- idl_global->set_parse_state(IDL_GlobalData::PS_OpParCommaSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_OpSqSeen);
}
break;
-case 313:
+case 310:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_OpParDirSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_OpQsSeen);
}
break;
-case 314:
+case 312:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_OpParTypeSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_OpParCommaSeen);
}
break;
case 315:
{
- UTL_Scope *s = idl_global->scopes()->top_non_null();
- AST_Argument *a = NULL;
- UTL_StrList *p = idl_global->pragmas();
+ idl_global->set_parse_state (IDL_GlobalData::PS_OpParDirSeen);
+ }
+break;
+case 316:
+{
+ idl_global->set_parse_state (IDL_GlobalData::PS_OpParTypeSeen);
+ }
+break;
+case 317:
+{
- idl_global->set_parse_state(IDL_GlobalData::PS_OpParDeclSeen);
+ UTL_Scope *s = idl_global->scopes ()->top_non_null ();
+ AST_Argument *a = 0;
+
+ idl_global->set_parse_state (IDL_GlobalData::PS_OpParDeclSeen);
/*
* Create a node representing an argument to an operation
* Add it to the enclosing scope (the operation scope)
*/
- if (tao_yyvsp[-2].dcval != NULL && tao_yyvsp[0].deval != NULL && s != NULL) {
- AST_Type *tp = tao_yyvsp[0].deval->compose(tao_yyvsp[-2].dcval);
- if (tp != NULL) {
+ if (tao_yyvsp[-2].dcval != 0 && tao_yyvsp[0].deval != 0 && s != 0)
+ {
+ AST_Type *tp = tao_yyvsp[0].deval->compose (tao_yyvsp[-2].dcval);
+ if (tp != 0)
+ {
+ a = idl_global->gen ()->create_argument (
+ AST_Argument::dir_IN,
+ tp,
+ (UTL_IdList *) tao_yyvsp[0].deval->name ()->copy ()
+ );
+
+ (void) s->fe_add_argument (a);
+ }
+ }
+ }
+break;
+case 318:
+{
+ idl_global->set_parse_state (IDL_GlobalData::PS_OpSqSeen);
+ }
+break;
+case 319:
+{
+ idl_global->set_parse_state (IDL_GlobalData::PS_OpQsSeen);
+ }
+break;
+case 320:
+{
+ idl_global->set_parse_state (IDL_GlobalData::PS_OpSqSeen);
+ }
+break;
+case 321:
+{
+ idl_global->set_parse_state (IDL_GlobalData::PS_OpQsSeen);
+ }
+break;
+case 323:
+{
+ idl_global->set_parse_state (IDL_GlobalData::PS_OpParCommaSeen);
+ }
+break;
+case 326:
+{
+ idl_global->set_parse_state (IDL_GlobalData::PS_OpParDirSeen);
+ }
+break;
+case 327:
+{
+ idl_global->set_parse_state (IDL_GlobalData::PS_OpParTypeSeen);
+ }
+break;
+case 328:
+{
+ UTL_Scope *s = idl_global->scopes ()->top_non_null ();
+ AST_Argument *a = 0;
+
+ idl_global->set_parse_state (IDL_GlobalData::PS_OpParDeclSeen);
+ /*
+ * Create a node representing an argument to an operation
+ * Add it to the enclosing scope (the operation scope)
+ */
+ if (tao_yyvsp[-2].dcval != 0 && tao_yyvsp[0].deval != 0 && s != 0) {
+ AST_Type *tp = tao_yyvsp[0].deval->compose (tao_yyvsp[-2].dcval);
+ if (tp != 0) {
if (!s->is_local () && tp->is_local ())
{
- cerr << "error in " << idl_global->filename()->get_string()
- << " line " << idl_global->lineno() << ":\n" ;
- cerr << "Cannot use a local type as an argument of a remote interface operation\n";
+ ACE_DEBUG ((LM_DEBUG,
+ ACE_TEXT ("error in %s line %d\n"),
+ idl_global->filename ()->get_string (),
+ idl_global->lineno ()));
+ ACE_DEBUG ((LM_DEBUG,
+ ACE_TEXT ("Cannot use a local type as an ")
+ ACE_TEXT ("argument of a remote operation\n")));
}
else
{
- a = idl_global->gen()->create_argument(tao_yyvsp[-4].dival, tp, (UTL_IdList *) tao_yyvsp[0].deval->name ()->copy (), p);
- (void) s->fe_add_argument(a);
+ a = idl_global->gen ()->create_argument (
+ tao_yyvsp[-4].dival,
+ tp,
+ (UTL_IdList *) tao_yyvsp[0].deval->name ()->copy ()
+ );
+ (void) s->fe_add_argument (a);
}
}
}
}
break;
-case 316:
+case 329:
{
- tao_yyval.dcval = idl_global->scopes()->bottom()->lookup_primitive_type(tao_yyvsp[0].etval);
+ tao_yyval.dcval = idl_global->scopes ()->bottom ()->lookup_primitive_type (tao_yyvsp[0].etval);
}
break;
-case 319:
+case 332:
{
- UTL_Scope *s = idl_global->scopes()->top_non_null();
- AST_Decl *d = NULL;
+ UTL_Scope *s = idl_global->scopes ()->top_non_null ();
+ AST_Decl *d = 0;
- if (s != NULL)
- d = s->lookup_by_name(tao_yyvsp[0].idlist, I_TRUE);
- if (d == NULL)
- idl_global->err()->lookup_error(tao_yyvsp[0].idlist);
+ if (s != 0)
+ d = s->lookup_by_name (tao_yyvsp[0].idlist, I_TRUE);
+ if (d == 0)
+ idl_global->err ()->lookup_error (tao_yyvsp[0].idlist);
tao_yyval.dcval = d;
}
break;
-case 320:
+case 333:
{
tao_yyval.dival = AST_Argument::dir_IN;
}
break;
-case 321:
+case 334:
{
tao_yyval.dival = AST_Argument::dir_OUT;
}
break;
-case 322:
+case 335:
{
tao_yyval.dival = AST_Argument::dir_INOUT;
}
break;
-case 323:
+case 336:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_OpRaiseSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_OpRaiseSeen);
}
break;
-case 324:
+case 337:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_OpRaiseSqSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_OpRaiseSqSeen);
}
break;
-case 325:
+case 338:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_OpRaiseQsSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_OpRaiseQsSeen);
tao_yyval.nlval = tao_yyvsp[-1].nlval;
}
break;
-case 326:
+case 339:
{
- tao_yyval.nlval = NULL;
+ tao_yyval.nlval = 0;
}
break;
-case 327:
+case 340:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_OpContextSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_OpContextSeen);
}
break;
-case 328:
+case 341:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_OpContextSqSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_OpContextSqSeen);
}
break;
-case 329:
+case 342:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_OpContextQsSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_OpContextQsSeen);
tao_yyval.slval = tao_yyvsp[-1].slval;
}
break;
-case 330:
+case 343:
{
- tao_yyval.slval = NULL;
+ tao_yyval.slval = 0;
}
break;
-case 331:
+case 344:
{
- tao_yyval.slval = new UTL_StrList(tao_yyvsp[-1].sval, tao_yyvsp[0].slval);
+ tao_yyval.slval = new UTL_StrList (tao_yyvsp[-1].sval, tao_yyvsp[0].slval);
}
break;
-case 332:
+case 345:
{
- idl_global->set_parse_state(IDL_GlobalData::PS_OpContextCommaSeen);
+ idl_global->set_parse_state (IDL_GlobalData::PS_OpContextCommaSeen);
}
break;
-case 333:
+case 346:
{
- if (tao_yyvsp[-3].slval == NULL)
- tao_yyval.slval = new UTL_StrList(tao_yyvsp[0].sval, NULL);
+ if (tao_yyvsp[-3].slval == 0)
+ tao_yyval.slval = new UTL_StrList (tao_yyvsp[0].sval, 0);
else {
- tao_yyvsp[-3].slval->nconc(new UTL_StrList(tao_yyvsp[0].sval, NULL));
+ tao_yyvsp[-3].slval->nconc (new UTL_StrList (tao_yyvsp[0].sval, 0));
tao_yyval.slval = tao_yyvsp[-3].slval;
}
}
break;
-case 334:
+case 347:
{
- tao_yyval.slval = NULL;
+ tao_yyval.slval = 0;
}
break;
}
diff --git a/TAO/TAO_IDL/fe/y.tab.cpp.diff b/TAO/TAO_IDL/fe/y.tab.cpp.diff
index 1c8ab12a2ff..8f5fc2d65bc 100644
--- a/TAO/TAO_IDL/fe/y.tab.cpp.diff
+++ b/TAO/TAO_IDL/fe/y.tab.cpp.diff
@@ -1,6 +1,6 @@
---- y.tab.cpp.orig Mon Nov 12 18:53:41 2001
-+++ y.tab.cpp Mon Nov 12 18:53:41 2001
-@@ -941,7 +941,7 @@
+--- y.tab.cpp Tue Dec 19 09:31:07 2000
++++ y.tab.cpp.mod Tue Dec 19 09:28:09 2000
+@@ -960,7 +960,7 @@
#ifdef TAO_YYMAXDEPTH
#define TAO_YYSTACKSIZE TAO_YYMAXDEPTH
#else
@@ -27,7 +27,7 @@
if (tao_yychar < 0)
{
if ((tao_yychar = tao_yylex()) < 0) tao_yychar = 0;
-@@ -1201,11 +1201,10 @@
+@@ -1220,11 +1220,10 @@
goto tao_yynewerror;
#endif