Fixed parsing of value-less attributes in ilang
authorClifford Wolf <clifford@clifford.at>
Wed, 23 Oct 2013 16:38:31 +0000 (18:38 +0200)
committerClifford Wolf <clifford@clifford.at>
Wed, 23 Oct 2013 16:38:31 +0000 (18:38 +0200)
frontends/ilang/lexer.l

index e331c267e48d7b736ef71f1cea04131d4c1cb1e4..2a20f02a844d0f3ec655f5d06c4473d4d347ce89 100644 (file)
@@ -70,7 +70,7 @@
 "$"[^ \t\r\n]+         { rtlil_frontend_ilang_yylval.string = strdup(yytext); return TOK_ID; }
 "."[0-9]+              { rtlil_frontend_ilang_yylval.string = strdup(yytext); return TOK_ID; }
 
-[0-9]+'[01xzm-]+       { rtlil_frontend_ilang_yylval.string = strdup(yytext); return TOK_VALUE; }
+[0-9]+'[01xzm-]*       { rtlil_frontend_ilang_yylval.string = strdup(yytext); return TOK_VALUE; }
 [0-9]+                 { rtlil_frontend_ilang_yylval.integer = atoi(yytext); return TOK_INT; }
 
 \"             { BEGIN(STRING); }