[GCC-XML] gccxml newbie, some questions

Isak Johnsson isak at hypergene.com
Thu Aug 26 04:39:56 EDT 2004


> Also I wonder, if it would be possible to make a library from GCCXML 
> that
> instead of producing XML Output is providing some intermediate 
> interface,
> that then another programm uses to generate the XML output. I ask this,
> because this would make it possible for other 3rd party programms, that
> need to parse C++ to include this library w/o having to parse the
> generated XML because the output of the parser library would be
> sufficient. XML parsing is simple, but not parsing at all is yet 
> simpler.

I've got a small suggestion. The output from the library could be in 
the form of a stream of SAX-events (virtual function calls).

We're doing this for in-process communication of XML data. The 
advantage is that you need not write the XML to text and parse it again 
(speed), but you do still retain the semantics of XML, so none of the 
many questions that can arise out of the need to work with an 
alternative data representation has to be answered.

Arabica (http://www.jezuk.co.uk/cgi-bin/view/arabica) works great for 
this purpose. And if you want real XML output at any point, you just 
connect a writer handler to the event stream. It also makes it easy to 
write tests. With a parser, you can just insert predefined XML in the 
stream at any point.

A bit off-topic: Do you have more information about the binary 
component system you are developing? Is it open? Please reply to me in 
private if you do.

Cheers!

Isak




More information about the gccxml mailing list