Implement parser checking for valid commands or program statements.