This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Working on a new front-end


Hi all,

I'm working on a new front-end for gcc, because, you know, I woke up this
morning and thought to myself, "What the world really needs is another
programming language."  Basically this is for my own education.  I'm posting
this announcement to the larger list because the manual recommended doing
so, and to make sure what I want to do hasn't already been done by someone
else.

The new language will be imperative and have C-like syntax, but I want to
add LISP-like macros.  The macros would be ordinary functions that take a
pointer to a parse tree as the first parameter; the functions can modify
those parse trees and actually modify the program before code generation.

1.  Lexical analysis
2.  Parsing into macro-ready parse trees
3.  Macro execution
4.  Convert resulting macro-ready parse tree into gcc trees
5.  Let gcc do the rest.

That's the general idea.  There are all kinds of issues of course, like the
order in which macros are executed in step #3, which should probably be
well-defined.  

At any rate, I'm going to begin my little pet project unless someone tells
me it already exists.  It seems likely that I'll be spamming this list every
now and then with questions about gcc interfacing, the manual seems a little
incomplete, so someone should also let me know if this list is guru-only.
If so, and there's a more appropriate place for me to go, please let me
know.

Thanks,

-Paul



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]