Compiler Construction Group 34
- clone this repo:
git clone https://github.com/diveshuttam/CS-F363
cd CS-F363
- create a folder named
build
in the above directory:mkdir build
- run
make deubg
for running with debug output (runs always automatically with filea.mylang
to save time during debugging) - run
make all
for output without debug statements (asks for which file to compile)
- run
make graphics
to print graphics output - create json file for tree using
./visualize_exe ./testcases/testcase1.txt ./testcases/testcase1.json
- open visualize/visualize.html in a browser
- select the json file (here testcases1.json) to visualize the tree output
One can also visualize a json file at https://diveshuttam.github.io/CS-F363/graphics/visualize
![AST](https://private-user-images.githubusercontent.com/20728015/340025553-0050f786-ca5f-4ebc-9929-f9b376acf979.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk0MDk2NzIsIm5iZiI6MTczOTQwOTM3MiwicGF0aCI6Ii8yMDcyODAxNS8zNDAwMjU1NTMtMDA1MGY3ODYtY2E1Zi00ZWJjLTk5MjktZjliMzc2YWNmOTc5LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEzVDAxMTYxMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTAwYWIzM2Y1MDgyZGY3NGJiMDBmYzBhODNhOTljYTFjNzdkNmFhZTgyYzUxMWJlMGNhNWRhMWY0ZGM3Nzk1NTgmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.MZNg1vag9bd3cZ9bdlyaXYpzYkaHfzTTlAg2IwiYrP0)
- Remember to free whatever is malloc'ed else we get random malloc errors