public bool ExecuteEvaluate <T>(Tuple <List <AbstractSyntaxTree.AbstractSyntaxTreeNode>, Dictionary <string, AbstractSyntaxTree.AbstractSyntaxTreeNode> > values, T objectValue) { ExpressionEvaluatorExecutor expressionEvaluator = new ExpressionEvaluatorExecutor(); var result = expressionEvaluator.Evaluate <T>(values.Item1, values.Item2, objectValue); return(result); }
public bool Evaluate <T>(string evaluationText, T objectValue) { ExpressionEvaluatorLexer expressionEvaluatorLexer = new ExpressionEvaluatorLexer(evaluationText, 1); ExpressionEvaluatorParser expressionEvaluatorParser = new ExpressionEvaluatorParser(expressionEvaluatorLexer); var AbstractSyntaxTreeNodeList = expressionEvaluatorParser.BuildParseTree(); ExpressionEvaluatorExecutor expressionEvaluator = new ExpressionEvaluatorExecutor(); var result = expressionEvaluator.Evaluate <T>(AbstractSyntaxTreeNodeList, expressionEvaluatorParser.SymbolTable, objectValue); return(result); }