COMPILER DESIGN

SYNTAX ANALYSIS

ROLE OF THE PARSER

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Which of the following error can a compiler check?
A
Syntax Error
B
Logical Error
C
Both Logical and Syntax Error
D
Compiler cannot check errors
Explanation: 

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

Detailed explanation-2: -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.

Detailed explanation-3: -A syntax checker checks for syntax errors in each statement, according to the data set type. The syntax checker scans each line a user enters, in input mode, when the user edits a data set. Before the syntax checker scans a record, the record is put into the data set.

Detailed explanation-4: -Syntax errors are mistakes in the source code, such as spelling and punctuation errors, incorrect labels, and so on, which cause an error message to be generated by the compiler.

There is 1 question to complete.