Question 31
S → id : = E {gen (id.place = E.place;);} E → E1 + E2 {t = newtemp ( ); gen (t = El.place + E2.place;); E.place = t} E → id {E.place = id.place;}Here, gen is a function that generates the output code, and newtemp is a function that returns the name of a new temporary variable on every call. Assume that ti\'s are the temporary variable names generated by newtemp. For the statement \'X: = Y + Z\', the 3-address code sequence generated by this definition is
Question 33
Which of the following derivations does a top-down parser use while parsing an input string? The input is assumed to be scanned in left to right order.
Question 34
E -> E * F | F + E | F F -> F - F | idwhich of the following is true?
Question 36
In the context of abstract-syntax-tree (AST) and control-flow-graph (CFG), which one of the following is True?
Question 37
List-I List-II A. Lexical analysis 1. Graph coloring B. Parsing 2. DFA minimization C. Register allocation 3. Post-order traversal D. Expression evaluation 4. Production tree
Codes: A B C D (a) 2 3 1 4 (b) 2 1 4 3 (c) 2 4 1 3 (d) 2 3 4 1
Question 38
Question 39
S → F ⎪ H F → p ⎪ c H → d ⎪ cWhere S, F and H are non-terminal symbols, p, d and c are terminal symbols. Which of the following statement(s) is/are correct?
S1: LL(1) can parse all strings that are generated using grammar G. S2: LR(1) can parse all strings that are generated using grammar G.
Question 40
There are 85 questions to complete.