 Hello everyone. I am Mrs. Sunita Role. Topic cover here is construction of predictive passing table. In previous videos, we considered how to compute first and the follow set required for the construction of passing table. In this video, we are going to cover the algorithm to construct the passing table for the given grammar. Learning outcome. At the end of the session, students will be able to construct the predictive passing table for a given grammar. The following algorithm can be used to construct a predictive passing table for a grammar g. The idea behind the algorithm is the following. Suppose capital A derives alpha is a production with small e in the first of alpha. Then the passer will expand capital E by alpha when the current input symbol is small a. When alpha equals to epsilon or alpha derives epsilon in 0 or more steps, then we should again expand capital E by alpha. If the current input symbol is in follow of capital E, or if the dollar on the input has been reached and dollar is in follow of capital A. The algorithm is given on the slide to construct the passing table. Consider the grammar for arithmetic expression with the production given below. In the previous video, we already considered how to compute first and the follow set for this example. First and the follow set for this grammar is given on the slide. Now we are going to consider how to construct the predictive passing table. The grammar for the arithmetic expression first and the follow set for this grammar. This is the passing table structure. Passing table consists of input symbol in column while the non-terminal will be in the row of this table. Now consider how to fill entries in this table. Since the first of capital TE dash equals to first of capital T equals to let parenthesis, id. The production capital E derives TE dash causes M of capital E let parenthesis and M of capital E, id to acquire the entry capital E derives capital TE dash. Production capital E dash derives plus capital TE dash causes M of capital E dash comma plus to acquire the entry capital E dash derives plus capital TE dash as the first of plus capital TE dash equals to plus. Production E dash derives epsilon causes M of capital E dash comma right parenthesis and M of capital E dash comma dollar to acquire the entry capital E dash derives epsilon since the follow of capital E dash equals to right parenthesis comma dollar. Since first of capital FT dash equals to first of capital F equals to left parenthesis comma id, the production capital T derives capital FT dash causes M of capital T comma left parenthesis and M of capital T comma id to acquire the entry capital T derives capital FT dash. Production capital T derives star capital FT dash causes M of capital T dash comma star to acquire the entry capital T derives star capital FT dash. Production capital T derives epsilon causes M of capital T dash comma plus M of capital T dash comma right parenthesis and M of capital T dash comma dollar to acquire capital T dash derives epsilon since follow of capital T dash equals to plus right parenthesis and dollar. Since first of capital F equals to left parenthesis comma id, the production capital F derives in parenthesis capital E and capital F derives id causes M of capital F comma left parenthesis and M of capital F comma id to acquire the entry capital F derives in parenthesis capital E and F derives id respectively. Consider the second grammar with the production given here on the slide. First and the follow set for this grammar is given. Now consider the construction of predictive passing table for this grammar. Grammar for dangling F. First and follow set for this grammar. Passing table structure for this grammar. Now consider how to fill entries in this table. Since first of capital S equals to small i comma small a, the production capital S derives small i capital E small t capital S dash and capital S derives small a causes M of capital S comma small i and M of capital S comma small a to acquire the entry capital S derives small i capital E small t capital S S dash and capital S derives small a respectively. Production capital S dash derives small e capital S causes M of capital S dash comma small e to acquire capital S dash derives small e capital S. Production capital S dash derives epsilon causes M of capital S dash comma small e and M of capital S dash comma dollar to acquire capital S dash derives epsilon since the follow of capital S dash equals to small e comma dollar production capital E derives small b causes M of capital E comma small b to acquire capital E derives small b as the first of capital E equals to small b. Consider the third productions, third grammar with the productions given below. First set and follow set for this grammar. Now consider the construction of the predictive passing table for this grammar. Grammar, first and follow set for this grammar and the passing table structure for this grammar. Now consider how to fill entries in this table. Since first of capital S equals to small a comma small b, the production capital S derives capital A small a capital A small b and capital S derives capital B small b capital B small a causes M of capital S comma small a and M of capital S comma small b to acquire the entry capital S derives capital A small a capital A small b and capital S derives capital B small b capital B small a respectively. Production capital A derives epsilon causes M of capital A comma small a and M of capital A comma small b to acquire capital A derives epsilon since the follow of capital A equals to small a comma small b. Production capital B derives epsilon causes M of capital B comma small a and M of capital B comma small b to acquire capital B derives epsilon since the follow of capital B equals to small a and small b. Till now we consider how to construct the predictive passing table for given grammar. Now pause this video and reflect on this question for a minute or two minute and write your response. Once you have written the answer to this question then you can start playing this video. The question is construct predictive passing table for the following grammar. I hope all of you have completed this activity. So the question was construct predictive passing table for the following grammar. First and follow set for this grammar. Passing table structure for this grammar. Now consider how to enter the productions in this table. Since first of capital S equals to first of capital CC equals to first of first capital C equals to small c comma small d. Hence the production capital S derives capital CC causes M of capital S comma small c and M of capital S comma small d to acquire the entry capital S derives capital CC. Since first of capital C equals to small c and small d. Hence the production capital C derives small c capital C and capital C derives small d causes M of capital C comma small c and M of capital C comma small d to acquire the entry capital C derives small c and capital C and capital C derives small d respectively. This is the reference used for preparing this presentation. Thank you.