docs: 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); }
  
  		}
  	}