[antlr-interest] charScanner panic.

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


This might have to do with another problem too, which I found out.

When extending AST/Token classes, be sure to declare a default
constructor in your extending class:

public class MyToken extends antlr.Token {

   public MyToken() {
      // If this constuctor is not defined
      // panic() will be called because
      // the classloader cannot instantiate
      // the class.
   }

      :
      :
}

This problem is quite an annoyance, because if panic() is called, the
running JVM (including my JBoss instance) just halts.


Regards
Hawkis



More information about the antlr-interest mailing list