On Tue, Apr 9, 2013 at 2:41 AM, Mark Engelberg <mark.engelb...@gmail.com>wrote:

> What do you think would be gained by making it a macro?  From my
> perspective, a macro is essentially just a string that is being processed
> by the Clojure reader (and thus subject to its constraints).  If the
> grammar were expressed in the way you propose, is it any easier to build up
> a grammar programmatically?  Is it any easier to compose grammars?  If
> anything, I think it might be harder.
>
>
I should also point out, for anyone who hasn't had a chance to read through
the tutorial, that instaparse does include a combinator interface that lets
you build the parsers entirely through functions.   The way I look at it is
that if you're going for human writing and readability, it's hard to beat
strings (or reading from a resource file), and if you're going for a
grammar that will be generated by a program, it's hard to beat functions.
So both are included.  But targeting some sort of functional-ish looking
thing that doesn't look quite right and doesn't compose effectively -- that
doesn't seem to serve either purpose well.

-- 
-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to