From: Tom Tromey Date: Wed, 23 Feb 2022 15:48:40 +0000 (-0700) Subject: Consolidate single-char tokens in ada-lex.l X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=484e7c5ff5fd24cfb2946fadd76b6b67bbeb4169;p=binutils-gdb.git 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. --- 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}|"$")* {