I saw there was some documentation on serializing an AST (CommonTree) to
XML. This appears to be only for ANTLR v2 (see below)

Is there a similar facility in 3.1.3?

AST (XML) Serialization

 [Oliver Zeigermann [email protected] provided the initial implementation
of this serialization.  His XTAL <http://www.zeigermann.de/xtal.html> XML
translation code is worth checking out; particularly for reading
XML-serialized ASTs back in.]

 For a variety of reasons, you may want to store an AST or pass it to
another program or computer.  Class antlr.BaseAST is Serializable using the
Java code generator, which means you can write ASTs to the disk using the
standard Java stuff.  You can also write the ASTs out in XML form using the
following methods from BaseAST:

   - public void xmlSerialize(Writer out)
   - public void xmlSerializeNode(Writer out)
   - public void xmlSerializeRootOpen(Writer out)
   - public void xmlSerializeRootClose(Writer out)



Thanks
Des

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

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

Reply via email to