RootNode root = new RootNode(pool);
RootNode root = new RootNode();
	public final void expr(AST _t,		PathExpr path	) throws RecognitionException, PermissionDeniedException,EXistException {				AST expr_AST_in = (AST)_t;					Expression step = null;						if (_t==null) _t=ASTNULL;		switch ( _t.getType()) {		case LITERAL_or:		{			AST __t318 = _t;			AST tmp3_AST_in = (AST)_t;			match(_t,LITERAL_or);			_t = _t.getFirstChild();									PathExpr left = new PathExpr(pool);						PathExpr right = new PathExpr(pool);								expr(_t,left);			_t = _retTree;			expr(_t,right);			_t = _retTree;			_t = __t318;			_t = _t.getNextSibling();									OpOr or = new OpOr(pool);						or.add(left);						or.add(right);						path.addPath(or);								break;		}		case LITERAL_and:		{			AST __t319 = _t;			AST tmp4_AST_in = (AST)_t;			match(_t,LITERAL_and);			_t = _t.getFirstChild();									PathExpr left = new PathExpr(pool);						PathExpr right = new PathExpr(pool);								expr(_t,left);			_t = _retTree;			expr(_t,right);			_t = _retTree;			_t = __t319;			_t = _t.getNextSibling();									OpAnd and = new OpAnd(pool);						and.add(left);						and.add(right);						path.addPath(and);								break;		}		case PARENTHESIZED:		{			AST __t320 = _t;			AST tmp5_AST_in = (AST)_t;			match(_t,PARENTHESIZED);			_t = _t.getFirstChild();									PathExpr expr = new PathExpr(pool);						path.addPath(expr);								expr(_t,expr);			_t = _retTree;			_t = __t320;			_t = _t.getNextSibling();			break;		}		case UNION:		{			AST __t321 = _t;			AST tmp6_AST_in = (AST)_t;			match(_t,UNION);			_t = _t.getFirstChild();										PathExpr left = new PathExpr(pool);							PathExpr right = new PathExpr(pool);									expr(_t,left);			_t = _retTree;			expr(_t,right);			_t = _retTree;			_t = __t321;			_t = _t.getNextSibling();										Union union = new Union(pool, left, right);							path.addPath(union);									break;		}		case ABSOLUTE_SLASH:		{			AST __t322 = _t;			AST tmp7_AST_in = (AST)_t;			match(_t,ABSOLUTE_SLASH);			_t = _t.getFirstChild();										RootNode root = new RootNode(pool);							path.add(root);									{			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 NCNAME:			case LITERAL_or:			case LITERAL_and:			case EQ:			case NEQ:			case GT:			case GTEQ:			case LT:			case LTEQ:			case ANDEQ:			case OREQ:			case STRING_LITERAL:			case PLUS:			case MINUS:			case STAR:			case LITERAL_div:			case LITERAL_mod:			case UNION:			case SLASH:			case DSLASH:			case LITERAL_text:			case LITERAL_node:			case SELF:			case AT:			case PARENT:			case LITERAL_child:			case LITERAL_self:			case LITERAL_attribute:			case LITERAL_descendant:			case 51:			case 52:			case LITERAL_parent:			case LITERAL_ancestor:			case 55:			case 56:			case DOUBLE_LITERAL:			case DECIMAL_LITERAL:			case INTEGER_LITERAL:			{				expr(_t,path);				_t = _retTree;				break;			}			case 3:			{				break;			}			default:			{				throw new NoViableAltException(_t);			}			}			}			_t = __t322;			_t = _t.getNextSibling();			break;		}		case ABSOLUTE_DSLASH:		{			AST __t324 = _t;			AST tmp8_AST_in = (AST)_t;			match(_t,ABSOLUTE_DSLASH);			_t = _t.getFirstChild();										RootNode root = new RootNode(pool);							path.add(root);									{			if (_t==null) _t=ASTNULL;			switch ( _t.getType()) {			case QNAME:			case WILDCARD:			case PREFIX_WILDCARD:			case FUNCTION:			case NCNAME:			case STRING_LITERAL:			case SLASH:			case DSLASH:			case LITERAL_text:			case LITERAL_node:			case SELF:			case AT:			case PARENT:			case LITERAL_child:			case LITERAL_self:			case LITERAL_attribute:			case LITERAL_descendant:			case 51:			case 52:			case LITERAL_parent:			case LITERAL_ancestor:			case 55:			case 56:			case DOUBLE_LITERAL:			case DECIMAL_LITERAL:			case INTEGER_LITERAL:			{				step=pathExpr(_t,path);				_t = _retTree;												if(step instanceof LocationStep) {									LocationStep s = (LocationStep)step;									if(s.getAxis() == Constants.ATTRIBUTE_AXIS)										// combines descendant-or-self::node()/attribute:*										s.setAxis(Constants.DESCENDANT_ATTRIBUTE_AXIS);									else										s.setAxis(Constants.DESCENDANT_AXIS);								}											break;			}			case 3:			{				break;			}			default:			{				throw new NoViableAltException(_t);			}			}			}			_t = __t324;			_t = _t.getNextSibling();			break;		}		case EQ:		case NEQ:		case GT:		case GTEQ:		case LT:		case LTEQ:		{			step=generalComp(_t,path);			_t = _retTree;			break;		}		case ANDEQ:		case OREQ:		{			step=fulltextComp(_t,path);			_t = _retTree;			break;		}		case QNAME:		case WILDCARD:		case PREFIX_WILDCARD:		case FUNCTION:		case NCNAME:		case STRING_LITERAL:		case SLASH:		case DSLASH:		case LITERAL_text:		case LITERAL_node:		case SELF:		case AT:		case PARENT:		case LITERAL_child:		case LITERAL_self:		case LITERAL_attribute:		case LITERAL_descendant:		case 51:		case 52:		case LITERAL_parent:		case LITERAL_ancestor:		case 55:		case 56:		case DOUBLE_LITERAL:		case DECIMAL_LITERAL:		case INTEGER_LITERAL:		{			step=pathExpr(_t,path);			_t = _retTree;			break;		}		case UNARY_MINUS:		case UNARY_PLUS:		case PLUS:		case MINUS:		case STAR:		case LITERAL_div:		case LITERAL_mod:		{			step=numericExpr(_t,path);			_t = _retTree;			break;		}		default:		{			throw new NoViableAltException(_t);		}		}		_retTree = _t;	}