[antlr-interest] Porting a runtime to Ada

Benjamin Niemann pink at odahoda.de
Wed May 23 01:10:13 PDT 2007


Luke A. Guest wrote:

> On Tue, 2007-05-22 at 13:08 +0200, Benjamin Niemann wrote:
> 
>> * I recommend building the ANTLR tool 'in place'. Do not create a jar or
>> compile/copy to a build directory. When you run it with 'java -cp
>> path-to-src-dir ...' it will use the original *.stg file, which you'll
>> edit a lot - so rebuilding the tool would be quite a PITA.
> 
> Hmm, I'm not all that up on Java - I have programmed in it a bit, so
> maybe you could explain how to do this?

cd src/
javac -d . org/antlr/Tool.java org/antlr/*/*.java org/antlr/*/*/*.java

This was before the Java runtime stuff has been moved to a seperate dir. I
haven't updated my Makefiles yet - you'll probably have to complile the
runtime first.

Then you'll find the .class files in the same directories as the .java
files. If you add the path to src/ to the classpath when invoking
org.antlr.Tool, Java will use these files and ANTLR looks for the templates
in src/org/antlr/codegen/templates/.. - where you can edit them directly.

-- 
Benjamin Niemann
Email: pink at odahoda dot de
WWW: http://pink.odahoda.de/



More information about the antlr-interest mailing list