Added utility function.
First stab at implementing parser using stream generic method.