[binutils-gdb] Simplify a regular expression in ada-lex.l

Tom Tromey tromey@sourceware.org
Mon Mar 7 14:55:45 GMT 2022


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=a320f135ddb4726474394841a19f3e2cba216ff3

commit a320f135ddb4726474394841a19f3e2cba216ff3
Author: Tom Tromey <tromey@adacore.com>
Date:   Thu Feb 3 13:12:21 2022 -0700

    Simplify a regular expression in ada-lex.l
    
    ada-lex.l uses "%option case-insensitive", so there is no need for
    regular expressions to match upper case.

Diff:
---
 gdb/ada-lex.l | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gdb/ada-lex.l b/gdb/ada-lex.l
index f61efba81a9..a1e19423691 100644
--- a/gdb/ada-lex.l
+++ b/gdb/ada-lex.l
@@ -220,7 +220,7 @@ false		{ return FALSEKEYWORD; }
 
         /* ATTRIBUTES */
 
-{TICK}[a-zA-Z][a-zA-Z_]+ { BEGIN INITIAL; return processAttribute (yytext+1); }
+{TICK}[a-z][a-z_]+ { BEGIN INITIAL; return processAttribute (yytext+1); }
 
 	/* PUNCTUATION */


More information about the Gdb-cvs mailing list