Hi. I would like to persist the AST as XML. I was thinking of (manually) translating my AST grammar to an XSD that maps the individual ASTs to their respective XML elements and then using JAXB to generate the Java objects. Then, while walking the AST, I could instantiate the JAXB object that corresponds to the particular AST node. Once I’ve basically recreated the AST with JAXB objects, I can have JAXB stream the objects to XML. Also, with the AST represented as JAXB objects, I could perform XSL translations against the representation of the AST.
What’s the best way to do this? I was thinking maybe of tweaking the .txt template files within the SableCC jar such that the generated AST classes are JAXB classes. Then, instead of walking the generated AST I could just “tell” the AST to stream itself into XML.
What do you think?
Thanks,
Mike.
--
-- You received this message because you are subscribed to the SableCC group. To post to this group, send email to sab...@googlegroups.com. To unsubscribe from this group, send email to sablecc+u...@googlegroups.com. For more options, visit this group at https://groups.google.com/d/forum/sablecc?hl=en
---
You received this message because you are subscribed to the Google Groups "SableCC" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sablecc+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Wow… I must’ve been living under a rock or something. XStream looks great. Thanks.