Question: how to do yacc program?
Answer: Write lex program in a file file. l and yacc in a file file. y., Open Terminal and Navigate to the Directory where you have saved the files., type lex file. l., type yacc file. y., type cc lex. yy. c y. tab. h -ll., type ./a. out.