diff options
Diffstat (limited to 'support/dfa.c')
-rw-r--r-- | support/dfa.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/support/dfa.c b/support/dfa.c index 8aef2f37..df32dd90 100644 --- a/support/dfa.c +++ b/support/dfa.c @@ -2437,7 +2437,7 @@ merge_nfa_state (struct dfa *d, idx_t tindex, char *flags, continue; } - if (!(flags[sindex] & (OPT_LPAREN | OPT_RPAREN))) + if (sindex != tindex && !(flags[sindex] & (OPT_LPAREN | OPT_RPAREN))) { idx_t j; @@ -2445,6 +2445,9 @@ merge_nfa_state (struct dfa *d, idx_t tindex, char *flags, { idx_t dindex = follows[tindex].elems[j].index; + if (dindex == tindex) + continue; + if (follows[tindex].elems[j].constraint != iconstraint) continue; |