Classical

Compiler Design - Lexical analysis & Parsing

26:  

The symbol table implementation is based on the property of locality of reference is

A.

linear list

B.

search tree

C.

hash table

D.

self-organization list

 
 

Option: C

Explanation :


27:  

 In operator precedence parsing, precedence relations are defined

A.

for all pair of non-terminals

B.

for all pair of terminals

C.

to delimit the handle

D.

none of these

 
 

Option: A

Explanation :

 There are two important properties for these operator precedence parsers is that it does not appear on the right side of any production and no production has two adjacent nonterminals. Means no production right side is empty or has two adjacent nonterminals. So accordig to property  option (A) is correct.


28:  

LR parsers are attractive because

A.

it can be constructed to recognize CFG corresponding to almost all programming constructs

B.

it doesnot backtrack

C.

both (a) and  (b)

D.

none of these

 
 

Option: C

Explanation :


29:  

The most powerful parser is

A.

SLR

B.

LALR

C.

Canonical LR 

D.

Operator-precedence

 
 

Option: C

Explanation :


30:  

YACC builds up

A.

SLR parsing table

B.

canonical LR parsing table

C.

LALR parsing table

D.

none of these

 
 

Option: C

Explanation :




Suggest an improvement