This is the XML generating output plugin for the SableCC3 parser generator (http://www.sablecc.org/). This system builds on a patch for the SableCC3. See http://www.mare.ee/indrek/sablecc/ for more information. Installation ~~~~~~~~~~~~~ A precompiled jar file is provided in this archive so you probably won't have to do any compilation. To recompile you must set the classpath to SableCC's jar file. $ CLASSPATH=/usr/local/sablecc/lib/sablecc.jar ant -projecthelp Buildfile: build.xml Main targets: all Build the jar clean Clean up compile Compile the class files needed for xml4sablecc.jar dist Create a tar archive of the whole distribution jar Generate the xml4sablecc jar file Default target: all You'll have a xml4sablecc.jar. Usage ~~~~~~ To use the XML generator run sablecc with classpath containing the xml4sablecc.jar and argument -g ee.mare.indrek.sablecc.xml.XMLGenerator The parser will be generated in a file named parser.xml Currently the sablecc also generates the java output as a side effect. You can delete it. $ export CLASSPATH=xml4sablecc.jar:$CLASSPATH $ sablecc -g ee.mare.indrek.sablecc.xml.XMLGenerator grammar.sablecc3 For convenience you might want to add that jar into your sablecc script. Warning: if your sablecc script uses java -jar syntax it won't work. It must explicitly run org.sablecc.sablecc.SableCC What next? ~~~~~~~~~~~ See the sabelccgen package for applications of the generated xml. Java, C# and C++ outputs are included. http://www.mare.ee/indrek/sablecc/ I've also written couple of examples on how to parse XML in various popular scripting languages. See under examples/ for XSL, perl and python.