public final void declarationList() throws RecognitionException
    {
        
        AST ast1 = null, ast2 = null, ast3 = null;
        
        try {
            // CPP.g:37:3: ( declaration declarationList | )
            int alt1 = 2;
            int LA1_0 = this.input.LA(1);
            
            if (((LA1_0 == 22) || ((LA1_0 >= 31) && (LA1_0 <= 41)))) {
                alt1 = 1;
            }
            else if ((LA1_0 == EOF)) {
                alt1 = 2;
            }
            else {
                if (this.state.backtracking > 0) {
                    this.state.failed = true;
                    return;
                }
                NoViableAltException nvae = new NoViableAltException("", 1, 0, this.input);
                
                throw nvae;
            }
            switch (alt1)
            {
                case 1:
                    // CPP.g:37:5: declaration declarationList
                {
                    this.pushFollow(FOLLOW_declaration_in_declarationList81);
                    this.declaration();
                    
                    this.state._fsp--;
                    if (this.state.failed) {
                        return;
                    }
                    if (this.state.backtracking == 0) {
                        
                        ast1 = this.out;
                        this.out = null;
                        if (this.in instanceof EmptyDeclarationListAST) {
                            ast3 = this.in.parent;
                        }
                        
                    }
                    this.pushFollow(FOLLOW_declarationList_in_declarationList95);
                    this.declarationList();
                    
                    this.state._fsp--;
                    if (this.state.failed) {
                        return;
                    }
                    if (this.state.backtracking == 0) {
                        
                        ast2 = this.out;
                        if (ast1 instanceof DeclarationAST) {
                            this.out = new DeclarationListAST((DeclarationAST) ast1, (DeclarationListAST) ast2);
                        }
                        else {
                            if (ast3 instanceof DeclarationListAST) {
                                ((DeclarationListAST) ast3).dl = (DeclarationListAST) ast2;
                                this.out = ast1;
                            }
                        }
                        
                    }
                    
                }
                    break;
                case 2:
                    // CPP.g:56:5:
                {
                    if (this.state.backtracking == 0) {
                        this.out = new EmptyDeclarationListAST();
                    }
                    
                }
                    break;
                
            }
        }
        catch (RecognitionException re) {
            this.reportError(re);
            this.recover(this.input, re);
        } finally {
        }
        return;
    }