Anonymous

What is phases of compiler?

1

1 Answers

Anonymous Profile
Anonymous answered
Compiler is a simple program   which reads a program written in one language (i.e., High Level  Language (or) Source Language) and it translates to an equivalent target  program (i.e., Low Level Language).Compiler consists of 2 phases. 1.Analysis Phase2.Synthesis phase Analysis Phase performs 3 actions namelya)Lexical analysis - it contains a sequence of characters called tokens.Input is source program & the output is tokens.  B)syntax analysis - input is token and the output is parse tree  c)Semantic analysis - input is parse tree and the output is expanded version of parse tree Synthesis Phase performs 3 actions namelyd)Intermediate Code generation - Here all the errors are checked & it produce an intermediate code.  E)Code Optimization - the intermediate code is optimized here to get the target program  f) Code Generation - this is the final step & here the target program code is generated.

Answer Question

Anonymous