views:

24

answers:

1

I'm using ANTLRWorks, and have specified my java package using the @header action:

@header {package com.xxx.xxx.xxx.compiler}

However, when I generate the java code, it is generated to the root src directory rather than src/com/xxx/xxx/xxx/compiler. Consequently, it does not compile cleanly.

How do I specify the correct directory to generate code to?

A: 

OK, turns out it was a rather stupdid question. Or rather, the answer is pretty obvious once you realize it.

The source is always generated in the same directory as your .g file. so, put the .g file in the correct location of your directory structure for your package.

Mike Cargal