Measurements play an important role in quantum computing (QC), by either providing the nonlinearity required for two-qubit gates (linear optics QC), or by implementing a quantum algorithm using single-qubit measurements on a highly entangled initial state (cluster state QC). Parity measurements can be used as building blocks for preparing arbitrary stabilizer states, and, together with 1-qubit gates are universal for quantum computing. Here we generalize parity gates by using a higher dimensional (qudit) ancilla. This enables us to go beyond the stabilizer/graph state formalism and prepare other types of multi-particle entangled states. The generalized parity module introduced here can prepare in one-shot, heralded by the outcome of the ancilla, a large class of entangled states, including GHZn, Wn, Dicke states D n,k , and, more generally, certain sums of Dicke states, like Gn states used in secret sharing. For Wn states it provides an exponential gain compared to linear optics based methods.