Compiler converts the high-level language into a low-level language. Assembler converts the low-level language into machine understandable language, like bits of 1’s and 0’s.
Lexical Analysis: The lexical analyzer is responsible for reading the code line by line. Whenever it reads a word, it checks if the word is a keyword or not using a symbol table and generates a token for that particular word. The lexical analysis removes blank spaces, argument lines, the next line character, and braces: <Token_name,number>
Syntax Analysis: It takes tokens produced by the lexical analyzer as input and generates a parse tree.
Semantic Analysis: It verifies the parse tree, and any errors found are notified to the error handler.
Intermediate code Generation: It represents the final machine language code produced. It mainly bridges both the analysis and synthesis phases together.
Code Optimizer: This is an optional step in which the code could be reduced to optimize the code size, space, and access.
Code Generation: It translates intermediate code into a sequence of a relocatable machine code.
View all Courses