Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » [TCS] package notation for recursive namespace
[TCS] package notation for recursive namespace [message #21462] Wed, 10 September 2008 08:24 Go to next message
T Kruse is currently offline T KruseFriend
Messages: 73
Registered: July 2009
Member
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 08:30 Go to previous messageGo to next message
T Kruse is currently offline T KruseFriend
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 Go to previous message
Frédéric Jouault is currently offline Frédéric JouaultFriend
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
>
Previous Topic:Re: [TCS] TCS helpers
Next Topic:[TCS] registering PDL extensions
Goto Forum:
  


Current Time: Thu Dec 26 18:31:29 GMT 2024

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

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

Back to the top