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
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
> 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
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
> .. 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
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
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
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 (^^&
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