Refractor the whole Thompson matcher using the queue-based(BFS) Bellman-Ford algorithm. Fix the grouping problem.
The original implementation uses a stack, which possibly runs slower when deduplicating; and cannot handle gourping correctly. The patch may not be very clear, so here's the whole files: https://github.com/innocentim/gcc/tree/tim/regex/libstdc++-v3/include/bits Thanks! -- Tim Shen
bfs.patch
Description: Binary data