Login
Register
@
Dark Mode
Profile
Edit my Profile
Messages
My favorites
Register
Activity
Q&A
Questions
Unanswered
Tags
Subjects
Users
Ask
Previous Years
Blogs
New Blog
Exams
Dark Mode
Recent questions tagged syntax-directed-translation
1
vote
2
answers
181
compiler design
A shift reduce parser carries out the actions specified with in braces immediately after reducing with the corresponding rule of grammar. S -> AS { print 1 } S -> AB { print 2 } A -> a { print 3 } B -> bC { print 4 } B -> dB { print ... symbols are 1, 2, 3, 4, 5, 6. What is the translation of "aaadbc" ? A) 333546211 B) 654211 C) 645323131 D) 645233311
Aegon
asked
in
Compiler Design
Oct 4, 2016
by
Aegon
567
views
compiler-design
syntax-directed-translation
3
votes
0
answers
182
Test Series
Krishna Madhav
asked
in
Compiler Design
Sep 17, 2016
by
Krishna Madhav
349
views
compiler-design
syntax-directed-translation
4
votes
2
answers
183
Find the number of Synthesized attributes
how many Synthesized attributes are present in the given Syntax directed Definition? (Answer key says only 2 Synthesized attributes are present. How to find them? Any idea?)
sh!va
asked
in
Compiler Design
Jun 22, 2016
by
sh!va
2.4k
views
compiler-design
syntax-directed-translation
1
vote
2
answers
184
if there is no semantic action associated with SDT can we still be able to find out what type of STD it is .
shekhar chauhan
asked
in
Compiler Design
Jun 5, 2016
by
shekhar chauhan
1.0k
views
syntax-directed-translation
compiler-design
25
votes
2
answers
185
GATE CSE 1992 | Question: 11b
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$
go_editor
asked
in
Compiler Design
Apr 24, 2016
by
go_editor
2.6k
views
gate1992
compiler-design
syntax-directed-translation
intermediate-code
descriptive
26
votes
2
answers
186
GATE CSE 2016 Set 1 | Question: 46
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
Sandeep Singh
asked
in
Compiler Design
Feb 12, 2016
by
Sandeep Singh
10.5k
views
gatecse-2016-set1
compiler-design
syntax-directed-translation
normal
1
vote
2
answers
187
S l attributed
Sourabh Kumar
asked
in
Compiler Design
Feb 1, 2016
by
Sourabh Kumar
512
views
compiler-design
syntax-directed-translation
made-easy-test-series
4
votes
2
answers
188
L-attributed or S-attributed, inherited or synthesized?
How to solve this question? Attributes calculated from children are synthesized, while attributes calculated from parents and/or siblings is inherited. And S-attributed are purely synthesized, while L-attributed are synthesized+inherited, is this right?
Purple
asked
in
Compiler Design
Jan 27, 2016
by
Purple
3.7k
views
compiler-design
syntax-directed-translation
test-series
0
votes
1
answer
189
Question on SDTS
Given explanation Couldn't understand the explanation. Please explain
shikharV
asked
in
Compiler Design
Jan 22, 2016
by
shikharV
636
views
compiler-design
syntax-directed-translation
numerical-answers
ace-test-series
2
votes
1
answer
190
Ace Test Series: Compiler Design - Syntax Directed Translation
Consider the $SDTS$ for the ambiguous grammar $E \rightarrow E + E$ $out ("1 + 2 ")$ $E \rightarrow E ^{*} E$ $out ("2 ^{*} 3")$ $E \rightarrow num$ $out (num.val)$ Assume a shift reduce parser. ... & evaluated. The input is $1 ^{*} 1 + 1$. The value obtained is _______. EDIT: Here's the explanation given..
Tushar Shinde
asked
in
Compiler Design
Jan 19, 2016
by
Tushar Shinde
766
views
ace-test-series
compiler-design
syntax-directed-translation
2
votes
1
answer
191
L attributed Grammer
Statement : L attributed grammer can be evaluated using bottom up parsing. Doubt : L attributed has both types, synthesized as well as left inherited grrammer. So in L attributed grammer how will be left inherited attributes be evaluated (which need preorder traversal)? Something like this :
Mojo-Jojo
asked
in
Compiler Design
Jan 17, 2016
by
Mojo-Jojo
1.2k
views
compiler-design
syntax-directed-translation
3
votes
1
answer
192
Ace Test Series: Compiler Design - Syntax Directed Translation
Fill in the blanks Consider the $SDTS$ below $E1\rightarrow E \ out (*2)$ $E \rightarrow +T \ out('1')$ $E \rightarrow T \ out (10^*)$ $E \rightarrow T*F \ out ( ' * ' )$ ... _____________. Ans =2200 correct ans 2212 I am not getting the answer, plz help. [SDT tracing by default is left-recursive, right??]
Tushar Shinde
asked
in
Compiler Design
Jan 12, 2016
by
Tushar Shinde
979
views
ace-test-series
compiler-design
syntax-directed-translation
1
vote
1
answer
193
Evaluation of SDT
The way I solved it was : is this correct evaluation order ? Because in the answer they have mentioned different order :
worst_engineer
asked
in
Compiler Design
Jan 5, 2016
by
worst_engineer
905
views
compiler-design
syntax-directed-translation
expression-evaluation
numerical-answers
test-series
1
vote
1
answer
194
Which type of compiler conflict is detected and resolving it
E --> number {E1.val = number.val} E --> E+E {E.val = E.val+E.val} E --> E*E {E.val = E.val*E.val} The above grammar and the semantic rules are fed to a yacc tool (which is an LALR(1) ... to resolve a conflict in favour of something???? (It will be very helpful if you also attact pic of state diagram along with the answer) Thnx
Tushar Shinde
asked
in
Compiler Design
Jan 3, 2016
by
Tushar Shinde
929
views
compiler-design
syntax-directed-translation
theory-of-computation
0
votes
2
answers
195
For the below SDT, what will be the output for the input string aaacb ???
For the below SDT, what will be the output for the input string aaacb? S → aAa {print "0"} S → b {print "1"} A → Sc {print "2"} How to approach as S→ aAa then how we will get the string aaacb .
Akanksha Kesarwani
asked
in
Compiler Design
Dec 20, 2015
by
Akanksha Kesarwani
1.6k
views
syntax-directed-translation
compiler-design
test-series
0
votes
4
answers
196
If an LL(1) parser carries out the SDT for a string output will be ??
Akanksha Kesarwani
asked
in
Compiler Design
Dec 20, 2015
by
Akanksha Kesarwani
1.1k
views
compiler-design
syntax-directed-translation
virtual-gate-test-series
1
vote
2
answers
197
Test Series: Compiler: SDT
Consider the following SDT. What is the output of the expression “10 + 4 ∗ 6”? 29 32 30 28 I Calculated I got 34 so I selected nearest answer 32. But the given answer is 30.
Prasanna
asked
in
Compiler Design
Dec 18, 2015
by
Prasanna
1.1k
views
compiler-design
syntax-directed-translation
2
votes
1
answer
198
SDT
in top down parsing while constructing parse tree , semantic actions are considered as child of Variable (ie part of production on RHS) how we can decide this as the right child or left child in parse tree ? if not getting my question ? explain sdt using top down parsing ?
tiger
asked
in
Compiler Design
Dec 3, 2015
by
tiger
827
views
compiler-design
syntax-directed-translation
3
votes
3
answers
199
Dangling else problem
The dangling else problem in the construct If (E) sales S | is (E) S | a can be resolved IN SDTS by (A) Using the associative & precedence of operating & the 'exe' munch principle (B) By change the grammar to an unambiguous one (C) Cannot be removed as it Is undecidable (D) None of the above
shikharV
asked
in
Compiler Design
Nov 19, 2015
by
shikharV
2.3k
views
compiler-design
syntax-directed-translation
1
vote
3
answers
200
Compiler design question on SDT : 1
Consider the following SDT, S → M {PRINT “2”;} A M → 1 {PRINT “ ”;} A → D {PRINT “1”;} E D → 2 {PRINT “ ”;} E → E {PRINT “ ”;} A E → 3 {PRINT “ ”;} A → S {PRINT “4”;} Y S → 4 {PRINT “ ”;} Y → ∈ {PRINT “ ”;} If the bottom up parsing is used to parse the input string “1234” then the output number produced (without any spaces) is _______
worst_engineer
asked
in
Compiler Design
Oct 18, 2015
by
worst_engineer
4.7k
views
compiler-design
syntax-directed-translation
numerical-answers
0
votes
2
answers
201
The output for SDT
The output for SDT is E -> E+E printf("+") E -> a printf("a") for a + a + a is
worst_engineer
asked
in
Compiler Design
Sep 12, 2015
by
worst_engineer
637
views
compiler-design
syntax-directed-translation
3
votes
3
answers
202
Consider the following SDT. A → BC *(I) B.i = f(A.i) (II) B.i = f(A.S) (III) A.S = f(B.s)
Consider the following SDT. A → BC * (I) B.i = f(A.i) (II) B.i = f(A.S) (III) A.S = f(B.S) which of the above is violating L – attributed definition? (a) I only (b) II only (c) I, II (d) I, II, III
ari
asked
in
Compiler Design
Sep 6, 2015
by
ari
6.7k
views
compiler-design
syntax-directed-translation
1
vote
3
answers
203
Consider the SDT , where S ->TR, R-> +TR|empty {print ("+")} , And T-> num {print(num)} And if the input is given "9+5+2" What is output ?
spriti1991
asked
in
Compiler Design
Mar 18, 2015
by
spriti1991
2.4k
views
compiler-design
syntax-directed-translation
18
votes
2
answers
204
GATE CSE 1996 | Question: 20
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 executes the actions associated with ... corresponding production. Draw the parse tree and write the translation for the sentence. $(a+b)*(c+d)$, using SDTS given above.
Kathleen
asked
in
Compiler Design
Oct 9, 2014
by
Kathleen
3.4k
views
gate1996
compiler-design
syntax-directed-translation
normal
descriptive
27
votes
3
answers
205
GATE CSE 1995 | Question: 2.10
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$
Kathleen
asked
in
Compiler Design
Oct 8, 2014
by
Kathleen
9.8k
views
gate1995
compiler-design
grammar
syntax-directed-translation
normal
5
votes
0
answers
206
GATE CSE 1994 | Question: 23
Suppose we have a computer with single register and only three instructions given below: ... $T \rightarrow (E)\mid id$ Write a syntax directed translation to generate code using this grammar for the computer described above.
Kathleen
asked
in
Compiler Design
Oct 5, 2014
by
Kathleen
1.0k
views
gate1994
compiler-design
grammar
syntax-directed-translation
descriptive
unsolved
4
votes
1
answer
207
GATE CSE 1997 | Question: 23
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.
Kathleen
asked
in
Compiler Design
Sep 29, 2014
by
Kathleen
1.4k
views
gate1997
compiler-design
syntax-directed-translation
normal
descriptive
unsolved
18
votes
1
answer
208
GATE CSE 1998 | Question: 23
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$.
Kathleen
asked
in
Compiler Design
Sep 26, 2014
by
Kathleen
11.6k
views
gate1998
compiler-design
syntax-directed-translation
normal
descriptive
75
votes
10
answers
209
GATE CSE 2003 | Question: 18
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
Kathleen
asked
in
Compiler Design
Sep 16, 2014
by
Kathleen
36.6k
views
gatecse-2003
compiler-design
syntax-directed-translation
normal
8
votes
1
answer
210
GATE CSE 2001 | Question: 17
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 ... Use the operator '\\' to concatenate two strings and the function gen(s) to generate a line containing the string s.
Kathleen
asked
in
Compiler Design
Sep 14, 2014
by
Kathleen
2.0k
views
gatecse-2001
compiler-design
syntax-directed-translation
normal
descriptive
Page:
« prev
1
2
3
4
5
6
7
8
next »
Subscribe to GATE CSE 2024 Test Series
Subscribe to GO Classes for GATE CSE 2024
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
Recent Posts
Post GATE 2024 Guidance [Counseling tips and resources]
GATE CSE 2024 Result Responses
[Project Contest] Pytorch backend support for MLCommons Cpp Inference implementation
Participating in MLCommons Inference v4.0 submission (deadline is February 23 12pm IST)
IIITH PGEE 2024 Test Series by GO Classes
Subjects
All categories
General Aptitude
(3.5k)
Engineering Mathematics
(10.4k)
Digital Logic
(3.6k)
Programming and DS
(6.2k)
Algorithms
(4.8k)
Theory of Computation
(6.9k)
Compiler Design
(2.5k)
Operating System
(5.2k)
Databases
(4.8k)
CO and Architecture
(4.0k)
Computer Networks
(4.9k)
Artificial Intelligence
(79)
Machine Learning
(48)
Data Mining and Warehousing
(25)
Non GATE
(1.4k)
Others
(2.7k)
Admissions
(684)
Exam Queries
(1.6k)
Tier 1 Placement Questions
(17)
Job Queries
(80)
Projects
(11)
Unknown Category
(870)
64.3k
questions
77.9k
answers
244k
comments
80.0k
users
Recent questions tagged syntax-directed-translation
Recent Blog Comments
category ?
Hi @Arjun sir, I have obtained a score of 591 in ...
download here
Can you please tell about IIT-H mtech CSE self...
Please add your admission queries here:...