lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


> I was wondering if anyone using LPEG for grammars with left recursion
> had tried to implement the ideas in Alessandro Warth's PhD thesis
> "Experimenting With Programming Languages":

> http://www.vpri.org/pdf/tr2008003_experimenting.pdf

> Seems like a really interesting extension to PEGs.  I came across it
> via http://vpri.org/html/writings.php .  I'm not a PEG expert, but I
> haven been using them to model languages and have found it really
> quite cumbersome to handle left recursion because it has ugly
> consequences for what the parser outputs in terms of captures.


I think the approach of Warth is not very clear.
I have studied left recursion in PEGs and I wrote
a draft in which I propose an extended semantics
for PEGs that gives meaning for left-recursive
rules.

In case somebody is interested, the draft is
available here:
http://www.lua.inf.puc-rio.br/~sergio/leftpeglist.pdf

Sérgio


      ____________________________________________________________________________________
Veja quais são os assuntos do momento no Yahoo! +Buscados
http://br.maisbuscados.yahoo.com