Program matches pattern based on regular grammar to separate the tokens found in c program