Parser implementation for functions