Fork John Leuner's metapeg
Switch branches/tags
Nothing to show
Pull request Compare This branch is even with bhyde:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
README
abc.peg
libmetapeg.lisp
metapeg.asd
metapeg.lisp
metapeg.peg
package.lisp

README

This is a PEG or packrat parser forked from the Common Lisp one written by John Leuner; see <http://www.cliki.net/metapeg>.

To use the parser generator first load the library code:

CL-USER> (load "libmetapeg.lisp")

then call parse with your PEG grammar as the first argument:

CL-USER> (parse "mypeg.peg" "metapeg.lisp")

the lisp code for the resulting parser will be returned.

You can save this code to a file:

CL-USER> (write-parser-to-file (parse "mypeg.peg" "metapeg.lisp") "mypeg.lisp")

To use your parser, call the parse function again:

CL-USER> (parse "input-file" "mypeg.lisp")