[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: javacc help needed



Hello Paul,


On Sun, Nov 11, 2007 at 10:08:13PM +0000, Paul Cager wrote:
> I would say it's not _entirely_ the library developers' fault. JavaCC
> has always had a rather inconsistent use of Exceptions - ParseException
> (thrown for syntactic errors) extends Exception, but TokenMgrError
> (thrown for lexical errors) extends Error. It's not surprising users get
> in a pickle. Having said that, I would certainly think it would be
> better to trap the (unchecked) TokenMgrError and convert it to a
> (checked) ParseException.
> 
> (And sometimes it is quite appropriate for a ParseException to be
> treated as a RuntimeError - e.g. if you are using the parser on
> known-good input. I've not checked if that's the case for flute).
> 
> The next release of JavaCC should make things a little more logical:
> https://javacc.dev.java.net/issues/show_bug.cgi?id=12

Thanks for this explanation. This explains some of the problems.
Unfortunately it doesnt make it better.

Our problem is that that some user of flute might depend on one way and
another might depend on the other way. We dont really want to have
multiple copies of flute in the archive.


Cheers,
Michael



Reply to: