[antlr-interest] [c target] debugging using antlrworks

Gavin Lambert antlr at mirality.co.nz
Sat Oct 3 15:40:47 PDT 2009


At 10:48 4/10/2009, =?koi8-r?B?4NLV28vJziDtycjBycw=?= wrote:
 >I generated parser grammar with -debug option, but nothing 
works.
 >I haven't understood how to customize parser init code - there 
are
 >no examples.

There are examples for the standard C parser init code.  Have a 
look at the downloads page.

 >There is antlr3DebugListenerNew() method, but i don't know how 
to
 >use it.

You don't need to; the runtime takes care of the debugging code 
internally.  Just use your normal startup code; when compiled with 
-debug, it will pause during startup waiting for ANTLRWorks to use 
the Debug Remote command.

Make sure you're using the correct ports; the port number was 
changed a while back, so it's possible that one or the other is 
using the wrong port number.  Try using the netstat command to 
check for listening ports after starting your parser, to see which 
port it's using.



More information about the antlr-interest mailing list