Re: [Haskell-cafe] Parsec-like parser combinator that handles left recursion?

2009-12-10 Thread Nils Anders Danielsson
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

[Haskell-cafe] Parsec-like parser combinator that handles left recursion?

2009-12-09 Thread oleg
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,

Re: [Haskell-cafe] Parsec-like parser combinator that handles left recursion?

2009-12-09 Thread Nils Anders Danielsson
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

Re: [Haskell-cafe] Parsec-like parser combinator that handles left recursion?

2009-12-09 Thread Dan Doel
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

Re: [Haskell-cafe] Parsec-like parser combinator that handles left recursion?

2009-12-09 Thread Nils Anders Danielsson
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

Re: [Haskell-cafe] Parsec-like parser combinator that handles left recursion?

2009-12-08 Thread John A. De Goes
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 :) > ___

Re: [Haskell-cafe] Parsec-like parser combinator that handles left recursion?

2009-12-08 Thread S. Doaitse Swierstra
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

[Haskell-cafe] Parsec-like parser combinator that handles left recursion?

2009-12-08 Thread Adam Cigánek
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