[Top][All Lists]

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

Re: GSOC PEG project

From: Andy Wingo
Subject: Re: GSOC PEG project
Date: Sat, 17 Jul 2010 14:21:51 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)

On Sun 11 Jul 2010 09:48, Michael Lucy <address@hidden> writes:

> On Thu, Jul 8, 2010 at 11:21 AM, Andy Wingo <address@hidden> wrote:
>> Humm, another thing to think about: (ice-9 regex) returns "match
>> structures", which are really just vectors; have a look at them, and if
>> it makes sense to mimic that interface, re-exporting those accessors
>> somehow, please do.
> So, three potential paths from here:
> 1. Mimic the match structure interface as much as possible.
> 2. Have a similar but differently-named "peg-match structure"
> interface that behaves mostly the same but has a few different
> functions (I think naming them something slightly different would lead
> to fewer people assuming they worked exactly the same as match
> structures).
> 3. Just having a different interface.
> I'm leaning toward (2); what do other people think?  I'd probably:
> 1. Not have a peg-match:count function at all.
> 2. Not have the functions take submatch numbers.
> 3. Have peg-match:substring return the actual substring.
> 4. Have another function peg-match:parse-tree that returns the parse
> tree.

Yes, if the needs are different, there's no sense in trying to horn the
present into the past's shoe. Take the good conventions from (ice-9
match), but there is no strict need for compatibility.


reply via email to

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