top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

What is the difference between "token" and "symbol" w.r.t to a compiler ?

+1 vote
2,460 views
What is the difference between "token" and "symbol" w.r.t to a compiler ?
posted Jun 1, 2014 by Vikram Singh

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

–1 vote

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.

answer Jun 1, 2014 by Harshita
Similar Questions
+2 votes

What steps are performed by a compiler and how many types of compilers are present and used frequently ?

0 votes

While reading shared library and PLT (Procedure Linkage Table) I came under a term Trampolines arrangement.

can any one share some info on it ?

+1 vote

In general, how a C language written program is converted into a binary by a C compiler ?

...