|
Re: derive in xtext [message #723712 is a reply to message #723624] |
Fri, 09 September 2011 08:07 |
Jan Koehnlein Messages: 760 Registered: July 2009 Location: Hamburg |
Senior Member |
|
|
Splitting up the grammar won't help you as Xtext will flatten that again
when generating the code.
Have you tried to set useClassSplitting=true in the *AntlrGenerator
fragments?
Am 09.09.11 03:40, schrieb lulu:
> Hi, All,
> I want to rewrite mysql grammar in Xtext. Because it is too long,
> writing in one .xtext file is difficult to parser.
> Can I use "import" like in ANTLR 3.3 which can seperate long grammar to
> several grammar files?
>
> Or, How to use single inheritance in xtext grammar?
>
> e.g. A.xtext is derive from B.xtext, B.xtext is derive from C.xtext,
> ..., X.xtext is derive from Terminal.xtext.
>
> Can I use this solution?
>
> If it is OK, And how to definition in the beginning of those xtext
> grammars?
>
>
> Thanks.
>
> Lulu
>
--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com
---
Get professional support from the Xtext committers at www.typefox.io
|
|
|
Re: derive in xtext [message #723743 is a reply to message #723712] |
Fri, 09 September 2011 10:27 |
lulu Messages: 19 Registered: August 2011 |
Junior Member |
|
|
Jan Koehnlein wrote on Fri, 09 September 2011 04:07Splitting up the grammar won't help you as Xtext will flatten that again
when generating the code.
Have you tried to set useClassSplitting=true in the *AntlrGenerator
fragments?
Am 09.09.11 03:40, schrieb lulu:
> Hi, All,
> I want to rewrite mysql grammar in Xtext. Because it is too long,
> writing in one .xtext file is difficult to parser.
> Can I use "import" like in ANTLR 3.3 which can seperate long grammar to
> several grammar files?
>
> Or, How to use single inheritance in xtext grammar?
>
> e.g. A.xtext is derive from B.xtext, B.xtext is derive from C.xtext,
> ..., X.xtext is derive from Terminal.xtext.
>
> Can I use this solution?
>
> If it is OK, And how to definition in the beginning of those xtext
> grammars?
>
>
> Thanks.
>
> Lulu
>
--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com
Yes, I set this classspliting=true in antlr generator fragment.
Because MySQL grammar is very complicate, can not write in one file?
Xtext will validate grammar file while it has some changes.
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.06395 seconds