Semantic Analyser
1.

 What is true about Syntax Directed Definitions?

A.  

Syntax Directed Definitions + Semantic rules = CFG

B.  

Syntax Directed Definitions + CFG = Semantic rules

C.  

CFG + Semantic rules = Syntax Directed Definitions

D.  

None of the above

2.

Which of the following error is expected to recognize by semantic analyzer?

A.  

Type mismatch

B.  

Undeclared variable

C.  

Reserved identifier misuse.

D.  

All of the above

3.

____________ is a medium to provide semantics to the context-free grammar

A.  

Domain grammer

B.  

Attribute grammar

C.  

Object grammer

D.  

Value grammer

4.

Semantic analyzer attaches attribute information with AST, which are called?

A.  

Analyzer attribute

B.  

Attributed AST

C.  

Analyzer AST

D.  

AST

5.

Which attributes get values from the attribute values of their child nodes?

A.  

Synthesized attributes

B.  

Inherited attributes

C.  

S-attributed SDT

D.  

L-attributed SDT

6.

 Which form of SDT uses both synthesized and inherited attributes with restriction of not taking values from right siblings?

A.  

T-attributed SDT

B.  

A-attributed SDT

C.  

S-attributed SDT

D.  

L-attributed SDT

7.

If an SDT uses only synthesized attributes, it is called as?

A.  

T-attributed SDT

B.  

A-attributed SDT

C.  

S-attributed SDT

D.  

R-attributed SDT

8.

Which of the following tasks should be performed in semantic analysis?

A.  

Scope resolution

B.  

Type checking

C.  

Array-bound checking

D.  

All of the above

9.

What is meant by compositional semantics?

A.  

Determining the meaning

B.  

Logical connectives

C.  

Semantics

D.  

All of the above

10.

What is true about Attribute Grammar?

A.  

Attribute grammar is a special form of context-free grammar

B.  

Each attribute has well-defined domain of values

C.  

The right part of the CFG contains the semantic rules

D.  

All of the above