import java.io.*; import java.lang.*; import java.util.*; public class Fol_ { static char ntermnl[],termnl[]; static int ntlen,tlen; static String grmr[][],fst[],flw[]; public static void main(String args[]) throws IOException { String nt,t; int i,j,n; BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); System.out.println("Enter the non-terminals without space"); nt=br.readLine(); ntlen=nt.length(); ntermnl=new char[ntlen]; ntermnl=nt.toCharArray(); System.out.println("Enter the terminals without space"); t=br.readLine(); tlen=t.length(); termnl=new char[tlen]; termnl=t.toCharArray(); System.out.println("Specify the grammar(Enter Z for epsilon production)"); grmr=new String[ntlen][]; for(i=0;i