Proof of concept: automatically import C header files

Walter Bright newshound2 at digitalmars.com
Wed Jul 17 15:36:15 PDT 2013


On 7/17/2013 3:20 PM, H. S. Teoh wrote:
> Though about trigraphs... I've to admit I've never actually seen *real*
> C code that uses trigraphs, but yeah, needing to account for them can
> significantly complicate your code.

Building a correct C front end is a known technology, doing a half-baked job 
isn't going to impress people.

> But as for preprocessor-specific stuff, couldn't we just pipe it through
> a standalone C preprocessor and be done with it? It can't be *that*
> hard, right?

You could, but then you are left with failing to recognize:

     #define FOO 3

and converting it to:

     enum FOO = 3;



More information about the Digitalmars-d mailing list