Am 15.04.2011 09:50, schrieb Nick Sabalausky: > Since you're talking about C, you'll probably want to run your original C > code through the "preprocess-only" option of a real C compiler. (I *think* > DMC will do that.) Then parse the resulting "preprocessed C" files with > Goldie. (Although if your goal is an HTOD-like tool, maybe you would need to > deal with the original un-preprocessed source directly.
Why? Just call the preprocessor from your tool or from a wrapping script and go on with the preprocessed C code. Should be much easier and more compatible because C compilers ought to know how to preprocess correctly. For GCC the option you're looking for is "-E", btw. > If Golde's grammar > langauge doesn't seem quite up to the task, it probably wouldn't bee too > hard to just manually make a basic C preprocessor.) > Cheers, - Daniel