// $ANTLR start "entryRuleLookAhead3"
  // ../org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/internal/InternalLookaheadTestLanguage.g:325:1: entryRuleLookAhead3 returns [EObject current=null] : iv_ruleLookAhead3= ruleLookAhead3 EOF ;
  public final EObject entryRuleLookAhead3() throws RecognitionException {
    EObject current = null;

    EObject iv_ruleLookAhead3 = null;

    try {
      // ../org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/internal/InternalLookaheadTestLanguage.g:326:2: (iv_ruleLookAhead3= ruleLookAhead3 EOF )
      // ../org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/internal/InternalLookaheadTestLanguage.g:327:2: iv_ruleLookAhead3= ruleLookAhead3 EOF
      {
        newCompositeNode(grammarAccess.getLookAhead3Rule());
        pushFollow(FollowSets000.FOLLOW_ruleLookAhead3_in_entryRuleLookAhead3745);
        iv_ruleLookAhead3 = ruleLookAhead3();

        state._fsp--;

        current = iv_ruleLookAhead3;
        match(input, EOF, FollowSets000.FOLLOW_EOF_in_entryRuleLookAhead3755);
      }

    } catch (RecognitionException re) {
      recover(input, re);
      appendSkippedTokens();
    } finally {
    }
    return current;
  }
 public void createSequence(EObject context, EObject semanticObject) {
   if (semanticObject.eClass().getEPackage() == LookaheadLangPackage.eINSTANCE)
     switch (semanticObject.eClass().getClassifierID()) {
       case LookaheadLangPackage.ENTRY:
         if (context == grammarAccess.getEntryRule()) {
           sequence_Entry(context, (Entry) semanticObject);
           return;
         } else break;
       case LookaheadLangPackage.LOOK_AHEAD0:
         if (context == grammarAccess.getAltsRule()
             || context == grammarAccess.getLookAhead0Rule()) {
           sequence_LookAhead0(context, (LookAhead0) semanticObject);
           return;
         } else break;
       case LookaheadLangPackage.LOOK_AHEAD1:
         if (context == grammarAccess.getAltsRule()
             || context == grammarAccess.getLookAhead1Rule()) {
           sequence_LookAhead1(context, (LookAhead1) semanticObject);
           return;
         } else break;
       case LookaheadLangPackage.LOOK_AHEAD2:
         if (context == grammarAccess.getLookAhead2Rule()) {
           sequence_LookAhead2(context, (LookAhead2) semanticObject);
           return;
         } else break;
       case LookaheadLangPackage.LOOK_AHEAD3:
         if (context == grammarAccess.getAltsRule()
             || context == grammarAccess.getLookAhead3Rule()) {
           sequence_LookAhead3(context, (LookAhead3) semanticObject);
           return;
         } else break;
       case LookaheadLangPackage.LOOK_AHEAD4:
         if (context == grammarAccess.getLookAhead4Rule()) {
           sequence_LookAhead4(context, (LookAhead4) semanticObject);
           return;
         } else break;
     }
   if (errorAcceptor != null)
     errorAcceptor.accept(
         diagnosticProvider.createInvalidContextOrTypeDiagnostic(semanticObject, context));
 }
  // $ANTLR start "ruleLookAhead3"
  // ../org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/internal/InternalLookaheadTestLanguage.g:334:1: ruleLookAhead3 returns [EObject current=null] : (otherlv_0= 'foo' otherlv_1= 'bar' ( (lv_x_2_0= 'b' ) ) ( (lv_z_3_0= ruleLookAhead4 ) ) ) ;
  public final EObject ruleLookAhead3() throws RecognitionException {
    EObject current = null;

    Token otherlv_0 = null;
    Token otherlv_1 = null;
    Token lv_x_2_0 = null;
    EObject lv_z_3_0 = null;

    enterRule();

    try {
      // ../org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/internal/InternalLookaheadTestLanguage.g:337:28: ( (otherlv_0= 'foo' otherlv_1= 'bar' ( (lv_x_2_0= 'b' ) ) ( (lv_z_3_0= ruleLookAhead4 ) ) ) )
      // ../org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/internal/InternalLookaheadTestLanguage.g:338:1: (otherlv_0= 'foo' otherlv_1= 'bar' ( (lv_x_2_0= 'b' ) ) ( (lv_z_3_0= ruleLookAhead4 ) ) )
      {
        // ../org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/internal/InternalLookaheadTestLanguage.g:338:1: (otherlv_0= 'foo' otherlv_1= 'bar' ( (lv_x_2_0= 'b' ) ) ( (lv_z_3_0= ruleLookAhead4 ) ) )
        // ../org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/internal/InternalLookaheadTestLanguage.g:338:3: otherlv_0= 'foo' otherlv_1= 'bar' ( (lv_x_2_0= 'b' ) ) ( (lv_z_3_0= ruleLookAhead4 ) )
        {
          otherlv_0 = (Token) match(input, 13, FollowSets000.FOLLOW_13_in_ruleLookAhead3792);

          newLeafNode(otherlv_0, grammarAccess.getLookAhead3Access().getFooKeyword_0());

          otherlv_1 = (Token) match(input, 11, FollowSets000.FOLLOW_11_in_ruleLookAhead3804);

          newLeafNode(otherlv_1, grammarAccess.getLookAhead3Access().getBarKeyword_1());

          // ../org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/internal/InternalLookaheadTestLanguage.g:346:1: ( (lv_x_2_0= 'b' ) )
          // ../org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/internal/InternalLookaheadTestLanguage.g:347:1: (lv_x_2_0= 'b' )
          {
            // ../org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/internal/InternalLookaheadTestLanguage.g:347:1: (lv_x_2_0= 'b' )
            // ../org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/internal/InternalLookaheadTestLanguage.g:348:3: lv_x_2_0= 'b'
            {
              lv_x_2_0 = (Token) match(input, 14, FollowSets000.FOLLOW_14_in_ruleLookAhead3822);

              newLeafNode(lv_x_2_0, grammarAccess.getLookAhead3Access().getXBKeyword_2_0());

              if (current == null) {
                current = createModelElement(grammarAccess.getLookAhead3Rule());
              }
              setWithLastConsumed(current, "x", lv_x_2_0, "b");
            }
          }

          // ../org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/internal/InternalLookaheadTestLanguage.g:361:2: ( (lv_z_3_0= ruleLookAhead4 ) )
          // ../org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/internal/InternalLookaheadTestLanguage.g:362:1: (lv_z_3_0= ruleLookAhead4 )
          {
            // ../org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/internal/InternalLookaheadTestLanguage.g:362:1: (lv_z_3_0= ruleLookAhead4 )
            // ../org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/internal/InternalLookaheadTestLanguage.g:363:3: lv_z_3_0= ruleLookAhead4
            {
              newCompositeNode(
                  grammarAccess.getLookAhead3Access().getZLookAhead4ParserRuleCall_3_0());

              pushFollow(FollowSets000.FOLLOW_ruleLookAhead4_in_ruleLookAhead3856);
              lv_z_3_0 = ruleLookAhead4();

              state._fsp--;

              if (current == null) {
                current = createModelElementForParent(grammarAccess.getLookAhead3Rule());
              }
              set(current, "z", lv_z_3_0, "LookAhead4");
              afterParserOrEnumRuleCall();
            }
          }
        }
      }

      leaveRule();
    } catch (RecognitionException re) {
      recover(input, re);
      appendSkippedTokens();
    } finally {
    }
    return current;
  }