Hi Sriram: we have been very pleased with JavaCC and use it extensively in our work. I would like to complement Doug's reference with one from the pre-www days: @BOOK{hop-ull:aut, AUTHOR = "John E. Hopcroft and Jeffrey D. Ullman", TITLE = "Introduction to Automata Theory, Languages, and Computation", PUBLISHER = "Addison-Wesley", YEAR = "1979" } Pages 88 and 89 contains explanation and an efficient algorithm for eliminating useless symbols. Along the same line I would like to mention that it would be very useful for JavaCC users to know in which of _seven_ fundamental categories their grammar falls. The Venn diagram for 11 categories is in my book on page 372: ftp://ftp.ccs.neu.edu/pub/people/lieber/book/aoos.PDF http://www.ccs.neu.edu/research/demeter/biblio/dem-book.html We have implemented a very effcient semantic checker for grammars which distinguishes between the 7 categories (in C++ for Demeter/C++) and the source code is on the web. It is only for 7 since ambiguity is undecidable. Let me know if you need a pointer to the source code. Best regards, -- Karl From dougo@ccs.neu.edu Tue Jun 23 18:29:52 1998 From: Doug Orleans To: Sriram Sankar cc: dougo@ccs.neu.edu, lieber@ccs.neu.edu Subject: Re: useless symbols It is possible to determine (in polynomial time even) whether each production in a grammar can ever be used in parsing any finite string. See, e.g., http://watson2.cs.binghamton.edu/~lander/cs373/1997_cs373N11.html --Doug