3 ms·
I beg to disagree. For something as complex as C++, writing the preprocessor, the parser, and the code generator is very much beyond a man year.
by wglb 14y ago
I beg to disagree. For something as complex as C++, writing the preprocessor, the parser, and the code generator is very much beyond a man year.
- niggler 14y agoI wasn't saying that it would take a year or even a few years. I was merely saying that most of the effort in gcc/msvc was related to things like optimizing and maintaining multiple architectures. A simple compliant C compiler that only targets x86_64 and performs no optimization, for example, would be much smaller than GCC.
- wglb 14y agoUnclear to me if that is really the case.
- JoachimSchipper 14y agoConsider tcc, which is indeed much simpler than gcc.
- wglb 14y agoAh, yes. I was still thinking C++ as the discussion seemed to slip over to simple C.
- mossplix 14y agothere are parser generators .. you dont have to build one from scratch
- wglb 14y agoAs noted elsewhere, these usually make the hard part harder. The other part of the issue is building the internal representation so that halfway decent code can be generated, not even thinking about optimization. And, like the syntax and grammar of the language, the semantics of C++ are quite complex.