Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Webpage for Compiler Design:
Recent questions tagged compiler-design
0
votes
3
answers
241
Remove left recusrion and find out first and follow
Compute the FIRST and FOLLOW for the postfix grammar after removing the left recursion: $ S → S S+/ S S* /a$
Compute the FIRST and FOLLOW for the postfix grammar after removing the left recursion:$ S → S S+/ S S* /a$
jayanth
3.5k
views
jayanth
asked
Jun 16, 2022
Compiler Design
compiler-design
left-recursion
first-and-follow
+
–
1
votes
1
answer
242
loader can perform linking. how?
loader can perform linking .it is true how?and what are combined features that loader can perform ?
loader can perform linking .it is true how?and what are combined features that loader can perform ?
AartiVG
631
views
AartiVG
asked
Jun 9, 2022
Compiler Design
compiler-design
linker
+
–
0
votes
3
answers
243
How many parse tree can be constructed for the given ambiguous grammar?
E--> E+E E--> E*E E--> id Input string: id + id + id
E E+EE E*EE idInput string: id + id + id
Yogendraa
1.1k
views
Yogendraa
asked
Jun 9, 2022
Compiler Design
compiler-design
parsing
+
–
0
votes
0
answers
244
If case values are widely spaced, it is better to use (A) Table search (B) Jump table (C) Either jump table or simple table (D) None of the other options
can anyone help me out this plz?i want to know about jump table its an nptel assignment
sandip_1999
221
views
sandip_1999
asked
May 15, 2022
Compiler Design
compiler-design
target-code-generation
+
–
0
votes
0
answers
245
For pair of goto based storage allocation for functions, the second goto statement transfers control to the beginning of (A) Storage space (B) Program (C) Function code (D) None of the other options
i cannot understand this question.can anyone help me out plz? it is an nptel assignment
sandip_1999
309
views
sandip_1999
asked
May 15, 2022
Compiler Design
compiler-design
+
–
0
votes
1
answer
246
prerequisetes from compiler design?
Hello everyone, i am targeting to complete TOC and compiler design by end if this month, but facing difficulty in Undecidability part, can you please guide if i try to learn compiler design in parallel with TOC is Finite Automata, ... grammar and context free grammar and PDA and turing machine are enough to start compiler design or Undecidability is mandatory.
Hello everyone, i am targeting to complete TOC and compiler design by end if this month, but facing difficulty in Undecidability part, can you please guide if i try to le...
Atharva007
549
views
Atharva007
asked
May 12, 2022
Compiler Design
compiler-design
reference-book
+
–
0
votes
0
answers
247
Draw Parse tree
Consider the following grammar: S→ a | ^ | ( T ) T→ T , S | S Draw the parse tree for “ (((a,a),^,(a)),a)”
Consider the following grammar:S→ a | ^ | ( T )T→ T , S | SDraw the parse tree for “ (((a,a),^,(a)),a)”
Subhrangsu
354
views
Subhrangsu
asked
Apr 17, 2022
Compiler Design
compiler-design
+
–
2
votes
2
answers
248
Is the following grammar LL(1) ?
Is the following grammar LL(1) ? S→ aABbCD | ϵ A→ ASd | ϵ B→ Sac| hC | ϵ C→ Sf |Cg D→ aBD | ϵ Draw the LL(1) parsing table for the given grammar.
Is the following grammar LL(1) ?S→ aABbCD | ϵA→ ASd | ϵB→ Sac| hC | ϵC→ Sf |CgD→ aBD | ϵDraw the LL(1) parsing table for the given grammar.
Subhrangsu
9.3k
views
Subhrangsu
asked
Apr 16, 2022
Compiler Design
compiler-design
parsing
grammar
+
–
0
votes
1
answer
249
Compute FIRST and FOLLOW sets
Compute FIRST and FOLLOW sets: S→ aAC | bB A→ Abc| Abd | e B→ f | g C→ h | i
Compute FIRST and FOLLOW sets:S→ aAC | bBA→ Abc| Abd | eB→ f | gC→ h | i
Subhrangsu
2.2k
views
Subhrangsu
asked
Apr 15, 2022
Compiler Design
compiler-design
grammar
parsing
first-and-follow
+
–
9
votes
1
answer
250
GATE CSE 2022 | Question: 3
Which one of the following statements is $\text{TRUE}?$ The $\textit{LALR}(1)$ parser for a grammar $\textit{G}$ cannot have reduce-reduce conflict if the $\textit{LR}(1)$ parser for $\textit{G}$ does not have reduce-reduce ... Data flow analysis is necessary for run-time memory management. $\textit{LR}(1)$ parsing is sufficient for deterministic context-free languages.
Which one of the following statements is $\text{TRUE}?$The $\textit{LALR}(1)$ parser for a grammar $\textit{G}$ cannot have reduce-reduce conflict if the $\textit{LR}(1)$...
Arjun
7.4k
views
Arjun
asked
Feb 15, 2022
Compiler Design
gatecse-2022
compiler-design
parsing
1-mark
+
–
6
votes
3
answers
251
GATE CSE 2022 | Question: 19
Consider the augmented grammar with $\{ +, {\ast}, (,),\text{id} \}$ as the set of terminals. $S' \rightarrow S$ $S \rightarrow S + R\; |\; R$ $R \rightarrow R {\ast} P \;| \;P$ $P \rightarrow (S)\; |\; \text{id} $ If $I_{0}$ is ... $\{ [S' \rightarrow S.], [S \rightarrow S. + R] \}$, then $\textit{goto(closure}(I_{0}), +)$ contains exactly ______________ items.
Consider the augmented grammar with $\{ +, {\ast}, (,),\text{id} \}$ as the set of terminals.$S’ \rightarrow S$$S \rightarrow S + R\; |\; R$$R \rightarrow R {\ast} P \;...
Arjun
7.3k
views
Arjun
asked
Feb 15, 2022
Compiler Design
gatecse-2022
numerical-answers
compiler-design
parsing
lr-parser
1-mark
+
–
7
votes
3
answers
252
GATE CSE 2022 | Question: 55
Consider the following grammar along with translation rules. ... of $S._{\text{val}}$ for root of the parse tree for the expression $20 \# 10 \% 5 \# 8 \% 2 \% 2$ is ________________.
Consider the following grammar along with translation rules.$$\begin{aligned} & S \rightarrow S_{1} \# T \qquad \{S._{\text{val}} =S_{1}. _{\text{val}} \; ^{\ast} T._{\te...
Arjun
5.9k
views
Arjun
asked
Feb 15, 2022
Compiler Design
gatecse-2022
numerical-answers
compiler-design
syntax-directed-translation
2-marks
+
–
0
votes
1
answer
253
Compilation Techniques - Annotated Parse Tree
Given the following statement: 6 * (8-3) Make the Annotated Parse Tree based on the translation scheme below. S → B {A.i = B.val} A {S.val = A.s} A → - B {A1.i = A.i - B.val} A1 {A.s = A1.s} A → e {A.s = A.i} B → D {C.i = D.val} C {B.val = C.s} C → * ... = C.i * D.val} C1 {C.s = C1.s} C → e {C.s = C.i} D → ( S ) {D.val = S.val} D → num {D.val = num.val}
Given the following statement: 6 * (8-3)Make the Annotated Parse Tree based on the translation scheme below.S → B {A.i = B.val} A {S.val = A.s}A → - B {A1.i = A.i - B...
Frengky
879
views
Frengky
asked
Feb 11, 2022
Compiler Design
compiler-design
syntax-directed-translation
descriptive
+
–
3
votes
1
answer
254
GATE Overflow Test Series | Mock GATE | Test 6 | Question: 22
The least number of temporary variables required to create a three-address code in static single assignment form for the expression $a * b+c/ d -3 $ is ________
The least number of temporary variables required to create a three-address code in static single assignment form for the expression $a * b+c/ d -3 $ is ________
Arjun
160
views
Arjun
asked
Jan 30, 2022
Compiler Design
go2025-mockgate-6
numerical-answers
compiler-design
intermediate-code
static-single-assignment
1-mark
+
–
2
votes
1
answer
255
GATE Overflow Test Series | Mock GATE | Test 6 | Question: 23
Which of the following statements regarding LR parsers is/are FALSE? (Mark all the appropriate choices) A $\text{LR(0)}$ configuration set cannot have multiple reduced items A $\text{LR(0)}$ configuration set cannot have both shifts ... SHIFT and REDUCE items to be in the same state An $\text{LR(0)}$ parser can parse any regular grammar
Which of the following statements regarding LR parsers is/are FALSE? (Mark all the appropriate choices)A $\text{LR(0)}$ configuration set cannot have multiple reduced ite...
Arjun
239
views
Arjun
asked
Jan 30, 2022
Compiler Design
go2025-mockgate-6
compiler-design
parsing
lr-parser
multiple-selects
1-mark
+
–
2
votes
1
answer
256
GATE Overflow Test Series | Mock GATE | Test 6 | Question: 59
Consider the following program. int x = 10; int main() { x = 1; f(); g(); } void f() { int x = 3; h(); } void g() { x = 2; h(); } void h() { printf("%d\n",x); } If $\alpha$ and $\beta$ are the sum of all the values printed by the above code assuming static and dynamic scoping respectively, then $2\alpha + 3\beta = $ ______
Consider the following program.int x = 10; int main() { x = 1; f(); g(); } void f() { int x = 3; h(); } void g() { x = 2; h(); } void h() { printf("%d\n",x); }If $\alpha$...
Arjun
192
views
Arjun
asked
Jan 30, 2022
Compiler Design
go2025-mockgate-6
numerical-answers
compiler-design
runtime-environment
static-dynamic-scoping
2-marks
+
–
1
votes
1
answer
257
GATE Overflow Test Series | Mock GATE | Test 6 | Question: 61
Consider the following grammar: $S \rightarrow aT$ $T \rightarrow aT \mid \epsilon$ The above grammar is _______ (Mark all the appropriate choices) $\text{LL(1)}$ $\text{SLR(1)}$ $\text{LALR(1)}$ $\text{LR(1)}$
Consider the following grammar:$S \rightarrow aT$$T \rightarrow aT \mid \epsilon$The above grammar is _______ (Mark all the appropriate choices)$\text{LL(1)}$$\text{SLR(1...
Arjun
159
views
Arjun
asked
Jan 30, 2022
Compiler Design
go2025-mockgate-6
compiler-design
parsing
multiple-selects
2-marks
+
–
1
votes
0
answers
258
Compiler Design | Made Easy Test Series
I Believe the answer should be lexical error first as “≤” is not a valid token. Next, “+” and “=” have a space between them, which should throw a syntax error. The solution they have provided is : This should be incorrect as the array in C does not perform out of bound checks. Kindly let me know if I am wrong.
I Believe the answer should be lexical error first as “≤” is not a valid token. Next, “+” and “=” have a space between them, which should throw a syntax err...
palashbehra5
329
views
palashbehra5
asked
Jan 29, 2022
Compiler Design
compiler-design
made-easy-test-series
+
–
0
votes
1
answer
259
parse tree - context-free grammars - TOC
Given a CFG and a string, what is the relation between the number of leftmost derivations, the number of rightmost derivations and the number of parse trees?
Given a CFG and a string, what is the relation between the number of leftmost derivations, the number of rightmost derivations and the number of parse trees?
atulcse
868
views
atulcse
asked
Jan 21, 2022
Theory of Computation
context-free-language
theory-of-computation
compiler-design
finite-automata
+
–
0
votes
2
answers
260
Register Allocation | Made Easy Full Syllabus Test
Given problem and answer : I am getting 3 minimum registers as answer, can anyone verify? here's how I am getting 3 : T1 = r T2 = s T1 = T1 * T2 T2 = t T3 = u T2 = T2 – T3 T1 = T1 * T2 // T2 and T3 are free now T2 = p T3 = q T2 = T2 * T3 T3 = t T2 = T2 + T3 T2 = T1 + T2
Given problem and answer : I am getting 3 minimum registers as answer, can anyone verify?here's how I am getting 3 :T1 = rT2 = sT1 = T1 * T2T2 = tT3 = uT2 = T2 – T3T1 ...
palashbehra5
747
views
palashbehra5
asked
Jan 14, 2022
Compiler Design
register-allocation
made-easy-test-series
compiler-design
+
–
0
votes
1
answer
261
Live Variable Analysis | Made Easy Full Syllabus Test
A variable v is live at a program point p if some path from p to program exit contains an r-value occurrence of v which is not preceded by an l-value occurrence of v . That is, the variable should be referenced before ... zero as from the exit point there are no such definitions, to begin with? This is the solution they have provided :
A variable v is live at a program point p if some path from p to program exit contains an r-value occurrence of v which is not preceded by an l-value occurrence of v . Th...
palashbehra5
1.2k
views
palashbehra5
asked
Jan 11, 2022
Compiler Design
compiler-design
made-easy-test-series
live-variable-analysis
code-optimization
+
–
2
votes
2
answers
262
Self doubt in CLR(1)
if a grammar is CLR(1) with no mergeable states, then it is LALR(1) ? I suppose it is “yes”, am I right?
if a grammar is CLR(1) with no mergeable states, then it is LALR(1) ? I suppose it is “yes”, am I right?
s_dr_13
491
views
s_dr_13
asked
Jan 3, 2022
Compiler Design
compiler-design
parsing
+
–
0
votes
0
answers
263
(Answered) Self doubt about ambiguous grammar
I understand all these following separately : 1) DCFG is always unambiguous 2) Regular grammar is a subset of DCFG 3) Regular grammar can be ambiguous But can't understand how any DCFG is unambiguous if its subset can be ambiguous
I understand all these following separately :1) DCFG is always unambiguous2) Regular grammar is a subset of DCFG3) Regular grammar can be ambiguousBut can't understand ho...
o
698
views
o
asked
Jan 2, 2022
Compiler Design
self-doubt
theory-of-computation
compiler-design
+
–
0
votes
0
answers
264
Mad-Easy Test-Series
Anyone please explain this .
Anyone please explain this .
raja11sep
415
views
raja11sep
asked
Dec 31, 2021
Compiler Design
compiler-design
optimization
+
–
1
votes
1
answer
265
Test series Made easy
How to solve this ? Please help.
How to solve this ? Please help.
raja11sep
656
views
raja11sep
asked
Dec 31, 2021
Compiler Design
compiler-design
grammar
context-free-grammar
ll-parser
descriptive
made-easy-test-series
+
–
0
votes
2
answers
266
Made Easy test series
SR conflict in LR(0) and SLR(1) will always be equal for some context free grammar?
SR conflict in LR(0) and SLR(1) will always be equal for some context free grammar?
Nitesh_Yadav
1.2k
views
Nitesh_Yadav
asked
Dec 22, 2021
Compiler Design
compiler-design
made-easy-test-series
parsing
+
–
0
votes
1
answer
267
Made Easy Test
How to approach such questions ?
How to approach such questions ?
Prasad Deshmukh
339
views
Prasad Deshmukh
asked
Dec 21, 2021
Compiler Design
compiler-design
code-optimization
made-easy-test-series
+
–
1
votes
1
answer
268
Made easy test
i=10 j=1 a=i*j b=i+j if a<=b goto 3 else goto 8 a=a+1 i=i-1 goto 2 Include start and end nodes Find the number of nodes and edges in the control flow graph of the above code?
i=10j=1a=i*jb=i+jif a<=b goto 3else goto 8a=a+1i=i-1 goto 2 Include start and end nodes Find the number of nodes and edges in the control flow graph of the...
samarpita
2.0k
views
samarpita
asked
Dec 14, 2021
Compiler Design
compiler-design
intermediate-code
made-easy-test-series
+
–
Page:
« prev
1
...
4
5
6
7
8
9
10
11
12
13
14
...
67
next »
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register