/** * Evaluate the expression of a specific duration. * * @param idx the index of the expression * @param n the node * @return the estimation of the expression * @throws RecognitionException if an error occurs during the evaluation */ private int evaluate(int idx, Node n) throws RecognitionException { ANTLRDurationEvaluatorParser p = new ANTLRDurationEvaluatorParser(this.read(idx)); return p.evaluate(n); }
/** * Evaluate the expression of a specific duration. * * @param idx the index of the expression * @param vm the virtual machine * @return the estimation of the expression * @throws RecognitionException if an error occurs during the evaluation */ private int evaluate(int idx, VirtualMachine vm) throws RecognitionException { ANTLRDurationEvaluatorParser p = new ANTLRDurationEvaluatorParser(this.read(idx)); return p.evaluate(vm); }