// $ANTLR start "ruleNodeRoot"
  // ../org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/antlr/internal/InternalPartialSerializationTestLanguage.g:106:1: ruleNodeRoot returns [EObject current=null] : (otherlv_0= '#1' ( (lv_node_1_0= ruleNode ) ) ) ;
  public final EObject ruleNodeRoot() throws RecognitionException {
    EObject current = null;

    Token otherlv_0 = null;
    EObject lv_node_1_0 = null;

    enterRule();

    try {
      // ../org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/antlr/internal/InternalPartialSerializationTestLanguage.g:109:28: ( (otherlv_0= '#1' ( (lv_node_1_0= ruleNode ) ) ) )
      // ../org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/antlr/internal/InternalPartialSerializationTestLanguage.g:110:1: (otherlv_0= '#1' ( (lv_node_1_0= ruleNode ) ) )
      {
        // ../org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/antlr/internal/InternalPartialSerializationTestLanguage.g:110:1: (otherlv_0= '#1' ( (lv_node_1_0= ruleNode ) ) )
        // ../org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/antlr/internal/InternalPartialSerializationTestLanguage.g:110:3: otherlv_0= '#1' ( (lv_node_1_0= ruleNode ) )
        {
          otherlv_0 = (Token) match(input, 11, FollowSets000.FOLLOW_11_in_ruleNodeRoot212);

          newLeafNode(
              otherlv_0, grammarAccess.getNodeRootAccess().getNumberSignDigitOneKeyword_0());

          // ../org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/antlr/internal/InternalPartialSerializationTestLanguage.g:114:1: ( (lv_node_1_0= ruleNode ) )
          // ../org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/antlr/internal/InternalPartialSerializationTestLanguage.g:115:1: (lv_node_1_0= ruleNode )
          {
            // ../org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/antlr/internal/InternalPartialSerializationTestLanguage.g:115:1: (lv_node_1_0= ruleNode )
            // ../org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/antlr/internal/InternalPartialSerializationTestLanguage.g:116:3: lv_node_1_0= ruleNode
            {
              newCompositeNode(grammarAccess.getNodeRootAccess().getNodeNodeParserRuleCall_1_0());

              pushFollow(FollowSets000.FOLLOW_ruleNode_in_ruleNodeRoot233);
              lv_node_1_0 = ruleNode();

              state._fsp--;

              if (current == null) {
                current = createModelElementForParent(grammarAccess.getNodeRootRule());
              }
              set(current, "node", lv_node_1_0, "Node");
              afterParserOrEnumRuleCall();
            }
          }
        }
      }

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

    EObject iv_ruleModel = null;

    try {
      // ../org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/antlr/internal/InternalPartialSerializationTestLanguage.g:68:2: (iv_ruleModel= ruleModel EOF )
      // ../org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/antlr/internal/InternalPartialSerializationTestLanguage.g:69:2: iv_ruleModel= ruleModel EOF
      {
        newCompositeNode(grammarAccess.getModelRule());
        pushFollow(FollowSets000.FOLLOW_ruleModel_in_entryRuleModel75);
        iv_ruleModel = ruleModel();

        state._fsp--;

        current = iv_ruleModel;
        match(input, EOF, FollowSets000.FOLLOW_EOF_in_entryRuleModel85);
      }

    } catch (RecognitionException re) {
      recover(input, re);
      appendSkippedTokens();
    } finally {
    }
    return current;
  }
  // $ANTLR start "ruleModel"
  // ../org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/antlr/internal/InternalPartialSerializationTestLanguage.g:76:1: ruleModel returns [EObject current=null] : this_NodeRoot_0= ruleNodeRoot ;
  public final EObject ruleModel() throws RecognitionException {
    EObject current = null;

    EObject this_NodeRoot_0 = null;

    enterRule();

    try {
      // ../org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/antlr/internal/InternalPartialSerializationTestLanguage.g:79:28: (this_NodeRoot_0= ruleNodeRoot )
      // ../org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/antlr/internal/InternalPartialSerializationTestLanguage.g:81:5: this_NodeRoot_0= ruleNodeRoot
      {
        newCompositeNode(grammarAccess.getModelAccess().getNodeRootParserRuleCall());

        pushFollow(FollowSets000.FOLLOW_ruleNodeRoot_in_ruleModel131);
        this_NodeRoot_0 = ruleNodeRoot();

        state._fsp--;

        current = this_NodeRoot_0;
        afterParserOrEnumRuleCall();
      }

      leaveRule();
    } catch (RecognitionException re) {
      recover(input, re);
      appendSkippedTokens();
    } finally {
    }
    return current;
  }
 public InternalPartialSerializationTestLanguageParser(
     TokenStream input, PartialSerializationTestLanguageGrammarAccess grammarAccess) {
   this(input);
   this.grammarAccess = grammarAccess;
   registerRules(grammarAccess.getGrammar());
 }
  // $ANTLR start "ruleNode"
  // ../org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/antlr/internal/InternalPartialSerializationTestLanguage.g:149:1: ruleNode returns [EObject current=null] : (otherlv_0= 'node' ( (lv_name_1_0= RULE_ID ) ) (otherlv_2= '(' ( (lv_children_3_0= ruleNode ) )+ otherlv_4= ')' )? ) ;
  public final EObject ruleNode() throws RecognitionException {
    EObject current = null;

    Token otherlv_0 = null;
    Token lv_name_1_0 = null;
    Token otherlv_2 = null;
    Token otherlv_4 = null;
    EObject lv_children_3_0 = null;

    enterRule();

    try {
      // ../org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/antlr/internal/InternalPartialSerializationTestLanguage.g:152:28: ( (otherlv_0= 'node' ( (lv_name_1_0= RULE_ID ) ) (otherlv_2= '(' ( (lv_children_3_0= ruleNode ) )+ otherlv_4= ')' )? ) )
      // ../org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/antlr/internal/InternalPartialSerializationTestLanguage.g:153:1: (otherlv_0= 'node' ( (lv_name_1_0= RULE_ID ) ) (otherlv_2= '(' ( (lv_children_3_0= ruleNode ) )+ otherlv_4= ')' )? )
      {
        // ../org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/antlr/internal/InternalPartialSerializationTestLanguage.g:153:1: (otherlv_0= 'node' ( (lv_name_1_0= RULE_ID ) ) (otherlv_2= '(' ( (lv_children_3_0= ruleNode ) )+ otherlv_4= ')' )? )
        // ../org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/antlr/internal/InternalPartialSerializationTestLanguage.g:153:3: otherlv_0= 'node' ( (lv_name_1_0= RULE_ID ) ) (otherlv_2= '(' ( (lv_children_3_0= ruleNode ) )+ otherlv_4= ')' )?
        {
          otherlv_0 = (Token) match(input, 12, FollowSets000.FOLLOW_12_in_ruleNode316);

          newLeafNode(otherlv_0, grammarAccess.getNodeAccess().getNodeKeyword_0());

          // ../org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/antlr/internal/InternalPartialSerializationTestLanguage.g:157:1: ( (lv_name_1_0= RULE_ID ) )
          // ../org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/antlr/internal/InternalPartialSerializationTestLanguage.g:158:1: (lv_name_1_0= RULE_ID )
          {
            // ../org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/antlr/internal/InternalPartialSerializationTestLanguage.g:158:1: (lv_name_1_0= RULE_ID )
            // ../org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/antlr/internal/InternalPartialSerializationTestLanguage.g:159:3: lv_name_1_0= RULE_ID
            {
              lv_name_1_0 =
                  (Token) match(input, RULE_ID, FollowSets000.FOLLOW_RULE_ID_in_ruleNode333);

              newLeafNode(
                  lv_name_1_0, grammarAccess.getNodeAccess().getNameIDTerminalRuleCall_1_0());

              if (current == null) {
                current = createModelElement(grammarAccess.getNodeRule());
              }
              setWithLastConsumed(current, "name", lv_name_1_0, "ID");
            }
          }

          // ../org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/antlr/internal/InternalPartialSerializationTestLanguage.g:175:2: (otherlv_2= '(' ( (lv_children_3_0= ruleNode ) )+ otherlv_4= ')' )?
          int alt2 = 2;
          int LA2_0 = input.LA(1);

          if ((LA2_0 == 13)) {
            alt2 = 1;
          }
          switch (alt2) {
            case 1:
              // ../org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/antlr/internal/InternalPartialSerializationTestLanguage.g:175:4: otherlv_2= '(' ( (lv_children_3_0= ruleNode ) )+ otherlv_4= ')'
              {
                otherlv_2 = (Token) match(input, 13, FollowSets000.FOLLOW_13_in_ruleNode351);

                newLeafNode(
                    otherlv_2, grammarAccess.getNodeAccess().getLeftParenthesisKeyword_2_0());

                // ../org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/antlr/internal/InternalPartialSerializationTestLanguage.g:179:1: ( (lv_children_3_0= ruleNode ) )+
                int cnt1 = 0;
                loop1:
                do {
                  int alt1 = 2;
                  int LA1_0 = input.LA(1);

                  if ((LA1_0 == 12)) {
                    alt1 = 1;
                  }

                  switch (alt1) {
                    case 1:
                      // ../org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/antlr/internal/InternalPartialSerializationTestLanguage.g:180:1: (lv_children_3_0= ruleNode )
                      {
                        // ../org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/antlr/internal/InternalPartialSerializationTestLanguage.g:180:1: (lv_children_3_0= ruleNode )
                        // ../org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/antlr/internal/InternalPartialSerializationTestLanguage.g:181:3: lv_children_3_0= ruleNode
                        {
                          newCompositeNode(
                              grammarAccess.getNodeAccess().getChildrenNodeParserRuleCall_2_1_0());

                          pushFollow(FollowSets000.FOLLOW_ruleNode_in_ruleNode372);
                          lv_children_3_0 = ruleNode();

                          state._fsp--;

                          if (current == null) {
                            current = createModelElementForParent(grammarAccess.getNodeRule());
                          }
                          add(current, "children", lv_children_3_0, "Node");
                          afterParserOrEnumRuleCall();
                        }
                      }
                      break;

                    default:
                      if (cnt1 >= 1) break loop1;
                      EarlyExitException eee = new EarlyExitException(1, input);
                      throw eee;
                  }
                  cnt1++;
                } while (true);

                otherlv_4 = (Token) match(input, 14, FollowSets000.FOLLOW_14_in_ruleNode385);

                newLeafNode(
                    otherlv_4, grammarAccess.getNodeAccess().getRightParenthesisKeyword_2_2());
              }
              break;
          }
        }
      }

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