I am designing my own programmming language, and making an editor for it in C#.
I want to add a compiler to the editor, so the code can be made into an exe.
Any ideas on how to do the compiler?
I have never used C# before, but it is pretty similar to Java so the editor's going well. However, I am still new so please don't make it really complicated!
Thanks in advance.
Last edited by TheSuccessor (2011-02-23 12:39:07)
Offline
*Whistles* that's quite a task you're trying! I don't have a lot of knowledge to share on the matter (even though I know C#.NET really well), but I'll do my best.
Probably, the easiest way to create this compiler is to fake it. This means doing what Jens did with Scratch2Exe, so you pack all of the files required (the user's code + a minimal code interpreter) into a self-extracting, self-running EXE using a language like NSIS (I don't think it's easily done with C#).
If you want to do it the hard way, I suggest you ask some professionals. Compiling a language is one of the hardest things to do for the average programmer, and it also requires (I believe) a thorough knowledge of assembly.
Offline
Thanks! I think I might "fake" the exe, as you suggested.
Offline