To help you in writing an LL grammar, we have developed a tool to analyze a grammar and determine if it is LL(1).
A jar file containing the class files can be downloaded here. Place this jar file in your class path before running the analyzer. LLAnalyze requires JDK 1.2. In the CSUGLAB, use g:\jdk1.2.2\bin\java (NT) or /usr/local/jdk1.2.1 (Solaris).
You can also look at the source code for LLAnalyze. JLex is required to build it.
You can check your grammar with
java Iota.util.grammar.LLAnalyze < grammar_file
Additional options let you dump the NULLABLE flags and the FIRST and FOLLOW sets for all nonterminals in the grammar.
java Iota.util.grammar.LLAnalyze [options] < grammar_file where options are: -dump_grammar dump the grammar -dump_nullable dump NULLABLE flags for all nonterminals -dump_first dump FIRST sets for all nonterminals -dump_follow dump FOLLOW sets for all nonterminals -help what?
2/6 11PM: Fixed a bug with reading DOS format files.
2/5 1AM: Fixed a bug with reading comments in grammar files.
2/2 9PM: Initial version.