New parsing function.
Uses function parseBuffer.m