[00/12] Ada iterated assignment, plus parser cleanups

Message ID 20240321-ada-iterated-assign-v1-0-925cdd4f1f4a@adacore.com
Headers
Series Ada iterated assignment, plus parser cleanups |

Message

Tom Tromey March 21, 2024, 7:03 p.m. UTC
  This series implements the Ada 2022 iterated assignment feature.  An
earlier version of the patch failed to clear a new global in the
parser, so I also ended up tacking on a series to make sure this
problem can't happen again -- all parser state is moved into a new
object.  (All the parsers should do this, or go further and follow
Rust into recursive descent, IMNSHO.)

Tested on x86-64 Fedora 38.  This has also been running inside AdaCore
for a while now.

---
Tom Tromey (12):
      Introduce and use aggregate_assigner type
      Implement Ada 2022 iterated assignment
      Introduce ada_parse_state
      Move "int_storage" global into ada_parse_state
      Move "components" and "associations" into ada_parse_state
      Move "assignments" global into ada_parse_state
      Move "iterated_associations" into ada_parse_state
      Move "temp_parse_space" into ada_parse_state
      Move "paren_depth" into ada_parse_state
      Move "returned_complete" into ada_parse_state
      Remove "numbuf" global
      Constify ada-lex.l:attributes

 gdb/ada-exp.h                                  | 165 ++++++++++++++-----
 gdb/ada-exp.y                                  | 212 ++++++++++++++++---------
 gdb/ada-lang.c                                 | 202 +++++++++++++----------
 gdb/ada-lex.l                                  |  48 +++---
 gdb/testsuite/gdb.ada/iterated-assign.exp      |  37 +++++
 gdb/testsuite/gdb.ada/iterated-assign/main.adb |  24 +++
 gdb/testsuite/gdb.ada/iterated-assign/pck.adb  |  23 +++
 gdb/testsuite/gdb.ada/iterated-assign/pck.ads  |  26 +++
 8 files changed, 509 insertions(+), 228 deletions(-)
---
base-commit: 7e949f08700b077b78e955c653eb4e9455027101
change-id: 20240321-ada-iterated-assign-da4127ab3d6d

Best regards,
  

Comments

Tom Tromey April 2, 2024, 5:35 p.m. UTC | #1
>>>>> "Tom" == Tom Tromey <tromey@adacore.com> writes:

Tom> This series implements the Ada 2022 iterated assignment feature.  An
Tom> earlier version of the patch failed to clear a new global in the
Tom> parser, so I also ended up tacking on a series to make sure this
Tom> problem can't happen again -- all parser state is moved into a new
Tom> object.  (All the parsers should do this, or go further and follow
Tom> Rust into recursive descent, IMNSHO.)

Tom> Tested on x86-64 Fedora 38.  This has also been running inside AdaCore
Tom> for a while now.

I'm checking this in now.

Tom