mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-24 01:25:33 +00:00
Add more Liberty tests and fix parentheses in functions
This commit is contained in:
parent
4a5e33520b
commit
c2f95d1b5a
7 changed files with 208 additions and 2 deletions
|
@ -236,9 +236,12 @@ LibertyAst *LibertyParser::parse()
|
|||
if (tok == 'v') {
|
||||
tok = lexer(str);
|
||||
}
|
||||
while (tok == '+' || tok == '-' || tok == '*' || tok == '/' || tok == '!') {
|
||||
while (tok == '(' || tok == ')' || tok == '+' || tok == '-' || tok == '*' || tok == '/' || tok == '!') { // SILIMATE: added parentheses
|
||||
ast->value += tok;
|
||||
tok = lexer(str);
|
||||
if (tok == ')') { // SILIMATE: semicolon may follow close parenthesis
|
||||
tok = lexer(str);
|
||||
if (tok == ';') break;
|
||||
} else tok = lexer(str);
|
||||
if (tok != 'v')
|
||||
error();
|
||||
ast->value += str;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue