Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Recent questions tagged syntax-directed-translation
0
votes
0
answers
31
Best Open Video Playlist for Syntax-Directed Translation Topic | Compiler Design
Please list out the best free available video playlist for Syntax-Directed Translation from Compiler Design as an answer here (only one playlist per answer). We'll then select the best playlist and add to GO ... ones are more likely to be selected as best. For the full list of selected videos please see here
Please list out the best free available video playlist for Syntax-Directed Translation from Compiler Design as an answer here (only one playlist per answer). We'll then s...
makhdoom ghaya
234
views
makhdoom ghaya
asked
Aug 18, 2022
Study Resources
go-classroom
free-videos
video-links
missing-videos
syntax-directed-translation
+
–
7
votes
3
answers
32
GATE CSE 2022 | Question: 55
Consider the following grammar along with translation rules. ... of $S._{\text{val}}$ for root of the parse tree for the expression $20 \# 10 \% 5 \# 8 \% 2 \% 2$ is ________________.
Consider the following grammar along with translation rules.$$\begin{aligned} & S \rightarrow S_{1} \# T \qquad \{S._{\text{val}} =S_{1}. _{\text{val}} \; ^{\ast} T._{\te...
Arjun
5.9k
views
Arjun
asked
Feb 15, 2022
Compiler Design
gatecse-2022
numerical-answers
compiler-design
syntax-directed-translation
2-marks
+
–
0
votes
1
answer
33
Compilation Techniques - Annotated Parse Tree
Given the following statement: 6 * (8-3) Make the Annotated Parse Tree based on the translation scheme below. S → B {A.i = B.val} A {S.val = A.s} A → - B {A1.i = A.i - B.val} A1 {A.s = A1.s} A → e {A.s = A.i} B → D {C.i = D.val} C {B.val = C.s} C → * ... = C.i * D.val} C1 {C.s = C1.s} C → e {C.s = C.i} D → ( S ) {D.val = S.val} D → num {D.val = num.val}
Given the following statement: 6 * (8-3)Make the Annotated Parse Tree based on the translation scheme below.S → B {A.i = B.val} A {S.val = A.s}A → - B {A1.i = A.i - B...
Frengky
882
views
Frengky
asked
Feb 11, 2022
Compiler Design
compiler-design
syntax-directed-translation
descriptive
+
–
0
votes
0
answers
34
#self doubt
https://gateoverflow.in/908/Gate-cse-2003-question-18 Here In fact only for the L-attributed grammar made from a LL(1) grammar, we can always guarantee a bottom-up parsing. Even for LR(1) grammar, bottom-up parsing is not a guarantee for all ... . ...I am not getting this line...Can somebody please explain with suitable example? @Arjun Sir @Deepak Poonie Sir can you please explain
https://gateoverflow.in/908/Gate-cse-2003-question-18Here ” In fact only for the L-attributed grammar made from a LL(1) grammar, we can always guarantee a bottom-up par...
samarpita
239
views
samarpita
asked
Dec 13, 2021
Compiler Design
compiler-design
syntax-directed-translation
+
–
0
votes
2
answers
35
#Selfdoubt How L-attributed semantic rules are evaluated? Whether they are evaluated simultaneously during parsing?
If the grammar has only S-attributed semantic definitions, in a top down parser we will add the semantic action at the end of production and it will we executed when we...
jaswanth431
865
views
jaswanth431
asked
Nov 16, 2021
Compiler Design
compiler-design
syntax-directed-translation
+
–
18
votes
3
answers
36
GATE CSE 2021 Set 1 | Question: 26
Consider the following grammar (that admits a series of declarations, followed by expressions) and the associated syntax directed translation $\text{(SDT)}$ ... used to type-check syntactically correct boolean variable declarations and boolean expressions. The actions will lead to an infinite loop
Consider the following grammar (that admits a series of declarations, followed by expressions) and the associated syntax directed translation $\text{(SDT)}$ acti...
Arjun
10.5k
views
Arjun
asked
Feb 18, 2021
Compiler Design
gatecse-2021-set1
compiler-design
syntax-directed-translation
2-marks
+
–
1
votes
1
answer
37
GATE Overflow Test Series | Mock GATE | Test 4 | Question: 62
A shift reduce parser carries out the actions specified within braces immediately after reducing with the corresponding rule of grammar: $S \rightarrow S + T \quad \{\text{print ("+")}\}$ $\qquad \mid T \quad \{\;\}$ ... directed translation scheme described by the above rules? $237\ast +$ $23 \ast7 +$ $23+7\ast$ $+\ast 237$
A shift reduce parser carries out the actions specified within braces immediately after reducing with the corresponding rule of grammar:$S \rightarrow S + T \quad \{\text...
gatecse
97
views
gatecse
asked
Feb 1, 2021
Compiler Design
go2025-mockgate-4
compiler-design
syntax-directed-translation
+
–
2
votes
1
answer
38
GATE Overflow Test Series | Mock GATE | Test 3 | Question: 64
Consider the following Syntax Directed Translation Scheme, with non-terminals $\{S,T,F\}$ and terminals $\{\text{num}\}.$ $S \rightarrow T \# S \quad \{S.val = T.val - S.val;\}$ ... using the syntax directed translation scheme described by the above rules is ________
Consider the following Syntax Directed Translation Scheme, with non-terminals $\{S,T,F\}$ and terminals $\{\text{num}\}.$$S \rightarrow T \# S \quad \{S.val = T.val - S.v...
gatecse
249
views
gatecse
asked
Jan 26, 2021
Compiler Design
go2025-mockgate-3
numerical-answers
syntax-directed-translation
compiler-design
+
–
8
votes
1
answer
39
GATE Overflow Test Series | Compiler Design | Test 1 | Question: 4
Which of the following is/are correct? L-attributed definitions can always be evaluated by the depth first visit of the parse tree S-attributed definitions can always be evaluated by the depth first ... Syntax Directed Translation is S-attributed Inherited attributes can always be evaluated by a classical preorder traversal
Which of the following is/are correct?L-attributed definitions can always be evaluated by the depth first visit of the parse treeS-attributed definitions can always be ev...
gatecse
449
views
gatecse
asked
Dec 14, 2020
Compiler Design
go2025-cd-1
syntax-directed-translation
multiple-selects
+
–
2
votes
1
answer
40
GATE Overflow Test Series | Compiler Design | Test 1 | Question: 25
A shift reduce parser carries out the actions specified within braces immediately after reducing with the corresponding rule of grammar: $S \rightarrow S + T \quad \{\text{print ("+")}\}$ ... syntax-directed translation scheme described by the above rules? $26$ $573 \ast +$ $573+\ast$ $+\ast 573$
A shift reduce parser carries out the actions specified within braces immediately after reducing with the corresponding rule of grammar:$S \rightarrow S + T \quad \{\text...
gatecse
106
views
gatecse
asked
Dec 14, 2020
Compiler Design
go2025-cd-1
syntax-directed-translation
+
–
4
votes
2
answers
41
GATE Overflow Test Series | Compiler Design | Test 1 | Question: 26
Consider the following Syntax Directed Translation Scheme, with non-terminals $\{S,T,F\}$ and terminals $\{\text{num}\}.$ $S \rightarrow S \# T \quad \{S.val = S.val \ast T.val;\}$ ... using the syntax directed translation scheme described by the above rules is _______
Consider the following Syntax Directed Translation Scheme, with non-terminals $\{S,T,F\}$ and terminals $\{\text{num}\}.$$S \rightarrow S \# T \quad \{S.val = S.val \ast ...
gatecse
166
views
gatecse
asked
Dec 14, 2020
Compiler Design
go2025-cd-1
numerical-answers
syntax-directed-translation
+
–
4
votes
4
answers
42
NIELIT 2017 OCT Scientific Assistant A (CS) - Section B: 11
Synthesized attribute can easily be simulated by an LL grammar ambiguous grammar LR grammar none of the above
Synthesized attribute can easily be simulated by anLL grammarambiguous grammarLR grammarnone of the above
admin
1.3k
views
admin
asked
Apr 1, 2020
Compiler Design
nielit2017oct-assistanta-cs
compiler-design
syntax-directed-translation
+
–
0
votes
1
answer
43
NIELIT 2016 DEC Scientist B (CS) - Section B: 43
Syntax directed translation scheme is desirable because It is based on the syntax It is easy to modify Its description is independent of any implementation All of these
Syntax directed translation scheme is desirable becauseIt is based on the syntaxIt is easy to modifyIts description is independent of any implementationAll of these
admin
3.1k
views
admin
asked
Mar 31, 2020
Compiler Design
nielit2016dec-scientistb-cs
compiler-design
syntax-directed-translation
+
–
19
votes
2
answers
44
GATE CSE 2020 | Question: 33
Consider the productions $A \rightarrow PQ$ and $A \rightarrow XY$. Each of the five non-terminals $A, P, Q, X,$ and $Y$ has two attributes: $s$ is a synthesized attribute, and $i$ ... Only Rule $1$ is $L$-attributed. Only Rule $2$ is $L$-attributed. Neither Rule $1$ nor Rule $2$ is $L$-attributed.
Consider the productions $A \rightarrow PQ$ and $A \rightarrow XY$. Each of the five non-terminals $A, P, Q, X,$ and $Y$ has two attributes: $s$ is a synthesized attribu...
Arjun
9.2k
views
Arjun
asked
Feb 12, 2020
Compiler Design
gatecse-2020
compiler-design
syntax-directed-translation
2-marks
+
–
0
votes
0
answers
45
Ullman (Compiler Design) Edition 2 Exercise 5.4 Question 7 (Page No. 337)
Modify the SDD of Fig. $5.25$ to include superscripts denoted by operator sup between boxes. If box $B_{2}$ is a superscript of box $B_{1}$, then position the baseline of $B_{2}\:0.6$ times the point size of $B_{1}$ above the baseline of $B_{1}.\text{Add}$ the new production and rules to the SDT of Fig. $5.26$.
Modify the SDD of Fig. $5.25$ to include superscripts denoted by operator sup between boxes. If box $B_{2}$ is a superscript of box $B_{1}$, then position the baseline of...
admin
608
views
admin
asked
Sep 6, 2019
Compiler Design
ullman
compiler-design
syntax-directed-translation
grammar
descriptive
+
–
0
votes
0
answers
46
Ullman (Compiler Design) Edition 2 Exercise 5.4 Question 6 (Page No. 337)
Modify the SDD of Fig. $5.25$ to include a synthesized attribute $B.le$, the length of a box. The length of the concatenation of two boxes is the sum of the lengths of each. Then add your new rules to the proper positions in the SDT of Fig. $5.26$.
Modify the SDD of Fig. $5.25$ to include a synthesized attribute $B.le$, the length of a box. The length of the concatenation of two boxes is the sum of the lengths of ea...
admin
635
views
admin
asked
Sep 6, 2019
Compiler Design
ullman
compiler-design
syntax-directed-translation
grammar
descriptive
+
–
0
votes
0
answers
47
Ullman (Compiler Design) Edition 2 Exercise 5.4 Question 5 (Page No. 337)
Write L-attributed SDT's analogous to that of Example $5.19$ for the following productions, each of which represents a familiar flow-of-control construct, as in the programming language C. You may need to ... middle to the next statement, so it is not sufficient simply to generate code for each statement in order.
Write L-attributed SDT's analogous to that of Example $5.19$ for the following productions, each of which represents a familiar flow-of-control construct, as in the progr...
admin
483
views
admin
asked
Sep 6, 2019
Compiler Design
ullman
compiler-design
syntax-directed-translation
grammar
descriptive
+
–
0
votes
0
answers
48
Ullman (Compiler Design) Edition 2 Exercise 5.4 Question 4 (Page No. 337)
Write L-attributed SDD's analogous to that of Example $5.19$ for the following productions, each of which represents a familiar flow-of-control construct, as in the programming language C. You may need to ... middle to the next statement, so it is not sufficient simply to generate code for each statement in order.
Write L-attributed SDD's analogous to that of Example $5.19$ for the following productions, each of which represents a familiar flow-of-control construct, as in the progr...
admin
452
views
admin
asked
Sep 6, 2019
Compiler Design
ullman
compiler-design
syntax-directed-translation
grammar
descriptive
+
–
1
votes
1
answer
49
Ullman (Compiler Design) Edition 2 Exercise 5.4 Question 3 (Page No. 337)
The following SDT computes the value of a string of $0's$ and $1's$ ... so the underlying grammar is not left recursive, and yet the same value of $B.val$ is computed for the entire input string.
The following SDT computes the value of a string of $0's$ and $1's$ interpreted as a positive, binary integer.$B\rightarrow B_{1}0\:\{B.val=2\times B_{1}.val\}\mid B_{1}1...
admin
2.1k
views
admin
asked
Sep 6, 2019
Compiler Design
ullman
compiler-design
syntax-directed-translation
grammar
left-recursion
descriptive
+
–
1
votes
1
answer
50
Ullman (Compiler Design) Edition 2 Exercise 5.4 Question 2 (Page No. 336 - 337)
Rewrite the following SDT: $A\rightarrow A\{a\}B\mid AB\{b\}\mid 0$ $B\rightarrow B\{c\}A\mid BA\{d\}\mid 1$ so that the underlying grammar becomes non-left-recursive. Here, $a, b, c$, and $d$ are actions, and $0$ and $1$ are terminals.
Rewrite the following SDT:$A\rightarrow A\{a\}B\mid AB\{b\}\mid 0$$B\rightarrow B\{c\}A\mid BA\{d\}\mid 1$ so that the underlying grammar becomes non-left-recursive. Here...
admin
791
views
admin
asked
Sep 6, 2019
Compiler Design
ullman
compiler-design
syntax-directed-translation
grammar
descriptive
+
–
0
votes
0
answers
51
Ullman (Compiler Design) Edition 2 Exercise 5.4 Question 1 (Page No. 336)
We mentioned in Section $5.4.2$ that it is possible to deduce, from the LR state on the parsing stack, what grammar symbol is represented by the state. How would we discover this information?
We mentioned in Section $5.4.2$ that it is possible to deduce, from the LR state on the parsing stack, what grammar symbol is represented by the state. How would we disco...
admin
510
views
admin
asked
Sep 6, 2019
Compiler Design
ullman
compiler-design
syntax-directed-translation
grammar
descriptive
+
–
0
votes
0
answers
52
Ullman (Compiler Design) Edition 2 Exercise 5.3 Question 3 (Page No. 323)
Give an SDD to differentiate expressions such as $x\ast(3\ast x + x\ast x)$ involving the operators $+$ and $\ast,$ the variable $x$, and constants. Assume that no simplification occurs, so that, for example, $3\ast x$ will be translated into $3\ast 1+0\ast x$.
Give an SDD to differentiate expressions such as $x\ast(3\ast x + x\ast x)$ involving the operators $+$ and $\ast,$ the variable $x$, and constants. Assume that no simpli...
admin
487
views
admin
asked
Sep 6, 2019
Compiler Design
ullman
compiler-design
syntax-directed-translation
+
–
0
votes
0
answers
53
Ullman (Compiler Design) Edition 2 Exercise 5.3 Question 2 (Page No. 323)
Give an SDD to translate infix expressions with $+$ and $\ast$ into equivalent expressions without redundant parentheses. For example, since both operators associate from the left, and $\ast$ takes precedence over $+, ((a\ast(b+c))\ast(d))$ translates into $a\ast(b + c)\ast d$.
Give an SDD to translate infix expressions with $+$ and $\ast$ into equivalent expressions without redundant parentheses. For example, since both operators associate from...
admin
762
views
admin
asked
Sep 6, 2019
Compiler Design
ullman
compiler-design
syntax-directed-translation
infix-expressions
+
–
0
votes
0
answers
54
Ullman (Compiler Design) Edition 2 Exercise 5.3 Question 1 (Page No. 323)
Below is a grammar for expressions involving operator $+$ and integer or floating-point operands. Floating-point numbers are distinguished by having a decimal point. $E\rightarrow E+T\mid T$ ... translate expressions into postfix notation.Use the unary operator intToFloat to turn an integer into an equivalent float.
Below is a grammar for expressions involving operator $+$ and integer or floating-point operands. Floating-point numbers are distinguished by having a decimal point.$E\ri...
admin
1.4k
views
admin
asked
Sep 6, 2019
Compiler Design
ullman
compiler-design
syntax-directed-translation
grammar
postfix-notation
+
–
0
votes
0
answers
55
Ullman (Compiler Design) Edition 2 Exercise 5.2 Question 6 (Page No. 317)
Implement Algorithm $3.23$, which converts a regular expression into a nondeterministic finite automaton, by an L-attributed SDD on a top-down parsable grammar. Assume that there is a token char representing any ... never before returned by this function. Use any convenient notation to specify the transitions of the $NFA$.
Implement Algorithm $3.23$, which converts a regular expression into a nondeterministic finite automaton, by an L-attributed SDD on a top-down parsable grammar. Assume th...
admin
840
views
admin
asked
Sep 6, 2019
Compiler Design
ullman
compiler-design
syntax-directed-translation
regular-expression
finite-automata
parsing
+
–
0
votes
1
answer
56
Ullman (Compiler Design) Edition 2 Exercise 5.2 Question 5 (Page No. 317)
This grammar generates binary numbers with a "decimal" point: $S\rightarrow L.L\mid L$ $L\rightarrow LB\mid B$ $B\rightarrow 0\mid 1$ Design an S-attributed SDD to compute $S.val$, the decimal-number value of an input string. For example, the translation of string $101.101$ should be the decimal number $5.625$.
This grammar generates binary numbers with a "decimal" point:$S\rightarrow L.L\mid L$$L\rightarrow LB\mid B$$B\rightarrow 0\mid 1$ Design an S-attributed SDD to compute $...
admin
5.5k
views
admin
asked
Sep 6, 2019
Compiler Design
ullman
compiler-design
syntax-directed-translation
grammar
parsing
+
–
0
votes
0
answers
57
Ullman (Compiler Design) Edition 2 Exercise 5.2 Question 4 (Page No. 317)
This grammar generates binary numbers with a "decimal" point: $S\rightarrow L.L\mid L$ $L\rightarrow LB\mid B$ $B\rightarrow 0\mid 1$ Design an L-attributed SDD to compute $S.val$, the decimal-number value of ... $L.side$ that tells which side of the decimal point a bit is on.
This grammar generates binary numbers with a "decimal" point:$S\rightarrow L.L\mid L$$L\rightarrow LB\mid B$$B\rightarrow 0\mid 1$ Design an L-attributed SDD to compute $...
admin
1.6k
views
admin
asked
Sep 6, 2019
Compiler Design
ullman
compiler-design
syntax-directed-translation
grammar
parsing
+
–
Page:
« prev
1
2
3
4
5
6
7
8
next »
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register