retagged by
1,358 views

3 Answers

1 votes
1 votes

Importance of Viable Prefixes:

1 )  The entire SLR parsing algorithm is based on the idea that the LR(0) automaton can recognize viable prefixes and reduce them appropriately.

2 )   Equivalently, this means that the set of viable prefixes for a given SLR (1) grammar is a regular language!

reference : https://cse.iitkgp.ac.in/~bivasm/notes/scribe/11CS30001.pdf

0 votes
0 votes

True I feel it set of viable prefixes of any grammar is regular   as we can create a NFA to recognize them

0 votes
0 votes
Yes. From dragon book

"For every grammar G, the GOTO function of the canonical collection of sets of items defines a DFA that recognizes viable prefixes of G"

Related questions

5 votes
5 votes
1 answer
1
Vijay Thakur asked Jan 13, 2017
1,232 views
Consider the following grammar:$S\rightarrow0S1 | 01$How many of the following are the viable prefixes of the grammar?i. 01 ii. 001iii. 00011iv. 00S1PS: given answers ...
1 votes
1 votes
2 answers
2
Nishu asked Mar 3, 2016
9,310 views
Consider the following grammer:S- aAb | ScA- d | Sd | SThe above grammer is:a) SLR(1)b) LL(1)c) LR(0)d) none of the above
0 votes
0 votes
1 answer
3
Na462 asked Jun 8, 2018
1,526 views
I am confused in the Concept of Handles in right sentential form and Viable Prefix. Can Please anybody explain these two concepts Briefly using Examples :)