Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ ConstructPos()

override void System.Xml.Schema.SequenceNode.ConstructPos ( BitSet firstpos,
BitSet lastpos,
BitSet[] followpos )
inline

Definition at line 53 of file SequenceNode.cs.

54 {
56 SequenceConstructPosContext item = new SequenceConstructPosContext(this, firstpos, lastpos);
57 SequenceNode this_;
58 while (true)
59 {
60 this_ = item.this_;
61 item.lastposLeft = new BitSet(lastpos.Count);
62 if (!(this_.LeftChild is SequenceNode))
63 {
64 break;
65 }
66 stack.Push(item);
67 item = new SequenceConstructPosContext((SequenceNode)this_.LeftChild, item.firstpos, item.lastposLeft);
68 }
69 this_.LeftChild.ConstructPos(item.firstpos, item.lastposLeft, followpos);
70 while (true)
71 {
72 item.firstposRight = new BitSet(firstpos.Count);
73 this_.RightChild.ConstructPos(item.firstposRight, item.lastpos, followpos);
74 if (this_.LeftChild.IsNullable && !this_.RightChild.IsRangeNode)
75 {
76 item.firstpos.Or(item.firstposRight);
77 }
78 if (this_.RightChild.IsNullable)
79 {
80 item.lastpos.Or(item.lastposLeft);
81 }
82 for (int num = item.lastposLeft.NextSet(-1); num != -1; num = item.lastposLeft.NextSet(num))
83 {
84 followpos[num].Or(item.firstposRight);
85 }
86 if (this_.RightChild.IsRangeNode)
87 {
88 ((LeafRangeNode)this_.RightChild).NextIteration = item.firstpos.Clone();
89 }
90 if (stack.Count != 0)
91 {
92 item = stack.Pop();
93 this_ = item.this_;
94 continue;
95 }
96 break;
97 }
98 }

References System.Xml.Schema.SyntaxTreeNode.ConstructPos(), System.Collections.Generic.Dictionary< TKey, TValue >.Count, System.Xml.Schema.BitSet.Count, System.Xml.Dictionary, System.Xml.Schema.SyntaxTreeNode.IsNullable, System.Xml.Schema.SyntaxTreeNode.IsRangeNode, System.item, System.Xml.Schema.InteriorNode.LeftChild, and System.Xml.Schema.InteriorNode.RightChild.