goodmami / pe

Fastest general-purpose parsing library for Python with a familiar API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Character classes in machine parser fail at odd times

goodmami opened this issue · comments

Sometimes character classes fail unexpectedly. I noticed this when a double-quoted string had a pattern like "a1", but it didn't fail on "1a".

It turns out this is because the CharacterClass scanner for the machine parsers checks each range with a loop index, but it doesn't reset this index for the next character.