]> git.puffer.fish Git - mirror/frr.git/commitdiff
lib: parser: accept number-only word tokens
authorDavid Lamparter <equinox@opensourcerouting.org>
Fri, 16 Dec 2016 19:43:26 +0000 (20:43 +0100)
committerDavid Lamparter <equinox@opensourcerouting.org>
Fri, 16 Dec 2016 19:48:31 +0000 (20:48 +0100)
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 <equinox@opensourcerouting.org>
lib/command_lex.l

index 0cb306b6828d225ff3cbe6852ec16ea7f00818b6..d76792626313f655de3e3ce82829534781ddd827 100644 (file)
@@ -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