summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoriliyan <iliyan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2008-04-04 22:28:48 +0000
committeriliyan <iliyan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2008-04-04 22:28:48 +0000
commitaed0a1b28d75430909816a76e01109499ddcebb1 (patch)
tree72de94ddc6d6d8a1ba0d5e508f526ef2029e9082
parent33c37c98bf206a6a72892481112f738ac6681085 (diff)
downloadATCD-aed0a1b28d75430909816a76e01109499ddcebb1.tar.gz
ChangeLogTag: Fri Apr 4 21:43:35 UTC 2008 Iliyan Jeliazkov <iliyan@ociweb.com>
-rw-r--r--ACE/ChangeLog76
-rw-r--r--ACE/THANKS1
-rw-r--r--ACE/ace/Base_Thread_Adapter.cpp8
-rw-r--r--ACE/ace/Base_Thread_Adapter.h9
-rw-r--r--ACE/ace/Parse_Node.cpp58
-rw-r--r--ACE/ace/Parse_Node.h1
-rw-r--r--ACE/ace/Service_Object.cpp6
-rw-r--r--ACE/ace/Service_Repository.cpp224
-rw-r--r--ACE/ace/Service_Repository.h3
-rw-r--r--ACE/ace/Service_Types.cpp5
-rw-r--r--ACE/ace/Svc_Conf.h3
-rw-r--r--ACE/ace/Svc_Conf.y30
-rw-r--r--ACE/ace/Svc_Conf_Tokens.h25
-rw-r--r--ACE/ace/Svc_Conf_y.cpp1011
-rw-r--r--ACE/ace/Thread_Adapter.cpp3
-rw-r--r--ACE/ace/ace.mpc4
-rw-r--r--ACE/ace/svcconf.mpb1
-rw-r--r--ACE/examples/ASX/CCM_App/ASX_CCM_App.mpc2
-rw-r--r--ACE/examples/ASX/CCM_App/CCM_App.cpp5
-rw-r--r--ACE/tests/Object_Manager_Flipping_Test.cpp17
-rw-r--r--ACE/tests/run_test.lst1
-rw-r--r--ACE/tests/tests.mpc19
22 files changed, 988 insertions, 524 deletions
diff --git a/ACE/ChangeLog b/ACE/ChangeLog
index 725d4a793cf..3a161ccc24c 100644
--- a/ACE/ChangeLog
+++ b/ACE/ChangeLog
@@ -1,3 +1,79 @@
+Fri Apr 4 21:43:35 UTC 2008 Iliyan Jeliazkov <iliyan@ociweb.com>
+
+ * THANKS:
+
+ Adding Michael Carter <mcarter at swri dot org> for reporting
+ and debugging bug 3007.
+
+ * ace/Base_Thread_Adapter.h:
+ * ace/Base_Thread_Adapter.cpp:
+
+ Storing a pointer to SG that was current in the parent thread,
+ which enables correct "inheritance" of the SG in the child thread.
+
+ * ace/Parse_Node.h:
+ * ace/Parse_Node.cpp:
+
+ Fixing ACE_Stream_Node::{apply,link} to ensure the modules are linked
+ together and initialized correctly - see bug# 2916. Moving the
+ initialization code out of the yacc parser, here.
+
+ * ace/Service_Object.cpp:
+ * ace/Service_Types.cpp:
+
+ Improving the log output in fini().
+
+ * ace/Service_Repository.h:
+
+ Eliminating an unused parameter static_only from relocate_i()
+
+ * ace/Service_Repository.cpp:
+
+ Simplified relocate_i() and fixed an error that was causing it to
+ choose incorrect ranges of service indexes to relocate.
+ Eliminated the boolean static_only parameter as it was always
+ being set to true. Changed remove() to eliminate the "packing"
+ code and updated the few other methods, which assumed there are no
+ "gaps" in the service storage.
+
+ * ace/Svc_Conf.h:
+ * ace/Svc_Conf.y:
+ * ace/Svc_Conf_Tokens.h:
+ * ace/Svc_Conf_y.cpp:
+
+ Adding an overloaded yyerror that takes just a string to comply
+ with the changed bison template. Moving the module initialization
+ code out of the parser. See ACE_Stream_Node class and bug# 2916.
+
+ * ace/Thread_Adapter.cpp:
+
+ The invoke() method, which runs in the new thread, initializes the
+ thread-specific configuration context. This scheme ensures any
+ newly spawned thread would inherit the spawning thread's service
+ configuration context.
+
+ * ace/ace.mpc:
+
+ Adding Intrusive_Auto_Ptr to the list.
+
+ * ace/svcconf.mpb:
+
+ Updated for the grammar updates, see bug# 2916.
+
+ * examples/ASX/CCM_App/ASX_CCM_App.mpc:
+ * examples/ASX/CCM_App/CCM_App.cpp:
+
+ The DLL names are case-sensitive on *nix. Minor layout changes.
+
+ * tests/Object_Manager_Flipping_Test.cpp:
+
+ Updated to use the Intrusive_Auto_Ptr
+
+ * tests/run_test.lst:
+ * tests/tests.mpc:
+
+ Adding Bug_2980_Regression_Test
+
Fri Apr 4 18:27:57 UTC 2008 Johnny Willemsen <jwillemsen@remedy.nl>
* configure.ac:
diff --git a/ACE/THANKS b/ACE/THANKS
index 6bfc3ff1ca3..67176a9e03a 100644
--- a/ACE/THANKS
+++ b/ACE/THANKS
@@ -2238,6 +2238,7 @@ Nayeem Khan <d dot nayeem dot khan at gmail dot com>
Sorin Voicu-Comendant <sorinvc at gmail dot com>
Andi Heusser <aheusser at gmail dot com>
Paul Carter <pcarter at scires dot com>
+Michael Carter <mcarter at swri dot org>
Alain Kocelniak <alain at corys dot fr>
Alvaro Vega Garcia <avega at tid dot es>
diff --git a/ACE/ace/Base_Thread_Adapter.cpp b/ACE/ace/Base_Thread_Adapter.cpp
index 2ba31a4328e..9c9332c5fe8 100644
--- a/ACE/ace/Base_Thread_Adapter.cpp
+++ b/ACE/ace/Base_Thread_Adapter.cpp
@@ -14,6 +14,8 @@ ACE_RCSID (ace,
# include "ace/OS_NS_Thread.h"
#endif /* ACE_HAS_TSS_EMULATION */
+#include "ace/Service_Config.h"
+
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
ACE_INIT_LOG_MSG_HOOK ACE_Base_Thread_Adapter::init_log_msg_hook_ = 0;
@@ -36,6 +38,7 @@ ACE_Base_Thread_Adapter::ACE_Base_Thread_Adapter (
, arg_ (arg)
, entry_point_ (entry_point)
, thr_desc_ (td)
+ , ctx_ (ACE_Service_Config::current())
{
ACE_OS_TRACE ("ACE_Base_Thread_Adapter::ACE_Base_Thread_Adapter");
@@ -63,6 +66,11 @@ ACE_Base_Thread_Adapter::inherit_log_msg (void)
(*ACE_Base_Thread_Adapter::inherit_log_msg_hook_)(
this->thr_desc_,
this->log_msg_attributes_);
+
+ // Initialize the proper configuration context for the new thread
+ // Placed here since inherit_log_msg() gets called from any of our
+ // descendants (before self-destructing)
+ ACE_Service_Config::current (this->ctx_);
}
void
diff --git a/ACE/ace/Base_Thread_Adapter.h b/ACE/ace/Base_Thread_Adapter.h
index f33f0facd48..0109a4d4647 100644
--- a/ACE/ace/Base_Thread_Adapter.h
+++ b/ACE/ace/Base_Thread_Adapter.h
@@ -67,6 +67,11 @@ protected:
long flags_;
};
+
+
+class ACE_Service_Gestalt;
+
+
/**
* @class ACE_Base_Thread_Adapter
*
@@ -165,11 +170,15 @@ protected:
/// The ACE_Log_Msg attributes.
ACE_OS_Log_Msg_Attributes log_msg_attributes_;
+
/// That is usefull for gprof, define itimerval
#ifdef ACE_USES_GPROF
struct itimerval itimer_;
#endif // ACE_USES_GPROF
+ /// Keep a reference to the configuration context that spawns the
+ /// thread so the child can inherit it.
+ ACE_Service_Gestalt * const ctx_;
};
ACE_END_VERSIONED_NAMESPACE_DECL
diff --git a/ACE/ace/Parse_Node.cpp b/ACE/ace/Parse_Node.cpp
index 376866af7fb..e70e1bff34b 100644
--- a/ACE/ace/Parse_Node.cpp
+++ b/ACE/ace/Parse_Node.cpp
@@ -30,14 +30,55 @@ ACE_Stream_Node::dump (void) const
#endif /* ACE_HAS_DUMP */
}
+#include "ace/ARGV.h"
+
void
ACE_Stream_Node::apply (ACE_Service_Gestalt *config, int &yyerrno)
{
ACE_TRACE ("ACE_Stream_Node::apply");
- if (config->initialize (this->node_->record (config),
- this->node_->parameters ()) == -1)
+ const ACE_Service_Type *sst = this->node_->record (config);
+ if (sst == 0)
+ const_cast<ACE_Static_Node *> (this->node_)->apply (config, yyerrno);
+
+ if (yyerrno != 0) return;
+
+ sst = this->node_->record (config);
+ ACE_Stream_Type *st =
+ dynamic_cast<ACE_Stream_Type *> (const_cast<ACE_Service_Type_Impl *> (sst->type ()));
+
+ for (const ACE_Static_Node *module = dynamic_cast<const ACE_Static_Node*> (this->mods_);
+ module != 0;
+ module = dynamic_cast<ACE_Static_Node*> (module->link()))
+ {
+ ACE_ARGV args (module->parameters ());
+
+ const ACE_Service_Type *mst = module->record (config);
+ if (mst == 0)
+ const_cast<ACE_Static_Node *> (module)->apply (config, yyerrno);
+
+ if (yyerrno != 0)
+ {
+ ACE_ERROR ((LM_ERROR,
+ ACE_LIB_TEXT ("dynamic initialization failed for Module %s\n"),
+ module->name ()));
++yyerrno;
+ }
+
+ ACE_Module_Type const * const mt1 =
+ static_cast <ACE_Module_Type const *> (module->record (config)->type());
+
+ ACE_Module_Type *mt = const_cast<ACE_Module_Type *>(mt1);
+
+ if (st->push (mt) == -1)
+ {
+ ACE_ERROR ((LM_ERROR,
+ ACE_LIB_TEXT ("dynamic initialization failed for Stream %s\n"),
+ this->node_->name ()));
+ ++yyerrno;
+ }
+
+ }
#ifndef ACE_NLOGGING
if (ACE::debug ())
@@ -76,7 +117,14 @@ void
ACE_Parse_Node::link (ACE_Parse_Node *n)
{
ACE_TRACE ("ACE_Parse_Node::link");
- this->next_ = n;
+
+ // Find the last list entry (if any) ...
+ ACE_Parse_Node *t = this;
+ while (t->next_ != 0)
+ t = t->next_;
+
+ // ... and insert n there.
+ t->next_ = n;
}
ACE_Stream_Node::ACE_Stream_Node (const ACE_Static_Node *str_ops,
@@ -718,7 +766,7 @@ ACE_Static_Function_Node::symbol (ACE_Service_Gestalt *config,
ACE_Static_Svc_Descriptor *ssd = 0;
if (config->find_static_svc_descriptor (this->function_name_, &ssd) == -1)
{
- yyerrno++;
+ ++yyerrno;
ACE_ERROR_RETURN ((LM_ERROR,
ACE_TEXT ("(%P|%t) No static service ")
ACE_TEXT ("registered for function %s\n"),
@@ -728,7 +776,7 @@ ACE_Static_Function_Node::symbol (ACE_Service_Gestalt *config,
if (ssd->alloc_ == 0)
{
- yyerrno++;
+ ++yyerrno;
if (this->symbol_ == 0)
{
diff --git a/ACE/ace/Parse_Node.h b/ACE/ace/Parse_Node.h
index ff3647ad875..1bbf8a347c3 100644
--- a/ACE/ace/Parse_Node.h
+++ b/ACE/ace/Parse_Node.h
@@ -25,6 +25,7 @@
#if (ACE_USES_CLASSIC_SVC_CONF == 1)
#include "ace/DLL.h"
+#include "ace/SString.h"
#include "ace/Svc_Conf.h"
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
diff --git a/ACE/ace/Service_Object.cpp b/ACE/ace/Service_Object.cpp
index cc2a1605a39..4e7d16a267e 100644
--- a/ACE/ace/Service_Object.cpp
+++ b/ACE/ace/Service_Object.cpp
@@ -86,6 +86,12 @@ ACE_Service_Type::~ACE_Service_Type (void)
int
ACE_Service_Type::fini (void)
{
+ if (ACE::debug ())
+ ACE_DEBUG ((LM_DEBUG,
+ ACE_TEXT ("ACE (%P|%t) ST::fini - destroying name=%s, dll=%s\n"),
+ this->name_,
+ this->dll_.dll_name_));
+
if (this->fini_already_called_)
return 0;
diff --git a/ACE/ace/Service_Repository.cpp b/ACE/ace/Service_Repository.cpp
index 582f3a2729f..f5c5b1b9096 100644
--- a/ACE/ace/Service_Repository.cpp
+++ b/ACE/ace/Service_Repository.cpp
@@ -138,40 +138,50 @@ ACE_Service_Repository::fini (void)
{
ACE_TRACE ("ACE_Service_Repository::fini");
ACE_MT (ACE_GUARD_RETURN (ACE_Recursive_Thread_Mutex, ace_mon, this->lock_, -1));
+
+ if (this->service_vector_ == 0)
+ return 0;
+
int retval = 0;
- if (this->service_vector_ != 0)
- {
- // <fini> the services in reverse order. Note that if services
- // were removed from the middle of the repository the order
- // won't necessarily be maintained since the <remove> method
- // performs compaction. However, the common case is not to
- // remove services, so typically they are deleted in reverse
- // order.
-
- // Do not be tempted to use the prefix decrement operator. We
- // need to use the postfix decrement operator in this case since
- // the index is unsigned.
+ // Do not be tempted to use the prefix decrement operator. Use
+ // postfix decrement operator since the index is unsigned and may
+ // wrap around the 0
for (size_t i = this->current_size_; i-- != 0; )
{
+ // <fini> the services in reverse order.
ACE_Service_Type *s =
const_cast<ACE_Service_Type *> (this->service_vector_[i]);
+
#ifndef ACE_NLOGGING
if (ACE::debug ())
+ {
+ if (s != 0)
ACE_DEBUG ((LM_DEBUG,
ACE_TEXT ("ACE (%P|%t) SR::fini, repo=%@ [%d] (%d), ")
- ACE_TEXT ("name=%s, type=%@, impl=%@, object=%@, active=%d\n"),
- this, i, this->total_size_, s->name(), s->type (),
+ ACE_TEXT ("name=%s, type=%@, object=%@, active=%d\n"),
+ this,
+ i,
+ this->total_size_,
+ s->name(),
+ s->type (),
(s->type () != 0) ? s->type ()->object () : 0,
s->active ()));
+ else
+ ACE_DEBUG ((LM_DEBUG,
+ ACE_TEXT ("ACE (%P|%t) SR::fini, repo=%@ [%d] (%d) -> 0\n"),
+ this,
+ i,
+ this->total_size_));
+ }
+
#endif
// Collect any errors.
- int ret = s->fini ();
- retval += ret;
+ if (s != 0)
+ retval += s->fini ();
}
- }
return (retval == 0) ? 0 : -1;
}
@@ -184,38 +194,42 @@ ACE_Service_Repository::close (void)
ACE_TRACE ("ACE_Service_Repository::close");
ACE_MT (ACE_GUARD_RETURN (ACE_Recursive_Thread_Mutex, ace_mon, this->lock_, -1));
- if (this->service_vector_ != 0)
- {
- // Delete services in reverse order. Note that if services were
- // removed from the middle of the repository the order won't
- // necessarily be maintained since the <remove> method performs
- // compaction. However, the common case is not to remove
- // services, so typically they are deleted in reverse order.
+ if (this->service_vector_ == 0)
+ return 0;
#ifndef ACE_NLOGGING
if(ACE::debug ())
ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("(%P|%t) SR::close, this=%@, size=%d\n"),
+ ACE_TEXT ("(%P|%t) SR::close - repo=%@, size=%d\n"),
this,
this->current_size_));
#endif
- // Do not be tempted to use the prefix decrement operator. We
- // need to use the postfix decrement operator in this case since
- // the index is unsigned.
+ // Do not use the prefix decrement operator since the index is
+ // unsigned and may wrap around the 0.
for (size_t i = this->current_size_; i-- != 0; )
{
+ // Delete services in reverse order.
+ ACE_Service_Type *s =
+ const_cast<ACE_Service_Type *> (this->service_vector_[i]);
#ifndef ACE_NLOGGING
if(ACE::debug ())
+ {
+ if (s == 0)
ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("(%P|%t) SR::close, this=%@, delete so[%d]=%@ (%s)\n"),
- this, i,
- this->service_vector_[i],
- this->service_vector_[i]->name ()));
+ ACE_TEXT ("(%P|%t) SR::close - repo=%@ [%d] -> 0\n"),
+ this,
+ i));
+ else
+ ACE_DEBUG ((LM_DEBUG,
+ ACE_TEXT ("(%P|%t) SR::close - repo=%@ [%d], name=%s, object=%@\n"),
+ this,
+ i,
+ s->name (),
+ s));
+ }
#endif
-
- ACE_Service_Type *s = const_cast<ACE_Service_Type *> (this->service_vector_[i]);
--this->current_size_;
delete s;
}
@@ -223,7 +237,6 @@ ACE_Service_Repository::close (void)
delete [] this->service_vector_;
this->service_vector_ = 0;
this->current_size_ = 0;
- }
return 0;
}
@@ -255,9 +268,12 @@ ACE_Service_Repository::find_i (const ACE_TCHAR name[],
size_t i;
for (i = 0; i < this->current_size_; i++)
- if (ACE_OS::strcmp (name,
+ {
+ if (this->service_vector_[i] != 0 // skip any empty slots
+ && ACE_OS::strcmp (name,
this->service_vector_[i]->name ()) == 0)
break;
+ }
if (i < this->current_size_)
{
@@ -291,8 +307,7 @@ ACE_Service_Repository::find_i (const ACE_TCHAR name[],
int
ACE_Service_Repository::relocate_i (size_t begin,
size_t end,
- const ACE_DLL& adll,
- bool static_only)
+ const ACE_DLL& adll)
{
ACE_SHLIB_HANDLE new_handle = adll.get_handle (0);
@@ -301,21 +316,27 @@ ACE_Service_Repository::relocate_i (size_t begin,
ACE_Service_Type *type =
const_cast<ACE_Service_Type *> (this->service_vector_[i]);
- ACE_SHLIB_HANDLE old_handle = type->dll ().get_handle (0);
- if (static_only && old_handle != ACE_SHLIB_INVALID_HANDLE)
- continue;
+ if (type == 0) continue; // skip any gaps
+ ACE_SHLIB_HANDLE old_handle = type->dll ().get_handle (0);
+ if (old_handle == ACE_SHLIB_INVALID_HANDLE && new_handle != old_handle)
+ {
#ifndef ACE_NLOGGING
if (ACE::debug ())
ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("ACE (%P|%t) SR::relocate, repo=%@ [%d] (size=%d): name=%s - DLL from=%d to=%d\n"),
- this, i, this->total_size_, type->name (),
+ ACE_TEXT ("ACE (%P|%t) SR::relocate - repo=%@ [%d] (size=%d)")
+ ACE_TEXT (": name=%s, handle: %d -> %d\n"),
+ this,
+ i,
+ this->total_size_,
+ type->name (),
old_handle,
new_handle));
#else
ACE_UNUSED_ARG (new_handle);
#endif
- type->dll (adll);
+ type->dll (adll); // ups the refcount on adll
+ }
}
return 0;
@@ -334,10 +355,9 @@ ACE_Service_Repository::find (const ACE_TCHAR name[],
// Insert the ACE_Service_Type SR into the repository. Note that
-// services may be inserted either resumed or suspended. Using same name
-// as in an existing service causes the delete () to be called for the old one,
-// i.e. make sure @code sr is allocated on the heap!
-
+// services may be inserted either resumed or suspended. Using same
+// name as in an existing service causes the delete () to be called
+// for the old one, i.e. make sure @code sr is allocated on the heap!
int
ACE_Service_Repository::insert (const ACE_Service_Type *sr)
{
@@ -347,62 +367,66 @@ ACE_Service_Repository::insert (const ACE_Service_Type *sr)
ACE_Service_Type *s = 0;
size_t i = 0;
+ // Establish scope for locking while manipulating the service
+ // storage
{
// @TODO: Do we need a recursive mutex here?
- ACE_MT (ACE_GUARD_RETURN (ACE_Recursive_Thread_Mutex, ace_mon, this->lock_, -1));
+ ACE_MT (ACE_GUARD_RETURN (ACE_Recursive_Thread_Mutex,
+ ace_mon,
+ this->lock_,
+ -1));
// Check to see if this is a duplicate.
for (i = 0; i < this->current_size_; i++)
- if (ACE_OS::strcmp (sr->name (),
- this->service_vector_[i]->name ()) == 0)
- break;
-
- // Replacing an existing entry
- if (i < this->current_size_)
{
+ // Replacing an existing entry?
+ if (this->service_vector_[i] != 0 // skip any gaps
+ && ACE_OS::strcmp (sr->name (), this->service_vector_[i]->name ()) == 0)
+ {
return_value = 0;
+
// Check for self-assignment...
if (sr != this->service_vector_[i])
{
s = const_cast<ACE_Service_Type *> (this->service_vector_[i]);
this->service_vector_[i] = sr;
}
+
+ break;
+ }
+ }
+
+ // Adding an entry.
+ if (i >= this->total_size_)
+ {
+ return_value = -1; // no space left
}
- // Adding a new entry.
- else if (i < this->total_size_)
+ else if (s == 0)
{
this->service_vector_[i] = sr;
this->current_size_++;
return_value = 0;
}
+ }
#ifndef ACE_NLOGGING
if (ACE::debug ())
ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("ACE (%P|%t) SR::insert")
- ACE_TEXT (" - repo=%@ [%d] (%d), name=%s")
- ACE_TEXT (", type=%@, object=%@, active=%d\n"),
- this, i, this->total_size_, sr->name(), sr->type (),
+ ACE_TEXT ("ACE (%P|%t) SR::insert - repo=%@ [%d] (%d),")
+ ACE_TEXT (" name=%s (%s) (type=%@, object=%@, active=%d)\n"),
+ this,
+ i,
+ this->total_size_,
+ sr->name(),
+ (return_value == 0 ? ((s==0) ? "new" : "replacing") : "failed"),
+ sr->type (),
(sr->type () != 0) ? sr->type ()->object () : 0,
sr->active ()));
#endif
- }
- // Delete outside the lock
- if (s != 0)
- {
-#ifndef ACE_NLOGGING
- if (ACE::debug ())
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("ACE (%P|%t) SR::insert")
- ACE_TEXT (" - destroying (replacing), repo=%@ [%d] (%d), name=%s")
- ACE_TEXT (", type=%@, object=%@, active=%d\n"),
- this, i, this->total_size_, s->name(), s->type (),
- (s->type () != 0) ? s->type ()->object () : 0,
- s->active ()));
-#endif
+ // If necessary, delete but outside the lock. (s may be 0, but
+ // that's okay, too)
delete s;
- }
if (return_value == -1)
ACE_OS::last_error (ENOSPC);
@@ -410,8 +434,7 @@ ACE_Service_Repository::insert (const ACE_Service_Type *sr)
return return_value;
}
-// Re-resume a service that was previously suspended.
-
+// Resume a service that was previously suspended.
int
ACE_Service_Repository::resume (const ACE_TCHAR name[],
const ACE_Service_Type **srp)
@@ -477,19 +500,16 @@ ACE_Service_Repository::remove (const ACE_TCHAR name[], ACE_Service_Type **ps)
*
* Since the order of services in the Respository matters, we can't
* simply overwrite the entry being deleted with the last and
- * decrement the <current_size> by 1 - we must "pack" the array. A
- * good example of why the order matters is a dynamic service, in
- * whose DLL there is at least one static service. In order to prevent
- * SEGV during finalization, those static services must be finalized
- * _before_the dynamic service that owns them. Otherwice the TEXT
- * segment, containing the code for the static service's desructor may
- * be unloaded with the DLL.
+ * decrement the <current_size> by 1. A good example of why the order
+ * matters is a dynamic service, in whose DLL there is at least one
+ * static service. In order to prevent SEGV during finalization, those
+ * static services must be finalized _before_the dynamic service that
+ * owns them. Otherwice the TEXT segment, containing the code for the
+ * static service's desructor may be unloaded with the DLL.
*
- * @note: (IJ) The above is not entirely true, since the introduction
- * of the ACE_Service_Dynamic_Guard, which fixes-up any stray static
- * services to hold a reference to the DLL. This allows out-of order
- * removals and perhaps allows to skip packing the repo. I left it in
- * because a packed repo is a lot easier to debug.
+ * Neither can we "pack" the array because this may happen inside the
+ * scope of a Service_Dynamic_Guard, which caches an index where
+ * loading of a DLL started in order to relocate dependent services.
*/
int
ACE_Service_Repository::remove_i (const ACE_TCHAR name[], ACE_Service_Type **ps)
@@ -501,11 +521,20 @@ ACE_Service_Repository::remove_i (const ACE_TCHAR name[], ACE_Service_Type **ps)
// We may need the old ptr - to be delete outside the lock!
*ps = const_cast<ACE_Service_Type *> (this->service_vector_[i]);
- // Pack the array
- --this->current_size_;
- for (size_t j = i; j < this->current_size_; j++)
- this->service_vector_[j] = this->service_vector_[j+1];
+#ifndef ACE_NLOGGING
+ if (ACE::debug ())
+ ACE_DEBUG ((LM_DEBUG,
+ ACE_TEXT ("ACE (%P|%t) SR::remove_i - repo=%@ [%d] (%d),")
+ ACE_TEXT (" name=%s (removed) (type=%@, active=%d)\n"),
+ this,
+ i,
+ this->total_size_,
+ name,
+ *ps,
+ (*ps)->active ()));
+#endif
+ this->service_vector_[i] = 0; // simply leave a gap
return 0;
}
@@ -570,8 +599,11 @@ bool
ACE_Service_Repository_Iterator::valid (void) const
{
ACE_TRACE ("ACE_Service_Repository_Iterator::valid");
- return (this->ignore_suspended_ == 0
- || this->svc_rep_.service_vector_[this->next_]->active ());
+ if (this->ignore_suspended_ == 0)
+ return (this->svc_rep_.service_vector_[this->next_] != 0); // skip over gaps
+
+ return (this->svc_rep_.service_vector_[this->next_] != 0
+ && this->svc_rep_.service_vector_[this->next_]->active ());
}
ACE_END_VERSIONED_NAMESPACE_DECL
diff --git a/ACE/ace/Service_Repository.h b/ACE/ace/Service_Repository.h
index ad2b442819b..449d7a88baf 100644
--- a/ACE/ace/Service_Repository.h
+++ b/ACE/ace/Service_Repository.h
@@ -190,8 +190,7 @@ private:
int relocate_i (size_t begin,
size_t end,
- const ACE_DLL &adll,
- bool static_only = true);
+ const ACE_DLL &adll);
/// Contains all the configured services.
const ACE_Service_Type **service_vector_;
diff --git a/ACE/ace/Service_Types.cpp b/ACE/ace/Service_Types.cpp
index 5e6c98b223b..1bd5856d21f 100644
--- a/ACE/ace/Service_Types.cpp
+++ b/ACE/ace/Service_Types.cpp
@@ -58,11 +58,6 @@ int
ACE_Service_Type_Impl::fini (void) const
{
ACE_TRACE ("ACE_Service_Type_Impl::fini");
- if (ACE::debug ())
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("ACE (%P|%t) ST::fini - destroying %s, flags = %d\n"),
- this->name_,
- this->flags_));
delete [] const_cast <ACE_TCHAR *> (this->name_);
(const_cast <ACE_Service_Type_Impl *> (this))->name_ = 0;
diff --git a/ACE/ace/Svc_Conf.h b/ACE/ace/Svc_Conf.h
index f22fcb9a5f3..dbab2ddf8da 100644
--- a/ACE/ace/Svc_Conf.h
+++ b/ACE/ace/Svc_Conf.h
@@ -69,7 +69,8 @@ ACE_YY_DECL;
/// Name of input stream
extern FILE *ace_yyin;
-/// Error handling routine required by YACC or BISON
+/// Error handling routines required by YACC or BISON
+void ace_yyerror (char const *);
void ace_yyerror (int yyerrno, int yylineno, char const *);
/// Holds the lexeme for the current token
diff --git a/ACE/ace/Svc_Conf.y b/ACE/ace/Svc_Conf.y
index 6b8ee2a1ad7..3f4e519612b 100644
--- a/ACE/ace/Svc_Conf.y
+++ b/ACE/ace/Svc_Conf.y
@@ -170,31 +170,7 @@ module_list
module
: dynamic
{
- ACE_Static_Node *svc_type = $<static_node_>1;
-
- if (svc_type != 0)
- {
- ACE_Static_Node *module = $<static_node_>-1;
-
- ACE_ARGV args (svc_type->parameters ());
- ACE_Module_Type *mt = ace_get_module (module->record (ACE_SVC_CONF_PARAM->config),
- svc_type->record (ACE_SVC_CONF_PARAM->config),
- ACE_SVC_CONF_PARAM->yyerrno);
- ACE_Stream_Type *st =
- dynamic_cast<ACE_Stream_Type *> (const_cast<ACE_Service_Type_Impl *> (module->record (ACE_SVC_CONF_PARAM->config)->type ()));
-
- if (!st
- || !mt
- || mt->init (args.argc (), args.argv ()) == -1
- || st->push (mt) == -1)
- {
- ACE_ERROR ((LM_ERROR,
- ACE_LIB_TEXT ("dynamic initialization failed for Module %s\n"),
- svc_type->name ()));
- ACE_SVC_CONF_PARAM->yyerrno++;
}
- }
- }
| static
{
ACE_Static_Node *sn = $<static_node_>-1;
@@ -319,6 +295,12 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL
// messages.
void
+yyerror (char const * s)
+{
+ yyerror (-1, -1, s);
+}
+
+void
yyerror (int yyerrno, int yylineno, char const * s)
{
#if defined (ACE_NLOGGING)
diff --git a/ACE/ace/Svc_Conf_Tokens.h b/ACE/ace/Svc_Conf_Tokens.h
index 8c514a0a582..e3a5324404b 100644
--- a/ACE/ace/Svc_Conf_Tokens.h
+++ b/ACE/ace/Svc_Conf_Tokens.h
@@ -19,13 +19,21 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA. */
-/* As a special exception, when this file is copied by Bison into a
- Bison output file, you may use that output file without restriction.
- This special exception was added by the Free Software Foundation
- in version 1.24 of Bison. */
+/* As a special exception, you may create a larger work that contains
+ part or all of the Bison parser skeleton and distribute that work
+ under terms of your choice, so long as that work isn't itself a
+ parser generator using the skeleton or a modified version thereof
+ as a parser skeleton. Alternatively, if you modify or redistribute
+ the parser skeleton itself, you may (at your option) remove this
+ special exception, which will cause the skeleton and the resulting
+ Bison output files to be licensed under the GNU General Public
+ License without this special exception.
+
+ This special exception was added by the Free Software Foundation in
+ version 2.2 of Bison. */
/* Tokens. */
#ifndef ACE_YYTOKENTYPE
@@ -49,6 +57,7 @@
ACE_STRING = 271
};
#endif
+/* Tokens. */
#define ACE_DYNAMIC 258
#define ACE_STATIC 259
#define ACE_SUSPEND 260
@@ -67,7 +76,7 @@
-#if ! defined (ACE_YYSTYPE) && ! defined (ACE_YYSTYPE_IS_DECLARED)
+#if ! defined ACE_YYSTYPE && ! defined ACE_YYSTYPE_IS_DECLARED
typedef int ACE_YYSTYPE;
# define ace_yystype ACE_YYSTYPE /* obsolescent; will be withdrawn */
# define ACE_YYSTYPE_IS_DECLARED 1
@@ -76,6 +85,4 @@ typedef int ACE_YYSTYPE;
-
-
#endif /* ifndef BISON_SVC_CONF_TAB_H */
diff --git a/ACE/ace/Svc_Conf_y.cpp b/ACE/ace/Svc_Conf_y.cpp
index cc303d98d31..48e4c914b54 100644
--- a/ACE/ace/Svc_Conf_y.cpp
+++ b/ACE/ace/Svc_Conf_y.cpp
@@ -1,7 +1,9 @@
-/* A Bison parser, made by GNU Bison 2.0. */
+/* A Bison parser, made by GNU Bison 2.3. */
-/* Skeleton parser for Yacc-like parsing with Bison,
- Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+/* Skeleton implementation for Bison's Yacc-like parsers in C
+
+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+ Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -15,16 +17,24 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA. */
+
+/* As a special exception, you may create a larger work that contains
+ part or all of the Bison parser skeleton and distribute that work
+ under terms of your choice, so long as that work isn't itself a
+ parser generator using the skeleton or a modified version thereof
+ as a parser skeleton. Alternatively, if you modify or redistribute
+ the parser skeleton itself, you may (at your option) remove this
+ special exception, which will cause the skeleton and the resulting
+ Bison output files to be licensed under the GNU General Public
+ License without this special exception.
-/* As a special exception, when this file is copied by Bison into a
- Bison output file, you may use that output file without restriction.
- This special exception was added by the Free Software Foundation
- in version 1.24 of Bison. */
+ This special exception was added by the Free Software Foundation in
+ version 2.2 of Bison. */
-/* Written by Richard Stallman by simplifying the original so called
- ``semantic'' parser. */
+/* C LALR(1) parser skeleton written by Richard Stallman, by
+ simplifying the original so-called "semantic" parser. */
/* All symbols defined below should begin with ace_yy or ACE_YY, to avoid
infringing on user name space. This should be done even for local
@@ -36,6 +46,9 @@
/* Identify Bison output. */
#define ACE_YYBISON 1
+/* Bison version. */
+#define ACE_YYBISON_VERSION "2.3"
+
/* Skeleton name. */
#define ACE_YYSKELETON_NAME "yacc.c"
@@ -45,10 +58,7 @@
/* Using locations. */
#define ACE_YYLSP_NEEDED 0
-/* On HP-UX aC++ on Itanium, disable warning 2111, statement is unreachable. */
-#if defined (__HP_aCC) && defined (__ia64)
-# pragma diag_suppress 2111
-#endif
+
/* Tokens. */
#ifndef ACE_YYTOKENTYPE
@@ -72,6 +82,7 @@
ACE_STRING = 271
};
#endif
+/* Tokens. */
#define ACE_DYNAMIC 258
#define ACE_STATIC 259
#define ACE_SUSPEND 260
@@ -116,12 +127,12 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL
// Prototypes.
-static ACE_Module_Type *ace_get_module (const ACE_Service_Type *sr,
- const ACE_Service_Type *sv,
+static ACE_Module_Type *ace_get_module (ACE_Service_Type const * sr,
+ ACE_Service_Type const * sv,
int & ace_ace_yyerrno);
-static ACE_Module_Type *ace_get_module (const ACE_Service_Type *sr,
- const ACE_TCHAR *svc_name,
+static ACE_Module_Type *ace_get_module (ACE_Service_Type const * sr,
+ ACE_TCHAR const * svc_name,
int & ace_ace_yyerrno);
#define ACE_YYDEBUG_LEXER_TEXT (ace_yytext[ace_yyleng] = '\0', ace_yytext)
@@ -132,6 +143,7 @@ static ACE_Module_Type *ace_get_module (const ACE_Service_Type *sr,
ACE_END_VERSIONED_NAMESPACE_DECL
+
/* Enabling traces. */
#ifndef ACE_YYDEBUG
# define ACE_YYDEBUG 0
@@ -145,7 +157,12 @@ ACE_END_VERSIONED_NAMESPACE_DECL
# define ACE_YYERROR_VERBOSE 0
#endif
-#if ! defined (ACE_YYSTYPE) && ! defined (ACE_YYSTYPE_IS_DECLARED)
+/* Enabling the token table. */
+#ifndef ACE_YYTOKEN_TABLE
+# define ACE_YYTOKEN_TABLE 0
+#endif
+
+#if ! defined ACE_YYSTYPE && ! defined ACE_YYSTYPE_IS_DECLARED
typedef int ACE_YYSTYPE;
# define ace_yystype ACE_YYSTYPE /* obsolescent; will be withdrawn */
# define ACE_YYSTYPE_IS_DECLARED 1
@@ -157,17 +174,94 @@ typedef int ACE_YYSTYPE;
/* Copy the second part of user declarations. */
-/* Line 213 of yacc.c. */
+/* Line 216 of yacc.c. */
-#if ! defined (ace_yyoverflow) || ACE_YYERROR_VERBOSE
+#ifdef short
+# undef short
+#endif
+
+#ifdef ACE_YYTYPE_UINT8
+typedef ACE_YYTYPE_UINT8 ace_yytype_uint8;
+#else
+typedef unsigned char ace_yytype_uint8;
+#endif
-# ifndef ACE_YYFREE
-# define ACE_YYFREE free
+#ifdef ACE_YYTYPE_INT8
+typedef ACE_YYTYPE_INT8 ace_yytype_int8;
+#elif (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+typedef signed char ace_yytype_int8;
+#else
+typedef short int ace_yytype_int8;
+#endif
+
+#ifdef ACE_YYTYPE_UINT16
+typedef ACE_YYTYPE_UINT16 ace_yytype_uint16;
+#else
+typedef unsigned short int ace_yytype_uint16;
+#endif
+
+#ifdef ACE_YYTYPE_INT16
+typedef ACE_YYTYPE_INT16 ace_yytype_int16;
+#else
+typedef short int ace_yytype_int16;
+#endif
+
+#ifndef ACE_YYSIZE_T
+# ifdef __SIZE_TYPE__
+# define ACE_YYSIZE_T __SIZE_TYPE__
+# elif defined size_t
+# define ACE_YYSIZE_T size_t
+# elif ! defined ACE_YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
+# define ACE_YYSIZE_T size_t
+# else
+# define ACE_YYSIZE_T unsigned int
+# endif
+#endif
+
+#define ACE_YYSIZE_MAXIMUM ((ACE_YYSIZE_T) -1)
+
+#ifndef ACE_YY_
+# if ACE_YYENABLE_NLS
+# if ENABLE_NLS
+# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
+# define ACE_YY_(msgid) dgettext ("bison-runtime", msgid)
+# endif
# endif
-# ifndef ACE_YYMALLOC
-# define ACE_YYMALLOC malloc
+# ifndef ACE_YY_
+# define ACE_YY_(msgid) msgid
# endif
+#endif
+
+/* Suppress unused-variable warnings by "using" E. */
+#if ! defined lint || defined __GNUC__
+# define ACE_YYUSE(e) ((void) (e))
+#else
+# define ACE_YYUSE(e) /* empty */
+#endif
+
+/* Identity function, used to suppress warnings about constant conditions. */
+#ifndef lint
+# define ACE_YYID(n) (n)
+#else
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+static int
+ACE_YYID (int i)
+#else
+static int
+ACE_YYID (i)
+ int i;
+#endif
+{
+ return i;
+}
+#endif
+
+#if ! defined ace_yyoverflow || ACE_YYERROR_VERBOSE
/* The parser invokes alloca or malloc; define the necessary symbols. */
@@ -175,34 +269,76 @@ typedef int ACE_YYSTYPE;
# if ACE_YYSTACK_USE_ALLOCA
# ifdef __GNUC__
# define ACE_YYSTACK_ALLOC __builtin_alloca
+# elif defined __BUILTIN_VA_ARG_INCR
+# include <alloca.h> /* INFRINGES ON USER NAME SPACE */
+# elif defined _AIX
+# define ACE_YYSTACK_ALLOC __alloca
+# elif defined _MSC_VER
+# include <malloc.h> /* INFRINGES ON USER NAME SPACE */
+# define alloca _alloca
# else
# define ACE_YYSTACK_ALLOC alloca
+# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
+# ifndef _STDLIB_H
+# define _STDLIB_H 1
# endif
# endif
# endif
+# endif
+# endif
# ifdef ACE_YYSTACK_ALLOC
/* Pacify GCC's `empty if-body' warning. */
-# define ACE_YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
-# else
-# if defined (__STDC__) || defined (__cplusplus)
-# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
-# define ACE_YYSIZE_T size_t
+# define ACE_YYSTACK_FREE(Ptr) do { /* empty */; } while (ACE_YYID (0))
+# ifndef ACE_YYSTACK_ALLOC_MAXIMUM
+ /* The OS might guarantee only one guard page at the bottom of the stack,
+ and a page size can be as small as 4096 bytes. So we cannot safely
+ invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
+ to allow for a few compiler-allocated temporary stack slots. */
+# define ACE_YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
# endif
+# else
# define ACE_YYSTACK_ALLOC ACE_YYMALLOC
# define ACE_YYSTACK_FREE ACE_YYFREE
+# ifndef ACE_YYSTACK_ALLOC_MAXIMUM
+# define ACE_YYSTACK_ALLOC_MAXIMUM ACE_YYSIZE_MAXIMUM
+# endif
+# if (defined __cplusplus && ! defined _STDLIB_H \
+ && ! ((defined ACE_YYMALLOC || defined malloc) \
+ && (defined ACE_YYFREE || defined free)))
+# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
+# ifndef _STDLIB_H
+# define _STDLIB_H 1
+# endif
+# endif
+# ifndef ACE_YYMALLOC
+# define ACE_YYMALLOC malloc
+# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+void *malloc (ACE_YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
+# endif
+# endif
+# ifndef ACE_YYFREE
+# define ACE_YYFREE free
+# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+void free (void *); /* INFRINGES ON USER NAME SPACE */
+# endif
+# endif
# endif
-#endif /* ! defined (ace_yyoverflow) || ACE_YYERROR_VERBOSE */
+#endif /* ! defined ace_yyoverflow || ACE_YYERROR_VERBOSE */
-#if (! defined (ace_yyoverflow) \
- && (! defined (__cplusplus) \
- || (defined (ACE_YYSTYPE_IS_TRIVIAL) && ACE_YYSTYPE_IS_TRIVIAL)))
+#if (! defined ace_yyoverflow \
+ && (! defined __cplusplus \
+ || (defined ACE_YYSTYPE_IS_TRIVIAL && ACE_YYSTYPE_IS_TRIVIAL)))
/* A type that is properly aligned for any stack member. */
union ace_yyalloc
{
- short int ace_yyss;
+ ace_yytype_int16 ace_yyss;
ACE_YYSTYPE ace_yyvs;
};
@@ -212,24 +348,24 @@ union ace_yyalloc
/* The size of an array large to enough to hold all stacks, each with
N elements. */
# define ACE_YYSTACK_BYTES(N) \
- ((N) * (sizeof (short int) + sizeof (ACE_YYSTYPE)) \
+ ((N) * (sizeof (ace_yytype_int16) + sizeof (ACE_YYSTYPE)) \
+ ACE_YYSTACK_GAP_MAXIMUM)
/* Copy COUNT objects from FROM to TO. The source and destination do
not overlap. */
# ifndef ACE_YYCOPY
-# if defined (__GNUC__) && 1 < __GNUC__
+# if defined __GNUC__ && 1 < __GNUC__
# define ACE_YYCOPY(To, From, Count) \
__builtin_memcpy (To, From, (Count) * sizeof (*(From)))
# else
# define ACE_YYCOPY(To, From, Count) \
do \
{ \
- register ACE_YYSIZE_T ace_yyi; \
+ ACE_YYSIZE_T ace_yyi; \
for (ace_yyi = 0; ace_yyi < (Count); ace_yyi++) \
(To)[ace_yyi] = (From)[ace_yyi]; \
} \
- while (0)
+ while (ACE_YYID (0))
# endif
# endif
@@ -247,14 +383,8 @@ union ace_yyalloc
ace_yynewbytes = ace_yystacksize * sizeof (*Stack) + ACE_YYSTACK_GAP_MAXIMUM; \
ace_yyptr += ace_yynewbytes / sizeof (*ace_yyptr); \
} \
- while (0)
-
-#endif
+ while (ACE_YYID (0))
-#if defined (__STDC__) || defined (__cplusplus)
- typedef signed char ace_yysigned_char;
-#else
- typedef short int ace_yysigned_char;
#endif
/* ACE_YYFINAL -- State number of the termination state. */
@@ -279,7 +409,7 @@ union ace_yyalloc
((unsigned int) (ACE_YYX) <= ACE_YYMAXUTOK ? ace_yytranslate[ACE_YYX] : ACE_YYUNDEFTOK)
/* ACE_YYTRANSLATE[ACE_YYLEX] -- Bison symbol number corresponding to ACE_YYLEX. */
-static const unsigned char ace_yytranslate[] =
+static const ace_yytype_uint8 ace_yytranslate[] =
{
0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
@@ -314,7 +444,7 @@ static const unsigned char ace_yytranslate[] =
#if ACE_YYDEBUG
/* ACE_YYPRHS[ACE_YYN] -- Index of the first RHS symbol of rule number ACE_YYN in
ACE_YYRHS. */
-static const unsigned char ace_yyprhs[] =
+static const ace_yytype_uint8 ace_yyprhs[] =
{
0, 0, 3, 6, 9, 10, 12, 14, 16, 18,
20, 22, 26, 30, 33, 36, 39, 43, 44, 49,
@@ -324,7 +454,7 @@ static const unsigned char ace_yyprhs[] =
};
/* ACE_YYRHS -- A `-1'-separated list of the rules' RHS. */
-static const ace_yysigned_char ace_yyrhs[] =
+static const ace_yytype_int8 ace_yyrhs[] =
{
24, 0, -1, 24, 25, -1, 24, 1, -1, -1,
26, -1, 27, -1, 28, -1, 29, -1, 30, -1,
@@ -341,18 +471,18 @@ static const ace_yysigned_char ace_yyrhs[] =
};
/* ACE_YYRLINE[ACE_YYN] -- source line where rule number ACE_YYN was defined. */
-static const unsigned short int ace_yyrline[] =
+static const ace_yytype_uint16 ace_yyrline[] =
{
0, 62, 62, 71, 75, 79, 80, 81, 82, 83,
84, 88, 98, 105, 112, 119, 126, 130, 130, 137,
- 140, 147, 146, 155, 159, 167, 171, 196, 210, 219,
- 228, 250, 257, 261, 266, 272, 276, 280, 287, 291,
- 295, 302, 303, 307, 308, 309
+ 140, 147, 146, 155, 159, 167, 171, 174, 188, 197,
+ 206, 228, 235, 239, 244, 250, 254, 258, 265, 269,
+ 273, 280, 281, 285, 286, 287
};
#endif
-#if ACE_YYDEBUG || ACE_YYERROR_VERBOSE
-/* ACE_YYTNME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
+#if ACE_YYDEBUG || ACE_YYERROR_VERBOSE || ACE_YYTOKEN_TABLE
+/* ACE_YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
First, the terminals, then, starting at ACE_YYNTOKENS, nonterminals. */
static const char *const ace_yytname[] =
{
@@ -371,7 +501,7 @@ static const char *const ace_yytname[] =
# ifdef ACE_YYPRINT
/* ACE_YYTOKNUM[ACE_YYLEX-NUM] -- Internal token number corresponding to
token ACE_YYLEX-NUM. */
-static const unsigned short int ace_yytoknum[] =
+static const ace_yytype_uint16 ace_yytoknum[] =
{
0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
265, 266, 267, 268, 269, 270, 271, 123, 125, 58,
@@ -380,7 +510,7 @@ static const unsigned short int ace_yytoknum[] =
# endif
/* ACE_YYR1[ACE_YYN] -- Symbol number of symbol that rule ACE_YYN derives. */
-static const unsigned char ace_yyr1[] =
+static const ace_yytype_uint8 ace_yyr1[] =
{
0, 23, 24, 24, 24, 25, 25, 25, 25, 25,
25, 26, 27, 28, 29, 30, 31, 32, 31, 33,
@@ -390,7 +520,7 @@ static const unsigned char ace_yyr1[] =
};
/* ACE_YYR2[ACE_YYN] -- Number of symbols composing right hand side of rule ACE_YYN. */
-static const unsigned char ace_yyr2[] =
+static const ace_yytype_uint8 ace_yyr2[] =
{
0, 2, 2, 2, 0, 1, 1, 1, 1, 1,
1, 3, 3, 2, 2, 2, 3, 0, 4, 1,
@@ -402,7 +532,7 @@ static const unsigned char ace_yyr2[] =
/* ACE_YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
STATE-NUM when ACE_YYTABLE doesn't specify something else to do. Zero
means the default is an error. */
-static const unsigned char ace_yydefact[] =
+static const ace_yytype_uint8 ace_yydefact[] =
{
4, 0, 1, 3, 0, 0, 0, 0, 0, 0,
2, 5, 6, 7, 8, 9, 10, 0, 42, 42,
@@ -414,7 +544,7 @@ static const unsigned char ace_yydefact[] =
};
/* ACE_YYDEFGOTO[NTERM-NUM]. */
-static const ace_yysigned_char ace_yydefgoto[] =
+static const ace_yytype_int8 ace_yydefgoto[] =
{
-1, 1, 10, 11, 12, 13, 14, 15, 16, 34,
26, 36, 47, 53, 62, 18, 51, 44, 30, 32,
@@ -424,7 +554,7 @@ static const ace_yysigned_char ace_yydefgoto[] =
/* ACE_YYPACT[STATE-NUM] -- Index in ACE_YYTABLE of the portion describing
STATE-NUM. */
#define ACE_YYPACT_NINF -13
-static const ace_yysigned_char ace_yypact[] =
+static const ace_yytype_int8 ace_yypact[] =
{
-13, 20, -13, -13, 1, 3, 7, 14, 18, 4,
-13, -13, -13, -13, -13, -13, -13, 21, 19, 19,
@@ -436,7 +566,7 @@ static const ace_yysigned_char ace_yypact[] =
};
/* ACE_YYPGOTO[NTERM-NUM]. */
-static const ace_yysigned_char ace_yypgoto[] =
+static const ace_yytype_int8 ace_yypgoto[] =
{
-13, -13, -13, -9, -8, -12, -7, -4, -13, -13,
-13, 28, -13, -13, -13, -13, -13, -13, -13, 31,
@@ -448,7 +578,7 @@ static const ace_yysigned_char ace_yypgoto[] =
number is the opposite. If zero, do what ACE_YYDEFACT says.
If ACE_YYTABLE_NINF, syntax error. */
#define ACE_YYTABLE_NINF -1
-static const unsigned char ace_yytable[] =
+static const ace_yytype_uint8 ace_yytable[] =
{
24, 25, 4, 5, 6, 7, 8, 4, 5, 40,
41, 42, 49, 50, 43, 35, 17, 56, 19, 23,
@@ -459,7 +589,7 @@ static const unsigned char ace_yytable[] =
0, 0, 46
};
-static const ace_yysigned_char ace_yycheck[] =
+static const ace_yytype_int8 ace_yycheck[] =
{
9, 9, 3, 4, 5, 6, 7, 3, 4, 14,
15, 16, 12, 13, 19, 17, 15, 18, 15, 15,
@@ -472,7 +602,7 @@ static const ace_yysigned_char ace_yycheck[] =
/* ACE_YYSTOS[STATE-NUM] -- The (internal number of the) accessing
symbol of state STATE-NUM. */
-static const unsigned char ace_yystos[] =
+static const ace_yytype_uint8 ace_yystos[] =
{
0, 24, 0, 1, 3, 4, 5, 6, 7, 8,
25, 26, 27, 28, 29, 30, 31, 15, 38, 15,
@@ -483,22 +613,6 @@ static const unsigned char ace_yystos[] =
29, 30, 37, 21, 20, 21
};
-#if ! defined (ACE_YYSIZE_T) && defined (__SIZE_TYPE__)
-# define ACE_YYSIZE_T __SIZE_TYPE__
-#endif
-#if ! defined (ACE_YYSIZE_T) && defined (size_t)
-# define ACE_YYSIZE_T size_t
-#endif
-#if ! defined (ACE_YYSIZE_T)
-# if defined (__STDC__) || defined (__cplusplus)
-# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
-# define ACE_YYSIZE_T size_t
-# endif
-#endif
-#if ! defined (ACE_YYSIZE_T)
-# define ACE_YYSIZE_T unsigned int
-#endif
-
#define ace_yyerrok (ace_yyerrstatus = 0)
#define ace_yyclearin (ace_yychar = ACE_YYEMPTY)
#define ACE_YYEMPTY (-2)
@@ -518,21 +632,21 @@ static const unsigned char ace_yystos[] =
#define ACE_YYRECOVERING() (!!ace_yyerrstatus)
#define ACE_YYBACKUP(Token, Value) \
- do \
+do \
if (ace_yychar == ACE_YYEMPTY && ace_yylen == 1) \
{ \
ace_yychar = (Token); \
ace_yylval = (Value); \
ace_yytoken = ACE_YYTRANSLATE (ace_yychar); \
- ACE_YYPOPSTACK; \
+ ACE_YYPOPSTACK (1); \
goto ace_yybackup; \
} \
else \
{ \
- ace_yyerror (ACE_SVC_CONF_PARAM->yyerrno, ACE_SVC_CONF_PARAM->yylineno, "syntax error: cannot back up");\
+ ace_yyerror (ACE_SVC_CONF_PARAM->yyerrno, ACE_SVC_CONF_PARAM->yylineno, ACE_YY_("syntax error: cannot back up")); \
ACE_YYERROR; \
} \
- while (0)
+while (ACE_YYID (0))
#define ACE_YYTERROR 1
@@ -547,7 +661,7 @@ static const unsigned char ace_yystos[] =
#ifndef ACE_YYLLOC_DEFAULT
# define ACE_YYLLOC_DEFAULT(Current, Rhs, N) \
do \
- if (N) \
+ if (ACE_YYID (N)) \
{ \
(Current).first_line = ACE_YYRHSLOC (Rhs, 1).first_line; \
(Current).first_column = ACE_YYRHSLOC (Rhs, 1).first_column; \
@@ -561,7 +675,7 @@ static const unsigned char ace_yystos[] =
(Current).first_column = (Current).last_column = \
ACE_YYRHSLOC (Rhs, 0).last_column; \
} \
- while (0)
+ while (ACE_YYID (0))
#endif
@@ -598,86 +712,146 @@ static const unsigned char ace_yystos[] =
# endif
# define ACE_YYDPRINTF(Args) \
- do \
- { \
+do { \
if (ace_yydebug) \
ACE_YYFPRINTF Args; \
- } \
- while (0)
+} while (ACE_YYID (0))
# define ACE_YY_SYMBOL_PRINT(Title, Type, Value, Location) \
- do \
- { \
+do { \
if (ace_yydebug) \
{ \
ACE_YYFPRINTF (stderr, "%s ", Title); \
- ace_yysymprint (stderr, \
+ ace_yy_symbol_print (stderr, \
Type, Value); \
ACE_YYFPRINTF (stderr, "\n"); \
} \
- } \
- while (0)
+} while (ACE_YYID (0))
+
+
+/*--------------------------------.
+| Print this symbol on ACE_YYOUTPUT. |
+`--------------------------------*/
+
+/*ARGSUSED*/
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+static void
+ace_yy_symbol_value_print (FILE *ace_yyoutput, int ace_yytype, ACE_YYSTYPE const * const ace_yyvaluep)
+#else
+static void
+ace_yy_symbol_value_print (ace_yyoutput, ace_yytype, ace_yyvaluep)
+ FILE *ace_yyoutput;
+ int ace_yytype;
+ ACE_YYSTYPE const * const ace_yyvaluep;
+#endif
+{
+ if (!ace_yyvaluep)
+ return;
+# ifdef ACE_YYPRINT
+ if (ace_yytype < ACE_YYNTOKENS)
+ ACE_YYPRINT (ace_yyoutput, ace_yytoknum[ace_yytype], *ace_yyvaluep);
+# else
+ ACE_YYUSE (ace_yyoutput);
+# endif
+ switch (ace_yytype)
+ {
+ default:
+ break;
+ }
+}
+
+
+/*--------------------------------.
+| Print this symbol on ACE_YYOUTPUT. |
+`--------------------------------*/
+
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+static void
+ace_yy_symbol_print (FILE *ace_yyoutput, int ace_yytype, ACE_YYSTYPE const * const ace_yyvaluep)
+#else
+static void
+ace_yy_symbol_print (ace_yyoutput, ace_yytype, ace_yyvaluep)
+ FILE *ace_yyoutput;
+ int ace_yytype;
+ ACE_YYSTYPE const * const ace_yyvaluep;
+#endif
+{
+ if (ace_yytype < ACE_YYNTOKENS)
+ ACE_YYFPRINTF (ace_yyoutput, "token %s (", ace_yytname[ace_yytype]);
+ else
+ ACE_YYFPRINTF (ace_yyoutput, "nterm %s (", ace_yytname[ace_yytype]);
+
+ ace_yy_symbol_value_print (ace_yyoutput, ace_yytype, ace_yyvaluep);
+ ACE_YYFPRINTF (ace_yyoutput, ")");
+}
/*------------------------------------------------------------------.
| ace_yy_stack_print -- Print the state stack from its BOTTOM up to its |
| TOP (included). |
`------------------------------------------------------------------*/
-#if defined (__STDC__) || defined (__cplusplus)
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
static void
-ace_yy_stack_print (short int *bottom, short int *top)
+ace_yy_stack_print (ace_yytype_int16 *bottom, ace_yytype_int16 *top)
#else
static void
ace_yy_stack_print (bottom, top)
- short int *bottom;
- short int *top;
+ ace_yytype_int16 *bottom;
+ ace_yytype_int16 *top;
#endif
{
ACE_YYFPRINTF (stderr, "Stack now");
- for (/* Nothing. */; bottom <= top; ++bottom)
+ for (; bottom <= top; ++bottom)
ACE_YYFPRINTF (stderr, " %d", *bottom);
ACE_YYFPRINTF (stderr, "\n");
}
# define ACE_YY_STACK_PRINT(Bottom, Top) \
- do \
- { \
+do { \
if (ace_yydebug) \
ace_yy_stack_print ((Bottom), (Top)); \
- } \
- while (0)
+} while (ACE_YYID (0))
/*------------------------------------------------.
| Report that the ACE_YYRULE is going to be reduced. |
`------------------------------------------------*/
-#if defined (__STDC__) || defined (__cplusplus)
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
static void
-ace_yy_reduce_print (int ace_yyrule)
+ace_yy_reduce_print (ACE_YYSTYPE *ace_yyvsp, int ace_yyrule)
#else
static void
-ace_yy_reduce_print (ace_yyrule)
+ace_yy_reduce_print (ace_yyvsp, ace_yyrule)
+ ACE_YYSTYPE *ace_yyvsp;
int ace_yyrule;
#endif
{
+ int ace_yynrhs = ace_yyr2[ace_yyrule];
int ace_yyi;
- unsigned int ace_yylno = ace_yyrline[ace_yyrule];
- ACE_YYFPRINTF (stderr, "Reducing stack by rule %d (line %u), ",
+ unsigned long int ace_yylno = ace_yyrline[ace_yyrule];
+ ACE_YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
ace_yyrule - 1, ace_yylno);
- /* Print the symbols being reduced, and their result. */
- for (ace_yyi = ace_yyprhs[ace_yyrule]; 0 <= ace_yyrhs[ace_yyi]; ace_yyi++)
- ACE_YYFPRINTF (stderr, "%s ", ace_yytname [ace_yyrhs[ace_yyi]]);
- ACE_YYFPRINTF (stderr, "-> %s\n", ace_yytname [ace_yyr1[ace_yyrule]]);
+ /* The symbols being reduced. */
+ for (ace_yyi = 0; ace_yyi < ace_yynrhs; ace_yyi++)
+ {
+ ACE_OS::fprintf (stderr, " $%d = ", ace_yyi + 1);
+ ace_yy_symbol_print (stderr, ace_yyrhs[ace_yyprhs[ace_yyrule] + ace_yyi],
+ &(ace_yyvsp[(ace_yyi + 1) - (ace_yynrhs)])
+ );
+ ACE_OS::fprintf (stderr, "\n");
+ }
}
# define ACE_YY_REDUCE_PRINT(Rule) \
- do \
- { \
+do { \
if (ace_yydebug) \
- ace_yy_reduce_print (Rule); \
- } \
- while (0)
+ ace_yy_reduce_print (ace_yyvsp, Rule); \
+} while (ACE_YYID (0))
/* Nonzero means print parse trace. It is left uninitialized so that
multiple parsers can coexist. */
@@ -699,7 +873,7 @@ int ace_yydebug;
if the built-in stack extension method is used).
Do not make this value too large; the results are undefined if
- SIZE_MAX < ACE_YYSTACK_BYTES (ACE_YYMAXDEPTH)
+ ACE_YYSTACK_ALLOC_MAXIMUM < ACE_YYSTACK_BYTES (ACE_YYMAXDEPTH)
evaluated with infinite-precision integer arithmetic. */
#ifndef ACE_YYMAXDEPTH
@@ -711,45 +885,47 @@ int ace_yydebug;
#if ACE_YYERROR_VERBOSE
# ifndef ace_yystrlen
-# if defined (__GLIBC__) && defined (_STRING_H)
+# if defined __GLIBC__ && defined _STRING_H
# define ace_yystrlen strlen
# else
/* Return the length of ACE_YYSTR. */
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
static ACE_YYSIZE_T
-# if defined (__STDC__) || defined (__cplusplus)
ace_yystrlen (const char *ace_yystr)
-# else
+#else
+static ACE_YYSIZE_T
ace_yystrlen (ace_yystr)
const char *ace_yystr;
-# endif
+#endif
{
- register const char *ace_yys = ace_yystr;
-
- while (*ace_yys++ != '\0')
+ ACE_YYSIZE_T ace_yylen;
+ for (ace_yylen = 0; ace_yystr[ace_yylen]; ace_yylen++)
continue;
-
- return ace_yys - ace_yystr - 1;
+ return ace_yylen;
}
# endif
# endif
# ifndef ace_yystpcpy
-# if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
+# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
# define ace_yystpcpy stpcpy
# else
/* Copy ACE_YYSRC to ACE_YYDEST, returning the address of the terminating '\0' in
ACE_YYDEST. */
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
static char *
-# if defined (__STDC__) || defined (__cplusplus)
ace_yystpcpy (ACE_TCHAR *ace_yydest, const char *ace_yysrc)
-# else
+#else
+static char *
ace_yystpcpy (ace_yydest, ace_yysrc)
char *ace_yydest;
const char *ace_yysrc;
-# endif
+#endif
{
- register char *ace_yyd = ace_yydest;
- register const char *ace_yys = ace_yysrc;
+ char *ace_yyd = ace_yydest;
+ const char *ace_yys = ace_yysrc;
while ((*ace_yyd++ = *ace_yys++) != '\0')
continue;
@@ -759,53 +935,171 @@ ace_yystpcpy (ace_yydest, ace_yysrc)
# endif
# endif
-#endif /* !ACE_YYERROR_VERBOSE */
+# ifndef ace_yytnamerr
+/* Copy to ACE_YYRES the contents of ACE_YYSTR after stripping away unnecessary
+ quotes and backslashes, so that it's suitable for ace_yyerror. The
+ heuristic is that double-quoting is unnecessary unless the string
+ contains an apostrophe, a comma, or backslash (other than
+ backslash-backslash). ACE_YYSTR is taken from ace_yytname. If ACE_YYRES is
+ null, do not copy; instead, return the length of what the result
+ would have been. */
+static ACE_YYSIZE_T
+ace_yytnamerr (ACE_TCHAR *ace_yyres, const char *ace_yystr)
+{
+ if (*ace_yystr == '"')
+ {
+ ACE_YYSIZE_T ace_yyn = 0;
+ char const *ace_yyp = ace_yystr;
+ for (;;)
+ switch (*++ace_yyp)
+ {
+ case '\'':
+ case ',':
+ goto do_not_strip_quotes;
+
+ case '\\':
+ if (*++ace_yyp != '\\')
+ goto do_not_strip_quotes;
+ /* Fall through. */
+ default:
+ if (ace_yyres)
+ ace_yyres[ace_yyn] = *ace_yyp;
+ ace_yyn++;
+ break;
+
+ case '"':
+ if (ace_yyres)
+ ace_yyres[ace_yyn] = '\0';
+ return ace_yyn;
+ }
+ do_not_strip_quotes: ;
+ }
+ if (! ace_yyres)
+ return ace_yystrlen (ace_yystr);
-#if ACE_YYDEBUG
-/*--------------------------------.
-| Print this symbol on ACE_YYOUTPUT. |
-`--------------------------------*/
+ return ace_yystpcpy (ace_yyres, ace_yystr) - ace_yyres;
+}
+# endif
-#if defined (__STDC__) || defined (__cplusplus)
-static void
-ace_yysymprint (FILE *ace_yyoutput, int ace_yytype, ACE_YYSTYPE *ace_yyvaluep)
-#else
-static void
-ace_yysymprint (ace_yyoutput, ace_yytype, ace_yyvaluep)
- FILE *ace_yyoutput;
- int ace_yytype;
- ACE_YYSTYPE *ace_yyvaluep;
-#endif
+/* Copy into ACE_YYRESULT an error message about the unexpected token
+ ACE_YYCHAR while in state ACE_YYSTATE. Return the number of bytes copied,
+ including the terminating null byte. If ACE_YYRESULT is null, do not
+ copy anything; just return the number of bytes that would be
+ copied. As a special case, return 0 if an ordinary "syntax error"
+ message will do. Return ACE_YYSIZE_MAXIMUM if overflow occurs during
+ size calculation. */
+static ACE_YYSIZE_T
+ace_yysyntax_error (ACE_TCHAR *ace_yyresult, int ace_yystate, int ace_yychar)
{
- /* Pacify ``unused variable'' warnings. */
- (void) ace_yyvaluep;
+ int ace_yyn = ace_yypact[ace_yystate];
- if (ace_yytype < ACE_YYNTOKENS)
- ACE_YYFPRINTF (ace_yyoutput, "token %s (", ace_yytname[ace_yytype]);
+ if (! (ACE_YYPACT_NINF < ace_yyn && ace_yyn <= ACE_YYLAST))
+ return 0;
else
- ACE_YYFPRINTF (ace_yyoutput, "nterm %s (", ace_yytname[ace_yytype]);
-
-
-# ifdef ACE_YYPRINT
- if (ace_yytype < ACE_YYNTOKENS)
- ACE_YYPRINT (ace_yyoutput, ace_yytoknum[ace_yytype], *ace_yyvaluep);
+ {
+ int ace_yytype = ACE_YYTRANSLATE (ace_yychar);
+ ACE_YYSIZE_T ace_yysize0 = ace_yytnamerr (0, ace_yytname[ace_yytype]);
+ ACE_YYSIZE_T ace_yysize = ace_yysize0;
+ ACE_YYSIZE_T ace_yysize1;
+ int ace_yysize_overflow = 0;
+ enum { ACE_YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
+ char const *ace_yyarg[ACE_YYERROR_VERBOSE_ARGS_MAXIMUM];
+ int ace_yyx;
+
+# if 0
+ /* This is so xgettext sees the translatable formats that are
+ constructed on the fly. */
+ ACE_YY_("syntax error, unexpected %s");
+ ACE_YY_("syntax error, unexpected %s, expecting %s");
+ ACE_YY_("syntax error, unexpected %s, expecting %s or %s");
+ ACE_YY_("syntax error, unexpected %s, expecting %s or %s or %s");
+ ACE_YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
# endif
- switch (ace_yytype)
+ char *ace_yyfmt;
+ char const *ace_yyf;
+ static char const ace_yyunexpected[] = "syntax error, unexpected %s";
+ static char const ace_yyexpecting[] = ", expecting %s";
+ static char const ace_yyor[] = " or %s";
+ char ace_yyformat[sizeof ace_yyunexpected
+ + sizeof ace_yyexpecting - 1
+ + ((ACE_YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
+ * (sizeof ace_yyor - 1))];
+ char const *ace_yyprefix = ace_yyexpecting;
+
+ /* Start ACE_YYX at -ACE_YYN if negative to avoid negative indexes in
+ ACE_YYCHECK. */
+ int ace_yyxbegin = ace_yyn < 0 ? -ace_yyn : 0;
+
+ /* Stay within bounds of both ace_yycheck and ace_yytname. */
+ int ace_yychecklim = ACE_YYLAST - ace_yyn + 1;
+ int ace_yyxend = ace_yychecklim < ACE_YYNTOKENS ? ace_yychecklim : ACE_YYNTOKENS;
+ int ace_yycount = 1;
+
+ ace_yyarg[0] = ace_yytname[ace_yytype];
+ ace_yyfmt = ace_yystpcpy (ace_yyformat, ace_yyunexpected);
+
+ for (ace_yyx = ace_yyxbegin; ace_yyx < ace_yyxend; ++ace_yyx)
+ if (ace_yycheck[ace_yyx + ace_yyn] == ace_yyx && ace_yyx != ACE_YYTERROR)
{
- default:
+ if (ace_yycount == ACE_YYERROR_VERBOSE_ARGS_MAXIMUM)
+ {
+ ace_yycount = 1;
+ ace_yysize = ace_yysize0;
+ ace_yyformat[sizeof ace_yyunexpected - 1] = '\0';
break;
}
- ACE_YYFPRINTF (ace_yyoutput, ")");
+ ace_yyarg[ace_yycount++] = ace_yytname[ace_yyx];
+ ace_yysize1 = ace_yysize + ace_yytnamerr (0, ace_yytname[ace_yyx]);
+ ace_yysize_overflow |= (ace_yysize1 < ace_yysize);
+ ace_yysize = ace_yysize1;
+ ace_yyfmt = ace_yystpcpy (ace_yyfmt, ace_yyprefix);
+ ace_yyprefix = ace_yyor;
+ }
+
+ ace_yyf = ACE_YY_(ace_yyformat);
+ ace_yysize1 = ace_yysize + ace_yystrlen (ace_yyf);
+ ace_yysize_overflow |= (ace_yysize1 < ace_yysize);
+ ace_yysize = ace_yysize1;
+
+ if (ace_yysize_overflow)
+ return ACE_YYSIZE_MAXIMUM;
+
+ if (ace_yyresult)
+ {
+ /* Avoid sprintf, as that infringes on the user's name space.
+ Don't have undefined behavior even if the translation
+ produced a string with the wrong number of "%s"s. */
+ char *ace_yyp = ace_yyresult;
+ int ace_yyi = 0;
+ while ((*ace_yyp = *ace_yyf) != '\0')
+ {
+ if (*ace_yyp == '%' && ace_yyf[1] == 's' && ace_yyi < ace_yycount)
+ {
+ ace_yyp += ace_yytnamerr (ace_yyp, ace_yyarg[ace_yyi++]);
+ ace_yyf += 2;
+ }
+ else
+ {
+ ace_yyp++;
+ ace_yyf++;
+ }
+ }
+ }
+ return ace_yysize;
+ }
}
+#endif /* ACE_YYERROR_VERBOSE */
+
-#endif /* ! ACE_YYDEBUG */
/*-----------------------------------------------.
| Release the memory associated to this symbol. |
`-----------------------------------------------*/
-#if defined (__STDC__) || defined (__cplusplus)
+/*ARGSUSED*/
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
static void
ace_yydestruct (const char *ace_yymsg, int ace_yytype, ACE_YYSTYPE *ace_yyvaluep)
#else
@@ -816,28 +1110,31 @@ ace_yydestruct (ace_yymsg, ace_yytype, ace_yyvaluep)
ACE_YYSTYPE *ace_yyvaluep;
#endif
{
- /* Pacify ``unused variable'' warnings. */
- (void) ace_yyvaluep;
- (void) ace_yytype;
+ ACE_YYUSE (ace_yyvaluep);
if (!ace_yymsg)
ace_yymsg = "Deleting";
ACE_YY_SYMBOL_PRINT (ace_yymsg, ace_yytype, ace_yyvaluep, ace_yylocationp);
-}
+ switch (ace_yytype)
+ {
+
+ default:
+ break;
+ }
+}
-ACE_BEGIN_VERSIONED_NAMESPACE_DECL
/* Prevent warnings from -Wmissing-prototypes. */
#ifdef ACE_YYPARSE_PARAM
-# if defined (__STDC__) || defined (__cplusplus)
+#if defined __STDC__ || defined __cplusplus
int ace_yyparse (void *ACE_YYPARSE_PARAM);
-# else
+#else
int ace_yyparse ();
-# endif
+#endif
#else /* ! ACE_YYPARSE_PARAM */
-#if defined (__STDC__) || defined (__cplusplus)
+#if defined __STDC__ || defined __cplusplus
int ace_yyparse (void);
#else
int ace_yyparse ();
@@ -845,19 +1142,27 @@ int ace_yyparse ();
#endif /* ! ACE_YYPARSE_PARAM */
+
+
+
+
/*----------.
| ace_yyparse. |
`----------*/
#ifdef ACE_YYPARSE_PARAM
-# if defined (__STDC__) || defined (__cplusplus)
-int ace_yyparse (void *ACE_YYPARSE_PARAM)
-# else
-int ace_yyparse (ACE_YYPARSE_PARAM)
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+int
+ace_yyparse (void *ACE_YYPARSE_PARAM)
+#else
+int
+ace_yyparse (ACE_YYPARSE_PARAM)
void *ACE_YYPARSE_PARAM;
-# endif
+#endif
#else /* ! ACE_YYPARSE_PARAM */
-#if defined (__STDC__) || defined (__cplusplus)
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
int
ace_yyparse (void)
#else
@@ -873,22 +1178,22 @@ int ace_yychar;
/* The semantic value of the look-ahead symbol. */
ACE_YYSTYPE ace_yylval;
-#if defined (ACE_YYSTYPE_IS_TRIVIAL)
- ace_yylval = 0;
-#else
- ace_yylval.type_ = 0;
-#endif /* ACE_YYSTYPE_IS_TRIVIAL */
-
/* Number of syntax errors so far. */
int ace_yynerrs;
- register int ace_yystate;
- register int ace_yyn;
+ int ace_yystate;
+ int ace_yyn;
int ace_yyresult;
/* Number of tokens to shift before error messages enabled. */
int ace_yyerrstatus;
/* Look-ahead token as an internal (translated) token number. */
int ace_yytoken = 0;
+#if ACE_YYERROR_VERBOSE
+ /* Buffer for error messages, and its allocated size. */
+ char ace_yymsgbuf[128];
+ char *ace_yymsg = ace_yymsgbuf;
+ ACE_YYSIZE_T ace_yymsg_alloc = sizeof ace_yymsgbuf;
+#endif
/* Three stacks and their tools:
`ace_yyss': related to states,
@@ -899,18 +1204,18 @@ int ace_yynerrs;
to reallocate them elsewhere. */
/* The state stack. */
- short int ace_yyssa[ACE_YYINITDEPTH];
- short int *ace_yyss = ace_yyssa;
- register short int *ace_yyssp;
+ ace_yytype_int16 ace_yyssa[ACE_YYINITDEPTH];
+ ace_yytype_int16 *ace_yyss = ace_yyssa;
+ ace_yytype_int16 *ace_yyssp;
/* The semantic value stack. */
ACE_YYSTYPE ace_yyvsa[ACE_YYINITDEPTH];
ACE_YYSTYPE *ace_yyvs = ace_yyvsa;
- register ACE_YYSTYPE *ace_yyvsp;
+ ACE_YYSTYPE *ace_yyvsp;
-#define ACE_YYPOPSTACK (ace_yyvsp--, ace_yyssp--)
+#define ACE_YYPOPSTACK(N) (ace_yyvsp -= (N), ace_yyssp -= (N))
ACE_YYSIZE_T ace_yystacksize = ACE_YYINITDEPTH;
@@ -919,9 +1224,9 @@ int ace_yynerrs;
ACE_YYSTYPE ace_yyval;
- /* When reducing, the number of symbols on the RHS of the reduced
- rule. */
- int ace_yylen;
+ /* The number of symbols on the RHS of the reduced rule.
+ Keep to zero when no symbol should be popped. */
+ int ace_yylen = 0;
ACE_YYDPRINTF ((stderr, "Starting parse\n"));
@@ -938,9 +1243,6 @@ int ace_yynerrs;
ace_yyssp = ace_yyss;
ace_yyvsp = ace_yyvs;
-
- ace_yyvsp[0] = ace_yylval;
-
goto ace_yysetstate;
/*------------------------------------------------------------.
@@ -948,8 +1250,7 @@ int ace_yynerrs;
`------------------------------------------------------------*/
ace_yynewstate:
/* In all cases, when you get here, the value and location stacks
- have just been pushed. so pushing a state here evens the stacks.
- */
+ have just been pushed. So pushing a state here evens the stacks. */
ace_yyssp++;
ace_yysetstate:
@@ -966,14 +1267,14 @@ int ace_yynerrs;
these so that the &'s don't force the real ones into
memory. */
ACE_YYSTYPE *ace_yyvs1 = ace_yyvs;
- short int *ace_yyss1 = ace_yyss;
+ ace_yytype_int16 *ace_yyss1 = ace_yyss;
/* Each stack pointer address is followed by the size of the
data in use in that stack, in bytes. This used to be a
conditional around just the two extra args, but that might
be undefined if ace_yyoverflow is a macro. */
- ace_yyoverflow ("parser stack overflow",
+ ace_yyoverflow (ACE_YY_("memory exhausted"),
&ace_yyss1, ace_yysize * sizeof (*ace_yyssp),
&ace_yyvs1, ace_yysize * sizeof (*ace_yyvsp),
@@ -984,21 +1285,21 @@ int ace_yynerrs;
}
#else /* no ace_yyoverflow */
# ifndef ACE_YYSTACK_RELOCATE
- goto ace_yyoverflowlab;
+ goto ace_yyexhaustedlab;
# else
/* Extend the stack our own way. */
if (ACE_YYMAXDEPTH <= ace_yystacksize)
- goto ace_yyoverflowlab;
+ goto ace_yyexhaustedlab;
ace_yystacksize *= 2;
if (ACE_YYMAXDEPTH < ace_yystacksize)
ace_yystacksize = ACE_YYMAXDEPTH;
{
- short int *ace_yyss1 = ace_yyss;
+ ace_yytype_int16 *ace_yyss1 = ace_yyss;
union ace_yyalloc *ace_yyptr =
(union ace_yyalloc *) ACE_YYSTACK_ALLOC (ACE_YYSTACK_BYTES (ace_yystacksize));
if (! ace_yyptr)
- goto ace_yyoverflowlab;
+ goto ace_yyexhaustedlab;
ACE_YYSTACK_RELOCATE (ace_yyss);
ACE_YYSTACK_RELOCATE (ace_yyvs);
@@ -1029,12 +1330,10 @@ int ace_yynerrs;
`-----------*/
ace_yybackup:
-/* Do appropriate processing given the current state. */
-/* Read a look-ahead token if we need one and don't already have one. */
-/* ace_yyresume: */
+ /* Do appropriate processing given the current state. Read a
+ look-ahead token if we need one and don't already have one. */
/* First try to decide what to do without reference to look-ahead token. */
-
ace_yyn = ace_yypact[ace_yystate];
if (ace_yyn == ACE_YYPACT_NINF)
goto ace_yydefault;
@@ -1076,22 +1375,21 @@ ace_yybackup:
if (ace_yyn == ACE_YYFINAL)
ACE_YYACCEPT;
+ /* Count tokens shifted since error; after three, turn off error
+ status. */
+ if (ace_yyerrstatus)
+ ace_yyerrstatus--;
+
/* Shift the look-ahead token. */
ACE_YY_SYMBOL_PRINT ("Shifting", ace_yytoken, &ace_yylval, &ace_yylloc);
- /* Discard the token being shifted unless it is eof. */
+ /* Discard the shifted token unless it is eof. */
if (ace_yychar != ACE_YYEOF)
ace_yychar = ACE_YYEMPTY;
+ ace_yystate = ace_yyn;
*++ace_yyvsp = ace_yylval;
-
- /* Count tokens shifted since error; after three, turn off error
- status. */
- if (ace_yyerrstatus)
- ace_yyerrstatus--;
-
- ace_yystate = ace_yyn;
goto ace_yynewstate;
@@ -1129,10 +1427,10 @@ ace_yyreduce:
case 2:
{
- if ((ace_yyvsp[0].parse_node_) != 0)
+ if ((ace_yyvsp[(2) - (2)].parse_node_) != 0)
{
- (ace_yyvsp[0].parse_node_)->apply (ACE_SVC_CONF_PARAM->config, ACE_SVC_CONF_PARAM->yyerrno);
- delete (ace_yyvsp[0].parse_node_);
+ (ace_yyvsp[(2) - (2)].parse_node_)->apply (ACE_SVC_CONF_PARAM->config, ACE_SVC_CONF_PARAM->yyerrno);
+ delete (ace_yyvsp[(2) - (2)].parse_node_);
}
ACE_SVC_CONF_PARAM->obstack.release ();
;}
@@ -1148,8 +1446,8 @@ ace_yyreduce:
case 11:
{
- if ((ace_yyvsp[-1].svc_record_) != 0)
- (ace_yyval.parse_node_) = new ACE_Dynamic_Node ((ace_yyvsp[-1].svc_record_), (ace_yyvsp[0].ident_));
+ if ((ace_yyvsp[(2) - (3)].svc_record_) != 0)
+ (ace_yyval.parse_node_) = new ACE_Dynamic_Node ((ace_yyvsp[(2) - (3)].svc_record_), (ace_yyvsp[(3) - (3)].ident_));
else
(ace_yyval.parse_node_) = 0;
;}
@@ -1158,47 +1456,47 @@ ace_yyreduce:
case 12:
{
- (ace_yyval.parse_node_) = new ACE_Static_Node ((ace_yyvsp[-1].ident_), (ace_yyvsp[0].ident_));
+ (ace_yyval.parse_node_) = new ACE_Static_Node ((ace_yyvsp[(2) - (3)].ident_), (ace_yyvsp[(3) - (3)].ident_));
;}
break;
case 13:
{
- (ace_yyval.parse_node_) = new ACE_Suspend_Node ((ace_yyvsp[0].ident_));
+ (ace_yyval.parse_node_) = new ACE_Suspend_Node ((ace_yyvsp[(2) - (2)].ident_));
;}
break;
case 14:
{
- (ace_yyval.parse_node_) = new ACE_Resume_Node ((ace_yyvsp[0].ident_));
+ (ace_yyval.parse_node_) = new ACE_Resume_Node ((ace_yyvsp[(2) - (2)].ident_));
;}
break;
case 15:
{
- (ace_yyval.parse_node_) = new ACE_Remove_Node ((ace_yyvsp[0].ident_));
+ (ace_yyval.parse_node_) = new ACE_Remove_Node ((ace_yyvsp[(2) - (2)].ident_));
;}
break;
case 16:
{
- (ace_yyval.parse_node_) = new ACE_Stream_Node ((ace_yyvsp[-1].static_node_), (ace_yyvsp[0].parse_node_));
+ (ace_yyval.parse_node_) = new ACE_Stream_Node ((ace_yyvsp[(2) - (3)].static_node_), (ace_yyvsp[(3) - (3)].parse_node_));
;}
break;
case 17:
- { (ace_yyval.static_node_) = new ACE_Static_Node ((ace_yyvsp[0].ident_)); ;}
+ { (ace_yyval.static_node_) = new ACE_Static_Node ((ace_yyvsp[(2) - (2)].ident_)); ;}
break;
case 18:
{
- (ace_yyval.parse_node_) = new ACE_Dummy_Node ((ace_yyvsp[-1].static_node_), (ace_yyvsp[0].parse_node_));
+ (ace_yyval.parse_node_) = new ACE_Dummy_Node ((ace_yyvsp[(3) - (4)].static_node_), (ace_yyvsp[(4) - (4)].parse_node_));
;}
break;
@@ -1218,14 +1516,14 @@ ace_yyreduce:
{
// Initialize left context...
- (ace_yyval.static_node_) = (ace_yyvsp[-1].static_node_);
+ (ace_yyval.static_node_) = (ace_yyvsp[(0) - (1)].static_node_);
;}
break;
case 22:
{
- (ace_yyval.parse_node_) = (ace_yyvsp[-1].parse_node_);
+ (ace_yyval.parse_node_) = (ace_yyvsp[(3) - (4)].parse_node_);
;}
break;
@@ -1237,10 +1535,10 @@ ace_yyreduce:
case 24:
{
- if ((ace_yyvsp[0].parse_node_) != 0)
+ if ((ace_yyvsp[(2) - (2)].parse_node_) != 0)
{
- (ace_yyvsp[0].parse_node_)->link ((ace_yyvsp[-1].parse_node_));
- (ace_yyval.parse_node_) = (ace_yyvsp[0].parse_node_);
+ (ace_yyvsp[(2) - (2)].parse_node_)->link ((ace_yyvsp[(1) - (2)].parse_node_));
+ (ace_yyval.parse_node_) = (ace_yyvsp[(2) - (2)].parse_node_);
}
;}
break;
@@ -1253,45 +1551,21 @@ ace_yyreduce:
case 26:
{
- ACE_Static_Node *svc_type = (ace_yyvsp[0].static_node_);
-
- if (svc_type != 0)
- {
- ACE_Static_Node *module = (ace_yyvsp[-2].static_node_);
-
- ACE_ARGV args (svc_type->parameters ());
- ACE_Module_Type *mt = ace_get_module (module->record (ACE_SVC_CONF_PARAM->config),
- svc_type->record (ACE_SVC_CONF_PARAM->config),
- ACE_SVC_CONF_PARAM->yyerrno);
- ACE_Stream_Type *st =
- dynamic_cast<ACE_Stream_Type *> (const_cast<ACE_Service_Type_Impl *> (module->record (ACE_SVC_CONF_PARAM->config)->type ()));
-
- if (!st
- || !mt
- || mt->init (args.argc (), args.argv ()) == -1
- || st->push (mt) == -1)
- {
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("dynamic initialization failed for Module %s\n"),
- svc_type->name ()));
- ACE_SVC_CONF_PARAM->yyerrno++;
- }
- }
;}
break;
case 27:
{
- ACE_Static_Node *sn = (ace_yyvsp[-2].static_node_);
+ ACE_Static_Node *sn = (ace_yyvsp[(-1) - (1)].static_node_);
ACE_Module_Type *mt = ace_get_module (sn->record (ACE_SVC_CONF_PARAM->config),
- (ace_yyvsp[0].static_node_)->name (),
+ (ace_yyvsp[(1) - (1)].static_node_)->name (),
ACE_SVC_CONF_PARAM->yyerrno);
if (((ACE_Stream_Type *) sn->record (ACE_SVC_CONF_PARAM->config)->type ())->push (mt) == -1)
{
ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("Problem with static\n")));
+ ACE_LIB_TEXT ("Problem with static\n")));
ACE_SVC_CONF_PARAM->yyerrno++;
}
;}
@@ -1300,7 +1574,7 @@ ace_yyreduce:
case 28:
{
- ACE_Static_Node *sn = (ace_yyvsp[-2].static_node_);
+ ACE_Static_Node *sn = (ace_yyvsp[(-1) - (1)].static_node_);
ACE_Module_Type *mt = ace_get_module (sn->record (ACE_SVC_CONF_PARAM->config),
sn->name (),
ACE_SVC_CONF_PARAM->yyerrno);
@@ -1312,9 +1586,9 @@ ace_yyreduce:
case 29:
{
- ACE_Static_Node *sn = (ace_yyvsp[-2].static_node_);
+ ACE_Static_Node *sn = (ace_yyvsp[(-1) - (1)].static_node_);
ACE_Module_Type *mt = ace_get_module (sn->record (ACE_SVC_CONF_PARAM->config),
- (ace_yyvsp[0].static_node_)->name (),
+ (ace_yyvsp[(1) - (1)].static_node_)->name (),
ACE_SVC_CONF_PARAM->yyerrno);
if (mt != 0)
mt->resume ();
@@ -1324,8 +1598,8 @@ ace_yyreduce:
case 30:
{
- ACE_Static_Node *stream = (ace_yyvsp[-2].static_node_);
- ACE_Static_Node *module = (ace_yyvsp[0].static_node_);
+ ACE_Static_Node *stream = (ace_yyvsp[(-1) - (1)].static_node_);
+ ACE_Static_Node *module = (ace_yyvsp[(1) - (1)].static_node_);
ACE_Module_Type *mt = ace_get_module (stream->record (ACE_SVC_CONF_PARAM->config),
module->name (),
ACE_SVC_CONF_PARAM->yyerrno);
@@ -1335,7 +1609,7 @@ ace_yyreduce:
if (!st || (mt != 0 && st->remove (mt) == -1))
{
ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("cannot remove Module_Type %s from STREAM_Type %s\n"),
+ ACE_LIB_TEXT ("cannot remove Module_Type %s from STREAM_Type %s\n"),
module->name (),
stream->name ()));
ACE_SVC_CONF_PARAM->yyerrno++;
@@ -1346,7 +1620,7 @@ ace_yyreduce:
case 31:
{
- (ace_yyval.svc_record_) = new ACE_Service_Type_Factory ((ace_yyvsp[-3].ident_), (ace_yyvsp[-2].type_), (ace_yyvsp[-1].location_node_), (ace_yyvsp[0].type_));
+ (ace_yyval.svc_record_) = new ACE_Service_Type_Factory ((ace_yyvsp[(1) - (4)].ident_), (ace_yyvsp[(2) - (4)].type_), (ace_yyvsp[(3) - (4)].location_node_), (ace_yyvsp[(4) - (4)].type_));
;}
break;
@@ -1374,21 +1648,21 @@ ace_yyreduce:
case 35:
{
- (ace_yyval.location_node_) = new ACE_Object_Node ((ace_yyvsp[-2].ident_), (ace_yyvsp[0].ident_));
+ (ace_yyval.location_node_) = new ACE_Object_Node ((ace_yyvsp[(1) - (3)].ident_), (ace_yyvsp[(3) - (3)].ident_));
;}
break;
case 36:
{
- (ace_yyval.location_node_) = new ACE_Function_Node ((ace_yyvsp[-4].ident_), (ace_yyvsp[-2].ident_));
+ (ace_yyval.location_node_) = new ACE_Function_Node ((ace_yyvsp[(1) - (5)].ident_), (ace_yyvsp[(3) - (5)].ident_));
;}
break;
case 37:
{
- (ace_yyval.location_node_) = new ACE_Static_Function_Node ((ace_yyvsp[-2].ident_));
+ (ace_yyval.location_node_) = new ACE_Static_Function_Node ((ace_yyvsp[(2) - (4)].ident_));
;}
break;
@@ -1419,15 +1693,14 @@ ace_yyreduce:
break;
- }
-
-/* Line 1037 of yacc.c. */
-
-
- ace_yyvsp -= ace_yylen;
- ace_yyssp -= ace_yylen;
+/* Line 1267 of yacc.c. */
+ default: break;
+ }
+ ACE_YY_SYMBOL_PRINT ("-> $$ =", ace_yyr1[ace_yyn], &ace_yyval, &ace_yyloc);
+ ACE_YYPOPSTACK (ace_yylen);
+ ace_yylen = 0;
ACE_YY_STACK_PRINT (ace_yyss, ace_yyssp);
*++ace_yyvsp = ace_yyval;
@@ -1456,66 +1729,41 @@ ace_yyerrlab:
if (!ace_yyerrstatus)
{
++ace_yynerrs;
-#if ACE_YYERROR_VERBOSE
- ace_yyn = ace_yypact[ace_yystate];
-
- if (ACE_YYPACT_NINF < ace_yyn && ace_yyn < ACE_YYLAST)
+#if ! ACE_YYERROR_VERBOSE
+ ace_yyerror (ACE_SVC_CONF_PARAM->yyerrno, ACE_SVC_CONF_PARAM->yylineno, ACE_YY_("syntax error"));
+#else
{
- ACE_YYSIZE_T ace_yysize = 0;
- int ace_yytype = ACE_YYTRANSLATE (ace_yychar);
- const char* ace_yyprefix;
- char *ace_yymsg;
- int ace_yyx;
-
- /* Start ACE_YYX at -ACE_YYN if negative to avoid negative indexes in
- ACE_YYCHECK. */
- int ace_yyxbegin = ace_yyn < 0 ? -ace_yyn : 0;
-
- /* Stay within bounds of both ace_yycheck and ace_yytname. */
- int ace_yychecklim = ACE_YYLAST - ace_yyn;
- int ace_yyxend = ace_yychecklim < ACE_YYNTOKENS ? ace_yychecklim : ACE_YYNTOKENS;
- int ace_yycount = 0;
-
- ace_yyprefix = ", expecting ";
- for (ace_yyx = ace_yyxbegin; ace_yyx < ace_yyxend; ++ace_yyx)
- if (ace_yycheck[ace_yyx + ace_yyn] == ace_yyx && ace_yyx != ACE_YYTERROR)
+ ACE_YYSIZE_T ace_yysize = ace_yysyntax_error (0, ace_yystate, ace_yychar);
+ if (ace_yymsg_alloc < ace_yysize && ace_yymsg_alloc < ACE_YYSTACK_ALLOC_MAXIMUM)
{
- ace_yysize += ace_yystrlen (ace_yyprefix) + ace_yystrlen (ace_yytname [ace_yyx]);
- ace_yycount += 1;
- if (ace_yycount == 5)
+ ACE_YYSIZE_T ace_yyalloc = 2 * ace_yysize;
+ if (! (ace_yysize <= ace_yyalloc && ace_yyalloc <= ACE_YYSTACK_ALLOC_MAXIMUM))
+ ace_yyalloc = ACE_YYSTACK_ALLOC_MAXIMUM;
+ if (ace_yymsg != ace_yymsgbuf)
+ ACE_YYSTACK_FREE (ace_yymsg);
+ ace_yymsg = (ACE_TCHAR *) ACE_YYSTACK_ALLOC (ace_yyalloc);
+ if (ace_yymsg)
+ ace_yymsg_alloc = ace_yyalloc;
+ else
{
- ace_yysize = 0;
- break;
+ ace_yymsg = ace_yymsgbuf;
+ ace_yymsg_alloc = sizeof ace_yymsgbuf;
}
}
- ace_yysize += (sizeof ("syntax error, unexpected ")
- + ace_yystrlen (ace_yytname[ace_yytype]));
- ace_yymsg = (ACE_TCHAR *) ACE_YYSTACK_ALLOC (ace_yysize);
- if (ace_yymsg != 0)
- {
- char *ace_yyp = ace_yystpcpy (ace_yymsg, "syntax error, unexpected ");
- ace_yyp = ace_yystpcpy (ace_yyp, ace_yytname[ace_yytype]);
- if (ace_yycount < 5)
+ if (0 < ace_yysize && ace_yysize <= ace_yymsg_alloc)
{
- ace_yyprefix = ", expecting ";
- for (ace_yyx = ace_yyxbegin; ace_yyx < ace_yyxend; ++ace_yyx)
- if (ace_yycheck[ace_yyx + ace_yyn] == ace_yyx && ace_yyx != ACE_YYTERROR)
- {
- ace_yyp = ace_yystpcpy (ace_yyp, ace_yyprefix);
- ace_yyp = ace_yystpcpy (ace_yyp, ace_yytname[ace_yyx]);
- ace_yyprefix = " or ";
- }
- }
+ (void) ace_yysyntax_error (ace_yymsg, ace_yystate, ace_yychar);
ace_yyerror (ACE_SVC_CONF_PARAM->yyerrno, ACE_SVC_CONF_PARAM->yylineno, ace_yymsg);
- ACE_YYSTACK_FREE (ace_yymsg);
}
else
- ace_yyerror (ACE_SVC_CONF_PARAM->yyerrno, ACE_SVC_CONF_PARAM->yylineno, "syntax error; also virtual memory exhausted");
+ {
+ ace_yyerror (ACE_SVC_CONF_PARAM->yyerrno, ACE_SVC_CONF_PARAM->yylineno, ACE_YY_("syntax error"));
+ if (ace_yysize != 0)
+ goto ace_yyexhaustedlab;
}
- else
-#endif /* ACE_YYERROR_VERBOSE */
- ace_yyerror (ACE_SVC_CONF_PARAM->yyerrno, ACE_SVC_CONF_PARAM->yylineno, "syntax error");
+ }
+#endif
}
@@ -1527,22 +1775,14 @@ ace_yyerrlab:
if (ace_yychar <= ACE_YYEOF)
{
- /* If at end of input, pop the error token,
- then the rest of the stack, then return failure. */
+ /* Return failure if at end of input. */
if (ace_yychar == ACE_YYEOF)
- for (;;)
- {
-
- ACE_YYPOPSTACK;
- if (ace_yyssp == ace_yyss)
ACE_YYABORT;
- ace_yydestruct ("Error: popping",
- ace_yystos[*ace_yyssp], ace_yyvsp);
}
- }
else
{
- ace_yydestruct ("Error: discarding", ace_yytoken, &ace_yylval);
+ ace_yydestruct ("Error: discarding",
+ ace_yytoken, &ace_yylval);
ace_yychar = ACE_YYEMPTY;
}
}
@@ -1557,15 +1797,17 @@ ace_yyerrlab:
`---------------------------------------------------*/
ace_yyerrorlab:
-#if defined (__GNUC__) || defined (ACE_WIN32) || defined (__HP_aCC) || defined (__DECCXX)
- /* Pacify GCC when the user code never invokes ACE_YYERROR and the label
- ace_yyerrorlab therefore never appears in user code. */
- if (0)
+ /* Pacify compilers like GCC when the user code never invokes
+ ACE_YYERROR and the label ace_yyerrorlab therefore never appears in user
+ code. */
+ if (/*CONSTCOND*/ 0)
goto ace_yyerrorlab;
-#endif
-ace_yyvsp -= ace_yylen;
- ace_yyssp -= ace_yylen;
+ /* Do not reclaim the symbols of the rule which action triggered
+ this ACE_YYERROR. */
+ ACE_YYPOPSTACK (ace_yylen);
+ ace_yylen = 0;
+ ACE_YY_STACK_PRINT (ace_yyss, ace_yyssp);
ace_yystate = *ace_yyssp;
goto ace_yyerrlab1;
@@ -1595,8 +1837,9 @@ ace_yyerrlab1:
ACE_YYABORT;
- ace_yydestruct ("Error: popping", ace_yystos[ace_yystate], ace_yyvsp);
- ACE_YYPOPSTACK;
+ ace_yydestruct ("Error: popping",
+ ace_yystos[ace_yystate], ace_yyvsp);
+ ACE_YYPOPSTACK (1);
ace_yystate = *ace_yyssp;
ACE_YY_STACK_PRINT (ace_yyss, ace_yyssp);
}
@@ -1625,35 +1868,62 @@ ace_yyacceptlab:
| ace_yyabortlab -- ACE_YYABORT comes here. |
`-----------------------------------*/
ace_yyabortlab:
- ace_yydestruct ("Error: discarding lookahead",
- ace_yytoken, &ace_yylval);
- ace_yychar = ACE_YYEMPTY;
ace_yyresult = 1;
goto ace_yyreturn;
#ifndef ace_yyoverflow
-/*----------------------------------------------.
-| ace_yyoverflowlab -- parser overflow comes here. |
-`----------------------------------------------*/
-ace_yyoverflowlab:
- ace_yyerror (ACE_SVC_CONF_PARAM->yyerrno, ACE_SVC_CONF_PARAM->yylineno, "parser stack overflow");
+/*-------------------------------------------------.
+| ace_yyexhaustedlab -- memory exhaustion comes here. |
+`-------------------------------------------------*/
+ace_yyexhaustedlab:
+ ace_yyerror (ACE_SVC_CONF_PARAM->yyerrno, ACE_SVC_CONF_PARAM->yylineno, ACE_YY_("memory exhausted"));
ace_yyresult = 2;
/* Fall through. */
#endif
ace_yyreturn:
+ if (ace_yychar != ACE_YYEOF && ace_yychar != ACE_YYEMPTY)
+ ace_yydestruct ("Cleanup: discarding lookahead",
+ ace_yytoken, &ace_yylval);
+ /* Do not reclaim the symbols of the rule which action triggered
+ this ACE_YYABORT or ACE_YYACCEPT. */
+ ACE_YYPOPSTACK (ace_yylen);
+ ACE_YY_STACK_PRINT (ace_yyss, ace_yyssp);
+ while (ace_yyssp != ace_yyss)
+ {
+ ace_yydestruct ("Cleanup: popping",
+ ace_yystos[*ace_yyssp], ace_yyvsp);
+ ACE_YYPOPSTACK (1);
+ }
#ifndef ace_yyoverflow
if (ace_yyss != ace_yyssa)
ACE_YYSTACK_FREE (ace_yyss);
#endif
- return ace_yyresult;
+#if ACE_YYERROR_VERBOSE
+ if (ace_yymsg != ace_yymsgbuf)
+ ACE_YYSTACK_FREE (ace_yymsg);
+#endif
+ /* Make sure ACE_YYID is used. */
+ return ACE_YYID (ace_yyresult);
}
+
+
+
+
+ACE_BEGIN_VERSIONED_NAMESPACE_DECL
+
// Prints the error string to standard output. Cleans up the error
// messages.
void
-ace_yyerror (int ace_yyerrno, int ace_yylineno, char const *s)
+ace_yyerror (ACE_TCHAR const * s)
+{
+ ace_yyerror (-1, -1, s);
+}
+
+void
+ace_yyerror (int ace_yyerrno, int ace_yylineno, char const * s)
{
#if defined (ACE_NLOGGING)
ACE_UNUSED_ARG (ace_yyerrno);
@@ -1662,7 +1932,7 @@ ace_yyerror (int ace_yyerrno, int ace_yylineno, char const *s)
#endif /* ACE_NLOGGING */
ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("ACE (%P|%t) [error %d] on line %d: %s\n"),
+ ACE_LIB_TEXT ("ACE (%P|%t) [error %d] on line %d: %s\n"),
ace_yyerrno,
ace_yylineno,
ACE_TEXT_CHAR_TO_TCHAR (s)));
@@ -1686,10 +1956,10 @@ ace_get_module (ACE_Service_Type const * sr,
if (sr == 0 || st == 0 || mt == 0)
{
ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("cannot locate Module_Type %s ")
- ACE_TEXT ("in STREAM_Type %s\n"),
+ ACE_LIB_TEXT ("cannot locate Module_Type %s ")
+ ACE_LIB_TEXT ("in STREAM_Type %s\n"),
svc_name,
- (sr ? sr->name () : ACE_TEXT ("(nil)"))));
+ (sr ? sr->name () : ACE_LIB_TEXT ("(nil)"))));
++ace_yyerrno;
}
@@ -1710,14 +1980,14 @@ ace_get_module (ACE_Service_Type const * sr,
static_cast <ACE_Module_Type const *> (sv->type ());
ACE_TCHAR const * const module_type_name =
- (mt ? mt->name () : ACE_TEXT ("(nil)"));
+ (mt ? mt->name () : ACE_LIB_TEXT ("(nil)"));
if (sr == 0 || st == 0 || mt == 0)
{
ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("cannot locate Module_Type %s or STREAM_Type %s\n"),
+ ACE_LIB_TEXT ("cannot locate Module_Type %s or STREAM_Type %s\n"),
module_type_name,
- (sr ? sr->name () : ACE_TEXT ("(nil)"))));
+ (sr ? sr->name () : ACE_LIB_TEXT ("(nil)"))));
++ace_yyerrno;
}
@@ -1729,7 +1999,7 @@ ace_get_module (ACE_Service_Type const * sr,
if (mp && ACE_OS::strcmp (mp->name (), module_type_name) != 0)
{
ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("warning: assigning Module_Type name %s to Module %s since names differ\n"),
+ ACE_LIB_TEXT ("warning: assigning Module_Type name %s to Module %s since names differ\n"),
module_type_name,
mp->name ()));
mp->name (module_type_name);
@@ -1742,13 +2012,13 @@ ace_get_module (ACE_Service_Type const * sr,
// Main driver program.
int
-ACE_TMAIN(int argc, ACE_TCHAR *argv[])
+main (int argc, char *argv[])
{
ACE_Svc_Conf_Param param (0, stdin);
// Try to reopen any filename argument to use ACE_YYIN.
if (argc > 1 && (ace_yyin = freopen (argv[1], "r", stdin)) == 0)
- (void) ACE_OS::fprintf (stderr, ACE_TEXT ("usage: %s [file]\n"), argv[0]), ACE_OS::exit (1);
+ (void) ACE_OS::ACE_OS::fprintf (stderr, ACE_LIB_TEXT ("usage: %s [file]\n"), argv[0]), ACE_OS::exit (1);
return ::ace_yyparse (&param);
}
@@ -1757,3 +2027,4 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[])
ACE_END_VERSIONED_NAMESPACE_DECL
#endif /* ACE_USES_CLASSIC_SVC_CONF == 1 */
+
diff --git a/ACE/ace/Thread_Adapter.cpp b/ACE/ace/Thread_Adapter.cpp
index d68dc6c8061..d30a32b9ed8 100644
--- a/ACE/ace/Thread_Adapter.cpp
+++ b/ACE/ace/Thread_Adapter.cpp
@@ -5,6 +5,7 @@
#include "ace/Thread_Exit.h"
#include "ace/Thread_Hook.h"
#include "ace/Object_Manager_Base.h"
+#include "ace/Service_Config.h"
ACE_RCSID (ace,
Thread_Adapter,
@@ -52,6 +53,8 @@ ACE_Thread_Adapter::invoke (void)
// ACE_Log_Msg instance in thread-specific storage.
this->inherit_log_msg ();
+ ACE_Service_Config::current (ACE_Service_Config::global());
+
#if !defined(ACE_USE_THREAD_MANAGER_ADAPTER)
// NOTE: this preprocessor directive should match the one in above
// ACE_Thread_Exit::instance (). With the Xavier Pthreads package,
diff --git a/ACE/ace/ace.mpc b/ACE/ace/ace.mpc
index 3a8a1609054..87a67030a58 100644
--- a/ACE/ace/ace.mpc
+++ b/ACE/ace/ace.mpc
@@ -311,6 +311,8 @@ project(ACE) : acedefaults, install, other, codecs, token, svcconf, uuid, fileca
Hash_Multi_Map_Manager_T.cpp
Hash_Map_With_Allocator_T.cpp
IOStream_T.cpp
+
+ Intrusive_Auto_Ptr.cpp
Intrusive_List.cpp
Intrusive_List_Node.cpp
LOCK_SOCK_Acceptor.cpp
@@ -361,6 +363,7 @@ project(ACE) : acedefaults, install, other, codecs, token, svcconf, uuid, fileca
Condition_T.inl
Guard_T.inl
Handle_Gobbler.inl
+ Intrusive_Auto_Ptr.inl
Lock_Adapter_T.inl
Refcounted_Auto_Ptr.inl
Reverse_Lock_T.inl
@@ -383,6 +386,7 @@ project(ACE) : acedefaults, install, other, codecs, token, svcconf, uuid, fileca
Handle_Gobbler.h
If_Then_Else.h
IO_Cntl_Msg.h
+ Intrusive_Auto_Ptr.h
Lock_Adapter_T.h
Log_Priority.h
Malloc_Base.h
diff --git a/ACE/ace/svcconf.mpb b/ACE/ace/svcconf.mpb
index 79fad93329a..40f2d545367 100644
--- a/ACE/ace/svcconf.mpb
+++ b/ACE/ace/svcconf.mpb
@@ -43,6 +43,7 @@ feature(ace_svcconf) {
" -e 's/ NULL/ 0/g' \\"
" -e 's/ace_yyerror[ ]*(\"/ace_yyerror (ACE_SVC_CONF_PARAM->yyerrno, ACE_SVC_CONF_PARAM->yylineno, \"/g' \\"
" -e 's/ace_yyerror[ ]*(ace_yymsg/ace_yyerror (ACE_SVC_CONF_PARAM->yyerrno, ACE_SVC_CONF_PARAM->yylineno, ace_yymsg/g' \\"
+ " -e 's/ace_yyerror[ ]*(ACE_YY_/ace_yyerror (ACE_SVC_CONF_PARAM->yyerrno, ACE_SVC_CONF_PARAM->yylineno, ACE_YY_/g' \\"
" -e 's/ace_yyerror (int ace_yyerrno, int ace_yylineno, const ACE_TCHAR/ace_yyerror (int ace_yyerrno, int ace_yylineno, const char/' \\"
" -e 's@#include <stdio\.h>@@' \\"
" -e 's/Svc_Conf\\.tab\\.c/Svc_Conf_y.cpp/g' < Svc_Conf.tab.c > /tmp/$@"
diff --git a/ACE/examples/ASX/CCM_App/ASX_CCM_App.mpc b/ACE/examples/ASX/CCM_App/ASX_CCM_App.mpc
index b5c40beb84c..37f055a1d21 100644
--- a/ACE/examples/ASX/CCM_App/ASX_CCM_App.mpc
+++ b/ACE/examples/ASX/CCM_App/ASX_CCM_App.mpc
@@ -2,7 +2,7 @@
// $Id$
project(*Lib) : acelib {
- sharedname = ccm_app
+ sharedname = CCM_App
Source_Files {
CCM_App.cpp
}
diff --git a/ACE/examples/ASX/CCM_App/CCM_App.cpp b/ACE/examples/ASX/CCM_App/CCM_App.cpp
index 540dd545d90..53cca03e460 100644
--- a/ACE/examples/ASX/CCM_App/CCM_App.cpp
+++ b/ACE/examples/ASX/CCM_App/CCM_App.cpp
@@ -77,8 +77,9 @@ int
Test_Task::fini (void)
{
ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("finalizing %s\n"),
- this->name () ? this->name () : ACE_TEXT ("task")));
+ ACE_TEXT ("finalizing %s (%@)\n"),
+ this->name () ? this->name () : ACE_TEXT ("task"),
+ this));
return 0;
}
diff --git a/ACE/tests/Object_Manager_Flipping_Test.cpp b/ACE/tests/Object_Manager_Flipping_Test.cpp
index e2dc4349d39..36f61a19383 100644
--- a/ACE/tests/Object_Manager_Flipping_Test.cpp
+++ b/ACE/tests/Object_Manager_Flipping_Test.cpp
@@ -54,9 +54,8 @@ int run_main (int, ACE_TCHAR *[])
// Causing the creation of a SC instance and the corresponding TSS
// key. It is not registered with the Object Manager, but beware -
// OM finalization will destroy it too.
- ACE_Service_Gestalt *p0 = ACE_Service_Config::instance ();
-
- ACE_Service_Gestalt *p1 = 0;
+ ACE_Intrusive_Auto_Ptr<ACE_Service_Gestalt> p0 (ACE_Service_Config::instance ());
+ ACE_Intrusive_Auto_Ptr<ACE_Service_Gestalt> p1;
u_int errors = 0;
// ...
@@ -84,8 +83,12 @@ int run_main (int, ACE_TCHAR *[])
// ACE_ASSERT uses Log_Msg::instance() and needs to be done only
// after ACE_START_TEST
+ // Additional ACE::init() should not have changed the context
ACE_ASSERT (p0 == p1);
+
+ // It should appear open
ACE_ASSERT (!p0->is_opened ());
+
ACE_END_TEST;
@@ -94,14 +97,12 @@ int run_main (int, ACE_TCHAR *[])
ACE::fini ();
}
- p1 = ACE_Service_Config::instance ();
-
// This is a legitimate test, but more importantly an
// attemp to dereference p1 should succeed. If SC's TSS
// was not cleaned correctly this will SEGV. As will the
// following ACE::init, as it tries to use the SC instance.
- if (p1->is_opened ())
+ if (ACE_Service_Config::instance ()->is_opened ())
++errors;
// Not using ACE_ASSERT because ACE is not initialized yet.
@@ -110,12 +111,10 @@ int run_main (int, ACE_TCHAR *[])
ACE::init();
ACE_START_TEST (ACE_TEXT ("Object_Manager_Flipping_Test"));
- ACE_Service_Gestalt *p2 = ACE_Service_Config::instance ();
+ ACE_Service_Gestalt_Auto_Ptr p2 (ACE_Service_Config::instance ());
// ACE_ASSERT uses Log_Msg::instance() and needs to be done only
// after ACE_START_TEST
- ACE_ASSERT (p1 == p2);
-
// An attempt to dereference should be fine.
ACE_ASSERT (!p2->is_opened ());
diff --git a/ACE/tests/run_test.lst b/ACE/tests/run_test.lst
index a1558f4ae14..5054e793c3b 100644
--- a/ACE/tests/run_test.lst
+++ b/ACE/tests/run_test.lst
@@ -40,6 +40,7 @@ Bug_2659_Regression_Test: !ST !VxWorks64 !VxWorks65
Bug_2653_Regression_Test: !ST
Bug_2815_Regression_Test
Bug_2820_Regression_Test
+Bug_2980_Regression_Test: !ST !STATIC !MSVC
Bug_3102_Regression_Test
CDR_Array_Test: !ACE_FOR_TAO
CDR_File_Test: !ACE_FOR_TAO
diff --git a/ACE/tests/tests.mpc b/ACE/tests/tests.mpc
index f102e086a15..d61e13415e6 100644
--- a/ACE/tests/tests.mpc
+++ b/ACE/tests/tests.mpc
@@ -255,6 +255,25 @@ project(Bug_2975_Regression_Test) : acetest {
}
}
+project (Bug_2980_Regression_Test) {
+ // The test uses a non-ACE executable, loading an ACE-based DLL
+ after += Bug_2980_Regression_Dll
+ macros += USE_THREAD
+ exename = Bug_2980_Regression_Test
+ Source_Files {
+ Bug_2980_Regression_Test.cpp
+ }
+}
+
+project (Bug_2980_Regression_Dll): acelib {
+ sharedname = Bug_2980_Regression
+ dynamicflags = TEST_OUTPUT_BUILD_DLL
+ Source_Files {
+ Test_Output.cpp
+ Bug_2980_Regression_Dll.cpp
+ }
+}
+
project(Bug_3102_Regression_Test) : acetest {
exename = Bug_3102_Regression_Test
Source_Files {