From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Noah Lavine Newsgroups: gmane.lisp.guile.devel Subject: Names for PEG Functions Date: Wed, 21 Sep 2011 16:13:32 -0400 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: dough.gmane.org 1316636022 8106 80.91.229.12 (21 Sep 2011 20:13:42 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 21 Sep 2011 20:13:42 +0000 (UTC) To: guile-devel Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Wed Sep 21 22:13:38 2011 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1R6TAo-0002Ua-31 for guile-devel@m.gmane.org; Wed, 21 Sep 2011 22:13:38 +0200 Original-Received: from localhost ([::1]:34624 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R6TAn-0005gW-Fv for guile-devel@m.gmane.org; Wed, 21 Sep 2011 16:13:37 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:33349) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R6TAk-0005gL-7e for guile-devel@gnu.org; Wed, 21 Sep 2011 16:13:35 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R6TAj-0006f1-1J for guile-devel@gnu.org; Wed, 21 Sep 2011 16:13:34 -0400 Original-Received: from mail-yw0-f41.google.com ([209.85.213.41]:37150) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R6TAi-0006et-Oc for guile-devel@gnu.org; Wed, 21 Sep 2011 16:13:32 -0400 Original-Received: by ywe9 with SMTP id 9so1762251ywe.0 for ; Wed, 21 Sep 2011 13:13:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:content-type; bh=HOzR4jtG/bGQ8jht72S3QAxyHqK4yid6jqRRtIWfdiY=; b=dL7ryE3o+lUMHPkL6xQ7VRcyloaUnDDSV0h4hjbf+uIZoIt8v/tcX2bzRUO8P6R599 ql2ftStvhcR8xOFxpZMZXVgKSzg5HJWw7bhKlTiNzufNOXcrD66xxooWOZcHZpFRu6vu 5kOzgQo5Ia07Cg8g+LJhkhvtKMAOchq//aQjg= Original-Received: by 10.42.150.196 with SMTP id b4mr578455icw.153.1316636012042; Wed, 21 Sep 2011 13:13:32 -0700 (PDT) Original-Received: by 10.42.174.66 with HTTP; Wed, 21 Sep 2011 13:13:32 -0700 (PDT) X-Google-Sender-Auth: 9vaJZglR4pP_fbcPbFn4bLaWsQM X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.213.41 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:12788 Archived-At: Hello all, As the PEG module nears some reasonable level of completion, we should figure out what all of the functions need to be named so everyone can reasonably understand them. At first I thought the names should be consistent wtih the LALR and regexp modules, so all of the parsing modules would agree. But after looking at those two, I realized that they aren't consistent with each other, so it would be very difficult to make PEG match them. At least, however, PEG can be consistent with itself. Therefore I suggest the following names and meanings: define-peg-sexp - define a nonterminal from an s-expression define-peg-string - define a set of nonterminals from a string compile-peg-sexp - compile an sexp to a nonterminal (an opaque value to the user, but really just a function) compile-peg-string - compile a string to a nonterminal match-peg - match a peg to a string, starting at the beginning search-peg - match a peg to a string, starting at each index in turn until we find a match or reach the end 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. The verb comes first in all of these because I think putting 'define' in the beginning of syntax that defines things is standard, and then I made the other names to match that one. If anyone has better ideas, though, I'm not attached to these names. Looking forward to merging this, Noah