Integral representation of local left--invariant functionals in Carnot groups