traceIn("unionExpr"); try { returnAST = null; ASTPair currentAST = new ASTPair(); org.exist.xquery.parser.XQueryAST unionExpr_AST = null;  intersectExceptExpr(); astFactory.addASTChild(currentAST, returnAST);
returnAST = null; ASTPair currentAST = new ASTPair(); org.exist.xquery.parser.XQueryAST unionExpr_AST = null;  intersectExceptExpr(); astFactory.addASTChild(currentAST, returnAST); { switch ( LA(1)) { case LITERAL_union: case UNION: {
	public final void unionExpr() throws RecognitionException, TokenStreamException {				traceIn("unionExpr");		try { // debugging			returnAST = null;			ASTPair currentAST = new ASTPair();			org.exist.xquery.parser.XQueryAST unionExpr_AST = null;						intersectExceptExpr();			astFactory.addASTChild(currentAST, returnAST);			{			switch ( LA(1)) {			case LITERAL_union:			case UNION:			{				{				switch ( LA(1)) {				case LITERAL_union:				{					match(LITERAL_union);					break;				}				case UNION:				{					match(UNION);					break;				}				default:				{					throw new NoViableAltException(LT(1), getFilename());				}				}				}				unionExpr();				astFactory.addASTChild(currentAST, returnAST);				if ( inputState.guessing==0 ) {					unionExpr_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root;													unionExpr_AST = (org.exist.xquery.parser.XQueryAST)astFactory.make( (new ASTArray(2)).add((org.exist.xquery.parser.XQueryAST)astFactory.create(UNION,"union")).add(unionExpr_AST));												currentAST.root = unionExpr_AST;					currentAST.child = unionExpr_AST!=null &&unionExpr_AST.getFirstChild()!=null ?						unionExpr_AST.getFirstChild() : unionExpr_AST;					currentAST.advanceChildToEnd();				}				break;			}			case EOF:			case RPAREN:			case EQ:			case RCURLY:			case COMMA:			case LITERAL_empty:			case STAR:			case PLUS:			case LITERAL_for:			case LITERAL_let:			case LITERAL_where:			case LITERAL_return:			case LITERAL_order:			case LITERAL_ascending:			case LITERAL_descending:			case LITERAL_satisfies:			case LITERAL_else:			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 RPPAREN:			{				break;			}			default:			{				throw new NoViableAltException(LT(1), getFilename());			}			}			}			unionExpr_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root;			returnAST = unionExpr_AST;		} finally { // debugging			traceOut("unionExpr");		}	}