1.Program to test the validity of a simple expression involving operators +,-,* and /. Lex Specification ………………………………….. %{ #include "y.tab.h"…