On Tuesday 19 July 2005 10:34, Sean PH wrote: > Hello, > > I'm currently working on implementing a tool chain for a 'pet > language' of mine called O (for Obscure, since my preferred name was > taken). You can see the [unfinished] language specification here: > > http://sean.heybryan.org/spec0_unfinished.pdf > > Note that the implementation notes chapter isn't filled in since I > havn't gotten around to finding a back-end for the compiler yet. gcc > looks like a very good option, however the documentation is quite > 'preliminary' and I am having trouble understanding some things. Would > anyone there be willing to help me on this, even just to talk about > gcc's features and how I would apply my language constructs to them at > first? I am approaching a point at which I have a full parse tree of > the language available and will be ready to dive into connecting it to > a back end, so this would be much appreciated. I think that you should take a look at the GCC front end HOWTO. Some parts of it are out of date but most of it is quite useful. Studing other front ends is also helpfull. I have made a very small Hello World front end to show what is the smallest program that can link with the gcc middle end. I is not completely documented, but I think that it can be usefull. It is at http://svn.gna.org/viewcvs/gsc/branches/hello-world/
A much more mature example is the treelang front end that comes with gcc. I also think that the fortran front end is a very good reference. > Sorry for any grammar errors, they're unintentional as I just pulled > an all-nighter :). > > Thanks, Sean Purser-Haskell Wen you have more specific question feel free to ask. :) Rafael Ávila de Espíndola
pgpB5VNEhghGD.pgp
Description: PGP signature