From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Lucy Newsgroups: gmane.lisp.guile.devel Subject: GSOC PEG project Date: Mon, 5 Jul 2010 01:05:52 -0500 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 1278309989 18005 80.91.229.12 (5 Jul 2010 06:06:29 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 5 Jul 2010 06:06:29 +0000 (UTC) To: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Mon Jul 05 08:06:27 2010 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OVeoz-0007EE-SF for guile-devel@m.gmane.org; Mon, 05 Jul 2010 08:06:26 +0200 Original-Received: from localhost ([127.0.0.1]:46623 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OVeoz-0000pD-BH for guile-devel@m.gmane.org; Mon, 05 Jul 2010 02:06:25 -0400 Original-Received: from [140.186.70.92] (port=35250 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OVeoo-0000p6-SD for guile-devel@gnu.org; Mon, 05 Jul 2010 02:06:16 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OVeon-0001zN-JM for guile-devel@gnu.org; Mon, 05 Jul 2010 02:06:14 -0400 Original-Received: from mail-vw0-f41.google.com ([209.85.212.41]:62916) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OVeon-0001zF-Fq for guile-devel@gnu.org; Mon, 05 Jul 2010 02:06:13 -0400 Original-Received: by vws1 with SMTP id 1so6240421vws.0 for ; Sun, 04 Jul 2010 23:06:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:sender:received:from:date :x-google-sender-auth:message-id:subject:to:content-type; bh=WdJmZAVuHw0HMrSys8pJz+kzKd/r/Be+R0bXtVp0JA0=; b=ckdIoZHINAm6WLT1zHgl8doUY9gpkQx+xJK+UN9cFgSYpQsmKBqUadXFcIzXKyU/by QaOoCoYQ2Qfes9ErEMwWxX5nMleIObuquD0xg8uZStUV6GkVTuSAhNP6HS8we5gwZN2U NtHWWTMjiwMQeT8BCFBl4XUtakJfNRyW3f4Jw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:from:date:x-google-sender-auth:message-id :subject:to:content-type; b=K+t+CHEiUffQtCUaaAYr4mr5OBQaNbzaXndh1RWqBgj31vzNzUPyBuENG6rGR8AO5G qEc46l+HojHVa3r0sU7qQ6btRXK8S3kHHvXudpt6GSuKF04MDTnqDEHoyiZffUBC/vPh ya3Vzf2oW+M+Ss7olyJOkPOw0qDErl3Y75pyM= Original-Received: by 10.220.161.201 with SMTP id s9mr1202202vcx.277.1278309972155; Sun, 04 Jul 2010 23:06:12 -0700 (PDT) Original-Received: by 10.220.94.70 with HTTP; Sun, 4 Jul 2010 23:05:52 -0700 (PDT) X-Google-Sender-Auth: lCJMpSCpl15Lru0Xthnlmv18JJM X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:10615 Archived-At: Hi, I finally got things into a usable state, so I pushed out what I have to origin/mlucy. Many apologies if I did something wrong; I've never used git with remote repositories before. Files I've added so far: guile/modules/ice-9/peg.scm (I assume this is the right place to put this?) guile/test-suite/tests/peg.test Status of things right now: PEG compiler: Works for all the grammars I've tested, no known bugs. Currently compiles to Scheme code rather than Tree-IL for debugging. Comments: Pretty good I think, but I could stand to have more. External documentation: None so far. Syntactic Sugar: Canonical string-based PEGs can be parsed just fine. Testing: Small test suite. Needs to be standardized with the other .test files. Benchmarks: None so far, but I haven't really done any optimization so I'd bet it performs poorly. Problems: 1. PEG compiler compiles to scheme code rather than TREE-IL, and uses some custom pieces of syntax that I then have to export. I've been meaning to ask, how big a deal is this? I originally had it compile to Scheme while I was debugging things, but the Scheme gets compiled down to TREE-IL form, right? Should I fix it to compile straight to TREE-IL anyway rather than just finding a way to get around having to export all that syntax? 2. Tests aren't standardized (peg.test looks nothing like the other .test files). 3. This: scheme@(guile-user)> (use-modules (ice-9 peg)) ;;; note: source file /home/zededarian/guile/module/ice-9/peg.scm ;;; newer than compiled /home/zededarian/guile/cache/guile/ccache/2.0-0.R-LE-4/home/zededarian/guile/module/ice-9/peg.scm.go ;;; note: autocompilation is enabled, set GUILE_AUTO_COMPILE=0 ;;; or pass the --no-autocompile argument to disable. ;;; compiling /home/zededarian/guile/module/ice-9/peg.scm ;;; WARNING: compilation of /home/zededarian/guile/module/ice-9/peg.scm failed: ;;; key wrong-type-arg, throw args ("vm-debug-engine" "Wrong type to apply: ~S" (#f) (#f)) Somehow it works fine despite the warnings. Can anybody shed light on what this means? 4. External documentation hasn't even been started yet. 5. The pretty-print module doesn't get loaded when peg does, and some of my functions use it. I have: :use-module (ice-9 pretty-print) in my define-module form at the top of peg.scm; shouldn't that take care of it? Any thoughts or comments? I'm sorry I didn't get this into a branch earlier.