homeresumeabout
clj-peg

Description
This project adds support in Clojure for Parsing Expression Grammars. In addition to the basic operators I've added tracking AST branches, referring to tracked branches, gathering simple repetitions, and specifying a repetition count. While the current version allows for expanding the types of supported input to anything you'd like, future releases will include an input wrapper to process binary structures.
Claim to fame
This...
Expr      <- [Sum $]
Sum       <- [Product (* [SumOp Product])]
Product   <- [Value (* [ProductOp Value])]
Value     <- (| Num Sum)
Num       <- JSONNumber ; Referencing a Non-Terminal from a JSON PEG
SumOp     <- #"^[+-]"
ProductOp <- #"^[*/]"

... turns into a parser with only a few extra lines of code (three more small lines would be comfortable). The grammar reads quite easily as well. The production for the non-terminal Sum could be read:
A Product followed by zero-or-more of the SumOp Product pair

Use
The User Manual will bring you up to speed quicklyit's a light three pages including code samples.
License
This project has been released under the EPL 1.0 license.
Downloads
version yy.mm file
0.7.0 10.02 clj-peg.jar
clj-peg.zip
clj-peg-extra.jar
clj-peg-manual.pdf
README.txt
epl-v10.html