|
55 | 55 | </Attributes>
|
56 | 56 | <Docs>
|
57 | 57 | <summary>The <see cref="T:System.Text.RegularExpressions.RegexRunner" /> class is the base class for compiled regular expressions.</summary>
|
58 |
| - <remarks>To be added.</remarks> |
| 58 | + <remarks> |
| 59 | + <para>Provides the driver code that calls the subclass's Scan method for either scanning or direct execution.</para> |
| 60 | + <para>Also maintains memory allocation for the backtracking stack, the grouping stack and the longjump crawlstack, and provides methods to push new subpattern match results into (or remove backtracked results from) the Match instance.</para> |
| 61 | + </remarks> |
59 | 62 | <forInternalUseOnly />
|
60 | 63 | </Docs>
|
61 | 64 | <Members>
|
|
1056 | 1059 | </ReturnValue>
|
1057 | 1060 | <Docs>
|
1058 | 1061 | <summary>Used by a <see cref="T:System.Text.RegularExpressions.Regex" /> object generated by the <see cref="Overload:System.Text.RegularExpressions.Regex.CompileToAssembly" /> method.</summary>
|
1059 |
| - <remarks>To be added.</remarks> |
| 1062 | + <remarks> |
| 1063 | + <para>Every time a group has a capture, we push its group number onto the runcrawl stack.</para> |
| 1064 | + <para>In the case of a balanced match, we push BOTH groups onto the stack.</para> |
| 1065 | + </remarks> |
1060 | 1066 | <forInternalUseOnly />
|
1061 | 1067 | </Docs>
|
1062 | 1068 | </Member>
|
|
1231 | 1237 | </ReturnValue>
|
1232 | 1238 | <Docs>
|
1233 | 1239 | <summary>Used by a <see cref="T:System.Text.RegularExpressions.Regex" /> object generated by the <see cref="Overload:System.Text.RegularExpressions.Regex.CompileToAssembly" /> method.</summary>
|
1234 |
| - <remarks>To be added.</remarks> |
| 1240 | + <remarks> |
| 1241 | + <para>This stack is used to track text positions across different opcodes.</para> |
| 1242 | + <para>For example, in /(a*b)+/, the parentheses result in a SetMark/CaptureMark pair. SetMark records the text position before we match a*b. Then CaptureMark uses that position to figure out where the capture starts.</para> |
| 1243 | + <para>Opcodes which push onto this stack are always paired with other opcodes which will pop the value from it later. A successful match should mean that this stack is empty.</para> |
| 1244 | + </remarks> |
1235 | 1245 | <forInternalUseOnly />
|
1236 | 1246 | </Docs>
|
1237 | 1247 | </Member>
|
|
1361 | 1371 | </ReturnValue>
|
1362 | 1372 | <Docs>
|
1363 | 1373 | <summary>Used by a <see cref="T:System.Text.RegularExpressions.Regex" /> object generated by the <see cref="Overload:System.Text.RegularExpressions.Regex.CompileToAssembly" /> method.</summary>
|
1364 |
| - <remarks>To be added.</remarks> |
| 1374 | + <remarks> |
| 1375 | + <para>We now always use a sliced span of the input from runtextbeg to runtextend, which means that runtextbeg is now always 0 except for CompiledToAssembly scenario which works over the original input.</para> |
| 1376 | + </remarks> |
1365 | 1377 | <forInternalUseOnly />
|
1366 | 1378 | </Docs>
|
1367 | 1379 | </Member>
|
|
1404 | 1416 | </ReturnValue>
|
1405 | 1417 | <Docs>
|
1406 | 1418 | <summary>Used by a <see cref="T:System.Text.RegularExpressions.Regex" /> object generated by the <see cref="Overload:System.Text.RegularExpressions.Regex.CompileToAssembly" /> method.</summary>
|
1407 |
| - <remarks>To be added.</remarks> |
| 1419 | + <remarks> |
| 1420 | + <para>Because we now pass in a sliced span of the input into Scan, the runtextend will always match the length of that passed in span except for CompileToAssembly scenario, which still works over the original input.</para> |
| 1421 | + </remarks> |
1408 | 1422 | <forInternalUseOnly />
|
1409 | 1423 | </Docs>
|
1410 | 1424 | </Member>
|
|
1490 | 1504 | </ReturnValue>
|
1491 | 1505 | <Docs>
|
1492 | 1506 | <summary>Used by a <see cref="T:System.Text.RegularExpressions.Regex" /> object generated by the <see cref="Overload:System.Text.RegularExpressions.Regex.CompileToAssembly" /> method.</summary>
|
1493 |
| - <remarks>To be added.</remarks> |
| 1507 | + <remarks> |
| 1508 | + <para>The differs from <see cref="F:System.Text.RegularExpressions.RegexRunner.runtextbeg" /> in that lookbehinds will be able to see text before <see cref="F:System.Text.RegularExpressions.RegexRunner.runtextstart" /> but not before <see cref="F:System.Text.RegularExpressions.RegexRunner.runtextbeg" />.</para> |
| 1509 | + </remarks> |
1494 | 1510 | <forInternalUseOnly />
|
1495 | 1511 | </Docs>
|
1496 | 1512 | </Member>
|
|
1534 | 1550 | </ReturnValue>
|
1535 | 1551 | <Docs>
|
1536 | 1552 | <summary>Used by a <see cref="T:System.Text.RegularExpressions.Regex" /> object generated by the <see cref="Overload:System.Text.RegularExpressions.Regex.CompileToAssembly" /> method.</summary>
|
1537 |
| - <remarks>To be added.</remarks> |
| 1553 | + <remarks> |
| 1554 | + <para>Opcodes use this to store data regarding what they have matched and where to backtrack to. Each "frame" on the stack takes the form of [CodePosition Data1 Data2...], where CodePosition is the position of the current opcode and the data values are all optional. The CodePosition can be negative, and these values (also called "back2") are used by the BranchMark family of opcodes to indicate whether they are backtracking after a successful or failed match.</para> |
| 1555 | + <para>When we backtrack, we pop the CodePosition off the stack, set the current instruction pointer to that code position, and mark the opcode with a backtracking flag ("Back"). Each opcode then knows how to handle its own data.</para> |
| 1556 | + </remarks> |
1538 | 1557 | <forInternalUseOnly />
|
1539 | 1558 | </Docs>
|
1540 | 1559 | </Member>
|
|
0 commit comments