[Top][All Lists]

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

GSOC PEG project

From: Michael Lucy
Subject: GSOC PEG project
Date: Mon, 5 Jul 2010 01:05:52 -0500


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?)

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.


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
;;; 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.

reply via email to

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