Skip to main content



      Home
Home » Modeling » TMF (Xtext) » [TCS] package notation for recursive namespace
[TCS] package notation for recursive namespace [message #21462] Wed, 10 September 2008 04:24 Go to next message
Eclipse UserFriend
Hi,

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 {

}

class PackageElement extends Element {
reference children[*] container : Element;
}
Re: [TCS] package notation for recursive namespace [message #21467 is a reply to message #21462] Wed, 10 September 2008 04:30 Go to previous messageGo to next message
Eclipse UserFriend
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 10:42 Go to previous message
Eclipse UserFriend
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
>
Previous Topic:Re: [TCS] TCS helpers
Next Topic:[TCS] registering PDL extensions
Goto Forum:
  


Current Time: Wed Jul 09 06:46:26 EDT 2025

Powered by FUDForum. Page generated in 0.06098 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top