mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-23 17:15:33 +00:00
Allow square brackets in liberty identifiers
Signed-off-by: Clifford Wolf <clifford@clifford.at>
This commit is contained in:
parent
8f50f289b9
commit
719e29404a
2 changed files with 4 additions and 3 deletions
|
@ -90,11 +90,11 @@ int LibertyParser::lexer(std::string &str)
|
|||
c = f.get();
|
||||
} while (c == ' ' || c == '\t' || c == '\r');
|
||||
|
||||
if (('a' <= c && c <= 'z') || ('A' <= c && c <= 'Z') || ('0' <= c && c <= '9') || c == '_' || c == '-' || c == '+' || c == '.') {
|
||||
if (('a' <= c && c <= 'z') || ('A' <= c && c <= 'Z') || ('0' <= c && c <= '9') || c == '_' || c == '-' || c == '+' || c == '.' || c == '[' || c == ']') {
|
||||
str = c;
|
||||
while (1) {
|
||||
c = f.get();
|
||||
if (('a' <= c && c <= 'z') || ('A' <= c && c <= 'Z') || ('0' <= c && c <= '9') || c == '_' || c == '-' || c == '+' || c == '.')
|
||||
if (('a' <= c && c <= 'z') || ('A' <= c && c <= 'Z') || ('0' <= c && c <= '9') || c == '_' || c == '-' || c == '+' || c == '.' || c == '[' || c == ']')
|
||||
str += c;
|
||||
else
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue