Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do we write compiler of a language in same language ?

Status
Not open for further replies.

hecker

Programmer
May 15, 2000
8
0
0
US
Like we say that compiler of C is written in C. How is that possible? How&nbsp;&nbsp;the 'c' language code of compiler will be translated to executable? <br><br>&nbsp;&nbsp;
 
&lt;g&gt;<br><br>You start by writing a (very simple) compiler for C in assembler then, using the compiler you've just written - write a better one -- and so on...<br><br>oh - and *don't* think I've actually done this - much too much like hard work <p>Mike<br><a href=mailto:Mike_Lacey@Cargill.Com>Mike_Lacey@Cargill.Com</a><br><a href= Cargill's Corporate Web Site</a><br>Please don't send me email questions without posting them in Tek-Tips as well. Better yet -- Post the question in Tek-Tips and send me a note saying "Have a look at so-and-so in the thingy forum would you?"
 
Yes as mentioned by Mike. The compiler is developed in the same way.<br> <p>Siddhartha Singh<br><a href=mailto:siddhu_singh@hotmail.com>siddhu_singh@hotmail.com</a><br><a href=siddhu.freehosting.net> </a><br>
 
As many of us know (or have read or been told), this is exactly how Dennis Richey did it when he wrote the C compiler.&nbsp;&nbsp;Umm, well, actually, he had B to start from, but it's the same idea. <p>Octalman<br><a href=mailto: > </a><br><a href= > </a><br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top