| 8 |
\fBmatch()\fP. This calls itself recursively at branch points in the pattern, |
\fBmatch()\fP. This calls itself recursively at branch points in the pattern, |
| 9 |
in order to remember the state of the match so that it can back up and try a |
in order to remember the state of the match so that it can back up and try a |
| 10 |
different alternative if the first one fails. As matching proceeds deeper and |
different alternative if the first one fails. As matching proceeds deeper and |
| 11 |
deeper into the tree of possibilities, the recursion depth increases. |
deeper into the tree of possibilities, the recursion depth increases. The |
| 12 |
|
\fBmatch()\P function is also called in other circumstances, for example, |
| 13 |
|
whenever a parenthesized sub-pattern is entered, and in certain cases of |
| 14 |
|
repetition. |
| 15 |
.P |
.P |
| 16 |
Not all calls of \fBmatch()\fP increase the recursion depth; for an item such |
Not all calls of \fBmatch()\fP increase the recursion depth; for an item such |
| 17 |
as a* it may be called several times at the same level, after matching |
as a* it may be called several times at the same level, after matching |
| 173 |
.rs |
.rs |
| 174 |
.sp |
.sp |
| 175 |
.nf |
.nf |
| 176 |
Last updated: 03 January 2010 |
Last updated: 22 July 2011 |
| 177 |
Copyright (c) 1997-2010 University of Cambridge. |
Copyright (c) 1997-2011 University of Cambridge. |
| 178 |
.fi |
.fi |