Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
SequenceNode.cs
Go to the documentation of this file.
2
3namespace System.Xml.Schema;
4
5internal sealed class SequenceNode : InteriorNode
6{
28
29 public override bool IsNullable
30 {
31 get
32 {
35 do
36 {
37 if (sequenceNode.RightChild.IsRangeNode && ((LeafRangeNode)sequenceNode.RightChild).Min == 0m)
38 {
39 return true;
40 }
41 if (!sequenceNode.RightChild.IsNullable && !sequenceNode.RightChild.IsRangeNode)
42 {
43 return false;
44 }
45 leftChild = sequenceNode.LeftChild;
47 }
48 while (sequenceNode != null);
49 return leftChild.IsNullable;
50 }
51 }
52
53 public override void ConstructPos(BitSet firstpos, BitSet lastpos, BitSet[] followpos)
54 {
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 }
99
104}
void ExpandTreeNoRecursive(InteriorNode parent, SymbolsDictionary symbols, Positions positions)
override void ExpandTree(InteriorNode parent, SymbolsDictionary symbols, Positions positions)
override void ConstructPos(BitSet firstpos, BitSet lastpos, BitSet[] followpos)
void ConstructPos(BitSet firstpos, BitSet lastpos, BitSet[] followpos)
SequenceConstructPosContext(SequenceNode node, BitSet firstpos, BitSet lastpos)