public final EObject ruleXFunctionTypeRef() throws RecognitionException {
        EObject current = null;

        Token otherlv_0=null;
        Token otherlv_2=null;
        Token otherlv_4=null;
        Token otherlv_5=null;
        EObject lv_paramTypes_1_0 = null;

        EObject lv_paramTypes_3_0 = null;

        EObject lv_returnType_6_0 = null;



        	enterRule();

        try {
            // InternalSARL.g:15972:2: ( ( (otherlv_0= '(' ( ( (lv_paramTypes_1_0= ruleJvmTypeReference ) ) (otherlv_2= ',' ( (lv_paramTypes_3_0= ruleJvmTypeReference ) ) )* )? otherlv_4= ')' )? otherlv_5= '=>' ( (lv_returnType_6_0= ruleJvmTypeReference ) ) ) )
            // InternalSARL.g:15973:2: ( (otherlv_0= '(' ( ( (lv_paramTypes_1_0= ruleJvmTypeReference ) ) (otherlv_2= ',' ( (lv_paramTypes_3_0= ruleJvmTypeReference ) ) )* )? otherlv_4= ')' )? otherlv_5= '=>' ( (lv_returnType_6_0= ruleJvmTypeReference ) ) )
            {
            // InternalSARL.g:15973:2: ( (otherlv_0= '(' ( ( (lv_paramTypes_1_0= ruleJvmTypeReference ) ) (otherlv_2= ',' ( (lv_paramTypes_3_0= ruleJvmTypeReference ) ) )* )? otherlv_4= ')' )? otherlv_5= '=>' ( (lv_returnType_6_0= ruleJvmTypeReference ) ) )
            // InternalSARL.g:15974:3: (otherlv_0= '(' ( ( (lv_paramTypes_1_0= ruleJvmTypeReference ) ) (otherlv_2= ',' ( (lv_paramTypes_3_0= ruleJvmTypeReference ) ) )* )? otherlv_4= ')' )? otherlv_5= '=>' ( (lv_returnType_6_0= ruleJvmTypeReference ) )
            {
            // InternalSARL.g:15974:3: (otherlv_0= '(' ( ( (lv_paramTypes_1_0= ruleJvmTypeReference ) ) (otherlv_2= ',' ( (lv_paramTypes_3_0= ruleJvmTypeReference ) ) )* )? otherlv_4= ')' )?
            int alt369=2;
            int LA369_0 = input.LA(1);

            if ( (LA369_0==49) ) {
                alt369=1;
            }
            switch (alt369) {
                case 1 :
                    // InternalSARL.g:15975:4: otherlv_0= '(' ( ( (lv_paramTypes_1_0= ruleJvmTypeReference ) ) (otherlv_2= ',' ( (lv_paramTypes_3_0= ruleJvmTypeReference ) ) )* )? otherlv_4= ')'
                    {
                    otherlv_0=(Token)match(input,49,FOLLOW_87); if (state.failed) return current;
                    if ( state.backtracking==0 ) {

                      				newLeafNode(otherlv_0, grammarAccess.getXFunctionTypeRefAccess().getLeftParenthesisKeyword_0_0());
                      			
                    }
                    // InternalSARL.g:15979:4: ( ( (lv_paramTypes_1_0= ruleJvmTypeReference ) ) (otherlv_2= ',' ( (lv_paramTypes_3_0= ruleJvmTypeReference ) ) )* )?
                    int alt368=2;
                    int LA368_0 = input.LA(1);

                    if ( (LA368_0==RULE_ID||LA368_0==44||LA368_0==49||LA368_0==76||(LA368_0>=92 && LA368_0<=95)) ) {
                        alt368=1;
                    }
                    switch (alt368) {
                        case 1 :
                            // InternalSARL.g:15980:5: ( (lv_paramTypes_1_0= ruleJvmTypeReference ) ) (otherlv_2= ',' ( (lv_paramTypes_3_0= ruleJvmTypeReference ) ) )*
                            {
                            // InternalSARL.g:15980:5: ( (lv_paramTypes_1_0= ruleJvmTypeReference ) )
                            // InternalSARL.g:15981:6: (lv_paramTypes_1_0= ruleJvmTypeReference )
                            {
                            // InternalSARL.g:15981:6: (lv_paramTypes_1_0= ruleJvmTypeReference )
                            // InternalSARL.g:15982:7: lv_paramTypes_1_0= ruleJvmTypeReference
                            {
                            if ( state.backtracking==0 ) {

                              							newCompositeNode(grammarAccess.getXFunctionTypeRefAccess().getParamTypesJvmTypeReferenceParserRuleCall_0_1_0_0());
                              						
                            }
                            pushFollow(FOLLOW_51);
                            lv_paramTypes_1_0=ruleJvmTypeReference();

                            state._fsp--;
                            if (state.failed) return current;
                            if ( state.backtracking==0 ) {

                              							if (current==null) {
                              								current = createModelElementForParent(grammarAccess.getXFunctionTypeRefRule());
                              							}
                              							add(
                              								current,
                              								"paramTypes",
                              								lv_paramTypes_1_0,
                              								"org.eclipse.xtext.xbase.Xtype.JvmTypeReference");
                              							afterParserOrEnumRuleCall();
                              						
                            }

                            }


                            }

                            // InternalSARL.g:15999:5: (otherlv_2= ',' ( (lv_paramTypes_3_0= ruleJvmTypeReference ) ) )*
                            loop367:
                            do {
                                int alt367=2;
                                int LA367_0 = input.LA(1);

                                if ( (LA367_0==32) ) {
                                    alt367=1;
                                }


                                switch (alt367) {
                            	case 1 :
                            	    // InternalSARL.g:16000:6: otherlv_2= ',' ( (lv_paramTypes_3_0= ruleJvmTypeReference ) )
                            	    {
                            	    otherlv_2=(Token)match(input,32,FOLLOW_41); if (state.failed) return current;
                            	    if ( state.backtracking==0 ) {

                            	      						newLeafNode(otherlv_2, grammarAccess.getXFunctionTypeRefAccess().getCommaKeyword_0_1_1_0());
                            	      					
                            	    }
                            	    // InternalSARL.g:16004:6: ( (lv_paramTypes_3_0= ruleJvmTypeReference ) )
                            	    // InternalSARL.g:16005:7: (lv_paramTypes_3_0= ruleJvmTypeReference )
                            	    {
                            	    // InternalSARL.g:16005:7: (lv_paramTypes_3_0= ruleJvmTypeReference )
                            	    // InternalSARL.g:16006:8: lv_paramTypes_3_0= ruleJvmTypeReference
                            	    {
                            	    if ( state.backtracking==0 ) {

                            	      								newCompositeNode(grammarAccess.getXFunctionTypeRefAccess().getParamTypesJvmTypeReferenceParserRuleCall_0_1_1_1_0());
                            	      							
                            	    }
                            	    pushFollow(FOLLOW_51);
                            	    lv_paramTypes_3_0=ruleJvmTypeReference();

                            	    state._fsp--;
                            	    if (state.failed) return current;
                            	    if ( state.backtracking==0 ) {

                            	      								if (current==null) {
                            	      									current = createModelElementForParent(grammarAccess.getXFunctionTypeRefRule());
                            	      								}
                            	      								add(
                            	      									current,
                            	      									"paramTypes",
                            	      									lv_paramTypes_3_0,
                            	      									"org.eclipse.xtext.xbase.Xtype.JvmTypeReference");
                            	      								afterParserOrEnumRuleCall();
                            	      							
                            	    }

                            	    }


                            	    }


                            	    }
                            	    break;

                            	default :
                            	    break loop367;
                                }
                            } while (true);


                            }
                            break;

                    }

                    otherlv_4=(Token)match(input,50,FOLLOW_88); if (state.failed) return current;
                    if ( state.backtracking==0 ) {

                      				newLeafNode(otherlv_4, grammarAccess.getXFunctionTypeRefAccess().getRightParenthesisKeyword_0_2());
                      			
                    }

                    }
                    break;

            }

            otherlv_5=(Token)match(input,76,FOLLOW_41); if (state.failed) return current;
            if ( state.backtracking==0 ) {

              			newLeafNode(otherlv_5, grammarAccess.getXFunctionTypeRefAccess().getEqualsSignGreaterThanSignKeyword_1());
              		
            }
            // InternalSARL.g:16034:3: ( (lv_returnType_6_0= ruleJvmTypeReference ) )
            // InternalSARL.g:16035:4: (lv_returnType_6_0= ruleJvmTypeReference )
            {
            // InternalSARL.g:16035:4: (lv_returnType_6_0= ruleJvmTypeReference )
            // InternalSARL.g:16036:5: lv_returnType_6_0= ruleJvmTypeReference
            {
            if ( state.backtracking==0 ) {

              					newCompositeNode(grammarAccess.getXFunctionTypeRefAccess().getReturnTypeJvmTypeReferenceParserRuleCall_2_0());
              				
            }
            pushFollow(FOLLOW_2);
            lv_returnType_6_0=ruleJvmTypeReference();

            state._fsp--;
            if (state.failed) return current;
            if ( state.backtracking==0 ) {

              					if (current==null) {
              						current = createModelElementForParent(grammarAccess.getXFunctionTypeRefRule());
              					}
              					set(
              						current,
              						"returnType",
              						lv_returnType_6_0,
              						"org.eclipse.xtext.xbase.Xtype.JvmTypeReference");
              					afterParserOrEnumRuleCall();
              				
            }

            }


            }


            }


            }

            if ( state.backtracking==0 ) {

              	leaveRule();

            }
        }

            catch (RecognitionException re) {
                recover(input,re);
                appendSkippedTokens();
            }
        finally {
        }
        return current;
    }
public final EObject ruleXFunctionTypeRef ( ) throws RecognitionException { EObject current = null ; Token otherlv_0 = null ; Token otherlv_2 = null ; Token otherlv_4 = null ; Token otherlv_5 = null ; EObject lv_paramTypes_1_0 = null ; EObject lv_paramTypes_3_0 = null ; EObject lv_returnType_6_0 = null ; enterRule ( ) ; try { { { int alt369 = 2 ; int LA369_0 = input . LA ( 1 ) ; if ( ( LA369_0 == 49 ) ) { alt369 = 1 ; } switch ( alt369 ) { case 1 : { otherlv_0 = ( Token ) match ( input , 49 , FOLLOW_87 ) ; if ( state . failed ) return current ; if ( state . backtracking == 0 ) { newLeafNode ( otherlv_0 , grammarAccess . getXFunctionTypeRefAccess ( ) . getLeftParenthesisKeyword_0_0 ( ) ) ; } int alt368 = 2 ; int LA368_0 = input . LA ( 1 ) ; if ( ( LA368_0 == RULE_ID || LA368_0 == 44 || LA368_0 == 49 || LA368_0 == 76 || ( LA368_0 >= 92 && LA368_0 <= 95 ) ) ) { alt368 = 1 ; } switch ( alt368 ) { case 1 : { { { if ( state . backtracking == 0 ) { newCompositeNode ( grammarAccess . getXFunctionTypeRefAccess ( ) . getParamTypesJvmTypeReferenceParserRuleCall_0_1_0_0 ( ) ) ; } pushFollow ( FOLLOW_51 ) ; lv_paramTypes_1_0 = ruleJvmTypeReference ( ) ; state . _fsp -- ; if ( state . failed ) return current ; if ( state . backtracking == 0 ) { if ( current == null ) { current = createModelElementForParent ( grammarAccess . getXFunctionTypeRefRule ( ) ) ; } add ( current , "paramTypes" , lv_paramTypes_1_0 , "org.eclipse.xtext.xbase.Xtype.JvmTypeReference" ) ; afterParserOrEnumRuleCall ( ) ; } } } loop367 : do { int alt367 = 2 ; int LA367_0 = input . LA ( 1 ) ; if ( ( LA367_0 == 32 ) ) { alt367 = 1 ; } switch ( alt367 ) { case 1 : { otherlv_2 = ( Token ) match ( input , 32 , FOLLOW_41 ) ; if ( state . failed ) return current ; if ( state . backtracking == 0 ) { newLeafNode ( otherlv_2 , grammarAccess . getXFunctionTypeRefAccess ( ) . getCommaKeyword_0_1_1_0 ( ) ) ; } { { if ( state . backtracking == 0 ) { newCompositeNode ( grammarAccess . getXFunctionTypeRefAccess ( ) . getParamTypesJvmTypeReferenceParserRuleCall_0_1_1_1_0 ( ) ) ; } pushFollow ( FOLLOW_51 ) ; lv_paramTypes_3_0 = ruleJvmTypeReference ( ) ; state . _fsp -- ; if ( state . failed ) return current ; if ( state . backtracking == 0 ) { if ( current == null ) { current = createModelElementForParent ( grammarAccess . getXFunctionTypeRefRule ( ) ) ; } add ( current , "paramTypes" , lv_paramTypes_3_0 , "org.eclipse.xtext.xbase.Xtype.JvmTypeReference" ) ; afterParserOrEnumRuleCall ( ) ; } } } } break ; default : break loop367 ; } } while ( true ) ; } break ; } otherlv_4 = ( Token ) match ( input , 50 , FOLLOW_88 ) ; if ( state . failed ) return current ; if ( state . backtracking == 0 ) { newLeafNode ( otherlv_4 , grammarAccess . getXFunctionTypeRefAccess ( ) . getRightParenthesisKeyword_0_2 ( ) ) ; } } break ; } otherlv_5 = ( Token ) match ( input , 76 , FOLLOW_41 ) ; if ( state . failed ) return current ; if ( state . backtracking == 0 ) { newLeafNode ( otherlv_5 , grammarAccess . getXFunctionTypeRefAccess ( ) . getEqualsSignGreaterThanSignKeyword_1 ( ) ) ; } { { if ( state . backtracking == 0 ) { newCompositeNode ( grammarAccess . getXFunctionTypeRefAccess ( ) . getReturnTypeJvmTypeReferenceParserRuleCall_2_0 ( ) ) ; } pushFollow ( FOLLOW_2 ) ; lv_returnType_6_0 = ruleJvmTypeReference ( ) ; state . _fsp -- ; if ( state . failed ) return current ; if ( state . backtracking == 0 ) { if ( current == null ) { current = createModelElementForParent ( grammarAccess . getXFunctionTypeRefRule ( ) ) ; } set ( current , "returnType" , lv_returnType_6_0 , "org.eclipse.xtext.xbase.Xtype.JvmTypeReference" ) ; afterParserOrEnumRuleCall ( ) ; } } } } } if ( state . backtracking == 0 ) { leaveRule ( ) ; } } catch ( RecognitionException re ) { recover ( input , re ) ; appendSkippedTokens ( ) ; } finally { } return current ; }
InternalSARL.g:15966:1: ruleXFunctionTypeRef returns [EObject current=null] : ( (otherlv_0= '(' ( ( (lv_paramTypes_1_0= ruleJvmTypeReference ) ) (otherlv_2= ',' ( (lv_paramTypes_3_0= ruleJvmTypeReference ) ) )* )? otherlv_4= ')' )? otherlv_5= '=>' ( (lv_returnType_6_0= ruleJvmTypeReference ) ) ) ;