pd.setNameExpr(qnameExpr); contentExpr=expr(_t,elementContent); _t = _retTree; elementContent.add(contentExpr);
contentExpr=expr(_t,elementContent); _t = _retTree;
	public final Expression  constructor(AST _t,		PathExpr path	) throws RecognitionException, PermissionDeniedException,EXistException,XPathException {		Expression step;				org.exist.xquery.parser.XQueryAST constructor_AST_in = (_t == ASTNULL) ? null : (org.exist.xquery.parser.XQueryAST)_t;		org.exist.xquery.parser.XQueryAST qn = null;		org.exist.xquery.parser.XQueryAST attr = null;		org.exist.xquery.parser.XQueryAST pid = null;		org.exist.xquery.parser.XQueryAST e = null;		org.exist.xquery.parser.XQueryAST attrName = null;		org.exist.xquery.parser.XQueryAST attrVal = null;		org.exist.xquery.parser.XQueryAST pcdata = null;		org.exist.xquery.parser.XQueryAST t = null;		org.exist.xquery.parser.XQueryAST tc = null;		org.exist.xquery.parser.XQueryAST prefix = null;		org.exist.xquery.parser.XQueryAST d = null;		org.exist.xquery.parser.XQueryAST cdata = null;		org.exist.xquery.parser.XQueryAST p = null;		org.exist.xquery.parser.XQueryAST l = null;					step= null;			PathExpr elementContent= null;			Expression contentExpr= null;			Expression qnameExpr = null;						if (_t==null) _t=ASTNULL;		switch ( _t.getType()) {		case COMP_ELEM_CONSTRUCTOR:		{			AST __t434 = _t;			qn = _t==ASTNULL ? null :(org.exist.xquery.parser.XQueryAST)_t;			match(_t,COMP_ELEM_CONSTRUCTOR);			_t = _t.getFirstChild();									ElementConstructor c= new ElementConstructor(context);			c.setASTNode(qn);						step= c;						elementContent = new EnclosedExpr(context);						c.setContent(elementContent);						PathExpr qnamePathExpr = new PathExpr(context);								qnameExpr=expr(_t,qnamePathExpr);			_t = _retTree;			c.setNameExpr(qnameExpr);			contentExpr=expr(_t,elementContent);			_t = _retTree;			_t = __t434;			_t = _t.getNextSibling();			break;		}		case COMP_ATTR_CONSTRUCTOR:		{			AST __t435 = _t;			attr = _t==ASTNULL ? null :(org.exist.xquery.parser.XQueryAST)_t;			match(_t,COMP_ATTR_CONSTRUCTOR);			_t = _t.getFirstChild();									DynamicAttributeConstructor a= new DynamicAttributeConstructor(context);			a.setASTNode(attr);			step = a;			PathExpr qnamePathExpr = new PathExpr(context);			elementContent = new PathExpr(context);			a.setValueExpr(elementContent);								qnameExpr=expr(_t,qnamePathExpr);			_t = _retTree;			a.setNameExpr(qnameExpr);			contentExpr=expr(_t,elementContent);			_t = _retTree;			elementContent.add(contentExpr);			_t = __t435;			_t = _t.getNextSibling();			break;		}		case COMP_PI_CONSTRUCTOR:		{			AST __t436 = _t;			pid = _t==ASTNULL ? null :(org.exist.xquery.parser.XQueryAST)_t;			match(_t,COMP_PI_CONSTRUCTOR);			_t = _t.getFirstChild();									DynamicPIConstructor pd= new DynamicPIConstructor(context);			pd.setASTNode(pid);			step = pd;			PathExpr qnamePathExpr = new PathExpr(context);			elementContent = new PathExpr(context);			pd.setContentExpr(elementContent);								qnameExpr=expr(_t,qnamePathExpr);			_t = _retTree;			pd.setNameExpr(qnameExpr);			contentExpr=expr(_t,elementContent);			_t = _retTree;			elementContent.add(contentExpr);			_t = __t436;			_t = _t.getNextSibling();			break;		}		case ELEMENT:		{			AST __t437 = _t;			e = _t==ASTNULL ? null :(org.exist.xquery.parser.XQueryAST)_t;			match(_t,ELEMENT);			_t = _t.getFirstChild();									ElementConstructor c= new ElementConstructor(context, e.getText());			c.setASTNode(e);						step= c;								{			_loop443:			do {				if (_t==null) _t=ASTNULL;				if ((_t.getType()==ATTRIBUTE)) {					AST __t439 = _t;					attrName = _t==ASTNULL ? null :(org.exist.xquery.parser.XQueryAST)_t;					match(_t,ATTRIBUTE);					_t = _t.getFirstChild();															AttributeConstructor attrib= new AttributeConstructor(context, attrName.getText());					attrib.setASTNode(attrName);										c.addAttribute(attrib);														{					int _cnt442=0;					_loop442:					do {						if (_t==null) _t=ASTNULL;						switch ( _t.getType()) {						case ATTRIBUTE_CONTENT:						{							attrVal = (org.exist.xquery.parser.XQueryAST)_t;							match(_t,ATTRIBUTE_CONTENT);							_t = _t.getNextSibling();							attrib.addValue(attrVal.getText());							break;						}						case LCURLY:						{							AST __t441 = _t;							org.exist.xquery.parser.XQueryAST tmp69_AST_in = (org.exist.xquery.parser.XQueryAST)_t;							match(_t,LCURLY);							_t = _t.getFirstChild();							PathExpr enclosed= new PathExpr(context);							expr(_t,enclosed);							_t = _retTree;							attrib.addEnclosedExpr(enclosed);							_t = __t441;							_t = _t.getNextSibling();							break;						}						default:						{							if ( _cnt442>=1 ) { break _loop442; } else {throw new NoViableAltException(_t);}						}						}						_cnt442++;					} while (true);					}					_t = __t439;					_t = _t.getNextSibling();				}				else {					break _loop443;				}							} while (true);			}			{			_loop445:			do {				if (_t==null) _t=ASTNULL;				if ((_tokenSet_1.member(_t.getType()))) {														if (elementContent == null) {										elementContent= new PathExpr(context);										c.setContent(elementContent);									}													contentExpr=constructor(_t,elementContent);					_t = _retTree;					elementContent.add(contentExpr);				}				else {					break _loop445;				}							} while (true);			}			_t = __t437;			_t = _t.getNextSibling();			break;		}		case TEXT:		{			AST __t446 = _t;			pcdata = _t==ASTNULL ? null :(org.exist.xquery.parser.XQueryAST)_t;			match(_t,TEXT);			_t = _t.getFirstChild();									TextConstructor text= new TextConstructor(context, pcdata.getText());			text.setASTNode(pcdata);						step= text;								_t = __t446;			_t = _t.getNextSibling();			break;		}		case COMP_TEXT_CONSTRUCTOR:		{			AST __t447 = _t;			t = _t==ASTNULL ? null :(org.exist.xquery.parser.XQueryAST)_t;			match(_t,COMP_TEXT_CONSTRUCTOR);			_t = _t.getFirstChild();			contentExpr=expr(_t,new PathExpr(context));			_t = _retTree;									DynamicTextConstructor text = new DynamicTextConstructor(context, contentExpr);						text.setASTNode(t);						step= text;								_t = __t447;			_t = _t.getNextSibling();			break;		}		case COMP_COMMENT_CONSTRUCTOR:		{			AST __t448 = _t;			tc = _t==ASTNULL ? null :(org.exist.xquery.parser.XQueryAST)_t;			match(_t,COMP_COMMENT_CONSTRUCTOR);			_t = _t.getFirstChild();			contentExpr=expr(_t,new PathExpr(context));			_t = _retTree;									DynamicCommentConstructor comment = new DynamicCommentConstructor(context, contentExpr);						comment.setASTNode(t);						step= comment;								_t = __t448;			_t = _t.getNextSibling();			break;		}		case COMP_NS_CONSTRUCTOR:		{			AST __t449 = _t;			prefix = _t==ASTNULL ? null :(org.exist.xquery.parser.XQueryAST)_t;			match(_t,COMP_NS_CONSTRUCTOR);			_t = _t.getFirstChild();			contentExpr=expr(_t,new PathExpr(context));			_t = _retTree;									NamespaceConstructor ns = new NamespaceConstructor(context, prefix.getText());						ns.setURIExpression(contentExpr);						ns.setASTNode(t);						step= ns;								_t = __t449;			_t = _t.getNextSibling();			break;		}		case COMP_DOC_CONSTRUCTOR:		{			AST __t450 = _t;			d = _t==ASTNULL ? null :(org.exist.xquery.parser.XQueryAST)_t;			match(_t,COMP_DOC_CONSTRUCTOR);			_t = _t.getFirstChild();			contentExpr=expr(_t,new PathExpr(context));			_t = _retTree;									DocumentConstructor doc = new DocumentConstructor(context, contentExpr);						doc.setASTNode(d);						step= doc;								_t = __t450;			_t = _t.getNextSibling();			break;		}		case XML_COMMENT:		{			AST __t451 = _t;			cdata = _t==ASTNULL ? null :(org.exist.xquery.parser.XQueryAST)_t;			match(_t,XML_COMMENT);			_t = _t.getFirstChild();									CommentConstructor comment= new CommentConstructor(context, cdata.getText());			comment.setASTNode(cdata);						step= comment;								_t = __t451;			_t = _t.getNextSibling();			break;		}		case XML_PI:		{			AST __t452 = _t;			p = _t==ASTNULL ? null :(org.exist.xquery.parser.XQueryAST)_t;			match(_t,XML_PI);			_t = _t.getFirstChild();									PIConstructor pi= new PIConstructor(context, p.getText());			pi.setASTNode(p);						step= pi;								_t = __t452;			_t = _t.getNextSibling();			break;		}		case LCURLY:		{			AST __t453 = _t;			l = _t==ASTNULL ? null :(org.exist.xquery.parser.XQueryAST)_t;			match(_t,LCURLY);			_t = _t.getFirstChild();						EnclosedExpr subexpr= new EnclosedExpr(context); 			subexpr.setASTNode(l);						step=expr(_t,subexpr);			_t = _retTree;			step= subexpr;			_t = __t453;			_t = _t.getNextSibling();			break;		}		default:		{			throw new NoViableAltException(_t);		}		}		_retTree = _t;		return step;	}