[YOSYS] Issue #3498 - Fix Synopsys style unquoted Liberty style function body parsing with unittest

This commit is contained in:
Muthu Annamalai 2023-05-07 06:19:02 +00:00 committed by Muthu Annamalai
parent 4251d37f4f
commit 17cfc969dd
2 changed files with 15 additions and 4 deletions

View File

@ -236,10 +236,13 @@ LibertyAst *LibertyParser::parse()
if (tok == ':' && ast->value.empty()) {
tok = lexer(ast->value);
if (tok != 'v')
error();
tok = lexer(str);
while (tok == '+' || tok == '-' || tok == '*' || tok == '/') {
if (tok != 'v') {
//Synopsys-style unquoted identifiers issue#3498
} else {
//Liberty canonical identifier including double quotes
tok = lexer(str);
}
while (tok == '+' || tok == '-' || tok == '*' || tok == '/' || tok == '!') {
ast->value += tok;
tok = lexer(str);
if (tok != 'v')

View File

@ -0,0 +1,8 @@
library(fake) {
cell(bugbad) {
bundle(X) {
members(x1, x2);
power_down_function : !a+b ;
}
}
}