You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
All phases of a compiler for Python Language have been implemented using C language. The constructs 'if-else' and 'while' have been handled.
3
+
4
+
## Introduction
5
+
The **_proj.l_** lex file and **_proj1.y_** yacc file work together to **parse** the Python code in the **_inp.py_** file and **generate tokens** to output a **symbol table** and create an **abstract syntax tree** and hence, generate the **optimised intermediate code**. This optimised intermediate code is saved in the file **_IntermediateCode.txt_** which is then accessed in the **_TargetCodeGenerator.c_** file. This file converts this optimised intermediate code to the **target code** for a hypothetic machine model which will be discussed further.
0 commit comments