Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Webpage for Compiler Design:
Recent questions tagged compiler-design
1
votes
0
answers
511
DAG doubt
How to represent array expressions using DAG? for example a=b[i]+c[j] how to represent this using DAG?
How to represent array expressions using DAG?for example a=b[i]+c[j]how to represent this using DAG?
aditi19
1.5k
views
aditi19
asked
Mar 31, 2019
Compiler Design
syntax-directed-translation
compiler-design
+
–
0
votes
0
answers
512
Compiler Design SDT Doubt
What is the SDT to eliminate redundant parenthesis from infix expressions with * and +? what is the concept behind removal of redundant parenthesis and how to start?
What is the SDT to eliminate redundant parenthesis from infix expressions with * and +? what is the concept behind removal of redundant parenthesis and how to start?
aditi19
477
views
aditi19
asked
Mar 29, 2019
Compiler Design
syntax-directed-translation
compiler-design
+
–
0
votes
0
answers
513
Ullman(2e) Exercise-5.4.2 page no-336 Syntax Directed Translation
Rewrite the following SDT: A->A {a} B | AB {b} | 0 B->B {c} A | BA {d} | 1 so that the underlying grammar becomes non-left-recursive. Here a, b, c and d are actions, and 0 and 1 are terminals is my solution correct? A→ 0A’ A’→ {a} BA’ | B {b} A’ | ε B→ 1B’ B’→ {c} AB’ | A {d} B’ | ε
Rewrite the following SDT:A->A {a} B | AB {b} | 0B->B {c} A | BA {d} | 1so that the underlying grammar becomes non-left-recursive. Here a, b, c and d are actions, and 0 a...
aditi19
1.3k
views
aditi19
asked
Mar 29, 2019
Compiler Design
compiler-design
syntax-directed-translation
left-recursion
+
–
0
votes
1
answer
514
Compiler Design LR(1) doubt
Can lookahead symbol be epsilon in LR(1) parsing? and pls give the LR(1) diagram for the following grammar? A->AB | a B->*AC | Cb | ∈ C->+ABc | ∈
Can lookahead symbol be epsilon in LR(1) parsing?andpls give the LR(1) diagram for the following grammar?A->AB | aB->*AC | Cb | ∈C->+ABc | ∈
aditi19
1.1k
views
aditi19
asked
Mar 25, 2019
Compiler Design
compiler-design
lr-parser
parsing
+
–
0
votes
0
answers
515
Ullman(Second Edition) Exercise 4.2.3. Question (a) (page no-207)
Design grammar for the language- set of all strings of 0s and 1s such that every 0 is immediately followed by at least one 1 is this correct? S->A | 01S A->1AS | ε
Design grammar for the language-set of all strings of 0s and 1s such that every 0 is immediately followed by at least one 1 is this correct?S->A | 01SA->1AS | ε
aditi19
590
views
aditi19
asked
Mar 22, 2019
Compiler Design
theory-of-computation
compiler-design
context-free-grammar
+
–
0
votes
0
answers
516
Allen Career Institute:Compiler Design
Consider the following syntax directed definition A → BC C.i = f1(A . i) ….. I B.i = f2(A . s) ….. II A.s = f3(B . s) ……. III I for inherited, s for synthesized attribute which of the following is TRUE? (1) (I) is violating L attributed definition (2) (II) is violating L attributed definition (3) (III) is violating L attributed definition (4) None of these
Consider the following syntax directed definition A → BCC.i = f1(A . i) ….. I B.i = f2(A . s) ….. II A.s = f3(B . s) ……. III I for inherited, s for synthesized...
srestha
419
views
srestha
asked
Mar 21, 2019
Compiler Design
compiler-design
+
–
1
votes
1
answer
517
Ullman Exercise
What language is generated by the following grammer? S→ a | S+S | SS | S* | (S)
What language is generated by the following grammer?S→ a | S+S | SS | S* | (S)
aditi19
457
views
aditi19
asked
Mar 19, 2019
Compiler Design
compiler-design
context-free-grammar
+
–
1
votes
2
answers
518
ME TEST1
Match the following List 1 Link time load time compile time Run time List 2 A. Resolving references B. Relocation C. Token Recognition D. Activation record
Match the followingList 1Link timeload timecompile timeRun timeList 2 A. Resolving references B. Relocation C. Token Recognition D. Activation record
himgta
682
views
himgta
asked
Mar 10, 2019
Compiler Design
compiler-design
runtime-environment
match-the-following
made-easy-test-series
+
–
1
votes
1
answer
519
Self-Doubt-Compiler
$L=\{x^n:n \in N\} \cup\{x^ny^n|n \in N\}$ This language does not have LL(k) parser while being deterministic context free.Why?
$L=\{x^n:n \in N\} \cup\{x^ny^n|n \in N\}$This language does not have LL(k) parser while being deterministic context free.Why?
Ayush Upadhyaya
756
views
Ayush Upadhyaya
asked
Mar 3, 2019
Compiler Design
compiler-design
context-free-language
ll-parser
descriptive
+
–
0
votes
3
answers
520
Error during compilation
fro(int I=0; I <5;I++); what kind of compilation error is this ?
fro(int I=0; I <5;I++);what kind of compilation error is this ?
VJ2793
670
views
VJ2793
asked
Feb 12, 2019
Compiler Design
compiler-design
lexical-analysis
descriptive
+
–
0
votes
1
answer
521
Predictive parsing
Get LL(1) parsing table for the following grammar A--> aCDq / aBg C --> p /Ct / BD / rAB D--> d B-->e
Get LL(1) parsing table for the following grammarA aCDq / aBgC p /Ct / BD / rABD dB >e
Sagar Chintawar
1.9k
views
Sagar Chintawar
asked
Feb 11, 2019
Compiler Design
compiler-design
parsing
ll-parser
descriptive
+
–
0
votes
1
answer
522
Predictive
Construct the predictive parsing table for the grammar and tell whether the grammar is LL(1) or not S --> (L) / a L --> L, S / S
Construct the predictive parsing table for the grammar and tell whether the grammar is LL(1) or notS (L) / aL L, S / S
Sagar Chintawar
678
views
Sagar Chintawar
asked
Feb 11, 2019
Compiler Design
compiler-design
parsing
ll-parser
true-false
+
–
0
votes
1
answer
523
#ComplierDesign #DragonsBook
For any context-free grammar there is a parser that takes at most O (n$^3$ ) time to parse a string of n terminals. True or False?
For any context-free grammar there is a parser that takes at most O (n$^3$ )time to parse a string of n terminals.True or False?
Reshu $ingh
907
views
Reshu $ingh
asked
Feb 9, 2019
Compiler Design
compiler-design
context-free-grammar
parsing
true-false
+
–
0
votes
1
answer
524
#self doubt
is it always true or not??? STATEMENT → in LR(0) Parsing i1 is a final state,there is a shift move. it always give S/R conflict. Explain with example.
is it always true or not???STATEMENT → in LR(0) Parsing i1 is a final state,there is a shift move. it always give S/R conflict.Explain with example.
sandeep singh gaur
369
views
sandeep singh gaur
asked
Feb 8, 2019
Compiler Design
parsing
compiler-design
+
–
13
votes
4
answers
525
GATE CSE 2019 | Question: 3
Which one of the following kinds of derivation is used by LR parsers? Leftmost Leftmost in reverse Rightmost Rightmost in reverse
Which one of the following kinds of derivation is used by LR parsers?LeftmostLeftmost in reverseRightmostRightmost in reverse
Arjun
9.6k
views
Arjun
asked
Feb 7, 2019
Compiler Design
gatecse-2019
compiler-design
parsing
1-mark
+
–
17
votes
3
answers
526
GATE CSE 2019 | Question: 19
Consider the grammar given below: $S \rightarrow Aa$ $A \rightarrow BD$ $B \rightarrow b \mid \epsilon $ $D \rightarrow d \mid \epsilon $ Let $a,b,d$ and $\$ be indexed as follows:$\begin{array}{|l|l|l|l|} \hline a & b & d & \$ \ ... $)$ , then the answer should be $3210$)
Consider the grammar given below:$S \rightarrow Aa$$A \rightarrow BD$$B \rightarrow b \mid \epsilon $$D \rightarrow d \mid \epsilon $Let $a,b,d$ and $\$$ be indexed as fo...
Arjun
20.2k
views
Arjun
asked
Feb 7, 2019
Compiler Design
gatecse-2019
numerical-answers
compiler-design
parsing
1-mark
+
–
21
votes
6
answers
527
GATE CSE 2019 | Question: 36
Consider the following grammar and the semantic actions to support the 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$
Consider the following grammar and the semantic actions to support the inherited type declaration attributes. Let $X_1, X_2, X_3, X_4, X_5$, and $X_6$ be the placeholders...
Arjun
16.6k
views
Arjun
asked
Feb 7, 2019
Compiler Design
gatecse-2019
compiler-design
syntax-directed-translation
2-marks
+
–
20
votes
4
answers
528
GATE CSE 2019 | Question: 43
Consider the augmented grammar given below: $S’ \rightarrow S$ $S \rightarrow \langle L \rangle \mid id$ $L \rightarrow L, S \mid S$ Let $I_0 = \text{CLOSURE} (\{[S’ \rightarrow \cdot S ]\}).$ The number of items in the set $\text{GOTO} (I_0, \langle \: )$ is______
Consider the augmented grammar given below:$S’ \rightarrow S$$S \rightarrow \langle L \rangle \mid id$$L \rightarrow L, S \mid S$Let $I_0 = \text{CLOSURE} (\{[S’ \rig...
Arjun
17.7k
views
Arjun
asked
Feb 7, 2019
Compiler Design
gatecse-2019
numerical-answers
compiler-design
grammar
2-marks
+
–
0
votes
1
answer
529
Self doubt
We know that a grammar is contain 1-left recursive 2-ambiguous 3-Common prefix Then grammar is not LL(1) If let I constructed M-TABLE or PARSE TABLE of grammar which is not contain left recursive and common prefixes . Let consider I am not able to find out ... not , If LL(1) parse table contains multiple choice in same row and column then Can I said that grammar is ambiguous or not?
We know that a grammar is contain1-left recursive2-ambiguous3-Common prefixThen grammar is not LL(1) If let I constructed M-TABLE or PARSE TABLEof grammar which is not co...
Ashish RajAnand
440
views
Ashish RajAnand
asked
Feb 5, 2019
Compiler Design
compiler-design
parsing
left-recursion
ll-parser
descriptive
+
–
0
votes
0
answers
530
LR(1) doubt
In exam if they are mentioning LR(1) parser Then which parser to consider: SLR(1) / LALR(1) / CLR(1)
In exam if they are mentioning LR(1) parserThen which parser to consider:SLR(1) / LALR(1) / CLR(1)
Nandkishor3939
292
views
Nandkishor3939
asked
Jan 31, 2019
Compiler Design
compiler-design
+
–
0
votes
0
answers
531
Self dout
Which phase of the compiler detects the error? #include<stdio.h> int main() { printf(“%d”,2..3); return 0; } I think lexical analyzer am i correct?
Which phase of the compiler detects the error?#include<stdio.h>int main(){printf(“%d”,2..3);return 0;}I think lexical analyzer am i correct?
sreenivas.s1995
461
views
sreenivas.s1995
asked
Jan 30, 2019
Compiler Design
compiler-design
error-detection
+
–
0
votes
0
answers
532
Made easy
I am having difficulty in finding the type of errors like if given a statement, if I have to tell which type of error it is ( syntax or semantic). Can anyone help me with it,explain it to me in a simple language by giving examples.
I am having difficulty in finding the type of errors like if given a statement, if I have to tell which type of error it is ( syntax or semantic). Can anyone help me with...
Jyoti Kumari97
405
views
Jyoti Kumari97
asked
Jan 29, 2019
Compiler Design
compiler-design
compilation-phases
+
–
1
votes
0
answers
533
Self curiosity
Can a grammar be both right recursive and ambiguous ? How?
Can a grammar be both right recursive and ambiguous ? How?
Shashankesh Upadhyay
274
views
Shashankesh Upadhyay
asked
Jan 28, 2019
Compiler Design
compiler-design
theory-of-computation
+
–
0
votes
2
answers
534
Made Easy Test Series
b = b + c d = b + d b = b – d e = d + b The minimum number of nodes and edges present in the DAG representation of above basic block respectively are ? 4 and 5 5 and 4 6 and 6 6 and 7
b = b + cd = b + db = b – de = d + bThe minimum number of nodes and edges present in the DAG representation of above basic block respectively are ?4 and 55 and 46 and 6...
balraj_allam
2.4k
views
balraj_allam
asked
Jan 27, 2019
Compiler Design
compiler-design
code-optimization
directed-acyclic-graph
made-easy-test-series
+
–
1
votes
1
answer
535
Ace Test Series: Compilers - Parsers
Na462
1.4k
views
Na462
asked
Jan 26, 2019
Compiler Design
compiler-design
lr-parser
ace-test-series
+
–
1
votes
1
answer
536
Ace Test Series: Compilers - Parser
Na462
396
views
Na462
asked
Jan 26, 2019
Compiler Design
compiler-design
lr-parser
ace-test-series
+
–
0
votes
1
answer
537
how to check grammar is lr(1)?
consider the grammar G: S->A|B A->a|c B->b|c where {S,A,B} are non-terminals,{a,b,c} are terminals. Does LR(1) can parse all strings that are generated by grammar G.? Please any one help me to how to check it?
consider the grammar G: S->A|B A->a|c B->b|c where {S,A,B} are non-terminals,{a,b,c} are terminals.Does LR(1) can parse all strings that are generated by gr...
abc1
4.0k
views
abc1
asked
Jan 26, 2019
Compiler Design
compiler-design
grammar
parsing
lr-parser
+
–
6
votes
2
answers
538
GATE Overflow | Compiler Design | Test 1 | Parsing | Question: 1
If we merge states in LR(1) parser to form a LALR(1) parser, we may introduce shift-reduce conflict reduce-reduce conflict no extra conflict both shift-reduce as well as reduce-reduce
If we merge states in LR(1) parser to form a LALR(1) parser, we may introduceshift-reduce conflictreduce-reduce conflictno extra conflictboth shift-reduce as well as redu...
Arjun
1.7k
views
Arjun
asked
Jan 26, 2019
Compiler Design
go-cd-1
compiler-design
parsing
+
–
0
votes
1
answer
539
#ReferenceBook #FutureProspect
Which reference book you guys use for Compiler Design? What are the research prospect in this domain?
Which reference book you guys use for Compiler Design?What are the research prospect in this domain?
Reshu $ingh
276
views
Reshu $ingh
asked
Jan 26, 2019
Compiler Design
compiler-design
reference-book
+
–
0
votes
1
answer
540
#General #Compilers
If we have more than 1 parse tree,but one is LMD and other is RMD , Is Grammar Ambiguous? There are no other parse tree other than these two.
If we have more than 1 parse tree,but one is LMD and other is RMD , Is Grammar Ambiguous?There are no other parse tree other than these two.
Reshu $ingh
820
views
Reshu $ingh
asked
Jan 25, 2019
Compiler Design
compiler-design
parsing
+
–
Page:
« prev
1
...
13
14
15
16
17
18
19
20
21
22
23
...
68
next »
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register