Merge pull request #606 from markshannon/python-fix-regex-fp

Python: Fix off-by-one error in regex parsing.
This commit is contained in:
Taus
2018-12-06 12:59:44 +01:00
committed by GitHub
8 changed files with 48 additions and 5 deletions

View File

@@ -565,10 +565,8 @@ abstract class RegexString extends Expr {
this.sequenceOrQualified(start, end) and not this.isOptionDivider(start-1) and
item_start = start
or
exists(int endp1 | end = endp1-1 |
start = end and not this.item_end(start) and this.isOptionDivider(endp1) and
item_start = start
)
start = end and not this.item_end(start) and this.isOptionDivider(end) and
item_start = start
or
exists(int mid |
this.subalternation(start, mid, _) and