Hi,

Just wondering: isn't this the same approach as that described in
https://arxiv.org/abs/1207.0443, if you leave out their associativity
handling? (AFAIR)


Met vriendelijke groeten / Best regards,

Ger Hobbelt

--------------------------------------------------
web:    http://www.hobbelt.com/
        http://www.hebbut.net/
mail:   g...@hobbelt.com
mobile: +31-6-11 120 978
--------------------------------------------------

On Mon, May 8, 2017 at 5:13 PM, Juancarlo Añez <apal...@gmail.com> wrote:

> Hello!
>
> I implemented a PEG left recursion in TatSu using a single cache of
> recursive rule results, plus guards in the memoization cache.
>
> https://github.com/apalala/TatSu/blob/master/tatsu/contexts.py#L475-L557
>
>
> It's only a few lines of code once the TatSu-specific bookkeeping is
> ignored.
>
> All the test cases that were reported against Grako pass, with correct
> (left) associativity, including those with indirect left recursion.
>
> https://github.com/apalala/TatSu/blob/master/tatsu/test/
> grammar/left_recursion_test.py
>
>
> I'll find some time to write a (n informal) paper about the algorithm next
> weekend (the algorithm should be easier to explain if recursion is used in
> place of the while loop).
>
> Your comments are not only welcome, but eagarly awaited.
>
> Cheers!
>
> --
> Juancarlo *Añez*
>
> _______________________________________________
> PEG mailing list
> PEG@lists.csail.mit.edu
> https://lists.csail.mit.edu/mailman/listinfo/peg
>
>
_______________________________________________
PEG mailing list
PEG@lists.csail.mit.edu
https://lists.csail.mit.edu/mailman/listinfo/peg

Reply via email to