summaryrefslogtreecommitdiff
path: root/TAO/CIAO/CCF/CCF/IDL3
diff options
context:
space:
mode:
authorboris <boris@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2003-12-22 21:35:37 +0000
committerboris <boris@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2003-12-22 21:35:37 +0000
commitafcc2f66607ce6ce760a0cc7a82a57706899b925 (patch)
treedd32e8a267255cc692b1bac58f2a0a76e4d7bbb1 /TAO/CIAO/CCF/CCF/IDL3
parent3c9f2b8a237b67f274ca8d6f329a37f403693a8e (diff)
downloadATCD-afcc2f66607ce6ce760a0cc7a82a57706899b925.tar.gz
Impl
Diffstat (limited to 'TAO/CIAO/CCF/CCF/IDL3')
-rw-r--r--TAO/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Component.cpp19
-rw-r--r--TAO/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Component.hpp258
-rw-r--r--TAO/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Consumes.cpp19
-rw-r--r--TAO/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Consumes.hpp107
-rw-r--r--TAO/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Elements.hpp24
-rw-r--r--TAO/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Emits.cpp19
-rw-r--r--TAO/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Emits.hpp107
-rw-r--r--TAO/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/EventType.cpp19
-rw-r--r--TAO/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/EventType.hpp92
-rw-r--r--TAO/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Factory.cpp19
-rw-r--r--TAO/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Factory.hpp149
-rw-r--r--TAO/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Home.cpp19
-rw-r--r--TAO/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Home.hpp336
-rw-r--r--TAO/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/HomeFactory.cpp19
-rw-r--r--TAO/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/HomeFactory.hpp127
-rw-r--r--TAO/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Include.cpp18
-rw-r--r--TAO/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Include.hpp361
-rw-r--r--TAO/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Provides.cpp19
-rw-r--r--TAO/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Provides.hpp107
-rw-r--r--TAO/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Publishes.cpp19
-rw-r--r--TAO/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Publishes.hpp107
-rw-r--r--TAO/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Uses.cpp19
-rw-r--r--TAO/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Uses.hpp107
23 files changed, 0 insertions, 2090 deletions
diff --git a/TAO/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Component.cpp b/TAO/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Component.cpp
deleted file mode 100644
index b0f9d8283c9..00000000000
--- a/TAO/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Component.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-// file : CCF/IDL3/SemanticAction/Impl/Component.cpp
-// author : Boris Kolpackov <boris@dre.vanderbilt.edu>
-// cvs-id : $Id$
-
-#include "CCF/IDL3/SemanticAction/Impl/Component.hpp"
-
-namespace CCF
-{
- namespace IDL3
- {
- namespace SemanticAction
- {
- namespace Impl
- {
- }
- }
- }
-}
-
diff --git a/TAO/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Component.hpp b/TAO/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Component.hpp
deleted file mode 100644
index 79245be6148..00000000000
--- a/TAO/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Component.hpp
+++ /dev/null
@@ -1,258 +0,0 @@
-// file : CCF/IDL3/SemanticAction/Impl/Component.hpp
-// author : Boris Kolpackov <boris@dre.vanderbilt.edu>
-// cvs-id : $Id$
-
-#ifndef CCF_IDL3_SEMANTIC_ACTION_IMPL_COMPONENT_HPP
-#define CCF_IDL3_SEMANTIC_ACTION_IMPL_COMPONENT_HPP
-
-#include "CCF/IDL3/SemanticAction/Component.hpp"
-
-#include "CCF/IDL3/SemanticAction/Impl/Elements.hpp"
-
-namespace CCF
-{
- namespace IDL3
- {
- namespace SemanticAction
- {
- namespace Impl
- {
- //
- //
- //
- class Component :
- public virtual SemanticAction::Component,
- public virtual ScopeBase<SyntaxTree::ComponentDeclPtr>
- {
- public:
- virtual
- ~Component () throw () {}
-
-
- Component (bool trace, SyntaxTree::ScopePtr& scope)
- : ScopeBase<SyntaxTree::ComponentDeclPtr> (scope),
- trace_ (trace),
- name_ ("::"), //@@ this is dirty
- inherits_ ("::")
- {
- }
-
- virtual void
- begin (SimpleIdentifierPtr const& id)
- {
- if (trace_) cerr << "component " << id << endl;
-
- name_ = SyntaxTree::SimpleName (id->lexeme ());
- }
-
- virtual void
- inherits (IdentifierPtr const& id)
- {
- if (trace_) cerr << "inherits " << id << endl;
-
- using namespace SyntaxTree;
-
- Name name (id->lexeme ());
-
- struct InheritancePredicate : public DeclarationTable::ResolvePredicate
- {
- struct IncompatibleType :
- public DeclarationTable::ResolutionFailure
- {
- IncompatibleType (std::string const& t) : type (t) {}
- std::string type;
- };
-
- virtual bool
- test (DeclarationPtr const& d) const
- throw (IncompatibleType)
- {
- if (!d->is_a<ComponentDecl> ())
- {
- throw IncompatibleType (d->declaration_class ());
- }
-
- return d->dynamic_type<ComponentDecl> ()->defined ();
- }
- } p;
-
- try
- {
- ScopedName sn = scope_->table ().resolve (
- name,
- scope_->name (),
- scope_->peek_order (),
- p);
-
- inherits_ = sn;
- }
- catch (InheritancePredicate::IncompatibleType const& e)
- {
- cerr << "error: invalid inheritance specification" << endl;
-
- cerr << "inheritance of ";
- cerr << "component \'" << name_ <<"\' from "
- << e.type << " \'" << name << "\' is illegal" << endl;
- }
- catch (DeclarationTable::NameNotFound const&)
- {
- cerr << "error: invalid inheritance specification" << endl;
- cerr << "no component with name \'"
- << name << "\' visible from scope \'"
- << scope_->name () << "\'" << endl;
- }
- catch (DeclarationTable::PredicateNotMet const&)
- {
- cerr << "error: invalid inheritance specification" << endl;
- cerr << "no defined component with name \'"
- << name << "\' visible from scope \'"
- << scope_->name () << "\'" << endl;
- cerr << "inheritance from forward-declared component is illegal"
- << endl;
- }
- }
-
-
- virtual void
- supports (IdentifierPtr const& id)
- {
- if (trace_) cerr << "supports " << id << endl;
-
- using namespace SyntaxTree;
-
- Name name (id->lexeme ());
-
- struct SupportsPredicate :
- public DeclarationTable::ResolvePredicate
- {
- struct IncompatibleType :
- public DeclarationTable::ResolutionFailure
- {
- IncompatibleType (std::string const& t) : type (t) {}
- std::string type;
- };
-
- virtual bool
- test (DeclarationPtr const& d) const
- throw (IncompatibleType)
- {
- // Spec doesn't say anything about which interfaces
- // component can support.
-
- if (!d->is_a<UnconstrainedInterfaceDecl> ())
- {
- throw IncompatibleType (d->declaration_class ());
- }
-
- return d->dynamic_type<InterfaceDecl> ()->defined ();
- }
- } p;
-
- try
- {
- ScopedName sn = scope_->table ().resolve (
- name,
- scope_->name (),
- scope_->peek_order (),
- p);
-
- if (supports_.insert (sn).second == false)
- {
- cerr << "error: invalid support specification" << endl;
- cerr << "directly supporting interface \'"
- << sn << "\' more than once is illegal" << endl;
- }
- }
- catch (SupportsPredicate::IncompatibleType const& e)
- {
- cerr << "error: invalid support specification" << endl;
-
- cerr << "specifying " << e.type << " \'" << name
- << "\' in component\'s support clause is illegal"
- << endl;
- }
- catch (DeclarationTable::NameNotFound const&)
- {
- cerr << "error: invalid support specification" << endl;
- cerr << "no interface with name \'"
- << name << "\' visible from scope \'"
- << scope_->name () << "\'" << endl;
- }
- catch (DeclarationTable::PredicateNotMet const&)
- {
- cerr << "error: invalid support specification" << endl;
- cerr << "no defined interface with name \'"
- << name << "\' visible from scope \'"
- << scope_->name () << "\'" << endl;
- cerr << "supporting forward-declared interface is illegal"
- << endl;
- }
- }
-
- virtual void
- open_scope ()
- {
- using namespace SyntaxTree;
-
- ComponentDefPtr def;
-
- if (inherits_ == ScopedName ("::"))
- {
- def = ComponentDefPtr (new ComponentDef (
- name_,
- scope_,
- supports_));
- }
- else
- {
- def = ComponentDefPtr (new ComponentDef (
- name_,
- scope_,
- inherits_,
- supports_));
- }
-
- scope_->insert (def);
- push (def);
- scope_ = def;
-
- name_ = SimpleName ("::"); //indicate that we are done
- inherits_ = ScopedName ("::");
- supports_.clear ();
- }
-
- virtual void
- close_scope ()
- {
- scope_ = scope_->scope ();
- }
-
- virtual void
- end ()
- {
- if (trace_) cerr << "end" << endl;
-
- using namespace SyntaxTree;
-
- if (name_ != SimpleName ("::"))
- {
- ComponentDeclPtr decl (new ComponentForwardDecl (name_, scope_));
- scope_->insert (decl);
- }
- else
- {
- pop ();
- }
- }
- private:
- bool trace_;
- SyntaxTree::SimpleName name_;
- SyntaxTree::ScopedName inherits_;
- SyntaxTree::ScopedNameSet supports_;
- };
- }
- }
- }
-}
-
-#endif // CCF_IDL3_SEMANTIC_ACTION_IMPL_COMPONENT_HPP
diff --git a/TAO/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Consumes.cpp b/TAO/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Consumes.cpp
deleted file mode 100644
index 50fa3cdb279..00000000000
--- a/TAO/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Consumes.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-// file : CCF/IDL3/SemanticAction/Impl/Consumes.cpp
-// author : Boris Kolpackov <boris@dre.vanderbilt.edu>
-// cvs-id : $Id$
-
-#include "CCF/IDL3/SemanticAction/Impl/Consumes.hpp"
-
-namespace CCF
-{
- namespace IDL3
- {
- namespace SemanticAction
- {
- namespace Impl
- {
- }
- }
- }
-}
-
diff --git a/TAO/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Consumes.hpp b/TAO/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Consumes.hpp
deleted file mode 100644
index 2e8bbf156ac..00000000000
--- a/TAO/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Consumes.hpp
+++ /dev/null
@@ -1,107 +0,0 @@
-// file : CCF/IDL3/SemanticAction/Impl/Consumes.hpp
-// author : Boris Kolpackov <boris@dre.vanderbilt.edu>
-// cvs-id : $Id$
-
-#ifndef CCF_IDL3_SEMANTIC_ACTION_IMPL_CONSUMES_HPP
-#define CCF_IDL3_SEMANTIC_ACTION_IMPL_CONSUMES_HPP
-
-#include "CCF/IDL3/SemanticAction/Consumes.hpp"
-
-namespace CCF
-{
- namespace IDL3
- {
- namespace SemanticAction
- {
- namespace Impl
- {
- //
- //
- //
- class Consumes : public virtual SemanticAction::Consumes
- {
- public:
- virtual
- ~Consumes () throw () {}
-
- Consumes (bool trace, SyntaxTree::ScopePtr& current)
- : trace_ (trace),
- scope_ (current),
- type_ ("::") //@@ this is dirty
- {
- }
-
- virtual void
- type (IdentifierPtr const& id)
- {
- if (trace_) cerr << "consumes " << id;
-
- using namespace SyntaxTree;
-
- Name name (id->lexeme ());
-
- struct Predicate : public DeclarationTable::ResolvePredicate
- {
- virtual bool
- test (DeclarationPtr const& d) const throw ()
- {
- return d->is_a<EventTypeDef> ();
- }
- } p;
-
- try
- {
- ScopedName sn = scope_->table ().resolve (
- name,
- scope_->name (),
- scope_->peek_order (),
- p);
-
- type_ = sn;
- }
- catch (DeclarationTable::NameNotFound const&)
- {
- cerr << "error: invalid consumes declaration" << endl;
- cerr << "no event type with name \'"
- << name << "\' visible from scope \'"
- << scope_->name () << "\'" << endl;
- }
- catch (DeclarationTable::PredicateNotMet const&)
- {
- cerr << "error: invalid consumes declaration" << endl;
- cerr << "declaration with name \'" << name
- << "\' visible from scope \'" << scope_->name ()
- << "\' is not a defined event type" << endl;
- cerr << "using non-<defined event type> in consumes "
- << "declaration is illegal" << endl;
- }
- }
-
- virtual void
- name (SimpleIdentifierPtr const& id)
- {
- if (trace_) cerr << " " << id << endl;
-
- using namespace SyntaxTree;
-
- SimpleName name (id->lexeme ());
-
- DeclarationPtr d (
- new SyntaxTree::ConsumesDecl (name, type_, scope_));
-
- scope_->insert (d);
-
- type_ = ScopedName ("::");
- }
-
- private:
- bool trace_;
- SyntaxTree::ScopePtr& scope_;
- SyntaxTree::ScopedName type_;
- };
- }
- }
- }
-}
-
-#endif // CCF_IDL3_SEMANTIC_ACTION_IMPL_CONSUMES_HPP
diff --git a/TAO/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Elements.hpp b/TAO/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Elements.hpp
deleted file mode 100644
index 75782eb7a1a..00000000000
--- a/TAO/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Elements.hpp
+++ /dev/null
@@ -1,24 +0,0 @@
-// file : CCF/IDL3/SemanticAction/Impl/Elements.hpp
-// author : Boris Kolpackov <boris@dre.vanderbilt.edu>
-// cvs-id : $Id$
-
-#ifndef CCF_IDL3_SEMANTIC_ACTION_IMPL_ELEMENTS_HPP
-#define CCF_IDL3_SEMANTIC_ACTION_IMPL_ELEMENTS_HPP
-
-#include "CCF/IDL2/SemanticAction/Impl/Elements.hpp"
-
-namespace CCF
-{
- namespace IDL3
- {
- namespace SemanticAction
- {
- namespace Impl
- {
- using IDL2::SemanticAction::Impl::ScopeBase;
- }
- }
- }
-}
-
-#endif // CCF_IDL3_SEMANTIC_ACTION_IMPL_ELEMENTS_HPP
diff --git a/TAO/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Emits.cpp b/TAO/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Emits.cpp
deleted file mode 100644
index 1466024e95a..00000000000
--- a/TAO/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Emits.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-// file : CCF/IDL3/SemanticAction/Impl/Emits.cpp
-// author : Boris Kolpackov <boris@dre.vanderbilt.edu>
-// cvs-id : $Id$
-
-#include "CCF/IDL3/SemanticAction/Impl/Emits.hpp"
-
-namespace CCF
-{
- namespace IDL3
- {
- namespace SemanticAction
- {
- namespace Impl
- {
- }
- }
- }
-}
-
diff --git a/TAO/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Emits.hpp b/TAO/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Emits.hpp
deleted file mode 100644
index 80f611e00ed..00000000000
--- a/TAO/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Emits.hpp
+++ /dev/null
@@ -1,107 +0,0 @@
-// file : CCF/IDL3/SemanticAction/Impl/Emits.hpp
-// author : Boris Kolpackov <boris@dre.vanderbilt.edu>
-// cvs-id : $Id$
-
-#ifndef CCF_IDL3_SEMANTIC_ACTION_IMPL_EMITS_HPP
-#define CCF_IDL3_SEMANTIC_ACTION_IMPL_EMITS_HPP
-
-#include "CCF/IDL3/SemanticAction/Emits.hpp"
-
-namespace CCF
-{
- namespace IDL3
- {
- namespace SemanticAction
- {
- namespace Impl
- {
- //
- //
- //
- class Emits : public virtual SemanticAction::Emits
- {
- public:
- virtual
- ~Emits () throw () {}
-
- Emits (bool trace, SyntaxTree::ScopePtr& current)
- : trace_ (trace),
- scope_ (current),
- type_ ("::") //@@ this is dirty
- {
- }
-
- virtual void
- type (IdentifierPtr const& id)
- {
- if (trace_) cerr << "emits " << id;
-
- using namespace SyntaxTree;
-
- Name name (id->lexeme ());
-
- struct Predicate : public DeclarationTable::ResolvePredicate
- {
- virtual bool
- test (DeclarationPtr const& d) const throw ()
- {
- return d->is_a<EventTypeDef> ();
- }
- } p;
-
- try
- {
- ScopedName sn = scope_->table ().resolve (
- name,
- scope_->name (),
- scope_->peek_order (),
- p);
-
- type_ = sn;
- }
- catch (DeclarationTable::NameNotFound const&)
- {
- cerr << "error: invalid emits declaration" << endl;
- cerr << "no event type with name \'"
- << name << "\' visible from scope \'"
- << scope_->name () << "\'" << endl;
- }
- catch (DeclarationTable::PredicateNotMet const&)
- {
- cerr << "error: invalid emits declaration" << endl;
- cerr << "declaration with name \'" << name
- << "\' visible from scope \'" << scope_->name ()
- << "\' is not a defined event type" << endl;
- cerr << "using non-<defined event type> in emits "
- << "declaration is illegal" << endl;
- }
- }
-
- virtual void
- name (SimpleIdentifierPtr const& id)
- {
- if (trace_) cerr << " " << id << endl;
-
- using namespace SyntaxTree;
-
- SimpleName name (id->lexeme ());
-
- DeclarationPtr d (
- new SyntaxTree::EmitsDecl (name, type_, scope_));
-
- scope_->insert (d);
-
- type_ = ScopedName ("::");
- }
-
- private:
- bool trace_;
- SyntaxTree::ScopePtr& scope_;
- SyntaxTree::ScopedName type_;
- };
- }
- }
- }
-}
-
-#endif // CCF_IDL3_SEMANTIC_ACTION_IMPL_EMITS_HPP
diff --git a/TAO/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/EventType.cpp b/TAO/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/EventType.cpp
deleted file mode 100644
index 7c875a786d2..00000000000
--- a/TAO/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/EventType.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-// file : CCF/IDL3/SemanticAction/Impl/EventType.cpp
-// author : Boris Kolpackov <boris@dre.vanderbilt.edu>
-// cvs-id : $Id$
-
-#include "CCF/IDL3/SemanticAction/Impl/EventType.hpp"
-
-namespace CCF
-{
- namespace IDL3
- {
- namespace SemanticAction
- {
- namespace Impl
- {
- }
- }
- }
-}
-
diff --git a/TAO/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/EventType.hpp b/TAO/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/EventType.hpp
deleted file mode 100644
index 49c006fe1f1..00000000000
--- a/TAO/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/EventType.hpp
+++ /dev/null
@@ -1,92 +0,0 @@
-// file : CCF/IDL3/SemanticAction/Impl/EventType.hpp
-// author : Boris Kolpackov <boris@dre.vanderbilt.edu>
-// cvs-id : $Id$
-
-#ifndef CCF_IDL3_SEMANTIC_ACTION_IMPL_EVENT_TYPE_HPP
-#define CCF_IDL3_SEMANTIC_ACTION_IMPL_EVENT_TYPE_HPP
-
-#include "CCF/IDL3/SemanticAction/EventType.hpp"
-
-#include "CCF/IDL3/SemanticAction/Impl/Elements.hpp"
-
-namespace CCF
-{
- namespace IDL3
- {
- namespace SemanticAction
- {
- namespace Impl
- {
- //
- //
- //
- class EventType : public virtual SemanticAction::EventType,
- public virtual ScopeBase<SyntaxTree::EventTypeDeclPtr>
- {
- public:
- virtual
- ~EventType () throw () {}
-
- EventType (bool trace, SyntaxTree::ScopePtr& scope)
- : ScopeBase<SyntaxTree::EventTypeDeclPtr> (scope),
- trace_ (trace),
- name_ ("::") //@@ this is dirty
- {
- }
-
- public:
-
- virtual void
- begin (SimpleIdentifierPtr const& id)
- {
- if (trace_) cerr << "eventtype " << id << endl;
- name_ = SyntaxTree::SimpleName (id->lexeme ());
- }
-
- virtual void
- inherits (IdentifierPtr const& id)
- {
- if (trace_) cerr << "inherits " << id << endl;
- }
-
- virtual void
- open_scope ()
- {
- using namespace SyntaxTree;
-
- ConcreteEventTypeDefPtr et( new ConcreteEventTypeDef (
- name_,
- scope_,
- inherits_));
- scope_->insert (et);
- push (et);
- scope_ = et;
-
- name_ = SimpleName ("::"); //indicate that we are done
- inherits_.clear ();
- }
-
- virtual void
- close_scope ()
- {
- scope_ = scope_->scope ();
- }
-
- virtual void
- end ()
- {
- if (trace_) cerr << "end" << endl;
- pop ();
- }
-
- private:
- bool trace_;
- SyntaxTree::SimpleName name_;
- SyntaxTree::ScopedNameSet inherits_;
- };
- }
- }
- }
-}
-
-#endif // CCF_IDL3_SEMANTIC_ACTION_IMPL_EVENT_TYPE_HPP
diff --git a/TAO/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Factory.cpp b/TAO/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Factory.cpp
deleted file mode 100644
index ce2ad6b40b9..00000000000
--- a/TAO/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Factory.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-// file : CCF/IDL3/SemanticAction/Impl/Factory.cpp
-// author : Boris Kolpackov <boris@dre.vanderbilt.edu>
-// cvs-id : $Id$
-
-#include "CCF/IDL3/SemanticAction/Impl/Factory.hpp"
-
-namespace CCF
-{
- namespace IDL3
- {
- namespace SemanticAction
- {
- namespace Impl
- {
- }
- }
- }
-}
-
diff --git a/TAO/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Factory.hpp b/TAO/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Factory.hpp
deleted file mode 100644
index f5231f51afc..00000000000
--- a/TAO/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Factory.hpp
+++ /dev/null
@@ -1,149 +0,0 @@
-// file : CCF/IDL3/SemanticAction/Impl/Factory.hpp
-// author : Boris Kolpackov <boris@dre.vanderbilt.edu>
-// cvs-id : $Id$
-
-#ifndef CCF_IDL3_SEMANTIC_ACTION_IMPL_FACTORY_HPP
-#define CCF_IDL3_SEMANTIC_ACTION_IMPL_FACTORY_HPP
-
-#include "CCF/IDL3/SemanticAction/Factory.hpp"
-
-#include "CCF/IDL2/SemanticAction/Impl/Factory.hpp"
-
-#include "CCF/IDL3/SemanticAction/Impl/Include.hpp"
-#include "CCF/IDL3/SemanticAction/Impl/Component.hpp"
-#include "CCF/IDL3/SemanticAction/Impl/Provides.hpp"
-#include "CCF/IDL3/SemanticAction/Impl/Uses.hpp"
-#include "CCF/IDL3/SemanticAction/Impl/Publishes.hpp"
-#include "CCF/IDL3/SemanticAction/Impl/Emits.hpp"
-#include "CCF/IDL3/SemanticAction/Impl/Consumes.hpp"
-#include "CCF/IDL3/SemanticAction/Impl/EventType.hpp"
-#include "CCF/IDL3/SemanticAction/Impl/Home.hpp"
-#include "CCF/IDL3/SemanticAction/Impl/HomeFactory.hpp"
-
-namespace CCF
-{
- namespace IDL3
- {
- namespace SemanticAction
- {
- namespace Impl
- {
- class Factory : public virtual IDL3::SemanticAction::Factory,
- public virtual IDL2::SemanticAction::Impl::Factory
- {
- public:
- virtual
- ~Factory () throw () {}
-
- Factory (CompilerElements::Context& context,
- Diagnostic::Stream& dout,
- SyntaxTree::TranslationRegionPtr const& r)
- : IDL2::SemanticAction::Impl::Factory (context, dout, r),
- trace_ (context.get ("idl3::semantic-action::trace", false)),
-
- component_ (trace_, scope_),
- consumes_ (trace_, scope_),
- emits_ (trace_, scope_),
- event_type_ (trace_, scope_),
- home_ (trace_, scope_),
- home_factory_ (trace_, scope_),
- include_ (trace_, context, dout, *this, r, scope_),
- provides_ (trace_, scope_),
- publishes_ (trace_, scope_),
- system_include_ (trace_, context, dout, *this, r, scope_),
- uses_ (trace_, scope_)
- {
- }
-
- public:
-
- virtual SemanticAction::Consumes&
- consumes ()
- {
- return consumes_;
- }
-
- virtual SemanticAction::Component&
- component ()
- {
- return component_;
- }
-
- virtual SemanticAction::Emits&
- emits ()
- {
- return emits_;
- }
-
-
- virtual SemanticAction::EventType&
- event_type ()
- {
- return event_type_;
- }
-
- virtual SemanticAction::Home&
- home ()
- {
- return home_;
- }
-
- virtual SemanticAction::HomeFactory&
- home_factory ()
- {
- return home_factory_;
- }
-
-
- virtual IDL2::SemanticAction::Include&
- include ()
- {
- return include_;
- }
-
- virtual SemanticAction::Provides&
- provides ()
- {
- return provides_;
- }
-
- virtual SemanticAction::Publishes&
- publishes ()
- {
- return publishes_;
- }
-
- virtual IDL2::SemanticAction::SystemInclude&
- system_include ()
- {
- return system_include_;
- }
-
- virtual SemanticAction::Uses&
- uses ()
- {
- return uses_;
- }
-
- private:
-
- bool trace_;
-
- Component component_;
- Consumes consumes_;
- Emits emits_;
- EventType event_type_;
- Home home_;
- HomeFactory home_factory_;
- Include include_;
- Provides provides_;
- Publishes publishes_;
- SystemInclude system_include_;
- Uses uses_;
- };
- }
- }
- }
-}
-
-#endif // CCF_IDL3_SEMANTIC_ACTION_IMPL_FACTORY_HPP
diff --git a/TAO/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Home.cpp b/TAO/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Home.cpp
deleted file mode 100644
index d7fe0eb7e9d..00000000000
--- a/TAO/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Home.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-// file : CCF/IDL3/SemanticAction/Impl/Home.cpp
-// author : Boris Kolpackov <boris@dre.vanderbilt.edu>
-// cvs-id : $Id$
-
-#include "CCF/IDL3/SemanticAction/Impl/Home.hpp"
-
-namespace CCF
-{
- namespace IDL3
- {
- namespace SemanticAction
- {
- namespace Impl
- {
- }
- }
- }
-}
-
diff --git a/TAO/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Home.hpp b/TAO/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Home.hpp
deleted file mode 100644
index ed8cb617e6c..00000000000
--- a/TAO/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Home.hpp
+++ /dev/null
@@ -1,336 +0,0 @@
-// file : CCF/IDL3/SemanticAction/Impl/Home.hpp
-// author : Boris Kolpackov <boris@dre.vanderbilt.edu>
-// cvs-id : $Id$
-
-#ifndef CCF_IDL3_SEMANTIC_ACTION_IMPL_HOME_HPP
-#define CCF_IDL3_SEMANTIC_ACTION_IMPL_HOME_HPP
-
-#include "CCF/IDL3/SemanticAction/Home.hpp"
-
-#include "CCF/IDL3/SemanticAction/Impl/Elements.hpp"
-
-namespace CCF
-{
- namespace IDL3
- {
- namespace SemanticAction
- {
- namespace Impl
- {
- //
- //
- //
- class Home : public virtual SemanticAction::Home,
- public virtual ScopeBase<SyntaxTree::HomeDefPtr>
- {
- public:
- virtual
- ~Home () throw () {}
-
- Home (bool trace, SyntaxTree::ScopePtr& scope)
- : ScopeBase<SyntaxTree::HomeDefPtr> (scope),
- trace_ (trace),
- name_ ("::"), //@@ this is dirty
- inherits_ ("::"),
- manages_ ("::")
-
- {
- }
-
- virtual void
- begin (SimpleIdentifierPtr const& id)
- {
- if (trace_) cerr << "home " << id << endl;
- name_ = SyntaxTree::SimpleName (id->lexeme ());
- }
-
-
- virtual void
- inherits (IdentifierPtr const& id)
- {
- if (trace_) cerr << "inherits " << id << endl;
-
- using namespace SyntaxTree;
-
- Name name (id->lexeme ());
-
- struct InheritancePredicate : public DeclarationTable::ResolvePredicate
- {
- struct IncompatibleType :
- public DeclarationTable::ResolutionFailure
- {
- IncompatibleType (std::string const& t) : type (t) {}
- std::string type;
- };
-
- virtual bool
- test (DeclarationPtr const& d) const
- throw (IncompatibleType)
- {
- if (!d->is_a<HomeDef> ())
- {
- throw IncompatibleType (d->declaration_class ());
- }
-
- // This is not really necessary since home cannot be
- // forward-declared (yet ;-).
- return d->dynamic_type<HomeDef> ()->defined ();
- }
- } p;
-
- try
- {
- ScopedName sn = scope_->table ().resolve (
- name,
- scope_->name (),
- scope_->peek_order (),
- p);
-
- inherits_ = sn;
- }
- catch (InheritancePredicate::IncompatibleType const& e)
- {
- cerr << "error: invalid inheritance specification" << endl;
-
- cerr << "inheritance of ";
- cerr << "home \'" << name_ <<"\' from "
- << e.type << " \'" << name << "\' is illegal" << endl;
- }
- catch (DeclarationTable::NameNotFound const&)
- {
- cerr << "error: invalid inheritance specification" << endl;
- cerr << "no home with name \'"
- << name << "\' visible from scope \'"
- << scope_->name () << "\'" << endl;
- }
- catch (DeclarationTable::PredicateNotMet const&)
- {
- cerr << "error: invalid inheritance specification" << endl;
- cerr << "no defined home with name \'"
- << name << "\' visible from scope \'"
- << scope_->name () << "\'" << endl;
- cerr << "inheritance from forward-declared home is illegal"
- << endl;
- }
- }
-
-
- virtual void
- supports (IdentifierPtr const& id)
- {
- if (trace_) cerr << "supports " << id << endl;
-
- using namespace SyntaxTree;
-
- Name name (id->lexeme ());
-
- struct SupportsPredicate :
- public DeclarationTable::ResolvePredicate
- {
- struct IncompatibleType :
- public DeclarationTable::ResolutionFailure
- {
- IncompatibleType (std::string const& t) : type (t) {}
- std::string type;
- };
-
- virtual bool
- test (DeclarationPtr const& d) const
- throw (IncompatibleType)
- {
- // Spec doesn't say anything about which interfaces
- // component can support.
- if (!d->is_a<UnconstrainedInterfaceDecl> ())
- {
- throw IncompatibleType (d->declaration_class ());
- }
-
- return d->dynamic_type<InterfaceDecl> ()->defined ();
- }
- } p;
-
- try
- {
- ScopedName sn = scope_->table ().resolve (
- name,
- scope_->name (),
- scope_->peek_order (),
- p);
-
- if (supports_.insert (sn).second == false)
- {
- cerr << "error: invalid support specification" << endl;
- cerr << "directly supporting interface \'"
- << sn << "\' more than once is illegal" << endl;
- }
- }
- catch (SupportsPredicate::IncompatibleType const& e)
- {
- cerr << "error: invalid support specification" << endl;
-
- cerr << "specifying " << e.type << " \'" << name
- << "\' in home\'s support clause is illegal"
- << endl;
- }
- catch (DeclarationTable::NameNotFound const&)
- {
- cerr << "error: invalid support specification" << endl;
- cerr << "no interface with name \'"
- << name << "\' visible from scope \'"
- << scope_->name () << "\'" << endl;
- }
- catch (DeclarationTable::PredicateNotMet const&)
- {
- cerr << "error: invalid support specification" << endl;
- cerr << "no defined interface with name \'"
- << name << "\' visible from scope \'"
- << scope_->name () << "\'" << endl;
- cerr << "supporting forward-declared interface is illegal"
- << endl;
- }
- }
-
-
- virtual void
- manages (IdentifierPtr const& id)
- {
- if (trace_) cerr << "manages " << id << endl;
-
- using namespace SyntaxTree;
-
- Name name (id->lexeme ());
-
- struct ManagesPredicate :
- public DeclarationTable::ResolvePredicate
- {
- struct IncompatibleType :
- public DeclarationTable::ResolutionFailure
- {
- IncompatibleType (std::string const& t) : type (t) {}
- std::string type;
- };
-
- virtual bool
- test (DeclarationPtr const& d) const
- throw (IncompatibleType)
- {
- if (!d->is_a<ComponentDecl> ())
- {
- throw IncompatibleType (d->declaration_class ());
- }
-
- return d->dynamic_type<ComponentDecl>()->defined ();
- }
- } p;
-
- try
- {
- ScopedName sn = scope_->table ().resolve (
- name,
- scope_->name (),
- scope_->peek_order (),
- p);
-
- manages_ = sn;
- }
- catch (ManagesPredicate::IncompatibleType const& e)
- {
- cerr << "error: invalid manages specification" << endl;
-
- cerr << "specifying " << e.type << " \'" << name
- << "\' in home manages clause is illegal" << endl;
- }
- catch (DeclarationTable::NameNotFound const&)
- {
- cerr << "error: invalid manages specification" << endl;
- cerr << "no component with name \'"
- << name << "\' visible from scope \'"
- << scope_->name () << "\'" << endl;
- }
- catch (DeclarationTable::PredicateNotMet const&)
- {
- cerr << "error: invalid manages specification" << endl;
- cerr << "no defined component with name \'"
- << name << "\' visible from scope \'"
- << scope_->name () << "\'" << endl;
- cerr << "managing of forward-declared component is illegal"
- << endl;
- }
- }
-
- virtual void
- open_scope ()
- {
- using namespace SyntaxTree;
-
- HomeDefPtr def (new HomeDef (
- name_,
- scope_,
- inherits_,
- supports_,
- manages_));
-
- if (inherits_ == ScopedName ("::"))
- {
- def = HomeDefPtr (new HomeDef (
- name_,
- scope_,
- supports_,
- manages_));
- }
- else
- {
- def = HomeDefPtr (new HomeDef (
- name_,
- scope_,
- inherits_,
- supports_,
- manages_));
- }
-
-
- scope_->insert (def);
- push (def);
- scope_ = def;
-
- name_ = SimpleName ("::"); //indicate that we are done
- inherits_ = ScopedName ("::");
- supports_.clear ();
- manages_ = ScopedName ("::");
- }
-
- virtual void
- close_scope ()
- {
- scope_ = scope_->scope ();
- }
-
- virtual void
- end ()
- {
- if (trace_) cerr << "end" << endl;
-
- using namespace SyntaxTree;
-
- if (name_ != SimpleName ("::"))
- {
- // this is not supported by spec yet
- }
- else
- {
- pop ();
- }
- }
- private:
- bool trace_;
- SyntaxTree::SimpleName name_;
- SyntaxTree::ScopedName inherits_;
- SyntaxTree::ScopedNameSet supports_;
- SyntaxTree::ScopedName manages_;
- };
- }
- }
- }
-}
-
-#endif // CCF_IDL3_SEMANTIC_ACTION_IMPL_HOME_HPP
diff --git a/TAO/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/HomeFactory.cpp b/TAO/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/HomeFactory.cpp
deleted file mode 100644
index a2868a48fce..00000000000
--- a/TAO/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/HomeFactory.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-// file : CCF/IDL3/SemanticAction/Impl/HomeFactory.cpp
-// author : Boris Kolpackov <boris@dre.vanderbilt.edu>
-// cvs-id : $Id$
-
-#include "CCF/IDL3/SemanticAction/Impl/HomeFactory.hpp"
-
-namespace CCF
-{
- namespace IDL3
- {
- namespace SemanticAction
- {
- namespace Impl
- {
- }
- }
- }
-}
-
diff --git a/TAO/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/HomeFactory.hpp b/TAO/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/HomeFactory.hpp
deleted file mode 100644
index 403c3477283..00000000000
--- a/TAO/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/HomeFactory.hpp
+++ /dev/null
@@ -1,127 +0,0 @@
-// file : CCF/IDL3/SemanticAction/Impl/HomeFactory.hpp
-// author : Boris Kolpackov <boris@dre.vanderbilt.edu>
-// cvs-id : $Id$
-
-#ifndef CCF_IDL3_SEMANTIC_ACTION_IMPL_HOME_FACTORY_HPP
-#define CCF_IDL3_SEMANTIC_ACTION_IMPL_HOME_FACTORY_HPP
-
-#include "CCF/IDL3/SemanticAction/HomeFactory.hpp"
-
-namespace CCF
-{
- namespace IDL3
- {
- namespace SemanticAction
- {
- namespace Impl
- {
- //
- //
- //
- class HomeFactory : public virtual SemanticAction::HomeFactory
- {
- public:
- virtual
- ~HomeFactory () throw ()
- {
- }
-
- HomeFactory (bool trace, SyntaxTree::ScopePtr& current)
- : trace_ (trace),
- scope_ (current)
- {
- }
-
- virtual void
- begin (SimpleIdentifierPtr const& id)
- {
- if (trace_) cerr << "home factory " << id << endl;
-
- using namespace SyntaxTree;
-
- HomeDefPtr home (scope_->dynamic_type<HomeDef> ());
-
- if (home == 0)
- {
- //@@ internal compiler error
- }
-
- ComponentDefPtr component (home->manages ());
-
- home_factory_ = HomeFactoryDeclPtr (
- new HomeFactoryDecl (SimpleName (id->lexeme ()),
- component->name (),
- scope_));
- }
-
- virtual void
- parameter (IdentifierPtr const& type_id,
- SimpleIdentifierPtr const& name_id)
- {
- if (trace_) cerr << "parameter " << type_id << " "
- << name_id << endl;
-
- using namespace IDL3::SyntaxTree;
-
- Name type_name (type_id->lexeme ());
-
- struct Predicate : public DeclarationTable::ResolvePredicate
- {
- virtual bool
- test (DeclarationPtr const& d) const throw ()
- {
- return d->is_a<TypeDecl> ();
- }
- } p;
-
- try
- {
- ScopedName sn = scope_->table ().resolve (
- type_name,
- scope_->name (),
- scope_->peek_order (),
- p);
-
- HomeFactoryParameterPtr p (
- new HomeFactoryParameter (sn,
- SimpleName (name_id->lexeme ()),
- scope_->table ()));
-
- home_factory_->insert (p);
- }
- catch (DeclarationTable::NameNotFound const&)
- {
- cerr << "error: invalid home factory declaration" << endl;
- cerr << "no type with name \'"
- << type_name << "\' visible from scope \'"
- << scope_->name () << "\'" << endl;
- }
- catch (DeclarationTable::PredicateNotMet const&)
- {
- cerr << "error: invalid home factory declaration" << endl;
- cerr << "declaration with name \'" << type_name
- << "\' visible from scope \'" << scope_->name ()
- << "\' is not a type declaration" << endl;
- cerr << "using non-type as home factory parameter type is illegal"
- << endl;
- }
- }
-
- virtual void
- end ()
- {
- if (trace_) cerr << "end" << endl;
- scope_->insert (home_factory_);
- home_factory_ = SyntaxTree::HomeFactoryDeclPtr ();
- }
- private:
- bool trace_;
- SyntaxTree::ScopePtr& scope_;
- SyntaxTree::HomeFactoryDeclPtr home_factory_;
- };
- }
- }
- }
-}
-
-#endif // CCF_IDL3_SEMANTIC_ACTION_IMPL_HOME_FACTORY_HPP
diff --git a/TAO/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Include.cpp b/TAO/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Include.cpp
deleted file mode 100644
index c205a3a6ada..00000000000
--- a/TAO/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Include.cpp
+++ /dev/null
@@ -1,18 +0,0 @@
-// file : CCF/IDL3/SemanticAction/Impl/Include.cpp
-// author : Boris Kolpackov <boris@dre.vanderbilt.edu>
-// cvs-id : $Id$
-
-#include "CCF/IDL3/SemanticAction/Impl/Include.hpp"
-
-namespace CCF
-{
- namespace IDL3
- {
- namespace SemanticAction
- {
- namespace Impl
- {
- }
- }
- }
-}
diff --git a/TAO/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Include.hpp b/TAO/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Include.hpp
deleted file mode 100644
index 0b9350358e8..00000000000
--- a/TAO/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Include.hpp
+++ /dev/null
@@ -1,361 +0,0 @@
-// file : CCF/IDL3/SemanticAction/Impl/Include.hpp
-// author : Boris Kolpackov <boris@dre.vanderbilt.edu>
-// cvs-id : $Id$
-
-#ifndef CCF_IDL3_SEMANTIC_ACTION_IMPL_INCLUDE_HPP
-#define CCF_IDL3_SEMANTIC_ACTION_IMPL_INCLUDE_HPP
-
-#include "CCF/IDL2/SemanticAction/Include.hpp"
-
-//@@ needed for include handling
-#include "CCF/CompilerElements/TokenStream.hpp"
-#include "CCF/CompilerElements/Preprocessor.hpp"
-
-namespace CCF
-{
- namespace IDL3
- {
- namespace SemanticAction
- {
- namespace Impl
- {
- // Note: overriding IDL2 include to allow inclusion of IDL3 files
- //
- //
- class IncludeImpl
- {
- protected:
- virtual
- ~IncludeImpl () throw () {}
-
- enum Type
- {
- system,
- user
- };
-
- IncludeImpl (bool trace,
- CompilerElements::Context& context,
- Diagnostic::Stream& dout,
- SemanticAction::Factory& action_factory,
- SyntaxTree::TranslationRegionPtr const& region,
- SyntaxTree::ScopePtr& scope,
- Type type)
- : trace_ (trace),
- context_ (context),
- dout_ (dout),
- action_factory_ (action_factory),
- scope_ (scope),
- type_ (type)
- {
- stack_.push (region);
- path_stack_.push (
- fs::normalize (
- fs::complete (context_.get<fs::path> ("file-path"))));
- }
-
- virtual void
- begin_impl (StringLiteralPtr const& sl)
- {
- std::string prefix;
-
- if (type_ == user)
- {
- prefix = std::string ("include") + " \"" + sl->lexeme () + "\"";
- }
- else
- {
- prefix = std::string ("include") + " <" + sl->lexeme () + ">";
- }
-
- if (trace_) cerr << prefix << endl;
-
- using namespace SyntaxTree;
-
- try
- {
- fs::ifstream ifs;
- ifs.exceptions (ios_base::badbit | ios_base::failbit);
-
- fs::path include_path (sl->lexeme ());
- fs::path complete_path (include_path);
-
- if (trace_) cerr << prefix << ": staring resolution." << endl;
-
- if (complete_path.is_complete ())
- {
- complete_path = fs::normalize (complete_path);
-
- if (handle_already_included (complete_path, sl)) return;
-
- ifs.open (complete_path, std::ios_base::in);
- }
- else
- {
- bool found (false);
-
- if (type_ == user)
- {
- fs::path rel_path (path_stack_.top ().branch_path ());
-
- complete_path = fs::normalize (rel_path / include_path);
-
- if (trace_) cerr << prefix << ": considering "
- << complete_path.string () << endl;
-
- if (fs::exists (complete_path))
- {
- if (handle_already_included (complete_path, sl)) return;
- ifs.open (complete_path, std::ios_base::in);
- found = true;
- }
- }
-
- if (!found)
- {
- typedef
- std::vector<fs::path>
- SearchPaths;
-
- SearchPaths const& search_paths (
- context_.get<SearchPaths> ("include-search-paths"));
-
- for (SearchPaths::const_iterator
- i (search_paths.begin ()),
- e (search_paths.end ()); i != e && !found; ++i)
- {
- complete_path = *i / include_path;
-
- if (!complete_path.is_complete ())
- {
- complete_path = complete (complete_path);
- }
-
- complete_path = fs::normalize (complete_path);
-
- if (trace_) cerr << prefix << ": considering "
- << complete_path.string () << endl;
-
- if (fs::exists (complete_path))
- {
- if (handle_already_included (complete_path, sl)) return;
- ifs.open (complete_path, std::ios_base::in);
- found = true;
- }
- }
-
- if (!found)
- {
- cerr << sl << ": error: file not found." << endl;
- return;
- }
- }
- }
-
- if (trace_) cerr << prefix << ": resolved to "
- << complete_path.string () << endl;
-
- //@@ for some reason ifs throws exception if I don't reset it
- // to original state. It probably has something to do with
- // call to get after eof.
- //
- ifs.exceptions (ios_base::iostate (0));
-
- TranslationRegionPtr r (new UserIncludeTranslationRegion (
- include_path,
- stack_.top ()->table (),
- stack_.top ()->create_order ()));
-
- stack_.top ()->insert (r);
-
- stack_.push (r);
- path_stack_.push (complete_path);
-
- context_.set ("file-path", stack_.top ()->file_path ());
-
- if (trace_) cerr << "push file scope: old scope "
- << scope_->order ();
-
- scope_ = stack_.top ()->scope ();
-
- if (trace_) cerr << "; new scope " << scope_->order () << endl;
-
- //@@ this code is highly experimental
- InputStreamAdapter isa (ifs);
- Preprocessor pp (isa);
- IDL3::LexicalAnalyzer lexer (pp);
-
- TokenList token_stream;
-
- //@@ bad token comparison
- for (TokenPtr token = lexer.next ();; token = lexer.next ())
- {
- token_stream.push_back (token);
- if (ReferenceCounting::strict_cast<EndOfStream> (token) != 0)
- break;
- }
-
- if (token_stream.size () > 1)
- {
- IDL3::Parser parser (context_, dout_, lexer, action_factory_);
-
- IDL2::Parsing::parse (token_stream.begin (),
- token_stream.end (),
- parser.start ());
- }
-
- if (trace_) cerr << "pop file scope: old scope "
- << scope_->order ();
-
- path_stack_.pop ();
- stack_.pop ();
-
- scope_ = stack_.top ()->scope ();
- context_.set ("file-path", stack_.top ()->file_path ());
-
- if (trace_) cerr << "; new scope " << scope_->order () << endl;
- }
- catch (fs::filesystem_error const&)
- {
- cerr << sl << ": error: unable to open in read mode" << endl;
- }
- catch (ios_base::failure const&)
- {
- cerr << sl << ": error: unable to open in read mode" << endl;
- }
- }
-
- virtual void
- end_impl ()
- {
- if (trace_) cerr << "end" << endl;
- }
-
- private:
-
- bool
- handle_already_included (fs::path const& path,
- StringLiteralPtr const& sl)
- {
- if(!include_file_set_.insert (path).second)
- {
- cerr << "warning: skipping already included file " << sl
- << endl;
- return true;
- }
- return false;
- }
-
- private:
- bool trace_;
- CompilerElements::Context& context_;
- Diagnostic::Stream& dout_;
- SemanticAction::Factory& action_factory_;
- SyntaxTree::ScopePtr& scope_;
- Type type_;
-
- std::stack<SyntaxTree::TranslationRegionPtr> stack_;
- std::stack<fs::path> path_stack_;
-
- struct FilePathComparator
- {
- bool operator () (fs::path const& x, fs::path const& y) const
- {
- return x.string () < y.string ();
- }
- };
-
- std::set<fs::path, FilePathComparator> include_file_set_;
- };
-
-
- //
- //
- //
- struct Include : virtual IDL2::SemanticAction::Include, IncludeImpl
- {
- virtual
- ~Include () throw ()
- {
- }
-
- Include (bool trace,
- CompilerElements::Context& context,
- Diagnostic::Stream& dout,
- SemanticAction::Factory& action_factory,
- SyntaxTree::TranslationRegionPtr const& region,
- SyntaxTree::ScopePtr& scope)
- : IncludeImpl (trace,
- context,
- dout,
- action_factory,
- region,
- scope,
- IncludeImpl::user)
- {
- }
-
- virtual void
- begin (StringLiteralPtr const& sl)
- {
- begin_impl (sl);
- }
-
- virtual void
- end ()
- {
- end_impl ();
- }
- };
-
- //
- //
- //
- struct SystemInclude : virtual IDL2::SemanticAction::SystemInclude,
- IncludeImpl
- {
- virtual
- ~SystemInclude () throw ()
- {
- }
-
- SystemInclude (bool trace,
- CompilerElements::Context& context,
- Diagnostic::Stream& dout,
- SemanticAction::Factory& action_factory,
- SyntaxTree::TranslationRegionPtr const& region,
- SyntaxTree::ScopePtr& scope)
- : IncludeImpl (trace,
- context,
- dout,
- action_factory,
- region,
- scope,
- IncludeImpl::system)
- {
- }
-
- virtual void
- begin (StringLiteralPtr const& sl)
- {
- //@@ This is a really dirty hack. Need to think of
- // a mechanism to address this issue.
- //
- if (sl->lexeme () != "Components.idl")
- {
- begin_impl (sl);
- }
- }
-
- virtual void
- end ()
- {
- end_impl ();
- }
- };
- }
- }
- }
-}
-
-#endif // CCF_IDL3_SEMANTIC_ACTION_IMPL_INCLUDE_HPP
diff --git a/TAO/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Provides.cpp b/TAO/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Provides.cpp
deleted file mode 100644
index 051532def28..00000000000
--- a/TAO/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Provides.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-// file : CCF/IDL3/SemanticAction/Impl/Provides.cpp
-// author : Boris Kolpackov <boris@dre.vanderbilt.edu>
-// cvs-id : $Id$
-
-#include "CCF/IDL3/SemanticAction/Impl/Provides.hpp"
-
-namespace CCF
-{
- namespace IDL3
- {
- namespace SemanticAction
- {
- namespace Impl
- {
- }
- }
- }
-}
-
diff --git a/TAO/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Provides.hpp b/TAO/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Provides.hpp
deleted file mode 100644
index bcc25a6f145..00000000000
--- a/TAO/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Provides.hpp
+++ /dev/null
@@ -1,107 +0,0 @@
-// file : CCF/IDL3/SemanticAction/Impl/Provides.hpp
-// author : Boris Kolpackov <boris@dre.vanderbilt.edu>
-// cvs-id : $Id$
-
-#ifndef CCF_IDL3_SEMANTIC_ACTION_IMPL_PROVIDES_HPP
-#define CCF_IDL3_SEMANTIC_ACTION_IMPL_PROVIDES_HPP
-
-#include "CCF/IDL3/SemanticAction/Provides.hpp"
-
-namespace CCF
-{
- namespace IDL3
- {
- namespace SemanticAction
- {
- namespace Impl
- {
- //
- //
- //
- class Provides : public virtual SemanticAction::Provides
- {
- public:
- virtual
- ~Provides () throw () {}
-
- Provides (bool trace, SyntaxTree::ScopePtr& current)
- : trace_ (trace),
- scope_ (current),
- type_ ("::") //@@ this is dirty
- {
- }
-
- virtual void
- type (IdentifierPtr const& id)
- {
- if (trace_) cerr << "provides " << id;
-
- using namespace SyntaxTree;
-
- Name name (id->lexeme ());
-
- struct Predicate : public DeclarationTable::ResolvePredicate
- {
- virtual bool
- test (DeclarationPtr const& d) const throw ()
- {
- return d->is_a<InterfaceDecl> ();
- }
- } p;
-
- try
- {
- ScopedName sn = scope_->table ().resolve (
- name,
- scope_->name (),
- scope_->peek_order (),
- p);
-
- type_ = sn;
- }
- catch (DeclarationTable::NameNotFound const&)
- {
- cerr << "error: invalid provides declaration" << endl;
- cerr << "no interface type with name \'"
- << name << "\' visible from scope \'"
- << scope_->name () << "\'" << endl;
- }
- catch (DeclarationTable::PredicateNotMet const&)
- {
- cerr << "error: invalid provides declaration" << endl;
- cerr << "declaration with name \'" << name
- << "\' visible from scope \'" << scope_->name ()
- << "\' is not an interface type declaration" << endl;
- cerr << "using non-<interface type> in provides "
- << "declaration is illegal" << endl;
- }
- }
-
- virtual void
- name (SimpleIdentifierPtr const& id)
- {
- if (trace_) cerr << " " << id << endl;
-
- using namespace SyntaxTree;
-
- SimpleName name (id->lexeme ());
-
- DeclarationPtr d (
- new SyntaxTree::ProvidesDecl (name, type_, scope_));
-
- scope_->insert (d);
-
- type_ = ScopedName ("::");
- }
-
- private:
- bool trace_;
- SyntaxTree::ScopePtr& scope_;
- SyntaxTree::ScopedName type_;
- };
- }
- }
- }
-}
-
-#endif // CCF_IDL3_SEMANTIC_ACTION_IMPL_PROVIDES_HPP
diff --git a/TAO/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Publishes.cpp b/TAO/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Publishes.cpp
deleted file mode 100644
index 57051f968ea..00000000000
--- a/TAO/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Publishes.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-// file : CCF/IDL3/SemanticAction/Impl/Publishes.cpp
-// author : Boris Kolpackov <boris@dre.vanderbilt.edu>
-// cvs-id : $Id$
-
-#include "CCF/IDL3/SemanticAction/Impl/Publishes.hpp"
-
-namespace CCF
-{
- namespace IDL3
- {
- namespace SemanticAction
- {
- namespace Impl
- {
- }
- }
- }
-}
-
diff --git a/TAO/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Publishes.hpp b/TAO/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Publishes.hpp
deleted file mode 100644
index 158f20a5fb7..00000000000
--- a/TAO/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Publishes.hpp
+++ /dev/null
@@ -1,107 +0,0 @@
-// file : CCF/IDL3/SemanticAction/Impl/Publishes.hpp
-// author : Boris Kolpackov <boris@dre.vanderbilt.edu>
-// cvs-id : $Id$
-
-#ifndef CCF_IDL3_SEMANTIC_ACTION_IMPL_PUBLISHES_HPP
-#define CCF_IDL3_SEMANTIC_ACTION_IMPL_PUBLISHES_HPP
-
-#include "CCF/IDL3/SemanticAction/Publishes.hpp"
-
-namespace CCF
-{
- namespace IDL3
- {
- namespace SemanticAction
- {
- namespace Impl
- {
- //
- //
- //
- class Publishes : public virtual SemanticAction::Publishes
- {
- public:
- virtual
- ~Publishes () throw () {}
-
- Publishes (bool trace, SyntaxTree::ScopePtr& current)
- : trace_ (trace),
- scope_ (current),
- type_ ("::") //@@ this is dirty
- {
- }
-
- virtual void
- type (IdentifierPtr const& id)
- {
- if (trace_) cerr << "publishes " << id;
-
- using namespace SyntaxTree;
-
- Name name (id->lexeme ());
-
- struct Predicate : public DeclarationTable::ResolvePredicate
- {
- virtual bool
- test (DeclarationPtr const& d) const throw ()
- {
- return d->is_a<EventTypeDef> ();
- }
- } p;
-
- try
- {
- ScopedName sn = scope_->table ().resolve (
- name,
- scope_->name (),
- scope_->peek_order (),
- p);
-
- type_ = sn;
- }
- catch (DeclarationTable::NameNotFound const&)
- {
- cerr << "error: invalid publishes declaration" << endl;
- cerr << "no event type with name \'"
- << name << "\' visible from scope \'"
- << scope_->name () << "\'" << endl;
- }
- catch (DeclarationTable::PredicateNotMet const&)
- {
- cerr << "error: invalid publishes declaration" << endl;
- cerr << "declaration with name \'" << name
- << "\' visible from scope \'" << scope_->name ()
- << "\' is not a defined event type" << endl;
- cerr << "using non-<defined event type> in publishes "
- << "declaration is illegal" << endl;
- }
- }
-
- virtual void
- name (SimpleIdentifierPtr const& id)
- {
- if (trace_) cerr << " " << id << endl;
-
- using namespace SyntaxTree;
-
- SimpleName name (id->lexeme ());
-
- DeclarationPtr d (
- new SyntaxTree::PublishesDecl (name, type_, scope_));
-
- scope_->insert (d);
-
- type_ = ScopedName ("::");
- }
-
- private:
- bool trace_;
- SyntaxTree::ScopePtr& scope_;
- SyntaxTree::ScopedName type_;
- };
- }
- }
- }
-}
-
-#endif // CCF_IDL3_SEMANTIC_ACTION_IMPL_PUBLISHES_HPP
diff --git a/TAO/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Uses.cpp b/TAO/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Uses.cpp
deleted file mode 100644
index d4f523744a8..00000000000
--- a/TAO/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Uses.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-// file : CCF/IDL3/SemanticAction/Impl/Uses.cpp
-// author : Boris Kolpackov <boris@dre.vanderbilt.edu>
-// cvs-id : $Id$
-
-#include "CCF/IDL3/SemanticAction/Impl/Uses.hpp"
-
-namespace CCF
-{
- namespace IDL3
- {
- namespace SemanticAction
- {
- namespace Impl
- {
- }
- }
- }
-}
-
diff --git a/TAO/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Uses.hpp b/TAO/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Uses.hpp
deleted file mode 100644
index b2093734f92..00000000000
--- a/TAO/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Uses.hpp
+++ /dev/null
@@ -1,107 +0,0 @@
-// file : CCF/IDL3/SemanticAction/Impl/Uses.hpp
-// author : Boris Kolpackov <boris@dre.vanderbilt.edu>
-// cvs-id : $Id$
-
-#ifndef CCF_IDL3_SEMANTIC_ACTION_IMPL_USES_HPP
-#define CCF_IDL3_SEMANTIC_ACTION_IMPL_USES_HPP
-
-#include "CCF/IDL3/SemanticAction/Uses.hpp"
-
-namespace CCF
-{
- namespace IDL3
- {
- namespace SemanticAction
- {
- namespace Impl
- {
- //
- //
- //
- class Uses : public virtual SemanticAction::Uses
- {
- public:
- virtual
- ~Uses () throw () {}
-
- Uses (bool trace, SyntaxTree::ScopePtr& current)
- : trace_ (trace),
- scope_ (current),
- type_ ("::") //@@ this is dirty
- {
- }
-
- virtual void
- type (IdentifierPtr const& id)
- {
- if (trace_) cerr << "uses " << id;
-
- using namespace SyntaxTree;
-
- Name name (id->lexeme ());
-
- struct Predicate : public DeclarationTable::ResolvePredicate
- {
- virtual bool
- test (DeclarationPtr const& d) const throw ()
- {
- return d->is_a<InterfaceDecl> ();
- }
- } p;
-
- try
- {
- ScopedName sn = scope_->table ().resolve (
- name,
- scope_->name (),
- scope_->peek_order (),
- p);
-
- type_ = sn;
- }
- catch (DeclarationTable::NameNotFound const&)
- {
- cerr << "error: invalid uses declaration" << endl;
- cerr << "no interface type with name \'"
- << name << "\' visible from scope \'"
- << scope_->name () << "\'" << endl;
- }
- catch (DeclarationTable::PredicateNotMet const&)
- {
- cerr << "error: invalid uses declaration" << endl;
- cerr << "declaration with name \'" << name
- << "\' visible from scope \'" << scope_->name ()
- << "\' is not an interface type declaration" << endl;
- cerr << "using non-<interface type> in uses "
- << "declaration is illegal" << endl;
- }
- }
-
- virtual void
- name (SimpleIdentifierPtr const& id)
- {
- if (trace_) cerr << " " << id << endl;
-
- using namespace SyntaxTree;
-
- SimpleName name (id->lexeme ());
-
- DeclarationPtr d (
- new SyntaxTree::UsesDecl (name, type_, scope_));
-
- scope_->insert (d);
-
- type_ = ScopedName ("::");
- }
-
- private:
- bool trace_;
- SyntaxTree::ScopePtr& scope_;
- SyntaxTree::ScopedName type_;
- };
- }
- }
- }
-}
-
-#endif // CCF_IDL3_SEMANTIC_ACTION_IMPL_USES_HPP