![]() |
|
Compilers?? - Printable Version +- Sinisterly (https://sinister.li) +-- Forum: Coding (https://sinister.li/Forum-Coding) +--- Forum: Coding (https://sinister.li/Forum-Coding--71) +--- Thread: Compilers?? (/Thread-Compilers) |
Compilers?? - Psycho_Coder - 04-30-2013 Does anyone here has made any Compilers of their own. In know that Frooxious has made his own programming language. Other than that I am asking you'll if you have done some work regarding this then I can get some help from you. I have decided to Design a Compiler as my project for bachelor's degree. I will make a programming language of my own. I know that its not a piece of cake or just like that telling I am making a compiler and after a week I have succeeded, its not so. According to what I have studied (Note:- I lack depth in this) one needs very good concepts of the following for making a compiler :-
1. Formal Languages and Automata Theory 2. Discrete mathematics. 3. Computer Architecture(Software Pipelining) AndAlso : 4. :lub: for Programming 5. Passion and being fearless to do something good and having faith in one's self. So , if anyone can help me on how to start for it or how to gather resources. Any help would be appreciated. Sincerely, Psycho_Coder. RE: Compilers?? - chmod - 04-30-2013 Sadly I wouldn't know where to start on such a project, but I wish you luck with this and hope you will keep us updated so that we may learn a thing or too RE: Compilers?? - Deque - 04-30-2013 I will be doing a course about compiler programming next semester. But that will be too late I suppose. However my husband is very interested in this topic, he wrote his own Java compiler in Perl, just out of interest, and he read a lot of books about that topic. He says THE book about compiler writing is the dragon book: https://en.wikipedia.org/wiki/Compilers:_Principles,_Techniques,_and_Tools#Second_edition I had a course about principles of programming languages which is from the same professor who does the compiler writing course and this was a preparation for it. We had this book, but not exactly this edition: http://books.google.de/books/about/Concepts_of_programming_languages.html?id=ZCdaTVi-SJgC&redir_esc=y I really loved it. I think I will buy this (I borrowed it for the course). This book should be interesting for every programmer, though. One thing I can tell you right away: This is a very large topic for a bachelor thesis. I know someone who created his own language for a masters degree and this also was too much. He wasn't finished with the project when he got his degree, but he got a good grade for it. Just be aware of it. It is probably a huge task and you might need more time than you have. RE: Compilers?? - Psycho_Coder - 05-01-2013 (04-30-2013, 07:29 PM)Deque Wrote: I will be doing a course about compiler programming next semester. But that will be too late I suppose. I will buy both the books you mentioned in the above links. Yes, I know its tricky and time consuming but I can't give up thinking I will not be able to complete. Thinking like this will take me back even before I start working. Some great personality had said something like :- "Things looks difficult unless you have got your hands on them, once you start there is an end and end can be failure or success, and failure is the opportunity to begin again..." If this doesn't works out then I have some webapplications that I have made in JSP and servlets , I will have no problem :angel: RE: Compilers?? - noize - 05-01-2013 I had made one, but very simple: batch once again. Though, that's surely not what you're looking for. I had written a programming language myself too, and I still haven't finished the compiler, because it could so far compile only a few commands. I'm having many troubles on the IF command: that's a complex part. I'll say that's not what you're looking for because it compiles the code just into batch code. I actually made this script after the Hello World! one: Code: start
var i=0
start sesh mysesh
if running process("chrome.exe") do {
kill_process("chrome.exe")
} else {
reach target skip_value_increase
# Could also be easily done by just decreasing i variable of 1
}
math.var i=i+1
set target skip_value_increase
if $i => 101 do {reach sesh end}
reach sesh start
end sesh
print("Chrome was successfully killed 100 times!")
# The above script will keep on killing chrome.exe for 100 times
# Here you can do whatever you want to do after having killed 100 times chrome.exe
endI'm actually still having issues while trying to switch it to batch. I won't be able to help you, I guess. I hope you make it, man. RE: Compilers?? - Psycho_Coder - 05-03-2013 (05-01-2013, 09:22 PM)noize Wrote: I had made one, but very simple: batch once again. Though, that's surely what you're looking for. I had written a programming language myself too, and I still haven't finished the compiler, because it could so far compile only a few commands. I'm having many troubles on the IF command: that's a complex part. Yes this is not what I am looking for but thank you that you tried to help me and suggested me. It will help me surely in some way. And I will make one and post here on HC with complete documentation. I am determined. I can do it and I believe that I will. I have done some simple works on lexical analysis. Soon I will post some articles as soon as I learn something good and I will keep HC updated with this work of mine. RE: Compilers?? - Psycho_Coder - 05-03-2013 (05-01-2013, 09:22 PM)noize Wrote: I had made one, but very simple: batch once again. Though, that's surely what you're looking for. I had written a programming language myself too, and I still haven't finished the compiler, because it could so far compile only a few commands. I'm having many troubles on the IF command: that's a complex part. Yes this is not what I am looking for but thank you that you tried to help me and suggested me. It will help me surely in some way. And I will make one and post here on HC with complete documentation. I am determined. I can do it and I believe that I will. I have done some simple works on lexical analysis. Soon I will post some articles as soon as I learn something good and I will keep HC updated with this work of mine. RE: Compilers?? - noize - 05-11-2013 I've found about MinCaml. http://min-caml.sourceforge.net/paper.pdf It is a open source compiler designed for learning. Simple: less than 2000 LOC. DL: http://sourceforge.net/projects/min-caml/files/latest/download Don't know if could help you. RE: Compilers?? - Psycho_Coder - 05-11-2013 (05-11-2013, 12:18 PM)noize Wrote: I've found about MinCaml. http://min-caml.sourceforge.net/paper.pdf Thank a lot I love it really. Its cool. I have got some good references and the books suggested by Deque. It will really help my project. RE: Compilers?? - TheDeceptionist - 05-11-2013 Good Luck Brother. I'm pretty sure that you will succeed. I'm actually amazed by how much you love programming. |