In FilterExpr::lex allow '.' in key = value filter
The current lexer doesn't allow the . in the filter name =~ tcdm_master_.*req_.*_i Signed-off-by: Matt Liberty <mliberty@precisioninno.com>
This commit is contained in:
parent
8b4c581a90
commit
e288db0225
|
|
@ -119,7 +119,7 @@ FilterExpr::lex(bool bool_props_as_int)
|
|||
{std::regex("^\\s+"), Token::Kind::skip},
|
||||
{std::regex("^defined\\(([a-zA-Z_]+)\\)"), Token::Kind::defined},
|
||||
{std::regex("^undefined\\(([a-zA-Z_]+)\\)"), Token::Kind::undefined},
|
||||
{std::regex("^@?([a-zA-Z_]+) *((==|!=|=~|!~) *([0-9a-zA-Z_\\/$\\[\\]*?]+))?"), Token::Kind::predicate},
|
||||
{std::regex("^@?([a-zA-Z_]+) *((==|!=|=~|!~) *([0-9a-zA-Z_\\/$\\[\\]*?.]+))?"), Token::Kind::predicate},
|
||||
{std::regex("^(&&)"), Token::Kind::op_and},
|
||||
{std::regex("^(\\|\\|)"), Token::Kind::op_or},
|
||||
{std::regex("^(!)"), Token::Kind::op_inv},
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@ sta_module_tests("sdc"
|
|||
exception_thru_net
|
||||
exception_thru_override
|
||||
exceptions
|
||||
filter_dot
|
||||
filter_query
|
||||
genclk_advanced
|
||||
leaf_pin_filter_removal
|
||||
|
|
|
|||
|
|
@ -0,0 +1,2 @@
|
|||
[get_cells -filter {name =~ r.*} *]
|
||||
{name =~ tcdm_master_.*req_.*_i}
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
# Test that '.' is allowed in filter predicate values.
|
||||
# Targets: FilterExpr::lex (FilterObjects.cc)
|
||||
source ../../test/helpers.tcl
|
||||
|
||||
read_liberty ../../test/asap7_small.lib.gz
|
||||
read_verilog ../../test/reg1_asap7.v
|
||||
link_design top
|
||||
create_clock -name clk -period 500 {clk1 clk2 clk3}
|
||||
|
||||
# Filter with dot in glob pattern value (no cells have literal '.' so no match)
|
||||
puts {[get_cells -filter {name =~ r.*} *]}
|
||||
report_object_full_names [get_cells -filter {name =~ r.*} *]
|
||||
|
||||
# Verify filter_expr_to_postfix parses dot-containing values
|
||||
puts [sta::filter_expr_to_postfix "name =~ tcdm_master_.*req_.*_i" 0]
|
||||
Loading…
Reference in New Issue