On Mon, 20 Mar 2000, Patrik Stridvall wrote:

[...]
> Anyway, I have do some experimentation and I found out that
> this simple patch implements a pre wrc call to the C preprocessor.
> Works with both Solaris C/CPP and GNU C/CPP.
[...]
> Index: wine/tools/wrc/parser.l
[...]
> @@ -449,6 +450,14 @@
>       /* #undef handling */
>  ^{ws}*#{ws}*undef{ws}*       push_to(pp_undef);
>  <pp_undef>{cident}   {
> +                             del_define(yytext);
> +                             pop_start();
> +                             /*push_to(pp_ignore);*/
> +                     }`
> +
> +     /* #ident handling */
> +^{ws}*#{ws}*ident{ws}*       push_to(pp_ident);
> +<pp_ident>.*         {
>                               del_define(yytext);
>                               pop_start();
>                               /*push_to(pp_ignore);*/

        Does '#ident' really have the same semantics as '#undef'? Or
would it be more sensible to just ignore it? 
        If ignoring is the answer I would rather propose the following
patch:

--- parser.l.orig       Mon Mar 20 21:46:06 2000
+++ parser.l    Mon Mar 20 21:46:59 2000
@@ -548,6 +548,7 @@
 
        /* preprocessor junk */

<INITIAL,pp_strips,pp_stripe,pp_stripp,pp_false>^{ws}*#{ws}*pragma[^\n]*
;/* Ignore #pragma */
+<INITIAL,pp_strips,pp_stripe,pp_stripp,pp_false>^{ws}*#{ws}*ident[^\n]*
;/* Ignore #ident */
 <INITIAL,pp_strips,pp_stripe,pp_stripp,pp_false>^{ws}*#{ws}*line[^\n]*
;/* Ignore #line */
  /* We'll get an error on malformed #xxx statements
   * by not recognising '#' at all. This helps tracking



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

  Good judgment comes from experience, and experience comes from bad judgment
                               -- Barry LePatner

Reply via email to