From bca1a301babea5f2cd17ccd7e6d077fbd120bfda Mon Sep 17 00:00:00 2001 From: David Lamparter Date: Fri, 16 Dec 2016 20:43:26 +0100 Subject: [PATCH] lib: parser: accept number-only word tokens There seems to be no reason why numbers don't work as plain word tokens; this is useful to have "number choices" or constants, e.g. <128|192|256> for bit encryption lengths. Signed-off-by: David Lamparter --- lib/command_lex.l | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/command_lex.l b/lib/command_lex.l index 0cb306b6828d..d76792626313 100644 --- a/lib/command_lex.l +++ b/lib/command_lex.l @@ -26,7 +26,7 @@ #include "command_parse.h" %} -WORD (\-|\+)?[a-z\*][-+_a-zA-Z0-9\*]* +WORD (\-|\+)?[a-z0-9\*][-+_a-zA-Z0-9\*]* IPV4 A\.B\.C\.D IPV4_PREFIX A\.B\.C\.D\/M IPV6 X:X::X:X