Compiler takes a statement as input and checks across the available grammar while doing lexical analysis of statement. Every thing written in a statement is token. For example: int a;
token - int , a, ;
but those token which can be used at the time of execution is known as symbol.
Compiler generates a symbol table for those tokens. In short, symbol is subset of token.
Please correct if stated wrongly anything.