From: Andy Wingo <wingo@pobox.com>
To: Noah Lavine <noah.b.lavine@gmail.com>
Cc: guile-devel <guile-devel@gnu.org>
Subject: Re: Names for PEG Functions
Date: Wed, 21 Sep 2011 22:45:04 +0200 [thread overview]
Message-ID: <87mxdxfwvj.fsf@pobox.com> (raw)
In-Reply-To: <CA+U71=NuYVJzV8QtYKPaVnvwKH8o8CitB64eKwct0B8JOwXRHg@mail.gmail.com> (Noah Lavine's message of "Wed, 21 Sep 2011 16:13:32 -0400")
Hi,
On Wed 21 Sep 2011 22:13, Noah Lavine <noah.b.lavine@gmail.com> writes:
> define-peg-sexp - define a nonterminal from an s-expression
> define-peg-string - define a set of nonterminals from a string
To me this sounds like you are defining an sexp or a string, which
doesn't make much sense. I don't think that we need to preserve
symmetry here, because the first binds one identifier, whereas the
second binds a number of identifiers. (Is that really necessary? It
would be nicer if it just bound one identifier, or something. Dunno.)
Also, are the different `accum' things necessary? Just wondering.
Unused bindings will probably be removed by the optimizer.
> compile-peg-sexp - compile an sexp to a nonterminal (an opaque value
> to the user, but really just a function)
compile-peg-pattern perhaps ?
> compile-peg-string - compile a string to a nonterminal
compile-peg-string-pattern ?
> match-peg - match a peg to a string, starting at the beginning
match-pattern ?
> search-peg - match a peg to a string, starting at each index in turn
> until we find a match or reach the end
search-for-match ?
> I realize that putting 'peg' in the names isn't really necessary
> because the user could use a module renamer, as Ludovic pointed out a
> few days ago. I put 'peg' in the define-* syntax because I thought
> 'define-sexp' and 'define-string' were too general as names, and then
> I wanted the compile-* functions to be consistent with them. As for
> the others, 'match' and 'search' seemed too general.
Yeah, dunno. What do you think about these names? Please don't take
these suggestions too seriously.
> Looking forward to merging this,
Yeah!
Andy
--
http://wingolog.org/
next prev parent reply other threads:[~2011-09-21 20:45 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-21 20:13 Names for PEG Functions Noah Lavine
2011-09-21 20:45 ` Andy Wingo [this message]
2011-09-22 17:56 ` Noah Lavine
2011-10-04 0:21 ` Noah Lavine
2012-01-04 18:12 ` Andy Wingo
2012-01-19 9:53 ` Andy Wingo
2012-01-19 13:54 ` Noah Lavine
2012-01-20 3:18 ` Noah Lavine
2012-01-22 20:15 ` Noah Lavine
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=87mxdxfwvj.fsf@pobox.com \
--to=wingo@pobox.com \
--cc=guile-devel@gnu.org \
--cc=noah.b.lavine@gmail.com \
/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).