The Function of a scanner Reading characters from the source code and form them into logical units called tokens Tokens are logical entities defined as an enumerated type Typedef enum fIF, THEN, ELSE, PLUS, MINUS, NUM, ID,...) OKen lype,The Function of a Scanner • Reading characters from the source code and form them into logical units called tokens • Tokens are logical entities defined as an enumerated type – Typedef enum {IF, THEN, ELSE, PLUS, MINUS, NUM, ID,…} TokenType;