Who wants to devolop a C compiler together ?

This forums is for OS project announcements including project openings, new releases, update notices, test requests, and job openings (both paying and volunteer).
Post Reply
User avatar
david
Member
Member
Posts: 93
Joined: Tue Aug 21, 2007 4:22 am
Location: Beijing.China
Contact:

Who wants to devolop a C compiler together ?

Post by david »

Who wants to develop a C compiler together ?
Just For Fun
quirck
Member
Member
Posts: 42
Joined: Sun Nov 23, 2008 5:56 am
Location: Russia, Saint-Petersburg

Re: Who wants to devolop a C compiler together ?

Post by quirck »

What new features will appear in your compiler?
Why will it be better than already existing ones?
Or this is just for fun - to practise in the theory of translators?
User avatar
Troy Martin
Member
Member
Posts: 1686
Joined: Fri Apr 18, 2008 4:40 pm
Location: Langley, Vancouver, BC, Canada
Contact:

Re: Who wants to devolop a C compiler together ?

Post by Troy Martin »

I once wrote a compiler for a small subset of BASIC. It translated to a macro-filled NASM syntax .asm file which NASM would then compile.

All written in C.
Image
Image
Solar wrote:It keeps stunning me how friendly we - as a community - are towards people who start programming "their first OS" who don't even have a solid understanding of pointers, their compiler, or how a OS is structured.
I wish I could add more tex
User avatar
bewing
Member
Member
Posts: 1401
Joined: Wed Feb 07, 2007 1:45 pm
Location: Eugene, OR, US

Re: Who wants to devolop a C compiler together ?

Post by bewing »

Ooooh, I'm tempted. But I'm a bit bogged down in the middle of writing my own assembler, ATM. Pkus other stuff.
Plus, my focus would be on trying to make it tiny and fast, and it's unlikely that's where you want to go with it.
JohnnyTheDon
Member
Member
Posts: 524
Joined: Sun Nov 09, 2008 2:55 am
Location: Pennsylvania, USA

Re: Who wants to devolop a C compiler together ?

Post by JohnnyTheDon »

If you're really serious about this take a look at llvm ( http://www.llvm.org/ ). By compiling to llvm bitcode instead of regular assembly, you can link on multiple architectures easily. It also simplifies optimizations because llvm will do that for you. They currently have a modified version of gcc for llvm, but I don't think there are any compilers written from the ground up using it.
engine252
Posts: 6
Joined: Mon May 19, 2008 11:27 am
Location: Belgium

Re: Who wants to devolop a C compiler together ?

Post by engine252 »

I would like to develop a c# compiler that generates code for the nasm assembler.
I intend to develop a kernel with that compiler.
If you'd consider developing a c# compiler we can handle this together.
I know how compilers work, never made one, but i'm a fast learner.;)
User avatar
Walling
Member
Member
Posts: 158
Joined: Mon Dec 04, 2006 6:06 am
Location: Berlin, Germany

Re: Who wants to devolop a C compiler together ?

Post by Walling »

JohnnyTheDon wrote:They currently have a modified version of gcc for llvm, but I don't think there are any compilers written from the ground up using it.
They also started the clang project writing a C compiler from the ground. Supposedly it is faster than GCC and with better error messages. I'm thinking about using it instead of GCC for osdev.
iammisc
Member
Member
Posts: 269
Joined: Thu Nov 09, 2006 6:23 pm

Re: Who wants to devolop a C compiler together ?

Post by iammisc »

Having just come out of the great experience of developing my own compiler for my own language. I have one piece of advice: DON'T. Unless you have some killer new feature that the world can absolutely not live without DON'T.

It's not as easy as it looks.

It takes a LONG time to get right.

Things WILL break.

Unless you're doing this purely for fun and research DON'T and even then make sure you REALLY want to do this. Like REALLY REALLY REALLY want to.
User avatar
nekros
Member
Member
Posts: 391
Joined: Wed Mar 05, 2008 9:10 pm
Contact:

Re: Who wants to devolop a C compiler together ?

Post by nekros »

Yeah^ what that guy said. :lol: I've done a pretty serious study of compilers on my own. They are complicated. VERY complicated. And it gets even harder when you have more complex languages like c. If you want to develop a piece of software like this, you had better have a damn good plan. You can't really just say lets build a compiler and expect everything to work out. It's even harder when you have more than one person (things will be even more buggy). Make a detailed design (and I don't just mean a list of things it will do), and after that, before you start coding away you should REALLY sleep on it for awhile. Make sure you really want to do this as said before.
Working On:Bootloader, RWFS Image Program
Leviathan: http://leviathanv.googlecode.com
Kernel:Working on Design Doc
Post Reply