|Building a compiler variant firstname.lastname@example.org (AngleWyrm) (2004-02-12)|
|Re: Building a compiler variant email@example.com (Lex Spoon) (2004-02-26)|
|Re: Building a compiler variant firstname.lastname@example.org (Bill Cunningham) (2004-05-08)|
|From:||Lex Spoon <email@example.com>|
|Date:||26 Feb 2004 01:10:05 -0500|
|Organization:||Georgia Institute of Technology|
|Posted-Date:||26 Feb 2004 01:10:04 EST|
"AngleWyrm" <firstname.lastname@example.org> writes:
> I want to change the functionality and behavior of a keyword (in
> C++). And to do so probably requires that I make a customized
> compiler. Yes, I know, limited audience ;)
> But nonetheless, the dauntingly humungous bite sounds like it could be fun!
> Can anyone recommend a good starting point for this adventure?
The moderator had a good suggestion.
I might suggest choosing a different basis than C++ for future
projects. In particular, languages like Scheme and Lisp have good
macro systems, which in turn make it quite easy to experiment with
language features. Additionally, any *simple* language would be an
improvement over C++. If you want an OO language, Smalltalk may be
worth looking at; it has something like 6 expression types in the
grammar. You can make radical changes relatively easily. Once you
have figured out exactly what you want the feature to do, then you may
consider coming back and adding it to C++ later.
Also, if you work in C++ you might want to consider abusin--I mean,
*using* the template system and the operator overloading. MacNamara's
FC++ has done some incredible stuff that you would think requires a
preprocessor, so you might want to go take a look at it. By sticking
with templates and operators, you end up with something that can run
anywhere that C++ is available.
Return to the
Search the comp.compilers archives again.