Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Search results for compiler
0
votes
0
answers
61
Compiler Design compiler design tcompiler-design-timothy-g-griffin
Q4. Generate target code for the following source language statements : x = a + b + c * (d-e)
Q4. Generate target code for the following source language statements : x = a + b + c * (d-e)
Ebrahim
70
views
Ebrahim
asked
May 5
Compiler Design
compiler-design
syntax-directed-translation
ullman
lexical-analysis
parsing
+
–
0
votes
0
answers
62
Compiler Design compiler design tcompiler-design-timothy-g-griffin
Q2. Implement the statement a:= -b + c*(d-e) + f * (c*(d-e)) into following Intermediate code representation. a) Quadruple b) Triple c) Indirect Triple Solve the above Question like this example
Q2. Implement the statement a:= -b + c*(d-e) + f * (c*(d-e)) into following Intermediate code representation. a) Quadrupleb) Triple c) Indirect Triple Solve the abov...
Ebrahim
52
views
Ebrahim
asked
May 5
Compiler Design
compiler-design
syntax-directed-translation
lexical-analysis
parsing
ullman
+
–
10
votes
4
answers
63
GATE CSE 2021 Set 2 | Question: 13
In the context of compilers, which of the following is/are $\text{NOT}$ an intermediate representation of the source program? Three address code Abstract Syntax Tree $\text{(AST)}$ Control Flow Graph $\text{(CFG)}$ Symbol table
In the context of compilers, which of the following is/are $\text{NOT}$ an intermediate representation of the source program?Three address codeAbstract Syntax Tree $\text...
Arjun
7.0k
views
Arjun
asked
Feb 18, 2021
Compiler Design
gatecse-2021-set2
multiple-selects
compiler-design
intermediate-code
1-mark
+
–
0
votes
0
answers
64
exam 2011
Use the semantic rules below to draw an annotated parse tree for the expression. Compute the final value. (4*2)+3+(3*3+2)n
Use the semantic rules below to draw an annotated parse tree for the expression. Compute the final value. (4*2)+3+(3*3+2)n
Mokoena
71
views
Mokoena
asked
Apr 29
Compiler Design
compiler-design
parsing
numerical-answers
+
–
0
votes
1
answer
65
FIRST & FOLLOR
S -> A B A -> f S f A -> b b B d B -> Ɛ B -> c First(S) = First(A) = First(B) = Follow(S) = Follow(A) = Follow(B) =
S - A BA - f S fA - b b B dB - ƐB - cFirst(S) =First(A) =First(B) =Follow(S) =Follow(A) =Follow(B) =
Ana_101
101
views
Ana_101
asked
Apr 19
Compiler Design
first-and-follow
compiler-design
parsing
first-order-logic
descriptive
+
–
35
votes
4
answers
66
GATE CSE 2014 Set 3 | Question: 17
One of the purposes of using intermediate code in compilers is to make parsing and semantic analysis simpler. improve error recovery and error reporting. increase the chances of reusing the machine-independent code optimizer in other compilers. improve the register allocation.
One of the purposes of using intermediate code in compilers is tomake parsing and semantic analysis simpler.improve error recovery and error reporting.increase the chance...
go_editor
9.6k
views
go_editor
asked
Sep 28, 2014
Compiler Design
gatecse-2014-set3
compiler-design
intermediate-code
easy
+
–
56
votes
7
answers
67
GATE CSE 2005 | Question: 83a
Statement for Linked Answer Questions 83a & 83b: Consider the following expression grammar. The semantic rules for expression evaluation are stated next to each grammar production. ... a reduce action It detects shift-reduce conflict, and resolves the conflict in favor of a reduce over a shift action
Statement for Linked Answer Questions 83a & 83b:Consider the following expression grammar. The semantic rules for expression evaluation are stated next to each grammar pr...
Kathleen
20.8k
views
Kathleen
asked
Sep 22, 2014
Compiler Design
gatecse-2005
compiler-design
parsing
difficult
+
–
17
votes
3
answers
68
GATE CSE 2019 | Question: 19
Consider the grammar given below: $S \rightarrow Aa$ $A \rightarrow BD$ $B \rightarrow b \mid \epsilon $ $D \rightarrow d \mid \epsilon $ Let $a,b,d$ and $\$ be indexed as follows:$\begin{array}{|l|l|l|l|} \hline a & b & d & \$ \ ... $)$ , then the answer should be $3210$)
Consider the grammar given below:$S \rightarrow Aa$$A \rightarrow BD$$B \rightarrow b \mid \epsilon $$D \rightarrow d \mid \epsilon $Let $a,b,d$ and $\$$ be indexed as fo...
Arjun
20.5k
views
Arjun
asked
Feb 7, 2019
Compiler Design
gatecse-2019
numerical-answers
compiler-design
parsing
1-mark
first-and-follow
+
–
4
votes
0
answers
69
GO Classes Test Series 2024 | Mock GATE | Test 14 | Question: 53
The grammar shown below is LL(k) for some value of k. What is the smallest value of k for which this grammar is LL(k)?
The grammar shown below is LL(k) for some value of k. What is the smallest value of k for which this grammar is LL(k)?
GO Classes
986
views
GO Classes
asked
Feb 5
Compiler Design
goclasses2024-mockgate-14
numerical-answers
compiler-design
parsing
ll-parser
2-marks
+
–
19
votes
2
answers
70
GATE CSE 2006 | Question: 60
Consider the following C code segment. for (i = 0, i < n; i++) { for (j = 0; j < n; j++) { if (i%2) { x += (4*j + 5*i); y += (7 + 4*j); } } } Which one of the following is false? ... computation There is scope of common sub-expression elimination in this code There is scope of strength reduction in this code There is scope of dead code elimination in this code
Consider the following C code segment. for (i = 0, i < n; i++) { for (j = 0; j < n; j++) { if (i%2) { x += (4*j + 5*i); y += (7 + 4*j); } } }Which one of the following is...
Rucha Shelke
10.3k
views
Rucha Shelke
asked
Sep 26, 2014
Compiler Design
gatecse-2006
compiler-design
code-optimization
+
–
2
votes
1
answer
71
GATE CSE 2024 | Set 2 | Question: 19
Which of the following statements is/are FALSE? An attribute grammar is a syntax-directed definition $\text{(SDD)}$ in which the functions in the semantic rules have no side effects The attributes in a $\text{L}$-attributed definition ... $\text{L}$-attributed definitions based on $\text{LR(1)}$ grammar can be evaluated using a bottom-up parsing strategy
Which of the following statements is/are FALSE?An attribute grammar is a syntax-directed definition $\text{(SDD)}$ in which the functions in the semantic r...
Arjun
2.9k
views
Arjun
asked
Feb 16
Compiler Design
gatecse2024-set2
compiler-design
syntax-directed-translation
multiple-selects
+
–
2
votes
1
answer
72
GO Classes Test Series 2024 | Mock GATE | Test 14 | Question: 26
Which attributes in the following grammar are synthesized? A.a B.b B.x C.c
Which attributes in the following grammar are synthesized?A.aB.bB.xC.c
GO Classes
888
views
GO Classes
asked
Feb 5
Compiler Design
goclasses2024-mockgate-14
compiler-design
syntax-directed-translation
multiple-selects
1-mark
+
–
18
votes
3
answers
73
GATE CSE 2021 Set 1 | Question: 26
Consider the following grammar (that admits a series of declarations, followed by expressions) and the associated syntax directed translation $\text{(SDT)}$ ... used to type-check syntactically correct boolean variable declarations and boolean expressions. The actions will lead to an infinite loop
Consider the following grammar (that admits a series of declarations, followed by expressions) and the associated syntax directed translation $\text{(SDT)}$ acti...
Arjun
10.7k
views
Arjun
asked
Feb 18, 2021
Compiler Design
gatecse-2021-set1
compiler-design
syntax-directed-translation
2-marks
+
–
4
votes
1
answer
74
GO Classes Test Series 2024 | Mock GATE | Test 11 | Question: 54
Consider the following grammar given below. ... the last character of the string: $a^* b($ $\operatorname{CC}($ $\mathrm{BC}($ $\mathrm{CB}$ $\mathrm{BB}$
Consider the following grammar given below.$$\begin{aligned}& A \rightarrow B+A \\& A \rightarrow B \\& B \rightarrow C B \\& B \rightarrow C \\& C \rightarrow D^* \\& C ...
GO Classes
843
views
GO Classes
asked
Jan 13
Compiler Design
goclasses2024-mockgate-11
goclasses
compiler-design
parsing
lr-parser
2-marks
+
–
0
votes
0
answers
75
BARC 2024 CSE
Number of nodes in the DAG(Directed Acyclic Graph) representing (a+b)+c+(a+b)
Number of nodes in the DAG(Directed Acyclic Graph) representing (a+b)+c+(a+b)
Ayanava Dutta
214
views
Ayanava Dutta
asked
Mar 17
Compiler Design
normal
directed-acyclic-graph
compiler-design
+
–
4
votes
1
answer
76
GO Classes Test Series 2024 | Mock GATE | Test 14 | Question: 52
Consider the following given grammar and the parse tree for the sentence $x + y * z.$ The first reduction made by the shift-reduce parser is labeled as 1, and we keep labeling in the same increasing order, such that the 8th (here, the ... labeled 3. $T \rightarrow T^* P$ will be labeled 6. $T \rightarrow T^* P$ will be labeled 7.
Consider the following given grammar and the parse tree for the sentence $x + y * z.$The first reduction made by the shift-reduce parser is labeled as 1, and we keep labe...
GO Classes
346
views
GO Classes
asked
Feb 5
Compiler Design
goclasses2024-mockgate-14
compiler-design
parsing
2-marks
+
–
57
votes
2
answers
77
GATE CSE 2015 Set 1 | Question: 50
A variable $x$ is said to be live at a statement $s_{i}$ in a program if the following three conditions hold simultaneously: There exists a statement $S_{j}$ that uses $x$ There is a path from $S_{i}$ to $S_{j}$ in the flow graph corresponding to the program The path ... above control flow graph are $\text{p, s, u}$ $\text{r, s, u}$ $\text{r, u}$ $\text{q, v}$
A variable $x$ is said to be live at a statement $s_{i}$ in a program if the following three conditions hold simultaneously:There exists a statement $S_{j}$ that uses $x$...
makhdoom ghaya
26.5k
views
makhdoom ghaya
asked
Feb 13, 2015
Compiler Design
gatecse-2015-set1
compiler-design
live-variable-analysis
normal
+
–
0
votes
1
answer
78
GATE CSE 2024 | Set 1 | Question: 28
Consider the following grammar $G$, with $S$ as the start symbol. The grammar $G$ has three incomplete productions denoted by $(1), (2)$, and $(3)$ ... $R \rightarrow c R$ (1) $S \rightarrow R f$ (2) $T \rightarrow c T$ (3) $R \rightarrow c R$
Consider the following grammar $G$, with $S$ as the start symbol. The grammar $G$ has three incomplete productions denoted by $(1), (2)$, and $(3)$.$$\begin{aligned} & S ...
Arjun
2.0k
views
Arjun
asked
Feb 16
Compiler Design
gatecse2024-set1
compiler-design
first-and-follow
+
–
5
votes
1
answer
79
GO Classes Test Series 2024 | Mock GATE | Test 12 | Question: 34
$ \begin{aligned} & S \rightarrow S1 \;T \\ & S 1 \rightarrow a \mid(S S) \\ & T \rightarrow \varepsilon \mid b \;T \end{aligned} $ In the $\text{LL(1)}$ parser table, $M$ ... $\{T \rightarrow \varepsilon\}$ $\{S 1 \rightarrow a\}$ and $\{T \rightarrow \varepsilon\}$
$$\begin{aligned}& S \rightarrow S1 \;T \\& S 1 \rightarrow a \mid(S S) \\& T \rightarrow \varepsilon \mid b \;T\end{aligned}$$In the $\text{LL(1)}$ parser table, $M$, of...
GO Classes
506
views
GO Classes
asked
Jan 21
Compiler Design
goclasses2024-mockgate-12
goclasses
compiler-design
parsing
ll-parser
2-marks
+
–
5
votes
1
answer
80
GO Classes Test Series 2024 | Mock GATE | Test 12 | Question: 2
Consider the following grammar- ... $\text{Follow(T)}$ are same. $\operatorname{First}(\mathrm{A})$ and $\operatorname{First}(\mathrm{T})$ are same.
Consider the following grammar-$$\begin{aligned}& S \rightarrow b T \\& T \rightarrow A b \mid B a \\& A \rightarrow a S \mid C B \\& B \rightarrow b D \\& C \rightarrow ...
GO Classes
664
views
GO Classes
asked
Jan 21
Compiler Design
goclasses2024-mockgate-12
goclasses
compiler-design
parsing
first-and-follow
multiple-selects
1-mark
+
–
Page:
« prev
1
2
3
4
5
next »
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register