AST __t243 = _t;
AST __t248 = _t;
	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;		Expression step = null;				{		if (_t==null) _t=ASTNULL;		switch ( _t.getType()) {		case VERSION_DECL:		{			AST __t238 = _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 = __t238;			_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 BEFORE:		case AFTER:		case NCNAME:		case STRING_LITERAL:		case EQ:		case LCURLY:		case COMMA:		case STAR:		case PLUS:		case LITERAL_some:		case LITERAL_every:		case LITERAL_if:		case LITERAL_return:		case LITERAL_or:		case LITERAL_and:		case LITERAL_cast:		case LT:		case GT:		case LITERAL_eq:		case LITERAL_ne:		case LITERAL_lt:		case LITERAL_le:		case LITERAL_gt:		case LITERAL_ge:		case NEQ:		case GTEQ:		case LTEQ:		case LITERAL_is:		case LITERAL_isnot:		case ANDEQ:		case OREQ:		case LITERAL_to:		case MINUS:		case LITERAL_div:		case LITERAL_idiv:		case LITERAL_mod:		case UNION:		case LITERAL_intersect:		case LITERAL_except:		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 120:		case 121:		case LITERAL_parent:		case LITERAL_ancestor:		case 124:		case 125:		case DOUBLE_LITERAL:		case DECIMAL_LITERAL:		case INTEGER_LITERAL:		case XML_PI:		{			break;		}		default:		{			throw new NoViableAltException(_t);		}		}		}		{		_loop246:		do {			if (_t==null) _t=ASTNULL;			switch ( _t.getType()) {			case NAMESPACE_DECL:			{				AST __t240 = _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 = __t240;				_t = _t.getNextSibling();				break;			}			case DEF_NAMESPACE_DECL:			{				AST __t241 = _t;				AST tmp31_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 = __t241;				_t = _t.getNextSibling();				break;			}			case DEF_FUNCTION_NS_DECL:			{				AST __t242 = _t;				AST tmp32_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 = __t242;				_t = _t.getNextSibling();				break;			}			case GLOBAL_VAR:			{				AST __t243 = _t;				qname = _t==ASTNULL ? null :(AST)_t;				match(_t,GLOBAL_VAR);				_t = _t.getFirstChild();												PathExpr enclosed= new PathExpr(context);								SequenceType type= null;											{				if (_t==null) _t=ASTNULL;				switch ( _t.getType()) {				case LITERAL_as:				{					AST __t245 = _t;					AST tmp33_AST_in = (AST)_t;					match(_t,LITERAL_as);					_t = _t.getFirstChild();					type= new SequenceType();					sequenceType(_t,type);					_t = _retTree;					_t = __t245;					_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 BEFORE:				case AFTER:				case NCNAME:				case STRING_LITERAL:				case EQ:				case LCURLY:				case COMMA:				case STAR:				case PLUS:				case LITERAL_some:				case LITERAL_every:				case LITERAL_if:				case LITERAL_return:				case LITERAL_or:				case LITERAL_and:				case LITERAL_cast:				case LT:				case GT:				case LITERAL_eq:				case LITERAL_ne:				case LITERAL_lt:				case LITERAL_le:				case LITERAL_gt:				case LITERAL_ge:				case NEQ:				case GTEQ:				case LTEQ:				case LITERAL_is:				case LITERAL_isnot:				case ANDEQ:				case OREQ:				case LITERAL_to:				case MINUS:				case LITERAL_div:				case LITERAL_idiv:				case LITERAL_mod:				case UNION:				case LITERAL_intersect:				case LITERAL_except:				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 120:				case 121:				case LITERAL_parent:				case LITERAL_ancestor:				case 124:				case 125:				case DOUBLE_LITERAL:				case DECIMAL_LITERAL:				case INTEGER_LITERAL:				case XML_PI:				{					break;				}				default:				{					throw new NoViableAltException(_t);				}				}				}				step=expr(_t,enclosed);				_t = _retTree;												VariableDeclaration decl= new VariableDeclaration(context, qname.getText(), enclosed);								decl.setSequenceType(type);								path.add(decl);											_t = __t243;				_t = _t.getNextSibling();				break;			}			case FUNCTION_DECL:			{				functionDecl(_t,path);				_t = _retTree;				break;			}			default:			{				break _loop246;			}			}		} while (true);		}		_retTree = _t;	}