#include
#include
int nop,m=0,p,i=0,j=0;
char prod[10][10],res[10];
void FOLLOW(char c);
void first(char c);
void result(char);
void main()
{
int i;
int choice;
char c,ch;
printf("Enter the no.of productions: ");
scanf("%d", &nop);
printf("enter the production string like E=E+T\n");
for(i=0;i");
scanf(" %c",&c);
FOLLOW(c);
printf("FOLLOW(%c) = { ",c);
for(i=0;i
OUTPUT Enter the no.of productions: 8 enter the production string like E=E+T Enter productions Number 1 : E=TX Enter productions Number 2 : X=+TX Enter productions Number 3 : X=$ Enter productions Number 4 : T=FY Enter productions Number 5 : Y=*FY Enter productions Number 6 : Y=$ Enter productions Number 7 : F=(E) Enter productions Number 8 : F=i
Find FOLLOW of -->X FOLLOW(X) = { $ ) } Do you want to continue(Press 1 to continue....)?1 Find FOLLOW of -->E FOLLOW(E) = {$ ) } Do you want to continue(Press 1 to continue....)?1 Find FOLLOW of -->Y FOLLOW(Y) = { + $ ) } Do you want to continue(Press 1 to continue....)?1 Find FOLLOW of -->T FOLLOW(T) = { +$ ) } Do you want to continue(Press 1 to continue....)?1 Find FOLLOW of -->F FOLLOW(F) = { * + $ ) } Do you want to continue(Press 1 to continue....)?2