I would have thought that an antlr grammar file parser generating an AST file would have been a good start for this. Any takers? David. Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/