public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@adacore.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: Tom Tromey <tromey@adacore.com>,  gdb-patches@sourceware.org
Subject: Re: [PATCH 5/5] Handle non-ASCII identifiers in Ada
Date: Tue, 01 Mar 2022 07:49:29 -0700	[thread overview]
Message-ID: <87czj5locm.fsf@tromey.com> (raw)
In-Reply-To: <83wnhel5bn.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 01 Mar 2022 05:28:12 +0200")

>> Ordinarily, yes, but in practice the Ada compiler uses quite old data,
>> and so whatever is provided by a recent-ish Python is more than good
>> enough.

Eli> How old is "old data", and how recent-ish should be "recent-ish
Eli> Python", for this purpose?

The Ada front end doesn't actually document this, aside from:

   --  Note these tables are derived from those given in AI-285. For details
   --  see www.ada-auth.org/cgi-bin/cvsweb.cgi/AIs/AI-00285.TXT?rev=1.22.

... which I know to be false because other changes have been made to
some of these tables after this.  (You can see this code in
gcc/gnat/libgnat/s-utf_32.adb.)

However, when I examine the case-folding tables (e.g. look for
"Lower_Case_Letters"), the last letters seen are:

     (16#10428#, 16#1044F#),  -- DESERET SMALL LETTER LONG I .. DESERET SMALL LETTER EW
     (16#E0061#, 16#E007A#)); -- TAG LATIN SMALL LETTER A .. TAG LATIN SMALL LETTER Z

These were in Unicode back in 2001.

Eli> Or maybe we should document what is the
Eli> oldest version of Python that currently suits the needs?

Most people shouldn't run this script.  The output is checked in.  And
if they do and get wildly different results, that will be caught in
review.

Of course, it won't really matter, because you can't really write an Ada
program -- at least, not using GNAT -- that uses anything after 2001
anyway.  This covers all the Python versions that are in normal use.

For example Python 2.7, the oldest one I have around (and for which gdb
is going to drop support soon anyway):

>>> import unicodedata
>>> unicodedata.unidata_version
'5.2.0'

This version of the data comes from 2009, plenty new enough.

Tom

  reply	other threads:[~2022-03-01 14:49 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-28 18:32 [PATCH 0/5] " Tom Tromey
2022-02-28 18:33 ` [PATCH 1/5] Simplify a regular expression in ada-lex.l Tom Tromey
2022-02-28 18:33 ` [PATCH 2/5] Don't pre-size result string in ada_decode Tom Tromey
2022-02-28 18:33 ` [PATCH 3/5] Let phex and phex_nz handle sizeof_l==1 Tom Tromey
2022-03-01 14:26   ` Simon Marchi
2022-03-01 14:32     ` Tom Tromey
2022-02-28 18:33 ` [PATCH 4/5] Define HOST_UTF32 in charset.h Tom Tromey
2022-02-28 18:33 ` [PATCH 5/5] Handle non-ASCII identifiers in Ada Tom Tromey
2022-02-28 18:59   ` Eli Zaretskii
2022-02-28 20:59     ` Tom Tromey
2022-03-01  3:28       ` Eli Zaretskii
2022-03-01 14:49         ` Tom Tromey [this message]
2022-03-01 15:17           ` Eli Zaretskii
2022-03-01 15:33   ` Tom Tromey
2022-03-07 14:52 ` [PATCH 0/5] " Tom Tromey

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

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

  git send-email \
    --in-reply-to=87czj5locm.fsf@tromey.com \
    --to=tromey@adacore.com \
    --cc=eliz@gnu.org \
    --cc=gdb-patches@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).