Structuring parser-related code