And does anyone has tried to use parser combinators on the result of the
reader, within a macro?
On Fri, Jul 9, 2010 at 11:23 AM, Jeff Rose wrote:
> Like some people mentioned, you can use a parsing library, but often
> times I don't think that's necessary if you are just creating a DSL.
> There
Like some people mentioned, you can use a parsing library, but often
times I don't think that's necessary if you are just creating a DSL.
There are a couple of other strategies.
One is you can use a series of nested macros that expand into a data
structure. In this way your DSL will sort of auto-
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
On Thu, Jul 8, 2010 at 1:34 PM, Nicolas Oury wrote:
> Sorry, that's why I had quote around my parse.
> I meant, use clojure reader to take a sequence in a macro and then "parse"
> it for my own DSL.
> So I shouldn't need any help from the reader (even if having some metas with
> line and character
On Jul 8, 2010, at 2:34 PM, Nicolas Oury wrote:
> Sorry, that's why I had quote around my parse.
>
> I meant, use clojure reader to take a sequence in a macro and then "parse" it
> for my own DSL.
> So I shouldn't need any help from the reader (even if having some metas with
> line and characte
Sorry, that's why I had quote around my parse.
I meant, use clojure reader to take a sequence in a macro and then "parse"
it for my own DSL.
So I shouldn't need any help from the reader (even if having some metas with
line and character attached to thing would help)
I do not want to go the parser
On Jul 8, 2010, at 1:52 PM, Nicolas Oury wrote:
> 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 calcul