if ( _cnt125>=1 ) { break _loop125; } else {throw new NoViableAltException(LT(1), getFilename());}
if ( _cnt128>=1 ) { break _loop128; } else {throw new NoViableAltException(LT(1), getFilename());}
	public final void typeswitchExpr() throws RecognitionException, TokenStreamException, XPathException {				returnAST = null;		ASTPair currentAST = new ASTPair();		org.exist.xquery.parser.XQueryAST typeswitchExpr_AST = null;		String varName;				org.exist.xquery.parser.XQueryAST tmp145_AST = null;		tmp145_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1));		astFactory.makeASTRoot(currentAST, tmp145_AST);		match(LITERAL_typeswitch);		match(LPAREN);		expr();		astFactory.addASTChild(currentAST, returnAST);		match(RPAREN);		{		int _cnt125=0;		_loop125:		do {			if ((LA(1)==LITERAL_case)) {				caseClause();				astFactory.addASTChild(currentAST, returnAST);			}			else {				if ( _cnt125>=1 ) { break _loop125; } else {throw new NoViableAltException(LT(1), getFilename());}			}						_cnt125++;		} while (true);		}		org.exist.xquery.parser.XQueryAST tmp148_AST = null;		tmp148_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1));		astFactory.addASTChild(currentAST, tmp148_AST);		match(LITERAL_default);		{		switch ( LA(1)) {		case DOLLAR:		{			match(DOLLAR);			varName=qName();			break;		}		case LITERAL_return:		{			break;		}		default:		{			throw new NoViableAltException(LT(1), getFilename());		}		}		}		match(LITERAL_return);		exprSingle();		astFactory.addASTChild(currentAST, returnAST);		typeswitchExpr_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root;		returnAST = typeswitchExpr_AST;	}