[pcre-dev] Why recursion occurs?

Góra strony
Delete this message
Autor: ND
Data:  
Dla: Pcre-dev
Temat: [pcre-dev] Why recursion occurs?
Good day!

Here is pcretest.exe listing:

PCRE version 8.11 2010-12-10
/(a)/
\Ma
Minimum match() limit = 3
Minimum match() recursion limit = 2
0: a
1: a

Documentation at "PCRE DISCUSSION OF STACK USAGE" chapter says:
"When you call pcre_exec(), it makes use of an internal function called
match(). This calls itself recursively at branch points in the pattern, in
order to remember the state of the match so that it can back up and try a
different alternative if the first one fails."

Why recursion limit in the above example is greater then 1? Why a branch
point created?

Thanx.