[icinga-checkins] icinga.org: icinga2/master: Disallow - in identifiers

git at icinga.org git at icinga.org
Mon Nov 24 16:55:46 CET 2014


Module: icinga2
Branch: master
Commit: 7e13f7597f322c3a37fc9c6b535c8b1742f9ffdf
URL:    https://git.icinga.org/?p=icinga2.git;a=commit;h=7e13f7597f322c3a37fc9c6b535c8b1742f9ffdf

Author: Gunnar Beutner <gunnar at beutner.name>
Date:   Mon Nov 24 16:54:06 2014 +0100

Disallow - in identifiers

fixes #7830

---

 lib/config/config_lexer.ll |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/config/config_lexer.ll b/lib/config/config_lexer.ll
index f24c8d2..de8c393 100644
--- a/lib/config/config_lexer.ll
+++ b/lib/config/config_lexer.ll
@@ -264,8 +264,8 @@ __else				return T_ELSE;
 in				return T_IN;
 &&				return T_LOGICAL_AND;
 \|\|				return T_LOGICAL_OR;
-[a-zA-Z_][a-zA-Z0-9\-_]*	{ yylval->text = strdup(yytext); return T_IDENTIFIER; }
-@[a-zA-Z_][a-zA-Z0-9\-_]*	{ yylval->text = strdup(yytext + 1); return T_IDENTIFIER; }
+[a-zA-Z_][a-zA-Z0-9\_]*		{ yylval->text = strdup(yytext); return T_IDENTIFIER; }
+@[a-zA-Z_][a-zA-Z0-9\_]*	{ yylval->text = strdup(yytext + 1); return T_IDENTIFIER; }
 \<[^\>]*\>			{ yytext[yyleng-1] = '\0'; yylval->text = strdup(yytext + 1); return T_STRING_ANGLE; }
 [0-9]+(\.[0-9]+)?ms		{ yylval->num = strtod(yytext, NULL) / 1000; return T_NUMBER; }
 [0-9]+(\.[0-9]+)?d		{ yylval->num = strtod(yytext, NULL) * 60 * 60 * 24; return T_NUMBER; }



More information about the icinga-checkins mailing list