3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-11-12 17:11:16 +00:00

Merge pull request #5467 from YosysHQ/emil/liberty-unquoted-expressions

libparse: support unquoted expressions
This commit is contained in:
Emil J 2025-11-06 19:45:17 +01:00 committed by GitHub
commit a16fc9b4f3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 352 additions and 120 deletions

View file

@ -13,7 +13,7 @@ namespace RTLIL {
void checkAll(std::initializer_list<std::string> expressions, std::string expected) {
for (const auto& e : expressions) {
auto helper = LibertyExpression::Lexer(e);
auto tree_s = LibertyExpression::parse(helper).str();
auto tree_s = LibertyExpression::parse(helper).sexpr_str();
EXPECT_EQ(tree_s, expected);
}
}
@ -82,6 +82,11 @@ namespace RTLIL {
}, "(and (pin \"x\")\n"
" (not (pin \"y\")))"
);
checkAll({
"( D & EN )",
}, "(and (pin \"D\")\n"
" (pin \"EN\"))"
);
}
}