Devide and add java grammar