migrating parser to pyparser