3 ms·
Pedantically, the preprocessor is an entirely separate language. The lexing, parsing, expressions, and semantics are totally distinct. The preprocessor is usual
by WalterBright 1y ago
Pedantically, the preprocessor is an entirely separate language. The lexing, parsing, expressions, and semantics are totally distinct. The preprocessor is usually implemented as a completely independent program. My first C compiler did integrate the preprocessor with the C compiler, but that was for performance reasons.
Currently, ImportC runs cpp and then lexes/parses the resulting C code for use in D.
- ryao 1y agoIt is part of the C standard. Whether it is part of a separate binary is an implementation choice.
- WalterBright 1y agoTrue on both counts. But they are still separate and distinct languages.
- ryao 1y agoC is a composition of what you describe as separate languages. They are both parts of C. That is why we call unpreprocessed code C code.