summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorboris <boris@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2006-09-22 10:02:37 +0000
committerboris <boris@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2006-09-22 10:02:37 +0000
commite06f958bece14d22aff9c8e0ac1b6a0989157c0e (patch)
tree1623b7ba65a68be6e91410e4c5448ebe6e127375
parent21e9f55c0166c3583ba4c128f05cfe3ac0099072 (diff)
downloadATCD-e06f958bece14d22aff9c8e0ac1b6a0989157c0e.tar.gz
ChangeLogTag: Fri Sep 22 09:27:25 UTC 2006 Boris Kolpackov <boris@codesynthesis.com>
-rw-r--r--CIAO/CCF/CCF/CIDL/SemanticAction/Impl/Composition.cpp12
-rw-r--r--CIAO/CCF/CCF/CIDL/SemanticAction/Impl/HomeExecutor.cpp22
-rw-r--r--CIAO/CCF/CCF/CIDL/SemanticGraph/Composition.cpp5
-rw-r--r--CIAO/CCF/CCF/CIDL/SemanticGraph/Composition.hpp17
-rw-r--r--CIAO/CCF/CCF/CIDL/SemanticGraph/Executor.cpp5
-rw-r--r--CIAO/CCF/CCF/CIDL/SemanticGraph/Executor.hpp11
-rw-r--r--CIAO/CCF/CCF/IDL2/Parser.cpp93
-rw-r--r--CIAO/CCF/CCF/IDL2/Parser.hpp7
-rw-r--r--CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Attribute.cpp44
-rw-r--r--CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Const.cpp19
-rw-r--r--CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Elements.hpp20
-rw-r--r--CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Enum.cpp10
-rw-r--r--CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Exception.cpp8
-rw-r--r--CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Factory.cpp68
-rw-r--r--CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Factory.hpp6
-rw-r--r--CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Include.cpp2
-rw-r--r--CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Interface.cpp37
-rw-r--r--CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Member.cpp19
-rw-r--r--CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Module.cpp4
-rw-r--r--CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Native.cpp3
-rw-r--r--CIAO/CCF/CCF/IDL2/SemanticAction/Impl/NumericExpression.cpp47
-rw-r--r--CIAO/CCF/CCF/IDL2/SemanticAction/Impl/NumericExpression.hpp4
-rw-r--r--CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Operation.cpp109
-rw-r--r--CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Operation.hpp1
-rw-r--r--CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Struct.cpp6
-rw-r--r--CIAO/CCF/CCF/IDL2/SemanticAction/Impl/TypeId.cpp30
-rw-r--r--CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Typedef.cpp83
-rw-r--r--CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Typedef.hpp4
-rw-r--r--CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Union.cpp34
-rw-r--r--CIAO/CCF/CCF/IDL2/SemanticAction/Impl/ValueType.cpp62
-rw-r--r--CIAO/CCF/CCF/IDL2/SemanticAction/Impl/ValueTypeFactory.cpp35
-rw-r--r--CIAO/CCF/CCF/IDL2/SemanticAction/Impl/ValueTypeMember.cpp31
-rw-r--r--CIAO/CCF/CCF/IDL2/SemanticAction/NumericExpression.hpp3
-rw-r--r--CIAO/CCF/CCF/IDL2/SemanticAction/Typedef.hpp3
-rw-r--r--CIAO/CCF/CCF/IDL2/SemanticGraph/Array.hpp3
-rw-r--r--CIAO/CCF/CCF/IDL2/SemanticGraph/Attribute.cpp5
-rw-r--r--CIAO/CCF/CCF/IDL2/SemanticGraph/Attribute.hpp16
-rw-r--r--CIAO/CCF/CCF/IDL2/SemanticGraph/Elements.cpp58
-rw-r--r--CIAO/CCF/CCF/IDL2/SemanticGraph/Elements.hpp74
-rw-r--r--CIAO/CCF/CCF/IDL2/SemanticGraph/Enum.hpp6
-rw-r--r--CIAO/CCF/CCF/IDL2/SemanticGraph/Exception.hpp3
-rw-r--r--CIAO/CCF/CCF/IDL2/SemanticGraph/Fundamental.cpp5
-rw-r--r--CIAO/CCF/CCF/IDL2/SemanticGraph/Fundamental.cpp.m45
-rw-r--r--CIAO/CCF/CCF/IDL2/SemanticGraph/Fundamental.hpp62
-rw-r--r--CIAO/CCF/CCF/IDL2/SemanticGraph/Fundamental.hpp.m48
-rw-r--r--CIAO/CCF/CCF/IDL2/SemanticGraph/Graph.hpp12
-rw-r--r--CIAO/CCF/CCF/IDL2/SemanticGraph/Graph.tpp24
-rw-r--r--CIAO/CCF/CCF/IDL2/SemanticGraph/IntExpression.cpp4
-rw-r--r--CIAO/CCF/CCF/IDL2/SemanticGraph/IntExpression.hpp82
-rw-r--r--CIAO/CCF/CCF/IDL2/SemanticGraph/Interface.cpp4
-rw-r--r--CIAO/CCF/CCF/IDL2/SemanticGraph/Interface.hpp14
-rw-r--r--CIAO/CCF/CCF/IDL2/SemanticGraph/Literals.cpp15
-rw-r--r--CIAO/CCF/CCF/IDL2/SemanticGraph/Literals.hpp6
-rw-r--r--CIAO/CCF/CCF/IDL2/SemanticGraph/Member.hpp3
-rw-r--r--CIAO/CCF/CCF/IDL2/SemanticGraph/Module.hpp3
-rw-r--r--CIAO/CCF/CCF/IDL2/SemanticGraph/Name.cpp57
-rw-r--r--CIAO/CCF/CCF/IDL2/SemanticGraph/Name.hpp26
-rw-r--r--CIAO/CCF/CCF/IDL2/SemanticGraph/Native.hpp3
-rw-r--r--CIAO/CCF/CCF/IDL2/SemanticGraph/Operation.cpp10
-rw-r--r--CIAO/CCF/CCF/IDL2/SemanticGraph/Operation.hpp35
-rw-r--r--CIAO/CCF/CCF/IDL2/SemanticGraph/Sequence.cpp56
-rw-r--r--CIAO/CCF/CCF/IDL2/SemanticGraph/Sequence.hpp11
-rw-r--r--CIAO/CCF/CCF/IDL2/SemanticGraph/String.cpp51
-rw-r--r--CIAO/CCF/CCF/IDL2/SemanticGraph/String.hpp6
-rw-r--r--CIAO/CCF/CCF/IDL2/SemanticGraph/Struct.hpp3
-rw-r--r--CIAO/CCF/CCF/IDL2/SemanticGraph/Translation.hpp21
-rw-r--r--CIAO/CCF/CCF/IDL2/SemanticGraph/TypeId.hpp16
-rw-r--r--CIAO/CCF/CCF/IDL2/SemanticGraph/Union.cpp4
-rw-r--r--CIAO/CCF/CCF/IDL2/SemanticGraph/Union.hpp17
-rw-r--r--CIAO/CCF/CCF/IDL2/SemanticGraph/ValueType.cpp4
-rw-r--r--CIAO/CCF/CCF/IDL2/SemanticGraph/ValueType.hpp14
-rw-r--r--CIAO/CCF/CCF/IDL2/SemanticGraph/ValueTypeMember.cpp5
-rw-r--r--CIAO/CCF/CCF/IDL2/SemanticGraph/ValueTypeMember.hpp11
-rw-r--r--CIAO/CCF/CCF/IDL2/Token.hpp14
-rw-r--r--CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Component.cpp41
-rw-r--r--CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Consumes.cpp16
-rw-r--r--CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Emits.cpp16
-rw-r--r--CIAO/CCF/CCF/IDL3/SemanticAction/Impl/EventType.cpp71
-rw-r--r--CIAO/CCF/CCF/IDL3/SemanticAction/Impl/EventTypeFactory.cpp35
-rw-r--r--CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Factory.cpp2
-rw-r--r--CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Home.cpp54
-rw-r--r--CIAO/CCF/CCF/IDL3/SemanticAction/Impl/HomeFactory.cpp35
-rw-r--r--CIAO/CCF/CCF/IDL3/SemanticAction/Impl/HomeFinder.cpp35
-rw-r--r--CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Include.cpp35
-rw-r--r--CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Include.hpp2
-rw-r--r--CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Provides.cpp17
-rw-r--r--CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Publishes.cpp17
-rw-r--r--CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Uses.cpp19
-rw-r--r--CIAO/CCF/CCF/IDL3/SemanticGraph/Component.cpp5
-rw-r--r--CIAO/CCF/CCF/IDL3/SemanticGraph/Component.hpp27
-rw-r--r--CIAO/CCF/CCF/IDL3/SemanticGraph/EventType.cpp5
-rw-r--r--CIAO/CCF/CCF/IDL3/SemanticGraph/EventType.hpp16
-rw-r--r--CIAO/CCF/CCF/IDL3/SemanticGraph/Home.hpp10
-rw-r--r--CIAO/CIDLC/cidlc.cpp4
-rw-r--r--CIAO/ChangeLog144
95 files changed, 1604 insertions, 642 deletions
diff --git a/CIAO/CCF/CCF/CIDL/SemanticAction/Impl/Composition.cpp b/CIAO/CCF/CCF/CIDL/SemanticAction/Impl/Composition.cpp
index 30f64912eaa..a39a801cd15 100644
--- a/CIAO/CCF/CCF/CIDL/SemanticAction/Impl/Composition.cpp
+++ b/CIAO/CCF/CCF/CIDL/SemanticAction/Impl/Composition.cpp
@@ -32,19 +32,23 @@ namespace CCF
if(c == Category::entity)
{
- now (ctx.tu ().new_node<EntityComposition> ());
+ now (ctx.tu ().new_node<EntityComposition> (
+ ctx.file (), id->line ()));
}
else if (c == Category::process)
{
- now (ctx.tu ().new_node<ProcessComposition> ());
+ now (ctx.tu ().new_node<ProcessComposition> (
+ ctx.file (), id->line ()));
}
else if (c == Category::service)
{
- now (ctx.tu ().new_node<ServiceComposition> ());
+ now (ctx.tu ().new_node<ServiceComposition> (
+ ctx.file (), id->line ()));
}
else
{
- now (ctx.tu ().new_node<SessionComposition> ());
+ now (ctx.tu ().new_node<SessionComposition> (
+ ctx.file (), id->line ()));
}
ctx.tu ().new_edge<Defines> (ctx.scope (), now (), id->lexeme ());
diff --git a/CIAO/CCF/CCF/CIDL/SemanticAction/Impl/HomeExecutor.cpp b/CIAO/CCF/CCF/CIDL/SemanticAction/Impl/HomeExecutor.cpp
index bd6754b10e9..acbb6e9f5e0 100644
--- a/CIAO/CCF/CCF/CIDL/SemanticAction/Impl/HomeExecutor.cpp
+++ b/CIAO/CCF/CCF/CIDL/SemanticAction/Impl/HomeExecutor.cpp
@@ -31,7 +31,8 @@ namespace CCF
if (ctx.trace ()) cerr << "home executor " << id << endl;
id_ = id;
- he_ = &ctx.tu ().new_node<SemanticGraph::HomeExecutor> ();
+ he_ = &ctx.tu ().new_node<SemanticGraph::HomeExecutor> (
+ ctx.file (), id->line ());
}
void HomeExecutor::
@@ -58,24 +59,30 @@ namespace CCF
}
catch (Resolve const&)
{
- cerr << "error: invalid implements specification" << endl;
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "invalid implements specification" << endl;
throw;
}
}
catch (NotFound const&)
{
- cerr << "no home with name \'" << name
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "no home with name \'" << name
<< "\' visible from scope \'" << from << "\'" << endl;
}
catch (WrongType const&)
{
- cerr << "incompatible type in implements specification" << endl;
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "incompatible type in implements specification" << endl;
}
catch (NotDefined const& e)
{
- cerr << "attempt to implement forward-declared home "
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "attempt to implement forward-declared home "
<< e.name () << endl;
- cerr << "implementation of forward-declared home is illegal"
+
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "implementation of forward-declared home is illegal"
<< endl;
}
}
@@ -88,7 +95,8 @@ namespace CCF
if (c_ != 0)
{
SemanticGraph::ComponentExecutor& ce (
- ctx.tu ().new_node<SemanticGraph::ComponentExecutor> ());
+ ctx.tu ().new_node<SemanticGraph::ComponentExecutor> (
+ ctx.file (), id->line ()));
ctx.tu ().new_edge<Implements> (ce, *c_);
diff --git a/CIAO/CCF/CCF/CIDL/SemanticGraph/Composition.cpp b/CIAO/CCF/CCF/CIDL/SemanticGraph/Composition.cpp
index 61cd626d02a..429699d1b5d 100644
--- a/CIAO/CCF/CCF/CIDL/SemanticGraph/Composition.cpp
+++ b/CIAO/CCF/CCF/CIDL/SemanticGraph/Composition.cpp
@@ -33,6 +33,11 @@ namespace CCF
TypeInfo const& Composition::
static_type_info () { return composition_; }
+ Composition::
+ ~Composition ()
+ {
+ }
+
// EntityComposition
//
diff --git a/CIAO/CCF/CCF/CIDL/SemanticGraph/Composition.hpp b/CIAO/CCF/CCF/CIDL/SemanticGraph/Composition.hpp
index 62b1e3afa7f..663029580da 100644
--- a/CIAO/CCF/CCF/CIDL/SemanticGraph/Composition.hpp
+++ b/CIAO/CCF/CCF/CIDL/SemanticGraph/Composition.hpp
@@ -22,10 +22,13 @@ namespace CCF
protected:
friend class Graph<Node, Edge>;
- Composition ()
+ Composition () // Only for virtual inheritance.
{
type_info (static_type_info ());
}
+
+ virtual
+ ~Composition () = 0;
};
class EntityComposition : public virtual Composition
@@ -37,7 +40,8 @@ namespace CCF
protected:
friend class Graph<Node, Edge>;
- EntityComposition ()
+ EntityComposition (Path const& path, unsigned long line)
+ : Node (path, line)
{
type_info (static_type_info ());
}
@@ -52,7 +56,8 @@ namespace CCF
protected:
friend class Graph<Node, Edge>;
- ProcessComposition ()
+ ProcessComposition (Path const& path, unsigned long line)
+ : Node (path, line)
{
type_info (static_type_info ());
}
@@ -68,7 +73,8 @@ namespace CCF
protected:
friend class Graph<Node, Edge>;
- ServiceComposition ()
+ ServiceComposition (Path const& path, unsigned long line)
+ : Node (path, line)
{
type_info (static_type_info ());
}
@@ -84,7 +90,8 @@ namespace CCF
protected:
friend class Graph<Node, Edge>;
- SessionComposition ()
+ SessionComposition (Path const& path, unsigned long line)
+ : Node (path, line)
{
type_info (static_type_info ());
}
diff --git a/CIAO/CCF/CCF/CIDL/SemanticGraph/Executor.cpp b/CIAO/CCF/CCF/CIDL/SemanticGraph/Executor.cpp
index f464f0272be..9a4214bcd0e 100644
--- a/CIAO/CCF/CCF/CIDL/SemanticGraph/Executor.cpp
+++ b/CIAO/CCF/CCF/CIDL/SemanticGraph/Executor.cpp
@@ -32,6 +32,11 @@ namespace CCF
TypeInfo const& Executor::
static_type_info () { return executor_; }
+ Executor::
+ ~Executor ()
+ {
+ }
+
// ComponentExecutor
//
diff --git a/CIAO/CCF/CCF/CIDL/SemanticGraph/Executor.hpp b/CIAO/CCF/CCF/CIDL/SemanticGraph/Executor.hpp
index 55f0fa0919c..378638b2187 100644
--- a/CIAO/CCF/CCF/CIDL/SemanticGraph/Executor.hpp
+++ b/CIAO/CCF/CCF/CIDL/SemanticGraph/Executor.hpp
@@ -39,11 +39,14 @@ namespace CCF
protected:
friend class Graph<Node, Edge>;
- Executor ()
+ Executor () // For virtual inheritance only.
{
type_info (static_type_info ());
}
+ virtual
+ ~Executor () = 0;
+
void
add_edge_left (Implements& e)
{
@@ -67,7 +70,8 @@ namespace CCF
protected:
friend class Graph<Node, Edge>;
- ComponentExecutor ()
+ ComponentExecutor (Path const& path, unsigned long line)
+ : Node (path, line)
{
type_info (static_type_info ());
}
@@ -93,7 +97,8 @@ namespace CCF
protected:
friend class Graph<Node, Edge>;
- HomeExecutor ()
+ HomeExecutor (Path const& path, unsigned long line)
+ : Node (path, line)
{
type_info (static_type_info ());
}
diff --git a/CIAO/CCF/CCF/IDL2/Parser.cpp b/CIAO/CCF/CCF/IDL2/Parser.cpp
index bfc725d4d36..50f6a2e6071 100644
--- a/CIAO/CCF/CCF/IDL2/Parser.cpp
+++ b/CIAO/CCF/CCF/IDL2/Parser.cpp
@@ -157,6 +157,10 @@ namespace CCF
f.numeric_expression (),
&SemanticAction::NumericExpression::integer_literal),
+ act_numeric_expression_pre (
+ f.numeric_expression (),
+ &SemanticAction::NumericExpression::pre),
+
act_numeric_expression_pos (
f.numeric_expression (),
&SemanticAction::NumericExpression::pos),
@@ -353,6 +357,9 @@ namespace CCF
// Typedef
//
//
+ act_typedef_pre (
+ f.typedef_ (), &SemanticAction::Typedef::pre),
+
act_typedef_begin (
f.typedef_ (), &SemanticAction::Typedef::begin),
@@ -492,9 +499,23 @@ namespace CCF
language =
guard
(
- *import >> +declaration >> EOS
-
- )[root_error_handler]
+ guard
+ (
+ assertion ("declaration or include directive expected",
+ RecoveryMethod::STANDARD,
+ DiagnosticType::BEFORE)
+ (
+ (+import >> *declaration)
+ | +declaration
+ )
+ >> assertion ("declaration or include directive expected",
+ RecoveryMethod::STANDARD,
+ DiagnosticType::BEFORE)
+ (
+ EOS
+ )
+ )[error_handler]
+ )[root_error_handler] // Stops bailing out (rethrowing).
;
@@ -669,50 +690,88 @@ namespace CCF
numeric_or_expr =
numeric_xor_expr
- >> *(OR >> numeric_xor_expr)[act_numeric_expression_or]
+ >> *(
+ OR[act_numeric_expression_pre]
+ >> numeric_xor_expr
+ )[act_numeric_expression_or]
;
numeric_xor_expr =
numeric_and_expr
- >> *(XOR >> numeric_and_expr)[act_numeric_expression_xor]
+ >> *(
+ XOR[act_numeric_expression_pre]
+ >> numeric_and_expr
+ )[act_numeric_expression_xor]
;
numeric_and_expr =
numeric_shift_expr
- >> *(AND >> numeric_shift_expr)[act_numeric_expression_and]
+ >> *(
+ AND[act_numeric_expression_pre]
+ >> numeric_shift_expr
+ )[act_numeric_expression_and]
;
numeric_shift_expr =
numeric_add_expr
>> *(
- (RSH >> numeric_add_expr)[act_numeric_expression_rsh]
- | (LSH >> numeric_add_expr)[act_numeric_expression_lsh]
+ (
+ RSH[act_numeric_expression_pre]
+ >> numeric_add_expr
+ )[act_numeric_expression_rsh]
+ |
+ (
+ LSH[act_numeric_expression_pre]
+ >> numeric_add_expr
+ )[act_numeric_expression_lsh]
)
;
numeric_add_expr =
numeric_mul_expr
>> *(
- (ADD >> numeric_mul_expr)[act_numeric_expression_add]
- | (SUB >> numeric_mul_expr)[act_numeric_expression_sub]
+ ( ADD[act_numeric_expression_pre]
+ >> numeric_mul_expr
+ )[act_numeric_expression_add]
+
+ |
+ ( SUB[act_numeric_expression_pre]
+ >> numeric_mul_expr
+ )[act_numeric_expression_sub]
)
;
numeric_mul_expr =
numeric_unary_expr
>> *(
- (MUL >> numeric_unary_expr)[act_numeric_expression_mul]
- | (DIV >> numeric_unary_expr)[act_numeric_expression_div]
- | (REM >> numeric_unary_expr)[act_numeric_expression_rem]
+ ( MUL[act_numeric_expression_pre]
+ >> numeric_unary_expr
+ )[act_numeric_expression_mul]
+
+ |
+ ( DIV[act_numeric_expression_pre]
+ >> numeric_unary_expr
+ )[act_numeric_expression_div]
+
+ |
+ ( REM[act_numeric_expression_pre]
+ >> numeric_unary_expr
+ )[act_numeric_expression_rem]
)
;
numeric_unary_expr =
numeric_primary_expr
- | ADD >> numeric_primary_expr[act_numeric_expression_pos]
- | SUB >> numeric_primary_expr[act_numeric_expression_neg]
- | COM >> numeric_primary_expr[act_numeric_expression_com]
+
+ | ADD[act_numeric_expression_pre]
+ >> numeric_primary_expr[act_numeric_expression_pos]
+
+ | SUB[act_numeric_expression_pre]
+ >> numeric_primary_expr[act_numeric_expression_neg]
+
+ | COM[act_numeric_expression_pre]
+ >> numeric_primary_expr[act_numeric_expression_com]
;
numeric_primary_expr =
@@ -1146,7 +1205,7 @@ namespace CCF
//
typedef_decl =
- TYPEDEF
+ TYPEDEF[act_typedef_pre]
>> typedef_type_spec
>> typedef_declarator
>> *(COMMA >> typedef_declarator)
diff --git a/CIAO/CCF/CCF/IDL2/Parser.hpp b/CIAO/CCF/CCF/IDL2/Parser.hpp
index b0e307024c5..f614c2e998b 100644
--- a/CIAO/CCF/CCF/IDL2/Parser.hpp
+++ b/CIAO/CCF/CCF/IDL2/Parser.hpp
@@ -204,6 +204,7 @@ namespace CCF
Diagnostic::Error rec (
context_.get<fs::path> ("file-path").native_file_string (),
(*i)->line ());
+
rec << "after \'" << (*i)->lexeme () << "\': "
<< "unable to recover from previous error: bailing out";
@@ -560,6 +561,9 @@ namespace CCF
OneArgAction<IntegerLiteralPtr, SemanticAction::NumericExpression>
act_numeric_expression_integer_literal;
+ OneArgAction<OperatorPtr, SemanticAction::NumericExpression>
+ act_numeric_expression_pre;
+
NoArgAction<SemanticAction::NumericExpression>
act_numeric_expression_pos,
act_numeric_expression_neg,
@@ -730,6 +734,9 @@ namespace CCF
// Typedef
//
//
+ OneArgAction<KeywordPtr, SemanticAction::Typedef>
+ act_typedef_pre;
+
OneArgAction<IdentifierPtr, SemanticAction::Typedef>
act_typedef_begin;
diff --git a/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Attribute.cpp b/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Attribute.cpp
index dcffba1dc92..dde00c85988 100644
--- a/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Attribute.cpp
+++ b/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Attribute.cpp
@@ -61,25 +61,29 @@ namespace CCF
}
catch (Resolve const&)
{
- cerr << "error: invalid attribute declaration" << endl;
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "invalid attribute declaration" << endl;
throw;
}
}
catch (NotFound const&)
{
- cerr << "no type with name \'" << name
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "no type with name \'" << name
<< "\' visible from scope \'" << from << "\'" << endl;
}
catch (WrongType const&)
{
- cerr << "declaration with name \'" << name
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "declaration with name \'" << name
<< "\' visible from scope \'" << from
<< "\' is not a type declaration" << endl;
cerr << "using non-type as an attribute type is illegal" << endl;
}
catch (NotComplete const& e)
{
- cerr << "type \'" << e.name () << "\' is not complete" << endl;
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "type \'" << e.name () << "\' is not complete" << endl;
}
}
@@ -91,9 +95,11 @@ namespace CCF
if (type_ != 0)
{
if (readonly_)
- a_ = &ctx.tu ().new_node<ReadAttribute> ();
+ a_ = &ctx.tu ().new_node<ReadAttribute> (
+ ctx.file (), id->line ());
else
- a_ = &ctx.tu ().new_node<ReadWriteAttribute> ();
+ a_ = &ctx.tu ().new_node<ReadWriteAttribute> (
+ ctx.file (), id->line ());
ctx.tu ().new_edge<Belongs> (*a_, *type_);
ctx.tu ().new_edge<Defines> (ctx.scope (), *a_, id->lexeme ());
@@ -120,21 +126,26 @@ namespace CCF
}
catch (Resolve const&)
{
- cerr << "error: invalid raises declaration" << endl;
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "invalid raises declaration" << endl;
throw;
}
}
catch (NotFound const&)
{
- cerr << "no exception with name \'" << name
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "no exception with name \'" << name
<< "\' visible from scope \'" << from << "\'" << endl;
}
catch (WrongType const&)
{
- cerr << "declaration with name \'" << name
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "declaration with name \'" << name
<< "\' visible from scope \'" << from
<< "\' is not an exception declaration" << endl;
- cerr << "using non-exception type in raises declaration is "
+
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "using non-exception type in raises declaration is "
<< "illegal" << endl;
}
}
@@ -159,21 +170,26 @@ namespace CCF
}
catch (Resolve const&)
{
- cerr << "error: invalid raises declaration" << endl;
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "invalid raises declaration" << endl;
throw;
}
}
catch (NotFound const&)
{
- cerr << "no exception with name \'" << name
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "no exception with name \'" << name
<< "\' visible from scope \'" << from << "\'" << endl;
}
catch (WrongType const&)
{
- cerr << "declaration with name \'" << name
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "declaration with name \'" << name
<< "\' visible from scope \'" << from
<< "\' is not an exception declaration" << endl;
- cerr << "using non-exception type in raises declaration is "
+
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "using non-exception type in raises declaration is "
<< "illegal" << endl;
}
}
diff --git a/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Const.cpp b/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Const.cpp
index 6a55fa768c4..385702af462 100644
--- a/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Const.cpp
+++ b/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Const.cpp
@@ -57,7 +57,8 @@ namespace CCF
{
// Integer constant.
//
- const_ = &ctx.tu ().new_node<SemanticGraph::IntConst> ();
+ const_ = &ctx.tu ().new_node<SemanticGraph::IntConst> (
+ ctx.file (), name_id->line ());
ctx.tu ().new_edge<Belongs> (*const_, t);
ctx.tu ().new_edge<Defines> (ctx.scope (), *const_, name);
@@ -66,7 +67,8 @@ namespace CCF
}
catch (Resolve const&)
{
- cerr << "error: invalid const declaration" << endl;
+ cerr << ctx.file () << ":" << type_id->line () << ": error: "
+ << "invalid const declaration" << endl;
throw;
}
@@ -78,19 +80,24 @@ namespace CCF
}
catch (NotFound const&)
{
- cerr << "no type with name \'" << name
+ cerr << ctx.file () << ":" << type_id->line () << ": error: "
+ << "no type with name \'" << name
<< "\' visible from scope \'" << from << "\'" << endl;
}
catch (WrongType const&)
{
- cerr << "declaration with name \'" << name
+ cerr << ctx.file () << ":" << type_id->line () << ": error: "
+ << "declaration with name \'" << name
<< "\' visible from scope \'" << from
<< "\' is not a type declaration" << endl;
- cerr << "using non-type as a const type is illegal" << endl;
+
+ cerr << ctx.file () << ":" << type_id->line () << ": error: "
+ << "using non-type as a const type is illegal" << endl;
}
catch (NotComplete const& e)
{
- cerr << "type \'" << e.name () << "\' is not complete" << endl;
+ cerr << ctx.file () << ":" << type_id->line () << ": error: "
+ << "type \'" << e.name () << "\' is not complete" << endl;
}
}
diff --git a/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Elements.hpp b/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Elements.hpp
index 9b32c0931e1..51da2657b5d 100644
--- a/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Elements.hpp
+++ b/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Elements.hpp
@@ -51,9 +51,11 @@ namespace CCF
{
public:
Context (bool trace,
- SemanticGraph::TranslationUnit& tu)
+ SemanticGraph::TranslationUnit& tu,
+ CompilerElements::Context& parsing_context)
: trace_ (trace),
- tu_ (tu)
+ tu_ (tu),
+ parsing_context_ (parsing_context)
{
}
@@ -93,6 +95,18 @@ namespace CCF
region_ = &r;
}
+ CompilerElements::Context&
+ parsing_context () const
+ {
+ return parsing_context_;
+ }
+
+ SemanticGraph::Path const&
+ file () const
+ {
+ return parsing_context_.get<SemanticGraph::Path> ("file-path");
+ }
+
public:
void
int_exp_push (SemanticGraph::IntExpression& e)
@@ -127,6 +141,8 @@ namespace CCF
SemanticGraph::TranslationRegion* region_;
SemanticGraph::Scope* scope_;
+ CompilerElements::Context& parsing_context_;
+
std::stack<SemanticGraph::IntExpression*> int_exp_stack_;
private:
diff --git a/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Enum.cpp b/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Enum.cpp
index 5e846d90211..cece740ed39 100644
--- a/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Enum.cpp
+++ b/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Enum.cpp
@@ -34,10 +34,9 @@ namespace CCF
SimpleName name (id->lexeme ());
- //@@ Need to check for redeclaration of the name.
- //
+ type_ = &ctx.tu ().new_node<SemanticGraph::Enum> (
+ ctx.file (), id->line ());
- type_ = &ctx.tu ().new_node<SemanticGraph::Enum> ();
ctx.tu ().new_edge<Defines> (ctx.scope (), *type_, name);
}
@@ -53,7 +52,10 @@ namespace CCF
if (type_ != 0)
{
- Enumerator& e (ctx.tu ().new_node<Enumerator> ());
+ Enumerator& e (
+ ctx.tu ().new_node<Enumerator> (
+ ctx.file (), id->line ()));
+
ctx.tu ().new_edge<Belongs> (e, *type_);
ctx.tu ().new_edge<Defines> (ctx.scope (), e, name);
}
diff --git a/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Exception.cpp b/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Exception.cpp
index 5fb70498011..63af631c4b9 100644
--- a/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Exception.cpp
+++ b/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Exception.cpp
@@ -32,11 +32,9 @@ namespace CCF
SimpleName name (id->lexeme ());
- //@@ Need to check for redeclaration of the name. Can not
- // do that because I don't have mechanism for throwing
- // exception from SA.
- //
- now (ctx.tu ().new_node<SemanticGraph::Exception> ());
+ now (ctx.tu ().new_node<SemanticGraph::Exception> (
+ ctx.file (), id->line ()));
+
ctx.tu ().new_edge<Defines> (ctx.scope (), now (), name);
}
diff --git a/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Factory.cpp b/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Factory.cpp
index 9c5ac4df626..0e86ad26ff3 100644
--- a/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Factory.cpp
+++ b/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Factory.cpp
@@ -17,11 +17,22 @@ namespace CCF
{
using namespace SemanticGraph;
+ template <typename X>
+ void Factory::
+ define_fund_type (Root& root, SimpleName const& name)
+ {
+ ctx_.tu ().new_edge<Defines> (
+ root,
+ ctx_.tu ().new_node<X> ("fundamental-types", 0), name);
+ }
+
Factory::
- Factory (CompilerElements::Context& context,
+ Factory (CompilerElements::Context& parsing_context,
Diagnostic::Stream&,
SemanticGraph::TranslationUnit& tu)
- : ctx_ (context.get ("trace-semantic-action", false), tu),
+ : ctx_ (parsing_context.get ("trace-semantic-action", false),
+ tu,
+ parsing_context),
attribute_ (ctx_),
const__ (ctx_),
@@ -45,36 +56,41 @@ namespace CCF
{
// Implied translation region with fundamental types.
//
- TranslationRegion& ftr (tu.new_node<TranslationRegion> ());
- tu.new_edge<ContainsImplied> (tu, ftr, ".fundamental");
+ TranslationRegion& ftr (
+ tu.new_node<TranslationRegion> (
+ "fundamental-type", 0));
- Root& fr (tu.new_node<Root> ());
+ tu.new_edge<ContainsImplied> (tu, ftr, "fundamental-type");
+
+ Root& fr (tu.new_node<Root> ("fundamental-types", 0));
tu.new_edge<ContainsRoot> (ftr, fr);
- tu.new_edge<Defines> (fr, tu.new_node<Object> (), "Object");
- tu.new_edge<Defines> (fr, tu.new_node<ValueBase> (), "ValueBase");
- tu.new_edge<Defines> (fr, tu.new_node<Any> (), "any");
- tu.new_edge<Defines> (fr, tu.new_node<Boolean> (), "boolean");
- tu.new_edge<Defines> (fr, tu.new_node<Char> (), "char");
- tu.new_edge<Defines> (fr, tu.new_node<Double> (), "double");
- tu.new_edge<Defines> (fr, tu.new_node<Float> (), "float");
- tu.new_edge<Defines> (fr, tu.new_node<Long> (), "long");
- tu.new_edge<Defines> (fr, tu.new_node<LongDouble> (), "long double");
- tu.new_edge<Defines> (fr, tu.new_node<LongLong> (), "long long");
- tu.new_edge<Defines> (fr, tu.new_node<Octet> (), "octet");
- tu.new_edge<Defines> (fr, tu.new_node<Short> (), "short");
- tu.new_edge<Defines> (fr, tu.new_node<String> (), "string");
- tu.new_edge<Defines> (fr, tu.new_node<UnsignedLong> (), "unsigned long");
- tu.new_edge<Defines> (fr, tu.new_node<UnsignedLongLong> (), "unsigned long long");
- tu.new_edge<Defines> (fr, tu.new_node<UnsignedShort> (), "unsigned short");
- tu.new_edge<Defines> (fr, tu.new_node<Void> (), "void");
- tu.new_edge<Defines> (fr, tu.new_node<Wchar> (), "wchar");
- tu.new_edge<Defines> (fr, tu.new_node<Wstring> (), "wstring");
+ define_fund_type<Object> (fr, "Object");
+ define_fund_type<ValueBase> (fr, "ValueBase");
+ define_fund_type<Any> (fr, "any");
+ define_fund_type<Boolean> (fr, "boolean");
+ define_fund_type<Char> (fr, "char");
+ define_fund_type<Double> (fr, "double");
+ define_fund_type<Float> (fr, "float");
+ define_fund_type<Long> (fr, "long");
+ define_fund_type<LongDouble> (fr, "long double");
+ define_fund_type<LongLong> (fr, "long long");
+ define_fund_type<Octet> (fr, "octet");
+ define_fund_type<Short> (fr, "short");
+ define_fund_type<String> (fr, "string");
+ define_fund_type<UnsignedLong> (fr, "unsigned long");
+ define_fund_type<UnsignedLongLong> (fr, "unsigned long long");
+ define_fund_type<UnsignedShort> (fr, "unsigned short");
+ define_fund_type<Void> (fr, "void");
+ define_fund_type<Wchar> (fr, "wchar");
+ define_fund_type<Wstring> (fr, "wstring");
+
+ TranslationRegion& principal (
+ tu.new_node<TranslationRegion> (ctx_.file (), 0));
- TranslationRegion& principal (tu.new_node<TranslationRegion> ());
tu.new_edge<ContainsPrincipal> (tu, principal);
- Root& root (tu.new_node<Root> ());
+ Root& root (tu.new_node<Root> (ctx_.file (), 0));
tu.new_edge<ContainsRoot> (principal, root);
ctx_.region (principal);
diff --git a/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Factory.hpp b/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Factory.hpp
index 4a0b8aceb8b..f385fdec57f 100644
--- a/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Factory.hpp
+++ b/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Factory.hpp
@@ -166,6 +166,12 @@ namespace CCF
Context ctx_;
private:
+ template <typename X>
+ void
+ define_fund_type (SemanticGraph::Root& root,
+ SemanticGraph::SimpleName const& name);
+
+ private:
Attribute attribute_;
Const const__;
Enum enum__;
diff --git a/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Include.cpp b/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Include.cpp
index ad6561030f4..5fcbe4a0c31 100644
--- a/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Include.cpp
+++ b/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Include.cpp
@@ -17,7 +17,7 @@ namespace CCF
{
namespace Impl
{
- // @@ This is left unimplemented for now. Later code from
+ // @@ This is left unimplemented for now. Later, code from
// IDL3 should be copied here. Or better yet this implementation
// should allow customization via overriding.
//
diff --git a/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Interface.cpp b/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Interface.cpp
index 4f26c633caa..63c5dc9d5be 100644
--- a/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Interface.cpp
+++ b/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Interface.cpp
@@ -42,7 +42,8 @@ namespace CCF
}
else
{
- now (ctx.tu ().new_node<AbstractInterface> ());
+ now (ctx.tu ().new_node<AbstractInterface> (
+ ctx.file (), id->line ()));
}
ctx.tu ().new_edge<Defines> (ctx.scope (), now (), name);
@@ -61,7 +62,8 @@ namespace CCF
}
else
{
- now (ctx.tu ().new_node<AbstractInterface> ());
+ now (ctx.tu ().new_node<AbstractInterface> (
+ ctx.file (), id->line ()));
}
ctx.tu ().new_edge<Mentions> (ctx.scope (), now (), name);
@@ -82,7 +84,8 @@ namespace CCF
}
else
{
- now (ctx.tu ().new_node<LocalInterface> ());
+ now (ctx.tu ().new_node<LocalInterface> (
+ ctx.file (), id->line ()));
}
ctx.tu ().new_edge<Defines> (ctx.scope (), now (), name);
@@ -101,7 +104,8 @@ namespace CCF
}
else
{
- now (ctx.tu ().new_node<LocalInterface> ());
+ now (ctx.tu ().new_node<LocalInterface> (
+ ctx.file (), id->line ()));
}
ctx.tu ().new_edge<Mentions> (ctx.scope (), now (), name);
@@ -123,7 +127,8 @@ namespace CCF
}
else
{
- now (ctx.tu ().new_node<UnconstrainedInterface> ());
+ now (ctx.tu ().new_node<UnconstrainedInterface> (
+ ctx.file (), id->line ()));
}
ctx.tu ().new_edge<Defines> (ctx.scope (), now (), name);
@@ -143,7 +148,8 @@ namespace CCF
}
else
{
- now (ctx.tu ().new_node<UnconstrainedInterface> ());
+ now (ctx.tu ().new_node<UnconstrainedInterface> (
+ ctx.file (), id->line ()));
}
ctx.tu ().new_edge<Mentions> (ctx.scope (), now (), name);
@@ -191,29 +197,36 @@ namespace CCF
}
catch (Resolve const&)
{
- cerr << "error: invalid inheritance specification" << endl;
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "invalid inheritance specification" << endl;
throw;
}
}
catch (NotFound const&)
{
- cerr << "no interface with name \'" << name
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "no interface with name \'" << name
<< "\' visible from scope \'" << from << "\'" << endl;
}
catch (WrongType const&)
{
- cerr << "incompatible type in inheritance specification" << endl;
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "incompatible type in inheritance specification" << endl;
}
catch (NotDefined const& e)
{
- cerr << "attempt to inherit from forward-declared interface "
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "attempt to inherit from forward-declared interface "
<< e.name () << endl;
- cerr << "inheritance from forward-declared interface is illegal"
+
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "inheritance from forward-declared interface is illegal"
<< endl;
}
catch (AlreadyInherited const& e)
{
- cerr << "directly inheriting from interface \'" << e.name ()
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "directly inheriting from interface \'" << e.name ()
<< "\' more than once is illegal" << endl;
}
}
diff --git a/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Member.cpp b/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Member.cpp
index b68f3251f48..790bb2a6c95 100644
--- a/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Member.cpp
+++ b/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Member.cpp
@@ -49,7 +49,8 @@ namespace CCF
}
catch (Resolve const&)
{
- cerr << "error: invalid member declaration" << endl;
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "invalid member declaration" << endl;
throw;
}
@@ -61,19 +62,24 @@ namespace CCF
}
catch (NotFound const&)
{
- cerr << "no type with name \'" << name
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "no type with name \'" << name
<< "\' visible from scope \'" << from << "\'" << endl;
}
catch (WrongType const&)
{
- cerr << "declaration with name \'" << name
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "declaration with name \'" << name
<< "\' visible from scope \'" << from
<< "\' is not a type declaration" << endl;
- cerr << "using non-type as a member type is illegal" << endl;
+
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "using non-type as a member type is illegal" << endl;
}
catch (NotComplete const& e)
{
- cerr << "type \'" << e.name () << "\' is not complete" << endl;
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "type \'" << e.name () << "\' is not complete" << endl;
}
}
@@ -88,7 +94,8 @@ namespace CCF
SimpleName name (id->lexeme ());
SemanticGraph::Member& m (
- ctx.tu ().new_node<SemanticGraph::Member> ());
+ ctx.tu ().new_node<SemanticGraph::Member> (
+ ctx.file (), id->line ()));
ctx.tu ().new_edge<Belongs> (m, *type_);
ctx.tu ().new_edge<Defines> (ctx.scope (), m, name);
diff --git a/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Module.cpp b/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Module.cpp
index 180ac9508c6..b2b003d6d73 100644
--- a/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Module.cpp
+++ b/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Module.cpp
@@ -30,7 +30,9 @@ namespace CCF
{
if (ctx.trace ()) cerr << "module " << id << endl;
- now (ctx.tu ().new_node<SemanticGraph::Module> ());
+ now (ctx.tu ().new_node<SemanticGraph::Module> (
+ ctx.file (), id->line ()));
+
ctx.tu ().new_edge<Defines> (ctx.scope (), now (), id->lexeme ());
}
diff --git a/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Native.cpp b/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Native.cpp
index bb4cf12b9af..162fd1d5bfe 100644
--- a/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Native.cpp
+++ b/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Native.cpp
@@ -34,7 +34,8 @@ namespace CCF
SimpleName name (id->lexeme ());
SemanticGraph::Native& n (
- ctx.tu ().new_node<SemanticGraph::Native> ());
+ ctx.tu ().new_node<SemanticGraph::Native> (
+ ctx.file (), id->line ()));
ctx.tu ().new_edge<Defines> (ctx.scope (), n, name);
}
diff --git a/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/NumericExpression.cpp b/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/NumericExpression.cpp
index 49f26cbcacb..e949438aff8 100644
--- a/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/NumericExpression.cpp
+++ b/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/NumericExpression.cpp
@@ -59,21 +59,26 @@ namespace CCF
}
catch (Resolve const&)
{
- cerr << "error: invalid reference to const" << endl;
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "invalid reference to const" << endl;
throw;
}
}
catch (NotFound const&)
{
- cerr << "no const with name \'" << name
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "no const with name \'" << name
<< "\' visible from scope \'" << from << "\'" << endl;
}
catch (WrongType const&)
{
- cerr << "declaration with name \'" << name
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "declaration with name \'" << name
<< "\' visible from scope \'" << from
<< "\' is not a const declaration" << endl;
- cerr << "using non-const as a reference to const is illegal"
+
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "using non-const as a reference to const is illegal"
<< endl;
}
}
@@ -84,7 +89,15 @@ namespace CCF
if (ctx.trace ())
cerr << "integer literal " << il->value () << endl;
- ctx.int_exp_push (ctx.tu ().new_node<IntLiteral> (il->value ()));
+ ctx.int_exp_push (
+ ctx.tu ().new_node<IntLiteral> (
+ ctx.file (), il->line (), il->value ()));
+ }
+
+ void NumericExpression::
+ pre (OperatorPtr const& op)
+ {
+ line_ = op->line ();
}
void NumericExpression::
@@ -107,7 +120,7 @@ namespace CCF
IntExpression& expr (ctx.int_exp_pop ());
- IntNeg& neg (ctx.tu ().new_node<IntNeg> ());
+ IntNeg& neg (ctx.tu ().new_node<IntNeg> (ctx.file (), line_));
ctx.tu ().new_edge<IntNegates> (neg, expr);
@@ -125,7 +138,7 @@ namespace CCF
IntExpression& expr (ctx.int_exp_pop ());
- IntCom& com (ctx.tu ().new_node<IntCom> ());
+ IntCom& com (ctx.tu ().new_node<IntCom> (ctx.file (), line_));
ctx.tu ().new_edge<IntComplements> (com, expr);
@@ -144,7 +157,7 @@ namespace CCF
IntExpression& multiplier (ctx.int_exp_pop ());
IntExpression& multiplicand (ctx.int_exp_pop ());
- IntMul& mul (ctx.tu ().new_node<IntMul> ());
+ IntMul& mul (ctx.tu ().new_node<IntMul> (ctx.file (), line_));
ctx.tu ().new_edge<IntMultiplies> (mul, multiplicand);
ctx.tu ().new_edge<IntMultiplies> (mul, multiplier);
@@ -164,7 +177,7 @@ namespace CCF
IntExpression& divisor (ctx.int_exp_pop ());
IntExpression& divident (ctx.int_exp_pop ());
- IntDiv& div (ctx.tu ().new_node<IntDiv> ());
+ IntDiv& div (ctx.tu ().new_node<IntDiv> (ctx.file (), line_));
ctx.tu ().new_edge<IntDivides> (div, divident);
ctx.tu ().new_edge<IntDivides> (div, divisor);
@@ -184,7 +197,7 @@ namespace CCF
IntExpression& divisor (ctx.int_exp_pop ());
IntExpression& divident (ctx.int_exp_pop ());
- IntRem& rem (ctx.tu ().new_node<IntRem> ());
+ IntRem& rem (ctx.tu ().new_node<IntRem> (ctx.file (), line_));
ctx.tu ().new_edge<IntDivides> (rem, divident);
ctx.tu ().new_edge<IntDivides> (rem, divisor);
@@ -205,7 +218,7 @@ namespace CCF
IntExpression& second_item (ctx.int_exp_pop ());
IntExpression& first_item (ctx.int_exp_pop ());
- IntAdd& add (ctx.tu ().new_node<IntAdd> ());
+ IntAdd& add (ctx.tu ().new_node<IntAdd> (ctx.file (), line_));
ctx.tu ().new_edge<IntAdds> (add, first_item);
ctx.tu ().new_edge<IntAdds> (add, second_item);
@@ -225,7 +238,7 @@ namespace CCF
IntExpression& subtrahend (ctx.int_exp_pop ());
IntExpression& minuend (ctx.int_exp_pop ());
- IntSub& sub (ctx.tu ().new_node<IntSub> ());
+ IntSub& sub (ctx.tu ().new_node<IntSub> (ctx.file (), line_));
ctx.tu ().new_edge<IntSubtracts> (sub, minuend);
ctx.tu ().new_edge<IntSubtracts> (sub, subtrahend);
@@ -245,7 +258,7 @@ namespace CCF
IntExpression& factor (ctx.int_exp_pop ());
IntExpression& pattern (ctx.int_exp_pop ());
- IntRsh& rsh (ctx.tu ().new_node<IntRsh> ());
+ IntRsh& rsh (ctx.tu ().new_node<IntRsh> (ctx.file (), line_));
ctx.tu ().new_edge<IntShifts> (rsh, pattern);
ctx.tu ().new_edge<IntShifts> (rsh, factor);
@@ -265,7 +278,7 @@ namespace CCF
IntExpression& factor (ctx.int_exp_pop ());
IntExpression& pattern (ctx.int_exp_pop ());
- IntLsh& lsh (ctx.tu ().new_node<IntLsh> ());
+ IntLsh& lsh (ctx.tu ().new_node<IntLsh> (ctx.file (), line_));
ctx.tu ().new_edge<IntShifts> (lsh, pattern);
ctx.tu ().new_edge<IntShifts> (lsh, factor);
@@ -285,7 +298,7 @@ namespace CCF
IntExpression& second_pattern (ctx.int_exp_pop ());
IntExpression& first_pattern (ctx.int_exp_pop ());
- IntAnd& and_ (ctx.tu ().new_node<IntAnd> ());
+ IntAnd& and_ (ctx.tu ().new_node<IntAnd> (ctx.file (), line_));
ctx.tu ().new_edge<IntConjuncts> (and_, first_pattern);
ctx.tu ().new_edge<IntConjuncts> (and_, second_pattern);
@@ -305,7 +318,7 @@ namespace CCF
IntExpression& second_pattern (ctx.int_exp_pop ());
IntExpression& first_pattern (ctx.int_exp_pop ());
- IntXor& xor_ (ctx.tu ().new_node<IntXor> ());
+ IntXor& xor_ (ctx.tu ().new_node<IntXor> (ctx.file (), line_));
ctx.tu ().new_edge<IntExclusivelyDisjuncts> (xor_, first_pattern);
ctx.tu ().new_edge<IntExclusivelyDisjuncts> (xor_, second_pattern);
@@ -325,7 +338,7 @@ namespace CCF
IntExpression& second_pattern (ctx.int_exp_pop ());
IntExpression& first_pattern (ctx.int_exp_pop ());
- IntOr& or_ (ctx.tu ().new_node<IntOr> ());
+ IntOr& or_ (ctx.tu ().new_node<IntOr> (ctx.file (), line_));
ctx.tu ().new_edge<IntInclusivelyDisjuncts> (or_, first_pattern);
ctx.tu ().new_edge<IntInclusivelyDisjuncts> (or_, second_pattern);
diff --git a/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/NumericExpression.hpp b/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/NumericExpression.hpp
index 53fc8b2e010..fe0b399cb60 100644
--- a/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/NumericExpression.hpp
+++ b/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/NumericExpression.hpp
@@ -31,6 +31,9 @@ namespace CCF
integer_literal (IntegerLiteralPtr const&);
virtual void
+ pre (OperatorPtr const&);
+
+ virtual void
pos ();
virtual void
@@ -71,6 +74,7 @@ namespace CCF
private:
+ unsigned long line_;
};
}
}
diff --git a/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Operation.cpp b/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Operation.cpp
index 6a334438bdf..7401e2f65ea 100644
--- a/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Operation.cpp
+++ b/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Operation.cpp
@@ -30,16 +30,14 @@ namespace CCF
one_way ()
{
if (ctx.trace ()) cerr << "oneway ";
-
- op_ = &ctx.tu ().new_node<OneWayOperation> ();
+ one_way_ = true;
}
void Operation::
two_way ()
{
if (ctx.trace ()) cerr << "twoway ";
-
- op_ = &ctx.tu ().new_node<TwoWayOperation> ();
+ one_way_ = false;
}
void Operation::
@@ -52,48 +50,40 @@ namespace CCF
Name name (id->lexeme ());
ScopedName from (ctx.scope ().scoped_name ());
- struct NotVoid : Resolve {};
-
try
{
try
{
- Type& t (resolve<Type> (from, name, Flags::complete));
-
- if (dynamic_cast<OneWayOperation*>(op_))
- {
- if (dynamic_cast<Void*> (&t) == 0) throw NotVoid ();
- }
-
- type_ = &t;
+ type_ = &resolve<Type> (from, name, Flags::complete);
}
catch (Resolve const&)
{
- cerr << "error: invalid operation declaration" << endl;
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "invalid operation declaration" << endl;
throw;
}
}
catch (NotFound const&)
{
- cerr << "no type with name \'" << name
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "no type with name \'" << name
<< "\' visible from scope \'" << from << "\'" << endl;
}
catch (WrongType const&)
{
- cerr << "declaration with name \'" << name
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "declaration with name \'" << name
<< "\' visible from scope \'" << from
<< "\' is not a type declaration" << endl;
- cerr << "using non-type as an operation return type is illegal"
+
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "using non-type as an operation return type is illegal"
<< endl;
}
catch (NotComplete const& e)
{
- cerr << "type \'" << e.name () << "\' is not complete" << endl;
- }
- catch (NotVoid const&)
- {
- cerr << "oneway operation should have void as a return type"
- << endl;
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "type \'" << e.name () << "\' is not complete" << endl;
}
}
@@ -102,6 +92,25 @@ namespace CCF
{
if (ctx.trace ()) cerr << " " << id << endl;
+ if (one_way_)
+ {
+ if (dynamic_cast<Void*> (type_) == 0)
+ {
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "invalid operation declaration" << endl;
+
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "oneway operation should have void as a return type"
+ << endl;
+ }
+
+ op_ = &ctx.tu ().new_node<OneWayOperation> (
+ ctx.file (), id->line ());
+ }
+ else
+ op_ = &ctx.tu ().new_node<TwoWayOperation> (
+ ctx.file (), id->line ());
+
SimpleName name (id->lexeme ());
ctx.tu ().new_edge<Defines> (ctx.scope (), *op_, name);
@@ -129,11 +138,8 @@ namespace CCF
{
try
{
- if (dynamic_cast<OneWayOperation*>(op_) &&
- direction != Direction::in)
- {
+ if (one_way_ && direction != Direction::in)
throw NotIn ();
- }
Type& t (resolve<Type> (from, name, Flags::complete));
@@ -143,17 +149,20 @@ namespace CCF
{
case Direction::in:
{
- p = &ctx.tu ().new_node<InParameter> (name_id->lexeme ());
+ p = &ctx.tu ().new_node<InParameter> (
+ ctx.file (), name_id->line (), name_id->lexeme ());
break;
}
case Direction::out:
{
- p = &ctx.tu ().new_node<OutParameter> (name_id->lexeme ());
+ p = &ctx.tu ().new_node<OutParameter> (
+ ctx.file (), name_id->line (), name_id->lexeme ());
break;
}
case Direction::inout:
{
- p = &ctx.tu ().new_node<InOutParameter> (name_id->lexeme ());
+ p = &ctx.tu ().new_node<InOutParameter> (
+ ctx.file (), name_id->line (), name_id->lexeme ());
break;
}
}
@@ -163,30 +172,37 @@ namespace CCF
}
catch (Resolve const&)
{
- cerr << "error: invalid parameter declaration" << endl;
+ cerr << ctx.file () << ":" << type_id->line () << ": error: "
+ << "invalid parameter declaration" << endl;
throw;
}
}
catch (NotFound const&)
{
- cerr << "no type with name \'" << name
+ cerr << ctx.file () << ":" << type_id->line () << ": error: "
+ << "no type with name \'" << name
<< "\' visible from scope \'" << from << "\'" << endl;
}
catch (WrongType const&)
{
- cerr << "declaration with name \'" << name
+ cerr << ctx.file () << ":" << type_id->line () << ": error: "
+ << "declaration with name \'" << name
<< "\' visible from scope \'" << from
<< "\' is not a type declaration" << endl;
- cerr << "using non-type as an operation parameter type is "
+
+ cerr << ctx.file () << ":" << type_id->line () << ": error: "
+ << "using non-type as an operation parameter type is "
<< "illegal" << endl;
}
catch (NotComplete const& e)
{
- cerr << "type \'" << e.name () << "\' is not complete" << endl;
+ cerr << ctx.file () << ":" << type_id->line () << ": error: "
+ << "type \'" << e.name () << "\' is not complete" << endl;
}
catch (NotIn const&)
{
- cerr << "parameter of oneway operation should have \'in\' "
+ cerr << ctx.file () << ":" << type_id->line () << ": error: "
+ << "parameter of oneway operation should have \'in\' "
<< "direction" << endl;
}
}
@@ -206,7 +222,8 @@ namespace CCF
{
try
{
- if (dynamic_cast<OneWayOperation*>(op_)) throw OneWay ();
+ if (one_way_)
+ throw OneWay ();
SemanticGraph::Exception& e (
resolve<SemanticGraph::Exception> (from, name));
@@ -215,26 +232,32 @@ namespace CCF
}
catch (Resolve const&)
{
- cerr << "error: invalid raises declaration" << endl;
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "invalid raises declaration" << endl;
throw;
}
}
catch (NotFound const&)
{
- cerr << "no exception with name \'" << name
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "no exception with name \'" << name
<< "\' visible from scope \'" << from << "\'" << endl;
}
catch (WrongType const&)
{
- cerr << "declaration with name \'" << name
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "declaration with name \'" << name
<< "\' visible from scope \'" << from
<< "\' is not an exception declaration" << endl;
- cerr << "using non-exception type in raises declaration is "
+
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "using non-exception type in raises declaration is "
<< "illegal" << endl;
}
catch (OneWay const&)
{
- cerr << "oneway operation may not raise exceptions" << endl;
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "oneway operation may not raise exceptions" << endl;
}
}
}
diff --git a/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Operation.hpp b/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Operation.hpp
index f38a4949206..e45cef9fcf4 100644
--- a/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Operation.hpp
+++ b/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Operation.hpp
@@ -45,6 +45,7 @@ namespace CCF
raises (IdentifierPtr const& id);
private:
+ bool one_way_;
SemanticGraph::Type* type_;
SemanticGraph::Operation* op_;
};
diff --git a/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Struct.cpp b/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Struct.cpp
index 3f98a2607f8..966eba12824 100644
--- a/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Struct.cpp
+++ b/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Struct.cpp
@@ -43,7 +43,8 @@ namespace CCF
}
else
{
- now (ctx.tu ().new_node<SemanticGraph::Struct> ());
+ now (ctx.tu ().new_node<SemanticGraph::Struct> (
+ ctx.file (), id->line ()));
}
ctx.tu ().new_edge<Defines> (ctx.scope (), now (), name);
@@ -62,7 +63,8 @@ namespace CCF
}
else
{
- now (ctx.tu ().new_node<SemanticGraph::Struct> ());
+ now (ctx.tu ().new_node<SemanticGraph::Struct> (
+ ctx.file (), id->line ()));
}
ctx.tu ().new_edge<Mentions> (ctx.scope (), now (), name);
diff --git a/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/TypeId.cpp b/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/TypeId.cpp
index a87fb5c4bcb..816d83f6d12 100644
--- a/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/TypeId.cpp
+++ b/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/TypeId.cpp
@@ -40,7 +40,8 @@ namespace CCF
void TypeId::
begin (IdentifierPtr const& d, StringLiteralPtr const& id)
{
- if (ctx.trace ()) cerr << "typeid " << d << " " << id << endl;
+ if (ctx.trace ())
+ cerr << "typeid " << d << " " << id << endl;
Name name (d->lexeme ());
SemanticGraph::StringLiteral tid (id->value ());
@@ -53,14 +54,18 @@ namespace CCF
ScopedName full ((**(nodes.begin ())).scoped_name ());
SemanticGraph::TypeId& ti (
- ctx.tu ().new_node<SemanticGraph::TypeId> (full, tid));
+ ctx.tu ().new_node<SemanticGraph::TypeId> (
+ ctx.file (), d->line (), full, tid));
ctx.tu ().new_edge<Defines> (ctx.scope (), ti, "typeid");
}
catch (NotFound const&)
{
- cerr << "error: invalid typeid declaration" << endl;
- cerr << "no declaration with name \'"
+ cerr << ctx.file () << ":" << d->line () << ": error: "
+ << "invalid typeid declaration" << endl;
+
+ cerr << ctx.file () << ":" << d->line () << ": error: "
+ << "no declaration with name \'"
<< name << "\' visible from scope \'"
<< ctx.scope ().scoped_name () << "\'" << endl;
}
@@ -103,21 +108,28 @@ namespace CCF
ScopedName full (node.scoped_name ());
SemanticGraph::TypePrefix& tp (
- ctx.tu ().new_node<SemanticGraph::TypePrefix> (full, tprefix));
+ ctx.tu ().new_node<SemanticGraph::TypePrefix> (
+ ctx.file (), d->line (), full, tprefix));
ctx.tu ().new_edge<Defines> (ctx.scope (), tp, "typeprefix");
}
catch (NotFound const&)
{
- cerr << "error: invalid typeprefix declaration" << endl;
- cerr << "no declaration with name \'"
+ cerr << ctx.file () << ":" << d->line () << ": error: "
+ << "invalid typeprefix declaration" << endl;
+
+ cerr << ctx.file () << ":" << d->line () << ": error: "
+ << "no declaration with name \'"
<< name << "\' visible from scope \'"
<< ctx.scope ().scoped_name () << "\'" << endl;
}
catch (std::bad_cast const&)
{
- cerr << "error: invalid typeprefix declaration" << endl;
- cerr << "no suitable declaration with name \'"
+ cerr << ctx.file () << ":" << d->line () << ": error: "
+ << "invalid typeprefix declaration" << endl;
+
+ cerr << ctx.file () << ":" << d->line () << ": error: "
+ << "no suitable declaration with name \'"
<< name << "\' visible from scope \'"
<< ctx.scope ().scoped_name () << "\'" << endl;
}
diff --git a/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Typedef.cpp b/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Typedef.cpp
index 315b69d0e51..fcd4257fa52 100644
--- a/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Typedef.cpp
+++ b/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Typedef.cpp
@@ -36,9 +36,16 @@ namespace CCF
}
void Typedef::
+ pre (KeywordPtr const& id)
+ {
+ line_ = id->line ();
+ }
+
+ void Typedef::
begin (IdentifierPtr const& id)
{
- if (ctx.trace ()) cerr << "typedef " << id << endl;
+ if (ctx.trace ())
+ cerr << "typedef " << id << endl;
define_ = false;
type_ = 0;
@@ -55,28 +62,34 @@ namespace CCF
}
catch (Resolve const&)
{
- cerr << "error: invalid typedef declaration" << endl;
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "invalid typedef declaration" << endl;
throw;
}
}
catch (NotFound const&)
{
- cerr << "no type with name \'" << name
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "no type with name \'" << name
<< "\' visible from scope \'" << from << "\'" << endl;
}
catch (WrongType const&)
{
- cerr << "declaration with name \'" << name
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "declaration with name \'" << name
<< "\' visible from scope \'" << from
<< "\' is not a type declaration" << endl;
- cerr << "using non-type in typedef is illegal" << endl;
+
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "using non-type in typedef is illegal" << endl;
}
}
void Typedef::
begin_unbounded_seq (IdentifierPtr const& id)
{
- if (ctx.trace ()) cerr << "typedef u-sequence<" << id << ">" << endl;
+ if (ctx.trace ())
+ cerr << "typedef u-sequence<" << id << ">" << endl;
define_ = true;
type_ = 0;
@@ -91,28 +104,36 @@ namespace CCF
{
Type& t (resolve<Type> (from, name));
- UnboundedSequence& s (ctx.tu ().new_node<UnboundedSequence> ());
+ UnboundedSequence& s (
+ ctx.tu ().new_node<UnboundedSequence> (
+ ctx.file (), line_));
+
ctx.tu ().new_edge<ArgumentsWithType> (t, s);
type_ = &s;
}
catch (Resolve const&)
{
- cerr << "error: invalid sequence declaration" << endl;
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "invalid sequence declaration" << endl;
throw;
}
}
catch (NotFound const&)
{
- cerr << "no type with name \'" << name
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "no type with name \'" << name
<< "\' visible from scope \'" << from << "\'" << endl;
}
catch (WrongType const&)
{
- cerr << "declaration with name \'" << name
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "declaration with name \'" << name
<< "\' visible from scope \'" << from
<< "\' is not a type declaration" << endl;
- cerr << "using non-type in sequence specialization is illegal"
+
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "using non-type in sequence specialization is illegal"
<< endl;
}
}
@@ -120,7 +141,8 @@ namespace CCF
void Typedef::
begin_bounded_seq (IdentifierPtr const& id)
{
- if (ctx.trace ()) cerr << "typedef b-sequence<" << id << ">" << endl;
+ if (ctx.trace ())
+ cerr << "typedef b-sequence<" << id << ">" << endl;
define_ = true;
type_ = 0;
@@ -135,28 +157,36 @@ namespace CCF
{
Type& t (resolve<Type> (from, name));
- BoundedSequence& s (ctx.tu ().new_node<BoundedSequence> ());
+ BoundedSequence& s (
+ ctx.tu ().new_node<BoundedSequence> (
+ ctx.file (), line_));
+
ctx.tu ().new_edge<ArgumentsWithType> (t, s);
type_ = &s;
}
catch (Resolve const&)
{
- cerr << "error: invalid sequence declaration" << endl;
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "invalid sequence declaration" << endl;
throw;
}
}
catch (NotFound const&)
{
- cerr << "no type with name \'" << name
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "no type with name \'" << name
<< "\' visible from scope \'" << from << "\'" << endl;
}
catch (WrongType const&)
{
- cerr << "declaration with name \'" << name
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "declaration with name \'" << name
<< "\' visible from scope \'" << from
<< "\' is not a type declaration" << endl;
- cerr << "using non-type in sequence specialization is illegal"
+
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "using non-type in sequence specialization is illegal"
<< endl;
}
}
@@ -170,7 +200,7 @@ namespace CCF
type_ = 0;
array_type_ = 0;
- type_ = &ctx.tu ().new_node<BoundedString> ();
+ type_ = &ctx.tu ().new_node<BoundedString> (ctx.file (), line_);
bound ();
}
@@ -183,7 +213,7 @@ namespace CCF
type_ = 0;
array_type_ = 0;
- type_ = &ctx.tu ().new_node<BoundedWideString> ();
+ type_ = &ctx.tu ().new_node<BoundedWideString> (ctx.file (), line_);
bound ();
}
@@ -200,15 +230,17 @@ namespace CCF
if (type_->named_begin () == type_->named_end ())
{
- cerr << "error: anonymous types in array declarations "
+ cerr << ctx.file () << ":" << line_ << ": error: "
+ << "anonymous types in array declarations "
<< "are not supported" << endl;
- cerr << "use another typedef to name this type" << endl;
+ cerr << ctx.file () << ":" << line_ << ": error: "
+ << "use another typedef to name this type" << endl;
return;
}
- Array& a (ctx.tu ().new_node<Array> ());
+ Array& a (ctx.tu ().new_node<Array> (ctx.file (), line_));
ctx.tu ().new_edge<ArgumentsWithType> (*type_, a);
array_type_ = &a;
@@ -275,8 +307,11 @@ namespace CCF
{
}
- cerr << "error: invalid typedef declaration" << endl;
- cerr << "error: redeclaration of name " << name << endl;
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "invalid typedef declaration" << endl;
+
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "redeclaration of name " << name << endl;
array_type_ = 0;
}
diff --git a/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Typedef.hpp b/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Typedef.hpp
index 904a04ee56b..638bbc8afd8 100644
--- a/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Typedef.hpp
+++ b/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Typedef.hpp
@@ -22,6 +22,9 @@ namespace CCF
Typedef (Context& c);
virtual void
+ pre (KeywordPtr const& id);
+
+ virtual void
begin (IdentifierPtr const& id);
virtual void
@@ -50,6 +53,7 @@ namespace CCF
private:
bool define_;
+ unsigned long line_;
SemanticGraph::Type* type_;
SemanticGraph::Type* array_type_;
};
diff --git a/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Union.cpp b/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Union.cpp
index b11d10e4f45..375b8a9abab 100644
--- a/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Union.cpp
+++ b/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Union.cpp
@@ -41,7 +41,8 @@ namespace CCF
}
else
{
- now (ctx.tu ().new_node<SemanticGraph::Union> ());
+ now (ctx.tu ().new_node<SemanticGraph::Union> (
+ ctx.file (), id->line ()));
}
ctx.tu ().new_edge<Defines> (ctx.scope (), now (), name);
@@ -60,7 +61,8 @@ namespace CCF
}
else
{
- now (ctx.tu ().new_node<SemanticGraph::Union> ());
+ now (ctx.tu ().new_node<SemanticGraph::Union> (
+ ctx.file (), id->line ()));
}
ctx.tu ().new_edge<Mentions> (ctx.scope (), now (), name);
@@ -100,18 +102,21 @@ namespace CCF
}
catch (Resolve const&)
{
- cerr << "error: invalid union declaration" << endl;
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "invalid union declaration" << endl;
throw;
}
}
catch (NotFound const&)
{
- cerr << "no type with name \'" << name
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "no type with name \'" << name
<< "\' visible from scope \'" << from << "\'" << endl;
}
catch (WrongType const&)
{
- cerr << "declaration with name \'" << name
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "declaration with name \'" << name
<< "\' visible from scope \'" << from
<< "\' is not a valid discriminant type" << endl;
}
@@ -148,7 +153,8 @@ namespace CCF
}
catch (Resolve const&)
{
- cerr << "error: invalid union member declaration" << endl;
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "invalid union member declaration" << endl;
throw;
}
@@ -160,19 +166,24 @@ namespace CCF
}
catch (NotFound const&)
{
- cerr << "no type with name \'" << name
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "no type with name \'" << name
<< "\' visible from scope \'" << from << "\'" << endl;
}
catch (WrongType const&)
{
- cerr << "declaration with name \'" << name
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "declaration with name \'" << name
<< "\' visible from scope \'" << from
<< "\' is not a type declaration" << endl;
- cerr << "using non-type as an member type is illegal" << endl;
+
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "using non-type as an member type is illegal" << endl;
}
catch (NotComplete const& e)
{
- cerr << "type \'" << e.name () << "\' is not complete" << endl;
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "type \'" << e.name () << "\' is not complete" << endl;
}
}
@@ -186,7 +197,8 @@ namespace CCF
SimpleName name (id->lexeme ());
SemanticGraph::UnionMember& m (
- ctx.tu ().new_node<SemanticGraph::UnionMember> ());
+ ctx.tu ().new_node<SemanticGraph::UnionMember> (
+ ctx.file (), id->line ()));
ctx.tu ().new_edge<Belongs> (m, *member_type_);
ctx.tu ().new_edge<Defines> (ctx.scope (), m, name);
diff --git a/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/ValueType.cpp b/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/ValueType.cpp
index 159aa228b4c..3d6b92132e6 100644
--- a/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/ValueType.cpp
+++ b/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/ValueType.cpp
@@ -40,7 +40,8 @@ namespace CCF
}
else
{
- now (ctx.tu ().new_node<AbstractValueType> ());
+ now (ctx.tu ().new_node<AbstractValueType> (
+ ctx.file (), id->line ()));
}
ctx.tu ().new_edge<Defines> (ctx.scope (), now (), name);
@@ -59,7 +60,8 @@ namespace CCF
}
else
{
- now (ctx.tu ().new_node<AbstractValueType> ());
+ now (ctx.tu ().new_node<AbstractValueType> (
+ ctx.file (), id->line ()));
}
ctx.tu ().new_edge<Mentions> (ctx.scope (), now (), name);
@@ -80,7 +82,8 @@ namespace CCF
}
else
{
- now (ctx.tu ().new_node<ConcreteValueType> ());
+ now (ctx.tu ().new_node<ConcreteValueType> (
+ ctx.file (), id->line ()));
}
ctx.tu ().new_edge<Defines> (ctx.scope (), now (), name);
@@ -99,7 +102,8 @@ namespace CCF
}
else
{
- now (ctx.tu ().new_node<ConcreteValueType> ());
+ now (ctx.tu ().new_node<ConcreteValueType> (
+ ctx.file (), id->line ()));
}
ctx.tu ().new_edge<Mentions> (ctx.scope (), now (), name);
@@ -133,7 +137,11 @@ namespace CCF
//
if (!abstract)
{
- cerr << "abstract valuetype `" << now ().name ()
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "invalid inheritance specification" << endl;
+
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "abstract valuetype `" << now ().name ()
<< "\' may not inherit from concrete valuetype `"
<< v.scoped_name () << "\'" << endl;
return;
@@ -148,7 +156,11 @@ namespace CCF
if (now ().inherits_begin () != now ().inherits_end () &&
!abstract)
{
- cerr << "concrete valuetype `" << v.scoped_name ()
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "invalid inheritance specification" << endl;
+
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "concrete valuetype `" << v.scoped_name ()
<< "\' is not the first in the inheritance list of "
<< "valuetype `" << now ().name () << "\'" << endl;
return;
@@ -160,29 +172,36 @@ namespace CCF
}
catch (Resolve const&)
{
- cerr << "error: invalid inheritance specification" << endl;
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "invalid inheritance specification" << endl;
throw;
}
}
catch (NotFound const&)
{
- cerr << "no valuetype with name \'" << name
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "no valuetype with name \'" << name
<< "\' visible from scope \'" << from << "\'" << endl;
}
catch (WrongType const&)
{
- cerr << "incompatible type in inheritance specification" << endl;
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "incompatible type in inheritance specification" << endl;
}
catch (NotDefined const& e)
{
- cerr << "attempt to inherit from the forward-declared valuetype "
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "attempt to inherit from the forward-declared valuetype "
<< e.name () << endl;
- cerr << "inheritance from a forward-declared valuetype is illegal"
+
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "inheritance from a forward-declared valuetype is illegal"
<< endl;
}
catch (AlreadyInherited const& e)
{
- cerr << "directly inheriting from valuetype \'" << e.name ()
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "directly inheriting from valuetype \'" << e.name ()
<< "\' more than once is illegal" << endl;
}
}
@@ -211,29 +230,36 @@ namespace CCF
}
catch (Resolve const&)
{
- cerr << "error: invalid supports specification" << endl;
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "invalid supports specification" << endl;
throw;
}
}
catch (NotFound const&)
{
- cerr << "no interface with name \'" << name
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "no interface with name \'" << name
<< "\' visible from scope \'" << from << "\'" << endl;
}
catch (WrongType const&)
{
- cerr << "incompatible type in supports specification" << endl;
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "incompatible type in supports specification" << endl;
}
catch (NotDefined const& e)
{
- cerr << "attempt to support forward-declared interface "
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "attempt to support forward-declared interface "
<< e.name () << endl;
- cerr << "support of forward-declared interface is illegal"
+
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "support of forward-declared interface is illegal"
<< endl;
}
catch (AlreadySupported const& e)
{
- cerr << "directly supporting interface \'" << e.name ()
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "directly supporting interface \'" << e.name ()
<< "\' more than once is illegal" << endl;
}
}
diff --git a/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/ValueTypeFactory.cpp b/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/ValueTypeFactory.cpp
index be0ccecd926..f87138f9b70 100644
--- a/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/ValueTypeFactory.cpp
+++ b/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/ValueTypeFactory.cpp
@@ -38,7 +38,8 @@ namespace CCF
SimpleName name (id->lexeme ());
- f_ = &ctx.tu ().new_node<SemanticGraph::ValueTypeFactory> ();
+ f_ = &ctx.tu ().new_node<SemanticGraph::ValueTypeFactory> (
+ ctx.file (), id->line ());
ctx.tu ().new_edge<Returns> (*f_, h);
ctx.tu ().new_edge<Defines> (ctx.scope (), *f_, name);
@@ -64,33 +65,40 @@ namespace CCF
Type& t (resolve<Type> (from, name, Flags::complete));
Parameter& p (
- ctx.tu ().new_node<InParameter> (name_id->lexeme ()));
+ ctx.tu ().new_node<InParameter> (
+ ctx.file (), name_id->line (), name_id->lexeme ()));
ctx.tu ().new_edge<Belongs> (p, t);
ctx.tu ().new_edge<Receives> (*f_, p);
}
catch (Resolve const&)
{
- cerr << "error: invalid parameter declaration" << endl;
+ cerr << ctx.file () << ":" << type_id->line () << ": error: "
+ << "invalid parameter declaration" << endl;
throw;
}
}
catch (NotFound const&)
{
- cerr << "no type with name \'" << name
+ cerr << ctx.file () << ":" << type_id->line () << ": error: "
+ << "no type with name \'" << name
<< "\' visible from scope \'" << from << "\'" << endl;
}
catch (WrongType const&)
{
- cerr << "declaration with name \'" << name
+ cerr << ctx.file () << ":" << type_id->line () << ": error: "
+ << "declaration with name \'" << name
<< "\' visible from scope \'" << from
<< "\' is not a type declaration" << endl;
- cerr << "using non-type as an factory parameter type is "
+
+ cerr << ctx.file () << ":" << type_id->line () << ": error: "
+ << "using non-type as an factory parameter type is "
<< "illegal" << endl;
}
catch (NotComplete const& e)
{
- cerr << "type \'" << e.name () << "\' is not complete" << endl;
+ cerr << ctx.file () << ":" << type_id->line () << ": error: "
+ << "type \'" << e.name () << "\' is not complete" << endl;
}
}
@@ -115,21 +123,26 @@ namespace CCF
}
catch (Resolve const&)
{
- cerr << "error: invalid raises declaration" << endl;
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "invalid raises declaration" << endl;
throw;
}
}
catch (NotFound const&)
{
- cerr << "no exception with name \'" << name
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "no exception with name \'" << name
<< "\' visible from scope \'" << from << "\'" << endl;
}
catch (WrongType const&)
{
- cerr << "declaration with name \'" << name
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "declaration with name \'" << name
<< "\' visible from scope \'" << from
<< "\' is not an exception declaration" << endl;
- cerr << "using non-exception type in raises declaration is "
+
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "using non-exception type in raises declaration is "
<< "illegal" << endl;
}
}
diff --git a/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/ValueTypeMember.cpp b/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/ValueTypeMember.cpp
index c6de66ccc1b..c85b8023a07 100644
--- a/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/ValueTypeMember.cpp
+++ b/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/ValueTypeMember.cpp
@@ -30,7 +30,8 @@ namespace CCF
void ValueTypeMember::
begin_private ()
{
- if (ctx.trace ()) cerr << "private valuetype member" << endl;
+ if (ctx.trace ())
+ cerr << "private valuetype member" << endl;
access_ = SemanticGraph::ValueTypeMember::Access::private_;
}
@@ -38,7 +39,8 @@ namespace CCF
void ValueTypeMember::
begin_public ()
{
- if (ctx.trace ()) cerr << "public valuetype member" << endl;
+ if (ctx.trace ())
+ cerr << "public valuetype member" << endl;
access_ = SemanticGraph::ValueTypeMember::Access::public_;
}
@@ -46,7 +48,8 @@ namespace CCF
void ValueTypeMember::
type (IdentifierPtr const& id)
{
- if (ctx.trace ()) cerr << " type: " << id << endl;
+ if (ctx.trace ())
+ cerr << " type: " << id << endl;
type_ = 0;
@@ -61,7 +64,8 @@ namespace CCF
}
catch (Resolve const&)
{
- cerr << "error: invalid valuetype member declaration" << endl;
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "invalid valuetype member declaration" << endl;
throw;
}
@@ -73,20 +77,25 @@ namespace CCF
}
catch (NotFound const&)
{
- cerr << "no type with name \'" << name
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "no type with name \'" << name
<< "\' visible from scope \'" << from << "\'" << endl;
}
catch (WrongType const&)
{
- cerr << "declaration with name \'" << name
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "declaration with name \'" << name
<< "\' visible from scope \'" << from
<< "\' is not a type declaration" << endl;
- cerr << "using non-type as a valuetype member type is illegal"
+
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "using non-type as a valuetype member type is illegal"
<< endl;
}
catch (NotComplete const& e)
{
- cerr << "type \'" << e.name () << "\' is not complete" << endl;
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "type \'" << e.name () << "\' is not complete" << endl;
}
}
@@ -108,12 +117,14 @@ namespace CCF
{
case SemanticGraph::ValueTypeMember::Access::private_:
{
- m = &ctx.tu ().new_node<ValueTypePrivateMember> ();
+ m = &ctx.tu ().new_node<ValueTypePrivateMember> (
+ ctx.file (), id->line ());
break;
}
case SemanticGraph::ValueTypeMember::Access::public_:
{
- m = &ctx.tu ().new_node<ValueTypePublicMember> ();
+ m = &ctx.tu ().new_node<ValueTypePublicMember> (
+ ctx.file (), id->line ());
break;
}
default:
diff --git a/CIAO/CCF/CCF/IDL2/SemanticAction/NumericExpression.hpp b/CIAO/CCF/CCF/IDL2/SemanticAction/NumericExpression.hpp
index 09dcc964cb6..4b0423d8e63 100644
--- a/CIAO/CCF/CCF/IDL2/SemanticAction/NumericExpression.hpp
+++ b/CIAO/CCF/CCF/IDL2/SemanticAction/NumericExpression.hpp
@@ -25,6 +25,9 @@ namespace CCF
integer_literal (IntegerLiteralPtr const&) = 0;
virtual void
+ pre (OperatorPtr const&) = 0;
+
+ virtual void
pos () = 0;
virtual void
diff --git a/CIAO/CCF/CCF/IDL2/SemanticAction/Typedef.hpp b/CIAO/CCF/CCF/IDL2/SemanticAction/Typedef.hpp
index d1782591270..8e76d3c3a7f 100644
--- a/CIAO/CCF/CCF/IDL2/SemanticAction/Typedef.hpp
+++ b/CIAO/CCF/CCF/IDL2/SemanticAction/Typedef.hpp
@@ -16,6 +16,9 @@ namespace CCF
struct Typedef
{
virtual void
+ pre (KeywordPtr const& id) = 0;
+
+ virtual void
begin (IdentifierPtr const& id) = 0;
virtual void
diff --git a/CIAO/CCF/CCF/IDL2/SemanticGraph/Array.hpp b/CIAO/CCF/CCF/IDL2/SemanticGraph/Array.hpp
index 47542f6772a..baf2e5afe70 100644
--- a/CIAO/CCF/CCF/IDL2/SemanticGraph/Array.hpp
+++ b/CIAO/CCF/CCF/IDL2/SemanticGraph/Array.hpp
@@ -45,7 +45,8 @@ namespace CCF
protected:
friend class Graph<Node, Edge>;
- Array ()
+ Array (Path const& path, unsigned long line)
+ : Node (path, line)
{
type_info (static_type_info ());
}
diff --git a/CIAO/CCF/CCF/IDL2/SemanticGraph/Attribute.cpp b/CIAO/CCF/CCF/IDL2/SemanticGraph/Attribute.cpp
index 5986dc8db51..2b2a99b09fb 100644
--- a/CIAO/CCF/CCF/IDL2/SemanticGraph/Attribute.cpp
+++ b/CIAO/CCF/CCF/IDL2/SemanticGraph/Attribute.cpp
@@ -33,6 +33,11 @@ namespace CCF
TypeInfo const& Attribute::
static_type_info () { return attribute_; }
+ Attribute::
+ ~Attribute ()
+ {
+ }
+
// GetRaises
//
diff --git a/CIAO/CCF/CCF/IDL2/SemanticGraph/Attribute.hpp b/CIAO/CCF/CCF/IDL2/SemanticGraph/Attribute.hpp
index a307d09e012..c5f041f5c3d 100644
--- a/CIAO/CCF/CCF/IDL2/SemanticGraph/Attribute.hpp
+++ b/CIAO/CCF/CCF/IDL2/SemanticGraph/Attribute.hpp
@@ -26,10 +26,13 @@ namespace CCF
protected:
friend class Graph<Node, Edge>;
- Attribute ()
+ Attribute () // For virtual inheritance only.
{
type_info (static_type_info ());
}
+
+ virtual
+ ~Attribute () = 0;
};
@@ -118,7 +121,8 @@ namespace CCF
protected:
friend class Graph<Node, Edge>;
- ReadAttribute ()
+ ReadAttribute (Path const& path, unsigned long line)
+ : Node (path, line)
{
type_info (static_type_info ());
}
@@ -215,7 +219,8 @@ namespace CCF
protected:
friend class Graph<Node, Edge>;
- WriteAttribute ()
+ WriteAttribute (Path const& path, unsigned long line)
+ : Node (path, line)
{
type_info (static_type_info ());
}
@@ -244,7 +249,10 @@ namespace CCF
protected:
friend class Graph<Node, Edge>;
- ReadWriteAttribute ()
+ ReadWriteAttribute (Path const& path, unsigned long line)
+ : Node (path, line),
+ ReadAttribute (path, line),
+ WriteAttribute (path, line)
{
type_info (static_type_info ());
}
diff --git a/CIAO/CCF/CCF/IDL2/SemanticGraph/Elements.cpp b/CIAO/CCF/CCF/IDL2/SemanticGraph/Elements.cpp
index cae24c8a60f..824c7634404 100644
--- a/CIAO/CCF/CCF/IDL2/SemanticGraph/Elements.cpp
+++ b/CIAO/CCF/CCF/IDL2/SemanticGraph/Elements.cpp
@@ -4,6 +4,8 @@
#include "CCF/IDL2/SemanticGraph/Elements.hpp"
+#include <ostream>
+
namespace CCF
{
namespace IDL2
@@ -54,11 +56,18 @@ namespace CCF
}
Node::
- Node ()
+ Node (Path const& file, unsigned long line)
+ : file_ (file), line_ (line)
{
type_info (static_type_info ());
}
+ Node::
+ Node ()
+ {
+ abort (); // This ctor should never be called.
+ }
+
namespace
{
TypeInfo
@@ -163,6 +172,11 @@ namespace CCF
//
//
+ Nameable::
+ ~Nameable ()
+ {
+ }
+
SimpleName Nameable::
name () const
{
@@ -217,9 +231,15 @@ namespace CCF
TypeInfo const& Extends::
static_type_info () { return extends_; }
+
// Scope
//
//
+ Scope::
+ ~Scope ()
+ {
+ }
+
Nameables Scope::
lookup (Name const& name) const
{
@@ -311,6 +331,10 @@ namespace CCF
TypeInfo const& Type::
static_type_info () { return type_; }
+ Type::
+ ~Type ()
+ {
+ }
// Instance
//
@@ -331,6 +355,10 @@ namespace CCF
TypeInfo const& Instance::
static_type_info () { return instance_; }
+ Instance::
+ ~Instance ()
+ {
+ }
// Belongs
//
@@ -384,6 +412,12 @@ namespace CCF
arguments_.push_back (&e);
}
+ Specialization::
+ ~Specialization ()
+ {
+ }
+
+
// Arguments
//
//
@@ -534,6 +568,11 @@ namespace CCF
TypeInfo const& Expression::
static_type_info () { return expression_; }
+ Expression::
+ ~Expression ()
+ {
+ }
+
// Const
//
@@ -556,6 +595,10 @@ namespace CCF
TypeInfo const& Const::
static_type_info () { return const_; }
+ Const::
+ ~Const ()
+ {
+ }
// Contains
//
@@ -595,6 +638,19 @@ namespace CCF
TypeInfo const& Container::
static_type_info () { return container_; }
+
+ Container::
+ ~Container ()
+ {
+ }
}
}
}
+
+//
+//
+std::ostream&
+operator<< (std::ostream& os, CCF::IDL2::SemanticGraph::Path const& path)
+{
+ return os << path.native_file_string ();
+}
diff --git a/CIAO/CCF/CCF/IDL2/SemanticGraph/Elements.hpp b/CIAO/CCF/CCF/IDL2/SemanticGraph/Elements.hpp
index 24a18fd3205..ff92670ee23 100644
--- a/CIAO/CCF/CCF/IDL2/SemanticGraph/Elements.hpp
+++ b/CIAO/CCF/CCF/IDL2/SemanticGraph/Elements.hpp
@@ -7,9 +7,11 @@
#include <set>
#include <vector>
+#include <iosfwd>
#include "Graph.hpp"
+#include "CCF/CompilerElements/FileSystem.hpp"
#include "CCF/CompilerElements/Introspection.hpp"
#include "CCF/CompilerElements/Context.hpp"
@@ -23,6 +25,10 @@ namespace CCF
{
//
//
+ typedef fs::path Path;
+
+ //
+ //
//
class Node;
@@ -85,6 +91,19 @@ namespace CCF
}
public:
+ Path const&
+ file () const
+ {
+ return file_;
+ }
+
+ unsigned long
+ line () const
+ {
+ return line_;
+ }
+
+ public:
static Introspection::TypeInfo const&
static_type_info ();
@@ -92,9 +111,11 @@ namespace CCF
friend class Graph<Node, Edge>;
virtual
- ~Node ();
+ ~Node () = 0;
+
+ Node (Path const& path, unsigned long line);
- Node ();
+ Node (); // For virtual inheritance only.
// This is a bunch of experimantal sink functions that allow
// extensions in the form of one-way edges (see Executor stuff
@@ -111,6 +132,8 @@ namespace CCF
}
private:
+ Path file_;
+ unsigned long line_;
CompilerElements::Context context_;
};
@@ -290,12 +313,14 @@ namespace CCF
protected:
friend class Graph<Node, Edge>;
- Nameable ()
- : defined_ (false)
+ Nameable () // For virtual inheritance only.
{
type_info (static_type_info ());
}
+ virtual
+ ~Nameable () = 0;
+
void
add_edge_right (Defines& e)
{
@@ -445,11 +470,14 @@ namespace CCF
protected:
friend class Graph<Node, Edge>;
- Scope ()
+ Scope () // For virtual inheritance only.
{
type_info (static_type_info ());
}
+ virtual
+ ~Scope () = 0;
+
void
add_edge_left (Names& e);
@@ -496,11 +524,14 @@ namespace CCF
protected:
friend class Graph<Node, Edge>;
- Type ()
+ Type () // For virtual inheritance only.
{
type_info (static_type_info ());
}
+ virtual
+ ~Type () = 0;
+
using Nameable::add_edge_right;
void
@@ -541,11 +572,14 @@ namespace CCF
protected:
friend class Graph<Node, Edge>;
- Instance ()
+ Instance () // For virtual inheritance only.
{
type_info (static_type_info ());
}
+ virtual
+ ~Instance () = 0;
+
void
add_edge_left (Belongs& e)
{
@@ -637,11 +671,14 @@ namespace CCF
protected:
friend class Graph<Node, Edge>;
- Specialization ()
+ Specialization () // For virtual inheritance only.
{
type_info (static_type_info ());
}
+ virtual
+ ~Specialization () = 0;
+
void
add_edge_right (ArgumentsWithType& e);
@@ -875,11 +912,14 @@ namespace CCF
protected:
friend class Graph<Node, Edge>;
- Expression ()
+ Expression () // For virtual inheritance only.
{
type_info (static_type_info ());
}
+ virtual
+ ~Expression () = 0;
+
void
add_edge_left (Initializes&)
{
@@ -909,11 +949,14 @@ namespace CCF
protected:
friend class Graph<Node, Edge>;
- Const ()
+ Const () // For virtual inheritance only.
{
type_info (static_type_info ());
}
+ virtual
+ ~Const () = 0;
+
using Instance::add_edge_left;
using Expression::add_edge_left;
@@ -1003,11 +1046,14 @@ namespace CCF
protected:
friend class Graph<Node, Edge>;
- Container ()
+ Container () // For virtual inheritance only.
{
type_info (static_type_info ());
}
+ virtual
+ ~Container () = 0;
+
void
add_edge_left (Contains& e)
{
@@ -1021,6 +1067,12 @@ namespace CCF
}
}
+// ADL won't find it because Path is a typedef. Note that this
+// function prints in native format.
+//
+std::ostream&
+operator<< (std::ostream& os, CCF::IDL2::SemanticGraph::Path const& path);
+
#include "CCF/IDL2/SemanticGraph/Elements.tpp"
#endif // CCF_IDL2_SEMANTIC_GRAPH_ELEMENTS_HPP
diff --git a/CIAO/CCF/CCF/IDL2/SemanticGraph/Enum.hpp b/CIAO/CCF/CCF/IDL2/SemanticGraph/Enum.hpp
index 6e3d2ee723d..9179b471791 100644
--- a/CIAO/CCF/CCF/IDL2/SemanticGraph/Enum.hpp
+++ b/CIAO/CCF/CCF/IDL2/SemanticGraph/Enum.hpp
@@ -28,7 +28,8 @@ namespace CCF
protected:
friend class Graph<Node, Edge>;
- Enum ()
+ Enum (Path const& path, unsigned long line)
+ : Node (path, line)
{
type_info (static_type_info ());
}
@@ -44,7 +45,8 @@ namespace CCF
protected:
friend class Graph<Node, Edge>;
- Enumerator ()
+ Enumerator (Path const& path, unsigned long line)
+ : Node (path, line), IntConst (path, line)
{
type_info (static_type_info ());
}
diff --git a/CIAO/CCF/CCF/IDL2/SemanticGraph/Exception.hpp b/CIAO/CCF/CCF/IDL2/SemanticGraph/Exception.hpp
index 61e01f3b282..712cdf1ca8a 100644
--- a/CIAO/CCF/CCF/IDL2/SemanticGraph/Exception.hpp
+++ b/CIAO/CCF/CCF/IDL2/SemanticGraph/Exception.hpp
@@ -30,7 +30,8 @@ namespace CCF
protected:
friend class Graph<Node, Edge>;
- Exception ()
+ Exception (Path const& path, unsigned long line)
+ : Node (path, line)
{
type_info (static_type_info ());
}
diff --git a/CIAO/CCF/CCF/IDL2/SemanticGraph/Fundamental.cpp b/CIAO/CCF/CCF/IDL2/SemanticGraph/Fundamental.cpp
index e08990e7ed8..789accfe3b9 100644
--- a/CIAO/CCF/CCF/IDL2/SemanticGraph/Fundamental.cpp
+++ b/CIAO/CCF/CCF/IDL2/SemanticGraph/Fundamental.cpp
@@ -35,6 +35,11 @@ namespace CCF
TypeInfo const& FundamentalType::
static_type_info () { return fundamental_type_; }
+ FundamentalType::
+ ~FundamentalType ()
+ {
+ }
+
// Object
//
diff --git a/CIAO/CCF/CCF/IDL2/SemanticGraph/Fundamental.cpp.m4 b/CIAO/CCF/CCF/IDL2/SemanticGraph/Fundamental.cpp.m4
index c42780fd178..da1d8eca574 100644
--- a/CIAO/CCF/CCF/IDL2/SemanticGraph/Fundamental.cpp.m4
+++ b/CIAO/CCF/CCF/IDL2/SemanticGraph/Fundamental.cpp.m4
@@ -72,6 +72,11 @@ namespace CCF
TypeInfo const& FundamentalType::
static_type_info () { return fundamental_type_; }
+
+ FundamentalType::
+ ~FundamentalType ()
+ {
+ }
dnl
fundamental_type(`object')
fundamental_type(`value base')
diff --git a/CIAO/CCF/CCF/IDL2/SemanticGraph/Fundamental.hpp b/CIAO/CCF/CCF/IDL2/SemanticGraph/Fundamental.hpp
index 774b7c18910..a756acc352e 100644
--- a/CIAO/CCF/CCF/IDL2/SemanticGraph/Fundamental.hpp
+++ b/CIAO/CCF/CCF/IDL2/SemanticGraph/Fundamental.hpp
@@ -32,10 +32,13 @@ namespace CCF
static_type_info ();
protected:
- FundamentalType ()
+ FundamentalType () // For virtual inheritance only.
{
type_info (static_type_info ());
}
+
+ virtual
+ ~FundamentalType () = 0;
};
@@ -51,7 +54,8 @@ namespace CCF
protected:
friend class Graph<Node, Edge>;
- Object ()
+ Object (Path const& path, unsigned long line)
+ : Node (path, line)
{
type_info (static_type_info ());
}
@@ -70,7 +74,8 @@ namespace CCF
protected:
friend class Graph<Node, Edge>;
- ValueBase ()
+ ValueBase (Path const& path, unsigned long line)
+ : Node (path, line)
{
type_info (static_type_info ());
}
@@ -89,7 +94,8 @@ namespace CCF
protected:
friend class Graph<Node, Edge>;
- Any ()
+ Any (Path const& path, unsigned long line)
+ : Node (path, line)
{
type_info (static_type_info ());
}
@@ -108,7 +114,8 @@ namespace CCF
protected:
friend class Graph<Node, Edge>;
- Boolean ()
+ Boolean (Path const& path, unsigned long line)
+ : Node (path, line)
{
type_info (static_type_info ());
}
@@ -127,7 +134,8 @@ namespace CCF
protected:
friend class Graph<Node, Edge>;
- Char ()
+ Char (Path const& path, unsigned long line)
+ : Node (path, line)
{
type_info (static_type_info ());
}
@@ -146,7 +154,8 @@ namespace CCF
protected:
friend class Graph<Node, Edge>;
- Double ()
+ Double (Path const& path, unsigned long line)
+ : Node (path, line)
{
type_info (static_type_info ());
}
@@ -165,7 +174,8 @@ namespace CCF
protected:
friend class Graph<Node, Edge>;
- Float ()
+ Float (Path const& path, unsigned long line)
+ : Node (path, line)
{
type_info (static_type_info ());
}
@@ -184,7 +194,8 @@ namespace CCF
protected:
friend class Graph<Node, Edge>;
- Long ()
+ Long (Path const& path, unsigned long line)
+ : Node (path, line)
{
type_info (static_type_info ());
}
@@ -203,7 +214,8 @@ namespace CCF
protected:
friend class Graph<Node, Edge>;
- LongDouble ()
+ LongDouble (Path const& path, unsigned long line)
+ : Node (path, line)
{
type_info (static_type_info ());
}
@@ -222,7 +234,8 @@ namespace CCF
protected:
friend class Graph<Node, Edge>;
- LongLong ()
+ LongLong (Path const& path, unsigned long line)
+ : Node (path, line)
{
type_info (static_type_info ());
}
@@ -241,7 +254,8 @@ namespace CCF
protected:
friend class Graph<Node, Edge>;
- Octet ()
+ Octet (Path const& path, unsigned long line)
+ : Node (path, line)
{
type_info (static_type_info ());
}
@@ -260,7 +274,8 @@ namespace CCF
protected:
friend class Graph<Node, Edge>;
- Short ()
+ Short (Path const& path, unsigned long line)
+ : Node (path, line)
{
type_info (static_type_info ());
}
@@ -279,7 +294,8 @@ namespace CCF
protected:
friend class Graph<Node, Edge>;
- String ()
+ String (Path const& path, unsigned long line)
+ : Node (path, line)
{
type_info (static_type_info ());
}
@@ -298,7 +314,8 @@ namespace CCF
protected:
friend class Graph<Node, Edge>;
- UnsignedLong ()
+ UnsignedLong (Path const& path, unsigned long line)
+ : Node (path, line)
{
type_info (static_type_info ());
}
@@ -317,7 +334,8 @@ namespace CCF
protected:
friend class Graph<Node, Edge>;
- UnsignedLongLong ()
+ UnsignedLongLong (Path const& path, unsigned long line)
+ : Node (path, line)
{
type_info (static_type_info ());
}
@@ -336,7 +354,8 @@ namespace CCF
protected:
friend class Graph<Node, Edge>;
- UnsignedShort ()
+ UnsignedShort (Path const& path, unsigned long line)
+ : Node (path, line)
{
type_info (static_type_info ());
}
@@ -355,7 +374,8 @@ namespace CCF
protected:
friend class Graph<Node, Edge>;
- Void ()
+ Void (Path const& path, unsigned long line)
+ : Node (path, line)
{
type_info (static_type_info ());
}
@@ -374,7 +394,8 @@ namespace CCF
protected:
friend class Graph<Node, Edge>;
- Wchar ()
+ Wchar (Path const& path, unsigned long line)
+ : Node (path, line)
{
type_info (static_type_info ());
}
@@ -393,7 +414,8 @@ namespace CCF
protected:
friend class Graph<Node, Edge>;
- Wstring ()
+ Wstring (Path const& path, unsigned long line)
+ : Node (path, line)
{
type_info (static_type_info ());
}
diff --git a/CIAO/CCF/CCF/IDL2/SemanticGraph/Fundamental.hpp.m4 b/CIAO/CCF/CCF/IDL2/SemanticGraph/Fundamental.hpp.m4
index b0b3734a349..864dcd76435 100644
--- a/CIAO/CCF/CCF/IDL2/SemanticGraph/Fundamental.hpp.m4
+++ b/CIAO/CCF/CCF/IDL2/SemanticGraph/Fundamental.hpp.m4
@@ -22,7 +22,8 @@ define(`fundamental_type_impl', `
protected:
friend class Graph<Node, Edge>;
- $1 ()
+ $1 (Path const& path, unsigned long line)
+ : Node (path, line)
{
type_info (static_type_info ());
}
@@ -65,10 +66,13 @@ namespace CCF
static_type_info ();
protected:
- FundamentalType ()
+ FundamentalType () // For virtual inheritance only.
{
type_info (static_type_info ());
}
+
+ virtual
+ ~FundamentalType () = 0;
};
dnl
fundamental_type(`Object')
diff --git a/CIAO/CCF/CCF/IDL2/SemanticGraph/Graph.hpp b/CIAO/CCF/CCF/IDL2/SemanticGraph/Graph.hpp
index 18a29fb3c2f..f71140569de 100644
--- a/CIAO/CCF/CCF/IDL2/SemanticGraph/Graph.hpp
+++ b/CIAO/CCF/CCF/IDL2/SemanticGraph/Graph.hpp
@@ -38,6 +38,18 @@ namespace CCF
T&
new_node (A0 const& a0, A1 const& a1);
+ template <typename T, typename A0, typename A1, typename A2>
+ T&
+ new_node (A0 const& a0, A1 const& a1, A2 const& a2);
+
+ template <typename T,
+ typename A0,
+ typename A1,
+ typename A2,
+ typename A3>
+ T&
+ new_node (A0 const& a0, A1 const& a1, A2 const& a2, A3 const& a3);
+
void
delete_node (N const& n);
diff --git a/CIAO/CCF/CCF/IDL2/SemanticGraph/Graph.tpp b/CIAO/CCF/CCF/IDL2/SemanticGraph/Graph.tpp
index 87a4a6a7ed3..37a952a3f34 100644
--- a/CIAO/CCF/CCF/IDL2/SemanticGraph/Graph.tpp
+++ b/CIAO/CCF/CCF/IDL2/SemanticGraph/Graph.tpp
@@ -45,6 +45,30 @@ namespace CCF
return *n;
}
+ template <typename N, typename E>
+ template <typename T, typename A0, typename A1, typename A2>
+ T& Graph<N, E>::
+ new_node (A0 const& a0, A1 const& a1, A2 const& a2)
+ {
+ T* n (new T (a0, a1, a2)); //@@ auto
+ nodes_.insert (n);
+ return *n;
+ }
+
+ template <typename N, typename E>
+ template <typename T,
+ typename A0,
+ typename A1,
+ typename A2,
+ typename A3>
+ T& Graph<N, E>::
+ new_node (A0 const& a0, A1 const& a1, A2 const& a2, A3 const& a3)
+ {
+ T* n (new T (a0, a1, a2, a3)); //@@ auto
+ nodes_.insert (n);
+ return *n;
+ }
+
template <typename N, typename E>
void Graph<N, E>::
diff --git a/CIAO/CCF/CCF/IDL2/SemanticGraph/IntExpression.cpp b/CIAO/CCF/CCF/IDL2/SemanticGraph/IntExpression.cpp
index b294e197df1..a6633df762b 100644
--- a/CIAO/CCF/CCF/IDL2/SemanticGraph/IntExpression.cpp
+++ b/CIAO/CCF/CCF/IDL2/SemanticGraph/IntExpression.cpp
@@ -31,6 +31,10 @@ namespace CCF
TypeInfo const& IntExpression::
static_type_info () { return int_expression_; }
+ IntExpression::
+ ~IntExpression ()
+ {
+ }
// IntLiteral
//
diff --git a/CIAO/CCF/CCF/IDL2/SemanticGraph/IntExpression.hpp b/CIAO/CCF/CCF/IDL2/SemanticGraph/IntExpression.hpp
index da0c4fc85cb..263563e9bb6 100644
--- a/CIAO/CCF/CCF/IDL2/SemanticGraph/IntExpression.hpp
+++ b/CIAO/CCF/CCF/IDL2/SemanticGraph/IntExpression.hpp
@@ -24,10 +24,13 @@ namespace CCF
protected:
friend class Graph<Node, Edge>;
- IntExpression ()
+ IntExpression () // For virtual inheritance only.
{
type_info (static_type_info ());
}
+
+ virtual
+ ~IntExpression () = 0;
};
@@ -48,8 +51,10 @@ namespace CCF
protected:
friend class Graph<Node, Edge>;
- IntLiteral (unsigned long long value)
- : value_ (value)
+ IntLiteral (Path const& path,
+ unsigned long line,
+ unsigned long long value)
+ : Node (path, line), value_ (value)
{
type_info (static_type_info ());
}
@@ -71,7 +76,8 @@ namespace CCF
protected:
friend class Graph<Node, Edge>;
- IntConst ()
+ IntConst (Path const& path, unsigned long line)
+ : Node (path, line)
{
type_info (static_type_info ());
}
@@ -134,8 +140,8 @@ namespace CCF
protected:
friend class Graph<Node, Edge>;
- IntNeg ()
- : negates_ (0)
+ IntNeg (Path const& path, unsigned long line)
+ : Node (path, line), negates_ (0)
{
type_info (static_type_info ());
}
@@ -207,8 +213,8 @@ namespace CCF
protected:
friend class Graph<Node, Edge>;
- IntCom ()
- : complements_ (0)
+ IntCom (Path const& path, unsigned long line)
+ : Node (path, line), complements_ (0)
{
type_info (static_type_info ());
}
@@ -286,8 +292,10 @@ namespace CCF
protected:
friend class Graph<Node, Edge>;
- IntMul ()
- : first_factor_ (0), second_factor_ (0)
+ IntMul (Path const& path, unsigned long line)
+ : Node (path, line),
+ first_factor_ (0),
+ second_factor_ (0)
{
type_info (static_type_info ());
}
@@ -375,8 +383,10 @@ namespace CCF
protected:
friend class Graph<Node, Edge>;
- IntDiv ()
- : divident_ (0), divisor_ (0)
+ IntDiv (Path const& path, unsigned long line)
+ : Node (path, line),
+ divident_ (0),
+ divisor_ (0)
{
type_info (static_type_info ());
}
@@ -416,8 +426,10 @@ namespace CCF
protected:
friend class Graph<Node, Edge>;
- IntRem ()
- : divident_ (0), divisor_ (0)
+ IntRem (Path const& path, unsigned long line)
+ : Node (path, line),
+ divident_ (0),
+ divisor_ (0)
{
type_info (static_type_info ());
}
@@ -499,8 +511,10 @@ namespace CCF
protected:
friend class Graph<Node, Edge>;
- IntAdd ()
- : first_item_ (0), second_item_ (0)
+ IntAdd (Path const& path, unsigned long line)
+ : Node (path, line),
+ first_item_ (0),
+ second_item_ (0)
{
type_info (static_type_info ());
}
@@ -582,8 +596,10 @@ namespace CCF
protected:
friend class Graph<Node, Edge>;
- IntSub ()
- : minuend_ (0), subtrahend_ (0)
+ IntSub (Path const& path, unsigned long line)
+ : Node (path, line),
+ minuend_ (0),
+ subtrahend_ (0)
{
type_info (static_type_info ());
}
@@ -671,8 +687,10 @@ namespace CCF
protected:
friend class Graph<Node, Edge>;
- IntRsh ()
- : pattern_ (0), factor_ (0)
+ IntRsh (Path const& path, unsigned long line)
+ : Node (path, line),
+ pattern_ (0),
+ factor_ (0)
{
type_info (static_type_info ());
}
@@ -712,8 +730,10 @@ namespace CCF
protected:
friend class Graph<Node, Edge>;
- IntLsh ()
- : pattern_ (0), factor_ (0)
+ IntLsh (Path const& path, unsigned long line)
+ : Node (path, line),
+ pattern_ (0),
+ factor_ (0)
{
type_info (static_type_info ());
}
@@ -795,8 +815,10 @@ namespace CCF
protected:
friend class Graph<Node, Edge>;
- IntAnd ()
- : first_pattern_ (0), second_pattern_ (0)
+ IntAnd (Path const& path, unsigned long line)
+ : Node (path, line),
+ first_pattern_ (0),
+ second_pattern_ (0)
{
type_info (static_type_info ());
}
@@ -878,8 +900,10 @@ namespace CCF
protected:
friend class Graph<Node, Edge>;
- IntXor ()
- : first_pattern_ (0), second_pattern_ (0)
+ IntXor (Path const& path, unsigned long line)
+ : Node (path, line),
+ first_pattern_ (0),
+ second_pattern_ (0)
{
type_info (static_type_info ());
}
@@ -961,8 +985,10 @@ namespace CCF
protected:
friend class Graph<Node, Edge>;
- IntOr ()
- : first_pattern_ (0), second_pattern_ (0)
+ IntOr (Path const& path, unsigned long line)
+ : Node (path, line),
+ first_pattern_ (0),
+ second_pattern_ (0)
{
type_info (static_type_info ());
}
diff --git a/CIAO/CCF/CCF/IDL2/SemanticGraph/Interface.cpp b/CIAO/CCF/CCF/IDL2/SemanticGraph/Interface.cpp
index de5b996610f..4083549f3e2 100644
--- a/CIAO/CCF/CCF/IDL2/SemanticGraph/Interface.cpp
+++ b/CIAO/CCF/CCF/IDL2/SemanticGraph/Interface.cpp
@@ -34,6 +34,10 @@ namespace CCF
TypeInfo const& Interface::
static_type_info () { return interface_; }
+ Interface::
+ ~Interface ()
+ {
+ }
// Supports
//
diff --git a/CIAO/CCF/CCF/IDL2/SemanticGraph/Interface.hpp b/CIAO/CCF/CCF/IDL2/SemanticGraph/Interface.hpp
index 7649c0a4d9d..1335b69a6cb 100644
--- a/CIAO/CCF/CCF/IDL2/SemanticGraph/Interface.hpp
+++ b/CIAO/CCF/CCF/IDL2/SemanticGraph/Interface.hpp
@@ -52,11 +52,14 @@ namespace CCF
protected:
friend class Graph<Node, Edge>;
- Interface ()
+ Interface () // For virtual inheritance only.
{
type_info (static_type_info ());
}
+ virtual
+ ~Interface () = 0;
+
using Type::add_edge_right;
using Scope::add_edge_left;
@@ -125,7 +128,8 @@ namespace CCF
protected:
friend class Graph<Node, Edge>;
- AbstractInterface ()
+ AbstractInterface (Path const& path, unsigned long line)
+ : Node (path, line)
{
type_info (static_type_info ());
}
@@ -144,7 +148,8 @@ namespace CCF
protected:
friend class Graph<Node, Edge>;
- LocalInterface ()
+ LocalInterface (Path const& path, unsigned long line)
+ : Node (path, line)
{
type_info (static_type_info ());
}
@@ -163,7 +168,8 @@ namespace CCF
protected:
friend class Graph<Node, Edge>;
- UnconstrainedInterface ()
+ UnconstrainedInterface (Path const& path, unsigned long line)
+ : Node (path, line)
{
type_info (static_type_info ());
}
diff --git a/CIAO/CCF/CCF/IDL2/SemanticGraph/Literals.cpp b/CIAO/CCF/CCF/IDL2/SemanticGraph/Literals.cpp
index 7d7e5e3137b..86c64116b23 100644
--- a/CIAO/CCF/CCF/IDL2/SemanticGraph/Literals.cpp
+++ b/CIAO/CCF/CCF/IDL2/SemanticGraph/Literals.cpp
@@ -12,14 +12,13 @@ namespace CCF
{
namespace SemanticGraph
{
- // StringLiteral
- //
- //
- std::ostream&
- operator<< (std::ostream& o, StringLiteral const& lit)
- {
- return o << '\"' << lit.literal () << '\"';
- }
}
}
}
+
+std::ostream&
+operator<< (std::ostream& o,
+ CCF::IDL2::SemanticGraph::StringLiteral const& lit)
+{
+ return o << '\"' << lit.literal () << '\"';
+}
diff --git a/CIAO/CCF/CCF/IDL2/SemanticGraph/Literals.hpp b/CIAO/CCF/CCF/IDL2/SemanticGraph/Literals.hpp
index 2276339b9c3..b2a350027db 100644
--- a/CIAO/CCF/CCF/IDL2/SemanticGraph/Literals.hpp
+++ b/CIAO/CCF/CCF/IDL2/SemanticGraph/Literals.hpp
@@ -46,11 +46,11 @@ namespace CCF
{
return a.literal () != b.literal ();
}
-
- std::ostream&
- operator<< (std::ostream& o, StringLiteral const& lit);
}
}
}
+std::ostream&
+operator<< (std::ostream&, CCF::IDL2::SemanticGraph::StringLiteral const&);
+
#endif // CCF_IDL2_SEMANTIC_GRAPH_LITERALS_HPP
diff --git a/CIAO/CCF/CCF/IDL2/SemanticGraph/Member.hpp b/CIAO/CCF/CCF/IDL2/SemanticGraph/Member.hpp
index 5d7c13e6c52..d37f5a5dd74 100644
--- a/CIAO/CCF/CCF/IDL2/SemanticGraph/Member.hpp
+++ b/CIAO/CCF/CCF/IDL2/SemanticGraph/Member.hpp
@@ -22,7 +22,8 @@ namespace CCF
protected:
friend class Graph<Node, Edge>;
- Member ()
+ Member (Path const& path, unsigned long line)
+ : Node (path, line)
{
type_info (static_type_info ());
}
diff --git a/CIAO/CCF/CCF/IDL2/SemanticGraph/Module.hpp b/CIAO/CCF/CCF/IDL2/SemanticGraph/Module.hpp
index 0a3a6831e29..8807f2b55bc 100644
--- a/CIAO/CCF/CCF/IDL2/SemanticGraph/Module.hpp
+++ b/CIAO/CCF/CCF/IDL2/SemanticGraph/Module.hpp
@@ -22,7 +22,8 @@ namespace CCF
protected:
friend class Graph<Node, Edge>;
- Module ()
+ Module (Path const& path, unsigned long line)
+ : Node (path, line)
{
type_info (static_type_info ());
}
diff --git a/CIAO/CCF/CCF/IDL2/SemanticGraph/Name.cpp b/CIAO/CCF/CCF/IDL2/SemanticGraph/Name.cpp
index be83e7d3b96..abe474dc8eb 100644
--- a/CIAO/CCF/CCF/IDL2/SemanticGraph/Name.cpp
+++ b/CIAO/CCF/CCF/IDL2/SemanticGraph/Name.cpp
@@ -54,19 +54,6 @@ namespace CCF
return SimpleName (str + name.str ());
}
- std::ostream&
- operator << (std::ostream& o, SimpleName const& name)
- {
- if (void* tmp = o.pword (name_printer_index))
- {
- NamePrinter* p (reinterpret_cast<NamePrinter*> (tmp));
- p->print (o, name);
- return o;
- }
- else
- return o << name.str ();
- }
-
// Name
//
//
@@ -154,19 +141,6 @@ namespace CCF
return name_.size () == 1;
}
- std::ostream&
- operator << (std::ostream& o, Name const& name)
- {
- if (void* tmp = o.pword (name_printer_index))
- {
- NamePrinter* p (reinterpret_cast<NamePrinter*> (tmp));
- p->print (o, name);
- return o;
- }
- else
- return o << name.str ();
- }
-
// ScopedName
//
//
@@ -242,3 +216,34 @@ namespace CCF
}
}
}
+
+std::ostream&
+operator << (std::ostream& o,
+ CCF::IDL2::SemanticGraph::SimpleName const& name)
+{
+ using namespace CCF::IDL2::SemanticGraph;
+
+ if (void* tmp = o.pword (name_printer_index))
+ {
+ NamePrinter* p (reinterpret_cast<NamePrinter*> (tmp));
+ p->print (o, name);
+ return o;
+ }
+ else
+ return o << name.str ();
+}
+
+std::ostream&
+operator << (std::ostream& o, CCF::IDL2::SemanticGraph::Name const& name)
+{
+ using namespace CCF::IDL2::SemanticGraph;
+
+ if (void* tmp = o.pword (name_printer_index))
+ {
+ NamePrinter* p (reinterpret_cast<NamePrinter*> (tmp));
+ p->print (o, name);
+ return o;
+ }
+ else
+ return o << name.str ();
+}
diff --git a/CIAO/CCF/CCF/IDL2/SemanticGraph/Name.hpp b/CIAO/CCF/CCF/IDL2/SemanticGraph/Name.hpp
index d1b9aa385df..93285e4f266 100644
--- a/CIAO/CCF/CCF/IDL2/SemanticGraph/Name.hpp
+++ b/CIAO/CCF/CCF/IDL2/SemanticGraph/Name.hpp
@@ -81,13 +81,6 @@ namespace CCF
operator+ (std::string const& str, SimpleName const& name);
- // Uses the name printer (see below) If it is installed, otherwise
- // prints in the escaped form.
- //
- std::ostream&
- operator << (std::ostream& o, SimpleName const& name);
-
-
//
//
//
@@ -177,13 +170,6 @@ namespace CCF
std::string name_cache_; // Unescaped name cache.
};
- // Uses the name printer (see below) If it is installed, otherwise
- // prints in the escaped form.
- //
- std::ostream&
- operator << (std::ostream& o, Name const& name);
-
-
// Should always start with "::". Can be just "::" which
// means it's a file-scope.
//
@@ -236,4 +222,16 @@ namespace CCF
}
}
+// Uses the name printer (see above) If it is installed, otherwise
+// prints in the escaped form.
+//
+std::ostream&
+operator << (std::ostream&, CCF::IDL2::SemanticGraph::SimpleName const&);
+
+// Uses the name printer (see above) If it is installed, otherwise
+// prints in the escaped form.
+//
+std::ostream&
+operator << (std::ostream& o, CCF::IDL2::SemanticGraph::Name const& name);
+
#endif // CCF_IDL2_SEMANTIC_GRAPH_NAME_HPP
diff --git a/CIAO/CCF/CCF/IDL2/SemanticGraph/Native.hpp b/CIAO/CCF/CCF/IDL2/SemanticGraph/Native.hpp
index 2a438348eb9..89c7b3f6a0e 100644
--- a/CIAO/CCF/CCF/IDL2/SemanticGraph/Native.hpp
+++ b/CIAO/CCF/CCF/IDL2/SemanticGraph/Native.hpp
@@ -28,7 +28,8 @@ namespace CCF
protected:
friend class Graph<Node, Edge>;
- Native ()
+ Native (Path const& path, unsigned long line)
+ : Node (path, line)
{
type_info (static_type_info ());
}
diff --git a/CIAO/CCF/CCF/IDL2/SemanticGraph/Operation.cpp b/CIAO/CCF/CCF/IDL2/SemanticGraph/Operation.cpp
index 83ed23ffe40..690f6d8173d 100644
--- a/CIAO/CCF/CCF/IDL2/SemanticGraph/Operation.cpp
+++ b/CIAO/CCF/CCF/IDL2/SemanticGraph/Operation.cpp
@@ -93,6 +93,11 @@ namespace CCF
TypeInfo const& Parameter::
static_type_info () { return parameter_; }
+ Parameter::
+ ~Parameter ()
+ {
+ }
+
// InParameter
//
@@ -174,6 +179,11 @@ namespace CCF
TypeInfo const& Operation::
static_type_info () { return operation_; }
+ Operation::
+ ~Operation ()
+ {
+ }
+
// OneWayOperation
//
diff --git a/CIAO/CCF/CCF/IDL2/SemanticGraph/Operation.hpp b/CIAO/CCF/CCF/IDL2/SemanticGraph/Operation.hpp
index a87eddf2ceb..2f0a5d1686a 100644
--- a/CIAO/CCF/CCF/IDL2/SemanticGraph/Operation.hpp
+++ b/CIAO/CCF/CCF/IDL2/SemanticGraph/Operation.hpp
@@ -149,12 +149,15 @@ namespace CCF
protected:
friend class Graph<Node, Edge>;
- Parameter (std::string const& name)
+ Parameter (std::string const& name) // For virtual inheritance only.
: name_ (name)
{
type_info (static_type_info ());
}
+ virtual
+ ~Parameter () = 0;
+
void
add_edge_right (Receives&)
{
@@ -174,8 +177,10 @@ namespace CCF
protected:
friend class Graph<Node, Edge>;
- InParameter (std::string const& name)
- : Parameter (name)
+ InParameter (Path const& path,
+ unsigned long line,
+ std::string const& name)
+ : Node (path, line), Parameter (name)
{
type_info (static_type_info ());
}
@@ -190,8 +195,10 @@ namespace CCF
protected:
friend class Graph<Node, Edge>;
- OutParameter (std::string const& name)
- : Parameter (name)
+ OutParameter (Path const& path,
+ unsigned long line,
+ std::string const& name)
+ : Node (path, line), Parameter (name)
{
type_info (static_type_info ());
}
@@ -206,8 +213,10 @@ namespace CCF
protected:
friend class Graph<Node, Edge>;
- InOutParameter (std::string const& name)
- : Parameter (name)
+ InOutParameter (Path const& path,
+ unsigned long line,
+ std::string const& name)
+ : Node (path, line), Parameter (name)
{
type_info (static_type_info ());
}
@@ -272,11 +281,15 @@ namespace CCF
protected:
friend class Graph<Node, Edge>;
- Operation ()
+ Operation () // For virtual inheritance only.
{
type_info (static_type_info ());
}
+ virtual
+ ~Operation () = 0;
+
+
void
add_edge_left (Receives& e)
{
@@ -313,7 +326,8 @@ namespace CCF
protected:
friend class Graph<Node, Edge>;
- OneWayOperation ()
+ OneWayOperation (Path const& path, unsigned long line)
+ : Node (path, line)
{
type_info (static_type_info ());
}
@@ -332,7 +346,8 @@ namespace CCF
protected:
friend class Graph<Node, Edge>;
- TwoWayOperation ()
+ TwoWayOperation (Path const& path, unsigned long line)
+ : Node (path, line)
{
type_info (static_type_info ());
}
diff --git a/CIAO/CCF/CCF/IDL2/SemanticGraph/Sequence.cpp b/CIAO/CCF/CCF/IDL2/SemanticGraph/Sequence.cpp
index 578c87361d4..5c95be2c67c 100644
--- a/CIAO/CCF/CCF/IDL2/SemanticGraph/Sequence.cpp
+++ b/CIAO/CCF/CCF/IDL2/SemanticGraph/Sequence.cpp
@@ -1,8 +1,8 @@
-// file : CCF/IDL2/SemanticGraph/String.cpp
+// file : CCF/IDL2/SemanticGraph/Sequence.cpp
// author : Boris Kolpackov <boris@dre.vanderbilt.edu>
// cvs-id : $Id$
-#include "CCF/IDL2/SemanticGraph/String.hpp"
+#include "CCF/IDL2/SemanticGraph/Sequence.hpp"
namespace CCF
{
@@ -13,46 +13,70 @@ namespace CCF
using Introspection::TypeInfo;
using Introspection::Access;
- // BoundedString
+ // Sequence
//
//
namespace
{
TypeInfo
- bounded_string_init_ ()
+ sequence_init_ ()
{
- TypeInfo ti (typeid (BoundedString));
+ TypeInfo ti (typeid (Sequence));
ti.add_base (
Access::PUBLIC, true, Specialization::static_type_info ());
return ti;
}
- TypeInfo bounded_string_ (bounded_string_init_ ());
+ TypeInfo sequence_ (sequence_init_ ());
}
- TypeInfo const& BoundedString::
- static_type_info () { return bounded_string_; }
+ TypeInfo const& Sequence::
+ static_type_info () { return sequence_; }
+
+ Sequence::
+ ~Sequence ()
+ {
+ }
- // BoundedWideString
+ // UnboundedSequence
//
//
namespace
{
TypeInfo
- bounded_wide_string_init_ ()
+ unbounded_sequence_init_ ()
{
- TypeInfo ti (typeid (BoundedWideString));
- ti.add_base (
- Access::PUBLIC, true, Specialization::static_type_info ());
+ TypeInfo ti (typeid (UnboundedSequence));
+ ti.add_base (Access::PUBLIC, true, Sequence::static_type_info ());
+ return ti;
+ }
+
+ TypeInfo unbounded_sequence_ (unbounded_sequence_init_ ());
+ }
+
+ TypeInfo const& UnboundedSequence::
+ static_type_info () { return unbounded_sequence_; }
+
+
+ // BoundedSequence
+ //
+ //
+ namespace
+ {
+ TypeInfo
+ bounded_sequence_init_ ()
+ {
+ TypeInfo ti (typeid (BoundedSequence));
+ ti.add_base (Access::PUBLIC, true, Sequence::static_type_info ());
return ti;
}
- TypeInfo bounded_wide_string_ (bounded_wide_string_init_ ());
+ TypeInfo bounded_sequence_ (bounded_sequence_init_ ());
}
- TypeInfo const& BoundedWideString::
- static_type_info () { return bounded_wide_string_; }
+ TypeInfo const& BoundedSequence::
+ static_type_info () { return bounded_sequence_; }
}
}
}
diff --git a/CIAO/CCF/CCF/IDL2/SemanticGraph/Sequence.hpp b/CIAO/CCF/CCF/IDL2/SemanticGraph/Sequence.hpp
index f32c3d3b1b6..333b55fed2a 100644
--- a/CIAO/CCF/CCF/IDL2/SemanticGraph/Sequence.hpp
+++ b/CIAO/CCF/CCF/IDL2/SemanticGraph/Sequence.hpp
@@ -39,10 +39,13 @@ namespace CCF
protected:
friend class Graph<Node, Edge>;
- Sequence ()
+ Sequence () // For virtual inheritance only.
{
type_info (static_type_info ());
}
+
+ virtual
+ ~Sequence () = 0;
};
@@ -58,7 +61,8 @@ namespace CCF
protected:
friend class Graph<Node, Edge>;
- UnboundedSequence ()
+ UnboundedSequence (Path const& path, unsigned long line)
+ : Node (path, line)
{
type_info (static_type_info ());
}
@@ -89,7 +93,8 @@ namespace CCF
protected:
friend class Graph<Node, Edge>;
- BoundedSequence ()
+ BoundedSequence (Path const& path, unsigned long line)
+ : Node (path, line)
{
type_info (static_type_info ());
}
diff --git a/CIAO/CCF/CCF/IDL2/SemanticGraph/String.cpp b/CIAO/CCF/CCF/IDL2/SemanticGraph/String.cpp
index 558da3f34da..578c87361d4 100644
--- a/CIAO/CCF/CCF/IDL2/SemanticGraph/String.cpp
+++ b/CIAO/CCF/CCF/IDL2/SemanticGraph/String.cpp
@@ -1,8 +1,8 @@
-// file : CCF/IDL2/SemanticGraph/Sequence.cpp
+// file : CCF/IDL2/SemanticGraph/String.cpp
// author : Boris Kolpackov <boris@dre.vanderbilt.edu>
// cvs-id : $Id$
-#include "CCF/IDL2/SemanticGraph/Sequence.hpp"
+#include "CCF/IDL2/SemanticGraph/String.hpp"
namespace CCF
{
@@ -13,65 +13,46 @@ namespace CCF
using Introspection::TypeInfo;
using Introspection::Access;
- // Sequence
+ // BoundedString
//
//
namespace
{
TypeInfo
- sequence_init_ ()
+ bounded_string_init_ ()
{
- TypeInfo ti (typeid (Sequence));
+ TypeInfo ti (typeid (BoundedString));
ti.add_base (
Access::PUBLIC, true, Specialization::static_type_info ());
return ti;
}
- TypeInfo sequence_ (sequence_init_ ());
+ TypeInfo bounded_string_ (bounded_string_init_ ());
}
- TypeInfo const& Sequence::
- static_type_info () { return sequence_; }
+ TypeInfo const& BoundedString::
+ static_type_info () { return bounded_string_; }
- // UnboundedSequence
+ // BoundedWideString
//
//
namespace
{
TypeInfo
- unbounded_sequence_init_ ()
+ bounded_wide_string_init_ ()
{
- TypeInfo ti (typeid (UnboundedSequence));
- ti.add_base (Access::PUBLIC, true, Sequence::static_type_info ());
- return ti;
- }
-
- TypeInfo unbounded_sequence_ (unbounded_sequence_init_ ());
- }
-
- TypeInfo const& UnboundedSequence::
- static_type_info () { return unbounded_sequence_; }
-
-
- // BoundedSequence
- //
- //
- namespace
- {
- TypeInfo
- bounded_sequence_init_ ()
- {
- TypeInfo ti (typeid (BoundedSequence));
- ti.add_base (Access::PUBLIC, true, Sequence::static_type_info ());
+ TypeInfo ti (typeid (BoundedWideString));
+ ti.add_base (
+ Access::PUBLIC, true, Specialization::static_type_info ());
return ti;
}
- TypeInfo bounded_sequence_ (bounded_sequence_init_ ());
+ TypeInfo bounded_wide_string_ (bounded_wide_string_init_ ());
}
- TypeInfo const& BoundedSequence::
- static_type_info () { return bounded_sequence_; }
+ TypeInfo const& BoundedWideString::
+ static_type_info () { return bounded_wide_string_; }
}
}
}
diff --git a/CIAO/CCF/CCF/IDL2/SemanticGraph/String.hpp b/CIAO/CCF/CCF/IDL2/SemanticGraph/String.hpp
index a4f3e361272..484a8a778ec 100644
--- a/CIAO/CCF/CCF/IDL2/SemanticGraph/String.hpp
+++ b/CIAO/CCF/CCF/IDL2/SemanticGraph/String.hpp
@@ -40,7 +40,8 @@ namespace CCF
protected:
friend class Graph<Node, Edge>;
- BoundedString ()
+ BoundedString (Path const& path, unsigned long line)
+ : Node (path, line)
{
type_info (static_type_info ());
}
@@ -73,7 +74,8 @@ namespace CCF
protected:
friend class Graph<Node, Edge>;
- BoundedWideString ()
+ BoundedWideString (Path const& path, unsigned long line)
+ : Node (path, line)
{
type_info (static_type_info ());
}
diff --git a/CIAO/CCF/CCF/IDL2/SemanticGraph/Struct.hpp b/CIAO/CCF/CCF/IDL2/SemanticGraph/Struct.hpp
index 67419a4cd00..5e186bfd0ff 100644
--- a/CIAO/CCF/CCF/IDL2/SemanticGraph/Struct.hpp
+++ b/CIAO/CCF/CCF/IDL2/SemanticGraph/Struct.hpp
@@ -25,7 +25,8 @@ namespace CCF
protected:
friend class Graph<Node, Edge>;
- Struct ()
+ Struct (Path const& path, unsigned long line)
+ : Node (path, line)
{
type_info (static_type_info ());
}
diff --git a/CIAO/CCF/CCF/IDL2/SemanticGraph/Translation.hpp b/CIAO/CCF/CCF/IDL2/SemanticGraph/Translation.hpp
index 2b12b5e3c61..42df2ed2c13 100644
--- a/CIAO/CCF/CCF/IDL2/SemanticGraph/Translation.hpp
+++ b/CIAO/CCF/CCF/IDL2/SemanticGraph/Translation.hpp
@@ -8,8 +8,6 @@
#include <vector>
#include <string>
-#include "CCF/CompilerElements/FileSystem.hpp"
-
#include "CCF/IDL2/SemanticGraph/Elements.hpp"
namespace CCF
@@ -107,7 +105,7 @@ namespace CCF
class Includes : public virtual Contains
{
public:
- fs::path
+ Path
file () const
{
return file_;
@@ -119,7 +117,7 @@ namespace CCF
protected:
friend class Graph<Node, Edge>;
- Includes (fs::path const& file)
+ Includes (Path const& file)
: file_ (file)
{
type_info (static_type_info ());
@@ -132,7 +130,7 @@ namespace CCF
set_right_node (TranslationRegion& n);
private:
- fs::path file_;
+ Path file_;
};
@@ -148,7 +146,7 @@ namespace CCF
protected:
friend class Graph<Node, Edge>;
- QuoteIncludes (fs::path const& file)
+ QuoteIncludes (Path const& file)
: Includes (file)
{
type_info (static_type_info ());
@@ -168,7 +166,7 @@ namespace CCF
protected:
friend class Graph<Node, Edge>;
- BracketIncludes (fs::path const& file)
+ BracketIncludes (Path const& file)
: Includes (file)
{
type_info (static_type_info ());
@@ -200,7 +198,8 @@ namespace CCF
protected:
friend class Graph<Node, Edge>;
- Root ()
+ Root (Path const& path, unsigned long line)
+ : Node (path, line)
{
type_info (static_type_info ());
}
@@ -231,7 +230,8 @@ namespace CCF
protected:
friend class Graph<Node, Edge>;
- TranslationRegion ()
+ TranslationRegion (Path const& path, unsigned long line)
+ : Node (path, line)
{
type_info (static_type_info ());
}
@@ -247,7 +247,8 @@ namespace CCF
public Graph<Node, Edge>
{
public:
- TranslationUnit ()
+ TranslationUnit (Path const& path, unsigned long line)
+ : Node (path, line)
{
type_info (static_type_info ());
}
diff --git a/CIAO/CCF/CCF/IDL2/SemanticGraph/TypeId.hpp b/CIAO/CCF/CCF/IDL2/SemanticGraph/TypeId.hpp
index db02aae6edf..accb6f83226 100644
--- a/CIAO/CCF/CCF/IDL2/SemanticGraph/TypeId.hpp
+++ b/CIAO/CCF/CCF/IDL2/SemanticGraph/TypeId.hpp
@@ -41,8 +41,12 @@ namespace CCF
protected:
friend class Graph<Node, Edge>;
- TypeId (ScopedName const& name, StringLiteral const& id)
- : name_ (name),
+ TypeId (Path const& path,
+ unsigned long line,
+ ScopedName const& name,
+ StringLiteral const& id)
+ : Node (path, line),
+ name_ (name),
id_ (id)
{
type_info (static_type_info ());
@@ -78,8 +82,12 @@ namespace CCF
protected:
friend class Graph<Node, Edge>;
- TypePrefix (ScopedName const& name, StringLiteral const& prefix)
- : name_ (name),
+ TypePrefix (Path const& path,
+ unsigned long line,
+ ScopedName const& name,
+ StringLiteral const& prefix)
+ : Node (path, line),
+ name_ (name),
prefix_ (prefix)
{
type_info (static_type_info ());
diff --git a/CIAO/CCF/CCF/IDL2/SemanticGraph/Union.cpp b/CIAO/CCF/CCF/IDL2/SemanticGraph/Union.cpp
index 28c673a94f3..4fccb9a0ebc 100644
--- a/CIAO/CCF/CCF/IDL2/SemanticGraph/Union.cpp
+++ b/CIAO/CCF/CCF/IDL2/SemanticGraph/Union.cpp
@@ -73,6 +73,10 @@ namespace CCF
TypeInfo const& Selector::
static_type_info () { return selector_; }
+ Selector::
+ ~Selector ()
+ {
+ }
// DefaultSelector
//
diff --git a/CIAO/CCF/CCF/IDL2/SemanticGraph/Union.hpp b/CIAO/CCF/CCF/IDL2/SemanticGraph/Union.hpp
index 9cb70897a20..2512358db03 100644
--- a/CIAO/CCF/CCF/IDL2/SemanticGraph/Union.hpp
+++ b/CIAO/CCF/CCF/IDL2/SemanticGraph/Union.hpp
@@ -69,7 +69,8 @@ namespace CCF
protected:
friend class Graph<Node, Edge>;
- UnionMember ()
+ UnionMember (Path const& path, unsigned long line)
+ : Node (path, line), Member (path, line)
{
type_info (static_type_info ());
}
@@ -84,10 +85,13 @@ namespace CCF
protected:
friend class Graph<Node, Edge>;
- Selector ()
+ Selector () // For virtual inheritance only.
{
type_info (static_type_info ());
}
+
+ virtual
+ ~Selector () = 0;
};
class DefaultSelector : public virtual Selector
@@ -99,7 +103,8 @@ namespace CCF
protected:
friend class Graph<Node, Edge>;
- DefaultSelector ()
+ DefaultSelector (Path const& path, unsigned long line)
+ : Node (path, line)
{
type_info (static_type_info ());
}
@@ -115,7 +120,8 @@ namespace CCF
protected:
friend class Graph<Node, Edge>;
- ValueSelector ()
+ ValueSelector (Path const& path, unsigned long line)
+ : Node (path, line)
{
type_info (static_type_info ());
}
@@ -134,7 +140,8 @@ namespace CCF
protected:
friend class Graph<Node, Edge>;
- Union ()
+ Union (Path const& path, unsigned long line)
+ : Node (path, line)
{
type_info (static_type_info ());
}
diff --git a/CIAO/CCF/CCF/IDL2/SemanticGraph/ValueType.cpp b/CIAO/CCF/CCF/IDL2/SemanticGraph/ValueType.cpp
index ace6d65eac9..1d151613dcc 100644
--- a/CIAO/CCF/CCF/IDL2/SemanticGraph/ValueType.cpp
+++ b/CIAO/CCF/CCF/IDL2/SemanticGraph/ValueType.cpp
@@ -33,6 +33,10 @@ namespace CCF
TypeInfo const& ValueType::
static_type_info () { return value_type_; }
+ ValueType::
+ ~ValueType ()
+ {
+ }
// AbstractValueType
//
diff --git a/CIAO/CCF/CCF/IDL2/SemanticGraph/ValueType.hpp b/CIAO/CCF/CCF/IDL2/SemanticGraph/ValueType.hpp
index bdcb4afe023..f918ee17dc6 100644
--- a/CIAO/CCF/CCF/IDL2/SemanticGraph/ValueType.hpp
+++ b/CIAO/CCF/CCF/IDL2/SemanticGraph/ValueType.hpp
@@ -75,11 +75,14 @@ namespace CCF
protected:
friend class Graph<Node, Edge>;
- ValueType ()
+ ValueType () // For virtual inheritance only.
{
type_info (static_type_info ());
}
+ virtual
+ ~ValueType () = 0;
+
using Type::add_edge_right;
using Scope::add_edge_left;
@@ -118,7 +121,8 @@ namespace CCF
protected:
friend class Graph<Node, Edge>;
- AbstractValueType ()
+ AbstractValueType (Path const& path, unsigned long line)
+ : Node (path, line)
{
type_info (static_type_info ());
}
@@ -137,7 +141,8 @@ namespace CCF
protected:
friend class Graph<Node, Edge>;
- ConcreteValueType ()
+ ConcreteValueType (Path const& path, unsigned long line)
+ : Node (path, line)
{
type_info (static_type_info ());
}
@@ -156,7 +161,8 @@ namespace CCF
protected:
friend class Graph<Node, Edge>;
- ValueTypeFactory ()
+ ValueTypeFactory (Path const& path, unsigned long line)
+ : Node (path, line), TwoWayOperation (path, line)
{
type_info (static_type_info ());
}
diff --git a/CIAO/CCF/CCF/IDL2/SemanticGraph/ValueTypeMember.cpp b/CIAO/CCF/CCF/IDL2/SemanticGraph/ValueTypeMember.cpp
index 744ecb93526..0afeabd5fd0 100644
--- a/CIAO/CCF/CCF/IDL2/SemanticGraph/ValueTypeMember.cpp
+++ b/CIAO/CCF/CCF/IDL2/SemanticGraph/ValueTypeMember.cpp
@@ -35,6 +35,11 @@ namespace CCF
TypeInfo const& ValueTypeMember::
static_type_info () { return value_type_member_; }
+ ValueTypeMember::
+ ~ValueTypeMember ()
+ {
+ }
+
// ValueTypePrivateMember
//
diff --git a/CIAO/CCF/CCF/IDL2/SemanticGraph/ValueTypeMember.hpp b/CIAO/CCF/CCF/IDL2/SemanticGraph/ValueTypeMember.hpp
index ea4e08cb42a..47649de0c6a 100644
--- a/CIAO/CCF/CCF/IDL2/SemanticGraph/ValueTypeMember.hpp
+++ b/CIAO/CCF/CCF/IDL2/SemanticGraph/ValueTypeMember.hpp
@@ -38,10 +38,13 @@ namespace CCF
static_type_info ();
protected:
- ValueTypeMember ()
+ ValueTypeMember () // For virtual inheritance only.
{
type_info (static_type_info ());
}
+
+ virtual
+ ~ValueTypeMember () = 0;
};
@@ -64,7 +67,8 @@ namespace CCF
protected:
friend class Graph<Node, Edge>;
- ValueTypePrivateMember ()
+ ValueTypePrivateMember (Path const& path, unsigned long line)
+ : Node (path, line)
{
type_info (static_type_info ());
}
@@ -90,7 +94,8 @@ namespace CCF
protected:
friend class Graph<Node, Edge>;
- ValueTypePublicMember ()
+ ValueTypePublicMember (Path const& path, unsigned long line)
+ : Node (path, line)
{
type_info (static_type_info ());
}
diff --git a/CIAO/CCF/CCF/IDL2/Token.hpp b/CIAO/CCF/CCF/IDL2/Token.hpp
index 4c1749e15f2..078a987e4e4 100644
--- a/CIAO/CCF/CCF/IDL2/Token.hpp
+++ b/CIAO/CCF/CCF/IDL2/Token.hpp
@@ -63,13 +63,6 @@ namespace CCF
std::vector<TokenPtr>
TokenList;
- inline std::ostream&
- operator<< (std::ostream& o, TokenPtr const& t)
- {
- if (t != 0) t->print (o);
- return o;
- }
-
//
//
//
@@ -345,4 +338,11 @@ namespace CCF
}
}
+inline std::ostream&
+operator<< (std::ostream& o, CCF::IDL2::TokenPtr const& t)
+{
+ if (t != 0) t->print (o);
+ return o;
+}
+
#endif // CCF_IDL2_TOKEN_HPP
diff --git a/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Component.cpp b/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Component.cpp
index 653c153cbbf..68cec9313ae 100644
--- a/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Component.cpp
+++ b/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Component.cpp
@@ -38,7 +38,8 @@ namespace CCF
}
else
{
- now (ctx.tu ().new_node<SemanticGraph::Component> ());
+ now (ctx.tu ().new_node<SemanticGraph::Component> (
+ ctx.file (), id->line ()));
}
ctx.tu ().new_edge<Defines> (ctx.scope (), now (), name);
@@ -57,7 +58,8 @@ namespace CCF
}
else
{
- now (ctx.tu ().new_node<SemanticGraph::Component> ());
+ now (ctx.tu ().new_node<SemanticGraph::Component> (
+ ctx.file (), id->line ()));
}
ctx.tu ().new_edge<Mentions> (ctx.scope (), now (), name);
@@ -83,24 +85,30 @@ namespace CCF
}
catch (Resolve const&)
{
- cerr << "error: invalid inheritance specification" << endl;
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "invalid inheritance specification" << endl;
throw;
}
}
catch (NotFound const&)
{
- cerr << "no component with name \'" << name
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "no component with name \'" << name
<< "\' visible from scope \'" << from << "\'" << endl;
}
catch (WrongType const&)
{
- cerr << "incompatible type in inheritance specification" << endl;
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "incompatible type in inheritance specification" << endl;
}
catch (NotDefined const& e)
{
- cerr << "attempt to inherit from forward-declared component "
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "attempt to inherit from forward-declared component "
<< e.name () << endl;
- cerr << "inheritance from forward-declared component is illegal"
+
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "inheritance from forward-declared component is illegal"
<< endl;
}
}
@@ -129,29 +137,36 @@ namespace CCF
}
catch (Resolve const&)
{
- cerr << "error: invalid supports specification" << endl;
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "invalid supports specification" << endl;
throw;
}
}
catch (NotFound const&)
{
- cerr << "no interface with name \'" << name
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "no interface with name \'" << name
<< "\' visible from scope \'" << from << "\'" << endl;
}
catch (WrongType const&)
{
- cerr << "incompatible type in supports specification" << endl;
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "incompatible type in supports specification" << endl;
}
catch (NotDefined const& e)
{
- cerr << "attempt to support forward-declared interface "
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "attempt to support forward-declared interface "
<< e.name () << endl;
- cerr << "support of forward-declared interface is illegal"
+
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "support of forward-declared interface is illegal"
<< endl;
}
catch (AlreadySupported const& e)
{
- cerr << "directly supporting interface \'" << e.name ()
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "directly supporting interface \'" << e.name ()
<< "\' more than once is illegal" << endl;
}
}
diff --git a/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Consumes.cpp b/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Consumes.cpp
index 0cad9ec4d59..56dd0ef3b0a 100644
--- a/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Consumes.cpp
+++ b/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Consumes.cpp
@@ -44,21 +44,26 @@ namespace CCF
}
catch (Resolve const&)
{
- cerr << "error: invalid consumes declaration" << endl;
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "invalid consumes declaration" << endl;
throw;
}
}
catch (NotFound const&)
{
- cerr << "no eventtype with name \'" << name
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "no eventtype with name \'" << name
<< "\' visible from scope \'" << from << "\'" << endl;
}
catch (WrongType const&)
{
- cerr << "declaration with name \'" << name
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "declaration with name \'" << name
<< "\' visible from scope \'" << from
<< "\' is not an eventtype declaration" << endl;
- cerr << "using non-eventtype in consumes declaration is illegal"
+
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "using non-eventtype in consumes declaration is illegal"
<< endl;
}
}
@@ -70,7 +75,8 @@ namespace CCF
if (type_)
{
- Consumer& c (ctx.tu ().new_node<Consumer> ());
+ Consumer& c (ctx.tu ().new_node<Consumer> (
+ ctx.file (), id->line ()));
ctx.tu ().new_edge<Belongs> (c, *type_);
ctx.tu ().new_edge<Defines> (ctx.scope (), c, id->lexeme ());
diff --git a/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Emits.cpp b/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Emits.cpp
index 9060ad479ac..6f49a05016c 100644
--- a/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Emits.cpp
+++ b/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Emits.cpp
@@ -44,21 +44,26 @@ namespace CCF
}
catch (Resolve const&)
{
- cerr << "error: invalid emits declaration" << endl;
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "invalid emits declaration" << endl;
throw;
}
}
catch (NotFound const&)
{
- cerr << "no eventtype with name \'" << name
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "no eventtype with name \'" << name
<< "\' visible from scope \'" << from << "\'" << endl;
}
catch (WrongType const&)
{
- cerr << "declaration with name \'" << name
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "declaration with name \'" << name
<< "\' visible from scope \'" << from
<< "\' is not an eventtype declaration" << endl;
- cerr << "using non-eventtype in emits declaration is illegal"
+
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "using non-eventtype in emits declaration is illegal"
<< endl;
}
}
@@ -70,7 +75,8 @@ namespace CCF
if (type_)
{
- Emitter& e (ctx.tu ().new_node<Emitter> ());
+ Emitter& e (ctx.tu ().new_node<Emitter> (
+ ctx.file (), id->line ()));
ctx.tu ().new_edge<Belongs> (e, *type_);
ctx.tu ().new_edge<Defines> (ctx.scope (), e, id->lexeme ());
diff --git a/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/EventType.cpp b/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/EventType.cpp
index 4d3b745630c..f68eda81cae 100644
--- a/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/EventType.cpp
+++ b/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/EventType.cpp
@@ -28,7 +28,8 @@ namespace CCF
void EventType::
begin_abstract_def (SimpleIdentifierPtr const& id)
{
- if (ctx.trace ()) cerr << "abstract eventtype def " << id << endl;
+ if (ctx.trace ())
+ cerr << "abstract eventtype def " << id << endl;
SimpleName name (id->lexeme ());
@@ -38,7 +39,8 @@ namespace CCF
}
else
{
- now (ctx.tu ().new_node<AbstractEventType> ());
+ now (ctx.tu ().new_node<AbstractEventType> (
+ ctx.file (), id->line ()));
}
ctx.tu ().new_edge<Defines> (ctx.scope (), now (), name);
@@ -47,7 +49,8 @@ namespace CCF
void EventType::
begin_abstract_fwd (SimpleIdentifierPtr const& id)
{
- if (ctx.trace ()) cerr << "abstract eventtype fwd " << id << endl;
+ if (ctx.trace ())
+ cerr << "abstract eventtype fwd " << id << endl;
SimpleName name (id->lexeme ());
@@ -57,7 +60,8 @@ namespace CCF
}
else
{
- now (ctx.tu ().new_node<AbstractEventType> ());
+ now (ctx.tu ().new_node<AbstractEventType> (
+ ctx.file (), id->line ()));
}
ctx.tu ().new_edge<Mentions> (ctx.scope (), now (), name);
@@ -66,7 +70,8 @@ namespace CCF
void EventType::
begin_concrete_def (SimpleIdentifierPtr const& id)
{
- if (ctx.trace ()) cerr << "concrete eventtype def " << id << endl;
+ if (ctx.trace ())
+ cerr << "concrete eventtype def " << id << endl;
SimpleName name (id->lexeme ());
@@ -76,7 +81,8 @@ namespace CCF
}
else
{
- now (ctx.tu ().new_node<ConcreteEventType> ());
+ now (ctx.tu ().new_node<ConcreteEventType> (
+ ctx.file (), id->line ()));
}
ctx.tu ().new_edge<Defines> (ctx.scope (), now (), name);
@@ -95,7 +101,8 @@ namespace CCF
}
else
{
- now (ctx.tu ().new_node<ConcreteEventType> ());
+ now (ctx.tu ().new_node<ConcreteEventType> (
+ ctx.file (), id->line ()));
}
ctx.tu ().new_edge<Mentions> (ctx.scope (), now (), name);
@@ -129,7 +136,11 @@ namespace CCF
//
if (!abstract)
{
- cerr << "abstract eventtype `" << now ().name ()
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "invalid inheritance specification" << endl;
+
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "abstract eventtype `" << now ().name ()
<< "\' may not inherit from concrete valuetype `"
<< v.scoped_name () << "\'" << endl;
return;
@@ -144,7 +155,11 @@ namespace CCF
if (now ().inherits_begin () != now ().inherits_end () &&
!abstract)
{
- cerr << "concrete valuetype `" << v.scoped_name ()
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "invalid inheritance specification" << endl;
+
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "concrete valuetype `" << v.scoped_name ()
<< "\' is not the first in the inheritance list of "
<< "eventtype `" << now ().name () << "\'" << endl;
return;
@@ -156,29 +171,36 @@ namespace CCF
}
catch (Resolve const&)
{
- cerr << "error: invalid inheritance specification" << endl;
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "invalid inheritance specification" << endl;
throw;
}
}
catch (NotFound const&)
{
- cerr << "no valuetype with name \'" << name
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "no valuetype with name \'" << name
<< "\' visible from scope \'" << from << "\'" << endl;
}
catch (WrongType const&)
{
- cerr << "incompatible type in inheritance specification" << endl;
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "incompatible type in inheritance specification" << endl;
}
catch (NotDefined const& e)
{
- cerr << "attempt to inherit from the forward-declared valuetype "
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "attempt to inherit from the forward-declared valuetype "
<< e.name () << endl;
- cerr << "inheritance from a forward-declared valuetype is illegal"
+
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "inheritance from a forward-declared valuetype is illegal"
<< endl;
}
catch (AlreadyInherited const& e)
{
- cerr << "directly inheriting from valuetype \'" << e.name ()
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "directly inheriting from valuetype \'" << e.name ()
<< "\' more than once is illegal" << endl;
}
}
@@ -207,29 +229,36 @@ namespace CCF
}
catch (Resolve const&)
{
- cerr << "error: invalid supports specification" << endl;
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "invalid supports specification" << endl;
throw;
}
}
catch (NotFound const&)
{
- cerr << "no interface with name \'" << name
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "no interface with name \'" << name
<< "\' visible from scope \'" << from << "\'" << endl;
}
catch (WrongType const&)
{
- cerr << "incompatible type in supports specification" << endl;
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "incompatible type in supports specification" << endl;
}
catch (NotDefined const& e)
{
- cerr << "attempt to support forward-declared interface "
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "attempt to support forward-declared interface "
<< e.name () << endl;
- cerr << "support of forward-declared interface is illegal"
+
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "support of forward-declared interface is illegal"
<< endl;
}
catch (AlreadySupported const& e)
{
- cerr << "directly supporting interface \'" << e.name ()
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "directly supporting interface \'" << e.name ()
<< "\' more than once is illegal" << endl;
}
}
diff --git a/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/EventTypeFactory.cpp b/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/EventTypeFactory.cpp
index db687181c61..8e8544815c0 100644
--- a/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/EventTypeFactory.cpp
+++ b/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/EventTypeFactory.cpp
@@ -38,7 +38,8 @@ namespace CCF
SimpleName name (id->lexeme ());
- f_ = &ctx.tu ().new_node<SemanticGraph::EventTypeFactory> ();
+ f_ = &ctx.tu ().new_node<SemanticGraph::EventTypeFactory> (
+ ctx.file (), id->line ());
ctx.tu ().new_edge<Returns> (*f_, h);
ctx.tu ().new_edge<Defines> (ctx.scope (), *f_, name);
@@ -64,33 +65,40 @@ namespace CCF
Type& t (resolve<Type> (from, name, Flags::complete));
Parameter& p (
- ctx.tu ().new_node<InParameter> (name_id->lexeme ()));
+ ctx.tu ().new_node<InParameter> (
+ ctx.file (), name_id->line (), name_id->lexeme ()));
ctx.tu ().new_edge<Belongs> (p, t);
ctx.tu ().new_edge<Receives> (*f_, p);
}
catch (Resolve const&)
{
- cerr << "error: invalid parameter declaration" << endl;
+ cerr << ctx.file () << ":" << type_id->line () << ": error: "
+ << "invalid parameter declaration" << endl;
throw;
}
}
catch (NotFound const&)
{
- cerr << "no type with name \'" << name
+ cerr << ctx.file () << ":" << type_id->line () << ": error: "
+ << "no type with name \'" << name
<< "\' visible from scope \'" << from << "\'" << endl;
}
catch (WrongType const&)
{
- cerr << "declaration with name \'" << name
+ cerr << ctx.file () << ":" << type_id->line () << ": error: "
+ << "declaration with name \'" << name
<< "\' visible from scope \'" << from
<< "\' is not a type declaration" << endl;
- cerr << "using non-type as an factory parameter type is "
+
+ cerr << ctx.file () << ":" << type_id->line () << ": error: "
+ << "using non-type as an factory parameter type is "
<< "illegal" << endl;
}
catch (NotComplete const& e)
{
- cerr << "type \'" << e.name () << "\' is not complete" << endl;
+ cerr << ctx.file () << ":" << type_id->line () << ": error: "
+ << "type \'" << e.name () << "\' is not complete" << endl;
}
}
@@ -115,21 +123,26 @@ namespace CCF
}
catch (Resolve const&)
{
- cerr << "error: invalid raises declaration" << endl;
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "invalid raises declaration" << endl;
throw;
}
}
catch (NotFound const&)
{
- cerr << "no exception with name \'" << name
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "no exception with name \'" << name
<< "\' visible from scope \'" << from << "\'" << endl;
}
catch (WrongType const&)
{
- cerr << "declaration with name \'" << name
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "declaration with name \'" << name
<< "\' visible from scope \'" << from
<< "\' is not an exception declaration" << endl;
- cerr << "using non-exception type in raises declaration is "
+
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "using non-exception type in raises declaration is "
<< "illegal" << endl;
}
}
diff --git a/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Factory.cpp b/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Factory.cpp
index 075955ecc2b..233d931b97e 100644
--- a/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Factory.cpp
+++ b/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Factory.cpp
@@ -26,7 +26,7 @@ namespace CCF
home_ (ctx_),
home_factory_ (ctx_),
home_finder_ (ctx_),
- include_ (ctx_, context, dout, *this),
+ include_ (ctx_, dout, *this),
provides_ (ctx_),
publishes_ (ctx_),
uses_ (ctx_)
diff --git a/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Home.cpp b/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Home.cpp
index 92f90ef0170..d6be4cf9c72 100644
--- a/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Home.cpp
+++ b/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Home.cpp
@@ -39,7 +39,8 @@ namespace CCF
}
else
{
- now (ctx.tu ().new_node<SemanticGraph::Home> ());
+ now (ctx.tu ().new_node<SemanticGraph::Home> (
+ ctx.file (), id->line ()));
}
ctx.tu ().new_edge<Defines> (ctx.scope (), now (), name);
@@ -66,24 +67,30 @@ namespace CCF
}
catch (Resolve const&)
{
- cerr << "error: invalid inheritance specification" << endl;
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "invalid inheritance specification" << endl;
throw;
}
}
catch (NotFound const&)
{
- cerr << "no home with name \'" << name
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "no home with name \'" << name
<< "\' visible from scope \'" << from << "\'" << endl;
}
catch (WrongType const&)
{
- cerr << "incompatible type in inheritance specification" << endl;
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "incompatible type in inheritance specification" << endl;
}
catch (NotDefined const& e)
{
- cerr << "attempt to inherit from forward-declared home "
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "attempt to inherit from forward-declared home "
<< e.name () << endl;
- cerr << "inheritance from forward-declared home is illegal"
+
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "inheritance from forward-declared home is illegal"
<< endl;
}
}
@@ -113,29 +120,36 @@ namespace CCF
}
catch (Resolve const&)
{
- cerr << "error: invalid supports specification" << endl;
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "invalid supports specification" << endl;
throw;
}
}
catch (NotFound const&)
{
- cerr << "no interface with name \'" << name
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "no interface with name \'" << name
<< "\' visible from scope \'" << from << "\'" << endl;
}
catch (WrongType const&)
{
- cerr << "incompatible type in supports specification" << endl;
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "incompatible type in supports specification" << endl;
}
catch (NotDefined const& e)
{
- cerr << "attempt to support from forward-declared component "
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "attempt to support from forward-declared component "
<< e.name () << endl;
- cerr << "support of forward-declared interface is illegal"
+
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "support of forward-declared interface is illegal"
<< endl;
}
catch (AlreadySupported const& e)
{
- cerr << "directly supporting interface \'" << e.name ()
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "directly supporting interface \'" << e.name ()
<< "\' more than once is illegal" << endl;
}
}
@@ -159,24 +173,30 @@ namespace CCF
}
catch (Resolve const&)
{
- cerr << "error: invalid manages specification" << endl;
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "invalid manages specification" << endl;
throw;
}
}
catch (NotFound const&)
{
- cerr << "no component with name \'" << name
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "no component with name \'" << name
<< "\' visible from scope \'" << from << "\'" << endl;
}
catch (WrongType const&)
{
- cerr << "incompatible type in manages specification" << endl;
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "incompatible type in manages specification" << endl;
}
catch (NotDefined const& e)
{
- cerr << "attempt to manage forward-declared component "
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "attempt to manage forward-declared component "
<< e.name () << endl;
- cerr << "management of forward-declared component is illegal"
+
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "management of forward-declared component is illegal"
<< endl;
}
}
diff --git a/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/HomeFactory.cpp b/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/HomeFactory.cpp
index a40d014c792..b47e0b13410 100644
--- a/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/HomeFactory.cpp
+++ b/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/HomeFactory.cpp
@@ -41,7 +41,8 @@ namespace CCF
SimpleName name (id->lexeme ());
- hf_ = &ctx.tu ().new_node<SemanticGraph::HomeFactory> ();
+ hf_ = &ctx.tu ().new_node<SemanticGraph::HomeFactory> (
+ ctx.file (), id->line ());
ctx.tu ().new_edge<Returns> (*hf_, c);
ctx.tu ().new_edge<Defines> (ctx.scope (), *hf_, name);
@@ -67,33 +68,40 @@ namespace CCF
Type& t (resolve<Type> (from, name, Flags::complete));
Parameter& p (
- ctx.tu ().new_node<InParameter> (name_id->lexeme ()));
+ ctx.tu ().new_node<InParameter> (
+ ctx.file (), name_id->line (), name_id->lexeme ()));
ctx.tu ().new_edge<Belongs> (p, t);
ctx.tu ().new_edge<Receives> (*hf_, p);
}
catch (Resolve const&)
{
- cerr << "error: invalid parameter declaration" << endl;
+ cerr << ctx.file () << ":" << type_id->line () << ": error: "
+ << "invalid parameter declaration" << endl;
throw;
}
}
catch (NotFound const&)
{
- cerr << "no type with name \'" << name
+ cerr << ctx.file () << ":" << type_id->line () << ": error: "
+ << "no type with name \'" << name
<< "\' visible from scope \'" << from << "\'" << endl;
}
catch (WrongType const&)
{
- cerr << "declaration with name \'" << name
+ cerr << ctx.file () << ":" << type_id->line () << ": error: "
+ << "declaration with name \'" << name
<< "\' visible from scope \'" << from
<< "\' is not a type declaration" << endl;
- cerr << "using non-type as an factory parameter type is "
+
+ cerr << ctx.file () << ":" << type_id->line () << ": error: "
+ << "using non-type as an factory parameter type is "
<< "illegal" << endl;
}
catch (NotComplete const& e)
{
- cerr << "type \'" << e.name () << "\' is not complete" << endl;
+ cerr << ctx.file () << ":" << type_id->line () << ": error: "
+ << "type \'" << e.name () << "\' is not complete" << endl;
}
}
@@ -118,21 +126,26 @@ namespace CCF
}
catch (Resolve const&)
{
- cerr << "error: invalid raises declaration" << endl;
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "invalid raises declaration" << endl;
throw;
}
}
catch (NotFound const&)
{
- cerr << "no exception with name \'" << name
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "no exception with name \'" << name
<< "\' visible from scope \'" << from << "\'" << endl;
}
catch (WrongType const&)
{
- cerr << "declaration with name \'" << name
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "declaration with name \'" << name
<< "\' visible from scope \'" << from
<< "\' is not an exception declaration" << endl;
- cerr << "using non-exception type in raises declaration is "
+
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "using non-exception type in raises declaration is "
<< "illegal" << endl;
}
}
diff --git a/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/HomeFinder.cpp b/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/HomeFinder.cpp
index 739d3e56d3f..89fe20f36f4 100644
--- a/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/HomeFinder.cpp
+++ b/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/HomeFinder.cpp
@@ -41,7 +41,8 @@ namespace CCF
SimpleName name (id->lexeme ());
- hf_ = &ctx.tu ().new_node<SemanticGraph::HomeFinder> ();
+ hf_ = &ctx.tu ().new_node<SemanticGraph::HomeFinder> (
+ ctx.file (), id->line ());
ctx.tu ().new_edge<Returns> (*hf_, c);
ctx.tu ().new_edge<Defines> (ctx.scope (), *hf_, name);
@@ -67,33 +68,40 @@ namespace CCF
Type& t (resolve<Type> (from, name, Flags::complete));
Parameter& p (
- ctx.tu ().new_node<InParameter> (name_id->lexeme ()));
+ ctx.tu ().new_node<InParameter> (
+ ctx.file (), name_id->line (), name_id->lexeme ()));
ctx.tu ().new_edge<Belongs> (p, t);
ctx.tu ().new_edge<Receives> (*hf_, p);
}
catch (Resolve const&)
{
- cerr << "error: invalid parameter declaration" << endl;
+ cerr << ctx.file () << ":" << type_id->line () << ": error: "
+ << "invalid parameter declaration" << endl;
throw;
}
}
catch (NotFound const&)
{
- cerr << "no type with name \'" << name
+ cerr << ctx.file () << ":" << type_id->line () << ": error: "
+ << "no type with name \'" << name
<< "\' visible from scope \'" << from << "\'" << endl;
}
catch (WrongType const&)
{
- cerr << "declaration with name \'" << name
+ cerr << ctx.file () << ":" << type_id->line () << ": error: "
+ << "declaration with name \'" << name
<< "\' visible from scope \'" << from
<< "\' is not a type declaration" << endl;
- cerr << "using non-type as an finder parameter type is "
+
+ cerr << ctx.file () << ":" << type_id->line () << ": error: "
+ << "using non-type as a finder parameter type is "
<< "illegal" << endl;
}
catch (NotComplete const& e)
{
- cerr << "type \'" << e.name () << "\' is not complete" << endl;
+ cerr << ctx.file () << ":" << type_id->line () << ": error: "
+ << "type \'" << e.name () << "\' is not complete" << endl;
}
}
@@ -118,21 +126,26 @@ namespace CCF
}
catch (Resolve const&)
{
- cerr << "error: invalid raises declaration" << endl;
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "invalid raises declaration" << endl;
throw;
}
}
catch (NotFound const&)
{
- cerr << "no exception with name \'" << name
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "no exception with name \'" << name
<< "\' visible from scope \'" << from << "\'" << endl;
}
catch (WrongType const&)
{
- cerr << "declaration with name \'" << name
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "declaration with name \'" << name
<< "\' visible from scope \'" << from
<< "\' is not an exception declaration" << endl;
- cerr << "using non-exception type in raises declaration is "
+
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "using non-exception type in raises declaration is "
<< "illegal" << endl;
}
}
diff --git a/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Include.cpp b/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Include.cpp
index 3f565eac47c..3e4b42a5267 100644
--- a/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Include.cpp
+++ b/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Include.cpp
@@ -29,17 +29,16 @@ namespace CCF
Include::
Include (Context& c,
- CompilerElements::Context& context,
Diagnostic::Stream& dout,
SemanticAction::Factory& action_factory)
: Base (c),
- context_ (context),
dout_ (dout),
action_factory_ (action_factory)
{
abs_path_stack_.push (
fs::normalize (
- fs::complete (context_.get<fs::path> ("file-path"))));
+ fs::complete (
+ ctx.parsing_context ().get<fs::path> ("file-path"))));
}
void Include::
@@ -64,6 +63,8 @@ namespace CCF
void Include::
impl (StringLiteralPtr const& sl, Type_ type)
{
+ CompilerElements::Context& pctx (ctx.parsing_context ());
+
std::string prefix;
if (type == quote_)
@@ -123,7 +124,7 @@ namespace CCF
typedef std::vector<fs::path> SearchPaths;
SearchPaths const& search_paths (
- context_.get<SearchPaths> ("include-search-paths"));
+ pctx.get<SearchPaths> ("include-search-paths"));
for (SearchPaths::const_iterator
i (search_paths.begin ()),
@@ -151,7 +152,8 @@ namespace CCF
if (!found)
{
- cerr << sl << ": error: file not found." << endl;
+ cerr << ctx.file () << ":" << sl->line () << ": error: "
+ << "'" << sl << "': file not found" << endl;
return;
}
}
@@ -166,7 +168,8 @@ namespace CCF
//
ifs.exceptions (std::ios_base::iostate (0));
- TranslationRegion& r (ctx.tu() .new_node<TranslationRegion> ());
+ TranslationRegion& r (
+ ctx.tu ().new_node<TranslationRegion> (include_path, 0));
if (type == quote_)
{
@@ -186,14 +189,14 @@ namespace CCF
// Create Root scope for new region.
//
- Root& root (ctx.tu ().new_node<Root> ());
+ Root& root (ctx.tu ().new_node<Root> (include_path, 0));
ctx.tu ().new_edge<ContainsRoot> (r, root);
ctx.scope (root);
// Store previous relative path and current absolute.
//
- rel_path_stack_.push (context_.get<fs::path> ("file-path"));
- context_.set("file-path", include_path);
+ rel_path_stack_.push (pctx.get<fs::path> ("file-path"));
+ pctx.set("file-path", include_path);
abs_path_stack_.push (complete_path);
@@ -206,7 +209,7 @@ namespace CCF
CompilerElements::InputStreamAdapter isa (ifs);
CompilerElements::CPP::Symbols const& symbols (
- context_.get<CompilerElements::CPP::Symbols> ("cpp-symbols"));
+ pctx.get<CompilerElements::CPP::Symbols> ("cpp-symbols"));
CompilerElements::CPP::Preprocessor pp (isa, symbols);
IDL3::LexicalAnalyzer lexer (pp);
@@ -223,7 +226,7 @@ namespace CCF
if (token_stream.size () > 1)
{
- IDL3::Parser parser (context_, dout_, lexer, action_factory_);
+ IDL3::Parser parser (pctx, dout_, lexer, action_factory_);
IDL2::Parsing::parse (token_stream.begin (),
token_stream.end (),
@@ -234,7 +237,7 @@ namespace CCF
//
abs_path_stack_.pop ();
- context_.set("file-path", rel_path_stack_.top ());
+ pctx.set("file-path", rel_path_stack_.top ());
rel_path_stack_.pop ();
@@ -246,18 +249,20 @@ namespace CCF
// Create new Root scope.
//
{
- Root& root (ctx.tu ().new_node<Root> ());
+ Root& root (ctx.tu ().new_node<Root> (ctx.file (), 0));
ctx.tu ().new_edge<ContainsRoot> (ctx.region (), root);
ctx.scope (root);
}
}
catch (fs::filesystem_error const&)
{
- cerr << sl << ": error: unable to open in read mode" << endl;
+ cerr << ctx.file () << ":" << sl->line () << ": error: "
+ << "'" << sl << "': unable to open in read mode" << endl;
}
catch (std::ios_base::failure const&)
{
- cerr << sl << ": error: unable to open in read mode" << endl;
+ cerr << ctx.file () << ":" << sl->line () << ": error: "
+ << "'" << sl << "': unable to open in read mode" << endl;
}
}
diff --git a/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Include.hpp b/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Include.hpp
index 171e07b968a..9c699fe20ba 100644
--- a/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Include.hpp
+++ b/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Include.hpp
@@ -34,7 +34,6 @@ namespace CCF
{
public:
Include (Context& c,
- CompilerElements::Context& context,
Diagnostic::Stream& dout,
SemanticAction::Factory& action_factory);
@@ -61,7 +60,6 @@ namespace CCF
handle_already_included (fs::path const& path,
StringLiteralPtr const& sl);
private:
- CompilerElements::Context& context_;
Diagnostic::Stream& dout_;
SemanticAction::Factory& action_factory_;
diff --git a/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Provides.cpp b/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Provides.cpp
index e20e60e344e..52c89b1fe81 100644
--- a/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Provides.cpp
+++ b/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Provides.cpp
@@ -44,21 +44,26 @@ namespace CCF
}
catch (Resolve const&)
{
- cerr << "error: invalid provides declaration" << endl;
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "invalid provides declaration" << endl;
throw;
}
}
catch (NotFound const&)
{
- cerr << "no interface with name \'" << name
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "no interface with name \'" << name
<< "\' visible from scope \'" << from << "\'" << endl;
}
catch (WrongType const&)
{
- cerr << "declaration with name \'" << name
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "declaration with name \'" << name
<< "\' visible from scope \'" << from
<< "\' is not an eventtype declaration" << endl;
- cerr << "using non-interface type in provides declaration is "
+
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "using non-interface type in provides declaration is "
<< "illegal" << endl;
}
}
@@ -70,7 +75,9 @@ namespace CCF
if (type_)
{
- Provider& p (ctx.tu ().new_node<Provider> ());
+ Provider& p (
+ ctx.tu ().new_node<Provider> (
+ ctx.file (), id->line ()));
ctx.tu ().new_edge<Belongs> (p, *type_);
ctx.tu ().new_edge<Defines> (ctx.scope (), p, id->lexeme ());
diff --git a/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Publishes.cpp b/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Publishes.cpp
index 08b49d739ed..01ccd4a2347 100644
--- a/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Publishes.cpp
+++ b/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Publishes.cpp
@@ -44,21 +44,26 @@ namespace CCF
}
catch (Resolve const&)
{
- cerr << "error: invalid publishes declaration" << endl;
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "invalid publishes declaration" << endl;
throw;
}
}
catch (NotFound const&)
{
- cerr << "no eventtype with name \'" << name
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "no eventtype with name \'" << name
<< "\' visible from scope \'" << from << "\'" << endl;
}
catch (WrongType const&)
{
- cerr << "declaration with name \'" << name
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "declaration with name \'" << name
<< "\' visible from scope \'" << from
<< "\' is not an eventtype declaration" << endl;
- cerr << "using non-eventtype in publishes declaration is illegal"
+
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "using non-eventtype in publishes declaration is illegal"
<< endl;
}
}
@@ -70,7 +75,9 @@ namespace CCF
if (type_)
{
- Publisher& p (ctx.tu ().new_node<Publisher> ());
+ Publisher& p (
+ ctx.tu ().new_node<Publisher> (
+ ctx.file (), id->line ()));
ctx.tu ().new_edge<Belongs> (p, *type_);
ctx.tu ().new_edge<Defines> (ctx.scope (), p, id->lexeme ());
diff --git a/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Uses.cpp b/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Uses.cpp
index 96ec5adb823..1ad850502b0 100644
--- a/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Uses.cpp
+++ b/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Uses.cpp
@@ -51,21 +51,26 @@ namespace CCF
}
catch (Resolve const&)
{
- cerr << "error: invalid uses declaration" << endl;
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "invalid uses declaration" << endl;
throw;
}
}
catch (NotFound const&)
{
- cerr << "no interface with name \'" << name
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "no interface with name \'" << name
<< "\' visible from scope \'" << from << "\'" << endl;
}
catch (WrongType const&)
{
- cerr << "declaration with name \'" << name
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "declaration with name \'" << name
<< "\' visible from scope \'" << from
<< "\' is not an eventtype declaration" << endl;
- cerr << "using non-interface type in uses declaration is "
+
+ cerr << ctx.file () << ":" << id->line () << ": error: "
+ << "using non-interface type in uses declaration is "
<< "illegal" << endl;
}
}
@@ -79,8 +84,10 @@ namespace CCF
{
User* u;
- if (multiple_) u = &ctx.tu ().new_node<MultiUser> ();
- else u = &ctx.tu ().new_node<SingleUser> ();
+ if (multiple_)
+ u = &ctx.tu ().new_node<MultiUser> (ctx.file (), id->line ());
+ else
+ u = &ctx.tu ().new_node<SingleUser> (ctx.file (), id->line ());
ctx.tu ().new_edge<Belongs> (*u, *type_);
ctx.tu ().new_edge<Defines> (ctx.scope (), *u, id->lexeme ());
diff --git a/CIAO/CCF/CCF/IDL3/SemanticGraph/Component.cpp b/CIAO/CCF/CCF/IDL3/SemanticGraph/Component.cpp
index 3127a356d6b..da8d0dde24b 100644
--- a/CIAO/CCF/CCF/IDL3/SemanticGraph/Component.cpp
+++ b/CIAO/CCF/CCF/IDL3/SemanticGraph/Component.cpp
@@ -55,6 +55,11 @@ namespace CCF
TypeInfo const& User::
static_type_info () { return user_; }
+ User::
+ ~User ()
+ {
+ }
+
// MultiUser
//
diff --git a/CIAO/CCF/CCF/IDL3/SemanticGraph/Component.hpp b/CIAO/CCF/CCF/IDL3/SemanticGraph/Component.hpp
index d4a5150febf..f3d7b7784e8 100644
--- a/CIAO/CCF/CCF/IDL3/SemanticGraph/Component.hpp
+++ b/CIAO/CCF/CCF/IDL3/SemanticGraph/Component.hpp
@@ -26,7 +26,8 @@ namespace CCF
protected:
friend class Graph<Node, Edge>;
- Provider ()
+ Provider (Path const& path, unsigned long line)
+ : Node (path, line)
{
type_info (static_type_info ());
}
@@ -43,10 +44,13 @@ namespace CCF
static_type_info ();
protected:
- User ()
+ User () // For virtual inheritance only.
{
type_info (static_type_info ());
}
+
+ virtual
+ ~User () = 0;
};
@@ -59,7 +63,8 @@ namespace CCF
protected:
friend class Graph<Node, Edge>;
- MultiUser ()
+ MultiUser (Path const& path, unsigned long line)
+ : Node (path, line)
{
type_info (static_type_info ());
}
@@ -75,7 +80,8 @@ namespace CCF
protected:
friend class Graph<Node, Edge>;
- SingleUser ()
+ SingleUser (Path const& path, unsigned long line)
+ : Node (path, line)
{
type_info (static_type_info ());
}
@@ -94,7 +100,8 @@ namespace CCF
protected:
friend class Graph<Node, Edge>;
- Publisher ()
+ Publisher (Path const& path, unsigned long line)
+ : Node (path, line)
{
type_info (static_type_info ());
}
@@ -113,7 +120,8 @@ namespace CCF
protected:
friend class Graph<Node, Edge>;
- Emitter ()
+ Emitter (Path const& path, unsigned long line)
+ : Node (path, line)
{
type_info (static_type_info ());
}
@@ -132,7 +140,8 @@ namespace CCF
protected:
friend class Graph<Node, Edge>;
- Consumer ()
+ Consumer (Path const& path, unsigned long line)
+ : Node (path, line)
{
type_info (static_type_info ());
}
@@ -183,8 +192,8 @@ namespace CCF
protected:
friend class Graph<Node, Edge>;
- Component ()
- : inherits_ (0)
+ Component (Path const& path, unsigned long line)
+ : Node (path, line), inherits_ (0)
{
type_info (static_type_info ());
}
diff --git a/CIAO/CCF/CCF/IDL3/SemanticGraph/EventType.cpp b/CIAO/CCF/CCF/IDL3/SemanticGraph/EventType.cpp
index fcb9ef57f7d..9fde39c008d 100644
--- a/CIAO/CCF/CCF/IDL3/SemanticGraph/EventType.cpp
+++ b/CIAO/CCF/CCF/IDL3/SemanticGraph/EventType.cpp
@@ -32,6 +32,11 @@ namespace CCF
TypeInfo const& EventType::
static_type_info () { return event_type_; }
+ EventType::
+ ~EventType ()
+ {
+ }
+
// AbstractEventType
//
diff --git a/CIAO/CCF/CCF/IDL3/SemanticGraph/EventType.hpp b/CIAO/CCF/CCF/IDL3/SemanticGraph/EventType.hpp
index 5990e1e5884..203ee321f66 100644
--- a/CIAO/CCF/CCF/IDL3/SemanticGraph/EventType.hpp
+++ b/CIAO/CCF/CCF/IDL3/SemanticGraph/EventType.hpp
@@ -26,10 +26,13 @@ namespace CCF
protected:
friend class Graph<Node, Edge>;
- EventType ()
+ EventType () // For virtual inheritance only.
{
type_info (static_type_info ());
}
+
+ virtual
+ ~EventType () = 0;
};
@@ -46,7 +49,8 @@ namespace CCF
protected:
friend class Graph<Node, Edge>;
- AbstractEventType ()
+ AbstractEventType (Path const& path, unsigned long line)
+ : Node (path, line), AbstractValueType (path, line)
{
type_info (static_type_info ());
}
@@ -66,7 +70,8 @@ namespace CCF
protected:
friend class Graph<Node, Edge>;
- ConcreteEventType ()
+ ConcreteEventType (Path const& path, unsigned long line)
+ : Node (path, line), ConcreteValueType (path, line)
{
type_info (static_type_info ());
}
@@ -84,7 +89,10 @@ namespace CCF
protected:
friend class Graph<Node, Edge>;
- EventTypeFactory ()
+ EventTypeFactory (Path const& path, unsigned long line)
+ : Node (path, line),
+ TwoWayOperation (path, line),
+ ValueTypeFactory (path, line)
{
type_info (static_type_info ());
}
diff --git a/CIAO/CCF/CCF/IDL3/SemanticGraph/Home.hpp b/CIAO/CCF/CCF/IDL3/SemanticGraph/Home.hpp
index 148b104e064..d243d468cbe 100644
--- a/CIAO/CCF/CCF/IDL3/SemanticGraph/Home.hpp
+++ b/CIAO/CCF/CCF/IDL3/SemanticGraph/Home.hpp
@@ -65,8 +65,8 @@ namespace CCF
protected:
friend class Graph<Node, Edge>;
- Home ()
- : inherits_ (0)
+ Home (Path const& path, unsigned long line)
+ : Node (path, line), inherits_ (0)
{
type_info (static_type_info ());
}
@@ -116,7 +116,8 @@ namespace CCF
protected:
friend class Graph<Node, Edge>;
- HomeFactory ()
+ HomeFactory (Path const& path, unsigned long line)
+ : Node (path, line), TwoWayOperation (path, line)
{
type_info (static_type_info ());
}
@@ -135,7 +136,8 @@ namespace CCF
protected:
friend class Graph<Node, Edge>;
- HomeFinder ()
+ HomeFinder (Path const& path, unsigned long line)
+ : Node (path, line), TwoWayOperation (path, line)
{
type_info (static_type_info ());
}
diff --git a/CIAO/CIDLC/cidlc.cpp b/CIAO/CIDLC/cidlc.cpp
index acf5909230d..b0ca7e2b178 100644
--- a/CIAO/CIDLC/cidlc.cpp
+++ b/CIAO/CIDLC/cidlc.cpp
@@ -264,7 +264,7 @@ main (int argc, char* argv[])
return 0;
}
- TranslationUnit tu;
+ TranslationUnit tu (file_path, 0);
// Initialize compilation context.
//
@@ -375,10 +375,12 @@ main (int argc, char* argv[])
{
cerr << "invalid name exception" << endl;
}
+ /*
catch (...)
{
cerr << "caught unknown exception" << endl;
}
+ */
return 1;
}
diff --git a/CIAO/ChangeLog b/CIAO/ChangeLog
index d3a2642073d..e4f34c92a1f 100644
--- a/CIAO/ChangeLog
+++ b/CIAO/ChangeLog
@@ -1,7 +1,133 @@
+Fri Sep 22 09:27:25 UTC 2006 Boris Kolpackov <boris@codesynthesis.com>
+
+ * CCF/CCF/IDL2/SemanticGraph/Fundamental.cpp:
+ * CCF/CCF/IDL2/SemanticGraph/Interface.cpp:
+ * CCF/CCF/IDL2/SemanticGraph/Operation.cpp:
+ * CCF/CCF/IDL2/SemanticGraph/Fundamental.hpp:
+ * CCF/CCF/IDL2/SemanticGraph/Interface.hpp:
+ * CCF/CCF/IDL2/SemanticGraph/Operation.hpp:
+ * CCF/CCF/IDL2/SemanticGraph/String.cpp:
+ * CCF/CCF/IDL2/SemanticGraph/ValueTypeMember.cpp:
+ * CCF/CCF/IDL2/SemanticGraph/Enum.hpp:
+ * CCF/CCF/IDL2/SemanticGraph/IntExpression.cpp:
+ * CCF/CCF/IDL2/SemanticGraph/String.hpp:
+ * CCF/CCF/IDL2/SemanticGraph/ValueTypeMember.hpp:
+ * CCF/CCF/IDL2/SemanticGraph/Elements.cpp:
+ * CCF/CCF/IDL2/SemanticGraph/ValueType.cpp:
+ * CCF/CCF/IDL2/SemanticGraph/IntExpression.hpp:
+ * CCF/CCF/IDL2/SemanticGraph/Name.cpp:
+ * CCF/CCF/IDL2/SemanticGraph/Elements.hpp:
+ * CCF/CCF/IDL2/SemanticGraph/Fundamental.hpp.m4:
+ * CCF/CCF/IDL2/SemanticGraph/ValueType.hpp:
+ * CCF/CCF/IDL2/SemanticGraph/Array.hpp:
+ * CCF/CCF/IDL2/SemanticGraph/Name.hpp:
+ * CCF/CCF/IDL2/SemanticGraph/Union.cpp:
+ * CCF/CCF/IDL2/SemanticGraph/Native.hpp:
+ * CCF/CCF/IDL2/SemanticGraph/Union.hpp:
+ * CCF/CCF/IDL2/SemanticGraph/Attribute.cpp:
+ * CCF/CCF/IDL2/SemanticGraph/Exception.hpp:
+ * CCF/CCF/IDL2/SemanticGraph/Translation.hpp:
+ * CCF/CCF/IDL2/SemanticGraph/TypeId.hpp:
+ * CCF/CCF/IDL2/SemanticGraph/Graph.hpp:
+ * CCF/CCF/IDL2/SemanticGraph/Attribute.hpp:
+ * CCF/CCF/IDL2/SemanticGraph/Sequence.cpp:
+ * CCF/CCF/IDL2/SemanticGraph/Member.hpp:
+ * CCF/CCF/IDL2/SemanticGraph/Fundamental.cpp.m4:
+ * CCF/CCF/IDL2/SemanticGraph/Sequence.hpp:
+ * CCF/CCF/IDL2/SemanticGraph/Literals.cpp:
+ * CCF/CCF/IDL2/SemanticGraph/Graph.tpp:
+ * CCF/CCF/IDL2/SemanticGraph/Literals.hpp:
+ * CCF/CCF/IDL2/SemanticGraph/Struct.hpp:
+ * CCF/CCF/IDL2/SemanticGraph/Module.hpp:
+
+ * CCF/CCF/CIDL/SemanticGraph/Executor.cpp:
+ * CCF/CCF/CIDL/SemanticGraph/Composition.cpp:
+ * CCF/CCF/CIDL/SemanticGraph/Executor.hpp:
+ * CCF/CCF/CIDL/SemanticGraph/Composition.hpp:
+
+ * CCF/CCF/IDL3/SemanticGraph/Component.cpp:
+ * CCF/CCF/IDL3/SemanticGraph/EventType.cpp:
+ * CCF/CCF/IDL3/SemanticGraph/Component.hpp:
+ * CCF/CCF/IDL3/SemanticGraph/EventType.hpp:
+ * CCF/CCF/IDL3/SemanticGraph/Home.hpp:
+
+
+ Add file name and line information to every semantic
+ graph node. This information is used in diagnostics.
+
+
+ * CCF/CCF/IDL2/SemanticAction/Typedef.hpp:
+ * CCF/CCF/IDL2/SemanticAction/NumericExpression.hpp:
+
+ Adjust semantic actions interface to provide a way to derive
+ line numbers.
+
+
+ * CCF/CCF/IDL2/SemanticAction/Impl/Operation.cpp:
+ * CCF/CCF/IDL2/SemanticAction/Impl/Interface.cpp:
+ * CCF/CCF/IDL2/SemanticAction/Impl/Enum.cpp:
+ * CCF/CCF/IDL2/SemanticAction/Impl/Operation.hpp:
+ * CCF/CCF/IDL2/SemanticAction/Impl/ValueTypeMember.cpp:
+ * CCF/CCF/IDL2/SemanticAction/Impl/ValueType.cpp:
+ * CCF/CCF/IDL2/SemanticAction/Impl/Elements.hpp:
+ * CCF/CCF/IDL2/SemanticAction/Impl/NumericExpression.cpp:
+ * CCF/CCF/IDL2/SemanticAction/Impl/Native.cpp:
+ * CCF/CCF/IDL2/SemanticAction/Impl/NumericExpression.hpp:
+ * CCF/CCF/IDL2/SemanticAction/Impl/Union.cpp:
+ * CCF/CCF/IDL2/SemanticAction/Impl/Exception.cpp:
+ * CCF/CCF/IDL2/SemanticAction/Impl/TypeId.cpp:
+ * CCF/CCF/IDL2/SemanticAction/Impl/Typedef.cpp:
+ * CCF/CCF/IDL2/SemanticAction/Impl/Attribute.cpp:
+ * CCF/CCF/IDL2/SemanticAction/Impl/Typedef.hpp:
+ * CCF/CCF/IDL2/SemanticAction/Impl/ValueTypeFactory.cpp:
+ * CCF/CCF/IDL2/SemanticAction/Impl/Factory.cpp:
+ * CCF/CCF/IDL2/SemanticAction/Impl/Member.cpp:
+ * CCF/CCF/IDL2/SemanticAction/Impl/Factory.hpp:
+ * CCF/CCF/IDL2/SemanticAction/Impl/Include.cpp:
+ * CCF/CCF/IDL2/SemanticAction/Impl/Struct.cpp:
+ * CCF/CCF/IDL2/SemanticAction/Impl/Module.cpp:
+ * CCF/CCF/IDL2/SemanticAction/Impl/Const.cpp:
+
+ * CCF/CCF/IDL3/SemanticAction/Impl/Publishes.cpp:
+ * CCF/CCF/IDL3/SemanticAction/Impl/Component.cpp:
+ * CCF/CCF/IDL3/SemanticAction/Impl/Factory.cpp:
+ * CCF/CCF/IDL3/SemanticAction/Impl/EventTypeFactory.cpp:
+ * CCF/CCF/IDL3/SemanticAction/Impl/Uses.cpp:
+ * CCF/CCF/IDL3/SemanticAction/Impl/HomeFinder.cpp:
+ * CCF/CCF/IDL3/SemanticAction/Impl/HomeFactory.cpp:
+ * CCF/CCF/IDL3/SemanticAction/Impl/Emits.cpp:
+ * CCF/CCF/IDL3/SemanticAction/Impl/EventType.cpp:
+ * CCF/CCF/IDL3/SemanticAction/Impl/Include.cpp:
+ * CCF/CCF/IDL3/SemanticAction/Impl/Home.cpp:
+ * CCF/CCF/IDL3/SemanticAction/Impl/Include.hpp:
+ * CCF/CCF/IDL3/SemanticAction/Impl/Provides.cpp:
+ * CCF/CCF/IDL3/SemanticAction/Impl/Consumes.cpp:
+
+ * CCF/CCF/CIDL/SemanticAction/Impl/Composition.cpp:
+ * CCF/CCF/CIDL/SemanticAction/Impl/HomeExecutor.cpp:
+
+ Propagate file name and line number from tokens to semantic
+ graph nodes. Use file and line numbers when printing error
+ messages.
+
+
+ * CCF/CCF/IDL2/Token.hpp:
+ * CCF/CCF/IDL2/Parser.hpp:
+ * CCF/CCF/IDL2/Parser.cpp:
+
+ Fix a number of bugs in error handling and recover.
+
+
+ * CIDLC/cidlc.cpp:
+
+ Use file name and line number when creating the translation
+ unit object.
+
+
Wed Sep 20 04:05:42 UTC 2006 xiong,ming <ming.xiong@vanderbilt.edu>
* docs\tutorials\CoSMIC\02.html
-
+
Added some useful links to various resources to help readers reduce
learning curve.Added a small section that mentions that a Node Map file
has to be created in order to get Quoter example working. Again,
@@ -12,14 +138,14 @@ Wed Sep 20 04:05:42 UTC 2006 xiong,ming <ming.xiong@vanderbilt.edu>
Mon Sep 18 03:26:22 UTC 2006 William R. Otte <wotte@dre.vanderbilt.edu>
* tools/Config_Handlers/Utils/XML_Helper.h
-
+
Fixed compile error by removing extra ;.
Fri Sep 15 21:28:47 UTC 2006 Gan Deng <gan.deng@vanderbilt.edu>
* DAnCE/DomainApplicationManager/DomainApplicationManager_Impl.cpp
* ciao/Deployment_Core.idl
-
+
Removed the unnecessary event type definition for RTEC since
they are no longer used.
@@ -27,7 +153,7 @@ Sun Sep 10 09:20:18 UTC 2006 William R. Otte <wotte@dre.vanderbilt.edu>
* tools/Config_Handlers/Utils/XML_Helper.cpp
* tools/Config_Handlers/Utils/XML_Helper.h
-
+
Removed workaround from previous commit, as Ossama Othman has
provided the proper fix in the G++ macros.
@@ -35,7 +161,7 @@ Fri Sep 8 00:28:27 UTC 2006 William R. Otte <wotte@dre.vanderbilt.edu>
* tools/Config_Handlers/Utils/XML_Helper.cpp
* tools/Config_Handlers/Utils/XML_Helper.h
-
+
Made the export declaration on the singleton typedef
contingent on a Microsoft compiler, as the GCC included
with FC5 was not defining the symbol as a result.
@@ -44,7 +170,7 @@ Fri Sep 1 03:09:38 UTC 2006 xiong,ming <ming.xiong@vanderbilt.edu>
* docs\tutorials\CoSMIC\index.html
* docs\tutorials\CoSMIC\01.html
-
+
Updated index.html to change the cosmic version.Updated 01.html
to reflect recent changes of idl_to_picml. Thanks to Sowayan Abdullah
from LMCO for his help in improving the cosmic documentations.
@@ -53,7 +179,7 @@ Thu Aug 31 22:45:09 UTC 2006 Shanshan Jiang <shanshan.jiang@vanderbilt.edu>
* DAnCE/RepositoryManager/RepositoryManager.mpc
Modified this file to include $(CIAO_ROOT)/tools/Config_Handlers
- in the RMAdmin project.
+ in the RMAdmin project.
Wed Aug 30 17:16:18 UTC 2006 Shanshan Jiang <shanshan.jiang@vanderbilt.edu>
@@ -68,10 +194,10 @@ Tue Aug 29 23:08:20 UTC 2006 Shanshan Jiang <shanshan.jiang@vanderbilt.edu>
Fixed the "reference to `ACE_Singleton<CIAO::Config_Handlers
::XML_Helper, ACE_Null_Mutex>::instance()'"warnings with
FC5_Static build.
-
+
* DAnCE/RepositoryManager/RMadmin.cpp
* DAnCE/RepositoryManager/RepositoryManager_Impl.cpp
- Removed unnecessary using of CIAO::Config_Handlers::XML_Helper.
+ Removed unnecessary using of CIAO::Config_Handlers::XML_Helper.
Mon Aug 28 12:53:12 UTC 2006 Johnny Willemsen <jwillemsen@remedy.nl>