Make the parser heirachy use generics.