reorder blocks for better resulting parser readability