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); }
public R EvaluateNonBooleanDynamic <R>(string evaluationText, dynamic[] collection) { ExpressionEvaluatorLexer expressionEvaluatorLexer = new ExpressionEvaluatorLexer(evaluationText, 1); ExpressionEvaluatorParser expressionEvaluatorParser = new ExpressionEvaluatorParser(expressionEvaluatorLexer); var AbstractSyntaxTreeNodeList = expressionEvaluatorParser.BuildParseTree(); ExpressionEvaluatorExecutor expressionEvaluator = new ExpressionEvaluatorExecutor(); var result = expressionEvaluator.EvaluateNonBooleanDynamic <R>(AbstractSyntaxTreeNodeList, expressionEvaluatorParser.SymbolTable, collection); return(result); }
public R EvaluateNonBoolean <T, R>(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.EvaluateNonBoolean <T, R>(AbstractSyntaxTreeNodeList, expressionEvaluatorParser.SymbolTable, objectValue); return(result); }
public bool EvaluateDynamic(string evaluationText, DynamicBaseClass[] objectValues) { ExpressionEvaluatorLexer expressionEvaluatorLexer = new ExpressionEvaluatorLexer(evaluationText, 1); ExpressionEvaluatorParser expressionEvaluatorParser = new ExpressionEvaluatorParser(expressionEvaluatorLexer); var AbstractSyntaxTreeNodeList = expressionEvaluatorParser.BuildParseTree(objectValues); ExpressionEvaluatorExecutor expressionEvaluator = new ExpressionEvaluatorExecutor(); var result = expressionEvaluator.EvaluateDynamicBaseClass(AbstractSyntaxTreeNodeList, expressionEvaluatorParser.SymbolTable, objectValues); return(result); }
PreEvaluateDynamic(string evaluationText) { ExpressionEvaluatorLexer expressionEvaluatorLexer = new ExpressionEvaluatorLexer(evaluationText, 1); ExpressionEvaluatorParser expressionEvaluatorParser = new ExpressionEvaluatorParser(expressionEvaluatorLexer); var AbstractSyntaxTreeNodeList = expressionEvaluatorParser.BuildParseTree(); ExpressionEvaluatorExecutor expressionEvaluator = new ExpressionEvaluatorExecutor(); var symbolTable = expressionEvaluatorParser.SymbolTable; return(new Tuple <List <AbstractSyntaxTree.AbstractSyntaxTreeNode>, Dictionary <string, AbstractSyntaxTree.AbstractSyntaxTreeNode> >( AbstractSyntaxTreeNodeList, symbolTable )); }