@@ -1304,29 +1304,27 @@ static bool realloc_and_load_pb_graph_pin_ptrs_at_var(const int line_num,
1304
1304
(*token_index)++;
1305
1305
if (tokens[*token_index].type == e_token_type::OPEN_SQUARE_BRACKET) {
1306
1306
(*token_index)++;
1307
- if (! checkTokenType ( tokens[*token_index], e_token_type::INT) ) {
1307
+ if (tokens[*token_index]. type != e_token_type::INT) {
1308
1308
return false ; // clb[abc
1309
1309
}
1310
1310
pb_msb = vtr::atoi (tokens[*token_index].data );
1311
1311
VTR_ASSERT_MSG (pb_msb >= 0 , " Pin most-significant-bit must be non-negative" );
1312
1312
(*token_index)++;
1313
- if (!checkTokenType (tokens[*token_index], e_token_type::COLON)) {
1314
- if (!checkTokenType (tokens[*token_index],
1315
- e_token_type::CLOSE_SQUARE_BRACKET)) {
1313
+ if (tokens[*token_index].type != e_token_type::COLON) {
1314
+ if (tokens[*token_index].type != e_token_type::CLOSE_SQUARE_BRACKET) {
1316
1315
return false ; // clb[9abc
1317
1316
}
1318
1317
pb_lsb = pb_msb;
1319
1318
(*token_index)++;
1320
1319
} else {
1321
1320
(*token_index)++;
1322
- if (! checkTokenType ( tokens[*token_index], e_token_type::INT) ) {
1321
+ if (tokens[*token_index]. type != e_token_type::INT) {
1323
1322
return false ; // clb[9:abc
1324
1323
}
1325
1324
pb_lsb = vtr::atoi (tokens[*token_index].data );
1326
1325
VTR_ASSERT_MSG (pb_lsb >= 0 , " Pin most-significant-bit must be non-negative" );
1327
1326
(*token_index)++;
1328
- if (!checkTokenType (tokens[*token_index],
1329
- e_token_type::CLOSE_SQUARE_BRACKET)) {
1327
+ if (tokens[*token_index].type != e_token_type::CLOSE_SQUARE_BRACKET) {
1330
1328
return false ; // clb[9:0abc
1331
1329
}
1332
1330
(*token_index)++;
@@ -1359,29 +1357,27 @@ static bool realloc_and_load_pb_graph_pin_ptrs_at_var(const int line_num,
1359
1357
1360
1358
if (tokens[*token_index].type == e_token_type::OPEN_SQUARE_BRACKET) {
1361
1359
(*token_index)++;
1362
- if (! checkTokenType ( tokens[*token_index], e_token_type::INT) ) {
1360
+ if (tokens[*token_index]. type != e_token_type::INT) {
1363
1361
return false ;
1364
1362
}
1365
1363
pb_msb = vtr::atoi (tokens[*token_index].data );
1366
1364
VTR_ASSERT_MSG (pb_msb >= 0 , " Pin most-significant-bit must be non-negative" );
1367
1365
(*token_index)++;
1368
- if (!checkTokenType (tokens[*token_index], e_token_type::COLON)) {
1369
- if (!checkTokenType (tokens[*token_index],
1370
- e_token_type::CLOSE_SQUARE_BRACKET)) {
1366
+ if (tokens[*token_index].type != e_token_type::COLON) {
1367
+ if (tokens[*token_index].type != e_token_type::CLOSE_SQUARE_BRACKET) {
1371
1368
return false ;
1372
1369
}
1373
1370
pb_lsb = pb_msb;
1374
1371
(*token_index)++;
1375
1372
} else {
1376
1373
(*token_index)++;
1377
- if (! checkTokenType ( tokens[*token_index], e_token_type::INT) ) {
1374
+ if (tokens[*token_index]. type != e_token_type::INT) {
1378
1375
return false ;
1379
1376
}
1380
1377
pb_lsb = vtr::atoi (tokens[*token_index].data );
1381
1378
VTR_ASSERT_MSG (pb_lsb >= 0 , " Pin most-significant-bit must be non-negative" );
1382
1379
(*token_index)++;
1383
- if (!checkTokenType (tokens[*token_index],
1384
- e_token_type::CLOSE_SQUARE_BRACKET)) {
1380
+ if (tokens[*token_index].type != e_token_type::CLOSE_SQUARE_BRACKET) {
1385
1381
return false ;
1386
1382
}
1387
1383
(*token_index)++;
@@ -1413,13 +1409,13 @@ static bool realloc_and_load_pb_graph_pin_ptrs_at_var(const int line_num,
1413
1409
1414
1410
found = false ;
1415
1411
1416
- if (! checkTokenType ( tokens[*token_index], e_token_type::DOT) ) {
1412
+ if (tokens[*token_index]. type != e_token_type::DOT) {
1417
1413
return false ; // clb[9:0]123
1418
1414
}
1419
1415
(*token_index)++;
1420
1416
1421
- bool is_string = ! checkTokenType ( tokens[*token_index], e_token_type::STRING) ;
1422
- bool is_int = ! checkTokenType ( tokens[*token_index], e_token_type::INT) ;
1417
+ bool is_string = tokens[*token_index]. type == e_token_type::STRING;
1418
+ bool is_int = tokens[*token_index]. type == e_token_type::INT;
1423
1419
1424
1420
if (!is_string && !is_int)
1425
1421
return false ;
@@ -1435,29 +1431,27 @@ static bool realloc_and_load_pb_graph_pin_ptrs_at_var(const int line_num,
1435
1431
1436
1432
if (tokens[*token_index].type == e_token_type::OPEN_SQUARE_BRACKET) {
1437
1433
(*token_index)++;
1438
- if (! checkTokenType ( tokens[*token_index], e_token_type::INT) ) {
1434
+ if (tokens[*token_index]. type != e_token_type::INT) {
1439
1435
return false ;
1440
1436
}
1441
1437
pin_msb = vtr::atoi (tokens[*token_index].data );
1442
1438
VTR_ASSERT_MSG (pin_msb >= 0 , " Pin most-significant-bit must be non-negative" );
1443
1439
(*token_index)++;
1444
- if (!checkTokenType (tokens[*token_index], e_token_type::COLON)) {
1445
- if (!checkTokenType (tokens[*token_index],
1446
- e_token_type::CLOSE_SQUARE_BRACKET)) {
1440
+ if (tokens[*token_index].type != e_token_type::COLON) {
1441
+ if (tokens[*token_index].type != e_token_type::CLOSE_SQUARE_BRACKET) {
1447
1442
return false ;
1448
1443
}
1449
1444
pin_lsb = pin_msb;
1450
1445
(*token_index)++;
1451
1446
} else {
1452
1447
(*token_index)++;
1453
- if (! checkTokenType ( tokens[*token_index], e_token_type::INT) ) {
1448
+ if (tokens[*token_index]. type != e_token_type::INT) {
1454
1449
return false ;
1455
1450
}
1456
1451
pin_lsb = vtr::atoi (tokens[*token_index].data );
1457
1452
VTR_ASSERT_MSG (pin_lsb >= 0 , " Pin most-significant-bit must be non-negative" );
1458
1453
(*token_index)++;
1459
- if (!checkTokenType (tokens[*token_index],
1460
- e_token_type::CLOSE_SQUARE_BRACKET)) {
1454
+ if (tokens[*token_index].type != e_token_type::CLOSE_SQUARE_BRACKET) {
1461
1455
return false ;
1462
1456
}
1463
1457
(*token_index)++;
0 commit comments