If the gas pedal has to be physically moving in either direction, just not standing still, to keep the engine running, that is a typical symptom of a failing MAP sensor.
If the engine runs normally as long as you simply hold the gas pedal down 1/4", that is typical of the battery being recently disconnected or run dead. The Engine Computer has to relearn 'minimum throttle" before it will know when it has to be in control of idle speed. Until the relearn takes place, you usually will also not get the nice idle flare-up to 1500 rpm for a couple of seconds at engine start-up. For the relearn to take place, drive at highway speed with the engine warmed up, then coast for at least seven seconds without touching the brake or gas pedals.