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 :

Click on Discuss to view users comments.

Write your comments here:



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.

Click on Discuss to view users comments.

Sherin Agustine said: (1:35am on Tuesday 15th September 2015)
I think the option is (B) because we are using only terminal symbols for constructing the table with precedence relations

Write your comments here:



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 :

Click on Discuss to view users comments.

Write your comments here:



29:  

The most powerful parser is

A.

SLR

B.

LALR

C.

Canonical LR 

D.

Operator-precedence

 
 

Option: C

Explanation :

Click on Discuss to view users comments.

Write your comments here:



30:  

YACC builds up

A.

SLR parsing table

B.

canonical LR parsing table

C.

LALR parsing table

D.

none of these

 
 

Option: C

Explanation :

Click on Discuss to view users comments.

Write your comments here:






Suggest an improvement