If your lexer and parser grammar rules are contained in a single file
then you can debug it (for example, AST generation) in ANTLRWorks
without using remote debugging or writing any Java code. To do this,
However, if your lexer and parser grammar rules are in separate files
then you must use remote debugging. To do this,
Do not pass null to the constructor of your Parser or TreeParser class
and attempt to set the stream they read from later
(using setTokenStream and setTreeNodeStream).
This will result in a NullPointerException in DebugTokenStream.