|
Re: [TCS] package notation for recursive namespace [message #21467 is a reply to message #21462] |
Wed, 10 September 2008 08:30 |
T Kruse Messages: 73 Registered: July 2009 |
Member |
|
|
sorry for sending the post too early.
in my DSL, I want to allow to qualify elements in separate places using a
qualified path notation like in Java. My metamodel looks like this:
abstract class Element {
String name;
}
class PackageElement extends Element {
reference children[*] container : Element;
}
class ClassElement extends Element {
}
Now in my syntax, I want to use qualified names like in
"com.foo.bar.Test"
where all of com, foo, bar refer to PackageElement model elements.
Since this notation is left-recursive, I guess I cannot use mere
Classtemplates. But if I use an OperatorTemplate, I would still have to
use parentheses, right?
So is there any other solution in TCS, or would I rather have to create a
transitionary MetaModel and a Model transformation maybe to get this
language to work?
regards,
Thibault
|
|
|
Re: [TCS] package notation for recursive namespace [message #21828 is a reply to message #21467] |
Tue, 14 October 2008 14:42 |
Frédéric Jouault Messages: 572 Registered: July 2009 |
Senior Member |
|
|
Hi Thibault,
TCS does not currently provide automatic support for such qualified
names. This will very likely be supported in future versions.
In the mean time, you can use a pivot metamodel as you proposed.
Regards,
Frédéric
T Kruse a écrit :
> sorry for sending the post too early.
>
> in my DSL, I want to allow to qualify elements in separate places using
> a qualified path notation like in Java. My metamodel looks like this:
>
>
> abstract class Element {
> String name;
> }
>
> class PackageElement extends Element {
> reference children[*] container : Element;
> }
>
> class ClassElement extends Element {
> }
>
> Now in my syntax, I want to use qualified names like in
>
> "com.foo.bar.Test"
> where all of com, foo, bar refer to PackageElement model elements.
>
> Since this notation is left-recursive, I guess I cannot use mere
> Classtemplates. But if I use an OperatorTemplate, I would still have to
> use parentheses, right?
>
> So is there any other solution in TCS, or would I rather have to create
> a transitionary MetaModel and a Model transformation maybe to get this
> language to work?
>
> regards,
> Thibault
>
|
|
|
Powered by
FUDForum. Page generated in 0.03231 seconds