@@ -1160,12 +1160,54 @@ void verilog_indexer_parsert::rGenerateBegin()
11601160
11611161void verilog_indexer_parsert::rProperty ()
11621162{
1163+ next_token (); // property
1164+
1165+ auto name = next_token (); // name
1166+
1167+ {
1168+ idt id;
1169+ id.kind = idt::PROPERTY;
1170+ id.name = name.text ;
1171+ id.module = current_module;
1172+ id.file_name = verilog_parser.get_file ();
1173+ id.line_number = verilog_parser.get_line_no ();
1174+ indexer.add (std::move (id));
1175+ }
1176+
11631177 skip_until (TOK_ENDPROPERTY);
1178+
1179+ // optional label
1180+ if (peek () == TOK_COLON)
1181+ {
1182+ next_token (); // :
1183+ next_token (); // identifier
1184+ }
11641185}
11651186
11661187void verilog_indexer_parsert::rSequence ()
11671188{
1168- skip_until (TOK_ENDSEQUENCE);
1189+ next_token (); // sequence
1190+
1191+ auto name = next_token (); // name
1192+
1193+ {
1194+ idt id;
1195+ id.kind = idt::SEQUENCE;
1196+ id.name = name.text ;
1197+ id.module = current_module;
1198+ id.file_name = verilog_parser.get_file ();
1199+ id.line_number = verilog_parser.get_line_no ();
1200+ indexer.add (std::move (id));
1201+ }
1202+
1203+ skip_until (TOK_ENDPROPERTY);
1204+
1205+ // optional label
1206+ if (peek () == TOK_COLON)
1207+ {
1208+ next_token (); // :
1209+ next_token (); // identifier
1210+ }
11691211}
11701212
11711213void verilog_indexer_parsert::rSpecify ()
@@ -1452,6 +1494,16 @@ int verilog_index(const cmdlinet &cmdline)
14521494 // Show the module instances.
14531495 show_kind (verilog_indexert::idt::kindt::TASK, indexer);
14541496 }
1497+ else if (cmdline.isset (" sequences" ))
1498+ {
1499+ // Show the sequences.
1500+ show_kind (verilog_indexert::idt::kindt::SEQUENCE, indexer);
1501+ }
1502+ else if (cmdline.isset (" properties" ))
1503+ {
1504+ // Show the properties.
1505+ show_kind (verilog_indexert::idt::kindt::PROPERTY, indexer);
1506+ }
14551507 else
14561508 {
14571509 auto total_number_of = indexer.total_number_of ();
@@ -1476,6 +1528,10 @@ int verilog_index(const cmdlinet &cmdline)
14761528 << total_number_of[idt::FUNCTION] << ' \n ' ;
14771529 std::cout << " Number of tasks...........: " << total_number_of[idt::TASK]
14781530 << ' \n ' ;
1531+ std::cout << " Number of properties......: "
1532+ << total_number_of[idt::PROPERTY] << ' \n ' ;
1533+ std::cout << " Number of sequences.......: "
1534+ << total_number_of[idt::SEQUENCE] << ' \n ' ;
14791535 std::cout << " Number of module instances: "
14801536 << total_number_of[idt::INSTANCE] << ' \n ' ;
14811537 std::cout << " Number of configurations..: " << total_number_of[idt::CONFIG]
0 commit comments