https://github.com/fbs/coolast
https://github.com/fbs/coolast
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/fbs/coolast
- Owner: fbs
- Created: 2012-05-19T12:10:42.000Z (about 14 years ago)
- Default Branch: master
- Last Pushed: 2012-05-19T13:11:27.000Z (about 14 years ago)
- Last Synced: 2025-12-29T19:21:21.602Z (5 months ago)
- Language: C++
- Size: 93.8 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# coolast
An extension to the [compiler-class](https://class.coursera.org/compilers) software that
makes it possible to get a graphical representation of the AST.
## Dependencies
- graphviz
- compiler-class VM image / toolchain
## Usage (VM specific)
$ sudo aptitude update && sudo aptitude install graphviz git-core -y
$ cd ~
$ mkdir coolast
$ cd coolast
$ make -f /usr/class/cs143/assignments/PA4/Makefile > /dev/null
$ git clone git://github.com/fbs/coolast.git
$ cp coolast/* .
$ nano Makefile
add dotdump.cc to the CSRC list.
$ nano semant-phase.cc
Add the following to main:
ofstream dotfile;
dotfile.open("ast.dot");
ast_root->dump_to_dot(dotfile, 0);
$ make semant
$ ./mysemant good.cl
$ dot -Tpng ast.dot > ast.png
$ midori ast.png