Question: yacc program for do while loop?
Answer: File name : while.l. Program : %{ %} %% "while" {return key;} "(" {return ob;} ")" {return cb;} " " {return sp;} ";" {return sc;} ...  File name : while.y. Program : %{ #include<stdio.h> %} %token key. %token ob. %token op. %token vb. %token cb. ...  Compilation Steps : lex while.l. yacc -d while.y. cc y.tab.c. ./a.out. Output :