step=primary_expr(expr);
i = LT(1); match(INT); if ( inputState.guessing==0 ) {  step = new IntNumber(Double.parseDouble(i.getText())); expr.add(step);  } break; } case NCNAME: case LITERAL_doctype: case LITERAL_document: case LITERAL_collection: case LITERAL_xcollection: case LITERAL_text: case 49: case 50: case LITERAL_contains: case LITERAL_match: case LITERAL_near: { step=function_or_qname(expr);
	public final Expression  step(		PathExpr expr	) throws RecognitionException, TokenStreamException, PermissionDeniedException,EXistException {		Expression step;				Token  any = null;		Token  anyAttr = null;		step = null; 		String qn;		String attr;						switch ( LA(1)) {		case AT:		{			match(AT);			attr=qname();			if ( inputState.guessing==0 ) {											step = new LocationStep(pool,								Constants.ATTRIBUTE_AXIS,								new NameTest(attr));							expr.add(step);								}			break;		}		case STAR:		{			any = LT(1);			match(STAR);			if ( inputState.guessing==0 ) {											step = new LocationStep(pool,								-1,								new TypeTest(Constants.ELEMENT_NODE));							expr.add(step);								}			break;		}		case ATTRIB_STAR:		{			anyAttr = LT(1);			match(ATTRIB_STAR);			if ( inputState.guessing==0 ) {										step = new LocationStep(pool, Constants.ATTRIBUTE_AXIS, new TypeTest(Constants.ATTRIBUTE_NODE));						expr.add(step);								}			break;		}		case LITERAL_node:		{			match(LITERAL_node);			match(LPAREN);			match(RPAREN);			if ( inputState.guessing==0 ) {											step = new LocationStep(pool, -1, new TypeTest(Constants.NODE_TYPE));							expr.add(step);								}			break;		}		case PARENT:		{			match(PARENT);			if ( inputState.guessing==0 ) {											step = new LocationStep(pool, 								Constants.PARENT_AXIS,								new TypeTest(Constants.NODE_TYPE));							expr.add(step);								}			break;		}		case SELF:		{			match(SELF);			if ( inputState.guessing==0 ) {											step = new LocationStep(pool,								Constants.SELF_AXIS,								new TypeTest(Constants.NODE_TYPE));							expr.add(step);								}			break;		}		case CONST:		case INT:		{			step=primary_expr(expr);			break;		}		default:			if ((_tokenSet_1.member(LA(1))) && (LA(2)==LPAREN)) {				step=function_call(expr);			}			else if ((_tokenSet_2.member(LA(1))) && (_tokenSet_3.member(LA(2)))) {				qn=qname();				if ( inputState.guessing==0 ) {													step = new LocationStep( pool, -1, new NameTest(qn));								expr.add(step);										}			}		else {			throw new NoViableAltException(LT(1), getFilename());		}		}		return step;	}