Web Page

Lexical analysis, Parsing, Syntax-directed translation, Runtime environments, Intermediate code generation.

$$\scriptsize{\overset{{\large{\textbf{Mark Distribution in Previous GATE}}}}{\begin{array}{|c|c|c|c|c|c|c|c|}\hline
\textbf{Year}& \textbf{2024-1} & \textbf{2024-2} & \textbf{2023} & \textbf{2022} & \textbf{2021-1}&\textbf{2021-2}&\textbf{Minimum}&\textbf{Average}&\textbf{Maximum}
\\\hline\textbf{1 Mark Count} &2&2&1 & 2&1&2&1&1.67&2
\\\hline\textbf{2 Marks Count} &4&3&3 & 1 &3&2&1&2.67&4
\\\hline\textbf{Total Marks} &10&8&7 & 4&7&6&\bf{4}&\bf{7}&\bf{10}\\\hline
\end{array}}}$$

Previous GATE Questions in Compiler Design

#161
4.0k
views
2 answers
22 votes
An identifier in a programming language consists of up to six letters and digits of which the first character must be a letter. Derive a regular expression for the identi...
#162
4.5k
views
4 answers
12 votes
Let $G_1 = (N, T, P, S_1)$ be a CFG where, $N=\{S_1, A, B\},T=\{a, b\}$ and $P$ is given by$$\begin{array}{l|l}S_1 \rightarrow a S_1 b &S_1 \rightarrow a B b \\S_1 \right...
#163
7.2k
views
2 answers
26 votes
Consider the grammarS $\rightarrow Aa \mid b$A $\rightarrow Ac \mid Sd \mid \epsilon$Construct an equivalent grammar with no left recursion and with minimum number of pr...
#164
9.0k
views
1 answers
28 votes
Faster access to non-local variables is achieved using an array of pointers to activation records called a stackheapdisplayactivation tree
#165
6.0k
views
2 answers
18 votes
A linker reads four modules whose lengths are $200, 800, 600$ and $500$ words, respectively. If they are loaded in that order, what are the relocation constants?$0, 200, ...
#166
14.2k
views
2 answers
46 votes
Type checking is normally done duringlexical analysissyntax analysissyntax directed translationcode optimization
#167
12.9k
views
2 answers
24 votes
Which of the following statements is true?SLR parser is more powerful than LALRLALR parser is more powerful than Canonical LR parserCanonical LR parser is more powerful t...
#168
9.6k
views
3 answers
26 votes
In a resident – OS computer, which of the following systems must reside in the main memory under all situations?AssemblerLinkerLoaderCompiler
#169
29.0k
views
5 answers
36 votes
The following code segment is executed on a processor which allows only register operands in its instructions. Each instruction can have atmost two source operands and on...
#170
13.5k
views
4 answers
53 votes
Consider the following two sets of $\textsf{LR(1)}$ items of an $\textsf{LR(1)}$ grammar.$$\begin{array}{l|l}X \rightarrow c.X, c∕d &X → c.X, \$\\X \rightarrow .cX, c...
#171
6.0k
views
1 answers
13 votes
What will be the output of the following program assuming that parameter passing iscall by valuecall by referencecall by copy restoreprocedure P{x, y, z}; begin y:y+1; z:...
#172
1.8k
views
0 answers
2 votes
Let synthesized attribute val give the value of the binary number generated by S in the following grammar. For example, on input 101.101, S.val = 5.625.$S \rightarrow L.L...
#173
9.9k
views
2 answers
28 votes
A grammar that is both left and right recursive for a non-terminal, isAmbiguousUnambiguousInformation is not sufficient to decide whether it is ambiguous or unambiguousNo...
#174
7.2k
views
4 answers
5 votes
The number of tokens in the FORTRAN statement DO 10 I = 1.25 is345None of the above
#175
23.7k
views
6 answers
21 votes
Which of the following is the most powerful parsing method?LL (1)Canonical LRSLRLALR
#176
35.7k
views
13 answers
83 votes
What is the maximum number of reduce moves that can be taken by a bottom-up parser for a grammar with no epsilon and unit-production (i.e., of type $A \rightarrow \epsilo...
#177
20.9k
views
7 answers
56 votes
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...
#178
15.8k
views
2 answers
24 votes
Consider the grammar:$$S \rightarrow (S) \mid a$$Let the number of states in SLR (1), LR(1) and LALR(1) parsers for the grammar be $n_1, n_2$ and $n_3$ respectively. The ...
#179
16.8k
views
5 answers
34 votes
Consider the grammar:$$E \rightarrow E + n \mid E \times n \mid n$$For a sentence $n + n \times n$, the handles in the right-sentential form of the reduction are:$n, E + ...
#180
24.0k
views
4 answers
37 votes
The grammar $A \rightarrow AA \mid (A) \mid \epsilon$ is not suitable for predictive-parsing because the grammar is:ambiguousleft-recursiveright-recursivean operator-gram...