Пример #1
0
 /// <summary>
 /// Parses input string into values and operators to be evaluated
 /// </summary>
 /// <param name="input">A string consisting of double values seperated by operators. Whitespace is acceptable.</param>
 public void ParseString(string input)
 {
     List<string> values;
       string splitPatern = @"([\+\-\*\/\^])|(\w+)";
       values = new List<string>(Regex.Split(input, splitPatern));
       values.RemoveAll(str => String.IsNullOrWhiteSpace(str));
       foreach (var value in values)
       {
     Parse(value);
       }
 }