Re: javacc help needed
2007/11/5, Rene Engelhard <email@example.com>:
> When removing the generated files, re-building the parser and trying the
> build it fails, though (not at the &6 ;) ) when trying to build the
> which both boil to "Unhandled exception type ParseException".
> Is there anyone javacc-knowledgeable who wants to look and tell me what
> I am/upstream is doing wrong and how to regenerate the parser?
> (apt-get source flutejava/flute-1.3-jfree; look for FIXME ;) )
Upstream modified ParseException.java after it was generated. Even the
generated file says you can! ("You can modify this class to customize
your error reporting...")
In the original modifed file, ParseException extends CSSException
which extends RuntimeException, so it is an unchecked exception. But
unmodifed ParseException extends Exception by default, which makes it
a checked exception, but methods throwing ParseException doesn't
declare to throw it, resulting in compile error.
So you can regenerate files, and then modify ParseException.java as
upstream did. import org.w3c.css.sac.CSSException; and replace the
class ParseException is extending.