unofficial mirror of libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Andreas Schwab <schwab@suse.de>
To: Florian Weimer <fw@deneb.enyo.de>
Cc: libc-alpha@sourceware.org
Subject: Re: [PATCH] wcsmbs: Avoid escaped character literals in <wchar.h>
Date: Mon, 17 Feb 2020 17:06:53 +0100	[thread overview]
Message-ID: <mvm1rqt6vvm.fsf@suse.de> (raw)
In-Reply-To: <87blpxcrdx.fsf@mid.deneb.enyo.de> (Florian Weimer's message of "Mon, 17 Feb 2020 13:47:22 +0100")

On Feb 17 2020, Florian Weimer wrote:

> Subject: Add wide and character literal support to conform/conformtest.py
>
> Without this change, tokens such as L'x7f' are reconginzed as a
> identifiers L, x7f, which are not in the implementation namespace and
> therefore trigger failures.
>
> diff --git a/conform/conformtest.py b/conform/conformtest.py
> index 951e3b2420..3bdc2a8e57 100644
> --- a/conform/conformtest.py
> +++ b/conform/conformtest.py
> @@ -638,7 +638,7 @@ class HeaderTests(object):
>                  # constants, and hex floats may be wrongly split into
>                  # tokens including identifiers, but this is sufficient
>                  # in practice and matches the old perl script.
> -                line = re.sub(r'"[^"]*"', '', line)
> +                line = re.sub(r'(?:\bL)?(?:"[^"]*"|\'[^\']*\')', '', line)
>                  line = line.strip()
>                  for token in re.split(r'[^A-Za-z0-9_]+', line):
>                      if re.match(r'[A-Za-z_]', token):

Ok if you update the comment.

Andreas.

-- 
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."

      reply	other threads:[~2020-02-17 16:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-17 10:57 [PATCH] wcsmbs: Avoid escaped character literals in <wchar.h> Florian Weimer
2020-02-17 11:57 ` Andreas Schwab
2020-02-17 12:47   ` Florian Weimer
2020-02-17 16:06     ` Andreas Schwab [this message]

Reply instructions:

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

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

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/libc/involved.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=mvm1rqt6vvm.fsf@suse.de \
    --to=schwab@suse.de \
    --cc=fw@deneb.enyo.de \
    --cc=libc-alpha@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).