[antlr-interest] antlrworks interpreter like serialized parse tree

Candide Kemmler candide at palacehotel.org
Mon Jan 25 04:48:24 PST 2010


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
> <candide at palacehotel.org> 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
>> 



More information about the antlr-interest mailing list