Subject: Re: Java pretty printing in/with DocBook From: Paul Prescod <papresco@xxxxxxxxxxxxxxxx> Date: Sun, 22 Feb 1998 15:54:10 -0500 |
W. Eliot Kimber wrote: > > It would certainly be possible to write DSSSL functions that parse the Java > source and do the formatting. My first approach would be to see if there's > an emacs mode for Java (there must be) and see if I could use that as the > base (as emacs is a lisp application). Or maybe there's already lisp or > scheme code for doing Java parsing out there? Emacs Lisp is quite different from Scheme. Not only is it not side-effect-free, similarly named things can actually cause side-effects that you don't mean to cause because of a feature called "dynamic binding" that has been driven out of most modern Lisp dialects. The relationship is analgous to C and Java. They look similar, and share similar concepts, but porting large chunks of code would still be fairly slow. It would be possible to parse the Java with DSSSL, but without a library, that strikes me as a large job. (somewhat like an SGML parser in REXX. :) ) My approach to this would be to use any language with an existing Java parser to parse the Java code, and output some kind of JavaML that captures the structure in SGML or XML tags. You could use C/C++, Java, Python or Emacs Lisp, for example. Then you could batch-convert the Java to SGML and let "make" take care of dependencies. This is not the approach I would take given infinite resources, but on a deadline, it seems simplest. You could also try to integrate a C++ parser with Jade, but that seems like more work with not much benefit. Also, the former Java->JavaML converter would probably be useful in other contexts (e.g. on the Web, with XSL). Paul Prescod - http://itrc.uwaterloo.ca/~papresco [Woody Allen on Hollywood in "Annie Hall"] Annie: "It's so clean down here." Woody: "That's because they don't throw their garbage away. They make it into television shows." DSSSList info and archive: http://www.mulberrytech.com/dsssl/dssslist
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: Java pretty printing in/with Do, W. Eliot Kimber | Thread | Re: Java pretty printing in/with Do, Norman Walsh |
Re: Java pretty printing in/with Do, W. Eliot Kimber | Date | Re: Java pretty printing in/with Do, W. Eliot Kimber |
Month |