示例#1
0
文件: Parser.cs 项目: riyaan/ADS4
        public List<Context> Parse(string mcl)
        {
            List<Context> commands = new List<Context>();

            MatchCollection matchCollection = Regex.Matches(mcl, PATTERN);
            foreach (Match match in matchCollection)
            {
                foreach (Capture c in match.Captures)
                {
                    MclCommand mclCommand = new MclCommand(c.Value);
                    commands.Add(mclCommand.Interpret());
                }
            }

            return commands;
        }
示例#2
0
文件: Parser.cs 项目: riyaan/ADS4
        public List <Context> Parse(string mcl)
        {
            List <Context> commands = new List <Context>();

            MatchCollection matchCollection = Regex.Matches(mcl, PATTERN);

            foreach (Match match in matchCollection)
            {
                foreach (Capture c in match.Captures)
                {
                    MclCommand mclCommand = new MclCommand(c.Value);
                    commands.Add(mclCommand.Interpret());
                }
            }

            return(commands);
        }