Date: Sun, 24 Jan 1999 00:33:40 -0800 From: Michael Mansell Feel free to use my answers. 1) Please provide a short description of JTB as a recommendation to someone who has never seen or used it before. If you've ever tried building a parser and had to hand write all the data structures once the parser has broken the file into tokens, then this product is for you. Simply take a JavaCC definition file and run JTB over it. Presto! You've got a parser and all the necessary data structures. 2) How would you classify your use of JTB? What kind of work are you doing or have you done using JTB? I am using JTB to simplify the task of porting a huge API (over 300 function calls) so that it is cross-platform and cross-language. I needed to be able to call this API, as well as build parts of the API in C, C++, Java and VB. I wanted all parts of the API to see the other parts as if it was written in the native language. Therefore, what I did was define the API in terms of the IDL language. I then used JavaCC and JTB to build a parser with data structures. Then I built a number of output modules that took the data structure and wrote a set of stubs and skels for the API in C, COM, Corba and Java. Therefore, my 2000 line IDL file is used to generate over 300,000 lines of code. Boy I'm glad that I didn't do the job by hand :-) 3) What is your opinion on JTB? Did you find the tool useful? Please rate it on a scale from 1 to 10 (worst to best). Very useful tool. Simplified my task enormously. Definitely give it a 10. 4) Have you used other similar tools such as JJTree or ANTLR (specifically, the tree-building aspect of it)? I originally looked at JJTree but turned to JTB when I saw how much quicker it was to get running. 5) If you answered yes to number 4, how would you compare JTB with these other tools? Again, please rate it from 1 to 10 in comparison and include anything you have to say, including comments on ease of use, learning curve, etc. 10 and see above. 6) Please include below any other comments you have regarding JTB. Feel free to include any suggestions for improvement. Haven't really had a chance to check out the Visitor pattern so I don't know whether that part is good or bad. I'll probably be doing a bunch of work later on reconstructing the original IDL from the data structure so hopefully it will work fine. The one suggestion that I have is that I am also doing work on an output module for comments. I'm using the same format as JavaDoc for embedding the comments into the IDL. Unfortunately, this means that I needed to modify my IDL so that /** */ was not recognized as a comment (and therefore skipped by the parser). When I then made a production rule for /** */ and ran it through JTB, I found that when JTB created the Visitor and my production rule classes, it created comments that described my literal "*/" which of course ended the comment in the class prematurely. Therefore I have to hand-modify my production rule and the Visitor class every time I run JTB. It's not a huge deal, but it is an irritation. Michael Mansell mmansell@home.com