No, you haven't missed anything at all. One just has to built such a
tree walker and define a respective XML document format.
But again that would be solely an AST translation of ANTLR ("BNF")
grammar to its XML representation. One can also produce a concrete
syntax tree of parsed input in form of XML with respective syntax
markup (AST tags).What's to relevant applications - pure curiosity and research. On Mon, Apr 25, 2011 at 1:13 PM, Hiran Chaudhuri <[email protected]> wrote: > A grammar for parsing grammars is what ANTLR has builtin. How else would you > define a grammar and make ANTLR generate the code? > Once such a grammar is parsed an AST should be available. > > And since an AST is a tree structure, a simple TreeWalker could serialize it > to XML. > > I do not see the big difficulty here. But as I have not followed the full > discussion I may have missed a bit... > > Hiran > > > -----Ursprüngliche Nachricht----- > Von: "Ben Senior" <[email protected]> > Gesendet: 24.04.2011 13:57:14 > An: [email protected] > Betreff: Re: [antlr-interest] EBNF - XML representations > > [...] >>I'm not sure it is difficult at all to build a grammar for parsing >>grammars, I am just less convinced as time goes by whether that's a >>really useful thing to do. > [...] > -- With best regards, Y.Y. 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.
