swiftlang / swift-experimental-string-processing

An early experimental general-purpose pattern matching engine for Swift.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`(a*)*` spins the matching engine forever

hamishknight opened this issue · comments

Attempting to match the input "a" against the pattern (a*)* appears to spin the matching engine forever.

rdar://96461197

This is a common/natural fall out of simple backtracking. We'll want to eventually have loop analysis over an IR to avoid it, but there might be a shorter term fix we can do.