( ( When ( ( a snake ) ( flicks ( its tongue ) ) ) ) ( , ( it ( ( is ( smelling ( the air ) ) ) . ) ) ) )
(ROOT (S (SBAR (WHADVP (WRB When)) (S (NP (DT a) (NN snake)) (VP (VBZ flicks) (NP (PRP$ its) (NN tongue))))) (, ,) (NP (PRP it)) (VP (VBZ is) (VP (VBG smelling) (NP (DT the) (NN air)))) (. .)))
When a snake flicks its tongue, it is smelling the air.
(ROOT (S (NP (NNS Snakes)) (VP (VBP use) (NP (PRP$ their) (NN tongue)) (PP (TO to) (NP (NN smell) (NNS things)))) (. .)))
Snakes use their tongue to smell things.