1
GATE CSE 2022
Numerical
+1
-0.33
Consider the following grammar along with translation rules.
S $$\to$$ S1 # T {S.val = S1.val * T.val}
S $$\to$$ T {S.val = T.val}
T $$\to$$ T1 %R {T.val = T1.val $$ \div $$ R.val}
T $$\to$$ R {T.val = R.val}
R $$\to$$ id {R.val = id.val}
Here # and % are operators and id is a token that represents an integer and id.val represents the corresponding integer value. The set of non-terminals is {S, T, R, P} and a subscripted non-terminal indicates an instance of the non-terminal. Using this translation scheme, the computed value of S.val for root of the parse tree for the expression 20#10%5#8%2%2 is ___________.
Your input ____
2
GATE CSE 2016 Set 1
Numerical
+1
-0
Consider the following code segment.
x = u - t;
y = x * v;
x = y + w;
y = t - z;
y = x * y;
The minimum number of total variables required to convert the above code segment to static
single assignment form is .Your input ____
3
GATE CSE 2015 Set 2
MCQ (Single Correct Answer)
+1
-0.3
In the context of abstract-syntax-tree $$(AST)$$ and control-flow-graph $$(CFG),$$ which one of the following is TRUE?
4
GATE CSE 2014 Set 3
MCQ (Single Correct Answer)
+1
-0.3
One of the purposes of using intermediate code in compilers is to
Questions Asked from Syntax Directed Translation (Marks 1)
Number in Brackets after Paper Indicates No. of Questions
GATE CSE Subjects
Discrete Mathematics
Programming Languages
Theory of Computation
Operating Systems
Computer Organization
Database Management System
Data Structures
Computer Networks
Algorithms
Compiler Design
Software Engineering
Web Technologies
General Aptitude