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; }
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); }