Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Recent questions tagged grammar
0
votes
0
answers
121
#gate #1997
A language L is a subset of Pascal with the following constructs: a). Expressions involving the operators ‘+’ and ‘<‘ only b). Assignment statements c). ‘while’ statements and d). Compound statements with the syntax ‘begin…………..end’ Give an unambiguous grammar for L.
A language L is a subset of Pascal with the following constructs:a). Expressions involving the operators ‘+’ and ‘<‘ onlyb). Assignment statementsc). ‘while’ ...
Gangani_Son
232
views
Gangani_Son
asked
Dec 4, 2018
Compiler Design
usergate1997
usermod
grammar
+
–
0
votes
2
answers
122
parser doubt
Consider the statements: (i) Every regular grammar is LL(1) (ii) Every LL(1) grammar is LALR(1) (iii) All LR(0) grammars are LL(k) (iv) A context-free grammar without left factoring and left recursion can be ambiguous Which of the above statement/s is/are TRUE? (i) only (i) and (iii) only (ii) and (iv) only (iv) only
Consider the statements: (i) Every regular grammar is LL(1) (ii) Every LL(1) grammar is LALR(1) (iii) All LR(0) grammars are LL(k) (iv) A context-free grammar without lef...
Pavan Shetty
1.4k
views
Pavan Shetty
asked
Dec 1, 2018
Compiler Design
compiler-design
parsing
grammar
+
–
0
votes
1
answer
123
TOC - PDA
Consider a push down automata (PDA) below which runs over the input alphabet (a, b). It has the stack alphabet {z0, X}, where z0 is the bottom of stack marker. The set of states of PDA is {q0,q1} where q0 is the start state and rules of the PDA are, (The languare accepted by the grammar is)
Consider a push down automata (PDA) below which runs over the input alphabet (a, b). It has the stack alphabet {z0, X}, where z0 is the bottom of stack marker. The set o...
rahuljai
605
views
rahuljai
asked
Nov 30, 2018
Theory of Computation
pushdown-automata
theory-of-computation
context-free-language
grammar
context-free-grammar
+
–
0
votes
0
answers
124
Self doubt
1. Does LR(k) grammar exist for CFL's that are not deterministic. 2. Is there one to one correspondence between LR(1) and DCFL or between LR(k) and DCFL.
1. Does LR(k) grammar exist for CFL's that are not deterministic.2. Is there one to one correspondence between LR(1) and DCFL or between LR(k) and DCFL.
Shobhit Joshi
161
views
Shobhit Joshi
asked
Nov 23, 2018
Theory of Computation
theory-of-computation
grammar
+
–
1
votes
1
answer
125
DCFL_
state true /false 1) for every DCFL there exist at least one unambiguous grammar
state true /false1) for every DCFL there exist at least one unambiguous grammar
Gurdeep Saini
577
views
Gurdeep Saini
asked
Nov 22, 2018
Theory of Computation
theory-of-computation
grammar
dcfl
+
–
0
votes
0
answers
126
test series brilliant classes what approach we have use to solve these kind of questions
Q- the Grammer S-> aSb | bSa |SS |Ɛ a) unambiguous CFG b) ambiguous CFG c) not a CFG d) deterministic CFG
Q- the Grammer S- aSb | bSa |SS |Ɛa) unambiguous CFGb) ambiguous CFGc) not a CFGd) deterministic CFG
shashank joshi
417
views
shashank joshi
asked
Nov 18, 2018
Theory of Computation
theory-of-computation
grammar
parsing
+
–
0
votes
1
answer
127
MadeEasy Test Series: Compiler Design - Grammar
manisha11
261
views
manisha11
asked
Nov 18, 2018
Compiler Design
made-easy-test-series
compiler-design
grammar
+
–
0
votes
0
answers
128
Theory of Computation : Turing Machine
Correct ans is Type - 0. My doubt is LBA is also TM and LBA belongs to type - 1 then why ans is not type - 1
Correct ans is Type - 0. My doubt is LBA is also TM and LBA belongs to type - 1 then why ans is not type - 1
Pavan Shetty
287
views
Pavan Shetty
asked
Nov 17, 2018
Theory of Computation
theory-of-computation
turing-machine
grammar
+
–
2
votes
1
answer
129
If grammar is not LL(1) then it can never be CLR(1) or LALR(1)?
Can you give an example which is not LL(1) but is CLR(1)
Can you give an example which is not LL(1) but is CLR(1)
sripo
3.3k
views
sripo
asked
Nov 10, 2018
Compiler Design
compiler-design
lr-parser
parsing
grammar
ll-parser
+
–
0
votes
3
answers
130
Compiler Design Doubt
S->Aa | Bc A->a B->a 1. Is the above grammer left factored ?? If not ,then do left factoring on it ?? 2. Is above grammer deterministic ?? 3. Is every left factored grammer deterministic ??
S->Aa | Bc A->a B->a1. Is the above grammer left factored ?? If not ,then do left factoring on it ??2. Is above grammer deterministic ?? 3. Is every left factored...
Dheeraj Pant
863
views
Dheeraj Pant
asked
Nov 8, 2018
Compiler Design
compiler-design
grammar
self-doubt
parsing
+
–
0
votes
1
answer
131
#CD Doubt
#CD compute first and follow for S->SS+\SS*\a
#CDcompute first and follow forS->SS+\SS*\a
Pavan Karthik
453
views
Pavan Karthik
asked
Oct 28, 2018
Compiler Design
compiler-design
grammar
parsing
first-and-follow
+
–
0
votes
0
answers
132
GateForum Test Series: Theory Of Computation - Grammar
My answer is C but they have provided B.
My answer is C but they have provided B.
Gupta731
323
views
Gupta731
asked
Oct 27, 2018
Theory of Computation
gateforum-test-series
theory-of-computation
grammar
+
–
1
votes
1
answer
133
made easy test series
Answer given is 4.
Answer given is 4.
amitqy
385
views
amitqy
asked
Oct 19, 2018
Compiler Design
compiler-design
grammar
context-free-grammar
parsing
numerical-answers
made-easy-test-series
+
–
1
votes
0
answers
134
Formal Languages
Let r1 = (b*ab*ab*ab*)* and r2= (b*ab*ab*)*. What is L(r1) ∩ L(r2)? a) L[b*ab*ab*ab*)*] b) L[b*ab*ab*)*] c) L[b*ab*ab*)6] d) L[b*ab*ab*ab*ab*ab*ab*)*]
Let r1 = (b*ab*ab*ab*)* and r2= (b*ab*ab*)*. What is L(r1) ∩ L(r2)?a) L[b*ab*ab*ab*)*]b) L[b*ab*ab*)*]c) L[b*ab*ab*)6]d) L[b*ab*ab*ab*ab*ab*ab*)*]
Sambhrant Maurya
354
views
Sambhrant Maurya
asked
Oct 14, 2018
Theory of Computation
theory-of-computation
grammar
regular-language
+
–
0
votes
0
answers
135
Formal Languages
Let r1= (a+b2)* , r2 = (a* + b*)* , r3 = (a2 + b)* Which of the following is true? a)L(r1) is a subset of L(r2) and L(r3) is a subset of L(r2) b)L(r2) is a subset of L(r1) and L(r2) is a subset of L(r3) c)L(r1) = L(r3) is a subset of L(r2) d) L(r1) U L(r3) = L(r2)
Let r1= (a+b2)* , r2 = (a* + b*)* , r3 = (a2 + b)*Which of the following is true?a)L(r1) is a subset of L(r2) and L(r3) is a subset of L(r2)b)L(r2) is a subset of L(r1) ...
Sambhrant Maurya
470
views
Sambhrant Maurya
asked
Oct 14, 2018
Theory of Computation
theory-of-computation
grammar
regular-language
+
–
0
votes
1
answer
136
Formal Languages
If G= ({S} , {a}, {S--->SS} , S), then language L(G) is a)ϕ b)aa(a)* c)(aa)* d)None of these
If G= ({S} , {a}, {S ->SS} , S), then language L(G) isa)ϕb)aa(a)*c)(aa)*d)None of these
Sambhrant Maurya
663
views
Sambhrant Maurya
asked
Oct 14, 2018
Theory of Computation
theory-of-computation
finite-automata
grammar
+
–
0
votes
0
answers
137
GateForum Test Series: Theory Of Computation - Grammar
Gupta731
263
views
Gupta731
asked
Oct 10, 2018
Theory of Computation
gateforum-test-series
theory-of-computation
grammar
+
–
0
votes
0
answers
138
GateForum Test Series: Theory Of Computation - Grammar
Gupta731
231
views
Gupta731
asked
Oct 10, 2018
Theory of Computation
gateforum-test-series
theory-of-computation
grammar
+
–
0
votes
0
answers
139
GateForum Test Series: Theory Of Computation - Grammar
Gupta731
162
views
Gupta731
asked
Oct 10, 2018
Theory of Computation
gateforum-test-series
theory-of-computation
grammar
gnf
+
–
1
votes
1
answer
140
LL(1) Parsing
To compute FOLLOW(A) for any grammar symbol A a) We must compute FIRST of some grammar symbols. b) No need of computing FIRST of some symbols. c) Maybe compute FIRST of some symbols. d) None of the above. The answer is given as option (A) but if we take ... will definitely in FOLLOW(S) and we didn't computed FIRST of any symbol for it. So option (C) should be the answer.
To compute FOLLOW(A) for any grammar symbol A a) We must compute FIRST of some grammar symbols.b) No need of computing FIRST of some symbols.c) Maybe compute FIRST of som...
garvit_vijai
901
views
garvit_vijai
asked
Oct 10, 2018
Compiler Design
compiler-design
ll-parser
grammar
parsing
+
–
0
votes
1
answer
141
L attributed grammer
I know that every S attributed grammar is L attributed but not vice versa. Can anybody give example of the case if i print the semantic rules using L attributed the result will be different from the S attributed evaluation ? And how should i print the rules in both cases. Explain both case in this example :
I know that every S attributed grammar is L attributed but not vice versa. Can anybody give example of the case if i print the semantic rules using L attributed the resul...
Na462
1.1k
views
Na462
asked
Oct 8, 2018
Compiler Design
compiler-design
syntax-directed-translation
grammar
test-series
+
–
0
votes
0
answers
142
Peter Linz Edition 4 Exercise 1.2 Question 14 (Page No. 28)
sky3691841
417
views
sky3691841
asked
Sep 26, 2018
Theory of Computation
theory-of-computation
peter-linz
peter-linz-edition4
grammar
+
–
0
votes
0
answers
143
self doubt
Every regular set has an LR(1) grammar. What does this line mean??
Every regular set has an LR(1) grammar.What does this line mean??
Vegeta
225
views
Vegeta
asked
Sep 19, 2018
Compiler Design
compiler-design
parsing
grammar
+
–
15
votes
4
answers
144
Handle in a grammar
Consider the following Grammar : $S \rightarrow ZZ$ $Z \rightarrow xZ|y$ Which of the following represents a handle in the generation of the string "xxxyxy" ? A. $ZxZ$ B. $Zxy$ C. $xZxy$ D. $xZ$ Please explain a little about handles too I have a little doubt about it. And do explain the difference between viable prefix and Handle Please :)
Consider the following Grammar :$S \rightarrow ZZ$$Z \rightarrow xZ|y$Which of the following represents a handle in the generation of the string "xxxyxy" ?A. $ZxZ$B. $Z...
Na462
7.9k
views
Na462
asked
Sep 18, 2018
Compiler Design
compiler-design
grammar
viable-prefix
+
–
0
votes
0
answers
145
Doubt in Grammar
What is the difference between phase structured grammar and phrase structured grammar?
What is the difference between phase structured grammar and phrase structured grammar?
goluabhinan
204
views
goluabhinan
asked
Sep 16, 2018
Theory of Computation
theory-of-computation
grammar
context-sensitive
compiler-design
+
–
0
votes
2
answers
146
FIRST Set
S->Aa A->BD B->b | ɛ D->d | ɛ what is FIRST(S)?
S->AaA->BDB->b | ɛD->d | ɛwhat is FIRST(S)?
aditi19
486
views
aditi19
asked
Sep 14, 2018
Compiler Design
compiler-design
grammar
parsing
first-and-follow
+
–
0
votes
1
answer
147
Doubt in Grammar
Consider the following grammar which of the following is/are ambiguous? (i) S → y | SxS (ii) S → E | ExS and E → y (iii) S → Sxy | y
Consider the following grammar which of the following is/are ambiguous?(i) S → y | SxS(ii) S → E | ExS and E → y(iii) S → Sxy | y
goluabhinan
1.3k
views
goluabhinan
asked
Sep 11, 2018
Theory of Computation
theory-of-computation
grammar
ambiguous
+
–
0
votes
0
answers
148
Doubt in Grammar
Below is the grammar then find the language generated by given grammar S → ABC AB → aAx |bAy | ε xb → bx ya → ay C → ε yb → by xC → BaC aB → Ba yC → BbC bB → Bb xa → ax Correct option : (a) L = {w|w ∈ (a, b)∗, and xa(w) = xb(w)} (b) L = {w|w ⊆ (a, b)+, and w is a palandrom string (c) L = {w|w ⊆ (a, b)∗, and w = xx, where X = (a, b)∗} (d) None of the above
Below is the grammar then find the language generated by given grammarS → ABCAB → aAx |bAy | εxb → bxya → ayC → εyb → byxC → BaCaB → BayC → BbCbB → ...
goluabhinan
293
views
goluabhinan
asked
Sep 10, 2018
Theory of Computation
theory-of-computation
grammar
context-sensitive
+
–
1
votes
1
answer
149
Ambiguity of Grammer
Na462
663
views
Na462
asked
Sep 2, 2018
Theory of Computation
theory-of-computation
grammar
compiler-design
+
–
1
votes
0
answers
150
Doubt
Does this grammar generates string of atleast length 2 S->AA A->aA | bA | a | b
Does this grammar generates string of atleast length 2S->AAA->aA | bA | a | b
aditi19
471
views
aditi19
asked
Sep 1, 2018
Theory of Computation
grammar
+
–
Page:
« prev
1
2
3
4
5
6
7
8
9
10
...
15
next »
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register