From a277a4ffade809c192451ff39074f7ae3004a09a Mon Sep 17 00:00:00 2001 From: Lephenixnoir Date: Thu, 8 Dec 2022 17:46:30 +0100 Subject: [PATCH] lexer: only allow one leading dot in symbols to avoid clash with .. The latter is used for ranges. Previously 0..Bdisp_PutDisp_DD would parse as 0 then the symbol `..Bdisp_PutDisp_DD`. --- shell/lexer.l | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shell/lexer.l b/shell/lexer.l index 1def144..971a38b 100644 --- a/shell/lexer.l +++ b/shell/lexer.l @@ -144,7 +144,7 @@ num ({num_hex}|{num_dec}|{num_bin}){num_suffix}? syscall [%][a-fA-F0-9]+ option [a-zA-Z]+=[^ ]* -symbol [a-zA-Z_.][a-zA-Z0-9_.]* +symbol \.|\.?[a-zA-Z_][a-zA-Z0-9_.]* space [ \t]+