]> granicus.if.org Git - icinga2/commitdiff
Allow _ in identifier names.
authorGunnar Beutner <gunnar.beutner@netways.de>
Wed, 13 Jun 2012 07:21:39 +0000 (09:21 +0200)
committerGunnar Beutner <gunnar.beutner@netways.de>
Wed, 13 Jun 2012 07:21:39 +0000 (09:21 +0200)
dyn/config_lexer.cc
dyn/config_lexer.ll

index 3d5ac197bbd18b2969af7b426d9495dfefda36fc..f1fc33e990dad238fbec45b1a806454517f8d123 100644 (file)
@@ -402,7 +402,7 @@ static yyconst flex_int32_t yy_ec[256] =
        11,    1,    1,    1,   12,   12,   12,   12,   12,   12,
        12,   12,   12,   12,   12,   12,   12,   12,   12,   12,
        12,   12,   12,   12,   12,   12,   12,   12,   12,   12,
-        1,    1,    1,    1,    1,    1,   13,   14,   15,   16,
+        1,    1,    1,    1,   12,    1,   13,   14,   15,   16,
 
        17,   12,   12,   18,   19,   20,   12,   21,   12,   22,
        23,   12,   12,   24,   25,   26,   27,   12,   12,   12,
index 80918a69562e2dd0e4b7b6363fad3d9be75bc5d8..56166a04e10c8a570a2f08bb4231c29ffbf10f77 100644 (file)
@@ -52,7 +52,7 @@ object                                return T_OBJECT;
 include                                return T_INCLUDE;
 inherits                       return T_INHERITS;
 null                           return T_NULL;
-[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); return T_IDENTIFIER; }
 \"[^\"]+\"                     { yytext[yyleng-1] = '\0'; yylval->text = strdup(yytext + 1); return T_STRING; }
 [0-9]+                         { yylval->num = atoi(yytext); return T_NUMBER; }
 =                              { yylval->op = OperatorSet; return T_EQUAL; }