logo

Crowdly

Browser

Add to Chrome

Compiler Design(BCSE307L)

Looking for Compiler Design(BCSE307L) test answers and solutions? Browse our comprehensive collection of verified answers for Compiler Design(BCSE307L) at lms.vit.ac.in.

Get instant access to accurate answers and detailed explanations for your course questions. Our community-driven platform helps students succeed!

Three address code

for the following function call

 

         Schwatz ( x1, x2, . . . , xk)   is

           

0%
100%
0%
0%
View this question

Consider the productions  S→ AB , S→YZ, each non-terminal S, A, B, Y

and Z has 

two attributes: s is a synthesized

attribute and i is an inherited attribute. Consider 

the following semantic rules:

                Rule 1 :  A.i = S.i + 2 ,   B.i = A.i + S.i  ,   

S.s = A.s + B.s

                Rule 2: Y.i = S.i + Z.s  , Z.i = S.i + Y.s

Which one of the following is TRUE?

0%
0%
100%
0%
View this question

Quadruple is a record

structure with four fields

0%
0%
0%
100%
View this question

Which one of the

following statements is FALSE?

 

0%
0%
100%
0%
View this question

Which

of the following LR(0) items represents the initial item in the LR(0) items set

for a given non-terminal? 

0%
100%
0%
0%
View this question

In the

following augmented grammar with terminals { +, *, ( , ) , 1} and productions

           

A’

→ A ,   A→ A +

B / B  ,    B→B * C / C,  C→(A) / 1

 

If  J  is

the set three of LR(0) items {

A’ → A. , A→ A .+ B , B→B .* C

},

then

goto(

closure(J), +) U goto( closure(J), * )

 contains exactly ____________ items.

0%
0%
0%
100%
View this question

Consider the following grammar.

         S → abB

         A → aaBb

         B → bbAa

         A → Ɛ

 

The

number of reduction steps taken by a bottom-up parser while accepting the

string   

  abbbaabbaabbababa

 

0%
100%
0%
0%
View this question

1A student wrote

two context-free grammars G1 and G2 for generating a single C-like array

declaration. The dimension of the array is at least one. For example,

                  

int a[10][3];

 The grammars use D

as the start

symbol, and use six terminal symbols int ; id [ ] num.

          

Grammar

G1                           Grammar G2

               D

int

L;                                 D

int L;

               Lid [E                                     L id E

               E num ]                                 E E [num]

               E num] [ E                             E [num]

     Which of the grammars correctly generate

the declaration mentioned above?

 

0%
100%
0%
0%
View this question

Consider the following Syntax Directed Translation

S->aS { m: = m+3 ;

print(m);}

    | bS {m: = m*2; print (m) ; }

   | epsilon {m:= 0;}

A shift-reduce parser

evaluates the semantic action of a production whenever the production is reduced. If

the string is "aababb," then which of the

following is printed?

0%
0%
100%
0%
View this question

Consider the production

A -> BC

Which of the following attribute definitions is valid for an L-attributed grammar?

100%
0%
0%
0%
View this question

Want instant access to all verified answers on lms.vit.ac.in?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!

Browser

Add to Chrome