[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GSOC PEG project

From: Ludovic Courtès
Subject: Re: GSOC PEG project
Date: Tue, 06 Jul 2010 23:37:03 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)


No Itisnt <address@hidden> writes:

> On Mon, Jul 5, 2010 at 6:59 PM, Michael Lucy <address@hidden> wrote:
>> On Mon, Jul 5, 2010 at 5:40 PM, Ludovic Courtès <address@hidden> wrote:
>>> Michael Lucy <address@hidden> writes:
>>>> Files I've added so far:
>>>> guile/modules/ice-9/peg.scm (I assume this is the right place to put this?)
>>> No, it should rather go under ‘module/language/peg.scm’, for the sake of
>>> consistency with other compiler front-ends.  But see below.
>> I'm not quite sure how this qualifies as a compiler front-end.  The
>> functionality is mostly done (if unoptimized), so it shouldn't be too
>> hard to turn it into one if that's what you want, but the original
>> thought was just to build a compiling parser.  E.g.:
>> (use-modules (ice-9 peg))
>> (peg-find "'b'+" "aabbcc")
>> --> (2 4 "bb")


>>>> PEG compiler: Works for all the grammars I've tested, no known bugs.
>>>> Currently compiles to Scheme code rather than Tree-IL for debugging.
>>> It should rather compiler to tree-IL, like other front-ends, which is
>>> very close to Scheme anyway.
> I think you are both misunderstanding eachother:
> - The PEG functions, useful in their own right, would be exposed as (ice-9 
> peg).
> - There is an additional syntax for expressing grammars, so it can be
> better used as a parser generator. That would go in as (language peg).

OK, I understand now.  Sorry for the confusion!


reply via email to

[Prev in Thread] Current Thread [Next in Thread]