diff options
author | Tom Tromey <tromey@adacore.com> | 2019-06-07 11:29:36 -0600 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2019-06-14 08:02:20 -0600 |
commit | 4268ec187d401b9b132afa1a13c73e0026a53c5d (patch) | |
tree | c897ebf2928eea030e6f1bdddf012e3eb6d95908 /gdb/ada-lex.l | |
parent | abdb711e0855f0597a96db0486b598144b788212 (diff) | |
download | binutils-gdb-4268ec187d401b9b132afa1a13c73e0026a53c5d.tar.gz |
Recognize _ in attribute names
Ada attribute names can contain "_", but the lexer currently does not
allow this -- even though the "attributes" array lists some attributes
spelled this way.
This patch fixes the bug and adds test cases for the existing
attributes.
This was reviewed off-list by Joel. I'm checking it in.
gdb/ChangeLog
2019-06-14 Tom Tromey <tromey@adacore.com>
* ada-lex.l: Allow "_" in attribute names.
gdb/testsuite/ChangeLog
2019-06-14 Tom Tromey <tromey@adacore.com>
* gdb.ada/formatted_ref.exp (test_p_x_addr): Check
'unchecked_access and 'unrestricted_access as well.
Diffstat (limited to 'gdb/ada-lex.l')
-rw-r--r-- | gdb/ada-lex.l | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/ada-lex.l b/gdb/ada-lex.l index 8ce7c3a99a9..35db478baaa 100644 --- a/gdb/ada-lex.l +++ b/gdb/ada-lex.l @@ -216,7 +216,7 @@ false { return FALSEKEYWORD; } /* ATTRIBUTES */ -{TICK}[a-zA-Z][a-zA-Z]+ { BEGIN INITIAL; return processAttribute (yytext+1); } +{TICK}[a-zA-Z][a-zA-Z_]+ { BEGIN INITIAL; return processAttribute (yytext+1); } /* PUNCTUATION */ |