public inbox for [email protected]  
help / color / mirror / Atom feed
From: Tom Lane <[email protected]>
To: Winter Loo <[email protected]>
Cc: [email protected]
Subject: Re: [ecpg bug]: can not use single '*' in multi-line comment after c preprocessor directives
Date: Thu, 26 Sep 2024 15:04:58 -0400
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>

"Winter Loo" <[email protected]> writes:
> The following code fails to pass the ecpg compilation, although it is accepted by the gcc compiler.

Yeah ... an isolated "/" inside the comment doesn't work either.

> Confused! I am uncertain how to rectify the regex. I hope someone can address this bug.

I poked at this for awhile and concluded that we probably cannot make
it work with a single regexp for "cppline".  The right thing would
involve an exclusive start condition for parsing a cppline, more or
less like the way that /* comments are parsed in the <xc> start
condition.  This is kind of a lot of work compared to the value :-(.
Maybe somebody else would like to take a crack at it, but I can't
get excited enough about it.

There are other deficiencies too in ecpg's handling of these things,
like the fact that (I think) comments are mishandled in #include
directives.

			regards, tom lane






view thread (3+ messages)

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: Re: [ecpg bug]: can not use single '*' in multi-line comment after c preprocessor directives
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox