Beispiel #1
0
        public IEnumerable <string> GetFunctions(string expression)
        {
            var list = new List <string>();
            var node = InternalParser.Parse(expression);

            DoubleBuilder.FunctionFound += (o, e) =>
            {
                list.Add(e.Function.Name);
                e.Result = 0;
            };

            try
            {
                DoubleBuilder.Build(node);
            }
            catch (Exception)
            {
                if (ThrowOnErrors)
                {
                    throw;
                }
            }

            return(list);
        }
Beispiel #2
0
        public double Parse(string expression)
        {
            var node = InternalParser.Parse(expression);

            return(DoubleBuilder.Build(node));
        }