Example of using ANTLR from Clojure?

137 views
Skip to first unread message

Paul Henning

unread,
Sep 3, 2009, 2:15:54 PM9/3/09
to Clojure
Does anyone have an example of how to call ANTLR from Clojure? I
imagine that it is not that difficult using the Java interop features,
but my Java skills are pathetic.

Thanks,
Paul

Mike Hinchey

unread,
Sep 5, 2009, 2:02:29 AM9/5/09
to clo...@googlegroups.com
I don't know anything about it, but counterclockwise uses antlr.
http://groups.google.com/group/clojuredev-devel/browse_thread/thread/1428233ef12b6231

-Mike

Laurent PETIT

unread,
Sep 6, 2009, 8:22:09 AM9/6/09
to clo...@googlegroups.com


2009/9/5 Mike Hinchey <hinc...@gmail.com>

I don't know anything about it, but counterclockwise uses antlr.
http://groups.google.com/group/clojuredev-devel/browse_thread/thread/1428233ef12b6231


That's true. To be more precise, we have a clojure lexer which is extensively used in Counterclockwise clojure source editor for syntax coloration. There is also the lexer part but it was developed a long time ago (so may not be still accurate), and is not used yet (so maybe the way the AST is constructed is nood in the good shape for most purpose).

But to come back to your concern of using antlr from clojure : no, Counterclockwise is not yet written in clojure (just the client/server part for communicating with running projects instances) and so you wil not be able to find examples for that, sorry :-(

--
Laurent

psf

unread,
Sep 8, 2009, 6:47:07 PM9/8/09
to Clojure
Thanks for the information. Once I bit the bullet and learned a bit
of Java, it was actually pretty easy to call ANTLR from clojure, after
getting all the package naming figured out.

Paul

On Sep 6, 6:22 am, Laurent PETIT <laurent.pe...@gmail.com> wrote:
> 2009/9/5 Mike Hinchey <hinche...@gmail.com>
>
> > I don't know anything about it, but counterclockwise uses antlr.
>
> >http://groups.google.com/group/clojuredev-devel/browse_thread/thread/...

Kranthi Rajoli

unread,
Apr 26, 2014, 6:04:50 AM4/26/14
to clo...@googlegroups.com
Hi Paul,
  Do you mind outlining the method you used? I am exactly looking for the same. My Java skills are pathetic too.

Thanks,
Kras

Armando Blancas

unread,
Apr 26, 2014, 11:47:19 AM4/26/14
to clo...@googlegroups.com
I haven't touched this project in a while, but it might be useful.
This file has the relevant interop code:
src/main/clojure/blancas/tinypost/scan.clj

kranthi rajoli

unread,
Apr 30, 2014, 12:35:11 PM4/30/14
to clo...@googlegroups.com
Thank you very much. This definitely helps.

-Kranthi


--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@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+u...@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 a topic in the Google Groups "Clojure" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/clojure/vdUGQRwDYWo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to clojure+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Kranthi Rajoli
Reply all
Reply to author
Forward
0 new messages