public void parse(String xpath) throws SAXPathException { setUpParse( xpath ); getXPathHandler().startXPath(); expr(); getXPathHandler().endXPath(); if ( LA(1) != TokenTypes.EOF ) { XPathSyntaxException ex = createSyntaxException( "Unexpected '" + LT(1).getTokenText() + "'" ); throw ex; } lexer = null; tokens = null; }