49 instantiations of RegexNode
System (49)
regex\system\text\regularexpressions\RegexNode.cs (6)
232
return new
RegexNode
(emptyType, _options);
302
return min == Int32.MaxValue ? new
RegexNode
(Nothing, _options) : u;
359
return new
RegexNode
(RegexNode.Nothing, _options);
461
return new
RegexNode
(RegexNode.Empty, _options);
533
return new
RegexNode
(RegexNode.Empty, _options);
547
result = new
RegexNode
(lazy ? RegexNode.Lazyloop : RegexNode.Loop, _options, min, max);
regex\system\text\regularexpressions\RegexParser.cs (43)
234
StartGroup(new
RegexNode
(RegexNode.Capture, _options, 0, -1));
447
_concatenation = new
RegexNode
(RegexNode.Concatenate, _options);
657
return new
RegexNode
(RegexNode.Group, _options);
660
return new
RegexNode
(RegexNode.Capture, _options, _autocap++, -1);
789
return new
RegexNode
(RegexNode.Capture, _options, capnum, uncapnum);
808
return new
RegexNode
(RegexNode.Testref, _options, capnum);
820
return new
RegexNode
(RegexNode.Testref, _options, CaptureSlotFromName(capname));
863
return new
RegexNode
(NodeType, _options);
935
return new
RegexNode
(TypeFromCode(ch), _options);
940
return new
RegexNode
(RegexNode.Set, _options, RegexCharClass.ECMAWordClass);
941
return new
RegexNode
(RegexNode.Set, _options, RegexCharClass.WordClass);
946
return new
RegexNode
(RegexNode.Set, _options, RegexCharClass.NotECMAWordClass);
947
return new
RegexNode
(RegexNode.Set, _options, RegexCharClass.NotWordClass);
952
return new
RegexNode
(RegexNode.Set, _options, RegexCharClass.ECMASpaceClass);
953
return new
RegexNode
(RegexNode.Set, _options, RegexCharClass.SpaceClass);
958
return new
RegexNode
(RegexNode.Set, _options, RegexCharClass.NotECMASpaceClass);
959
return new
RegexNode
(RegexNode.Set, _options, RegexCharClass.NotSpaceClass);
964
return new
RegexNode
(RegexNode.Set, _options, RegexCharClass.ECMADigitClass);
965
return new
RegexNode
(RegexNode.Set, _options, RegexCharClass.DigitClass);
970
return new
RegexNode
(RegexNode.Set, _options, RegexCharClass.NotECMADigitClass);
971
return new
RegexNode
(RegexNode.Set, _options, RegexCharClass.NotDigitClass);
981
return new
RegexNode
(RegexNode.Set, _options, cc.ToStringClass());
1039
return new
RegexNode
(RegexNode.Ref, _options, capnum);
1061
return new
RegexNode
(RegexNode.Ref, _options, capnum);
1067
return new
RegexNode
(RegexNode.Ref, _options, capnum);
1078
return new
RegexNode
(RegexNode.Ref, _options, CaptureSlotFromName(capname));
1092
return new
RegexNode
(RegexNode.One, _options, ch);
1100
return new
RegexNode
(RegexNode.One, _options, '$');
1145
return new
RegexNode
(RegexNode.Ref, _options, capnum);
1152
return new
RegexNode
(RegexNode.Ref, _options, capnum);
1161
return new
RegexNode
(RegexNode.Ref, _options, CaptureSlotFromName(capname));
1170
return new
RegexNode
(RegexNode.One, _options, '$');
1195
return new
RegexNode
(RegexNode.Ref, _options, capnum);
1202
return new
RegexNode
(RegexNode.One, _options, '$');
1892
node = new
RegexNode
(RegexNode.Multi, _options, str);
1900
node = new
RegexNode
(RegexNode.One, _options, ch);
1947
_alternation = new
RegexNode
(RegexNode.Alternate, _options);
1948
_concatenation = new
RegexNode
(RegexNode.Concatenate, _options);
1964
_concatenation = new
RegexNode
(RegexNode.Concatenate, _options);
1999
_unit = new
RegexNode
(RegexNode.One, _options, ch);
2009
_unit = new
RegexNode
(RegexNode.Notone, _options, ch);
2016
_unit = new
RegexNode
(RegexNode.Set, _options, cc);
2030
_unit = new
RegexNode
(type, _options);
287 references to RegexNode
System (287)
regex\system\text\regularexpressions\RegexFCD.cs (94)
64
RegexNode
curNode;
65
RegexNode
concatNode = null;
72
case
RegexNode
.Concatenate:
79
case
RegexNode
.Greedy:
80
case
RegexNode
.Capture:
85
case
RegexNode
.Oneloop:
86
case
RegexNode
.Onelazy:
94
case
RegexNode
.One:
97
case
RegexNode
.Multi:
100
case
RegexNode
.Bol:
101
case
RegexNode
.Eol:
102
case
RegexNode
.Boundary:
103
case
RegexNode
.ECMABoundary:
104
case
RegexNode
.Beginning:
105
case
RegexNode
.Start:
106
case
RegexNode
.EndZ:
107
case
RegexNode
.End:
108
case
RegexNode
.Empty:
109
case
RegexNode
.Require:
110
case
RegexNode
.Prevent:
129
RegexNode
curNode;
130
RegexNode
concatNode = null;
138
case
RegexNode
.Concatenate:
145
case
RegexNode
.Greedy:
146
case
RegexNode
.Capture:
151
case
RegexNode
.Bol:
152
case
RegexNode
.Eol:
153
case
RegexNode
.Boundary:
154
case
RegexNode
.ECMABoundary:
155
case
RegexNode
.Beginning:
156
case
RegexNode
.Start:
157
case
RegexNode
.EndZ:
158
case
RegexNode
.End:
161
case
RegexNode
.Empty:
162
case
RegexNode
.Require:
163
case
RegexNode
.Prevent:
182
case
RegexNode
.Bol: return Bol;
183
case
RegexNode
.Eol: return Eol;
184
case
RegexNode
.Boundary: return Boundary;
185
case
RegexNode
.ECMABoundary: return ECMABoundary;
186
case
RegexNode
.Beginning: return Beginning;
187
case
RegexNode
.Start: return Start;
188
case
RegexNode
.EndZ: return EndZ;
189
case
RegexNode
.End: return End;
294
RegexNode
curNode;
310
curNode = (
RegexNode
)curNode._children[curChild];
355
private void CalculateFC(int NodeType,
RegexNode
node, int CurIndex) {
359
if (NodeType <=
RegexNode
.Ref) {
367
case
RegexNode
.Concatenate | BeforeChild:
368
case
RegexNode
.Alternate | BeforeChild:
369
case
RegexNode
.Testref | BeforeChild:
370
case
RegexNode
.Loop | BeforeChild:
371
case
RegexNode
.Lazyloop | BeforeChild:
374
case
RegexNode
.Testgroup | BeforeChild:
379
case
RegexNode
.Empty:
383
case
RegexNode
.Concatenate | AfterChild:
395
case
RegexNode
.Testgroup | AfterChild:
404
case
RegexNode
.Alternate | AfterChild:
405
case
RegexNode
.Testref | AfterChild:
414
case
RegexNode
.Loop | AfterChild:
415
case
RegexNode
.Lazyloop | AfterChild:
420
case
RegexNode
.Group | BeforeChild:
421
case
RegexNode
.Group | AfterChild:
422
case
RegexNode
.Capture | BeforeChild:
423
case
RegexNode
.Capture | AfterChild:
424
case
RegexNode
.Greedy | BeforeChild:
425
case
RegexNode
.Greedy | AfterChild:
428
case
RegexNode
.Require | BeforeChild:
429
case
RegexNode
.Prevent | BeforeChild:
434
case
RegexNode
.Require | AfterChild:
435
case
RegexNode
.Prevent | AfterChild:
438
case
RegexNode
.One:
439
case
RegexNode
.Notone:
440
PushFC(new RegexFC(node._ch, NodeType ==
RegexNode
.Notone, false, ci));
443
case
RegexNode
.Oneloop:
444
case
RegexNode
.Onelazy:
448
case
RegexNode
.Notoneloop:
449
case
RegexNode
.Notonelazy:
453
case
RegexNode
.Multi:
462
case
RegexNode
.Set:
466
case
RegexNode
.Setloop:
467
case
RegexNode
.Setlazy:
471
case
RegexNode
.Ref:
475
case
RegexNode
.Nothing:
476
case
RegexNode
.Bol:
477
case
RegexNode
.Eol:
478
case
RegexNode
.Boundary:
479
case
RegexNode
.Nonboundary:
480
case
RegexNode
.ECMABoundary:
481
case
RegexNode
.NonECMABoundary:
482
case
RegexNode
.Beginning:
483
case
RegexNode
.Start:
484
case
RegexNode
.EndZ:
485
case
RegexNode
.End:
regex\system\text\regularexpressions\RegexNode.cs (48)
120
internal List<
RegexNode
> _children;
128
internal
RegexNode
_next;
164
internal
RegexNode
ReverseLeft() {
185
internal
RegexNode
Reduce() {
186
RegexNode
n;
229
internal
RegexNode
StripEnation(int emptyType) {
247
internal
RegexNode
ReduceGroup() {
248
RegexNode
u;
263
internal
RegexNode
ReduceRep() {
264
RegexNode
u;
265
RegexNode
child;
312
internal
RegexNode
ReduceSet() {
346
internal
RegexNode
ReduceAlternation() {
355
RegexNode
at;
356
RegexNode
prev;
359
return new RegexNode(
RegexNode
.Nothing, _options);
406
if (prev._type ==
RegexNode
.One) {
414
if (at._type ==
RegexNode
.One) {
422
prev._type =
RegexNode
.Set;
426
else if (at._type ==
RegexNode
.Nothing) {
440
return StripEnation(
RegexNode
.Nothing);
451
internal
RegexNode
ReduceConcatenation() {
461
return new RegexNode(
RegexNode
.Empty, _options);
467
RegexNode
at;
468
RegexNode
prev;
475
if (at._type ==
RegexNode
.Concatenate &&
483
else if (at._type ==
RegexNode
.Multi ||
484
at._type ==
RegexNode
.One) {
496
if (prev._type ==
RegexNode
.One) {
497
prev._type =
RegexNode
.Multi;
502
if (at._type ==
RegexNode
.One)
508
if (at._type ==
RegexNode
.One)
515
else if (at._type ==
RegexNode
.Empty) {
526
return StripEnation(
RegexNode
.Empty);
529
internal
RegexNode
MakeQuantifier(bool lazy, int min, int max) {
530
RegexNode
result;
533
return new RegexNode(
RegexNode
.Empty, _options);
539
case
RegexNode
.One:
540
case
RegexNode
.Notone:
541
case
RegexNode
.Set:
543
MakeRep(lazy ?
RegexNode
.Onelazy :
RegexNode
.Oneloop, min, max);
547
result = new RegexNode(lazy ?
RegexNode
.Lazyloop :
RegexNode
.Loop, _options, min, max);
553
internal void AddChild(
RegexNode
newChild) {
554
RegexNode
reducedChild;
557
_children = new List<
RegexNode
>(4);
564
internal
RegexNode
Child(int i) {
regex\system\text\regularexpressions\RegexParser.cs (85)
23
internal
RegexNode
_stack;
24
internal
RegexNode
_group;
25
internal
RegexNode
_alternation;
26
internal
RegexNode
_concatenation;
27
internal
RegexNode
_unit;
63
RegexNode
root;
93
RegexNode
root;
230
internal
RegexNode
ScanRegex() {
234
StartGroup(new RegexNode(
RegexNode
.Capture, _options, 0, -1));
289
RegexNode
grouper;
324
AddUnitType(UseOptionM() ?
RegexNode
.Bol :
RegexNode
.Beginning);
328
AddUnitType(UseOptionM() ?
RegexNode
.Eol :
RegexNode
.EndZ);
443
internal
RegexNode
ScanReplacement() {
447
_concatenation = new RegexNode(
RegexNode
.Concatenate, _options);
644
internal
RegexNode
ScanGroupOpen() {
657
return new RegexNode(
RegexNode
.Group, _options);
660
return new RegexNode(
RegexNode
.Capture, _options, _autocap++, -1);
671
NodeType =
RegexNode
.Group;
676
NodeType =
RegexNode
.Require;
681
NodeType =
RegexNode
.Prevent;
685
NodeType =
RegexNode
.Greedy;
703
NodeType =
RegexNode
.Require;
711
NodeType =
RegexNode
.Prevent;
789
return new RegexNode(
RegexNode
.Capture, _options, capnum, uncapnum);
808
return new RegexNode(
RegexNode
.Testref, _options, capnum);
820
return new RegexNode(
RegexNode
.Testref, _options, CaptureSlotFromName(capname));
824
NodeType =
RegexNode
.Testgroup;
850
NodeType =
RegexNode
.Group;
920
internal
RegexNode
ScanBackslash() {
940
return new RegexNode(
RegexNode
.Set, _options, RegexCharClass.ECMAWordClass);
941
return new RegexNode(
RegexNode
.Set, _options, RegexCharClass.WordClass);
946
return new RegexNode(
RegexNode
.Set, _options, RegexCharClass.NotECMAWordClass);
947
return new RegexNode(
RegexNode
.Set, _options, RegexCharClass.NotWordClass);
952
return new RegexNode(
RegexNode
.Set, _options, RegexCharClass.ECMASpaceClass);
953
return new RegexNode(
RegexNode
.Set, _options, RegexCharClass.SpaceClass);
958
return new RegexNode(
RegexNode
.Set, _options, RegexCharClass.NotECMASpaceClass);
959
return new RegexNode(
RegexNode
.Set, _options, RegexCharClass.NotSpaceClass);
964
return new RegexNode(
RegexNode
.Set, _options, RegexCharClass.ECMADigitClass);
965
return new RegexNode(
RegexNode
.Set, _options, RegexCharClass.DigitClass);
970
return new RegexNode(
RegexNode
.Set, _options, RegexCharClass.NotECMADigitClass);
971
return new RegexNode(
RegexNode
.Set, _options, RegexCharClass.NotDigitClass);
981
return new RegexNode(
RegexNode
.Set, _options, cc.ToStringClass());
991
internal
RegexNode
ScanBasicBackslash() {
1039
return new RegexNode(
RegexNode
.Ref, _options, capnum);
1061
return new RegexNode(
RegexNode
.Ref, _options, capnum);
1067
return new RegexNode(
RegexNode
.Ref, _options, capnum);
1078
return new RegexNode(
RegexNode
.Ref, _options, CaptureSlotFromName(capname));
1092
return new RegexNode(
RegexNode
.One, _options, ch);
1098
internal
RegexNode
ScanDollar() {
1100
return new RegexNode(
RegexNode
.One, _options, '$');
1145
return new RegexNode(
RegexNode
.Ref, _options, capnum);
1152
return new RegexNode(
RegexNode
.Ref, _options, capnum);
1161
return new RegexNode(
RegexNode
.Ref, _options, CaptureSlotFromName(capname));
1170
return new RegexNode(
RegexNode
.One, _options, '$');
1195
return new RegexNode(
RegexNode
.Ref, _options, capnum);
1202
return new RegexNode(
RegexNode
.One, _options, '$');
1454
return UseOptionE() ?
RegexNode
.ECMABoundary :
RegexNode
.Boundary;
1456
return UseOptionE() ?
RegexNode
.NonECMABoundary :
RegexNode
.Nonboundary;
1458
return
RegexNode
.Beginning;
1460
return
RegexNode
.Start;
1462
return
RegexNode
.EndZ;
1464
return
RegexNode
.End;
1466
return
RegexNode
.Nothing;
1873
RegexNode
node;
1892
node = new RegexNode(
RegexNode
.Multi, _options, str);
1900
node = new RegexNode(
RegexNode
.One, _options, ch);
1926
if (_group.Type() ==
RegexNode
.Testgroup && _group.ChildCount() == 0) {
1945
internal void StartGroup(
RegexNode
openGroup) {
1947
_alternation = new RegexNode(
RegexNode
.Alternate, _options);
1948
_concatenation = new RegexNode(
RegexNode
.Concatenate, _options);
1957
if (_group.Type() ==
RegexNode
.Testgroup || _group.Type() ==
RegexNode
.Testref) {
1964
_concatenation = new RegexNode(
RegexNode
.Concatenate, _options);
1988
internal
RegexNode
Unit() {
1999
_unit = new RegexNode(
RegexNode
.One, _options, ch);
2009
_unit = new RegexNode(
RegexNode
.Notone, _options, ch);
2016
_unit = new RegexNode(
RegexNode
.Set, _options, cc);
2022
internal void AddUnitNode(
RegexNode
node) {
2037
if (_group.Type() ==
RegexNode
.Testgroup || _group.Type() ==
RegexNode
.Testref) {
2040
if (_group.Type() ==
RegexNode
.Testref && _group.ChildCount() > 2 || _group.ChildCount() > 3)
regex\system\text\regularexpressions\RegexReplacement.cs (6)
25
internal RegexReplacement(String rep,
RegexNode
concat, Hashtable _caps) {
34
if (concat.Type() !=
RegexNode
.Concatenate)
42
RegexNode
child = concat.Child(i);
45
case
RegexNode
.Multi:
48
case
RegexNode
.One:
51
case
RegexNode
.Ref:
regex\system\text\regularexpressions\RegexTree.cs (2)
19
internal RegexTree(
RegexNode
root, Hashtable caps, Int32[] capnumlist, int captop, Hashtable capnames, String[] capslist, RegexOptions opts)
32
internal
RegexNode
_root;
regex\system\text\regularexpressions\RegexWriter.cs (52)
223
RegexNode
curNode;
263
curNode = (
RegexNode
)curNode._children[curChild];
309
internal void EmitFragment(int nodetype,
RegexNode
node, int CurIndex) {
312
if (nodetype <=
RegexNode
.Ref) {
320
case
RegexNode
.Concatenate | BeforeChild:
321
case
RegexNode
.Concatenate | AfterChild:
322
case
RegexNode
.Empty:
325
case
RegexNode
.Alternate | BeforeChild:
332
case
RegexNode
.Alternate | AfterChild: {
349
case
RegexNode
.Testref | BeforeChild:
361
case
RegexNode
.Testref | AfterChild:
380
case
RegexNode
.Testgroup | BeforeChild:
391
case
RegexNode
.Testgroup | AfterChild:
415
case
RegexNode
.Loop | BeforeChild:
416
case
RegexNode
.Lazyloop | BeforeChild:
430
case
RegexNode
.Loop | AfterChild:
431
case
RegexNode
.Lazyloop | AfterChild: {
433
int Lazy = (nodetype - (
RegexNode
.Loop | AfterChild));
445
case
RegexNode
.Group | BeforeChild:
446
case
RegexNode
.Group | AfterChild:
449
case
RegexNode
.Capture | BeforeChild:
453
case
RegexNode
.Capture | AfterChild:
457
case
RegexNode
.Require | BeforeChild:
466
case
RegexNode
.Require | AfterChild:
475
case
RegexNode
.Prevent | BeforeChild:
481
case
RegexNode
.Prevent | AfterChild:
487
case
RegexNode
.Greedy | BeforeChild:
491
case
RegexNode
.Greedy | AfterChild:
495
case
RegexNode
.One:
496
case
RegexNode
.Notone:
500
case
RegexNode
.Notoneloop:
501
case
RegexNode
.Notonelazy:
502
case
RegexNode
.Oneloop:
503
case
RegexNode
.Onelazy:
505
Emit(((node._type ==
RegexNode
.Oneloop || node._type ==
RegexNode
.Onelazy) ?
512
case
RegexNode
.Setloop:
513
case
RegexNode
.Setlazy:
521
case
RegexNode
.Multi:
525
case
RegexNode
.Set:
529
case
RegexNode
.Ref:
533
case
RegexNode
.Nothing:
534
case
RegexNode
.Bol:
535
case
RegexNode
.Eol:
536
case
RegexNode
.Boundary:
537
case
RegexNode
.Nonboundary:
538
case
RegexNode
.ECMABoundary:
539
case
RegexNode
.NonECMABoundary:
540
case
RegexNode
.Beginning:
541
case
RegexNode
.Start:
542
case
RegexNode
.EndZ:
543
case
RegexNode
.End: