[Haskell-cafe] Re: ANNOUNCE: grammar-combinators 0.1 (initial release): A parsing library of context-free grammar combinators

Johannes Waldmann waldmann at imn.htwk-leipzig.de
Wed Sep 8 08:59:09 EDT 2010


> That compilation process is highly nonlocal 
> and would never be possible with, e.g., the Parsec approach. 

Pipe dream: attach such a grammar object to every Parsec parser,
and include the "compiler" with the combinators,
and have them run at (Haskell) compile time (in ghc's specializer).
Should work for some subset (e.g., just let, not letrec, use
proper combinators instead) and with some future ghc version ...

When I teach parsing (in Compiler Construction), for lack of time 
it's either "traditional" (CFG -> PDA) or "combinator" (not both),
and I'm not happy with that, since both are important concepts.
But then, semantics is more important than syntax ...

J.W.




More information about the Haskell-Cafe mailing list