mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-13 04:28:18 +00:00
[YOSYS] Issue #3498 - Fix Synopsys style unquoted Liberty style function body parsing with unittest
This commit is contained in:
parent
4251d37f4f
commit
17cfc969dd
|
@ -236,10 +236,13 @@ LibertyAst *LibertyParser::parse()
|
||||||
|
|
||||||
if (tok == ':' && ast->value.empty()) {
|
if (tok == ':' && ast->value.empty()) {
|
||||||
tok = lexer(ast->value);
|
tok = lexer(ast->value);
|
||||||
if (tok != 'v')
|
if (tok != 'v') {
|
||||||
error();
|
//Synopsys-style unquoted identifiers issue#3498
|
||||||
tok = lexer(str);
|
} else {
|
||||||
while (tok == '+' || tok == '-' || tok == '*' || tok == '/') {
|
//Liberty canonical identifier including double quotes
|
||||||
|
tok = lexer(str);
|
||||||
|
}
|
||||||
|
while (tok == '+' || tok == '-' || tok == '*' || tok == '/' || tok == '!') {
|
||||||
ast->value += tok;
|
ast->value += tok;
|
||||||
tok = lexer(str);
|
tok = lexer(str);
|
||||||
if (tok != 'v')
|
if (tok != 'v')
|
||||||
|
|
8
tests/liberty/issue3498_bad.lib
Executable file
8
tests/liberty/issue3498_bad.lib
Executable file
|
@ -0,0 +1,8 @@
|
||||||
|
library(fake) {
|
||||||
|
cell(bugbad) {
|
||||||
|
bundle(X) {
|
||||||
|
members(x1, x2);
|
||||||
|
power_down_function : !a+b ;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue