Compiler Visualization
Group Members
- Matt Aasted
- Helen Lewis-Rzeszutek
- Connor Riley
Project summary
We took Atul Varma's Mini-C compiler written in python
- Modified it to put line numbers throughout the abstract syntax tree and to output them in the abstract syntax tree printer function; modified code here:
- Used the -ast option to turn foo.c into foo.ast
Wrote a python program (here) to convert the .ast file into xml formating for the graphics toolkit Prefuse.
Modified example code from Prefuse in the demo section to highlight line numbers in the code corresponding to the node clicked on in the abstract syntax tree displayed through prefuse. To make this work, install prefuse and eclipse, put the c file in the prefuse folder as cfile.txt, put the xml file in the data folder as foo.xml and overwrite TreeView.java with our version in the demo application (_not_ demo applets) section of the class tree.