(analyse_first): New function obtained by ripping out most
authorStefan Monnier <monnier@iro.umontreal.ca>
Wed, 29 Mar 2000 04:01:45 +0000 (04:01 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Wed, 29 Mar 2000 04:01:45 +0000 (04:01 +0000)
commitf6a3f532b0b6dae667514f217db3a62dfaa2d4ce
treeba2557e71310c92f2f36862e1ae5c756b28a1306
parentbb15bd9a51769b13a2e1adb3c504d193606c6482
(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'.
src/ChangeLog
src/regex.c