summaryrefslogtreecommitdiff
path: root/modules/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Module.cpp
diff options
context:
space:
mode:
authorjai <jai@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2007-01-29 21:15:18 +0000
committerjai <jai@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2007-01-29 21:15:18 +0000
commitb71531b42b3325fd6079a7039aae8641262c8adf (patch)
treea5b9aa16924c541fcb424ee9460b1ac7f5a89352 /modules/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Module.cpp
parenta0f67cc97c0050d907145e312135b60c0125e56e (diff)
downloadATCD-DS-main.tar.gz
branching/taggingDS-main
Diffstat (limited to 'modules/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Module.cpp')
-rw-r--r--modules/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Module.cpp65
1 files changed, 65 insertions, 0 deletions
diff --git a/modules/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Module.cpp b/modules/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Module.cpp
new file mode 100644
index 00000000000..b2b003d6d73
--- /dev/null
+++ b/modules/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Module.cpp
@@ -0,0 +1,65 @@
+// file : CCF/IDL2/SemanticAction/Impl/Module.cpp
+// author : Boris Kolpackov <boris@dre.vanderbilt.edu>
+// cvs-id : $Id$
+
+#include "CCF/IDL2/SemanticAction/Impl/Module.hpp"
+
+#include <iostream>
+
+using std::cerr;
+using std::endl;
+
+namespace CCF
+{
+ namespace IDL2
+ {
+ namespace SemanticAction
+ {
+ namespace Impl
+ {
+ using namespace SemanticGraph;
+
+ Module::
+ Module (Context& c)
+ : ScopeBase<SemanticGraph::Module> (c)
+ {
+ }
+
+ void Module::
+ begin (SimpleIdentifierPtr const& id)
+ {
+ if (ctx.trace ()) cerr << "module " << id << endl;
+
+ now (ctx.tu ().new_node<SemanticGraph::Module> (
+ ctx.file (), id->line ()));
+
+ ctx.tu ().new_edge<Defines> (ctx.scope (), now (), id->lexeme ());
+ }
+
+ void Module::
+ open_scope ()
+ {
+ if (ctx.trace ()) cerr << "scope open" << endl;
+
+ push (ctx.scope ());
+ ctx.scope (now ());
+ }
+
+ void Module::
+ close_scope ()
+ {
+ ctx.scope (top ());
+ pop ();
+
+ if (ctx.trace ()) cerr << "scope close" << endl;
+ }
+
+ void Module::
+ end ()
+ {
+ if (ctx.trace ()) cerr << "end" << endl;
+ }
+ }
+ }
+ }
+}