This is the mail archive of the
mailing list for the GCC project.
Working on a new front-end
- From: "Jack, Paul" <pjack at sfaf dot org>
- To: "'gcc at gcc dot gnu dot org'" <gcc at gcc dot gnu dot org>
- Date: Tue, 14 Oct 2003 10:28:21 -0700
- Subject: Working on a new front-end
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
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
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