How to replace ANTLR? [message #715230] |
Fri, 12 August 2011 17:01  |
Eclipse User |
|
|
|
Hi All,
I have developed a Java parser combinator library that supports left recursive grammars.
I am in the process of releasing it here: http://code.google.com/p/lingwah/
I would like to integrate my parser into XText and thus eliminate the need to left factor XText grammars.
I have not used XText a lot, I once downloaded it and created a simple example.
So... I have a couple of questions...
... is ANTLR the only barrier to supporting left recursion in XText?
... is it possible to replace ANTLR? If so how would I go about doing this?
Thanks...
ted stockwell
|
|
|
(no subject) [message #715327 is a reply to message #715230] |
Sat, 13 August 2011 06:52   |
Eclipse User |
|
|
|
Hi Ted
In http://journal.ub.tu-berlin.de/eceasst/article/view/444 I describe
the re-engineering the Eclipse OCL grammar from LPG (LALR) to Xtext LL.
In a naive LL, the change in recursion would be a problem. In practice
Xtext's EBNF capabilities (*, ?, +) are left recursive, and so far from
being deficient Xtext is actually much better.
The generated ANTLR grammars are huge and so one activity I would like
to progress is an Xtext to LPG transformation so that, for compile-only
purposes, a somewhat faster and much smaller grammar can be used while
retaining the power of Xtext as a model-integrated grammar with
auto-generated editor tooling.
If you're interested in Xtext to LALR mapping let me know.
Regards
Ed Willink
On 12/08/2011 22:01, ted stockwell wrote:
> Hi All,
>
> I have developed a Java parser combinator library that supports left
> recursive grammars.
> I am in the process of releasing it here:
> http://code.google.com/p/lingwah/
>
> I would like to integrate my parser into XText and thus eliminate the
> need to left factor XText grammars. I have not used XText a lot, I
> once downloaded it and created a simple example.
>
> So... I have a couple of questions...
>
> .. is ANTLR the only barrier to supporting left recursion in XText?
>
> .. is it possible to replace ANTLR? If so how would I go about doing
> this?
>
>
> Thanks...
>
> ted stockwell
|
|
|
(no subject) [message #715688 is a reply to message #715230] |
Mon, 15 August 2011 04:24  |
Eclipse User |
|
|
|
Hi Ted,
no, it's not easily possible to replace the parser. There are a lot of
invariants that have to be fulfilled when it comes to error recovery for
incomplete models, partial parsing and the construction of the node model.
Regards,
Sebastian
--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com
On 12.08.11 23:01, ted stockwell wrote:
> Hi All,
>
> I have developed a Java parser combinator library that supports left
> recursive grammars.
> I am in the process of releasing it here: http://code.google.com/p/lingwah/
>
> I would like to integrate my parser into XText and thus eliminate the
> need to left factor XText grammars. I have not used XText a lot, I once
> downloaded it and created a simple example.
>
> So... I have a couple of questions...
>
> .. is ANTLR the only barrier to supporting left recursion in XText?
>
> .. is it possible to replace ANTLR? If so how would I go about doing this?
>
>
> Thanks...
>
> ted stockwell
|
|
|
Powered by
FUDForum. Page generated in 0.03344 seconds