/// <summary> /// Tries to parse the input expression contained in the given evaluator. /// </summary> /// <param name="evaluator">The row evaluator with the given expression.</param> /// <returns>True if the parse was successfull.</returns> private bool ParseExpression(RowEvaluator evaluator) { try { evaluator.ParseExpression(); return(true); } catch (Exception ex) { lstResultList.Items.Add(String.Format(" error: {0}", ex.Message)); return(false); } }
internal void Evaluate(out List <ExpressionItem> list) { Scanner scanner = new Scanner(scriptFileContents, Environment.NewLine); RowEvaluator rowEvaluator; list = new List <ExpressionItem>(); while (scanner.HasNext()) { rowEvaluator = new RowEvaluator(scanner.Next()); rowEvaluator.ParseExpression(); rowEvaluator.InterpretExpression(); list.Add(rowEvaluator.InterpretedExpression); } }