Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Webpage for Compiler Design:
Recent questions tagged compiler-design
0
votes
1
answer
1831
Deciding grammar type
shikharV
478
views
shikharV
asked
Nov 19, 2015
Compiler Design
compiler-design
grammar
test-series
+
–
0
votes
1
answer
1832
Deciding grammar
Given answer: D Solution to this problems says that the grammar is same as dangling else problem. Please explain me how.
Given answer: DSolution to this problems says that the grammar is same as dangling else problem. Please explain me how.
shikharV
470
views
shikharV
asked
Nov 19, 2015
Compiler Design
compiler-design
grammar
test-series
+
–
0
votes
2
answers
1833
Counting number of lexemes
The number of lexemes in the statement in FORTRAN DO 10 I = 100 is __________ .
The number of lexemes in the statement in FORTRANDO 10 I = 100is __________ .
shikharV
1.9k
views
shikharV
asked
Nov 19, 2015
Compiler Design
compiler-design
lexical-analysis
compiler-tokenization
+
–
2
votes
2
answers
1834
how to solve it??
Consider the following LL(1) grammar. E → TE′ E′ → + E|ε T → FT′ T′ → T|ε F → GF′ F′ → *F′|ε G → (E)|a|b|c Initially stack contains two symbols. Bottom of stack symbol is $ and top of stack (above $) symbol is E where E is start symbol of the grammar. The number of symbols on the stack after the sixth action taken by LL(1) parser to parse the input “ab*” are ______.
Consider the following LL(1) grammar.E → TE′E′ → + E|εT → FT′T′ → T|εF → GF′F′ → *F′|εG → (E)|a|b|cInitially stack contains two symbols. Bo...
Hira Thakur
4.2k
views
Hira Thakur
asked
Nov 16, 2015
Compiler Design
compiler-design
parsing
ll-parser
+
–
1
votes
1
answer
1835
ambigious grammer
how to verify weather given grammer is ambigious or not???
how to verify weather given grammer is ambigious or not???
Hira Thakur
634
views
Hira Thakur
asked
Nov 16, 2015
Compiler Design
compiler-design
grammar
ambiguous-grammar
+
–
4
votes
3
answers
1836
GATE CSE 1991 | Question: 01,xi
The arithmetic expression $(a+b) * c- d/e ** l$ is to be evaluated on a two address machine, where each operand is either a register or a memory location. With a minimum number of memory accesses of operands.the number of registers required to evaluate this expression is ______. The number of memory accesses of operands is ____________
The arithmetic expression$$(a+b) * c- d/e l$$is to be evaluated on a two address machine, where each operand is either a register or a memory location. With a minimum n...
ibia
1.7k
views
ibia
asked
Nov 14, 2015
Compiler Design
gate1991
compiler-design
register-allocation
out-of-gate-syllabus
+
–
3
votes
3
answers
1837
Couting the number of reduce moves
The maximum number of reduce moves that can be taken by a bottom-up parser with no epsilon and unit productions to parse a string of length 3 tokens is ____ ?
The maximum number of reduce moves that can be taken by a bottom-up parser with no epsilon and unit productions to parse a string of length 3 tokens is ____ ?
shikharV
804
views
shikharV
asked
Nov 13, 2015
Compiler Design
compiler-design
context-free-grammar
compiler-tokenization
numerical-answers
+
–
16
votes
2
answers
1838
TIFR CSE 2012 | Part B | Question: 17
Which of the following correctly describes $\text{LR}(k)$ parsing? The input string is alternately scanned left to right and right to left with $k$ reversals. Input string is scanned once left to right with rightmost derivation and $k$ symbol ... string is scanned from left to right once with $k$ symbol to the right as look-ahead to give left-most derivation.
Which of the following correctly describes $\text{LR}(k)$ parsing?The input string is alternately scanned left to right and right to left with $k$ reversals.Input string ...
makhdoom ghaya
2.5k
views
makhdoom ghaya
asked
Nov 2, 2015
Compiler Design
tifr2012
compiler-design
parsing
lr-parser
+
–
3
votes
0
answers
1839
Links to study Data flow analysis and register allocation using graph coloring.
All the links that I could find on the web were too long. Kindly refer a video or a web link that you may find easier to grasp from?
All the links that I could find on the web were too long. Kindly refer a video or a web link that you may find easier to grasp from?
Akshay Jindal
541
views
Akshay Jindal
asked
Nov 1, 2015
Compiler Design
compiler-design
target-code-generation
+
–
19
votes
2
answers
1840
TIFR CSE 2012 | Part B | Question: 8
Consider the parse tree Assume that $*$ has higher precedence than $+$, $-$ and operators associate right to left (i.e $(a + b + c= (a + (b + c)))$. Consider $2 + a - b$ $2 + a - b * a + b$ ... The parse tree corresponds to Expression (i) Expression (ii) Expression (iv) only Expression (ii), (iii), and (iv) Expression (iii) and (iv) only
Consider the parse treeAssume that $*$ has higher precedence than $+$, $-$ and operators associate right to left (i.e $(a + b + c= (a + (b + c)))$. Consider$2 + a - b$$2 ...
makhdoom ghaya
2.7k
views
makhdoom ghaya
asked
Oct 31, 2015
Compiler Design
tifr2012
compiler-design
parsing
operator-precedence
+
–
2
votes
6
answers
1841
Simplified CFG
Consider the following grammar $S\rightarrow Aa\mid B $ $B\rightarrow a\mid BC$ $C \rightarrow a\mid \in$ the no of productions in simplified cfg is
Consider the following grammar$S\rightarrow Aa\mid B $$B\rightarrow a\mid BC$$C \rightarrow a\mid \in$the no of productions in simplified cfg is
Pooja Palod
3.3k
views
Pooja Palod
asked
Oct 26, 2015
Compiler Design
compiler-design
context-free-grammar
+
–
2
votes
1
answer
1842
Which of the following is correct?
Which of following is correct? 1). Drawback with static allocation is that it does not support recursion. 2). Drawback with stack allocation is that, when function completes its execution it will be popped out from stack.. 3). Both are correct 4).None of above
Which of following is correct?1). Drawback with static allocation is that it does not support recursion.2). Drawback with stack allocation is that, when function complete...
Pooja Palod
849
views
Pooja Palod
asked
Oct 19, 2015
Compiler Design
compiler-design
static-single-assignment
+
–
4
votes
1
answer
1843
Given a left recursive grammar. Whether LL(1) or not?
Do we directly say it is not LL(1) because it is left recursive or do we eliminate the left recursion, create the parsing table and then make a decision.
Do we directly say it is not LL(1) because it is left recursive or do we eliminate the left recursion, create the parsing table and then make a decision.
Akshay Jindal
3.6k
views
Akshay Jindal
asked
Oct 19, 2015
Compiler Design
parsing
compiler-design
+
–
1
votes
3
answers
1844
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 _______
Consider the following SDT,S → M {PRINT “2”;} AM → 1 {PRINT “ ”;}A → D {PRINT “1”;} ED → 2 {PRINT “ ”;}E → E {PRINT “ ”;} AE → 3 {PRINT �...
worst_engineer
4.9k
views
worst_engineer
asked
Oct 18, 2015
Compiler Design
compiler-design
syntax-directed-translation
numerical-answers
+
–
5
votes
4
answers
1845
Find number of variables in optimized code
Consider following 3 address code t1 = t+e t2 = g+a t3 = t1*t2 t4 = t2+t2 t5 = t4+t3 The minimum number of temporary variables that can be used in equivalent 3-address code of above code is Approach: t = t+e, g = g+a, t = t*g, g = g+g,t = t+g. Hence 4 temporary variables are needed. Is this right?
Consider following 3 address codet1 = t+et2 = g+at3 = t1*t2t4 = t2+t2t5 = t4+t3The minimum number of temporary variables that can be used in equivalent 3-address code of ...
Kitty Kat
2.4k
views
Kitty Kat
asked
Oct 12, 2015
Compiler Design
compiler-design
intermediate-code
three-address-code
+
–
6
votes
4
answers
1846
ISRO2008-38
Relative to the program translated by a compiler, the same program when interpreted runs Faster Slower At the same speed May be faster or slower
Relative to the program translated by a compiler, the same program when interpreted runsFasterSlowerAt the same speedMay be faster or slower
अनुराग पाण्डेय
3.9k
views
अनुराग पाण्डेय
asked
Oct 4, 2015
Compiler Design
isro2008
compiler-design
intermediate-code
+
–
5
votes
1
answer
1847
Difference between relocatable machine code and absolute machine code!!!1
Difference between relocatable machine code and absolute machine code!!!1
Difference between relocatable machine code and absolute machine code!!!1
pyuri
11.1k
views
pyuri
asked
Oct 4, 2015
Compiler Design
compiler-design
intermediate-code
+
–
4
votes
2
answers
1848
what is viable prefix?
Can someone describe what is a viable prefix with an example?
Can someone describe what is a viable prefix with an example?
Suvam Chatterjee
14.2k
views
Suvam Chatterjee
asked
Sep 28, 2015
Compiler Design
compiler-design
viable-prefix
+
–
0
votes
1
answer
1849
Find First of Non Terminal
Find the first of RHS of $A \rightarrow AB/\epsilon$
Find the first of RHS of $A \rightarrow AB/\epsilon$
Mojo-Jojo
1.1k
views
Mojo-Jojo
asked
Sep 21, 2015
Compiler Design
compiler-design
first-and-follow
+
–
10
votes
4
answers
1850
ISRO2008-68
Which of the following class of statement usually produces no executable code when compiled? declaration assignment statements input and output statements structural statements
Which of the following class of statement usually produces no executable code when compiled?declarationassignment statementsinput and output statementsstructural statemen...
ajit
8.4k
views
ajit
asked
Sep 20, 2015
Compiler Design
isro2008
compiler-design
code-optimization
+
–
8
votes
4
answers
1851
ISRO2014-5
What is the number of steps required to derive the string $((()\; ())\; ())$ for the following grammar? $S \to SS$ $S \to (S)$ $S \to \varepsilon$ $10$ $12$ $15$ $16$
What is the number of steps required to derive the string $((()\; ())\; ())$ for the following grammar?$S \to SS$$S \to (S)$$S \to \varepsilon$ $10$ $12$ ...
ajit
9.3k
views
ajit
asked
Sep 20, 2015
Compiler Design
isro2014
compiler-design
parsing
+
–
0
votes
2
answers
1852
The output for SDT
The output for SDT is E -> E+E printf("+") E -> a printf("a") for a + a + a is
The output for SDT isE - E+E printf("+")E - a printf("a")for a + a + a is
worst_engineer
659
views
worst_engineer
asked
Sep 12, 2015
Compiler Design
compiler-design
syntax-directed-translation
+
–
1
votes
2
answers
1853
Which type of conflict is present ?
Hi , I am confused about this grammar . I can find there is one SR conflict , please clarify. S -> Aa | bAc | dc | bda A -> d Here , it is not LL1 as A -> bAc and S -> bda both need to placed in the same cell. Also , should I say that S -> Aa and A -> d are also SR conflicts as they both derive d ? And for that it is not LR(0) as well .
Hi , I am confused about this grammar .I can find there is one SR conflict , please clarify. S - Aa | bAc | dc | bdaA - d Here , it is not LL1 as A - bAc and S - bda both...
worst_engineer
1.9k
views
worst_engineer
asked
Sep 11, 2015
Compiler Design
compiler-design
parsing
lr-parser
ll-parser
+
–
2
votes
3
answers
1854
SET OF VIABLE PREFIXES FOR A GIVEN SLR(1) GRAMMAR IS REGULAR LANGUAGE ?
SET OF VIABLE PREFIXES FOR A GIVEN SLR(1) GRAMMAR IS REGULAR LANGUAGE ?
SET OF VIABLE PREFIXES FOR A GIVEN SLR(1) GRAMMAR IS REGULAR LANGUAGE ?
Ankit Chourasiya
1.4k
views
Ankit Chourasiya
asked
Sep 9, 2015
Compiler Design
compiler-design
parsing
lr-parser
viable-prefix
+
–
3
votes
2
answers
1855
symbol table search
Access time of the symbol table will be logarithmic, if it is implemented by a linear list search tree hash table none of the above
Access time of the symbol table will be logarithmic, if it is implemented by alinear list search tree hash table none of the above
Anonymous
7.8k
views
Anonymous
asked
Sep 7, 2015
Compiler Design
compiler-design
symbol-table
+
–
3
votes
3
answers
1856
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
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 – attr...
ari
6.8k
views
ari
asked
Sep 6, 2015
Compiler Design
compiler-design
syntax-directed-translation
+
–
7
votes
1
answer
1857
Can Regular Grammar be ambiguous ?
Aditya
8.9k
views
Aditya
asked
Aug 6, 2015
Compiler Design
compiler-design
regular-grammar
ambiguous
+
–
4
votes
3
answers
1858
Viable Prefix
Suvam Chatterjee
2.8k
views
Suvam Chatterjee
asked
Jul 18, 2015
Compiler Design
compiler-design
parsing
viable-prefix
test-series
+
–
0
votes
1
answer
1859
Regular or Context Free Grammar?
Consider the following statement: if (expression) statement else statement Which of the following describe the above statement? A). Regular grammar B). Context free grammar C). Both (A) and (B) D). None of these
Consider the following statement:if (expression) statement else statement Which of the following describe the above statement?A). Regular grammarB). Context free grammarC...
prasitamukherjee
1.9k
views
prasitamukherjee
asked
Jul 17, 2015
Compiler Design
compiler-design
regular-grammar
context-free-grammar
+
–
2
votes
6
answers
1860
Why is left recursion not a problem for bottom up parsers?
I know the parsing logic of bottom up parsers, that they start from the terminal and reduce it to the start symbol. But what really confuses me is the construction of LR(0)/LR(1) sets : Eg : S->Sa|a Then in LR(0) set : ... is in front of S , so shouldn't the S production be generated again and again and make it go to an inf. loop?
I know the parsing logic of bottom up parsers, that they start from the terminal and reduce it to the start symbol. But what really confuses me is the construction of LR(...
prasitamukherjee
10.6k
views
prasitamukherjee
asked
Jul 16, 2015
Compiler Design
compiler-design
parsing
lr-parser
+
–
Page:
« prev
1
...
57
58
59
60
61
62
63
64
65
66
67
68
next »
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register