Subj : Re: Rhino - Parsing? To : netscape.public.mozilla.jseng From : Igor Bukanov Date : Sun Oct 03 2004 02:00 pm Alexander Adam wrote: > hi there, > > I'm trying to have rhino for parsing some jscript code only (not executing > it) to find errors, functions, variables etc to navigate through code.. compileString/compileReader in org.mozilla.javascript.Context, http://www.mozilla.org/rhino/apidocs/org/mozilla/javascript/Context.html , allow to compile scripts and check for syntax errors without executing any JS code. To see what functions are supplied in the script, set the pure interpretation mode before calling the compile functions: contextInstance.setOptimizationLevel(-1) Then the compiled Script object would implement org.mozilla.javascript.debug.DebuggableScript interface which you can use to enumerate declared functions. Checking for variables is possible in principle but then you have to access package-private classes as there is no public API for that in Rhino. Regards, Igor .