Parser reimplementation