Beispiel #1
0
        public bool ExecuteEvaluateDynamic <T>(Tuple <List <AbstractSyntaxTree.AbstractSyntaxTreeNode>,
                                                      Dictionary <string, AbstractSyntaxTree.AbstractSyntaxTreeNode> > values, dynamic objectValue)
        {
            ExpressionEvaluatorExecutor expressionEvaluator = new ExpressionEvaluatorExecutor();
            var result = expressionEvaluator.EvaluateDynamic(values.Item1, values.Item2, objectValue);

            return(result);
        }
Beispiel #2
0
        public bool EvaluateDynamic(string evaluationText, DynamicBaseClass objectValue)
        {
            ExpressionEvaluatorLexer  expressionEvaluatorLexer  = new ExpressionEvaluatorLexer(evaluationText, 1);
            ExpressionEvaluatorParser expressionEvaluatorParser = new ExpressionEvaluatorParser(expressionEvaluatorLexer);
            var AbstractSyntaxTreeNodeList = expressionEvaluatorParser.BuildParseTree();
            ExpressionEvaluatorExecutor expressionEvaluator = new ExpressionEvaluatorExecutor();
            var result = expressionEvaluator.EvaluateDynamic(AbstractSyntaxTreeNodeList, expressionEvaluatorParser.SymbolTable, objectValue);

            return(result);
        }