Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Re: Creating common interface
Re: Creating common interface [message #844034] Fri, 13 April 2012 16:01
Sebastian Zarnekow is currently offline Sebastian ZarnekowFriend
Messages: 3108
Registered: July 2009
Senior Member

no, there is no other way to do that in your grammar. You should
consider to import the ePackage and maintain it manually.

Need professional support for Eclipse Modeling?
Go visit:

Am 12.04.12 20:57, schrieb Andrew Gacek:
> I have an expression language that has both field and array access:
> Index returns Expr:
> Atom ({FieldIndex.base=current} '.' field=ID |
> {ArrayIndex.base=current} '[' index=INT ']')*
> ;
> This generates interfaces FieldIndex and ArrayIndex, both extending
> Expr, which have their own versions of set/getBase(). I am trying to
> find a way to get Xtext to generate an intermediate interface Index
> which extends Expr and contains set/getBase() and such that FieldIndex
> and ArrayIndex both extend Index. So far the best solution I've found is
> the following two fake productions:
> Fake1 returns Expr: {Index} base=Expr;
> Fake2 returns Index: {FieldIndex} | {ArrayIndex};
> Is there a better way to do this?
> Thanks,
> Andrew
Previous Topic:Re: Creating common interface
Next Topic:question on IScope API(getSingleElement)--my mistake
Goto Forum:

Current Time: Thu Jul 09 23:49:48 GMT 2020

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

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

Back to the top