Posts Tagged ‘JavaCC’
Open Source Drop: GitHub as a Maven Repo for Gradle, a JSON parser library and client, and JavaCC Plugin for Gradle April 23, 2012 | 03:19 pm

This is an announcement of a bunch of open source code that I’ve just released.

Using GitHub as a Maven Repository for Gradle

If you’re using Gradle for your JVM builds (and you should be) and GitHub for your open source project infrastructure (and you should be), then you might be pleasantly surprised to know that you can use GitHub as a Maven repository, which means that your library can be deployed to and served from GitHub’s own cloud infrastructure.

Your clients add this line to their Gradle build scripts:

apply from:""

And at that point, they can draw from anything deployed on GitHub. Good times!

For more information (including the five lines of code necessary for you to deploy to GitHub), see the README for the RobertFischer/gradle-github-dev project.

JSON Parser Library

A long while back, I was pissed off at the available JSON parsing libraries, so I wrote my own JavaCC-drived JSON parser library. It supports a fair bit of the broken JSON that is out in the wild, and is screaming fast. For more information, see the README for the RobertFischer/json-parser project.

JSON Client for the JVM: Resty

I’ve been playing around with a bunch of different JSON clients for interacting with a REST service (GitHub’s API v3) on the JVM, and I didn’t really like any of them. All of them felt WAAAAAAAAAAAY too Java-y, and I was looking for something much simpler. RESTClient for Groovy was nice, but I had trouble debugging the errors going to and from the server. After much searching, the best I found was beders’s Resty library, but it had a problem in that it couldn’t parse JSON arrays at the top level. So I forked it.

You can check out my version of Resty, which uses my more fault-tolerant and faster JavaCC JSON parser (see above) and can parse top-level arrays. There’s also substantially improved error handling, and it’s now built using Gradle instead of Maven because XML’s pointy brackets make my eyes bleed.

JavaCC/JJTree Compiler Plugin for Gradle

Finally, I’ve updated my JavaCC/JJTree compiler plugin for Gradle. This also involved updating the compiler-base plugin. Both were overdue for an update to support Gradle 1.0, and updating them was really a joy, since it meant ripping out a lot of bad code and replacing it with newfangled Gradle API calls.

Newly Minted: JavaCC/JJTree Plugin for Gradle May 11, 2011 | 07:57 pm

I used to have a hackish JavaCC plugin under my Gradle-Plugins project, but I have ported it over to the Compiler plugins infrastructure that I announced before, and also added JJTree as part of the mix. This new approach solves a myriad of annoying edge cases in the old JavaCC plugin. The biggest benefit of the new version is that the process now integrates seamlessly into the normal Java compile, so you don’t have to split up your Java code into multiple different places. The second biggest benefit is that you can have more than one JavaCC per project (you now get one per source set, like in all the other languages).

Relevant pages with hopefully obvious URLs:

This is probably it for compilers for the moment. Left to my own devices, I’ll be releasing compilers for Ashlar (my own language) and BiteScript next, but they’re going to be a while into the future. An update to the Mirah one will be forthcoming when Mirah hits a slightly more stable point.

JavaCC Plugin for Gradle September 21, 2010 | 02:19 pm

Quick announcement: I added a JavaCC plugin (which also supports JJTree) to Gradle Plugins. This is the 0.6.2 release.