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

◆ Finish()

ContentValidator System.Xml.Schema.ParticleContentValidator.Finish ( bool useDFA)
inline

Definition at line 189 of file ParticleContentValidator.cs.

190 {
191 if (_contentNode == null)
192 {
193 if (base.ContentType == XmlSchemaContentType.Mixed)
194 {
195 if (!base.IsOpen)
196 {
197 return ContentValidator.TextOnly;
198 }
199 return ContentValidator.Any;
200 }
201 return ContentValidator.Empty;
202 }
203 InteriorNode interiorNode = new SequenceNode();
205 LeafNode leafNode = (LeafNode)(interiorNode.RightChild = new LeafNode(_positions.Add(_symbols.AddName(XmlQualifiedName.Empty, null), null)));
207 int count = _positions.Count;
208 BitSet bitSet = new BitSet(count);
209 BitSet lastpos = new BitSet(count);
210 BitSet[] array = new BitSet[count];
211 for (int i = 0; i < count; i++)
212 {
213 array[i] = new BitSet(count);
214 }
215 interiorNode.ConstructPos(bitSet, lastpos, array);
216 if (_minMaxNodesCount > 0)
217 {
220 if (_enableUpaCheck)
221 {
223 for (int j = 0; j < count; j++)
224 {
226 }
227 }
228 return new RangeContentValidator(bitSet, array, _symbols, _positions, leafNode.Pos, base.ContentType, interiorNode.LeftChild.IsNullable, posWithRangeTerminals, _minMaxNodesCount);
229 }
230 int[][] array2 = null;
232 {
233 if (_enableUpaCheck)
234 {
236 }
237 }
238 else if (useDFA)
239 {
241 }
242 if (array2 != null)
243 {
244 return new DfaContentValidator(array2, _symbols, base.ContentType, base.IsOpen, interiorNode.LeftChild.IsNullable);
245 }
246 return new NfaContentValidator(bitSet, array, _symbols, _positions, leafNode.Pos, base.ContentType, base.IsOpen, interiorNode.LeftChild.IsNullable);
247 }
ContentValidator(XmlSchemaContentType contentType)
void CheckUniqueParticleAttribution(BitSet firstpos, BitSet[] followpos)
int[][] BuildTransitionTable(BitSet firstpos, BitSet[] followpos, int endMarkerPos)
BitSet GetApplicableMinMaxFollowPos(BitSet curpos, BitSet posWithRangeTerminals, BitSet[] minmaxFollowPos)
BitSet[] CalculateTotalFollowposForRangeNodes(BitSet firstpos, BitSet[] followpos, out BitSet posWithRangeTerminals)
int Add(int symbol, object particle)
Definition Positions.cs:13
int AddName(XmlQualifiedName name, object particle)
void ExpandTree(InteriorNode parent, SymbolsDictionary symbols, Positions positions)

References System.Xml.Schema.ParticleContentValidator._contentNode, System.Xml.Schema.ParticleContentValidator._enableUpaCheck, System.Xml.Schema.ParticleContentValidator._minMaxNodesCount, System.Xml.Schema.ParticleContentValidator._positions, System.Xml.Schema.ParticleContentValidator._symbols, System.Xml.Schema.Positions.Add(), System.Xml.Schema.SymbolsDictionary.AddName(), System.Xml.Schema.ContentValidator.Any, System.array, System.Xml.Schema.ParticleContentValidator.BuildTransitionTable(), System.Xml.Schema.ParticleContentValidator.CalculateTotalFollowposForRangeNodes(), System.Xml.Schema.ParticleContentValidator.CheckCMUPAWithLeafRangeNodes(), System.Xml.Schema.ParticleContentValidator.CheckUniqueParticleAttribution(), System.count, System.Xml.Schema.Positions.Count, System.Xml.Dictionary, System.Xml.Schema.ContentValidator.Empty, System.Xml.XmlQualifiedName.Empty, System.Xml.Schema.SyntaxTreeNode.ExpandTree(), System.Xml.Schema.ParticleContentValidator.GetApplicableMinMaxFollowPos(), System.Xml.Schema.SymbolsDictionary.IsUpaEnforced, and System.Xml.Schema.ContentValidator.TextOnly.