Re: Re: software design clarification
"Eric M. Hopper" <[email protected]> Tue, 01 May 2007 20:54:16 -0700
| Newsgroups | gmane.comp.documentation.synopsis |
|---|---|
| Organization | Omnifarious Software |
| Message-ID | <[email protected]> |
On Tue, 2007-05-01 at 13:39 -0400, Stefan Seefeld wrote: > It may not be that bad as a storage format (Markus was asking for an > in-memory representation he could apply XPath queries to). The only > immediate argument that comes to mind is its verbosity (as usual). Oh. Well, near as I can tell, you can apply XPath queries to nearly anything tree-like. But, yes, XML is a horrible internal format. > Parse trees don't have references, usually (or else they weren't > trees, but graphs). References need to be created externally when > interpreting a parse tree. Hmm, so what happens when an identifier is referenced in one part of the parse tree that was declared in another? > Same as above. We are talking about in-memory representations, and > there the XML-way of doing things would be a DOM, which, I think, is > hugely inappropriate. (Even more so than with XML itself. :-) ) Yeah, I agree, as in in-memory representation, XML is awful. > Right now the AST is stored on disk as a python pickle. That's mostly > for convenience, because that is what Python supports out of the box. > It's possible to get inventive and to consider alternative formats > (for which writers and readers would need to be written. As Graydon > points out, XML only provides the lowest layer. You'd still need to > reconstruct the AST from the incoming XML data. That code doesn't > exist.) This is true. And it sounds like there are already things that produce XML parse trees, like GCCXML. > Again, so far I haven't had any need to dive into that. There are much more important issues > to be solved. I agree. I've been looking forward to a documentation generator for C++ that had a real parser in it for awhile. Thanks for the explanation, -- The best we can hope for concerning the people at large is that they be properly armed. -- Alexander Hamilton -- Eric Hopper ([email protected] http://www.omnifarious.org/~hopper) -- _______________________________________________ Synopsis-devel mailing list [email protected] http://lists.fresco.org/cgi-bin/listinfo/synopsis-devel
signature.asc
(application/pgp-signature, 185 B)
-----BEGIN PGP MESSAGE----- Version: GnuPG v1.4.7 (GNU/Linux) iD8DBQBGOAtojtsvlOwvazYRAineAKCXfZIUv8zO+yhVE0yx9lqSA6TlHgCfdN5E ck/8wXJQ4YiK2mrzZq8fZqs= =zcap -----END PGP MESSAGE-----