cfgparse: also accept negative numbers

This commit is contained in:
Michael Stapelberg 2012-02-16 18:41:48 +00:00
parent 82146fcebf
commit d78da44ad1
1 changed files with 1 additions and 1 deletions

View File

@ -170,7 +170,7 @@ EOL (\r?\n)
<ASSIGN_TARGET_COND>[ \t]+ { BEGIN(WANT_STRING); }
<EXEC>--no-startup-id { printf("no startup id\n"); yy_pop_state(); return TOK_NO_STARTUP_ID; }
<EXEC>. { printf("anything else: *%s*\n", yytext); yyless(0); yy_pop_state(); yy_pop_state(); }
[0-9]+ { yylval.number = atoi(yytext); return NUMBER; }
[0-9-]+ { yylval.number = atoi(yytext); return NUMBER; }
bar { yy_push_state(BAR); return TOK_BAR; }
mode { return TOKMODE; }
bind { yy_push_state(WANT_STRING); yy_push_state(EAT_WHITESPACE); yy_push_state(EAT_WHITESPACE); return TOKBINDCODE; }