recategorized by
1,031 views

1 Answer

0 votes
0 votes
  • Statement 1 is correct. The main objective of lexical analysis is breaking the program into a group of logical meaning words (Token).
  • Statement 2 is also correct here. The syntax analysis phase checks whether the token is syntactically correct or not. if yes then it produces the parse tree otherwise generates a syntax error.
  • Statement 3 is wrong here. Semantic means the meaning of language. syntax analysis phase only cares about the correct syntax of the program. programs are logically valid or not, this part is done by the semantic analysis phase.

$\textrm{Option (C) is correct.}$

Please refer here:

  1.  Gate 1998
  2. Gate 2018
  3. Phases of a compiler
edited by

Related questions

0 votes
0 votes
2 answers
1
go_editor asked Mar 26, 2020
345 views
Which of the following is the most general phase – structured grammar ?RegularContext – SensitiveContext freeNone of these
0 votes
0 votes
1 answer
2
go_editor asked Mar 26, 2020
211 views
Which activity is not included in the first pass of two pass assemblers?Build the symbol tableConstruct the machine codeSeparate mnemonic opcode and operand fields.None o...
0 votes
0 votes
1 answer
3
go_editor asked Mar 26, 2020
301 views
Symbol Table can be used for :Checking type compatibilitySuppressing duplication of error messageStorage allocationAll of these
2 votes
2 votes
1 answer
4
rishu_darkshadow asked Sep 23, 2017
1,924 views
A compiler that runs on one machine and produces code for a different machine is called :Cross compilation One pass compilation Two pass compilation N...