Copy of the wavefront parser from the qml examples