[Haskell-cafe] ANNOUNCE: Grempa 0.1.0, Embedded grammar DSL and
LALR parser generator
Felipe Lessa
felipe.lessa at gmail.com
Mon Sep 6 20:03:23 EDT 2010
On Mon, Sep 6, 2010 at 2:45 PM, Olle Fredriksson
<fredriksson.olle at gmail.com> wrote:
> expr :: Grammar Char E
> expr = do
> rec
> e <- rule [ Plus <@> e <# '+' <#> t
> , id <@> t
> ]
> t <- rule [ Times <@> t <# '*' <#> f
> , id <@> f
> ]
> f <- rule [ id <@ '(' <#> e <# ')'
> , Var <@ 'x'
> ]
> return e
Looks like Applicative style. This is good, even while I don't really
know why we are seeing <@> and <#> instead of <$> and <*>.
How does Grempa compare with other parsing libraries/tools, such as
Parsec, Attoparsec and Happy, with regard to ease of use and
performance?
Cheers! =)
--
Felipe.
More information about the Haskell-Cafe
mailing list