synPredMatched18 = false;
synPredMatched20 = false;
	public final void prolog() throws RecognitionException, TokenStreamException {				traceIn("prolog");		try { // debugging			returnAST = null;			ASTPair currentAST = new ASTPair();			org.exist.xquery.parser.XQueryAST prolog_AST = null;			org.exist.xquery.parser.XQueryAST v_AST = null;			org.exist.xquery.parser.XQueryAST nd_AST = null;			org.exist.xquery.parser.XQueryAST dnd_AST = null;			org.exist.xquery.parser.XQueryAST fd_AST = null;						{			boolean synPredMatched14 = false;			if (((LA(1)==XQUERY))) {				int _m14 = mark();				synPredMatched14 = true;				inputState.guessing++;				try {					{					match(XQUERY);					match(VERSION);					}				}				catch (RecognitionException pe) {					synPredMatched14 = false;				}				rewind(_m14);				inputState.guessing--;			}			if ( synPredMatched14 ) {				version();				v_AST = (org.exist.xquery.parser.XQueryAST)returnAST;				astFactory.addASTChild(currentAST, returnAST);				match(SEMICOLON);			}			else if ((_tokenSet_1.member(LA(1)))) {			}			else {				throw new NoViableAltException(LT(1), getFilename());			}						}			{			_loop25:			do {				if ((LA(1)==LITERAL_declare||LA(1)==LITERAL_import)) {					{					boolean synPredMatched18 = false;					if (((LA(1)==LITERAL_declare))) {						int _m18 = mark();						synPredMatched18 = true;						inputState.guessing++;						try {							{							match(LITERAL_declare);							match(LITERAL_namespace);							}						}						catch (RecognitionException pe) {							synPredMatched18 = false;						}						rewind(_m18);						inputState.guessing--;					}					if ( synPredMatched18 ) {						namespaceDecl();						nd_AST = (org.exist.xquery.parser.XQueryAST)returnAST;						astFactory.addASTChild(currentAST, returnAST);					}					else {						boolean synPredMatched20 = false;						if (((LA(1)==LITERAL_declare))) {							int _m20 = mark();							synPredMatched20 = true;							inputState.guessing++;							try {								{								match(LITERAL_declare);								match(LITERAL_default);								}							}							catch (RecognitionException pe) {								synPredMatched20 = false;							}							rewind(_m20);							inputState.guessing--;						}						if ( synPredMatched20 ) {							defaultNamespaceDecl();							dnd_AST = (org.exist.xquery.parser.XQueryAST)returnAST;							astFactory.addASTChild(currentAST, returnAST);						}						else {							boolean synPredMatched22 = false;							if (((LA(1)==LITERAL_declare))) {								int _m22 = mark();								synPredMatched22 = true;								inputState.guessing++;								try {									{									match(LITERAL_declare);									match(LITERAL_function);									}								}								catch (RecognitionException pe) {									synPredMatched22 = false;								}								rewind(_m22);								inputState.guessing--;							}							if ( synPredMatched22 ) {								functionDecl();								fd_AST = (org.exist.xquery.parser.XQueryAST)returnAST;								astFactory.addASTChild(currentAST, returnAST);							}							else {								boolean synPredMatched24 = false;								if (((LA(1)==LITERAL_declare))) {									int _m24 = mark();									synPredMatched24 = true;									inputState.guessing++;									try {										{										match(LITERAL_declare);										match(LITERAL_variable);										}									}									catch (RecognitionException pe) {										synPredMatched24 = false;									}									rewind(_m24);									inputState.guessing--;								}								if ( synPredMatched24 ) {									varDecl();									astFactory.addASTChild(currentAST, returnAST);								}								else if ((LA(1)==LITERAL_import)) {									moduleImport();									astFactory.addASTChild(currentAST, returnAST);								}								else {									throw new NoViableAltException(LT(1), getFilename());								}								}}}								}								match(SEMICOLON);							}							else {								break _loop25;							}													} while (true);						}						prolog_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root;						returnAST = prolog_AST;					} finally { // debugging						traceOut("prolog");					}				}