Chuck
Chuck

Reputation: 1870

Is there an ANTLR4 Ant task?

I haven't been able find an Ant task that works out of the box with ANTLR4. I want to be able to invoke options like -visitor to generate the *Visitor interfaces and classes. I suppose I could 'fake it' using the Java task.

Upvotes: 4

Views: 1373

Answers (1)

Sam Harwell
Sam Harwell

Reputation: 99869

You shouldn't need one. Take a look at the build script I use for the grammars in ANTLRWorks 2.

  • Downloads the correct version of the tool on-demand (so it doesn't have to be included in source control).
  • Only rebuilds grammars if they are out-of-date.
  • Builds grammars in parallel for improved build times.

https://github.com/sharwell/antlrworks2/blob/master/org-antlr-works-editor/build.xml

Upvotes: 3

Related Questions