That's very interesting. I don't want to create an image, no: only a structured 
data representation (XML or JSON).
Can you elaborate a little bit on how to enable the debug option ("debug = 
true" is not working for me) and then how to listen to the debugging events?

Thanks a lot for your quick and enlightening answer :-)

Candide
On 25 Jan 2010, at 13:23, Scott Stanchfield wrote:

> It's captured using the debugging API. ANTLRWorks listens to debugging
> events from your parser (when it's generated with the debug option)
> and hears when rules are entered and exited.
> 
> You could use these events to build a tree (I'm working on an
> AST-diagram generator for eclipse using the debug API, using Eclipse's
> Zest framework for the diagram).
> 
> If you just want images, I would recommend that you use the debugging
> api to capture the enters/exits and then create a GraphViz dot file.
> Check out http://www.graphviz.org. You can use it to generate many
> graphics file formats.
> -- Scott
> 
> ----------------------------------------
> Scott Stanchfield
> http://javadude.com
> 
> 
> 
> On Mon, Jan 25, 2010 at 7:17 AM, Candide Kemmler
> <[email protected]> wrote:
>> Hi,
>> 
>> I'm very happy with my antlr results so far, and next step is to use antlr's 
>> output to add a code-completion like feature to my application.
>> 
>> I love the parse tree representation that antlrWorks presents and getting 
>> such a structure would be ideal for my use case. However I can't seem to 
>> find a way to create a similar representation of the parse tree using the 
>> API.
>> 
>> Any ideas?
>> 
>> Candide
>> 
>> List: http://www.antlr.org/mailman/listinfo/antlr-interest
>> Unsubscribe: 
>> http://www.antlr.org/mailman/options/antlr-interest/your-email-address
>> 


List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe: 
http://www.antlr.org/mailman/options/antlr-interest/your-email-address

-- 
You received this message because you are subscribed to the Google Groups 
"il-antlr-interest" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/il-antlr-interest?hl=en.

Reply via email to