Hi! Nick Sieger wrote: [...] > Maybe once the next generation of semantic is available we'll be able > to do the entire refactoring engine in elisp, but until then, I think > letting Java drive the control flow is OK as long as it can query > Emacs for file/buffer info and let Emacs do the textual editing. [...]
The next Semantic 2.0 will include Wisent, a true LALR parser which is a port in Elisp of Bison 1.3. Semantic 2.0 is not yet available, but the LALR parser is fully functional right now (it will be used by default to parse Java buffers). You can download it from the CVS repository of Semantic at <http://sf.net/projects/cedet>. The LALR parser material is in the semantic/wisent subdirectory. The wisent-java.wy file contains a complete grammar of Java where some parts (unused by Semantic) are commented out. Maybe it could be a good starting point to write a new Java grammar with semantic actions that produce abstract syntax trees from Java sources. The AST could then be used by an Elisp refactoring engine. David
