Classical

Compiler Design - Syntax directed translation

26:  

Which is not true about syntax and semantic parts of a computer language?

A. Syntax is generally checked by the programmer.
B. Semantics is the responsibility of the programmer
C. Semantics is checked mechanically by a computer.
D. Both (b) and (c)
 
 

Option: D

Explanation :


27:  

 Which of the following statement is true ? 

A.

SLR parser is more powerful than LALR

B.

LALR parser is more powerful than Canonical LR parser

C.

Canonical LR parser is nore powerful than LALR parser

D.

the parsers SLR, Canonical LR, and LALR  have the same power

 
 

Option: C

Explanation :

LR is powerful than LALR parsers and LALR are powerful than SLR parsers


28:  

Which of the following features cannot be captured by CFG ?

A.

syntax of if-then-else statements

B.

syntax of recursive procedures

C.

whether a variable is declared before its use

D.

matching nested paranthesis

 
 

Option: D

Explanation :

it is because, it is equivalent to recognizing wew, where the first w is the decleration and the second is its use, wew is not a CFG.




Suggest an improvement