src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:917:1: modifyStatement : s= 'modify' parExpression '{' (e= expression ( ',' e= expression )* )? c= '}' ;
423302
public final void modifyStatement() throws RecognitionException {
		int modifyStatement_StartIndex = input.index();

		Token s=null;
		Token c=null;
		ParserRuleReturnScope e =null;
		ParserRuleReturnScope parExpression7 =null;


		        JavaModifyBlockDescr d = null;
		    
		try {
			if ( state.backtracking>0 && alreadyParsedRule(input, 89) ) { return; }

			// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:921:5: (s= 'modify' parExpression '{' (e= expression ( ',' e= expression )* )? c= '}' )
			// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:921:7: s= 'modify' parExpression '{' (e= expression ( ',' e= expression )* )? c= '}'
			{
			s=(Token)match(input,95,FOLLOW_95_in_modifyStatement3951); if (state.failed) return;
			pushFollow(FOLLOW_parExpression_in_modifyStatement3953);
			parExpression7=parExpression();
			state._fsp--;
			if (state.failed) return;
			if ( state.backtracking==0 ) {
			        d = new JavaModifyBlockDescr( (parExpression7!=null?input.toString(parExpression7.start,parExpression7.stop):null) );
			        d.setStart( ((CommonToken)s).getStartIndex() );
			        d.setInScopeLocalVars( getLocalDeclarations() );
			        this.addBlockDescr( d );

			    }
			match(input,121,FOLLOW_121_in_modifyStatement3965); if (state.failed) return;
			// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:929:9: (e= expression ( ',' e= expression )* )?
			int alt125=2;
			int LA125_0 = input.LA(1);
			if ( ((LA125_0 >= CharacterLiteral && LA125_0 <= DecimalLiteral)||LA125_0==FloatingPointLiteral||(LA125_0 >= HexLiteral && LA125_0 <= Identifier)||(LA125_0 >= OctalLiteral && LA125_0 <= StringLiteral)||LA125_0==29||LA125_0==36||(LA125_0 >= 40 && LA125_0 <= 41)||(LA125_0 >= 44 && LA125_0 <= 45)||LA125_0==53||LA125_0==65||LA125_0==67||(LA125_0 >= 70 && LA125_0 <= 71)||LA125_0==77||(LA125_0 >= 79 && LA125_0 <= 80)||LA125_0==82||LA125_0==85||LA125_0==92||LA125_0==94||(LA125_0 >= 97 && LA125_0 <= 98)||LA125_0==105||LA125_0==108||LA125_0==111||LA125_0==115||LA125_0==118||LA125_0==126) ) {
				alt125=1;
			}
			switch (alt125) {
				case 1 :
					// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:929:11: e= expression ( ',' e= expression )*
					{
					pushFollow(FOLLOW_expression_in_modifyStatement3973);
					e=expression();
					state._fsp--;
					if (state.failed) return;
					if ( state.backtracking==0 ) { d.getExpressions().add( (e!=null?input.toString(e.start,e.stop):null) ); }
					// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:930:12: ( ',' e= expression )*
					loop124:
					while (true) {
						int alt124=2;
						int LA124_0 = input.LA(1);
						if ( (LA124_0==43) ) {
							alt124=1;
						}

						switch (alt124) {
						case 1 :
							// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:930:13: ',' e= expression
							{
							match(input,43,FOLLOW_43_in_modifyStatement3989); if (state.failed) return;
							pushFollow(FOLLOW_expression_in_modifyStatement3993);
							e=expression();
							state._fsp--;
							if (state.failed) return;
							if ( state.backtracking==0 ) { d.getExpressions().add( (e!=null?input.toString(e.start,e.stop):null) ); }
							}
							break;

						default :
							break loop124;
						}
					}

					}
					break;

			}

			c=(Token)match(input,125,FOLLOW_125_in_modifyStatement4017); if (state.failed) return;
			if ( state.backtracking==0 ) {
			            d.setEnd( ((CommonToken)c).getStopIndex() ); 
			        }
			}

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

		}
	}
266688
function toStatement(node, ignore) {
  if (t.isStatement(node)) {
    return node;
  }

  var mustHaveId = false;
  var newType;

  if (t.isClass(node)) {
    mustHaveId = true;
    newType = "ClassDeclaration";
  } else if (t.isFunction(node)) {
    mustHaveId = true;
    newType = "FunctionDeclaration";
  } else if (t.isAssignmentExpression(node)) {
    return t.expressionStatement(node);
  }

  if (mustHaveId && !node.id) {
    newType = false;
  }

  if (!newType) {
    if (ignore) {
      return false;
    } else {
      throw new Error("cannot turn " + node.type + " to a statement");
    }
  }

  node.type = newType;

  return node;
}
387445
function parseReturnStatement() {
        var token, argument = null;

        expectKeyword('return');

        if (!inFunctionBody) {
            throwErrorTolerant({}, Messages.IllegalReturn);
        }

        // 'return' followed by a space and an identifier is very common.
        if (source[index] === ' ') {
            if (isIdentifierStart(source[index + 1])) {
                argument = parseExpression();
                consumeSemicolon();
                return {
                    type: Syntax.ReturnStatement,
                    argument: argument
                };
            }
        }

        if (peekLineTerminator()) {
            return {
                type: Syntax.ReturnStatement,
                argument: null
            };
        }

        if (!match(';')) {
            token = lookahead();
            if (!match('}') && token.type !== Token.EOF) {
                argument = parseExpression();
            }
        }

        consumeSemicolon();

        return {
            type: Syntax.ReturnStatement,
            argument: argument
        };
    }
659434
public final void synpred11_DRL6Expressions_fragment() throws RecognitionException {
		// src/main/resources/org/drools/compiler/lang/DRL6Expressions.g:421:5: ( DOUBLE_AMPER ( fullAnnotation[null] )? operator )
		// src/main/resources/org/drools/compiler/lang/DRL6Expressions.g:421:6: DOUBLE_AMPER ( fullAnnotation[null] )? operator
		{
		match(input,DOUBLE_AMPER,FOLLOW_DOUBLE_AMPER_in_synpred11_DRL6Expressions1972); if (state.failed) return;
		// src/main/resources/org/drools/compiler/lang/DRL6Expressions.g:421:19: ( fullAnnotation[null] )?
		int alt100=2;
		int LA100_0 = input.LA(1);
		if ( (LA100_0==AT) ) {
			alt100=1;
		}
		switch (alt100) {
			case 1 :
				// src/main/resources/org/drools/compiler/lang/DRL6Expressions.g:421:19: fullAnnotation[null]
				{
				pushFollow(FOLLOW_fullAnnotation_in_synpred11_DRL6Expressions1974);
				fullAnnotation(null);
				state._fsp--;
				if (state.failed) return;
				}
				break;

		}

		pushFollow(FOLLOW_operator_in_synpred11_DRL6Expressions1978);
		operator();
		state._fsp--;
		if (state.failed) return;
		}

	}
581860
public final void synpred172_Java_fragment() throws RecognitionException {
		Token y=null;
		ParserRuleReturnScope z =null;

		// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:787:6: (y= 'else' ( 'if' parExpression )? z= statement )
		// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:787:6: y= 'else' ( 'if' parExpression )? z= statement
		{
		y=(Token)match(input,78,FOLLOW_78_in_synpred172_Java3290); if (state.failed) return;
		// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:787:16: ( 'if' parExpression )?
		int alt215=2;
		int LA215_0 = input.LA(1);
		if ( (LA215_0==87) ) {
			int LA215_1 = input.LA(2);
			if ( (LA215_1==36) ) {
				int LA215_43 = input.LA(3);
				if ( (synpred171_Java()) ) {
					alt215=1;
				}
			}
		}
		switch (alt215) {
			case 1 :
				// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:787:17: 'if' parExpression
				{
				match(input,87,FOLLOW_87_in_synpred172_Java3294); if (state.failed) return;
				pushFollow(FOLLOW_parExpression_in_synpred172_Java3296);
				parExpression();
				state._fsp--;
				if (state.failed) return;
				}
				break;

		}

		pushFollow(FOLLOW_statement_in_synpred172_Java3327);
		z=statement();
		state._fsp--;
		if (state.failed) return;
		}

	}
1342086
public final void deleteStatement() throws RecognitionException {
		int deleteStatement_StartIndex = input.index();

		Token s=null;
		Token c=null;
		ParserRuleReturnScope expression10 =null;

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

			// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:963:5: (s= 'delete' '(' expression c= ')' )
			// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:963:7: s= 'delete' '(' expression c= ')'
			{
			s=(Token)match(input,75,FOLLOW_75_in_deleteStatement4144); if (state.failed) return;
			match(input,36,FOLLOW_36_in_deleteStatement4146); if (state.failed) return;
			pushFollow(FOLLOW_expression_in_deleteStatement4152);
			expression10=expression();
			state._fsp--;
			if (state.failed) return;
			c=(Token)match(input,37,FOLLOW_37_in_deleteStatement4162); if (state.failed) return;
			if ( state.backtracking==0 ) {
			        JavaStatementBlockDescr d = new JavaStatementBlockDescr( (expression10!=null?input.toString(expression10.start,expression10.stop):null), JavaBlockDescr.BlockType.DELETE );
			        d.setStart( ((CommonToken)s).getStartIndex() );
			        this.addBlockDescr( d );
			        d.setEnd( ((CommonToken)c).getStopIndex() );
			    }
			}

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

		}
	}
1218371
public final void synpred8_DRL5Expressions_fragment() throws RecognitionException {
		// src/main/resources/org/drools/compiler/lang/DRL5Expressions.g:382:5: ( operator | LEFT_PAREN )
		int alt90=2;
		int LA90_0 = input.LA(1);
		if ( (LA90_0==EQUALS||(LA90_0 >= GREATER && LA90_0 <= GREATER_EQUALS)||(LA90_0 >= LESS && LA90_0 <= LESS_EQUALS)||LA90_0==NOT_EQUALS||LA90_0==TILDE) ) {
			alt90=1;
		}
		else if ( (LA90_0==ID) && ((((helper.validateIdentifierKey(DroolsSoftKeywords.NOT)))||((helper.isPluggableEvaluator(false)))))) {
			alt90=1;
		}
		else if ( (LA90_0==LEFT_PAREN) ) {
			alt90=2;
		}

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

		switch (alt90) {
			case 1 :
				// src/main/resources/org/drools/compiler/lang/DRL5Expressions.g:382:7: operator
				{
				pushFollow(FOLLOW_operator_in_synpred8_DRL5Expressions1764);
				operator();
				state._fsp--;
				if (state.failed) return;
				}
				break;
			case 2 :
				// src/main/resources/org/drools/compiler/lang/DRL5Expressions.g:382:18: LEFT_PAREN
				{
				match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_synpred8_DRL5Expressions1768); if (state.failed) return;
				}
				break;

		}
	}
713319
public final void synpred222_Java_fragment() throws RecognitionException {
		// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:1170:27: ( relationalOp shiftExpression )
		// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:1170:27: relationalOp shiftExpression
		{
		pushFollow(FOLLOW_relationalOp_in_synpred222_Java5278);
		relationalOp();
		state._fsp--;
		if (state.failed) return;
		pushFollow(FOLLOW_shiftExpression_in_synpred222_Java5280);
		shiftExpression();
		state._fsp--;
		if (state.failed) return;
		}

	}
699129
JCExpression creator(int newpos, List<JCExpression> typeArgs) {
        List<JCAnnotation> newAnnotations = typeAnnotationsOpt();

        switch (token.kind) {
        case BYTE: case SHORT: case CHAR: case INT: case LONG: case FLOAT:
        case DOUBLE: case BOOLEAN:
            if (typeArgs == null) {
                if (newAnnotations.isEmpty()) {
                    return arrayCreatorRest(newpos, basicType());
                } else {
                    return arrayCreatorRest(newpos, toP(F.at(newAnnotations.head.pos).AnnotatedType(newAnnotations, basicType())));
                }
            }
            break;
        default:
        }
        JCExpression t = qualident(true);

        int oldmode = mode;
        mode = TYPE;
        boolean diamondFound = false;
        int lastTypeargsPos = -1;
        if (token.kind == LT) {
            lastTypeargsPos = token.pos;
            t = typeArguments(t, true);
            diamondFound = (mode & DIAMOND) != 0;
        }
        while (token.kind == DOT) {
            if (diamondFound) {
                //cannot select after a diamond
                illegal();
            }
            int pos = token.pos;
            nextToken();
            List<JCAnnotation> tyannos = typeAnnotationsOpt();
            t = toP(F.at(pos).Select(t, ident()));

            if (tyannos != null && tyannos.nonEmpty()) {
                t = toP(F.at(tyannos.head.pos).AnnotatedType(tyannos, t));
            }

            if (token.kind == LT) {
                lastTypeargsPos = token.pos;
                t = typeArguments(t, true);
                diamondFound = (mode & DIAMOND) != 0;
            }
        }
        mode = oldmode;
        if (token.kind == LBRACKET || token.kind == MONKEYS_AT) {
            // handle type annotations for non primitive arrays
            if (newAnnotations.nonEmpty()) {
                t = insertAnnotationsToMostInner(t, newAnnotations, false);
            }

            JCExpression e = arrayCreatorRest(newpos, t);
            if (diamondFound) {
                reportSyntaxError(lastTypeargsPos, "cannot.create.array.with.diamond");
                return toP(F.at(newpos).Erroneous(List.of(e)));
            }
            else if (typeArgs != null) {
                int pos = newpos;
                if (!typeArgs.isEmpty() && typeArgs.head.pos != Position.NOPOS) {
                    // note: this should always happen but we should
                    // not rely on this as the parser is continuously
                    // modified to improve error recovery.
                    pos = typeArgs.head.pos;
                }
                setErrorEndPos(S.prevToken().endPos);
                JCErroneous err = F.at(pos).Erroneous(typeArgs.prepend(e));
                reportSyntaxError(err, "cannot.create.array.with.type.arguments");
                return toP(err);
            }
            return e;
        } else if (token.kind == LPAREN) {
            JCNewClass newClass = classCreatorRest(newpos, null, typeArgs, t);
            if (newClass.def != null) {
                assert newClass.def.mods.annotations.isEmpty();
                if (newAnnotations.nonEmpty()) {
                    // Add type and declaration annotations to the new class;
                    // com.sun.tools.javac.code.TypeAnnotations.TypeAnnotationPositions.visitNewClass(JCNewClass)
                    // will later remove all type annotations and only leave the
                    // declaration annotations.
                    newClass.def.mods.pos = earlier(newClass.def.mods.pos, newAnnotations.head.pos);
                    newClass.def.mods.annotations = newAnnotations;
                }
            } else {
                // handle type annotations for instantiations
                if (newAnnotations.nonEmpty()) {
                    t = insertAnnotationsToMostInner(t, newAnnotations, false);
                    newClass.clazz = t;
                }
            }
            return newClass;
        } else {
            setErrorEndPos(token.pos);
            reportSyntaxError(token.pos, "expected2", LPAREN, LBRACKET);
            t = toP(F.at(newpos).NewClass(null, typeArgs, t, List.nil(), null));
            return toP(F.at(newpos).Erroneous(List.<JCTree>of(t)));
        }
    }
220204
public final void andExpression() throws RecognitionException {
		int andExpression_StartIndex = input.index();

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

			// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:1158:5: ( equalityExpression ( '&' equalityExpression )* )
			// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:1158:9: equalityExpression ( '&' equalityExpression )*
			{
			pushFollow(FOLLOW_equalityExpression_in_andExpression5186);
			equalityExpression();
			state._fsp--;
			if (state.failed) return;
			// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:1158:28: ( '&' equalityExpression )*
			loop147:
			while (true) {
				int alt147=2;
				int LA147_0 = input.LA(1);
				if ( (LA147_0==34) ) {
					alt147=1;
				}

				switch (alt147) {
				case 1 :
					// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:1158:30: '&' equalityExpression
					{
					match(input,34,FOLLOW_34_in_andExpression5190); if (state.failed) return;
					pushFollow(FOLLOW_equalityExpression_in_andExpression5192);
					equalityExpression();
					state._fsp--;
					if (state.failed) return;
					}
					break;

				default :
					break loop147;
				}
			}

			}

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

		}
	}
105066
Result executeUpdateStatement(Session session) {

        int            count          = 0;
        Expression[]   colExpressions = updateExpressions;
        HashMappedList rowset         = new HashMappedList();
        Type[]         colTypes       = baseTable.getColumnTypes();
        RangeIteratorBase it = RangeVariable.getIterator(session,
            targetRangeVariables);
        Expression checkCondition = null;

        if (targetTable != baseTable) {
            checkCondition =
                ((TableDerived) targetTable).getQueryExpression()
                    .getMainSelect().checkQueryCondition;
        }

        while (it.next()) {
            session.sessionData.startRowProcessing();

            Row      row  = it.getCurrentRow();
            Object[] data = row.getData();
            Object[] newData = getUpdatedData(session, baseTable,
                                              updateColumnMap, colExpressions,
                                              colTypes, data);

            if (checkCondition != null) {
                it.currentData = newData;

                boolean check = checkCondition.testCondition(session);

                if (!check) {
                    throw Error.error(ErrorCode.X_44000);
                }
            }

            rowset.add(row, newData);
        }

/* debug 190
        if (rowset.size() == 0) {
            System.out.println(targetTable.getName().name + " zero update: session "
                               + session.getId());
        } else if (rowset.size() >1) {
           System.out.println("multiple update: session "
                              + session.getId() + ", " + rowset.size());
       }

//* debug 190 */
        count = update(session, baseTable, rowset);

        return Result.getUpdateCountResult(count);
    }
843570
private ParseTree parseReturnStatement() {
    SourcePosition start = getTreeStartLocation();
    eat(TokenType.RETURN);
    ParseTree expression = null;
    if (!peekImplicitSemiColon()) {
      expression = parseExpression();
    }
    eatPossibleImplicitSemiColon();
    return new ReturnStatementTree(getTreeLocation(start), expression);
  }
257941
public final void exclusiveOrExpression() throws RecognitionException {
		int exclusiveOrExpression_StartIndex = input.index();

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

			// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:1154:5: ( andExpression ( '^' andExpression )* )
			// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:1154:9: andExpression ( '^' andExpression )*
			{
			pushFollow(FOLLOW_andExpression_in_exclusiveOrExpression5158);
			andExpression();
			state._fsp--;
			if (state.failed) return;
			// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:1154:23: ( '^' andExpression )*
			loop146:
			while (true) {
				int alt146=2;
				int LA146_0 = input.LA(1);
				if ( (LA146_0==61) ) {
					alt146=1;
				}

				switch (alt146) {
				case 1 :
					// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:1154:25: '^' andExpression
					{
					match(input,61,FOLLOW_61_in_exclusiveOrExpression5162); if (state.failed) return;
					pushFollow(FOLLOW_andExpression_in_exclusiveOrExpression5164);
					andExpression();
					state._fsp--;
					if (state.failed) return;
					}
					break;

				default :
					break loop146;
				}
			}

			}

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

		}
	}
398256
public final void conditionalExpression() throws RecognitionException {
		int conditionalExpression_StartIndex = input.index();

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

			// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:1138:5: ( conditionalOrExpression ( '?' expression ':' expression )? )
			// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:1138:9: conditionalOrExpression ( '?' expression ':' expression )?
			{
			pushFollow(FOLLOW_conditionalOrExpression_in_conditionalExpression5042);
			conditionalOrExpression();
			state._fsp--;
			if (state.failed) return;
			// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:1138:33: ( '?' expression ':' expression )?
			int alt142=2;
			int LA142_0 = input.LA(1);
			if ( (LA142_0==57) ) {
				alt142=1;
			}
			switch (alt142) {
				case 1 :
					// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:1138:35: '?' expression ':' expression
					{
					match(input,57,FOLLOW_57_in_conditionalExpression5046); if (state.failed) return;
					pushFollow(FOLLOW_expression_in_conditionalExpression5048);
					expression();
					state._fsp--;
					if (state.failed) return;
					match(input,51,FOLLOW_51_in_conditionalExpression5050); if (state.failed) return;
					pushFollow(FOLLOW_expression_in_conditionalExpression5052);
					expression();
					state._fsp--;
					if (state.failed) return;
					}
					break;

			}

			}

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

		}
	}
1086538
@Override
    protected AstNode parseDropStatement( DdlTokenStream tokens,
                                          AstNode parentNode ) throws ParsingException {
        assert tokens != null;
        assert parentNode != null;

        if (tokens.matches(STMT_DROP_DATABASE)) {
            return parseStatement(tokens, STMT_DROP_DATABASE, parentNode, TYPE_DROP_DATABASE_STATEMENT);
        } else if (tokens.matches(STMT_DROP_EVENT)) {
            return parseStatement(tokens, STMT_DROP_EVENT, parentNode, TYPE_DROP_EVENT_STATEMENT);
        } else if (tokens.matches(STMT_DROP_FUNCTION)) {
            return parseStatement(tokens, STMT_DROP_FUNCTION, parentNode, TYPE_DROP_FUNCTION_STATEMENT);
        } else if (tokens.matches(STMT_DROP_INDEX)) {
            return parseStatement(tokens, STMT_DROP_INDEX, parentNode, TYPE_DROP_INDEX_STATEMENT);
        } else if (tokens.matches(STMT_DROP_OFFLINE_INDEX)) {
            return parseStatement(tokens, STMT_DROP_OFFLINE_INDEX, parentNode, TYPE_DROP_INDEX_STATEMENT);
        } else if (tokens.matches(STMT_DROP_ONLINE_INDEX)) {
            return parseStatement(tokens, STMT_DROP_ONLINE_INDEX, parentNode, TYPE_DROP_INDEX_STATEMENT);
        } else if (tokens.matches(STMT_DROP_LOGFILE_GROUP)) {
            return parseStatement(tokens, STMT_DROP_LOGFILE_GROUP, parentNode, TYPE_DROP_LOGFILE_GROUP_STATEMENT);
        } else if (tokens.matches(STMT_DROP_PROCEDURE)) {
            return parseStatement(tokens, STMT_DROP_PROCEDURE, parentNode, TYPE_DROP_PROCEDURE_STATEMENT);
        } else if (tokens.matches(STMT_DROP_SERVER)) {
            return parseStatement(tokens, STMT_DROP_SERVER, parentNode, TYPE_DROP_SERVER_STATEMENT);
        } else if (tokens.matches(STMT_DROP_TABLESPACE)) {
            return parseStatement(tokens, STMT_DROP_TABLESPACE, parentNode, TYPE_DROP_TABLESPACE_STATEMENT);
        } else if (tokens.matches(STMT_DROP_TRIGGER)) {
            return parseStatement(tokens, STMT_DROP_TRIGGER, parentNode, TYPE_DROP_TRIGGER_STATEMENT);
        }

        return super.parseDropStatement(tokens, parentNode);
    }
425892
@Override
    protected AstNode parseCreateViewStatement( DdlTokenStream tokens,
                                                AstNode parentNode ) throws ParsingException {
        assert tokens != null;
        assert parentNode != null;

        markStartOfStatement(tokens);
        // CREATE [OR REPLACE]
        // [[NO] FORCE] VIEW [schema.] view
        // [ ( { alias [ inline_constraint... ]
        // | out_of_line_constraint
        // }
        // [, { alias [ inline_constraint...]
        // | out_of_line_constraint
        // }
        // ]
        // )
        // | object_view_clause
        // | XMLType_view_clause
        // ]
        // AS subquery [ subquery_restriction_clause ] ;

        // NOTE: the query expression along with the CHECK OPTION clause require no SQL statement terminator.
        // So the CHECK OPTION clause will NOT

        String stmtType = "CREATE";
        tokens.consume("CREATE");
        if (tokens.canConsume("OR", "REPLACE")) {
            stmtType = stmtType + SPACE + "OR REPLACE";
        } else if (tokens.canConsume("NO", "FORCE")) {
            stmtType = stmtType + SPACE + "NO FORCE";
        } else if (tokens.canConsume("FORCE")) {
            stmtType = stmtType + SPACE + "FORCE";
        }

        tokens.consume("VIEW");
        stmtType = stmtType + SPACE + "VIEW";

        String name = parseName(tokens);

        AstNode createViewNode = nodeFactory().node(name, parentNode, TYPE_CREATE_VIEW_STATEMENT);

        // CONSUME COLUMNS
        parseColumnNameList(tokens, createViewNode, TYPE_COLUMN_REFERENCE);

        // (object_view_clause)
        //
        // OF [ schema. ] type_name
        // { WITH OBJECT IDENTIFIER
        // { DEFAULT | ( attribute [, attribute ]... ) }
        // | UNDER [ schema. ] superview
        // }
        // ( { out_of_line_constraint
        // | attribute { inline_constraint }...
        // } [, { out_of_line_constraint
        // | attribute { inline_constraint }...
        // }
        // ]...
        // )

        // (XMLType_view_clause)
        //
        // OF XMLTYPE [ XMLSchema_spec ]
        // WITH OBJECT IDENTIFIER
        // { DEFAULT | ( expr [, expr ]...) }

        // Basically, if next token matches "OF", then parse until token matches "AS"

        if (tokens.matches("OF")) {
            do {
                tokens.consume();
            } while (!tokens.matches("AS"));
        }

        tokens.consume("AS");

        String queryExpression = parseUntilTerminator(tokens);

        createViewNode.setProperty(CREATE_VIEW_QUERY_EXPRESSION, queryExpression);

        markEndOfStatement(tokens, createViewNode);

        return createViewNode;
    }
627122
public final void castExpression() throws RecognitionException {
		int castExpression_StartIndex = input.index();

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

			// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:1211:5: ( '(' primitiveType ')' unaryExpression | '(' ( type | expression ) ')' unaryExpressionNotPlusMinus )
			int alt161=2;
			int LA161_0 = input.LA(1);
			if ( (LA161_0==36) ) {
				int LA161_1 = input.LA(2);
				if ( (LA161_1==65||LA161_1==67||LA161_1==71||LA161_1==77||LA161_1==85||LA161_1==92||LA161_1==94||LA161_1==105) ) {
					int LA161_2 = input.LA(3);
					if ( (synpred244_Java()) ) {
						alt161=1;
					}
					else if ( (true) ) {
						alt161=2;
					}

				}
				else if ( ((LA161_1 >= CharacterLiteral && LA161_1 <= DecimalLiteral)||LA161_1==FloatingPointLiteral||(LA161_1 >= HexLiteral && LA161_1 <= Identifier)||(LA161_1 >= OctalLiteral && LA161_1 <= StringLiteral)||LA161_1==29||LA161_1==36||(LA161_1 >= 40 && LA161_1 <= 41)||(LA161_1 >= 44 && LA161_1 <= 45)||LA161_1==53||LA161_1==70||(LA161_1 >= 79 && LA161_1 <= 80)||LA161_1==82||(LA161_1 >= 97 && LA161_1 <= 98)||LA161_1==108||LA161_1==111||LA161_1==115||LA161_1==118||LA161_1==126) ) {
					alt161=2;
				}

				else {
					if (state.backtracking>0) {state.failed=true; return;}
					int nvaeMark = input.mark();
					try {
						input.consume();
						NoViableAltException nvae =
							new NoViableAltException("", 161, 1, input);
						throw nvae;
					} finally {
						input.rewind(nvaeMark);
					}
				}

			}

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

			switch (alt161) {
				case 1 :
					// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:1211:8: '(' primitiveType ')' unaryExpression
					{
					match(input,36,FOLLOW_36_in_castExpression5610); if (state.failed) return;
					pushFollow(FOLLOW_primitiveType_in_castExpression5612);
					primitiveType();
					state._fsp--;
					if (state.failed) return;
					match(input,37,FOLLOW_37_in_castExpression5614); if (state.failed) return;
					pushFollow(FOLLOW_unaryExpression_in_castExpression5616);
					unaryExpression();
					state._fsp--;
					if (state.failed) return;
					}
					break;
				case 2 :
					// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:1212:8: '(' ( type | expression ) ')' unaryExpressionNotPlusMinus
					{
					match(input,36,FOLLOW_36_in_castExpression5625); if (state.failed) return;
					// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:1212:12: ( type | expression )
					int alt160=2;
					switch ( input.LA(1) ) {
					case Identifier:
						{
						int LA160_1 = input.LA(2);
						if ( (synpred245_Java()) ) {
							alt160=1;
						}
						else if ( (true) ) {
							alt160=2;
						}

						}
						break;
					case 65:
					case 67:
					case 71:
					case 77:
					case 85:
					case 92:
					case 94:
					case 105:
						{
						switch ( input.LA(2) ) {
						case 59:
							{
							int LA160_51 = input.LA(3);
							if ( (synpred245_Java()) ) {
								alt160=1;
							}
							else if ( (true) ) {
								alt160=2;
							}

							}
							break;
						case 37:
							{
							alt160=1;
							}
							break;
						case 47:
							{
							alt160=2;
							}
							break;
						default:
							if (state.backtracking>0) {state.failed=true; return;}
							int nvaeMark = input.mark();
							try {
								input.consume();
								NoViableAltException nvae =
									new NoViableAltException("", 160, 2, input);
								throw nvae;
							} finally {
								input.rewind(nvaeMark);
							}
						}
						}
						break;
					case CharacterLiteral:
					case DecimalLiteral:
					case FloatingPointLiteral:
					case HexLiteral:
					case OctalLiteral:
					case StringLiteral:
					case 29:
					case 36:
					case 40:
					case 41:
					case 44:
					case 45:
					case 53:
					case 70:
					case 79:
					case 80:
					case 82:
					case 97:
					case 98:
					case 108:
					case 111:
					case 115:
					case 118:
					case 126:
						{
						alt160=2;
						}
						break;
					default:
						if (state.backtracking>0) {state.failed=true; return;}
						NoViableAltException nvae =
							new NoViableAltException("", 160, 0, input);
						throw nvae;
					}
					switch (alt160) {
						case 1 :
							// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:1212:13: type
							{
							pushFollow(FOLLOW_type_in_castExpression5628);
							type();
							state._fsp--;
							if (state.failed) return;
							}
							break;
						case 2 :
							// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:1212:20: expression
							{
							pushFollow(FOLLOW_expression_in_castExpression5632);
							expression();
							state._fsp--;
							if (state.failed) return;
							}
							break;

					}

					match(input,37,FOLLOW_37_in_castExpression5635); if (state.failed) return;
					pushFollow(FOLLOW_unaryExpressionNotPlusMinus_in_castExpression5637);
					unaryExpressionNotPlusMinus();
					state._fsp--;
					if (state.failed) return;
					}
					break;

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

		}
	}