/** Constraint: (y=LookAhead2 x='b' z='d') */
 protected void sequence_LookAhead1(EObject context, LookAhead1 semanticObject) {
   if (errorAcceptor != null) {
     if (transientValues.isValueTransient(semanticObject, LookaheadLangPackage.Literals.ALTS__X)
         == ValueTransient.YES)
       errorAcceptor.accept(
           diagnosticProvider.createFeatureValueMissing(
               semanticObject, LookaheadLangPackage.Literals.ALTS__X));
     if (transientValues.isValueTransient(
             semanticObject, LookaheadLangPackage.Literals.LOOK_AHEAD1__Y)
         == ValueTransient.YES)
       errorAcceptor.accept(
           diagnosticProvider.createFeatureValueMissing(
               semanticObject, LookaheadLangPackage.Literals.LOOK_AHEAD1__Y));
     if (transientValues.isValueTransient(
             semanticObject, LookaheadLangPackage.Literals.LOOK_AHEAD1__Z)
         == ValueTransient.YES)
       errorAcceptor.accept(
           diagnosticProvider.createFeatureValueMissing(
               semanticObject, LookaheadLangPackage.Literals.LOOK_AHEAD1__Z));
   }
   INodesForEObjectProvider nodes = createNodeProvider(semanticObject);
   SequenceFeeder feeder = createSequencerFeeder(semanticObject, nodes);
   feeder.accept(
       grammarAccess.getLookAhead1Access().getYLookAhead2ParserRuleCall_1_0(),
       semanticObject.getY());
   feeder.accept(grammarAccess.getLookAhead1Access().getXBKeyword_2_0(), semanticObject.getX());
   feeder.accept(grammarAccess.getLookAhead1Access().getZDKeyword_3_0(), semanticObject.getZ());
   feeder.finish();
 }
  // $ANTLR start "ruleEntry"
  // ../org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/internal/InternalLookaheadTestLanguage.g:76:1: ruleEntry returns [EObject current=null] : ( (lv_contents_0_0= ruleAlts ) )* ;
  public final EObject ruleEntry() throws RecognitionException {
    EObject current = null;

    EObject lv_contents_0_0 = null;

    enterRule();

    try {
      // ../org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/internal/InternalLookaheadTestLanguage.g:79:28: ( ( (lv_contents_0_0= ruleAlts ) )* )
      // ../org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/internal/InternalLookaheadTestLanguage.g:80:1: ( (lv_contents_0_0= ruleAlts ) )*
      {
        // ../org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/internal/InternalLookaheadTestLanguage.g:80:1: ( (lv_contents_0_0= ruleAlts ) )*
        loop1:
        do {
          int alt1 = 2;
          int LA1_0 = input.LA(1);

          if ((LA1_0 == 11 || LA1_0 == 13)) {
            alt1 = 1;
          }

          switch (alt1) {
            case 1:
              // ../org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/internal/InternalLookaheadTestLanguage.g:81:1: (lv_contents_0_0= ruleAlts )
              {
                // ../org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/internal/InternalLookaheadTestLanguage.g:81:1: (lv_contents_0_0= ruleAlts )
                // ../org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/internal/InternalLookaheadTestLanguage.g:82:3: lv_contents_0_0= ruleAlts
                {
                  newCompositeNode(
                      grammarAccess.getEntryAccess().getContentsAltsParserRuleCall_0());

                  pushFollow(FollowSets000.FOLLOW_ruleAlts_in_ruleEntry130);
                  lv_contents_0_0 = ruleAlts();

                  state._fsp--;

                  if (current == null) {
                    current = createModelElementForParent(grammarAccess.getEntryRule());
                  }
                  add(current, "contents", lv_contents_0_0, "Alts");
                  afterParserOrEnumRuleCall();
                }
              }
              break;

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

      leaveRule();
    } catch (RecognitionException re) {
      recover(input, re);
      appendSkippedTokens();
    } finally {
    }
    return current;
  }
  // $ANTLR start "entryRuleEntry"
  // ../org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/internal/InternalLookaheadTestLanguage.g:67:1: entryRuleEntry returns [EObject current=null] : iv_ruleEntry= ruleEntry EOF ;
  public final EObject entryRuleEntry() throws RecognitionException {
    EObject current = null;

    EObject iv_ruleEntry = null;

    try {
      // ../org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/internal/InternalLookaheadTestLanguage.g:68:2: (iv_ruleEntry= ruleEntry EOF )
      // ../org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/internal/InternalLookaheadTestLanguage.g:69:2: iv_ruleEntry= ruleEntry EOF
      {
        newCompositeNode(grammarAccess.getEntryRule());
        pushFollow(FollowSets000.FOLLOW_ruleEntry_in_entryRuleEntry75);
        iv_ruleEntry = ruleEntry();

        state._fsp--;

        current = iv_ruleEntry;
        match(input, EOF, FollowSets000.FOLLOW_EOF_in_entryRuleEntry85);
      }

    } catch (RecognitionException re) {
      recover(input, re);
      appendSkippedTokens();
    } finally {
    }
    return current;
  }
  // $ANTLR start "ruleLookAhead0"
  // ../org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/internal/InternalLookaheadTestLanguage.g:165:1: ruleLookAhead0 returns [EObject current=null] : (otherlv_0= 'bar' ( (lv_x_1_0= 'a' ) ) ) ;
  public final EObject ruleLookAhead0() throws RecognitionException {
    EObject current = null;

    Token otherlv_0 = null;
    Token lv_x_1_0 = null;

    enterRule();

    try {
      // ../org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/internal/InternalLookaheadTestLanguage.g:168:28: ( (otherlv_0= 'bar' ( (lv_x_1_0= 'a' ) ) ) )
      // ../org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/internal/InternalLookaheadTestLanguage.g:169:1: (otherlv_0= 'bar' ( (lv_x_1_0= 'a' ) ) )
      {
        // ../org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/internal/InternalLookaheadTestLanguage.g:169:1: (otherlv_0= 'bar' ( (lv_x_1_0= 'a' ) ) )
        // ../org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/internal/InternalLookaheadTestLanguage.g:169:3: otherlv_0= 'bar' ( (lv_x_1_0= 'a' ) )
        {
          otherlv_0 = (Token) match(input, 11, FollowSets000.FOLLOW_11_in_ruleLookAhead0359);

          newLeafNode(otherlv_0, grammarAccess.getLookAhead0Access().getBarKeyword_0());

          // ../org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/internal/InternalLookaheadTestLanguage.g:173:1: ( (lv_x_1_0= 'a' ) )
          // ../org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/internal/InternalLookaheadTestLanguage.g:174:1: (lv_x_1_0= 'a' )
          {
            // ../org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/internal/InternalLookaheadTestLanguage.g:174:1: (lv_x_1_0= 'a' )
            // ../org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/internal/InternalLookaheadTestLanguage.g:175:3: lv_x_1_0= 'a'
            {
              lv_x_1_0 = (Token) match(input, 12, FollowSets000.FOLLOW_12_in_ruleLookAhead0377);

              newLeafNode(lv_x_1_0, grammarAccess.getLookAhead0Access().getXAKeyword_1_0());

              if (current == null) {
                current = createModelElement(grammarAccess.getLookAhead0Rule());
              }
              setWithLastConsumed(current, "x", lv_x_1_0, "a");
            }
          }
        }
      }

      leaveRule();
    } catch (RecognitionException re) {
      recover(input, re);
      appendSkippedTokens();
    } finally {
    }
    return current;
  }
 /** Constraint: x='a' */
 protected void sequence_LookAhead0(EObject context, LookAhead0 semanticObject) {
   if (errorAcceptor != null) {
     if (transientValues.isValueTransient(semanticObject, LookaheadLangPackage.Literals.ALTS__X)
         == ValueTransient.YES)
       errorAcceptor.accept(
           diagnosticProvider.createFeatureValueMissing(
               semanticObject, LookaheadLangPackage.Literals.ALTS__X));
   }
   INodesForEObjectProvider nodes = createNodeProvider(semanticObject);
   SequenceFeeder feeder = createSequencerFeeder(semanticObject, nodes);
   feeder.accept(grammarAccess.getLookAhead0Access().getXAKeyword_1_0(), semanticObject.getX());
   feeder.finish();
 }
 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 "ruleLookAhead4"
  // ../org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/internal/InternalLookaheadTestLanguage.g:396:1: ruleLookAhead4 returns [EObject current=null] : ( ( (lv_x_0_0= 'c' ) ) | ( (lv_x_1_0= 'd' ) ) ) ;
  public final EObject ruleLookAhead4() throws RecognitionException {
    EObject current = null;

    Token lv_x_0_0 = null;
    Token lv_x_1_0 = null;

    enterRule();

    try {
      // ../org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/internal/InternalLookaheadTestLanguage.g:399:28: ( ( ( (lv_x_0_0= 'c' ) ) | ( (lv_x_1_0= 'd' ) ) ) )
      // ../org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/internal/InternalLookaheadTestLanguage.g:400:1: ( ( (lv_x_0_0= 'c' ) ) | ( (lv_x_1_0= 'd' ) ) )
      {
        // ../org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/internal/InternalLookaheadTestLanguage.g:400:1: ( ( (lv_x_0_0= 'c' ) ) | ( (lv_x_1_0= 'd' ) ) )
        int alt4 = 2;
        int LA4_0 = input.LA(1);

        if ((LA4_0 == 16)) {
          alt4 = 1;
        } else if ((LA4_0 == 15)) {
          alt4 = 2;
        } else {
          NoViableAltException nvae = new NoViableAltException("", 4, 0, input);

          throw nvae;
        }
        switch (alt4) {
          case 1:
            // ../org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/internal/InternalLookaheadTestLanguage.g:400:2: ( (lv_x_0_0= 'c' ) )
            {
              // ../org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/internal/InternalLookaheadTestLanguage.g:400:2: ( (lv_x_0_0= 'c' ) )
              // ../org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/internal/InternalLookaheadTestLanguage.g:401:1: (lv_x_0_0= 'c' )
              {
                // ../org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/internal/InternalLookaheadTestLanguage.g:401:1: (lv_x_0_0= 'c' )
                // ../org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/internal/InternalLookaheadTestLanguage.g:402:3: lv_x_0_0= 'c'
                {
                  lv_x_0_0 = (Token) match(input, 16, FollowSets000.FOLLOW_16_in_ruleLookAhead4945);

                  newLeafNode(lv_x_0_0, grammarAccess.getLookAhead4Access().getXCKeyword_0_0());

                  if (current == null) {
                    current = createModelElement(grammarAccess.getLookAhead4Rule());
                  }
                  setWithLastConsumed(current, "x", lv_x_0_0, "c");
                }
              }
            }
            break;
          case 2:
            // ../org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/internal/InternalLookaheadTestLanguage.g:416:6: ( (lv_x_1_0= 'd' ) )
            {
              // ../org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/internal/InternalLookaheadTestLanguage.g:416:6: ( (lv_x_1_0= 'd' ) )
              // ../org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/internal/InternalLookaheadTestLanguage.g:417:1: (lv_x_1_0= 'd' )
              {
                // ../org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/internal/InternalLookaheadTestLanguage.g:417:1: (lv_x_1_0= 'd' )
                // ../org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/internal/InternalLookaheadTestLanguage.g:418:3: lv_x_1_0= 'd'
                {
                  lv_x_1_0 = (Token) match(input, 15, FollowSets000.FOLLOW_15_in_ruleLookAhead4982);

                  newLeafNode(lv_x_1_0, grammarAccess.getLookAhead4Access().getXDKeyword_1_0());

                  if (current == null) {
                    current = createModelElement(grammarAccess.getLookAhead4Rule());
                  }
                  setWithLastConsumed(current, "x", lv_x_1_0, "d");
                }
              }
            }
            break;
        }
      }

      leaveRule();
    } catch (RecognitionException re) {
      recover(input, re);
      appendSkippedTokens();
    } finally {
    }
    return current;
  }
 public InternalLookaheadTestLanguageParser(
     TokenStream input, LookaheadTestLanguageGrammarAccess grammarAccess) {
   this(input);
   this.grammarAccess = grammarAccess;
   registerRules(grammarAccess.getGrammar());
 }
  // $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;
  }
  // $ANTLR start "ruleLookAhead2"
  // ../org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/internal/InternalLookaheadTestLanguage.g:278:1: ruleLookAhead2 returns [EObject current=null] : ( ( ( (lv_z_0_0= 'foo' ) ) | ( (lv_z_1_0= 'bar' ) ) ) otherlv_2= 'c' ) ;
  public final EObject ruleLookAhead2() throws RecognitionException {
    EObject current = null;

    Token lv_z_0_0 = null;
    Token lv_z_1_0 = null;
    Token otherlv_2 = null;

    enterRule();

    try {
      // ../org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/internal/InternalLookaheadTestLanguage.g:281:28: ( ( ( ( (lv_z_0_0= 'foo' ) ) | ( (lv_z_1_0= 'bar' ) ) ) otherlv_2= 'c' ) )
      // ../org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/internal/InternalLookaheadTestLanguage.g:282:1: ( ( ( (lv_z_0_0= 'foo' ) ) | ( (lv_z_1_0= 'bar' ) ) ) otherlv_2= 'c' )
      {
        // ../org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/internal/InternalLookaheadTestLanguage.g:282:1: ( ( ( (lv_z_0_0= 'foo' ) ) | ( (lv_z_1_0= 'bar' ) ) ) otherlv_2= 'c' )
        // ../org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/internal/InternalLookaheadTestLanguage.g:282:2: ( ( (lv_z_0_0= 'foo' ) ) | ( (lv_z_1_0= 'bar' ) ) ) otherlv_2= 'c'
        {
          // ../org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/internal/InternalLookaheadTestLanguage.g:282:2: ( ( (lv_z_0_0= 'foo' ) ) | ( (lv_z_1_0= 'bar' ) ) )
          int alt3 = 2;
          int LA3_0 = input.LA(1);

          if ((LA3_0 == 13)) {
            alt3 = 1;
          } else if ((LA3_0 == 11)) {
            alt3 = 2;
          } else {
            NoViableAltException nvae = new NoViableAltException("", 3, 0, input);

            throw nvae;
          }
          switch (alt3) {
            case 1:
              // ../org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/internal/InternalLookaheadTestLanguage.g:282:3: ( (lv_z_0_0= 'foo' ) )
              {
                // ../org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/internal/InternalLookaheadTestLanguage.g:282:3: ( (lv_z_0_0= 'foo' ) )
                // ../org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/internal/InternalLookaheadTestLanguage.g:283:1: (lv_z_0_0= 'foo' )
                {
                  // ../org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/internal/InternalLookaheadTestLanguage.g:283:1: (lv_z_0_0= 'foo' )
                  // ../org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/internal/InternalLookaheadTestLanguage.g:284:3: lv_z_0_0= 'foo'
                  {
                    lv_z_0_0 =
                        (Token) match(input, 13, FollowSets000.FOLLOW_13_in_ruleLookAhead2646);

                    newLeafNode(
                        lv_z_0_0, grammarAccess.getLookAhead2Access().getZFooKeyword_0_0_0());

                    if (current == null) {
                      current = createModelElement(grammarAccess.getLookAhead2Rule());
                    }
                    setWithLastConsumed(current, "z", lv_z_0_0, "foo");
                  }
                }
              }
              break;
            case 2:
              // ../org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/internal/InternalLookaheadTestLanguage.g:298:6: ( (lv_z_1_0= 'bar' ) )
              {
                // ../org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/internal/InternalLookaheadTestLanguage.g:298:6: ( (lv_z_1_0= 'bar' ) )
                // ../org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/internal/InternalLookaheadTestLanguage.g:299:1: (lv_z_1_0= 'bar' )
                {
                  // ../org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/internal/InternalLookaheadTestLanguage.g:299:1: (lv_z_1_0= 'bar' )
                  // ../org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/internal/InternalLookaheadTestLanguage.g:300:3: lv_z_1_0= 'bar'
                  {
                    lv_z_1_0 =
                        (Token) match(input, 11, FollowSets000.FOLLOW_11_in_ruleLookAhead2683);

                    newLeafNode(
                        lv_z_1_0, grammarAccess.getLookAhead2Access().getZBarKeyword_0_1_0());

                    if (current == null) {
                      current = createModelElement(grammarAccess.getLookAhead2Rule());
                    }
                    setWithLastConsumed(current, "z", lv_z_1_0, "bar");
                  }
                }
              }
              break;
          }

          otherlv_2 = (Token) match(input, 16, FollowSets000.FOLLOW_16_in_ruleLookAhead2709);

          newLeafNode(otherlv_2, grammarAccess.getLookAhead2Access().getCKeyword_1());
        }
      }

      leaveRule();
    } catch (RecognitionException re) {
      recover(input, re);
      appendSkippedTokens();
    } finally {
    }
    return current;
  }
  // $ANTLR start "ruleLookAhead1"
  // ../org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/internal/InternalLookaheadTestLanguage.g:205:1: ruleLookAhead1 returns [EObject current=null] : (otherlv_0= 'foo' ( (lv_y_1_0= ruleLookAhead2 ) ) ( (lv_x_2_0= 'b' ) ) ( (lv_x_3_0= 'd' ) ) ) ;
  public final EObject ruleLookAhead1() throws RecognitionException {
    EObject current = null;

    Token otherlv_0 = null;
    Token lv_x_2_0 = null;
    Token lv_x_3_0 = null;
    EObject lv_y_1_0 = null;

    enterRule();

    try {
      // ../org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/internal/InternalLookaheadTestLanguage.g:208:28: ( (otherlv_0= 'foo' ( (lv_y_1_0= ruleLookAhead2 ) ) ( (lv_x_2_0= 'b' ) ) ( (lv_x_3_0= 'd' ) ) ) )
      // ../org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/internal/InternalLookaheadTestLanguage.g:209:1: (otherlv_0= 'foo' ( (lv_y_1_0= ruleLookAhead2 ) ) ( (lv_x_2_0= 'b' ) ) ( (lv_x_3_0= 'd' ) ) )
      {
        // ../org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/internal/InternalLookaheadTestLanguage.g:209:1: (otherlv_0= 'foo' ( (lv_y_1_0= ruleLookAhead2 ) ) ( (lv_x_2_0= 'b' ) ) ( (lv_x_3_0= 'd' ) ) )
        // ../org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/internal/InternalLookaheadTestLanguage.g:209:3: otherlv_0= 'foo' ( (lv_y_1_0= ruleLookAhead2 ) ) ( (lv_x_2_0= 'b' ) ) ( (lv_x_3_0= 'd' ) )
        {
          otherlv_0 = (Token) match(input, 13, FollowSets000.FOLLOW_13_in_ruleLookAhead1473);

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

          // ../org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/internal/InternalLookaheadTestLanguage.g:213:1: ( (lv_y_1_0= ruleLookAhead2 ) )
          // ../org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/internal/InternalLookaheadTestLanguage.g:214:1: (lv_y_1_0= ruleLookAhead2 )
          {
            // ../org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/internal/InternalLookaheadTestLanguage.g:214:1: (lv_y_1_0= ruleLookAhead2 )
            // ../org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/internal/InternalLookaheadTestLanguage.g:215:3: lv_y_1_0= ruleLookAhead2
            {
              newCompositeNode(
                  grammarAccess.getLookAhead1Access().getYLookAhead2ParserRuleCall_1_0());

              pushFollow(FollowSets000.FOLLOW_ruleLookAhead2_in_ruleLookAhead1494);
              lv_y_1_0 = ruleLookAhead2();

              state._fsp--;

              if (current == null) {
                current = createModelElementForParent(grammarAccess.getLookAhead1Rule());
              }
              set(current, "y", lv_y_1_0, "LookAhead2");
              afterParserOrEnumRuleCall();
            }
          }

          // ../org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/internal/InternalLookaheadTestLanguage.g:231:2: ( (lv_x_2_0= 'b' ) )
          // ../org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/internal/InternalLookaheadTestLanguage.g:232:1: (lv_x_2_0= 'b' )
          {
            // ../org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/internal/InternalLookaheadTestLanguage.g:232:1: (lv_x_2_0= 'b' )
            // ../org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/internal/InternalLookaheadTestLanguage.g:233:3: lv_x_2_0= 'b'
            {
              lv_x_2_0 = (Token) match(input, 14, FollowSets000.FOLLOW_14_in_ruleLookAhead1512);

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

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

          // ../org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/internal/InternalLookaheadTestLanguage.g:246:2: ( (lv_x_3_0= 'd' ) )
          // ../org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/internal/InternalLookaheadTestLanguage.g:247:1: (lv_x_3_0= 'd' )
          {
            // ../org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/internal/InternalLookaheadTestLanguage.g:247:1: (lv_x_3_0= 'd' )
            // ../org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/internal/InternalLookaheadTestLanguage.g:248:3: lv_x_3_0= 'd'
            {
              lv_x_3_0 = (Token) match(input, 15, FollowSets000.FOLLOW_15_in_ruleLookAhead1543);

              newLeafNode(lv_x_3_0, grammarAccess.getLookAhead1Access().getXDKeyword_3_0());

              if (current == null) {
                current = createModelElement(grammarAccess.getLookAhead1Rule());
              }
              setWithLastConsumed(current, "x", lv_x_3_0, "d");
            }
          }
        }
      }

      leaveRule();
    } catch (RecognitionException re) {
      recover(input, re);
      appendSkippedTokens();
    } finally {
    }
    return current;
  }
  // $ANTLR start "ruleAlts"
  // ../org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/internal/InternalLookaheadTestLanguage.g:115:1: ruleAlts returns [EObject current=null] : (this_LookAhead0_0= ruleLookAhead0 | this_LookAhead1_1= ruleLookAhead1 | this_LookAhead3_2= ruleLookAhead3 ) ;
  public final EObject ruleAlts() throws RecognitionException {
    EObject current = null;

    EObject this_LookAhead0_0 = null;

    EObject this_LookAhead1_1 = null;

    EObject this_LookAhead3_2 = null;

    enterRule();

    try {
      // ../org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/internal/InternalLookaheadTestLanguage.g:118:28: ( (this_LookAhead0_0= ruleLookAhead0 | this_LookAhead1_1= ruleLookAhead1 | this_LookAhead3_2= ruleLookAhead3 ) )
      // ../org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/internal/InternalLookaheadTestLanguage.g:119:1: (this_LookAhead0_0= ruleLookAhead0 | this_LookAhead1_1= ruleLookAhead1 | this_LookAhead3_2= ruleLookAhead3 )
      {
        // ../org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/internal/InternalLookaheadTestLanguage.g:119:1: (this_LookAhead0_0= ruleLookAhead0 | this_LookAhead1_1= ruleLookAhead1 | this_LookAhead3_2= ruleLookAhead3 )
        int alt2 = 3;
        int LA2_0 = input.LA(1);

        if ((LA2_0 == 11)) {
          alt2 = 1;
        } else if ((LA2_0 == 13)) {
          int LA2_2 = input.LA(2);

          if ((LA2_2 == 11)) {
            int LA2_3 = input.LA(3);

            if ((LA2_3 == 16)) {
              alt2 = 2;
            } else if ((LA2_3 == 14)) {
              alt2 = 3;
            } else {
              NoViableAltException nvae = new NoViableAltException("", 2, 3, input);

              throw nvae;
            }
          } else if ((LA2_2 == 13)) {
            alt2 = 2;
          } else {
            NoViableAltException nvae = new NoViableAltException("", 2, 2, input);

            throw nvae;
          }
        } else {
          NoViableAltException nvae = new NoViableAltException("", 2, 0, input);

          throw nvae;
        }
        switch (alt2) {
          case 1:
            // ../org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/internal/InternalLookaheadTestLanguage.g:120:5: this_LookAhead0_0= ruleLookAhead0
            {
              newCompositeNode(grammarAccess.getAltsAccess().getLookAhead0ParserRuleCall_0());

              pushFollow(FollowSets000.FOLLOW_ruleLookAhead0_in_ruleAlts223);
              this_LookAhead0_0 = ruleLookAhead0();

              state._fsp--;

              current = this_LookAhead0_0;
              afterParserOrEnumRuleCall();
            }
            break;
          case 2:
            // ../org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/internal/InternalLookaheadTestLanguage.g:130:5: this_LookAhead1_1= ruleLookAhead1
            {
              newCompositeNode(grammarAccess.getAltsAccess().getLookAhead1ParserRuleCall_1());

              pushFollow(FollowSets000.FOLLOW_ruleLookAhead1_in_ruleAlts250);
              this_LookAhead1_1 = ruleLookAhead1();

              state._fsp--;

              current = this_LookAhead1_1;
              afterParserOrEnumRuleCall();
            }
            break;
          case 3:
            // ../org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/internal/InternalLookaheadTestLanguage.g:140:5: this_LookAhead3_2= ruleLookAhead3
            {
              newCompositeNode(grammarAccess.getAltsAccess().getLookAhead3ParserRuleCall_2());

              pushFollow(FollowSets000.FOLLOW_ruleLookAhead3_in_ruleAlts277);
              this_LookAhead3_2 = ruleLookAhead3();

              state._fsp--;

              current = this_LookAhead3_2;
              afterParserOrEnumRuleCall();
            }
            break;
        }
      }

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