-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathReadMe
More file actions
29 lines (23 loc) · 645 Bytes
/
ReadMe
File metadata and controls
29 lines (23 loc) · 645 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
README
Code Implements A Mini Compiler for Python:
- Parsing
- Symbol Table
- Abstract Synatx Tree
- Intermedite Code Generation
- Optimization (Constant Folding and Constant Propagation)
Usage:
Sample Test Cases:
The sample test cases can be run using the bash files listed below:
- show_symbol.sh
- show_error.sh
- show_ast.sh
- show_icg.sh
- show_optimization.sh
Running a Python Script:
The bash file ./run.sh is used to run any give script.
./run.sh [-p] [-t] [-i] [-o] sample.py
-p: Parsing
-t: Abstract Syntax Tree
-i: Intermediate Code Generation
-o: Code Optimization
example: ./run.sh -p -t -i -o sample.py