protected void CreatePattern(PatternKey pattern) { string lDFA = (new DFAPattern(pattern.Pattern, pattern.Transformation)).DFA; DFANodes = new List <DFANode>(lDFA.Length + 1); DFANodes.Add(new DFANode()); for (int lState = 0; lState < lDFA.Length; lState++) { DFANode lDFANode = new DFANode(); char c = lDFA[lState]; for (int z = 0; z < 4; z++) { if (Buckets[z].IndexOf(c) >= 0) { lDFANode[z] = lState + 2; } } DFANodes.Add(lDFANode); } DFANode lDFANodeLast = new DFANode(); lDFANodeLast.Add(pattern); DFANodes.Add(lDFANodeLast); }
public void Add(PatternKey pattern) { if (Attributes == null) { Attributes = new List <PatternKey>(); } Attributes.Add(pattern); }
public DFAMatrix(PatternKey pattern) { CreatePattern(pattern); }
protected void CreatePattern(PatternKey pattern) { string lDFA = (new DFAPattern(pattern.Pattern, pattern.Transformation)).DFA; DFANodes = new List<DFANode>(lDFA.Length + 1); DFANodes.Add(new DFANode()); for (int lState = 0; lState < lDFA.Length; lState++) { DFANode lDFANode = new DFANode(); char c = lDFA[lState]; for (int z = 0; z < 4; z++) if (Buckets[z].IndexOf(c) >= 0) lDFANode[z] = lState + 2; DFANodes.Add(lDFANode); } DFANode lDFANodeLast = new DFANode(); lDFANodeLast.Add(pattern); DFANodes.Add(lDFANodeLast); }
public void Add(PatternKey pattern) { if (Attributes == null) Attributes = new List<PatternKey>(); Attributes.Add(pattern); }