Type Of Tokens
A compiler designer prescribes rules for making a program using statements. The Smallest unit in a program/statement is called a token. The compiler identifies them as tokens. Tokens are classified in the following types:-
- Keyword : Key words are reserved by the compiler. There are 32 keywords(ANSI Standard).
- Variables : These are user defined. Any number of variables can be defined.'
- Constants : Constants are assigned to variables.
- Operators : Operators are of different types and are used in expression.
- Special Characters : These characters are used in different declarations in C.
- Strings : A sequence of characters.