Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. generate classes for them using org.antlr.Tool and the -debug option
  2. write a main class that uses them to parse some input
  3. compile your code and the generated code
  4. run your application which will pause waiting for the debugger
  5. start ANTLRWorks
  6. open the parser grammar file
  7. select Debug Remote Debug... from the Debugger menu
  8. press the Connect button

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.