refactored parser into a generic and solvr specific part