Consider using FnParse (http://github.com/joshua-choi/fnparse/tree/
develop). It's a pure Clojure parser combiner that is flexible in what
tokens it accepts. You can use it to parse the symbol/list/etc.
structures given to your macros into other forms.

FnParse 3, the latest version, is currently a little unstable and
poorly documented. But it makes very good error messages, and I'm
willing to personally help you if you run into any problems if you
contact me via GitHub or whatever. FnParse 3 is in the develop I
suggest looking at 
http://github.com/joshua-choi/fnparse/blob/develop/src/edu/arizona/fnparse/json.clj
for a good example.

On Jul 8, 11:52 am, Nicolas Oury <nicolas.o...@gmail.com> wrote:
> Dear all,
>
> I am trying to write a small Domain Specific Language using macro, and I
> want the syntax of the args of the macro to be somehow "parsed" and
> transformed.
>
> So, I have two questions:
>
> - Does anybody else does that? (except the infix calculus) Is there a
> generic method for doing it? Or even better a library?
> - I want to report syntax error from my macro expansion. Is there a way to
> get the line (or even better the line/file and character) of the usage of a
> macro being expanded?
> That way I could have helpful error message....
>
> Best regards,
>
> Nicolas.

-- 
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