antlr4 plugin released


(Mark Fisher) #1

I’ve pushed a project to https://github.com/fraoch/antlr4-plugin which is my first attempt to write a gradle plugin for antlr4.

It allows configuration of the antlr4 tool class, compiles grammars, and allows fairly simple running of them. An example project is included.

Any feedback would be appreciated if people are interested. I do have a problem tying in the compile configuration into the antlr4 configuration, so there’s a bit of duplication of dependency declaration.

I wrote it as an exercise in plugin creation. It’s shockingly devoid of tests at the moment, but only because when I wrote this some months ago, i couldn’t find a simple way of testing plugins. Subsequently I’ve been using spock for some of the work plugins i’ve written, but am still on the lookout for easier plugin testing from within gradle except.

Anyway, feedback appreciated.


(Lance Java) #2

FYI the tapestry build calls out to antlr, you might find this useful https://git-wip-us.apache.org/repos/asf?p=tapestry-5.git;a=blob;f=tapestry-core/build.gradle