Skip to content

Commit

Permalink
Clarification.
Browse files Browse the repository at this point in the history
  • Loading branch information
katef committed May 10, 2024
1 parent c270ae9 commit 30b7a97
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/rx/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -483,8 +483,17 @@ build_literals_fsm(const struct fsm_options *opt, bool show_stats,
}

#ifndef NDEBUG
// TODO: could test to see that the fsm isn't any different. for general regexps, lots will be, because of /./
// TODO: but literal strings should be no different. except for the anchoring
/*
* We could test to see that the fsm isn't any different.
* For general regexps, lots will be different because of
* mapping down /./ edges to the character set.
*
* But literal strings should be no different after the mapping,
* except for the implicit .* at either end for anchoring.
*
* So in order to assert here, we'd depend on constructing
* those .* long-hand at union time.
*/
#endif

return fsm;
Expand Down

0 comments on commit 30b7a97

Please sign in to comment.