case 158:
	public final Expression  primaryExpr(AST _t,		PathExpr path	) throws RecognitionException, PermissionDeniedException,EXistException,XPathException {		Expression step;				org.exist.xquery.parser.XQueryAST primaryExpr_AST_in = (_t == ASTNULL) ? null : (org.exist.xquery.parser.XQueryAST)_t;		org.exist.xquery.parser.XQueryAST v = null;					step = null;						if (_t==null) _t=ASTNULL;		switch ( _t.getType()) {		case ELEMENT:		case TEXT:		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 LCURLY:		case XML_COMMENT:		case XML_PI:		case XML_CDATA:		{			step=constructor(_t,path);			_t = _retTree;			step=predicates(_t,step);			_t = _retTree;								path.add(step);							break;		}		case PARENTHESIZED:		{			AST __t111 = _t;			org.exist.xquery.parser.XQueryAST tmp61_AST_in = (org.exist.xquery.parser.XQueryAST)_t;			match(_t,PARENTHESIZED);			_t = _t.getFirstChild();			PathExpr pathExpr= new PathExpr(context);			{			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 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_instance:			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 139:			case SELF:			case XML_COMMENT:			case XML_PI:			case AT:			case PARENT:			case LITERAL_child:			case LITERAL_self:			case LITERAL_descendant:			case 151:			case 152:			case LITERAL_following:			case LITERAL_parent:			case LITERAL_ancestor:			case 156:			case 157:			case DOUBLE_LITERAL:			case DECIMAL_LITERAL:			case INTEGER_LITERAL:			case XML_CDATA:			case LITERAL_preceding:			{				step=expr(_t,pathExpr);				_t = _retTree;				break;			}			case 3:			{				break;			}			default:			{				throw new NoViableAltException(_t);			}			}			}			_t = __t111;			_t = _t.getNextSibling();			step=predicates(_t,pathExpr);			_t = _retTree;			path.add(step);			break;		}		case STRING_LITERAL:		case DOUBLE_LITERAL:		case DECIMAL_LITERAL:		case INTEGER_LITERAL:		{			step=literalExpr(_t,path);			_t = _retTree;			step=predicates(_t,step);			_t = _retTree;			path.add(step);			break;		}		case VARIABLE_REF:		{			v = (org.exist.xquery.parser.XQueryAST)_t;			match(_t,VARIABLE_REF);			_t = _t.getNextSibling();						step= new VariableReference(context, v.getText());			step.setASTNode(v);						step=predicates(_t,step);			_t = _retTree;			path.add(step);			break;		}		case FUNCTION:		{			step=functionCall(_t,path);			_t = _retTree;			step=predicates(_t,step);			_t = _retTree;			path.add(step);			break;		}		default:		{			throw new NoViableAltException(_t);		}		}		_retTree = _t;		return step;	}