All,

This project adds support in Clojure for Parsing Expression Grammars.
You'll be able to write pseudo-ebnfs directly in your Clojure code.

Currently, this...
 Expr      <- [Sum $]
 Sum       <- [Product (* [SumOp Product])]
 Product   <- [Value (* [ProductOp Value])]
 Value     <- (| Num Sum)
 Num       <- JSONNumber
 SumOp     <- #"^[+-]"
 ProductOp <- #"^[*/]"
... turns into a parser with only a few extra lines of code (three more
lines would be comfortable).

The grammar reads quite easily as well. The production for the non-terminal
Sum could be read, "A Sum is a Product followed by zero-or-more of the SumOp
Product pair."

Project page: http://www.lithinos.com/clj-peg/index.html
Manual: http://www.lithinos.com/clj-peg/0.6.10/clj-peg-manual.pdf

-Rich

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to