|
From: Matt B. <gud...@ya...> - 2001-11-20 18:31:29
|
I haven't worked on the Jext port of Transmogrify in quite some time; I first had to put together a working prototype of Jext's Project API which is being built for the purpose of better integrating Transmogrify (we hope to use its analytics for all Java parsing tasks). I am about ready to resume work on the port but had not heard that comments had been fixed, so assumed otherwise. Again those were a must so I am glad to hear that they are no longer a problem. I will advise the list of any difficulties I encounter whenever I get back to working on this (hence my comment about having a life being a problem for open-source developers :) ). --- John P N Pybus <joh...@zo...> wrote: > On Tuesday 20 Nov 2001 4:39 pm, you (Matt Benson) > wrote: > > How about those comments, then?? ;) > > Hi there Matt, > > Yes, I have had a look at the comments issue, all > the machinery is already > there in Transmogrify, comments are stored with the > AST, and (apart from a > few minor issues such as the final comment in a file > being missed out) the > printer package should be able to write them back > out. > > Where exactly do you have problems? Are you using > JBuilder?, I'm not using > transmogrify with JBuilder myself. I've attached a > test program which parses > a file, and prints it straight back out (it'll need > transmogrify and antlr in > its classpath). Does that work for you? It works > okay for me, comments and > all. > > > Doesn't having a > > life suck? > > Aah, I use transmogrify as a displacement activity > when I'm bored of work. > More subtle than a game of Quake -- unless you get > very close, one java dev > session is indistinguishable from another ;-). > > John > > import net.sourceforge.transmogrify.symtab.*; > import > net.sourceforge.transmogrify.symtab.printer.*; > import net.sourceforge.transmogrify.symtab.parser.*; > > import antlr.collections.*; > > import java.io.*; > > public class PrintTest { > /** > * run with two arguments <filein.java> > <fileout.java> > * > * If all is well they should be the same modulo > whitespace. > */ > public static void main(String[] s) > throws Exception > { > FileParser in = new FileParser(); > in.doFile(new File(s[0])); > Printer printer = > PrinterFactory.makePrinter(in.getTree()); > printer.print(new PrettyPrinter(new > FileWriter(s[1]))); > } > } __________________________________________________ Do You Yahoo!? Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month. http://geocities.yahoo.com/ps/info1 |