docs: public final EObject ruleXIfExpression() throws RecognitionException {
          EObject current = null;
  
          Token otherlv_1=null;
          Token otherlv_2=null;
          Token otherlv_4=null;
          Token otherlv_6=null;
          EObject lv_if_3_0 = null;
  
          EObject lv_then_5_0 = null;
  
          EObject lv_else_7_0 = null;
  
  
  
          	enterRule();
  
          try {
              // InternalSARL.g:14325:2: ( ( () otherlv_1= 'if' otherlv_2= '(' ( (lv_if_3_0= ruleXExpression ) ) otherlv_4= ')' ( (lv_then_5_0= ruleXExpression ) ) ( ( ( 'else' )=>otherlv_6= 'else' ) ( (lv_else_7_0= ruleXExpression ) ) )? ) )
              // InternalSARL.g:14326:2: ( () otherlv_1= 'if' otherlv_2= '(' ( (lv_if_3_0= ruleXExpression ) ) otherlv_4= ')' ( (lv_then_5_0= ruleXExpression ) ) ( ( ( 'else' )=>otherlv_6= 'else' ) ( (lv_else_7_0= ruleXExpression ) ) )? )
              {
              // InternalSARL.g:14326:2: ( () otherlv_1= 'if' otherlv_2= '(' ( (lv_if_3_0= ruleXExpression ) ) otherlv_4= ')' ( (lv_then_5_0= ruleXExpression ) ) ( ( ( 'else' )=>otherlv_6= 'else' ) ( (lv_else_7_0= ruleXExpression ) ) )? )
              // InternalSARL.g:14327:3: () otherlv_1= 'if' otherlv_2= '(' ( (lv_if_3_0= ruleXExpression ) ) otherlv_4= ')' ( (lv_then_5_0= ruleXExpression ) ) ( ( ( 'else' )=>otherlv_6= 'else' ) ( (lv_else_7_0= ruleXExpression ) ) )?
              {
              // InternalSARL.g:14327:3: ()
              // InternalSARL.g:14328:4: 
              {
              if ( state.backtracking==0 ) {
  
                				current = forceCreateModelElement(
                					grammarAccess.getXIfExpressionAccess().getXIfExpressionAction_0(),
                					current);
                			
              }
  
              }
  
              otherlv_1=(Token)match(input,129,FOLLOW_80); if (state.failed) return current;
              if ( state.backtracking==0 ) {
  
                			newLeafNode(otherlv_1, grammarAccess.getXIfExpressionAccess().getIfKeyword_1());
                		
              }
              otherlv_2=(Token)match(input,49,FOLLOW_45); if (state.failed) return current;
              if ( state.backtracking==0 ) {
  
                			newLeafNode(otherlv_2, grammarAccess.getXIfExpressionAccess().getLeftParenthesisKeyword_2());
                		
              }
              // InternalSARL.g:14342:3: ( (lv_if_3_0= ruleXExpression ) )
              // InternalSARL.g:14343:4: (lv_if_3_0= ruleXExpression )
              {
              // InternalSARL.g:14343:4: (lv_if_3_0= ruleXExpression )
              // InternalSARL.g:14344:5: lv_if_3_0= ruleXExpression
              {
              if ( state.backtracking==0 ) {
  
                					newCompositeNode(grammarAccess.getXIfExpressionAccess().getIfXExpressionParserRuleCall_3_0());
                				
              }
              pushFollow(FOLLOW_81);
              lv_if_3_0=ruleXExpression();
  
              state._fsp--;
              if (state.failed) return current;
              if ( state.backtracking==0 ) {
  
                					if (current==null) {
                						current = createModelElementForParent(grammarAccess.getXIfExpressionRule());
                					}
                					set(
                						current,
                						"if",
                						lv_if_3_0,
                						"org.eclipse.xtext.xbase.Xbase.XExpression");
                					afterParserOrEnumRuleCall();
                				
              }
  
              }
  
  
              }
  
              otherlv_4=(Token)match(input,50,FOLLOW_45); if (state.failed) return current;
              if ( state.backtracking==0 ) {
  
                			newLeafNode(otherlv_4, grammarAccess.getXIfExpressionAccess().getRightParenthesisKeyword_4());
                		
              }
              // InternalSARL.g:14365:3: ( (lv_then_5_0= ruleXExpression ) )
              // InternalSARL.g:14366:4: (lv_then_5_0= ruleXExpression )
              {
              // InternalSARL.g:14366:4: (lv_then_5_0= ruleXExpression )
              // InternalSARL.g:14367:5: lv_then_5_0= ruleXExpression
              {
              if ( state.backtracking==0 ) {
  
                					newCompositeNode(grammarAccess.getXIfExpressionAccess().getThenXExpressionParserRuleCall_5_0());
                				
              }
              pushFollow(FOLLOW_138);
              lv_then_5_0=ruleXExpression();
  
              state._fsp--;
              if (state.failed) return current;
              if ( state.backtracking==0 ) {
  
                					if (current==null) {
                						current = createModelElementForParent(grammarAccess.getXIfExpressionRule());
                					}
                					set(
                						current,
                						"then",
                						lv_then_5_0,
                						"org.eclipse.xtext.xbase.Xbase.XExpression");
                					afterParserOrEnumRuleCall();
                				
              }
  
              }
  
  
              }
  
              // InternalSARL.g:14384:3: ( ( ( 'else' )=>otherlv_6= 'else' ) ( (lv_else_7_0= ruleXExpression ) ) )?
              int alt338=2;
              int LA338_0 = input.LA(1);
  
              if ( (LA338_0==130) ) {
                  int LA338_1 = input.LA(2);
  
                  if ( (synpred50_InternalSARL()) ) {
                      alt338=1;
                  }
              }
              switch (alt338) {
                  case 1 :
                      // InternalSARL.g:14385:4: ( ( 'else' )=>otherlv_6= 'else' ) ( (lv_else_7_0= ruleXExpression ) )
                      {
                      // InternalSARL.g:14385:4: ( ( 'else' )=>otherlv_6= 'else' )
                      // InternalSARL.g:14386:5: ( 'else' )=>otherlv_6= 'else'
                      {
                      otherlv_6=(Token)match(input,130,FOLLOW_45); if (state.failed) return current;
                      if ( state.backtracking==0 ) {
  
                        					newLeafNode(otherlv_6, grammarAccess.getXIfExpressionAccess().getElseKeyword_6_0());
                        				
                      }
  
                      }
  
                      // InternalSARL.g:14392:4: ( (lv_else_7_0= ruleXExpression ) )
                      // InternalSARL.g:14393:5: (lv_else_7_0= ruleXExpression )
                      {
                      // InternalSARL.g:14393:5: (lv_else_7_0= ruleXExpression )
                      // InternalSARL.g:14394:6: lv_else_7_0= ruleXExpression
                      {
                      if ( state.backtracking==0 ) {
  
                        						newCompositeNode(grammarAccess.getXIfExpressionAccess().getElseXExpressionParserRuleCall_6_1_0());
                        					
                      }
                      pushFollow(FOLLOW_2);
                      lv_else_7_0=ruleXExpression();
  
                      state._fsp--;
                      if (state.failed) return current;
                      if ( state.backtracking==0 ) {
  
                        						if (current==null) {
                        							current = createModelElementForParent(grammarAccess.getXIfExpressionRule());
                        						}
                        						set(
                        							current,
                        							"else",
                        							lv_else_7_0,
                        							"org.eclipse.xtext.xbase.Xbase.XExpression");
                        						afterParserOrEnumRuleCall();
                        					
                      }
  
                      }
  
  
                      }
  
  
                      }
                      break;
  
              }
  
  
              }
  
  
              }
  
              if ( state.backtracking==0 ) {
  
                	leaveRule();
  
              }
          }
  
              catch (RecognitionException re) {
                  recover(input,re);
                  appendSkippedTokens();
              }
          finally {
          }
          return current;
      }