Example #1
0
        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;
        }
Example #2
0
        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);
        }