It's a complicated situation. There are three components to an EMP that are at different wavelengths and behave differently and affect different types of circuits.
E1 - very brief (less than a microsecond) but able to fry transistors and other solid state components of modern electronics with tiny circuits. They are less effective against tube electronics and non-solid state electrical devices. Because they are ultra high frequency they are line of sight waves, and so may or may not effect generators depending on a lot of factors.
E2 - similar to lightning, in fact, lightning produces a more powerful E2 wave locally than a nuclear EMP does. Lasts from a microsecond to one second. The easiest to protect against using lightning suppression but can be destructive under the right conditions. Here's the catch: The E1 component can fry lightning suppression devices, leaving you without any protection against the E2 component.
E3 - the one that fries long wires and melts down power lines, and can last from seconds to hours to days. It is actually caused by the disruption of the Earth's magnetic field. If the generator is not hooked up to anything, it will survive that just fine. But if you have long power cords attached they could possibly backfeed a high voltage pulse into the generator as well as fry anything connected.
I would think that a standby generator, not hooked up to anything, or only hooked up to short power cords, and reasonably well shielded should survive under most circumstances.