Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » import an Xtext grammar
import an Xtext grammar [message #899037] Mon, 30 July 2012 09:55 Go to next message
frank fotso is currently offline frank fotsoFriend
Messages: 91
Registered: May 2012
Member
hi
i would like to import an xtext grammar in another xtext grammar. so i wanted to know if it is possible to do that .
for example if i have a xtext grammar test.2 (containing the definition of Alice) and i want to use that Alice definition in another grammar call test.1, so i wanted to know if that is possible and if it is the case , how to do it?

best regards,
frank
Re: import an Xtext grammar [message #899054 is a reply to message #899037] Mon, 30 July 2012 11:27 Go to previous message
Henrik Lindberg is currently offline Henrik LindbergFriend
Messages: 2509
Registered: July 2009
Senior Member
You can base one grammar on another (just like the example use the
default terminals). It is described in the documentation.

Remember that the result is one grammar and one model - it is not a
composition of grammars, so mechanism works best when you want to reuse
a set of terminals, common data elements, and other items of "core" nature.

Regards
- henrik

On 2012-30-07 11:55, frank fotso wrote:
> hi i would like to import an xtext grammar in another xtext grammar. so
> i wanted to know if it is possible to do that .
> for example if i have a xtext grammar test.2 (containing the definition
> of Alice) and i want to use that Alice definition in another grammar
> call test.1, so i wanted to know if that is possible and if it is the
> case , how to do it?
>
> best regards,
> frank
Previous Topic:handling both latin-1 and utf-8 files
Next Topic:Xtext Classpath-Based global scoping
Goto Forum:
  


Current Time: Sun May 12 00:08:38 GMT 2024

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

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

Back to the top