Parser refactoring: recursive block-by-block parsing