COMPILER DESIGN

SYNTAX ANALYSIS

ROLE OF THE PARSER

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Compiler can check ____ error.
A
Logical
B
Syntax
C
Content
D
Both A and B
Explanation: 

Detailed explanation-1: -Which of the following errors can a compiler check? Explanation: Compiler can only check syntax errors.

Detailed explanation-2: -Which phase of the compiler is Syntax Analysis? Explanation: It is Second Phase Of Compiler after Lexical Analyzer.

Detailed explanation-3: -A compiler can check for syntax errors but cannot check for logical errors. This is because logical errors are not related to the syntax of the program but rather to its logic. Logical errors can only be identified by running the program and analyzing its output.

Detailed explanation-4: -A syntax error is also a type of compile error. A syntax error occurs as soon as you hit enter and VBA identifies that something is missing. A compilation error can also occur when VBA doesn’t find anything missing while typing the code, but it does when the code is compiled or executed.

There is 1 question to complete.