Whow, small patch, big discussion!
        Sorry for arriving late (the day at the office, time difference,
etc.)

On Mon, 20 Mar 2000, Dimitrie O. Paun wrote:

> 
> From: "Bertho Stultiens" <[EMAIL PROTECTED]>
> 
> > Indeed. The problem is that wrc has a semantical preprocessor instead of
> > a lexical preprocessor. 
> 
> Why don't we simply use gcc preprocessor?

        I'm not going to comment on whether Bertho should write a
pre-processor for wrc except to say that that's fine with me (and he's
free to do what he wants anyway).

        But I would like to point out that even if you use gcc as the
pre-processor, as I did, wrc must still be aware of some directives
like '# <line> <file>' and '#pragma'. I seemed to me that this was not
always clear in the messages.

We need to handle '# <line> <file>'
 - because it's generated by the preprocessor and thus obviously present
in the pre-processor's output although this can be disabled (with -P)
 - because if we don't then we have no idea about the line/file the
error occurred in and the messages are thus hard to understand (hint:
preprocess to a file and then run wrc on that file)

        Currently wrc does not support '# <line> <file>' so you have to
use -P and the hack above if you want to understand the error messages.

        It would weem like a nice relatively simple project for someone
to do. Would it interfer much with Bertho's work on the pre-processor?


We need to support the '#pragma'
 - because since they are intended to be used by the compiler they will
always be there. Foreunately all we have to do is ignore them

Then I think we should also support directives generated by other
'popular' preprocessors like '#ident' generated the Solaris C
preprocessor. 



        By the way, wrc does not support 'TEXT filename'. I may get
around to try implementing it but if someone's interested...


Last note: Why do I use the gcc preprocessor? Because I took it from
programs/clock, Don't look for  meaning to it.


--
Francois Gouget    [EMAIL PROTECTED]    http://www.multimania.com/fgouget

                     f u kn rd ts, ur wy 2 gky 4 ur wn gd.

Reply via email to