Transfomiert eine Konkatinations-Operator (&) Operation. Im Gegensatz zu CFMX , wird das "!"
Zeichen auch als Not Operator anerkannt. <br />
EBNF:<br />
<code>plusMinusOp {"&" spaces concatOp};</code>

@return CFXD Element
@throws TemplateException
558807
private Expression concatOp(Data data) throws TemplateException {
	Expression expr = plusMinusOp(data);

	while (data.srcCode.isCurrent('&') && !data.srcCode.isCurrent("&&")) {
	    data.srcCode.next();

	    // &=
	    if (data.srcCode.isCurrent('=') && expr instanceof Variable) {
		data.srcCode.next();
		comments(data);
		Expression value = assignOp(data);

		expr = data.factory.opUnary((Variable) expr, value, Factory.OP_UNARY_PRE, Factory.OP_UNARY_CONCAT, expr.getStart(), data.srcCode.getPosition());

		// ExprString res = OpString.toExprString(expr, right);
		// expr=new OpVariable((Variable)expr,res,data.cfml.getPosition());
	    }
	    else {
		comments(data);
		expr = data.factory.opString(expr, plusMinusOp(data));
	    }

	}
	return expr;
    }
391281
public function getOperator()
    {
        if ($this->operator) {
            return $this->operator;
        }

        $operatorType = $this->getOperatorType();

        if (!$operatorType) {
            return false;
        }

        $className = str_replace('_', ' ', $operatorType);
        $className = ucwords(strtolower($className));
        $className = str_replace(' ', '', $className);

        try {
            $reflection = new \ReflectionClass('PedroTeixeira\Bundle\GridBundle\Grid\Filter\Operator\\' . $className);

            $this->operator = $reflection->newInstance(
                $this->container
            );

            $this->operator->setIndex($this->getIndex());

            return $this->operator;
        } catch (\Exception $e) {
            throw new \Exception(
                sprintf('Filter operator type "%s" doesn\'t exist', $operatorType)
            );
        }
    }
772177
public final EObject ruleXMultiplicativeExpression() throws RecognitionException {
        EObject current = null;

        EObject this_XUnaryOperation_0 = null;

        EObject lv_rightOperand_3_0 = null;



        	enterRule();

        try {
            // InternalXbase.g:1216:2: ( (this_XUnaryOperation_0= ruleXUnaryOperation ( ( ( ( () ( ( ruleOpMulti ) ) ) )=> ( () ( ( ruleOpMulti ) ) ) ) ( (lv_rightOperand_3_0= ruleXUnaryOperation ) ) )* ) )
            // InternalXbase.g:1217:2: (this_XUnaryOperation_0= ruleXUnaryOperation ( ( ( ( () ( ( ruleOpMulti ) ) ) )=> ( () ( ( ruleOpMulti ) ) ) ) ( (lv_rightOperand_3_0= ruleXUnaryOperation ) ) )* )
            {
            // InternalXbase.g:1217:2: (this_XUnaryOperation_0= ruleXUnaryOperation ( ( ( ( () ( ( ruleOpMulti ) ) ) )=> ( () ( ( ruleOpMulti ) ) ) ) ( (lv_rightOperand_3_0= ruleXUnaryOperation ) ) )* )
            // InternalXbase.g:1218:3: this_XUnaryOperation_0= ruleXUnaryOperation ( ( ( ( () ( ( ruleOpMulti ) ) ) )=> ( () ( ( ruleOpMulti ) ) ) ) ( (lv_rightOperand_3_0= ruleXUnaryOperation ) ) )*
            {
            if ( state.backtracking==0 ) {

              			newCompositeNode(grammarAccess.getXMultiplicativeExpressionAccess().getXUnaryOperationParserRuleCall_0());
              		
            }
            pushFollow(FOLLOW_19);
            this_XUnaryOperation_0=ruleXUnaryOperation();

            state._fsp--;
            if (state.failed) return current;
            if ( state.backtracking==0 ) {

              			current = this_XUnaryOperation_0;
              			afterParserOrEnumRuleCall();
              		
            }
            // InternalXbase.g:1226:3: ( ( ( ( () ( ( ruleOpMulti ) ) ) )=> ( () ( ( ruleOpMulti ) ) ) ) ( (lv_rightOperand_3_0= ruleXUnaryOperation ) ) )*
            loop17:
            do {
                int alt17=2;
                switch ( input.LA(1) ) {
                case 37:
                    {
                    int LA17_2 = input.LA(2);

                    if ( (synpred11_InternalXbase()) ) {
                        alt17=1;
                    }


                    }
                    break;
                case 38:
                    {
                    int LA17_3 = input.LA(2);

                    if ( (synpred11_InternalXbase()) ) {
                        alt17=1;
                    }


                    }
                    break;
                case 39:
                    {
                    int LA17_4 = input.LA(2);

                    if ( (synpred11_InternalXbase()) ) {
                        alt17=1;
                    }


                    }
                    break;
                case 40:
                    {
                    int LA17_5 = input.LA(2);

                    if ( (synpred11_InternalXbase()) ) {
                        alt17=1;
                    }


                    }
                    break;

                }

                switch (alt17) {
            	case 1 :
            	    // InternalXbase.g:1227:4: ( ( ( () ( ( ruleOpMulti ) ) ) )=> ( () ( ( ruleOpMulti ) ) ) ) ( (lv_rightOperand_3_0= ruleXUnaryOperation ) )
            	    {
            	    // InternalXbase.g:1227:4: ( ( ( () ( ( ruleOpMulti ) ) ) )=> ( () ( ( ruleOpMulti ) ) ) )
            	    // InternalXbase.g:1228:5: ( ( () ( ( ruleOpMulti ) ) ) )=> ( () ( ( ruleOpMulti ) ) )
            	    {
            	    // InternalXbase.g:1238:5: ( () ( ( ruleOpMulti ) ) )
            	    // InternalXbase.g:1239:6: () ( ( ruleOpMulti ) )
            	    {
            	    // InternalXbase.g:1239:6: ()
            	    // InternalXbase.g:1240:7: 
            	    {
            	    if ( state.backtracking==0 ) {

            	      							current = forceCreateModelElementAndSet(
            	      								grammarAccess.getXMultiplicativeExpressionAccess().getXBinaryOperationLeftOperandAction_1_0_0_0(),
            	      								current);
            	      						
            	    }

            	    }

            	    // InternalXbase.g:1246:6: ( ( ruleOpMulti ) )
            	    // InternalXbase.g:1247:7: ( ruleOpMulti )
            	    {
            	    // InternalXbase.g:1247:7: ( ruleOpMulti )
            	    // InternalXbase.g:1248:8: ruleOpMulti
            	    {
            	    if ( state.backtracking==0 ) {

            	      								if (current==null) {
            	      									current = createModelElement(grammarAccess.getXMultiplicativeExpressionRule());
            	      								}
            	      							
            	    }
            	    if ( state.backtracking==0 ) {

            	      								newCompositeNode(grammarAccess.getXMultiplicativeExpressionAccess().getFeatureJvmIdentifiableElementCrossReference_1_0_0_1_0());
            	      							
            	    }
            	    pushFollow(FOLLOW_4);
            	    ruleOpMulti();

            	    state._fsp--;
            	    if (state.failed) return current;
            	    if ( state.backtracking==0 ) {

            	      								afterParserOrEnumRuleCall();
            	      							
            	    }

            	    }


            	    }


            	    }


            	    }

            	    // InternalXbase.g:1264:4: ( (lv_rightOperand_3_0= ruleXUnaryOperation ) )
            	    // InternalXbase.g:1265:5: (lv_rightOperand_3_0= ruleXUnaryOperation )
            	    {
            	    // InternalXbase.g:1265:5: (lv_rightOperand_3_0= ruleXUnaryOperation )
            	    // InternalXbase.g:1266:6: lv_rightOperand_3_0= ruleXUnaryOperation
            	    {
            	    if ( state.backtracking==0 ) {

            	      						newCompositeNode(grammarAccess.getXMultiplicativeExpressionAccess().getRightOperandXUnaryOperationParserRuleCall_1_1_0());
            	      					
            	    }
            	    pushFollow(FOLLOW_19);
            	    lv_rightOperand_3_0=ruleXUnaryOperation();

            	    state._fsp--;
            	    if (state.failed) return current;
            	    if ( state.backtracking==0 ) {

            	      						if (current==null) {
            	      							current = createModelElementForParent(grammarAccess.getXMultiplicativeExpressionRule());
            	      						}
            	      						set(
            	      							current,
            	      							"rightOperand",
            	      							lv_rightOperand_3_0,
            	      							"org.eclipse.xtext.xbase.Xbase.XUnaryOperation");
            	      						afterParserOrEnumRuleCall();
            	      					
            	    }

            	    }


            	    }


            	    }
            	    break;

            	default :
            	    break loop17;
                }
            } while (true);


            }


            }

            if ( state.backtracking==0 ) {

              	leaveRule();

            }
        }

            catch (RecognitionException re) {
                recover(input,re);
                appendSkippedTokens();
            }
        finally {
        }
        return current;
    }
1123563
private String resolveTemplate(boolean toValue)
   {
      String result = template;
      if (StringUtils.isEmptyTrimmed(result))
         return result;

      String key;

      while ((key = StringUtils.getExpressionKey(result)) != null)
      {
         String subs;
         Expression ex = entities.get(key);
         String nKey = StringUtils.getExpressionKey(ex.getDefaultValue());
         if (toValue)
            subs = ex.getValue();
         else if (nKey != null && ex.getResolvedValue() != null &&
               ex.getDefaultValue().equals(nKey))
         {
            entities.get(nKey).setResolvedValue(ex.getResolvedValue());
            subs = ex.toString();
         }
         else
            subs = ex.toSubstitution();

         result = result.replace(key, subs);
      }
      return result;
   }
433228
function() {
    var op
      , node = this.typecheck();
    while (op = this.accept('&&') || this.accept('||')) {
      node = new nodes.BinOp(op.type, node, this.typecheck());
    }
    return node;
  }
426853
protected Expression string(Data data) throws TemplateException {

	// check starting character for a string literal
	if (!data.srcCode.isCurrent('"') && !data.srcCode.isCurrent('\'')) return null;
	Position line = data.srcCode.getPosition();

	// Init Parameter
	char quoter = data.srcCode.getCurrentLower();
	StringBuilder str = new StringBuilder();
	Expression expr = null;

	while (data.srcCode.hasNext()) {
	    data.srcCode.next();
	    // check sharp
	    if (data.srcCode.isCurrent('#')) {

		// Ecaped sharp
		if (data.srcCode.isNext('#')) {
		    data.srcCode.next();
		    str.append('#');
		}
		// get Content of sharp
		else {
		    data.srcCode.next();
		    comments(data);
		    Expression inner = assignOp(data);
		    comments(data);
		    if (!data.srcCode.isCurrent('#')) throw new TemplateException(data.srcCode, "Invalid Syntax Closing [#] not found");

		    ExprString exprStr = null;
		    if (str.length() != 0) {
			exprStr = data.factory.createLitString(str.toString(), line, data.srcCode.getPosition());
			if (expr != null) {
			    expr = data.factory.opString(expr, exprStr);
			}
			else expr = exprStr;
			str = new StringBuilder();
		    }
		    if (expr == null) {
			expr = inner;
		    }
		    else {
			expr = data.factory.opString(expr, inner);
		    }
		}
	    }
	    // check quoter
	    else if (data.srcCode.isCurrent(quoter)) {
		// Ecaped sharp
		if (data.srcCode.isNext(quoter)) {
		    data.srcCode.next();
		    str.append(quoter);
		}
		// finsish
		else {
		    break;
		}
	    }
	    // all other character
	    else {
		str.append(data.srcCode.getCurrent());
	    }
	}
	if (!data.srcCode.forwardIfCurrent(quoter)) throw new TemplateException(data.srcCode, "Invalid Syntax Closing [" + quoter + "] not found");

	if (expr == null) expr = data.factory.createLitString(str.toString(), line, data.srcCode.getPosition());
	else if (str.length() != 0) {
	    expr = data.factory.opString(expr, data.factory.createLitString(str.toString(), line, data.srcCode.getPosition()));
	}
	comments(data);

	if (expr instanceof Variable) {
	    Variable var = (Variable) expr;
	    var.fromHash(true);
	}

	return expr;

    }
411511
public static <T> TemplateExpression<T> template(Class<? extends T> cl, String template, Object... args) {
        return template(cl, TemplateFactory.DEFAULT.create(template), ImmutableList.copyOf(args));
    }
662371
private ExprKraken parseCmpExpr()
  {
    // Expr left = parseConcatExpr();
    ExprKraken left = parseAddExpr();

    Token token = scanToken();
    
    boolean isNot = false;
    
    /*

    if (token == NOT) {
      isNot = true;

      token = scanToken();

      if (token != BETWEEN && token != LIKE && token != IN) {
        _token = token;

        return left;
      }
    }
    */

    switch (token) {
    case EQ:
      return new BinaryExpr(BinaryOp.EQ, left, parseAddExpr());
      
    case NE:
      return new BinaryExpr(BinaryOp.NE, left, parseAddExpr());
      
    case LT:
      return new BinaryExpr(BinaryOp.LT, left, parseAddExpr());
      
    case LE:
      return new BinaryExpr(BinaryOp.LE, left, parseAddExpr());
      
    case GT:
      return new BinaryExpr(BinaryOp.GT, left, parseAddExpr());
      
    case GE:
      return new BinaryExpr(BinaryOp.GE, left, parseAddExpr());

    case BETWEEN:
      {
        ExprKraken min = parseAddExpr();

        token = scanToken();
        if (token != Token.AND)
          throw error(L.l("expected AND at '{0}'", token));

        ExprKraken max = parseAddExpr();

        return new BetweenExpr(left, min, max, isNot);
      }
/*
    case LT:
    case LE:
    case GT:
    case GE:
    case NE:
      return new CmpExpr(left, parseConcatExpr(), token);

    case BETWEEN:
      {
        Expr min = parseConcatExpr();

        token = scanToken();
        if (token != AND)
          throw error(L.l("expected AND at '{0}'", tokenName(token)));

        Expr max = parseConcatExpr();

        return new BetweenExpr(left, min, max, isNot);
      }

    case IS:
      {
        token = scanToken();
        isNot = false;
        if (token == NOT) {
          token = scanToken();
          isNot = true;
        }

        if (token == NULL)
          return new IsNullExpr(left, isNot);
        else
          throw error(L.l("expected NULL at '{0}'", tokenName(token)));
      }

    case LIKE:
      {
        token = scanToken();

        if (token == STRING)
          return new LikeExpr(left, _lexeme, isNot);
        else
          throw error(L.l("expected string at '{0}'", tokenName(token)));
      }

    case IN:
      {
        HashSet<String> values = parseInValues();

        return new InExpr(left, values, isNot);
      }
*/
    default:
      _token = token;
      return left;
    }
  }
47791
public function process()
    {
        $operands = $this->getOperands();

        if ($operands->containsNull() === true) {
            return null;
        }

        if ($operands->exclusivelySingle() === false) {
            $msg = "The Substring operator only accepts operands with a single cardinality.";
            throw new OperatorProcessingException($msg, $this, OperatorProcessingException::WRONG_CARDINALITY);
        }

        if ($operands->exclusivelyString() === false) {
            $msg = "The Substring operator only accepts operands with a string baseType.";
            throw new OperatorProcessingException($msg, $this, OperatorProcessingException::WRONG_BASETYPE);
        }

        $operand1 = $operands[0];
        $operand2 = $operands[1];

        $call = ($this->getExpression()->isCaseSensitive() === true) ? 'mb_strpos' : 'mb_stripos';

        return new QtiBoolean($call($operand2->getValue(), $operand1->getValue(), 0, 'UTF-8') !== false);
    }
957067
private FieldTextBuilder binaryOperation(final String operator, final FieldText fieldText) {
        // This should never happen as the AND, OR, XOR and WHEN methods should already have checked this
        Validate.isTrue(fieldText != this);

        // Optimized case when fieldText is a FieldTextBuilder
        if(fieldText instanceof FieldTextBuilder) {
            return binaryOp(operator, (FieldTextBuilder)fieldText);
        }

        // Special case when we're empty
        if(componentCount == 0) {
            fieldTextString.append(fieldText.toString());

            if(fieldText.size() > 1) {
                lastOperator = "";
            }
        } else {
            // Add the NOTs, parentheses and operator
            addOperator(operator);

            // Size 1 means a single specifier, so no parentheses
            if(fieldText.size() == 1) {
                fieldTextString.append(fieldText.toString());
            } else {
                fieldTextString.append('(').append(fieldText.toString()).append(')');
            }
        }

        componentCount += fieldText.size();
        not = false;

        return this;
    }
257368
public Expression string(Factory f, SourceCode cfml) throws TemplateException {
	cfml.removeSpace();
	char quoter = cfml.getCurrentLower();
	if (quoter != '"' && quoter != '\'') return null;
	StringBuffer str = new StringBuffer();
	boolean insideSpecial = false;

	Position line = cfml.getPosition();
	while (cfml.hasNext()) {
	    cfml.next();
	    // check special
	    if (cfml.isCurrent(specialChar)) {
		insideSpecial = !insideSpecial;
		str.append(specialChar);

	    }
	    // check quoter
	    else if (!insideSpecial && cfml.isCurrent(quoter)) {
		// Ecaped sharp
		if (cfml.isNext(quoter)) {
		    cfml.next();
		    str.append(quoter);
		}
		// finsish
		else {
		    break;
		}
	    }
	    // all other character
	    else {
		str.append(cfml.getCurrent());
	    }
	}

	if (!cfml.forwardIfCurrent(quoter)) throw new TemplateException(cfml, "Invalid Syntax Closing [" + quoter + "] not found");

	LitString rtn = f.createLitString(str.toString(), line, cfml.getPosition());
	cfml.removeSpace();
	return rtn;
    }
889554
public function process()
    {
        $operands = $this->getOperands();

        if ($operands->containsNull() === true) {
            return null;
        }

        if ($operands->exclusivelySingle() === false) {
            $msg = "The Inside operator only accepts operands with a single cardinality.";
            throw new OperatorProcessingException($msg, $this, OperatorProcessingException::WRONG_CARDINALITY);
        }

        if ($operands->exclusivelyPoint() === false) {
            $msg = "The Inside operator only accepts operands with a baseType of point.";
            throw new OperatorProcessingException($msg, $this, OperatorProcessingException::WRONG_BASETYPE);
        }

        $operand = $operands[0];
        $coords = $this->getExpression()->getCoords();

        return new QtiBoolean($coords->inside($operand));
    }
423313
final public Expression ValuePrefix() throws ParseException {
  Expression ret;
    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    case INTEGER_LITERAL:
    case FLOATING_POINT_LITERAL:
    case STRING_LITERAL:
    case TRUE:
    case FALSE:
    case NULL:
      ret = Literal();
      break;
    case LPAREN:
      jj_consume_token(LPAREN);
      ret = Expression();
      jj_consume_token(RPAREN);
      break;
    default:
      jj_la1[27] = jj_gen;
      if (jj_2_1(2147483647)) {
        ret = FunctionInvocation();
      } else {
        switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
        case IDENTIFIER:
          ret = NamedValue();
          break;
        default:
          jj_la1[28] = jj_gen;
          jj_consume_token(-1);
          throw new ParseException();
        }
      }
    }
      {if (true) return ret;}
    throw new Error("Missing return statement in function");
  }
1052988
public static String escapeElementXML(String in) {
    int leng = in.length();
    StringBuilder sb = new StringBuilder(leng);
    for (int i = 0; i < leng; i++) {
      char c = in.charAt(i);
      if (c == '&') {
        sb.append("&amp;");
      } else if (c == '<') {
        sb.append("&lt;");
      } else if (c == '>') {
        sb.append("&gt;");
      } else {
        sb.append(c);
      }
    }
    return sb.toString();
  }
556760
public function onExpandMarkupToken()
    {
        if (!$alias = post('tokenName')) {
            throw new ApplicationException(trans('cms::lang.component.no_records'));
        }

        // Can only expand components at this stage
        if ((!$type = post('tokenType')) && $type !== 'component') {
            return;
        }

        if (!($names = (array) post('component_names')) || !($aliases = (array) post('component_aliases'))) {
            throw new ApplicationException(trans('cms::lang.component.not_found', ['name' => $alias]));
        }

        if (($index = array_get(array_flip($aliases), $alias, false)) === false) {
            throw new ApplicationException(trans('cms::lang.component.not_found', ['name' => $alias]));
        }

        if (!$componentName = array_get($names, $index)) {
            throw new ApplicationException(trans('cms::lang.component.not_found', ['name' => $alias]));
        }

        $manager = ComponentManager::instance();
        $componentObj = $manager->makeComponent($componentName);
        $partial = ComponentPartial::load($componentObj, 'default');
        $content = $partial->getContent();
        $content = str_replace('__SELF__', $alias, $content);

        return $content;
    }
909403
function () {
                var e, c, v, index = i;

                c = this.combinator();

                e = $re(/^(?:\d+\.\d+|\d+)%/) || $re(/^(?:[.#]?|:*)(?:[\w-]|[^\x00-\x9f]|\\(?:[A-Fa-f0-9]{1,6} ?|[^A-Fa-f0-9]))+/) ||
                    $char('*') || $char('&') || this.attribute() || $re(/^\([^()@]+\)/) || $re(/^[\.#](?=@)/) ||
                    this.entities.variableCurly();

                if (! e) {
                    if ($char('(')) {
                        if ((v = this.selector()) && $char(')')) {
                            e = new(tree.Paren)(v);
                        }
                    }
                }

                if (e) { return new(tree.Element)(c, e, index, env.currentFileInfo); }
            }
1313054
private final boolean elseStatement(Data data, Condition cont) throws TemplateException {
	if (!data.srcCode.forwardIfCurrent("else", '{') && !data.srcCode.forwardIfCurrent("else ") && !data.srcCode.forwardIfCurrent("else", '/')) return false;

	// start (
	data.srcCode.previous();
	// ex block
	Body body = new BodyBase(data.factory);
	Pair p = cont.setElse(body, data.srcCode.getPosition(), null);

	Body prior = data.setParent(body);
	statement(data, body, CTX_ELSE);
	data.setParent(prior);

	p.end = data.srcCode.getPosition();
	return true;
    }