Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Recent questions tagged syntax-directed-translation
2
votes
1
answer
1
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
2.5k
views
Arjun
asked
Feb 16
Compiler Design
gatecse2024-set2
compiler-design
syntax-directed-translation
multiple-selects
+
–
0
votes
2
answers
2
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
1.9k
views
Arjun
asked
Feb 16
Compiler Design
gatecse2024-set1
compiler-design
syntax-directed-translation
+
–
2
votes
1
answer
3
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
814
views
GO Classes
asked
Feb 5
Compiler Design
goclasses2024-mockgate-14
compiler-design
syntax-directed-translation
multiple-selects
1-mark
+
–
0
votes
1
answer
4
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
144
views
Ebrahim
asked
Jan 31
Compiler Design
compiler-design
syntax-directed-translation
code-optimization
parsing
ullman
+
–
3
votes
1
answer
5
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
526
views
GO Classes
asked
Jan 28
Compiler Design
goclasses2024-mockgate-13
goclasses
compiler-design
syntax-directed-translation
multiple-selects
2-marks
+
–
0
votes
0
answers
6
is there something wrong in the production rules?
pcla
95
views
pcla
asked
Jan 27
Compiler Design
syntax-directed-translation
compiler-design
+
–
0
votes
1
answer
7
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
171
views
Ebrahim
asked
Jan 12
Compiler Design
compiler-design
syntax-directed-translation
lexical-analysis
ullman
parsing
+
–
0
votes
0
answers
8
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
106
views
Ebrahim
asked
Jan 11
Compiler Design
compiler-design
parsing
ullman
syntax-directed-translation
code-optimization
+
–
0
votes
0
answers
9
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
138
views
Ebrahim
asked
Jan 10
Compiler Design
compiler-design
syntax-directed-translation
parsing
code-optimization
+
–
0
votes
1
answer
10
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
275
views
Ebrahim
asked
Dec 18, 2023
Compiler Design
compiler-design
syntax-directed-translation
lexical-analysis
parsing
+
–
0
votes
1
answer
11
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
284
views
Ebrahim
asked
Dec 18, 2023
Compiler Design
compiler-design
syntax-directed-translation
lexical-analysis
parsing
+
–
0
votes
2
answers
12
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
313
views
Ebrahim
asked
Dec 18, 2023
Compiler Design
compiler-design
syntax-directed-translation
code-optimization
+
–
0
votes
0
answers
13
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
322
views
Ebrahim
asked
Dec 18, 2023
Compiler Design
compiler-design
syntax-directed-translation
+
–
0
votes
0
answers
14
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
620
views
ahmed65956
asked
Sep 27, 2023
Compiler Design
syntax-directed-translation
computer-networks
packet-switching
routing
theory-of-computation
+
–
1
votes
2
answers
15
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
364
views
lovish_bhatia
asked
Sep 12, 2023
Compiler Design
compiler-design
syntax-directed-translation
lexical-analysis
context-free-grammar
context-free-language
+
–
1
votes
2
answers
16
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
346
views
lovish_bhatia
asked
Sep 12, 2023
Compiler Design
compiler-design
lexical-analysis
syntax-directed-translation
+
–
0
votes
1
answer
17
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
474
views
ahmed65956
asked
Aug 3, 2023
Compiler Design
syntax-directed-translation
+
–
4
votes
2
answers
18
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
7.2k
views
admin
asked
Feb 15, 2023
Compiler Design
gatecse-2023
compiler-design
syntax-directed-translation
numerical-answers
2-marks
+
–
0
votes
2
answers
19
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
449
views
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