1.rename rule_state to rule_compile_state
2.recover regex_expr.json to make expr_matcher_gtest pass
This commit is contained in:
253
test/expr_matcher.json
Normal file
253
test/expr_matcher.json
Normal file
@@ -0,0 +1,253 @@
|
||||
{
|
||||
"expr_rules": [
|
||||
{
|
||||
"expr_id": 101,
|
||||
"pattern_num": 1,
|
||||
"patterns": [
|
||||
{
|
||||
"pattern_type": "literal",
|
||||
"match_method": "sub",
|
||||
"case_sensitive": "yes",
|
||||
"is_hexbin": "no",
|
||||
"pattern": "hello aaa",
|
||||
"offset": "1~10"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"expr_id": 102,
|
||||
"pattern_num": 1,
|
||||
"patterns": [
|
||||
{
|
||||
"pattern_type": "literal",
|
||||
"match_method": "sub",
|
||||
"case_sensitive": "yes",
|
||||
"is_hexbin": "no",
|
||||
"pattern": "hello bbb",
|
||||
"offset": "-1~10"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"expr_id": 103,
|
||||
"pattern_num": 1,
|
||||
"patterns": [
|
||||
{
|
||||
"pattern_type": "literal",
|
||||
"match_method": "sub",
|
||||
"case_sensitive": "yes",
|
||||
"is_hexbin": "no",
|
||||
"pattern": "hello ccc",
|
||||
"offset": "5~-1"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"expr_id": 104,
|
||||
"pattern_num": 1,
|
||||
"patterns": [
|
||||
{
|
||||
"pattern_type": "literal",
|
||||
"match_method": "sub",
|
||||
"case_sensitive": "yes",
|
||||
"is_hexbin": "no",
|
||||
"pattern": "hello ddd"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"expr_id": 105,
|
||||
"pattern_num": 1,
|
||||
"patterns": [
|
||||
{
|
||||
"pattern_type": "literal",
|
||||
"match_method": "exactly",
|
||||
"case_sensitive": "yes",
|
||||
"is_hexbin": "no",
|
||||
"pattern": "hello eee"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"expr_id": 106,
|
||||
"pattern_num": 1,
|
||||
"patterns": [
|
||||
{
|
||||
"pattern_type": "literal",
|
||||
"match_method": "prefix",
|
||||
"case_sensitive": "yes",
|
||||
"is_hexbin": "no",
|
||||
"pattern": "hello fff"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"expr_id": 107,
|
||||
"pattern_num": 1,
|
||||
"patterns": [
|
||||
{
|
||||
"pattern_type": "literal",
|
||||
"match_method": "suffix",
|
||||
"case_sensitive": "yes",
|
||||
"is_hexbin": "no",
|
||||
"pattern": "hello ggg"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"expr_id": 108,
|
||||
"pattern_num": 1,
|
||||
"patterns": [
|
||||
{
|
||||
"pattern_type": "literal",
|
||||
"match_method": "sub",
|
||||
"case_sensitive": "yes",
|
||||
"is_hexbin": "yes",
|
||||
"pattern": "2f68746d6c"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
"expr_id": 109,
|
||||
"pattern_num": 2,
|
||||
"patterns": [
|
||||
{
|
||||
"pattern_type": "literal",
|
||||
"match_method": "sub",
|
||||
"case_sensitive": "yes",
|
||||
"is_hexbin": "no",
|
||||
"pattern": "multi"
|
||||
},
|
||||
{
|
||||
"pattern_type": "literal",
|
||||
"match_method": "sub",
|
||||
"case_sensitive": "yes",
|
||||
"is_hexbin": "no",
|
||||
"pattern": "directed graph"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"expr_id": 110,
|
||||
"pattern_num": 1,
|
||||
"patterns": [
|
||||
{
|
||||
"pattern_type": "literal",
|
||||
"match_method": "sub",
|
||||
"case_sensitive": "yes",
|
||||
"is_hexbin": "no",
|
||||
"pattern": "#中国"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"expr_id": 111,
|
||||
"pattern_num": 1,
|
||||
"patterns": [
|
||||
{
|
||||
"pattern_type": "literal",
|
||||
"match_method": "sub",
|
||||
"case_sensitive": "yes",
|
||||
"is_hexbin": "no",
|
||||
"pattern": "يىلىدىكى"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"expr_id": 112,
|
||||
"pattern_num": 2,
|
||||
"patterns": [
|
||||
{
|
||||
"pattern_type": "literal",
|
||||
"match_method": "sub",
|
||||
"case_sensitive": "yes",
|
||||
"is_hexbin": "no",
|
||||
"pattern": "today",
|
||||
"offset": "3~7"
|
||||
},
|
||||
{
|
||||
"pattern_type": "literal",
|
||||
"match_method": "sub",
|
||||
"case_sensitive": "yes",
|
||||
"is_hexbin": "no",
|
||||
"pattern": "today",
|
||||
"offset": "16~20"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"expr_id": 113,
|
||||
"pattern_num": 2,
|
||||
"patterns": [
|
||||
{
|
||||
"pattern_type": "literal",
|
||||
"match_method": "sub",
|
||||
"case_sensitive": "yes",
|
||||
"is_hexbin": "no",
|
||||
"pattern": "a finite or infinite"
|
||||
},
|
||||
{
|
||||
"pattern_type": "literal",
|
||||
"match_method": "sub",
|
||||
"case_sensitive": "yes",
|
||||
"is_hexbin": "no",
|
||||
"pattern": "directed path"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"expr_id": 114,
|
||||
"pattern_num": 1,
|
||||
"patterns": [
|
||||
{
|
||||
"pattern_type": "regex",
|
||||
"match_method": "sub",
|
||||
"case_sensitive": "yes",
|
||||
"is_hexbin": "no",
|
||||
"pattern": "query=(.*)"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"expr_id": 115,
|
||||
"pattern_num": 3,
|
||||
"patterns": [
|
||||
{
|
||||
"pattern_type": "literal",
|
||||
"match_method": "sub",
|
||||
"case_sensitive": "yes",
|
||||
"is_hexbin": "no",
|
||||
"pattern": "one"
|
||||
},
|
||||
{
|
||||
"pattern_type": "literal",
|
||||
"match_method": "sub",
|
||||
"case_sensitive": "yes",
|
||||
"is_hexbin": "no",
|
||||
"pattern": "two"
|
||||
},
|
||||
{
|
||||
"pattern_type": "literal",
|
||||
"match_method": "sub",
|
||||
"case_sensitive": "yes",
|
||||
"is_hexbin": "no",
|
||||
"pattern": "three"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"expr_id": 116,
|
||||
"pattern_num": 1,
|
||||
"patterns": [
|
||||
{
|
||||
"pattern_type": "regex",
|
||||
"match_method": "sub",
|
||||
"case_sensitive": "no",
|
||||
"is_hexbin": "no",
|
||||
"pattern": "\u00C9"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user