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

2010-09-08 Thread Dominique Devriese
Johannes, 2010/9/8 Johannes Waldmann : > >> 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 (Ha

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

2010-09-08 Thread Dominique Devriese
Johannes, (sorry for the double mail) I will give some short answers below, but you can find more details in the paper we are submitting to PADL 2011 [1]. 2010/9/8 Johannes Waldmann : >> .. grammar-combinator library's approach .. > am I reading this correctly: in the traditional combinator appr

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

2010-09-08 Thread Johannes Waldmann
> 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). Shou

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

2010-09-08 Thread James Andrew Cook
On Sep 8, 2010, at 7:49 AM, Johannes Waldmann wrote: > then you'll get more static guarantees (e.g., context-freeness) > but you need extra (type-level, or even syntax-level) machinery > to handle grammars. Convince me that it's worth it ... Those guarantees, along with just the fact that the par

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

2010-09-08 Thread Johannes Waldmann
> .. grammar-combinator library's approach .. am I reading this correctly: in the traditional combinator approach, a grammer (a parser) is a Haskell value, while in your approach, the grammar is a Haskell (GAD)type? then you'll get more static guarantees (e.g., context-freeness) but you need ext

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

2010-09-08 Thread Dominique Devriese
Some snippets from the Tutorial [1] to give an idea of the grammar-combinator library's approach, its functional style and its additional power (e.g. the transformations used): Defining a simple expresssions grammar: grammarArith :: ExtendedContextFreeGrammar ArithDomain Char grammarArith Line

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

2010-09-08 Thread Dominique Devriese
The grammar-combinators library is a parsing library employing a novel grammar representation with explicit recursion. The library features much of the power of a parser generator like Happy or ANTLR, but with the library approach and most of the benefits of a parser combinator library. Grammars

Re: Parsing library

2004-01-02 Thread Derek Elkins
On Thu, 1 Jan 2004 23:19:26 + (GMT) James Ealing <[EMAIL PROTECTED]> wrote: > I'm trying to make use of the combinatorial parsing > library to process strings. However, I can't figure > out the correct syntax for the (|||) (^^^) (>>>) (<^^) > and (^^&

Parsing library

2004-01-01 Thread James Ealing
I'm trying to make use of the combinatorial parsing library to process strings. However, I can't figure out the correct syntax for the (|||) (^^^) (>>>) (<^^) and (^^>) functions. Can anyone see how to do it? If so it'd be really useful if you could put down a cou