in Compiler Design retagged by
493 views
1 vote
1 vote

Which phase of the compiler generates parse tree?

  1. Lexical analyzer
  2. Semantic analyzer
  3. Syntax analyzer
  4. None of them.
in Compiler Design retagged by
493 views

1 Answer

0 votes
0 votes
Lexical Analyzer: phase of compiler takes the pure High level language code as Input and produces stream of Tokens as Output.  
Syntax Analyzer: takes stream of Tokens as Input and produces the Parse Tree or Syntax Tree or Derivation Tree as output with the help of CFG Rules.
Semantic Analyzer: takes the Parse Tree as input and generates Annotated Parse as output and verifies the meaning of each and every sentence in the source program with the help of Syntax Directed translation.
Answer:

Related questions