A small JJDoc bug fixed

05 Nov 2008

Michael Iber reported a bug in JavaCC - the documentation generator, JJDoc, was erroring out on tokens defined with repetition ranges. For example, a token definition that contained {2,3} would result in this error:

Java Compiler Compiler Version 4.1d1 (Documentation Generator Version 0.1.4)
(type "jjdoc" with no arguments for help)
Reading from file error.jj . . .
Oops: Unknown regular expression type.
Exception in thread "main" java.lang.NullPointerException
        at org.javacc.jjdoc.HTMLGenerator.print(Unknown Source)
        at org.javacc.jjdoc.HTMLGenerator.println(Unknown Source)
        at org.javacc.jjdoc.HTMLGenerator.nonterminalsStart(Unknown Source)
        at org.javacc.jjdoc.JJDoc.emitNormalProductions(Unknown Source)
        at org.javacc.jjdoc.JJDoc.start(Unknown Source)
        at org.javacc.jjdoc.JJDocMain.mainProgram(Unknown Source)
        at org.javacc.jjdoc.JJDocMain.main(Unknown Source)
        at jjdoc.main(Unknown Source)

This is fixed in CVS now (v1.16 of JJDoc.java) and I've posted an updated javacc.jar for those who encounter this problem.