In a compiler, grouping of characters Into token is done by
In a compiler, grouping of characters into token is done by scanner.
A compiler is a tool which is used to converts the text of a programming language (called source code) into machine code. The machine code can then be executed on the machine, without the original source code being present.
The scanner is a subroutine which is frequently called by an application program like a compiler. The major steps involved in this design process are: identification of tokens, construction of a state diagram, building driver tables and finally writing a scanning routine.