summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2024-09-15 13:03:52 -0700
committerKaz Kylheku <kaz@kylheku.com>2024-09-15 13:03:52 -0700
commit7f20e18a3cc86e456d5810100b902dd33645e786 (patch)
tree303dcc52cae79f0226e40d966267aa7df6ef7546
parent8dd8f7f64d15230884974cd7844269e92f5cf9f9 (diff)
downloadtxr-7f20e18a3cc86e456d5810100b902dd33645e786.tar.gz
txr-7f20e18a3cc86e456d5810100b902dd33645e786.tar.bz2
txr-7f20e18a3cc86e456d5810100b902dd33645e786.zip
regex: misleading comment.
* regex.c (mfa_move_closure): Fix misleading wording in comment. The state which matches the character (has a transition for it) is not the one added to the move set.
-rw-r--r--regex.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/regex.c b/regex.c
index 9437881e..ab4155ed 100644
--- a/regex.c
+++ b/regex.c
@@ -1369,7 +1369,8 @@ static int nfa_move_closure(nfa_state_t **stack, nfa_state_t **set, int nin,
continue;
}
- /* The state matches the character, so add it to the move set.
+ /* The state has a transition on the character, add the transition's
+ destination set to the move set.
C trick: all character-transitioning state types have the
pointer to the next state in the same position,
among a common set of leading struct members in the union,