D parsing

Philippe Sigaud philippe.sigaud at gmail.com
Wed Nov 6 15:27:06 PST 2013


On Tue, Nov 5, 2013 at 6:45 PM, Martin Nowak <code at dawg.eu> wrote:

> On 11/03/2013 02:45 AM, Timothee Cour wrote:
>
>> 1)
>> The main issue I see with pegged is PEG grammars don't support left
>> recursion, so for example will fail on foo[1].bar(2).fun().
>> Unless there's a plan to accomodate those, I sense a dead end.
>> One can eliminate left recursion but this has issues.
>>
>> 2)
>> There is some material on extending PEG to support those, eg "Left
>> Recursion in Parsing Expression Grammars", or code
>> https://github.com/orlandohill/peg-left-recursion but I don't know how
>> well they work in practice.
>>
>>  Scala extended their PEG generator to handle left recursion.
> But then there is also a Scala GLL implementation.
> https://github.com/djspiewak/gll-combinators


I didn't know that. My 'programming in Scala' book is a bit dated.
I'll have a look, thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20131107/80102c1b/attachment.html>


More information about the Digitalmars-d mailing list