Versions Compared

Key

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

In order to debug a tree grammar the input must be an AST.
Presently the only way to gain access to AST input is through creating a parser that provides "remote debugging".
See How do I set up remote debugging anyway?.
It is necessary to first build an AST that will serve as input to the tree grammar parser.
This parser (sample.g) will not be a debug parser . Source for and must not be generated with the -debug option. Only the tree grammar only (sampleWalker.g) source should be generated with the -debug option

...

is executed, waiting for a remote process to connect. From within ANTLRWorks , selecting open sampleWalker.g and select "Debugger -> Debug Remote", using the default host and port, localhost:49153, . This allows ANTLRWorks to take control of the remote parsing operation.