Code analyzer of a C, C++ test code and Assembler code generator
- Lexical analysis
- Sintaxis analysis
- Semantic analysis
- Assembler code generator
- IU display of all the analysis information
- Lexical an Sintaxis analysis
- Interface
- Run the main.py
- Once in the interface, select Open TestCode and select the .txt that contains the code to analyze (try testcode.txt)
- Then select Lexic & Sintax Analysis, there are two ways that could procced:
- If the code its OK, this will make the analysis and will draw the sintactical tree
- If not, will show the errors, sintactical or semantical each in their own field
- To generate the Assembler code of the test code, click on Generate ASM, the .asm will appear in the same location of the main.py
- Change the parameter datatype of function calcula(), int num2 -> string num2
- Delete the semicolon of the end in the first line of main() function
- Delete the declaration of promedio variable in function main()