in Compiler Design retagged by
1,626 views
4 votes
4 votes
Consider the given below grammar
S→ cAd
A→ bA | aA | b
If a recursive descent parser is used for string “cbababd” then number of back trackin worst case is:
in Compiler Design retagged by
1.6k views

9 Comments

ans: 10
0
0
why answer is 10 please explain?
0
0
i have same doubt
0
0
recursive descent parsers will never backtrack the question is wrong but for brute force method u can get 10
0
0
please explain 10
0
0
By brute force we are getting 8 right ?
0
0
given ans is 10
0
0
i also wrote the same test series check the solution i think its right we can randomly apply all the productions at one stage so that it wont match (inorder to get the worst case
0
0
which test series is this?
0
0

1 Answer

1 vote
1 vote

 

So 10 is the answer in the worst case.