Quantization of gauge fields by the BRST method requires sources in addition to fields, and a bilinear anti-bracket defined in terms of them. This bracket is a sort of generalization of a Poisson bracket in classical mechanics. Canonical transformations are also generalized as anti-canonical transformations. In this paper, we take the analogy with classical mechanics one step further, by showing how anti-canonical transformations can be derived from generating functions. We give an example relevant to the renormalization of QCD in the Hamiltonian formalism.