match(LITERAL_xquery); org.exist.xquery.parser.XQueryAST tmp50_AST = null; tmp50_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp50_AST);
	public final void versionDecl() throws RecognitionException, TokenStreamException, XPathException {				returnAST = null;		ASTPair currentAST = new ASTPair();		org.exist.xquery.parser.XQueryAST versionDecl_AST = null;		Token  v = null;		org.exist.xquery.parser.XQueryAST v_AST = null;		Token  enc = null;		org.exist.xquery.parser.XQueryAST enc_AST = null;				org.exist.xquery.parser.XQueryAST tmp48_AST = null;		tmp48_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1));		astFactory.addASTChild(currentAST, tmp48_AST);		match(LITERAL_xquery);		org.exist.xquery.parser.XQueryAST tmp49_AST = null;		tmp49_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1));		astFactory.addASTChild(currentAST, tmp49_AST);		match(LITERAL_version);		v = LT(1);		v_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(v);		astFactory.addASTChild(currentAST, v_AST);		match(STRING_LITERAL);		if ( inputState.guessing==0 ) {			versionDecl_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root;			versionDecl_AST = (org.exist.xquery.parser.XQueryAST)astFactory.make( (new ASTArray(1)).add((org.exist.xquery.parser.XQueryAST)astFactory.create(VERSION_DECL,v.getText())));			currentAST.root = versionDecl_AST;			currentAST.child = versionDecl_AST!=null &&versionDecl_AST.getFirstChild()!=null ?				versionDecl_AST.getFirstChild() : versionDecl_AST;			currentAST.advanceChildToEnd();		}		{		switch ( LA(1)) {		case LITERAL_encoding:		{			match(LITERAL_encoding);			enc = LT(1);			enc_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(enc);			match(STRING_LITERAL);			break;		}		case SEMICOLON:		{			break;		}		default:		{			throw new NoViableAltException(LT(1), getFilename());		}		}		}		versionDecl_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root;		returnAST = versionDecl_AST;	}