org.exist.xquery.parser.XQueryAST tmp101_AST_in = (org.exist.xquery.parser.XQueryAST)_t;
org.exist.xquery.parser.XQueryAST tmp102_AST_in = (org.exist.xquery.parser.XQueryAST)_t;
	public final Expression  updateExpr(AST _t,		PathExpr path	) throws RecognitionException, XPathException,PermissionDeniedException,EXistException {		Expression step;				org.exist.xquery.parser.XQueryAST updateExpr_AST_in = (_t == ASTNULL) ? null : (org.exist.xquery.parser.XQueryAST)_t;		org.exist.xquery.parser.XQueryAST updateAST = null;								AST __t233 = _t;		updateAST = _t==ASTNULL ? null :(org.exist.xquery.parser.XQueryAST)_t;		match(_t,LITERAL_update);		_t = _t.getFirstChild();							PathExpr p1 = new PathExpr(context);					PathExpr p2 = new PathExpr(context);					int type;					int position = Insert.INSERT_APPEND;						{		if (_t==null) _t=ASTNULL;		switch ( _t.getType()) {		case LITERAL_replace:		{			org.exist.xquery.parser.XQueryAST tmp97_AST_in = (org.exist.xquery.parser.XQueryAST)_t;			match(_t,LITERAL_replace);			_t = _t.getNextSibling();			type = 0;			break;		}		case LITERAL_value:		{			org.exist.xquery.parser.XQueryAST tmp98_AST_in = (org.exist.xquery.parser.XQueryAST)_t;			match(_t,LITERAL_value);			_t = _t.getNextSibling();			type = 1;			break;		}		case LITERAL_insert:		{			org.exist.xquery.parser.XQueryAST tmp99_AST_in = (org.exist.xquery.parser.XQueryAST)_t;			match(_t,LITERAL_insert);			_t = _t.getNextSibling();			type = 2;			break;		}		case LITERAL_delete:		{			org.exist.xquery.parser.XQueryAST tmp100_AST_in = (org.exist.xquery.parser.XQueryAST)_t;			match(_t,LITERAL_delete);			_t = _t.getNextSibling();			type = 3;			break;		}		case LITERAL_rename:		{			org.exist.xquery.parser.XQueryAST tmp101_AST_in = (org.exist.xquery.parser.XQueryAST)_t;			match(_t,LITERAL_rename);			_t = _t.getNextSibling();			type = 4;			break;		}		default:		{			throw new NoViableAltException(_t);		}		}		}		step=expr(_t,p1);		_t = _retTree;		{		if (_t==null) _t=ASTNULL;		if ((_t.getType()==LITERAL_preceding)) {			org.exist.xquery.parser.XQueryAST tmp102_AST_in = (org.exist.xquery.parser.XQueryAST)_t;			match(_t,LITERAL_preceding);			_t = _t.getNextSibling();			position = Insert.INSERT_BEFORE;		}		else if ((_t.getType()==LITERAL_following)) {			org.exist.xquery.parser.XQueryAST tmp103_AST_in = (org.exist.xquery.parser.XQueryAST)_t;			match(_t,LITERAL_following);			_t = _t.getNextSibling();			position = Insert.INSERT_AFTER;		}		else if ((_t.getType()==LITERAL_into)) {			org.exist.xquery.parser.XQueryAST tmp104_AST_in = (org.exist.xquery.parser.XQueryAST)_t;			match(_t,LITERAL_into);			_t = _t.getNextSibling();			position = Insert.INSERT_APPEND;		}		else if ((_tokenSet_1.member(_t.getType()))) {		}		else {			throw new NoViableAltException(_t);		}				}		{		if (_t==null) _t=ASTNULL;		switch ( _t.getType()) {		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 ATTRIBUTE_TEST:		case COMP_ELEM_CONSTRUCTOR:		case COMP_ATTR_CONSTRUCTOR:		case COMP_TEXT_CONSTRUCTOR:		case COMP_COMMENT_CONSTRUCTOR:		case COMP_PI_CONSTRUCTOR:		case COMP_DOC_CONSTRUCTOR:		case NCNAME:		case EQ:		case STRING_LITERAL:		case LITERAL_element:		case COMMA:		case LCURLY:		case STAR:		case PLUS:		case LITERAL_some:		case LITERAL_every:		case LITERAL_if:		case LITERAL_typeswitch:		case LITERAL_update:		case LITERAL_preceding:		case LITERAL_following:		case LITERAL_return:		case LITERAL_or:		case LITERAL_and:		case LITERAL_instance:		case LITERAL_treat:		case LITERAL_castable:		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 LITERAL_attribute:		case LITERAL_comment:		case 163:		case SELF:		case XML_COMMENT:		case XML_PI:		case AT:		case PARENT:		case LITERAL_child:		case LITERAL_self:		case LITERAL_descendant:		case 175:		case 176:		case LITERAL_parent:		case LITERAL_ancestor:		case 179:		case 180:		case DOUBLE_LITERAL:		case DECIMAL_LITERAL:		case INTEGER_LITERAL:		case XML_CDATA:		{			step=expr(_t,p2);			_t = _retTree;			break;		}		case 3:		{			break;		}		default:		{			throw new NoViableAltException(_t);		}		}		}							Modification mod;					if (type == 0)						mod = new Replace(context, p1, p2);					else if (type == 1)						mod = new Update(context, p1, p2);					else if (type == 2)						mod = new Insert(context, p2, p1, position);					else if (type == 3)						mod = new Delete(context, p1);					else						mod = new Rename(context, p1, p2);					mod.setASTNode(updateAST);					path.add(mod);					step = mod;						_t = __t233;		_t = _t.getNextSibling();		_retTree = _t;		return step;	}