[antlr-interest] c++ libantlr: panic()
rbencina at iprimus.com.au
Fri Mar 21 05:37:03 PST 2003
"Ric Klaren" <klaren at cs.utwente.nl> wrote:
> I think panic is carry over from the Java version, in the java version it
> is used inside makeToken of the CharScanner (in case instantiation fails).
> In C++ mode it is never called from the support code nor from the
> code. Basically I could remove them. For now I'll implement your
> suggestion. Thanks for noting this.
Thanks for explaining the situation.
I for one would be happy if you choose to remove the panic() functions
completely (or at least mark them as deprecated) if they are not used by any
of the library or generated code - a function that calls exit(), even if it
can be overridden, seems quite extreme to me. Allowing the client to
override it and implement an alternative panic mechanism is fine if panic()
is required, but creates unnecessary work and complexity if panic() is never
going to be called. The only way to ensure that panic() is never called in
the future is to remove it.
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
More information about the antlr-interest