[antlr-interest] charScanner panic.

Vidar Håkestad vidar at hawkis.com
Mon Apr 9 06:31:34 PDT 2007


There might be another problem that causes the panic() to be called:
If your AST/Token extensions have no default constructor, the panic()
will be called by the class loader, because it hav no way of default
constructing your class. So you have to:

public class MyToken extends antlr.Token {

   pulblic MyToken() {
      // Declare this constructor in order for
      // the class loader to instanciate your class
   }

      :
      :
}

The fact that there are code in the library that calls System.exit() is
quite annoying because it effectively kills any JVM it is part of,
including my JBoss application server.


Regards
hawkis



More information about the antlr-interest mailing list