From: Clifford Wolf Date: Wed, 23 Oct 2013 16:38:31 +0000 (+0200) Subject: Fixed parsing of value-less attributes in ilang X-Git-Tag: yosys-0.2.0~453 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=77726fb5fe2bdf76ac8146e05bb776af99eb0f51;p=yosys.git Fixed parsing of value-less attributes in ilang --- diff --git a/frontends/ilang/lexer.l b/frontends/ilang/lexer.l index e331c267e..2a20f02a8 100644 --- a/frontends/ilang/lexer.l +++ b/frontends/ilang/lexer.l @@ -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); }