Short description of method evalInf

@access public
@author firstname and lastname of author, <author@example.org>
@param  Literal first
@param  Literal second
@return boolean
321622
public function evalInf( core_kernel_classes_Literal $first,  core_kernel_classes_Literal $second)
    {
        $returnValue = (bool) false;

        
         if($first instanceof core_kernel_classes_Literal && $second instanceof core_kernel_classes_Literal)  {
     		$returnValue = $first->literal < $second->literal;
         }
        

        return (bool) $returnValue;
    }
790046
public function shouldPrecede($first, $second) {
    $page = $this->getSession()->getPage()->getText();
    $pos1 = strpos($page, $first);
    if ($pos1 === FALSE) {
      throw new ExpectationException("Text not found: '$first'.", $this->getSession());
    }
    $pos2 = strpos($page, $second);
    if ($pos2 === FALSE) {
      throw new ExpectationException("Text not found: '$second'.", $this->getSession());
    }
    if ($pos2 < $pos1) {
      throw new \Exception("Text '$first' does not precede text '$second'.");
    }
  }
8501
public function evaluateRecursiveOperation( core_kernel_classes_Literal $first,  core_kernel_classes_Literal $second,  core_kernel_classes_Resource $operator)
    {
        
        
        switch ($operator->getUri()) {
        	case RulesRdf::INSTANCE_OPERATOR_ADD: {
        		$returnValue = new core_kernel_classes_Literal($first->literal + $second->literal);
        		break;
        	}
             case RulesRdf::INSTANCE_OPERATOR_MINUS: {
        		$returnValue = new core_kernel_classes_Literal($first->literal - $second->literal);
        		break;
        	}
            case RulesRdf::INSTANCE_OPERATOR_MULTIPLY: {
        		$returnValue = new core_kernel_classes_Literal($first->literal * $second->literal);
        		break;
        	}
        	case RulesRdf::INSTANCE_OPERATOR_DIVISION: {
        		$returnValue = new core_kernel_classes_Literal($first->literal / $second->literal);
        		break;
        	}
        	case RulesRdf::INSTANCE_OPERATOR_CONCAT: {
        		// FIXME Hotfix for the concat operator. Can't find why traling spaces are not
        		// kept intact when using concat.
        		// ex: 'february ' CONCAT '2008' -> 'february2008' instead of 'february 2008'.
        		$returnValue = new core_kernel_classes_Literal($first->literal . ' ' . $second->literal);
        		break;
        	}
        	             	
        	default : {
        		throw new common_Exception('problem evaluating operation, operator do not match with operands');
        	}
        		
        }
        $returnValue->debug = __METHOD__;
        return $returnValue;
        
    }
275701
boolean startsWith(final Literal literal) {

        // Check whether the answer is already in the cache
        final int index = literal.getIndex();
        final Boolean cached = myPrefixCache.get(index);
        if (cached != null) {
            return cached.booleanValue();
        }

        // Get the answer and cache the result
        final boolean result = literal.matches(myChars, 0);
        myPrefixCache.set(index, result);
        return result;
    }
589360
private static void textLiteral( Consumer<? super LiteralNode> add, String literal )
    {
        add.accept( literal( literal, false ) );
    }
673416
private BaseDescr lhsEval(CEDescrBuilder<?, ?> ce) throws RecognitionException {
        EvalDescrBuilder<?> eval = null;

        try {
            eval = helper.start(ce,
                    EvalDescrBuilder.class,
                    null);

            match(input,
                    DRL6Lexer.ID,
                    DroolsSoftKeywords.EVAL,
                    null,
                    DroolsEditorType.KEYWORD);
            if (state.failed)
                return null;

            if (!parseEvalExpression(eval))
                return null;

        } catch (RecognitionException e) {
            throw e;
        } finally {
            helper.end(EvalDescrBuilder.class,
                    eval);
        }

        return eval != null ? eval.getDescr() : null;
    }
29101
function $$safeEvalFn(str) {
    let keyStr = '';

    // Perform any parsing that needs to be performed on the scope value
    for (let key in this) {
        let val = this[ key ];
        if (!val && val !== 0 && val !== '') {
            continue;
        } else if (
            typeof val === 'symbol' ||
            typeof val === 'string'
        ) {
            val = `"${val}"`;
        } else if (typeof val === 'object') {
            val = JSON.stringify(val);
        }

        // I don't like having to use var here
        keyStr += `var ${key}=${val};`;
    }

    // Literal eval is executed in its own context here to reduce security issues
    /* eslint-disable */
    return eval([ keyStr, str ].join(''));

    /* eslint-enable */
}
1314578
protected Value evalIf(INode node, ILexLocation ifLocation, PExp testExp,
			INode thenNode, List<? extends INode> elseIfNodeList,
			INode elseNode, Context ctxt) throws AnalysisException
	{
		BreakpointManager.getBreakpoint(node).check(ifLocation, ctxt);

		try
		{
			if (testExp.apply(VdmRuntime.getStatementEvaluator(), ctxt).boolValue(ctxt))
			{
				return thenNode.apply(VdmRuntime.getStatementEvaluator(), ctxt);
			} else
			{
				for (INode elseif : elseIfNodeList)
				{
					Value r = elseif.apply(VdmRuntime.getStatementEvaluator(), ctxt);
					if (r != null)
					{
						return r;
					}
				}

				if (elseNode != null)
				{
					return elseNode.apply(VdmRuntime.getStatementEvaluator(), ctxt);
				}

				return new VoidValue();
			}
		} catch (ValueException e)
		{
			return VdmRuntimeError.abort(ifLocation, e);
		}
	}
935477
function checkLiteral(node) {
            const token = sourceCode.getFirstToken(node),
                nodeType = token.type,
                nodeValue = token.value;

            if (nodeType === "RegularExpression") {
                checkRegex(node, nodeValue, token.range[0]);
            }
        }
394289
protected function compare($first, $second, $operator)
    {
        switch ($operator) {
            case '<':
                return $first < $second;
            case '>':
                return $first > $second;
            case '<=':
                return $first <= $second;
            case '>=':
                return $first >= $second;
            case '=':
                return $first == $second;
            default:
                throw new InvalidArgumentException;
        }
    }
765356
static public function escapeLiteral(string $literal): string {
        self::initSerializer();
        $value = self::$serializer->serialiseValue(new Literal($literal));
        return $value;
    }
799531
public function on($first, $second)
    {
        return $this->raw(
            $this->builder->adapter()->quote($first) 
            . ' = ' .
            $this->builder->adapter()->quote($second)
        );
    }
1021185
def do_evaluate(parser, token):
  ''''''
  code = token.contents
  firstspace = code.find(' ')
  if firstspace >= 0:
    code = code[firstspace+1:]
  return Evaluator(code)
1246679
function isArgumentLiteral (node) {
  return node.arguments && node.arguments.length && node.arguments[0].type === 'Literal'
}
225474
function DEFAULT_SECOND_PARSER(path, filter) {
  const f = filter
    .replace(/\?/g, '\\?')
    .replace(/\*/g, '([^/?#]+?)')
    .replace(/\.\./, '.*')
  const re = new RegExp(`^${f}$`)
  const args = path.match(re)

  if (args) return args.slice(1)
}
914041
private function isIdealOver(Evaluation $a, Evaluation $b): bool
    {
        $ideal = $this->type == NodeType::MIN()
            ? Evaluation::getWorstComparator()
            : Evaluation::getBestComparator();
        $idealEvaluationResult = $ideal($a, $b);
        return $idealEvaluationResult > 0;
    }
958092
private Term evalLangMatches(Function term) {
		final String SELECT_ALL = "*";
		
		/*
		 * Evaluate the first term
		 */
		Term teval1 = eval(term.getTerm(0));
		if (teval1 == null) {
			return valueNull; // ROMAN (10 Jan 2017): not valueFalse
		}
		/*
		 * Evaluate the second term
		 */
		Term innerTerm2 = term.getTerm(1);
		if (innerTerm2 == null) {
			return valueNull; // ROMAN (10 Jan 2017): not valueFalse
		}

		/*
		 * Term checks
		 */
		if (teval1 instanceof Constant && innerTerm2 instanceof Constant) {
			String lang1 = ((Constant) teval1).getValue();
			String lang2 = ((Constant) innerTerm2).getValue();	
			if (lang2.equals(SELECT_ALL)) {
				if (lang1.isEmpty()) 
					return termFactory.getFunctionIsNull(teval1);
				else 
					return termFactory.getFunctionIsNotNull(teval1);
			} 
			else {
				return termFactory.getBooleanConstant(lang1.equals(lang2));
			}
		} 
		else if (teval1 instanceof Variable && innerTerm2 instanceof Constant) {
			Variable var = (Variable) teval1;
			Constant lang = (Constant) innerTerm2;
			if (lang.getValue().equals(SELECT_ALL)) {
				// The char * means to get all languages
				return termFactory.getFunctionIsNotNull(var);
			} else {
				return termFactory.getFunctionEQ(var, lang);
			}
		} 
		else if (teval1 instanceof Function && innerTerm2 instanceof Function) {
			Function f1 = (Function) teval1;
			Function f2 = (Function) innerTerm2;
			if(f1.isOperation()){
				return term;
			}
			return evalLangMatches(termFactory.getLANGMATCHESFunction(f1.getTerm(0),
					f2.getTerm(0)));
		} 
		else {
			return term;
		}
	}