menu
Recent questions tagged syntax-directed-translation
Login
Register
My account
Edit my Profile
Private messages
My favorites
Register
Recent questions tagged syntax-directed-translation
All Activity
Q&A
Questions
Unanswered
Tags
Categories
Users
Ask a Question
Blogs
Previous Year
Recent questions tagged syntax-directed-translation
0
votes
0
answers
1.2k
views
GATE CSE 2021 Set 1 | Question: 26 | Video Solution
Arjun
asked
in
Compiler Design
Feb 18, 2021
by
Arjun
1.4k
points
1.2k
views
gate2021-cse-set1
compiler-design
syntax-directed-translation
0
votes
0
answers
26
views
GATE2003-18 Video Solution
In a bottom-up evaluation of a syntax directed definition, inherited attributes can always be evaluated be evaluated only if the definition is L-attributed be evaluated only if the definition has synthesized attributes never be evaluated
admin
asked
in
Compiler Design
Apr 18, 2020
by
admin
589
points
26
views
gate2003
compiler-design
syntax-directed-translation
normal
video-solution
0
votes
0
answers
18
views
GATE2019-36 Video Solution
Consider the following grammar and the semantic actions to support that inherited type declaration attributes. Let $X_1, X_2, X_3, X_4, X_5$, and $X_6$ be the placeholders for the non-terminals $D, T, L$ or $L_1$ ... $X_1=T, \: X_2=L, \: X_3=T, \: X_4 = L_1$
admin
asked
in
Compiler Design
Apr 18, 2020
by
admin
589
points
18
views
gate2019
compiler-design
syntax-directed-translation
video-solution
0
votes
0
answers
24
views
GATE1998-23 Video Solution
Let the attribute ‘$val$’ give the value of a binary number generated by $S$ in the following grammar: $S \rightarrow L.L \mid L$ $L \rightarrow LB \mid B$ $B \rightarrow 0 \mid 1$ For example, an input $101.101$ gives $S.val = 5.625$ Construct a syntax directed translation scheme using only synthesized attributes, to determine $S.val$.
admin
asked
in
Compiler Design
Apr 18, 2020
by
admin
589
points
24
views
gate1998
compiler-design
syntax-directed-translation
normal
descriptive
video-solution
0
votes
0
answers
17
views
GATE2016-1-46 Video Solution
Consider the following Syntax Directed Translation Scheme $( SDTS )$, with non-terminals $\{S,A \}$ and terminals $\{a,b \}$. $S \to aA \quad \{\text{print }1\}$ $S \to a \quad \{\text{print }2\}$ $A \to Sb \quad \{\text{print }3\}$ Using the above $SDTS$ , ... printed by a bottom-up parser, for the input $aab$ is: $1 \ 3 \ 2 $ $2 \ 2 \ 3 $ $2 \ 3 \ 1 $ syntax error
admin
asked
in
Compiler Design
Apr 18, 2020
by
admin
589
points
17
views
gate2016-1
compiler-design
syntax-directed-translation
normal
video-solution
0
votes
0
answers
30
views
GATE1995-2.10 Video Solution
A shift reduce parser carries out the actions specified within braces immediately after reducing with the corresponding rule of grammar $S \rightarrow xxW \;\text{{print 1"}}$ $S \rightarrow y \;\text{{print 2"}}$ ... of $xxxxyzz$ using the syntax directed translation scheme described by the above rules? $23131$ $11233$ $11231$ $33211$
admin
asked
in
Compiler Design
Apr 18, 2020
by
admin
589
points
30
views
gate1995
compiler-design
grammar
syntax-directed-translation
normal
video-solution
0
votes
0
answers
26
views
GATE2000-19 Video Solution
Consider the syntax directed translation scheme (SDTS) given in the following. Assume attribute evaluation with bottom-up parsing, i.e., attributes are evaluated immediately after a reduction. E$\rightarrow $ E$_{1}$ * T {E.val = E$_{1}$.val * ... SDTS given, without changing the grammar, to find $E.red$, the number of reductions performed while reducing an input to $E$.
admin
asked
in
Compiler Design
Apr 18, 2020
by
admin
589
points
26
views
gate2000
compiler-design
syntax-directed-translation
normal
descriptive
video-solution
0
votes
0
answers
23
views
GATE1996-20 Video Solution
Consider the syntax-directed translation schema (SDTS) shown below: $E\rightarrow E + E$ {print “+”} $E\rightarrow E * E$ {print “.”} $E\rightarrow id$ {print id.name} $E\rightarrow (E)$ An LR-parser ... corresponding production. Draw the parse tree and write the translation for the sentence. $(a+b)*(c+d)$, using SDTS given above.
admin
asked
in
Compiler Design
Apr 18, 2020
by
admin
589
points
23
views
gate1996
compiler-design
syntax-directed-translation
normal
video-solution
0
votes
0
answers
17
views
GATE1992-11a Video Solution
Write syntax directed definitions (semantic rules) for the following grammar to add the type of each identifier to its entry in the symbol table during semantic analysis. Rewriting the grammar is not permitted and semantic rules are to be added to the ends of productions ... $T \rightarrow \text{int}$ $T \rightarrow \text{real}$ $L \rightarrow L,id$ $L \rightarrow id$
admin
asked
in
Compiler Design
Apr 18, 2020
by
admin
589
points
17
views
gate1992
compiler-design
syntax-directed-translation
normal
video-solution
0
votes
0
answers
24
views
GATE1992-11b Video Solution
Write $3$ address intermediate code (quadruples) for the following boolean expression in the sequence as it would be generated by a compiler. Partial evaluation of boolean expressions is not permitted. Assume the usual rules of precedence of the operators.$(a+b) > (c+d) \text{ or } a > c \text{ and }b < d$
admin
asked
in
Compiler Design
Apr 18, 2020
by
admin
589
points
24
views
gate1992
compiler-design
syntax-directed-translation
intermediate-code
descriptive
video-solution
0
votes
0
answers
21
views
GATE1997-23 Video Solution
The language $L,$ defined by the following grammar, allows use of real or integer data in expressions and assignment statements. <assign-stmt> :: <LHS> := <E> <E> ::= <E> + <T>|<T> <T> ::= ... that the name and type of variable can be obtained by making the function calls' give_name $(id)$ and give_type $(id)$ respectively.
admin
asked
in
Compiler Design
Apr 18, 2020
by
admin
589
points
21
views
gate1997
compiler-design
syntax-directed-translation
normal
descriptive
unsolved
video-solution
0
votes
0
answers
23
views
GATE2001-17 Video Solution
The syntax of the repeat-until statement is given by the following grammar $S \rightarrow\text{ repeat }S_1\text{ until }E$ where E stands for expressions, $S$ and $S_1$ stand for statements. The non-terminals $S$ and $S_1$ have an attribute ... statement. Use the operator '\\' to concatenate two strings and the function gen(s) to generate a line containing the string s.
admin
asked
in
Compiler Design
Apr 18, 2020
by
admin
589
points
23
views
gate2001
compiler-design
syntax-directed-translation
normal
descriptive
video-solution
0
votes
0
answers
15
views
GATE1994-23 Video Solution
Suppose we have a computer with single register and only three instructions given below: ... (E)\mid id$}\\ \end{array}$ Write a syntax directed translation to generate code using this grammar for the computer described above.
admin
asked
in
Compiler Design
Apr 18, 2020
by
admin
589
points
15
views
gate1994
compiler-design
grammar
syntax-directed-translation
descriptive
unsolved
video-solution
0
votes
0
answers
20
views
GATE1989-10b Video Solution
Consider the following grammar for variable declarations: <vardecl> $\rightarrow$ <vardecl><idlist> : <type>; <vardecl> $\rightarrow \in$ <idlist> $\rightarrow$ ... necessary. Make suitable assumptions regarding procedures operating on the symbol table; you need not elaborate upon these procedures.
admin
asked
in
Compiler Design
Apr 18, 2020
by
admin
589
points
20
views
descriptive
gate1989
compiler-design
syntax-directed-translation
unsolved
video-solution
0
votes
1
answer
94
views
Ace Test series Top down parsing SDT
Question Answer as per Ace As far as I know Tree is traversed in Left most (DFS) so correct answer should be “*+”.
priyesh9875
asked
in
Compiler Design
Nov 30, 2019
by
priyesh9875
67
points
94
views
compiler-design
syntax-directed-translation
To see more, click for the
full list of questions
or
popular tags
.
Ask a Question
Quick search syntax
tags
tag:apple
author
user:martin
title
title:apple
content
content:apple
exclude
-tag:apple
force match
+apple
views
views:100
score
score:10
answers
answers:2
is accepted
isaccepted:true
is closed
isclosed:true
Welcome to GATE CSE Doubts, where you can ask questions and receive answers from other members of the community.
Recent Posts
New GATEOverflow PDFs
Guidelines to users
No Recent Blog Comments
Search GATE CSE Video Solutions