search
Log In

Recent questions tagged compiler

0 votes
0 answers
1
"A CLR parser will not make even single reduction before announcing an error" Plz explain this line
asked Apr 10, 2019 in Compiler Design Anuj kumar yadav 29 views
0 votes
0 answers
2
Is the set of all syntactically valid C programs countable or uncountable? How can we prove so?
asked Feb 9, 2019 in Theory of Computation Reshu $ingh 98 views
0 votes
0 answers
3
b = b + c d = b + d b = b – d e = d + b The minimum number of nodes and edges present in the DAG representation of above basic block respectively are ? 4 and 5 5 and 4 6 and 6 6 and 7
asked Jan 27, 2019 in Compiler Design balraj_allam 238 views
0 votes
1 answer
4
If we have more than 1 parse tree,but one is LMD and other is RMD , Is Grammar Ambiguous? There are no other parse tree other than these two.
asked Jan 25, 2019 in Compiler Design Reshu $ingh 132 views
0 votes
0 answers
5
Consider the following translation schema S->TR R->+T{printf(“+);}R|ε T->num{printf(‘’num.val”); for the string “9+5+2” the translation schema will print? A.) 9+5+2 B.) 95+2+ C.) 952++ D.) ++952 My doubt here is: Since it is L-attributed SDT the answer should be 9+5+2 but answer given is 95+2+?
asked Jan 15, 2019 in Compiler Design Shivam Kasat 168 views
0 votes
0 answers
6
if grammar have two different RMDT(right most derivation tree) for a string then grammar is ambigous or not ?
asked Jan 9, 2019 in Compiler Design amit166 48 views
0 votes
0 answers
7
Given the 3-address code for a basic block: The number of registers that are needed to allocate this basic block with no spills are ________.? My doubt here is : Is there any difference in question asking for minimum numbers of registers and minimum number ... If the question ask for minimum number of variables required in three address code, Only then should we optimize the code before counting?
asked Dec 23, 2018 in Compiler Design Shivam Kasat 206 views
0 votes
0 answers
8
backtracking is required only for top down parser? true/false
asked Dec 2, 2018 in Compiler Design Deepesh Pai 57 views
0 votes
1 answer
9
0 votes
1 answer
10
0 votes
2 answers
11
In compiler optimization, operator strength reduction uses mathematical identities to replace slow math operations with faster operations. Which of the following code replacements is an illustration of operator strength reduction ? A. Replace P + P by 2 * P or Replace 3 + 4 by 7 B. Replace P * 32 by P < < 5 C. Replace P * 0 by 0 D. Replace (P < <4) – P by P * 15 pls explain your answer
asked Oct 1, 2018 in Compiler Design aditi19 180 views
8 votes
4 answers
12
Consider the following Grammar : S -> ZZ Z -> xZ|y Which of following represent a handle in the generation of the string "xxxyxy" ? A. ZxZ B. Zxy C. xZxy D. xZ Please explain little about handles too i have little doubt in it. And do explain difference between viable prefix and Handle Please :)
asked Sep 18, 2018 in Compiler Design Na462 1.5k views
0 votes
1 answer
13
Any transcription error can be repaired by (a) insertion alone (b) deletion alone (c) insertion and deletion alone (d) replacement alone
asked Sep 16, 2018 in Compiler Design goluabhinan 234 views
0 votes
0 answers
14
Is LR(0) grammar can generate same languages as LR(1) grammar can generate?
asked Sep 16, 2018 in Compiler Design soumayan bandhu 40 views
0 votes
1 answer
15
Three address codes can be implemented by (a) indirect triples (b) direct triples (c) quadruples (d) none of the above
asked Sep 16, 2018 in Compiler Design goluabhinan 198 views
0 votes
0 answers
16
Access time of the symbol table will be logarithmic, if it is implemented by a (a) linear list (b) search tree (c) hash table (d) none of the above
asked Sep 16, 2018 in Compiler Design goluabhinan 65 views
0 votes
1 answer
17
For which of the following situations, inherited attribute is a natural choice? (a) Evaluation of arithmetic expression (b) Keeping track of variable declaration (c) Checking for the correct use of L-values and R-values (d) All of the above
asked Sep 16, 2018 in Compiler Design goluabhinan 489 views
1 vote
0 answers
18
Whether a given pattern constitutes a token or not (a) depends on the source language (b) depends on the target language (c) depends on the compiler (d) none of the above comment is true
asked Sep 16, 2018 in Compiler Design goluabhinan 845 views
0 votes
0 answers
19
1.Given a Grammar G {S}, {a, b}, S, Pwith P defined as: S  aSb, S  (i) Obtain a sentence in language generated by G and the sentential form. (ii) Obtain the language L(G). 2. Find regular expressions over {a, b} for the language defined as follows: L1 = ... parsing table for this grammar. Grammar G3 : S aBa B bB / ᶓ (b) Show that Grammar G2 is left-recursive. Grammar G2 : S S(S) S ᶓ
asked Jul 4, 2018 in Compiler Design gidoranking 98 views
2 votes
3 answers
21
If I have the grammar : E->E*F | F+E |F F->id , Now here although + and * are defined at the same level , with different associativity but this grammar produces 2 different parse trees for the string id+id*id , so here we can't make any generalization regarding precedence of the operators although they are defined at the same level . So what conclusion can be drawn from this ?
asked Mar 19, 2018 in Compiler Design radha gogia 236 views
0 votes
1 answer
22
$\text{What is three address code representation of this ?}$ -a+b|c^d^e*f|g
asked Feb 18, 2018 in Compiler Design Nikhil Patil 185 views
0 votes
2 answers
23
plz help me why c option wrong
asked Jan 29, 2018 in Compiler Design 92komal 83 views
1 vote
0 answers
24
plz explain
asked Jan 28, 2018 in Compiler Design 92komal 150 views
0 votes
2 answers
25
Consider the following statements: S1 : Three-address code is a linearized representation of syntax tree. S2 : The syntax tree not depicts the natural hierarchical structure of source programm. Which of the following is true? plz explain s1 statement
asked Dec 23, 2017 in Compiler Design 92komal 410 views
0 votes
1 answer
26
1 vote
1 answer
27
What is the first and follow of this grammar?
asked Oct 11, 2017 in Compiler Design Kuldeep Pal 132 views
7 votes
1 answer
28
Can anyone Confirm How many temporary variables required here.? I got 3 .
asked Oct 5, 2017 in Compiler Design junaid ahmad 156 views
0 votes
0 answers
29
I tried to traverse from left to right depth first and evaluating semantic rules, but getting stuck when i reach " T'---> empty " As its semantic rule can't be evaluated at that point because T'.i value is still left to calculate. I think the question is wrong ? What you think ?
asked Oct 3, 2017 in Compiler Design ♥_Less 123 views
0 votes
0 answers
30
For the grammar S ------> 0 S 1/ 0 1 indicate the handle in each of the following right-sentential forms a) 000111 . b ) 00S11 . Also for the grammar S ----->S S + / SS * / a indicate the handle a) SSS + a * + . b ) SS + a * a+.
asked Oct 3, 2017 in Compiler Design set2018 437 views
...