Skip to content

Commit 8bfe793

Browse files
committed
support escaped identifiers starting with ~ in vqm2blif
1 parent 34f5f2c commit 8bfe793

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
@@ -40,7 +40,7 @@
4040
^[ \t]*\/\/[^\n\r]*(\n|\r\n) /* skip one-line comments */
4141
^[ \t]*\(\*[^\n\r]*\*\) /* skip synthesis attributes and directives */
4242
[ \t]+ /* skip white spaces */
43-
(!|~) /* skip the logical operator ! applied on the input ports of the lut - this results in lut mask not being valid anoymore */
43+
! /* 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;
4646
endmodule return TOKEN_ENDMODULE;
@@ -67,6 +67,11 @@ assign return TOKEN_ASSIGN;
6767
strcpy(yylval.string, yytext+1);
6868
return TOKEN_ESCAPEDID;
6969
}
70+
~\\[^ ^\t^;]+ {
71+
yylval.string = (char *)malloc(yyleng - 1);
72+
strcpy(yylval.string, yytext+2);
73+
return TOKEN_ESCAPEDID;
74+
}
7075
\"[^\"]*\" {
7176
yylval.string = (char *)malloc(yyleng-1);
7277
strncpy(yylval.string, yytext+1, yyleng-2);

0 commit comments

Comments
 (0)