How to find viable prefix and handles for given grammar?

How to find viable prefix and handles for given grammar pls someone explain this concept

set2018 @setgate
26 Sep 2017 11:34 am

pls someone provide an apropriate link for this 

shivani @shivani1234
26 Sep 2017 02:42 pm
shivani @shivani1234
26 Sep 2017 02:48 pm
  • The leftmost simple phrase of a sentential form is called the handle.
  • The contents of the stack are always some prefix of a sentential form that may include but does not extend past the handle. We will call such a prefix a viable prefix.
  • Example : let production rules be:
    s -> t | id
    t -> t*f | f
    f -> id
  • Let w = id*id*id
    s -> t -> t*f -> t*f*f ->f*f*f -> id*id*id 
    Handle for t*f in (t*f*f) is t
    viable prefix for (t*f) is ε , t , t*, t*f
set2018 @setgate
6 Oct 2017 01:14 pm

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.

mam pls explain how handle and viable prefix are related to each other

set2018 @setgate
6 Oct 2017 01:18 pm

epsilon will be always viable prefix for all string but not handle .correct me if wrong?

shivani @shivani1234
6 Oct 2017 06:34 pm

epsilon can be handle , consider the productions as:
S -> DT
D -> aa
T -> ε
String is aa,then you have to consider epsilon also

set2018 @setgate
6 Oct 2017 07:23 pm

in this only D will be handle .how epsilon ?