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.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjMyODA2NTcsIm5iZiI6MTcyMzI4MDM1NywicGF0aCI6Ii8yMDcyODAxNS8zNDAwMjU1NTMtMDA1MGY3ODYtY2E1Zi00ZWJjLTk5MjktZjliMzc2YWNmOTc5LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MTAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODEwVDA4NTkxN1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTkxYjEyMTMzMGU3MzNkZDA4MjBkMjE4MTVlYzEyMmRhM2ZhMmNkNWQ1MWIyZGU2ZTQ2M2Q3NzBmYTU5ODg3NDUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.HWoQMBkKTdz5zwjpOttLwJ-dW2T13lC3O65qgKV3D5I)
- Remember to free whatever is malloc'ed else we get random malloc errors