COMPUTER SCIENCE AND ENGINEERING
COMPILER DESIGN
Question
[CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
|
|
Lexical Analysis
|
|
Syntax Analysis
|
|
Semantic Analysis
|
|
Code Generation
|
|
Code Optimisation
|
Detailed explanation-1: -So far in the stages of compilation, lexical analysis has been used to determine whether the tokens within the program are valid, then syntax analysis has been used to find out whether the tokens have been used to meet the rules of the language.
Detailed explanation-2: -Semantic analysis is the third phase of compilation process. It checks whether the parse tree follows the rules of language. Semantic analyzer keeps track of identifiers, their types and expressions. The output of semantic analysis phase is the annotated tree syntax.
Detailed explanation-3: -At an overview level, the process can be split into four separate stages: Preprocessing, compilation, assembly, and linking.
Detailed explanation-4: -Phase 1: Lexical Analysis Here, the character stream from the source program is grouped in meaningful sequences by identifying the tokens. It makes the entry of the corresponding tickets into the symbol table and passes that token to next phase.
Detailed explanation-5: -Explore the Phases of Compiler Syntactic Analysis or Parsing. Semantic Analysis. Intermediate Code Generation. Code Optimization.