parsers: better handling of pointer/ref return types