Skip to content

Commit 49c2673

Browse files
committed
Update vqm2blif parser to support vqms generated with quartus 2023
1 parent 35542cd commit 49c2673

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

libs/libvqm/vqm_parser.l

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
%%
4040
^[ \t]*\/\/[^\n\r]*(\n|\r\n) /* skip one-line comments */
4141
^[ \t]*\(\*[^\n\r]*\*\) /* skip synthesis attributes and directives */
42-
[ \t]+ /* skip white spaces */
42+
[ \t\n\r]+ /* skip white spaces */
4343
! /* skip the logical operator ! applied on the input ports of the lut - this results in lut mask not being valid anoymore */
4444
(\n|\r\n) /* skip empty lines */
4545
module return TOKEN_MODULE;
@@ -58,6 +58,11 @@ assign return TOKEN_ASSIGN;
5858
strncpy(yylval.string, yytext, yyleng+1);
5959
return TOKEN_REGULARID;
6060
}
61+
~[a-zA-Z_][a-zA-Z_0-9$]* {
62+
yylval.string = (char *)malloc(yyleng);
63+
strncpy(yylval.string, yytext+1, yyleng);
64+
return TOKEN_REGULARID;
65+
}
6166
[-]?[1-9][0-9]*|0+ {
6267
yylval.value = atoi(yytext);
6368
return TOKEN_INTCONSTANT;

0 commit comments

Comments
 (0)