We present a novel optical pulse generator, in which continuous-wave light is modulated by an electrooptic phase modulator and compressed into pulses by linearly chirped fiber Bragg gratings. Two types of pulses are successfully obtained by changing the parameters. One is a very short pulse with a low duty ratio and the other is a flat top pulse with a duty ratio of 50%.