SmallPascal version 1.0 Copyright (c) Fidel Viegas (viegasfh@hotmail.com) The distribution file comes with 6 files: Readme - this document LICENSE - the license agreement build.xml - ANT building script grammar\SmallPascal.grammar - the SableCC specification file for the compiler src\org\sablecc\pascal\compiler\Main.java - the compiler driver class src\org\sablecc\pascal\semantic\SemanticAnalyser.java - the semantic analyser class src\org\sablecc\pascal\code\CodeGenerator.java - the code generator class This compiler reads Pascal source code and generates jasmin source code To avoid incompatibility between the code generated by SableCC, only the source code is supplied. So, you'll have to regenerate the parser with the version of SableCC you are using. After that compile the whole source code and add the path where all the class files are placed to your classpath. After that, run the compiler with the following command: Windows: c:\java -jar smallpascal.jar filename.pas or assuming you have smallpascal.jar file in your CLASSPATH c:\java org.sablecc.pascal.compiler.Main filename.pas or Unix based systems: $java -jar smallpascal.jar filename.pas filename is the name of the file with the Pascal source. After compiling the pascal program, you should find in the current directory a file named filename.j, where filename is the same name as the pascal source file. To generate the .class file, you'll need to assemble the resulting program with the jasmin assembler, which you can download from: http://www.cat.nyu.edu/meyer/jasmin To print the Abstract Syntax tree run java -cp simplepascal.jar org.sablecc.simplepascal.tool.PrintTree [--gui] test.pas To understand the JVM assembly you may wish to consult one of the following books: Joshua Engel, "Programming for the Java Virtual Machine", Addison-Wesley, 1999. James Gosling, Bill Joy, and Guy Steele, "The Java Virtual Machine Specification", Addison-Wesley, 1998. The latter may be found in PDF or PS format at http://www.javasoft.com The software comes with ABSOLUTELY NO WARRANTY. Please read the LICENSE file for further information. If you have any queries you may contact the author on the following address: Fidel Viegas (viegasfh@hotmail.com). Good Luck!!