On 2009-12-10 07:16, o...@okmij.org wrote:
There are at least two parser combinator libraries that can deal with
*any* left-recursive grammars.
Parser combinators are often used to describe infinite grammars (with a
finite number of parametrised non-terminals). The library described by
Frost et
There are at least two parser combinator libraries that can deal with
*any* left-recursive grammars. That said, Prof. Swierstra's advice to
try to get rid of left recursion is still well worth to follow.
The first library is described in
Frost, Richard, Hafiz, Rahmatullah, and Callaghan,
On 2009-12-09 18:50, Dan Doel wrote:
(Your parsers aren't PEGs, are they? If so, I apologize for the
redundancy.)
No, my parsers use Brzozowski derivatives.
See the related work section of the paper I mentioned for some other
parser combinator libraries which can handle (some) left recursive
g
On Wednesday 09 December 2009 10:51:02 am Nils Anders Danielsson wrote:
> On 2009-12-08 16:11, S. Doaitse Swierstra wrote:
> > In principle it is not possible to parse left-recursive grammars [...]
>
> I suspect that this statement is based on some hidden assumption. It
> /is/ possible to parse ma
On 2009-12-08 16:11, S. Doaitse Swierstra wrote:
In principle it is not possible to parse left-recursive grammars [...]
I suspect that this statement is based on some hidden assumption. It
/is/ possible to parse many left recursive grammars using parser
combinators, without rewriting the gramma
X-Saiga.
Regards,
John
On Dec 8, 2009, at 7:10 AM, Adam Cigánek wrote:
> Hello there,
>
> Is there some other parser library, with similar nice API than Parsec,
> but which somehow handles left-recursive grammars? Ideally if it has
> at least rudimentary documentation and/or tutorial :)
> ___
In principle it is not possible to parse left-recursive grammars, but
you may follow the following route:
1 write your grammars using the constructors from the Christmastree
package at:
http://hackage.haskell.org/packages/archive/ChristmasTree/0.1.2/doc/html/Text-GRead-Grammar.html
2 i
Hello there,
Is there some other parser library, with similar nice API than Parsec,
but which somehow handles left-recursive grammars? Ideally if it has
at least rudimentary documentation and/or tutorial :)
___
Haskell-Cafe mailing list
Haskell-Cafe@hask