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 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); }
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 Tuple <List <AbstractSyntaxTreeNode>, Dictionary <string, AbstractSyntaxTreeNode> > 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 <AbstractSyntaxTreeNode>, Dictionary <string, AbstractSyntaxTreeNode> >(AbstractSyntaxTreeNodeList, symbolTable)); }