(analyse_first): New function obtained by ripping out most
authorStefan Monnier <monnier@iro.umontreal.ca>
Wed, 29 Mar 2000 04:01:25 +0000 (04:01 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Wed, 29 Mar 2000 04:01:25 +0000 (04:01 +0000)
commit0be3fccc912521ddf701b67cde2791ee2a9eba41
tree0896887d08404c5851f72fa69c155f4f2d0d13f5
parent1570cc6b96123f2781fe511677332bdcacf2fcc7
(analyse_first): New function obtained by ripping out most
of re_compile_fastmap and generalizing it a little bit so that it
can also just return whether a given (sub)pattern can match the empty
string or not.
(regex_compile): Use `analyse_first' to decide whether the loop-check
needs to be done or not for *, +, *? and +? (the loop check is costly
for non-greedy repetition).
(re_compile_fastmap): Delegate the actual work to `analyse_first'.
regex.c