in reply to Re: assertions help
in thread assertions help

I'm processing SQL, not C and CPP states results might be unknown if the parsed file is not in C format. I couldn't find m4 in our production build (presume it's removed like a lot of dev tools on a prod build) and if I remember correctly, m4 doesn't handle
#if defined (ABC) or defined(DEF)
something I'm going to tackle next.

Lastly, I wanted to try to do this in Perl and only Perl. Since I'm wighting a new tool and can set limits on it's use, plus most of what I'm dealing with is legacy, I think I'm safe here. But yes I understand about creeping featurism!

But thanks for the thoughts, they were my first ones too.

-- David

Replies are listed 'Best First'.
Re^3: assertions help
by AnomalousMonk (Archbishop) on Dec 23, 2009 at 03:20 UTC
    ... CPP states results might be unknown if the parsed file is not in C format.

    I'm not sure what this refers to. In my understanding, cpp is at root a text macro processor. It may have a number of features adapting it to C, C++ and ObjectiveC/C++ file processing, but these may be easily turned off. Strictly to satisfy my curiosity, can you give a reference to or example of the warning you mention?

    ... if I remember correctly, m4 doesn't handle
     #if defined (ABC) or defined(DEF)

    I am not very familiar with m4, but I think you may be right, at least in that form. But if you can accept  || in place of  or as your logical operator, cpp would do the trick.

    In any event, you seem to know what you want, so let me wish you every success in your quest.