KDevelop API Documentation

PascalParser.cpp

Go to the documentation of this file.
00001 /* $ANTLR 2.7.2: "pascal.g" -> "PascalParser.cpp"$ */
00002 #include "PascalParser.hpp"
00003 #include <antlr/NoViableAltException.hpp>
00004 #include <antlr/SemanticException.hpp>
00005 #include <antlr/ASTFactory.hpp>
00006 #line 1 "pascal.g"
00007 #line 8 "PascalParser.cpp"
00008 PascalParser::PascalParser(ANTLR_USE_NAMESPACE(antlr)TokenBuffer& tokenBuf, int k)
00009 : ANTLR_USE_NAMESPACE(antlr)LLkParser(tokenBuf,k)
00010 {
00011 }
00012 
00013 PascalParser::PascalParser(ANTLR_USE_NAMESPACE(antlr)TokenBuffer& tokenBuf)
00014 : ANTLR_USE_NAMESPACE(antlr)LLkParser(tokenBuf,2)
00015 {
00016 }
00017 
00018 PascalParser::PascalParser(ANTLR_USE_NAMESPACE(antlr)TokenStream& lexer, int k)
00019 : ANTLR_USE_NAMESPACE(antlr)LLkParser(lexer,k)
00020 {
00021 }
00022 
00023 PascalParser::PascalParser(ANTLR_USE_NAMESPACE(antlr)TokenStream& lexer)
00024 : ANTLR_USE_NAMESPACE(antlr)LLkParser(lexer,2)
00025 {
00026 }
00027 
00028 PascalParser::PascalParser(const ANTLR_USE_NAMESPACE(antlr)ParserSharedInputState& state)
00029 : ANTLR_USE_NAMESPACE(antlr)LLkParser(state,2)
00030 {
00031 }
00032 
00033 void PascalParser::compilationUnit() {
00034     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
00035     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
00036     RefPascalAST compilationUnit_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
00037     
00038     try {      // for error handling
00039         switch ( LA(1)) {
00040         case PROGRAM:
00041         {
00042             program();
00043             if (inputState->guessing==0) {
00044                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
00045             }
00046             compilationUnit_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
00047             break;
00048         }
00049         case LIBRARY:
00050         {
00051             library();
00052             if (inputState->guessing==0) {
00053                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
00054             }
00055             compilationUnit_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
00056             break;
00057         }
00058         case UNIT:
00059         {
00060             unit();
00061             if (inputState->guessing==0) {
00062                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
00063             }
00064             compilationUnit_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
00065             break;
00066         }
00067         default:
00068         {
00069             throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
00070         }
00071         }
00072     }
00073     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
00074         if( inputState->guessing == 0 ) {
00075             reportError(ex);
00076             consume();
00077             consumeUntil(_tokenSet_0);
00078         } else {
00079             throw;
00080         }
00081     }
00082     returnAST = compilationUnit_AST;
00083 }
00084 
00085 void PascalParser::program() {
00086     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
00087     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
00088     RefPascalAST program_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
00089     
00090     try {      // for error handling
00091         programHeading();
00092         if (inputState->guessing==0) {
00093             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
00094         }
00095         {
00096         switch ( LA(1)) {
00097         case USES:
00098         {
00099             usesClause();
00100             if (inputState->guessing==0) {
00101                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
00102             }
00103             break;
00104         }
00105         case BEGIN:
00106         case LABEL:
00107         case CONST:
00108         case RESOURCESTRING:
00109         case TYPE:
00110         case VAR:
00111         case PROCEDURE:
00112         case FUNCTION:
00113         case CONSTRUCTOR:
00114         case DESTRUCTOR:
00115         {
00116             break;
00117         }
00118         default:
00119         {
00120             throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
00121         }
00122         }
00123         }
00124         block();
00125         if (inputState->guessing==0) {
00126             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
00127         }
00128         match(DOT);
00129         program_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
00130     }
00131     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
00132         if( inputState->guessing == 0 ) {
00133             reportError(ex);
00134             consume();
00135             consumeUntil(_tokenSet_0);
00136         } else {
00137             throw;
00138         }
00139     }
00140     returnAST = program_AST;
00141 }
00142 
00143 void PascalParser::library() {
00144     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
00145     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
00146     RefPascalAST library_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
00147     
00148     try {      // for error handling
00149         RefPascalAST tmp2_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
00150         if ( inputState->guessing == 0 ) {
00151             tmp2_AST = astFactory->create(LT(1));
00152             astFactory->makeASTRoot(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(tmp2_AST.get()));
00153         }
00154         match(LIBRARY);
00155         identifier();
00156         if (inputState->guessing==0) {
00157             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
00158         }
00159         match(SEMI);
00160         {
00161         switch ( LA(1)) {
00162         case USES:
00163         {
00164             usesClause();
00165             if (inputState->guessing==0) {
00166                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
00167             }
00168             break;
00169         }
00170         case EXPORTS:
00171         case BEGIN:
00172         case LABEL:
00173         case CONST:
00174         case RESOURCESTRING:
00175         case TYPE:
00176         case VAR:
00177         case PROCEDURE:
00178         case FUNCTION:
00179         case CONSTRUCTOR:
00180         case DESTRUCTOR:
00181         {
00182             break;
00183         }
00184         default:
00185         {
00186             throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
00187         }
00188         }
00189         }
00190         libraryBlock();
00191         if (inputState->guessing==0) {
00192             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
00193         }
00194         exportsClause();
00195         if (inputState->guessing==0) {
00196             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
00197         }
00198         match(END);
00199         match(DOT);
00200         library_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
00201     }
00202     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
00203         if( inputState->guessing == 0 ) {
00204             reportError(ex);
00205             consume();
00206             consumeUntil(_tokenSet_0);
00207         } else {
00208             throw;
00209         }
00210     }
00211     returnAST = library_AST;
00212 }
00213 
00214 void PascalParser::unit() {
00215     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
00216     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
00217     RefPascalAST unit_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
00218     
00219     try {      // for error handling
00220         RefPascalAST tmp6_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
00221         if ( inputState->guessing == 0 ) {
00222             tmp6_AST = astFactory->create(LT(1));
00223             astFactory->makeASTRoot(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(tmp6_AST.get()));
00224         }
00225         match(UNIT);
00226         identifier();
00227         if (inputState->guessing==0) {
00228             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
00229         }
00230         match(SEMI);
00231         interfacePart();
00232         if (inputState->guessing==0) {
00233             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
00234         }
00235         implementationPart();
00236         if (inputState->guessing==0) {
00237             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
00238         }
00239         {
00240         switch ( LA(1)) {
00241         case INITIALIZATION:
00242         {
00243             {
00244             initializationPart();
00245             if (inputState->guessing==0) {
00246                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
00247             }
00248             {
00249             switch ( LA(1)) {
00250             case FINALIZATION:
00251             {
00252                 finalizationPart();
00253                 if (inputState->guessing==0) {
00254                     astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
00255                 }
00256                 break;
00257             }
00258             case END:
00259             {
00260                 break;
00261             }
00262             default:
00263             {
00264                 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
00265             }
00266             }
00267             }
00268             }
00269             break;
00270         }
00271         case BEGIN:
00272         {
00273             realizationPart();
00274             if (inputState->guessing==0) {
00275                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
00276             }
00277             break;
00278         }
00279         case END:
00280         {
00281             break;
00282         }
00283         default:
00284         {
00285             throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
00286         }
00287         }
00288         }
00289         match(END);
00290         unit_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
00291     }
00292     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
00293         if( inputState->guessing == 0 ) {
00294             reportError(ex);
00295             consume();
00296             consumeUntil(_tokenSet_0);
00297         } else {
00298             throw;
00299         }
00300     }
00301     returnAST = unit_AST;
00302 }
00303 
00304 void PascalParser::programHeading() {
00305     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
00306     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
00307     RefPascalAST programHeading_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
00308     
00309     try {      // for error handling
00310         RefPascalAST tmp9_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
00311         if ( inputState->guessing == 0 ) {
00312             tmp9_AST = astFactory->create(LT(1));
00313             astFactory->makeASTRoot(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(tmp9_AST.get()));
00314         }
00315         match(PROGRAM);
00316         identifier();
00317         if (inputState->guessing==0) {
00318             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
00319         }
00320         {
00321         switch ( LA(1)) {
00322         case LPAREN:
00323         {
00324             match(LPAREN);
00325             identifierList();
00326             if (inputState->guessing==0) {
00327                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
00328             }
00329             match(RPAREN);
00330             break;
00331         }
00332         case SEMI:
00333         {
00334             break;
00335         }
00336         default:
00337         {
00338             throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
00339         }
00340         }
00341         }
00342         match(SEMI);
00343         programHeading_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
00344     }
00345     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
00346         if( inputState->guessing == 0 ) {
00347             reportError(ex);
00348             consume();
00349             consumeUntil(_tokenSet_1);
00350         } else {
00351             throw;
00352         }
00353     }
00354     returnAST = programHeading_AST;
00355 }
00356 
00357 void PascalParser::usesClause() {
00358     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
00359     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
00360     RefPascalAST usesClause_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
00361     
00362     try {      // for error handling
00363         RefPascalAST tmp13_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
00364         if ( inputState->guessing == 0 ) {
00365             tmp13_AST = astFactory->create(LT(1));
00366             astFactory->makeASTRoot(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(tmp13_AST.get()));
00367         }
00368         match(USES);
00369         identifierList();
00370         if (inputState->guessing==0) {
00371             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
00372         }
00373         match(SEMI);
00374         usesClause_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
00375     }
00376     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
00377         if( inputState->guessing == 0 ) {
00378             reportError(ex);
00379             consume();
00380             consumeUntil(_tokenSet_2);
00381         } else {
00382             throw;
00383         }
00384     }
00385     returnAST = usesClause_AST;
00386 }
00387 
00388 void PascalParser::block() {
00389     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
00390     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
00391     RefPascalAST block_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
00392     
00393     try {      // for error handling
00394         declarationPart();
00395         if (inputState->guessing==0) {
00396             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
00397         }
00398         statementPart();
00399         if (inputState->guessing==0) {
00400             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
00401         }
00402         block_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
00403     }
00404     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
00405         if( inputState->guessing == 0 ) {
00406             reportError(ex);
00407             consume();
00408             consumeUntil(_tokenSet_3);
00409         } else {
00410             throw;
00411         }
00412     }
00413     returnAST = block_AST;
00414 }
00415 
00416 void PascalParser::identifier() {
00417     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
00418     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
00419     RefPascalAST identifier_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
00420     
00421     try {      // for error handling
00422         RefPascalAST tmp15_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
00423         if ( inputState->guessing == 0 ) {
00424             tmp15_AST = astFactory->create(LT(1));
00425             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(tmp15_AST.get()));
00426         }
00427         match(IDENT);
00428         identifier_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
00429     }
00430     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
00431         if( inputState->guessing == 0 ) {
00432             reportError(ex);
00433             consume();
00434             consumeUntil(_tokenSet_4);
00435         } else {
00436             throw;
00437         }
00438     }
00439     returnAST = identifier_AST;
00440 }
00441 
00442 void PascalParser::libraryBlock() {
00443     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
00444     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
00445     RefPascalAST libraryBlock_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
00446     
00447     try {      // for error handling
00448         declarationPart();
00449         if (inputState->guessing==0) {
00450             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
00451         }
00452         {
00453         switch ( LA(1)) {
00454         case BEGIN:
00455         {
00456             statementPart();
00457             if (inputState->guessing==0) {
00458                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
00459             }
00460             break;
00461         }
00462         case EXPORTS:
00463         {
00464             break;
00465         }
00466         default:
00467         {
00468             throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
00469         }
00470         }
00471         }
00472         libraryBlock_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
00473     }
00474     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
00475         if( inputState->guessing == 0 ) {
00476             reportError(ex);
00477             consume();
00478             consumeUntil(_tokenSet_5);
00479         } else {
00480             throw;
00481         }
00482     }
00483     returnAST = libraryBlock_AST;
00484 }
00485 
00486 void PascalParser::exportsClause() {
00487     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
00488     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
00489     RefPascalAST exportsClause_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
00490     
00491     try {      // for error handling
00492         RefPascalAST tmp16_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
00493         if ( inputState->guessing == 0 ) {
00494             tmp16_AST = astFactory->create(LT(1));
00495             astFactory->makeASTRoot(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(tmp16_AST.get()));
00496         }
00497         match(EXPORTS);
00498         exportsList();
00499         if (inputState->guessing==0) {
00500             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
00501         }
00502         exportsClause_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
00503     }
00504     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
00505         if( inputState->guessing == 0 ) {
00506             reportError(ex);
00507             consume();
00508             consumeUntil(_tokenSet_6);
00509         } else {
00510             throw;
00511         }
00512     }
00513     returnAST = exportsClause_AST;
00514 }
00515 
00516 void PascalParser::declarationPart() {
00517     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
00518     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
00519     RefPascalAST declarationPart_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
00520     
00521     try {      // for error handling
00522         { // ( ... )*
00523         for (;;) {
00524             switch ( LA(1)) {
00525             case LABEL:
00526             {
00527                 labelDeclarationPart();
00528                 if (inputState->guessing==0) {
00529                     astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
00530                 }
00531                 break;
00532             }
00533             case CONST:
00534             {
00535                 constantDeclarationPart();
00536                 if (inputState->guessing==0) {
00537                     astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
00538                 }
00539                 break;
00540             }
00541             case RESOURCESTRING:
00542             {
00543                 resourcestringDeclarationPart();
00544                 if (inputState->guessing==0) {
00545                     astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
00546                 }
00547                 break;
00548             }
00549             case TYPE:
00550             {
00551                 typeDeclarationPart();
00552                 if (inputState->guessing==0) {
00553                     astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
00554                 }
00555                 break;
00556             }
00557             case VAR:
00558             {
00559                 variableDeclarationPart();
00560                 if (inputState->guessing==0) {
00561                     astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
00562                 }
00563                 break;
00564             }
00565             case PROCEDURE:
00566             case FUNCTION:
00567             case CONSTRUCTOR:
00568             case DESTRUCTOR:
00569             {
00570                 procedureAndFunctionDeclarationPart();
00571                 if (inputState->guessing==0) {
00572                     astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
00573                 }
00574                 break;
00575             }
00576             default:
00577             {
00578                 goto _loop41;
00579             }
00580             }
00581         }
00582         _loop41:;
00583         } // ( ... )*
00584         declarationPart_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
00585     }
00586     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
00587         if( inputState->guessing == 0 ) {
00588             reportError(ex);
00589             consume();
00590             consumeUntil(_tokenSet_7);
00591         } else {
00592             throw;
00593         }
00594     }
00595     returnAST = declarationPart_AST;
00596 }
00597 
00598 void PascalParser::statementPart() {
00599     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
00600     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
00601     RefPascalAST statementPart_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
00602     
00603     try {      // for error handling
00604         compoundStatement();
00605         if (inputState->guessing==0) {
00606             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
00607         }
00608         statementPart_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
00609     }
00610     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
00611         if( inputState->guessing == 0 ) {
00612             reportError(ex);
00613             consume();
00614             consumeUntil(_tokenSet_3);
00615         } else {
00616             throw;
00617         }
00618     }
00619     returnAST = statementPart_AST;
00620 }
00621 
00622 void PascalParser::exportsList() {
00623     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
00624     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
00625     RefPascalAST exportsList_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
00626     
00627     try {      // for error handling
00628         exportsEntry();
00629         if (inputState->guessing==0) {
00630             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
00631         }
00632         { // ( ... )*
00633         for (;;) {
00634             if ((LA(1) == COMMA)) {
00635                 match(COMMA);
00636                 exportsEntry();
00637                 if (inputState->guessing==0) {
00638                     astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
00639                 }
00640             }
00641             else {
00642                 goto _loop11;
00643             }
00644             
00645         }
00646         _loop11:;
00647         } // ( ... )*
00648         {
00649         switch ( LA(1)) {
00650         case SEMI:
00651         {
00652             match(SEMI);
00653             break;
00654         }
00655         case END:
00656         {
00657             break;
00658         }
00659         default:
00660         {
00661             throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
00662         }
00663         }
00664         }
00665         exportsList_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
00666     }
00667     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
00668         if( inputState->guessing == 0 ) {
00669             reportError(ex);
00670             consume();
00671             consumeUntil(_tokenSet_6);
00672         } else {
00673             throw;
00674         }
00675     }
00676     returnAST = exportsList_AST;
00677 }
00678 
00679 void PascalParser::exportsEntry() {
00680     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
00681     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
00682     RefPascalAST exportsEntry_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
00683     
00684     try {      // for error handling
00685         identifier();
00686         if (inputState->guessing==0) {
00687             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
00688         }
00689         {
00690         switch ( LA(1)) {
00691         case LITERAL_index:
00692         {
00693             RefPascalAST tmp19_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
00694             if ( inputState->guessing == 0 ) {
00695                 tmp19_AST = astFactory->create(LT(1));
00696                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(tmp19_AST.get()));
00697             }
00698             match(LITERAL_index);
00699             integerConstant();
00700             if (inputState->guessing==0) {
00701                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
00702             }
00703             break;
00704         }
00705         case SEMI:
00706         case END:
00707         case COMMA:
00708         case LITERAL_name:
00709         {
00710             break;
00711         }
00712         default:
00713         {
00714             throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
00715         }
00716         }
00717         }
00718         {
00719         switch ( LA(1)) {
00720         case LITERAL_name:
00721         {
00722             RefPascalAST tmp20_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
00723             if ( inputState->guessing == 0 ) {
00724                 tmp20_AST = astFactory->create(LT(1));
00725                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(tmp20_AST.get()));
00726             }
00727             match(LITERAL_name);
00728             stringConstant();
00729             if (inputState->guessing==0) {
00730                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
00731             }
00732             break;
00733         }
00734         case SEMI:
00735         case END:
00736         case COMMA:
00737         {
00738             break;
00739         }
00740         default:
00741         {
00742             throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
00743         }
00744         }
00745         }
00746         exportsEntry_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
00747     }
00748     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
00749         if( inputState->guessing == 0 ) {
00750             reportError(ex);
00751             consume();
00752             consumeUntil(_tokenSet_8);
00753         } else {
00754             throw;
00755         }
00756     }
00757     returnAST = exportsEntry_AST;
00758 }
00759 
00760 void PascalParser::integerConstant() {
00761     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
00762     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
00763     RefPascalAST integerConstant_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
00764     RefPascalAST s_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
00765     RefPascalAST n_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
00766     
00767     try {      // for error handling
00768         switch ( LA(1)) {
00769         case NUM_INT:
00770         {
00771             unsignedInteger();
00772             if (inputState->guessing==0) {
00773                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
00774             }
00775             integerConstant_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
00776             break;
00777         }
00778         case PLUS:
00779         case MINUS:
00780         {
00781             sign();
00782             if (inputState->guessing==0) {
00783                 s_AST = returnAST;
00784             }
00785             unsignedInteger();
00786             if (inputState->guessing==0) {
00787                 n_AST = returnAST;
00788             }
00789             if ( inputState->guessing==0 ) {
00790                 integerConstant_AST = RefPascalAST(currentAST.root);
00791 #line 880 "pascal.g"
00792                 integerConstant_AST=RefPascalAST(astFactory->make((new ANTLR_USE_NAMESPACE(antlr)ASTArray(2))->add(static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(s_AST.get()))->add(static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(n_AST.get()))));
00793 #line 794 "PascalParser.cpp"
00794                 currentAST.root = integerConstant_AST;
00795                 if ( integerConstant_AST!=static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get()) &&
00796                     integerConstant_AST->getFirstChild() != static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get()) )
00797                       currentAST.child = integerConstant_AST->getFirstChild();
00798                 else
00799                     currentAST.child = integerConstant_AST;
00800                 currentAST.advanceChildToEnd();
00801             }
00802             break;
00803         }
00804         default:
00805         {
00806             throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
00807         }
00808         }
00809     }
00810     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
00811         if( inputState->guessing == 0 ) {
00812             reportError(ex);
00813             consume();
00814             consumeUntil(_tokenSet_9);
00815         } else {
00816             throw;
00817         }
00818     }
00819     returnAST = integerConstant_AST;
00820 }
00821 
00822 void PascalParser::stringConstant() {
00823     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
00824     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
00825     RefPascalAST stringConstant_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
00826     
00827     try {      // for error handling
00828         switch ( LA(1)) {
00829         case STRING_LITERAL:
00830         {
00831             string();
00832             if (inputState->guessing==0) {
00833                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
00834             }
00835             stringConstant_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
00836             break;
00837         }
00838         case CHR:
00839         {
00840             constantChr();
00841             if (inputState->guessing==0) {
00842                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
00843             }
00844             stringConstant_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
00845             break;
00846         }
00847         default:
00848         {
00849             throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
00850         }
00851         }
00852     }
00853     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
00854         if( inputState->guessing == 0 ) {
00855             reportError(ex);
00856             consume();
00857             consumeUntil(_tokenSet_10);
00858         } else {
00859             throw;
00860         }
00861     }
00862     returnAST = stringConstant_AST;
00863 }
00864 
00865 void PascalParser::identifierList() {
00866     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
00867     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
00868     RefPascalAST identifierList_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
00869     
00870     try {      // for error handling
00871         identifier();
00872         if (inputState->guessing==0) {
00873             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
00874         }
00875         { // ( ... )*
00876         for (;;) {
00877             if ((LA(1) == COMMA)) {
00878                 match(COMMA);
00879                 identifier();
00880                 if (inputState->guessing==0) {
00881                     astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
00882                 }
00883             }
00884             else {
00885                 goto _loop378;
00886             }
00887             
00888         }
00889         _loop378:;
00890         } // ( ... )*
00891         if ( inputState->guessing==0 ) {
00892             identifierList_AST = RefPascalAST(currentAST.root);
00893 #line 867 "pascal.g"
00894             identifierList_AST = RefPascalAST(astFactory->make((new ANTLR_USE_NAMESPACE(antlr)ASTArray(2))->add(static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(astFactory->create(IDLIST).get()))->add(static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(identifierList_AST.get()))));
00895 #line 896 "PascalParser.cpp"
00896             currentAST.root = identifierList_AST;
00897             if ( identifierList_AST!=static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get()) &&
00898                 identifierList_AST->getFirstChild() != static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get()) )
00899                   currentAST.child = identifierList_AST->getFirstChild();
00900             else
00901                 currentAST.child = identifierList_AST;
00902             currentAST.advanceChildToEnd();
00903         }
00904         identifierList_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
00905     }
00906     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
00907         if( inputState->guessing == 0 ) {
00908             reportError(ex);
00909             consume();
00910             consumeUntil(_tokenSet_11);
00911         } else {
00912             throw;
00913         }
00914     }
00915     returnAST = identifierList_AST;
00916 }
00917 
00918 void PascalParser::interfacePart() {
00919     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
00920     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
00921     RefPascalAST interfacePart_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
00922     
00923     try {      // for error handling
00924         RefPascalAST tmp22_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
00925         if ( inputState->guessing == 0 ) {
00926             tmp22_AST = astFactory->create(LT(1));
00927             astFactory->makeASTRoot(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(tmp22_AST.get()));
00928         }
00929         match(INTERFACE);
00930         {
00931         switch ( LA(1)) {
00932         case USES:
00933         {
00934             usesClause();
00935             if (inputState->guessing==0) {
00936                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
00937             }
00938             break;
00939         }
00940         case IMPLEMENTATION:
00941         case CONST:
00942         case TYPE:
00943         case PROCEDURE:
00944         case FUNCTION:
00945         {
00946             break;
00947         }
00948         default:
00949         {
00950             throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
00951         }
00952         }
00953         }
00954         { // ( ... )*
00955         for (;;) {
00956             switch ( LA(1)) {
00957             case CONST:
00958             {
00959                 constantDeclarationPart();
00960                 if (inputState->guessing==0) {
00961                     astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
00962                 }
00963                 break;
00964             }
00965             case TYPE:
00966             {
00967                 typeDeclarationPart();
00968                 if (inputState->guessing==0) {
00969                     astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
00970                 }
00971                 break;
00972             }
00973             case PROCEDURE:
00974             case FUNCTION:
00975             {
00976                 procedureHeadersPart();
00977                 if (inputState->guessing==0) {
00978                     astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
00979                 }
00980                 break;
00981             }
00982             default:
00983             {
00984                 goto _loop24;
00985             }
00986             }
00987         }
00988         _loop24:;
00989         } // ( ... )*
00990         interfacePart_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
00991     }
00992     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
00993         if( inputState->guessing == 0 ) {
00994             reportError(ex);
00995             consume();
00996             consumeUntil(_tokenSet_12);
00997         } else {
00998             throw;
00999         }
01000     }
01001     returnAST = interfacePart_AST;
01002 }
01003 
01004 void PascalParser::implementationPart() {
01005     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
01006     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
01007     RefPascalAST implementationPart_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
01008     
01009     try {      // for error handling
01010         RefPascalAST tmp23_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
01011         if ( inputState->guessing == 0 ) {
01012             tmp23_AST = astFactory->create(LT(1));
01013             astFactory->makeASTRoot(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(tmp23_AST.get()));
01014         }
01015         match(IMPLEMENTATION);
01016         {
01017         switch ( LA(1)) {
01018         case USES:
01019         {
01020             usesClause();
01021             if (inputState->guessing==0) {
01022                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
01023             }
01024             break;
01025         }
01026         case END:
01027         case BEGIN:
01028         case INITIALIZATION:
01029         case LABEL:
01030         case CONST:
01031         case RESOURCESTRING:
01032         case TYPE:
01033         case VAR:
01034         case PROCEDURE:
01035         case FUNCTION:
01036         case CONSTRUCTOR:
01037         case DESTRUCTOR:
01038         {
01039             break;
01040         }
01041         default:
01042         {
01043             throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
01044         }
01045         }
01046         }
01047         declarationPart();
01048         if (inputState->guessing==0) {
01049             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
01050         }
01051         implementationPart_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
01052     }
01053     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
01054         if( inputState->guessing == 0 ) {
01055             reportError(ex);
01056             consume();
01057             consumeUntil(_tokenSet_13);
01058         } else {
01059             throw;
01060         }
01061     }
01062     returnAST = implementationPart_AST;
01063 }
01064 
01065 void PascalParser::initializationPart() {
01066     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
01067     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
01068     RefPascalAST initializationPart_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
01069     
01070     try {      // for error handling
01071         RefPascalAST tmp24_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
01072         if ( inputState->guessing == 0 ) {
01073             tmp24_AST = astFactory->create(LT(1));
01074             astFactory->makeASTRoot(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(tmp24_AST.get()));
01075         }
01076         match(INITIALIZATION);
01077         statement();
01078         if (inputState->guessing==0) {
01079             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
01080         }
01081         { // ( ... )*
01082         for (;;) {
01083             if ((LA(1) == SEMI)) {
01084                 match(SEMI);
01085                 statement();
01086                 if (inputState->guessing==0) {
01087                     astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
01088                 }
01089             }
01090             else {
01091                 goto _loop34;
01092             }
01093             
01094         }
01095         _loop34:;
01096         } // ( ... )*
01097         initializationPart_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
01098     }
01099     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
01100         if( inputState->guessing == 0 ) {
01101             reportError(ex);
01102             consume();
01103             consumeUntil(_tokenSet_14);
01104         } else {
01105             throw;
01106         }
01107     }
01108     returnAST = initializationPart_AST;
01109 }
01110 
01111 void PascalParser::finalizationPart() {
01112     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
01113     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
01114     RefPascalAST finalizationPart_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
01115     
01116     try {      // for error handling
01117         RefPascalAST tmp26_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
01118         if ( inputState->guessing == 0 ) {
01119             tmp26_AST = astFactory->create(LT(1));
01120             astFactory->makeASTRoot(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(tmp26_AST.get()));
01121         }
01122         match(FINALIZATION);
01123         statement();
01124         if (inputState->guessing==0) {
01125             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
01126         }
01127         { // ( ... )*
01128         for (;;) {
01129             if ((LA(1) == SEMI)) {
01130                 match(SEMI);
01131                 statement();
01132                 if (inputState->guessing==0) {
01133                     astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
01134                 }
01135             }
01136             else {
01137                 goto _loop37;
01138             }
01139             
01140         }
01141         _loop37:;
01142         } // ( ... )*
01143         finalizationPart_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
01144     }
01145     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
01146         if( inputState->guessing == 0 ) {
01147             reportError(ex);
01148             consume();
01149             consumeUntil(_tokenSet_6);
01150         } else {
01151             throw;
01152         }
01153     }
01154     returnAST = finalizationPart_AST;
01155 }
01156 
01157 void PascalParser::realizationPart() {
01158     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
01159     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
01160     RefPascalAST realizationPart_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
01161     
01162     try {      // for error handling
01163         RefPascalAST tmp28_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
01164         if ( inputState->guessing == 0 ) {
01165             tmp28_AST = astFactory->create(LT(1));
01166             astFactory->makeASTRoot(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(tmp28_AST.get()));
01167         }
01168         match(BEGIN);
01169         statement();
01170         if (inputState->guessing==0) {
01171             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
01172         }
01173         { // ( ... )*
01174         for (;;) {
01175             if ((LA(1) == SEMI)) {
01176                 match(SEMI);
01177                 statement();
01178                 if (inputState->guessing==0) {
01179                     astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
01180                 }
01181             }
01182             else {
01183                 goto _loop29;
01184             }
01185             
01186         }
01187         _loop29:;
01188         } // ( ... )*
01189         realizationPart_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
01190     }
01191     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
01192         if( inputState->guessing == 0 ) {
01193             reportError(ex);
01194             consume();
01195             consumeUntil(_tokenSet_6);
01196         } else {
01197             throw;
01198         }
01199     }
01200     returnAST = realizationPart_AST;
01201 }
01202 
01203 void PascalParser::constantDeclarationPart() {
01204     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
01205     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
01206     RefPascalAST constantDeclarationPart_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
01207     
01208     try {      // for error handling
01209         RefPascalAST tmp30_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
01210         if ( inputState->guessing == 0 ) {
01211             tmp30_AST = astFactory->create(LT(1));
01212             astFactory->makeASTRoot(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(tmp30_AST.get()));
01213         }
01214         match(CONST);
01215         { // ( ... )+
01216         int _cnt47=0;
01217         for (;;) {
01218             if ((LA(1) == IDENT) && (LA(2) == EQUAL)) {
01219                 constantDeclaration();
01220                 if (inputState->guessing==0) {
01221                     astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
01222                 }
01223             }
01224             else if ((LA(1) == IDENT) && (LA(2) == COLON)) {
01225                 typedConstantDeclaration();
01226                 if (inputState->guessing==0) {
01227                     astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
01228                 }
01229             }
01230             else {
01231                 if ( _cnt47>=1 ) { goto _loop47; } else {throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());}
01232             }
01233             
01234             _cnt47++;
01235         }
01236         _loop47:;
01237         }  // ( ... )+
01238         constantDeclarationPart_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
01239     }
01240     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
01241         if( inputState->guessing == 0 ) {
01242             reportError(ex);
01243             consume();
01244             consumeUntil(_tokenSet_2);
01245         } else {
01246             throw;
01247         }
01248     }
01249     returnAST = constantDeclarationPart_AST;
01250 }
01251 
01252 void PascalParser::typeDeclarationPart() {
01253     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
01254     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
01255     RefPascalAST typeDeclarationPart_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
01256     
01257     try {      // for error handling
01258         RefPascalAST tmp31_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
01259         if ( inputState->guessing == 0 ) {
01260             tmp31_AST = astFactory->create(LT(1));
01261             astFactory->makeASTRoot(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(tmp31_AST.get()));
01262         }
01263         match(TYPE);
01264         { // ( ... )+
01265         int _cnt54=0;
01266         for (;;) {
01267             if ((LA(1) == IDENT)) {
01268                 typeDeclaration();
01269                 if (inputState->guessing==0) {
01270                     astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
01271                 }
01272             }
01273             else {
01274                 if ( _cnt54>=1 ) { goto _loop54; } else {throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());}
01275             }
01276             
01277             _cnt54++;
01278         }
01279         _loop54:;
01280         }  // ( ... )+
01281         typeDeclarationPart_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
01282     }
01283     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
01284         if( inputState->guessing == 0 ) {
01285             reportError(ex);
01286             consume();
01287             consumeUntil(_tokenSet_2);
01288         } else {
01289             throw;
01290         }
01291     }
01292     returnAST = typeDeclarationPart_AST;
01293 }
01294 
01295 void PascalParser::procedureHeadersPart() {
01296     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
01297     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
01298     RefPascalAST procedureHeadersPart_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
01299     
01300     try {      // for error handling
01301         switch ( LA(1)) {
01302         case PROCEDURE:
01303         {
01304             procedureHeader();
01305             if (inputState->guessing==0) {
01306                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
01307             }
01308             procedureHeadersPart_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
01309             break;
01310         }
01311         case FUNCTION:
01312         {
01313             functionHeader();
01314             if (inputState->guessing==0) {
01315                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
01316             }
01317             procedureHeadersPart_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
01318             break;
01319         }
01320         default:
01321         {
01322             throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
01323         }
01324         }
01325     }
01326     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
01327         if( inputState->guessing == 0 ) {
01328             reportError(ex);
01329             consume();
01330             consumeUntil(_tokenSet_15);
01331         } else {
01332             throw;
01333         }
01334     }
01335     returnAST = procedureHeadersPart_AST;
01336 }
01337 
01338 void PascalParser::statement() {
01339     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
01340     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
01341     RefPascalAST statement_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
01342     
01343     try {      // for error handling
01344         {
01345         switch ( LA(1)) {
01346         case NUM_INT:
01347         {
01348             label();
01349             if (inputState->guessing==0) {
01350                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
01351             }
01352             match(COLON);
01353             break;
01354         }
01355         case BEGIN:
01356         case CASE:
01357         case GOTO:
01358         case IF:
01359         case WHILE:
01360         case REPEAT:
01361         case FOR:
01362         case WITH:
01363         case RAISE:
01364         case TRY:
01365         case IDENT:
01366         {
01367             break;
01368         }
01369         default:
01370         {
01371             throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
01372         }
01373         }
01374         }
01375         {
01376         switch ( LA(1)) {
01377         case GOTO:
01378         case RAISE:
01379         case IDENT:
01380         {
01381             simpleStatement();
01382             if (inputState->guessing==0) {
01383                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
01384             }
01385             break;
01386         }
01387         case BEGIN:
01388         case CASE:
01389         case IF:
01390         case WHILE:
01391         case REPEAT:
01392         case FOR:
01393         case WITH:
01394         case TRY:
01395         {
01396             structuredStatement();
01397             if (inputState->guessing==0) {
01398                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
01399             }
01400             break;
01401         }
01402         default:
01403         {
01404             throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
01405         }
01406         }
01407         }
01408         statement_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
01409     }
01410     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
01411         if( inputState->guessing == 0 ) {
01412             reportError(ex);
01413             consume();
01414             consumeUntil(_tokenSet_16);
01415         } else {
01416             throw;
01417         }
01418     }
01419     returnAST = statement_AST;
01420 }
01421 
01422 void PascalParser::labelDeclarationPart() {
01423     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
01424     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
01425     RefPascalAST labelDeclarationPart_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
01426     
01427     try {      // for error handling
01428         RefPascalAST tmp33_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
01429         if ( inputState->guessing == 0 ) {
01430             tmp33_AST = astFactory->create(LT(1));
01431             astFactory->makeASTRoot(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(tmp33_AST.get()));
01432         }
01433         match(LABEL);
01434         label();
01435         if (inputState->guessing==0) {
01436             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
01437         }
01438         { // ( ... )*
01439         for (;;) {
01440             if ((LA(1) == COMMA)) {
01441                 match(COMMA);
01442                 label();
01443                 if (inputState->guessing==0) {
01444                     astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
01445                 }
01446             }
01447             else {
01448                 goto _loop44;
01449             }
01450             
01451         }
01452         _loop44:;
01453         } // ( ... )*
01454         match(SEMI);
01455         labelDeclarationPart_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
01456     }
01457     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
01458         if( inputState->guessing == 0 ) {
01459             reportError(ex);
01460             consume();
01461             consumeUntil(_tokenSet_17);
01462         } else {
01463             throw;
01464         }
01465     }
01466     returnAST = labelDeclarationPart_AST;
01467 }
01468 
01469 void PascalParser::resourcestringDeclarationPart() {
01470     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
01471     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
01472     RefPascalAST resourcestringDeclarationPart_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
01473     
01474     try {      // for error handling
01475         RefPascalAST tmp36_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
01476         if ( inputState->guessing == 0 ) {
01477             tmp36_AST = astFactory->create(LT(1));
01478             astFactory->makeASTRoot(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(tmp36_AST.get()));
01479         }
01480         match(RESOURCESTRING);
01481         { // ( ... )*
01482         for (;;) {
01483             if ((LA(1) == IDENT)) {
01484                 stringConstantDeclaration();
01485                 if (inputState->guessing==0) {
01486                     astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
01487                 }
01488             }
01489             else {
01490                 goto _loop50;
01491             }
01492             
01493         }
01494         _loop50:;
01495         } // ( ... )*
01496         resourcestringDeclarationPart_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
01497     }
01498     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
01499         if( inputState->guessing == 0 ) {
01500             reportError(ex);
01501             consume();
01502             consumeUntil(_tokenSet_17);
01503         } else {
01504             throw;
01505         }
01506     }
01507     returnAST = resourcestringDeclarationPart_AST;
01508 }
01509 
01510 void PascalParser::variableDeclarationPart() {
01511     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
01512     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
01513     RefPascalAST variableDeclarationPart_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
01514     
01515     try {      // for error handling
01516         RefPascalAST tmp37_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
01517         if ( inputState->guessing == 0 ) {
01518             tmp37_AST = astFactory->create(LT(1));
01519             astFactory->makeASTRoot(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(tmp37_AST.get()));
01520         }
01521         match(VAR);
01522         variableDeclaration();
01523         if (inputState->guessing==0) {
01524             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
01525         }
01526         { // ( ... )*
01527         for (;;) {
01528             if ((LA(1) == SEMI) && (LA(2) == IDENT)) {
01529                 match(SEMI);
01530                 variableDeclaration();
01531                 if (inputState->guessing==0) {
01532                     astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
01533                 }
01534             }
01535             else {
01536                 goto _loop57;
01537             }
01538             
01539         }
01540         _loop57:;
01541         } // ( ... )*
01542         match(SEMI);
01543         variableDeclarationPart_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
01544     }
01545     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
01546         if( inputState->guessing == 0 ) {
01547             reportError(ex);
01548             consume();
01549             consumeUntil(_tokenSet_17);
01550         } else {
01551             throw;
01552         }
01553     }
01554     returnAST = variableDeclarationPart_AST;
01555 }
01556 
01557 void PascalParser::procedureAndFunctionDeclarationPart() {
01558     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
01559     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
01560     RefPascalAST procedureAndFunctionDeclarationPart_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
01561     
01562     try {      // for error handling
01563         procedureAndFunctionDeclaration();
01564         if (inputState->guessing==0) {
01565             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
01566         }
01567         procedureAndFunctionDeclarationPart_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
01568     }
01569     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
01570         if( inputState->guessing == 0 ) {
01571             reportError(ex);
01572             consume();
01573             consumeUntil(_tokenSet_17);
01574         } else {
01575             throw;
01576         }
01577     }
01578     returnAST = procedureAndFunctionDeclarationPart_AST;
01579 }
01580 
01581 void PascalParser::label() {
01582     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
01583     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
01584     RefPascalAST label_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
01585     
01586     try {      // for error handling
01587         unsignedInteger();
01588         if (inputState->guessing==0) {
01589             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
01590         }
01591         label_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
01592     }
01593     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
01594         if( inputState->guessing == 0 ) {
01595             reportError(ex);
01596             consume();
01597             consumeUntil(_tokenSet_18);
01598         } else {
01599             throw;
01600         }
01601     }
01602     returnAST = label_AST;
01603 }
01604 
01605 void PascalParser::constantDeclaration() {
01606     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
01607     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
01608     RefPascalAST constantDeclaration_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
01609     
01610     try {      // for error handling
01611         identifier();
01612         if (inputState->guessing==0) {
01613             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
01614         }
01615         match(EQUAL);
01616         expression();
01617         if (inputState->guessing==0) {
01618             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
01619         }
01620         match(SEMI);
01621         constantDeclaration_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
01622     }
01623     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
01624         if( inputState->guessing == 0 ) {
01625             reportError(ex);
01626             consume();
01627             consumeUntil(_tokenSet_19);
01628         } else {
01629             throw;
01630         }
01631     }
01632     returnAST = constantDeclaration_AST;
01633 }
01634 
01635 void PascalParser::typedConstantDeclaration() {
01636     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
01637     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
01638     RefPascalAST typedConstantDeclaration_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
01639     
01640     try {      // for error handling
01641         identifier();
01642         if (inputState->guessing==0) {
01643             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
01644         }
01645         match(COLON);
01646         type();
01647         if (inputState->guessing==0) {
01648             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
01649         }
01650         match(EQUAL);
01651         typedConstant();
01652         if (inputState->guessing==0) {
01653             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
01654         }
01655         match(SEMI);
01656         typedConstantDeclaration_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
01657     }
01658     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
01659         if( inputState->guessing == 0 ) {
01660             reportError(ex);
01661             consume();
01662             consumeUntil(_tokenSet_19);
01663         } else {
01664             throw;
01665         }
01666     }
01667     returnAST = typedConstantDeclaration_AST;
01668 }
01669 
01670 void PascalParser::stringConstantDeclaration() {
01671     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
01672     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
01673     RefPascalAST stringConstantDeclaration_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
01674     
01675     try {      // for error handling
01676         identifier();
01677         if (inputState->guessing==0) {
01678             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
01679         }
01680         match(EQUAL);
01681         string();
01682         if (inputState->guessing==0) {
01683             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
01684         }
01685         stringConstantDeclaration_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
01686     }
01687     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
01688         if( inputState->guessing == 0 ) {
01689             reportError(ex);
01690             consume();
01691             consumeUntil(_tokenSet_20);
01692         } else {
01693             throw;
01694         }
01695     }
01696     returnAST = stringConstantDeclaration_AST;
01697 }
01698 
01699 void PascalParser::string() {
01700     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
01701     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
01702     RefPascalAST string_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
01703     
01704     try {      // for error handling
01705         RefPascalAST tmp46_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
01706         if ( inputState->guessing == 0 ) {
01707             tmp46_AST = astFactory->create(LT(1));
01708             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(tmp46_AST.get()));
01709         }
01710         match(STRING_LITERAL);
01711         string_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
01712     }
01713     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
01714         if( inputState->guessing == 0 ) {
01715             reportError(ex);
01716             consume();
01717             consumeUntil(_tokenSet_21);
01718         } else {
01719             throw;
01720         }
01721     }
01722     returnAST = string_AST;
01723 }
01724 
01725 void PascalParser::typeDeclaration() {
01726     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
01727     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
01728     RefPascalAST typeDeclaration_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
01729     
01730     try {      // for error handling
01731         identifier();
01732         if (inputState->guessing==0) {
01733             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
01734         }
01735         match(EQUAL);
01736         type();
01737         if (inputState->guessing==0) {
01738             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
01739         }
01740         match(SEMI);
01741         typeDeclaration_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
01742     }
01743     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
01744         if( inputState->guessing == 0 ) {
01745             reportError(ex);
01746             consume();
01747             consumeUntil(_tokenSet_19);
01748         } else {
01749             throw;
01750         }
01751     }
01752     returnAST = typeDeclaration_AST;
01753 }
01754 
01755 void PascalParser::variableDeclaration() {
01756     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
01757     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
01758     RefPascalAST variableDeclaration_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
01759     ANTLR_USE_NAMESPACE(antlr)RefToken  c = ANTLR_USE_NAMESPACE(antlr)nullToken;
01760     RefPascalAST c_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
01761     
01762     try {      // for error handling
01763         identifierList();
01764         if (inputState->guessing==0) {
01765             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
01766         }
01767         c = LT(1);
01768         if ( inputState->guessing == 0 ) {
01769             c_AST = astFactory->create(c);
01770             astFactory->makeASTRoot(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(c_AST.get()));
01771         }
01772         match(COLON);
01773         if ( inputState->guessing==0 ) {
01774 #line 246 "pascal.g"
01775             c_AST->setType(VARDECL);
01776 #line 1777 "PascalParser.cpp"
01777         }
01778         type();
01779         if (inputState->guessing==0) {
01780             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
01781         }
01782         variableDeclaration_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
01783     }
01784     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
01785         if( inputState->guessing == 0 ) {
01786             reportError(ex);
01787             consume();
01788             consumeUntil(_tokenSet_22);
01789         } else {
01790             throw;
01791         }
01792     }
01793     returnAST = variableDeclaration_AST;
01794 }
01795 
01796 void PascalParser::type() {
01797     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
01798     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
01799     RefPascalAST type_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
01800     
01801     try {      // for error handling
01802         switch ( LA(1)) {
01803         case INTEGER:
01804         case SHORTINT:
01805         case SMALLINT:
01806         case LONGINT:
01807         case INT64:
01808         case BYTE:
01809         case WORD:
01810         case CARDINAL:
01811         case QWORD:
01812         case BOOLEAN:
01813         case BYTEBOOL:
01814         case LONGBOOL:
01815         case CHAR:
01816         case REAL:
01817         case SINGLE:
01818         case DOUBLE:
01819         case EXTENDED:
01820         case COMP:
01821         {
01822             simpleType();
01823             if (inputState->guessing==0) {
01824                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
01825             }
01826             type_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
01827             break;
01828         }
01829         case NUM_INT:
01830         case PLUS:
01831         case MINUS:
01832         case STRING_LITERAL:
01833         case CHR:
01834         case NUM_REAL:
01835         case IDENT:
01836         {
01837             subrangeTypeOrTypeIdentifier();
01838             if (inputState->guessing==0) {
01839                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
01840             }
01841             type_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
01842             break;
01843         }
01844         case LPAREN:
01845         {
01846             enumeratedType();
01847             if (inputState->guessing==0) {
01848                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
01849             }
01850             type_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
01851             break;
01852         }
01853         case STRING:
01854         {
01855             stringType();
01856             if (inputState->guessing==0) {
01857                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
01858             }
01859             type_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
01860             break;
01861         }
01862         case ARRAY:
01863         case PACKED:
01864         case RECORD:
01865         case SET:
01866         case FILE:
01867         case OBJECT:
01868         case CLASS:
01869         {
01870             structuredType();
01871             if (inputState->guessing==0) {
01872                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
01873             }
01874             type_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
01875             break;
01876         }
01877         case POINTER:
01878         {
01879             pointerType();
01880             if (inputState->guessing==0) {
01881                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
01882             }
01883             type_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
01884             break;
01885         }
01886         case PROCEDURE:
01887         case FUNCTION:
01888         {
01889             proceduralType();
01890             if (inputState->guessing==0) {
01891                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
01892             }
01893             type_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
01894             break;
01895         }
01896         default:
01897         {
01898             throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
01899         }
01900         }
01901     }
01902     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
01903         if( inputState->guessing == 0 ) {
01904             reportError(ex);
01905             consume();
01906             consumeUntil(_tokenSet_23);
01907         } else {
01908             throw;
01909         }
01910     }
01911     returnAST = type_AST;
01912 }
01913 
01914 void PascalParser::procedureAndFunctionDeclaration() {
01915     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
01916     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
01917     RefPascalAST procedureAndFunctionDeclaration_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
01918     
01919     try {      // for error handling
01920         switch ( LA(1)) {
01921         case PROCEDURE:
01922         {
01923             procedureDeclaration();
01924             if (inputState->guessing==0) {
01925                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
01926             }
01927             procedureAndFunctionDeclaration_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
01928             break;
01929         }
01930         case FUNCTION:
01931         {
01932             functionDeclaration();
01933             if (inputState->guessing==0) {
01934                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
01935             }
01936             procedureAndFunctionDeclaration_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
01937             break;
01938         }
01939         case CONSTRUCTOR:
01940         {
01941             constructorDeclaration();
01942             if (inputState->guessing==0) {
01943                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
01944             }
01945             procedureAndFunctionDeclaration_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
01946             break;
01947         }
01948         case DESTRUCTOR:
01949         {
01950             destructorDeclaration();
01951             if (inputState->guessing==0) {
01952                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
01953             }
01954             procedureAndFunctionDeclaration_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
01955             break;
01956         }
01957         default:
01958         {
01959             throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
01960         }
01961         }
01962     }
01963     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
01964         if( inputState->guessing == 0 ) {
01965             reportError(ex);
01966             consume();
01967             consumeUntil(_tokenSet_17);
01968         } else {
01969             throw;
01970         }
01971     }
01972     returnAST = procedureAndFunctionDeclaration_AST;
01973 }
01974 
01975 void PascalParser::procedureDeclaration() {
01976     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
01977     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
01978     RefPascalAST procedureDeclaration_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
01979     
01980     try {      // for error handling
01981         procedureHeader();
01982         if (inputState->guessing==0) {
01983             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
01984         }
01985         subroutineBlock();
01986         if (inputState->guessing==0) {
01987             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
01988         }
01989         match(SEMI);
01990         procedureDeclaration_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
01991     }
01992     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
01993         if( inputState->guessing == 0 ) {
01994             reportError(ex);
01995             consume();
01996             consumeUntil(_tokenSet_17);
01997         } else {
01998             throw;
01999         }
02000     }
02001     returnAST = procedureDeclaration_AST;
02002 }
02003 
02004 void PascalParser::functionDeclaration() {
02005     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
02006     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
02007     RefPascalAST functionDeclaration_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
02008     
02009     try {      // for error handling
02010         functionHeader();
02011         if (inputState->guessing==0) {
02012             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
02013         }
02014         subroutineBlock();
02015         if (inputState->guessing==0) {
02016             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
02017         }
02018         match(SEMI);
02019         functionDeclaration_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
02020     }
02021     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
02022         if( inputState->guessing == 0 ) {
02023             reportError(ex);
02024             consume();
02025             consumeUntil(_tokenSet_17);
02026         } else {
02027             throw;
02028         }
02029     }
02030     returnAST = functionDeclaration_AST;
02031 }
02032 
02033 void PascalParser::constructorDeclaration() {
02034     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
02035     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
02036     RefPascalAST constructorDeclaration_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
02037     
02038     try {      // for error handling
02039         constructorHeader();
02040         if (inputState->guessing==0) {
02041             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
02042         }
02043         match(SEMI);
02044         subroutineBlock();
02045         if (inputState->guessing==0) {
02046             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
02047         }
02048         constructorDeclaration_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
02049     }
02050     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
02051         if( inputState->guessing == 0 ) {
02052             reportError(ex);
02053             consume();
02054             consumeUntil(_tokenSet_17);
02055         } else {
02056             throw;
02057         }
02058     }
02059     returnAST = constructorDeclaration_AST;
02060 }
02061 
02062 void PascalParser::destructorDeclaration() {
02063     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
02064     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
02065     RefPascalAST destructorDeclaration_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
02066     
02067     try {      // for error handling
02068         destructorHeader();
02069         if (inputState->guessing==0) {
02070             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
02071         }
02072         match(SEMI);
02073         subroutineBlock();
02074         if (inputState->guessing==0) {
02075             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
02076         }
02077         destructorDeclaration_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
02078     }
02079     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
02080         if( inputState->guessing == 0 ) {
02081             reportError(ex);
02082             consume();
02083             consumeUntil(_tokenSet_17);
02084         } else {
02085             throw;
02086         }
02087     }
02088     returnAST = destructorDeclaration_AST;
02089 }
02090 
02091 void PascalParser::compoundStatement() {
02092     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
02093     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
02094     RefPascalAST compoundStatement_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
02095     
02096     try {      // for error handling
02097         if ((LA(1) == BEGIN) && (LA(2) == END)) {
02098             match(BEGIN);
02099             match(END);
02100             compoundStatement_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
02101         }
02102         else if ((LA(1) == BEGIN) && (LA(2) == SEMI)) {
02103             match(BEGIN);
02104             { // ( ... )+
02105             int _cnt312=0;
02106             for (;;) {
02107                 if ((LA(1) == SEMI)) {
02108                     match(SEMI);
02109                 }
02110                 else {
02111                     if ( _cnt312>=1 ) { goto _loop312; } else {throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());}
02112                 }
02113                 
02114                 _cnt312++;
02115             }
02116             _loop312:;
02117             }  // ( ... )+
02118             match(END);
02119             compoundStatement_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
02120         }
02121         else if ((LA(1) == BEGIN) && (_tokenSet_24.member(LA(2)))) {
02122             match(BEGIN);
02123             statement();
02124             if (inputState->guessing==0) {
02125                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
02126             }
02127             { // ( ... )*
02128             for (;;) {
02129                 if ((LA(1) == SEMI)) {
02130                     match(SEMI);
02131                     {
02132                     switch ( LA(1)) {
02133                     case BEGIN:
02134                     case NUM_INT:
02135                     case CASE:
02136                     case GOTO:
02137                     case IF:
02138                     case WHILE:
02139                     case REPEAT:
02140                     case FOR:
02141                     case WITH:
02142                     case RAISE:
02143                     case TRY:
02144                     case IDENT:
02145                     {
02146                         statement();
02147                         if (inputState->guessing==0) {
02148                             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
02149                         }
02150                         break;
02151                     }
02152                     case SEMI:
02153                     case END:
02154                     {
02155                         break;
02156                     }
02157                     default:
02158                     {
02159                         throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
02160                     }
02161                     }
02162                     }
02163                 }
02164                 else {
02165                     goto _loop315;
02166                 }
02167                 
02168             }
02169             _loop315:;
02170             } // ( ... )*
02171             match(END);
02172             compoundStatement_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
02173         }
02174         else {
02175             throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
02176         }
02177         
02178     }
02179     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
02180         if( inputState->guessing == 0 ) {
02181             reportError(ex);
02182             consume();
02183             consumeUntil(_tokenSet_25);
02184         } else {
02185             throw;
02186         }
02187     }
02188     returnAST = compoundStatement_AST;
02189 }
02190 
02191 void PascalParser::procedureHeader() {
02192     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
02193     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
02194     RefPascalAST procedureHeader_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
02195     
02196     try {      // for error handling
02197         RefPascalAST tmp61_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
02198         if ( inputState->guessing == 0 ) {
02199             tmp61_AST = astFactory->create(LT(1));
02200             astFactory->makeASTRoot(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(tmp61_AST.get()));
02201         }
02202         match(PROCEDURE);
02203         {
02204         if ((LA(1) == IDENT) && (LA(2) == SEMI || LA(2) == LPAREN)) {
02205             identifier();
02206             if (inputState->guessing==0) {
02207                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
02208             }
02209         }
02210         else if ((LA(1) == IDENT) && (LA(2) == COLON)) {
02211             qualifiedMethodIdentifier();
02212             if (inputState->guessing==0) {
02213                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
02214             }
02215         }
02216         else {
02217             throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
02218         }
02219         
02220         }
02221         {
02222         switch ( LA(1)) {
02223         case LPAREN:
02224         {
02225             formalParameterList();
02226             if (inputState->guessing==0) {
02227                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
02228             }
02229             break;
02230         }
02231         case SEMI:
02232         {
02233             break;
02234         }
02235         default:
02236         {
02237             throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
02238         }
02239         }
02240         }
02241         match(SEMI);
02242         { // ( ... )*
02243         for (;;) {
02244             if (((LA(1) >= PUBLIC && LA(1) <= FAR))) {
02245                 modifiers();
02246                 if (inputState->guessing==0) {
02247                     astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
02248                 }
02249                 match(SEMI);
02250             }
02251             else {
02252                 goto _loop68;
02253             }
02254             
02255         }
02256         _loop68:;
02257         } // ( ... )*
02258         procedureHeader_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
02259     }
02260     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
02261         if( inputState->guessing == 0 ) {
02262             reportError(ex);
02263             consume();
02264             consumeUntil(_tokenSet_26);
02265         } else {
02266             throw;
02267         }
02268     }
02269     returnAST = procedureHeader_AST;
02270 }
02271 
02272 void PascalParser::subroutineBlock() {
02273     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
02274     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
02275     RefPascalAST subroutineBlock_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
02276     
02277     try {      // for error handling
02278         switch ( LA(1)) {
02279         case BEGIN:
02280         case LABEL:
02281         case CONST:
02282         case RESOURCESTRING:
02283         case TYPE:
02284         case VAR:
02285         case PROCEDURE:
02286         case FUNCTION:
02287         case CONSTRUCTOR:
02288         case DESTRUCTOR:
02289         {
02290             block();
02291             if (inputState->guessing==0) {
02292                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
02293             }
02294             subroutineBlock_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
02295             break;
02296         }
02297         case EXTERNAL:
02298         {
02299             externalDirective();
02300             if (inputState->guessing==0) {
02301                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
02302             }
02303             subroutineBlock_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
02304             break;
02305         }
02306         case FORWARD:
02307         {
02308             match(FORWARD);
02309             subroutineBlock_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
02310             break;
02311         }
02312         default:
02313         {
02314             throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
02315         }
02316         }
02317     }
02318     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
02319         if( inputState->guessing == 0 ) {
02320             reportError(ex);
02321             consume();
02322             consumeUntil(_tokenSet_27);
02323         } else {
02324             throw;
02325         }
02326     }
02327     returnAST = subroutineBlock_AST;
02328 }
02329 
02330 void PascalParser::functionHeader() {
02331     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
02332     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
02333     RefPascalAST functionHeader_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
02334     
02335     try {      // for error handling
02336         bool synPredMatched74 = false;
02337         if (((LA(1) == FUNCTION) && (LA(2) == IDENT))) {
02338             int _m74 = mark();
02339             synPredMatched74 = true;
02340             inputState->guessing++;
02341             try {
02342                 {
02343                 match(FUNCTION);
02344                 identifier();
02345                 match(COLON);
02346                 type();
02347                 match(SEMI);
02348                 }
02349             }
02350             catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& pe) {
02351                 synPredMatched74 = false;
02352             }
02353             rewind(_m74);
02354             inputState->guessing--;
02355         }
02356         if ( synPredMatched74 ) {
02357             RefPascalAST tmp65_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
02358             if ( inputState->guessing == 0 ) {
02359                 tmp65_AST = astFactory->create(LT(1));
02360                 astFactory->makeASTRoot(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(tmp65_AST.get()));
02361             }
02362             match(FUNCTION);
02363             identifier();
02364             if (inputState->guessing==0) {
02365                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
02366             }
02367             match(COLON);
02368             type();
02369             if (inputState->guessing==0) {
02370                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
02371             }
02372             match(SEMI);
02373             { // ( ... )*
02374             for (;;) {
02375                 if (((LA(1) >= PUBLIC && LA(1) <= FAR))) {
02376                     modifiers();
02377                     if (inputState->guessing==0) {
02378                         astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
02379                     }
02380                     match(SEMI);
02381                 }
02382                 else {
02383                     goto _loop76;
02384                 }
02385                 
02386             }
02387             _loop76:;
02388             } // ( ... )*
02389             functionHeader_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
02390         }
02391         else {
02392             bool synPredMatched78 = false;
02393             if (((LA(1) == FUNCTION) && (LA(2) == IDENT))) {
02394                 int _m78 = mark();
02395                 synPredMatched78 = true;
02396                 inputState->guessing++;
02397                 try {
02398                     {
02399                     match(FUNCTION);
02400                     identifier();
02401                     match(COLON);
02402                     match(COLON);
02403                     identifier();
02404                     match(COLON);
02405                     type();
02406                     match(SEMI);
02407                     }
02408                 }
02409                 catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& pe) {
02410                     synPredMatched78 = false;
02411                 }
02412                 rewind(_m78);
02413                 inputState->guessing--;
02414             }
02415             if ( synPredMatched78 ) {
02416                 RefPascalAST tmp69_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
02417                 if ( inputState->guessing == 0 ) {
02418                     tmp69_AST = astFactory->create(LT(1));
02419                     astFactory->makeASTRoot(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(tmp69_AST.get()));
02420                 }
02421                 match(FUNCTION);
02422                 qualifiedMethodIdentifier();
02423                 if (inputState->guessing==0) {
02424                     astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
02425                 }
02426                 match(COLON);
02427                 type();
02428                 if (inputState->guessing==0) {
02429                     astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
02430                 }
02431                 match(SEMI);
02432                 { // ( ... )*
02433                 for (;;) {
02434                     if (((LA(1) >= PUBLIC && LA(1) <= FAR))) {
02435                         modifiers();
02436                         if (inputState->guessing==0) {
02437                             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
02438                         }
02439                         match(SEMI);
02440                     }
02441                     else {
02442                         goto _loop80;
02443                     }
02444                     
02445                 }
02446                 _loop80:;
02447                 } // ( ... )*
02448                 functionHeader_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
02449             }
02450             else {
02451                 bool synPredMatched82 = false;
02452                 if (((LA(1) == FUNCTION) && (LA(2) == IDENT))) {
02453                     int _m82 = mark();
02454                     synPredMatched82 = true;
02455                     inputState->guessing++;
02456                     try {
02457                         {
02458                         match(FUNCTION);
02459                         identifier();
02460                         match(COLON);
02461                         match(COLON);
02462                         identifier();
02463                         match(LPAREN);
02464                         }
02465                     }
02466                     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& pe) {
02467                         synPredMatched82 = false;
02468                     }
02469                     rewind(_m82);
02470                     inputState->guessing--;
02471                 }
02472                 if ( synPredMatched82 ) {
02473                     RefPascalAST tmp73_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
02474                     if ( inputState->guessing == 0 ) {
02475                         tmp73_AST = astFactory->create(LT(1));
02476                         astFactory->makeASTRoot(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(tmp73_AST.get()));
02477                     }
02478                     match(FUNCTION);
02479                     qualifiedMethodIdentifier();
02480                     if (inputState->guessing==0) {
02481                         astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
02482                     }
02483                     formalParameterList();
02484                     if (inputState->guessing==0) {
02485                         astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
02486                     }
02487                     match(COLON);
02488                     type();
02489                     if (inputState->guessing==0) {
02490                         astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
02491                     }
02492                     match(SEMI);
02493                     { // ( ... )*
02494                     for (;;) {
02495                         if (((LA(1) >= PUBLIC && LA(1) <= FAR))) {
02496                             modifiers();
02497                             if (inputState->guessing==0) {
02498                                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
02499                             }
02500                             match(SEMI);
02501                         }
02502                         else {
02503                             goto _loop84;
02504                         }
02505                         
02506                     }
02507                     _loop84:;
02508                     } // ( ... )*
02509                     functionHeader_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
02510                 }
02511                 else if ((LA(1) == FUNCTION) && (LA(2) == IDENT)) {
02512                     RefPascalAST tmp77_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
02513                     if ( inputState->guessing == 0 ) {
02514                         tmp77_AST = astFactory->create(LT(1));
02515                         astFactory->makeASTRoot(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(tmp77_AST.get()));
02516                     }
02517                     match(FUNCTION);
02518                     identifier();
02519                     if (inputState->guessing==0) {
02520                         astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
02521                     }
02522                     formalParameterList();
02523                     if (inputState->guessing==0) {
02524                         astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
02525                     }
02526                     match(COLON);
02527                     type();
02528                     if (inputState->guessing==0) {
02529                         astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
02530                     }
02531                     match(SEMI);
02532                     { // ( ... )*
02533                     for (;;) {
02534                         if (((LA(1) >= PUBLIC && LA(1) <= FAR))) {
02535                             modifiers();
02536                             if (inputState->guessing==0) {
02537                                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
02538                             }
02539                             match(SEMI);
02540                         }
02541                         else {
02542                             goto _loop86;
02543                         }
02544                         
02545                     }
02546                     _loop86:;
02547                     } // ( ... )*
02548                     functionHeader_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
02549                 }
02550         else {
02551             throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
02552         }
02553         }}
02554     }
02555     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
02556         if( inputState->guessing == 0 ) {
02557             reportError(ex);
02558             consume();
02559             consumeUntil(_tokenSet_26);
02560         } else {
02561             throw;
02562         }
02563     }
02564     returnAST = functionHeader_AST;
02565 }
02566 
02567 void PascalParser::qualifiedMethodIdentifier() {
02568     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
02569     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
02570     RefPascalAST qualifiedMethodIdentifier_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
02571     
02572     try {      // for error handling
02573         identifier();
02574         if (inputState->guessing==0) {
02575             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
02576         }
02577         match(COLON);
02578         match(COLON);
02579         identifier();
02580         if (inputState->guessing==0) {
02581             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
02582         }
02583         qualifiedMethodIdentifier_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
02584     }
02585     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
02586         if( inputState->guessing == 0 ) {
02587             reportError(ex);
02588             consume();
02589             consumeUntil(_tokenSet_28);
02590         } else {
02591             throw;
02592         }
02593     }
02594     returnAST = qualifiedMethodIdentifier_AST;
02595 }
02596 
02597 void PascalParser::formalParameterList() {
02598     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
02599     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
02600     RefPascalAST formalParameterList_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
02601     
02602     try {      // for error handling
02603         match(LPAREN);
02604         parameterDeclaration();
02605         if (inputState->guessing==0) {
02606             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
02607         }
02608         { // ( ... )*
02609         for (;;) {
02610             if ((LA(1) == SEMI)) {
02611                 match(SEMI);
02612                 parameterDeclaration();
02613                 if (inputState->guessing==0) {
02614                     astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
02615                 }
02616             }
02617             else {
02618                 goto _loop96;
02619             }
02620             
02621         }
02622         _loop96:;
02623         } // ( ... )*
02624         match(RPAREN);
02625         formalParameterList_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
02626     }
02627     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
02628         if( inputState->guessing == 0 ) {
02629             reportError(ex);
02630             consume();
02631             consumeUntil(_tokenSet_29);
02632         } else {
02633             throw;
02634         }
02635     }
02636     returnAST = formalParameterList_AST;
02637 }
02638 
02639 void PascalParser::modifiers() {
02640     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
02641     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
02642     RefPascalAST modifiers_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
02643     
02644     try {      // for error handling
02645         switch ( LA(1)) {
02646         case PUBLIC:
02647         {
02648             match(PUBLIC);
02649             modifiers_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
02650             break;
02651         }
02652         case ALIAS:
02653         {
02654             {
02655             match(ALIAS);
02656             stringConstant();
02657             if (inputState->guessing==0) {
02658                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
02659             }
02660             }
02661             modifiers_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
02662             break;
02663         }
02664         case INTERRUPT:
02665         {
02666             match(INTERRUPT);
02667             modifiers_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
02668             break;
02669         }
02670         case REGISTER:
02671         case PASCAL:
02672         case CDECL:
02673         case STDCALL:
02674         case POPSTACK:
02675         case SAVEREGISTERS:
02676         case INLINE:
02677         case SAFECALL:
02678         case NEAR:
02679         case FAR:
02680         {
02681             callModifiers();
02682             if (inputState->guessing==0) {
02683                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
02684             }
02685             modifiers_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
02686             break;
02687         }
02688         case EXPORT:
02689         {
02690             match(EXPORT);
02691             modifiers_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
02692             break;
02693         }
02694         default:
02695         {
02696             throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
02697         }
02698         }
02699     }
02700     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
02701         if( inputState->guessing == 0 ) {
02702             reportError(ex);
02703             consume();
02704             consumeUntil(_tokenSet_22);
02705         } else {
02706             throw;
02707         }
02708     }
02709     returnAST = modifiers_AST;
02710 }
02711 
02712 void PascalParser::externalDirective() {
02713     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
02714     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
02715     RefPascalAST externalDirective_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
02716     
02717     try {      // for error handling
02718         RefPascalAST tmp90_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
02719         if ( inputState->guessing == 0 ) {
02720             tmp90_AST = astFactory->create(LT(1));
02721             astFactory->makeASTRoot(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(tmp90_AST.get()));
02722         }
02723         match(EXTERNAL);
02724         {
02725         switch ( LA(1)) {
02726         case STRING_LITERAL:
02727         case CHR:
02728         {
02729             stringConstant();
02730             if (inputState->guessing==0) {
02731                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
02732             }
02733             {
02734             switch ( LA(1)) {
02735             case LITERAL_name:
02736             {
02737                 {
02738                 RefPascalAST tmp91_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
02739                 if ( inputState->guessing == 0 ) {
02740                     tmp91_AST = astFactory->create(LT(1));
02741                     astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(tmp91_AST.get()));
02742                 }
02743                 match(LITERAL_name);
02744                 stringConstant();
02745                 if (inputState->guessing==0) {
02746                     astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
02747                 }
02748                 }
02749                 break;
02750             }
02751             case LITERAL_index:
02752             {
02753                 {
02754                 RefPascalAST tmp92_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
02755                 if ( inputState->guessing == 0 ) {
02756                     tmp92_AST = astFactory->create(LT(1));
02757                     astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(tmp92_AST.get()));
02758                 }
02759                 match(LITERAL_index);
02760                 integerConstant();
02761                 if (inputState->guessing==0) {
02762                     astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
02763                 }
02764                 }
02765                 break;
02766             }
02767             case ANTLR_USE_NAMESPACE(antlr)Token::EOF_TYPE:
02768             case SEMI:
02769             case END:
02770             case EXPORTS:
02771             case BEGIN:
02772             case INITIALIZATION:
02773             case LABEL:
02774             case CONST:
02775             case RESOURCESTRING:
02776             case TYPE:
02777             case VAR:
02778             case PROCEDURE:
02779             case FUNCTION:
02780             case CONSTRUCTOR:
02781             case DESTRUCTOR:
02782             {
02783                 break;
02784             }
02785             default:
02786             {
02787                 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
02788             }
02789             }
02790             }
02791             break;
02792         }
02793         case ANTLR_USE_NAMESPACE(antlr)Token::EOF_TYPE:
02794         case SEMI:
02795         case END:
02796         case EXPORTS:
02797         case BEGIN:
02798         case INITIALIZATION:
02799         case LABEL:
02800         case CONST:
02801         case RESOURCESTRING:
02802         case TYPE:
02803         case VAR:
02804         case PROCEDURE:
02805         case FUNCTION:
02806         case CONSTRUCTOR:
02807         case DESTRUCTOR:
02808         {
02809             break;
02810         }
02811         default:
02812         {
02813             throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
02814         }
02815         }
02816         }
02817         externalDirective_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
02818     }
02819     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
02820         if( inputState->guessing == 0 ) {
02821             reportError(ex);
02822             consume();
02823             consumeUntil(_tokenSet_27);
02824         } else {
02825             throw;
02826         }
02827     }
02828     returnAST = externalDirective_AST;
02829 }
02830 
02831 void PascalParser::functionHeaderEnding() {
02832     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
02833     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
02834     RefPascalAST functionHeaderEnding_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
02835     
02836     try {      // for error handling
02837         switch ( LA(1)) {
02838         case COLON:
02839         {
02840             match(COLON);
02841             type();
02842             if (inputState->guessing==0) {
02843                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
02844             }
02845             match(SEMI);
02846             { // ( ... )*
02847             for (;;) {
02848                 if (((LA(1) >= PUBLIC && LA(1) <= FAR))) {
02849                     modifiers();
02850                     if (inputState->guessing==0) {
02851                         astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
02852                     }
02853                     match(SEMI);
02854                 }
02855                 else {
02856                     goto _loop91;
02857                 }
02858                 
02859             }
02860             _loop91:;
02861             } // ( ... )*
02862             functionHeaderEnding_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
02863             break;
02864         }
02865         case LPAREN:
02866         {
02867             formalParameterList();
02868             if (inputState->guessing==0) {
02869                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
02870             }
02871             match(COLON);
02872             type();
02873             if (inputState->guessing==0) {
02874                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
02875             }
02876             match(SEMI);
02877             { // ( ... )*
02878             for (;;) {
02879                 if (((LA(1) >= PUBLIC && LA(1) <= FAR))) {
02880                     modifiers();
02881                     if (inputState->guessing==0) {
02882                         astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
02883                     }
02884                     match(SEMI);
02885                 }
02886                 else {
02887                     goto _loop93;
02888                 }
02889                 
02890             }
02891             _loop93:;
02892             } // ( ... )*
02893             functionHeaderEnding_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
02894             break;
02895         }
02896         default:
02897         {
02898             throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
02899         }
02900         }
02901     }
02902     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
02903         if( inputState->guessing == 0 ) {
02904             reportError(ex);
02905             consume();
02906             consumeUntil(_tokenSet_0);
02907         } else {
02908             throw;
02909         }
02910     }
02911     returnAST = functionHeaderEnding_AST;
02912 }
02913 
02914 void PascalParser::parameterDeclaration() {
02915     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
02916     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
02917     RefPascalAST parameterDeclaration_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
02918     
02919     try {      // for error handling
02920         switch ( LA(1)) {
02921         case IDENT:
02922         {
02923             valueParameter();
02924             if (inputState->guessing==0) {
02925                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
02926             }
02927             parameterDeclaration_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
02928             break;
02929         }
02930         case VAR:
02931         {
02932             variableParameter();
02933             if (inputState->guessing==0) {
02934                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
02935             }
02936             parameterDeclaration_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
02937             break;
02938         }
02939         case CONST:
02940         {
02941             constantParameter();
02942             if (inputState->guessing==0) {
02943                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
02944             }
02945             parameterDeclaration_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
02946             break;
02947         }
02948         default:
02949         {
02950             throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
02951         }
02952         }
02953     }
02954     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
02955         if( inputState->guessing == 0 ) {
02956             reportError(ex);
02957             consume();
02958             consumeUntil(_tokenSet_30);
02959         } else {
02960             throw;
02961         }
02962     }
02963     returnAST = parameterDeclaration_AST;
02964 }
02965 
02966 void PascalParser::valueParameter() {
02967     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
02968     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
02969     RefPascalAST valueParameter_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
02970     
02971     try {      // for error handling
02972         bool synPredMatched100 = false;
02973         if (((LA(1) == IDENT) && (LA(2) == COMMA || LA(2) == COLON))) {
02974             int _m100 = mark();
02975             synPredMatched100 = true;
02976             inputState->guessing++;
02977             try {
02978                 {
02979                 identifierList();
02980                 match(COLON);
02981                 match(ARRAY);
02982                 match(OF);
02983                 }
02984             }
02985             catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& pe) {
02986                 synPredMatched100 = false;
02987             }
02988             rewind(_m100);
02989             inputState->guessing--;
02990         }
02991         if ( synPredMatched100 ) {
02992             identifierList();
02993             if (inputState->guessing==0) {
02994                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
02995             }
02996             match(COLON);
02997             match(ARRAY);
02998             match(OF);
02999             type();
03000             if (inputState->guessing==0) {
03001                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
03002             }
03003             valueParameter_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
03004         }
03005         else if ((LA(1) == IDENT) && (LA(2) == COMMA || LA(2) == COLON)) {
03006             identifierList();
03007             if (inputState->guessing==0) {
03008                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
03009             }
03010             match(COLON);
03011             type();
03012             if (inputState->guessing==0) {
03013                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
03014             }
03015             valueParameter_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
03016         }
03017         else {
03018             throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
03019         }
03020         
03021     }
03022     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
03023         if( inputState->guessing == 0 ) {
03024             reportError(ex);
03025             consume();
03026             consumeUntil(_tokenSet_30);
03027         } else {
03028             throw;
03029         }
03030     }
03031     returnAST = valueParameter_AST;
03032 }
03033 
03034 void PascalParser::variableParameter() {
03035     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
03036     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
03037     RefPascalAST variableParameter_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
03038     
03039     try {      // for error handling
03040         RefPascalAST tmp103_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
03041         if ( inputState->guessing == 0 ) {
03042             tmp103_AST = astFactory->create(LT(1));
03043             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(tmp103_AST.get()));
03044         }
03045         match(VAR);
03046         identifierList();
03047         if (inputState->guessing==0) {
03048             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
03049         }
03050         {
03051         switch ( LA(1)) {
03052         case COLON:
03053         {
03054             untypedParameterPart();
03055             if (inputState->guessing==0) {
03056                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
03057             }
03058             break;
03059         }
03060         case SEMI:
03061         case RPAREN:
03062         case RBRACK:
03063         {
03064             break;
03065         }
03066         default:
03067         {
03068             throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
03069         }
03070         }
03071         }
03072         variableParameter_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
03073     }
03074     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
03075         if( inputState->guessing == 0 ) {
03076             reportError(ex);
03077             consume();
03078             consumeUntil(_tokenSet_30);
03079         } else {
03080             throw;
03081         }
03082     }
03083     returnAST = variableParameter_AST;
03084 }
03085 
03086 void PascalParser::constantParameter() {
03087     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
03088     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
03089     RefPascalAST constantParameter_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
03090     
03091     try {      // for error handling
03092         RefPascalAST tmp104_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
03093         if ( inputState->guessing == 0 ) {
03094             tmp104_AST = astFactory->create(LT(1));
03095             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(tmp104_AST.get()));
03096         }
03097         match(CONST);
03098         identifierList();
03099         if (inputState->guessing==0) {
03100             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
03101         }
03102         {
03103         switch ( LA(1)) {
03104         case COLON:
03105         {
03106             untypedParameterPart();
03107             if (inputState->guessing==0) {
03108                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
03109             }
03110             break;
03111         }
03112         case SEMI:
03113         case RPAREN:
03114         case RBRACK:
03115         {
03116             break;
03117         }
03118         default:
03119         {
03120             throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
03121         }
03122         }
03123         }
03124         constantParameter_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
03125     }
03126     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
03127         if( inputState->guessing == 0 ) {
03128             reportError(ex);
03129             consume();
03130             consumeUntil(_tokenSet_30);
03131         } else {
03132             throw;
03133         }
03134     }
03135     returnAST = constantParameter_AST;
03136 }
03137 
03138 void PascalParser::untypedParameterPart() {
03139     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
03140     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
03141     RefPascalAST untypedParameterPart_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
03142     
03143     try {      // for error handling
03144         bool synPredMatched105 = false;
03145         if (((LA(1) == COLON) && (LA(2) == ARRAY))) {
03146             int _m105 = mark();
03147             synPredMatched105 = true;
03148             inputState->guessing++;
03149             try {
03150                 {
03151                 match(COLON);
03152                 match(ARRAY);
03153                 match(OF);
03154                 type();
03155                 }
03156             }
03157             catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& pe) {
03158                 synPredMatched105 = false;
03159             }
03160             rewind(_m105);
03161             inputState->guessing--;
03162         }
03163         if ( synPredMatched105 ) {
03164             match(COLON);
03165             match(ARRAY);
03166             match(OF);
03167             type();
03168             if (inputState->guessing==0) {
03169                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
03170             }
03171             untypedParameterPart_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
03172         }
03173         else if ((LA(1) == COLON) && (_tokenSet_31.member(LA(2)))) {
03174             match(COLON);
03175             type();
03176             if (inputState->guessing==0) {
03177                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
03178             }
03179             untypedParameterPart_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
03180         }
03181         else {
03182             throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
03183         }
03184         
03185     }
03186     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
03187         if( inputState->guessing == 0 ) {
03188             reportError(ex);
03189             consume();
03190             consumeUntil(_tokenSet_30);
03191         } else {
03192             throw;
03193         }
03194     }
03195     returnAST = untypedParameterPart_AST;
03196 }
03197 
03198 void PascalParser::callModifiers() {
03199     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
03200     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
03201     RefPascalAST callModifiers_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
03202     
03203     try {      // for error handling
03204         switch ( LA(1)) {
03205         case REGISTER:
03206         {
03207             match(REGISTER);
03208             callModifiers_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
03209             break;
03210         }
03211         case PASCAL:
03212         {
03213             match(PASCAL);
03214             callModifiers_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
03215             break;
03216         }
03217         case CDECL:
03218         {
03219             match(CDECL);
03220             callModifiers_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
03221             break;
03222         }
03223         case STDCALL:
03224         {
03225             match(STDCALL);
03226             callModifiers_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
03227             break;
03228         }
03229         case POPSTACK:
03230         {
03231             match(POPSTACK);
03232             callModifiers_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
03233             break;
03234         }
03235         case SAVEREGISTERS:
03236         {
03237             match(SAVEREGISTERS);
03238             callModifiers_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
03239             break;
03240         }
03241         case INLINE:
03242         {
03243             match(INLINE);
03244             callModifiers_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
03245             break;
03246         }
03247         case SAFECALL:
03248         {
03249             match(SAFECALL);
03250             callModifiers_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
03251             break;
03252         }
03253         case NEAR:
03254         {
03255             match(NEAR);
03256             callModifiers_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
03257             break;
03258         }
03259         case FAR:
03260         {
03261             match(FAR);
03262             callModifiers_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
03263             break;
03264         }
03265         default:
03266         {
03267             throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
03268         }
03269         }
03270     }
03271     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
03272         if( inputState->guessing == 0 ) {
03273             reportError(ex);
03274             consume();
03275             consumeUntil(_tokenSet_23);
03276         } else {
03277             throw;
03278         }
03279     }
03280     returnAST = callModifiers_AST;
03281 }
03282 
03283 void PascalParser::expression() {
03284     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
03285     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
03286     RefPascalAST expression_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
03287     
03288     try {      // for error handling
03289         simpleExpression();
03290         if (inputState->guessing==0) {
03291             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
03292         }
03293         {
03294         switch ( LA(1)) {
03295         case EQUAL:
03296         case LE:
03297         case GE:
03298         case LTH:
03299         case GT:
03300         case NOT_EQUAL:
03301         case IN:
03302         case IS:
03303         {
03304             expressionSign();
03305             if (inputState->guessing==0) {
03306                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
03307             }
03308             simpleExpression();
03309             if (inputState->guessing==0) {
03310                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
03311             }
03312             break;
03313         }
03314         case DOT:
03315         case SEMI:
03316         case END:
03317         case COMMA:
03318         case RPAREN:
03319         case FINALIZATION:
03320         case OF:
03321         case DOTDOT:
03322         case RBRACK:
03323         case THEN:
03324         case ELSE:
03325         case DO:
03326         case UNTIL:
03327         case TO:
03328         case DOWNTO:
03329         case RBRACK2:
03330         case EXCEPT:
03331         case FINALLY:
03332         {
03333             break;
03334         }
03335         default:
03336         {
03337             throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
03338         }
03339         }
03340         }
03341         expression_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
03342     }
03343     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
03344         if( inputState->guessing == 0 ) {
03345             reportError(ex);
03346             consume();
03347             consumeUntil(_tokenSet_32);
03348         } else {
03349             throw;
03350         }
03351     }
03352     returnAST = expression_AST;
03353 }
03354 
03355 void PascalParser::typedConstant() {
03356     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
03357     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
03358     RefPascalAST typedConstant_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
03359     
03360     try {      // for error handling
03361         bool synPredMatched120 = false;
03362         if (((_tokenSet_33.member(LA(1))) && (_tokenSet_34.member(LA(2))))) {
03363             int _m120 = mark();
03364             synPredMatched120 = true;
03365             inputState->guessing++;
03366             try {
03367                 {
03368                 constant();
03369                 }
03370             }
03371             catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& pe) {
03372                 synPredMatched120 = false;
03373             }
03374             rewind(_m120);
03375             inputState->guessing--;
03376         }
03377         if ( synPredMatched120 ) {
03378             constant();
03379             if (inputState->guessing==0) {
03380                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
03381             }
03382             typedConstant_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
03383         }
03384         else {
03385             bool synPredMatched122 = false;
03386             if (((LA(1) == LPAREN) && (LA(2) == IDENT))) {
03387                 int _m122 = mark();
03388                 synPredMatched122 = true;
03389                 inputState->guessing++;
03390                 try {
03391                     {
03392                     match(LPAREN);
03393                     identifier();
03394                     match(COLON);
03395                     }
03396                 }
03397                 catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& pe) {
03398                     synPredMatched122 = false;
03399                 }
03400                 rewind(_m122);
03401                 inputState->guessing--;
03402             }
03403             if ( synPredMatched122 ) {
03404                 recordConstant();
03405                 if (inputState->guessing==0) {
03406                     astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
03407                 }
03408                 typedConstant_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
03409             }
03410             else {
03411                 bool synPredMatched124 = false;
03412                 if (((LA(1) == LPAREN) && (_tokenSet_35.member(LA(2))))) {
03413                     int _m124 = mark();
03414                     synPredMatched124 = true;
03415                     inputState->guessing++;
03416                     try {
03417                         {
03418                         arrayConstant();
03419                         }
03420                     }
03421                     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& pe) {
03422                         synPredMatched124 = false;
03423                     }
03424                     rewind(_m124);
03425                     inputState->guessing--;
03426                 }
03427                 if ( synPredMatched124 ) {
03428                     arrayConstant();
03429                     if (inputState->guessing==0) {
03430                         astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
03431                     }
03432                     typedConstant_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
03433                 }
03434                 else if ((_tokenSet_36.member(LA(1))) && (_tokenSet_37.member(LA(2)))) {
03435                     proceduralConstant();
03436                     if (inputState->guessing==0) {
03437                         astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
03438                     }
03439                     typedConstant_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
03440                 }
03441         else {
03442             throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
03443         }
03444         }}
03445     }
03446     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
03447         if( inputState->guessing == 0 ) {
03448             reportError(ex);
03449             consume();
03450             consumeUntil(_tokenSet_22);
03451         } else {
03452             throw;
03453         }
03454     }
03455     returnAST = typedConstant_AST;
03456 }
03457 
03458 void PascalParser::constant() {
03459     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
03460     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
03461     RefPascalAST constant_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
03462     RefPascalAST s_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
03463     RefPascalAST n_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
03464     RefPascalAST s2_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
03465     RefPascalAST id_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
03466     
03467     try {      // for error handling
03468         switch ( LA(1)) {
03469         case NUM_INT:
03470         case NUM_REAL:
03471         {
03472             unsignedNumber();
03473             if (inputState->guessing==0) {
03474                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
03475             }
03476             constant_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
03477             break;
03478         }
03479         case IDENT:
03480         {
03481             identifier();
03482             if (inputState->guessing==0) {
03483                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
03484             }
03485             constant_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
03486             break;
03487         }
03488         case STRING_LITERAL:
03489         {
03490             string();
03491             if (inputState->guessing==0) {
03492                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
03493             }
03494             constant_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
03495             break;
03496         }
03497         case CHR:
03498         {
03499             constantChr();
03500             if (inputState->guessing==0) {
03501                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
03502             }
03503             constant_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
03504             break;
03505         }
03506         default:
03507             if ((LA(1) == PLUS || LA(1) == MINUS) && (LA(2) == NUM_INT || LA(2) == NUM_REAL)) {
03508                 sign();
03509                 if (inputState->guessing==0) {
03510                     s_AST = returnAST;
03511                 }
03512                 unsignedNumber();
03513                 if (inputState->guessing==0) {
03514                     n_AST = returnAST;
03515                 }
03516                 if ( inputState->guessing==0 ) {
03517                     constant_AST = RefPascalAST(currentAST.root);
03518 #line 901 "pascal.g"
03519                     constant_AST=RefPascalAST(astFactory->make((new ANTLR_USE_NAMESPACE(antlr)ASTArray(2))->add(static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(s_AST.get()))->add(static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(n_AST.get()))));
03520 #line 3521 "PascalParser.cpp"
03521                     currentAST.root = constant_AST;
03522                     if ( constant_AST!=static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get()) &&
03523                         constant_AST->getFirstChild() != static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get()) )
03524                           currentAST.child = constant_AST->getFirstChild();
03525                     else
03526                         currentAST.child = constant_AST;
03527                     currentAST.advanceChildToEnd();
03528                 }
03529             }
03530             else if ((LA(1) == PLUS || LA(1) == MINUS) && (LA(2) == IDENT)) {
03531                 sign();
03532                 if (inputState->guessing==0) {
03533                     s2_AST = returnAST;
03534                 }
03535                 identifier();
03536                 if (inputState->guessing==0) {
03537                     id_AST = returnAST;
03538                 }
03539                 if ( inputState->guessing==0 ) {
03540                     constant_AST = RefPascalAST(currentAST.root);
03541 #line 903 "pascal.g"
03542                     constant_AST=RefPascalAST(astFactory->make((new ANTLR_USE_NAMESPACE(antlr)ASTArray(2))->add(static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(s2_AST.get()))->add(static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(id_AST.get()))));
03543 #line 3544 "PascalParser.cpp"
03544                     currentAST.root = constant_AST;
03545                     if ( constant_AST!=static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get()) &&
03546                         constant_AST->getFirstChild() != static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get()) )
03547                           currentAST.child = constant_AST->getFirstChild();
03548                     else
03549                         currentAST.child = constant_AST;
03550                     currentAST.advanceChildToEnd();
03551                 }
03552             }
03553         else {
03554             throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
03555         }
03556         }
03557     }
03558     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
03559         if( inputState->guessing == 0 ) {
03560             reportError(ex);
03561             consume();
03562             consumeUntil(_tokenSet_38);
03563         } else {
03564             throw;
03565         }
03566     }
03567     returnAST = constant_AST;
03568 }
03569 
03570 void PascalParser::recordConstant() {
03571     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
03572     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
03573     RefPascalAST recordConstant_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
03574     
03575     try {      // for error handling
03576         match(LPAREN);
03577         {
03578         identifier();
03579         if (inputState->guessing==0) {
03580             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
03581         }
03582         match(COLON);
03583         constant();
03584         if (inputState->guessing==0) {
03585             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
03586         }
03587         }
03588         { // ( ... )*
03589         for (;;) {
03590             if ((LA(1) == SEMI)) {
03591                 match(SEMI);
03592                 {
03593                 identifier();
03594                 if (inputState->guessing==0) {
03595                     astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
03596                 }
03597                 match(COLON);
03598                 constant();
03599                 if (inputState->guessing==0) {
03600                     astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
03601                 }
03602                 }
03603             }
03604             else {
03605                 goto _loop134;
03606             }
03607             
03608         }
03609         _loop134:;
03610         } // ( ... )*
03611         match(RPAREN);
03612         recordConstant_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
03613     }
03614     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
03615         if( inputState->guessing == 0 ) {
03616             reportError(ex);
03617             consume();
03618             consumeUntil(_tokenSet_22);
03619         } else {
03620             throw;
03621         }
03622     }
03623     returnAST = recordConstant_AST;
03624 }
03625 
03626 void PascalParser::arrayConstant() {
03627     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
03628     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
03629     RefPascalAST arrayConstant_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
03630     
03631     try {      // for error handling
03632         match(LPAREN);
03633         {
03634         switch ( LA(1)) {
03635         case NUM_INT:
03636         case PLUS:
03637         case MINUS:
03638         case STRING_LITERAL:
03639         case CHR:
03640         case NUM_REAL:
03641         case IDENT:
03642         {
03643             constant();
03644             if (inputState->guessing==0) {
03645                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
03646             }
03647             break;
03648         }
03649         case LPAREN:
03650         {
03651             arrayConstant();
03652             if (inputState->guessing==0) {
03653                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
03654             }
03655             break;
03656         }
03657         default:
03658         {
03659             throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
03660         }
03661         }
03662         }
03663         { // ( ... )*
03664         for (;;) {
03665             if ((LA(1) == COMMA)) {
03666                 match(COMMA);
03667                 {
03668                 switch ( LA(1)) {
03669                 case NUM_INT:
03670                 case PLUS:
03671                 case MINUS:
03672                 case STRING_LITERAL:
03673                 case CHR:
03674                 case NUM_REAL:
03675                 case IDENT:
03676                 {
03677                     constant();
03678                     if (inputState->guessing==0) {
03679                         astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
03680                     }
03681                     break;
03682                 }
03683                 case LPAREN:
03684                 {
03685                     arrayConstant();
03686                     if (inputState->guessing==0) {
03687                         astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
03688                     }
03689                     break;
03690                 }
03691                 default:
03692                 {
03693                     throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
03694                 }
03695                 }
03696                 }
03697             }
03698             else {
03699                 goto _loop129;
03700             }
03701             
03702         }
03703         _loop129:;
03704         } // ( ... )*
03705         match(RPAREN);
03706         arrayConstant_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
03707     }
03708     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
03709         if( inputState->guessing == 0 ) {
03710             reportError(ex);
03711             consume();
03712             consumeUntil(_tokenSet_39);
03713         } else {
03714             throw;
03715         }
03716     }
03717     returnAST = arrayConstant_AST;
03718 }
03719 
03720 void PascalParser::proceduralConstant() {
03721     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
03722     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
03723     RefPascalAST proceduralConstant_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
03724     
03725     try {      // for error handling
03726         expression();
03727         if (inputState->guessing==0) {
03728             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
03729         }
03730         proceduralConstant_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
03731     }
03732     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
03733         if( inputState->guessing == 0 ) {
03734             reportError(ex);
03735             consume();
03736             consumeUntil(_tokenSet_22);
03737         } else {
03738             throw;
03739         }
03740     }
03741     returnAST = proceduralConstant_AST;
03742 }
03743 
03744 void PascalParser::addressConstant() {
03745     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
03746     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
03747     RefPascalAST addressConstant_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
03748     
03749     try {      // for error handling
03750         RefPascalAST tmp127_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
03751         if ( inputState->guessing == 0 ) {
03752             tmp127_AST = astFactory->create(LT(1));
03753             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(tmp127_AST.get()));
03754         }
03755         match(NUM_INT);
03756         addressConstant_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
03757     }
03758     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
03759         if( inputState->guessing == 0 ) {
03760             reportError(ex);
03761             consume();
03762             consumeUntil(_tokenSet_16);
03763         } else {
03764             throw;
03765         }
03766     }
03767     returnAST = addressConstant_AST;
03768 }
03769 
03770 void PascalParser::simpleType() {
03771     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
03772     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
03773     RefPascalAST simpleType_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
03774     
03775     try {      // for error handling
03776         switch ( LA(1)) {
03777         case INTEGER:
03778         case SHORTINT:
03779         case SMALLINT:
03780         case LONGINT:
03781         case INT64:
03782         case BYTE:
03783         case WORD:
03784         case CARDINAL:
03785         case QWORD:
03786         case BOOLEAN:
03787         case BYTEBOOL:
03788         case LONGBOOL:
03789         case CHAR:
03790         {
03791             ordinalType();
03792             if (inputState->guessing==0) {
03793                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
03794             }
03795             simpleType_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
03796             break;
03797         }
03798         case REAL:
03799         case SINGLE:
03800         case DOUBLE:
03801         case EXTENDED:
03802         case COMP:
03803         {
03804             realType();
03805             if (inputState->guessing==0) {
03806                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
03807             }
03808             simpleType_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
03809             break;
03810         }
03811         default:
03812         {
03813             throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
03814         }
03815         }
03816     }
03817     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
03818         if( inputState->guessing == 0 ) {
03819             reportError(ex);
03820             consume();
03821             consumeUntil(_tokenSet_23);
03822         } else {
03823             throw;
03824         }
03825     }
03826     returnAST = simpleType_AST;
03827 }
03828 
03829 void PascalParser::subrangeTypeOrTypeIdentifier() {
03830     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
03831     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
03832     RefPascalAST subrangeTypeOrTypeIdentifier_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
03833     
03834     try {      // for error handling
03835         constant();
03836         if (inputState->guessing==0) {
03837             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
03838         }
03839         {
03840         switch ( LA(1)) {
03841         case DOTDOT:
03842         {
03843             match(DOTDOT);
03844             constant();
03845             if (inputState->guessing==0) {
03846                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
03847             }
03848             break;
03849         }
03850         case SEMI:
03851         case RPAREN:
03852         case EQUAL:
03853         case RBRACK:
03854         {
03855             break;
03856         }
03857         default:
03858         {
03859             throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
03860         }
03861         }
03862         }
03863         subrangeTypeOrTypeIdentifier_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
03864     }
03865     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
03866         if( inputState->guessing == 0 ) {
03867             reportError(ex);
03868             consume();
03869             consumeUntil(_tokenSet_23);
03870         } else {
03871             throw;
03872         }
03873     }
03874     returnAST = subrangeTypeOrTypeIdentifier_AST;
03875 }
03876 
03877 void PascalParser::enumeratedType() {
03878     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
03879     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
03880     RefPascalAST enumeratedType_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
03881     
03882     try {      // for error handling
03883         bool synPredMatched147 = false;
03884         if (((LA(1) == LPAREN) && (LA(2) == IDENT))) {
03885             int _m147 = mark();
03886             synPredMatched147 = true;
03887             inputState->guessing++;
03888             try {
03889                 {
03890                 match(LPAREN);
03891                 identifier();
03892                 match(ASSIGN);
03893                 }
03894             }
03895             catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& pe) {
03896                 synPredMatched147 = false;
03897             }
03898             rewind(_m147);
03899             inputState->guessing--;
03900         }
03901         if ( synPredMatched147 ) {
03902             match(LPAREN);
03903             assignedEnumList();
03904             if (inputState->guessing==0) {
03905                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
03906             }
03907             match(RPAREN);
03908             enumeratedType_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
03909         }
03910         else if ((LA(1) == LPAREN) && (LA(2) == IDENT)) {
03911             match(LPAREN);
03912             identifierList();
03913             if (inputState->guessing==0) {
03914                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
03915             }
03916             match(RPAREN);
03917             enumeratedType_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
03918         }
03919         else {
03920             throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
03921         }
03922         
03923     }
03924     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
03925         if( inputState->guessing == 0 ) {
03926             reportError(ex);
03927             consume();
03928             consumeUntil(_tokenSet_40);
03929         } else {
03930             throw;
03931         }
03932     }
03933     returnAST = enumeratedType_AST;
03934 }
03935 
03936 void PascalParser::stringType() {
03937     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
03938     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
03939     RefPascalAST stringType_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
03940     
03941     try {      // for error handling
03942         RefPascalAST tmp133_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
03943         if ( inputState->guessing == 0 ) {
03944             tmp133_AST = astFactory->create(LT(1));
03945             astFactory->makeASTRoot(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(tmp133_AST.get()));
03946         }
03947         match(STRING);
03948         {
03949         switch ( LA(1)) {
03950         case LBRACK:
03951         {
03952             match(LBRACK);
03953             unsignedInteger();
03954             if (inputState->guessing==0) {
03955                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
03956             }
03957             match(RBRACK);
03958             break;
03959         }
03960         case SEMI:
03961         case RPAREN:
03962         case EQUAL:
03963         case RBRACK:
03964         {
03965             break;
03966         }
03967         default:
03968         {
03969             throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
03970         }
03971         }
03972         }
03973         stringType_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
03974     }
03975     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
03976         if( inputState->guessing == 0 ) {
03977             reportError(ex);
03978             consume();
03979             consumeUntil(_tokenSet_23);
03980         } else {
03981             throw;
03982         }
03983     }
03984     returnAST = stringType_AST;
03985 }
03986 
03987 void PascalParser::structuredType() {
03988     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
03989     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
03990     RefPascalAST structuredType_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
03991     
03992     try {      // for error handling
03993         {
03994         switch ( LA(1)) {
03995         case PACKED:
03996         {
03997             match(PACKED);
03998             break;
03999         }
04000         case ARRAY:
04001         case RECORD:
04002         case SET:
04003         case FILE:
04004         case OBJECT:
04005         case CLASS:
04006         {
04007             break;
04008         }
04009         default:
04010         {
04011             throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
04012         }
04013         }
04014         }
04015         {
04016         switch ( LA(1)) {
04017         case ARRAY:
04018         {
04019             arrayType();
04020             if (inputState->guessing==0) {
04021                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
04022             }
04023             break;
04024         }
04025         case RECORD:
04026         {
04027             recordType();
04028             if (inputState->guessing==0) {
04029                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
04030             }
04031             break;
04032         }
04033         case OBJECT:
04034         {
04035             objectType();
04036             if (inputState->guessing==0) {
04037                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
04038             }
04039             break;
04040         }
04041         case CLASS:
04042         {
04043             classType();
04044             if (inputState->guessing==0) {
04045                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
04046             }
04047             break;
04048         }
04049         case SET:
04050         {
04051             setType();
04052             if (inputState->guessing==0) {
04053                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
04054             }
04055             break;
04056         }
04057         case FILE:
04058         {
04059             fileType();
04060             if (inputState->guessing==0) {
04061                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
04062             }
04063             break;
04064         }
04065         default:
04066         {
04067             throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
04068         }
04069         }
04070         }
04071         structuredType_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
04072     }
04073     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
04074         if( inputState->guessing == 0 ) {
04075             reportError(ex);
04076             consume();
04077             consumeUntil(_tokenSet_23);
04078         } else {
04079             throw;
04080         }
04081     }
04082     returnAST = structuredType_AST;
04083 }
04084 
04085 void PascalParser::pointerType() {
04086     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
04087     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
04088     RefPascalAST pointerType_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
04089     
04090     try {      // for error handling
04091         RefPascalAST tmp137_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
04092         if ( inputState->guessing == 0 ) {
04093             tmp137_AST = astFactory->create(LT(1));
04094             astFactory->makeASTRoot(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(tmp137_AST.get()));
04095         }
04096         match(POINTER);
04097         typeIdentifier();
04098         if (inputState->guessing==0) {
04099             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
04100         }
04101         pointerType_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
04102     }
04103     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
04104         if( inputState->guessing == 0 ) {
04105             reportError(ex);
04106             consume();
04107             consumeUntil(_tokenSet_23);
04108         } else {
04109             throw;
04110         }
04111     }
04112     returnAST = pointerType_AST;
04113 }
04114 
04115 void PascalParser::proceduralType() {
04116     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
04117     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
04118     RefPascalAST proceduralType_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
04119     
04120     try {      // for error handling
04121         bool synPredMatched185 = false;
04122         if (((LA(1) == PROCEDURE || LA(1) == FUNCTION) && (LA(2) == IDENT))) {
04123             int _m185 = mark();
04124             synPredMatched185 = true;
04125             inputState->guessing++;
04126             try {
04127                 {
04128                 proceduralTypePart1();
04129                 match(SEMI);
04130                 }
04131             }
04132             catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& pe) {
04133                 synPredMatched185 = false;
04134             }
04135             rewind(_m185);
04136             inputState->guessing--;
04137         }
04138         if ( synPredMatched185 ) {
04139             proceduralTypePart1();
04140             if (inputState->guessing==0) {
04141                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
04142             }
04143             match(SEMI);
04144             callModifiers();
04145             if (inputState->guessing==0) {
04146                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
04147             }
04148             proceduralType_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
04149         }
04150         else if ((LA(1) == PROCEDURE || LA(1) == FUNCTION) && (LA(2) == IDENT)) {
04151             proceduralTypePart1();
04152             if (inputState->guessing==0) {
04153                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
04154             }
04155             proceduralType_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
04156         }
04157         else {
04158             throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
04159         }
04160         
04161     }
04162     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
04163         if( inputState->guessing == 0 ) {
04164             reportError(ex);
04165             consume();
04166             consumeUntil(_tokenSet_23);
04167         } else {
04168             throw;
04169         }
04170     }
04171     returnAST = proceduralType_AST;
04172 }
04173 
04174 void PascalParser::ordinalType() {
04175     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
04176     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
04177     RefPascalAST ordinalType_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
04178     
04179     try {      // for error handling
04180         switch ( LA(1)) {
04181         case INTEGER:
04182         {
04183             match(INTEGER);
04184             ordinalType_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
04185             break;
04186         }
04187         case SHORTINT:
04188         {
04189             match(SHORTINT);
04190             ordinalType_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
04191             break;
04192         }
04193         case SMALLINT:
04194         {
04195             match(SMALLINT);
04196             ordinalType_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
04197             break;
04198         }
04199         case LONGINT:
04200         {
04201             match(LONGINT);
04202             ordinalType_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
04203             break;
04204         }
04205         case INT64:
04206         {
04207             match(INT64);
04208             ordinalType_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
04209             break;
04210         }
04211         case BYTE:
04212         {
04213             match(BYTE);
04214             ordinalType_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
04215             break;
04216         }
04217         case WORD:
04218         {
04219             match(WORD);
04220             ordinalType_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
04221             break;
04222         }
04223         case CARDINAL:
04224         {
04225             match(CARDINAL);
04226             ordinalType_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
04227             break;
04228         }
04229         case QWORD:
04230         {
04231             match(QWORD);
04232             ordinalType_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
04233             break;
04234         }
04235         case BOOLEAN:
04236         {
04237             match(BOOLEAN);
04238             ordinalType_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
04239             break;
04240         }
04241         case BYTEBOOL:
04242         {
04243             match(BYTEBOOL);
04244             ordinalType_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
04245             break;
04246         }
04247         case LONGBOOL:
04248         {
04249             match(LONGBOOL);
04250             ordinalType_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
04251             break;
04252         }
04253         case CHAR:
04254         {
04255             match(CHAR);
04256             ordinalType_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
04257             break;
04258         }
04259         default:
04260         {
04261             throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
04262         }
04263         }
04264     }
04265     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
04266         if( inputState->guessing == 0 ) {
04267             reportError(ex);
04268             consume();
04269             consumeUntil(_tokenSet_40);
04270         } else {
04271             throw;
04272         }
04273     }
04274     returnAST = ordinalType_AST;
04275 }
04276 
04277 void PascalParser::realType() {
04278     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
04279     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
04280     RefPascalAST realType_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
04281     
04282     try {      // for error handling
04283         switch ( LA(1)) {
04284         case REAL:
04285         {
04286             match(REAL);
04287             realType_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
04288             break;
04289         }
04290         case SINGLE:
04291         {
04292             match(SINGLE);
04293             realType_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
04294             break;
04295         }
04296         case DOUBLE:
04297         {
04298             match(DOUBLE);
04299             realType_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
04300             break;
04301         }
04302         case EXTENDED:
04303         {
04304             match(EXTENDED);
04305             realType_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
04306             break;
04307         }
04308         case COMP:
04309         {
04310             match(COMP);
04311             realType_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
04312             break;
04313         }
04314         default:
04315         {
04316             throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
04317         }
04318         }
04319     }
04320     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
04321         if( inputState->guessing == 0 ) {
04322             reportError(ex);
04323             consume();
04324             consumeUntil(_tokenSet_23);
04325         } else {
04326             throw;
04327         }
04328     }
04329     returnAST = realType_AST;
04330 }
04331 
04332 void PascalParser::typeIdentifier() {
04333     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
04334     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
04335     RefPascalAST typeIdentifier_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
04336     
04337     try {      // for error handling
04338         identifier();
04339         if (inputState->guessing==0) {
04340             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
04341         }
04342         typeIdentifier_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
04343     }
04344     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
04345         if( inputState->guessing == 0 ) {
04346             reportError(ex);
04347             consume();
04348             consumeUntil(_tokenSet_41);
04349         } else {
04350             throw;
04351         }
04352     }
04353     returnAST = typeIdentifier_AST;
04354 }
04355 
04356 void PascalParser::subrangeType() {
04357     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
04358     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
04359     RefPascalAST subrangeType_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
04360     
04361     try {      // for error handling
04362         constant();
04363         if (inputState->guessing==0) {
04364             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
04365         }
04366         match(DOTDOT);
04367         constant();
04368         if (inputState->guessing==0) {
04369             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
04370         }
04371         subrangeType_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
04372     }
04373     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
04374         if( inputState->guessing == 0 ) {
04375             reportError(ex);
04376             consume();
04377             consumeUntil(_tokenSet_0);
04378         } else {
04379             throw;
04380         }
04381     }
04382     returnAST = subrangeType_AST;
04383 }
04384 
04385 void PascalParser::assignedEnumList() {
04386     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
04387     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
04388     RefPascalAST assignedEnumList_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
04389     
04390     try {      // for error handling
04391         {
04392         identifier();
04393         if (inputState->guessing==0) {
04394             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
04395         }
04396         match(ASSIGN);
04397         expression();
04398         if (inputState->guessing==0) {
04399             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
04400         }
04401         }
04402         { // ( ... )*
04403         for (;;) {
04404             if ((LA(1) == COMMA)) {
04405                 match(COMMA);
04406                 {
04407                 identifier();
04408                 if (inputState->guessing==0) {
04409                     astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
04410                 }
04411                 match(ASSIGN);
04412                 expression();
04413                 if (inputState->guessing==0) {
04414                     astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
04415                 }
04416                 }
04417             }
04418             else {
04419                 goto _loop152;
04420             }
04421             
04422         }
04423         _loop152:;
04424         } // ( ... )*
04425         assignedEnumList_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
04426     }
04427     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
04428         if( inputState->guessing == 0 ) {
04429             reportError(ex);
04430             consume();
04431             consumeUntil(_tokenSet_42);
04432         } else {
04433             throw;
04434         }
04435     }
04436     returnAST = assignedEnumList_AST;
04437 }
04438 
04439 void PascalParser::unsignedInteger() {
04440     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
04441     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
04442     RefPascalAST unsignedInteger_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
04443     
04444     try {      // for error handling
04445         RefPascalAST tmp161_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
04446         if ( inputState->guessing == 0 ) {
04447             tmp161_AST = astFactory->create(LT(1));
04448             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(tmp161_AST.get()));
04449         }
04450         match(NUM_INT);
04451         unsignedInteger_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
04452     }
04453     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
04454         if( inputState->guessing == 0 ) {
04455             reportError(ex);
04456             consume();
04457             consumeUntil(_tokenSet_43);
04458         } else {
04459             throw;
04460         }
04461     }
04462     returnAST = unsignedInteger_AST;
04463 }
04464 
04465 void PascalParser::arrayType() {
04466     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
04467     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
04468     RefPascalAST arrayType_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
04469     
04470     try {      // for error handling
04471         RefPascalAST tmp162_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
04472         if ( inputState->guessing == 0 ) {
04473             tmp162_AST = astFactory->create(LT(1));
04474             astFactory->makeASTRoot(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(tmp162_AST.get()));
04475         }
04476         match(ARRAY);
04477         match(LBRACK);
04478         arrayIndexType();
04479         if (inputState->guessing==0) {
04480             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
04481         }
04482         { // ( ... )*
04483         for (;;) {
04484             if ((LA(1) == COMMA)) {
04485                 match(COMMA);
04486                 arrayIndexType();
04487                 if (inputState->guessing==0) {
04488                     astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
04489                 }
04490             }
04491             else {
04492                 goto _loop161;
04493             }
04494             
04495         }
04496         _loop161:;
04497         } // ( ... )*
04498         match(RBRACK);
04499         match(OF);
04500         type();
04501         if (inputState->guessing==0) {
04502             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
04503         }
04504         arrayType_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
04505     }
04506     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
04507         if( inputState->guessing == 0 ) {
04508             reportError(ex);
04509             consume();
04510             consumeUntil(_tokenSet_23);
04511         } else {
04512             throw;
04513         }
04514     }
04515     returnAST = arrayType_AST;
04516 }
04517 
04518 void PascalParser::recordType() {
04519     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
04520     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
04521     RefPascalAST recordType_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
04522     
04523     try {      // for error handling
04524         RefPascalAST tmp167_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
04525         if ( inputState->guessing == 0 ) {
04526             tmp167_AST = astFactory->create(LT(1));
04527             astFactory->makeASTRoot(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(tmp167_AST.get()));
04528         }
04529         match(RECORD);
04530         { // ( ... )*
04531         for (;;) {
04532             if ((LA(1) == CASE || LA(1) == IDENT)) {
04533                 fieldList();
04534                 if (inputState->guessing==0) {
04535                     astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
04536                 }
04537             }
04538             else {
04539                 goto _loop168;
04540             }
04541             
04542         }
04543         _loop168:;
04544         } // ( ... )*
04545         match(END);
04546         recordType_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
04547     }
04548     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
04549         if( inputState->guessing == 0 ) {
04550             reportError(ex);
04551             consume();
04552             consumeUntil(_tokenSet_23);
04553         } else {
04554             throw;
04555         }
04556     }
04557     returnAST = recordType_AST;
04558 }
04559 
04560 void PascalParser::objectType() {
04561     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
04562     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
04563     RefPascalAST objectType_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
04564     
04565     try {      // for error handling
04566         RefPascalAST tmp169_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
04567         if ( inputState->guessing == 0 ) {
04568             tmp169_AST = astFactory->create(LT(1));
04569             astFactory->makeASTRoot(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(tmp169_AST.get()));
04570         }
04571         match(OBJECT);
04572         {
04573         switch ( LA(1)) {
04574         case LPAREN:
04575         {
04576             heritage();
04577             if (inputState->guessing==0) {
04578                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
04579             }
04580             break;
04581         }
04582         case END:
04583         case PROCEDURE:
04584         case FUNCTION:
04585         case PUBLIC:
04586         case PRIVATE:
04587         case PROTECTED:
04588         case CONSTRUCTOR:
04589         case DESTRUCTOR:
04590         case IDENT:
04591         {
04592             break;
04593         }
04594         default:
04595         {
04596             throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
04597         }
04598         }
04599         }
04600         {
04601         switch ( LA(1)) {
04602         case END:
04603         case PROCEDURE:
04604         case FUNCTION:
04605         case CONSTRUCTOR:
04606         case DESTRUCTOR:
04607         case IDENT:
04608         {
04609             componentList();
04610             if (inputState->guessing==0) {
04611                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
04612             }
04613             break;
04614         }
04615         case PUBLIC:
04616         case PRIVATE:
04617         case PROTECTED:
04618         {
04619             objectVisibilitySpecifier();
04620             if (inputState->guessing==0) {
04621                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
04622             }
04623             break;
04624         }
04625         default:
04626         {
04627             throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
04628         }
04629         }
04630         }
04631         match(END);
04632         objectType_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
04633     }
04634     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
04635         if( inputState->guessing == 0 ) {
04636             reportError(ex);
04637             consume();
04638             consumeUntil(_tokenSet_23);
04639         } else {
04640             throw;
04641         }
04642     }
04643     returnAST = objectType_AST;
04644 }
04645 
04646 void PascalParser::classType() {
04647     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
04648     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
04649     RefPascalAST classType_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
04650     
04651     try {      // for error handling
04652         RefPascalAST tmp171_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
04653         if ( inputState->guessing == 0 ) {
04654             tmp171_AST = astFactory->create(LT(1));
04655             astFactory->makeASTRoot(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(tmp171_AST.get()));
04656         }
04657         match(CLASS);
04658         {
04659         switch ( LA(1)) {
04660         case LPAREN:
04661         {
04662             heritage();
04663             if (inputState->guessing==0) {
04664                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
04665             }
04666             break;
04667         }
04668         case END:
04669         case PROCEDURE:
04670         case FUNCTION:
04671         case PUBLIC:
04672         case PRIVATE:
04673         case PROTECTED:
04674         case CONSTRUCTOR:
04675         case DESTRUCTOR:
04676         case CLASS:
04677         case PUBLISHED:
04678         case PROPERTY:
04679         case IDENT:
04680         {
04681             break;
04682         }
04683         default:
04684         {
04685             throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
04686         }
04687         }
04688         }
04689         {
04690         switch ( LA(1)) {
04691         case END:
04692         case PROCEDURE:
04693         case FUNCTION:
04694         case CONSTRUCTOR:
04695         case DESTRUCTOR:
04696         case CLASS:
04697         case PROPERTY:
04698         case IDENT:
04699         {
04700             classComponentList();
04701             if (inputState->guessing==0) {
04702                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
04703             }
04704             break;
04705         }
04706         case PUBLIC:
04707         case PRIVATE:
04708         case PROTECTED:
04709         case PUBLISHED:
04710         {
04711             classVisibilitySpecifier();
04712             if (inputState->guessing==0) {
04713                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
04714             }
04715             break;
04716         }
04717         default:
04718         {
04719             throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
04720         }
04721         }
04722         }
04723         match(END);
04724         classType_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
04725     }
04726     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
04727         if( inputState->guessing == 0 ) {
04728             reportError(ex);
04729             consume();
04730             consumeUntil(_tokenSet_23);
04731         } else {
04732             throw;
04733         }
04734     }
04735     returnAST = classType_AST;
04736 }
04737 
04738 void PascalParser::setType() {
04739     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
04740     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
04741     RefPascalAST setType_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
04742     
04743     try {      // for error handling
04744         RefPascalAST tmp173_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
04745         if ( inputState->guessing == 0 ) {
04746             tmp173_AST = astFactory->create(LT(1));
04747             astFactory->makeASTRoot(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(tmp173_AST.get()));
04748         }
04749         match(SET);
04750         match(OF);
04751         ordinalType();
04752         if (inputState->guessing==0) {
04753             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
04754         }
04755         setType_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
04756     }
04757     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
04758         if( inputState->guessing == 0 ) {
04759             reportError(ex);
04760             consume();
04761             consumeUntil(_tokenSet_23);
04762         } else {
04763             throw;
04764         }
04765     }
04766     returnAST = setType_AST;
04767 }
04768 
04769 void PascalParser::fileType() {
04770     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
04771     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
04772     RefPascalAST fileType_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
04773     
04774     try {      // for error handling
04775         RefPascalAST tmp175_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
04776         if ( inputState->guessing == 0 ) {
04777             tmp175_AST = astFactory->create(LT(1));
04778             astFactory->makeASTRoot(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(tmp175_AST.get()));
04779         }
04780         match(FILE);
04781         match(OF);
04782         type();
04783         if (inputState->guessing==0) {
04784             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
04785         }
04786         fileType_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
04787     }
04788     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
04789         if( inputState->guessing == 0 ) {
04790             reportError(ex);
04791             consume();
04792             consumeUntil(_tokenSet_23);
04793         } else {
04794             throw;
04795         }
04796     }
04797     returnAST = fileType_AST;
04798 }
04799 
04800 void PascalParser::arrayIndexType() {
04801     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
04802     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
04803     RefPascalAST arrayIndexType_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
04804     
04805     try {      // for error handling
04806         if (((LA(1) >= INTEGER && LA(1) <= CHAR))) {
04807             ordinalType();
04808             if (inputState->guessing==0) {
04809                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
04810             }
04811             arrayIndexType_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
04812         }
04813         else {
04814             bool synPredMatched164 = false;
04815             if (((_tokenSet_36.member(LA(1))) && (_tokenSet_44.member(LA(2))))) {
04816                 int _m164 = mark();
04817                 synPredMatched164 = true;
04818                 inputState->guessing++;
04819                 try {
04820                     {
04821                     expression();
04822                     match(DOTDOT);
04823                     }
04824                 }
04825                 catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& pe) {
04826                     synPredMatched164 = false;
04827                 }
04828                 rewind(_m164);
04829                 inputState->guessing--;
04830             }
04831             if ( synPredMatched164 ) {
04832                 arraySubrangeType();
04833                 if (inputState->guessing==0) {
04834                     astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
04835                 }
04836                 arrayIndexType_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
04837             }
04838             else if ((LA(1) == LPAREN) && (LA(2) == IDENT)) {
04839                 enumeratedType();
04840                 if (inputState->guessing==0) {
04841                     astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
04842                 }
04843                 arrayIndexType_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
04844             }
04845         else {
04846             throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
04847         }
04848         }
04849     }
04850     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
04851         if( inputState->guessing == 0 ) {
04852             reportError(ex);
04853             consume();
04854             consumeUntil(_tokenSet_45);
04855         } else {
04856             throw;
04857         }
04858     }
04859     returnAST = arrayIndexType_AST;
04860 }
04861 
04862 void PascalParser::arraySubrangeType() {
04863     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
04864     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
04865     RefPascalAST arraySubrangeType_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
04866     
04867     try {      // for error handling
04868         expression();
04869         if (inputState->guessing==0) {
04870             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
04871         }
04872         match(DOTDOT);
04873         expression();
04874         if (inputState->guessing==0) {
04875             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
04876         }
04877         arraySubrangeType_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
04878     }
04879     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
04880         if( inputState->guessing == 0 ) {
04881             reportError(ex);
04882             consume();
04883             consumeUntil(_tokenSet_45);
04884         } else {
04885             throw;
04886         }
04887     }
04888     returnAST = arraySubrangeType_AST;
04889 }
04890 
04891 void PascalParser::fieldList() {
04892     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
04893     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
04894     RefPascalAST fieldList_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
04895     
04896     try {      // for error handling
04897         switch ( LA(1)) {
04898         case IDENT:
04899         {
04900             fixedField();
04901             if (inputState->guessing==0) {
04902                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
04903             }
04904             fieldList_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
04905             break;
04906         }
04907         case CASE:
04908         {
04909             variantPart();
04910             if (inputState->guessing==0) {
04911                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
04912             }
04913             fieldList_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
04914             break;
04915         }
04916         default:
04917         {
04918             throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
04919         }
04920         }
04921     }
04922     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
04923         if( inputState->guessing == 0 ) {
04924             reportError(ex);
04925             consume();
04926             consumeUntil(_tokenSet_46);
04927         } else {
04928             throw;
04929         }
04930     }
04931     returnAST = fieldList_AST;
04932 }
04933 
04934 void PascalParser::fixedField() {
04935     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
04936     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
04937     RefPascalAST fixedField_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
04938     
04939     try {      // for error handling
04940         identifierList();
04941         if (inputState->guessing==0) {
04942             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
04943         }
04944         match(COLON);
04945         type();
04946         if (inputState->guessing==0) {
04947             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
04948         }
04949         match(SEMI);
04950         fixedField_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
04951     }
04952     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
04953         if( inputState->guessing == 0 ) {
04954             reportError(ex);
04955             consume();
04956             consumeUntil(_tokenSet_46);
04957         } else {
04958             throw;
04959         }
04960     }
04961     returnAST = fixedField_AST;
04962 }
04963 
04964 void PascalParser::variantPart() {
04965     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
04966     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
04967     RefPascalAST variantPart_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
04968     
04969     try {      // for error handling
04970         RefPascalAST tmp180_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
04971         if ( inputState->guessing == 0 ) {
04972             tmp180_AST = astFactory->create(LT(1));
04973             astFactory->makeASTRoot(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(tmp180_AST.get()));
04974         }
04975         match(CASE);
04976         {
04977         if ((LA(1) == IDENT) && (LA(2) == COLON)) {
04978             identifier();
04979             if (inputState->guessing==0) {
04980                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
04981             }
04982             match(COLON);
04983         }
04984         else if ((LA(1) == IDENT) && (LA(2) == OF)) {
04985         }
04986         else {
04987             throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
04988         }
04989         
04990         }
04991         identifier();
04992         if (inputState->guessing==0) {
04993             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
04994         }
04995         match(OF);
04996         variant();
04997         if (inputState->guessing==0) {
04998             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
04999         }
05000         { // ( ... )*
05001         for (;;) {
05002             if ((LA(1) == SEMI)) {
05003                 match(SEMI);
05004                 variant();
05005                 if (inputState->guessing==0) {
05006                     astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
05007                 }
05008             }
05009             else {
05010                 goto _loop174;
05011             }
05012             
05013         }
05014         _loop174:;
05015         } // ( ... )*
05016         variantPart_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
05017     }
05018     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
05019         if( inputState->guessing == 0 ) {
05020             reportError(ex);
05021             consume();
05022             consumeUntil(_tokenSet_46);
05023         } else {
05024             throw;
05025         }
05026     }
05027     returnAST = variantPart_AST;
05028 }
05029 
05030 void PascalParser::variant() {
05031     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
05032     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
05033     RefPascalAST variant_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
05034     
05035     try {      // for error handling
05036         { // ( ... )+
05037         int _cnt177=0;
05038         for (;;) {
05039             if ((_tokenSet_33.member(LA(1)))) {
05040                 constant();
05041                 if (inputState->guessing==0) {
05042                     astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
05043                 }
05044                 match(COMMA);
05045             }
05046             else {
05047                 if ( _cnt177>=1 ) { goto _loop177; } else {throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());}
05048             }
05049             
05050             _cnt177++;
05051         }
05052         _loop177:;
05053         }  // ( ... )+
05054         match(COLON);
05055         match(LPAREN);
05056         { // ( ... )*
05057         for (;;) {
05058             if ((LA(1) == CASE || LA(1) == IDENT)) {
05059                 fieldList();
05060                 if (inputState->guessing==0) {
05061                     astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
05062                 }
05063             }
05064             else {
05065                 goto _loop179;
05066             }
05067             
05068         }
05069         _loop179:;
05070         } // ( ... )*
05071         match(RPAREN);
05072         variant_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
05073     }
05074     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
05075         if( inputState->guessing == 0 ) {
05076             reportError(ex);
05077             consume();
05078             consumeUntil(_tokenSet_47);
05079         } else {
05080             throw;
05081         }
05082     }
05083     returnAST = variant_AST;
05084 }
05085 
05086 void PascalParser::proceduralTypePart1() {
05087     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
05088     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
05089     RefPascalAST proceduralTypePart1_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
05090     
05091     try {      // for error handling
05092         {
05093         switch ( LA(1)) {
05094         case FUNCTION:
05095         {
05096             functionHeader();
05097             if (inputState->guessing==0) {
05098                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
05099             }
05100             break;
05101         }
05102         case PROCEDURE:
05103         {
05104             procedureHeader();
05105             if (inputState->guessing==0) {
05106                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
05107             }
05108             break;
05109         }
05110         default:
05111         {
05112             throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
05113         }
05114         }
05115         }
05116         {
05117         switch ( LA(1)) {
05118         case OF:
05119         {
05120             match(OF);
05121             match(OBJECT);
05122             break;
05123         }
05124         case SEMI:
05125         case RPAREN:
05126         case EQUAL:
05127         case RBRACK:
05128         {
05129             break;
05130         }
05131         default:
05132         {
05133             throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
05134         }
05135         }
05136         }
05137         proceduralTypePart1_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
05138     }
05139     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
05140         if( inputState->guessing == 0 ) {
05141             reportError(ex);
05142             consume();
05143             consumeUntil(_tokenSet_23);
05144         } else {
05145             throw;
05146         }
05147     }
05148     returnAST = proceduralTypePart1_AST;
05149 }
05150 
05151 void PascalParser::heritage() {
05152     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
05153     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
05154     RefPascalAST heritage_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
05155     
05156     try {      // for error handling
05157         match(LPAREN);
05158         identifier();
05159         if (inputState->guessing==0) {
05160             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
05161         }
05162         match(RPAREN);
05163         heritage_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
05164     }
05165     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
05166         if( inputState->guessing == 0 ) {
05167             reportError(ex);
05168             consume();
05169             consumeUntil(_tokenSet_48);
05170         } else {
05171             throw;
05172         }
05173     }
05174     returnAST = heritage_AST;
05175 }
05176 
05177 void PascalParser::componentList() {
05178     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
05179     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
05180     RefPascalAST componentList_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
05181     
05182     try {      // for error handling
05183         {
05184         switch ( LA(1)) {
05185         case IDENT:
05186         {
05187             { // ( ... )+
05188             int _cnt196=0;
05189             for (;;) {
05190                 if ((LA(1) == IDENT)) {
05191                     fieldDefinition();
05192                     if (inputState->guessing==0) {
05193                         astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
05194                     }
05195                 }
05196                 else {
05197                     if ( _cnt196>=1 ) { goto _loop196; } else {throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());}
05198                 }
05199                 
05200                 _cnt196++;
05201             }
05202             _loop196:;
05203             }  // ( ... )+
05204             break;
05205         }
05206         case END:
05207         case PROCEDURE:
05208         case FUNCTION:
05209         case CONSTRUCTOR:
05210         case DESTRUCTOR:
05211         {
05212             break;
05213         }
05214         default:
05215         {
05216             throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
05217         }
05218         }
05219         }
05220         {
05221         switch ( LA(1)) {
05222         case PROCEDURE:
05223         case FUNCTION:
05224         case CONSTRUCTOR:
05225         case DESTRUCTOR:
05226         {
05227             { // ( ... )+
05228             int _cnt199=0;
05229             for (;;) {
05230                 if ((_tokenSet_49.member(LA(1)))) {
05231                     methodDefinition();
05232                     if (inputState->guessing==0) {
05233                         astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
05234                     }
05235                 }
05236                 else {
05237                     if ( _cnt199>=1 ) { goto _loop199; } else {throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());}
05238                 }
05239                 
05240                 _cnt199++;
05241             }
05242             _loop199:;
05243             }  // ( ... )+
05244             break;
05245         }
05246         case END:
05247         {
05248             break;
05249         }
05250         default:
05251         {
05252             throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
05253         }
05254         }
05255         }
05256         componentList_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
05257     }
05258     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
05259         if( inputState->guessing == 0 ) {
05260             reportError(ex);
05261             consume();
05262             consumeUntil(_tokenSet_6);
05263         } else {
05264             throw;
05265         }
05266     }
05267     returnAST = componentList_AST;
05268 }
05269 
05270 void PascalParser::objectVisibilitySpecifier() {
05271     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
05272     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
05273     RefPascalAST objectVisibilitySpecifier_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
05274     
05275     try {      // for error handling
05276         switch ( LA(1)) {
05277         case PRIVATE:
05278         {
05279             match(PRIVATE);
05280             objectVisibilitySpecifier_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
05281             break;
05282         }
05283         case PROTECTED:
05284         {
05285             match(PROTECTED);
05286             objectVisibilitySpecifier_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
05287             break;
05288         }
05289         case PUBLIC:
05290         {
05291             match(PUBLIC);
05292             objectVisibilitySpecifier_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
05293             break;
05294         }
05295         default:
05296         {
05297             throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
05298         }
05299         }
05300     }
05301     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
05302         if( inputState->guessing == 0 ) {
05303             reportError(ex);
05304             consume();
05305             consumeUntil(_tokenSet_6);
05306         } else {
05307             throw;
05308         }
05309     }
05310     returnAST = objectVisibilitySpecifier_AST;
05311 }
05312 
05313 void PascalParser::fieldDefinition() {
05314     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
05315     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
05316     RefPascalAST fieldDefinition_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
05317     
05318     try {      // for error handling
05319         identifierList();
05320         if (inputState->guessing==0) {
05321             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
05322         }
05323         match(COLON);
05324         type();
05325         if (inputState->guessing==0) {
05326             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
05327         }
05328         match(SEMI);
05329         fieldDefinition_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
05330     }
05331     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
05332         if( inputState->guessing == 0 ) {
05333             reportError(ex);
05334             consume();
05335             consumeUntil(_tokenSet_50);
05336         } else {
05337             throw;
05338         }
05339     }
05340     returnAST = fieldDefinition_AST;
05341 }
05342 
05343 void PascalParser::methodDefinition() {
05344     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
05345     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
05346     RefPascalAST methodDefinition_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
05347     
05348     try {      // for error handling
05349         {
05350         switch ( LA(1)) {
05351         case FUNCTION:
05352         {
05353             functionHeader();
05354             if (inputState->guessing==0) {
05355                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
05356             }
05357             break;
05358         }
05359         case PROCEDURE:
05360         {
05361             procedureHeader();
05362             if (inputState->guessing==0) {
05363                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
05364             }
05365             break;
05366         }
05367         case CONSTRUCTOR:
05368         {
05369             constructorHeader();
05370             if (inputState->guessing==0) {
05371                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
05372             }
05373             break;
05374         }
05375         case DESTRUCTOR:
05376         {
05377             destructorHeader();
05378             if (inputState->guessing==0) {
05379                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
05380             }
05381             break;
05382         }
05383         default:
05384         {
05385             throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
05386         }
05387         }
05388         }
05389         match(SEMI);
05390         methodDirectives();
05391         if (inputState->guessing==0) {
05392             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
05393         }
05394         methodDefinition_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
05395     }
05396     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
05397         if( inputState->guessing == 0 ) {
05398             reportError(ex);
05399             consume();
05400             consumeUntil(_tokenSet_51);
05401         } else {
05402             throw;
05403         }
05404     }
05405     returnAST = methodDefinition_AST;
05406 }
05407 
05408 void PascalParser::constructorHeader() {
05409     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
05410     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
05411     RefPascalAST constructorHeader_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
05412     
05413     try {      // for error handling
05414         RefPascalAST tmp198_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
05415         if ( inputState->guessing == 0 ) {
05416             tmp198_AST = astFactory->create(LT(1));
05417             astFactory->makeASTRoot(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(tmp198_AST.get()));
05418         }
05419         match(CONSTRUCTOR);
05420         {
05421         if ((LA(1) == IDENT) && (LA(2) == LPAREN)) {
05422             identifier();
05423             if (inputState->guessing==0) {
05424                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
05425             }
05426         }
05427         else if ((LA(1) == IDENT) && (LA(2) == COLON)) {
05428             qualifiedMethodIdentifier();
05429             if (inputState->guessing==0) {
05430                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
05431             }
05432         }
05433         else {
05434             throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
05435         }
05436         
05437         }
05438         formalParameterList();
05439         if (inputState->guessing==0) {
05440             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
05441         }
05442         constructorHeader_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
05443     }
05444     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
05445         if( inputState->guessing == 0 ) {
05446             reportError(ex);
05447             consume();
05448             consumeUntil(_tokenSet_22);
05449         } else {
05450             throw;
05451         }
05452     }
05453     returnAST = constructorHeader_AST;
05454 }
05455 
05456 void PascalParser::destructorHeader() {
05457     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
05458     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
05459     RefPascalAST destructorHeader_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
05460     
05461     try {      // for error handling
05462         RefPascalAST tmp199_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
05463         if ( inputState->guessing == 0 ) {
05464             tmp199_AST = astFactory->create(LT(1));
05465             astFactory->makeASTRoot(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(tmp199_AST.get()));
05466         }
05467         match(DESTRUCTOR);
05468         {
05469         if ((LA(1) == IDENT) && (LA(2) == LPAREN)) {
05470             identifier();
05471             if (inputState->guessing==0) {
05472                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
05473             }
05474         }
05475         else if ((LA(1) == IDENT) && (LA(2) == COLON)) {
05476             qualifiedMethodIdentifier();
05477             if (inputState->guessing==0) {
05478                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
05479             }
05480         }
05481         else {
05482             throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
05483         }
05484         
05485         }
05486         formalParameterList();
05487         if (inputState->guessing==0) {
05488             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
05489         }
05490         destructorHeader_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
05491     }
05492     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
05493         if( inputState->guessing == 0 ) {
05494             reportError(ex);
05495             consume();
05496             consumeUntil(_tokenSet_22);
05497         } else {
05498             throw;
05499         }
05500     }
05501     returnAST = destructorHeader_AST;
05502 }
05503 
05504 void PascalParser::methodDirectives() {
05505     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
05506     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
05507     RefPascalAST methodDirectives_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
05508     
05509     try {      // for error handling
05510         {
05511         switch ( LA(1)) {
05512         case VIRTUAL:
05513         {
05514             match(VIRTUAL);
05515             match(SEMI);
05516             {
05517             switch ( LA(1)) {
05518             case ABSTRACT:
05519             {
05520                 match(ABSTRACT);
05521                 match(SEMI);
05522                 break;
05523             }
05524             case END:
05525             case PROCEDURE:
05526             case FUNCTION:
05527             case REGISTER:
05528             case PASCAL:
05529             case CDECL:
05530             case STDCALL:
05531             case POPSTACK:
05532             case SAVEREGISTERS:
05533             case INLINE:
05534             case SAFECALL:
05535             case NEAR:
05536             case FAR:
05537             case CONSTRUCTOR:
05538             case DESTRUCTOR:
05539             {
05540                 break;
05541             }
05542             default:
05543             {
05544                 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
05545             }
05546             }
05547             }
05548             break;
05549         }
05550         case END:
05551         case PROCEDURE:
05552         case FUNCTION:
05553         case REGISTER:
05554         case PASCAL:
05555         case CDECL:
05556         case STDCALL:
05557         case POPSTACK:
05558         case SAVEREGISTERS:
05559         case INLINE:
05560         case SAFECALL:
05561         case NEAR:
05562         case FAR:
05563         case CONSTRUCTOR:
05564         case DESTRUCTOR:
05565         {
05566             break;
05567         }
05568         default:
05569         {
05570             throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
05571         }
05572         }
05573         }
05574         {
05575         switch ( LA(1)) {
05576         case REGISTER:
05577         case PASCAL:
05578         case CDECL:
05579         case STDCALL:
05580         case POPSTACK:
05581         case SAVEREGISTERS:
05582         case INLINE:
05583         case SAFECALL:
05584         case NEAR:
05585         case FAR:
05586         {
05587             callModifiers();
05588             if (inputState->guessing==0) {
05589                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
05590             }
05591             match(SEMI);
05592             break;
05593         }
05594         case END:
05595         case PROCEDURE:
05596         case FUNCTION:
05597         case CONSTRUCTOR:
05598         case DESTRUCTOR:
05599         {
05600             break;
05601         }
05602         default:
05603         {
05604             throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
05605         }
05606         }
05607         }
05608         methodDirectives_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
05609     }
05610     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
05611         if( inputState->guessing == 0 ) {
05612             reportError(ex);
05613             consume();
05614             consumeUntil(_tokenSet_51);
05615         } else {
05616             throw;
05617         }
05618     }
05619     returnAST = methodDirectives_AST;
05620 }
05621 
05622 void PascalParser::classComponentList() {
05623     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
05624     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
05625     RefPascalAST classComponentList_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
05626     
05627     try {      // for error handling
05628         {
05629         switch ( LA(1)) {
05630         case IDENT:
05631         {
05632             { // ( ... )+
05633             int _cnt220=0;
05634             for (;;) {
05635                 if ((LA(1) == IDENT)) {
05636                     fieldDefinition();
05637                     if (inputState->guessing==0) {
05638                         astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
05639                     }
05640                 }
05641                 else {
05642                     if ( _cnt220>=1 ) { goto _loop220; } else {throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());}
05643                 }
05644                 
05645                 _cnt220++;
05646             }
05647             _loop220:;
05648             }  // ( ... )+
05649             break;
05650         }
05651         case END:
05652         case PROCEDURE:
05653         case FUNCTION:
05654         case CONSTRUCTOR:
05655         case DESTRUCTOR:
05656         case CLASS:
05657         case PROPERTY:
05658         {
05659             break;
05660         }
05661         default:
05662         {
05663             throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
05664         }
05665         }
05666         }
05667         {
05668         switch ( LA(1)) {
05669         case PROCEDURE:
05670         case FUNCTION:
05671         case CONSTRUCTOR:
05672         case DESTRUCTOR:
05673         case CLASS:
05674         case PROPERTY:
05675         {
05676             { // ( ... )+
05677             int _cnt224=0;
05678             for (;;) {
05679                 if ((_tokenSet_52.member(LA(1)))) {
05680                     {
05681                     switch ( LA(1)) {
05682                     case PROCEDURE:
05683                     case FUNCTION:
05684                     case CONSTRUCTOR:
05685                     case DESTRUCTOR:
05686                     case CLASS:
05687                     {
05688                         classMethodDefinition();
05689                         if (inputState->guessing==0) {
05690                             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
05691                         }
05692                         break;
05693                     }
05694                     case PROPERTY:
05695                     {
05696                         propertyDefinition();
05697                         if (inputState->guessing==0) {
05698                             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
05699                         }
05700                         break;
05701                     }
05702                     default:
05703                     {
05704                         throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
05705                     }
05706                     }
05707                     }
05708                 }
05709                 else {
05710                     if ( _cnt224>=1 ) { goto _loop224; } else {throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());}
05711                 }
05712                 
05713                 _cnt224++;
05714             }
05715             _loop224:;
05716             }  // ( ... )+
05717             break;
05718         }
05719         case END:
05720         {
05721             break;
05722         }
05723         default:
05724         {
05725             throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
05726         }
05727         }
05728         }
05729         classComponentList_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
05730     }
05731     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
05732         if( inputState->guessing == 0 ) {
05733             reportError(ex);
05734             consume();
05735             consumeUntil(_tokenSet_6);
05736         } else {
05737             throw;
05738         }
05739     }
05740     returnAST = classComponentList_AST;
05741 }
05742 
05743 void PascalParser::classVisibilitySpecifier() {
05744     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
05745     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
05746     RefPascalAST classVisibilitySpecifier_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
05747     
05748     try {      // for error handling
05749         switch ( LA(1)) {
05750         case PRIVATE:
05751         {
05752             match(PRIVATE);
05753             classVisibilitySpecifier_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
05754             break;
05755         }
05756         case PROTECTED:
05757         {
05758             match(PROTECTED);
05759             classVisibilitySpecifier_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
05760             break;
05761         }
05762         case PUBLIC:
05763         {
05764             match(PUBLIC);
05765             classVisibilitySpecifier_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
05766             break;
05767         }
05768         case PUBLISHED:
05769         {
05770             match(PUBLISHED);
05771             classVisibilitySpecifier_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
05772             break;
05773         }
05774         default:
05775         {
05776             throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
05777         }
05778         }
05779     }
05780     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
05781         if( inputState->guessing == 0 ) {
05782             reportError(ex);
05783             consume();
05784             consumeUntil(_tokenSet_6);
05785         } else {
05786             throw;
05787         }
05788     }
05789     returnAST = classVisibilitySpecifier_AST;
05790 }
05791 
05792 void PascalParser::classMethodDefinition() {
05793     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
05794     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
05795     RefPascalAST classMethodDefinition_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
05796     
05797     try {      // for error handling
05798         {
05799         switch ( LA(1)) {
05800         case PROCEDURE:
05801         case FUNCTION:
05802         case CLASS:
05803         {
05804             {
05805             {
05806             switch ( LA(1)) {
05807             case CLASS:
05808             {
05809                 match(CLASS);
05810                 break;
05811             }
05812             case PROCEDURE:
05813             case FUNCTION:
05814             {
05815                 break;
05816             }
05817             default:
05818             {
05819                 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
05820             }
05821             }
05822             }
05823             {
05824             switch ( LA(1)) {
05825             case FUNCTION:
05826             {
05827                 functionHeader();
05828                 if (inputState->guessing==0) {
05829                     astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
05830                 }
05831                 break;
05832             }
05833             case PROCEDURE:
05834             {
05835                 procedureHeader();
05836                 if (inputState->guessing==0) {
05837                     astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
05838                 }
05839                 break;
05840             }
05841             default:
05842             {
05843                 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
05844             }
05845             }
05846             }
05847             }
05848             break;
05849         }
05850         case CONSTRUCTOR:
05851         {
05852             constructorHeader();
05853             if (inputState->guessing==0) {
05854                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
05855             }
05856             break;
05857         }
05858         case DESTRUCTOR:
05859         {
05860             destructorHeader();
05861             if (inputState->guessing==0) {
05862                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
05863             }
05864             break;
05865         }
05866         default:
05867         {
05868             throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
05869         }
05870         }
05871         }
05872         match(SEMI);
05873         classMethodDirectives();
05874         if (inputState->guessing==0) {
05875             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
05876         }
05877         classMethodDefinition_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
05878     }
05879     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
05880         if( inputState->guessing == 0 ) {
05881             reportError(ex);
05882             consume();
05883             consumeUntil(_tokenSet_53);
05884         } else {
05885             throw;
05886         }
05887     }
05888     returnAST = classMethodDefinition_AST;
05889 }
05890 
05891 void PascalParser::propertyDefinition() {
05892     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
05893     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
05894     RefPascalAST propertyDefinition_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
05895     
05896     try {      // for error handling
05897         RefPascalAST tmp211_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
05898         if ( inputState->guessing == 0 ) {
05899             tmp211_AST = astFactory->create(LT(1));
05900             astFactory->makeASTRoot(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(tmp211_AST.get()));
05901         }
05902         match(PROPERTY);
05903         identifier();
05904         if (inputState->guessing==0) {
05905             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
05906         }
05907         {
05908         switch ( LA(1)) {
05909         case COLON:
05910         case LBRACK:
05911         {
05912             propertyInterface();
05913             if (inputState->guessing==0) {
05914                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
05915             }
05916             break;
05917         }
05918         case END:
05919         case PROCEDURE:
05920         case FUNCTION:
05921         case CONSTRUCTOR:
05922         case DESTRUCTOR:
05923         case CLASS:
05924         case PROPERTY:
05925         case LITERAL_read:
05926         case LITERAL_write:
05927         case DEFAULT:
05928         case LITERAL_nodefault:
05929         {
05930             break;
05931         }
05932         default:
05933         {
05934             throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
05935         }
05936         }
05937         }
05938         propertySpecifiers();
05939         if (inputState->guessing==0) {
05940             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
05941         }
05942         propertyDefinition_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
05943     }
05944     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
05945         if( inputState->guessing == 0 ) {
05946             reportError(ex);
05947             consume();
05948             consumeUntil(_tokenSet_53);
05949         } else {
05950             throw;
05951         }
05952     }
05953     returnAST = propertyDefinition_AST;
05954 }
05955 
05956 void PascalParser::classMethodDirectives() {
05957     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
05958     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
05959     RefPascalAST classMethodDirectives_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
05960     
05961     try {      // for error handling
05962         {
05963         switch ( LA(1)) {
05964         case VIRTUAL:
05965         case OVERRIDE:
05966         case MESSAGE:
05967         {
05968             directiveVariants();
05969             if (inputState->guessing==0) {
05970                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
05971             }
05972             match(SEMI);
05973             break;
05974         }
05975         case END:
05976         case PROCEDURE:
05977         case FUNCTION:
05978         case REGISTER:
05979         case PASCAL:
05980         case CDECL:
05981         case STDCALL:
05982         case POPSTACK:
05983         case SAVEREGISTERS:
05984         case INLINE:
05985         case SAFECALL:
05986         case NEAR:
05987         case FAR:
05988         case CONSTRUCTOR:
05989         case DESTRUCTOR:
05990         case CLASS:
05991         case PROPERTY:
05992         {
05993             break;
05994         }
05995         default:
05996         {
05997             throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
05998         }
05999         }
06000         }
06001         {
06002         switch ( LA(1)) {
06003         case REGISTER:
06004         case PASCAL:
06005         case CDECL:
06006         case STDCALL:
06007         case POPSTACK:
06008         case SAVEREGISTERS:
06009         case INLINE:
06010         case SAFECALL:
06011         case NEAR:
06012         case FAR:
06013         {
06014             callModifiers();
06015             if (inputState->guessing==0) {
06016                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
06017             }
06018             match(SEMI);
06019             break;
06020         }
06021         case END:
06022         case PROCEDURE:
06023         case FUNCTION:
06024         case CONSTRUCTOR:
06025         case DESTRUCTOR:
06026         case CLASS:
06027         case PROPERTY:
06028         {
06029             break;
06030         }
06031         default:
06032         {
06033             throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
06034         }
06035         }
06036         }
06037         classMethodDirectives_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
06038     }
06039     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
06040         if( inputState->guessing == 0 ) {
06041             reportError(ex);
06042             consume();
06043             consumeUntil(_tokenSet_53);
06044         } else {
06045             throw;
06046         }
06047     }
06048     returnAST = classMethodDirectives_AST;
06049 }
06050 
06051 void PascalParser::directiveVariants() {
06052     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
06053     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
06054     RefPascalAST directiveVariants_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
06055     
06056     try {      // for error handling
06057         switch ( LA(1)) {
06058         case VIRTUAL:
06059         {
06060             {
06061             match(VIRTUAL);
06062             {
06063             switch ( LA(1)) {
06064             case ABSTRACT:
06065             {
06066                 match(ABSTRACT);
06067                 match(SEMI);
06068                 break;
06069             }
06070             case SEMI:
06071             {
06072                 break;
06073             }
06074             default:
06075             {
06076                 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
06077             }
06078             }
06079             }
06080             }
06081             directiveVariants_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
06082             break;
06083         }
06084         case OVERRIDE:
06085         {
06086             match(OVERRIDE);
06087             directiveVariants_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
06088             break;
06089         }
06090         case MESSAGE:
06091         {
06092             {
06093             match(MESSAGE);
06094             {
06095             switch ( LA(1)) {
06096             case NUM_INT:
06097             case PLUS:
06098             case MINUS:
06099             {
06100                 integerConstant();
06101                 if (inputState->guessing==0) {
06102                     astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
06103                 }
06104                 break;
06105             }
06106             case STRING_LITERAL:
06107             case CHR:
06108             {
06109                 stringConstant();
06110                 if (inputState->guessing==0) {
06111                     astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
06112                 }
06113                 break;
06114             }
06115             default:
06116             {
06117                 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
06118             }
06119             }
06120             }
06121             }
06122             directiveVariants_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
06123             break;
06124         }
06125         default:
06126         {
06127             throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
06128         }
06129         }
06130     }
06131     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
06132         if( inputState->guessing == 0 ) {
06133             reportError(ex);
06134             consume();
06135             consumeUntil(_tokenSet_22);
06136         } else {
06137             throw;
06138         }
06139     }
06140     returnAST = directiveVariants_AST;
06141 }
06142 
06143 void PascalParser::propertyInterface() {
06144     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
06145     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
06146     RefPascalAST propertyInterface_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
06147     
06148     try {      // for error handling
06149         {
06150         switch ( LA(1)) {
06151         case LBRACK:
06152         {
06153             propertyParameterList();
06154             if (inputState->guessing==0) {
06155                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
06156             }
06157             break;
06158         }
06159         case COLON:
06160         {
06161             break;
06162         }
06163         default:
06164         {
06165             throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
06166         }
06167         }
06168         }
06169         match(COLON);
06170         typeIdentifier();
06171         if (inputState->guessing==0) {
06172             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
06173         }
06174         {
06175         switch ( LA(1)) {
06176         case LITERAL_index:
06177         {
06178             RefPascalAST tmp220_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
06179             if ( inputState->guessing == 0 ) {
06180                 tmp220_AST = astFactory->create(LT(1));
06181                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(tmp220_AST.get()));
06182             }
06183             match(LITERAL_index);
06184             integerConstant();
06185             if (inputState->guessing==0) {
06186                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
06187             }
06188             break;
06189         }
06190         case END:
06191         case PROCEDURE:
06192         case FUNCTION:
06193         case CONSTRUCTOR:
06194         case DESTRUCTOR:
06195         case CLASS:
06196         case PROPERTY:
06197         case LITERAL_read:
06198         case LITERAL_write:
06199         case DEFAULT:
06200         case LITERAL_nodefault:
06201         {
06202             break;
06203         }
06204         default:
06205         {
06206             throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
06207         }
06208         }
06209         }
06210         propertyInterface_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
06211     }
06212     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
06213         if( inputState->guessing == 0 ) {
06214             reportError(ex);
06215             consume();
06216             consumeUntil(_tokenSet_54);
06217         } else {
06218             throw;
06219         }
06220     }
06221     returnAST = propertyInterface_AST;
06222 }
06223 
06224 void PascalParser::propertySpecifiers() {
06225     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
06226     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
06227     RefPascalAST propertySpecifiers_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
06228     
06229     try {      // for error handling
06230         {
06231         switch ( LA(1)) {
06232         case LITERAL_read:
06233         {
06234             readSpecifier();
06235             if (inputState->guessing==0) {
06236                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
06237             }
06238             break;
06239         }
06240         case END:
06241         case PROCEDURE:
06242         case FUNCTION:
06243         case CONSTRUCTOR:
06244         case DESTRUCTOR:
06245         case CLASS:
06246         case PROPERTY:
06247         case LITERAL_write:
06248         case DEFAULT:
06249         case LITERAL_nodefault:
06250         {
06251             break;
06252         }
06253         default:
06254         {
06255             throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
06256         }
06257         }
06258         }
06259         {
06260         switch ( LA(1)) {
06261         case LITERAL_write:
06262         {
06263             writeSpecifier();
06264             if (inputState->guessing==0) {
06265                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
06266             }
06267             break;
06268         }
06269         case END:
06270         case PROCEDURE:
06271         case FUNCTION:
06272         case CONSTRUCTOR:
06273         case DESTRUCTOR:
06274         case CLASS:
06275         case PROPERTY:
06276         case DEFAULT:
06277         case LITERAL_nodefault:
06278         {
06279             break;
06280         }
06281         default:
06282         {
06283             throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
06284         }
06285         }
06286         }
06287         {
06288         switch ( LA(1)) {
06289         case DEFAULT:
06290         case LITERAL_nodefault:
06291         {
06292             defaultSpecifier();
06293             if (inputState->guessing==0) {
06294                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
06295             }
06296             break;
06297         }
06298         case END:
06299         case PROCEDURE:
06300         case FUNCTION:
06301         case CONSTRUCTOR:
06302         case DESTRUCTOR:
06303         case CLASS:
06304         case PROPERTY:
06305         {
06306             break;
06307         }
06308         default:
06309         {
06310             throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
06311         }
06312         }
06313         }
06314         propertySpecifiers_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
06315     }
06316     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
06317         if( inputState->guessing == 0 ) {
06318             reportError(ex);
06319             consume();
06320             consumeUntil(_tokenSet_53);
06321         } else {
06322             throw;
06323         }
06324     }
06325     returnAST = propertySpecifiers_AST;
06326 }
06327 
06328 void PascalParser::propertyParameterList() {
06329     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
06330     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
06331     RefPascalAST propertyParameterList_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
06332     
06333     try {      // for error handling
06334         match(LBRACK);
06335         parameterDeclaration();
06336         if (inputState->guessing==0) {
06337             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
06338         }
06339         { // ( ... )*
06340         for (;;) {
06341             if ((LA(1) == SEMI)) {
06342                 match(SEMI);
06343                 parameterDeclaration();
06344                 if (inputState->guessing==0) {
06345                     astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
06346                 }
06347             }
06348             else {
06349                 goto _loop246;
06350             }
06351             
06352         }
06353         _loop246:;
06354         } // ( ... )*
06355         match(RBRACK);
06356         propertyParameterList_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
06357     }
06358     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
06359         if( inputState->guessing == 0 ) {
06360             reportError(ex);
06361             consume();
06362             consumeUntil(_tokenSet_55);
06363         } else {
06364             throw;
06365         }
06366     }
06367     returnAST = propertyParameterList_AST;
06368 }
06369 
06370 void PascalParser::readSpecifier() {
06371     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
06372     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
06373     RefPascalAST readSpecifier_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
06374     
06375     try {      // for error handling
06376         RefPascalAST tmp224_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
06377         if ( inputState->guessing == 0 ) {
06378             tmp224_AST = astFactory->create(LT(1));
06379             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(tmp224_AST.get()));
06380         }
06381         match(LITERAL_read);
06382         fieldOrMethod();
06383         if (inputState->guessing==0) {
06384             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
06385         }
06386         readSpecifier_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
06387     }
06388     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
06389         if( inputState->guessing == 0 ) {
06390             reportError(ex);
06391             consume();
06392             consumeUntil(_tokenSet_56);
06393         } else {
06394             throw;
06395         }
06396     }
06397     returnAST = readSpecifier_AST;
06398 }
06399 
06400 void PascalParser::writeSpecifier() {
06401     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
06402     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
06403     RefPascalAST writeSpecifier_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
06404     
06405     try {      // for error handling
06406         RefPascalAST tmp225_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
06407         if ( inputState->guessing == 0 ) {
06408             tmp225_AST = astFactory->create(LT(1));
06409             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(tmp225_AST.get()));
06410         }
06411         match(LITERAL_write);
06412         fieldOrMethod();
06413         if (inputState->guessing==0) {
06414             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
06415         }
06416         writeSpecifier_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
06417     }
06418     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
06419         if( inputState->guessing == 0 ) {
06420             reportError(ex);
06421             consume();
06422             consumeUntil(_tokenSet_57);
06423         } else {
06424             throw;
06425         }
06426     }
06427     returnAST = writeSpecifier_AST;
06428 }
06429 
06430 void PascalParser::defaultSpecifier() {
06431     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
06432     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
06433     RefPascalAST defaultSpecifier_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
06434     
06435     try {      // for error handling
06436         switch ( LA(1)) {
06437         case DEFAULT:
06438         {
06439             {
06440             RefPascalAST tmp226_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
06441             if ( inputState->guessing == 0 ) {
06442                 tmp226_AST = astFactory->create(LT(1));
06443                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(tmp226_AST.get()));
06444             }
06445             match(DEFAULT);
06446             {
06447             switch ( LA(1)) {
06448             case NUM_INT:
06449             case PLUS:
06450             case MINUS:
06451             case STRING_LITERAL:
06452             case CHR:
06453             case NUM_REAL:
06454             case IDENT:
06455             {
06456                 constant();
06457                 if (inputState->guessing==0) {
06458                     astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
06459                 }
06460                 break;
06461             }
06462             case END:
06463             case PROCEDURE:
06464             case FUNCTION:
06465             case CONSTRUCTOR:
06466             case DESTRUCTOR:
06467             case CLASS:
06468             case PROPERTY:
06469             {
06470                 break;
06471             }
06472             default:
06473             {
06474                 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
06475             }
06476             }
06477             }
06478             }
06479             defaultSpecifier_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
06480             break;
06481         }
06482         case LITERAL_nodefault:
06483         {
06484             RefPascalAST tmp227_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
06485             if ( inputState->guessing == 0 ) {
06486                 tmp227_AST = astFactory->create(LT(1));
06487                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(tmp227_AST.get()));
06488             }
06489             match(LITERAL_nodefault);
06490             defaultSpecifier_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
06491             break;
06492         }
06493         default:
06494         {
06495             throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
06496         }
06497         }
06498     }
06499     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
06500         if( inputState->guessing == 0 ) {
06501             reportError(ex);
06502             consume();
06503             consumeUntil(_tokenSet_53);
06504         } else {
06505             throw;
06506         }
06507     }
06508     returnAST = defaultSpecifier_AST;
06509 }
06510 
06511 void PascalParser::fieldOrMethod() {
06512     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
06513     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
06514     RefPascalAST fieldOrMethod_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
06515     
06516     try {      // for error handling
06517         identifier();
06518         if (inputState->guessing==0) {
06519             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
06520         }
06521         fieldOrMethod_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
06522     }
06523     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
06524         if( inputState->guessing == 0 ) {
06525             reportError(ex);
06526             consume();
06527             consumeUntil(_tokenSet_56);
06528         } else {
06529             throw;
06530         }
06531     }
06532     returnAST = fieldOrMethod_AST;
06533 }
06534 
06535 void PascalParser::simpleExpression() {
06536     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
06537     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
06538     RefPascalAST simpleExpression_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
06539     
06540     try {      // for error handling
06541         term();
06542         if (inputState->guessing==0) {
06543             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
06544         }
06545         { // ( ... )*
06546         for (;;) {
06547             if (((LA(1) >= PLUS && LA(1) <= XOR))) {
06548                 {
06549                 switch ( LA(1)) {
06550                 case PLUS:
06551                 {
06552                     match(PLUS);
06553                     break;
06554                 }
06555                 case MINUS:
06556                 {
06557                     match(MINUS);
06558                     break;
06559                 }
06560                 case OR:
06561                 {
06562                     match(OR);
06563                     break;
06564                 }
06565                 case XOR:
06566                 {
06567                     match(XOR);
06568                     break;
06569                 }
06570                 default:
06571                 {
06572                     throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
06573                 }
06574                 }
06575                 }
06576                 term();
06577                 if (inputState->guessing==0) {
06578                     astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
06579                 }
06580             }
06581             else {
06582                 goto _loop263;
06583             }
06584             
06585         }
06586         _loop263:;
06587         } // ( ... )*
06588         simpleExpression_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
06589     }
06590     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
06591         if( inputState->guessing == 0 ) {
06592             reportError(ex);
06593             consume();
06594             consumeUntil(_tokenSet_58);
06595         } else {
06596             throw;
06597         }
06598     }
06599     returnAST = simpleExpression_AST;
06600 }
06601 
06602 void PascalParser::expressionSign() {
06603     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
06604     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
06605     RefPascalAST expressionSign_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
06606     
06607     try {      // for error handling
06608         switch ( LA(1)) {
06609         case LE:
06610         {
06611             match(LE);
06612             expressionSign_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
06613             break;
06614         }
06615         case GE:
06616         {
06617             match(GE);
06618             expressionSign_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
06619             break;
06620         }
06621         case LTH:
06622         {
06623             match(LTH);
06624             expressionSign_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
06625             break;
06626         }
06627         case GT:
06628         {
06629             match(GT);
06630             expressionSign_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
06631             break;
06632         }
06633         case NOT_EQUAL:
06634         {
06635             match(NOT_EQUAL);
06636             expressionSign_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
06637             break;
06638         }
06639         case IN:
06640         {
06641             match(IN);
06642             expressionSign_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
06643             break;
06644         }
06645         case IS:
06646         {
06647             match(IS);
06648             expressionSign_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
06649             break;
06650         }
06651         case EQUAL:
06652         {
06653             match(EQUAL);
06654             expressionSign_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
06655             break;
06656         }
06657         default:
06658         {
06659             throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
06660         }
06661         }
06662     }
06663     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
06664         if( inputState->guessing == 0 ) {
06665             reportError(ex);
06666             consume();
06667             consumeUntil(_tokenSet_36);
06668         } else {
06669             throw;
06670         }
06671     }
06672     returnAST = expressionSign_AST;
06673 }
06674 
06675 void PascalParser::term() {
06676     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
06677     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
06678     RefPascalAST term_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
06679     
06680     try {      // for error handling
06681         factor();
06682         if (inputState->guessing==0) {
06683             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
06684         }
06685         { // ( ... )*
06686         for (;;) {
06687             if (((LA(1) >= STAR && LA(1) <= SHR))) {
06688                 {
06689                 switch ( LA(1)) {
06690                 case STAR:
06691                 {
06692                     match(STAR);
06693                     break;
06694                 }
06695                 case SLASH:
06696                 {
06697                     match(SLASH);
06698                     break;
06699                 }
06700                 case DIV:
06701                 {
06702                     match(DIV);
06703                     break;
06704                 }
06705                 case MOD:
06706                 {
06707                     match(MOD);
06708                     break;
06709                 }
06710                 case AND:
06711                 {
06712                     match(AND);
06713                     break;
06714                 }
06715                 case SHL:
06716                 {
06717                     match(SHL);
06718                     break;
06719                 }
06720                 case SHR:
06721                 {
06722                     match(SHR);
06723                     break;
06724                 }
06725                 default:
06726                 {
06727                     throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
06728                 }
06729                 }
06730                 }
06731                 factor();
06732                 if (inputState->guessing==0) {
06733                     astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
06734                 }
06735             }
06736             else {
06737                 goto _loop267;
06738             }
06739             
06740         }
06741         _loop267:;
06742         } // ( ... )*
06743         term_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
06744     }
06745     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
06746         if( inputState->guessing == 0 ) {
06747             reportError(ex);
06748             consume();
06749             consumeUntil(_tokenSet_59);
06750         } else {
06751             throw;
06752         }
06753     }
06754     returnAST = term_AST;
06755 }
06756 
06757 void PascalParser::factor() {
06758     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
06759     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
06760     RefPascalAST factor_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
06761     
06762     try {      // for error handling
06763         switch ( LA(1)) {
06764         case LPAREN:
06765         {
06766             {
06767             match(LPAREN);
06768             expression();
06769             if (inputState->guessing==0) {
06770                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
06771             }
06772             match(RPAREN);
06773             }
06774             factor_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
06775             break;
06776         }
06777         case NUM_INT:
06778         case STRING_LITERAL:
06779         case CHR:
06780         case NIL:
06781         case NUM_REAL:
06782         {
06783             unsignedConstant();
06784             if (inputState->guessing==0) {
06785                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
06786             }
06787             factor_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
06788             break;
06789         }
06790         case NOT:
06791         {
06792             {
06793             match(NOT);
06794             factor();
06795             if (inputState->guessing==0) {
06796                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
06797             }
06798             }
06799             factor_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
06800             break;
06801         }
06802         case PLUS:
06803         case MINUS:
06804         {
06805             {
06806             {
06807             switch ( LA(1)) {
06808             case PLUS:
06809             {
06810                 match(PLUS);
06811                 break;
06812             }
06813             case MINUS:
06814             {
06815                 match(MINUS);
06816                 break;
06817             }
06818             default:
06819             {
06820                 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
06821             }
06822             }
06823             }
06824             factor();
06825             if (inputState->guessing==0) {
06826                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
06827             }
06828             }
06829             factor_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
06830             break;
06831         }
06832         case LBRACK:
06833         {
06834             setConstructor();
06835             if (inputState->guessing==0) {
06836                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
06837             }
06838             factor_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
06839             break;
06840         }
06841         case AT:
06842         {
06843             addressFactor();
06844             if (inputState->guessing==0) {
06845                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
06846             }
06847             factor_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
06848             break;
06849         }
06850         case TRUE:
06851         {
06852             RefPascalAST tmp252_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
06853             if ( inputState->guessing == 0 ) {
06854                 tmp252_AST = astFactory->create(LT(1));
06855                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(tmp252_AST.get()));
06856             }
06857             match(TRUE);
06858             factor_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
06859             break;
06860         }
06861         case FALSE:
06862         {
06863             RefPascalAST tmp253_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
06864             if ( inputState->guessing == 0 ) {
06865                 tmp253_AST = astFactory->create(LT(1));
06866                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(tmp253_AST.get()));
06867             }
06868             match(FALSE);
06869             factor_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
06870             break;
06871         }
06872         default:
06873             if ((LA(1) == IDENT) && (_tokenSet_60.member(LA(2)))) {
06874                 identifierOrValueTypecastOrFunctionCall();
06875                 if (inputState->guessing==0) {
06876                     astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
06877                 }
06878                 factor_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
06879             }
06880             else if ((LA(1) == IDENT) && (LA(2) == LBRACK)) {
06881                 identifier();
06882                 if (inputState->guessing==0) {
06883                     astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
06884                 }
06885                 match(LBRACK);
06886                 expression();
06887                 if (inputState->guessing==0) {
06888                     astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
06889                 }
06890                 { // ( ... )*
06891                 for (;;) {
06892                     if ((LA(1) == COMMA)) {
06893                         match(COMMA);
06894                         expression();
06895                         if (inputState->guessing==0) {
06896                             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
06897                         }
06898                     }
06899                     else {
06900                         goto _loop274;
06901                     }
06902                     
06903                 }
06904                 _loop274:;
06905                 } // ( ... )*
06906                 match(RBRACK);
06907                 factor_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
06908             }
06909         else {
06910             throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
06911         }
06912         }
06913     }
06914     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
06915         if( inputState->guessing == 0 ) {
06916             reportError(ex);
06917             consume();
06918             consumeUntil(_tokenSet_61);
06919         } else {
06920             throw;
06921         }
06922     }
06923     returnAST = factor_AST;
06924 }
06925 
06926 void PascalParser::identifierOrValueTypecastOrFunctionCall() {
06927     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
06928     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
06929     RefPascalAST identifierOrValueTypecastOrFunctionCall_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
06930     
06931     try {      // for error handling
06932         bool synPredMatched277 = false;
06933         if (((LA(1) == IDENT) && (LA(2) == LPAREN))) {
06934             int _m277 = mark();
06935             synPredMatched277 = true;
06936             inputState->guessing++;
06937             try {
06938                 {
06939                 identifier();
06940                 match(LPAREN);
06941                 expression();
06942                 match(COMMA);
06943                 }
06944             }
06945             catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& pe) {
06946                 synPredMatched277 = false;
06947             }
06948             rewind(_m277);
06949             inputState->guessing--;
06950         }
06951         if ( synPredMatched277 ) {
06952             identifier();
06953             if (inputState->guessing==0) {
06954                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
06955             }
06956             match(LPAREN);
06957             expressions();
06958             if (inputState->guessing==0) {
06959                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
06960             }
06961             match(RPAREN);
06962             identifierOrValueTypecastOrFunctionCall_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
06963         }
06964         else {
06965             bool synPredMatched279 = false;
06966             if (((LA(1) == IDENT) && (LA(2) == LPAREN))) {
06967                 int _m279 = mark();
06968                 synPredMatched279 = true;
06969                 inputState->guessing++;
06970                 try {
06971                     {
06972                     identifier();
06973                     match(LPAREN);
06974                     expression();
06975                     match(RPAREN);
06976                     }
06977                 }
06978                 catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& pe) {
06979                     synPredMatched279 = false;
06980                 }
06981                 rewind(_m279);
06982                 inputState->guessing--;
06983             }
06984             if ( synPredMatched279 ) {
06985                 identifier();
06986                 if (inputState->guessing==0) {
06987                     astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
06988                 }
06989                 match(LPAREN);
06990                 expression();
06991                 if (inputState->guessing==0) {
06992                     astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
06993                 }
06994                 match(RPAREN);
06995                 identifierOrValueTypecastOrFunctionCall_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
06996             }
06997             else if ((LA(1) == IDENT) && (_tokenSet_61.member(LA(2)))) {
06998                 identifier();
06999                 if (inputState->guessing==0) {
07000                     astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
07001                 }
07002                 identifierOrValueTypecastOrFunctionCall_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
07003             }
07004         else {
07005             throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
07006         }
07007         }
07008     }
07009     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
07010         if( inputState->guessing == 0 ) {
07011             reportError(ex);
07012             consume();
07013             consumeUntil(_tokenSet_61);
07014         } else {
07015             throw;
07016         }
07017     }
07018     returnAST = identifierOrValueTypecastOrFunctionCall_AST;
07019 }
07020 
07021 void PascalParser::unsignedConstant() {
07022     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
07023     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
07024     RefPascalAST unsignedConstant_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
07025     
07026     try {      // for error handling
07027         switch ( LA(1)) {
07028         case NUM_INT:
07029         case NUM_REAL:
07030         {
07031             unsignedNumber();
07032             if (inputState->guessing==0) {
07033                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
07034             }
07035             unsignedConstant_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
07036             break;
07037         }
07038         case CHR:
07039         {
07040             constantChr();
07041             if (inputState->guessing==0) {
07042                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
07043             }
07044             unsignedConstant_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
07045             break;
07046         }
07047         case STRING_LITERAL:
07048         {
07049             string();
07050             if (inputState->guessing==0) {
07051                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
07052             }
07053             unsignedConstant_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
07054             break;
07055         }
07056         case NIL:
07057         {
07058             match(NIL);
07059             unsignedConstant_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
07060             break;
07061         }
07062         default:
07063         {
07064             throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
07065         }
07066         }
07067     }
07068     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
07069         if( inputState->guessing == 0 ) {
07070             reportError(ex);
07071             consume();
07072             consumeUntil(_tokenSet_61);
07073         } else {
07074             throw;
07075         }
07076     }
07077     returnAST = unsignedConstant_AST;
07078 }
07079 
07080 void PascalParser::setConstructor() {
07081     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
07082     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
07083     RefPascalAST setConstructor_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
07084     
07085     try {      // for error handling
07086         match(LBRACK);
07087         {
07088         switch ( LA(1)) {
07089         case LPAREN:
07090         case NUM_INT:
07091         case LBRACK:
07092         case PLUS:
07093         case MINUS:
07094         case NOT:
07095         case TRUE:
07096         case FALSE:
07097         case AT:
07098         case STRING_LITERAL:
07099         case CHR:
07100         case NIL:
07101         case NUM_REAL:
07102         case IDENT:
07103         {
07104             setGroup();
07105             if (inputState->guessing==0) {
07106                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
07107             }
07108             { // ( ... )*
07109             for (;;) {
07110                 if ((LA(1) == COMMA)) {
07111                     match(COMMA);
07112                     setGroup();
07113                     if (inputState->guessing==0) {
07114                         astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
07115                     }
07116                 }
07117                 else {
07118                     goto _loop290;
07119                 }
07120                 
07121             }
07122             _loop290:;
07123             } // ( ... )*
07124             break;
07125         }
07126         case RBRACK:
07127         {
07128             break;
07129         }
07130         default:
07131         {
07132             throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
07133         }
07134         }
07135         }
07136         match(RBRACK);
07137         setConstructor_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
07138     }
07139     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
07140         if( inputState->guessing == 0 ) {
07141             reportError(ex);
07142             consume();
07143             consumeUntil(_tokenSet_61);
07144         } else {
07145             throw;
07146         }
07147     }
07148     returnAST = setConstructor_AST;
07149 }
07150 
07151 void PascalParser::addressFactor() {
07152     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
07153     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
07154     RefPascalAST addressFactor_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
07155     
07156     try {      // for error handling
07157         match(AT);
07158         identifier();
07159         if (inputState->guessing==0) {
07160             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
07161         }
07162         addressFactor_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
07163     }
07164     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
07165         if( inputState->guessing == 0 ) {
07166             reportError(ex);
07167             consume();
07168             consumeUntil(_tokenSet_61);
07169         } else {
07170             throw;
07171         }
07172     }
07173     returnAST = addressFactor_AST;
07174 }
07175 
07176 void PascalParser::expressions() {
07177     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
07178     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
07179     RefPascalAST expressions_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
07180     
07181     try {      // for error handling
07182         expression();
07183         if (inputState->guessing==0) {
07184             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
07185         }
07186         { // ( ... )*
07187         for (;;) {
07188             if ((LA(1) == COMMA)) {
07189                 match(COMMA);
07190                 expression();
07191                 if (inputState->guessing==0) {
07192                     astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
07193                 }
07194             }
07195             else {
07196                 goto _loop286;
07197             }
07198             
07199         }
07200         _loop286:;
07201         } // ( ... )*
07202         expressions_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
07203     }
07204     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
07205         if( inputState->guessing == 0 ) {
07206             reportError(ex);
07207             consume();
07208             consumeUntil(_tokenSet_42);
07209         } else {
07210             throw;
07211         }
07212     }
07213     returnAST = expressions_AST;
07214 }
07215 
07216 void PascalParser::functionCall() {
07217     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
07218     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
07219     RefPascalAST functionCall_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
07220     
07221     try {      // for error handling
07222         identifier();
07223         if (inputState->guessing==0) {
07224             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
07225         }
07226         {
07227         switch ( LA(1)) {
07228         case LPAREN:
07229         {
07230             actualParameterList();
07231             if (inputState->guessing==0) {
07232                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
07233             }
07234             break;
07235         }
07236         case SEMI:
07237         case END:
07238         case FINALIZATION:
07239         case AT:
07240         case ELSE:
07241         case UNTIL:
07242         case EXCEPT:
07243         case FINALLY:
07244         {
07245             break;
07246         }
07247         default:
07248         {
07249             throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
07250         }
07251         }
07252         }
07253         functionCall_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
07254     }
07255     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
07256         if( inputState->guessing == 0 ) {
07257             reportError(ex);
07258             consume();
07259             consumeUntil(_tokenSet_62);
07260         } else {
07261             throw;
07262         }
07263     }
07264     returnAST = functionCall_AST;
07265 }
07266 
07267 void PascalParser::actualParameterList() {
07268     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
07269     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
07270     RefPascalAST actualParameterList_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
07271     
07272     try {      // for error handling
07273         match(LPAREN);
07274         {
07275         switch ( LA(1)) {
07276         case LPAREN:
07277         case NUM_INT:
07278         case LBRACK:
07279         case PLUS:
07280         case MINUS:
07281         case NOT:
07282         case TRUE:
07283         case FALSE:
07284         case AT:
07285         case STRING_LITERAL:
07286         case CHR:
07287         case NIL:
07288         case NUM_REAL:
07289         case IDENT:
07290         {
07291             expressions();
07292             if (inputState->guessing==0) {
07293                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
07294             }
07295             break;
07296         }
07297         case RPAREN:
07298         {
07299             break;
07300         }
07301         default:
07302         {
07303             throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
07304         }
07305         }
07306         }
07307         match(RPAREN);
07308         actualParameterList_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
07309     }
07310     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
07311         if( inputState->guessing == 0 ) {
07312             reportError(ex);
07313             consume();
07314             consumeUntil(_tokenSet_62);
07315         } else {
07316             throw;
07317         }
07318     }
07319     returnAST = actualParameterList_AST;
07320 }
07321 
07322 void PascalParser::setGroup() {
07323     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
07324     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
07325     RefPascalAST setGroup_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
07326     
07327     try {      // for error handling
07328         expression();
07329         if (inputState->guessing==0) {
07330             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
07331         }
07332         {
07333         switch ( LA(1)) {
07334         case DOT:
07335         {
07336             match(DOT);
07337             match(DOT);
07338             expression();
07339             if (inputState->guessing==0) {
07340                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
07341             }
07342             break;
07343         }
07344         case COMMA:
07345         case RBRACK:
07346         {
07347             break;
07348         }
07349         default:
07350         {
07351             throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
07352         }
07353         }
07354         }
07355         setGroup_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
07356     }
07357     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
07358         if( inputState->guessing == 0 ) {
07359             reportError(ex);
07360             consume();
07361             consumeUntil(_tokenSet_45);
07362         } else {
07363             throw;
07364         }
07365     }
07366     returnAST = setGroup_AST;
07367 }
07368 
07369 void PascalParser::valueTypecast() {
07370     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
07371     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
07372     RefPascalAST valueTypecast_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
07373     
07374     try {      // for error handling
07375         typeIdentifier();
07376         if (inputState->guessing==0) {
07377             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
07378         }
07379         match(LPAREN);
07380         expression();
07381         if (inputState->guessing==0) {
07382             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
07383         }
07384         match(RPAREN);
07385         valueTypecast_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
07386     }
07387     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
07388         if( inputState->guessing == 0 ) {
07389             reportError(ex);
07390             consume();
07391             consumeUntil(_tokenSet_0);
07392         } else {
07393             throw;
07394         }
07395     }
07396     returnAST = valueTypecast_AST;
07397 }
07398 
07399 void PascalParser::simpleStatement() {
07400     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
07401     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
07402     RefPascalAST simpleStatement_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
07403     
07404     try {      // for error handling
07405         switch ( LA(1)) {
07406         case GOTO:
07407         {
07408             gotoStatement();
07409             if (inputState->guessing==0) {
07410                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
07411             }
07412             simpleStatement_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
07413             break;
07414         }
07415         case RAISE:
07416         {
07417             raiseStatement();
07418             if (inputState->guessing==0) {
07419                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
07420             }
07421             simpleStatement_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
07422             break;
07423         }
07424         default:
07425             if ((LA(1) == IDENT) && (_tokenSet_63.member(LA(2)))) {
07426                 assignmentStatement();
07427                 if (inputState->guessing==0) {
07428                     astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
07429                 }
07430                 simpleStatement_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
07431             }
07432             else if ((LA(1) == IDENT) && (_tokenSet_64.member(LA(2)))) {
07433                 procedureStatement();
07434                 if (inputState->guessing==0) {
07435                     astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
07436                 }
07437                 simpleStatement_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
07438             }
07439         else {
07440             throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
07441         }
07442         }
07443     }
07444     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
07445         if( inputState->guessing == 0 ) {
07446             reportError(ex);
07447             consume();
07448             consumeUntil(_tokenSet_16);
07449         } else {
07450             throw;
07451         }
07452     }
07453     returnAST = simpleStatement_AST;
07454 }
07455 
07456 void PascalParser::structuredStatement() {
07457     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
07458     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
07459     RefPascalAST structuredStatement_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
07460     
07461     try {      // for error handling
07462         switch ( LA(1)) {
07463         case BEGIN:
07464         {
07465             compoundStatement();
07466             if (inputState->guessing==0) {
07467                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
07468             }
07469             structuredStatement_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
07470             break;
07471         }
07472         case WHILE:
07473         case REPEAT:
07474         case FOR:
07475         {
07476             repetitiveStatement();
07477             if (inputState->guessing==0) {
07478                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
07479             }
07480             structuredStatement_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
07481             break;
07482         }
07483         case CASE:
07484         case IF:
07485         {
07486             conditionalStatement();
07487             if (inputState->guessing==0) {
07488                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
07489             }
07490             structuredStatement_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
07491             break;
07492         }
07493         case TRY:
07494         {
07495             exceptionStatement();
07496             if (inputState->guessing==0) {
07497                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
07498             }
07499             structuredStatement_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
07500             break;
07501         }
07502         case WITH:
07503         {
07504             withStatement();
07505             if (inputState->guessing==0) {
07506                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
07507             }
07508             structuredStatement_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
07509             break;
07510         }
07511         default:
07512         {
07513             throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
07514         }
07515         }
07516     }
07517     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
07518         if( inputState->guessing == 0 ) {
07519             reportError(ex);
07520             consume();
07521             consumeUntil(_tokenSet_16);
07522         } else {
07523             throw;
07524         }
07525     }
07526     returnAST = structuredStatement_AST;
07527 }
07528 
07529 void PascalParser::assignmentStatement() {
07530     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
07531     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
07532     RefPascalAST assignmentStatement_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
07533     
07534     try {      // for error handling
07535         identifierOrArrayIdentifier();
07536         if (inputState->guessing==0) {
07537             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
07538         }
07539         assignmentOperator();
07540         if (inputState->guessing==0) {
07541             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
07542         }
07543         expression();
07544         if (inputState->guessing==0) {
07545             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
07546         }
07547         assignmentStatement_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
07548     }
07549     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
07550         if( inputState->guessing == 0 ) {
07551             reportError(ex);
07552             consume();
07553             consumeUntil(_tokenSet_16);
07554         } else {
07555             throw;
07556         }
07557     }
07558     returnAST = assignmentStatement_AST;
07559 }
07560 
07561 void PascalParser::procedureStatement() {
07562     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
07563     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
07564     RefPascalAST procedureStatement_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
07565     
07566     try {      // for error handling
07567         identifier();
07568         if (inputState->guessing==0) {
07569             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
07570         }
07571         {
07572         switch ( LA(1)) {
07573         case LPAREN:
07574         {
07575             actualParameterList();
07576             if (inputState->guessing==0) {
07577                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
07578             }
07579             break;
07580         }
07581         case SEMI:
07582         case END:
07583         case FINALIZATION:
07584         case ELSE:
07585         case UNTIL:
07586         case EXCEPT:
07587         case FINALLY:
07588         {
07589             break;
07590         }
07591         default:
07592         {
07593             throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
07594         }
07595         }
07596         }
07597         procedureStatement_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
07598     }
07599     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
07600         if( inputState->guessing == 0 ) {
07601             reportError(ex);
07602             consume();
07603             consumeUntil(_tokenSet_16);
07604         } else {
07605             throw;
07606         }
07607     }
07608     returnAST = procedureStatement_AST;
07609 }
07610 
07611 void PascalParser::gotoStatement() {
07612     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
07613     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
07614     RefPascalAST gotoStatement_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
07615     
07616     try {      // for error handling
07617         match(GOTO);
07618         label();
07619         if (inputState->guessing==0) {
07620             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
07621         }
07622         gotoStatement_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
07623     }
07624     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
07625         if( inputState->guessing == 0 ) {
07626             reportError(ex);
07627             consume();
07628             consumeUntil(_tokenSet_16);
07629         } else {
07630             throw;
07631         }
07632     }
07633     returnAST = gotoStatement_AST;
07634 }
07635 
07636 void PascalParser::raiseStatement() {
07637     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
07638     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
07639     RefPascalAST raiseStatement_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
07640     
07641     try {      // for error handling
07642         RefPascalAST tmp274_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
07643         if ( inputState->guessing == 0 ) {
07644             tmp274_AST = astFactory->create(LT(1));
07645             astFactory->makeASTRoot(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(tmp274_AST.get()));
07646         }
07647         match(RAISE);
07648         {
07649         switch ( LA(1)) {
07650         case IDENT:
07651         {
07652             functionCall();
07653             if (inputState->guessing==0) {
07654                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
07655             }
07656             {
07657             switch ( LA(1)) {
07658             case AT:
07659             {
07660                 match(AT);
07661                 addressConstant();
07662                 if (inputState->guessing==0) {
07663                     astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
07664                 }
07665                 break;
07666             }
07667             case SEMI:
07668             case END:
07669             case FINALIZATION:
07670             case ELSE:
07671             case UNTIL:
07672             case EXCEPT:
07673             case FINALLY:
07674             {
07675                 break;
07676             }
07677             default:
07678             {
07679                 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
07680             }
07681             }
07682             }
07683             break;
07684         }
07685         case SEMI:
07686         case END:
07687         case FINALIZATION:
07688         case ELSE:
07689         case UNTIL:
07690         case EXCEPT:
07691         case FINALLY:
07692         {
07693             break;
07694         }
07695         default:
07696         {
07697             throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
07698         }
07699         }
07700         }
07701         raiseStatement_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
07702     }
07703     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
07704         if( inputState->guessing == 0 ) {
07705             reportError(ex);
07706             consume();
07707             consumeUntil(_tokenSet_16);
07708         } else {
07709             throw;
07710         }
07711     }
07712     returnAST = raiseStatement_AST;
07713 }
07714 
07715 void PascalParser::identifierOrArrayIdentifier() {
07716     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
07717     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
07718     RefPascalAST identifierOrArrayIdentifier_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
07719     
07720     try {      // for error handling
07721         if ((LA(1) == IDENT) && (_tokenSet_65.member(LA(2)))) {
07722             identifier();
07723             if (inputState->guessing==0) {
07724                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
07725             }
07726             identifierOrArrayIdentifier_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
07727         }
07728         else if ((LA(1) == IDENT) && (LA(2) == LBRACK)) {
07729             identifier();
07730             if (inputState->guessing==0) {
07731                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
07732             }
07733             match(LBRACK);
07734             expression();
07735             if (inputState->guessing==0) {
07736                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
07737             }
07738             { // ( ... )*
07739             for (;;) {
07740                 if ((LA(1) == COMMA)) {
07741                     match(COMMA);
07742                     expression();
07743                     if (inputState->guessing==0) {
07744                         astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
07745                     }
07746                 }
07747                 else {
07748                     goto _loop302;
07749                 }
07750                 
07751             }
07752             _loop302:;
07753             } // ( ... )*
07754             match(RBRACK);
07755             identifierOrArrayIdentifier_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
07756         }
07757         else {
07758             throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
07759         }
07760         
07761     }
07762     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
07763         if( inputState->guessing == 0 ) {
07764             reportError(ex);
07765             consume();
07766             consumeUntil(_tokenSet_65);
07767         } else {
07768             throw;
07769         }
07770     }
07771     returnAST = identifierOrArrayIdentifier_AST;
07772 }
07773 
07774 void PascalParser::assignmentOperator() {
07775     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
07776     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
07777     RefPascalAST assignmentOperator_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
07778     
07779     try {      // for error handling
07780         switch ( LA(1)) {
07781         case ASSIGN:
07782         {
07783             match(ASSIGN);
07784             assignmentOperator_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
07785             break;
07786         }
07787         case PLUSEQ:
07788         {
07789             RefPascalAST tmp280_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
07790             if ( inputState->guessing == 0 ) {
07791                 tmp280_AST = astFactory->create(LT(1));
07792                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(tmp280_AST.get()));
07793             }
07794             match(PLUSEQ);
07795             assignmentOperator_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
07796             break;
07797         }
07798         case MINUSEQ:
07799         {
07800             RefPascalAST tmp281_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
07801             if ( inputState->guessing == 0 ) {
07802                 tmp281_AST = astFactory->create(LT(1));
07803                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(tmp281_AST.get()));
07804             }
07805             match(MINUSEQ);
07806             assignmentOperator_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
07807             break;
07808         }
07809         case STAREQ:
07810         {
07811             RefPascalAST tmp282_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
07812             if ( inputState->guessing == 0 ) {
07813                 tmp282_AST = astFactory->create(LT(1));
07814                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(tmp282_AST.get()));
07815             }
07816             match(STAREQ);
07817             assignmentOperator_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
07818             break;
07819         }
07820         case SLASHQE:
07821         {
07822             RefPascalAST tmp283_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
07823             if ( inputState->guessing == 0 ) {
07824                 tmp283_AST = astFactory->create(LT(1));
07825                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(tmp283_AST.get()));
07826             }
07827             match(SLASHQE);
07828             assignmentOperator_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
07829             break;
07830         }
07831         default:
07832         {
07833             throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
07834         }
07835         }
07836     }
07837     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
07838         if( inputState->guessing == 0 ) {
07839             reportError(ex);
07840             consume();
07841             consumeUntil(_tokenSet_36);
07842         } else {
07843             throw;
07844         }
07845     }
07846     returnAST = assignmentOperator_AST;
07847 }
07848 
07849 void PascalParser::repetitiveStatement() {
07850     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
07851     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
07852     RefPascalAST repetitiveStatement_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
07853     
07854     try {      // for error handling
07855         switch ( LA(1)) {
07856         case FOR:
07857         {
07858             forStatement();
07859             if (inputState->guessing==0) {
07860                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
07861             }
07862             repetitiveStatement_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
07863             break;
07864         }
07865         case REPEAT:
07866         {
07867             repeatStatement();
07868             if (inputState->guessing==0) {
07869                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
07870             }
07871             repetitiveStatement_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
07872             break;
07873         }
07874         case WHILE:
07875         {
07876             whileStatement();
07877             if (inputState->guessing==0) {
07878                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
07879             }
07880             repetitiveStatement_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
07881             break;
07882         }
07883         default:
07884         {
07885             throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
07886         }
07887         }
07888     }
07889     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
07890         if( inputState->guessing == 0 ) {
07891             reportError(ex);
07892             consume();
07893             consumeUntil(_tokenSet_16);
07894         } else {
07895             throw;
07896         }
07897     }
07898     returnAST = repetitiveStatement_AST;
07899 }
07900 
07901 void PascalParser::conditionalStatement() {
07902     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
07903     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
07904     RefPascalAST conditionalStatement_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
07905     
07906     try {      // for error handling
07907         switch ( LA(1)) {
07908         case IF:
07909         {
07910             ifStatement();
07911             if (inputState->guessing==0) {
07912                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
07913             }
07914             conditionalStatement_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
07915             break;
07916         }
07917         case CASE:
07918         {
07919             caseStatement();
07920             if (inputState->guessing==0) {
07921                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
07922             }
07923             conditionalStatement_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
07924             break;
07925         }
07926         default:
07927         {
07928             throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
07929         }
07930         }
07931     }
07932     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
07933         if( inputState->guessing == 0 ) {
07934             reportError(ex);
07935             consume();
07936             consumeUntil(_tokenSet_16);
07937         } else {
07938             throw;
07939         }
07940     }
07941     returnAST = conditionalStatement_AST;
07942 }
07943 
07944 void PascalParser::exceptionStatement() {
07945     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
07946     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
07947     RefPascalAST exceptionStatement_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
07948     
07949     try {      // for error handling
07950         tryStatement();
07951         if (inputState->guessing==0) {
07952             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
07953         }
07954         exceptionStatement_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
07955     }
07956     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
07957         if( inputState->guessing == 0 ) {
07958             reportError(ex);
07959             consume();
07960             consumeUntil(_tokenSet_16);
07961         } else {
07962             throw;
07963         }
07964     }
07965     returnAST = exceptionStatement_AST;
07966 }
07967 
07968 void PascalParser::withStatement() {
07969     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
07970     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
07971     RefPascalAST withStatement_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
07972     
07973     try {      // for error handling
07974         RefPascalAST tmp284_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
07975         if ( inputState->guessing == 0 ) {
07976             tmp284_AST = astFactory->create(LT(1));
07977             astFactory->makeASTRoot(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(tmp284_AST.get()));
07978         }
07979         match(WITH);
07980         recordVariableList();
07981         if (inputState->guessing==0) {
07982             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
07983         }
07984         match(DO);
07985         statement();
07986         if (inputState->guessing==0) {
07987             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
07988         }
07989         withStatement_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
07990     }
07991     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
07992         if( inputState->guessing == 0 ) {
07993             reportError(ex);
07994             consume();
07995             consumeUntil(_tokenSet_16);
07996         } else {
07997             throw;
07998         }
07999     }
08000     returnAST = withStatement_AST;
08001 }
08002 
08003 void PascalParser::ifStatement() {
08004     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
08005     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
08006     RefPascalAST ifStatement_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
08007     
08008     try {      // for error handling
08009         RefPascalAST tmp286_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
08010         if ( inputState->guessing == 0 ) {
08011             tmp286_AST = astFactory->create(LT(1));
08012             astFactory->makeASTRoot(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(tmp286_AST.get()));
08013         }
08014         match(IF);
08015         expression();
08016         if (inputState->guessing==0) {
08017             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
08018         }
08019         match(THEN);
08020         statement();
08021         if (inputState->guessing==0) {
08022             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
08023         }
08024         {
08025         if ((LA(1) == ELSE) && (_tokenSet_24.member(LA(2)))) {
08026             match(ELSE);
08027             statement();
08028             if (inputState->guessing==0) {
08029                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
08030             }
08031         }
08032         else if ((_tokenSet_16.member(LA(1))) && (_tokenSet_66.member(LA(2)))) {
08033         }
08034         else {
08035             throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
08036         }
08037         
08038         }
08039         ifStatement_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
08040     }
08041     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
08042         if( inputState->guessing == 0 ) {
08043             reportError(ex);
08044             consume();
08045             consumeUntil(_tokenSet_16);
08046         } else {
08047             throw;
08048         }
08049     }
08050     returnAST = ifStatement_AST;
08051 }
08052 
08053 void PascalParser::caseStatement() {
08054     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
08055     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
08056     RefPascalAST caseStatement_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
08057     
08058     try {      // for error handling
08059         RefPascalAST tmp289_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
08060         if ( inputState->guessing == 0 ) {
08061             tmp289_AST = astFactory->create(LT(1));
08062             astFactory->makeASTRoot(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(tmp289_AST.get()));
08063         }
08064         match(CASE);
08065         expression();
08066         if (inputState->guessing==0) {
08067             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
08068         }
08069         match(OF);
08070         caseListElement();
08071         if (inputState->guessing==0) {
08072             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
08073         }
08074         { // ( ... )*
08075         for (;;) {
08076             if ((LA(1) == SEMI) && (_tokenSet_33.member(LA(2)))) {
08077                 match(SEMI);
08078                 caseListElement();
08079                 if (inputState->guessing==0) {
08080                     astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
08081                 }
08082             }
08083             else {
08084                 goto _loop320;
08085             }
08086             
08087         }
08088         _loop320:;
08089         } // ( ... )*
08090         {
08091         switch ( LA(1)) {
08092         case SEMI:
08093         {
08094             match(SEMI);
08095             match(ELSE);
08096             statement();
08097             if (inputState->guessing==0) {
08098                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
08099             }
08100             { // ( ... )*
08101             for (;;) {
08102                 if ((LA(1) == SEMI)) {
08103                     match(SEMI);
08104                     statement();
08105                     if (inputState->guessing==0) {
08106                         astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
08107                     }
08108                 }
08109                 else {
08110                     goto _loop323;
08111                 }
08112                 
08113             }
08114             _loop323:;
08115             } // ( ... )*
08116             break;
08117         }
08118         case END:
08119         {
08120             break;
08121         }
08122         default:
08123         {
08124             throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
08125         }
08126         }
08127         }
08128         match(END);
08129         caseStatement_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
08130     }
08131     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
08132         if( inputState->guessing == 0 ) {
08133             reportError(ex);
08134             consume();
08135             consumeUntil(_tokenSet_16);
08136         } else {
08137             throw;
08138         }
08139     }
08140     returnAST = caseStatement_AST;
08141 }
08142 
08143 void PascalParser::forStatement() {
08144     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
08145     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
08146     RefPascalAST forStatement_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
08147     
08148     try {      // for error handling
08149         RefPascalAST tmp296_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
08150         if ( inputState->guessing == 0 ) {
08151             tmp296_AST = astFactory->create(LT(1));
08152             astFactory->makeASTRoot(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(tmp296_AST.get()));
08153         }
08154         match(FOR);
08155         identifier();
08156         if (inputState->guessing==0) {
08157             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
08158         }
08159         match(ASSIGN);
08160         forList();
08161         if (inputState->guessing==0) {
08162             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
08163         }
08164         match(DO);
08165         statement();
08166         if (inputState->guessing==0) {
08167             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
08168         }
08169         forStatement_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
08170     }
08171     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
08172         if( inputState->guessing == 0 ) {
08173             reportError(ex);
08174             consume();
08175             consumeUntil(_tokenSet_16);
08176         } else {
08177             throw;
08178         }
08179     }
08180     returnAST = forStatement_AST;
08181 }
08182 
08183 void PascalParser::repeatStatement() {
08184     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
08185     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
08186     RefPascalAST repeatStatement_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
08187     
08188     try {      // for error handling
08189         RefPascalAST tmp299_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
08190         if ( inputState->guessing == 0 ) {
08191             tmp299_AST = astFactory->create(LT(1));
08192             astFactory->makeASTRoot(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(tmp299_AST.get()));
08193         }
08194         match(REPEAT);
08195         statement();
08196         if (inputState->guessing==0) {
08197             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
08198         }
08199         { // ( ... )*
08200         for (;;) {
08201             if ((LA(1) == SEMI)) {
08202                 match(SEMI);
08203                 {
08204                 switch ( LA(1)) {
08205                 case BEGIN:
08206                 case NUM_INT:
08207                 case CASE:
08208                 case GOTO:
08209                 case IF:
08210                 case WHILE:
08211                 case REPEAT:
08212                 case FOR:
08213                 case WITH:
08214                 case RAISE:
08215                 case TRY:
08216                 case IDENT:
08217                 {
08218                     statement();
08219                     if (inputState->guessing==0) {
08220                         astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
08221                     }
08222                     break;
08223                 }
08224                 case SEMI:
08225                 case UNTIL:
08226                 {
08227                     break;
08228                 }
08229                 default:
08230                 {
08231                     throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
08232                 }
08233                 }
08234                 }
08235             }
08236             else {
08237                 goto _loop332;
08238             }
08239             
08240         }
08241         _loop332:;
08242         } // ( ... )*
08243         match(UNTIL);
08244         expression();
08245         if (inputState->guessing==0) {
08246             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
08247         }
08248         repeatStatement_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
08249     }
08250     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
08251         if( inputState->guessing == 0 ) {
08252             reportError(ex);
08253             consume();
08254             consumeUntil(_tokenSet_16);
08255         } else {
08256             throw;
08257         }
08258     }
08259     returnAST = repeatStatement_AST;
08260 }
08261 
08262 void PascalParser::whileStatement() {
08263     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
08264     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
08265     RefPascalAST whileStatement_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
08266     
08267     try {      // for error handling
08268         RefPascalAST tmp302_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
08269         if ( inputState->guessing == 0 ) {
08270             tmp302_AST = astFactory->create(LT(1));
08271             astFactory->makeASTRoot(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(tmp302_AST.get()));
08272         }
08273         match(WHILE);
08274         expression();
08275         if (inputState->guessing==0) {
08276             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
08277         }
08278         match(DO);
08279         statement();
08280         if (inputState->guessing==0) {
08281             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
08282         }
08283         whileStatement_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
08284     }
08285     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
08286         if( inputState->guessing == 0 ) {
08287             reportError(ex);
08288             consume();
08289             consumeUntil(_tokenSet_16);
08290         } else {
08291             throw;
08292         }
08293     }
08294     returnAST = whileStatement_AST;
08295 }
08296 
08297 void PascalParser::caseListElement() {
08298     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
08299     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
08300     RefPascalAST caseListElement_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
08301     
08302     try {      // for error handling
08303         constList();
08304         if (inputState->guessing==0) {
08305             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
08306         }
08307         RefPascalAST tmp304_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
08308         if ( inputState->guessing == 0 ) {
08309             tmp304_AST = astFactory->create(LT(1));
08310             astFactory->makeASTRoot(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(tmp304_AST.get()));
08311         }
08312         match(COLON);
08313         statement();
08314         if (inputState->guessing==0) {
08315             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
08316         }
08317         caseListElement_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
08318     }
08319     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
08320         if( inputState->guessing == 0 ) {
08321             reportError(ex);
08322             consume();
08323             consumeUntil(_tokenSet_67);
08324         } else {
08325             throw;
08326         }
08327     }
08328     returnAST = caseListElement_AST;
08329 }
08330 
08331 void PascalParser::constList() {
08332     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
08333     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
08334     RefPascalAST constList_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
08335     
08336     try {      // for error handling
08337         constant();
08338         if (inputState->guessing==0) {
08339             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
08340         }
08341         { // ( ... )*
08342         for (;;) {
08343             if ((LA(1) == COMMA)) {
08344                 match(COMMA);
08345                 constant();
08346                 if (inputState->guessing==0) {
08347                     astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
08348                 }
08349             }
08350             else {
08351                 goto _loop327;
08352             }
08353             
08354         }
08355         _loop327:;
08356         } // ( ... )*
08357         if ( inputState->guessing==0 ) {
08358             constList_AST = RefPascalAST(currentAST.root);
08359 #line 746 "pascal.g"
08360             constList_AST = RefPascalAST(astFactory->make((new ANTLR_USE_NAMESPACE(antlr)ASTArray(2))->add(static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(astFactory->create(CONSTLIST).get()))->add(static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(constList_AST.get()))));
08361 #line 8362 "PascalParser.cpp"
08362             currentAST.root = constList_AST;
08363             if ( constList_AST!=static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get()) &&
08364                 constList_AST->getFirstChild() != static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get()) )
08365                   currentAST.child = constList_AST->getFirstChild();
08366             else
08367                 currentAST.child = constList_AST;
08368             currentAST.advanceChildToEnd();
08369         }
08370         constList_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
08371     }
08372     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
08373         if( inputState->guessing == 0 ) {
08374             reportError(ex);
08375             consume();
08376             consumeUntil(_tokenSet_55);
08377         } else {
08378             throw;
08379         }
08380     }
08381     returnAST = constList_AST;
08382 }
08383 
08384 void PascalParser::forList() {
08385     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
08386     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
08387     RefPascalAST forList_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
08388     
08389     try {      // for error handling
08390         initialValue();
08391         if (inputState->guessing==0) {
08392             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
08393         }
08394         {
08395         switch ( LA(1)) {
08396         case TO:
08397         {
08398             RefPascalAST tmp306_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
08399             if ( inputState->guessing == 0 ) {
08400                 tmp306_AST = astFactory->create(LT(1));
08401                 astFactory->makeASTRoot(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(tmp306_AST.get()));
08402             }
08403             match(TO);
08404             break;
08405         }
08406         case DOWNTO:
08407         {
08408             RefPascalAST tmp307_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
08409             if ( inputState->guessing == 0 ) {
08410                 tmp307_AST = astFactory->create(LT(1));
08411                 astFactory->makeASTRoot(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(tmp307_AST.get()));
08412             }
08413             match(DOWNTO);
08414             break;
08415         }
08416         default:
08417         {
08418             throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
08419         }
08420         }
08421         }
08422         finalValue();
08423         if (inputState->guessing==0) {
08424             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
08425         }
08426         forList_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
08427     }
08428     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
08429         if( inputState->guessing == 0 ) {
08430             reportError(ex);
08431             consume();
08432             consumeUntil(_tokenSet_68);
08433         } else {
08434             throw;
08435         }
08436     }
08437     returnAST = forList_AST;
08438 }
08439 
08440 void PascalParser::initialValue() {
08441     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
08442     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
08443     RefPascalAST initialValue_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
08444     
08445     try {      // for error handling
08446         expression();
08447         if (inputState->guessing==0) {
08448             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
08449         }
08450         initialValue_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
08451     }
08452     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
08453         if( inputState->guessing == 0 ) {
08454             reportError(ex);
08455             consume();
08456             consumeUntil(_tokenSet_69);
08457         } else {
08458             throw;
08459         }
08460     }
08461     returnAST = initialValue_AST;
08462 }
08463 
08464 void PascalParser::finalValue() {
08465     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
08466     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
08467     RefPascalAST finalValue_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
08468     
08469     try {      // for error handling
08470         expression();
08471         if (inputState->guessing==0) {
08472             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
08473         }
08474         finalValue_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
08475     }
08476     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
08477         if( inputState->guessing == 0 ) {
08478             reportError(ex);
08479             consume();
08480             consumeUntil(_tokenSet_68);
08481         } else {
08482             throw;
08483         }
08484     }
08485     returnAST = finalValue_AST;
08486 }
08487 
08488 void PascalParser::recordVariableList() {
08489     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
08490     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
08491     RefPascalAST recordVariableList_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
08492     
08493     try {      // for error handling
08494         variable();
08495         if (inputState->guessing==0) {
08496             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
08497         }
08498         { // ( ... )*
08499         for (;;) {
08500             if ((LA(1) == COMMA)) {
08501                 match(COMMA);
08502                 variable();
08503                 if (inputState->guessing==0) {
08504                     astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
08505                 }
08506             }
08507             else {
08508                 goto _loop341;
08509             }
08510             
08511         }
08512         _loop341:;
08513         } // ( ... )*
08514         recordVariableList_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
08515     }
08516     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
08517         if( inputState->guessing == 0 ) {
08518             reportError(ex);
08519             consume();
08520             consumeUntil(_tokenSet_68);
08521         } else {
08522             throw;
08523         }
08524     }
08525     returnAST = recordVariableList_AST;
08526 }
08527 
08543 void PascalParser::variable() {
08544     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
08545     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
08546     RefPascalAST variable_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
08547     
08548     try {      // for error handling
08549         {
08550         switch ( LA(1)) {
08551         case AT:
08552         {
08553             RefPascalAST tmp309_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
08554             if ( inputState->guessing == 0 ) {
08555                 tmp309_AST = astFactory->create(LT(1));
08556                 astFactory->makeASTRoot(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(tmp309_AST.get()));
08557             }
08558             match(AT);
08559             identifier();
08560             if (inputState->guessing==0) {
08561                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
08562             }
08563             break;
08564         }
08565         case IDENT:
08566         {
08567             identifier();
08568             if (inputState->guessing==0) {
08569                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
08570             }
08571             break;
08572         }
08573         default:
08574         {
08575             throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
08576         }
08577         }
08578         }
08579         { // ( ... )*
08580         for (;;) {
08581             switch ( LA(1)) {
08582             case LBRACK:
08583             {
08584                 RefPascalAST tmp310_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
08585                 if ( inputState->guessing == 0 ) {
08586                     tmp310_AST = astFactory->create(LT(1));
08587                     astFactory->makeASTRoot(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(tmp310_AST.get()));
08588                 }
08589                 match(LBRACK);
08590                 expression();
08591                 if (inputState->guessing==0) {
08592                     astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
08593                 }
08594                 { // ( ... )*
08595                 for (;;) {
08596                     if ((LA(1) == COMMA)) {
08597                         match(COMMA);
08598                         expression();
08599                         if (inputState->guessing==0) {
08600                             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
08601                         }
08602                     }
08603                     else {
08604                         goto _loop346;
08605                     }
08606                     
08607                 }
08608                 _loop346:;
08609                 } // ( ... )*
08610                 match(RBRACK);
08611                 break;
08612             }
08613             case LBRACK2:
08614             {
08615                 RefPascalAST tmp313_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
08616                 if ( inputState->guessing == 0 ) {
08617                     tmp313_AST = astFactory->create(LT(1));
08618                     astFactory->makeASTRoot(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(tmp313_AST.get()));
08619                 }
08620                 match(LBRACK2);
08621                 expression();
08622                 if (inputState->guessing==0) {
08623                     astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
08624                 }
08625                 { // ( ... )*
08626                 for (;;) {
08627                     if ((LA(1) == COMMA)) {
08628                         match(COMMA);
08629                         expression();
08630                         if (inputState->guessing==0) {
08631                             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
08632                         }
08633                     }
08634                     else {
08635                         goto _loop348;
08636                     }
08637                     
08638                 }
08639                 _loop348:;
08640                 } // ( ... )*
08641                 match(RBRACK2);
08642                 break;
08643             }
08644             case DOT:
08645             {
08646                 RefPascalAST tmp316_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
08647                 if ( inputState->guessing == 0 ) {
08648                     tmp316_AST = astFactory->create(LT(1));
08649                     astFactory->makeASTRoot(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(tmp316_AST.get()));
08650                 }
08651                 match(DOT);
08652                 identifier();
08653                 if (inputState->guessing==0) {
08654                     astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
08655                 }
08656                 break;
08657             }
08658             case POINTER:
08659             {
08660                 RefPascalAST tmp317_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
08661                 if ( inputState->guessing == 0 ) {
08662                     tmp317_AST = astFactory->create(LT(1));
08663                     astFactory->makeASTRoot(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(tmp317_AST.get()));
08664                 }
08665                 match(POINTER);
08666                 break;
08667             }
08668             default:
08669             {
08670                 goto _loop349;
08671             }
08672             }
08673         }
08674         _loop349:;
08675         } // ( ... )*
08676         variable_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
08677     }
08678     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
08679         if( inputState->guessing == 0 ) {
08680             reportError(ex);
08681             consume();
08682             consumeUntil(_tokenSet_70);
08683         } else {
08684             throw;
08685         }
08686     }
08687     returnAST = variable_AST;
08688 }
08689 
08690 void PascalParser::operatorDefinition() {
08691     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
08692     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
08693     RefPascalAST operatorDefinition_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
08694     
08695     try {      // for error handling
08696         RefPascalAST tmp318_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
08697         if ( inputState->guessing == 0 ) {
08698             tmp318_AST = astFactory->create(LT(1));
08699             astFactory->makeASTRoot(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(tmp318_AST.get()));
08700         }
08701         match(OPERATOR);
08702         {
08703         switch ( LA(1)) {
08704         case ASSIGN:
08705         {
08706             assignmentOperatorDefinition();
08707             if (inputState->guessing==0) {
08708                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
08709             }
08710             break;
08711         }
08712         case PLUS:
08713         case MINUS:
08714         case STAR:
08715         case SLASH:
08716         {
08717             arithmeticOperatorDefinition();
08718             if (inputState->guessing==0) {
08719                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
08720             }
08721             break;
08722         }
08723         case EQUAL:
08724         case LE:
08725         case GE:
08726         case LTH:
08727         case GT:
08728         {
08729             comparisonOperatorDefinition();
08730             if (inputState->guessing==0) {
08731                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
08732             }
08733             break;
08734         }
08735         default:
08736         {
08737             throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
08738         }
08739         }
08740         }
08741         identifier();
08742         if (inputState->guessing==0) {
08743             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
08744         }
08745         match(COLON);
08746         type();
08747         if (inputState->guessing==0) {
08748             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
08749         }
08750         match(SEMI);
08751         subroutineBlock();
08752         if (inputState->guessing==0) {
08753             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
08754         }
08755         operatorDefinition_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
08756     }
08757     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
08758         if( inputState->guessing == 0 ) {
08759             reportError(ex);
08760             consume();
08761             consumeUntil(_tokenSet_0);
08762         } else {
08763             throw;
08764         }
08765     }
08766     returnAST = operatorDefinition_AST;
08767 }
08768 
08769 void PascalParser::assignmentOperatorDefinition() {
08770     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
08771     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
08772     RefPascalAST assignmentOperatorDefinition_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
08773     
08774     try {      // for error handling
08775         match(ASSIGN);
08776         match(LPAREN);
08777         valueParameter();
08778         if (inputState->guessing==0) {
08779             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
08780         }
08781         match(RPAREN);
08782         assignmentOperatorDefinition_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
08783     }
08784     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
08785         if( inputState->guessing == 0 ) {
08786             reportError(ex);
08787             consume();
08788             consumeUntil(_tokenSet_71);
08789         } else {
08790             throw;
08791         }
08792     }
08793     returnAST = assignmentOperatorDefinition_AST;
08794 }
08795 
08796 void PascalParser::arithmeticOperatorDefinition() {
08797     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
08798     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
08799     RefPascalAST arithmeticOperatorDefinition_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
08800     
08801     try {      // for error handling
08802         {
08803         switch ( LA(1)) {
08804         case PLUS:
08805         {
08806             match(PLUS);
08807             break;
08808         }
08809         case MINUS:
08810         {
08811             match(MINUS);
08812             break;
08813         }
08814         case SLASH:
08815         {
08816             match(SLASH);
08817             break;
08818         }
08819         default:
08820             if ((LA(1) == STAR) && (LA(2) == LPAREN)) {
08821                 match(STAR);
08822             }
08823             else if ((LA(1) == STAR) && (LA(2) == STAR)) {
08824                 {
08825                 match(STAR);
08826                 match(STAR);
08827                 }
08828             }
08829         else {
08830             throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
08831         }
08832         }
08833         }
08834         match(LPAREN);
08835         formalParameterList();
08836         if (inputState->guessing==0) {
08837             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
08838         }
08839         match(RPAREN);
08840         arithmeticOperatorDefinition_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
08841     }
08842     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
08843         if( inputState->guessing == 0 ) {
08844             reportError(ex);
08845             consume();
08846             consumeUntil(_tokenSet_71);
08847         } else {
08848             throw;
08849         }
08850     }
08851     returnAST = arithmeticOperatorDefinition_AST;
08852 }
08853 
08854 void PascalParser::comparisonOperatorDefinition() {
08855     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
08856     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
08857     RefPascalAST comparisonOperatorDefinition_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
08858     
08859     try {      // for error handling
08860         {
08861         switch ( LA(1)) {
08862         case EQUAL:
08863         {
08864             match(EQUAL);
08865             break;
08866         }
08867         case LE:
08868         {
08869             match(LE);
08870             break;
08871         }
08872         case GE:
08873         {
08874             match(GE);
08875             break;
08876         }
08877         case GT:
08878         {
08879             match(GT);
08880             break;
08881         }
08882         case LTH:
08883         {
08884             match(LTH);
08885             break;
08886         }
08887         default:
08888         {
08889             throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
08890         }
08891         }
08892         }
08893         match(LPAREN);
08894         formalParameterList();
08895         if (inputState->guessing==0) {
08896             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
08897         }
08898         match(RPAREN);
08899         comparisonOperatorDefinition_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
08900     }
08901     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
08902         if( inputState->guessing == 0 ) {
08903             reportError(ex);
08904             consume();
08905             consumeUntil(_tokenSet_71);
08906         } else {
08907             throw;
08908         }
08909     }
08910     returnAST = comparisonOperatorDefinition_AST;
08911 }
08912 
08913 void PascalParser::tryStatement() {
08914     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
08915     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
08916     RefPascalAST tryStatement_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
08917     
08918     try {      // for error handling
08919         RefPascalAST tmp339_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
08920         if ( inputState->guessing == 0 ) {
08921             tmp339_AST = astFactory->create(LT(1));
08922             astFactory->makeASTRoot(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(tmp339_AST.get()));
08923         }
08924         match(TRY);
08925         {
08926         switch ( LA(1)) {
08927         case BEGIN:
08928         case NUM_INT:
08929         case CASE:
08930         case GOTO:
08931         case IF:
08932         case WHILE:
08933         case REPEAT:
08934         case FOR:
08935         case WITH:
08936         case RAISE:
08937         case TRY:
08938         case IDENT:
08939         {
08940             statements();
08941             if (inputState->guessing==0) {
08942                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
08943             }
08944             break;
08945         }
08946         case EXCEPT:
08947         case FINALLY:
08948         {
08949             break;
08950         }
08951         default:
08952         {
08953             throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
08954         }
08955         }
08956         }
08957         exceptOrFinallyPart();
08958         if (inputState->guessing==0) {
08959             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
08960         }
08961         match(END);
08962         tryStatement_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
08963     }
08964     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
08965         if( inputState->guessing == 0 ) {
08966             reportError(ex);
08967             consume();
08968             consumeUntil(_tokenSet_16);
08969         } else {
08970             throw;
08971         }
08972     }
08973     returnAST = tryStatement_AST;
08974 }
08975 
08976 void PascalParser::statements() {
08977     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
08978     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
08979     RefPascalAST statements_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
08980     
08981     try {      // for error handling
08982         statement();
08983         if (inputState->guessing==0) {
08984             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
08985         }
08986         { // ( ... )*
08987         for (;;) {
08988             if ((LA(1) == SEMI)) {
08989                 match(SEMI);
08990                 statement();
08991                 if (inputState->guessing==0) {
08992                     astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
08993                 }
08994             }
08995             else {
08996                 goto _loop369;
08997             }
08998             
08999         }
09000         _loop369:;
09001         } // ( ... )*
09002         statements_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
09003     }
09004     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
09005         if( inputState->guessing == 0 ) {
09006             reportError(ex);
09007             consume();
09008             consumeUntil(_tokenSet_72);
09009         } else {
09010             throw;
09011         }
09012     }
09013     returnAST = statements_AST;
09014 }
09015 
09016 void PascalParser::exceptOrFinallyPart() {
09017     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
09018     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
09019     RefPascalAST exceptOrFinallyPart_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
09020     
09021     try {      // for error handling
09022         switch ( LA(1)) {
09023         case EXCEPT:
09024         {
09025             match(EXCEPT);
09026             {
09027             switch ( LA(1)) {
09028             case BEGIN:
09029             case NUM_INT:
09030             case CASE:
09031             case GOTO:
09032             case IF:
09033             case WHILE:
09034             case REPEAT:
09035             case FOR:
09036             case WITH:
09037             case RAISE:
09038             case TRY:
09039             case ON:
09040             case IDENT:
09041             {
09042                 exceptionHandlers();
09043                 if (inputState->guessing==0) {
09044                     astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
09045                 }
09046                 break;
09047             }
09048             case END:
09049             {
09050                 break;
09051             }
09052             default:
09053             {
09054                 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
09055             }
09056             }
09057             }
09058             exceptOrFinallyPart_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
09059             break;
09060         }
09061         case FINALLY:
09062         {
09063             match(FINALLY);
09064             {
09065             switch ( LA(1)) {
09066             case BEGIN:
09067             case NUM_INT:
09068             case CASE:
09069             case GOTO:
09070             case IF:
09071             case WHILE:
09072             case REPEAT:
09073             case FOR:
09074             case WITH:
09075             case RAISE:
09076             case TRY:
09077             case IDENT:
09078             {
09079                 statements();
09080                 if (inputState->guessing==0) {
09081                     astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
09082                 }
09083                 break;
09084             }
09085             case END:
09086             {
09087                 break;
09088             }
09089             default:
09090             {
09091                 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
09092             }
09093             }
09094             }
09095             exceptOrFinallyPart_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
09096             break;
09097         }
09098         default:
09099         {
09100             throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
09101         }
09102         }
09103     }
09104     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
09105         if( inputState->guessing == 0 ) {
09106             reportError(ex);
09107             consume();
09108             consumeUntil(_tokenSet_6);
09109         } else {
09110             throw;
09111         }
09112     }
09113     returnAST = exceptOrFinallyPart_AST;
09114 }
09115 
09116 void PascalParser::exceptionHandlers() {
09117     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
09118     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
09119     RefPascalAST exceptionHandlers_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
09120     
09121     try {      // for error handling
09122         switch ( LA(1)) {
09123         case BEGIN:
09124         case NUM_INT:
09125         case CASE:
09126         case GOTO:
09127         case IF:
09128         case WHILE:
09129         case REPEAT:
09130         case FOR:
09131         case WITH:
09132         case RAISE:
09133         case TRY:
09134         case IDENT:
09135         {
09136             statements();
09137             if (inputState->guessing==0) {
09138                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
09139             }
09140             exceptionHandlers_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
09141             break;
09142         }
09143         case ON:
09144         {
09145             exceptionHandler();
09146             if (inputState->guessing==0) {
09147                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
09148             }
09149             { // ( ... )*
09150             for (;;) {
09151                 if ((LA(1) == SEMI)) {
09152                     match(SEMI);
09153                     exceptionHandler();
09154                     if (inputState->guessing==0) {
09155                         astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
09156                     }
09157                 }
09158                 else {
09159                     goto _loop372;
09160                 }
09161                 
09162             }
09163             _loop372:;
09164             } // ( ... )*
09165             {
09166             switch ( LA(1)) {
09167             case ELSE:
09168             {
09169                 match(ELSE);
09170                 statements();
09171                 if (inputState->guessing==0) {
09172                     astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
09173                 }
09174                 break;
09175             }
09176             case END:
09177             {
09178                 break;
09179             }
09180             default:
09181             {
09182                 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
09183             }
09184             }
09185             }
09186             exceptionHandlers_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
09187             break;
09188         }
09189         default:
09190         {
09191             throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
09192         }
09193         }
09194     }
09195     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
09196         if( inputState->guessing == 0 ) {
09197             reportError(ex);
09198             consume();
09199             consumeUntil(_tokenSet_6);
09200         } else {
09201             throw;
09202         }
09203     }
09204     returnAST = exceptionHandlers_AST;
09205 }
09206 
09207 void PascalParser::exceptionHandler() {
09208     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
09209     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
09210     RefPascalAST exceptionHandler_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
09211     
09212     try {      // for error handling
09213         match(ON);
09214         {
09215         if ((LA(1) == IDENT) && (LA(2) == COLON)) {
09216             identifier();
09217             if (inputState->guessing==0) {
09218                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
09219             }
09220             match(COLON);
09221         }
09222         else if ((LA(1) == IDENT) && (LA(2) == DO)) {
09223         }
09224         else {
09225             throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
09226         }
09227         
09228         }
09229         identifier();
09230         if (inputState->guessing==0) {
09231             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
09232         }
09233         match(DO);
09234         statement();
09235         if (inputState->guessing==0) {
09236             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
09237         }
09238         exceptionHandler_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
09239     }
09240     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
09241         if( inputState->guessing == 0 ) {
09242             reportError(ex);
09243             consume();
09244             consumeUntil(_tokenSet_73);
09245         } else {
09246             throw;
09247         }
09248     }
09249     returnAST = exceptionHandler_AST;
09250 }
09251 
09252 void PascalParser::sign() {
09253     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
09254     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
09255     RefPascalAST sign_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
09256     
09257     try {      // for error handling
09258         switch ( LA(1)) {
09259         case PLUS:
09260         {
09261             RefPascalAST tmp349_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
09262             if ( inputState->guessing == 0 ) {
09263                 tmp349_AST = astFactory->create(LT(1));
09264                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(tmp349_AST.get()));
09265             }
09266             match(PLUS);
09267             sign_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
09268             break;
09269         }
09270         case MINUS:
09271         {
09272             RefPascalAST tmp350_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
09273             if ( inputState->guessing == 0 ) {
09274                 tmp350_AST = astFactory->create(LT(1));
09275                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(tmp350_AST.get()));
09276             }
09277             match(MINUS);
09278             sign_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
09279             break;
09280         }
09281         default:
09282         {
09283             throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
09284         }
09285         }
09286     }
09287     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
09288         if( inputState->guessing == 0 ) {
09289             reportError(ex);
09290             consume();
09291             consumeUntil(_tokenSet_74);
09292         } else {
09293             throw;
09294         }
09295     }
09296     returnAST = sign_AST;
09297 }
09298 
09299 void PascalParser::constantChr() {
09300     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
09301     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
09302     RefPascalAST constantChr_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
09303     
09304     try {      // for error handling
09305         RefPascalAST tmp351_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
09306         if ( inputState->guessing == 0 ) {
09307             tmp351_AST = astFactory->create(LT(1));
09308             astFactory->makeASTRoot(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(tmp351_AST.get()));
09309         }
09310         match(CHR);
09311         match(LPAREN);
09312         unsignedInteger();
09313         if (inputState->guessing==0) {
09314             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
09315         }
09316         match(RPAREN);
09317         constantChr_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
09318     }
09319     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
09320         if( inputState->guessing == 0 ) {
09321             reportError(ex);
09322             consume();
09323             consumeUntil(_tokenSet_75);
09324         } else {
09325             throw;
09326         }
09327     }
09328     returnAST = constantChr_AST;
09329 }
09330 
09331 void PascalParser::unsignedNumber() {
09332     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
09333     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
09334     RefPascalAST unsignedNumber_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
09335     
09336     try {      // for error handling
09337         switch ( LA(1)) {
09338         case NUM_INT:
09339         {
09340             unsignedInteger();
09341             if (inputState->guessing==0) {
09342                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
09343             }
09344             unsignedNumber_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
09345             break;
09346         }
09347         case NUM_REAL:
09348         {
09349             unsignedReal();
09350             if (inputState->guessing==0) {
09351                 astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(returnAST.get()));
09352             }
09353             unsignedNumber_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
09354             break;
09355         }
09356         default:
09357         {
09358             throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
09359         }
09360         }
09361     }
09362     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
09363         if( inputState->guessing == 0 ) {
09364             reportError(ex);
09365             consume();
09366             consumeUntil(_tokenSet_76);
09367         } else {
09368             throw;
09369         }
09370     }
09371     returnAST = unsignedNumber_AST;
09372 }
09373 
09374 void PascalParser::unsignedReal() {
09375     returnAST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
09376     ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
09377     RefPascalAST unsignedReal_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
09378     
09379     try {      // for error handling
09380         RefPascalAST tmp354_AST = static_cast<RefPascalAST>(ANTLR_USE_NAMESPACE(antlr)nullAST.get());
09381         if ( inputState->guessing == 0 ) {
09382             tmp354_AST = astFactory->create(LT(1));
09383             astFactory->addASTChild(currentAST, static_cast<ANTLR_USE_NAMESPACE(antlr)RefAST>(tmp354_AST.get()));
09384         }
09385         match(NUM_REAL);
09386         unsignedReal_AST = /*static_cast<RefPascalAST>*/(currentAST.root);
09387     }
09388     catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
09389         if( inputState->guessing == 0 ) {
09390             reportError(ex);
09391             consume();
09392             consumeUntil(_tokenSet_76);
09393         } else {
09394             throw;
09395         }
09396     }
09397     returnAST = unsignedReal_AST;
09398 }
09399 
09400 RefPascalAST PascalParser::getAST()
09401 {
09402     return returnAST;
09403 }
09404 
09405 void PascalParser::initializeASTFactory( ANTLR_USE_NAMESPACE(antlr)ASTFactory& factory )
09406 {
09407     factory.setMaxNodeType(189);
09408 }
09409 const char* PascalParser::tokenNames[] = {
09410     "<0>",
09411     "EOF",
09412     "<2>",
09413     "NULL_TREE_LOOKAHEAD",
09414     "BLOCK",
09415     "IDLIST",
09416     "ELIST",
09417     "FUNC_CALL",
09418     "PROC_CALL",
09419     "SCALARTYPE",
09420     "TYPELIST",
09421     "VARIANT_TAG",
09422     "VARIANT_TAG_NO_ID",
09423     "VARIANT_CASE",
09424     "CONSTLIST",
09425     "FIELDLIST",
09426     "ARGDECLS",
09427     "VARDECL",
09428     "ARGDECL",
09429     "ARGLIST",
09430     "TYPEDECL",
09431     "FIELD",
09432     "DOT",
09433     "\"library\"",
09434     "SEMI",
09435     "\"end\"",
09436     "\"exports\"",
09437     "COMMA",
09438     "\"index\"",
09439     "\"name\"",
09440     "\"uses\"",
09441     "\"unit\"",
09442     "\"interface\"",
09443     "\"implementation\"",
09444     "\"begin\"",
09445     "\"program\"",
09446     "LPAREN",
09447     "RPAREN",
09448     "\"initialization\"",
09449     "\"finalization\"",
09450     "\"label\"",
09451     "\"const\"",
09452     "\"resourcestring\"",
09453     "EQUAL",
09454     "\"type\"",
09455     "\"var\"",
09456     "COLON",
09457     "\"procedure\"",
09458     "\"forward\"",
09459     "\"function\"",
09460     "\"array\"",
09461     "\"of\"",
09462     "\"external\"",
09463     "\"public\"",
09464     "\"alias\"",
09465     "INTERRUPT",
09466     "\"export\"",
09467     "\"register\"",
09468     "\"pascal\"",
09469     "\"cdecl\"",
09470     "\"stdcall\"",
09471     "\"popstack\"",
09472     "\"saveregisters\"",
09473     "\"inline\"",
09474     "\"safecall\"",
09475     "\"near\"",
09476     "\"far\"",
09477     "NUM_INT",
09478     "\"integer\"",
09479     "\"shortint\"",
09480     "\"smallint\"",
09481     "\"longint\"",
09482     "\"int64\"",
09483     "\"byte\"",
09484     "\"word\"",
09485     "\"cardinal\"",
09486     "\"qword\"",
09487     "\"boolean\"",
09488     "BYTEBOOL",
09489     "LONGBOOL",
09490     "\"char\"",
09491     "DOTDOT",
09492     "ASSIGN",
09493     "\"real\"",
09494     "\"single\"",
09495     "\"double\"",
09496     "\"extended\"",
09497     "\"comp\"",
09498     "\"string\"",
09499     "LBRACK",
09500     "RBRACK",
09501     "\"packed\"",
09502     "\"record\"",
09503     "\"case\"",
09504     "\"set\"",
09505     "\"file\"",
09506     "POINTER",
09507     "\"object\"",
09508     "\"virtual\"",
09509     "\"abstract\"",
09510     "\"private\"",
09511     "\"protected\"",
09512     "\"constructor\"",
09513     "\"destructor\"",
09514     "\"class\"",
09515     "\"override\"",
09516     "MESSAGE",
09517     "\"published\"",
09518     "\"property\"",
09519     "\"read\"",
09520     "\"write\"",
09521     "\"default\"",
09522     "\"nodefault\"",
09523     "LE",
09524     "GE",
09525     "LTH",
09526     "GT",
09527     "NOT_EQUAL",
09528     "\"in\"",
09529     "\"is\"",
09530     "PLUS",
09531     "MINUS",
09532     "\"or\"",
09533     "\"xor\"",
09534     "STAR",
09535     "SLASH",
09536     "\"div\"",
09537     "\"mod\"",
09538     "\"and\"",
09539     "\"shl\"",
09540     "\"shr\"",
09541     "\"not\"",
09542     "\"true\"",
09543     "\"false\"",
09544     "AT",
09545     "PLUSEQ",
09546     "MINUSEQ",
09547     "STAREQ",
09548     "SLASHQE",
09549     "\"goto\"",
09550     "\"if\"",
09551     "\"then\"",
09552     "\"else\"",
09553     "\"while\"",
09554     "\"do\"",
09555     "\"repeat\"",
09556     "\"until\"",
09557     "\"for\"",
09558     "\"to\"",
09559     "\"downto\"",
09560     "\"with\"",
09561     "LBRACK2",
09562     "RBRACK2",
09563     "\"operator\"",
09564     "\"raise\"",
09565     "\"try\"",
09566     "\"except\"",
09567     "\"finally\"",
09568     "\"on\"",
09569     "STRING_LITERAL",
09570     "\"chr\"",
09571     "\"nil\"",
09572     "NUM_REAL",
09573     "IDENT",
09574     "\"absolute\"",
09575     "\"as\"",
09576     "\"asm\"",
09577     "\"assembler\"",
09578     "\"break\"",
09579     "\"continue\"",
09580     "\"dispose\"",
09581     "\"exit\"",
09582     "\"inherited\"",
09583     "\"new\"",
09584     "\"self\"",
09585     "METHOD",
09586     "ADDSUBOR",
09587     "ASSIGNEQUAL",
09588     "SIGN",
09589     "FUNC",
09590     "NODE_NOT_EMIT",
09591     "MYASTVAR",
09592     "LF",
09593     "LCURLY",
09594     "RCURLY",
09595     "WS",
09596     "COMMENT_1",
09597     "COMMENT_2",
09598     "COMMENT_3",
09599     "EXPONENT",
09600     0
09601 };
09602 
09603 const unsigned long PascalParser::_tokenSet_0_data_[] = { 2UL, 0UL, 0UL, 0UL, 0UL, 0UL };
09604 // EOF 
09605 const ANTLR_USE_NAMESPACE(antlr)BitSet PascalParser::_tokenSet_0(_tokenSet_0_data_,6);
09606 const unsigned long PascalParser::_tokenSet_1_data_[] = { 1073741824UL, 177924UL, 0UL, 192UL, 0UL, 0UL, 0UL, 0UL };
09607 // "uses" "begin" "label" "const" "resourcestring" "type" "var" "procedure" 
09608 // "function" "constructor" "destructor" 
09609 const ANTLR_USE_NAMESPACE(antlr)BitSet PascalParser::_tokenSet_1(_tokenSet_1_data_,8);
09610 const unsigned long PascalParser::_tokenSet_2_data_[] = { 100663296UL, 177990UL, 0UL, 192UL, 0UL, 0UL, 0UL, 0UL };
09611 // "end" "exports" "implementation" "begin" "initialization" "label" "const" 
09612 // "resourcestring" "type" "var" "procedure" "function" "constructor" "destructor" 
09613 const ANTLR_USE_NAMESPACE(antlr)BitSet PascalParser::_tokenSet_2(_tokenSet_2_data_,8);
09614 const unsigned long PascalParser::_tokenSet_3_data_[] = { 121634818UL, 177988UL, 0UL, 192UL, 0UL, 0UL, 0UL, 0UL };
09615 // EOF DOT SEMI "end" "exports" "begin" "initialization" "label" "const" 
09616 // "resourcestring" "type" "var" "procedure" "function" "constructor" "destructor" 
09617 const ANTLR_USE_NAMESPACE(antlr)BitSet PascalParser::_tokenSet_3(_tokenSet_3_data_,8);
09618 const unsigned long PascalParser::_tokenSet_4_data_[] = { 994050050UL, 706736UL, 101056512UL, 4294963649UL, 833972167UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL };
09619 // EOF DOT SEMI "end" COMMA "index" "name" LPAREN RPAREN "finalization" 
09620 // EQUAL COLON "procedure" "function" "of" DOTDOT ASSIGN LBRACK RBRACK 
09621 // POINTER "constructor" "destructor" "class" "property" "read" "write" 
09622 // "default" "nodefault" LE GE LTH GT NOT_EQUAL "in" "is" PLUS MINUS "or" 
09623 // "xor" STAR SLASH "div" "mod" "and" "shl" "shr" AT PLUSEQ MINUSEQ STAREQ 
09624 // SLASHQE "then" "else" "do" "until" "to" "downto" LBRACK2 RBRACK2 "except" 
09625 // "finally" 
09626 const ANTLR_USE_NAMESPACE(antlr)BitSet PascalParser::_tokenSet_4(_tokenSet_4_data_,12);
09627 const unsigned long PascalParser::_tokenSet_5_data_[] = { 67108864UL, 0UL, 0UL, 0UL, 0UL, 0UL };
09628 // "exports" 
09629 const ANTLR_USE_NAMESPACE(antlr)BitSet PascalParser::_tokenSet_5(_tokenSet_5_data_,6);
09630 const unsigned long PascalParser::_tokenSet_6_data_[] = { 33554432UL, 0UL, 0UL, 0UL, 0UL, 0UL };
09631 // "end" 
09632 const ANTLR_USE_NAMESPACE(antlr)BitSet PascalParser::_tokenSet_6(_tokenSet_6_data_,6);
09633 const unsigned long PascalParser::_tokenSet_7_data_[] = { 100663296UL, 68UL, 0UL, 0UL, 0UL, 0UL };
09634 // "end" "exports" "begin" "initialization" 
09635 const ANTLR_USE_NAMESPACE(antlr)BitSet PascalParser::_tokenSet_7(_tokenSet_7_data_,6);
09636 const unsigned long PascalParser::_tokenSet_8_data_[] = { 184549376UL, 0UL, 0UL, 0UL, 0UL, 0UL };
09637 // SEMI "end" COMMA 
09638 const ANTLR_USE_NAMESPACE(antlr)BitSet PascalParser::_tokenSet_8(_tokenSet_8_data_,6);
09639 const unsigned long PascalParser::_tokenSet_9_data_[] = { 788529154UL, 177988UL, 0UL, 127424UL, 0UL, 0UL, 0UL, 0UL };
09640 // EOF SEMI "end" "exports" COMMA "name" "begin" "initialization" "label" 
09641 // "const" "resourcestring" "type" "var" "procedure" "function" "constructor" 
09642 // "destructor" "class" "property" "read" "write" "default" "nodefault" 
09643 const ANTLR_USE_NAMESPACE(antlr)BitSet PascalParser::_tokenSet_9(_tokenSet_9_data_,8);
09644 const unsigned long PascalParser::_tokenSet_10_data_[] = { 1056964610UL, 177988UL, 0UL, 192UL, 0UL, 0UL, 0UL, 0UL };
09645 // EOF SEMI "end" "exports" COMMA "index" "name" "begin" "initialization" 
09646 // "label" "const" "resourcestring" "type" "var" "procedure" "function" 
09647 // "constructor" "destructor" 
09648 const ANTLR_USE_NAMESPACE(antlr)BitSet PascalParser::_tokenSet_10(_tokenSet_10_data_,8);
09649 const unsigned long PascalParser::_tokenSet_11_data_[] = { 16777216UL, 16416UL, 67108864UL, 0UL, 0UL, 0UL, 0UL, 0UL };
09650 // SEMI RPAREN COLON RBRACK 
09651 const ANTLR_USE_NAMESPACE(antlr)BitSet PascalParser::_tokenSet_11(_tokenSet_11_data_,8);
09652 const unsigned long PascalParser::_tokenSet_12_data_[] = { 0UL, 2UL, 0UL, 0UL, 0UL, 0UL };
09653 // "implementation" 
09654 const ANTLR_USE_NAMESPACE(antlr)BitSet PascalParser::_tokenSet_12(_tokenSet_12_data_,6);
09655 const unsigned long PascalParser::_tokenSet_13_data_[] = { 33554432UL, 68UL, 0UL, 0UL, 0UL, 0UL };
09656 // "end" "begin" "initialization" 
09657 const ANTLR_USE_NAMESPACE(antlr)BitSet PascalParser::_tokenSet_13(_tokenSet_13_data_,6);
09658 const unsigned long PascalParser::_tokenSet_14_data_[] = { 33554432UL, 128UL, 0UL, 0UL, 0UL, 0UL };
09659 // "end" "finalization" 
09660 const ANTLR_USE_NAMESPACE(antlr)BitSet PascalParser::_tokenSet_14(_tokenSet_14_data_,6);
09661 const unsigned long PascalParser::_tokenSet_15_data_[] = { 0UL, 168450UL, 0UL, 0UL, 0UL, 0UL };
09662 // "implementation" "const" "type" "procedure" "function" 
09663 const ANTLR_USE_NAMESPACE(antlr)BitSet PascalParser::_tokenSet_15(_tokenSet_15_data_,6);
09664 const unsigned long PascalParser::_tokenSet_16_data_[] = { 50331648UL, 128UL, 0UL, 0UL, 805584896UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL };
09665 // SEMI "end" "finalization" "else" "until" "except" "finally" 
09666 const ANTLR_USE_NAMESPACE(antlr)BitSet PascalParser::_tokenSet_16(_tokenSet_16_data_,12);
09667 const unsigned long PascalParser::_tokenSet_17_data_[] = { 100663296UL, 177988UL, 0UL, 192UL, 0UL, 0UL, 0UL, 0UL };
09668 // "end" "exports" "begin" "initialization" "label" "const" "resourcestring" 
09669 // "type" "var" "procedure" "function" "constructor" "destructor" 
09670 const ANTLR_USE_NAMESPACE(antlr)BitSet PascalParser::_tokenSet_17(_tokenSet_17_data_,8);
09671 const unsigned long PascalParser::_tokenSet_18_data_[] = { 184549376UL, 16512UL, 0UL, 0UL, 805584896UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL };
09672 // SEMI "end" COMMA "finalization" COLON "else" "until" "except" "finally" 
09673 const ANTLR_USE_NAMESPACE(antlr)BitSet PascalParser::_tokenSet_18(_tokenSet_18_data_,12);
09674 const unsigned long PascalParser::_tokenSet_19_data_[] = { 100663296UL, 177990UL, 0UL, 192UL, 0UL, 8UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL };
09675 // "end" "exports" "implementation" "begin" "initialization" "label" "const" 
09676 // "resourcestring" "type" "var" "procedure" "function" "constructor" "destructor" 
09677 // IDENT 
09678 const ANTLR_USE_NAMESPACE(antlr)BitSet PascalParser::_tokenSet_19(_tokenSet_19_data_,12);
09679 const unsigned long PascalParser::_tokenSet_20_data_[] = { 100663296UL, 177988UL, 0UL, 192UL, 0UL, 8UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL };
09680 // "end" "exports" "begin" "initialization" "label" "const" "resourcestring" 
09681 // "type" "var" "procedure" "function" "constructor" "destructor" IDENT 
09682 const ANTLR_USE_NAMESPACE(antlr)BitSet PascalParser::_tokenSet_20(_tokenSet_20_data_,12);
09683 const unsigned long PascalParser::_tokenSet_21_data_[] = { 1061158914UL, 720868UL, 67239936UL, 4294840768UL, 825581575UL, 8UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL };
09684 // EOF DOT SEMI "end" "exports" COMMA "index" "name" "begin" RPAREN "initialization" 
09685 // "finalization" "label" "const" "resourcestring" EQUAL "type" "var" COLON 
09686 // "procedure" "function" "of" DOTDOT RBRACK "constructor" "destructor" 
09687 // "class" "property" LE GE LTH GT NOT_EQUAL "in" "is" PLUS MINUS "or" 
09688 // "xor" STAR SLASH "div" "mod" "and" "shl" "shr" "then" "else" "do" "until" 
09689 // "to" "downto" RBRACK2 "except" "finally" IDENT 
09690 const ANTLR_USE_NAMESPACE(antlr)BitSet PascalParser::_tokenSet_21(_tokenSet_21_data_,12);
09691 const unsigned long PascalParser::_tokenSet_22_data_[] = { 16777216UL, 0UL, 0UL, 0UL, 0UL, 0UL };
09692 // SEMI 
09693 const ANTLR_USE_NAMESPACE(antlr)BitSet PascalParser::_tokenSet_22(_tokenSet_22_data_,6);
09694 const unsigned long PascalParser::_tokenSet_23_data_[] = { 16777216UL, 2080UL, 67108864UL, 0UL, 0UL, 0UL, 0UL, 0UL };
09695 // SEMI RPAREN EQUAL RBRACK 
09696 const ANTLR_USE_NAMESPACE(antlr)BitSet PascalParser::_tokenSet_23(_tokenSet_23_data_,8);
09697 const unsigned long PascalParser::_tokenSet_24_data_[] = { 0UL, 4UL, 536870920UL, 0UL, 206215168UL, 8UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL };
09698 // "begin" NUM_INT "case" "goto" "if" "while" "repeat" "for" "with" "raise" 
09699 // "try" IDENT 
09700 const ANTLR_USE_NAMESPACE(antlr)BitSet PascalParser::_tokenSet_24(_tokenSet_24_data_,12);
09701 const unsigned long PascalParser::_tokenSet_25_data_[] = { 121634818UL, 178116UL, 0UL, 192UL, 805584896UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL };
09702 // EOF DOT SEMI "end" "exports" "begin" "initialization" "finalization" 
09703 // "label" "const" "resourcestring" "type" "var" "procedure" "function" 
09704 // "constructor" "destructor" "else" "until" "except" "finally" 
09705 const ANTLR_USE_NAMESPACE(antlr)BitSet PascalParser::_tokenSet_25(_tokenSet_25_data_,12);
09706 const unsigned long PascalParser::_tokenSet_26_data_[] = { 16777216UL, 1818406UL, 67108864UL, 192UL, 0UL, 0UL, 0UL, 0UL };
09707 // SEMI "implementation" "begin" RPAREN "label" "const" "resourcestring" 
09708 // EQUAL "type" "var" "procedure" "forward" "function" "of" "external" 
09709 // RBRACK "constructor" "destructor" 
09710 const ANTLR_USE_NAMESPACE(antlr)BitSet PascalParser::_tokenSet_26(_tokenSet_26_data_,8);
09711 const unsigned long PascalParser::_tokenSet_27_data_[] = { 117440514UL, 177988UL, 0UL, 192UL, 0UL, 0UL, 0UL, 0UL };
09712 // EOF SEMI "end" "exports" "begin" "initialization" "label" "const" "resourcestring" 
09713 // "type" "var" "procedure" "function" "constructor" "destructor" 
09714 const ANTLR_USE_NAMESPACE(antlr)BitSet PascalParser::_tokenSet_27(_tokenSet_27_data_,8);
09715 const unsigned long PascalParser::_tokenSet_28_data_[] = { 16777216UL, 16400UL, 0UL, 0UL, 0UL, 0UL };
09716 // SEMI LPAREN COLON 
09717 const ANTLR_USE_NAMESPACE(antlr)BitSet PascalParser::_tokenSet_28(_tokenSet_28_data_,6);
09718 const unsigned long PascalParser::_tokenSet_29_data_[] = { 16777216UL, 16416UL, 0UL, 0UL, 0UL, 0UL };
09719 // SEMI RPAREN COLON 
09720 const ANTLR_USE_NAMESPACE(antlr)BitSet PascalParser::_tokenSet_29(_tokenSet_29_data_,6);
09721 const unsigned long PascalParser::_tokenSet_30_data_[] = { 16777216UL, 32UL, 67108864UL, 0UL, 0UL, 0UL, 0UL, 0UL };
09722 // SEMI RPAREN RBRACK 
09723 const ANTLR_USE_NAMESPACE(antlr)BitSet PascalParser::_tokenSet_30(_tokenSet_30_data_,8);
09724 const unsigned long PascalParser::_tokenSet_31_data_[] = { 0UL, 426000UL, 3657039864UL, 50331907UL, 2147483648UL, 13UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL };
09725 // LPAREN "procedure" "function" "array" NUM_INT "integer" "shortint" "smallint" 
09726 // "longint" "int64" "byte" "word" "cardinal" "qword" "boolean" BYTEBOOL 
09727 // LONGBOOL "char" "real" "single" "double" "extended" "comp" "string" 
09728 // "packed" "record" "set" "file" POINTER "object" "class" PLUS MINUS STRING_LITERAL 
09729 // "chr" NUM_REAL IDENT 
09730 const ANTLR_USE_NAMESPACE(antlr)BitSet PascalParser::_tokenSet_31(_tokenSet_31_data_,12);
09731 const unsigned long PascalParser::_tokenSet_32_data_[] = { 188743680UL, 524448UL, 67239936UL, 0UL, 825581568UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL };
09732 // DOT SEMI "end" COMMA RPAREN "finalization" "of" DOTDOT RBRACK "then" 
09733 // "else" "do" "until" "to" "downto" RBRACK2 "except" "finally" 
09734 const ANTLR_USE_NAMESPACE(antlr)BitSet PascalParser::_tokenSet_32(_tokenSet_32_data_,12);
09735 const unsigned long PascalParser::_tokenSet_33_data_[] = { 0UL, 0UL, 8UL, 50331648UL, 2147483648UL, 13UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL };
09736 // NUM_INT PLUS MINUS STRING_LITERAL "chr" NUM_REAL IDENT 
09737 const ANTLR_USE_NAMESPACE(antlr)BitSet PascalParser::_tokenSet_33(_tokenSet_33_data_,12);
09738 const unsigned long PascalParser::_tokenSet_34_data_[] = { 16777216UL, 16UL, 8UL, 0UL, 0UL, 12UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL };
09739 // SEMI LPAREN NUM_INT NUM_REAL IDENT 
09740 const ANTLR_USE_NAMESPACE(antlr)BitSet PascalParser::_tokenSet_34(_tokenSet_34_data_,12);
09741 const unsigned long PascalParser::_tokenSet_35_data_[] = { 0UL, 16UL, 8UL, 50331648UL, 2147483648UL, 13UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL };
09742 // LPAREN NUM_INT PLUS MINUS STRING_LITERAL "chr" NUM_REAL IDENT 
09743 const ANTLR_USE_NAMESPACE(antlr)BitSet PascalParser::_tokenSet_35(_tokenSet_35_data_,12);
09744 const unsigned long PascalParser::_tokenSet_36_data_[] = { 0UL, 16UL, 33554440UL, 50331648UL, 2147483768UL, 15UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL };
09745 // LPAREN NUM_INT LBRACK PLUS MINUS "not" "true" "false" AT STRING_LITERAL 
09746 // "chr" "nil" NUM_REAL IDENT 
09747 const ANTLR_USE_NAMESPACE(antlr)BitSet PascalParser::_tokenSet_36(_tokenSet_36_data_,12);
09748 const unsigned long PascalParser::_tokenSet_37_data_[] = { 16777216UL, 2064UL, 100663304UL, 4294836224UL, 2147483775UL, 15UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL };
09749 // SEMI LPAREN EQUAL NUM_INT LBRACK RBRACK LE GE LTH GT NOT_EQUAL "in" 
09750 // "is" PLUS MINUS "or" "xor" STAR SLASH "div" "mod" "and" "shl" "shr" 
09751 // "not" "true" "false" AT STRING_LITERAL "chr" "nil" NUM_REAL IDENT 
09752 const ANTLR_USE_NAMESPACE(antlr)BitSet PascalParser::_tokenSet_37(_tokenSet_37_data_,12);
09753 const unsigned long PascalParser::_tokenSet_38_data_[] = { 184549378UL, 182304UL, 67239936UL, 4544UL, 0UL, 0UL, 0UL, 0UL };
09754 // EOF SEMI "end" COMMA RPAREN EQUAL COLON "procedure" "function" DOTDOT 
09755 // RBRACK "constructor" "destructor" "class" "property" 
09756 const ANTLR_USE_NAMESPACE(antlr)BitSet PascalParser::_tokenSet_38(_tokenSet_38_data_,8);
09757 const unsigned long PascalParser::_tokenSet_39_data_[] = { 150994944UL, 32UL, 0UL, 0UL, 0UL, 0UL };
09758 // SEMI COMMA RPAREN 
09759 const ANTLR_USE_NAMESPACE(antlr)BitSet PascalParser::_tokenSet_39(_tokenSet_39_data_,6);
09760 const unsigned long PascalParser::_tokenSet_40_data_[] = { 150994944UL, 2080UL, 67108864UL, 0UL, 0UL, 0UL, 0UL, 0UL };
09761 // SEMI COMMA RPAREN EQUAL RBRACK 
09762 const ANTLR_USE_NAMESPACE(antlr)BitSet PascalParser::_tokenSet_40(_tokenSet_40_data_,8);
09763 const unsigned long PascalParser::_tokenSet_41_data_[] = { 318767104UL, 165936UL, 67108864UL, 127424UL, 0UL, 0UL, 0UL, 0UL };
09764 // SEMI "end" "index" LPAREN RPAREN EQUAL "procedure" "function" RBRACK 
09765 // "constructor" "destructor" "class" "property" "read" "write" "default" 
09766 // "nodefault" 
09767 const ANTLR_USE_NAMESPACE(antlr)BitSet PascalParser::_tokenSet_41(_tokenSet_41_data_,8);
09768 const unsigned long PascalParser::_tokenSet_42_data_[] = { 0UL, 32UL, 0UL, 0UL, 0UL, 0UL };
09769 // RPAREN 
09770 const ANTLR_USE_NAMESPACE(antlr)BitSet PascalParser::_tokenSet_42(_tokenSet_42_data_,6);
09771 const unsigned long PascalParser::_tokenSet_43_data_[] = { 792723458UL, 720868UL, 67239936UL, 4294963648UL, 825581575UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL };
09772 // EOF DOT SEMI "end" "exports" COMMA "name" "begin" RPAREN "initialization" 
09773 // "finalization" "label" "const" "resourcestring" EQUAL "type" "var" COLON 
09774 // "procedure" "function" "of" DOTDOT RBRACK "constructor" "destructor" 
09775 // "class" "property" "read" "write" "default" "nodefault" LE GE LTH GT 
09776 // NOT_EQUAL "in" "is" PLUS MINUS "or" "xor" STAR SLASH "div" "mod" "and" 
09777 // "shl" "shr" "then" "else" "do" "until" "to" "downto" RBRACK2 "except" 
09778 // "finally" 
09779 const ANTLR_USE_NAMESPACE(antlr)BitSet PascalParser::_tokenSet_43(_tokenSet_43_data_,12);
09780 const unsigned long PascalParser::_tokenSet_44_data_[] = { 0UL, 2064UL, 100794376UL, 4294836224UL, 2147483775UL, 15UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL };
09781 // LPAREN EQUAL NUM_INT DOTDOT LBRACK RBRACK LE GE LTH GT NOT_EQUAL "in" 
09782 // "is" PLUS MINUS "or" "xor" STAR SLASH "div" "mod" "and" "shl" "shr" 
09783 // "not" "true" "false" AT STRING_LITERAL "chr" "nil" NUM_REAL IDENT 
09784 const ANTLR_USE_NAMESPACE(antlr)BitSet PascalParser::_tokenSet_44(_tokenSet_44_data_,12);
09785 const unsigned long PascalParser::_tokenSet_45_data_[] = { 134217728UL, 0UL, 67108864UL, 0UL, 0UL, 0UL, 0UL, 0UL };
09786 // COMMA RBRACK 
09787 const ANTLR_USE_NAMESPACE(antlr)BitSet PascalParser::_tokenSet_45(_tokenSet_45_data_,8);
09788 const unsigned long PascalParser::_tokenSet_46_data_[] = { 33554432UL, 32UL, 536870912UL, 0UL, 0UL, 8UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL };
09789 // "end" RPAREN "case" IDENT 
09790 const ANTLR_USE_NAMESPACE(antlr)BitSet PascalParser::_tokenSet_46(_tokenSet_46_data_,12);
09791 const unsigned long PascalParser::_tokenSet_47_data_[] = { 50331648UL, 32UL, 536870912UL, 0UL, 0UL, 8UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL };
09792 // SEMI "end" RPAREN "case" IDENT 
09793 const ANTLR_USE_NAMESPACE(antlr)BitSet PascalParser::_tokenSet_47(_tokenSet_47_data_,12);
09794 const unsigned long PascalParser::_tokenSet_48_data_[] = { 33554432UL, 2260992UL, 0UL, 6640UL, 0UL, 8UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL };
09795 // "end" "procedure" "function" "public" "private" "protected" "constructor" 
09796 // "destructor" "class" "published" "property" IDENT 
09797 const ANTLR_USE_NAMESPACE(antlr)BitSet PascalParser::_tokenSet_48(_tokenSet_48_data_,12);
09798 const unsigned long PascalParser::_tokenSet_49_data_[] = { 0UL, 163840UL, 0UL, 192UL, 0UL, 0UL, 0UL, 0UL };
09799 // "procedure" "function" "constructor" "destructor" 
09800 const ANTLR_USE_NAMESPACE(antlr)BitSet PascalParser::_tokenSet_49(_tokenSet_49_data_,8);
09801 const unsigned long PascalParser::_tokenSet_50_data_[] = { 33554432UL, 163840UL, 0UL, 4544UL, 0UL, 8UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL };
09802 // "end" "procedure" "function" "constructor" "destructor" "class" "property" 
09803 // IDENT 
09804 const ANTLR_USE_NAMESPACE(antlr)BitSet PascalParser::_tokenSet_50(_tokenSet_50_data_,12);
09805 const unsigned long PascalParser::_tokenSet_51_data_[] = { 33554432UL, 163840UL, 0UL, 192UL, 0UL, 0UL, 0UL, 0UL };
09806 // "end" "procedure" "function" "constructor" "destructor" 
09807 const ANTLR_USE_NAMESPACE(antlr)BitSet PascalParser::_tokenSet_51(_tokenSet_51_data_,8);
09808 const unsigned long PascalParser::_tokenSet_52_data_[] = { 0UL, 163840UL, 0UL, 4544UL, 0UL, 0UL, 0UL, 0UL };
09809 // "procedure" "function" "constructor" "destructor" "class" "property" 
09810 const ANTLR_USE_NAMESPACE(antlr)BitSet PascalParser::_tokenSet_52(_tokenSet_52_data_,8);
09811 const unsigned long PascalParser::_tokenSet_53_data_[] = { 33554432UL, 163840UL, 0UL, 4544UL, 0UL, 0UL, 0UL, 0UL };
09812 // "end" "procedure" "function" "constructor" "destructor" "class" "property" 
09813 const ANTLR_USE_NAMESPACE(antlr)BitSet PascalParser::_tokenSet_53(_tokenSet_53_data_,8);
09814 const unsigned long PascalParser::_tokenSet_54_data_[] = { 33554432UL, 163840UL, 0UL, 127424UL, 0UL, 0UL, 0UL, 0UL };
09815 // "end" "procedure" "function" "constructor" "destructor" "class" "property" 
09816 // "read" "write" "default" "nodefault" 
09817 const ANTLR_USE_NAMESPACE(antlr)BitSet PascalParser::_tokenSet_54(_tokenSet_54_data_,8);
09818 const unsigned long PascalParser::_tokenSet_55_data_[] = { 0UL, 16384UL, 0UL, 0UL, 0UL, 0UL };
09819 // COLON 
09820 const ANTLR_USE_NAMESPACE(antlr)BitSet PascalParser::_tokenSet_55(_tokenSet_55_data_,6);
09821 const unsigned long PascalParser::_tokenSet_56_data_[] = { 33554432UL, 163840UL, 0UL, 119232UL, 0UL, 0UL, 0UL, 0UL };
09822 // "end" "procedure" "function" "constructor" "destructor" "class" "property" 
09823 // "write" "default" "nodefault" 
09824 const ANTLR_USE_NAMESPACE(antlr)BitSet PascalParser::_tokenSet_56(_tokenSet_56_data_,8);
09825 const unsigned long PascalParser::_tokenSet_57_data_[] = { 33554432UL, 163840UL, 0UL, 102848UL, 0UL, 0UL, 0UL, 0UL };
09826 // "end" "procedure" "function" "constructor" "destructor" "class" "property" 
09827 // "default" "nodefault" 
09828 const ANTLR_USE_NAMESPACE(antlr)BitSet PascalParser::_tokenSet_57(_tokenSet_57_data_,8);
09829 const unsigned long PascalParser::_tokenSet_58_data_[] = { 188743680UL, 526496UL, 67239936UL, 16646144UL, 825581568UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL };
09830 // DOT SEMI "end" COMMA RPAREN "finalization" EQUAL "of" DOTDOT RBRACK 
09831 // LE GE LTH GT NOT_EQUAL "in" "is" "then" "else" "do" "until" "to" "downto" 
09832 // RBRACK2 "except" "finally" 
09833 const ANTLR_USE_NAMESPACE(antlr)BitSet PascalParser::_tokenSet_58(_tokenSet_58_data_,12);
09834 const unsigned long PascalParser::_tokenSet_59_data_[] = { 188743680UL, 526496UL, 67239936UL, 268304384UL, 825581568UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL };
09835 // DOT SEMI "end" COMMA RPAREN "finalization" EQUAL "of" DOTDOT RBRACK 
09836 // LE GE LTH GT NOT_EQUAL "in" "is" PLUS MINUS "or" "xor" "then" "else" 
09837 // "do" "until" "to" "downto" RBRACK2 "except" "finally" 
09838 const ANTLR_USE_NAMESPACE(antlr)BitSet PascalParser::_tokenSet_59(_tokenSet_59_data_,12);
09839 const unsigned long PascalParser::_tokenSet_60_data_[] = { 188743680UL, 526512UL, 67239936UL, 4294836224UL, 825581575UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL };
09840 // DOT SEMI "end" COMMA LPAREN RPAREN "finalization" EQUAL "of" DOTDOT 
09841 // RBRACK LE GE LTH GT NOT_EQUAL "in" "is" PLUS MINUS "or" "xor" STAR SLASH 
09842 // "div" "mod" "and" "shl" "shr" "then" "else" "do" "until" "to" "downto" 
09843 // RBRACK2 "except" "finally" 
09844 const ANTLR_USE_NAMESPACE(antlr)BitSet PascalParser::_tokenSet_60(_tokenSet_60_data_,12);
09845 const unsigned long PascalParser::_tokenSet_61_data_[] = { 188743680UL, 526496UL, 67239936UL, 4294836224UL, 825581575UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL };
09846 // DOT SEMI "end" COMMA RPAREN "finalization" EQUAL "of" DOTDOT RBRACK 
09847 // LE GE LTH GT NOT_EQUAL "in" "is" PLUS MINUS "or" "xor" STAR SLASH "div" 
09848 // "mod" "and" "shl" "shr" "then" "else" "do" "until" "to" "downto" RBRACK2 
09849 // "except" "finally" 
09850 const ANTLR_USE_NAMESPACE(antlr)BitSet PascalParser::_tokenSet_61(_tokenSet_61_data_,12);
09851 const unsigned long PascalParser::_tokenSet_62_data_[] = { 50331648UL, 128UL, 0UL, 0UL, 805584960UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL };
09852 // SEMI "end" "finalization" AT "else" "until" "except" "finally" 
09853 const ANTLR_USE_NAMESPACE(antlr)BitSet PascalParser::_tokenSet_62(_tokenSet_62_data_,12);
09854 const unsigned long PascalParser::_tokenSet_63_data_[] = { 0UL, 0UL, 33816576UL, 0UL, 1920UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL };
09855 // ASSIGN LBRACK PLUSEQ MINUSEQ STAREQ SLASHQE 
09856 const ANTLR_USE_NAMESPACE(antlr)BitSet PascalParser::_tokenSet_63(_tokenSet_63_data_,12);
09857 const unsigned long PascalParser::_tokenSet_64_data_[] = { 50331648UL, 144UL, 0UL, 0UL, 805584896UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL };
09858 // SEMI "end" LPAREN "finalization" "else" "until" "except" "finally" 
09859 const ANTLR_USE_NAMESPACE(antlr)BitSet PascalParser::_tokenSet_64(_tokenSet_64_data_,12);
09860 const unsigned long PascalParser::_tokenSet_65_data_[] = { 0UL, 0UL, 262144UL, 0UL, 1920UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL };
09861 // ASSIGN PLUSEQ MINUSEQ STAREQ SLASHQE 
09862 const ANTLR_USE_NAMESPACE(antlr)BitSet PascalParser::_tokenSet_65(_tokenSet_65_data_,12);
09863 const unsigned long PascalParser::_tokenSet_66_data_[] = { 121634818UL, 178132UL, 570425352UL, 50331840UL, 4233025656UL, 15UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL };
09864 // EOF DOT SEMI "end" "exports" "begin" LPAREN "initialization" "finalization" 
09865 // "label" "const" "resourcestring" "type" "var" "procedure" "function" 
09866 // NUM_INT LBRACK "case" "constructor" "destructor" PLUS MINUS "not" "true" 
09867 // "false" AT "goto" "if" "else" "while" "repeat" "until" "for" "with" 
09868 // "raise" "try" "except" "finally" "on" STRING_LITERAL "chr" "nil" NUM_REAL 
09869 // IDENT 
09870 const ANTLR_USE_NAMESPACE(antlr)BitSet PascalParser::_tokenSet_66(_tokenSet_66_data_,12);
09871 const unsigned long PascalParser::_tokenSet_67_data_[] = { 50331648UL, 0UL, 0UL, 0UL, 0UL, 0UL };
09872 // SEMI "end" 
09873 const ANTLR_USE_NAMESPACE(antlr)BitSet PascalParser::_tokenSet_67(_tokenSet_67_data_,6);
09874 const unsigned long PascalParser::_tokenSet_68_data_[] = { 0UL, 0UL, 0UL, 0UL, 65536UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL };
09875 // "do" 
09876 const ANTLR_USE_NAMESPACE(antlr)BitSet PascalParser::_tokenSet_68(_tokenSet_68_data_,12);
09877 const unsigned long PascalParser::_tokenSet_69_data_[] = { 0UL, 0UL, 0UL, 0UL, 3145728UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL };
09878 // "to" "downto" 
09879 const ANTLR_USE_NAMESPACE(antlr)BitSet PascalParser::_tokenSet_69(_tokenSet_69_data_,12);
09880 const unsigned long PascalParser::_tokenSet_70_data_[] = { 134217728UL, 0UL, 0UL, 0UL, 65536UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL };
09881 // COMMA "do" 
09882 const ANTLR_USE_NAMESPACE(antlr)BitSet PascalParser::_tokenSet_70(_tokenSet_70_data_,12);
09883 const unsigned long PascalParser::_tokenSet_71_data_[] = { 0UL, 0UL, 0UL, 0UL, 0UL, 8UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL };
09884 // IDENT 
09885 const ANTLR_USE_NAMESPACE(antlr)BitSet PascalParser::_tokenSet_71(_tokenSet_71_data_,12);
09886 const unsigned long PascalParser::_tokenSet_72_data_[] = { 33554432UL, 0UL, 0UL, 0UL, 805306368UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL };
09887 // "end" "except" "finally" 
09888 const ANTLR_USE_NAMESPACE(antlr)BitSet PascalParser::_tokenSet_72(_tokenSet_72_data_,12);
09889 const unsigned long PascalParser::_tokenSet_73_data_[] = { 50331648UL, 0UL, 0UL, 0UL, 16384UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL };
09890 // SEMI "end" "else" 
09891 const ANTLR_USE_NAMESPACE(antlr)BitSet PascalParser::_tokenSet_73(_tokenSet_73_data_,12);
09892 const unsigned long PascalParser::_tokenSet_74_data_[] = { 0UL, 0UL, 8UL, 0UL, 0UL, 12UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL };
09893 // NUM_INT NUM_REAL IDENT 
09894 const ANTLR_USE_NAMESPACE(antlr)BitSet PascalParser::_tokenSet_74(_tokenSet_74_data_,12);
09895 const unsigned long PascalParser::_tokenSet_75_data_[] = { 1061158914UL, 720868UL, 67239936UL, 4294840768UL, 825581575UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL };
09896 // EOF DOT SEMI "end" "exports" COMMA "index" "name" "begin" RPAREN "initialization" 
09897 // "finalization" "label" "const" "resourcestring" EQUAL "type" "var" COLON 
09898 // "procedure" "function" "of" DOTDOT RBRACK "constructor" "destructor" 
09899 // "class" "property" LE GE LTH GT NOT_EQUAL "in" "is" PLUS MINUS "or" 
09900 // "xor" STAR SLASH "div" "mod" "and" "shl" "shr" "then" "else" "do" "until" 
09901 // "to" "downto" RBRACK2 "except" "finally" 
09902 const ANTLR_USE_NAMESPACE(antlr)BitSet PascalParser::_tokenSet_75(_tokenSet_75_data_,12);
09903 const unsigned long PascalParser::_tokenSet_76_data_[] = { 188743682UL, 706720UL, 67239936UL, 4294840768UL, 825581575UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL };
09904 // EOF DOT SEMI "end" COMMA RPAREN "finalization" EQUAL COLON "procedure" 
09905 // "function" "of" DOTDOT RBRACK "constructor" "destructor" "class" "property" 
09906 // LE GE LTH GT NOT_EQUAL "in" "is" PLUS MINUS "or" "xor" STAR SLASH "div" 
09907 // "mod" "and" "shl" "shr" "then" "else" "do" "until" "to" "downto" RBRACK2 
09908 // "except" "finally" 
09909 const ANTLR_USE_NAMESPACE(antlr)BitSet PascalParser::_tokenSet_76(_tokenSet_76_data_,12);
09910 
09911 
KDE Logo
This file is part of the documentation for KDevelop Version 3.1.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed Mar 23 00:03:49 2005 by doxygen 1.3.9.1 written by Dimitri van Heesch, © 1997-2003