[Ada] Clean up GNAT.Calendar.Time_IO.Value
authorBob Duff <duff@adacore.com>
Sat, 9 May 2020 17:09:37 +0000 (13:09 -0400)
committerPierre-Marie de Rodat <derodat@adacore.com>
Mon, 6 Jul 2020 11:35:31 +0000 (07:35 -0400)
commitbf8467d8069a4cd91a1071431200926186235f1c
tree2b8a2c211a2f69693dd416419449a507fb2d55e2
parentb1e78e8577fcab0c0854f9b7884d6ce3290827ed
[Ada] Clean up GNAT.Calendar.Time_IO.Value

gcc/ada/

* libgnat/g-catiio.adb (Parse_ISO_8601): Minor cleanups:

Give some objects clearer names.
Make some objects more local to where they are used.

Remove some validity checks that can't fail, because some of
the variables tested have been moved so they're not visible here.
Anyway, Wrong_Syntax is about errors in the input, not data
validity.

Use Time_Zone_Seen instead of Local_Sign = ' ' to determine
that a time zone indication was seen.

We don't need to distinguish two different kinds of
syntax error (End_Of_Source_Reached and Wrong_Syntax),
so use Wrong_Syntax always.

Remove comment, "Certain scanning scenarios may handle
this exception on their own."; there are no such scenarios.
gcc/ada/libgnat/g-catiio.adb