Replace deprecated parser methods.

Change-Id: Icb741e1fbaeebde484b1d2b34d7d377f43ed3cef