Exemple #1
0
        public static MatchScanPattern FindPattern(
            this MatchScanPatternList List, DelimClassification DelimClass)
        {
            MatchScanPattern found = null;

            if (List != null)
            {
                var node = List.FindNode(c => c.MatchPattern.DelimClassification == DelimClass);
                if (node != null)
                {
                    found = node.Value;
                }
            }

            return(found);
        }
        public void AddFound(ScanPattern Pattern, int Pos, int Lgth)
        {
            this.Position = Pos;

            if (FoundPattern == null)
            {
                this.FoundPattern = new MatchScanPattern(Pattern, Pos, Lgth);
            }
            else
            {
                if (FoundPatterns == null)
                {
                    FoundPatterns = new MatchScanPatternList();
                    FoundPatterns.Add(this.FoundPattern);
                }

                {
                    MatchScanPattern matPat = new MatchScanPattern(Pattern, Pos, Lgth);
                    FoundPatterns.Add(matPat);
                }
            }
        }