Viable Prefixes: the prefixes of right sentential forms that can appear on the stack of a shift-reduce parser are called viable prefixes.
OR
A viable prefix is a prefix of a right-sentential form that does not continue past the right end of the rightmost handle of that sentential form.
Consider the following grammar:
E → E + E
E → E * E
E → ( E )
E → id
String: id+id*id
E --> E+E --> E+E*E --> E+ E * id --> E+id * id --> id+id *id
Viable Prefix = {eps, E, E+, E+E, E+E*, E+E*E, E+E*id, E+id,id }
Not all prefixes of right-sentential forms can appear on the stack, however, since the parser must not shift past the handle
Handle:-
the handle always appears at the top of the stack just before it is identified as the handle. handle will always be reduced to the LHS part of a production.
In our example, handles will be = id, E+E, E*E