1. Heshan T. Suriyaarachchi 2. 3. lexical analysisis the process of converting a sequence of characters into a sequence of tokens. Programs performing lexical analysis…