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
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
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?
Quadruple is a record structure with four fields
Which one of the following statements is FALSE?
Which of the following LR(0) items represents the initial item in the LR(0) items set for a given non-terminal?
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 { }, then
goto( closure(J), +) U goto( closure(J), * )
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
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
L→id [E L→ id E
E → num ] E → E [num]
E →num] [ E E → [num]
Which of the grammars correctly generate the declaration mentioned above?
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?
Which of the following attribute definitions is valid for an L-attributed grammar?