Crack
GATE
C
G
Topic
Syntax-Directed Translation
Compiler Design
0
/ 8 done
Questions per paper
All
MCQ
MSQ
NAT
2015 to 2026. Point at a year to read it.
0
1
2015
2019
2021
2023
2025
2026
Show as a table
Year
All
MCQ
MSQ
NAT
2015
0
0
0
0
2018
0
0
0
0
2019
0
0
0
0
2020
1
1
0
0
2021
0.5
0.5
0
0
2022
1
0
0
1
2023
1
0
0
1
2024
1
0.5
0.5
0
2025
0.5
0.5
0
0
2026
0.5
0
0.5
0
1
CS 2026 Set 1 · 2 marks · MSQ · Hard
Consider the following two syntax-directed definitions
S
D
D
1
\mathrm{SDD1}
SDD1
and
S
D
D
2
\mathrm{SDD2}
SDD2
for type declarations.
2
CS 2025 Set 2 · 1 mark · MCQ · Moderate
Given the following syntax directed translation rules:
3
CS 2024 Set 1 · 2 marks · MCQ · Easy
Consider the following syntax-directed definition (SDD).
4
CS 2024 Set 2 · 1 mark · MSQ · Moderate
Which of the following statements is/are FALSE?
5
CS 2023 · 2 marks · NAT · Moderate
Consider the syntax directed translation given by the following grammar and semantic rules. Here
N
N
N
,
I
I
I
,
F
F
F
and
B
B
B
are non-terminals.
N
N
N
is the starting non-terminal, and
#
\#
#
,
0
0
0
and
1
1
1
are lexical tokens corresponding to input letters “
#
\#
#
”, “
0
0
0
” and “
1
1
1
”, respectively.
X
.
v
a
l
X.\mathrm{val}
X
.
val
denotes the synthesized attribute (a numeric value) associated with a non-terminal
X
X
X
.
I
1
I_1
I
1
and
F
1
F_1
F
1
denote occurrences of
I
I
I
and
F
F
F
on the right hand side of a production, respectively. For the tokens
0
0
0
and
1
1
1
,
0.
v
a
l
=
0
0.\mathrm{val} = 0
0.
val
=
0
and
1.
v
a
l
=
1
1.\mathrm{val} = 1
1.
val
=
1
.
6
CS 2022 · 2 marks · NAT · Moderate
Consider the following grammar along with translation rules.
7
CS 2021 Set 1 · 2 marks · MCQ · Moderate
Consider the following grammar (that admits a series of declarations, followed by expressions) and the associated syntax directed translation (SDT) actions, given as pseudo-code:
8
CS 2020 · 2 marks · MCQ · Easy
Consider the productions
A
→
P
Q
A \rightarrow PQ
A
→
P
Q
and
A
→
X
Y
A \rightarrow XY
A
→
X
Y
. Each of the five non-terminals A, P, Q, X, and Y has two attributes:
s
s
s
is a synthesized attribute, and
i
i
i
is an inherited attribute. Consider the following rules.