[antlr-interest] org.antlr.Tool outputs to wrong directory on Windows in antlr-3.1.3

Martin Probst mail at martin-probst.com
Fri Apr 3 01:16:45 PDT 2009


Hi,

this may sound weird, but we're running into a problem with our build
system since we upgraded from antlr-3.1.2 to antlr-3.1.3, and it only
happens on Windows (so we only have 30% unhappy developers now, but
still ;-)).

What happens is that if you run (and this is what our build effectively does):
mkdir –p ../../tmp/com/xhive/xquery/parser
java -classpath ../../lib/misc/antlr-3.1.3.jar org.antlr.Tool -o
../../tmp/ com/xhive/xquery/parser/XQueryParser.g -lib
../../tmp/com/xhive/xquery/parser
com/xhive/xquery/parser/XQueryTreeParser.g

This will on Mac OS X and on Linux boxes create XQueryParser.java in
../../tmp/com/xhive/xquery/parser, and this is what we expect.

Running this with antlr-3.1.3 on Windows will create XQueryParser.java
in ../../tmp, without the package paths. I'm pretty sure that this is
a regression from antlr-3.1.2 where it didn't happen.

Now we can fix this by specifying the full path as the output
directory ("-o ../../tmp/com/xhive/xquery/parser"), but that seems
unelegant, and also I'd like to know what the expected behaviour
should be.

Thanks,
Martin


More information about the antlr-interest mailing list