| 52 |
required. Consider now this rewritten pattern, which matches exactly the same |
required. Consider now this rewritten pattern, which matches exactly the same |
| 53 |
strings: |
strings: |
| 54 |
.sp |
.sp |
| 55 |
([^<]++|<(?!inet)) |
([^<]++|<(?!inet))+ |
| 56 |
.sp |
.sp |
| 57 |
This uses very much less stack, because runs of characters that do not contain |
This uses very much less stack, because runs of characters that do not contain |
| 58 |
"<" are "swallowed" in one item inside the parentheses. Recursion happens only |
"<" are "swallowed" in one item inside the parentheses. Recursion happens only |
| 113 |
should set the limit at 16000 recursions. A 64Mb stack, on the other hand, can |
should set the limit at 16000 recursions. A 64Mb stack, on the other hand, can |
| 114 |
support around 128000 recursions. The \fBpcretest\fP test program has a command |
support around 128000 recursions. The \fBpcretest\fP test program has a command |
| 115 |
line option (\fB-S\fP) that can be used to increase the size of its stack. |
line option (\fB-S\fP) that can be used to increase the size of its stack. |
| 116 |
.P |
. |
| 117 |
.in 0 |
. |
| 118 |
Last updated: 14 September 2006 |
.SH AUTHOR |
| 119 |
.br |
.rs |
| 120 |
Copyright (c) 1997-2006 University of Cambridge. |
.sp |
| 121 |
|
.nf |
| 122 |
|
Philip Hazel |
| 123 |
|
University Computing Service |
| 124 |
|
Cambridge CB2 3QH, England. |
| 125 |
|
.fi |
| 126 |
|
. |
| 127 |
|
. |
| 128 |
|
.SH REVISION |
| 129 |
|
.rs |
| 130 |
|
.sp |
| 131 |
|
.nf |
| 132 |
|
Last updated: 12 March 2007 |
| 133 |
|
Copyright (c) 1997-2007 University of Cambridge. |
| 134 |
|
.fi |