calculating the nullable symbols of a grammar