Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Recent questions tagged syntax-directed-translation
80
views
0
answers
0
votes
Compiler Design compiler design tcompiler-design-timothy-g-griffin
Q4. Generate target code for the following source language statements : x = a + b + c * (d-e)
Q4. Generate target code for the following source language statements : x = a + b + c * (d-e)
Ebrahim
Ebrahim
asked
May 5
Compiler Design
compiler-design
syntax-directed-translation
ullman
lexical-analysis
parsing
+
–
58
views
0
answers
0
votes
Compiler Design compiler design tcompiler-design-timothy-g-griffin
Q2. Implement the statement a:= -b + c*(d-e) + f * (c*(d-e)) into following Intermediate code representation. a) Quadruple b) Triple c) Indirect Triple Solve the above Question like this example
Q2. Implement the statement a:= -b + c*(d-e) + f * (c*(d-e)) into following Intermediate code representation. a) Quadrupleb) Triple c) Indirect Triple Solve the abov...
Ebrahim
Ebrahim
asked
May 5
Compiler Design
compiler-design
syntax-directed-translation
lexical-analysis
parsing
ullman
+
–
72
views
0
answers
1
votes
Compiler Design
1. Generate intermediate code for the following code segment. a) (x<y) and (y>z) and not z b) if(i%2==0) evensum=evensum+ else oddsum=oddsum+i;
1. Generate intermediate code for the following code segment. a) (x<y) and (y>z) and not z b) if(i%2==0)evensum=evensum+elseoddsum=oddsum+i;
Ebrahim
Ebrahim
asked
May 5
Compiler Design
compiler-design
syntax-directed-translation
ullman
+
–
2.9k
views
1
answers
2
votes
GATE CSE 2024 | Set 2 | Question: 19
Which of the following statements is/are FALSE? An attribute grammar is a syntax-directed definition $\text{(SDD)}$ in which the functions in the semantic rules have no side effects The attributes in a $\text{L}$-attributed definition ... $\text{L}$-attributed definitions based on $\text{LR(1)}$ grammar can be evaluated using a bottom-up parsing strategy
Which of the following statements is/are FALSE?An attribute grammar is a syntax-directed definition $\text{(SDD)}$ in which the functions in the semantic r...
Arjun
Arjun
asked
Feb 16
Compiler Design
gatecse2024-set2
compiler-design
syntax-directed-translation
multiple-selects
+
–
2.2k
views
2
answers
0
votes
GATE CSE 2024 | Set 1 | Question: 27
Consider the following syntax-directed definition $\text{(SDD)}$. $S \rightarrow D H T U$ $ \left\{S.v a l = D.val + H.val + T.val + U.val\right\};$ $D \rightarrow ^{"} \mathrm{M}^{"} D_1$ ... the following options is the $\text{CORRECT}$ value computed by the $\text{SDD}$ (in the attribute $S.val$)? $45$ $50$ $55$ $65$
Consider the following syntax-directed definition $\text{(SDD)}$.$S \rightarrow D H T U$$ \left\{S.v a l = D.val + H.val + T.val + U.val\right\};$$D \rightarrow ^{"} \...
Arjun
Arjun
asked
Feb 16
Compiler Design
gatecse2024-set1
compiler-design
syntax-directed-translation
+
–
895
views
1
answers
2
votes
GO Classes Test Series 2024 | Mock GATE | Test 14 | Question: 26
Which attributes in the following grammar are synthesized? A.a B.b B.x C.c
Which attributes in the following grammar are synthesized?A.aB.bB.xC.c
GO Classes
GO Classes
asked
Feb 5
Compiler Design
goclasses2024-mockgate-14
compiler-design
syntax-directed-translation
multiple-selects
1-mark
+
–
285
views
1
answers
0
votes
compiler design tcompiler-design-timothy-g-griffin
6. Generate code for the following C program using any code generation algorithm. [3 Marks] main() { int x, a, b, c, d, e; x= a + b -( c + d ) * e }
6. Generate code for the following C program using any code generation algorithm. [3 Marks] main() { int x, a, b, c, d, e; ...
Ebrahim
Ebrahim
asked
Jan 31
Compiler Design
compiler-design
syntax-directed-translation
code-optimization
parsing
ullman
+
–
620
views
1
answers
3
votes
GO Classes Test Series 2024 | Mock GATE | Test 13 | Question: 38
Consider the syntax-directed translation given by the following grammar and semantic rules. Here, $S$ is the only non-terminal and $\Sigma=\{0,1,2\}$ is a set of terminals. $\text{S.val}$ denotes the synthesized attribute (a ... $3$ value. The value computed by the translation scheme for the input string $201$ is $20.$
Consider the syntax-directed translation given by the following grammar and semantic rules. Here, $S$ is the only non-terminal and $\Sigma=\{0,1,2\}$ is a set of terminal...
GO Classes
GO Classes
asked
Jan 28
Compiler Design
goclasses2024-mockgate-13
goclasses
compiler-design
syntax-directed-translation
multiple-selects
2-marks
+
–
128
views
0
answers
0
votes
is there something wrong in the production rules?
pcla
pcla
asked
Jan 27
Compiler Design
syntax-directed-translation
compiler-design
+
–
235
views
1
answers
0
votes
Compiler-design
Q1. For the following grammar N -> AB | BA A -> a | CAC B -> b | CBC C -> a | b Find the FIRST and FOLLOW
Q1. For the following grammar N - AB | BA A - a | CAC B - b | CBC C - a | b Find the FIRST and FOLLOW
Ebrahim
Ebrahim
asked
Jan 12
Compiler Design
compiler-design
syntax-directed-translation
lexical-analysis
ullman
parsing
+
–
131
views
0
answers
0
votes
compiler-design-timothy-g-griffin
Find the FIRST and FOLLOW of the grammar to check whether it is LL (1) parser or not. N → AB | BA A → a | CAC B → b | CBC C → a | b
Find the FIRST and FOLLOW of the grammar to check whether it is LL (1) parser or not. N → AB | BA A → a | CAC B → b | CBC C → a | b
Ebrahim
Ebrahim
asked
Jan 11
Compiler Design
compiler-design
parsing
ullman
syntax-directed-translation
code-optimization
+
–
180
views
0
answers
0
votes
compiler-design-timothy-g-griffin
Please provide in detail solution step by step 5. Find the FIRST and FOLLOW of the grammar to check whether it is LL (1) parser or not. N → AB | BA A → a | CAC B → b | CBC C → a | b Please provid in detail solution step by step
Please provide in detail solution step by step 5. Find the FIRST and FOLLOW of the grammar to check whether it is LL (1) parser or not. N → AB | BA A → a | CAC...
Ebrahim
Ebrahim
asked
Jan 10
Compiler Design
compiler-design
syntax-directed-translation
parsing
code-optimization
+
–
334
views
1
answers
0
votes
Compiler Design
Like Example Above please answer this question Q5. Implement a+b*(c+d)-e/f into: a). Quadruples. b). Triples. c). Indirect triples.
Like Example Above please answer this questionQ5. Implement a+b*(c+d)-e/finto: a). Quadruples.b). Triples.c). Indirect triples.
Ebrahim
Ebrahim
asked
Dec 18, 2023
Compiler Design
compiler-design
syntax-directed-translation
lexical-analysis
parsing
+
–
364
views
1
answers
0
votes
compiler Design
Please Answer this question 4. Discuss design issues in code generation. Generate target code for the following basic block. t1 : = a + b t2 : = c + d t3 : = e - t2 t4 : = t1 - t3
Please Answer this question 4. Discuss design issues in code generation. Generate target code for the following basic block. t1 : = a + b t2 : = c ...
Ebrahim
Ebrahim
asked
Dec 18, 2023
Compiler Design
compiler-design
syntax-directed-translation
lexical-analysis
parsing
+
–
413
views
2
answers
0
votes
Compiler Construction : Timothy G. Griffin
Please Answer this question in detail step by step: 3. Translate the arithmetic expression (a + b * c) + d + (a + b * c) − d + e into: a). Syntax tree, (please draw) b). DAG (Directed Acyclic Graph) representation, (please Draw) c). Three-Address Code representation.
Please Answer this question in detail step by step: 3. Translate the arithmetic expression (a + b * c) + d + (a + b * c) − d + e into: a). Syntax tree, (please dr...
Ebrahim
Ebrahim
asked
Dec 18, 2023
Compiler Design
compiler-design
syntax-directed-translation
code-optimization
+
–
410
views
0
answers
0
votes
Compiler Design : Timothy G. Griffin
4. Consider the following grammar and their syntax directed translation (SDT) rules. S → S * A {S.val = S.val x A. val} S → A {S.val = A.val} A → A + B {A.val = A.val – B.val} B → (S)’ {B.val = 2} A → B {A.val = B.val} B → id {B.val = id.val} Calculate the evaluation value of the expression 4 * 6 + 3 * 7. Is it 45 or 84?
4. Consider the following grammar and their syntax directed translation (SDT) rules.S → S * A {S.val = S.val x A. val}S → A {S.val = A.val}A → A...
Ebrahim
Ebrahim
asked
Dec 18, 2023
Compiler Design
compiler-design
syntax-directed-translation
+
–
683
views
0
answers
0
votes
10. Give the translation scheme that converts infix to postfix form for the following grammar. Also generate the annotated parse tree for input string 2+6+1 E-> E+T E->T T->0|1|2|3|4|5|6|7|8|9
Give the translation scheme that converts infix to postfix form for the following grammar. Also generate the annotated parse tree for input string 2+6+1E- E+TE->TT->0|1|2...
ahmed65956
ahmed65956
asked
Sep 27, 2023
Compiler Design
syntax-directed-translation
computer-networks
packet-switching
routing
theory-of-computation
+
–
397
views
2
answers
1
votes
Unacademy Compiler Design Workbook
Consider the following statements: (A) LL (k) grammars have one to one correspondence with DCFLs. (B) LR (k) grammars have one to one correspondence with CFLs. A is true but B is false A is false but B is true Both are False Both are True
Consider the following statements:(A) LL (k) grammars have one to one correspondence with DCFLs.(B) LR (k) grammars have one to one correspondence with CFLs. A is true bu...
lovish_bhatia
lovish_bhatia
asked
Sep 12, 2023
Compiler Design
compiler-design
syntax-directed-translation
lexical-analysis
context-free-grammar
context-free-language
+
–
426
views
2
answers
1
votes
Unacademy Compiler Design Workbook
Conisder the following program: Main() { int x = 10; If (x<20 ; Else y = 20; } When lexical analyzer scanning the above program, how many lexical errors can be produced?
Conisder the following program:Main(){ int x = 10;If (x<20 ;Elsey = 20;}When lexical analyzer scanning the above program, how many lexical errors can be produced?
lovish_bhatia
lovish_bhatia
asked
Sep 12, 2023
Compiler Design
compiler-design
lexical-analysis
syntax-directed-translation
+
–
533
views
1
answers
0
votes
1. Consider the given grammar of syntax directed translation scheme and answer the following: (2 MARKS) X → X1/Y | Y Y → Z – Y1 | Z Z → 2 | 5 | 7 | 8 a. Write down the semantic rules of the above grammar productions b. Draw the annotated parse tree for 7-8-5/2
Consider the given grammar of syntax directed translation scheme and answer the following: (2 MARKS) ...
ahmed65956
ahmed65956
asked
Aug 3, 2023
Compiler Design
syntax-directed-translation
+
–
7.8k
views
2
answers
4
votes
GATE CSE 2023 | Question: 50
Consider the syntax directed translation given by the following grammar and semantic rules. Here $N, I, F$ and $B$ are non-terminals. $N$ is the starting non-terminal, and $\#, \mathbf{0}$ and $\mathbf{1}$ are lexical tokens ... \] The value computed by the translation scheme for the input string $10\#011$ is ____________. (Rounded off to three decimal places)
Consider the syntax directed translation given by the following grammar and semantic rules. Here $N, I, F$ and $B$ are non-terminals. $N$ is the starting non-terminal, an...
admin
admin
asked
Feb 15, 2023
Compiler Design
gatecse-2023
compiler-design
syntax-directed-translation
numerical-answers
2-marks
+
–
471
views
2
answers
0
votes
Attributes in syntax directed translation
Attributes are said to be of two type, synthesised and inherited. What actually is an attribute? Why an attribute exist, how to define it?
Attributes are said to be of two type, synthesised and inherited. What actually is an attribute? Why an attribute exist, how to define it?
Subhadeeppathak
Subhadeeppathak
asked
Nov 28, 2022
Compiler Design
syntax-directed-translation
compiler-design
+
–
Page:
1
2
3
4
5
6
...
8
next »
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register