Skip to content

Commit 85bd5b6

Browse files
authored
Update README.md
1 parent b6080a5 commit 85bd5b6

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,12 @@ python3 final.py
3030
4) **Optimised_ICG:** This folder contains the code that generates the symbol table after optimisations, the quadruples table and the optimised intermediate code.
3131
5) **Target_Code:** This folder contains the code that displays the assembly code/target code.
3232

33+
## RESULTS AND SHORTCOMINGS
34+
The mini-compiler built in this project works perfectly for the ‘if-else’ and ‘while’ constructs of Python language. Our compiler can be executed in different phases by building and running the code separated in the various folders. The final code displays the output of all the phases on the terminal, one after the other. First, the tokens are displayed, followed by a ‘PARSE SUCCESSFUL’ message. The abstract syntax tree is printed. Next, the symbol table along with the intermediate code is printed without optimisation. Finally, the symbol table and the intermediate code after optimisation is displayed after the quadruples table. The final output is the target code, written in the instruction set architecture followed by the hypothetical machine model introduced in this project. This is for inputs with no errors. But in case of erroneous inputs, the token generation is stopped on error encounter and the corresponding error message is displayed.
35+
36+
This mini-compiler has the following shortcomings:
37+
• User defined functions are not handled.
38+
• Importing libraries and calling library functions is not taken care of.
39+
• Datatypes other than integer and float, example strings, lists, tuples, dictionaries, etc have not been considered.
40+
• Constructs other than ‘while’ and ‘if-else’ have not been added in the compiler program.
3341

0 commit comments

Comments
 (0)