]> granicus.if.org Git - icinga2/commitdiff
Disallow - in identifiers
authorGunnar Beutner <gunnar@beutner.name>
Mon, 24 Nov 2014 15:54:06 +0000 (16:54 +0100)
committerGunnar Beutner <gunnar@beutner.name>
Mon, 24 Nov 2014 15:54:06 +0000 (16:54 +0100)
fixes #7830

lib/config/config_lexer.ll

index f24c8d22554c1c32c7a1cbbf80f5d5ffcb27d735..de8c393648a67a91eabb8ebcca34872e2e8e059e 100644 (file)
@@ -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; }