[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Stoping a DepthFirstAdapter
Hi Brandner,
This is a FAQ, but unfortunately, we don't yet have a FAQ document...
In two words, derive your AbortException from RuntimeException. Look in the
mailing list archive for the rationale. [Mainly, because of how exceptions are
declared in Java, you either do this, or you impose a "throws" clause on all
in/outXXX methods].
Good luck with your project,
Etienne
Brandner Florian wrote:
> hi,
>
>
>
> I'm implementing a Adapter for visiting all nodes of the AST therefor i
> reimplemented the DepthFirstAdapter, but under certain error conditions
> i want to stop the adapter. i thought to do it with an AbortException or
> something like that. But this is not possible, because in the methods of
> the DepthFirstAdapter no Exceptions are declared to be thrown. Is there
> an other way to do that?
>
>
>
> if there is no way to do this it would be a new entry for the wishlist
> of SabelCC 3.
>
>
>
> thank you in advance,
>
>
>
> florian
>
--
Etienne M. Gagnon http://www.info.uqam.ca/~egagnon/
SableVM: http://www.sablevm.org/
SableCC: http://www.sablecc.org/