src/main/resources/org/drools/compiler/lang/DRL6Expressions.g:670:1: variableInitializer : ( arrayInitializer | expression );
550552
public final void variableInitializer() throws RecognitionException {
		try {
			// src/main/resources/org/drools/compiler/lang/DRL6Expressions.g:671:5: ( arrayInitializer | expression )
			int alt84=2;
			int LA84_0 = input.LA(1);
			if ( (LA84_0==LEFT_CURLY) ) {
				alt84=1;
			}
			else if ( (LA84_0==BOOL||(LA84_0 >= DECIMAL && LA84_0 <= DIV)||LA84_0==DOT||LA84_0==FLOAT||LA84_0==HEX||(LA84_0 >= ID && LA84_0 <= INCR)||(LA84_0 >= LEFT_PAREN && LA84_0 <= LESS)||LA84_0==MINUS||LA84_0==NEGATION||LA84_0==NULL||LA84_0==PLUS||LA84_0==QUESTION_DIV||(LA84_0 >= STAR && LA84_0 <= TIME_INTERVAL)) ) {
				alt84=2;
			}

			else {
				if (state.backtracking>0) {state.failed=true; return;}
				NoViableAltException nvae =
					new NoViableAltException("", 84, 0, input);
				throw nvae;
			}

			switch (alt84) {
				case 1 :
					// src/main/resources/org/drools/compiler/lang/DRL6Expressions.g:671:7: arrayInitializer
					{
					pushFollow(FOLLOW_arrayInitializer_in_variableInitializer4069);
					arrayInitializer();
					state._fsp--;
					if (state.failed) return;
					}
					break;
				case 2 :
					// src/main/resources/org/drools/compiler/lang/DRL6Expressions.g:672:13: expression
					{
					pushFollow(FOLLOW_expression_in_variableInitializer4083);
					expression();
					state._fsp--;
					if (state.failed) return;
					}
					break;

			}
		}

		catch (RecognitionException re) {
		    throw re;
		}

		finally {
			// do for sure before leaving
		}
	}
240323
public final void arrayInitializer() throws RecognitionException {
		try {
			// src/main/resources/org/drools/compiler/lang/DRL5Expressions.g:631:5: ( LEFT_CURLY ( variableInitializer ( COMMA variableInitializer )* ( COMMA )? )? RIGHT_CURLY )
			// src/main/resources/org/drools/compiler/lang/DRL5Expressions.g:631:7: LEFT_CURLY ( variableInitializer ( COMMA variableInitializer )* ( COMMA )? )? RIGHT_CURLY
			{
			match(input,LEFT_CURLY,FOLLOW_LEFT_CURLY_in_arrayInitializer3669); if (state.failed) return;
			// src/main/resources/org/drools/compiler/lang/DRL5Expressions.g:631:18: ( variableInitializer ( COMMA variableInitializer )* ( COMMA )? )?
			int alt79=2;
			int LA79_0 = input.LA(1);
			if ( (LA79_0==BOOL||(LA79_0 >= DECIMAL && LA79_0 <= DECR)||LA79_0==FLOAT||LA79_0==HEX||(LA79_0 >= ID && LA79_0 <= INCR)||(LA79_0 >= LEFT_CURLY && LA79_0 <= LESS)||LA79_0==MINUS||LA79_0==NEGATION||LA79_0==NULL||LA79_0==PLUS||(LA79_0 >= STAR && LA79_0 <= TIME_INTERVAL)) ) {
				alt79=1;
			}
			switch (alt79) {
				case 1 :
					// src/main/resources/org/drools/compiler/lang/DRL5Expressions.g:631:19: variableInitializer ( COMMA variableInitializer )* ( COMMA )?
					{
					pushFollow(FOLLOW_variableInitializer_in_arrayInitializer3672);
					variableInitializer();
					state._fsp--;
					if (state.failed) return;
					// src/main/resources/org/drools/compiler/lang/DRL5Expressions.g:631:39: ( COMMA variableInitializer )*
					loop77:
					while (true) {
						int alt77=2;
						int LA77_0 = input.LA(1);
						if ( (LA77_0==COMMA) ) {
							int LA77_1 = input.LA(2);
							if ( (LA77_1==BOOL||(LA77_1 >= DECIMAL && LA77_1 <= DECR)||LA77_1==FLOAT||LA77_1==HEX||(LA77_1 >= ID && LA77_1 <= INCR)||(LA77_1 >= LEFT_CURLY && LA77_1 <= LESS)||LA77_1==MINUS||LA77_1==NEGATION||LA77_1==NULL||LA77_1==PLUS||(LA77_1 >= STAR && LA77_1 <= TIME_INTERVAL)) ) {
								alt77=1;
							}

						}

						switch (alt77) {
						case 1 :
							// src/main/resources/org/drools/compiler/lang/DRL5Expressions.g:631:40: COMMA variableInitializer
							{
							match(input,COMMA,FOLLOW_COMMA_in_arrayInitializer3675); if (state.failed) return;
							pushFollow(FOLLOW_variableInitializer_in_arrayInitializer3677);
							variableInitializer();
							state._fsp--;
							if (state.failed) return;
							}
							break;

						default :
							break loop77;
						}
					}

					// src/main/resources/org/drools/compiler/lang/DRL5Expressions.g:631:68: ( COMMA )?
					int alt78=2;
					int LA78_0 = input.LA(1);
					if ( (LA78_0==COMMA) ) {
						alt78=1;
					}
					switch (alt78) {
						case 1 :
							// src/main/resources/org/drools/compiler/lang/DRL5Expressions.g:631:69: COMMA
							{
							match(input,COMMA,FOLLOW_COMMA_in_arrayInitializer3682); if (state.failed) return;
							}
							break;

					}

					}
					break;

			}

			match(input,RIGHT_CURLY,FOLLOW_RIGHT_CURLY_in_arrayInitializer3689); if (state.failed) return;
			}

		}

		catch (RecognitionException re) {
		    throw re;
		}

		finally {
			// do for sure before leaving
		}
	}
1123929
public final void synpred36_DRL6Expressions_fragment() throws RecognitionException {
		// src/main/resources/org/drools/compiler/lang/DRL6Expressions.g:600:15: ( NULL_SAFE_DOT ID )
		// src/main/resources/org/drools/compiler/lang/DRL6Expressions.g:600:16: NULL_SAFE_DOT ID
		{
		match(input,NULL_SAFE_DOT,FOLLOW_NULL_SAFE_DOT_in_synpred36_DRL6Expressions3477); if (state.failed) return;
		match(input,ID,FOLLOW_ID_in_synpred36_DRL6Expressions3479); if (state.failed) return;
		}

	}
262336
function parseArrayInitializer() {
        var elements = [], node = new Node(), restSpread;

        expect('[');

        while (!match(']')) {
            if (match(',')) {
                lex();
                elements.push(null);
            } else if (match('...')) {
                restSpread = new Node();
                lex();
                restSpread.finishSpreadElement(inheritCoverGrammar(parseAssignmentExpression));

                if (!match(']')) {
                    isAssignmentTarget = isBindingElement = false;
                    expect(',');
                }
                elements.push(restSpread);
            } else {
                elements.push(inheritCoverGrammar(parseAssignmentExpression));

                if (!match(']')) {
                    expect(',');
                }
            }
        }

        lex();

        return node.finishArrayExpression(elements);
    }
632529
public final void synpred41_DRL6Expressions_fragment() throws RecognitionException {
		// src/main/resources/org/drools/compiler/lang/DRL6Expressions.g:697:9: ( DOT super_key )
		// src/main/resources/org/drools/compiler/lang/DRL6Expressions.g:697:10: DOT super_key
		{
		match(input,DOT,FOLLOW_DOT_in_synpred41_DRL6Expressions4230); if (state.failed) return;
		pushFollow(FOLLOW_super_key_in_synpred41_DRL6Expressions4232);
		super_key();
		state._fsp--;
		if (state.failed) return;
		}

	}
1119079
public final void elementValueArrayInitializer() throws RecognitionException {
		int elementValueArrayInitializer_StartIndex = input.index();

		try {
			if ( state.backtracking>0 && alreadyParsedRule(input, 70) ) { return; }

			// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:635:5: ( '{' ( elementValue ( ',' elementValue )* )? '}' )
			// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:635:7: '{' ( elementValue ( ',' elementValue )* )? '}'
			{
			match(input,121,FOLLOW_121_in_elementValueArrayInitializer2443); if (state.failed) return;
			// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:635:11: ( elementValue ( ',' elementValue )* )?
			int alt93=2;
			int LA93_0 = input.LA(1);
			if ( ((LA93_0 >= CharacterLiteral && LA93_0 <= DecimalLiteral)||LA93_0==FloatingPointLiteral||(LA93_0 >= HexLiteral && LA93_0 <= Identifier)||(LA93_0 >= OctalLiteral && LA93_0 <= StringLiteral)||LA93_0==29||LA93_0==36||(LA93_0 >= 40 && LA93_0 <= 41)||(LA93_0 >= 44 && LA93_0 <= 45)||LA93_0==53||LA93_0==58||LA93_0==65||LA93_0==67||(LA93_0 >= 70 && LA93_0 <= 71)||LA93_0==77||(LA93_0 >= 79 && LA93_0 <= 80)||LA93_0==82||LA93_0==85||LA93_0==92||LA93_0==94||(LA93_0 >= 97 && LA93_0 <= 98)||LA93_0==105||LA93_0==108||LA93_0==111||LA93_0==115||LA93_0==118||LA93_0==121||LA93_0==126) ) {
				alt93=1;
			}
			switch (alt93) {
				case 1 :
					// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:635:12: elementValue ( ',' elementValue )*
					{
					pushFollow(FOLLOW_elementValue_in_elementValueArrayInitializer2446);
					elementValue();
					state._fsp--;
					if (state.failed) return;
					// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:635:25: ( ',' elementValue )*
					loop92:
					while (true) {
						int alt92=2;
						int LA92_0 = input.LA(1);
						if ( (LA92_0==43) ) {
							alt92=1;
						}

						switch (alt92) {
						case 1 :
							// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:635:26: ',' elementValue
							{
							match(input,43,FOLLOW_43_in_elementValueArrayInitializer2449); if (state.failed) return;
							pushFollow(FOLLOW_elementValue_in_elementValueArrayInitializer2451);
							elementValue();
							state._fsp--;
							if (state.failed) return;
							}
							break;

						default :
							break loop92;
						}
					}

					}
					break;

			}

			match(input,125,FOLLOW_125_in_elementValueArrayInitializer2458); if (state.failed) return;
			}

		}
		catch (RecognitionException re) {
			reportError(re);
			recover(input,re);
		}
		finally {
			// do for sure before leaving
			if ( state.backtracking>0 ) { memoize(input, 70, elementValueArrayInitializer_StartIndex); }

		}
	}
1296739
public final void ternaryExpression() throws RecognitionException {
		ParserRuleReturnScope ts =null;
		ParserRuleReturnScope fs =null;

		 ternOp++; 
		try {
			// src/main/resources/org/drools/compiler/lang/DRL5Expressions.g:175:5: ( QUESTION ts= expression COLON fs= expression )
			// src/main/resources/org/drools/compiler/lang/DRL5Expressions.g:175:7: QUESTION ts= expression COLON fs= expression
			{
			match(input,QUESTION,FOLLOW_QUESTION_in_ternaryExpression854); if (state.failed) return;
			pushFollow(FOLLOW_expression_in_ternaryExpression858);
			ts=expression();
			state._fsp--;
			if (state.failed) return;
			match(input,COLON,FOLLOW_COLON_in_ternaryExpression860); if (state.failed) return;
			pushFollow(FOLLOW_expression_in_ternaryExpression864);
			fs=expression();
			state._fsp--;
			if (state.failed) return;
			}

		}

		catch (RecognitionException re) {
		    throw re;
		}

		finally {
			// do for sure before leaving
			 ternOp--; 
		}
	}
234264
public final void in_key() throws RecognitionException {
		Token id=null;

		try {
			// src/main/resources/org/drools/compiler/lang/DRL6Expressions.g:812:3: ({...}? =>id= ID )
			// src/main/resources/org/drools/compiler/lang/DRL6Expressions.g:812:10: {...}? =>id= ID
			{
			if ( !(((helper.validateIdentifierKey(DroolsSoftKeywords.IN)))) ) {
				if (state.backtracking>0) {state.failed=true; return;}
				throw new FailedPredicateException(input, "in_key", "(helper.validateIdentifierKey(DroolsSoftKeywords.IN))");
			}
			id=(Token)match(input,ID,FOLLOW_ID_in_in_key5200); if (state.failed) return;
			if ( state.backtracking==0 ) { helper.emit(id, DroolsEditorType.KEYWORD); }
			}

		}

		catch (RecognitionException re) {
		    throw re;
		}

		finally {
			// do for sure before leaving
		}
	}
534708
private void fixVariableDeclarations(SwitchStatement node) {
    List<Statement> statements = node.getStatements();
    Block block = new Block();
    List<Statement> blockStmts = block.getStatements();
    for (int i = 0; i < statements.size(); i++) {
      Statement stmt = statements.get(i);
      if (stmt instanceof VariableDeclarationStatement) {
        VariableDeclarationStatement declStmt = (VariableDeclarationStatement) stmt;
        statements.remove(i--);
        List<VariableDeclarationFragment> fragments = declStmt.getFragments();
        for (VariableDeclarationFragment decl : fragments) {
          Expression initializer = decl.getInitializer();
          if (initializer != null) {
            Assignment assignment = new Assignment(
                new SimpleName(decl.getVariableElement()), TreeUtil.remove(initializer));
            statements.add(++i, new ExpressionStatement(assignment));
          }
        }
        blockStmts.add(declStmt);
      }
    }
    if (blockStmts.size() > 0) {
      // There is at least one variable declaration, so copy this switch
      // statement into the new block and replace it in the parent list.
      node.replaceWith(block);
      blockStmts.add(node);
    }
  }
1112514
public final void synpred14_DRL6Expressions_fragment() throws RecognitionException {
		// src/main/resources/org/drools/compiler/lang/DRL6Expressions.g:472:11: ( PLUS | MINUS )
		// src/main/resources/org/drools/compiler/lang/DRL6Expressions.g:
		{
		if ( input.LA(1)==MINUS||input.LA(1)==PLUS ) {
			input.consume();
			state.errorRecovery=false;
			state.failed=false;
		}
		else {
			if (state.backtracking>0) {state.failed=true; return;}
			MismatchedSetException mse = new MismatchedSetException(null,input);
			throw mse;
		}
		}

	}
856152
public void visitVariableExpression(VariableExpression expression) {
        String variableName = expression.getName();

        //-----------------------------------------------------------------------
        // SPECIAL CASES

        // "this" for static methods is the Class instance
        ClassNode classNode = controller.getClassNode();
        //if (controller.isInClosure()) classNode = controller.getOutermostClass();

        if (variableName.equals("this")) {
            if (controller.isStaticMethod() || (!controller.getCompileStack().isImplicitThis() && controller.isStaticContext())) {
                if (controller.isInClosure()) classNode = controller.getOutermostClass();
                visitClassExpression(new ClassExpression(classNode));
            } else {
                loadThis(expression);
            }
            return;
        }

        // "super" also requires special handling
        if (variableName.equals("super")) {
            if (controller.isStaticMethod()) {
                visitClassExpression(new ClassExpression(classNode.getSuperClass()));
            } else {
                loadThis(expression);
            }
            return;
        }

        BytecodeVariable variable = controller.getCompileStack().getVariable(variableName, false);
        if (variable == null) {
            processClassVariable(variableName);
        } else {
            controller.getOperandStack().loadOrStoreVariable(variable, expression.isUseReferenceDirectly());
        }
        if (!controller.getCompileStack().isLHS()) controller.getAssertionWriter().record(expression);
    }
1079306
public final void synpred174_Java_fragment() throws RecognitionException {
		Token id=null;
		Token z=null;

		// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:820:9: ( ( ( variableModifier )* type id= Identifier z= ':' expression ) )
		// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:820:9: ( ( variableModifier )* type id= Identifier z= ':' expression )
		{
		// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:820:9: ( ( variableModifier )* type id= Identifier z= ':' expression )
		// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:820:11: ( variableModifier )* type id= Identifier z= ':' expression
		{
		// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:820:11: ( variableModifier )*
		loop216:
		while (true) {
			int alt216=2;
			int LA216_0 = input.LA(1);
			if ( (LA216_0==58||LA216_0==83) ) {
				alt216=1;
			}

			switch (alt216) {
			case 1 :
				// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:820:13: variableModifier
				{
				pushFollow(FOLLOW_variableModifier_in_synpred174_Java3449);
				variableModifier();
				state._fsp--;
				if (state.failed) return;
				}
				break;

			default :
				break loop216;
			}
		}

		pushFollow(FOLLOW_type_in_synpred174_Java3488);
		type();
		state._fsp--;
		if (state.failed) return;
		id=(Token)match(input,Identifier,FOLLOW_Identifier_in_synpred174_Java3514); if (state.failed) return;
		z=(Token)match(input,51,FOLLOW_51_in_synpred174_Java3541); if (state.failed) return;
		pushFollow(FOLLOW_expression_in_synpred174_Java3543);
		expression();
		state._fsp--;
		if (state.failed) return;
		}

		}

	}
1172497
public final void synpred17_DRL6Expressions_fragment() throws RecognitionException {
		// src/main/resources/org/drools/compiler/lang/DRL6Expressions.g:513:11: ( xpathSeparator ID )
		// src/main/resources/org/drools/compiler/lang/DRL6Expressions.g:513:12: xpathSeparator ID
		{
		pushFollow(FOLLOW_xpathSeparator_in_synpred17_DRL6Expressions2612);
		xpathSeparator();
		state._fsp--;
		if (state.failed) return;
		match(input,ID,FOLLOW_ID_in_synpred17_DRL6Expressions2614); if (state.failed) return;
		}

	}
1121527
public final void synpred10_DRL6Expressions_fragment() throws RecognitionException {
		// src/main/resources/org/drools/compiler/lang/DRL6Expressions.g:407:7: ( DOUBLE_PIPE ( fullAnnotation[null] )? andRestriction )
		// src/main/resources/org/drools/compiler/lang/DRL6Expressions.g:407:8: DOUBLE_PIPE ( fullAnnotation[null] )? andRestriction
		{
		match(input,DOUBLE_PIPE,FOLLOW_DOUBLE_PIPE_in_synpred10_DRL6Expressions1903); if (state.failed) return;
		// src/main/resources/org/drools/compiler/lang/DRL6Expressions.g:407:20: ( fullAnnotation[null] )?
		int alt99=2;
		int LA99_0 = input.LA(1);
		if ( (LA99_0==AT) ) {
			alt99=1;
		}
		switch (alt99) {
			case 1 :
				// src/main/resources/org/drools/compiler/lang/DRL6Expressions.g:407:20: fullAnnotation[null]
				{
				pushFollow(FOLLOW_fullAnnotation_in_synpred10_DRL6Expressions1905);
				fullAnnotation(null);
				state._fsp--;
				if (state.failed) return;
				}
				break;

		}

		pushFollow(FOLLOW_andRestriction_in_synpred10_DRL6Expressions1909);
		andRestriction();
		state._fsp--;
		if (state.failed) return;
		}

	}
84695
public final void variableDeclarator() throws RecognitionException {
		variableDeclarator_stack.push(new variableDeclarator_scope());
		int variableDeclarator_StartIndex = input.index();

		Token id=null;
		ParserRuleReturnScope rest =null;


		        variableDeclarator_stack.peek().ident = new JavaLocalDeclarationDescr.IdentifierDescr();
		    
		try {
			if ( state.backtracking>0 && alreadyParsedRule(input, 39) ) { return; }

			// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:466:5: (id= Identifier rest= variableDeclaratorRest )
			// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:466:7: id= Identifier rest= variableDeclaratorRest
			{
			id=(Token)match(input,Identifier,FOLLOW_Identifier_in_variableDeclarator1355); if (state.failed) return;
			pushFollow(FOLLOW_variableDeclaratorRest_in_variableDeclarator1359);
			rest=variableDeclaratorRest();
			state._fsp--;
			if (state.failed) return;
			if ( state.backtracking==0 ) {
			            variableDeclarator_stack.peek().ident.setIdentifier( (id!=null?id.getText():null) );
			            variableDeclarator_stack.peek().ident.setStart( ((CommonToken)id).getStartIndex() - 1 );
			            if( (rest!=null?(rest.stop):null) != null ) {
			                   variableDeclarator_stack.peek().ident.setEnd( ((CommonToken)(rest!=null?(rest.stop):null)).getStopIndex() );
			            }
			        }
			}

			if ( state.backtracking==0 ) {
			            if( VarDecl_stack.peek().descr != null ) {
			                VarDecl_stack.peek().descr.addIdentifier( variableDeclarator_stack.peek().ident );
			            }
			    }
		}
		catch (RecognitionException re) {
			reportError(re);
			recover(input,re);
		}
		finally {
			// do for sure before leaving
			if ( state.backtracking>0 ) { memoize(input, 39, variableDeclarator_StartIndex); }

			variableDeclarator_stack.pop();
		}
	}
87100
public final void synpred16_DRL5Expressions_fragment() throws RecognitionException {
		// src/main/resources/org/drools/compiler/lang/DRL5Expressions.g:517:10: ( INCR | DECR )
		// src/main/resources/org/drools/compiler/lang/DRL5Expressions.g:
		{
		if ( input.LA(1)==DECR||input.LA(1)==INCR ) {
			input.consume();
			state.errorRecovery=false;
			state.failed=false;
		}
		else {
			if (state.backtracking>0) {state.failed=true; return;}
			MismatchedSetException mse = new MismatchedSetException(null,input);
			throw mse;
		}
		}

	}
1147257
public final void inlineListExpression() throws RecognitionException {
		try {
			// src/main/resources/org/drools/compiler/lang/DRL5Expressions.g:560:5: ( LEFT_SQUARE ( expressionList )? RIGHT_SQUARE )
			// src/main/resources/org/drools/compiler/lang/DRL5Expressions.g:560:9: LEFT_SQUARE ( expressionList )? RIGHT_SQUARE
			{
			match(input,LEFT_SQUARE,FOLLOW_LEFT_SQUARE_in_inlineListExpression3100); if (state.failed) return;
			// src/main/resources/org/drools/compiler/lang/DRL5Expressions.g:560:21: ( expressionList )?
			int alt61=2;
			int LA61_0 = input.LA(1);
			if ( (LA61_0==BOOL||(LA61_0 >= DECIMAL && LA61_0 <= DECR)||LA61_0==FLOAT||LA61_0==HEX||(LA61_0 >= ID && LA61_0 <= INCR)||(LA61_0 >= LEFT_PAREN && LA61_0 <= LESS)||LA61_0==MINUS||LA61_0==NEGATION||LA61_0==NULL||LA61_0==PLUS||(LA61_0 >= STAR && LA61_0 <= TIME_INTERVAL)) ) {
				alt61=1;
			}
			switch (alt61) {
				case 1 :
					// src/main/resources/org/drools/compiler/lang/DRL5Expressions.g:560:21: expressionList
					{
					pushFollow(FOLLOW_expressionList_in_inlineListExpression3102);
					expressionList();
					state._fsp--;
					if (state.failed) return;
					}
					break;

			}

			match(input,RIGHT_SQUARE,FOLLOW_RIGHT_SQUARE_in_inlineListExpression3105); if (state.failed) return;
			}

		}

		catch (RecognitionException re) {
		    throw re;
		}

		finally {
			// do for sure before leaving
		}
	}