mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-27 02:45:52 +00:00
Added support for DPI function with different names in C and Verilog
This commit is contained in:
parent
085c8e873d
commit
6c5cafcd8b
3 changed files with 20 additions and 9 deletions
|
@ -280,10 +280,6 @@ import[ \t\r\n]+\"(DPI|DPI-C)\"[ \t\r\n]+function[ \t\r\n]+ {
|
|||
return TOK_DPI_FUNCTION;
|
||||
}
|
||||
|
||||
<IMPORT_DPI>[(),] {
|
||||
return *yytext;
|
||||
}
|
||||
|
||||
<IMPORT_DPI>[a-zA-Z_$][a-zA-Z0-9_$]* {
|
||||
frontend_verilog_yylval.string = new std::string(std::string("\\") + yytext);
|
||||
return TOK_ID;
|
||||
|
@ -296,6 +292,10 @@ import[ \t\r\n]+\"(DPI|DPI-C)\"[ \t\r\n]+function[ \t\r\n]+ {
|
|||
return *yytext;
|
||||
}
|
||||
|
||||
<IMPORT_DPI>. {
|
||||
return *yytext;
|
||||
}
|
||||
|
||||
"\\"[^ \t\r\n]+ {
|
||||
frontend_verilog_yylval.string = new std::string(yytext);
|
||||
return TOK_ID;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue