_loop213:
_loop215:
	public final void prolog(AST _t,		PathExpr path	) throws RecognitionException, PermissionDeniedException,EXistException,XPathException {				AST prolog_AST_in = (AST)_t;		AST v = null;		AST prefix = null;		AST uri = null;		AST defu = null;		AST deff = null;		AST qname = null;				{		if (_t==null) _t=ASTNULL;		switch ( _t.getType()) {		case VERSION_DECL:		{			AST __t207 = _t;			v = _t==ASTNULL ? null :(AST)_t;			match(_t,VERSION_DECL);			_t = _t.getFirstChild();										if(!v.getText().equals("1.0"))								throw new XPathException("Wrong XQuery version: require 1.0");									_t = __t207;			_t = _t.getNextSibling();			break;		}		case QNAME:		case PARENTHESIZED:		case ABSOLUTE_SLASH:		case ABSOLUTE_DSLASH:		case WILDCARD:		case PREFIX_WILDCARD:		case FUNCTION:		case UNARY_MINUS:		case UNARY_PLUS:		case VARIABLE_REF:		case ELEMENT:		case TEXT:		case NAMESPACE_DECL:		case DEF_NAMESPACE_DECL:		case DEF_FUNCTION_NS_DECL:		case GLOBAL_VAR:		case FUNCTION_DECL:		case NCNAME:		case STRING_LITERAL:		case EQ:		case LCURLY:		case COMMA:		case STAR:		case PLUS:		case LITERAL_if:		case LITERAL_return:		case LITERAL_or:		case LITERAL_and:		case NEQ:		case GT:		case GTEQ:		case LT:		case LTEQ:		case ANDEQ:		case OREQ:		case LITERAL_to:		case MINUS:		case LITERAL_div:		case LITERAL_mod:		case UNION:		case SLASH:		case DSLASH:		case LITERAL_text:		case LITERAL_node:		case SELF:		case XML_COMMENT:		case AT:		case PARENT:		case LITERAL_child:		case LITERAL_self:		case LITERAL_attribute:		case LITERAL_descendant:		case 100:		case 101:		case LITERAL_parent:		case LITERAL_ancestor:		case 104:		case 105:		case DOUBLE_LITERAL:		case DECIMAL_LITERAL:		case INTEGER_LITERAL:		case XML_PI:		{			break;		}		default:		{			throw new NoViableAltException(_t);		}		}		}		{		_loop213:		do {			if (_t==null) _t=ASTNULL;			switch ( _t.getType()) {			case NAMESPACE_DECL:			{				AST __t209 = _t;				prefix = _t==ASTNULL ? null :(AST)_t;				match(_t,NAMESPACE_DECL);				_t = _t.getFirstChild();				uri = (AST)_t;				match(_t,STRING_LITERAL);				_t = _t.getNextSibling();												context.declareNamespace(prefix.getText(), uri.getText());											_t = __t209;				_t = _t.getNextSibling();				break;			}			case DEF_NAMESPACE_DECL:			{				AST __t210 = _t;				AST tmp22_AST_in = (AST)_t;				match(_t,DEF_NAMESPACE_DECL);				_t = _t.getFirstChild();				defu = (AST)_t;				match(_t,STRING_LITERAL);				_t = _t.getNextSibling();												context.declareNamespace("", defu.getText());											_t = __t210;				_t = _t.getNextSibling();				break;			}			case DEF_FUNCTION_NS_DECL:			{				AST __t211 = _t;				AST tmp23_AST_in = (AST)_t;				match(_t,DEF_FUNCTION_NS_DECL);				_t = _t.getFirstChild();				deff = (AST)_t;				match(_t,STRING_LITERAL);				_t = _t.getNextSibling();												context.setDefaultFunctionNamespace(deff.getText());											_t = __t211;				_t = _t.getNextSibling();				break;			}			case GLOBAL_VAR:			{				AST __t212 = _t;				qname = _t==ASTNULL ? null :(AST)_t;				match(_t,GLOBAL_VAR);				_t = _t.getFirstChild();				PathExpr enclosed = new PathExpr(context);				expr(_t,enclosed);				_t = _retTree;												VariableDeclaration decl = new VariableDeclaration(context, qname.getText(), enclosed);								path.add(decl);											_t = __t212;				_t = _t.getNextSibling();				break;			}			case FUNCTION_DECL:			{				functionDecl(_t,path);				_t = _retTree;				break;			}			default:			{				break _loop213;			}			}		} while (true);		}		_retTree = _t;	}