Skip to content
Snippets Groups Projects
user avatar
Anders Nilsson authored
Managed to combine both xlim and xdf parsers so we can build programs that use both at the same time.
0497c0a9
History
ABOUT
The main purpose of the Schemacompiler is to automatically generate
compiler front-ends for different XML dialects. Given an XML schema,
the schemacompiler will generate an abstract grammar and some aspect
code for JastAdd, as well as a JavaCC parser description. The
generated compiler may then be extended with more aspects, and
possibly new abstract grammar rules, to form a complete compiler.


USAGE
$ java GenCompiler [-d dir] [-o outfile] schema

options:
        -d dir          directory where generated files are put. 
                        Will be created if not already exists.
                        Default is 'examples/x3d'.
                        
        -o outfile      Name for generated grammar files.
                        Default is 'x3d'.


EXAMPLE

$ ant
$ java GenCompiler examples/x3d-3.0.xsd 
$ cd examples/x3d/
$ ant

Will generate a compiler for x3d in the x3d subdirectory. This
generated front-end together with some cupplied code is then built to
form a compiler for x3d models.

NOTE! The supplied code in OBB.java and BoundingBox.jrag depends on
the jme package from http://www.jmonkeyengine.com/

There are two main programs supplied:
$ java PrettyPrint ../workpiece.x3d 
will just print out an x3d representation.
$ java -cp ../../tools/jme.jar OBB ../workpiece.x3d 
will compute bounding boxes (both AABB and OBB) and print out the 
characteristics.

AUTHOR
Anders Nilsson <anders.nilsson@cs.lth.se>