Cause of error "Have unordered match in sub-expressions"
- Dominant language
- C++
- Stars
- 5.5k
- Forks
- 816
- Avg merge
- 4d 21h
- Merged PRs (30d)
- 2
Description
Following on from https://github.com/intel/hyperscan/issues/234, except there are a few things I wasn't sure about and would like to understand the issue in more detail.
The error seems to appear when any pattern in a logical combination ends with $, \b.
E.g.
```
[
{
"id": 100,
"expr": "hello",
"flags": "quiet"
},
{
"id": 101,
"expr": "world$",
"flags": "quiet"
},
{
"id": 102,
"expr": "100 & 101",
"flags": "combination"
}
]
```
- How does having/not having $ affect the matching done by hyperscan, in terms of offsets and reporting inaccurate results? I saw in https://github.com/intel/hyperscan/issues/325 that matching is done at each offset. Is it due it not being able to determine if the current offset is EOL?
- What does it mean for a pattern to be "unordered"?
Thanks in advance.
Contributor guide
Research direction
Reproduce the reported JSON expressions and compare the behavior with the explanations in issues 234 and 325. Trace how logical combinations containing patterns ending in $ or \b are processed, then document what "unordered" means, how offsets and end-of-line handling affect reports, and why the example produces the error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100