From 484e7c5ff5fd24cfb2946fadd76b6b67bbeb4169 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Wed, 23 Feb 2022 08:48:40 -0700 Subject: [PATCH] Consolidate single-char tokens in ada-lex.l There are two rules in ada-lex.l that match single-character tokens. This merges them. Also, this removes '.' from the list of such tokens. '.' is not used in any production in ada-exp.y, and removing it here helps the subsequent completion patches. --- gdb/ada-lex.l | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/gdb/ada-lex.l b/gdb/ada-lex.l index 9e35776d7c2..ea35c7a53af 100644 --- a/gdb/ada-lex.l +++ b/gdb/ada-lex.l @@ -265,7 +265,7 @@ false { return FALSEKEYWORD; } "'"/{NOT_COMPLETE} { BEGIN INITIAL; return '\''; } -[-&*+./:<>=|;\[\]] { return yytext[0]; } +[-&*+{}@/:<>=|;\[\]] { return yytext[0]; } "," { if (paren_depth == 0 && pstate->comma_terminates) { @@ -319,8 +319,6 @@ false { return FALSEKEYWORD; } "::" { return COLONCOLON; } -[{}@] { return yytext[0]; } - /* REGISTERS AND GDB CONVENIENCE VARIABLES */ "$"({LETTER}|{DIG}|"$")* { -- 2.30.2