Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Recent questions tagged left-recursion
0
votes
2
answers
1
COMPILER design
Is S->aS left recursive grammer?
Is S->aS left recursive grammer?
Mudit Jain
383
views
Mudit Jain
asked
Dec 27, 2022
Compiler Design
left-recursion
+
–
0
votes
3
answers
2
Remove left recusrion and find out first and follow
Compute the FIRST and FOLLOW for the postfix grammar after removing the left recursion: $ S → S S+/ S S* /a$
Compute the FIRST and FOLLOW for the postfix grammar after removing the left recursion:$ S → S S+/ S S* /a$
jayanth
3.5k
views
jayanth
asked
Jun 16, 2022
Compiler Design
compiler-design
left-recursion
first-and-follow
+
–
0
votes
1
answer
3
To get follow of grammar ,Should I remove left_recursion first?
S-> SS | Aa A->Sb | a (a) prove that the grammar is ambiguous. (b) find the follow for the grammar (c) then remove the left recursion from the grammar.
S- SS | AaA->Sb | a(a) prove that the grammar is ambiguous.(b) find the follow for the grammar(c) then remove the left recursion from the grammar.
Sara Wageh
1.2k
views
Sara Wageh
asked
Dec 31, 2021
Compiler Design
left-recursion
+
–
4
votes
1
answer
4
S->AA/ab A->Bd/null B->SB/d remove left recursion
S->AA/ab A->Bd/null B->SB/d remove left recursion
S->AA/ab A->Bd/null B->SB/dremove left recursion
vrajdobariya
1.2k
views
vrajdobariya
asked
Sep 6, 2021
Compiler Design
compiler-design
left-recursion
grammar
+
–
1
votes
1
answer
5
GATE Overflow Test Series | Compiler Design | Test 1 | Question: 18
Which of the following grammar is/are left-recursive? (Mark all the appropriate choices) $A \rightarrow B \mid a \mid CBD$ $B \rightarrow C\mid b$ $C \rightarrow A \mid c$ $D \rightarrow d$ $A \rightarrow Ba \mid C$ ... $S \rightarrow (L) \mid x$ $L \rightarrow SL'$ $L' \rightarrow \epsilon \mid ,SL'$
Which of the following grammar is/are left-recursive? (Mark all the appropriate choices)$A \rightarrow B \mid a \mid CBD$$B \rightarrow C\mid b$$C \rightarrow A \mid c$$D...
gatecse
150
views
gatecse
asked
Dec 14, 2020
Compiler Design
go2025-cd-1
parsing
left-recursion
multiple-selects
+
–
1
votes
1
answer
6
Ullman (Compiler Design) Edition 2 Exercise 5.4 Question 3 (Page No. 337)
The following SDT computes the value of a string of $0's$ and $1's$ ... so the underlying grammar is not left recursive, and yet the same value of $B.val$ is computed for the entire input string.
The following SDT computes the value of a string of $0's$ and $1's$ interpreted as a positive, binary integer.$B\rightarrow B_{1}0\:\{B.val=2\times B_{1}.val\}\mid B_{1}1...
admin
2.1k
views
admin
asked
Sep 6, 2019
Compiler Design
ullman
compiler-design
syntax-directed-translation
grammar
left-recursion
descriptive
+
–
1
votes
0
answers
7
Ullman (Compiler Design) Edition 2 Exercise 4.4 Question 1 (Page No. 231)
For each of the following grammars, devise predictive parsers and show the parsing tables. You may left-factor and/or eliminate left-recursion from your grammars first. $S\rightarrow 0S1\mid 01$ ... $bfactor\:\rightarrow\:not\:bfactor\mid (bexpr)\mid true\mid false$
For each of the following grammars, devise predictive parsers and show the parsing tables. You may left-factor and/or eliminate left-recursion from your grammars first. $...
admin
1.3k
views
admin
asked
Aug 20, 2019
Compiler Design
ullman
compiler-design
grammar
left-recursion
descriptive
+
–
0
votes
0
answers
8
Ullman (Compiler Design) Edition 2 Exercise 4.3 Question 2 (Page No. 216 - 217)
Repeat Exercise 4.3.1 on the following grammars: $S\rightarrow SS+\mid SS\: \ast\mid a$ $S\rightarrow 0S1\mid 01$ $S\rightarrow S ( S ) S\mid \epsilon$ $S\rightarrow (L)\mid a$ ... $bterm\rightarrow bterm\:and\:bfactor\mid bfactor$ $bfactor\rightarrow not\: bfactor\mid ( bexpr )\mid true \mid false $
Repeat Exercise 4.3.1 on the following grammars:$S\rightarrow SS+\mid SS\: \ast\mid a$$S\rightarrow 0S1\mid 01$$S\rightarrow S ( S ) S\mid \epsilon$$S\rightarrow (L)\mid ...
admin
667
views
admin
asked
Aug 20, 2019
Compiler Design
ullman
compiler-design
regular-expression
left-recursion
descriptive
+
–
0
votes
0
answers
9
Ullman (Compiler Design) Edition 2 Exercise 4.3 Question 1 (Page No. 216)
The following is a grammar for regular expressions over symbols $a$ and $b$ only, using $+$ in place of $\mid$ for union, to avoid conflict with the use of vertical bar as a metasymbol in ... to left factoring, eliminate left recursion from the original grammar. Is the resulting grammar suitable for top-down parsing?
The following is a grammar for regular expressions over symbols $a$ and $b$ only, using $+$ in place of $\mid$ for union, to avoid conflict with the use of vertical bar a...
admin
1.6k
views
admin
asked
Aug 20, 2019
Compiler Design
ullman
compiler-design
regular-expression
left-recursion
descriptive
+
–
0
votes
0
answers
10
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
11
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
437
views
Ashish RajAnand
asked
Feb 5, 2019
Compiler Design
compiler-design
parsing
left-recursion
ll-parser
descriptive
+
–
0
votes
1
answer
12
Ace Test Series: Compiler Design - Left Recursion Elimination
Shankar Kakde
1.6k
views
Shankar Kakde
asked
Jan 23, 2019
Compiler Design
ace-test-series
compiler-design
context-free-grammar
parsing
left-recursion
+
–
1
votes
1
answer
13
Applied Course | Mock GATE | Test 1 | Question: 60
The left-factoring of the given CFG is $S \rightarrow aBcD \mid aBD \mid daB \mid d$ $B \rightarrow b$ $D \rightarrow d$ $S \rightarrow aBB' \mid d$ $B' \rightarrow cD \mid D$ $B \rightarrow b$ $D \rightarrow d$ ... $B' \rightarrow aB$ $B \rightarrow b$ $D \rightarrow d$ None of them
The left-factoring of the given CFG is$S \rightarrow aBcD \mid aBD \mid daB \mid d$$B \rightarrow b$$D \rightarrow d$$S \rightarrow aBB' \mid d$$B' \rightarrow cD \mid D$...
Applied Course
648
views
Applied Course
asked
Jan 16, 2019
Compiler Design
applied-course-2019-mock1
compiler-design
context-free-grammar
left-recursion
+
–
0
votes
1
answer
14
UPPCL AE 2018:64
The following grammar $\text{G}$ is left recursive. $\text{E} \rightarrow \text{E + T}\; \mid \; \text{T} $ $\text{T} \rightarrow \text{T * F} \; \mid \; \text{F} $ $\text{F} \rightarrow \text{(E)} \mid \textbf{id} $ Which of the following is a ...
The following grammar $\text{G}$ is left recursive.$\text{E} \rightarrow \text{E + T}\; \mid \; \text{T} $$\text{T} \rightarrow \text{T * F} \; \mid \; \text{F} $$\text{F...
admin
365
views
admin
asked
Jan 5, 2019
Compiler Design
uppcl2018
compiler-design
context-free-grammar
left-recursion
+
–
1
votes
1
answer
15
Non-Left recursive grammar of the below grammar.
Grammar. S → Aa | B A → Ac | Aad | bd | epsilon . .
Grammar. S → Aa | B A → Ac | Aad | bd | epsilon . .
susgir2
952
views
susgir2
asked
Jan 2, 2019
Compiler Design
compiler-design
left-recursion
grammar
parsing
recurrence-relation
+
–
0
votes
0
answers
16
https://gateoverflow.in/1697/gate1998-6b
why isn't A replaced in the first production? that is also indirect recursive
why isn't A replaced in the first production? that is also indirect recursive
aditi19
397
views
aditi19
asked
Oct 26, 2018
Compiler Design
compiler-design
left-recursion
+
–
0
votes
0
answers
17
Left Recursion
Remove the Left Recursion from it : A -> B|a|CBD B -> C|b C -> A|c D -> d
Remove the Left Recursion from it : A - B|a|CBDB - C|bC - A|cD - d
Na462
402
views
Na462
asked
Sep 19, 2018
Compiler Design
compiler-design
left-recursion
+
–
2
votes
2
answers
18
Left recursion
In this question should we eliminate left recursion by putting values of S and A in the respective productions so answer will be c but if according to the given production than answer will be a how to solve?
In this question should we eliminate left recursion by putting values of S and A in the respective productions so answer will be c but if according to the given productio...
saumya mishra
1.7k
views
saumya mishra
asked
Jun 11, 2018
Compiler Design
compiler-design
left-recursion
ace-test-series
+
–
0
votes
5
answers
19
Compiler desigb
consider the following grammar $E\rightarrow int|int+E|int-E |int-(E) |int*E$ Which statement is true? a) Grammer is left factored b) Cant be determined
consider the following grammar$E\rightarrow int|int+E|int-E |int-(E) |int*E$Which statement is true?a) Grammer is left factoredb) Cant be determined
Pun M
933
views
Pun M
asked
Apr 1, 2018
Compiler Design
compiler-design
grammar
left-recursion
+
–
0
votes
1
answer
20
Check if grammar is LL(1) ?
Given a grammar : $E \rightarrow E + T / T$ $T \rightarrow i$ Can I directly say that grammar is not $LL(1)$ because $LL(1)$ can't parse Left Recursive Grammar, without drawing parsing table ?
Given a grammar :$E \rightarrow E + T / T$$T \rightarrow i$Can I directly say that grammar is not $LL(1)$ because $LL(1)$ can't parse Left Recursive Grammar, without dra...
Rahul Ranjan 1
5.0k
views
Rahul Ranjan 1
asked
Mar 19, 2018
Compiler Design
compiler-design
grammar
parsing
ll-parser
left-recursion
+
–
0
votes
1
answer
21
Left Recursion Removal
Remove Left Recursion from the following Context Free Grammar. $S \rightarrow Aa| Sa|c$ $A \rightarrow Ab|Sd|e$
Remove Left Recursion from the following Context Free Grammar.$S \rightarrow Aa| Sa|c$$A \rightarrow Ab|Sd|e$
Mk Utkarsh
1.2k
views
Mk Utkarsh
asked
Jan 31, 2018
Compiler Design
left-recursion
compiler-design
+
–
3
votes
5
answers
22
MadeEasy Test Series 2018: Compiler Design - Left Recursion
I think the answer should be option: C but it is given option A. Providing the snapshot of the question with the options provided. I don't think option A should be the correct one, even if it then we cannot ... "bda" from option A which is possible in the original grammar. Please help with this question. Thanks in advance.
I think the answer should be option: C but it is given option A.Providing the snapshot of the question with the options provided.I don't think option A should be the corr...
nishitshah
1.6k
views
nishitshah
asked
Jan 23, 2018
Compiler Design
compiler-design
left-recursion
made-easy-test-series
+
–
0
votes
1
answer
23
ambiguity
$E→E−T ∣ T$ $T→T/F ∣ F$ $F→(E) ∣ id$ (E is the start symbol) This grammar is unambiguous but shouldn't it be ambiguous because it has left recursion?
$E→E−T ∣ T$$T→T/F ∣ F$$F→(E) ∣ id$(E is the start symbol)This grammar is unambiguous but shouldn't it be ambiguous because it has left recursion?
A_i_$_h
652
views
A_i_$_h
asked
Dec 23, 2017
Compiler Design
compiler-design
ambiguous-grammar
left-recursion
descriptive
+
–
2
votes
2
answers
24
eliminate left recurrsion
Eliminate left recurrsion from $S\rightarrow S0S1S | 01$
Eliminate left recurrsion from $S\rightarrow S0S1S | 01$
A_i_$_h
904
views
A_i_$_h
asked
Oct 20, 2017
Compiler Design
compiler-design
parsing
left-recursion
+
–
1
votes
2
answers
25
left recursion
Parshu gate
1.2k
views
Parshu gate
asked
Sep 17, 2017
Theory of Computation
compiler-design
left-recursion
grammar
parsing
+
–
0
votes
1
answer
26
LEft recurssion
E -> E+T / T T -> id grammar after left recursion is a) E->T +E / T T ->id b)E ->T / E + T T ->id c) E->E' T T->+TE' / epsilon d)E ->TX X- > +TX / epsilon Actually it should be option c... ... T E'..the position of E and T is interchanged.in the option..........is that a pproblem??? the answer is given as option D can someone please help
E - E+T / TT - idgrammar after left recursion isa) E->T +E / T T ->idb)E ->T / E + TT ->idc) E->E' TT->+TE' / epsilond)E ->TXX- +TX / epsilonActually i...
A_i_$_h
352
views
A_i_$_h
asked
Sep 7, 2017
Compiler Design
compiler-design
parsing
left-recursion
descriptive
+
–
2
votes
0
answers
27
SELF DOUBT
Can we find FIRST and FOLLOW for a left recursive grammar?
Can we find FIRST and FOLLOW for a left recursive grammar?
Vivek Jain
780
views
Vivek Jain
asked
Aug 19, 2017
Compiler Design
compiler-design
left-recursion
first-and-follow
+
–
0
votes
1
answer
28
LEFT RECURSION
To avoid left recursion can we do like this. I think this is incorrect way to do
To avoid left recursion can we do like this. I think this is incorrect way to do
learner_geek
1.3k
views
learner_geek
asked
Aug 5, 2017
Compiler Design
compiler-design
grammar
parsing
left-recursion
ace-booklet
+
–
Page:
1
2
next »
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register