I've posted a first rough cut of an edn parser written in plain Java
here: https://github.com/bpsm/edn-java
The parser itself is Wirthian, which is to say it's a hand-written
LL(2) scanner coupled with a hand-written LL(1) recursive decent
parser. This is easy enough to do for edn's uncomplicated grammar.
The parser can be configured with custom tag handlers. Handlers from
#uuid and #inst are provided. (The handler for #inst, however, is the
kind of code no one can love and has no unit tests.) There are hooks
available to control which collections are created by [], (), #{} and
{}.
The design, package structure, naming, public interfaces -- everything
-- is still subject to change. There are probably some bugs.
Clarification of some of the open issues on
https://github.com/edn-format/edn may bring tweaks to the parser.
Javadocs are currently MIA. I'll wait with that until I'm more
confident that I've found a design I like.
Feedback welcome. Tell me what sucks about it so that I can make it better.
// Ben
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en