lib: Allow '_' in arguments to VARIABLE_TKN

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
This commit is contained in:
Quentin Young 2016-10-20 19:17:36 +00:00
parent 0a538fc98f
commit e0a467872b
3 changed files with 1856 additions and 2 deletions

1854
command_lex.c Normal file

File diff suppressed because it is too large Load Diff

View File

@ -30,7 +30,7 @@ extern void cleanup_lexer (void);
YY_BUFFER_STATE buffer;
%}
WORD (\-|\+)?[a-z\*][-+_a-zA-Z0-9\*]*
WORD (\-|\+)?[a-z\*][-+a-zA-Z0-9\*_]*
IPV4 A\.B\.C\.D
IPV4_PREFIX A\.B\.C\.D\/M
IPV6 X:X::X:X

View File

@ -838,7 +838,7 @@ match_word (struct cmd_token *token, const char *word)
}
#define VARIABLE_ALPHABET \
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890:/."
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890:/._"
static enum match_type
match_variable (struct cmd_token *token, const char *word)