Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

https://github.com/microsoft/STL/blob/master/stl/inc/regex#L... is the code. Looks pretty simple, check if it matches the backreferences and error/continue.

The handling of repetition is more revealing, it doesn't appear to have "states" at all but rather is just the usual backtracking: https://github.com/microsoft/STL/blob/master/stl/inc/regex#L...

So the "NFA" is really an AST for the regex rather than an automaton based on Thompson's algorithm or similar.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: