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
1801
SR conflict
Which of the following set could result SR conflict in LALR(1)? a) A→ a.b, {b} B→ a. , {a} b) A→ a.a , {a} B→ a. , {b} c) A→ b.a , {b} B→ b.,{a} d) A→ b.b , {a} B→ b. , {a}
Which of the following set could result SR conflict in LALR(1)?a) A→ a.b, {b} B→ a. , {a}b) A→ a.a , {a} B→ a. , {b}c) A→ b.a , {b} B→ b.,{a}d) A→ b...
srestha
1.6k
views
srestha
asked
Dec 15, 2015
Compiler Design
compiler-design
parsing
lr-parser
+
–
1
votes
2
answers
1802
Compiler
Consider the following grammer S→ bAd /bBe A→a B→a The above grammer is ________________ 1) SLR(1) 2) LALR(1) but not SLR(1) 3) CLR(1) but not LALR(1) d) Not LR(1)
Consider the following grammerS→ bAd /bBeA→aB→aThe above grammer is ________________1) SLR(1)2) LALR(1) but not SLR(1)3) CLR(1) but not LALR(1)d) Not LR(1)
srestha
437
views
srestha
asked
Dec 14, 2015
Compiler Design
compiler-design
parsing
lr-parser
numerical-answers
+
–
1
votes
3
answers
1803
SR conflict
Which of the following could result in Shift-Reduce conflict in LR(0) parser? 1){ A→ b.c ,B→b. } 2){A→a.b,B→b. } 3) {A→∊. , B→.a} 4)All of these
Which of the following could result in Shift-Reduce conflict in LR(0) parser?1){ A→ b.c ,B→b. }2){A→a.b,B→b. }3) {A→∊. , B→.a}4)All of these
srestha
2.4k
views
srestha
asked
Dec 14, 2015
Compiler Design
compiler-design
parsing
lr-parser
+
–
0
votes
2
answers
1804
CLR
S'→S S→A/B A→fAi/n B→fBii/d For the above augmented grammer , the number of states in LR(1) parser are_______________
S'→SS→A/BA→fAi/nB→fBii/dFor the above augmented grammer , the number of states in LR(1) parser are_______________
srestha
537
views
srestha
asked
Dec 14, 2015
Compiler Design
compiler-design
parsing
lr-parser
numerical-answers
+
–
0
votes
1
answer
1805
LR(1) parser query 1
Ques:- Check whether the following grammar is clr(1) grammar or not or lalr grammar or not. S -> (S) S -> a Problem- The work( for checking the given grammar is LR(1) or not) done by me as shown in figure....is it right approach for LR(1)?
Ques:- Check whether the following grammar is clr(1) grammar or not or lalr grammar or not.S - (S)S - aProblem-The work( for checking the given grammar is LR(1) or not) d...
khushtak
520
views
khushtak
asked
Dec 14, 2015
Compiler Design
compiler-design
lr-parser
+
–
2
votes
1
answer
1806
Compiler
Consider the following statements 1.Compiler produce executable binary object file whereas an interpreter produce code , both executable can run many times. 2. Before translation , compiler and interpreter reads all of the input file. Which of the following statement are true ?
Consider the following statements1.Compiler produce executable binary object file whereas an interpreter produce code , both executable can run many times.2. Before trans...
Umang Raman
551
views
Umang Raman
asked
Dec 12, 2015
Compiler Design
compiler-design
compilation-phases
+
–
2
votes
2
answers
1807
Compiler general query LL(1)
check whether the following grammer is ll(1) grammar or not and also find the table entry of [A,a]. S ->A, A->aB/Ab, B->bBC/d, C->d Why is this not a LL(1) grammar?
check whether the following grammer is ll(1) grammar or not and also find the table entry of [A,a].S ->A,A->aB/Ab,B->bBC/d,C->dWhy is this not a LL(1) grammar?
khushtak
1.1k
views
khushtak
asked
Dec 12, 2015
Compiler Design
compiler-design
ll-parser
+
–
5
votes
2
answers
1808
syntax and semantic errors
What is the difference in between lexical, syntax and semantic errors? Please give appropriate example also.
What is the difference in between lexical, syntax and semantic errors?Please give appropriate example also.
nakshatra
3.8k
views
nakshatra
asked
Dec 11, 2015
Compiler Design
compiler-design
lexical-analysis
+
–
2
votes
1
answer
1809
Is Intermediate code generation part of analyis or synthesis phase?
During code generation, we need to do register allocation (kind of machine dependent stuff). So, I think it must be the part of Synthesis phase?
During code generation, we need to do register allocation (kind of machine dependent stuff). So, I think it must be the part of Synthesis phase?
monanshi
1.9k
views
monanshi
asked
Dec 10, 2015
Compiler Design
compiler-design
intermediate-code
+
–
3
votes
1
answer
1810
LL(*) grammar
give example for LL(*) grammar
give example for LL(*) grammar
Pooja Palod
341
views
Pooja Palod
asked
Dec 10, 2015
Compiler Design
compiler-design
parsing
+
–
0
votes
3
answers
1811
How to evaluate given DAG ?
In this one I am unable to follow in the above node marked as "-" ,it has two edges one upward and one downward for "+" node so then how to proceed with this ?
In this one I am unable to follow in the above node marked as "-" ,it has two edges one upward and one downward for "+" node so then how to proceed with this ?
radha gogia
1.3k
views
radha gogia
asked
Dec 9, 2015
Compiler Design
compiler-design
code-optimization
directed-acyclic-graph
numerical-answers
test-series
+
–
2
votes
3
answers
1812
lexical anayzer
can int a=a 10 is a lexical or not if yes then why ??? if no then give reason?
can int a=a 10 is a lexical or notif yes then why ???if no then give reason?
simergarg
603
views
simergarg
asked
Dec 7, 2015
Compiler Design
compiler-design
lexical-analysis
+
–
2
votes
1
answer
1813
what is the difference between lookahead symbol and follow of a non-terminal ?
radha gogia
2.4k
views
radha gogia
asked
Dec 7, 2015
Compiler Design
compiler-design
parsing
first-and-follow
+
–
1
votes
1
answer
1814
what is the lookahead symbol in LL(1) grammar ?
Top down parsers parse LL(K) grammar ,Now if we talk about recursive descent parsers they just scan each input symbol and then perform their respective function calls ,or even LL(1) parsers also see the input symbol and accordingly chose the ... then push the symbols onto stack so then where do they see the look-ahead symbols, I am not getting this .
Top down parsers parse LL(K) grammar ,Now if we talk about recursive descent parsers they just scan each input symbol and then perform their respective function calls ,or...
radha gogia
4.2k
views
radha gogia
asked
Dec 6, 2015
Compiler Design
compiler-design
parsing
ll-parser
+
–
3
votes
1
answer
1815
Is there any difference between derivation tree and parse tree ?
I have gone through this link and found that both are synonyms to each other but I am not getting that when we have more than one parse tree for a string so do we say that the grammar is ambiguous ... right-most derivation tree . http://stackoverflow.com/questions/5729961/any-differences-between-terms-parse-trees-and-derivation-trees
I have gone through this link and found that both are synonyms to each other but I am not getting that when we have more than one parse tree for a string so do we say tha...
radha gogia
2.4k
views
radha gogia
asked
Dec 6, 2015
Compiler Design
compiler-design
parsing
+
–
11
votes
2
answers
1816
LL(1) expressive power
Does there exist LL(1) grammar for every Regular Language ? OR For Every Regular Language there exist atleast one LL(1) Grammar . True /False
Does there exist LL(1) grammar for every Regular Language ? ORFor Every Regular Language there exist atleast one LL(1) Grammar . True /False
Himanshu1
3.0k
views
Himanshu1
asked
Dec 5, 2015
Compiler Design
compiler-design
parsing
theory-of-computation
regular-language
+
–
1
votes
5
answers
1817
When LALR(1) is constructed form CLR(1) does not contain any shift reduce conflicts?
Soumyashree
6.7k
views
Soumyashree
asked
Dec 4, 2015
Compiler Design
compiler-design
parsing
lr-parser
+
–
2
votes
1
answer
1818
SDT
in top down parsing while constructing parse tree , semantic actions are considered as child of Variable (ie part of production on RHS) how we can decide this as the right child or left child in parse tree ? if not getting my question ? explain sdt using top down parsing ?
in top down parsing while constructing parse tree , semantic actions are considered as child of Variable (ie part of production on RHS)how we can decide this as the right...
tiger
815
views
tiger
asked
Dec 3, 2015
Compiler Design
compiler-design
syntax-directed-translation
+
–
2
votes
2
answers
1819
LL(1)Grammar
First one not LL1 as it is ambigous,option c is left recursive,cant decide about option b.... plss help..
First one not LL1 as it is ambigous,option c is left recursive,cant decide about option b.... plss help..
resuscitate
1.8k
views
resuscitate
asked
Nov 28, 2015
Compiler Design
compiler-design
+
–
5
votes
2
answers
1820
Reference to a formal list of Tokens in C
How many tokens are there in each -> int *ptr = &x; ++a >= != x += 10; Token should be counted before pre-processing or after it? from my experience only, I'm able to identify what are considered as tokens are and ... all tokens are there in C. Does a token depends on what compiler is in use? Create a standard list of tokens for GATE exam.
How many tokens are there in each->int *ptr = &x;++a>=!=x += 10;Token should be counted before pre-processing or after it?from my experience only, I'm able to identify wh...
amarVashishth
1.2k
views
amarVashishth
asked
Nov 24, 2015
Compiler Design
programming-in-c
compiler-design
+
–
1
votes
0
answers
1821
Syntax analyzer vs semantic analyzer
Choose the correct statement with respect to the syntax analysis of a compiler (A) it can not always be modeled by a BNF grammar, but by a cfg (B) it can be modeled by push down automata which is What a parser is all about (C) it checks both the form & meaning of the program in a HLL (D) none of the above Given ans: C
Choose the correct statement with respect to the syntax analysis of a compiler (A) it can not always be modeled by a BNF grammar, but by a cfg (B) it can be modeled by pu...
shikharV
818
views
shikharV
asked
Nov 22, 2015
Compiler Design
compiler-design
+
–
8
votes
2
answers
1822
CFG for lexical analysis
A context free grammar can be used to model the lexical concerns of a HLL. This is not normally done and a regular grammar is used for the structure of lexemes because (A) The cfg will blow up unnecessarily (B) The structure of lexemes can be described by the simpler regular grammar (C) There is a separation of concerns which controls complexity. (D) All of the above
A context free grammar can be used to model the lexical concerns of a HLL. This is not normally done and a regular grammar is used for the structure of lexemes because(A)...
shikharV
2.4k
views
shikharV
asked
Nov 22, 2015
Compiler Design
compiler-design
lexical-analysis
+
–
3
votes
2
answers
1823
What happens if LALR(1) machine is constructed for the below grammer ? Justify Each Option
Grammar S $\rightarrow$ S1 S1 $\rightarrow$ S1 = S1 | a Where = is the assignment operator in C LALR(1) Machine cannot be constructed with this grammer inadequate states can be resolved using the ... associative inadequate states can be resolved using the fact that the = is right associative Both 2 and 3
Grammar S $\rightarrow$ S1S1 $\rightarrow$ S1 = S1 | aWhere = is the assignment operator in CLALR(1) Machine cannot be constructed with this grammerinadequate states can ...
pC
623
views
pC
asked
Nov 20, 2015
Compiler Design
parsing
compiler-design
+
–
2
votes
3
answers
1824
Macro Expansion is done in which phase of compiler ?
pC
2.6k
views
pC
asked
Nov 19, 2015
Compiler Design
compiler-design
lexical-analysis
+
–
3
votes
3
answers
1825
Dangling else problem
The dangling else problem in the construct If (E) sales S | is (E) S | a can be resolved IN SDTS by (A) Using the associative & precedence of operating & the 'exe' munch principle (B) By change the grammar to an unambiguous one (C) Cannot be removed as it Is undecidable (D) None of the above
The dangling else problem in the construct If (E) sales S | is (E) S | a can be resolved IN SDTS by(A) Using the associative & precedence of operating & the 'exe' munch p...
shikharV
2.3k
views
shikharV
asked
Nov 19, 2015
Compiler Design
compiler-design
syntax-directed-translation
+
–
1
votes
1
answer
1826
Finding number of right derivation
Given answer: 1 I am able to get 2 rightmost derivation of 'a+a' First: S -> E + E -> E + a -> a + a Second: S -> E + E -> E + a -> a + a Total derivation -> 2
Given answer: 1I am able to get 2 rightmost derivation of 'a+a'First:S - E + E - E + a - a + aSecond:S - E + E - E + a - a + aTotal derivation - 2
shikharV
401
views
shikharV
asked
Nov 19, 2015
Compiler Design
compiler-design
parsing
test-series
+
–
1
votes
3
answers
1827
Question on lexical analyzer
Given answer: D Please explain
Given answer: DPlease explain
shikharV
2.4k
views
shikharV
asked
Nov 19, 2015
Compiler Design
compiler-design
lexical-analysis
ace-test-series
+
–
0
votes
1
answer
1828
Problem on syntax analyzer
Given answer: C But I believe that syntax analyzer is just for checking the form of the source code. The meaning of the program is interpreted in semantic analyzer phase of the compiler. Please correct me if I am wrong.
Given answer: CBut I believe that syntax analyzer is just for checking the form of the source code. The meaning of the program is interpreted in semantic analyzer phase o...
shikharV
544
views
shikharV
asked
Nov 19, 2015
Compiler Design
compiler-design
lexical-analysis
ace-test-series
+
–
0
votes
1
answer
1829
Deciding grammar type
shikharV
462
views
shikharV
asked
Nov 19, 2015
Compiler Design
compiler-design
grammar
test-series
+
–
0
votes
1
answer
1830
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
453
views
shikharV
asked
Nov 19, 2015
Compiler Design
compiler-design
grammar
test-series
+
–
Page:
« prev
1
...
56
57
58
59
60
61
62
63
64
65
66
67
next »
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register