From: Noah Lavine <noah.b.lavine@gmail.com>
To: guile-devel@gnu.org
Subject: Re: More PEG
Date: Mon, 19 Sep 2011 10:46:33 -0400 [thread overview]
Message-ID: <CA+U71=NN4m2nvT6L+S=u=MW4ztDDS8SFrCM5kQTj8g6bSjw6EQ@mail.gmail.com> (raw)
In-Reply-To: <CA+U71=O2CoQfNa=YZGSA2kULk19J4MKCx-jB=83JJJTDtgxUsA@mail.gmail.com>
As promised, the 'wip-peg-fixed' branch now has an updated
S-expression representation for PEG grammars, and updated
documentation for it.
As I understand it, the next thing to do before merging (and possibly
the last thing!) is to think about what things should be named, so
they can be easy for people to learn and forwards-compatible with
whatever our future plans for parsing are. I will try to send an email
soon with some thoughts on that.
Noah
On Sat, Sep 17, 2011 at 9:09 PM, Noah Lavine <noah.b.lavine@gmail.com> wrote:
> Hello,
>
>> Can you give an example of what ‘peg-parse’ and ‘peg:tree’ return?
>
> 'peg-parse' returns a match record, which contains the string that was
> parsed, the substring that actually matched, and the tree structure
> produced by the matching. 'peg:tree' gets the tree structure out of a
> match record.
>
> I hadn't really looked at this part of the module, but it looks to me
> now like the names aren't descriptive enough. Maybe we should change
> them before putting this in a release.
>
> Noah
>
> On Sat, Sep 10, 2011 at 5:35 PM, Ludovic Courtès <ludo@gnu.org> wrote:
>> Hi!
>>
>> Noah Lavine <noah.b.lavine@gmail.com> skribis:
>>
>>> Right now I think you could get the same thing by running match on the
>>> output of the peg - something like
>>>
>>> (match (peg:tree (peg-parse <pattern> <tree>))
>>> ((list-of-as) ...)).
>>
>> Can you give an example of what ‘peg-parse’ and ‘peg:tree’ return?
>>
>> Ludo’.
>>
>> PS: I would suggest removing the ‘peg-’ and ‘peg:’ prefixes. Users can
>> still use a renamer if the names clash.
>>
>>
>>
>
prev parent reply other threads:[~2011-09-19 14:46 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-09 2:38 More PEG Noah Lavine
2011-09-09 20:51 ` Ludovic Courtès
2011-09-09 21:05 ` Noah Lavine
2011-09-10 21:35 ` Ludovic Courtès
2011-09-18 1:09 ` Noah Lavine
2011-09-19 14:46 ` Noah Lavine [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CA+U71=NN4m2nvT6L+S=u=MW4ztDDS8SFrCM5kQTj8g6bSjw6EQ@mail.gmail.com' \
--to=noah.b.lavine@gmail.com \
--cc=guile-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).