Parses the supplied SPARQL query and builds a syntax tree from it.
Parameters: query - A SPARQL query string. The root of the syntax tree. throws: TokenMgrError - If the query was syntactically incorrect. throws: ParseException - If the query was syntactically incorrect.