|Xtext Grammar generation [message #1291858]
||Fri, 11 April 2014 05:29
| Salome Maro
Registered: January 2014
I am making a huge language (like UML in text). I already have an ecore metamodel and I am therefore using Xtext to generate the grammar automatically. I am wondering if there is a way I can change how Xtext generates the grammar and use my own custom template to generate this grammar.For example get rid of all the curly brackets and commas that are automatically generated.
Something like how the GenericFormatter woks but when the grammar is being generated.
|Re: Xtext Grammar generation [message #1292164 is a reply to message #1292066]
||Fri, 11 April 2014 11:24
| Ed Willink
Registered: July 2009
For research, you may be interested in
and slides 6,7,22 of
The hinted at automation should contribute to OCL 2.5.
Xtext is not the only tool available, so there may be others that
provide more integration, but I suspect they are mostly a little
different rather than a little better. Since Xtext is well established
within the Eclipse Simultaneous Release I have not felt tempted to look
elsewhere. The main size limitation of an Xtext grammar can be tackled
by an Xtext2LPG transformation that I started work on a couple of years
ago, but it's out of sight on my stack.
You can see from the slides that I see grammar and metamodels as
fundamentally separate so I like the way metamodel-annotated EBNF
(Xtext) respects the separation but allows joint usage.
On 11/04/2014 14:33, Salome Maro wrote:
> Hi Ed,
> Thanks again. This is very helpful. But lets say from a research point
> of view I wanted to pursue how to generate grammar according to a
> different template than that coming with Xtext, where would I start
> I am not aware of where exactly Xtext makes/creates the generated
> grammar from ecore.
Powered by FUDForum
. Page generated in 0.13049 seconds