Could possibly be either the cam shaft sensor or crankshaft sensor. Both of these faults should throw up an error code if your vehicle has an OBD connection fitted (For a computer to be plugged in).
Alternativley, I'm presuming it's electronic ignition in which case the hall conductor (The bits which are under the rotor in the distributor) could be faulty which will probably require a new distributor.
daz, August 2007