Could anyone tell me from where could I get the c compiler source code.In particular the lexical analyzer for c.I searched the web but no links show how a compiler is defined.
search the web: "c compiler" source
C being the implementation language for Unix, I would expect it to have been one of the first pieces of software with available source, and a copyleft licence.
When searching the web for the source code of a piece of sofware, look for these types of licences (without a licence you are not allowed to use the source code anyway). Creative Commons licences will generally do too, and non copylefted free licences such as BSD licences. All these terms are usually useful keywords to find software with source code available.