Use an internal buffer in the parser, to allow streaming mode

Signed-off-by: Ferry Huberts <f.huberts@mindef.nl>