Parser: Simplify and clean up

Signed-off-by: Pekka Enberg <penberg@kernel.org>