Re: Re: software design clarification

"Eric M. Hopper" <[email protected]> Wed, 02 May 2007 06:48:50 -0700
Newsgroups gmane.comp.documentation.synopsis
Organization Omnifarious Software
Message-ID <[email protected]>
On Wed, 2007-05-02 at 06:49 -0400, Stefan Seefeld wrote:
> Eric M. Hopper wrote:
> > 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.
> 
> Huh. You may apply something 'XPath-like' to anything 'tree-like'.
> So what ? What does that tell ?

Well, Markus may want to use something XPath-like to query simply
because it is a familiar means of querying tree structures, much like
SQL is a familiar means of querying tabular structures.

> XPath is a very specific language for a well defined domain.
> 
> Symbol lookup in the context of C++ has its own syntax and semantics.

And I couldn't imagine using XPath for symbol lookup even if the tree
were in an XML DOM.

> C++ is particular in that a lot of that semantic analysis has to happen
> at parse time, i.e. can't easily be deferred to latter stages.
> However, that doesn't mean this information has to become part of the
> parse tree. There are other representations that will be generated by
> the parser.

*nod*  OK, that makes sense.  Representing it in the parse tree though
makes doing things like refactoring editors much easier.  It would be
highly amusing if someone could take your work on a C++ parser and turn
it into a decent fancy refactoring editor like the Java folks have.

Or maybe even something more bizarre like Xerblin:
http://www.geocities.com/rogue_pedro/xerblin/  (The page may be
out-of-date but it has better information than the page that isn't.)

I suppose they could just transform your parse tree themselves though if
that's what they wanted.  There is a lot of trickiness in how C++ does
symbol lookups though that might be really helpful to have tucked away
somewhere.

Thanks,
-- 
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)

iD8DBQBGOJbCjtsvlOwvazYRAnEIAKCZouRUfvkLCbFsAbksMmPMiDllvgCgj3w2
BiZyAXdF8oeYUxnEv0Rpylw=
=dy+Z
-----END PGP MESSAGE-----