I'm not sure what you mean by "regular parsing". I would have thought parsing is exactly what you need to be done, while the other stages of compilation (binding of variable and function references, type analysis, optimization) are superfluous.
We do expression analysis to figure out usage of specific functions in it. For that, we are parsing (staticContext.compileQuery(exp)) the expression and getting net.sf.saxon.XQueryExpression object back and getting net.sf.saxon.expr.Expression out of it. This expression object is analyzed to figure out usage of specific functions. Since we are not really executing (iterating the results) we do not want to do regular parsing to get net.sf.saxon.expr.Expression. Is there a way to get net.sf.saxon.expr.Expression without getting XQueryExpression so that the compile time for each expression can be reduced? We are using Saxon-PE 188.8.131.52.