Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Recent questions tagged grammar
0
votes
1
answer
271
Test by Bikram | Mock GATE | Test 1 | Question: 34
Consider the following grammar for Boolean expression: $E$ $\rightarrow$ $E$ OR $E$ $E$ $\rightarrow$ $E$ AND$E$ $E$ $\rightarrow$ NOT $E$ $E$ $\rightarrow$ $\left ( E \right )$ $E$ $\rightarrow$ TRUE $E$\rightarrow$ FALSE $E$ $\ ... grammar is Ambiguous Non-ambiguous $LL$ $\left ( 1 \right )$ Both$\left ( A \right )$ and $\left ( C \right )$
Consider the following grammar for Boolean expression:$E$ $\rightarrow$ $E$ OR $E$$E$ $\rightarrow$ $E$ AND$E$$E$ $\rightarrow$ NOT $E$$E$ $\rightarrow$ $\left ( E \right...
Bikram
416
views
Bikram
asked
Jan 16, 2017
GATE
tbb-mockgate-1
grammar
ambiguous
compiler-design
+
–
1
votes
1
answer
272
Test by Bikram | Mock GATE | Test 1 | Question: 13
Match the following: List I List II A Backus Naur form 1 Regular expression B Lex 2 $\left ( I \right )$LALR$ C Yacc 3 $LL$\left ( 1 \right )$ D Recursive descent parsing 4 $CFG's$ ... $A-4; \: B-1 \: ; C-2; \: D-3;$ $A-1; \: B-4; \:C-2; \: D-3;$
Match the following:List IList IIABackus Naur form 1Regular expressionBLex2$\left ( I \right )$$LALR$CYacc3$LL$$\left ( 1 \right )$DRecursive descent parsing 4$CFG's$ $...
Bikram
395
views
Bikram
asked
Jan 16, 2017
GATE
tbb-mockgate-1
grammar
compiler-design
+
–
13
votes
2
answers
273
LL(k) grammars
1. LL(k) grammars have one to one correspondance with DCFL's 2. LR(k) grammars have one to one correspondance with CFL's Which of them is True and explain it bit clearly?
1. LL(k) grammars have one to one correspondance with DCFL's2. LR(k) grammars have one to one correspondance with CFL'sWhich of them is True and explain it bit clearly?
Prajwal Bhat
5.3k
views
Prajwal Bhat
asked
Jan 15, 2017
Compiler Design
theory-of-computation
compiler-design
grammar
ll-parser
+
–
0
votes
1
answer
274
grammer
Ankita Shingala
558
views
Ankita Shingala
asked
Jan 14, 2017
Compiler Design
compiler-design
grammar
ambiguous-grammar
test-series
+
–
0
votes
0
answers
275
Virtual Gate Test Series: Theory Of Computation - Context Sensitive Grammar
How can L(G) be regular? If we derive bSb --> bAcAb, now we have Ab-->b but we do not have the production bA since G is all production except last. So there is no production for A or bA. How can we go further?
How can L(G) be regular?If we derive bSb bAcAb, now we have Ab >b but we do not have the production bA since G is all production except last. So there is no production ...
Purple
428
views
Purple
asked
Jan 12, 2017
Theory of Computation
theory-of-computation
context-sensitive
grammar
virtual-gate-test-series
+
–
0
votes
1
answer
276
gate 2001
An unambiguous grammar has same leftmost and rightmost derivation Please provide an example to show this.
An unambiguous grammar has same leftmost and rightmost derivationPlease provide an example to show this.
Adiaspirant
2.0k
views
Adiaspirant
asked
Jan 8, 2017
Compiler Design
compiler-design
grammar
ambiguous-grammar
descriptive
+
–
2
votes
0
answers
277
Compilers_BottomUpParsing
Consider the grammar: S → aSa | bSb | aa | bb A shift-reduce parser works by identifying the handle of each right-sentential form and replacing it by the head of the corresponding production. In this question, we indicate the handle of a right-sentential ... above grammar with the handle properly marked? a) abab[aababa] b) ababaS[ababa] c) ababbS[bbaba] d) abab[bSb]baba
Consider the grammar:S → aSa | bSb | aa | bbA shift-reduce parser works by identifying the handle of each right-sentential form and replacing it by the head of the corr...
Sachin Mittal 1
878
views
Sachin Mittal 1
asked
Jan 7, 2017
Compiler Design
compiler-design
grammar
parsing
+
–
0
votes
0
answers
278
Grammar is
Akanksha Kesarwani
406
views
Akanksha Kesarwani
asked
Jan 3, 2017
Compiler Design
compiler-design
grammar
+
–
4
votes
1
answer
279
Draw the LL(1) parsing table of the given grammar ?
Consider a Grammar G as follows : $S\rightarrow W$ $W \rightarrow ZXY / XY$ $Y\rightarrow c/\epsilon$ $Z\rightarrow a/d$ $X\rightarrow Xb/\epsilon$ Draw the LL(1) parsing table for the given grammar ? NOTE :- The above grammar is NOT LL(1) .
Consider a Grammar G as follows :$S\rightarrow W$$W \rightarrow ZXY / XY$$Y\rightarrow c/\epsilon$$Z\rightarrow a/d$$X\rightarrow Xb/\epsilon$Draw the LL(1) parsing table...
Kapil
19.9k
views
Kapil
asked
Dec 27, 2016
Compiler Design
parsing
compiler-design
ll-parser
grammar
+
–
4
votes
2
answers
280
GATE CSE 1988 | Question: 10ib
Consider the following grammar: $S \rightarrow S$ $S \rightarrow SS \mid a \mid \epsilon$ Indicate the shift-reduce and reduce-reduce conflict (if any) in the various states of the $\text{LR(0)}$ parser.
Consider the following grammar:$S \rightarrow S$$S \rightarrow SS \mid a \mid \epsilon$Indicate the shift-reduce and reduce-reduce conflict (if any) in the various states...
go_editor
2.2k
views
go_editor
asked
Dec 19, 2016
Compiler Design
gate1988
compiler-design
descriptive
grammar
parsing
+
–
10
votes
2
answers
281
GATE CSE 1988 | Question: 10ia
Consider the following grammar: $S \rightarrow S$ $S \rightarrow SS \mid a \mid \epsilon$ Construct the collection of sets of $\text{LR (0)}$ items for this grammar and draw its goto graph.
Consider the following grammar:$S \rightarrow S$$S \rightarrow SS \mid a \mid \epsilon$Construct the collection of sets of $\text{LR (0)}$ items for this grammar and draw...
go_editor
3.7k
views
go_editor
asked
Dec 19, 2016
Compiler Design
gate1988
compiler-design
descriptive
grammar
parsing
+
–
1
votes
1
answer
282
MadeEasy Test Series: Compiler Design - Grammar
How it is left factored??
How it is left factored??
Vineeta Garg
599
views
Vineeta Garg
asked
Dec 10, 2016
Compiler Design
made-easy-test-series
compiler-design
grammar
+
–
1
votes
0
answers
283
MadeEasy Test Series: Theory Of Computation - Grammar
Is this reduction correct .According to me there B should not be there.
Is this reduction correct .According to me there B should not be there.
Vineeta Garg
324
views
Vineeta Garg
asked
Dec 10, 2016
Theory of Computation
made-easy-test-series
theory-of-computation
grammar
+
–
1
votes
2
answers
284
TOC-Linear Grammar
KISHALAY DAS
1.3k
views
KISHALAY DAS
asked
Dec 10, 2016
Theory of Computation
theory-of-computation
linear
grammar
+
–
1
votes
1
answer
285
cfg pda toc
how $a^nb^nc^n$ n>=1 is not CFL....??
how $a^nb^nc^n$ n>=1 is not CFL....??
Anmol Verma
904
views
Anmol Verma
asked
Dec 2, 2016
Theory of Computation
theory-of-computation
context-free-language
grammar
context-free-grammar
pushdown-automata
+
–
0
votes
3
answers
286
cfg toc
S->AbaC A->BC B->b/epsilon C->D/epsilon D->d I want to know that will A contain epsilon as B and C both are null variables???(In Elimination of epsilon-production)
S->AbaCA->BCB->b/epsilonC->D/epsilonD->d I want to know that will A contain epsilon as B and C both are null variables???(In Elimination of epsilon-production)
Anmol Verma
2.3k
views
Anmol Verma
asked
Nov 30, 2016
Theory of Computation
theory-of-computation
context-free-grammar
context-free-language
grammar
+
–
1
votes
1
answer
287
GATE CSE 1990 | Question: 16b
Consider the grammar: $G_{2}$: Para $\rightarrow$ Sentence RP | Sentence RP $\rightarrow$ b Sentence RP | b Sentence Sentence $\rightarrow$ Word b Sentence | Word Word $\rightarrow$ letter * word | letter letter $\rightarrow$ ... to use a stack algorithm to parse the following string$id*id\;b\; id * id$ The parse should generate a rightmost derivation.
Consider the grammar:$G_{2}$:Para $\rightarrow$ Sentence RP | SentenceRP $\rightarrow$ b Sentence RP | b SentenceSentence $\rightarrow$ Word b Sentence | WordWord $\right...
makhdoom ghaya
675
views
makhdoom ghaya
asked
Nov 26, 2016
Compiler Design
gate1990
descriptive
compiler-design
grammar
unsolved
+
–
24
votes
1
answer
288
GATE CSE 1990 | Question: 16a
Show that grammar $G_1$ is ambiguous using parse trees: $G_{1}: S \rightarrow$ if $S$ then $S$ else $S$ $S \rightarrow$ if $S$ then $S$
Show that grammar $G_1$ is ambiguous using parse trees:$G_{1}: S \rightarrow$ if $S$ then $S$ else $S$ $S \rightarrow$ if $S$ then $S$
makhdoom ghaya
7.3k
views
makhdoom ghaya
asked
Nov 26, 2016
Compiler Design
gate1990
descriptive
compiler-design
grammar
+
–
3
votes
0
answers
289
GATE CSE 1990 | Question: 15b
Complete the following production rules which generate the language:$L= \left\{a^{n} b^{n} c^{n}\mid a, b, c \in \Sigma \right\}$ where variables $R$ and $Q$ ... $Q \rightarrow R'c$ $cR' \rightarrow ...$ $bR' \rightarrow ...$ $aR' \rightarrow a...$
Complete the following production rules which generate the language:$$L= \left\{a^{n} b^{n} c^{n}\mid a, b, c \in \Sigma \right\}$$ where variables $R$ and $Q$ are used t...
makhdoom ghaya
711
views
makhdoom ghaya
asked
Nov 26, 2016
Theory of Computation
gate1990
descriptive
theory-of-computation
grammar
context-sensitive
out-of-gate-syllabus
+
–
0
votes
2
answers
290
Test by Bikram | Theory of Computation | Test 1 | Question: 14
Consider the grammar given below : $S \rightarrow AB \mid DA$ $B \rightarrow BCD \mid ABD \mid CC \mid b$ $A \rightarrow a \mid BC$ $C \rightarrow aBD \mid a$ $C \rightarrow aBCAD \mid DaB$ $A \rightarrow aBCAD \mid Da$ ... following non terminal is useless in the grammar (as non terminal strings can be derived from it): $D$ $C$ $B$ $A$
Consider the grammar given below :$S \rightarrow AB \mid DA$$B \rightarrow BCD \mid ABD \mid CC \mid b$$A \rightarrow a \mid BC$$C \rightarrow aBD \mid a$$C \rightarrow a...
Bikram
441
views
Bikram
asked
Nov 26, 2016
Theory of Computation
tbb-toc-1
grammar
+
–
2
votes
2
answers
291
Test by Bikram | Compiler Design | Test 1 | Question: 30
Consider the following grammar: $S \rightarrow L = P \mid P$ $L \rightarrow ^*P \mid id$ $P \rightarrow L$ The above grammar is: Ambiguous SLR(1) LALR(1) None of the above
Consider the following grammar:$S \rightarrow L = P \mid P$$L \rightarrow ^*P \mid id$$P \rightarrow L$The above grammar is:AmbiguousSLR(1)LALR(1)None of the above
Bikram
698
views
Bikram
asked
Nov 25, 2016
Compiler Design
tbb-cd-1
compiler-design
grammar
+
–
3
votes
1
answer
292
Test by Bikram | Compiler Design | Test 1 | Question: 29
Which grammar causes recursive-descent parser to go into infinite loop? LL(1) Left recursive grammar Right recursive grammar Grammar with left factors
Which grammar causes recursive-descent parser to go into infinite loop?LL(1)Left recursive grammarRight recursive grammarGrammar with left factors
Bikram
288
views
Bikram
asked
Nov 25, 2016
Compiler Design
tbb-cd-1
compiler-design
grammar
+
–
3
votes
2
answers
293
Test by Bikram | Compiler Design | Test 1 | Question: 25
Consider the following grammar: $S \rightarrow aMd \mid bNd \mid aNe \mid bMe$ $M \rightarrow c$ $N \rightarrow c$ The grammar above is: LR(1) but not LALR(1) LALR(1) but not SLR(1) SLR(1) but not LR(1) LALR(1)
Consider the following grammar:$S \rightarrow aMd \mid bNd \mid aNe \mid bMe$$M \rightarrow c$$N \rightarrow c$The grammar above is:LR(1) but not LALR(1)LALR(1) but no...
Bikram
530
views
Bikram
asked
Nov 25, 2016
Compiler Design
tbb-cd-1
compiler-design
grammar
+
–
3
votes
1
answer
294
Test by Bikram | Compiler Design | Test 1 | Question: 24
Consider the following grammar: $E \rightarrow E + T \mid T$ $T \rightarrow T ^* F \mid F$ $F \rightarrow (E) \mid id$ ... $E \rightarrow TE' , \ \ T \rightarrow FT' , \ \ F \rightarrow (E) \mid id$
Consider the following grammar:$E \rightarrow E + T \mid T$$T \rightarrow T ^* F \mid F$$F \rightarrow (E) \mid id$What are the productions for E, T and F after convertin...
Bikram
483
views
Bikram
asked
Nov 25, 2016
Compiler Design
tbb-cd-1
compiler-design
parsing
ll-parser
grammar
+
–
4
votes
2
answers
295
Test by Bikram | Compiler Design | Test 1 | Question: 19
Consider the following grammar: $Z \rightarrow TZ'$ $Z' \rightarrow +TZ' \mid \epsilon$ $T \rightarrow Y T '$ $T ' \rightarrow ^* YT ' \mid \epsilon$ $Y \rightarrow (Z) \mid id$ Which of the following represents Follow(Y)? $\{ ), id \}$ $\{ ), id, \$, *, + \}$ $\{ ^*, +, ), \$ \}$ $\{ +, ), \$ \}$
Consider the following grammar:$Z \rightarrow TZ'$$Z' \rightarrow +TZ' \mid \epsilon$$T \rightarrow Y T '$$T ' \rightarrow ^* YT ' \mid \epsilon$$Y \rightarrow (Z) \mi...
Bikram
320
views
Bikram
asked
Nov 25, 2016
Compiler Design
tbb-cd-1
compiler-design
parsing
grammar
+
–
3
votes
1
answer
296
Test by Bikram | Compiler Design | Test 1 | Question: 16
Consider the following grammars: $S \rightarrow aS \mid Sa \mid \in$ $E \rightarrow E +E \mid E^*E \mid id$ $A \rightarrow AA \mid (A) \mid a$ $S \rightarrow SS \mid AB, \ A \rightarrow Aa \mid a, \ B \rightarrow Bb \mid b$ These grammars are: Ambiguous Unambiguous Regular Inherently Ambiguous
Consider the following grammars:$S \rightarrow aS \mid Sa \mid \in$$E \rightarrow E +E \mid E^*E \mid id$$A \rightarrow AA \mid (A) \mid a$$S \rightarrow SS \mid AB, \ A...
Bikram
530
views
Bikram
asked
Nov 25, 2016
Compiler Design
tbb-cd-1
compiler-design
grammar
+
–
2
votes
2
answers
297
Test by Bikram | Compiler Design | Test 1 | Question: 12
Read the below mentioned grammar: $S \rightarrow X$ $X \rightarrow YX \mid \epsilon$ $Y \rightarrow aY \mid b$ This grammar is NOT: $LALR$ $LR (0)$ $LR(1)$ None of the above
Read the below mentioned grammar:$S \rightarrow X$$X \rightarrow YX \mid \epsilon$$Y \rightarrow aY \mid b$This grammar is NOT:$LALR$$LR (0)$$LR(1)$None of the above
Bikram
442
views
Bikram
asked
Nov 25, 2016
Compiler Design
tbb-cd-1
compiler-design
grammar
+
–
3
votes
1
answer
298
Test by Bikram | Compiler Design | Test 1 | Question: 10
The grammar which has no epsilon transition or two adjacent nonterminals in the right side of any production is ___________. LL(1) grammar Unambiguous grammar Operator grammar Context Sensitive grammar
The grammar which has no epsilon transition or two adjacent nonterminals in the right side of any production is ___________.LL(1) grammarUnambiguous grammarOperator gramm...
Bikram
364
views
Bikram
asked
Nov 25, 2016
Compiler Design
tbb-cd-1
compiler-design
parsing
grammar
+
–
2
votes
2
answers
299
Test by Bikram | Compiler Design | Test 1 | Question: 8
Read the following grammar: $S \rightarrow Ka \mid bKc \mid dc \mid bda$ $K \rightarrow d$ This grammar is NOT: LALR(1) SLR(1) LR(1) None of the above
Read the following grammar:$S \rightarrow Ka \mid bKc \mid dc \mid bda$$K \rightarrow d$This grammar is NOT:LALR(1)SLR(1)LR(1)None of the above
Bikram
572
views
Bikram
asked
Nov 25, 2016
Compiler Design
tbb-cd-1
compiler-design
grammar
+
–
3
votes
2
answers
300
Test by Bikram | Compiler Design | Test 1 | Question: 6
Consider the following grammars: $Z \rightarrow TZ'$ $Z' \rightarrow ^* TZ' \mid \epsilon$ $T \rightarrow YT'$ $T ' \rightarrow ^*YT ' \mid \epsilon$ $Y \rightarrow (Z) \mid id$ Which of the following is First(Z)? $\{T, ) \}$ $\{(, id \}$ $\{ ), \$ \}$ None of the above
Consider the following grammars:$Z \rightarrow TZ'$$Z' \rightarrow ^* TZ' \mid \epsilon$$T \rightarrow YT'$$T ' \rightarrow ^*YT ' \mid \epsilon$$Y \rightarrow (Z) \mi...
Bikram
244
views
Bikram
asked
Nov 25, 2016
Compiler Design
tbb-cd-1
compiler-design
parsing
grammar
+
–
Page:
« prev
1
...
5
6
7
8
9
10
11
12
13
14
15
next »
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register