mirror of
https://github.com/YosysHQ/yosys
synced 2025-11-08 07:15:09 +00:00
libparse: tolerate closing quotes in expression parsing
This commit is contained in:
parent
4fac7a1b20
commit
bf29f6dc11
2 changed files with 3 additions and 3 deletions
|
|
@ -263,10 +263,10 @@ LibertyExpression LibertyExpression::parse(Lexer &s, int min_prio) {
|
||||||
s.next();
|
s.next();
|
||||||
c = s.peek();
|
c = s.peek();
|
||||||
}
|
}
|
||||||
if (char_is_nice_binop(c) || c == ')') {
|
if (char_is_nice_binop(c) || c == ')' || c == '\'' || c == '\"') {
|
||||||
// We found a real binop, so this space wasn't an AND
|
// We found a real binop, so this space wasn't an AND
|
||||||
// and we just discard it as meaningless whitespace
|
// and we just discard it as meaningless whitespace
|
||||||
// Closing paren is also always terminating here
|
// Tail operators also imply this isn't an AND
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -63,7 +63,7 @@ namespace Yosys
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string pin() {
|
std::string pin() {
|
||||||
auto length = s.find_first_of("\t()'!^*& +|");
|
auto length = s.find_first_of("\t()'!^*& +|\"");
|
||||||
if (length == std::string::npos) {
|
if (length == std::string::npos) {
|
||||||
// nothing found so use size of s
|
// nothing found so use size of s
|
||||||
length = s.size();
|
length = s.size();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue