Re: [PATCH 5/5] Handle non-ASCII identifiers in Ada

Tom Tromey via Gdb-patches
2022-03-01T14:49:51Z

>> 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