Running JastAdd from the command line
Synopsis
java -jar jastadd2.jar options arguments
Options
--help (prints help text and stops) --version (prints version information and stops) --package=PPP (optional package for generated files, default is none) --o=DDD (optional base output directory, default is current directory) --beaver (use beaver base node) --jjtree (use jjtree base node, this requires --grammar to be set) --grammar=GGG (the parser for the grammar is called GGG, required when using jjtree) --rewrite (enable ReRAGs support) --novisitcheck (disable circularity check for attributes) --noCacheCycle (disable cache cyle optimization for circular attributes) --java1.4 (generate Java 1.4 source code, rather than Java 5)
Arguments
Names of .ast, .jrag and .jadd source filesExample
The following command generates classes according to the AST description in Toy.ast. The generated classes are placed in the package ast. The specifications in the jrag and jadd files are translated and woven into the generated classes.java -jar jastadd2.jar --package=ast Toy.ast \ NameAnalysis.jrag TypeAnalysis.jrag PrettyPrinter.jadd
ANT task
The options above are also available in an ANT task. For generating Java 1.4 source code, write "java14=true" (without the decimal point). For the other options, use the same names as above.