On Monday 15 October 2007 11:31, Sanghyeon Seo wrote: > 2007/10/15, ShangHongzhang 62185 <[EMAIL PROTECTED]>: > > Is it possible to extend the TCC for supporting C++ syntax parsing? > > I think it must be very hard to do so, isn't it? > > I think it would be impossibly hard to do so.
Yes. The code generator is intertwined with the parser. Also, I seem to remember reading somewhere that a single pass C++ compiler is impossible due to the nature of the language. tcc is a single pass compiler. Perhaps you could put a C++-to-C compiler in front of tcc. Such code can still be found on the net. IIRC the very first C++ implementation was done like that (cfront plus a normal C-compiler). Later on, certain C++ "features" were nearly impossible to translate and they moved on to a dedicated C++ compiler. Perhaps "they" have overcome these problems because LLVM is able to generate C from C++. --Ivo _______________________________________________ Tinycc-devel mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/tinycc-devel
