Clojure mode

General Discussion on RSyntaxTextArea.

Moderator: robert

Clojure mode

Postby DavidR » Fri Jan 23, 2009 7:05 pm

First of all, congrats on a good work. RSyntaxTextArea is quite a useful tool. Nicely coded, too.

It lacks however, one little detail I'd like to have very much: Clojure mode. I don't know how many of you are familiar with Clojure (http://www.clojure.org , http://groups.google.com/group/clojure), but I bet many of you will be in, say, near future. ;-)

I'm not just asking for it. I'm prepared to help code it. But... looking at, say, JavaTokenMaker.java/flex, I don't know where to start. I can't seem to find any documentation and/or guidelines. So... anybody?

D.
DavidR
 

Re: Clojure mode

Postby robert » Mon Jan 26, 2009 5:39 pm

Hi David,

Thanks for the kind words!

If you'd like to write a scanner for Clojure, probably your best bet is to email me directly (robert -at- fifesoft dot com). I can help get you started since there's no "official" documentation on how to do this yet. RSTA doesn't use normal JFlex scanners as it scans 1 line at a time, so it takes a tad more work than when normally working with JFlex (but nothing too bad).

I've considered writing a GUI program that provided a simple interface for creating TokenMaker classes, allowing for standard options (keywords, line/multiline comments, strings, etc.), but haven't had any time to really work on it. I'm also a little wary of not making it flexible enough for languages with more unique syntaxes. On the other hand, having something would be better than nothing, right? And it could always be improved in the future if needed...
User avatar
robert
 
Posts: 801
Joined: Sat May 10, 2008 5:16 pm

Re: Clojure mode

Postby sumit » Tue Jun 09, 2009 2:54 pm

Hi,

I have used RSyntaxTextArea for the ScriptEditor project for Fiji for Google Summer of Code 2009 and it was a nice experience , especially the code is written in an awesome manner, I really enjoyed reading the code and implementing it.It catered to my needs for Syntax highlighting of Java,Javascript,Ruby and Python . Now I also plan to create a ClojureTokenMaker like other TokenMaker's in RSyntaxTextArea as it does not support Clojure so far. robert and david , did you people proceed forward with the creation of ClojureTokenMaker .It looks like generating it will be somewhat different from normal usage of JFlex. I look forward to your help. I am working in a fixed timeline and some guidance will really help me proceed with my project .

regards,

sumit
sumit
 

Re: Clojure mode

Postby robert » Tue Jun 09, 2009 6:57 pm

Hi Sumit,

I don't think I ever heard back from David, so I'm not sure if he ever got a ClosureTokenMaker working or not. I'd be happy to help you along with it if you like. You're right that adding support for a new language isn't easy because of the way RSTA scanners use JFlex in a non-standard way. I will send you some details by email to help you get started.

In the mean time, the Javadoc for each TokenMaker class has some boilerplate that explains all of the modifications to the JFlex output that are made. Looking at that would be a good idea, and I can help fill in any details. For example, check out CPlusPlusTokenMaker.
User avatar
robert
 
Posts: 801
Joined: Sat May 10, 2008 5:16 pm

Re: Clojure mode

Postby sumit » Wed Jun 10, 2009 3:46 am

Hi Robert ,

Thanks for showing interest in the post. You can send me a mail at sumitdubey54@gmail.com or sumitd@iitk.ac.in. I have already sent you a mail in this regard ,so you can reply to that.

regards,

sumit
sumit
 


Return to Open Discussion

Who is online

Users browsing this forum: No registered users and 4 guests

cron