That sounds at first like the symptoms for a failing crankshaft position sensor (CPS). When the engine cut out while you were rolling, did the tach drop to zero even thought the engien was still spinning? If the answer to that question is, "yes," then the CPS is the most likely culprit. The best source for this part is the Wells SU242 sensor from AutoZone or AutoZone.com for $41.99.
If the answer was, "no," then it may be a failing fuel pump. With the engine not running, turn the ignition key to ON and listen for the fuel pump. It should spin for about 2 seconds to pressurize the fuel system. The pump should give out a steady, high pitched whine. If there is any pulsing, gurgling or strained pump sounds, your fuel pump may be on its last leg.
Your brief description sounds more like the CPS.