adds if in grammar