Connecting Tech Pros Worldwide Forums | Help | Site Map

compiler design

Newbie
 
Join Date: May 2009
Posts: 4
#1: May 7 '09
hi !i m doing a project on compiler design in c#.net can anyone help me on this please.

JosAH's Avatar
Expert
 
Join Date: Mar 2007
Posts: 10,611
#2: May 7 '09

re: compiler design


Quote:

Originally Posted by giri87 View Post

hi !i m doing a project on compiler design in c#.net can anyone help me on this please.

Compiler design is composed of many aspects; what part are you having trouble with? Did you read your literature, e.g. the "Dragon Book"?

kind regards,

Jos
Newbie
 
Join Date: May 2009
Posts: 4
#3: May 17 '09

re: compiler design


sir is there anyway to convert a .c file into a exe file without using a compiler.my project is to provide a intelligent editor for c and to compile the edited source code to its executable without using a compiler.

thank you,
girish
JosAH's Avatar
Expert
 
Join Date: Mar 2007
Posts: 10,611
#4: May 17 '09

re: compiler design


Quote:

Originally Posted by giri87 View Post

sir is there anyway to convert a .c file into a exe file without using a compiler.my project is to provide a intelligent editor for c and to compile the edited source code to its executable without using a compiler.

The process of converting a source .c file to an executable .exe file involves compilation of the source text and linking the resulting object code. You need a compiler for that, one way or another and you need a linker. Do you want to write both of them while quite a bunch of them are available already? Think.

kind regards,

Jos
Newbie
 
Join Date: May 2009
Posts: 4
#5: May 17 '09

re: compiler design


yes sir,i got to do both.i m doing my project in c#.net.i found source code for compiler for linux but not windows.
sir,is there no mechanism to convert a c source code to a exe file directly ?

thank you,
girish
JosAH's Avatar
Expert
 
Join Date: Mar 2007
Posts: 10,611
#6: May 17 '09

re: compiler design


Quote:

Originally Posted by giri87 View Post

yes sir,i got to do both.i m doing my project in c#.net.i found source code for compiler for linux but not windows.
sir,is there no mechanism to convert a c source code to a exe file directly ?

You do have to compile the source code; there is no shortcut. There are quite some editors that can call an external program with the current text as its input; read your editor's manuals. The idea is to call a compiler on the current text in the editor and store the compiled code somewhere. Vi and emacs can do that, maybe your favorite editor can do it too.

Writing a full blown compiler takes quite some time. People have worked for years on their compiler ...

kind regards,

Jos
Reply