Subj : AST manipulation To : netscape.public.mozilla.jseng From : "Kristoffer Olson" Date : Fri Oct 03 2003 09:42 am Hi, I have som EcmaScript/JavaScript that can be run in Rhino and Internet Explorer script engine. The code base is large, and I would like to fix some flaws in it by finding patterns in the source code. My idea is to parse the files and search for these patterns and fix the problem by manipulating the AST tree and serialize the modified tree. Any suggestions on how to modify Rhino to do this type of thing? So far I've tried diffrent grammars for JavaCC, ANTLR, SableCC etc., but always finding that the generated parser can't interpret my files. Does anybody have any EcmaScript compliant grammar to recommend, readable by e.g. JavaCC, SableCC, ANTLR or such? Best Regards Kristoffer .