Login
Register
Dark Mode
Brightness
Ambient Glow – Questions list
Register
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Recent questions tagged compiler
1
1 vote
0
0 answers
162
162 views
Neso Academy Lectures | Compiler Design | LR Parsing
We know that the class of languages of LR(0), SLR(1), LALR(1), CLR(1) is the class of DCFLs, with the only exception being that...An LR(0) language is a DCFL that has the...
Tin_ku
162
views
asked
Aug 2
Compiler Design
compiler
compiler-design
parsing
lr-parser
grammar
+
–
0
0 votes
1
1 answer
144
144 views
UGC NET CSE | December 2025 | Part 2 | Question: 50
A phase of a compiler which produce the symbol table isSyntax analysisSemantic analysisTarget code generationCode optimization
Shubham Sharma 2
144
views
asked
Apr 19
Compiler Design
ugcnetcse-dec2025
compiler
compiler-design
syntax-analysis
semantic-analysis
+
–
0
0 votes
1
1 answer
146
146 views
UGC NET CSE | December 2025 | Part 2 | Question: 54
Arrange the following tasks of Lexical Analyzer in correct sequence:Token Generation.Removal of comments/White sphere.Buffering and reading source characters.Return token...
Shubham Sharma 2
146
views
asked
Apr 19
Compiler Design
ugcnetcse-dec2025
compiler
lexical-analysis
+
–
1
1 vote
1
1 answer
119
119 views
UGC NET CSE | December 2025 | Part 2 | Question: 57
Match the LIST-I with LIST-IILIST-IInputLIST-IICompiler PhaseA.Syntax TreeI.Code GeneratorB.Character StreamII.Syntax AnalyzerC.Intermediate RepresentationIII.Semantic An...
Shubham Sharma 2
119
views
asked
Apr 19
Compiler Design
ugcnetcse-dec2025
compiler
compiler-design
syntax-tree
lexical-analysis
syntax-analyzer
semantic-analyzer
code-generation
analysis
+
–
0
0 votes
0
0 answers
165
165 views
LR(1) PARSER COMPILER DESIGN
Isnt this answer wrongI4 stateC - d., a | d there shouldnt be any $https://gateoverflow.in/?qa=blob&qa_blobid=5254677790122576834
souled
165
views
asked
Mar 18
Compiler Design
compiler
compiler-design
lr-parser
+
–
2
2 votes
3
3 answers
559
559 views
GO Classes DPP | COMPILER|LA
A lexical analyzer is designed for a new language with the following rules for token generation:$\mathrm{KEYWORD1}: \verb|if|$ $\mathrm{KEYWORD2}: \verb|iff|$ $\mathrm{ID...
GO Classes
559
views
asked
Feb 4
Compiler Design
goclasses
compiler
goclasses-cs-dpp
goclasses-cs-dpp-day-191
goclasses-compiler-practice-questions
multiple-selects
+
–
2
2 votes
5
5 answers
566
566 views
GO Classes DPP | COMPILER|GRAMMAR
Consider the following arammar $G$ :$$\begin{aligned}& S \rightarrow(L) \mid a \\& L \rightarrow L, S \mid S\end{aligned}$$Which of the following statement(s) is/are TRUE...
GO Classes
566
views
asked
Feb 4
Compiler Design
goclasses
compiler
goclasses-cs-dpp
goclasses-cs-dpp-day-191
goclasses-compiler-practice-questions
multiple-selects
+
–
5
5 votes
2
2 answers
306
306 views
GO Classes DPP | COMPILER|BOTTOM-UP PARSER
Consider a Bottom-Up parser for a grammar $G$. During the parsing of an input string $w$, the parser reaches a configuration where the stack contains the prefix $\alpha$ ...
GO Classes
306
views
asked
Feb 4
Compiler Design
goclasses
compiler
goclasses-cs-dpp
goclasses-cs-dpp-day-191
goclasses-compiler-practice-questions
+
–
2
2 votes
2
2 answers
317
317 views
GO Classes DPP | COMPILER|LA
Which of the following statement(s) is/are TRUE regarding Lexical Analysis and Regular Expressions?The number of states in a minimal Deterministic Finite Automaton (DFA) ...
GO Classes
317
views
asked
Feb 4
Compiler Design
goclasses
compiler
goclasses-cs-dpp
goclasses-cs-dpp-day-191
goclasses-compiler-practice-questions
+
–
1
1 vote
2
2 answers
307
307 views
GO Classes DPP | COMPILER|SDT
Consider the following Syntax Directed Translation (SDT) scheme where $S$ is the start symbol and $id.\mathrm{val}$ represents the numerical value of an identifier:$$\beg...
GO Classes
307
views
asked
Feb 4
Compiler Design
goclasses
compiler
goclasses-cs-dpp
goclasses-cs-dpp-day-191
goclasses-compiler-practice-questions
multiple-selects
+
–
1
1 vote
2
2 answers
375
375 views
GO Classes DPP | COMPILER|LA
A lexical analyzer for a specific language identifies tokens using the following regular expressions:$$\begin{aligned}& L_1: a(a \mid b)^* \\& L_2: a b(a \mid b)^* \\& L_...
GO Classes
375
views
asked
Jan 31
Compiler Design
goclasses
compiler
goclasses-cs-dpp
goclasses-cs-dpp-day-189
goclasses-compiler-practice-questions
+
–
1
1 vote
1
1 answer
296
296 views
GO Classes DPP | COMPILER|DEAD CODE ELIMINATION
Consider the following basic block of intermediate code:1. a = 10 2. b = a + 5 3. c = b * 2 4. a = c - b 5. d = a + bAssuming that only the variable $\verb|d|$ is "live" ...
GO Classes
296
views
asked
Jan 31
Compiler Design
goclasses
compiler
goclasses-cs-dpp
goclasses-cs-dpp-day-189
goclasses-compiler-practice-questions
+
–
2
2 votes
2
2 answers
292
292 views
GO Classes DPP | COMPILER|SDT
Consider the following L-attributed Syntax Directed Definition (SDD). $S$ is the start symbol, and S.val is a synthesized attribute. A.inh is an inherited attribute.$S \r...
GO Classes
292
views
asked
Jan 31
Compiler Design
goclasses
compiler
goclasses-cs-dpp
goclasses-cs-dpp-day-189
goclasses-compiler-practice-questions
+
–
1
1 vote
1
1 answer
272
272 views
GO Classes DPP | COMPILER|CODE OPTIMIZATION
In the context of Code Optimization, consider the following code segment inside a loop:for (i = 0; i < n; i++) { x = y + z; a[i] = 2 * i + x; }Moving the statemen...
GO Classes
272
views
asked
Jan 31
Compiler Design
goclasses
compiler
goclasses-cs-dpp
goclasses-cs-dpp-day-189
goclasses-compiler-practice-questions
+
–
2
2 votes
3
3 answers
345
345 views
GO Classes DPP | COMPILER|SDT
Consider the following syntax-directed translation scheme (SDTS) where $S$ is the start symbol:$$\begin{aligned}& S \rightarrow E\{\text { print }(\text { E.val })\} \\& ...
GO Classes
345
views
asked
Jan 31
Compiler Design
goclasses
compiler
goclasses-cs-dpp
goclasses-cs-dpp-day-189
goclasses-compiler-practice-questions
+
–
2
2 votes
1
1 answer
301
301 views
GO Classes DPP | COMPILER|LR PARSER
Consider the following grammar $g$ :$$\begin{gathered}s \rightarrow l=r \mid r \\l \rightarrow * r \mid i d \\r \rightarrow l\end{gathered}$$Which of the following statem...
GO Classes
301
views
asked
Jan 29
Compiler Design
goclasses
compiler
goclasses-cs-dpp
goclasses-cs-dpp-day-187
goclasses-compiler-practice-questions
multiple-selects
+
–
1
1 vote
1
1 answer
264
264 views
GO Classes DPP | COMPILER|CSE
Consider the following basic block of three-address code:$\mathrm{t 1=a+b}$ $\mathrm{t 2=c* d}$ $\mathrm{t} 3=\mathrm{t} 1+\mathrm{t} 2$ $\mathrm{a=t 3}$ $\mathrm{t 4=c*d...
GO Classes
264
views
asked
Jan 29
Compiler Design
goclasses
compiler
goclasses-cs-dpp
goclasses-cs-dpp-day-187
goclasses-compiler-practice-questions
+
–
2
2 votes
1
1 answer
287
287 views
GO Classes DPP | COMPILER|LEXICAL ANALYZER
Consider the following regular expression over the alphabet $\{a, b\}$ used for a lexical analyzer token definition:$$R=(a+b)^*(a a+b b)(a+b)^*$$Which of the following de...
GO Classes
287
views
asked
Jan 29
Compiler Design
goclasses
compiler
goclasses-cs-dpp
goclasses-cs-dpp-day-187
goclasses-compiler-practice-questions
+
–
1
1 vote
2
2 answers
292
292 views
GO Classes DPP | COMPILER|SDT
Consider the following SDT scheme used to evaluate an expression. The synthesized attribute $\mathrm{val}$ stores the numerical value.\[\begin{aligned}E &\rightarrow E_1 ...
GO Classes
292
views
asked
Jan 29
Compiler Design
goclasses
compiler
goclasses-cs-dpp
goclasses-cs-dpp-day-187
goclasses-compiler-practice-questions
numerical-answers
+
–
2
2 votes
1
1 answer
276
276 views
GO Classes DPP | COMPILER|LL(1) PARSER
Consider the following grammar $G$ with terminal set $\Sigma=\{a, b, c, d\}$ and non-terminal set $V=\{S, A, B\}$ :$$\begin{gathered}S \rightarrow a A b \mid b B a \\A \r...
GO Classes
276
views
asked
Jan 29
Compiler Design
goclasses
compiler
goclasses-cs-dpp
goclasses-cs-dpp-day-187
goclasses-compiler-practice-questions
multiple-selects
+
–
0
0 votes
1
1 answer
335
335 views
GO Classes DPP | COMPILER|CODE OPTIMIZATION
Consider the following sequence of three-address code (TAC) instructions:1. i = 1 2. j = 1 3. t1 = 5 * i 4. t2 = t1 + j 5. a[t2] = 0 6. j = j + 1 7. if j <= 5 goto (3) 8....
GO Classes
335
views
asked
Jan 27
Compiler Design
goclasses
compiler
goclasses-cs-dpp
goclasses-cs-dpp-day-185
goclasses-compiler-practice-questions
+
–
2
2 votes
2
2 answers
332
332 views
GO Classes DPP | COMPILER|PARSING
Consider the following grammar $G$ with start symbol $S$ :$$\begin{aligned}& S \rightarrow L=R \\& S \rightarrow R \\& L \rightarrow * R \\& L \rightarrow i d . \\& R \ri...
GO Classes
332
views
asked
Jan 27
Compiler Design
goclasses
compiler
goclasses-cs-dpp
goclasses-cs-dpp-day-185
goclasses-compiler-practice-questions
+
–
0
0 votes
1
1 answer
302
302 views
GO Classes DPP | COMPILER|LIVE VARIABLE ANALYSIS
Consider the following basic block of Three-Address Code:1. a = 1 2. b = a + 1 3. c = a + b 4. a = c + b 5. return aA variable is live at a point if its current value wil...
GO Classes
302
views
asked
Jan 27
Compiler Design
goclasses
compiler
goclasses-cs-dpp
goclasses-cs-dpp-day-185
goclasses-compiler-practice-questions
+
–
1
1 vote
2
2 answers
290
290 views
GO Classes DPP | COMPILER|SDT
Consider the following Syntax-Directed Translation (SDT) scheme with the grammar rules and actions provided below:$$\begin{aligned}& S \rightarrow S_1 \# T\left\{S . \mat...
GO Classes
290
views
asked
Jan 27
Compiler Design
goclasses
compiler
goclasses-cs-dpp
goclasses-cs-dpp-day-185
goclasses-compiler-practice-questions
numerical-answers
+
–
2
2 votes
3
3 answers
368
368 views
GO Classes DPP | COMPILER|LEXICAL ANALYZER
Consider the following lexical specification for a scanner:$\mathrm{KEYWORD\_IF: \verb|if|}$ $\mathrm{ID: [a-z][0-9]*}$ $\mathrm{NUM: [0-9]+}$ The scanner follows the Lon...
GO Classes
368
views
asked
Jan 27
Compiler Design
goclasses
compiler
goclasses-cs-dpp
goclasses-cs-dpp-day-185
goclasses-compiler-practice-questions
numerical-answers
+
–
1
1 vote
1
1 answer
258
258 views
GO Classes DPP | COMPILER|CODE OPTIMIZATION
Consider the following three-address code sequence used for a loop:i = 0 L1: t1 = i * 4 t2 = base + t1 val = load t2 i = i + 1 if i < 100 goto L1Which optimization techni...
GO Classes
258
views
asked
Jan 23
Compiler Design
goclasses
compiler
goclasses-cs-dpp
goclasses-cs-dpp-day-183
goclasses-compiler-practice-questions
+
–
1
1 vote
1
1 answer
255
255 views
GO Classes DPP | COMPILER|LR(1) PARSER
An $\mathrm{LR(1)}$ parser is being constructed for a grammar. If a particular state in the corresponding $\mathrm{LR}(1)$ canonical collection contains the item $[A \rig...
GO Classes
255
views
asked
Jan 23
Compiler Design
goclasses
compiler
goclasses-cs-dpp
goclasses-cs-dpp-day-183
goclasses-compiler-practice-questions
+
–
1
1 vote
2
2 answers
252
252 views
GO Classes DPP | COMPILER|DAG
In a compiler's optimization phase, a Directed Acyclic Graph (DAG) is often used instead of a standard syntax tree to represent expressions. Consider the expression: $a=(...
GO Classes
252
views
asked
Jan 23
Compiler Design
goclasses
compiler
goclasses-cs-dpp
goclasses-cs-dpp-day-183
goclasses-compiler-practice-questions
numerical-answers
+
–
0
0 votes
1
1 answer
279
279 views
GO Classes DPP | COMPILER|SYNTAX TREE
Consider a syntax tree for the expression $a+b * c-d / e$. If the expression is evaluated using a post-order traversal of this tree, and the values at the leaves are $a=2...
GO Classes
279
views
asked
Jan 23
Compiler Design
goclasses
compiler
goclasses-cs-dpp
goclasses-cs-dpp-day-183
goclasses-compiler-practice-questions
numerical-answers
+
–
1
1 vote
1
1 answer
235
235 views
GO Classes DPP | COMPILER|EXPRESSION EVALUATION
Consider the expression tree shown below. Each leaf represents a numerical value, which can be chosen from the set $\{-1,1\}$. Over all possible choices of the values at ...
GO Classes
235
views
asked
Jan 23
Compiler Design
goclasses
compiler
goclasses-cs-dpp
goclasses-cs-dpp-day-183
goclasses-compiler-practice-questions
numerical-answers
+
–
Page:
1
2
3
4
5
next »