docs: public final EObject ruleRichStringIf() throws RecognitionException {
          EObject current = null;
  
          Token otherlv_1=null;
          Token otherlv_5=null;
          Token otherlv_7=null;
          EObject lv_if_2_0 = null;
  
          EObject lv_then_3_0 = null;
  
          EObject lv_elseIfs_4_0 = null;
  
          EObject lv_else_6_0 = null;
  
  
  
          	enterRule();
  
          try {
              // InternalSARL.g:11347:2: ( ( () otherlv_1= 'IF' ( (lv_if_2_0= ruleXExpression ) ) ( (lv_then_3_0= ruleInternalRichString ) ) ( (lv_elseIfs_4_0= ruleRichStringElseIf ) )* (otherlv_5= 'ELSE' ( (lv_else_6_0= ruleInternalRichString ) ) )? otherlv_7= 'ENDIF' ) )
              // InternalSARL.g:11348:2: ( () otherlv_1= 'IF' ( (lv_if_2_0= ruleXExpression ) ) ( (lv_then_3_0= ruleInternalRichString ) ) ( (lv_elseIfs_4_0= ruleRichStringElseIf ) )* (otherlv_5= 'ELSE' ( (lv_else_6_0= ruleInternalRichString ) ) )? otherlv_7= 'ENDIF' )
              {
              // InternalSARL.g:11348:2: ( () otherlv_1= 'IF' ( (lv_if_2_0= ruleXExpression ) ) ( (lv_then_3_0= ruleInternalRichString ) ) ( (lv_elseIfs_4_0= ruleRichStringElseIf ) )* (otherlv_5= 'ELSE' ( (lv_else_6_0= ruleInternalRichString ) ) )? otherlv_7= 'ENDIF' )
              // InternalSARL.g:11349:3: () otherlv_1= 'IF' ( (lv_if_2_0= ruleXExpression ) ) ( (lv_then_3_0= ruleInternalRichString ) ) ( (lv_elseIfs_4_0= ruleRichStringElseIf ) )* (otherlv_5= 'ELSE' ( (lv_else_6_0= ruleInternalRichString ) ) )? otherlv_7= 'ENDIF'
              {
              // InternalSARL.g:11349:3: ()
              // InternalSARL.g:11350:4: 
              {
              if ( state.backtracking==0 ) {
  
                				current = forceCreateModelElement(
                					grammarAccess.getRichStringIfAccess().getRichStringIfAction_0(),
                					current);
                			
              }
  
              }
  
              otherlv_1=(Token)match(input,101,FOLLOW_45); if (state.failed) return current;
              if ( state.backtracking==0 ) {
  
                			newLeafNode(otherlv_1, grammarAccess.getRichStringIfAccess().getIFKeyword_1());
                		
              }
              // InternalSARL.g:11360:3: ( (lv_if_2_0= ruleXExpression ) )
              // InternalSARL.g:11361:4: (lv_if_2_0= ruleXExpression )
              {
              // InternalSARL.g:11361:4: (lv_if_2_0= ruleXExpression )
              // InternalSARL.g:11362:5: lv_if_2_0= ruleXExpression
              {
              if ( state.backtracking==0 ) {
  
                					newCompositeNode(grammarAccess.getRichStringIfAccess().getIfXExpressionParserRuleCall_2_0());
                				
              }
              pushFollow(FOLLOW_104);
              lv_if_2_0=ruleXExpression();
  
              state._fsp--;
              if (state.failed) return current;
              if ( state.backtracking==0 ) {
  
                					if (current==null) {
                						current = createModelElementForParent(grammarAccess.getRichStringIfRule());
                					}
                					set(
                						current,
                						"if",
                						lv_if_2_0,
                						"org.eclipse.xtext.xbase.Xbase.XExpression");
                					afterParserOrEnumRuleCall();
                				
              }
  
              }
  
  
              }
  
              // InternalSARL.g:11379:3: ( (lv_then_3_0= ruleInternalRichString ) )
              // InternalSARL.g:11380:4: (lv_then_3_0= ruleInternalRichString )
              {
              // InternalSARL.g:11380:4: (lv_then_3_0= ruleInternalRichString )
              // InternalSARL.g:11381:5: lv_then_3_0= ruleInternalRichString
              {
              if ( state.backtracking==0 ) {
  
                					newCompositeNode(grammarAccess.getRichStringIfAccess().getThenInternalRichStringParserRuleCall_3_0());
                				
              }
              pushFollow(FOLLOW_106);
              lv_then_3_0=ruleInternalRichString();
  
              state._fsp--;
              if (state.failed) return current;
              if ( state.backtracking==0 ) {
  
                					if (current==null) {
                						current = createModelElementForParent(grammarAccess.getRichStringIfRule());
                					}
                					set(
                						current,
                						"then",
                						lv_then_3_0,
                						"org.eclipse.xtend.core.Xtend.InternalRichString");
                					afterParserOrEnumRuleCall();
                				
              }
  
              }
  
  
              }
  
              // InternalSARL.g:11398:3: ( (lv_elseIfs_4_0= ruleRichStringElseIf ) )*
              loop284:
              do {
                  int alt284=2;
                  int LA284_0 = input.LA(1);
  
                  if ( (LA284_0==104) ) {
                      alt284=1;
                  }
  
  
                  switch (alt284) {
              	case 1 :
              	    // InternalSARL.g:11399:4: (lv_elseIfs_4_0= ruleRichStringElseIf )
              	    {
              	    // InternalSARL.g:11399:4: (lv_elseIfs_4_0= ruleRichStringElseIf )
              	    // InternalSARL.g:11400:5: lv_elseIfs_4_0= ruleRichStringElseIf
              	    {
              	    if ( state.backtracking==0 ) {
  
              	      					newCompositeNode(grammarAccess.getRichStringIfAccess().getElseIfsRichStringElseIfParserRuleCall_4_0());
              	      				
              	    }
              	    pushFollow(FOLLOW_106);
              	    lv_elseIfs_4_0=ruleRichStringElseIf();
  
              	    state._fsp--;
              	    if (state.failed) return current;
              	    if ( state.backtracking==0 ) {
  
              	      					if (current==null) {
              	      						current = createModelElementForParent(grammarAccess.getRichStringIfRule());
              	      					}
              	      					add(
              	      						current,
              	      						"elseIfs",
              	      						lv_elseIfs_4_0,
              	      						"org.eclipse.xtend.core.Xtend.RichStringElseIf");
              	      					afterParserOrEnumRuleCall();
              	      				
              	    }
  
              	    }
  
  
              	    }
              	    break;
  
              	default :
              	    break loop284;
                  }
              } while (true);
  
              // InternalSARL.g:11417:3: (otherlv_5= 'ELSE' ( (lv_else_6_0= ruleInternalRichString ) ) )?
              int alt285=2;
              int LA285_0 = input.LA(1);
  
              if ( (LA285_0==102) ) {
                  alt285=1;
              }
              switch (alt285) {
                  case 1 :
                      // InternalSARL.g:11418:4: otherlv_5= 'ELSE' ( (lv_else_6_0= ruleInternalRichString ) )
                      {
                      otherlv_5=(Token)match(input,102,FOLLOW_104); if (state.failed) return current;
                      if ( state.backtracking==0 ) {
  
                        				newLeafNode(otherlv_5, grammarAccess.getRichStringIfAccess().getELSEKeyword_5_0());
                        			
                      }
                      // InternalSARL.g:11422:4: ( (lv_else_6_0= ruleInternalRichString ) )
                      // InternalSARL.g:11423:5: (lv_else_6_0= ruleInternalRichString )
                      {
                      // InternalSARL.g:11423:5: (lv_else_6_0= ruleInternalRichString )
                      // InternalSARL.g:11424:6: lv_else_6_0= ruleInternalRichString
                      {
                      if ( state.backtracking==0 ) {
  
                        						newCompositeNode(grammarAccess.getRichStringIfAccess().getElseInternalRichStringParserRuleCall_5_1_0());
                        					
                      }
                      pushFollow(FOLLOW_107);
                      lv_else_6_0=ruleInternalRichString();
  
                      state._fsp--;
                      if (state.failed) return current;
                      if ( state.backtracking==0 ) {
  
                        						if (current==null) {
                        							current = createModelElementForParent(grammarAccess.getRichStringIfRule());
                        						}
                        						set(
                        							current,
                        							"else",
                        							lv_else_6_0,
                        							"org.eclipse.xtend.core.Xtend.InternalRichString");
                        						afterParserOrEnumRuleCall();
                        					
                      }
  
                      }
  
  
                      }
  
  
                      }
                      break;
  
              }
  
              otherlv_7=(Token)match(input,103,FOLLOW_2); if (state.failed) return current;
              if ( state.backtracking==0 ) {
  
                			newLeafNode(otherlv_7, grammarAccess.getRichStringIfAccess().getENDIFKeyword_6());
                		
              }
  
              }
  
  
              }
  
              if ( state.backtracking==0 ) {
  
                	leaveRule();
  
              }
          }
  
              catch (RecognitionException re) {
                  recover(input,re);
                  appendSkippedTokens();
              }
          finally {
          }
          return current;
      }