Fix parser. Comments and IO_PORT
Signed-off-by: YRabbit <rabbit@yrabbit.cyou>
This commit is contained in:
parent
9443267717
commit
5c5982c50a
@ -492,19 +492,17 @@ void Arch::read_cst(std::istream &in)
|
|||||||
std::getline(in, line);
|
std::getline(in, line);
|
||||||
io_loc = true;
|
io_loc = true;
|
||||||
if (!std::regex_match(line, match, iobre)) {
|
if (!std::regex_match(line, match, iobre)) {
|
||||||
// empty line or comment
|
if (std::regex_match(line, match, portre)) {
|
||||||
if (line.empty() == 0) {
|
io_loc = false;
|
||||||
continue;
|
} else {
|
||||||
} else {
|
if ( (!line.empty()) && (line.rfind("//", 0) == std::string::npos)) {
|
||||||
if (!std::regex_match(line, match, portre)) {
|
|
||||||
io_loc = false;
|
|
||||||
} else if (line.rfind("//", 0) == 0) {
|
|
||||||
log_warning("Invalid constraint: %s\n", line.c_str());
|
log_warning("Invalid constraint: %s\n", line.c_str());
|
||||||
continue;
|
|
||||||
}
|
}
|
||||||
}
|
continue;
|
||||||
}
|
}
|
||||||
// std::cout << match[1] << " " << match[2] << std::endl;
|
}
|
||||||
|
|
||||||
|
//std::cout << match[1] << " " << match[2] << std::endl;
|
||||||
|
|
||||||
IdString net = id(match[1]);
|
IdString net = id(match[1]);
|
||||||
auto it = cells.find(net);
|
auto it = cells.find(net);
|
||||||
|
Loading…
Reference in New Issue
Block a user