|
Re: Antlr equivalent to the '&' operator [message #884221 is a reply to message #883606] |
Sun, 10 June 2012 13:24 |
Sebastian Zarnekow Messages: 3118 Registered: July 2009 |
Senior Member |
|
|
Nicolas,
Antlr does not support the unordered group concept natively. You'll have
to do it manually with predicates, post processing of the generated
parser code and such things. I'd recommend to stick with Xtext. You may
want to use a minimal module for the parser that is used to create an
injector. This should speed things up.
Regards,
Sebastian
--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com
Am 09.06.12 00:41, schrieb Nicolas alevée:
> I made a plugin with Xtext to create a DSL for Apache Ant. I love the
> result. Xtext is amazing how simple it is to make an editor from a
> grammar. Congrats to the developers.
>
> I wanted then to use the generated parser to be used by Ant. I made it
> work, that's nice. But I find the parser quite slow to load. On my
> icore7, almost 1 second just to load the parser without having parsed
> anything. And 1s is slow for a command line utility. I did some
> profiling and as far as I could understand, it's guice and Ecore which
> are eating most of the load time.
>
> Since Xtext is grammar is very close to the Antlr one, I rewrote the
> grammar into a vanilla Antlr one and generated a parser. The load time
> is then as fast as anyone would expect, just few millis to load some
> classes. This is duplicating the grammar, but I can deal with it.
>
> Well almost deal with it and here come my question. In my Xtext grammar
> I used the very useful operator '&'. But I don't know how to do in
> Antlr. Does anyone have some hint for me ?
>
>
> OT: the Ant DSL is checked in there:
> svn.apache.org/repos/asf/ant/sandbox/antdsl/
>
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03640 seconds