Hi!

On Thu, 18 Nov 1999 Paul Mclachlan wrote:

--<snip>--

>Having said that, if I wanted to do something like this, I would use
>JavaCC, or, specifically, the "jjtree" tool in JavaCC.  jjtree will
>automatically parse the file into an OO structure ready for manipulation.
>(ie, you might set it up to create a "class object", a "method object", and
>a 'methodcall' object, among other things.  You could then use this like
>any other tree.  This will probably automate something you would have done
>anyway.

I've used JJTree a while ago and had some problems. It started with the simple
fact, that the Java grammar and all derived work was copyrighted by Metamata,
so I couldn't include it in my work. Make sure this copyright has changed, if
you want to share your work.
The next problem occured when I wanted 2 parsers to use the same base classes
for the AST. Never managed to do that, and I couldn't patch JavaCC, since there
were no sources available.
So I decided to use Antlr for further projects. It works pretty well, although
I have problems with parsing a few files (had no time yet to figure why).
The Antlr Treeparser concept works just as well as JJTree, maybe even better.
Another OSS CC tool is SableCC ( http://www.sable.mcgill.ca/sablecc/ ).
There are a Yacc-like tools available (like JavaCUP), but I wouldn't use them
anymore.

Ciao,
Andreas



----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to